[Pkg-virtualbox-commits] [virtualbox] 01/04: Imported Upstream version 5.1.4-dfsg

Gianfranco Costamagna locutusofborg at moszumanska.debian.org
Wed Aug 17 08:35:48 UTC 2016


This is an automated email from the git hooks/post-receive script.

locutusofborg pushed a commit to branch experimental
in repository virtualbox.

commit 01d6daacd9aa1195f5d1788633f4b96b30186266
Author: Gianfranco Costamagna <costamagnagianfranco at yahoo.it>
Date:   Wed Aug 17 10:07:15 2016 +0200

    Imported Upstream version 5.1.4-dfsg
---
 .scm-settings                                      |    1 +
 Config.kmk                                         |  692 ++-
 Doxyfile.Core                                      |    3 +-
 Maintenance.kmk                                    |    2 +-
 Makefile.kmk                                       |   40 +-
 configure                                          |    6 +-
 configure.vbs                                      |    1 +
 doc/VBox-CodingGuidelines.cpp                      |   29 +-
 doc/manual/Makefile.kmk                            |    2 +-
 doc/manual/en_US/user_AdvancedTopics.xml           |    4 +-
 doc/manual/en_US/user_Troubleshooting.xml          |   21 +
 doc/manual/en_US/user_VBoxManage.xml               | 1553 ++++--
 doc/manual/user_ChangeLogImpl.xml                  |  120 +
 include/Makefile.kmk                               |    2 +-
 include/VBox/ExtPack/ExtPack.h                     |    2 +-
 include/VBox/GuestHost/SharedClipboard.h           |    2 +-
 include/VBox/GuestHost/clipboard-helper.h          |    2 +-
 include/VBox/HGSMI/HGSMI.h                         |    2 +-
 include/VBox/HGSMI/HGSMIChSetup.h                  |   20 +-
 include/VBox/HGSMI/HGSMIChannels.h                 |    2 +-
 include/VBox/HGSMI/HGSMIDefs.h                     |    2 +-
 include/VBox/HGSMI/HGSMIMemAlloc.h                 |    2 +-
 include/VBox/Hardware/VBoxVideoVBE.h               |    2 +-
 include/VBox/HostServices/GuestPropertySvc.h       |    2 +-
 include/VBox/HostServices/Service.h                |    7 +-
 include/VBox/HostServices/VBoxClipboardExt.h       |    2 +-
 include/VBox/HostServices/VBoxClipboardSvc.h       |    2 +-
 include/VBox/HostServices/VBoxCrOpenGLSvc.h        |    2 +-
 include/VBox/HostServices/VBoxHostChannel.h        |    2 +-
 include/VBox/HostServices/VBoxOGLOp.h              |    2 +-
 include/VBox/HostServices/VBoxOpenGLSvc.h          |    2 +-
 include/VBox/HostServices/glext.h                  |    2 +-
 include/VBox/HostServices/glxext.h                 |    2 +-
 include/VBox/HostServices/wglext.h                 |    2 +-
 include/VBox/RemoteDesktop/VRDE.h                  |    2 +-
 include/VBox/RemoteDesktop/VRDEImage.h             |    2 +-
 include/VBox/RemoteDesktop/VRDEInput.h             |    2 +-
 include/VBox/RemoteDesktop/VRDEMousePtr.h          |    2 +-
 include/VBox/RemoteDesktop/VRDEOrders.h            |    2 +-
 include/VBox/RemoteDesktop/VRDESCard.h             |    2 +-
 include/VBox/RemoteDesktop/VRDETSMF.h              |    2 +-
 include/VBox/RemoteDesktop/VRDEVideoIn.h           |    2 +-
 include/VBox/SUPDrvMangling.h                      |    2 +-
 include/VBox/VBoxAuth.h                            |  225 +-
 include/VBox/VBoxCocoa.h                           |    2 +-
 include/VBox/VBoxCrHgsmi.h                         |    5 +-
 include/VBox/VBoxDrvCfg-win.h                      |    4 +-
 include/VBox/VBoxGL2D.h                            |    2 +-
 include/VBox/VBoxGuest.h                           |    4 +-
 include/VBox/VBoxGuest2.h                          |    2 +-
 include/VBox/VBoxGuestLib.h                        |    2 +-
 include/VBox/VBoxGuestLibSharedFolders.h           |    2 +-
 include/VBox/VBoxGuestMangling.h                   |    2 +-
 include/VBox/VBoxNetCfg-win.h                      |    8 +-
 include/VBox/VBoxNetCmn-win.h                      |   12 +-
 include/VBox/VBoxOGL.h                             |    2 +-
 include/VBox/VBoxTpG.h                             |    2 +-
 include/VBox/VBoxUhgsmi.h                          |    2 +-
 include/VBox/VBoxVideo.h                           |    2 +-
 include/VBox/VBoxVideo3D.h                         |    4 +-
 include/VBox/VBoxVideoGuest.h                      |  226 +-
 include/VBox/VBoxVideoHost3D.h                     |    6 +-
 include/VBox/VDEPlug.h                             |    2 +-
 include/VBox/VDEPlugSymDefs.h                      |    2 +-
 include/VBox/VMMDev.h                              |   14 +-
 include/VBox/VMMDev2.h                             |    2 +-
 include/VBox/VMMDevTesting.h                       |    2 +-
 include/VBox/apic.h                                |    2 +-
 include/VBox/asmdefs.mac                           |    2 +-
 include/VBox/bioslogo.h                            |    2 +-
 include/VBox/cdefs.h                               |    2 +-
 include/VBox/com/AutoLock.h                        |   24 +-
 include/VBox/com/ErrorInfo.h                       |    2 +-
 include/VBox/com/EventQueue.h                      |    2 +-
 include/VBox/com/Guid.h                            |    4 +-
 include/VBox/com/MultiResult.h                     |    6 +-
 include/VBox/com/NativeEventQueue.h                |    4 +-
 include/VBox/com/VirtualBox.h                      |    8 +-
 include/VBox/com/array.h                           |   18 +-
 include/VBox/com/assert.h                          |    2 +-
 include/VBox/com/com.h                             |    2 +-
 include/VBox/com/defs.h                            |   33 +-
 include/VBox/com/errorprint.h                      |    3 +-
 include/VBox/com/list.h                            |    2 +-
 include/VBox/com/microatl.h                        |  125 +-
 include/VBox/com/mtlist.h                          |    2 +-
 include/VBox/com/string.h                          |    2 +-
 include/VBox/dbg.h                                 |    2 +-
 include/VBox/dbggui.h                              |    2 +-
 include/VBox/dbus-calls.h                          |    2 +-
 include/VBox/dbus.h                                |    2 +-
 include/VBox/dis.h                                 |    2 +-
 include/VBox/hgcmsvc.h                             |    2 +-
 include/VBox/intnet.h                              |    2 +-
 include/VBox/intnetinline.h                        |    2 +-
 include/VBox/log.h                                 |    7 +-
 include/VBox/msi.h                                 |    2 +-
 include/VBox/nasm.mac                              |    2 +-
 include/VBox/ostypes.h                             |    2 +-
 include/VBox/param.h                               |    2 +-
 include/VBox/pci.h                                 |    2 +-
 include/VBox/rawpci.h                              |    2 +-
 include/VBox/refentry.h                            |    2 +-
 include/VBox/scsi.h                                |    2 +-
 include/VBox/settings.h                            |    1 +
 include/VBox/shflsvc.h                             |    2 +-
 include/VBox/sup.h                                 |    2 +-
 include/VBox/sup.mac                               |    2 +-
 include/VBox/types.h                               |    2 +-
 include/VBox/usb.h                                 |    2 +-
 include/VBox/usbfilter.h                           |    4 +-
 include/VBox/usblib-darwin.h                       |    2 +-
 include/VBox/usblib-solaris.h                      |    2 +-
 include/VBox/usblib-win.h                          |    2 +-
 include/VBox/vd-cache-backend.h                    |    2 +-
 include/VBox/vd-filter-backend.h                   |    2 +-
 include/VBox/vd-ifs-internal.h                     |    2 +-
 include/VBox/vd-ifs.h                              |   36 +-
 include/VBox/vd-image-backend.h                    |    2 +-
 include/VBox/vd-plugin.h                           |    2 +-
 include/VBox/vddbg.h                               |    2 +-
 include/VBox/version.h                             |    2 +-
 include/VBox/vmm/cfgm.h                            |    2 +-
 include/VBox/vmm/cpum.h                            |    2 +-
 include/VBox/vmm/cpum.mac                          |    2 +-
 include/VBox/vmm/cpumctx-v1_6.h                    |    2 +-
 include/VBox/vmm/cpumctx.h                         |    2 +-
 include/VBox/vmm/cpumdis.h                         |    2 +-
 include/VBox/vmm/csam.h                            |    2 +-
 include/VBox/vmm/dbgf.h                            |    2 +-
 include/VBox/vmm/dbgfcorefmt.h                     |    2 +-
 include/VBox/vmm/dbgfsel.h                         |    2 +-
 include/VBox/vmm/dbgftrace.h                       |    2 +-
 include/VBox/vmm/em.h                              |    2 +-
 include/VBox/vmm/ftm.h                             |    2 +-
 include/VBox/vmm/gim.h                             |    4 +-
 include/VBox/vmm/gmm.h                             |    2 +-
 include/VBox/vmm/gvm.h                             |    2 +-
 include/VBox/vmm/gvmm.h                            |    2 +-
 include/VBox/vmm/hm.h                              |    2 +-
 include/VBox/vmm/hm_svm.h                          |    2 +-
 include/VBox/vmm/hm_vmx.h                          |    6 +-
 include/VBox/vmm/hm_vmx.mac                        |    2 +-
 include/VBox/vmm/iem.h                             |    2 +-
 include/VBox/vmm/iom.h                             |    2 +-
 include/VBox/vmm/mm.h                              |    2 +-
 include/VBox/vmm/patm.h                            |    2 +-
 include/VBox/vmm/pdm.h                             |    2 +-
 include/VBox/vmm/pdmapi.h                          |    2 +-
 include/VBox/vmm/pdmasynccompletion.h              |    2 +-
 include/VBox/vmm/pdmasynctask.h                    |    2 +-
 include/VBox/vmm/pdmaudioifs.h                     |  160 +-
 include/VBox/vmm/pdmaudioifs_old.h                 |  786 ---
 include/VBox/vmm/pdmblkcache.h                     |    2 +-
 include/VBox/vmm/pdmcardreaderinfs.h               |    2 +-
 include/VBox/vmm/pdmcommon.h                       |    2 +-
 include/VBox/vmm/pdmcritsect.h                     |    2 +-
 include/VBox/vmm/pdmcritsectrw.h                   |    2 +-
 include/VBox/vmm/pdmdrv.h                          |    2 +-
 include/VBox/vmm/pdmifs.h                          |   13 +-
 include/VBox/vmm/pdmins.h                          |    2 +-
 include/VBox/vmm/pdmnetifs.h                       |    2 +-
 include/VBox/vmm/pdmnetinline.h                    |    5 +-
 include/VBox/vmm/pdmnetshaper.h                    |    2 +-
 include/VBox/vmm/pdmnvram.h                        |    2 +-
 include/VBox/vmm/pdmpci.h                          |  165 +-
 include/VBox/vmm/pdmqueue.h                        |    2 +-
 include/VBox/vmm/pdmsrv.h                          |    2 +-
 include/VBox/vmm/pdmstorageifs.h                   |    2 +-
 include/VBox/vmm/pdmthread.h                       |    2 +-
 include/VBox/vmm/pdmusb.h                          |   14 +-
 include/VBox/vmm/pdmwebcaminfs.h                   |  136 +-
 include/VBox/vmm/pgm.h                             |   30 +-
 include/VBox/vmm/rem.h                             |    2 +-
 include/VBox/vmm/selm.h                            |    2 +-
 include/VBox/vmm/ssm.h                             |    2 +-
 include/VBox/vmm/stam.h                            |    6 +-
 include/VBox/vmm/stam.mac                          |    2 +-
 include/VBox/vmm/tm.h                              |    7 +-
 include/VBox/vmm/trpm.h                            |    2 +-
 include/VBox/vmm/trpm.mac                          |    2 +-
 include/VBox/vmm/uvm.h                             |    2 +-
 include/VBox/vmm/vm.h                              |    6 +-
 include/VBox/vmm/vm.mac                            |    4 +-
 include/VBox/vmm/vmapi.h                           |    2 +-
 include/VBox/vmm/vmcpuset.h                        |    2 +-
 include/VBox/vmm/vmm.h                             |    2 +-
 include/VBox/vrdpusb.h                             |    2 +-
 include/VBox/vscsi.h                               |    2 +-
 include/VBox/vusb.h                                |    2 +-
 include/iprt/aiomgr.h                              |    2 +-
 include/iprt/alloc.h                               |    2 +-
 include/iprt/alloca.h                              |   10 +-
 include/iprt/asm-amd64-x86-watcom-16.h             |    2 +-
 include/iprt/asm-amd64-x86-watcom-32.h             |    2 +-
 include/iprt/asm-amd64-x86.h                       |    6 +-
 include/iprt/asm-math.h                            |    6 +-
 include/iprt/asm-watcom-x86-16.h                   |    2 +-
 include/iprt/asm-watcom-x86-32.h                   |    2 +-
 include/iprt/asm.h                                 |   11 +-
 include/iprt/asmdefs.mac                           | 1988 ++++----
 include/iprt/asn1-generator-asn1-decoder.h         |    2 +-
 include/iprt/asn1-generator-core.h                 |    2 +-
 include/iprt/asn1-generator-init.h                 |    2 +-
 include/iprt/asn1-generator-internal-header.h      |    2 +-
 include/iprt/asn1-generator-pass.h                 |   22 +-
 include/iprt/asn1-generator-sanity.h               |    2 +-
 include/iprt/asn1.h                                |    2 +-
 include/iprt/assert.h                              |   26 +-
 include/iprt/base64.h                              |    2 +-
 include/iprt/bignum.h                              |    2 +-
 include/iprt/bldprog-strtab-template.cpp.h         |    6 +-
 include/iprt/buildconfig.h                         |    2 +-
 include/iprt/cdefs.h                               |  145 +-
 include/iprt/cdrom.h                               |    2 +-
 include/iprt/cidr.h                                |    2 +-
 include/iprt/circbuf.h                             |    2 +-
 include/iprt/condvar.h                             |    2 +-
 include/iprt/coredumper.h                          |    2 +-
 include/iprt/cpp/autores.h                         |    2 +-
 include/iprt/cpp/exception.h                       |    2 +-
 include/iprt/cpp/list.h                            |    2 +-
 include/iprt/cpp/lock.h                            |    2 +-
 include/iprt/cpp/meta.h                            |    2 +-
 include/iprt/cpp/ministring.h                      |    2 +-
 include/iprt/cpp/mtlist.h                          |    2 +-
 include/iprt/cpp/utils.h                           |    2 +-
 include/iprt/cpp/xml.h                             |    6 +-
 include/iprt/cpuset.h                              |   22 +-
 include/iprt/crc.h                                 |    2 +-
 include/iprt/critsect.h                            |    2 +-
 include/iprt/crypto/digest.h                       |    4 +-
 include/iprt/crypto/pkcs7.h                        |    2 +-
 include/iprt/crypto/pkix.h                         |    2 +-
 include/iprt/crypto/rsa.h                          |    2 +-
 include/iprt/crypto/spc.h                          |    2 +-
 include/iprt/crypto/store.h                        |    2 +-
 include/iprt/crypto/taf.h                          |    2 +-
 include/iprt/crypto/tsp.h                          |    2 +-
 include/iprt/crypto/x509.h                         |    2 +-
 include/iprt/ctype.h                               |    2 +-
 include/iprt/dbg.h                                 |    2 +-
 include/iprt/dir.h                                 |   26 +-
 include/iprt/dvm.h                                 |    2 +-
 include/iprt/env.h                                 |    2 +-
 include/iprt/err.h                                 |    2 +-
 include/iprt/errno.h                               |    4 +-
 include/iprt/file.h                                |   25 +-
 include/iprt/filesystem.h                          |    2 +-
 include/iprt/formats/asn1.h                        |    2 +-
 include/iprt/formats/codeview.h                    |    2 +-
 include/iprt/formats/elf-amd64.h                   |  114 +-
 include/iprt/formats/elf-common.h                  |  456 +-
 include/iprt/formats/elf-i386.h                    |  118 +-
 include/iprt/formats/elf.h                         |   34 +-
 include/iprt/formats/elf32.h                       |    2 +-
 include/iprt/formats/elf64.h                       |    2 +-
 include/iprt/formats/hfs.h                         |    2 +-
 include/iprt/formats/mach-o.h                      |    2 +-
 include/iprt/formats/mz.h                          |    2 +-
 include/iprt/formats/mz.mac                        |    2 +-
 include/iprt/formats/pe.mac                        |    2 +-
 include/iprt/formats/pecoff.h                      |    2 +-
 include/iprt/formats/xar.h                         |    2 +-
 include/iprt/fs.h                                  |    2 +-
 include/iprt/getopt.h                              |    2 +-
 include/iprt/handle.h                              |    2 +-
 include/iprt/handletable.h                         |    2 +-
 include/iprt/heap.h                                |    2 +-
 include/iprt/http.h                                |    2 +-
 include/iprt/initterm.h                            |    2 +-
 include/iprt/isofs.h                               |    2 +-
 include/iprt/latin1.h                              |    2 +-
 include/iprt/ldr.h                                 |    2 +-
 include/iprt/ldrlazy.h                             |    2 +-
 include/iprt/list-off32.h                          |    2 +-
 include/iprt/list.h                                |    2 +-
 include/iprt/localipc.h                            |    2 +-
 include/iprt/lockvalidator.h                       |    2 +-
 include/iprt/log.h                                 |    4 +-
 include/iprt/mangling.h                            |    6 +-
 include/iprt/manifest.h                            |    2 +-
 include/iprt/md2.h                                 |    2 +-
 include/iprt/md5.h                                 |    2 +-
 include/iprt/mem.h                                 |    2 +-
 include/iprt/memcache.h                            |    2 +-
 include/iprt/memobj.h                              |    2 +-
 include/iprt/mempool.h                             |    2 +-
 include/iprt/memsafer.h                            |    2 +-
 include/iprt/memtracker.h                          |    2 +-
 include/iprt/message.h                             |    2 +-
 include/iprt/mp.h                                  |    2 +-
 include/iprt/net.h                                 |    2 +-
 include/iprt/nocrt/amd64/fenv.h                    |    2 +-
 include/iprt/nocrt/amd64/math.h                    |    2 +-
 include/iprt/nocrt/compiler/compiler.h             |    2 +-
 include/iprt/nocrt/compiler/gcc.h                  |    2 +-
 include/iprt/nocrt/compiler/msc.h                  |    2 +-
 include/iprt/nocrt/fenv.h                          |    2 +-
 include/iprt/nocrt/inttypes.h                      |    2 +-
 include/iprt/nocrt/limits.h                        |    2 +-
 include/iprt/nocrt/math.h                          |    2 +-
 include/iprt/nocrt/setjmp.h                        |    2 +-
 include/iprt/nocrt/stdarg.h                        |    2 +-
 include/iprt/nocrt/stddef.h                        |    2 +-
 include/iprt/nocrt/stdlib.h                        |    2 +-
 include/iprt/nocrt/string.h                        |    2 +-
 include/iprt/nocrt/x86/fenv.h                      |    2 +-
 include/iprt/nocrt/x86/math.h                      |    2 +-
 include/iprt/nt/dispmprt.h                         |   49 +
 include/iprt/nt/miniport.h                         |   46 +
 include/iprt/nt/ndis.h                             |   46 +
 include/iprt/nt/nt-and-windows.h                   |    4 +-
 include/iprt/nt/nt.h                               |   21 +-
 include/iprt/nt/ntddk.h                            |   65 +
 include/iprt/nt/rx.h                               |   49 +
 include/iprt/nt/tdikrnl.h                          |   38 +
 include/iprt/nt/video.h                            |   47 +
 include/iprt/nt/wdm.h                              |   64 +
 include/iprt/once.h                                |    2 +-
 include/iprt/param.h                               |    2 +-
 include/iprt/path.h                                |    2 +-
 include/iprt/pipe.h                                |    2 +-
 include/iprt/poll.h                                |    2 +-
 include/iprt/power.h                               |    2 +-
 include/iprt/process.h                             |    2 +-
 include/iprt/queueatomic.h                         |    2 +-
 include/iprt/rand.h                                |    2 +-
 include/iprt/req.h                                 |    2 +-
 include/iprt/runtime-loader.h                      |    2 +-
 include/iprt/runtime.h                             |    2 +-
 include/iprt/s3.h                                  |    2 +-
 include/iprt/semaphore.h                           |    2 +-
 include/iprt/sg.h                                  |    2 +-
 include/iprt/sha.h                                 |    2 +-
 include/iprt/socket.h                              |    2 +-
 include/iprt/solaris/kmoddeps.mac                  |    2 +-
 include/iprt/sort.h                                |    2 +-
 include/iprt/spinlock.h                            |    2 +-
 include/iprt/stdarg.h                              |    4 +-
 include/iprt/stdint.h                              |   20 +-
 include/iprt/strcache.h                            |    2 +-
 include/iprt/stream.h                              |    2 +-
 include/iprt/string.h                              |   61 +-
 include/iprt/symlink.h                             |    2 +-
 include/iprt/system.h                              |    2 +-
 include/iprt/table.h                               |    2 +-
 include/iprt/tar.h                                 |    2 +-
 include/iprt/tcp.h                                 |    2 +-
 include/iprt/test.h                                |   40 +-
 include/iprt/thread.h                              |    2 +-
 include/iprt/time.h                                |    8 +-
 include/iprt/timer.h                               |    2 +-
 include/iprt/trace.h                               |    2 +-
 include/iprt/types.h                               |  140 +-
 include/iprt/udp.h                                 |    2 +-
 include/iprt/uint128.h                             |    2 +-
 include/iprt/uni.h                                 |    2 +-
 include/iprt/uri.h                                 |    2 +-
 include/iprt/utf16.h                               |   20 +-
 include/iprt/uuid.h                                |    2 +-
 include/iprt/vector.h                              |    2 +-
 include/iprt/vfs.h                                 |    2 +-
 include/iprt/vfslowlevel.h                         |    2 +-
 include/iprt/win/d3d8.h                            |   45 +
 include/iprt/win/d3d9.h                            |   44 +
 include/iprt/win/intsafe.h                         |   62 +
 include/iprt/win/iphlpapi.h                        |   38 +
 include/iprt/win/lazy-dbghelp.h                    |    2 +-
 include/iprt/win/netioapi.h                        |   34 +
 include/iprt/win/ntdddisk.h                        |   38 +
 include/iprt/win/ntddndis.h                        |   38 +
 include/iprt/win/ntverp.h                          |   38 +
 include/iprt/win/objbase.h                         |   45 +
 include/iprt/win/objidl.h                          |   38 +
 include/iprt/win/setupapi.h                        |   38 +
 include/iprt/win/shlobj.h                          |   42 +
 include/iprt/win/shlwapi.h                         |   38 +
 include/iprt/win/windef.h                          |   50 +
 include/iprt/win/windows.h                         |   49 +
 include/iprt/win/winsock2.h                        |   49 +
 include/iprt/win/ws2tcpip.h                        |   38 +
 include/iprt/x86.h                                 |    2 +-
 include/iprt/x86extra.mac                          |    2 +-
 include/iprt/zero.h                                |    2 +-
 include/iprt/zip.h                                 |    2 +-
 src/Makefile.kmk                                   |    2 +-
 src/VBox/Additions/Makefile.kmk                    |    3 +-
 src/VBox/Additions/common/Makefile.kmk             |    2 +-
 src/VBox/Additions/common/VBoxControl/Makefile.kmk |    6 +-
 .../Additions/common/VBoxControl/VBoxControl.cpp   |  297 +-
 .../Additions/common/VBoxControl/VBoxControl.rc    |    2 +-
 .../common/VBoxControl/testcase/Makefile.kmk       |    2 +-
 .../common/VBoxControl/testcase/tstVBoxControl.cpp |    7 +-
 src/VBox/Additions/common/VBoxGuest/Makefile.kmk   |   11 +-
 .../Additions/common/VBoxGuest/VBoxDev-haiku.c     |    4 +-
 .../common/VBoxGuest/VBoxGuest-darwin.cpp          |   18 +-
 .../Additions/common/VBoxGuest/VBoxGuest-freebsd.c |    2 +-
 .../common/VBoxGuest/VBoxGuest-haiku-stubs.c       |    2 +-
 .../Additions/common/VBoxGuest/VBoxGuest-haiku.c   |    6 +-
 .../Additions/common/VBoxGuest/VBoxGuest-haiku.h   |    2 +-
 .../Additions/common/VBoxGuest/VBoxGuest-linux.c   |    4 +-
 .../Additions/common/VBoxGuest/VBoxGuest-netbsd.c  |  682 +++
 .../Additions/common/VBoxGuest/VBoxGuest-os2.cpp   |    2 +-
 .../Additions/common/VBoxGuest/VBoxGuest-os2.def   |    2 +-
 .../Additions/common/VBoxGuest/VBoxGuest-solaris.c |    2 +-
 .../common/VBoxGuest/VBoxGuest-win-legacy.cpp      |    7 +-
 .../common/VBoxGuest/VBoxGuest-win-pnp.cpp         |   16 +-
 .../Additions/common/VBoxGuest/VBoxGuest-win.cpp   |   20 +-
 .../Additions/common/VBoxGuest/VBoxGuest-win.h     |   14 +-
 src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp  |   14 +-
 .../Additions/common/VBoxGuest/VBoxGuestA-os2.asm  |    2 +-
 .../common/VBoxGuest/VBoxGuestIDC-unix.c.h         |    4 +-
 .../Additions/common/VBoxGuest/VBoxGuestInternal.h |    2 +-
 .../Additions/common/VBoxGuest/solaris/deps.asm    |    2 +-
 .../Additions/common/VBoxGuest/win/VBoxGuest.inf   |    2 +-
 .../Additions/common/VBoxGuest/win/VBoxGuest.rc    |    2 +-
 .../common/VBoxGuest/win/VBoxGuestInst.cpp         |    4 +-
 .../common/VBoxGuestLib/GenericRequest.cpp         |    2 +-
 src/VBox/Additions/common/VBoxGuestLib/HGCM.cpp    |    2 +-
 .../Additions/common/VBoxGuestLib/HGCMInternal.cpp |   11 +-
 src/VBox/Additions/common/VBoxGuestLib/Init.cpp    |    2 +-
 .../Additions/common/VBoxGuestLib/Makefile.kmk     |   10 +-
 src/VBox/Additions/common/VBoxGuestLib/Mouse.cpp   |    2 +-
 .../Additions/common/VBoxGuestLib/PhysHeap.cpp     |    2 +-
 src/VBox/Additions/common/VBoxGuestLib/SysHlp.cpp  |    4 +-
 src/VBox/Additions/common/VBoxGuestLib/SysHlp.h    |   23 +-
 .../Additions/common/VBoxGuestLib/VBGLInternal.h   |    6 +-
 .../Additions/common/VBoxGuestLib/VBGLR3Internal.h |    4 +-
 .../Additions/common/VBoxGuestLib/VBoxGuestLog.h   |    2 +-
 .../common/VBoxGuestLib/VBoxGuestR0LibCrOgl.cpp    |    2 +-
 .../VBoxGuestLib/VBoxGuestR0LibSharedFolders.c     |    8 +-
 .../common/VBoxGuestLib/VBoxGuestR3Lib.cpp         |   16 +-
 .../VBoxGuestLib/VBoxGuestR3LibAdditions.cpp       |    3 +-
 .../VBoxGuestLib/VBoxGuestR3LibAutoLogon.cpp       |    4 +-
 .../common/VBoxGuestLib/VBoxGuestR3LibBalloon.cpp  |    2 +-
 .../VBoxGuestLib/VBoxGuestR3LibClipboard.cpp       |    2 +-
 .../common/VBoxGuestLib/VBoxGuestR3LibCoreDump.cpp |    2 +-
 .../VBoxGuestLib/VBoxGuestR3LibCpuHotPlug.cpp      |    2 +-
 .../VBoxGuestLib/VBoxGuestR3LibCredentials.cpp     |    2 +-
 .../VBoxGuestLib/VBoxGuestR3LibDaemonize.cpp       |    7 +-
 .../VBoxGuestLib/VBoxGuestR3LibDragAndDrop.cpp     |  163 +-
 .../common/VBoxGuestLib/VBoxGuestR3LibEvent.cpp    |    2 +-
 .../common/VBoxGuestLib/VBoxGuestR3LibGR.cpp       |    2 +-
 .../VBoxGuestLib/VBoxGuestR3LibGuestCtrl.cpp       |   21 +-
 .../VBoxGuestLib/VBoxGuestR3LibGuestProp.cpp       |    2 +-
 .../VBoxGuestLib/VBoxGuestR3LibGuestUser.cpp       |    4 +-
 .../common/VBoxGuestLib/VBoxGuestR3LibHGCM.cpp     |    3 +-
 .../VBoxGuestLib/VBoxGuestR3LibHostChannel.cpp     |    3 +-
 .../VBoxGuestLib/VBoxGuestR3LibHostVersion.cpp     |    4 +-
 .../common/VBoxGuestLib/VBoxGuestR3LibLog.cpp      |    2 +-
 .../common/VBoxGuestLib/VBoxGuestR3LibMisc.cpp     |    2 +-
 .../common/VBoxGuestLib/VBoxGuestR3LibModule.cpp   |    5 +-
 .../common/VBoxGuestLib/VBoxGuestR3LibMouse.cpp    |    2 +-
 .../common/VBoxGuestLib/VBoxGuestR3LibPidFile.cpp  |    2 +-
 .../VBoxGuestLib/VBoxGuestR3LibRuntimeXF86.cpp     |    2 +-
 .../common/VBoxGuestLib/VBoxGuestR3LibSeamless.cpp |    2 +-
 .../VBoxGuestLib/VBoxGuestR3LibSharedFolders.cpp   |    2 +-
 .../common/VBoxGuestLib/VBoxGuestR3LibStat.cpp     |    2 +-
 .../common/VBoxGuestLib/VBoxGuestR3LibTime.cpp     |    2 +-
 .../common/VBoxGuestLib/VBoxGuestR3LibVideo.cpp    |    2 +-
 src/VBox/Additions/common/VBoxGuestLib/VMMDev.cpp  |    2 +-
 .../VBoxGuestLib/VbglR0CanUsePhysPageList.cpp      |    2 +-
 src/VBox/Additions/common/VBoxService/Makefile.kmk |    6 +-
 .../common/VBoxService/VBoxService-os2.def         |    2 +-
 .../common/VBoxService/VBoxService-win.cpp         |   11 +-
 .../common/VBoxService/VBoxService-win.rc          |    2 +-
 .../Additions/common/VBoxService/VBoxService.cpp   |    1 +
 .../common/VBoxService/VBoxServiceAutoMount.cpp    |    4 +-
 .../common/VBoxService/VBoxServiceBalloon.cpp      |    4 +-
 .../VBoxService/VBoxServiceClipboard-os2.cpp       |    2 +-
 .../common/VBoxService/VBoxServiceControl.cpp      |    4 +-
 .../VBoxService/VBoxServiceControlProcess.cpp      |  275 +-
 .../VBoxService/VBoxServiceControlSession.cpp      |  192 +-
 .../common/VBoxService/VBoxServiceCpuHotPlug.cpp   |    3 +-
 .../common/VBoxService/VBoxServiceInternal.h       |    2 +-
 .../common/VBoxService/VBoxServicePageSharing.cpp  |   23 +-
 .../common/VBoxService/VBoxServicePropCache.cpp    |    4 +-
 .../common/VBoxService/VBoxServicePropCache.h      |    2 +-
 .../common/VBoxService/VBoxServiceResource-win.h   |    2 +-
 .../common/VBoxService/VBoxServiceStats.cpp        |    7 +-
 .../common/VBoxService/VBoxServiceTimeSync.cpp     |    4 +-
 .../common/VBoxService/VBoxServiceToolBox.cpp      |    3 +-
 .../common/VBoxService/VBoxServiceUtils.cpp        |    6 +-
 .../common/VBoxService/VBoxServiceUtils.h          |    2 +-
 .../common/VBoxService/VBoxServiceVMInfo-win.cpp   |   77 +-
 .../common/VBoxService/VBoxServiceVMInfo.cpp       |   25 +-
 .../common/VBoxService/VBoxServiceVMInfo.h         |    2 +-
 .../common/VBoxService/testcase/Makefile.kmk       |    4 +-
 .../common/VBoxService/testcase/tstUserInfo.cpp    |    6 +-
 src/VBox/Additions/common/VBoxVideo/HGSMIBase.cpp  |  116 +-
 .../Additions/common/VBoxVideo/Modesetting.cpp     |   62 +-
 src/VBox/Additions/common/VBoxVideo/VBVABase.cpp   |   34 +-
 src/VBox/Additions/common/crOpenGL/DD_glc.py       |    2 +-
 src/VBox/Additions/common/crOpenGL/DD_glh.py       |    2 +-
 .../common/crOpenGL/Linux_i386_glxapi_exports.py   |    2 +-
 src/VBox/Additions/common/crOpenGL/Makefile.kmk    |    2 +-
 .../common/crOpenGL/SunOS_i386_exports.py          |    2 +-
 .../common/crOpenGL/SunOS_i386_exports_dri.py      |    2 +-
 .../common/crOpenGL/SunOS_i386_glxapi_exports.py   |    2 +-
 src/VBox/Additions/common/crOpenGL/VBoxCROGL.rc    |    2 +-
 src/VBox/Additions/common/crOpenGL/VBoxICDList.h   |    2 +-
 .../Additions/common/crOpenGL/array/arrayspu.c     |    4 +-
 .../Additions/common/crOpenGL/array/arrayspu.rc    |    2 +-
 src/VBox/Additions/common/crOpenGL/context.c       |    8 +
 src/VBox/Additions/common/crOpenGL/cr_gl.py        |    2 +-
 src/VBox/Additions/common/crOpenGL/dri_drv.c       |    2 +-
 src/VBox/Additions/common/crOpenGL/dri_drv.h       |    2 +-
 src/VBox/Additions/common/crOpenGL/dri_glx.h       |    2 +-
 src/VBox/Additions/common/crOpenGL/egl.c           |   17 +-
 src/VBox/Additions/common/crOpenGL/entrypoints.py  |    6 +
 src/VBox/Additions/common/crOpenGL/fakedri_drv.c   |    2 +-
 src/VBox/Additions/common/crOpenGL/fakedri_drv.h   |    2 +-
 .../common/crOpenGL/fakedri_glfuncsList.h          |    2 +-
 .../common/crOpenGL/fakedri_glxfuncsList.h         |    2 +-
 .../common/crOpenGL/feedback/feedback_context.c    |   13 +-
 .../common/crOpenGL/feedback/feedbackspu.rc        |    2 +-
 .../common/crOpenGL/feedback/feedbackspu_config.c  |    1 +
 src/VBox/Additions/common/crOpenGL/glx.c           |   33 +-
 src/VBox/Additions/common/crOpenGL/glx_c_exports.c |    2 +-
 src/VBox/Additions/common/crOpenGL/glx_proto.h     |    2 +-
 src/VBox/Additions/common/crOpenGL/icd_drv.c       |    6 +-
 src/VBox/Additions/common/crOpenGL/icd_drv.h       |   14 +-
 src/VBox/Additions/common/crOpenGL/load.c          |   61 +-
 src/VBox/Additions/common/crOpenGL/pack/packspu.h  |    6 +-
 src/VBox/Additions/common/crOpenGL/pack/packspu.rc |    2 +-
 .../common/crOpenGL/pack/packspu_beginend.py       |    9 +-
 .../common/crOpenGL/pack/packspu_client.c          |   65 +-
 .../common/crOpenGL/pack/packspu_config.c          |    3 +
 .../common/crOpenGL/pack/packspu_context.c         |   11 +-
 .../common/crOpenGL/pack/packspu_framebuffer.c     |    2 +-
 .../Additions/common/crOpenGL/pack/packspu_get.py  |    2 +-
 .../common/crOpenGL/pack/packspu_getshaders.c      |    2 +-
 .../Additions/common/crOpenGL/pack/packspu_glsl.c  |    4 +-
 .../Additions/common/crOpenGL/pack/packspu_misc.c  |   17 +-
 .../Additions/common/crOpenGL/pack/packspu_net.c   |    2 +
 .../Additions/common/crOpenGL/pack/packspu_pixel.c |    8 +-
 .../common/crOpenGL/pack/packspu_texture.c         |    2 +-
 .../common/crOpenGL/passthrough/passthroughspu.rc  |    2 +-
 src/VBox/Additions/common/crOpenGL/stub.c          |    1 +
 src/VBox/Additions/common/crOpenGL/stub.h          |    2 +-
 src/VBox/Additions/common/pam/Makefile.kmk         |    2 +-
 src/VBox/Additions/common/pam/pam_vbox.cpp         |   20 +-
 src/VBox/Additions/common/testcase/Makefile.kmk    |    4 +-
 .../Additions/common/testcase/tstPageFusion.cpp    |   10 +-
 src/VBox/Additions/darwin/Installer/Makefile.kmk   |    2 +-
 src/VBox/Additions/darwin/Makefile.kmk             |    2 +-
 src/VBox/Additions/darwin/VBoxClient/Makefile.kmk  |    2 +-
 .../Additions/darwin/VBoxClient/VBoxClient.cpp     |    2 +-
 .../darwin/VBoxClient/VBoxClientClipboard.cpp      |    8 +-
 .../VBoxClient/VBoxClientClipboardGuestToHost.cpp  |    2 +-
 .../VBoxClient/VBoxClientClipboardHostToGuest.cpp  |    2 +-
 .../darwin/VBoxClient/VBoxClientInternal.h         |    2 +-
 src/VBox/Additions/darwin/vboxfs/Makefile.kmk      |    2 +-
 .../Additions/darwin/vboxfs/VBoxVFS-VFSOps.cpp     |   17 +-
 .../Additions/darwin/vboxfs/VBoxVFS-VNODEOps.cpp   |   17 +-
 src/VBox/Additions/darwin/vboxfs/VBoxVFS-utils.cpp |   11 +-
 src/VBox/Additions/darwin/vboxfs/VBoxVFS.cpp       |   11 +-
 src/VBox/Additions/darwin/vboxfs/mount.vboxvfs.c   |   11 +-
 src/VBox/Additions/darwin/vboxfs/vboxvfs.h         |   11 +-
 src/VBox/Additions/freebsd/Makefile.kmk            |    2 +-
 src/VBox/Additions/freebsd/drm/Makefile.kmk        |    2 +-
 src/VBox/Additions/freebsd/drm/vboxvideo_drm.c     |    2 +-
 src/VBox/Additions/freebsd/vboxvfs/Makefile.kmk    |    2 +-
 src/VBox/Additions/freebsd/vboxvfs/vboxvfs.h       |    2 +-
 .../Additions/freebsd/vboxvfs/vboxvfs_vfsops.c     |    4 +-
 src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vnops.c |    2 +-
 src/VBox/Additions/haiku/Makefile.kmk              |    2 +-
 .../Additions/haiku/SharedFolders/Makefile.kmk     |    2 +-
 .../Additions/haiku/SharedFolders/OpenHashTable.h  |    2 +-
 .../Additions/haiku/SharedFolders/kernel_cpp.h     |    2 +-
 src/VBox/Additions/haiku/SharedFolders/lock.h      |    2 +-
 src/VBox/Additions/haiku/SharedFolders/vboxsf.c    |   10 +-
 src/VBox/Additions/haiku/SharedFolders/vboxsf.h    |    2 +-
 .../Additions/haiku/SharedFolders/vnode_cache.cpp  |    2 +-
 src/VBox/Additions/haiku/VBoxMouse/Makefile.kmk    |    2 +-
 src/VBox/Additions/haiku/VBoxMouse/VBoxMouse.cpp   |    2 +-
 src/VBox/Additions/haiku/VBoxMouse/VBoxMouse.h     |    2 +-
 .../Additions/haiku/VBoxMouse/VBoxMouseFilter.cpp  |    4 +-
 .../Additions/haiku/VBoxMouse/VBoxMouseFilter.h    |    2 +-
 src/VBox/Additions/haiku/VBoxTray/Makefile.kmk     |    2 +-
 .../Additions/haiku/VBoxTray/VBoxClipboard.cpp     |    2 +-
 src/VBox/Additions/haiku/VBoxTray/VBoxClipboard.h  |    2 +-
 src/VBox/Additions/haiku/VBoxTray/VBoxDisplay.cpp  |    2 +-
 src/VBox/Additions/haiku/VBoxTray/VBoxDisplay.h    |    2 +-
 .../haiku/VBoxTray/VBoxGuestApplication.cpp        |    2 +-
 .../haiku/VBoxTray/VBoxGuestApplication.h          |    2 +-
 .../haiku/VBoxTray/VBoxGuestDeskbarView.cpp        |    2 +-
 .../haiku/VBoxTray/VBoxGuestDeskbarView.h          |    2 +-
 .../haiku/VBoxTray/VBoxServiceDescriptor.h         |    2 +-
 src/VBox/Additions/haiku/VBoxVideo/Makefile.kmk    |    2 +-
 .../haiku/VBoxVideo/accelerant/Makefile.kmk        |    2 +-
 .../haiku/VBoxVideo/accelerant/accelerant.cpp      |    4 +-
 .../haiku/VBoxVideo/accelerant/accelerant.h        |    2 +-
 .../haiku/VBoxVideo/common/VBoxVideo_common.h      |    2 +-
 .../Additions/haiku/VBoxVideo/driver/Makefile.kmk  |    2 +-
 .../Additions/haiku/VBoxVideo/driver/driver.cpp    |    6 +-
 .../Additions/haiku/include/VBoxGuestInternal.h    |    2 +-
 src/VBox/Additions/haiku/include/lock.h            |    2 +-
 src/VBox/Additions/linux/Makefile.kmk              |    7 +-
 src/VBox/Additions/linux/drm/Makefile.kmk          |    2 +-
 src/VBox/Additions/linux/drm/vbox_drv.c            |   32 +-
 src/VBox/Additions/linux/drm/vbox_drv.h            |   12 +-
 src/VBox/Additions/linux/drm/vbox_fb.c             |    4 +-
 src/VBox/Additions/linux/drm/vbox_irq.c            |    4 +-
 src/VBox/Additions/linux/drm/vbox_main.c           |  104 +-
 src/VBox/Additions/linux/drm/vbox_mode.c           |   13 +-
 src/VBox/Additions/linux/drm/vbox_ttm.c            |    8 +-
 src/VBox/Additions/linux/installer/install.sh.in   |  543 +++
 src/VBox/Additions/linux/installer/vboxadd.sh      |   89 +-
 .../Additions/linux/lightdm-greeter/Config.kmk     |   31 +
 .../Additions/linux/lightdm-greeter/Makefile.kmk   |   54 +-
 .../liblightdm-gobject-1.5.0/Makefile.kmk          |    3 +-
 .../linux/lightdm-greeter/vbox-greeter.cpp         |   18 +-
 .../Additions/linux/sharedfolders/Makefile.kmk     |    2 +-
 src/VBox/Additions/linux/sharedfolders/dirops.c    |    2 +-
 src/VBox/Additions/linux/sharedfolders/lnkops.c    |    2 +-
 .../Additions/linux/sharedfolders/mount.vboxsf.c   |    2 +-
 src/VBox/Additions/linux/sharedfolders/regops.c    |    2 +-
 src/VBox/Additions/linux/sharedfolders/utils.c     |    2 +-
 src/VBox/Additions/linux/sharedfolders/vbsfmount.c |    2 +-
 src/VBox/Additions/linux/sharedfolders/vbsfmount.h |    2 +-
 src/VBox/Additions/linux/sharedfolders/vfsmod.c    |    2 +-
 src/VBox/Additions/linux/sharedfolders/vfsmod.h    |    2 +-
 .../Additions/linux/testcase/TimesyncBackdoor.c    |    2 +-
 src/VBox/Additions/solaris/DRM/Makefile.kmk        |    2 +-
 src/VBox/Additions/solaris/DRM/deps.asm            |    2 +-
 src/VBox/Additions/solaris/DRM/vboxvideo_drm.c     |    2 +-
 src/VBox/Additions/solaris/Makefile.kmk            |    2 +-
 src/VBox/Additions/solaris/Mouse/Makefile.kmk      |    2 +-
 src/VBox/Additions/solaris/Mouse/deps.asm          |    2 +-
 .../Additions/solaris/Mouse/testcase/solaris.h     |    4 +-
 .../solaris/Mouse/testcase/tstVBoxMouse-solaris.c  |    2 +-
 src/VBox/Additions/solaris/Mouse/vboxms.c          |    2 +-
 src/VBox/Additions/solaris/Mouse/vboxmslnk.c       |    2 +-
 .../Additions/solaris/SharedFolders/Makefile.kmk   |    2 +-
 src/VBox/Additions/solaris/SharedFolders/deps.asm  |    2 +-
 src/VBox/Additions/solaris/SharedFolders/vboxfs.h  |    2 +-
 .../Additions/solaris/SharedFolders/vboxfs_mount.c |    2 +-
 .../Additions/solaris/SharedFolders/vboxfs_prov.c  |    2 +-
 .../Additions/solaris/SharedFolders/vboxfs_prov.h  |    2 +-
 .../Additions/solaris/SharedFolders/vboxfs_vfs.c   |    2 +-
 .../Additions/solaris/SharedFolders/vboxfs_vfs.h   |    2 +-
 .../Additions/solaris/SharedFolders/vboxfs_vnode.c |    2 +-
 .../Additions/solaris/SharedFolders/vboxfs_vnode.h |    2 +-
 src/VBox/Additions/solaris/Virtio/Makefile.kmk     |    2 +-
 src/VBox/Additions/solaris/Virtio/Virtio-solaris.c |    4 +-
 src/VBox/Additions/solaris/Virtio/Virtio-solaris.h |    2 +-
 .../Additions/solaris/Virtio/VirtioNet-solaris.c   |    8 +-
 .../Additions/solaris/Virtio/VirtioPci-solaris.c   |    2 +-
 .../Additions/solaris/Virtio/VirtioPci-solaris.h   |    2 +-
 .../Additions/solaris/Virtio/VirtioRing-solaris.c  |    2 +-
 src/VBox/Additions/x11/Makefile.kmk                |    2 +-
 src/VBox/Additions/x11/VBoxClient/Makefile.kmk     |    6 +-
 src/VBox/Additions/x11/VBoxClient/VBoxClient.h     |    7 +-
 src/VBox/Additions/x11/VBoxClient/check3d.cpp      |    2 +-
 src/VBox/Additions/x11/VBoxClient/clipboard.cpp    |   20 +-
 src/VBox/Additions/x11/VBoxClient/display.cpp      |   10 +-
 src/VBox/Additions/x11/VBoxClient/draganddrop.cpp  |   42 +-
 src/VBox/Additions/x11/VBoxClient/hostversion.cpp  |   24 +-
 src/VBox/Additions/x11/VBoxClient/main.cpp         |    9 +-
 src/VBox/Additions/x11/VBoxClient/seamless-x11.cpp |    5 +-
 src/VBox/Additions/x11/VBoxClient/seamless-x11.h   |    2 +-
 src/VBox/Additions/x11/VBoxClient/seamless.cpp     |    6 +-
 src/VBox/Additions/x11/VBoxClient/seamless.h       |    2 +-
 .../VBoxClient/testcase/tstSeamlessX11-auto.cpp    |   52 +-
 .../x11/VBoxClient/testcase/tstSeamlessX11.cpp     |    2 +-
 src/VBox/Additions/x11/vboxmouse/Makefile.kmk      |    2 +-
 src/VBox/Additions/x11/vboxmouse/vboxmouse.c       |   27 +-
 src/VBox/Additions/x11/vboxvideo/Makefile.kmk      |    2 +-
 src/VBox/Additions/x11/vboxvideo/edid.c            |    3 +-
 src/VBox/Additions/x11/vboxvideo/getmode.c         |    8 +-
 src/VBox/Additions/x11/vboxvideo/helpers.c         |    2 +-
 src/VBox/Additions/x11/vboxvideo/pointer.c         |    6 +-
 src/VBox/Additions/x11/vboxvideo/setmode.c         |    2 +-
 src/VBox/Additions/x11/vboxvideo/vboxvideo.c       |   71 +-
 src/VBox/Additions/x11/vboxvideo/vboxvideo.h       |    2 +-
 src/VBox/Additions/x11/vboxvideo/vbva.c            |    2 +-
 src/VBox/Additions/x11/x11stubs/Makefile.kmk       |    2 +-
 .../x11stubs/libXcomposite-1.0.0/libXcomposite.c   |    2 +-
 .../x11/x11stubs/libXdamage-1.1.0/libXdamage.c     |    2 +-
 .../Additions/x11/x11stubs/libXext-6.4.0/libXext.c |    2 +-
 .../x11/x11stubs/libXfixes-3.1.0/libXfixes.c       |    2 +-
 src/VBox/Artwork/win/TemplateDll.rc                |    2 +-
 src/VBox/Artwork/win/TemplateDrv.rc                |    2 +-
 src/VBox/Artwork/win/TemplateExe.rc                |    2 +-
 src/VBox/Artwork/win/TemplateR0.rc                 |    2 +-
 src/VBox/Artwork/win/TemplateRC.rc                 |    2 +-
 src/VBox/Artwork/win/TemplateRsrcDefs.h            |    2 +-
 src/VBox/Debugger/DBGCBuiltInSymbols.cpp           |    4 +-
 src/VBox/Debugger/DBGCCmdHlp.cpp                   |    4 +-
 src/VBox/Debugger/DBGCCmdWorkers.cpp               |    2 +-
 src/VBox/Debugger/DBGCCommands.cpp                 |   12 +-
 src/VBox/Debugger/DBGCEmulateCodeView.cpp          |   36 +-
 src/VBox/Debugger/DBGCEval.cpp                     |    5 +-
 src/VBox/Debugger/DBGCFunctions.cpp                |    2 +-
 src/VBox/Debugger/DBGCGdbRemoteStub.cpp            |    2 +-
 src/VBox/Debugger/DBGCInternal.h                   |    2 +-
 src/VBox/Debugger/DBGCOps.cpp                      |   11 +-
 src/VBox/Debugger/DBGCTcp.cpp                      |    4 +-
 src/VBox/Debugger/DBGConsole.cpp                   |    2 +-
 src/VBox/Debugger/DBGPlugInCommonELF.cpp           |    4 +-
 src/VBox/Debugger/DBGPlugInCommonELF.h             |    2 +-
 src/VBox/Debugger/DBGPlugInCommonELFTmpl.cpp.h     |    3 +-
 src/VBox/Debugger/DBGPlugInDarwin.cpp              |   12 +-
 src/VBox/Debugger/DBGPlugInDiggers.cpp             |    2 +-
 src/VBox/Debugger/DBGPlugInLinux.cpp               |   49 +-
 src/VBox/Debugger/DBGPlugInOS2.cpp                 |   17 +-
 src/VBox/Debugger/DBGPlugInSolaris.cpp             |   15 +-
 src/VBox/Debugger/DBGPlugInWinNt.cpp               |   10 +-
 src/VBox/Debugger/DBGPlugIns.h                     |    2 +-
 src/VBox/Debugger/Makefile.kmk                     |    2 +-
 src/VBox/Debugger/VBoxDbg.cpp                      |    2 +-
 src/VBox/Debugger/VBoxDbgBase.cpp                  |    4 +-
 src/VBox/Debugger/VBoxDbgBase.h                    |    2 +-
 src/VBox/Debugger/VBoxDbgConsole.cpp               |    4 +-
 src/VBox/Debugger/VBoxDbgConsole.h                 |    2 +-
 src/VBox/Debugger/VBoxDbgDisas.h                   |    2 +-
 src/VBox/Debugger/VBoxDbgGui.cpp                   |    2 +-
 src/VBox/Debugger/VBoxDbgGui.h                     |    2 +-
 src/VBox/Debugger/VBoxDbgStatsQt4.cpp              |    2 +-
 src/VBox/Debugger/VBoxDbgStatsQt4.h                |    2 +-
 src/VBox/Debugger/testcase/tstDBGCParser.cpp       |    2 +-
 src/VBox/Debugger/testcase/tstDBGCStubs.cpp        |    2 +-
 src/VBox/Debugger/testcase/tstVBoxDbg.cpp          |    2 +-
 src/VBox/Devices/Audio/AudioMixBuffer.cpp          |   35 +-
 src/VBox/Devices/Audio/AudioMixBuffer.h            |    7 +-
 src/VBox/Devices/Audio/AudioMixer.cpp              |  288 +-
 src/VBox/Devices/Audio/AudioMixer.h                |    8 +-
 src/VBox/Devices/Audio/DevIchAc97.cpp              |   49 +-
 src/VBox/Devices/Audio/DevIchHda.cpp               |  387 +-
 src/VBox/Devices/Audio/DevIchHdaCodec.cpp          |   78 +-
 src/VBox/Devices/Audio/DevIchHdaCommon.h           |    2 +-
 src/VBox/Devices/Audio/DevSB16.cpp                 |   46 +-
 src/VBox/Devices/Audio/DrvAudio.cpp                |  497 +-
 src/VBox/Devices/Audio/DrvAudio.h                  |   24 +-
 src/VBox/Devices/Audio/DrvAudioCommon.cpp          |  420 +-
 src/VBox/Devices/Audio/DrvHostALSAAudio.cpp        |  225 +-
 src/VBox/Devices/Audio/DrvHostCoreAudio.cpp        |  714 +--
 src/VBox/Devices/Audio/DrvHostDSound.cpp           |  721 +--
 src/VBox/Devices/Audio/DrvHostDebugAudio.cpp       |  470 ++
 src/VBox/Devices/Audio/DrvHostNullAudio.cpp        |  283 +-
 src/VBox/Devices/Audio/DrvHostOSSAudio.cpp         |  338 +-
 src/VBox/Devices/Audio/DrvHostPulseAudio.cpp       |  259 +-
 src/VBox/Devices/Audio/alsa_stubs.h                |    2 +-
 src/VBox/Devices/Audio/pulse_stubs.h               |    2 +-
 src/VBox/Devices/Audio/testcase/Makefile.kmk       |    2 +-
 .../Devices/Audio/testcase/tstAudioMixBuffer.cpp   |  211 +-
 src/VBox/Devices/Audio_old/AudioMixBuffer.cpp      | 1749 -------
 src/VBox/Devices/Audio_old/AudioMixBuffer.h        |   82 -
 src/VBox/Devices/Audio_old/AudioMixer.cpp          |  514 --
 src/VBox/Devices/Audio_old/AudioMixer.h            |  113 -
 src/VBox/Devices/Audio_old/DevIchAc97.cpp          | 2747 -----------
 src/VBox/Devices/Audio_old/DevIchHda.cpp           | 5076 --------------------
 src/VBox/Devices/Audio_old/DevIchHdaCodec.cpp      | 2774 -----------
 src/VBox/Devices/Audio_old/DevIchHdaCodec.h        |  155 -
 src/VBox/Devices/Audio_old/DevSB16.cpp             | 2438 ----------
 src/VBox/Devices/Audio_old/DrvAudio.cpp            | 2521 ----------
 src/VBox/Devices/Audio_old/DrvAudio.h              |  204 -
 src/VBox/Devices/Audio_old/DrvAudioCommon.cpp      |  413 --
 src/VBox/Devices/Audio_old/DrvHostALSAAudio.cpp    | 1421 ------
 src/VBox/Devices/Audio_old/DrvHostCoreAudio.cpp    | 2188 ---------
 src/VBox/Devices/Audio_old/DrvHostDSound.cpp       | 2289 ---------
 src/VBox/Devices/Audio_old/DrvHostNullAudio.cpp    |  336 --
 src/VBox/Devices/Audio_old/DrvHostOSSAudio.cpp     | 1004 ----
 src/VBox/Devices/Audio_old/DrvHostPulseAudio.cpp   | 1252 -----
 src/VBox/Devices/Audio_old/alsa_mangling.h         |   55 -
 src/VBox/Devices/Audio_old/alsa_stubs.c            |  190 -
 src/VBox/Devices/Audio_old/alsa_stubs.h            |   21 -
 src/VBox/Devices/Audio_old/pulse_mangling.h        |   69 -
 src/VBox/Devices/Audio_old/pulse_stubs.c           |  287 --
 src/VBox/Devices/Audio_old/pulse_stubs.h           |   21 -
 src/VBox/Devices/Audio_old/sys-queue.h             |  241 -
 src/VBox/Devices/Audio_old/testcase/Makefile.kmk   |   41 -
 .../Audio_old/testcase/tstAudioMixBuffer.cpp       |  592 ---
 src/VBox/Devices/BiosCommonCode/DoUInt32Div.c      |    2 +-
 .../BiosCommonCode/MakeAlternativeSource.cpp       |   11 +-
 src/VBox/Devices/BiosCommonCode/Makefile.kmk       |    2 +-
 src/VBox/Devices/BiosCommonCode/__I4D.asm          |    2 +-
 src/VBox/Devices/BiosCommonCode/__I4M.asm          |    2 +-
 src/VBox/Devices/BiosCommonCode/__U4M.asm          |    2 +-
 src/VBox/Devices/BiosCommonCode/__U8LS.asm         |    2 +-
 src/VBox/Devices/BiosCommonCode/__U8RS.asm         |    2 +-
 src/VBox/Devices/BiosCommonCode/biosorg_check.sed  |    4 +-
 src/VBox/Devices/BiosCommonCode/fmemcpy.asm        |    2 +-
 src/VBox/Devices/BiosCommonCode/fmemset.asm        |    2 +-
 src/VBox/Devices/Bus/DevPCI.cpp                    |   16 +-
 src/VBox/Devices/Bus/DevPciIch9.cpp                |   33 +-
 src/VBox/Devices/Bus/MsiCommon.cpp                 |   17 +-
 src/VBox/Devices/Bus/MsiCommon.h                   |    2 +-
 src/VBox/Devices/Bus/MsixCommon.cpp                |   19 +-
 src/VBox/Devices/Bus/PCIInternal.h                 |    2 +-
 src/VBox/Devices/Bus/SrvPciRawR0.cpp               |    4 +-
 src/VBox/Devices/Config.kmk                        |    9 +-
 src/VBox/Devices/EFI/DevEFI.cpp                    |   35 +-
 src/VBox/Devices/EFI/DevEFI.h                      |    2 +-
 src/VBox/Devices/EFI/DevSmc.cpp                    |   37 +-
 .../Python/PyMod-2.7.2/Modules/errnomodule.c       |    4 +
 .../Python/PyMod-2.7.2/Python/import.c             |    4 +
 .../Devices/EFI/Firmware/BaseTools/Makefile.kmk    |    2 +-
 .../BaseTools/Source/C/BootSectImage/Makefile.kmk  |    2 +-
 .../BaseTools/Source/C/Common/Makefile.kmk         |    2 +-
 .../BaseTools/Source/C/Common/WinNtInclude.h       |    6 +
 .../BaseTools/Source/C/EfiLdrImage/Makefile.kmk    |    2 +-
 .../BaseTools/Source/C/EfiRom/Makefile.kmk         |    2 +-
 .../Source/C/GenBootSector/GenBootSector.c         |    4 +
 .../BaseTools/Source/C/GenCrc32/Makefile.kmk       |    2 +-
 .../BaseTools/Source/C/GenFfs/Makefile.kmk         |    2 +-
 .../Firmware/BaseTools/Source/C/GenFv/Makefile.kmk |    2 +-
 .../Firmware/BaseTools/Source/C/GenFw/Makefile.kmk |    2 +-
 .../BaseTools/Source/C/GenPage/Makefile.kmk        |    2 +-
 .../BaseTools/Source/C/GenSec/Makefile.kmk         |    2 +-
 .../BaseTools/Source/C/GenVtf/Makefile.kmk         |    2 +-
 .../Source/C/GnuGenBootSector/Makefile.kmk         |    2 +-
 .../BaseTools/Source/C/LzmaCompress/Makefile.kmk   |    2 +-
 .../BaseTools/Source/C/LzmaCompress/Sdk/C/7zFile.h |    4 +
 .../BaseTools/Source/C/LzmaCompress/Sdk/C/Alloc.c  |    4 +
 .../BaseTools/Source/C/LzmaCompress/Sdk/C/Types.h  |    4 +
 .../EFI/Firmware/BaseTools/Source/C/Makefile.kmk   |    2 +-
 .../BaseTools/Source/C/PyUtility/PyUtility.c       |    4 +
 .../Firmware/BaseTools/Source/C/Split/Makefile.kmk |    2 +-
 .../BaseTools/Source/C/TianoCompress/Makefile.kmk  |    2 +-
 .../BaseTools/Source/C/VfrCompile/Makefile.kmk     |    2 +-
 .../Source/C/VfrCompile/Pccts/antlr/fset2.c        |    2 +-
 .../Source/C/VfrCompile/Pccts/antlr/hash.c         |    5 +-
 .../Source/C/VfrCompile/Pccts/dlg/automata.c       |    2 +-
 .../BaseTools/Source/C/VolInfo/Makefile.kmk        |    2 +-
 .../EFI/Firmware/BaseTools/Source/Makefile.kmk     |    2 +-
 src/VBox/Devices/EFI/Firmware/Config.kmk           |   24 +-
 src/VBox/Devices/EFI/Firmware/EfiModules.kmk       |    2 +-
 .../Library/LzmaCustomDecompressLib/Sdk/C/Types.h  |    4 +
 src/VBox/Devices/EFI/Firmware/Makefile.kmk         |    2 +-
 .../Library/LzmaCustomDecompressLib/Sdk/C/Types.h  |    4 +
 .../Universal/Disk/PartitionDxe/Apple.c            |    2 +-
 .../Devices/EFI/Firmware/OvmfPkg/OvmfPkgIa32.dsc   |    4 -
 .../Devices/EFI/Firmware/OvmfPkg/OvmfPkgX64.dsc    |    4 -
 .../Include/IndustryStandard/VBoxFatImage.h        |    2 +-
 .../EFI/Firmware/VBoxPkg/Include/VBoxDebugLib.h    |    2 +-
 .../EFI/Firmware/VBoxPkg/Include/VBoxMemLayout.h   |    2 +-
 .../Devices/EFI/Firmware/VBoxPkg/Include/VBoxPkg.h |    2 +-
 .../Library/VBoxDebugAgentLib/VBoxDebugAgentLib.c  |    2 +-
 .../VBoxDebugAgentLib/VBoxDebugAgentLib.inf        |    2 +-
 .../VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.c    |    2 +-
 .../VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.inf  |    2 +-
 .../VBoxPkg/Library/VBoxDebugLib/VBoxPrintChar.c   |    2 +-
 .../VBoxPkg/Library/VBoxDebugLib/VBoxPrintGuid.c   |    2 +-
 .../VBoxPkg/Library/VBoxDebugLib/VBoxPrintHex.c    |    2 +-
 .../Library/VBoxDebugLib/VBoxPrintHexDump.c        |    2 +-
 .../VBoxPkg/Library/VBoxDebugLib/VBoxPrintString.c |    2 +-
 .../VBoxOemHookStatusCodeLib.c                     |    2 +-
 .../VBoxOemHookStatusCodeLib.inf                   |    2 +-
 .../VBoxPeCoffExtraActionLib.c                     |    2 +-
 .../VBoxPeCoffExtraActionLib.inf                   |    2 +-
 .../VBoxPkg/Library/VBoxPeCoffLib/BasePeCoff.c     |    2 +-
 .../Library/VBoxPeCoffLib/BasePeCoffLibInternals.h |    2 +-
 .../VBoxPkg/Library/VBoxPeCoffLib/PeCoffLoaderEx.c |    2 +-
 .../Library/VBoxPeCoffLib/VBoxPeCoffLib.inf        |    2 +-
 .../EFI/Firmware/VBoxPkg/VBoxAppleSim/Console.c    |    2 +-
 .../Firmware/VBoxPkg/VBoxAppleSim/ConsoleControl.h |    2 +-
 .../EFI/Firmware/VBoxPkg/VBoxAppleSim/Cpu.c        |    2 +-
 .../Firmware/VBoxPkg/VBoxAppleSim/VBoxAppleSim.c   |    2 +-
 .../Firmware/VBoxPkg/VBoxAppleSim/VBoxAppleSim.inf |    2 +-
 .../EFI/Firmware/VBoxPkg/VBoxFsDxe/VBoxFsDxe.c     |    2 +-
 .../EFI/Firmware/VBoxPkg/VBoxFsDxe/VBoxFsDxe.inf   |    2 +-
 .../EFI/Firmware/VBoxPkg/VBoxFsDxe/VBoxFswParam.h  |    2 +-
 .../EFI/Firmware/VBoxPkg/VBoxFsDxe/VBoxHfs.inf     |    2 +-
 .../EFI/Firmware/VBoxPkg/VBoxFsDxe/VBoxIso9660.inf |    2 +-
 .../EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_base.h      |    2 +-
 .../EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_core.h      |    2 +-
 .../EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_efi.c       |    2 +-
 .../EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_efi.h       |    2 +-
 .../EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_efi_base.h  |    2 +-
 .../EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_efi_lib.c   |    2 +-
 .../EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_hfs.c       |    2 +-
 .../EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_hfs.h       |    2 +-
 .../EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_iso9660.c   |    2 +-
 .../EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_lib.c       |    2 +-
 .../EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_strfunc.h   |    2 +-
 .../VBoxPkg/VBoxInterceptorDxe/BootService.c       |    2 +-
 .../Firmware/VBoxPkg/VBoxInterceptorDxe/RunTime.c  |    2 +-
 .../VBoxPkg/VBoxInterceptorDxe/VBoxInterceptor.c   |    2 +-
 .../VBoxPkg/VBoxInterceptorDxe/VBoxInterceptor.h   |    2 +-
 .../VBoxInterceptorDxe/VBoxInterceptorDxe.inf      |    2 +-
 .../VBoxInterceptorDxe/boot_service_table.h        |    2 +-
 .../VBoxPkg/VBoxInterceptorDxe/interceptor.h       |    2 +-
 .../VBoxPkg/VBoxInterceptorDxe/print_types.h       |    2 +-
 .../VBoxInterceptorDxe/runtime_service_table.h     |    2 +-
 .../Firmware/VBoxPkg/VBoxMimicryDxe/VBoxMimicry.c  |    2 +-
 .../Firmware/VBoxPkg/VBoxMimicryDxe/VBoxMimicry.h  |    2 +-
 .../VBoxPkg/VBoxMimicryDxe/VBoxMimicryDxe.inf      |    2 +-
 .../Firmware/VBoxPkg/VBoxMimicryDxe/mimic_tbl.h    |    2 +-
 src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxPkg.dec  |    2 +-
 .../VBoxPkg/VBoxSysTables/LegacyBiosMpTable.h      |    2 +-
 .../VBoxPkg/VBoxSysTables/TableConversion.c        |    2 +-
 .../Firmware/VBoxPkg/VBoxSysTables/VBoxSysTables.c |    2 +-
 .../VBoxPkg/VBoxSysTables/VBoxSysTables.inf        |    2 +-
 .../Firmware/VBoxPkg/VBoxVgaDxe/ComponentName.c    |    2 +-
 .../VBoxPkg/VBoxVgaDxe/DriverSupportedEfiVersion.c |    2 +-
 .../Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/Edid.c |    2 +-
 .../EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVga.c      |    2 +-
 .../EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVga.h      |    2 +-
 .../EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVgaDxe.inf |    2 +-
 .../VBoxPkg/VBoxVgaDxe/VBoxVgaGraphicsOutput.c     |    2 +-
 .../EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVgaI2c.c   |    2 +-
 .../EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVgaI2c.h   |    2 +-
 .../Firmware/VBoxPkg/VBoxVgaDxe/VBoxVgaUgaDraw.c   |    2 +-
 .../VBoxVgaMiniPortDxe/VBoxVgaMiniPortDxe.c        |    2 +-
 .../VBoxVgaMiniPortDxe/VBoxVgaMiniPortDxe.inf      |    2 +-
 src/VBox/Devices/EFI/FirmwareBin/VBoxEFI32.fd      |  Bin 2097152 -> 2097152 bytes
 src/VBox/Devices/EFI/FirmwareBin/VBoxEFI64.fd      |  Bin 2097152 -> 2097152 bytes
 src/VBox/Devices/EFI/VBoxSmcUtil-darwin.cpp        |    2 +-
 src/VBox/Devices/GIMDev/DrvUDP.cpp                 |   19 +-
 src/VBox/Devices/GIMDev/GIMDev.cpp                 |    7 +-
 .../Devices/{Audio_old => GIMDev}/Makefile.kup     |    0
 src/VBox/Devices/Graphics/BIOS/Makefile.kmk        |    2 +-
 .../Graphics/BIOS/VBoxVgaBiosAlternative286.asm    |    6 +-
 .../Graphics/BIOS/VBoxVgaBiosAlternative286.md5sum |    2 +-
 .../Graphics/BIOS/VBoxVgaBiosAlternative386.asm    |    6 +-
 .../Graphics/BIOS/VBoxVgaBiosAlternative386.md5sum |    2 +-
 .../Graphics/BIOS/VBoxVgaBiosAlternative8086.asm   |    6 +-
 .../BIOS/VBoxVgaBiosAlternative8086.md5sum         |    2 +-
 src/VBox/Devices/Graphics/BIOS/inlines.h           |    2 +-
 src/VBox/Devices/Graphics/BIOS/vbetables-gen.c     |    2 +
 src/VBox/Devices/Graphics/BIOS/vgabios.c           |   10 +-
 src/VBox/Devices/Graphics/DevVGA-SVGA.cpp          |   89 +-
 src/VBox/Devices/Graphics/DevVGA-SVGA.h            |    2 +-
 src/VBox/Devices/Graphics/DevVGA-SVGA3d-cocoa.h    |    2 +-
 src/VBox/Devices/Graphics/DevVGA-SVGA3d-cocoa.m    |   20 +-
 src/VBox/Devices/Graphics/DevVGA-SVGA3d-info.cpp   |    6 +-
 src/VBox/Devices/Graphics/DevVGA-SVGA3d-internal.h |   18 +-
 src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp    |  125 +-
 .../Devices/Graphics/DevVGA-SVGA3d-savedstate.cpp  |   13 +-
 src/VBox/Devices/Graphics/DevVGA-SVGA3d-shared.cpp |   19 +-
 src/VBox/Devices/Graphics/DevVGA-SVGA3d-win.cpp    |  107 +-
 src/VBox/Devices/Graphics/DevVGA-SVGA3d.cpp        |    2 +-
 src/VBox/Devices/Graphics/DevVGA-SVGA3d.h          |    4 +-
 src/VBox/Devices/Graphics/DevVGA.cpp               |  101 +-
 src/VBox/Devices/Graphics/DevVGA.h                 |   24 +-
 src/VBox/Devices/Graphics/DevVGAModes.h            |    2 +-
 src/VBox/Devices/Graphics/DevVGASavedState.h       |    4 +-
 src/VBox/Devices/Graphics/DevVGATmpl.h             |    2 +-
 src/VBox/Devices/Graphics/DevVGA_VBVA.cpp          |  137 +-
 src/VBox/Devices/Graphics/DevVGA_VDMA.cpp          |  269 +-
 src/VBox/Devices/Graphics/HGSMI/HGSMIHost.cpp      |   70 +-
 src/VBox/Devices/Graphics/HGSMI/HGSMIHost.h        |    2 +-
 src/VBox/Devices/Graphics/HGSMI/SHGSMIHost.cpp     |    7 +-
 src/VBox/Devices/Graphics/HGSMI/SHGSMIHost.h       |   10 +-
 src/VBox/Devices/Graphics/VBoxSVGA3D.def           |    3 +-
 src/VBox/Devices/Graphics/VBoxSVGA3DObjC.def       |    2 +-
 src/VBox/Devices/Graphics/shaderlib/directx.c      |   20 +-
 src/VBox/Devices/Graphics/shaderlib/glsl_shader.c  |    6 +-
 .../shaderlib/libWineStub}/Makefile.kup            |    0
 .../Devices/Graphics/shaderlib/libWineStub/debug.c |   21 +-
 .../shaderlib/libWineStub/include/wine/debug.h     |    4 +-
 .../shaderlib/libWineStub/include/wine/list.h      |    2 +-
 src/VBox/Devices/Graphics/shaderlib/shader_sm1.c   |    2 +-
 src/VBox/Devices/Graphics/shaderlib/shaderapi.c    |   15 +-
 src/VBox/Devices/Graphics/shaderlib/shaderlib.h    |    2 +-
 src/VBox/Devices/Graphics/shaderlib/utils.c        |   18 +-
 src/VBox/Devices/Graphics/shaderlib/vboxext.h      |   24 +-
 .../Graphics/shaderlib/wine/include/advpub.h       |    2 +-
 .../Graphics/shaderlib/wine/vbox/VBoxDbgGl.c       |    2 +-
 .../Graphics/shaderlib/wine/vbox/VBoxDbgGl.h       |    2 +-
 .../Graphics/shaderlib/wine/vbox/VBoxWineEx.h      |    2 +-
 .../Devices/Graphics/shaderlib/wined3d_private.h   |   10 +-
 src/VBox/Devices/Graphics/shaderlib/winoverride.h  |    2 +-
 src/VBox/Devices/Graphics/testcase/dump-vmwgfx.c   |    2 +-
 src/VBox/Devices/Input/DevPS2.cpp                  |  780 +--
 src/VBox/Devices/Input/DrvKeyboardQueue.cpp        |    3 +-
 src/VBox/Devices/Input/DrvMouseQueue.cpp           |    4 +-
 src/VBox/Devices/Input/PS2Dev.h                    |    2 +-
 src/VBox/Devices/Input/PS2K.cpp                    |   52 +-
 src/VBox/Devices/Input/PS2M.cpp                    |   35 +-
 src/VBox/Devices/Input/UsbKbd.cpp                  |   35 +-
 src/VBox/Devices/Input/UsbMouse.cpp                |  126 +-
 src/VBox/Devices/Input/testcase/Makefile.kmk       |    2 +-
 src/VBox/Devices/Input/testcase/tstUsbMouse.cpp    |  179 +-
 src/VBox/Devices/Makefile.kmk                      |  200 +-
 src/VBox/Devices/Misc/VirtualKD.cpp                |   49 +-
 src/VBox/Devices/Network/DevE1000.cpp              |  246 +-
 src/VBox/Devices/Network/DevE1000Phy.cpp           |   15 +-
 src/VBox/Devices/Network/DevE1000Phy.h             |    2 +-
 src/VBox/Devices/Network/DevEEPROM.cpp             |    2 +-
 src/VBox/Devices/Network/DevEEPROM.h               |    2 +-
 src/VBox/Devices/Network/DevINIP.cpp               |   32 +-
 src/VBox/Devices/Network/DevPCNet.cpp              |   49 +-
 src/VBox/Devices/Network/DevVirtioNet.cpp          |   63 +-
 src/VBox/Devices/Network/DrvDedicatedNic.cpp       |   33 +-
 src/VBox/Devices/Network/DrvIntNet.cpp             |   35 +-
 src/VBox/Devices/Network/DrvNAT.cpp                |   54 +-
 src/VBox/Devices/Network/DrvNetShaper.cpp          |    4 +-
 src/VBox/Devices/Network/DrvNetSniffer.cpp         |    3 +-
 src/VBox/Devices/Network/DrvTAP.cpp                |   17 +-
 src/VBox/Devices/Network/DrvUDPTunnel.cpp          |   16 +-
 src/VBox/Devices/Network/DrvVDE.cpp                |   16 +-
 src/VBox/Devices/Network/Pcap.cpp                  |    2 +-
 src/VBox/Devices/Network/Pcap.h                    |    2 +-
 src/VBox/Devices/Network/SrvIntNetR0.cpp           |   41 +-
 src/VBox/Devices/Network/VDEPlug.cpp               |    2 +-
 src/VBox/Devices/Network/lwip-new/Config.kmk       |   97 +
 src/VBox/Devices/Network/lwip-new/Makefile.kmk     |  164 -
 .../{Audio_old => Network/lwip-new}/Makefile.kup   |    0
 .../lwip-new/src}/Makefile.kup                     |    0
 .../lwip-new/src/api}/Makefile.kup                 |    0
 .../lwip-new/src/core}/Makefile.kup                |    0
 .../lwip-new/src/core/ipv4}/Makefile.kup           |    0
 .../Devices/Network/lwip-new/src/core/ipv4/icmp.c  |    3 +
 .../lwip-new/src/core/ipv6}/Makefile.kup           |    0
 .../Devices/Network/lwip-new/src/core/ipv6/icmp6.c |    3 +
 .../Network/lwip-new/src/core/ipv6/ip6_frag.c      |    9 +
 src/VBox/Devices/Network/lwip-new/src/core/netif.c |    2 +-
 .../lwip-new/src/core/snmp}/Makefile.kup           |    0
 .../Devices/Network/lwip-new/src/core/tcp_in.c     |    2 +
 .../Devices/Network/lwip-new/src/netif/etharp.c    |    3 +
 .../lwip-new/vbox}/Makefile.kup                    |    0
 .../Devices/Network/lwip-new/vbox/VBoxLwipCore.cpp |    6 +-
 .../Devices/Network/lwip-new/vbox/VBoxLwipCore.h   |    2 +-
 .../Network/lwip-new/vbox/include/lwip-log.h       |  113 +-
 src/VBox/Devices/Network/lwip-new/vbox/sys_arch.c  |   16 +-
 src/VBox/Devices/Network/lwipopts.h                |    5 +
 .../Devices/Network/scripts/VBoxPortForwarding.py  |    2 +-
 src/VBox/Devices/Network/slirp/bootp.c             |   25 +-
 src/VBox/Devices/Network/slirp/bootp.h             |    2 +-
 .../{Audio_old => Network/slirp/bsd}/Makefile.kup  |    0
 .../slirp/bsd/amd64}/Makefile.kup                  |    0
 .../Devices/Network/slirp/bsd/amd64/in_cksum.c     |    6 +-
 .../slirp/bsd/i386}/Makefile.kup                   |    0
 .../slirp/bsd/kern}/Makefile.kup                   |    0
 .../Devices/Network/slirp/bsd/kern/kern_mbuf.c     |   14 +-
 .../Devices/Network/slirp/bsd/kern/uipc_mbuf.c     |    4 +-
 src/VBox/Devices/Network/slirp/bsd/sys/mbuf.h      |    6 +-
 src/VBox/Devices/Network/slirp/cksum.c             |    2 +-
 src/VBox/Devices/Network/slirp/counters.h          |    2 +-
 src/VBox/Devices/Network/slirp/ctl.h               |    2 +-
 src/VBox/Devices/Network/slirp/debug.c             |    2 +-
 src/VBox/Devices/Network/slirp/debug.h             |    2 +-
 src/VBox/Devices/Network/slirp/dnsproxy/dnsproxy.c |    2 +-
 src/VBox/Devices/Network/slirp/ext.h               |   18 +-
 src/VBox/Devices/Network/slirp/hostres.c           |   28 +-
 src/VBox/Devices/Network/slirp/icmp_var.h          |    2 +-
 src/VBox/Devices/Network/slirp/if.h                |    2 +-
 src/VBox/Devices/Network/slirp/ip.h                |    2 +-
 src/VBox/Devices/Network/slirp/ip_icmp.c           |   10 +-
 src/VBox/Devices/Network/slirp/ip_icmp.h           |    2 +-
 src/VBox/Devices/Network/slirp/ip_icmpwin.c        |   29 +-
 src/VBox/Devices/Network/slirp/ip_input.c          |    6 +-
 src/VBox/Devices/Network/slirp/ip_output.c         |    8 +-
 src/VBox/Devices/Network/slirp/libalias/alias.c    |    6 +-
 src/VBox/Devices/Network/slirp/libalias/alias_db.c |    2 +-
 .../Devices/Network/slirp/libalias/alias_ftp.c     |    4 +-
 .../Devices/Network/slirp/libalias/alias_nbt.c     |    2 +-
 .../Devices/Network/slirp/libalias/alias_proxy.c   |    6 +-
 src/VBox/Devices/Network/slirp/libslirp.h          |    4 +-
 src/VBox/Devices/Network/slirp/main.h              |    2 +-
 src/VBox/Devices/Network/slirp/misc.c              |   21 +-
 src/VBox/Devices/Network/slirp/misc.h              |    2 +-
 src/VBox/Devices/Network/slirp/queue.h             |    2 +-
 .../Devices/Network/slirp/resolv_conf_parser.c     |    4 +-
 .../Devices/Network/slirp/resolv_conf_parser.h     |    2 +-
 src/VBox/Devices/Network/slirp/sbuf.c              |    6 +-
 src/VBox/Devices/Network/slirp/sbuf.h              |    2 +-
 src/VBox/Devices/Network/slirp/slirp.c             |   26 +-
 src/VBox/Devices/Network/slirp/slirp.h             |   15 +-
 src/VBox/Devices/Network/slirp/slirp_config.h      |    2 +-
 src/VBox/Devices/Network/slirp/slirp_dns.c         |   23 +-
 src/VBox/Devices/Network/slirp/slirp_dns.h         |    2 +-
 src/VBox/Devices/Network/slirp/slirp_state.h       |    4 +-
 src/VBox/Devices/Network/slirp/socket.c            |   53 +-
 src/VBox/Devices/Network/slirp/socket.h            |    2 +-
 src/VBox/Devices/Network/slirp/tcp.h               |    2 +-
 src/VBox/Devices/Network/slirp/tcp_input.c         |   18 +-
 src/VBox/Devices/Network/slirp/tcp_output.c        |    6 +-
 src/VBox/Devices/Network/slirp/tcp_subr.c          |    9 +-
 src/VBox/Devices/Network/slirp/tcp_timer.c         |    2 +-
 src/VBox/Devices/Network/slirp/tcp_timer.h         |    2 +-
 src/VBox/Devices/Network/slirp/tcp_var.h           |    2 +-
 src/VBox/Devices/Network/slirp/tcpip.h             |    2 +-
 src/VBox/Devices/Network/slirp/tftp.c              |   28 +-
 src/VBox/Devices/Network/slirp/tftp.h              |    2 +-
 src/VBox/Devices/Network/slirp/udp.c               |   16 +-
 src/VBox/Devices/Network/slirp/udp.h               |    2 +-
 src/VBox/Devices/Network/slirp/zone.h              |    2 +-
 src/VBox/Devices/Network/testcase/tstDevEEPROM.cpp |    2 +-
 src/VBox/Devices/Network/testcase/tstDevPhy.cpp    |    2 +-
 src/VBox/Devices/Network/testcase/tstIntNet-1.cpp  |    7 +-
 src/VBox/Devices/Network/testcase/tstIntNetR0.cpp  |    4 +-
 src/VBox/Devices/PC/ACPI/VBoxAcpi.cpp              |    6 +-
 src/VBox/Devices/PC/BIOS/Makefile.kmk              |    2 +-
 .../Devices/PC/BIOS/VBoxBiosAlternative286.asm     |   68 +-
 .../Devices/PC/BIOS/VBoxBiosAlternative286.md5sum  |    2 +-
 .../Devices/PC/BIOS/VBoxBiosAlternative386.asm     |   66 +-
 .../Devices/PC/BIOS/VBoxBiosAlternative386.md5sum  |    2 +-
 .../Devices/PC/BIOS/VBoxBiosAlternative8086.asm    |   68 +-
 .../Devices/PC/BIOS/VBoxBiosAlternative8086.md5sum |    2 +-
 src/VBox/Devices/PC/BIOS/ahci.c                    |   18 +-
 src/VBox/Devices/PC/BIOS/apm.c                     |   32 +-
 src/VBox/Devices/PC/BIOS/apm_pm.asm                |    2 +-
 src/VBox/Devices/PC/BIOS/ata.c                     |    6 +-
 src/VBox/Devices/PC/BIOS/ata.h                     |    2 +-
 src/VBox/Devices/PC/BIOS/bios.c                    |    4 +-
 src/VBox/Devices/PC/BIOS/biosint.h                 |    2 +-
 src/VBox/Devices/PC/BIOS/boot.c                    |    8 +-
 src/VBox/Devices/PC/BIOS/disk.c                    |   12 +-
 src/VBox/Devices/PC/BIOS/ebda.h                    |    2 +-
 src/VBox/Devices/PC/BIOS/eltorito.c                |   32 +-
 src/VBox/Devices/PC/BIOS/floppy.c                  |   26 +-
 src/VBox/Devices/PC/BIOS/floppyt.c                 |    2 +-
 src/VBox/Devices/PC/BIOS/inlines.h                 |    2 +-
 src/VBox/Devices/PC/BIOS/invop.c                   |    2 +-
 src/VBox/Devices/PC/BIOS/keyboard.c                |   18 +-
 src/VBox/Devices/PC/BIOS/logo.c                    |    8 +-
 src/VBox/Devices/PC/BIOS/orgs.asm                  |    2 +-
 src/VBox/Devices/PC/BIOS/parallel.c                |    2 +-
 src/VBox/Devices/PC/BIOS/pci32.c                   |    2 +-
 src/VBox/Devices/PC/BIOS/pcibio32.asm              |    2 +-
 src/VBox/Devices/PC/BIOS/pcibios.c                 |    8 +-
 src/VBox/Devices/PC/BIOS/pciutil.c                 |    2 +-
 src/VBox/Devices/PC/BIOS/pciutil.h                 |    2 +-
 src/VBox/Devices/PC/BIOS/post.c                    |    2 +-
 src/VBox/Devices/PC/BIOS/print.c                   |    2 +-
 src/VBox/Devices/PC/BIOS/ps2mouse.c                |    2 +-
 src/VBox/Devices/PC/BIOS/scsi.c                    |    4 +-
 src/VBox/Devices/PC/BIOS/serial.c                  |    2 +-
 src/VBox/Devices/PC/BIOS/system.c                  |   14 +-
 src/VBox/Devices/PC/BIOS/timepci.c                 |    4 +-
 src/VBox/Devices/PC/BIOS/vds.c                     |    2 +-
 src/VBox/Devices/PC/DevACPI.cpp                    |  584 ++-
 src/VBox/Devices/PC/DevAPIC.cpp                    |    5 +-
 src/VBox/Devices/PC/DevApic.h                      |    2 +-
 src/VBox/Devices/PC/DevDMA.cpp                     |  100 +-
 src/VBox/Devices/PC/DevFwCommon.cpp                |    4 +-
 src/VBox/Devices/PC/DevFwCommon.h                  |    2 +-
 src/VBox/Devices/PC/DevHPET.cpp                    |    9 +-
 src/VBox/Devices/PC/DevIOAPIC_New.cpp              | 1366 ------
 src/VBox/Devices/PC/DevIoApic.cpp                  | 1565 +++---
 src/VBox/Devices/PC/DevIoApic_Old.cpp              |  930 ++++
 src/VBox/Devices/PC/DevLPC.cpp                     |   17 +-
 src/VBox/Devices/PC/DevPIC.cpp                     |    5 +-
 src/VBox/Devices/PC/DevPcArch.cpp                  |    5 +-
 src/VBox/Devices/PC/DevPcBios.cpp                  |   18 +-
 src/VBox/Devices/PC/DevPcBios.h                    |    2 +-
 src/VBox/Devices/PC/DevPit-i8254.cpp               |   31 +-
 src/VBox/Devices/PC/DevRTC.cpp                     |   14 +-
 src/VBox/Devices/PC/DrvACPI.cpp                    |   23 +-
 src/VBox/Devices/PC/DrvAcpiCpu.cpp                 |    3 +-
 src/VBox/Devices/PC/ipxe/Makefile.kmk              |    4 +-
 src/VBox/Devices/PC/ipxe/src/util/zbin.c           |    6 +-
 src/VBox/Devices/Parallel/DevParallel.cpp          |    9 +-
 src/VBox/Devices/Parallel/DrvHostParallel.cpp      |  698 ++-
 src/VBox/Devices/Samples/DrvStorageFilter.cpp      |    2 +-
 src/VBox/Devices/Samples/Makefile.kmk              |    2 +-
 src/VBox/Devices/Samples/VBoxSampleDevice.cpp      |    2 +-
 src/VBox/Devices/Serial/DevSerial.cpp              |   22 +-
 src/VBox/Devices/Serial/DrvChar.cpp                |   50 +-
 src/VBox/Devices/Serial/DrvHostSerial.cpp          |    6 +-
 src/VBox/Devices/Serial/DrvNamedPipe.cpp           |   16 +-
 src/VBox/Devices/Serial/DrvRawFile.cpp             |    7 +-
 src/VBox/Devices/Serial/DrvTCP.cpp                 |   20 +-
 src/VBox/Devices/Storage/ATAPIPassthrough.cpp      |   11 +-
 src/VBox/Devices/Storage/ATAPIPassthrough.h        |    2 +-
 src/VBox/Devices/Storage/Debug.cpp                 |   13 +-
 src/VBox/Devices/Storage/DevAHCI.cpp               |  495 +-
 src/VBox/Devices/Storage/DevATA.cpp                |   83 +-
 src/VBox/Devices/Storage/DevBusLogic.cpp           |   61 +-
 src/VBox/Devices/Storage/DevFdc.cpp                |   60 +-
 src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp       |   66 +-
 src/VBox/Devices/Storage/DevLsiLogicSCSI.h         |    2 +-
 src/VBox/Devices/Storage/DrvDiskIntegrity.cpp      |   38 +-
 src/VBox/Devices/Storage/DrvHostBase.cpp           |   78 +-
 src/VBox/Devices/Storage/DrvHostBase.h             |    2 +-
 src/VBox/Devices/Storage/DrvHostDVD.cpp            |   10 +-
 src/VBox/Devices/Storage/DrvHostFloppy.cpp         |    5 +-
 src/VBox/Devices/Storage/DrvSCSI.cpp               |   23 +-
 src/VBox/Devices/Storage/DrvSCSIHost.cpp           |   11 +-
 src/VBox/Devices/Storage/DrvVD.cpp                 |  124 +-
 src/VBox/Devices/Storage/HBDMgmt-darwin.cpp        |   24 +-
 src/VBox/Devices/Storage/HBDMgmt-generic.cpp       |    2 +-
 src/VBox/Devices/Storage/HBDMgmt-win.cpp           |    4 +-
 src/VBox/Devices/Storage/HBDMgmt.h                 |    2 +-
 src/VBox/Devices/Storage/IOBufMgmt.cpp             |   29 +-
 src/VBox/Devices/Storage/PIIX3ATABmDma.h           |    2 +-
 src/VBox/Devices/Storage/UsbMsd.cpp                |  124 +-
 src/VBox/Devices/Storage/VBoxSCSI.cpp              |    5 +-
 src/VBox/Devices/Storage/VBoxSCSI.h                |    2 +-
 src/VBox/Devices/Storage/VSCSI/VSCSIDevice.cpp     |    3 +-
 src/VBox/Devices/Storage/VSCSI/VSCSIInline.h       |    2 +-
 src/VBox/Devices/Storage/VSCSI/VSCSIInternal.h     |    2 +-
 src/VBox/Devices/Storage/VSCSI/VSCSIIoReq.cpp      |    2 +-
 src/VBox/Devices/Storage/VSCSI/VSCSILun.cpp        |    2 +-
 src/VBox/Devices/Storage/VSCSI/VSCSILunMmc.cpp     |   12 +-
 src/VBox/Devices/Storage/VSCSI/VSCSILunSbc.cpp     |    5 +-
 src/VBox/Devices/Storage/VSCSI/VSCSISense.cpp      |    2 +-
 .../Devices/Storage/VSCSI/VSCSIVpdPagePool.cpp     |    2 +-
 src/VBox/Devices/Storage/VSCSI/VSCSIVpdPages.h     |    2 +-
 src/VBox/Devices/Storage/ide.h                     |    2 +-
 src/VBox/Devices/Storage/swab.h                    |    2 +-
 src/VBox/Devices/USB/DevOHCI.cpp                   |  470 +-
 src/VBox/Devices/USB/DrvVUSBRootHub.cpp            |   58 +-
 src/VBox/Devices/USB/USBProxyDevice-stub.cpp       |    2 +-
 src/VBox/Devices/USB/USBProxyDevice.cpp            |   37 +-
 src/VBox/Devices/USB/USBProxyDevice.h              |    2 +-
 src/VBox/Devices/USB/VUSBBufferedPipe.cpp          |   36 +-
 src/VBox/Devices/USB/VUSBDevice.cpp                |   24 +-
 src/VBox/Devices/USB/VUSBInternal.h                |    2 +-
 src/VBox/Devices/USB/VUSBSniffer.cpp               |    4 +-
 src/VBox/Devices/USB/VUSBSnifferPcapNg.cpp         |   61 +-
 src/VBox/Devices/USB/VUSBSnifferUsbMon.cpp         |   11 +-
 src/VBox/Devices/USB/VUSBSnifferVmx.cpp            |   31 +-
 src/VBox/Devices/USB/VUSBUrb.cpp                   |   16 +-
 src/VBox/Devices/USB/VUSBUrbPool.cpp               |   15 +-
 src/VBox/Devices/USB/VUSBUrbTrace.cpp              |   10 -
 .../Devices/USB/darwin/USBProxyDevice-darwin.cpp   |   31 +-
 .../Devices/USB/freebsd/USBProxyDevice-freebsd.cpp |    4 +-
 .../Devices/USB/linux/USBProxyDevice-linux.cpp     |   28 +-
 src/VBox/Devices/USB/os2/USBProxyDevice-os2.cpp    |    6 +-
 .../Devices/USB/solaris/USBProxyDevice-solaris.cpp |    4 +-
 .../Devices/USB/testcase/tstOhciRegisterAccess.cpp |    2 +-
 src/VBox/Devices/USB/testcase/tstPalmOne.c         |    2 +-
 src/VBox/Devices/USB/testcase/tstTrekStorGo.c      |    2 +-
 .../Devices/USB/usbip/USBProxyDevice-usbip.cpp     |   87 +-
 src/VBox/Devices/USB/vrdp/USBProxyDevice-vrdp.cpp  |    5 +-
 src/VBox/Devices/USB/win/USBProxyDevice-win.cpp    |   41 +-
 src/VBox/Devices/VMMDev/VMMDev.cpp                 |   24 +-
 src/VBox/Devices/VMMDev/VMMDevHGCM.cpp             |    4 +-
 src/VBox/Devices/VMMDev/VMMDevHGCM.h               |    4 +-
 src/VBox/Devices/VMMDev/VMMDevState.h              |    2 +-
 src/VBox/Devices/VMMDev/VMMDevTesting.cpp          |   12 +-
 src/VBox/Devices/VMMDev/VMMDevTesting.h            |    2 +-
 src/VBox/Devices/VirtIO/Virtio.cpp                 |   22 +-
 src/VBox/Devices/VirtIO/Virtio.h                   |    2 +-
 src/VBox/Devices/build/VBoxDD.cpp                  |   40 +-
 src/VBox/Devices/build/VBoxDD.h                    |   15 +-
 src/VBox/Devices/build/VBoxDD2.cpp                 |    2 +-
 src/VBox/Devices/build/VBoxDD2.h                   |    2 +-
 src/VBox/Devices/build/VBoxDD2R0.cpp               |    2 +-
 src/VBox/Devices/build/VBoxDDR0.cpp                |    2 +-
 src/VBox/Devices/build/VBoxDDUDeps.cpp             |    2 +-
 src/VBox/Devices/testcase/Makefile.kmk             |    4 +-
 src/VBox/Devices/testcase/tstDeviceStructSize.cpp  |   13 +-
 .../Devices/testcase/tstDeviceStructSizeRC.cpp     |   75 +-
 src/VBox/Disassembler/Disasm.cpp                   |    2 +-
 src/VBox/Disassembler/DisasmCore.cpp               |  128 +-
 src/VBox/Disassembler/DisasmFormatBytes.cpp        |    2 +-
 src/VBox/Disassembler/DisasmFormatYasm.cpp         |   12 +-
 src/VBox/Disassembler/DisasmInternal.h             |    2 +-
 src/VBox/Disassembler/DisasmReg.cpp                |    2 +-
 src/VBox/Disassembler/DisasmTables.cpp             |   12 +-
 src/VBox/Disassembler/DisasmTablesX64.cpp          |    8 +-
 src/VBox/Disassembler/Makefile.kmk                 |    2 +-
 src/VBox/Disassembler/testcase/Makefile.kmk        |    2 +-
 src/VBox/Disassembler/testcase/tstAsm.mac          |    2 +-
 src/VBox/Disassembler/testcase/tstAsm3DNow-1.asm   |    2 +-
 src/VBox/Disassembler/testcase/tstAsmFnstsw-1.asm  |    2 +-
 src/VBox/Disassembler/testcase/tstAsmLock-1.asm    |    2 +-
 src/VBox/Disassembler/testcase/tstAsmLock-2.asm    |    2 +-
 src/VBox/Disassembler/testcase/tstAsmLock-3.asm    |    2 +-
 .../Disassembler/testcase/tstAsmMovFixedReg-1.asm  |    2 +-
 src/VBox/Disassembler/testcase/tstAsmMovSeg-1.asm  |    2 +-
 src/VBox/Disassembler/testcase/tstAsmMovzx-1.asm   |    2 +-
 src/VBox/Disassembler/testcase/tstAsmPop-1.asm     |    2 +-
 src/VBox/Disassembler/testcase/tstAsmPush-1.asm    |    2 +-
 src/VBox/Disassembler/testcase/tstAsmRegs-1.asm    |    2 +-
 .../Disassembler/testcase/tstAsmSignExtend-1.asm   |    2 +-
 src/VBox/Disassembler/testcase/tstDisasm-1.cpp     |    4 +-
 src/VBox/Disassembler/testcase/tstDisasm-1A.asm    |    2 +-
 src/VBox/Disassembler/testcase/tstDisasm-2.cpp     |    9 +-
 src/VBox/ExtPacks/BusMouseSample/BusMouse.cpp      |   21 +-
 src/VBox/ExtPacks/BusMouseSample/Makefile.kmk      |    2 +-
 .../ExtPacks/BusMouseSample/VBoxBusMouseMain.cpp   |    4 +-
 src/VBox/ExtPacks/Makefile.kmk                     |    2 +-
 src/VBox/ExtPacks/Skeleton/Makefile.kmk            |    2 +-
 src/VBox/ExtPacks/Skeleton/VBoxSkeletonMain.cpp    |    2 +-
 src/VBox/ExtPacks/VBoxDTrace/Makefile.kmk          |    3 +-
 src/VBox/ExtPacks/VBoxDTrace/VBoxDTraceMain.cpp    |    2 +-
 src/VBox/ExtPacks/VBoxDTrace/VBoxDTraceR0.cpp      |   61 +-
 src/VBox/ExtPacks/VBoxDTrace/VBoxDTraceR0A.asm     |    2 +-
 src/VBox/ExtPacks/VBoxDTrace/VBoxDTraceWrapper.cpp |    2 +-
 .../ExtPacks/VBoxDTrace/generated/dt_grammar.c     | 1135 +++--
 .../ExtPacks/VBoxDTrace/generated/dt_grammar.h     |   44 +-
 src/VBox/ExtPacks/VBoxDTrace/generated/dt_lex.c    | 1922 ++++----
 .../VBoxDTrace/include/VBoxDTraceLibCWrappers.h    |    2 +-
 .../ExtPacks/VBoxDTrace/include/VBoxDTraceTypes.h  |    7 +-
 .../ExtPacks/VBoxDTrace/onnv/cmd/dtrace/dtrace.c   |   33 +-
 .../VBoxDTrace/onnv/common/ctf/ctf_create.c        |    9 +-
 .../VBoxDTrace/onnv/common/ctf/ctf_labels.c        |    5 +-
 .../VBoxDTrace/onnv/common/ctf/ctf_lookup.c        |    2 +-
 .../ExtPacks/VBoxDTrace/onnv/common/ctf/ctf_open.c |    4 +-
 .../VBoxDTrace/onnv/lib/libctf/common/ctf_lib.c    |    3 +-
 .../VBoxDTrace/onnv/lib/libctf/common/ctf_subr.c   |    1 +
 .../onnv/lib/libdtrace/common/dt_aggregate.c       |   17 +-
 .../VBoxDTrace/onnv/lib/libdtrace/common/dt_as.c   |    4 +-
 .../VBoxDTrace/onnv/lib/libdtrace/common/dt_cc.c   |   17 +-
 .../VBoxDTrace/onnv/lib/libdtrace/common/dt_cg.c   |    4 +-
 .../onnv/lib/libdtrace/common/dt_consume.c         |   31 +-
 .../VBoxDTrace/onnv/lib/libdtrace/common/dt_decl.c |    3 +-
 .../VBoxDTrace/onnv/lib/libdtrace/common/dt_dis.c  |   11 +
 .../VBoxDTrace/onnv/lib/libdtrace/common/dt_dof.c  |    1 +
 .../onnv/lib/libdtrace/common/dt_error.c           |    1 +
 .../onnv/lib/libdtrace/common/dt_grammar.y         |    4 +
 .../onnv/lib/libdtrace/common/dt_ident.c           |    4 +
 .../VBoxDTrace/onnv/lib/libdtrace/common/dt_lex.l  |   18 +-
 .../onnv/lib/libdtrace/common/dt_module.c          |   24 +-
 .../VBoxDTrace/onnv/lib/libdtrace/common/dt_open.c |    8 +-
 .../onnv/lib/libdtrace/common/dt_options.c         |   42 +-
 .../onnv/lib/libdtrace/common/dt_parser.c          |   20 +-
 .../onnv/lib/libdtrace/common/dt_parser.h          |    6 +-
 .../onnv/lib/libdtrace/common/dt_pragma.c          |    6 +-
 .../onnv/lib/libdtrace/common/dt_printf.c          |   59 +-
 .../onnv/lib/libdtrace/common/dt_program.c         |    7 +-
 .../onnv/lib/libdtrace/common/dt_provider.c        |    7 +
 .../onnv/lib/libdtrace/common/dt_regset.c          |    2 +-
 .../VBoxDTrace/onnv/lib/libdtrace/common/dt_subr.c |   34 +-
 .../VBoxDTrace/onnv/lib/libdtrace/common/dt_work.c |    6 +-
 .../onnv/lib/libdtrace/common/dt_xlator.c          |    5 +
 .../VBoxDTrace/onnv/lib/libdtrace/common/dtrace.h  |   24 +-
 .../onnv/lib/libdtrace/common/mknames.sed          |    1 +
 .../VBoxDTrace/onnv/uts/common/dtrace/dtrace.c     |   79 +-
 .../VBoxDTrace/onnv/uts/common/sys/dtrace.h        |    4 +
 src/VBox/ExtPacks/VNC/Makefile.kmk                 |    2 +-
 src/VBox/ExtPacks/VNC/VBoxVNC.cpp                  |   36 +-
 src/VBox/ExtPacks/VNC/VBoxVNCMain.cpp              |    2 +-
 src/VBox/Frontends/Common/Makefile.kmk             |    2 +-
 .../Frontends/Common/VBoxKeyboard/Makefile.kmk     |    2 +-
 src/VBox/Frontends/Makefile.kmk                    |    2 +-
 src/VBox/Frontends/VBoxAutostart/Makefile.kmk      |    2 +-
 .../VBoxAutostart/VBoxAutostart-posix.cpp          |    7 +-
 .../Frontends/VBoxAutostart/VBoxAutostart-win.cpp  |   46 +-
 src/VBox/Frontends/VBoxAutostart/VBoxAutostart.h   |    2 +-
 .../Frontends/VBoxAutostart/VBoxAutostartCfg.cpp   |   21 +-
 .../Frontends/VBoxAutostart/VBoxAutostartStart.cpp |    2 +-
 .../Frontends/VBoxAutostart/VBoxAutostartStop.cpp  |    4 +-
 .../Frontends/VBoxAutostart/VBoxAutostartUtils.cpp |    7 +-
 src/VBox/Frontends/VBoxBalloonCtrl/Makefile.kmk    |    2 +-
 .../Frontends/VBoxBalloonCtrl/VBoxBalloonCtrl.rc   |    2 +-
 .../VBoxBalloonCtrl/VBoxModAPIMonitor.cpp          |   64 +-
 .../VBoxBalloonCtrl/VBoxModBallooning.cpp          |  276 +-
 .../Frontends/VBoxBalloonCtrl/VBoxWatchdog.cpp     |   13 +-
 .../VBoxBalloonCtrl/VBoxWatchdogInternal.h         |    4 +-
 .../VBoxBalloonCtrl/VBoxWatchdogUtils.cpp          |   13 +-
 src/VBox/Frontends/VBoxBugReport/VBoxBugReport.cpp |    5 +-
 .../Frontends/VBoxBugReport/VBoxBugReportWin.cpp   |   86 +-
 src/VBox/Frontends/VBoxFB/Framebuffer.cpp          |    2 +-
 src/VBox/Frontends/VBoxFB/Framebuffer.h            |    2 +-
 src/VBox/Frontends/VBoxFB/Helper.cpp               |    2 +-
 src/VBox/Frontends/VBoxFB/Helper.h                 |    2 +-
 src/VBox/Frontends/VBoxFB/Makefile.kmk             |    2 +-
 src/VBox/Frontends/VBoxFB/VBoxFB.cpp               |    2 +-
 src/VBox/Frontends/VBoxFB/VBoxFB.h                 |    2 +-
 src/VBox/Frontends/VBoxHeadless/Makefile.kmk       |    2 +-
 src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp   |    1 +
 src/VBox/Frontends/VBoxHeadless/VBoxHeadless.rc    |    2 +-
 .../VBoxHeadless/VBoxHeadlessHardened.cpp          |    2 +-
 .../Frontends/VBoxHeadless/testcase/Makefile.kmk   |    2 +-
 src/VBox/Frontends/VBoxManage/Makefile.kmk         |    6 +-
 .../Frontends/VBoxManage/VBoxInternalManage.cpp    |   25 +-
 src/VBox/Frontends/VBoxManage/VBoxManage.h         |    2 +-
 src/VBox/Frontends/VBoxManage/VBoxManage.rc        |    2 +-
 .../Frontends/VBoxManage/VBoxManageAppliance.cpp   |   55 +-
 .../VBoxManage/VBoxManageBandwidthControl.cpp      |    3 +-
 .../Frontends/VBoxManage/VBoxManageControlVM.cpp   |    8 +-
 .../Frontends/VBoxManage/VBoxManageDHCPServer.cpp  |   79 +-
 .../Frontends/VBoxManage/VBoxManageDebugVM.cpp     |    2 +-
 src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp   |    6 +-
 .../Frontends/VBoxManage/VBoxManageGuestCtrl.cpp   |   29 +-
 .../Frontends/VBoxManage/VBoxManageGuestCtrl.h     |    2 +-
 .../VBoxManage/VBoxManageGuestCtrlListener.cpp     |    2 +-
 .../Frontends/VBoxManage/VBoxManageGuestProp.cpp   |    2 +-
 src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp   |   23 +-
 .../Frontends/VBoxManage/VBoxManageHostonly.cpp    |    6 +-
 src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp   |    6 +-
 src/VBox/Frontends/VBoxManage/VBoxManageList.cpp   |   14 +-
 .../Frontends/VBoxManage/VBoxManageMetrics.cpp     |   30 +-
 src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp   |    2 +-
 .../Frontends/VBoxManage/VBoxManageModifyVM.cpp    |   13 +-
 .../Frontends/VBoxManage/VBoxManageSnapshot.cpp    |    3 +-
 .../VBoxManage/VBoxManageStorageController.cpp     |   24 +-
 src/VBox/Frontends/VBoxManage/VBoxManageUSB.cpp    |   12 +-
 src/VBox/Frontends/VBoxSDL/Framebuffer.cpp         |   35 +-
 src/VBox/Frontends/VBoxSDL/Helper.cpp              |    5 +-
 src/VBox/Frontends/VBoxSDL/Helper.h                |    2 +-
 src/VBox/Frontends/VBoxSDL/Makefile.kmk            |    2 +-
 src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp             |   41 +-
 src/VBox/Frontends/VBoxSDL/VBoxSDL.h               |   12 +-
 src/VBox/Frontends/VBoxSDL/VBoxSDLHardened.cpp     |    2 +-
 src/VBox/Frontends/VBoxSDL/VBoxSDLTest.cpp         |   15 +-
 src/VBox/Frontends/VBoxShell/Makefile.kmk          |    2 +-
 src/VBox/Frontends/VBoxShell/vboxshell.py          |   15 +-
 src/VBox/Frontends/VirtualBox/Makefile.kmk         |   95 +-
 .../Frontends/VirtualBox/nls/ApprovedLanguages.kmk |    4 +-
 src/VBox/Frontends/VirtualBox/nls/VirtualBox_bg.ts |  336 +-
 src/VBox/Frontends/VirtualBox/nls/VirtualBox_de.ts |    2 +-
 src/VBox/Frontends/VirtualBox/nls/VirtualBox_el.ts |   62 +-
 src/VBox/Frontends/VirtualBox/nls/VirtualBox_eu.ts |   10 +-
 src/VBox/Frontends/VirtualBox/nls/VirtualBox_id.ts | 1362 +++---
 src/VBox/Frontends/VirtualBox/nls/VirtualBox_it.ts |   56 +-
 src/VBox/Frontends/VirtualBox/nls/VirtualBox_ja.ts |  370 +-
 src/VBox/Frontends/VirtualBox/nls/VirtualBox_ko.ts |  386 +-
 src/VBox/Frontends/VirtualBox/nls/VirtualBox_pl.ts | 3448 ++++++-------
 src/VBox/Frontends/VirtualBox/nls/VirtualBox_tr.ts |   62 +-
 .../Frontends/VirtualBox/nls/VirtualBox_zh_TW.ts   |  232 +-
 src/VBox/Frontends/VirtualBox/nls/qt_it.ts         |   19 +-
 src/VBox/Frontends/VirtualBox/nls/qt_ja.ts         | 1242 +----
 src/VBox/Frontends/VirtualBox/nls/qt_pl.ts         |    4 +-
 .../VirtualBox/src/UIMediumTypeChangeDialog.cpp    |    2 +-
 .../Frontends/VirtualBox/src/UIVMInfoDialog.cpp    |   26 +-
 src/VBox/Frontends/VirtualBox/src/UIVMInfoDialog.h |   14 +-
 .../Frontends/VirtualBox/src/UIVMLogViewer.cpp     |   35 +-
 src/VBox/Frontends/VirtualBox/src/UIVMLogViewer.h  |   14 +-
 src/VBox/Frontends/VirtualBox/src/UIVMLogViewer.ui |    2 +-
 src/VBox/Frontends/VirtualBox/src/VBoxAboutDlg.cpp |   20 +-
 src/VBox/Frontends/VirtualBox/src/VBoxAboutDlg.h   |    2 +-
 .../Frontends/VirtualBox/src/VBoxFBOverlay.cpp     |   50 +-
 src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.h  |   13 +-
 .../Frontends/VirtualBox/src/VBoxFBOverlayCommon.h |    2 +-
 .../Frontends/VirtualBox/src/VBoxGLSupportInfo.cpp |   12 +-
 .../VirtualBox/src/VBoxGlobalSettings.cpp          |    2 +-
 .../Frontends/VirtualBox/src/VBoxGlobalSettings.h  |    2 +-
 .../Frontends/VirtualBox/src/VBoxLicenseViewer.cpp |    2 +-
 .../Frontends/VirtualBox/src/VBoxLicenseViewer.h   |    2 +-
 .../VirtualBox/src/VBoxSnapshotDetailsDlg.cpp      |    2 +-
 .../VirtualBox/src/VBoxSnapshotDetailsDlg.h        |    2 +-
 .../VirtualBox/src/VBoxSnapshotDetailsDlg.ui       |    2 +-
 .../VirtualBox/src/VBoxTakeSnapshotDlg.cpp         |    2 +-
 .../Frontends/VirtualBox/src/VBoxTakeSnapshotDlg.h |    2 +-
 .../VirtualBox/src/VBoxTakeSnapshotDlg.ui          |    2 +-
 src/VBox/Frontends/VirtualBox/src/VBoxUpdateDlg.ui |    2 +-
 .../VirtualBox/src/converter/UIConverter.cpp       |    2 +-
 .../VirtualBox/src/converter/UIConverter.h         |    2 +-
 .../VirtualBox/src/converter/UIConverterBackend.h  |    2 +-
 .../src/converter/UIConverterBackendCOM.cpp        |   11 +-
 .../src/converter/UIConverterBackendGlobal.cpp     |    2 +-
 .../VirtualBox/src/extensions/QIAdvancedSlider.cpp |    2 +-
 .../VirtualBox/src/extensions/QIAdvancedSlider.h   |    2 +-
 .../src/extensions/QIAdvancedToolBar.cpp           |    2 +-
 .../VirtualBox/src/extensions/QIAdvancedToolBar.h  |    2 +-
 .../src/extensions/QIArrowButtonPress.cpp          |    2 +-
 .../VirtualBox/src/extensions/QIArrowButtonPress.h |    2 +-
 .../VirtualBox/src/extensions/QIArrowSplitter.cpp  |    6 +-
 .../VirtualBox/src/extensions/QIArrowSplitter.h    |    2 +-
 .../src/extensions/QIDialogButtonBox.cpp           |    2 +-
 .../VirtualBox/src/extensions/QIDialogButtonBox.h  |    2 +-
 .../VirtualBox/src/extensions/QIFileDialog.cpp     |    5 +-
 .../VirtualBox/src/extensions/QIFileDialog.h       |    2 +-
 .../VirtualBox/src/extensions/QILabel.cpp          |    2 +-
 .../Frontends/VirtualBox/src/extensions/QILabel.h  |    2 +-
 .../VirtualBox/src/extensions/QILabelSeparator.cpp |    2 +-
 .../VirtualBox/src/extensions/QILabelSeparator.h   |    2 +-
 .../VirtualBox/src/extensions/QILineEdit.cpp       |   21 +-
 .../VirtualBox/src/extensions/QILineEdit.h         |    2 +-
 .../VirtualBox/src/extensions/QIListView.cpp       |    2 +-
 .../VirtualBox/src/extensions/QIListView.h         |    2 +-
 .../VirtualBox/src/extensions/QIMainDialog.cpp     |    2 +-
 .../VirtualBox/src/extensions/QIMainDialog.h       |    2 +-
 .../VirtualBox/src/extensions/QIMainWindow.cpp     |   48 +
 .../VirtualBox/src/extensions/QIMainWindow.h       |   48 +
 .../Frontends/VirtualBox/src/extensions/QIMenu.cpp |    2 +-
 .../Frontends/VirtualBox/src/extensions/QIMenu.h   |    2 +-
 .../VirtualBox/src/extensions/QIMessageBox.cpp     |    2 +-
 .../VirtualBox/src/extensions/QIMessageBox.h       |    2 +-
 .../VirtualBox/src/extensions/QIProcess.cpp        |    2 +-
 .../VirtualBox/src/extensions/QIProcess.h          |    2 +-
 .../VirtualBox/src/extensions/QIRichTextLabel.cpp  |    2 +-
 .../VirtualBox/src/extensions/QIRichTextLabel.h    |    2 +-
 .../VirtualBox/src/extensions/QIRichToolButton.cpp |    2 +-
 .../VirtualBox/src/extensions/QIRichToolButton.h   |    2 +-
 .../VirtualBox/src/extensions/QISplitter.cpp       |    2 +-
 .../VirtualBox/src/extensions/QISplitter.h         |    2 +-
 .../VirtualBox/src/extensions/QIStatusBar.cpp      |    2 +-
 .../VirtualBox/src/extensions/QIStatusBar.h        |    2 +-
 .../src/extensions/QIStatusBarIndicator.cpp        |    2 +-
 .../src/extensions/QIStatusBarIndicator.h          |    4 +-
 .../src/extensions/QIStyledItemDelegate.h          |    2 +-
 .../VirtualBox/src/extensions/QITabWidget.h        |    2 +-
 .../VirtualBox/src/extensions/QIToolButton.h       |    2 +-
 .../VirtualBox/src/extensions/QITreeView.cpp       |    2 +-
 .../VirtualBox/src/extensions/QITreeView.h         |    2 +-
 .../VirtualBox/src/extensions/QITreeWidget.cpp     |    2 +-
 .../VirtualBox/src/extensions/QITreeWidget.h       |    2 +-
 .../src/extensions/QIWidgetValidator.cpp           |    2 +-
 .../VirtualBox/src/extensions/QIWidgetValidator.h  |    2 +-
 .../src/extensions/graphics/QIGraphicsView.cpp     |    2 +-
 .../src/extensions/graphics/QIGraphicsView.h       |    2 +-
 .../src/extensions/graphics/QIGraphicsWidget.cpp   |    2 +-
 .../src/extensions/graphics/QIGraphicsWidget.h     |    2 +-
 .../VirtualBox/src/extradata/UIExtraDataDefs.cpp   |    2 +-
 .../VirtualBox/src/extradata/UIExtraDataDefs.h     |    2 +-
 .../src/extradata/UIExtraDataManager.cpp           |   55 +-
 .../VirtualBox/src/extradata/UIExtraDataManager.h  |    2 +-
 .../Frontends/VirtualBox/src/globals/CIShared.h    |    2 +-
 .../Frontends/VirtualBox/src/globals/COMDefs.cpp   |   10 +-
 .../Frontends/VirtualBox/src/globals/COMDefs.h     |    2 +-
 .../VirtualBox/src/globals/QIWithRetranslateUI.h   |    2 +-
 .../VirtualBox/src/globals/UIActionPool.cpp        |    4 +-
 .../VirtualBox/src/globals/UIActionPool.h          |    2 +-
 .../src/globals/UIAnimationFramework.cpp           |    2 +-
 .../VirtualBox/src/globals/UIAnimationFramework.h  |    2 +-
 .../Frontends/VirtualBox/src/globals/UIDefs.cpp    |    2 +-
 src/VBox/Frontends/VirtualBox/src/globals/UIDefs.h |    2 +-
 .../src/globals/UIDesktopWidgetWatchdog.cpp        |  411 +-
 .../src/globals/UIDesktopWidgetWatchdog.h          |  117 +-
 .../VirtualBox/src/globals/UIIconPool.cpp          |    2 +-
 .../Frontends/VirtualBox/src/globals/UIIconPool.h  |    2 +-
 .../VirtualBox/src/globals/UIImageTools.cpp        |    6 +-
 .../VirtualBox/src/globals/UIImageTools.h          |    2 +-
 .../VirtualBox/src/globals/UIMessageCenter.cpp     |    6 +-
 .../VirtualBox/src/globals/UIMessageCenter.h       |    2 +-
 .../src/globals/UIModalWindowManager.cpp           |    2 +-
 .../VirtualBox/src/globals/UIModalWindowManager.h  |    2 +-
 .../VirtualBox/src/globals/UIPopupCenter.cpp       |    2 +-
 .../VirtualBox/src/globals/UIPopupCenter.h         |    2 +-
 .../VirtualBox/src/globals/UIShortcutPool.cpp      |    2 +-
 .../VirtualBox/src/globals/UIShortcutPool.h        |    2 +-
 .../VirtualBox/src/globals/UIThreadPool.cpp        |    2 +-
 .../VirtualBox/src/globals/UIThreadPool.h          |    2 +-
 .../VirtualBox/src/globals/VBoxGlobal.cpp          |  118 +-
 .../Frontends/VirtualBox/src/globals/VBoxGlobal.h  |   39 +-
 .../Frontends/VirtualBox/src/globals/VBoxUtils.h   |    2 +-
 .../Frontends/VirtualBox/src/globals/VBoxVersion.h |    2 +-
 src/VBox/Frontends/VirtualBox/src/hardenedmain.cpp |    2 +-
 src/VBox/Frontends/VirtualBox/src/main.cpp         |   35 +-
 .../Frontends/VirtualBox/src/medium/UIMedium.cpp   |    6 +-
 .../Frontends/VirtualBox/src/medium/UIMedium.h     |    2 +-
 .../VirtualBox/src/medium/UIMediumDefs.cpp         |    2 +-
 .../Frontends/VirtualBox/src/medium/UIMediumDefs.h |    2 +-
 .../VirtualBox/src/medium/UIMediumEnumerator.cpp   |    2 +-
 .../VirtualBox/src/medium/UIMediumEnumerator.h     |    2 +-
 .../VirtualBox/src/medium/UIMediumManager.cpp      |    8 +-
 .../VirtualBox/src/medium/UIMediumManager.h        |    4 +-
 .../Frontends/VirtualBox/src/net/UIDownloader.cpp  |    2 +-
 .../Frontends/VirtualBox/src/net/UIDownloader.h    |    2 +-
 .../VirtualBox/src/net/UIDownloaderAdditions.cpp   |    2 +-
 .../VirtualBox/src/net/UIDownloaderAdditions.h     |    2 +-
 .../src/net/UIDownloaderExtensionPack.cpp          |    2 +-
 .../VirtualBox/src/net/UIDownloaderExtensionPack.h |    2 +-
 .../VirtualBox/src/net/UIDownloaderUserManual.cpp  |    2 +-
 .../VirtualBox/src/net/UIDownloaderUserManual.h    |    2 +-
 .../VirtualBox/src/net/UINetworkCustomer.cpp       |    2 +-
 .../VirtualBox/src/net/UINetworkCustomer.h         |    2 +-
 .../Frontends/VirtualBox/src/net/UINetworkDefs.h   |    2 +-
 .../VirtualBox/src/net/UINetworkManager.cpp        |    2 +-
 .../VirtualBox/src/net/UINetworkManager.h          |    2 +-
 .../VirtualBox/src/net/UINetworkManagerDialog.cpp  |    2 +-
 .../VirtualBox/src/net/UINetworkManagerDialog.h    |    2 +-
 .../src/net/UINetworkManagerIndicator.cpp          |    2 +-
 .../VirtualBox/src/net/UINetworkManagerIndicator.h |    2 +-
 .../VirtualBox/src/net/UINetworkReply.cpp          |    3 +-
 .../Frontends/VirtualBox/src/net/UINetworkReply.h  |    2 +-
 .../VirtualBox/src/net/UINetworkRequest.cpp        |    2 +-
 .../VirtualBox/src/net/UINetworkRequest.h          |    2 +-
 .../VirtualBox/src/net/UINetworkRequestWidget.cpp  |    4 +-
 .../VirtualBox/src/net/UINetworkRequestWidget.h    |    2 +-
 .../Frontends/VirtualBox/src/net/UIUpdateDefs.cpp  |    2 +-
 .../Frontends/VirtualBox/src/net/UIUpdateDefs.h    |    2 +-
 .../VirtualBox/src/net/UIUpdateManager.cpp         |    2 +-
 .../Frontends/VirtualBox/src/net/UIUpdateManager.h |    2 +-
 .../VirtualBox/src/net/tstSSLCertDownloads.cpp     |    2 +-
 .../VirtualBox/src/objects}/Makefile.kup           |    0
 .../VirtualBox/src/objects/UIRichTextString.cpp    |    4 +-
 .../VirtualBox/src/objects/UIRichTextString.h      |    2 +-
 .../VirtualBox/src/platform/UIDesktopServices.h    |    2 +-
 .../src/platform/darwin/CocoaEventHelper.h         |    2 +-
 .../src/platform/darwin/DarwinKeyboard.cpp         |    2 +-
 .../src/platform/darwin/DarwinKeyboard.h           |    2 +-
 .../src/platform/darwin/DockIconPreview.h          |    2 +-
 .../platform/darwin/UIAbstractDockIconPreview.cpp  |    2 +-
 .../platform/darwin/UIAbstractDockIconPreview.h    |    2 +-
 .../src/platform/darwin/UICocoaApplication.h       |    2 +-
 .../src/platform/darwin/UICocoaDockIconPreview.h   |    2 +-
 .../src/platform/darwin/UICocoaDockIconPreview.mm  |    1 +
 .../src/platform/darwin/UICocoaSpecialControls.h   |    2 +-
 .../src/platform/darwin/UICocoaSpecialControls.mm  |    4 +
 .../platform/darwin/UIDesktopServices_darwin.cpp   |    2 +-
 .../darwin/UIDesktopServices_darwin_cocoa.mm       |    1 +
 .../platform/darwin/UIDesktopServices_darwin_p.h   |    2 +-
 .../src/platform/darwin/UIWindowMenuManager.cpp    |    3 +-
 .../src/platform/darwin/UIWindowMenuManager.h      |    2 +-
 .../src/platform/darwin/VBoxCocoaHelper.h          |    2 +-
 .../src/platform/darwin/VBoxIChatTheaterWrapper.h  |    2 +-
 .../src/platform/darwin/VBoxIChatTheaterWrapper.m  |    2 +-
 .../src/platform/darwin/VBoxUtils-darwin-cocoa.mm  |    6 +
 .../src/platform/darwin/VBoxUtils-darwin.cpp       |    2 +-
 .../src/platform/darwin/VBoxUtils-darwin.h         |    2 +-
 .../src/platform/darwin/tstDarwinKeyboard.cpp      |    2 +-
 .../VirtualBox/src/platform/darwin/vmstarter.mm    |   26 +-
 .../VirtualBox/src/platform/os2/VBoxHlp.asm        |    2 +-
 .../VirtualBox/src/platform/os2/VBoxHlp.cpp        |    2 +-
 .../VirtualBox/src/platform/os2/VBoxHlp.h          |    2 +-
 .../src/platform/win/UIDesktopServices_win.cpp     |    6 +-
 .../VirtualBox/src/platform/win/VBoxUtils-win.cpp  |    2 +-
 .../VirtualBox/src/platform/win/VBoxUtils-win.h    |   10 +-
 .../VirtualBox/src/platform/win/VirtualBox.rc      |    2 +-
 .../src/platform/win/VirtualBoxHardened.rc         |    2 +-
 .../VirtualBox/src/platform/win/WinKeyboard.cpp    |   32 +-
 .../VirtualBox/src/platform/win/WinKeyboard.h      |   13 +-
 .../src/platform/x11/UIDesktopServices_x11.cpp     |    2 +-
 .../VirtualBox/src/platform/x11/VBoxX11Helper.cpp  |    2 +-
 .../VirtualBox/src/platform/x11/VBoxX11Helper.h    |    2 +-
 .../VirtualBox/src/platform/x11/XKeyboard-new.cpp  |    5 +-
 .../VirtualBox/src/platform/x11/XKeyboard.h        |    2 +-
 src/VBox/Frontends/VirtualBox/src/precomp.h        |    8 +-
 .../VirtualBox/src/runtime/UIActionPoolRuntime.cpp |    2 +-
 .../VirtualBox/src/runtime/UIActionPoolRuntime.h   |    2 +-
 .../runtime/UIAddDiskEncryptionPasswordDialog.cpp  |    2 +-
 .../runtime/UIAddDiskEncryptionPasswordDialog.h    |    2 +-
 .../VirtualBox/src/runtime/UIDnDDataObject_win.cpp |   48 +-
 .../VirtualBox/src/runtime/UIDnDDataObject_win.h   |    8 +-
 .../VirtualBox/src/runtime/UIDnDDropSource_win.cpp |    4 +-
 .../VirtualBox/src/runtime/UIDnDDropSource_win.h   |    2 +-
 .../VirtualBox/src/runtime/UIDnDEnumFormat_win.cpp |    4 +-
 .../VirtualBox/src/runtime/UIDnDEnumFormat_win.h   |    2 +-
 .../VirtualBox/src/runtime/UIDnDHandler.cpp        |    5 +-
 .../VirtualBox/src/runtime/UIDnDHandler.h          |    2 +-
 .../VirtualBox/src/runtime/UIDnDMIMEData.cpp       |    9 +-
 .../VirtualBox/src/runtime/UIDnDMIMEData.h         |    2 +-
 .../VirtualBox/src/runtime/UIFrameBuffer.cpp       |    2 +-
 .../VirtualBox/src/runtime/UIFrameBuffer.h         |    2 +-
 .../VirtualBox/src/runtime/UIIndicatorsPool.cpp    |    4 +-
 .../VirtualBox/src/runtime/UIIndicatorsPool.h      |    2 +-
 .../VirtualBox/src/runtime/UIKeyboardHandler.cpp   |   10 +-
 .../VirtualBox/src/runtime/UIKeyboardHandler.h     |    2 +-
 .../Frontends/VirtualBox/src/runtime/UIMachine.cpp |    2 +-
 .../Frontends/VirtualBox/src/runtime/UIMachine.h   |    2 +-
 .../VirtualBox/src/runtime/UIMachineDefs.h         |    2 +-
 .../VirtualBox/src/runtime/UIMachineLogic.cpp      |    4 +-
 .../VirtualBox/src/runtime/UIMachineLogic.h        |    2 +-
 .../VirtualBox/src/runtime/UIMachineView.cpp       |   12 +-
 .../VirtualBox/src/runtime/UIMachineView.h         |    2 +-
 .../VirtualBox/src/runtime/UIMachineWindow.cpp     |    5 +-
 .../VirtualBox/src/runtime/UIMachineWindow.h       |   11 +-
 .../src/runtime/UIMenuBarEditorWindow.cpp          |    2 +-
 .../VirtualBox/src/runtime/UIMenuBarEditorWindow.h |    2 +-
 .../VirtualBox/src/runtime/UIMouseHandler.cpp      |   12 +-
 .../VirtualBox/src/runtime/UIMouseHandler.h        |    2 +-
 .../VirtualBox/src/runtime/UIMultiScreenLayout.cpp |   11 +-
 .../VirtualBox/src/runtime/UIMultiScreenLayout.h   |    2 +-
 .../Frontends/VirtualBox/src/runtime/UISession.cpp |  177 +-
 .../Frontends/VirtualBox/src/runtime/UISession.h   |    2 +-
 .../VirtualBox/src/runtime/UISlidingToolBar.cpp    |    2 +-
 .../VirtualBox/src/runtime/UISlidingToolBar.h      |    2 +-
 .../src/runtime/UIStatusBarEditorWindow.cpp        |    2 +-
 .../src/runtime/UIStatusBarEditorWindow.h          |    2 +-
 .../VirtualBox/src/runtime/UIVMCloseDialog.cpp     |    2 +-
 .../VirtualBox/src/runtime/UIVMCloseDialog.h       |    2 +-
 .../fullscreen/UIKeyboardHandlerFullscreen.cpp     |    2 +-
 .../fullscreen/UIKeyboardHandlerFullscreen.h       |    2 +-
 .../fullscreen/UIMachineLogicFullscreen.cpp        |    7 +-
 .../runtime/fullscreen/UIMachineLogicFullscreen.h  |    2 +-
 .../runtime/fullscreen/UIMachineViewFullscreen.cpp |    9 +-
 .../runtime/fullscreen/UIMachineViewFullscreen.h   |    2 +-
 .../fullscreen/UIMachineWindowFullscreen.cpp       |    5 +-
 .../runtime/fullscreen/UIMachineWindowFullscreen.h |    2 +-
 .../src/runtime/information}/Makefile.kup          |    0
 .../runtime/information/UIInformationDataItem.cpp  |   12 +-
 .../src/runtime/information/UIInformationItem.cpp  |   15 +-
 .../src/runtime/information/UIInformationView.cpp  |    2 +
 .../runtime/information/UIVMInformationDialog.cpp  |   32 +-
 .../runtime/information/UIVMInformationDialog.h    |   11 +-
 .../src/runtime/normal/UIKeyboardHandlerNormal.cpp |    2 +-
 .../src/runtime/normal/UIKeyboardHandlerNormal.h   |    2 +-
 .../src/runtime/normal/UIMachineLogicNormal.cpp    |   21 +-
 .../src/runtime/normal/UIMachineLogicNormal.h      |    5 +-
 .../src/runtime/normal/UIMachineViewNormal.cpp     |   11 +-
 .../src/runtime/normal/UIMachineViewNormal.h       |    2 +-
 .../src/runtime/normal/UIMachineWindowNormal.cpp   |   48 +-
 .../src/runtime/normal/UIMachineWindowNormal.h     |   12 +-
 .../src/runtime/scale/UIKeyboardHandlerScale.cpp   |    2 +-
 .../src/runtime/scale/UIKeyboardHandlerScale.h     |    2 +-
 .../src/runtime/scale/UIMachineLogicScale.cpp      |   21 +-
 .../src/runtime/scale/UIMachineLogicScale.h        |    7 +-
 .../src/runtime/scale/UIMachineViewScale.cpp       |   10 +-
 .../src/runtime/scale/UIMachineViewScale.h         |    2 +-
 .../src/runtime/scale/UIMachineWindowScale.cpp     |   65 +-
 .../src/runtime/scale/UIMachineWindowScale.h       |    9 +-
 .../runtime/seamless/UIKeyboardHandlerSeamless.cpp |    2 +-
 .../runtime/seamless/UIKeyboardHandlerSeamless.h   |    2 +-
 .../runtime/seamless/UIMachineLogicSeamless.cpp    |    2 +-
 .../src/runtime/seamless/UIMachineLogicSeamless.h  |    2 +-
 .../src/runtime/seamless/UIMachineViewSeamless.cpp |    9 +-
 .../src/runtime/seamless/UIMachineViewSeamless.h   |    2 +-
 .../runtime/seamless/UIMachineWindowSeamless.cpp   |    5 +-
 .../src/runtime/seamless/UIMachineWindowSeamless.h |    2 +-
 .../src/selector/UIActionPoolSelector.cpp          |    2 +-
 .../VirtualBox/src/selector/UIActionPoolSelector.h |    2 +-
 .../VirtualBox/src/selector/UISelectorWindow.cpp   |   70 +-
 .../VirtualBox/src/selector/UISelectorWindow.h     |   19 +-
 .../VirtualBox/src/selector/UIVMDesktop.cpp        |    2 +-
 .../VirtualBox/src/selector/UIVMDesktop.h          |    2 +-
 .../Frontends/VirtualBox/src/selector/UIVMItem.cpp |    6 +-
 .../Frontends/VirtualBox/src/selector/UIVMItem.h   |    2 +-
 .../VirtualBox/src/selector/VBoxSnapshotsWgt.cpp   |    2 +-
 .../VirtualBox/src/selector/VBoxSnapshotsWgt.h     |    2 +-
 .../VirtualBox/src/selector/VBoxSnapshotsWgt.ui    |    2 +-
 .../VirtualBox/src/selector/graphics}/Makefile.kup |    0
 .../src/selector/graphics/chooser}/Makefile.kup    |    0
 .../src/selector/graphics/chooser/UIGChooser.cpp   |    2 +-
 .../src/selector/graphics/chooser/UIGChooser.h     |    2 +-
 .../graphics/chooser/UIGChooserHandlerKeyboard.cpp |    2 +-
 .../graphics/chooser/UIGChooserHandlerKeyboard.h   |    2 +-
 .../graphics/chooser/UIGChooserHandlerMouse.cpp    |    2 +-
 .../graphics/chooser/UIGChooserHandlerMouse.h      |    2 +-
 .../selector/graphics/chooser/UIGChooserItem.cpp   |    2 +-
 .../src/selector/graphics/chooser/UIGChooserItem.h |    2 +-
 .../graphics/chooser/UIGChooserItemGroup.cpp       |    3 +-
 .../graphics/chooser/UIGChooserItemGroup.h         |    2 +-
 .../graphics/chooser/UIGChooserItemMachine.cpp     |    4 +-
 .../graphics/chooser/UIGChooserItemMachine.h       |    2 +-
 .../selector/graphics/chooser/UIGChooserModel.cpp  |    3 +-
 .../selector/graphics/chooser/UIGChooserModel.h    |    2 +-
 .../selector/graphics/chooser/UIGChooserView.cpp   |    2 +-
 .../src/selector/graphics/chooser/UIGChooserView.h |    2 +-
 .../src/selector/graphics/details}/Makefile.kup    |    0
 .../src/selector/graphics/details/UIGDetails.cpp   |    2 +-
 .../src/selector/graphics/details/UIGDetails.h     |    2 +-
 .../graphics/details/UIGDetailsElement.cpp         |    2 +-
 .../selector/graphics/details/UIGDetailsElement.h  |    2 +-
 .../graphics/details/UIGDetailsElements.cpp        |    2 +-
 .../selector/graphics/details/UIGDetailsElements.h |    2 +-
 .../selector/graphics/details/UIGDetailsGroup.cpp  |    2 +-
 .../selector/graphics/details/UIGDetailsGroup.h    |    2 +-
 .../selector/graphics/details/UIGDetailsItem.cpp   |    2 +-
 .../src/selector/graphics/details/UIGDetailsItem.h |    2 +-
 .../selector/graphics/details/UIGDetailsModel.cpp  |    2 +-
 .../selector/graphics/details/UIGDetailsModel.h    |    2 +-
 .../selector/graphics/details/UIGDetailsSet.cpp    |   14 +-
 .../src/selector/graphics/details/UIGDetailsSet.h  |    2 +-
 .../selector/graphics/details/UIGDetailsView.cpp   |    2 +-
 .../src/selector/graphics/details/UIGDetailsView.h |    2 +-
 .../graphics/details/UIGMachinePreview.cpp         |    2 +-
 .../selector/graphics/details/UIGMachinePreview.h  |    2 +-
 .../VirtualBox/src/settings/UISettingsDefs.cpp     |    2 +-
 .../VirtualBox/src/settings/UISettingsDefs.h       |    4 +-
 .../VirtualBox/src/settings/UISettingsDialog.cpp   |    4 +-
 .../VirtualBox/src/settings/UISettingsDialog.h     |    2 +-
 .../VirtualBox/src/settings/UISettingsDialog.ui    |    2 +-
 .../src/settings/UISettingsDialogSpecific.cpp      |    2 +-
 .../src/settings/UISettingsDialogSpecific.h        |    2 +-
 .../VirtualBox/src/settings/UISettingsPage.cpp     |    2 +-
 .../VirtualBox/src/settings/UISettingsPage.h       |    2 +-
 .../src/settings/UISettingsSerializer.cpp          |    2 +-
 .../VirtualBox/src/settings/UISettingsSerializer.h |    2 +-
 .../src/settings/VBoxSettingsSelector.cpp          |    2 +-
 .../VirtualBox/src/settings/VBoxSettingsSelector.h |    2 +-
 .../settings/global/UIGlobalSettingsDisplay.cpp    |    2 +-
 .../src/settings/global/UIGlobalSettingsDisplay.h  |    2 +-
 .../src/settings/global/UIGlobalSettingsDisplay.ui |    2 +-
 .../settings/global/UIGlobalSettingsExtension.cpp  |    2 +-
 .../settings/global/UIGlobalSettingsExtension.h    |    2 +-
 .../settings/global/UIGlobalSettingsExtension.ui   |    2 +-
 .../settings/global/UIGlobalSettingsGeneral.cpp    |    2 +-
 .../src/settings/global/UIGlobalSettingsGeneral.h  |    2 +-
 .../src/settings/global/UIGlobalSettingsGeneral.ui |    2 +-
 .../src/settings/global/UIGlobalSettingsInput.cpp  |    2 +-
 .../src/settings/global/UIGlobalSettingsInput.h    |    2 +-
 .../src/settings/global/UIGlobalSettingsInput.ui   |    2 +-
 .../settings/global/UIGlobalSettingsLanguage.cpp   |    2 +-
 .../src/settings/global/UIGlobalSettingsLanguage.h |    2 +-
 .../settings/global/UIGlobalSettingsLanguage.ui    |    2 +-
 .../settings/global/UIGlobalSettingsNetwork.cpp    |    2 +-
 .../src/settings/global/UIGlobalSettingsNetwork.h  |    2 +-
 .../src/settings/global/UIGlobalSettingsNetwork.ui |    2 +-
 .../global/UIGlobalSettingsNetworkDetailsHost.cpp  |    2 +-
 .../global/UIGlobalSettingsNetworkDetailsHost.h    |    2 +-
 .../global/UIGlobalSettingsNetworkDetailsHost.ui   |    2 +-
 .../global/UIGlobalSettingsNetworkDetailsNAT.cpp   |    2 +-
 .../global/UIGlobalSettingsNetworkDetailsNAT.h     |    2 +-
 .../global/UIGlobalSettingsNetworkDetailsNAT.ui    |    2 +-
 .../global/UIGlobalSettingsPortForwardingDlg.cpp   |    2 +-
 .../global/UIGlobalSettingsPortForwardingDlg.h     |    2 +-
 .../src/settings/global/UIGlobalSettingsProxy.cpp  |    2 +-
 .../src/settings/global/UIGlobalSettingsProxy.h    |    2 +-
 .../src/settings/global/UIGlobalSettingsProxy.ui   |    2 +-
 .../src/settings/global/UIGlobalSettingsUpdate.cpp |    2 +-
 .../src/settings/global/UIGlobalSettingsUpdate.h   |    2 +-
 .../src/settings/global/UIGlobalSettingsUpdate.ui  |    2 +-
 .../settings/machine/UIMachineSettingsAudio.cpp    |   16 +-
 .../src/settings/machine/UIMachineSettingsAudio.h  |    2 +-
 .../src/settings/machine/UIMachineSettingsAudio.ui |    2 +-
 .../settings/machine/UIMachineSettingsDisplay.cpp  |    5 +-
 .../settings/machine/UIMachineSettingsDisplay.h    |    2 +-
 .../settings/machine/UIMachineSettingsDisplay.ui   |    2 +-
 .../settings/machine/UIMachineSettingsGeneral.cpp  |    2 +-
 .../settings/machine/UIMachineSettingsGeneral.h    |    2 +-
 .../settings/machine/UIMachineSettingsGeneral.ui   |    2 +-
 .../machine/UIMachineSettingsInterface.cpp         |    2 +-
 .../settings/machine/UIMachineSettingsInterface.h  |    2 +-
 .../settings/machine/UIMachineSettingsInterface.ui |    2 +-
 .../settings/machine/UIMachineSettingsNetwork.cpp  |    2 +-
 .../settings/machine/UIMachineSettingsNetwork.h    |    2 +-
 .../settings/machine/UIMachineSettingsNetwork.ui   |    2 +-
 .../settings/machine/UIMachineSettingsParallel.cpp |    2 +-
 .../settings/machine/UIMachineSettingsParallel.h   |    2 +-
 .../settings/machine/UIMachineSettingsParallel.ui  |    2 +-
 .../machine/UIMachineSettingsPortForwardingDlg.cpp |    2 +-
 .../machine/UIMachineSettingsPortForwardingDlg.h   |    2 +-
 .../src/settings/machine/UIMachineSettingsSF.cpp   |    2 +-
 .../src/settings/machine/UIMachineSettingsSF.h     |    2 +-
 .../src/settings/machine/UIMachineSettingsSF.ui    |    2 +-
 .../machine/UIMachineSettingsSFDetails.cpp         |    2 +-
 .../settings/machine/UIMachineSettingsSFDetails.h  |    2 +-
 .../settings/machine/UIMachineSettingsSFDetails.ui |    2 +-
 .../settings/machine/UIMachineSettingsSerial.cpp   |    2 +-
 .../src/settings/machine/UIMachineSettingsSerial.h |    2 +-
 .../settings/machine/UIMachineSettingsSerial.ui    |    2 +-
 .../settings/machine/UIMachineSettingsStorage.cpp  |    1 +
 .../settings/machine/UIMachineSettingsStorage.ui   |    2 +-
 .../settings/machine/UIMachineSettingsSystem.cpp   |    4 +-
 .../src/settings/machine/UIMachineSettingsSystem.h |    2 +-
 .../settings/machine/UIMachineSettingsSystem.ui    |    2 +-
 .../src/settings/machine/UIMachineSettingsUSB.cpp  |    2 +-
 .../src/settings/machine/UIMachineSettingsUSB.h    |    2 +-
 .../src/settings/machine/UIMachineSettingsUSB.ui   |    2 +-
 .../machine/UIMachineSettingsUSBFilterDetails.cpp  |    2 +-
 .../machine/UIMachineSettingsUSBFilterDetails.h    |    2 +-
 .../machine/UIMachineSettingsUSBFilterDetails.ui   |    2 +-
 .../src/widgets/UIApplianceEditorWidget.cpp        |    4 +-
 .../src/widgets/UIApplianceEditorWidget.h          |    2 +-
 .../src/widgets/UIApplianceEditorWidget.ui         |    2 +-
 .../src/widgets/UIApplianceExportEditorWidget.cpp  |    2 +-
 .../src/widgets/UIApplianceExportEditorWidget.h    |    2 +-
 .../src/widgets/UIApplianceImportEditorWidget.cpp  |    2 +-
 .../src/widgets/UIApplianceImportEditorWidget.h    |    2 +-
 .../Frontends/VirtualBox/src/widgets/UIBar.cpp     |    2 +-
 src/VBox/Frontends/VirtualBox/src/widgets/UIBar.h  |    2 +-
 .../VirtualBox/src/widgets/UIBootTable.cpp         |    3 +-
 .../Frontends/VirtualBox/src/widgets/UIBootTable.h |    2 +-
 .../src/widgets/UIEmptyFilePathSelector.cpp        |    2 +-
 .../src/widgets/UIEmptyFilePathSelector.h          |    2 +-
 .../VirtualBox/src/widgets/UIFilmContainer.cpp     |    2 +-
 .../VirtualBox/src/widgets/UIFilmContainer.h       |    2 +-
 .../VirtualBox/src/widgets/UIHostComboEditor.cpp   |   21 +-
 .../VirtualBox/src/widgets/UIHostComboEditor.h     |    2 +-
 .../VirtualBox/src/widgets/UIHotKeyEditor.cpp      |    2 +-
 .../VirtualBox/src/widgets/UIHotKeyEditor.h        |    2 +-
 .../VirtualBox/src/widgets/UILineTextEdit.cpp      |    2 +-
 .../VirtualBox/src/widgets/UILineTextEdit.h        |    2 +-
 .../Frontends/VirtualBox/src/widgets/UIMenuBar.cpp |    2 +-
 .../Frontends/VirtualBox/src/widgets/UIMenuBar.h   |    2 +-
 .../VirtualBox/src/widgets/UIMiniToolBar.cpp       |   10 +-
 .../VirtualBox/src/widgets/UIMiniToolBar.h         |    2 +-
 .../VirtualBox/src/widgets/UIPopupBox.cpp          |    2 +-
 .../Frontends/VirtualBox/src/widgets/UIPopupBox.h  |    2 +-
 .../VirtualBox/src/widgets/UIPopupPane.cpp         |    2 +-
 .../Frontends/VirtualBox/src/widgets/UIPopupPane.h |    2 +-
 .../src/widgets/UIPopupPaneButtonPane.cpp          |    2 +-
 .../VirtualBox/src/widgets/UIPopupPaneButtonPane.h |    2 +-
 .../VirtualBox/src/widgets/UIPopupPaneTextPane.cpp |    2 +-
 .../VirtualBox/src/widgets/UIPopupPaneTextPane.h   |    2 +-
 .../VirtualBox/src/widgets/UIPopupStack.cpp        |    3 +-
 .../VirtualBox/src/widgets/UIPopupStack.h          |    2 +-
 .../src/widgets/UIPopupStackViewport.cpp           |    2 +-
 .../VirtualBox/src/widgets/UIPopupStackViewport.h  |    2 +-
 .../src/widgets/UIPortForwardingTable.cpp          |    5 +-
 .../VirtualBox/src/widgets/UIPortForwardingTable.h |    2 +-
 .../VirtualBox/src/widgets/UIProgressDialog.cpp    |    2 +-
 .../VirtualBox/src/widgets/UIProgressDialog.h      |    2 +-
 .../VirtualBox/src/widgets/UISpacerWidgets.h       |    2 +-
 .../VirtualBox/src/widgets/UISpecialControls.cpp   |    2 +-
 .../VirtualBox/src/widgets/UISpecialControls.h     |    2 +-
 .../Frontends/VirtualBox/src/widgets/UIToolBar.cpp |    2 +-
 .../Frontends/VirtualBox/src/widgets/UIToolBar.h   |    2 +-
 .../VirtualBox/src/widgets/UIWarningPane.cpp       |    2 +-
 .../VirtualBox/src/widgets/UIWarningPane.h         |    2 +-
 .../VirtualBox/src/widgets/VBoxGuestRAMSlider.cpp  |    2 +-
 .../VirtualBox/src/widgets/VBoxGuestRAMSlider.h    |    2 +-
 .../VirtualBox/src/widgets/VBoxMediaComboBox.cpp   |    2 +-
 .../VirtualBox/src/widgets/VBoxMediaComboBox.h     |    2 +-
 .../src/widgets/VBoxOSTypeSelectorButton.cpp       |    2 +-
 .../src/widgets/VBoxOSTypeSelectorButton.h         |    2 +-
 .../src/widgets/graphics/UIGraphicsButton.cpp      |    2 +-
 .../src/widgets/graphics/UIGraphicsButton.h        |    2 +-
 .../widgets/graphics/UIGraphicsRotatorButton.cpp   |    2 +-
 .../src/widgets/graphics/UIGraphicsRotatorButton.h |    2 +-
 .../src/widgets/graphics/UIGraphicsTextPane.cpp    |    2 +-
 .../src/widgets/graphics/UIGraphicsTextPane.h      |    2 +-
 .../src/widgets/graphics/UIGraphicsToolBar.cpp     |    2 +-
 .../src/widgets/graphics/UIGraphicsToolBar.h       |    2 +-
 .../src/widgets/graphics/UIGraphicsZoomButton.cpp  |    2 +-
 .../src/widgets/graphics/UIGraphicsZoomButton.h    |    2 +-
 .../Frontends/VirtualBox/src/wizards/UIWizard.cpp  |    2 +-
 .../Frontends/VirtualBox/src/wizards/UIWizard.h    |    2 +-
 .../VirtualBox/src/wizards/UIWizardPage.cpp        |    2 +-
 .../VirtualBox/src/wizards/UIWizardPage.h          |   11 +-
 .../src/wizards/clonevd/UIWizardCloneVD.cpp        |    2 +-
 .../src/wizards/clonevd/UIWizardCloneVD.h          |    2 +-
 .../wizards/clonevd/UIWizardCloneVDPageBasic1.cpp  |    2 +-
 .../wizards/clonevd/UIWizardCloneVDPageBasic1.h    |    2 +-
 .../wizards/clonevd/UIWizardCloneVDPageBasic2.cpp  |    2 +-
 .../wizards/clonevd/UIWizardCloneVDPageBasic2.h    |    2 +-
 .../wizards/clonevd/UIWizardCloneVDPageBasic3.cpp  |    2 +-
 .../wizards/clonevd/UIWizardCloneVDPageBasic3.h    |    2 +-
 .../wizards/clonevd/UIWizardCloneVDPageBasic4.cpp  |    2 +-
 .../wizards/clonevd/UIWizardCloneVDPageBasic4.h    |    2 +-
 .../wizards/clonevd/UIWizardCloneVDPageExpert.cpp  |    2 +-
 .../wizards/clonevd/UIWizardCloneVDPageExpert.h    |    2 +-
 .../src/wizards/clonevm/UIWizardCloneVM.cpp        |    2 +-
 .../src/wizards/clonevm/UIWizardCloneVM.h          |    2 +-
 .../wizards/clonevm/UIWizardCloneVMPageBasic1.cpp  |    2 +-
 .../wizards/clonevm/UIWizardCloneVMPageBasic1.h    |    2 +-
 .../wizards/clonevm/UIWizardCloneVMPageBasic2.cpp  |    2 +-
 .../wizards/clonevm/UIWizardCloneVMPageBasic2.h    |    2 +-
 .../wizards/clonevm/UIWizardCloneVMPageBasic3.cpp  |    3 +-
 .../wizards/clonevm/UIWizardCloneVMPageBasic3.h    |    2 +-
 .../wizards/clonevm/UIWizardCloneVMPageExpert.cpp  |    2 +-
 .../wizards/clonevm/UIWizardCloneVMPageExpert.h    |    2 +-
 .../wizards/exportappliance/UIWizardExportApp.cpp  |    2 +-
 .../wizards/exportappliance/UIWizardExportApp.h    |    2 +-
 .../exportappliance/UIWizardExportAppDefs.h        |    2 +-
 .../UIWizardExportAppPageBasic1.cpp                |    2 +-
 .../exportappliance/UIWizardExportAppPageBasic1.h  |    2 +-
 .../UIWizardExportAppPageBasic2.cpp                |    2 +-
 .../exportappliance/UIWizardExportAppPageBasic2.h  |    2 +-
 .../UIWizardExportAppPageBasic3.cpp                |    2 +-
 .../exportappliance/UIWizardExportAppPageBasic3.h  |    2 +-
 .../UIWizardExportAppPageBasic4.cpp                |    2 +-
 .../exportappliance/UIWizardExportAppPageBasic4.h  |    2 +-
 .../UIWizardExportAppPageExpert.cpp                |    2 +-
 .../exportappliance/UIWizardExportAppPageExpert.h  |    2 +-
 .../src/wizards/firstrun/UIWizardFirstRun.cpp      |    4 +-
 .../src/wizards/firstrun/UIWizardFirstRun.h        |    2 +-
 .../wizards/firstrun/UIWizardFirstRunPageBasic.cpp |    2 +-
 .../wizards/firstrun/UIWizardFirstRunPageBasic.h   |    2 +-
 .../wizards/importappliance/UIWizardImportApp.cpp  |    2 +-
 .../wizards/importappliance/UIWizardImportApp.h    |    2 +-
 .../importappliance/UIWizardImportAppDefs.h        |    2 +-
 .../UIWizardImportAppPageBasic1.cpp                |    2 +-
 .../importappliance/UIWizardImportAppPageBasic1.h  |    2 +-
 .../UIWizardImportAppPageExpert.cpp                |    2 +-
 .../importappliance/UIWizardImportAppPageExpert.h  |    2 +-
 .../VirtualBox/src/wizards/newvd/UIWizardNewVD.cpp |    2 +-
 .../VirtualBox/src/wizards/newvd/UIWizardNewVD.h   |    2 +-
 .../src/wizards/newvd/UIWizardNewVDPageBasic1.cpp  |    2 +-
 .../src/wizards/newvd/UIWizardNewVDPageBasic1.h    |    2 +-
 .../src/wizards/newvd/UIWizardNewVDPageBasic2.cpp  |    2 +-
 .../src/wizards/newvd/UIWizardNewVDPageBasic2.h    |    2 +-
 .../src/wizards/newvd/UIWizardNewVDPageBasic3.cpp  |    2 +-
 .../src/wizards/newvd/UIWizardNewVDPageBasic3.h    |    2 +-
 .../src/wizards/newvd/UIWizardNewVDPageExpert.cpp  |    2 +-
 .../src/wizards/newvd/UIWizardNewVDPageExpert.h    |    2 +-
 .../VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp |    8 +-
 .../VirtualBox/src/wizards/newvm/UIWizardNewVM.h   |    2 +-
 .../src/wizards/newvm/UIWizardNewVMPageBasic1.cpp  |    2 +-
 .../src/wizards/newvm/UIWizardNewVMPageBasic1.h    |    2 +-
 .../src/wizards/newvm/UIWizardNewVMPageBasic2.cpp  |    2 +-
 .../src/wizards/newvm/UIWizardNewVMPageBasic2.h    |    2 +-
 .../src/wizards/newvm/UIWizardNewVMPageBasic3.cpp  |    2 +-
 .../src/wizards/newvm/UIWizardNewVMPageBasic3.h    |    2 +-
 .../src/wizards/newvm/UIWizardNewVMPageExpert.cpp  |    2 +-
 .../src/wizards/newvm/UIWizardNewVMPageExpert.h    |    2 +-
 src/VBox/GuestHost/DragAndDrop/DnDDroppedFiles.cpp |   15 +-
 src/VBox/GuestHost/DragAndDrop/DnDMIME.cpp         |    2 +-
 src/VBox/GuestHost/DragAndDrop/DnDPath.cpp         |   30 +-
 src/VBox/GuestHost/DragAndDrop/DnDURIList.cpp      |  149 +-
 src/VBox/GuestHost/DragAndDrop/DnDURIObject.cpp    |    1 +
 src/VBox/GuestHost/DragAndDrop/Makefile.kmk        |    2 +-
 src/VBox/GuestHost/HGSMI/HGSMICommon.cpp           |    4 +-
 src/VBox/GuestHost/HGSMI/HGSMIMemAlloc.cpp         |    2 +-
 src/VBox/GuestHost/HGSMI/Makefile.kmk              |    2 +-
 src/VBox/GuestHost/Makefile.kmk                    |    2 +-
 src/VBox/GuestHost/OpenGL/Makefile.kmk             |    2 +-
 src/VBox/GuestHost/OpenGL/error/VBoxOGLerrorspu.rc |    2 +-
 src/VBox/GuestHost/OpenGL/error/errorspu.rc        |    2 +-
 src/VBox/GuestHost/OpenGL/include/GL/glext.h       |    4 +
 src/VBox/GuestHost/OpenGL/include/chromium.h       |   45 +-
 src/VBox/GuestHost/OpenGL/include/cr_blitter.h     |    2 +-
 src/VBox/GuestHost/OpenGL/include/cr_compositor.h  |    2 +-
 src/VBox/GuestHost/OpenGL/include/cr_dll.h         |    4 +
 src/VBox/GuestHost/OpenGL/include/cr_dump.h        |    2 +-
 src/VBox/GuestHost/OpenGL/include/cr_error.h       |    4 +-
 src/VBox/GuestHost/OpenGL/include/cr_glext.h       |    2 +-
 src/VBox/GuestHost/OpenGL/include/cr_glstate.h     |   12 +-
 src/VBox/GuestHost/OpenGL/include/cr_htable.h      |    2 +-
 src/VBox/GuestHost/OpenGL/include/cr_net.h         |    6 +-
 src/VBox/GuestHost/OpenGL/include/cr_pack.h        |    4 +-
 src/VBox/GuestHost/OpenGL/include/cr_process.h     |    4 +
 src/VBox/GuestHost/OpenGL/include/cr_protocol.h    |    2 +-
 src/VBox/GuestHost/OpenGL/include/cr_server.h      |    4 +-
 src/VBox/GuestHost/OpenGL/include/cr_sortarray.h   |    2 +-
 src/VBox/GuestHost/OpenGL/include/cr_threads.h     |    4 +
 src/VBox/GuestHost/OpenGL/include/cr_timer.h       |    4 +
 src/VBox/GuestHost/OpenGL/include/cr_vreg.h        |    2 +-
 .../OpenGL/include/state/cr_framebuffer.h          |    2 +-
 src/VBox/GuestHost/OpenGL/include/state/cr_glsl.h  |    2 +-
 src/VBox/GuestHost/OpenGL/packer/pack_buffer.c     |    3 +-
 src/VBox/GuestHost/OpenGL/packer/pack_client.c     |   26 +-
 .../GuestHost/OpenGL/packer/pack_framebuffer.c     |    2 +-
 src/VBox/GuestHost/OpenGL/packer/pack_pixels.c     |    4 +-
 src/VBox/GuestHost/OpenGL/packer/pack_shaders.c    |    6 +-
 src/VBox/GuestHost/OpenGL/packer/pack_texture.c    |    2 +-
 .../GuestHost/OpenGL/packer/pack_visibleregion.c   |    7 +-
 src/VBox/GuestHost/OpenGL/spu_loader/dispatch.py   |    2 +-
 src/VBox/GuestHost/OpenGL/spu_loader/glloader.py   |   10 +-
 src/VBox/GuestHost/OpenGL/spu_loader/spuchange.py  |    8 +-
 src/VBox/GuestHost/OpenGL/spu_loader/spuinit.c     |    4 +
 src/VBox/GuestHost/OpenGL/state_tracker/dump.cpp   |    2 +-
 .../OpenGL/state_tracker/state_bits_globalop.h     |    2 +-
 .../OpenGL/state_tracker/state_bufferobject.c      |    7 +-
 .../GuestHost/OpenGL/state_tracker/state_client.c  |    9 +-
 .../GuestHost/OpenGL/state_tracker/state_current.c |    1 -
 .../GuestHost/OpenGL/state_tracker/state_diff.c    |    6 +-
 .../GuestHost/OpenGL/state_tracker/state_enable.c  |   12 +-
 .../GuestHost/OpenGL/state_tracker/state_fence.c   |   11 +-
 .../OpenGL/state_tracker/state_framebuffer.c       |   22 +-
 .../GuestHost/OpenGL/state_tracker/state_glsl.c    |   17 +-
 .../GuestHost/OpenGL/state_tracker/state_init.c    |   51 +-
 .../GuestHost/OpenGL/state_tracker/state_lists.c   |   11 +-
 .../GuestHost/OpenGL/state_tracker/state_occlude.c |    3 +
 .../OpenGL/state_tracker/state_polygon.txt         |    6 +-
 .../GuestHost/OpenGL/state_tracker/state_program.c |   21 +-
 .../OpenGL/state_tracker/state_snapshot.c          |   13 +-
 .../GuestHost/OpenGL/state_tracker/state_stencil.c |    4 +
 .../GuestHost/OpenGL/state_tracker/state_texdiff.c |    2 +
 .../OpenGL/state_tracker/state_teximage.c          |   32 +-
 .../GuestHost/OpenGL/state_tracker/state_texture.c |    5 +-
 src/VBox/GuestHost/OpenGL/util/VBoxOGLcrutil.rc    |    2 +-
 src/VBox/GuestHost/OpenGL/util/blitter.cpp         |   24 +-
 src/VBox/GuestHost/OpenGL/util/bmpscale.cpp        |    2 +-
 src/VBox/GuestHost/OpenGL/util/bufpool.c           |    6 +-
 src/VBox/GuestHost/OpenGL/util/compositor.cpp      |    6 +-
 src/VBox/GuestHost/OpenGL/util/devnull.c           |    1 +
 src/VBox/GuestHost/OpenGL/util/dll.c               |    8 +-
 src/VBox/GuestHost/OpenGL/util/error.c             |   17 +-
 src/VBox/GuestHost/OpenGL/util/filenet.c           |    1 +
 src/VBox/GuestHost/OpenGL/util/hash.c              |   14 +-
 src/VBox/GuestHost/OpenGL/util/htable.cpp          |   11 +-
 src/VBox/GuestHost/OpenGL/util/list.c              |    5 +-
 src/VBox/GuestHost/OpenGL/util/mem.c               |    2 +
 src/VBox/GuestHost/OpenGL/util/net.c               |   18 +-
 src/VBox/GuestHost/OpenGL/util/net_internals.h     |    4 +-
 src/VBox/GuestHost/OpenGL/util/pixel.c             |    7 +-
 src/VBox/GuestHost/OpenGL/util/process.c           |    2 +-
 src/VBox/GuestHost/OpenGL/util/rand.c              |    4 +
 src/VBox/GuestHost/OpenGL/util/sortarray.cpp       |    4 +-
 src/VBox/GuestHost/OpenGL/util/tcpip.c             |   15 +-
 src/VBox/GuestHost/OpenGL/util/threads.c           |    5 +
 src/VBox/GuestHost/OpenGL/util/timer.c             |    4 +
 src/VBox/GuestHost/OpenGL/util/udptcpip.c          |    6 +-
 src/VBox/GuestHost/OpenGL/util/util.rc             |    2 +-
 src/VBox/GuestHost/OpenGL/util/vboxhgcm.c          |  132 +-
 src/VBox/GuestHost/OpenGL/util/vboxhgsmi.c         |   21 +-
 src/VBox/GuestHost/OpenGL/util/vreg.cpp            |   41 +-
 src/VBox/GuestHost/SharedClipboard/Makefile.kmk    |    2 +-
 .../GuestHost/SharedClipboard/clipboard-helper.cpp |    2 +-
 .../GuestHost/SharedClipboard/x11-clipboard.cpp    |  174 +-
 src/VBox/HostDrivers/Makefile.kmk                  |    6 +-
 src/VBox/HostDrivers/Support/Makefile.kmk          |    4 +-
 src/VBox/HostDrivers/Support/SUPDrv-dtrace.cpp     |   10 +-
 src/VBox/HostDrivers/Support/SUPDrv.cpp            |  563 +--
 src/VBox/HostDrivers/Support/SUPDrvGip.cpp         |   46 +-
 src/VBox/HostDrivers/Support/SUPDrvIDC.h           |    2 +-
 src/VBox/HostDrivers/Support/SUPDrvIOC.h           |    4 +-
 src/VBox/HostDrivers/Support/SUPDrvInternal.h      |   28 +-
 src/VBox/HostDrivers/Support/SUPDrvSem.cpp         |    8 +-
 src/VBox/HostDrivers/Support/SUPDrvTracer.cpp      |    8 +-
 src/VBox/HostDrivers/Support/SUPDrvTracerA.asm     |    2 +-
 src/VBox/HostDrivers/Support/SUPLib.cpp            |   16 +-
 src/VBox/HostDrivers/Support/SUPLibAll.cpp         |    2 +-
 src/VBox/HostDrivers/Support/SUPLibInternal.h      |   12 +-
 src/VBox/HostDrivers/Support/SUPLibLdr.cpp         |    2 +-
 src/VBox/HostDrivers/Support/SUPLibSem.cpp         |    2 +-
 src/VBox/HostDrivers/Support/SUPLibTracerA.asm     |    2 +-
 src/VBox/HostDrivers/Support/SUPR0IdcClient.c      |    2 +-
 .../HostDrivers/Support/SUPR0IdcClientComponent.c  |    2 +-
 .../HostDrivers/Support/SUPR0IdcClientInternal.h   |   25 +-
 src/VBox/HostDrivers/Support/SUPR0IdcClientStubs.c |    4 +-
 src/VBox/HostDrivers/Support/SUPR3HardenedIPRT.cpp |   20 +-
 src/VBox/HostDrivers/Support/SUPR3HardenedMain.cpp |   41 +-
 .../Support/SUPR3HardenedMainTemplate.cpp          |    2 +-
 .../Support/SUPR3HardenedMainTemplateTestcase.cpp  |    2 +-
 .../HostDrivers/Support/SUPR3HardenedNoCrt.cpp     |    4 +-
 .../HostDrivers/Support/SUPR3HardenedVerify.cpp    |   20 +-
 src/VBox/HostDrivers/Support/SUPSvc.cpp            |    2 +-
 src/VBox/HostDrivers/Support/SUPSvcGlobal.cpp      |    2 +-
 src/VBox/HostDrivers/Support/SUPSvcGrant.cpp       |    2 +-
 src/VBox/HostDrivers/Support/SUPSvcInternal.h      |    2 +-
 .../HostDrivers/Support/darwin/SUPDrv-darwin.cpp   |   22 +-
 .../HostDrivers/Support/darwin/SUPLib-darwin.cpp   |    5 +-
 .../Support/darwin/SUPR0IdcClient-darwin.c         |    2 +-
 .../HostDrivers/Support/freebsd/SUPLib-freebsd.cpp |    2 +-
 .../Support/freebsd/SUPR0IdcClient-freebsd.c       |    2 +-
 src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c  |  101 +-
 .../HostDrivers/Support/linux/SUPDrv-linux.mod.c   |    6 +-
 .../HostDrivers/Support/linux/SUPLib-linux.cpp     |    4 +-
 .../Support/linux/SUPR0IdcClient-linux.c           |    2 +-
 src/VBox/HostDrivers/Support/os2/SUPDrv-os2.cpp    |    2 +-
 src/VBox/HostDrivers/Support/os2/SUPDrv-os2.def    |    2 +-
 src/VBox/HostDrivers/Support/os2/SUPLib-os2.cpp    |    2 +-
 .../HostDrivers/Support/os2/SUPR0IdcClient-os2.c   |    2 +-
 .../HostDrivers/Support/solaris/SUPDrv-solaris.c   |    2 +-
 .../HostDrivers/Support/solaris/SUPLib-solaris.cpp |    2 +-
 .../Support/solaris/SUPR0IdcClient-solaris.c       |    2 +-
 src/VBox/HostDrivers/Support/testcase/Makefile.kmk |    2 +-
 .../HostDrivers/Support/testcase/SUPInstall.cpp    |    2 +-
 .../HostDrivers/Support/testcase/SUPLoggerCtl.cpp  |    3 +-
 .../HostDrivers/Support/testcase/SUPUninstall.cpp  |    2 +-
 .../HostDrivers/Support/testcase/tstContiguous.cpp |    2 +-
 src/VBox/HostDrivers/Support/testcase/tstGIP-2.cpp |    2 +-
 .../Support/testcase/tstGetPagingMode.cpp          |    2 +-
 src/VBox/HostDrivers/Support/testcase/tstInit.cpp  |    2 +-
 src/VBox/HostDrivers/Support/testcase/tstInt.cpp   |    2 +-
 src/VBox/HostDrivers/Support/testcase/tstLow.cpp   |    2 +-
 .../Support/testcase/tstNtQueryStuff.cpp           |    2 +-
 src/VBox/HostDrivers/Support/testcase/tstPage.cpp  |    2 +-
 src/VBox/HostDrivers/Support/testcase/tstPin.cpp   |    2 +-
 .../Support/testcase/tstSupLoadModule.cpp          |    4 +-
 .../Support/testcase/tstSupSem-Zombie.cpp          |    2 +-
 .../HostDrivers/Support/testcase/tstSupSem.cpp     |    2 +-
 .../Support/testcase/tstSupTscDelta.cpp            |    2 +-
 .../HostDrivers/Support/testcase/tstSupVerify.cpp  |    6 +-
 src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp    |   69 +-
 src/VBox/HostDrivers/Support/win/SUPDrvA-win.asm   |    2 +-
 .../Support/win/SUPHardenedVerify-win.h            |   12 +-
 .../Support/win/SUPHardenedVerifyImage-win.cpp     |   22 +-
 .../Support/win/SUPHardenedVerifyProcess-win.cpp   |   58 +-
 src/VBox/HostDrivers/Support/win/SUPLib-win.cpp    |   12 +-
 .../HostDrivers/Support/win/SUPR0IdcClient-win.c   |    2 +-
 .../Support/win/SUPR3HardenedMain-win.cpp          |   35 +-
 .../Support/win/SUPR3HardenedMainA-win.asm         |    2 +-
 .../Support/win/SUPR3HardenedMainImports-win.cpp   |    4 +-
 .../Support/win/SUPR3HardenedNoCrt-win.cpp         |    8 +-
 src/VBox/HostDrivers/Support/win/SUPSvc-win.cpp    |    4 +-
 src/VBox/HostDrivers/Support/win/VBoxDrv.inf       |    2 +-
 src/VBox/HostDrivers/Support/win/VBoxDrv.rc        |    2 +-
 .../HostDrivers/Support/win/VBoxSupLib-win.cpp     |    4 +-
 src/VBox/HostDrivers/Support/win/VBoxSupLib.rc     |    2 +-
 src/VBox/HostDrivers/VBoxNetAdp/Makefile.kmk       |    2 +-
 src/VBox/HostDrivers/VBoxNetAdp/VBoxNetAdp.c       |    2 +-
 .../HostDrivers/VBoxNetAdp/VBoxNetAdpInternal.h    |    4 +-
 .../VBoxNetAdp/darwin/VBoxNetAdp-darwin.cpp        |   14 +-
 .../VBoxNetAdp/linux/VBoxNetAdp-linux.c            |    2 +-
 .../VBoxNetAdp/solaris/VBoxNetAdp-solaris.c        |    2 +-
 .../VBoxNetAdp/win}/Makefile.kup                   |    0
 .../HostDrivers/VBoxNetAdp/win/VBoxNetAdp-win.cpp  |   60 +-
 .../HostDrivers/VBoxNetAdp/win/VBoxNetAdp-win.h    |    2 +-
 .../HostDrivers/VBoxNetAdp/win/VBoxNetAdp-win.rc   |    2 +-
 .../HostDrivers/VBoxNetAdp/win/VBoxNetAdp6.inf     |    2 +-
 src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFlt.c       |    6 +-
 src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFlt.rc      |    2 +-
 .../HostDrivers/VBoxNetFlt/VBoxNetFltInternal.h    |    2 +-
 .../VBoxNetFlt/darwin/VBoxNetFlt-darwin.cpp        |   22 +-
 .../VBoxNetFlt/linux/VBoxNetFlt-linux.c            |    2 +-
 .../VBoxNetFlt/solaris/VBoxNetFlt-solaris.c        |    2 +-
 .../VBoxNetFlt/solaris/VBoxNetFltBow-solaris.c     |    2 +-
 .../HostDrivers/VBoxNetFlt/win/cfg/VBoxNetCfg.cpp  |  143 +-
 .../HostDrivers/VBoxNetFlt/win/drv/VBoxNetAdp.inf  |    2 +-
 .../VBoxNetFlt/win/drv/VBoxNetFlt-win.rc           |    2 +-
 .../HostDrivers/VBoxNetFlt/win/drv/VBoxNetFlt.inf  |    2 +-
 .../VBoxNetFlt/win/drv/VBoxNetFltCmn-win.h         |   42 +-
 .../VBoxNetFlt/win/drv/VBoxNetFltM-win.cpp         |   41 +-
 .../VBoxNetFlt/win/drv/VBoxNetFltM-win.h           |    2 +-
 .../HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltM.inf |    2 +-
 .../VBoxNetFlt/win/drv/VBoxNetFltP-win.cpp         |  106 +-
 .../VBoxNetFlt/win/drv/VBoxNetFltP-win.h           |    2 +-
 .../VBoxNetFlt/win/drv/VBoxNetFltRt-win.cpp        |  229 +-
 .../VBoxNetFlt/win/drv/VBoxNetFltRt-win.h          |    2 +-
 .../VBoxNetFlt/win/drv/VBoxNetLwf-win.cpp          |  137 +-
 .../VBoxNetFlt/win/drv/VBoxNetLwf-win.h            |    2 +-
 .../HostDrivers/VBoxNetFlt/win/drv/VBoxNetLwf.inf  |    2 +-
 .../VBoxNetFlt/win/nobj/VBoxNetFltNobj.cpp         |    6 +-
 .../VBoxNetFlt/win/nobj/VBoxNetFltNobj.def         |    2 +-
 .../VBoxNetFlt/win/nobj/VBoxNetFltNobj.h           |    6 +-
 .../VBoxNetFlt/win/nobj/VBoxNetFltNobj.rc          |    2 +-
 .../VBoxNetFlt/win/nobj/VBoxNetFltNobjRc.h         |    2 +-
 .../VBoxNetFlt/win/tools/VBoxNetAdpInstall.cpp     |    2 +-
 .../VBoxNetFlt/win/tools/VBoxNetAdpUninstall.cpp   |    3 +-
 .../VBoxNetFlt/win/tools/VBoxNetFltInstall.cpp     |    3 +-
 .../VBoxNetFlt/win/tools/VBoxNetFltUninstall.cpp   |    3 +-
 .../VBoxNetFlt/win/tools/VBoxNetLwfInstall.cpp     |    3 +-
 .../VBoxNetFlt/win/tools/VBoxNetLwfUninstall.cpp   |    3 +-
 src/VBox/HostDrivers/VBoxPci/Makefile.kmk          |    2 +-
 src/VBox/HostDrivers/VBoxPci/VBoxPci.c             |    2 +-
 src/VBox/HostDrivers/VBoxPci/VBoxPciInternal.h     |    2 +-
 src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c |   12 +-
 src/VBox/HostDrivers/VBoxUSB/Makefile.kmk          |    2 +-
 src/VBox/HostDrivers/VBoxUSB/USBFilter.cpp         |    5 +-
 src/VBox/HostDrivers/VBoxUSB/USBLib.cpp            |    2 +-
 src/VBox/HostDrivers/VBoxUSB/VBoxUSBFilterMgr.cpp  |   12 +-
 src/VBox/HostDrivers/VBoxUSB/VBoxUSBFilterMgr.h    |    2 +-
 src/VBox/HostDrivers/VBoxUSB/darwin/Makefile.kmk   |    2 +-
 .../HostDrivers/VBoxUSB/darwin/USBLib-darwin.cpp   |    2 +-
 src/VBox/HostDrivers/VBoxUSB/darwin/VBoxUSB.cpp    |   39 +-
 .../HostDrivers/VBoxUSB/darwin/VBoxUSBInterface.h  |    2 +-
 .../VBoxUSB/darwin/testcase}/Makefile.kup          |    0
 .../VBoxUSB/darwin/testcase/tstOpenUSBDev.cpp      |   13 +-
 src/VBox/HostDrivers/VBoxUSB/solaris/Makefile.kmk  |    2 +-
 .../HostDrivers/VBoxUSB/solaris/USBLib-solaris.cpp |    2 +-
 .../HostDrivers/VBoxUSB/solaris/VBoxUSB-solaris.c  |    2 +-
 .../VBoxUSB/solaris/VBoxUSBMon-solaris.c           |    2 +-
 .../HostDrivers/VBoxUSB/testcase/tstUSBFilter.cpp  |    2 +-
 .../HostDrivers/VBoxUSB/win/Install/USBInstall.cpp |   14 +-
 .../VBoxUSB/win/Install/USBUninstall.cpp           |   23 +-
 src/VBox/HostDrivers/VBoxUSB/win/Makefile.kmk      |    2 +-
 .../HostDrivers/VBoxUSB/win/cmn/VBoxDrvTool.cpp    |   13 +-
 src/VBox/HostDrivers/VBoxUSB/win/cmn/VBoxDrvTool.h |   41 +-
 src/VBox/HostDrivers/VBoxUSB/win/cmn/VBoxUsbIdc.h  |    2 +-
 .../HostDrivers/VBoxUSB/win/cmn/VBoxUsbTool.cpp    |   10 +-
 src/VBox/HostDrivers/VBoxUSB/win/cmn/VBoxUsbTool.h |    2 +-
 src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUSB.inf   |    2 +-
 src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbCmn.h  |    2 +-
 .../HostDrivers/VBoxUSB/win/dev/VBoxUsbDev.cpp     |   55 +-
 src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbDev.h  |    6 +-
 src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbDev.rc |    2 +-
 .../HostDrivers/VBoxUSB/win/dev/VBoxUsbPnP.cpp     |   42 +-
 src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbPnP.h  |    2 +-
 .../HostDrivers/VBoxUSB/win/dev/VBoxUsbPwr.cpp     |   94 +-
 src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbPwr.h  |    2 +-
 src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbRt.cpp |  230 +-
 src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbRt.h   |    2 +-
 .../HostDrivers/VBoxUSB/win/lib/VBoxUsbLib-win.cpp |  174 +-
 .../HostDrivers/VBoxUSB/win/mon/VBoxUSBMon.inf     |    2 +-
 .../HostDrivers/VBoxUSB/win/mon/VBoxUsbFlt.cpp     |   27 +-
 src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbFlt.h  |   11 +-
 .../HostDrivers/VBoxUSB/win/mon/VBoxUsbHook.cpp    |   17 +-
 src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbHook.h |    2 +-
 .../HostDrivers/VBoxUSB/win/mon/VBoxUsbMon.cpp     |  112 +-
 src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbMon.h  |    2 +-
 src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbMon.rc |    2 +-
 .../HostDrivers/VBoxUSB/win/testcase/USBTest.cpp   |   14 +-
 src/VBox/HostDrivers/VBoxUSB/win/usbd/usbd.def     |    2 +-
 src/VBox/HostDrivers/adpctl/Makefile.kmk           |   29 +
 src/VBox/HostDrivers/adpctl/VBoxNetAdpCtl.cpp      |  487 ++
 src/VBox/HostDrivers/darwin/Makefile.kmk           |    2 +-
 src/VBox/HostDrivers/darwin/VBoxNetSend.h          |    4 +-
 src/VBox/HostDrivers/freebsd/Makefile.kmk          |    2 +-
 src/VBox/HostDrivers/linux/Makefile.kmk            |    2 +-
 src/VBox/HostDrivers/linux/loadall.sh              |    2 +-
 src/VBox/HostDrivers/win/Makefile.kmk              |    2 +-
 src/VBox/HostDrivers/win/VBoxDbgLog.h              |    9 +-
 src/VBox/HostDrivers/win/cfg/VBoxDrvCfg.cpp        |   19 +-
 .../HostServices/DragAndDrop/VBoxDragAndDropSvc.rc |    2 +-
 src/VBox/HostServices/DragAndDrop/dndmanager.h     |    2 +-
 src/VBox/HostServices/DragAndDrop/service.cpp      |    8 +
 src/VBox/HostServices/GuestControl/Makefile.kmk    |    1 -
 .../GuestControl/VBoxGuestControlSvc.rc            |    2 +-
 src/VBox/HostServices/GuestControl/gctrl.cpp       |  230 -
 src/VBox/HostServices/GuestControl/gctrl.h         |   48 -
 src/VBox/HostServices/GuestControl/service.cpp     |   56 +-
 .../GuestControl/testcase/Makefile.kmk             |    3 +-
 .../GuestControl/testcase/tstGuestControlSvc.cpp   |   53 +-
 .../GuestProperties/VBoxGuestPropSvc.rc            |    2 +-
 src/VBox/HostServices/GuestProperties/service.cpp  |  208 +-
 .../GuestProperties/testcase/Makefile.kmk          |    2 +-
 .../GuestProperties/testcase/tstGuestPropSvc.cpp   |   11 +-
 src/VBox/HostServices/HostChannel/HostChannel.cpp  |   11 +-
 src/VBox/HostServices/HostChannel/HostChannel.h    |    2 +-
 src/VBox/HostServices/HostChannel/Makefile.kmk     |    2 +-
 .../HostServices/HostChannel/VBoxHostChannel.rc    |    2 +-
 src/VBox/HostServices/HostChannel/service.cpp      |   11 +-
 src/VBox/HostServices/Makefile.kmk                 |    2 +-
 src/VBox/HostServices/SharedClipboard/Makefile.kmk |    2 +-
 .../SharedClipboard/VBoxClipboard-win.cpp          |  470 +-
 .../HostServices/SharedClipboard/VBoxClipboard.h   |    2 +-
 .../SharedClipboard/VBoxSharedClipboard.rc         |    2 +-
 .../SharedClipboard/darwin-pasteboard.cpp          |    2 +-
 .../SharedClipboard/darwin-pasteboard.h            |    2 +-
 src/VBox/HostServices/SharedClipboard/darwin.cpp   |    2 +-
 src/VBox/HostServices/SharedClipboard/service.cpp  |   16 +-
 .../SharedClipboard/testcase/Makefile.kmk          |    2 +-
 .../testcase/tstClipboardServiceHost.cpp           |    2 +-
 .../HostServices/SharedClipboard/x11-clipboard.cpp |    6 +-
 src/VBox/HostServices/SharedClipboard/x11-stub.cpp |    2 +-
 .../SharedFolders/VBoxSharedFolders.rc             |    2 +-
 src/VBox/HostServices/SharedFolders/mappings.cpp   |    7 +-
 src/VBox/HostServices/SharedFolders/mappings.h     |    2 +-
 src/VBox/HostServices/SharedFolders/service.cpp    |   27 +-
 src/VBox/HostServices/SharedFolders/shfl.h         |    2 +-
 src/VBox/HostServices/SharedFolders/shflhandle.cpp |    2 +-
 src/VBox/HostServices/SharedFolders/shflhandle.h   |    2 +-
 .../SharedFolders/testcase/Makefile.kmk            |    2 +-
 .../testcase/tstSharedFolderService.cpp            |  272 +-
 .../testcase/tstSharedFolderService.h              |    2 +-
 .../SharedFolders/testcase/tstShflCase.cpp         |  165 +-
 .../SharedFolders/testcase/tstShflSizes.cpp        |    2 +-
 src/VBox/HostServices/SharedFolders/teststubs.h    |    2 +-
 src/VBox/HostServices/SharedFolders/vbsf.cpp       |   39 +-
 src/VBox/HostServices/SharedFolders/vbsf.h         |    2 +-
 src/VBox/HostServices/SharedFolders/vbsfpath.cpp   |    8 +-
 src/VBox/HostServices/SharedFolders/vbsfpath.h     |    2 +-
 .../SharedOpenGL/OpenGLTest/OpenGLTest.cpp         |    2 +-
 .../SharedOpenGL/OpenGLTest/OpenGLTestApp.cpp      |    8 +-
 .../SharedOpenGL/OpenGLTest/OpenGLTestDarwin.cpp   |    2 +-
 .../SharedOpenGL/OpenGLTest/VBoxTestOGL.rc         |    2 +-
 .../SharedOpenGL/crserver/VBoxSharedCrOpenGL.rc    |    2 +-
 .../SharedOpenGL/crserver/crservice.cpp            |   11 +-
 .../crserverlib/presenter/display_base.cpp         |    2 +-
 .../crserverlib/presenter/display_composite.cpp    |    2 +-
 .../crserverlib/presenter/display_vrdp.cpp         |    2 +-
 .../crserverlib/presenter/display_window.cpp       |    2 +-
 .../presenter/display_window_rootvr.cpp            |    2 +-
 .../crserverlib/presenter/server_presenter.cpp     |    2 +-
 .../crserverlib/presenter/server_presenter.h       |    2 +-
 .../SharedOpenGL/crserverlib/presenter/window.cpp  |    2 +-
 .../SharedOpenGL/crserverlib/server_boundsinfo.c   |    2 +
 .../SharedOpenGL/crserverlib/server_clip.c         |    1 +
 .../SharedOpenGL/crserverlib/server_framebuffer.c  |    2 +-
 .../SharedOpenGL/crserverlib/server_getshaders.c   |    2 +-
 .../SharedOpenGL/crserverlib/server_glsl.c         |    2 +-
 .../SharedOpenGL/crserverlib/server_main.c         |   10 +-
 .../SharedOpenGL/crserverlib/server_misc.c         |    3 +-
 .../SharedOpenGL/crserverlib/server_muralfbo.cpp   |    2 +-
 .../SharedOpenGL/crserverlib/server_rpw.cpp        |    2 +-
 .../SharedOpenGL/crserverlib/server_texture.c      |    2 +-
 src/VBox/HostServices/SharedOpenGL/dlm/dlm_lists.c |    2 +-
 src/VBox/HostServices/SharedOpenGL/dlm/dlm_state.c |    2 +-
 .../HostServices/SharedOpenGL/expando/expandospu.c |    2 +-
 .../SharedOpenGL/render/VBoxOGLrenderspu.rc        |    2 +-
 .../HostServices/SharedOpenGL/render/renderspu.h   |    2 +-
 .../SharedOpenGL/render/renderspu_cocoa.c          |    2 +-
 .../SharedOpenGL/render/renderspu_cocoa_helper.h   |    2 +-
 .../SharedOpenGL/render/renderspu_wgl.c            |    2 +-
 .../SharedOpenGL/unpacker/unpack_framebuffer.c     |    2 +-
 .../SharedOpenGL/unpacker/unpack_shaders.c         |    2 +-
 .../SharedOpenGL/unpacker/unpack_visibleregion.c   |    2 +-
 src/VBox/HostServices/auth/Makefile.kmk            |    2 +-
 .../auth/directoryservice/directoryservice.cpp     |   88 +-
 src/VBox/HostServices/auth/pam/VBoxAuthPAM.c       |   48 +-
 .../HostServices/auth/simple/VBoxAuthSimple.cpp    |  103 +-
 .../HostServices/auth/simple/VBoxAuthSimple.rc     |    2 +-
 src/VBox/HostServices/auth/winlogon/VBoxAuth.rc    |    2 +-
 src/VBox/HostServices/auth/winlogon/winlogon.cpp   |   69 +-
 src/VBox/HostServices/testcase/Makefile.kmk        |    2 +-
 src/VBox/HostServices/testcase/tstHGCMSvc.cpp      |    2 +-
 src/VBox/ImageMounter/VBoxFUSE/Makefile.kmk        |    2 +-
 src/VBox/ImageMounter/VBoxFUSE/VBoxFUSE.cpp        |    2 +-
 src/VBox/Installer/Config.kmk                      |    2 +-
 src/VBox/Installer/Makefile.kmk                    |    2 +-
 src/VBox/Installer/common/Makefile.kmk             |    2 +-
 src/VBox/Installer/darwin/Makefile.kmk             |    2 +-
 src/VBox/Installer/freebsd/Makefile.kmk            |    2 +-
 src/VBox/Installer/linux/Makefile.kmk              |    2 +-
 src/VBox/Installer/linux/prerm-common.sh           |   16 +-
 src/VBox/Installer/linux/routines.sh               |    4 +-
 src/VBox/Installer/linux/rpm/LocalConfig.kmk       |    2 +-
 src/VBox/Installer/linux/run-inst.sh               |  536 ---
 src/VBox/Installer/linux/testcase/Makefile.kmk     |    2 +-
 src/VBox/Installer/linux/uninstall.sh              |    7 -
 src/VBox/Installer/linux/vboxdrv.sh                |   42 +-
 src/VBox/Installer/solaris/Makefile.kmk            |    6 +-
 src/VBox/Installer/solaris/VBoxISAExec.c           |    2 +-
 src/VBox/Installer/solaris/VBoxZoneAccess.c        |    2 +-
 src/VBox/Installer/solaris/vboxconfig.sh           |    6 +-
 src/VBox/Installer/win/InstallHelper/Makefile.kmk  |    2 +-
 .../Installer/win/InstallHelper/VBoxCommon.cpp     |    4 +-
 src/VBox/Installer/win/InstallHelper/VBoxCommon.h  |    2 +-
 .../win/InstallHelper/VBoxInstallHelper.cpp        |  102 +-
 .../win/InstallHelper/VBoxInstallHelper.def        |    2 +-
 .../win/InstallHelper/VBoxInstallHelper.rc         |    2 +-
 src/VBox/Installer/win/Properties.wxi              |    2 +-
 src/VBox/Installer/win/PublicProperties.wxi        |    2 +-
 src/VBox/Installer/win/Resources/Makefile.kmk      |    2 +-
 src/VBox/Installer/win/Resources/VBoxRes.rc        |    2 +-
 src/VBox/Installer/win/Resources/dummy.cpp         |    2 +-
 src/VBox/Installer/win/Resources/resource.h        |    2 +-
 src/VBox/Installer/win/Stub/Makefile.kmk           |    2 +-
 src/VBox/Installer/win/Stub/VBoxStub.cpp           |  154 +-
 src/VBox/Installer/win/Stub/VBoxStub.h             |    2 +-
 src/VBox/Installer/win/Stub/VBoxStub.rc            |    2 +-
 src/VBox/Installer/win/Stub/VBoxStubCertUtil.cpp   |    4 +-
 src/VBox/Installer/win/Stub/VBoxStubCertUtil.h     |    2 +-
 src/VBox/Installer/win/Stub/resource.h             |    2 +-
 src/VBox/Installer/win/StubBld/Makefile.kmk        |    2 +-
 src/VBox/Installer/win/StubBld/VBoxStubBld.cpp     |   14 +-
 src/VBox/Installer/win/StubBld/VBoxStubBld.h       |    2 +-
 src/VBox/Installer/win/UserInterface.wxi           |    2 +-
 src/VBox/Installer/win/VBoxMergeAppCA.wxi          |    2 +-
 src/VBox/Installer/win/VBoxMergeCOM32On64.wxi      |    2 +-
 src/VBox/Installer/win/VBoxMergeCOM32On64CA.wxi    |    2 +-
 src/VBox/Installer/win/VBoxMergeCOM32On64Seq.wxi   |    2 +-
 src/VBox/Installer/win/VBoxMergeNetAdp.wxi         |    2 +-
 src/VBox/Installer/win/VBoxMergeNetAdp6.wxi        |    2 +-
 src/VBox/Installer/win/VBoxMergeNetAdp6CA.wxi      |    2 +-
 src/VBox/Installer/win/VBoxMergeNetAdp6Seq.wxi     |    2 +-
 src/VBox/Installer/win/VBoxMergeNetAdpCA.wxi       |    2 +-
 src/VBox/Installer/win/VBoxMergeNetAdpSeq.wxi      |    2 +-
 src/VBox/Installer/win/VBoxMergeNetFlt.wxi         |    2 +-
 src/VBox/Installer/win/VBoxMergeNetFltCA.wxi       |    2 +-
 src/VBox/Installer/win/VBoxMergeNetFltSeq.wxi      |    2 +-
 src/VBox/Installer/win/VBoxMergeNetLwf.wxi         |    2 +-
 src/VBox/Installer/win/VBoxMergeNetLwfCA.wxi       |    2 +-
 src/VBox/Installer/win/VBoxMergeNetLwfSeq.wxi      |    2 +-
 src/VBox/Installer/win/VBoxMergePython.wxi         |    2 +-
 src/VBox/Installer/win/VBoxMergePythonCA.wxi       |    2 +-
 src/VBox/Installer/win/VBoxMergePythonSeq.wxi      |    2 +-
 src/VBox/Installer/win/VBoxMergeUSB.wxi            |    2 +-
 src/VBox/Installer/win/VBoxMergeUSBCA.wxi          |    2 +-
 src/VBox/Installer/win/VBoxMergeUSBSeq.wxi         |    2 +-
 src/VBox/Installer/win/VirtualBox_TypeLib.xsl      |    2 +-
 src/VBox/Installer/win/dep.xsl                     |    2 +-
 src/VBox/Installer/win/dep2.xsl                    |    2 +-
 src/VBox/Main/Config.kmk                           |    2 +-
 src/VBox/Main/Docs-Intro.cpp                       |    2 +-
 src/VBox/Main/Makefile.kmk                         |  143 +-
 src/VBox/Main/cbinding/Makefile.kmk                |    2 +-
 src/VBox/Main/cbinding/VBoxCAPI.cpp                |   28 +-
 src/VBox/Main/cbinding/VBoxCAPI.rc                 |    2 +-
 src/VBox/Main/cbinding/VBoxCAPIGlue.c              |    7 +-
 src/VBox/Main/cbinding/VBoxCAPI_v2_2.h             |    2 +-
 src/VBox/Main/cbinding/VBoxCAPI_v3_0.h             |    2 +-
 src/VBox/Main/cbinding/VBoxCAPI_v3_1.h             |    2 +-
 src/VBox/Main/cbinding/VBoxCAPI_v3_2.h             |    2 +-
 src/VBox/Main/cbinding/VBoxCAPI_v4_0.h             |    2 +-
 src/VBox/Main/cbinding/VBoxCAPI_v4_1.h             |    2 +-
 src/VBox/Main/cbinding/VBoxCAPI_v4_2.h             |    2 +-
 src/VBox/Main/cbinding/VBoxCAPI_v4_3.h             |    2 +-
 src/VBox/Main/cbinding/capiidl.xsl                 |    7 +-
 src/VBox/Main/cbinding/tstCAPIGlue.c               |  161 +-
 src/VBox/Main/glue/AutoLock.cpp                    |   18 +-
 src/VBox/Main/glue/ErrorInfo.cpp                   |    2 +-
 src/VBox/Main/glue/EventQueue.cpp                  |    2 +-
 src/VBox/Main/glue/NativeEventQueue.cpp            |    4 +-
 src/VBox/Main/glue/com.cpp                         |    4 +-
 src/VBox/Main/glue/errorprint.cpp                  |    2 +-
 src/VBox/Main/glue/initterm.cpp                    |    4 +-
 src/VBox/Main/glue/string.cpp                      |    2 +-
 src/VBox/Main/glue/vboxapi.py                      |    9 +-
 src/VBox/Main/glue/xpcom/helpers.cpp               |    2 +-
 src/VBox/Main/idl/VirtualBox.xidl                  |    8 +-
 src/VBox/Main/idl/apiwrap-server-filelist.xsl      |    2 +-
 src/VBox/Main/idl/apiwrap-server.xsl               |   11 +-
 src/VBox/Main/idl/docstrip.xsl                     |    2 +-
 src/VBox/Main/idl/doxygen.xsl                      |    2 +-
 src/VBox/Main/idl/midl.xsl                         |   16 +-
 src/VBox/Main/idl/typemap-shared.inc.xsl           |    2 +-
 src/VBox/Main/idl/xpidl.xsl                        |    2 +-
 src/VBox/Main/idl/xpidl_iid.xsl                    |    2 +-
 src/VBox/Main/include/AdditionsFacilityImpl.h      |    2 +-
 src/VBox/Main/include/ApplianceImpl.h              |    2 +-
 src/VBox/Main/include/ApplianceImplPrivate.h       |    4 +-
 src/VBox/Main/include/AudioAdapterImpl.h           |    2 +-
 src/VBox/Main/include/AuthLibrary.h                |    2 +-
 src/VBox/Main/include/AutoCaller.h                 |   18 +-
 src/VBox/Main/include/AutoStateDep.h               |    6 +-
 src/VBox/Main/include/AutostartDb.h                |    2 +-
 src/VBox/Main/include/BandwidthControlImpl.h       |    2 +-
 src/VBox/Main/include/ClientToken.h                |    2 +-
 src/VBox/Main/include/ClientTokenHolder.h          |    2 +-
 src/VBox/Main/include/ConsoleImpl.h                |   16 +-
 src/VBox/Main/include/ConsoleVRDPServer.h          |    2 +-
 src/VBox/Main/include/DisplayImpl.h                |   14 +-
 src/VBox/Main/include/DisplayUtils.h               |    2 +-
 src/VBox/Main/include/DrvAudioVRDE.h               |    2 +-
 src/VBox/Main/include/DrvAudioVRDE_old.h           |   64 -
 src/VBox/Main/include/DrvAudioVideoRec.h           |    2 +-
 src/VBox/Main/include/DrvAudioVideoRec_old.h       |   62 -
 src/VBox/Main/include/EmulatedUSBImpl.h            |    2 +-
 src/VBox/Main/include/EventImpl.h                  |    2 +-
 src/VBox/Main/include/ExtPackManagerImpl.h         |    9 +-
 src/VBox/Main/include/ExtPackUtil.h                |    2 +-
 src/VBox/Main/include/Global.h                     |    4 +-
 src/VBox/Main/include/GuestCtrlImplPrivate.h       |   16 +-
 src/VBox/Main/include/GuestDnDPrivate.h            |    8 +-
 src/VBox/Main/include/GuestDnDSourceImpl.h         |    7 +-
 src/VBox/Main/include/GuestDnDTargetImpl.h         |    7 +-
 src/VBox/Main/include/GuestFileImpl.h              |    2 +-
 src/VBox/Main/include/GuestFsObjInfoImpl.h         |    2 +-
 src/VBox/Main/include/GuestImpl.h                  |    2 +-
 src/VBox/Main/include/GuestOSTypeImpl.h            |    2 +-
 src/VBox/Main/include/GuestProcessImpl.h           |    6 +-
 src/VBox/Main/include/GuestSessionImpl.h           |   62 +-
 src/VBox/Main/include/HGCM.h                       |    2 +-
 src/VBox/Main/include/HGCMObjects.h                |    2 +-
 src/VBox/Main/include/HGCMThread.h                 |    2 +-
 src/VBox/Main/include/HashedPw.h                   |    2 +-
 src/VBox/Main/include/HostHardwareLinux.h          |    2 +-
 src/VBox/Main/include/HostImpl.h                   |    2 +-
 src/VBox/Main/include/HostNetworkInterfaceImpl.h   |    2 +-
 src/VBox/Main/include/HostPower.h                  |    2 +-
 src/VBox/Main/include/HostVideoInputDeviceImpl.h   |    2 +-
 src/VBox/Main/include/KeyboardImpl.h               |    2 +-
 src/VBox/Main/include/Logging.h                    |    2 +-
 src/VBox/Main/include/MachineDebuggerImpl.h        |    3 +-
 src/VBox/Main/include/MachineImplCloneVM.h         |    2 +-
 src/VBox/Main/include/Matching.h                   |    2 +-
 src/VBox/Main/include/MediumFormatImpl.h           |    2 +-
 src/VBox/Main/include/MediumImpl.h                 |    3 -
 src/VBox/Main/include/MediumLock.h                 |    2 +-
 src/VBox/Main/include/MouseImpl.h                  |    2 +-
 src/VBox/Main/include/NetworkServiceRunner.h       |    2 +-
 src/VBox/Main/include/Nvram.h                      |    2 +-
 src/VBox/Main/include/ObjectState.h                |    3 +
 src/VBox/Main/include/PCIRawDevImpl.h              |    3 +-
 src/VBox/Main/include/Performance.h                |    2 +-
 src/VBox/Main/include/PerformanceImpl.h            |   11 +-
 src/VBox/Main/include/ProgressImpl.h               |    5 +-
 src/VBox/Main/include/QMTranslator.h               |    2 +-
 src/VBox/Main/include/RemoteUSBBackend.h           |    2 +-
 src/VBox/Main/include/RemoteUSBDeviceImpl.h        |    2 +-
 src/VBox/Main/include/SecretKeyStore.h             |    2 +-
 src/VBox/Main/include/SharedFolderImpl.h           |    2 +-
 src/VBox/Main/include/SnapshotImpl.h               |    2 +-
 src/VBox/Main/include/StorageControllerImpl.h      |    2 +-
 src/VBox/Main/include/SystemPropertiesImpl.h       |    2 +-
 src/VBox/Main/include/ThreadTask.h                 |   38 +-
 src/VBox/Main/include/TokenImpl.h                  |    2 +-
 src/VBox/Main/include/USBControllerImpl.h          |    2 +-
 src/VBox/Main/include/USBDeviceFiltersImpl.h       |    2 +-
 src/VBox/Main/include/USBDeviceImpl.h              |    2 +-
 src/VBox/Main/include/USBGetDevices.h              |    2 +-
 src/VBox/Main/include/USBIdDatabase.h              |    2 +-
 src/VBox/Main/include/USBProxyBackend.h            |    2 +-
 src/VBox/Main/include/USBProxyService.h            |    2 +-
 src/VBox/Main/include/UsbCardReader.h              |    2 +-
 src/VBox/Main/include/UsbWebcamInterface.h         |    2 +-
 src/VBox/Main/include/VFSExplorerImpl.h            |    2 +-
 src/VBox/Main/include/VMMDev.h                     |    2 +-
 src/VBox/Main/include/VirtualBoxBase.h             |    5 +-
 src/VBox/Main/include/VirtualBoxErrorInfoImpl.h    |    4 +-
 src/VBox/Main/include/VirtualBoxImpl.h             |    7 +-
 src/VBox/Main/include/Wrapper.h                    |    2 +-
 src/VBox/Main/include/netif.h                      |   12 +-
 src/VBox/Main/include/objectslist.h                |    2 +-
 src/VBox/Main/include/ovfreader.h                  |    4 +-
 src/VBox/Main/include/vbox-libhal.h                |    2 +-
 src/VBox/Main/include/vector.h                     |    2 +-
 src/VBox/Main/include/win/resource.h               |    2 +-
 src/VBox/Main/src-all/AuthLibrary.cpp              |    5 +-
 src/VBox/Main/src-all/DisplayPNGUtil.cpp           |    2 +-
 src/VBox/Main/src-all/DisplayResampleImage.cpp     |  205 +-
 src/VBox/Main/src-all/DisplayUtils.cpp             |    8 +-
 src/VBox/Main/src-all/EventImpl.cpp                |    2 +-
 src/VBox/Main/src-all/ExtPackManagerImpl.cpp       |   36 +-
 src/VBox/Main/src-all/ExtPackUtil.cpp              |    2 +-
 src/VBox/Main/src-all/Global.cpp                   |    6 +-
 src/VBox/Main/src-all/HashedPw.cpp                 |    2 +-
 src/VBox/Main/src-all/Logging.cpp                  |    2 +-
 src/VBox/Main/src-all/ProgressImpl.cpp             |    2 +-
 src/VBox/Main/src-all/QMTranslatorImpl.cpp         |    4 +-
 src/VBox/Main/src-all/SecretKeyStore.cpp           |    2 +-
 src/VBox/Main/src-all/SharedFolderImpl.cpp         |    2 +-
 src/VBox/Main/src-all/ThreadTask.cpp               |  115 +-
 src/VBox/Main/src-all/VirtualBoxBase.cpp           |    4 +-
 src/VBox/Main/src-all/VirtualBoxErrorInfoImpl.cpp  |   10 +-
 src/VBox/Main/src-all/win/VBoxProxyStub.c          |    9 +-
 src/VBox/Main/src-all/win/VirtualBox_rgs.xsl       |    2 +-
 src/VBox/Main/src-client/AdditionsFacilityImpl.cpp |    3 +-
 src/VBox/Main/src-client/ClientTokenHolder.cpp     |   11 +-
 src/VBox/Main/src-client/ConsoleImpl.cpp           |  333 +-
 src/VBox/Main/src-client/ConsoleImpl2.cpp          |   67 +-
 src/VBox/Main/src-client/ConsoleImplTeleporter.cpp |   17 +-
 src/VBox/Main/src-client/ConsoleVRDPServer.cpp     |   39 +-
 src/VBox/Main/src-client/DisplayImpl.cpp           |   79 +-
 src/VBox/Main/src-client/DisplayImplLegacy.cpp     |   19 +-
 .../Main/src-client/DisplaySourceBitmapImpl.cpp    |    3 +-
 src/VBox/Main/src-client/DrvAudioVRDE.cpp          |  224 +-
 src/VBox/Main/src-client/DrvAudioVRDE_old.cpp      |  613 ---
 src/VBox/Main/src-client/DrvAudioVideoRec.cpp      |   50 +-
 src/VBox/Main/src-client/DrvAudioVideoRec_old.cpp  |  911 ----
 src/VBox/Main/src-client/EbmlIDs.h                 |  246 +
 src/VBox/Main/src-client/EbmlWriter.cpp            |  264 +-
 src/VBox/Main/src-client/EbmlWriter.h              |   43 +-
 src/VBox/Main/src-client/EmulatedUSBImpl.cpp       |    2 +-
 src/VBox/Main/src-client/GuestCtrlImpl.cpp         |    2 +-
 src/VBox/Main/src-client/GuestCtrlPrivate.cpp      |   69 +-
 src/VBox/Main/src-client/GuestDirectoryImpl.cpp    |    5 +-
 src/VBox/Main/src-client/GuestDnDPrivate.cpp       |   45 +-
 src/VBox/Main/src-client/GuestDnDSourceImpl.cpp    |   61 +-
 src/VBox/Main/src-client/GuestDnDTargetImpl.cpp    |   75 +-
 src/VBox/Main/src-client/GuestFileImpl.cpp         |   71 +-
 src/VBox/Main/src-client/GuestFsObjInfoImpl.cpp    |    2 +-
 src/VBox/Main/src-client/GuestImpl.cpp             |    8 +-
 src/VBox/Main/src-client/GuestProcessImpl.cpp      |  121 +-
 src/VBox/Main/src-client/GuestSessionImpl.cpp      |  100 +-
 src/VBox/Main/src-client/GuestSessionImplTasks.cpp |  187 +-
 src/VBox/Main/src-client/HGCM.cpp                  |    4 +-
 src/VBox/Main/src-client/HGCMObjects.cpp           |    2 +-
 src/VBox/Main/src-client/HGCMThread.cpp            |    2 +-
 src/VBox/Main/src-client/KeyboardImpl.cpp          |    5 +-
 src/VBox/Main/src-client/MachineDebuggerImpl.cpp   |   75 +-
 src/VBox/Main/src-client/MouseImpl.cpp             |    3 +-
 src/VBox/Main/src-client/Nvram.cpp                 |    3 +-
 src/VBox/Main/src-client/PCIRawDevImpl.cpp         |   13 +-
 src/VBox/Main/src-client/RemoteUSBBackend.cpp      |    8 +-
 src/VBox/Main/src-client/RemoteUSBDeviceImpl.cpp   |    2 +-
 src/VBox/Main/src-client/SessionImpl.cpp           |   31 +-
 src/VBox/Main/src-client/USBDeviceImpl.cpp         |    2 +-
 src/VBox/Main/src-client/UsbCardReader.cpp         |   22 +-
 src/VBox/Main/src-client/UsbWebcamInterface.cpp    |   73 +-
 src/VBox/Main/src-client/VMMDevInterface.cpp       |   12 +-
 src/VBox/Main/src-client/VideoRec.cpp              |  100 +-
 src/VBox/Main/src-client/VideoRec.h                |    2 +-
 src/VBox/Main/src-client/win/VBoxC.def             |    2 +-
 src/VBox/Main/src-client/win/VBoxC.rc              |    2 +-
 src/VBox/Main/src-client/win/VBoxClient-x86.def    |    2 +-
 src/VBox/Main/src-client/win/VBoxClient-x86.rc     |    2 +-
 .../Main/src-helper-apps/VBoxExtPackHelperApp.cpp  |   24 +-
 .../Main/src-helper-apps/VBoxExtPackHelperApp.rc   |    2 +-
 src/VBox/Main/src-helper-apps/VBoxVolInfo.cpp      |    2 +-
 src/VBox/Main/src-server/ApplianceImpl.cpp         |   24 +-
 src/VBox/Main/src-server/ApplianceImplExport.cpp   |   51 +-
 src/VBox/Main/src-server/ApplianceImplIO.cpp       |    2 +-
 src/VBox/Main/src-server/ApplianceImplImport.cpp   |   16 +-
 src/VBox/Main/src-server/AudioAdapterImpl.cpp      |    4 +-
 src/VBox/Main/src-server/BandwidthControlImpl.cpp  |    2 +-
 src/VBox/Main/src-server/ClientToken.cpp           |    2 +-
 src/VBox/Main/src-server/GuestOSTypeImpl.cpp       |    2 +-
 src/VBox/Main/src-server/HostDnsService.cpp        |    2 +-
 src/VBox/Main/src-server/HostDnsService.h          |    2 +-
 .../Main/src-server/HostDnsServiceResolvConf.cpp   |    2 +-
 src/VBox/Main/src-server/HostImpl.cpp              |   13 +-
 .../Main/src-server/HostNetworkInterfaceImpl.cpp   |    2 +-
 src/VBox/Main/src-server/HostPower.cpp             |    2 +-
 src/VBox/Main/src-server/HostUSBDeviceImpl.cpp     |    3 +-
 .../Main/src-server/HostVideoInputDeviceImpl.cpp   |   64 +-
 src/VBox/Main/src-server/MachineImpl.cpp           |   24 +-
 src/VBox/Main/src-server/Matching.cpp              |    2 +-
 src/VBox/Main/src-server/MediumImpl.cpp            |  340 +-
 src/VBox/Main/src-server/MediumLock.cpp            |    2 +-
 src/VBox/Main/src-server/NetworkAdapterImpl.cpp    |    2 +-
 src/VBox/Main/src-server/NetworkServiceRunner.cpp  |    2 +-
 src/VBox/Main/src-server/Performance.cpp           |    6 +-
 src/VBox/Main/src-server/PerformanceImpl.cpp       |   10 +-
 src/VBox/Main/src-server/ProgressProxyImpl.cpp     |    2 +-
 src/VBox/Main/src-server/SnapshotImpl.cpp          |    6 +-
 src/VBox/Main/src-server/StorageControllerImpl.cpp |    1 +
 src/VBox/Main/src-server/SystemPropertiesImpl.cpp  |    6 +-
 src/VBox/Main/src-server/TokenImpl.cpp             |    2 +-
 src/VBox/Main/src-server/USBDeviceFilterImpl.cpp   |   28 +-
 src/VBox/Main/src-server/USBProxyBackend.cpp       |    2 +-
 src/VBox/Main/src-server/VFSExplorerImpl.cpp       |   96 +-
 src/VBox/Main/src-server/VRDEServerImpl.cpp        |    6 +-
 src/VBox/Main/src-server/VirtualBoxImpl.cpp        |   83 +-
 .../src-server/darwin/HostDnsServiceDarwin.cpp     |    2 +-
 .../Main/src-server/darwin/HostPowerDarwin.cpp     |    2 +-
 src/VBox/Main/src-server/darwin/NetIf-darwin.cpp   |    2 +-
 .../Main/src-server/darwin/PerformanceDarwin.cpp   |    4 +-
 .../src-server/darwin/USBProxyBackendDarwin.cpp    |    2 +-
 src/VBox/Main/src-server/darwin/iokit.cpp          |   30 +-
 src/VBox/Main/src-server/darwin/iokit.h            |    2 +-
 .../src-server/freebsd/HostHardwareFreeBSD.cpp     |    2 +-
 src/VBox/Main/src-server/freebsd/NetIf-freebsd.cpp |    2 +-
 .../Main/src-server/freebsd/PerformanceFreeBSD.cpp |    4 +-
 .../src-server/freebsd/USBProxyBackendFreeBSD.cpp  |    2 +-
 .../src-server/generic/AutostartDb-generic.cpp     |    4 +-
 src/VBox/Main/src-server/generic/NetIf-generic.cpp |    2 +-
 .../src-server/generic/USBProxyBackendUsbIp.cpp    |    6 +-
 .../Main/src-server/linux/HostDnsServiceLinux.cpp  |    2 +-
 .../Main/src-server/linux/HostHardwareLinux.cpp    |    4 +-
 src/VBox/Main/src-server/linux/HostPowerLinux.cpp  |    2 +-
 src/VBox/Main/src-server/linux/NetIf-linux.cpp     |    2 +-
 .../Main/src-server/linux/PerformanceLinux.cpp     |    4 +-
 src/VBox/Main/src-server/linux/USBGetDevices.cpp   |  260 +-
 .../Main/src-server/linux/USBProxyBackendLinux.cpp |    2 +-
 src/VBox/Main/src-server/linux/vbox-libhal.cpp     |    2 +-
 src/VBox/Main/src-server/os2/NetIf-os2.cpp         |    2 +-
 src/VBox/Main/src-server/os2/PerformanceOs2.cpp    |    2 +-
 .../Main/src-server/os2/USBProxyBackendOs2.cpp     |    2 +-
 .../Main/src-server/solaris/DynLoadLibSolaris.cpp  |    2 +-
 .../Main/src-server/solaris/DynLoadLibSolaris.h    |    2 +-
 src/VBox/Main/src-server/solaris/NetIf-solaris.cpp |    2 +-
 .../src-server/solaris/USBProxyBackendSolaris.cpp  |   15 +-
 src/VBox/Main/src-server/win/HostDnsServiceWin.cpp |    8 +-
 src/VBox/Main/src-server/win/HostPowerWin.cpp      |    9 +-
 src/VBox/Main/src-server/win/NetIf-win.cpp         |   68 +-
 src/VBox/Main/src-server/win/PerformanceWin.cpp    |    6 +-
 .../Main/src-server/win/USBProxyBackendWindows.cpp |    2 +-
 src/VBox/Main/src-server/win/VBoxComEvents.cpp     |  125 -
 src/VBox/Main/src-server/win/VBoxComEvents.h       |   87 -
 src/VBox/Main/src-server/win/svchlp.cpp            |    2 +-
 src/VBox/Main/src-server/win/svchlp.h              |    4 +-
 src/VBox/Main/src-server/win/svcmain.cpp           |  191 +-
 src/VBox/Main/src-server/xpcom/server.cpp          |    4 +-
 src/VBox/Main/src-server/xpcom/server.h            |    2 +-
 src/VBox/Main/src-server/xpcom/server_module.cpp   |    5 +-
 src/VBox/Main/testcase/Makefile.kmk                |    2 +-
 src/VBox/Main/testcase/tstAPI.cpp                  |    6 +-
 src/VBox/Main/testcase/tstCollector.cpp            |    8 +-
 src/VBox/Main/testcase/tstGuestCtrlContextID.cpp   |    2 +-
 src/VBox/Main/testcase/tstGuestCtrlParseBuffer.cpp |  115 +-
 src/VBox/Main/testcase/tstGuid.cpp                 |    2 +-
 src/VBox/Main/testcase/tstUSBLinux.h               |    2 +-
 src/VBox/Main/testcase/tstUSBProxyLinux.cpp        |    2 +-
 src/VBox/Main/testcase/tstVBoxAPI.cpp              |    4 +-
 src/VBox/Main/testcase/tstVBoxAPIPerf.cpp          |    2 +-
 src/VBox/Main/testcase/tstVBoxAPIWin.cpp           |   55 +-
 src/VBox/Main/testcase/tstVBoxAPIXPCOM.cpp         |    4 +-
 src/VBox/Main/testcase/tstVBoxMultipleVM.cpp       |  198 +-
 src/VBox/Main/webservice/Makefile.kmk              |  134 +-
 src/VBox/Main/webservice/VBoxWebSrv.rc             |    2 +-
 src/VBox/Main/webservice/platform-xidl.xsl         |    2 +-
 .../Main/webservice/samples/python/clienttest.py   |    2 +-
 src/VBox/Main/webservice/split-soapC.cpp           |  307 +-
 src/VBox/Main/webservice/stdsoap2.sed              |   21 +
 src/VBox/Main/webservice/vboxweb.cpp               |   41 +-
 src/VBox/Main/webservice/websrv-cpp.xsl            |    2 +-
 src/VBox/Main/webservice/websrv-nsmap.xsl          |    2 +-
 src/VBox/Main/webservice/websrv-php.xsl            |    4 +-
 src/VBox/Main/webservice/websrv-typemap.xsl        |    2 +-
 src/VBox/Main/webservice/websrv-wsdl-service.xsl   |    2 +-
 src/VBox/Main/webservice/websrv-wsdl.xsl           |    2 +-
 src/VBox/Main/webservice/websrv-wsdl2gsoapH.xsl    |    2 +-
 src/VBox/Main/webservice/webtest.cpp               |    2 +-
 src/VBox/Main/xml/Settings.cpp                     |  198 +-
 src/VBox/Main/xml/ovfreader.cpp                    |    4 +-
 src/VBox/Makefile.kmk                              |    4 +-
 src/VBox/NetworkServices/DHCP/ClientDataInt.h      |    2 +-
 src/VBox/NetworkServices/DHCP/Config.cpp           |   26 +-
 src/VBox/NetworkServices/DHCP/Config.h             |    9 +-
 src/VBox/NetworkServices/DHCP/Makefile.kmk         |    2 +-
 .../NetworkServices/DHCP/NetworkManagerDhcp.cpp    |   25 +-
 src/VBox/NetworkServices/DHCP/VBoxNetDHCP.cpp      |  229 +-
 src/VBox/NetworkServices/DHCP/VBoxNetDHCP.rc       |    2 +-
 .../NetworkServices/DHCP/VBoxNetDHCPHardened.cpp   |    2 +-
 src/VBox/NetworkServices/Makefile.kmk              |    2 +-
 src/VBox/NetworkServices/NAT/Makefile.kmk          |  245 +-
 src/VBox/NetworkServices/NAT/RTWinPoll.cpp         |   12 +-
 src/VBox/NetworkServices/NAT/RTWinSocketPair.cpp   |    6 +-
 src/VBox/NetworkServices/NAT/VBoxNetLwipNAT.cpp    |   46 +-
 src/VBox/NetworkServices/NAT/VBoxNetNAT.rc         |    2 +-
 .../NetworkServices/NAT/VBoxNetNATHardened.cpp     |    2 +-
 src/VBox/NetworkServices/NAT/dhcp6.h               |    2 +-
 src/VBox/NetworkServices/NAT/fwtcp.c               |    4 +-
 src/VBox/NetworkServices/NAT/fwudp.c               |    7 +-
 src/VBox/NetworkServices/NAT/lwipopts.h            |    8 +-
 src/VBox/NetworkServices/NAT/portfwd.c             |    2 +-
 src/VBox/NetworkServices/NAT/portfwd.h             |    2 +-
 src/VBox/NetworkServices/NAT/proxy.c               |   14 +-
 src/VBox/NetworkServices/NAT/proxy.h               |    9 +-
 src/VBox/NetworkServices/NAT/proxy_dhcp6ds.c       |    9 +-
 src/VBox/NetworkServices/NAT/proxy_pollmgr.c       |   19 +-
 src/VBox/NetworkServices/NAT/proxy_pollmgr.h       |    2 +-
 src/VBox/NetworkServices/NAT/proxy_rtadvd.c        |    2 +-
 src/VBox/NetworkServices/NAT/proxy_tftpd.c         |   25 +-
 src/VBox/NetworkServices/NAT/pxdns.c               |   20 +-
 src/VBox/NetworkServices/NAT/pxping.c              |   14 +-
 src/VBox/NetworkServices/NAT/pxping_win.c          |   27 +-
 src/VBox/NetworkServices/NAT/pxremap.c             |    2 +-
 src/VBox/NetworkServices/NAT/pxremap.h             |    2 +-
 src/VBox/NetworkServices/NAT/pxtcp.c               |   11 +-
 src/VBox/NetworkServices/NAT/pxtcp.h               |    2 +-
 src/VBox/NetworkServices/NAT/pxudp.c               |   13 +-
 src/VBox/NetworkServices/NAT/rtmon_bsd.c           |    2 +-
 src/VBox/NetworkServices/NAT/rtmon_linux.c         |    2 +-
 src/VBox/NetworkServices/NAT/rtmon_win.c           |    2 +-
 src/VBox/NetworkServices/NAT/tftp.h                |    2 +-
 src/VBox/NetworkServices/NAT/winpoll.h             |    2 +-
 src/VBox/NetworkServices/NAT/winutils.h            |    8 +-
 src/VBox/NetworkServices/NetLib/ComHostUtils.cpp   |    6 +-
 src/VBox/NetworkServices/NetLib/VBoxNetARP.cpp     |    2 +-
 .../NetworkServices/NetLib/VBoxNetBaseService.cpp  |   40 +-
 .../NetworkServices/NetLib/VBoxNetBaseService.h    |    4 +-
 src/VBox/NetworkServices/NetLib/VBoxNetIntIf.cpp   |    4 +-
 src/VBox/NetworkServices/NetLib/VBoxNetLib.h       |    2 +-
 .../NetLib/VBoxNetPortForwardString.cpp            |  127 +-
 src/VBox/NetworkServices/NetLib/VBoxNetUDP.cpp     |    2 +-
 .../NetworkServices/NetLib/VBoxPortForwardString.h |    4 +-
 src/VBox/NetworkServices/NetLib/cpp/utils.h        |   34 +-
 src/VBox/NetworkServices/NetLib/shared_ptr.h       |    2 +-
 src/VBox/NetworkServices/NetLib/utils.h            |    4 +-
 src/VBox/RDP/client-1.8.3/Makefile.kmk             |    2 +-
 src/VBox/Runtime/Doxyfile                          |    1 +
 src/VBox/Runtime/Makefile.kmk                      |  113 +-
 src/VBox/Runtime/VBox/RTAssertShouldPanic-vbox.cpp |    2 +-
 src/VBox/Runtime/VBox/VBoxRTDeps.cpp               |    7 +-
 src/VBox/Runtime/VBox/VBoxRTImp.def                |    2 +-
 src/VBox/Runtime/VBox/dbus.cpp                     |    2 +-
 src/VBox/Runtime/VBox/errmsgvboxcom.xsl            |   10 +-
 src/VBox/Runtime/VBox/log-vbox.cpp                 |  280 +-
 src/VBox/Runtime/VBox/logbackdoor-redirect.cpp     |    2 +-
 src/VBox/Runtime/VBox/logbackdoor.cpp              |    7 +-
 src/VBox/Runtime/common/alloc/alloc.cpp            |    2 +-
 src/VBox/Runtime/common/alloc/heapoffset.cpp       |   10 +-
 src/VBox/Runtime/common/alloc/heapsimple.cpp       |    6 +-
 src/VBox/Runtime/common/alloc/memcache.cpp         |    2 +-
 src/VBox/Runtime/common/alloc/memtracker.cpp       |    2 +-
 .../Runtime/common/asm/ASMAtomicCmpXchgExU64.asm   |    2 +-
 .../Runtime/common/asm/ASMAtomicCmpXchgU16.asm     |    2 +-
 .../Runtime/common/asm/ASMAtomicCmpXchgU64.asm     |    2 +-
 src/VBox/Runtime/common/asm/ASMAtomicCmpXchgU8.asm |    2 +-
 src/VBox/Runtime/common/asm/ASMAtomicReadU64.asm   |    2 +-
 src/VBox/Runtime/common/asm/ASMAtomicUoAndU32.asm  |    2 +-
 src/VBox/Runtime/common/asm/ASMAtomicUoAndU64.asm  |    2 +-
 src/VBox/Runtime/common/asm/ASMAtomicUoDecU32.asm  |    2 +-
 src/VBox/Runtime/common/asm/ASMAtomicUoIncU32.asm  |    2 +-
 src/VBox/Runtime/common/asm/ASMAtomicUoOrU32.asm   |    2 +-
 src/VBox/Runtime/common/asm/ASMAtomicUoOrU64.asm   |    2 +-
 src/VBox/Runtime/common/asm/ASMAtomicUoReadU64.asm |    2 +-
 src/VBox/Runtime/common/asm/ASMAtomicXchgU16.asm   |    2 +-
 src/VBox/Runtime/common/asm/ASMAtomicXchgU64.asm   |    2 +-
 src/VBox/Runtime/common/asm/ASMBitFirstClear.asm   |    2 +-
 src/VBox/Runtime/common/asm/ASMBitFirstSet.asm     |    2 +-
 src/VBox/Runtime/common/asm/ASMBitNextClear.asm    |    2 +-
 src/VBox/Runtime/common/asm/ASMBitNextSet.asm      |    2 +-
 src/VBox/Runtime/common/asm/ASMCpuIdExSlow.asm     |    2 +-
 src/VBox/Runtime/common/asm/ASMCpuId_Idx_ECX.asm   |    2 +-
 src/VBox/Runtime/common/asm/ASMGetGDTR.asm         |    2 +-
 src/VBox/Runtime/common/asm/ASMGetIDTR.asm         |    2 +-
 src/VBox/Runtime/common/asm/ASMGetIdtrLimit.asm    |    2 +-
 src/VBox/Runtime/common/asm/ASMGetLDTR.asm         |    2 +-
 src/VBox/Runtime/common/asm/ASMGetSegAttr.asm      |    2 +-
 src/VBox/Runtime/common/asm/ASMGetTR.asm           |    2 +-
 src/VBox/Runtime/common/asm/ASMGetXcr0.asm         |    2 +-
 .../common/asm/ASMMemFirstMismatchingU8.asm        |    2 +-
 .../Runtime/common/asm/ASMMultU32ByU32DivByU32.asm |    2 +-
 .../Runtime/common/asm/ASMMultU64ByU32DivByU32.asm |    2 +-
 src/VBox/Runtime/common/asm/ASMNopPause.asm        |    2 +-
 src/VBox/Runtime/common/asm/ASMRdMsrEx.asm         |    2 +-
 src/VBox/Runtime/common/asm/ASMSetGDTR.asm         |    2 +-
 src/VBox/Runtime/common/asm/ASMSetIDTR.asm         |    2 +-
 src/VBox/Runtime/common/asm/ASMSetXcr0.asm         |    2 +-
 src/VBox/Runtime/common/asm/ASMWrMsrEx.asm         |    2 +-
 src/VBox/Runtime/common/asm/ASMXRstor.asm          |    2 +-
 src/VBox/Runtime/common/asm/ASMXSave.asm           |    2 +-
 src/VBox/Runtime/common/asm/asm-fake.cpp           |    2 +-
 src/VBox/Runtime/common/asn1/asn1-basics.cpp       |    4 +-
 src/VBox/Runtime/common/asn1/asn1-cursor.cpp       |   10 +-
 .../Runtime/common/asn1/asn1-default-allocator.cpp |    5 +-
 src/VBox/Runtime/common/asn1/asn1-dump.cpp         |    2 +-
 .../Runtime/common/asn1/asn1-efence-allocator.cpp  |    5 +-
 src/VBox/Runtime/common/asn1/asn1-encode.cpp       |    5 +-
 .../common/asn1/asn1-ut-bitstring-decode.cpp       |    2 +-
 .../common/asn1/asn1-ut-bitstring-template.h       |    2 +-
 src/VBox/Runtime/common/asn1/asn1-ut-bitstring.cpp |    3 +-
 .../Runtime/common/asn1/asn1-ut-boolean-decode.cpp |    2 +-
 .../Runtime/common/asn1/asn1-ut-boolean-template.h |    2 +-
 src/VBox/Runtime/common/asn1/asn1-ut-boolean.cpp   |    6 +-
 .../Runtime/common/asn1/asn1-ut-core-decode.cpp    |    3 +-
 .../Runtime/common/asn1/asn1-ut-core-template.h    |    2 +-
 src/VBox/Runtime/common/asn1/asn1-ut-core.cpp      |    5 +-
 .../Runtime/common/asn1/asn1-ut-dyntype-decode.cpp |    4 +-
 src/VBox/Runtime/common/asn1/asn1-ut-dyntype.cpp   |    3 +-
 .../Runtime/common/asn1/asn1-ut-integer-decode.cpp |    2 +-
 .../Runtime/common/asn1/asn1-ut-integer-template.h |    2 +-
 src/VBox/Runtime/common/asn1/asn1-ut-integer.cpp   |    3 +
 .../Runtime/common/asn1/asn1-ut-null-decode.cpp    |    2 +-
 src/VBox/Runtime/common/asn1/asn1-ut-null.cpp      |    7 +-
 .../Runtime/common/asn1/asn1-ut-objid-decode.cpp   |   17 +-
 .../Runtime/common/asn1/asn1-ut-objid-template.h   |    2 +-
 src/VBox/Runtime/common/asn1/asn1-ut-objid.cpp     |    7 +-
 .../common/asn1/asn1-ut-octetstring-decode.cpp     |    2 +-
 .../common/asn1/asn1-ut-octetstring-template.h     |    2 +-
 .../Runtime/common/asn1/asn1-ut-octetstring.cpp    |    3 +-
 .../Runtime/common/asn1/asn1-ut-string-decode.cpp  |    2 +-
 .../Runtime/common/asn1/asn1-ut-string-template.h  |    2 +-
 .../Runtime/common/asn1/asn1-ut-string-template2.h |    2 +-
 src/VBox/Runtime/common/asn1/asn1-ut-string.cpp    |   13 +-
 .../Runtime/common/asn1/asn1-ut-time-decode.cpp    |    4 +-
 .../Runtime/common/asn1/asn1-ut-time-template.h    |    2 +-
 .../Runtime/common/asn1/asn1-ut-time-template2.h   |    2 +-
 src/VBox/Runtime/common/asn1/asn1-ut-time.cpp      |    6 +-
 src/VBox/Runtime/common/asn1/oiddb2c.cpp           |    2 +-
 src/VBox/Runtime/common/checksum/RTSha1Digest.cpp  |    2 +-
 .../Runtime/common/checksum/RTSha256Digest.cpp     |    2 +-
 src/VBox/Runtime/common/checksum/adler32.cpp       |    2 +-
 src/VBox/Runtime/common/checksum/alt-md2.cpp       |    2 +-
 src/VBox/Runtime/common/checksum/alt-md5.cpp       |    2 +-
 src/VBox/Runtime/common/checksum/alt-sha1.cpp      |    2 +-
 src/VBox/Runtime/common/checksum/alt-sha256.cpp    |    2 +-
 src/VBox/Runtime/common/checksum/alt-sha512.cpp    |    2 +-
 src/VBox/Runtime/common/checksum/crc32-zlib.cpp    |    2 +-
 src/VBox/Runtime/common/checksum/crc32.cpp         |    2 +-
 src/VBox/Runtime/common/checksum/crc32c.cpp        |   18 +-
 src/VBox/Runtime/common/checksum/crc64.cpp         |    2 +-
 src/VBox/Runtime/common/checksum/ipv4.cpp          |    2 +-
 src/VBox/Runtime/common/checksum/ipv6.cpp          |    2 +-
 src/VBox/Runtime/common/checksum/manifest-file.cpp |    2 +-
 src/VBox/Runtime/common/checksum/manifest.cpp      |    2 +-
 src/VBox/Runtime/common/checksum/manifest2.cpp     |    5 +-
 src/VBox/Runtime/common/checksum/manifest3.cpp     |    2 +-
 src/VBox/Runtime/common/checksum/md2str.cpp        |    2 +-
 src/VBox/Runtime/common/checksum/md5str.cpp        |    2 +-
 src/VBox/Runtime/common/checksum/openssl-md2.cpp   |    2 +-
 src/VBox/Runtime/common/checksum/openssl-md5.cpp   |    2 +-
 src/VBox/Runtime/common/checksum/openssl-sha1.cpp  |    2 +-
 .../Runtime/common/checksum/openssl-sha256.cpp     |    2 +-
 .../Runtime/common/checksum/openssl-sha512.cpp     |    2 +-
 src/VBox/Runtime/common/checksum/sha1str.cpp       |    2 +-
 src/VBox/Runtime/common/checksum/sha224str.cpp     |    2 +-
 src/VBox/Runtime/common/checksum/sha256str.cpp     |    2 +-
 src/VBox/Runtime/common/checksum/sha384str.cpp     |    2 +-
 src/VBox/Runtime/common/checksum/sha512str.cpp     |    2 +-
 src/VBox/Runtime/common/checksum/sha512t224str.cpp |    2 +-
 src/VBox/Runtime/common/checksum/sha512t256str.cpp |    2 +-
 .../crypto/RTCrStoreCertAddFromJavaKeyStore.cpp    |    2 +-
 ...RTCrStoreCertAddWantedFromFishingExpedition.cpp |    3 +-
 .../common/crypto/RTCrStoreCertExportAsPem.cpp     |    2 +-
 src/VBox/Runtime/common/crypto/digest-builtin.cpp  |   15 +-
 src/VBox/Runtime/common/crypto/digest-core.cpp     |    2 +-
 src/VBox/Runtime/common/crypto/iprt-openssl.cpp    |    2 +-
 src/VBox/Runtime/common/crypto/pemfile.cpp         |    4 +-
 .../Runtime/common/crypto/pkcs7-asn1-decoder.cpp   |    3 +-
 src/VBox/Runtime/common/crypto/pkcs7-core.cpp      |    2 +-
 src/VBox/Runtime/common/crypto/pkcs7-init.cpp      |    2 +-
 src/VBox/Runtime/common/crypto/pkcs7-internal.h    |    2 +-
 src/VBox/Runtime/common/crypto/pkcs7-sanity.cpp    |   67 +-
 src/VBox/Runtime/common/crypto/pkcs7-template.h    |    2 +-
 src/VBox/Runtime/common/crypto/pkcs7-verify.cpp    |    6 +-
 .../common/crypto/pkix-signature-builtin.cpp       |    2 +-
 .../Runtime/common/crypto/pkix-signature-builtin.h |    2 +-
 .../Runtime/common/crypto/pkix-signature-core.cpp  |    2 +-
 .../Runtime/common/crypto/pkix-signature-rsa.cpp   |   10 +-
 src/VBox/Runtime/common/crypto/pkix-util.cpp       |    2 +-
 src/VBox/Runtime/common/crypto/pkix-verify.cpp     |    2 +-
 .../Runtime/common/crypto/rsa-asn1-decoder.cpp     |    2 +-
 src/VBox/Runtime/common/crypto/rsa-core.cpp        |    2 +-
 src/VBox/Runtime/common/crypto/rsa-init.cpp        |    2 +-
 src/VBox/Runtime/common/crypto/rsa-internal.h      |    2 +-
 src/VBox/Runtime/common/crypto/rsa-sanity.cpp      |    2 +-
 src/VBox/Runtime/common/crypto/rsa-template.h      |    2 +-
 .../Runtime/common/crypto/spc-asn1-decoder.cpp     |    4 +-
 src/VBox/Runtime/common/crypto/spc-core.cpp        |    2 +-
 src/VBox/Runtime/common/crypto/spc-init.cpp        |    2 +-
 src/VBox/Runtime/common/crypto/spc-internal.h      |    2 +-
 src/VBox/Runtime/common/crypto/spc-sanity.cpp      |    2 +-
 src/VBox/Runtime/common/crypto/spc-template.h      |    2 +-
 .../Runtime/common/crypto/store-cert-add-basic.cpp |    4 +-
 src/VBox/Runtime/common/crypto/store-inmem.cpp     |    4 +-
 src/VBox/Runtime/common/crypto/store-internal.h    |    2 +-
 src/VBox/Runtime/common/crypto/store.cpp           |    4 +-
 .../Runtime/common/crypto/taf-asn1-decoder.cpp     |    2 +-
 src/VBox/Runtime/common/crypto/taf-core.cpp        |    2 +-
 src/VBox/Runtime/common/crypto/taf-init.cpp        |    2 +-
 src/VBox/Runtime/common/crypto/taf-internal.h      |    2 +-
 src/VBox/Runtime/common/crypto/taf-sanity.cpp      |    2 +-
 src/VBox/Runtime/common/crypto/taf-template.h      |    2 +-
 .../Runtime/common/crypto/tsp-asn1-decoder.cpp     |    2 +-
 src/VBox/Runtime/common/crypto/tsp-core.cpp        |    2 +-
 src/VBox/Runtime/common/crypto/tsp-init.cpp        |    2 +-
 src/VBox/Runtime/common/crypto/tsp-internal.h      |    2 +-
 src/VBox/Runtime/common/crypto/tsp-sanity.cpp      |    2 +-
 src/VBox/Runtime/common/crypto/tsp-template.h      |    2 +-
 .../Runtime/common/crypto/x509-asn1-decoder.cpp    |    4 +-
 src/VBox/Runtime/common/crypto/x509-certpaths.cpp  |    6 +-
 src/VBox/Runtime/common/crypto/x509-core.cpp       |    2 +-
 src/VBox/Runtime/common/crypto/x509-file.cpp       |    2 +-
 src/VBox/Runtime/common/crypto/x509-init.cpp       |    2 +-
 src/VBox/Runtime/common/crypto/x509-internal.h     |    2 +-
 src/VBox/Runtime/common/crypto/x509-sanity.cpp     |   11 +-
 src/VBox/Runtime/common/crypto/x509-template.h     |    2 +-
 src/VBox/Runtime/common/crypto/x509-verify.cpp     |    2 +-
 src/VBox/Runtime/common/dbg/dbg.cpp                |    2 +-
 src/VBox/Runtime/common/dbg/dbgas.cpp              |    2 +-
 src/VBox/Runtime/common/dbg/dbgcfg.cpp             |   24 +-
 src/VBox/Runtime/common/dbg/dbgmod.cpp             |   15 +-
 src/VBox/Runtime/common/dbg/dbgmodcodeview.cpp     |   58 +-
 src/VBox/Runtime/common/dbg/dbgmodcontainer.cpp    |    2 +-
 src/VBox/Runtime/common/dbg/dbgmoddbghelp.cpp      |    7 +-
 src/VBox/Runtime/common/dbg/dbgmoddeferred.cpp     |    2 +-
 src/VBox/Runtime/common/dbg/dbgmoddwarf.cpp        |   25 +-
 src/VBox/Runtime/common/dbg/dbgmodexports.cpp      |    2 +-
 src/VBox/Runtime/common/dbg/dbgmodldr.cpp          |    3 +-
 src/VBox/Runtime/common/dbg/dbgmodnm.cpp           |    2 +-
 src/VBox/Runtime/common/dvm/dvm.cpp                |    2 +-
 src/VBox/Runtime/common/dvm/dvmbsdlabel.cpp        |    2 +-
 src/VBox/Runtime/common/dvm/dvmgpt.cpp             |    6 +-
 src/VBox/Runtime/common/dvm/dvmmbr.cpp             |   13 +-
 src/VBox/Runtime/common/dvm/dvmvfs.cpp             |    4 +-
 .../Runtime/common/err/RTErrConvertFromErrno.cpp   |   22 +-
 .../Runtime/common/err/RTErrConvertToErrno.cpp     |    2 +-
 src/VBox/Runtime/common/err/errinfo-alloc.cpp      |    2 +-
 src/VBox/Runtime/common/err/errinfo.cpp            |    2 +-
 src/VBox/Runtime/common/err/errmsg.cpp             |    4 +-
 src/VBox/Runtime/common/err/errmsgxpcom.cpp        |    2 +-
 src/VBox/Runtime/common/filesystem/filesystem.cpp  |    2 +-
 .../Runtime/common/filesystem/filesystemext.cpp    |    6 +-
 src/VBox/Runtime/common/ldr/ldr.cpp                |    2 +-
 src/VBox/Runtime/common/ldr/ldrELF.cpp             |    4 +-
 .../Runtime/common/ldr/ldrELFRelocatable.cpp.h     |   12 +-
 src/VBox/Runtime/common/ldr/ldrEx.cpp              |    2 +-
 src/VBox/Runtime/common/ldr/ldrFile.cpp            |    2 +-
 src/VBox/Runtime/common/ldr/ldrMemory.cpp          |    2 +-
 src/VBox/Runtime/common/ldr/ldrNative.cpp          |    2 +-
 src/VBox/Runtime/common/ldr/ldrPE.cpp              |   28 +-
 src/VBox/Runtime/common/ldr/ldrkStuff.cpp          |   12 +-
 src/VBox/Runtime/common/log/log.cpp                |   22 +-
 src/VBox/Runtime/common/log/logcom.cpp             |    2 +-
 src/VBox/Runtime/common/log/logellipsis.cpp        |    2 +-
 src/VBox/Runtime/common/log/logformat.cpp          |    2 +-
 src/VBox/Runtime/common/log/logrel.cpp             |    6 +-
 src/VBox/Runtime/common/log/logrelellipsis.cpp     |    2 +-
 src/VBox/Runtime/common/log/tracebuf.cpp           |    2 +-
 src/VBox/Runtime/common/log/tracedefault.cpp       |    2 +-
 src/VBox/Runtime/common/math/RTUInt128MulByU64.asm |    2 +-
 src/VBox/Runtime/common/math/bignum-amd64-x86.asm  |    2 +-
 src/VBox/Runtime/common/math/bignum.cpp            |   13 +-
 src/VBox/Runtime/common/math/ceill.asm             |    2 +-
 src/VBox/Runtime/common/math/cosl.asm              |    2 +-
 src/VBox/Runtime/common/math/fabs.asm              |    2 +-
 src/VBox/Runtime/common/math/fabsf.asm             |    2 +-
 src/VBox/Runtime/common/math/fabsl.asm             |    2 +-
 src/VBox/Runtime/common/math/floor.asm             |    2 +-
 src/VBox/Runtime/common/math/floorf.asm            |    2 +-
 src/VBox/Runtime/common/math/floorl.asm            |    2 +-
 src/VBox/Runtime/common/math/ldexpl.asm            |    2 +-
 src/VBox/Runtime/common/math/llrint.asm            |    2 +-
 src/VBox/Runtime/common/math/llrintf.asm           |    2 +-
 src/VBox/Runtime/common/math/llrintl.asm           |    2 +-
 src/VBox/Runtime/common/math/logl.asm              |    2 +-
 src/VBox/Runtime/common/math/lrint.asm             |    2 +-
 src/VBox/Runtime/common/math/lrintf.asm            |    2 +-
 src/VBox/Runtime/common/math/lrintl.asm            |    2 +-
 src/VBox/Runtime/common/math/remainder.asm         |    2 +-
 src/VBox/Runtime/common/math/remainderf.asm        |    2 +-
 src/VBox/Runtime/common/math/remainderl.asm        |    2 +-
 src/VBox/Runtime/common/math/sinl.asm              |    2 +-
 src/VBox/Runtime/common/math/tanl.asm              |    2 +-
 src/VBox/Runtime/common/math/trunc.asm             |    2 +-
 src/VBox/Runtime/common/math/truncf.asm            |    2 +-
 src/VBox/Runtime/common/math/truncl.asm            |    2 +-
 src/VBox/Runtime/common/misc/RTAssertMsg1Weak.cpp  |    2 +-
 src/VBox/Runtime/common/misc/RTAssertMsg2.cpp      |    2 +-
 src/VBox/Runtime/common/misc/RTAssertMsg2Add.cpp   |    2 +-
 .../Runtime/common/misc/RTAssertMsg2AddWeak.cpp    |    2 +-
 .../Runtime/common/misc/RTAssertMsg2AddWeakV.cpp   |    2 +-
 src/VBox/Runtime/common/misc/RTAssertMsg2Weak.cpp  |    2 +-
 src/VBox/Runtime/common/misc/RTAssertMsg2WeakV.cpp |    2 +-
 src/VBox/Runtime/common/misc/RTFileModeToFlags.cpp |  157 +-
 src/VBox/Runtime/common/misc/RTFileOpenF.cpp       |    2 +-
 src/VBox/Runtime/common/misc/RTFileOpenV.cpp       |    2 +-
 .../Runtime/common/misc/RTMemWipeThoroughly.cpp    |    2 +-
 .../common/misc/RTSystemIsInsideVM-amd64-x86.cpp   |    2 +-
 src/VBox/Runtime/common/misc/aiomgr.cpp            |   22 +-
 src/VBox/Runtime/common/misc/assert.cpp            |    2 +-
 src/VBox/Runtime/common/misc/buildconfig.cpp       |    2 +-
 src/VBox/Runtime/common/misc/cidr.cpp              |    2 +-
 src/VBox/Runtime/common/misc/circbuf.cpp           |    2 +-
 src/VBox/Runtime/common/misc/getopt.cpp            |    2 +-
 src/VBox/Runtime/common/misc/getoptargv.cpp        |    2 +-
 src/VBox/Runtime/common/misc/handle.cpp            |    2 +-
 src/VBox/Runtime/common/misc/handletable.cpp       |    2 +-
 src/VBox/Runtime/common/misc/handletable.h         |    2 +-
 src/VBox/Runtime/common/misc/handletablectx.cpp    |    2 +-
 src/VBox/Runtime/common/misc/handletablesimple.cpp |    2 +-
 src/VBox/Runtime/common/misc/json.cpp              |   83 +-
 src/VBox/Runtime/common/misc/lockvalidator.cpp     |   13 +-
 src/VBox/Runtime/common/misc/message.cpp           |    2 +-
 src/VBox/Runtime/common/misc/once.cpp              |    2 +-
 src/VBox/Runtime/common/misc/req.cpp               |    2 +-
 src/VBox/Runtime/common/misc/reqpool.cpp           |    2 +-
 src/VBox/Runtime/common/misc/reqqueue.cpp          |    2 +-
 src/VBox/Runtime/common/misc/s3.cpp                |    7 +-
 src/VBox/Runtime/common/misc/sanity-c.c            |    2 +-
 src/VBox/Runtime/common/misc/sanity-cpp.cpp        |    2 +-
 src/VBox/Runtime/common/misc/sanity.h              |    2 +-
 src/VBox/Runtime/common/misc/semspingpong.cpp      |    2 +-
 src/VBox/Runtime/common/misc/setjmp.asm            |    2 +-
 src/VBox/Runtime/common/misc/sg.cpp                |    2 +-
 src/VBox/Runtime/common/misc/term.cpp              |    2 +-
 src/VBox/Runtime/common/misc/thread.cpp            |    3 +-
 src/VBox/Runtime/common/misc/uri.cpp               |    3 +-
 src/VBox/Runtime/common/misc/zero.asm              |    2 +-
 src/VBox/Runtime/common/net/macstr.cpp             |    2 +-
 src/VBox/Runtime/common/net/netaddrstr.cpp         |    2 +-
 src/VBox/Runtime/common/net/netaddrstr2.cpp        |    3 +-
 src/VBox/Runtime/common/path/RTPathAbsDup.cpp      |    2 +-
 src/VBox/Runtime/common/path/RTPathAbsEx.cpp       |    2 +-
 src/VBox/Runtime/common/path/RTPathAbsExDup.cpp    |    2 +-
 src/VBox/Runtime/common/path/RTPathAppend.cpp      |    2 +-
 src/VBox/Runtime/common/path/RTPathAppendEx.cpp    |    2 +-
 .../Runtime/common/path/RTPathCalcRelative.cpp     |    2 +-
 .../common/path/RTPathChangeToDosSlashes.cpp       |    6 +-
 .../common/path/RTPathChangeToUnixSlashes.cpp      |    6 +-
 .../Runtime/common/path/RTPathCopyComponents.cpp   |    2 +-
 .../Runtime/common/path/RTPathCountComponents.cpp  |    2 +-
 .../common/path/RTPathEnsureTrailingSeparator.cpp  |    2 +-
 src/VBox/Runtime/common/path/RTPathExt.cpp         |    5 +-
 src/VBox/Runtime/common/path/RTPathFilename.cpp    |    2 +-
 src/VBox/Runtime/common/path/RTPathGlob.cpp        |   46 +-
 src/VBox/Runtime/common/path/RTPathHasExt.cpp      |    2 +-
 src/VBox/Runtime/common/path/RTPathHasPath.cpp     |    2 +-
 src/VBox/Runtime/common/path/RTPathJoin.cpp        |    2 +-
 src/VBox/Runtime/common/path/RTPathJoinA.cpp       |    2 +-
 src/VBox/Runtime/common/path/RTPathJoinEx.cpp      |    2 +-
 src/VBox/Runtime/common/path/RTPathParse.cpp       |    2 +-
 src/VBox/Runtime/common/path/RTPathParse.cpp.h     |    3 +-
 src/VBox/Runtime/common/path/RTPathParseSimple.cpp |    3 +-
 .../Runtime/common/path/RTPathParsedReassemble.cpp |    2 +-
 src/VBox/Runtime/common/path/RTPathRealDup.cpp     |    2 +-
 src/VBox/Runtime/common/path/RTPathRmCmd.cpp       |    2 +-
 src/VBox/Runtime/common/path/RTPathSplit.cpp       |    2 +-
 src/VBox/Runtime/common/path/RTPathSplitA.cpp      |    2 +-
 .../Runtime/common/path/RTPathSplitReassemble.cpp  |    2 +-
 .../Runtime/common/path/RTPathStartsWithRoot.cpp   |    2 +-
 src/VBox/Runtime/common/path/RTPathStripExt.cpp    |    2 +-
 .../Runtime/common/path/RTPathStripFilename.cpp    |    2 +-
 .../common/path/RTPathStripTrailingSlash.cpp       |    2 +-
 .../Runtime/common/path/RTPathTraverseList.cpp     |    2 +-
 src/VBox/Runtime/common/path/comparepaths.cpp      |    2 +-
 src/VBox/Runtime/common/path/rtPathRootSpecLen.cpp |    2 +-
 .../Runtime/common/path/rtPathVolumeSpecLen.cpp    |    2 +-
 .../common/path/rtpath-expand-template.cpp.h       |    2 +-
 src/VBox/Runtime/common/rand/rand.cpp              |    2 +-
 src/VBox/Runtime/common/rand/randadv.cpp           |    2 +-
 src/VBox/Runtime/common/rand/randparkmiller.cpp    |    2 +-
 src/VBox/Runtime/common/sort/RTSortApvIsSorted.cpp |    2 +-
 src/VBox/Runtime/common/sort/RTSortIsSorted.cpp    |    2 +-
 src/VBox/Runtime/common/sort/shellsort.cpp         |    2 +-
 src/VBox/Runtime/common/string/RTStrCat.cpp        |    2 +-
 src/VBox/Runtime/common/string/RTStrCatEx.cpp      |    2 +-
 src/VBox/Runtime/common/string/RTStrCatP.cpp       |    2 +-
 src/VBox/Runtime/common/string/RTStrCatPEx.cpp     |    2 +-
 src/VBox/Runtime/common/string/RTStrCmp.cpp        |    2 +-
 src/VBox/Runtime/common/string/RTStrCopy.cpp       |    2 +-
 src/VBox/Runtime/common/string/RTStrCopyEx.cpp     |    2 +-
 src/VBox/Runtime/common/string/RTStrCopyP.cpp      |    2 +-
 src/VBox/Runtime/common/string/RTStrCopyPEx.cpp    |    2 +-
 .../Runtime/common/string/RTStrIStartsWith.cpp     |    2 +-
 src/VBox/Runtime/common/string/RTStrNCmp.cpp       |    2 +-
 src/VBox/Runtime/common/string/RTStrNLen.cpp       |    2 +-
 src/VBox/Runtime/common/string/RTStrNLenEx.cpp     |    2 +-
 src/VBox/Runtime/common/string/RTStrStartsWith.cpp |    2 +-
 src/VBox/Runtime/common/string/RTStrStr.cpp        |    2 +-
 src/VBox/Runtime/common/string/RTUtf16Cat.cpp      |    2 +-
 src/VBox/Runtime/common/string/RTUtf16CatAscii.cpp |    2 +-
 src/VBox/Runtime/common/string/RTUtf16CmpAscii.cpp |    2 +-
 src/VBox/Runtime/common/string/RTUtf16Copy.cpp     |    2 +-
 .../Runtime/common/string/RTUtf16CopyAscii.cpp     |    2 +-
 src/VBox/Runtime/common/string/RTUtf16End.cpp      |    2 +-
 .../Runtime/common/string/RTUtf16ICmpAscii.cpp     |    2 +-
 src/VBox/Runtime/common/string/RTUtf16NLen.cpp     |    2 +-
 src/VBox/Runtime/common/string/RTUtf16NLenEx.cpp   |    2 +-
 .../Runtime/common/string/RTUtf16PrintHexBytes.cpp |    2 +-
 src/VBox/Runtime/common/string/base64.cpp          |    2 +-
 src/VBox/Runtime/common/string/memchr.asm          |    2 +-
 src/VBox/Runtime/common/string/memchr.cpp          |    2 +-
 src/VBox/Runtime/common/string/memchr_alias.c      |    2 +-
 src/VBox/Runtime/common/string/memcmp.asm          |    2 +-
 src/VBox/Runtime/common/string/memcmp.cpp          |    2 +-
 src/VBox/Runtime/common/string/memcmp_alias.c      |    2 +-
 src/VBox/Runtime/common/string/memcpy.asm          |    2 +-
 src/VBox/Runtime/common/string/memcpy.cpp          |    2 +-
 src/VBox/Runtime/common/string/memcpy_alias.c      |    2 +-
 src/VBox/Runtime/common/string/memmove.asm         |    2 +-
 src/VBox/Runtime/common/string/memmove_alias.c     |    2 +-
 src/VBox/Runtime/common/string/mempcpy.asm         |    2 +-
 src/VBox/Runtime/common/string/memrchr.asm         |    2 +-
 src/VBox/Runtime/common/string/memset.asm          |    2 +-
 src/VBox/Runtime/common/string/memset.cpp          |    2 +-
 src/VBox/Runtime/common/string/memset_alias.c      |    2 +-
 src/VBox/Runtime/common/string/ministring.cpp      |    2 +-
 src/VBox/Runtime/common/string/simplepattern.cpp   |    2 +-
 src/VBox/Runtime/common/string/straprintf.cpp      |    2 +-
 src/VBox/Runtime/common/string/strcache.cpp        |    7 +-
 src/VBox/Runtime/common/string/strchr.asm          |    2 +-
 src/VBox/Runtime/common/string/strchr_alias.c      |    2 +-
 src/VBox/Runtime/common/string/strcmp.asm          |    2 +-
 src/VBox/Runtime/common/string/strcmp_alias.c      |    2 +-
 src/VBox/Runtime/common/string/strcpy.asm          |    2 +-
 src/VBox/Runtime/common/string/strcpy.cpp          |    2 +-
 src/VBox/Runtime/common/string/strcpy_alias.c      |    2 +-
 src/VBox/Runtime/common/string/strformat.cpp       |    6 +-
 src/VBox/Runtime/common/string/strformatnum.cpp    |    2 +-
 src/VBox/Runtime/common/string/strformatrt.cpp     |   17 +-
 src/VBox/Runtime/common/string/strformattype.cpp   |    2 +-
 src/VBox/Runtime/common/string/strhash1.cpp        |    2 +-
 src/VBox/Runtime/common/string/stringalloc.cpp     |    2 +-
 src/VBox/Runtime/common/string/strlen.asm          |    2 +-
 src/VBox/Runtime/common/string/strlen.cpp          |    2 +-
 src/VBox/Runtime/common/string/strlen_alias.c      |    2 +-
 src/VBox/Runtime/common/string/strncmp.asm         |    2 +-
 src/VBox/Runtime/common/string/strncmp.cpp         |    2 +-
 src/VBox/Runtime/common/string/strncpy.asm         |    2 +-
 src/VBox/Runtime/common/string/strpbrk.cpp         |    2 +-
 src/VBox/Runtime/common/string/strprintf.cpp       |    2 +-
 src/VBox/Runtime/common/string/strspace.cpp        |    2 +-
 src/VBox/Runtime/common/string/strstrip.cpp        |    2 +-
 src/VBox/Runtime/common/string/strtonum.cpp        |    2 +-
 src/VBox/Runtime/common/string/strversion.cpp      |    2 +-
 src/VBox/Runtime/common/string/uni.cpp             |    2 +-
 src/VBox/Runtime/common/string/unidata-flags.cpp   |    2 +-
 src/VBox/Runtime/common/string/unidata-lower.cpp   |    2 +-
 src/VBox/Runtime/common/string/unidata-upper.cpp   |    2 +-
 src/VBox/Runtime/common/string/uniread.cpp         |   53 +-
 src/VBox/Runtime/common/string/utf-16-case.cpp     |    2 +-
 src/VBox/Runtime/common/string/utf-16-latin-1.cpp  |    2 +-
 src/VBox/Runtime/common/string/utf-16.cpp          |   74 +-
 src/VBox/Runtime/common/string/utf-8-case.cpp      |    2 +-
 src/VBox/Runtime/common/string/utf-8-case2.cpp     |    2 +-
 src/VBox/Runtime/common/string/utf-8.cpp           |   75 +-
 src/VBox/Runtime/common/table/avl_Enum.cpp.h       |    2 +-
 src/VBox/Runtime/common/time/time.cpp              |    2 +-
 src/VBox/Runtime/common/time/timeprog.cpp          |    2 +-
 src/VBox/Runtime/common/time/timesup.cpp           |    3 +-
 src/VBox/Runtime/common/time/timesupA.asm          |    2 +-
 src/VBox/Runtime/common/time/timesupA.mac          |    2 +-
 src/VBox/Runtime/common/time/timesupref.cpp        |    2 +-
 src/VBox/Runtime/common/time/timesupref.h          |    5 +-
 src/VBox/Runtime/common/time/timesysalias.cpp      |    2 +-
 src/VBox/Runtime/common/vfs/vfsbase.cpp            |    2 +-
 src/VBox/Runtime/common/vfs/vfschain.cpp           |    2 +-
 src/VBox/Runtime/common/vfs/vfsiosmisc.cpp         |    4 +-
 src/VBox/Runtime/common/vfs/vfsmemory.cpp          |   18 +-
 src/VBox/Runtime/common/vfs/vfsmisc.cpp            |    2 +-
 src/VBox/Runtime/common/vfs/vfsreadahead.cpp       |   16 +-
 src/VBox/Runtime/common/vfs/vfsstdfile.cpp         |    2 +-
 src/VBox/Runtime/common/vfs/vfsstdpipe.cpp         |    2 +-
 src/VBox/Runtime/common/zip/gzipvfs.cpp            |    2 +-
 src/VBox/Runtime/common/zip/pkzip.cpp              |    6 +-
 src/VBox/Runtime/common/zip/pkzipvfs.cpp           |   13 +-
 src/VBox/Runtime/common/zip/tar.cpp                |   10 +-
 src/VBox/Runtime/common/zip/tar.h                  |    2 +-
 src/VBox/Runtime/common/zip/tarcmd.cpp             |    7 +-
 src/VBox/Runtime/common/zip/tarvfs.cpp             |    2 +-
 src/VBox/Runtime/common/zip/unzipcmd.cpp           |    6 +-
 src/VBox/Runtime/common/zip/xarvfs.cpp             |    6 +-
 src/VBox/Runtime/common/zip/zip.cpp                |    9 +-
 src/VBox/Runtime/darwin/RTErrConvertFromDarwin.cpp |    2 +-
 .../Runtime/darwin/RTErrConvertFromDarwinCOM.cpp   |    2 +-
 .../Runtime/darwin/RTErrConvertFromDarwinIO.cpp    |    2 +-
 .../Runtime/darwin/RTErrConvertFromDarwinKern.cpp  |    2 +-
 src/VBox/Runtime/gc/initterm-gc.cpp                |    2 +-
 .../generic/RTAssertShouldPanic-generic.cpp        |    2 +-
 .../RTCrStoreCreateSnapshotById-generic.cpp        |    2 +-
 .../generic/RTDirCreateUniqueNumbered-generic.cpp  |  118 +-
 src/VBox/Runtime/generic/RTDirExists-generic.cpp   |    2 +-
 .../Runtime/generic/RTDirQueryInfo-generic.cpp     |    4 +-
 src/VBox/Runtime/generic/RTDirSetTimes-generic.cpp |    4 +-
 src/VBox/Runtime/generic/RTEnvDupEx-generic.cpp    |    2 +-
 src/VBox/Runtime/generic/RTFileCopy-generic.cpp    |    2 +-
 src/VBox/Runtime/generic/RTFileExists-generic.cpp  |    2 +-
 src/VBox/Runtime/generic/RTFileMove-generic.cpp    |    2 +-
 .../Runtime/generic/RTFileQuerySize-generic.cpp    |    2 +-
 src/VBox/Runtime/generic/RTFileReadAll-generic.cpp |    2 +-
 .../generic/RTFileReadAllByHandle-generic.cpp      |    2 +-
 .../generic/RTFileReadAllByHandleEx-generic.cpp    |    2 +-
 .../Runtime/generic/RTFileReadAllEx-generic.cpp    |    2 +-
 .../Runtime/generic/RTFileReadAllFree-generic.cpp  |    4 +-
 .../Runtime/generic/RTLogDefaultInit-generic.cpp   |    2 +-
 .../Runtime/generic/RTLogWriteDebugger-generic.cpp |    2 +-
 .../Runtime/generic/RTLogWriteStdErr-generic.cpp   |    2 +-
 .../generic/RTLogWriteStdErr-stub-generic.cpp      |    2 +-
 .../Runtime/generic/RTLogWriteStdOut-generic.cpp   |    2 +-
 .../generic/RTLogWriteStdOut-stub-generic.cpp      |    2 +-
 .../Runtime/generic/RTLogWriteUser-generic.cpp     |    2 +-
 src/VBox/Runtime/generic/RTMpCpuId-generic.cpp     |    2 +-
 .../generic/RTMpCpuIdFromSetIndex-generic.cpp      |    2 +-
 .../generic/RTMpCpuIdToSetIndex-generic.cpp        |    2 +-
 .../Runtime/generic/RTMpGetArraySize-generic.cpp   |    2 +-
 .../Runtime/generic/RTMpGetCoreCount-generic.cpp   |    2 +-
 src/VBox/Runtime/generic/RTMpGetCount-generic.cpp  |    2 +-
 .../generic/RTMpGetCurFrequency-generic.cpp        |    2 +-
 .../generic/RTMpGetDescription-generic-stub.cpp    |    2 +-
 .../Runtime/generic/RTMpGetDescription-generic.cpp |    2 +-
 .../Runtime/generic/RTMpGetMaxCpuId-generic.cpp    |    2 +-
 .../generic/RTMpGetMaxFrequency-generic.cpp        |    2 +-
 .../generic/RTMpGetOnlineCoreCount-generic.cpp     |    2 +-
 .../Runtime/generic/RTMpGetOnlineCount-generic.cpp |    2 +-
 .../Runtime/generic/RTMpGetOnlineSet-generic.cpp   |    2 +-
 src/VBox/Runtime/generic/RTMpGetSet-generic.cpp    |    2 +-
 .../Runtime/generic/RTMpIsCpuOnline-generic.cpp    |    2 +-
 .../Runtime/generic/RTMpIsCpuPossible-generic.cpp  |    2 +-
 src/VBox/Runtime/generic/RTMpOnPair-generic.cpp    |    3 +-
 src/VBox/Runtime/generic/RTPathAbs-generic.cpp     |    8 +-
 .../generic/RTPathGetCurrentDrive-generic.cpp      |    2 +-
 .../generic/RTPathGetCurrentOnDrive-generic.cpp    |    2 +-
 src/VBox/Runtime/generic/RTPathIsSame-generic.cpp  |   33 +-
 .../Runtime/generic/RTProcDaemonize-generic.cpp    |    2 +-
 .../generic/RTProcIsRunningByName-generic.cpp      |    2 +-
 .../generic/RTProcessQueryUsernameA-generic.cpp    |    2 +-
 .../RTRandAdvCreateSystemFaster-generic.cpp        |    2 +-
 .../generic/RTRandAdvCreateSystemTruer-generic.cpp |    2 +-
 .../generic/RTSemEventMultiWait-2-ex-generic.cpp   |    2 +-
 .../generic/RTSemEventMultiWait-generic.cpp        |    2 +-
 .../RTSemEventMultiWaitNoResume-2-ex-generic.cpp   |    2 +-
 .../generic/RTSemEventWait-2-ex-generic.cpp        |    2 +-
 .../Runtime/generic/RTSemEventWait-generic.cpp     |    2 +-
 .../RTSemEventWaitNoResume-2-ex-generic.cpp        |    2 +-
 .../Runtime/generic/RTSemMutexRequest-generic.cpp  |    2 +-
 .../generic/RTSemMutexRequestDebug-generic.cpp     |    2 +-
 .../Runtime/generic/RTSystemIsInsideVM-generic.cpp |    2 +-
 .../generic/RTSystemQueryDmiString-generic.cpp     |    2 +-
 .../generic/RTSystemQueryOSInfo-generic.cpp        |    2 +-
 .../Runtime/generic/RTSystemShutdown-generic.cpp   |    3 +-
 .../generic/RTThreadGetAffinity-stub-generic.cpp   |    2 +-
 .../generic/RTThreadGetNativeState-generic.cpp     |    2 +-
 .../generic/RTThreadSetAffinity-stub-generic.cpp   |    2 +-
 .../generic/RTThreadSetAffinityToCpu-generic.cpp   |    2 +-
 .../generic/RTTimeLocalDeltaNano-generic.cpp       |    2 +-
 .../Runtime/generic/RTTimeLocalExplode-generic.cpp |    2 +-
 .../Runtime/generic/RTTimeLocalNow-generic.cpp     |    2 +-
 src/VBox/Runtime/generic/RTTimerCreate-generic.cpp |    2 +-
 .../Runtime/generic/RTTimerLRCreate-generic.cpp    |    2 +-
 src/VBox/Runtime/generic/RTUuidCreate-generic.cpp  |    2 +-
 src/VBox/Runtime/generic/cdrom-generic.cpp         |   17 +-
 src/VBox/Runtime/generic/createtemp-generic.cpp    |    3 +-
 src/VBox/Runtime/generic/critsect-generic.cpp      |    8 +-
 src/VBox/Runtime/generic/critsectrw-generic.cpp    |   12 +-
 src/VBox/Runtime/generic/env-generic.cpp           |    4 +-
 src/VBox/Runtime/generic/errvars-generic.cpp       |    4 +-
 src/VBox/Runtime/generic/fs-stubs-generic.cpp      |    2 +-
 src/VBox/Runtime/generic/http-curl.cpp             |   31 +-
 src/VBox/Runtime/generic/mempool-generic.cpp       |    4 +-
 src/VBox/Runtime/generic/memsafer-generic.cpp      |    3 +-
 src/VBox/Runtime/generic/mppresent-generic.cpp     |    2 +-
 src/VBox/Runtime/generic/pathhost-generic.cpp      |    2 +-
 src/VBox/Runtime/generic/sched-generic.cpp         |    2 +-
 src/VBox/Runtime/generic/semfastmutex-generic.cpp  |    2 +-
 src/VBox/Runtime/generic/semrw-generic.cpp         |    9 +-
 .../Runtime/generic/semrw-lockless-generic.cpp     |    2 +-
 src/VBox/Runtime/generic/semxroads-generic.cpp     |    2 +-
 src/VBox/Runtime/generic/spinlock-generic.cpp      |    3 +-
 .../Runtime/generic/strcache-stubs-generic.cpp     |    2 +-
 src/VBox/Runtime/generic/timer-generic.cpp         |    2 +-
 src/VBox/Runtime/generic/timerlr-generic.cpp       |    4 +-
 src/VBox/Runtime/generic/tls-generic.cpp           |    2 +-
 src/VBox/Runtime/generic/utf16locale-generic.cpp   |    2 +-
 src/VBox/Runtime/generic/uuid-generic.cpp          |    2 +-
 .../Runtime/include/internal/alignmentchecks.h     |    2 +-
 src/VBox/Runtime/include/internal/assert.h         |    2 +-
 src/VBox/Runtime/include/internal/bignum.mac       |    2 +-
 src/VBox/Runtime/include/internal/dbgmod.h         |    2 +-
 src/VBox/Runtime/include/internal/dir.h            |    2 +-
 src/VBox/Runtime/include/internal/dvm.h            |    2 +-
 src/VBox/Runtime/include/internal/file.h           |    2 +-
 src/VBox/Runtime/include/internal/fileaio.h        |    2 +-
 src/VBox/Runtime/include/internal/filesystem.h     |    2 +-
 src/VBox/Runtime/include/internal/fs.h             |    2 +-
 src/VBox/Runtime/include/internal/initterm.h       |    2 +-
 src/VBox/Runtime/include/internal/iprt-openssl.h   |    2 +-
 src/VBox/Runtime/include/internal/iprt.h           |    2 +-
 src/VBox/Runtime/include/internal/ldr.h            |    2 +-
 src/VBox/Runtime/include/internal/ldrELF.h         |    2 +-
 src/VBox/Runtime/include/internal/ldrELF32.h       |    2 +-
 src/VBox/Runtime/include/internal/ldrELF64.h       |    2 +-
 src/VBox/Runtime/include/internal/lockvalidator.h  |    2 +-
 src/VBox/Runtime/include/internal/magics.h         |    2 +-
 src/VBox/Runtime/include/internal/mem.h            |    2 +-
 src/VBox/Runtime/include/internal/memobj.h         |    2 +-
 src/VBox/Runtime/include/internal/path.h           |    2 +-
 src/VBox/Runtime/include/internal/pipe.h           |    2 +-
 src/VBox/Runtime/include/internal/process.h        |    2 +-
 src/VBox/Runtime/include/internal/rand.h           |    2 +-
 src/VBox/Runtime/include/internal/req.h            |    2 +-
 src/VBox/Runtime/include/internal/sched.h          |    2 +-
 src/VBox/Runtime/include/internal/socket.h         |    2 +-
 src/VBox/Runtime/include/internal/strhash.h        |    2 +-
 src/VBox/Runtime/include/internal/strict.h         |    2 +-
 src/VBox/Runtime/include/internal/string.h         |    2 +-
 src/VBox/Runtime/include/internal/thread.h         |    2 +-
 src/VBox/Runtime/include/internal/time.h           |    2 +-
 src/VBox/Runtime/nt/NtProcessStartup-stub.cpp      |    2 +-
 src/VBox/Runtime/nt/RTErrConvertFromNtStatus.cpp   |    2 +-
 src/VBox/Runtime/os2/RTErrConvertFromOS2.cpp       |    2 +-
 .../Runtime/os2/rtSemWaitOs2ConvertTimeout.cpp     |    2 +-
 src/VBox/Runtime/os2/sys0.asm                      |    2 +-
 src/VBox/Runtime/r0drv/alloc-ef-r0drv.cpp          |   23 +-
 src/VBox/Runtime/r0drv/alloc-r0drv.cpp             |    9 +-
 src/VBox/Runtime/r0drv/alloc-r0drv.h               |    2 +-
 .../darwin/RTLogWriteDebugger-r0drv-darwin.cpp     |    2 +-
 .../r0drv/darwin/RTLogWriteStdOut-r0drv-darwin.cpp |    2 +-
 .../Runtime/r0drv/darwin/alloc-r0drv-darwin.cpp    |    3 +-
 .../Runtime/r0drv/darwin/assert-r0drv-darwin.cpp   |    2 +-
 .../r0drv/darwin/dbgkrnlinfo-r0drv-darwin.cpp      |   10 +-
 .../Runtime/r0drv/darwin/initterm-r0drv-darwin.cpp |    2 +-
 .../Runtime/r0drv/darwin/memobj-r0drv-darwin.cpp   |   19 +-
 .../r0drv/darwin/memuserkernel-r0drv-darwin.cpp    |    4 +-
 src/VBox/Runtime/r0drv/darwin/mp-r0drv-darwin.cpp  |    4 +-
 .../Runtime/r0drv/darwin/process-r0drv-darwin.cpp  |    2 +-
 .../Runtime/r0drv/darwin/semevent-r0drv-darwin.cpp |    7 +-
 .../r0drv/darwin/semeventmulti-r0drv-darwin.cpp    |    6 +-
 .../r0drv/darwin/semfastmutex-r0drv-darwin.cpp     |    2 +-
 .../Runtime/r0drv/darwin/semmutex-r0drv-darwin.cpp |    5 +-
 .../Runtime/r0drv/darwin/spinlock-r0drv-darwin.cpp |    2 +-
 src/VBox/Runtime/r0drv/darwin/the-darwin-kernel.h  |   17 +-
 .../Runtime/r0drv/darwin/thread-r0drv-darwin.cpp   |    2 +-
 .../Runtime/r0drv/darwin/thread2-r0drv-darwin.cpp  |    7 +-
 .../r0drv/darwin/threadpreempt-r0drv-darwin.cpp    |    4 +-
 .../Runtime/r0drv/darwin/time-r0drv-darwin.cpp     |    2 +-
 .../r0drv/freebsd}/Makefile.kup                    |    0
 .../Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c   |    2 +-
 .../r0drv/freebsd/memuserkernel-r0drv-freebsd.c    |    2 +-
 src/VBox/Runtime/r0drv/freebsd/mp-r0drv-freebsd.c  |    2 +-
 .../Runtime/r0drv/freebsd/semmutex-r0drv-freebsd.c |    2 +-
 .../r0drv/freebsd/sleepqueue-r0drv-freebsd.h       |    2 +-
 .../Runtime/r0drv/freebsd/thread-r0drv-freebsd.c   |    2 +-
 .../generic/RTMpIsCpuWorkPending-r0drv-generic.cpp |    2 +-
 .../Runtime/r0drv/generic/RTMpOn-r0drv-generic.cpp |    2 +-
 .../r0drv/generic/RTMpPokeCpu-r0drv-generic.cpp    |    2 +-
 .../RTThreadPreemptDisable-r0drv-generic.cpp       |    2 +-
 .../RTThreadPreemptIsEnabled-r0drv-generic.cpp     |    2 +-
 .../RTThreadPreemptIsPending-r0drv-generic.cpp     |    2 +-
 ...TThreadPreemptIsPendingTrusty-r0drv-generic.cpp |    2 +-
 .../RTThreadPreemptRestore-r0drv-generic.cpp       |    2 +-
 .../r0drv/generic/mpnotification-r0drv-generic.cpp |    2 +-
 .../r0drv/generic/semspinmutex-r0drv-generic.c     |    2 +-
 .../r0drv/generic/threadctxhooks-r0drv-generic.cpp |    6 +-
 .../Audio_old => Runtime/r0drv/haiku}/Makefile.kup |    0
 .../r0drv/haiku/RTLogWriteDebugger-r0drv-haiku.c   |    2 +-
 .../r0drv/haiku/RTLogWriteStdOut-r0drv-haiku.c     |    2 +-
 src/VBox/Runtime/r0drv/haiku/alloc-r0drv-haiku.c   |    2 +-
 src/VBox/Runtime/r0drv/haiku/assert-r0drv-haiku.c  |    2 +-
 .../Runtime/r0drv/haiku/initterm-r0drv-haiku.c     |    2 +-
 src/VBox/Runtime/r0drv/haiku/memobj-r0drv-haiku.c  |    2 +-
 src/VBox/Runtime/r0drv/haiku/mp-r0drv-haiku.c      |    4 +-
 src/VBox/Runtime/r0drv/haiku/process-r0drv-haiku.c |    2 +-
 .../Runtime/r0drv/haiku/semevent-r0drv-haiku.c     |    2 +-
 .../r0drv/haiku/semeventmulti-r0drv-haiku.c        |    2 +-
 .../Runtime/r0drv/haiku/semfastmutex-r0drv-haiku.c |    2 +-
 .../Runtime/r0drv/haiku/semmutex-r0drv-haiku.c     |    2 +-
 .../Runtime/r0drv/haiku/spinlock-r0drv-haiku.c     |    2 +-
 src/VBox/Runtime/r0drv/haiku/the-haiku-kernel.h    |    2 +-
 src/VBox/Runtime/r0drv/haiku/thread-r0drv-haiku.c  |    2 +-
 src/VBox/Runtime/r0drv/haiku/thread2-r0drv-haiku.c |    2 +-
 src/VBox/Runtime/r0drv/haiku/time-r0drv-haiku.c    |    2 +-
 src/VBox/Runtime/r0drv/initterm-r0drv.cpp          |    4 +-
 .../r0drv/linux/RTLogWriteDebugger-r0drv-linux.c   |    2 +-
 src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c   |    3 +-
 src/VBox/Runtime/r0drv/linux/assert-r0drv-linux.c  |    2 +-
 .../Runtime/r0drv/linux/initterm-r0drv-linux.c     |    2 +-
 src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c  |    9 +-
 .../r0drv/linux/memuserkernel-r0drv-linux.c        |    2 +-
 src/VBox/Runtime/r0drv/linux/mp-r0drv-linux.c      |    2 +-
 .../r0drv/linux/mpnotification-r0drv-linux.c       |    2 +-
 src/VBox/Runtime/r0drv/linux/process-r0drv-linux.c |    2 +-
 .../Runtime/r0drv/linux/semevent-r0drv-linux.c     |    4 +-
 .../r0drv/linux/semeventmulti-r0drv-linux.c        |    4 +-
 .../Runtime/r0drv/linux/semfastmutex-r0drv-linux.c |    2 +-
 .../Runtime/r0drv/linux/semmutex-r0drv-linux.c     |    4 +-
 .../Runtime/r0drv/linux/spinlock-r0drv-linux.c     |    3 +-
 src/VBox/Runtime/r0drv/linux/string.h              |    2 +-
 src/VBox/Runtime/r0drv/linux/the-linux-kernel.h    |   20 +-
 src/VBox/Runtime/r0drv/linux/thread-r0drv-linux.c  |    6 +-
 src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c |    6 +-
 .../r0drv/linux/threadctxhooks-r0drv-linux.c       |    4 +-
 src/VBox/Runtime/r0drv/linux/time-r0drv-linux.c    |    2 +-
 src/VBox/Runtime/r0drv/linux/timer-r0drv-linux.c   |   27 +-
 .../Runtime/r0drv/linux/waitqueue-r0drv-linux.h    |    2 +-
 src/VBox/Runtime/r0drv/memobj-r0drv.cpp            |   30 +-
 src/VBox/Runtime/r0drv/mp-r0drv.h                  |    2 +-
 src/VBox/Runtime/r0drv/mpnotification-r0drv.c      |    2 +-
 .../r0drv/netbsd}/Makefile.kup                     |    0
 .../r0drv/netbsd/RTLogWriteStdOut-r0drv-netbsd.c   |   39 +
 src/VBox/Runtime/r0drv/netbsd/alloc-r0drv-netbsd.c |  155 +
 .../Runtime/r0drv/netbsd/assert-r0drv-netbsd.c     |   63 +
 .../Runtime/r0drv/netbsd/initterm-r0drv-netbsd.c   |   52 +
 .../Runtime/r0drv/netbsd/memobj-r0drv-netbsd.c     |  558 +++
 .../r0drv/netbsd/memuserkernel-r0drv-netbsd.c      |   82 +
 src/VBox/Runtime/r0drv/netbsd/mp-r0drv-netbsd.c    |   43 +
 .../Runtime/r0drv/netbsd/process-r0drv-netbsd.c    |   48 +
 .../Runtime/r0drv/netbsd/semevent-r0drv-netbsd.c   |  255 +
 .../r0drv/netbsd/semeventmulti-r0drv-netbsd.c      |  319 ++
 .../r0drv/netbsd/semfastmutex-r0drv-netbsd.c       |  114 +
 .../Runtime/r0drv/netbsd/semmutex-r0drv-netbsd.c   |  218 +
 .../Runtime/r0drv/netbsd/sleepqueue-r0drv-netbsd.h |  279 ++
 .../Runtime/r0drv/netbsd/spinlock-r0drv-netbsd.c   |  148 +
 src/VBox/Runtime/r0drv/netbsd/the-netbsd-kernel.h  |   72 +
 .../Runtime/r0drv/netbsd/thread-r0drv-netbsd.c     |  181 +
 .../Runtime/r0drv/netbsd/thread2-r0drv-netbsd.c    |  135 +
 src/VBox/Runtime/r0drv/netbsd/time-r0drv-netbsd.c  |   73 +
 .../r0drv/nt/RTLogWriteDebugger-r0drv-nt.cpp       |    2 +-
 src/VBox/Runtime/r0drv/nt/alloc-r0drv-nt.cpp       |    2 +-
 src/VBox/Runtime/r0drv/nt/assert-r0drv-nt.cpp      |    2 +-
 src/VBox/Runtime/r0drv/nt/initterm-r0drv-nt.cpp    |    2 +-
 src/VBox/Runtime/r0drv/nt/internal-r0drv-nt.h      |    2 +-
 src/VBox/Runtime/r0drv/nt/memobj-r0drv-nt.cpp      |   15 +-
 .../Runtime/r0drv/nt/memuserkernel-r0drv-nt.cpp    |    2 +-
 src/VBox/Runtime/r0drv/nt/mp-r0drv-nt.cpp          |   41 +-
 .../Runtime/r0drv/nt/mpnotification-r0drv-nt.cpp   |    2 +-
 src/VBox/Runtime/r0drv/nt/ntBldSymDb.cpp           |   13 +-
 src/VBox/Runtime/r0drv/nt/process-r0drv-nt.cpp     |    4 +-
 src/VBox/Runtime/r0drv/nt/semevent-r0drv-nt.cpp    |    4 +-
 .../Runtime/r0drv/nt/semeventmulti-r0drv-nt.cpp    |    4 +-
 .../Runtime/r0drv/nt/semfastmutex-r0drv-nt.cpp     |    2 +-
 src/VBox/Runtime/r0drv/nt/semmutex-r0drv-nt.cpp    |    8 +-
 src/VBox/Runtime/r0drv/nt/spinlock-r0drv-nt.cpp    |    3 +-
 src/VBox/Runtime/r0drv/nt/symdb.h                  |    2 +-
 src/VBox/Runtime/r0drv/nt/symdbdata.h              |    2 +-
 src/VBox/Runtime/r0drv/nt/the-nt-kernel.h          |    2 +-
 src/VBox/Runtime/r0drv/nt/thread-r0drv-nt.cpp      |    8 +-
 src/VBox/Runtime/r0drv/nt/thread2-r0drv-nt.cpp     |    5 +-
 src/VBox/Runtime/r0drv/nt/time-r0drv-nt.cpp        |    2 +-
 src/VBox/Runtime/r0drv/nt/timer-r0drv-nt.cpp       |    8 +-
 .../Runtime/r0drv/nt/toxic-chkstk-r0drv-nt.asm     |    2 +-
 .../Runtime/r0drv/os2/memuserkernel-r0drv-os2.cpp  |    2 +-
 src/VBox/Runtime/r0drv/power-r0drv.h               |    2 +-
 src/VBox/Runtime/r0drv/powernotification-r0drv.c   |    2 +-
 .../solaris/RTLogWriteDebugger-r0drv-solaris.c     |    2 +-
 .../r0drv/solaris/RTMpPokeCpu-r0drv-solaris.c      |    2 +-
 .../Runtime/r0drv/solaris/alloc-r0drv-solaris.c    |    2 +-
 .../Runtime/r0drv/solaris/assert-r0drv-solaris.c   |    2 +-
 .../r0drv/solaris/dbgkrnlinfo-r0drv-solaris.c      |    2 +-
 .../Runtime/r0drv/solaris/initterm-r0drv-solaris.c |    2 +-
 .../Runtime/r0drv/solaris/memobj-r0drv-solaris.c   |    2 +-
 .../Runtime/r0drv/solaris/memobj-r0drv-solaris.h   |    2 +-
 .../r0drv/solaris/memuserkernel-r0drv-solaris.c    |    2 +-
 .../r0drv/solaris/modulestub-r0drv-solaris.c       |    2 +-
 src/VBox/Runtime/r0drv/solaris/mp-r0drv-solaris.c  |    2 +-
 .../r0drv/solaris/mpnotification-r0drv-solaris.c   |    2 +-
 .../Runtime/r0drv/solaris/process-r0drv-solaris.c  |    2 +-
 .../Runtime/r0drv/solaris/semevent-r0drv-solaris.c |    2 +-
 .../r0drv/solaris/semeventmulti-r0drv-solaris.c    |    2 +-
 .../r0drv/solaris/semeventwait-r0drv-solaris.h     |    2 +-
 .../r0drv/solaris/semfastmutex-r0drv-solaris.c     |    2 +-
 .../Runtime/r0drv/solaris/semmutex-r0drv-solaris.c |    2 +-
 .../Runtime/r0drv/solaris/spinlock-r0drv-solaris.c |    2 +-
 .../Runtime/r0drv/solaris/the-solaris-kernel.h     |    2 +-
 .../Runtime/r0drv/solaris/thread-r0drv-solaris.c   |    2 +-
 .../Runtime/r0drv/solaris/thread2-r0drv-solaris.c  |    2 +-
 .../r0drv/solaris/threadctxhooks-r0drv-solaris.c   |    2 +-
 .../Runtime/r0drv/solaris/time-r0drv-solaris.c     |    2 +-
 .../Runtime/r0drv/solaris/timer-r0drv-solaris.c    |    2 +-
 src/VBox/Runtime/r3/alloc-ef-cpp.cpp               |    2 +-
 src/VBox/Runtime/r3/alloc-ef.cpp                   |    2 +-
 src/VBox/Runtime/r3/alloc-ef.h                     |    4 +-
 src/VBox/Runtime/r3/alloc.cpp                      |    2 +-
 src/VBox/Runtime/r3/allocex.cpp                    |    6 +-
 src/VBox/Runtime/r3/allocex.h                      |    2 +-
 .../darwin/RTCrStoreCreateSnapshotById-darwin.cpp  |    5 +-
 .../r3/darwin/RTPathUserDocuments-darwin.cpp       |    2 +-
 .../r3/darwin/RTSystemQueryDmiString-darwin.cpp    |    2 +-
 src/VBox/Runtime/r3/darwin/filelock-darwin.cpp     |    2 +-
 src/VBox/Runtime/r3/darwin/mp-darwin.cpp           |    6 +-
 src/VBox/Runtime/r3/darwin/pathhost-darwin.cpp     |    2 +-
 .../Runtime/r3/darwin/rtProcInitExePath-darwin.cpp |    2 +-
 src/VBox/Runtime/r3/darwin/sched-darwin.cpp        |    2 +-
 src/VBox/Runtime/r3/darwin/systemmem-darwin.cpp    |    2 +-
 src/VBox/Runtime/r3/darwin/time-darwin.cpp         |    2 +-
 src/VBox/Runtime/r3/dir.cpp                        |    3 +-
 src/VBox/Runtime/r3/dir2.cpp                       |    2 +-
 src/VBox/Runtime/r3/fileio.cpp                     |    2 +-
 src/VBox/Runtime/r3/freebsd/fileaio-freebsd.cpp    |    2 +-
 src/VBox/Runtime/r3/freebsd/mp-freebsd.cpp         |    2 +-
 .../r3/freebsd/rtProcInitExePath-freebsd.cpp       |    2 +-
 src/VBox/Runtime/r3/freebsd/systemmem-freebsd.cpp  |    2 +-
 src/VBox/Runtime/r3/fs.cpp                         |    2 +-
 src/VBox/Runtime/r3/generic/allocex-r3-generic.cpp |    5 +-
 .../Runtime/r3/generic/semspinmutex-r3-generic.cpp |    2 +-
 .../Audio_old => Runtime/r3/haiku}/Makefile.kup    |    0
 .../Runtime/r3/haiku/rtProcInitExePath-haiku.cpp   |    2 +-
 src/VBox/Runtime/r3/haiku/time-haiku.cpp           |    2 +-
 src/VBox/Runtime/r3/init.cpp                       |   12 +-
 src/VBox/Runtime/r3/init.h                         |    2 +-
 src/VBox/Runtime/r3/isofs.cpp                      |    2 +-
 .../r3/linux/RTProcIsRunningByName-linux.cpp       |    2 +-
 .../r3/linux/RTSystemQueryDmiString-linux.cpp      |    2 +-
 .../Runtime/r3/linux/RTSystemShutdown-linux.cpp    |    2 +-
 .../r3/linux/RTThreadGetNativeState-linux.cpp      |    2 +-
 src/VBox/Runtime/r3/linux/fileaio-linux.cpp        |    2 +-
 src/VBox/Runtime/r3/linux/mp-linux.cpp             |    2 +-
 .../Runtime/r3/linux/rtProcInitExePath-linux.cpp   |    2 +-
 src/VBox/Runtime/r3/linux/sched-linux.cpp          |    4 +-
 src/VBox/Runtime/r3/linux/semevent-linux.cpp       |   12 +-
 src/VBox/Runtime/r3/linux/semeventmulti-linux.cpp  |   12 +-
 src/VBox/Runtime/r3/linux/semmutex-linux.cpp       |    7 +-
 src/VBox/Runtime/r3/linux/systemmem-linux.cpp      |    2 +-
 .../Runtime/r3/linux/thread-affinity-linux.cpp     |    2 +-
 src/VBox/Runtime/r3/linux/time-linux.cpp           |    2 +-
 src/VBox/Runtime/r3/memsafer-r3.cpp                |   12 +-
 .../Audio_old => Runtime/r3/netbsd}/Makefile.kup   |    0
 .../Runtime/r3/netbsd/rtProcInitExePath-netbsd.cpp |  100 +
 src/VBox/Runtime/r3/nt/RTProcQueryParent-r3-nt.cpp |    2 +-
 src/VBox/Runtime/r3/nt/direnum-r3-nt.cpp           |    4 +-
 src/VBox/Runtime/r3/nt/fs-nt.cpp                   |    3 +-
 src/VBox/Runtime/r3/nt/internal-r3-nt.h            |    2 +-
 src/VBox/Runtime/r3/nt/pathint-nt.cpp              |    4 +-
 src/VBox/Runtime/r3/nt/time-nt.cpp                 |    2 +-
 src/VBox/Runtime/r3/os2/filelock-os2.cpp           |    2 +-
 src/VBox/Runtime/r3/os2/mp-os2.cpp                 |    2 +-
 src/VBox/Runtime/r3/os2/pipe-os2.cpp               |    2 +-
 src/VBox/Runtime/r3/os2/rtProcInitExePath-os2.cpp  |    2 +-
 src/VBox/Runtime/r3/os2/sched-os2.cpp              |    2 +-
 src/VBox/Runtime/r3/os2/sems-os2.cpp               |    2 +-
 src/VBox/Runtime/r3/os2/systemmem-os2.cpp          |    2 +-
 src/VBox/Runtime/r3/os2/thread-os2.cpp             |    2 +-
 src/VBox/Runtime/r3/path.cpp                       |    2 +-
 src/VBox/Runtime/r3/poll.cpp                       |   12 +-
 .../Runtime/r3/posix/RTFileQueryFsSizes-posix.cpp  |    2 +-
 .../Runtime/r3/posix/RTHandleGetStandard-posix.cpp |    2 +-
 src/VBox/Runtime/r3/posix/RTMemProtect-posix.cpp   |    2 +-
 src/VBox/Runtime/r3/posix/RTMpGetCount-posix.cpp   |    2 +-
 .../Runtime/r3/posix/RTPathUserDocuments-posix.cpp |    2 +-
 src/VBox/Runtime/r3/posix/RTPathUserHome-posix.cpp |    2 +-
 .../Runtime/r3/posix/RTSystemQueryOSInfo-posix.cpp |    2 +-
 .../r3/posix/RTSystemQueryTotalRam-posix.cpp       |    2 +-
 src/VBox/Runtime/r3/posix/RTTimeNow-posix.cpp      |    2 +-
 src/VBox/Runtime/r3/posix/RTTimeSet-posix.cpp      |    2 +-
 src/VBox/Runtime/r3/posix/allocex-r3-posix.cpp     |    3 +-
 src/VBox/Runtime/r3/posix/dir-posix.cpp            |    4 +-
 src/VBox/Runtime/r3/posix/env-posix.cpp            |    2 +-
 src/VBox/Runtime/r3/posix/errvars-posix.cpp        |    2 +-
 src/VBox/Runtime/r3/posix/fileaio-posix.cpp        |    2 +-
 src/VBox/Runtime/r3/posix/fileio-posix.cpp         |    6 +-
 src/VBox/Runtime/r3/posix/fileio2-posix.cpp        |    2 +-
 src/VBox/Runtime/r3/posix/filelock-posix.cpp       |    4 +-
 src/VBox/Runtime/r3/posix/fs-posix.cpp             |    3 +-
 src/VBox/Runtime/r3/posix/fs2-posix.cpp            |    2 +-
 src/VBox/Runtime/r3/posix/fs3-posix.cpp            |    2 +-
 src/VBox/Runtime/r3/posix/ldrNative-posix.cpp      |    3 +-
 src/VBox/Runtime/r3/posix/localipc-posix.cpp       |   23 +-
 src/VBox/Runtime/r3/posix/path-posix.cpp           |    3 +-
 src/VBox/Runtime/r3/posix/path2-posix.cpp          |    2 +-
 src/VBox/Runtime/r3/posix/pathhost-posix.cpp       |    2 +-
 src/VBox/Runtime/r3/posix/pipe-posix.cpp           |    2 +-
 .../Runtime/r3/posix/process-creation-posix.cpp    |    4 +-
 src/VBox/Runtime/r3/posix/process-posix.cpp        |    2 +-
 src/VBox/Runtime/r3/posix/rand-posix.cpp           |    2 +-
 .../r3/posix/rtmempage-exec-mmap-heap-posix.cpp    |    2 +-
 .../Runtime/r3/posix/rtmempage-exec-mmap-posix.cpp |    2 +-
 src/VBox/Runtime/r3/posix/semevent-posix.cpp       |   10 +-
 src/VBox/Runtime/r3/posix/semeventmulti-posix.cpp  |    9 +
 src/VBox/Runtime/r3/posix/semmutex-posix.cpp       |   91 +-
 src/VBox/Runtime/r3/posix/semrw-posix.cpp          |    5 +
 src/VBox/Runtime/r3/posix/symlink-posix.cpp        |    8 +-
 src/VBox/Runtime/r3/posix/thread-posix.cpp         |    5 +-
 src/VBox/Runtime/r3/posix/thread2-posix.cpp        |   14 +-
 src/VBox/Runtime/r3/posix/time-posix.cpp           |    2 +-
 src/VBox/Runtime/r3/posix/timelocal-posix.cpp      |    2 +-
 src/VBox/Runtime/r3/posix/timer-posix.cpp          |    2 +-
 src/VBox/Runtime/r3/posix/tls-posix.cpp            |    2 +-
 src/VBox/Runtime/r3/posix/utf8-posix.cpp           |   10 +-
 src/VBox/Runtime/r3/process.cpp                    |    2 +-
 src/VBox/Runtime/r3/socket.cpp                     |   22 +-
 .../r3/solaris/RTSystemQueryDmiString-solaris.cpp  |    2 +-
 .../r3/solaris/RTSystemShutdown-solaris.cpp        |    2 +-
 src/VBox/Runtime/r3/solaris/coredumper-solaris.cpp |    2 +-
 src/VBox/Runtime/r3/solaris/coredumper-solaris.h   |    2 +-
 src/VBox/Runtime/r3/solaris/fileaio-solaris.cpp    |    2 +-
 src/VBox/Runtime/r3/solaris/mp-solaris.cpp         |    2 +-
 .../r3/solaris/rtProcInitExePath-solaris.cpp       |    2 +-
 src/VBox/Runtime/r3/solaris/systemmem-solaris.cpp  |    2 +-
 .../Runtime/r3/solaris/thread-affinity-solaris.cpp |    2 +-
 src/VBox/Runtime/r3/stream.cpp                     |    4 +-
 src/VBox/Runtime/r3/tcp.cpp                        |    4 +-
 src/VBox/Runtime/r3/test.cpp                       |   49 +-
 src/VBox/Runtime/r3/testi.cpp                      |   14 +-
 src/VBox/Runtime/r3/udp.cpp                        |    4 +-
 .../r3/win/RTCrStoreCreateSnapshotById-win.cpp     |    4 +-
 .../Runtime/r3/win/RTHandleGetStandard-win.cpp     |    4 +-
 src/VBox/Runtime/r3/win/RTLogWriteDebugger-win.cpp |    4 +-
 .../Runtime/r3/win/RTSystemQueryDmiString-win.cpp  |    4 +-
 .../Runtime/r3/win/RTSystemQueryOSInfo-win.cpp     |    4 +-
 .../Runtime/r3/win/RTSystemQueryTotalRam-win.cpp   |    4 +-
 src/VBox/Runtime/r3/win/RTSystemShutdown-win.cpp   |    4 +-
 src/VBox/Runtime/r3/win/RTUuidCreate-win.cpp       |    4 +-
 src/VBox/Runtime/r3/win/VBoxRT-msvcr100-win32.def  |    3 +-
 src/VBox/Runtime/r3/win/VBoxRT-openssl-ose.def     |    2 +-
 src/VBox/Runtime/r3/win/VBoxRT-openssl.def         |    4 +-
 src/VBox/Runtime/r3/win/VBoxRT-win32.def           |    2 +-
 src/VBox/Runtime/r3/win/VBoxRT-win64.def           |    2 +-
 src/VBox/Runtime/r3/win/alloc-win.cpp              |   14 +-
 src/VBox/Runtime/r3/win/allocex-win.cpp            |    8 +-
 src/VBox/Runtime/r3/win/dir-win.cpp                |    5 +-
 src/VBox/Runtime/r3/win/direnum-win.cpp            |    4 +-
 src/VBox/Runtime/r3/win/dllmain-win.cpp            |    6 +-
 src/VBox/Runtime/r3/win/env-win.cpp                |    2 +-
 src/VBox/Runtime/r3/win/errvars-win.cpp            |    6 +-
 src/VBox/Runtime/r3/win/fileaio-win.cpp            |   11 +-
 src/VBox/Runtime/r3/win/fileio-win.cpp             |    8 +-
 src/VBox/Runtime/r3/win/fs-win.cpp                 |    4 +-
 src/VBox/Runtime/r3/win/init-win.cpp               |    5 +-
 src/VBox/Runtime/r3/win/internal-r3-win.h          |    2 +-
 src/VBox/Runtime/r3/win/ldrNative-win.cpp          |    3 +-
 src/VBox/Runtime/r3/win/localipc-win.cpp           |   19 +-
 src/VBox/Runtime/r3/win/mp-win.cpp                 |    4 +-
 src/VBox/Runtime/r3/win/ntdll-mini-implib.def      |    2 +-
 src/VBox/Runtime/r3/win/path-win.cpp               |    7 +-
 src/VBox/Runtime/r3/win/pipe-win.cpp               |   31 +-
 src/VBox/Runtime/r3/win/process-win.cpp            |    9 +-
 .../r3/win/rtFileNativeSetAttributes-win.cpp       |   34 +-
 src/VBox/Runtime/r3/win/rtProcInitExePath-win.cpp  |    4 +-
 src/VBox/Runtime/r3/win/sched-win.cpp              |   14 +-
 src/VBox/Runtime/r3/win/semevent-win.cpp           |   17 +-
 src/VBox/Runtime/r3/win/semeventmulti-win.cpp      |   14 +-
 src/VBox/Runtime/r3/win/semmutex-win.cpp           |    8 +-
 src/VBox/Runtime/r3/win/symlink-win.cpp            |    9 +-
 src/VBox/Runtime/r3/win/thread-win.cpp             |    4 +-
 src/VBox/Runtime/r3/win/thread2-win.cpp            |    4 +-
 src/VBox/Runtime/r3/win/time-win.cpp               |    4 +-
 src/VBox/Runtime/r3/win/time2-win.cpp              |    4 +-
 src/VBox/Runtime/r3/win/timer-win.cpp              |   34 +-
 src/VBox/Runtime/r3/win/tls-win.cpp                |    4 +-
 src/VBox/Runtime/r3/win/utf16locale-win.cpp        |    4 +-
 src/VBox/Runtime/r3/win/utf8-win.cpp               |    4 +-
 src/VBox/Runtime/r3/win/uuid-win.cpp               |    4 +-
 src/VBox/Runtime/r3/win/vcc100-kernel32-fakes.cpp  |    4 +-
 src/VBox/Runtime/r3/win/vcc100-msvcrt-fakes.cpp    |    2 +-
 src/VBox/Runtime/r3/win/vcc100-ntdll-fakes.cpp     |    5 +-
 src/VBox/Runtime/r3/win/vcc100-ws2_32-fakes.cpp    |    6 +-
 src/VBox/Runtime/r3/xml.cpp                        |   12 +-
 src/VBox/Runtime/testcase/72kb-random.h            |    2 +-
 src/VBox/Runtime/testcase/Makefile.kmk             |    2 +-
 src/VBox/Runtime/testcase/ntGetTimerResolution.cpp |   11 +-
 src/VBox/Runtime/testcase/tstDarwinSched.cpp       |    2 +-
 src/VBox/Runtime/testcase/tstDir-2.cpp             |    2 +-
 src/VBox/Runtime/testcase/tstDir-3.cpp             |    2 +-
 src/VBox/Runtime/testcase/tstDir.cpp               |    2 +-
 src/VBox/Runtime/testcase/tstEnv.cpp               |    2 +-
 src/VBox/Runtime/testcase/tstFile.cpp              |    2 +-
 src/VBox/Runtime/testcase/tstFileAppendWin-1.cpp   |    4 +-
 src/VBox/Runtime/testcase/tstFileLock.cpp          |    2 +-
 src/VBox/Runtime/testcase/tstFork.cpp              |    2 +-
 src/VBox/Runtime/testcase/tstHandleTable.cpp       |    6 +-
 src/VBox/Runtime/testcase/tstIprtList.cpp          |   11 +-
 src/VBox/Runtime/testcase/tstIprtMiniString.cpp    |    5 +-
 src/VBox/Runtime/testcase/tstLdr-2.cpp             |    6 +-
 src/VBox/Runtime/testcase/tstLdr-3.cpp             |   13 +-
 src/VBox/Runtime/testcase/tstLdr-4.cpp             |    3 +-
 src/VBox/Runtime/testcase/tstLdr-4Imp-os2.def      |    2 +-
 src/VBox/Runtime/testcase/tstLdr-4Imp-win.def      |    2 +-
 src/VBox/Runtime/testcase/tstLdr.cpp               |    6 +-
 src/VBox/Runtime/testcase/tstLdrDisasmTest.cpp     |    2 +-
 src/VBox/Runtime/testcase/tstLdrLoad.cpp           |    2 +-
 src/VBox/Runtime/testcase/tstLdrObj.cpp            |    2 +-
 src/VBox/Runtime/testcase/tstLdrObjR0.cpp          |    2 +-
 src/VBox/Runtime/testcase/tstLog.cpp               |    8 +-
 src/VBox/Runtime/testcase/tstMove.cpp              |    2 +-
 src/VBox/Runtime/testcase/tstNoCrt-1.cpp           |    2 +-
 src/VBox/Runtime/testcase/tstOnce.cpp              |    2 +-
 src/VBox/Runtime/testcase/tstPrfRT.cpp             |   31 +-
 src/VBox/Runtime/testcase/tstRTAssertCompile.cpp   |    5 +-
 src/VBox/Runtime/testcase/tstRTAvl.cpp             |    2 +-
 src/VBox/Runtime/testcase/tstRTBase64.cpp          |    2 +-
 src/VBox/Runtime/testcase/tstRTBigNum.cpp          |    6 +-
 src/VBox/Runtime/testcase/tstRTBitOperations.cpp   |    2 +-
 src/VBox/Runtime/testcase/tstRTCType.cpp           |    2 +-
 src/VBox/Runtime/testcase/tstRTCidr.cpp            |    2 +-
 src/VBox/Runtime/testcase/tstRTCircBuf.cpp         |   28 +-
 src/VBox/Runtime/testcase/tstRTCoreDump.cpp        |    2 +-
 src/VBox/Runtime/testcase/tstRTCrX509-1.cpp        |    1 -
 src/VBox/Runtime/testcase/tstRTCritSect.cpp        |   16 +-
 src/VBox/Runtime/testcase/tstRTCritSectRw.cpp      |    3 +-
 .../Runtime/testcase/tstRTDarwinMachKernel.cpp     |    4 +-
 src/VBox/Runtime/testcase/tstRTDigest-2.cpp        |    2 +-
 src/VBox/Runtime/testcase/tstRTDigest.cpp          |    2 +-
 .../testcase/tstRTDirCreateUniqueNumbered.cpp      |   21 +-
 src/VBox/Runtime/testcase/tstRTDvm.cpp             |    2 +-
 src/VBox/Runtime/testcase/tstRTErrUnique.cpp       |    2 +-
 src/VBox/Runtime/testcase/tstRTFileAio.cpp         |    2 +-
 src/VBox/Runtime/testcase/tstRTFileAppend-1.cpp    |    2 +-
 src/VBox/Runtime/testcase/tstRTFileGetSize-1.cpp   |    2 +-
 .../testcase/tstRTFileModeStringToFlags.cpp        |    2 +-
 src/VBox/Runtime/testcase/tstRTFilesystem.cpp      |    2 +-
 src/VBox/Runtime/testcase/tstRTFsQueries.cpp       |    2 +-
 src/VBox/Runtime/testcase/tstRTGetOpt.cpp          |    2 +-
 src/VBox/Runtime/testcase/tstRTGetOptArgv.cpp      |   61 +-
 src/VBox/Runtime/testcase/tstRTHeapOffset.cpp      |    6 +-
 src/VBox/Runtime/testcase/tstRTHeapSimple.cpp      |    6 +-
 src/VBox/Runtime/testcase/tstRTHttp.cpp            |    4 +-
 src/VBox/Runtime/testcase/tstRTInlineAsm.cpp       |   20 +-
 src/VBox/Runtime/testcase/tstRTJson.cpp            |    3 +
 .../Runtime/testcase/tstRTLdrVerifyPeImage.cpp     |    4 +-
 src/VBox/Runtime/testcase/tstRTList.cpp            |    2 +-
 src/VBox/Runtime/testcase/tstRTLocalIpc.cpp        |    7 +-
 src/VBox/Runtime/testcase/tstRTLockValidator.cpp   |    9 +-
 src/VBox/Runtime/testcase/tstRTManifest.cpp        |    2 +-
 src/VBox/Runtime/testcase/tstRTMemCache.cpp        |    7 +-
 src/VBox/Runtime/testcase/tstRTMemEf.cpp           |    2 +-
 src/VBox/Runtime/testcase/tstRTMemPool.cpp         |    4 +-
 src/VBox/Runtime/testcase/tstRTMemSafer.cpp        |    4 +-
 src/VBox/Runtime/testcase/tstRTMemWipe.cpp         |    6 +-
 src/VBox/Runtime/testcase/tstRTMp-1.cpp            |    2 +-
 src/VBox/Runtime/testcase/tstRTNetIPv4.cpp         |    2 +-
 src/VBox/Runtime/testcase/tstRTNetIPv6.cpp         |    2 +-
 src/VBox/Runtime/testcase/tstRTPathGlob.cpp        |    3 +-
 src/VBox/Runtime/testcase/tstRTPipe.cpp            |    4 +-
 src/VBox/Runtime/testcase/tstRTPoll.cpp            |    2 +-
 src/VBox/Runtime/testcase/tstRTPrfIO.cpp           |    4 +-
 src/VBox/Runtime/testcase/tstRTProcCreateEx.cpp    |    4 +-
 src/VBox/Runtime/testcase/tstRTProcCreatePrf.cpp   |    2 +-
 .../Runtime/testcase/tstRTProcIsRunningByName.cpp  |    2 +-
 .../Runtime/testcase/tstRTProcQueryUsername.cpp    |    4 +-
 src/VBox/Runtime/testcase/tstRTProcWait.cpp        |    3 +-
 src/VBox/Runtime/testcase/tstRTR0Common.h          |    2 +-
 src/VBox/Runtime/testcase/tstRTR0CommonDriver.h    |    4 +-
 src/VBox/Runtime/testcase/tstRTR0CommonReq.h       |    2 +-
 src/VBox/Runtime/testcase/tstRTR0DbgKrnlInfo.cpp   |    7 +-
 src/VBox/Runtime/testcase/tstRTR0DbgKrnlInfo.h     |    2 +-
 .../Runtime/testcase/tstRTR0DbgKrnlInfoDriver.cpp  |    3 +-
 src/VBox/Runtime/testcase/tstRTR0MemUserKernel.cpp |    2 +-
 src/VBox/Runtime/testcase/tstRTR0MemUserKernel.h   |    2 +-
 .../testcase/tstRTR0MemUserKernelDriver.cpp        |    3 +-
 src/VBox/Runtime/testcase/tstRTR0SemMutex.cpp      |    2 +-
 src/VBox/Runtime/testcase/tstRTR0SemMutex.h        |    2 +-
 .../Runtime/testcase/tstRTR0SemMutexDriver.cpp     |    4 +-
 src/VBox/Runtime/testcase/tstRTR0Thread.cpp        |    4 +-
 src/VBox/Runtime/testcase/tstRTR0Thread.h          |    2 +-
 src/VBox/Runtime/testcase/tstRTR0ThreadDriver.cpp  |    3 +-
 .../Runtime/testcase/tstRTR0ThreadPreemption.cpp   |    2 +-
 .../Runtime/testcase/tstRTR0ThreadPreemption.h     |    2 +-
 .../testcase/tstRTR0ThreadPreemptionDriver.cpp     |    5 +-
 src/VBox/Runtime/testcase/tstRTR0Timer.cpp         |    2 +-
 src/VBox/Runtime/testcase/tstRTR0Timer.h           |    2 +-
 src/VBox/Runtime/testcase/tstRTR0TimerDriver.cpp   |    6 +-
 src/VBox/Runtime/testcase/tstRTReqPool.cpp         |    2 +-
 src/VBox/Runtime/testcase/tstRTS3.cpp              |    6 +-
 src/VBox/Runtime/testcase/tstRTSemEventMulti.cpp   |    7 +-
 src/VBox/Runtime/testcase/tstRTSemRW.cpp           |    4 +-
 src/VBox/Runtime/testcase/tstRTSemXRoads.cpp       |    8 +-
 src/VBox/Runtime/testcase/tstRTSort.cpp            |    2 +-
 src/VBox/Runtime/testcase/tstRTStrAlloc.cpp        |    2 +-
 src/VBox/Runtime/testcase/tstRTStrCache.cpp        |    2 +-
 src/VBox/Runtime/testcase/tstRTStrCatCopy.cpp      |    2 +-
 src/VBox/Runtime/testcase/tstRTStrFormat.cpp       |   31 +-
 src/VBox/Runtime/testcase/tstRTStrVersion.cpp      |    2 +-
 src/VBox/Runtime/testcase/tstRTSymlink.cpp         |    6 +-
 src/VBox/Runtime/testcase/tstRTSystemQueryDmi.cpp  |    2 +-
 .../Runtime/testcase/tstRTSystemQueryOsInfo.cpp    |    8 +-
 src/VBox/Runtime/testcase/tstRTTcp-1.cpp           |   11 +-
 src/VBox/Runtime/testcase/tstRTTemp.cpp            |    2 +-
 .../Runtime/testcase/tstRTThreadExecutionTime.cpp  |    4 +-
 src/VBox/Runtime/testcase/tstRTThreadPoke.cpp      |    3 +-
 src/VBox/Runtime/testcase/tstRTTime.cpp            |    2 +-
 src/VBox/Runtime/testcase/tstRTTimeSpec.cpp        |    2 +-
 src/VBox/Runtime/testcase/tstRTUdp-1.cpp           |    3 +-
 src/VBox/Runtime/testcase/tstRTUri.cpp             |    4 +-
 src/VBox/Runtime/testcase/tstRTUuid.cpp            |    4 +-
 src/VBox/Runtime/testcase/tstRTVfs.cpp             |    5 +-
 src/VBox/Runtime/testcase/tstRTZip.cpp             |    2 +-
 src/VBox/Runtime/testcase/tstRand.cpp              |    2 +-
 src/VBox/Runtime/testcase/tstSemMutex.cpp          |    2 +-
 src/VBox/Runtime/testcase/tstSemPingPong.cpp       |    6 +-
 src/VBox/Runtime/testcase/tstStrSimplePattern.cpp  |    2 +-
 src/VBox/Runtime/testcase/tstStrToNum.cpp          |   10 +-
 src/VBox/Runtime/testcase/tstTSC.cpp               |    5 +-
 src/VBox/Runtime/testcase/tstTermCallbacks.cpp     |    8 +-
 src/VBox/Runtime/testcase/tstThread-1.cpp          |    6 +-
 src/VBox/Runtime/testcase/tstTime-2.cpp            |    2 +-
 src/VBox/Runtime/testcase/tstTime-3.cpp            |    4 +-
 src/VBox/Runtime/testcase/tstTime-4.cpp            |    2 +-
 src/VBox/Runtime/testcase/tstTimer.cpp             |    4 +-
 src/VBox/Runtime/testcase/tstTimerLR.cpp           |    4 +-
 src/VBox/Runtime/testcase/tstUtf8.cpp              |   28 +-
 src/VBox/Runtime/testcase/tstVector.cpp            |   23 +-
 src/VBox/Runtime/tools/Makefile.kmk                |    2 +-
 src/VBox/Runtime/tools/RTDbgSymCache.cpp           |    8 +-
 src/VBox/Runtime/tools/RTGzip.cpp                  |   12 +-
 src/VBox/Runtime/tools/RTHttp.cpp                  |    4 +-
 src/VBox/Runtime/tools/RTLdrFlt.cpp                |    4 +-
 src/VBox/Runtime/tools/RTManifest.cpp              |    4 +-
 src/VBox/Runtime/tools/RTNtDbgHelp.cpp             |   17 +-
 src/VBox/Runtime/tools/RTRm.cpp                    |    2 +-
 src/VBox/Runtime/tools/RTShutdown.cpp              |    2 +-
 src/VBox/Runtime/tools/RTSignTool.cpp              |   13 +-
 src/VBox/Runtime/tools/RTTar.cpp                   |    2 +-
 src/VBox/Runtime/tools/RTUnzip.cpp                 |    2 +-
 src/VBox/Runtime/win/RTErrConvertFromWin32.cpp     |    6 +-
 src/VBox/Runtime/win/amd64/ASMAtomicBitClear.asm   |    2 +-
 .../win/amd64/ASMAtomicBitTestAndToggle.asm        |    2 +-
 src/VBox/Runtime/win/amd64/ASMAtomicBitToggle.asm  |    2 +-
 src/VBox/Runtime/win/amd64/ASMAtomicReadU64.asm    |    2 +-
 src/VBox/Runtime/win/amd64/ASMAtomicXchgU8.asm     |    2 +-
 src/VBox/Runtime/win/amd64/ASMGetCS.asm            |    2 +-
 src/VBox/Runtime/win/amd64/ASMGetDR0.asm           |    2 +-
 src/VBox/Runtime/win/amd64/ASMGetDR1.asm           |    2 +-
 src/VBox/Runtime/win/amd64/ASMGetDR2.asm           |    2 +-
 src/VBox/Runtime/win/amd64/ASMGetDR3.asm           |    2 +-
 src/VBox/Runtime/win/amd64/ASMGetDR6.asm           |    2 +-
 src/VBox/Runtime/win/amd64/ASMGetDR7.asm           |    2 +-
 src/VBox/Runtime/win/amd64/ASMGetDS.asm            |    2 +-
 src/VBox/Runtime/win/amd64/ASMGetES.asm            |    2 +-
 src/VBox/Runtime/win/amd64/ASMGetFS.asm            |    2 +-
 src/VBox/Runtime/win/amd64/ASMGetFlags.asm         |    2 +-
 src/VBox/Runtime/win/amd64/ASMGetGS.asm            |    2 +-
 src/VBox/Runtime/win/amd64/ASMGetSS.asm            |    2 +-
 src/VBox/Runtime/win/amd64/ASMProbeReadByte.asm    |    2 +-
 src/VBox/Runtime/win/amd64/ASMSetFlags.asm         |    2 +-
 src/VBox/Runtime/win/errmsgwin.cpp                 |    4 +-
 src/VBox/Storage/DMG.cpp                           |   29 +-
 src/VBox/Storage/Debug/Makefile.kmk                |    2 +-
 src/VBox/Storage/Debug/VDDbgIoLog.cpp              |    2 +-
 src/VBox/Storage/ISCSI.cpp                         |   45 +-
 src/VBox/Storage/Makefile.kmk                      |    2 +-
 src/VBox/Storage/Parallels.cpp                     |   17 +-
 src/VBox/Storage/QCOW.cpp                          |   59 +-
 src/VBox/Storage/QED.cpp                           |   51 +-
 src/VBox/Storage/RAW.cpp                           |   84 +-
 src/VBox/Storage/VCICache.cpp                      |   40 +-
 src/VBox/Storage/VD.cpp                            |  132 +-
 src/VBox/Storage/VDBackends.h                      |    2 +-
 src/VBox/Storage/VDI.cpp                           |   19 +-
 src/VBox/Storage/VDICore.h                         |   10 +-
 src/VBox/Storage/VDIfVfs.cpp                       |    3 +-
 src/VBox/Storage/VDIfVfs2.cpp                      |    9 +-
 src/VBox/Storage/VDVfs.cpp                         |    2 +-
 src/VBox/Storage/VHD.cpp                           |   29 +-
 src/VBox/Storage/VHDX.cpp                          |   67 +-
 src/VBox/Storage/VMDK.cpp                          |   53 +-
 src/VBox/Storage/testcase/BuiltinTests.h           |    2 +-
 src/VBox/Storage/testcase/Makefile.kmk             |   10 +-
 src/VBox/Storage/testcase/VDDefs.h                 |    2 +-
 src/VBox/Storage/testcase/VDIoBackend.cpp          |    4 +-
 src/VBox/Storage/testcase/VDIoBackend.h            |    2 +-
 src/VBox/Storage/testcase/VDIoBackendMem.cpp       |    5 +-
 src/VBox/Storage/testcase/VDIoBackendMem.h         |    2 +-
 src/VBox/Storage/testcase/VDIoRnd.cpp              |    2 +-
 src/VBox/Storage/testcase/VDIoRnd.h                |    2 +-
 src/VBox/Storage/testcase/VDMemDisk.cpp            |   12 +-
 src/VBox/Storage/testcase/VDMemDisk.h              |    2 +-
 src/VBox/Storage/testcase/VDScript.cpp             |   49 +-
 src/VBox/Storage/testcase/VDScript.h               |    2 +-
 src/VBox/Storage/testcase/VDScriptAst.cpp          |    4 +-
 src/VBox/Storage/testcase/VDScriptAst.h            |   13 +-
 src/VBox/Storage/testcase/VDScriptChecker.cpp      |    3 +-
 src/VBox/Storage/testcase/VDScriptInternal.h       |    2 +-
 src/VBox/Storage/testcase/VDScriptInterp.cpp       |   16 +-
 src/VBox/Storage/testcase/VDScriptStack.h          |    2 +-
 src/VBox/Storage/testcase/tstVD-2.cpp              |    5 +-
 src/VBox/Storage/testcase/tstVD.cpp                |   10 +-
 src/VBox/Storage/testcase/tstVDFill.cpp            |    3 +
 src/VBox/Storage/testcase/tstVDIo.cpp              |  236 +-
 src/VBox/Storage/testcase/tstVDSnap.cpp            |    9 +-
 src/VBox/Storage/testcase/vbox-img.cpp             |   18 +-
 src/VBox/Storage/testcase/vbox-img.rc              |    2 +-
 src/VBox/VMM/Docs-CodingGuidelines.cpp             |    2 +-
 src/VBox/VMM/Docs-RawMode.cpp                      |    2 +-
 src/VBox/VMM/Makefile.kmk                          |    4 +-
 src/VBox/VMM/VMMAll/APICAll.cpp                    |   36 +-
 src/VBox/VMM/VMMAll/CPUMAllMsrs.cpp                |  466 +-
 src/VBox/VMM/VMMAll/CPUMAllRegs.cpp                |    7 +-
 src/VBox/VMM/VMMAll/CPUMStack.cpp                  |    7 +-
 src/VBox/VMM/VMMAll/CSAMAll.cpp                    |    5 +-
 src/VBox/VMM/VMMAll/DBGFAll.cpp                    |    2 +-
 src/VBox/VMM/VMMAll/EMAll.cpp                      |   22 +-
 src/VBox/VMM/VMMAll/EMAllA.asm                     |    2 +-
 src/VBox/VMM/VMMAll/FTMAll.cpp                     |    2 +-
 src/VBox/VMM/VMMAll/GIMAll.cpp                     |    2 +-
 src/VBox/VMM/VMMAll/GIMAllHv.cpp                   |  151 +-
 src/VBox/VMM/VMMAll/GIMAllKvm.cpp                  |    4 +-
 src/VBox/VMM/VMMAll/HMAll.cpp                      |    2 +-
 src/VBox/VMM/VMMAll/IEMAll.cpp                     |  118 +-
 src/VBox/VMM/VMMAll/IEMAllAImpl.asm                |    2 +-
 src/VBox/VMM/VMMAll/IEMAllAImplC.cpp               |   30 +-
 src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h              |   21 +-
 src/VBox/VMM/VMMAll/IEMAllCImplStrInstr.cpp.h      |    2 +-
 src/VBox/VMM/VMMAll/IEMAllInstructions.cpp.h       |   46 +-
 src/VBox/VMM/VMMAll/IOMAll.cpp                     |    2 +-
 src/VBox/VMM/VMMAll/IOMAllMMIO.cpp                 |   38 +-
 src/VBox/VMM/VMMAll/MMAll.cpp                      |    2 +-
 src/VBox/VMM/VMMAll/MMAllHyper.cpp                 |    2 +-
 src/VBox/VMM/VMMAll/MMAllPagePool.cpp              |    2 +-
 src/VBox/VMM/VMMAll/PATMAll.cpp                    |    3 +-
 src/VBox/VMM/VMMAll/PDMAll.cpp                     |    2 +-
 src/VBox/VMM/VMMAll/PDMAllCritSect.cpp             |    2 +-
 src/VBox/VMM/VMMAll/PDMAllCritSectBoth.cpp         |    2 +-
 src/VBox/VMM/VMMAll/PDMAllCritSectRw.cpp           |    9 +-
 src/VBox/VMM/VMMAll/PDMAllNetShaper.cpp            |    2 +-
 src/VBox/VMM/VMMAll/PDMAllQueue.cpp                |    2 +-
 src/VBox/VMM/VMMAll/PGMAll.cpp                     |    2 +-
 src/VBox/VMM/VMMAll/PGMAllBth.h                    |   12 +-
 src/VBox/VMM/VMMAll/PGMAllGst.h                    |    4 +-
 src/VBox/VMM/VMMAll/PGMAllHandler.cpp              |    4 +-
 src/VBox/VMM/VMMAll/PGMAllMap.cpp                  |    4 +-
 src/VBox/VMM/VMMAll/PGMAllPhys.cpp                 |    6 +-
 src/VBox/VMM/VMMAll/PGMAllPool.cpp                 |   26 +-
 src/VBox/VMM/VMMAll/PGMAllShw.h                    |    2 +-
 src/VBox/VMM/VMMAll/REMAll.cpp                     |    2 +-
 src/VBox/VMM/VMMAll/SELMAll.cpp                    |    9 +-
 src/VBox/VMM/VMMAll/TMAll.cpp                      |    4 +-
 src/VBox/VMM/VMMAll/TMAllCpu.cpp                   |    5 +-
 src/VBox/VMM/VMMAll/TMAllReal.cpp                  |    2 +-
 src/VBox/VMM/VMMAll/TMAllVirtual.cpp               |    2 +-
 src/VBox/VMM/VMMAll/TRPMAll.cpp                    |    4 +-
 src/VBox/VMM/VMMAll/VMAll.cpp                      |    2 +-
 src/VBox/VMM/VMMAll/VMMAll.cpp                     |    6 +-
 src/VBox/VMM/VMMAll/VMMAllA.asm                    |    2 +-
 src/VBox/VMM/VMMR0/CPUMR0.cpp                      |    2 +-
 src/VBox/VMM/VMMR0/GIMR0.cpp                       |    2 +-
 src/VBox/VMM/VMMR0/GIMR0Hv.cpp                     |    2 +-
 src/VBox/VMM/VMMR0/GIMR0Kvm.cpp                    |    2 +-
 src/VBox/VMM/VMMR0/GMMR0.cpp                       |    4 +-
 src/VBox/VMM/VMMR0/GMMR0Internal.h                 |    2 +-
 src/VBox/VMM/VMMR0/GVMMR0.cpp                      |    2 +-
 src/VBox/VMM/VMMR0/GVMMR0Internal.h                |    2 +-
 src/VBox/VMM/VMMR0/HMR0.cpp                        |    4 +-
 src/VBox/VMM/VMMR0/HMR0A.asm                       |    2 +-
 src/VBox/VMM/VMMR0/HMSVMR0.cpp                     |   33 +-
 src/VBox/VMM/VMMR0/HMSVMR0.h                       |    2 +-
 src/VBox/VMM/VMMR0/HMVMXR0.cpp                     |   51 +-
 src/VBox/VMM/VMMR0/HMVMXR0.h                       |    2 +-
 src/VBox/VMM/VMMR0/PDMR0Device.cpp                 |   10 +-
 src/VBox/VMM/VMMR0/PDMR0Driver.cpp                 |    2 +-
 src/VBox/VMM/VMMR0/PGMR0.cpp                       |    6 +-
 src/VBox/VMM/VMMR0/PGMR0Bth.h                      |    2 +-
 src/VBox/VMM/VMMR0/PGMR0SharedPage.cpp             |    2 +-
 src/VBox/VMM/VMMR0/TRPMR0.cpp                      |    2 +-
 src/VBox/VMM/VMMR0/TRPMR0A.asm                     |    2 +-
 src/VBox/VMM/VMMR0/VMMR0.cpp                       |    4 +-
 src/VBox/VMM/VMMR0/VMMR0.def                       |    2 +-
 src/VBox/VMM/VMMR0/VMMR0JmpA-amd64.asm             |    2 +-
 src/VBox/VMM/VMMR0/VMMR0JmpA-x86.asm               |    2 +-
 src/VBox/VMM/VMMR0/VMMR0TripleFaultHack.cpp        |    2 +-
 src/VBox/VMM/VMMR0/VMMR0TripleFaultHackA.asm       |    2 +-
 src/VBox/VMM/VMMR3/APIC.cpp                        |   30 +-
 src/VBox/VMM/VMMR3/CFGM.cpp                        |    2 +-
 src/VBox/VMM/VMMR3/CPUM.cpp                        |   10 +-
 src/VBox/VMM/VMMR3/CPUMDbg.cpp                     |    5 +-
 src/VBox/VMM/VMMR3/CPUMR3CpuId.cpp                 |   91 +-
 src/VBox/VMM/VMMR3/CPUMR3Db.cpp                    |    4 +-
 src/VBox/VMM/VMMR3/CSAM.cpp                        |   14 +-
 src/VBox/VMM/VMMR3/DBGF.cpp                        |    4 +-
 src/VBox/VMM/VMMR3/DBGFAddr.cpp                    |    2 +-
 src/VBox/VMM/VMMR3/DBGFAddrSpace.cpp               |   19 +-
 src/VBox/VMM/VMMR3/DBGFBp.cpp                      |   21 +-
 src/VBox/VMM/VMMR3/DBGFCoreWrite.cpp               |    2 +-
 src/VBox/VMM/VMMR3/DBGFCpu.cpp                     |    2 +-
 src/VBox/VMM/VMMR3/DBGFDisas.cpp                   |    6 +-
 src/VBox/VMM/VMMR3/DBGFInfo.cpp                    |    2 +-
 src/VBox/VMM/VMMR3/DBGFLog.cpp                     |    2 +-
 src/VBox/VMM/VMMR3/DBGFMem.cpp                     |    2 +-
 src/VBox/VMM/VMMR3/DBGFModule.cpp                  |    2 +-
 src/VBox/VMM/VMMR3/DBGFOS.cpp                      |    3 +-
 src/VBox/VMM/VMMR3/DBGFR3PlugIn.cpp                |    3 +-
 src/VBox/VMM/VMMR3/DBGFR3Trace.cpp                 |    2 +-
 src/VBox/VMM/VMMR3/DBGFR3Type.cpp                  |    9 +-
 src/VBox/VMM/VMMR3/DBGFReg.cpp                     |    4 +-
 src/VBox/VMM/VMMR3/DBGFStack.cpp                   |    2 +-
 src/VBox/VMM/VMMR3/EM.cpp                          |   24 +-
 src/VBox/VMM/VMMR3/EMHM.cpp                        |    3 +-
 src/VBox/VMM/VMMR3/EMR3Dbg.cpp                     |    3 +-
 src/VBox/VMM/VMMR3/EMRaw.cpp                       |    6 +-
 src/VBox/VMM/VMMR3/FTM.cpp                         |    6 +-
 src/VBox/VMM/VMMR3/GIM.cpp                         |   13 +-
 src/VBox/VMM/VMMR3/GIMHv.cpp                       |  265 +-
 src/VBox/VMM/VMMR3/GIMKvm.cpp                      |   45 +-
 src/VBox/VMM/VMMR3/GIMMinimal.cpp                  |   53 +-
 src/VBox/VMM/VMMR3/GMM.cpp                         |    2 +-
 src/VBox/VMM/VMMR3/HM.cpp                          |    8 +-
 src/VBox/VMM/VMMR3/IEMR3.cpp                       |    2 +-
 src/VBox/VMM/VMMR3/IOM.cpp                         |    8 +-
 src/VBox/VMM/VMMR3/MM.cpp                          |    2 +-
 src/VBox/VMM/VMMR3/MMHeap.cpp                      |    4 +-
 src/VBox/VMM/VMMR3/MMHyper.cpp                     |    2 +-
 src/VBox/VMM/VMMR3/MMPagePool.cpp                  |    2 +-
 src/VBox/VMM/VMMR3/MMUkHeap.cpp                    |    6 +-
 src/VBox/VMM/VMMR3/PATM.cpp                        |   42 +-
 src/VBox/VMM/VMMR3/PATMA.asm                       |    2 +-
 src/VBox/VMM/VMMR3/PATMA.mac                       |    2 +-
 src/VBox/VMM/VMMR3/PATMGuest.cpp                   |    3 +-
 src/VBox/VMM/VMMR3/PATMPatch.cpp                   |   16 +-
 src/VBox/VMM/VMMR3/PATMPatch.h                     |    2 +-
 src/VBox/VMM/VMMR3/PATMR3Dbg.cpp                   |    2 +-
 src/VBox/VMM/VMMR3/PATMSSM.cpp                     |    7 +-
 src/VBox/VMM/VMMR3/PDM.cpp                         |    6 +-
 src/VBox/VMM/VMMR3/PDMAsyncCompletion.cpp          |   71 +-
 src/VBox/VMM/VMMR3/PDMAsyncCompletionFile.cpp      |    2 +-
 .../VMM/VMMR3/PDMAsyncCompletionFileFailsafe.cpp   |    2 +-
 .../VMM/VMMR3/PDMAsyncCompletionFileNormal.cpp     |   10 +-
 src/VBox/VMM/VMMR3/PDMBlkCache.cpp                 |    2 +-
 src/VBox/VMM/VMMR3/PDMCritSect.cpp                 |    5 +-
 src/VBox/VMM/VMMR3/PDMDevHlp.cpp                   |   15 +-
 src/VBox/VMM/VMMR3/PDMDevMiscHlp.cpp               |   11 +-
 src/VBox/VMM/VMMR3/PDMDevice.cpp                   |    4 +-
 src/VBox/VMM/VMMR3/PDMDriver.cpp                   |   11 +-
 src/VBox/VMM/VMMR3/PDMLdr.cpp                      |   13 +-
 src/VBox/VMM/VMMR3/PDMNetShaper.cpp                |   39 +-
 src/VBox/VMM/VMMR3/PDMQueue.cpp                    |    2 +-
 src/VBox/VMM/VMMR3/PDMThread.cpp                   |    4 +-
 src/VBox/VMM/VMMR3/PDMUsb.cpp                      |    9 +-
 src/VBox/VMM/VMMR3/PGM.cpp                         |   24 +-
 src/VBox/VMM/VMMR3/PGMBth.h                        |    2 +-
 src/VBox/VMM/VMMR3/PGMDbg.cpp                      |    6 +-
 src/VBox/VMM/VMMR3/PGMGst.h                        |    2 +-
 src/VBox/VMM/VMMR3/PGMHandler.cpp                  |    2 +-
 src/VBox/VMM/VMMR3/PGMMap.cpp                      |    9 +-
 src/VBox/VMM/VMMR3/PGMPhys.cpp                     |  149 +-
 src/VBox/VMM/VMMR3/PGMPhysRWTmpl.h                 |    2 +-
 src/VBox/VMM/VMMR3/PGMPool.cpp                     |    6 +-
 src/VBox/VMM/VMMR3/PGMR3DbgA.asm                   |    2 +-
 src/VBox/VMM/VMMR3/PGMSavedState.cpp               |    2 +-
 src/VBox/VMM/VMMR3/PGMSharedPage.cpp               |    2 +-
 src/VBox/VMM/VMMR3/PGMShw.h                        |    2 +-
 src/VBox/VMM/VMMR3/SELM.cpp                        |   38 +-
 src/VBox/VMM/VMMR3/SSM.cpp                         |    9 +-
 src/VBox/VMM/VMMR3/STAM.cpp                        |   21 +-
 src/VBox/VMM/VMMR3/TM.cpp                          |   81 +-
 src/VBox/VMM/VMMR3/TRPM.cpp                        |   22 +-
 src/VBox/VMM/VMMR3/VM.cpp                          |   17 +-
 src/VBox/VMM/VMMR3/VMEmt.cpp                       |   21 +-
 src/VBox/VMM/VMMR3/VMM.cpp                         |    8 +-
 src/VBox/VMM/VMMR3/VMMGuruMeditation.cpp           |    2 +-
 src/VBox/VMM/VMMR3/VMMR3.def                       |    6 +-
 src/VBox/VMM/VMMR3/VMMSwitcher.cpp                 |   24 +-
 src/VBox/VMM/VMMR3/VMMTests.cpp                    |   42 +-
 src/VBox/VMM/VMMR3/VMReq.cpp                       |   21 +-
 src/VBox/VMM/VMMR3/cpus/AMD_Athlon_64_3200.h       |    2 +-
 .../VMMR3/cpus/AMD_Athlon_64_X2_Dual_Core_4200.h   |    2 +-
 src/VBox/VMM/VMMR3/cpus/AMD_FX_8150_Eight_Core.h   |    2 +-
 src/VBox/VMM/VMMR3/cpus/AMD_Phenom_II_X6_1100T.h   |    2 +-
 src/VBox/VMM/VMMR3/cpus/Intel_Atom_330_1_60GHz.h   |    8 +-
 src/VBox/VMM/VMMR3/cpus/Intel_Core_i5_3570.h       |    2 +-
 src/VBox/VMM/VMMR3/cpus/Intel_Core_i7_2635QM.h     |    2 +-
 src/VBox/VMM/VMMR3/cpus/Intel_Core_i7_3820QM.h     |    2 +-
 src/VBox/VMM/VMMR3/cpus/Intel_Core_i7_3960X.h      |    2 +-
 src/VBox/VMM/VMMR3/cpus/Intel_Core_i7_5600U.h      |    8 +-
 src/VBox/VMM/VMMR3/cpus/Intel_Core_i7_6700K.h      |    8 +-
 src/VBox/VMM/VMMR3/cpus/Intel_Pentium_4_3_00GHz.h  |    2 +-
 .../VMMR3/cpus/Intel_Pentium_M_processor_2_00GHz.h |    2 +-
 .../VMM/VMMR3/cpus/Intel_Pentium_N3530_2_16GHz.h   |    8 +-
 src/VBox/VMM/VMMR3/cpus/Intel_Xeon_X5482_3_20GHz.h |    2 +-
 .../VMM/VMMR3/cpus/Quad_Core_AMD_Opteron_2384.h    |    2 +-
 .../VMM/VMMR3/cpus/VIA_QuadCore_L4700_1_2_GHz.h    |    2 +-
 src/VBox/VMM/VMMRC/CPUMRC.cpp                      |    8 +-
 src/VBox/VMM/VMMRC/CPUMRCA.asm                     |    2 +-
 src/VBox/VMM/VMMRC/CPUMRCPatchHlp.asm              |    2 +-
 src/VBox/VMM/VMMRC/CSAMRC.cpp                      |    6 +-
 src/VBox/VMM/VMMRC/EMRCA.asm                       |    2 +-
 src/VBox/VMM/VMMRC/IOMRC.cpp                       |   18 +-
 src/VBox/VMM/VMMRC/MMRamRC.cpp                     |    2 +-
 src/VBox/VMM/VMMRC/MMRamRCA.asm                    |    2 +-
 src/VBox/VMM/VMMRC/PATMRC.cpp                      |    4 +-
 src/VBox/VMM/VMMRC/PDMRCDevice.cpp                 |   13 +-
 src/VBox/VMM/VMMRC/PGMRC.cpp                       |    2 +-
 src/VBox/VMM/VMMRC/PGMRCBth.h                      |    2 +-
 src/VBox/VMM/VMMRC/PGMRCGst.h                      |    2 +-
 src/VBox/VMM/VMMRC/PGMRCShw.h                      |    2 +-
 src/VBox/VMM/VMMRC/SELMRC.cpp                      |    8 +-
 src/VBox/VMM/VMMRC/TRPMRC.cpp                      |    3 +-
 src/VBox/VMM/VMMRC/TRPMRCHandlers.cpp              |   10 +-
 src/VBox/VMM/VMMRC/TRPMRCHandlersA.asm             |    2 +-
 src/VBox/VMM/VMMRC/VMMRC.cpp                       |    6 +-
 src/VBox/VMM/VMMRC/VMMRC.def                       |    2 +-
 src/VBox/VMM/VMMRC/VMMRC.mac                       |    2 +-
 src/VBox/VMM/VMMRC/VMMRC0.asm                      |    2 +-
 src/VBox/VMM/VMMRC/VMMRC99.asm                     |    2 +-
 src/VBox/VMM/VMMRC/VMMRCA.asm                      |    2 +-
 src/VBox/VMM/VMMRC/VMMRCBuiltin.def                |    2 +-
 src/VBox/VMM/VMMRC/VMMRCDeps.cpp                   |    2 +-
 src/VBox/VMM/VMMRZ/DBGFRZ.cpp                      |    2 +-
 src/VBox/VMM/VMMRZ/PGMRZDynMap.cpp                 |    4 +-
 src/VBox/VMM/VMMRZ/VMMRZ.cpp                       |    2 +-
 src/VBox/VMM/VMMSwitcher/32BitTo32Bit.asm          |    2 +-
 src/VBox/VMM/VMMSwitcher/32BitToAMD64.asm          |    2 +-
 src/VBox/VMM/VMMSwitcher/32BitToPAE.asm            |    2 +-
 src/VBox/VMM/VMMSwitcher/AMD64Stub.asm             |    2 +-
 src/VBox/VMM/VMMSwitcher/AMD64To32Bit.asm          |    2 +-
 src/VBox/VMM/VMMSwitcher/AMD64ToPAE.asm            |    2 +-
 src/VBox/VMM/VMMSwitcher/AMD64andLegacy.mac        |    2 +-
 src/VBox/VMM/VMMSwitcher/LegacyandAMD64.mac        |    2 +-
 src/VBox/VMM/VMMSwitcher/PAETo32Bit.asm            |    2 +-
 src/VBox/VMM/VMMSwitcher/PAEToAMD64.asm            |    2 +-
 src/VBox/VMM/VMMSwitcher/PAEToPAE.asm              |    2 +-
 src/VBox/VMM/VMMSwitcher/PAEand32Bit.mac           |    2 +-
 src/VBox/VMM/VMMSwitcher/X86Stub.asm               |    2 +-
 src/VBox/VMM/include/CFGMInternal.h                |    2 +-
 src/VBox/VMM/include/CPUMInternal.h                |    2 +-
 src/VBox/VMM/include/CPUMInternal.mac              |    2 +-
 src/VBox/VMM/include/CSAMInternal.h                |    4 +-
 src/VBox/VMM/include/DBGFInternal.h                |    2 +-
 src/VBox/VMM/include/EMHandleRCTmpl.h              |    2 +-
 src/VBox/VMM/include/EMInternal.h                  |    2 +-
 src/VBox/VMM/include/FTMInternal.h                 |    2 +-
 src/VBox/VMM/include/GIMHvInternal.h               |   95 +-
 src/VBox/VMM/include/GIMInternal.h                 |    2 +-
 src/VBox/VMM/include/GIMKvmInternal.h              |    4 +-
 src/VBox/VMM/include/GIMMinimalInternal.h          |    2 +-
 src/VBox/VMM/include/HMInternal.h                  |    2 +-
 src/VBox/VMM/include/HMInternal.mac                |    2 +-
 src/VBox/VMM/include/IEMInternal.h                 |    2 +-
 src/VBox/VMM/include/IOMInline.h                   |    2 +-
 src/VBox/VMM/include/IOMInternal.h                 |    4 +-
 src/VBox/VMM/include/MMInternal.h                  |    2 +-
 src/VBox/VMM/include/PATMA.h                       |    2 +-
 src/VBox/VMM/include/PATMInternal.h                |    4 +-
 .../VMM/include/PDMAsyncCompletionFileInternal.h   |    2 +-
 src/VBox/VMM/include/PDMAsyncCompletionInternal.h  |    2 +-
 src/VBox/VMM/include/PDMBlkCacheInternal.h         |    2 +-
 src/VBox/VMM/include/PDMInline.h                   |    2 +-
 src/VBox/VMM/include/PDMInternal.h                 |    2 +-
 src/VBox/VMM/include/PDMNetShaperInternal.h        |    2 +-
 src/VBox/VMM/include/PGMGstDefs.h                  |    2 +-
 src/VBox/VMM/include/PGMInline.h                   |    4 +-
 src/VBox/VMM/include/PGMInternal.h                 |    8 +-
 src/VBox/VMM/include/REMInternal.h                 |    2 +-
 src/VBox/VMM/include/SELMInline.h                  |    9 +-
 src/VBox/VMM/include/SELMInternal.h                |    8 +-
 src/VBox/VMM/include/SSMInternal.h                 |    2 +-
 src/VBox/VMM/include/STAMInternal.h                |    2 +-
 src/VBox/VMM/include/TMInline.h                    |    2 +-
 src/VBox/VMM/include/TMInternal.h                  |    7 +-
 src/VBox/VMM/include/TRPMInternal.h                |   22 +-
 src/VBox/VMM/include/TRPMInternal.mac              |    9 +-
 src/VBox/VMM/include/VMInternal.h                  |    2 +-
 src/VBox/VMM/include/VMMInternal.h                 |    2 +-
 src/VBox/VMM/include/VMMInternal.mac               |    2 +-
 src/VBox/VMM/include/VMMSwitcher.h                 |    2 +-
 src/VBox/VMM/include/VMMSwitcher.mac               |    2 +-
 src/VBox/VMM/include/VMMTracing.h                  |    2 +-
 src/VBox/VMM/testcase/Instructions/Makefile.kmk    |    2 +-
 .../testcase/Instructions/env-bs2-r0-32-big.mac    |    2 +-
 .../testcase/Instructions/env-bs2-r0-64-big.mac    |    2 +-
 .../VMM/testcase/Instructions/env-bs2-r0-64.mac    |    2 +-
 .../VMM/testcase/Instructions/env-bs2-r0-big.mac   |    2 +-
 .../testcase/Instructions/env-bs2-r0-common.mac    |    2 +-
 src/VBox/VMM/testcase/Instructions/env-bs2-r0.mac  |    2 +-
 src/VBox/VMM/testcase/Instructions/env-common.mac  |    2 +-
 .../VMM/testcase/Instructions/env-iprt-r3-32.mac   |    2 +-
 .../VMM/testcase/Instructions/env-iprt-r3-64.mac   |    2 +-
 src/VBox/VMM/testcase/Instructions/env-iprt-r3.mac |    2 +-
 .../VMM/testcase/Instructions/tstVBInsTstR3.cpp    |    2 +-
 src/VBox/VMM/testcase/Makefile.kmk                 |    8 +-
 src/VBox/VMM/testcase/tstAnimate.cpp               |   78 +-
 src/VBox/VMM/testcase/tstAsmStructs.cpp            |    2 +-
 src/VBox/VMM/testcase/tstAsmStructsAsm.asm         |    2 +-
 src/VBox/VMM/testcase/tstCFGM.cpp                  |    4 +-
 src/VBox/VMM/testcase/tstCompressionBenchmark.cpp  |    2 +-
 src/VBox/VMM/testcase/tstGlobalConfig.cpp          |    3 +-
 src/VBox/VMM/testcase/tstHelp.h                    |    2 +-
 src/VBox/VMM/testcase/tstIEMCheckMc.cpp            |    2 +-
 src/VBox/VMM/testcase/tstInstrEmul.cpp             |    2 +-
 src/VBox/VMM/testcase/tstMMHyperHeap.cpp           |    7 +-
 src/VBox/VMM/testcase/tstMicro.cpp                 |    5 +-
 src/VBox/VMM/testcase/tstMicro.h                   |    2 +-
 src/VBox/VMM/testcase/tstMicro.mac                 |    2 +-
 src/VBox/VMM/testcase/tstMicroRC.cpp               |    2 +-
 src/VBox/VMM/testcase/tstMicroRC.def               |    2 +-
 src/VBox/VMM/testcase/tstMicroRCA.asm              |    2 +-
 src/VBox/VMM/testcase/tstPDMAsyncCompletion.cpp    |    5 +-
 .../VMM/testcase/tstPDMAsyncCompletionStress.cpp   |   11 +-
 src/VBox/VMM/testcase/tstSSM-2.cpp                 |    2 +-
 src/VBox/VMM/testcase/tstSSM.cpp                   |    4 +-
 src/VBox/VMM/testcase/tstVMM-HM.cpp                |   12 +-
 src/VBox/VMM/testcase/tstVMM.cpp                   |    8 +-
 src/VBox/VMM/testcase/tstVMMFork.cpp               |    2 +-
 src/VBox/VMM/testcase/tstVMMR0CallHost-1.cpp       |    2 +-
 src/VBox/VMM/testcase/tstVMREQ.cpp                 |    5 +-
 src/VBox/VMM/testcase/tstX86-1.cpp                 |    4 +-
 src/VBox/VMM/testcase/tstX86-1A.asm                |    2 +-
 src/VBox/VMM/testcase/tstX86-FpuSaveRestore.cpp    |    6 +-
 src/VBox/VMM/testcase/tstX86-FpuSaveRestoreA.asm   |    2 +-
 src/VBox/VMM/tools/Makefile.kmk                    |    2 +-
 src/VBox/VMM/tools/VBoxCpuReport.cpp               |    9 +-
 src/VBox/VMM/tools/VBoxVMMPreload.cpp              |    3 +-
 src/VBox/VMM/tools/VBoxVMMPreloadHardened.cpp      |    2 +-
 src/VBox/ValidationKit/Config.kmk                  |    2 +-
 src/VBox/ValidationKit/Makefile.kmk                |    5 +-
 .../ValidationKitCodingGuidelines.cpp              |    2 +-
 src/VBox/ValidationKit/bootsectors/Makefile.kmk    |   24 +-
 .../ValidationKit/bootsectors/VBoxBs2Linker.cpp    |    4 +-
 .../ValidationKit/bootsectors/bootsector-empty.asm |    2 +-
 .../ValidationKit/bootsectors/bootsector-pae.asm   |    2 +-
 .../bootsectors/bootsector-shutdown.asm            |    2 +-
 .../ValidationKit/bootsectors/bootsector2-api.mac  |    2 +-
 .../bootsectors/bootsector2-boot-registers-1.asm   |    2 +-
 .../bootsectors/bootsector2-common-end.mac         |    2 +-
 .../bootsectors/bootsector2-common-init-code.mac   |    2 +-
 .../bootsectors/bootsector2-common-init-traps.mac  |    2 +-
 .../bootsectors/bootsector2-common-macros-1.mac    |    2 +-
 .../bootsector2-common-routines-template-1.mac     |    2 +-
 .../bootsector2-common-routines-template-2.mac     |    2 +-
 .../bootsectors/bootsector2-common-routines.mac    |    2 +-
 .../bootsector2-common-traprec-template.mac        |    2 +-
 .../bootsectors/bootsector2-common-traprec.mac     |    2 +-
 .../bootsectors/bootsector2-cpu-a20-1-template.mac |    2 +-
 .../bootsectors/bootsector2-cpu-a20-1.asm          |    2 +-
 .../bootsectors/bootsector2-cpu-ac-loop.asm        |    2 +-
 .../bootsector2-cpu-basic-1-template.mac           |    2 +-
 .../bootsectors/bootsector2-cpu-basic-1.asm        |    2 +-
 .../bootsectors/bootsector2-cpu-db-loop.asm        |    2 +-
 .../bootsector2-cpu-hidden-regs-1-template.mac     |    2 +-
 .../bootsectors/bootsector2-cpu-hidden-regs-1.asm  |    2 +-
 .../bootsector2-cpu-instr-1-template.mac           |    2 +-
 .../bootsectors/bootsector2-cpu-instr-1.asm        |    2 +-
 .../bootsectors/bootsector2-cpu-pf-1-template.mac  |    2 +-
 .../bootsectors/bootsector2-cpu-pf-1.asm           |    2 +-
 .../bootsector2-cpu-xcpt-1-template.mac            |    2 +-
 .../bootsectors/bootsector2-cpu-xcpt-1.asm         |    2 +-
 .../bootsector2-cpu-xcpt-2-template.mac            |    2 +-
 .../bootsectors/bootsector2-cpu-xcpt-2.asm         |    2 +-
 .../bootsectors/bootsector2-first.mac              |    2 +-
 .../bootsectors/bootsector2-structures.mac         |    2 +-
 .../bootsectors/bootsector2-template-footer.mac    |    2 +-
 .../bootsectors/bootsector2-template-header.mac    |    2 +-
 .../bootsectors/bootsector2-test1-template.mac     |    2 +-
 .../bootsectors/bootsector2-test1.asm              |    2 +-
 .../bootsectors/bootsector2-triple-fault-1.asm     |    2 +-
 .../bootsectors/bootsector2-vbinstst-64-1.asm      |    2 +-
 .../bootsector2-vbinstst-big-template.asm          |    2 +-
 .../bootsectors/bootsector2-vbinstst-kernel.asm    |    2 +-
 .../bootsectors/bs3-cpu-decoding-1.c32             |   54 +-
 .../bootsectors/bs3-cpu-instr-2-asm.asm            |   63 +
 .../bootsectors/bs3-cpu-instr-2-template.c         |  552 +++
 .../bootsectors/bs3-cpu-instr-2-template.mac       |   89 +
 .../ValidationKit/bootsectors/bs3-cpu-instr-2.c    |   64 +
 .../ValidationKit/bootsectors/bs3-fpustate-1.c     |    2 -
 .../bootsectors/bs3kit/VBoxBs3Linker.cpp           |    4 +-
 .../bootsectors/bs3kit/VBoxBs3ObjConverter.cpp     |   22 +-
 .../bootsectors/bs3kit/asmdefs-first.mac           |    2 +-
 .../bs3kit/bs3-c16-CreateHybridFarRet.asm          |    2 +-
 .../bs3-c16-SwitchFromV86To16BitAndCallC.asm       |    2 +-
 .../bootsectors/bs3kit/bs3-c16-TrapRmV86Data.c     |    1 +
 .../bootsectors/bs3kit/bs3-cmn-A20Enable.asm       |    2 +-
 ...s3-cmn-ConvertRMStackToP16UsingCxReturnToAx.asm |    2 +-
 .../bootsectors/bs3kit/bs3-cmn-KbdRead.asm         |    2 +-
 .../bootsectors/bs3kit/bs3-cmn-KbdWait.asm         |    2 +-
 .../bootsectors/bs3kit/bs3-cmn-KbdWrite.asm        |    2 +-
 .../bootsectors/bs3kit/bs3-cmn-MemAlloc.c          |    3 +-
 .../bootsectors/bs3kit/bs3-cmn-MemAllocZ.c         |    3 +-
 .../bootsectors/bs3kit/bs3-cmn-MemCpy.c            |    2 +-
 .../bootsectors/bs3kit/bs3-cmn-MemFree.c           |    3 +-
 .../bs3kit/bs3-cmn-MemGuardedTestPage.c            |    1 +
 .../bootsectors/bs3kit/bs3-cmn-MemMove.c           |    5 +-
 .../bootsectors/bs3kit/bs3-cmn-MemPCpy.c           |    2 +-
 .../bootsectors/bs3kit/bs3-cmn-MemSet.asm          |    2 +-
 .../bootsectors/bs3kit/bs3-cmn-MemZero.asm         |    2 +-
 .../bootsectors/bs3kit/bs3-cmn-PagingAlias.c       |    1 +
 .../bootsectors/bs3kit/bs3-cmn-PagingData.c        |    2 +-
 .../bs3kit/bs3-cmn-PagingInitRootForLM.c           |    1 +
 .../bs3kit/bs3-cmn-PagingInitRootForPAE.c          |    1 +
 .../bs3kit/bs3-cmn-PagingInitRootForPP.c           |    3 +-
 .../bootsectors/bs3kit/bs3-cmn-PagingProtect.c     |    1 +
 .../bs3kit/bs3-cmn-PagingSetupCanonicalTraps.c     |    1 +
 .../bootsectors/bs3kit/bs3-cmn-Panic.asm           |    2 +-
 .../bootsectors/bs3kit/bs3-cmn-PicSetup.c          |    1 +
 .../bootsectors/bs3kit/bs3-cmn-PicUpdateMask.c     |    1 +
 .../bootsectors/bs3kit/bs3-cmn-PitIrqHandler.c     |    1 +
 .../bootsectors/bs3kit/bs3-cmn-PrintU32.asm        |    2 +-
 .../bootsectors/bs3kit/bs3-cmn-PrintX32.asm        |    2 +-
 .../bs3kit/bs3-cmn-RegCtxConvertToRingX.c          |    1 +
 .../bootsectors/bs3kit/bs3-cmn-RegCtxPrint.c       |    1 +
 .../bs3kit/bs3-cmn-RegCtxSetGrpSegFromCurPtr.c     |    1 +
 .../bs3kit/bs3-cmn-RegCtxSetGrpSegFromFlat.c       |    1 +
 .../bs3kit/bs3-cmn-RegCtxSetRipCsFromCurPtr.c      |    1 +
 .../bs3kit/bs3-cmn-RegCtxSetRipCsFromFlat.c        |    1 +
 .../bs3kit/bs3-cmn-RegCtxSetRipCsFromLnkPtr.c      |    1 +
 .../bs3kit/bs3-cmn-SelFlatCodeToProtFar16.asm      |    2 +-
 .../bs3kit/bs3-cmn-SelFlatCodeToRealMode.asm       |    2 +-
 .../bootsectors/bs3kit/bs3-cmn-Shutdown.asm        |    2 +-
 .../bootsectors/bs3kit/bs3-cmn-SlabAlloc.c         |    3 +-
 .../bootsectors/bs3kit/bs3-cmn-SlabAllocEx.c       |    1 +
 .../bootsectors/bs3kit/bs3-cmn-SlabFree.c          |    3 +-
 .../bootsectors/bs3kit/bs3-cmn-SlabInit.c          |    3 +-
 .../bootsectors/bs3kit/bs3-cmn-SlabListAdd.c       |    2 +-
 .../bootsectors/bs3kit/bs3-cmn-SlabListAlloc.c     |    3 +-
 .../bootsectors/bs3kit/bs3-cmn-SlabListAllocEx.c   |    3 +-
 .../bootsectors/bs3kit/bs3-cmn-SlabListFree.c      |    2 +-
 .../bootsectors/bs3kit/bs3-cmn-SlabListInit.c      |    2 +-
 .../bootsectors/bs3kit/bs3-cmn-StrCpy.c            |    2 +-
 .../bootsectors/bs3kit/bs3-cmn-StrFormatV.c        |    2 +-
 .../bootsectors/bs3kit/bs3-cmn-StrLen.c            |    2 +-
 .../bootsectors/bs3kit/bs3-cmn-StrNLen.c           |    3 +-
 .../bootsectors/bs3kit/bs3-cmn-StrPrintf.c         |    2 +-
 ...witchHlpConvProtModeRetfPopBpDecBpAndReturn.asm |    2 +-
 ...witchHlpConvRealModeRetfPopBpDecBpAndReturn.asm |    2 +-
 .../bootsectors/bs3kit/bs3-cmn-SwitchTo16Bit.asm   |    2 +-
 .../bootsectors/bs3kit/bs3-cmn-TestData.c          |    2 +-
 .../bootsectors/bs3kit/bs3-cmn-TestInit.c          |    2 +-
 .../bs3kit/bs3-cmn-TestIsVmmDevTestingPresent.asm  |    2 +-
 .../bs3kit/bs3-cmn-TestSendCmdWithStr.asm          |    2 +-
 .../bootsectors/bs3kit/bs3-cmn-Trap16Init.c        |    1 +
 .../bootsectors/bs3kit/bs3-cmn-Trap16SetGate.c     |    3 +-
 .../bootsectors/bs3kit/bs3-cmn-Trap32Init.c        |    1 +
 .../bootsectors/bs3kit/bs3-cmn-Trap32SetGate.c     |    3 +-
 .../bootsectors/bs3kit/bs3-cmn-Trap64Init.c        |    1 +
 .../bootsectors/bs3kit/bs3-cmn-Trap64SetGate.c     |    3 +-
 .../bs3kit/bs3-cmn-TrapDefaultHandler.c            |    1 +
 .../bootsectors/bs3kit/bs3-cmn-TrapPrintFrame.c    |    1 +
 .../bootsectors/bs3kit/bs3-cmn-TrapRmV86Init.c     |    1 +
 .../bootsectors/bs3kit/bs3-cmn-TrapRmV86SetGate.c  |    1 +
 .../bootsectors/bs3kit/bs3-cmn-TrapSetHandler.c    |    1 +
 .../bootsectors/bs3kit/bs3-cmn-TrapSetHandlerEx.c  |    1 +
 .../bs3kit/bs3-cmn-TrapSetJmpAndRestore.c          |    1 +
 .../bootsectors/bs3kit/bs3-cmn-TrapUnsetJmp.c      |    1 +
 .../bootsectors/bs3kit/bs3-cmn-hexdigits.c         |    2 +-
 .../bootsectors/bs3kit/bs3-cmn-memory.h            |    2 +-
 .../bootsectors/bs3kit/bs3-cmn-pic-data.c          |    1 +
 .../ValidationKit/bootsectors/bs3kit/bs3-cmn-pit.c |    1 +
 .../bootsectors/bs3kit/bs3-cmn-test.h              |    2 +-
 .../bootsectors/bs3kit/bs3-first-common.mac        |    2 +-
 .../bootsectors/bs3kit/bs3-first-rm.asm            |    2 +-
 .../bs3kit/bs3-mode-PagingGetRootForPP32.asm       |    2 +-
 .../bootsectors/bs3kit/bs3-mode-SwitchToPE16.asm   |    2 +-
 .../bootsectors/bs3kit/bs3-mode-SwitchToPE32.asm   |    2 +-
 .../bootsectors/bs3kit/bs3-mode-SwitchToPP32.asm   |    2 +-
 .../bootsectors/bs3kit/bs3-mode-SwitchToRM.asm     |    2 +-
 .../bootsectors/bs3kit/bs3-mode-TestDoModesByOne.c |    1 +
 .../bootsectors/bs3kit/bs3-rm-InitGdt.c            |    1 +
 .../bootsectors/bs3kit/bs3-rm-InitMemory.c         |    3 +-
 .../bootsectors/bs3kit/bs3-wc16-I4D.asm            |    2 +-
 .../bootsectors/bs3kit/bs3-wc16-I8DQ.asm           |    2 +-
 .../bootsectors/bs3kit/bs3-wc16-I8DR.asm           |    2 +-
 .../bootsectors/bs3kit/bs3-wc16-I8RS.asm           |    2 +-
 .../bootsectors/bs3kit/bs3-wc16-U4D.asm            |    2 +-
 .../bootsectors/bs3kit/bs3-wc16-U8DQ.asm           |    2 +-
 .../bootsectors/bs3kit/bs3-wc16-U8DR.asm           |    2 +-
 .../bootsectors/bs3kit/bs3-wc16-U8LS.asm           |    2 +-
 .../bootsectors/bs3kit/bs3-wc16-U8RS.asm           |    2 +-
 .../bootsectors/bs3kit/bs3-wc32-I8D.asm            |    2 +-
 .../bootsectors/bs3kit/bs3-wc32-I8RS.asm           |    2 +-
 .../bootsectors/bs3kit/bs3-wc32-U8D.asm            |    2 +-
 .../bootsectors/bs3kit/bs3-wc32-U8LS.asm           |    2 +-
 .../bootsectors/bs3kit/bs3-wc32-U8RS.asm           |    2 +-
 .../bootsectors/bs3kit/bs3kit-template-header.h    |    2 +-
 .../bootsectors/bs3kit/bs3kit-template-header.mac  |    2 +-
 src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h |   10 +-
 .../ValidationKit/bootsectors/bs3kit/bs3kit.mac    |    2 +-
 src/VBox/ValidationKit/common/Makefile.kmk         |    2 +-
 src/VBox/ValidationKit/common/__init__.py          |    4 +-
 .../ValidationKit/common/constants/__init__.py     |    4 +-
 src/VBox/ValidationKit/common/constants/result.py  |    4 +-
 .../ValidationKit/common/constants/rtexitcode.py   |    4 +-
 src/VBox/ValidationKit/common/constants/tbreq.py   |    4 +-
 src/VBox/ValidationKit/common/constants/tbresp.py  |    4 +-
 .../ValidationKit/common/constants/valueunit.py    |    4 +-
 src/VBox/ValidationKit/common/utils.py             |    4 +-
 src/VBox/ValidationKit/common/webutils.py          |    4 +-
 src/VBox/ValidationKit/docs/Makefile.kmk           |    2 +-
 src/VBox/ValidationKit/snippets/alloc-1.c          |    2 +-
 src/VBox/ValidationKit/snippets/time-1.c           |    2 +-
 src/VBox/ValidationKit/td-dummy.py                 |    2 +-
 src/VBox/ValidationKit/testanalysis/Makefile.kmk   |    2 +-
 src/VBox/ValidationKit/testanalysis/__init__.py    |    4 +-
 src/VBox/ValidationKit/testanalysis/diff.py        |    4 +-
 src/VBox/ValidationKit/testanalysis/reader.py      |    4 +-
 src/VBox/ValidationKit/testanalysis/reporting.py   |    4 +-
 src/VBox/ValidationKit/testanalysis/tst-a1.py      |    4 +-
 src/VBox/ValidationKit/testboxscript/Makefile.kmk  |    2 +-
 .../ValidationKit/testboxscript/TestBoxHelper.cpp  |    2 +-
 .../ValidationKit/testboxscript/testboxcommand.py  |    4 +-
 .../ValidationKit/testboxscript/testboxcommons.py  |    4 +-
 .../testboxscript/testboxconnection.py             |    4 +-
 .../ValidationKit/testboxscript/testboxscript.py   |    4 +-
 .../testboxscript/testboxscript_real.py            |    3 +-
 .../ValidationKit/testboxscript/testboxtasks.py    |    4 +-
 .../ValidationKit/testboxscript/testboxupgrade.py  |    4 +-
 src/VBox/ValidationKit/testdriver/Makefile.kmk     |    2 +-
 src/VBox/ValidationKit/testdriver/__init__.py      |    4 +-
 src/VBox/ValidationKit/testdriver/base.py          |   13 +-
 src/VBox/ValidationKit/testdriver/reporter.py      |    4 +-
 src/VBox/ValidationKit/testdriver/tst-txsclient.py |    4 +-
 src/VBox/ValidationKit/testdriver/txsclient.py     |    4 +-
 src/VBox/ValidationKit/testdriver/vboxcon.py       |    4 +-
 src/VBox/ValidationKit/testdriver/vboxinstaller.py |    4 +-
 src/VBox/ValidationKit/testdriver/vboxtestvms.py   |    4 +-
 src/VBox/ValidationKit/testdriver/vboxwrappers.py  |   19 +-
 src/VBox/ValidationKit/testdriver/winbase.py       |    4 +-
 src/VBox/ValidationKit/testmanager/Makefile.kmk    |    2 +-
 src/VBox/ValidationKit/testmanager/__init__.py     |    4 +-
 .../ValidationKit/testmanager/batch/Makefile.kmk   |    2 +-
 .../ValidationKit/testmanager/batch/add_build.py   |    4 +-
 .../testmanager/batch/check_for_deleted_builds.py  |  119 +
 .../testmanager/batch/close_orphaned_testsets.py   |    4 +-
 .../ValidationKit/testmanager/batch/del_build.py   |    4 +-
 .../testmanager/batch/filearchiver.py              |    4 +-
 .../testmanager/batch/regen_sched_queues.py        |    4 +-
 .../ValidationKit/testmanager/batch/vcs_import.py  |    4 +-
 .../ValidationKit/testmanager/cgi/Makefile.kmk     |    2 +-
 src/VBox/ValidationKit/testmanager/cgi/admin.py    |    4 +-
 .../ValidationKit/testmanager/cgi/debuginfo.py     |    4 +-
 src/VBox/ValidationKit/testmanager/cgi/index.py    |    4 +-
 src/VBox/ValidationKit/testmanager/cgi/logout.py   |    4 +-
 src/VBox/ValidationKit/testmanager/cgi/logout2.py  |    4 +-
 .../ValidationKit/testmanager/cgi/testboxdisp.py   |    4 +-
 .../ValidationKit/testmanager/core/Makefile.kmk    |    2 +-
 .../ValidationKit/testmanager/core/__init__.py     |    4 +-
 src/VBox/ValidationKit/testmanager/core/base.py    |    4 +-
 src/VBox/ValidationKit/testmanager/core/build.py   |    6 +-
 .../testmanager/core/buildblacklist.py             |    4 +-
 .../ValidationKit/testmanager/core/buildsource.py  |    4 +-
 .../ValidationKit/testmanager/core/coreconsts.py   |    4 +-
 src/VBox/ValidationKit/testmanager/core/db.py      |    4 +-
 .../ValidationKit/testmanager/core/dbobjcache.py   |    4 +-
 .../testmanager/core/failurecategory.py            |    5 +-
 .../testmanager/core/failurereason.py              |    5 +-
 .../testmanager/core/globalresource.py             |    4 +-
 src/VBox/ValidationKit/testmanager/core/report.py  |    4 +-
 .../ValidationKit/testmanager/core/schedgroup.py   |    4 +-
 .../testmanager/core/schedulerbase.py              |    4 +-
 .../testmanager/core/schedulerbeci.py              |    4 +-
 .../ValidationKit/testmanager/core/systemlog.py    |    4 +-
 src/VBox/ValidationKit/testmanager/core/testbox.py |    4 +-
 .../testmanager/core/testboxcontroller.py          |    4 +-
 .../testmanager/core/testboxstatus.py              |    4 +-
 .../ValidationKit/testmanager/core/testcase.py     |    4 +-
 .../ValidationKit/testmanager/core/testcaseargs.py |    4 +-
 .../ValidationKit/testmanager/core/testgroup.py    |    4 +-
 .../testmanager/core/testresultfailures.py         |    4 +-
 .../ValidationKit/testmanager/core/testresults.py  |    4 +-
 src/VBox/ValidationKit/testmanager/core/testset.py |    4 +-
 .../ValidationKit/testmanager/core/useraccount.py  |    4 +-
 .../ValidationKit/testmanager/core/vcsrevisions.py |    4 +-
 .../testmanager/core/webservergluebase.py          |    4 +-
 .../testmanager/core/webservergluecgi.py           |    4 +-
 src/VBox/ValidationKit/testmanager/db/Makefile.kmk |    2 +-
 .../testmanager/db/gen-sql-comments.py             |    2 +-
 .../testmanager/db/partial-db-dump.py              |    3 +-
 ...b-r16-testcaseargs-1-testresultfailures-1.pgsql |    2 +-
 .../ValidationKit/testmanager/debug/Makefile.kmk   |    2 +-
 .../ValidationKit/testmanager/debug/__init__.py    |    4 +-
 .../testmanager/debug/cgiprofiling.py              |    4 +-
 .../ValidationKit/testmanager/misc/Makefile.kmk    |    2 +-
 .../ValidationKit/testmanager/webui/Makefile.kmk   |    2 +-
 .../ValidationKit/testmanager/webui/__init__.py    |    4 +-
 .../ValidationKit/testmanager/webui/wuiadmin.py    |    4 +-
 .../testmanager/webui/wuiadminbuild.py             |    4 +-
 .../testmanager/webui/wuiadminbuildblacklist.py    |    4 +-
 .../testmanager/webui/wuiadminbuildcategory.py     |    4 +-
 .../testmanager/webui/wuiadminbuildsource.py       |    4 +-
 .../testmanager/webui/wuiadminfailurecategory.py   |    4 +-
 .../testmanager/webui/wuiadminfailurereason.py     |    4 +-
 .../testmanager/webui/wuiadminglobalrsrc.py        |    4 +-
 .../testmanager/webui/wuiadminschedgroup.py        |    4 +-
 .../testmanager/webui/wuiadminsystemlog.py         |    4 +-
 .../testmanager/webui/wuiadmintestbox.py           |    4 +-
 .../testmanager/webui/wuiadmintestcase.py          |    4 +-
 .../testmanager/webui/wuiadmintestgroup.py         |    4 +-
 .../testmanager/webui/wuiadminuseraccount.py       |    4 +-
 .../ValidationKit/testmanager/webui/wuibase.py     |    4 +-
 .../testmanager/webui/wuicontentbase.py            |    4 +-
 .../ValidationKit/testmanager/webui/wuigraphwiz.py |    4 +-
 .../ValidationKit/testmanager/webui/wuihlpform.py  |    4 +-
 .../ValidationKit/testmanager/webui/wuihlpgraph.py |    4 +-
 .../testmanager/webui/wuihlpgraphbase.py           |    4 +-
 .../testmanager/webui/wuihlpgraphgooglechart.py    |    4 +-
 .../testmanager/webui/wuihlpgraphmatplotlib.py     |    4 +-
 .../testmanager/webui/wuihlpgraphsimple.py         |    4 +-
 .../testmanager/webui/wuilogviewer.py              |    4 +-
 .../ValidationKit/testmanager/webui/wuimain.py     |    4 +-
 .../ValidationKit/testmanager/webui/wuireport.py   |    4 +-
 .../testmanager/webui/wuitestresult.py             |    4 +-
 .../testmanager/webui/wuitestresultfailure.py      |    4 +-
 .../testmanager/webui/wuivcshistory.py             |    4 +-
 src/VBox/ValidationKit/tests/Makefile.kmk          |    2 +-
 .../ValidationKit/tests/additions/Makefile.kmk     |    2 +-
 .../ValidationKit/tests/additions/tdAddBasic1.py   |    4 +-
 .../tests/additions/tdAddGuestCtrl.py              |    4 +-
 src/VBox/ValidationKit/tests/api/Makefile.kmk      |    2 +-
 src/VBox/ValidationKit/tests/api/tdAppliance1.py   |    4 +-
 src/VBox/ValidationKit/tests/api/tdMoveMedium.py   |  174 +
 src/VBox/ValidationKit/tests/api/tdPython1.py      |    4 +-
 src/VBox/ValidationKit/tests/api/tdTreeDepth1.py   |    4 +-
 .../ValidationKit/tests/autostart/Makefile.kmk     |    2 +-
 .../ValidationKit/tests/autostart/tdAutostart1.py  |    2 +-
 .../ValidationKit/tests/benchmarks/Makefile.kmk    |    2 +-
 .../ValidationKit/tests/benchmarks/tdBenchmark1.py |    4 +-
 src/VBox/ValidationKit/tests/cpu/Makefile.kmk      |    2 +-
 src/VBox/ValidationKit/tests/cpu/tdCpuPae1.py      |    4 +-
 .../ValidationKit/tests/installation/Makefile.kmk  |    2 +-
 .../tests/installation/tdGuestOsInstOs2.py         |    4 +-
 .../tests/installation/tdGuestOsInstTest1.py       |    4 +-
 src/VBox/ValidationKit/tests/network/Makefile.kmk  |    2 +-
 .../ValidationKit/tests/network/tdNetBenchmark1.py |    4 +-
 .../ValidationKit/tests/selftests/Makefile.kmk     |    2 +-
 .../ValidationKit/tests/selftests/tdSelfTest1.py   |    4 +-
 .../ValidationKit/tests/selftests/tdSelfTest2.py   |    4 +-
 .../ValidationKit/tests/selftests/tdSelfTest3.py   |    4 +-
 .../ValidationKit/tests/selftests/tdSelfTest4.py   |    4 +-
 .../tests/shutdown/tdGuestOsShutdown1.py           |    4 +-
 .../ValidationKit/tests/smoketests/Makefile.kmk    |    2 +-
 .../ValidationKit/tests/smoketests/tdSmokeTest1.py |    4 +-
 src/VBox/ValidationKit/tests/storage/Makefile.kmk  |    2 +-
 src/VBox/ValidationKit/tests/storage/storagecfg.py |   81 +-
 .../tests/storage/tdStorageBenchmark1.py           |  600 ++-
 .../tests/storage/tdStorageSnapshotMerging1.py     |    2 +-
 .../tests/storage/tdStorageStress1.py              |    2 +-
 .../ValidationKit/tests/teleportation/Makefile.kmk |    2 +-
 .../tests/teleportation/tdTeleportLocal1.py        |    4 +-
 .../ValidationKit/tests/unittests/Makefile.kmk     |    2 +-
 .../ValidationKit/tests/unittests/tdUnitTest1.py   |    4 +-
 src/VBox/ValidationKit/tests/usb/Makefile.kmk      |    2 +-
 src/VBox/ValidationKit/utils/Makefile.kmk          |    5 +-
 .../ValidationKit/utils/TestExecServ/Makefile.kmk  |    2 +-
 .../utils/TestExecServ/TestExecService.cpp         |    7 +-
 .../utils/TestExecServ/TestExecServiceInternal.h   |    2 +-
 .../utils/TestExecServ/TestExecServiceTcp.cpp      |   12 +-
 src/VBox/ValidationKit/utils/cpu/Makefile.kmk      |    4 +-
 src/VBox/ValidationKit/utils/cpu/cidet-app.cpp     |    8 +-
 src/VBox/ValidationKit/utils/cpu/cidet-appA.asm    |    2 +-
 src/VBox/ValidationKit/utils/cpu/cidet-core.cpp    |   15 +-
 src/VBox/ValidationKit/utils/cpu/cidet-instr-1.cpp |    2 +-
 src/VBox/ValidationKit/utils/cpu/cidet.h           |    2 +-
 src/VBox/ValidationKit/utils/cpu/cidet.mac         |    2 +-
 .../ValidationKit/utils/cpu/cpu-alloc-all-mem.cpp  |    2 +-
 src/VBox/ValidationKit/utils/cpu/cpu-numa.cpp      |    2 +-
 .../ValidationKit/utils/cpu/exceptionsR3-asm.asm   |    2 +-
 src/VBox/ValidationKit/utils/cpu/exceptionsR3.cpp  |    2 +-
 src/VBox/ValidationKit/utils/cpu/rdtsc.cpp         |    2 +-
 src/VBox/ValidationKit/utils/cpu/xmmsaving-asm.asm |    2 +-
 src/VBox/ValidationKit/utils/cpu/xmmsaving.cpp     |    2 +-
 src/VBox/ValidationKit/utils/misc/Makefile.kmk     |    2 +-
 .../ValidationKit/utils/misc/loadgenerator.cpp     |    4 +-
 .../ValidationKit/utils/misc/loadgeneratorR0.cpp   |    2 +-
 src/VBox/ValidationKit/utils/misc/vts_rm.cpp       |    2 +-
 src/VBox/ValidationKit/utils/misc/vts_tar.cpp      |    2 +-
 src/VBox/ValidationKit/utils/network/Makefile.kmk  |    2 +-
 src/VBox/ValidationKit/utils/network/NetPerf.cpp   |    4 +-
 src/VBox/ValidationKit/utils/nt/Makefile.kmk       |    2 +-
 src/VBox/ValidationKit/utils/nt/ntsetfreq.cpp      |   47 +-
 src/VBox/ValidationKit/utils/nt/nttimesources.cpp  |    6 +-
 src/VBox/ValidationKit/utils/usb/Makefile.kmk      |    2 +-
 src/VBox/ValidationKit/utils/usb/UsbTest.cpp       |    4 +-
 .../ValidationKit/utils/usb/UsbTestService.cpp     |   22 +-
 .../utils/usb/UsbTestServiceGadget.cpp             |    3 +-
 .../ValidationKit/utils/usb/UsbTestServiceGadget.h |    2 +-
 .../utils/usb/UsbTestServiceGadgetClassTest.cpp    |    1 +
 .../utils/usb/UsbTestServiceGadgetHost.cpp         |    4 +-
 .../utils/usb/UsbTestServiceGadgetHostUsbIp.cpp    |    7 +-
 .../utils/usb/UsbTestServiceInternal.h             |   14 +-
 .../utils/usb/UsbTestServicePlatform-linux.cpp     |    8 +-
 .../utils/usb/UsbTestServiceProtocol.cpp           |    6 +-
 .../ValidationKit/utils/usb/UsbTestServiceTcp.cpp  |    5 +
 src/apps/Makefile.kmk                              |    7 +-
 src/apps/adpctl/Makefile.kmk                       |   29 -
 src/apps/adpctl/VBoxNetAdpCtl.cpp                  |  483 --
 src/apps/svnsync-vbox/Makefile.kmk                 |    2 +-
 src/apps/svnsync-vbox/main.c                       |    6 +-
 src/apps/tunctl/Makefile.kmk                       |    2 +-
 src/bldprogs/Makefile.kmk                          |    2 +-
 src/bldprogs/VBoxCPP.cpp                           |   57 +-
 src/bldprogs/VBoxCheckImports.cpp                  |    5 +-
 src/bldprogs/VBoxCmp.cpp                           |    2 +-
 src/bldprogs/VBoxCompilerPlugIns.h                 |    2 +-
 src/bldprogs/VBoxCompilerPlugInsCommon.cpp         |    2 +-
 src/bldprogs/VBoxCompilerPlugInsGcc.cpp            |    2 +-
 src/bldprogs/VBoxDef2LazyLoad.cpp                  |    8 +-
 src/bldprogs/VBoxPeSetVersion.cpp                  |    2 +-
 src/bldprogs/VBoxTpG.cpp                           |    8 +-
 src/bldprogs/bin2c.c                               |   57 +-
 src/bldprogs/biossums.c                            |    2 +-
 src/bldprogs/filesplitter.cpp                      |    2 +-
 src/bldprogs/preload.cpp                           |    4 +-
 src/bldprogs/scm.cpp                               |   15 +-
 src/bldprogs/scm.h                                 |    6 +-
 src/bldprogs/scmdiff.cpp                           |    2 +-
 src/bldprogs/scmdiff.h                             |    2 +-
 src/bldprogs/scmrw.cpp                             |  199 +-
 src/bldprogs/scmstream.cpp                         |    2 +-
 src/bldprogs/scmstream.h                           |    2 +-
 src/bldprogs/scmsubversion.cpp                     |   18 +-
 src/libs/Makefile.kmk                              |    2 +-
 src/libs/kStuff/Makefile.kmk                       |    2 +-
 src/libs/kStuff/iprt/kRdrFile-iprt.cpp             |    5 +
 src/libs/kStuff/kStuff/include/k/kDefs.h           |    6 +-
 src/libs/kStuff/kStuff/kDbg/kDbgHlp.h              |   10 +-
 src/libs/kStuff/kStuff/kLdr/kLdrMod.c              |    3 +-
 src/libs/kStuff/kStuff/kLdr/kLdrModLX.c            |   31 +-
 src/libs/kStuff/kStuff/kLdr/kLdrModMachO.c         |   50 +-
 src/libs/kStuff/kStuff/kLdr/kLdrModPE.c            |   13 +-
 src/libs/kStuff/kStuff/kRdr/kRdrBuffered.cpp       |    5 +-
 src/libs/liblzf-3.4/Makefile.kmk                   |    8 +-
 src/libs/xpcom18a4/Config.kmk                      |    2 +-
 src/libs/xpcom18a4/Makefile.kmk                    |    3 +-
 src/libs/xpcom18a4/java/Makefile.kmk               |    2 +-
 .../xpcom18a4/nsprpub/pr/include/md/_netbsd.cfg    |    2 +-
 src/libs/xpcom18a4/xpcom/glue/nsIGenericFactory.h  |    2 +
 src/libs/xpcom18a4/xpcom/io/nsDirectoryService.cpp |    4 +-
 src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl.h     |    5 +-
 .../xpcom18a4/xpcom/typelib/xpidl/xpidl_header.c   |    6 +-
 src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_idl.c |    4 +-
 .../xpcom18a4/xpcom/typelib/xpidl/xpidl_java.c     |    2 +
 .../xpcom18a4/xpcom/typelib/xpidl/xpidl_util.c     |    5 +-
 src/recompiler/Makefile.kmk                        |    2 +-
 src/recompiler/Sun/config-host.h                   |    2 +-
 src/recompiler/Sun/config.h                        |    2 +-
 src/recompiler/Sun/crt/stdio.h                     |    2 +-
 src/recompiler/Sun/kvm.h                           |    2 +-
 src/recompiler/VBoxREM.rc                          |    2 +-
 src/recompiler/VBoxREMWrapper.cpp                  |    2 +
 src/recompiler/VBoxREMWrapperA.asm                 |    2 +-
 src/recompiler/VBoxRecompiler.c                    |    3 +-
 src/recompiler/exec.c                              |    2 +-
 src/recompiler/target-i386/translate.c             |    4 +-
 src/recompiler/tcg/i386/tcg-target.c               |    2 +-
 4640 files changed, 46938 insertions(+), 64400 deletions(-)

diff --git a/.scm-settings b/.scm-settings
index 3d1bb1c..17bb30d 100644
--- a/.scm-settings
+++ b/.scm-settings
@@ -88,6 +88,7 @@
 --filter-out-files "*/include/VBox/HostServices/glxext.h"
 --filter-out-files "*/include/VBox/HostServices/wglext.h"
 --filter-out-files "*/src/VBox/Devices/Audio/sys-queue.h"
+--filter-out-files "*/src/VBox/Devices/Audio_old/sys-queue.h"
 --filter-out-files "*/src/VBox/HostDrivers/VBoxUSB/os2/usbcalls.h"
 --filter-out-files "*/src/VBox/RDP/x11server/Init*.c"
 --filter-out-files "*/vslick.h"
diff --git a/Config.kmk b/Config.kmk
index bcd13a3..d1e5457 100644
--- a/Config.kmk
+++ b/Config.kmk
@@ -208,7 +208,7 @@ VBOX_VERSION_MINOR = 1
 # This is the current build number. It should be increased every time we publish a
 # new build. The define is available in every source file. Only even build numbers
 # will be published, odd numbers are set during development.
-VBOX_VERSION_BUILD = 2
+VBOX_VERSION_BUILD = 4
 # The raw version string. This *must not* contain any other information/fields than
 # major, minor and build revision (as it is now) -- also will be used for host/guest version
 # comparison.
@@ -227,7 +227,6 @@ VBOX_VERSION_PRERELEASE =
 # Force the additions.sh script to get an exact additions build when we're doing the release.
 ifeq ($(int-mod $(VBOX_VERSION_BUILD),2),0)
   VBOX_RELEASE_EXACT_MATCH=1
-  # Decide whether to use the stable (5.0) audio code or not.
 endif
 ifneq ($(VBOX_RELEASE_EXACT_MATCH),)
  export VBOX_ADDITIONS_SH_MODE     = release
@@ -300,8 +299,6 @@ VBOX_PACKAGE_STRING = $(VBOX_PACKAGE_OS)_$(VBOX_PACKAGE_ARCH)_$(VBOX_PACKAGE_DIS
 ifeq ($(KBUILD_HOST),darwin)
  if !defined(VBOX_WITH_NEW_XCODE) && !defined(VBOX_WITHOUT_NEW_XCODE) && $(KBUILD_HOST_VERSION_MAJOR) >= 13 # (OS X 10.9 Mavericks)
   VBOX_WITH_NEW_XCODE = 1
-  # broken by TOOL_VBoxXcode62_ENV_SETUP
-  NO_COMPILE_CMDS_DEPS = 1
  endif
 endif
 
@@ -430,19 +427,21 @@ VBOX_WITH_NAT_SERVICE = 1
 VBOX_WITH_E1000 = 1
 # Enable the Virtio feature.
 VBOX_WITH_VIRTIO = 1
-# Enable new PS/2 mouse emulation.
-VBOX_WITH_NEW_PS2M = 1
 ifn1of ($(KBUILD_TARGET), win darwin)
  # Enable OSS audio support.
- VBOX_WITH_OSS = 1
+ VBOX_WITH_AUDIO_OSS = 1
 endif
 if1of ($(KBUILD_TARGET), linux)
  # Enable ALSA audio support.
- VBOX_WITH_ALSA = 1
+ VBOX_WITH_AUDIO_ALSA = 1
 endif
 if1of ($(KBUILD_TARGET), linux)
  # Enable PulseAudio audio support.
- VBOX_WITH_PULSE = 1
+ VBOX_WITH_AUDIO_PULSE = 1
+endif
+ifeq ($(KBUILD_TYPE),debug)
+ ## @todo Only build if running on test boxes?
+ VBOX_WITH_AUDIO_DEBUG =
 endif
 # Enable PCI passthrough support.
 VBOX_WITH_PCI_PASSTHROUGH = 1
@@ -694,8 +693,6 @@ if1of ($(KBUILD_TARGET), darwin linux solaris win)
 endif
 # Enable audio support for VRDE.
 VBOX_WITH_VRDE_AUDIO = 1
-# Enable to use the VBox 5.0 audio framework
-#VBOX_WITH_AUDIO_50 := 1
 # Use the VRDE external authentication library from VBoxSVC.
 if1of ($(KBUILD_TARGET), win)
  VBOX_WITH_VRDEAUTH_IN_VBOXSVC = 1
@@ -1167,18 +1164,6 @@ ifdef VBOX_OSE
 endif
 
 #
-# Audio: Which code base to use.
-# This can be overriden in LocalConfig.kmk.
-#
-ifdef VBOX_WITH_AUDIO_50
- VBOX_AUDIO_PATH_SOURCES=Audio_old
- VBOX_AUDIO_FILE_SUFFIX=_old
-else
- VBOX_AUDIO_PATH_SOURCES=Audio
- VBOX_AUDIO_FILE_SUFFIX=
-endif
-
-#
 # VBOX_WITHOUT_HARDENING is for developers (put in LocalConfig.kmk).
 # Note that this is a bit rough since hardening governs more than one
 # variable...  Also note that we allow VBOX_WITH_HARDENING=1 on the
@@ -1586,75 +1571,6 @@ USES += dtrace
 
 
 #
-# Compiler optimization flags.
-#
-VBOX_GCC_WARN     ?= -Wall $(VBOX_GCC_Wextra) $(VBOX_GCC_Wno-missing-field-initializers) -Wno-unused -Wno-trigraphs \
-	$(VBOX_GCC_fdiagnostics-show-option) $(VBOX_GCC_Wno-unused-parameter) $(VBOX_GCC_Wno-language-extension-token) \
-	$(VBOX_GCC_Wno-extended-offsetof) $(VBOX_GCC_Wno-gnu-folding-constant) $(VBOX_GCC_Wlogical-op) \
-	$(VBOX_GCC_Wno-string-plus-int) $(VBOX_GCC_Wno-nested-anon-types)
-VBOX_GCC_WARN_PEDANTIC = -Wshadow $(VBOX_GCC_WARN) -Wno-long-long
-ifdef VBOX_WITH_MASOCHISTIC_WARNINGS
- VBOX_GCC_WARN_PEDANTIC += -Wunused-variable -Wunused-function -Wunused-label -Wunused-parameter
-endif
-VBOX_GCC_PEDANTIC_CXX ?= -pedantic $(VBOX_GCC_WARN_PEDANTIC) $(VBOX_GCC_Wno-return-type-c-linkage)
-VBOX_GCC_PEDANTIC_C   ?= -pedantic $(VBOX_GCC_WARN_PEDANTIC) -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Werror-implicit-function-declaration
-ifeq ($(KBUILD_TARGET),win)
- VBOX_C_CXX_FLAGS_NO_UNUSED_PARAMETERS = #-Wdxxxx
-else
- VBOX_C_CXX_FLAGS_NO_UNUSED_PARAMETERS = -Wno-unused-parameter
-endif
-ifeq ($(KBUILD_TYPE),debug)
- VBOX_GCC_FP     ?= -fno-omit-frame-pointer
- VBOX_GCC_OPT    ?= -O0
- VBOX_VCC_FP     ?= -Oy-
- VBOX_VCC_OPT    ?=
- VBOX_GCC_R0_FP  ?= -fno-omit-frame-pointer -fno-optimize-sibling-calls
- VBOX_GCC_R0_OPT ?= -O2
- VBOX_VCC_R0_FP  ?= -Oy-
- VBOX_VCC_R0_OPT ?=
- VBOX_GCC_GC_FP  ?= -fno-omit-frame-pointer -fno-optimize-sibling-calls
- VBOX_GCC_GC_OPT ?= -O2
- VBOX_VCC_GC_FP  ?= -Oy-
- VBOX_VCC_GC_OPT ?=
-else
- # We should use -fomit-frame-pointer for GCC / -Oy for VCC.
- # -funwind-tables provides support for backtraces in gdb then.
- VBOX_GCC_FP     ?= -fno-omit-frame-pointer
- VBOX_GCC_OPT    ?= -O2 $(VBOX_GCC_mtune-generic)
- VBOX_VCC_FP     ?= -Oy-
- VBOX_VCC_OPT    ?= -O2
- VBOX_GCC_R0_FP  ?= -fno-omit-frame-pointer
- VBOX_GCC_R0_OPT ?= -O2 $(VBOX_GCC_mtune-generic)
- VBOX_VCC_R0_FP  ?= -Oy-
- VBOX_VCC_R0_OPT ?= -O2
- VBOX_GCC_GC_FP  ?= -fno-omit-frame-pointer
- VBOX_GCC_GC_OPT ?= -O2 $(VBOX_GCC_mtune-generic)
- VBOX_VCC_GC_FP  ?= -Oy-
- VBOX_VCC_GC_OPT ?= -O2
-endif
-ifeq ($(KBUILD_TARGET_ARCH),x86)
- ifneq ($(KBUILD_TARGET),darwin)
-  # (The '<=' operator is for prepending (kmk specific).)
-  VBOX_GCC_OPT <= -march=i586
- endif
-endif
-
-
-#
-# Select the CRT type we're using with Microsoft Visual C++.
-#
-if1of ($(KBUILD_TYPE), debug dbgopt strict)
-#not yet# VBOX_WITH_DEBUG_VCC_CRT = 1
-endif
-ifdef VBOX_WITH_DEBUG_VCC_CRT
- VBOX_VCC_CRT_TYPE   = d
- VBOX_VCC_CRT_TYPE_N =
-else
- VBOX_VCC_CRT_TYPE   =
- VBOX_VCC_CRT_TYPE_N = d
-endif
-
-#
 # Decide which Windows DDK to use by default.
 #
 ifeq ($(VBOX_VCC_TOOL_STEM),VCC110)
@@ -2001,7 +1917,7 @@ VBOX_CHECK_IMPORTS ?= $(PATH_OBJ)/VBoxCheckImports/VBoxCheckImports$(HOSTSUFF_EX
 # GNU tar if present.
 if1of ($(KBUILD_TARGET), linux os2 win)
  VBOX_GTAR ?= tar
-else if1of ($(KBUILD_TARGET), freebsd solaris)
+else if1of ($(KBUILD_TARGET), freebsd netbsd solaris)
  VBOX_GTAR ?= gtar
 endif
 
@@ -2044,10 +1960,12 @@ VBOX_PATH_DIFX      ?= $(KBUILD_DEVTOOLS)/win.$(KBUILD_TARGET_ARCH)/DIFx/v2.1-r3
 VBOX_PATH_CABSDK    ?= $(KBUILD_DEVTOOLS)/win.x86/cabsdk/r1
 VBOX_PATH_MAKECAB   ?= $(VBOX_PATH_CABSDK)/BIN/MAKECAB.EXE
 
-# We need to export YASM for OSE, but since it was converted to .zip we need to
-# allow for the location used by the zip to be properly cleaned up first.
-if1of ($(KBUILD_HOST).$(KBUILD_HOST_ARCH), linux.x86 solaris.x86 win.x86)
- PATH_TOOL_YASM ?= $(KBUILD_DEVTOOLS_HST)/bin
+ifdef VBOX_OSE ## @todo try get rid of this crap! People can use the latest and greatest Yasm release, no need to check in the binary for OSE.
+ # We need to export YASM for OSE, but since it was converted to .zip we need to
+ # allow for the location used by the zip to be properly cleaned up first.
+ if1of ($(KBUILD_HOST).$(KBUILD_HOST_ARCH), linux.x86 solaris.x86 win.x86)
+  PATH_TOOL_YASM ?= $(KBUILD_DEVTOOLS_HST)/bin
+ endif
 endif
 
 # The Microsoft IDL compiler (the SDK build needs this on non-Windows).
@@ -2527,10 +2445,10 @@ else
             -nostdlib -o /dev/null -xc /dev/null > /dev/null 2>&1; \
     then echo "-Wl,$(2)"; else echo "$(3)"; fi; )
 
- VBOX_GCC_CHECK_CC    = $(call VBOX_GCC_CHECK_EX_CC,  $(TOOL_$(VBOX_GCC_TOOL)_CC),$1,$2)
- VBOX_GCC_CHECK_CXX   = $(call VBOX_GCC_CHECK_EX_CXX, $(TOOL_$(VBOX_GCC_TOOL)_CXX),$1,$2)
- VBOX_GCC_CHECK_LD    = $(call VBOX_GCC_CHECK_EX_LD,  $(TOOL_$(VBOX_GCC_TOOL)_LD),$1,$2)
- VBOX_GCC32_CHECK_CXX = $(call VBOX_GCC_CHECK_EX_CXX, $(TOOL_$(VBOX_GCC32_TOOL)_CXX),$1,$2)
+ VBOX_GCC_CHECK_CC    = $(call VBOX_GCC_CHECK_EX_CC,  $(TOOL_$(VBOX_GCC_TOOL)_ENV_SETUP) $(TOOL_$(VBOX_GCC_TOOL)_CC),$1,$2)
+ VBOX_GCC_CHECK_CXX   = $(call VBOX_GCC_CHECK_EX_CXX, $(TOOL_$(VBOX_GCC_TOOL)_ENV_SETUP) $(TOOL_$(VBOX_GCC_TOOL)_CXX),$1,$2)
+ VBOX_GCC_CHECK_LD    = $(call VBOX_GCC_CHECK_EX_LD,  $(TOOL_$(VBOX_GCC_TOOL)_ENV_SETUP) $(TOOL_$(VBOX_GCC_TOOL)_LD),$1,$2)
+ VBOX_GCC32_CHECK_CXX = $(call VBOX_GCC_CHECK_EX_CXX, $(TOOL_$(VBOX_GCC32_TOOL)_ENV_SETUP) $(TOOL_$(VBOX_GCC32_TOOL)_CXX),$1,$2)
 endif
 
 ifeq ($(KBUILD_HOST),win) ## @todo can drop this now, we're not using cygwin.
@@ -2644,11 +2562,17 @@ $(PATH_OUT)/DynamicConfig.kmk: \
 	$(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-delete-non-virtual-dtor    ?= $(call VBOX_GCC_CHECK_CXX,-Wno-delete-non-virtual-dtor,)'
 	$(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-int-to-pointer-cast        ?= $(call VBOX_GCC_CHECK_CC,-Wno-int-to-pointer-cast,)'
 	$(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-invalid-offsetof           ?= $(call VBOX_GCC_CHECK_CXX,-Wno-invalid-offsetof,)'
+if $(KBUILD_TARGET) != "darwin" || !defined(VBOX_WITH_NEW_XCODE) ## @todo somthing goes entirely sideways with the detection. clang doesn't know the option, but only complains when we use it in webservices/Makefile.kmk!
+	$(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-literal-suffix             ?= $(call VBOX_GCC_CHECK_CXX,-Wno-literal-suffix,)'
+else
+	$(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-literal-suffix             ?='
+endif
 	$(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-missing-field-initializers ?= $(call VBOX_GCC_CHECK_CC,-Wno-missing-field-initializers,)'
 	$(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-pointer-to-int-cast        ?= $(call VBOX_GCC_CHECK_CC,-Wno-pointer-to-int-cast,)'
 	$(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-variadic-macros   ?= $(call VBOX_GCC_CHECK_CXX,-Wno-variadic-macros,)'
 	$(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-vla               ?= $(call VBOX_GCC_CHECK_CXX,-Wno-vla,)'
 	$(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-overlength-strings?= $(call VBOX_GCC_CHECK_CC,-Wno-overlength-strings,)'
+	$(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-overloaded-virtual?= $(call VBOX_GCC_CHECK_CXX,-Wno-overloaded-virtual,)'
 	$(QUIET)$(APPEND) '$@' 'VBOX_GCC_fno-stack-protector   ?= $(call VBOX_GCC_CHECK_CC,-fno-stack-protector,)'
 	$(QUIET)$(APPEND) '$@' 'VBOX_GCC_fno-dwarf2-cfi-asm    ?= $(call VBOX_GCC_CHECK_CC,-fno-dwarf2-cfi-asm,)'
 	$(QUIET)$(APPEND) '$@' 'VBOX_GCC_m64                   ?= $(call VBOX_GCC_CHECK_CC,-m64,)'
@@ -2728,6 +2652,7 @@ ifeq ($(KBUILD_HOST),darwin)
 	$(QUIET)$(APPEND) '$@' 'VBOX_LD_no_compact_linkedit    ?= $(call VBOX_GCC_CHECK_LD,-no_compact_linkedit,)'
 endif
 # YASM
+	$(QUIET)$(APPEND) '$@' '# debug: TOOL_YASM_AS="$(TOOL_YASM_AS)"'
 	$(QUIET)$(APPEND) '$@' 'VBOX_YASM_Wno-segreg-in-64bit  ?= $(call VBOX_YASM_CHECK,-Wno-segreg-in-64bit,)'
 # NASM (--allow-64-bit: 2.12rc2)
 	$(QUIET)$(APPEND) '$@' 'VBOX_NASM_allow_64_bit         ?= $(call VBOX_NASM_CHECK,--allow-64-bit,)'
@@ -2781,6 +2706,153 @@ endif
 include $(PATH_OUT)/DynamicConfig.kmk
 endif # !VBOX_NOINC_DYNAMIC_CONFIG_KMK
 
+
+#
+# Compiler warning control.
+#
+VBOX_GCC_WARN     ?= -Wall $(VBOX_GCC_Wextra) $(VBOX_GCC_Wno-missing-field-initializers) -Wno-unused -Wno-trigraphs \
+	$(VBOX_GCC_fdiagnostics-show-option) $(VBOX_GCC_Wno-unused-parameter) $(VBOX_GCC_Wno-language-extension-token) \
+	$(VBOX_GCC_Wno-extended-offsetof) $(VBOX_GCC_Wno-gnu-folding-constant) $(VBOX_GCC_Wlogical-op) \
+	$(VBOX_GCC_Wno-string-plus-int) $(VBOX_GCC_Wno-nested-anon-types) $(VBOX_GCC_Wno-variadic-macros)
+VBOX_GCC_WARN_PEDANTIC = -Wshadow $(VBOX_GCC_WARN) -Wno-long-long
+if $(VBOX_GCC_VERSION_CXX) >= 40200 || defined(VBOX_WITH_MASOCHISTIC_WARNINGS) # gcc 4.2.x+ (4.1.2 is causing trouble with the extpack & add builds)
+ VBOX_GCC_WARN_MASOCHISTIC ?= -Wunused-variable -Wunused-function -Wunused-label -Wunused-parameter
+endif
+if   $(KBUILD_TARGET) == "linux" \
+  || ($(KBUILD_TARGET) == "darwin" && defined(VBOX_WITH_NEW_XCODE)) \
+  || defined(VBOX_WITH_MASOCHISTIC_WARNINGS)
+ VBOX_GCC_WARN_PEDANTIC += $(VBOX_GCC_WARN_MASOCHISTIC)
+endif
+
+VBOX_GCC_PEDANTIC_CXX ?= -pedantic $(VBOX_GCC_WARN_PEDANTIC) $(VBOX_GCC_Wno-return-type-c-linkage) $(VBOX_GCC_Wno-overloaded-virtual)
+VBOX_GCC_PEDANTIC_C   ?= -pedantic $(VBOX_GCC_WARN_PEDANTIC) -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Werror-implicit-function-declaration
+
+VBOX_GCC_NON_PEDANTIC_CXX ?= -Wno-sign-compare
+VBOX_GCC_NON_PEDANTIC_C   ?= -Wno-sign-compare -Werror-implicit-function-declaration
+
+# Disabled Visual C++ warnings, W4:
+#      -wd4065: switch statement contains 'default' but no 'case' labels
+#      -wd4996: deprecated / insecure.
+#      -wd4127: conditional expression is constant [level 4]
+#      -wd4706: assignment within conditional expression [level 4]
+#      -wd4201: nonstandard extension used : nameless struct/union [level 4]
+#      -wd4214: nonstandard extension used : bit field types other than int [level 4]
+#      -wd4510: 'VM::<unnamed-tag>' : default constructor could not be generated
+#      -wd4512: 'VM' : assignment operator could not be generated
+#      -wd4610: union 'VM::<unnamed-tag>' can never be instantiated - user defined constructor required
+# Disabled Visual C++ warnings, Wall:
+#      -wd4514: unreferenced inline function has been removed
+#      -wd4820: 'RTSTRSPACECORE' : '7' bytes padding added after data member 'RTSTRSPACECORE::uchHeight'
+#      -wd4365: '=' : conversion from 'unsigned char' to 'char', signed/unsigned mismatch
+#      -wd4987: nonstandard extension used: 'throw (...)' (setjmp.h + our stuff)
+#      -wd4710: 'std::string std::_Narrow_str(std::wstring)' : function not inlined
+#      -wd4061: enumerator 'RTASN1TYPE_END' in switch of enum 'RTASN1TYPE' is not explicitly handled by a case label
+#               Note! C4062 checks for the same but includes the 'default' case, just like gcc.  So, no trouble disabling this.
+#      -wd4986: 'operator new[]': exception specification does not match previous declaration (crtdbg.h vs new, exception specification only)
+#      -wd4191: 'type cast' : unsafe conversion from 'int (__cdecl *)(gzFile)' to 'PFNRT'
+#      -wd4574: 'INCL_WINSOCK_API_TYPEDEFS' is defined to be '0': did you mean to use '#if INCL_WINSOCK_API_TYPEDEFS'?
+#      -wd4917: 'OLE_XPOS_HIMETRIC' : a GUID can only be associated with a class, interface or namespace
+#      -wd4711: function 'void __cdecl rtMemCacheFreeOne(struct RTMEMCACHEINT * __ptr64,void * __ptr64)' selected for automatic inline expansion
+#      -wd4571: Informational: catch(...) semantics changed since Visual C++ 7.1; structured exceptions (SEH) are no longer caught
+#      -wd4611: interaction between '_setjmp' and C++ object destruction is non-portable
+#      -wd4324: '_TDI_PNP_CONTEXT_XP' : structure was padded due to __declspec(align())
+#      -wd4505: VBoxNetFltNobj.h(45) : warning C4505: 'VBoxNetFltNobj::Release' : unreferenced local function has been removed
+#               Probably related to http://stackoverflow.com/questions/3051992/compiler-warning-at-c-template-base-class
+#      -wd4263: 'int VRDPChannelClipboard::SendPacket(const void *,uint32_t)' : member function does not override any base class virtual member function
+#               Probably useful, but impractical, just like the next one.
+#      -wd4264: 'int VRDPOutputCtx::SendPacket(void)' : no override available for virtual member function from base 'VRDPOutputCtx'; function is hidden
+#      -wd4738: storing 32-bit float result in memory, possible loss of performance
+# Want to enable these:
+#      -wd4242: '=' : conversion from 'uint32_t' to 'uint8_t', possible loss of data
+#      -wd4244: 'conversion' conversion from 'type1' to 'type2', possible loss of data
+VBOX_VCC_WARN_ALL ?= -W4 -Wall -wd4065 -wd4996 -wd4127 -wd4706 -wd4201 -wd4214 -wd4510 -wd4512 -wd4610 \
+	-wd4514 -wd4820 -wd4365 -wd4987 -wd4710 -wd4061 -wd4986 -wd4191 -wd4574 -wd4917 -wd4711 -wd4611 -wd4571 -wd4324 -wd4505 \
+	-wd4263 -wd4264 -wd4738
+#ifndef VBOX_WITH_MASOCHISTIC_WARNINGS
+# VBOX_VCC_WARN_ALL +=
+#endif
+VBOX_VCC_WARN_ALL += -wd4242 -wd4244
+
+# Disable pedantic warnings for NP/NonPedantic templates.
+#      -wd4131: 'bi_flush' : uses old-style declarator
+#      -wd4255: 'tr_static_init' : no function prototype given: converting '()' to '(void)'
+#      -wd4668: '_WIN32_WCE' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'/
+#      -wd4100: 'cinfo' : unreferenced formal parameter
+#      -wd4189: 'sz' : local variable is initialized but not referenced
+#      -wd4132: 'xmlStringComment' : const object should be initialized
+#      -wd4152: nonstandard extension, function/data pointer conversion in expression
+#      -wd4702: unreachable code
+#      -wd4057: '=' : 'xmlChar *' differs in indirection to slightly different base types from 'char *'
+#      -wd4296: '>=' : expression is always true
+#      -wd4389: '==' : signed/unsigned mismatch
+#      -wd4018: '<=' : signed/unsigned mismatch
+#      -wd4245: '=' : conversion from 'int' to 'unsigned int', signed/unsigned mismatch
+#      -wd4267: '+=' : conversion from 'size_t' to 'long', possible loss of data
+#      -wd4295: 'vendor_string' : array is too small to include a terminating null character
+VBOX_VCC_NON_PEDANTIC = -wd4131 -wd4255 -wd4668 -wd4100 -wd4189 -wd4132 -wd4152 -wd4702 -wd4057 -wd4296 -wd4389 -wd4018 -wd4245 \
+	-wd4267 -wd4295
+
+ifeq ($(KBUILD_TARGET),win)
+ VBOX_C_CXX_FLAGS_NO_UNUSED_PARAMETERS = -wd4100
+else
+ VBOX_C_CXX_FLAGS_NO_UNUSED_PARAMETERS = -Wno-unused-parameter
+endif
+
+#
+# Compiler optimization flags.
+#
+ifeq ($(KBUILD_TYPE),debug)
+ VBOX_GCC_FP     ?= -fno-omit-frame-pointer
+ VBOX_GCC_OPT    ?= -O0
+ VBOX_VCC_FP     ?= -Oy-
+ VBOX_VCC_OPT    ?=
+ VBOX_GCC_R0_FP  ?= -fno-omit-frame-pointer -fno-optimize-sibling-calls
+ VBOX_GCC_R0_OPT ?= -O2
+ VBOX_VCC_R0_FP  ?= -Oy-
+ VBOX_VCC_R0_OPT ?=
+ VBOX_GCC_GC_FP  ?= -fno-omit-frame-pointer -fno-optimize-sibling-calls
+ VBOX_GCC_GC_OPT ?= -O2
+ VBOX_VCC_GC_FP  ?= -Oy-
+ VBOX_VCC_GC_OPT ?=
+else
+ # We should use -fomit-frame-pointer for GCC / -Oy for VCC.
+ # -funwind-tables provides support for backtraces in gdb then.
+ VBOX_GCC_FP     ?= -fno-omit-frame-pointer
+ VBOX_GCC_OPT    ?= -O2 $(VBOX_GCC_mtune-generic)
+ VBOX_VCC_FP     ?= -Oy-
+ VBOX_VCC_OPT    ?= -O2
+ VBOX_GCC_R0_FP  ?= -fno-omit-frame-pointer
+ VBOX_GCC_R0_OPT ?= -O2 $(VBOX_GCC_mtune-generic)
+ VBOX_VCC_R0_FP  ?= -Oy-
+ VBOX_VCC_R0_OPT ?= -O2
+ VBOX_GCC_GC_FP  ?= -fno-omit-frame-pointer
+ VBOX_GCC_GC_OPT ?= -O2 $(VBOX_GCC_mtune-generic)
+ VBOX_VCC_GC_FP  ?= -Oy-
+ VBOX_VCC_GC_OPT ?= -O2
+endif
+ifeq ($(KBUILD_TARGET_ARCH),x86)
+ ifneq ($(KBUILD_TARGET),darwin)
+  # (The '<=' operator is for prepending (kmk specific).)
+  VBOX_GCC_OPT <= -march=i586
+ endif
+endif
+
+
+#
+# Select the CRT type we're using with Microsoft Visual C++.
+#
+if1of ($(KBUILD_TYPE), debug dbgopt strict)
+#not yet# VBOX_WITH_DEBUG_VCC_CRT = 1
+endif
+ifdef VBOX_WITH_DEBUG_VCC_CRT
+ VBOX_VCC_CRT_TYPE   = d
+ VBOX_VCC_CRT_TYPE_N =
+else
+ VBOX_VCC_CRT_TYPE   =
+ VBOX_VCC_CRT_TYPE_N = d
+endif
+
+
 #
 # Warnings as errors.
 #
@@ -2795,6 +2867,27 @@ ifdef VBOX_WITH_WARNINGS_AS_ERRORS
  VBOX_VCC_LD_WERR ?= ## @todo later also: -WX
 endif
 
+#
+# The general GCC/Clang no warning policy.
+#
+# Note! This doesn't control everything.  Instead set VBOX_GCC_WERR=$(NO_SUCH_VARIABLE) to
+#       completely disable -Werror.
+#
+if !defined(VBOX_WITHOUT_NO_GCC_WARNING_POLICY) && !defined(VBOX_WITH_NO_GCC_WARNING_POLICY)
+ if defined(VBOX_WITH_MASOCHISTIC_WARNINGS) # gcc 4.6.x+
+  VBOX_WITH_NO_GCC_WARNING_POLICY = 1
+ else if $(KBUILD_TARGET) == "darwin" && defined(VBOX_WITH_NEW_XCODE)
+   VBOX_WITH_NO_GCC_WARNING_POLICY = 1
+ else if1of ($(KBUILD_TARGET), linux)
+  if $(VBOX_GCC_VERSION_CXX) >= 40600 # gcc 4.6.x+
+   VBOX_WITH_NO_GCC_WARNING_POLICY = 1
+  endif
+ endif
+endif
+ifdef VBOX_WITH_NO_GCC_WARNING_POLICY
+ $(info build debug: VBOX_WITH_NO_GCC_WARNING_POLICY is enabled)
+endif
+
 
 #
 # Misc stuff that should be after including DynamicConfig.kmk.
@@ -3607,7 +3700,7 @@ ifeq ($(KBUILD_TARGET),solaris)
   VBOX_WITH_ADDITIONS =
  else ifeq ($(VBOX_SOLARIS_VERSION),511)
   # OSS audio support for Solaris
-  VBOX_WITH_OSS := $(if-expr $(VBOX_SOLARIS_11_VERSION) >= 115,1,)
+  VBOX_WITH_AUDIO_OSS := $(if-expr $(VBOX_SOLARIS_11_VERSION) >= 115,1,)
  endif
 
  # XPCOM namespace cleanup issue with Solaris GCC 4.5.2 and newer, see @bugref{5838}.
@@ -3673,6 +3766,9 @@ ifdef VBOX_WITH_RAW_MODE
  #
  # Template for building RC things.
  #
+ # Disabled Visual C++ warnings:
+ #     -wd4505: 'iemRaisePageFaultJmp' : unreferenced local function has been removed
+ #
  TEMPLATE_VBoxRc = VBox Raw-Mode Context
  TEMPLATE_VBoxRc_ASTOOL              = $(VBOX_ASTOOL)
  TEMPLATE_VBoxRc_ASFLAGS             = $(VBOX_ASFLAGS32)
@@ -3695,11 +3791,8 @@ ifdef VBOX_WITH_RAW_MODE
  ifeq ($(VBOX_LDR_FMT32),pe)
   TEMPLATE_VBoxRc_TOOL               = $(VBOX_VCC_TOOL_STEM)X86
   TEMPLATE_VBoxRc_RCDEFS             = VBOX_SVN_REV=$(VBOX_SVN_REV) VBOX_SVN_REV_MOD_5K=$(expr $(VBOX_SVN_REV) % 50000)
-  ifdef TODO_MORE_WARNINGS
-   TEMPLATE_VBoxRc_CXXFLAGS          = -Zi -Zl -GR- -EHs- -GF -GS- -Zc:wchar_t- -Gs8192 $(VBOX_VCC_GC_OPT) $(VBOX_VCC_GC_FP) -W4 -wd4244 -wd4996 -wd4127 -wd4100 -wd4214 -wd4706 $(VBOX_VCC_WERR)
-  else
-   TEMPLATE_VBoxRc_CXXFLAGS          = -Zi -Zl -GR- -EHs- -GF -GS- -Zc:wchar_t- -Gs8192 $(VBOX_VCC_GC_OPT) $(VBOX_VCC_GC_FP) -W3 -wd4244 -wd4996 $(VBOX_VCC_WERR)
-  endif
+  TEMPLATE_VBoxRc_CXXFLAGS          = -Zi -Zl -GR- -EHs- -GF -GS- -Zc:wchar_t- -Gs8192 $(VBOX_VCC_GC_OPT) $(VBOX_VCC_GC_FP) \
+  	$(VBOX_VCC_WARN_ALL) -wd4505 $(VBOX_VCC_WERR)
   TEMPLATE_VBoxRc_CFLAGS             = $(TEMPLATE_VBoxRc_CXXFLAGS)
   TEMPLATE_VBoxRc_LDFLAGS            =  -Ignore:4197 \
   	-Driver -Subsystem:NATIVE -Incremental:NO -Align:64 -MapInfo:Exports -NoD $(VBOX_VCC_LD_WERR) -Release -Debug -Opt:Ref -Opt:Icf \
@@ -3728,7 +3821,7 @@ ifdef VBOX_WITH_RAW_MODE
   endif
   ifn1of ($(KBUILD_TARGET), solaris freebsd)
    TEMPLATE_VBoxRc_LIBS               = \
-	$(VBOX_GCC32_LIBGCC) # instricts
+	$(VBOX_GCC32_LIBGCC) # intrinsics
   endif
   if1of ($(KBUILD_TARGET),linux)
    TEMPLATE_VBoxRc_POST_CMDS         = $(if $(eq $(tool_do),LINK_SYSMOD),if readelf -S $(out)|grep -q "[cd]tors"; then echo "Found ctors/dtors in $(out)!"; exit 1; fi)
@@ -3810,6 +3903,9 @@ endif # VBOX_WITH_RAW_MODE
 #
 # Template for building R0 things.
 #
+# Disabled Visual C++ warnings:
+#      -wd4505: 'iemRaisePageFaultJmp' : unreferenced local function has been removed
+#
 TEMPLATE_VBoxR0 = VBox Ring 0
 TEMPLATE_VBoxR0_ASTOOL              = $(VBOX_ASTOOL)
 TEMPLATE_VBoxR0_ASFLAGS             = $(VBOX_ASFLAGS)
@@ -3831,11 +3927,8 @@ endif
 ifeq ($(VBOX_LDR_FMT),pe)
 TEMPLATE_VBoxR0_TOOL                = $(VBOX_VCC_TOOL)
 TEMPLATE_VBoxR0_RCDEFS              = VBOX_SVN_REV=$(VBOX_SVN_REV) VBOX_SVN_REV_MOD_5K=$(expr $(VBOX_SVN_REV) % 50000)
- ifdef TODO_MORE_WARNINGS
-TEMPLATE_VBoxR0_CXXFLAGS            = -Zi -Zl -GR- -EHs- -GF -GS- -Zc:wchar_t- $(VBOX_VCC_OPT) $(VBOX_VCC_FP) -W4 -wd4244 -wd4127 -wd4100 -wd4214 -wd4706 -wd4996 $(VBOX_VCC_WERR)
- else
-TEMPLATE_VBoxR0_CXXFLAGS            = -Zi -Zl -GR- -EHs- -GF -GS- -Zc:wchar_t- $(VBOX_VCC_OPT) $(VBOX_VCC_FP) -W3 -wd4244 -wd4996 $(VBOX_VCC_WERR)
- endif
+TEMPLATE_VBoxR0_CXXFLAGS            = -Zi -Zl -GR- -EHs- -GF -GS- -Zc:wchar_t- $(VBOX_VCC_OPT) $(VBOX_VCC_FP) \
+  	$(VBOX_VCC_WARN_ALL) -wd4505 $(VBOX_VCC_WERR)
 TEMPLATE_VBoxR0_CFLAGS              = $(TEMPLATE_VBoxR0_CXXFLAGS)
 TEMPLATE_VBoxR0_LDFLAGS             = -Ignore:4197 \
 	-Driver -Subsystem:NATIVE -Incremental:NO -Align:4096 -MapInfo:Exports -NoD $(VBOX_VCC_LD_WERR) -Release -Debug -Opt:Ref -Opt:Icf \
@@ -3879,7 +3972,7 @@ else
 endif
 ifn1of ($(KBUILD_TARGET),solaris freebsd)
  TEMPLATE_VBoxR0_LIBS               = \
-	$(VBOX_GCC_LIBGCC) # instricts
+	$(VBOX_GCC_LIBGCC) # intrinsics
 endif
 if1of ($(KBUILD_TARGET),linux)
  TEMPLATE_VBoxR0_POST_CMDS          =  $(if $(eq $(tool_do),LINK_SYSMOD),if readelf -S $(out)|grep -q "[cd]tors"; then echo "Found ctors/dtors in $(out)!"; exit 1; fi)
@@ -3920,6 +4013,16 @@ endif
 #
 # Template for building SUPDRV R0 things.
 #
+# Disabled Visual C++ warnings:
+#     -wd4996: deprecated / insecure.
+#     -wd4127: conditional expression is constant [level 4]
+#     -wd4201: nonstandard extension used : nameless struct/union [level 4]
+#     -wd4214: nonstandard extension used : bit field types other than int [level 4]
+#     -wd4706: assignment within conditional expression [level 4]
+#     -wd4324: '_TDI_PNP_CONTEXT_XP' : structure was padded due to __declspec(align())
+#
+#     -wd4100: 'identifier' : unreferenced formal parameter [level 4] --- TODO: Enable this one!
+#
 TEMPLATE_VBOXR0DRV                     = VBox SUPDRV Ring 0
 TEMPLATE_VBOXR0DRV_ASTOOL              = $(VBOX_ASTOOL)
 TEMPLATE_VBOXR0DRV_ASFLAGS             = $(VBOX_ASFLAGS)
@@ -3942,7 +4045,8 @@ ifeq ($(KBUILD_TARGET),win)
  TEMPLATE_VBOXR0DRV_DEFS.x86          += NO_INTERLOCKED_INTRINSICS # Avoids intrisic VC/WDK trouble
  TEMPLATE_VBOXR0DRV_DEFS.x86          += WIN9X_COMPAT_SPINLOCK     # Avoid multiply defined _KeInitializeSpinLock at 4
  TEMPLATE_VBOXR0DRV_DEFS.amd64         = _AMD64_
- TEMPLATE_VBOXR0DRV_CXXFLAGS           = -Zi -Zl -GR- -EHs- -GF -Gz -W3 -GS- -wd4996 -Zc:wchar_t- -Gs4096 $(VBOX_VCC_OPT) $(VBOX_VCC_FP)
+ TEMPLATE_VBOXR0DRV_CXXFLAGS           = -Zi -Zl -GR- -EHs- -GF -Gz -GS- -Zc:wchar_t- $(VBOX_VCC_FP) -Gs4096 $(VBOX_VCC_OPT) \
+	$(VBOX_VCC_WARN_ALL) $(VBOX_VCC_WERR)
  TEMPLATE_VBOXR0DRV_CFLAGS             = $(TEMPLATE_VBOXR0DRV_CXXFLAGS)
  TEMPLATE_VBOXR0DRV_LDFLAGS            = -Ignore:4197 \
  	-Driver -Subsystem:NATIVE -Incremental:NO -Align:4096 -MapInfo:Exports -NoD -Release -Debug -Opt:Ref -Opt:Icf \
@@ -3999,8 +4103,11 @@ TEMPLATE_VBOXR0DRV_INCS               += \
 	$(VBOX_PATH_MACOSX_SDK)/System/Library/Frameworks/Kernel.framework/PrivateHeaders \
 	$(VBOX_PATH_MACOSX_SDK)/System/Library/Frameworks/Kernel.framework/Headers
 ## @todo try use VBOX_GCC_PEDANTIC_CXX
+# -Wno-c++11-extensions -Wno-c99-extensions -Wno-extra-semi -Wno-zero-length-array
 TEMPLATE_VBOXR0DRV_CXXFLAGS            = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS) -mkernel \
-	-g $(VBOX_GCC_pipe) $(VBOX_GCC_WARN) -Wno-long-long $(VBOX_GCC_fdiagnostics-show-option) \
+	-g $(VBOX_GCC_pipe) $(VBOX_GCC_PEDANTIC_CXX) -Wno-long-long $(VBOX_GCC_fdiagnostics-show-option) \
+	-Wno-c++11-extensions -Wno-c99-extensions -Wno-extra-semi -Wno-zero-length-array \
+	-Wno-gnu-zero-variadic-macro-arguments -Wno-four-char-constants \
 	-fno-common -nostdinc -fno-builtin $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) \
 	-fno-exceptions -msoft-float -fapple-kext -fno-rtti -mkernel \
 	-fmodules -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -Wnon-modular-include-in-framework-module \
@@ -4019,7 +4126,7 @@ TEMPLATE_VBOXR0DRV_CXXFLAGS            = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS) -mkerne
 TEMPLATE_VBOXR0DRV_CXXFLAGS.amd64      = -m64 -mno-red-zone
 TEMPLATE_VBOXR0DRV_CXXFLAGS.x86        = -m32
 TEMPLATE_VBOXR0DRV_CFLAGS              = $(VBOX_DARWIN_DEF_SDK_CFLAGS) -mkernel \
-	-g $(VBOX_GCC_pipe) $(VBOX_GCC_WARN) -Wno-long-long $(VBOX_GCC_fdiagnostics-show-option) \
+	-g $(VBOX_GCC_pipe) $(VBOX_GCC_PEDANTIC_C) -Wno-long-long $(VBOX_GCC_fdiagnostics-show-option) \
 	-fno-common -nostdinc -fno-builtin $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) \
 	-fno-exceptions -msoft-float -fapple-kext -fno-rtti  \
 	-fmodules -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -Wnon-modular-include-in-framework-module \
@@ -4027,6 +4134,10 @@ TEMPLATE_VBOXR0DRV_CFLAGS              = $(VBOX_DARWIN_DEF_SDK_CFLAGS) -mkernel
 	$(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fasm-blocks -fno-strict-aliasing
 TEMPLATE_VBOXR0DRV_CFLAGS.amd64        = -m64 -mno-red-zone
 TEMPLATE_VBOXR0DRV_CFLAGS.x86          = -m32
+  if 1
+   TEMPLATE_VBOXR0DRV_CFLAGS          += $(VBOX_GCC_WERR)
+   TEMPLATE_VBOXR0DRV_CXXFLAGS        += $(VBOX_GCC_WERR)
+  endif
 TEMPLATE_VBOXR0DRV_LDFLAGS             =  $(filter-out $(VBOX_DARWIN_NO_COMPACT_LINKEDIT),$(VBOX_DARWIN_DEF_SDK_LDFLAGS)) \
 	-nostdlib -stdlib=libc++ -Wl,-kext -Wl,-keep_private_externs
 TEMPLATE_VBOXR0DRV_LDFLAGS.amd64       = -m64
@@ -4189,6 +4300,74 @@ endef
 
 endif # FreeBSD
 
+ifeq ($(KBUILD_TARGET),netbsd)
+
+# The location of the NetBSD sources.
+VBOX_NETBSD_SRC ?= /usr/src
+
+# NetBSD uses "i386" for 32-bit, "x86" for common 32- and 64-bit code.
+ifeq ($(KBUILD_TARGET_ARCH),amd64)
+VBOX_NETBSD_TARGET_ARCH=amd64
+else
+VBOX_NETBSD_TARGET_ARCH=i386
+endif
+
+VBOX_NETBSD_TARGET_SRC=$(VBOX_NETBSD_SRC)/sys/arch/$(VBOX_NETBSD_TARGET_ARCH)
+
+TEMPLATE_VBOXR0DRV_TOOL                = $(VBOX_GCC_TOOL)
+TEMPLATE_VBOXR0DRV_DEFS               += _KERNEL _MODULE
+TEMPLATE_VBOXR0DRV_INCS                = \
+	$(VBOX_NETBSD_SRC)/sys \
+	$(VBOX_NETBSD_SRC)/common/include \
+	$(PATH_OBJ)/netbsd/include
+
+TEMPLATE_VBOXR0DRV_CFLAGS              =  \
+	$(VBOX_GCC_WARN) -Wpointer-arith -Winline $(VBOX_GCC_Wno-pointer-sign) \
+	$(VBOX_GCC_fdiagnostics-show-option) \
+	-Wstrict-prototypes -Wmissing-prototypes -Wstrict-prototypes \
+	-Wimplicit-function-declaration -Werror-implicit-function-declaration \
+	-O2 -ffreestanding -fno-strict-aliasing -fno-common -finline-limit=8000 \
+	$(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
+	-nostdinc -std=c99 -msoft-float
+TEMPLATE_VBOXR0DRV_CFLAGS.x86          = -m32 \
+    -mpreferred-stack-boundary=2 -mno-mmx -mno-sse -mno-avx \
+    -mno-fp-ret-in-387
+TEMPLATE_VBOXR0DRV_CFLAGS.amd64        = -m64 --param inline-unit-growth=100 \
+    --param large-function-growth=1000 -fno-omit-frame-pointer \
+    -mcmodel=kernel -mno-red-zone -mno-sse -mno-mmx -mno-avx \
+	-fno-asynchronous-unwind-tables -mno-fp-ret-in-387
+TEMPLATE_VBOXR0DRV_CXXFLAGS            = -fno-exceptions -fno-rtti \
+	$(VBOX_GCC_WARN) -Wpointer-arith -Winline \
+	-O2 -fno-strict-aliasing -fno-common -finline-limit=8000 \
+	$(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
+	-nostdinc -msoft-float
+TEMPLATE_VBOXR0DRV_CXXFLAGS.x86        = $(TEMPLATE_VBOXR0DRV_CFLAGS.x86)
+TEMPLATE_VBOXR0DRV_CXXFLAGS.amd64      = $(TEMPLATE_VBOXR0DRV_CFLAGS.amd64)
+TEMPLATE_VBOXR0DRV_SYSSUFF             = .kmod
+TEMPLATE_VBOXR0DRV_LDFLAGS             = -d --warn-common
+TEMPLATE_VBOXR0DRV_LDFLAGS.x86         = -m elf_i386
+TEMPLATE_VBOXR0DRV_LDFLAGS.amd64       = -m elf_x86_64
+
+# symlink kernel includes
+TEMPLATE_VBOXR0DRV_ORDERDEPS += \
+	$(PATH_OBJ)/netbsd/include/$(VBOX_NETBSD_TARGET_ARCH) \
+	$(PATH_OBJ)/netbsd/include/x86 \
+	$(PATH_OBJ)/netbsd/include/machine
+
+$$(PATH_OBJ)/netbsd/include/$(VBOX_NETBSD_TARGET_ARCH):
+	$(QUIET)$(MKDIR) -p $(@D)
+	$(QUIET)$(LN_SYMLINK) $(VBOX_NETBSD_TARGET_SRC)/include $@
+
+$$(PATH_OBJ)/netbsd/include/x86:
+	$(QUIET)$(MKDIR) -p $(@D)
+	$(QUIET)$(LN_SYMLINK) $(VBOX_NETBSD_SRC)/sys/arch/x86/include $@
+
+$$(PATH_OBJ)/netbsd/include/machine:
+	$(QUIET)$(MKDIR) -p $(@D)
+	$(QUIET)$(LN_SYMLINK) $(VBOX_NETBSD_TARGET_ARCH) $@
+
+endif # NetBSD
+
 ifeq ($(KBUILD_TARGET),haiku)
 ## The Haiku include directories
 VBOX_HAIKU_SYS_INCS ?= /boot/develop/headers/os/kernel /boot/develop/headers/os/drivers
@@ -4241,6 +4420,11 @@ TEMPLATE_VBoxR0DrvLib_INSTTYPE.linux = stage
 # Template for building R3 executables and static libraries which are linked into executables.
 # Note! This is the base template for a whole lot of other ones, so be careful when changing it.
 #
+# Disabled Visual C++ warnings:
+#      -wd4065: switch statement contains 'default' but no 'case' labels
+#      -wd4244: 'conversion' conversion from 'type1' to 'type2', possible loss of data
+#      -wd4996: deprecated / insecure.
+#
 TEMPLATE_VBOXR3EXE                     = VBox Ring 3 Exe
 TEMPLATE_VBOXR3EXE_ASTOOL              = $(VBOX_ASTOOL)
 TEMPLATE_VBOXR3EXE_ASFLAGS.x86         = $(VBOX_ASFLAGS32)
@@ -4270,7 +4454,8 @@ ifeq ($(KBUILD_TARGET),win)
  TEMPLATE_VBOXR3EXE_TOOL.win.amd64     = $(VBOX_VCC_TOOL_STEM)AMD64
  TEMPLATE_VBOXR3EXE_RCDEFS             = VBOX_SVN_REV=$(VBOX_SVN_REV) VBOX_SVN_REV_MOD_5K=$(expr $(VBOX_SVN_REV) % 50000)
  TEMPLATE_VBOXR3EXE_SDKS               = ReorderCompilerIncs $(VBOX_WINPSDK)
- TEMPLATE_VBOXR3EXE_CXXFLAGS           = -Zi -Zl -GR- -EHsc -GF -MD$(VBOX_VCC_CRT_TYPE) -W3 -wd4065 -wd4244 -wd4996 -Zc:wchar_t- $(VBOX_VCC_OPT) $(VBOX_VCC_FP)
+ TEMPLATE_VBOXR3EXE_CXXFLAGS           = -Zi -Zl -GR- -EHsc -GF -MD$(VBOX_VCC_CRT_TYPE) -Zc:wchar_t- $(VBOX_VCC_OPT) $(VBOX_VCC_FP) \
+ 	$(VBOX_VCC_WARN_ALL) $(VBOX_VCC_WERR)
  TEMPLATE_VBOXR3EXE_CXXFLAGS.debug     = -RTCsu
  TEMPLATE_VBOXR3EXE_CXXFLAGS.dbgopt    = $(NO_SUCH_VARIABLE)
  TEMPLATE_VBOXR3EXE_CXXFLAGS.kprofile  = -Gh -GH
@@ -4320,13 +4505,20 @@ ifeq ($(KBUILD_TARGET),win)
 
 else # the gcc guys
 TEMPLATE_VBOXR3EXE_TOOL                = $(VBOX_GCC_TOOL)
-TEMPLATE_VBOXR3EXE_CXXFLAGS            = -g $(VBOX_GCC_pipe) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_IPRT_FMT_CHECK)
+TEMPLATE_VBOXR3EXE_CXXFLAGS            = -g $(VBOX_GCC_pipe) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_OPT) \
+ 	$(VBOX_GCC_FP) -fno-strict-aliasing $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_IPRT_FMT_CHECK)
+ ifdef VBOX_WITH_NO_GCC_WARNING_POLICY
+  TEMPLATE_VBOXR3EXE_CXXFLAGS         += $(VBOX_GCC_WERR)
+ endif
 TEMPLATE_VBOXR3EXE_CXXFLAGS.x86        = -m32
 TEMPLATE_VBOXR3EXE_CXXFLAGS.amd64      = -m64
 TEMPLATE_VBOXR3EXE_CXXFLAGS.sparc32    = -m32
 TEMPLATE_VBOXR3EXE_CXXFLAGS.sparc64    = -m64
 TEMPLATE_VBOXR3EXE_CXXFLAGS.kprofile   = -finstrument-functions
 TEMPLATE_VBOXR3EXE_CFLAGS              = -g $(VBOX_GCC_pipe) $(VBOX_GCC_PEDANTIC_C)   $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_IPRT_FMT_CHECK)
+ ifdef VBOX_WITH_NO_GCC_WARNING_POLICY
+  TEMPLATE_VBOXR3EXE_CFLAGS           += $(VBOX_GCC_WERR)
+ endif
 TEMPLATE_VBOXR3EXE_CFLAGS.x86          = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.x86)
 TEMPLATE_VBOXR3EXE_CFLAGS.amd64        = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.amd64)
 TEMPLATE_VBOXR3EXE_CFLAGS.sparc32      = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.sparc32)
@@ -4378,7 +4570,7 @@ TEMPLATE_VBOXR3EXE_LIBPATH            += \
 TEMPLATE_VBOXR3EXE_CFLAGS             += -fno-pic
 TEMPLATE_VBOXR3EXE_CXXFLAGS           += -fno-pic
 TEMPLATE_VBOXR3EXE_LDFLAGS            += -fno-pic
- else if1of ($(KBUILD_TARGET), freebsd netbsd openbsd)
+ else if1of ($(KBUILD_TARGET), freebsd openbsd)
 TEMPLATE_VBOXR3EXE_TOOL                = GXX3
 TEMPLATE_VBOXR3EXE_LIBS                = pthread
 TEMPLATE_VBOXR3EXE_INCS               += \
@@ -4389,6 +4581,15 @@ TEMPLATE_VBOXR3EXE_LIBPATH            += \
 	/usr/lib \
 	/usr/X11R6/lib \
 	/usr/local/lib
+ else ifeq ($(KBUILD_TARGET),netbsd)
+TEMPLATE_VBOXR3EXE_TOOL                = GXX3
+TEMPLATE_VBOXR3EXE_LIBS                = pthread
+TEMPLATE_VBOXR3EXE_INCS               += \
+	/usr/include \
+	/usr/X11R7/include
+TEMPLATE_VBOXR3EXE_LIBPATH            += \
+	/usr/lib \
+	/usr/X11R7/lib
  else ifeq ($(KBUILD_TARGET),solaris)
 TEMPLATE_VBOXR3EXE_TOOL                = GXX3PLAIN
 TEMPLATE_VBOXR3EXE_DEFS               += LIBICONV_PLUG _REENTRANT # Avoid the GNU libiconv, for now at least.
@@ -4432,7 +4633,7 @@ ifeq ($(KBUILD_TARGET),haiku)
 endif
 
 #
-# Temporary: Renaming the template and warnings will be errors (soon).
+# Temporary: Renaming the template and warnings will be errors ("soon").
 #
 TEMPLATE_VBoxR3Dll                     += VBox ring-3 SO/DLLs, no warnings
 TEMPLATE_VBoxR3Dll_EXTENDS             += VBOXR3
@@ -4473,10 +4674,10 @@ if1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), linux.x86 freebsd.x86)
  TEMPLATE_VBoxR3DllNoPic_CXXFLAGS          = $(TEMPLATE_VBOXR3EXE_CXXFLAGS) $(VBOX_GCC_WERR)
  TEMPLATE_VBoxR3DllNoPic_LDFLAGS           = $(TEMPLATE_VBOXR3EXE_LDFLAGS)
 else ifeq ($(KBUILD_TARGET),win)
- TEMPLATE_VBoxR3DllNoPic_CFLAGS            = $(TEMPLATE_VBOXR3_CFLAGS)   $(VBOX_VCC_WERR)
+ TEMPLATE_VBoxR3DllNoPic_CFLAGS            = $(filter-out -W3 -wd%,$(TEMPLATE_VBOXR3_CFLAGS)) $(VBOX_VCC_WARN_ALL) $(VBOX_VCC_WERR)
  TEMPLATE_VBoxR3DllNoPic_CFLAGS.debug      = $(filter-out -RTC%,$(TEMPLATE_VBOXR3_CFLAGS.debug))
  TEMPLATE_VBoxR3DllNoPic_CFLAGS.release    = $(TEMPLATE_VBOXR3_CFLAGS.release) -GS-
- TEMPLATE_VBoxR3DllNoPic_CXXFLAGS          = $(TEMPLATE_VBOXR3_CXXFLAGS) $(VBOX_VCC_WERR)
+ TEMPLATE_VBoxR3DllNoPic_CXXFLAGS          = $(filter-out -W3 -wd%,$(TEMPLATE_VBOXR3_CXXFLAGS)) $(VBOX_VCC_WARN_ALL) $(VBOX_VCC_WERR)
  TEMPLATE_VBoxR3DllNoPic_CXXFLAGS.debug    = $(filter-out -RTC%,$(TEMPLATE_VBOXR3_CXXFLAGS.debug)) # RTCsu Prevents IEM opt.
  TEMPLATE_VBoxR3DllNoPic_CXXFLAGS.release  = $(TEMPLATE_VBOXR3_CXXFLAGS.release) -GS-
  TEMPLATE_VBoxR3DllNoPic_LDFLAGS           = $(TEMPLATE_VBOXR3_LDFLAGS)  $(VBOX_VCC_LD_WERR)
@@ -4590,6 +4791,22 @@ else
  endif
 endif
 
+#
+# Non-pedantic variation of VBoxR3Static
+#
+TEMPLATE_VBoxR3StaticNonPedantic            = VBox Static Ring-3 EXE, non-pedantic.
+TEMPLATE_VBoxR3StaticNonPedantic_EXTENDS   = VBoxR3Static
+ifeq ($(KBUILD_TARGET),win)
+ TEMPLATE_VBoxR3StaticNonPedantic_CXXFLAGS = $(TEMPLATE_VBoxR3Static_CXXFLAGS) $(VBOX_VCC_NON_PEDANTIC)
+ TEMPLATE_VBoxR3StaticNonPedantic_CFLAGS   = $(TEMPLATE_VBoxR3Static_CFLAGS)   $(VBOX_VCC_NON_PEDANTIC)
+else # gcc:
+ TEMPLATE_VBoxR3StaticNonPedantic_TOOL     = $(VBOX_GCC_TOOL)
+ TEMPLATE_VBoxR3StaticNonPedantic_CXXFLAGS = $(filter-out $(VBOX_GCC_WERR) $(VBOX_GCC_WARN_MASOCHISTIC) $(VBOX_GCC_PEDANTIC_CXX),$(TEMPLATE_VBoxR3Static_CXXFLAGS)) \
+ 	$(VBOX_GCC_NON_PEDANTIC_CXX)
+ TEMPLATE_VBoxR3StaticNonPedantic_CFLAGS   = $(filter-out $(VBOX_GCC_WERR) $(VBOX_GCC_WARN_MASOCHISTIC) $(VBOX_GCC_PEDANTIC_C)  ,$(TEMPLATE_VBoxR3Static_CFLAGS)) \
+ 	$(VBOX_GCC_NON_PEDANTIC_CXX)
+endif
+
 
 #
 # Same as VBOXR3EXE but without C++ exceptions.
@@ -4815,8 +5032,10 @@ TEMPLATE_VBOXR3TSTNPEXE  = VBox Ring 3 Testcase Exe Non-pedantic
 TEMPLATE_VBOXR3TSTNPEXE_EXTENDS = VBOXR3TSTEXE
 ifneq ($(KBUILD_TARGET),win) # (only gcc)
  TEMPLATE_VBOXR3TSTNPEXE_TOOL             = $(VBOX_GCC_TOOL)
- TEMPLATE_VBOXR3TSTNPEXE_CXXFLAGS         = $(filter-out -pedantic -Wshadow,$(TEMPLATE_VBOXR3TSTEXE_CXXFLAGS)) -Wno-sign-compare
- TEMPLATE_VBOXR3TSTNPEXE_CFLAGS           = $(filter-out -pedantic -Wshadow -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations,$(TEMPLATE_VBOXR3TSTEXE_CFLAGS)) -Wno-sign-compare
+ TEMPLATE_VBOXR3TSTNPEXE_CXXFLAGS         = $(filter-out $(VBOX_GCC_WERR) $(VBOX_GCC_WARN_MASOCHISTIC) $(VBOX_GCC_PEDANTIC_CXX),$(TEMPLATE_VBOXR3TSTEXE_CXXFLAGS)) \
+ 	-Wno-sign-compare
+ TEMPLATE_VBOXR3TSTNPEXE_CFLAGS           = $(filter-out $(VBOX_GCC_WERR) $(VBOX_GCC_WARN_MASOCHISTIC) $(VBOX_GCC_PEDANTIC_C)  ,$(TEMPLATE_VBOXR3TSTEXE_CFLAGS)) \
+ 	-Wno-sign-compare
 endif
 
 
@@ -4851,9 +5070,10 @@ TEMPLATE_VBOXR3NPEXE                     = VBox Ring 3 Non-pedantic
 TEMPLATE_VBOXR3NPEXE_EXTENDS             = VBOXR3EXE
 ifneq ($(KBUILD_TARGET),win) # (only gcc)
  TEMPLATE_VBOXR3NPEXE_TOOL               = $(VBOX_GCC_TOOL)
- TEMPLATE_VBOXR3NPEXE_CXXFLAGS           = $(filter-out -pedantic -Wshadow,$(TEMPLATE_VBOXR3EXE_CXXFLAGS)) -Wno-sign-compare
- TEMPLATE_VBOXR3NPEXE_CFLAGS             = $(filter-out -pedantic -Wshadow -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations,$(TEMPLATE_VBOXR3EXE_CFLAGS)) \
-	-Wno-sign-compare -Werror-implicit-function-declaration
+ TEMPLATE_VBOXR3NPEXE_CXXFLAGS           = $(filter-out $(VBOX_GCC_WERR) $(VBOX_GCC_WARN_MASOCHISTIC) $(VBOX_GCC_PEDANTIC_CXX),$(TEMPLATE_VBOXR3EXE_CXXFLAGS)) \
+ 	$(VBOX_GCC_NON_PEDANTIC_CXX)
+ TEMPLATE_VBOXR3NPEXE_CFLAGS             = $(filter-out $(VBOX_GCC_WERR) $(VBOX_GCC_WARN_MASOCHISTIC) $(VBOX_GCC_PEDANTIC_C)  ,$(TEMPLATE_VBOXR3EXE_CFLAGS)) \
+ 	$(VBOX_GCC_NON_PEDANTIC_C)
 endif
 
 
@@ -4867,11 +5087,12 @@ TEMPLATE_VBOXR3NP = VBox Ring 3 Non-pedantic
 TEMPLATE_VBOXR3NP_EXTENDS = VBOXR3
 ifneq ($(KBUILD_TARGET),win) # (only gcc)
  TEMPLATE_VBOXR3NP_TOOL                  = $(VBOX_GCC_TOOL)
- TEMPLATE_VBOXR3NP_CXXFLAGS              = $(filter-out -pedantic -Wshadow,$(TEMPLATE_VBOXR3_CXXFLAGS)) -Wno-sign-compare
- TEMPLATE_VBOXR3NP_CFLAGS                = $(filter-out -pedantic -Wshadow -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations,$(TEMPLATE_VBOXR3_CFLAGS)) \
-	-Wno-sign-compare -Werror-implicit-function-declaration
- TEMPLATE_VBOXR3NP_OBJCFLAGS             = $(filter-out -pedantic -Wstrict-prototypes,$(TEMPLATE_VBOXR3_OBJCFLAGS))
- TEMPLATE_VBOXR3NP_OBJCXXFLAGS           = $(filter-out -pedantic,$(TEMPLATE_VBOXR3_OBJCXXFLAGS))
+ TEMPLATE_VBOXR3NP_CXXFLAGS              = $(filter-out $(VBOX_GCC_WERR) $(VBOX_GCC_WARN_MASOCHISTIC) $(VBOX_GCC_PEDANTIC_CXX),$(TEMPLATE_VBOXR3_CXXFLAGS)) \
+ 	$(VBOX_GCC_NON_PEDANTIC_CXX)
+ TEMPLATE_VBOXR3NP_CFLAGS                = $(filter-out $(VBOX_GCC_WERR) $(VBOX_GCC_WARN_MASOCHISTIC) $(VBOX_GCC_PEDANTIC_C)  ,$(TEMPLATE_VBOXR3_CFLAGS)) \
+	$(VBOX_GCC_NON_PEDANTIC_C)
+ TEMPLATE_VBOXR3NP_OBJCFLAGS             = $(filter-out $(VBOX_GCC_WERR) $(VBOX_GCC_WARN_MASOCHISTIC) -pedantic -Wstrict-prototypes,$(TEMPLATE_VBOXR3_OBJCFLAGS))
+ TEMPLATE_VBOXR3NP_OBJCXXFLAGS           = $(filter-out $(VBOX_GCC_WERR) $(VBOX_GCC_WARN_MASOCHISTIC) -pedantic,$(TEMPLATE_VBOXR3_OBJCXXFLAGS))
 endif
 
 
@@ -4881,18 +5102,22 @@ endif
 #
 TEMPLATE_VBoxR3DllNonPedantic               = VBox ring-3 Non-pedantic, with warnings.
 TEMPLATE_VBoxR3DllNonPedantic_EXTENDS       = VBOXR3
-ifneq ($(KBUILD_TARGET),win) # (only gcc)
+ifeq ($(KBUILD_TARGET),win)
+ TEMPLATE_VBoxR3DllNonPedantic_CXXFLAGS     = $(TEMPLATE_VBOXR3_CXXFLAGS) $(VBOX_VCC_NON_PEDANTIC)
+ TEMPLATE_VBoxR3DllNonPedantic_CFLAGS       = $(TEMPLATE_VBOXR3_CFLAGS)   $(VBOX_VCC_NON_PEDANTIC)
+else # gcc:
  TEMPLATE_VBoxR3DllNonPedantic_TOOL         = $(VBOX_GCC_TOOL)
- TEMPLATE_VBoxR3DllNonPedantic_CXXFLAGS     = $(filter-out -pedantic -Wshadow,$(TEMPLATE_VBOXR3_CXXFLAGS)) -Wno-sign-compare
- TEMPLATE_VBoxR3DllNonPedantic_CFLAGS       = $(filter-out -pedantic -Wshadow -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations,$(TEMPLATE_VBOXR3_CFLAGS)) \
-	-Wno-sign-compare -Werror-implicit-function-declaration
+ TEMPLATE_VBoxR3DllNonPedantic_CXXFLAGS     = $(filter-out $(VBOX_GCC_WERR) $(VBOX_GCC_WARN_MASOCHISTIC) $(VBOX_GCC_PEDANTIC_CXX),$(TEMPLATE_VBOXR3_CXXFLAGS)) \
+ 	$(VBOX_GCC_NON_PEDANTIC_CXX)
+ TEMPLATE_VBoxR3DllNonPedantic_CFLAGS       = $(filter-out $(VBOX_GCC_WERR) $(VBOX_GCC_WARN_MASOCHISTIC) $(VBOX_GCC_PEDANTIC_C)  ,$(TEMPLATE_VBOXR3_CFLAGS)) \
+	$(VBOX_GCC_NON_PEDANTIC_C)
 endif
 
 # x86 edition of the above template for use on AMD64 targets.
 TEMPLATE_VBoxR3DllNonPedantic-x86           = 32-bit VBox ring-3 SO/DLLs, no warnings
 TEMPLATE_VBoxR3DllNonPedantic-x86_EXTENDS   = VBoxR3DllNonPedantic
 TEMPLATE_VBoxR3DllNonPedantic-x86_BLD_TRG_ARCH = x86
-TEMPLATE_VBoxR3DllNonPedantic-x86_DEFS      = $(filter-out HC_ARCH_BITS%,$(TEMPLATE_VBoxR3Dll_DEFS)) \
+TEMPLATE_VBoxR3DllNonPedantic-x86_DEFS      = $(filter-out HC_ARCH_BITS%,$(TEMPLATE_VBoxR3DllNonPedantic_DEFS)) \
 	HC_ARCH_BITS=32 ARCH_BITS=32
 
 
@@ -4940,7 +5165,7 @@ TEMPLATE_VBoxNoCrtGccLib_CFLAGS.release    = -O2 -fno-strict-aliasing
 TEMPLATE_VBoxNoCrtGccLib_CFLAGS.profile    = $(TEMPLATE_VBoxNoCrtGccLib_CFLAGS.release)
 TEMPLATE_VBoxNoCrtGccLib_CFLAGS.kprofile   = $(TEMPLATE_VBoxNoCrtGccLib_CFLAGS.release)
 TEMPLATE_VBoxNoCrtGccLib_CFLAGS.darwin     = -static
-TEMPLATE_VBoxNoCrtGccLib_CXXFLAGS          = $(TEMPLATE_VBoxNoCrtGccLib_CFLAGS)
+TEMPLATE_VBoxNoCrtGccLib_CXXFLAGS          = $(filter-out -Werror-implicit-function-declaration,$(TEMPLATE_VBoxNoCrtGccLib_CFLAGS))
 TEMPLATE_VBoxNoCrtGccLib_CXXFLAGS.$(KBUILD_TARGET) = $(TEMPLATE_VBoxNoCrtGccLib_CFLAGS.$(KBUILD_TARGET))
 TEMPLATE_VBoxNoCrtGccLib_CXXFLAGS.$(KBUILD_TARGET_ARCH) = $(TEMPLATE_VBoxNoCrtGccLib_CFLAGS.$(KBUILD_TARGET_ARCH))
 TEMPLATE_VBoxNoCrtGccLib_INCS              = $(PATH_ROOT)/include/iprt/nocrt
@@ -4949,7 +5174,7 @@ ifeq (disabled-by-mingw-w64 $(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.amd64)
  # cross compile to 64-bit ELF (linux).
  TEMPLATE_VBoxNoCrtGccLib_TOOL             = XGCCAMD64LINUX
  TEMPLATE_VBoxNoCrtGccLib_ASTOOL           = YASM
- TEMPLATE_VBoxNoCrtGccLib_ASFLAGS          = -f elf64 -DASM_FORMAT_ELF -D__YASM__ -w+orphan-labels -g dwarf2
+ TEMPLATE_VBoxNoCrtGccLib_ASFLAGS          = -f elf64 -DASM_FORMAT_ELF -D__YASM__ -g dwarf2 -w+orphan-labels $(VBOX_YASM_Wno-segreg-in-64bit)
  TEMPLATE_VBoxNoCrtGccLib_LIBS             = $(KBUILD_DEVTOOLS)/win.x86/x86_64-unknown-linux-gnu/20060701-r2/lib/gcc/x86_64-unknown-linux-gnu/3.4.6/libgcc.a
  TEMPLATE_VBoxNoCrtGccLib_LDFLAGS          = -nostdlib
 
@@ -5036,13 +5261,15 @@ endif
 
 ifeq ($(KBUILD_TARGET),win)
  TEMPLATE_VBOXMAINEXE_SDKS               = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK)
- # Note: C4250 is the dominance warning, see r32789.
- #       C4065 is about default only switches.
- #       C4996 is about deprected function (CRT only?).
  #TEMPLATE_VBOXMAINEXE_TOOL               = $(VBOX_VCC_TOOL)
  TEMPLATE_VBOXMAINEXE_TOOL.win.x86       = $(VBOX_VCC_TOOL_STEM)X86
  TEMPLATE_VBOXMAINEXE_TOOL.win.amd64     = $(VBOX_VCC_TOOL_STEM)AMD64
- TEMPLATE_VBOXMAINEXE_CXXFLAGS           = -Zi -Zl -GR -EHsc -GF -MD$(VBOX_VCC_CRT_TYPE) -W3 -wd4065 -wd4996 -wd4250 -Zc:wchar_t- $(VBOX_VCC_OPT) $(VBOX_VCC_FP)
+ TEMPLATE_VBOXMAINEXE_CXXFLAGS           = -Zi -Zl -GR -EHsc -GF -MD$(VBOX_VCC_CRT_TYPE) -Zc:wchar_t- $(VBOX_VCC_OPT) $(VBOX_VCC_FP)
+ #    -wd4625: 'DisplaySourceBitmap' : copy constructor could not be generated because a base class copy constructor is inaccessible
+ #    -wd4626: 'DisplaySourceBitmap' : assignment operator could not be generated because a base class assignment operator is inaccessible
+ #             The two above can be cured by adding private: DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(xxxx); but too much work.
+ #    -wd4355: 'this' : used in base member initializer list (e.g. VirtualBoxBase.cpp)
+ TEMPLATE_VBOXMAINEXE_CXXFLAGS          += $(VBOX_VCC_WARN_ALL) -wd4625 -wd4626 -wd4355 $(VBOX_VCC_WERR)
  TEMPLATE_VBOXMAINEXE_CXXFLAGS.debug     = -RTCsu
  TEMPLATE_VBOXMAINEXE_CXXFLAGS.dbgopt    = $(NO_SUCH_VARIABLE)
  TEMPLATE_VBOXMAINEXE_CXXFLAGS.kprofile  = -Gh -GH
@@ -5085,14 +5312,20 @@ TEMPLATE_VBOXMAINEXE_CXXFLAGS            = -g $(VBOX_GCC_pipe) \
 	$(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) -Wshadow \
 	-fshort-wchar -fpermissive -fexceptions -frtti $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing \
 	$(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_std) $(VBOX_GCC_IPRT_FMT_CHECK)
-ifdef VBOX_WITH_DTRACE_R3_MAIN
- TEMPLATE_VBOXMAINEXE_CXXFLAGS := $(filter-out -pedantic,$(TEMPLATE_VBOXMAINEXE_CXXFLAGS)) -fdollars-in-identifiers # annoying gcc option precedence.
-endif
+ ifdef VBOX_WITH_NO_GCC_WARNING_POLICY
+  TEMPLATE_VBOXMAINEXE_CXXFLAGS         += $(VBOX_GCC_WERR)
+ endif
+ ifdef VBOX_WITH_DTRACE_R3_MAIN
+  TEMPLATE_VBOXMAINEXE_CXXFLAGS := $(filter-out -pedantic,$(TEMPLATE_VBOXMAINEXE_CXXFLAGS)) -fdollars-in-identifiers # annoying gcc option precedence.
+ endif
 TEMPLATE_VBOXMAINEXE_CXXFLAGS.x86        = -m32
 TEMPLATE_VBOXMAINEXE_CXXFLAGS.amd64      = -m64
 TEMPLATE_VBOXMAINEXE_CXXFLAGS.kprofile   = -finstrument-functions
 TEMPLATE_VBOXMAINEXE_CFLAGS              = -g $(VBOX_GCC_pipe) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) \
 	$(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_IPRT_FMT_CHECK)
+ ifdef VBOX_WITH_NO_GCC_WARNING_POLICY
+  TEMPLATE_VBOXMAINEXE_CFLAGS           += $(VBOX_GCC_WERR)
+ endif
 TEMPLATE_VBOXMAINEXE_CFLAGS.x86          = -m32
 TEMPLATE_VBOXMAINEXE_CFLAGS.amd64        = -m64
 TEMPLATE_VBOXMAINEXE_CFLAGS.kprofile     = $(TEMPLATE_VBOXMAINEXE_CXXFLAGS.kprofile)
@@ -5125,7 +5358,7 @@ TEMPLATE_VBOXMAINEXE_LIBS                = $(LIB_RUNTIME)
  else ifeq ($(KBUILD_TARGET),haiku)
 TEMPLATE_VBOXMAINEXE_TOOL                = GXX3
 TEMPLATE_VBOXMAINEXE_LIBS                = $(LIB_RUNTIME) network stdc++ supc++
- else if1of ($(KBUILD_TARGET), freebsd netbsd openbsd)
+ else if1of ($(KBUILD_TARGET), freebsd openbsd)
 TEMPLATE_VBOXMAINEXE_TOOL                = GXX3
 TEMPLATE_VBOXMAINEXE_LIBS                = $(LIB_RUNTIME)
 TEMPLATE_VBOXMAINEXE_INCS               += \
@@ -5136,6 +5369,15 @@ TEMPLATE_VBOXMAINEXE_LIBPATH            += \
 	/usr/lib \
 	/usr/X11R6/lib \
 	/usr/local/lib
+ else ifeq ($(KBUILD_TARGET),netbsd)
+TEMPLATE_VBOXMAINEXE_TOOL                = GXX3
+TEMPLATE_VBOXMAINEXE_LIBS                = $(LIB_RUNTIME)
+TEMPLATE_VBOXMAINEXE_INCS               += \
+	/usr/include \
+	/usr/X11R7/include
+TEMPLATE_VBOXMAINEXE_LIBPATH            += \
+	/usr/lib \
+	/usr/X11R7/lib
 else ifeq ($(KBUILD_TARGET),solaris)
 TEMPLATE_VBOXMAINEXE_TOOL                = GXX3PLAIN
 TEMPLATE_VBOXMAINEXE_DEFS               += _REENTRANT
@@ -5570,7 +5812,16 @@ ifdef VBOX_WITH_QTGUI
      _WIN32_WINNT=0x0500 UNICODE _UNICODE \
      QT_DLL _CRT_SECURE_NO_DEPRECATE \
      $(QMAKE_PRL_DEFINES)
-  TEMPLATE_VBOXQTGUIEXE_CXXFLAGS = -nologo -Zm200 -W3 -MD -Zi -EHsc -Zc:wchar_t-
+  TEMPLATE_VBOXQTGUIEXE_CXXFLAGS = -nologo -Zm200 -MD -Zi -EHsc -Zc:wchar_t-
+  #    -wd4481: nonstandard extension used: override specifier 'override'
+  #    -wd4625: 'QRubberBand' : copy constructor could not be generated because a base class copy constructor is inaccessible
+  #    -wd4626: 'QRubberBand' : assignment operator could not be generated because a base class assignment operator is inaccessible
+  #    -wd4640: qmetatype.h(2210): warning C4640: 'f' : construction of local static object is not thread-safe [too bad]
+  #    -wd4350: behavior change: 'int QStringList::indexOf(const QRegExp &,int) const' called instead of 'int QStringList::indexOf(QRegExp &,int) const'
+  #    -wd4371: UIActionPool.h(393) : warning C4371: 'UIActionPool::PointerToFunction' : layout of class may have changed from a previous version of the compiler due to better packing of member 'UIActionPool::PointerToFunction::ptfr'
+  #    -wd4121: UIActionPool.h(393) : warning C4121: 'UIActionPool::PointerToFunction' : alignment of a member was sensitive to packing
+  #    -wd4718: qmap.h(222) : warning C4718: 'QMapNode<enum DetailsElementType,bool>::destroySubTree' : recursive call has no side effects, deleting
+  TEMPLATE_VBOXQTGUIEXE_CXXFLAGS += $(VBOX_VCC_WARN_ALL) -wd4481 -wd4625 -wd4626 -wd4640 -wd4350 -wd4371 -wd4121 -wd4718 $(VBOX_VCC_WERR)
   TEMPLATE_VBOXQTGUIEXE_CXXFLAGS.debug = -RTCsu
   TEMPLATE_VBOXQTGUIEXE_CXXFLAGS.dbgopt = $(NO_SUCH_VARIABLE)
   TEMPLATE_VBOXQTGUIEXE_LDFLAGS = -Ignore:4197 \
@@ -5603,6 +5854,9 @@ ifdef VBOX_WITH_QTGUI
 	-Wno-long-long -fshort-wchar -fno-strict-aliasing \
 	$(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden) \
 	$(VBOX_GCC_Wno-return-type-c-linkage) $(VBOX_GCC_std) $(VBOX_GCC_IPRT_FMT_CHECK)
+  ifdef VBOX_WITH_NO_GCC_WARNING_POLICY
+   TEMPLATE_VBOXQTGUIEXE_CXXFLAGS += $(VBOX_GCC_WERR)
+  endif
   TEMPLATE_VBOXQTGUIEXE_CXXFLAGS.x86 = -m32
   TEMPLATE_VBOXQTGUIEXE_CXXFLAGS.amd64 = -m64
   TEMPLATE_VBOXQTGUIEXE_CXXFLAGS.linux = -pthread
@@ -5612,6 +5866,9 @@ ifdef VBOX_WITH_QTGUI
   TEMPLATE_VBOXQTGUIEXE_OBJCXXFLAGS = \
 	-g $(VBOX_GCC_pipe) $(VBOX_GCC_PEDANTIC_CXX) \
 	-frtti -fno-exceptions $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_IPRT_FMT_CHECK)
+  ifdef VBOX_WITH_NO_GCC_WARNING_POLICY
+   TEMPLATE_VBOXQTGUIEXE_OBJCXXFLAGS += $(VBOX_GCC_WERR)
+  endif
   TEMPLATE_VBOXQTGUIEXE_OBJCXXFLAGS.x86 = $(TEMPLATE_VBOXQTGUIEXE_CXXFLAGS.x86)
   TEMPLATE_VBOXQTGUIEXE_OBJCXXFLAGS.amd64 = $(TEMPLATE_VBOXQTGUIEXE_CXXFLAGS.amd64)
   TEMPLATE_VBOXQTGUIEXE_LDFLAGS.x86 = -m32
@@ -5742,7 +5999,6 @@ TEMPLATE_VBoxDbgSyms_INST = $(INST_VBOXDBG_SYMS)
 
 #
 # Template for building build bldprogs.
-#
 # HACK ALERT! The BLD_TRG_* is a hack to allow building libraries as well.
 #
 TEMPLATE_VBoxBldProg  = VBox Build Program
@@ -5757,7 +6013,7 @@ ifeq ($(KBUILD_TARGET),$(KBUILD_HOST))
  TEMPLATE_VBoxBldProg_ASFLAGS.amd64     := $(VBOX_ASFLAGS64)
 else
  TEMPLATE_VBoxBldProg_ASTOOL            := YASM
- TEMPLATE_VBoxBldProg_ASFLAGS           := -D__YASM__ -Worphan-labels
+ TEMPLATE_VBoxBldProg_ASFLAGS           := -D__YASM__ -Worphan-labels $(VBOX_YASM_Wno-segreg-in-64bit)
  if1of ($(KBUILD_HOST),win)
   TEMPLATE_VBoxBldProg_ASFLAGS          += -g cv8 -DASM_FORMAT_ELF
   TEMPLATE_VBoxBldProg_ASFLAGS.x86      := -f win32
@@ -5771,12 +6027,12 @@ else
   TEMPLATE_VBoxBldProg_ASFLAGS.x86      := -f elf32
   TEMPLATE_VBoxBldProg_ASFLAGS.amd64    := -f elf64
  endif
-  TEMPLATE_VBoxBldProg_ASFLAGS.amd64    += $(VBOX_YASM_Wno-segreg-in-64bit)
 endif
 ifeq ($(KBUILD_HOST),win)
  TEMPLATE_VBoxBldProg_TOOL              := $(VBOX_VCC_TOOL_STEM)$(toupper $(KBUILD_HOST_ARCH))
  TEMPLATE_VBoxBldProg_SDKS              := ReorderCompilerIncs $(VBOX_WINPSDK)
- TEMPLATE_VBoxBldProg_CXXFLAGS          := -Zi -Zl -GR- -EHsc -GF -W3 -wd4065 -wd4244 -wd4996 -Zc:wchar_t- $(VBOX_VCC_OPT) $(VBOX_VCC_FP) -MT$(VBOX_VCC_CRT_TYPE)
+ TEMPLATE_VBoxBldProg_CXXFLAGS          := -Zi -Zl -GR- -EHsc -GF -Zc:wchar_t- $(VBOX_VCC_OPT) $(VBOX_VCC_FP) -MT$(VBOX_VCC_CRT_TYPE) \
+	$(VBOX_VCC_WARN_ALL) $(VBOX_VCC_WERR)
  TEMPLATE_VBoxBldProg_CXXFLAGS.debug    := -RTCsu
  TEMPLATE_VBoxBldProg_CXXFLAGS.dbgopt    = $(NO_SUCH_VARIABLE)
  TEMPLATE_VBoxBldProg_CXXFLAGS.profile   = $(TEMPLATE_VBoxBldProg_CXXFLAGS.release)
@@ -5805,6 +6061,9 @@ else
 # (gcc of some kind )
 TEMPLATE_VBoxBldProg_TOOL                = GXX3
 TEMPLATE_VBoxBldProg_CFLAGS              = -g $(VBOX_GCC_pipe) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros)
+ ifdef VBOX_WITH_NO_GCC_WARNING_POLICY
+  TEMPLATE_VBoxBldProg_CFLAGS           += $(VBOX_GCC_WERR)
+ endif
 TEMPLATE_VBoxBldProg_CFLAGS.x86          = -m32
 TEMPLATE_VBoxBldProg_CFLAGS.sparc32      = -m32
 TEMPLATE_VBoxBldProg_CFLAGS.amd64        = -m64
@@ -5813,6 +6072,9 @@ TEMPLATE_VBoxBldProg_CFLAGS.release      = -O2 -fno-omit-frame-pointer -fno-stri
 TEMPLATE_VBoxBldProg_CFLAGS.profile      = $(TEMPLATE_VBoxBldProg_CXXFLAGS.profile)
 TEMPLATE_VBoxBldProg_CFLAGS.kprofile     = $(TEMPLATE_VBoxBldProg_CXXFLAGS.kprofile)
 TEMPLATE_VBoxBldProg_CXXFLAGS            = -g $(VBOX_GCC_pipe) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros)
+ ifdef VBOX_WITH_NO_GCC_WARNING_POLICY
+  TEMPLATE_VBoxBldProg_CXXFLAGS         += $(VBOX_GCC_WERR)
+ endif
 TEMPLATE_VBoxBldProg_CXXFLAGS.x86        = -m32
 TEMPLATE_VBoxBldProg_CXXFLAGS.sparc32    = -m32
 TEMPLATE_VBoxBldProg_CXXFLAGS.amd64      = -m64
@@ -5878,7 +6140,7 @@ TEMPLATE_VBoxBldProg_TOOL                = GXX3
 TEMPLATE_VBoxBldProg_LIBS                = network iconv
 TEMPLATE_VBoxBldProg_LIBPATH            += \
 	/boot/common/lib
- else if1of ($(KBUILD_HOST), freebsd netbsd openbsd)
+ else if1of ($(KBUILD_HOST), freebsd openbsd)
 TEMPLATE_VBoxBldProg_TOOL                = GXX3
 TEMPLATE_VBoxBldProg_LIBS                = pthread
 TEMPLATE_VBoxBldProg_INCS               += \
@@ -5889,6 +6151,15 @@ TEMPLATE_VBoxBldProg_LIBPATH            += \
 	/usr/lib \
 	/usr/X11R6/lib \
 	/usr/local/lib
+ else ifeq ($(KBUILD_HOST),netbsd)
+TEMPLATE_VBoxBldProg_TOOL                = GXX3
+TEMPLATE_VBoxBldProg_LIBS                = pthread
+TEMPLATE_VBoxBldProg_INCS               += \
+	/usr/include \
+	/usr/X11R7/include
+TEMPLATE_VBoxBldProg_LIBPATH            += \
+	/usr/lib \
+	/usr/X11R7/lib
  else ifeq ($(KBUILD_HOST),solaris)
 TEMPLATE_VBoxBldProg_TOOL                = GXX3PLAIN
 TEMPLATE_VBoxBldProg_LIBS                = rt
@@ -5990,7 +6261,7 @@ ifeq ($(KBUILD_TARGET),win)
   TEMPLATE_VBOXGUESTR3EXE_LIBS.win.x86 = $(NO_SUCH_VARIABLE)# Ditch RuntimeR3VccTricks2
  endif
 else # the gcc guys
- ifneq ($(VBOX_WITH_COMPATIBLE_LINUX_GUEST_PACKAGE),)
+ ifdef VBOX_WITH_COMPATIBLE_LINUX_GUEST_PACKAGE
   ifneq ($(KBUILD_TARGET),linux)
    override VBOX_WITH_COMPATIBLE_LINUX_GUEST_PACKAGE :=
   endif
@@ -5999,15 +6270,21 @@ else # the gcc guys
  TEMPLATE_VBOXGUESTR3EXE_TOOL    := $(subst GXX,GCC,$(TEMPLATE_VBOXR3EXE_TOOL))
  TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS = $(TEMPLATE_VBOXR3EXE_CXXFLAGS) -fno-exceptions
  TEMPLATE_VBOXGUESTR3EXE_LDFLAGS.linux = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_VBOXR3EXE_LDFLAGS.linux))
- ifneq ($(VBOX_WITH_COMPATIBLE_LINUX_GUEST_PACKAGE),)
+ ifdef VBOX_WITH_COMPATIBLE_LINUX_GUEST_PACKAGE
   ifeq ($(KBUILD_TARGET_ARCH),x86)
    TEMPLATE_VBOXGUESTR3EXE_TOOL         := VBoxXGccX86RedHatLinux
   else ifeq ($(KBUILD_TARGET_ARCH),amd64)
    TEMPLATE_VBOXGUESTR3EXE_TOOL         := VBoxXGccAmd64LinuxGnu
    TEMPLATE_VBOXGUESTR3EXE_TOOL.x86     := VBoxXGccX86RedHatLinux
   endif
-  TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS      := $(filter-out $(VBOX_GCC_pipe) $(VBOX_GCC_Wextra) $(VBOX_GCC_Wno-missing-field-initializers) $(VBOX_GCC_fdiagnostics-show-option) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_mtune-generic) $(VBOX_GCC_Wlogical-op),$(TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS)) -pipe
-  TEMPLATE_VBOXGUESTR3EXE_CFLAGS        := $(TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS)
+  TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS      := $(filter-out $(VBOX_GCC_Wextra) $(VBOX_GCC_WERR) \
+  	$(VBOX_GCC_Wno-missing-field-initializers) $(VBOX_GCC_fdiagnostics-show-option) $(VBOX_GCC_Wno-variadic-macros) \
+	$(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_mtune-generic) $(VBOX_GCC_Wlogical-op)\
+	,$(TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS)) -pipe
+  TEMPLATE_VBOXGUESTR3EXE_CFLAGS      := $(filter-out $(VBOX_GCC_Wextra) $(VBOX_GCC_WERR) \
+  	$(VBOX_GCC_Wno-missing-field-initializers) $(VBOX_GCC_fdiagnostics-show-option) $(VBOX_GCC_Wno-variadic-macros) \
+	$(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_mtune-generic) $(VBOX_GCC_Wlogical-op)\
+	,$(TEMPLATE_VBOXGUESTR3EXE_CFLAGS)) -pipe
   TEMPLATE_VBOXGUESTR3EXE_LDFLAGS.linux := $(filter-out $(VBOX_GCC_ORIGIN_OPT) $(VBOX_LD_as_needed),$(TEMPLATE_VBOXGUESTR3EXE_LDFLAGS.linux))
  endif
  TEMPLATE_VBOXGUESTR3EXE_LDFLAGS  = $(filter-out '$(VBOX_GCC_RPATH_OPT)%,$(TEMPLATE_VBOXR3EXE_LDFLAGS))
@@ -6017,7 +6294,7 @@ TEMPLATE_VBOXGUESTR3EXE_DEFS     := $(filter-out $(ARCH_BITS_DEFS), $(TEMPLATE_V
 TEMPLATE_VBOXGUESTR3EXE_DEFS.linux := $(TEMPLATE_VBOXR3EXE_DEFS.linux) LOG_USE_C99 RT_WITHOUT_EXEC_ALLOC
 ifeq ($(KBUILD_TARGET),linux) # As few libs as possible on linux.
  TEMPLATE_VBOXGUESTR3EXE_LIBS     = pthread rt m dl
-else if1of ($(KBUILD_TARGET), darwin freebsd netbsd openbsd)
+else if1of ($(KBUILD_TARGET), darwin freebsd openbsd)
  TEMPLATE_VBOXGUESTR3EXE_LIBS     = $(TEMPLATE_VBOXR3EXE_LIBS) iconv
 else ifeq ($(KBUILD_TARGET), solaris)
  TEMPLATE_VBOXGUESTR3EXE_LIBS     = $(TEMPLATE_VBOXR3EXE_LIBS) nsl
@@ -6035,6 +6312,21 @@ TEMPLATE_NewVBoxGuestR3Exe_LIBS     = \
 	$(TEMPLATE_VBOXGUESTR3EXE_LIBS)
 
 #
+# Template for building normal R3 programs for the guest additions, strict.
+#
+TEMPLATE_VBoxGuestR3Exe = VBox Guest Program w/ IPRT and VBGL.
+TEMPLATE_VBoxGuestR3Exe_EXTENDS  = NewVBoxGuestR3Exe
+TEMPLATE_VBoxGuestR3Exe_EXTENDS_BY = appending
+ifeq ($(KBUILD_TARGET),win)
+ TEMPLATE_VBoxGuestR3Exe_CFLAGS      += $(VBOX_VCC_WERR)
+ TEMPLATE_VBoxGuestR3Exe_CXXFLAGS    += $(VBOX_VCC_WERR)
+ TEMPLATE_VBoxGuestR3Exe_LDFLAGS     += $(VBOX_VCC_LD_WERR)
+else ifndef VBOX_WITH_COMPATIBLE_LINUX_GUEST_PACKAGE
+ TEMPLATE_VBoxGuestR3Exe_CFLAGS      += $(VBOX_GCC_WERR)
+ TEMPLATE_VBoxGuestR3Exe_CXXFLAGS    += $(VBOX_GCC_WERR)
+endif
+
+#
 # Template for building R3 (dynamic) libraries for the guest additions.
 #
 TEMPLATE_VBOXGUESTR3DLL           = VBox Guest User Dynamic Libraries
@@ -6057,7 +6349,7 @@ TEMPLATE_NewVBoxGuestR3Dll_LIBS     = \
 	$(VBOX_LIB_IPRT_GUEST_R3_SHARED) \
 	$(VBOX_LIB_VBGL_R3_SHARED) \
 	$(VBOX_LIB_IPRT_GUEST_R3_SHARED) \
-	$(TEMPLATE_VBOXGUESTR3EXE_LIBS)
+	$(TEMPLATE_VBOXGUESTR3DLL_LIBS)
 
 #
 # Template for building normal R3 (dynamic) libraries for the guest additions, strict.
@@ -6069,7 +6361,7 @@ ifeq ($(KBUILD_TARGET),win)
  TEMPLATE_VBoxGuestR3Dll_CFLAGS      += $(VBOX_VCC_WERR)
  TEMPLATE_VBoxGuestR3Dll_CXXFLAGS    += $(VBOX_VCC_WERR)
  TEMPLATE_VBoxGuestR3Dll_LDFLAGS     += $(VBOX_VCC_LD_WERR)
-else ifeq ($(VBOX_WITH_COMPATIBLE_LINUX_GUEST_PACKAGE),)
+else ifndef VBOX_WITH_COMPATIBLE_LINUX_GUEST_PACKAGE
  TEMPLATE_VBoxGuestR3Dll_CFLAGS      += $(VBOX_GCC_WERR)
  TEMPLATE_VBoxGuestR3Dll_CXXFLAGS    += $(VBOX_GCC_WERR)
 endif
@@ -6092,7 +6384,7 @@ ifeq ($(KBUILD_TARGET),win)
  TEMPLATE_VBoxGuestR3Lib_CFLAGS      += $(VBOX_VCC_WERR)
  TEMPLATE_VBoxGuestR3Lib_CXXFLAGS    += $(VBOX_VCC_WERR)
  TEMPLATE_VBoxGuestR3Lib_LDFLAGS     += $(VBOX_VCC_LD_WERR)
-else ifeq ($(VBOX_WITH_COMPATIBLE_LINUX_GUEST_PACKAGE),)
+else ifndef VBOX_WITH_COMPATIBLE_LINUX_GUEST_PACKAGE
  TEMPLATE_VBoxGuestR3Lib_CFLAGS      += $(VBOX_GCC_WERR)
  TEMPLATE_VBoxGuestR3Lib_CXXFLAGS    += $(VBOX_GCC_WERR)
 endif
@@ -6103,8 +6395,10 @@ endif
 TEMPLATE_VBOXGUESTR3NPEXE          = VBox Guest Program Non-pedantic
 TEMPLATE_VBOXGUESTR3NPEXE_EXTENDS  = VBOXGUESTR3EXE
 ifneq ($(KBUILD_TARGET),win) # gcc only
-TEMPLATE_VBOXGUESTR3NPEXE_CXXFLAGS = $(filter-out -pedantic -Wshadow,$(TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS)) -Wno-sign-compare
-TEMPLATE_VBOXGUESTR3NPEXE_CFLAGS   = $(filter-out -pedantic -Wshadow -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations,$(TEMPLATE_VBOXGUESTR3EXE_CFLAGS)) -Wno-sign-compare
+ TEMPLATE_VBOXGUESTR3NPEXE_CXXFLAGS = $(filter-out $(VBOX_GCC_WERR) $(VBOX_GCC_WARN_MASOCHISTIC) $(VBOX_GCC_PEDANTIC_CXX),$(TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS)) \
+ 	-Wno-sign-compare
+ TEMPLATE_VBOXGUESTR3NPEXE_CFLAGS   = $(filter-out $(VBOX_GCC_WERR) $(VBOX_GCC_WARN_MASOCHISTIC) $(VBOX_GCC_PEDANTIC_C)  ,$(TEMPLATE_VBOXGUESTR3EXE_CFLAGS)) \
+ 	-Wno-sign-compare
 endif
 
 #
@@ -6146,7 +6440,7 @@ if1of ($(KBUILD_TARGET), dragonfly freebsd linux netbsd openbsd) # the gnu ld gu
 endif
 TEMPLATE_VBOXGUESTR3XF86MOD_CFLAGS  = $(TEMPLATE_VBOXGUESTR3EXE_CFLAGS) -fno-pie -fno-merge-constants -std=c99 -ffreestanding
 TEMPLATE_VBOXGUESTR3XF86MOD_CXXFLAGS= $(TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS) -fno-pie -fno-merge-constants -ffreestanding
-ifeq ($(VBOX_WITH_COMPATIBLE_LINUX_GUEST_PACKAGE),)
+ifndef VBOX_WITH_COMPATIBLE_LINUX_GUEST_PACKAGE
  TEMPLATE_VBOXGUESTR3XF86MOD_CFLAGS   += $(VBOX_GCC_fno-stack-protector)
  TEMPLATE_VBOXGUESTR3XF86MOD_CXXFLAGS += $(VBOX_GCC_fno-stack-protector)
 endif
@@ -6175,7 +6469,7 @@ TEMPLATE_VBOXGUESTR3XORGMOD_LIBS.$(KBUILD_TARGET)   = $(NO_SUCH_VARIABLE)
 TEMPLATE_VBOXGUESTR3XORGMOD_CFLAGS                  = $(TEMPLATE_VBOXGUESTR3DLL_CFLAGS) -std=c99
 if1of ($(KBUILD_TARGET), linux)
  TEMPLATE_VBOXGUESTR3XORGMOD_CFLAGS                += -Wno-conversion -Wno-unused-parameter
- ifeq ($(VBOX_WITH_COMPATIBLE_LINUX_GUEST_PACKAGE),)
+ ifndef VBOX_WITH_COMPATIBLE_LINUX_GUEST_PACKAGE
   TEMPLATE_VBOXGUESTR3XORGMOD_CFLAGS               += $(VBOX_GCC_Wno-variadic-macros)
  endif
 endif
@@ -6233,17 +6527,17 @@ endif
 # Template for building OpenGL host dlls.
 #
 TEMPLATE_VBOXCROGLR3HOSTDLL                  = VBox OpenGL Host DLLs
-TEMPLATE_VBOXCROGLR3HOSTDLL_EXTENDS          = VBOXR3NP
+TEMPLATE_VBOXCROGLR3HOSTDLL_EXTENDS         := $(if-expr "$(KBUILD_TARGET)" == "win",VBOXR3,VBOXR3NP)
 TEMPLATE_VBOXCROGLR3HOSTDLL_EXTENDS_BY       = prepending
 TEMPLATE_VBOXCROGLR3HOSTDLL_DEFS             = CHROMIUM_THREADSAFE VBOX_WITH_HGCM UNPACKS
 TEMPLATE_VBOXCROGLR3HOSTDLL_DEFS.win         = _WIN32_WINNT=0x0500 WINDOWS=1
 TEMPLATE_VBOXCROGLR3HOSTDLL_DEFS.linux       = Linux=1 _GNU_SOURCE
 TEMPLATE_VBOXCROGLR3HOSTDLL_DEFS.solaris     = SunOS=1 _GNU_SOURCE #GLEXT_64_TYPES_DEFINED
 TEMPLATE_VBOXCROGLR3HOSTDLL_DEFS.darwin      = DARWIN=1 GL_GLEXT_LEGACY _GNU_SOURCE VBOX_WITH_COCOA_QT
-TEMPLATE_VBOXCROGLR3HOSTDLL_LDFLAGS.darwin   = -framework AppKit
 TEMPLATE_VBOXCROGLR3HOSTDLL_DEFS.freebsd     = FreeBSD=1 _GNU_SOURCE
 TEMPLATE_VBOXCROGLR3HOSTDLL_INCS             = $(VBOX_PATH_CROGL_INCLUDE) $(VBOX_PATH_CROGL_GENFILES)
 TEMPLATE_VBOXCROGLR3HOSTDLL_SDKS.darwin      = DARWIN-OPENGL
+TEMPLATE_VBOXCROGLR3HOSTDLL_LDFLAGS.darwin   = -framework AppKit
 TEMPLATE_VBOXCROGLR3HOSTDLL_LDFLAGS.darwin  += \
 	-framework OpenGL \
 	-current_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \
@@ -6267,22 +6561,30 @@ TEMPLATE_VBOXCROGLR3HOSTLIB_INST    = $(INST_LIB)
 # Template for building OpenGL guest dlls.
 #
 TEMPLATE_VBOXCROGLR3GUESTDLL                  = VBox OpenGL Guest DLLs
+if "$(KBUILD_TARGET)" == "win" || defined(VBOX_WITH_MASOCHISTIC_WARNINGS) || defined(VBOX_WITH_NO_GCC_WARNING_POLICY) ## @todo use VBoxGuestR3Dll everywhere
+TEMPLATE_VBOXCROGLR3GUESTDLL_EXTENDS          = VBoxGuestR3Dll
+else
 TEMPLATE_VBOXCROGLR3GUESTDLL_EXTENDS          = VBOXGUESTR3NPDLL
-TEMPLATE_VBOXCROGLR3GUESTDLL_EXTENDS_BY       = prepending
-TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS             = CHROMIUM_THREADSAFE VBOX_WITH_HGCM
-TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS.win         = WINDOWS=1
-TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS.linux       = Linux=1 _GNU_SOURCE
-TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS.solaris     = SunOS=1 _GNU_SOURCE #GLEXT_64_TYPES_DEFINED
-TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS.darwin      = DARWIN=1 GL_GLEXT_LEGACY _GNU_SOURCE VBOX_WITH_COCOA_QT
-TEMPLATE_VBOXCROGLR3GUESTDLL_LDFLAGS.darwin   = -framework AppKit
-TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS.freebsd     = FreeBSD=1 _GNU_SOURCE
-TEMPLATE_VBOXCROGLR3GUESTDLL_INCS             = $(VBOX_PATH_CROGL_INCLUDE) $(VBOX_PATH_CROGL_GENFILES)
-TEMPLATE_VBOXCROGLR3GUESTDLL_SDKS.darwin      = DARWIN-OPENGL
-TEMPLATE_VBOXCROGLR3GUESTDLL_LDFLAGS.darwin  += \
+endif
+TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS             = $(TEMPLATE_$(TEMPLATE_VBOXCROGLR3GUESTDLL_EXTENDS)_DEFS) CHROMIUM_THREADSAFE VBOX_WITH_HGCM
+TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS.win         = $(TEMPLATE_$(TEMPLATE_VBOXCROGLR3GUESTDLL_EXTENDS)_DEFS.win) WINDOWS=1
+TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS.linux       = $(TEMPLATE_$(TEMPLATE_VBOXCROGLR3GUESTDLL_EXTENDS)_DEFS.linux) Linux=1 _GNU_SOURCE
+TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS.solaris     = $(TEMPLATE_$(TEMPLATE_VBOXCROGLR3GUESTDLL_EXTENDS)_DEFS.solaris) SunOS=1 _GNU_SOURCE #GLEXT_64_TYPES_DEFINED
+TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS.darwin      = $(TEMPLATE_$(TEMPLATE_VBOXCROGLR3GUESTDLL_EXTENDS)_DEFS.darwin) DARWIN=1 GL_GLEXT_LEGACY _GNU_SOURCE VBOX_WITH_COCOA_QT
+TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS.freebsd     = $(TEMPLATE_$(TEMPLATE_VBOXCROGLR3GUESTDLL_EXTENDS)_DEFS.freebsd) FreeBSD=1 _GNU_SOURCE
+TEMPLATE_VBOXCROGLR3GUESTDLL_INCS             = $(VBOX_PATH_CROGL_INCLUDE) $(VBOX_PATH_CROGL_GENFILES) $(TEMPLATE_$(TEMPLATE_VBOXCROGLR3GUESTDLL_EXTENDS)_INCS)
+TEMPLATE_VBOXCROGLR3GUESTDLL_SDKS.darwin      = DARWIN-OPENGL $(TEMPLATE_$(TEMPLATE_VBOXCROGLR3GUESTDLL_EXTENDS)_SDKS)
+ifneq ($(KBUILD_TARGET),win)
+ TEMPLATE_VBOXCROGLR3GUESTDLL_CFLAGS          = $(filter-out -pedantic, $(TEMPLATE_$(TEMPLATE_VBOXCROGLR3GUESTDLL_EXTENDS)_CFLAGS)) \
+ 	$(if-expr !defined(VBOX_WITH_COMPATIBLE_LINUX_GUEST_PACKAGE),$(VBOX_GCC_Wno-overlength-strings),)
+ TEMPLATE_VBOXCROGLR3GUESTDLL_CXXFLAGS        = $(filter-out -pedantic, $(TEMPLATE_$(TEMPLATE_VBOXCROGLR3GUESTDLL_EXTENDS)_CXXFLAGS))
+endif
+TEMPLATE_VBOXCROGLR3GUESTDLL_LDFLAGS.darwin   = $(TEMPLATE_$(TEMPLATE_VBOXCROGLR3GUESTDLL_EXTENDS)_LDFLAGS.darwin)\
+	-framework AppKit \
 	-framework OpenGL \
 	-current_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \
 	-compatibility_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)
-TEMPLATE_VBOXCROGLR3GUESTDLL_BLDDIRS          = $(VBOX_PATH_CROGL_GENFILES)/
+TEMPLATE_VBOXCROGLR3GUESTDLL_BLDDIRS          = $(TEMPLATE_$(TEMPLATE_VBOXCROGLR3GUESTDLL_EXTENDS)_BLDDIRS) $(VBOX_PATH_CROGL_GENFILES)/
 
 #
 # Template for building OpenGL guest libraries.
@@ -6545,7 +6847,7 @@ endif
 SVN                    ?= svn$(HOSTSUFF_EXE)
 VBOX_SVN_REV_KMK        = $(PATH_OUT)/revision.kmk
 ifndef VBOX_SVN_REV
- VBOX_SVN_REV_FALLBACK := $(patsubst %:,,  $Rev: 108956 $  )
+ VBOX_SVN_REV_FALLBACK := $(patsubst %:,,  $Rev: 110228 $  )
  VBOX_SVN_DEP          := $(firstword $(wildcard $(PATH_ROOT)/.svn/wc.db $(abspath $(PATH_ROOT)/../.svn/wc.db) $(abspath $(PATH_ROOT)/../../.svn/wc.db) $(PATH_ROOT)/.svn/entries))
  ifeq ($(which $(SVN)),)
   VBOX_SVN_DEP         :=
@@ -6687,6 +6989,34 @@ endif
 
 
 #
+# For efficiently build serveral build types / archs.
+#
+both-debug-release both-release-debug: \
+		build-release-$(KBUILD_TARGET_ARCH) \
+		build-debug-$(KBUILD_TARGET_ARCH)
+both-x86-amd64     both-amd64-x86: \
+		build-$(KBUILD_TYPE)-x86 \
+		build-$(KBUILD_TYPE)-x86
+both-types-archs both-archs-types: \
+		build-debug-x86 \
+		build-release-x86 \
+		build-debug-amd64 \
+		build-release-amd64
+
+build-release-x86:
+	+$(MAKE) KBUILD_TYPE=release KBUILD_TARGET_ARCH=x86
+
+build-debug-x86:
+	+$(MAKE) KBUILD_TYPE=debug KBUILD_TARGET_ARCH=x86
+
+build-release-amd64:
+	+$(MAKE) KBUILD_TYPE=release KBUILD_TARGET_ARCH=amd64
+
+build-debug-amd64:
+	+$(MAKE) KBUILD_TYPE=debug KBUILD_TARGET_ARCH=amd64
+
+
+#
 # Some extra goals.
 #
 .PHONY: up update st stat status
diff --git a/Doxyfile.Core b/Doxyfile.Core
index ced2806..3039af2 100644
--- a/Doxyfile.Core
+++ b/Doxyfile.Core
@@ -695,7 +695,8 @@ PREDEFINED          += \
     "IMPLEMENT_OLECREATE2(class, name, id1, id2, id3, id4, id5, id6, id7, id8, id9, id10, id11)=" \
     RT_GCC_EXTENSION= \
     "CPUM_STRUCT_NM(n)=" \
-    "CPUM_UNION_NM(n)="
+    "CPUM_UNION_NM(n)=" \
+    "DECL_NO_RETURN(type)=type"
 
 EXPAND_AS_DEFINED      = \
     RCPTRTYPE \
diff --git a/Maintenance.kmk b/Maintenance.kmk
index 9f28f0a..23b59ca 100644
--- a/Maintenance.kmk
+++ b/Maintenance.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/Makefile.kmk b/Makefile.kmk
index 4bffaf2..8edc962 100644
--- a/Makefile.kmk
+++ b/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -256,20 +256,25 @@ else # VBOX_WITH_QTGUI_V5
      # For non-hardened builds we need to remove the RUNPATH. This stuff is
      # ugly but we need to prevent kBuild from hard-linking otherwise we
      # (indirectly) change the binaries in tools
+     ifneq ($(KBUILD_TARGET),solaris)
+      QT5_VERSION = 5.6.1
+     else
+      QT5_VERSION = 5.5.1
+     endif
      qt5-bin_SOURCES = \
-      $(foreach qtmod,$(VBOX_QT_MOD_NAMES),$(qt5-bin_0_OUTDIR)/lib$(qtmod).so.5.5.1=>lib$(qtmod).so.5) \
+      $(foreach qtmod,$(VBOX_QT_MOD_NAMES),$(qt5-bin_0_OUTDIR)/lib$(qtmod).so.$(QT5_VERSION)=>lib$(qtmod).so.5) \
       $(foreach lib,$(VBOX_QT_PLUGINS),$(qt5-bin_0_OUTDIR)/$(lib)=>$(lib))
       ifneq ($(KBUILD_TARGET),solaris)
        qt5-bin_SOURCES += \
         $(foreach lib,$(VBOX_QT_LEGACY_LIBS),$(qt5-bin_0_OUTDIR)/$(lib)=>legacy/$(lib))
       endif # solaris
 
-$(foreach qtmod,$(VBOX_QT_MOD_NAMES),$$(qt5-bin_0_OUTDIR)/lib$(qtmod).so.5.5.1): \
+$(foreach qtmod,$(VBOX_QT_MOD_NAMES),$$(qt5-bin_0_OUTDIR)/lib$(qtmod).so.$(QT5_VERSION)): \
 	$$(qt5-bin_0_OUTDIR)/% : $(VBOX_PATH_QT_LIB)/% | $$(qt5-bin_0_OUTDIR)/
 	$(call MSG_INST_FILE,$^,$@)
 	$(QUIET)$(CP) $^ $@
 	$(QUIET)chrpath --delete $@
-      
+
       ifneq ($(KBUILD_TARGET),solaris)
 $(foreach lib,$(VBOX_QT_PLUGINS),$$(qt5-bin_0_OUTDIR)/$(lib)): \
 	$$(qt5-bin_0_OUTDIR)/% : $(VBOX_PATH_QT)/% | $$(qt5-bin_0_OUTDIR)/
@@ -1865,33 +1870,6 @@ else
 endif
 
 
-#
-# For efficiently build serveral build types / archs.
-#
-both-debug-release both-release-debug: \
-		build-release-$(KBUILD_TARGET_ARCH) \
-		build-debug-$(KBUILD_TARGET_ARCH)
-both-x86-amd64     both-amd64-x86: \
-		build-$(KBUILD_TYPE)-x86 \
-		build-$(KBUILD_TYPE)-x86
-both-types-archs both-archs-types: \
-		build-debug-x86 \
-		build-release-x86 \
-		build-debug-amd64 \
-		build-release-amd64
-
-build-release-x86:
-	+$(MAKE) KBUILD_TYPE=release KBUILD_TARGET_ARCH=x86
-
-build-debug-x86:
-	+$(MAKE) KBUILD_TYPE=debug KBUILD_TARGET_ARCH=x86
-
-build-release-amd64:
-	+$(MAKE) KBUILD_TYPE=release KBUILD_TARGET_ARCH=amd64
-
-build-debug-amd64:
-	+$(MAKE) KBUILD_TYPE=debug KBUILD_TARGET_ARCH=amd64
-
 
 #
 # Aliases for building the SDK.
diff --git a/configure b/configure
index 1bfe187..681bdb0 100755
--- a/configure
+++ b/configure
@@ -51,6 +51,8 @@ case "$OS" in
     ;;
   freebsd)
     ;;
+  netbsd)
+    ;;
   sunos)
     OS='solaris'
     ;;
@@ -539,6 +541,7 @@ check_open_watcom()
     "dos")      wc_bin="binw";;
     "freebsd")  wc_bin="binfbsd";; # ??
     "linux")    wc_bin="binl";;
+    "netbsd")   wc_bin="binnbsd";; # ??
     "solaris")  wc_bin="binsol";;  # ??
     "os2")      wc_bin="binp";;
     "win")      wc_bin="binnt";;
@@ -2846,6 +2849,7 @@ if [ $OUT_PATH_OVERRIDE -eq 1 ]; then
   echo "export PATH_OUT_BASE" >> $ENV
 fi
 
+cnf_append "VBOX_GCC_WERR" "\$(NO_SUCH_VARIABLE)"
 # some things are not available in for OSE
 if [ $OSE -ge 1 ]; then
   cnf_append "VBOX_OSE" "1"
@@ -2939,7 +2943,7 @@ if [ $ONLY_ADDITIONS -eq 0 ]; then
   [ $WITH_JAVA   -eq 1 ] && check_java
 
   # PulseAudio
-  if [ "$OS" = "linux" -o "$OS" = "freebsd" ]; then
+  if [ "$OS" = "linux" -o "$OS" = "freebsd" -o "$OS" = "netbsd" ]; then
     if [ $WITH_PULSE -eq 1 ]; then
       check_pulse
     elif [ $WITH_PULSE -eq 0 ]; then
diff --git a/configure.vbs b/configure.vbs
index 37d036b..e2ee83d 100644
--- a/configure.vbs
+++ b/configure.vbs
@@ -718,6 +718,7 @@ sub CfgInit
    CfgPrint "#"
    if g_blnInternalMode = False then
       CfgPrint "VBOX_OSE := 1"
+      CfgPrint "VBOX_VCC_WERR = $(NO_SUCH_VARIABLE)"
    end if
 end sub
 
diff --git a/doc/VBox-CodingGuidelines.cpp b/doc/VBox-CodingGuidelines.cpp
index e72ffff..88b05da 100644
--- a/doc/VBox-CodingGuidelines.cpp
+++ b/doc/VBox-CodingGuidelines.cpp
@@ -43,7 +43,8 @@
  *
  *      - Use static wherever possible. This makes the namespace less polluted
  *        and avoids nasty name clash problems which can occur, especially on
- *        Unix-like systems. (1)
+ *        Unix-like systems. (1)  It also simplifies locating callers when
+ *        changing it (single source file vs entire VBox tree).
  *
  *      - Public names are of the form Domain[Subdomain[]]Method, using mixed
  *        casing to mark the words. The main domain is all uppercase.
@@ -164,9 +165,13 @@
  * Now for the guidelines:
  *
  *      - Never, ever, use int, long, ULONG, LONG, DWORD or similar to cast a
- *        pointer to integer. Use uintptr_t or intptr_t. If you have to use
+ *        pointer to integer.  Use uintptr_t or intptr_t. If you have to use
  *        NT/Windows types, there is the choice of ULONG_PTR and DWORD_PTR.
  *
+ *      - Avoid where ever possible the use of the types 'long' and 'unsigned
+ *        long' as these differs in size between windows and the other hosts
+ *        (see above).
+ *
  *      - RT_OS_WINDOWS is defined to indicate Windows. Do not use __WIN32__,
  *        __WIN64__ and __WIN__ because they are all deprecated and scheduled
  *        for removal (if not removed already). Do not use the compiler
@@ -460,6 +465,14 @@
  *
  *      - That Dijkstra is dead is no excuse for using gotos.
  *
+ *      - Using do-while-false loops to avoid gotos is considered very bad form.
+ *        They create hard to read code.  They tend to be either too short (i.e.
+ *        pointless) or way to long (split up the function already), making
+ *        tracking the state is difficult and prone to bugs.  Also, they cause
+ *        the compiler to generate suboptimal code, because the break branches
+ *        are by preferred over the main code flow (MSC has no branch hinting!).
+ *        Instead, do make use the 130 columns (i.e. nested ifs) and split
+ *        the code up into more functions!
  *
  *
  * @subsection sec_vbox_guideline_optional_prefix   Variable / Member Prefixes
@@ -473,7 +486,9 @@
  *
  *      - The 'g_' (or 'g') prefix means a global variable, either on file or module level.
  *
- *      - The 's_' (or 's') prefix means a static variable inside a function or class.
+ *      - The 's_' (or 's') prefix means a static variable inside a function or
+ *        class.  This is not used for static variables on file level, use 'g_'
+ *        for those (logical, right).
  *
  *      - The 'm_' (or 'm') prefix means a class data member.
  *
@@ -502,7 +517,7 @@
  *        array of pages.
  *
  *      - The 'c' prefix means count.  For instance 'cbBlock' could be read,
- *        count of bytes in block.
+ *        count of bytes in block. (1)
  *
  *      - The 'cx' prefix means width (count of 'x' units).
  *
@@ -574,7 +589,7 @@
  *
  *      - The 'pcsz' prefix is used to indicate constant string pointers in
  *        parts of the code.  Most code uses 'psz' for const and non-const
- *        string pointers.
+ *        string pointers, so please ignore this one.
  *
  *      - The 'l' prefix means (signed) long.  We try avoid using this,
  *        expecially with the 'LONG' types in Main as these are not 'long' on
@@ -587,6 +602,10 @@
  *        Alternatives: 'u' or 'u32'.  [type]
  *
  *
+ * (1)  Except in the occasional 'pcsz' prefix, the 'c' prefix is never ever
+ *      used in the meaning 'const'.
+ *
+ *
  * @subsection sec_vbox_guideline_optional_misc     Misc / Advice / Stuff
  *
  *      - When writing code think as the reader.
diff --git a/doc/manual/Makefile.kmk b/doc/manual/Makefile.kmk
index 86359f6..f0032fb 100644
--- a/doc/manual/Makefile.kmk
+++ b/doc/manual/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/doc/manual/en_US/user_AdvancedTopics.xml b/doc/manual/en_US/user_AdvancedTopics.xml
index 43eda02..f450f1c 100644
--- a/doc/manual/en_US/user_AdvancedTopics.xml
+++ b/doc/manual/en_US/user_AdvancedTopics.xml
@@ -3263,7 +3263,7 @@ svccfg -s svc:/application/virtualbox/webservice:default setprop config/user=roo
       service use the following command: <screen>launchctl load ~/Library/LaunchAgents/org.virtualbox.vboxwebsrv.plist</screen>
       For additional information on how launchd services could be
       configured see <literal><ulink
-      url="http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPSystemStartup/BPSystemStartup.html">http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPSystemStartup/BPSystemStartup.html</ulink></literal>.</para>
+      url="https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html">https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html</ulink></literal>.</para>
     </sect2>
   </sect1>
 
@@ -4010,7 +4010,7 @@ VBoxManage setextradata "VM name" VBoxInternal/CPUM/SSE4.2 1</screen>
           <para>Specify the UDP port number where the remote debugger is connected.</para>
         </listitem>
         <listitem>
-          <para>Key: <emphasis role="bold"><computeroutput>vendorid</computeroutput></emphasis></para>
+          <para>Key: <emphasis role="bold"><computeroutput>vendor</computeroutput></emphasis></para>
           <para>Value: Hyper-V vendor signature reported via CPUID to the guest</para>
           <para>Default: When debugging is enabled: <computeroutput>Microsoft Hv</computeroutput>,
           otherwise: <computeroutput>VBoxVBoxVBox</computeroutput></para>
diff --git a/doc/manual/en_US/user_Troubleshooting.xml b/doc/manual/en_US/user_Troubleshooting.xml
index ffb47e9..543fa81 100644
--- a/doc/manual/en_US/user_Troubleshooting.xml
+++ b/doc/manual/en_US/user_Troubleshooting.xml
@@ -1118,6 +1118,27 @@ VBoxClient --seamless</screen> when your X11 user session is started if you
     </sect2>
 
     <sect2>
+      <title>Certain Solaris 10 releases may take long to boot with SMP</title>
+
+      <para>When using more than one CPU, Solaris 10 releases 5/08 ("S10U5"), 
+          10/08 ("S10U6"), and 5/09 ("S10U7") may take a long time to boot and 
+          may print warnings on the system console regarding failures to read 
+          from disk. This is a bug in Solaris 10 which affects specific physical 
+          and virtual configurations. It is caused by trying to read microcode 
+          updates from the boot disk when the disk interrupt is reassigned to a 
+          not yet fully initialized secondary CPU. Disk reads will time out and 
+          fail, triggering delays (approx. 45 seconds) and warnings.
+      </para>
+      <para>
+          The recommended solution is upgrading to at least Solaris 10 10/09 
+          ("S10U8") which includes a fix for this problem. Alternative solutions 
+          include restricting the number of virtual CPUs to one or possibly 
+          using a different storage controller.
+      </para>
+
+    </sect2>
+
+    <sect2>
       <title>Solaris 8 5/01 and earlier may crash on startup</title>
 
       <para>
diff --git a/doc/manual/en_US/user_VBoxManage.xml b/doc/manual/en_US/user_VBoxManage.xml
index afba126..145e06f 100644
--- a/doc/manual/en_US/user_VBoxManage.xml
+++ b/doc/manual/en_US/user_VBoxManage.xml
@@ -171,7 +171,7 @@ Settings file: '/home/username/.config/VirtualBox/Machines/SUSE 10.2/SUSE 10.2.x
     <para>
       <itemizedlist>
         <listitem>
-          <para><computeroutput>--version</computeroutput>: show the version of
+          <para><computeroutput>-v|--version</computeroutput>: show the version of
             this tool and exit.</para>
         </listitem>
         <listitem>
@@ -241,11 +241,18 @@ Settings file: '/home/username/.config/VirtualBox/Machines/SUSE 10.2/SUSE 10.2.x
         </listitem>
 
         <listitem>
+          <para><computeroutput>intnets</computeroutput> displays information
+          about the internal networks.</para>
+        </listitem>
+
+        <listitem>
           <para><computeroutput>bridgedifs</computeroutput>,
-          <computeroutput>hostonlyifs</computeroutput> and
+          <computeroutput>hostonlyifs</computeroutput>,
+          <computeroutput>natnets</computeroutput> and
           <computeroutput>dhcpservers</computeroutput>, respectively, list
-          bridged network interfaces, host-only network interfaces and DHCP
-          servers currently available on the host. Please see <xref
+          bridged network interfaces, host-only network interfaces, 
+          NAT network interfaces and DHCP servers currently available on the 
+          host. Please see <xref
           linkend="networkingdetails" /> for details on these.</para>
         </listitem>
 
@@ -306,6 +313,25 @@ Settings file: '/home/username/.config/VirtualBox/Machines/SUSE 10.2/SUSE 10.2.x
           linkend="intro-installing" /> and <xref
           linkend="vboxmanage-extpack" /> for more information.</para>
         </listitem>
+
+        <listitem>
+          <para><computeroutput>groups</computeroutput> displays
+          details of the VM Groups; see <xref linkend="gui-vmgroups" /> 
+          for more information.</para>
+        </listitem>
+
+        <listitem>
+          <para><computeroutput>webcams</computeroutput> displays a list of 
+          webcams attached to the running VM. The output format is a list of 
+          absolute paths or aliases that were used for attaching the webcams 
+          to the VM using the 'webcam attach' command.</para>
+        </listitem>
+
+        <listitem>
+          <para><computeroutput>screenshotformats</computeroutput> displays a 
+          list of available screenshot formats.</para>
+        </listitem>
+
       </itemizedlist></para>
   </sect1>
 
@@ -339,7 +365,17 @@ Boot Device (4): Not Assigned
 ACPI:            on
 IOAPIC:          on
 ...
-</screen></para>
+    </screen></para>
+    <para>Use the <computeroutput>--machinereadable</computeroutput> option 
+      to produce the same output, but in machine readable format: property="value" on a 
+      line by line basis, e.g.:</para>
+    <para><screen>
+name="VBoxSDL --startvm OL7.2"
+groups="/"
+ostype="Oracle (64-bit)"
+UUID="457af700-bc0a-4258-aa3c-13b03da171f2"
+...
+    </screen></para>
   </sect1>
 
   <sect1 id="vboxmanage-registervm">
@@ -397,10 +433,11 @@ IOAPIC:          on
     is required and must specify the name of the machine. Since this name is
     used by default as the file name of the settings file (with the extension
     <computeroutput>.xml</computeroutput>) and the machine folder (a subfolder
-    of the <computeroutput>.config/VirtualBox/Machines</computeroutput> folder - this folder name may vary depending on the operating system and the version of VirtualBox which you are using), it
-    must conform to your host operating system's requirements for file name
-    specifications. If the VM is later renamed, the file and folder names will
-    change automatically.</para>
+    of the <computeroutput>.config/VirtualBox/Machines</computeroutput> folder
+    - this folder name may vary depending on the operating system and the 
+    version of VirtualBox which you are using), it must conform to your host 
+    operating system's requirements for file name specifications. If the VM 
+    is later renamed, the file and folder names will change automatically.</para>
 
     <para>However, if the <computeroutput>--basefolder
     <path></computeroutput> option is used, the machine folder will be
@@ -408,12 +445,32 @@ IOAPIC:          on
     names of the file and the folder will not change if the virtual machine is
     renamed.</para>
 
+    <para>If the <computeroutput>--group <group>, ...</computeroutput>    
+    option is used, the machine will be assigned membership of the specified 
+    VM groups in the list. Note that group ids always start with a 
+    <computeroutput>/</computeroutput> and can be nested. By default,
+    VMs are always assigned membership of the group 
+    <computeroutput>/</computeroutput>.</para>
+
+    <para>If the <computeroutput>--ostype <ostype></computeroutput>:
+    option is used, <ostype> specifies the guest operating system 
+    to run in the VM. To learn about the available OS options,
+    run <computeroutput>VBoxManage list ostypes</computeroutput> .</para>
+
+    <para>If the <computeroutput>--uuid <uuid></computeroutput>:
+    option is used, <uuid> specifies the VM uuid. This must be 
+    unique within the namespace of the host, or that of the VM Group if 
+    it is assigned to a VM group membership. By default, a unique uuid 
+    within the appropriate namespace is automatically generated.
+    </para>
+
     <para>By default, this command only creates the XML file without
     automatically registering the VM with your VirtualBox installation. To
     register the VM instantly, use the optional
     <computeroutput>--register</computeroutput> option, or run
     <computeroutput>VBoxManage registervm</computeroutput> separately
     afterwards.</para>
+
   </sect1>
 
   <sect1 id="vboxmanage-modifyvm">
@@ -731,16 +788,22 @@ IOAPIC:          on
           </listitem>
 
           <listitem>
-            <para><computeroutput>--nicbootprio<1-N>
-            <priority></computeroutput>: This specifies the order in which
-            NICs are tried for booting over the network (using PXE). The
-            priority is an integer in the 0 to 4 range. Priority 1 is the
-            highest, priority 4 is low. Priority 0, which is the default unless
-            otherwise specified, is the lowest.
-            </para>
-            <para> Note that this option only has effect when the Intel PXE boot
-            ROM is used.
-            </para>
+            <para><computeroutput>--biosapic
+            x2apic|apic|disabled</computeroutput>: This specifies
+            the firmware APIC level to be used. Options are: x2apic, apic or
+            disabled (no apic or x2apic) respectively.</para>
+
+            <para>Note that if x2apic is specified and x2apic is unsupported by the 
+            VCPU, biosapic downgrades to apic, if supported - otherwise to 'disabled'. 
+            Similarly, if apic is specified, and apic is unsupported results in a 
+            downgrade to 'disabled'.</para>
+          </listitem>
+
+          <listitem>
+            <para><computeroutput>--biossystemtimeoffset <ms></computeroutput>:
+            This specifies a fixed time offset (milliseconds) of the guest relative to
+            the host time. If the offset is positive, the guest time runs ahead of the 
+            host time.</para>
           </listitem>
 
           <listitem>
@@ -771,13 +834,6 @@ IOAPIC:          on
           </listitem>
 
           <listitem>
-            <para><computeroutput>--biossystemtimeoffset <ms></computeroutput>:
-            This allows you to set a fixed time offset of the guest relative to
-            the host time. The offset is specified in milliseconds. If the offset
-            is positive the guest time runs ahead the host time.</para>
-          </listitem>
-
-          <listitem>
             <para><computeroutput>--snapshotfolder
             default|<path></computeroutput>: This allows you to specify
             the folder in which snapshots will be kept for a virtual
@@ -840,21 +896,6 @@ IOAPIC:          on
           </listitem>
 
           <listitem>
-            <para><computeroutput>--nicpromisc<1-N>
-            deny|allow-vms|allow-all</computeroutput>:
-            This allows you, for each of the VM's virtual network cards, to
-            specify how the promiscious mode is handled. This setting is only
-            relevant for bridged networking.
-            <computeroutput>deny</computeroutput> (default setting) hides
-            any traffic not intended for this VM.
-            <computeroutput>allow-vms</computeroutput> hides all host
-            traffic from this VM but allows the VM to see traffic from/to other
-            VMs.
-            <computeroutput>allow-all</computeroutput> removes this
-            restriction completely.</para>
-          </listitem>
-
-          <listitem>
             <para><computeroutput>--nictype<1-N>
             Am79C970A|Am79C973|82540EM|82543GC|82545EM|virtio</computeroutput>:
             This allows you, for each of the VM's virtual network cards, to
@@ -886,21 +927,64 @@ IOAPIC:          on
           </listitem>
 
           <listitem>
-            <para><computeroutput>--natnet<1-N>
-            <network>|default</computeroutput>:
-            If the networking type is set to <computeroutput>nat</computeroutput>
-            (not <computeroutput>natnetwork</computeroutput>) then this
-            setting specifies the IP address range to be used for
-            this network. See <xref linkend="changenat" /> for an
-            example.</para>
+            <para><computeroutput>--nicproperty<1-N>
+            <paramname>="paramvalue"</computeroutput>:
+            This option, in combination with "nicgenericdrv" allows you to
+            pass parameters to rarely-used network backends.</para>
+
+            <para>Those parameters are backend engine-specific, and are different
+            between UDP Tunnel and the VDE backend drivers. For example,
+            please see <xref linkend="network_udp_tunnel" />.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para><computeroutput>--nicspeed<1-N> <kbps></computeroutput>:
+            If generic networking has been enabled for a virtual network card (see the
+            <computeroutput>--nic</computeroutput> option above; otherwise
+            this setting has no effect), this mode enables access
+            to rarely used networking sub-modes, such as VDE network or UDP Tunnel.
+            This option specifies the throughput rate in KBytes/sec.
+            </para>
           </listitem>
 
           <listitem>
-            <para><computeroutput>--nat-network<1-N> <network
-            name></computeroutput>: If the networking type is set to
-            <computeroutput>natnetwork</computeroutput> (not
-            <computeroutput>nat</computeroutput>) then this setting specifies
-            the name of the NAT network this adapter is connected to.</para>
+            <para><computeroutput>--nicbootprio<1-N>
+            <priority></computeroutput>: This specifies the order in which
+            NICs are tried for booting over the network (using PXE). The
+            priority is an integer in the 0 to 4 range. Priority 1 is the
+            highest, priority 4 is low. Priority 0, which is the default unless
+            otherwise specified, is the lowest.</para>
+
+            <para>Note that this option only has effect when the Intel PXE boot
+            ROM is used.</para>
+          </listitem>
+
+          <listitem>
+            <para><computeroutput>--nicpromisc<1-N>
+            deny|allow-vms|allow-all</computeroutput>:
+            This allows you, for each of the VM's virtual network cards, to
+            specify how the promiscuous mode is handled. This setting is only
+            relevant for bridged networking.
+            <computeroutput>deny</computeroutput> (default setting) hides
+            any traffic not intended for this VM.
+            <computeroutput>allow-vms</computeroutput> hides all host
+            traffic from this VM but allows the VM to see traffic from/to other
+            VMs.
+            <computeroutput>allow-all</computeroutput> removes this
+            restriction completely.</para>
+          </listitem>
+
+          <listitem>
+            <para><computeroutput>--nicbandwidthgroup<1-N>
+            none|<name></computeroutput>: This removes/adds an assignment 
+            of a bandwidth group from/to the specified virtual network interface. 
+            Specifying <computeroutput>none</computeroutput> removes any current 
+            bandwidth group assignment from the specified virtual network interface.
+            Specifying <computeroutput><name></computeroutput> adds an 
+            assignment of a bandwidth group to the specified virtual network 
+            interface.</para>
+            <para>For details, please see <xref linkend="network_bandwidth_limit" />.</para>
           </listitem>
 
           <listitem>
@@ -934,25 +1018,13 @@ IOAPIC:          on
             linkend="network_internal" />).</para>
           </listitem>
 
-          <listitem>
-            <para><computeroutput>--macaddress<1-N>
-            auto|<mac></computeroutput>: With this option you can set
-            the MAC address of a particular network adapter on the VM. Normally, each
-            network adapter is assigned a random address by VirtualBox at
-            VM creation.</para>
-          </listitem>
-
-          <listitem>
-            <para><computeroutput>--mouse <ps2|usb|usbtablet|usbmultitouch></computeroutput>: 
-            Specifies the mode of the mouse to be used in the VM. Available options are: ps2, usb, 
-            usbtablet, usbmultitouch.
-            </para>
-          </listitem>
 
           <listitem>
-            <para><computeroutput>--keyboard <ps2|usb></computeroutput>: 
-            Specifies the mode of the keyboard to be used in the VM. Available options are: ps2, usb.
-            </para>
+            <para><computeroutput>--nat-network<1-N> <network
+            name></computeroutput>: If the networking type is set to
+            <computeroutput>natnetwork</computeroutput> (not
+            <computeroutput>nat</computeroutput>) then this setting specifies
+            the name of the NAT network this adapter is connected to.</para>
           </listitem>
 
           <listitem>
@@ -966,24 +1038,11 @@ IOAPIC:          on
           </listitem>
 
           <listitem>
-            <para><computeroutput>--nicproperty<1-N>
-            <paramname>="paramvalue"</computeroutput>:
-            This option, in combination with "nicgenericdrv" allows you to
-            pass parameters to rarely-used network backends.</para><para>
-            Those parameters are backend engine-specific, and are different
-            between UDP Tunnel and the VDE backend drivers. For example,
-            please see <xref linkend="network_udp_tunnel" />.
-            </para>
-          </listitem>
-
-          <listitem>
-            <para><computeroutput>--nicspeed<1-N> <kbps></computeroutput>:
-            If generic networking has been enabled for a virtual network card (see the
-            <computeroutput>--nic</computeroutput> option above; otherwise
-            this setting has no effect), this mode enables access
-            to rarely used networking sub-modes, such as VDE network or UDP Tunnel.
-            This option specifies the throughput rate in KBytes/sec.
-            </para>
+            <para><computeroutput>--macaddress<1-N>
+            auto|<mac></computeroutput>: With this option you can set
+            the MAC address of a particular network adapter on the VM. Normally, each
+            network adapter is assigned a random address by VirtualBox at
+            VM creation.</para>
           </listitem>
         </itemizedlist></para>
 
@@ -995,6 +1054,17 @@ IOAPIC:          on
         settings, the decimal number directly following the option name ("1-N"
         in the list below) specifies the virtual network adapter whose
         settings should be changed.<itemizedlist>
+
+            <listitem>
+              <para><computeroutput>--natnet<1-N>
+              <network>|default</computeroutput>:
+              If the networking type is set to <computeroutput>nat</computeroutput>
+              (not <computeroutput>natnetwork</computeroutput>) then this
+              setting specifies the IP address range to be used for
+              this network. See <xref linkend="changenat" /> for an
+              example.</para>
+            </listitem>
+
             <listitem>
               <para><computeroutput>--natpf<1-N>
               [<name>],tcp|udp,[<hostip>],<hostport>,[<guestip>],
@@ -1090,160 +1160,183 @@ IOAPIC:          on
       <para>The following other hardware settings, such as serial port, audio,
       clipboard, drag and drop, monitor and USB settings are available through
       <computeroutput>VBoxManage modifyvm</computeroutput>:<itemizedlist>
-          <listitem>
-            <para><computeroutput>--uart<1-N> off|<I/O base>
-            <IRQ></computeroutput>: With this option you can configure
-            virtual serial ports for the VM; see <xref
-            linkend="serialports" /> for an introduction.</para>
-          </listitem>
+        <listitem>
+          <para><computeroutput>--mouse <ps2|usb|usbtablet|usbmultitouch></computeroutput>:
+          Specifies the mode of the mouse to be used in the VM. Available options are: ps2, usb,
+          usbtablet, usbmultitouch.
+          </para>
+        </listitem>
 
-          <listitem>
-            <para><computeroutput>--uartmode<1-N>
-            <arg></computeroutput>: This setting controls how VirtualBox
-            connects a given virtual serial port (previously configured with
-            the <computeroutput>--uartX</computeroutput> setting, see above)
-            to the host on which the virtual machine is running. As described
-            in detail in <xref linkend="serialports" />, for each such port,
-            you can specify <computeroutput><arg></computeroutput> as
-            one of the following options:<itemizedlist>
-                <listitem>
-                  <para><computeroutput>disconnected</computeroutput>: Even
-                  though the serial port is shown to the guest, it has no
-                  "other end" -- like a real COM port without a cable.</para>
-                </listitem>
+        <listitem>
+          <para><computeroutput>--keyboard <ps2|usb></computeroutput>:
+          Specifies the mode of the keyboard to be used in the VM. Available options are: ps2, usb.
+          </para>
+        </listitem>
+        <listitem>
+          <para><computeroutput>--uart<1-N> off|<I/O base>
+          <IRQ></computeroutput>: With this option you can configure
+          virtual serial ports for the VM; see <xref
+          linkend="serialports" /> for an introduction.</para>
+        </listitem>
 
-                <listitem>
-                  <para><computeroutput>server
-                  <pipename></computeroutput>: On a Windows host, this
-                  tells VirtualBox to create a named pipe on the host named
-                  <computeroutput><pipename></computeroutput> and
-                  connect the virtual serial device to it. Note that Windows
-                  requires that the name of a named pipe begin with
-                  <computeroutput>\\.\pipe\</computeroutput>.</para>
-
-                  <para>On a Linux host, instead of a named pipe, a local
-                  domain socket is used.</para>
-                </listitem>
+        <listitem>
+          <para><computeroutput>--uartmode<1-N>
+          <arg></computeroutput>: This setting controls how VirtualBox
+          connects a given virtual serial port (previously configured with
+          the <computeroutput>--uartX</computeroutput> setting, see above)
+          to the host on which the virtual machine is running. As described
+          in detail in <xref linkend="serialports" />, for each such port,
+          you can specify <computeroutput><arg></computeroutput> as
+          one of the following options:<itemizedlist>
+            <listitem>
+              <para><computeroutput>disconnected</computeroutput>: Even
+              though the serial port is shown to the guest, it has no
+              "other end" -- like a real COM port without a cable.</para>
+            </listitem>
 
-                <listitem>
-                  <para><computeroutput>client
-                  <pipename></computeroutput>: This operates just like
-                  <computeroutput>server ...</computeroutput>, except that the
-                  pipe (or local domain socket) is not created by VirtualBox,
-                  but assumed to exist already.</para>
-                </listitem>
+            <listitem>
+              <para><computeroutput>server
+              <pipename></computeroutput>: On a Windows host, this
+              tells VirtualBox to create a named pipe on the host named
+              <computeroutput><pipename></computeroutput> and
+              connect the virtual serial device to it. Note that Windows
+              requires that the name of a named pipe begin with
+              <computeroutput>\\.\pipe\</computeroutput>.</para>
+
+              <para>On a Linux host, instead of a named pipe, a local
+              domain socket is used.</para>
+            </listitem>
 
-                <listitem>
-                  <para><computeroutput>tcpserver
-                  <port></computeroutput>: This
-                  tells VirtualBox to create a TCP socket on the host with TCP
-                  <computeroutput><port></computeroutput> and
-                  connect the virtual serial device to it. Note that UNIX-like
-                  systems require ports over 1024 for normal users.</para>
-                </listitem>
+            <listitem>
+              <para><computeroutput>client
+              <pipename></computeroutput>: This operates just like
+              <computeroutput>server ...</computeroutput>, except that the
+              pipe (or local domain socket) is not created by VirtualBox,
+              but assumed to exist already.</para>
+            </listitem>
 
-                <listitem>
-                  <para><computeroutput>tcpclient
-                  <hostname:port></computeroutput>: This operates just like
-                  <computeroutput>tcpserver ...</computeroutput>, except that the
-                  TCP socket is not created by VirtualBox,
-                  but assumed to exist already.</para>
-                </listitem>
+            <listitem>
+              <para><computeroutput>tcpserver
+              <port></computeroutput>: This
+              tells VirtualBox to create a TCP socket on the host with TCP
+              <computeroutput><port></computeroutput> and
+              connect the virtual serial device to it. Note that UNIX-like
+              systems require ports over 1024 for normal users.</para>
+            </listitem>
 
-                <listitem>
-                  <para><computeroutput><devicename></computeroutput>:
-                  If, instead of the above, the device name of a physical
-                  hardware serial port of the host is specified, the virtual
-                  serial port is connected to that hardware port. On a Windows
-                  host, the device name will be a COM port such as
-                  <computeroutput>COM1</computeroutput>; on a Linux host, the
-                  device name will look like
-                  <computeroutput>/dev/ttyS0</computeroutput>. This allows you
-                  to "wire" a real serial port to a virtual machine.</para>
-                </listitem>
-              </itemizedlist></para>
-          </listitem>
+            <listitem>
+              <para><computeroutput>tcpclient
+              <hostname:port></computeroutput>: This operates just like
+              <computeroutput>tcpserver ...</computeroutput>, except that the
+              TCP socket is not created by VirtualBox,
+              but assumed to exist already.</para>
+            </listitem>
 
-          <listitem>
-            <para><computeroutput>--lptmode<1-N>
-            <Device></computeroutput>:
-            Specifies the Device Name of the parallel port that
-            the Parallel Port feature will be using. Use this
-            <emphasis>before</emphasis> <computeroutput>--lpt</computeroutput>.
-            This feature is host operating system specific.</para>
-          </listitem>
+            <listitem>
+              <para><computeroutput>file <file></computeroutput>:
+              This redirects the serial port output to a raw file <file> 
+              specified by its absolute path on the host file system.</para>
+            </listitem>
 
-          <listitem>
-            <para><computeroutput>--lpt<1-N>
-            <I/O base> <IRQ></computeroutput>:
-            Specifies the I/O address of the parallel port and the IRQ
-            number that the Parallel Port feature will be using. Use this
-            <emphasis>after</emphasis>
-            <computeroutput>--lptmod</computeroutput>. I/O base address and IRQ are
-            the values that guest sees i.e. the values avalable under guest Device Manager.</para>
-          </listitem>
+            <listitem>
+              <para><computeroutput><devicename></computeroutput>:
+              If, instead of the above, the device name of a physical
+              hardware serial port of the host is specified, the virtual
+              serial port is connected to that hardware port. On a Windows
+              host, the device name will be a COM port such as
+              <computeroutput>COM1</computeroutput>; on a Linux host, the
+              device name will look like
+              <computeroutput>/dev/ttyS0</computeroutput>. This allows you
+              to "wire" a real serial port to a virtual machine.</para>
+            </listitem>
+          </itemizedlist></para>
+        </listitem>
 
-          <listitem>
-            <para><computeroutput>--audio none|null|oss|alsa|pulse</computeroutput>: With
-            this option, you can set whether the VM should have audio
-            support, and if so - which type.</para>
-          </listitem>
+        <listitem>
+          <para><computeroutput>--lptmode<1-N>
+          <Device></computeroutput>:
+          Specifies the Device Name of the parallel port that
+          the Parallel Port feature will be using. Use this
+          <emphasis>before</emphasis> <computeroutput>--lpt</computeroutput>.
+          This feature is host operating system specific.</para>
+        </listitem>
 
-          <listitem>
-            <para><computeroutput>--audiocontroller ac97|hda|sb16</computeroutput>: With
-            this option, you can specify the audio controller to be used with this VM.
-            </para>
-          </listitem>
+        <listitem>
+          <para><computeroutput>--lpt<1-N>
+          <I/O base> <IRQ></computeroutput>:
+          Specifies the I/O address of the parallel port and the IRQ
+          number that the Parallel Port feature will be using. Use this <emphasis>after</emphasis>
+          <computeroutput>--lptmod</computeroutput>. I/O base address and IRQ are
+          the values that guest sees i.e. the values avalable under guest Device Manager.</para>
+        </listitem>
 
-          <listitem>
-            <para><computeroutput>--audiocodec stac9700|ad1980|stac9221|sb16</computeroutput>: With
-            this option, you can specify the audio codec to be used with this VM.
-            </para>
-          </listitem>
+        <listitem>
+          <para><computeroutput>--audio none|null|oss|alsa|pulse</computeroutput>: With
+          this option, you can set whether the VM should have audio
+          support, and if so - which type.</para>
+        </listitem>
 
-          <listitem>
-            <para><computeroutput>--clipboard
-            disabled|hosttoguest|guesttohost|bidirectional</computeroutput>:
-            With this setting, you can select if and how the guest or host
-            operating system's clipboard should be shared with the host or guest;
-            see <xref linkend="generalsettings" />. This requires that the Guest
-            Additions be installed in the virtual machine.</para>
-          </listitem>
+        <listitem>
+          <para><computeroutput>--audiocontroller ac97|hda|sb16</computeroutput>: With
+          this option, you can specify the audio controller to be used with this VM.
+          </para>
+        </listitem>
 
-          <listitem>
-            <para><computeroutput>--draganddrop
-            disabled|hosttoguest|guesttohost|bidirectional</computeroutput>:
-            With this setting, you can select the current drag and drop mode
-            being used between the host and the virtual machine;
-            see <xref linkend="guestadd-dnd" />. This requires that the Guest
-            Additions be installed in the virtual machine.</para>
-          </listitem>
+        <listitem>
+          <para><computeroutput>--audiocodec stac9700|ad1980|stac9221|sb16</computeroutput>: With
+          this option, you can specify the audio codec to be used with this VM.
+          </para>
+        </listitem>
 
-          <listitem>
-            <para><computeroutput>--monitorcount
-            <count></computeroutput>: This enables multi-monitor
-            support; see <xref linkend="settings-display" />.</para>
-          </listitem>
+        <listitem>
+          <para><computeroutput>--clipboard
+          disabled|hosttoguest|guesttohost|bidirectional</computeroutput>:
+          With this setting, you can select if and how the guest or host
+          operating system's clipboard should be shared with the host or guest;
+          see <xref linkend="generalsettings" />. This requires that the Guest
+          Additions be installed in the virtual machine.</para>
+        </listitem>
 
-          <listitem>
-            <para><computeroutput>--usb on|off</computeroutput>: This option
-            enables or disables the VM's virtual USB controller; see <xref
-            linkend="settings-usb" /> for details.</para>
-          </listitem>
+        <listitem>
+          <para><computeroutput>--draganddrop
+          disabled|hosttoguest|guesttohost|bidirectional</computeroutput>:
+          With this setting, you can select the current drag and drop mode
+          being used between the host and the virtual machine;
+          see <xref linkend="guestadd-dnd" />. This requires that the Guest
+          Additions be installed in the virtual machine.</para>
+        </listitem>
 
-          <listitem>
-            <para><computeroutput>--usbehci on|off</computeroutput>: This
-            option enables or disables the VM's virtual USB 2.0 controller;
-            see <xref linkend="settings-usb" /> for details.</para>
-          </listitem>
+        <listitem>
+          <para><computeroutput>--monitorcount
+          <count></computeroutput>: This enables multi-monitor
+          support; see <xref linkend="settings-display" />.</para>
+        </listitem>
 
-          <listitem>
-            <para><computeroutput>--usbxhci on|off</computeroutput>: This
-            option enables or disables the VM's virtual USB 3.0 controller;
-            see <xref linkend="settings-usb" /> for details.</para>
-          </listitem>
-          <!-- @todo r=andy Document tracing-* commands -->
-        </itemizedlist></para>
+        <listitem>
+          <para><computeroutput>--usb on|off</computeroutput>: This option
+          enables or disables the VM's virtual USB controller; see <xref
+          linkend="settings-usb" /> for details.</para>
+        </listitem>
+
+        <listitem>
+          <para><computeroutput>--usbehci on|off</computeroutput>: This
+          option enables or disables the VM's virtual USB 2.0 controller;
+          see <xref linkend="settings-usb" /> for details.</para>
+        </listitem>
+
+        <listitem>
+          <para><computeroutput>--usbxhci on|off</computeroutput>: This
+          option enables or disables the VM's virtual USB 3.0 controller;
+          see <xref linkend="settings-usb" /> for details.</para>
+        </listitem>
+
+        <listitem>
+          <para><computeroutput>--usbrename 
+          <oldname> <newname></computeroutput>: This
+          option enables renaming of the VM's virtual USB controller from <oldname> 
+          to <newname>.</para>
+        </listitem>
+      </itemizedlist></para>
 
     </sect2>
 
@@ -1322,7 +1415,155 @@ IOAPIC:          on
             (VRDE) server.</para>
           </listitem>
 
-          <!-- @todo r=andy Document vrdeproperty -->
+          <listitem>
+            <para><computeroutput>--vrdeproperty "TCP/Ports|Address=<value>"</computeroutput>
+            sets the port number(s) and IP address on the VM that the VRDE server can bind to.</para>
+
+            <itemizedlist>
+              <listitem>
+                <para>For TCP/Ports, <value> should be a port or a range of ports that the VRDE 
+                server can bind to; "default" or "0" means port 3389, the standard port for RDP. 
+                For details, see the description for the
+                <computeroutput>--vrdeport</computeroutput> option in <xref
+                linkend="vboxmanage-modifyvm-vrde" />.</para>
+              </listitem>
+
+              <listitem>
+                <para>For TCP/Address, <value> should be the IP address of the host network
+                interface that the VRDE server will bind to. If specified, the server
+                will accept connections only on the specified host network interface.
+                For details, see the description for the
+                <computeroutput>--vrdeaddress</computeroutput> option in <xref
+                linkend="vboxmanage-modifyvm-vrde" />.</para>
+              </listitem>
+            </itemizedlist>
+          </listitem>
+
+          <listitem>
+            <para><computeroutput>--vrdeproperty "VideoChannel/Enabled|Quality|DownscaleProtection=<value>"</computeroutput>
+            sets the VRDP video redirection properties.</para>
+            <itemizedlist>
+              <listitem>
+                <para>For VideoChannel/Enabled, <value> can be set to "1" switching the VRDP video channel on.
+                For details, see <xref linkend="vrde-videochannel" />.</para>
+              </listitem>
+
+              <listitem>
+                <para>For VideoChannel/Quality, <value> should be set between 10 and 100% inclusive, 
+                representing a JPEG compression level on the VRDE server video channel. Lower values mean lower 
+                quality but higher compression. For details, see <xref linkend="vrde-videochannel" />.</para>
+              </listitem>
+
+              <listitem>
+                <para>For VideoChannel/DownscaleProtection, <value> can be set to "1" to 
+                enable the videochannel downscale protection feature. When enabled, if a video's size equals the shadow buffer 
+                size, then it is regarded as a full screen video, and is displayed; but if its size is between fullscreen and the downscale
+                threshold - it is NOT displayed, as it could be an application window, which would be unreadable when downscaled.
+                When the downscale protection feature is disabled, an attempt is always made to display videos.</para>
+              </listitem>
+            </itemizedlist>
+          </listitem>
+
+          <listitem>
+            <para><computeroutput>--vrdeproperty "Client/DisableDisplay|DisableInput|DisableAudio|DisableUSB=1"</computeroutput></para>
+            <para>disables one of the VRDE server features: Display, Input, Audio or USB respectively.
+            To re-enable a feature, use e.g. "Client/DisableDisplay=".
+            For details, see <xref linkend="vrde-customization" />.</para>
+          </listitem>
+
+          <listitem>
+            <para><computeroutput>--vrdeproperty "Client/DisableClipboard|DisableUpstreamAudio=1"</computeroutput></para>
+            <para>disables one of the VRDE server features: Clipboard or UpstreamAudio respectively.
+            To re-enable a feature, use e.g. "Client/DisableClipboard=".
+            For details, see <xref linkend="vrde-customization" />.</para>
+          </listitem>
+ 
+          <listitem>
+            <para><computeroutput>--vrdeproperty "Client/DisableRDPDR=1"</computeroutput></para>
+            <para>disables the VRDE server feature: RDP device redirection for smart cards.
+            To re-enable this feature, use "Client/DisableRDPR=".</para>
+          </listitem>
+
+          <listitem>
+            <para><computeroutput>--vrdeproperty "H3DRedirect/Enabled=1"</computeroutput></para>
+            <para>enables the VRDE server feature: 3D redirection.
+            To re-disable this feature, use "H3DRedirect/Enabled=".</para>
+          </listitem>
+
+          <listitem>
+            <para><computeroutput>--vrdeproperty "Security/Method|ServerCertificate|ServerPrivateKey|CACertificate=<value>"</computeroutput>
+            sets the desired security method/Path of server certificate, path of server private key, path of CA certificate, used for a connection.
+
+            <itemizedlist>
+              <listitem>
+                <para><computeroutput>--vrdeproperty "Security/Method=<value>"</computeroutput>
+                sets the desired security method, which is used for a connection. Valid values are:
+                <itemizedlist>
+                  <listitem>
+                    <para> <computeroutput>Negotiate</computeroutput> - both Enhanced (TLS)
+                    and Standard RDP Security connections are allowed. The security
+                    method is negotiated with the client. This is the default setting.</para>
+                  </listitem>
+                  <listitem>
+                    <para> <computeroutput>RDP</computeroutput> - only Standard RDP Security is accepted.</para>
+                  </listitem>
+                  <listitem>
+                    <para> <computeroutput>TLS</computeroutput> - only Enhanced RDP Security is accepted. 
+                    The client must support TLS.</para>
+                  </listitem>
+                </itemizedlist>
+                    For details, see <xref linkend="vrde-crypt" />.</para>
+              </listitem>
+
+              <listitem>
+                <para><computeroutput>--vrdeproperty "Security/ServerCertificate=<value>"</computeroutput>
+                where <value> is the absolute path of the server certificate.
+                For details, see <xref linkend="vrde-crypt" />.</para>
+              </listitem>
+
+              <listitem>
+                <para><computeroutput>--vrdeproperty "Security/ServerPrivateKey=<value>"</computeroutput>
+                where <value> is the absolute path of the server private key.
+                For details, see <xref linkend="vrde-crypt" />.</para>
+              </listitem>
+
+              <listitem>
+                <para><computeroutput>--vrdeproperty "Security/CACertificate=<value>"</computeroutput>
+                where <value> is the absolute path of the CA self signed certificate.
+                For details, see <xref linkend="vrde-crypt" />.</para>
+              </listitem>
+            </itemizedlist></para>
+          </listitem>
+
+          <listitem>
+            <para><computeroutput>--vrdeproperty "Audio/RateCorrectionMode|LogPath=<value>"</computeroutput>
+            sets the Audio connection mode, or Path of the audio logfile.
+
+            <itemizedlist>
+              <listitem>
+                <para><computeroutput>--vrdeproperty "Audio/RateCorrectionMode=<value>"</computeroutput>
+                where <value> is the desired rate correction mode, allowed values are:
+                <itemizedlist>
+                  <listitem>
+                    <para> <computeroutput>VRDP_AUDIO_MODE_VOID</computeroutput> - no mode specified, use to unset any Audio mode already set.</para>
+                  </listitem>
+                  <listitem>
+                    <para> <computeroutput>VRDP_AUDIO_MODE_RC</computeroutput> - rate correction mode.</para>
+                  </listitem>
+                  <listitem>
+                    <para> <computeroutput>VRDP_AUDIO_MODE_LPF</computeroutput> - low pass filter mode.</para>
+                  </listitem>
+                  <listitem>
+                    <para> <computeroutput>VRDP_AUDIO_MODE_CS</computeroutput> - client sync mode to prevent under/overflow of the client queue.</para>
+                  </listitem>
+                </itemizedlist></para>
+              </listitem>
+              <listitem>
+                <para><computeroutput>--vrdeproperty "Audio/LogPath=<value>"</computeroutput>
+                where <value> is the absolute path of the Audio log file.</para>
+              </listitem>
+            </itemizedlist></para>
+          </listitem>
 
           <listitem>
             <para><computeroutput>--vrdeextpack default|<name></computeroutput>:
@@ -1521,7 +1762,7 @@ IOAPIC:          on
 
       <para>These settings configure the VM autostart feature,
       which automatically starts the VM at host system boot-up. 
-      Note that there are pre-requisities that need to be addressed before using this feature. 
+      Note that there are pre-requisites that need to be addressed before using this feature. 
       See <xref lang="" linkend="autostart" /> for more details.</para>
       <itemizedlist>
         <listitem>
@@ -1585,6 +1826,14 @@ IOAPIC:          on
            Clone".</para>
        </listitem>
        <listitem>
+           <para><computeroutput>--groups <group>, ...</computeroutput>
+           Enables the clone to be assigned membership of the specified
+           VM groups in the list. Note that group ids always start with a
+           <computeroutput>/</computeroutput> and can be nested. By default,
+           clones are always assigned membership of the group
+           <computeroutput>/</computeroutput>.</para>
+       </listitem>
+       <listitem>
            <para><computeroutput>--basefolder <basefolder></computeroutput>:
            Select the folder where the new virtual machine configuration should
            be saved in.</para>
@@ -1626,6 +1875,20 @@ IOAPIC:          on
     imported into VirtualBox, together with the optional command-line options
     to influence the import behavior.</para>
 
+    <para>Use of the <computeroutput>--options link|keepallmacs|keepnatmacs|keepdisknames</computeroutput>:
+    option enables additional fine tuning of the clone operation. The first
+    option defines that a linked clone should be created, which is
+    only possible for a machine clone from a snapshot. The next two
+    options enable specification of how the MAC addresses of every virtual
+    network card should be handled. They can either be reinitialized
+    (the default), left unchanged
+    (<computeroutput>keepallmacs</computeroutput>) or left unchanged
+    when the network type is NAT
+    (<computeroutput>keepnatmacs</computeroutput>). If you add
+    <computeroutput>keepdisknames</computeroutput> all new disk images
+    are assigned the same names as the originals, otherwise they are
+    renamed.</para>
+
     <para>As an example, here is the screen output with a sample appliance
     containing a Windows XP guest:<screen>VBoxManage import WindowsXp.ovf --dry-run
 Interpreting WindowsXp.ovf...
@@ -1700,8 +1963,9 @@ Virtual system 0:
     <computeroutput>--product</computeroutput>,
     <computeroutput>--producturl</computeroutput>,
     <computeroutput>--vendor</computeroutput>,
-    <computeroutput>--vendorurl</computeroutput> and
-    <computeroutput>--version</computeroutput> to specify this additional
+    <computeroutput>--vendorurl</computeroutput>,
+    <computeroutput>--version</computeroutput> and
+    <computeroutput>--description</computeroutput> to specify this additional
     information. For legal reasons you may add a license text or the content
     of a license file by using the <computeroutput>--eula</computeroutput> and
     <computeroutput>--eulafile</computeroutput> option respectively. As with
@@ -1711,7 +1975,8 @@ Virtual system 0:
 
     <para>For virtualization products which aren't fully compatible with the
     OVF standard 1.0 you can enable a OVF 0.9 legacy mode with the
-    <computeroutput>--legacy09</computeroutput> option.</para>
+    <computeroutput>--legacy09</computeroutput> option. Other options are 
+    --ovf09, --ovf10, --ovf20.</para>
 
     <para>To specify options controlling the exact content of the appliance
     file, you can use <computeroutput>--options</computeroutput> to request the
@@ -1800,7 +2065,7 @@ Virtual system 0:
           without changing its state for good. The VM window will be painted
           in gray to indicate that the VM is currently paused. (This is
           equivalent to selecting the "Pause" item in the "Machine" menu of
-          the GUI.)</para>
+          the GUI).</para>
         </listitem>
 
         <listitem>
@@ -1818,7 +2083,7 @@ Virtual system 0:
           virtual machine, which will restart and boot the guest operating
           system again immediately. The state of the VM is not saved
           beforehand, and data may be lost. (This is equivalent to selecting
-          the "Reset" item in the "Machine" menu of the GUI.)</para>
+          the "Reset" item in the "Machine" menu of the GUI).</para>
         </listitem>
 
         <listitem>
@@ -1828,7 +2093,7 @@ Virtual system 0:
           the VM is not saved beforehand, and data may be lost. (This is
           equivalent to selecting the "Close" item in the "Machine" menu of
           the GUI or pressing the window's close button, and then selecting
-          "Power off the machine" in the dialog.)</para>
+          "Power off the machine" in the dialog).</para>
 
           <para>After this, the VM's state will be "Powered off". From there,
           it can be started again; see <xref
@@ -1848,6 +2113,22 @@ Virtual system 0:
         </listitem>
 
         <listitem>
+          <para><computeroutput>VBoxManage controlvm <vm>
+          acpipowerbutton</computeroutput> will send an ACPI shutdown signal to 
+          the VM, as if the power button on a real computer had been pressed.
+          So long as the VM is running a fairly modern guest operating system 
+          providing ACPI support, this should trigger a proper shutdown mechanism 
+          from within the VM.</para>
+        </listitem>
+
+        <listitem>
+          <para><computeroutput>VBoxManage controlvm <vm>
+          keyboardputscancode <hex> [<hex>...]</computeroutput> 
+          Sends commands using keycodes to the VM. Keycodes are documented in the 
+          public domain, e.g. http://www.win.tue.nl/~aeb/linux/kbd/scancodes-1.html.</para>
+        </listitem>
+
+        <listitem>
           <para><computeroutput>VBoxManage controlvm "VM name" teleport
           --hostname <name> --port <port> [--passwordfile
           <file> | --password <password>]</computeroutput> makes
@@ -1859,15 +2140,13 @@ Virtual system 0:
           machine; see <xref linkend="vboxmanage-modifyvm-teleport" /> for
           details.</para>
         </listitem>
-      </itemizedlist></para>
+    </itemizedlist></para>
 
     <para>A few extra options are available with
     <computeroutput>controlvm</computeroutput> that do not directly affect the
     VM's running state:</para>
 
     <itemizedlist>
-      <!-- @todo r=andy Document keyboardputscancode -->
-
       <listitem>
         <para>The <computeroutput>setlinkstate<1-N></computeroutput>
         operation connects or disconnects virtual network cables from their
@@ -1989,19 +2268,169 @@ Virtual system 0:
       </listitem>
 
       <listitem>
-        <para><computeroutput>vrde on|off</computeroutput> lets you enable or
-        disable the VRDE server, if it is installed.</para>
-      </listitem>
+        <para><computeroutput>vrde on|off</computeroutput> lets you enable or
+        disable the VRDE server, if it is installed.</para>
+      </listitem>
+
+      <listitem>
+        <para><computeroutput>vrdeport default|<ports></computeroutput>
+        changes the port or a range of ports that the VRDE server can bind to;
+        "default" or "0" means port 3389, the standard port for RDP. For
+        details, see the description for the
+        <computeroutput>--vrdeport</computeroutput> option in <xref
+        linkend="vboxmanage-modifyvm-vrde" />.</para>
+      </listitem>
+
+      <listitem>
+        <para><computeroutput>vrdeproperty "TCP/Ports|Address=<value>"</computeroutput>
+        sets the port number(s) and IP address on the VM that the VRDE server can bind to.</para>
+
+        <itemizedlist>
+          <listitem>
+            <para>For TCP/Ports, <value> should be a port or a range of ports that the VRDE 
+            server can bind to; "default" or "0" means port 3389, the standard port for RDP. 
+            For details, see the description for the
+            <computeroutput>--vrdeport</computeroutput> option in <xref
+            linkend="vboxmanage-modifyvm-vrde" />.</para>
+          </listitem>
+
+          <listitem>
+            <para>For TCP/Address, <value> should be the IP address of the host network
+            interface that the VRDE server will bind to. If specified, the server
+            will accept connections only on the specified host network interface.
+            For details, see the description for the
+            <computeroutput>--vrdeaddress</computeroutput> option in <xref
+            linkend="vboxmanage-modifyvm-vrde" />.</para>
+          </listitem>
+        </itemizedlist>
+      </listitem>
+
+      <listitem>
+        <para><computeroutput>vrdeproperty "VideoChannel/Enabled|Quality|DownscaleProtection=<value>"</computeroutput>
+        sets the VRDP video redirection properties.</para>
+        <itemizedlist>
+          <listitem>
+            <para>For VideoChannel/Enabled, <value> can be set to "1" switching the VRDP video channel on.
+            For details, see <xref linkend="vrde-videochannel" />.</para>
+          </listitem>
+
+          <listitem>
+            <para>For VideoChannel/Quality, <value> should be set between 10 and 100% inclusive, 
+            representing a JPEG compression level on the VRDE server video channel. Lower values mean lower 
+            quality but higher compression. For details, see <xref linkend="vrde-videochannel" />.</para>
+          </listitem>
+
+          <listitem>
+            <para>For VideoChannel/DownscaleProtection, <value> can be set to "1" to 
+            enable the videochannel downscale protection feature. When enabled, if a video's size equals the shadow buffer 
+            size, then it is regarded as a full screen video, and is displayed; but if its size is between fullscreen and the downscale
+            threshold - it is NOT displayed, as it could be an application window, which would be unreadable when downscaled.
+            When the downscale protection feature is disabled, an attempt is always made to display videos.</para>
+          </listitem>
+        </itemizedlist>
+      </listitem>
+
+      <listitem>
+        <para><computeroutput>vrdeproperty "Client/DisableDisplay|DisableInput|DisableAudio|DisableUSB=1"</computeroutput></para>
+        <para>disables one of the VRDE server features: Display, Input, Audio or USB respectively.
+        To re-enable a feature, use e.g. "Client/DisableDisplay=".
+        For details, see <xref linkend="vrde-customization" />.</para>
+      </listitem>
+
+      <listitem>
+        <para><computeroutput>vrdeproperty "Client/DisableClipboard|DisableUpstreamAudio=1"</computeroutput></para>
+        <para>disables one of the VRDE server features: Clipboard or UpstreamAudio respectively.
+        To re-enable a feature, use e.g. "Client/DisableClipboard=".
+        For details, see <xref linkend="vrde-customization" />.</para>
+      </listitem>
+ 
+      <listitem>
+        <para><computeroutput>vrdeproperty "Client/DisableRDPDR=1"</computeroutput></para>
+        <para>disables the VRDE server feature: RDP device redirection for smart cards.
+        To re-enable this feature, use "Client/DisableRDPR=".</para>
+      </listitem>
+
+      <listitem>
+        <para><computeroutput>vrdeproperty "H3DRedirect/Enabled=1"</computeroutput></para>
+        <para>enables the VRDE server feature: 3D redirection.
+        To re-disable this feature, use "H3DRedirect/Enabled=".</para>
+      </listitem>
+
+      <listitem>
+        <para><computeroutput>vrdeproperty "Security/Method|ServerCertificate|ServerPrivateKey|CACertificate=<value>"</computeroutput>
+        sets the desired security method/Path of server certificate, path of server private key, path of CA certificate, used for a connection.
+
+        <itemizedlist>
+          <listitem>
+            <para><computeroutput>vrdeproperty "Security/Method=<value>"</computeroutput>
+            sets the desired security method, which is used for a connection. Valid values are:
+            <itemizedlist>
+              <listitem>
+                <para> <computeroutput>Negotiate</computeroutput> - both Enhanced (TLS)
+                and Standard RDP Security connections are allowed. The security
+                method is negotiated with the client. This is the default setting.</para>
+              </listitem>
+              <listitem>
+                <para> <computeroutput>RDP</computeroutput> - only Standard RDP Security is accepted.</para>
+              </listitem>
+              <listitem>
+                <para> <computeroutput>TLS</computeroutput> - only Enhanced RDP Security is accepted. 
+                The client must support TLS.</para>
+              </listitem>
+            </itemizedlist>
+            For details, see <xref linkend="vrde-crypt" />.</para>
+          </listitem>
+
+          <listitem>
+            <para><computeroutput>vrdeproperty "Security/ServerCertificate=<value>"</computeroutput>
+            where <value> is the absolute path of the server certificate.
+            For details, see <xref linkend="vrde-crypt" />.</para>
+          </listitem>
+
+          <listitem>
+            <para><computeroutput>vrdeproperty "Security/ServerPrivateKey=<value>"</computeroutput>
+            where <value> is the absolute path of the server private key.
+            For details, see <xref linkend="vrde-crypt" />.</para>
+          </listitem>
+
+          <listitem>
+            <para><computeroutput>vrdeproperty "Security/CACertificate=<value>"</computeroutput>
+            where <value> is the absolute path of the CA self signed certificate.
+            For details, see <xref linkend="vrde-crypt" />.</para>
+          </listitem>
+        </itemizedlist></para>
+      </listitem>
+
+      <listitem>
+        <para><computeroutput>vrdeproperty "Audio/RateCorrectionMode|LogPath=<value>"</computeroutput>
+        sets the Audio connection mode, or Path of the audio logfile.
 
-      <listitem>
-        <para><computeroutput>vrdeport default|<ports></computeroutput>
-        changes the port or a range of ports that the VRDE server can bind to;
-        "default" or "0" means port 3389, the standard port for RDP. For
-        details, see the description for the
-        <computeroutput>--vrdeport</computeroutput> option in <xref
-        linkend="vboxmanage-modifyvm-other" />.</para>
+        <itemizedlist>
+          <listitem>
+            <para><computeroutput>vrdeproperty "Audio/RateCorrectionMode=<value>"</computeroutput>
+            where <value> is the desired rate correction mode, allowed values are:
+            <itemizedlist>
+              <listitem>
+                <para> <computeroutput>VRDP_AUDIO_MODE_VOID</computeroutput> - no mode specified, use to unset any Audio mode already set.</para>
+              </listitem>
+              <listitem>
+                <para> <computeroutput>VRDP_AUDIO_MODE_RC</computeroutput> - rate correction mode.</para>
+              </listitem>
+              <listitem>
+                <para> <computeroutput>VRDP_AUDIO_MODE_LPF</computeroutput> - low pass filter mode.</para>
+              </listitem>
+              <listitem>
+                <para> <computeroutput>VRDP_AUDIO_MODE_CS</computeroutput> - client sync mode to prevent under/overflow of the client queue.</para>
+              </listitem>
+            </itemizedlist></para>
+          </listitem>
+          <listitem>
+            <para><computeroutput>vrdeproperty "Audio/LogPath=<value>"</computeroutput>
+            where <value> is the absolute path of the Audio log file.</para>
+          </listitem>
+        </itemizedlist></para>
       </listitem>
-
+            
       <listitem>
         <para><computeroutput>vrdevideochannelquality
         <percent></computeroutput>: Sets the image quality for video
@@ -2102,7 +2531,7 @@ Virtual system 0:
         <itemizedlist>
           <listitem>
             <para><computeroutput>--maxdowntime <msec></computeroutput>:
-            Optional - specifies the maximum downtime (millseconds) for the 
+            Optional - specifies the maximum downtime (milliseconds) for the 
             teleporting target VM.</para>
           </listitem>
 
@@ -2156,9 +2585,9 @@ Virtual system 0:
 
         <para>The following settings are supported:</para>
 
-        <para>MaxFramerate (default no maximum limit) - this specifies the highest rate (Frames/sec) at which 
+        <para>MaxFramerate (default no maximum limit) - this specifies the highest rate (frames/sec) at which 
         video frames are sent to the guest. Higher frame rates increase CPU load, so this setting can be useful 
-        when there is a need to reduce CPU load.  Its default 'value' is "no maximum limit", thus enabling the 
+        when there is a need to reduce CPU load. Its default 'value' is 'no maximum limit', thus enabling the 
         guest to use all frame rates supported by the host webcam.</para>
 
         <para>MaxPayloadTransferSize (default 3060 bytes) - this specifies the maximum number of bytes the emulated 
@@ -2183,7 +2612,7 @@ Virtual system 0:
 
         <para>OS X version 10.7 or newer is required.</para>
 
-        <para>When the webcam device is detached from the host, the emulated webcam device remains i
+        <para>When the webcam device is detached from the host, the emulated webcam device remains
         attached to the guest and must be manually detached using the 
         VBoxManage controlvm "VM name" webcam detach command.</para>
 
@@ -2303,7 +2732,7 @@ Virtual system 0:
     <computeroutput>--description</computeroutput> parameter allows to
     describe the snapshot. If <computeroutput>--live</computeroutput>
     is specified, the VM will not be stopped during the snapshot creation
-    (live smapshotting).</para>
+    (live snapshotting).</para>
 
     <para>The <computeroutput>delete</computeroutput> operation deletes a
     snapshot (specified by name or by UUID). This can take a while to finish
@@ -2569,8 +2998,45 @@ Virtual system 0:
           <glossdef>
             <para>This switch allows to enable the non-rotational flag for virtual
               hard disks. Some guests (i.e. Windows 7+) treat such disks like SSDs
-              and don't perform disk fragmentation on such media.
-            </para>
+              and don't perform disk fragmentation on such media.</para>
+          </glossdef>
+        </glossentry>
+
+        <glossentry>
+          <glossterm><computeroutput>--discard</computeroutput></glossterm>
+          <glossdef>
+            <para>This switch enables the auto-discard feature for the virtual 
+            hard disks. This specifies that a VDI image will be shrunk in response 
+            to the trim command from the guest OS. The following requirements
+            must be met:
+
+            <itemizedlist>
+              <listitem>
+                <para>The disk format must be VDI.</para>
+              </listitem> 
+              <listitem> 
+                <para>The size of the cleared area must be at least 1MB.</para>
+              </listitem>
+              <listitem>
+                <para>VirtualBox will only trim whole 1MB blocks. The VDIs themselves are organized 
+                into 1MB blocks, so this will only work if the space being TRIM-med is at least 
+                a 1MB contiguous block at a 1MB boundary. On Windows, occasional defrag (with "defrag.exe /D"),
+                or under Linux running "btrfs filesystem defrag" as a background cron job may be
+                beneficial.</para>
+              </listitem>
+            </itemizedlist></para>
+
+            <para>Notes: the Guest OS must be configured to issue trim command, and typically this 
+            means that the guest OS is made to 'see' the disk as an SSD. Ext4 supports -o discard mount flag; 
+            OSX probably requires additional settings. Windows ought to automatically detect and 
+            support SSDs - at least in versions 7, 8 and 10. Linux exFAT driver (courtesy of Samsung) 
+            supports the trim command.</para>
+            <para>It is unclear whether Microsoft's implementation of exFAT supports this feature, even
+            though that file system was originally designed for flash.</para>
+            <para>Alternatively, there are ad hoc methods to issue trim, e.g. Linux fstrim command,
+            part of util-linux package. Earlier solutions required a user to zero out unused areas, 
+            e.g. using zerofree, and explicitly compact the disk - only possible when the VM is 
+            offline.</para>
           </glossdef>
         </glossentry>
 
@@ -2636,6 +3102,15 @@ Virtual system 0:
         </glossentry>
 
         <glossentry>
+          <glossterm><computeroutput>--encodedlun</computeroutput></glossterm>
+
+          <glossdef>
+            <para>Hex encoded Logical Unit Number of the target resource (optional).
+            Often, this value is zero.</para>
+          </glossdef>
+        </glossentry>
+
+        <glossentry>
           <glossterm><computeroutput>--username, --password</computeroutput></glossterm>
 
           <glossdef>
@@ -2651,6 +3126,29 @@ Virtual system 0:
         </glossentry>
 
         <glossentry>
+          <glossterm><computeroutput>--initiator</computeroutput></glossterm>
+
+          <glossdef>
+            <para>iSCSI Initiator (optional). Note:</para>
+
+            <para>Microsoft iSCSI Initiator is a system, such as a server that attaches to an IP network and initiates requests and receives responses 
+            from an iSCSI target. The SAN components in Microsoft iSCSI Initiator are largely analogous to Fibre Channel SAN components, and 
+            they include the following:/</para>
+
+            <para>To transport blocks of iSCSI commands over the IP network, an iSCSI driver must be installed on the iSCSI host. 
+            An iSCSI driver is included with Microsoft iSCSI Initiator.</para>
+
+            <para>A gigabit Ethernet adapter that transmits 1000 megabits per second (Mbps) is recommended for the connection to an iSCSI target. Like 
+            standard 10/100 adapters, most gigabit adapters use a preexisting Category 5 or Category 6E cable that. Each port on the adapter is 
+            identified by a unique IP address.</para>
+
+           <para>An iSCSI target is any device that receives iSCSI commands. The device can be an end node, such as a storage device, or it can be an 
+           intermediate device, such as a network bridge between IP and Fibre Channel devices. Each port on the storage array controller or network 
+           bridge is identified by one or more IP addresses</para>
+          </glossdef>
+        </glossentry>
+
+        <glossentry>
           <glossterm><computeroutput>--intnet</computeroutput></glossterm>
 
           <glossdef>
@@ -2767,20 +3265,21 @@ Virtual system 0:
     <title>VBoxManage bandwidthctl</title>
 
     <para>This command creates/deletes/modifies/shows bandwidth groups of the given
-    virtual machine:<screen>VBoxManage bandwidthctl    <uuid|vmname>
-                            add <name> --type disk|network --limit <megabytes per second>[k|m|g|K|M|G] |
-                            set <name> --limit <megabytes per second>[k|m|g|K|M|G] |
-                            remove <name> |
-                            list [--machinereadable]</screen></para>
+    virtual machine:
+    <screen>VBoxManage bandwidthctl    <uuid|vmname>
+                           add <name> --type disk|network --limit <megabytes per second>[k|m|g|K|M|G] |
+                           set <name> --limit <megabytes per second>[k|m|g|K|M|G] |
+                           remove <name> |
+                           list [--machinereadable]</screen></para>
 
     <para>The following subcommands are available:<itemizedlist>
       <listitem>
         <para><computeroutput>add</computeroutput>, creates a new bandwidth
-          group of given type.</para>
+        group of given type.</para>
       </listitem>
       <listitem>
         <para><computeroutput>set</computeroutput>, modifies the limit for an
-          existing bandwidth group.</para>
+        existing bandwidth group.</para>
       </listitem>
       <listitem>
         <para><computeroutput>remove</computeroutput>, destroys a bandwidth
@@ -2788,7 +3287,9 @@ Virtual system 0:
       </listitem>
       <listitem>
         <para><computeroutput>list</computeroutput>, shows all bandwidth groups
-          defined for the given VM.</para>
+        defined for the given VM. Use <computeroutput>--machinereadable</computeroutput> 
+        option to produce the same output, but in machine readable format. This is of the 
+        form: name="value" on a line by line basis.</para>
       </listitem>
     </itemizedlist>
     </para>
@@ -2814,11 +3315,11 @@ Virtual system 0:
 
           <glossdef>
             <para>Type of the bandwidth group. Mandatory. Two types are
-              supported: <computeroutput>disk</computeroutput> and
-              <computeroutput>network</computeroutput>. See
-              <xref linkend="storage-bandwidth-limit" /> or
-              <xref linkend="network_bandwidth_limit" /> for a description of a
-              particular type.</para>
+            supported: <computeroutput>disk</computeroutput> and
+            <computeroutput>network</computeroutput>. See
+            <xref linkend="storage-bandwidth-limit" /> or
+            <xref linkend="network_bandwidth_limit" /> for a description of a
+            particular type.</para>
           </glossdef>
         </glossentry>
 
@@ -2827,112 +3328,131 @@ Virtual system 0:
 
           <glossdef>
             <para>Specifies the limit for the given group. Can be changed
-              while the VM is running. The default unit is megabytes per
-              second. The unit can be changed by specifying one of the
-              following suffixes: <computeroutput>k</computeroutput> for kilobits/s, <computeroutput>m</computeroutput> for megabits/s, <computeroutput>g</computeroutput> for gigabits/s, <computeroutput>K</computeroutput> for kilobytes/s, <computeroutput>M</computeroutput> for megabytes/s, <computeroutput>G</computeroutput> for gigabytes/s.</para>
+            while the VM is running. The default unit is megabytes per
+            second. The unit can be changed by specifying one of the
+            following suffixes: <computeroutput>k</computeroutput> for kilobits/s, 
+            <computeroutput>m</computeroutput> for megabits/s,
+            <computeroutput>g</computeroutput> for gigabits/s,
+            <computeroutput>K</computeroutput> for kilobytes/s,
+            <computeroutput>M</computeroutput> for megabytes/s,
+            <computeroutput>G</computeroutput> for gigabytes/s.</para>
           </glossdef>
         </glossentry>
       </glosslist>
       <note>
         <para>The network bandwidth limits apply only to the traffic being sent by
-          virtual machines. The traffic being received by VMs is unlimited.</para>
+        virtual machines. The traffic being received by VMs is unlimited.</para>
       </note>
       <note>
         <para>To remove a bandwidth group it must not be referenced by any disks
-          or adapters in running VM.</para>
+        or adapters in running VM.</para>
       </note>
     </para>
   </sect1>
 
   <sect1>
-    <title>VBoxManage showhdinfo</title>
+    <title>VBoxManage showmediuminfo</title>
 
-    <para>This command shows information about a virtual hard disk image,
+    <para>This command shows information about a medium,
     notably its size, its size on disk, its type and the virtual machines
     which use it.<note>
         <para>For compatibility with earlier versions of VirtualBox, the
         "showvdiinfo" command is also supported and mapped internally to the
-        "showhdinfo" command.</para>
+        "showmediuminfo" command.</para>
       </note></para>
-    <para>The disk image must be specified either by its UUID (if the medium
+
+    <screen>VBoxManage showmediuminfo     [disk|dvd|floppy] <uuid|filename></screen>
+
+    <para>The medium must be specified either by its UUID (if the medium
       is registered) or by its filename. Registered images can be listed by
-      <computeroutput>VBoxManage list hdds</computeroutput> (see <xref linkend="vboxmanage-list" />
-      for more information). A filename must be specified as valid path, either
-      as an absolute path or as a relative path starting from the current
-      directory.</para>
+      <computeroutput>VBoxManage list hdds</computeroutput>, 
+      <computeroutput>VBoxManage list dvds</computeroutput>, 
+      or <computeroutput>VBoxManage list floppies</computeroutput>, as appropriate.
+      (see <xref linkend="vboxmanage-list" />
+      for more information).</para>
   </sect1>
 
   <sect1 id="vboxmanage-createvdi">
     <title>VBoxManage createhd</title>
 
-    <para>This command creates a new virtual hard disk image. The syntax is as
-    follows:</para>
+    <para>This command creates a new medium. The syntax is as follows:</para>
 
-    <screen>VBoxManage createhd         --filename <filename>
-                            --size <megabytes>|--sizebyte <bytes>
+    <screen>VBoxManage createmedium     [disk|dvd|floppy]    --filename <filename>
+                            [--size <megabytes>|--sizebyte <bytes>]
+                            [--diffparent <uuid>|<filename>
                             [--format VDI|VMDK|VHD] (default: VDI)
                             [--variant Standard,Fixed,Split2G,Stream,ESX]</screen>
 
     <para>where the parameters mean:<glosslist>
         <glossentry>
-          <glossterm><computeroutput>--filename</computeroutput></glossterm>
+          <glossterm><computeroutput>--filename <filename></computeroutput></glossterm>
 
           <glossdef>
-            <para>Allows to choose a file name. Mandatory.</para>
+            <para>Specifies a file name <filename> as an absolute path on the host file
+            system.. Mandatory.</para>
           </glossdef>
         </glossentry>
 
         <glossentry>
-          <glossterm><computeroutput>--size</computeroutput></glossterm>
+          <glossterm><computeroutput>--size <megabytes></computeroutput></glossterm>
 
           <glossdef>
-            <para>Allows to define the image capacity, in 1 MiB units.
-            Mandatory.</para>
+            <para><megabytes> Specifies the image capacity, in 1 MB units.
+            Optional.</para>
           </glossdef>
         </glossentry>
 
         <glossentry>
-          <glossterm><computeroutput>--format</computeroutput></glossterm>
+          <glossterm><computeroutput>--diffparent <uuid>|<filename></computeroutput></glossterm>
 
           <glossdef>
-            <para>Allows to choose a file format for the output file different
-            from the file format of the input file.</para>
+            <para>Specifies the differencing image parent, either as a UUID or 
+            by the absolute pathname of the file on the host file system. 
+            Useful for sharing a base box disk image among several VMs.</para>
           </glossdef>
         </glossentry>
 
         <glossentry>
-          <glossterm><computeroutput>--variant</computeroutput></glossterm>
+          <glossterm><computeroutput>--format VDI|VMDK|VHD</computeroutput></glossterm>
+
+          <glossdef>
+            <para>Specifies the file format for the output file. Available 
+            options are VDI, VMDK, VHD. Default is VDI. Optional. </para>
+          </glossdef>
+        </glossentry>
+
+        <glossentry>
+          <glossterm><computeroutput>--variant Standard,Fixed,Split2G,Stream,ESX</computeroutput></glossterm>
 
           <glossdef>
-            <para>Allows to choose a file format variant for the output file.
+            <para>Specifies any required file format variant(s) for the output file.
             It is a comma-separated list of variant flags. Not all
-            combinations are supported, and specifying inconsistent flags will
-            result in an error message.</para>
+            combinations are supported, and specifying mutually incompatible 
+            flags results in an error message. Optional.</para>
           </glossdef>
         </glossentry>
       </glosslist> <note>
         <para>For compatibility with earlier versions of VirtualBox, the
         "createvdi" command is also supported and mapped internally to the
-        "createhd" command.</para>
+        "createmedium" command.</para>
       </note></para>
   </sect1>
 
   <sect1 id="vboxmanage-modifyvdi">
-    <title>VBoxManage modifyhd</title>
+    <title>VBoxManage modifymedium</title>
 
-    <para>With the <computeroutput>modifyhd</computeroutput> command, you can
+    <para>With the <computeroutput>modifymedium</computeroutput> command, you can
     change the characteristics of a disk image after it has been
-    created:<screen>VBoxManage modifyhd         <uuid|filename>
-                            [--type normal|writethrough|immutable|shareable|
-                                    readonly|multiattach]
-                            [--autoreset on|off]
-                            [--property <name=[value]>]
-                            [--compact]
-                            [--resize <megabytes>|--resizebyte <bytes>]</screen><note>
-        <para>Despite the "hd" in the subcommand name, the command works with
-        all disk images, not only hard disks. For compatibility with earlier
-        versions of VirtualBox, the "modifyvdi" command is also supported and
-        mapped internally to the "modifyhd" command.</para>
+    created:<screen>VBoxManage modifymedium  [disk|dvd|floppy]    <uuid|filename>
+                         [--type normal|writethrough|immutable|shareable|
+                                 readonly|multiattach]
+                         [--autoreset on|off]
+                         [--property <name=[value]>]
+                         [--compact]
+                         [--resize <megabytes>|--resizebyte <bytes>]
+                         [--move <full path to a new location></screen><note>
+        <para>For compatibility with earlier versions of VirtualBox, the "modifyvdi" and "modifyhd" 
+        commands are also supported and mapped internally to the "modifymedium" command.</para>
       </note></para>
 
       <para>The disk image to modify must be specified either by its UUID
@@ -2958,7 +3478,7 @@ Virtual system 0:
         </listitem>
 
         <listitem>
-          <para>With the <computeroutput>--compact</computeroutput> option,
+          <para>The <computeroutput>--compact</computeroutput> option,
           can be used to compact disk images, i.e. remove blocks that only
           contains zeroes. This will shrink a dynamically allocated image
           again; it will reduce the <emphasis>physical</emphasis> size of the
@@ -3004,6 +3524,12 @@ Virtual system 0:
           option does almost the same thing, except that x is expressed in bytes
           instead of megabytes.</para>
         </listitem>
+
+        <listitem>
+          <para>The <computeroutput>--move <dest></computeroutput> option
+          can be used to move an image to a different location <dest> on the host file system, 
+          specified by either the relative path to the current directory or absolute path.</para>
+        </listitem>
       </itemizedlist></para>
   </sect1>
 
@@ -3069,6 +3595,162 @@ Virtual system 0:
       </note></para>
   </sect1>
 
+  <sect1 id="vboxmanage-mediumproperty">
+    <title>VBoxManage mediumproperty</title>
+
+    <para>This command sets up, gets or deletes a medium property.
+    The syntax is as follows:</para>
+
+    <screen>VBoxManage mediumproperty [disk|dvd|floppy] set <uuid|filename> 
+                                                <property> <value></screen>
+
+
+    <para><itemizedlist>
+        <listitem>
+          <para>Use <computeroutput><disk|dvd|floppy></computeroutput> to optionally specify
+           the type of medium: disk (hard drive), dvd or floppy.</para>
+        </listitem>
+
+        <listitem>
+          <para>Use <computeroutput><uuid|filename></computeroutput> to supply either the uuid 
+          or absolute path of the medium/image to be encrypted.</para>
+        </listitem>
+ 
+        <listitem>
+          <para>Use <computeroutput><property></computeroutput> to supply the name of the 
+          property.</para>
+        </listitem>
+
+        <listitem>
+          <para>Use <computeroutput><value></computeroutput> to supply the property value.</para>
+        </listitem>
+    </itemizedlist></para>
+
+    <screen>VBoxManage mediumproperty [disk|dvd|floppy] get <uuid|filename> 
+                                                <property></screen>
+    <para><itemizedlist>
+        <listitem>
+          <para>Use <computeroutput><disk|dvd|floppy></computeroutput> to optionally specify
+           the type of medium: disk (hard drive), dvd or floppy.</para>
+        </listitem>
+
+        <listitem>
+          <para>Use <computeroutput><uuid|filename></computeroutput> to supply either the uuid
+          or absolute path of the medium/image to be encrypted.</para>
+        </listitem>
+
+        <listitem>
+          <para>Use <computeroutput><property></computeroutput> to supply the name of the
+          property.</para>
+        </listitem>
+    </itemizedlist></para>
+
+    <screen>VBoxManage mediumproperty [disk|dvd|floppy] delete <uuid|filename> 
+                                                   <property></screen>
+
+ 
+    <para><itemizedlist>
+        <listitem>
+          <para>Use <computeroutput><disk|dvd|floppy></computeroutput> to optionally specify
+           the type of medium: disk (hard drive), dvd or floppy.</para>
+        </listitem>
+
+        <listitem>
+          <para>Use <computeroutput><uuid|filename></computeroutput> to supply either the uuid
+          or absolute path of the medium/image.</para>
+        </listitem>
+
+        <listitem>
+          <para>Use <computeroutput><property></computeroutput> to supply the name of the
+          property.</para>
+        </listitem>
+    </itemizedlist></para>
+  </sect1>
+
+  <sect1 id="vboxmanage-encryptmedium">
+    <title>VBoxManage encryptmedium</title>
+
+    <para>This command is used to create a DEK encrypted medium/image.
+    See <xref linkend="diskencryption-encryption" />" for details.</para>
+
+    <para>The syntax is as follows:</para>
+
+    <screen>VBoxManage encryptmedium <uuid|filename> 
+                         [--newpassword <file|->]
+                         [--oldpassword <file|->]
+                         [--cipher <cipher id>]
+                         [--newpasswordid <password id>]</screen>
+
+    <para><itemizedlist>
+        <listitem>
+          <para>use <computeroutput><uuid|filename></computeroutput> to supply the 
+           uuid or absolute path of the medium/image to be encrypted.</para>
+        </listitem>
+
+        <listitem>
+          <para>Use <computeroutput>--newpassword <file|-></computeroutput> to supply a new 
+          encryption password; either specify the absolute pathname of a password file on the host operating system,
+          or <computeroutput>-</computeroutput> to prompt you for the password on the command line. 
+          Always use the <computeroutput>--newpasswordid</computeroutput> option with this option.</para>
+        </listitem>
+
+        <listitem>
+          <para>use <computeroutput>--oldpassword <file|-></computeroutput> to supply any old
+          encryption password; either specify the absolute pathname of a password file on the host operating system,
+          or <computeroutput>-</computeroutput> to prompt you for the old password on the command line.</para>
+
+          <para>Use this option to gain access to an encrypted medium/image to change its password using 
+          <computeroutput>--newpassword</computeroutput> and/or change its encryption using
+          <computeroutput>--cipher</computeroutput>.</para>
+        </listitem>
+
+        <listitem>
+          <para>Use <computeroutput>--cipher <cipher></computeroutput> to specify the cipher to use for 
+          encryption; this can be either <computeroutput>AES-XTS128-PLAIN64</computeroutput> or 
+          <computeroutput>AES-AXTS256-PLAIN64</computeroutput>.</para>
+
+          <para>Use this option to change any existing encryption on the medium/image, or setup new encryption on 
+          it for the 1st time.</para>
+        </listitem>
+
+        <listitem>
+          <para>Use <computeroutput>--newpasswordid <password id></computeroutput> to supply the new password identifier.
+          This can be freely chosen by the user, and is used for correct identification when supplying multiple 
+          passwords during VM startup.</para>
+
+          <para>If the user uses the same password when encrypting multiple images and also the same password identifier, the 
+          user needs to supply the password only once during VM startup.</para>
+        </listitem>
+    </itemizedlist></para>
+
+  </sect1>
+
+  <sect1 id="vboxmanage-checkmediumpwd">
+
+    <title>VBoxManage checkmediumpwd</title>
+
+    <para>This command is used to check the current encryption password on a DEK encrypted medium/image.
+    See <xref linkend="diskencryption-encryption" />" for details.</para>
+
+    <para>The syntax is as follows:</para>
+
+    <screen>VBoxManage checkmediumpwd <uuid|filename> 
+                                      <pwd file|-></screen>
+    <para><itemizedlist>
+        <listitem>
+          <para>Use <computeroutput><uuid|filename></computeroutput> to supply the uuid or absolute path of the 
+           medium/image to be checked.</para>
+        </listitem>
+
+        <listitem>
+          <para>Use <computeroutput><pwd file|-></computeroutput> to supply the password identifier to be checked. Either 
+          specify the absolute pathname of a password file on the host operating system, or <computeroutput>-</computeroutput> to 
+          prompt you for the password on the command line.</para>
+        </listitem>
+    </itemizedlist></para>
+
+  </sect1>
+  
   <sect1>
     <title>VBoxManage convertfromraw</title>
 
@@ -3099,7 +3781,7 @@ VBoxManage convertfromraw   stdin <outputfile> <bytes>
 
           <glossdef>
             <para>Select the disk image format to create. Default is
-            VDI.</para>
+            VDI. Other options are VMDK and VHD.</para>
           </glossdef>
         </glossentry>
 
@@ -3157,6 +3839,11 @@ VBoxManage setextradata SUSE10 installdate 2006.02.02</screen>
 All rights reserved.
 
 Value: 2006.01.01</screen>
+
+    <para>You could retrieve the information for all keys as follows:</para>
+
+    <screen>VBoxManage getextradata Fedora5 enum</screen>
+
     <para>To remove a key, the <computeroutput>setextradata</computeroutput>
     command must be run without specifying data (only the key), for example:
     </para>
@@ -3174,7 +3861,6 @@ Value: 2006.01.01</screen>
     following properties are available:<glosslist>
         <glossentry>
           <glossterm><computeroutput>machinefolder</computeroutput></glossterm>
-
           <glossdef>
             <para>This specifies the default folder in which virtual machine
             definitions are kept; see <xref linkend="vboxconfigdata" /> for
@@ -3264,6 +3950,40 @@ Value: 2006.01.01</screen>
   <sect1>
     <title>VBoxManage usbfilter add/modify/remove</title>
 
+    <screen>VBoxManage usbfilter        add <index,0-N>
+                          --target <uuid|vmname>global
+                          --name <string>
+                          --action ignore|hold (global filters only)
+                         [--active yes|no (yes)]
+                         [--vendorid <XXXX> (null)]
+                         [--productid <XXXX> (null)]
+                         [--revision <IIFF> (null)]
+                         [--manufacturer <string> (null)]
+                         [--product <string> (null)]
+                         [--remote yes|no (null, VM filters only)]
+                         [--serialnumber <string> (null)]
+                         [--maskedinterfaces <XXXXXXXX>]
+    </screen>
+
+    <screen>VBoxManage usbfilter        modify <index,0-N>
+                          --target <uuid|vmname>global
+                         [--name <string>]
+                         [--action ignore|hold (global filters only)]
+                         [--active yes|no]
+                         [--vendorid <XXXX>]
+                         [--productid <XXXX>]
+                         [--revision <IIFF>]
+                         [--manufacturer <string>]
+                         [--product <string>]
+                         [--remote yes|no (null, VM filters only)]
+                         [--serialnumber <string>]
+                         [--maskedinterfaces <XXXXXXXX>]
+    </screen>
+
+    <screen>VBoxManage usbfilter        remove <index,0-N>
+                          --target <uuid|vmname>global
+    </screen>
+
     <para>The <computeroutput>usbfilter</computeroutput> commands are used for
     working with USB filters in virtual machines, or global filters which
     affect the whole VirtualBox setup. Global filters are applied before
@@ -3286,7 +4006,7 @@ Value: 2006.01.01</screen>
     machine that the filter should be attached to or use "global" to apply it
     to all virtual machines. <computeroutput>name</computeroutput> is a name
     for the new filter and for global filters,
-    <computeroutput>action</computeroutput> says whether to allow machines
+    <computeroutput>action</computeroutput> says whether to allow VMs
     access to devices that fit the filter description ("hold") or not to give
     them access ("ignore"). In addition, you should specify parameters to
     filter by. You can find the parameters for devices attached to your system
@@ -3304,16 +4024,176 @@ Value: 2006.01.01</screen>
     which can be changed are the same as for <computeroutput>usbfilter
     add</computeroutput>. To remove a filter, use <computeroutput>usbfilter
     remove</computeroutput> and specify the index and the target.</para>
+
+    <para>The following is a list of the additional 
+    <computeroutput>usbfilter add</computeroutput> and  
+    <computeroutput>usbfilter modify</computeroutput> options, with detailed 
+    explanations on how to use them.</para>
+
+    <para><itemizedlist>
+        <listitem>
+          <para><computeroutput>--action ignore|hold</computeroutput>Specifies 
+          whether devices that fit the filter description are allowed access by 
+          machines ("hold"), or have access denied ("ignore"). Applies to 
+          global filters only.</para>
+        </listitem>
+
+        <listitem>
+          <para><computeroutput>--active yes|no</computeroutput>Specifies whether
+          the USB Filter is active or temporarily disabled. For 
+          <computeroutput>usbfilter create</computeroutput> the default is
+          active.</para>
+        </listitem>
+
+        <listitem>
+          <para><computeroutput>--vendorid <XXXX>|""</computeroutput>Specifies 
+           a vendor ID filter - the string representation for the exact matching 
+           has the form XXXX, where X is the hex digit (including leading zeroes).</para>
+        </listitem>
+
+        <listitem>
+          <para><computeroutput>--productid <XXXX>|""</computeroutput>Specifies 
+           a product ID filter - The string representation for the exact matching has 
+           the form XXXX, where X is the hex digit (including leading zeroes).</para>
+        </listitem>
+
+        <listitem>
+          <para><computeroutput>--revision <IIFF>|""</computeroutput>Specifies 
+           a revision ID filter - the string representation for the exact matching has
+           the form IIFF, where I is the decimal digit of the integer part of the revision,
+           and F is the decimal digit of its fractional part (including leading and trailing zeros).
+           Note that for interval filters, it's best to use the hex form, because the revision is
+           stored as a 16 bit packed BCD value; so the expression int:0x0100-0x0199 will match
+           any revision from 1.0 to 1.99 inclusive.</para>
+        </listitem>
+
+        <listitem>
+          <para><computeroutput>--manufacturer <string>|""</computeroutput>Specifies 
+           a manufacturer ID filter, as a string.</para>
+        </listitem>
+
+        <listitem>
+          <para><computeroutput>--product <string>|""</computeroutput>Specifies 
+           a product ID filter, as a string.</para>
+        </listitem>
+
+        <listitem>
+          <para><computeroutput>--remote yes|no""</computeroutput>Specifies 
+           a remote filter - indicating whether the device is physically connected to a 
+           remote VRDE client or to a local host machine. Applies to VM filters only.</para>
+        </listitem>
+
+        <listitem>
+          <para><computeroutput>--serialnumber <string>|""</computeroutput>Specifies 
+           a serial number filter, as a string.</para>
+        </listitem>
+
+        <listitem>
+          <para><computeroutput>--maskedinterfaces <XXXXXXXX></computeroutput>Specifies 
+           a masked interface filter, for hiding one or more USB interfaces from the guest. 
+           The value is a bit mask where the set bits correspond to the USB interfaces that 
+           should be hidden, or masked off. This feature only works on Linux hosts.</para>
+        </listitem>
+    </itemizedlist></para>
   </sect1>
 
   <sect1 id="vboxmanage-sharedfolder">
     <title>VBoxManage sharedfolder add/remove</title>
 
+<screen>
+VBoxManage sharedfolder     add <uuid|vmname>
+                                --name <name> --hostpath <hostpath>
+                                [--transient] [--readonly] [--automount]
+</screen>
+
+
     <para>This command allows you to share folders on the host computer with
     guest operating systems. For this, the guest systems must have a version
     of the VirtualBox Guest Additions installed which supports this
     functionality.</para>
 
+    <para>Parameters are:</para>
+
+    <para><itemizedlist>
+       <listitem>
+         <para><computeroutput><uuid|vmname></computeroutput>
+         Specifies the UUID or name of the VM whose guest operating system will be 
+         sharing folders with the host computer. Mandatory.</para>
+       </listitem>
+
+       <listitem>
+         <para><computeroutput>--name <name></computeroutput>
+         Specifies the name of the share. Each share has a unique name within the 
+         namespace of the host operating system. Mandatory.</para>
+       </listitem>
+
+       <listitem>
+         <para><computeroutput>-hostpath <hostpath></computeroutput>
+         Specifies the absolute path on the host operating system of the 
+         folder/directory to be shared with the guest operating system.
+         Mandatory.</para>
+       </listitem>
+
+       <listitem>
+         <para><computeroutput>-transient</computeroutput>
+         Specifies that the share is 'transient', meaning that it can be added 
+         and removed at runtime and does not persist after the VM has stopped.  
+         Optional.</para>
+       </listitem>
+
+       <listitem>
+         <para><computeroutput>-readonly</computeroutput>
+         Specifies that the share has only read-only access to files at the host path.</para>
+
+         <para>By default, shared folders have read/write access to the files at the host 
+         path. More specifically, on Linux distros - shared folders are mounted with 
+         770 io permissions with root user and vboxsf as the group, and using this option 
+         the io permissions change to 700. Optional.</para>
+       </listitem>
+
+       <listitem>
+         <para><computeroutput>-automount</computeroutput>
+         Specifies that the share will be automatically mounted. On Linux distros, this will 
+         be to either /media/USER/sf_<name> or /media/sf_<name> - depending on
+         your guest OS. Where <name> is the share name. Optional.</para>
+       </listitem>
+    </itemizedlist></para>
+
+<screen>
+VBoxManage sharedfolder     remove <uuid|vmname>
+                            --name <name> [--transient]
+
+</screen>
+
+    <para>This command allows you to delete shared folders on the host computer shares with
+    the guest operating systems. For this, the guest systems must have a version
+    of the VirtualBox Guest Additions installed which supports this
+    functionality.</para>
+
+    <para>Parameters are:</para>
+
+    <para><itemizedlist>
+       <listitem>
+         <para><computeroutput><uuid|vmname></computeroutput>
+         Specifies the UUID or name of the VM whose guest operating system is 
+         sharing folders with the host computer. Mandatory.</para>
+       </listitem>
+
+       <listitem>
+         <para><computeroutput>--name <name></computeroutput>
+         Specifies the name of the share to be removed. Each share has a unique name within the 
+         namespace of the host operating system. Mandatory.</para>
+       </listitem>
+
+       <listitem>
+         <para><computeroutput>-transient</computeroutput>
+         Specifies that the share is 'transient', meaning that it can be added 
+         and removed at runtime and does not persist after the VM has stopped.  
+         Optional.</para>
+       </listitem>
+    </itemizedlist></para>
+
+
     <para>Shared folders are described in detail in <xref
     linkend="sharedfolders" />.</para>
   </sect1>
@@ -4857,9 +5737,52 @@ Value: 2006.01.01</screen>
     <para>To modify the settings of a DHCP server created earlier with
     <computeroutput>VBoxManage dhcpserver add</computeroutput>, you can use
     <computeroutput>VBoxManage dhcpserver modify</computeroutput> for a given
-    network or host-only interface name.</para>
+    network or host-only interface name. This has the same parameters as 
+    <computeroutput>VBoxManage dhcpserver add</computeroutput>.</para>
+  </sect1>
+
+  <sect1 id="vboxmanage-usbdevsource">
+    <title>VBoxManage usbdevsource</title>
+
+    <para>The "usbdevsource" commands enables you to add and remove USB devices 
+    globally.</para>
+
+    <para>The following command adds a USB device.</para>
+
+    <screen>VBoxManage usbdevsource add <source name>
+                            --backend <backend>
+                            --address <address>
+    </screen>
+
+    <para>Where the command line options are:<itemizedlist>
+        <listitem>
+          <para><source name> specifies the ID of the 'source' USB 
+          device to be added. Mandatory.</para>
+        </listitem>
+        <listitem>
+          <para>--backend <backend> specifies the USB proxy service 
+          backend to use. Mandatory.</para>
+        </listitem>
+        <listitem>
+          <para>--address <address> specifies the backend specific 
+          address. Mandatory.</para>
+        </listitem>
+      </itemizedlist></para>
+
+    <para>The following command removes a USB device.</para>
+
+    <screen>VBoxManage usbdevsource remove <source name>
+    </screen>
+
+    <para>Where the command line options are:<itemizedlist>
+        <listitem>
+          <para><source name> specifies the ID of the 'source' USB 
+          device to be removed. Mandatory.</para>
+        </listitem>
+      </itemizedlist></para>
   </sect1>
 
+
   <xi:include href="user_man_VBoxManage-debugvm.xml" xpointer="element(/1)"
     xmlns:xi="http://www.w3.org/2001/XInclude" />
 
diff --git a/doc/manual/user_ChangeLogImpl.xml b/doc/manual/user_ChangeLogImpl.xml
index a178081..95e7db4 100644
--- a/doc/manual/user_ChangeLogImpl.xml
+++ b/doc/manual/user_ChangeLogImpl.xml
@@ -3,6 +3,126 @@
 <chapter> <!-- HACK ALERT! Seems we must have a single top level element for xi:include to work.
                            So, we use chapter and xpointer="xpointer(/chapter/)" with xi:include. -->
   <sect1>
+    <title>Version 5.1.4 (2016-08-16)</title>
+
+    <para>This is a maintenance release. The following items were fixed and/or
+      added:</para>
+
+    <itemizedlist>
+
+      <listitem>
+        <para>GUI: show actual VM uptime in the session information window</para>
+      </listitem>
+
+      <listitem>
+        <para>Audio: re-enabled speakers for Mac OS X guests (5.1.0 regression;
+          bug #15611)</para>
+      </listitem>
+
+      <listitem>
+        <para>Audio: fixed crashes under certain conditions</para>
+      </listitem>
+
+      <listitem>
+        <para>USB: fixed a hang under certain conditions</para>
+      </listitem>
+
+      <listitem>
+        <para>USB: fixed a hanging guest under certain conditions (bug #15747)</para>
+      </listitem>
+
+      <listitem>
+        <para>PIIX4: implemented dummy SMBus controller to prevent annoying
+          Linux kernel warnings about uninitialized SMBus base address
+          (bug #9517)</para>
+      </listitem>
+
+      <listitem>
+        <para>NVMe: several fixes to improve stability, fixed a crash while
+          saving a VM state</para>
+      </listitem>
+
+      <listitem>
+        <para>VMDK: Fixed an issue creating fixed size images with certain
+          sizes and the Split2G option enabled (bug #15748)</para>
+      </listitem>
+
+      <listitem>
+        <para>VHDX: fixed cloning images with VBoxManage clonehd
+          (bug #14288)</para>
+      </listitem>
+
+      <listitem>
+        <para>Storage: Fixed broken bandwidth limitation when the limit is very
+          low (bug #14982)</para>
+      </listitem>
+
+      <listitem>
+        <para>EFI: fixed sending debug messages in the EFI firmware if a serial
+          port is enabled (bug #12161)</para>
+      </listitem>
+
+      <listitem>
+        <para>OVF: when importing appliances, make sure that the version of the
+          embedded VirtualBox specific settings is processed, to get the
+          default settings handling right</para>
+      </listitem>
+
+      <listitem>
+        <para>VBoxManage: Don't try to set the medium type if there is no change
+          (bug #13850)</para>
+      </listitem>
+
+      <listitem>
+        <para>Linux installer: fixed some scripting issues (bugs #15701
+          and #15702)</para>
+      </listitem>
+
+      <listitem>
+        <para>Linux installer: fixed a path issue on certain Linux
+          distributions (bug #15717)</para>
+      </listitem>
+
+      <listitem>
+        <para>Windows hosts: fixed corrupted mouse pointers with some Linux
+          and Solaris guests (bug #15665)</para>
+      </listitem>
+
+      <listitem>
+        <para>Linux Additions: made the video driver work on 32-bit guests
+           with large video memory sizes (bug #15621)</para>
+      </listitem>
+
+      <listitem>
+        <para>Linux Additions: made the video driver work on kernel 4.7 and
+           later (bug #15769)</para>
+      </listitem>
+
+      <listitem>
+        <para>Linux Additions: converted a failure message to an informational
+           one when drivers could not be stopped during upgrade (bug
+           #15692)</para>
+       </listitem>
+
+      <listitem>
+        <para>Linux Additions: made the video driver work around an X server
+           bug which cause screen refresh to stop (bug #15511)</para>
+      </listitem>
+
+       <listitem>
+        <para>Windows Additions: auto-resizing fixes for Windows 10 guests
+          (bug #15257)</para>
+      </listitem>
+
+      <listitem>
+        <para>Windows Additions: fixed VBoxTray problems with Windows 2000
+          (bug #15661)</para>
+      </listitem>
+
+    </itemizedlist>
+  </sect1>
+
+  <sect1>
     <title>Version 5.1.2 (2016-07-21)</title>
 
     <para>This is a maintenance release. The following items were fixed and/or
diff --git a/include/Makefile.kmk b/include/Makefile.kmk
index 006e6e3..8bd17fc 100644
--- a/include/Makefile.kmk
+++ b/include/Makefile.kmk
@@ -5,7 +5,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/ExtPack/ExtPack.h b/include/VBox/ExtPack/ExtPack.h
index 853dbf4..e8412e9 100644
--- a/include/VBox/ExtPack/ExtPack.h
+++ b/include/VBox/ExtPack/ExtPack.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/GuestHost/SharedClipboard.h b/include/VBox/GuestHost/SharedClipboard.h
index 2f638b0..6d3387a 100644
--- a/include/VBox/GuestHost/SharedClipboard.h
+++ b/include/VBox/GuestHost/SharedClipboard.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/GuestHost/clipboard-helper.h b/include/VBox/GuestHost/clipboard-helper.h
index e2e7ddd..45257cb 100644
--- a/include/VBox/GuestHost/clipboard-helper.h
+++ b/include/VBox/GuestHost/clipboard-helper.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/HGSMI/HGSMI.h b/include/VBox/HGSMI/HGSMI.h
index a258951..3938904 100644
--- a/include/VBox/HGSMI/HGSMI.h
+++ b/include/VBox/HGSMI/HGSMI.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/HGSMI/HGSMIChSetup.h b/include/VBox/HGSMI/HGSMIChSetup.h
index 47f4c86..cf9ca94 100644
--- a/include/VBox/HGSMI/HGSMIChSetup.h
+++ b/include/VBox/HGSMI/HGSMIChSetup.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -35,7 +35,7 @@
                                         * the guest without a need to port IO.
                                         */
 
-typedef struct _HGSMIBUFFERLOCATION
+typedef struct HGSMIBUFFERLOCATION
 {
     HGSMIOFFSET offLocation;
     HGSMISIZE   cbLocation;
@@ -44,24 +44,24 @@ AssertCompileSize(HGSMIBUFFERLOCATION, 8);
 
 /* HGSMI setup and configuration data structures. */
 /* host->guest commands pending, should be accessed under FIFO lock only */
-#define HGSMIHOSTFLAGS_COMMANDS_PENDING    0x1
+#define HGSMIHOSTFLAGS_COMMANDS_PENDING    UINT32_C(0x1)
 /* IRQ is fired, should be accessed under VGAState::lock only  */
-#define HGSMIHOSTFLAGS_IRQ                 0x2
+#define HGSMIHOSTFLAGS_IRQ                 UINT32_C(0x2)
 #ifdef VBOX_WITH_WDDM
 /* one or more guest commands is completed, should be accessed under FIFO lock only */
-# define HGSMIHOSTFLAGS_GCOMMAND_COMPLETED 0x4
+# define HGSMIHOSTFLAGS_GCOMMAND_COMPLETED UINT32_C(0x4)
 /* watchdog timer interrupt flag (used for debugging), should be accessed under VGAState::lock only */
-# define HGSMIHOSTFLAGS_WATCHDOG           0x8
+# define HGSMIHOSTFLAGS_WATCHDOG           UINT32_C(0x8)
 #endif
 /* vsync interrupt flag, should be accessed under VGAState::lock only */
-#define HGSMIHOSTFLAGS_VSYNC               0x10
+#define HGSMIHOSTFLAGS_VSYNC               UINT32_C(0x10)
 /** monitor hotplug flag, should be accessed under VGAState::lock only */
-#define HGSMIHOSTFLAGS_HOTPLUG             0x20
+#define HGSMIHOSTFLAGS_HOTPLUG             UINT32_C(0x20)
 /** Cursor capability state change flag, should be accessed under
  * VGAState::lock only.  @see VBVACONF32. */
-#define HGSMIHOSTFLAGS_CURSOR_CAPABILITIES 0x40
+#define HGSMIHOSTFLAGS_CURSOR_CAPABILITIES UINT32_C(0x40)
 
-typedef struct _HGSMIHOSTFLAGS
+typedef struct HGSMIHOSTFLAGS
 {
     /* host flags can be accessed and modified in multiple threads concurrently,
      * e.g. CrOpenGL HGCM and GUI threads when to completing HGSMI 3D and Video Accel respectively,
diff --git a/include/VBox/HGSMI/HGSMIChannels.h b/include/VBox/HGSMI/HGSMIChannels.h
index 56fc7dc..1d992fb 100644
--- a/include/VBox/HGSMI/HGSMIChannels.h
+++ b/include/VBox/HGSMI/HGSMIChannels.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/HGSMI/HGSMIDefs.h b/include/VBox/HGSMI/HGSMIDefs.h
index a81b1b7..50b6595 100644
--- a/include/VBox/HGSMI/HGSMIDefs.h
+++ b/include/VBox/HGSMI/HGSMIDefs.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/HGSMI/HGSMIMemAlloc.h b/include/VBox/HGSMI/HGSMIMemAlloc.h
index 3796321..8273676 100644
--- a/include/VBox/HGSMI/HGSMIMemAlloc.h
+++ b/include/VBox/HGSMI/HGSMIMemAlloc.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/Hardware/VBoxVideoVBE.h b/include/VBox/Hardware/VBoxVideoVBE.h
index c44da28..988ce83 100644
--- a/include/VBox/Hardware/VBoxVideoVBE.h
+++ b/include/VBox/Hardware/VBoxVideoVBE.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/HostServices/GuestPropertySvc.h b/include/VBox/HostServices/GuestPropertySvc.h
index 6baf43f..75951fa 100644
--- a/include/VBox/HostServices/GuestPropertySvc.h
+++ b/include/VBox/HostServices/GuestPropertySvc.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/HostServices/Service.h b/include/VBox/HostServices/Service.h
index 346d130..8b3faa6 100644
--- a/include/VBox/HostServices/Service.h
+++ b/include/VBox/HostServices/Service.h
@@ -411,12 +411,13 @@ protected:
         RT_ZERO(m_SvcCtx);
         m_SvcCtx.pHelpers = pHelpers;
     }
-    virtual int  init(VBOXHGCMSVCFNTABLE *ptable) { return VINF_SUCCESS; }
+    virtual int  init(VBOXHGCMSVCFNTABLE *ptable) { RT_NOREF1(ptable); return VINF_SUCCESS; }
     virtual int  uninit() { return VINF_SUCCESS; }
     virtual int  clientConnect(uint32_t u32ClientID, void *pvClient) = 0;
     virtual int  clientDisconnect(uint32_t u32ClientID, void *pvClient) = 0;
     virtual void guestCall(VBOXHGCMCALLHANDLE callHandle, uint32_t u32ClientID, void *pvClient, uint32_t eFunction, uint32_t cParms, VBOXHGCMSVCPARM paParms[]) = 0;
-    virtual int  hostCall(uint32_t eFunction, uint32_t cParms, VBOXHGCMSVCPARM paParms[]) { return VINF_SUCCESS; }
+    virtual int  hostCall(uint32_t eFunction, uint32_t cParms, VBOXHGCMSVCPARM paParms[])
+    { RT_NOREF3(eFunction, cParms, paParms); return VINF_SUCCESS; }
 
     /** Type definition for use in callback functions. */
     typedef AbstractService SELF;
@@ -521,6 +522,8 @@ protected:
         pSelf->m_SvcCtx.pvHostData      = pvExtension;
         return VINF_SUCCESS;
     }
+
+    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(AbstractService);
 };
 
 }
diff --git a/include/VBox/HostServices/VBoxClipboardExt.h b/include/VBox/HostServices/VBoxClipboardExt.h
index cdc7e04..736e55a 100644
--- a/include/VBox/HostServices/VBoxClipboardExt.h
+++ b/include/VBox/HostServices/VBoxClipboardExt.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/HostServices/VBoxClipboardSvc.h b/include/VBox/HostServices/VBoxClipboardSvc.h
index 485a0c4..92ed4fc 100644
--- a/include/VBox/HostServices/VBoxClipboardSvc.h
+++ b/include/VBox/HostServices/VBoxClipboardSvc.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/HostServices/VBoxCrOpenGLSvc.h b/include/VBox/HostServices/VBoxCrOpenGLSvc.h
index 8d90e0f..bcfe6a3 100644
--- a/include/VBox/HostServices/VBoxCrOpenGLSvc.h
+++ b/include/VBox/HostServices/VBoxCrOpenGLSvc.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/HostServices/VBoxHostChannel.h b/include/VBox/HostServices/VBoxHostChannel.h
index c85e831..950b7b3 100644
--- a/include/VBox/HostServices/VBoxHostChannel.h
+++ b/include/VBox/HostServices/VBoxHostChannel.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/HostServices/VBoxOGLOp.h b/include/VBox/HostServices/VBoxOGLOp.h
index 8938b42..d116099 100644
--- a/include/VBox/HostServices/VBoxOGLOp.h
+++ b/include/VBox/HostServices/VBoxOGLOp.h
@@ -4,7 +4,7 @@
 
 /*
  *
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/HostServices/VBoxOpenGLSvc.h b/include/VBox/HostServices/VBoxOpenGLSvc.h
index 1472a23..6f19522 100644
--- a/include/VBox/HostServices/VBoxOpenGLSvc.h
+++ b/include/VBox/HostServices/VBoxOpenGLSvc.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/HostServices/glext.h b/include/VBox/HostServices/glext.h
index 2519a6c..dea0081 100644
--- a/include/VBox/HostServices/glext.h
+++ b/include/VBox/HostServices/glext.h
@@ -30,7 +30,7 @@ extern "C" {
 
 #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
 #define WIN32_LEAN_AND_MEAN 1
-#include <windows.h>
+#include <iprt/win/windows.h>
 #endif
 
 #ifndef APIENTRY
diff --git a/include/VBox/HostServices/glxext.h b/include/VBox/HostServices/glxext.h
index 0f66df6..b53dc48 100644
--- a/include/VBox/HostServices/glxext.h
+++ b/include/VBox/HostServices/glxext.h
@@ -30,7 +30,7 @@ extern "C" {
 
 #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
 #define WIN32_LEAN_AND_MEAN 1
-#include <windows.h>
+#include <iprt/win/windows.h>
 #endif
 
 #ifndef APIENTRY
diff --git a/include/VBox/HostServices/wglext.h b/include/VBox/HostServices/wglext.h
index 18804be..ef140ec 100644
--- a/include/VBox/HostServices/wglext.h
+++ b/include/VBox/HostServices/wglext.h
@@ -30,7 +30,7 @@ extern "C" {
 
 #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
 #define WIN32_LEAN_AND_MEAN 1
-#include <windows.h>
+#include <iprt/win/windows.h>
 #endif
 
 #ifndef APIENTRY
diff --git a/include/VBox/RemoteDesktop/VRDE.h b/include/VBox/RemoteDesktop/VRDE.h
index 3445562..1efa198 100644
--- a/include/VBox/RemoteDesktop/VRDE.h
+++ b/include/VBox/RemoteDesktop/VRDE.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/RemoteDesktop/VRDEImage.h b/include/VBox/RemoteDesktop/VRDEImage.h
index eb4a9cb..f88291e 100644
--- a/include/VBox/RemoteDesktop/VRDEImage.h
+++ b/include/VBox/RemoteDesktop/VRDEImage.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/RemoteDesktop/VRDEInput.h b/include/VBox/RemoteDesktop/VRDEInput.h
index 7a88dde..3343b4d 100644
--- a/include/VBox/RemoteDesktop/VRDEInput.h
+++ b/include/VBox/RemoteDesktop/VRDEInput.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/RemoteDesktop/VRDEMousePtr.h b/include/VBox/RemoteDesktop/VRDEMousePtr.h
index 278428a..4296c83 100644
--- a/include/VBox/RemoteDesktop/VRDEMousePtr.h
+++ b/include/VBox/RemoteDesktop/VRDEMousePtr.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/RemoteDesktop/VRDEOrders.h b/include/VBox/RemoteDesktop/VRDEOrders.h
index af4804f..ec1ed1a 100644
--- a/include/VBox/RemoteDesktop/VRDEOrders.h
+++ b/include/VBox/RemoteDesktop/VRDEOrders.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/RemoteDesktop/VRDESCard.h b/include/VBox/RemoteDesktop/VRDESCard.h
index 26b1829..b87c04b 100644
--- a/include/VBox/RemoteDesktop/VRDESCard.h
+++ b/include/VBox/RemoteDesktop/VRDESCard.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/RemoteDesktop/VRDETSMF.h b/include/VBox/RemoteDesktop/VRDETSMF.h
index 13e01f4..23544a3 100644
--- a/include/VBox/RemoteDesktop/VRDETSMF.h
+++ b/include/VBox/RemoteDesktop/VRDETSMF.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/RemoteDesktop/VRDEVideoIn.h b/include/VBox/RemoteDesktop/VRDEVideoIn.h
index 7bf257e..5ce89c5 100644
--- a/include/VBox/RemoteDesktop/VRDEVideoIn.h
+++ b/include/VBox/RemoteDesktop/VRDEVideoIn.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/SUPDrvMangling.h b/include/VBox/SUPDrvMangling.h
index b092b33..3c9b575 100644
--- a/include/VBox/SUPDrvMangling.h
+++ b/include/VBox/SUPDrvMangling.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/VBoxAuth.h b/include/VBox/VBoxAuth.h
index 5713692..7fb544d 100644
--- a/include/VBox/VBoxAuth.h
+++ b/include/VBox/VBoxAuth.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -26,6 +26,10 @@
 #ifndef ___VBox_vboxauth_h
 #define ___VBox_vboxauth_h
 
+/** @defgroup grp_vboxauth VirtualBox External Authentication Library Interface
+ * @{
+ */
+
 /* The following 2 enums are 32 bits values.*/
 typedef enum AuthResult
 {
@@ -45,23 +49,25 @@ typedef enum AuthGuestJudgement
     AuthGuestSizeHack      = 0x7fffffff
 } AuthGuestJudgement;
 
-/* UUID memory representation. Array of 16 bytes. */
+/** UUID memory representation. Array of 16 bytes.
+ *
+ * @note VirtualBox uses a consistent binary representation of UUIDs on all platforms. For this reason
+ * the integer fields comprising the UUID are stored as little endian values. If you want to pass such
+ * UUIDs to code which assumes that the integer fields are big endian (often also called network byte
+ * order), you need to adjust the contents of the UUID to e.g. achieve the same string representation.
+ *
+ * The required changes are:
+ *     - reverse the order of byte 0, 1, 2 and 3
+ *     - reverse the order of byte 4 and 5
+ *     - reverse the order of byte 6 and 7.
+ *
+ * Using this conversion you will get identical results when converting the binary UUID to the string
+ * representation.
+ */
 typedef unsigned char AUTHUUID[16];
 typedef AUTHUUID *PAUTHUUID;
-/*
-Note: VirtualBox uses a consistent binary representation of UUIDs on all platforms. For this reason
-the integer fields comprising the UUID are stored as little endian values. If you want to pass such
-UUIDs to code which assumes that the integer fields are big endian (often also called network byte
-order), you need to adjust the contents of the UUID to e.g. achieve the same string representation.
-The required changes are:
- * reverse the order of byte 0, 1, 2 and 3
- * reverse the order of byte 4 and 5
- * reverse the order of byte 6 and 7.
-Using this conversion you will get identical results when converting the binary UUID to the string
-representation.
-*/
 
-/* The library entry point calling convention. */
+/** The library entry point calling convention. */
 #ifdef _MSC_VER
 # define AUTHCALL __cdecl
 #elif defined(__GNUC__)
@@ -74,118 +80,117 @@ representation.
 /**
  * Authentication library entry point.
  *
- * Parameters:
- *
- *   pUuid            Pointer to the UUID of the accessed virtual machine. Can be NULL.
- *   guestJudgement   Result of the guest authentication.
- *   szUser           User name passed in by the client (UTF8).
- *   szPassword       Password passed in by the client (UTF8).
- *   szDomain         Domain passed in by the client (UTF8).
+ * @param  pUuid            Pointer to the UUID of the accessed virtual machine. Can be NULL.
+ * @param  guestJudgement   Result of the guest authentication.
+ * @param  pszUser          User name passed in by the client (UTF8).
+ * @param  pszPassword      Password passed in by the client (UTF8).
+ * @param  pszDomain        Domain passed in by the client (UTF8).
  *
  * Return code:
  *
- *   AuthAccessDenied    Client access has been denied.
- *   AuthAccessGranted   Client has the right to use the
- *                       virtual machine.
- *   AuthDelegateToGuest Guest operating system must
- *                       authenticate the client and the
- *                       library must be called again with
- *                       the result of the guest
- *                       authentication.
+ * @retval AuthAccessDenied    Client access has been denied.
+ * @retval AuthAccessGranted   Client has the right to use the virtual machine.
+ * @retval AuthDelegateToGuest Guest operating system must
+ *                              authenticate the client and the
+ *                              library must be called again with
+ *                              the result of the guest
+ *                              authentication.
  */
-typedef AuthResult AUTHCALL AUTHENTRY(PAUTHUUID pUuid,
-                                      AuthGuestJudgement guestJudgement,
-                                      const char *szUser,
-                                      const char *szPassword,
-                                      const char *szDomain);
-
-
-typedef AUTHENTRY *PAUTHENTRY;
-
+typedef AuthResult AUTHCALL FNAUTHENTRY(PAUTHUUID pUuid,
+                                        AuthGuestJudgement guestJudgement,
+                                        const char *pszUser,
+                                        const char *pszPassword,
+                                        const char *pszDomain);
+/** Pointer to a FNAUTHENTRY function. */
+typedef FNAUTHENTRY *PFNAUTHENTRY;
+/** @deprecated   */
+typedef FNAUTHENTRY  AUTHENTRY;
+/** @deprecated   */
+typedef PFNAUTHENTRY PAUTHENTRY;
+/** Name of the FNAUTHENTRY entry point. */
 #define AUTHENTRY_NAME "VRDPAuth"
 
 /**
  * Authentication library entry point version 2.
  *
- * Parameters:
- *
- *   pUuid            Pointer to the UUID of the accessed virtual machine. Can be NULL.
- *   guestJudgement   Result of the guest authentication.
- *   szUser           User name passed in by the client (UTF8).
- *   szPassword       Password passed in by the client (UTF8).
- *   szDomain         Domain passed in by the client (UTF8).
- *   fLogon           Boolean flag. Indicates whether the entry point is called
- *                    for a client logon or the client disconnect.
- *   clientId         Server side unique identifier of the client.
- *
- * Return code:
- *
- *   AuthAccessDenied    Client access has been denied.
- *   AuthAccessGranted   Client has the right to use the
- *                       virtual machine.
- *   AuthDelegateToGuest Guest operating system must
- *                       authenticate the client and the
- *                       library must be called again with
- *                       the result of the guest
- *                       authentication.
+ * @param  pUuid            Pointer to the UUID of the accessed virtual machine. Can be NULL.
+ * @param  guestJudgement   Result of the guest authentication.
+ * @param  pszUser          User name passed in by the client (UTF8).
+ * @param  pszPassword      Password passed in by the client (UTF8).
+ * @param  pszDomain        Domain passed in by the client (UTF8).
+ * @param  fLogon           Boolean flag. Indicates whether the entry point is
+ *                          called for a client logon or the client disconnect.
+ * @param  clientId         Server side unique identifier of the client.
+ *
+ * @retval AuthAccessDenied    Client access has been denied.
+ * @retval AuthAccessGranted   Client has the right to use the virtual machine.
+ * @retval AuthDelegateToGuest Guest operating system must
+ *                             authenticate the client and the
+ *                             library must be called again with
+ *                             the result of the guest authentication.
  *
- * Note: When 'fLogon' is 0, only pUuid and clientId are valid and the return
- *       code is ignored.
+ * @note When @a fLogon is 0, only @a pUuid and @a clientId are valid and the
+ *       return code is ignored.
  */
-typedef AuthResult AUTHCALL AUTHENTRY2(PAUTHUUID pUuid,
-                                       AuthGuestJudgement guestJudgement,
-                                       const char *szUser,
-                                       const char *szPassword,
-                                       const char *szDomain,
-                                       int fLogon,
-                                       unsigned clientId);
-
-
-typedef AUTHENTRY2 *PAUTHENTRY2;
-
+typedef AuthResult AUTHCALL FNAUTHENTRY2(PAUTHUUID pUuid,
+                                         AuthGuestJudgement guestJudgement,
+                                         const char *pszUser,
+                                         const char *pszPassword,
+                                         const char *pszDomain,
+                                         int fLogon,
+                                         unsigned clientId);
+/** Pointer to a FNAUTHENTRY2 function. */
+typedef FNAUTHENTRY2 *PFNAUTHENTRY2;
+/** @deprecated   */
+typedef FNAUTHENTRY2  AUTHENTRY2;
+/** @deprecated   */
+typedef PFNAUTHENTRY2 PAUTHENTRY2;
+/** Name of the FNAUTHENTRY2 entry point. */
 #define AUTHENTRY2_NAME "VRDPAuth2"
 
 /**
  * Authentication library entry point version 3.
  *
- * Parameters:
- *
- *   szCaller         The name of the component which calls the library (UTF8).
- *   pUuid            Pointer to the UUID of the accessed virtual machine. Can be NULL.
- *   guestJudgement   Result of the guest authentication.
- *   szUser           User name passed in by the client (UTF8).
- *   szPassword       Password passed in by the client (UTF8).
- *   szDomain         Domain passed in by the client (UTF8).
- *   fLogon           Boolean flag. Indicates whether the entry point is called
- *                    for a client logon or the client disconnect.
- *   clientId         Server side unique identifier of the client.
- *
- * Return code:
- *
- *   AuthResultAccessDenied    Client access has been denied.
- *   AuthResultAccessGranted   Client has the right to use the
- *                             virtual machine.
- *   AuthResultDelegateToGuest Guest operating system must
- *                             authenticate the client and the
- *                             library must be called again with
- *                             the result of the guest
- *                             authentication.
- *
- * Note: When 'fLogon' is 0, only pszCaller, pUuid and clientId are valid and the return
- *       code is ignored.
+ * @param  pszCaller        The name of the component which calls the library (UTF8).
+ * @param  pUuid            Pointer to the UUID of the accessed virtual machine. Can be NULL.
+ * @param  guestJudgement   Result of the guest authentication.
+ * @param  pszUser          User name passed in by the client (UTF8).
+ * @param  pszPassword      Password passed in by the client (UTF8).
+ * @param  pszDomain        Domain passed in by the client (UTF8).
+ * @param  fLogon           Boolean flag. Indicates whether the entry point is
+ *                          called for a client logon or the client disconnect.
+ * @param  clientId         Server side unique identifier of the client.
+ *
+ * @retval AuthResultAccessDenied    Client access has been denied.
+ * @retval AuthResultAccessGranted   Client has the right to use the
+ *                                   virtual machine.
+ * @retval AuthResultDelegateToGuest Guest operating system must
+ *                                   authenticate the client and the
+ *                                   library must be called again with
+ *                                   the result of the guest
+ *                                   authentication.
+ *
+ * @note When @a fLogon is 0, only @a pszCaller, @a pUuid and @a clientId are
+ *       valid and the return code is ignored.
  */
-typedef AuthResult AUTHCALL AUTHENTRY3(const char *szCaller,
-                                       PAUTHUUID pUuid,
-                                       AuthGuestJudgement guestJudgement,
-                                       const char *szUser,
-                                       const char *szPassword,
-                                       const char *szDomain,
-                                       int fLogon,
-                                       unsigned clientId);
-
-
-typedef AUTHENTRY3 *PAUTHENTRY3;
-
+typedef AuthResult AUTHCALL FNAUTHENTRY3(const char *pszCaller,
+                                         PAUTHUUID pUuid,
+                                         AuthGuestJudgement guestJudgement,
+                                         const char *pszUser,
+                                         const char *pszPassword,
+                                         const char *pszDomain,
+                                         int fLogon,
+                                         unsigned clientId);
+/** Pointer to a FNAUTHENTRY3 function. */
+typedef FNAUTHENTRY3 *PFNAUTHENTRY3;
+/** @deprecated */
+typedef FNAUTHENTRY3  AUTHENTRY3;
+/** @deprecated */
+typedef PFNAUTHENTRY3 PAUTHENTRY3;
+
+/** Name of the FNAUTHENTRY3 entry point. */
 #define AUTHENTRY3_NAME "AuthEntry"
 
+/** @} */
+
 #endif
diff --git a/include/VBox/VBoxCocoa.h b/include/VBox/VBoxCocoa.h
index c28aecc..abc5d5c 100644
--- a/include/VBox/VBoxCocoa.h
+++ b/include/VBox/VBoxCocoa.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/VBoxCrHgsmi.h b/include/VBox/VBoxCrHgsmi.h
index 518842b..82c1984 100644
--- a/include/VBox/VBoxCrHgsmi.h
+++ b/include/VBox/VBoxCrHgsmi.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -38,13 +38,14 @@ RT_C_DECLS_BEGIN
 # define VBOXCRHGSMI_DECL(a_Type) a_Type RTCALL
 #endif
 
-VBOXCRHGSMI_DECL(int) VBoxCrHgsmiInit();
+VBOXCRHGSMI_DECL(int) VBoxCrHgsmiInit(void);
 VBOXCRHGSMI_DECL(PVBOXUHGSMI) VBoxCrHgsmiCreate(void);
 VBOXCRHGSMI_DECL(void) VBoxCrHgsmiDestroy(PVBOXUHGSMI pHgsmi);
 VBOXCRHGSMI_DECL(int) VBoxCrHgsmiTerm(void);
 
 VBOXCRHGSMI_DECL(int) VBoxCrHgsmiCtlConGetClientID(PVBOXUHGSMI pHgsmi, uint32_t *pu32ClientID);
 VBOXCRHGSMI_DECL(int) VBoxCrHgsmiCtlConGetHostCaps(PVBOXUHGSMI pHgsmi, uint32_t *pu32HostCaps);
+struct VBoxGuestHGCMCallInfo;
 VBOXCRHGSMI_DECL(int) VBoxCrHgsmiCtlConCall(PVBOXUHGSMI pHgsmi, struct VBoxGuestHGCMCallInfo *pCallInfo, int cbCallInfo);
 
 RT_C_DECLS_END
diff --git a/include/VBox/VBoxDrvCfg-win.h b/include/VBox/VBoxDrvCfg-win.h
index 6e60372..5ee81f4 100644
--- a/include/VBox/VBoxDrvCfg-win.h
+++ b/include/VBox/VBoxDrvCfg-win.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@
 #ifndef ___VBox_VBoxDrvCfg_win_h
 #define ___VBox_VBoxDrvCfg_win_h
 
-#include <Windows.h>
+#include <iprt/win/windows.h>
 #include <VBox/cdefs.h>
 
 RT_C_DECLS_BEGIN
diff --git a/include/VBox/VBoxGL2D.h b/include/VBox/VBoxGL2D.h
index d1fab66..c7ab374 100644
--- a/include/VBox/VBoxGL2D.h
+++ b/include/VBox/VBoxGL2D.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/VBoxGuest.h b/include/VBox/VBoxGuest.h
index 5e1b19e..431a238 100644
--- a/include/VBox/VBoxGuest.h
+++ b/include/VBox/VBoxGuest.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -197,7 +197,7 @@ typedef const VBGLBIGREQ *PCVBGLBIGREQ;
 # define VBOXGUEST_IOCTL_CODE_FAST_(Function)       (0x56420000 | (Function))
 # define VBOXGUEST_IOCTL_STRIP_SIZE(Code)           (Code)
 
-#elif defined(RT_OS_FREEBSD) /** @todo r=bird: Please do it like SUPDRVIOC to keep it as similar as possible. */
+#elif defined(RT_OS_FREEBSD) || defined(RT_OS_NETBSD) /** @todo r=bird: Please do it like SUPDRVIOC to keep it as similar as possible. */
 # include <sys/ioccom.h>
 
 # define VBOXGUEST_IOCTL_CODE_(Function, Size)      _IOWR('V', (Function), VBGLBIGREQ)
diff --git a/include/VBox/VBoxGuest2.h b/include/VBox/VBoxGuest2.h
index a2032c7..6bd1f30 100644
--- a/include/VBox/VBoxGuest2.h
+++ b/include/VBox/VBoxGuest2.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/VBoxGuestLib.h b/include/VBox/VBoxGuestLib.h
index 56813ba..a6bd49d 100644
--- a/include/VBox/VBoxGuestLib.h
+++ b/include/VBox/VBoxGuestLib.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/VBoxGuestLibSharedFolders.h b/include/VBox/VBoxGuestLibSharedFolders.h
index 6e2001e..8cd1ccb 100644
--- a/include/VBox/VBoxGuestLibSharedFolders.h
+++ b/include/VBox/VBoxGuestLibSharedFolders.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/VBoxGuestMangling.h b/include/VBox/VBoxGuestMangling.h
index 8f3563e..508c55d 100644
--- a/include/VBox/VBoxGuestMangling.h
+++ b/include/VBox/VBoxGuestMangling.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/VBoxNetCfg-win.h b/include/VBox/VBoxNetCfg-win.h
index 6cd8009..0971903 100644
--- a/include/VBox/VBoxNetCfg-win.h
+++ b/include/VBox/VBoxNetCfg-win.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -36,10 +36,10 @@
  */
 #define VBOXNETCFG_DELAYEDRENAME
 
-#include <winsock2.h>
-#include <Windows.h>
+#include <iprt/win/winsock2.h>
+#include <iprt/win/windows.h>
 #include <Netcfgn.h>
-#include <Setupapi.h>
+#include <iprt/win/Setupapi.h>
 #include <VBox/cdefs.h>
 
 /** @defgroup grp_vboxnetcfgwin     The Windows Network Configration Library
diff --git a/include/VBox/VBoxNetCmn-win.h b/include/VBox/VBoxNetCmn-win.h
index bd8ddc0..d6c57fd 100644
--- a/include/VBox/VBoxNetCmn-win.h
+++ b/include/VBox/VBoxNetCmn-win.h
@@ -2,8 +2,9 @@
 /** @file
  * VBoxNetCmn-win.h - NDIS6 Networking Driver Common Definitions, Windows-specific code.
  */
+
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -25,8 +26,9 @@
 
 DECLHIDDEN(void) vboxNetCmnWinDumpOidRequest(const char *pcszFunction, PNDIS_OID_REQUEST pRequest)
 {
-    char *pszType = "unknown";
-    char *pszOid  = "unknown";
+#ifdef LOG_ENABLED
+    const char *pszType;
+    const char *pszOid  = "unknown";
 
     switch (pRequest->RequestType)
     {
@@ -34,6 +36,7 @@ DECLHIDDEN(void) vboxNetCmnWinDumpOidRequest(const char *pcszFunction, PNDIS_OID
         case NdisRequestMethod: pszType = "method"; break;
         case NdisRequestQueryInformation: pszType = "query info"; break;
         case NdisRequestQueryStatistics: pszType = "query stats"; break;
+        default: pszType = "unknown";
     }
     switch (pRequest->DATA.SET_INFORMATION.Oid)
     {
@@ -133,4 +136,7 @@ DECLHIDDEN(void) vboxNetCmnWinDumpOidRequest(const char *pcszFunction, PNDIS_OID
         case OID_PNP_WAKE_UP_ERROR: pszOid = "OID_PNP_WAKE_UP_ERROR"; break;
     }
     Log(("%s: %s(0x%x) %s(0x%x)\n", pcszFunction, pszType, pRequest->RequestType, pszOid, pRequest->DATA.SET_INFORMATION.Oid));
+#else
+    RT_NOREF2(pcszFunction, pRequest);
+#endif
 }
diff --git a/include/VBox/VBoxOGL.h b/include/VBox/VBoxOGL.h
index 996c67c..ce59b5d 100644
--- a/include/VBox/VBoxOGL.h
+++ b/include/VBox/VBoxOGL.h
@@ -3,7 +3,7 @@
  * VBox 3D Support API
  */
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/VBoxTpG.h b/include/VBox/VBoxTpG.h
index fd26b46..3d09c64 100644
--- a/include/VBox/VBoxTpG.h
+++ b/include/VBox/VBoxTpG.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/VBoxUhgsmi.h b/include/VBox/VBoxUhgsmi.h
index 7e874f3..61e7d30 100644
--- a/include/VBox/VBoxUhgsmi.h
+++ b/include/VBox/VBoxUhgsmi.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/VBoxVideo.h b/include/VBox/VBoxVideo.h
index 735ea88..e08e3f3 100644
--- a/include/VBox/VBoxVideo.h
+++ b/include/VBox/VBoxVideo.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/VBoxVideo3D.h b/include/VBox/VBoxVideo3D.h
index 671ef46..f3f508b 100644
--- a/include/VBox/VBoxVideo3D.h
+++ b/include/VBox/VBoxVideo3D.h
@@ -1,10 +1,9 @@
 /** @file
- *
  * VirtualBox 3D common tooling
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -94,6 +93,7 @@ struct VBOXTLSREFDATA_DUMMY
 #define VBoxTlsRefAddRef(_p) do { \
         int cRefs = ASMAtomicIncS32(&(_p)->cTlsRefs); \
         VBoxTlsRefAssertImpl(cRefs > 1 || (_p)->enmTlsRefState == VBOXTLSREFDATA_STATE_DESTROYING); \
+        RT_NOREF(cRefs); \
     } while (0)
 
 #define VBoxTlsRefCountGet(_p) (ASMAtomicReadS32(&(_p)->cTlsRefs))
diff --git a/include/VBox/VBoxVideoGuest.h b/include/VBox/VBoxVideoGuest.h
index b4448e9..b935924 100644
--- a/include/VBox/VBoxVideoGuest.h
+++ b/include/VBox/VBoxVideoGuest.h
@@ -1,11 +1,10 @@
 /** @file
- *
  * VBox Host Guest Shared Memory Interface (HGSMI).
  * OS-independent guest structures.
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -26,19 +25,17 @@
  */
 
 
-#ifndef __HGSMI_GUEST_h__
-#define __HGSMI_GUEST_h__
+#ifndef ___VBox_VBoxVideoGuest_h___
+#define ___VBox_VBoxVideoGuest_h___
 
 #include <VBox/HGSMI/HGSMI.h>
 #include <VBox/HGSMI/HGSMIChSetup.h>
 #include <VBox/VBoxVideo.h>
 
 #ifdef VBOX_XPDM_MINIPORT
-RT_C_DECLS_BEGIN
-# include "miniport.h"
-# include "ntddvdeo.h"
-# include <Video.h>
-RT_C_DECLS_END
+# include <iprt/nt/miniport.h>
+# include <ntddvdeo.h> /* sdk, clean */
+# include <iprt/nt/Video.h>
 #elif defined VBOX_GUESTR3XORGMOD
 # include <compiler.h>
 #else
@@ -204,95 +201,95 @@ DECLINLINE(void) VBoxHGSMIClearIrq(PHGSMIHOSTCOMMANDCONTEXT pCtx)
     VBoxVideoCmnPortWriteUlong(pCtx->port, HGSMIOFFSET_VOID);
 }
 
-RTDECL(void)     VBoxHGSMIHostCmdComplete(PHGSMIHOSTCOMMANDCONTEXT pCtx,
-                                          void *pvMem);
-RTDECL(void)     VBoxHGSMIProcessHostQueue(PHGSMIHOSTCOMMANDCONTEXT pCtx);
-RTDECL(bool)     VBoxHGSMIIsSupported(void);
-RTDECL(void *)   VBoxHGSMIBufferAlloc(PHGSMIGUESTCOMMANDCONTEXT pCtx,
-                                      HGSMISIZE cbData,
-                                      uint8_t u8Ch,
-                                      uint16_t u16Op);
-RTDECL(void)     VBoxHGSMIBufferFree(PHGSMIGUESTCOMMANDCONTEXT pCtx,
-                                     void *pvBuffer);
-RTDECL(int)      VBoxHGSMIBufferSubmit(PHGSMIGUESTCOMMANDCONTEXT pCtx,
-                                       void *pvBuffer);
-RTDECL(void)     VBoxHGSMIGetBaseMappingInfo(uint32_t cbVRAM,
-                                             uint32_t *poffVRAMBaseMapping,
-                                             uint32_t *pcbMapping,
-                                             uint32_t *poffGuestHeapMemory,
-                                             uint32_t *pcbGuestHeapMemory,
-                                             uint32_t *poffHostFlags);
-RTDECL(int)      VBoxHGSMIReportFlagsLocation(PHGSMIGUESTCOMMANDCONTEXT pCtx,
-                                              HGSMIOFFSET offLocation);
-RTDECL(int)      VBoxHGSMISendCapsInfo(PHGSMIGUESTCOMMANDCONTEXT pCtx,
-                                       uint32_t fCaps);
+DECLHIDDEN(void)     VBoxHGSMIHostCmdComplete(PHGSMIHOSTCOMMANDCONTEXT pCtx,
+                                              void *pvMem);
+DECLHIDDEN(void)     VBoxHGSMIProcessHostQueue(PHGSMIHOSTCOMMANDCONTEXT pCtx);
+DECLHIDDEN(bool)     VBoxHGSMIIsSupported(void);
+DECLHIDDEN(void *)   VBoxHGSMIBufferAlloc(PHGSMIGUESTCOMMANDCONTEXT pCtx,
+                                          HGSMISIZE cbData,
+                                          uint8_t u8Ch,
+                                          uint16_t u16Op);
+DECLHIDDEN(void)     VBoxHGSMIBufferFree(PHGSMIGUESTCOMMANDCONTEXT pCtx,
+                                         void *pvBuffer);
+DECLHIDDEN(int)      VBoxHGSMIBufferSubmit(PHGSMIGUESTCOMMANDCONTEXT pCtx,
+                                           void *pvBuffer);
+DECLHIDDEN(void)     VBoxHGSMIGetBaseMappingInfo(uint32_t cbVRAM,
+                                                 uint32_t *poffVRAMBaseMapping,
+                                                 uint32_t *pcbMapping,
+                                                 uint32_t *poffGuestHeapMemory,
+                                                 uint32_t *pcbGuestHeapMemory,
+                                                 uint32_t *poffHostFlags);
+DECLHIDDEN(int)      VBoxHGSMIReportFlagsLocation(PHGSMIGUESTCOMMANDCONTEXT pCtx,
+                                                  HGSMIOFFSET offLocation);
+DECLHIDDEN(int)      VBoxHGSMISendCapsInfo(PHGSMIGUESTCOMMANDCONTEXT pCtx,
+                                           uint32_t fCaps);
 /** @todo we should provide a cleanup function too as part of the API */
-RTDECL(int)      VBoxHGSMISetupGuestContext(PHGSMIGUESTCOMMANDCONTEXT pCtx,
-                                            void *pvGuestHeapMemory,
-                                            uint32_t cbGuestHeapMemory,
-                                            uint32_t offVRAMGuestHeapMemory,
-                                            const HGSMIENV *pEnv);
-RTDECL(void)     VBoxHGSMIGetHostAreaMapping(PHGSMIGUESTCOMMANDCONTEXT pCtx,
-                                             uint32_t cbVRAM,
-                                             uint32_t offVRAMBaseMapping,
-                                             uint32_t *poffVRAMHostArea,
-                                             uint32_t *pcbHostArea);
-RTDECL(void)     VBoxHGSMISetupHostContext(PHGSMIHOSTCOMMANDCONTEXT pCtx,
-                                           void *pvBaseMapping,
-                                           uint32_t offHostFlags,
-                                           void *pvHostAreaMapping,
-                                           uint32_t offVRAMHostArea,
-                                           uint32_t cbHostArea);
-RTDECL(int)      VBoxHGSMISendHostCtxInfo(PHGSMIGUESTCOMMANDCONTEXT pCtx,
-                                          HGSMIOFFSET offVRAMFlagsLocation,
-                                          uint32_t fCaps,
-                                          uint32_t offVRAMHostArea,
-                                          uint32_t cbHostArea);
-RTDECL(int)      VBoxQueryConfHGSMI(PHGSMIGUESTCOMMANDCONTEXT pCtx,
+DECLHIDDEN(int)      VBoxHGSMISetupGuestContext(PHGSMIGUESTCOMMANDCONTEXT pCtx,
+                                                void *pvGuestHeapMemory,
+                                                uint32_t cbGuestHeapMemory,
+                                                uint32_t offVRAMGuestHeapMemory,
+                                                const HGSMIENV *pEnv);
+DECLHIDDEN(void)     VBoxHGSMIGetHostAreaMapping(PHGSMIGUESTCOMMANDCONTEXT pCtx,
+                                                 uint32_t cbVRAM,
+                                                 uint32_t offVRAMBaseMapping,
+                                                 uint32_t *poffVRAMHostArea,
+                                                 uint32_t *pcbHostArea);
+DECLHIDDEN(void)     VBoxHGSMISetupHostContext(PHGSMIHOSTCOMMANDCONTEXT pCtx,
+                                               void *pvBaseMapping,
+                                               uint32_t offHostFlags,
+                                               void *pvHostAreaMapping,
+                                               uint32_t offVRAMHostArea,
+                                               uint32_t cbHostArea);
+DECLHIDDEN(int)      VBoxHGSMISendHostCtxInfo(PHGSMIGUESTCOMMANDCONTEXT pCtx,
+                                              HGSMIOFFSET offVRAMFlagsLocation,
+                                              uint32_t fCaps,
+                                              uint32_t offVRAMHostArea,
+                                              uint32_t cbHostArea);
+DECLHIDDEN(int)      VBoxQueryConfHGSMI(PHGSMIGUESTCOMMANDCONTEXT pCtx,
                                     uint32_t u32Index, uint32_t *pulValue);
-RTDECL(int)      VBoxQueryConfHGSMIDef(PHGSMIGUESTCOMMANDCONTEXT pCtx,
-                                       uint32_t u32Index, uint32_t u32DefValue, uint32_t *pulValue);
-RTDECL(int)      VBoxHGSMIUpdatePointerShape(PHGSMIGUESTCOMMANDCONTEXT pCtx,
-                                             uint32_t fFlags,
-                                             uint32_t cHotX,
-                                             uint32_t cHotY,
-                                             uint32_t cWidth,
-                                             uint32_t cHeight,
-                                             uint8_t *pPixels,
-                                             uint32_t cbLength);
-RTDECL(int)      VBoxHGSMICursorPosition(PHGSMIGUESTCOMMANDCONTEXT pCtx, bool fReportPosition, uint32_t x, uint32_t y,
-                                         uint32_t *pxHost, uint32_t *pyHost);
+DECLHIDDEN(int)      VBoxQueryConfHGSMIDef(PHGSMIGUESTCOMMANDCONTEXT pCtx,
+                                           uint32_t u32Index, uint32_t u32DefValue, uint32_t *pulValue);
+DECLHIDDEN(int)      VBoxHGSMIUpdatePointerShape(PHGSMIGUESTCOMMANDCONTEXT pCtx,
+                                                 uint32_t fFlags,
+                                                 uint32_t cHotX,
+                                                 uint32_t cHotY,
+                                                 uint32_t cWidth,
+                                                 uint32_t cHeight,
+                                                 uint8_t *pPixels,
+                                                 uint32_t cbLength);
+DECLHIDDEN(int)      VBoxHGSMICursorPosition(PHGSMIGUESTCOMMANDCONTEXT pCtx, bool fReportPosition, uint32_t x, uint32_t y,
+                                             uint32_t *pxHost, uint32_t *pyHost);
 
 /** @}  */
 
 /** @name VBVA APIs
  * @{ */
-RTDECL(bool) VBoxVBVAEnable(PVBVABUFFERCONTEXT pCtx,
-                            PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx,
-                            struct VBVABUFFER *pVBVA, int32_t cScreen);
-RTDECL(void) VBoxVBVADisable(PVBVABUFFERCONTEXT pCtx,
-                             PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx,
-                             int32_t cScreen);
-RTDECL(bool) VBoxVBVABufferBeginUpdate(PVBVABUFFERCONTEXT pCtx,
-                                       PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx);
-RTDECL(void) VBoxVBVABufferEndUpdate(PVBVABUFFERCONTEXT pCtx);
-RTDECL(bool) VBoxVBVAWrite(PVBVABUFFERCONTEXT pCtx,
-                           PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx,
-                           const void *pv, uint32_t cb);
-RTDECL(bool) VBoxVBVAOrderSupported(PVBVABUFFERCONTEXT pCtx, unsigned code);
-RTDECL(void) VBoxVBVASetupBufferContext(PVBVABUFFERCONTEXT pCtx,
-                                        uint32_t offVRAMBuffer,
-                                        uint32_t cbBuffer);
+DECLHIDDEN(bool) VBoxVBVAEnable(PVBVABUFFERCONTEXT pCtx,
+                                PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx,
+                                struct VBVABUFFER *pVBVA, int32_t cScreen);
+DECLHIDDEN(void) VBoxVBVADisable(PVBVABUFFERCONTEXT pCtx,
+                                 PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx,
+                                 int32_t cScreen);
+DECLHIDDEN(bool) VBoxVBVABufferBeginUpdate(PVBVABUFFERCONTEXT pCtx,
+                                           PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx);
+DECLHIDDEN(void) VBoxVBVABufferEndUpdate(PVBVABUFFERCONTEXT pCtx);
+DECLHIDDEN(bool) VBoxVBVAWrite(PVBVABUFFERCONTEXT pCtx,
+                               PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx,
+                               const void *pv, uint32_t cb);
+DECLHIDDEN(bool) VBoxVBVAOrderSupported(PVBVABUFFERCONTEXT pCtx, unsigned code);
+DECLHIDDEN(void) VBoxVBVASetupBufferContext(PVBVABUFFERCONTEXT pCtx,
+                                            uint32_t offVRAMBuffer,
+                                            uint32_t cbBuffer);
 
 /** @}  */
 
 /** @name Modesetting APIs
  * @{ */
 
-RTDECL(uint32_t) VBoxHGSMIGetMonitorCount(PHGSMIGUESTCOMMANDCONTEXT pCtx);
-RTDECL(uint32_t) VBoxVideoGetVRAMSize(void);
-RTDECL(bool)     VBoxVideoAnyWidthAllowed(void);
-RTDECL(uint16_t) VBoxHGSMIGetScreenFlags(PHGSMIGUESTCOMMANDCONTEXT pCtx);
+DECLHIDDEN(uint32_t) VBoxHGSMIGetMonitorCount(PHGSMIGUESTCOMMANDCONTEXT pCtx);
+DECLHIDDEN(uint32_t) VBoxVideoGetVRAMSize(void);
+DECLHIDDEN(bool)     VBoxVideoAnyWidthAllowed(void);
+DECLHIDDEN(uint16_t) VBoxHGSMIGetScreenFlags(PHGSMIGUESTCOMMANDCONTEXT pCtx);
 
 struct VBVAINFOVIEW;
 /**
@@ -311,37 +308,38 @@ typedef DECLCALLBACK(int) FNHGSMIFILLVIEWINFO(void *pvData,
 /** Pointer to a FNHGSMIFILLVIEWINFO callback */
 typedef FNHGSMIFILLVIEWINFO *PFNHGSMIFILLVIEWINFO;
 
-RTDECL(int)      VBoxHGSMISendViewInfo(PHGSMIGUESTCOMMANDCONTEXT pCtx,
-                                       uint32_t u32Count,
-                                       PFNHGSMIFILLVIEWINFO pfnFill,
-                                       void *pvData);
-RTDECL(void)     VBoxVideoSetModeRegisters(uint16_t cWidth, uint16_t cHeight,
-                                           uint16_t cVirtWidth, uint16_t cBPP,
-                                           uint16_t fFlags,
-                                           uint16_t cx, uint16_t cy);
-RTDECL(bool)     VBoxVideoGetModeRegisters(uint16_t *pcWidth,
-                                           uint16_t *pcHeight,
-                                           uint16_t *pcVirtWidth,
-                                           uint16_t *pcBPP,
-                                           uint16_t *pfFlags);
-RTDECL(void)     VBoxVideoDisableVBE(void);
-RTDECL(void)     VBoxHGSMIProcessDisplayInfo(PHGSMIGUESTCOMMANDCONTEXT pCtx,
-                                             uint32_t cDisplay,
-                                             int32_t  cOriginX,
-                                             int32_t  cOriginY,
-                                             uint32_t offStart,
-                                             uint32_t cbPitch,
-                                             uint32_t cWidth,
-                                             uint32_t cHeight,
-                                             uint16_t cBPP,
-                                             uint16_t fFlags);
-RTDECL(int)      VBoxHGSMIUpdateInputMapping(PHGSMIGUESTCOMMANDCONTEXT pCtx, int32_t  cOriginX, int32_t  cOriginY,
-                                             uint32_t cWidth, uint32_t cHeight);
-RTDECL(int) VBoxHGSMIGetModeHints(PHGSMIGUESTCOMMANDCONTEXT pCtx,
-                                  unsigned cScreens, VBVAMODEHINT *paHints);
+DECLHIDDEN(int)      VBoxHGSMISendViewInfo(PHGSMIGUESTCOMMANDCONTEXT pCtx,
+                                           uint32_t u32Count,
+                                           PFNHGSMIFILLVIEWINFO pfnFill,
+                                           void *pvData);
+DECLHIDDEN(void)     VBoxVideoSetModeRegisters(uint16_t cWidth, uint16_t cHeight,
+                                               uint16_t cVirtWidth, uint16_t cBPP,
+                                               uint16_t fFlags,
+                                               uint16_t cx, uint16_t cy);
+DECLHIDDEN(bool)     VBoxVideoGetModeRegisters(uint16_t *pcWidth,
+                                               uint16_t *pcHeight,
+                                               uint16_t *pcVirtWidth,
+                                               uint16_t *pcBPP,
+                                               uint16_t *pfFlags);
+DECLHIDDEN(void)     VBoxVideoDisableVBE(void);
+DECLHIDDEN(void)     VBoxHGSMIProcessDisplayInfo(PHGSMIGUESTCOMMANDCONTEXT pCtx,
+                                                 uint32_t cDisplay,
+                                                 int32_t  cOriginX,
+                                                 int32_t  cOriginY,
+                                                 uint32_t offStart,
+                                                 uint32_t cbPitch,
+                                                 uint32_t cWidth,
+                                                 uint32_t cHeight,
+                                                 uint16_t cBPP,
+                                                 uint16_t fFlags);
+DECLHIDDEN(int)      VBoxHGSMIUpdateInputMapping(PHGSMIGUESTCOMMANDCONTEXT pCtx, int32_t  cOriginX, int32_t  cOriginY,
+                                                 uint32_t cWidth, uint32_t cHeight);
+DECLHIDDEN(int) VBoxHGSMIGetModeHints(PHGSMIGUESTCOMMANDCONTEXT pCtx,
+                                      unsigned cScreens, VBVAMODEHINT *paHints);
 
 /** @}  */
 
 RT_C_DECLS_END
 
-#endif /* __HGSMI_GUEST_h__*/
+#endif
+
diff --git a/include/VBox/VBoxVideoHost3D.h b/include/VBox/VBoxVideoHost3D.h
index 4d056d9..b96d0f4 100644
--- a/include/VBox/VBoxVideoHost3D.h
+++ b/include/VBox/VBoxVideoHost3D.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -147,8 +147,8 @@ typedef struct VBOXCRCMDCTL
     VBOXCRCMDCTL_CALLOUT_LIST CalloutList;
     union
     {
-        void(*pfnInternal)();
-        void* pvInternal;
+        void (*pfnInternal)(void);
+        void  *pvInternal;
     } u;
 } VBOXCRCMDCTL;
 
diff --git a/include/VBox/VDEPlug.h b/include/VBox/VDEPlug.h
index fc7c8d6..8bc9cda 100644
--- a/include/VBox/VDEPlug.h
+++ b/include/VBox/VDEPlug.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/VDEPlugSymDefs.h b/include/VBox/VDEPlugSymDefs.h
index 15bea6d..7d29b67 100644
--- a/include/VBox/VDEPlugSymDefs.h
+++ b/include/VBox/VDEPlugSymDefs.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/VMMDev.h b/include/VBox/VMMDev.h
index e19c9ab..59933fc 100644
--- a/include/VBox/VMMDev.h
+++ b/include/VBox/VMMDev.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -2110,14 +2110,14 @@ AssertCompileSize(VBVACMDHDR, 8);
 
 #define VBVA_MAX_RECORDS (64)
 
-#define VBVA_F_MODE_ENABLED         (0x00000001)
-#define VBVA_F_MODE_VRDP            (0x00000002)
-#define VBVA_F_MODE_VRDP_RESET      (0x00000004)
-#define VBVA_F_MODE_VRDP_ORDER_MASK (0x00000008)
+#define VBVA_F_MODE_ENABLED         UINT32_C(0x00000001)
+#define VBVA_F_MODE_VRDP            UINT32_C(0x00000002)
+#define VBVA_F_MODE_VRDP_RESET      UINT32_C(0x00000004)
+#define VBVA_F_MODE_VRDP_ORDER_MASK UINT32_C(0x00000008)
 
-#define VBVA_F_STATE_PROCESSING     (0x00010000)
+#define VBVA_F_STATE_PROCESSING     UINT32_C(0x00010000)
 
-#define VBVA_F_RECORD_PARTIAL       (0x80000000)
+#define VBVA_F_RECORD_PARTIAL       UINT32_C(0x80000000)
 /** @} */
 
 /**
diff --git a/include/VBox/VMMDev2.h b/include/VBox/VMMDev2.h
index 63cc7b9..0732d5a 100644
--- a/include/VBox/VMMDev2.h
+++ b/include/VBox/VMMDev2.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/VMMDevTesting.h b/include/VBox/VMMDevTesting.h
index bf482e5..d2b6251 100644
--- a/include/VBox/VMMDevTesting.h
+++ b/include/VBox/VMMDevTesting.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/apic.h b/include/VBox/apic.h
index c5bfb86..79eea58 100644
--- a/include/VBox/apic.h
+++ b/include/VBox/apic.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/asmdefs.mac b/include/VBox/asmdefs.mac
index a37c403..28a6c3b 100644
--- a/include/VBox/asmdefs.mac
+++ b/include/VBox/asmdefs.mac
@@ -3,7 +3,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/bioslogo.h b/include/VBox/bioslogo.h
index aaddf1d..0cd2ee3 100644
--- a/include/VBox/bioslogo.h
+++ b/include/VBox/bioslogo.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/cdefs.h b/include/VBox/cdefs.h
index a85b6e7..fe34760 100644
--- a/include/VBox/cdefs.h
+++ b/include/VBox/cdefs.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/com/AutoLock.h b/include/VBox/com/AutoLock.h
index 4fe0b9f..a5e8da6 100644
--- a/include/VBox/com/AutoLock.h
+++ b/include/VBox/com/AutoLock.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -178,6 +178,8 @@ public:
 private:
     struct Data;
     Data *m;
+
+    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(RWLockHandle); /* Shuts up MSC warning C4625. */
 };
 
 /**
@@ -213,6 +215,8 @@ public:
 private:
     struct Data;
     Data *m;
+
+    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(WriteLockHandle); /* Shuts up MSC warning C4625. */
 };
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -389,6 +393,9 @@ public:
 
     virtual void callLockImpl(LockHandle &l);
     virtual void callUnlockImpl(LockHandle &l);
+
+private:
+    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(AutoReadLock); /* Shuts up MSC warning C4625. */
 };
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -427,6 +434,9 @@ protected:
 
     virtual void callLockImpl(LockHandle &l);
     virtual void callUnlockImpl(LockHandle &l);
+
+private:
+    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(AutoWriteLockBase); /* Shuts up MSC warning C4625. */
 };
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -562,6 +572,9 @@ public:
 
     bool isWriteLockOnCurrentThread() const;
     uint32_t writeLockLevel() const;
+
+private:
+    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(AutoWriteLock); /* Shuts up MSC warning C4625. */
 };
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -588,6 +601,9 @@ public:
     {
         cleanup();
     }
+
+private:
+    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(AutoMultiWriteLock2); /* Shuts up MSC warning C4625. */
 };
 
 /**
@@ -610,6 +626,9 @@ public:
     {
         cleanup();
     }
+
+private:
+    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(AutoMultiWriteLock3); /* Shuts up MSC warning C4625. */
 };
 
 /**
@@ -634,6 +653,9 @@ public:
     {
         cleanup();
     }
+
+private:
+    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(AutoMultiWriteLock4); /* Shuts up MSC warning C4625. */
 };
 
 } /* namespace util */
diff --git a/include/VBox/com/ErrorInfo.h b/include/VBox/com/ErrorInfo.h
index fc6e231..1e9a51f 100644
--- a/include/VBox/com/ErrorInfo.h
+++ b/include/VBox/com/ErrorInfo.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/com/EventQueue.h b/include/VBox/com/EventQueue.h
index 80a13bd..7132ef3 100644
--- a/include/VBox/com/EventQueue.h
+++ b/include/VBox/com/EventQueue.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/com/Guid.h b/include/VBox/com/Guid.h
index 1396d85..5937805 100644
--- a/include/VBox/com/Guid.h
+++ b/include/VBox/com/Guid.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -323,7 +323,7 @@ public:
         if (mGuidState == GUID_INVALID)
         {
             /* What to return in case of wrong Guid */
-          return Bstr("00000000-0000-0000-0000-00000000000");
+            return Bstr("00000000-0000-0000-0000-00000000000");
         }
 
         RTUTF16 buf[RTUUID_STR_LENGTH];
diff --git a/include/VBox/com/MultiResult.h b/include/VBox/com/MultiResult.h
index 5a59497..6be5f8f 100644
--- a/include/VBox/com/MultiResult.h
+++ b/include/VBox/com/MultiResult.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -212,7 +212,7 @@ public:
 
 private:
 
-    DECLARE_CLS_NEW_DELETE_NOOP(MultiResult)
+    DECLARE_CLS_NEW_DELETE_NOOP(MultiResult);
 
     static void incCounter();
     static void decCounter();
@@ -251,7 +251,7 @@ public:
 
 private:
 
-    DECLARE_CLS_NEW_DELETE_NOOP (MultiResultRef)
+    DECLARE_CLS_NEW_DELETE_NOOP(MultiResultRef);
 
     HRESULT &mRC;
 };
diff --git a/include/VBox/com/NativeEventQueue.h b/include/VBox/com/NativeEventQueue.h
index 81efc0e..51c89be 100644
--- a/include/VBox/com/NativeEventQueue.h
+++ b/include/VBox/com/NativeEventQueue.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@
 #define ___VBox_com_EventQueue_h
 
 #ifndef VBOX_WITH_XPCOM
-# include <Windows.h>
+# include <iprt/win/windows.h>
 #else
 # include <nsEventQueueUtils.h>
 #endif
diff --git a/include/VBox/com/VirtualBox.h b/include/VBox/com/VirtualBox.h
index f32a16b..067b368 100644
--- a/include/VBox/com/VirtualBox.h
+++ b/include/VBox/com/VirtualBox.h
@@ -13,7 +13,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -37,13 +37,13 @@
 #define ___VBox_com_VirtualBox_h
 
 // generated VirtualBox COM library definition file
-#if !defined (VBOXCOM_NOINCLUDE)
-# if !defined (VBOX_WITH_XPCOM)
+#if !defined(VBOXCOM_NOINCLUDE)
+# if !defined(VBOX_WITH_XPCOM)
 #  include <VirtualBox.h>
 # else
 #  include <VirtualBox_XPCOM.h>
 # endif
-#endif // !defined (VBOXCOM_NOINCLUDE)
+#endif
 
 // for convenience
 #include "VBox/com/defs.h"
diff --git a/include/VBox/com/array.h b/include/VBox/com/array.h
index 8e20f5e..1c44810 100644
--- a/include/VBox/com/array.h
+++ b/include/VBox/com/array.h
@@ -879,9 +879,7 @@ public:
         }
 
         /** @todo Fix this! */
-        RT_GCC_NO_WARN_CONVERSION_BEGIN
-        m.size = aNewSize;
-        RT_GCC_NO_WARN_CONVERSION_END
+        m.size = (PRUint32)aNewSize;
 #else
         /* nothing to do here, SafeArrayCreate() has performed element
          * initialization */
@@ -1097,7 +1095,7 @@ public:
 
 protected:
 
-    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(SafeArray)
+    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(SafeArray);
 
     /**
      * Ensures that the array is big enough to contain aNewSize elements.
@@ -1149,9 +1147,7 @@ protected:
                         SafeArray::Uninit(m.arr[i]);
 
                     /** @todo Fix this! */
-                    RT_GCC_NO_WARN_CONVERSION_BEGIN
-                    m.size = aNewSize;
-                    RT_GCC_NO_WARN_CONVERSION_END
+                    m.size = (PRUint32)aNewSize;
                 }
 
                 /* Copy the old contents. */
@@ -1171,16 +1167,12 @@ protected:
                     SafeArray::Uninit(m.arr[i]);
 
                 /** @todo Fix this! */
-                RT_GCC_NO_WARN_CONVERSION_BEGIN
-                m.size = aNewSize;
-                RT_GCC_NO_WARN_CONVERSION_END
+                m.size = (PRUint32)aNewSize;
             }
         }
 
         /** @todo Fix this! */
-        RT_GCC_NO_WARN_CONVERSION_BEGIN
-        m.capacity = newCapacity;
-        RT_GCC_NO_WARN_CONVERSION_END
+        m.capacity = (PRUint32)newCapacity;
 
 #else
 
diff --git a/include/VBox/com/assert.h b/include/VBox/com/assert.h
index 517cbaa..52de082 100644
--- a/include/VBox/com/assert.h
+++ b/include/VBox/com/assert.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/com/com.h b/include/VBox/com/com.h
index 8231e78..27322d1 100644
--- a/include/VBox/com/com.h
+++ b/include/VBox/com/com.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2005-2015 Oracle Corporation
+ * Copyright (C) 2005-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/com/defs.h b/include/VBox/com/defs.h
index 905d273..a532fe6 100644
--- a/include/VBox/com/defs.h
+++ b/include/VBox/com/defs.h
@@ -74,26 +74,26 @@
 
 #if !defined(VBOX_WITH_XPCOM)
 
-#if defined(RT_OS_WINDOWS)
+#ifdef RT_OS_WINDOWS
 
 // Windows COM
 /////////////////////////////////////////////////////////////////////////////
 
-#include <objbase.h>
-#ifndef VBOX_COM_NO_ATL
+# include <iprt/win/objbase.h>
+# ifndef VBOX_COM_NO_ATL
 
 /* Do not use actual ATL, just provide a superficial lookalike ourselves. */
-# include <VBox/com/microatl.h>
-#endif /* VBOX_COM_NO_ATL */
+#  include <VBox/com/microatl.h>
+# endif /* VBOX_COM_NO_ATL */
 
-#define NS_DECL_ISUPPORTS
-#define NS_IMPL_ISUPPORTS1_CI(a, b)
+# define NS_DECL_ISUPPORTS
+# define NS_IMPL_ISUPPORTS1_CI(a, b)
 
 /* these are XPCOM only, one for every interface implemented */
-#define NS_DECL_ISUPPORTS
+# define NS_DECL_ISUPPORTS
 
 /** Returns @c true if @a rc represents a warning result code */
-#define SUCCEEDED_WARNING(rc)   (SUCCEEDED(rc) && (rc) != S_OK)
+# define SUCCEEDED_WARNING(rc)   (SUCCEEDED(rc) && (rc) != S_OK)
 
 /** Tests is a COM result code indicates that the process implementing the
  * interface is dead.
@@ -240,7 +240,13 @@ typedef const OLECHAR *CBSTR;
  * Gets size of safearray parameter.
  * @param aArg Parameter name.
  */
-#define ComSafeArraySize(aArg)  ((aArg) == NULL ? 0 : (aArg)->rgsabound[0].cElements)
+#define ComSafeArraySize(aArg)          ((aArg) == NULL ? 0 : (aArg)->rgsabound[0].cElements)
+
+/**
+ * Apply RT_NOREF_PV to a safearray parameter.
+ * @param aArg Parameter name.
+ */
+#define ComSafeArrayNoRef(aArg)         RT_NOREF_PV(aArg)
 
 /**
  *  Returns the const reference to the IID (i.e., |const GUID &|) of the given
@@ -351,8 +357,11 @@ typedef BSTR *LPBSTR;
 #define ComSafeGUIDArrayOutIsNull(aArg)     ComSafeArrayOutIsNull(aArg)
 #define ComSafeGUIDArrayOutArg(aArg)        ComSafeArrayOutArg(aArg)
 
-/* safearray size */
-#define ComSafeArraySize(aArg)  ((aArg) == NULL ? 0 : (aArg##Size))
+/** safearray size */
+#define ComSafeArraySize(aArg)              ((aArg) == NULL ? 0 : (aArg##Size))
+
+/** NOREF a COM safe array argument. */
+#define ComSafeArrayNoRef(aArg)             RT_NOREF2(aArg, aArg##Size)
 
 /* CLSID and IID for compatibility with Win32 */
 typedef nsCID   CLSID;
diff --git a/include/VBox/com/errorprint.h b/include/VBox/com/errorprint.h
index f55790b..228a18a 100644
--- a/include/VBox/com/errorprint.h
+++ b/include/VBox/com/errorprint.h
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -363,4 +363,3 @@ void GlueHandleComErrorProgress(ComPtr<IProgress> progress, const char *pcszCont
 
 /** @} */
 
-
diff --git a/include/VBox/com/list.h b/include/VBox/com/list.h
index c65dd9a..fc8c606 100644
--- a/include/VBox/com/list.h
+++ b/include/VBox/com/list.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/com/microatl.h b/include/VBox/com/microatl.h
index 2bab56a..b808f24 100644
--- a/include/VBox/com/microatl.h
+++ b/include/VBox/com/microatl.h
@@ -30,6 +30,10 @@
 #include <iprt/critsect.h>
 #include <iprt/err.h>
 
+#include <iprt/win/windows.h>
+
+#include <new>
+
 
 namespace ATL
 {
@@ -340,7 +344,7 @@ public:
         fInit = false;
 
         m_cLock = 0;
-	m_pTermFuncs = NULL;
+        m_pTermFuncs = NULL;
         _pAtlModule = this;
 
         if (FAILED(m_csStaticDataInitAndTypeInfo.Init()))
@@ -354,22 +358,22 @@ public:
     void Term() throw()
     {
         if (!fInit)
-	    return;
-
-	// Call all term functions.
-	if (m_pTermFuncs)
-	{
-	    _ATL_TERMFUNC_ELEM *p = m_pTermFuncs;
-	    _ATL_TERMFUNC_ELEM *pNext;
-	    while (p)
-	    {
-	        p->pfn(p->pv);
-		pNext = p->pNext;
-		delete p;
-		p = pNext;
-	    }
-	    m_pTermFuncs = NULL;
-	}
+            return;
+
+        // Call all term functions.
+        if (m_pTermFuncs)
+        {
+            _ATL_TERMFUNC_ELEM *p = m_pTermFuncs;
+            _ATL_TERMFUNC_ELEM *pNext;
+            while (p)
+            {
+                p->pfn(p->pv);
+                pNext = p->pNext;
+                delete p;
+                p = pNext;
+            }
+            m_pTermFuncs = NULL;
+        }
         m_csStaticDataInitAndTypeInfo.Term();
         fInit = false;
     }
@@ -396,32 +400,24 @@ public:
 
     HRESULT AddTermFunc(PFNATLTERMFUNC pfn, void *pv)
     {
-	HRESULT hrc = S_OK;
-	_ATL_TERMFUNC_ELEM *pNew = NULL;
-        try
+        _ATL_TERMFUNC_ELEM *pNew = new(std::nothrow) _ATL_TERMFUNC_ELEM;
+        if (!pNew)
+            return E_OUTOFMEMORY;
+        pNew->pfn = pfn;
+        pNew->pv = pv;
+        CComCritSectLock<CComCriticalSection> lock(m_csStaticDataInitAndTypeInfo, false);
+        HRESULT hrc = lock.Lock();
+        if (SUCCEEDED(hrc))
         {
-            pNew = new _ATL_TERMFUNC_ELEM;
+            pNew->pNext = m_pTermFuncs;
+            m_pTermFuncs = pNew;
         }
-        catch (...)
+        else
         {
-        }
-	if (!pNew)
-	    return E_OUTOFMEMORY;
-	pNew->pfn = pfn;
-	pNew->pv = pv;
-        CComCritSectLock<CComCriticalSection> lock(m_csStaticDataInitAndTypeInfo, false);
-        hrc = lock.Lock();
-	if (SUCCEEDED(hrc))
-	{
-	    pNew->pNext = m_pTermFuncs;
-	    m_pTermFuncs = pNew;
-	}
-	else
-	{
-	    delete pNew;
+            delete pNew;
             AssertMsgFailed(("CComModule::AddTermFunc: failed to lock critsect\n"));
         }
-	return hrc;
+        return hrc;
     }
 
 protected:
@@ -511,6 +507,8 @@ public:
     _ATL_OBJMAP_ENTRY *m_pObjMap;
     HRESULT Init(_ATL_OBJMAP_ENTRY *p, HINSTANCE h, const GUID *pLibID = NULL) throw()
     {
+        RT_NOREF1(h);
+
         if (pLibID)
             m_LibID = *pLibID;
 
@@ -559,7 +557,7 @@ public:
 
             while (pEntry->pclsid)
             {
-                if ((pEntry->pfnGetClassObject) && rclsid == *pEntry->pclsid)
+                if (pEntry->pfnGetClassObject && rclsid == *pEntry->pclsid)
                 {
                     if (!pEntry->pCF)
                     {
@@ -642,14 +640,7 @@ public:
         AssertReturn(ppv, E_POINTER);
         *ppv = NULL;
         HRESULT hrc = E_OUTOFMEMORY;
-        T *p = NULL;
-        try
-        {
-            p = new T(pv);
-        }
-        catch (...)
-        {
-        }
+        T *p = new(std::nothrow) T(pv);
         if (p)
         {
             p->SetVoid(pv);
@@ -743,14 +734,7 @@ public:
         *pp = NULL;
 
         HRESULT hrc = E_OUTOFMEMORY;
-        CComObjectCached<Base> *p = NULL;
-        try
-        {
-            p = new CComObjectCached<Base>();
-        }
-        catch (...)
-        {
-        }
+        CComObjectCached<Base> *p = new(std::nothrow) CComObjectCached<Base>();
         if (p)
         {
             p->SetVoid(NULL);
@@ -821,13 +805,16 @@ public:
     }
     HRESULT GetIDsOfNames(REFIID riid, LPOLESTR *pwszNames, UINT cNames, LCID lcid, DISPID *pDispID)
     {
+        RT_NOREF1(riid); /* should be IID_NULL */
         HRESULT hrc = FetchTI(lcid);
         if (m_pTInfo)
             hrc = m_pTInfo->GetIDsOfNames(pwszNames, cNames, pDispID);
         return hrc;
     }
-    HRESULT Invoke(IDispatch *p, DISPID DispID, REFIID riid, LCID lcid, WORD iFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
+    HRESULT Invoke(IDispatch *p, DISPID DispID, REFIID riid, LCID lcid, WORD iFlags, DISPPARAMS *pDispParams,
+                   VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
     {
+        RT_NOREF1(riid); /* should be IID_NULL */
         HRESULT hrc = FetchTI(lcid);
         if (m_pTInfo)
             hrc = m_pTInfo->Invoke(p, DispID, iFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
@@ -1002,10 +989,10 @@ public:
     {
         AssertPtrReturn(pThis, E_NOINTERFACE);
         IUnknown *pObj = *(IUnknown **)((DWORD_PTR)pThis + dw);
-	// If this assertion fails then the object has a delegation with a NULL
-	// object pointer, which is highly unusual often means that the pointer
-	// was not set up correctly. Check the COM interface map of the class
-	// for bugs with initializing.
+        // If this assertion fails then the object has a delegation with a NULL
+        // object pointer, which is highly unusual often means that the pointer
+        // was not set up correctly. Check the COM interface map of the class
+        // for bugs with initializing.
         AssertPtrReturn(pObj, E_NOINTERFACE);
         return pObj->QueryInterface(iid, ppvObj);
     }
@@ -1063,14 +1050,7 @@ public:
         *pp = NULL;
 
         HRESULT hrc = E_OUTOFMEMORY;
-        CComObject<Base> *p = NULL;
-        try
-        {
-            p = new CComObject<Base>();
-        }
-        catch (...)
-        {
-        }
+        CComObject<Base> *p = new(std::nothrow) CComObject<Base>();
         if (p)
         {
             p->InternalFinalConstructAddRef();
@@ -1216,14 +1196,7 @@ public:
         *pp = NULL;
 
         HRESULT hrc = E_OUTOFMEMORY;
-        CComAggObject<Aggregated> *p = NULL;
-        try
-        {
-            p = new CComAggObject<Aggregated>(pUnkOuter);
-        }
-        catch (...)
-        {
-        }
+        CComAggObject<Aggregated> *p = new(std::nothrow) CComAggObject<Aggregated>(pUnkOuter);
         if (p)
         {
             p->SetVoid(NULL);
diff --git a/include/VBox/com/mtlist.h b/include/VBox/com/mtlist.h
index 0643e69..f601b86 100644
--- a/include/VBox/com/mtlist.h
+++ b/include/VBox/com/mtlist.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/com/string.h b/include/VBox/com/string.h
index 4007dc8..d2bebef 100644
--- a/include/VBox/com/string.h
+++ b/include/VBox/com/string.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/dbg.h b/include/VBox/dbg.h
index 652fbc5..06f058b 100644
--- a/include/VBox/dbg.h
+++ b/include/VBox/dbg.h
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/dbggui.h b/include/VBox/dbggui.h
index 65c242a..74562cd 100644
--- a/include/VBox/dbggui.h
+++ b/include/VBox/dbggui.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/dbus-calls.h b/include/VBox/dbus-calls.h
index e793849..b5a87e2 100644
--- a/include/VBox/dbus-calls.h
+++ b/include/VBox/dbus-calls.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/dbus.h b/include/VBox/dbus.h
index b1ce6d8..5d68dac 100644
--- a/include/VBox/dbus.h
+++ b/include/VBox/dbus.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/dis.h b/include/VBox/dis.h
index dbaad76..d8c8f4c 100644
--- a/include/VBox/dis.h
+++ b/include/VBox/dis.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/hgcmsvc.h b/include/VBox/hgcmsvc.h
index b823292..fcd9561 100644
--- a/include/VBox/hgcmsvc.h
+++ b/include/VBox/hgcmsvc.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/intnet.h b/include/VBox/intnet.h
index f502801..a888852 100644
--- a/include/VBox/intnet.h
+++ b/include/VBox/intnet.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/intnetinline.h b/include/VBox/intnetinline.h
index 69da972..41b6929 100644
--- a/include/VBox/intnetinline.h
+++ b/include/VBox/intnetinline.h
@@ -8,7 +8,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/log.h b/include/VBox/log.h
index c41b323..059929c 100644
--- a/include/VBox/log.h
+++ b/include/VBox/log.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -121,8 +121,6 @@ typedef enum LOGGROUP
     LOG_GROUP_DEV_LPC,
     /** LsiLogic SCSI controller Device group. */
     LOG_GROUP_DEV_LSILOGICSCSI,
-    /** NE2000 Device group. */
-    LOG_GROUP_DEV_NE2000,
     /** NVMe Device group. */
     LOG_GROUP_DEV_NVME,
     /** USB OHCI Device group. */
@@ -841,7 +839,6 @@ typedef enum LOGGROUP
     "DEV_KBD",      \
     "DEV_LPC",      \
     "DEV_LSILOGICSCSI", \
-    "DEV_NE2000",   \
     "DEV_NVME",     \
     "DEV_OHCI",     \
     "DEV_PARALLEL", \
@@ -892,7 +889,7 @@ typedef enum LOGGROUP
     "DRV_RAW_IMAGE", \
     "DRV_SCSI",     \
     "DRV_SCSIHOST", \
-    "DRV_TELNETSERVER", \
+    "DRV_TCP", \
     "DRV_TRANSPORT_ASYNC", \
     "DRV_TUN",      \
     "DRV_UDP", \
diff --git a/include/VBox/msi.h b/include/VBox/msi.h
index 6f32fa7..26036df 100644
--- a/include/VBox/msi.h
+++ b/include/VBox/msi.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/nasm.mac b/include/VBox/nasm.mac
index 1c7c561..11fc730 100644
--- a/include/VBox/nasm.mac
+++ b/include/VBox/nasm.mac
@@ -5,7 +5,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/ostypes.h b/include/VBox/ostypes.h
index be1add7..2508b88 100644
--- a/include/VBox/ostypes.h
+++ b/include/VBox/ostypes.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/param.h b/include/VBox/param.h
index 35228c8..19b313e 100644
--- a/include/VBox/param.h
+++ b/include/VBox/param.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/pci.h b/include/VBox/pci.h
index c7fd5d8..e61fe45 100644
--- a/include/VBox/pci.h
+++ b/include/VBox/pci.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/rawpci.h b/include/VBox/rawpci.h
index 0a37e48..45e928f 100644
--- a/include/VBox/rawpci.h
+++ b/include/VBox/rawpci.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/refentry.h b/include/VBox/refentry.h
index 183f6f1..a424e8c 100644
--- a/include/VBox/refentry.h
+++ b/include/VBox/refentry.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/scsi.h b/include/VBox/scsi.h
index 87d5790..f7e4190 100644
--- a/include/VBox/scsi.h
+++ b/include/VBox/scsi.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/settings.h b/include/VBox/settings.h
index 26a40e6..7f8e69d 100644
--- a/include/VBox/settings.h
+++ b/include/VBox/settings.h
@@ -232,6 +232,7 @@ protected:
     typedef enum {Error, HardDisk, DVDImage, FloppyImage} MediaType;
 
     static const char *stringifyMediaType(MediaType t);
+    SettingsVersion_T parseVersion(const com::Utf8Str &strVersion);
     void parseUUID(com::Guid &guid,
                    const com::Utf8Str &strUUID) const;
     void parseTimestamp(RTTIMESPEC &timestamp,
diff --git a/include/VBox/shflsvc.h b/include/VBox/shflsvc.h
index 037763c..0a0f5139 100644
--- a/include/VBox/shflsvc.h
+++ b/include/VBox/shflsvc.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/sup.h b/include/VBox/sup.h
index eb6fa87..330c0d8 100644
--- a/include/VBox/sup.h
+++ b/include/VBox/sup.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/sup.mac b/include/VBox/sup.mac
index d6b774d..2023a92 100644
--- a/include/VBox/sup.mac
+++ b/include/VBox/sup.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/types.h b/include/VBox/types.h
index 7d9c97d..493acae 100644
--- a/include/VBox/types.h
+++ b/include/VBox/types.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/usb.h b/include/VBox/usb.h
index 94554e1..5ef3a45 100644
--- a/include/VBox/usb.h
+++ b/include/VBox/usb.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/usbfilter.h b/include/VBox/usbfilter.h
index 9b17ac6..0f03720 100644
--- a/include/VBox/usbfilter.h
+++ b/include/VBox/usbfilter.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -211,7 +211,7 @@ typedef USBFILTER *PUSBFILTER;
 typedef const USBFILTER *PCUSBFILTER;
 
 /** USBFILTER::u32Magic (Yasuhiro Nightow). */
-#define USBFILTER_MAGIC      0x19670408
+#define USBFILTER_MAGIC      UINT32_C(0x19670408)
 
 
 RT_C_DECLS_BEGIN
diff --git a/include/VBox/usblib-darwin.h b/include/VBox/usblib-darwin.h
index fec5cdb..9a80479 100644
--- a/include/VBox/usblib-darwin.h
+++ b/include/VBox/usblib-darwin.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/usblib-solaris.h b/include/VBox/usblib-solaris.h
index bd47420..3592495 100644
--- a/include/VBox/usblib-solaris.h
+++ b/include/VBox/usblib-solaris.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/usblib-win.h b/include/VBox/usblib-win.h
index 3719398..86f1a8f 100644
--- a/include/VBox/usblib-win.h
+++ b/include/VBox/usblib-win.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vd-cache-backend.h b/include/VBox/vd-cache-backend.h
index ec52fd3..1f4764f 100644
--- a/include/VBox/vd-cache-backend.h
+++ b/include/VBox/vd-cache-backend.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vd-filter-backend.h b/include/VBox/vd-filter-backend.h
index dc055cd..8baadd5 100644
--- a/include/VBox/vd-filter-backend.h
+++ b/include/VBox/vd-filter-backend.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vd-ifs-internal.h b/include/VBox/vd-ifs-internal.h
index 051e938..3848c47 100644
--- a/include/VBox/vd-ifs-internal.h
+++ b/include/VBox/vd-ifs-internal.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vd-ifs.h b/include/VBox/vd-ifs.h
index b153f85..9474655 100644
--- a/include/VBox/vd-ifs.h
+++ b/include/VBox/vd-ifs.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1146,7 +1146,7 @@ typedef struct VDINTERFACETCPNET
      * Destroys the socket.
      *
      * @return iprt status code.
-     * @param  Sock       Socket descriptor.
+     * @param  Sock       Socket handle (/ pointer).
      */
     DECLR3CALLBACKMEMBER(int, pfnSocketDestroy, (VDSOCKET Sock));
 
@@ -1154,7 +1154,7 @@ typedef struct VDINTERFACETCPNET
      * Connect as a client to a TCP port.
      *
      * @return  iprt status code.
-     * @param   Sock            Socket descriptor.
+     * @param   Sock            Socket handle (/ pointer)..
      * @param   pszAddress      The address to connect to.
      * @param   uPort           The port to connect to.
      * @param   cMillies        Number of milliseconds to wait for the connect attempt to complete.
@@ -1169,7 +1169,7 @@ typedef struct VDINTERFACETCPNET
      * Close a TCP connection.
      *
      * @return  iprt status code.
-     * @param   Sock            Socket descriptor.
+     * @param   Sock            Socket handle (/ pointer).
      */
     DECLR3CALLBACKMEMBER(int, pfnClientClose, (VDSOCKET Sock));
 
@@ -1178,7 +1178,7 @@ typedef struct VDINTERFACETCPNET
      *
      * @returns true if the socket is connected.
      *          false otherwise.
-     * @param   Sock        Socket descriptor.
+     * @param   Sock        Socket handle (/ pointer).
      */
     DECLR3CALLBACKMEMBER(bool, pfnIsClientConnected, (VDSOCKET Sock));
 
@@ -1187,7 +1187,7 @@ typedef struct VDINTERFACETCPNET
      * Checks if the socket is ready for reading.
      *
      * @return  iprt status code.
-     * @param   Sock        Socket descriptor.
+     * @param   Sock        Socket handle (/ pointer).
      * @param   cMillies    Number of milliseconds to wait for the socket.
      *                      Use RT_INDEFINITE_WAIT to wait for ever.
      */
@@ -1197,7 +1197,7 @@ typedef struct VDINTERFACETCPNET
      * Receive data from a socket.
      *
      * @return  iprt status code.
-     * @param   Sock        Socket descriptor.
+     * @param   Sock        Socket handle (/ pointer).
      * @param   pvBuffer    Where to put the data we read.
      * @param   cbBuffer    Read buffer size.
      * @param   pcbRead     Number of bytes read.
@@ -1210,7 +1210,7 @@ typedef struct VDINTERFACETCPNET
      * Send data to a socket.
      *
      * @return  iprt status code.
-     * @param   Sock        Socket descriptor.
+     * @param   Sock        Socket handle (/ pointer).
      * @param   pvBuffer    Buffer to write data to socket.
      * @param   cbBuffer    How much to write.
      */
@@ -1220,7 +1220,7 @@ typedef struct VDINTERFACETCPNET
      * Send data from scatter/gather buffer to a socket.
      *
      * @return  iprt status code.
-     * @param   Sock        Socket descriptor.
+     * @param   Sock        Socket handle (/ pointer).
      * @param   pSgBuffer   Scatter/gather buffer to write data to socket.
      */
     DECLR3CALLBACKMEMBER(int, pfnSgWrite, (VDSOCKET Sock, PCRTSGBUF pSgBuffer));
@@ -1229,7 +1229,7 @@ typedef struct VDINTERFACETCPNET
      * Receive data from a socket - not blocking.
      *
      * @return  iprt status code.
-     * @param   Sock        Socket descriptor.
+     * @param   Sock        Socket handle (/ pointer).
      * @param   pvBuffer    Where to put the data we read.
      * @param   cbBuffer    Read buffer size.
      * @param   pcbRead     Number of bytes read.
@@ -1240,7 +1240,7 @@ typedef struct VDINTERFACETCPNET
      * Send data to a socket - not blocking.
      *
      * @return  iprt status code.
-     * @param   Sock        Socket descriptor.
+     * @param   Sock        Socket handle (/ pointer).
      * @param   pvBuffer    Buffer to write data to socket.
      * @param   cbBuffer    How much to write.
      * @param   pcbWritten  Number of bytes written.
@@ -1251,7 +1251,7 @@ typedef struct VDINTERFACETCPNET
      * Send data from scatter/gather buffer to a socket - not blocking.
      *
      * @return  iprt status code.
-     * @param   Sock        Socket descriptor.
+     * @param   Sock        Socket handle (/ pointer).
      * @param   pSgBuffer   Scatter/gather buffer to write data to socket.
      * @param   pcbWritten  Number of bytes written.
      */
@@ -1261,7 +1261,7 @@ typedef struct VDINTERFACETCPNET
      * Flush socket write buffers.
      *
      * @return  iprt status code.
-     * @param   Sock        Socket descriptor.
+     * @param   Sock        Socket handle (/ pointer).
      */
     DECLR3CALLBACKMEMBER(int, pfnFlush, (VDSOCKET Sock));
 
@@ -1269,7 +1269,7 @@ typedef struct VDINTERFACETCPNET
      * Enables or disables delaying sends to coalesce packets.
      *
      * @return  iprt status code.
-     * @param   Sock        Socket descriptor.
+     * @param   Sock        Socket handle (/ pointer).
      * @param   fEnable     When set to true enables coalescing.
      */
     DECLR3CALLBACKMEMBER(int, pfnSetSendCoalescing, (VDSOCKET Sock, bool fEnable));
@@ -1278,7 +1278,7 @@ typedef struct VDINTERFACETCPNET
      * Gets the address of the local side.
      *
      * @return  iprt status code.
-     * @param   Sock        Socket descriptor.
+     * @param   Sock        Socket handle (/ pointer).
      * @param   pAddr       Where to store the local address on success.
      */
     DECLR3CALLBACKMEMBER(int, pfnGetLocalAddress, (VDSOCKET Sock, PRTNETADDR pAddr));
@@ -1287,7 +1287,7 @@ typedef struct VDINTERFACETCPNET
      * Gets the address of the other party.
      *
      * @return  iprt status code.
-     * @param   Sock        Socket descriptor.
+     * @param   Sock        Socket handle (/ pointer).
      * @param   pAddr       Where to store the peer address on success.
      */
     DECLR3CALLBACKMEMBER(int, pfnGetPeerAddress, (VDSOCKET Sock, PRTNETADDR pAddr));
@@ -1298,7 +1298,7 @@ typedef struct VDINTERFACETCPNET
      *
      * @return  iprt status code.
      * @retval  VERR_INTERRUPTED if the thread was woken up by a pfnPoke call.
-     * @param   Sock        Socket descriptor.
+     * @param   hVdSock     VD Socket handle(/pointer).
      * @param   fEvents     Mask of events to wait for.
      * @param   pfEvents    Where to store the received events.
      * @param   cMillies    Number of milliseconds to wait for the socket.
@@ -1311,7 +1311,7 @@ typedef struct VDINTERFACETCPNET
      * Wakes up the thread waiting in pfnSelectOneEx.
      *
      * @return iprt status code.
-     * @param  Sock        Socket descriptor.
+     * @param  hVdSock      VD Socket handle(/pointer).
      */
     DECLR3CALLBACKMEMBER(int, pfnPoke, (VDSOCKET Sock));
 
diff --git a/include/VBox/vd-image-backend.h b/include/VBox/vd-image-backend.h
index 12298f6..3eaf5e4 100644
--- a/include/VBox/vd-image-backend.h
+++ b/include/VBox/vd-image-backend.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vd-plugin.h b/include/VBox/vd-plugin.h
index db855bc..be376f2 100644
--- a/include/VBox/vd-plugin.h
+++ b/include/VBox/vd-plugin.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vddbg.h b/include/VBox/vddbg.h
index 809d46c..568d71c 100644
--- a/include/VBox/vddbg.h
+++ b/include/VBox/vddbg.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/version.h b/include/VBox/version.h
index 7cb15c1..c3c665a 100644
--- a/include/VBox/version.h
+++ b/include/VBox/version.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/cfgm.h b/include/VBox/vmm/cfgm.h
index f3834e4..90d37cc 100644
--- a/include/VBox/vmm/cfgm.h
+++ b/include/VBox/vmm/cfgm.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/cpum.h b/include/VBox/vmm/cpum.h
index 66bbf16..7c55121 100644
--- a/include/VBox/vmm/cpum.h
+++ b/include/VBox/vmm/cpum.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/cpum.mac b/include/VBox/vmm/cpum.mac
index a4efd77..c6d38bb 100644
--- a/include/VBox/vmm/cpum.mac
+++ b/include/VBox/vmm/cpum.mac
@@ -3,7 +3,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/cpumctx-v1_6.h b/include/VBox/vmm/cpumctx-v1_6.h
index 3222d8d..1860127 100644
--- a/include/VBox/vmm/cpumctx-v1_6.h
+++ b/include/VBox/vmm/cpumctx-v1_6.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/cpumctx.h b/include/VBox/vmm/cpumctx.h
index 3eb8355..4ea7122 100644
--- a/include/VBox/vmm/cpumctx.h
+++ b/include/VBox/vmm/cpumctx.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/cpumdis.h b/include/VBox/vmm/cpumdis.h
index 752080c..8f97233 100644
--- a/include/VBox/vmm/cpumdis.h
+++ b/include/VBox/vmm/cpumdis.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/csam.h b/include/VBox/vmm/csam.h
index a67f440..919ac92 100644
--- a/include/VBox/vmm/csam.h
+++ b/include/VBox/vmm/csam.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/dbgf.h b/include/VBox/vmm/dbgf.h
index cfaafbd..dffd5bc 100644
--- a/include/VBox/vmm/dbgf.h
+++ b/include/VBox/vmm/dbgf.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/dbgfcorefmt.h b/include/VBox/vmm/dbgfcorefmt.h
index 3fc57af..9000cd1 100644
--- a/include/VBox/vmm/dbgfcorefmt.h
+++ b/include/VBox/vmm/dbgfcorefmt.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/dbgfsel.h b/include/VBox/vmm/dbgfsel.h
index 2e86e8a..5577b23 100644
--- a/include/VBox/vmm/dbgfsel.h
+++ b/include/VBox/vmm/dbgfsel.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/dbgftrace.h b/include/VBox/vmm/dbgftrace.h
index 61db8e0..f6d1256 100644
--- a/include/VBox/vmm/dbgftrace.h
+++ b/include/VBox/vmm/dbgftrace.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/em.h b/include/VBox/vmm/em.h
index bff9ac6..5554307 100644
--- a/include/VBox/vmm/em.h
+++ b/include/VBox/vmm/em.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/ftm.h b/include/VBox/vmm/ftm.h
index 0c214e0..4351b64 100644
--- a/include/VBox/vmm/ftm.h
+++ b/include/VBox/vmm/ftm.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/gim.h b/include/VBox/vmm/gim.h
index 98bd7db..710af02 100644
--- a/include/VBox/vmm/gim.h
+++ b/include/VBox/vmm/gim.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -138,7 +138,7 @@ typedef struct GIMDEBUG
     /** The debug I/O stream driver. */
     PPDMISTREAM             pDbgDrvStream;
     /** Number of bytes pending to be read from the receive buffer. */
-    uint32_t                cbDbgRecvBufRead;
+    size_t                  cbDbgRecvBufRead;
     /** The flag synchronizing reads of the receive buffer from EMT. */
     volatile bool           fDbgRecvBufRead;
     /** The receive thread wakeup semaphore. */
diff --git a/include/VBox/vmm/gmm.h b/include/VBox/vmm/gmm.h
index ba1733e..18a086c 100644
--- a/include/VBox/vmm/gmm.h
+++ b/include/VBox/vmm/gmm.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/gvm.h b/include/VBox/vmm/gvm.h
index a7869d8..f1a5cdd 100644
--- a/include/VBox/vmm/gvm.h
+++ b/include/VBox/vmm/gvm.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/gvmm.h b/include/VBox/vmm/gvmm.h
index 2a75093..f36a5d5 100644
--- a/include/VBox/vmm/gvmm.h
+++ b/include/VBox/vmm/gvmm.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/hm.h b/include/VBox/vmm/hm.h
index b5a82c0..d991348 100644
--- a/include/VBox/vmm/hm.h
+++ b/include/VBox/vmm/hm.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/hm_svm.h b/include/VBox/vmm/hm_svm.h
index 853b0d0..5fccece 100644
--- a/include/VBox/vmm/hm_svm.h
+++ b/include/VBox/vmm/hm_svm.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/hm_vmx.h b/include/VBox/vmm/hm_vmx.h
index 543c70b..0783f82 100644
--- a/include/VBox/vmm/hm_vmx.h
+++ b/include/VBox/vmm/hm_vmx.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -34,7 +34,11 @@
 /* In Visual C++ versions prior to 2012, the vmx intrinsics are only available
    when targeting AMD64. */
 #if RT_INLINE_ASM_USES_INTRIN >= 16 && defined(RT_ARCH_AMD64)
+# pragma warning(push)
+# pragma warning(disable:4668) /* Several incorrect __cplusplus uses. */
+# pragma warning(disable:4255) /* Incorrect __slwpcb prototype. */
 # include <intrin.h>
+# pragma warning(pop)
 /* We always want them as intrinsics, no functions. */
 # pragma intrinsic(__vmx_on)
 # pragma intrinsic(__vmx_off)
diff --git a/include/VBox/vmm/hm_vmx.mac b/include/VBox/vmm/hm_vmx.mac
index 03beb6a..2f3bd30 100644
--- a/include/VBox/vmm/hm_vmx.mac
+++ b/include/VBox/vmm/hm_vmx.mac
@@ -3,7 +3,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/iem.h b/include/VBox/vmm/iem.h
index 17191c3..edc76f8 100644
--- a/include/VBox/vmm/iem.h
+++ b/include/VBox/vmm/iem.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/iom.h b/include/VBox/vmm/iom.h
index be320a8..de6225f 100644
--- a/include/VBox/vmm/iom.h
+++ b/include/VBox/vmm/iom.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/mm.h b/include/VBox/vmm/mm.h
index 08f5a3e..bbe0ed6 100644
--- a/include/VBox/vmm/mm.h
+++ b/include/VBox/vmm/mm.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/patm.h b/include/VBox/vmm/patm.h
index ea5fb35..4a79e11 100644
--- a/include/VBox/vmm/patm.h
+++ b/include/VBox/vmm/patm.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/pdm.h b/include/VBox/vmm/pdm.h
index 87cd2ad..267f6b1 100644
--- a/include/VBox/vmm/pdm.h
+++ b/include/VBox/vmm/pdm.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/pdmapi.h b/include/VBox/vmm/pdmapi.h
index 7e6f3ed..4a8428b 100644
--- a/include/VBox/vmm/pdmapi.h
+++ b/include/VBox/vmm/pdmapi.h
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/pdmasynccompletion.h b/include/VBox/vmm/pdmasynccompletion.h
index 9def396..13c1c3c 100644
--- a/include/VBox/vmm/pdmasynccompletion.h
+++ b/include/VBox/vmm/pdmasynccompletion.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/pdmasynctask.h b/include/VBox/vmm/pdmasynctask.h
index 7f0cd03..80daf6b 100644
--- a/include/VBox/vmm/pdmasynctask.h
+++ b/include/VBox/vmm/pdmasynctask.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/pdmaudioifs.h b/include/VBox/vmm/pdmaudioifs.h
index b9e83eb..59f2d0c 100644
--- a/include/VBox/vmm/pdmaudioifs.h
+++ b/include/VBox/vmm/pdmaudioifs.h
@@ -35,37 +35,38 @@
 # include <VBox/vmm/stam.h>
 #endif
 
-#ifdef VBOX_WITH_AUDIO_50
-# undef ___VBox_vmm_pdmaudioifs_h
-# include "pdmaudioifs_old.h"
-#else
-
 /** @defgroup grp_pdm_ifs_audio     PDM Audio Interfaces
  * @ingroup grp_pdm_interfaces
  * @{
  */
 
-/** @todo r=bird: Don't be lazy with documentation! */
+/** PDM audio driver instance flags. */
 typedef uint32_t PDMAUDIODRVFLAGS;
 
 /** No flags set. */
-/** @todo r=bird: s/PDMAUDIODRVFLAG/PDMAUDIODRV_FLAGS/g */
-#define PDMAUDIODRVFLAG_NONE        0
+#define PDMAUDIODRVFLAGS_NONE       0
 /** Marks a primary audio driver which is critical
  *  when running the VM. */
-#define PDMAUDIODRVFLAG_PRIMARY     RT_BIT(0)
+#define PDMAUDIODRVFLAGS_PRIMARY    RT_BIT(0)
 
 /**
  * Audio format in signed or unsigned variants.
  */
 typedef enum PDMAUDIOFMT
 {
+    /** Invalid format, do not use. */
     PDMAUDIOFMT_INVALID,
+    /** 8-bit, unsigned. */
     PDMAUDIOFMT_U8,
+    /** 8-bit, signed. */
     PDMAUDIOFMT_S8,
+    /** 16-bit, unsigned. */
     PDMAUDIOFMT_U16,
+    /** 16-bit, signed. */
     PDMAUDIOFMT_S16,
+    /** 32-bit, unsigned. */
     PDMAUDIOFMT_U32,
+    /** 32-bit, signed. */
     PDMAUDIOFMT_S32,
     /** Hack to blow the type up to 32-bit. */
     PDMAUDIOFMT_32BIT_HACK = 0x7fffffff
@@ -97,7 +98,9 @@ typedef struct PDMAUDIOBACKENDCFG
  */
 typedef struct PDMAUDIOSAMPLE
 {
+    /** Left channel. */
     int64_t i64LSample;
+    /** Right channel. */
     int64_t i64RSample;
 } PDMAUDIOSAMPLE;
 /** Pointer to a single (stereo) audio sample.   */
@@ -126,8 +129,11 @@ typedef enum PDMAUDIOENDIANNESS
  */
 typedef enum PDMAUDIODIR
 {
+    /** Unknown direction. */
     PDMAUDIODIR_UNKNOWN = 0,
+    /** Input. */
     PDMAUDIODIR_IN      = 1,
+    /** Output. */
     PDMAUDIODIR_OUT     = 2,
     /** Duplex handling. */
     PDMAUDIODIR_ANY     = 3,
@@ -140,9 +146,13 @@ typedef enum PDMAUDIODIR
  */
 typedef enum PDMAUDIOPLAYBACKDEST
 {
+    /** Unknown destination. */
     PDMAUDIOPLAYBACKDEST_UNKNOWN = 0,
+    /** Front channel. */
     PDMAUDIOPLAYBACKDEST_FRONT,
+    /** Center / LFE (Subwoofer) channel. */
     PDMAUDIOPLAYBACKDEST_CENTER_LFE,
+    /** Rear channel. */
     PDMAUDIOPLAYBACKDEST_REAR,
     /** Hack to blow the type up to 32-bit. */
     PDMAUDIOPLAYBACKDEST_32BIT_HACK = 0x7fffffff
@@ -153,12 +163,19 @@ typedef enum PDMAUDIOPLAYBACKDEST
  */
 typedef enum PDMAUDIORECSOURCE
 {
+    /** Unknown recording source. */
     PDMAUDIORECSOURCE_UNKNOWN = 0,
+    /** Microphone-In. */
     PDMAUDIORECSOURCE_MIC,
+    /** CD. */
     PDMAUDIORECSOURCE_CD,
+    /** Video-In. */
     PDMAUDIORECSOURCE_VIDEO,
+    /** AUX. */
     PDMAUDIORECSOURCE_AUX,
+    /** Line-In. */
     PDMAUDIORECSOURCE_LINE,
+    /** Phone-In. */
     PDMAUDIORECSOURCE_PHONE,
     /** Hack to blow the type up to 32-bit. */
     PDMAUDIORECSOURCE_32BIT_HACK = 0x7fffffff
@@ -244,6 +261,9 @@ typedef struct PDMAUDIOSTREAMCFG
     PDMAUDIOFMT              enmFormat;
     /** @todo Use RT_LE2H_*? */
     PDMAUDIOENDIANNESS       enmEndianness;
+    /** Hint about the optimal sample buffer size (in audio samples).
+     *  0 if no hint is given. */
+    uint32_t                 cSampleBufferSize;
 } PDMAUDIOSTREAMCFG, *PPDMAUDIOSTREAMCFG;
 
 #if defined(RT_LITTLE_ENDIAN)
@@ -259,12 +279,19 @@ typedef struct PDMAUDIOSTREAMCFG
  */
 typedef enum PDMAUDIOMIXERCTL
 {
+    /** Unknown mixer control. */
     PDMAUDIOMIXERCTL_UNKNOWN = 0,
+    /** Master volume. */
     PDMAUDIOMIXERCTL_VOLUME_MASTER,
+    /** Front. */
     PDMAUDIOMIXERCTL_FRONT,
+    /** Center / LFE (Subwoofer). */
     PDMAUDIOMIXERCTL_CENTER_LFE,
+    /** Rear. */
     PDMAUDIOMIXERCTL_REAR,
+    /** Line-In. */
     PDMAUDIOMIXERCTL_LINE_IN,
+    /** Microphone-In. */
     PDMAUDIOMIXERCTL_MIC_IN,
     /** Hack to blow the type up to 32-bit. */
     PDMAUDIOMIXERCTL_32BIT_HACK = 0x7fffffff
@@ -294,7 +321,7 @@ typedef enum PDMAUDIOSTREAMCMD
  * Properties of audio streams for host/guest
  * for in or out directions.
  */
-typedef struct PDMPCMPROPS
+typedef struct PDMAUDIOPCMPROPS
 {
     /** Sample width. Bits per sample. */
     uint8_t     cBits;
@@ -318,7 +345,7 @@ typedef struct PDMPCMPROPS
     uint32_t    cbBitrate;
     /** Whether the endianness is swapped or not. */
     bool        fSwapEndian;
-} PDMPCMPROPS, *PPDMPCMPROPS;
+} PDMAUDIOPCMPROPS, *PPDMAUDIOPCMPROPS;
 
 /**
  * Audio volume parameters.
@@ -493,6 +520,40 @@ typedef struct PDMAUDIOMIXBUF
     uint8_t                   cShift;
 } PDMAUDIOMIXBUF;
 
+typedef uint32_t PDMAUDIOFILEFLAGS;
+
+/* No flags defined. */
+#define PDMAUDIOFILEFLAG_NONE            0
+
+/**
+ * Audio file types.
+ */
+typedef enum PDMAUDIOFILETYPE
+{
+    /** Unknown type, do not use. */
+    PDMAUDIOFILETYPE_UNKNOWN = 0,
+    /** Wave (.WAV) file. */
+    PDMAUDIOFILETYPE_WAV
+} PDMAUDIOFILETYPE;
+
+/**
+ * Structure for an audio file handle.
+ */
+typedef struct PDMAUDIOFILE
+{
+    /** Type of the audio file. */
+    PDMAUDIOFILETYPE enmType;
+    /** File name. */
+    char             szName[255];
+    /** Actual file handle. */
+    RTFILE           hFile;
+    /** Data needed for the specific audio file type implemented.
+     *  Optional, can be NULL. */
+    void            *pvData;
+    /** Data size (in bytes). */
+    size_t           cbData;
+} PDMAUDIOFILE, *PPDMAUDIOFILE;
+
 /** Stream status flag. To be used with PDMAUDIOSTRMSTS_FLAG_ flags. */
 typedef uint32_t PDMAUDIOSTRMSTS;
 
@@ -602,9 +663,6 @@ typedef struct PDMAUDIOSTREAM
     /** Number of references to this stream. Only can be
      *  destroyed if the reference count is reaching 0. */
     uint32_t               cRefs;
-    /** PCM properties. */
-    /** @todo Deprecated; remove. Use member Cfg instead. */
-    PDMPCMPROPS            Props;
     /** The stream's audio configuration. */
     PDMAUDIOSTREAMCFG      Cfg;
     /** Stream status flag. */
@@ -615,6 +673,8 @@ typedef struct PDMAUDIOSTREAM
     PDMAUDIODIR            enmDir;
     /** Context of this stream. */
     PDMAUDIOSTREAMCTX      enmCtx;
+    /** Timestamp (in ms) since last iteration. */
+    uint64_t               tsLastIterateMS;
     /** Union for input/output specifics. */
     union
     {
@@ -676,8 +736,6 @@ typedef struct PDMAUDIOCALLBACK
 
 /**
  * Audio connector interface (up).
- ** @todo Get rid of the separate XXXIn and XXXOut methods and unify the In/Out structs with a union,
- **       so that we only have one guest and one host stream ultimately.
  */
 typedef struct PDMIAUDIOCONNECTOR
 {
@@ -685,7 +743,6 @@ typedef struct PDMIAUDIOCONNECTOR
      * Retrieves the current configuration of the host audio backend.
      *
      * @returns VBox status code.
-     *
      * @param   pInterface      Pointer to the interface structure containing the called function pointer.
      * @param   pCfg            Where to store the host audio backend configuration data.
      */
@@ -718,16 +775,16 @@ typedef struct PDMIAUDIOCONNECTOR
     /**
      * Adds a reference to the specified audio stream.
      *
-     * @returns New reference count.
+     * @returns New reference count. UINT32_MAX on error.
      * @param   pInterface      Pointer to the interface structure containing the called function pointer.
      * @param   pStream         Pointer to audio stream adding the reference to.
      */
-    DECLR3CALLBACKMEMBER(uint32_t, pfnStreamAddRef, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream));
+    DECLR3CALLBACKMEMBER(uint32_t, pfnStreamRetain, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream));
 
     /**
      * Releases a reference from the specified stream.
      *
-     * @returns New reference count.
+     * @returns New reference count. UINT32_MAX on error.
      * @param   pInterface      Pointer to the interface structure containing the called function pointer.
      * @param   pStream         Pointer to audio stream releasing a reference from.
      */
@@ -846,21 +903,21 @@ typedef struct PDMIAUDIOCONNECTOR
 /**
  * Assigns all needed interface callbacks for an audio backend.
  *
- * @param   a_NamePrefix        The function name prefix.
+ * @param   a_Prefix        The function name prefix.
  */
-#define PDMAUDIO_IHOSTAUDIO_CALLBACKS(a_NamePrefix) \
+#define PDMAUDIO_IHOSTAUDIO_CALLBACKS(a_Prefix) \
     do { \
-        pThis->IHostAudio.pfnInit            = RT_CONCAT(a_NamePrefix,Init); \
-        pThis->IHostAudio.pfnShutdown        = RT_CONCAT(a_NamePrefix,Shutdown); \
-        pThis->IHostAudio.pfnGetConfig       = RT_CONCAT(a_NamePrefix,GetConfig); \
-        pThis->IHostAudio.pfnGetStatus       = RT_CONCAT(a_NamePrefix,GetStatus); \
-        pThis->IHostAudio.pfnStreamCreate    = RT_CONCAT(a_NamePrefix,StreamCreate); \
-        pThis->IHostAudio.pfnStreamDestroy   = RT_CONCAT(a_NamePrefix,StreamDestroy); \
-        pThis->IHostAudio.pfnStreamControl   = RT_CONCAT(a_NamePrefix,StreamControl); \
-        pThis->IHostAudio.pfnStreamGetStatus = RT_CONCAT(a_NamePrefix,StreamGetStatus); \
-        pThis->IHostAudio.pfnStreamIterate   = RT_CONCAT(a_NamePrefix,StreamIterate); \
-        pThis->IHostAudio.pfnStreamPlay      = RT_CONCAT(a_NamePrefix,StreamPlay); \
-        pThis->IHostAudio.pfnStreamCapture   = RT_CONCAT(a_NamePrefix,StreamCapture); \
+        pThis->IHostAudio.pfnInit            = RT_CONCAT(a_Prefix,Init); \
+        pThis->IHostAudio.pfnShutdown        = RT_CONCAT(a_Prefix,Shutdown); \
+        pThis->IHostAudio.pfnGetConfig       = RT_CONCAT(a_Prefix,GetConfig); \
+        pThis->IHostAudio.pfnGetStatus       = RT_CONCAT(a_Prefix,GetStatus); \
+        pThis->IHostAudio.pfnStreamCreate    = RT_CONCAT(a_Prefix,StreamCreate); \
+        pThis->IHostAudio.pfnStreamDestroy   = RT_CONCAT(a_Prefix,StreamDestroy); \
+        pThis->IHostAudio.pfnStreamControl   = RT_CONCAT(a_Prefix,StreamControl); \
+        pThis->IHostAudio.pfnStreamGetStatus = RT_CONCAT(a_Prefix,StreamGetStatus); \
+        pThis->IHostAudio.pfnStreamIterate   = RT_CONCAT(a_Prefix,StreamIterate); \
+        pThis->IHostAudio.pfnStreamPlay      = RT_CONCAT(a_Prefix,StreamPlay); \
+        pThis->IHostAudio.pfnStreamCapture   = RT_CONCAT(a_Prefix,StreamCapture); \
     } while (0)
 
 /** Pointer to a host audio interface. */
@@ -905,15 +962,17 @@ typedef struct PDMIHOSTAUDIO
     DECLR3CALLBACKMEMBER(PDMAUDIOBACKENDSTS, pfnGetStatus, (PPDMIHOSTAUDIO pInterface, PDMAUDIODIR enmDir));
 
     /**
-     * Creates an audio stream.
+     * Creates an audio stream using the requested stream configuration.
+     * If a backend is not able to create this configuration, it will return its best match in the acquired configuration
+     * structure on success.
      *
      * @returns VBox status code.
      * @param   pInterface          Pointer to the interface structure containing the called function pointer.
      * @param   pStream             Pointer to audio stream.
-     * @param   pStreamCfg          Pointer to stream configuration.
-     * @param   pcSamples           Returns how many samples the backend can handle. Optional.
+     * @param   pCfgReq             Pointer to requested stream configuration.
+     * @param   pCfgAcq             Pointer to acquired stream configuration.
      */
-    DECLR3CALLBACKMEMBER(int, pfnStreamCreate, (PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfg, uint32_t *pcSamples));
+    DECLR3CALLBACKMEMBER(int, pfnStreamCreate, (PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq));
 
     /**
      * Destroys an audio stream.
@@ -937,44 +996,51 @@ typedef struct PDMIHOSTAUDIO
     /**
      * Returns whether the specified audio direction in the backend is enabled or not.
      *
+     * @returns PDMAUDIOSTRMSTS
      * @param   pInterface          Pointer to the interface structure containing the called function pointer.
      * @param   enmDir              Audio direction to check status for.
      */
     DECLR3CALLBACKMEMBER(PDMAUDIOSTRMSTS, pfnStreamGetStatus, (PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream));
 
     /**
-     ** @todo Docs!
+     * Gives the host backend the chance to do some (necessary) iteration work.
+     *
+     * @returns VBox status code.
+     * @param   pInterface          Pointer to the interface structure containing the called function pointer.
+     * @param   pStream             Pointer to audio stream.
      */
     DECLR3CALLBACKMEMBER(int, pfnStreamIterate, (PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream));
 
     /**
-     * Plays an audio (output) stream.
+     * Plays (writes to) an audio (output) stream.
      *
      * @returns VBox status code.
      * @param   pInterface          Pointer to the interface structure containing the called function pointer.
      * @param   pStream             Pointer to audio stream.
-     * @param   pcSamplesPlayed     Pointer to number of samples captured.
+     * @param   pvBuf               Pointer to audio data buffer to play.  Currently not used and must be NULL.
+     * @param   cbBuf               Size (in bytes) of audio data buffer.  Currently not used and must be 0.
+     * @param   pcbWritten          Returns number of bytes written.  Optional.
      */
-    DECLR3CALLBACKMEMBER(int, pfnStreamPlay, (PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream, uint32_t *pcSamplesPlayed));
+    DECLR3CALLBACKMEMBER(int, pfnStreamPlay, (PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream, const void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten));
 
     /**
-     * Captures an audio (input) stream.
+     * Captures (reads from) an audio (input) stream.
      *
      * @returns VBox status code.
      * @param   pInterface          Pointer to the interface structure containing the called function pointer.
      * @param   pStream             Pointer to audio stream.
-     * @param   pcSamplesCaptured   Pointer to number of samples captured.
+     * @param   pvBuf               Buffer where to store read audio data.  Currently not used and must be NULL.
+     * @param   cbBuf               Size (in bytes) of buffer.  Currently not used and must be 0.
+     * @param   pcbRead             Returns number of bytes read.  Optional.
      */
-    DECLR3CALLBACKMEMBER(int, pfnStreamCapture, (PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream, uint32_t *pcSamplesCaptured));
+    DECLR3CALLBACKMEMBER(int, pfnStreamCapture, (PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead));
 
 } PDMIHOSTAUDIO;
 
 /** PDMIHOSTAUDIO interface ID. */
-#define PDMIHOSTAUDIO_IID                           "96AC69D0-F301-42AC-8F1D-1E19BA808887"
+#define PDMIHOSTAUDIO_IID                           "2922C325-79D3-4E66-B60F-0082878522FE"
 
 /** @} */
 
-#endif /* VBOX_WITH_AUDIO_50 */
-
 #endif /* !___VBox_vmm_pdmaudioifs_h */
 
diff --git a/include/VBox/vmm/pdmaudioifs_old.h b/include/VBox/vmm/pdmaudioifs_old.h
deleted file mode 100644
index 78292cb..0000000
--- a/include/VBox/vmm/pdmaudioifs_old.h
+++ /dev/null
@@ -1,786 +0,0 @@
-/** @file
- * PDM - Pluggable Device Manager, audio interfaces.
- */
-
-/*
- * Copyright (C) 2006-2016 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- *
- * The contents of this file may alternatively be used under the terms
- * of the Common Development and Distribution License Version 1.0
- * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
- * VirtualBox OSE distribution, in which case the provisions of the
- * CDDL are applicable instead of those of the GPL.
- *
- * You may elect to license modified versions of this file under the
- * terms and conditions of either the GPL or the CDDL or both.
- */
-
-#ifndef ___VBox_vmm_pdmaudioifs_h
-#define ___VBox_vmm_pdmaudioifs_h
-
-#include <VBox/types.h>
-#include <iprt/critsect.h>
-#include <iprt/list.h>
-
-
-/** @defgroup grp_pdm_ifs_audio     PDM Audio Interfaces
- * @ingroup grp_pdm_interfaces
- * @{
- */
-
-/** @todo r=bird: Don't be lazy with documentation! */
-typedef uint32_t PDMAUDIODRVFLAGS;
-
-/** No flags set. */
-/** @todo r=bird: s/PDMAUDIODRVFLAG/PDMAUDIODRV_FLAGS/g */
-#define PDMAUDIODRVFLAG_NONE        0
-/** Marks a primary audio driver which is critical
- *  when running the VM. */
-#define PDMAUDIODRVFLAG_PRIMARY     RT_BIT(0)
-
-/**
- * Audio format in signed or unsigned variants.
- */
-typedef enum PDMAUDIOFMT
-{
-    AUD_FMT_INVALID,
-    AUD_FMT_U8,
-    AUD_FMT_S8,
-    AUD_FMT_U16,
-    AUD_FMT_S16,
-    AUD_FMT_U32,
-    AUD_FMT_S32,
-    /** Hack to blow the type up to 32-bit. */
-    AUD_FMT_32BIT_HACK = 0x7fffffff
-} PDMAUDIOFMT;
-
-/**
- * Audio configuration of a certain backend.
- */
-typedef struct PDMAUDIOBACKENDCFG
-{
-    size_t   cbStreamOut;
-    size_t   cbStreamIn;
-    uint32_t cMaxHstStrmsOut;
-    uint32_t cMaxHstStrmsIn;
-} PDMAUDIOBACKENDCFG, *PPDMAUDIOBACKENDCFG;
-
-/**
- * An audio sample. At the moment stereo (left + right channels) only.
- * @todo Replace this with a more generic union
- *       which then also could handle 2.1 or 5.1 sound.
- */
-typedef struct PDMAUDIOSAMPLE
-{
-    int64_t i64LSample;
-    int64_t i64RSample;
-} PDMAUDIOSAMPLE, *PPDMAUDIOSAMPLE;
-
-typedef enum PDMAUDIOENDIANNESS
-{
-    /** The usual invalid endian. */
-    PDMAUDIOENDIANNESS_INVALID,
-    /** Little endian. */
-    PDMAUDIOENDIANNESS_LITTLE,
-    /** Bit endian. */
-    PDMAUDIOENDIANNESS_BIG,
-    /** Endianness doesn't have a meaning in the context. */
-    PDMAUDIOENDIANNESS_NA,
-    /** The end of the valid endian values (exclusive). */
-    PDMAUDIOENDIANNESS_END,
-    /** Hack to blow the type up to 32-bit. */
-    PDMAUDIOENDIANNESS_32BIT_HACK = 0x7fffffff
-} PDMAUDIOENDIANNESS;
-
-typedef struct PDMAUDIOSTREAMCFG
-{
-    /** Frequency in Hertz (Hz). */
-    uint32_t uHz;
-    /** Number of channels (2 for stereo). */
-    uint8_t cChannels;
-    /** Audio format. */
-    PDMAUDIOFMT enmFormat;
-    /** @todo Use RT_LE2H_*? */
-    PDMAUDIOENDIANNESS enmEndianness;
-} PDMAUDIOSTREAMCFG, *PPDMAUDIOSTREAMCFG;
-
-#if defined(RT_LITTLE_ENDIAN)
-# define PDMAUDIOHOSTENDIANNESS PDMAUDIOENDIANNESS_LITTLE
-#elif defined(RT_BIG_ENDIAN)
-# define PDMAUDIOHOSTENDIANNESS PDMAUDIOENDIANNESS_BIG
-#else
-# error "Port me!"
-#endif
-
-/**
- * Audio direction.
- */
-typedef enum PDMAUDIODIR
-{
-    PDMAUDIODIR_UNKNOWN    = 0,
-    PDMAUDIODIR_IN         = 1,
-    PDMAUDIODIR_OUT        = 2,
-    PDMAUDIODIR_DUPLEX     = 3,
-    /** Hack to blow the type up to 32-bit. */
-    PDMAUDIODIR_32BIT_HACK = 0x7fffffff
-} PDMAUDIODIR;
-
-/**
- * Audio mixer controls.
- */
-typedef enum PDMAUDIOMIXERCTL
-{
-    PDMAUDIOMIXERCTL_UNKNOWN = 0,
-    PDMAUDIOMIXERCTL_VOLUME,
-    PDMAUDIOMIXERCTL_PCM,
-    PDMAUDIOMIXERCTL_LINE_IN,
-    PDMAUDIOMIXERCTL_MIC_IN,
-    /** Hack to blow the type up to 32-bit. */
-    PDMAUDIOMIXERCTL_32BIT_HACK = 0x7fffffff
-} PDMAUDIOMIXERCTL;
-
-/**
- * Audio recording sources.
- */
-typedef enum PDMAUDIORECSOURCE
-{
-    PDMAUDIORECSOURCE_UNKNOWN = 0,
-    PDMAUDIORECSOURCE_MIC,
-    PDMAUDIORECSOURCE_CD,
-    PDMAUDIORECSOURCE_VIDEO,
-    PDMAUDIORECSOURCE_AUX,
-    PDMAUDIORECSOURCE_LINE_IN,
-    PDMAUDIORECSOURCE_PHONE,
-    /** Hack to blow the type up to 32-bit. */
-    PDMAUDIORECSOURCE_32BIT_HACK = 0x7fffffff
-} PDMAUDIORECSOURCE;
-
-/**
- * Audio stream commands. Used in the audio connector
- * as well as in the actual host backends.
- */
-typedef enum PDMAUDIOSTREAMCMD
-{
-    /** Unknown command, do not use. */
-    PDMAUDIOSTREAMCMD_UNKNOWN = 0,
-    /** Enables the stream. */
-    PDMAUDIOSTREAMCMD_ENABLE,
-    /** Disables the stream. */
-    PDMAUDIOSTREAMCMD_DISABLE,
-    /** Pauses the stream. */
-    PDMAUDIOSTREAMCMD_PAUSE,
-    /** Resumes the stream. */
-    PDMAUDIOSTREAMCMD_RESUME,
-    /** Hack to blow the type up to 32-bit. */
-    PDMAUDIOSTREAMCMD_32BIT_HACK = 0x7fffffff
-} PDMAUDIOSTREAMCMD;
-
-/**
- * Properties of audio streams for host/guest
- * for in or out directions.
- */
-typedef struct PDMPCMPROPS
-{
-    /** Sample width. Bits per sample. */
-    uint8_t     cBits;
-    /** Signed or unsigned sample. */
-    bool        fSigned;
-    /** Shift count used for faster calculation of various
-     *  values, such as the alignment, bytes to samples and so on.
-     *  Depends on number of stream channels and the stream format
-     *  being used.
-     *
-     ** @todo Use some RTAsmXXX functions instead?
-     */
-    uint8_t     cShift;
-    /** Number of audio channels. */
-    uint8_t     cChannels;
-    /** Alignment mask. */
-    uint32_t    uAlign;
-    /** Sample frequency in Hertz (Hz). */
-    uint32_t    uHz;
-    /** Bandwidth (bytes/s). */
-    uint32_t    cbPerSec;
-    /** Whether the endianness is swapped or not. */
-    bool        fSwapEndian;
-} PDMPCMPROPS, *PPDMPCMPROPS;
-
-/**
- * Structure keeping an audio volume level.
- */
-typedef struct PDMAUDIOVOLUME
-{
-    /** Set to @c true if this stream is muted, @c false if not. */
-    bool                   fMuted;
-    /** Left channel volume. */
-    uint32_t               uLeft;
-    /** Right channel volume. */
-    uint32_t               uRight;
-} PDMAUDIOVOLUME, *PPDMAUDIOVOLUME;
-
-/**
- * Structure for holding rate processing information
- * of a source + destination audio stream. This is needed
- * because both streams can differ regarding their rates
- * and therefore need to be treated accordingly.
- */
-typedef struct PDMAUDIOSTRMRATE
-{
-    /** Current (absolute) offset in the output
-     *  (destination) stream. */
-    uint64_t       dstOffset;
-    /** Increment for moving dstOffset for the
-     *  destination stream. This is needed because the
-     *  source <-> destination rate might be different. */
-    uint64_t       dstInc;
-    /** Current (absolute) offset in the input
-     *  stream. */
-    uint32_t       srcOffset;
-    /** Last processed sample of the input stream.
-     *  Needed for interpolation. */
-    PDMAUDIOSAMPLE srcSampleLast;
-} PDMAUDIOSTRMRATE, *PPDMAUDIOSTRMRATE;
-
-/**
- * Note: All internal handling is done in samples,
- *       not in bytes!
- */
-typedef uint32_t PDMAUDIOMIXBUFFMT;
-typedef PDMAUDIOMIXBUFFMT *PPDMAUDIOMIXBUFFMT;
-
-typedef struct PDMAUDIOMIXBUF *PPDMAUDIOMIXBUF;
-typedef struct PDMAUDIOMIXBUF
-{
-    RTLISTNODE             Node;
-    /** Name of the buffer. */
-    char                  *pszName;
-    /** Sample buffer. */
-    PPDMAUDIOSAMPLE        pSamples;
-    /** Size of the sample buffer (in samples). */
-    uint32_t               cSamples;
-    /** The current read/write position (in samples)
-     *  in the samples buffer. */
-    uint32_t               offReadWrite;
-    /**
-     * Total samples already mixed down to the parent buffer (if any). Always starting at
-     * the parent's offReadWrite position.
-     *
-     * Note: Count always is specified in parent samples, as the sample count can differ between parent
-     *       and child.
-     */
-    uint32_t               cMixed;
-    uint32_t               cProcessed;
-    /** Pointer to parent buffer (if any). */
-    PPDMAUDIOMIXBUF        pParent;
-    /** List of children mix buffers to keep in sync with (if being a parent buffer). */
-    RTLISTANCHOR           lstBuffers;
-    /** Intermediate structure for buffer conversion tasks. */
-    PPDMAUDIOSTRMRATE      pRate;
-    /** Current volume used for mixing. */
-    PDMAUDIOVOLUME         Volume;
-    /** This buffer's audio format. */
-    PDMAUDIOMIXBUFFMT      AudioFmt;
-    /**
-     * Ratio of the associated parent stream's frequency by this stream's
-     * frequency (1<<32), represented as a signed 64 bit integer.
-     *
-     * For example, if the parent stream has a frequency of 44 khZ, and this
-     * stream has a frequency of 11 kHz, the ration then would be
-     * (44/11 * (1 << 32)).
-     *
-     * Currently this does not get changed once assigned.
-     */
-    int64_t                iFreqRatio;
-    /* For quickly converting samples <-> bytes and
-     * vice versa. */
-    uint8_t                cShift;
-} PDMAUDIOMIXBUF;
-
-/** Stream status flag. To be used with PDMAUDIOSTRMSTS_FLAG_ flags. */
-typedef uint32_t PDMAUDIOSTRMSTS;
-
-/** No flags being set. */
-#define PDMAUDIOSTRMSTS_FLAG_NONE            0
-/** Whether this stream is enabled or disabled. */
-#define PDMAUDIOSTRMSTS_FLAG_ENABLED         RT_BIT_32(0)
-/** Whether this stream has been paused or not. This also implies
- *  that this is an enabled stream! */
-#define PDMAUDIOSTRMSTS_FLAG_PAUSED          RT_BIT_32(1)
-/** Whether this stream was marked as being disabled
- *  but there are still associated guest output streams
- *  which rely on its data. */
-#define PDMAUDIOSTRMSTS_FLAG_PENDING_DISABLE RT_BIT_32(2)
-/** Validation mask. */
-#define PDMAUDIOSTRMSTS_VALID_MASK           UINT32_C(0x00000007)
-
-/**
- * Represents an audio input on the host of a certain
- * backend (e.g. DirectSound, PulseAudio etc).
- *
- * One host audio input is assigned to exactly one parent
- * guest input stream.
- */
-struct PDMAUDIOGSTSTRMIN;
-typedef PDMAUDIOGSTSTRMIN *PPDMAUDIOGSTSTRMIN;
-
-typedef struct PDMAUDIOHSTSTRMIN
-{
-    /** List node. */
-    RTLISTNODE             Node;
-    /** PCM properties. */
-    PDMPCMPROPS            Props;
-    /** Stream status flag. */
-    PDMAUDIOSTRMSTS        fStatus;
-    /** Critical section for serializing access. */
-    RTCRITSECT             CritSect;
-    /** This stream's mixing buffer. */
-    PDMAUDIOMIXBUF         MixBuf;
-    /** Pointer to (parent) guest stream. */
-    PPDMAUDIOGSTSTRMIN     pGstStrmIn;
-} PDMAUDIOHSTSTRMIN, *PPDMAUDIOHSTSTRMIN;
-
-/*
- * Represents an audio output on the host through a certain
- * backend (e.g. DirectSound, PulseAudio etc).
- *
- * One host audio output can have multiple (1:N) guest outputs
- * assigned.
- */
-typedef struct PDMAUDIOHSTSTRMOUT
-{
-    /** List node. */
-    RTLISTNODE             Node;
-    /** Stream properites. */
-    PDMPCMPROPS            Props;
-    /** Stream status flag. */
-    PDMAUDIOSTRMSTS        fStatus;
-    /** Critical section for serializing access. */
-    RTCRITSECT             CritSect;
-    /** This stream's mixing buffer. */
-    PDMAUDIOMIXBUF         MixBuf;
-    /** Associated guest output streams. */
-    RTLISTANCHOR           lstGstStrmOut;
-} PDMAUDIOHSTSTRMOUT, *PPDMAUDIOHSTSTRMOUT;
-
-/**
- * Guest audio stream state.
- */
-typedef struct PDMAUDIOGSTSTRMSTATE
-{
-    /** Guest audio out stream active or not. */
-    bool                   fActive;
-    /** Guest audio output stream has some samples or not. */
-    bool                   fEmpty;
-    /** Name of this stream. */
-    char                  *pszName;
-    /** Number of references to this stream. Only can be
-     *  destroyed if the reference count is reaching 0. */
-    uint8_t                cRefs;
-} PDMAUDIOGSTSTRMSTATE, *PPDMAUDIOGSTSTRMSTATE;
-
-/**
- * Represents an audio input from the guest (that is, from the
- * emulated device, e.g. Intel HDA).
- *
- * Each guest input can have multiple host input streams.
- */
-typedef struct PDMAUDIOGSTSTRMIN
-{
-    /** Guest stream properites. */
-    PDMPCMPROPS            Props;
-    /** Current stream state. */
-    PDMAUDIOGSTSTRMSTATE   State;
-    /** This stream's mixing buffer. */
-    PDMAUDIOMIXBUF         MixBuf;
-    /** Pointer to associated host input stream. */
-    PPDMAUDIOHSTSTRMIN     pHstStrmIn;
-} PDMAUDIOGSTSTRMIN, *PPDMAUDIOGSTSTRMIN;
-
-/**
- * Represents an audio output from the guest (that is, from the
- * emulated device, e.g. Intel HDA).
- *
- * Each guest output is assigned to a single host output.
- */
-typedef struct PDMAUDIOGSTSTRMOUT
-{
-    /** List node. */
-    RTLISTNODE             Node;
-    /** Guest output stream properites. */
-    PDMPCMPROPS            Props;
-    /** Current stream state. */
-    PDMAUDIOGSTSTRMSTATE   State;
-    /** This stream's mixing buffer. */
-    PDMAUDIOMIXBUF         MixBuf;
-    /** Pointer to the associated host output stream. */
-    PPDMAUDIOHSTSTRMOUT    pHstStrmOut;
-} PDMAUDIOGSTSTRMOUT, *PPDMAUDIOGSTSTRMOUT;
-
-/** Pointer to a audio connector interface. */
-typedef struct PDMIAUDIOCONNECTOR *PPDMIAUDIOCONNECTOR;
-
-#ifdef VBOX_WITH_AUDIO_CALLBACKS
-/**
- * Audio callback types. These are all kept generic as those
- * are used by all device emulations across all backends.
- */
-typedef enum PDMAUDIOCALLBACKTYPE
-{
-    PDMAUDIOCALLBACKTYPE_GENERIC = 0,
-    PDMAUDIOCALLBACKTYPE_INPUT,
-    PDMAUDIOCALLBACKTYPE_OUTPUT
-} PDMAUDIOCALLBACKTYPE;
-
-/**
- * Callback data for audio input.
- */
-typedef struct PDMAUDIOCALLBACKDATAIN
-{
-    /** Input: How many bytes are availabe as input for passing
-     *         to the device emulation. */
-    uint32_t cbInAvail;
-    /** Output: How many bytes have been read. */
-    uint32_t cbOutRead;
-} PDMAUDIOCALLBACKDATAIN, *PPDMAUDIOCALLBACKDATAIN;
-
-/**
- * Callback data for audio output.
- */
-typedef struct PDMAUDIOCALLBACKDATAOUT
-{
-    /** Input:  How many bytes are free for the device emulation to write. */
-    uint32_t cbInFree;
-    /** Output: How many bytes were written by the device emulation. */
-    uint32_t cbOutWritten;
-} PDMAUDIOCALLBACKDATAOUT, *PPDMAUDIOCALLBACKDATAOUT;
-
-/**
- * Structure for keeping an audio callback.
- */
-typedef struct PDMAUDIOCALLBACK
-{
-    RTLISTANCHOR          Node;
-    PDMAUDIOCALLBACKTYPE  enmType;
-    void                 *pvCtx;
-    size_t                cbCtx;
-    DECLR3CALLBACKMEMBER(int, pfnCallback, (PDMAUDIOCALLBACKTYPE enmType, void *pvCtx, size_t cbCtx, void *pvUser, size_t cbUser));
-} PDMAUDIOCALLBACK, *PPDMAUDIOCALLBACK;
-#endif
-
-/**
- * Audio connector interface (up).
- */
-typedef struct PDMIAUDIOCONNECTOR
-{
-    DECLR3CALLBACKMEMBER(int, pfnQueryStatus, (PPDMIAUDIOCONNECTOR pInterface, uint32_t *pcbAvailIn, uint32_t *pcbFreeOut, uint32_t *pcSamplesLive));
-
-    /**
-     * Reads PCM audio data from the host (input).
-     *
-     * @returns VBox status code.
-     * @param   pInterface      Pointer to the interface structure containing the called function pointer.
-     * @param   pGstStrmIn      Pointer to guest input stream to write to.
-     * @param   pvBuf           Where to store the read data.
-     * @param   cbBuf           Number of bytes to read.
-     * @param   pcbRead         Bytes of audio data read. Optional.
-     */
-    DECLR3CALLBACKMEMBER(int, pfnRead, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOGSTSTRMIN pGstStrmIn, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead));
-
-    /**
-     * Writes PCM audio data to the host (output).
-     *
-     * @returns VBox status code.
-     * @param   pInterface      Pointer to the interface structure containing the called function pointer.
-     * @param   pGstStrmOut     Pointer to guest output stream to read from.
-     * @param   pvBuf           Audio data to be written.
-     * @param   cbBuf           Number of bytes to be written.
-     * @param   pcbWritten      Bytes of audio data written. Optional.
-     */
-    DECLR3CALLBACKMEMBER(int, pfnWrite, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOGSTSTRMOUT pGstStrmOut, const void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten));
-
-    /**
-     * Retrieves the current configuration of the host audio backend.
-     *
-     * @returns VBox status code.
-     *
-     * @param   pInterface      Pointer to the interface structure containing the called function pointer.
-     * @param   pCfg            Where to store the host audio backend configuration data.
-     */
-    DECLR3CALLBACKMEMBER(int, pfnGetConfiguration, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOBACKENDCFG pCfg));
-
-    /**
-     * Checks whether a specific guest input stream is active or not.
-     *
-     * @returns Whether the specified stream is active or not.
-     * @param   pInterface      Pointer to the interface structure containing the called function pointer.
-     * @param   pGstStrmIn      Pointer to guest input stream.
-     */
-    DECLR3CALLBACKMEMBER(bool, pfnIsActiveIn, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOGSTSTRMIN pGstStrmIn));
-
-    /**
-     * Checks whether a specific guest output stream is active or not.
-     *
-     * @returns Whether the specified stream is active or not.
-     * @param   pInterface      Pointer to the interface structure containing the called function pointer.
-     * @param   pGstStrmOut     Pointer to guest output stream.
-     */
-    DECLR3CALLBACKMEMBER(bool, pfnIsActiveOut, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOGSTSTRMOUT pGstStrmOut));
-
-    /**
-     * Checks whether the specified guest input stream is in a valid (working) state.
-     *
-     * @returns True if a host voice in is available, false if not.
-     * @param   pInterface      Pointer to the interface structure containing the called function pointer.
-     * @param   pGstStrmIn      Pointer to guest input stream to check.
-     */
-    DECLR3CALLBACKMEMBER(bool, pfnIsValidIn, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOGSTSTRMIN pGstStrmIn));
-
-    /**
-     * Checks whether the specified guest output stream is in a valid (working) state.
-     *
-     * @returns True if a host voice out is available, false if not.
-     * @param   pInterface      Pointer to the interface structure containing the called function pointer.
-     * @param   pGstStrmOut     Pointer to guest output stream to check.
-     */
-    DECLR3CALLBACKMEMBER(bool, pfnIsValidOut, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOGSTSTRMOUT pGstStrmOut));
-
-    /**
-     * Enables a specific guest output stream and starts the audio device.
-     *
-     * @returns VBox status code.
-     * @param   pInterface      Pointer to the interface structure containing the called function pointer.
-     * @param   pGstStrmOut     Pointer to guest output stream.
-     * @param   fEnable         Whether to enable or disable the specified output stream.
-     */
-    DECLR3CALLBACKMEMBER(int, pfnEnableOut, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOGSTSTRMOUT pGstStrmOut, bool fEnable));
-
-    /**
-     * Enables a specific guest input stream and starts the audio device.
-     *
-     * @returns VBox status code.
-     * @param   pInterface      Pointer to the interface structure containing the called function pointer.
-     * @param   pGstStrmIn      Pointer to guest input stream.
-     * @param   fEnable         Whether to enable or disable the specified input stream.
-     */
-    DECLR3CALLBACKMEMBER(int, pfnEnableIn, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOGSTSTRMIN pGstStrmIn, bool fEnable));
-
-    /**
-     * Creates a guest input stream.
-     *
-     * @returns VBox status code.
-     * @param   pInterface           Pointer to the interface structure containing the called function pointer.
-     * @param   pszName              Name of the audio channel.
-     * @param   enmRecSource         Specifies the type of recording source to be opened.
-     * @param   pCfg                 Pointer to PDMAUDIOSTREAMCFG to use.
-     * @param   ppGstStrmIn          Pointer where to return the guest guest input stream on success.
-     */
-    DECLR3CALLBACKMEMBER(int, pfnCreateIn, (PPDMIAUDIOCONNECTOR pInterface, const char *pszName,
-                                            PDMAUDIORECSOURCE enmRecSource, PPDMAUDIOSTREAMCFG pCfg,
-                                            PPDMAUDIOGSTSTRMIN *ppGstStrmIn));
-    /**
-     * Creates a guest output stream.
-     *
-     * @returns VBox status code.
-     * @param   pInterface           Pointer to the interface structure containing the called function pointer.
-     * @param   pszName              Name of the audio channel.
-     * @param   pCfg                 Pointer to PDMAUDIOSTREAMCFG to use.
-     * @param   ppGstStrmOut         Pointer where to return the guest guest input stream on success.
-     */
-    DECLR3CALLBACKMEMBER(int, pfnCreateOut, (PPDMIAUDIOCONNECTOR pInterface, const char *pszName,
-                                             PPDMAUDIOSTREAMCFG pCfg, PPDMAUDIOGSTSTRMOUT *ppGstStrmOut));
-
-    /**
-     * Destroys a guest input stream.
-     *
-     * @param   pInterface      Pointer to the interface structure containing the called function pointer.
-     * @param   pGstStrmIn      Pointer to guest input stream.
-     */
-    DECLR3CALLBACKMEMBER(void, pfnDestroyIn, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOGSTSTRMIN pGstStrmIn));
-
-    /**
-     * Destroys a guest output stream.
-     *
-     * @param   pInterface      Pointer to the interface structure containing the called function pointer.
-     * @param   pGstStrmOut     Pointer to guest output stream.
-     */
-    DECLR3CALLBACKMEMBER(void, pfnDestroyOut, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOGSTSTRMOUT pGstStrmOut));
-
-    /**
-     * Plays (transfers) all available samples via the connected host backend.
-     *
-     * @returns VBox status code.
-     * @param   pInterface           Pointer to the interface structure containing the called function pointer.
-     * @param   pcSamplesPlayed      Number of samples played. Optional.
-     */
-    DECLR3CALLBACKMEMBER(int, pfnPlayOut, (PPDMIAUDIOCONNECTOR pInterface, uint32_t *pcSamplesPlayed));
-
-#ifdef VBOX_WITH_AUDIO_CALLBACKS
-    DECLR3CALLBACKMEMBER(int, pfnRegisterCallbacks, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOCALLBACK paCallbacks, size_t cCallbacks));
-    DECLR3CALLBACKMEMBER(int, pfnCallback, (PPDMIAUDIOCONNECTOR pInterface, PDMAUDIOCALLBACKTYPE enmType, void *pvUser, size_t cbUser));
-#endif
-
-} PDMIAUDIOCONNECTOR;
-
-/** PDMIAUDIOCONNECTOR interface ID. */
-#define PDMIAUDIOCONNECTOR_IID                  "8f8ca10e-9039-423c-9a77-0014aaa98626"
-
-
-/**
- * Assigns all needed interface callbacks for an audio backend.
- *
- * @param   a_NamePrefix        The function name prefix.
- */
-#define PDMAUDIO_IHOSTAUDIO_CALLBACKS(a_NamePrefix) \
-    do { \
-        pThis->IHostAudio.pfnInit       = RT_CONCAT(a_NamePrefix,Init); \
-        pThis->IHostAudio.pfnShutdown   = RT_CONCAT(a_NamePrefix,Shutdown); \
-        pThis->IHostAudio.pfnInitIn     = RT_CONCAT(a_NamePrefix,InitIn); \
-        pThis->IHostAudio.pfnInitOut    = RT_CONCAT(a_NamePrefix,InitOut); \
-        pThis->IHostAudio.pfnControlOut = RT_CONCAT(a_NamePrefix,ControlOut); \
-        pThis->IHostAudio.pfnControlIn  = RT_CONCAT(a_NamePrefix,ControlIn); \
-        pThis->IHostAudio.pfnFiniIn     = RT_CONCAT(a_NamePrefix,FiniIn); \
-        pThis->IHostAudio.pfnFiniOut    = RT_CONCAT(a_NamePrefix,FiniOut); \
-        pThis->IHostAudio.pfnIsEnabled  = RT_CONCAT(a_NamePrefix,IsEnabled); \
-        pThis->IHostAudio.pfnPlayOut    = RT_CONCAT(a_NamePrefix,PlayOut); \
-        pThis->IHostAudio.pfnCaptureIn  = RT_CONCAT(a_NamePrefix,CaptureIn); \
-        pThis->IHostAudio.pfnGetConf    = RT_CONCAT(a_NamePrefix,GetConf); \
-    } while (0)
-
-/** Pointer to a host audio interface. */
-typedef struct PDMIHOSTAUDIO *PPDMIHOSTAUDIO;
-/**
- * PDM host audio interface.
- */
-typedef struct PDMIHOSTAUDIO
-{
-    /**
-     * Initialize the host-specific audio device.
-     *
-     * @returns VBox status code.
-     * @param   pInterface          Pointer to the interface structure containing the called function pointer.
-     */
-    DECLR3CALLBACKMEMBER(int, pfnInit, (PPDMIHOSTAUDIO pInterface));
-
-    /**
-     * Shuts down the host-specific audio device.
-     *
-     * @returns VBox status code.
-     * @param   pInterface          Pointer to the interface structure containing the called function pointer.
-     */
-    DECLR3CALLBACKMEMBER(void, pfnShutdown, (PPDMIHOSTAUDIO pInterface));
-
-    /**
-     * Initialize the host-specific audio device for input stream.
-     *
-     * @returns VBox status code.
-     * @param   pInterface          Pointer to the interface structure containing the called function pointer.
-     * @param   pHstStrmIn          Pointer to host input stream.
-     * @param   pStreamCfg          Pointer to stream configuration.
-     * @param   enmRecSource        Specifies the type of recording source to be initialized.
-     * @param   pcSamples           Returns how many samples the backend can handle. Optional.
-     */
-    DECLR3CALLBACKMEMBER(int, pfnInitIn, (PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHstStrmIn, PPDMAUDIOSTREAMCFG pStreamCfg, PDMAUDIORECSOURCE enmRecSource, uint32_t *pcSamples));
-
-    /**
-     * Initialize the host-specific output device for output stream.
-     *
-     * @returns VBox status code.
-     * @param   pInterface          Pointer to the interface structure containing the called function pointer.
-     * @param   pHstStrmOut         Pointer to host output stream.
-     * @param   pStreamCfg          Pointer to stream configuration.
-     * @param   pcSamples           Returns how many samples the backend can handle. Optional.
-     */
-    DECLR3CALLBACKMEMBER(int, pfnInitOut, (PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHstStrmOut, PPDMAUDIOSTREAMCFG pStreamCfg, uint32_t *pcSamples));
-
-    /**
-     * Control the host audio device for an input stream.
-     *
-     * @returns VBox status code.
-     * @param   pInterface          Pointer to the interface structure containing the called function pointer.
-     * @param   pHstStrmOut         Pointer to host output stream.
-     * @param   enmStreamCmd        The stream command to issue.
-     */
-    DECLR3CALLBACKMEMBER(int, pfnControlOut, (PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHstStrmOut, PDMAUDIOSTREAMCMD enmStreamCmd));
-
-    /**
-     * Control the host audio device for an output stream.
-     *
-     * @returns VBox status code.
-     * @param   pInterface          Pointer to the interface structure containing the called function pointer.
-     * @param   pHstStrmOut         Pointer to host output stream.
-     * @param   enmStreamCmd        The stream command to issue.
-     */
-    DECLR3CALLBACKMEMBER(int, pfnControlIn, (PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHstStrmIn, PDMAUDIOSTREAMCMD enmStreamCmd));
-
-    /**
-     * Ends the host audio input streamm.
-     *
-     * @returns VBox status code.
-     * @param   pInterface          Pointer to the interface structure containing the called function pointer.
-     * @param   pHstStrmIn          Pointer to host input stream.
-     */
-    DECLR3CALLBACKMEMBER(int, pfnFiniIn, (PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHstStrmIn));
-
-    /**
-     * Ends the host output stream.
-     *
-     * @returns VBox status code.
-     * @param   pInterface          Pointer to the interface structure containing the called function pointer.
-     * @param   pHstStrmOut         Pointer to host output stream.
-     */
-    DECLR3CALLBACKMEMBER(int, pfnFiniOut, (PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHstStrmOut));
-
-    /**
-     * Returns whether the specified audio direction in the backend is enabled or not.
-     *
-     * @param   pInterface          Pointer to the interface structure containing the called function pointer.
-     * @param   enmDir              Audio direction to check status for.
-     */
-    DECLR3CALLBACKMEMBER(bool, pfnIsEnabled, (PPDMIHOSTAUDIO pInterface, PDMAUDIODIR enmDir));
-
-    /**
-     * Plays a host audio stream.
-     *
-     * @returns VBox status code.
-     * @param   pInterface          Pointer to the interface structure containing the called function pointer.
-     * @param   pHstStrmOut         Pointer to host output stream.
-     * @param   pcSamplesPlayed     Pointer to number of samples captured.
-     */
-    DECLR3CALLBACKMEMBER(int, pfnPlayOut, (PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHstStrmOut, uint32_t *pcSamplesPlayed));
-
-    /**
-     * Records audio to input stream.
-     *
-     * @returns VBox status code.
-     * @param   pInterface          Pointer to the interface structure containing the called function pointer.
-     * @param   pHstStrmIn          Pointer to host input stream.
-     * @param   pcSamplesCaptured   Pointer to number of samples captured.
-     */
-    DECLR3CALLBACKMEMBER(int, pfnCaptureIn, (PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHstStrmIn, uint32_t *pcSamplesCaptured));
-
-    /**
-     * Gets the configuration from the host audio (backend) driver.
-     *
-     * @returns VBox status code.
-     * @param   pInterface          Pointer to the interface structure containing the called function pointer.
-     * @param   pBackendCfg         Pointer where to store the backend audio configuration to.
-     */
-    DECLR3CALLBACKMEMBER(int, pfnGetConf, (PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDCFG pBackendCfg));
-
-} PDMIHOSTAUDIO;
-
-/** PDMIHOSTAUDIO interface ID. */
-#define PDMIHOSTAUDIO_IID                           "39feea4f-c824-4197-bcff-7d4a6ede7420"
-
-/** @} */
-
-#endif /* !___VBox_vmm_pdmaudioifs_h */
-
diff --git a/include/VBox/vmm/pdmblkcache.h b/include/VBox/vmm/pdmblkcache.h
index 971bab2..d79922e 100644
--- a/include/VBox/vmm/pdmblkcache.h
+++ b/include/VBox/vmm/pdmblkcache.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/pdmcardreaderinfs.h b/include/VBox/vmm/pdmcardreaderinfs.h
index df555d8..8d3701e 100644
--- a/include/VBox/vmm/pdmcardreaderinfs.h
+++ b/include/VBox/vmm/pdmcardreaderinfs.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/pdmcommon.h b/include/VBox/vmm/pdmcommon.h
index abfe7da..1ea0983 100644
--- a/include/VBox/vmm/pdmcommon.h
+++ b/include/VBox/vmm/pdmcommon.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/pdmcritsect.h b/include/VBox/vmm/pdmcritsect.h
index b2b57e0..08411c4 100644
--- a/include/VBox/vmm/pdmcritsect.h
+++ b/include/VBox/vmm/pdmcritsect.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/pdmcritsectrw.h b/include/VBox/vmm/pdmcritsectrw.h
index f1e22d3..d110b89 100644
--- a/include/VBox/vmm/pdmcritsectrw.h
+++ b/include/VBox/vmm/pdmcritsectrw.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/pdmdrv.h b/include/VBox/vmm/pdmdrv.h
index c147b97..bb83a4a 100644
--- a/include/VBox/vmm/pdmdrv.h
+++ b/include/VBox/vmm/pdmdrv.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/pdmifs.h b/include/VBox/vmm/pdmifs.h
index b226ad9..9f87314 100644
--- a/include/VBox/vmm/pdmifs.h
+++ b/include/VBox/vmm/pdmifs.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1196,7 +1196,8 @@ typedef struct PDMICHARCONNECTOR
      * @param   cStopBits       Number of stop bits.
      * @thread  Any thread.
      */
-    DECLR3CALLBACKMEMBER(int, pfnSetParameters,(PPDMICHARCONNECTOR pInterface, unsigned Bps, char chParity, unsigned cDataBits, unsigned cStopBits));
+    DECLR3CALLBACKMEMBER(int, pfnSetParameters,(PPDMICHARCONNECTOR pInterface, unsigned Bps, char chParity,
+                                                unsigned cDataBits, unsigned cStopBits));
 
     /**
      * Set the state of the modem lines.
@@ -1922,11 +1923,13 @@ typedef struct PDMIVMMDEVCONNECTOR
      *
      * @returns VBox status code.
      * @param   pInterface          Pointer to this interface.
-     * @param   pcRect              Number of rectangles in pRect
-     * @param   pRect               Rectangle array (set to NULL to query the number of rectangles)
+     * @param   pcRects             Where to return the number of rectangles in
+     *                              paRects.
+     * @param   paRects             Rectangle array (set to NULL to query the number
+     *                              of rectangles)
      * @thread  The emulation thread.
      */
-    DECLR3CALLBACKMEMBER(int, pfnQueryVisibleRegion,(PPDMIVMMDEVCONNECTOR pInterface, uint32_t *pcRect, PRTRECT pRect));
+    DECLR3CALLBACKMEMBER(int, pfnQueryVisibleRegion,(PPDMIVMMDEVCONNECTOR pInterface, uint32_t *pcRects, PRTRECT paRects));
 
     /**
      * Request the statistics interval
diff --git a/include/VBox/vmm/pdmins.h b/include/VBox/vmm/pdmins.h
index af44d3c..415c06e 100644
--- a/include/VBox/vmm/pdmins.h
+++ b/include/VBox/vmm/pdmins.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/pdmnetifs.h b/include/VBox/vmm/pdmnetifs.h
index 9de33c7..5b76a98 100644
--- a/include/VBox/vmm/pdmnetifs.h
+++ b/include/VBox/vmm/pdmnetifs.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/pdmnetinline.h b/include/VBox/vmm/pdmnetinline.h
index b1e0beb..2fe2e86 100644
--- a/include/VBox/vmm/pdmnetinline.h
+++ b/include/VBox/vmm/pdmnetinline.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -179,8 +179,7 @@ DECLINLINE(uint32_t) pdmNetSegPayloadLen(PCPDMNETWORKGSO pGso, uint32_t iSeg, ui
 {
     if (iSeg + 1 == cSegs)
         return cbFrame - iSeg * pGso->cbMaxSeg - pdmNetSegHdrLen(pGso, iSeg);
-    else
-        return pGso->cbMaxSeg - (iSeg ? 0 : pGso->cbHdrsTotal - pGso->cbHdrsSeg);
+    return pGso->cbMaxSeg - (iSeg ? 0 : pGso->cbHdrsTotal - pGso->cbHdrsSeg);
 }
 
 /**
diff --git a/include/VBox/vmm/pdmnetshaper.h b/include/VBox/vmm/pdmnetshaper.h
index 7259abf..211d694 100644
--- a/include/VBox/vmm/pdmnetshaper.h
+++ b/include/VBox/vmm/pdmnetshaper.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/pdmnvram.h b/include/VBox/vmm/pdmnvram.h
index 77818c0..857dca4 100644
--- a/include/VBox/vmm/pdmnvram.h
+++ b/include/VBox/vmm/pdmnvram.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/pdmpci.h b/include/VBox/vmm/pdmpci.h
index 9359cfa..68f38ed 100644
--- a/include/VBox/vmm/pdmpci.h
+++ b/include/VBox/vmm/pdmpci.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -51,7 +51,7 @@ typedef struct PDMIPCIRAW
      *
      * @thread  Any thread.
      */
-    DECLR3CALLBACKMEMBER(int, pfnInterruptRequest ,(PPDMIPCIRAW pInterface, int32_t iGuestIrq));
+    DECLR3CALLBACKMEMBER(int, pfnInterruptRequest,(PPDMIPCIRAW pInterface, int32_t iGuestIrq));
 } PDMIPCIRAW;
 
 typedef struct PDMIPCIRAWUP *PPDMIPCIRAWUP;
@@ -67,18 +67,17 @@ typedef struct PDMIPCIRAWUP
      * @returns true, if region is present, and out parameters are correct
      * @param   pInterface          Pointer to this interface structure.
      * @param   iRegion             Region number.
-     * @param   pRegStart           Where to store region base address (guest).
-     * @param   piRegSize           Where to store region size.
+     * @param   pGCPhysRegion       Where to store region base address (guest).
+     * @param   pcbRegion           Where to store region size.
      *
      * @param   fMmio               If region is MMIO or IO.
      * @thread  Any thread.
      */
     DECLR3CALLBACKMEMBER(bool, pfnGetRegionInfo, (PPDMIPCIRAWUP pInterface,
-                                                  int32_t              iRegion,
-                                                  RTGCPHYS             *pRegStart,
-                                                  uint64_t             *piRegSize,
-                                                  uint32_t             *pfFlags
-                                                  ));
+                                                  uint32_t      iRegion,
+                                                  RTGCPHYS     *pGCPhysRegion,
+                                                  uint64_t     *pcbRegion,
+                                                  uint32_t     *pfFlags));
 
     /**
      * Request driver to map part of host device's MMIO region to the VM process and maybe kernel.
@@ -90,7 +89,7 @@ typedef struct PDMIPCIRAWUP
      * @param   pInterface          Pointer to this interface structure.
      * @param   iRegion             Number of the region.
      * @param   StartAddress        Host physical address of start.
-     * @param   iRegionSize         Size of the region.
+     * @param   cbRegion            Size of the region.
      * @param   fFlags              Flags, currently lowest significant bit set if R0 mapping requested too
      * @param   ppvAddressR3        Where to store mapped region address for R3 (can be 0, if cannot map into userland)
      * @param   ppvAddressR0        Where to store mapped region address for R0 (can be 0, if cannot map into kernel)
@@ -98,13 +97,12 @@ typedef struct PDMIPCIRAWUP
      * @thread  Any thread.
      */
     DECLR3CALLBACKMEMBER(int, pfnMapRegion, (PPDMIPCIRAWUP pInterface,
-                                             int32_t              iRegion,
-                                             RTHCPHYS             StartAddress,
-                                             uint64_t             iRegionSize,
-                                             uint32_t             fFlags,
-                                             RTR3PTR              *ppvAddressR3,
-                                             RTR0PTR              *ppvAddressR0
-                                             ));
+                                             uint32_t      iRegion,
+                                             RTHCPHYS      StartAddress,
+                                             uint64_t      cbRegion,
+                                             uint32_t      fFlags,
+                                             PRTR3PTR      ppvAddressR3,
+                                             PRTR0PTR      ppvAddressR0));
 
     /**
      * Request driver to unmap part of host device's MMIO region to the VM process.
@@ -114,54 +112,51 @@ typedef struct PDMIPCIRAWUP
      * @param   pInterface          Pointer to this interface structure
      * @param   iRegion             Number of the region.
      * @param   StartAddress        Host physical address of start.
-     * @param   iRegionSize         Size of the region.
+     * @param   cbRegion            Size of the region.
      * @param   pvAddressR3         R3 address of mapped region.
      * @param   pvAddressR0         R0 address of mapped region.
      *
      * @thread  Any thread.
      */
     DECLR3CALLBACKMEMBER(int, pfnUnmapRegion, (PPDMIPCIRAWUP pInterface,
-                                               int                  iRegion,
-                                               RTHCPHYS             StartAddress,
-                                               uint64_t             iRegionSize,
-                                               RTR3PTR              pvAddressR3,
-                                               RTR0PTR              pvAddressR0
-                                               ));
+                                               uint32_t      iRegion,
+                                               RTHCPHYS      StartAddress,
+                                               uint64_t      cbRegion,
+                                               RTR3PTR       pvAddressR3,
+                                               RTR0PTR       pvAddressR0));
 
     /**
      * Request port IO write.
      *
      * @returns status code
      * @param   pInterface          Pointer to this interface structure.
-     * @param   iPort               IO port.
-     * @param   iValue              Value to write.
+     * @param   uPort               I/O port address.
+     * @param   uValue              Value to write.
      * @param   cb                  Access width.
      *
      * @thread  EMT thread.
      */
     DECLR3CALLBACKMEMBER(int, pfnPioWrite, (PPDMIPCIRAWUP pInterface,
-                                            uint16_t             iPort,
-                                            uint32_t             iValue,
-                                            unsigned             cb
-                                            ));
+                                            RTIOPORT      uPort,
+                                            uint32_t      uValue,
+                                            unsigned      cb));
 
     /**
      * Request port IO read.
      *
      * @returns status code
      * @param   pInterface          Pointer to this interface structure.
-     * @param   iPort               IO port.
-     * @param   piValue             Place to store read value.
+     * @param   uPort               I/O port address.
+     * @param   puValue             Place to store read value.
      * @param   cb                  Access width.
      *
      * @thread  EMT thread.
      */
 
     DECLR3CALLBACKMEMBER(int, pfnPioRead, (PPDMIPCIRAWUP pInterface,
-                                           uint16_t             iPort,
-                                           uint32_t             *piValue,
-                                           unsigned             cb
-                                           ));
+                                           RTIOPORT      uPort,
+                                           uint32_t     *puValue,
+                                           unsigned      cb));
 
 
     /**
@@ -171,16 +166,15 @@ typedef struct PDMIPCIRAWUP
      * @returns status code
      * @param   pInterface          Pointer to this interface structure.
      * @param   Address             Guest physical address.
-     * @param   pValue              Address of value to write.
+     * @param   pvValue             Address of value to write.
      * @param   cb                  Access width.
      *
      * @thread  EMT thread.
      */
     DECLR3CALLBACKMEMBER(int, pfnMmioWrite, (PPDMIPCIRAWUP pInterface,
-                                             RTR0PTR              Address,
-                                             void const          *pValue,
-                                             unsigned             cb
-                                             ));
+                                             RTR0PTR       Address, /**< Why is this documented as guest physical address and given a host ring-0 address type??? */
+                                             void const   *pvValue,
+                                             unsigned      cb));
 
     /**
      * Request MMIO read.
@@ -188,17 +182,16 @@ typedef struct PDMIPCIRAWUP
      * @returns status code
      * @param   pInterface          Pointer to this interface structure.
      * @param   Address             Guest physical address.
-     * @param   pValue              Place to store read value.
+     * @param   pvValue             Place to store read value.
      * @param   cb                  Access width.
      *
      * @thread  EMT thread.
      */
 
     DECLR3CALLBACKMEMBER(int, pfnMmioRead, (PPDMIPCIRAWUP pInterface,
-                                            RTR0PTR              Address,
-                                            void                 *pValue,
-                                            unsigned             cb
-                                            ));
+                                            RTR0PTR       Address, /**< Why is this documented as guest physical address and given a host ring-0 address type??? */
+                                            void         *pvValue,
+                                            unsigned      cb));
 
     /**
      * Host PCI config space accessors.
@@ -209,33 +202,32 @@ typedef struct PDMIPCIRAWUP
      *
      * @returns status code
      * @param   pInterface          Pointer to this interface structure.
-     * @param   iOffset             Offset in PCI config space.
-     * @param   iValue              Value to write.
+     * @param   offCfgSpace         Offset in PCI config space.
+     * @param   pvValue             Value to write.
      * @param   cb                  Access width.
      *
      * @thread  EMT thread.
      */
     DECLR3CALLBACKMEMBER(int, pfnPciCfgWrite, (PPDMIPCIRAWUP pInterface,
-                                               uint32_t             iOffset,
-                                               void*                pValue,
-                                               unsigned             cb
-                                               ));
+                                               uint32_t      offCfgSpace,
+                                               void         *pvValue,
+                                               unsigned      cb));
      /**
      * Request driver to read value from host device's PCI config space.
      * Host specific way (PIO or MCFG) is used to perform actual operation.
      *
      * @returns status code
      * @param   pInterface          Pointer to this interface structure.
-     * @param   iOffset             Offset in PCI config space.
-     * @param   pValue              Where to store read value.
+     * @param   offCfgSpace         Offset in PCI config space.
+     * @param   pvValue             Where to store read value.
      * @param   cb                  Access width.
      *
      * @thread  EMT thread.
      */
     DECLR3CALLBACKMEMBER(int, pfnPciCfgRead, (PPDMIPCIRAWUP pInterface,
-                                              uint32_t             iOffset,
-                                              void                *pValue,
-                                              unsigned             cb                                              ));
+                                              uint32_t      offCfgSpace,
+                                              void         *pvValue,
+                                              unsigned      cb));
 
     /**
      * Request to enable interrupt notifications. Please note that this is purely
@@ -251,12 +243,11 @@ typedef struct PDMIPCIRAWUP
      * @returns status code
      * @param   pInterface          Pointer to this interface structure.
      * @param   pListener           Pointer to the listener object.
-     * @param   iGuestIrq           Guest IRQ to be passed to pfnInterruptRequest().
+     * @param   uGuestIrq           Guest IRQ to be passed to pfnInterruptRequest().
      *
      * @thread  Any thread, pfnInterruptRequest() will be usually invoked on a dedicated thread.
      */
-    DECLR3CALLBACKMEMBER(int, pfnEnableInterruptNotifications, (PPDMIPCIRAWUP pInterface, int32_t iGuestIrq
-                                                                ));
+    DECLR3CALLBACKMEMBER(int, pfnEnableInterruptNotifications, (PPDMIPCIRAWUP pInterface, uint8_t uGuestIrq));
 
     /**
      * Request to disable interrupt notifications.
@@ -266,33 +257,34 @@ typedef struct PDMIPCIRAWUP
      *
      * @thread  Any thread.
      */
-    DECLR3CALLBACKMEMBER(int, pfnDisableInterruptNotifications, (PPDMIPCIRAWUP pInterface
-                                                                 ));
+    DECLR3CALLBACKMEMBER(int, pfnDisableInterruptNotifications, (PPDMIPCIRAWUP pInterface));
 
-    /**
-     * Notification APIs.
+    /** @name  Notification APIs.
+     * @{
      */
 
     /**
-     * Notify driver when raw PCI device construction starts. Have to be the first operation
-     * as initializes internal state and opens host device driver.
+     * Notify driver when raw PCI device construction starts.
+     *
+     * Have to be the first operation as initializes internal state and opens host
+     * device driver.
      *
      * @returns status code
      * @param   pInterface          Pointer to this interface structure.
-     * @param   iHostAddress        Host PCI address of device attached.
-     * @param   iGuestAddress       Guest PCI address of device attached.
-     * @param   szDeviceName        Human readable device name.
+     * @param   uHostPciAddress     Host PCI address of device attached.
+     * @param   uGuestPciAddress    Guest PCI address of device attached.
+     * @param   pszDeviceName       Human readable device name.
      * @param   fDeviceFlags        Flags for the host device.
-     * @param   pu32Flags           Flags for virtual device, from the upper driver.
+     * @param   pfFlags             Flags for virtual device, from the upper driver.
      *
      * @thread  Any thread.
      */
     DECLR3CALLBACKMEMBER(int, pfnPciDeviceConstructStart, (PPDMIPCIRAWUP  pInterface,
-                                                           uint32_t             iHostAddress,
-                                                           uint32_t             iGuestAddress,
-                                                           const char*          szDeviceName,
-                                                           uint32_t             fDeviceFlags,
-                                                           uint32_t             *pu32Flags));
+                                                           uint32_t       uHostPciAddress,
+                                                           uint32_t       uGuestPciAddress,
+                                                           const char    *pszDeviceName,
+                                                           uint32_t       fDeviceFlags,
+                                                           uint32_t      *pfFlags));
 
     /**
      * Notify driver when raw PCI device construction completes, so that it may
@@ -304,8 +296,7 @@ typedef struct PDMIPCIRAWUP
      *
      * @thread  Any thread.
      */
-    DECLR3CALLBACKMEMBER(void, pfnPciDeviceConstructComplete, (PPDMIPCIRAWUP pInterface,
-                                                               int                  rc));
+    DECLR3CALLBACKMEMBER(void, pfnPciDeviceConstructComplete, (PPDMIPCIRAWUP pInterface, int rc));
 
     /**
      * Notify driver on finalization of raw PCI device.
@@ -314,23 +305,22 @@ typedef struct PDMIPCIRAWUP
      *
      * @thread  Any thread.
      */
-    DECLR3CALLBACKMEMBER(int, pfnPciDeviceDestruct, (PPDMIPCIRAWUP pInterface,
-                                                     uint32_t             fFlags));
+    DECLR3CALLBACKMEMBER(int, pfnPciDeviceDestruct, (PPDMIPCIRAWUP pInterface, uint32_t fFlags));
 
     /**
      * Notify driver on guest power state change.
      *
      * @param   pInterface          Pointer to this interface structure.
-     * @param   aState              New power state.
+     * @param   enmState            New power state.
      * @param   pu64Param           State-specific in/out parameter. For now only used during power-on to provide VM caps.
      *
      * @thread  Any thread.
      */
-    DECLR3CALLBACKMEMBER(int, pfnPciDevicePowerStateChange, (PPDMIPCIRAWUP pInterface,
-                                                             PCIRAWPOWERSTATE     aState,
-                                                             uint64_t             *pu64Param));
+    DECLR3CALLBACKMEMBER(int, pfnPciDevicePowerStateChange, (PPDMIPCIRAWUP      pInterface,
+                                                             PCIRAWPOWERSTATE   enmState,
+                                                             uint64_t          *pu64Param));
 
-     /**
+    /**
      * Notify driver about runtime error.
      *
      * @param   pInterface          Pointer to this interface structure.
@@ -341,9 +331,10 @@ typedef struct PDMIPCIRAWUP
      * @thread  Any thread.
      */
     DECLR3CALLBACKMEMBER(int, pfnReportRuntimeError, (PPDMIPCIRAWUP pInterface,
-                                                      uint8_t              fFatal,
-                                                      const char*          szErrorId,
-                                                      const char*          szMessage));
+                                                      bool          fFatal,
+                                                      const char   *pszErrorId,
+                                                      const char   *pszMessage));
+    /** @} */
 } PDMIPCIRAWUP;
 
 /**
diff --git a/include/VBox/vmm/pdmqueue.h b/include/VBox/vmm/pdmqueue.h
index 9a32be4..4f4139d 100644
--- a/include/VBox/vmm/pdmqueue.h
+++ b/include/VBox/vmm/pdmqueue.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/pdmsrv.h b/include/VBox/vmm/pdmsrv.h
index a3aea50..a474491 100644
--- a/include/VBox/vmm/pdmsrv.h
+++ b/include/VBox/vmm/pdmsrv.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/pdmstorageifs.h b/include/VBox/vmm/pdmstorageifs.h
index a1c8387..ba39688 100644
--- a/include/VBox/vmm/pdmstorageifs.h
+++ b/include/VBox/vmm/pdmstorageifs.h
@@ -596,7 +596,7 @@ typedef enum PDMMEDIAEXIOREQSTATE
 {
     /** Invalid state. */
     PDMMEDIAEXIOREQSTATE_INVALID = 0,
-    /** The request is active and being processed. */ 
+    /** The request is active and being processed. */
     PDMMEDIAEXIOREQSTATE_ACTIVE,
     /** The request is suspended due to an error and no processing will take place. */
     PDMMEDIAEXIOREQSTATE_SUSPENDED,
diff --git a/include/VBox/vmm/pdmthread.h b/include/VBox/vmm/pdmthread.h
index 20dd5e2..78a6834 100644
--- a/include/VBox/vmm/pdmthread.h
+++ b/include/VBox/vmm/pdmthread.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/pdmusb.h b/include/VBox/vmm/pdmusb.h
index a1d04db..6238272 100644
--- a/include/VBox/vmm/pdmusb.h
+++ b/include/VBox/vmm/pdmusb.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -804,7 +804,7 @@ typedef struct PDMUSBINS
  * Checks the structure versions of the USB device instance and USB device
  * helpers, returning if they are incompatible.
  *
- * This is for use in the constructor.
+ * This shall be the first statement of the constructor!
  *
  * @param   pUsbIns     The USB device instance pointer.
  */
@@ -824,18 +824,18 @@ typedef struct PDMUSBINS
  * Quietly checks the structure versions of the USB device instance and
  * USB device helpers, returning if they are incompatible.
  *
- * This is for use in the destructor.
+ * This shall be invoked as the first statement in the destructor!
  *
  * @param   pUsbIns     The USB device instance pointer.
  */
-#define PDMUSB_CHECK_VERSIONS_RETURN_QUIET(pUsbIns) \
+#define PDMUSB_CHECK_VERSIONS_RETURN_VOID(pUsbIns) \
     do \
     { \
         PPDMUSBINS pUsbInsTypeCheck = (pUsbIns); NOREF(pUsbInsTypeCheck); \
         if (RT_LIKELY(PDM_VERSION_ARE_COMPATIBLE((pUsbIns)->u32Version, PDM_USBINS_VERSION) )) \
-        { /* likely */ } else return VERR_PDM_USBINS_VERSION_MISMATCH; \
-        if (RT_LIKELY(PDM_VERSION_ARE_COMPATIBLE((pUsbIns)->pHlpR3->u32Version, PDM_USBHLPR3_VERSION) )) \
-        { /* likely */ } else return VERR_PDM_USBHLPR3_VERSION_MISMATCH; \
+        { /* likely */ } else return; \
+        if (RT_LIKELY(PDM_VERSION_ARE_COMPATIBLE((pUsbIns)->pHlpR3->u32Version, PDM_USBHLP_VERSION) )) \
+        { /* likely */ } else return; \
     } while (0)
 
 
diff --git a/include/VBox/vmm/pdmwebcaminfs.h b/include/VBox/vmm/pdmwebcaminfs.h
index 6cb21fe..7b61578 100644
--- a/include/VBox/vmm/pdmwebcaminfs.h
+++ b/include/VBox/vmm/pdmwebcaminfs.h
@@ -1,11 +1,10 @@
 /* $Id: pdmwebcaminfs.h $ */
-
 /** @file
  * webcaminfs - interfaces between dev and driver.
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -28,90 +27,117 @@
 #ifndef ___VBox_vmm_pdmwebcaminfs_h
 #define ___VBox_vmm_pdmwebcaminfs_h
 
+#include <VBox/types.h>
+
+struct VRDEVIDEOINDEVICEDESC;
+struct VRDEVIDEOINPAYLOADHDR;
+struct VRDEVIDEOINCTRLHDR;
 
-typedef struct PDMIWEBCAM_DEVICEDESC PDMIWEBCAM_DEVICEDESC;
-typedef struct PDMIWEBCAM_CTRLHDR PDMIWEBCAM_CTRLHDR;
-typedef struct PDMIWEBCAM_FRAMEHDR PDMIWEBCAM_FRAMEHDR;
 
+/** @defgroup grp_pdm_ifs_webcam    PDM Web Camera Interfaces
+ * @ingroup grp_pdm_interfaces
+ * @{
+ */
 
-#define PDMIWEBCAMDOWN_IID "0d29b9a1-f4cd-4719-a564-38d5634ba9f8"
-typedef struct PDMIWEBCAMDOWN *PPDMIWEBCAMDOWN;
-typedef struct PDMIWEBCAMDOWN
+/** Pointer to the web camera driver (up) interface. */
+typedef struct PDMIWEBCAMDRV *PPDMIWEBCAMDRV;
+/**
+ * Web camera interface driver provided by the driver to the device,
+ * i.e. facing upwards.
+ */
+typedef struct PDMIWEBCAMDRV
 {
-    /*
+    /**
      * The PDM device is ready to get webcam notifications.
      *
      * @param pInterface  Pointer to the interface.
      * @param fReady      Whether the device is ready.
      */
-    DECLR3CALLBACKMEMBER(void, pfnWebcamDownReady,(PPDMIWEBCAMDOWN pInterface, bool fReady));
+    DECLR3CALLBACKMEMBER(void, pfnReady,(PPDMIWEBCAMDRV pInterface, bool fReady));
 
-    /*
+    /**
      * Send a control request to the webcam.
+     *
      * Async response will be returned by pfnWebcamUpControl callback.
      *
-     * @param pInterface  Pointer to the interface.
-     * @param pvUser      The callers context.
-     * @param u64DeviceId Unique id for the reported webcam assigned by the driver.
-     * @param pCtrl       The control data.
-     * @param cbCtrl      The size of the control data.
+     * @returns VBox status code.
+     * @param pInterface    Pointer to the interface.
+     * @param pvUser        The callers context.
+     * @param idDevice      Unique id for the reported webcam assigned by the driver.
+     * @param pCtrl         The control data.
+     * @param cbCtrl        The size of the control data.
      */
-    DECLR3CALLBACKMEMBER(int, pfnWebcamDownControl,(PPDMIWEBCAMDOWN pInterface, void *pvUser, uint64_t u64DeviceId,
-                                                    const PDMIWEBCAM_CTRLHDR *pCtrl, uint32_t cbCtrl));
-} PDMIWEBCAMDOWN;
+    DECLR3CALLBACKMEMBER(int, pfnControl,(PPDMIWEBCAMDRV pInterface, void *pvUser, uint64_t idDevice,
+                                          struct VRDEVIDEOINCTRLHDR const *pCtrl, uint32_t cbCtrl));
+} PDMIWEBCAMDRV;
+/** Interface ID for PDMIWEBCAMDRV. */
+#define PDMIWEBCAMDRV_IID "0d29b9a1-f4cd-4719-a564-38d5634ba9f8"
 
 
-#define PDMIWEBCAMUP_IID "6ac03e3c-f56c-4a35-80af-c13ce47a9dd7"
-typedef struct PDMIWEBCAMUP *PPDMIWEBCAMUP;
-typedef struct PDMIWEBCAMUP
+/** Pointer to the web camera driver/device (down) interface. */
+typedef struct PDMIWEBCAMDEV *PPDMIWEBCAMDEV;
+/**
+ * Web camera interface provided by the device(/driver) interface,
+ * i.e. facing downwards.
+ */
+typedef struct PDMIWEBCAMDEV
 {
-    /*
+    /**
      * A webcam is available.
      *
-     * @param pInterface   Pointer to the interface.
-     * @param u64DeviceId  Unique id for the reported webcam assigned by the driver.
-     * @param pDeviceDesc  The device description.
-     * @param cbDeviceDesc The size of the device description.
-     * @param u32Version   The remote video input protocol version.
-     * @param fu32Capabilities The remote video input protocol capabilities.
+     * @returns VBox status code.
+     * @param   pInterface      Pointer to the interface.
+     * @param   idDevice        Unique id for the reported webcam assigned by the driver.
+     * @param   pDeviceDesc     The device description.
+     * @param   cbDeviceDesc    The size of the device description.
+     * @param   uVersion        The remote video input protocol version.
+     * @param   fCapabilities   The remote video input protocol capabilities.
      */
-    DECLR3CALLBACKMEMBER(int, pfnWebcamUpAttached,(PPDMIWEBCAMUP pInterface, uint64_t u64DeviceId,
-                                                   const PDMIWEBCAM_DEVICEDESC *pDeviceDesc,
-                                                   uint32_t cbDeviceDesc, uint32_t u32Version, uint32_t fu32Capabilities));
+    DECLR3CALLBACKMEMBER(int, pfnAttached,(PPDMIWEBCAMDEV pInterface, uint64_t idDevice,
+                                           struct VRDEVIDEOINDEVICEDESC const *pDeviceDesc, uint32_t cbDeviceDesc,
+                                           uint32_t uVersion, uint32_t fCapabilities));
 
-    /*
+    /**
      * The webcam is not available anymore.
      *
-     * @param pInterface   Pointer to the interface.
-     * @param u64DeviceId  Unique id for the reported webcam assigned by the driver.
+     * @param   pInterface      Pointer to the interface.
+     * @param   idDevice        Unique id for the reported webcam assigned by the
+     *                          driver.
      */
-    DECLR3CALLBACKMEMBER(void, pfnWebcamUpDetached,(PPDMIWEBCAMUP pInterface, uint64_t u64DeviceId));
+    DECLR3CALLBACKMEMBER(void, pfnDetached,(PPDMIWEBCAMDEV pInterface, uint64_t idDevice));
 
-    /*
+    /**
      * There is a control response or a control change for the webcam.
      *
-     * @param pInterface   Pointer to the interface.
-     * @param fResponse    True if this is a response for a previous pfnWebcamDownControl call.
-     * @param pvUser       The pvUser parameter of the pfnWebcamDownControl call. Undefined if fResponse == false.
-     * @param u64DeviceId  Unique id for the reported webcam assigned by the driver.
-     * @param pCtrl        The control data.
-     * @param cbCtrl       The size of the control data.
+     * @param   pInterface      Pointer to the interface.
+     * @param   fResponse       True if this is a response for a previous pfnWebcamDownControl call.
+     * @param   pvUser          The pvUser parameter of the pfnWebcamDownControl call. Undefined if fResponse == false.
+     * @param   idDevice        Unique id for the reported webcam assigned by the
+     *                          driver.
+     * @param   pCtrl           The control data (defined in VRDE).
+     * @param   cbCtrl          The size of the control data.
      */
-    DECLR3CALLBACKMEMBER(void, pfnWebcamUpControl,(PPDMIWEBCAMUP pInterface, bool fResponse, void *pvUser,
-                                                   uint64_t u64DeviceId, const PDMIWEBCAM_CTRLHDR *pCtrl, uint32_t cbCtrl));
+    DECLR3CALLBACKMEMBER(void, pfnControl,(PPDMIWEBCAMDEV pInterface, bool fResponse, void *pvUser,
+                                           uint64_t idDevice, struct VRDEVIDEOINCTRLHDR const *pCtrl, uint32_t cbCtrl));
 
-    /*
+    /**
      * A new frame.
      *
-     * @param pInterface   Pointer to the interface.
-     * @param u64DeviceId  Unique id for the reported webcam assigned by the driver.
-     * @param pHeader      Payload header.
-     * @param cbHeader     Size of the payload header.
-     * @param pvFrame      Frame (image) data.
-     * @param cbFrame      Size of the image data.
+     * @param   pInterface      Pointer to the interface.
+     * @param   idDevice        Unique id for the reported webcam assigned by the driver.
+     * @param   pHeader         Payload header (defined in VRDE).
+     * @param   cbHeader        Size of the payload header.
+     * @param   pvFrame         Frame (image) data.
+     * @param   cbFrame         Size of the image data.
      */
-    DECLR3CALLBACKMEMBER(void, pfnWebcamUpFrame,(PPDMIWEBCAMUP pInterface, uint64_t u64DeviceId, PDMIWEBCAM_FRAMEHDR *pHeader,
-                                                 uint32_t cbHeader, const void *pvFrame, uint32_t cbFrame));
-} PDMIWEBCAMUP;
+    DECLR3CALLBACKMEMBER(void, pfnFrame,(PPDMIWEBCAMDEV pInterface, uint64_t idDevice,
+                                         struct VRDEVIDEOINPAYLOADHDR const *pHeader, uint32_t cbHeader,
+                                         const void *pvFrame, uint32_t cbFrame));
+} PDMIWEBCAMDEV;
+/** Interface ID for PDMIWEBCAMDEV. */
+#define PDMIWEBCAMDEV_IID "6ac03e3c-f56c-4a35-80af-c13ce47a9dd7"
+
+/** @} */
 
 #endif
+
diff --git a/include/VBox/vmm/pgm.h b/include/VBox/vmm/pgm.h
index c10a49f..4871166 100644
--- a/include/VBox/vmm/pgm.h
+++ b/include/VBox/vmm/pgm.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -140,12 +140,12 @@ typedef enum PGMACCESSTYPE
  */
 #if defined(IN_RC) || defined(IN_RING0)
 # ifdef __cplusplus
-#  define PGM_ALL_CB_DECL(type)     extern "C" DECLEXPORT(type)
+#  define PGM_ALL_CB_DECL(type)     extern "C" DECLCALLBACK(DECLEXPORT(type))
 # else
-#  define PGM_ALL_CB_DECL(type)     DECLEXPORT(type)
+#  define PGM_ALL_CB_DECL(type)     DECLCALLBACK(DECLEXPORT(type))
 # endif
 #else
-# define PGM_ALL_CB_DECL(type)      static type
+# define PGM_ALL_CB_DECL(type)      static DECLCALLBACK(type)
 #endif
 
 /** @def PGM_ALL_CB2_DECL
@@ -155,12 +155,28 @@ typedef enum PGMACCESSTYPE
  */
 #if defined(IN_RC) || defined(IN_RING0)
 # ifdef __cplusplus
-#  define PGM_ALL_CB2_DECL(type)    extern "C" DECLEXPORT(type)
+#  define PGM_ALL_CB2_DECL(type)    extern "C" DECLCALLBACK(DECLEXPORT(type))
 # else
-#  define PGM_ALL_CB2_DECL(type)    DECLEXPORT(type)
+#  define PGM_ALL_CB2_DECL(type)    DECLCALLBACK(DECLEXPORT(type))
 # endif
 #else
-# define PGM_ALL_CB2_DECL(type)     DECLHIDDEN(type)
+# define PGM_ALL_CB2_DECL(type)     DECLCALLBACK(DECLHIDDEN(type))
+#endif
+
+/** @def PGM_ALL_CB2_PROTO
+ * Macro for declaring a handler callback for all contexts.  The handler
+ * callback is hidden in ring-3, and exported in RC and R0.
+ * @param   fnType      The callback function type.
+ * @sa PGM_ALL_CB2_DECL.
+ */
+#if defined(IN_RC) || defined(IN_RING0)
+# ifdef __cplusplus
+#  define PGM_ALL_CB2_PROTO(fnType)    extern "C" DECLEXPORT(fnType)
+# else
+#  define PGM_ALL_CB2_PROTO(fnType)    DECLEXPORT(fnType)
+# endif
+#else
+# define PGM_ALL_CB2_PROTO(fnType)     DECLHIDDEN(fnType)
 #endif
 
 
diff --git a/include/VBox/vmm/rem.h b/include/VBox/vmm/rem.h
index 3245ea2..d56ab88 100644
--- a/include/VBox/vmm/rem.h
+++ b/include/VBox/vmm/rem.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/selm.h b/include/VBox/vmm/selm.h
index 0c15f4a..75a2d8d 100644
--- a/include/VBox/vmm/selm.h
+++ b/include/VBox/vmm/selm.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/ssm.h b/include/VBox/vmm/ssm.h
index 6fb74ee..f36dee2 100644
--- a/include/VBox/vmm/ssm.h
+++ b/include/VBox/vmm/ssm.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/stam.h b/include/VBox/vmm/stam.h
index beaea51..619d969 100644
--- a/include/VBox/vmm/stam.h
+++ b/include/VBox/vmm/stam.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -30,7 +30,11 @@
 #include <iprt/stdarg.h>
 #ifdef _MSC_VER
 # if _MSC_VER >= 1400
+#  pragma warning(push)
+#  pragma warning(disable:4668) /* Several incorrect __cplusplus uses. */
+#  pragma warning(disable:4255) /* Incorrect __slwpcb prototype. */
 #  include <intrin.h>
+#  pragma warning(pop)
 # endif
 #endif
 
diff --git a/include/VBox/vmm/stam.mac b/include/VBox/vmm/stam.mac
index 4d4e37a..8a8f97b 100644
--- a/include/VBox/vmm/stam.mac
+++ b/include/VBox/vmm/stam.mac
@@ -3,7 +3,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/tm.h b/include/VBox/vmm/tm.h
index 9566b1b..161da2e 100644
--- a/include/VBox/vmm/tm.h
+++ b/include/VBox/vmm/tm.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -126,6 +126,11 @@ VMM_INT_DECL(uint64_t)  TMVirtualFromNano(PVM pVM, uint64_t u64NanoTS);
 VMM_INT_DECL(uint64_t)  TMVirtualFromMicro(PVM pVM, uint64_t u64MicroTS);
 VMM_INT_DECL(uint64_t)  TMVirtualFromMilli(PVM pVM, uint64_t u64MilliTS);
 VMM_INT_DECL(bool)      TMVirtualIsTicking(PVM pVM);
+
+VMMR3DECL(uint64_t)     TMR3TimeVirtGet(PUVM pUVM);
+VMMR3DECL(uint64_t)     TMR3TimeVirtGetMilli(PUVM pUVM);
+VMMR3DECL(uint64_t)     TMR3TimeVirtGetMicro(PUVM pUVM);
+VMMR3DECL(uint64_t)     TMR3TimeVirtGetNano(PUVM pUVM);
 /** @} */
 
 
diff --git a/include/VBox/vmm/trpm.h b/include/VBox/vmm/trpm.h
index 511b989..7dfca1e 100644
--- a/include/VBox/vmm/trpm.h
+++ b/include/VBox/vmm/trpm.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/trpm.mac b/include/VBox/vmm/trpm.mac
index 474875e..d2513a6 100644
--- a/include/VBox/vmm/trpm.mac
+++ b/include/VBox/vmm/trpm.mac
@@ -3,7 +3,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/uvm.h b/include/VBox/vmm/uvm.h
index d9524ed..2a1a6f8 100644
--- a/include/VBox/vmm/uvm.h
+++ b/include/VBox/vmm/uvm.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/vm.h b/include/VBox/vmm/vm.h
index 2ab767f..e005234 100644
--- a/include/VBox/vmm/vm.h
+++ b/include/VBox/vmm/vm.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -228,7 +228,7 @@ typedef struct VMCPU
 #ifdef ___GIMInternal_h
         struct GIMCPU s;
 #endif
-        uint8_t             padding[64];        /* multiple of 64 */
+        uint8_t             padding[256];       /* multiple of 64 */
     } gim;
 
     /** APIC part. */
@@ -253,7 +253,7 @@ typedef struct VMCPU
     STAMPROFILEADV          aStatAdHoc[8];                          /* size: 40*8 = 320 */
 
     /** Align the following members on page boundary. */
-    uint8_t                 abAlignment2[3640];
+    uint8_t                 abAlignment2[3448];
 
     /** PGM part. */
     union VMCPUUNIONPGM
diff --git a/include/VBox/vmm/vm.mac b/include/VBox/vmm/vm.mac
index 3c0e82b..8f183b4 100644
--- a/include/VBox/vmm/vm.mac
+++ b/include/VBox/vmm/vm.mac
@@ -3,7 +3,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
@@ -69,7 +69,7 @@ struc VMCPU
     .pdm                    resb 256
     .iom                    resb 512
     .dbgf                   resb 256
-    .gim                    resb 64
+    .gim                    resb 256
     .apic                   resb 768
 
     .fTraceGroups           resd 1
diff --git a/include/VBox/vmm/vmapi.h b/include/VBox/vmm/vmapi.h
index 611f4bf..ecbaa90 100644
--- a/include/VBox/vmm/vmapi.h
+++ b/include/VBox/vmm/vmapi.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/vmcpuset.h b/include/VBox/vmm/vmcpuset.h
index 4eb35e4..e9aef96 100644
--- a/include/VBox/vmm/vmcpuset.h
+++ b/include/VBox/vmm/vmcpuset.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vmm/vmm.h b/include/VBox/vmm/vmm.h
index 687fedd..df7dfca 100644
--- a/include/VBox/vmm/vmm.h
+++ b/include/VBox/vmm/vmm.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vrdpusb.h b/include/VBox/vrdpusb.h
index cdbeeb1..a42b6a7 100644
--- a/include/VBox/vrdpusb.h
+++ b/include/VBox/vrdpusb.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vscsi.h b/include/VBox/vscsi.h
index a33e131..881dd9b 100644
--- a/include/VBox/vscsi.h
+++ b/include/VBox/vscsi.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/VBox/vusb.h b/include/VBox/vusb.h
index c893f28..813976d 100644
--- a/include/VBox/vusb.h
+++ b/include/VBox/vusb.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/aiomgr.h b/include/iprt/aiomgr.h
index b41dd24..fbd9ac4 100644
--- a/include/iprt/aiomgr.h
+++ b/include/iprt/aiomgr.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/alloc.h b/include/iprt/alloc.h
index 05a2964..022f71e 100644
--- a/include/iprt/alloc.h
+++ b/include/iprt/alloc.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/alloca.h b/include/iprt/alloca.h
index 404f95e..5d46326 100644
--- a/include/iprt/alloca.h
+++ b/include/iprt/alloca.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -38,13 +38,17 @@
  * interesting of course...
  */
 #if defined(IN_RING0) \
- && (defined(RT_OS_DARWIN) || defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD))
+ && (   defined(RT_OS_DARWIN) \
+     || defined(RT_OS_FREEBSD) \
+     || defined(RT_OS_LINUX) \
+     || defined(RT_OS_NETBSD) \
+     || defined(RT_OS_SOLARIS))
 /* ASSUMES GNU C */
 # define alloca(cb) __builtin_alloca(cb)
 
 #else
 # include <stdlib.h>
-# if !defined(RT_OS_DARWIN) && !defined(RT_OS_FREEBSD)
+# if !defined(RT_OS_DARWIN) && !defined(RT_OS_FREEBSD) && !defined(RT_OS_NETBSD)
 #  include <malloc.h>
 # endif
 # if defined(RT_OS_SOLARIS) || defined(RT_OS_LINUX)
diff --git a/include/iprt/asm-amd64-x86-watcom-16.h b/include/iprt/asm-amd64-x86-watcom-16.h
index 8d41c5c..eedb0da 100644
--- a/include/iprt/asm-amd64-x86-watcom-16.h
+++ b/include/iprt/asm-amd64-x86-watcom-16.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/asm-amd64-x86-watcom-32.h b/include/iprt/asm-amd64-x86-watcom-32.h
index 1408ed8..3e22dd1 100644
--- a/include/iprt/asm-amd64-x86-watcom-32.h
+++ b/include/iprt/asm-amd64-x86-watcom-32.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/asm-amd64-x86.h b/include/iprt/asm-amd64-x86.h
index 047c8f3..4f9d647 100644
--- a/include/iprt/asm-amd64-x86.h
+++ b/include/iprt/asm-amd64-x86.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -33,7 +33,11 @@
 #endif
 
 #if defined(_MSC_VER) && RT_INLINE_ASM_USES_INTRIN
+# pragma warning(push)
+# pragma warning(disable:4668) /* Several incorrect __cplusplus uses. */
+# pragma warning(disable:4255) /* Incorrect __slwpcb prototype. */
 # include <intrin.h>
+# pragma warning(pop)
    /* Emit the intrinsics at all optimization levels. */
 # pragma intrinsic(_ReadWriteBarrier)
 # pragma intrinsic(__cpuid)
diff --git a/include/iprt/asm-math.h b/include/iprt/asm-math.h
index 6de8e96..bda7934 100644
--- a/include/iprt/asm-math.h
+++ b/include/iprt/asm-math.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,11 @@
 #include <iprt/types.h>
 
 #if defined(_MSC_VER) && RT_INLINE_ASM_USES_INTRIN
+# pragma warning(push)
+# pragma warning(disable:4668) /* Several incorrect __cplusplus uses. */
+# pragma warning(disable:4255) /* Incorrect __slwpcb prototype. */
 # include <intrin.h>
+# pragma warning(pop)
   /* Emit the intrinsics at all optimization levels. */
 # pragma intrinsic(__emul)
 # pragma intrinsic(__emulu)
diff --git a/include/iprt/asm-watcom-x86-16.h b/include/iprt/asm-watcom-x86-16.h
index f955fd0..d9f9993 100644
--- a/include/iprt/asm-watcom-x86-16.h
+++ b/include/iprt/asm-watcom-x86-16.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/asm-watcom-x86-32.h b/include/iprt/asm-watcom-x86-32.h
index c20933c..a543d9d 100644
--- a/include/iprt/asm-watcom-x86-32.h
+++ b/include/iprt/asm-watcom-x86-32.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/asm.h b/include/iprt/asm.h
index d091fe9..3dd3f49 100644
--- a/include/iprt/asm.h
+++ b/include/iprt/asm.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -40,7 +40,11 @@
 #endif
 
 #if defined(_MSC_VER) && RT_INLINE_ASM_USES_INTRIN
+# pragma warning(push)
+# pragma warning(disable:4668) /* Several incorrect __cplusplus uses. */
+# pragma warning(disable:4255) /* Incorrect __slwpcb prototype. */
 # include <intrin.h>
+# pragma warning(pop)
   /* Emit the intrinsics at all optimization levels. */
 # pragma intrinsic(_ReadWriteBarrier)
 # pragma intrinsic(__cpuid)
@@ -152,6 +156,8 @@
 #ifndef RT_INLINE_DONT_MIX_CMPXCHG8B_AND_PIC
 # if defined(DOXYGEN_RUNNING) || defined(__WATCOMC__) /* Watcom has trouble with the expression below */
 #  define RT_INLINE_DONT_MIX_CMPXCHG8B_AND_PIC 1
+# elif defined(_MSC_VER) /* Visual C++ has trouble too, but it'll only tell us when C4688 is enabled. */
+#  define RT_INLINE_DONT_MIX_CMPXCHG8B_AND_PIC 0
 # else
 #  define RT_INLINE_DONT_MIX_CMPXCHG8B_AND_PIC \
     (   (defined(PIC) || defined(__PIC__)) \
@@ -3933,7 +3939,7 @@ DECLINLINE(bool) ASMMemIsZeroPage(void const *pvPage)
     return uAX.f;
 # else
    uintptr_t const *puPtr = (uintptr_t const *)pvPage;
-   int              cLeft = RT_ASM_PAGE_SIZE / sizeof(uintptr_t) / 8;
+   size_t           cLeft = RT_ASM_PAGE_SIZE / sizeof(uintptr_t) / 8;
    Assert(!((uintptr_t)pvPage & 15));
    for (;;)
    {
@@ -3953,7 +3959,6 @@ DECLINLINE(bool) ASMMemIsZeroPage(void const *pvPage)
            return true;
        puPtr += 8;
    }
-   return true;
 # endif
 }
 
diff --git a/include/iprt/asmdefs.mac b/include/iprt/asmdefs.mac
index 31117ed..6d20044 100644
--- a/include/iprt/asmdefs.mac
+++ b/include/iprt/asmdefs.mac
@@ -1,994 +1,994 @@
-;; @file
-; IPRT - Global YASM/NASM macros
-;
-
-;
-; Copyright (C) 2006-2015 Oracle Corporation
-;
-; This file is part of VirtualBox Open Source Edition (OSE), as
-; available from http://www.virtualbox.org. This file is free software;
-; you can redistribute it and/or modify it under the terms of the GNU
-; General Public License (GPL) as published by the Free Software
-; Foundation, in version 2 as it comes in the "COPYING" file of the
-; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
-; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-;
-; The contents of this file may alternatively be used under the terms
-; of the Common Development and Distribution License Version 1.0
-; (CDDL) only, as it comes in the "COPYING.CDDL" file of the
-; VirtualBox OSE distribution, in which case the provisions of the
-; CDDL are applicable instead of those of the GPL.
-;
-; You may elect to license modified versions of this file under the
-; terms and conditions of either the GPL or the CDDL or both.
-;
-
-; Special hack for bs3kit.
-%ifdef RT_ASMDEFS_INC_FIRST_FILE
- %include "asmdefs-first.mac"
-%endif
-
-%ifndef ___iprt_asmdefs_mac
-%define ___iprt_asmdefs_mac
-
-
-;; @defgroup grp_rt_cdefs_size     Size Constants
-; (Of course, these are binary computer terms, not SI.)
-; @{
-;; 1 K (Kilo)                     (1 024).
-%define _1K                     000000400h
-;; 4 K (Kilo)                     (4 096).
-%define _4K                     000001000h
-;; 32 K (Kilo)                   (32 678).
-%define _32K                    000008000h
-;; 64 K (Kilo)                   (65 536).
-%define _64K                    000010000h
-;; 128 K (Kilo)                 (131 072).
-%define _128K                   000020000h
-;; 256 K (Kilo)                 (262 144).
-%define _256K                   000040000h
-;; 512 K (Kilo)                 (524 288).
-%define _512K                   000080000h
-;; 1 M (Mega)                 (1 048 576).
-%define _1M                     000100000h
-;; 2 M (Mega)                 (2 097 152).
-%define _2M                     000200000h
-;; 4 M (Mega)                 (4 194 304).
-%define _4M                     000400000h
-;; 1 G (Giga)             (1 073 741 824).
-%define _1G                     040000000h
-;; 2 G (Giga)             (2 147 483 648).
-%define _2G             00000000080000000h
-;; 4 G (Giga)             (4 294 967 296).
-%define _4G             00000000100000000h
-;; 1 T (Tera)         (1 099 511 627 776).
-%define _1T             00000010000000000h
-;; 1 P (Peta)     (1 125 899 906 842 624).
-%define _1P             00004000000000000h
-;; 1 E (Exa)  (1 152 921 504 606 846 976).
-%define _1E             01000000000000000h
-;; 2 E (Exa)  (2 305 843 009 213 693 952).
-%define _2E             02000000000000000h
-;; @}
-
-
-;;
-; Make the mask for the given bit.
-%define RT_BIT(bit)        (1 << bit)
-
-;;
-; Make the mask for the given bit.
-%define RT_BIT_32(bit)     (1 << bit)
-;;
-; Make the mask for the given bit.
-%define RT_BIT_64(bit)     (1 << bit)
-
-;;
-; Makes a 32-bit unsigned (not type safe, but whatever) out of four byte values.
-%define RT_MAKE_U32_FROM_U8(b0, b1, b2, b3) ( (b3 << 24) | (b2 << 16) | (b1 << 8) | b0 )
-
-;; Preprocessor concatenation macro.
-%define RT_CONCAT(a_1,a_2)              a_1 %+ a_2
-
-;; Preprocessor concatenation macro, three arguments.
-%define RT_CONCAT3(a_1,a_2,a_3)         a_1 %+ a_2 %+ a_3
-
-;; Preprocessor concatenation macro, four arguments.
-%define RT_CONCAT4(a_1,a_2,a_3,a_4)     a_1 %+ a_2 %+ a_3 %+ a_4
-
-
-;; Define ASM_FORMAT_PE64 if applicable.
-%ifdef ASM_FORMAT_PE
- %ifdef RT_ARCH_AMD64
-  %define ASM_FORMAT_PE64       1
- %endif
-%endif
-
-;;
-; SEH64 macros.
-%ifdef RT_ASM_WITH_SEH64
- %ifndef ASM_FORMAT_PE64
-  %undef RT_ASM_WITH_SEH64
- %endif
-%endif
-
-;;
-; Records a xBP push.
-%macro SEH64_PUSH_xBP 0
- %ifdef RT_ASM_WITH_SEH64
-  [pushreg rbp]
- %endif
-%endmacro
-
-;;
-; Sets xBP as frame pointer that's pointing to a stack position %1 relative to xBP.
-%macro SEH64_SET_FRAME_xBP 1
- %ifdef RT_ASM_WITH_SEH64
-  [setframe rbp, %1]
- %endif
-%endmacro
-
-;;
-; Records an ADD xSP, %1.
-%macro SEH64_ALLOCATE_STACK 1
- %ifdef RT_ASM_WITH_SEH64
-  [allocstack %1]
- %endif
-%endmacro
-
-;;
-; Ends the prologue.
-%macro SEH64_END_PROLOGUE 0
- %ifdef RT_ASM_WITH_SEH64
- [endprolog]
- %endif
-%endmacro
-
-
-;;
-; Align code, pad with INT3.
-%define ALIGNCODE(alignment) align alignment, db 0cch
-
-;;
-; Align data, pad with ZEROs.
-%define ALIGNDATA(alignment) align alignment, db 0
-
-;;
-; Align BSS, pad with ZEROs.
-%define ALIGNBSS(alignment) align alignment, resb 1
-
-;;
-; NAME_OVERLOAD can be defined by a .asm module to modify all the
-; names created using the name macros in this files.
-; This is handy when you've got some kind of template code.
-%ifndef NAME_OVERLOAD
- %define NAME_OVERLOAD(name) name
-%endif
-
-;;
-; Mangles the given name so it can be referenced using DECLASM() in the
-; C/C++ world.
-%ifndef ASM_FORMAT_BIN
- %ifdef RT_ARCH_X86
-  %ifdef RT_OS_OS2
-   %define NAME(name)   _ %+ NAME_OVERLOAD(name)
-  %endif
-  %ifdef RT_OS_WINDOWS
-   %define NAME(name)   _ %+ NAME_OVERLOAD(name)
-  %endif
- %endif
- %ifdef RT_OS_DARWIN
-  %define NAME(name)    _ %+ NAME_OVERLOAD(name)
- %endif
-%endif
-%ifndef NAME
- %define NAME(name)     NAME_OVERLOAD(name)
-%endif
-
-;;
-; Mangles the given C name so it will _import_ the right symbol.
-%ifdef ASM_FORMAT_PE
- %define IMPNAME(name)  __imp_ %+ NAME(name)
-%else
- %define IMPNAME(name)  NAME(name)
-%endif
-
-;;
-; Gets the pointer to an imported object.
-%ifdef ASM_FORMAT_PE
- %ifdef RT_ARCH_AMD64
-  %define IMP(name)     qword [IMPNAME(name) wrt rip]
- %else
-  %define IMP(name)     dword [IMPNAME(name)]
- %endif
-%else
- %define IMP(name)      IMPNAME(name)
-%endif
-
-;;
-; Gets the pointer to an imported object.
-%ifdef ASM_FORMAT_PE
- %ifdef RT_ARCH_AMD64
-  %define IMP_SEG(SegOverride, name)  qword [SegOverride:IMPNAME(name) wrt rip]
- %else
-  %define IMP_SEG(SegOverride, name)  dword [SegOverride:IMPNAME(name)]
- %endif
-%else
- %define IMP_SEG(SegOverride, name)   IMPNAME(name)
-%endif
-
-;;
-; Declares an imported object for use with IMP2.
-; @note May change the current section!
-%macro EXTERN_IMP2 1
-    extern IMPNAME(%1)
-    BEGINDATA
- %ifdef ASM_FORMAT_MACHO
-    g_Imp2_ %+ %1:  RTCCPTR_DEF IMPNAME(%1)
- %endif
-%endmacro
-
-;;
-; Gets the pointer to an imported object, version 2.
-%ifdef ASM_FORMAT_PE
- %ifdef RT_ARCH_AMD64
-  %define IMP2(name)    qword [IMPNAME(name) wrt rip]
- %else
-  %define IMP2(name)    dword [IMPNAME(name)]
- %endif
-%elifdef ASM_FORMAT_ELF
- %ifdef PIC
-  %ifdef RT_ARCH_AMD64
-   %define IMP2(name)   qword [rel IMPNAME(name) wrt ..got]
-  %else
-   %define IMP2(name)   IMPNAME(name) wrt ..plt
-  %endif
- %endif
-%elifdef ASM_FORMAT_MACHO
- %define IMP2(name)     RTCCPTR_PRE [g_Imp2_ %+ name xWrtRIP]
-%endif
-%ifndef IMP2
- %define IMP2(name)     IMPNAME(name)
-%endif
-
-
-
-;;
-; Global marker which is DECLASM() compatible.
-%macro GLOBALNAME 1
-%ifndef ASM_FORMAT_BIN
-global NAME(%1)
-%endif
-NAME(%1):
-%endmacro
-
-;;
-; Global exported marker which is DECLASM() compatible.
-%macro EXPORTEDNAME 1
- %ifdef ASM_FORMAT_PE
-  export %1=NAME(%1)
- %endif
- %ifdef __NASM__
-  %ifdef ASM_FORMAT_OMF
-   export NAME(%1) NAME(%1)
-  %endif
-%endif
-GLOBALNAME %1
-%endmacro
-
-;;
-; Global marker which is DECLASM() compatible.
-%macro GLOBALNAME_EX 2
-%ifndef ASM_FORMAT_BIN
- %ifdef ASM_FORMAT_ELF
-global NAME(%1):%2
- %else
-global NAME(%1)
- %endif
-%endif
-NAME(%1):
-%endmacro
-
-;;
-; Global exported marker which is DECLASM() compatible.
-%macro EXPORTEDNAME_EX 2
- %ifdef ASM_FORMAT_PE
-  export %1=NAME(%1)
- %endif
- %ifdef __NASM__
-  %ifdef ASM_FORMAT_OMF
-   export NAME(%1) NAME(%1)
-  %endif
-%endif
-GLOBALNAME_EX %1, %2
-%endmacro
-
-;;
-; Begins a C callable procedure.
-%macro BEGINPROC 1
- %ifdef RT_ASM_WITH_SEH64
-global     NAME(%1):function
-proc_frame NAME(%1)
- %else
-GLOBALNAME_EX %1, function hidden
- %endif
-%endmacro
-
-;;
-; Begins a C callable exported procedure.
-%macro BEGINPROC_EXPORTED 1
- %ifdef RT_ASM_WITH_SEH64
-  %ifdef ASM_FORMAT_PE
-export  %1=NAME(%1)
-  %endif
-global     NAME(%1):function
-proc_frame NAME(%1)
- %else
-EXPORTEDNAME_EX %1, function
- %endif
-%endmacro
-
-;;
-; Ends a C callable procedure.
-%macro ENDPROC 1
- %ifdef RT_ASM_WITH_SEH64
-endproc_frame
- %endif
-GLOBALNAME_EX %1 %+ _EndProc, function hidden
-%ifdef ASM_FORMAT_ELF
- %ifndef __NASM__ ; nasm does this in the global directive.
-size NAME(%1)               NAME(%1 %+ _EndProc) - NAME(%1)
-size NAME(%1 %+ _EndProc)   0
- %endif
-%endif
-    db  0xCC, 0xCC, 0xCC, 0xCC
-%endmacro
-
-
-;
-; Do OMF and Mach-O/Yasm segment definitions
-;
-; Both format requires this to get the segment order right, in the Mach-O/Yasm case
-; it's only to make sure the .bss section ends up last (it's not declared here).
-;
-%ifdef ASM_FORMAT_OMF
- %ifndef RT_NOINC_SEGMENTS
-
-  ; 16-bit segments first (OMF / OS/2 specific).
-  %ifdef RT_INCL_16BIT_SEGMENTS
-   segment DATA16 public CLASS=FAR_DATA align=16 use16
-   segment DATA16_INIT public CLASS=FAR_DATA align=16 use16
-   group DGROUP16 DATA16 DATA16_INIT
-
-   ;;
-   ; Begins 16-bit data
-   %macro BEGINDATA16 0
-    segment DATA16
-   %endmacro
-
-   ;;
-   ; Begins 16-bit init data
-   %macro BEGINDATA16INIT 0
-    segment DATA16_INIT
-   %endmacro
-
-   segment CODE16 public CLASS=FAR_CODE align=16 use16
-   segment CODE16_INIT public CLASS=FAR_CODE align=16 use16
-   group CGROUP16 CODE16 CODE16_INIT
-
-   ;;
-   ; Begins 16-bit code
-   %macro BEGINCODE16 0
-    segment CODE16
-   %endmacro
-
-   ;;
-   ; Begins 16-bit init code
-   %macro BEGINCODE16INIT 0
-    segment CODE16_INIT
-   %endmacro
-
-  %endif
-
-  ; 32-bit segments.
-  segment TEXT32 public CLASS=CODE align=16 use32 flat
-  segment DATA32 public CLASS=DATA align=16 use32 flat
-  segment BSS32  public CLASS=BSS  align=16 use32 flat
-
-  ; Make the TEXT32 segment default.
-  segment TEXT32
- %endif ; RT_NOINC_SEGMENTS
-%endif
-
-%ifdef ASM_FORMAT_MACHO
- %ifdef __YASM__
-  section .text
-  section .data
- %endif
-%endif
-
-
-;;
-; Begins code
-%ifdef ASM_FORMAT_OMF
- %macro BEGINCODE 0
-  segment TEXT32
- %endmacro
-%else
-%macro BEGINCODE 0
- section .text
-%endmacro
-%endif
-
-;;
-; Begins constant (read-only) data
-;
-; @remarks  This is mapped to the CODE section/segment when there isn't
-;           any dedicated const section/segment. (There is code that
-;           assumes this, so don't try change it.)
-%ifdef ASM_FORMAT_OMF
- %macro BEGINCONST 0
-  segment TEXT32
- %endmacro
-%else
- %macro BEGINCONST 0
-  %ifdef ASM_FORMAT_MACHO ;; @todo check the other guys too.
-   section .rodata
-  %else
-   section .text
-  %endif
- %endmacro
-%endif
-
-;;
-; Begins initialized data
-%ifdef ASM_FORMAT_OMF
- %macro BEGINDATA 0
-  segment DATA32
- %endmacro
-%else
-%macro BEGINDATA 0
- section .data
-%endmacro
-%endif
-
-;;
-; Begins uninitialized data
-%ifdef ASM_FORMAT_OMF
- %macro BEGINBSS 0
-  segment BSS32
- %endmacro
-%else
-%macro BEGINBSS 0
- section .bss
-%endmacro
-%endif
-
-
-
-;; @def ARCH_BITS
-; Defines the bit count of the current context.
-%ifndef ARCH_BITS
- %ifdef RT_ARCH_AMD64
-  %define ARCH_BITS 64
- %else
-  %define ARCH_BITS 32
- %endif
-%endif
-
-;; @def HC_ARCH_BITS
-; Defines the host architechture bit count.
-%ifndef HC_ARCH_BITS
- %ifndef IN_RC
-  %define HC_ARCH_BITS ARCH_BITS
- %else
-  %define HC_ARCH_BITS 32
- %endif
-%endif
-
-;; @def R3_ARCH_BITS
-; Defines the host ring-3 architechture bit count.
-%ifndef R3_ARCH_BITS
- %ifdef IN_RING3
-  %define R3_ARCH_BITS ARCH_BITS
- %else
-  %define R3_ARCH_BITS HC_ARCH_BITS
- %endif
-%endif
-
-;; @def R0_ARCH_BITS
-; Defines the host ring-0 architechture bit count.
-%ifndef R0_ARCH_BITS
- %ifdef IN_RING0
-  %define R0_ARCH_BITS ARCH_BITS
- %else
-  %define R0_ARCH_BITS HC_ARCH_BITS
- %endif
-%endif
-
-;; @def GC_ARCH_BITS
-; Defines the guest architechture bit count.
-%ifndef GC_ARCH_BITS
- %ifdef IN_RC
-  %define GC_ARCH_BITS ARCH_BITS
- %else
-  %define GC_ARCH_BITS 32
- %endif
-%endif
-
-
-
-;; @def RTHCPTR_DEF
-; The pesudo-instruction used to declare an initialized pointer variable in the host context.
-%if HC_ARCH_BITS == 64
- %define RTHCPTR_DEF    dq
-%else
- %define RTHCPTR_DEF    dd
-%endif
-
-;; @def RTHCPTR_RES
-; The pesudo-instruction used to declare (=reserve space for) an uninitialized pointer
-; variable of the host context.
-%if HC_ARCH_BITS == 64
- %define RTHCPTR_RES    resq
-%else
- %define RTHCPTR_RES    resd
-%endif
-
-;; @def RTHCPTR_PRE
-; The memory operand prefix used for a pointer in the host context.
-%if HC_ARCH_BITS == 64
- %define RTHCPTR_PRE    qword
-%else
- %define RTHCPTR_PRE    dword
-%endif
-
-;; @def RTHCPTR_CB
-; The size in bytes of a pointer in the host context.
-%if HC_ARCH_BITS == 64
- %define RTHCPTR_CB     8
-%else
- %define RTHCPTR_CB     4
-%endif
-
-
-
-;; @def RTR0PTR_DEF
-; The pesudo-instruction used to declare an initialized pointer variable in the ring-0 host context.
-%if R0_ARCH_BITS == 64
- %define RTR0PTR_DEF    dq
-%else
- %define RTR0PTR_DEF    dd
-%endif
-
-;; @def RTR0PTR_RES
-; The pesudo-instruction used to declare (=reserve space for) an uninitialized pointer
-; variable of the ring-0 host context.
-%if R0_ARCH_BITS == 64
- %define RTR0PTR_RES    resq
-%else
- %define RTR0PTR_RES    resd
-%endif
-
-;; @def RTR0PTR_PRE
-; The memory operand prefix used for a pointer in the ring-0 host context.
-%if R0_ARCH_BITS == 64
- %define RTR0PTR_PRE    qword
-%else
- %define RTR0PTR_PRE    dword
-%endif
-
-;; @def RTR0PTR_CB
-; The size in bytes of a pointer in the ring-0 host context.
-%if R0_ARCH_BITS == 64
- %define RTR0PTR_CB     8
-%else
- %define RTR0PTR_CB     4
-%endif
-
-
-
-;; @def RTR3PTR_DEF
-; The pesudo-instruction used to declare an initialized pointer variable in the ring-3 host context.
-%if R3_ARCH_BITS == 64
- %define RTR3PTR_DEF    dq
-%else
- %define RTR3PTR_DEF    dd
-%endif
-
-;; @def RTR3PTR_RES
-; The pesudo-instruction used to declare (=reserve space for) an uninitialized pointer
-; variable of the ring-3 host context.
-%if R3_ARCH_BITS == 64
- %define RTR3PTR_RES    resq
-%else
- %define RTR3PTR_RES    resd
-%endif
-
-;; @def RTR3PTR_PRE
-; The memory operand prefix used for a pointer in the ring-3 host context.
-%if R3_ARCH_BITS == 64
- %define RTR3PTR_PRE    qword
-%else
- %define RTR3PTR_PRE    dword
-%endif
-
-;; @def RTR3PTR_CB
-; The size in bytes of a pointer in the ring-3 host context.
-%if R3_ARCH_BITS == 64
- %define RTR3PTR_CB     8
-%else
- %define RTR3PTR_CB     4
-%endif
-
-
-
-;; @def RTGCPTR_DEF
-; The pesudo-instruction used to declare an initialized pointer variable in the guest context.
-%if GC_ARCH_BITS == 64
- %define RTGCPTR_DEF    dq
-%else
- %define RTGCPTR_DEF    dd
-%endif
-
-;; @def RTGCPTR_RES
-; The pesudo-instruction used to declare (=reserve space for) an uninitialized pointer
-; variable of the guest context.
-%if GC_ARCH_BITS == 64
- %define RTGCPTR_RES    resq
-%else
- %define RTGCPTR_RES    resd
-%endif
-
-%define RTGCPTR32_RES   resd
-%define RTGCPTR64_RES   resq
-
-;; @def RTGCPTR_PRE
-; The memory operand prefix used for a pointer in the guest context.
-%if GC_ARCH_BITS == 64
- %define RTGCPTR_PRE    qword
-%else
- %define RTGCPTR_PRE    dword
-%endif
-
-;; @def RTGCPTR_CB
-; The size in bytes of a pointer in the guest context.
-%if GC_ARCH_BITS == 64
- %define RTGCPTR_CB     8
-%else
- %define RTGCPTR_CB     4
-%endif
-
-
-;; @def RTRCPTR_DEF
-; The pesudo-instruction used to declare an initialized pointer variable in the raw mode context.
-%define RTRCPTR_DEF    dd
-
-;; @def RTRCPTR_RES
-; The pesudo-instruction used to declare (=reserve space for) an uninitialized pointer
-; variable of the raw mode context.
-%define RTRCPTR_RES    resd
-
-;; @def RTRCPTR_PRE
-; The memory operand prefix used for a pointer in the raw mode context.
-%define RTRCPTR_PRE    dword
-
-;; @def RTRCPTR_CB
-; The size in bytes of a pointer in the raw mode context.
-%define RTRCPTR_CB     4
-
-
-;; @def RT_CCPTR_DEF
-; The pesudo-instruction used to declare an initialized pointer variable in the current context.
-
-;; @def RT_CCPTR_RES
-; The pesudo-instruction used to declare (=reserve space for) an uninitialized pointer
-; variable of the current context.
-
-;; @def RT_CCPTR_PRE
-; The memory operand prefix used for a pointer in the current context.
-
-;; @def RT_CCPTR_CB
-; The size in bytes of a pointer in the current context.
-
-%ifdef IN_RC
- %define RTCCPTR_DEF        RTRCPTR_DEF
- %define RTCCPTR_RES        RTRCPTR_RES
- %define RTCCPTR_PRE        RTRCPTR_PRE
- %define RTCCPTR_CB         RTRCPTR_CB
-%else
- %ifdef IN_RING0
-  %define RTCCPTR_DEF       RTR0PTR_DEF
-  %define RTCCPTR_RES       RTR0PTR_RES
-  %define RTCCPTR_PRE       RTR0PTR_PRE
-  %define RTCCPTR_CB        RTR0PTR_CB
- %else
-  %define RTCCPTR_DEF       RTR3PTR_DEF
-  %define RTCCPTR_RES       RTR3PTR_RES
-  %define RTCCPTR_PRE       RTR3PTR_PRE
-  %define RTCCPTR_CB        RTR3PTR_CB
- %endif
-%endif
-
-
-
-;; @def RTHCPHYS_DEF
-; The pesudo-instruction used to declare an initialized host physical address.
-%define RTHCPHYS_DEF    dq
-
-;; @def RTHCPTR_RES
-; The pesudo-instruction used to declare (=reserve space for) an uninitialized
-; host physical address variable
-%define RTHCPHYS_RES    resq
-
-;; @def RTHCPTR_PRE
-; The memory operand prefix used for a host physical address.
-%define RTHCPHYS_PRE    qword
-
-;; @def RTHCPHYS_CB
-; The size in bytes of a host physical address.
-%define RTHCPHYS_CB     8
-
-
-
-;; @def RTGCPHYS_DEF
-; The pesudo-instruction used to declare an initialized guest physical address.
-%define RTGCPHYS_DEF    dq
-
-;; @def RTGCPHYS_RES
-; The pesudo-instruction used to declare (=reserve space for) an uninitialized
-; guest physical address variable
-%define RTGCPHYS_RES    resq
-
-;; @def RTGCPTR_PRE
-; The memory operand prefix used for a guest physical address.
-%define RTGCPHYS_PRE    qword
-
-;; @def RTGCPHYS_CB
-; The size in bytes of a guest physical address.
-%define RTGCPHYS_CB     8
-
-
-
-;;
-; The size of the long double C/C++ type.
-; On 32-bit Darwin this is 16 bytes, on L4, Linux, OS/2 and Windows
-; it's 12 bytes.
-; @todo figure out what 64-bit Windows does (I don't recall right now).
-%ifdef RT_ARCH_X86
- %ifdef RT_OS_DARWIN
-  %define RTLRD_CB          16
- %else
-  %define RTLRD_CB          12
- %endif
-%else
-  %define RTLRD_CB          16
-%endif
-
-
-
-;; @def ASM_CALL64_GCC
-; Indicates that we're using the GCC 64-bit calling convention.
-; @see @ref sec_vboxrem_amd64_compare (in VBoxREMWrapper.cpp) for an ABI description.
-
-;; @def ASM_CALL64_MSC
-; Indicates that we're using the Microsoft 64-bit calling convention (fastcall on steroids).
-; @see @ref sec_vboxrem_amd64_compare (in VBoxREMWrapper.cpp) for an ABI description.
-
-; Note: On X86 we're using cdecl unconditionally. There is not yet any common
-; calling convention on AMD64, that's why we need to support two different ones.)
-
-%ifdef RT_ARCH_AMD64
- %ifndef ASM_CALL64_GCC
-  %ifndef ASM_CALL64_MSC
-   ; define it based on the object format.
-   %ifdef ASM_FORMAT_PE
-    %define ASM_CALL64_MSC
-   %else
-    %define ASM_CALL64_GCC
-   %endif
-  %endif
- %else
-  ; sanity check.
-  %ifdef ASM_CALL64_MSC
-   %error "Only one of the ASM_CALL64_* defines should be defined!"
-  %endif
- %endif
-%else
- ;later; %ifdef ASM_CALL64_GCC
- ;later;  %error "ASM_CALL64_GCC is defined without RT_ARCH_AMD64!" ASM_CALL64_GCC
- ;later; %endif
- ;later; %ifdef ASM_CALL64_MSC
- ;later;  %error "ASM_CALL64_MSC is defined without RT_ARCH_AMD64!" ASM_CALL64_MSC
- ;later; %endif
-%endif
-
-
-;; @def RT_NOCRT
-; Symbol name wrapper for the No-CRT bits.
-;
-; In order to coexist in the same process as other CRTs, we need to
-; decorate the symbols such that they don't conflict the ones in the
-; other CRTs. The result of such conflicts / duplicate symbols can
-; confuse the dynamic loader on unix like systems.
-;
-; @remark Always feed the name to this macro first and then pass the result
-;         on to the next *NAME* macro.
-;
-%ifndef RT_WITHOUT_NOCRT_WRAPPERS
- %define RT_NOCRT(name) nocrt_ %+ name
-%else
- %define RT_NOCRT(name) name
-%endif
-
-;; @def RT_NOCRT_BEGINPROC
-; Starts a NOCRT procedure, taking care of name wrapping and aliasing.
-;
-; Aliasing (weak ones, if supported) will be created when RT_WITH_NOCRT_ALIASES
-; is defined and RT_WITHOUT_NOCRT_WRAPPERS isn't.
-;
-%macro RT_NOCRT_BEGINPROC 1
-%ifdef RT_WITH_NOCRT_ALIASES
-BEGINPROC RT_NOCRT(%1)
-%ifdef ASM_FORMAT_ELF
-global NAME(%1)
-weak NAME(%1)
-NAME(%1):
-%else
-GLOBALNAME %1
-%endif
-%else  ; !RT_WITH_NOCRT_ALIASES
-BEGINPROC RT_NOCRT(%1)
-%endif ; !RT_WITH_NOCRT_ALIASES
-%endmacro ; RT_NOCRT_BEGINPROC
-
-%ifdef RT_WITH_NOCRT_ALIASES
- %ifdef RT_WITHOUT_NOCRT_WRAPPERS
-  %error "RT_WITH_NOCRT_ALIASES and RT_WITHOUT_NOCRT_WRAPPERS doesn't mix."
- %endif
-%endif
-
-
-
-;; @def xCB
-; The stack unit size  / The register unit size.
-
-;; @def xSP
-; The stack pointer register (RSP or ESP).
-
-;; @def xBP
-; The base pointer register (RBP or ESP).
-
-;; @def xAX
-; RAX or EAX depending on context.
-
-;; @def xBX
-; RBX or EBX depending on context.
-
-;; @def xCX
-; RCX or ECX depending on context.
-
-;; @def xDX
-; RDX or EDX depending on context.
-
-;; @def xDI
-; RDI or EDI depending on context.
-
-;; @def xSI
-; RSI or ESI depending on context.
-
-;; @def xWrtRIP
-; 'wrt rip' for AMD64 targets, nothing for x86 ones.
-
-%ifdef RT_ARCH_AMD64
- %define xCB 8
- %define xSP rsp
- %define xBP rbp
- %define xAX rax
- %define xBX rbx
- %define xCX rcx
- %define xDX rdx
- %define xDI rdi
- %define xSI rsi
- %define xWrtRIP wrt rip
-%else
- %define xCB 4
- %define xSP esp
- %define xBP ebp
- %define xAX eax
- %define xBX ebx
- %define xCX ecx
- %define xDX edx
- %define xDI edi
- %define xSI esi
- %define xWrtRIP
-%endif
-
-
-;
-; NASM sets __PASS__ to 0 in preprocess-only mode, and to 3 when only generating dependencies.
-; YASM has no such setting which is why we must rely on kBuild to tell us what we're doing.
-; For simplicity, we'll set the kBuild macro when using NASM.
-;
-%ifndef KBUILD_GENERATING_MAKEFILE_DEPENDENCIES
- %ifdef __NASM__
-  %if __PASS__ == 0 || __PASS__ == 3
-   %define KBUILD_GENERATING_MAKEFILE_DEPENDENCIES
-  %endif
- %endif
-%endif
-
-
-;
-; Some simple compile time assertions.
-;
-; Note! Requires new kBuild to work with YASM (see above).
-;
-
-;;
-; Structure size assertion macro.
-%define AssertCompileSize(a_Type, a_Size) AssertCompileSizeML a_Type, a_Size
-%macro AssertCompileSizeML 2
- %ifndef KBUILD_GENERATING_MAKEFILE_DEPENDENCIES
-  %assign AssertVar_cbActual   %1 %+ _size
-  %assign AssertVar_cbExpected %2
-  %if AssertVar_cbActual != AssertVar_cbExpected
-   %error %1 is AssertVar_cbActual bytes instead of AssertVar_cbExpected
-  %endif
- %endif
-%endmacro
-
-;;
-; Structure size alignment assertion macro.
-
-%define AssertCompileSizeAlignment(a_Type, a_Align) AssertCompileSizeAlignmentML a_Type, a_Align
-%macro AssertCompileSizeAlignmentML 2
- %ifndef KBUILD_GENERATING_MAKEFILE_DEPENDENCIES
-  %assign AssertVar_cbActual    %1 %+ _size
-  %assign AssertVar_cbAlignment %2
-  %if (AssertVar_cbActual & (AssertVar_cbAlignment - 1)) != 0
-   %error %1 is AssertVar_cbActual bytes, expected size with AssertVar_cbAlignment bytes alignment.
-  %endif
- %endif
-%endmacro
-
-;;
-; Structure member offset assertion macro.
-%define AssertCompileMemberOffset(a_Type, a_Member, a_off) AssertCompileMemberOffsetML a_Type, a_Member, a_off
-%macro AssertCompileMemberOffsetML 3
- %ifndef KBUILD_GENERATING_MAKEFILE_DEPENDENCIES
-  %assign AssertVar_offActual   %1 %+ . %+ %2
-  %assign AssertVar_offExpected %3
-  %if AssertVar_offActual != AssertVar_offExpected
-   %error %1 %+ . %+ %2 is at AssertVar_offActual instead of AssertVar_offExpected
-  %endif
- %endif
-%endmacro
-
-;;
-; Structure member alignment assertion macro.
-%define AssertCompileMemberAlignment(a_Type, a_Member, a_cbAlign) AssertCompileMemberAlignmentML a_Type, a_Member, a_cbAlign
-%macro AssertCompileMemberAlignmentML 3
- %ifndef KBUILD_GENERATING_MAKEFILE_DEPENDENCIES
-  %assign AssertVar_offActual   %1 %+ . %+ %2
-  %assign AssertVar_cbAlign     %3
-  %if AssertVar_offActual & (AssertVar_cbAlign - 1)
-   %error %1 %+ . %+ %2 is at AssertVar_offActual, expected AssertVar_cbAlign alignment
-  %endif
- %endif
-%endmacro
-
-;;
-; Generic compile time expression assertion.
-%define AssertCompile(a_Expr) AssertCompileML { a_Expr }
-%macro AssertCompileML 1
- %ifndef KBUILD_GENERATING_MAKEFILE_DEPENDENCIES
-  %if (%1) != 1
-   %assign AssertVar_uResult %1
-   %error %1 => AssertVar_uResult
-  %endif
- %endif
-%endmacro
-
-%endif
-
+;; @file
+; IPRT - Global YASM/NASM macros
+;
+
+;
+; Copyright (C) 2006-2016 Oracle Corporation
+;
+; This file is part of VirtualBox Open Source Edition (OSE), as
+; available from http://www.virtualbox.org. This file is free software;
+; you can redistribute it and/or modify it under the terms of the GNU
+; General Public License (GPL) as published by the Free Software
+; Foundation, in version 2 as it comes in the "COPYING" file of the
+; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+;
+; The contents of this file may alternatively be used under the terms
+; of the Common Development and Distribution License Version 1.0
+; (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+; VirtualBox OSE distribution, in which case the provisions of the
+; CDDL are applicable instead of those of the GPL.
+;
+; You may elect to license modified versions of this file under the
+; terms and conditions of either the GPL or the CDDL or both.
+;
+
+; Special hack for bs3kit.
+%ifdef RT_ASMDEFS_INC_FIRST_FILE
+ %include "asmdefs-first.mac"
+%endif
+
+%ifndef ___iprt_asmdefs_mac
+%define ___iprt_asmdefs_mac
+
+
+;; @defgroup grp_rt_cdefs_size     Size Constants
+; (Of course, these are binary computer terms, not SI.)
+; @{
+;; 1 K (Kilo)                     (1 024).
+%define _1K                     000000400h
+;; 4 K (Kilo)                     (4 096).
+%define _4K                     000001000h
+;; 32 K (Kilo)                   (32 678).
+%define _32K                    000008000h
+;; 64 K (Kilo)                   (65 536).
+%define _64K                    000010000h
+;; 128 K (Kilo)                 (131 072).
+%define _128K                   000020000h
+;; 256 K (Kilo)                 (262 144).
+%define _256K                   000040000h
+;; 512 K (Kilo)                 (524 288).
+%define _512K                   000080000h
+;; 1 M (Mega)                 (1 048 576).
+%define _1M                     000100000h
+;; 2 M (Mega)                 (2 097 152).
+%define _2M                     000200000h
+;; 4 M (Mega)                 (4 194 304).
+%define _4M                     000400000h
+;; 1 G (Giga)             (1 073 741 824).
+%define _1G                     040000000h
+;; 2 G (Giga)             (2 147 483 648).
+%define _2G             00000000080000000h
+;; 4 G (Giga)             (4 294 967 296).
+%define _4G             00000000100000000h
+;; 1 T (Tera)         (1 099 511 627 776).
+%define _1T             00000010000000000h
+;; 1 P (Peta)     (1 125 899 906 842 624).
+%define _1P             00004000000000000h
+;; 1 E (Exa)  (1 152 921 504 606 846 976).
+%define _1E             01000000000000000h
+;; 2 E (Exa)  (2 305 843 009 213 693 952).
+%define _2E             02000000000000000h
+;; @}
+
+
+;;
+; Make the mask for the given bit.
+%define RT_BIT(bit)        (1 << bit)
+
+;;
+; Make the mask for the given bit.
+%define RT_BIT_32(bit)     (1 << bit)
+;;
+; Make the mask for the given bit.
+%define RT_BIT_64(bit)     (1 << bit)
+
+;;
+; Makes a 32-bit unsigned (not type safe, but whatever) out of four byte values.
+%define RT_MAKE_U32_FROM_U8(b0, b1, b2, b3) ( (b3 << 24) | (b2 << 16) | (b1 << 8) | b0 )
+
+;; Preprocessor concatenation macro.
+%define RT_CONCAT(a_1,a_2)              a_1 %+ a_2
+
+;; Preprocessor concatenation macro, three arguments.
+%define RT_CONCAT3(a_1,a_2,a_3)         a_1 %+ a_2 %+ a_3
+
+;; Preprocessor concatenation macro, four arguments.
+%define RT_CONCAT4(a_1,a_2,a_3,a_4)     a_1 %+ a_2 %+ a_3 %+ a_4
+
+
+;; Define ASM_FORMAT_PE64 if applicable.
+%ifdef ASM_FORMAT_PE
+ %ifdef RT_ARCH_AMD64
+  %define ASM_FORMAT_PE64       1
+ %endif
+%endif
+
+;;
+; SEH64 macros.
+%ifdef RT_ASM_WITH_SEH64
+ %ifndef ASM_FORMAT_PE64
+  %undef RT_ASM_WITH_SEH64
+ %endif
+%endif
+
+;;
+; Records a xBP push.
+%macro SEH64_PUSH_xBP 0
+ %ifdef RT_ASM_WITH_SEH64
+  [pushreg rbp]
+ %endif
+%endmacro
+
+;;
+; Sets xBP as frame pointer that's pointing to a stack position %1 relative to xBP.
+%macro SEH64_SET_FRAME_xBP 1
+ %ifdef RT_ASM_WITH_SEH64
+  [setframe rbp, %1]
+ %endif
+%endmacro
+
+;;
+; Records an ADD xSP, %1.
+%macro SEH64_ALLOCATE_STACK 1
+ %ifdef RT_ASM_WITH_SEH64
+  [allocstack %1]
+ %endif
+%endmacro
+
+;;
+; Ends the prologue.
+%macro SEH64_END_PROLOGUE 0
+ %ifdef RT_ASM_WITH_SEH64
+ [endprolog]
+ %endif
+%endmacro
+
+
+;;
+; Align code, pad with INT3.
+%define ALIGNCODE(alignment) align alignment, db 0cch
+
+;;
+; Align data, pad with ZEROs.
+%define ALIGNDATA(alignment) align alignment, db 0
+
+;;
+; Align BSS, pad with ZEROs.
+%define ALIGNBSS(alignment) align alignment, resb 1
+
+;;
+; NAME_OVERLOAD can be defined by a .asm module to modify all the
+; names created using the name macros in this files.
+; This is handy when you've got some kind of template code.
+%ifndef NAME_OVERLOAD
+ %define NAME_OVERLOAD(name) name
+%endif
+
+;;
+; Mangles the given name so it can be referenced using DECLASM() in the
+; C/C++ world.
+%ifndef ASM_FORMAT_BIN
+ %ifdef RT_ARCH_X86
+  %ifdef RT_OS_OS2
+   %define NAME(name)   _ %+ NAME_OVERLOAD(name)
+  %endif
+  %ifdef RT_OS_WINDOWS
+   %define NAME(name)   _ %+ NAME_OVERLOAD(name)
+  %endif
+ %endif
+ %ifdef RT_OS_DARWIN
+  %define NAME(name)    _ %+ NAME_OVERLOAD(name)
+ %endif
+%endif
+%ifndef NAME
+ %define NAME(name)     NAME_OVERLOAD(name)
+%endif
+
+;;
+; Mangles the given C name so it will _import_ the right symbol.
+%ifdef ASM_FORMAT_PE
+ %define IMPNAME(name)  __imp_ %+ NAME(name)
+%else
+ %define IMPNAME(name)  NAME(name)
+%endif
+
+;;
+; Gets the pointer to an imported object.
+%ifdef ASM_FORMAT_PE
+ %ifdef RT_ARCH_AMD64
+  %define IMP(name)     qword [IMPNAME(name) wrt rip]
+ %else
+  %define IMP(name)     dword [IMPNAME(name)]
+ %endif
+%else
+ %define IMP(name)      IMPNAME(name)
+%endif
+
+;;
+; Gets the pointer to an imported object.
+%ifdef ASM_FORMAT_PE
+ %ifdef RT_ARCH_AMD64
+  %define IMP_SEG(SegOverride, name)  qword [SegOverride:IMPNAME(name) wrt rip]
+ %else
+  %define IMP_SEG(SegOverride, name)  dword [SegOverride:IMPNAME(name)]
+ %endif
+%else
+ %define IMP_SEG(SegOverride, name)   IMPNAME(name)
+%endif
+
+;;
+; Declares an imported object for use with IMP2.
+; @note May change the current section!
+%macro EXTERN_IMP2 1
+    extern IMPNAME(%1)
+    BEGINDATA
+ %ifdef ASM_FORMAT_MACHO
+    g_Imp2_ %+ %1:  RTCCPTR_DEF IMPNAME(%1)
+ %endif
+%endmacro
+
+;;
+; Gets the pointer to an imported object, version 2.
+%ifdef ASM_FORMAT_PE
+ %ifdef RT_ARCH_AMD64
+  %define IMP2(name)    qword [IMPNAME(name) wrt rip]
+ %else
+  %define IMP2(name)    dword [IMPNAME(name)]
+ %endif
+%elifdef ASM_FORMAT_ELF
+ %ifdef PIC
+  %ifdef RT_ARCH_AMD64
+   %define IMP2(name)   qword [rel IMPNAME(name) wrt ..got]
+  %else
+   %define IMP2(name)   IMPNAME(name) wrt ..plt
+  %endif
+ %endif
+%elifdef ASM_FORMAT_MACHO
+ %define IMP2(name)     RTCCPTR_PRE [g_Imp2_ %+ name xWrtRIP]
+%endif
+%ifndef IMP2
+ %define IMP2(name)     IMPNAME(name)
+%endif
+
+
+
+;;
+; Global marker which is DECLASM() compatible.
+%macro GLOBALNAME 1
+%ifndef ASM_FORMAT_BIN
+global NAME(%1)
+%endif
+NAME(%1):
+%endmacro
+
+;;
+; Global exported marker which is DECLASM() compatible.
+%macro EXPORTEDNAME 1
+ %ifdef ASM_FORMAT_PE
+  export %1=NAME(%1)
+ %endif
+ %ifdef __NASM__
+  %ifdef ASM_FORMAT_OMF
+   export NAME(%1) NAME(%1)
+  %endif
+%endif
+GLOBALNAME %1
+%endmacro
+
+;;
+; Global marker which is DECLASM() compatible.
+%macro GLOBALNAME_EX 2
+%ifndef ASM_FORMAT_BIN
+ %ifdef ASM_FORMAT_ELF
+global NAME(%1):%2
+ %else
+global NAME(%1)
+ %endif
+%endif
+NAME(%1):
+%endmacro
+
+;;
+; Global exported marker which is DECLASM() compatible.
+%macro EXPORTEDNAME_EX 2
+ %ifdef ASM_FORMAT_PE
+  export %1=NAME(%1)
+ %endif
+ %ifdef __NASM__
+  %ifdef ASM_FORMAT_OMF
+   export NAME(%1) NAME(%1)
+  %endif
+%endif
+GLOBALNAME_EX %1, %2
+%endmacro
+
+;;
+; Begins a C callable procedure.
+%macro BEGINPROC 1
+ %ifdef RT_ASM_WITH_SEH64
+global     NAME(%1):function
+proc_frame NAME(%1)
+ %else
+GLOBALNAME_EX %1, function hidden
+ %endif
+%endmacro
+
+;;
+; Begins a C callable exported procedure.
+%macro BEGINPROC_EXPORTED 1
+ %ifdef RT_ASM_WITH_SEH64
+  %ifdef ASM_FORMAT_PE
+export  %1=NAME(%1)
+  %endif
+global     NAME(%1):function
+proc_frame NAME(%1)
+ %else
+EXPORTEDNAME_EX %1, function
+ %endif
+%endmacro
+
+;;
+; Ends a C callable procedure.
+%macro ENDPROC 1
+ %ifdef RT_ASM_WITH_SEH64
+endproc_frame
+ %endif
+GLOBALNAME_EX %1 %+ _EndProc, function hidden
+%ifdef ASM_FORMAT_ELF
+ %ifndef __NASM__ ; nasm does this in the global directive.
+size NAME(%1)               NAME(%1 %+ _EndProc) - NAME(%1)
+size NAME(%1 %+ _EndProc)   0
+ %endif
+%endif
+    db  0xCC, 0xCC, 0xCC, 0xCC
+%endmacro
+
+
+;
+; Do OMF and Mach-O/Yasm segment definitions
+;
+; Both format requires this to get the segment order right, in the Mach-O/Yasm case
+; it's only to make sure the .bss section ends up last (it's not declared here).
+;
+%ifdef ASM_FORMAT_OMF
+ %ifndef RT_NOINC_SEGMENTS
+
+  ; 16-bit segments first (OMF / OS/2 specific).
+  %ifdef RT_INCL_16BIT_SEGMENTS
+   segment DATA16 public CLASS=FAR_DATA align=16 use16
+   segment DATA16_INIT public CLASS=FAR_DATA align=16 use16
+   group DGROUP16 DATA16 DATA16_INIT
+
+   ;;
+   ; Begins 16-bit data
+   %macro BEGINDATA16 0
+    segment DATA16
+   %endmacro
+
+   ;;
+   ; Begins 16-bit init data
+   %macro BEGINDATA16INIT 0
+    segment DATA16_INIT
+   %endmacro
+
+   segment CODE16 public CLASS=FAR_CODE align=16 use16
+   segment CODE16_INIT public CLASS=FAR_CODE align=16 use16
+   group CGROUP16 CODE16 CODE16_INIT
+
+   ;;
+   ; Begins 16-bit code
+   %macro BEGINCODE16 0
+    segment CODE16
+   %endmacro
+
+   ;;
+   ; Begins 16-bit init code
+   %macro BEGINCODE16INIT 0
+    segment CODE16_INIT
+   %endmacro
+
+  %endif
+
+  ; 32-bit segments.
+  segment TEXT32 public CLASS=CODE align=16 use32 flat
+  segment DATA32 public CLASS=DATA align=16 use32 flat
+  segment BSS32  public CLASS=BSS  align=16 use32 flat
+
+  ; Make the TEXT32 segment default.
+  segment TEXT32
+ %endif ; RT_NOINC_SEGMENTS
+%endif
+
+%ifdef ASM_FORMAT_MACHO
+ %ifdef __YASM__
+  section .text
+  section .data
+ %endif
+%endif
+
+
+;;
+; Begins code
+%ifdef ASM_FORMAT_OMF
+ %macro BEGINCODE 0
+  segment TEXT32
+ %endmacro
+%else
+%macro BEGINCODE 0
+ section .text
+%endmacro
+%endif
+
+;;
+; Begins constant (read-only) data
+;
+; @remarks  This is mapped to the CODE section/segment when there isn't
+;           any dedicated const section/segment. (There is code that
+;           assumes this, so don't try change it.)
+%ifdef ASM_FORMAT_OMF
+ %macro BEGINCONST 0
+  segment TEXT32
+ %endmacro
+%else
+ %macro BEGINCONST 0
+  %ifdef ASM_FORMAT_MACHO ;; @todo check the other guys too.
+   section .rodata
+  %else
+   section .text
+  %endif
+ %endmacro
+%endif
+
+;;
+; Begins initialized data
+%ifdef ASM_FORMAT_OMF
+ %macro BEGINDATA 0
+  segment DATA32
+ %endmacro
+%else
+%macro BEGINDATA 0
+ section .data
+%endmacro
+%endif
+
+;;
+; Begins uninitialized data
+%ifdef ASM_FORMAT_OMF
+ %macro BEGINBSS 0
+  segment BSS32
+ %endmacro
+%else
+%macro BEGINBSS 0
+ section .bss
+%endmacro
+%endif
+
+
+
+;; @def ARCH_BITS
+; Defines the bit count of the current context.
+%ifndef ARCH_BITS
+ %ifdef RT_ARCH_AMD64
+  %define ARCH_BITS 64
+ %else
+  %define ARCH_BITS 32
+ %endif
+%endif
+
+;; @def HC_ARCH_BITS
+; Defines the host architechture bit count.
+%ifndef HC_ARCH_BITS
+ %ifndef IN_RC
+  %define HC_ARCH_BITS ARCH_BITS
+ %else
+  %define HC_ARCH_BITS 32
+ %endif
+%endif
+
+;; @def R3_ARCH_BITS
+; Defines the host ring-3 architechture bit count.
+%ifndef R3_ARCH_BITS
+ %ifdef IN_RING3
+  %define R3_ARCH_BITS ARCH_BITS
+ %else
+  %define R3_ARCH_BITS HC_ARCH_BITS
+ %endif
+%endif
+
+;; @def R0_ARCH_BITS
+; Defines the host ring-0 architechture bit count.
+%ifndef R0_ARCH_BITS
+ %ifdef IN_RING0
+  %define R0_ARCH_BITS ARCH_BITS
+ %else
+  %define R0_ARCH_BITS HC_ARCH_BITS
+ %endif
+%endif
+
+;; @def GC_ARCH_BITS
+; Defines the guest architechture bit count.
+%ifndef GC_ARCH_BITS
+ %ifdef IN_RC
+  %define GC_ARCH_BITS ARCH_BITS
+ %else
+  %define GC_ARCH_BITS 32
+ %endif
+%endif
+
+
+
+;; @def RTHCPTR_DEF
+; The pesudo-instruction used to declare an initialized pointer variable in the host context.
+%if HC_ARCH_BITS == 64
+ %define RTHCPTR_DEF    dq
+%else
+ %define RTHCPTR_DEF    dd
+%endif
+
+;; @def RTHCPTR_RES
+; The pesudo-instruction used to declare (=reserve space for) an uninitialized pointer
+; variable of the host context.
+%if HC_ARCH_BITS == 64
+ %define RTHCPTR_RES    resq
+%else
+ %define RTHCPTR_RES    resd
+%endif
+
+;; @def RTHCPTR_PRE
+; The memory operand prefix used for a pointer in the host context.
+%if HC_ARCH_BITS == 64
+ %define RTHCPTR_PRE    qword
+%else
+ %define RTHCPTR_PRE    dword
+%endif
+
+;; @def RTHCPTR_CB
+; The size in bytes of a pointer in the host context.
+%if HC_ARCH_BITS == 64
+ %define RTHCPTR_CB     8
+%else
+ %define RTHCPTR_CB     4
+%endif
+
+
+
+;; @def RTR0PTR_DEF
+; The pesudo-instruction used to declare an initialized pointer variable in the ring-0 host context.
+%if R0_ARCH_BITS == 64
+ %define RTR0PTR_DEF    dq
+%else
+ %define RTR0PTR_DEF    dd
+%endif
+
+;; @def RTR0PTR_RES
+; The pesudo-instruction used to declare (=reserve space for) an uninitialized pointer
+; variable of the ring-0 host context.
+%if R0_ARCH_BITS == 64
+ %define RTR0PTR_RES    resq
+%else
+ %define RTR0PTR_RES    resd
+%endif
+
+;; @def RTR0PTR_PRE
+; The memory operand prefix used for a pointer in the ring-0 host context.
+%if R0_ARCH_BITS == 64
+ %define RTR0PTR_PRE    qword
+%else
+ %define RTR0PTR_PRE    dword
+%endif
+
+;; @def RTR0PTR_CB
+; The size in bytes of a pointer in the ring-0 host context.
+%if R0_ARCH_BITS == 64
+ %define RTR0PTR_CB     8
+%else
+ %define RTR0PTR_CB     4
+%endif
+
+
+
+;; @def RTR3PTR_DEF
+; The pesudo-instruction used to declare an initialized pointer variable in the ring-3 host context.
+%if R3_ARCH_BITS == 64
+ %define RTR3PTR_DEF    dq
+%else
+ %define RTR3PTR_DEF    dd
+%endif
+
+;; @def RTR3PTR_RES
+; The pesudo-instruction used to declare (=reserve space for) an uninitialized pointer
+; variable of the ring-3 host context.
+%if R3_ARCH_BITS == 64
+ %define RTR3PTR_RES    resq
+%else
+ %define RTR3PTR_RES    resd
+%endif
+
+;; @def RTR3PTR_PRE
+; The memory operand prefix used for a pointer in the ring-3 host context.
+%if R3_ARCH_BITS == 64
+ %define RTR3PTR_PRE    qword
+%else
+ %define RTR3PTR_PRE    dword
+%endif
+
+;; @def RTR3PTR_CB
+; The size in bytes of a pointer in the ring-3 host context.
+%if R3_ARCH_BITS == 64
+ %define RTR3PTR_CB     8
+%else
+ %define RTR3PTR_CB     4
+%endif
+
+
+
+;; @def RTGCPTR_DEF
+; The pesudo-instruction used to declare an initialized pointer variable in the guest context.
+%if GC_ARCH_BITS == 64
+ %define RTGCPTR_DEF    dq
+%else
+ %define RTGCPTR_DEF    dd
+%endif
+
+;; @def RTGCPTR_RES
+; The pesudo-instruction used to declare (=reserve space for) an uninitialized pointer
+; variable of the guest context.
+%if GC_ARCH_BITS == 64
+ %define RTGCPTR_RES    resq
+%else
+ %define RTGCPTR_RES    resd
+%endif
+
+%define RTGCPTR32_RES   resd
+%define RTGCPTR64_RES   resq
+
+;; @def RTGCPTR_PRE
+; The memory operand prefix used for a pointer in the guest context.
+%if GC_ARCH_BITS == 64
+ %define RTGCPTR_PRE    qword
+%else
+ %define RTGCPTR_PRE    dword
+%endif
+
+;; @def RTGCPTR_CB
+; The size in bytes of a pointer in the guest context.
+%if GC_ARCH_BITS == 64
+ %define RTGCPTR_CB     8
+%else
+ %define RTGCPTR_CB     4
+%endif
+
+
+;; @def RTRCPTR_DEF
+; The pesudo-instruction used to declare an initialized pointer variable in the raw mode context.
+%define RTRCPTR_DEF    dd
+
+;; @def RTRCPTR_RES
+; The pesudo-instruction used to declare (=reserve space for) an uninitialized pointer
+; variable of the raw mode context.
+%define RTRCPTR_RES    resd
+
+;; @def RTRCPTR_PRE
+; The memory operand prefix used for a pointer in the raw mode context.
+%define RTRCPTR_PRE    dword
+
+;; @def RTRCPTR_CB
+; The size in bytes of a pointer in the raw mode context.
+%define RTRCPTR_CB     4
+
+
+;; @def RT_CCPTR_DEF
+; The pesudo-instruction used to declare an initialized pointer variable in the current context.
+
+;; @def RT_CCPTR_RES
+; The pesudo-instruction used to declare (=reserve space for) an uninitialized pointer
+; variable of the current context.
+
+;; @def RT_CCPTR_PRE
+; The memory operand prefix used for a pointer in the current context.
+
+;; @def RT_CCPTR_CB
+; The size in bytes of a pointer in the current context.
+
+%ifdef IN_RC
+ %define RTCCPTR_DEF        RTRCPTR_DEF
+ %define RTCCPTR_RES        RTRCPTR_RES
+ %define RTCCPTR_PRE        RTRCPTR_PRE
+ %define RTCCPTR_CB         RTRCPTR_CB
+%else
+ %ifdef IN_RING0
+  %define RTCCPTR_DEF       RTR0PTR_DEF
+  %define RTCCPTR_RES       RTR0PTR_RES
+  %define RTCCPTR_PRE       RTR0PTR_PRE
+  %define RTCCPTR_CB        RTR0PTR_CB
+ %else
+  %define RTCCPTR_DEF       RTR3PTR_DEF
+  %define RTCCPTR_RES       RTR3PTR_RES
+  %define RTCCPTR_PRE       RTR3PTR_PRE
+  %define RTCCPTR_CB        RTR3PTR_CB
+ %endif
+%endif
+
+
+
+;; @def RTHCPHYS_DEF
+; The pesudo-instruction used to declare an initialized host physical address.
+%define RTHCPHYS_DEF    dq
+
+;; @def RTHCPTR_RES
+; The pesudo-instruction used to declare (=reserve space for) an uninitialized
+; host physical address variable
+%define RTHCPHYS_RES    resq
+
+;; @def RTHCPTR_PRE
+; The memory operand prefix used for a host physical address.
+%define RTHCPHYS_PRE    qword
+
+;; @def RTHCPHYS_CB
+; The size in bytes of a host physical address.
+%define RTHCPHYS_CB     8
+
+
+
+;; @def RTGCPHYS_DEF
+; The pesudo-instruction used to declare an initialized guest physical address.
+%define RTGCPHYS_DEF    dq
+
+;; @def RTGCPHYS_RES
+; The pesudo-instruction used to declare (=reserve space for) an uninitialized
+; guest physical address variable
+%define RTGCPHYS_RES    resq
+
+;; @def RTGCPTR_PRE
+; The memory operand prefix used for a guest physical address.
+%define RTGCPHYS_PRE    qword
+
+;; @def RTGCPHYS_CB
+; The size in bytes of a guest physical address.
+%define RTGCPHYS_CB     8
+
+
+
+;;
+; The size of the long double C/C++ type.
+; On 32-bit Darwin this is 16 bytes, on L4, Linux, OS/2 and Windows
+; it's 12 bytes.
+; @todo figure out what 64-bit Windows does (I don't recall right now).
+%ifdef RT_ARCH_X86
+ %ifdef RT_OS_DARWIN
+  %define RTLRD_CB          16
+ %else
+  %define RTLRD_CB          12
+ %endif
+%else
+  %define RTLRD_CB          16
+%endif
+
+
+
+;; @def ASM_CALL64_GCC
+; Indicates that we're using the GCC 64-bit calling convention.
+; @see @ref sec_vboxrem_amd64_compare (in VBoxREMWrapper.cpp) for an ABI description.
+
+;; @def ASM_CALL64_MSC
+; Indicates that we're using the Microsoft 64-bit calling convention (fastcall on steroids).
+; @see @ref sec_vboxrem_amd64_compare (in VBoxREMWrapper.cpp) for an ABI description.
+
+; Note: On X86 we're using cdecl unconditionally. There is not yet any common
+; calling convention on AMD64, that's why we need to support two different ones.)
+
+%ifdef RT_ARCH_AMD64
+ %ifndef ASM_CALL64_GCC
+  %ifndef ASM_CALL64_MSC
+   ; define it based on the object format.
+   %ifdef ASM_FORMAT_PE
+    %define ASM_CALL64_MSC
+   %else
+    %define ASM_CALL64_GCC
+   %endif
+  %endif
+ %else
+  ; sanity check.
+  %ifdef ASM_CALL64_MSC
+   %error "Only one of the ASM_CALL64_* defines should be defined!"
+  %endif
+ %endif
+%else
+ ;later; %ifdef ASM_CALL64_GCC
+ ;later;  %error "ASM_CALL64_GCC is defined without RT_ARCH_AMD64!" ASM_CALL64_GCC
+ ;later; %endif
+ ;later; %ifdef ASM_CALL64_MSC
+ ;later;  %error "ASM_CALL64_MSC is defined without RT_ARCH_AMD64!" ASM_CALL64_MSC
+ ;later; %endif
+%endif
+
+
+;; @def RT_NOCRT
+; Symbol name wrapper for the No-CRT bits.
+;
+; In order to coexist in the same process as other CRTs, we need to
+; decorate the symbols such that they don't conflict the ones in the
+; other CRTs. The result of such conflicts / duplicate symbols can
+; confuse the dynamic loader on unix like systems.
+;
+; @remark Always feed the name to this macro first and then pass the result
+;         on to the next *NAME* macro.
+;
+%ifndef RT_WITHOUT_NOCRT_WRAPPERS
+ %define RT_NOCRT(name) nocrt_ %+ name
+%else
+ %define RT_NOCRT(name) name
+%endif
+
+;; @def RT_NOCRT_BEGINPROC
+; Starts a NOCRT procedure, taking care of name wrapping and aliasing.
+;
+; Aliasing (weak ones, if supported) will be created when RT_WITH_NOCRT_ALIASES
+; is defined and RT_WITHOUT_NOCRT_WRAPPERS isn't.
+;
+%macro RT_NOCRT_BEGINPROC 1
+%ifdef RT_WITH_NOCRT_ALIASES
+BEGINPROC RT_NOCRT(%1)
+%ifdef ASM_FORMAT_ELF
+global NAME(%1)
+weak NAME(%1)
+NAME(%1):
+%else
+GLOBALNAME %1
+%endif
+%else  ; !RT_WITH_NOCRT_ALIASES
+BEGINPROC RT_NOCRT(%1)
+%endif ; !RT_WITH_NOCRT_ALIASES
+%endmacro ; RT_NOCRT_BEGINPROC
+
+%ifdef RT_WITH_NOCRT_ALIASES
+ %ifdef RT_WITHOUT_NOCRT_WRAPPERS
+  %error "RT_WITH_NOCRT_ALIASES and RT_WITHOUT_NOCRT_WRAPPERS doesn't mix."
+ %endif
+%endif
+
+
+
+;; @def xCB
+; The stack unit size  / The register unit size.
+
+;; @def xSP
+; The stack pointer register (RSP or ESP).
+
+;; @def xBP
+; The base pointer register (RBP or ESP).
+
+;; @def xAX
+; RAX or EAX depending on context.
+
+;; @def xBX
+; RBX or EBX depending on context.
+
+;; @def xCX
+; RCX or ECX depending on context.
+
+;; @def xDX
+; RDX or EDX depending on context.
+
+;; @def xDI
+; RDI or EDI depending on context.
+
+;; @def xSI
+; RSI or ESI depending on context.
+
+;; @def xWrtRIP
+; 'wrt rip' for AMD64 targets, nothing for x86 ones.
+
+%ifdef RT_ARCH_AMD64
+ %define xCB 8
+ %define xSP rsp
+ %define xBP rbp
+ %define xAX rax
+ %define xBX rbx
+ %define xCX rcx
+ %define xDX rdx
+ %define xDI rdi
+ %define xSI rsi
+ %define xWrtRIP wrt rip
+%else
+ %define xCB 4
+ %define xSP esp
+ %define xBP ebp
+ %define xAX eax
+ %define xBX ebx
+ %define xCX ecx
+ %define xDX edx
+ %define xDI edi
+ %define xSI esi
+ %define xWrtRIP
+%endif
+
+
+;
+; NASM sets __PASS__ to 0 in preprocess-only mode, and to 3 when only generating dependencies.
+; YASM has no such setting which is why we must rely on kBuild to tell us what we're doing.
+; For simplicity, we'll set the kBuild macro when using NASM.
+;
+%ifndef KBUILD_GENERATING_MAKEFILE_DEPENDENCIES
+ %ifdef __NASM__
+  %if __PASS__ == 0 || __PASS__ == 3
+   %define KBUILD_GENERATING_MAKEFILE_DEPENDENCIES
+  %endif
+ %endif
+%endif
+
+
+;
+; Some simple compile time assertions.
+;
+; Note! Requires new kBuild to work with YASM (see above).
+;
+
+;;
+; Structure size assertion macro.
+%define AssertCompileSize(a_Type, a_Size) AssertCompileSizeML a_Type, a_Size
+%macro AssertCompileSizeML 2
+ %ifndef KBUILD_GENERATING_MAKEFILE_DEPENDENCIES
+  %assign AssertVar_cbActual   %1 %+ _size
+  %assign AssertVar_cbExpected %2
+  %if AssertVar_cbActual != AssertVar_cbExpected
+   %error %1 is AssertVar_cbActual bytes instead of AssertVar_cbExpected
+  %endif
+ %endif
+%endmacro
+
+;;
+; Structure size alignment assertion macro.
+
+%define AssertCompileSizeAlignment(a_Type, a_Align) AssertCompileSizeAlignmentML a_Type, a_Align
+%macro AssertCompileSizeAlignmentML 2
+ %ifndef KBUILD_GENERATING_MAKEFILE_DEPENDENCIES
+  %assign AssertVar_cbActual    %1 %+ _size
+  %assign AssertVar_cbAlignment %2
+  %if (AssertVar_cbActual & (AssertVar_cbAlignment - 1)) != 0
+   %error %1 is AssertVar_cbActual bytes, expected size with AssertVar_cbAlignment bytes alignment.
+  %endif
+ %endif
+%endmacro
+
+;;
+; Structure member offset assertion macro.
+%define AssertCompileMemberOffset(a_Type, a_Member, a_off) AssertCompileMemberOffsetML a_Type, a_Member, a_off
+%macro AssertCompileMemberOffsetML 3
+ %ifndef KBUILD_GENERATING_MAKEFILE_DEPENDENCIES
+  %assign AssertVar_offActual   %1 %+ . %+ %2
+  %assign AssertVar_offExpected %3
+  %if AssertVar_offActual != AssertVar_offExpected
+   %error %1 %+ . %+ %2 is at AssertVar_offActual instead of AssertVar_offExpected
+  %endif
+ %endif
+%endmacro
+
+;;
+; Structure member alignment assertion macro.
+%define AssertCompileMemberAlignment(a_Type, a_Member, a_cbAlign) AssertCompileMemberAlignmentML a_Type, a_Member, a_cbAlign
+%macro AssertCompileMemberAlignmentML 3
+ %ifndef KBUILD_GENERATING_MAKEFILE_DEPENDENCIES
+  %assign AssertVar_offActual   %1 %+ . %+ %2
+  %assign AssertVar_cbAlign     %3
+  %if AssertVar_offActual & (AssertVar_cbAlign - 1)
+   %error %1 %+ . %+ %2 is at AssertVar_offActual, expected AssertVar_cbAlign alignment
+  %endif
+ %endif
+%endmacro
+
+;;
+; Generic compile time expression assertion.
+%define AssertCompile(a_Expr) AssertCompileML { a_Expr }
+%macro AssertCompileML 1
+ %ifndef KBUILD_GENERATING_MAKEFILE_DEPENDENCIES
+  %if (%1) != 1
+   %assign AssertVar_uResult %1
+   %error %1 => AssertVar_uResult
+  %endif
+ %endif
+%endmacro
+
+%endif
+
diff --git a/include/iprt/asn1-generator-asn1-decoder.h b/include/iprt/asn1-generator-asn1-decoder.h
index da9661b..c2d7fc1 100644
--- a/include/iprt/asn1-generator-asn1-decoder.h
+++ b/include/iprt/asn1-generator-asn1-decoder.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/asn1-generator-core.h b/include/iprt/asn1-generator-core.h
index c1dc6e9..8f1b8c3 100644
--- a/include/iprt/asn1-generator-core.h
+++ b/include/iprt/asn1-generator-core.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/asn1-generator-init.h b/include/iprt/asn1-generator-init.h
index 4bfdeed..5ff2cba 100644
--- a/include/iprt/asn1-generator-init.h
+++ b/include/iprt/asn1-generator-init.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/asn1-generator-internal-header.h b/include/iprt/asn1-generator-internal-header.h
index e4589d0..ff40df2 100644
--- a/include/iprt/asn1-generator-internal-header.h
+++ b/include/iprt/asn1-generator-internal-header.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/asn1-generator-pass.h b/include/iprt/asn1-generator-pass.h
index 7982d66..35909a1 100644
--- a/include/iprt/asn1-generator-pass.h
+++ b/include/iprt/asn1-generator-pass.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -165,16 +165,17 @@
     } \
     /* The reminder of the methods shouldn't normally be needed, just stub them. */ \
     static DECLCALLBACK(void) RT_CONCAT4(RTASN1TMPL_INT_NAME,_XTAG_,a_Name,_Delete)(PRTASN1CORE pThisCore) \
-    { AssertFailed(); } \
+    { AssertFailed(); RT_NOREF_PV(pThisCore); } \
     static DECLCALLBACK(int) RT_CONCAT4(RTASN1TMPL_INT_NAME,_XTAG_,a_Name,_Clone)(PRTASN1CORE pThisCore, PCRTASN1CORE pSrcCore, \
                                                                                   PCRTASN1ALLOCATORVTABLE pAllocator) \
-    { AssertFailed(); return VERR_INTERNAL_ERROR_2; } \
+    { AssertFailed(); RT_NOREF_PV(pThisCore); RT_NOREF_PV(pSrcCore); RT_NOREF_PV(pAllocator); return VERR_INTERNAL_ERROR_2; } \
     static DECLCALLBACK(int) RT_CONCAT4(RTASN1TMPL_INT_NAME,_XTAG_,a_Name,_Compare)(PCRTASN1CORE pLeftCore, \
                                                                                     PCRTASN1CORE pRightCore) \
-    { AssertFailed(); return VERR_INTERNAL_ERROR_2; } \
+    { AssertFailed(); RT_NOREF_PV(pLeftCore); RT_NOREF_PV(pRightCore); return VERR_INTERNAL_ERROR_2; } \
     static DECLCALLBACK(int) RT_CONCAT4(RTASN1TMPL_INT_NAME,_XTAG_,a_Name,_CheckSanity)(PCRTASN1CORE pThisCore, uint32_t fFlags, \
                                                                                         PRTERRINFO pErrInfo, const char *pszErrorTag) \
-    { AssertFailed(); return VERR_INTERNAL_ERROR_2; } \
+    { AssertFailed(); RT_NOREF_PV(pThisCore); RT_NOREF_PV(fFlags); RT_NOREF_PV(pErrInfo); RT_NOREF_PV(pszErrorTag); \
+      return VERR_INTERNAL_ERROR_2; } \
     DECL_HIDDEN_CONST(RTASN1COREVTABLE const) RT_CONCAT5(g_,RTASN1TMPL_INT_NAME,_XTAG_,a_Name,_Vtable) = \
     { \
         /* When the Asn1Core is at the start of the structure, we can reuse the _Delete and _Enum APIs here. */ \
@@ -216,16 +217,17 @@
     } \
     /* The reminder of the methods shouldn't normally be needed, just stub them. */ \
     static DECLCALLBACK(void) RT_CONCAT4(RTASN1TMPL_INT_NAME,_PC_XTAG_,a_Name,_Delete)(PRTASN1CORE pThisCore) \
-    { AssertFailed(); } \
+    { AssertFailed(); RT_NOREF_PV(pThisCore); } \
     static DECLCALLBACK(int) RT_CONCAT4(RTASN1TMPL_INT_NAME,_PC_XTAG_,a_Name,_Clone)(PRTASN1CORE pThisCore, PCRTASN1CORE pSrcCore, \
                                                                                      PCRTASN1ALLOCATORVTABLE pAllocator) \
-    { AssertFailed(); return VERR_INTERNAL_ERROR_3; } \
+    { AssertFailed(); RT_NOREF_PV(pThisCore); RT_NOREF_PV(pSrcCore); RT_NOREF_PV(pAllocator);  return VERR_INTERNAL_ERROR_3; } \
     static DECLCALLBACK(int) RT_CONCAT4(RTASN1TMPL_INT_NAME,_PC_XTAG_,a_Name,_Compare)(PCRTASN1CORE pLeftCore, \
                                                                                        PCRTASN1CORE pRightCore) \
-    { AssertFailed(); return VERR_INTERNAL_ERROR_3; } \
+    { AssertFailed(); RT_NOREF_PV(pLeftCore); RT_NOREF_PV(pRightCore);  return VERR_INTERNAL_ERROR_3; } \
     static DECLCALLBACK(int) RT_CONCAT4(RTASN1TMPL_INT_NAME,_PC_XTAG_,a_Name,_CheckSanity)(PCRTASN1CORE pThisCore, uint32_t fFlags, \
                                                                                            PRTERRINFO pErrInfo, const char *pszErrorTag) \
-    { AssertFailed(); return VERR_INTERNAL_ERROR_3; } \
+    { AssertFailed(); RT_NOREF_PV(pThisCore); RT_NOREF_PV(fFlags); RT_NOREF_PV(pErrInfo); RT_NOREF_PV(pszErrorTag); \
+      return VERR_INTERNAL_ERROR_3; } \
     DECL_HIDDEN_CONST(RTASN1COREVTABLE const) RT_CONCAT5(g_,RTASN1TMPL_INT_NAME,_PCHOICE_XTAG_,a_Name,_Vtable) = \
     { \
         /* When the Asn1Core is at the start of the structure, we can reuse the _Delete and _Enum APIs here. */ \
@@ -320,6 +322,7 @@
 # define RTASN1TMPL_BEGIN_COMMON() \
 RTASN1TMPL_DECL(int) RT_CONCAT(RTASN1TMPL_EXT_NAME,_Init)(RT_CONCAT(P,RTASN1TMPL_TYPE) pThis, PCRTASN1ALLOCATORVTABLE pAllocator) \
 { \
+    RT_NOREF_PV(pAllocator); \
     RT_ZERO(*pThis)
 # define RTASN1TMPL_END_COMMON() \
     return rc; \
@@ -496,6 +499,7 @@ RTASN1TMPL_DECL(int) RT_CONCAT(RTASN1TMPL_EXT_NAME,_DecodeAsn1)(PRTASN1CURSOR pC
 
 # define RTASN1TMPL_BEGIN_PCHOICE() \
     RTASN1TMPL_BEGIN_COMMON(); \
+    RT_NOREF_PV(fFlags); \
     RTAsn1Dummy_InitEx(&pThis->Dummy); \
     pThis->Dummy.Asn1Core.pOps = &RT_CONCAT3(g_,RTASN1TMPL_INT_NAME,_Vtable); \
     RTAsn1CursorInitAllocation(pCursor, &pThis->Allocation); \
diff --git a/include/iprt/asn1-generator-sanity.h b/include/iprt/asn1-generator-sanity.h
index f0a1f83..9d93eed 100644
--- a/include/iprt/asn1-generator-sanity.h
+++ b/include/iprt/asn1-generator-sanity.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/asn1.h b/include/iprt/asn1.h
index 237574b..71dc166 100644
--- a/include/iprt/asn1.h
+++ b/include/iprt/asn1.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/assert.h b/include/iprt/assert.h
index a991202..47afdd8 100644
--- a/include/iprt/assert.h
+++ b/include/iprt/assert.h
@@ -301,7 +301,7 @@ RT_C_DECLS_END
  * @param   expr    Expression which should be true.
  */
 #ifdef __GNUC__
-# define AssertCompileNS(expr)  extern int RTASSERTVAR[1] __attribute__((unused)), RTASSERTVAR[(expr) ? 1 : 0] __attribute__((unused))
+# define AssertCompileNS(expr)  extern int RTASSERTVAR[1] __attribute__((__unused__)), RTASSERTVAR[(expr) ? 1 : 0] __attribute__((__unused__))
 #elif defined(__IBMC__) || defined(__IBMCPP__)
 # define AssertCompileNS(expr)  extern int RTASSERTVAR[(expr) ? 1 : 0]
 #else
@@ -2813,6 +2813,30 @@ RT_C_DECLS_END
             AssertMsg(expr, ("%s = %#RX64 (%RI64)", #var, (uint64_t)var, (int64_t)var)); \
     } while (0)
 
+#ifdef RT_OS_WINDOWS
+
+/** @def AssertNtStatus
+ * Asserts that the NT_SUCCESS() returns true for the given NTSTATUS value.
+ *
+ * @param   a_rcNt  The NTSTATUS to check.  Will be evaluated twice and
+ *                  subjected to NOREF().
+ * @sa      AssertRC()
+ */
+# define AssertNtStatus(a_rcNt) \
+    do { AssertMsg(NT_SUCCESS(a_rcNt), ("%#x\n", (a_rcNt))); NOREF(a_rcNt); } while (0)
+
+/** @def AssertNtStatusSuccess
+ * Asserts that the given NTSTATUS value equals STATUS_SUCCESS.
+ *
+ * @param   a_rcNt  The NTSTATUS to check.  Will be evaluated twice and
+ *                  subjected to NOREF().
+ * @sa      AssertRCSuccess()
+ */
+# define AssertNtStatusSuccess(a_rcNt) \
+    do { AssertMsg((a_rcNt) == STATUS_SUCCESS, ("%#x\n", (a_rcNt))); NOREF(a_rcNt); } while (0)
+
+#endif /* RT_OS_WINDOWS */
+
 /** @} */
 
 /** @} */
diff --git a/include/iprt/base64.h b/include/iprt/base64.h
index 58644cd..7e75832 100644
--- a/include/iprt/base64.h
+++ b/include/iprt/base64.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/bignum.h b/include/iprt/bignum.h
index 0733067..695ca6b 100644
--- a/include/iprt/bignum.h
+++ b/include/iprt/bignum.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/bldprog-strtab-template.cpp.h b/include/iprt/bldprog-strtab-template.cpp.h
index 9960f38..ada2fc3 100644
--- a/include/iprt/bldprog-strtab-template.cpp.h
+++ b/include/iprt/bldprog-strtab-template.cpp.h
@@ -213,16 +213,18 @@ static bool BldProgStrTab_Init(PBLDPROGSTRTAB pThis, size_t cMaxStrings)
 }
 
 
+#if 0 /* unused */
 static void BldProgStrTab_Delete(PBLDPROGSTRTAB pThis)
 {
     free(pThis->papStrHash);
     free(pThis->papSortedStrings);
     free(pThis->pachStrTab);
-#ifdef BLDPROG_STRTAB_WITH_COMPRESSION
+# ifdef BLDPROG_STRTAB_WITH_COMPRESSION
     free(pThis->papPendingStrings);
-#endif
+# endif
     memset(pThis, 0, sizeof(*pThis));
 }
+#endif
 
 
 #ifdef BLDPROG_STRTAB_WITH_COMPRESSION
diff --git a/include/iprt/buildconfig.h b/include/iprt/buildconfig.h
index c43157a..1c7d943 100644
--- a/include/iprt/buildconfig.h
+++ b/include/iprt/buildconfig.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/cdefs.h b/include/iprt/cdefs.h
index fae7cf3..9dca422 100644
--- a/include/iprt/cdefs.h
+++ b/include/iprt/cdefs.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1164,7 +1164,7 @@
 #elif defined(RT_OS_OS2)
 # define RTCALL                 __cdecl
 #elif defined(__GNUC__) && defined(RT_ARCH_X86)
-# define RTCALL                 __attribute__((cdecl,regparm(0)))
+# define RTCALL                 __attribute__((__cdecl__,__regparm__(0)))
 #else
 # define RTCALL
 #endif
@@ -1401,18 +1401,22 @@
 
 /** @def IN_RT_STATIC
  * Used to indicate whether we're linking against a static IPRT
- * or not. The IPRT symbols will be declared as hidden (if
- * supported). Note that this define has no effect without setting
- * IN_RT_R0, IN_RT_R3 or IN_RT_RC indicators are set first.
+ * or not.
+ *
+ * The IPRT symbols will be declared as hidden (if supported).  Note that this
+ * define has no effect without also setting one of the IN_RT_R0, IN_RT_R3 or
+ * IN_RT_RC indicators.
  */
 
 /** @def IN_RT_R0
- * Used to indicate whether we're inside the same link module as
- * the HC Ring-0 Runtime Library.
+ * Used to indicate whether we're inside the same link module as the host
+ * context ring-0 Runtime Library.
  */
 /** @def RTR0DECL(type)
- * Runtime Library HC Ring-0 export or import declaration.
+ * Runtime Library host context ring-0 export or import declaration.
  * @param   type    The return type of the function declaration.
+ * @remarks This is only used inside IPRT.  Other APIs need to define their own
+ *          XXXX_DECL macros for dealing with import/export/static visibility.
  */
 #ifdef IN_RT_R0
 # ifdef IN_RT_STATIC
@@ -1425,12 +1429,14 @@
 #endif
 
 /** @def IN_RT_R3
- * Used to indicate whether we're inside the same link module as
- * the HC Ring-3 Runtime Library.
+ * Used to indicate whether we're inside the same link module as the host
+ * context ring-3 Runtime Library.
  */
 /** @def RTR3DECL(type)
- * Runtime Library HC Ring-3 export or import declaration.
+ * Runtime Library host context ring-3 export or import declaration.
  * @param   type    The return type of the function declaration.
+ * @remarks This is only used inside IPRT.  Other APIs need to define their own
+ *          XXXX_DECL macros for dealing with import/export/static visibility.
  */
 #ifdef IN_RT_R3
 # ifdef IN_RT_STATIC
@@ -1449,6 +1455,8 @@
 /** @def RTRCDECL(type)
  * Runtime Library raw-mode context export or import declaration.
  * @param   type    The return type of the function declaration.
+ * @remarks This is only used inside IPRT.  Other APIs need to define their own
+ *          XXXX_DECL macros for dealing with import/export/static visibility.
  */
 #ifdef IN_RT_RC
 # ifdef IN_RT_STATIC
@@ -1464,6 +1472,8 @@
  * Runtime Library export or import declaration.
  * Functions declared using this macro exists in all contexts.
  * @param   type    The return type of the function declaration.
+ * @remarks This is only used inside IPRT.  Other APIs need to define their own
+ *          XXXX_DECL macros for dealing with import/export/static visibility.
  */
 #if defined(IN_RT_R3) || defined(IN_RT_RC) || defined(IN_RT_R0)
 # ifdef IN_RT_STATIC
@@ -1479,10 +1489,14 @@
  * Runtime Library export or import declaration.
  * Data declared using this macro exists in all contexts.
  * @param   type    The data type.
+ * @remarks This is only used inside IPRT.  Other APIs need to define their own
+ *          XXXX_DECL macros for dealing with import/export/static visibility.
  */
 /** @def RT_DECL_DATA_CONST(type)
  * Definition of a const variable. See DECL_HIDDEN_CONST.
  * @param   type    The const data type.
+ * @remarks This is only used inside IPRT.  Other APIs need to define their own
+ *          XXXX_DECL macros for dealing with import/export/static visibility.
  */
 #if defined(IN_RT_R3) || defined(IN_RT_RC) || defined(IN_RT_R0)
 # ifdef IN_RT_STATIC
@@ -1503,6 +1517,8 @@
 
 /** @def RT_DECL_CLASS
  * Declares an class living in the runtime.
+ * @remarks This is only used inside IPRT.  Other APIs need to define their own
+ *          XXXX_DECL macros for dealing with import/export/static visibility.
  */
 #if defined(IN_RT_R3) || defined(IN_RT_RC) || defined(IN_RT_R0)
 # ifdef IN_RT_STATIC
@@ -2278,6 +2294,8 @@
  * Gets the low uint8_t of a uint16_t or something equivalent. */
 #ifdef __GNUC__
 # define RT_LO_U8(a)    __extension__ ({ AssertCompile(sizeof((a)) == sizeof(uint16_t)); (uint8_t)(a); })
+#elif defined(_MSC_VER) /* shut up cast truncates constant value warnings */
+# define RT_LO_U8(a)                            ( (uint8_t)(UINT8_MAX & (a)) )
 #else
 # define RT_LO_U8(a)                            ( (uint8_t)(a) )
 #endif
@@ -2293,6 +2311,8 @@
  * Gets the low uint16_t of a uint32_t or something equivalent. */
 #ifdef __GNUC__
 # define RT_LO_U16(a)   __extension__ ({ AssertCompile(sizeof((a)) == sizeof(uint32_t)); (uint16_t)(a); })
+#elif defined(_MSC_VER) /* shut up cast truncates constant value warnings */
+# define RT_LO_U16(a)                           ( (uint16_t)(UINT16_MAX & (a)) )
 #else
 # define RT_LO_U16(a)                           ( (uint16_t)(a) )
 #endif
@@ -2308,6 +2328,8 @@
  * Gets the low uint32_t of a uint64_t or something equivalent. */
 #ifdef __GNUC__
 # define RT_LO_U32(a)   __extension__ ({ AssertCompile(sizeof((a)) == sizeof(uint64_t)); (uint32_t)(a); })
+#elif defined(_MSC_VER) /* shut up cast truncates constant value warnings */
+# define RT_LO_U32(a)                           ( (uint32_t)(UINT32_MAX & (a)) )
 #else
 # define RT_LO_U32(a)                           ( (uint32_t)(a) )
 #endif
@@ -2761,6 +2783,7 @@
  */
 #define NIL_OFFSET   (~0U)
 
+
 /** @def NOREF
  * Keeps the compiler from bitching about an unused parameter, local variable,
  * or other stuff, will never use _Pragma are is thus more flexible.
@@ -2778,6 +2801,99 @@
 # define RT_NOREF_PV(var)       (void)(var)
 #endif
 
+/** @def RT_NOREF1
+ * RT_NOREF_PV shorthand taking on parameter. */
+#define RT_NOREF1(var1)                                 RT_NOREF_PV(var1)
+/** @def RT_NOREF2
+ * RT_NOREF_PV shorthand taking two parameters. */
+#define RT_NOREF2(var1, var2)                           RT_NOREF_PV(var1); RT_NOREF1(var2)
+/** @def RT_NOREF3
+ * RT_NOREF_PV shorthand taking three parameters. */
+#define RT_NOREF3(var1, var2, var3)                     RT_NOREF_PV(var1); RT_NOREF2(var2, var3)
+/** @def RT_NOREF4
+ * RT_NOREF_PV shorthand taking four parameters. */
+#define RT_NOREF4(var1, var2, var3, var4)               RT_NOREF_PV(var1); RT_NOREF3(var2, var3, var4)
+/** @def RT_NOREF5
+ * RT_NOREF_PV shorthand taking five parameters. */
+#define RT_NOREF5(var1, var2, var3, var4, var5)         RT_NOREF_PV(var1); RT_NOREF4(var2, var3, var4, var5)
+/** @def RT_NOREF6
+ * RT_NOREF_PV shorthand taking six parameters.  */
+#define RT_NOREF6(var1, var2, var3, var4, var5, var6)   RT_NOREF_PV(var1); RT_NOREF5(var2, var3, var4, var5, var6)
+/** @def RT_NOREF7
+ * RT_NOREF_PV shorthand taking seven parameters.  */
+#define RT_NOREF7(var1, var2, var3, var4, var5, var6, var7) \
+    RT_NOREF_PV(var1); RT_NOREF6(var2, var3, var4, var5, var6, var7)
+/** @def RT_NOREF8
+ * RT_NOREF_PV shorthand taking eight parameters.  */
+#define RT_NOREF8(var1, var2, var3, var4, var5, var6, var7, var8) \
+    RT_NOREF_PV(var1); RT_NOREF7(var2, var3, var4, var5, var6, var7, var8)
+/** @def RT_NOREF9
+ * RT_NOREF_PV shorthand taking nine parameters.  */
+#define RT_NOREF9(var1, var2, var3, var4, var5, var6, var7, var8, var9) \
+    RT_NOREF_PV(var1); RT_NOREF8(var2, var3, var4, var5, var6, var7, var8)
+/** @def RT_NOREF10
+ * RT_NOREF_PV shorthand taking ten parameters.  */
+#define RT_NOREF10(var1, var2, var3, var4, var5, var6, var7, var8, var9, var10) \
+    RT_NOREF_PV(var1); RT_NOREF_PV(var2); RT_NOREF_PV(var3); RT_NOREF_PV(var4); RT_NOREF_PV(var5); RT_NOREF_PV(var6); \
+    RT_NOREF_PV(var7); RT_NOREF_PV(var8); RT_NOREF_PV(var9); RT_NOREF_PV(var10)
+/** @def RT_NOREF11
+ * RT_NOREF_PV shorthand taking eleven parameters.  */
+#define RT_NOREF11(var1, var2, var3, var4, var5, var6, var7, var8, var9, var10, var11) \
+    RT_NOREF_PV(var1); RT_NOREF10(var2, var3, var4, var5, var6, var7, var8, var9, var10)
+/** @def RT_NOREF12
+ * RT_NOREF_PV shorthand taking twelve parameters.  */
+#define RT_NOREF12(var1, var2, var3, var4, var5, var6, var7, var8, var9, var10, var11, var12) \
+    RT_NOREF_PV(var1); RT_NOREF11(var2, var3, var4, var5, var6, var7, var8, var9, var10, var11, var12)
+/** @def RT_NOREF13
+ * RT_NOREF_PV shorthand taking thirteen parameters.  */
+#define RT_NOREF13(var1, var2, var3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13) \
+    RT_NOREF_PV(var1); RT_NOREF12(var2, var3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13)
+/** @def RT_NOREF14
+ * RT_NOREF_PV shorthand taking fourteen parameters.  */
+#define RT_NOREF14(var1, var2, var3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14) \
+    RT_NOREF_PV(var1); RT_NOREF13(var2, var3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14)
+/** @def RT_NOREF15
+ * RT_NOREF_PV shorthand taking fifteen parameters.  */
+#define RT_NOREF15(var1, var2, var3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14, var15) \
+    RT_NOREF_PV(var1); RT_NOREF14(var2, var3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14, var15)
+/** @def RT_NOREF16
+ * RT_NOREF_PV shorthand taking fifteen parameters.  */
+#define RT_NOREF16(var1, var2, var3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14, var15, var16) \
+    RT_NOREF_PV(var1); RT_NOREF15(var2, var3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14, var15, var16)
+/** @def RT_NOREF17
+ * RT_NOREF_PV shorthand taking seventeen parameters.  */
+#define RT_NOREF17(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17) \
+    RT_NOREF_PV(v1); RT_NOREF16(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17)
+/** @def RT_NOREF18
+ * RT_NOREF_PV shorthand taking eighteen parameters.  */
+#define RT_NOREF18(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18) \
+    RT_NOREF_PV(v1); RT_NOREF17(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18)
+/** @def RT_NOREF19
+ * RT_NOREF_PV shorthand taking nineteen parameters.  */
+#define RT_NOREF19(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19) \
+    RT_NOREF_PV(v1); RT_NOREF18(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19)
+/** @def RT_NOREF20
+ * RT_NOREF_PV shorthand taking twenty parameters.  */
+#define RT_NOREF20(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20) \
+    RT_NOREF_PV(v1); RT_NOREF19(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20)
+/** @def RT_NOREF21
+ * RT_NOREF_PV shorthand taking twentyone parameters.  */
+#define RT_NOREF21(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21) \
+    RT_NOREF_PV(v1); RT_NOREF20(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21)
+/** @def RT_NOREF22
+ * RT_NOREF_PV shorthand taking twentytwo parameters.  */
+#define RT_NOREF22(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22) \
+    RT_NOREF_PV(v1); RT_NOREF21(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22)
+
+/** @def RT_NOREF
+ * RT_NOREF_PV variant using the variadic macro feature of C99.
+ * @remarks Only use this in sources */
+#ifdef RT_COMPILER_SUPPORTS_VA_ARGS
+# define RT_NOREF(...) \
+    RT_UNPACK_CALL(RT_CONCAT(RT_NOREF, RT_EXPAND(RT_COUNT_VA_ARGS(__VA_ARGS__))),(__VA_ARGS__))
+#endif
+
+
 /** @def RT_BREAKPOINT
  * Emit a debug breakpoint instruction.
  *
@@ -3517,10 +3633,9 @@
  *
  * @param      Cls     class name to declare for
  */
-
 #define DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(Cls) \
-    inline Cls (const Cls &); \
-    inline Cls &operator= (const Cls &);
+    inline Cls(const Cls &); \
+    inline Cls &operator= (const Cls &)
 
 
 /** @def DECLARE_CLS_NEW_DELETE_NOOP
@@ -3538,7 +3653,7 @@
  */
 #define DECLARE_CLS_NEW_DELETE_NOOP(Cls) \
     inline static void *operator new (size_t); \
-    inline static void operator delete (void *);
+    inline static void operator delete (void *)
 
 #endif /* __cplusplus */
 
diff --git a/include/iprt/cdrom.h b/include/iprt/cdrom.h
index 847d5bd..1451931 100644
--- a/include/iprt/cdrom.h
+++ b/include/iprt/cdrom.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/cidr.h b/include/iprt/cidr.h
index 1709cf6..ebb1efa 100644
--- a/include/iprt/cidr.h
+++ b/include/iprt/cidr.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/circbuf.h b/include/iprt/circbuf.h
index c689c7a..c7dce2e 100644
--- a/include/iprt/circbuf.h
+++ b/include/iprt/circbuf.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/condvar.h b/include/iprt/condvar.h
index 7ae7e64..a26d33b 100644
--- a/include/iprt/condvar.h
+++ b/include/iprt/condvar.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/coredumper.h b/include/iprt/coredumper.h
index c083466..12dce4b 100644
--- a/include/iprt/coredumper.h
+++ b/include/iprt/coredumper.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/cpp/autores.h b/include/iprt/cpp/autores.h
index 1cf6783..a7b1b40 100644
--- a/include/iprt/cpp/autores.h
+++ b/include/iprt/cpp/autores.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/cpp/exception.h b/include/iprt/cpp/exception.h
index 4f94c5a..3c60e30 100644
--- a/include/iprt/cpp/exception.h
+++ b/include/iprt/cpp/exception.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/cpp/list.h b/include/iprt/cpp/list.h
index 2e5dfa6..4719b29 100644
--- a/include/iprt/cpp/list.h
+++ b/include/iprt/cpp/list.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/cpp/lock.h b/include/iprt/cpp/lock.h
index 319127d..cbe6955 100644
--- a/include/iprt/cpp/lock.h
+++ b/include/iprt/cpp/lock.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/cpp/meta.h b/include/iprt/cpp/meta.h
index bdb0a86..92a7170 100644
--- a/include/iprt/cpp/meta.h
+++ b/include/iprt/cpp/meta.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/cpp/ministring.h b/include/iprt/cpp/ministring.h
index e845867..b48b57e 100644
--- a/include/iprt/cpp/ministring.h
+++ b/include/iprt/cpp/ministring.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/cpp/mtlist.h b/include/iprt/cpp/mtlist.h
index 9efa870..53b1539 100644
--- a/include/iprt/cpp/mtlist.h
+++ b/include/iprt/cpp/mtlist.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/cpp/utils.h b/include/iprt/cpp/utils.h
index ccfe713..c7b1989 100644
--- a/include/iprt/cpp/utils.h
+++ b/include/iprt/cpp/utils.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/cpp/xml.h b/include/iprt/cpp/xml.h
index 3c7d7a1..cc14c1f 100644
--- a/include/iprt/cpp/xml.h
+++ b/include/iprt/cpp/xml.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -315,7 +315,7 @@ private:
     Data *m;
 
     /* auto_ptr data doesn't have proper copy semantics */
-    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP (File)
+    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(File);
 };
 
 /**
@@ -342,7 +342,7 @@ private:
     Data *m;
 
     /* auto_ptr data doesn't have proper copy semantics */
-    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(MemoryBuf)
+    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(MemoryBuf);
 };
 
 
diff --git a/include/iprt/cpuset.h b/include/iprt/cpuset.h
index e79256e..e929409 100644
--- a/include/iprt/cpuset.h
+++ b/include/iprt/cpuset.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -47,7 +47,7 @@ RT_C_DECLS_BEGIN
  */
 DECLINLINE(PRTCPUSET) RTCpuSetEmpty(PRTCPUSET pSet)
 {
-    unsigned i;
+    size_t i;
     for (i = 0; i < RT_ELEMENTS(pSet->bmSet); i++)
         pSet->bmSet[i] = 0;
     return pSet;
@@ -62,7 +62,7 @@ DECLINLINE(PRTCPUSET) RTCpuSetEmpty(PRTCPUSET pSet)
  */
 DECLINLINE(PRTCPUSET) RTCpuSetFill(PRTCPUSET pSet)
 {
-    unsigned i;
+    size_t i;
     for (i = 0; i < RT_ELEMENTS(pSet->bmSet); i++)
         pSet->bmSet[i] = UINT64_MAX;
     return pSet;
@@ -77,7 +77,7 @@ DECLINLINE(PRTCPUSET) RTCpuSetFill(PRTCPUSET pSet)
  */
 DECLINLINE(void) RTCpuSetCopy(PRTCPUSET pDst, PRTCPUSET pSrc)
 {
-    unsigned i;
+    size_t i;
     for (i = 0; i < RT_ELEMENTS(pDst->bmSet); i++)
         pDst->bmSet[i] = pSrc->bmSet[i];
 }
@@ -92,7 +92,7 @@ DECLINLINE(void) RTCpuSetCopy(PRTCPUSET pDst, PRTCPUSET pSrc)
  */
 DECLINLINE(PRTCPUSET) RTCpuSetAnd(PRTCPUSET pSet, PRTCPUSET pAndMaskSet)
 {
-    unsigned i;
+    size_t i;
     for (i = 0; i < RT_ELEMENTS(pSet->bmSet); i++)
         ASMAtomicAndU64((volatile uint64_t *)&pSet->bmSet[i], pAndMaskSet->bmSet[i]);
     return pSet;
@@ -219,7 +219,7 @@ DECLINLINE(bool) RTCpuSetIsMemberByIndex(PCRTCPUSET pSet, int iCpu)
  */
 DECLINLINE(bool) RTCpuSetIsEqual(PCRTCPUSET pSet1, PCRTCPUSET pSet2)
 {
-    unsigned i;
+    size_t i;
     for (i = 0; i < RT_ELEMENTS(pSet1->bmSet); i++)
         if (pSet1->bmSet[i] != pSet2->bmSet[i])
             return false;
@@ -235,7 +235,7 @@ DECLINLINE(bool) RTCpuSetIsEqual(PCRTCPUSET pSet1, PCRTCPUSET pSet2)
  */
 DECLINLINE(bool) RTCpuSetIsEmpty(PRTCPUSET pSet)
 {
-    unsigned i;
+    size_t i;
     for (i = 0; i < RT_ELEMENTS(pSet->bmSet); i++)
         if (pSet->bmSet[i])
             return false;
@@ -264,7 +264,7 @@ DECLINLINE(uint64_t) RTCpuSetToU64(PCRTCPUSET pSet)
  */
 DECLINLINE(PRTCPUSET) RTCpuSetFromU64(PRTCPUSET pSet, uint64_t fMask)
 {
-    unsigned i;
+    size_t i;
 
     pSet->bmSet[0] = fMask;
     for (i = 1; i < RT_ELEMENTS(pSet->bmSet); i++)
@@ -283,7 +283,7 @@ DECLINLINE(PRTCPUSET) RTCpuSetFromU64(PRTCPUSET pSet, uint64_t fMask)
 DECLINLINE(int) RTCpuSetCount(PCRTCPUSET pSet)
 {
     int         cCpus = 0;
-    unsigned    i;
+    size_t      i;
 
     for (i = 0; i < RT_ELEMENTS(pSet->bmSet); i++)
     {
@@ -311,7 +311,7 @@ DECLINLINE(int) RTCpuSetCount(PCRTCPUSET pSet)
  */
 DECLINLINE(int) RTCpuLastIndex(PCRTCPUSET pSet)
 {
-    unsigned i = RT_ELEMENTS(pSet->bmSet);
+    size_t i = RT_ELEMENTS(pSet->bmSet);
     while (i-- > 0)
     {
         uint64_t u64 = pSet->bmSet[i];
@@ -325,7 +325,7 @@ DECLINLINE(int) RTCpuLastIndex(PCRTCPUSET pSet)
                     break;
                 u64 <<= 1;
             }
-            return i * 64 + iBit;
+            return (int)i * 64 + iBit;
         }
     }
     return 0;
diff --git a/include/iprt/crc.h b/include/iprt/crc.h
index 5b5a708..e917c5c 100644
--- a/include/iprt/crc.h
+++ b/include/iprt/crc.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/critsect.h b/include/iprt/critsect.h
index 3e3819b..c028d4f 100644
--- a/include/iprt/critsect.h
+++ b/include/iprt/critsect.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/crypto/digest.h b/include/iprt/crypto/digest.h
index f4a14d3..0ce5eec 100644
--- a/include/iprt/crypto/digest.h
+++ b/include/iprt/crypto/digest.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -63,7 +63,7 @@ typedef struct RTCRDIGESTDESC
      * Allocates the digest data.
      */
     DECLCALLBACKMEMBER(void *, pfnNew)(void);
-    
+
     /**
      * Frees the digest data.
      *
diff --git a/include/iprt/crypto/pkcs7.h b/include/iprt/crypto/pkcs7.h
index 5feae9e..4b8265f 100644
--- a/include/iprt/crypto/pkcs7.h
+++ b/include/iprt/crypto/pkcs7.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/crypto/pkix.h b/include/iprt/crypto/pkix.h
index cd6721f..a74709a 100644
--- a/include/iprt/crypto/pkix.h
+++ b/include/iprt/crypto/pkix.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/crypto/rsa.h b/include/iprt/crypto/rsa.h
index 3352f6e..0e6f8f7 100644
--- a/include/iprt/crypto/rsa.h
+++ b/include/iprt/crypto/rsa.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/crypto/spc.h b/include/iprt/crypto/spc.h
index 38fe691..98da59d 100644
--- a/include/iprt/crypto/spc.h
+++ b/include/iprt/crypto/spc.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/crypto/store.h b/include/iprt/crypto/store.h
index c2a8172..37795ea 100644
--- a/include/iprt/crypto/store.h
+++ b/include/iprt/crypto/store.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/crypto/taf.h b/include/iprt/crypto/taf.h
index d975754..fa37145 100644
--- a/include/iprt/crypto/taf.h
+++ b/include/iprt/crypto/taf.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/crypto/tsp.h b/include/iprt/crypto/tsp.h
index 0f96517..59d43f6 100644
--- a/include/iprt/crypto/tsp.h
+++ b/include/iprt/crypto/tsp.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/crypto/x509.h b/include/iprt/crypto/x509.h
index 5b98471..c453845 100644
--- a/include/iprt/crypto/x509.h
+++ b/include/iprt/crypto/x509.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/ctype.h b/include/iprt/ctype.h
index 748fa97..010c7ac 100644
--- a/include/iprt/ctype.h
+++ b/include/iprt/ctype.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/dbg.h b/include/iprt/dbg.h
index 4e607a8..1e31d4e 100644
--- a/include/iprt/dbg.h
+++ b/include/iprt/dbg.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/dir.h b/include/iprt/dir.h
index 3667613..9e2c3ce 100644
--- a/include/iprt/dir.h
+++ b/include/iprt/dir.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -129,22 +129,30 @@ RTDECL(int) RTDirCreateTempSecure(char *pszTemplate);
 /**
  * Creates a new directory with a unique name by appending a number.
  *
- * First it is tried to create the directory without any numbers appended.
- * When this fails a number string is appended (starting with 1) separated by
- * the optional separator. The numbers are zero padded.
+ * This API differs from RTDirCreateTemp & RTDirCreateTempSecure in that it
+ * first tries to create the directory without any random bits, thus the best
+ * case result will be prettier.  It also differs in that it does not take a
+ * template, but is instead given a template description, and will only use
+ * digits for the filling.
+ *
+ * For sake of convenience and debugging , the current implementation
+ * starts at 0 and will increment sequentally for a while before switching to
+ * random numbers.
  *
  * On success @a pszPath contains the path created.
  *
  * @returns iprt status code.
- * @param   pszPath     Path to the directory to create.
- * @param   cbSize      The size of pszPath. Needs enough space for holding the
- *                      digits and the optional separator.
+ * @param   pszPath     The path to the directory.  On input the base template
+ *                      name.  On successful return, the unique directory we
+ *                      created.
+ * @param   cbSize      The size of the pszPath buffer.  Needs enough space for
+ *                      holding the digits and the optional separator.
  * @param   fMode       The mode of the new directory.
- * @param   cchDigits   How many digits should the number maximal have.
+ * @param   cchDigits   How many digits should the number have (zero padded).
  * @param   chSep       The separator used between the path and the number. Can
  *                      be zero. (optional)
  */
-RTDECL(int) RTDirCreateUniqueNumbered(char *pszPath, size_t cbSize, RTFMODE fMode, signed int cchDigits, char chSep);
+RTDECL(int) RTDirCreateUniqueNumbered(char *pszPath, size_t cbSize, RTFMODE fMode, size_t cchDigits, char chSep);
 
 /**
  * Removes a directory if empty.
diff --git a/include/iprt/dvm.h b/include/iprt/dvm.h
index d17ad90..b28f4ab 100644
--- a/include/iprt/dvm.h
+++ b/include/iprt/dvm.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/env.h b/include/iprt/env.h
index 1422815..eed50fe 100644
--- a/include/iprt/env.h
+++ b/include/iprt/env.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/err.h b/include/iprt/err.h
index 5f77068..3d411ed 100644
--- a/include/iprt/err.h
+++ b/include/iprt/err.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/errno.h b/include/iprt/errno.h
index 98dde9c..b9d1ee3 100644
--- a/include/iprt/errno.h
+++ b/include/iprt/errno.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -34,6 +34,8 @@
 #  include <linux/errno.h>
 # elif defined(RT_OS_FREEBSD) && defined(_KERNEL)
 #  include <sys/errno.h>
+# elif defined(RT_OS_NETBSD) && defined(_KERNEL)
+#  include <sys/errno.h>
 # else
 #  include <errno.h>
 # endif
diff --git a/include/iprt/file.h b/include/iprt/file.h
index 3646dfe..48454fc 100644
--- a/include/iprt/file.h
+++ b/include/iprt/file.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -678,15 +678,15 @@ RTDECL(int) RTFileRename(const char *pszSrc, const char *pszDst, unsigned fRenam
  * Converts file opening modes (used by fopen, for example) to IPRT
  * compatible flags, which then can be used with RTFileOpen* APIs.
  *
- * Note: Handling sharing modes is not supported yet, so RTFILE_O_DENY_NONE
- *       will be used by default.
+ * @note    Handling sharing modes is not supported yet, so RTFILE_O_DENY_NONE
+ *          will always be used.
  *
  * @return  IPRT status code.
  * @param   pszMode                 Mode string to convert.
- * @param   puMode                  Where to store the converted mode flags
- *                                  on success.
+ * @param   pfMode                  Where to store the converted mode flags on
+ *                                  success.
  */
-RTDECL(int) RTFileModeToFlags(const char *pszMode, uint64_t *puMode);
+RTDECL(int) RTFileModeToFlags(const char *pszMode, uint64_t *pfMode);
 
 /**
  * Converts file opening modes along with a separate disposition command
@@ -708,19 +708,18 @@ RTDECL(int) RTFileModeToFlags(const char *pszMode, uint64_t *puMode);
  *      "oe" - Opens an existing file or fail if it does not exist.
  *      "ot" - Opens and truncate an existing file or fail if it does not exist.
  *
- * Sharing modes:
- *      Not implemented yet. RTFILE_O_DENY_NONE will be
- *      used by default.
+ * @note    Sharing modes are not implemented yet, so RTFILE_O_DENY_NONE will
+ *          always be used.
  *
  * @return  IPRT status code.
  * @param   pszAccess               Access mode string to convert.
  * @param   pszDisposition          Disposition mode string to convert.
- * @param   pszSharing              Sharing mode string to convert. Not
- *                                  implemented yet.
- * @param   puMode                  Where to store the converted mode flags
+ * @param   pszSharing              Sharing mode string to convert.  Not
+ *                                  implemented yet - completely ignored!
+ * @param   pfMode                  Where to store the converted mode flags
  *                                  on success.
  */
-RTDECL(int) RTFileModeToFlagsEx(const char *pszAccess, const char *pszDisposition, const char *pszSharing, uint64_t *puMode);
+RTDECL(int) RTFileModeToFlagsEx(const char *pszAccess, const char *pszDisposition, const char *pszSharing, uint64_t *pfMode);
 
 /**
  * Moves a file.
diff --git a/include/iprt/filesystem.h b/include/iprt/filesystem.h
index 2fef661..31388c3 100644
--- a/include/iprt/filesystem.h
+++ b/include/iprt/filesystem.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/formats/asn1.h b/include/iprt/formats/asn1.h
index 2893422..f00dfd7 100644
--- a/include/iprt/formats/asn1.h
+++ b/include/iprt/formats/asn1.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/formats/codeview.h b/include/iprt/formats/codeview.h
index a03634c..b35d0ee 100644
--- a/include/iprt/formats/codeview.h
+++ b/include/iprt/formats/codeview.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/formats/elf-amd64.h b/include/iprt/formats/elf-amd64.h
index 3289945..e606cdd 100644
--- a/include/iprt/formats/elf-amd64.h
+++ b/include/iprt/formats/elf-amd64.h
@@ -25,7 +25,7 @@
  */
 
 #ifndef ___iprt_formats_elf_amd64_h
-#define	___iprt_formats_elf_amd64_h
+#define ___iprt_formats_elf_amd64_h
 
 /*
  * ELF definitions for the AMD64 architecture.
@@ -38,36 +38,36 @@
  * The i386 supplement to the SVR4 ABI specification names this "auxv_t",
  * but POSIX lays claim to all symbols ending with "_t".
  */
-typedef struct {	/* Auxiliary vector entry on initial stack */
-	int	a_type;			/* Entry type. */
-	union {
-		int	a_val;		/* Integer value. */
-	} a_un;
+typedef struct {        /* Auxiliary vector entry on initial stack */
+        int     a_type;                 /* Entry type. */
+        union {
+                int     a_val;          /* Integer value. */
+        } a_un;
 } Elf32_Auxinfo;
 
 
-typedef struct {	/* Auxiliary vector entry on initial stack */
-	long	a_type;			/* Entry type. */
-	union {
-		long	a_val;		/* Integer value. */
-		void	*a_ptr;		/* Address. */
-		void	(*a_fcn)(void);	/* Function pointer (not used). */
-	} a_un;
+typedef struct {        /* Auxiliary vector entry on initial stack */
+        long    a_type;                 /* Entry type. */
+        union {
+                long    a_val;          /* Integer value. */
+                void    *a_ptr;         /* Address. */
+                void    (*a_fcn)(void); /* Function pointer (not used). */
+        } a_un;
 } Elf64_Auxinfo;
 
 __ElfType(Auxinfo);
 
 /* Values for a_type. */
-#define	AT_NULL		0	/* Terminates the vector. */
-#define	AT_IGNORE	1	/* Ignored entry. */
-#define	AT_EXECFD	2	/* File descriptor of program to load. */
-#define	AT_PHDR		3	/* Program header of program already loaded. */
-#define	AT_PHENT	4	/* Size of each program header entry. */
-#define	AT_PHNUM	5	/* Number of program header entries. */
-#define	AT_PAGESZ	6	/* Page size in bytes. */
-#define	AT_BASE		7	/* Interpreter's base address. */
-#define	AT_FLAGS	8	/* Flags (unused for i386). */
-#define	AT_ENTRY	9	/* Where interpreter should transfer control. */
+#define AT_NULL         0       /* Terminates the vector. */
+#define AT_IGNORE       1       /* Ignored entry. */
+#define AT_EXECFD       2       /* File descriptor of program to load. */
+#define AT_PHDR         3       /* Program header of program already loaded. */
+#define AT_PHENT        4       /* Size of each program header entry. */
+#define AT_PHNUM        5       /* Number of program header entries. */
+#define AT_PAGESZ       6       /* Page size in bytes. */
+#define AT_BASE         7       /* Interpreter's base address. */
+#define AT_FLAGS        8       /* Flags (unused for i386). */
+#define AT_ENTRY        9       /* Where interpreter should transfer control. */
 
 /*
  * The following non-standard values are used for passing information
@@ -77,19 +77,19 @@ __ElfType(Auxinfo);
  * Unfortunately, these overlap the Linux non-standard values, so they
  * must not be used in the same context.
  */
-#define	AT_BRK		10	/* Starting point for sbrk and brk. */
-#define	AT_DEBUG	11	/* Debugging level. */
+#define AT_BRK          10      /* Starting point for sbrk and brk. */
+#define AT_DEBUG        11      /* Debugging level. */
 
 /*
  * The following non-standard values are used in Linux ELF binaries.
  */
-#define	AT_NOTELF	10	/* Program is not ELF ?? */
-#define	AT_UID		11	/* Real uid. */
-#define	AT_EUID		12	/* Effective uid. */
-#define	AT_GID		13	/* Real gid. */
-#define	AT_EGID		14	/* Effective gid. */
+#define AT_NOTELF       10      /* Program is not ELF ?? */
+#define AT_UID          11      /* Real uid. */
+#define AT_EUID         12      /* Effective uid. */
+#define AT_GID          13      /* Real gid. */
+#define AT_EGID         14      /* Effective gid. */
 
-#define	AT_COUNT	15	/* Count of defined aux entry types. */
+#define AT_COUNT        15      /* Count of defined aux entry types. */
 
 #endif /* later */
 
@@ -97,32 +97,32 @@ __ElfType(Auxinfo);
  * Relocation types.
  */
 
-#define	R_X86_64_NONE	0	/* No relocation. */
-#define	R_X86_64_64	1	/* Add 64 bit symbol value. */
-#define	R_X86_64_PC32	2	/* PC-relative 32 bit signed sym value. */
-#define	R_X86_64_GOT32	3	/* PC-relative 32 bit GOT offset. */
-#define	R_X86_64_PLT32	4	/* PC-relative 32 bit PLT offset. */
-#define	R_X86_64_COPY	5	/* Copy data from shared object. */
-#define	R_X86_64_GLOB_DAT 6	/* Set GOT entry to data address. */
-#define	R_X86_64_JMP_SLOT 7	/* Set GOT entry to code address. */
-#define	R_X86_64_RELATIVE 8	/* Add load address of shared object. */
-#define	R_X86_64_GOTPCREL 9	/* Add 32 bit signed pcrel offset to GOT. */
-#define	R_X86_64_32	10	/* Add 32 bit zero extended symbol value */
-#define	R_X86_64_32S	11	/* Add 32 bit sign extended symbol value */
-#define	R_X86_64_16	12	/* Add 16 bit zero extended symbol value */
-#define	R_X86_64_PC16	13	/* Add 16 bit signed extended pc relative symbol value */
-#define	R_X86_64_8	14	/* Add 8 bit zero extended symbol value */
-#define	R_X86_64_PC8	15	/* Add 8 bit signed extended pc relative symbol value */
-#define	R_X86_64_DTPMOD64 16	/* ID of module containing symbol */
-#define	R_X86_64_DTPOFF64 17	/* Offset in TLS block */
-#define	R_X86_64_TPOFF64 18	/* Offset in static TLS block */
-#define	R_X86_64_TLSGD	19	/* PC relative offset to GD GOT entry */
-#define	R_X86_64_TLSLD	20	/* PC relative offset to LD GOT entry */
-#define	R_X86_64_DTPOFF32 21	/* Offset in TLS block */
-#define	R_X86_64_GOTTPOFF 22	/* PC relative offset to IE GOT entry */
-#define	R_X86_64_TPOFF32 23	/* Offset in static TLS block */
-
-#define	R_X86_64_COUNT	24	/* Count of defined relocation types. */
+#define R_X86_64_NONE   0       /* No relocation. */
+#define R_X86_64_64     1       /* Add 64 bit symbol value. */
+#define R_X86_64_PC32   2       /* PC-relative 32 bit signed sym value. */
+#define R_X86_64_GOT32  3       /* PC-relative 32 bit GOT offset. */
+#define R_X86_64_PLT32  4       /* PC-relative 32 bit PLT offset. */
+#define R_X86_64_COPY   5       /* Copy data from shared object. */
+#define R_X86_64_GLOB_DAT 6     /* Set GOT entry to data address. */
+#define R_X86_64_JMP_SLOT 7     /* Set GOT entry to code address. */
+#define R_X86_64_RELATIVE 8     /* Add load address of shared object. */
+#define R_X86_64_GOTPCREL 9     /* Add 32 bit signed pcrel offset to GOT. */
+#define R_X86_64_32     10      /* Add 32 bit zero extended symbol value */
+#define R_X86_64_32S    11      /* Add 32 bit sign extended symbol value */
+#define R_X86_64_16     12      /* Add 16 bit zero extended symbol value */
+#define R_X86_64_PC16   13      /* Add 16 bit signed extended pc relative symbol value */
+#define R_X86_64_8      14      /* Add 8 bit zero extended symbol value */
+#define R_X86_64_PC8    15      /* Add 8 bit signed extended pc relative symbol value */
+#define R_X86_64_DTPMOD64 16    /* ID of module containing symbol */
+#define R_X86_64_DTPOFF64 17    /* Offset in TLS block */
+#define R_X86_64_TPOFF64 18     /* Offset in static TLS block */
+#define R_X86_64_TLSGD  19      /* PC relative offset to GD GOT entry */
+#define R_X86_64_TLSLD  20      /* PC relative offset to LD GOT entry */
+#define R_X86_64_DTPOFF32 21    /* Offset in TLS block */
+#define R_X86_64_GOTTPOFF 22    /* PC relative offset to IE GOT entry */
+#define R_X86_64_TPOFF32 23     /* Offset in static TLS block */
+
+#define R_X86_64_COUNT  24      /* Count of defined relocation types. */
 
 #endif
 
diff --git a/include/iprt/formats/elf-common.h b/include/iprt/formats/elf-common.h
index c4cb0ed..685ce4b 100644
--- a/include/iprt/formats/elf-common.h
+++ b/include/iprt/formats/elf-common.h
@@ -43,260 +43,260 @@
  */
 
 typedef struct {
-	uint32_t	n_namesz;	/* Length of name. */
-	uint32_t	n_descsz;	/* Length of descriptor. */
-	uint32_t	n_type;		/* Type of this note. */
+        uint32_t        n_namesz;       /* Length of name. */
+        uint32_t        n_descsz;       /* Length of descriptor. */
+        uint32_t        n_type;         /* Type of this note. */
 } Elf_Note;
 
 /* Indexes into the e_ident array.  Keep synced with
    http://www.sco.com/developer/gabi/ch4.eheader.html */
-#define EI_MAG0		0	/* Magic number, byte 0. */
-#define EI_MAG1		1	/* Magic number, byte 1. */
-#define EI_MAG2		2	/* Magic number, byte 2. */
-#define EI_MAG3		3	/* Magic number, byte 3. */
-#define EI_CLASS	4	/* Class of machine. */
-#define EI_DATA		5	/* Data format. */
-#define EI_VERSION	6	/* ELF format version. */
-#define EI_OSABI	7	/* Operating system / ABI identification */
-#define EI_ABIVERSION	8	/* ABI version */
-#define OLD_EI_BRAND	8	/* Start of architecture identification. */
-#define EI_PAD		9	/* Start of padding (per SVR4 ABI). */
-#define EI_NIDENT	16	/* Size of e_ident array. */
+#define EI_MAG0         0       /* Magic number, byte 0. */
+#define EI_MAG1         1       /* Magic number, byte 1. */
+#define EI_MAG2         2       /* Magic number, byte 2. */
+#define EI_MAG3         3       /* Magic number, byte 3. */
+#define EI_CLASS        4       /* Class of machine. */
+#define EI_DATA         5       /* Data format. */
+#define EI_VERSION      6       /* ELF format version. */
+#define EI_OSABI        7       /* Operating system / ABI identification */
+#define EI_ABIVERSION   8       /* ABI version */
+#define OLD_EI_BRAND    8       /* Start of architecture identification. */
+#define EI_PAD          9       /* Start of padding (per SVR4 ABI). */
+#define EI_NIDENT       16      /* Size of e_ident array. */
 
 /* Values for the magic number bytes. */
-#define ELFMAG0		0x7f
-#define ELFMAG1		'E'
-#define ELFMAG2		'L'
-#define ELFMAG3		'F'
-#define ELFMAG		"\177ELF"	/* magic string */
-#define SELFMAG		4		/* magic string size */
+#define ELFMAG0         0x7f
+#define ELFMAG1         'E'
+#define ELFMAG2         'L'
+#define ELFMAG3         'F'
+#define ELFMAG          "\177ELF"       /* magic string */
+#define SELFMAG         4               /* magic string size */
 
 /* Values for e_ident[EI_VERSION] and e_version. */
-#define EV_NONE		0
-#define EV_CURRENT	1
+#define EV_NONE         0
+#define EV_CURRENT      1
 
 /* Values for e_ident[EI_CLASS]. */
-#define ELFCLASSNONE	0	/* Unknown class. */
-#define ELFCLASS32	1	/* 32-bit architecture. */
-#define ELFCLASS64	2	/* 64-bit architecture. */
+#define ELFCLASSNONE    0       /* Unknown class. */
+#define ELFCLASS32      1       /* 32-bit architecture. */
+#define ELFCLASS64      2       /* 64-bit architecture. */
 
 /* Values for e_ident[EI_DATA]. */
-#define ELFDATANONE	0	/* Unknown data format. */
-#define ELFDATA2LSB	1	/* 2's complement little-endian. */
-#define ELFDATA2MSB	2	/* 2's complement big-endian. */
+#define ELFDATANONE     0       /* Unknown data format. */
+#define ELFDATA2LSB     1       /* 2's complement little-endian. */
+#define ELFDATA2MSB     2       /* 2's complement big-endian. */
 
 /* Values for e_ident[EI_OSABI]. */
-#define ELFOSABI_SYSV		0	/* UNIX System V ABI */
-#define ELFOSABI_NONE		ELFOSABI_SYSV	/* symbol used in old spec */
-#define ELFOSABI_HPUX		1	/* HP-UX operating system */
-#define ELFOSABI_NETBSD		2	/* NetBSD */
-#define ELFOSABI_LINUX		3	/* GNU/Linux */
-#define ELFOSABI_HURD		4	/* GNU/Hurd */
-#define ELFOSABI_86OPEN		5	/* 86Open common IA32 ABI */
-#define ELFOSABI_SOLARIS	6	/* Solaris */
-#define ELFOSABI_MONTEREY	7	/* Monterey */
-#define ELFOSABI_IRIX		8	/* IRIX */
-#define ELFOSABI_FREEBSD	9	/* FreeBSD */
-#define ELFOSABI_TRU64		10	/* TRU64 UNIX */
-#define ELFOSABI_MODESTO	11	/* Novell Modesto */
-#define ELFOSABI_OPENBSD	12	/* OpenBSD */
-#define ELFOSABI_ARM		97	/* ARM */
-#define ELFOSABI_STANDALONE	255	/* Standalone (embedded) application */
+#define ELFOSABI_SYSV           0       /* UNIX System V ABI */
+#define ELFOSABI_NONE           ELFOSABI_SYSV   /* symbol used in old spec */
+#define ELFOSABI_HPUX           1       /* HP-UX operating system */
+#define ELFOSABI_NETBSD         2       /* NetBSD */
+#define ELFOSABI_LINUX          3       /* GNU/Linux */
+#define ELFOSABI_HURD           4       /* GNU/Hurd */
+#define ELFOSABI_86OPEN         5       /* 86Open common IA32 ABI */
+#define ELFOSABI_SOLARIS        6       /* Solaris */
+#define ELFOSABI_MONTEREY       7       /* Monterey */
+#define ELFOSABI_IRIX           8       /* IRIX */
+#define ELFOSABI_FREEBSD        9       /* FreeBSD */
+#define ELFOSABI_TRU64          10      /* TRU64 UNIX */
+#define ELFOSABI_MODESTO        11      /* Novell Modesto */
+#define ELFOSABI_OPENBSD        12      /* OpenBSD */
+#define ELFOSABI_ARM            97      /* ARM */
+#define ELFOSABI_STANDALONE     255     /* Standalone (embedded) application */
 
 /* e_ident */
-#define IS_ELF(ehdr)	((ehdr).e_ident[EI_MAG0] == ELFMAG0 && \
-			 (ehdr).e_ident[EI_MAG1] == ELFMAG1 && \
-			 (ehdr).e_ident[EI_MAG2] == ELFMAG2 && \
-			 (ehdr).e_ident[EI_MAG3] == ELFMAG3)
+#define IS_ELF(ehdr)    ((ehdr).e_ident[EI_MAG0] == ELFMAG0 && \
+                         (ehdr).e_ident[EI_MAG1] == ELFMAG1 && \
+                         (ehdr).e_ident[EI_MAG2] == ELFMAG2 && \
+                         (ehdr).e_ident[EI_MAG3] == ELFMAG3)
 
 /* Values for e_type. */
-#define ET_NONE		0	/* Unknown type. */
-#define ET_REL		1	/* Relocatable. */
-#define ET_EXEC		2	/* Executable. */
-#define ET_DYN		3	/* Shared object. */
-#define ET_CORE		4	/* Core file. */
+#define ET_NONE         0       /* Unknown type. */
+#define ET_REL          1       /* Relocatable. */
+#define ET_EXEC         2       /* Executable. */
+#define ET_DYN          3       /* Shared object. */
+#define ET_CORE         4       /* Core file. */
 
 /* Values for e_machine. */
-#define EM_NONE		0	/* Unknown machine. */
-#define EM_M32		1	/* AT&T WE32100. */
-#define EM_SPARC	2	/* Sun SPARC. */
-#define EM_386		3	/* Intel i386. */
-#define EM_68K		4	/* Motorola 68000. */
-#define EM_88K		5	/* Motorola 88000. */
-#define EM_486		6	/* Intel i486. */
-#define EM_860		7	/* Intel i860. */
-#define EM_MIPS		8	/* MIPS R3000 Big-Endian only */
+#define EM_NONE         0       /* Unknown machine. */
+#define EM_M32          1       /* AT&T WE32100. */
+#define EM_SPARC        2       /* Sun SPARC. */
+#define EM_386          3       /* Intel i386. */
+#define EM_68K          4       /* Motorola 68000. */
+#define EM_88K          5       /* Motorola 88000. */
+#define EM_486          6       /* Intel i486. */
+#define EM_860          7       /* Intel i860. */
+#define EM_MIPS         8       /* MIPS R3000 Big-Endian only */
 
 /* Extensions.  This list is not complete. */
-#define EM_S370		9	/* IBM System/370 */
-#define EM_MIPS_RS4_BE	10	/* MIPS R4000 Big-Endian */ /* Depreciated */
-#define EM_PARISC	15	/* HPPA */
-#define EM_SPARC32PLUS	18	/* SPARC v8plus */
-#define EM_PPC		20	/* PowerPC 32-bit */
-#define EM_PPC64	21	/* PowerPC 64-bit */
-#define EM_ARM		40	/* ARM */
-#define EM_SPARCV9	43	/* SPARC v9 64-bit */
-#define EM_IA_64	50	/* Intel IA-64 Processor */
-#define EM_X86_64	62	/* Advanced Micro Devices x86-64 */
+#define EM_S370         9       /* IBM System/370 */
+#define EM_MIPS_RS4_BE  10      /* MIPS R4000 Big-Endian */ /* Depreciated */
+#define EM_PARISC       15      /* HPPA */
+#define EM_SPARC32PLUS  18      /* SPARC v8plus */
+#define EM_PPC          20      /* PowerPC 32-bit */
+#define EM_PPC64        21      /* PowerPC 64-bit */
+#define EM_ARM          40      /* ARM */
+#define EM_SPARCV9      43      /* SPARC v9 64-bit */
+#define EM_IA_64        50      /* Intel IA-64 Processor */
+#define EM_X86_64       62      /* Advanced Micro Devices x86-64 */
 #define EM_AMD64    EM_X86_64   /* SunOS compatibility (added by Ramshankar) */
-#define EM_ALPHA	0x9026	/* Alpha (written in the absence of an ABI */
+#define EM_ALPHA        0x9026  /* Alpha (written in the absence of an ABI */
 
 /* Special section indexes. */
-#define SHN_UNDEF	     0		/* Undefined, missing, irrelevant. */
-#define SHN_LORESERVE	0xff00		/* First of reserved range. */
-#define SHN_LOPROC	0xff00		/* First processor-specific. */
-#define SHN_HIPROC	0xff1f		/* Last processor-specific. */
-#define SHN_ABS		0xfff1		/* Absolute values. */
-#define SHN_COMMON	0xfff2		/* Common data. */
-#define SHN_HIRESERVE	0xffff		/* Last of reserved range. */
+#define SHN_UNDEF            0          /* Undefined, missing, irrelevant. */
+#define SHN_LORESERVE   0xff00          /* First of reserved range. */
+#define SHN_LOPROC      0xff00          /* First processor-specific. */
+#define SHN_HIPROC      0xff1f          /* Last processor-specific. */
+#define SHN_ABS         0xfff1          /* Absolute values. */
+#define SHN_COMMON      0xfff2          /* Common data. */
+#define SHN_HIRESERVE   0xffff          /* Last of reserved range. */
 
 /* sh_type */
-#define SHT_NULL	0		/* inactive */
-#define SHT_PROGBITS	1		/* program defined information */
-#define SHT_SYMTAB	2		/* symbol table section */
-#define SHT_STRTAB	3		/* string table section */
-#define SHT_RELA	4		/* relocation section with addends */
-#define SHT_HASH	5		/* symbol hash table section */
-#define SHT_DYNAMIC	6		/* dynamic section */
-#define SHT_NOTE	7		/* note section */
-#define SHT_NOBITS	8		/* no space section */
-#define SHT_REL		9		/* relocation section - no addends */
-#define SHT_SHLIB	10		/* reserved - purpose unknown */
-#define SHT_DYNSYM	11		/* dynamic symbol table section */
-#define SHT_NUM		12		/* number of section types */
-#define SHT_LOOS	0x60000000	/* First of OS specific semantics */
-#define SHT_HIOS	0x6fffffff	/* Last of OS specific semantics */
-#define SHT_LOPROC	0x70000000	/* reserved range for processor */
-#define SHT_HIPROC	0x7fffffff	/* specific section header types */
-#define SHT_LOUSER	0x80000000	/* reserved range for application */
-#define SHT_HIUSER	0xffffffff	/* specific indexes */
+#define SHT_NULL        0               /* inactive */
+#define SHT_PROGBITS    1               /* program defined information */
+#define SHT_SYMTAB      2               /* symbol table section */
+#define SHT_STRTAB      3               /* string table section */
+#define SHT_RELA        4               /* relocation section with addends */
+#define SHT_HASH        5               /* symbol hash table section */
+#define SHT_DYNAMIC     6               /* dynamic section */
+#define SHT_NOTE        7               /* note section */
+#define SHT_NOBITS      8               /* no space section */
+#define SHT_REL         9               /* relocation section - no addends */
+#define SHT_SHLIB       10              /* reserved - purpose unknown */
+#define SHT_DYNSYM      11              /* dynamic symbol table section */
+#define SHT_NUM         12              /* number of section types */
+#define SHT_LOOS        0x60000000      /* First of OS specific semantics */
+#define SHT_HIOS        0x6fffffff      /* Last of OS specific semantics */
+#define SHT_LOPROC      0x70000000      /* reserved range for processor */
+#define SHT_HIPROC      0x7fffffff      /* specific section header types */
+#define SHT_LOUSER      0x80000000      /* reserved range for application */
+#define SHT_HIUSER      0xffffffff      /* specific indexes */
 
 /* Flags for sh_flags. */
-#define SHF_WRITE	0x1		/* Section contains writable data. */
-#define SHF_ALLOC	0x2		/* Section occupies memory. */
-#define SHF_EXECINSTR	0x4		/* Section contains instructions. */
-#define SHF_TLS		0x400		/* Section contains TLS data. */
-#define SHF_MASKPROC	0xf0000000	/* Reserved for processor-specific. */
+#define SHF_WRITE       0x1             /* Section contains writable data. */
+#define SHF_ALLOC       0x2             /* Section occupies memory. */
+#define SHF_EXECINSTR   0x4             /* Section contains instructions. */
+#define SHF_TLS         0x400           /* Section contains TLS data. */
+#define SHF_MASKPROC    0xf0000000      /* Reserved for processor-specific. */
 
 /* Values for p_type. */
-#define PT_NULL		0	/* Unused entry. */
-#define PT_LOAD		1	/* Loadable segment. */
-#define PT_DYNAMIC	2	/* Dynamic linking information segment. */
-#define PT_INTERP	3	/* Pathname of interpreter. */
-#define PT_NOTE		4	/* Auxiliary information. */
-#define PT_SHLIB	5	/* Reserved (not used). */
-#define PT_PHDR		6	/* Location of program header itself. */
-#define	PT_TLS		7	/* Thread local storage segment */
-
-#define PT_COUNT	8	/* Number of defined p_type values. */
-
-#define	PT_LOOS		0x60000000	/* OS-specific */
-#define	PT_HIOS		0x6fffffff	/* OS-specific */
-#define PT_LOPROC	0x70000000	/* First processor-specific type. */
-#define PT_HIPROC	0x7fffffff	/* Last processor-specific type. */
+#define PT_NULL         0       /* Unused entry. */
+#define PT_LOAD         1       /* Loadable segment. */
+#define PT_DYNAMIC      2       /* Dynamic linking information segment. */
+#define PT_INTERP       3       /* Pathname of interpreter. */
+#define PT_NOTE         4       /* Auxiliary information. */
+#define PT_SHLIB        5       /* Reserved (not used). */
+#define PT_PHDR         6       /* Location of program header itself. */
+#define PT_TLS          7       /* Thread local storage segment */
+
+#define PT_COUNT        8       /* Number of defined p_type values. */
+
+#define PT_LOOS         0x60000000      /* OS-specific */
+#define PT_HIOS         0x6fffffff      /* OS-specific */
+#define PT_LOPROC       0x70000000      /* First processor-specific type. */
+#define PT_HIPROC       0x7fffffff      /* Last processor-specific type. */
 
 /* Values for p_flags. */
-#define PF_X		0x1	/* Executable. */
-#define PF_W		0x2	/* Writable. */
-#define PF_R		0x4	/* Readable. */
+#define PF_X            0x1     /* Executable. */
+#define PF_W            0x2     /* Writable. */
+#define PF_R            0x4     /* Readable. */
 
 /* Values for d_tag. */
-#define DT_NULL		0	/* Terminating entry. */
-#define DT_NEEDED	1	/* String table offset of a needed shared
-				   library. */
-#define DT_PLTRELSZ	2	/* Total size in bytes of PLT relocations. */
-#define DT_PLTGOT	3	/* Processor-dependent address. */
-#define DT_HASH		4	/* Address of symbol hash table. */
-#define DT_STRTAB	5	/* Address of string table. */
-#define DT_SYMTAB	6	/* Address of symbol table. */
-#define DT_RELA		7	/* Address of ElfNN_Rela relocations. */
-#define DT_RELASZ	8	/* Total size of ElfNN_Rela relocations. */
-#define DT_RELAENT	9	/* Size of each ElfNN_Rela relocation entry. */
-#define DT_STRSZ	10	/* Size of string table. */
-#define DT_SYMENT	11	/* Size of each symbol table entry. */
-#define DT_INIT		12	/* Address of initialization function. */
-#define DT_FINI		13	/* Address of finalization function. */
-#define DT_SONAME	14	/* String table offset of shared object
-				   name. */
-#define DT_RPATH	15	/* String table offset of library path. [sup] */
-#define DT_SYMBOLIC	16	/* Indicates "symbolic" linking. [sup] */
-#define DT_REL		17	/* Address of ElfNN_Rel relocations. */
-#define DT_RELSZ	18	/* Total size of ElfNN_Rel relocations. */
-#define DT_RELENT	19	/* Size of each ElfNN_Rel relocation. */
-#define DT_PLTREL	20	/* Type of relocation used for PLT. */
-#define DT_DEBUG	21	/* Reserved (not used). */
-#define DT_TEXTREL	22	/* Indicates there may be relocations in
-				   non-writable segments. [sup] */
-#define DT_JMPREL	23	/* Address of PLT relocations. */
-#define	DT_BIND_NOW	24	/* [sup] */
-#define	DT_INIT_ARRAY	25	/* Address of the array of pointers to
-				   initialization functions */
-#define	DT_FINI_ARRAY	26	/* Address of the array of pointers to
-				   termination functions */
-#define	DT_INIT_ARRAYSZ	27	/* Size in bytes of the array of
-				   initialization functions. */
-#define	DT_FINI_ARRAYSZ	28	/* Size in bytes of the array of
-				   terminationfunctions. */
-#define	DT_RUNPATH	29	/* String table offset of a null-terminated
-				   library search path string. */
-#define	DT_FLAGS	30	/* Object specific flag values. */
-#define	DT_ENCODING	32	/* Values greater than or equal to DT_ENCODING
-				   and less than DT_LOOS follow the rules for
-				   the interpretation of the d_un union
-				   as follows: even == 'd_ptr', even == 'd_val'
-				   or none */
-#define	DT_PREINIT_ARRAY 32	/* Address of the array of pointers to
-				   pre-initialization functions. */
-#define	DT_PREINIT_ARRAYSZ 33	/* Size in bytes of the array of
-				   pre-initialization functions. */
-
-#define	DT_COUNT	33	/* Number of defined d_tag values. */
-
-#define	DT_LOOS		0x6000000d	/* First OS-specific */
-#define	DT_HIOS		0x6fff0000	/* Last OS-specific */
-#define	DT_LOPROC	0x70000000	/* First processor-specific type. */
-#define	DT_HIPROC	0x7fffffff	/* Last processor-specific type. */
+#define DT_NULL         0       /* Terminating entry. */
+#define DT_NEEDED       1       /* String table offset of a needed shared
+                                   library. */
+#define DT_PLTRELSZ     2       /* Total size in bytes of PLT relocations. */
+#define DT_PLTGOT       3       /* Processor-dependent address. */
+#define DT_HASH         4       /* Address of symbol hash table. */
+#define DT_STRTAB       5       /* Address of string table. */
+#define DT_SYMTAB       6       /* Address of symbol table. */
+#define DT_RELA         7       /* Address of ElfNN_Rela relocations. */
+#define DT_RELASZ       8       /* Total size of ElfNN_Rela relocations. */
+#define DT_RELAENT      9       /* Size of each ElfNN_Rela relocation entry. */
+#define DT_STRSZ        10      /* Size of string table. */
+#define DT_SYMENT       11      /* Size of each symbol table entry. */
+#define DT_INIT         12      /* Address of initialization function. */
+#define DT_FINI         13      /* Address of finalization function. */
+#define DT_SONAME       14      /* String table offset of shared object
+                                   name. */
+#define DT_RPATH        15      /* String table offset of library path. [sup] */
+#define DT_SYMBOLIC     16      /* Indicates "symbolic" linking. [sup] */
+#define DT_REL          17      /* Address of ElfNN_Rel relocations. */
+#define DT_RELSZ        18      /* Total size of ElfNN_Rel relocations. */
+#define DT_RELENT       19      /* Size of each ElfNN_Rel relocation. */
+#define DT_PLTREL       20      /* Type of relocation used for PLT. */
+#define DT_DEBUG        21      /* Reserved (not used). */
+#define DT_TEXTREL      22      /* Indicates there may be relocations in
+                                   non-writable segments. [sup] */
+#define DT_JMPREL       23      /* Address of PLT relocations. */
+#define DT_BIND_NOW     24      /* [sup] */
+#define DT_INIT_ARRAY   25      /* Address of the array of pointers to
+                                   initialization functions */
+#define DT_FINI_ARRAY   26      /* Address of the array of pointers to
+                                   termination functions */
+#define DT_INIT_ARRAYSZ 27      /* Size in bytes of the array of
+                                   initialization functions. */
+#define DT_FINI_ARRAYSZ 28      /* Size in bytes of the array of
+                                   terminationfunctions. */
+#define DT_RUNPATH      29      /* String table offset of a null-terminated
+                                   library search path string. */
+#define DT_FLAGS        30      /* Object specific flag values. */
+#define DT_ENCODING     32      /* Values greater than or equal to DT_ENCODING
+                                   and less than DT_LOOS follow the rules for
+                                   the interpretation of the d_un union
+                                   as follows: even == 'd_ptr', even == 'd_val'
+                                   or none */
+#define DT_PREINIT_ARRAY 32     /* Address of the array of pointers to
+                                   pre-initialization functions. */
+#define DT_PREINIT_ARRAYSZ 33   /* Size in bytes of the array of
+                                   pre-initialization functions. */
+
+#define DT_COUNT        33      /* Number of defined d_tag values. */
+
+#define DT_LOOS         0x6000000d      /* First OS-specific */
+#define DT_HIOS         0x6fff0000      /* Last OS-specific */
+#define DT_LOPROC       0x70000000      /* First processor-specific type. */
+#define DT_HIPROC       0x7fffffff      /* Last processor-specific type. */
 
 /* Values for DT_FLAGS */
-#define	DF_ORIGIN	0x0001	/* Indicates that the object being loaded may
-				   make reference to the $ORIGIN substitution
-				   string */
-#define	DF_SYMBOLIC	0x0002	/* Indicates "symbolic" linking. */
-#define	DF_TEXTREL	0x0004	/* Indicates there may be relocations in
-				   non-writable segments. */
-#define	DF_BIND_NOW	0x0008	/* Indicates that the dynamic linker should
-				   process all relocations for the object
-				   containing this entry before transferring
-				   control to the program. */
-#define	DF_STATIC_TLS	0x0010	/* Indicates that the shared object or
-				   executable contains code using a static
-				   thread-local storage scheme. */
+#define DF_ORIGIN       0x0001  /* Indicates that the object being loaded may
+                                   make reference to the $ORIGIN substitution
+                                   string */
+#define DF_SYMBOLIC     0x0002  /* Indicates "symbolic" linking. */
+#define DF_TEXTREL      0x0004  /* Indicates there may be relocations in
+                                   non-writable segments. */
+#define DF_BIND_NOW     0x0008  /* Indicates that the dynamic linker should
+                                   process all relocations for the object
+                                   containing this entry before transferring
+                                   control to the program. */
+#define DF_STATIC_TLS   0x0010  /* Indicates that the shared object or
+                                   executable contains code using a static
+                                   thread-local storage scheme. */
 
 /* Values for n_type.  Used in core files. */
 #if defined(RT_OS_FREEBSD)
-# define NT_PRSTATUS	1	/* Process status. */
-# define NT_FPREGSET	2	/* Floating point registers. */
-# define NT_PRPSINFO	3	/* Process state info. */
+# define NT_PRSTATUS    1       /* Process status. */
+# define NT_FPREGSET    2       /* Floating point registers. */
+# define NT_PRPSINFO    3       /* Process state info. */
 #elif defined(RT_OS_SOLARIS)
-# define NT_PRSTATUS	1	/* prstatus_t <sys/old_procfs.h>	*/
-# define NT_PRFPREG	2	/* prfpregset_t	<sys/old_procfs.h>	*/
-# define NT_PRPSINFO	3	/* prpsinfo_t <sys/old_procfs.h>	*/
-# define NT_PRXREG	4	/* prxregset_t <sys/procfs.h> */
-# define NT_PLATFORM	5	/* string from sysinfo(SI_PLATFORM)	*/
-# define NT_AUXV	6	/* auxv_t array	<sys/auxv.h> */
-# define NT_LDT		9	/* ssd array <sys/sysi86.h> IA32 only */
-# define NT_PSTATUS	10	/* pstatus_t <sys/procfs.h> */
-# define NT_PSINFO	13	/* psinfo_t	<sys/procfs.h> */
-# define NT_PRCRED	14	/* prcred_t	<sys/procfs.h> */
-# define NT_UTSNAME	15	/* struct utsname <sys/utsname.h> */
-# define NT_LWPSTATUS	16	/* lwpstatus_t	<sys/procfs.h> */
-# define NT_LWPSINFO	17	/* lwpsinfo_t <sys/procfs.h> */
-# define NT_PRPRIV	18	/* prpriv_t	<sys/procfs.h>	*/
-# define NT_PRPRIVINFO	19	/* priv_impl_info_t <sys/priv.h> */
-# define NT_CONTENT	20	/* core_content_t <sys/corectl.h> */
-# define NT_ZONENAME	21	/* string from getzonenamebyid(3C) */
-# define PF_SUNW_FAILURE	0x00100000	/* mapping absent due to failure */
-# define PN_XNUM		0xffff	/* extended program header index */
+# define NT_PRSTATUS    1       /* prstatus_t <sys/old_procfs.h>        */
+# define NT_PRFPREG     2       /* prfpregset_t <sys/old_procfs.h>      */
+# define NT_PRPSINFO    3       /* prpsinfo_t <sys/old_procfs.h>        */
+# define NT_PRXREG      4       /* prxregset_t <sys/procfs.h> */
+# define NT_PLATFORM    5       /* string from sysinfo(SI_PLATFORM)     */
+# define NT_AUXV        6       /* auxv_t array <sys/auxv.h> */
+# define NT_LDT         9       /* ssd array <sys/sysi86.h> IA32 only */
+# define NT_PSTATUS     10      /* pstatus_t <sys/procfs.h> */
+# define NT_PSINFO      13      /* psinfo_t     <sys/procfs.h> */
+# define NT_PRCRED      14      /* prcred_t     <sys/procfs.h> */
+# define NT_UTSNAME     15      /* struct utsname <sys/utsname.h> */
+# define NT_LWPSTATUS   16      /* lwpstatus_t  <sys/procfs.h> */
+# define NT_LWPSINFO    17      /* lwpsinfo_t <sys/procfs.h> */
+# define NT_PRPRIV      18      /* prpriv_t     <sys/procfs.h>  */
+# define NT_PRPRIVINFO  19      /* priv_impl_info_t <sys/priv.h> */
+# define NT_CONTENT     20      /* core_content_t <sys/corectl.h> */
+# define NT_ZONENAME    21      /* string from getzonenamebyid(3C) */
+# define PF_SUNW_FAILURE        0x00100000      /* mapping absent due to failure */
+# define PN_XNUM                0xffff  /* extended program header index */
 #elif defined(RT_OS_LINUX)
 # define NT_PRSTATUS     1   /* Process status. */
 # define NT_PRFPREG      2   /* Floating point registers. */
@@ -313,25 +313,25 @@ typedef struct {
 #endif
 
 /* Symbol Binding - ELFNN_ST_BIND - st_info */
-#define STB_LOCAL	0	/* Local symbol */
-#define STB_GLOBAL	1	/* Global symbol */
-#define STB_WEAK	2	/* like global - lower precedence */
-#define STB_LOPROC	13	/* reserved range for processor */
-#define STB_HIPROC	15	/*  specific symbol bindings */
+#define STB_LOCAL       0       /* Local symbol */
+#define STB_GLOBAL      1       /* Global symbol */
+#define STB_WEAK        2       /* like global - lower precedence */
+#define STB_LOPROC      13      /* reserved range for processor */
+#define STB_HIPROC      15      /*  specific symbol bindings */
 
 /* Symbol type - ELFNN_ST_TYPE - st_info */
-#define STT_NOTYPE	0	/* Unspecified type. */
-#define STT_OBJECT	1	/* Data object. */
-#define STT_FUNC	2	/* Function. */
-#define STT_SECTION	3	/* Section. */
-#define STT_FILE	4	/* Source file. */
-#define STT_TLS		6	/* TLS object. */
-#define STT_NUM		7	/* Number of generic symbol types. */
-#define STT_LOPROC	13	/* reserved range for processor */
-#define STT_HIPROC	15	/*  specific symbol types */
+#define STT_NOTYPE      0       /* Unspecified type. */
+#define STT_OBJECT      1       /* Data object. */
+#define STT_FUNC        2       /* Function. */
+#define STT_SECTION     3       /* Section. */
+#define STT_FILE        4       /* Source file. */
+#define STT_TLS         6       /* TLS object. */
+#define STT_NUM         7       /* Number of generic symbol types. */
+#define STT_LOPROC      13      /* reserved range for processor */
+#define STT_HIPROC      15      /*  specific symbol types */
 
 /* Special symbol table indexes. */
-#define STN_UNDEF	0	/* Undefined symbol index. */
+#define STN_UNDEF       0       /* Undefined symbol index. */
 
 #endif
 
diff --git a/include/iprt/formats/elf-i386.h b/include/iprt/formats/elf-i386.h
index d915952..558dd35 100644
--- a/include/iprt/formats/elf-i386.h
+++ b/include/iprt/formats/elf-i386.h
@@ -36,33 +36,33 @@
  * but POSIX lays claim to all symbols ending with "_t".
  */
 
-typedef struct {	/* Auxiliary vector entry on initial stack */
-	int	a_type;			/* Entry type. */
-	union {
-		long	a_val;		/* Integer value. */
-		void	*a_ptr;		/* Address. */
-		void	(*a_fcn)(void);	/* Function pointer (not used). */
-	} a_un;
+typedef struct {        /* Auxiliary vector entry on initial stack */
+        int     a_type;                 /* Entry type. */
+        union {
+                long    a_val;          /* Integer value. */
+                void    *a_ptr;         /* Address. */
+                void    (*a_fcn)(void); /* Function pointer (not used). */
+        } a_un;
 } Elf32_Auxinfo;
 
 #if __ELF_WORD_SIZE == 64
 /* Fake for amd64 loader support */
 typedef struct {
-	int fake;
+        int fake;
 } Elf64_Auxinfo;
 #endif
 
 /* Values for a_type. */
-#define	AT_NULL		0	/* Terminates the vector. */
-#define	AT_IGNORE	1	/* Ignored entry. */
-#define	AT_EXECFD	2	/* File descriptor of program to load. */
-#define	AT_PHDR		3	/* Program header of program already loaded. */
-#define	AT_PHENT	4	/* Size of each program header entry. */
-#define	AT_PHNUM	5	/* Number of program header entries. */
-#define	AT_PAGESZ	6	/* Page size in bytes. */
-#define	AT_BASE		7	/* Interpreter's base address. */
-#define	AT_FLAGS	8	/* Flags (unused for i386). */
-#define	AT_ENTRY	9	/* Where interpreter should transfer control. */
+#define AT_NULL         0       /* Terminates the vector. */
+#define AT_IGNORE       1       /* Ignored entry. */
+#define AT_EXECFD       2       /* File descriptor of program to load. */
+#define AT_PHDR         3       /* Program header of program already loaded. */
+#define AT_PHENT        4       /* Size of each program header entry. */
+#define AT_PHNUM        5       /* Number of program header entries. */
+#define AT_PAGESZ       6       /* Page size in bytes. */
+#define AT_BASE         7       /* Interpreter's base address. */
+#define AT_FLAGS        8       /* Flags (unused for i386). */
+#define AT_ENTRY        9       /* Where interpreter should transfer control. */
 
 /*
  * The following non-standard values are used for passing information
@@ -72,19 +72,19 @@ typedef struct {
  * Unfortunately, these overlap the Linux non-standard values, so they
  * must not be used in the same context.
  */
-#define	AT_BRK		10	/* Starting point for sbrk and brk. */
-#define	AT_DEBUG	11	/* Debugging level. */
+#define AT_BRK          10      /* Starting point for sbrk and brk. */
+#define AT_DEBUG        11      /* Debugging level. */
 
 /*
  * The following non-standard values are used in Linux ELF binaries.
  */
-#define	AT_NOTELF	10	/* Program is not ELF ?? */
-#define	AT_UID		11	/* Real uid. */
-#define	AT_EUID		12	/* Effective uid. */
-#define	AT_GID		13	/* Real gid. */
-#define	AT_EGID		14	/* Effective gid. */
+#define AT_NOTELF       10      /* Program is not ELF ?? */
+#define AT_UID          11      /* Real uid. */
+#define AT_EUID         12      /* Effective uid. */
+#define AT_GID          13      /* Real gid. */
+#define AT_EGID         14      /* Effective gid. */
 
-#define	AT_COUNT	15	/* Count of defined aux entry types. */
+#define AT_COUNT        15      /* Count of defined aux entry types. */
 
 #endif /* later */
 
@@ -93,39 +93,39 @@ typedef struct {
  * Relocation types.
  */
 
-#define	R_386_NONE	0	/* No relocation. */
-#define	R_386_32	1	/* Add symbol value. */
-#define	R_386_PC32	2	/* Add PC-relative symbol value. */
-#define	R_386_GOT32	3	/* Add PC-relative GOT offset. */
-#define	R_386_PLT32	4	/* Add PC-relative PLT offset. */
-#define	R_386_COPY	5	/* Copy data from shared object. */
-#define	R_386_GLOB_DAT	6	/* Set GOT entry to data address. */
-#define	R_386_JMP_SLOT	7	/* Set GOT entry to code address. */
-#define	R_386_RELATIVE	8	/* Add load address of shared object. */
-#define	R_386_GOTOFF	9	/* Add GOT-relative symbol address. */
-#define	R_386_GOTPC	10	/* Add PC-relative GOT table address. */
-#define	R_386_TLS_TPOFF	14	/* Negative offset in static TLS block */
-#define	R_386_TLS_IE	15	/* Absolute address of GOT for -ve static TLS */
-#define	R_386_TLS_GOTIE	16	/* GOT entry for negative static TLS block */
-#define	R_386_TLS_LE	17	/* Negative offset relative to static TLS */
-#define	R_386_TLS_GD	18	/* 32 bit offset to GOT (index,off) pair */
-#define	R_386_TLS_LDM	19	/* 32 bit offset to GOT (index,zero) pair */
-#define	R_386_TLS_GD_32	24	/* 32 bit offset to GOT (index,off) pair */
-#define	R_386_TLS_GD_PUSH 25	/* pushl instruction for Sun ABI GD sequence */
-#define	R_386_TLS_GD_CALL 26	/* call instruction for Sun ABI GD sequence */
-#define	R_386_TLS_GD_POP 27	/* popl instruction for Sun ABI GD sequence */
-#define	R_386_TLS_LDM_32 28	/* 32 bit offset to GOT (index,zero) pair */
-#define	R_386_TLS_LDM_PUSH 29	/* pushl instruction for Sun ABI LD sequence */
-#define	R_386_TLS_LDM_CALL 30	/* call instruction for Sun ABI LD sequence */
-#define	R_386_TLS_LDM_POP 31	/* popl instruction for Sun ABI LD sequence */
-#define	R_386_TLS_LDO_32 32	/* 32 bit offset from start of TLS block */
-#define	R_386_TLS_IE_32	33	/* 32 bit offset to GOT static TLS offset entry */
-#define	R_386_TLS_LE_32	34	/* 32 bit offset within static TLS block */
-#define	R_386_TLS_DTPMOD32 35	/* GOT entry containing TLS index */
-#define	R_386_TLS_DTPOFF32 36	/* GOT entry containing TLS offset */
-#define	R_386_TLS_TPOFF32 37	/* GOT entry of -ve static TLS offset */
-
-#define	R_386_COUNT	38	/* Count of defined relocation types. */
+#define R_386_NONE      0       /* No relocation. */
+#define R_386_32        1       /* Add symbol value. */
+#define R_386_PC32      2       /* Add PC-relative symbol value. */
+#define R_386_GOT32     3       /* Add PC-relative GOT offset. */
+#define R_386_PLT32     4       /* Add PC-relative PLT offset. */
+#define R_386_COPY      5       /* Copy data from shared object. */
+#define R_386_GLOB_DAT  6       /* Set GOT entry to data address. */
+#define R_386_JMP_SLOT  7       /* Set GOT entry to code address. */
+#define R_386_RELATIVE  8       /* Add load address of shared object. */
+#define R_386_GOTOFF    9       /* Add GOT-relative symbol address. */
+#define R_386_GOTPC     10      /* Add PC-relative GOT table address. */
+#define R_386_TLS_TPOFF 14      /* Negative offset in static TLS block */
+#define R_386_TLS_IE    15      /* Absolute address of GOT for -ve static TLS */
+#define R_386_TLS_GOTIE 16      /* GOT entry for negative static TLS block */
+#define R_386_TLS_LE    17      /* Negative offset relative to static TLS */
+#define R_386_TLS_GD    18      /* 32 bit offset to GOT (index,off) pair */
+#define R_386_TLS_LDM   19      /* 32 bit offset to GOT (index,zero) pair */
+#define R_386_TLS_GD_32 24      /* 32 bit offset to GOT (index,off) pair */
+#define R_386_TLS_GD_PUSH 25    /* pushl instruction for Sun ABI GD sequence */
+#define R_386_TLS_GD_CALL 26    /* call instruction for Sun ABI GD sequence */
+#define R_386_TLS_GD_POP 27     /* popl instruction for Sun ABI GD sequence */
+#define R_386_TLS_LDM_32 28     /* 32 bit offset to GOT (index,zero) pair */
+#define R_386_TLS_LDM_PUSH 29   /* pushl instruction for Sun ABI LD sequence */
+#define R_386_TLS_LDM_CALL 30   /* call instruction for Sun ABI LD sequence */
+#define R_386_TLS_LDM_POP 31    /* popl instruction for Sun ABI LD sequence */
+#define R_386_TLS_LDO_32 32     /* 32 bit offset from start of TLS block */
+#define R_386_TLS_IE_32 33      /* 32 bit offset to GOT static TLS offset entry */
+#define R_386_TLS_LE_32 34      /* 32 bit offset within static TLS block */
+#define R_386_TLS_DTPMOD32 35   /* GOT entry containing TLS index */
+#define R_386_TLS_DTPOFF32 36   /* GOT entry containing TLS offset */
+#define R_386_TLS_TPOFF32 37    /* GOT entry of -ve static TLS offset */
+
+#define R_386_COUNT     38      /* Count of defined relocation types. */
 
 #endif
 
diff --git a/include/iprt/formats/elf.h b/include/iprt/formats/elf.h
index c791e2f..b2a2694 100644
--- a/include/iprt/formats/elf.h
+++ b/include/iprt/formats/elf.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -37,14 +37,14 @@ typedef Elf64_Sword         Elf_Sword;
 typedef Elf64_Word          Elf_Word;
 typedef Elf64_Size          Elf_Size;
 typedef Elf64_Hashelt       Elf_Hashelt;
-typedef	Elf64_Ehdr          Elf_Ehdr;
-typedef	Elf64_Shdr          Elf_Shdr;
-typedef	Elf64_Phdr          Elf_Phdr;
-typedef	Elf64_Nhdr          Elf_Nhdr;
-typedef	Elf64_Dyn           Elf_Dyn;
-typedef	Elf64_Rel           Elf_Rel;
-typedef	Elf64_Rela          Elf_Rela;
-typedef	Elf64_Sym           Elf_Sym;
+typedef Elf64_Ehdr          Elf_Ehdr;
+typedef Elf64_Shdr          Elf_Shdr;
+typedef Elf64_Phdr          Elf_Phdr;
+typedef Elf64_Nhdr          Elf_Nhdr;
+typedef Elf64_Dyn           Elf_Dyn;
+typedef Elf64_Rel           Elf_Rel;
+typedef Elf64_Rela          Elf_Rela;
+typedef Elf64_Sym           Elf_Sym;
 
 #define ELF_R_SYM           ELF64_R_SYM
 #define ELF_R_TYPE          ELF64_R_TYPE
@@ -62,14 +62,14 @@ typedef Elf32_Sword         Elf_Sword;
 typedef Elf32_Word          Elf_Word;
 typedef Elf32_Size          Elf_Size;
 typedef Elf32_Hashelt       Elf_Hashelt;
-typedef	Elf32_Ehdr          Elf_Ehdr;
-typedef	Elf32_Shdr          Elf_Shdr;
-typedef	Elf32_Phdr          Elf_Phdr;
-typedef	Elf32_Nhdr          Elf_Nhdr;
-typedef	Elf32_Dyn           Elf_Dyn;
-typedef	Elf32_Rel           Elf_Rel;
-typedef	Elf32_Rela          Elf_Rela;
-typedef	Elf32_Sym           Elf_Sym;
+typedef Elf32_Ehdr          Elf_Ehdr;
+typedef Elf32_Shdr          Elf_Shdr;
+typedef Elf32_Phdr          Elf_Phdr;
+typedef Elf32_Nhdr          Elf_Nhdr;
+typedef Elf32_Dyn           Elf_Dyn;
+typedef Elf32_Rel           Elf_Rel;
+typedef Elf32_Rela          Elf_Rela;
+typedef Elf32_Sym           Elf_Sym;
 
 #define ELF_R_SYM           ELF32_R_SYM
 #define ELF_R_TYPE          ELF32_R_TYPE
diff --git a/include/iprt/formats/elf32.h b/include/iprt/formats/elf32.h
index 6cecb76..9daf953 100644
--- a/include/iprt/formats/elf32.h
+++ b/include/iprt/formats/elf32.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/formats/elf64.h b/include/iprt/formats/elf64.h
index 405072b..e308f3e 100644
--- a/include/iprt/formats/elf64.h
+++ b/include/iprt/formats/elf64.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/formats/hfs.h b/include/iprt/formats/hfs.h
index 7788877..b0939ed 100644
--- a/include/iprt/formats/hfs.h
+++ b/include/iprt/formats/hfs.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/formats/mach-o.h b/include/iprt/formats/mach-o.h
index 2af083d..ea28d53 100644
--- a/include/iprt/formats/mach-o.h
+++ b/include/iprt/formats/mach-o.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/formats/mz.h b/include/iprt/formats/mz.h
index 8de6e28..a9eeaab 100644
--- a/include/iprt/formats/mz.h
+++ b/include/iprt/formats/mz.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/formats/mz.mac b/include/iprt/formats/mz.mac
index 1006a26..3dd6aef 100644
--- a/include/iprt/formats/mz.mac
+++ b/include/iprt/formats/mz.mac
@@ -3,7 +3,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/formats/pe.mac b/include/iprt/formats/pe.mac
index 1aefea3..a882075 100644
--- a/include/iprt/formats/pe.mac
+++ b/include/iprt/formats/pe.mac
@@ -3,7 +3,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/formats/pecoff.h b/include/iprt/formats/pecoff.h
index da3a5b3..26bb0dc 100644
--- a/include/iprt/formats/pecoff.h
+++ b/include/iprt/formats/pecoff.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/formats/xar.h b/include/iprt/formats/xar.h
index 666cd5f..573cb74 100644
--- a/include/iprt/formats/xar.h
+++ b/include/iprt/formats/xar.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/fs.h b/include/iprt/fs.h
index 8220ce6..b62c564 100644
--- a/include/iprt/fs.h
+++ b/include/iprt/fs.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/getopt.h b/include/iprt/getopt.h
index cb6dcc1..d9c36e9 100644
--- a/include/iprt/getopt.h
+++ b/include/iprt/getopt.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/handle.h b/include/iprt/handle.h
index f11b722..15cf6a9 100644
--- a/include/iprt/handle.h
+++ b/include/iprt/handle.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/handletable.h b/include/iprt/handletable.h
index 7f13a1e..0b6da17 100644
--- a/include/iprt/handletable.h
+++ b/include/iprt/handletable.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/heap.h b/include/iprt/heap.h
index 799c586..eefcc6b 100644
--- a/include/iprt/heap.h
+++ b/include/iprt/heap.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/http.h b/include/iprt/http.h
index 8324061..23aeebe 100644
--- a/include/iprt/http.h
+++ b/include/iprt/http.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/initterm.h b/include/iprt/initterm.h
index f0129d5..18ca2e9 100644
--- a/include/iprt/initterm.h
+++ b/include/iprt/initterm.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/isofs.h b/include/iprt/isofs.h
index 9d89c61..bd96ef3 100644
--- a/include/iprt/isofs.h
+++ b/include/iprt/isofs.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/latin1.h b/include/iprt/latin1.h
index d3ccfdf..6a851f2 100644
--- a/include/iprt/latin1.h
+++ b/include/iprt/latin1.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/ldr.h b/include/iprt/ldr.h
index 0ac03ea..8367f24 100644
--- a/include/iprt/ldr.h
+++ b/include/iprt/ldr.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/ldrlazy.h b/include/iprt/ldrlazy.h
index c20bd44..de955b4 100644
--- a/include/iprt/ldrlazy.h
+++ b/include/iprt/ldrlazy.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/list-off32.h b/include/iprt/list-off32.h
index 3b31a90..42458d9 100644
--- a/include/iprt/list-off32.h
+++ b/include/iprt/list-off32.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/list.h b/include/iprt/list.h
index b3180f6..7f38e10 100644
--- a/include/iprt/list.h
+++ b/include/iprt/list.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/localipc.h b/include/iprt/localipc.h
index f1def83..ca68cb2 100644
--- a/include/iprt/localipc.h
+++ b/include/iprt/localipc.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/lockvalidator.h b/include/iprt/lockvalidator.h
index d2c88cb..c11a9de 100644
--- a/include/iprt/lockvalidator.h
+++ b/include/iprt/lockvalidator.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/log.h b/include/iprt/log.h
index 37ffd1c..f7e4204 100644
--- a/include/iprt/log.h
+++ b/include/iprt/log.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1567,7 +1567,7 @@ RTDECL(void) RTLogPrintfEx(void *pvInstance, unsigned fFlags, unsigned iGroup,
  */
 #define LogRelMax12(a_cMax, a)      LogRelMaxIt(a_cMax, RTLOGGRPFLAGS_LEVEL_12, LOG_GROUP, a)
 
-/** @def LogRelFlow
+/** @def LogRelMaxFlow
  * Logging of execution flow with a max number of log entries.
  */
 #define LogRelMaxFlow(a_cMax, a)    LogRelMaxIt(a_cMax, RTLOGGRPFLAGS_FLOW,     LOG_GROUP, a)
diff --git a/include/iprt/mangling.h b/include/iprt/mangling.h
index 3a95ed7..c28bcf6 100644
--- a/include/iprt/mangling.h
+++ b/include/iprt/mangling.h
@@ -10,7 +10,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1980,6 +1980,7 @@
 # define RTTestCreateChild                              RT_MANGLER(RTTestCreateChild)
 # define RTTestCreateEx                                 RT_MANGLER(RTTestCreateEx)
 # define RTTestDestroy                                  RT_MANGLER(RTTestDestroy)
+# define RTTestDisableAssertions                        RT_MANGLER(RTTestDisableAssertions)
 # define RTTestErrorCount                               RT_MANGLER(RTTestErrorCount)
 # define RTTestErrorInc                                 RT_MANGLER(RTTestErrorInc)
 # define RTTestFailed                                   RT_MANGLER(RTTestFailed)
@@ -1990,6 +1991,7 @@
 # define RTTestGuardedAllocHead                         RT_MANGLER(RTTestGuardedAllocHead)
 # define RTTestGuardedAllocTail                         RT_MANGLER(RTTestGuardedAllocTail)
 # define RTTestGuardedFree                              RT_MANGLER(RTTestGuardedFree)
+# define RTTestIDisableAssertions                       RT_MANGLER(RTTestIDisableAssertions)
 # define RTTestIErrorCount                              RT_MANGLER(RTTestIErrorCount)
 # define RTTestIErrorInc                                RT_MANGLER(RTTestIErrorInc)
 # define RTTestIFailed                                  RT_MANGLER(RTTestIFailed)
@@ -2004,6 +2006,7 @@
 # define RTTestIPassedV                                 RT_MANGLER(RTTestIPassedV)
 # define RTTestIPrintf                                  RT_MANGLER(RTTestIPrintf)
 # define RTTestIPrintfV                                 RT_MANGLER(RTTestIPrintfV)
+# define RTTestIRestoreAssertions                       RT_MANGLER(RTTestIRestoreAssertions)
 # define RTTestISub                                     RT_MANGLER(RTTestISub)
 # define RTTestISubDone                                 RT_MANGLER(RTTestISubDone)
 # define RTTestISubF                                    RT_MANGLER(RTTestISubF)
@@ -2017,6 +2020,7 @@
 # define RTTestPrintfNl                                 RT_MANGLER(RTTestPrintfNl)
 # define RTTestPrintfNlV                                RT_MANGLER(RTTestPrintfNlV)
 # define RTTestPrintfV                                  RT_MANGLER(RTTestPrintfV)
+# define RTTestRestoreAssertions                        RT_MANGLER(RTTestRestoreAssertions)
 # define RTTestSetDefault                               RT_MANGLER(RTTestSetDefault)
 # define RTTestSkipAndDestroy                           RT_MANGLER(RTTestSkipAndDestroy)
 # define RTTestSkipAndDestroyV                          RT_MANGLER(RTTestSkipAndDestroyV)
diff --git a/include/iprt/manifest.h b/include/iprt/manifest.h
index 17c55ff..e333b9e 100644
--- a/include/iprt/manifest.h
+++ b/include/iprt/manifest.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/md2.h b/include/iprt/md2.h
index 29e87e5..101087b 100644
--- a/include/iprt/md2.h
+++ b/include/iprt/md2.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/md5.h b/include/iprt/md5.h
index f632ec5..1d940f3 100644
--- a/include/iprt/md5.h
+++ b/include/iprt/md5.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/mem.h b/include/iprt/mem.h
index 090c3db..2f51c97 100644
--- a/include/iprt/mem.h
+++ b/include/iprt/mem.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/memcache.h b/include/iprt/memcache.h
index a8dc4eb..5ee8748 100644
--- a/include/iprt/memcache.h
+++ b/include/iprt/memcache.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/memobj.h b/include/iprt/memobj.h
index 0d8c801..08f2387 100644
--- a/include/iprt/memobj.h
+++ b/include/iprt/memobj.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/mempool.h b/include/iprt/mempool.h
index 222793a..1cfb181 100644
--- a/include/iprt/mempool.h
+++ b/include/iprt/mempool.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/memsafer.h b/include/iprt/memsafer.h
index eec649a..1bd3730 100644
--- a/include/iprt/memsafer.h
+++ b/include/iprt/memsafer.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/memtracker.h b/include/iprt/memtracker.h
index 6657b6b..ef41678 100644
--- a/include/iprt/memtracker.h
+++ b/include/iprt/memtracker.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/message.h b/include/iprt/message.h
index 0d942ca..719ab04 100644
--- a/include/iprt/message.h
+++ b/include/iprt/message.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/mp.h b/include/iprt/mp.h
index 43072da..b537ffe 100644
--- a/include/iprt/mp.h
+++ b/include/iprt/mp.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/net.h b/include/iprt/net.h
index c35f65a..5d27bdf 100644
--- a/include/iprt/net.h
+++ b/include/iprt/net.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/nocrt/amd64/fenv.h b/include/iprt/nocrt/amd64/fenv.h
index 98b5a1a..90688b5 100644
--- a/include/iprt/nocrt/amd64/fenv.h
+++ b/include/iprt/nocrt/amd64/fenv.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/nocrt/amd64/math.h b/include/iprt/nocrt/amd64/math.h
index 0a6f618..215f1b8 100644
--- a/include/iprt/nocrt/amd64/math.h
+++ b/include/iprt/nocrt/amd64/math.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/nocrt/compiler/compiler.h b/include/iprt/nocrt/compiler/compiler.h
index 5bc4efc..762034b 100644
--- a/include/iprt/nocrt/compiler/compiler.h
+++ b/include/iprt/nocrt/compiler/compiler.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/nocrt/compiler/gcc.h b/include/iprt/nocrt/compiler/gcc.h
index 745e1a0..4a3d11a 100644
--- a/include/iprt/nocrt/compiler/gcc.h
+++ b/include/iprt/nocrt/compiler/gcc.h
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/nocrt/compiler/msc.h b/include/iprt/nocrt/compiler/msc.h
index 2fa7517..916b5a3 100644
--- a/include/iprt/nocrt/compiler/msc.h
+++ b/include/iprt/nocrt/compiler/msc.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/nocrt/fenv.h b/include/iprt/nocrt/fenv.h
index 43528f0..9c8e85a 100644
--- a/include/iprt/nocrt/fenv.h
+++ b/include/iprt/nocrt/fenv.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/nocrt/inttypes.h b/include/iprt/nocrt/inttypes.h
index d4afc35..0004d92 100644
--- a/include/iprt/nocrt/inttypes.h
+++ b/include/iprt/nocrt/inttypes.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/nocrt/limits.h b/include/iprt/nocrt/limits.h
index 9760dda..b91b1c7 100644
--- a/include/iprt/nocrt/limits.h
+++ b/include/iprt/nocrt/limits.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/nocrt/math.h b/include/iprt/nocrt/math.h
index 1f47b10..60a9ad1 100644
--- a/include/iprt/nocrt/math.h
+++ b/include/iprt/nocrt/math.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/nocrt/setjmp.h b/include/iprt/nocrt/setjmp.h
index 6eb122c..7a16823 100644
--- a/include/iprt/nocrt/setjmp.h
+++ b/include/iprt/nocrt/setjmp.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/nocrt/stdarg.h b/include/iprt/nocrt/stdarg.h
index 6ba94cc..76c2e29 100644
--- a/include/iprt/nocrt/stdarg.h
+++ b/include/iprt/nocrt/stdarg.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/nocrt/stddef.h b/include/iprt/nocrt/stddef.h
index 8c87984..685e097 100644
--- a/include/iprt/nocrt/stddef.h
+++ b/include/iprt/nocrt/stddef.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/nocrt/stdlib.h b/include/iprt/nocrt/stdlib.h
index 0928e0a..0b76710 100644
--- a/include/iprt/nocrt/stdlib.h
+++ b/include/iprt/nocrt/stdlib.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/nocrt/string.h b/include/iprt/nocrt/string.h
index 0028cba..c609c9b 100644
--- a/include/iprt/nocrt/string.h
+++ b/include/iprt/nocrt/string.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/nocrt/x86/fenv.h b/include/iprt/nocrt/x86/fenv.h
index 9afef70..6a71765 100644
--- a/include/iprt/nocrt/x86/fenv.h
+++ b/include/iprt/nocrt/x86/fenv.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/nocrt/x86/math.h b/include/iprt/nocrt/x86/math.h
index 7c0cffe..927d8b2 100644
--- a/include/iprt/nocrt/x86/math.h
+++ b/include/iprt/nocrt/x86/math.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/nt/dispmprt.h b/include/iprt/nt/dispmprt.h
new file mode 100644
index 0000000..acb715d
--- /dev/null
+++ b/include/iprt/nt/dispmprt.h
@@ -0,0 +1,49 @@
+/** @file
+ * Safe way to include dispmprt.h (DDK).
+ */
+
+/*
+ * Copyright (C) 2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+#ifndef ___iprt_nt_dispmprt_h___
+#define ___iprt_nt_dispmprt_h___
+
+#include <iprt/cdefs.h>
+
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable:4668) /* warning C4668: 'DBG' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
+# ifndef __cplusplus
+#  pragma warning(disable:4255) /* video.h(1776) : warning C4255: 'VideoPortGetCurrentIrql' : no function prototype given: converting '()' to '(void)' */
+# endif
+#endif
+
+RT_C_DECLS_BEGIN
+#include <dispmprt.h>
+RT_C_DECLS_END
+
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
+
+#endif
+
diff --git a/include/iprt/nt/miniport.h b/include/iprt/nt/miniport.h
new file mode 100644
index 0000000..d1e0cc0
--- /dev/null
+++ b/include/iprt/nt/miniport.h
@@ -0,0 +1,46 @@
+/** @file
+ * Safe way to include miniport.h.
+ */
+
+/*
+ * Copyright (C) 2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+#ifndef ___iprt_nt_miniport_h___
+#define ___iprt_nt_miniport_h___
+
+#include <iprt/cdefs.h>
+
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable:4668) /* basetsd.h(114) : warning C4668: '__midl' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
+#endif
+
+RT_C_DECLS_BEGIN
+#include <miniport.h>
+RT_C_DECLS_END
+
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
+
+#endif
+
diff --git a/include/iprt/nt/ndis.h b/include/iprt/nt/ndis.h
new file mode 100644
index 0000000..db46ed1
--- /dev/null
+++ b/include/iprt/nt/ndis.h
@@ -0,0 +1,46 @@
+/** @file
+ * Safe way to include ndis.h.
+ */
+
+/*
+ * Copyright (C) 2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+#ifndef ___iprt_nt_ndis_h___
+#define ___iprt_nt_ndis_h___
+
+#include <iprt/cdefs.h>
+
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable:4668) /* warning C4668: 'NDIS_WRAPPER' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
+#endif
+
+RT_C_DECLS_BEGIN
+#include <ndis.h>
+RT_C_DECLS_END
+
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
+
+#endif
+
diff --git a/include/iprt/nt/nt-and-windows.h b/include/iprt/nt/nt-and-windows.h
index 6da9ad3..957b560 100644
--- a/include/iprt/nt/nt-and-windows.h
+++ b/include/iprt/nt/nt-and-windows.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -38,7 +38,7 @@
 #define IPRT_NT_USE_WINTERNL
 #define IPRT_NT_HAVE_CURRENT_TEB_MACRO
 #define WIN32_NO_STATUS
-#include <Windows.h>
+#include <iprt/win/windows.h>
 #undef WIN32_NO_STATUS
 
 #undef _PEB
diff --git a/include/iprt/nt/nt.h b/include/iprt/nt/nt.h
index 69f302b..589573e 100644
--- a/include/iprt/nt/nt.h
+++ b/include/iprt/nt/nt.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -41,6 +41,7 @@
 # define NtQueryInformationThread       ZwQueryInformationThread
 # define NtQuerySystemInformation       ZwQuerySystemInformation
 # define NtQuerySecurityObject          ZwQuerySecurityObject
+# define NtSetInformationFile           ZwSetInformationFile
 # define NtClose                        ZwClose
 # define NtCreateFile                   ZwCreateFile
 # define NtReadFile                     ZwReadFile
@@ -124,12 +125,15 @@
 # define SystemPolicyInformation                IncompleteWinternl_SystemPolicyInformation
 
 
+# pragma warning(push)
+# pragma warning(disable: 4668)
 # define WIN32_NO_STATUS
 # include <windef.h>
 # include <winnt.h>
 # include <winternl.h>
 # undef WIN32_NO_STATUS
 # include <ntstatus.h>
+# pragma warning(pop)
 
 
 # undef _FILE_INFORMATION_CLASS
@@ -178,18 +182,21 @@
 /*
  * Use ntifs.h and wdm.h.
  */
+# pragma warning(push)
 # ifdef RT_ARCH_X86
 #  define _InterlockedAddLargeStatistic  _InterlockedAddLargeStatistic_StupidDDKVsCompilerCrap
-#  pragma warning(disable : 4163)
+#  pragma warning(disable: 4163)
 # endif
+# pragma warning(disable: 4668)
+# pragma warning(disable: 4255) /* warning C4255: 'ObGetFilterVersion' : no function prototype given: converting '()' to '(void)' */
 
 # include <ntifs.h>
 # include <wdm.h>
 
 # ifdef RT_ARCH_X86
-#  pragma warning(default : 4163)
 #  undef _InterlockedAddLargeStatistic
 # endif
+# pragma warning(pop)
 
 # define IPRT_NT_NEED_API_GROUP_NTIFS
 #endif
@@ -1593,6 +1600,8 @@ typedef FILE_INFORMATION_CLASS *PFILE_INFORMATION_CLASS;
 NTSYSAPI NTSTATUS NTAPI NtQueryInformationFile(HANDLE, PIO_STATUS_BLOCK, PVOID, ULONG, FILE_INFORMATION_CLASS);
 NTSYSAPI NTSTATUS NTAPI NtQueryDirectoryFile(HANDLE, HANDLE, PIO_APC_ROUTINE, PVOID, PIO_STATUS_BLOCK, PVOID, ULONG,
                                              FILE_INFORMATION_CLASS, BOOLEAN, PUNICODE_STRING, BOOLEAN);
+NTSYSAPI NTSTATUS NTAPI NtSetInformationFile(HANDLE, PIO_STATUS_BLOCK, PVOID, ULONG, FILE_INFORMATION_CLASS);
+
 
 /** For use with KeyBasicInformation. */
 typedef struct _KEY_BASIC_INFORMATION
@@ -2201,6 +2210,9 @@ typedef SYSTEM_SESSION_PROCESS_INFORMATION *PSYSTEM_SESSION_PROCESS_INFORMATION;
 
 NTSYSAPI NTSTATUS NTAPI NtQuerySystemInformation(SYSTEM_INFORMATION_CLASS, PVOID, ULONG, PULONG);
 
+NTSYSAPI NTSTATUS NTAPI NtSetTimerResolution(ULONG cNtTicksWanted, BOOLEAN fSetResolution, PULONG pcNtTicksCur);
+NTSYSAPI NTSTATUS NTAPI NtQueryTimerResolution(PULONG pcNtTicksMin, PULONG pcNtTicksMax, PULONG pcNtTicksCur);
+
 NTSYSAPI NTSTATUS NTAPI NtDelayExecution(BOOLEAN, PLARGE_INTEGER);
 NTSYSAPI NTSTATUS NTAPI NtYieldExecution(void);
 #ifndef IPRT_NT_USE_WINTERNL
@@ -2358,6 +2370,9 @@ typedef struct _RTL_CRITICAL_SECTION
 typedef RTL_CRITICAL_SECTION *PRTL_CRITICAL_SECTION;
 #endif
 
+/*NTSYSAPI ULONG NTAPI RtlNtStatusToDosError(NTSTATUS rcNt);*/
+
+
 RT_C_DECLS_END
 /** @} */
 
diff --git a/include/iprt/nt/ntddk.h b/include/iprt/nt/ntddk.h
new file mode 100644
index 0000000..ee372fa
--- /dev/null
+++ b/include/iprt/nt/ntddk.h
@@ -0,0 +1,65 @@
+/** @file
+ * Safe way to include ntddk.h.
+ */
+
+/*
+ * Copyright (C) 2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+#ifndef ___iprt_nt_ntddk_h___
+#define ___iprt_nt_ntddk_h___
+
+/* Make sure we get the right prototypes. */
+#pragma warning(push)
+#pragma warning(disable:4668) /* Several incorrect __cplusplus uses. */
+#pragma warning(disable:4255) /* Incorrect __slwpcb prototype. */
+#include <intrin.h>
+#pragma warning(pop)
+
+#define _InterlockedExchange           _InterlockedExchange_StupidDDKVsCompilerCrap
+#define _InterlockedExchangeAdd        _InterlockedExchangeAdd_StupidDDKVsCompilerCrap
+#define _InterlockedCompareExchange    _InterlockedCompareExchange_StupidDDKVsCompilerCrap
+#define _InterlockedAddLargeStatistic  _InterlockedAddLargeStatistic_StupidDDKVsCompilerCrap
+#define _interlockedbittestandset      _interlockedbittestandset_StupidDDKVsCompilerCrap
+#define _interlockedbittestandreset    _interlockedbittestandreset_StupidDDKVsCompilerCrap
+#define _interlockedbittestandset64    _interlockedbittestandset64_StupidDDKVsCompilerCrap
+#define _interlockedbittestandreset64  _interlockedbittestandreset64_StupidDDKVsCompilerCrap
+
+#pragma warning(push)
+#pragma warning(disable:4163)
+#pragma warning(disable:4668) /* warning C4668: 'WHEA_DOWNLEVEL_TYPE_NAMES' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
+#pragma warning(disable:4255) /* warning C4255: 'ObGetFilterVersion' : no function prototype given: converting '()' to '(void)' */
+/*RT_C_DECLS_BEGIN - no longer necessary it seems */
+#include <ntddk.h>
+/*RT_C_DECLS_END - no longer necessary it seems */
+#pragma warning(pop)
+
+#undef  _InterlockedExchange
+#undef  _InterlockedExchangeAdd
+#undef  _InterlockedCompareExchange
+#undef  _InterlockedAddLargeStatistic
+#undef  _interlockedbittestandset
+#undef  _interlockedbittestandreset
+#undef  _interlockedbittestandset64
+#undef  _interlockedbittestandreset64
+
+#endif
+
diff --git a/include/iprt/nt/rx.h b/include/iprt/nt/rx.h
new file mode 100644
index 0000000..7849098
--- /dev/null
+++ b/include/iprt/nt/rx.h
@@ -0,0 +1,49 @@
+/** @file
+ * Safe way to include rx.h (DDK/IFS).
+ */
+
+/*
+ * Copyright (C) 2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+#ifndef ___iprt_nt_rx_h___
+#define ___iprt_nt_rx_h___
+
+#include <iprt/cdefs.h>
+
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable: 4668) /* rxovride.h(38) : warning C4668: 'DBG' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
+# pragma warning(disable: 4100) /* Fcb.h(1558) : warning C4100: 'SrvOpen' : unreferenced formal parameter */
+# pragma warning(disable: 4115) /* rxce.h(106) : warning C4115: '_ADAPTER_STATUS' : named type definition in parentheses */
+# ifndef __cplusplus
+#  pragma warning(disable: 4255) /* rxworkq.h(235) : warning C4255: 'RxInitializeDispatcher' : no function prototype given: converting '()' to '(void)' */
+# endif
+#endif
+
+#include <rx.h>
+
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
+
+#endif
+
diff --git a/include/iprt/nt/tdikrnl.h b/include/iprt/nt/tdikrnl.h
new file mode 100644
index 0000000..d07f0a7
--- /dev/null
+++ b/include/iprt/nt/tdikrnl.h
@@ -0,0 +1,38 @@
+/** @file
+ * Safe way to include tdikrnl.h.
+ */
+
+/*
+ * Copyright (C) 2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+#ifndef ___iprt_nt_tdikrnl_h___
+#define ___iprt_nt_tdikrnl_h___
+
+#pragma warning(push)
+#pragma warning(disable:4668) /* warning C4668: 'NTDDI_WINS03' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
+RT_C_DECLS_BEGIN
+#include <tdikrnl.h>
+RT_C_DECLS_END
+#pragma warning(pop)
+
+#endif
+
diff --git a/include/iprt/nt/video.h b/include/iprt/nt/video.h
new file mode 100644
index 0000000..4da679b
--- /dev/null
+++ b/include/iprt/nt/video.h
@@ -0,0 +1,47 @@
+/** @file
+ * Safe way to include video.h (DDK).
+ */
+
+/*
+ * Copyright (C) 2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+#ifndef ___iprt_nt_video_h___
+#define ___iprt_nt_video_h___
+
+#include <iprt/cdefs.h>
+
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable:4668) /* warning C4668: 'DBG' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
+# ifndef __cplusplus
+#  pragma warning(disable:4255) /* warning C4255: 'VideoPortGetCurrentIrql' : no function prototype given: converting '()' to '(void)'*/
+# endif
+#endif
+
+#include <video.h>
+
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
+
+#endif
+
diff --git a/include/iprt/nt/wdm.h b/include/iprt/nt/wdm.h
new file mode 100644
index 0000000..1a46345
--- /dev/null
+++ b/include/iprt/nt/wdm.h
@@ -0,0 +1,64 @@
+/** @file
+ * Safe way to include wdm.h.
+ */
+
+/*
+ * Copyright (C) 2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+#ifndef ___iprt_nt_wdm_h___
+#define ___iprt_nt_wdm_h___
+
+/* Make sure we get the right prototypes. */
+#pragma warning(push)
+#pragma warning(disable:4668) /* Several incorrect __cplusplus uses. */
+#pragma warning(disable:4255) /* Incorrect __slwpcb prototype. */
+#include <intrin.h>
+#pragma warning(pop)
+
+#define _InterlockedExchange           _InterlockedExchange_StupidDDKVsCompilerCrap
+#define _InterlockedExchangeAdd        _InterlockedExchangeAdd_StupidDDKVsCompilerCrap
+#define _InterlockedCompareExchange    _InterlockedCompareExchange_StupidDDKVsCompilerCrap
+#define _InterlockedAddLargeStatistic  _InterlockedAddLargeStatistic_StupidDDKVsCompilerCrap
+#define _interlockedbittestandset      _interlockedbittestandset_StupidDDKVsCompilerCrap
+#define _interlockedbittestandreset    _interlockedbittestandreset_StupidDDKVsCompilerCrap
+#define _interlockedbittestandset64    _interlockedbittestandset64_StupidDDKVsCompilerCrap
+#define _interlockedbittestandreset64  _interlockedbittestandreset64_StupidDDKVsCompilerCrap
+
+#pragma warning(push)
+#pragma warning(disable:4163)
+#pragma warning(disable:4668) /* warning C4668: 'WHEA_DOWNLEVEL_TYPE_NAMES' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
+#pragma warning(disable:4255) /* warning C4255: 'ObGetFilterVersion' : no function prototype given: converting '()' to '(void)' */
+#pragma warning(disable:4005) /* wdm.h(29) : warning C4005: 'NO_INTERLOCKED_INTRINSICS' : macro redefinition */
+#include <wdm.h>
+#pragma warning(pop)
+
+#undef  _InterlockedExchange
+#undef  _InterlockedExchangeAdd
+#undef  _InterlockedCompareExchange
+#undef  _InterlockedAddLargeStatistic
+#undef  _interlockedbittestandset
+#undef  _interlockedbittestandreset
+#undef  _interlockedbittestandset64
+#undef  _interlockedbittestandreset64
+
+#endif
+
diff --git a/include/iprt/once.h b/include/iprt/once.h
index 81dcb7f..268b60b 100644
--- a/include/iprt/once.h
+++ b/include/iprt/once.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/param.h b/include/iprt/param.h
index 6b1bcdf..cfd489d 100644
--- a/include/iprt/param.h
+++ b/include/iprt/param.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/path.h b/include/iprt/path.h
index 420728f..8bd42bc 100644
--- a/include/iprt/path.h
+++ b/include/iprt/path.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/pipe.h b/include/iprt/pipe.h
index fe4363a..7894a43 100644
--- a/include/iprt/pipe.h
+++ b/include/iprt/pipe.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/poll.h b/include/iprt/poll.h
index d048f8f..42d2971 100644
--- a/include/iprt/poll.h
+++ b/include/iprt/poll.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/power.h b/include/iprt/power.h
index 67bfd14..bf0e241 100644
--- a/include/iprt/power.h
+++ b/include/iprt/power.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/process.h b/include/iprt/process.h
index 2678a03..043653e 100644
--- a/include/iprt/process.h
+++ b/include/iprt/process.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/queueatomic.h b/include/iprt/queueatomic.h
index dfd2094..cc892cf 100644
--- a/include/iprt/queueatomic.h
+++ b/include/iprt/queueatomic.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/rand.h b/include/iprt/rand.h
index bc6c687..52e3b42 100644
--- a/include/iprt/rand.h
+++ b/include/iprt/rand.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/req.h b/include/iprt/req.h
index 700cae3..ec158f3 100644
--- a/include/iprt/req.h
+++ b/include/iprt/req.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/runtime-loader.h b/include/iprt/runtime-loader.h
index ccbc5b2..d895bcd 100644
--- a/include/iprt/runtime-loader.h
+++ b/include/iprt/runtime-loader.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/runtime.h b/include/iprt/runtime.h
index 0c63162..96ea2da 100644
--- a/include/iprt/runtime.h
+++ b/include/iprt/runtime.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/s3.h b/include/iprt/s3.h
index 9057837..2f6e17f 100644
--- a/include/iprt/s3.h
+++ b/include/iprt/s3.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/semaphore.h b/include/iprt/semaphore.h
index 90383a1..8220c13 100644
--- a/include/iprt/semaphore.h
+++ b/include/iprt/semaphore.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/sg.h b/include/iprt/sg.h
index af6c93e..05a9e1c 100644
--- a/include/iprt/sg.h
+++ b/include/iprt/sg.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/sha.h b/include/iprt/sha.h
index c850c7e..ddd7b55 100644
--- a/include/iprt/sha.h
+++ b/include/iprt/sha.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/socket.h b/include/iprt/socket.h
index 6e7f8f9..9d760d4 100644
--- a/include/iprt/socket.h
+++ b/include/iprt/socket.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/solaris/kmoddeps.mac b/include/iprt/solaris/kmoddeps.mac
index 5464a29..68624be 100644
--- a/include/iprt/solaris/kmoddeps.mac
+++ b/include/iprt/solaris/kmoddeps.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2012-2015 Oracle Corporation
+; Copyright (C) 2012-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/sort.h b/include/iprt/sort.h
index fb1e749..4fc5184 100644
--- a/include/iprt/sort.h
+++ b/include/iprt/sort.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/spinlock.h b/include/iprt/spinlock.h
index ebc3627..56ddbe4 100644
--- a/include/iprt/spinlock.h
+++ b/include/iprt/spinlock.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/stdarg.h b/include/iprt/stdarg.h
index 6386e0d..612ef21 100644
--- a/include/iprt/stdarg.h
+++ b/include/iprt/stdarg.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -33,6 +33,8 @@
 # include <iprt/cdefs.h>
 # if defined(RT_OS_FREEBSD) && defined(_KERNEL)
 #  include <machine/stdarg.h>
+# elif defined(RT_OS_NETBSD) && defined(_KERNEL)
+#  include <sys/stdarg.h>
 # elif defined(RT_OS_SOLARIS) && defined(_KERNEL) && defined(__GNUC__)
 #  include <stdarg.h>
 #  if __GNUC__ >= 4 /* System headers refers to __builtin_stdarg_start. */
diff --git a/include/iprt/stdint.h b/include/iprt/stdint.h
index ccfe631..5d267d7 100644
--- a/include/iprt/stdint.h
+++ b/include/iprt/stdint.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -34,6 +34,7 @@
  */
 #if !(defined(RT_OS_LINUX) && defined(__KERNEL__))  \
   && !(defined(RT_OS_FREEBSD) && defined(_KERNEL)) \
+  && !(defined(RT_OS_NETBSD) && defined(_KERNEL)) \
   && RT_MSC_PREREQ_EX(RT_MSC_VER_VS2010, 1 /*non-msc*/) \
   && !defined(__IBMC__) \
   && !defined(__IBMCPP__) \
@@ -47,7 +48,14 @@
 # ifndef __STDC_LIMIT_MACROS
 #  define __STDC_LIMIT_MACROS
 # endif
+# ifdef _MSC_VER
+#  pragma warning(push)
+#  pragma warning(disable:4668)
+# endif
 # include <stdint.h>
+# ifdef _MSC_VER
+#  pragma warning(pop)
+# endif
 
 # if defined(RT_OS_DARWIN) && defined(KERNEL) && defined(RT_ARCH_AMD64)
  /*
@@ -72,6 +80,16 @@
 # endif
 # include <sys/stdint.h>
 
+#elif defined(RT_OS_NETBSD) && defined(_KERNEL)
+
+# ifndef __STDC_CONSTANT_MACROS
+#  define __STDC_CONSTANT_MACROS
+# endif
+# ifndef __STDC_LIMIT_MACROS
+#  define __STDC_LIMIT_MACROS
+# endif
+# include <sys/stdint.h>
+
 #else /* No system stdint.h */
 
 /*
diff --git a/include/iprt/strcache.h b/include/iprt/strcache.h
index c67632b..3171c58 100644
--- a/include/iprt/strcache.h
+++ b/include/iprt/strcache.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/stream.h b/include/iprt/stream.h
index 9231bc1..4ed01c4 100644
--- a/include/iprt/stream.h
+++ b/include/iprt/stream.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/string.h b/include/iprt/string.h
index 12622da..085274a 100644
--- a/include/iprt/string.h
+++ b/include/iprt/string.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -45,33 +45,12 @@
 
 #elif defined(RT_OS_FREEBSD) && defined(_KERNEL)
   RT_C_DECLS_BEGIN
-  /** @todo
-   * XXX: Very ugly hack to get things build on recent FreeBSD builds. They have
-   * memchr now and we need to include param.h to get __FreeBSD_version and make
-   * memchr available based on the version below or we can't compile the kernel
-   * module on older versions anymore.
-   *
-   * But including param.h here opens Pandora's box because we clash with a few
-   * defines namely PVM and PAGE_SIZE. We can safely undefine PVM here but not
-   * PAGE_SIZE because this results in build errors sooner or later. Luckily this
-   * define is in a header included by param.h (machine/param.h). We define the
-   * guards here to prevent inclusion of it if PAGE_SIZE was defined already.
-   *
-   * @todo aeichner: Search for an elegant solution and cleanup this mess ASAP!
-   */
-# ifdef PAGE_SIZE
-#  define _AMD64_INCLUDE_PARAM_H_
-#  define _I386_INCLUDE_PARAM_H_
-#  define _MACHINE_PARAM_H_
-# endif
-# include <sys/param.h> /* __FreeBSD_version */
-# undef PVM
 # include <sys/libkern.h>
-  /*
-   * No memmove on versions < 7.2
-   * Defining a macro using bcopy here
-   */
-# define memmove(dst, src, size) bcopy(src, dst, size)
+  RT_C_DECLS_END
+
+#elif defined(RT_OS_NETBSD) && defined(_KERNEL)
+  RT_C_DECLS_BEGIN
+# include <lib/libkern/libkern.h>
   RT_C_DECLS_END
 
 #elif defined(RT_OS_SOLARIS) && defined(_KERNEL)
@@ -106,14 +85,17 @@ RT_C_DECLS_END
 
 #if defined(RT_OS_FREEBSD) && defined(_KERNEL)
 RT_C_DECLS_BEGIN
-#if __FreeBSD_version < 900000
-void *memchr(const void *pv, int ch, size_t cb);
+char *strpbrk(const char *pszStr, const char *pszChars);
+RT_C_DECLS_END
 #endif
+
+#if defined(RT_OS_NETBSD) && defined(_KERNEL)
+RT_C_DECLS_BEGIN
 char *strpbrk(const char *pszStr, const char *pszChars);
 RT_C_DECLS_END
 #endif
 
-#if (!defined(RT_OS_LINUX) || !defined(_GNU_SOURCE)) && !defined(RT_OS_FREEBSD)
+#if (!defined(RT_OS_LINUX) || !defined(_GNU_SOURCE)) && !defined(RT_OS_FREEBSD) && !defined(RT_OS_NETBSD)
 RT_C_DECLS_BEGIN
 void *memrchr(const char *pv, int ch, size_t cb);
 RT_C_DECLS_END
@@ -725,20 +707,23 @@ RTDECL(bool) RTStrIsValidEncoding(const char *psz);
 RTDECL(size_t) RTStrPurgeEncoding(char *psz);
 
 /**
- * Sanitise a (valid) UTF-8 string by replacing all characters outside a white
- * list in-place by an ASCII replacement character.  Multi-byte characters will
- * be replaced byte by byte.
+ * Sanitizes a (valid) UTF-8 string by replacing all characters outside a white
+ * list in-place by an ASCII replacement character.
+ *
+ * Multi-byte characters will be replaced byte by byte.
  *
- * @returns The number of code points replaced, or a negative value if the
- *          string is not correctly encoded.  In this last case the string
- *          may be partially processed.
+ * @returns The number of code points replaced.  In the case of an incorrectly
+ *          encoded string -1 will be returned, and the string is not completely
+ *          processed.  In the case of puszValidPairs having an odd number of
+ *          code points, -1 will be also return but without any modification to
+ *          the string.
  * @param   psz            The string to sanitise.
- * @param   puszValidSet   A zero-terminated array of pairs of Unicode points.
+ * @param   puszValidPairs A zero-terminated array of pairs of Unicode points.
  *                         Each pair is the start and end point of a range,
  *                         and the union of these ranges forms the white list.
  * @param   chReplacement  The ASCII replacement character.
  */
-RTDECL(ssize_t) RTStrPurgeComplementSet(char *psz, PCRTUNICP puszValidSet, char chReplacement);
+RTDECL(ssize_t) RTStrPurgeComplementSet(char *psz, PCRTUNICP puszValidPairs, char chReplacement);
 
 /**
  * Gets the number of code points the string is made up of, excluding
diff --git a/include/iprt/symlink.h b/include/iprt/symlink.h
index 5631d8c..dd88dee 100644
--- a/include/iprt/symlink.h
+++ b/include/iprt/symlink.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/system.h b/include/iprt/system.h
index ba7b5e4..0609431 100644
--- a/include/iprt/system.h
+++ b/include/iprt/system.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/table.h b/include/iprt/table.h
index eb8bf86..9a779f6 100644
--- a/include/iprt/table.h
+++ b/include/iprt/table.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/tar.h b/include/iprt/tar.h
index 245b56d..3ab5b17 100644
--- a/include/iprt/tar.h
+++ b/include/iprt/tar.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/tcp.h b/include/iprt/tcp.h
index 4762ba7..e0a5eb9 100644
--- a/include/iprt/tcp.h
+++ b/include/iprt/tcp.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/test.h b/include/iprt/test.h
index 0b1816e..52c1ff4 100644
--- a/include/iprt/test.h
+++ b/include/iprt/test.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -635,6 +635,27 @@ RTR3DECL(int) RTTestFailureDetailsV(RTTEST hTest, const char *pszFormat, va_list
  */
 RTR3DECL(int) RTTestFailureDetails(RTTEST hTest, const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(2, 3);
 
+/**
+ * Disables and shuts up assertions.
+ *
+ * Max 8 nestings.
+ *
+ * @returns IPRT status code.
+ * @param   hTest       The test handle. If NIL_RTTEST we'll use the one
+ *                      associated with the calling thread.
+ * @sa      RTAssertSetMayPanic, RTAssertSetQuiet.
+ */
+RTR3DECL(int) RTTestDisableAssertions(RTTEST hTest);
+
+/**
+ * Restores the previous call to RTTestDisableAssertions.
+ *
+ * @returns IPRT status code.
+ * @param   hTest       The test handle. If NIL_RTTEST we'll use the one
+ *                      associated with the calling thread.
+ */
+RTR3DECL(int) RTTestRestoreAssertions(RTTEST hTest);
+
 
 /** @def RTTEST_CHECK
  * Check whether a boolean expression holds true.
@@ -1092,6 +1113,23 @@ RTR3DECL(int) RTTestIFailureDetailsV(const char *pszFormat, va_list va) RT_IPRT_
  */
 RTR3DECL(int) RTTestIFailureDetails(const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(1, 2);
 
+/**
+ * Disables and shuts up assertions.
+ *
+ * Max 8 nestings.
+ *
+ * @returns IPRT status code.
+ * @sa      RTAssertSetMayPanic, RTAssertSetQuiet.
+ */
+RTR3DECL(int) RTTestIDisableAssertions(void);
+
+/**
+ * Restores the previous call to RTTestDisableAssertions.
+ *
+ * @returns IPRT status code.
+ */
+RTR3DECL(int) RTTestIRestoreAssertions(void);
+
 
 /** @def RTTESTI_CHECK
  * Check whether a boolean expression holds true.
diff --git a/include/iprt/thread.h b/include/iprt/thread.h
index 2bfba45..bc0e43d 100644
--- a/include/iprt/thread.h
+++ b/include/iprt/thread.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/time.h b/include/iprt/time.h
index a582564..5ca5331 100644
--- a/include/iprt/time.h
+++ b/include/iprt/time.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -353,7 +353,8 @@ DECLINLINE(void) RTTimeSpecGetSecondsAndNano(PRTTIMESPEC pTime, int32_t *pi32Sec
 
 
 /* PORTME: Add struct timeval guard macro here. */
-#if defined(RTTIME_INCL_TIMEVAL) || defined(_STRUCT_TIMEVAL) || defined(_SYS__TIMEVAL_H_) || defined(_SYS_TIME_H) || defined(_TIMEVAL) || defined(_LINUX_TIME_H)
+#if defined(RTTIME_INCL_TIMEVAL) || defined(_STRUCT_TIMEVAL) || defined(_SYS__TIMEVAL_H_) || defined(_SYS_TIME_H) || defined(_TIMEVAL) || defined(_LINUX_TIME_H) \
+ || (defined(RT_OS_NETBSD) && defined(_SYS_TIME_H_))
 /**
  * Gets the time as POSIX timeval.
  *
@@ -391,7 +392,8 @@ DECLINLINE(PRTTIMESPEC) RTTimeSpecSetTimeval(PRTTIMESPEC pTime, const struct tim
 
 
 /* PORTME: Add struct timespec guard macro here. */
-#if defined(RTTIME_INCL_TIMESPEC) || defined(_STRUCT_TIMESPEC) || defined(_SYS__TIMESPEC_H_) || defined(TIMEVAL_TO_TIMESPEC) || defined(_TIMESPEC)
+#if defined(RTTIME_INCL_TIMESPEC) || defined(_STRUCT_TIMESPEC) || defined(_SYS__TIMESPEC_H_) || defined(TIMEVAL_TO_TIMESPEC) || defined(_TIMESPEC) \
+ || (defined(RT_OS_NETBSD) && defined(_SYS_TIME_H_))
 /**
  * Gets the time as POSIX timespec.
  *
diff --git a/include/iprt/timer.h b/include/iprt/timer.h
index e748339..920faa6 100644
--- a/include/iprt/timer.h
+++ b/include/iprt/timer.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/trace.h b/include/iprt/trace.h
index 22358f0..05af54c 100644
--- a/include/iprt/trace.h
+++ b/include/iprt/trace.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/types.h b/include/iprt/types.h
index bd95495..11778ae 100644
--- a/include/iprt/types.h
+++ b/include/iprt/types.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -88,6 +88,30 @@ RT_C_DECLS_END
 #  define _INTPTR_T_DECLARED
 #  include <sys/types.h>
 
+# elif defined(RT_OS_NETBSD) && defined(_KERNEL)
+
+#  include <sys/types.h>
+
+   /*
+    * Kludge for NetBSD-6.x where the definition of bool in
+    * <sys/types.h> does not check for C++.
+    */
+#  if defined(__cplusplus) && defined(bool)
+#   undef bool
+#   undef true
+#   undef false
+#  endif
+
+   /*
+    * Kludge for NetBSD-6.x where <sys/types.h> does not define
+    * ptrdiff_t for the kernel code.  Note that we don't worry about
+    * redefinition in <stddef.h> since that header doesn't exist for
+    * _KERNEL code.
+    */
+#  ifdef _BSD_PTRDIFF_T_
+    typedef _BSD_PTRDIFF_T_ ptrdiff_t;
+#  endif
+
 # elif defined(RT_OS_LINUX) && defined(__KERNEL__)
     /*
      * Kludge for the linux kernel:
@@ -207,6 +231,27 @@ typedef uint8_t bool;
 #   ifndef __bool_true_false_are_defined
 typedef _Bool bool;
 #   endif
+#  elif defined(RT_OS_NETBSD)
+#   if !defined(_KERNEL)
+     /*
+      * For the kernel code <stdbool.h> is not available, but bool is
+      * provided by <sys/types.h> included above.
+      */
+#    include <stdbool.h>
+
+     /*
+      * ... but the story doesn't end here.  The C standard says that
+      * <stdbool.h> defines preprocessor macro "bool" that expands to
+      * "_Bool", but adds that a program may undefine/redefine it
+      * (this is 7.16 in C99 and 7.18 in C11).  We have to play this
+      * game here because X11 code uses "bool" as a struct member name
+      * - so undefine "bool" and provide it as a typedef instead.  We
+      * still keep #include <stdbool.h> so that any code that might
+      * include it later doesn't mess things up.
+      */
+#    undef bool
+     typedef _Bool bool;
+#   endif
 #  else
 #   if (defined(RT_OS_DARWIN) || defined(RT_OS_HAIKU)) && (defined(_STDBOOL_H) || defined(__STDBOOL_H))
 #    undef bool
@@ -1566,7 +1611,6 @@ typedef RTCCINTREG             *PRTCCINTREG;
 /** Pointer to a const signed integer register in the current context. */
 typedef RTCCINTREG const       *PCRTCCINTREG;
 
-
 /** Unsigned integer register in the current context.
  * @remarks This is for dealing with EAX in 16-bit mode. */
 #if ARCH_BITS == 16 && defined(RT_ARCH_X86)
@@ -1592,6 +1636,98 @@ typedef RTCCINTXREG            *PRTCCINTXREG;
  * context. */
 typedef RTCCINTXREG const      *PCRTCCINTXREG;
 
+/** @def RTCCUINTREG_C
+ * Defines a constant of RTCCUINTREG type.
+ * @param a_Value   Constant value  */
+/** @def RTCCUINTREG_MAX
+ * Max value that RTCCUINTREG can hold. */
+/** @def RTCCUINTREG_FMT
+ * Generic IPRT format specifier for RTCCUINTREG. */
+/** @def RTCCUINTREG_XFMT
+ * Generic IPRT format specifier for RTCCUINTREG, hexadecimal. */
+/** @def RTCCINTREG_C
+ * Defines a constant of RTCCINTREG type.
+ * @param a_Value   Constant value  */
+/** @def RTCCINTREG_MAX
+ * Max value that RTCCINTREG can hold. */
+/** @def RTCCINTREG_MIN
+ * Min value that RTCCINTREG can hold. */
+/** @def RTCCINTREG_XFMT
+ * Generic IPRT format specifier for RTCCINTREG, hexadecimal. */
+#if ARCH_BITS == 32
+# define RTCCUINTREG_C(a_Value)     UINT32_C(a_Value)
+# define RTCCUINTREG_MAX            UINT32_MAX
+# define RTCCUINTREG_FMT            "RU32"
+# define RTCCUINTREG_XFMT           "RX32"
+# define RTCCINTREG_C(a_Value)      INT32_C(a_Value)
+# define RTCCINTREG_MAX             INT32_MAX
+# define RTCCINTREG_MIN             INT32_MIN
+# define RTCCINTREG_FMT             "RI32"
+# define RTCCINTREG_XFMT            "RX32"
+#elif ARCH_BITS == 64
+# define RTCCUINTREG_C(a_Value)     UINT64_C(a_Value)
+# define RTCCUINTREG_MAX            UINT64_MAX
+# define RTCCUINTREG_FMT            "RU64"
+# define RTCCUINTREG_XFMT           "RX64"
+# define RTCCINTREG_C(a_Value)      INT64_C(a_Value)
+# define RTCCINTREG_MAX             INT64_MAX
+# define RTCCINTREG_MIN             INT64_MIN
+# define RTCCINTREG_FMT             "RI64"
+# define RTCCINTREG_XFMT            "RX64"
+#elif ARCH_BITS == 16
+# define RTCCUINTREG_C(a_Value)     UINT16_C(a_Value)
+# define RTCCUINTREG_MAX            UINT16_MAX
+# define RTCCUINTREG_FMT            "RU16"
+# define RTCCUINTREG_XFMT           "RX16"
+# define RTCCINTREG_C(a_Value)      INT16_C(a_Value)
+# define RTCCINTREG_MAX             INT16_MAX
+# define RTCCINTREG_MIN             INT16_MIN
+# define RTCCINTREG_FMT             "RI16"
+# define RTCCINTREG_XFMT            "RX16"
+#else
+# error "Unsupported ARCH_BITS!"
+#endif
+/** @def RTCCUINTXREG_C
+ * Defines a constant of RTCCUINTXREG type.
+ * @param a_Value   Constant value  */
+/** @def RTCCUINTXREG_MAX
+ * Max value that RTCCUINTXREG can hold. */
+/** @def RTCCUINTXREG_FMT
+ * Generic IPRT format specifier for RTCCUINTXREG. */
+/** @def RTCCUINTXREG_XFMT
+ * Generic IPRT format specifier for RTCCUINTXREG, hexadecimal. */
+/** @def RTCCINTXREG_C
+ * Defines a constant of RTCCINTXREG type.
+ * @param a_Value   Constant value  */
+/** @def RTCCINTXREG_MAX
+ * Max value that RTCCINTXREG can hold. */
+/** @def RTCCINTXREG_MIN
+ * Min value that RTCCINTXREG can hold. */
+/** @def RTCCINTXREG_FMT
+ * Generic IPRT format specifier for RTCCINTXREG. */
+/** @def RTCCINTXREG_XFMT
+ * Generic IPRT format specifier for RTCCINTXREG, hexadecimal. */
+#if ARCH_BITS == 16 && defined(RT_ARCH_X86)
+# define RTCCUINTXREG_C(a_Value)    UINT32_C(a_Value)
+# define RTCCUINTXREG_MAX           UINT32_MAX
+# define RTCCUINTXREG_FMT           "RU32"
+# define RTCCUINTXREG_XFMT          "RX32"
+# define RTCCINTXREG_C(a_Value)     INT32_C(a_Value)
+# define RTCCINTXREG_MAX            INT32_MAX
+# define RTCCINTXREG_MIN            INT32_MIN
+# define RTCCINTXREG_FMT            "RI32"
+# define RTCCINTXREG_XFMT           "RX32"
+#else
+# define RTCCUINTXREG_C(a_Value)    RTCCUINTREG_C(a_Value)
+# define RTCCUINTXREG_MAX           RTCCUINTREG_MAX
+# define RTCCUINTXREG_FMT           RTCCUINTREG_FMT
+# define RTCCUINTXREG_XFMT          RTCCUINTREG_XFMT
+# define RTCCINTXREG_C(a_Value)     RTCCINTREG_C(a_Value)
+# define RTCCINTXREG_MAX            RTCCINTREG_MAX
+# define RTCCINTXREG_MIN            RTCCINTREG_MIN
+# define RTCCINTXREG_FMT            RTCCINTREG_FMT
+# define RTCCINTXREG_XFMT           RTCCINTREG_XFMT
+#endif
 /** @} */
 
 
diff --git a/include/iprt/udp.h b/include/iprt/udp.h
index 9b1e70d..90552e7 100644
--- a/include/iprt/udp.h
+++ b/include/iprt/udp.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/uint128.h b/include/iprt/uint128.h
index 24ae6a9..ce9dfe4 100644
--- a/include/iprt/uint128.h
+++ b/include/iprt/uint128.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/uni.h b/include/iprt/uni.h
index e788473..896c9f8 100644
--- a/include/iprt/uni.h
+++ b/include/iprt/uni.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/uri.h b/include/iprt/uri.h
index 50c0779..462e304 100644
--- a/include/iprt/uri.h
+++ b/include/iprt/uri.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/utf16.h b/include/iprt/utf16.h
index 44ae21f..97fe9bb 100644
--- a/include/iprt/utf16.h
+++ b/include/iprt/utf16.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -530,19 +530,23 @@ RTDECL(bool) RTUtf16IsValidEncoding(PCRTUTF16 pwsz);
 
 /**
  * Sanitise a (valid) UTF-16 string by replacing all characters outside a white
- * list in-place by an ASCII replacement character.  Multi-byte characters will
- * be replaced byte by byte.
+ * list in-place by an ASCII replacement character.
  *
- * @returns The number of code points replaced, or a negative value if the
- *          string is not correctly encoded.  In this last case the string
- *          may be partially processed.
+ * Surrogate paris will be replaced by two chars.
+ *
+ * @returns The number of code points replaced.  In the case of an incorrectly
+ *          encoded string -1 will be returned, and the string is not completely
+ *          processed.  In the case of puszValidPairs having an odd number of
+ *          code points, -1 will be also return but without any modification to
+ *          the string.
  * @param   pwsz           The string to sanitise.
- * @param   puszValidSet   A zero-terminated array of pairs of Unicode points.
+ * @param   puszValidPairs A zero-terminated array of pairs of Unicode points.
  *                         Each pair is the start and end point of a range,
  *                         and the union of these ranges forms the white list.
  * @param   chReplacement  The ASCII replacement character.
+ * @sa      RTStrPurgeComplementSet
  */
-RTDECL(ssize_t) RTUtf16PurgeComplementSet(PRTUTF16 pwsz, PCRTUNICP puszValidSet, char chReplacement);
+RTDECL(ssize_t) RTUtf16PurgeComplementSet(PRTUTF16 pwsz, PCRTUNICP puszValidPairs, char chReplacement);
 
 /**
  * Translate a UTF-16 string into a UTF-8 allocating the result buffer (default
diff --git a/include/iprt/uuid.h b/include/iprt/uuid.h
index 1e08719..a253eb7 100644
--- a/include/iprt/uuid.h
+++ b/include/iprt/uuid.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/vector.h b/include/iprt/vector.h
index 3c85bd8..3e4d627 100644
--- a/include/iprt/vector.h
+++ b/include/iprt/vector.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/vfs.h b/include/iprt/vfs.h
index 05f127a..656210c 100644
--- a/include/iprt/vfs.h
+++ b/include/iprt/vfs.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/vfslowlevel.h b/include/iprt/vfslowlevel.h
index d823f42..c95fefc 100644
--- a/include/iprt/vfslowlevel.h
+++ b/include/iprt/vfslowlevel.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/win/d3d8.h b/include/iprt/win/d3d8.h
new file mode 100644
index 0000000..b87b5e6
--- /dev/null
+++ b/include/iprt/win/d3d8.h
@@ -0,0 +1,45 @@
+/** @file
+ * Safe way to include d3d8.h.
+ */
+
+/*
+ * Copyright (C) 2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+#ifndef ___iprt_win_d3d8_h___
+#define ___iprt_win_d3d8_h___
+
+#ifdef _MSC_VER
+# pragma warning(push)
+/*# pragma warning(disable:4163)*/
+# pragma warning(disable:4668) /* warning C4668: 'WHEA_DOWNLEVEL_TYPE_NAMES' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
+# pragma warning(disable:4255) /* warning C4255: 'ObGetFilterVersion' : no function prototype given: converting '()' to '(void)' */
+#endif
+
+#include <d3d8.h>
+
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
+
+
+#endif
+
diff --git a/include/iprt/win/d3d9.h b/include/iprt/win/d3d9.h
new file mode 100644
index 0000000..a45f8df
--- /dev/null
+++ b/include/iprt/win/d3d9.h
@@ -0,0 +1,44 @@
+/** @file
+ * Safe way to include d3d9.h.
+ */
+
+/*
+ * Copyright (C) 2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+#ifndef ___iprt_win_d3d9_h___
+#define ___iprt_win_d3d9_h___
+
+#ifdef _MSC_VER
+# pragma warning(push)
+/*# pragma warning(disable:4163)*/
+# pragma warning(disable:4668) /* warning C4668: 'WHEA_DOWNLEVEL_TYPE_NAMES' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
+# pragma warning(disable:4255) /* warning C4255: 'ObGetFilterVersion' : no function prototype given: converting '()' to '(void)' */
+#endif
+
+#include <d3d9.h>
+
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
+
+#endif
+
diff --git a/include/iprt/win/intsafe.h b/include/iprt/win/intsafe.h
new file mode 100644
index 0000000..37ce546
--- /dev/null
+++ b/include/iprt/win/intsafe.h
@@ -0,0 +1,62 @@
+/** @file
+ * Safe way to include intsafe.h.
+ */
+
+/*
+ * Copyright (C) 2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+#ifndef ___iprt_win_intsafe_h___
+#define ___iprt_win_intsafe_h___
+
+/* There's a conflict between the Visual C++ 2010 stdint.h and wDK 7.1 intsafe.h
+   that we must to mediate here.  Current approach is to use the stuff from
+   intsafe.h rather than the other. */
+#ifndef _INTSAFE_H_INCLUDED_
+# include <iprt/stdint.h>
+# undef INT8_MIN
+# undef INT16_MIN
+# undef INT32_MIN
+# undef INT8_MAX
+# undef INT16_MAX
+# undef INT32_MAX
+# undef UINT8_MAX
+# undef UINT16_MAX
+# undef UINT32_MAX
+# undef INT64_MIN
+# undef INT64_MAX
+# undef UINT64_MAX
+
+# ifdef _MSC_VER
+#  pragma warning(push)
+#  pragma warning(disable:4668) /* intsafe.h(55) : warning C4668: '__midl' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
+# endif
+
+# include <intsafe.h>
+
+# ifdef _MSC_VER
+#  pragma warning(pop)
+# endif
+
+#endif /* !_INTSAFE_H_INCLUDED_ */
+
+#endif
+
diff --git a/include/iprt/win/iphlpapi.h b/include/iprt/win/iphlpapi.h
new file mode 100644
index 0000000..52cf0d3
--- /dev/null
+++ b/include/iprt/win/iphlpapi.h
@@ -0,0 +1,38 @@
+/** @file
+ * Safe way to include iphlpapi.h.
+ */
+
+/*
+ * Copyright (C) 2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+#ifndef ___iprt_win_iphlpapi_h___
+#define ___iprt_win_iphlpapi_h___
+
+#pragma warning(push)
+#pragma warning(disable:4668) /* 'NDIS_SUPPORT_NDIS6' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
+
+#include <iphlpapi.h>
+
+#pragma warning(pop)
+
+#endif
+
diff --git a/include/iprt/win/lazy-dbghelp.h b/include/iprt/win/lazy-dbghelp.h
index fe81720..d12583f 100644
--- a/include/iprt/win/lazy-dbghelp.h
+++ b/include/iprt/win/lazy-dbghelp.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/win/netioapi.h b/include/iprt/win/netioapi.h
new file mode 100644
index 0000000..85a375b
--- /dev/null
+++ b/include/iprt/win/netioapi.h
@@ -0,0 +1,34 @@
+/** @file
+ * Safe way to include netioapi.h.
+ */
+
+/*
+ * Copyright (C) 2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+#ifndef ___iprt_win_netioapi_h___
+#define ___iprt_win_netioapi_h___
+
+#include <iprt/win/ntddndis.h> /* this one has problems with -Wall */
+#include <netioapi.h>
+
+#endif
+
diff --git a/include/iprt/win/ntdddisk.h b/include/iprt/win/ntdddisk.h
new file mode 100644
index 0000000..a156ede
--- /dev/null
+++ b/include/iprt/win/ntdddisk.h
@@ -0,0 +1,38 @@
+/** @file
+ * Safe way to include ntdddisk.h.
+ */
+
+/*
+ * Copyright (C) 2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+#ifndef ___iprt_win_ntdddisk_h___
+#define ___iprt_win_ntdddisk_h___
+
+#pragma warning(push)
+#pragma warning(disable:4668) /* ntdddisk.h(137) : warning C4668: 'NTDDI_WIN2003' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
+
+#include <ntdddisk.h>
+
+#pragma warning(pop)
+
+#endif
+
diff --git a/include/iprt/win/ntddndis.h b/include/iprt/win/ntddndis.h
new file mode 100644
index 0000000..e57b3cc
--- /dev/null
+++ b/include/iprt/win/ntddndis.h
@@ -0,0 +1,38 @@
+/** @file
+ * Safe way to include ntddndis.h.
+ */
+
+/*
+ * Copyright (C) 2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+#ifndef ___iprt_win_ntddndis_h___
+#define ___iprt_win_ntddndis_h___
+
+#pragma warning(push)
+#pragma warning(disable:4668) /* 'NDIS_SUPPORT_NDIS6' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
+
+#include <ntddndis.h>
+
+#pragma warning(pop)
+
+#endif
+
diff --git a/include/iprt/win/ntverp.h b/include/iprt/win/ntverp.h
new file mode 100644
index 0000000..2d33ca5
--- /dev/null
+++ b/include/iprt/win/ntverp.h
@@ -0,0 +1,38 @@
+/** @file
+ * Safe way to include ntverp.h.
+ */
+
+/*
+ * Copyright (C) 2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+#ifndef ___iprt_win_ntverp_h___
+#define ___iprt_win_ntverp_h___
+
+#pragma warning(push)
+#pragma warning(disable:4668) /*ntverp.h(126) : warning C4668: 'OFFICIAL_BUILD' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
+
+#include <ntverp.h>
+
+#pragma warning(pop)
+
+#endif
+
diff --git a/include/iprt/win/objbase.h b/include/iprt/win/objbase.h
new file mode 100644
index 0000000..02cf438
--- /dev/null
+++ b/include/iprt/win/objbase.h
@@ -0,0 +1,45 @@
+/** @file
+ * Safe way to include objbase.h.
+ */
+
+/*
+ * Copyright (C) 2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+#ifndef ___iprt_win_objbase_h___
+#define ___iprt_win_objbase_h___
+
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable:4668) /* '__midl' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
+# if !defined(__cplusplus)
+#  pragma warning(disable:4255) /* 'FARPROC' : no function prototype given: converting '()' to '(void)' */
+# endif
+#endif
+
+#include <objbase.h>
+
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
+
+#endif
+
diff --git a/include/iprt/win/objidl.h b/include/iprt/win/objidl.h
new file mode 100644
index 0000000..e268ed9
--- /dev/null
+++ b/include/iprt/win/objidl.h
@@ -0,0 +1,38 @@
+/** @file
+ * Safe way to include objidl.h.
+ */
+
+/*
+ * Copyright (C) 2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+#ifndef ___iprt_win_objidl_h___
+#define ___iprt_win_objidl_h___
+
+#pragma warning(push)
+#pragma warning(disable:4668) /* '__midl' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
+
+#include <objidl.h>
+
+#pragma warning(pop)
+
+#endif
+
diff --git a/include/iprt/win/setupapi.h b/include/iprt/win/setupapi.h
new file mode 100644
index 0000000..32aa037
--- /dev/null
+++ b/include/iprt/win/setupapi.h
@@ -0,0 +1,38 @@
+/** @file
+ * Safe way to include setupapi.h.
+ */
+
+/*
+ * Copyright (C) 2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+#ifndef ___iprt_win_setupapi_h___
+#define ___iprt_win_setupapi_h___
+
+#pragma warning(push)
+#pragma warning(disable:4668) /* warning C4668: 'USE_SP_ALTPLATFORM_INFO_V1' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
+
+#include <setupapi.h>
+
+#pragma warning(pop)
+
+#endif
+
diff --git a/include/iprt/win/shlobj.h b/include/iprt/win/shlobj.h
new file mode 100644
index 0000000..a7ba025
--- /dev/null
+++ b/include/iprt/win/shlobj.h
@@ -0,0 +1,42 @@
+/** @file
+ * Safe way to include shlobj.h.
+ */
+
+/*
+ * Copyright (C) 2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+#ifndef ___iprt_win_shlobj_h___
+#define ___iprt_win_shlobj_h___
+
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable:4668) /* warning C4668: 'USE_SP_ALTPLATFORM_INFO_V1' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
+#endif
+
+#include <shlobj.h>
+
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
+
+#endif
+
diff --git a/include/iprt/win/shlwapi.h b/include/iprt/win/shlwapi.h
new file mode 100644
index 0000000..ef01cfc
--- /dev/null
+++ b/include/iprt/win/shlwapi.h
@@ -0,0 +1,38 @@
+/** @file
+ * Safe way to include shlwapi.h.
+ */
+
+/*
+ * Copyright (C) 2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+#ifndef ___iprt_win_shlwapi_h___
+#define ___iprt_win_shlwapi_h___
+
+#pragma warning(push)
+#pragma warning(disable:4668) /* warning C4668: 'USE_SP_ALTPLATFORM_INFO_V1' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
+#pragma warning(disable:4255) /* warning C4255: 'I_RpcMgmtEnableDedicatedThreadPool' : no function prototype given: converting '()' to '(void)' */
+#include <shlwapi.h>
+
+#pragma warning(pop)
+
+#endif
+
diff --git a/include/iprt/win/windef.h b/include/iprt/win/windef.h
new file mode 100644
index 0000000..23e4dbd
--- /dev/null
+++ b/include/iprt/win/windef.h
@@ -0,0 +1,50 @@
+/** @file
+ * Safe way to include windef.h.
+ */
+
+/*
+ * Copyright (C) 2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+#ifndef ___iprt_win_windef_h___
+#define ___iprt_win_windef_h___
+
+#ifdef _MSC_VER
+/*
+ * Unfortunately, the windef.h file in SDK 7.1 is not clean wrt warning C4668:
+ *  basetsd.h(114) : warning C4668: '__midl' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
+ *  winnt.h(13017) : warning C4668: '_DBG_MEMCPY_INLINE_' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
+ */
+# pragma warning(push)
+# pragma warning(disable:4668)
+# ifndef __cplusplus
+#  pragma warning(disable:4255) /* warning C4255: 'FARPROC' : no function prototype given: converting '()' to '(void)' */
+# endif
+#endif
+
+#include <windef.h>
+
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
+
+#endif
+
diff --git a/include/iprt/win/windows.h b/include/iprt/win/windows.h
new file mode 100644
index 0000000..ec49271
--- /dev/null
+++ b/include/iprt/win/windows.h
@@ -0,0 +1,49 @@
+/** @file
+ * Safe way to include Windows.h.
+ */
+
+/*
+ * Copyright (C) 2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+#ifndef ___iprt_win_windows_h___
+#define ___iprt_win_windows_h___
+
+#ifdef _MSC_VER
+/*
+ * Unfortunately, the Windows.h file in SDK 7.1 is not clean wrt warning C4668:
+ *      wincrypt.h(1848) : warning C4668: 'NTDDI_WINLH' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
+ */
+# pragma warning(push)
+# pragma warning(disable:4668)
+# ifndef __cplusplus
+#  pragma warning(disable:4255) /* warning C4255: 'FARPROC' : no function prototype given: converting '()' to '(void)' */
+# endif
+#endif
+
+#include <Windows.h>
+
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
+
+#endif
+
diff --git a/include/iprt/win/winsock2.h b/include/iprt/win/winsock2.h
new file mode 100644
index 0000000..c0eb4e7
--- /dev/null
+++ b/include/iprt/win/winsock2.h
@@ -0,0 +1,49 @@
+/** @file
+ * Safe way to include winsock2.h.
+ */
+
+/*
+ * Copyright (C) 2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+#ifndef ___iprt_win_winsock2_h___
+#define ___iprt_win_winsock2_h___
+
+#ifdef _MSC_VER
+/*
+ * Unfortunately, the Windows.h file in SDK 7.1 is not clean wrt warning C4668:
+ *      wincrypt.h(1848) : warning C4668: 'NTDDI_WINLH' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
+ */
+# pragma warning(push)
+# pragma warning(disable:4668)
+# ifndef __cplusplus
+#  pragma warning(disable:4255) /* warning C4255: 'FARPROC' : no function prototype given: converting '()' to '(void)' */
+# endif
+#endif
+
+#include <winsock2.h>
+
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
+
+#endif
+
diff --git a/include/iprt/win/ws2tcpip.h b/include/iprt/win/ws2tcpip.h
new file mode 100644
index 0000000..d7309a3
--- /dev/null
+++ b/include/iprt/win/ws2tcpip.h
@@ -0,0 +1,38 @@
+/** @file
+ * Safe way to include ws2tcpip.h.
+ */
+
+/*
+ * Copyright (C) 2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+#ifndef ___iprt_win_ws2tcpip_h___
+#define ___iprt_win_ws2tcpip_h___
+
+#pragma warning(push)
+#pragma warning(disable:4668) /* 'NDIS_SUPPORT_NDIS6' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
+
+#include <ws2tcpip.h>
+
+#pragma warning(pop)
+
+#endif
+
diff --git a/include/iprt/x86.h b/include/iprt/x86.h
index 1678c02..cd9415c 100644
--- a/include/iprt/x86.h
+++ b/include/iprt/x86.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/x86extra.mac b/include/iprt/x86extra.mac
index 0ad0524..15628cc 100644
--- a/include/iprt/x86extra.mac
+++ b/include/iprt/x86extra.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2012-2015 Oracle Corporation
+; Copyright (C) 2012-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/zero.h b/include/iprt/zero.h
index 457588e..270f294 100644
--- a/include/iprt/zero.h
+++ b/include/iprt/zero.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/include/iprt/zip.h b/include/iprt/zip.h
index 37983f5..372a280 100644
--- a/include/iprt/zip.h
+++ b/include/iprt/zip.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/Makefile.kmk b/src/Makefile.kmk
index eaecabe..e37278b 100644
--- a/src/Makefile.kmk
+++ b/src/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/Makefile.kmk b/src/VBox/Additions/Makefile.kmk
index 490d80c..931f466 100644
--- a/src/VBox/Additions/Makefile.kmk
+++ b/src/VBox/Additions/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -211,6 +211,7 @@ ifdef VBOX_WITH_ADDITIONS_ISO.os2.x86
 	OS2/libc063.dll=$(VBOX_PATH_ADDITIONS.os2.x86)/libc063.dll \
 	OS2/libc064.dll=$(VBOX_PATH_ADDITIONS.os2.x86)/libc064.dll \
 	OS2/libc065.dll=$(VBOX_PATH_ADDITIONS.os2.x86)/libc065.dll \
+	OS2/libc066.dll=$(VBOX_PATH_ADDITIONS.os2.x86)/libc066.dll \
 	OS2/readme.txt=$(VBOX_PATH_ADDITIONS.os2.x86)/readme.txt \
        \
 	OS2/gengradd.dll=$(VBOX_PATH_ADDITIONS.os2.x86)/gengradd.dll \
diff --git a/src/VBox/Additions/common/Makefile.kmk b/src/VBox/Additions/common/Makefile.kmk
index 8d0bec3..ea5e881 100644
--- a/src/VBox/Additions/common/Makefile.kmk
+++ b/src/VBox/Additions/common/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxControl/Makefile.kmk b/src/VBox/Additions/common/VBoxControl/Makefile.kmk
index ab874cc..bf7c9a1 100644
--- a/src/VBox/Additions/common/VBoxControl/Makefile.kmk
+++ b/src/VBox/Additions/common/VBoxControl/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2010-2015 Oracle Corporation
+# Copyright (C) 2010-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -25,7 +25,11 @@ include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
 # VBoxControl
 #
 PROGRAMS += VBoxControl
+if "$(KBUILD_TARGET)" == "win" || defined(VBOX_WITH_MASOCHISTIC_WARNINGS) ## @todo use VBoxGuestR3Exe everywhere
+VBoxControl_TEMPLATE = VBoxGuestR3Exe
+else
 VBoxControl_TEMPLATE = NewVBoxGuestR3Exe
+endif
 ifeq ($(KBUILD_TARGET),win)
  ifdef VBOX_SIGN_ADDITIONS # (See the main Windows Additions makefile.)
   VBoxControl_INSTTYPE = none
diff --git a/src/VBox/Additions/common/VBoxControl/VBoxControl.cpp b/src/VBox/Additions/common/VBoxControl/VBoxControl.cpp
index a3806c2..18ba6c8 100644
--- a/src/VBox/Additions/common/VBoxControl/VBoxControl.cpp
+++ b/src/VBox/Additions/common/VBoxControl/VBoxControl.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -33,7 +33,7 @@
 #include <VBox/version.h>
 #include <VBox/VBoxGuestLib.h>
 #ifdef RT_OS_WINDOWS
-# include <Windows.h>
+# include <iprt/win/windows.h>
 #endif
 #ifdef VBOX_WITH_GUEST_PROPS
 # include <VBox/HostServices/GuestPropertySvc.h>
@@ -240,63 +240,43 @@ static RTEXITCODE VBoxControlSyntaxError(const char *pszFormat, ...)
 
 LONG (WINAPI * gpfnChangeDisplaySettingsEx)(LPCTSTR lpszDeviceName, LPDEVMODE lpDevMode, HWND hwnd, DWORD dwflags, LPVOID lParam);
 
-static unsigned nextAdjacentRectXP (RECTL *paRects, unsigned nRects, unsigned iRect)
+static unsigned nextAdjacentRectXP(RECTL const *paRects, unsigned cRects, unsigned iRect)
 {
-    unsigned i;
-    for (i = 0; i < nRects; i++)
-    {
+    for (unsigned i = 0; i < cRects; i++)
         if (paRects[iRect].right == paRects[i].left)
-        {
             return i;
-        }
-    }
-    return ~0;
+    return ~0U;
 }
 
-static unsigned nextAdjacentRectXN (RECTL *paRects, unsigned nRects, unsigned iRect)
+static unsigned nextAdjacentRectXN(RECTL const *paRects, unsigned cRects, unsigned iRect)
 {
-    unsigned i;
-    for (i = 0; i < nRects; i++)
-    {
+    for (unsigned i = 0; i < cRects; i++)
         if (paRects[iRect].left == paRects[i].right)
-        {
             return i;
-        }
-    }
-    return ~0;
+    return ~0U;
 }
 
-static unsigned nextAdjacentRectYP (RECTL *paRects, unsigned nRects, unsigned iRect)
+static unsigned nextAdjacentRectYP(RECTL const *paRects, unsigned cRects, unsigned iRect)
 {
-    unsigned i;
-    for (i = 0; i < nRects; i++)
-    {
+    for (unsigned i = 0; i < cRects; i++)
         if (paRects[iRect].bottom == paRects[i].top)
-        {
             return i;
-        }
-    }
-    return ~0;
+    return ~0U;
 }
 
-unsigned nextAdjacentRectYN (RECTL *paRects, unsigned nRects, unsigned iRect)
+unsigned nextAdjacentRectYN(RECTL const *paRects, unsigned cRects, unsigned iRect)
 {
-    unsigned i;
-    for (i = 0; i < nRects; i++)
-    {
+    for (unsigned i = 0; i < cRects; i++)
         if (paRects[iRect].top == paRects[i].bottom)
-        {
             return i;
-        }
-    }
-    return ~0;
+    return ~0U;
 }
 
-void resizeRect(RECTL *paRects, unsigned nRects, unsigned iPrimary, unsigned iResized, int NewWidth, int NewHeight)
+void resizeRect(RECTL *paRects, unsigned cRects, unsigned iPrimary, unsigned iResized, int NewWidth, int NewHeight)
 {
-    RECTL *paNewRects = (RECTL *)alloca (sizeof (RECTL) * nRects);
-    memcpy (paNewRects, paRects, sizeof (RECTL) * nRects);
-    paNewRects[iResized].right += NewWidth - (paNewRects[iResized].right - paNewRects[iResized].left);
+    RECTL *paNewRects = (RECTL *)alloca(sizeof (RECTL) * cRects);
+    memcpy (paNewRects, paRects, sizeof(RECTL) * cRects);
+    paNewRects[iResized].right  += NewWidth - (paNewRects[iResized].right - paNewRects[iResized].left);
     paNewRects[iResized].bottom += NewHeight - (paNewRects[iResized].bottom - paNewRects[iResized].top);
 
     /* Verify all pairs of originally adjacent rectangles for all 4 directions.
@@ -307,10 +287,10 @@ void resizeRect(RECTL *paRects, unsigned nRects, unsigned iPrimary, unsigned iRe
 
     /* X positive. */
     unsigned iRect;
-    for (iRect = 0; iRect < nRects; iRect++)
+    for (iRect = 0; iRect < cRects; iRect++)
     {
         /* Find the next adjacent original rect in x positive direction. */
-        unsigned iNextRect = nextAdjacentRectXP (paRects, nRects, iRect);
+        unsigned iNextRect = nextAdjacentRectXP (paRects, cRects, iRect);
         Log(("next %d -> %d\n", iRect, iNextRect));
 
         if (iNextRect == ~0 || iNextRect == iPrimary)
@@ -335,10 +315,10 @@ void resizeRect(RECTL *paRects, unsigned nRects, unsigned iPrimary, unsigned iRe
     }
 
     /* X negative. */
-    for (iRect = 0; iRect < nRects; iRect++)
+    for (iRect = 0; iRect < cRects; iRect++)
     {
         /* Find the next adjacent original rect in x negative direction. */
-        unsigned iNextRect = nextAdjacentRectXN (paRects, nRects, iRect);
+        unsigned iNextRect = nextAdjacentRectXN (paRects, cRects, iRect);
         Log(("next %d -> %d\n", iRect, iNextRect));
 
         if (iNextRect == ~0 || iNextRect == iPrimary)
@@ -363,10 +343,10 @@ void resizeRect(RECTL *paRects, unsigned nRects, unsigned iPrimary, unsigned iRe
     }
 
     /* Y positive (in the computer sense, top->down). */
-    for (iRect = 0; iRect < nRects; iRect++)
+    for (iRect = 0; iRect < cRects; iRect++)
     {
         /* Find the next adjacent original rect in y positive direction. */
-        unsigned iNextRect = nextAdjacentRectYP (paRects, nRects, iRect);
+        unsigned iNextRect = nextAdjacentRectYP (paRects, cRects, iRect);
         Log(("next %d -> %d\n", iRect, iNextRect));
 
         if (iNextRect == ~0 || iNextRect == iPrimary)
@@ -391,10 +371,10 @@ void resizeRect(RECTL *paRects, unsigned nRects, unsigned iPrimary, unsigned iRe
     }
 
     /* Y negative (in the computer sense, down->top). */
-    for (iRect = 0; iRect < nRects; iRect++)
+    for (iRect = 0; iRect < cRects; iRect++)
     {
         /* Find the next adjacent original rect in x negative direction. */
-        unsigned iNextRect = nextAdjacentRectYN (paRects, nRects, iRect);
+        unsigned iNextRect = nextAdjacentRectYN (paRects, cRects, iRect);
         Log(("next %d -> %d\n", iRect, iNextRect));
 
         if (iNextRect == ~0 || iNextRect == iPrimary)
@@ -418,7 +398,7 @@ void resizeRect(RECTL *paRects, unsigned nRects, unsigned iPrimary, unsigned iRe
         }
     }
 
-    memcpy (paRects, paNewRects, sizeof (RECTL) * nRects);
+    memcpy (paRects, paNewRects, sizeof (RECTL) * cRects);
     return;
 }
 
@@ -428,51 +408,50 @@ static BOOL ResizeDisplayDevice(ULONG Id, DWORD Width, DWORD Height, DWORD BitsP
     BOOL fModeReset = (Width == 0 && Height == 0 && BitsPerPixel == 0);
 
     DISPLAY_DEVICE DisplayDevice;
-
-    ZeroMemory(&DisplayDevice, sizeof(DisplayDevice));
+    RT_ZERO(DisplayDevice);
     DisplayDevice.cb = sizeof(DisplayDevice);
 
     /* Find out how many display devices the system has */
     DWORD NumDevices = 0;
     DWORD i = 0;
-    while (EnumDisplayDevices (NULL, i, &DisplayDevice, 0))
+    while (EnumDisplayDevices(NULL, i, &DisplayDevice, 0))
     {
         Log(("[%d] %s\n", i, DisplayDevice.DeviceName));
 
         if (DisplayDevice.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE)
         {
-            Log(("Found primary device. err %d\n", GetLastError ()));
+            Log(("Found primary device. err %d\n", GetLastError()));
             NumDevices++;
         }
         else if (!(DisplayDevice.StateFlags & DISPLAY_DEVICE_MIRRORING_DRIVER))
         {
 
-            Log(("Found secondary device. err %d\n", GetLastError ()));
+            Log(("Found secondary device. err %d\n", GetLastError()));
             NumDevices++;
         }
 
-        ZeroMemory(&DisplayDevice, sizeof(DisplayDevice));
+        RT_ZERO(DisplayDevice);
         DisplayDevice.cb = sizeof(DisplayDevice);
         i++;
     }
 
-    Log(("Found total %d devices. err %d\n", NumDevices, GetLastError ()));
+    Log(("Found total %d devices. err %d\n", NumDevices, GetLastError()));
 
     if (NumDevices == 0 || Id >= NumDevices)
     {
-        Log(("Requested identifier %d is invalid. err %d\n", Id, GetLastError ()));
+        Log(("Requested identifier %d is invalid. err %d\n", Id, GetLastError()));
         return FALSE;
     }
 
-    DISPLAY_DEVICE *paDisplayDevices = (DISPLAY_DEVICE *)alloca (sizeof (DISPLAY_DEVICE) * NumDevices);
-    DEVMODE *paDeviceModes = (DEVMODE *)alloca (sizeof (DEVMODE) * NumDevices);
-    RECTL *paRects = (RECTL *)alloca (sizeof (RECTL) * NumDevices);
+    DISPLAY_DEVICE *paDisplayDevices = (DISPLAY_DEVICE *)alloca(sizeof (DISPLAY_DEVICE) * NumDevices);
+    DEVMODE *paDeviceModes = (DEVMODE *)alloca(sizeof (DEVMODE) * NumDevices);
+    RECTL *paRects = (RECTL *)alloca(sizeof (RECTL) * NumDevices);
 
     /* Fetch information about current devices and modes. */
     DWORD DevNum = 0;
     DWORD DevPrimaryNum = 0;
 
-    ZeroMemory(&DisplayDevice, sizeof(DISPLAY_DEVICE));
+    RT_ZERO(DisplayDevice);
     DisplayDevice.cb = sizeof(DISPLAY_DEVICE);
 
     i = 0;
@@ -480,22 +459,22 @@ static BOOL ResizeDisplayDevice(ULONG Id, DWORD Width, DWORD Height, DWORD BitsP
     {
         Log(("[%d(%d)] %s\n", i, DevNum, DisplayDevice.DeviceName));
 
-        BOOL bFetchDevice = FALSE;
+        BOOL fFetchDevice = FALSE;
 
         if (DisplayDevice.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE)
         {
-            Log(("Found primary device. err %d\n", GetLastError ()));
+            Log(("Found primary device. err %d\n", GetLastError()));
             DevPrimaryNum = DevNum;
-            bFetchDevice = TRUE;
+            fFetchDevice = TRUE;
         }
         else if (!(DisplayDevice.StateFlags & DISPLAY_DEVICE_MIRRORING_DRIVER))
         {
 
-            Log(("Found secondary device. err %d\n", GetLastError ()));
-            bFetchDevice = TRUE;
+            Log(("Found secondary device. err %d\n", GetLastError()));
+            fFetchDevice = TRUE;
         }
 
-        if (bFetchDevice)
+        if (fFetchDevice)
         {
             if (DevNum >= NumDevices)
             {
@@ -505,12 +484,11 @@ static BOOL ResizeDisplayDevice(ULONG Id, DWORD Width, DWORD Height, DWORD BitsP
 
             paDisplayDevices[DevNum] = DisplayDevice;
 
-            ZeroMemory(&paDeviceModes[DevNum], sizeof(DEVMODE));
+            RT_BZERO(&paDeviceModes[DevNum], sizeof(DEVMODE));
             paDeviceModes[DevNum].dmSize = sizeof(DEVMODE);
-            if (!EnumDisplaySettings((LPSTR)DisplayDevice.DeviceName,
-                 ENUM_REGISTRY_SETTINGS, &paDeviceModes[DevNum]))
+            if (!EnumDisplaySettings((LPSTR)DisplayDevice.DeviceName, ENUM_REGISTRY_SETTINGS, &paDeviceModes[DevNum]))
             {
-                Log(("EnumDisplaySettings err %d\n", GetLastError ()));
+                Log(("EnumDisplaySettings err %d\n", GetLastError()));
                 return FALSE;
             }
 
@@ -527,25 +505,21 @@ static BOOL ResizeDisplayDevice(ULONG Id, DWORD Width, DWORD Height, DWORD BitsP
             DevNum++;
         }
 
-        ZeroMemory(&DisplayDevice, sizeof(DISPLAY_DEVICE));
+        RT_ZERO(DisplayDevice);
         DisplayDevice.cb = sizeof(DISPLAY_DEVICE);
         i++;
     }
 
     if (Width == 0)
-    {
         Width = paRects[Id].right - paRects[Id].left;
-    }
 
     if (Height == 0)
-    {
         Height = paRects[Id].bottom - paRects[Id].top;
-    }
 
     /* Check whether a mode reset or a change is requested. */
     if (   !fModeReset
-        && paRects[Id].right - paRects[Id].left == Width
-        && paRects[Id].bottom - paRects[Id].top == Height
+        && paRects[Id].right - paRects[Id].left == (LONG)Width
+        && paRects[Id].bottom - paRects[Id].top == (LONG)Height
         && paDeviceModes[Id].dmBitsPerPel == BitsPerPixel)
     {
         Log(("VBoxDisplayThread : already at desired resolution.\n"));
@@ -553,21 +527,19 @@ static BOOL ResizeDisplayDevice(ULONG Id, DWORD Width, DWORD Height, DWORD BitsP
     }
 
     resizeRect(paRects, NumDevices, DevPrimaryNum, Id, Width, Height);
-#ifdef Log
+#ifdef LOG_ENABLED
     for (i = 0; i < NumDevices; i++)
-    {
         Log(("[%d]: %d,%d %dx%d\n",
-                i, paRects[i].left, paRects[i].top,
-                paRects[i].right - paRects[i].left,
-                paRects[i].bottom - paRects[i].top));
-    }
+             i, paRects[i].left, paRects[i].top,
+             paRects[i].right - paRects[i].left,
+             paRects[i].bottom - paRects[i].top));
 #endif /* Log */
 
     /* Without this, Windows will not ask the miniport for its
      * mode table but uses an internal cache instead.
      */
     DEVMODE tempDevMode;
-    ZeroMemory (&tempDevMode, sizeof (tempDevMode));
+    RT_ZERO(tempDevMode);
     tempDevMode.dmSize = sizeof(DEVMODE);
     EnumDisplaySettings(NULL, 0xffffff, &tempDevMode);
 
@@ -590,7 +562,7 @@ static BOOL ResizeDisplayDevice(ULONG Id, DWORD Width, DWORD Height, DWORD BitsP
         Log(("calling pfnChangeDisplaySettingsEx %x\n", gpfnChangeDisplaySettingsEx));
         gpfnChangeDisplaySettingsEx((LPSTR)paDisplayDevices[i].DeviceName,
                  &paDeviceModes[i], NULL, CDS_NORESET | CDS_UPDATEREGISTRY, NULL);
-        Log(("ChangeDisplaySettings position err %d\n", GetLastError ()));
+        Log(("ChangeDisplaySettings position err %d\n", GetLastError()));
     }
 
     /* A second call to ChangeDisplaySettings updates the monitor. */
@@ -618,14 +590,10 @@ static DECLCALLBACK(RTEXITCODE) handleSetVideoMode(int argc, char *argv[])
     DWORD yres = atoi(argv[1]);
     DWORD bpp  = atoi(argv[2]);
     DWORD scr  = 0;
-
     if (argc == 4)
-    {
         scr = atoi(argv[3]);
-    }
 
     HMODULE hUser = GetModuleHandle("user32.dll");
-
     if (hUser)
     {
         *(uintptr_t *)&gpfnChangeDisplaySettingsEx = (uintptr_t)GetProcAddress(hUser, "ChangeDisplaySettingsExA");
@@ -634,7 +602,7 @@ static DECLCALLBACK(RTEXITCODE) handleSetVideoMode(int argc, char *argv[])
         if (gpfnChangeDisplaySettingsEx)
         {
             /* The screen index is 0 based in the ResizeDisplayDevice call. */
-            scr = scr > 0? scr - 1: 0;
+            scr = scr > 0 ? scr - 1 : 0;
 
             /* Horizontal resolution must be a multiple of 8, round down. */
             xres &= ~0x7;
@@ -654,20 +622,17 @@ static DECLCALLBACK(RTEXITCODE) handleSetVideoMode(int argc, char *argv[])
 
 static int checkVBoxVideoKey(HKEY hkeyVideo)
 {
-    char szValue[128];
-    DWORD len = sizeof(szValue);
-    DWORD dwKeyType;
-    LONG status = RegQueryValueExA(hkeyVideo, "Device Description", NULL, &dwKeyType,
-                                   (LPBYTE)szValue, &len);
-
+    RTUTF16 wszValue[128];
+    DWORD   cbValue = sizeof(wszValue);
+    DWORD   dwKeyType;
+    LONG status = RegQueryValueExW(hkeyVideo, L"Device Description", NULL, &dwKeyType, (LPBYTE)wszValue, &cbValue);
     if (status == ERROR_SUCCESS)
     {
         /* WDDM has additional chars after "Adapter" */
-        static char sszDeviceDescription[] = "VirtualBox Graphics Adapter";
-        if (_strnicmp(szValue, sszDeviceDescription, sizeof(sszDeviceDescription) - sizeof(char)) == 0)
-        {
+        static char s_szDeviceDescription[] = "VirtualBox Graphics Adapter";
+        wszValue[sizeof(s_szDeviceDescription) - 1] = '\0';
+        if (RTUtf16ICmpAscii(wszValue, s_szDeviceDescription) == 0)
             return VINF_SUCCESS;
-        }
     }
 
     return VERR_NOT_FOUND;
@@ -693,51 +658,46 @@ static HKEY getVideoKey(bool writable)
      */
 
     /* Get the 'ObjectNumberList' */
-    ULONG numDevices = 0;
+    ULONG cDevices = 0;
     DWORD adwObjectNumberList[256];
-    DWORD len = sizeof(adwObjectNumberList);
-    status = RegQueryValueExA(hkeyDeviceMap, "ObjectNumberList", NULL, &dwKeyType, (LPBYTE)&adwObjectNumberList[0], &len);
+    DWORD cbValue = sizeof(adwObjectNumberList);
+    status = RegQueryValueExA(hkeyDeviceMap, "ObjectNumberList", NULL, &dwKeyType, (LPBYTE)&adwObjectNumberList[0], &cbValue);
 
     if (   status == ERROR_SUCCESS
         && dwKeyType == REG_BINARY)
-    {
-        numDevices = len / sizeof(DWORD);
-    }
+        cDevices = cbValue / sizeof(DWORD);
     else
     {
        /* The list might not exists. Use 'MaxObjectNumber' REG_DWORD and build a list. */
        DWORD dwMaxObjectNumber = 0;
-       len = sizeof(dwMaxObjectNumber);
-       status = RegQueryValueExA(hkeyDeviceMap, "MaxObjectNumber", NULL, &dwKeyType, (LPBYTE)&dwMaxObjectNumber, &len);
-
+       cbValue = sizeof(dwMaxObjectNumber);
+       status = RegQueryValueExA(hkeyDeviceMap, "MaxObjectNumber", NULL, &dwKeyType, (LPBYTE)&dwMaxObjectNumber, &cbValue);
        if (   status == ERROR_SUCCESS
            && dwKeyType == REG_DWORD)
        {
            /* 'MaxObjectNumber' is inclusive. */
-           numDevices = RT_MIN(dwMaxObjectNumber + 1, RT_ELEMENTS(adwObjectNumberList));
-           for (iDevice = 0; iDevice < numDevices; iDevice++)
-           {
+           cDevices = RT_MIN(dwMaxObjectNumber + 1, RT_ELEMENTS(adwObjectNumberList));
+           for (iDevice = 0; iDevice < cDevices; iDevice++)
                adwObjectNumberList[iDevice] = iDevice;
-           }
        }
     }
 
-    if (numDevices == 0)
+    if (cDevices == 0)
     {
         /* Always try '\Device\Video0' as the old code did. Enum can be used in this case in principle. */
         adwObjectNumberList[0] = 0;
-        numDevices = 1;
+        cDevices = 1;
     }
 
     /* Scan device entries */
-    for (iDevice = 0; iDevice < numDevices; iDevice++)
+    for (iDevice = 0; iDevice < cDevices; iDevice++)
     {
         char szValueName[64];
         RTStrPrintf(szValueName, sizeof(szValueName), "\\Device\\Video%u", adwObjectNumberList[iDevice]);
 
         char szVideoLocation[256];
-        len = sizeof(szVideoLocation);
-        status = RegQueryValueExA(hkeyDeviceMap, szValueName, NULL, &dwKeyType, (LPBYTE)&szVideoLocation[0], &len);
+        cbValue = sizeof(szVideoLocation);
+        status = RegQueryValueExA(hkeyDeviceMap, szValueName, NULL, &dwKeyType, (LPBYTE)&szVideoLocation[0], &cbValue);
 
         /* This value starts with '\REGISTRY\Machine' */
         if (   status == ERROR_SUCCESS
@@ -772,6 +732,7 @@ static HKEY getVideoKey(bool writable)
 
 static DECLCALLBACK(RTEXITCODE) handleGetVideoAcceleration(int argc, char *argv[])
 {
+    RT_NOREF2(argc, argv);
     ULONG status;
     HKEY hkeyVideo = getVideoKey(false);
 
@@ -779,9 +740,9 @@ static DECLCALLBACK(RTEXITCODE) handleGetVideoAcceleration(int argc, char *argv[
     {
         /* query the actual value */
         DWORD fAcceleration = 1;
-        DWORD len = sizeof(fAcceleration);
+        DWORD cbValue = sizeof(fAcceleration);
         DWORD dwKeyType;
-        status = RegQueryValueExA(hkeyVideo, "EnableVideoAccel", NULL, &dwKeyType, (LPBYTE)&fAcceleration, &len);
+        status = RegQueryValueExA(hkeyVideo, "EnableVideoAccel", NULL, &dwKeyType, (LPBYTE)&fAcceleration, &cbValue);
         if (status != ERROR_SUCCESS)
             RTPrintf("Video acceleration: default\n");
         else
@@ -830,9 +791,9 @@ static DECLCALLBACK(RTEXITCODE) videoFlagsGet(void)
     if (hkeyVideo)
     {
         DWORD dwFlags = 0;
-        DWORD len = sizeof(dwFlags);
+        DWORD cbValue = sizeof(dwFlags);
         DWORD dwKeyType;
-        ULONG status = RegQueryValueExA(hkeyVideo, "VBoxVideoFlags", NULL, &dwKeyType, (LPBYTE)&dwFlags, &len);
+        ULONG status = RegQueryValueExA(hkeyVideo, "VBoxVideoFlags", NULL, &dwKeyType, (LPBYTE)&dwFlags, &cbValue);
         if (status != ERROR_SUCCESS)
             RTPrintf("Video flags: default\n");
         else
@@ -882,16 +843,13 @@ static DECLCALLBACK(RTEXITCODE) videoFlagsModify(bool fSet, int argc, char *argv
     if (hkeyVideo)
     {
         DWORD dwFlags = 0;
-        DWORD len = sizeof(dwFlags);
+        DWORD cbValue = sizeof(dwFlags);
         DWORD dwKeyType;
-        ULONG status = RegQueryValueExA(hkeyVideo, "VBoxVideoFlags", NULL, &dwKeyType, (LPBYTE)&dwFlags, &len);
+        ULONG status = RegQueryValueExA(hkeyVideo, "VBoxVideoFlags", NULL, &dwKeyType, (LPBYTE)&dwFlags, &cbValue);
         if (status != ERROR_SUCCESS)
-        {
             dwFlags = 0;
-        }
 
-        dwFlags = fSet? (dwFlags | u32Mask):
-                        (dwFlags & ~u32Mask);
+        dwFlags = fSet ? dwFlags | u32Mask : dwFlags & ~u32Mask;
 
         status = RegSetValueExA(hkeyVideo, "VBoxVideoFlags", 0, REG_DWORD, (LPBYTE)&dwFlags, sizeof(dwFlags));
         if (status != ERROR_SUCCESS)
@@ -1063,6 +1021,7 @@ void writeCustomModes(HKEY hkeyVideo)
 
 static DECLCALLBACK(RTEXITCODE) handleListCustomModes(int argc, char *argv[])
 {
+    RT_NOREF1(argv);
     if (argc != 0)
     {
         usage(LIST_CUST_MODES);
@@ -1201,7 +1160,7 @@ static RTEXITCODE getGuestProperty(int argc, char **argv)
     using namespace guestProp;
 
     bool fVerbose = false;
-    if (   2 == argc
+    if (   argc == 2
         && (   strcmp(argv[1], "-verbose")  == 0
             || strcmp(argv[1], "--verbose") == 0)
        )
@@ -1236,8 +1195,8 @@ static RTEXITCODE getGuestProperty(int argc, char **argv)
          * property and the guest updating it, we loop a few times here and
          * hope.  Actually this should never go wrong, as we are generous
          * enough with buffer space. */
-        bool finish = false;
-        for (unsigned i = 0; (i < 10) && !finish; ++i)
+        bool fFinished = false;
+        for (unsigned i = 0; i < 10 && !fFinished; ++i)
         {
             void *pvTmpBuf = RTMemRealloc(pvBuf, cbBuf);
             if (NULL == pvTmpBuf)
@@ -1256,7 +1215,7 @@ static RTEXITCODE getGuestProperty(int argc, char **argv)
                 /* Leave a bit of extra space to be safe */
                 cbBuf += 1024;
             else
-                finish = true;
+                fFinished = true;
         }
         if (VERR_TOO_MUCH_DATA == rc)
             VBoxControlError("Temporarily unable to retrieve the property\n");
@@ -1299,7 +1258,7 @@ static RTEXITCODE setGuestProperty(int argc, char *argv[])
      * Check the syntax.  We can deduce the correct syntax from the number of
      * arguments.
      */
-    bool usageOK = true;
+    bool fUsageOK = true;
     const char *pszName = NULL;
     const char *pszValue = NULL;
     const char *pszFlags = NULL;
@@ -1308,18 +1267,18 @@ static RTEXITCODE setGuestProperty(int argc, char *argv[])
         pszValue = argv[1];
     }
     else if (3 == argc)
-        usageOK = false;
+        fUsageOK = false;
     else if (4 == argc)
     {
         pszValue = argv[1];
         if (   strcmp(argv[2], "-flags") != 0
             && strcmp(argv[2], "--flags") != 0)
-            usageOK = false;
+            fUsageOK = false;
         pszFlags = argv[3];
     }
     else if (argc != 1)
-        usageOK = false;
-    if (!usageOK)
+        fUsageOK = false;
+    if (!fUsageOK)
     {
         usage(GUEST_PROP);
         return RTEXITCODE_FAILURE;
@@ -1364,11 +1323,11 @@ static RTEXITCODE deleteGuestProperty(int argc, char *argv[])
      * Check the syntax.  We can deduce the correct syntax from the number of
      * arguments.
      */
-    bool usageOK = true;
+    bool fUsageOK = true;
     const char *pszName = NULL;
     if (argc < 1)
-        usageOK = false;
-    if (!usageOK)
+        fUsageOK = false;
+    if (!fUsageOK)
     {
         usage(GUEST_PROP);
         return RTEXITCODE_FAILURE;
@@ -1480,11 +1439,11 @@ static RTEXITCODE waitGuestProperty(int argc, char **argv)
     const char *pszPatterns = NULL;
     uint64_t u64TimestampIn = 0;
     uint32_t u32Timeout = RT_INDEFINITE_WAIT;
-    bool usageOK = true;
+    bool fUsageOK = true;
     if (argc < 1)
-        usageOK = false;
+        fUsageOK = false;
     pszPatterns = argv[0];
-    for (int i = 1; usageOK && i < argc; ++i)
+    for (int i = 1; fUsageOK && i < argc; ++i)
     {
         if (   strcmp(argv[i], "-timeout")  == 0
             || strcmp(argv[i], "--timeout") == 0)
@@ -1493,7 +1452,7 @@ static RTEXITCODE waitGuestProperty(int argc, char **argv)
                 || RTStrToUInt32Full(argv[i + 1], 10, &u32Timeout)
                        != VINF_SUCCESS
                )
-                usageOK = false;
+                fUsageOK = false;
             else
                 ++i;
         }
@@ -1504,14 +1463,14 @@ static RTEXITCODE waitGuestProperty(int argc, char **argv)
                 || RTStrToUInt64Full(argv[i + 1], 10, &u64TimestampIn)
                        != VINF_SUCCESS
                )
-                usageOK = false;
+                fUsageOK = false;
             else
                 ++i;
         }
         else
-            usageOK = false;
+            fUsageOK = false;
     }
-    if (!usageOK)
+    if (!fUsageOK)
     {
         usage(GUEST_PROP);
         return RTEXITCODE_FAILURE;
@@ -1542,10 +1501,8 @@ static RTEXITCODE waitGuestProperty(int argc, char **argv)
      * property and the guest updating it, we loop a few times here and
      * hope.  Actually this should never go wrong, as we are generous
      * enough with buffer space. */
-    bool finish = false;
-    for (unsigned i = 0;
-         (RT_SUCCESS(rc) || rc == VERR_BUFFER_OVERFLOW) && !finish && (i < 10);
-         ++i)
+    bool fFinished = false;
+    for (unsigned i = 0; (RT_SUCCESS(rc) || rc == VERR_BUFFER_OVERFLOW) && !fFinished && i < 10; i++)
     {
         void *pvTmpBuf = RTMemRealloc(pvBuf, cbBuf);
         if (NULL == pvTmpBuf)
@@ -1565,7 +1522,7 @@ static RTEXITCODE waitGuestProperty(int argc, char **argv)
             /* Leave a bit of extra space to be safe */
             cbBuf += 1024;
         else
-            finish = true;
+            fFinished = true;
         if (rc == VERR_TOO_MUCH_DATA)
             VBoxControlError("Temporarily unable to get a notification\n");
         else if (rc == VERR_INTERRUPTED)
@@ -1607,22 +1564,22 @@ static RTEXITCODE waitGuestProperty(int argc, char **argv)
  */
 static DECLCALLBACK(RTEXITCODE) handleGuestProperty(int argc, char *argv[])
 {
-    if (0 == argc)
+    if (argc == 0)
     {
         usage(GUEST_PROP);
         return RTEXITCODE_FAILURE;
     }
     if (!strcmp(argv[0], "get"))
         return getGuestProperty(argc - 1, argv + 1);
-    else if (!strcmp(argv[0], "set"))
+    if (!strcmp(argv[0], "set"))
         return setGuestProperty(argc - 1, argv + 1);
-    else if (!strcmp(argv[0], "delete") || !strcmp(argv[0], "unset"))
+    if (!strcmp(argv[0], "delete") || !strcmp(argv[0], "unset"))
         return deleteGuestProperty(argc - 1, argv + 1);
-    else if (!strcmp(argv[0], "enumerate"))
+    if (!strcmp(argv[0], "enumerate"))
         return enumGuestProperty(argc - 1, argv + 1);
-    else if (!strcmp(argv[0], "wait"))
+    if (!strcmp(argv[0], "wait"))
         return waitGuestProperty(argc - 1, argv + 1);
-    /* else */
+    /* unknown cmd */
     usage(GUEST_PROP);
     return RTEXITCODE_FAILURE;
 }
@@ -1634,7 +1591,7 @@ static DECLCALLBACK(RTEXITCODE) handleGuestProperty(int argc, char *argv[])
  */
 static RTEXITCODE listSharedFolders(int argc, char **argv)
 {
-    bool usageOK = true;
+    bool fUsageOK = true;
     bool fOnlyShowAutoMount = false;
     if (argc == 1)
     {
@@ -1642,12 +1599,11 @@ static RTEXITCODE listSharedFolders(int argc, char **argv)
             || !strcmp(argv[0], "--automount"))
             fOnlyShowAutoMount = true;
         else
-            usageOK = false;
+            fUsageOK = false;
     }
     else if (argc > 1)
-        usageOK = false;
-
-    if (!usageOK)
+        fUsageOK = false;
+    if (!fUsageOK)
     {
         usage(GUEST_SHAREDFOLDERS);
         return RTEXITCODE_FAILURE;
@@ -1661,8 +1617,7 @@ static RTEXITCODE listSharedFolders(int argc, char **argv)
     {
         PVBGLR3SHAREDFOLDERMAPPING paMappings;
         uint32_t cMappings;
-        rc = VbglR3SharedFolderGetMappings(u32ClientId, fOnlyShowAutoMount,
-                                           &paMappings, &cMappings);
+        rc = VbglR3SharedFolderGetMappings(u32ClientId, fOnlyShowAutoMount, &paMappings, &cMappings);
         if (RT_SUCCESS(rc))
         {
             if (fOnlyShowAutoMount)
@@ -1703,7 +1658,7 @@ static RTEXITCODE listSharedFolders(int argc, char **argv)
  */
 static DECLCALLBACK(RTEXITCODE) handleSharedFolder(int argc, char *argv[])
 {
-    if (0 == argc)
+    if (argc == 0)
     {
         usage(GUEST_SHAREDFOLDERS);
         return RTEXITCODE_FAILURE;
@@ -1722,6 +1677,7 @@ static DECLCALLBACK(RTEXITCODE) handleSharedFolder(int argc, char *argv[])
  */
 static DECLCALLBACK(RTEXITCODE) handleWriteCoreDump(int argc, char *argv[])
 {
+    RT_NOREF2(argc, argv);
     int rc = VbglR3WriteCoreDump();
     if (RT_SUCCESS(rc))
     {
@@ -1830,7 +1786,7 @@ static DECLCALLBACK(RTEXITCODE) handleWriteLog(int argc, char *argv[])
  */
 static DECLCALLBACK(RTEXITCODE) handleTakeSnapshot(int argc, char *argv[])
 {
-    //VbglR3VmTakeSnapshot(argv[0], argv[1]);
+    RT_NOREF2(argc, argv); //VbglR3VmTakeSnapshot(argv[0], argv[1]);
     return VBoxControlError("not implemented");
 }
 
@@ -1839,7 +1795,7 @@ static DECLCALLBACK(RTEXITCODE) handleTakeSnapshot(int argc, char *argv[])
  */
 static DECLCALLBACK(RTEXITCODE) handleSaveState(int argc, char *argv[])
 {
-    //VbglR3VmSaveState();
+    RT_NOREF2(argc, argv); //VbglR3VmSaveState();
     return VBoxControlError("not implemented");
 }
 
@@ -1848,7 +1804,7 @@ static DECLCALLBACK(RTEXITCODE) handleSaveState(int argc, char *argv[])
  */
 static DECLCALLBACK(RTEXITCODE) handleSuspend(int argc, char *argv[])
 {
-    //VbglR3VmSuspend();
+    RT_NOREF2(argc, argv); //VbglR3VmSuspend();
     return VBoxControlError("not implemented");
 }
 
@@ -1857,7 +1813,7 @@ static DECLCALLBACK(RTEXITCODE) handleSuspend(int argc, char *argv[])
  */
 static DECLCALLBACK(RTEXITCODE) handlePowerOff(int argc, char *argv[])
 {
-    //VbglR3VmPowerOff();
+    RT_NOREF2(argc, argv); //VbglR3VmPowerOff();
     return VBoxControlError("not implemented");
 }
 
@@ -1866,6 +1822,7 @@ static DECLCALLBACK(RTEXITCODE) handlePowerOff(int argc, char *argv[])
  */
 static DECLCALLBACK(RTEXITCODE) handleVersion(int argc, char *argv[])
 {
+    RT_NOREF1(argv);
     if (argc)
         return VBoxControlSyntaxError("getversion does not take any arguments");
     return printVersion();
@@ -1876,7 +1833,7 @@ static DECLCALLBACK(RTEXITCODE) handleVersion(int argc, char *argv[])
  */
 static DECLCALLBACK(RTEXITCODE) handleHelp(int argc, char *argv[])
 {
-    /* ignore arguments for now. */
+    RT_NOREF2(argc, argv); /* ignore arguments for now. */
     usage();
     return RTEXITCODE_SUCCESS;
 }
diff --git a/src/VBox/Additions/common/VBoxControl/VBoxControl.rc b/src/VBox/Additions/common/VBoxControl/VBoxControl.rc
index 176e235..aff1dde 100644
--- a/src/VBox/Additions/common/VBoxControl/VBoxControl.rc
+++ b/src/VBox/Additions/common/VBoxControl/VBoxControl.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxControl/testcase/Makefile.kmk b/src/VBox/Additions/common/VBoxControl/testcase/Makefile.kmk
index a51e5ca..c20187c 100644
--- a/src/VBox/Additions/common/VBoxControl/testcase/Makefile.kmk
+++ b/src/VBox/Additions/common/VBoxControl/testcase/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxControl/testcase/tstVBoxControl.cpp b/src/VBox/Additions/common/VBoxControl/testcase/tstVBoxControl.cpp
index 3e0efd1..c8748ba 100644
--- a/src/VBox/Additions/common/VBoxControl/testcase/tstVBoxControl.cpp
+++ b/src/VBox/Additions/common/VBoxControl/testcase/tstVBoxControl.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -82,6 +82,7 @@ VBGLR3DECL(int)     VbglR3GuestPropRead(HGCMCLIENTID idClient,
                                         char **ppszFlags,
                                         uint32_t *pcbBufActual)
 {
+    RT_NOREF2(pvBuf, cbBuf);
     RTPrintf("Called GET_PROP, client %d, name %s...\n",
              idClient, pszName);
     static char szValue[] = "Value";
@@ -119,6 +120,7 @@ VBGLR3DECL(int)     VbglR3GuestPropEnum(HGCMCLIENTID idClient,
                                         uint64_t *pu64Timestamp,
                                         char const **ppszFlags)
 {
+    RT_NOREF2(ppaszPatterns, cPatterns);
     RTPrintf("Called ENUM_PROPS, client %d...\n", idClient);
     AssertPtrReturn(ppHandle, VERR_INVALID_POINTER);
     static VBGLR3GUESTPROPENUM Handle = { 0 };
@@ -143,6 +145,7 @@ VBGLR3DECL(int)     VbglR3GuestPropEnumNext(PVBGLR3GUESTPROPENUM pHandle,
                                             uint64_t *pu64Timestamp,
                                             char const **ppszFlags)
 {
+    RT_NOREF1(pHandle);
     RTPrintf("Called enumerate next...\n");
     AssertReturn(VALID_PTR(ppszName) || VALID_PTR(ppszValue) || VALID_PTR(ppszFlags),
                  VERR_INVALID_POINTER);
@@ -159,6 +162,7 @@ VBGLR3DECL(int)     VbglR3GuestPropEnumNext(PVBGLR3GUESTPROPENUM pHandle,
 
 VBGLR3DECL(void)    VbglR3GuestPropEnumFree(PVBGLR3GUESTPROPENUM pHandle)
 {
+    RT_NOREF1(pHandle);
     RTPrintf("Called enumerate free...\n");
 }
 
@@ -174,6 +178,7 @@ VBGLR3DECL(int)     VbglR3GuestPropWait(HGCMCLIENTID idClient,
                                         char **ppszFlags,
                                         uint32_t *pcbBufActual)
 {
+    RT_NOREF2(pvBuf, cbBuf);
     if (u32Timeout == RT_INDEFINITE_WAIT)
         RTPrintf("Called GET_NOTIFICATION, client %d, patterns %s, timestamp %llu,\n"
                  "    timeout RT_INDEFINITE_WAIT...\n",
diff --git a/src/VBox/Additions/common/VBoxGuest/Makefile.kmk b/src/VBox/Additions/common/VBoxGuest/Makefile.kmk
index 4798734..6bfb935 100644
--- a/src/VBox/Additions/common/VBoxGuest/Makefile.kmk
+++ b/src/VBox/Additions/common/VBoxGuest/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2007-2015 Oracle Corporation
+# Copyright (C) 2007-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -19,7 +19,7 @@ SUB_DEPTH = ../../../../..
 include $(KBUILD_PATH)/subheader.kmk
 
 
-if1of ($(KBUILD_TARGET), darwin freebsd haiku $(if $(defined VBOX_WITH_ADDITION_DRIVERS),linux,) os2 solaris win)
+if1of ($(KBUILD_TARGET), darwin freebsd haiku $(if $(defined VBOX_WITH_ADDITION_DRIVERS),linux,) netbsd os2 solaris win)
  #
  # VBoxGuest - The Guest Additions Driver.
  #
@@ -28,6 +28,7 @@ if1of ($(KBUILD_TARGET), darwin freebsd haiku $(if $(defined VBOX_WITH_ADDITION_
  VBoxGuest_NAME.freebsd  = vboxguest
  VBoxGuest_NAME.haiku    = vboxguest
  VBoxGuest_NAME.linux    = vboxguest
+ VBoxGuest_NAME.netbsd   = vboxguest
  VBoxGuest_NAME.solaris  = vboxguest
  VBoxGuest_INST.darwin   = $(INST_ADDITIONS)VBoxGuest.kext/Contents/MacOS/
  ifdef VBOX_SIGN_ADDITIONS # See Additions/WINNT/Makefile.kmk?
@@ -54,10 +55,12 @@ if1of ($(KBUILD_TARGET), darwin freebsd haiku $(if $(defined VBOX_WITH_ADDITION_
  VBoxGuest_DEPS.linux   += $(VBOX_SVN_REV_HEADER)
  VBoxGuest_DEPS.haiku   += $(VBOX_SVN_REV_HEADER)
  VBoxGuest_DEPS.freebsd += $(VBOX_SVN_REV_HEADER)
+ VBoxGuest_DEPS.netbsd  += $(VBOX_SVN_REV_HEADER)
  VBoxGuest_DEPS.darwin  += $(VBOX_SVN_REV_HEADER)
  VBoxGuest_DEFS          = VBGL_VBOXGUEST VBOX_WITH_HGCM
  VBoxGuest_INCS          = .
  VBoxGuest_INCS.freebsd  = $(VBoxGuest_0_OUTDIR) $(PATH_STAGE)/gen-sys-hdrs
+ VBoxGuest_INCS.netbsd   = $(VBoxGuest_0_OUTDIR)
  VBoxGuest_INCS.linux    = ../../../Runtime/r0drv/linux
  ifeq ($(KBUILD_HOST),solaris)
   VBoxGuest_LDFLAGS.solaris         += -N misc/ctf
@@ -80,7 +83,7 @@ if1of ($(KBUILD_TARGET), darwin freebsd haiku $(if $(defined VBOX_WITH_ADDITION_
     VBoxGuest.cpp_SDKS   = $(VBOX_WINDDK_GST_WLH)
    endif
   endif # win
-  ifn1of ($(KBUILD_TARGET), linux freebsd solaris haiku)
+  ifn1of ($(KBUILD_TARGET), linux freebsd netbsd solaris haiku)
    VBoxGuest_SOURCES    = VBoxGuest-$(KBUILD_TARGET).cpp
   else
    VBoxGuest_SOURCES    = VBoxGuest-$(KBUILD_TARGET).c
@@ -232,7 +235,7 @@ ifeq ($(KBUILD_TARGET),win)
 # VBoxGuestInst - The installer.
 #
 #PROGRAMS += VBoxGuestInst
-VBoxGuestInst_TEMPLATE= NewVBoxGuestR3Exe
+VBoxGuestInst_TEMPLATE= VBoxGuestR3Exe
 VBoxGuestInst_SOURCES = win/VBoxGuestInst.cpp
 endif
 
diff --git a/src/VBox/Additions/common/VBoxGuest/VBoxDev-haiku.c b/src/VBox/Additions/common/VBoxGuest/VBoxDev-haiku.c
index 446d456..b56e972 100644
--- a/src/VBox/Additions/common/VBoxGuest/VBoxDev-haiku.c
+++ b/src/VBox/Additions/common/VBoxGuest/VBoxDev-haiku.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -123,7 +123,7 @@ static status_t vgdrvHaikuClose(void *cookie)
     /** @todo r=ramshankar: should we really be using the session spinlock here? */
     RTSpinlockAcquire(g_DevExt.SessionSpinlock);
 
-    /* @todo we don't know if it belongs to this session!! */
+    /** @todo we don't know if it belongs to this session!! */
     if (sState.selectSync)
     {
         //dprintf(DRIVER_NAME "close: unblocking select %p %x\n", sState.selectSync, sState.selectEvent);
diff --git a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-darwin.cpp b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-darwin.cpp
index 89fc1dd..03d11e4 100644
--- a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-darwin.cpp
+++ b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -188,8 +188,8 @@ static struct cdevsw    g_DevCW =
     /*.d_select   = */ eno_select,
     /*.d_mmap     = */ eno_mmap,
     /*.d_strategy = */ eno_strat,
-    /*.d_getc     = */ eno_getc,
-    /*.d_putc     = */ eno_putc,
+    /*.d_getc     = */ (void *)(uintptr_t)&enodev, //eno_getc,
+    /*.d_putc     = */ (void *)(uintptr_t)&enodev, //eno_putc,
     /*.d_type     = */ 0
 };
 
@@ -227,6 +227,8 @@ static uint8_t volatile     g_fWorkLoopCreated  = VBOXGUEST_OBJECT_UNINITIALIZED
  */
 static kern_return_t    vgdrvDarwinStart(struct kmod_info *pKModInfo, void *pvData)
 {
+    RT_NOREF(pKModInfo, pvData);
+
     /*
      * Initialize IPRT.
      */
@@ -281,6 +283,7 @@ static int vgdrvDarwinCharDevInit(void)
  */
 static kern_return_t vgdrvDarwinStop(struct kmod_info *pKModInfo, void *pvData)
 {
+    RT_NOREF(pKModInfo, pvData);
     RTR0TermForced();
 
     printf("VBoxGuest: driver unloaded\n");
@@ -314,7 +317,7 @@ static int vgdrvDarwinCharDevRemove(void)
     if (g_iMajorDeviceNo != -1)
     {
         int rc2 = cdevsw_remove(g_iMajorDeviceNo, &g_DevCW);
-        Assert(rc2 == g_iMajorDeviceNo);
+        Assert(rc2 == g_iMajorDeviceNo); NOREF(rc2);
         g_iMajorDeviceNo = -1;
     }
 
@@ -338,6 +341,8 @@ static int vgdrvDarwinCharDevRemove(void)
  */
 static int vgdrvDarwinOpen(dev_t Dev, int fFlags, int fDevType, struct proc *pProcess)
 {
+    RT_NOREF(fFlags,  fDevType);
+
     /*
      * Only two minor devices numbers are allowed.
      */
@@ -397,6 +402,7 @@ static int vgdrvDarwinOpen(dev_t Dev, int fFlags, int fDevType, struct proc *pPr
  */
 static int vgdrvDarwinClose(dev_t Dev, int fFlags, int fDevType, struct proc *pProcess)
 {
+    RT_NOREF(Dev, fFlags, fDevType, pProcess);
     Log(("vgdrvDarwinClose: pid=%d\n", (int)RTProcSelf()));
     Assert(proc_pid(pProcess) == (int)RTProcSelf());
 
@@ -420,6 +426,7 @@ static int vgdrvDarwinClose(dev_t Dev, int fFlags, int fDevType, struct proc *pP
  */
 static int vgdrvDarwinIOCtl(dev_t Dev, u_long iCmd, caddr_t pData, int fFlags, struct proc *pProcess)
 {
+    RT_NOREF(Dev, fFlags);
     //const bool          fUnrestricted = minor(Dev) == 0;
     const RTPROCESS     Process = proc_pid(pProcess);
     const unsigned      iHash = SESSION_HASH(Process);
@@ -459,6 +466,7 @@ static int vgdrvDarwinIOCtl(dev_t Dev, u_long iCmd, caddr_t pData, int fFlags, s
  */
 static int vgdrvDarwinIOCtlSlow(PVBOXGUESTSESSION pSession, u_long iCmd, caddr_t pData, struct proc *pProcess)
 {
+    RT_NOREF(pProcess);
     LogFlow(("vgdrvDarwinIOCtlSlow: pSession=%p iCmd=%p pData=%p pProcess=%p\n", pSession, iCmd, pData, pProcess));
 
 
@@ -604,6 +612,7 @@ void VGDrvNativeISRMousePollEvent(PVBOXGUESTDEVEXT pDevExt)
 static IOReturn vgdrvDarwinSleepHandler(void *pvTarget, void *pvRefCon, UInt32 uMessageType,
                                         IOService *pProvider, void *pvMsgArg, vm_size_t cbMsgArg)
 {
+    RT_NOREF(pvTarget, pProvider, pvMsgArg, cbMsgArg);
     LogFlow(("VBoxGuest: Got sleep/wake notice. Message type was %x\n", uMessageType));
 
     if (uMessageType == kIOMessageSystemWillSleep)
@@ -716,6 +725,7 @@ static void vgdrvDarwinDeferredIrqHandler(OSObject *pOwner, IOInterruptEventSour
  */
 static bool vgdrvDarwinDirectIrqHandler(OSObject *pOwner, IOFilterInterruptEventSource *pSrc)
 {
+    RT_NOREF(pOwner);
     if (!pSrc)
         return false;
 
diff --git a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c
index 2aa8fbb..15dd5f2 100644
--- a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c
+++ b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-haiku-stubs.c b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-haiku-stubs.c
index c6b123a..b013db2 100644
--- a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-haiku-stubs.c
+++ b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-haiku-stubs.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-haiku.c b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-haiku.c
index a6ceb70..72bc988 100644
--- a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-haiku.c
+++ b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-haiku.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -432,14 +432,14 @@ static status_t vgdrvHaikuAttach(const pci_info *pDevice)
      * Allocate I/O port resource.
      */
     pState->uIOPortBase = pDevice->u.h0.base_registers[0];
-    /* @todo check flags for IO? */
+    /** @todo check flags for IO? */
     if (pState->uIOPortBase)
     {
         /*
          * Map the MMIO region.
          */
         uint32 phys = pDevice->u.h0.base_registers[1];
-        /* @todo Check flags for mem? */
+        /** @todo Check flags for mem? */
         pState->VMMDevMemSize    = pDevice->u.h0.base_register_sizes[1];
         pState->iVMMDevMemAreaId = map_physical_memory("VirtualBox Guest MMIO", phys, pState->VMMDevMemSize,
                                                        B_ANY_KERNEL_BLOCK_ADDRESS, B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA,
diff --git a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-haiku.h b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-haiku.h
index 2cac9d9..5405dfc 100644
--- a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-haiku.h
+++ b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-haiku.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c
index 1f74948..bd81000 100644
--- a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c
+++ b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c
@@ -1,4 +1,4 @@
-/* $Rev: 106719 $ */
+/* $Rev: 109079 $ */
 /** @file
  * VBoxGuest - Linux specifics.
  *
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-netbsd.c b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-netbsd.c
new file mode 100644
index 0000000..a2fddcd
--- /dev/null
+++ b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-netbsd.c
@@ -0,0 +1,682 @@
+/* $Id: VBoxGuest-netbsd.c $ */
+/** @file
+ * VirtualBox Guest Additions Driver for NetBSD.
+ */
+
+/*
+ * Copyright (C) 2007-2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+/** @todo r=bird: This must merge with SUPDrv-netbsd.c before long. The two
+ * source files should only differ on prefixes and the extra bits wrt to the
+ * pci device. I.e. it should be diffable so that fixes to one can easily be
+ * applied to the other. */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/select.h>
+#include <sys/conf.h>
+#include <sys/kernel.h>
+#include <sys/kmem.h>
+#include <sys/module.h>
+#include <sys/device.h>
+#include <sys/bus.h>
+#include <sys/poll.h>
+#include <sys/proc.h>
+#include <sys/stat.h>
+#include <sys/selinfo.h>
+#include <sys/queue.h>
+#include <sys/lock.h>
+#include <sys/types.h>
+#include <sys/conf.h>
+#include <sys/malloc.h>
+#include <sys/uio.h>
+#include <sys/file.h>
+#include <sys/filedesc.h>
+#include <sys/vfs_syscalls.h>
+#include <dev/pci/pcivar.h>
+#include <dev/pci/pcireg.h>
+#include <dev/pci/pcidevs.h>
+
+#ifdef PVM
+#  undef PVM
+#endif
+#include "VBoxGuestInternal.h"
+#include <VBox/log.h>
+#include <iprt/assert.h>
+#include <iprt/initterm.h>
+#include <iprt/process.h>
+#include <iprt/mem.h>
+#include <iprt/asm.h>
+
+
+/*********************************************************************************************************************************
+*   Defined Constants And Macros                                                                                                 *
+*********************************************************************************************************************************/
+/** The module name. */
+#define DEVICE_NAME  "vboxguest"
+
+
+/*********************************************************************************************************************************
+*   Structures and Typedefs                                                                                                      *
+*********************************************************************************************************************************/
+typedef struct VBoxGuestDeviceState
+{
+    device_t sc_dev;
+    pci_chipset_tag_t pc;
+    bus_space_tag_t io_tag;
+    bus_space_handle_t io_handle;
+    bus_addr_t uIOPortBase;
+    bus_size_t io_regsize;
+    bus_space_tag_t iVMMDevMemResId;
+    bus_space_handle_t VMMDevMemHandle;
+
+    /** Size of the memory area. */
+    bus_size_t         VMMDevMemSize;
+    /** Mapping of the register space */
+    bus_addr_t         pMMIOBase;
+
+    /** IRQ resource handle. */
+    pci_intr_handle_t  ih;
+    /** Pointer to the IRQ handler. */
+    void              *pfnIrqHandler;
+
+    /** Controller features, limits and status. */
+    u_int              vboxguest_state;
+} vboxguest_softc;
+
+
+struct vboxguest_session
+{
+    vboxguest_softc *sc;
+    PVBOXGUESTSESSION session;
+};
+
+#define VBOXGUEST_STATE_INITOK 1 << 0
+
+
+/*********************************************************************************************************************************
+*   Internal Functions                                                                                                           *
+*********************************************************************************************************************************/
+/*
+ * Character device file handlers.
+ */
+static int VBoxGuestNetBSDOpen(dev_t device, int flags, int fmt, struct lwp *process);
+static int VBoxGuestNetBSDClose(struct file *fp);
+static int VBoxGuestNetBSDIOCtl(struct file *fp, u_long cmd, void *addr);
+static int VBoxGuestNetBSDPoll(struct file *fp, int events);
+static void VBoxGuestNetBSDAttach(device_t, device_t, void*);
+static int VBoxGuestNetBSDDetach(device_t pDevice, int flags);
+
+/*
+ * IRQ related functions.
+ */
+static void VBoxGuestNetBSDRemoveIRQ(vboxguest_softc *sc);
+static int  VBoxGuestNetBSDAddIRQ(vboxguest_softc *pvState, struct pci_attach_args *pa);
+static int  VBoxGuestNetBSDISR(void *pvState);
+
+
+/*********************************************************************************************************************************
+*   Global Variables                                                                                                             *
+*********************************************************************************************************************************/
+/*
+ * The /dev/vboxguest character device entry points.
+ */
+static struct cdevsw g_VBoxGuestNetBSDChrDevSW =
+{
+    VBoxGuestNetBSDOpen,
+    noclose,
+    noread,
+    nowrite,
+    noioctl,
+    nostop,
+    notty,
+    nopoll,
+    nommap,
+    nokqfilter,
+};
+
+static const struct fileops vboxguest_fileops = {
+    .fo_read = fbadop_read,
+    .fo_write = fbadop_write,
+    .fo_ioctl = VBoxGuestNetBSDIOCtl,
+    .fo_fcntl = fnullop_fcntl,
+    .fo_poll = VBoxGuestNetBSDPoll,
+    .fo_stat = fbadop_stat,
+    .fo_close = VBoxGuestNetBSDClose,
+    .fo_kqfilter = fnullop_kqfilter,
+    .fo_restart = fnullop_restart
+};
+
+/** Device extention & session data association structure. */
+static VBOXGUESTDEVEXT      g_DevExt;
+/** Reference counter */
+static volatile uint32_t    cUsers;
+/** selinfo structure used for polling. */
+static struct selinfo       g_SelInfo;
+
+CFDRIVER_DECL(vboxguest, DV_DULL, NULL);
+extern struct cfdriver vboxguest_cd;
+
+/**
+ * File open handler
+ *
+ */
+static int VBoxGuestNetBSDOpen(dev_t device, int flags, int fmt, struct lwp *process)
+{
+    int rc;
+    vboxguest_softc *vboxguest;
+    struct vboxguest_session *session;
+    file_t *fp;
+    int fd, error;
+
+    LogFlow((DEVICE_NAME ": %s\n", __func__));
+
+    if ((vboxguest = device_lookup_private(&vboxguest_cd, minor(device))) == NULL)
+    {
+        printf("device_lookup_private failed\n");
+        return (ENXIO);
+    }
+
+    if ((vboxguest->vboxguest_state & VBOXGUEST_STATE_INITOK) == 0)
+    {
+        aprint_error_dev(vboxguest->sc_dev, "device not configured\n");
+        return (ENXIO);
+    }
+
+    session = kmem_alloc(sizeof(*session), KM_SLEEP);
+    if (session == NULL)
+    {
+        return (ENOMEM);
+    }
+
+    session->sc = vboxguest;
+
+    if ((error = fd_allocfile(&fp, &fd)) != 0)
+    {
+        kmem_free(session, sizeof(*session));
+        return error;
+    }
+
+    /*
+     * Create a new session.
+     */
+    rc = VGDrvCommonCreateUserSession(&g_DevExt, &session->session);
+    if (! RT_SUCCESS(rc))
+    {
+        aprint_error_dev(vboxguest->sc_dev, "VBox session creation failed\n");
+        closef(fp); /* ??? */
+        kmem_free(session, sizeof(*session));
+        return RTErrConvertToErrno(rc);
+    }
+    ASMAtomicIncU32(&cUsers);
+    return fd_clone(fp, fd, flags, &vboxguest_fileops, session);
+
+}
+
+/**
+ * File close handler
+ *
+ */
+static int VBoxGuestNetBSDClose(struct file *fp)
+{
+    struct vboxguest_session *session = fp->f_data;
+    vboxguest_softc *vboxguest = session->sc;
+
+    LogFlow((DEVICE_NAME ": %s\n", __func__));
+
+    VGDrvCommonCloseSession(&g_DevExt, session->session);
+    ASMAtomicDecU32(&cUsers);
+
+    kmem_free(session, sizeof(*session));
+
+    return 0;
+}
+
+/**
+ * IOCTL handler
+ *
+ */
+static int VBoxGuestNetBSDIOCtl(struct file *fp, u_long command, void *data)
+{
+    struct vboxguest_session *session = fp->f_data;
+    vboxguest_softc *vboxguest = session->sc;
+
+    int rc = 0;
+
+    LogFlow((DEVICE_NAME ": %s: command=%#lx data=%p\n",
+             __func__, command, data));
+
+    /*
+     * Validate the request wrapper.
+     */
+    if (IOCPARM_LEN(command) != sizeof(VBGLBIGREQ))
+    {
+        Log((DEVICE_NAME ": %s: bad request %#lx size=%lu expected=%zu\n",
+             __func__, command, IOCPARM_LEN(command), sizeof(VBGLBIGREQ)));
+        return ENOTTY;
+    }
+
+    PVBGLBIGREQ ReqWrap = (PVBGLBIGREQ)data;
+    if (ReqWrap->u32Magic != VBGLBIGREQ_MAGIC)
+    {
+        Log((DEVICE_NAME ": %s: bad magic %#" PRIx32 "; pArg=%p Cmd=%#lx\n",
+             __func__, ReqWrap->u32Magic, data, command));
+        return EINVAL;
+    }
+    if (RT_UNLIKELY(   ReqWrap->cbData == 0
+                    || ReqWrap->cbData > _1M*16))
+    {
+        Log((DEVICE_NAME ": %s: bad size %" PRIu32 "; pArg=%p Cmd=%#lx\n",
+             __func__, ReqWrap->cbData, data, command));
+        return EINVAL;
+    }
+
+    /*
+     * Read the request.
+     */
+    void *pvBuf = RTMemTmpAlloc(ReqWrap->cbData);
+    if (RT_UNLIKELY(!pvBuf))
+    {
+        Log((DEVICE_NAME ": %s: RTMemTmpAlloc failed to alloc %" PRIu32 " bytes.\n",
+             __func__, ReqWrap->cbData));
+        return ENOMEM;
+    }
+
+    rc = copyin((void *)(uintptr_t)ReqWrap->pvDataR3, pvBuf, ReqWrap->cbData);
+    if (RT_UNLIKELY(rc))
+    {
+        RTMemTmpFree(pvBuf);
+        Log((DEVICE_NAME ": %s: copyin failed; pvBuf=%p pArg=%p Cmd=%#lx. rc=%d\n",
+             __func__, pvBuf, data, command, rc));
+        aprint_error_dev(vboxguest->sc_dev, "copyin failed\n");
+        return EFAULT;
+    }
+    if (RT_UNLIKELY(   ReqWrap->cbData != 0
+                    && !VALID_PTR(pvBuf)))
+    {
+        RTMemTmpFree(pvBuf);
+        Log((DEVICE_NAME ": %s: invalid pvBuf=%p\n",
+             __func__, pvBuf));
+        return EINVAL;
+    }
+
+    /*
+     * Process the IOCtl.
+     */
+    size_t cbDataReturned;
+    rc = VGDrvCommonIoCtl(command, &g_DevExt, session->session, pvBuf, ReqWrap->cbData, &cbDataReturned);
+    if (RT_SUCCESS(rc))
+    {
+        rc = 0;
+        if (RT_UNLIKELY(cbDataReturned > ReqWrap->cbData))
+        {
+            Log((DEVICE_NAME ": %s: too much output data %zu expected %" PRIu32 "\n",
+                 __func__, cbDataReturned, ReqWrap->cbData));
+            cbDataReturned = ReqWrap->cbData;
+        }
+        if (cbDataReturned > 0)
+        {
+            rc = copyout(pvBuf, (void *)(uintptr_t)ReqWrap->pvDataR3, cbDataReturned);
+            if (RT_UNLIKELY(rc))
+            {
+                Log((DEVICE_NAME ": %s: copyout failed; pvBuf=%p pArg=%p. rc=%d\n",
+                     __func__, pvBuf, data, rc));
+            }
+        }
+    } else {
+        Log((DEVICE_NAME ": %s: VGDrvCommonIoCtl failed. rc=%d\n",
+             __func__, rc));
+        rc = -rc;
+    }
+    RTMemTmpFree(pvBuf);
+    return rc;
+}
+
+static int VBoxGuestNetBSDPoll(struct file *fp, int events)
+{
+    struct vboxguest_session *session = fp->f_data;
+    vboxguest_softc *vboxguest = session->sc;
+
+    int rc = 0;
+    int events_processed;
+
+    uint32_t u32CurSeq;
+
+    LogFlow((DEVICE_NAME ": %s\n", __func__));
+
+    u32CurSeq = ASMAtomicUoReadU32(&g_DevExt.u32MousePosChangedSeq);
+    if (session->session->u32MousePosChangedSeq != u32CurSeq)
+    {
+        events_processed = events & (POLLIN | POLLRDNORM);
+        session->session->u32MousePosChangedSeq = u32CurSeq;
+    }
+    else
+    {
+        events_processed = 0;
+
+        selrecord(curlwp, &g_SelInfo);
+    }
+
+    return events_processed;
+}
+
+static int VBoxGuestNetBSDDetach(device_t self, int flags)
+{
+    vboxguest_softc *vboxguest;
+    vboxguest = device_private(self);
+
+    LogFlow((DEVICE_NAME ": %s\n", __func__));
+
+    if (cUsers > 0)
+        return EBUSY;
+
+    if ((vboxguest->vboxguest_state & VBOXGUEST_STATE_INITOK) == 0)
+        return 0;
+
+    /*
+     * Reverse what we did in VBoxGuestNetBSDAttach.
+     */
+
+    VBoxGuestNetBSDRemoveIRQ(vboxguest);
+
+    VGDrvCommonDeleteDevExt(&g_DevExt);
+
+    bus_space_unmap(vboxguest->iVMMDevMemResId, vboxguest->VMMDevMemHandle, vboxguest->VMMDevMemSize);
+    bus_space_unmap(vboxguest->io_tag, vboxguest->io_handle, vboxguest->io_regsize);
+
+    RTR0Term();
+
+    return 0;
+}
+
+/**
+ * Interrupt service routine.
+ *
+ * @returns Whether the interrupt was from VMMDev.
+ * @param   pvState Opaque pointer to the device state.
+ */
+static int VBoxGuestNetBSDISR(void *pvState)
+{
+    LogFlow((DEVICE_NAME ": %s: pvState=%p\n", __func__, pvState));
+
+    bool fOurIRQ = VGDrvCommonISR(&g_DevExt);
+
+    return fOurIRQ ? 0 : 1;
+}
+
+void VGDrvNativeISRMousePollEvent(PVBOXGUESTDEVEXT pDevExt)
+{
+    LogFlow((DEVICE_NAME ": %s\n", __func__));
+
+    /*
+     * Wake up poll waiters.
+     */
+    selnotify(&g_SelInfo, 0, 0);
+}
+
+/**
+ * Sets IRQ for VMMDev.
+ *
+ * @returns NetBSD error code.
+ * @param   vboxguest  Pointer to the state info structure.
+ * @param   pa  Pointer to the PCI attach arguments.
+ */
+static int VBoxGuestNetBSDAddIRQ(vboxguest_softc *vboxguest, struct pci_attach_args *pa)
+{
+    int iResId = 0;
+    int rc = 0;
+    const char *intrstr;
+#if __NetBSD_Prereq__(6, 99, 39)
+    char intstrbuf[100];
+#endif
+
+    LogFlow((DEVICE_NAME ": %s\n", __func__));
+
+    if (pci_intr_map(pa, &vboxguest->ih))
+    {
+        aprint_error_dev(vboxguest->sc_dev, "couldn't map interrupt.\n");
+        return VERR_DEV_IO_ERROR;
+    }
+
+    intrstr = pci_intr_string(vboxguest->pc, vboxguest->ih
+#if __NetBSD_Prereq__(6, 99, 39)
+                              , intstrbuf, sizeof(intstrbuf)
+#endif
+                              );
+    aprint_normal_dev(vboxguest->sc_dev, "interrupting at %s\n", intrstr);
+
+    vboxguest->pfnIrqHandler = pci_intr_establish(vboxguest->pc, vboxguest->ih, IPL_BIO, VBoxGuestNetBSDISR, vboxguest);
+    if (vboxguest->pfnIrqHandler == NULL)
+    {
+        aprint_error_dev(vboxguest->sc_dev, "couldn't establish interrupt\n");
+        return VERR_DEV_IO_ERROR;
+    }
+
+    return VINF_SUCCESS;
+}
+
+/**
+ * Removes IRQ for VMMDev.
+ *
+ * @param   vboxguest  Opaque pointer to the state info structure.
+ */
+static void VBoxGuestNetBSDRemoveIRQ(vboxguest_softc *vboxguest)
+{
+    LogFlow((DEVICE_NAME ": %s\n", __func__));
+
+    if (vboxguest->pfnIrqHandler)
+    {
+        pci_intr_disestablish(vboxguest->pc, vboxguest->pfnIrqHandler);
+    }
+}
+
+static void VBoxGuestNetBSDAttach(device_t parent, device_t self, void *aux)
+{
+    int rc = VINF_SUCCESS;
+    int iResId = 0;
+    vboxguest_softc *vboxguest;
+    struct pci_attach_args *pa = aux;
+    bus_space_tag_t iot, memt;
+    bus_space_handle_t ioh, memh;
+    bus_dma_segment_t seg;
+    int ioh_valid, memh_valid;
+
+    cUsers = 0;
+
+    aprint_normal(": VirtualBox Guest\n");
+
+    vboxguest = device_private(self);
+    vboxguest->sc_dev = self;
+
+    /*
+     * Initialize IPRT R0 driver, which internally calls OS-specific r0 init.
+     */
+    rc = RTR0Init(0);
+    if (RT_FAILURE(rc))
+    {
+        LogFunc(("RTR0Init failed.\n"));
+        aprint_error_dev(vboxguest->sc_dev, "RTR0Init failed\n");
+        return;
+    }
+
+    vboxguest->pc = pa->pa_pc;
+
+    /*
+     * Allocate I/O port resource.
+     */
+    ioh_valid = (pci_mapreg_map(pa, PCI_MAPREG_START, PCI_MAPREG_TYPE_IO, 0, &vboxguest->io_tag, &vboxguest->io_handle, &vboxguest->uIOPortBase, &vboxguest->io_regsize) == 0);
+
+    if (ioh_valid)
+    {
+
+        /*
+         * Map the MMIO region.
+         */
+        memh_valid = (pci_mapreg_map(pa, PCI_MAPREG_START+4, PCI_MAPREG_TYPE_MEM, BUS_SPACE_MAP_LINEAR, &vboxguest->iVMMDevMemResId, &vboxguest->VMMDevMemHandle, &vboxguest->pMMIOBase, &vboxguest->VMMDevMemSize) == 0);
+        if (memh_valid)
+        {
+            /*
+             * Call the common device extension initializer.
+             */
+            rc = VGDrvCommonInitDevExt(&g_DevExt, vboxguest->uIOPortBase,
+                    bus_space_vaddr(vboxguest->iVMMDevMemResId,
+                            vboxguest->VMMDevMemHandle),
+                                       vboxguest->VMMDevMemSize,
+#if ARCH_BITS == 64
+                                       VBOXOSTYPE_NetBSD_x64,
+#else
+                                       VBOXOSTYPE_NetBSD,
+#endif
+                                       VMMDEV_EVENT_MOUSE_POSITION_CHANGED);
+            if (RT_SUCCESS(rc))
+            {
+                /*
+                 * Add IRQ of VMMDev.
+                 */
+                rc = VBoxGuestNetBSDAddIRQ(vboxguest, pa);
+                if (RT_SUCCESS(rc))
+                {
+                    vboxguest->vboxguest_state |= VBOXGUEST_STATE_INITOK;
+                    return;
+                }
+                VGDrvCommonDeleteDevExt(&g_DevExt);
+            }
+            else
+            {
+                aprint_error_dev(vboxguest->sc_dev, "init failed\n");
+            }
+            bus_space_unmap(vboxguest->iVMMDevMemResId, vboxguest->VMMDevMemHandle, vboxguest->VMMDevMemSize);
+        }
+        else
+        {
+            aprint_error_dev(vboxguest->sc_dev, "MMIO mapping failed\n");
+        }
+        bus_space_unmap(vboxguest->io_tag, vboxguest->io_handle, vboxguest->io_regsize);
+    }
+    else
+    {
+        aprint_error_dev(vboxguest->sc_dev, "IO mapping failed\n");
+    }
+
+    RTR0Term();
+    return;
+}
+
+static int
+VBoxGuestNetBSDMatch(device_t parent, cfdata_t match, void *aux)
+{
+    const struct pci_attach_args *pa = aux;
+
+    if (   PCI_VENDOR(pa->pa_id) == VMMDEV_VENDORID
+        && PCI_PRODUCT(pa->pa_id) == VMMDEV_DEVICEID)
+    {
+        return 1;
+    }
+
+    return 0;
+}
+
+/* Common code that depend on g_DevExt. */
+#include "VBoxGuestIDC-unix.c.h"
+
+CFATTACH_DECL_NEW(vboxguest, sizeof(vboxguest_softc),
+    VBoxGuestNetBSDMatch, VBoxGuestNetBSDAttach, VBoxGuestNetBSDDetach, NULL);
+
+MODULE(MODULE_CLASS_DRIVER, vboxguest, "pci");
+
+static int loc[2] = {-1, -1};
+
+static const struct cfparent pspec = {
+    "pci", "pci", DVUNIT_ANY
+};
+
+static struct cfdata vboxguest_cfdata[] = {
+    {
+        .cf_name = "vboxguest",
+        .cf_atname = "vboxguest",
+        .cf_unit = 0,           /* Only unit 0 is ever used  */
+        .cf_fstate = FSTATE_STAR,
+        .cf_loc = loc,
+        .cf_flags = 0,
+        .cf_pspec = &pspec,
+    },
+    { NULL, NULL, 0, 0, NULL, 0, NULL }
+};
+
+static int
+vboxguest_modcmd(modcmd_t cmd, void *opaque)
+{
+    devmajor_t bmajor, cmajor;
+    int error;
+    register_t retval;
+
+    LogFlow((DEVICE_NAME ": %s\n", __func__));
+
+    bmajor = cmajor = NODEVMAJOR;
+    switch (cmd)
+    {
+        case MODULE_CMD_INIT:
+            error = config_cfdriver_attach(&vboxguest_cd);
+            if (error)
+            {
+                printf("config_cfdriver_attach failed: %d", error);
+                break;
+            }
+            error = config_cfattach_attach(vboxguest_cd.cd_name, &vboxguest_ca);
+            if (error)
+            {
+                config_cfdriver_detach(&vboxguest_cd);
+                printf("%s: unable to register cfattach\n", vboxguest_cd.cd_name);
+                break;
+            }
+            error = config_cfdata_attach(vboxguest_cfdata, 1);
+            if (error)
+            {
+                printf("%s: unable to attach cfdata\n", vboxguest_cd.cd_name);
+                config_cfattach_detach(vboxguest_cd.cd_name, &vboxguest_ca);
+                config_cfdriver_detach(&vboxguest_cd);
+                break;
+            }
+
+            error = devsw_attach("vboxguest", NULL, &bmajor, &g_VBoxGuestNetBSDChrDevSW, &cmajor);
+
+            if (error == EEXIST)
+                error = 0; /* maybe built-in ... improve eventually */
+
+            if (error)
+                break;
+
+            error = do_sys_mknod(curlwp, "/dev/vboxguest", 0666|S_IFCHR, makedev(cmajor, 0), &retval, UIO_SYSSPACE);
+            if (error == EEXIST)
+                error = 0;
+            break;
+
+        case MODULE_CMD_FINI:
+            error = config_cfdata_detach(vboxguest_cfdata);
+            if (error)
+                break;
+            error = config_cfattach_detach(vboxguest_cd.cd_name, &vboxguest_ca);
+            if (error)
+                break;
+            config_cfdriver_detach(&vboxguest_cd);
+            error = devsw_detach(NULL, &g_VBoxGuestNetBSDChrDevSW);
+            break;
+
+        default:
+            return ENOTTY;
+    }
+    return error;
+}
diff --git a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-os2.cpp b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-os2.cpp
index 84d7867..e2e9a37 100644
--- a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-os2.cpp
+++ b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-os2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-os2.def b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-os2.def
index 5454a45..dd152a7 100644
--- a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-os2.def
+++ b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-os2.def
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-solaris.c b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-solaris.c
index 25d0581..51812da 100644
--- a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-solaris.c
+++ b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win-legacy.cpp b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win-legacy.cpp
index 0829755..13645be 100644
--- a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win-legacy.cpp
+++ b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win-legacy.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -55,12 +55,11 @@ RT_C_DECLS_END
  * @returns NT status code.
  *
  * @param   pDrvObj         The driver object.
- * @param   pDevObj         Unused. NULL. Dunno why it's here, makes no sense.
  * @param   pRegPath        The driver registry path.
  */
-NTSTATUS vgdrvNt4CreateDevice(PDRIVER_OBJECT pDrvObj, PDEVICE_OBJECT pDevObj, PUNICODE_STRING pRegPath)
+NTSTATUS vgdrvNt4CreateDevice(PDRIVER_OBJECT pDrvObj, PUNICODE_STRING pRegPath)
 {
-    Log(("vgdrvNt4CreateDevice: pDrvObj=%p, pDevObj=%p, pRegPath=%p\n", pDrvObj, pDevObj, pRegPath));
+    Log(("vgdrvNt4CreateDevice: pDrvObj=%p, pRegPath=%p\n", pDrvObj, pRegPath));
 
     /*
      * Find our virtual PCI device
diff --git a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win-pnp.cpp b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win-pnp.cpp
index 71dae42..d669483 100644
--- a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win-pnp.cpp
+++ b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win-pnp.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -54,6 +54,7 @@ RT_C_DECLS_END
  */
 static NTSTATUS vgdrvNtPnpIrpComplete(PDEVICE_OBJECT pDevObj, PIRP pIrp, PKEVENT pEvent)
 {
+    RT_NOREF2(pDevObj, pIrp);
     KeSetEvent(pEvent, 0, FALSE);
     return STATUS_MORE_PROCESSING_REQUIRED;
 }
@@ -392,6 +393,7 @@ NTSTATUS vgdrvNtPnP(PDEVICE_OBJECT pDevObj, PIRP pIrp)
 static NTSTATUS vgdrvNtPowerComplete(IN PDEVICE_OBJECT pDevObj, IN PIRP pIrp, IN PVOID pContext)
 {
 #ifdef VBOX_STRICT
+    RT_NOREF1(pDevObj);
     PVBOXGUESTDEVEXTWIN pDevExt = (PVBOXGUESTDEVEXTWIN)pContext;
     PIO_STACK_LOCATION  pIrpSp  = IoGetCurrentIrpStackLocation(pIrp);
 
@@ -412,13 +414,17 @@ static NTSTATUS vgdrvNtPowerComplete(IN PDEVICE_OBJECT pDevObj, IN PIRP pIrp, IN
                             {
                                 case PowerDeviceD0:
                                     break;
+                                default: /* Shut up MSC */ break;
                             }
                             break;
+                        default: /* Shut up MSC */ break;
                     }
                     break;
             }
         }
     }
+#else
+    RT_NOREF3(pDevObj, pIrp, pContext);
 #endif
 
     return STATUS_SUCCESS;
@@ -531,6 +537,14 @@ NTSTATUS vgdrvNtPower(PDEVICE_OBJECT pDevObj, PIRP pIrp)
 
                             Log(("vgdrvNtPower: Power action hibernate!\n"));
                             break;
+
+                        case PowerActionWarmEject:
+                            Log(("vgdrvNtPower: PowerActionWarmEject!\n"));
+                            break;
+
+                        default:
+                            Log(("vgdrvNtPower: %d\n", enmPowerAction));
+                            break;
                     }
 
                     /*
diff --git a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.cpp b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.cpp
index d8fb089..02527b3 100644
--- a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.cpp
+++ b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -101,6 +101,7 @@ VGDRVNTVER g_enmVGDrvNtVer = VGDRVNTVER_INVALID;
  */
 ULONG DriverEntry(PDRIVER_OBJECT pDrvObj, PUNICODE_STRING pRegPath)
 {
+    RT_NOREF1(pRegPath);
     NTSTATUS rc = STATUS_SUCCESS;
 
     LogFunc(("Driver built: %s %s\n", __DATE__, __TIME__));
@@ -207,7 +208,7 @@ ULONG DriverEntry(PDRIVER_OBJECT pDrvObj, PUNICODE_STRING pRegPath)
         pDrvObj->MajorFunction[IRP_MJ_READ]                    = vgdrvNtNotSupportedStub;
         pDrvObj->MajorFunction[IRP_MJ_WRITE]                   = vgdrvNtNotSupportedStub;
 #ifdef TARGET_NT4
-        rc = vgdrvNt4CreateDevice(pDrvObj, NULL /* pDevObj */, pRegPath);
+        rc = vgdrvNt4CreateDevice(pDrvObj, pRegPath);
 #else
         pDrvObj->MajorFunction[IRP_MJ_PNP]                     = vgdrvNtPnP;
         pDrvObj->MajorFunction[IRP_MJ_POWER]                   = vgdrvNtPower;
@@ -466,8 +467,8 @@ NTSTATUS vgdrvNtInit(PDRIVER_OBJECT pDrvObj, PDEVICE_OBJECT pDevObj, PUNICODE_ST
 
         IoInitializeDpcRequest(pDevExt->pDeviceObject, vgdrvNtDpcHandler);
 #ifdef TARGET_NT4
-        ULONG uInterruptVector;
-        KIRQL irqLevel;
+        ULONG uInterruptVector = UINT32_MAX;
+        KIRQL irqLevel = UINT8_MAX;
         /* Get an interrupt vector. */
         /* Only proceed if the device provides an interrupt. */
         if (   pDevExt->interruptLevel
@@ -620,13 +621,14 @@ static void vgdrvNtUnload(PDRIVER_OBJECT pDrvObj)
      */
     UNICODE_STRING DosName;
     RtlInitUnicodeString(&DosName, VBOXGUEST_DEVICE_NAME_DOS);
-    NTSTATUS rc = IoDeleteSymbolicLink(&DosName);
+    IoDeleteSymbolicLink(&DosName);
 
     IoDeleteDevice(pDrvObj->DeviceObject);
 #else  /* !TARGET_NT4 */
     /* On a PnP driver this routine will be called after
      * IRP_MN_REMOVE_DEVICE (where we already did the cleanup),
      * so don't do anything here (yet). */
+    RT_NOREF1(pDrvObj);
 #endif /* !TARGET_NT4 */
 
     LogFlowFunc(("Returning\n"));
@@ -912,7 +914,6 @@ static NTSTATUS vgdrvNtSystemControl(PDEVICE_OBJECT pDevObj, PIRP pIrp)
 static NTSTATUS vgdrvNtShutdown(PDEVICE_OBJECT pDevObj, PIRP pIrp)
 {
     PVBOXGUESTDEVEXTWIN pDevExt = (PVBOXGUESTDEVEXTWIN)pDevObj->DeviceExtension;
-
     LogFlowFuncEnter();
 
     VMMDevPowerStateRequest *pReq = pDevExt->pPowerStateRequest;
@@ -926,6 +927,10 @@ static NTSTATUS vgdrvNtShutdown(PDEVICE_OBJECT pDevObj, PIRP pIrp)
             LogFunc(("Error performing request to VMMDev, rc=%Rrc\n", rc));
     }
 
+    /* just in case, since we shouldn't normally get here. */
+    pIrp->IoStatus.Information = 0;
+    pIrp->IoStatus.Status = STATUS_SUCCESS;
+    IoCompleteRequest(pIrp, IO_NO_INCREMENT);
     return STATUS_SUCCESS;
 }
 
@@ -939,6 +944,7 @@ static NTSTATUS vgdrvNtShutdown(PDEVICE_OBJECT pDevObj, PIRP pIrp)
  */
 static NTSTATUS vgdrvNtNotSupportedStub(PDEVICE_OBJECT pDevObj, PIRP pIrp)
 {
+    RT_NOREF1(pDevObj);
     LogFlowFuncEnter();
 
     pIrp->IoStatus.Information = 0;
@@ -959,6 +965,7 @@ static NTSTATUS vgdrvNtNotSupportedStub(PDEVICE_OBJECT pDevObj, PIRP pIrp)
  */
 static void vgdrvNtDpcHandler(PKDPC pDPC, PDEVICE_OBJECT pDevObj, PIRP pIrp, PVOID pContext)
 {
+    RT_NOREF3(pDPC, pIrp, pContext);
     PVBOXGUESTDEVEXTWIN pDevExt = (PVBOXGUESTDEVEXTWIN)pDevObj->DeviceExtension;
     Log3Func(("pDevExt=0x%p\n", pDevExt));
 
@@ -991,6 +998,7 @@ static void vgdrvNtDpcHandler(PKDPC pDPC, PDEVICE_OBJECT pDevObj, PIRP pIrp, PVO
  */
 static BOOLEAN vgdrvNtIsrHandler(PKINTERRUPT pInterrupt, PVOID pServiceContext)
 {
+    RT_NOREF1(pInterrupt);
     PVBOXGUESTDEVEXTWIN pDevExt = (PVBOXGUESTDEVEXTWIN)pServiceContext;
     if (pDevExt == NULL)
         return FALSE;
diff --git a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.h b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.h
index 991d0a7..fbd13a4 100644
--- a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.h
+++ b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -21,15 +21,7 @@
 
 #include <iprt/cdefs.h>
 
-RT_C_DECLS_BEGIN
-#ifdef RT_ARCH_X86
-# define _InterlockedAddLargeStatistic  _InterlockedAddLargeStatistic_StupidDDKVsCompilerCrap
-#endif
-#include <ntddk.h>
-#ifdef RT_ARCH_X86
-# undef _InterlockedAddLargeStatistic
-#endif
-RT_C_DECLS_END
+#include <iprt/nt/ntddk.h>
 
 #include <iprt/spinlock.h>
 #include <iprt/memobj.h>
@@ -155,7 +147,7 @@ extern VGDRVNTVER g_enmVGDrvNtVer;
 RT_C_DECLS_BEGIN
 
 #ifdef TARGET_NT4
-NTSTATUS   vgdrvNt4CreateDevice(PDRIVER_OBJECT pDrvObj, PDEVICE_OBJECT pDevObj, PUNICODE_STRING pRegPath);
+NTSTATUS   vgdrvNt4CreateDevice(PDRIVER_OBJECT pDrvObj, PUNICODE_STRING pRegPath);
 #else
 NTSTATUS   vgdrvNtPnP(PDEVICE_OBJECT pDevObj, PIRP pIrp);
 NTSTATUS   vgdrvNtPower(PDEVICE_OBJECT pDevObj, PIRP pIrp);
diff --git a/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp b/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp
index 33d54c0..fee3729 100644
--- a/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp
+++ b/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -73,7 +73,7 @@
 #endif
 #ifdef RT_OS_WINDOWS
 # ifndef CTL_CODE
-#  include <Windows.h>
+#  include <iprt/win/windows.h>
 # endif
 #endif
 #if defined(RT_OS_SOLARIS) || defined(RT_OS_DARWIN)
@@ -616,9 +616,10 @@ static int vgdrvSetBalloonSizeKernel(PVBOXGUESTDEVEXT pDevExt, uint32_t cBalloon
 static int vgdrvSetBalloonSizeFromUser(PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession, uint64_t u64ChunkAddr, bool fInflate)
 {
     VMMDevChangeMemBalloon *pReq;
+    PRTR0MEMOBJ pMemObj = NULL;
     int rc = VINF_SUCCESS;
     uint32_t i;
-    PRTR0MEMOBJ pMemObj = NULL;
+    RT_NOREF1(pSession);
 
     if (fInflate)
     {
@@ -918,6 +919,7 @@ int VGDrvCommonReinitDevExtAfterHibernation(PVBOXGUESTDEVEXT pDevExt, VBOXOSTYPE
     else
         Log(("VGDrvCommonReinitDevExtAfterHibernation: could not report guest information to host, rc=%Rrc\n", rc));
     LogFlow(("VGDrvCommonReinitDevExtAfterHibernation: returned with rc=%Rrc\n", rc));
+    RT_NOREF1(pDevExt);
     return rc;
 }
 
@@ -1782,6 +1784,8 @@ static int vgdrvCheckIfVmmReqIsAllowed(PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSI
     {
         kLevel_Invalid, kLevel_NoOne, kLevel_OnlyVBoxGuest, kLevel_OnlyKernel, kLevel_TrustedUsers, kLevel_AllUsers
     } enmRequired;
+    RT_NOREF1(pDevExt);
+
     switch (enmType)
     {
         /*
@@ -2431,6 +2435,7 @@ static int vgdrvIoCtl_WriteCoreDump(PVBOXGUESTDEVEXT pDevExt, VBoxGuestWriteCore
     VMMDevReqWriteCoreDump *pReq = NULL;
     int rc;
     LogFlow(("VBOXGUEST_IOCTL_WRITE_CORE_DUMP\n"));
+    RT_NOREF1(pDevExt);
 
     rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, sizeof(*pReq), VMMDevReq_WriteCoreDump);
     if (RT_SUCCESS(rc))
@@ -2600,6 +2605,7 @@ static int vgdrvResetEventFilterOnHost(PVBOXGUESTDEVEXT pDevExt, uint32_t fFixed
             LogRelFunc(("failed with rc=%Rrc\n", rc));
         VbglGRFree(&pReq->header);
     }
+    RT_NOREF1(pDevExt);
     return rc;
 }
 
@@ -2749,6 +2755,7 @@ static int vgdrvResetMouseStatusOnHost(PVBOXGUESTDEVEXT pDevExt)
             LogRelFunc(("failed with rc=%Rrc\n", rc));
         VbglGRFree(&pReq->header);
     }
+    RT_NOREF1(pDevExt);
     return rc;
 }
 
@@ -2946,6 +2953,7 @@ static int vgdrvResetCapabilitiesOnHost(PVBOXGUESTDEVEXT pDevExt)
             LogRelFunc(("failed with rc=%Rrc\n", rc));
         VbglGRFree(&pReq->header);
     }
+    RT_NOREF1(pDevExt);
     return rc;
 }
 
diff --git a/src/VBox/Additions/common/VBoxGuest/VBoxGuestA-os2.asm b/src/VBox/Additions/common/VBoxGuest/VBoxGuestA-os2.asm
index 7e4931b..eaeeb32 100644
--- a/src/VBox/Additions/common/VBoxGuest/VBoxGuestA-os2.asm
+++ b/src/VBox/Additions/common/VBoxGuest/VBoxGuestA-os2.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuest/VBoxGuestIDC-unix.c.h b/src/VBox/Additions/common/VBoxGuest/VBoxGuestIDC-unix.c.h
index 163b8c7..613c2f6 100644
--- a/src/VBox/Additions/common/VBoxGuest/VBoxGuestIDC-unix.c.h
+++ b/src/VBox/Additions/common/VBoxGuest/VBoxGuestIDC-unix.c.h
@@ -1,4 +1,4 @@
-/* $Rev: 103208 $ */
+/* $Rev: 109079 $ */
 /** @file
  * VBoxGuest - Inter Driver Communication, unix implementation.
  *
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuest/VBoxGuestInternal.h b/src/VBox/Additions/common/VBoxGuest/VBoxGuestInternal.h
index bdbfb5a..9807872 100644
--- a/src/VBox/Additions/common/VBoxGuest/VBoxGuestInternal.h
+++ b/src/VBox/Additions/common/VBoxGuest/VBoxGuestInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuest/solaris/deps.asm b/src/VBox/Additions/common/VBoxGuest/solaris/deps.asm
index 080460d..b29845a 100644
--- a/src/VBox/Additions/common/VBoxGuest/solaris/deps.asm
+++ b/src/VBox/Additions/common/VBoxGuest/solaris/deps.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2012-2015 Oracle Corporation
+; Copyright (C) 2012-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuest/win/VBoxGuest.inf b/src/VBox/Additions/common/VBoxGuest/win/VBoxGuest.inf
index 798084c..dbd35ca 100644
--- a/src/VBox/Additions/common/VBoxGuest/win/VBoxGuest.inf
+++ b/src/VBox/Additions/common/VBoxGuest/win/VBoxGuest.inf
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuest/win/VBoxGuest.rc b/src/VBox/Additions/common/VBoxGuest/win/VBoxGuest.rc
index c19af3d..0d3a618 100644
--- a/src/VBox/Additions/common/VBoxGuest/win/VBoxGuest.rc
+++ b/src/VBox/Additions/common/VBoxGuest/win/VBoxGuest.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuest/win/VBoxGuestInst.cpp b/src/VBox/Additions/common/VBoxGuest/win/VBoxGuestInst.cpp
index 240a057..be764ef 100644
--- a/src/VBox/Additions/common/VBoxGuest/win/VBoxGuestInst.cpp
+++ b/src/VBox/Additions/common/VBoxGuest/win/VBoxGuestInst.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -19,7 +19,7 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
-#include <windows.h>
+#include <iprt/win/windows.h>
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/src/VBox/Additions/common/VBoxGuestLib/GenericRequest.cpp b/src/VBox/Additions/common/VBoxGuestLib/GenericRequest.cpp
index 72359ed..22397fd 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/GenericRequest.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/GenericRequest.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuestLib/HGCM.cpp b/src/VBox/Additions/common/VBoxGuestLib/HGCM.cpp
index 4638758..ba6fdd1 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/HGCM.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/HGCM.cpp
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuestLib/HGCMInternal.cpp b/src/VBox/Additions/common/VBoxGuestLib/HGCMInternal.cpp
index e6fd783..8995206 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/HGCMInternal.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/HGCMInternal.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -489,7 +489,10 @@ static void vbglR0HGCMInternalInitCall(VMMDevHGCMCall *pHGCMCall, VBoxGuestHGCMC
     uint32_t    offExtra = (uint32_t)((uintptr_t)(pDstParm + cParms) - (uintptr_t)pHGCMCall);
     uint32_t    iLockBuf = 0;
     uint32_t    iParm;
-
+    RT_NOREF1(cbCallInfo);
+#ifndef USE_BOUNCE_BUFFERS
+    RT_NOREF1(fIsUser);
+#endif
 
     /*
      * The call request headers.
@@ -768,6 +771,10 @@ static int vbglR0HGCMInternalCopyBackResult(VBoxGuestHGCMCallInfo *pCallInfo, VM
     uint32_t    iLockBuf = 0;
 #endif
     uint32_t    iParm;
+    RT_NOREF1(pParmInfo);
+#ifndef USE_BOUNCE_BUFFERS
+    RT_NOREF1(fIsUser);
+#endif
 
     /*
      * The call result.
diff --git a/src/VBox/Additions/common/VBoxGuestLib/Init.cpp b/src/VBox/Additions/common/VBoxGuestLib/Init.cpp
index f7ffb3f..e8c985e 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/Init.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/Init.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk b/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk
index 0fde584..e4fca3c 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk
+++ b/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -93,7 +93,11 @@ VBoxGuestR0LibBase_SOURCES  = \
 #
 # VBoxGuestR3Lib
 #
+if "$(KBUILD_TARGET)" == "win" || defined(VBOX_WITH_MASOCHISTIC_WARNINGS) ## @todo use VBoxGuestR3Lib everywhere
+VBoxGuestR3Lib_TEMPLATE    = VBoxGuestR3Lib
+else
 VBoxGuestR3Lib_TEMPLATE    = VBOXGUESTR3LIB
+endif
 VBoxGuestR3Lib_DEFS        = \
 	VBOX_WITH_HGCM \
 	$(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS,) \
@@ -152,7 +156,11 @@ VBoxGuestR3LibAdditions.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
 #
 # VBoxGuestR3LibShared - a PIC variant of VBoxGuestR3Lib for linking into .so/.dll/.dylib.
 #
+if "$(KBUILD_TARGET)" == "win" || defined(VBOX_WITH_MASOCHISTIC_WARNINGS) ## @todo use VBoxGuestR3Lib everywhere
+VBoxGuestR3LibShared_TEMPLATE = VBoxGuestR3Dll
+else
 VBoxGuestR3LibShared_TEMPLATE = VBOXGUESTR3DLL
+endif
 VBoxGuestR3LibShared_DEFS    := $(VBoxGuestR3Lib_DEFS)
 VBoxGuestR3LibShared_SOURCES := $(VBoxGuestR3Lib_SOURCES)
 VBoxGuestR3LibShared_INST    := $(INST_ADDITIONS_LIB)
diff --git a/src/VBox/Additions/common/VBoxGuestLib/Mouse.cpp b/src/VBox/Additions/common/VBoxGuestLib/Mouse.cpp
index 315dd41..7d8e3a2 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/Mouse.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/Mouse.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuestLib/PhysHeap.cpp b/src/VBox/Additions/common/VBoxGuestLib/PhysHeap.cpp
index fc5e99e..7ba42a4 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/PhysHeap.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/PhysHeap.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuestLib/SysHlp.cpp b/src/VBox/Additions/common/VBoxGuestLib/SysHlp.cpp
index 0004773..1485af2 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/SysHlp.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/SysHlp.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -84,6 +84,7 @@ int vbglLockLinear(void **ppvCtx, void *pv, uint32_t u32Size, bool fWriteAccess,
     {
         __try {
             /* Calls to MmProbeAndLockPages must be enclosed in a try/except block. */
+            RT_NOREF1(fFlags);  /** @todo fFlags on windows */
             MmProbeAndLockPages(pMdl,
                                 /** @todo (fFlags & VBGLR0_HGCMCALL_F_MODE_MASK) == VBGLR0_HGCMCALL_F_USER? UserMode: KernelMode */
                                 KernelMode,
@@ -231,6 +232,7 @@ int vbglDriverOpen(VBGLDRIVER *pDriver)
 # ifdef RT_OS_WINDOWS
 static NTSTATUS vbglDriverIOCtlCompletion(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PVOID Context)
 {
+    RT_NOREF2(DeviceObject, Irp);
     Log(("VBGL completion %x\n", Irp));
 
     KEVENT *pEvent = (KEVENT *)Context;
diff --git a/src/VBox/Additions/common/VBoxGuestLib/SysHlp.h b/src/VBox/Additions/common/VBoxGuestLib/SysHlp.h
index ee554ff..3d0d444 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/SysHlp.h
+++ b/src/VBox/Additions/common/VBoxGuestLib/SysHlp.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -32,26 +32,7 @@
 #ifdef RT_OS_WINDOWS
 # undef PAGE_SIZE
 # undef PAGE_SHIFT
-# if (_MSC_VER >= 1400) && !defined(VBOX_WITH_PATCHED_DDK)
-#  include <iprt/asm.h>
-#  define _InterlockedExchange           _InterlockedExchange_StupidDDKVsCompilerCrap
-#  define _InterlockedExchangeAdd        _InterlockedExchangeAdd_StupidDDKVsCompilerCrap
-#  define _InterlockedCompareExchange    _InterlockedCompareExchange_StupidDDKVsCompilerCrap
-#  define _InterlockedAddLargeStatistic  _InterlockedAddLargeStatistic_StupidDDKVsCompilerCrap
-#  pragma warning(disable : 4163)
-RT_C_DECLS_BEGIN
-#  include <ntddk.h>
-RT_C_DECLS_END
-#  pragma warning(default : 4163)
-#  undef  _InterlockedExchange
-#  undef  _InterlockedExchangeAdd
-#  undef  _InterlockedCompareExchange
-#  undef  _InterlockedAddLargeStatistic
-# else
-RT_C_DECLS_BEGIN
-#  include <ntddk.h>
-RT_C_DECLS_END
-# endif
+# include <iprt/nt/ntddk.h>
 /* XP DDK #defines ExFreePool to ExFreePoolWithTag. The latter does not exist on NT4, so...
  * The same for ExAllocatePool.
  */
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBGLInternal.h b/src/VBox/Additions/common/VBoxGuestLib/VBGLInternal.h
index e4233fb..14208f6 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBGLInternal.h
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBGLInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -46,8 +46,6 @@
 
 #include "SysHlp.h"
 
-#pragma pack(4) /** @todo r=bird: What do we need packing for here? None of these structures are shared between drivers AFAIK. */
-
 struct _VBGLPHYSHEAPBLOCK;
 typedef struct _VBGLPHYSHEAPBLOCK VBGLPHYSHEAPBLOCK;
 struct _VBGLPHYSHEAPCHUNK;
@@ -124,8 +122,6 @@ typedef struct VBGLDATA
 } VBGLDATA;
 
 
-#pragma pack()
-
 #ifndef VBGL_DECL_DATA
 extern VBGLDATA g_vbgldata;
 #endif
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBGLR3Internal.h b/src/VBox/Additions/common/VBoxGuestLib/VBGLR3Internal.h
index 62f752b..02e771b 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBGLR3Internal.h
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBGLR3Internal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -28,7 +28,7 @@
 #define ___VBGLR3Internal_h
 
 #if defined(RT_OS_WINDOWS) /** @todo explain why this is here. */
-# include <Windows.h>
+# include <iprt/win/windows.h>
 #endif
 #include <VBox/VMMDev.h>
 #include <VBox/VBoxGuest.h>
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestLog.h b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestLog.h
index db2a5cd..26feeb7 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestLog.h
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestLog.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR0LibCrOgl.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR0LibCrOgl.cpp
index b0a0529..3296ffd 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR0LibCrOgl.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR0LibCrOgl.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR0LibSharedFolders.c b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR0LibSharedFolders.c
index b05fb92..26fcb2b 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR0LibSharedFolders.c
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR0LibSharedFolders.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -75,7 +75,11 @@ DECLVBGL(int) VbglR0SfConnect(PVBGLSFCLIENT pClient)
     RT_ZERO(data);
     data.result   = VINF_SUCCESS;
     data.Loc.type = VMMDevHGCMLoc_LocalHost_Existing;
-    strcpy (data.Loc.u.host.achName, "VBoxSharedFolders");
+#if defined(RT_OS_LINUX)
+    strcpy(data.Loc.u.host.achName, "VBoxSharedFolders");
+#else
+    RTStrCopy(data.Loc.u.host.achName, sizeof(data.Loc.u.host.achName), "VBoxSharedFolders");
+#endif
 
     rc = VbglHGCMConnect(&pClient->handle, &data);
 /*    Log(("VBOXSF: VbglR0SfConnect: VbglHGCMConnect rc = %#x, result = %#x\n", rc, data.result)); */
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3Lib.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3Lib.cpp
index ff0b1ee..9510688 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3Lib.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3Lib.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #if defined(RT_OS_WINDOWS)
-# include <Windows.h>
+# include <iprt/win/windows.h>
 
 #elif defined(RT_OS_OS2)
 # define INCL_BASE
@@ -40,10 +40,12 @@
    || defined(RT_OS_FREEBSD) \
    || defined(RT_OS_HAIKU) \
    || defined(RT_OS_LINUX) \
+   || defined(RT_OS_NETBSD) \
    || defined(RT_OS_SOLARIS)
 # include <sys/types.h>
 # include <sys/stat.h>
-# if defined(RT_OS_DARWIN) || defined(RT_OS_LINUX) /** @todo check this on solaris+freebsd as well. */
+# if defined(RT_OS_DARWIN) || defined(RT_OS_LINUX) || defined(RT_OS_NETBSD)
+   /** @todo check this on solaris+freebsd as well. */
 #  include <sys/ioctl.h>
 # endif
 # if defined(RT_OS_DARWIN)
@@ -252,7 +254,7 @@ static int vbglR3Init(const char *pszDeviceName)
 
 #else
 
-    /* The default implementation. (linux, solaris, freebsd, haiku) */
+    /* The default implementation. (linux, solaris, freebsd, netbsd, haiku) */
     RTFILE File;
     int rc = RTFileOpen(&File, pszDeviceName, RTFILE_O_READWRITE | RTFILE_O_OPEN | RTFILE_O_DENY_NONE);
     if (RT_FAILURE(rc))
@@ -329,7 +331,7 @@ VBGLR3DECL(void) VbglR3Term(void)
     g_uConnection = 0;
     g_File        = NIL_RTFILE;
     kern_return_t kr = IOServiceClose(uConnection);
-    AssertMsg(kr == kIOReturnSuccess, ("%#x (%d)\n", kr, kr));
+    AssertMsg(kr == kIOReturnSuccess, ("%#x (%d)\n", kr, kr)); NOREF(kr);
     int rc = RTFileClose(hFile);
     AssertRC(rc);
 
@@ -394,7 +396,7 @@ int vbglR3DoIOCtl(unsigned iFunction, void *pvData, size_t cbData)
     return RTErrConvertFromOS2(rc);
 
 #else
-# if defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD)
+# if defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) || defined(RT_OS_NETBSD)
     VBGLBIGREQ Hdr;
     Hdr.u32Magic = VBGLBIGREQ_MAGIC;
     Hdr.cbData = cbData;
@@ -413,7 +415,7 @@ int vbglR3DoIOCtl(unsigned iFunction, void *pvData, size_t cbData)
     NOREF(cbData);
 # endif
 
-# if defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) || defined(RT_OS_DARWIN) || defined(RT_OS_LINUX)
+# if defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) || defined(RT_OS_NETBSD) || defined(RT_OS_DARWIN) || defined(RT_OS_LINUX)
 #  ifdef VBOX_VBGLR3_XSERVER
     int rc = xf86ioctl((int)g_File, iFunction, pvData);
 #  else
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibAdditions.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibAdditions.cpp
index 4837f6e..61f46e5 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibAdditions.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibAdditions.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -316,6 +316,7 @@ VBGLR3DECL(int) VbglR3GetAdditionsInstallationPath(char **ppszPath)
 #else
     /** @todo implement me */
     rc = VERR_NOT_IMPLEMENTED;
+    RT_NOREF1(ppszPath);
 #endif
     return rc;
 }
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibAutoLogon.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibAutoLogon.cpp
index 923fe7f..46685ee 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibAutoLogon.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibAutoLogon.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -30,7 +30,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #ifdef RT_OS_WINDOWS
-# include <Windows.h>
+# include <iprt/win/windows.h>
 #endif
 
 #include "VBGLR3Internal.h"
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibBalloon.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibBalloon.cpp
index e35cd5a..0d58340 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibBalloon.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibBalloon.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibClipboard.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibClipboard.cpp
index 557d0f7..b03a01c 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibClipboard.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibClipboard.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibCoreDump.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibCoreDump.cpp
index b38bf97..0fcf557 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibCoreDump.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibCoreDump.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibCpuHotPlug.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibCpuHotPlug.cpp
index 491bda3..f940ed0 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibCpuHotPlug.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibCpuHotPlug.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibCredentials.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibCredentials.cpp
index c3a937e..ddfcd7c 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibCredentials.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibCredentials.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibDaemonize.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibDaemonize.cpp
index 808e76b..ff0ded3 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibDaemonize.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibDaemonize.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -199,7 +199,10 @@ VBGLR3DECL(int) VbglR3Daemonize(bool fNoChDir, bool fNoClose, bool fRespawn, uns
     }
 
     if (!fNoChDir)
-        chdir("/");
+    {
+        int rcShutUpGcc = chdir("/");
+        RT_NOREF_PV(rcShutUpGcc);
+    }
 
     /*
      * Change the umask - this is non-standard daemon() behavior.
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibDragAndDrop.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibDragAndDrop.cpp
index ab55e14..1493e2f 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibDragAndDrop.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibDragAndDrop.cpp
@@ -51,14 +51,16 @@ using namespace DragAndDropSvc;
 
 #include "VBGLR3Internal.h"
 
+
 /*********************************************************************************************************************************
-*    Forward declarations                                                                                                        *
+*   Forward declarations                                                                                                         *
 *********************************************************************************************************************************/
 
 VBGLR3DECL(int) VbglR3DnDHGSendProgress(PVBGLR3GUESTDNDCMDCTX pCtx, uint32_t uStatus, uint8_t uPercent, int rcErr);
 
+
 /*********************************************************************************************************************************
-*    Private internal functions                                                                                                  *
+*   Private internal functions                                                                                                   *
 *********************************************************************************************************************************/
 
 static int vbglR3DnDGetNextMsgType(PVBGLR3GUESTDNDCMDCTX pCtx, uint32_t *puMsg, uint32_t *pcParms, bool fWait)
@@ -767,13 +769,11 @@ static int vbglR3DnDHGRecvURIData(PVBGLR3GUESTDNDCMDCTX pCtx, PVBOXDNDSNDDATAHDR
 static int vbglR3DnDHGRecvDataRaw(PVBGLR3GUESTDNDCMDCTX pCtx, PVBOXDNDSNDDATAHDR pDataHdr,
                                   void *pvData, uint32_t cbData, uint32_t *pcbDataRecv)
 {
-    AssertPtrReturn(pCtx,     VERR_INVALID_POINTER);
-    AssertPtrReturn(pDataHdr, VERR_INVALID_POINTER);
-    AssertPtrReturn(pvData,   VERR_INVALID_POINTER);
-    AssertReturn(cbData,      VERR_INVALID_PARAMETER);
-    /* pcbDataRecv is optional. */
-
-    int rc;
+    AssertPtrReturn(pCtx,            VERR_INVALID_POINTER);
+    AssertPtrReturn(pDataHdr,        VERR_INVALID_POINTER);
+    AssertPtrReturn(pvData,          VERR_INVALID_POINTER);
+    AssertReturn(cbData,             VERR_INVALID_PARAMETER);
+    AssertPtrNullReturn(pcbDataRecv, VERR_INVALID_POINTER);
 
     LogFlowFunc(("pvDate=%p, cbData=%RU32\n", pvData, cbData));
 
@@ -783,90 +783,102 @@ static int vbglR3DnDHGRecvDataRaw(PVBGLR3GUESTDNDCMDCTX pCtx, PVBOXDNDSNDDATAHDR
     Msg.hdr.u32ClientID = pCtx->uClientID;
     Msg.hdr.u32Function = HOST_DND_HG_SND_DATA;
 
-    do
+    int rc;
+    if (pCtx->uProtocol < 3)
     {
-        uint32_t cbDataRecv;
-
-        if (pCtx->uProtocol < 3)
-        {
-            Msg.hdr.cParms  = 5;
+        Msg.hdr.cParms  = 5;
 
-            Msg.u.v1.uScreenId.SetUInt32(0);
-            Msg.u.v1.pvFormat.SetPtr(pDataHdr->pvMetaFmt, pDataHdr->cbMetaFmt);
-            Msg.u.v1.cbFormat.SetUInt32(0);
-            Msg.u.v1.pvData.SetPtr(pvData, cbData);
-            Msg.u.v1.cbData.SetUInt32(0);
+        Msg.u.v1.uScreenId.SetUInt32(0);
+        Msg.u.v1.pvFormat.SetPtr(pDataHdr->pvMetaFmt, pDataHdr->cbMetaFmt);
+        Msg.u.v1.cbFormat.SetUInt32(0);
+        Msg.u.v1.pvData.SetPtr(pvData, cbData);
+        Msg.u.v1.cbData.SetUInt32(0);
 
-            rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
-            if (RT_SUCCESS(rc))
+        rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
+        if (RT_SUCCESS(rc))
+        {
+            rc = Msg.hdr.result;
+            if (   RT_SUCCESS(rc)
+                || rc == VERR_BUFFER_OVERFLOW)
             {
-                rc = Msg.hdr.result;
-                if (   RT_SUCCESS(rc)
-                    || rc == VERR_BUFFER_OVERFLOW)
+                /** @todo r=bird: The VERR_BUFFER_OVERFLOW case is probably broken as the
+                 *        status isn't returned to the caller (vbglR3DnDHGRecvDataLoop).
+                 *        This was the case before fixing the uninitalized variable.  As
+                 *        other V0-2 protocol functions have been marked deprecated, it's
+                 *        probably a good idea to just remove this code and tell the 1-2 users
+                 *        to upgrade the host instead.  Unused and untested weird code like this
+                 *        is just hard+costly to maintain and liability.
+                 *        (VERR_BUFFER_OVERFLOW == weird, no disrespect intended) */
+
+                /* Unmarshal the whole message first. */
+                rc = Msg.u.v1.uScreenId.GetUInt32(&pDataHdr->uScreenId);
+                AssertRC(rc);
+                if (RT_SUCCESS(rc))
                 {
-                    rc = Msg.u.v1.uScreenId.GetUInt32(&pDataHdr->uScreenId);
-                    AssertRC(rc);
-
-                    /*
-                     * In case of VERR_BUFFER_OVERFLOW get the data sizes required
-                     * for the format + data blocks.
-                     */
                     uint32_t cbFormatRecv;
                     rc = Msg.u.v1.cbFormat.GetUInt32(&cbFormatRecv);
                     AssertRC(rc);
-                    if (cbFormatRecv >= pDataHdr->cbMetaFmt)
-                    {
-                        rc = VERR_TOO_MUCH_DATA;
-                        break;
-                    }
-
-                    rc = Msg.u.v1.cbData.GetUInt32(&cbDataRecv);
-                    AssertRC(rc);
-                    if (cbDataRecv >= pDataHdr->cbMeta)
+                    if (RT_SUCCESS(rc))
                     {
-                        rc = VERR_TOO_MUCH_DATA;
-                        break;
+                        uint32_t cbDataRecv;
+                        rc = Msg.u.v1.cbData.GetUInt32(&cbDataRecv);
+                        AssertRC(rc);
+                        if (RT_SUCCESS(rc))
+                        {
+                            /*
+                             * In case of VERR_BUFFER_OVERFLOW get the data sizes required
+                             * for the format + data blocks.
+                             */
+                            if (   cbFormatRecv >= pDataHdr->cbMetaFmt
+                                || cbDataRecv   >= pDataHdr->cbMeta)
+                                rc = VERR_TOO_MUCH_DATA;
+                            else
+                            {
+                                pDataHdr->cbMetaFmt = cbFormatRecv;
+                                if (pcbDataRecv)
+                                    *pcbDataRecv = cbDataRecv;
+                                LogFlowFuncLeaveRC(rc);
+                                return rc;
+                            }
+                        }
                     }
-
-                    pDataHdr->cbMetaFmt = cbFormatRecv;
                 }
             }
-
-            if (RT_FAILURE(rc))
-                break;
         }
-        else /* Protocol v3 and up. */
-        {
-            Msg.hdr.cParms = 5;
+    }
+    else /* Protocol v3 and up. */
+    {
+        Msg.hdr.cParms = 5;
 
-            Msg.u.v3.uContext.SetUInt32(0);
-            Msg.u.v3.pvData.SetPtr(pvData, cbData);
-            Msg.u.v3.cbData.SetUInt32(0);
-            Msg.u.v3.pvChecksum.SetPtr(NULL, 0);
-            Msg.u.v3.cbChecksum.SetUInt32(0);
+        Msg.u.v3.uContext.SetUInt32(0);
+        Msg.u.v3.pvData.SetPtr(pvData, cbData);
+        Msg.u.v3.cbData.SetUInt32(0);
+        Msg.u.v3.pvChecksum.SetPtr(NULL, 0);
+        Msg.u.v3.cbChecksum.SetUInt32(0);
 
-            rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
+        rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
+        if (RT_SUCCESS(rc))
+        {
+            rc = Msg.hdr.result;
             if (RT_SUCCESS(rc))
             {
-                rc = Msg.hdr.result;
+                uint32_t cbDataRecv;
+                rc = Msg.u.v3.cbData.GetUInt32(&cbDataRecv);
+                AssertRC(rc);
                 if (RT_SUCCESS(rc))
                 {
-                    rc = Msg.u.v3.cbData.GetUInt32(&cbDataRecv);
-                    AssertRC(rc);
+                    /** @todo Use checksum for validating the received data. */
+                    if (pcbDataRecv)
+                        *pcbDataRecv = cbDataRecv;
+                    LogFlowFuncLeaveRC(rc);
+                    return rc;
                 }
-
-                /** @todo Use checksum for validating the received data. */
             }
 
-            if (RT_FAILURE(rc))
-                break;
         }
+    }
 
-        if (pcbDataRecv)
-            *pcbDataRecv = cbDataRecv;
-
-    } while (0);
-
+    /* failure */
     LogFlowFuncLeaveRC(rc);
     return rc;
 }
@@ -922,8 +934,7 @@ static int vbglR3DnDHGRecvDataHdr(PVBGLR3GUESTDNDCMDCTX pCtx, PVBOXDNDSNDDATAHDR
 }
 
 /** @todo Deprecated function; will be removed. */
-static int vbglR3DnDHGRecvMoreData(PVBGLR3GUESTDNDCMDCTX pCtx,
-                                   void *pvData, uint32_t cbData, uint32_t *pcbDataRecv)
+static int vbglR3DnDHGRecvMoreData(PVBGLR3GUESTDNDCMDCTX pCtx, void *pvData, uint32_t cbData, uint32_t *pcbDataRecv)
 {
     AssertPtrReturn(pCtx,        VERR_INVALID_POINTER);
     AssertPtrReturn(pvData,      VERR_INVALID_POINTER);
@@ -975,7 +986,7 @@ static int vbglR3DnDHGRecvDataLoop(PVBGLR3GUESTDNDCMDCTX pCtx, PVBOXDNDSNDDATAHD
         if (!cbDataTmp)
             return VERR_NO_MEMORY;
 
-        /**
+        /*
          * Protocols < v3 contain the header information in every HOST_DND_HG_SND_DATA
          * message, so do the actual retrieving immediately.
          *
@@ -1466,13 +1477,11 @@ VBGLR3DECL(int) VbglR3DnDRecvNextMsg(PVBGLR3GUESTDNDCMDCTX pCtx, CPVBGLR3DNDHGCM
     AssertPtrReturn(pCtx,   VERR_INVALID_POINTER);
     AssertPtrReturn(pEvent, VERR_INVALID_POINTER);
 
-    uint32_t       uMsg      = 0;
-    uint32_t       uNumParms = 0;
-
-    const uint32_t cbDataMax   = pCtx->cbMaxChunkSize;
     const uint32_t cbFormatMax = pCtx->cbMaxChunkSize;
 
-    int rc = vbglR3DnDGetNextMsgType(pCtx, &uMsg, &uNumParms, true /* fWait */);
+    uint32_t       uMsg   = 0;
+    uint32_t       cParms = 0;
+    int rc = vbglR3DnDGetNextMsgType(pCtx, &uMsg, &cParms, true /* fWait */);
     if (RT_SUCCESS(rc))
     {
         /* Check for VM session change. */
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibEvent.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibEvent.cpp
index 3c984b7..f35d615 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibEvent.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibEvent.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGR.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGR.cpp
index 56ad686..f490292 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGR.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGR.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestCtrl.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestCtrl.cpp
index 5fdc376..84c565a 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestCtrl.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestCtrl.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -735,7 +735,7 @@ VBGLR3DECL(int) VbglR3GuestCtrlFileGetOpen(PVBGLR3GUESTCTRLCMDCTX      pCtx,
                                            char     *pszDisposition,   uint32_t cbDisposition,
                                            char     *pszSharing,       uint32_t cbSharing,
                                            uint32_t *puCreationMode,
-                                           uint64_t *puOffset)
+                                           uint64_t *poffAt)
 {
     AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
     AssertReturn(pCtx->uNumParms == 7, VERR_INVALID_PARAMETER);
@@ -749,7 +749,7 @@ VBGLR3DECL(int) VbglR3GuestCtrlFileGetOpen(PVBGLR3GUESTCTRLCMDCTX      pCtx,
     AssertPtrReturn(pszSharing, VERR_INVALID_POINTER);
     AssertReturn(cbSharing, VERR_INVALID_PARAMETER);
     AssertPtrReturn(puCreationMode, VERR_INVALID_POINTER);
-    AssertPtrReturn(puOffset, VERR_INVALID_POINTER);
+    AssertPtrReturn(poffAt, VERR_INVALID_POINTER);
 
     HGCMMsgFileOpen Msg;
 
@@ -778,7 +778,7 @@ VBGLR3DECL(int) VbglR3GuestCtrlFileGetOpen(PVBGLR3GUESTCTRLCMDCTX      pCtx,
         {
             Msg.context.GetUInt32(&pCtx->uContextID);
             Msg.creationmode.GetUInt32(puCreationMode);
-            Msg.offset.GetUInt64(puOffset);
+            Msg.offset.GetUInt64(poffAt);
         }
     }
     return rc;
@@ -860,7 +860,7 @@ VBGLR3DECL(int) VbglR3GuestCtrlFileGetRead(PVBGLR3GUESTCTRLCMDCTX pCtx,
 
 
 VBGLR3DECL(int) VbglR3GuestCtrlFileGetReadAt(PVBGLR3GUESTCTRLCMDCTX pCtx,
-                                             uint32_t *puHandle, uint32_t *puToRead, uint64_t *puOffset)
+                                             uint32_t *puHandle, uint32_t *puToRead, uint64_t *poffAt)
 {
     AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
 
@@ -892,7 +892,7 @@ VBGLR3DECL(int) VbglR3GuestCtrlFileGetReadAt(PVBGLR3GUESTCTRLCMDCTX pCtx,
         {
             Msg.context.GetUInt32(&pCtx->uContextID);
             Msg.handle.GetUInt32(puHandle);
-            Msg.offset.GetUInt64(puOffset);
+            Msg.offset.GetUInt64(poffAt);
             Msg.size.GetUInt32(puToRead);
         }
     }
@@ -943,7 +943,7 @@ VBGLR3DECL(int) VbglR3GuestCtrlFileGetWrite(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_
 
 
 VBGLR3DECL(int) VbglR3GuestCtrlFileGetWriteAt(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puHandle,
-                                              void *pvData, uint32_t cbData, uint32_t *pcbSize, uint64_t *puOffset)
+                                              void *pvData, uint32_t cbData, uint32_t *pcbSize, uint64_t *poffAt)
 {
     AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
 
@@ -979,6 +979,7 @@ VBGLR3DECL(int) VbglR3GuestCtrlFileGetWriteAt(PVBGLR3GUESTCTRLCMDCTX pCtx, uint3
             Msg.context.GetUInt32(&pCtx->uContextID);
             Msg.handle.GetUInt32(puHandle);
             Msg.size.GetUInt32(pcbSize);
+            Msg.offset.GetUInt64(poffAt);
         }
     }
     return rc;
@@ -986,14 +987,14 @@ VBGLR3DECL(int) VbglR3GuestCtrlFileGetWriteAt(PVBGLR3GUESTCTRLCMDCTX pCtx, uint3
 
 
 VBGLR3DECL(int) VbglR3GuestCtrlFileGetSeek(PVBGLR3GUESTCTRLCMDCTX pCtx,
-                                           uint32_t *puHandle, uint32_t *puSeekMethod, uint64_t *puOffset)
+                                           uint32_t *puHandle, uint32_t *puSeekMethod, uint64_t *poffAt)
 {
     AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
 
     AssertReturn(pCtx->uNumParms == 4, VERR_INVALID_PARAMETER);
     AssertPtrReturn(puHandle, VERR_INVALID_POINTER);
     AssertPtrReturn(puSeekMethod, VERR_INVALID_POINTER);
-    AssertPtrReturn(puOffset, VERR_INVALID_POINTER);
+    AssertPtrReturn(poffAt, VERR_INVALID_POINTER);
 
     HGCMMsgFileSeek Msg;
 
@@ -1020,7 +1021,7 @@ VBGLR3DECL(int) VbglR3GuestCtrlFileGetSeek(PVBGLR3GUESTCTRLCMDCTX pCtx,
             Msg.context.GetUInt32(&pCtx->uContextID);
             Msg.handle.GetUInt32(puHandle);
             Msg.method.GetUInt32(puSeekMethod);
-            Msg.offset.GetUInt64(puOffset);
+            Msg.offset.GetUInt64(poffAt);
         }
     }
     return rc;
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestProp.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestProp.cpp
index 767221b..7d1719f 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestProp.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestProp.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestUser.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestUser.cpp
index ef6b0d9..1d335e1 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestUser.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestUser.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -59,7 +59,7 @@ VBGLR3DECL(int) VbglR3GuestUserReportState(const char *pszUser, const char *pszD
 
     uint32_t cbBase   = sizeof(VMMDevReportGuestUserState);
     uint32_t cbUser   = (uint32_t)strlen(pszUser) + 1; /* Include terminating zero */
-    uint32_t cbDomain = pszDomain ? strlen(pszDomain) + 1 /* Ditto */ : 0;
+    uint32_t cbDomain = pszDomain ? (uint32_t)strlen(pszDomain) + 1 /* Ditto */ : 0;
 
     /* Allocate enough space for all fields. */
     uint32_t cbSize = cbBase
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibHGCM.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibHGCM.cpp
index 3b22b99..0429ffd 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibHGCM.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibHGCM.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -25,6 +25,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibHostChannel.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibHostChannel.cpp
index 8d0c38f..6f7aee4 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibHostChannel.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibHostChannel.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -260,6 +260,7 @@ VBGLR3DECL(int) VbglR3HostChannelEventCancel(uint32_t u32ChannelHandle,
                                              uint32_t u32HGCMClientId)
 {
     VBoxHostChannelEventCancel parms;
+    RT_NOREF1(u32ChannelHandle);
 
     parms.hdr.result = VERR_WRONG_ORDER;
     parms.hdr.u32ClientID = u32HGCMClientId;
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibHostVersion.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibHostVersion.cpp
index 960a1bb..df2a88e 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibHostVersion.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibHostVersion.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -34,7 +34,7 @@
 
 #ifdef RT_OS_WINDOWS
  #define WIN32_LEAN_AND_MEAN
- #include <windows.h>
+ #include <iprt/win/windows.h>
 #endif
 
 #include "VBGLR3Internal.h"
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibLog.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibLog.cpp
index 0e045f6..ac1b458 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibLog.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibLog.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibMisc.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibMisc.cpp
index ee16d0b..1d520a5 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibMisc.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibMisc.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibModule.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibModule.cpp
index 3e45a89..23ab667 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibModule.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibModule.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -68,7 +68,7 @@ VBGLR3DECL(int) VbglR3RegisterSharedModule(char *pszModuleName, char *pszVersion
     pReq->enmGuestOS    = VBOXOSFAMILY_Windows64;
 # endif
 #else
-    /** todo */
+    /** @todo */
     pReq->enmGuestOS    = VBOXOSFAMILY_Unknown;
 #endif
     for (unsigned i = 0; i < cRegions; i++)
@@ -163,6 +163,7 @@ VBGLR3DECL(int) VbglR3PageIsShared(RTGCPTR pPage, bool *pfShared, uint64_t *puPa
     }
     return rc;
 #else
+    RT_NOREF3(pPage, pfShared, puPageFlags);
     return VERR_NOT_IMPLEMENTED;
 #endif
 }
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibMouse.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibMouse.cpp
index b0aa450..85119ea 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibMouse.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibMouse.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibPidFile.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibPidFile.cpp
index d112720..db13076 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibPidFile.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibPidFile.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibRuntimeXF86.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibRuntimeXF86.cpp
index 7279678..0ab634a 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibRuntimeXF86.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibRuntimeXF86.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibSeamless.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibSeamless.cpp
index e46edbf..c3d086f 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibSeamless.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibSeamless.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibSharedFolders.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibSharedFolders.cpp
index dee1cca..92171a1 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibSharedFolders.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibSharedFolders.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibStat.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibStat.cpp
index ae5f138..2e53546 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibStat.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibStat.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibTime.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibTime.cpp
index d752f5f..ff99050 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibTime.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibTime.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibVideo.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibVideo.cpp
index 6ae6719..3d38000 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibVideo.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibVideo.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VMMDev.cpp b/src/VBox/Additions/common/VBoxGuestLib/VMMDev.cpp
index a5d64c5..cbd9326 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VMMDev.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VMMDev.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VbglR0CanUsePhysPageList.cpp b/src/VBox/Additions/common/VBoxGuestLib/VbglR0CanUsePhysPageList.cpp
index a0c4126..f8e195c 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VbglR0CanUsePhysPageList.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VbglR0CanUsePhysPageList.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxService/Makefile.kmk b/src/VBox/Additions/common/VBoxService/Makefile.kmk
index a5f22b4..36260c3 100644
--- a/src/VBox/Additions/common/VBoxService/Makefile.kmk
+++ b/src/VBox/Additions/common/VBoxService/Makefile.kmk
@@ -60,7 +60,11 @@ endif
 #
 # VBoxService
 #
+if "$(KBUILD_TARGET)" == "win" || defined(VBOX_WITH_MASOCHISTIC_WARNINGS) ## @todo use VBoxGuestR3Exe everywhere
+VBoxService_TEMPLATE      = VBoxGuestR3Exe
+else
 VBoxService_TEMPLATE      = NewVBoxGuestR3Exe
+endif
 
 # Define features to be activate.
 VBoxService_DEFS         += \
@@ -184,7 +188,7 @@ endif
 #
 # VBoxServiceNT - NT4 version of VBoxService.
 #
-VBoxServiceNT_TEMPLATE = NewVBoxGuestR3Exe
+VBoxServiceNT_TEMPLATE = VBoxGuestR3Exe
 VBoxServiceNT_EXTENDS  = VBoxService
 VBoxServiceNT_DEFS.win = _WIN32_WINNT=0x0400 TARGET_NT4 VBOX_WITH_VBOXSERVICE_MANAGEMENT
 
diff --git a/src/VBox/Additions/common/VBoxService/VBoxService-os2.def b/src/VBox/Additions/common/VBoxService/VBoxService-os2.def
index b247c69..f9a8b77 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxService-os2.def
+++ b/src/VBox/Additions/common/VBoxService/VBoxService-os2.def
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxService/VBoxService-win.cpp b/src/VBox/Additions/common/VBoxService/VBoxService-win.cpp
index 30fc5a3..b3709cc 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxService-win.cpp
+++ b/src/VBox/Additions/common/VBoxService/VBoxService-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -25,7 +25,7 @@
 #include <VBox/VBoxGuestLib.h>
 #include "VBoxServiceInternal.h"
 
-#include <Windows.h>
+#include <iprt/win/windows.h>
 #include <process.h>
 #include <aclapi.h>
 
@@ -196,6 +196,8 @@ static RTEXITCODE vgsvcWinSetDesc(SC_HANDLE hService)
         VGSvcError("Cannot set the service description! Error: %ld\n", GetLastError());
         return RTEXITCODE_FAILURE;
     }
+#else
+    RT_NOREF(hService);
 #endif
     return RTEXITCODE_SUCCESS;
 }
@@ -459,14 +461,14 @@ static VOID WINAPI vgsvcWinCtrlHandler(DWORD dwControl)
 static DWORD WINAPI vgsvcWinCtrlHandler(DWORD dwControl, DWORD dwEventType, LPVOID lpEventData, LPVOID lpContext)
 #endif
 {
-    DWORD rcRet = NO_ERROR;
-
 #ifdef TARGET_NT4
     VGSvcVerbose(2, "Control handler: Control=%#x\n", dwControl);
 #else
+    RT_NOREF1(lpContext);
     VGSvcVerbose(2, "Control handler: Control=%#x, EventType=%#x\n", dwControl, dwEventType);
 #endif
 
+    DWORD rcRet = NO_ERROR;
     switch (dwControl)
     {
         case SERVICE_CONTROL_INTERROGATE:
@@ -523,6 +525,7 @@ static DWORD WINAPI vgsvcWinCtrlHandler(DWORD dwControl, DWORD dwEventType, LPVO
 
 static void WINAPI vgsvcWinMain(DWORD argc, LPTSTR *argv)
 {
+    RT_NOREF2(argc, argv);
     VGSvcVerbose(2, "Registering service control handler ...\n");
 #ifdef TARGET_NT4
     g_hWinServiceStatus = RegisterServiceCtrlHandler(VBOXSERVICE_NAME, vgsvcWinCtrlHandler);
diff --git a/src/VBox/Additions/common/VBoxService/VBoxService-win.rc b/src/VBox/Additions/common/VBoxService/VBoxService-win.rc
index fdd38c4..405c3d8 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxService-win.rc
+++ b/src/VBox/Additions/common/VBoxService/VBoxService-win.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxService/VBoxService.cpp b/src/VBox/Additions/common/VBoxService/VBoxService.cpp
index 6e8bacd..2979738 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxService.cpp
+++ b/src/VBox/Additions/common/VBoxService/VBoxService.cpp
@@ -48,6 +48,7 @@
  * stupid.  That will hopefully be cleaned up eventually.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/Additions/common/VBoxService/VBoxServiceAutoMount.cpp b/src/VBox/Additions/common/VBoxService/VBoxServiceAutoMount.cpp
index 9b73ea6..3c84390 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxServiceAutoMount.cpp
+++ b/src/VBox/Additions/common/VBoxService/VBoxServiceAutoMount.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -321,7 +321,7 @@ static int vbsvcAutoMountSharedFolder(const char *pszShareName, const char *pszM
 #elif defined(RT_OS_LINUX)
         unsigned long fFlags = MS_NODEV;
 
-        const char *szOptions = { "rw" };
+        /*const char *szOptions = { "rw" }; - ??? */
         struct vbsf_mount_info_new mntinf;
 
         mntinf.nullchar     = '\0';
diff --git a/src/VBox/Additions/common/VBoxService/VBoxServiceBalloon.cpp b/src/VBox/Additions/common/VBoxService/VBoxServiceBalloon.cpp
index e95410b..f425c2a 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxServiceBalloon.cpp
+++ b/src/VBox/Additions/common/VBoxService/VBoxServiceBalloon.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -74,8 +74,10 @@ static RTSEMEVENTMULTI  g_MemBalloonEvent = NIL_RTSEMEVENTMULTI;
 /** The array holding the R3 pointers of the balloon. */
 static void **g_pavBalloon = NULL;
 
+#ifdef RT_OS_LINUX
 /** True = madvise(MADV_DONTFORK) works, false otherwise. */
 static bool g_fSysMadviseWorks;
+#endif
 
 
 /**
diff --git a/src/VBox/Additions/common/VBoxService/VBoxServiceClipboard-os2.cpp b/src/VBox/Additions/common/VBoxService/VBoxServiceClipboard-os2.cpp
index b732188..18191ec 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxServiceClipboard-os2.cpp
+++ b/src/VBox/Additions/common/VBoxService/VBoxServiceClipboard-os2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxService/VBoxServiceControl.cpp b/src/VBox/Additions/common/VBoxService/VBoxServiceControl.cpp
index 932f8a4..578c08a 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxServiceControl.cpp
+++ b/src/VBox/Additions/common/VBoxService/VBoxServiceControl.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -77,10 +77,12 @@ static RTSEMEVENTMULTI      g_hControlEvent = NIL_RTSEMEVENTMULTI;
 static uint64_t             g_idControlSession;
 /** The guest control service client ID. */
 static uint32_t             g_uControlSvcClientID = 0;
+#if 0 /** @todo process limit */
 /** How many started guest processes are kept into memory for supplying
  *  information to the host. Default is 256 processes. If 0 is specified,
  *  the maximum number of processes is unlimited. */
 static uint32_t             g_uControlProcsMaxKept = 256;
+#endif
 /** List of guest control session threads (VBOXSERVICECTRLSESSIONTHREAD).
  *  A guest session thread represents a forked guest session process
  *  of VBoxService.  */
diff --git a/src/VBox/Additions/common/VBoxService/VBoxServiceControlProcess.cpp b/src/VBox/Additions/common/VBoxService/VBoxServiceControlProcess.cpp
index 1f7772c..4649309 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxServiceControlProcess.cpp
+++ b/src/VBox/Additions/common/VBoxService/VBoxServiceControlProcess.cpp
@@ -49,8 +49,6 @@ using namespace guestControl;
 *********************************************************************************************************************************/
 static int                  vgsvcGstCtrlProcessAssignPID(PVBOXSERVICECTRLPROCESS pThread, uint32_t uPID);
 static int                  vgsvcGstCtrlProcessLock(PVBOXSERVICECTRLPROCESS pProcess);
-static int                  vgsvcGstCtrlProcessRequest(PVBOXSERVICECTRLPROCESS pProcess, const PVBGLR3GUESTCTRLCMDCTX pHostCtx,
-                                                       PFNRT pfnFunction, unsigned cArgs, ...);
 static int                  vgsvcGstCtrlProcessSetupPipe(const char *pszHowTo, int fd, PRTHANDLE ph, PRTHANDLE *pph,
                                                          PRTPIPE phPipe);
 static int                  vgsvcGstCtrlProcessUnlock(PVBOXSERVICECTRLPROCESS pProcess);
@@ -303,6 +301,7 @@ static int vgsvcGstCtrlProcessPollsetCloseInput(PVBOXSERVICECTRLPROCESS pProcess
 }
 
 
+#ifdef DEBUG
 /**
  * Names a poll handle ID.
  *
@@ -329,6 +328,7 @@ static const char *vgsvcGstCtrlProcessPollHandleToString(uint32_t idPollHnd)
             return "unknown";
     }
 }
+#endif /* DEBUG */
 
 
 /**
@@ -361,6 +361,7 @@ static int vgsvcGstCtrlProcessPollsetOnInput(PVBOXSERVICECTRLPROCESS pProcess, u
 static int vgsvcGstCtrlProcessHandleOutputError(PVBOXSERVICECTRLPROCESS pProcess,
                                                 uint32_t fPollEvt, PRTPIPE phPipeR, uint32_t idPollHnd)
 {
+    RT_NOREF1(fPollEvt);
     AssertPtrReturn(pProcess, VERR_INVALID_POINTER);
 
     if (!phPipeR)
@@ -845,6 +846,7 @@ static int vgsvcGstCtrlProcessProcLoop(PVBOXSERVICECTRLPROCESS pProcess)
 }
 
 
+#if 0 /* unused */
 /**
  * Initializes a pipe's handle and pipe object.
  *
@@ -863,6 +865,7 @@ static int vgsvcGstCtrlProcessInitPipe(PRTHANDLE ph, PRTPIPE phPipe)
 
     return VINF_SUCCESS;
 }
+#endif
 
 
 /**
@@ -1213,6 +1216,9 @@ static int vgsvcGstCtrlProcessCreateProcess(const char *pszExec, const char * co
                                             const char *pszAsUser, const char *pszPassword, const char *pszDomain,
                                             PRTPROCESS phProcess)
 {
+#ifndef RT_OS_WINDOWS
+    RT_NOREF1(pszDomain);
+#endif
     AssertPtrReturn(pszExec, VERR_INVALID_PARAMETER);
     AssertPtrReturn(papszArgs, VERR_INVALID_PARAMETER);
     /* phStdIn is optional. */
@@ -1361,7 +1367,7 @@ static int vgsvcGstCtrlProcessCreateProcess(const char *pszExec, const char * co
 #endif
             VGSvcVerbose(3, "Starting process '%s' ...\n", szExecExp);
 
-            const char *pszUser;
+            const char *pszUser = pszAsUser;
 #ifdef RT_OS_WINDOWS
             /* If a domain name is given, construct an UPN (User Principle Name) with
              * the domain name built-in, e.g. "joedoe at example.com". */
@@ -1376,10 +1382,7 @@ static int vgsvcGstCtrlProcessCreateProcess(const char *pszExec, const char * co
                     VGSvcVerbose(3, "Using UPN: %s\n", pszUserUPN);
                 }
             }
-
-            if (!pszUserUPN) /* Fallback */
 #endif
-                pszUser = pszAsUser;
 
             /* Do normal execution. */
             rc = RTProcCreateEx(szExecExp, papszArgsExp, hEnv, uProcFlags,
@@ -1531,164 +1534,166 @@ static int vgsvcGstCtrlProcessProcessWorker(PVBOXSERVICECTRLPROCESS pProcess)
     /*
      * Create the environment.
      */
-    RTENV hEnv;
-    if (RT_SUCCESS(rc))
-        rc = RTEnvClone(&hEnv, RTENV_DEFAULT);
     if (RT_SUCCESS(rc))
     {
-        size_t i;
-        for (i = 0; i < uNumEnvVars && papszEnv; i++)
-        {
-            rc = RTEnvPutEx(hEnv, papszEnv[i]);
-            if (RT_FAILURE(rc))
-                break;
-        }
+        RTENV hEnv;
+        rc = RTEnvClone(&hEnv, RTENV_DEFAULT);
         if (RT_SUCCESS(rc))
         {
-            /*
-             * Setup the redirection of the standard stuff.
-             */
-            /** @todo consider supporting: gcc stuff.c >file 2>&1.  */
-            RTHANDLE    hStdIn;
-            PRTHANDLE   phStdIn;
-            rc = vgsvcGstCtrlProcessSetupPipe("|", 0 /*STDIN_FILENO*/,
-                                         &hStdIn, &phStdIn, &pProcess->hPipeStdInW);
+            size_t i;
+            for (i = 0; i < uNumEnvVars && papszEnv; i++)
+            {
+                rc = RTEnvPutEx(hEnv, papszEnv[i]);
+                if (RT_FAILURE(rc))
+                    break;
+            }
             if (RT_SUCCESS(rc))
             {
-                RTHANDLE    hStdOut;
-                PRTHANDLE   phStdOut;
-                rc = vgsvcGstCtrlProcessSetupPipe(  (pProcess->StartupInfo.uFlags & EXECUTEPROCESSFLAG_WAIT_STDOUT)
-                                             ? "|" : "/dev/null",
-                                             1 /*STDOUT_FILENO*/,
-                                             &hStdOut, &phStdOut, &pProcess->hPipeStdOutR);
+                /*
+                 * Setup the redirection of the standard stuff.
+                 */
+                /** @todo consider supporting: gcc stuff.c >file 2>&1.  */
+                RTHANDLE    hStdIn;
+                PRTHANDLE   phStdIn;
+                rc = vgsvcGstCtrlProcessSetupPipe("|", 0 /*STDIN_FILENO*/,
+                                             &hStdIn, &phStdIn, &pProcess->hPipeStdInW);
                 if (RT_SUCCESS(rc))
                 {
-                    RTHANDLE    hStdErr;
-                    PRTHANDLE   phStdErr;
-                    rc = vgsvcGstCtrlProcessSetupPipe(  (pProcess->StartupInfo.uFlags & EXECUTEPROCESSFLAG_WAIT_STDERR)
+                    RTHANDLE    hStdOut;
+                    PRTHANDLE   phStdOut;
+                    rc = vgsvcGstCtrlProcessSetupPipe(  (pProcess->StartupInfo.uFlags & EXECUTEPROCESSFLAG_WAIT_STDOUT)
                                                  ? "|" : "/dev/null",
-                                                 2 /*STDERR_FILENO*/,
-                                                 &hStdErr, &phStdErr, &pProcess->hPipeStdErrR);
+                                                 1 /*STDOUT_FILENO*/,
+                                                 &hStdOut, &phStdOut, &pProcess->hPipeStdOutR);
                     if (RT_SUCCESS(rc))
                     {
-                        /*
-                         * Create a poll set for the pipes and let the
-                         * transport layer add stuff to it as well.
-                         */
-                        rc = RTPollSetCreate(&pProcess->hPollSet);
+                        RTHANDLE    hStdErr;
+                        PRTHANDLE   phStdErr;
+                        rc = vgsvcGstCtrlProcessSetupPipe(  (pProcess->StartupInfo.uFlags & EXECUTEPROCESSFLAG_WAIT_STDERR)
+                                                     ? "|" : "/dev/null",
+                                                     2 /*STDERR_FILENO*/,
+                                                     &hStdErr, &phStdErr, &pProcess->hPipeStdErrR);
                         if (RT_SUCCESS(rc))
                         {
-                            uint32_t uFlags = RTPOLL_EVT_ERROR;
-#if 0
-                            /* Add reading event to pollset to get some more information. */
-                            uFlags |= RTPOLL_EVT_READ;
-#endif
-                            /* Stdin. */
-                            if (RT_SUCCESS(rc))
-                                rc = RTPollSetAddPipe(pProcess->hPollSet,
-                                                      pProcess->hPipeStdInW, RTPOLL_EVT_ERROR, VBOXSERVICECTRLPIPEID_STDIN);
-                            /* Stdout. */
-                            if (RT_SUCCESS(rc))
-                                rc = RTPollSetAddPipe(pProcess->hPollSet,
-                                                      pProcess->hPipeStdOutR, uFlags, VBOXSERVICECTRLPIPEID_STDOUT);
-                            /* Stderr. */
-                            if (RT_SUCCESS(rc))
-                                rc = RTPollSetAddPipe(pProcess->hPollSet,
-                                                      pProcess->hPipeStdErrR, uFlags, VBOXSERVICECTRLPIPEID_STDERR);
-                            /* IPC notification pipe. */
-                            if (RT_SUCCESS(rc))
-                                rc = RTPipeCreate(&pProcess->hNotificationPipeR, &pProcess->hNotificationPipeW, 0 /* Flags */);
-                            if (RT_SUCCESS(rc))
-                                rc = RTPollSetAddPipe(pProcess->hPollSet,
-                                                      pProcess->hNotificationPipeR, RTPOLL_EVT_READ, VBOXSERVICECTRLPIPEID_IPC_NOTIFY);
+                            /*
+                             * Create a poll set for the pipes and let the
+                             * transport layer add stuff to it as well.
+                             */
+                            rc = RTPollSetCreate(&pProcess->hPollSet);
                             if (RT_SUCCESS(rc))
                             {
-                                AssertPtr(pProcess->pSession);
-                                bool fNeedsImpersonation = !(pProcess->pSession->fFlags & VBOXSERVICECTRLSESSION_FLAG_SPAWN);
-
-                                rc = vgsvcGstCtrlProcessCreateProcess(pProcess->StartupInfo.szCmd, papszArgs, hEnv,
-                                                                 pProcess->StartupInfo.uFlags,
-                                                                 phStdIn, phStdOut, phStdErr,
-                                                                 fNeedsImpersonation ? pProcess->StartupInfo.szUser     : NULL,
-                                                                 fNeedsImpersonation ? pProcess->StartupInfo.szPassword : NULL,
-                                                                 fNeedsImpersonation ? pProcess->StartupInfo.szDomain   : NULL,
-                                                                 &pProcess->hProcess);
-                                if (RT_FAILURE(rc))
-                                    VGSvcError("Error starting process, rc=%Rrc\n", rc);
-                                /*
-                                 * Tell the session thread that it can continue
-                                 * spawning guest processes. This needs to be done after the new
-                                 * process has been started because otherwise signal handling
-                                 * on (Open) Solaris does not work correctly (see @bugref{5068}).
-                                 */
-                                int rc2 = RTThreadUserSignal(RTThreadSelf());
+                                uint32_t uFlags = RTPOLL_EVT_ERROR;
+    #if 0
+                                /* Add reading event to pollset to get some more information. */
+                                uFlags |= RTPOLL_EVT_READ;
+    #endif
+                                /* Stdin. */
                                 if (RT_SUCCESS(rc))
-                                    rc = rc2;
-                                fSignalled = true;
-
+                                    rc = RTPollSetAddPipe(pProcess->hPollSet,
+                                                          pProcess->hPipeStdInW, RTPOLL_EVT_ERROR, VBOXSERVICECTRLPIPEID_STDIN);
+                                /* Stdout. */
+                                if (RT_SUCCESS(rc))
+                                    rc = RTPollSetAddPipe(pProcess->hPollSet,
+                                                          pProcess->hPipeStdOutR, uFlags, VBOXSERVICECTRLPIPEID_STDOUT);
+                                /* Stderr. */
+                                if (RT_SUCCESS(rc))
+                                    rc = RTPollSetAddPipe(pProcess->hPollSet,
+                                                          pProcess->hPipeStdErrR, uFlags, VBOXSERVICECTRLPIPEID_STDERR);
+                                /* IPC notification pipe. */
+                                if (RT_SUCCESS(rc))
+                                    rc = RTPipeCreate(&pProcess->hNotificationPipeR, &pProcess->hNotificationPipeW, 0 /* Flags */);
+                                if (RT_SUCCESS(rc))
+                                    rc = RTPollSetAddPipe(pProcess->hPollSet,
+                                                          pProcess->hNotificationPipeR, RTPOLL_EVT_READ, VBOXSERVICECTRLPIPEID_IPC_NOTIFY);
                                 if (RT_SUCCESS(rc))
                                 {
+                                    AssertPtr(pProcess->pSession);
+                                    bool fNeedsImpersonation = !(pProcess->pSession->fFlags & VBOXSERVICECTRLSESSION_FLAG_SPAWN);
+
+                                    rc = vgsvcGstCtrlProcessCreateProcess(pProcess->StartupInfo.szCmd, papszArgs, hEnv,
+                                                                     pProcess->StartupInfo.uFlags,
+                                                                     phStdIn, phStdOut, phStdErr,
+                                                                     fNeedsImpersonation ? pProcess->StartupInfo.szUser     : NULL,
+                                                                     fNeedsImpersonation ? pProcess->StartupInfo.szPassword : NULL,
+                                                                     fNeedsImpersonation ? pProcess->StartupInfo.szDomain   : NULL,
+                                                                     &pProcess->hProcess);
+                                    if (RT_FAILURE(rc))
+                                        VGSvcError("Error starting process, rc=%Rrc\n", rc);
                                     /*
-                                     * Close the child ends of any pipes and redirected files.
+                                     * Tell the session thread that it can continue
+                                     * spawning guest processes. This needs to be done after the new
+                                     * process has been started because otherwise signal handling
+                                     * on (Open) Solaris does not work correctly (see @bugref{5068}).
                                      */
-                                    rc2 = RTHandleClose(phStdIn);   AssertRC(rc2);
-                                    phStdIn    = NULL;
-                                    rc2 = RTHandleClose(phStdOut);  AssertRC(rc2);
-                                    phStdOut   = NULL;
-                                    rc2 = RTHandleClose(phStdErr);  AssertRC(rc2);
-                                    phStdErr   = NULL;
-
-                                    /* Enter the process main loop. */
-                                    rc = vgsvcGstCtrlProcessProcLoop(pProcess);
+                                    int rc2 = RTThreadUserSignal(RTThreadSelf());
+                                    if (RT_SUCCESS(rc))
+                                        rc = rc2;
+                                    fSignalled = true;
 
-                                    /*
-                                     * The handles that are no longer in the set have
-                                     * been closed by the above call in order to prevent
-                                     * the guest from getting stuck accessing them.
-                                     * So, NIL the handles to avoid closing them again.
-                                     */
-                                    if (RT_FAILURE(RTPollSetQueryHandle(pProcess->hPollSet,
-                                                                        VBOXSERVICECTRLPIPEID_IPC_NOTIFY, NULL)))
+                                    if (RT_SUCCESS(rc))
                                     {
-                                        pProcess->hNotificationPipeR = NIL_RTPIPE;
-                                        pProcess->hNotificationPipeW = NIL_RTPIPE;
+                                        /*
+                                         * Close the child ends of any pipes and redirected files.
+                                         */
+                                        rc2 = RTHandleClose(phStdIn);   AssertRC(rc2);
+                                        phStdIn    = NULL;
+                                        rc2 = RTHandleClose(phStdOut);  AssertRC(rc2);
+                                        phStdOut   = NULL;
+                                        rc2 = RTHandleClose(phStdErr);  AssertRC(rc2);
+                                        phStdErr   = NULL;
+
+                                        /* Enter the process main loop. */
+                                        rc = vgsvcGstCtrlProcessProcLoop(pProcess);
+
+                                        /*
+                                         * The handles that are no longer in the set have
+                                         * been closed by the above call in order to prevent
+                                         * the guest from getting stuck accessing them.
+                                         * So, NIL the handles to avoid closing them again.
+                                         */
+                                        if (RT_FAILURE(RTPollSetQueryHandle(pProcess->hPollSet,
+                                                                            VBOXSERVICECTRLPIPEID_IPC_NOTIFY, NULL)))
+                                        {
+                                            pProcess->hNotificationPipeR = NIL_RTPIPE;
+                                            pProcess->hNotificationPipeW = NIL_RTPIPE;
+                                        }
+                                        if (RT_FAILURE(RTPollSetQueryHandle(pProcess->hPollSet,
+                                                                            VBOXSERVICECTRLPIPEID_STDERR, NULL)))
+                                            pProcess->hPipeStdErrR = NIL_RTPIPE;
+                                        if (RT_FAILURE(RTPollSetQueryHandle(pProcess->hPollSet,
+                                                                            VBOXSERVICECTRLPIPEID_STDOUT, NULL)))
+                                            pProcess->hPipeStdOutR = NIL_RTPIPE;
+                                        if (RT_FAILURE(RTPollSetQueryHandle(pProcess->hPollSet,
+                                                                            VBOXSERVICECTRLPIPEID_STDIN, NULL)))
+                                            pProcess->hPipeStdInW = NIL_RTPIPE;
                                     }
-                                    if (RT_FAILURE(RTPollSetQueryHandle(pProcess->hPollSet,
-                                                                        VBOXSERVICECTRLPIPEID_STDERR, NULL)))
-                                        pProcess->hPipeStdErrR = NIL_RTPIPE;
-                                    if (RT_FAILURE(RTPollSetQueryHandle(pProcess->hPollSet,
-                                                                        VBOXSERVICECTRLPIPEID_STDOUT, NULL)))
-                                        pProcess->hPipeStdOutR = NIL_RTPIPE;
-                                    if (RT_FAILURE(RTPollSetQueryHandle(pProcess->hPollSet,
-                                                                        VBOXSERVICECTRLPIPEID_STDIN, NULL)))
-                                        pProcess->hPipeStdInW = NIL_RTPIPE;
                                 }
-                            }
-                            RTPollSetDestroy(pProcess->hPollSet);
+                                RTPollSetDestroy(pProcess->hPollSet);
 
-                            RTPipeClose(pProcess->hNotificationPipeR);
-                            pProcess->hNotificationPipeR = NIL_RTPIPE;
-                            RTPipeClose(pProcess->hNotificationPipeW);
-                            pProcess->hNotificationPipeW = NIL_RTPIPE;
-                        }
-                        RTPipeClose(pProcess->hPipeStdErrR);
-                        pProcess->hPipeStdErrR = NIL_RTPIPE;
-                        RTHandleClose(phStdErr);
-                        if (phStdErr)
+                                RTPipeClose(pProcess->hNotificationPipeR);
+                                pProcess->hNotificationPipeR = NIL_RTPIPE;
+                                RTPipeClose(pProcess->hNotificationPipeW);
+                                pProcess->hNotificationPipeW = NIL_RTPIPE;
+                            }
+                            RTPipeClose(pProcess->hPipeStdErrR);
+                            pProcess->hPipeStdErrR = NIL_RTPIPE;
                             RTHandleClose(phStdErr);
+                            if (phStdErr)
+                                RTHandleClose(phStdErr);
+                        }
+                        RTPipeClose(pProcess->hPipeStdOutR);
+                        pProcess->hPipeStdOutR = NIL_RTPIPE;
+                        RTHandleClose(&hStdOut);
+                        if (phStdOut)
+                            RTHandleClose(phStdOut);
                     }
-                    RTPipeClose(pProcess->hPipeStdOutR);
-                    pProcess->hPipeStdOutR = NIL_RTPIPE;
-                    RTHandleClose(&hStdOut);
-                    if (phStdOut)
-                        RTHandleClose(phStdOut);
+                    RTPipeClose(pProcess->hPipeStdInW);
+                    pProcess->hPipeStdInW = NIL_RTPIPE;
+                    RTHandleClose(phStdIn);
                 }
-                RTPipeClose(pProcess->hPipeStdInW);
-                pProcess->hPipeStdInW = NIL_RTPIPE;
-                RTHandleClose(phStdIn);
             }
+            RTEnvDestroy(hEnv);
         }
-        RTEnvDestroy(hEnv);
     }
 
     if (pProcess->uClientID)
@@ -1758,6 +1763,7 @@ static int vgsvcGstCtrlProcessLock(PVBOXSERVICECTRLPROCESS pProcess)
  */
 static DECLCALLBACK(int) vgsvcGstCtrlProcessThread(RTTHREAD hThreadSelf, void *pvUser)
 {
+    RT_NOREF1(hThreadSelf);
     PVBOXSERVICECTRLPROCESS pProcess = (PVBOXSERVICECTRLPROCESS)pvUser;
     AssertPtrReturn(pProcess, VERR_INVALID_POINTER);
     return vgsvcGstCtrlProcessProcessWorker(pProcess);
@@ -2021,6 +2027,7 @@ static DECLCALLBACK(int) vgsvcGstCtrlProcessOnTerm(PVBOXSERVICECTRLPROCESS pThis
 static int vgsvcGstCtrlProcessRequestExV(PVBOXSERVICECTRLPROCESS pProcess, const PVBGLR3GUESTCTRLCMDCTX pHostCtx, bool fAsync,
                                          RTMSINTERVAL uTimeoutMS, PRTREQ pReq, PFNRT pfnFunction, unsigned cArgs, va_list Args)
 {
+    RT_NOREF1(pHostCtx);
     AssertPtrReturn(pProcess, VERR_INVALID_POINTER);
     /* pHostCtx is optional. */
     AssertPtrReturn(pfnFunction, VERR_INVALID_POINTER);
diff --git a/src/VBox/Additions/common/VBoxService/VBoxServiceControlSession.cpp b/src/VBox/Additions/common/VBoxService/VBoxServiceControlSession.cpp
index 0e3c2f6..8c007ca 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxServiceControlSession.cpp
+++ b/src/VBox/Additions/common/VBoxService/VBoxServiceControlSession.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -509,6 +509,7 @@ static int vgsvcGstCtrlSessionHandleFileSeek(const PVBOXSERVICECTRLSESSION pSess
 
                 default:
                     rc = VERR_NOT_SUPPORTED;
+                    uSeekMethodIprt = RTFILE_SEEK_BEGIN; /* Shut up MSC */
                     break;
             }
 
@@ -757,8 +758,10 @@ static int vgsvcGstCtrlSessionHandleProcInput(PVBOXSERVICECTRLSESSION pSession,
     uint32_t fFlags;
     uint32_t cbSize;
 
+#if 0 /* unused */
     uint32_t uStatus = INPUT_STS_UNDEFINED; /* Status sent back to the host. */
     uint32_t cbWritten = 0; /* Number of bytes written to the guest. */
+#endif
 
     /*
      * Ask the host for the input data.
@@ -1085,81 +1088,78 @@ static DECLCALLBACK(int) vgsvcGstCtrlSessionThread(RTTHREAD hThreadSelf, void *p
     RT_ZERO(ProcessStatus);
 
     int rcWait;
-    if (RT_SUCCESS(rc))
+    uint32_t uTimeoutsMS = 30 * 1000; /** @todo Make this configurable. Later. */
+    uint64_t u64TimeoutStart = 0;
+
+    for (;;)
     {
-        uint32_t uTimeoutsMS = 30 * 1000; /** @todo Make this configurable. Later. */
-        uint64_t u64TimeoutStart = 0;
+        rcWait = RTProcWaitNoResume(pThread->hProcess, RTPROCWAIT_FLAGS_NOBLOCK, &ProcessStatus);
+        if (RT_UNLIKELY(rcWait == VERR_INTERRUPTED))
+            continue;
 
-        for (;;)
+        if (   rcWait == VINF_SUCCESS
+            || rcWait == VERR_PROCESS_NOT_FOUND)
         {
-            rcWait = RTProcWaitNoResume(pThread->hProcess, RTPROCWAIT_FLAGS_NOBLOCK, &ProcessStatus);
-            if (RT_UNLIKELY(rcWait == VERR_INTERRUPTED))
-                continue;
+            fProcessAlive = false;
+            break;
+        }
+        AssertMsgBreak(rcWait == VERR_PROCESS_RUNNING,
+                       ("Got unexpected rc=%Rrc while waiting for session process termination\n", rcWait));
 
-            if (   rcWait == VINF_SUCCESS
-                || rcWait == VERR_PROCESS_NOT_FOUND)
+        if (ASMAtomicReadBool(&pThread->fShutdown))
+        {
+            if (!u64TimeoutStart)
             {
-                fProcessAlive = false;
-                break;
-            }
-            AssertMsgBreak(rcWait == VERR_PROCESS_RUNNING,
-                           ("Got unexpected rc=%Rrc while waiting for session process termination\n", rcWait));
+                VGSvcVerbose(3, "Notifying guest session process (PID=%RU32, session ID=%RU32) ...\n",
+                             pThread->hProcess, uSessionID);
 
-            if (ASMAtomicReadBool(&pThread->fShutdown))
-            {
-                if (!u64TimeoutStart)
+                VBGLR3GUESTCTRLCMDCTX hostCtx =
+                {
+                    /* .idClient  = */  uClientID,
+                    /* .idContext = */  VBOX_GUESTCTRL_CONTEXTID_MAKE_SESSION(uSessionID),
+                    /* .uProtocol = */  pThread->StartupInfo.uProtocol,
+                    /* .cParams   = */  2
+                };
+                rc = VbglR3GuestCtrlSessionClose(&hostCtx, 0 /* fFlags */);
+                if (RT_FAILURE(rc))
                 {
-                    VGSvcVerbose(3, "Notifying guest session process (PID=%RU32, session ID=%RU32) ...\n",
-                                 pThread->hProcess, uSessionID);
+                    VGSvcError("Unable to notify guest session process (PID=%RU32, session ID=%RU32), rc=%Rrc\n",
+                               pThread->hProcess, uSessionID, rc);
 
-                    VBGLR3GUESTCTRLCMDCTX hostCtx =
+                    if (rc == VERR_NOT_SUPPORTED)
                     {
-                        /* .idClient  = */  uClientID,
-                        /* .idContext = */  VBOX_GUESTCTRL_CONTEXTID_MAKE_SESSION(uSessionID),
-                        /* .uProtocol = */  pThread->StartupInfo.uProtocol,
-                        /* .cParams   = */  2
-                    };
-                    rc = VbglR3GuestCtrlSessionClose(&hostCtx, 0 /* fFlags */);
-                    if (RT_FAILURE(rc))
-                    {
-                        VGSvcError("Unable to notify guest session process (PID=%RU32, session ID=%RU32), rc=%Rrc\n",
-                                   pThread->hProcess, uSessionID, rc);
-
-                        if (rc == VERR_NOT_SUPPORTED)
-                        {
-                            /* Terminate guest session process in case it's not supported by a too old host. */
-                            rc = RTProcTerminate(pThread->hProcess);
-                            VGSvcVerbose(3, "Terminating guest session process (PID=%RU32) ended with rc=%Rrc\n",
-                                         pThread->hProcess, rc);
-                        }
-                        break;
+                        /* Terminate guest session process in case it's not supported by a too old host. */
+                        rc = RTProcTerminate(pThread->hProcess);
+                        VGSvcVerbose(3, "Terminating guest session process (PID=%RU32) ended with rc=%Rrc\n",
+                                     pThread->hProcess, rc);
                     }
-
-                    VGSvcVerbose(3, "Guest session ID=%RU32 thread was asked to terminate, waiting for session process to exit (%RU32ms timeout) ...\n",
-                                 uSessionID, uTimeoutsMS);
-                    u64TimeoutStart = RTTimeMilliTS();
-                    continue; /* Don't waste time on waiting. */
-                }
-                if (RTTimeMilliTS() - u64TimeoutStart > uTimeoutsMS)
-                {
-                     VGSvcVerbose(3, "Guest session ID=%RU32 process did not shut down within time\n", uSessionID);
-                     break;
+                    break;
                 }
-            }
 
-            RTThreadSleep(100); /* Wait a bit. */
+                VGSvcVerbose(3, "Guest session ID=%RU32 thread was asked to terminate, waiting for session process to exit (%RU32ms timeout) ...\n",
+                             uSessionID, uTimeoutsMS);
+                u64TimeoutStart = RTTimeMilliTS();
+                continue; /* Don't waste time on waiting. */
+            }
+            if (RTTimeMilliTS() - u64TimeoutStart > uTimeoutsMS)
+            {
+                 VGSvcVerbose(3, "Guest session ID=%RU32 process did not shut down within time\n", uSessionID);
+                 break;
+            }
         }
 
-        if (!fProcessAlive)
+        RTThreadSleep(100); /* Wait a bit. */
+    }
+
+    if (!fProcessAlive)
+    {
+        VGSvcVerbose(2, "Guest session process (ID=%RU32) terminated with rc=%Rrc, reason=%d, status=%d\n",
+                     uSessionID, rcWait, ProcessStatus.enmReason, ProcessStatus.iStatus);
+        if (ProcessStatus.iStatus == RTEXITCODE_INIT)
         {
-            VGSvcVerbose(2, "Guest session process (ID=%RU32) terminated with rc=%Rrc, reason=%d, status=%d\n",
-                         uSessionID, rcWait, ProcessStatus.enmReason, ProcessStatus.iStatus);
-            if (ProcessStatus.iStatus == RTEXITCODE_INIT)
-            {
-                VGSvcError("Guest session process (ID=%RU32) failed to initialize. Here some hints:\n", uSessionID);
-                VGSvcError("- Is logging enabled and the output directory is read-only by the guest session user?\n");
-                /** @todo Add more here. */
-            }
+            VGSvcError("Guest session process (ID=%RU32) failed to initialize. Here some hints:\n", uSessionID);
+            VGSvcError("- Is logging enabled and the output directory is read-only by the guest session user?\n");
+            /** @todo Add more here. */
         }
     }
 
@@ -1649,6 +1649,8 @@ int VGSvcGstCtrlSessionProcessStartAllowed(const PVBOXSERVICECTRLSESSION pSessio
 static int vgsvcVGSvcGstCtrlSessionThreadCreateProcess(const PVBOXSERVICECTRLSESSIONSTARTUPINFO pSessionStartupInfo,
                                                        PVBOXSERVICECTRLSESSIONTHREAD pSessionThread, uint32_t uCtrlSessionThread)
 {
+    RT_NOREF1(uCtrlSessionThread);
+
     /*
      * Is this an anonymous session?  Anonymous sessions run with the same
      * privileges as the main VBoxService executable.
@@ -1829,53 +1831,52 @@ static int vgsvcVGSvcGstCtrlSessionThreadCreateProcess(const PVBOXSERVICECTRLSES
             }
         }
 #else
-        RTHANDLE hStdIn;
-        if (RT_SUCCESS(rc))
-            rc = RTFileOpenBitBucket(&hStdIn.u.hFile, RTFILE_O_READ);
         if (RT_SUCCESS(rc))
         {
-            hStdIn.enmType = RTHANDLETYPE_FILE;
-
-            RTHANDLE hStdOutAndErr;
-            rc = RTFileOpenBitBucket(&hStdOutAndErr.u.hFile, RTFILE_O_WRITE);
+            RTHANDLE hStdIn;
+            rc = RTFileOpenBitBucket(&hStdIn.u.hFile, RTFILE_O_READ);
             if (RT_SUCCESS(rc))
             {
-                hStdOutAndErr.enmType = RTHANDLETYPE_FILE;
+                hStdIn.enmType = RTHANDLETYPE_FILE;
 
-                const char *pszUser;
-# ifdef RT_OS_WINDOWS
-                /* If a domain name is given, construct an UPN (User Principle Name) with
-                 * the domain name built-in, e.g. "joedoe at example.com". */
-                char *pszUserUPN = NULL;
-                if (strlen(pSessionThread->StartupInfo.szDomain))
+                RTHANDLE hStdOutAndErr;
+                rc = RTFileOpenBitBucket(&hStdOutAndErr.u.hFile, RTFILE_O_WRITE);
+                if (RT_SUCCESS(rc))
                 {
-                    int cbUserUPN = RTStrAPrintf(&pszUserUPN, "%s@%s",
-                                                 pSessionThread->StartupInfo.szUser,
-                                                 pSessionThread->StartupInfo.szDomain);
-                    if (cbUserUPN > 0)
+                    hStdOutAndErr.enmType = RTHANDLETYPE_FILE;
+
+                    const char *pszUser = pSessionThread->StartupInfo.szUser;
+# ifdef RT_OS_WINDOWS
+                    /* If a domain name is given, construct an UPN (User Principle Name) with
+                     * the domain name built-in, e.g. "joedoe at example.com". */
+                    char *pszUserUPN = NULL;
+                    if (strlen(pSessionThread->StartupInfo.szDomain))
                     {
-                        pszUser = pszUserUPN;
-                        VGSvcVerbose(3, "Using UPN: %s\n", pszUserUPN);
+                        int cbUserUPN = RTStrAPrintf(&pszUserUPN, "%s@%s",
+                                                     pSessionThread->StartupInfo.szUser,
+                                                     pSessionThread->StartupInfo.szDomain);
+                        if (cbUserUPN > 0)
+                        {
+                            pszUser = pszUserUPN;
+                            VGSvcVerbose(3, "Using UPN: %s\n", pszUserUPN);
+                        }
                     }
-                }
-
-                if (!pszUserUPN) /* Fallback */
 # endif
-                    pszUser = pSessionThread->StartupInfo.szUser;
 
-                rc = RTProcCreateEx(pszExeName, apszArgs, RTENV_DEFAULT, fProcCreate,
-                                    &hStdIn, &hStdOutAndErr, &hStdOutAndErr,
-                                    !fAnonymous ? pszUser : NULL,
-                                    !fAnonymous ? pSessionThread->StartupInfo.szPassword : NULL,
-                                    &pSessionThread->hProcess);
+                    rc = RTProcCreateEx(pszExeName, apszArgs, RTENV_DEFAULT, fProcCreate,
+                                        &hStdIn, &hStdOutAndErr, &hStdOutAndErr,
+                                        !fAnonymous ? pszUser : NULL,
+                                        !fAnonymous ? pSessionThread->StartupInfo.szPassword : NULL,
+                                        &pSessionThread->hProcess);
 # ifdef RT_OS_WINDOWS
-                if (pszUserUPN)
-                    RTStrFree(pszUserUPN);
+                    if (pszUserUPN)
+                        RTStrFree(pszUserUPN);
 # endif
-                RTFileClose(hStdOutAndErr.u.hFile);
-            }
+                    RTFileClose(hStdOutAndErr.u.hFile);
+                }
 
-            RTFileClose(hStdIn.u.hFile);
+                RTFileClose(hStdIn.u.hFile);
+            }
         }
 #endif
     }
@@ -2012,6 +2013,7 @@ int VGSvcGstCtrlSessionThreadCreate(PRTLISTANCHOR pList, const PVBOXSERVICECTRLS
  */
 int VGSvcGstCtrlSessionThreadWait(PVBOXSERVICECTRLSESSIONTHREAD pThread, uint32_t uTimeoutMS, uint32_t fFlags)
 {
+    RT_NOREF1(fFlags);
     AssertPtrReturn(pThread, VERR_INVALID_POINTER);
     /** @todo Validate closing flags. */
 
diff --git a/src/VBox/Additions/common/VBoxService/VBoxServiceCpuHotPlug.cpp b/src/VBox/Additions/common/VBoxService/VBoxServiceCpuHotPlug.cpp
index 898ae35..93dea61 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxServiceCpuHotPlug.cpp
+++ b/src/VBox/Additions/common/VBoxService/VBoxServiceCpuHotPlug.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -27,6 +27,7 @@
  * Currently only supported for linux guests.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/Additions/common/VBoxService/VBoxServiceInternal.h b/src/VBox/Additions/common/VBoxService/VBoxServiceInternal.h
index 238fb48..b5bd157 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxServiceInternal.h
+++ b/src/VBox/Additions/common/VBoxService/VBoxServiceInternal.h
@@ -20,7 +20,7 @@
 
 #include <stdio.h>
 #ifdef RT_OS_WINDOWS
-# include <Windows.h>
+# include <iprt/win/windows.h>
 # include <process.h> /* Needed for file version information. */
 #endif
 
diff --git a/src/VBox/Additions/common/VBoxService/VBoxServicePageSharing.cpp b/src/VBox/Additions/common/VBoxService/VBoxServicePageSharing.cpp
index aad26f2..62fa66c 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxServicePageSharing.cpp
+++ b/src/VBox/Additions/common/VBoxService/VBoxServicePageSharing.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -55,6 +55,7 @@
 #include <iprt/file.h>
 #include <iprt/string.h>
 #include <iprt/semaphore.h>
+#include <iprt/string.h>
 #include <iprt/system.h>
 #include <iprt/thread.h>
 #include <iprt/time.h>
@@ -185,18 +186,25 @@ static void vgsvcPageSharingRegisterModule(PVGSVCPGSHKNOWNMOD pModule, bool fVal
 
     unsigned i;
     UINT     cbFileVersion;
-    char    *lpszFileVersion;
+    char    *pszFileVersion = NULL; /* Shut up MSC */
     unsigned cTranslationBlocks = cbTranslate/sizeof(struct LANGANDCODEPAGE);
 
-    for(i = 0; i < cTranslationBlocks; i++)
+    pModule->szFileVersion[0] = '\0';
+    for (i = 0; i < cTranslationBlocks; i++)
     {
         /* Fetch file version string. */
         char   szFileVersionLocation[256];
 
+/** @todo r=bird: Mixing ANSI and TCHAR crap again.  This code is a mess.  We
+ * always use the wide version of the API and convert to UTF-8/whatever. */
+
         sprintf(szFileVersionLocation, TEXT("\\StringFileInfo\\%04x%04x\\FileVersion"), lpTranslate[i].wLanguage, lpTranslate[i].wCodePage);
-        fRet = VerQueryValue(pVersionInfo, szFileVersionLocation, (LPVOID *)&lpszFileVersion, &cbFileVersion);
+        fRet = VerQueryValue(pVersionInfo, szFileVersionLocation, (LPVOID *)&pszFileVersion, &cbFileVersion);
         if (fRet)
+        {
+            RTStrCopy(pModule->szFileVersion, sizeof(pModule->szFileVersion), pszFileVersion);
             break;
+        }
     }
     if (i == cTranslationBlocks)
     {
@@ -204,9 +212,6 @@ static void vgsvcPageSharingRegisterModule(PVGSVCPGSHKNOWNMOD pModule, bool fVal
         goto end;
     }
 
-    _snprintf(pModule->szFileVersion, sizeof(pModule->szFileVersion), "%s", lpszFileVersion);
-    pModule->szFileVersion[RT_ELEMENTS(pModule->szFileVersion) - 1] = 0;
-
     unsigned idxRegion = 0;
 
     if (fValidateMemory)
@@ -360,7 +365,7 @@ static void vgsvcPageSharingInspectModules(DWORD dwProcessId, PAVLPVNODECORE *pp
                 VGSvcVerbose(3, "\n\n     MODULE NAME:     %s",           ModuleInfo.szModule );
                 VGSvcVerbose(3, "\n     executable     = %s",             ModuleInfo.szExePath );
                 VGSvcVerbose(3, "\n     process ID     = 0x%08X",         ModuleInfo.th32ProcessID );
-                VGSvcVerbose(3, "\n     base address   = 0x%08X", (DWORD) ModuleInfo.modBaseAddr );
+                VGSvcVerbose(3, "\n     base address   = %#010p", (uintptr_t) ModuleInfo.modBaseAddr );
                 VGSvcVerbose(3, "\n     base size      = %d",             ModuleInfo.modBaseSize );
 
                 pRec = &pModule->Core;
@@ -509,7 +514,7 @@ static void vgsvcPageSharingInspectGuest(void)
 
                     VGSvcVerbose(3, "\n\n   KERNEL  MODULE NAME:     %s",     pModule->Info.szModule );
                     VGSvcVerbose(3, "\n     executable     = %s",             pModule->Info.szExePath );
-                    VGSvcVerbose(3, "\n     base address   = 0x%08X", (DWORD) pModule->Info.modBaseAddr );
+                    VGSvcVerbose(3, "\n     base address   = %#010p", (uintptr_t)pModule->Info.modBaseAddr );
                     VGSvcVerbose(3, "\n     flags          = 0x%08X",         pSystemModules->Modules[i].Flags);
                     VGSvcVerbose(3, "\n     base size      = %d",             pModule->Info.modBaseSize );
 
diff --git a/src/VBox/Additions/common/VBoxService/VBoxServicePropCache.cpp b/src/VBox/Additions/common/VBoxService/VBoxServicePropCache.cpp
index 7e36a2b..567902c 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxServicePropCache.cpp
+++ b/src/VBox/Additions/common/VBoxService/VBoxServicePropCache.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -35,6 +35,7 @@
 static PVBOXSERVICEVEPROPCACHEENTRY vgsvcPropCacheFindInternal(PVBOXSERVICEVEPROPCACHE pCache, const char *pszName,
                                                                uint32_t fFlags)
 {
+    RT_NOREF1(fFlags);
     AssertPtrReturn(pCache, NULL);
     AssertPtrReturn(pszName, NULL);
 
@@ -316,6 +317,7 @@ int VGSvcPropCacheUpdate(PVBOXSERVICEVEPROPCACHE pCache, const char *pszName, co
 int VGSvcPropCacheUpdateByPath(PVBOXSERVICEVEPROPCACHE pCache, const char *pszValue, uint32_t fFlags,
                                const char *pszPathFormat, ...)
 {
+    RT_NOREF1(fFlags);
     AssertPtrReturn(pCache, VERR_INVALID_POINTER);
     AssertPtrReturn(pszPathFormat, VERR_INVALID_POINTER);
 
diff --git a/src/VBox/Additions/common/VBoxService/VBoxServicePropCache.h b/src/VBox/Additions/common/VBoxService/VBoxServicePropCache.h
index f6006b0..065e336 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxServicePropCache.h
+++ b/src/VBox/Additions/common/VBoxService/VBoxServicePropCache.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxService/VBoxServiceResource-win.h b/src/VBox/Additions/common/VBoxService/VBoxServiceResource-win.h
index 3a6210c..b325809 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxServiceResource-win.h
+++ b/src/VBox/Additions/common/VBoxService/VBoxServiceResource-win.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxService/VBoxServiceStats.cpp b/src/VBox/Additions/common/VBoxService/VBoxServiceStats.cpp
index 85c5316..bd7e517 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxServiceStats.cpp
+++ b/src/VBox/Additions/common/VBoxService/VBoxServiceStats.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -24,6 +24,7 @@
  * gets registered by Machine::i_registerMetrics in Main.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
@@ -32,7 +33,7 @@
 #  undef _WIN32_WINNT
 #  define _WIN32_WINNT 0x501
 # endif
-# include <windows.h>
+# include <iprt/win/windows.h>
 # include <psapi.h>
 # include <winternl.h>
 
@@ -612,7 +613,7 @@ static void vgsvcVMStatsReport(void)
     }
 
 #else
-    /* todo: implement for other platforms. */
+    /** @todo implement for other platforms. */
 
 #endif
 }
diff --git a/src/VBox/Additions/common/VBoxService/VBoxServiceTimeSync.cpp b/src/VBox/Additions/common/VBoxService/VBoxServiceTimeSync.cpp
index 92276bb..eeb9dd4 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxServiceTimeSync.cpp
+++ b/src/VBox/Additions/common/VBoxService/VBoxServiceTimeSync.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -84,7 +84,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #ifdef RT_OS_WINDOWS
-# include <Windows.h>
+# include <iprt/win/windows.h>
 #else
 # include <unistd.h>
 # include <errno.h>
diff --git a/src/VBox/Additions/common/VBoxService/VBoxServiceToolBox.cpp b/src/VBox/Additions/common/VBoxService/VBoxServiceToolBox.cpp
index 89526df..6f16050 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxServiceToolBox.cpp
+++ b/src/VBox/Additions/common/VBoxService/VBoxServiceToolBox.cpp
@@ -49,6 +49,7 @@
 
 using namespace guestControl;
 
+
 /*********************************************************************************************************************************
 *   Defined Constants And Macros                                                                                                 *
 *********************************************************************************************************************************/
@@ -411,7 +412,6 @@ static RTEXITCODE vgsvcToolboxCat(int argc, char **argv)
     RTGetOptInit(&GetState, argc, argv, s_aOptions, RT_ELEMENTS(s_aOptions), 1 /*iFirst*/, 0 /*fFlags*/);
 
     int rc = VINF_SUCCESS;
-    bool fUsageOK = true;
 
     const char *pszOutput = NULL;
     RTFILE hOutput = NIL_RTFILE;
@@ -1102,7 +1102,6 @@ static RTEXITCODE vgsvcToolboxMkTemp(int argc, char **argv)
     rc = RTGetOptInit(&GetState, argc, argv, s_aOptions, RT_ELEMENTS(s_aOptions), 1 /*iFirst*/, RTGETOPTINIT_FLAGS_OPTS_FIRST);
     AssertRCReturn(rc, RTEXITCODE_INIT);
 
-    bool        fVerbose     = false;
     uint32_t    fFlags       = 0;
     uint32_t    fOutputFlags = 0;
     int         cNonOptions  = 0;
diff --git a/src/VBox/Additions/common/VBoxService/VBoxServiceUtils.cpp b/src/VBox/Additions/common/VBoxService/VBoxServiceUtils.cpp
index bffe30d..97ccad1 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxServiceUtils.cpp
+++ b/src/VBox/Additions/common/VBoxService/VBoxServiceUtils.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -20,7 +20,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #ifdef RT_OS_WINDOWS
-# include <Windows.h>
+# include <iprt/win/windows.h>
 # include <iprt/param.h>
 # include <iprt/path.h>
 #endif
@@ -55,7 +55,7 @@ int VGSvcReadProp(uint32_t u32ClientId, const char *pszPropName, char **ppszValu
 
     uint32_t    cbBuf = _1K;
     void       *pvBuf = NULL;
-    int         rc;
+    int         rc    = VINF_SUCCESS;  /* MSC can't figure out the loop */
 
     *ppszValue = NULL;
 
diff --git a/src/VBox/Additions/common/VBoxService/VBoxServiceUtils.h b/src/VBox/Additions/common/VBoxService/VBoxServiceUtils.h
index e8f0f48..91ab163 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxServiceUtils.h
+++ b/src/VBox/Additions/common/VBoxService/VBoxServiceUtils.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo-win.cpp b/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo-win.cpp
index 6356880..fbe6f7d 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo-win.cpp
+++ b/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -23,7 +23,7 @@
 # undef  _WIN32_WINNT
 # define _WIN32_WINNT 0x0600 /* QueryFullProcessImageNameW in recent SDKs. */
 #endif
-#include <Windows.h>
+#include <iprt/win/windows.h>
 #include <wtsapi32.h>        /* For WTS* calls. */
 #include <psapi.h>           /* EnumProcesses. */
 #include <Ntsecapi.h>        /* Needed for process security information. */
@@ -140,6 +140,8 @@ static OSVERSIONINFOEXA                         g_WinVersion;
  */
 static DECLCALLBACK(int) vgsvcWinVmInfoInitOnce(void *pvIgnored)
 {
+    RT_NOREF1(pvIgnored);
+
     /* SECUR32 */
     RTLDRMOD hLdrMod;
     int rc = RTLdrLoadSystem("secur32.dll", true, &hLdrMod);
@@ -348,6 +350,7 @@ static int vgsvcVMInfoWinProcessesGetTokenInfo(PVBOXSERVICEVMINFOPROC pProc, TOK
             default:
                 VGSvcError("Token class not implemented: %d\n", tkClass);
                 rc = VERR_NOT_IMPLEMENTED;
+                dwTokenInfoSize = 0; /* Shut up MSC. */
                 break;
         }
 
@@ -630,6 +633,8 @@ static void vgsvcVMInfoWinProcessesFree(DWORD cProcs, PVBOXSERVICEVMINFOPROC paP
  * @param   puTerminalSession   Where to return terminal session number.
  *                              Optional.
  */
+/** @todo r=bird: The 'Has' indicates a predicate function, which this is
+ *        not.  Predicate functions always returns bool. */
 static uint32_t vgsvcVMInfoWinSessionHasProcesses(PLUID pSession, PVBOXSERVICEVMINFOPROC const paProcs, DWORD cProcs,
                                                   PULONG puTerminalSession)
 {
@@ -639,7 +644,7 @@ static uint32_t vgsvcVMInfoWinSessionHasProcesses(PLUID pSession, PVBOXSERVICEVM
         return 0;
     }
     if (!g_pfnLsaGetLogonSessionData)
-        return VERR_NOT_SUPPORTED;
+        return 0;
 
     PSECURITY_LOGON_SESSION_DATA pSessionData = NULL;
     NTSTATUS rcNt = g_pfnLsaGetLogonSessionData(pSession, &pSessionData);
@@ -797,7 +802,6 @@ static bool vgsvcVMInfoWinIsLoggedIn(PVBOXSERVICEVMINFOUSER pUserInfo, PLUID pSe
      * remotely over native RDP.
      */
     bool fFoundUser = false;
-    DWORD dwErr = NO_ERROR;
     if (   IsValidSid(pSessionData->Sid)
         && (   (SECURITY_LOGON_TYPE)pSessionData->LogonType == Interactive
             || (SECURITY_LOGON_TYPE)pSessionData->LogonType == RemoteInteractive
@@ -972,44 +976,47 @@ static int vgsvcVMInfoWinWriteLastInput(PVBOXSERVICEVEPROPCACHE pCache, const ch
 
             rc = RTLocalIpcSessionWrite(hSession, &ipcHdr, sizeof(ipcHdr));
 
-            VBOXTRAYIPCRES_USERLASTINPUT ipcRes;
             if (RT_SUCCESS(rc))
-                rc = RTLocalIpcSessionRead(hSession, &ipcRes, sizeof(ipcRes), NULL /* Exact read */);
-            if (   RT_SUCCESS(rc)
-                /* If uLastInput is set to UINT32_MAX VBoxTray was not able to retrieve the
-                 * user's last input time. This might happen when running on Windows NT4 or older. */
-                && ipcRes.uLastInput != UINT32_MAX)
             {
-                userState = (ipcRes.uLastInput * 1000) < g_uVMInfoUserIdleThresholdMS
-                          ? VBoxGuestUserState_InUse
-                          : VBoxGuestUserState_Idle;
-
-                rc = VGSvcUserUpdateF(pCache, pszUser, pszDomain, "UsageState",
-                                      userState == VBoxGuestUserState_InUse ? "InUse" : "Idle");
-
-                /*
-                 * Note: vboxServiceUserUpdateF can return VINF_NO_CHANGE in case there wasn't anything
-                 *       to update. So only report the user's status to host when we really got something
-                 *       new.
-                 */
-                fReportToHost = rc == VINF_SUCCESS;
-                VGSvcVerbose(4, "User '%s' (domain '%s') is idle for %RU32, fReportToHost=%RTbool\n",
-                             pszUser, pszDomain ? pszDomain : "<None>", ipcRes.uLastInput, fReportToHost);
+                VBOXTRAYIPCRES_USERLASTINPUT ipcRes;
+                rc = RTLocalIpcSessionRead(hSession, &ipcRes, sizeof(ipcRes), NULL /* Exact read */);
+                if (   RT_SUCCESS(rc)
+                    /* If uLastInput is set to UINT32_MAX VBoxTray was not able to retrieve the
+                     * user's last input time. This might happen when running on Windows NT4 or older. */
+                    && ipcRes.uLastInput != UINT32_MAX)
+                {
+                    userState = (ipcRes.uLastInput * 1000) < g_uVMInfoUserIdleThresholdMS
+                              ? VBoxGuestUserState_InUse
+                              : VBoxGuestUserState_Idle;
+
+                    rc = VGSvcUserUpdateF(pCache, pszUser, pszDomain, "UsageState",
+                                          userState == VBoxGuestUserState_InUse ? "InUse" : "Idle");
+
+                    /*
+                     * Note: vboxServiceUserUpdateF can return VINF_NO_CHANGE in case there wasn't anything
+                     *       to update. So only report the user's status to host when we really got something
+                     *       new.
+                     */
+                    fReportToHost = rc == VINF_SUCCESS;
+                    VGSvcVerbose(4, "User '%s' (domain '%s') is idle for %RU32, fReportToHost=%RTbool\n",
+                                 pszUser, pszDomain ? pszDomain : "<None>", ipcRes.uLastInput, fReportToHost);
 
 #if 0 /* Do we want to write the idle time as well? */
-                    /* Also write the user's current idle time, if there is any. */
-                    if (userState == VBoxGuestUserState_Idle)
-                        rc = vgsvcUserUpdateF(pCache, pszUser, pszDomain, "IdleTimeMs", "%RU32", ipcRes.uLastInputMs);
-                    else
-                        rc = vgsvcUserUpdateF(pCache, pszUser, pszDomain, "IdleTimeMs", NULL /* Delete property */);
+                        /* Also write the user's current idle time, if there is any. */
+                        if (userState == VBoxGuestUserState_Idle)
+                            rc = vgsvcUserUpdateF(pCache, pszUser, pszDomain, "IdleTimeMs", "%RU32", ipcRes.uLastInputMs);
+                        else
+                            rc = vgsvcUserUpdateF(pCache, pszUser, pszDomain, "IdleTimeMs", NULL /* Delete property */);
 
-                    if (RT_SUCCESS(rc))
+                        if (RT_SUCCESS(rc))
+#endif
+                }
+#ifdef DEBUG
+                else if (RT_SUCCESS(rc) && ipcRes.uLastInput == UINT32_MAX)
+                    VGSvcVerbose(4, "Last input for user '%s' is not supported, skipping\n", pszUser, rc);
 #endif
             }
 #ifdef DEBUG
-            else if (ipcRes.uLastInput == UINT32_MAX)
-                VGSvcVerbose(4, "Last input for user '%s' is not supported, skipping\n", pszUser, rc);
-
             VGSvcVerbose(4, "Getting last input for user '%s' ended with rc=%Rrc\n", pszUser, rc);
 #endif
             int rc2 = RTLocalIpcSessionClose(hSession);
@@ -1155,7 +1162,7 @@ int VGSvcVMInfoWinWriteUsers(PVBOXSERVICEVEPROPCACHE pCache, char **ppszUserList
 
                     /* Retrieve assigned processes of current session. */
                     uint32_t cCurSessionProcs = vgsvcVMInfoWinSessionHasProcesses(&paSessions[i], paProcs, cProcs,
-                                                                                        NULL /* Terminal session ID */);
+                                                                                  NULL /* Terminal session ID */);
                     /* Don't return here when current session does not have assigned processes
                      * anymore -- in that case we have to search through the unique users list below
                      * and see if got a stale user/session entry. */
diff --git a/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp b/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp
index 997fc6f..c273f7e 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp
+++ b/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -56,10 +56,10 @@
 #  undef _WIN32_WINNT
 #  define _WIN32_WINNT 0x0500
 # endif
-# include <winsock2.h>
-# include <iphlpapi.h>
-# include <ws2tcpip.h>
-# include <windows.h>
+# include <iprt/win/winsock2.h>
+# include <iprt/win/iphlpapi.h>
+# include <iprt/win/ws2tcpip.h>
+# include <iprt/win/windows.h>
 # include <Ntsecapi.h>
 #else
 # define __STDC_LIMIT_MACROS
@@ -72,7 +72,7 @@
 # include <pwd.h> /* getpwuid */
 # include <unistd.h>
 # if !defined(RT_OS_OS2) && !defined(RT_OS_FREEBSD) && !defined(RT_OS_HAIKU)
-#  include <utmpx.h> /* @todo FreeBSD 9 should have this. */
+#  include <utmpx.h> /** @todo FreeBSD 9 should have this. */
 # endif
 # ifdef RT_OS_OS2
 #  include <net/if_dl.h>
@@ -81,7 +81,7 @@
 #  include <sys/sockio.h>
 #  include <net/if_arp.h>
 # endif
-# if defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD)
+# if defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD) || defined(RT_OS_NETBSD)
 #  include <ifaddrs.h> /* getifaddrs, freeifaddrs */
 #  include <net/if_dl.h> /* LLADDR */
 #  include <netdb.h> /* getnameinfo */
@@ -935,7 +935,6 @@ static int vgsvcVMInfoWriteUsers(void)
  */
 static int vgsvcVMInfoWriteNetwork(void)
 {
-    int         rc = VINF_SUCCESS;
     uint32_t    cIfsReported = 0;
     char        szPropPath[256];
 
@@ -1089,11 +1088,11 @@ static int vgsvcVMInfoWriteNetwork(void)
     /** @todo Haiku: implement network info. retreival */
     return VERR_NOT_IMPLEMENTED;
 
-#elif defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD)
+#elif defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD) || defined(RT_OS_NETBSD)
     struct ifaddrs *pIfHead = NULL;
 
     /* Get all available interfaces */
-    rc = getifaddrs(&pIfHead);
+    int rc = getifaddrs(&pIfHead);
     if (rc < 0)
     {
         rc = RTErrConvertFromErrno(errno);
@@ -1107,7 +1106,7 @@ static int vgsvcVMInfoWriteNetwork(void)
         /*
          * Only AF_INET and no loopback interfaces
          */
-        /** @todo: IPv6 interfaces */
+        /** @todo IPv6 interfaces */
         if (   pIfCurr->ifa_addr->sa_family == AF_INET
             && !(pIfCurr->ifa_flags & IFF_LOOPBACK))
         {
@@ -1171,7 +1170,7 @@ static int vgsvcVMInfoWriteNetwork(void)
     int sd = socket(AF_INET, SOCK_DGRAM, 0);
     if (sd < 0)
     {
-        rc = RTErrConvertFromErrno(errno);
+        int rc = RTErrConvertFromErrno(errno);
         VGSvcError("VMInfo/Network: Failed to get a socket: Error %Rrc\n", rc);
         return rc;
     }
@@ -1181,7 +1180,7 @@ static int vgsvcVMInfoWriteNetwork(void)
     int             cbBuf   = s_cbBuf;
     char           *pchBuf;
     struct ifconf   IfConf;
-    rc = VINF_SUCCESS;
+    int rc = VINF_SUCCESS;
     for (;;)
     {
         pchBuf = (char *)RTMemTmpAllocZ(cbBuf);
diff --git a/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.h b/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.h
index b3e125a..6e897c2 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.h
+++ b/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/VBoxService/testcase/Makefile.kmk b/src/VBox/Additions/common/VBoxService/testcase/Makefile.kmk
index 9b7f4d8..060fa1d 100644
--- a/src/VBox/Additions/common/VBoxService/testcase/Makefile.kmk
+++ b/src/VBox/Additions/common/VBoxService/testcase/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2010-2015 Oracle Corporation
+# Copyright (C) 2010-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ PROGRAMS.win += tstUserInfo
 #
 # tstUserInfo
 #
-tstUserInfo_TEMPLATE    = NewVBoxGuestR3Exe
+tstUserInfo_TEMPLATE    = VBoxGuestR3Exe
 tstUserInfo_SOURCES     = \
 	tstUserInfo.cpp
 
diff --git a/src/VBox/Additions/common/VBoxService/testcase/tstUserInfo.cpp b/src/VBox/Additions/common/VBoxService/testcase/tstUserInfo.cpp
index 6d9c498..ed72210 100644
--- a/src/VBox/Additions/common/VBoxService/testcase/tstUserInfo.cpp
+++ b/src/VBox/Additions/common/VBoxService/testcase/tstUserInfo.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -20,8 +20,8 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #ifdef RT_OS_WINDOWS
-# include <Windows.h>
-# include <Shlobj.h>
+# include <iprt/win/windows.h>
+# include <iprt/win/shlobj.h>
 #endif
 
 #include <iprt/initterm.h>
diff --git a/src/VBox/Additions/common/VBoxVideo/HGSMIBase.cpp b/src/VBox/Additions/common/VBoxVideo/HGSMIBase.cpp
index 836600e..0e0e6b1 100644
--- a/src/VBox/Additions/common/VBoxVideo/HGSMIBase.cpp
+++ b/src/VBox/Additions/common/VBoxVideo/HGSMIBase.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -41,8 +41,8 @@ static void HGSMINotifyHostCmdComplete(PHGSMIHOSTCOMMANDCONTEXT pCtx, HGSMIOFFSE
  * @param  pvMem  pointer into the heap as mapped in @a pCtx to the command to
  *                be completed
  */
-RTDECL(void) VBoxHGSMIHostCmdComplete(PHGSMIHOSTCOMMANDCONTEXT pCtx,
-                                      void *pvMem)
+DECLHIDDEN(void) VBoxHGSMIHostCmdComplete(PHGSMIHOSTCOMMANDCONTEXT pCtx,
+                                          void *pvMem)
 {
     HGSMIBUFFERHEADER *pHdr = HGSMIBufferHeaderFromData(pvMem);
     HGSMIOFFSET offMem = HGSMIPointerToOffset(&pCtx->areaCtx, pHdr);
@@ -86,7 +86,7 @@ static void hgsmiHostCommandQueryProcess(PHGSMIHOSTCOMMANDCONTEXT pCtx)
 
 
 /** Drain the host command queue. */
-RTDECL(void) VBoxHGSMIProcessHostQueue(PHGSMIHOSTCOMMANDCONTEXT pCtx)
+DECLHIDDEN(void) VBoxHGSMIProcessHostQueue(PHGSMIHOSTCOMMANDCONTEXT pCtx)
 {
     while (pCtx->pfHostFlags->u32HostFlags & HGSMIHOSTFLAGS_COMMANDS_PENDING)
     {
@@ -99,7 +99,7 @@ RTDECL(void) VBoxHGSMIProcessHostQueue(PHGSMIHOSTCOMMANDCONTEXT pCtx)
 
 
 /** Detect whether HGSMI is supported by the host. */
-RTDECL(bool) VBoxHGSMIIsSupported(void)
+DECLHIDDEN(bool) VBoxHGSMIIsSupported(void)
 {
     uint16_t DispiId;
 
@@ -122,10 +122,10 @@ RTDECL(bool) VBoxHGSMIIsSupported(void)
  * @param  u8Ch     the HGSMI channel to be used, set to the descriptor
  * @param  u16Op    the HGSMI command to be sent, set to the descriptor
  */
-RTDECL(void *) VBoxHGSMIBufferAlloc(PHGSMIGUESTCOMMANDCONTEXT pCtx,
-                                    HGSMISIZE cbData,
-                                    uint8_t u8Ch,
-                                    uint16_t u16Op)
+DECLHIDDEN(void *) VBoxHGSMIBufferAlloc(PHGSMIGUESTCOMMANDCONTEXT pCtx,
+                                        HGSMISIZE cbData,
+                                        uint8_t u8Ch,
+                                        uint16_t u16Op)
 {
 #ifdef VBOX_WDDM_MINIPORT
     return VBoxSHGSMIHeapAlloc (&pCtx->heapCtx, cbData, u8Ch, u16Op);
@@ -141,8 +141,8 @@ RTDECL(void *) VBoxHGSMIBufferAlloc(PHGSMIGUESTCOMMANDCONTEXT pCtx,
  * @param  pCtx      the context containing the heap used
  * @param  pvBuffer  the pointer returned by @a VBoxHGSMIBufferAlloc
  */
-RTDECL(void) VBoxHGSMIBufferFree(PHGSMIGUESTCOMMANDCONTEXT pCtx,
-                                 void *pvBuffer)
+DECLHIDDEN(void) VBoxHGSMIBufferFree(PHGSMIGUESTCOMMANDCONTEXT pCtx,
+                                     void *pvBuffer)
 {
 #ifdef VBOX_WDDM_MINIPORT
     VBoxSHGSMIHeapFree (&pCtx->heapCtx, pvBuffer);
@@ -158,8 +158,8 @@ RTDECL(void) VBoxHGSMIBufferFree(PHGSMIGUESTCOMMANDCONTEXT pCtx,
  * @param  pCtx      the context containing the heap used
  * @param  pvBuffer  the pointer returned by @a VBoxHGSMIBufferAlloc
  */
-RTDECL(int) VBoxHGSMIBufferSubmit(PHGSMIGUESTCOMMANDCONTEXT pCtx,
-                                  void *pvBuffer)
+DECLHIDDEN(int) VBoxHGSMIBufferSubmit(PHGSMIGUESTCOMMANDCONTEXT pCtx,
+                                      void *pvBuffer)
 {
     /* Initialize the buffer and get the offset for port IO. */
     HGSMIOFFSET offBuffer = HGSMIHeapBufferOffset (HGSMIGUESTCMDHEAP_GET(&pCtx->heapCtx), pvBuffer);
@@ -216,8 +216,8 @@ static int vboxHGSMIReportFlagsLocation(PHGSMIGUESTCOMMANDCONTEXT pCtx,
  * @param    offLocation           the offset chosen for the flags withing guest
  *                                 VRAM.
  */
-RTDECL(int) VBoxHGSMIReportFlagsLocation(PHGSMIGUESTCOMMANDCONTEXT pCtx,
-                                         HGSMIOFFSET offLocation)
+DECLHIDDEN(int) VBoxHGSMIReportFlagsLocation(PHGSMIGUESTCOMMANDCONTEXT pCtx,
+                                             HGSMIOFFSET offLocation)
 {
     return vboxHGSMIReportFlagsLocation(pCtx, offLocation);
 }
@@ -264,8 +264,8 @@ static int vboxHGSMISendCapsInfo(PHGSMIGUESTCOMMANDCONTEXT pCtx,
  * @param    pCtx                  the context of the guest heap to use.
  * @param    fCaps                 the capabilities to report, see VBVACAPS.
  */
-RTDECL(int) VBoxHGSMISendCapsInfo(PHGSMIGUESTCOMMANDCONTEXT pCtx,
-                                  uint32_t fCaps)
+DECLHIDDEN(int) VBoxHGSMISendCapsInfo(PHGSMIGUESTCOMMANDCONTEXT pCtx,
+                                      uint32_t fCaps)
 {
     return vboxHGSMISendCapsInfo(pCtx, fCaps);
 }
@@ -313,12 +313,12 @@ static int vboxHGSMIReportHostArea(PHGSMIGUESTCOMMANDCONTEXT pCtx,
  * @param  poffHostFlags        where to save the offset into the mapped area
  *                              of the host flags
  */
-RTDECL(void) VBoxHGSMIGetBaseMappingInfo(uint32_t cbVRAM,
-                                         uint32_t *poffVRAMBaseMapping,
-                                         uint32_t *pcbMapping,
-                                         uint32_t *poffGuestHeapMemory,
-                                         uint32_t *pcbGuestHeapMemory,
-                                         uint32_t *poffHostFlags)
+DECLHIDDEN(void) VBoxHGSMIGetBaseMappingInfo(uint32_t cbVRAM,
+                                             uint32_t *poffVRAMBaseMapping,
+                                             uint32_t *pcbMapping,
+                                             uint32_t *poffGuestHeapMemory,
+                                             uint32_t *pcbGuestHeapMemory,
+                                             uint32_t *poffHostFlags)
 {
     AssertPtrNullReturnVoid(poffVRAMBaseMapping);
     AssertPtrNullReturnVoid(pcbMapping);
@@ -350,11 +350,11 @@ RTDECL(void) VBoxHGSMIGetBaseMappingInfo(uint32_t cbVRAM,
  * @param  offVRAMGuestHeapMemory  the offset of the memory pointed to by
  *                                 @a pvGuestHeapMemory within the video RAM
  */
-RTDECL(int) VBoxHGSMISetupGuestContext(PHGSMIGUESTCOMMANDCONTEXT pCtx,
-                                       void *pvGuestHeapMemory,
-                                       uint32_t cbGuestHeapMemory,
-                                       uint32_t offVRAMGuestHeapMemory,
-                                       const HGSMIENV *pEnv)
+DECLHIDDEN(int) VBoxHGSMISetupGuestContext(PHGSMIGUESTCOMMANDCONTEXT pCtx,
+                                           void *pvGuestHeapMemory,
+                                           uint32_t cbGuestHeapMemory,
+                                           uint32_t offVRAMGuestHeapMemory,
+                                           const HGSMIENV *pEnv)
 {
     /** @todo should we be using a fixed ISA port value here? */
     pCtx->port = (RTIOPORT)VGA_PORT_HGSMI_GUEST;
@@ -380,11 +380,11 @@ RTDECL(int) VBoxHGSMISetupGuestContext(PHGSMIGUESTCOMMANDCONTEXT pCtx,
  *                             heap area
  * @param  pcbHostArea         where to store the size of the host heap area
  */
-RTDECL(void) VBoxHGSMIGetHostAreaMapping(PHGSMIGUESTCOMMANDCONTEXT pCtx,
-                                         uint32_t cbVRAM,
-                                         uint32_t offVRAMBaseMapping,
-                                         uint32_t *poffVRAMHostArea,
-                                         uint32_t *pcbHostArea)
+DECLHIDDEN(void) VBoxHGSMIGetHostAreaMapping(PHGSMIGUESTCOMMANDCONTEXT pCtx,
+                                             uint32_t cbVRAM,
+                                             uint32_t offVRAMBaseMapping,
+                                             uint32_t *poffVRAMHostArea,
+                                             uint32_t *pcbHostArea)
 {
     uint32_t offVRAMHostArea = offVRAMBaseMapping, cbHostArea = 0;
 
@@ -426,12 +426,12 @@ RTDECL(void) VBoxHGSMIGetHostAreaMapping(PHGSMIGUESTCOMMANDCONTEXT pCtx,
  * @param  offVRAMHostArea    offset of the host heap area into VRAM
  * @param  cbHostArea         size in bytes of the host heap area
  */
-RTDECL(void) VBoxHGSMISetupHostContext(PHGSMIHOSTCOMMANDCONTEXT pCtx,
-                                       void *pvBaseMapping,
-                                       uint32_t offHostFlags,
-                                       void *pvHostAreaMapping,
-                                       uint32_t offVRAMHostArea,
-                                       uint32_t cbHostArea)
+DECLHIDDEN(void) VBoxHGSMISetupHostContext(PHGSMIHOSTCOMMANDCONTEXT pCtx,
+                                           void *pvBaseMapping,
+                                           uint32_t offHostFlags,
+                                           void *pvHostAreaMapping,
+                                           uint32_t offVRAMHostArea,
+                                           uint32_t cbHostArea)
 {
     uint8_t *pu8HostFlags = ((uint8_t *)pvBaseMapping) + offHostFlags;
     pCtx->pfHostFlags = (HGSMIHOSTFLAGS *)pu8HostFlags;
@@ -455,11 +455,11 @@ RTDECL(void) VBoxHGSMISetupHostContext(PHGSMIHOSTCOMMANDCONTEXT pCtx,
  * @param  offVRAMHostArea       offset into VRAM of the host heap area
  * @param  cbHostArea            size in bytes of the host heap area
  */
-RTDECL(int) VBoxHGSMISendHostCtxInfo(PHGSMIGUESTCOMMANDCONTEXT pCtx,
-                                     HGSMIOFFSET offVRAMFlagsLocation,
-                                     uint32_t fCaps,
-                                     uint32_t offVRAMHostArea,
-                                     uint32_t cbHostArea)
+DECLHIDDEN(int) VBoxHGSMISendHostCtxInfo(PHGSMIGUESTCOMMANDCONTEXT pCtx,
+                                         HGSMIOFFSET offVRAMFlagsLocation,
+                                         uint32_t fCaps,
+                                         uint32_t offVRAMHostArea,
+                                         uint32_t cbHostArea)
 {
     Log(("VBoxVideo::vboxSetupAdapterInfo\n"));
 
@@ -513,8 +513,8 @@ static int testQueryConf(PHGSMIGUESTCOMMANDCONTEXT pCtx)
  * @param  u32DefValue defaut value
  * @param  pulValue  where to store the value of the parameter on success
  */
-RTDECL(int) VBoxQueryConfHGSMIDef(PHGSMIGUESTCOMMANDCONTEXT pCtx,
-                                  uint32_t u32Index, uint32_t u32DefValue, uint32_t *pulValue)
+DECLHIDDEN(int) VBoxQueryConfHGSMIDef(PHGSMIGUESTCOMMANDCONTEXT pCtx,
+                                      uint32_t u32Index, uint32_t u32DefValue, uint32_t *pulValue)
 {
     int rc = VINF_SUCCESS;
     VBVACONF32 *p;
@@ -547,8 +547,8 @@ RTDECL(int) VBoxQueryConfHGSMIDef(PHGSMIGUESTCOMMANDCONTEXT pCtx,
     return rc;
 }
 
-RTDECL(int) VBoxQueryConfHGSMI(PHGSMIGUESTCOMMANDCONTEXT pCtx,
-                               uint32_t u32Index, uint32_t *pulValue)
+DECLHIDDEN(int) VBoxQueryConfHGSMI(PHGSMIGUESTCOMMANDCONTEXT pCtx,
+                                   uint32_t u32Index, uint32_t *pulValue)
 {
     return VBoxQueryConfHGSMIDef(pCtx, u32Index, UINT32_MAX, pulValue);
 }
@@ -565,14 +565,14 @@ RTDECL(int) VBoxQueryConfHGSMI(PHGSMIGUESTCOMMANDCONTEXT pCtx,
  * @param  pPixels   pixel data, @see VMMDevReqMousePointer for the format
  * @param  cbLength  size in bytes of the pixel data
  */
-RTDECL(int)  VBoxHGSMIUpdatePointerShape(PHGSMIGUESTCOMMANDCONTEXT pCtx,
-                                         uint32_t fFlags,
-                                         uint32_t cHotX,
-                                         uint32_t cHotY,
-                                         uint32_t cWidth,
-                                         uint32_t cHeight,
-                                         uint8_t *pPixels,
-                                         uint32_t cbLength)
+DECLHIDDEN(int)  VBoxHGSMIUpdatePointerShape(PHGSMIGUESTCOMMANDCONTEXT pCtx,
+                                             uint32_t fFlags,
+                                             uint32_t cHotX,
+                                             uint32_t cHotY,
+                                             uint32_t cWidth,
+                                             uint32_t cHeight,
+                                             uint8_t *pPixels,
+                                             uint32_t cbLength)
 {
     VBVAMOUSEPOINTERSHAPE *p;
     uint32_t cbData = 0;
@@ -641,8 +641,8 @@ RTDECL(int)  VBoxHGSMIUpdatePointerShape(PHGSMIGUESTCOMMANDCONTEXT pCtx,
  * @returns  iprt status code.
  * @returns  VERR_NO_MEMORY      HGSMI heap allocation failed.
  */
-RTDECL(int) VBoxHGSMICursorPosition(PHGSMIGUESTCOMMANDCONTEXT pCtx, bool fReportPosition, uint32_t x, uint32_t y,
-                                    uint32_t *pxHost, uint32_t *pyHost)
+DECLHIDDEN(int) VBoxHGSMICursorPosition(PHGSMIGUESTCOMMANDCONTEXT pCtx, bool fReportPosition, uint32_t x, uint32_t y,
+                                        uint32_t *pxHost, uint32_t *pyHost)
 {
     int rc = VINF_SUCCESS;
     VBVACURSORPOSITION *p;
diff --git a/src/VBox/Additions/common/VBoxVideo/Modesetting.cpp b/src/VBox/Additions/common/VBoxVideo/Modesetting.cpp
index 002cf22..e13656b 100644
--- a/src/VBox/Additions/common/VBoxVideo/Modesetting.cpp
+++ b/src/VBox/Additions/common/VBoxVideo/Modesetting.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -36,7 +36,7 @@
  * @returns the right count on success or 1 on failure.
  * @param  pCtx  the context containing the heap to use
  */
-RTDECL(uint32_t) VBoxHGSMIGetMonitorCount(PHGSMIGUESTCOMMANDCONTEXT pCtx)
+DECLHIDDEN(uint32_t) VBoxHGSMIGetMonitorCount(PHGSMIGUESTCOMMANDCONTEXT pCtx)
 {
     /* Query the configured number of displays. */
     uint32_t cDisplays = 0;
@@ -54,7 +54,7 @@ RTDECL(uint32_t) VBoxHGSMIGetMonitorCount(PHGSMIGUESTCOMMANDCONTEXT pCtx)
  *
  * @returns the size
  */
-RTDECL(uint32_t) VBoxVideoGetVRAMSize(void)
+DECLHIDDEN(uint32_t) VBoxVideoGetVRAMSize(void)
 {
     /** @note A 32bit read on this port returns the VRAM size. */
     return VBoxVideoCmnPortReadUlong(VBE_DISPI_IOPORT_DATA);
@@ -67,7 +67,7 @@ RTDECL(uint32_t) VBoxVideoGetVRAMSize(void)
  *
  * @returns true if any width is allowed, false otherwise.
  */
-RTDECL(bool) VBoxVideoAnyWidthAllowed(void)
+DECLHIDDEN(bool) VBoxVideoAnyWidthAllowed(void)
 {
     unsigned DispiId;
     VBoxVideoCmnPortWriteUshort(VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_ID);
@@ -93,10 +93,10 @@ RTDECL(bool) VBoxVideoAnyWidthAllowed(void)
  *                   for all screens
  * @param  pvData    context data for @a pfnFill
  */
-RTDECL(int) VBoxHGSMISendViewInfo(PHGSMIGUESTCOMMANDCONTEXT pCtx,
-                                  uint32_t u32Count,
-                                  PFNHGSMIFILLVIEWINFO pfnFill,
-                                  void *pvData)
+DECLHIDDEN(int) VBoxHGSMISendViewInfo(PHGSMIGUESTCOMMANDCONTEXT pCtx,
+                                      uint32_t u32Count,
+                                      PFNHGSMIFILLVIEWINFO pfnFill,
+                                      void *pvData)
 {
     int rc;
     /* Issue the screen info command. */
@@ -130,10 +130,10 @@ RTDECL(int) VBoxHGSMISendViewInfo(PHGSMIGUESTCOMMANDCONTEXT pCtx,
  * @param  cx          the horizontal panning offset
  * @param  cy          the vertical panning offset
  */
-RTDECL(void) VBoxVideoSetModeRegisters(uint16_t cWidth, uint16_t cHeight,
-                                       uint16_t cVirtWidth, uint16_t cBPP,
-                                       uint16_t fFlags, uint16_t cx,
-                                       uint16_t cy)
+DECLHIDDEN(void) VBoxVideoSetModeRegisters(uint16_t cWidth, uint16_t cHeight,
+                                           uint16_t cVirtWidth, uint16_t cBPP,
+                                           uint16_t fFlags, uint16_t cx,
+                                           uint16_t cy)
 {
     /* set the mode characteristics */
     VBoxVideoCmnPortWriteUshort(VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_XRES);
@@ -174,9 +174,9 @@ RTDECL(void) VBoxVideoSetModeRegisters(uint16_t cWidth, uint16_t cHeight,
  * @param  pcBPP        where to store the colour depth of the mode
  * @param  pfFlags      where to store the flags for the mode
  */
-RTDECL(bool) VBoxVideoGetModeRegisters(uint16_t *pcWidth, uint16_t *pcHeight,
-                                       uint16_t *pcVirtWidth, uint16_t *pcBPP,
-                                       uint16_t *pfFlags)
+DECLHIDDEN(bool) VBoxVideoGetModeRegisters(uint16_t *pcWidth, uint16_t *pcHeight,
+                                           uint16_t *pcVirtWidth, uint16_t *pcBPP,
+                                           uint16_t *pfFlags)
 {
     uint16_t fFlags;
 
@@ -216,7 +216,7 @@ RTDECL(bool) VBoxVideoGetModeRegisters(uint16_t *pcWidth, uint16_t *pcHeight,
 /**
  * Disable our extended graphics mode and go back to VGA mode.
  */
-RTDECL(void) VBoxVideoDisableVBE(void)
+DECLHIDDEN(void) VBoxVideoDisableVBE(void)
 {
     VBoxVideoCmnPortWriteUshort(VBE_DISPI_IOPORT_INDEX,
                                 VBE_DISPI_INDEX_ENABLE);
@@ -239,16 +239,16 @@ RTDECL(void) VBoxVideoDisableVBE(void)
  * @param  cHeight   the mode height
  * @param  cBPP      the colour depth of the mode
  */
-RTDECL(void) VBoxHGSMIProcessDisplayInfo(PHGSMIGUESTCOMMANDCONTEXT pCtx,
-                                         uint32_t cDisplay,
-                                         int32_t  cOriginX,
-                                         int32_t  cOriginY,
-                                         uint32_t offStart,
-                                         uint32_t cbPitch,
-                                         uint32_t cWidth,
-                                         uint32_t cHeight,
-                                         uint16_t cBPP,
-                                         uint16_t fFlags)
+DECLHIDDEN(void) VBoxHGSMIProcessDisplayInfo(PHGSMIGUESTCOMMANDCONTEXT pCtx,
+                                             uint32_t cDisplay,
+                                             int32_t  cOriginX,
+                                             int32_t  cOriginY,
+                                             uint32_t offStart,
+                                             uint32_t cbPitch,
+                                             uint32_t cWidth,
+                                             uint32_t cHeight,
+                                             uint16_t cBPP,
+                                             uint16_t fFlags)
 {
     /* Issue the screen info command. */
     void *p = VBoxHGSMIBufferAlloc(pCtx,
@@ -292,8 +292,8 @@ RTDECL(void) VBoxHGSMIProcessDisplayInfo(PHGSMIGUESTCOMMANDCONTEXT pCtx,
  * @returns  iprt status code.
  * @returns  VERR_NO_MEMORY      HGSMI heap allocation failed.
  */
-RTDECL(int)      VBoxHGSMIUpdateInputMapping(PHGSMIGUESTCOMMANDCONTEXT pCtx, int32_t  cOriginX, int32_t  cOriginY,
-                                             uint32_t cWidth, uint32_t cHeight)
+DECLHIDDEN(int)      VBoxHGSMIUpdateInputMapping(PHGSMIGUESTCOMMANDCONTEXT pCtx, int32_t  cOriginX, int32_t  cOriginY,
+                                                 uint32_t cWidth, uint32_t cHeight)
 {
     int rc = VINF_SUCCESS;
     VBVAREPORTINPUTMAPPING *p;
@@ -330,8 +330,8 @@ RTDECL(int)      VBoxHGSMIUpdateInputMapping(PHGSMIGUESTCOMMANDCONTEXT pCtx, int
  * @returns  VERR_NO_MEMORY      HGSMI heap allocation failed.
  * @returns  VERR_NOT_SUPPORTED  Host does not support this command.
  */
-RTDECL(int) VBoxHGSMIGetModeHints(PHGSMIGUESTCOMMANDCONTEXT pCtx,
-                                  unsigned cScreens, VBVAMODEHINT *paHints)
+DECLHIDDEN(int) VBoxHGSMIGetModeHints(PHGSMIGUESTCOMMANDCONTEXT pCtx,
+                                      unsigned cScreens, VBVAMODEHINT *paHints)
 {
     int rc;
     AssertPtrReturn(paHints, VERR_INVALID_POINTER);
@@ -369,7 +369,7 @@ RTDECL(int) VBoxHGSMIGetModeHints(PHGSMIGUESTCOMMANDCONTEXT pCtx,
  * @returns The mask of VBVA_SCREEN_F_* flags or 0 if host does not support the request.
  * @param  pCtx  the context containing the heap to use
  */
-RTDECL(uint16_t) VBoxHGSMIGetScreenFlags(PHGSMIGUESTCOMMANDCONTEXT pCtx)
+DECLHIDDEN(uint16_t) VBoxHGSMIGetScreenFlags(PHGSMIGUESTCOMMANDCONTEXT pCtx)
 {
     uint32_t u32Flags = 0;
     int rc = VBoxQueryConfHGSMIDef(pCtx, VBOX_VBVA_CONF32_SCREEN_FLAGS, 0, &u32Flags);
diff --git a/src/VBox/Additions/common/VBoxVideo/VBVABase.cpp b/src/VBox/Additions/common/VBoxVideo/VBVABase.cpp
index 5e2c89b..cd52de1 100644
--- a/src/VBox/Additions/common/VBoxVideo/VBVABase.cpp
+++ b/src/VBox/Additions/common/VBoxVideo/VBVABase.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -97,9 +97,9 @@ static bool vboxVBVAInformHost(PVBVABUFFERCONTEXT pCtx,
 /*
  * Public hardware buffer methods.
  */
-RTDECL(bool) VBoxVBVAEnable(PVBVABUFFERCONTEXT pCtx,
-                            PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx,
-                            VBVABUFFER *pVBVA, int32_t cScreen)
+DECLHIDDEN(bool) VBoxVBVAEnable(PVBVABUFFERCONTEXT pCtx,
+                                PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx,
+                                VBVABUFFER *pVBVA, int32_t cScreen)
 {
     bool bRc = false;
 
@@ -136,9 +136,9 @@ RTDECL(bool) VBoxVBVAEnable(PVBVABUFFERCONTEXT pCtx,
     return bRc;
 }
 
-RTDECL(void) VBoxVBVADisable(PVBVABUFFERCONTEXT pCtx,
-                             PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx,
-                             int32_t cScreen)
+DECLHIDDEN(void) VBoxVBVADisable(PVBVABUFFERCONTEXT pCtx,
+                                 PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx,
+                                 int32_t cScreen)
 {
     LogFlowFunc(("\n"));
 
@@ -151,8 +151,8 @@ RTDECL(void) VBoxVBVADisable(PVBVABUFFERCONTEXT pCtx,
     return;
 }
 
-RTDECL(bool) VBoxVBVABufferBeginUpdate(PVBVABUFFERCONTEXT pCtx,
-                                       PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx)
+DECLHIDDEN(bool) VBoxVBVABufferBeginUpdate(PVBVABUFFERCONTEXT pCtx,
+                                           PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx)
 {
     bool bRc = false;
 
@@ -201,7 +201,7 @@ RTDECL(bool) VBoxVBVABufferBeginUpdate(PVBVABUFFERCONTEXT pCtx,
     return bRc;
 }
 
-RTDECL(void) VBoxVBVABufferEndUpdate(PVBVABUFFERCONTEXT pCtx)
+DECLHIDDEN(void) VBoxVBVABufferEndUpdate(PVBVABUFFERCONTEXT pCtx)
 {
     VBVARECORD *pRecord;
 
@@ -356,14 +356,14 @@ static bool vboxHwBufferWrite(PVBVABUFFERCONTEXT pCtx,
 /*
  * Public writer to the hardware buffer.
  */
-RTDECL(bool) VBoxVBVAWrite(PVBVABUFFERCONTEXT pCtx,
-                           PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx,
-                           const void *pv, uint32_t cb)
+DECLHIDDEN(bool) VBoxVBVAWrite(PVBVABUFFERCONTEXT pCtx,
+                               PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx,
+                               const void *pv, uint32_t cb)
 {
     return vboxHwBufferWrite (pCtx, pHGSMICtx, pv, cb);
 }
 
-RTDECL(bool) VBoxVBVAOrderSupported(PVBVABUFFERCONTEXT pCtx, unsigned code)
+DECLHIDDEN(bool) VBoxVBVAOrderSupported(PVBVABUFFERCONTEXT pCtx, unsigned code)
 {
     VBVABUFFER *pVBVA = pCtx->pVBVA;
 
@@ -380,9 +380,9 @@ RTDECL(bool) VBoxVBVAOrderSupported(PVBVABUFFERCONTEXT pCtx, unsigned code)
     return false;
 }
 
-RTDECL(void) VBoxVBVASetupBufferContext(PVBVABUFFERCONTEXT pCtx,
-                                        uint32_t offVRAMBuffer,
-                                        uint32_t cbBuffer)
+DECLHIDDEN(void) VBoxVBVASetupBufferContext(PVBVABUFFERCONTEXT pCtx,
+                                            uint32_t offVRAMBuffer,
+                                            uint32_t cbBuffer)
 {
     pCtx->offVRAMBuffer = offVRAMBuffer;
     pCtx->cbBuffer      = cbBuffer;
diff --git a/src/VBox/Additions/common/crOpenGL/DD_glc.py b/src/VBox/Additions/common/crOpenGL/DD_glc.py
index caf02fa..ac465b3 100644
--- a/src/VBox/Additions/common/crOpenGL/DD_glc.py
+++ b/src/VBox/Additions/common/crOpenGL/DD_glc.py
@@ -4,7 +4,7 @@ print """
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/crOpenGL/DD_glh.py b/src/VBox/Additions/common/crOpenGL/DD_glh.py
index 5fd889a..0e3de42 100644
--- a/src/VBox/Additions/common/crOpenGL/DD_glh.py
+++ b/src/VBox/Additions/common/crOpenGL/DD_glh.py
@@ -4,7 +4,7 @@ print """
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/crOpenGL/Linux_i386_glxapi_exports.py b/src/VBox/Additions/common/crOpenGL/Linux_i386_glxapi_exports.py
index 04937c7..30f14db 100755
--- a/src/VBox/Additions/common/crOpenGL/Linux_i386_glxapi_exports.py
+++ b/src/VBox/Additions/common/crOpenGL/Linux_i386_glxapi_exports.py
@@ -1,5 +1,5 @@
 """
-Copyright (C) 2009-2015 Oracle Corporation
+Copyright (C) 2009-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/crOpenGL/Makefile.kmk b/src/VBox/Additions/common/crOpenGL/Makefile.kmk
index 36c8352..926b8b6 100644
--- a/src/VBox/Additions/common/crOpenGL/Makefile.kmk
+++ b/src/VBox/Additions/common/crOpenGL/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2008-2015 Oracle Corporation
+# Copyright (C) 2008-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/crOpenGL/SunOS_i386_exports.py b/src/VBox/Additions/common/crOpenGL/SunOS_i386_exports.py
index 243475b..13497bd 100755
--- a/src/VBox/Additions/common/crOpenGL/SunOS_i386_exports.py
+++ b/src/VBox/Additions/common/crOpenGL/SunOS_i386_exports.py
@@ -1,5 +1,5 @@
 """
-Copyright (C) 2009-2015 Oracle Corporation
+Copyright (C) 2009-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/crOpenGL/SunOS_i386_exports_dri.py b/src/VBox/Additions/common/crOpenGL/SunOS_i386_exports_dri.py
index af0960d..f38d30a 100755
--- a/src/VBox/Additions/common/crOpenGL/SunOS_i386_exports_dri.py
+++ b/src/VBox/Additions/common/crOpenGL/SunOS_i386_exports_dri.py
@@ -1,5 +1,5 @@
 """
-Copyright (C) 2009-2015 Oracle Corporation
+Copyright (C) 2009-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/crOpenGL/SunOS_i386_glxapi_exports.py b/src/VBox/Additions/common/crOpenGL/SunOS_i386_glxapi_exports.py
index 76d67b8..16ac7bc 100755
--- a/src/VBox/Additions/common/crOpenGL/SunOS_i386_glxapi_exports.py
+++ b/src/VBox/Additions/common/crOpenGL/SunOS_i386_glxapi_exports.py
@@ -1,5 +1,5 @@
 """
-Copyright (C) 2009-2015 Oracle Corporation
+Copyright (C) 2009-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/crOpenGL/VBoxCROGL.rc b/src/VBox/Additions/common/crOpenGL/VBoxCROGL.rc
index 53971f4..cda4a5b 100644
--- a/src/VBox/Additions/common/crOpenGL/VBoxCROGL.rc
+++ b/src/VBox/Additions/common/crOpenGL/VBoxCROGL.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/crOpenGL/VBoxICDList.h b/src/VBox/Additions/common/crOpenGL/VBoxICDList.h
index d138e59..49ed339 100644
--- a/src/VBox/Additions/common/crOpenGL/VBoxICDList.h
+++ b/src/VBox/Additions/common/crOpenGL/VBoxICDList.h
@@ -2,7 +2,7 @@
  *
  * VirtualBox Windows NT/2000/XP guest OpenGL ICD
  *
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/crOpenGL/array/arrayspu.c b/src/VBox/Additions/common/crOpenGL/array/arrayspu.c
index 5352307..98fd234 100644
--- a/src/VBox/Additions/common/crOpenGL/array/arrayspu.c
+++ b/src/VBox/Additions/common/crOpenGL/array/arrayspu.c
@@ -881,14 +881,14 @@ arrayspu_DestroyContext( GLint ctx )
 }
 
 static void ARRAYSPU_APIENTRY
-arrayspu_VBoxAttachThread()
+arrayspu_VBoxAttachThread(void)
 {
     crStateVBoxAttachThread();
     array_spu.child.VBoxAttachThread();
 }
 
 static void ARRAYSPU_APIENTRY
-arrayspu_VBoxDetachThread()
+arrayspu_VBoxDetachThread(void)
 {
     crStateVBoxDetachThread();
     array_spu.child.VBoxDetachThread();
diff --git a/src/VBox/Additions/common/crOpenGL/array/arrayspu.rc b/src/VBox/Additions/common/crOpenGL/array/arrayspu.rc
index 83f4f3e..bcdbde5 100644
--- a/src/VBox/Additions/common/crOpenGL/array/arrayspu.rc
+++ b/src/VBox/Additions/common/crOpenGL/array/arrayspu.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/crOpenGL/context.c b/src/VBox/Additions/common/crOpenGL/context.c
index 5845b57..0bee246 100644
--- a/src/VBox/Additions/common/crOpenGL/context.c
+++ b/src/VBox/Additions/common/crOpenGL/context.c
@@ -134,6 +134,7 @@ void stubConFlush(GLint con)
 static void stubWindowCleanupForContextsCB(unsigned long key, void *data1, void *data2)
 {
     ContextInfo *context = (ContextInfo *) data1;
+    RT_NOREF(key);
 
     CRASSERT(context);
 
@@ -251,15 +252,19 @@ stubNewWindow( const char *dpyName, GLint visBits )
 }
 
 #ifdef GLX
+# if 0 /* unused */
 static XErrorHandler oldErrorHandler;
 static unsigned char lastXError = Success;
 
 static int 
 errorHandler (Display *dpy, XErrorEvent *e)
 {
+    RT_NOREF(dpy);
+
     lastXError = e->error_code;
     return 0;
 }
+# endif /* unused */
 #endif
 
 GLboolean
@@ -1094,6 +1099,9 @@ static void stubWindowCheckOwnerCB(unsigned long key, void *data1, void *data2)
     WindowInfo *pWindow = (WindowInfo *) data1;
     ContextInfo *pCtx = (ContextInfo *) data2;
 
+    RT_NOREF(key);
+
+
     if (pWindow->pOwner == pCtx)
     {
 #ifdef WINDOWS
diff --git a/src/VBox/Additions/common/crOpenGL/cr_gl.py b/src/VBox/Additions/common/crOpenGL/cr_gl.py
index 2381155..f1dd79b 100644
--- a/src/VBox/Additions/common/crOpenGL/cr_gl.py
+++ b/src/VBox/Additions/common/crOpenGL/cr_gl.py
@@ -4,7 +4,7 @@ print """
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/crOpenGL/dri_drv.c b/src/VBox/Additions/common/crOpenGL/dri_drv.c
index 0efc3d1..be36d78 100644
--- a/src/VBox/Additions/common/crOpenGL/dri_drv.c
+++ b/src/VBox/Additions/common/crOpenGL/dri_drv.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/crOpenGL/dri_drv.h b/src/VBox/Additions/common/crOpenGL/dri_drv.h
index 1ef583c..1bbbdca 100644
--- a/src/VBox/Additions/common/crOpenGL/dri_drv.h
+++ b/src/VBox/Additions/common/crOpenGL/dri_drv.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/crOpenGL/dri_glx.h b/src/VBox/Additions/common/crOpenGL/dri_glx.h
index a182425..adbdf31 100644
--- a/src/VBox/Additions/common/crOpenGL/dri_glx.h
+++ b/src/VBox/Additions/common/crOpenGL/dri_glx.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/crOpenGL/egl.c b/src/VBox/Additions/common/crOpenGL/egl.c
index b095b61..6f7584f 100644
--- a/src/VBox/Additions/common/crOpenGL/egl.c
+++ b/src/VBox/Additions/common/crOpenGL/egl.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -148,7 +148,7 @@ static EGLBoolean testValidDisplay(EGLNativeDisplayType hDisplay)
 DECLEXPORT(EGLDisplay) eglGetDisplay(EGLNativeDisplayType hDisplay)
 {
     Display *pDisplay;
-    int rc, cError, cEvent, cMajor, cMinor;
+    int cError, cEvent, cMajor, cMinor;
 
     if (!testValidDisplay(hDisplay))
         return EGL_NO_DISPLAY;
@@ -200,6 +200,7 @@ DECLEXPORT(EGLBoolean) eglTerminate(EGLDisplay hDisplay)
 
 DECLEXPORT(const char *) eglQueryString(EGLDisplay hDisplay, EGLint name)
 {
+    RT_NOREF(hDisplay);
     switch (name)
     {
         case EGL_CLIENT_APIS:
@@ -239,9 +240,9 @@ DECLEXPORT(EGLBoolean) eglGetConfigs (EGLDisplay hDisplay, EGLConfig *paConfigs,
     return clearEGLError();
 }
 
-static int convertEGLAttribToGLX(EGLint EGLAttrib)
+static int convertEGLAttribToGLX(EGLint a_EGLAttrib)
 {
-    switch (EGLAttrib)
+    switch (a_EGLAttrib)
     {
         case EGL_BUFFER_SIZE:
             return GLX_BUFFER_SIZE;
@@ -309,7 +310,7 @@ DECLEXPORT(EGLBoolean) eglChooseConfig (EGLDisplay hDisplay, const EGLint *paAtt
     unsigned cAttribs = 0, i;
     const EGLint *pAttrib, *pAttrib2;
     EGLint cRenderableType = EGL_OPENGL_ES_BIT;
-    int cConfigCaveat = GLX_DONT_CARE, cConformant = GLX_DONT_CARE;
+    unsigned cConfigCaveat = GLX_DONT_CARE, cConformant = GLX_DONT_CARE;
     GLXFBConfig *paFBConfigs;
     int caFBConfigs;
 
@@ -441,7 +442,7 @@ DECLEXPORT(EGLBoolean) eglChooseConfig (EGLDisplay hDisplay, const EGLint *paAtt
     if (paFBConfigs == NULL)
         return setEGLError(EGL_BAD_ACCESS);
     *pcConfigs = caFBConfigs;
-    for (i = 0; i < caConfigs && i < caFBConfigs; ++i)
+    for (i = 0; (GLint)i < caConfigs && (GLint)i < caFBConfigs; ++i)
         paConfigs[i] = (EGLConfig)paFBConfigs[i];
     XFree(paFBConfigs);
     return clearEGLError();
@@ -634,7 +635,7 @@ DECLEXPORT(EGLSurface) eglCreatePbufferSurface(EGLDisplay hDisplay, EGLConfig co
             }
             paAttributes += 2;
         }
-    EGL_ASSERT(cIndex < RT_ELEMENTS(aAttributes) - 1);
+    EGL_ASSERT((unsigned)cIndex < RT_ELEMENTS(aAttributes) - 1U);
     aAttributes[cIndex + 1] = None;
     hPbuffer = glXCreatePbuffer(pDisplay, (GLXFBConfig)config, aAttributes);
     if (hPbuffer == None)
@@ -922,7 +923,7 @@ DECLEXPORT(EGLBoolean) eglCopyBuffers(EGLDisplay hDisplay, EGLSurface hSurface,
 {
     Display *pDisplay = (Display *)hDisplay;
 
-    if (!VALID_PTR(hDisplay))
+    if (!VALID_PTR(pDisplay))
         return setEGLError(EGL_NOT_INITIALIZED);
 
     NOREF(hSurface);
diff --git a/src/VBox/Additions/common/crOpenGL/entrypoints.py b/src/VBox/Additions/common/crOpenGL/entrypoints.py
index c657ba4..c2efd17 100644
--- a/src/VBox/Additions/common/crOpenGL/entrypoints.py
+++ b/src/VBox/Additions/common/crOpenGL/entrypoints.py
@@ -30,6 +30,12 @@ def GenerateEntrypoints(hacks = []):
     print '#include "stub.h"'
     print '#include "dri_glx.h"'
     print ''
+    print '#ifdef __GNUC__';
+    print '# if (__GNUC__ << 16) + __GNUC_MINOR__ >= 0x40002';
+    print '#  pragma GCC diagnostic ignored "-Wunused-parameter"';
+    print '# endif';
+    print '#endif';
+
 
     # Get sorted list of dispatched functions.
     # The order is very important - it must match cr_opcodes.h
diff --git a/src/VBox/Additions/common/crOpenGL/fakedri_drv.c b/src/VBox/Additions/common/crOpenGL/fakedri_drv.c
index bd186c7..6a378a7 100644
--- a/src/VBox/Additions/common/crOpenGL/fakedri_drv.c
+++ b/src/VBox/Additions/common/crOpenGL/fakedri_drv.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/crOpenGL/fakedri_drv.h b/src/VBox/Additions/common/crOpenGL/fakedri_drv.h
index e8871d5..35b185d 100644
--- a/src/VBox/Additions/common/crOpenGL/fakedri_drv.h
+++ b/src/VBox/Additions/common/crOpenGL/fakedri_drv.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/crOpenGL/fakedri_glfuncsList.h b/src/VBox/Additions/common/crOpenGL/fakedri_glfuncsList.h
index a5fb075..1d25c66 100644
--- a/src/VBox/Additions/common/crOpenGL/fakedri_glfuncsList.h
+++ b/src/VBox/Additions/common/crOpenGL/fakedri_glfuncsList.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/crOpenGL/fakedri_glxfuncsList.h b/src/VBox/Additions/common/crOpenGL/fakedri_glxfuncsList.h
index 853449c..304cd8a 100644
--- a/src/VBox/Additions/common/crOpenGL/fakedri_glxfuncsList.h
+++ b/src/VBox/Additions/common/crOpenGL/fakedri_glxfuncsList.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/crOpenGL/feedback/feedback_context.c b/src/VBox/Additions/common/crOpenGL/feedback/feedback_context.c
index a68ab53..9e57faa 100644
--- a/src/VBox/Additions/common/crOpenGL/feedback/feedback_context.c
+++ b/src/VBox/Additions/common/crOpenGL/feedback/feedback_context.c
@@ -1,11 +1,10 @@
 /* $Id: feedback_context.c $ */
-
 /** @file
  * VBox feedback spu, context tracking.
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -20,6 +19,15 @@
 #include "cr_error.h"
 #include "feedbackspu.h"
 
+/** @todo r=bird: None of the code here is referenced externally, so I've
+ *        just prototyped the function here at the top of the file to make
+ *        the compiler happy. */
+GLint FEEDBACKSPU_APIENTRY  feedbackspu_VBoxCreateContext( GLint con, const char *dpyName, GLint visual, GLint shareCtx );
+GLint FEEDBACKSPU_APIENTRY  feedbackspu_CreateContext( const char *dpyName, GLint visual, GLint shareCtx );
+void FEEDBACKSPU_APIENTRY   feedbackspu_MakeCurrent( GLint window, GLint nativeWindow, GLint ctx );
+void FEEDBACKSPU_APIENTRY   feedbackspu_DestroyContext( GLint ctx );
+
+
 /*@todo Multithreading case. (See feedback_spu.self.RenderMode)*/
 
 GLint FEEDBACKSPU_APIENTRY
@@ -120,3 +128,4 @@ feedbackspu_DestroyContext( GLint ctx )
     crUnlockMutex(&feedback_spu.mutex);
 #endif
 }
+
diff --git a/src/VBox/Additions/common/crOpenGL/feedback/feedbackspu.rc b/src/VBox/Additions/common/crOpenGL/feedback/feedbackspu.rc
index 05c482a..9bf449b 100644
--- a/src/VBox/Additions/common/crOpenGL/feedback/feedbackspu.rc
+++ b/src/VBox/Additions/common/crOpenGL/feedback/feedbackspu.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/crOpenGL/feedback/feedbackspu_config.c b/src/VBox/Additions/common/crOpenGL/feedback/feedbackspu_config.c
index 27c252f..9449a2b 100644
--- a/src/VBox/Additions/common/crOpenGL/feedback/feedbackspu_config.c
+++ b/src/VBox/Additions/common/crOpenGL/feedback/feedbackspu_config.c
@@ -22,6 +22,7 @@ static void __setDefaults( void )
 
 static void set_default_viewport( void *foo, const char *response )
 {
+   (void) foo;
    sscanf( response, "%d", &(feedback_spu.default_viewport) );
 }
 
diff --git a/src/VBox/Additions/common/crOpenGL/glx.c b/src/VBox/Additions/common/crOpenGL/glx.c
index 79c5d9b..08a3dff 100644
--- a/src/VBox/Additions/common/crOpenGL/glx.c
+++ b/src/VBox/Additions/common/crOpenGL/glx.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -73,11 +73,15 @@ struct VisualInfo {
     struct VisualInfo *next;
 };
 
+#ifndef VBOX_NO_NATIVEGL /* Old code */
 static struct VisualInfo *VisualInfoList = NULL;
+#endif
 
 static void stubXshmUpdateImageRect(Display *dpy, GLXDrawable draw, GLX_Pixmap_t *pGlxPixmap, XRectangle *pRect);
 static void stubQueryXDamageExtension(Display *dpy, ContextInfo *pContext);
 
+#ifndef VBOX_NO_NATIVEGL /* Old code */
+
 static void
 AddVisualInfo(Display *dpy, int screen, VisualID visualid, int visBits)
 {
@@ -153,7 +157,7 @@ static struct {
     {GLX_ACCUM_RED_SIZE, "GLX_ACCUM_RED_SIZE", TEST_GREATER_0, CR_ACCUM_BIT},
     {GLX_SAMPLE_BUFFERS_SGIS, "GLX_SAMPLE_BUFFERS_SGIS", TEST_GREATER_0, CR_MULTISAMPLE_BIT},
 };
-#ifndef VBOX_NO_NATIVEGL  /* Currently not used */
+
 static int QueryVisBits(Display *dpy, XVisualInfo *vis)
 {
     int visBits = 0;
@@ -209,7 +213,8 @@ static int QueryVisBits(Display *dpy, XVisualInfo *vis)
 
     return visBits;
 }
-#endif /* not 0 */
+
+#endif /* !VBOX_NO_NATIVEGL */
 
 
 
@@ -563,7 +568,6 @@ VBOXGLXTAG(glXCreateContext)(Display *dpy, XVisualInfo *vis, GLXContext share, B
     char dpyName[MAX_DPY_NAME];
     ContextInfo *context;
     int visBits = CR_RGB_BIT | CR_DOUBLE_BIT | CR_DEPTH_BIT; /* default vis */
-    int i, numExt;
 
     stubInit();
 
@@ -571,6 +575,7 @@ VBOXGLXTAG(glXCreateContext)(Display *dpy, XVisualInfo *vis, GLXContext share, B
 
     /*
     {
+        int i, numExt;
         char **list;
 
         list = XListExtensions(dpy, &numExt);
@@ -666,6 +671,7 @@ static void stubFindPixmapCB(unsigned long key, void *data1, void *data2)
     ContextInfo *pCtx = (ContextInfo *) data1;
     stubFindPixmapParms_t *pParms = (stubFindPixmapParms_t *) data2;
     GLX_Pixmap_t *pGlxPixmap = (GLX_Pixmap_t *) crHashtableSearch(pCtx->pGLXPixmapsHash, (unsigned int) pParms->draw);
+    (void)key;
 
     if (pGlxPixmap)
     {
@@ -929,6 +935,8 @@ DECLEXPORT(int) VBOXGLXTAG(glXGetConfig)( Display *dpy, XVisualInfo *vis, int at
 #else  /* not 0 */
 DECLEXPORT(int) VBOXGLXTAG(glXGetConfig)( Display *dpy, XVisualInfo *vis, int attrib, int *value )
 {
+    (void)dpy;
+
     if (!vis) {
         /* SGI OpenGL Performer hits this */
         crWarning("glXGetConfig called with NULL XVisualInfo");
@@ -1105,15 +1113,18 @@ DECLEXPORT(Bool) VBOXGLXTAG(glXQueryVersion)( Display *dpy, int *major, int *min
     return 1;
 }
 
+#ifdef VBOX_TEST_MEGOO
 static XErrorHandler oldErrorHandler;
 static unsigned char lastXError = Success;
 
 static int 
 errorHandler (Display *dpy, XErrorEvent *e)
 {
+    (void)dpy;
     lastXError = e->error_code;
     return 0;
 }
+#endif /* VBOX_TEST_MGEOO */
 
 DECLEXPORT(void) VBOXGLXTAG(glXSwapBuffers)( Display *dpy, GLXDrawable drawable )
 {
@@ -1946,8 +1957,8 @@ DECLEXPORT(int) VBOXGLXTAG(glXGetFBConfigAttrib)(Display *dpy, GLXFBConfig confi
 DECLEXPORT(GLXFBConfig *) VBOXGLXTAG(glXGetFBConfigs)(Display *dpy, int screen, int *nelements)
 {
     GLXFBConfig *pGLXFBConfigs = NULL;
-    struct VisualInfo *v;
-    int i=0, cVisuals;
+    /*struct VisualInfo *v; */
+    int i=0;
     XVisualInfo searchvis, *pVisuals;
 
     *nelements = 0;
@@ -2024,9 +2035,9 @@ DECLEXPORT(XVisualInfo *) VBOXGLXTAG(glXGetVisualFromFBConfig)(Display *dpy, GLX
     (void) dpy;
     (void) config;
     
+    /*
     struct VisualInfo *v;
 
-    /*
     for (v = VisualInfoList; v; v = v->next) {
         if (v->dpy == dpy && v->visualid == (VisualID)config)
         {
@@ -2417,12 +2428,12 @@ static void stubXshmUpdateWholeImage(Display *dpy, GLXDrawable draw, GLX_Pixmap_
         /*crDebug("Texture size too big, splitting in lower sized chunks. [%i,%i,%i,%i] (%i)",
                 pGlxPixmap->x, pGlxPixmap->y, pGlxPixmap->w, pGlxPixmap->h, rect.height);*/
 
-        for (; (rect.y+rect.height)<=(pGlxPixmap->y+pGlxPixmap->h); rect.y+=rect.height)
+        for (; (rect.y+rect.height)<=(pGlxPixmap->y+(int)pGlxPixmap->h); rect.y+=rect.height)
         {
             stubXshmUpdateImageRect(dpy, draw, pGlxPixmap, &rect);
         }
 
-        if (rect.y!=(pGlxPixmap->y+pGlxPixmap->h))
+        if (rect.y!=(pGlxPixmap->y+(int)pGlxPixmap->h))
         {
             rect.height=pGlxPixmap->h-rect.y;
             stubXshmUpdateImageRect(dpy, draw, pGlxPixmap, &rect);
@@ -2527,11 +2538,9 @@ Bool checkevents(Display *display, XEvent *event, XPointer arg)
 /*@todo check what error codes could we throw for failures here*/
 DECLEXPORT(void) VBOXGLXTAG(glXBindTexImageEXT)(Display *dpy, GLXDrawable draw, int buffer, const int *attrib_list)
 {
-    static int cnt=0;
-    XImage dummyimg;
     ContextInfo *context = stubGetCurrentContext();
-
     GLX_Pixmap_t *pGlxPixmap;
+    RT_NOREF(buffer, attrib_list);
 
     if (!context)
     {
diff --git a/src/VBox/Additions/common/crOpenGL/glx_c_exports.c b/src/VBox/Additions/common/crOpenGL/glx_c_exports.c
index 175b859..17e1ea4 100644
--- a/src/VBox/Additions/common/crOpenGL/glx_c_exports.c
+++ b/src/VBox/Additions/common/crOpenGL/glx_c_exports.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/crOpenGL/glx_proto.h b/src/VBox/Additions/common/crOpenGL/glx_proto.h
index 0b829ce..f73b4a3 100644
--- a/src/VBox/Additions/common/crOpenGL/glx_proto.h
+++ b/src/VBox/Additions/common/crOpenGL/glx_proto.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/crOpenGL/icd_drv.c b/src/VBox/Additions/common/crOpenGL/icd_drv.c
index 2f66a6b..d2ae31a 100644
--- a/src/VBox/Additions/common/crOpenGL/icd_drv.c
+++ b/src/VBox/Additions/common/crOpenGL/icd_drv.c
@@ -1,11 +1,10 @@
 /* $Id: icd_drv.c $ */
-
 /** @file
  * VBox OpenGL windows ICD driver functions
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +26,7 @@
 # include <VBox/VBoxUhgsmi.h>
 #endif
 
-#include <windows.h>
+#include <iprt/win/windows.h>
 
 //TODO: consider
 /* We can modify chronium dispatch table functions order to match the one required by ICD,
@@ -396,3 +395,4 @@ BOOL APIENTRY DrvSwapBuffers(HDC hdc)
     stubSwapBuffers( window, 0 );
     return 1;
 }
+
diff --git a/src/VBox/Additions/common/crOpenGL/icd_drv.h b/src/VBox/Additions/common/crOpenGL/icd_drv.h
index c4f161b..15b263f 100644
--- a/src/VBox/Additions/common/crOpenGL/icd_drv.h
+++ b/src/VBox/Additions/common/crOpenGL/icd_drv.h
@@ -1,12 +1,10 @@
 /* $Id: icd_drv.h $ */
-
 /** @file
- *
  * VirtualBox Windows NT/2000/XP guest OpenGL ICD header
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -17,12 +15,12 @@
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
 
-#ifndef __ICDDRV_H__
-#define __ICDDRV_H__
+#ifndef ___ICDDRV_H___
+#define ___ICDDRV_H___
 
-#include <windows.h>
+#include <iprt/win/windows.h>
 
-typedef struct _icdTable 
+typedef struct ICDTABLE
 {
     DWORD size;
     PROC  table[336];
@@ -51,4 +49,4 @@ BOOL APIENTRY DrvRealizeLayerPalette(HDC hdc, int iLayerPlane, BOOL bRealize);
 BOOL APIENTRY DrvSwapLayerBuffers(HDC hdc, UINT fuPlanes);
 BOOL APIENTRY DrvSwapBuffers(HDC hdc);
 
-#endif /* __ICDDRV_H__ */
\ No newline at end of file
+#endif /* !___ICDDRV_H___ */
\ No newline at end of file
diff --git a/src/VBox/Additions/common/crOpenGL/load.c b/src/VBox/Additions/common/crOpenGL/load.c
index 8994f84..c3c642e 100644
--- a/src/VBox/Additions/common/crOpenGL/load.c
+++ b/src/VBox/Additions/common/crOpenGL/load.c
@@ -33,6 +33,10 @@
 #include "../../WINNT/Graphics/Video/common/wddm/VBoxMPIf.h"
 #endif
 
+#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
+# include <VBox/VBoxCrHgsmi.h>
+#endif
+
 /**
  * If you change this, see the comments in tilesortspu_context.c
  */
@@ -65,9 +69,10 @@ CRtsd g_stubCurrentContextTSD;
 #endif
 
 
+#ifndef VBOX_NO_NATIVEGL
 static void stubInitNativeDispatch( void )
 {
-#define MAX_FUNCS 1000
+# define MAX_FUNCS 1000
     SPUNamedFunctionTable gl_funcs[MAX_FUNCS];
     int numFuncs;
 
@@ -83,8 +88,9 @@ static void stubInitNativeDispatch( void )
     crSPUInitDispatchTable( &stub.nativeDispatch );
     crSPUInitDispatch( &stub.nativeDispatch, gl_funcs );
     crSPUInitDispatchNops( &stub.nativeDispatch );
-#undef MAX_FUNCS
+# undef MAX_FUNCS
 }
+#endif /* !VBOX_NO_NATIVEGL */
 
 
 /** Pointer to the SPU's real glClear and glViewport functions */
@@ -173,6 +179,7 @@ static void stubCheckWindowsCB(unsigned long key, void *data1, void *data2)
 {
     WindowInfo *pWindow = (WindowInfo *) data1;
     ContextInfo *pCtx = (ContextInfo *) data2;
+    (void)key;
 
     if (pWindow == pCtx->currentDrawable
         || pWindow->type!=CHROMIUM
@@ -247,7 +254,7 @@ static void SPU_APIENTRY trapViewport(GLint x, GLint y, GLsizei w, GLsizei h)
     origViewport(x, y, w, h);
 }
 
-static void SPU_APIENTRY trapSwapBuffers(GLint window, GLint flags)
+/*static void SPU_APIENTRY trapSwapBuffers(GLint window, GLint flags)
 {
     stubCheckWindowsState();
     origSwapBuffers(window, flags);
@@ -257,18 +264,22 @@ static void SPU_APIENTRY trapDrawBuffer(GLenum buf)
 {
     stubCheckWindowsState();
     origDrawBuffer(buf);
-}
+}*/
 
+#if 0 /* unused */
 static void SPU_APIENTRY trapScissor(GLint x, GLint y, GLsizei w, GLsizei h)
 {
     int winX, winY;
     unsigned int winW, winH;
     WindowInfo *pWindow;
     ContextInfo *context = stubGetCurrentContext();
+    (void)x; (void)y; (void)w; (void)h;
+
     pWindow = context->currentDrawable;
     stubGetWindowGeometry(pWindow, &winX, &winY, &winW, &winH);
     origScissor(0, 0, winW, winH);
 }
+#endif /* unused */
 
 /**
  * Use the GL function pointers in <spu> to initialize the static glim
@@ -296,9 +307,12 @@ static void stubInitSPUDispatch(SPU *spu)
     crSPUCopyDispatchTable( &glim, &stub.spuDispatch );
 }
 
+#if 0 /** @todo stubSPUTearDown & stubSPUTearDownLocked are not referenced */
+
 // Callback function, used to destroy all created contexts
 static void hsWalkStubDestroyContexts(unsigned long key, void *data1, void *data2)
 {
+    (void)data1; (void)data2;
     stubDestroyContext(key);
 }
 
@@ -374,6 +388,8 @@ static void stubSPUTearDown(void)
     STUB_INIT_UNLOCK();
 }
 
+#endif /** @todo stubSPUTearDown & stubSPUTearDownLocked are not referenced */
+
 static void stubSPUSafeTearDown(void)
 {
 #ifdef CHROMIUM_THREADSAFE
@@ -493,6 +509,7 @@ static void stubExitHandler(void)
  */
 static void stubSignalHandler(int signo)
 {
+    (void)signo;
     stubSPUSafeTearDown();
     exit(0);  /* this causes stubExitHandler() to be called */
 }
@@ -716,7 +733,7 @@ MothershipPhoneHome(int signo)
 
 #endif /* 0 */
 
-void stubSetDefaultConfigurationOptions(void)
+static void stubSetDefaultConfigurationOptions(void)
 {
     unsigned char key[16]= {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
 
@@ -750,7 +767,7 @@ void stubSetDefaultConfigurationOptions(void)
 
 #ifdef CR_NEWWINTRACK
 # ifdef VBOX_WITH_WDDM
-static stubDispatchVisibleRegions(WindowInfo *pWindow)
+static void stubDispatchVisibleRegions(WindowInfo *pWindow)
 {
     DWORD dwCount;
     LPRGNDATA lpRgnData;
@@ -793,7 +810,7 @@ static HRGN stubMakeRegionFromRects(PVBOXVIDEOCM_CMD_RECTS pRegions, uint32_t st
 static void stubSyncTrCheckWindowsCB(unsigned long key, void *data1, void *data2)
 {
     WindowInfo *pWindow = (WindowInfo *) data1;
-    (void) data2;
+    (void)key; (void) data2;
 
     if (pWindow->type!=CHROMIUM || pWindow->spuWindow==0)
     {
@@ -937,7 +954,6 @@ stubInitLocked(void)
      * HOW can I pass the mothership address to this if I already know it?
      */
 
-    CRConnection *conn = NULL;
     char response[1024];
     char **spuchain;
     int num_spus;
@@ -1123,35 +1139,6 @@ stubInit(void)
     return bRc;
 }
 
-#if defined(Linux) && !defined(VBOXOGL_FAKEDRI)
-# include <dlfcn.h>
-/* We only support being used by GLX clients.  If the X server GLX extension
- * tries to use our OpenGL library it will fail, as it is written specifically
- * against Mesa.  So we detect this with the assumption that the server will
- * not have the DISPLAY variable set, and a client will do or we can't do much
- * with it anyway.  This is only needed on Linux, as Solaris lets us replace
- * the client library only.  To avoid complications with iprt initialisation
- * we use native system/C library APIs.
- * We do this in a very naive way, not even checking for failure (not much we
- * can do, better for GLX to fail than the whole X server).  To keep things as
- * simple and fail-safe as possible, we use a fixed path to the system GL
- * library. */
-#ifndef RTLD_DEEPBIND
-# define RTLD_DEEPBIND 0x8
-#endif
-
-void __attribute__ ((constructor)) checkServerGLX(void)
-{
-    char *pszDisplay = getenv("DISPLAY");
-
-    if (!pszDisplay || !*pszDisplay)
-    {
-        dlopen("/var/lib/VBoxGuestAdditions/lib/system/libGL.so.1", RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND);
-        dlopen("/var/lib/VBoxGuestAdditions/lib/system/libEGL.so.1", RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND);
-    }
-}
-#endif
-
 /* Sigh -- we can't do initialization at load time, since Windows forbids
  * the loading of other libraries from DLLMain. */
 
diff --git a/src/VBox/Additions/common/crOpenGL/pack/packspu.h b/src/VBox/Additions/common/crOpenGL/pack/packspu.h
index d65cbf5..05c239c 100644
--- a/src/VBox/Additions/common/crOpenGL/pack/packspu.h
+++ b/src/VBox/Additions/common/crOpenGL/pack/packspu.h
@@ -161,13 +161,15 @@ extern void packspuConnectToServer( CRNetServer *server
 extern void packspuFlush( void *arg );
 extern void packspuHuge( CROpcode opcode, void *buf );
 
-extern void packspuInitStrings();
+extern void packspuInitStrings(void);
 
-extern GLboolean packspuSyncOnFlushes();
+extern GLboolean packspuSyncOnFlushes(void);
 
 extern ThreadInfo *packspuNewThread(
 #if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
                 struct VBOXUHGSMI *pHgsmi
+#else
+                void
 #endif
         );
 
diff --git a/src/VBox/Additions/common/crOpenGL/pack/packspu.rc b/src/VBox/Additions/common/crOpenGL/pack/packspu.rc
index 1aec4ef..6bd4841 100644
--- a/src/VBox/Additions/common/crOpenGL/pack/packspu.rc
+++ b/src/VBox/Additions/common/crOpenGL/pack/packspu.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/crOpenGL/pack/packspu_beginend.py b/src/VBox/Additions/common/crOpenGL/pack/packspu_beginend.py
index 3b392c4..9a26050 100644
--- a/src/VBox/Additions/common/crOpenGL/pack/packspu_beginend.py
+++ b/src/VBox/Additions/common/crOpenGL/pack/packspu_beginend.py
@@ -18,8 +18,14 @@ print """/* DO NOT EDIT - AUTOMATICALLY GENERATED BY packspu_beginend.py */
 
 void PACKSPU_APIENTRY packspu_Begin( GLenum mode )
 {
+    CRPackBuffer *buf;
+#if CR_ARB_vertex_buffer_object
+    GET_CONTEXT(ctx);
+#else
     GET_THREAD(thread);
-    CRPackBuffer *buf = &thread->BeginEndBuffer;
+#endif
+
+    buf = &thread->BeginEndBuffer;
 
     /* XXX comparing mode >= 0 here is not needed since mode is unsigned */
     CRASSERT( /*mode >= GL_POINTS && */mode <= GL_POLYGON );
@@ -27,7 +33,6 @@ void PACKSPU_APIENTRY packspu_Begin( GLenum mode )
 #if CR_ARB_vertex_buffer_object
     {
         GLboolean serverArrays = GL_FALSE;
-        GET_CONTEXT(ctx);
         if (ctx->clientState->extensions.ARB_vertex_buffer_object)
             serverArrays = crStateUseServerArrays();
         if (serverArrays) {
diff --git a/src/VBox/Additions/common/crOpenGL/pack/packspu_client.c b/src/VBox/Additions/common/crOpenGL/pack/packspu_client.c
index 0fa13b3..cb52d5a 100644
--- a/src/VBox/Additions/common/crOpenGL/pack/packspu_client.c
+++ b/src/VBox/Additions/common/crOpenGL/pack/packspu_client.c
@@ -180,7 +180,7 @@ void PACKSPU_APIENTRY packspu_InterleavedArrays( GLenum format, GLsizei stride,
 # define CR_FORCE_ZVA_EXPAND
 
 
-GLboolean packspuZvaCreate(ContextInfo *pCtx, const GLfloat *pValue, GLuint cValues)
+static GLboolean packspuZvaCreate(ContextInfo *pCtx, const GLfloat *pValue, GLuint cValues)
 {
     ZvaBufferInfo *pInfo = &pCtx->zvaBufferInfo;
     GLuint cbValue = 4 * sizeof (*pValue);
@@ -243,7 +243,7 @@ typedef struct
     CRClientPointer cp;
 } CR_ZVA_RESTORE_CTX;
 
-void packspuZvaEnable(ContextInfo *pCtx, const GLfloat *pValue, GLuint cValues, CR_ZVA_RESTORE_CTX *pRestoreCtx)
+static void packspuZvaEnable(ContextInfo *pCtx, const GLfloat *pValue, GLuint cValues, CR_ZVA_RESTORE_CTX *pRestoreCtx)
 {
     CRContext *g = pCtx->clientState;
 
@@ -280,7 +280,7 @@ void packspuZvaEnable(ContextInfo *pCtx, const GLfloat *pValue, GLuint cValues,
     pack_spu.self.EnableVertexAttribArrayARB(0);
 }
 
-void packspuZvaDisable(CR_ZVA_RESTORE_CTX *pRestoreCtx)
+static void packspuZvaDisable(CR_ZVA_RESTORE_CTX *pRestoreCtx)
 {
     if (pRestoreCtx->cp.buffer)
         pack_spu.self.BindBufferARB(GL_ARRAY_BUFFER_ARB, pRestoreCtx->cp.buffer->id);
@@ -346,13 +346,15 @@ packspu_ArrayElement( GLint index )
     GLfloat aAttrib[4];
 
 #if CR_ARB_vertex_buffer_object
-    GET_CONTEXT(ctx);
-    /*crDebug("packspu_ArrayElement index:%i", index);*/
-    if (ctx->clientState->extensions.ARB_vertex_buffer_object)
     {
-        serverArrays = crStateUseServerArrays();
-        if (ctx->fCheckZerroVertAttr)
-            cZvaValues = crStateNeedDummyZeroVertexArray(thread->currentContext->clientState, &thread->packer->current, aAttrib);
+        GET_CONTEXT(ctx);
+        /*crDebug("packspu_ArrayElement index:%i", index);*/
+        if (ctx->clientState->extensions.ARB_vertex_buffer_object)
+        {
+            serverArrays = crStateUseServerArrays();
+            if (ctx->fCheckZerroVertAttr)
+                cZvaValues = crStateNeedDummyZeroVertexArray(thread->currentContext->clientState, &thread->packer->current, aAttrib);
+        }
     }
 #endif
 
@@ -427,15 +429,18 @@ packspu_DrawElements( GLenum mode, GLsizei count, GLenum type, const GLvoid *ind
     GLfloat aAttrib[4];
 
 #if CR_ARB_vertex_buffer_object
-    GET_CONTEXT(ctx);
     GLboolean lockedArrays = GL_FALSE;
-    CRBufferObject *elementsBuffer = crStateGetCurrent()->bufferobject.elementsBuffer;
-    /*crDebug("DrawElements count=%d, indices=%p", count, indices);*/
-    if (ctx->clientState->extensions.ARB_vertex_buffer_object)
+    CRBufferObject *elementsBuffer;
     {
-        serverArrays = crStateUseServerArrays();
-        if (ctx->fCheckZerroVertAttr)
-            cZvaValues = crStateNeedDummyZeroVertexArray(thread->currentContext->clientState, &thread->packer->current, aAttrib);
+        GET_CONTEXT(ctx);
+        elementsBuffer = crStateGetCurrent()->bufferobject.elementsBuffer;
+        /*crDebug("DrawElements count=%d, indices=%p", count, indices);*/
+        if (ctx->clientState->extensions.ARB_vertex_buffer_object)
+        {
+            serverArrays = crStateUseServerArrays();
+            if (ctx->fCheckZerroVertAttr)
+                cZvaValues = crStateNeedDummyZeroVertexArray(thread->currentContext->clientState, &thread->packer->current, aAttrib);
+        }
     }
 
 # ifdef CR_USE_LOCKARRAYS
@@ -575,13 +580,15 @@ packspu_DrawRangeElements( GLenum mode, GLuint start, GLuint end, GLsizei count,
     GLfloat aAttrib[4];
 
 #if CR_ARB_vertex_buffer_object
-    GET_CONTEXT(ctx);
-    /*crDebug("DrawRangeElements count=%d", count);*/
-    if (ctx->clientState->extensions.ARB_vertex_buffer_object)
     {
-         serverArrays = crStateUseServerArrays();
-         if (ctx->fCheckZerroVertAttr)
-             cZvaValues = crStateNeedDummyZeroVertexArray(thread->currentContext->clientState, &thread->packer->current, aAttrib);
+        GET_CONTEXT(ctx);
+        /*crDebug("DrawRangeElements count=%d", count);*/
+        if (ctx->clientState->extensions.ARB_vertex_buffer_object)
+        {
+             serverArrays = crStateUseServerArrays();
+             if (ctx->fCheckZerroVertAttr)
+                 cZvaValues = crStateNeedDummyZeroVertexArray(thread->currentContext->clientState, &thread->packer->current, aAttrib);
+        }
     }
 #endif
 
@@ -649,14 +656,16 @@ packspu_DrawArrays( GLenum mode, GLint first, GLsizei count )
     GLfloat aAttrib[4];
 
 #if CR_ARB_vertex_buffer_object
-    GET_CONTEXT(ctx);
     GLboolean lockedArrays = GL_FALSE;
-    /*crDebug("DrawArrays count=%d", count);*/
-    if (ctx->clientState->extensions.ARB_vertex_buffer_object)
     {
-         serverArrays = crStateUseServerArrays();
-         if (ctx->fCheckZerroVertAttr)
-             cZvaValues = crStateNeedDummyZeroVertexArray(thread->currentContext->clientState, &thread->packer->current, aAttrib);
+        GET_CONTEXT(ctx);
+        /*crDebug("DrawArrays count=%d", count);*/
+        if (ctx->clientState->extensions.ARB_vertex_buffer_object)
+        {
+             serverArrays = crStateUseServerArrays();
+             if (ctx->fCheckZerroVertAttr)
+                 cZvaValues = crStateNeedDummyZeroVertexArray(thread->currentContext->clientState, &thread->packer->current, aAttrib);
+        }
     }
 
 # ifdef CR_USE_LOCKARRAYS
diff --git a/src/VBox/Additions/common/crOpenGL/pack/packspu_config.c b/src/VBox/Additions/common/crOpenGL/pack/packspu_config.c
index 1878bb6..c852aea 100644
--- a/src/VBox/Additions/common/crOpenGL/pack/packspu_config.c
+++ b/src/VBox/Additions/common/crOpenGL/pack/packspu_config.c
@@ -24,11 +24,13 @@ static void __setDefaults( void )
 
 static void set_emit( void *foo, const char *response )
 {
+    RT_NOREF(foo);
     sscanf( response, "%d", &(pack_spu.emit_GATHER_POST_SWAPBUFFERS) );
 }
 
 static void set_swapbuffer_sync( void *foo, const char *response )
 {
+    RT_NOREF(foo);
     sscanf( response, "%d", &(pack_spu.swapbuffer_sync) );
 }
 
@@ -49,6 +51,7 @@ SPUOptions packSPUOptions[] = {
 
 void packspuSetVBoxConfiguration( const SPU *child_spu )
 {
+    RT_NOREF(child_spu);
     __setDefaults();
     pack_spu.emit_GATHER_POST_SWAPBUFFERS = 0;
     pack_spu.swapbuffer_sync = 0;
diff --git a/src/VBox/Additions/common/crOpenGL/pack/packspu_context.c b/src/VBox/Additions/common/crOpenGL/pack/packspu_context.c
index 9c4926d..183b73a 100644
--- a/src/VBox/Additions/common/crOpenGL/pack/packspu_context.c
+++ b/src/VBox/Additions/common/crOpenGL/pack/packspu_context.c
@@ -20,6 +20,8 @@
 ThreadInfo *packspuNewThread(
 #if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
                 struct VBOXUHGSMI *pHgsmi
+#else
+                void
 #endif
 )
 {
@@ -115,6 +117,8 @@ packspu_VBoxConCreate(struct VBOXUHGSMI *pHgsmi)
         return thread->id;
     }
     crError("packspuNewThread failed");
+#else
+    RT_NOREF(pHgsmi);
 #endif
     return 0;
 }
@@ -129,6 +133,7 @@ packspu_VBoxConFlush(GLint con)
     CRASSERT(thread->packer);
     packspuFlush((void *) thread);
 #else
+    RT_NOREF(con);
     crError("VBoxConFlush not implemented!");
 #endif
 }
@@ -179,6 +184,8 @@ packspu_VBoxConDestroy(GLint con)
     }
 #endif
     crUnlockMutex(&_PackMutex);
+#else
+    RT_NOREF(con);
 #endif
 }
 
@@ -188,8 +195,6 @@ packspu_VBoxConChromiumParameteriCR(GLint con, GLenum param, GLint value)
     GET_THREAD(thread);
     CRPackContext * curPacker = crPackGetContext();
     ThreadInfo *curThread = thread;
-    int writeback = 1;
-    GLint serverCtx = (GLint) -1;
 
     CRASSERT(!curThread == !curPacker);
     CRASSERT(!curThread || !curPacker || curThread->packer == curPacker);
@@ -246,8 +251,6 @@ packspu_VBoxConChromiumParametervCR(GLint con, GLenum target, GLenum type, GLsiz
     GET_THREAD(thread);
     CRPackContext * curPacker = crPackGetContext();
     ThreadInfo *curThread = thread;
-    int writeback = 1;
-    GLint serverCtx = (GLint) -1;
 
     CRASSERT(!curThread == !curPacker);
     CRASSERT(!curThread || !curPacker || curThread->packer == curPacker);
diff --git a/src/VBox/Additions/common/crOpenGL/pack/packspu_framebuffer.c b/src/VBox/Additions/common/crOpenGL/pack/packspu_framebuffer.c
index 3931f94..b7ec27c 100644
--- a/src/VBox/Additions/common/crOpenGL/pack/packspu_framebuffer.c
+++ b/src/VBox/Additions/common/crOpenGL/pack/packspu_framebuffer.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/crOpenGL/pack/packspu_get.py b/src/VBox/Additions/common/crOpenGL/pack/packspu_get.py
index 81abccc..75bb783 100755
--- a/src/VBox/Additions/common/crOpenGL/pack/packspu_get.py
+++ b/src/VBox/Additions/common/crOpenGL/pack/packspu_get.py
@@ -20,7 +20,7 @@ print """
 """
 
 print """
-GLboolean crPackIsPixelStoreParm(GLenum pname)
+static GLboolean crPackIsPixelStoreParm(GLenum pname)
 {
     if (pname == GL_UNPACK_ALIGNMENT
         || pname == GL_UNPACK_ROW_LENGTH
diff --git a/src/VBox/Additions/common/crOpenGL/pack/packspu_getshaders.c b/src/VBox/Additions/common/crOpenGL/pack/packspu_getshaders.c
index 6850f85..f418980 100644
--- a/src/VBox/Additions/common/crOpenGL/pack/packspu_getshaders.c
+++ b/src/VBox/Additions/common/crOpenGL/pack/packspu_getshaders.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/crOpenGL/pack/packspu_glsl.c b/src/VBox/Additions/common/crOpenGL/pack/packspu_glsl.c
index aa9863b..a61c283 100644
--- a/src/VBox/Additions/common/crOpenGL/pack/packspu_glsl.c
+++ b/src/VBox/Additions/common/crOpenGL/pack/packspu_glsl.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -114,7 +114,7 @@ GLint PACKSPU_APIENTRY packspu_GetUniformLocation(GLuint program, const char * n
     return crStateGetUniformLocation(program, name);
 }
 
-GLint PACKSPU_APIENTRY packspu_GetAttribLocationUnchached( GLuint program, const char * name )
+static GLint PACKSPU_APIENTRY packspu_GetAttribLocationUnchached( GLuint program, const char * name )
 {
     GET_THREAD(thread);
     int writeback = 1;
diff --git a/src/VBox/Additions/common/crOpenGL/pack/packspu_misc.c b/src/VBox/Additions/common/crOpenGL/pack/packspu_misc.c
index 5193e1c..8600ede 100644
--- a/src/VBox/Additions/common/crOpenGL/pack/packspu_misc.c
+++ b/src/VBox/Additions/common/crOpenGL/pack/packspu_misc.c
@@ -93,12 +93,12 @@ void PACKSPU_APIENTRY packspu_ChromiumParametervCR(GLenum target, GLenum type, G
         packspuFlush( (void *) thread );
 }
 
-GLboolean packspuSyncOnFlushes()
+GLboolean packspuSyncOnFlushes(void)
 {
-    GLint buffer;
-
-    /*Seems to still cause issues, always sync for now*/
+#if 1 /*Seems to still cause issues, always sync for now*/
     return 1;
+#else
+    GLint buffer;
 
     crStateGetIntegerv(GL_DRAW_BUFFER, &buffer);
     /*Usually buffer==GL_BACK, so put this extra check to simplify boolean eval on runtime*/
@@ -109,6 +109,7 @@ GLboolean packspuSyncOnFlushes()
                 || buffer == GL_FRONT_AND_BACK
                 || buffer == GL_LEFT
                 || buffer == GL_RIGHT);
+#endif
 }
 
 void PACKSPU_APIENTRY packspu_DrawBuffer(GLenum mode)
@@ -550,6 +551,7 @@ GLenum PACKSPU_APIENTRY packspu_GetError( void )
     int writeback = 1;
     GLenum return_val = (GLenum) 0;
     CRContext *pCurState = crStateGetCurrent();
+    NOREF(pCurState); /* it's unused, but I don't know about side effects.. */
 
     if (!CRPACKSPU_IS_WDDM_CRHGSMI() && !(pack_spu.thread[pack_spu.idxThreadInUse].netServer.conn->actual_network))
     {
@@ -582,6 +584,7 @@ GLint PACKSPU_APIENTRY packspu_VBoxPackSetInjectThread(struct VBOXUHGSMI *pHgsmi
     int i;
     GET_THREAD(thread);
     CRASSERT(!thread);
+    RT_NOREF(pHgsmi);
     crLockMutex(&_PackMutex);
     {
         CRASSERT(CRPACKSPU_IS_WDDM_CRHGSMI() || (pack_spu.numThreads>0));
@@ -840,10 +843,14 @@ void PACKSPU_APIENTRY packspu_VBoxPackDetachThread()
 }
 #endif /*CHROMIUM_THREADSAFE*/
 
-void PACKSPU_APIENTRY packspu_VBoxPresentComposition(GLint win, const struct VBOXVR_SCR_COMPOSITOR * pCompositor, const struct VBOXVR_SCR_COMPOSITOR_ENTRY *pChangedEntry)
+void PACKSPU_APIENTRY packspu_VBoxPresentComposition(GLint win, const struct VBOXVR_SCR_COMPOSITOR * pCompositor,
+                                                     const struct VBOXVR_SCR_COMPOSITOR_ENTRY *pChangedEntry)
 {
+    RT_NOREF(win, pCompositor, pChangedEntry);
 }
 
 void PACKSPU_APIENTRY packspu_StringMarkerGREMEDY(GLsizei len, const GLvoid *string)
 {
+    RT_NOREF(len, string);
 }
+
diff --git a/src/VBox/Additions/common/crOpenGL/pack/packspu_net.c b/src/VBox/Additions/common/crOpenGL/pack/packspu_net.c
index 01d83e5..4d6cbdb 100644
--- a/src/VBox/Additions/common/crOpenGL/pack/packspu_net.c
+++ b/src/VBox/Additions/common/crOpenGL/pack/packspu_net.c
@@ -53,6 +53,7 @@ packspuReadPixels( const CRMessageReadPixels *rp, unsigned int len )
 static int
 packspuReceiveData( CRConnection *conn, CRMessage *msg, unsigned int len )
 {
+    RT_NOREF(conn);
     if (msg->header.type == CR_MESSAGE_REDIR_PTR)
         msg = (CRMessage*) msg->redirptr.pMessage;
 
@@ -79,6 +80,7 @@ __prependHeader( CRPackBuffer *buf, unsigned int *len, unsigned int senderID )
 {
     int num_opcodes;
     CRMessageOpcodes *hdr;
+    RT_NOREF(senderID);
 
     CRASSERT( buf );
     CRASSERT( buf->opcode_current < buf->opcode_start );
diff --git a/src/VBox/Additions/common/crOpenGL/pack/packspu_pixel.c b/src/VBox/Additions/common/crOpenGL/pack/packspu_pixel.c
index 472b592..32172bb 100644
--- a/src/VBox/Additions/common/crOpenGL/pack/packspu_pixel.c
+++ b/src/VBox/Additions/common/crOpenGL/pack/packspu_pixel.c
@@ -197,7 +197,7 @@ static const CRPixelPackState _defaultPacking = {
         crPackPixelStorei(enum, _defaultPacking.field); \
     }
 
-static void packspu_ApplyUnpackState()
+static void packspu_ApplyUnpackState(void)
 {
     GET_THREAD(thread);
     ContextInfo *ctx = thread->currentContext;
@@ -213,7 +213,7 @@ static void packspu_ApplyUnpackState()
     APPLY_IF_NEQ(clientState->unpack, psLSBFirst, GL_UNPACK_LSB_FIRST);
 }
 
-static void packspu_RestoreUnpackState()
+static void packspu_RestoreUnpackState(void)
 {
     GET_THREAD(thread);
     ContextInfo *ctx = thread->currentContext;
@@ -229,7 +229,7 @@ static void packspu_RestoreUnpackState()
     RESTORE_IF_NEQ(clientState->unpack, psLSBFirst, GL_UNPACK_LSB_FIRST);
 }
 
-static void packspu_ApplyPackState()
+static void packspu_ApplyPackState(void)
 {
     GET_THREAD(thread);
     ContextInfo *ctx = thread->currentContext;
@@ -245,7 +245,7 @@ static void packspu_ApplyPackState()
     APPLY_IF_NEQ(clientState->pack, psLSBFirst, GL_PACK_LSB_FIRST);
 }
 
-static void packspu_RestorePackState()
+static void packspu_RestorePackState(void)
 {
     GET_THREAD(thread);
     ContextInfo *ctx = thread->currentContext;
diff --git a/src/VBox/Additions/common/crOpenGL/pack/packspu_texture.c b/src/VBox/Additions/common/crOpenGL/pack/packspu_texture.c
index eb30cd5..51dcc4f 100644
--- a/src/VBox/Additions/common/crOpenGL/pack/packspu_texture.c
+++ b/src/VBox/Additions/common/crOpenGL/pack/packspu_texture.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/crOpenGL/passthrough/passthroughspu.rc b/src/VBox/Additions/common/crOpenGL/passthrough/passthroughspu.rc
index d447829..276292f 100644
--- a/src/VBox/Additions/common/crOpenGL/passthrough/passthroughspu.rc
+++ b/src/VBox/Additions/common/crOpenGL/passthrough/passthroughspu.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/crOpenGL/stub.c b/src/VBox/Additions/common/crOpenGL/stub.c
index b1e7ccb..96bcb82 100644
--- a/src/VBox/Additions/common/crOpenGL/stub.c
+++ b/src/VBox/Additions/common/crOpenGL/stub.c
@@ -155,6 +155,7 @@ void APIENTRY crWindowVisibleRegion( GLint window, GLint cRects, const void *pRe
 
 void APIENTRY crVBoxTexPresent(GLuint texture, GLuint cfg, GLint xPos, GLint yPos, GLint cRects, const GLint *pRects)
 {
+    RT_NOREF(texture, cfg, xPos, yPos, cRects, pRects);
     crError("not expected!");
 }
 
diff --git a/src/VBox/Additions/common/crOpenGL/stub.h b/src/VBox/Additions/common/crOpenGL/stub.h
index f26061d..069e2c3 100644
--- a/src/VBox/Additions/common/crOpenGL/stub.h
+++ b/src/VBox/Additions/common/crOpenGL/stub.h
@@ -283,7 +283,7 @@ typedef struct {
  * */
 extern CRtsd g_stubCurrentContextTSD;
 
-DECLINLINE(ContextInfo*) stubGetCurrentContext()
+DECLINLINE(ContextInfo*) stubGetCurrentContext(void)
 {
     ContextInfo* ctx;
     VBoxTlsRefGetCurrentFunctional(ctx, ContextInfo, &g_stubCurrentContextTSD);
diff --git a/src/VBox/Additions/common/pam/Makefile.kmk b/src/VBox/Additions/common/pam/Makefile.kmk
index e5a5352..18f17c8 100644
--- a/src/VBox/Additions/common/pam/Makefile.kmk
+++ b/src/VBox/Additions/common/pam/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2011-2015 Oracle Corporation
+# Copyright (C) 2011-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/common/pam/pam_vbox.cpp b/src/VBox/Additions/common/pam/pam_vbox.cpp
index 08e5f1c..c909bad 100644
--- a/src/VBox/Additions/common/pam/pam_vbox.cpp
+++ b/src/VBox/Additions/common/pam/pam_vbox.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -119,6 +119,7 @@ static void pam_vbox_writesyslog(char *pszBuf)
  */
 static void pam_vbox_error(pam_handle_t *hPAM, const char *pszFormat, ...)
 {
+    RT_NOREF1(hPAM);
     va_list va;
     char *buf;
     va_start(va, pszFormat);
@@ -140,6 +141,7 @@ static void pam_vbox_error(pam_handle_t *hPAM, const char *pszFormat, ...)
  */
 static void pam_vbox_log(pam_handle_t *hPAM, const char *pszFormat, ...)
 {
+    RT_NOREF1(hPAM);
     if (g_verbosity)
     {
         va_list va;
@@ -304,6 +306,7 @@ static int pam_vbox_init(pam_handle_t *hPAM)
  */
 static void pam_vbox_shutdown(pam_handle_t *hPAM)
 {
+    RT_NOREF1(hPAM);
     VbglR3Term();
 }
 
@@ -551,12 +554,13 @@ static int pam_vbox_wait_prop(pam_handle_t *hPAM, uint32_t uClientID,
  * Thread function waiting for credentials to arrive.
  *
  * @return  IPRT status code.
- * @param   ThreadSelf              Thread struct to this thread.
+ * @param   hThreadSelf             Thread handle.
  * @param   pvUser                  Pointer to a PAMVBOXTHREAD structure providing
  *                                  required data used / set by the thread.
  */
-static DECLCALLBACK(int) pam_vbox_wait_thread(RTTHREAD ThreadSelf, void *pvUser)
+static DECLCALLBACK(int) pam_vbox_wait_thread(RTTHREAD hThreadSelf, void *pvUser)
 {
+    RT_NOREF1(hThreadSelf);
     PPAMVBOXTHREAD pUserData = (PPAMVBOXTHREAD)pvUser;
     AssertPtr(pUserData);
 
@@ -676,6 +680,7 @@ static DECLCALLBACK(int) pam_vbox_wait_thread(RTTHREAD ThreadSelf, void *pvUser)
  */
 static int pam_vbox_wait_for_creds(pam_handle_t *hPAM, uint32_t uClientID, uint32_t uTimeoutMS)
 {
+    RT_NOREF1(uClientID);
     PAMVBOXTHREAD threadData;
     threadData.hPAM = hPAM;
     threadData.uTimeoutMS = uTimeoutMS;
@@ -701,9 +706,10 @@ static int pam_vbox_wait_for_creds(pam_handle_t *hPAM, uint32_t uClientID, uint3
 }
 
 
-DECLEXPORT(int) pam_sm_authenticate(pam_handle_t *hPAM, int iFlags,
-                                    int argc, const char **argv)
+DECLEXPORT(int) pam_sm_authenticate(pam_handle_t *hPAM, int iFlags, int argc, const char **argv)
 {
+    RT_NOREF1(iFlags);
+
     /* Parse arguments. */
     for (int i = 0; i < argc; i++)
     {
@@ -847,6 +853,7 @@ DECLEXPORT(int) pam_sm_setcred(pam_handle_t *hPAM, int iFlags, int argc, const c
 
 DECLEXPORT(int) pam_sm_acct_mgmt(pam_handle_t *hPAM, int iFlags, int argc, const char **argv)
 {
+    RT_NOREF3(iFlags, argc, argv);
     pam_vbox_log(hPAM, "pam_vbox_acct_mgmt called\n");
     return PAM_SUCCESS;
 }
@@ -854,6 +861,7 @@ DECLEXPORT(int) pam_sm_acct_mgmt(pam_handle_t *hPAM, int iFlags, int argc, const
 
 DECLEXPORT(int) pam_sm_open_session(pam_handle_t *hPAM, int iFlags, int argc, const char **argv)
 {
+    RT_NOREF3(iFlags, argc, argv);
     pam_vbox_log(hPAM, "pam_vbox_open_session called\n");
     RTPrintf("This session was provided by VirtualBox Guest Additions. Have a lot of fun!\n");
     return PAM_SUCCESS;
@@ -862,6 +870,7 @@ DECLEXPORT(int) pam_sm_open_session(pam_handle_t *hPAM, int iFlags, int argc, co
 
 DECLEXPORT(int) pam_sm_close_session(pam_handle_t *hPAM, int iFlags, int argc, const char **argv)
 {
+    RT_NOREF3(iFlags, argc, argv);
     pam_vbox_log(hPAM, "pam_vbox_close_session called\n");
     return PAM_SUCCESS;
 }
@@ -869,6 +878,7 @@ DECLEXPORT(int) pam_sm_close_session(pam_handle_t *hPAM, int iFlags, int argc, c
 
 DECLEXPORT(int) pam_sm_chauthtok(pam_handle_t *hPAM, int iFlags, int argc, const char **argv)
 {
+    RT_NOREF3(iFlags, argc, argv);
     pam_vbox_log(hPAM, "pam_vbox_sm_chauthtok called\n");
     return PAM_SUCCESS;
 }
diff --git a/src/VBox/Additions/common/testcase/Makefile.kmk b/src/VBox/Additions/common/testcase/Makefile.kmk
index df542b8..a888dbf 100644
--- a/src/VBox/Additions/common/testcase/Makefile.kmk
+++ b/src/VBox/Additions/common/testcase/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2007-2015 Oracle Corporation
+# Copyright (C) 2007-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ PROGRAMS += tstPageFusion
 #
 # tstPageFusion
 #
-tstPageFusion_TEMPLATE      = NewVBoxGuestR3Exe
+tstPageFusion_TEMPLATE      = VBoxGuestR3Exe
 tstPageFusion_DEFS.win     += _WIN32_WINNT=0x0501
 tstPageFusion_SOURCES       = \
 	tstPageFusion.cpp
diff --git a/src/VBox/Additions/common/testcase/tstPageFusion.cpp b/src/VBox/Additions/common/testcase/tstPageFusion.cpp
index d3e3c59..5e4acbf 100644
--- a/src/VBox/Additions/common/testcase/tstPageFusion.cpp
+++ b/src/VBox/Additions/common/testcase/tstPageFusion.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -36,7 +36,7 @@
 *********************************************************************************************************************************/
 
 #ifdef RT_OS_WINDOWS
-#include <Windows.h>
+#include <iprt/win/windows.h>
 #include <process.h> /* Needed for file version information. */
 #include <tlhelp32.h>
 #include <psapi.h>
@@ -207,7 +207,7 @@ void VBoxServicePageSharingInspectModules(DWORD dwProcessId)
     bRet = Module32First(hSnapshot, &ModuleInfo);
     do
     {
-        /** todo when changing this make sure VBoxService.exe is excluded! */
+        /** @todo when changing this make sure VBoxService.exe is excluded! */
         char *pszDot = strrchr(ModuleInfo.szModule, '.');
         if (    pszDot
             &&  (pszDot[1] == 'e' || pszDot[1] == 'E'))
@@ -314,7 +314,7 @@ skipkernelmodules:
 #else
 void VBoxServicePageSharingInspectGuest()
 {
-    /* @todo other platforms */
+    /** @todo other platforms */
 }
 #endif
 
@@ -331,7 +331,7 @@ static DECLCALLBACK(int) VBoxServicePageSharingInit(void)
         ZwQuerySystemInformation = (PFNZWQUERYSYSTEMINFORMATION)GetProcAddress(hNtdll, "ZwQuerySystemInformation");
 #endif
 
-    /* @todo report system name and version */
+    /** @todo report system name and version */
     /* Never fail here. */
     return VINF_SUCCESS;
 }
diff --git a/src/VBox/Additions/darwin/Installer/Makefile.kmk b/src/VBox/Additions/darwin/Installer/Makefile.kmk
index 5dbfc7e..58fb964 100644
--- a/src/VBox/Additions/darwin/Installer/Makefile.kmk
+++ b/src/VBox/Additions/darwin/Installer/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/darwin/Makefile.kmk b/src/VBox/Additions/darwin/Makefile.kmk
index 889f6b5..9d7187d 100644
--- a/src/VBox/Additions/darwin/Makefile.kmk
+++ b/src/VBox/Additions/darwin/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2010-2015 Oracle Corporation
+# Copyright (C) 2010-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/darwin/VBoxClient/Makefile.kmk b/src/VBox/Additions/darwin/VBoxClient/Makefile.kmk
index da4b5cc..ce447cb 100644
--- a/src/VBox/Additions/darwin/VBoxClient/Makefile.kmk
+++ b/src/VBox/Additions/darwin/VBoxClient/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/darwin/VBoxClient/VBoxClient.cpp b/src/VBox/Additions/darwin/VBoxClient/VBoxClient.cpp
index d3bcea5..ded0cb0 100644
--- a/src/VBox/Additions/darwin/VBoxClient/VBoxClient.cpp
+++ b/src/VBox/Additions/darwin/VBoxClient/VBoxClient.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2013 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/darwin/VBoxClient/VBoxClientClipboard.cpp b/src/VBox/Additions/darwin/VBoxClient/VBoxClientClipboard.cpp
index 4de16f3..d7ac178 100644
--- a/src/VBox/Additions/darwin/VBoxClient/VBoxClientClipboard.cpp
+++ b/src/VBox/Additions/darwin/VBoxClient/VBoxClientClipboard.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2013 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -145,13 +145,15 @@ static DECLCALLBACK(int) vbclClipboardDispatcher(RTTHREAD ThreadSelf, void *pvUs
  *
  * Forwards cliproard content between host and guest.
  *
- * @param   ThreadSelf  Unused parameter.
+ * @param   hThreadSelf  Unused parameter.
  * @param   pvUser      Unused parameter.
  *
  * @return  IPRT status code.
  */
-static DECLCALLBACK(int) vbclGuestPasteboardPoll(RTTHREAD ThreadSelf, void *pvUser)
+static DECLCALLBACK(int) vbclGuestPasteboardPoll(RTTHREAD hThreadSelf, void *pvUser)
 {
+    RT_NOREF(hThreadSelf, pvUser);
+
     /*
      * Block all signals for this thread. Only the main thread will handle signals.
      */
diff --git a/src/VBox/Additions/darwin/VBoxClient/VBoxClientClipboardGuestToHost.cpp b/src/VBox/Additions/darwin/VBoxClient/VBoxClientClipboardGuestToHost.cpp
index a6e2f95..3c67a4f 100644
--- a/src/VBox/Additions/darwin/VBoxClient/VBoxClientClipboardGuestToHost.cpp
+++ b/src/VBox/Additions/darwin/VBoxClient/VBoxClientClipboardGuestToHost.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2013 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/darwin/VBoxClient/VBoxClientClipboardHostToGuest.cpp b/src/VBox/Additions/darwin/VBoxClient/VBoxClientClipboardHostToGuest.cpp
index 59fad04..be32551 100644
--- a/src/VBox/Additions/darwin/VBoxClient/VBoxClientClipboardHostToGuest.cpp
+++ b/src/VBox/Additions/darwin/VBoxClient/VBoxClientClipboardHostToGuest.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2013 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/darwin/VBoxClient/VBoxClientInternal.h b/src/VBox/Additions/darwin/VBoxClient/VBoxClientInternal.h
index 1fdf8c1..2ffa183 100644
--- a/src/VBox/Additions/darwin/VBoxClient/VBoxClientInternal.h
+++ b/src/VBox/Additions/darwin/VBoxClient/VBoxClientInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2013 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/darwin/vboxfs/Makefile.kmk b/src/VBox/Additions/darwin/vboxfs/Makefile.kmk
index de7a7a9..64cb955 100644
--- a/src/VBox/Additions/darwin/vboxfs/Makefile.kmk
+++ b/src/VBox/Additions/darwin/vboxfs/Makefile.kmk
@@ -2,7 +2,7 @@
 #
 # VirtualBox Shared Folders driver
 #
-# Copyright (C) 2007-2013 Oracle Corporation
+# Copyright (C) 2007-2016 Oracle Corporation
 #
 
 SUB_DEPTH = ../../../../..
diff --git a/src/VBox/Additions/darwin/vboxfs/VBoxVFS-VFSOps.cpp b/src/VBox/Additions/darwin/vboxfs/VBoxVFS-VFSOps.cpp
index 582f8e0..7524ff2 100644
--- a/src/VBox/Additions/darwin/vboxfs/VBoxVFS-VFSOps.cpp
+++ b/src/VBox/Additions/darwin/vboxfs/VBoxVFS-VFSOps.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -13,15 +13,6 @@
  * Foundation, in version 2 as it comes in the "COPYING" file of the
  * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- *
- * The contents of this file may alternatively be used under the terms
- * of the Common Development and Distribution License Version 1.0
- * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
- * VirtualBox OSE distribution, in which case the provisions of the
- * CDDL are applicable instead of those of the GPL.
- *
- * You may elect to license modified versions of this file under the
- * terms and conditions of either the GPL or the CDDL or both.
  */
 
 #include <mach/kmod.h>
@@ -447,7 +438,7 @@ vboxvfs_root(struct mount *mp, struct vnode **ppVnode, vfs_context_t pContext)
         while (fRootVnodeState != VBOXVFS_OBJECT_INITIALIZED
             && fRootVnodeState != VBOXVFS_OBJECT_INVALID)
         {
-            /* @todo: Currently, we are burning CPU cycles while waiting. This is for a short
+            /** @todo Currently, we are burning CPU cycles while waiting. This is for a short
              * time but we should relax here! */
             fRootVnodeState = ASMAtomicReadU8(&pMount->fRootVnodeState);
 
@@ -537,12 +528,12 @@ vboxvfs_getattr(struct mount *mp, struct vfs_attr *pAttr, vfs_context_t pContext
     VFSATTR_CLEAR_ACTIVE(pAttr, f_ffree);
     VFSATTR_CLEAR_ACTIVE(pAttr, f_fssubtype);
 
-    /* todo: take care about f_capabilities and f_attributes, f_fsid */
+    /** @todo take care about f_capabilities and f_attributes, f_fsid */
     VFSATTR_CLEAR_ACTIVE(pAttr, f_capabilities);
     VFSATTR_CLEAR_ACTIVE(pAttr, f_attributes);
     VFSATTR_CLEAR_ACTIVE(pAttr, f_fsid);
 
-    /* todo: take care about f_create_time, f_modify_time, f_access_time, f_backup_time */
+    /** @todo take care about f_create_time, f_modify_time, f_access_time, f_backup_time */
     VFSATTR_CLEAR_ACTIVE(pAttr, f_create_time);
     VFSATTR_CLEAR_ACTIVE(pAttr, f_modify_time);
     VFSATTR_CLEAR_ACTIVE(pAttr, f_access_time);
diff --git a/src/VBox/Additions/darwin/vboxfs/VBoxVFS-VNODEOps.cpp b/src/VBox/Additions/darwin/vboxfs/VBoxVFS-VNODEOps.cpp
index d41e43c..ad87f9b 100644
--- a/src/VBox/Additions/darwin/vboxfs/VBoxVFS-VNODEOps.cpp
+++ b/src/VBox/Additions/darwin/vboxfs/VBoxVFS-VNODEOps.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -13,15 +13,6 @@
  * Foundation, in version 2 as it comes in the "COPYING" file of the
  * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- *
- * The contents of this file may alternatively be used under the terms
- * of the Common Development and Distribution License Version 1.0
- * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
- * VirtualBox OSE distribution, in which case the provisions of the
- * CDDL are applicable instead of those of the GPL.
- *
- * You may elect to license modified versions of this file under the
- * terms and conditions of either the GPL or the CDDL or both.
  */
 
 #include <sys/mount.h>
@@ -109,9 +100,9 @@ vboxvfs_vnode_getattr(struct vnop_getattr_args *args)
         /* Not present on 10.6 */
         //VATTR_CLEAR_ACTIVE(vnode_args, va_addedtime);
 
-        /* todo: take care about va_encoding (file name encoding) */
+        /** @todo take care about va_encoding (file name encoding) */
         VATTR_CLEAR_ACTIVE(vnode_args, va_encoding);
-        /* todo: take care about: va_acl */
+        /** @todo take care about: va_acl */
         VATTR_CLEAR_ACTIVE(vnode_args, va_acl);
 
         VATTR_CLEAR_ACTIVE(vnode_args, va_name);
@@ -320,7 +311,7 @@ vboxvfs_vnode_lookup(struct vnop_lookup_args *args)
         {
             /* If vnode exist in guets VFS cache, but not exist on a host -- just forget it. */
             cache_purge(vnode);
-            /* todo: free vnode data here */
+            /** @todo free vnode data here */
             rc = ENOENT;
         }
     }
diff --git a/src/VBox/Additions/darwin/vboxfs/VBoxVFS-utils.cpp b/src/VBox/Additions/darwin/vboxfs/VBoxVFS-utils.cpp
index 78cab21..fd02f1c 100644
--- a/src/VBox/Additions/darwin/vboxfs/VBoxVFS-utils.cpp
+++ b/src/VBox/Additions/darwin/vboxfs/VBoxVFS-utils.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -13,15 +13,6 @@
  * Foundation, in version 2 as it comes in the "COPYING" file of the
  * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- *
- * The contents of this file may alternatively be used under the terms
- * of the Common Development and Distribution License Version 1.0
- * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
- * VirtualBox OSE distribution, in which case the provisions of the
- * CDDL are applicable instead of those of the GPL.
- *
- * You may elect to license modified versions of this file under the
- * terms and conditions of either the GPL or the CDDL or both.
  */
 
 #include <mach/kmod.h>
diff --git a/src/VBox/Additions/darwin/vboxfs/VBoxVFS.cpp b/src/VBox/Additions/darwin/vboxfs/VBoxVFS.cpp
index 3f37ea5..c0c1e2a 100644
--- a/src/VBox/Additions/darwin/vboxfs/VBoxVFS.cpp
+++ b/src/VBox/Additions/darwin/vboxfs/VBoxVFS.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -13,15 +13,6 @@
  * Foundation, in version 2 as it comes in the "COPYING" file of the
  * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- *
- * The contents of this file may alternatively be used under the terms
- * of the Common Development and Distribution License Version 1.0
- * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
- * VirtualBox OSE distribution, in which case the provisions of the
- * CDDL are applicable instead of those of the GPL.
- *
- * You may elect to license modified versions of this file under the
- * terms and conditions of either the GPL or the CDDL or both.
  */
 
 #include <IOKit/IOLib.h> /* Assert as function */
diff --git a/src/VBox/Additions/darwin/vboxfs/mount.vboxvfs.c b/src/VBox/Additions/darwin/vboxfs/mount.vboxvfs.c
index 72120c1..4a55dd9 100644
--- a/src/VBox/Additions/darwin/vboxfs/mount.vboxvfs.c
+++ b/src/VBox/Additions/darwin/vboxfs/mount.vboxvfs.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -13,15 +13,6 @@
  * Foundation, in version 2 as it comes in the "COPYING" file of the
  * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- *
- * The contents of this file may alternatively be used under the terms
- * of the Common Development and Distribution License Version 1.0
- * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
- * VirtualBox OSE distribution, in which case the provisions of the
- * CDDL are applicable instead of those of the GPL.
- *
- * You may elect to license modified versions of this file under the
- * terms and conditions of either the GPL or the CDDL or both.
  */
 
 #include <stdio.h>
diff --git a/src/VBox/Additions/darwin/vboxfs/vboxvfs.h b/src/VBox/Additions/darwin/vboxfs/vboxvfs.h
index 2da3bc0..ad2c5cb 100644
--- a/src/VBox/Additions/darwin/vboxfs/vboxvfs.h
+++ b/src/VBox/Additions/darwin/vboxfs/vboxvfs.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -13,15 +13,6 @@
  * Foundation, in version 2 as it comes in the "COPYING" file of the
  * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- *
- * The contents of this file may alternatively be used under the terms
- * of the Common Development and Distribution License Version 1.0
- * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
- * VirtualBox OSE distribution, in which case the provisions of the
- * CDDL are applicable instead of those of the GPL.
- *
- * You may elect to license modified versions of this file under the
- * terms and conditions of either the GPL or the CDDL or both.
  */
 
 #define MODULE_NAME "VBoxVFS"
diff --git a/src/VBox/Additions/freebsd/Makefile.kmk b/src/VBox/Additions/freebsd/Makefile.kmk
index e1699f4..4585fbf 100644
--- a/src/VBox/Additions/freebsd/Makefile.kmk
+++ b/src/VBox/Additions/freebsd/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2008-2015 Oracle Corporation
+# Copyright (C) 2008-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/freebsd/drm/Makefile.kmk b/src/VBox/Additions/freebsd/drm/Makefile.kmk
index 5b2cacb..bb364f5 100644
--- a/src/VBox/Additions/freebsd/drm/Makefile.kmk
+++ b/src/VBox/Additions/freebsd/drm/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2009-2015 Oracle Corporation
+# Copyright (C) 2009-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/freebsd/drm/vboxvideo_drm.c b/src/VBox/Additions/freebsd/drm/vboxvideo_drm.c
index 9d6a3db..ed66e43 100644
--- a/src/VBox/Additions/freebsd/drm/vboxvideo_drm.c
+++ b/src/VBox/Additions/freebsd/drm/vboxvideo_drm.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/freebsd/vboxvfs/Makefile.kmk b/src/VBox/Additions/freebsd/vboxvfs/Makefile.kmk
index 2791e48..9cf6e2b 100644
--- a/src/VBox/Additions/freebsd/vboxvfs/Makefile.kmk
+++ b/src/VBox/Additions/freebsd/vboxvfs/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2007-2015 Oracle Corporation
+# Copyright (C) 2007-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/freebsd/vboxvfs/vboxvfs.h b/src/VBox/Additions/freebsd/vboxvfs/vboxvfs.h
index 513416f..5846c58 100644
--- a/src/VBox/Additions/freebsd/vboxvfs/vboxvfs.h
+++ b/src/VBox/Additions/freebsd/vboxvfs/vboxvfs.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vfsops.c b/src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vfsops.c
index 6060e36..b2177dd 100644
--- a/src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vfsops.c
+++ b/src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vfsops.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2010 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -153,7 +153,7 @@ static int vboxvfs_mount(struct mount *mp, struct thread *td)
 
     mp->mnt_data = pShFlGlobalInfo;
 
-    /* @todo root vnode. */
+    /** @todo root vnode. */
 
     vfs_getnewfsid(mp);
     vfs_mountedfrom(mp, pszShare);
diff --git a/src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vnops.c b/src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vnops.c
index 622cbc4..da83420 100644
--- a/src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vnops.c
+++ b/src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vnops.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2010 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/haiku/Makefile.kmk b/src/VBox/Additions/haiku/Makefile.kmk
index 4892c22..4820152 100644
--- a/src/VBox/Additions/haiku/Makefile.kmk
+++ b/src/VBox/Additions/haiku/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2012-2015 Oracle Corporation
+# Copyright (C) 2012-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/haiku/SharedFolders/Makefile.kmk b/src/VBox/Additions/haiku/SharedFolders/Makefile.kmk
index c05f3fb..8711850 100644
--- a/src/VBox/Additions/haiku/SharedFolders/Makefile.kmk
+++ b/src/VBox/Additions/haiku/SharedFolders/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2012-2015 Oracle Corporation
+# Copyright (C) 2012-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/haiku/SharedFolders/OpenHashTable.h b/src/VBox/Additions/haiku/SharedFolders/OpenHashTable.h
index cec2fe3..e0266b9 100644
--- a/src/VBox/Additions/haiku/SharedFolders/OpenHashTable.h
+++ b/src/VBox/Additions/haiku/SharedFolders/OpenHashTable.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/haiku/SharedFolders/kernel_cpp.h b/src/VBox/Additions/haiku/SharedFolders/kernel_cpp.h
index ca0bb4e..398033d 100644
--- a/src/VBox/Additions/haiku/SharedFolders/kernel_cpp.h
+++ b/src/VBox/Additions/haiku/SharedFolders/kernel_cpp.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/haiku/SharedFolders/lock.h b/src/VBox/Additions/haiku/SharedFolders/lock.h
index c4cb31b..07c9e61 100644
--- a/src/VBox/Additions/haiku/SharedFolders/lock.h
+++ b/src/VBox/Additions/haiku/SharedFolders/lock.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/haiku/SharedFolders/vboxsf.c b/src/VBox/Additions/haiku/SharedFolders/vboxsf.c
index a372b8b..9f90d1b 100644
--- a/src/VBox/Additions/haiku/SharedFolders/vboxsf.c
+++ b/src/VBox/Additions/haiku/SharedFolders/vboxsf.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -56,7 +56,7 @@ static fs_vnode_ops vboxsf_vnode_ops;
 status_t init_module(void)
 {
 #if 0
-    /* @todo enable this soon */
+    /** @todo enable this soon */
     int rc = get_module(VBOXGUEST_MODULE_NAME, (module_info **)&g_VBoxGuest);
     if (RT_LIKELY(rc == B_OK)
     {
@@ -765,7 +765,7 @@ status_t vboxsf_read(fs_volume* _volume, fs_vnode* _vnode, void* _cookie, off_t
         *length = 0xFFFFFFFF;
 
     uint32_t l = *length;
-    void* other_buffer = malloc(l);  /* @todo map the user memory into kernel space here for efficiency */
+    void* other_buffer = malloc(l);  /** @todo map the user memory into kernel space here for efficiency */
     int rc = VbglR0SfRead(&g_clientHandle, &volume->map, cookie->handle, pos, &l, other_buffer, false /*fLocked*/);
     memcpy(buffer, other_buffer, l);
     free(other_buffer);
@@ -786,7 +786,7 @@ status_t vboxsf_write(fs_volume* _volume, fs_vnode* _vnode, void* _cookie, off_t
         *length = 0xFFFFFFFF;
 
     uint32_t l = *length;
-    void* other_buffer = malloc(l);  /* @todo map the user memory into kernel space here for efficiency */
+    void* other_buffer = malloc(l);  /** @todo map the user memory into kernel space here for efficiency */
     memcpy(other_buffer, buffer, l);
     int rc = VbglR0SfWrite(&g_clientHandle, &volume->map, cookie->handle, pos, &l, other_buffer, false /*fLocked*/);
     free(other_buffer);
@@ -898,7 +898,7 @@ status_t vboxsf_read_symlink(fs_volume* _volume, fs_vnode* link, char* buffer, s
 }
 
 
-/* @todo move this into the runtime */
+/** @todo move this into the runtime */
 status_t vbox_err_to_haiku_err(int rc)
 {
     switch (rc)
diff --git a/src/VBox/Additions/haiku/SharedFolders/vboxsf.h b/src/VBox/Additions/haiku/SharedFolders/vboxsf.h
index 634654b..48c3dc6 100644
--- a/src/VBox/Additions/haiku/SharedFolders/vboxsf.h
+++ b/src/VBox/Additions/haiku/SharedFolders/vboxsf.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/haiku/SharedFolders/vnode_cache.cpp b/src/VBox/Additions/haiku/SharedFolders/vnode_cache.cpp
index b6ae5fb..92bee8f 100644
--- a/src/VBox/Additions/haiku/SharedFolders/vnode_cache.cpp
+++ b/src/VBox/Additions/haiku/SharedFolders/vnode_cache.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/haiku/VBoxMouse/Makefile.kmk b/src/VBox/Additions/haiku/VBoxMouse/Makefile.kmk
index 278a398..76e1fd0 100644
--- a/src/VBox/Additions/haiku/VBoxMouse/Makefile.kmk
+++ b/src/VBox/Additions/haiku/VBoxMouse/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2012-2015 Oracle Corporation
+# Copyright (C) 2012-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/haiku/VBoxMouse/VBoxMouse.cpp b/src/VBox/Additions/haiku/VBoxMouse/VBoxMouse.cpp
index 97a971a..a6389c6 100644
--- a/src/VBox/Additions/haiku/VBoxMouse/VBoxMouse.cpp
+++ b/src/VBox/Additions/haiku/VBoxMouse/VBoxMouse.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/haiku/VBoxMouse/VBoxMouse.h b/src/VBox/Additions/haiku/VBoxMouse/VBoxMouse.h
index 15d31b9..4f740bc 100644
--- a/src/VBox/Additions/haiku/VBoxMouse/VBoxMouse.h
+++ b/src/VBox/Additions/haiku/VBoxMouse/VBoxMouse.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/haiku/VBoxMouse/VBoxMouseFilter.cpp b/src/VBox/Additions/haiku/VBoxMouse/VBoxMouseFilter.cpp
index c5f9b6e..1f445ad 100644
--- a/src/VBox/Additions/haiku/VBoxMouse/VBoxMouseFilter.cpp
+++ b/src/VBox/Additions/haiku/VBoxMouse/VBoxMouseFilter.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -61,7 +61,7 @@
 #include <VBox/log.h>
 #include <iprt/err.h>
 
-/* @todo can this be merged with VBoxMouse? */
+/** @todo can this be merged with VBoxMouse? */
 
 RTDECL(BInputServerFilter *)
 instantiate_input_filter()
diff --git a/src/VBox/Additions/haiku/VBoxMouse/VBoxMouseFilter.h b/src/VBox/Additions/haiku/VBoxMouse/VBoxMouseFilter.h
index 76f769b..9e8fde3 100644
--- a/src/VBox/Additions/haiku/VBoxMouse/VBoxMouseFilter.h
+++ b/src/VBox/Additions/haiku/VBoxMouse/VBoxMouseFilter.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/haiku/VBoxTray/Makefile.kmk b/src/VBox/Additions/haiku/VBoxTray/Makefile.kmk
index 39d297e..e7c306a 100644
--- a/src/VBox/Additions/haiku/VBoxTray/Makefile.kmk
+++ b/src/VBox/Additions/haiku/VBoxTray/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2012-2015 Oracle Corporation
+# Copyright (C) 2012-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/haiku/VBoxTray/VBoxClipboard.cpp b/src/VBox/Additions/haiku/VBoxTray/VBoxClipboard.cpp
index a2dbb9f..13467b2 100644
--- a/src/VBox/Additions/haiku/VBoxTray/VBoxClipboard.cpp
+++ b/src/VBox/Additions/haiku/VBoxTray/VBoxClipboard.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/haiku/VBoxTray/VBoxClipboard.h b/src/VBox/Additions/haiku/VBoxTray/VBoxClipboard.h
index 99730f9..56f8486 100644
--- a/src/VBox/Additions/haiku/VBoxTray/VBoxClipboard.h
+++ b/src/VBox/Additions/haiku/VBoxTray/VBoxClipboard.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/haiku/VBoxTray/VBoxDisplay.cpp b/src/VBox/Additions/haiku/VBoxTray/VBoxDisplay.cpp
index 267da06..6d84e75 100644
--- a/src/VBox/Additions/haiku/VBoxTray/VBoxDisplay.cpp
+++ b/src/VBox/Additions/haiku/VBoxTray/VBoxDisplay.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/haiku/VBoxTray/VBoxDisplay.h b/src/VBox/Additions/haiku/VBoxTray/VBoxDisplay.h
index a194e2a..d91456c 100644
--- a/src/VBox/Additions/haiku/VBoxTray/VBoxDisplay.h
+++ b/src/VBox/Additions/haiku/VBoxTray/VBoxDisplay.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/haiku/VBoxTray/VBoxGuestApplication.cpp b/src/VBox/Additions/haiku/VBoxTray/VBoxGuestApplication.cpp
index 1df1806..37c229a 100644
--- a/src/VBox/Additions/haiku/VBoxTray/VBoxGuestApplication.cpp
+++ b/src/VBox/Additions/haiku/VBoxTray/VBoxGuestApplication.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/haiku/VBoxTray/VBoxGuestApplication.h b/src/VBox/Additions/haiku/VBoxTray/VBoxGuestApplication.h
index a34abe1..9a25c2c 100644
--- a/src/VBox/Additions/haiku/VBoxTray/VBoxGuestApplication.h
+++ b/src/VBox/Additions/haiku/VBoxTray/VBoxGuestApplication.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/haiku/VBoxTray/VBoxGuestDeskbarView.cpp b/src/VBox/Additions/haiku/VBoxTray/VBoxGuestDeskbarView.cpp
index e0344ad..677aa6c 100644
--- a/src/VBox/Additions/haiku/VBoxTray/VBoxGuestDeskbarView.cpp
+++ b/src/VBox/Additions/haiku/VBoxTray/VBoxGuestDeskbarView.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/haiku/VBoxTray/VBoxGuestDeskbarView.h b/src/VBox/Additions/haiku/VBoxTray/VBoxGuestDeskbarView.h
index 778c576..87495a8 100644
--- a/src/VBox/Additions/haiku/VBoxTray/VBoxGuestDeskbarView.h
+++ b/src/VBox/Additions/haiku/VBoxTray/VBoxGuestDeskbarView.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2013 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/haiku/VBoxTray/VBoxServiceDescriptor.h b/src/VBox/Additions/haiku/VBoxTray/VBoxServiceDescriptor.h
index 0e2b504..a7822c8 100644
--- a/src/VBox/Additions/haiku/VBoxTray/VBoxServiceDescriptor.h
+++ b/src/VBox/Additions/haiku/VBoxTray/VBoxServiceDescriptor.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/haiku/VBoxVideo/Makefile.kmk b/src/VBox/Additions/haiku/VBoxVideo/Makefile.kmk
index 5c5c39a..bc9fc17 100644
--- a/src/VBox/Additions/haiku/VBoxVideo/Makefile.kmk
+++ b/src/VBox/Additions/haiku/VBoxVideo/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2012-2015 Oracle Corporation
+# Copyright (C) 2012-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/haiku/VBoxVideo/accelerant/Makefile.kmk b/src/VBox/Additions/haiku/VBoxVideo/accelerant/Makefile.kmk
index 792b33e..3c4f528 100644
--- a/src/VBox/Additions/haiku/VBoxVideo/accelerant/Makefile.kmk
+++ b/src/VBox/Additions/haiku/VBoxVideo/accelerant/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2012-2015 Oracle Corporation
+# Copyright (C) 2012-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/haiku/VBoxVideo/accelerant/accelerant.cpp b/src/VBox/Additions/haiku/VBoxVideo/accelerant/accelerant.cpp
index c2a0cdf..f9b51a2 100644
--- a/src/VBox/Additions/haiku/VBoxVideo/accelerant/accelerant.cpp
+++ b/src/VBox/Additions/haiku/VBoxVideo/accelerant/accelerant.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -281,7 +281,7 @@ uint32 vboxvideo_accelerant_mode_count(void)
 
 status_t vboxvideo_get_mode_list(display_mode *dm)
 {
-    // TODO return some standard modes here
+    /// @todo return some standard modes here
     TRACE("%s\n", __FUNCTION__);
     return vboxvideo_get_display_mode(dm);
 }
diff --git a/src/VBox/Additions/haiku/VBoxVideo/accelerant/accelerant.h b/src/VBox/Additions/haiku/VBoxVideo/accelerant/accelerant.h
index 2675874..b15f980 100644
--- a/src/VBox/Additions/haiku/VBoxVideo/accelerant/accelerant.h
+++ b/src/VBox/Additions/haiku/VBoxVideo/accelerant/accelerant.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/haiku/VBoxVideo/common/VBoxVideo_common.h b/src/VBox/Additions/haiku/VBoxVideo/common/VBoxVideo_common.h
index 4a0e90d..3354806 100644
--- a/src/VBox/Additions/haiku/VBoxVideo/common/VBoxVideo_common.h
+++ b/src/VBox/Additions/haiku/VBoxVideo/common/VBoxVideo_common.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/haiku/VBoxVideo/driver/Makefile.kmk b/src/VBox/Additions/haiku/VBoxVideo/driver/Makefile.kmk
index 0991b06..0c03426 100644
--- a/src/VBox/Additions/haiku/VBoxVideo/driver/Makefile.kmk
+++ b/src/VBox/Additions/haiku/VBoxVideo/driver/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2012-2015 Oracle Corporation
+# Copyright (C) 2012-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/haiku/VBoxVideo/driver/driver.cpp b/src/VBox/Additions/haiku/VBoxVideo/driver/driver.cpp
index 4fb0324..b15afdb 100644
--- a/src/VBox/Additions/haiku/VBoxVideo/driver/driver.cpp
+++ b/src/VBox/Additions/haiku/VBoxVideo/driver/driver.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2013 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -277,7 +277,7 @@ status_t device_open(const char *name, uint32 flags, void **cookie)
     if (!gCanHasDevice || strcmp(name, gDeviceInfo.name) != 0)
         return B_BAD_VALUE;
 
-    /* @todo init device! */
+    /** @todo init device! */
 
     *cookie = (void *)&gDeviceInfo;
     return B_OK;
@@ -300,7 +300,7 @@ status_t device_free(void *dev)
 
     if (di.openCount <= 1)
     {
-        // TODO deinit device!
+        /// @todo deinit device!
         delete_area(di.sharedArea);
         di.sharedArea = -1;
         di.sharedInfo = NULL;
diff --git a/src/VBox/Additions/haiku/include/VBoxGuestInternal.h b/src/VBox/Additions/haiku/include/VBoxGuestInternal.h
index ce5b1d1..e0f16d0 100644
--- a/src/VBox/Additions/haiku/include/VBoxGuestInternal.h
+++ b/src/VBox/Additions/haiku/include/VBoxGuestInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/haiku/include/lock.h b/src/VBox/Additions/haiku/include/lock.h
index cbd6362..5d53ac7 100644
--- a/src/VBox/Additions/haiku/include/lock.h
+++ b/src/VBox/Additions/haiku/include/lock.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/linux/Makefile.kmk b/src/VBox/Additions/linux/Makefile.kmk
index c66f16a..571f3c9 100644
--- a/src/VBox/Additions/linux/Makefile.kmk
+++ b/src/VBox/Additions/linux/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -388,18 +388,15 @@ LnxAdd-init-scripts_EXEC_SOURCES = \
 
 # this file needs editing before it can be included in the generic installer.
 $(VBOX_LNX_ADD_INST_STAGE_DIR)install.sh: \
-		$(VBOX_PATH_LNX_INST_SRC)run-inst.sh \
+		$(VBOX_PATH_LNX_ADD_INST)install.sh.in \
 		$(VBOX_VERSION_STAMP) | $$(dir $$@)
 	$(RM) -f -- $@
 	$(QUIET)$(SED) \
 		-e "s;_VERSION_;$(VBOX_VERSION_STRING);g" \
 		-e "s;_SVNREV_;$(VBOX_SVN_REV);g" \
- 		-e "s;_PACKAGE_NAME_;VirtualBox Guest Additions;g" \
-		-e "s;_PACKAGE_;VBoxGuestAdditions;g" \
 		-e "s;_BUILDTYPE_;$(KBUILD_TYPE);g" \
 		-e "s;_USERNAME_;$(USERNAME);g" \
 		-e "s;_ARCH_;$(KBUILD_TARGET_ARCH);g" \
-		-e "s;_UNINSTALL_SCRIPTS_;vboxadd-x11 vboxvfs vboxadd-timesync vboxadd-service vboxadd;g" \
 		--output $@ \
 		$<
 	$(QUIET)$(CHMOD) 0755 $@
diff --git a/src/VBox/Additions/linux/drm/Makefile.kmk b/src/VBox/Additions/linux/drm/Makefile.kmk
index ebe9b97..a48663e 100644
--- a/src/VBox/Additions/linux/drm/Makefile.kmk
+++ b/src/VBox/Additions/linux/drm/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/linux/drm/vbox_drv.c b/src/VBox/Additions/linux/drm/vbox_drv.c
index d68ec15..517f386 100644
--- a/src/VBox/Additions/linux/drm/vbox_drv.c
+++ b/src/VBox/Additions/linux/drm/vbox_drv.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -194,12 +194,33 @@ static struct pci_driver vbox_pci_driver =
     .driver.pm = &vbox_pm_ops,
 };
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0)
+/* This works around a bug in X servers prior to 1.18.4, which sometimes
+ * submit more dirty rectangles than the kernel is willing to handle and
+ * then disable dirty rectangle handling altogether when they see the
+ * EINVAL error.  I do not want the code to hang around forever, which is
+ * why I am limiting it to certain kernel versions.  We can increase the
+ * limit if some distributions uses old X servers with new kernels. */
+long vbox_ioctl(struct file *filp,
+                unsigned int cmd, unsigned long arg)
+{
+    long rc = drm_ioctl(filp, cmd, arg);
+    if (cmd == DRM_IOCTL_MODE_DIRTYFB && rc == -EINVAL)
+        return -EOVERFLOW;
+    return rc;
+}
+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0) */
+
 static const struct file_operations vbox_fops =
 {
     .owner = THIS_MODULE,
     .open = drm_open,
     .release = drm_release,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0)
+    .unlocked_ioctl = vbox_ioctl,
+#else
     .unlocked_ioctl = drm_ioctl,
+#endif
     .mmap = vbox_mmap,
     .poll = drm_poll,
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0)
@@ -216,8 +237,10 @@ static int vbox_master_set(struct drm_device *dev,
                            bool from_open)
 {
     struct vbox_private *vbox = dev->dev_private;
+    /* We do not yet know whether the new owner can handle hotplug, so we
+     * do not advertise dynamic modes on the first query and send a
+     * tentative hotplug notification after that to see if they query again. */
     vbox->initial_mode_queried = false;
-    vbox_disable_accel(vbox);
     return 0;
 }
 
@@ -227,7 +250,12 @@ static void vbox_master_drop(struct drm_device *dev,
 {
     struct vbox_private *vbox = dev->dev_private;
     vbox->initial_mode_queried = false;
+    mutex_lock(&vbox->hw_mutex);
+    /* Disable VBVA when someone releases master in case the next person tries
+     * to do VESA. */
+    /** @todo work out if anyone is likely to and whether it will even work. */
     vbox_disable_accel(vbox);
+    mutex_unlock(&vbox->hw_mutex);
 }
 
 static struct drm_driver driver =
diff --git a/src/VBox/Additions/linux/drm/vbox_drv.h b/src/VBox/Additions/linux/drm/vbox_drv.h
index 057c882..c3044ff 100644
--- a/src/VBox/Additions/linux/drm/vbox_drv.h
+++ b/src/VBox/Additions/linux/drm/vbox_drv.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -87,12 +87,14 @@
 #define CURSOR_PIXEL_COUNT VBOX_MAX_CURSOR_WIDTH * VBOX_MAX_CURSOR_HEIGHT
 #define CURSOR_DATA_SIZE CURSOR_PIXEL_COUNT * 4 + CURSOR_PIXEL_COUNT / 8
 
+#define VBOX_MAX_SCREENS  32
+
 struct vbox_fbdev;
 
 struct vbox_private {
     struct drm_device *dev;
 
-    uint8_t __iomem *vram;
+    uint8_t __iomem *mapped_vram;
     HGSMIGUESTCOMMANDCONTEXT submit_info;
     struct VBVABUFFERCONTEXT *vbva_info;
     bool any_pitch;
@@ -101,7 +103,9 @@ struct vbox_private {
     /** Amount of available VRAM, including space used for buffers. */
     uint32_t full_vram_size;
     /** Amount of available VRAM, not including space used for buffers. */
-    uint32_t vram_size;
+    uint32_t available_vram_size;
+    /** Offset of mapped VRAM area in full VRAM. */
+    uint32_t vram_map_start;
     /** Offset to the host flags in the VRAM. */
     uint32_t host_flags_offset;
     /** Array of structures for receiving mode hints. */
@@ -286,7 +290,7 @@ static inline int vbox_bo_reserve(struct vbox_bo *bo, bool no_wait)
 {
     int ret;
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0) 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
     ret = ttm_bo_reserve(&bo->bo, true, no_wait, NULL);
 #else
     ret = ttm_bo_reserve(&bo->bo, true, no_wait, false, 0);
diff --git a/src/VBox/Additions/linux/drm/vbox_fb.c b/src/VBox/Additions/linux/drm/vbox_fb.c
index 922dad1..93e8ba5 100644
--- a/src/VBox/Additions/linux/drm/vbox_fb.c
+++ b/src/VBox/Additions/linux/drm/vbox_fb.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -497,5 +497,5 @@ void vbox_fbdev_set_base(struct vbox_private *vbox, unsigned long gpu_addr)
         vbox->fbdev->helper.fbdev->fix.smem_start =
                 vbox->fbdev->helper.fbdev->apertures->ranges[0].base +
                 gpu_addr;
-        vbox->fbdev->helper.fbdev->fix.smem_len = vbox->vram_size - gpu_addr;
+        vbox->fbdev->helper.fbdev->fix.smem_len = vbox->available_vram_size - gpu_addr;
 }
diff --git a/src/VBox/Additions/linux/drm/vbox_irq.c b/src/VBox/Additions/linux/drm/vbox_irq.c
index 0138d68..d6ceed8 100644
--- a/src/VBox/Additions/linux/drm/vbox_irq.c
+++ b/src/VBox/Additions/linux/drm/vbox_irq.c
@@ -56,7 +56,7 @@ static void vbox_clear_irq(void)
 
 static uint32_t vbox_get_flags(struct vbox_private *vbox)
 {
-    return (uint32_t)readl(vbox->vram + vbox->host_flags_offset);
+    return (uint32_t)readl(vbox->mapped_vram + vbox->host_flags_offset);
 }
 
 void vbox_report_hotplug(struct vbox_private *vbox)
@@ -85,7 +85,7 @@ irqreturn_t vbox_irq_handler(int irq, void *arg)
 }
 
 /**
- * Query the host for 
+ * Query the host for
  */
 static void vbox_update_mode_hints(struct vbox_private *vbox)
 {
diff --git a/src/VBox/Additions/linux/drm/vbox_main.c b/src/VBox/Additions/linux/drm/vbox_main.c
index fe0bfb9..86562de 100644
--- a/src/VBox/Additions/linux/drm/vbox_main.c
+++ b/src/VBox/Additions/linux/drm/vbox_main.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -69,13 +69,14 @@ void vbox_enable_accel(struct vbox_private *vbox)
 {
     unsigned i;
     struct VBVABUFFER *vbva;
+    uint32_t vram_map_offset = vbox->available_vram_size - vbox->vram_map_start;
 
     AssertLogRelReturnVoid(vbox->vbva_info != NULL);
     for (i = 0; i < vbox->num_crtcs; ++i) {
         if (vbox->vbva_info[i].pVBVA == NULL) {
             LogFunc(("vboxvideo: enabling VBVA.\n"));
-            vbva = (struct VBVABUFFER *) (  ((uint8_t *)vbox->vram)
-                                           + vbox->vram_size
+            vbva = (struct VBVABUFFER *) (  ((uint8_t *)vbox->mapped_vram)
+                                           + vram_map_offset
                                            + i * VBVA_MIN_BUFFER_SIZE);
             if (!VBoxVBVAEnable(&vbox->vbva_info[i], &vbox->submit_info, vbva, i))
                 AssertReleaseMsgFailed(("VBoxVBVAEnable failed - heap allocation error, very old host or driver error.\n"));
@@ -110,38 +111,38 @@ void vbox_framebuffer_dirty_rectangles(struct drm_framebuffer *fb,
                                        unsigned num_rects)
 {
     struct vbox_private *vbox = fb->dev->dev_private;
+    struct drm_crtc *crtc;
     unsigned i;
 
     LogFunc(("vboxvideo: %d: fb=%p, num_rects=%u, vbox=%p\n", __LINE__, fb,
              num_rects, vbox));
-    vbox_enable_accel(vbox);
     mutex_lock(&vbox->hw_mutex);
-    for (i = 0; i < num_rects; ++i)
-    {
-        struct drm_crtc *crtc;
-        list_for_each_entry(crtc, &fb->dev->mode_config.crtc_list, head)
-        {
-            unsigned crtc_id = to_vbox_crtc(crtc)->crtc_id;
-            VBVACMDHDR cmd_hdr;
-
-            if (   CRTC_FB(crtc) != fb
-                || rects[i].x1 >   crtc->x
-                                  + crtc->hwmode.hdisplay
-                || rects[i].y1 >   crtc->y
-                                  + crtc->hwmode.vdisplay
-                || rects[i].x2 < crtc->x
-                || rects[i].y2 < crtc->y)
-                continue;
-            cmd_hdr.x = (int16_t)rects[i].x1;
-            cmd_hdr.y = (int16_t)rects[i].y1;
-            cmd_hdr.w = (uint16_t)rects[i].x2 - rects[i].x1;
-            cmd_hdr.h = (uint16_t)rects[i].y2 - rects[i].y1;
-            if (VBoxVBVABufferBeginUpdate(&vbox->vbva_info[crtc_id],
-                                          &vbox->submit_info))
+    list_for_each_entry(crtc, &fb->dev->mode_config.crtc_list, head) {
+        if (CRTC_FB(crtc) == fb) {
+            vbox_enable_accel(vbox);
+            for (i = 0; i < num_rects; ++i)
             {
-                VBoxVBVAWrite(&vbox->vbva_info[crtc_id], &vbox->submit_info, &cmd_hdr,
-                              sizeof(cmd_hdr));
-                VBoxVBVABufferEndUpdate(&vbox->vbva_info[crtc_id]);
+                unsigned crtc_id = to_vbox_crtc(crtc)->crtc_id;
+                VBVACMDHDR cmd_hdr;
+
+                if (   rects[i].x1 >   crtc->x
+                                      + crtc->hwmode.hdisplay
+                    || rects[i].y1 >   crtc->y
+                                      + crtc->hwmode.vdisplay
+                    || rects[i].x2 < crtc->x
+                    || rects[i].y2 < crtc->y)
+                    continue;
+                cmd_hdr.x = (int16_t)rects[i].x1;
+                cmd_hdr.y = (int16_t)rects[i].y1;
+                cmd_hdr.w = (uint16_t)rects[i].x2 - rects[i].x1;
+                cmd_hdr.h = (uint16_t)rects[i].y2 - rects[i].y1;
+                if (VBoxVBVABufferBeginUpdate(&vbox->vbva_info[crtc_id],
+                                              &vbox->submit_info))
+                {
+                    VBoxVBVAWrite(&vbox->vbva_info[crtc_id], &vbox->submit_info, &cmd_hdr,
+                                  sizeof(cmd_hdr));
+                    VBoxVBVABufferEndUpdate(&vbox->vbva_info[crtc_id]);
+                }
             }
         }
     }
@@ -254,13 +255,13 @@ static int vbox_accel_init(struct vbox_private *vbox)
             return -ENOMEM;
     }
     /* Take a command buffer for each screen from the end of usable VRAM. */
-    vbox->vram_size -= vbox->num_crtcs * VBVA_MIN_BUFFER_SIZE;
+    vbox->available_vram_size -= vbox->num_crtcs * VBVA_MIN_BUFFER_SIZE;
     for (i = 0; i < vbox->num_crtcs; ++i)
         VBoxVBVASetupBufferContext(&vbox->vbva_info[i],
-                                   vbox->vram_size + i * VBVA_MIN_BUFFER_SIZE,
+                                   vbox->available_vram_size + i * VBVA_MIN_BUFFER_SIZE,
                                    VBVA_MIN_BUFFER_SIZE);
-    LogFunc(("vboxvideo: %d: vbox->vbva_info=%p, vbox->vram_size=%u\n",
-             __LINE__, vbox->vbva_info, (unsigned)vbox->vram_size));
+    LogFunc(("vboxvideo: %d: vbox->vbva_info=%p, vbox->available_vram_size=%u\n",
+             __LINE__, vbox->vbva_info, (unsigned)vbox->available_vram_size));
     return 0;
 }
 
@@ -300,12 +301,16 @@ static bool have_hgsmi_mode_hints(struct vbox_private *vbox)
            && have_cursor == VINF_SUCCESS;
 }
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)
+# define pci_iomap_range(dev, bar, offset, maxlen) \
+    ioremap(pci_resource_start(dev, bar) + offset, maxlen)
+#endif
 
 /** Set up our heaps and data exchange buffers in VRAM before handing the rest
  *  to the memory manager. */
 static int vbox_hw_init(struct vbox_private *vbox)
 {
-    uint32_t base_offset, guest_heap_offset, guest_heap_size, host_flags_offset;
+    uint32_t base_offset, map_start, guest_heap_offset, guest_heap_size, host_flags_offset;
     void *guest_heap;
 
     vbox->full_vram_size = VBoxVideoGetVRAMSize();
@@ -313,17 +318,26 @@ static int vbox_hw_init(struct vbox_private *vbox)
     DRM_INFO("VRAM %08x\n", vbox->full_vram_size);
     VBoxHGSMIGetBaseMappingInfo(vbox->full_vram_size, &base_offset, NULL,
                                 &guest_heap_offset, &guest_heap_size, &host_flags_offset);
-    guest_heap =   ((uint8_t *)vbox->vram) + base_offset + guest_heap_offset;
-    vbox->host_flags_offset = base_offset + host_flags_offset;
+    map_start = (uint32_t)max((int)base_offset
+                              - VBOX_MAX_SCREENS * VBVA_MIN_BUFFER_SIZE, 0);
+    vbox->mapped_vram = pci_iomap_range(vbox->dev->pdev, 0, map_start,
+                                        vbox->full_vram_size - map_start);
+    if (!vbox->mapped_vram)
+        return -ENOMEM;
+    vbox->vram_map_start = map_start;
+    guest_heap = ((uint8_t *)vbox->mapped_vram) + base_offset - map_start
+                   + guest_heap_offset;
+    vbox->host_flags_offset = base_offset - map_start + host_flags_offset;
     if (RT_FAILURE(VBoxHGSMISetupGuestContext(&vbox->submit_info, guest_heap,
                                               guest_heap_size,
                                               base_offset + guest_heap_offset,
                                               &hgsmi_environ)))
         return -ENOMEM;
     /* Reduce available VRAM size to reflect the guest heap. */
-    vbox->vram_size = base_offset;
+    vbox->available_vram_size = base_offset;
     /* Linux drm represents monitors as a 32-bit array. */
-    vbox->num_crtcs = RT_MIN(VBoxHGSMIGetMonitorCount(&vbox->submit_info), 32);
+    vbox->num_crtcs = min(VBoxHGSMIGetMonitorCount(&vbox->submit_info),
+                          (uint32_t)VBOX_MAX_SCREENS);
     if (!have_hgsmi_mode_hints(vbox))
         return -ENOTSUPP;
     vbox->last_mode_hints = kzalloc(sizeof(VBVAMODEHINT) * vbox->num_crtcs, GFP_KERNEL);
@@ -356,12 +370,6 @@ int vbox_driver_load(struct drm_device *dev, unsigned long flags)
     vbox->dev = dev;
 
     mutex_init(&vbox->hw_mutex);
-    /* I hope this won't interfere with the memory manager. */
-    vbox->vram = pci_iomap(dev->pdev, 0, 0);
-    if (!vbox->vram) {
-        ret = -EIO;
-        goto out_free;
-    }
 
     ret = vbox_hw_init(vbox);
     if (ret)
@@ -391,8 +399,8 @@ int vbox_driver_load(struct drm_device *dev, unsigned long flags)
     ret = vbox_fbdev_init(dev);
     if (ret)
         goto out_free;
-    LogFunc(("vboxvideo: %d: vbox=%p, vbox->vram=%p, vbox->full_vram_size=%u\n",
-             __LINE__, vbox, vbox->vram, (unsigned)vbox->full_vram_size));
+    LogFunc(("vboxvideo: %d: vbox=%p, vbox->mapped_vram=%p, vbox->full_vram_size=%u\n",
+             __LINE__, vbox, vbox->mapped_vram, (unsigned)vbox->full_vram_size));
     return 0;
 out_free:
     vbox_driver_unload(dev);
@@ -413,8 +421,8 @@ int vbox_driver_unload(struct drm_device *dev)
 
     vbox_hw_fini(vbox);
     vbox_mm_fini(vbox);
-    if (vbox->vram)
-        pci_iounmap(dev->pdev, vbox->vram);
+    if (vbox->mapped_vram)
+        pci_iounmap(dev->pdev, vbox->mapped_vram);
     kfree(vbox);
     dev->dev_private = NULL;
     LogFunc(("vboxvideo: %d\n", __LINE__));
diff --git a/src/VBox/Additions/linux/drm/vbox_mode.c b/src/VBox/Additions/linux/drm/vbox_mode.c
index e34af45..36a4d15 100644
--- a/src/VBox/Additions/linux/drm/vbox_mode.c
+++ b/src/VBox/Additions/linux/drm/vbox_mode.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -106,7 +106,8 @@ static void vbox_do_modeset(struct drm_crtc *crtc,
                                 crtc->x * bpp / 8 + crtc->y * pitch,
                                 pitch, width, height,
                                 vbox_crtc->blanked ? 0 : bpp, flags);
-    VBoxHGSMIReportFlagsLocation(&vbox->submit_info, vbox->host_flags_offset);
+    VBoxHGSMIReportFlagsLocation(&vbox->submit_info,   vbox->vram_map_start
+                                                     + vbox->host_flags_offset);
     LogFunc(("vboxvideo: %d\n", __LINE__));
 }
 
@@ -132,9 +133,9 @@ static int vbox_set_view(struct drm_crtc *crtc)
         VBVAINFOVIEW *pInfo = (VBVAINFOVIEW *)p;
         pInfo->u32ViewIndex = vbox_crtc->crtc_id;
         pInfo->u32ViewOffset = vbox_crtc->fb_offset;
-        pInfo->u32ViewSize =   vbox->vram_size - vbox_crtc->fb_offset
+        pInfo->u32ViewSize =   vbox->available_vram_size - vbox_crtc->fb_offset
                              + vbox_crtc->crtc_id * VBVA_MIN_BUFFER_SIZE;
-        pInfo->u32MaxScreenSize = vbox->vram_size - vbox_crtc->fb_offset;
+        pInfo->u32MaxScreenSize = vbox->available_vram_size - vbox_crtc->fb_offset;
         VBoxHGSMIBufferSubmit(&vbox->submit_info, p);
         VBoxHGSMIBufferFree(&vbox->submit_info, p);
     }
@@ -259,6 +260,10 @@ static int vbox_crtc_mode_set(struct drm_crtc *crtc,
     LogFunc(("vboxvideo: %d: vbox=%p\n", __LINE__, vbox));
     vbox_crtc_mode_set_base(crtc, x, y, old_fb);
     mutex_lock(&vbox->hw_mutex);
+    /* Disable VBVA when someone sets a new mode until they send us dirty
+     * rectangles, which proves that they can.  A single screen can work
+     * without VBVA. */
+    vbox_disable_accel(vbox);
     rc = vbox_set_view(crtc);
     if (!rc)
         vbox_do_modeset(crtc, mode);
diff --git a/src/VBox/Additions/linux/drm/vbox_ttm.c b/src/VBox/Additions/linux/drm/vbox_ttm.c
index bcce2d2..3b8cedb 100644
--- a/src/VBox/Additions/linux/drm/vbox_ttm.c
+++ b/src/VBox/Additions/linux/drm/vbox_ttm.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -274,6 +274,10 @@ struct ttm_bo_driver vbox_bo_driver = {
     .verify_access = vbox_bo_verify_access,
     .io_mem_reserve = &vbox_ttm_io_mem_reserve,
     .io_mem_free = &vbox_ttm_io_mem_free,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
+    .lru_tail = &ttm_bo_default_lru_tail,
+    .swap_lru_tail = &ttm_bo_default_swap_lru_tail,
+#endif
 };
 
 int vbox_mm_init(struct vbox_private *vbox)
@@ -300,7 +304,7 @@ int vbox_mm_init(struct vbox_private *vbox)
     }
 
     ret = ttm_bo_init_mm(bdev, TTM_PL_VRAM,
-                 vbox->vram_size >> PAGE_SHIFT);
+                 vbox->available_vram_size >> PAGE_SHIFT);
     if (ret) {
         DRM_ERROR("Failed ttm VRAM init: %d\n", ret);
         return ret;
diff --git a/src/VBox/Additions/linux/installer/install.sh.in b/src/VBox/Additions/linux/installer/install.sh.in
new file mode 100755
index 0000000..3186619
--- /dev/null
+++ b/src/VBox/Additions/linux/installer/install.sh.in
@@ -0,0 +1,543 @@
+#!/bin/sh
+#
+# Oracle VM VirtualBox
+# VirtualBox Makeself installation starter script
+# for Linux Guest Additions
+
+#
+# Copyright (C) 2006-2015 Oracle Corporation
+#
+# This file is part of VirtualBox Open Source Edition (OSE), as
+# available from http://www.virtualbox.org. This file is free software;
+# you can redistribute it and/or modify it under the terms of the GNU
+# General Public License (GPL) as published by the Free Software
+# Foundation, in version 2 as it comes in the "COPYING" file of the
+# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+#
+
+# This is a stub installation script to be included in VirtualBox Makeself
+# installers which removes any previous installations of the package, unpacks
+# the package into the filesystem (by default under /opt) and starts the real
+# installation script.
+#
+PATH=$PATH:/bin:/sbin:/usr/sbin
+
+# Note: These variable names must *not* clash with variables in $CONFIG_DIR/$CONFIG!
+PACKAGE="VBoxGuestAdditions"
+PACKAGE_NAME="VirtualBox Guest Additions"
+UNINSTALL="uninstall.sh"
+ROUTINES="routines.sh"
+ARCH="_ARCH_"
+INSTALLATION_VER="_VERSION_"
+INSTALLATION_REV="_SVNREV_"
+BUILD_TYPE="_BUILDTYPE_"
+USERNAME="_USERNAME_"
+UNINSTALL_SCRIPTS="vboxadd-x11 vboxvfs vboxadd-timesync vboxadd-service vboxadd"
+
+INSTALLATION_DIR="/opt/$PACKAGE-$INSTALLATION_VER"
+CONFIG_DIR="/var/lib/$PACKAGE"
+CONFIG="config"
+CONFIG_FILES="filelist"
+SELF=$1
+LOGFILE="/var/log/$PACKAGE.log"
+
+. "./$ROUTINES"
+
+check_root
+
+create_log "$LOGFILE"
+
+## @todo r=andy: Explain options like "force" and "no_setup" -- not self-explanatory
+#        to the user.
+usage()
+{
+    info ""
+    info "Usage: $SELF install [<installation directory>]"
+    info "       [--with-<module>] |"
+    info "       uninstall"
+    info "       [--force] [--no-setup]"
+    info ""
+    info "Example:"
+    info "$SELF install"
+    exit 1
+}
+
+# Create a symlink in the filesystem and add it to the list of package files
+add_symlink()
+{
+    self=add_symlink
+    ## Parameters:
+    # The file the link should point to
+    target="$1"
+    # The name of the actual symlink file.  Must be an absolute path to a
+    # non-existing file in an existing directory.
+    link="$2"
+    link_dir="`dirname "$link"`"
+    test -n "$target" ||
+        { echo 1>&2 "$self: no target specified"; return 1; }
+    test -d "$link_dir" ||
+        { echo 1>&2 "$self: link directory $link_dir does not exist"; return 1; }
+    expr "$link" : "/.*" > /dev/null ||
+        { echo 1>&2 "$self: link file name is not absolute"; return 1; }
+    rm -f "$link"
+    ln -s "$target" "$link"
+    echo "$link" >> "$CONFIG_DIR/$CONFIG_FILES"
+}
+
+# Create symbolic links targeting all files in a directory in another
+# directory in the filesystem
+link_into_fs()
+{
+    ## Parameters:
+    # Directory containing the link target files
+    target_branch="$1"
+    # Directory to create the link files in
+    directory="$2"
+    for i in "$INSTALLATION_DIR/$target_branch"/*; do
+        test -e "$i" &&
+            add_symlink "$i" "$directory/`basename $i`"
+    done
+}
+
+# Look for broken installations or installations without a known uninstaller
+# and try to clean them up, asking the user first.
+def_uninstall()
+{
+    ## Parameters:
+    # Whether to force cleanup without asking the user
+    force="$1"
+
+    . ./deffiles
+    found=0
+    for i in "/opt/$PACKAGE-"*; do
+        test -e "$i" && found=1
+    done
+    for i in $DEFAULT_FILE_NAMES; do
+        test "$found" = 0 && test -e "$i" && found=1
+    done
+    test "$found" = 0 &&
+        for i in $DEFAULT_VERSIONED_FILE_NAMES; do
+            for j in $i-*; do
+                test "$found" = 0 && test -e "$j" && found=1
+            done
+        done
+    test "$found" = 0 && return 0
+    if ! test "$1" = "force" ; then
+        cat 1>&2 << EOF
+You appear to have a version of the VirtualBox Guest Additions
+on your system which was installed from a different source or using a
+different type of installer.  If you installed it from a package from your
+Linux distribution or if it is a default part of the system then we strongly
+recommend that you cancel this installation and remove it properly before
+installing this version.  If this is simply an older or a damaged
+installation you may safely proceed.
+
+Do you wish to continue anyway? [yes or no]
+EOF
+        read reply dummy
+        if ! expr "$reply" : [yY] > /dev/null &&
+            ! expr "$reply" : [yY][eE][sS] > /dev/null
+        then
+            info
+            info "Cancelling installation."
+            return 1
+        fi
+    fi
+    # Stop what we can in the way of services and remove them from the
+    # system
+    for i in $UNINSTALL_SCRIPTS; do
+        stop_init_script "$i" 2>> "${LOGFILE}"
+        test -z "$NO_CLEANUP" && test -x "./$i" && "./$i" cleanup 1>&2 2>> "$LOGFILE"
+        delrunlevel "$i" 2>> "${LOGFILE}"
+        remove_init_script "$i" 2>> "${LOGFILE}"
+    done
+    for i in "/opt/$PACKAGE-"*/init; do
+      for j in $UNINSTALL_SCRIPTS; do
+        script="${i}/${j}"
+        test -x "${script}" && test -z "$NO_CLEANUP" &&
+          grep -q '^# *cleanup_script *$' "${script}" &&
+          "${script}" cleanup 1>&2 2>> "$LOGFILE"
+      done
+    done
+
+    # Get rid of any remaining files
+    for i in $DEFAULT_FILE_NAMES; do
+        rm -f "$i" 2> /dev/null
+    done
+    for i in $DEFAULT_VERSIONED_FILE_NAMES; do
+        rm -f "$i-"* 2> /dev/null
+    done
+    rm -f "/usr/lib/$PACKAGE" "/usr/lib64/$PACKAGE" "/usr/share/$PACKAGE" \
+        "/usr/lib/i386-linux-gnu/$PACKAGE" "/usr/lib/x86_64-linux-gnu/$PACKAGE"
+
+    # And any packages left under /opt
+    for i in "/opt/$PACKAGE-"*; do
+        test -d "$i" && rm -rf "$i"
+    done
+    return 0
+}
+
+info "$PACKAGE_NAME installer"
+
+# Check architecture
+cpu=`uname -m`;
+case "$cpu" in
+  i[3456789]86|x86)
+    cpu="x86"
+    lib_candidates="/usr/lib/i386-linux-gnu /usr/lib /lib"
+    ;;
+  x86_64|amd64)
+    cpu="amd64"
+    lib_candidates="/usr/lib/x86_64-linux-gnu /usr/lib64 /usr/lib /lib64 /lib"
+    ;;
+  *)
+    cpu="unknown"
+esac
+ARCH_PACKAGE="$PACKAGE-$cpu.tar.bz2"
+if [ ! -r "$ARCH_PACKAGE" ]; then
+  info "Detected unsupported $cpu machine type."
+  exit 1
+fi
+# Find the most appropriate libary folder by seeing which of the candidate paths
+# are actually in the shared linker path list and choosing the first.  We look
+# for Debian-specific paths first, then LSB ones, then the new RedHat ones.
+libs=`ldconfig -v 2>/dev/null | grep -v ^$'\t'`
+for i in $lib_candidates; do
+  if echo $libs | grep -q $i; then
+    lib_path=$i
+    break
+  fi
+done
+if [ ! -x "$lib_path" ]; then
+  info "Unable to determine correct library path."
+  exit 1
+fi
+
+# Sensible default actions
+ACTION="install"
+DO_SETUP="true"
+NO_CLEANUP=""
+FORCE_UPGRADE=""
+
+while [ $# -ge 2 ];
+do
+    ARG=$2
+    shift
+
+    if [ -z "$MY_END_OF_OPTIONS" ]; then
+        case "$ARG" in
+
+            install)
+                ACTION="install"
+                ;;
+
+            uninstall)
+                ACTION="uninstall"
+                ;;
+
+            ## @todo Add per-module options handling, e.g. --lightdm-greeter-dir
+             #       or --lightdm-config
+
+            ## @todo Add listing all available modules (+ their options, e.g.
+             #       with callback mod_mymod_show_options?)
+
+            --with-*)
+                MODULE_CUR=`expr "$ARG" : '--with-\(.*\)'`
+                # Check if corresponding module in installer/module-$1 exists.
+                # Note: Module names may not contain spaces or other funny things.
+                if [ ! -f "./installer/module-${MODULE_CUR}" ]; then
+                    info "Error: Module \"${MODULE_CUR}\" does not exist."
+                    usage
+                fi
+                # Give the module the chance of doing initialization work / checks.
+                . "./installer/module-${MODULE_CUR}"
+                mod_${MODULE_CUR}_init
+                if test $? -ne 0; then
+                    echo 1>&2 "Module '${MODULE_CUR}' failed to initialize"
+                    if ! test "$FORCE_UPGRADE" = "force"; then
+                        return 1
+                    fi
+                    # Continue initialization.
+                fi
+                # Add module to the list of modules to handle later.
+                if test -z "${INSTALLATION_MODULES_LIST}"; then
+                    INSTALLATION_MODULES_LIST="${MODULE_CUR}"
+                else
+                    INSTALLATION_MODULES_LIST="${INSTALLATION_MODULES_LIST} ${MODULE_CUR}"
+                fi
+                shift
+                ;;
+
+            --force|force) # Keep "force" for backwards compatibility.
+                FORCE_UPGRADE="force"
+                ;;
+
+            --no-setup|no_setup) # Keep "no_setup" for backwards compatibility.
+                DO_SETUP=""
+                ;;
+
+            --no-cleanup|no_cleanup) # Keep "no_cleanup" for backwards compatibility.
+                # Do not do cleanup of old modules when removing them.  For
+                # testing purposes only.
+                DO_SETUP=""
+                NO_CLEANUP="no_cleanup"
+                ;;
+
+            --)
+                MY_END_OF_OPTIONS="1"
+                ;;
+
+            *)
+                if [ "`echo $1|cut -c1`" != "/" ]; then
+                    info "Please specify an absolute path"
+                    usage
+                fi
+                INSTALLATION_DIR="$1"
+                shift
+                ;;
+        esac
+    fi
+done
+
+# uninstall any previous installation
+INSTALL_DIR=""
+uninstalled=0
+test -r "$CONFIG_DIR/$CONFIG" &&
+    eval `grep ^INSTALL_DIR= "$CONFIG_DIR/$CONFIG"` 2>/dev/null &&
+    eval `grep ^UNINSTALLER= "$CONFIG_DIR/$CONFIG"` 2>/dev/null
+if test -n "$INSTALL_DIR" -a -x "$INSTALL_DIR/$UNINSTALLER"; then
+  "$INSTALL_DIR/$UNINSTALLER" $NO_CLEANUP 1>&2 ||
+    abort "Failed to remove existing installation.  Aborting..."
+  uninstalled=1
+fi
+test "$uninstalled" = 0 && def_uninstall "$FORCE_UPGRADE" && uninstalled=1
+test "$uninstalled" = 0 && exit 1
+rm -f "$CONFIG_DIR/$CONFIG"
+rm -f "$CONFIG_DIR/$CONFIG_FILES"
+rmdir "$CONFIG_DIR" 2>/dev/null
+test "$ACTION" = "install" || exit 0
+
+# Choose a proper umask
+umask 022
+
+# Set installer modules directory
+INSTALLATION_MODULES_DIR="$INSTALLATION_DIR/installer/"
+
+# install the new version
+mkdir -p -m 755 "$CONFIG_DIR"
+test ! -d "$INSTALLATION_DIR" && REMOVE_INSTALLATION_DIR=1
+mkdir -p -m 755 "$INSTALLATION_DIR"
+
+# install and load installer modules
+if [ -d installer ]; then
+  info "Copying additional installer modules ..."
+  mkdir -p -m 755 "$INSTALLATION_MODULES_DIR"
+  for CUR_FILE in `ls installer/*`; do
+      install -p -m 755 "$CUR_FILE" "$INSTALLATION_MODULES_DIR"
+      if [ $? -ne 0 ]; then
+          info "Error: Failed to copy installer module \"$CUR_FILE\""
+          if ! test "$FORCE_UPGRADE" = "force"; then
+              exit 1
+          fi
+      fi
+  done
+fi
+
+# Create a list of the files in the archive, skipping any directories which
+# already exist in the filesystem.
+bzip2 -d -c "$ARCH_PACKAGE" | tar -tf - |
+  while read name; do
+    fullname="$INSTALLATION_DIR/$name"
+    case "$fullname" in
+      */)
+        test ! -d "$fullname" &&
+          echo "$fullname" >> "$CONFIG_DIR/$CONFIG_FILES"
+        ;;
+      *)
+        echo "$fullname" >> "$CONFIG_DIR/$CONFIG_FILES"
+        ;;
+    esac
+  done
+bzip2 -d -c "$ARCH_PACKAGE" | tar -xf - -C "$INSTALLATION_DIR" || exit 1
+
+# Set symlinks into /usr and /sbin
+link_into_fs "bin" "/usr/bin"
+link_into_fs "sbin" "/usr/sbin"
+link_into_fs "lib" "$lib_path"
+add_symlink "$INSTALLATION_DIR/lib/$PACKAGE" /usr/lib/"$PACKAGE"
+link_into_fs "share" "/usr/share"
+link_into_fs "src" "/usr/src"
+
+if [ -d "$INSTALLATION_MODULES_DIR" ]; then
+  info "Installing additional modules ..."
+  for CUR_MODULE in `find "$INSTALLATION_MODULES_DIR" 2>/dev/null`
+      do
+          echo "$CUR_MODULE" >> "$CONFIG_DIR/$CONFIG_FILES"
+      done
+fi
+
+for CUR_MODULE in ${INSTALLATION_MODULES_LIST}
+do
+    mod_${CUR_MODULE}_install
+    if [ $? -ne 0 ]; then
+        info "Error: Failed to install module \"$CUR_MODULE\""
+        if ! test "$FORCE_UPGRADE" = "force"; then
+            exit 1
+        fi
+    fi
+done
+
+# Remember our installation configuration before we call any init scripts
+cat > "$CONFIG_DIR/$CONFIG" << EOF
+# $PACKAGE installation record.
+# Package installation directory
+INSTALL_DIR='$INSTALLATION_DIR'
+# Additional installation modules
+INSTALL_MODULES_DIR='$INSTALLATION_MODULES_DIR'
+INSTALL_MODULES_LIST='$INSTALLATION_MODULES_LIST'
+# Package uninstaller.  If you repackage this software, please make sure
+# that this prints a message and returns an error so that the default
+# uninstaller does not attempt to delete the files installed by your
+# package.
+UNINSTALLER='$UNINSTALL'
+# Package version
+INSTALL_VER='$INSTALLATION_VER'
+INSTALL_REV='$INSTALLATION_REV'
+# Build type and user name for logging purposes
+BUILD_TYPE='$BUILD_TYPE'
+USERNAME='$USERNAME'
+EOF
+
+# Give the modules the chance to write their stuff
+# to the installation config as well.
+if [ -n "${INSTALLATION_MODULES_LIST}" ]; then
+  info "Saving modules configuration ..."
+  for CUR_MODULE in ${INSTALLATION_MODULES_LIST}
+  do
+    echo "`mod_${CUR_MODULE}_config_save`" >> "$CONFIG_DIR/$CONFIG"
+  done
+fi
+
+# Install, set up and start init scripts
+for i in "$INSTALLATION_DIR/init/vboxadd" "$INSTALLATION_DIR/init/vboxadd-service" \
+    "$INSTALLATION_DIR/init/vboxadd-x11"; do
+  if test -r "$i"; then
+    install_init_script "$i" "`basename "$i"`" 2>> "${LOGFILE}"
+    addrunlevel "`basename "$i"`" 2>> "${LOGFILE}"
+    if test -n "$DO_SETUP" && grep -q '^# *setup_script *$' "${i}"; then
+        if "${i}" setup 1>&2 2>> "${LOGFILE}"; then
+            start_init_script "`basename "$i"`" 2>> "${LOGFILE}"
+        else
+            echo 1>&2 "Failed to set up service `basename "$i"`, please check the log file"
+            echo 1>&2 "${LOGFILE} for details."
+        fi
+    fi
+  fi
+done
+
+cp $ROUTINES $INSTALLATION_DIR
+echo $INSTALLATION_DIR/$ROUTINES >> "$CONFIG_DIR/$CONFIG_FILES"
+cat > $INSTALLATION_DIR/$UNINSTALL << EOF
+#!/bin/sh
+# Auto-generated uninstallation file
+
+PATH=\$PATH:/bin:/sbin:/usr/sbin
+LOGFILE="/var/log/$PACKAGE-uninstall.log"
+
+# Read routines.sh
+if ! test -r "$INSTALLATION_DIR/$ROUTINES"; then
+    echo 1>&2 "Required file $ROUTINES not found.  Aborting..."
+    return 1
+fi
+. "$INSTALLATION_DIR/$ROUTINES"
+
+# We need to be run as root
+check_root
+
+create_log "\$LOGFILE"
+
+echo 1>&2 "Removing installed version $INSTALLATION_VER of $PACKAGE_NAME..."
+
+NO_CLEANUP=""
+if test "\$1" = "no_cleanup"; then
+    shift
+    NO_CLEANUP="no_cleanup"
+fi
+
+test -r "$CONFIG_DIR/$CONFIG_FILES" || abort "Required file $CONFIG_FILES not found.  Aborting..."
+
+# Stop and clean up all services
+for i in "$INSTALLATION_DIR/init/vboxadd-x11" "$INSTALLATION_DIR/init/vboxadd-service" \
+    "$INSTALLATION_DIR/init/vboxadd"; do
+    if test -r "\$i"; then
+        stop_init_script "\`basename "\$i"\`" 2>> "${LOGFILE}"
+        test -z "\${NO_CLEANUP}" && grep -q '^# *cleanup_script *$' "\${i}" && "\${i}" cleanup 2>> "\$LOGFILE"
+        delrunlevel "\`basename "\$i"\`" 2>> "${LOGFILE}"
+        remove_init_script "\`basename "\$i"\`" 2>> "${LOGFILE}"
+    fi
+done
+
+# Load all modules
+# Important: This needs to be done before loading the configuration
+#            value below to not override values which are set to a default
+#            value in the modules itself.
+for CUR_MODULE in `find "$INSTALLATION_MODULES_DIR" -name "module-*" 2>/dev/null`
+    do
+        . "\$CUR_MODULE"
+    done
+
+# Load configuration values
+test -r "$CONFIG_DIR/$CONFIG" && . "$CONFIG_DIR/$CONFIG"
+
+# Call uninstallation initialization of all modules
+for CUR_MODULE in "$INSTALLATION_MODULES_LIST"
+    do
+        if test -z "\$CUR_MODULE"; then
+            continue
+        fi
+        mod_\${CUR_MODULE}_pre_uninstall
+        if [ $? -ne 0 ]; then
+            echo 1>&2 "Module \"\$CUR_MODULE\" failed to initialize uninstallation"
+            # Continue initialization.
+        fi
+    done
+
+# Call uninstallation of all modules
+for CUR_MODULE in "$INSTALLATION_MODULES_LIST"
+    do
+        if test -z "\$CUR_MODULE"; then
+            continue
+        fi
+        mod_\${CUR_MODULE}_uninstall
+        if [ $? -ne 0 ]; then
+            echo 1>&2 "Module \"\$CUR_MODULE\" failed to uninstall"
+            # Continue uninstallation.
+        fi
+    done
+
+# And remove all files and empty installation directories
+# Remove any non-directory entries
+cat "$CONFIG_DIR/$CONFIG_FILES" | xargs rm 2>/dev/null
+# Remove any empty (of files) directories in the file list
+cat "$CONFIG_DIR/$CONFIG_FILES" |
+    while read file; do
+        case "\$file" in
+            */)
+            test -d "\$file" &&
+                find "\$file" -depth -type d -exec rmdir '{}' ';' 2>/dev/null
+            ;;
+        esac
+    done
+
+# Remove configuration files
+rm "$CONFIG_DIR/$CONFIG_FILES" 2>/dev/null
+rm "$CONFIG_DIR/$CONFIG" 2>/dev/null
+rmdir "$CONFIG_DIR" 2>/dev/null
+exit 0
+EOF
+chmod 0755 $INSTALLATION_DIR/$UNINSTALL
+echo $INSTALLATION_DIR/$UNINSTALL >> "$CONFIG_DIR/$CONFIG_FILES"
+test -n "$REMOVE_INSTALLATION_DIR" &&
+  echo "$INSTALLATION_DIR/" >> "$CONFIG_DIR/$CONFIG_FILES"
+
diff --git a/src/VBox/Additions/linux/installer/vboxadd.sh b/src/VBox/Additions/linux/installer/vboxadd.sh
index f8caa51..759a247 100755
--- a/src/VBox/Additions/linux/installer/vboxadd.sh
+++ b/src/VBox/Additions/linux/installer/vboxadd.sh
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-# Linux Additions kernel module init script ($Revision: 108947 $)
+# Linux Additions kernel module init script ($Revision: 109440 $)
 #
 
 #
@@ -39,12 +39,6 @@ OLDMODULES="vboxguest vboxadd vboxsf vboxvfs vboxvideo"
 SCRIPTNAME=vboxadd.sh
 QUICKSETUP=
 
-# These are getting hard-coded in more and more places...
-test -z "${KERN_DIR}" && KERN_DIR="/lib/modules/`uname -r`/build"
-test -z "${MODULE_DIR}" && MODULE_DIR="/lib/modules/`uname -r`/misc"
-KERN_DIR_SUFFIX="${KERN_DIR#/lib/modules/}"
-KERN_VER="${KERN_DIR_SUFFIX%/*}"
-
 if $MODPROBE -c 2>/dev/null | grep -q '^allow_unsupported_modules  *0'; then
   MODPROBE="$MODPROBE --allow-unsupported-modules"
 fi
@@ -227,32 +221,18 @@ start()
     # Install the guest OpenGL drivers.  For now we don't support
     # multi-architecture installations
     rm -f /etc/ld.so.conf.d/00vboxvideo.conf
-    ldconfig
     if /usr/bin/VBoxClient --check3d 2>/dev/null; then
-        rm -f /var/lib/VBoxGuestAdditions/lib/system/tmp.so
-        mkdir -m 0755 -p /var/lib/VBoxGuestAdditions/lib/system
-        ldconfig -p | while read -r line; do
-            case "${line}" in "libGL.so.1 ${ldconfig_arch} => "*)
-                ln -s "${line#libGL.so.1 ${ldconfig_arch} => }" /var/lib/VBoxGuestAdditions/lib/system/tmp.so
-                mv /var/lib/VBoxGuestAdditions/lib/system/tmp.so /var/lib/VBoxGuestAdditions/lib/system/libGL.so.1
-                break
-            esac
-        done
-        ldconfig -p | while read -r line; do
-            case "${line}" in "libEGL.so.1 ${ldconfig_arch} => "*)
-                ln -s "${line#libEGL.so.1 ${ldconfig_arch} => }" /var/lib/VBoxGuestAdditions/lib/system/tmp.so
-                mv /var/lib/VBoxGuestAdditions/lib/system/tmp.so /var/lib/VBoxGuestAdditions/lib/system/libEGL.so.1
-                break
-            esac
-        done
+        mkdir -p /var/lib/VBoxGuestAdditions/lib
         ln -sf "${INSTALL_DIR}/lib/VBoxOGL.so" /var/lib/VBoxGuestAdditions/lib/libGL.so.1
         ln -sf "${INSTALL_DIR}/lib/VBoxEGL.so" /var/lib/VBoxGuestAdditions/lib/libEGL.so.1
         # SELinux for the OpenGL libraries, so that gdm can load them during the
         # acceleration support check.  This prevents an "Oh no, something has gone
         # wrong!" error when starting EL7 guests.
         if test -e /etc/selinux/config; then
-            semanage fcontext -a -t lib_t "/var/lib/VBoxGuestAdditions/lib/libGL.so.1"
-            semanage fcontext -a -t lib_t "/var/lib/VBoxGuestAdditions/lib/libEGL.so.1"
+            if command -v semanage > /dev/null; then
+                semanage fcontext -a -t lib_t "/var/lib/VBoxGuestAdditions/lib/libGL.so.1"
+                semanage fcontext -a -t lib_t "/var/lib/VBoxGuestAdditions/lib/libEGL.so.1"
+            fi
             chcon -h  -t lib_t "/var/lib/VBoxGuestAdditions/lib/libGL.so.1"
             chcon -h  -t lib_t  "/var/lib/VBoxGuestAdditions/lib/libEGL.so.1"
         fi
@@ -279,14 +259,11 @@ stop()
     if ! umount -a -t vboxsf 2>/dev/null; then
         fail "Cannot unmount vboxsf folders"
     fi
-    if running_vboxsf; then
-        rmmod vboxsf 2>/dev/null || fail "Cannot unload module vboxsf"
-    fi
-    if running_vboxguest; then
-        rmmod vboxguest 2>/dev/null || fail "Cannot unload module vboxguest"
-        rm -f $userdev || fail "Cannot unlink $userdev"
-        rm -f $dev || fail "Cannot unlink $dev"
-    fi
+    modprobe -q -r -a vboxvideo vboxsf vboxguest
+    egrep -q 'vboxguest|vboxsf|vboxvideo' /proc/modules &&
+        echo "You may need to restart your guest system to finish removing the guest drivers."
+    rm -f $userdev || fail "Cannot unlink $userdev"
+    rm -f $dev || fail "Cannot unlink $dev"
     succ_msg
     return 0
 }
@@ -297,39 +274,16 @@ restart()
     return 0
 }
 
-## Update the initramfs.  Debian and Ubuntu put the graphics driver in, and
-# need the touch(1) command below.  Everyone else that I checked just need
-# the right module alias file from depmod(1) and only use the initramfs to
-# load the root filesystem, not the boot splash.  update-initramfs works
-# for the first two and dracut for every one else I checked.  We are only
-# interested in distributions recent enough to use the KMS vboxvideo driver.
-## @param $1  kernel version to update for.
-update_module_dependencies()
-{
-    depmod "${1}"
-    rm -f "/lib/modules/${1}/initrd/vboxvideo"
-    test -d "/lib/modules/${1}/initrd" &&
-        test -f "/lib/modules/${1}/misc/vboxvideo.ko" &&
-        touch "/lib/modules/${1}/initrd/vboxvideo"
-    test -n "${QUICKSETUP}" && return
-    if type dracut >/dev/null 2>&1; then
-        dracut -f "/boot/initramfs-${1}.img" "${1}"
-    elif type update-initramfs >/dev/null 2>&1; then
-        update-initramfs -u -k "${1}"
-    fi
-}
-
 # Remove any existing VirtualBox guest kernel modules from the disk, but not
 # from the kernel as they may still be in use
 cleanup_modules()
 {
     begin "Removing existing VirtualBox kernel modules"
-    # We no longer support DKMS, remove any leftovers.
-    for i in vboxguest vboxadd vboxsf vboxvfs vboxvideo; do
+    for i in ${OLDMODULES}; do
+        # We no longer support DKMS, remove any leftovers.
         rm -rf "/var/lib/dkms/${i}"*
-    done
-    for i in $OLDMODULES; do
-        find /lib/modules -name $i\* | xargs rm 2>/dev/null
+        # And remove old modules.
+        rm -f /lib/modules/*/misc/"${i}"*
     done
     # Remove leftover module folders.
     for i in /lib/modules/*/misc; do
@@ -373,7 +327,7 @@ setup_modules()
         show_error "Look at $LOG to find out what went wrong"
     fi
     succ_msg
-    update_module_dependencies "${KERN_VER}"
+    depmod
     return 0
 }
 
@@ -446,9 +400,9 @@ EOF
     if test -e /etc/selinux/config; then
         # This is correct.  semanage maps this to the real path, and it aborts
         # with an error, telling you what you should have typed, if you specify
-        # the real path.  The "chcon" is there as a back-up in case this is
-        # different on old guests.
-        semanage fcontext -a -t mount_exec_t "/usr/lib/$PACKAGE/mount.vboxsf"
+        # the real path.  The "chcon" is there as a back-up for old guests.
+        command -v semanage > /dev/null &&
+            semanage fcontext -a -t mount_exec_t "/usr/lib/$PACKAGE/mount.vboxsf"
         chcon -t mount_exec_t "$lib_path/$PACKAGE/mount.vboxsf"
     fi
     succ_msg
@@ -502,9 +456,7 @@ cleanup()
 
     # Delete old versions of VBox modules.
     cleanup_modules
-    for i in /lib/modules/*; do
-        update_module_dependencies "${i#/lib/modules/}"
-    done
+    depmod
 
     # Remove old module sources
     for i in $OLDMODULES; do
@@ -521,7 +473,6 @@ cleanup()
     rm -f /etc/kernel/postinst.d/vboxadd /etc/kernel/prerm.d/vboxadd
     rmdir -p /etc/kernel/postinst.d /etc/kernel/prerm.d 2>/dev/null
     rm /etc/udev/rules.d/60-vboxadd.rules 2>/dev/null
-    rm -f /lib/modules/*/initrd/vboxvideo
 }
 
 dmnstatus()
diff --git a/src/VBox/Additions/linux/lightdm-greeter/Config.kmk b/src/VBox/Additions/linux/lightdm-greeter/Config.kmk
new file mode 100644
index 0000000..d62b86f
--- /dev/null
+++ b/src/VBox/Additions/linux/lightdm-greeter/Config.kmk
@@ -0,0 +1,31 @@
+# $Id: Config.kmk $
+## @file
+# kBuild Configuration file for the lightdm-greeter
+#
+
+#
+# Copyright (C) 2016 Oracle Corporation
+#
+# This file is part of VirtualBox Open Source Edition (OSE), as
+# available from http://www.virtualbox.org. This file is free software;
+# you can redistribute it and/or modify it under the terms of the GNU
+# General Public License (GPL) as published by the Free Software
+# Foundation, in version 2 as it comes in the "COPYING" file of the
+# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+#
+
+
+VBOX_LIGHTDM_GREETER_CONFIG_KMK_INCLUDED = 1
+
+# Include the top-level configure file.
+ifndef VBOX_ROOT_CONFIG_KMK_INCLUDED
+ include $(PATH_ROOT)/Config.kmk
+endif
+
+SDK_VBoxGlib20WithIo = glib-2.0 and gio-2.0
+SDK_VBoxGlib20WithIo_VBOX_PKG_CONFIG_CFLAGS := $(shell pkg-config gio-2.0 glib-2.0 --cflags)
+SDK_VBoxGlib20WithIo_INCS     = $(patsubst -I%,%,$(filter -I%,$(SDK_VBoxGlib20WithIo_VBOX_PKG_CONFIG_CFLAGS)))
+SDK_VBoxGlib20WithIo_CFLAGS   = $(filter-out -I%,$(SDK_VBoxGlib20WithIo_VBOX_PKG_CONFIG_CFLAGS))
+SDK_VBoxGlib20WithIo_LDFLAGS := $(shell pkg-config gio-2.0 glib-2.0 --libs)
+
diff --git a/src/VBox/Additions/linux/lightdm-greeter/Makefile.kmk b/src/VBox/Additions/linux/lightdm-greeter/Makefile.kmk
index adb9e09..c2d2d95 100644
--- a/src/VBox/Additions/linux/lightdm-greeter/Makefile.kmk
+++ b/src/VBox/Additions/linux/lightdm-greeter/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2012-2015 Oracle Corporation
+# Copyright (C) 2012-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -18,6 +18,10 @@
 SUB_DEPTH = ../../../../..
 include $(KBUILD_PATH)/subheader.kmk
 
+ifndef VBOX_LIGHTDM_GREETER_CONFIG_KMK_INCLUDED
+ include $(PATH_SUB_CURRENT)/Config.kmk
+endif
+
 ifndef VBOX_OSE
  include $(PATH_SUB_CURRENT)/liblightdm-gobject-1.5.0/Makefile.kmk
 endif
@@ -28,28 +32,33 @@ VBOX_GREETER_WITH_PNG_SUPPORT := 1
 
 # The greeter module.
 PROGRAMS += vbox-greeter
-
 vbox-greeter_TEMPLATE = VBOXGUESTR3EXE
+vbox-greeter_SDKS     = VBoxGlib20WithIo
 vbox-greeter_DEFS     = LOG_TO_BACKDOOR VBOX_WITH_HGCM
 vbox-greeter_DEFS    += \
 	VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\"
 vbox-greeter_DEFS    += \
 	$(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS,) \
-	$(if $(VBOX_WITH_FLTK),VBOX_WITH_FLTK,) \
 	$(if $(VBOX_GREETER_WITH_PNG_SUPPORT),VBOX_GREETER_WITH_PNG_SUPPORT,)
-
-ifndef VBOX_WITH_FLTK
+ifdef VBOX_WITH_FLTK
  vbox-greeter_DEFS   += \
-	GTK_DISABLE_SINGLE_INCLUDES \
-	GDK_DISABLE_DEPRECATED
+ 	VBOX_WITH_FLTK
+else
+ vbox-greeter_DEFS   += \
+ 	GTK_DISABLE_SINGLE_INCLUDES \
+ 	GDK_DISABLE_DEPRECATED
 endif
-vbox-greeter_SOURCES  = vbox-greeter.cpp
-### todo: define some _INCS in Config.kmk and use 'pkg-config glib-2.0 --cflags' in configure to override
-vbox-greeter_INCS     = \
+vbox-greeter_CFLAGS  := $(if $(VBOX_OSE),%(filter-out -I%,$(shell pkg-config --cflags liblightdm-gobject-1)),)
+## @todo r=bird: Why are we cooking our own lightdm-gobject-1 but using system headers?
+##               That sounds like a very risky business to me.  I've added  liblightdm-gobject-1.5.0
+##               to the INCS, however lightdm.h is missing and will be taken from the system.
+vbox-greeter_INCS := \
 	/usr/lib/i386-linux-gnu/glib-2.0/include \
 	/usr/lib/x86_64-linux-gnu/glib-2.0/include \
 	/usr/include/glib-2.0 \
-	/usr/include/lightdm-gobject-1
+       $(if $(VBOX_OSE),,liblightdm-gobject-1.5.0) \
+	/usr/include/lightdm-gobject-1 \
+	$(if $(VBOX_OSE),$(patsubst -I%,%,%(filter -I%,$(shell pkg-config --cflags liblightdm-gobject-1))),)
 ifndef VBOX_WITH_FLTK
  vbox-greeter_INCS   += \
 	/usr/include/glib-2.0 \
@@ -59,8 +68,11 @@ ifndef VBOX_WITH_FLTK
 	/usr/include/gdk-pixbuf-2.0 \
 	/usr/include/atk-1.0
 endif
-### todo: define some _LIBS in Config.kmk and use 'pkg-config glib-2.0 --libs' in configure to override
-vbox-greeter_LIBS = \
+
+vbox-greeter_SOURCES  = \
+	vbox-greeter.cpp
+
+vbox-greeter_LIBS := \
 	$(if $(VBOX_OSE),lightdm-gobject-1,$(VBOX_PATH_ADDITIONS_LIB)/VBox-liblightdm-gobject$(VBOX_SUFF_LIB)) \
 	glib-2.0 \
 	gio-2.0 \
@@ -68,16 +80,22 @@ vbox-greeter_LIBS = \
 	$(VBOX_LIB_IPRT_GUEST_R3_SHARED) \
 	$(VBOX_LIB_VBGL_R3_SHARED) \
 	$(VBOX_LIB_IPRT_GUEST_R3_SHARED)
-ifndef VBOX_WITH_FLTK
- vbox-greeter_LIBS += gtk-3
-endif
 ifdef VBOX_WITH_FLTK
- #vbox-greeter_LDFLAGS = -Wl,-Bsymbolic-functions -Wl,-z,relro /usr/lib/i386-linux-gnu/libfltk.a -lXext -lXft -lfontconfig -lfontconfig -lXinerama -ldl -lm -lX11
- vbox-greeter_LDFLAGS += -s
  vbox-greeter_LIBS += fltk
  ifdef VBOX_GREETER_WITH_PNG_SUPPORT
   vbox-greeter_LIBS += fltk_images
  endif
+ if $(HOSTNAME) == "3960x.dev" && $(USER) == "bird" # whatever.
+  vbox-greeter_LIBS += stdc++
+ endif
+else
+ vbox-greeter_LIBS += gtk-3
+endif
+
+vbox-greeter_LDFLAGS = $(if $(VBOX_OSE),$(shell pkg-config --libs liblightdm-gobject-1),)
+ifdef VBOX_WITH_FLTK
+ #vbox-greeter_LDFLAGS = -Wl,-Bsymbolic-functions -Wl,-z,relro /usr/lib/i386-linux-gnu/libfltk.a -lXext -lXft -lfontconfig -lfontconfig -lXinerama -ldl -lm -lX11
+ vbox-greeter_LDFLAGS += -s
 endif
 
 include $(FILE_KBUILD_SUB_FOOTER)
diff --git a/src/VBox/Additions/linux/lightdm-greeter/liblightdm-gobject-1.5.0/Makefile.kmk b/src/VBox/Additions/linux/lightdm-greeter/liblightdm-gobject-1.5.0/Makefile.kmk
index 8120a0c..7a29dfa 100644
--- a/src/VBox/Additions/linux/lightdm-greeter/liblightdm-gobject-1.5.0/Makefile.kmk
+++ b/src/VBox/Additions/linux/lightdm-greeter/liblightdm-gobject-1.5.0/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2013-2015 Oracle Corporation
+# Copyright (C) 2013-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -22,6 +22,7 @@ include $(KBUILD_PATH)/subheader.kmk
 LIBRARIES += VBox-liblightdm-gobject
 
 VBox-liblightdm-gobject_TEMPLATE = VBOXGUESTR3NPLIB
+VBox-liblightdm-gobject_SDKS = VBoxGlib20WithIo
 VBox-liblightdm-gobject_INCS = \
 	/usr/include/glib-2.0 \
 	/usr/lib/i386-linux-gnu/glib-2.0/include \
diff --git a/src/VBox/Additions/linux/lightdm-greeter/vbox-greeter.cpp b/src/VBox/Additions/linux/lightdm-greeter/vbox-greeter.cpp
index e2893be..cc66644 100644
--- a/src/VBox/Additions/linux/lightdm-greeter/vbox-greeter.cpp
+++ b/src/VBox/Additions/linux/lightdm-greeter/vbox-greeter.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2012-2013 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -20,6 +20,7 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
+#define GLIB_DISABLE_DEPRECATION_WARNINGS 1 /* g_type_init() is deprecated */
 #include <pwd.h>
 #include <syslog.h>
 #include <stdlib.h>
@@ -182,6 +183,7 @@ static void vboxGreeterLog(const char *pszFormat, ...)
 
 /** @tood Move the following two functions to VbglR3 (also see pam_vbox). */
 #ifdef VBOX_WITH_GUEST_PROPS
+
 /**
  * Reads a guest property.
  *
@@ -288,6 +290,7 @@ static int vbox_read_prop(uint32_t uClientID,
     return rc;
 }
 
+# if 0 /* unused */
 /**
  * Waits for a guest property to be changed.
  *
@@ -343,6 +346,8 @@ static int vbox_wait_prop(uint32_t uClientID,
 
     return rc;
 }
+# endif /* unused */
+
 #endif /* VBOX_WITH_GUEST_PROPS */
 
 /**
@@ -410,6 +415,8 @@ static int vboxGreeterCheckCreds(PVBOXGREETERCTX pCtx)
  */
 static void cb_sigterm(int signum)
 {
+    RT_NOREF(signum);
+
     /* Note: This handler must be reentrant-safe. */
 #ifdef VBOX_WITH_FLTK
     g_fRunning = false;
@@ -480,6 +487,7 @@ static void cb_lightdm_show_message(LightDMGreeter *pGreeter,
                                     const gchar *pszText, LightDMPromptType enmType,
                                     gpointer pvData)
 {
+    RT_NOREF(pGreeter);
     vboxGreeterLog("cb_lightdm_show_message: text=%s, type=%d\n", pszText, enmType);
 
     PVBOXGREETERCTX pCtx = (PVBOXGREETERCTX)pvData;
@@ -549,6 +557,7 @@ void cb_btn_login(GtkWidget *pWidget, gpointer pvData)
 #endif
 {
     PVBOXGREETERCTX pCtx = (PVBOXGREETERCTX)pvData;
+    RT_NOREF(pWidget);
     AssertPtr(pCtx);
 
 #ifdef VBOX_WITH_FLTK
@@ -595,6 +604,7 @@ void cb_btn_menu(Fl_Widget *pWidget, void *pvData)
 void cb_btn_menu(GtkWidget *pWidget, gpointer pvData)
 #endif
 {
+    RT_NOREF(pWidget, pvData);
     vboxGreeterLog("menu button pressed\n");
 }
 
@@ -610,6 +620,7 @@ void cb_btn_restart(Fl_Widget *pWidget, void *pvData)
 void cb_btn_restart(GtkWidget *pWidget, gpointer pvData)
 #endif
 {
+    RT_NOREF(pWidget, pvData);
     vboxGreeterLog("restart button pressed\n");
 
     bool fRestart = true;
@@ -639,6 +650,7 @@ void cb_btn_shutdown(Fl_Widget *pWidget, void *pvData)
 void cb_btn_shutdown(GtkWidget *pWidget, gpointer pvData)
 #endif
 {
+    RT_NOREF(pWidget, pvData);
     vboxGreeterLog("shutdown button pressed\n");
 
     bool fShutdown = true;
@@ -662,6 +674,7 @@ void cb_edt_username(Fl_Widget *pWidget, void *pvData)
 void cb_edt_username(GtkWidget *pWidget, gpointer pvData)
 #endif
 {
+    RT_NOREF(pWidget);
     vboxGreeterLog("cb_edt_username called\n");
 
     PVBOXGREETERCTX pCtx = (PVBOXGREETERCTX)pvData;
@@ -678,6 +691,7 @@ void cb_edt_password(Fl_Widget *pWidget, void *pvData)
 void cb_edt_password(GtkWidget *pWidget, gpointer pvData)
 #endif
 {
+    RT_NOREF(pWidget, pvData);
     vboxGreeterLog("cb_edt_password called\n");
 
     PVBOXGREETERCTX pCtx = (PVBOXGREETERCTX)pvData;
@@ -1348,7 +1362,7 @@ int main(int argc, char **argv)
     g_type_init();
 
     GMainLoop *pMainLoop = g_main_loop_new(NULL, FALSE /* Not yet running */);
-    AssertPtr(pMainLoop);
+    AssertPtr(pMainLoop); NOREF(pMainLoop);
 
     LightDMGreeter *pGreeter = lightdm_greeter_new();
     AssertPtr(pGreeter);
diff --git a/src/VBox/Additions/linux/sharedfolders/Makefile.kmk b/src/VBox/Additions/linux/sharedfolders/Makefile.kmk
index 93db8dd..b66e447 100644
--- a/src/VBox/Additions/linux/sharedfolders/Makefile.kmk
+++ b/src/VBox/Additions/linux/sharedfolders/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/linux/sharedfolders/dirops.c b/src/VBox/Additions/linux/sharedfolders/dirops.c
index c0c9a5c..571f807 100644
--- a/src/VBox/Additions/linux/sharedfolders/dirops.c
+++ b/src/VBox/Additions/linux/sharedfolders/dirops.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/linux/sharedfolders/lnkops.c b/src/VBox/Additions/linux/sharedfolders/lnkops.c
index 6d1e282..66ddecd 100644
--- a/src/VBox/Additions/linux/sharedfolders/lnkops.c
+++ b/src/VBox/Additions/linux/sharedfolders/lnkops.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2010-2011 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/linux/sharedfolders/mount.vboxsf.c b/src/VBox/Additions/linux/sharedfolders/mount.vboxsf.c
index f4c6584..29453cc 100644
--- a/src/VBox/Additions/linux/sharedfolders/mount.vboxsf.c
+++ b/src/VBox/Additions/linux/sharedfolders/mount.vboxsf.c
@@ -8,7 +8,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/linux/sharedfolders/regops.c b/src/VBox/Additions/linux/sharedfolders/regops.c
index 5caa80b..2a9f5c4 100644
--- a/src/VBox/Additions/linux/sharedfolders/regops.c
+++ b/src/VBox/Additions/linux/sharedfolders/regops.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/linux/sharedfolders/utils.c b/src/VBox/Additions/linux/sharedfolders/utils.c
index 44cd908..b867c83 100644
--- a/src/VBox/Additions/linux/sharedfolders/utils.c
+++ b/src/VBox/Additions/linux/sharedfolders/utils.c
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/linux/sharedfolders/vbsfmount.c b/src/VBox/Additions/linux/sharedfolders/vbsfmount.c
index f6f704c..ad9359e 100644
--- a/src/VBox/Additions/linux/sharedfolders/vbsfmount.c
+++ b/src/VBox/Additions/linux/sharedfolders/vbsfmount.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2010 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/linux/sharedfolders/vbsfmount.h b/src/VBox/Additions/linux/sharedfolders/vbsfmount.h
index 35e7f8e..632859e 100644
--- a/src/VBox/Additions/linux/sharedfolders/vbsfmount.h
+++ b/src/VBox/Additions/linux/sharedfolders/vbsfmount.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/linux/sharedfolders/vfsmod.c b/src/VBox/Additions/linux/sharedfolders/vfsmod.c
index 7cf384f..62d0b35 100644
--- a/src/VBox/Additions/linux/sharedfolders/vfsmod.c
+++ b/src/VBox/Additions/linux/sharedfolders/vfsmod.c
@@ -10,7 +10,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/linux/sharedfolders/vfsmod.h b/src/VBox/Additions/linux/sharedfolders/vfsmod.h
index 5c74454..9dd28b6 100644
--- a/src/VBox/Additions/linux/sharedfolders/vfsmod.h
+++ b/src/VBox/Additions/linux/sharedfolders/vfsmod.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/linux/testcase/TimesyncBackdoor.c b/src/VBox/Additions/linux/testcase/TimesyncBackdoor.c
index e78dbb2..ca52261 100644
--- a/src/VBox/Additions/linux/testcase/TimesyncBackdoor.c
+++ b/src/VBox/Additions/linux/testcase/TimesyncBackdoor.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/solaris/DRM/Makefile.kmk b/src/VBox/Additions/solaris/DRM/Makefile.kmk
index a716f9b..38be858 100644
--- a/src/VBox/Additions/solaris/DRM/Makefile.kmk
+++ b/src/VBox/Additions/solaris/DRM/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2009-2015 Oracle Corporation
+# Copyright (C) 2009-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/solaris/DRM/deps.asm b/src/VBox/Additions/solaris/DRM/deps.asm
index 1da81ba..03bce84 100644
--- a/src/VBox/Additions/solaris/DRM/deps.asm
+++ b/src/VBox/Additions/solaris/DRM/deps.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2012 Oracle Corporation
+; Copyright (C) 2012-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/solaris/DRM/vboxvideo_drm.c b/src/VBox/Additions/solaris/DRM/vboxvideo_drm.c
index 0e5e3f3..496fbba 100644
--- a/src/VBox/Additions/solaris/DRM/vboxvideo_drm.c
+++ b/src/VBox/Additions/solaris/DRM/vboxvideo_drm.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2011 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/solaris/Makefile.kmk b/src/VBox/Additions/solaris/Makefile.kmk
index 7c630c8..be52872 100644
--- a/src/VBox/Additions/solaris/Makefile.kmk
+++ b/src/VBox/Additions/solaris/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2008-2015 Oracle Corporation
+# Copyright (C) 2008-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/solaris/Mouse/Makefile.kmk b/src/VBox/Additions/solaris/Mouse/Makefile.kmk
index 162ac25..b943601 100644
--- a/src/VBox/Additions/solaris/Mouse/Makefile.kmk
+++ b/src/VBox/Additions/solaris/Mouse/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2012-2015 Oracle Corporation
+# Copyright (C) 2012-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/solaris/Mouse/deps.asm b/src/VBox/Additions/solaris/Mouse/deps.asm
index e8ac8cd..405c8c7 100644
--- a/src/VBox/Additions/solaris/Mouse/deps.asm
+++ b/src/VBox/Additions/solaris/Mouse/deps.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2012 Oracle Corporation
+; Copyright (C) 2012-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/solaris/Mouse/testcase/solaris.h b/src/VBox/Additions/solaris/Mouse/testcase/solaris.h
index 118ba91..0c45ad6 100644
--- a/src/VBox/Additions/solaris/Mouse/testcase/solaris.h
+++ b/src/VBox/Additions/solaris/Mouse/testcase/solaris.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -30,7 +30,7 @@
 #include <iprt/assert.h>
 #include <iprt/string.h>  /* RT_ZERO */
 #ifdef RT_OS_WINDOWS
-# include <WinSock2.h>  /* struct timeval */
+# include <iprt/win/winsock2.h>  /* struct timeval */
 #endif
 #include <errno.h>
 #include <time.h>  /* struct timeval */
diff --git a/src/VBox/Additions/solaris/Mouse/testcase/tstVBoxMouse-solaris.c b/src/VBox/Additions/solaris/Mouse/testcase/tstVBoxMouse-solaris.c
index d581605..a0d88fe 100644
--- a/src/VBox/Additions/solaris/Mouse/testcase/tstVBoxMouse-solaris.c
+++ b/src/VBox/Additions/solaris/Mouse/testcase/tstVBoxMouse-solaris.c
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/solaris/Mouse/vboxms.c b/src/VBox/Additions/solaris/Mouse/vboxms.c
index be43aec..17284c3 100644
--- a/src/VBox/Additions/solaris/Mouse/vboxms.c
+++ b/src/VBox/Additions/solaris/Mouse/vboxms.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/solaris/Mouse/vboxmslnk.c b/src/VBox/Additions/solaris/Mouse/vboxmslnk.c
index e388944..bb24645 100644
--- a/src/VBox/Additions/solaris/Mouse/vboxmslnk.c
+++ b/src/VBox/Additions/solaris/Mouse/vboxmslnk.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/solaris/SharedFolders/Makefile.kmk b/src/VBox/Additions/solaris/SharedFolders/Makefile.kmk
index 63ab661..2985d48 100644
--- a/src/VBox/Additions/solaris/SharedFolders/Makefile.kmk
+++ b/src/VBox/Additions/solaris/SharedFolders/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2008-2015 Oracle Corporation
+# Copyright (C) 2008-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/solaris/SharedFolders/deps.asm b/src/VBox/Additions/solaris/SharedFolders/deps.asm
index e8ac8cd..405c8c7 100644
--- a/src/VBox/Additions/solaris/SharedFolders/deps.asm
+++ b/src/VBox/Additions/solaris/SharedFolders/deps.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2012 Oracle Corporation
+; Copyright (C) 2012-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/solaris/SharedFolders/vboxfs.h b/src/VBox/Additions/solaris/SharedFolders/vboxfs.h
index fbc7d3f..a80c8bc 100644
--- a/src/VBox/Additions/solaris/SharedFolders/vboxfs.h
+++ b/src/VBox/Additions/solaris/SharedFolders/vboxfs.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2010 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/solaris/SharedFolders/vboxfs_mount.c b/src/VBox/Additions/solaris/SharedFolders/vboxfs_mount.c
index 8134547..f75ed91 100644
--- a/src/VBox/Additions/solaris/SharedFolders/vboxfs_mount.c
+++ b/src/VBox/Additions/solaris/SharedFolders/vboxfs_mount.c
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2009-2011 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/solaris/SharedFolders/vboxfs_prov.c b/src/VBox/Additions/solaris/SharedFolders/vboxfs_prov.c
index 9fd1c2a..724f396 100644
--- a/src/VBox/Additions/solaris/SharedFolders/vboxfs_prov.c
+++ b/src/VBox/Additions/solaris/SharedFolders/vboxfs_prov.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2014 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/solaris/SharedFolders/vboxfs_prov.h b/src/VBox/Additions/solaris/SharedFolders/vboxfs_prov.h
index c005d52..46672da 100644
--- a/src/VBox/Additions/solaris/SharedFolders/vboxfs_prov.h
+++ b/src/VBox/Additions/solaris/SharedFolders/vboxfs_prov.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2009-2011 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c b/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c
index c6c7251..79da89b 100644
--- a/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c
+++ b/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2009-2014 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.h b/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.h
index b7ebe68..24a7368 100644
--- a/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.h
+++ b/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2011 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/solaris/SharedFolders/vboxfs_vnode.c b/src/VBox/Additions/solaris/SharedFolders/vboxfs_vnode.c
index eecf5f6..7cf56a6 100644
--- a/src/VBox/Additions/solaris/SharedFolders/vboxfs_vnode.c
+++ b/src/VBox/Additions/solaris/SharedFolders/vboxfs_vnode.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2014 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/solaris/SharedFolders/vboxfs_vnode.h b/src/VBox/Additions/solaris/SharedFolders/vboxfs_vnode.h
index 70ab06a..e467660 100644
--- a/src/VBox/Additions/solaris/SharedFolders/vboxfs_vnode.h
+++ b/src/VBox/Additions/solaris/SharedFolders/vboxfs_vnode.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2013 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/solaris/Virtio/Makefile.kmk b/src/VBox/Additions/solaris/Virtio/Makefile.kmk
index 99465a3..ade26c2 100644
--- a/src/VBox/Additions/solaris/Virtio/Makefile.kmk
+++ b/src/VBox/Additions/solaris/Virtio/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2010-2015 Oracle Corporation
+# Copyright (C) 2010-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/solaris/Virtio/Virtio-solaris.c b/src/VBox/Additions/solaris/Virtio/Virtio-solaris.c
index ba9f994..bd70507 100644
--- a/src/VBox/Additions/solaris/Virtio/Virtio-solaris.c
+++ b/src/VBox/Additions/solaris/Virtio/Virtio-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2011 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -190,7 +190,7 @@ PVIRTIOQUEUE VirtioGetQueue(PVIRTIODEVICE pDevice, uint16_t Index)
     AssertReturn(pQueue->pQueue, NULL);
     AssertReturn(pQueue->Ring.cDesc > 0, NULL);
 
-    /* @todo enable interrupt. */
+    /** @todo enable interrupt. */
 
     return pQueue;
 }
diff --git a/src/VBox/Additions/solaris/Virtio/Virtio-solaris.h b/src/VBox/Additions/solaris/Virtio/Virtio-solaris.h
index b7bef07..265829a 100644
--- a/src/VBox/Additions/solaris/Virtio/Virtio-solaris.h
+++ b/src/VBox/Additions/solaris/Virtio/Virtio-solaris.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/solaris/Virtio/VirtioNet-solaris.c b/src/VBox/Additions/solaris/Virtio/VirtioNet-solaris.c
index def6d7d..885bdbf 100644
--- a/src/VBox/Additions/solaris/Virtio/VirtioNet-solaris.c
+++ b/src/VBox/Additions/solaris/Virtio/VirtioNet-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2011 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -361,7 +361,7 @@ static int VirtioNetTxBufCreate(void *pvBuf, void *pvArg, int fFlags)
     virtio_net_txbuf_t *pTxBuf = pvBuf;
     PVIRTIODEVICE pDevice = pvArg;
 
-    /* @todo ncookies handles? */
+    /** @todo ncookies handles? */
     int rc = ddi_dma_alloc_handle(pDevice->pDip, &g_VirtioNetBufDmaAttr,
                                   fFlags & KM_NOSLEEP ? DDI_DMA_DONTWAIT : DDI_DMA_SLEEP,
                                   0 /* Arg */, &pTxBuf->hDMA);
@@ -467,8 +467,8 @@ static int VirtioNetDevAttach(PVIRTIODEVICE pDevice)
         pMacRegHandle->m_callbacks  = &g_VirtioNetCallbacks;
         pMacRegHandle->m_type_ident = MAC_PLUGIN_IDENT_ETHER;
         pMacRegHandle->m_min_sdu    = 0;
-        pMacRegHandle->m_max_sdu    = 1500;    /* @todo verify */
-        /* @todo should we set the margin size? */
+        pMacRegHandle->m_max_sdu    = 1500;    /** @todo verify */
+        /** @todo should we set the margin size? */
         pMacRegHandle->m_src_addr   = pNet->MacAddr.au8;
 
         /*
diff --git a/src/VBox/Additions/solaris/Virtio/VirtioPci-solaris.c b/src/VBox/Additions/solaris/Virtio/VirtioPci-solaris.c
index 6916bf0..888a9de 100644
--- a/src/VBox/Additions/solaris/Virtio/VirtioPci-solaris.c
+++ b/src/VBox/Additions/solaris/Virtio/VirtioPci-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2011 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/solaris/Virtio/VirtioPci-solaris.h b/src/VBox/Additions/solaris/Virtio/VirtioPci-solaris.h
index df9ab0e..17d054a 100644
--- a/src/VBox/Additions/solaris/Virtio/VirtioPci-solaris.h
+++ b/src/VBox/Additions/solaris/Virtio/VirtioPci-solaris.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/solaris/Virtio/VirtioRing-solaris.c b/src/VBox/Additions/solaris/Virtio/VirtioRing-solaris.c
index 1afbb04..61468e9 100644
--- a/src/VBox/Additions/solaris/Virtio/VirtioRing-solaris.c
+++ b/src/VBox/Additions/solaris/Virtio/VirtioRing-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2011 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/x11/Makefile.kmk b/src/VBox/Additions/x11/Makefile.kmk
index 9da8992..75197f9 100644
--- a/src/VBox/Additions/x11/Makefile.kmk
+++ b/src/VBox/Additions/x11/Makefile.kmk
@@ -3,7 +3,7 @@
 # Sub-Makefile for the X11 Guest Additions.
 #
 
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/x11/VBoxClient/Makefile.kmk b/src/VBox/Additions/x11/VBoxClient/Makefile.kmk
index 07bf285..a534a33 100644
--- a/src/VBox/Additions/x11/VBoxClient/Makefile.kmk
+++ b/src/VBox/Additions/x11/VBoxClient/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -48,6 +48,10 @@ VBoxClient_LIBS = \
 	Xrandr \
 	Xt
 
+# XXX: -L comes from the template, but not rpath
+VBoxClient_LDFLAGS.netbsd = \
+	-Wl,-rpath /usr/X11R7/lib
+
 ifdef VBOX_WITH_DRAG_AND_DROP
  ifdef VBOX_DND_WITH_XTEST
  VBoxClient_DEFS += VBOX_DND_WITH_XTEST
diff --git a/src/VBox/Additions/x11/VBoxClient/VBoxClient.h b/src/VBox/Additions/x11/VBoxClient/VBoxClient.h
index 970bf0e..7dfea1c 100644
--- a/src/VBox/Additions/x11/VBoxClient/VBoxClient.h
+++ b/src/VBox/Additions/x11/VBoxClient/VBoxClient.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -57,15 +57,16 @@ struct VBCLSERVICE
 };
 
 /** Default handler for various struct VBCLSERVICE member functions. */
-static int VBClServiceDefaultHandler(struct VBCLSERVICE **pSelf)
+DECLINLINE(int) VBClServiceDefaultHandler(struct VBCLSERVICE **pSelf)
 {
+    RT_NOREF1(pSelf);
     return VINF_SUCCESS;
 }
 
 /** Default handler for the struct VBCLSERVICE clean-up member function.
  * Usually used because the service is cleaned up automatically when the user
  * process/X11 exits. */
-static void VBClServiceDefaultCleanup(struct VBCLSERVICE **ppInterface)
+DECLINLINE(void) VBClServiceDefaultCleanup(struct VBCLSERVICE **ppInterface)
 {
     NOREF(ppInterface);
 }
diff --git a/src/VBox/Additions/x11/VBoxClient/check3d.cpp b/src/VBox/Additions/x11/VBoxClient/check3d.cpp
index fde3475..1e430ff 100644
--- a/src/VBox/Additions/x11/VBoxClient/check3d.cpp
+++ b/src/VBox/Additions/x11/VBoxClient/check3d.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2012 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/x11/VBoxClient/clipboard.cpp b/src/VBox/Additions/x11/VBoxClient/clipboard.cpp
index 0a23d25..340b406 100644
--- a/src/VBox/Additions/x11/VBoxClient/clipboard.cpp
+++ b/src/VBox/Additions/x11/VBoxClient/clipboard.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2012 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -84,9 +84,9 @@ static int vboxClipboardSendData(uint32_t u32Format, void *pv, uint32_t cb)
  * @retval  pcb       On success, this contains the number of bytes of data
  *                    returned
  */
-int ClipRequestDataForX11(VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Format,
-                          void **ppv, uint32_t *pcb)
+int ClipRequestDataForX11(VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb)
 {
+    RT_NOREF1(pCtx);
     int rc = VINF_SUCCESS;
     uint32_t cb = 1024;
     void *pv = RTMemAlloc(cb);
@@ -147,9 +147,9 @@ struct _CLIPREADCBREQ
  */
 void ClipReportX11Formats(VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Formats)
 {
-    int rc;
+    RT_NOREF1(pCtx);
     LogRelFlowFunc(("u32Formats=%d\n", u32Formats));
-    rc = VbglR3ClipboardReportFormats(g_ctx.client, u32Formats);
+    int rc = VbglR3ClipboardReportFormats(g_ctx.client, u32Formats);
     LogRelFlowFunc(("rc=%Rrc\n", rc));
 }
 
@@ -163,10 +163,9 @@ void ClipReportX11Formats(VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Formats)
  *                   succeeded (see @a rc)
  * @param  cb        the size of the data in @a pv
  */
-void ClipCompleteDataRequestFromX11(VBOXCLIPBOARDCONTEXT *pCtx, int rc,
-                                    CLIPREADCBREQ *pReq, void *pv,
-                                    uint32_t cb)
+void ClipCompleteDataRequestFromX11(VBOXCLIPBOARDCONTEXT *pCtx, int rc, CLIPREADCBREQ *pReq, void *pv, uint32_t cb)
 {
+    RT_NOREF1(pCtx);
     if (RT_SUCCESS(rc))
         vboxClipboardSendData(pReq->u32Format, pv, cb);
     else
@@ -286,11 +285,10 @@ static const char *getPidFilePath()
 
 static int run(struct VBCLSERVICE **ppInterface, bool fDaemonised)
 {
-    int rc;
+    RT_NOREF2(ppInterface, fDaemonised);
 
-    NOREF(ppInterface);
     /* Initialise the guest library. */
-    rc = VbglR3InitUser();
+    int rc = VbglR3InitUser();
     if (RT_FAILURE(rc))
         VBClFatalError(("Failed to connect to the VirtualBox kernel service, rc=%Rrc\n", rc));
     rc = vboxClipboardConnect();
diff --git a/src/VBox/Additions/x11/VBoxClient/display.cpp b/src/VBox/Additions/x11/VBoxClient/display.cpp
index d2e67c6..f7394ba 100644
--- a/src/VBox/Additions/x11/VBoxClient/display.cpp
+++ b/src/VBox/Additions/x11/VBoxClient/display.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -78,7 +78,7 @@ static unsigned char *getRootProperty(struct DISPLAYSTATE *pState, const char *p
     unsigned long cReturned = 0;
     unsigned long cAfter = 0;
     unsigned char *pData = 0;
-    
+
     if (XGetWindowProperty(pState->pDisplay, DefaultRootWindow(pState->pDisplay),
                            XInternAtom(pState->pDisplay, pszName, 0), 0, cItems,
                            False /* delete */, type, &actualType, &iFormat,
@@ -102,7 +102,7 @@ static void doResize(struct DISPLAYSTATE *pState)
         {
             RTStrPrintf(szCommand, sizeof(szCommand), "%s -s %ux%u",
                         pState->pcszXrandr, ((unsigned long *)pData)[0] >> 16, ((unsigned long *)pData)[0] & 0xFFFF);
-            system(szCommand);
+            int rcShutUpGcc = system(szCommand); RT_NOREF_PV(rcShutUpGcc);
             XFree(pData);
         }
     }
@@ -127,7 +127,7 @@ static void doResize(struct DISPLAYSTATE *pState)
                "--output VGA-30 --auto --right-of VGA-29 --output VGA-31 --auto --right-of VGA-30";
         char szCommand[sizeof(szCommandBase) + 256];
         RTStrPrintf(szCommand, sizeof(szCommand), szCommandBase, pState->pcszXrandr);
-        system(szCommand);
+        int rcShutUpGcc = system(szCommand); RT_NOREF_PV(rcShutUpGcc);
     }
 }
 
@@ -251,8 +251,8 @@ static int init(struct VBCLSERVICE **ppInterface)
 
 static int run(struct VBCLSERVICE **ppInterface, bool fDaemonised)
 {
+    RT_NOREF1(fDaemonised);
     struct DISPLAYSTATE *pSelf = getStateFromInterface(ppInterface);
-    int rc;
 
     if (!pSelf->mfInit)
         return VERR_WRONG_ORDER;
diff --git a/src/VBox/Additions/x11/VBoxClient/draganddrop.cpp b/src/VBox/Additions/x11/VBoxClient/draganddrop.cpp
index eba8361..3c03ffa 100644
--- a/src/VBox/Additions/x11/VBoxClient/draganddrop.cpp
+++ b/src/VBox/Additions/x11/VBoxClient/draganddrop.cpp
@@ -359,7 +359,7 @@ RTCString xHelpers::xErrorToString(int xRc) const
     return RTCStringFmt("%d (unknown)", xRc);
 }
 
-/** todo Make this iterative. */
+/** @todo Make this iterative. */
 Window xHelpers::applicationWindowBelowCursor(Window wndParent) const
 {
     /* No parent, nothing to do. */
@@ -920,9 +920,9 @@ int DragInstance::onX11ClientMessage(const XEvent &e)
                 && m_wndCur               == static_cast<Window>(e.xclient.data.l[XdndStatusWindow]))
             {
                 bool fAcceptDrop     = ASMBitTest   (&e.xclient.data.l[XdndStatusFlags], 0); /* Does the target accept the drop? */
-                bool fWantsPosition  = ASMBitTest   (&e.xclient.data.l[XdndStatusFlags], 1); /* Does the target want XdndPosition messages? */
                 RTCString strActions = xAtomToString( e.xclient.data.l[XdndStatusAction]);
-
+#ifdef LOG_ENABLED
+                bool fWantsPosition  = ASMBitTest   (&e.xclient.data.l[XdndStatusFlags], 1); /* Does the target want XdndPosition messages? */
                 char *pszWndName = wndX11GetNameA(e.xclient.data.l[XdndStatusWindow]);
                 AssertPtr(pszWndName);
 
@@ -936,11 +936,12 @@ int DragInstance::onX11ClientMessage(const XEvent &e)
 
                 RTStrFree(pszWndName);
 
-                uint16_t x = RT_HI_U16((uint32_t)e.xclient.data.l[XdndStatusNoMsgXY]);
-                uint16_t y = RT_LO_U16((uint32_t)e.xclient.data.l[XdndStatusNoMsgXY]);
-                uint16_t w = RT_HI_U16((uint32_t)e.xclient.data.l[XdndStatusNoMsgWH]);
-                uint16_t h = RT_LO_U16((uint32_t)e.xclient.data.l[XdndStatusNoMsgWH]);
-                LogFlowThisFunc(("\tReported dead area: x=%RU16, y=%RU16, w=%RU16, h=%RU16\n", x, y, w, h));
+                uint16_t x  = RT_HI_U16((uint32_t)e.xclient.data.l[XdndStatusNoMsgXY]);
+                uint16_t y  = RT_LO_U16((uint32_t)e.xclient.data.l[XdndStatusNoMsgXY]);
+                uint16_t cx = RT_HI_U16((uint32_t)e.xclient.data.l[XdndStatusNoMsgWH]);
+                uint16_t cy = RT_LO_U16((uint32_t)e.xclient.data.l[XdndStatusNoMsgWH]);
+                LogFlowThisFunc(("\tReported dead area: x=%RU16, y=%RU16, cx=%RU16, cy=%RU16\n", x, y, cx, cy));
+#endif
 
                 uint32_t uAction = DND_IGNORE_ACTION; /* Default is ignoring. */
                 /** @todo Compare this with the allowed actions. */
@@ -951,6 +952,7 @@ int DragInstance::onX11ClientMessage(const XEvent &e)
             }
             else if (e.xclient.message_type == xAtom(XA_XdndFinished))
             {
+#ifdef LOG_ENABLED
                 bool fSucceeded = ASMBitTest(&e.xclient.data.l[XdndFinishedFlags], 0);
 
                 char *pszWndName = wndX11GetNameA(e.xclient.data.l[XdndFinishedWindow]);
@@ -962,6 +964,7 @@ int DragInstance::onX11ClientMessage(const XEvent &e)
                                  xAtomToString(e.xclient.data.l[XdndFinishedAction]).c_str()));
 
                 RTStrFree(pszWndName);
+#endif
 
                 reset();
             }
@@ -1071,14 +1074,14 @@ int DragInstance::onX11ClientMessage(const XEvent &e)
                     reset();
                     break;
                 }
-
-                int32_t lPos      = e.xclient.data.l[XdndPositionXY];
+#ifdef LOG_ENABLED
+                int32_t iPos      = e.xclient.data.l[XdndPositionXY];
                 Atom    atmAction = m_curVer >= 2 /* Actions other than "copy" or only supported since protocol version 2. */
                                   ? e.xclient.data.l[XdndPositionAction] : xAtom(XA_XdndActionCopy);
-
                 LogFlowThisFunc(("XA_XdndPosition: wndProxy=%#x, wndCur=%#x, x=%RI32, y=%RI32, strAction=%s\n",
-                                 m_wndProxy.hWnd, m_wndCur, RT_HIWORD(lPos), RT_LOWORD(lPos),
+                                 m_wndProxy.hWnd, m_wndCur, RT_HIWORD(iPos), RT_LOWORD(iPos),
                                  xAtomToString(atmAction).c_str()));
+#endif
 
                 bool fAcceptDrop = true;
 
@@ -1165,6 +1168,7 @@ int DragInstance::onX11ClientMessage(const XEvent &e)
 
 int DragInstance::onX11MotionNotify(const XEvent &e)
 {
+    RT_NOREF1(e);
     LogFlowThisFunc(("mode=%RU32, state=%RU32\n", m_enmMode, m_enmState));
 
     return VINF_SUCCESS;
@@ -1181,6 +1185,7 @@ int DragInstance::onX11MotionNotify(const XEvent &e)
  */
 int DragInstance::onX11SelectionClear(const XEvent &e)
 {
+    RT_NOREF1(e);
     LogFlowThisFunc(("mode=%RU32, state=%RU32\n", m_enmMode, m_enmState));
 
     return VINF_SUCCESS;
@@ -1331,6 +1336,7 @@ int DragInstance::onX11SelectionRequest(const XEvent &e)
                                  xAtomToString(pReq->target).c_str(),
                                  pReq->requestor,
                                  gX11->xErrorToString(xRc).c_str()));
+                    NOREF(xRc);
                 }
             }
             /* Anything else. */
@@ -1854,6 +1860,12 @@ int DragInstance::hgMove(uint32_t u32xPos, uint32_t u32yPos, uint32_t uDefaultAc
  */
 int DragInstance::hgDrop(uint32_t u32xPos, uint32_t u32yPos, uint32_t uDefaultAction)
 {
+
+
+    /** @todo r=bird: Please, stop using 'u32' as a prefix unless you've got a _real_ _important_ reason for needing the bit count. */
+
+
+    RT_NOREF3(u32xPos, u32yPos, uDefaultAction);
     LogFlowThisFunc(("wndCur=%#x, wndProxy=%#x, mode=%RU32, state=%RU32\n", m_wndCur, m_wndProxy.hWnd, m_enmMode, m_enmState));
     LogFlowThisFunc(("u32xPos=%RU32, u32yPos=%RU32, uAction=%RU32\n", u32xPos, u32yPos, uDefaultAction));
 
@@ -2294,7 +2306,7 @@ int DragInstance::ghDropped(const RTCString &strFormat, uint32_t uAction)
     if (RT_FAILURE(rc))
     {
         int rc2 = VbglR3DnDGHSendError(&m_dndCtx, rc);
-        LogFlowThisFunc(("Sending error to host resulted in %Rrc\n", rc2));
+        LogFlowThisFunc(("Sending error to host resulted in %Rrc\n", rc2)); NOREF(rc2);
         /* This is not fatal for us, just ignore. */
     }
 
@@ -2505,7 +2517,7 @@ int DragInstance::proxyWinShow(int *piRootX /* = NULL */, int *piRootY /* = NULL
                                     &iRootX, &iRootY, &iChildX, &iChildY, &iMask);
 
     LogFlowThisFunc(("fInRootWnd=%RTbool, wndRoot=0x%x, wndChild=0x%x, iRootX=%d, iRootY=%d\n",
-                     RT_BOOL(fInRootWnd), wndRoot, wndChild, iRootX, iRootY));
+                     RT_BOOL(fInRootWnd), wndRoot, wndChild, iRootX, iRootY)); NOREF(fInRootWnd);
 
     if (piRootX)
         *piRootX = iRootX;
@@ -2764,6 +2776,7 @@ int DragInstance::toAtomList(const RTCList<RTCString> &lstFormats, VBoxDnDAtomLi
  */
 int DragInstance::toAtomList(const void *pvData, uint32_t cbData, VBoxDnDAtomList &lstAtoms) const
 {
+    RT_NOREF1(lstAtoms);
     AssertPtrReturn(pvData, VERR_INVALID_POINTER);
     AssertReturn(cbData, VERR_INVALID_PARAMETER);
 
@@ -3029,6 +3042,7 @@ int DragAndDropService::init(void)
  */
 int DragAndDropService::run(bool fDaemonised /* = false */)
 {
+    RT_NOREF1(fDaemonised);
     LogFlowThisFunc(("fDaemonised=%RTbool\n", fDaemonised));
 
     int rc;
diff --git a/src/VBox/Additions/x11/VBoxClient/hostversion.cpp b/src/VBox/Additions/x11/VBoxClient/hostversion.cpp
index 83211f2..e3b720d 100644
--- a/src/VBox/Additions/x11/VBoxClient/hostversion.cpp
+++ b/src/VBox/Additions/x11/VBoxClient/hostversion.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2012 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -38,7 +38,7 @@ static const char *getPidFilePath()
     return ".vboxclient-hostversion.pid";
 }
 
-static int showNotify(const char *pcHeader, const char *pcBody)
+static int showNotify(const char *pszHeader, const char *pszBody)
 {
     int rc;
 # ifdef VBOX_WITH_DBUS
@@ -69,16 +69,16 @@ static int showNotify(const char *pcHeader, const char *pcBody)
         uint32_t msg_replace_id = 0;
         const char *msg_app = "VBoxClient";
         const char *msg_icon = "";
-        const char *msg_summary = pcHeader;
-        const char *msg_body = pcBody;
+        const char *msg_summary = pszHeader;
+        const char *msg_body = pszBody;
         int32_t msg_timeout = -1;           /* Let the notification server decide */
 
         DBusMessageIter iter;
         DBusMessageIter array;
-        DBusMessageIter dict;
-        DBusMessageIter value;
-        DBusMessageIter variant;
-        DBusMessageIter data;
+        /*DBusMessageIter dict; - unused */
+        /*DBusMessageIter value; - unused */
+        /*DBusMessageIter variant; - unused */
+        /*DBusMessageIter data; - unused */
 
         /* Format: UINT32 org.freedesktop.Notifications.Notify
          *         (STRING app_name, UINT32 replaces_id, STRING app_icon, STRING summary, STRING body,
@@ -100,12 +100,9 @@ static int showNotify(const char *pcHeader, const char *pcBody)
         dbus_error_init(&err);
 
         DBusMessage *reply;
-        reply = dbus_connection_send_with_reply_and_block(conn, msg,
-            30 * 1000 /* 30 seconds timeout */, &err);
+        reply = dbus_connection_send_with_reply_and_block(conn, msg, 30 * 1000 /* 30 seconds timeout */, &err);
         if (dbus_error_is_set(&err))
-        {
             LogRel(("D-BUS returned an error while sending the notification: %s", err.message));
-        }
         else if (reply)
         {
             dbus_connection_flush(conn);
@@ -117,7 +114,8 @@ static int showNotify(const char *pcHeader, const char *pcBody)
     if (msg != NULL)
         dbus_message_unref(msg);
 # else
-    /* TODO: Implement me */
+    /** @todo Implement me */
+    RT_NOREF(pszHeader, pszBody);
     rc = VINF_SUCCESS;
 # endif /* VBOX_WITH_DBUS */
     return rc;
diff --git a/src/VBox/Additions/x11/VBoxClient/main.cpp b/src/VBox/Additions/x11/VBoxClient/main.cpp
index 6802f53..6267f88 100644
--- a/src/VBox/Additions/x11/VBoxClient/main.cpp
+++ b/src/VBox/Additions/x11/VBoxClient/main.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -45,7 +45,7 @@
 
 #include "VBoxClient.h"
 
-static int (*gpfnOldIOErrorHandler)(Display *) = NULL;
+/*static int (*gpfnOldIOErrorHandler)(Display *) = NULL; - unused */
 
 /** Object representing the service we are running.  This has to be global
  * so that the cleanup routine can access it. */
@@ -72,7 +72,9 @@ void vbclFatalError(char *pszMessage)
     {
         pszCommand = RTStrAPrintf2("notify-send \"VBoxClient: %s\"", pszMessage);
         if (pszCommand)
-            system(pszCommand);
+        {
+            int rcShutUpGcc = system(pszCommand); RT_NOREF_PV(rcShutUpGcc);
+        }
     }
     _exit(1);
 }
@@ -123,6 +125,7 @@ static int vboxClientXLibErrorHandler(Display *pDisplay, XErrorEvent *pError)
  */
 static int vboxClientXLibIOErrorHandler(Display *pDisplay)
 {
+    RT_NOREF1(pDisplay);
     LogRel(("VBoxClient: a fatal guest X Window error occurred.  This may just mean that the Window system was shut down while the client was still running.\n"));
     VBClCleanUp();
     return 0;  /* We should never reach this. */
diff --git a/src/VBox/Additions/x11/VBoxClient/seamless-x11.cpp b/src/VBox/Additions/x11/VBoxClient/seamless-x11.cpp
index 5e49b6b..6b1b138 100644
--- a/src/VBox/Additions/x11/VBoxClient/seamless-x11.cpp
+++ b/src/VBox/Additions/x11/VBoxClient/seamless-x11.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2011 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -476,10 +476,9 @@ DECLCALLBACK(int) getRectsCallback(VBoxGuestWinInfo *pInfo,
 int SeamlessX11::updateRects(void)
 {
     LogRelFlowFunc(("\n"));
-    unsigned cRects = 0;
     struct RectList rects = RTVEC_INITIALIZER;
 
-    if (0 != mcRects)
+    if (mcRects != 0)
     {
         int rc = RectListReserve(&rects, mcRects * 2);
         if (RT_FAILURE(rc))
diff --git a/src/VBox/Additions/x11/VBoxClient/seamless-x11.h b/src/VBox/Additions/x11/VBoxClient/seamless-x11.h
index 4fd0dd2..f032614 100644
--- a/src/VBox/Additions/x11/VBoxClient/seamless-x11.h
+++ b/src/VBox/Additions/x11/VBoxClient/seamless-x11.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/x11/VBoxClient/seamless.cpp b/src/VBox/Additions/x11/VBoxClient/seamless.cpp
index 399a966..bb6209c 100644
--- a/src/VBox/Additions/x11/VBoxClient/seamless.cpp
+++ b/src/VBox/Additions/x11/VBoxClient/seamless.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -190,8 +190,9 @@ int SeamlessMain::nextStateChangeEvent(void)
 /**
  * The actual X11 window configuration change monitor thread function.
  */
-int SeamlessMain::x11MonitorThread(RTTHREAD self, void *pvUser)
+int SeamlessMain::x11MonitorThread(RTTHREAD hThreadSelf, void *pvUser)
 {
+    RT_NOREF1(hThreadSelf);
     SeamlessMain *pHost = (SeamlessMain *)pvUser;
     int rc = VINF_SUCCESS;
 
@@ -332,6 +333,7 @@ static int init(struct VBCLSERVICE **ppInterface)
 
 static int run(struct VBCLSERVICE **ppInterface, bool fDaemonised)
 {
+    RT_NOREF1(fDaemonised);
     struct SEAMLESSSERVICE *pSelf = getClassFromInterface(ppInterface);
     int rc;
 
diff --git a/src/VBox/Additions/x11/VBoxClient/seamless.h b/src/VBox/Additions/x11/VBoxClient/seamless.h
index 20dc096..ea2b7ab 100644
--- a/src/VBox/Additions/x11/VBoxClient/seamless.h
+++ b/src/VBox/Additions/x11/VBoxClient/seamless.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/x11/VBoxClient/testcase/tstSeamlessX11-auto.cpp b/src/VBox/Additions/x11/VBoxClient/testcase/tstSeamlessX11-auto.cpp
index f06bfcf..326edf0 100644
--- a/src/VBox/Additions/x11/VBoxClient/testcase/tstSeamlessX11-auto.cpp
+++ b/src/VBox/Additions/x11/VBoxClient/testcase/tstSeamlessX11-auto.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2007-2011 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -54,12 +54,14 @@ extern void vbclFatalError(char *psz)
 extern "C" Display *XOpenDisplay(const char *display_name);
 Display *XOpenDisplay(const char *display_name)
 {
+    RT_NOREF1(display_name);
     return TEST_DISPLAY;
 }
 
 extern "C" int XCloseDisplay(Display *display);
 int XCloseDisplay(Display *display)
 {
+    RT_NOREF1(display);
     Assert(display == TEST_DISPLAY);
     return 0;
 }
@@ -70,10 +72,10 @@ enum
     ATOM_DESKTOP_PROP
 };
 
-extern "C" Atom XInternAtom(Display *display, const char *atom_name,
-                            Bool only_if_exists);
-Atom XInternAtom(Display *display, const char *atom_name, Bool only_if_exists)
+extern "C" Atom XInternAtom(Display *display, const char *atom_name, Bool only_if_exists);
+Atom            XInternAtom(Display *display, const char *atom_name, Bool only_if_exists)
 {
+    RT_NOREF2(only_if_exists, display);
     Assert(display == TEST_DISPLAY);
     if (!RTStrCmp(atom_name, WM_TYPE_PROP))
         return (Atom) ATOM_PROP;
@@ -95,14 +97,15 @@ extern "C" int XGetWindowProperty(Display *display, Window w, Atom property,
                                   unsigned long *nitems_return,
                                   unsigned long *bytes_after_return,
                                   unsigned char **prop_return);
-int XGetWindowProperty(Display *display, Window w, Atom property,
-                       long long_offset, long long_length, Bool delProp,
-                       Atom req_type, Atom *actual_type_return,
-                       int *actual_format_return,
-                       unsigned long *nitems_return,
-                       unsigned long *bytes_after_return,
-                       unsigned char **prop_return)
+int            XGetWindowProperty(Display *display, Window w, Atom property,
+                                  long long_offset, long long_length, Bool delProp,
+                                  Atom req_type, Atom *actual_type_return,
+                                  int *actual_format_return,
+                                  unsigned long *nitems_return,
+                                  unsigned long *bytes_after_return,
+                                  unsigned char **prop_return)
 {
+    RT_NOREF2(display, long_length);
     Assert(display == TEST_DISPLAY);
     Atom atomType = XInternAtom (display, WM_TYPE_PROP, true);
     Atom atomTypeDesktop = XInternAtom (display, WM_TYPE_DESKTOP_PROP, true);
@@ -129,39 +132,43 @@ int XGetWindowProperty(Display *display, Window w, Atom property,
     return 0;
 }
 
+#if 0 /* unused */
 /** Sets the current set of properties for all mock X11 windows */
 static void smlsSetDesktopWindow(Window hWin)
 {
     g_hSmlsDesktopWindow = hWin;
 }
+#endif
 
-extern "C" Bool XShapeQueryExtension (Display *dpy, int *event_basep,
-                                      int *error_basep);
-Bool XShapeQueryExtension (Display *dpy, int *event_basep, int *error_basep)
+extern "C" Bool XShapeQueryExtension(Display *dpy, int *event_basep, int *error_basep);
+Bool            XShapeQueryExtension(Display *dpy, int *event_basep, int *error_basep)
 {
+    RT_NOREF3(dpy, event_basep, error_basep);
     Assert(dpy == TEST_DISPLAY);
     return true;
 }
 
 /* We silently ignore this for now. */
 extern "C" int XSelectInput(Display *display, Window w, long event_mask);
-int XSelectInput(Display *display, Window w, long event_mask)
+int            XSelectInput(Display *display, Window w, long event_mask)
 {
+    RT_NOREF3(display,  w,  event_mask);
     Assert(display == TEST_DISPLAY);
     return 0;
 }
 
 /* We silently ignore this for now. */
-extern "C" void XShapeSelectInput(Display *display, Window w,
-                                  unsigned long event_mask);
-void XShapeSelectInput(Display *display, Window w, unsigned long event_mask)
+extern "C" void XShapeSelectInput(Display *display, Window w, unsigned long event_mask);
+void            XShapeSelectInput(Display *display, Window w, unsigned long event_mask)
 {
+    RT_NOREF3(display, w, event_mask);
     Assert(display == TEST_DISPLAY);
 }
 
 extern "C" Window XDefaultRootWindow(Display *display);
 Window XDefaultRootWindow(Display *display)
 {
+    RT_NOREF1(display);
     Assert(display == TEST_DISPLAY);
     return TEST_ROOT;
 }
@@ -178,6 +185,7 @@ Status XQueryTree(Display *display, Window w, Window *root_return,
                   Window *parent_return, Window **children_return,
                   unsigned int *nchildren_return)
 {
+    RT_NOREF1(display);
     Assert(display == TEST_DISPLAY);
     AssertReturn(w == TEST_ROOT, False);  /* We support nothing else */
     AssertPtrReturn(children_return, False);
@@ -196,6 +204,7 @@ Status XQueryTree(Display *display, Window w, Window *root_return,
 extern "C" Window XmuClientWindow(Display *dpy, Window win);
 Window XmuClientWindow(Display *dpy, Window win)
 {
+    RT_NOREF1(dpy);
     Assert(dpy == TEST_DISPLAY);
     return win;
 }
@@ -205,6 +214,7 @@ extern "C" Status XGetWindowAttributes(Display *display, Window w,
 Status XGetWindowAttributes(Display *display, Window w,
                             XWindowAttributes *window_attributes_return)
 {
+    RT_NOREF1(display);
     Assert(display == TEST_DISPLAY);
     AssertPtrReturn(window_attributes_return, 1);
     for (unsigned i = 0; i < g_cSmlsWindows; ++i)
@@ -223,6 +233,7 @@ extern "C" Status XGetWMNormalHints(Display *display, Window w,
 Status XGetWMNormalHints(Display *display, Window w,
                          XSizeHints *hints_return, long *supplied_return)
 {
+    RT_NOREF4(display, w, hints_return, supplied_return);
     Assert(display == TEST_DISPLAY);
     return 1;
 }
@@ -247,6 +258,7 @@ extern "C" XRectangle *XShapeGetRectangles (Display *dpy, Window window,
 XRectangle *XShapeGetRectangles (Display *dpy, Window window, int kind,
                                  int *count, int *ordering)
 {
+    RT_NOREF2(dpy, kind);
     Assert(dpy == TEST_DISPLAY);
     if ((window != g_SmlsShapedWindow) || (window == 0))
         return NULL;  /* Probably not correct, but works for us. */
@@ -272,6 +284,7 @@ static Window g_SmlsEventWindow = 0;
 extern "C" int XNextEvent(Display *display, XEvent *event_return);
 int XNextEvent(Display *display, XEvent *event_return)
 {
+    RT_NOREF1(display);
     Assert(display == TEST_DISPLAY);
     event_return->xany.type = g_SmlsEventType;
     event_return->xany.window = g_SmlsEventWindow;
@@ -291,6 +304,7 @@ extern "C" Status XSendEvent(Display *display, Window w, Bool propagate,
 Status XSendEvent(Display *display, Window w, Bool propagate,
                   long event_mask, XEvent *event_send)
 {
+    RT_NOREF5(display, w, propagate, event_mask, event_send);
     Assert(display == TEST_DISPLAY);
     AssertFailedReturn(0);
 }
@@ -299,6 +313,7 @@ Status XSendEvent(Display *display, Window w, Bool propagate,
 extern "C" int XFlush(Display *display);
 int XFlush(Display *display)
 {
+    RT_NOREF1(display);
     Assert(display == TEST_DISPLAY);
     AssertFailedReturn(0);
 }
@@ -309,6 +324,7 @@ static bool g_fNotified = false;
 /** Dummy host call-back. */
 static void sendRegionUpdate(RTRECT *pRects, size_t cRects)
 {
+    RT_NOREF2(pRects, cRects);
     g_fNotified = true;
 }
 
diff --git a/src/VBox/Additions/x11/VBoxClient/testcase/tstSeamlessX11.cpp b/src/VBox/Additions/x11/VBoxClient/testcase/tstSeamlessX11.cpp
index f38b9a6..a7a922a 100644
--- a/src/VBox/Additions/x11/VBoxClient/testcase/tstSeamlessX11.cpp
+++ b/src/VBox/Additions/x11/VBoxClient/testcase/tstSeamlessX11.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2011 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/x11/vboxmouse/Makefile.kmk b/src/VBox/Additions/x11/vboxmouse/Makefile.kmk
index 512c78f..a05831b 100644
--- a/src/VBox/Additions/x11/vboxmouse/Makefile.kmk
+++ b/src/VBox/Additions/x11/vboxmouse/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/x11/vboxmouse/vboxmouse.c b/src/VBox/Additions/x11/vboxmouse/vboxmouse.c
index 251d717..d580782 100644
--- a/src/VBox/Additions/x11/vboxmouse/vboxmouse.c
+++ b/src/VBox/Additions/x11/vboxmouse/vboxmouse.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -70,7 +70,8 @@ VBoxReadInput(InputInfoPtr pInfo)
 
     /* Read a byte from the device to acknowledge the event */
     char c;
-    (void) read(pInfo->fd, &c, 1);
+    int res = read(pInfo->fd, &c, 1);
+    NOREF(res);
     /* The first test here is a workaround for an apparent bug in Xorg Server 1.5 */
     if (
 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 2
@@ -96,14 +97,17 @@ static void
 VBoxPtrCtrlProc(DeviceIntPtr device, PtrCtrl *ctrl)
 {
     /* Nothing to do, dix handles all settings */
+    RT_NOREF(device, ctrl);
 }
 
 static int
 VBoxInit(DeviceIntPtr device)
 {
     CARD8 map[2] = { 0, 1 };
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
     Atom axis_labels[2] = { 0, 0 };
     Atom button_labels[2] = { 0, 0 };
+#endif
     if (!InitPointerDeviceStruct((DevicePtr)device, map, 2,
 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
                                  button_labels,
@@ -242,12 +246,14 @@ static Bool
 VBoxConvert(InputInfoPtr pInfo, int first, int num, int v0, int v1, int v2,
             int v3, int v4, int v5, int *x, int *y)
 {
+    RT_NOREF(pInfo, num, v2, v3, v4, v5);
+
     if (first == 0) {
         *x = xf86ScaleAxis(v0, 0, screenInfo.screens[0]->width, 0, 65536);
         *y = xf86ScaleAxis(v1, 0, screenInfo.screens[0]->height, 0, 65536);
         return TRUE;
-    } else
-        return FALSE;
+    }
+    return FALSE;
 }
 
 static int
@@ -255,6 +261,7 @@ VBoxPreInitInfo(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
 {
     const char *device;
     int rc;
+    RT_NOREF(drv, flags);
 
     /* Initialise the InputInfoRec. */
     pInfo->device_control = VBoxProc;
@@ -288,10 +295,8 @@ VBoxPreInitInfo(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
 static InputInfoPtr
 VBoxPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
 {
-    InputInfoPtr pInfo;
-    const char *device;
-
-    if (!(pInfo = xf86AllocateInput(drv, 0)))
+    InputInfoPtr pInfo = xf86AllocateInput(drv, 0);
+    if (!pInfo)
         return NULL;
 
     /* Initialise the InputInfoRec. */
@@ -328,11 +333,9 @@ _X_EXPORT InputDriverRec VBOXMOUSE = {
 };
 
 static pointer
-VBoxPlug(pointer module,
-          pointer options,
-          int *errmaj,
-          int *errmin)
+VBoxPlug(pointer module, pointer options, int *errmaj, int *errmin)
 {
+    RT_NOREF(options, errmaj, errmin);
     xf86AddInputDriver(&VBOXMOUSE, module, 0);
     xf86Msg(X_CONFIG, "Load address of symbol \"VBOXMOUSE\" is %p\n",
             (void *)&VBOXMOUSE);
diff --git a/src/VBox/Additions/x11/vboxvideo/Makefile.kmk b/src/VBox/Additions/x11/vboxvideo/Makefile.kmk
index f6e443e..d434ccd 100644
--- a/src/VBox/Additions/x11/vboxvideo/Makefile.kmk
+++ b/src/VBox/Additions/x11/vboxvideo/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/x11/vboxvideo/edid.c b/src/VBox/Additions/x11/vboxvideo/edid.c
index fd7aff4..2bc7ecd 100644
--- a/src/VBox/Additions/x11/vboxvideo/edid.c
+++ b/src/VBox/Additions/x11/vboxvideo/edid.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -142,7 +142,6 @@ static void setEDIDChecksum(unsigned char *pch)
  */
 Bool VBOXEDIDSet(xf86OutputPtr output, DisplayModePtr pmode)
 {
-    int i, j;
     unsigned char *pch, *pchEDID;
     xf86MonPtr pEDIDMon;
 
diff --git a/src/VBox/Additions/x11/vboxvideo/getmode.c b/src/VBox/Additions/x11/vboxvideo/getmode.c
index c07844d..abc7d5b 100644
--- a/src/VBox/Additions/x11/vboxvideo/getmode.c
+++ b/src/VBox/Additions/x11/vboxvideo/getmode.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -124,7 +124,8 @@ static DisplayModePtr vboxAddEmptyScreenMode(ScrnInfoPtr pScrn)
  */
 void vboxAddModes(ScrnInfoPtr pScrn)
 {
-    unsigned cx = 0, cy = 0, cIndex = 0;
+    unsigned cx = 0;
+    unsigned cy = 0;
     unsigned i;
     DisplayModePtr pMode;
 
@@ -236,10 +237,9 @@ void vbvxReadSizesAndCursorIntegrationFromHGSMI(ScrnInfoPtr pScrn, bool *pfNeedU
  * the time stamp and handled them at the wrong time. */
 static void acpiEventHandler(int fd, void *pvData)
 {
-    ScreenPtr pScreen = (ScreenPtr)pvData;
-    VBOXPtr pVBox = VBOXGetRec(xf86Screens[pScreen->myNum]);
     struct input_event event;
     ssize_t rc;
+    RT_NOREF(pvData);
 
     do
         rc = read(fd, &event, sizeof(event));
diff --git a/src/VBox/Additions/x11/vboxvideo/helpers.c b/src/VBox/Additions/x11/vboxvideo/helpers.c
index 1328ad2..56ab8ef 100644
--- a/src/VBox/Additions/x11/vboxvideo/helpers.c
+++ b/src/VBox/Additions/x11/vboxvideo/helpers.c
@@ -9,7 +9,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/x11/vboxvideo/pointer.c b/src/VBox/Additions/x11/vboxvideo/pointer.c
index f9fe82b..cda17e1 100644
--- a/src/VBox/Additions/x11/vboxvideo/pointer.c
+++ b/src/VBox/Additions/x11/vboxvideo/pointer.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -127,6 +127,7 @@ static void
 vbox_vmm_hide_cursor(ScrnInfoPtr pScrn, VBOXPtr pVBox)
 {
     int rc;
+    RT_NOREF(pScrn);
 
     rc = VBoxHGSMIUpdatePointerShape(&pVBox->guestCtx, 0, 0, 0, 0, 0, NULL, 0);
     VBVXASSERT(rc == VINF_SUCCESS, ("Could not hide the virtual mouse pointer, VBox error %d.\n", rc));
@@ -136,6 +137,7 @@ static void
 vbox_vmm_show_cursor(ScrnInfoPtr pScrn, VBOXPtr pVBox)
 {
     int rc;
+    RT_NOREF(pScrn);
 
     if (!pVBox->fUseHardwareCursor)
         return;
@@ -151,6 +153,7 @@ vbox_vmm_load_cursor_image(ScrnInfoPtr pScrn, VBOXPtr pVBox,
     int rc;
     struct vboxCursorImage *pImage;
     pImage = (struct vboxCursorImage *)pvImage;
+    RT_NOREF(pScrn);
 
 #ifdef DEBUG_POINTER
     vbox_show_shape(pImage->cWidth, pImage->cHeight, 0, pvImage);
@@ -210,6 +213,7 @@ vbox_use_hw_cursor(ScreenPtr pScreen, CursorPtr pCurs)
 {
     ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
     VBOXPtr pVBox = pScrn->driverPrivate;
+    RT_NOREF(pCurs);
     return pVBox->fUseHardwareCursor;
 }
 
diff --git a/src/VBox/Additions/x11/vboxvideo/setmode.c b/src/VBox/Additions/x11/vboxvideo/setmode.c
index c190331..a759c14 100644
--- a/src/VBox/Additions/x11/vboxvideo/setmode.c
+++ b/src/VBox/Additions/x11/vboxvideo/setmode.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/x11/vboxvideo/vboxvideo.c b/src/VBox/Additions/x11/vboxvideo/vboxvideo.c
index 86f6e45..8dce926 100644
--- a/src/VBox/Additions/x11/vboxvideo/vboxvideo.c
+++ b/src/VBox/Additions/x11/vboxvideo/vboxvideo.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -93,11 +93,8 @@
 #ifdef XORG_7X
 # include <stdlib.h>
 # include <string.h>
-# include <sys/stat.h>
-# define xf86stat stat
-# define xf86stat_s stat
-#else
-# include <xf86_ansic.h>
+# include <fcntl.h>
+# include <unistd.h>
 #endif
 
 /* Mandatory functions */
@@ -115,12 +112,15 @@ static Bool VBOXScreenInit(ScreenPtr pScreen, int argc, char **argv);
 static Bool VBOXEnterVT(ScrnInfoPtr pScrn);
 static void VBOXLeaveVT(ScrnInfoPtr pScrn);
 static Bool VBOXCloseScreen(ScreenPtr pScreen);
+#ifndef VBOXVIDEO_13
 static Bool VBOXSaveScreen(ScreenPtr pScreen, int mode);
+#endif
 static Bool VBOXSwitchMode(ScrnInfoPtr pScrn, DisplayModePtr pMode);
 static void VBOXAdjustFrame(ScrnInfoPtr pScrn, int x, int y);
 static void VBOXFreeScreen(ScrnInfoPtr pScrn);
-static void VBOXDisplayPowerManagementSet(ScrnInfoPtr pScrn, int mode,
-                                          int flags);
+#ifndef VBOXVIDEO_13
+static void VBOXDisplayPowerManagementSet(ScrnInfoPtr pScrn, int mode, int flags);
+#endif
 
 /* locally used functions */
 static Bool VBOXMapVidMem(ScrnInfoPtr pScrn);
@@ -289,12 +289,15 @@ static Bool adjustScreenPixmap(ScrnInfoPtr pScrn, int width, int height)
     return TRUE;
 }
 
-/** Set a video mode to the hardware, RandR 1.1 version.  Since we no longer do
- * virtual frame buffers, adjust the screen pixmap dimensions to match.  The
- * "override" parameters are for when we received a mode hint while switched to
- * a virtual terminal.  In this case VBoxClient will have told us about the
- * mode, but not yet been able to do a mode switch using RandR.  We solve this
- * by setting the requested mode to the host but keeping the virtual frame-
+#ifndef VBOXVIDEO_13
+/** Set a video mode to the hardware, RandR 1.1 version.
+ *
+ * Since we no longer do virtual frame buffers, adjust the screen pixmap
+ * dimensions to match.  The "override" parameters are for when we received a
+ * mode hint while switched to a virtual terminal.  In this case VBoxClient will
+ * have told us about the mode, but not yet been able to do a mode switch using
+ * RandR.  We solve this by setting the requested mode to the host but keeping
+ * the virtual frame-
  * buffer matching what the X server expects. */
 static void setModeRandR11(ScrnInfoPtr pScrn, DisplayModePtr pMode, bool fScreenInitTime, bool fEnterVTTime,
                            int cXOverRide, int cYOverRide)
@@ -331,6 +334,7 @@ static void setModeRandR11(ScrnInfoPtr pScrn, DisplayModePtr pMode, bool fScreen
         vbvxSetMode(pScrn, 0, cXPhysical, cYPhysical, 0, 0, true, true, &frameBuffer);
     pScrn->currentMode = pMode;
 }
+#endif
 
 #ifdef VBOXVIDEO_13
 /* X.org 1.3+ mode-setting support ******************************************/
@@ -551,7 +555,6 @@ static DisplayModePtr vbox_output_add_mode(VBOXPtr pVBox, DisplayModePtr *pModes
 static DisplayModePtr
 vbox_output_get_modes (xf86OutputPtr output)
 {
-    unsigned cIndex = 0;
     DisplayModePtr pModes = NULL;
     DisplayModePtr pPreferred = NULL;
     ScrnInfoPtr pScrn = output->scrn;
@@ -635,6 +638,7 @@ static pointer
 vboxSetup(pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor)
 {
     static Bool Initialised = FALSE;
+    RT_NOREF(Options, ErrorMinor);
 
     if (!Initialised)
     {
@@ -665,20 +669,24 @@ vboxSetup(pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor)
 static const OptionInfoRec *
 VBOXAvailableOptions(int chipid, int busid)
 {
+    RT_NOREF(chipid, busid);
     return (VBOXOptions);
 }
 
 static void
 VBOXIdentify(int flags)
 {
+    RT_NOREF(flags);
     xf86PrintChipsets(VBOX_NAME, "guest driver for VirtualBox", VBOXChipsets);
 }
 
 #ifndef XF86_SCRN_INTERFACE
 # define SCRNINDEXAPI(pfn) pfn ## Index
-static Bool VBOXScreenInitIndex(int scrnIndex, ScreenPtr pScreen, int argc,
-                                char **argv)
-{ return VBOXScreenInit(pScreen, argc, argv); }
+static Bool VBOXScreenInitIndex(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+{
+    RT_NOREF(scrnIndex);
+    return VBOXScreenInit(pScreen, argc, argv);
+}
 
 static Bool VBOXEnterVTIndex(int scrnIndex, int flags)
 { (void) flags; return VBOXEnterVT(xf86Screens[scrnIndex]); }
@@ -727,13 +735,15 @@ VBOXPciProbe(DriverPtr drv, int entity_num, struct pci_device *dev,
              intptr_t match_data)
 {
     ScrnInfoPtr pScrn;
-    struct xf86stat_s sstat;
+    int drmFd;
 
     TRACE_ENTRY();
 
-    if (xf86stat("/dev/dri/card0", &sstat) == 0)
+    drmFd = open("/dev/dri/card0", O_RDWR, 0);
+    if (drmFd >= 0)
     {
         xf86Msg(X_INFO, "vboxvideo: kernel driver found, not loading.\n");
+        close(drmFd);
         return FALSE;
     }
     pScrn = xf86ConfigPciEntity(NULL, 0, entity_num, VBOXPCIchipsets,
@@ -995,9 +1005,6 @@ vboxLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
 static void updateGraphicsCapability(ScrnInfoPtr pScrn, Bool hasVT)
 {
     VBOXPtr pVBox = VBOXGetRec(pScrn);
-    size_t cData;
-    int32_t *paData;
-    int rc;
 
     if (!pVBox->fHaveHGSMIModeHints)
         return;
@@ -1029,8 +1036,7 @@ static void setSizesRandR11(ScrnInfoPtr pScrn)
 
 static void setSizesAndCursorIntegration(ScrnInfoPtr pScrn, bool fScreenInitTime)
 {
-    VBOXPtr pVBox = VBOXGetRec(pScrn);
-
+    RT_NOREF(fScreenInitTime);
     TRACE_LOG("fScreenInitTime=%d\n", (int)fScreenInitTime);
 #ifdef VBOXVIDEO_13
 # if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 5
@@ -1053,7 +1059,6 @@ static void setSizesAndCursorIntegration(ScrnInfoPtr pScrn, bool fScreenInitTime
 static void vboxBlockHandler(pointer pData, OSTimePtr pTimeout, pointer pReadmask)
 {
     ScrnInfoPtr pScrn = (ScrnInfoPtr)pData;
-    VBOXPtr pVBox = VBOXGetRec(pScrn);
     bool fNeedUpdate = false;
 
     (void)pTimeout;
@@ -1083,6 +1088,7 @@ static Bool VBOXScreenInit(ScreenPtr pScreen, int argc, char **argv)
     ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
     VBOXPtr pVBox = VBOXGetRec(pScrn);
     VisualPtr visual;
+    RT_NOREF(argc, argv);
 
     TRACE_ENTRY();
 
@@ -1207,10 +1213,10 @@ static Bool VBOXScreenInit(ScreenPtr pScreen, int argc, char **argv)
     if (!xf86SetDesiredModes(pScrn)) {
         return FALSE;
     }
-#else
+#else  /* !VBOXVIDEO_13 */
     /* set first video mode */
     setModeRandR11(pScrn, pScrn->currentMode, true, false, 0, 0);
-#endif
+#endif /* !VBOXVIDEO_13 */
 
     /* Say that we support graphics. */
     updateGraphicsCapability(pScrn, TRUE);
@@ -1286,8 +1292,8 @@ static Bool VBOXEnterVT(ScrnInfoPtr pScrn)
 
 static void VBOXLeaveVT(ScrnInfoPtr pScrn)
 {
-    VBOXPtr pVBox = VBOXGetRec(pScrn);
 #ifdef VBOXVIDEO_13
+    VBOXPtr pVBox = VBOXGetRec(pScrn);
     unsigned i;
 #else
     int32_t propertyValue = 0;
@@ -1421,12 +1427,14 @@ VBOXUnmapVidMem(ScrnInfoPtr pScrn)
     TRACE_EXIT();
 }
 
+#ifndef VBOXVIDEO_13
 static Bool
 VBOXSaveScreen(ScreenPtr pScreen, int mode)
 {
     (void)pScreen; (void)mode;
     return TRUE;
 }
+#endif
 
 void
 VBOXSaveMode(ScrnInfoPtr pScrn)
@@ -1461,9 +1469,10 @@ VBOXRestoreMode(ScrnInfoPtr pScrn)
         VBoxVideoDisableVBE();
 }
 
+#ifndef VBOXVIDEO_13
 static void
-VBOXDisplayPowerManagementSet(ScrnInfoPtr pScrn, int mode,
-                int flags)
+VBOXDisplayPowerManagementSet(ScrnInfoPtr pScrn, int mode, int flags)
 {
     (void)pScrn; (void)mode; (void) flags;
 }
+#endif
diff --git a/src/VBox/Additions/x11/vboxvideo/vboxvideo.h b/src/VBox/Additions/x11/vboxvideo/vboxvideo.h
index 8234256..684e927 100644
--- a/src/VBox/Additions/x11/vboxvideo/vboxvideo.h
+++ b/src/VBox/Additions/x11/vboxvideo/vboxvideo.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/x11/vboxvideo/vbva.c b/src/VBox/Additions/x11/vboxvideo/vbva.c
index 9f97a95..77fc181 100644
--- a/src/VBox/Additions/x11/vboxvideo/vbva.c
+++ b/src/VBox/Additions/x11/vboxvideo/vbva.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/x11/x11stubs/Makefile.kmk b/src/VBox/Additions/x11/x11stubs/Makefile.kmk
index 605ae55..153b121 100644
--- a/src/VBox/Additions/x11/x11stubs/Makefile.kmk
+++ b/src/VBox/Additions/x11/x11stubs/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2009-2015 Oracle Corporation
+# Copyright (C) 2009-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/x11/x11stubs/libXcomposite-1.0.0/libXcomposite.c b/src/VBox/Additions/x11/x11stubs/libXcomposite-1.0.0/libXcomposite.c
index e068983..4970114 100644
--- a/src/VBox/Additions/x11/x11stubs/libXcomposite-1.0.0/libXcomposite.c
+++ b/src/VBox/Additions/x11/x11stubs/libXcomposite-1.0.0/libXcomposite.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2010 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/x11/x11stubs/libXdamage-1.1.0/libXdamage.c b/src/VBox/Additions/x11/x11stubs/libXdamage-1.1.0/libXdamage.c
index bcf008e..af08ca5 100644
--- a/src/VBox/Additions/x11/x11stubs/libXdamage-1.1.0/libXdamage.c
+++ b/src/VBox/Additions/x11/x11stubs/libXdamage-1.1.0/libXdamage.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2010 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/x11/x11stubs/libXext-6.4.0/libXext.c b/src/VBox/Additions/x11/x11stubs/libXext-6.4.0/libXext.c
index f83809a..7508ace 100644
--- a/src/VBox/Additions/x11/x11stubs/libXext-6.4.0/libXext.c
+++ b/src/VBox/Additions/x11/x11stubs/libXext-6.4.0/libXext.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2010 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Additions/x11/x11stubs/libXfixes-3.1.0/libXfixes.c b/src/VBox/Additions/x11/x11stubs/libXfixes-3.1.0/libXfixes.c
index 211f7f4..a3fd33c 100644
--- a/src/VBox/Additions/x11/x11stubs/libXfixes-3.1.0/libXfixes.c
+++ b/src/VBox/Additions/x11/x11stubs/libXfixes-3.1.0/libXfixes.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2010 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Artwork/win/TemplateDll.rc b/src/VBox/Artwork/win/TemplateDll.rc
index f7fb16e..8846a1d 100644
--- a/src/VBox/Artwork/win/TemplateDll.rc
+++ b/src/VBox/Artwork/win/TemplateDll.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Artwork/win/TemplateDrv.rc b/src/VBox/Artwork/win/TemplateDrv.rc
index 2274126..b6671ea 100644
--- a/src/VBox/Artwork/win/TemplateDrv.rc
+++ b/src/VBox/Artwork/win/TemplateDrv.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Artwork/win/TemplateExe.rc b/src/VBox/Artwork/win/TemplateExe.rc
index ab52a0b..e61b957 100644
--- a/src/VBox/Artwork/win/TemplateExe.rc
+++ b/src/VBox/Artwork/win/TemplateExe.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Artwork/win/TemplateR0.rc b/src/VBox/Artwork/win/TemplateR0.rc
index eebf5c5..e454193 100644
--- a/src/VBox/Artwork/win/TemplateR0.rc
+++ b/src/VBox/Artwork/win/TemplateR0.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Artwork/win/TemplateRC.rc b/src/VBox/Artwork/win/TemplateRC.rc
index fce9422..6ca2b80 100644
--- a/src/VBox/Artwork/win/TemplateRC.rc
+++ b/src/VBox/Artwork/win/TemplateRC.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Artwork/win/TemplateRsrcDefs.h b/src/VBox/Artwork/win/TemplateRsrcDefs.h
index 0c7db00..335e881 100644
--- a/src/VBox/Artwork/win/TemplateRsrcDefs.h
+++ b/src/VBox/Artwork/win/TemplateRsrcDefs.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Debugger/DBGCBuiltInSymbols.cpp b/src/VBox/Debugger/DBGCBuiltInSymbols.cpp
index 607f110..e681e61 100644
--- a/src/VBox/Debugger/DBGCBuiltInSymbols.cpp
+++ b/src/VBox/Debugger/DBGCBuiltInSymbols.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -35,7 +35,7 @@
 PCDBGCSYM dbgcLookupRegisterSymbol(PDBGC pDbgc, const char *pszSymbol)
 {
     /** @todo externally registered symbols. */
-    NOREF(pDbgc);
+    RT_NOREF2(pDbgc, pszSymbol);
     return NULL;
 }
 
diff --git a/src/VBox/Debugger/DBGCCmdHlp.cpp b/src/VBox/Debugger/DBGCCmdHlp.cpp
index 9f23a7a..20ce97f 100644
--- a/src/VBox/Debugger/DBGCCmdHlp.cpp
+++ b/src/VBox/Debugger/DBGCCmdHlp.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -790,6 +790,7 @@ static DECLCALLBACK(int) dbgcHlpVarToDbgfAddr(PDBGCCMDHLP pCmdHlp, PCDBGCVAR pVa
  */
 static DECLCALLBACK(int) dbgcHlpVarFromDbgfAddr(PDBGCCMDHLP pCmdHlp, PCDBGFADDRESS pAddress, PDBGCVAR pResult)
 {
+    RT_NOREF1(pCmdHlp);
     AssertPtrReturn(pAddress, VERR_INVALID_POINTER);
     AssertReturn(DBGFADDRESS_IS_VALID(pAddress), VERR_INVALID_PARAMETER);
     AssertPtrReturn(pResult,  VERR_INVALID_POINTER);
@@ -912,6 +913,7 @@ static DECLCALLBACK(int) dbgcHlpVarToBool(PDBGCCMDHLP pCmdHlp, PCDBGCVAR pVar, b
 static DECLCALLBACK(int) dbgcHlpVarGetRange(PDBGCCMDHLP pCmdHlp, PCDBGCVAR pVar, uint64_t cbElement, uint64_t cbDefault,
                                             uint64_t *pcbRange)
 {
+    RT_NOREF1(pCmdHlp);
 /** @todo implement this properly, strings/symbols are not resolved now. */
     switch (pVar->enmRangeType)
     {
diff --git a/src/VBox/Debugger/DBGCCmdWorkers.cpp b/src/VBox/Debugger/DBGCCmdWorkers.cpp
index 05da6c1..c532358 100644
--- a/src/VBox/Debugger/DBGCCmdWorkers.cpp
+++ b/src/VBox/Debugger/DBGCCmdWorkers.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Debugger/DBGCCommands.cpp b/src/VBox/Debugger/DBGCCommands.cpp
index cf9100f..d9739c5 100644
--- a/src/VBox/Debugger/DBGCCommands.cpp
+++ b/src/VBox/Debugger/DBGCCommands.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -590,6 +590,7 @@ static void dbgcPrintHelpFunction(PDBGCCMDHLP pCmdHlp, PCDBGCFUNC pFunc, bool fE
 static void dbgcCmdHelpCommandsWorker(PDBGC pDbgc, PDBGCCMDHLP pCmdHlp, PCDBGCCMD paCmds, uint32_t cCmds, bool fExternal,
                                       const char *pszDescFmt, ...)
 {
+    RT_NOREF1(pDbgc);
     if (pszDescFmt)
     {
         va_list va;
@@ -628,6 +629,7 @@ static void dbgcCmdHelpCommands(PDBGC pDbgc, PDBGCCMDHLP pCmdHlp, uint32_t *pcHi
 static void dbgcCmdHelpFunctionsWorker(PDBGC pDbgc, PDBGCCMDHLP pCmdHlp, PCDBGCFUNC paFuncs, size_t cFuncs, bool fExternal,
                                        const char *pszDescFmt, ...)
 {
+    RT_NOREF1(pDbgc);
     if (pszDescFmt)
     {
         va_list va;
@@ -667,6 +669,7 @@ static void dbgcCmdHelpFunctions(PDBGC pDbgc, PDBGCCMDHLP pCmdHlp, uint32_t *pcH
 
 static void dbgcCmdHelpOperators(PDBGC pDbgc, PDBGCCMDHLP pCmdHlp, uint32_t *pcHits)
 {
+    RT_NOREF1(pDbgc);
     DBGCCmdHlpPrintf(pCmdHlp, !*pcHits ? "Operators:\n" : "\nOperators:\n");
     *pcHits += 1;
 
@@ -705,6 +708,7 @@ static void dbgcCmdHelpAll(PDBGC pDbgc, PDBGCCMDHLP pCmdHlp, uint32_t *pcHits)
 
 static void dbgcCmdHelpSummary(PDBGC pDbgc, PDBGCCMDHLP pCmdHlp, uint32_t *pcHits)
 {
+    RT_NOREF1(pDbgc);
     *pcHits += 1;
     DBGCCmdHlpPrintf(pCmdHlp,
                      "\n"
@@ -902,6 +906,8 @@ static DECLCALLBACK(int) dbgcCmdEcho(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM p
  */
 static DECLCALLBACK(int) dbgcCmdRunScript(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
 {
+    RT_NOREF2(pUVM, pCmd);
+
     /* check that the parser did what it's supposed to do. */
     if (    cArgs != 1
         ||  paArgs[0].enmType != DBGCVAR_TYPE_STRING)
@@ -1151,6 +1157,8 @@ static DECLCALLBACK(int) dbgcCmdLogFlags(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PU
  */
 static DECLCALLBACK(int) dbgcCmdLogFlush(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
 {
+    RT_NOREF3(pCmdHlp, pUVM, paArgs);
+
     RTLogFlush(NULL);
     PRTLOGGER pLogRel = RTLogRelGetDefaultInstance();
     if (pLogRel)
@@ -1684,6 +1692,7 @@ static DECLCALLBACK(int) dbgcCmdShowVars(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PU
  */
 static DECLCALLBACK(int) dbgcCmdLoadPlugIn(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
 {
+    RT_NOREF1(pUVM);
     PDBGC pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
 
     /*
@@ -1716,6 +1725,7 @@ static DECLCALLBACK(int) dbgcCmdLoadPlugIn(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp,
  */
 static DECLCALLBACK(int) dbgcCmdUnloadPlugIn(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
 {
+    RT_NOREF1(pUVM);
     PDBGC pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
 
     /*
diff --git a/src/VBox/Debugger/DBGCEmulateCodeView.cpp b/src/VBox/Debugger/DBGCEmulateCodeView.cpp
index 52d007a..1101829 100644
--- a/src/VBox/Debugger/DBGCEmulateCodeView.cpp
+++ b/src/VBox/Debugger/DBGCEmulateCodeView.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -659,7 +659,7 @@ static DECLCALLBACK(int) dbgcCmdBrkAccess(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, P
      * Pick out the optional arguments.
      */
     uint64_t iHitTrigger = 0;
-    uint64_t iHitDisable = ~0;
+    uint64_t iHitDisable = UINT64_MAX;
     const char *pszCmds = NULL;
     unsigned iArg = 3;
     if (iArg < cArgs && paArgs[iArg].enmType == DBGCVAR_TYPE_NUMBER)
@@ -1000,7 +1000,7 @@ static DECLCALLBACK(int) dbgcCmdBrkSet(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM
      * Pick out the optional arguments.
      */
     uint64_t iHitTrigger = 0;
-    uint64_t iHitDisable = ~0;
+    uint64_t iHitDisable = UINT64_MAX;
     const char *pszCmds = NULL;
     unsigned iArg = 1;
     if (iArg < cArgs && paArgs[iArg].enmType == DBGCVAR_TYPE_NUMBER)
@@ -1060,7 +1060,7 @@ static DECLCALLBACK(int) dbgcCmdBrkREM(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM
      * Pick out the optional arguments.
      */
     uint64_t iHitTrigger = 0;
-    uint64_t iHitDisable = ~0;
+    uint64_t iHitDisable = UINT64_MAX;
     const char *pszCmds = NULL;
     unsigned iArg = 1;
     if (iArg < cArgs && paArgs[iArg].enmType == DBGCVAR_TYPE_NUMBER)
@@ -1517,7 +1517,7 @@ static DECLCALLBACK(int) dbgcCmdListSource(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp,
 
                         rc = DBGCCmdHlpPrintf(pCmdHlp, "         %4d: %s\n", Line.uLineNo - cBefore - 1, szLine);
                         szLine[0] = '\0';
-                        (void)fgets(szLine, sizeof(szLine), phFile);
+                        const char *pszShutUpGcc = fgets(szLine, sizeof(szLine), phFile); NOREF(pszShutUpGcc);
                         cLines++;
                     }
                     /* print the actual line */
@@ -2819,7 +2819,7 @@ static DECLCALLBACK(int) dbgcCmdDumpPageDir(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp,
      * hierarchy to find the intended PDE.
      */
     unsigned    iEntry = ~0U;           /* The page directory index. ~0U for 'dpta'. */
-    DBGCVAR     VarGCPtr;               /* The GC address corresponding to the current PDE (iEntry != ~0U). */
+    DBGCVAR     VarGCPtr = { NULL, };   /* The GC address corresponding to the current PDE (iEntry != ~0U). */
     DBGCVAR     VarPDEAddr;             /* The address of the current PDE. */
     unsigned    cEntries;               /* The number of entries to display. */
     unsigned    cEntriesMax;            /* The max number of entries to display. */
@@ -3726,9 +3726,6 @@ static DECLCALLBACK(int) dbgcCmdDumpTypeInfoCallback(uint32_t off, const char *p
  */
 static DECLCALLBACK(int) dbgcCmdDumpTypeInfo(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
 {
-    PDBGC pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
-    int   rc;
-
     DBGC_CMDHLP_REQ_UVM_RET(pCmdHlp, pCmd, pUVM);
     DBGC_CMDHLP_ASSERT_PARSER_RET(pCmdHlp, pCmd, 0, cArgs == 1 || cArgs == 2);
     DBGC_CMDHLP_ASSERT_PARSER_RET(pCmdHlp, pCmd, 0, paArgs[0].enmType == DBGCVAR_TYPE_STRING);
@@ -3848,9 +3845,6 @@ static DECLCALLBACK(int) dbgcCmdDumpTypedValCallback(uint32_t off, const char *p
  */
 static DECLCALLBACK(int) dbgcCmdDumpTypedVal(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
 {
-    PDBGC pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
-    int   rc;
-
     DBGC_CMDHLP_REQ_UVM_RET(pCmdHlp, pCmd, pUVM);
     DBGC_CMDHLP_ASSERT_PARSER_RET(pCmdHlp, pCmd, 0, cArgs == 2 || cArgs == 3);
     DBGC_CMDHLP_ASSERT_PARSER_RET(pCmdHlp, pCmd, 0, paArgs[0].enmType == DBGCVAR_TYPE_STRING);
@@ -3862,7 +3856,7 @@ static DECLCALLBACK(int) dbgcCmdDumpTypedVal(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp
      * Make DBGF address and fix the range.
      */
     DBGFADDRESS Address;
-    rc = pCmdHlp->pfnVarToDbgfAddr(pCmdHlp, &paArgs[1], &Address);
+    int rc = pCmdHlp->pfnVarToDbgfAddr(pCmdHlp, &paArgs[1], &Address);
     if (RT_FAILURE(rc))
         return pCmdHlp->pfnVBoxError(pCmdHlp, rc, "VarToDbgfAddr(,%Dv,)\n", &paArgs[1]);
 
@@ -4024,15 +4018,12 @@ int dbgcVarsToBytes(PDBGCCMDHLP pCmdHlp, void *pvBuf, uint32_t *pcbBuf, size_t c
  */
 static DECLCALLBACK(int) dbgcCmdEditMem(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
 {
-    PDBGC pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
-    unsigned iArg;
-
     /*
      * Validate input.
      */
     DBGC_CMDHLP_ASSERT_PARSER_RET(pCmdHlp, pCmd, 0, cArgs >= 2);
     DBGC_CMDHLP_ASSERT_PARSER_RET(pCmdHlp, pCmd, 0, DBGCVAR_ISPOINTER(paArgs[0].enmType));
-    for (iArg = 1; iArg < cArgs; iArg++)
+    for (unsigned iArg = 1; iArg < cArgs; iArg++)
         DBGC_CMDHLP_ASSERT_PARSER_RET(pCmdHlp, pCmd, 0, paArgs[iArg].enmType == DBGCVAR_TYPE_NUMBER);
     DBGC_CMDHLP_REQ_UVM_RET(pCmdHlp, pCmd, pUVM);
 
@@ -4053,7 +4044,7 @@ static DECLCALLBACK(int) dbgcCmdEditMem(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUV
      * Do setting.
      */
     DBGCVAR Addr = paArgs[0];
-    for (iArg = 1;;)
+    for (unsigned iArg = 1;;)
     {
         size_t cbWritten;
         int rc = pCmdHlp->pfnMemWrite(pCmdHlp, &paArgs[iArg].u, cbElement, &Addr, &cbWritten);
@@ -4287,6 +4278,8 @@ static int dbgcCmdWorkerSearchMem(PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR pAdd
  */
 static DECLCALLBACK(int) dbgcCmdSearchMem(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
 {
+    RT_NOREF2(pCmd, paArgs);
+
     /* check that the parser did what it's supposed to do. */
     //if (    cArgs <= 2
     //    &&  paArgs[0].enmType != DBGCVAR_TYPE_STRING)
@@ -4692,6 +4685,7 @@ static DECLCALLBACK(int) dbgcCmdEventCtrl(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, P
  */
 static DECLCALLBACK(int) dbgcCmdEventCtrlReset(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
 {
+    RT_NOREF1(pCmd);
     uint32_t            cEventCfgs = 0;
     DBGFEVENTCONFIG     aEventCfgs[DBGFEVENT_END];
     uint32_t            cIntCfgs   = 0;
@@ -4807,6 +4801,7 @@ void dbgcEventTerm(PDBGC pDbgc)
 
 static void dbgcEventDisplay(PDBGCCMDHLP pCmdHlp, const char *pszName, DBGCEVTSTATE enmDefault, PDBGCEVTCFG const *ppEvtCfg)
 {
+    RT_NOREF1(enmDefault);
     PDBGCEVTCFG pEvtCfg = *ppEvtCfg;
 
     const char *pszState;
@@ -4876,6 +4871,7 @@ static void dbgcEventDisplayRange(PDBGCCMDHLP pCmdHlp, const char *pszBaseNm, DB
  */
 static DECLCALLBACK(int) dbgcCmdEventCtrlList(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
 {
+    RT_NOREF2(pCmd, pUVM);
     PDBGC pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
 
     if (cArgs == 0)
@@ -5192,6 +5188,7 @@ static DECLCALLBACK(int) dbgcCmdListModules(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp,
 static DECLCALLBACK(int) dbgcFuncReadU8(PCDBGCFUNC pFunc, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, uint32_t cArgs,
                                         PDBGCVAR pResult)
 {
+    RT_NOREF1(pUVM);
     AssertReturn(cArgs == 1, VERR_DBGC_PARSE_BUG);
     AssertReturn(DBGCVAR_ISPOINTER(paArgs[0].enmType), VERR_DBGC_PARSE_BUG);
     AssertReturn(paArgs[0].enmRangeType == DBGCVAR_RANGE_NONE, VERR_DBGC_PARSE_BUG);
@@ -5213,6 +5210,7 @@ static DECLCALLBACK(int) dbgcFuncReadU8(PCDBGCFUNC pFunc, PDBGCCMDHLP pCmdHlp, P
 static DECLCALLBACK(int) dbgcFuncReadU16(PCDBGCFUNC pFunc, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, uint32_t cArgs,
                                          PDBGCVAR pResult)
 {
+    RT_NOREF1(pUVM);
     AssertReturn(cArgs == 1, VERR_DBGC_PARSE_BUG);
     AssertReturn(DBGCVAR_ISPOINTER(paArgs[0].enmType), VERR_DBGC_PARSE_BUG);
     AssertReturn(paArgs[0].enmRangeType == DBGCVAR_RANGE_NONE, VERR_DBGC_PARSE_BUG);
@@ -5234,6 +5232,7 @@ static DECLCALLBACK(int) dbgcFuncReadU16(PCDBGCFUNC pFunc, PDBGCCMDHLP pCmdHlp,
 static DECLCALLBACK(int) dbgcFuncReadU32(PCDBGCFUNC pFunc, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, uint32_t cArgs,
                                          PDBGCVAR pResult)
 {
+    RT_NOREF1(pUVM);
     AssertReturn(cArgs == 1, VERR_DBGC_PARSE_BUG);
     AssertReturn(DBGCVAR_ISPOINTER(paArgs[0].enmType), VERR_DBGC_PARSE_BUG);
     AssertReturn(paArgs[0].enmRangeType == DBGCVAR_RANGE_NONE, VERR_DBGC_PARSE_BUG);
@@ -5255,6 +5254,7 @@ static DECLCALLBACK(int) dbgcFuncReadU32(PCDBGCFUNC pFunc, PDBGCCMDHLP pCmdHlp,
 static DECLCALLBACK(int) dbgcFuncReadU64(PCDBGCFUNC pFunc, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, uint32_t cArgs,
                                          PDBGCVAR pResult)
 {
+    RT_NOREF1(pUVM);
     AssertReturn(cArgs == 1, VERR_DBGC_PARSE_BUG);
     AssertReturn(DBGCVAR_ISPOINTER(paArgs[0].enmType), VERR_DBGC_PARSE_BUG);
     AssertReturn(paArgs[0].enmRangeType == DBGCVAR_RANGE_NONE, VERR_DBGC_PARSE_BUG);
diff --git a/src/VBox/Debugger/DBGCEval.cpp b/src/VBox/Debugger/DBGCEval.cpp
index 33f5580..9dd989d 100644
--- a/src/VBox/Debugger/DBGCEval.cpp
+++ b/src/VBox/Debugger/DBGCEval.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -419,6 +419,8 @@ static int dbgcEvalSubUnaryAny(PDBGC pDbgc, char *pszExpr, size_t cchExpr, PDBGC
 static int dbgcEvalSubCall(PDBGC pDbgc, char *pszFuncNm, size_t cchFuncNm, bool fExternal, char *pszArgs, size_t cchArgs,
                            DBGCVARCAT enmCategory, PDBGCVAR pResult)
 {
+    RT_NOREF1(enmCategory);
+
     /*
      * Lookup the function.
      */
@@ -1053,6 +1055,7 @@ static int dbgcProcessArguments(PDBGC pDbgc, const char *pszCmdOrFunc,
                                 PCDBGCVARDESC const paVarDescs, uint32_t const cVarDescs,
                                 char *pszArgs, unsigned *piArg, unsigned *pcArgs)
 {
+    RT_NOREF1(pszCmdOrFunc);
     Log2(("dbgcProcessArguments: pszCmdOrFunc=%s pszArgs='%s'\n", pszCmdOrFunc, pszArgs));
 
     /*
diff --git a/src/VBox/Debugger/DBGCFunctions.cpp b/src/VBox/Debugger/DBGCFunctions.cpp
index 473b439..0bda635 100644
--- a/src/VBox/Debugger/DBGCFunctions.cpp
+++ b/src/VBox/Debugger/DBGCFunctions.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Debugger/DBGCGdbRemoteStub.cpp b/src/VBox/Debugger/DBGCGdbRemoteStub.cpp
index 0708147..4d05603 100644
--- a/src/VBox/Debugger/DBGCGdbRemoteStub.cpp
+++ b/src/VBox/Debugger/DBGCGdbRemoteStub.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Debugger/DBGCInternal.h b/src/VBox/Debugger/DBGCInternal.h
index e108189..e7d3313 100644
--- a/src/VBox/Debugger/DBGCInternal.h
+++ b/src/VBox/Debugger/DBGCInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Debugger/DBGCOps.cpp b/src/VBox/Debugger/DBGCOps.cpp
index c4aa2ed..83b3b68 100644
--- a/src/VBox/Debugger/DBGCOps.cpp
+++ b/src/VBox/Debugger/DBGCOps.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -240,6 +240,7 @@ static int dbgcOpHelperGetNumber(PDBGC pDbgc, PCDBGCVAR pArg, uint64_t *pu64Ret)
  */
 static DECLCALLBACK(int) dbgcOpMinus(PDBGC pDbgc, PCDBGCVAR pArg, DBGCVARCAT enmCat, PDBGCVAR pResult)
 {
+    RT_NOREF1(enmCat);
     LogFlow(("dbgcOpMinus\n"));
     *pResult = *pArg;
     switch (pArg->enmType)
@@ -278,6 +279,7 @@ static DECLCALLBACK(int) dbgcOpMinus(PDBGC pDbgc, PCDBGCVAR pArg, DBGCVARCAT enm
  */
 static DECLCALLBACK(int) dbgcOpPluss(PDBGC pDbgc, PCDBGCVAR pArg, DBGCVARCAT enmCat, PDBGCVAR pResult)
 {
+    RT_NOREF1(enmCat);
     LogFlow(("dbgcOpPluss\n"));
     *pResult = *pArg;
     switch (pArg->enmType)
@@ -305,6 +307,7 @@ static DECLCALLBACK(int) dbgcOpPluss(PDBGC pDbgc, PCDBGCVAR pArg, DBGCVARCAT enm
  */
 static DECLCALLBACK(int) dbgcOpBooleanNot(PDBGC pDbgc, PCDBGCVAR pArg, DBGCVARCAT enmCat, PDBGCVAR pResult)
 {
+    RT_NOREF1(enmCat);
     LogFlow(("dbgcOpBooleanNot\n"));
     *pResult = *pArg;
     switch (pArg->enmType)
@@ -347,6 +350,7 @@ static DECLCALLBACK(int) dbgcOpBooleanNot(PDBGC pDbgc, PCDBGCVAR pArg, DBGCVARCA
  */
 static DECLCALLBACK(int) dbgcOpBitwiseNot(PDBGC pDbgc, PCDBGCVAR pArg, DBGCVARCAT enmCat, PDBGCVAR pResult)
 {
+    RT_NOREF1(enmCat);
     LogFlow(("dbgcOpBitwiseNot\n"));
     *pResult = *pArg;
     switch (pArg->enmType)
@@ -385,6 +389,7 @@ static DECLCALLBACK(int) dbgcOpBitwiseNot(PDBGC pDbgc, PCDBGCVAR pArg, DBGCVARCA
  */
 static DECLCALLBACK(int) dbgcOpVar(PDBGC pDbgc, PCDBGCVAR pArg, DBGCVARCAT enmCat, PDBGCVAR pResult)
 {
+    RT_NOREF1(enmCat);
     LogFlow(("dbgcOpVar: %s\n", pArg->u.pszString));
     AssertReturn(pArg->enmType == DBGCVAR_TYPE_SYMBOL, VERR_DBGC_PARSE_BUG);
 
@@ -492,6 +497,7 @@ DECLCALLBACK(int) dbgcOpRegister(PDBGC pDbgc, PCDBGCVAR pArg, DBGCVARCAT enmCat,
  */
 DECLCALLBACK(int) dbgcOpAddrFlat(PDBGC pDbgc, PCDBGCVAR pArg, DBGCVARCAT enmCat, PDBGCVAR pResult)
 {
+    RT_NOREF1(enmCat);
     LogFlow(("dbgcOpAddrFlat\n"));
     DBGCVARTYPE enmType = DBGCVAR_ISHCPOINTER(pArg->enmType) ? DBGCVAR_TYPE_HC_FLAT : DBGCVAR_TYPE_GC_FLAT;
     return DBGCCmdHlpConvert(&pDbgc->CmdHlp, pArg, enmType, true /*fConvSyms*/, pResult);
@@ -503,6 +509,7 @@ DECLCALLBACK(int) dbgcOpAddrFlat(PDBGC pDbgc, PCDBGCVAR pArg, DBGCVARCAT enmCat,
  */
 DECLCALLBACK(int) dbgcOpAddrPhys(PDBGC pDbgc, PCDBGCVAR pArg, DBGCVARCAT enmCat, PDBGCVAR pResult)
 {
+    RT_NOREF1(enmCat);
     LogFlow(("dbgcOpAddrPhys\n"));
     DBGCVARTYPE enmType = DBGCVAR_ISHCPOINTER(pArg->enmType) ? DBGCVAR_TYPE_HC_PHYS : DBGCVAR_TYPE_GC_PHYS;
     return DBGCCmdHlpConvert(&pDbgc->CmdHlp, pArg, enmType, true /*fConvSyms*/, pResult);
@@ -514,6 +521,7 @@ DECLCALLBACK(int) dbgcOpAddrPhys(PDBGC pDbgc, PCDBGCVAR pArg, DBGCVARCAT enmCat,
  */
 DECLCALLBACK(int) dbgcOpAddrHostPhys(PDBGC pDbgc, PCDBGCVAR pArg, DBGCVARCAT enmCat, PDBGCVAR pResult)
 {
+    RT_NOREF1(enmCat);
     LogFlow(("dbgcOpAddrPhys\n"));
     return DBGCCmdHlpConvert(&pDbgc->CmdHlp, pArg, DBGCVAR_TYPE_HC_PHYS, true /*fConvSyms*/, pResult);
 }
@@ -524,6 +532,7 @@ DECLCALLBACK(int) dbgcOpAddrHostPhys(PDBGC pDbgc, PCDBGCVAR pArg, DBGCVARCAT enm
  */
 DECLCALLBACK(int) dbgcOpAddrHost(PDBGC pDbgc, PCDBGCVAR pArg, DBGCVARCAT enmCat, PDBGCVAR pResult)
 {
+    RT_NOREF1(enmCat);
     LogFlow(("dbgcOpAddrHost\n"));
     return DBGCCmdHlpConvert(&pDbgc->CmdHlp, pArg, DBGCVAR_TYPE_HC_FLAT, true /*fConvSyms*/, pResult);
 }
diff --git a/src/VBox/Debugger/DBGCTcp.cpp b/src/VBox/Debugger/DBGCTcp.cpp
index 2be023e..9806aaa 100644
--- a/src/VBox/Debugger/DBGCTcp.cpp
+++ b/src/VBox/Debugger/DBGCTcp.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -278,6 +278,8 @@ DBGDECL(int)    DBGCTcpCreate(PUVM pUVM, void **ppvData)
  */
 DBGDECL(int) DBGCTcpTerminate(PUVM pUVM, void *pvData)
 {
+    RT_NOREF1(pUVM);
+
     /*
      * Destroy the server instance if any.
      */
diff --git a/src/VBox/Debugger/DBGConsole.cpp b/src/VBox/Debugger/DBGConsole.cpp
index b33062e..28aad47 100644
--- a/src/VBox/Debugger/DBGConsole.cpp
+++ b/src/VBox/Debugger/DBGConsole.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Debugger/DBGPlugInCommonELF.cpp b/src/VBox/Debugger/DBGPlugInCommonELF.cpp
index 5658990..7afb424 100644
--- a/src/VBox/Debugger/DBGPlugInCommonELF.cpp
+++ b/src/VBox/Debugger/DBGPlugInCommonELF.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -19,7 +19,7 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
-#define LOG_GROUP LOG_GROUP_DBGF ///@todo add new log group.
+#define LOG_GROUP LOG_GROUP_DBGF /// @todo add new log group.
 #include "DBGPlugInCommonELF.h"
 
 #include <VBox/vmm/dbgf.h>
diff --git a/src/VBox/Debugger/DBGPlugInCommonELF.h b/src/VBox/Debugger/DBGPlugInCommonELF.h
index 4ae6ec1..a71a426 100644
--- a/src/VBox/Debugger/DBGPlugInCommonELF.h
+++ b/src/VBox/Debugger/DBGPlugInCommonELF.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Debugger/DBGPlugInCommonELFTmpl.cpp.h b/src/VBox/Debugger/DBGPlugInCommonELFTmpl.cpp.h
index 88c8cae..643b337 100644
--- a/src/VBox/Debugger/DBGPlugInCommonELFTmpl.cpp.h
+++ b/src/VBox/Debugger/DBGPlugInCommonELFTmpl.cpp.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -250,7 +250,6 @@ int DBGDiggerCommonParseElfMod(PUVM pUVM, const char *pszModName, const char *ps
     else
     {
         /* Add the segments and fill in the translation table. */
-        RTGCPTR uRvaNext = 0;
         for (unsigned i = 0; i < cSegs; i++)
             if (paShdrs[i].sh_flags & SHF_ALLOC)
             {
diff --git a/src/VBox/Debugger/DBGPlugInDarwin.cpp b/src/VBox/Debugger/DBGPlugInDarwin.cpp
index f23de69..ccb3225 100644
--- a/src/VBox/Debugger/DBGPlugInDarwin.cpp
+++ b/src/VBox/Debugger/DBGPlugInDarwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -19,7 +19,7 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
-#define LOG_GROUP LOG_GROUP_DBGF ///@todo add new log group.
+#define LOG_GROUP LOG_GROUP_DBGF /// @todo add new log group.
 #include "DBGPlugIns.h"
 #include <VBox/vmm/dbgf.h>
 #include <iprt/string.h>
@@ -136,6 +136,7 @@ static DECLCALLBACK(int)  dbgDiggerDarwinInit(PUVM pUVM, void *pvData);
 static DECLCALLBACK(int) dbgDiggerDarwinIDmsg_QueryKernelLog(PDBGFOSIDMESG pThis, PUVM pUVM, uint32_t fFlags, uint32_t cMessages,
                                                              char *pszBuf, size_t cbBuf, size_t *pcbActual)
 {
+    RT_NOREF1(fFlags);
     PDBGDIGGERDARWIN pData = RT_FROM_MEMBER(pThis, DBGDIGGERDARWIN, IDmesg);
 
     if (cMessages < 1)
@@ -306,6 +307,7 @@ static DECLCALLBACK(int) dbgDiggerDarwinIDmsg_QueryKernelLog(PDBGFOSIDMESG pThis
  */
 static DECLCALLBACK(void *) dbgDiggerDarwinQueryInterface(PUVM pUVM, void *pvData, DBGFOSINTERFACE enmIf)
 {
+    RT_NOREF1(pUVM);
     PDBGDIGGERDARWIN pThis = (PDBGDIGGERDARWIN)pvData;
     switch (enmIf)
     {
@@ -351,6 +353,7 @@ static DECLCALLBACK(int)  dbgDiggerDarwinQueryVersion(PUVM pUVM, void *pvData, c
  */
 static DECLCALLBACK(void)  dbgDiggerDarwinTerm(PUVM pUVM, void *pvData)
 {
+    RT_NOREF1(pUVM);
     PDBGDIGGERDARWIN pThis = (PDBGDIGGERDARWIN)pvData;
 
     pThis->fValid = false;
@@ -411,6 +414,7 @@ static bool dbgDiggerDarwinIsValidSegOrSectName(const char *pszName, size_t cbNa
 
 static int dbgDiggerDarwinAddModule(PDBGDIGGERDARWIN pThis, PUVM pUVM, uint64_t uModAddr, const char *pszName, bool *pf64Bit)
 {
+    RT_NOREF1(pThis);
     union
     {
         uint8_t             ab[2 * X86_PAGE_4K_SIZE];
@@ -602,7 +606,7 @@ static int dbgDiggerDarwinAddModule(PDBGDIGGERDARWIN pThis, PUVM pUVM, uint64_t
     RTDBGAS hAs = DBGFR3AsResolveAndRetain(pUVM, DBGF_AS_KERNEL);
     if (hAs != NIL_RTDBGAS)
     {
-        uint64_t uRvaNext = 0;
+        //uint64_t uRvaNext = 0; - what was this?
         uint32_t cLinked  = 0;
         iSeg = cSegs;
         while (iSeg-- > 0) /* HACK: Map in reverse order to avoid replacing __TEXT. */
@@ -944,6 +948,7 @@ static DECLCALLBACK(bool)  dbgDiggerDarwinProbe(PUVM pUVM, void *pvData)
  */
 static DECLCALLBACK(void)  dbgDiggerDarwinDestruct(PUVM pUVM, void *pvData)
 {
+    RT_NOREF2(pUVM, pvData);
 
 }
 
@@ -953,6 +958,7 @@ static DECLCALLBACK(void)  dbgDiggerDarwinDestruct(PUVM pUVM, void *pvData)
  */
 static DECLCALLBACK(int)  dbgDiggerDarwinConstruct(PUVM pUVM, void *pvData)
 {
+    RT_NOREF1(pUVM);
     PDBGDIGGERDARWIN pThis = (PDBGDIGGERDARWIN)pvData;
 
     pThis->IDmesg.u32Magic = DBGFOSIDMESG_MAGIC;
diff --git a/src/VBox/Debugger/DBGPlugInDiggers.cpp b/src/VBox/Debugger/DBGPlugInDiggers.cpp
index aba25b2..fe3992a 100644
--- a/src/VBox/Debugger/DBGPlugInDiggers.cpp
+++ b/src/VBox/Debugger/DBGPlugInDiggers.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Debugger/DBGPlugInLinux.cpp b/src/VBox/Debugger/DBGPlugInLinux.cpp
index 33863b6..79a4ecf 100644
--- a/src/VBox/Debugger/DBGPlugInLinux.cpp
+++ b/src/VBox/Debugger/DBGPlugInLinux.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -19,7 +19,7 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
-#define LOG_GROUP LOG_GROUP_DBGF ///@todo add new log group.
+#define LOG_GROUP LOG_GROUP_DBGF /// @todo add new log group.
 #include "DBGPlugIns.h"
 #include "DBGPlugInCommonELF.h"
 #include <VBox/vmm/dbgf.h>
@@ -371,7 +371,7 @@ static int dbgDiggerLinuxQueryAsciiLogBufferPtrs(PDBGDIGGERLINUX pThis, PUVM pUV
         uint32_t offInstr = 0;
         bool fRet = false;
         DISSTATE DisState;
-        unsigned idxAddressesUsed = 0;
+        unsigned cAddressesUsed = 0;
         struct { size_t cb; RTGCPTR GCPtrOrigSrc; } aAddresses[5];
         RT_ZERO(DisState);
         RT_ZERO(aAddresses);
@@ -419,14 +419,14 @@ static int dbgDiggerLinuxQueryAsciiLogBufferPtrs(PDBGDIGGERLINUX pThis, PUVM pUV
                                 && DISUSE_IS_EFFECTIVE_ADDR(DisState.Param1.fUse))
                             {
                                 RTGCPTR GCPtrLogBuf = 0;
-                                size_t cbLogBuf = 0;
+                                uint32_t cbLogBuf = 0;
 
                                 /*
                                  * We can stop disassembling now and inspect all registers, look for a valid kernel address first.
                                  * Only one of the accessed registers should hold a valid kernel address.
                                  * For the log size look for the biggest non kernel address.
                                  */
-                                for (unsigned i = 0; i < idxAddressesUsed; i++)
+                                for (unsigned i = 0; i < cAddressesUsed; i++)
                                 {
                                     DBGFADDRESS AddrVal;
                                     union { uint8_t abVal[8]; uint32_t u32Val; uint64_t u64Val; } Val;
@@ -513,15 +513,15 @@ static int dbgDiggerLinuxQueryAsciiLogBufferPtrs(PDBGDIGGERLINUX pThis, PUVM pUV
                                     else
                                         AssertMsgFailedBreakStmt(("Invalid displacement\n"), rc = VERR_INVALID_STATE);
 
-                                    if (idxAddressesUsed < RT_ELEMENTS(aAddresses))
+                                    if (cAddressesUsed < RT_ELEMENTS(aAddresses))
                                     {
                                         /* movsxd reads always 32bits. */
                                         if (DisState.pCurInstr->uOpcode == OP_MOVSXD)
-                                            aAddresses[idxAddressesUsed].cb = sizeof(uint32_t);
+                                            aAddresses[cAddressesUsed].cb = sizeof(uint32_t);
                                         else
-                                            aAddresses[idxAddressesUsed].cb = DisState.Param2.cb;
-                                        aAddresses[idxAddressesUsed].GCPtrOrigSrc = GCPtrVal;
-                                        idxAddressesUsed++;
+                                            aAddresses[cAddressesUsed].cb = DisState.Param2.cb;
+                                        aAddresses[cAddressesUsed].GCPtrOrigSrc = GCPtrVal;
+                                        cAddressesUsed++;
                                     }
                                     else
                                     {
@@ -563,17 +563,17 @@ static int dbgDiggerLinuxQueryLogBufferPtrs(PDBGDIGGERLINUX pThis, PUVM pUVM, RT
 {
     int rc = VINF_SUCCESS;
 
-    struct { void *pvVar; size_t cbHost, cbGuest; const char *pszSymbol; } aSymbols[] =
+    struct { void *pvVar; uint32_t cbHost, cbGuest; const char *pszSymbol; } aSymbols[] =
     {
-        { pGCPtrLogBuf, sizeof(RTGCPTR),  pThis->f64Bit ? sizeof(uint64_t) : sizeof(uint32_t), "log_buf_addr_get" },
-        { pcbLogBuf,    sizeof(uint32_t), sizeof(uint32_t),                                    "log_buf_len_get" }
+        { pGCPtrLogBuf, (uint32_t)sizeof(RTGCPTR),  (uint32_t)(pThis->f64Bit ? sizeof(uint64_t) : sizeof(uint32_t)), "log_buf_addr_get" },
+        { pcbLogBuf,    (uint32_t)sizeof(uint32_t), (uint32_t)sizeof(uint32_t),                                      "log_buf_len_get" }
     };
     for (uint32_t i = 0; i < RT_ELEMENTS(aSymbols) && RT_SUCCESS(rc); i++)
     {
         RT_BZERO(aSymbols[i].pvVar, aSymbols[i].cbHost);
         Assert(aSymbols[i].cbHost >= aSymbols[i].cbGuest);
         rc = dbgDiggerLinuxDisassembleSimpleGetter(pThis, pUVM, hMod, aSymbols[i].pszSymbol,
-                                                   aSymbols[i].pvVar,  aSymbols[i].cbGuest);
+                                                   aSymbols[i].pvVar, aSymbols[i].cbGuest);
     }
 
     return rc;
@@ -621,6 +621,7 @@ static int dbgDiggerLinuxLogBufferQueryAscii(PDBGDIGGERLINUX pThis, PUVM pUVM, R
                                              uint32_t fFlags, uint32_t cMessages,
                                              char *pszBuf, size_t cbBuf, size_t *pcbActual)
 {
+    RT_NOREF2(fFlags, cMessages);
     int rc = VINF_SUCCESS;
     RTGCPTR  GCPtrLogBuf;
     uint32_t cbLogBuf;
@@ -700,7 +701,7 @@ static int dbgDiggerLinuxLogBufferQueryAscii(PDBGDIGGERLINUX pThis, PUVM pUVM, R
         return VERR_NOT_FOUND;
     }
 
-    /** @todo: Try to parse where the single messages start to make use of cMessages. */
+    /** @todo Try to parse where the single messages start to make use of cMessages. */
     size_t cchLength = RTStrNLen((const char *)pbLogBuf, cbLogBuf);
     memcpy(&pszBuf[0], pbLogBuf, RT_MIN(cbBuf, cchLength));
 
@@ -734,6 +735,7 @@ static int dbgDiggerLinuxLogBufferQueryRecords(PDBGDIGGERLINUX pThis, PUVM pUVM,
                                                uint32_t fFlags, uint32_t cMessages,
                                                char *pszBuf, size_t cbBuf, size_t *pcbActual)
 {
+    RT_NOREF1(fFlags);
     int rc = VINF_SUCCESS;
     RTGCPTR  GCPtrLogBuf;
     uint32_t cbLogBuf;
@@ -1047,6 +1049,7 @@ static void dbgDiggerLinuxCfgDbDestroy(PDBGDIGGERLINUX pThis)
  */
 static DECLCALLBACK(void *) dbgDiggerLinuxQueryInterface(PUVM pUVM, void *pvData, DBGFOSINTERFACE enmIf)
 {
+    RT_NOREF1(pUVM);
     PDBGDIGGERLINUX pThis = (PDBGDIGGERLINUX)pvData;
     switch (enmIf)
     {
@@ -1092,6 +1095,7 @@ static DECLCALLBACK(int)  dbgDiggerLinuxQueryVersion(PUVM pUVM, void *pvData, ch
  */
 static DECLCALLBACK(void)  dbgDiggerLinuxTerm(PUVM pUVM, void *pvData)
 {
+    RT_NOREF1(pUVM);
     PDBGDIGGERLINUX pThis = (PDBGDIGGERLINUX)pvData;
     Assert(pThis->fValid);
 
@@ -1728,7 +1732,7 @@ static bool dbgDiggerLinuxIsLikelyNameFragment(PUVM pUVM, PCDBGFADDRESS pHitAddr
  * @param   pabNeedle           The needle to use for searching.
  * @param   cbNeedle            Size of the needle in bytes.
  */
-static int dbgDiggerLinuxFindSymbolTableFromNeedle(PDBGDIGGERLINUX pThis, PUVM pUVM, uint8_t const *pabNeedle, size_t cbNeedle)
+static int dbgDiggerLinuxFindSymbolTableFromNeedle(PDBGDIGGERLINUX pThis, PUVM pUVM, uint8_t const *pabNeedle, uint8_t cbNeedle)
 {
     int rc = VINF_SUCCESS;
 
@@ -1827,7 +1831,7 @@ static const char *dbgDiggerLinuxCfgSkipWhitespace(const char *pszCfg)
  * @param   pszCfg              The config data.
  * @param   ppszCfgNext         Where to store the pointer to the data following the identifier.
  * @param   ppszIde             Where to store the pointer to the identifier on success.
- *                              Free with RTStrFree().         
+ *                              Free with RTStrFree().
  */
 static int dbgDiggerLinuxCfgParseIde(const char *pszCfg, const char **ppszCfgNext, char **ppszIde)
 {
@@ -1882,7 +1886,7 @@ static int dbgDiggerLinuxCfgParseVal(const char *pszCfg, const char **ppszCfgNex
             if (pCfgItem)
             {
                 pCfgItem->enmType = DBGDIGGERLINUXCFGITEMTYPE_NUMBER;
-                pCfgItem->u.i64Num = i64Num; 
+                pCfgItem->u.i64Num = i64Num;
             }
             else
                 rc = VERR_NO_MEMORY;
@@ -1919,7 +1923,7 @@ static int dbgDiggerLinuxCfgParseVal(const char *pszCfg, const char **ppszCfgNex
         if (pCfgItem)
         {
             pCfgItem->enmType = DBGDIGGERLINUXCFGITEMTYPE_FLAG;
-            pCfgItem->u.fModule = *pszCfg == 'm'; 
+            pCfgItem->u.fModule = *pszCfg == 'm';
         }
         else
             rc = VERR_NO_MEMORY;
@@ -2024,7 +2028,7 @@ static int dbgDiggerLinuxCfgParse(PDBGDIGGERLINUX pThis, const char *pszCfg)
     return rc;
 }
 
-/** 
+/**
  * Decompresses the given config and validates the UTF-8 encoding.
  *
  * @returns VBox status code.
@@ -2199,7 +2203,7 @@ static DECLCALLBACK(int)  dbgDiggerLinuxInit(PUVM pUVM, void *pvData)
      * Try to find the compressed kernel config and parse it before we try
      * to get the symbol table, the config database is required to select
      * the method to use.
-     */ 
+     */
     int rc = dbgDiggerLinuxCfgFind(pThis, pUVM);
     if (RT_FAILURE(rc))
         LogFlowFunc(("Failed to find kernel config (%Rrc), no config database available\n", rc));
@@ -2274,7 +2278,7 @@ static DECLCALLBACK(bool)  dbgDiggerLinuxProbe(PUVM pUVM, void *pvData)
  */
 static DECLCALLBACK(void)  dbgDiggerLinuxDestruct(PUVM pUVM, void *pvData)
 {
-
+    RT_NOREF2(pUVM, pvData);
 }
 
 
@@ -2283,6 +2287,7 @@ static DECLCALLBACK(void)  dbgDiggerLinuxDestruct(PUVM pUVM, void *pvData)
  */
 static DECLCALLBACK(int)  dbgDiggerLinuxConstruct(PUVM pUVM, void *pvData)
 {
+    RT_NOREF1(pUVM);
     PDBGDIGGERLINUX pThis = (PDBGDIGGERLINUX)pvData;
     pThis->IDmesg.u32Magic = DBGFOSIDMESG_MAGIC;
     pThis->IDmesg.pfnQueryKernelLog = dbgDiggerLinuxIDmsg_QueryKernelLog;
diff --git a/src/VBox/Debugger/DBGPlugInOS2.cpp b/src/VBox/Debugger/DBGPlugInOS2.cpp
index dd1bd5c..f0bc432 100644
--- a/src/VBox/Debugger/DBGPlugInOS2.cpp
+++ b/src/VBox/Debugger/DBGPlugInOS2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -19,7 +19,7 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
-#define LOG_GROUP LOG_GROUP_DBGF ///@todo add new log group.
+#define LOG_GROUP LOG_GROUP_DBGF /// @todo add new log group.
 #include "DBGPlugIns.h"
 #include <VBox/vmm/dbgf.h>
 #include <VBox/err.h>
@@ -88,11 +88,8 @@ typedef DBGDIGGEROS2 *PDBGDIGGEROS2;
 static DECLCALLBACK(int)  dbgDiggerOS2Init(PUVM pUVM, void *pvData);
 
 
-/*********************************************************************************************************************************
-*   Global Variables                                                                                                             *
-*********************************************************************************************************************************/
-
 
+#if 0 /* unused */
 /**
  * Process a PE image found in guest memory.
  *
@@ -109,10 +106,12 @@ static void dbgDiggerOS2ProcessImage(PDBGDIGGEROS2 pThis, PUVM pUVM, const char
                                      PCDBGFADDRESS pImageAddr, uint32_t cbImage,
                                      uint8_t *pbBuf, size_t cbBuf)
 {
+    RT_NOREF7(pThis, pUVM, pszName, pImageAddr, cbImage, pbBuf, cbBuf);
     LogFlow(("DigOS2: %RGp %#x %s\n", pImageAddr->FlatPtr, cbImage, pszName));
 
     /* To be implemented.*/
 }
+#endif
 
 
 /**
@@ -120,6 +119,7 @@ static void dbgDiggerOS2ProcessImage(PDBGDIGGEROS2 pThis, PUVM pUVM, const char
  */
 static DECLCALLBACK(void *) dbgDiggerOS2QueryInterface(PUVM pUVM, void *pvData, DBGFOSINTERFACE enmIf)
 {
+    RT_NOREF3(pUVM, pvData, enmIf);
     return NULL;
 }
 
@@ -129,6 +129,7 @@ static DECLCALLBACK(void *) dbgDiggerOS2QueryInterface(PUVM pUVM, void *pvData,
  */
 static DECLCALLBACK(int)  dbgDiggerOS2QueryVersion(PUVM pUVM, void *pvData, char *pszVersion, size_t cchVersion)
 {
+    RT_NOREF1(pUVM);
     PDBGDIGGEROS2 pThis = (PDBGDIGGEROS2)pvData;
     Assert(pThis->fValid);
     char *achOS2ProductType[32];
@@ -173,6 +174,7 @@ static DECLCALLBACK(int)  dbgDiggerOS2QueryVersion(PUVM pUVM, void *pvData, char
  */
 static DECLCALLBACK(void)  dbgDiggerOS2Term(PUVM pUVM, void *pvData)
 {
+    RT_NOREF1(pUVM);
     PDBGDIGGEROS2 pThis = (PDBGDIGGEROS2)pvData;
     Assert(pThis->fValid);
 
@@ -320,7 +322,7 @@ static DECLCALLBACK(bool)  dbgDiggerOS2Probe(PUVM pUVM, void *pvData)
  */
 static DECLCALLBACK(void)  dbgDiggerOS2Destruct(PUVM pUVM, void *pvData)
 {
-
+    RT_NOREF2(pUVM, pvData);
 }
 
 
@@ -329,6 +331,7 @@ static DECLCALLBACK(void)  dbgDiggerOS2Destruct(PUVM pUVM, void *pvData)
  */
 static DECLCALLBACK(int)  dbgDiggerOS2Construct(PUVM pUVM, void *pvData)
 {
+    RT_NOREF1(pUVM);
     PDBGDIGGEROS2 pThis = (PDBGDIGGEROS2)pvData;
     pThis->fValid = false;
     pThis->f32Bit = false;
diff --git a/src/VBox/Debugger/DBGPlugInSolaris.cpp b/src/VBox/Debugger/DBGPlugInSolaris.cpp
index 54b4166..c083ddb 100644
--- a/src/VBox/Debugger/DBGPlugInSolaris.cpp
+++ b/src/VBox/Debugger/DBGPlugInSolaris.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -19,7 +19,7 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
-#define LOG_GROUP LOG_GROUP_DBGF ///@todo add new log group.
+#define LOG_GROUP LOG_GROUP_DBGF /// @todo add new log group.
 #include "DBGPlugIns.h"
 #include "DBGPlugInCommonELF.h"
 #include <VBox/vmm/dbgf.h>
@@ -358,6 +358,7 @@ static DECLCALLBACK(int)  dbgDiggerSolarisInit(PUVM pUVM, void *pvData);
  */
 static DECLCALLBACK(void *) dbgDiggerSolarisQueryInterface(PUVM pUVM, void *pvData, DBGFOSINTERFACE enmIf)
 {
+    RT_NOREF3(pUVM, pvData, enmIf);
     return NULL;
 }
 
@@ -373,8 +374,9 @@ static DECLCALLBACK(int)  dbgDiggerSolarisQueryVersion(PUVM pUVM, void *pvData,
     /*
      * It's all in the utsname symbol...
      */
-    DBGFADDRESS Addr;
     SOL_utsname_t UtsName;
+    RT_ZERO(UtsName);                   /* Make MSC happy. */
+    DBGFADDRESS Addr;
     RTDBGSYMBOL SymUtsName;
     int rc = DBGFR3AsSymbolByName(pUVM, DBGF_AS_KERNEL, "utsname", &SymUtsName, NULL);
     if (RT_SUCCESS(rc))
@@ -428,6 +430,8 @@ static DECLCALLBACK(int)  dbgDiggerSolarisQueryVersion(PUVM pUVM, void *pvData,
  */
 static void dbgDiggerSolarisProcessModCtl32(PUVM pUVM, PDBGDIGGERSOLARIS pThis, SOL_modctl_t const *pModCtl)
 {
+    RT_NOREF1(pThis);
+
     /* skip it if it's not loaded and installed */
     AssertCompile2MemberOffsets(SOL_modctl_t, v11_32.mod_loaded,    v9_32.mod_loaded);
     AssertCompile2MemberOffsets(SOL_modctl_t, v11_32.mod_installed, v9_32.mod_installed);
@@ -575,6 +579,8 @@ static void dbgDiggerSolarisProcessModCtl32(PUVM pUVM, PDBGDIGGERSOLARIS pThis,
  */
 static void dbgDiggerSolarisProcessModCtl64(PUVM pUVM, PDBGDIGGERSOLARIS pThis, SOL_modctl_t const *pModCtl)
 {
+    RT_NOREF1(pThis);
+
     /* skip it if it's not loaded and installed */
     AssertCompile2MemberOffsets(SOL_modctl_t, v11_64.mod_loaded,    v9_64.mod_loaded);
     AssertCompile2MemberOffsets(SOL_modctl_t, v11_64.mod_installed, v9_64.mod_installed);
@@ -717,6 +723,7 @@ static void dbgDiggerSolarisProcessModCtl64(PUVM pUVM, PDBGDIGGERSOLARIS pThis,
  */
 static DECLCALLBACK(void)  dbgDiggerSolarisTerm(PUVM pUVM, void *pvData)
 {
+    RT_NOREF1(pUVM);
     PDBGDIGGERSOLARIS pThis = (PDBGDIGGERSOLARIS)pvData;
     Assert(pThis->fValid);
 
@@ -1086,6 +1093,7 @@ static DECLCALLBACK(bool)  dbgDiggerSolarisProbe(PUVM pUVM, void *pvData)
  */
 static DECLCALLBACK(void)  dbgDiggerSolarisDestruct(PUVM pUVM, void *pvData)
 {
+    RT_NOREF2(pUVM, pvData);
 
 }
 
@@ -1095,6 +1103,7 @@ static DECLCALLBACK(void)  dbgDiggerSolarisDestruct(PUVM pUVM, void *pvData)
  */
 static DECLCALLBACK(int)  dbgDiggerSolarisConstruct(PUVM pUVM, void *pvData)
 {
+    RT_NOREF2(pUVM, pvData);
     return VINF_SUCCESS;
 }
 
diff --git a/src/VBox/Debugger/DBGPlugInWinNt.cpp b/src/VBox/Debugger/DBGPlugInWinNt.cpp
index e624e8c..c4858bb 100644
--- a/src/VBox/Debugger/DBGPlugInWinNt.cpp
+++ b/src/VBox/Debugger/DBGPlugInWinNt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -19,7 +19,7 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
-#define LOG_GROUP LOG_GROUP_DBGF ///@todo add new log group.
+#define LOG_GROUP LOG_GROUP_DBGF /// @todo add new log group.
 #include "DBGPlugIns.h"
 #include <VBox/vmm/dbgf.h>
 #include <VBox/err.h>
@@ -722,6 +722,7 @@ static void dbgDiggerWinNtProcessImage(PDBGDIGGERWINNT pThis, PUVM pUVM, const c
  */
 static DECLCALLBACK(void *) dbgDiggerWinNtQueryInterface(PUVM pUVM, void *pvData, DBGFOSINTERFACE enmIf)
 {
+    RT_NOREF3(pUVM, pvData, enmIf);
     return NULL;
 }
 
@@ -731,6 +732,7 @@ static DECLCALLBACK(void *) dbgDiggerWinNtQueryInterface(PUVM pUVM, void *pvData
  */
 static DECLCALLBACK(int)  dbgDiggerWinNtQueryVersion(PUVM pUVM, void *pvData, char *pszVersion, size_t cchVersion)
 {
+    RT_NOREF1(pUVM);
     PDBGDIGGERWINNT pThis = (PDBGDIGGERWINNT)pvData;
     Assert(pThis->fValid);
     const char *pszNtProductType;
@@ -752,6 +754,7 @@ static DECLCALLBACK(int)  dbgDiggerWinNtQueryVersion(PUVM pUVM, void *pvData, ch
  */
 static DECLCALLBACK(void)  dbgDiggerWinNtTerm(PUVM pUVM, void *pvData)
 {
+    RT_NOREF1(pUVM);
     PDBGDIGGERWINNT pThis = (PDBGDIGGERWINNT)pvData;
     Assert(pThis->fValid);
 
@@ -1145,7 +1148,7 @@ static DECLCALLBACK(bool)  dbgDiggerWinNtProbe(PUVM pUVM, void *pvData)
  */
 static DECLCALLBACK(void)  dbgDiggerWinNtDestruct(PUVM pUVM, void *pvData)
 {
-
+    RT_NOREF2(pUVM, pvData);
 }
 
 
@@ -1154,6 +1157,7 @@ static DECLCALLBACK(void)  dbgDiggerWinNtDestruct(PUVM pUVM, void *pvData)
  */
 static DECLCALLBACK(int)  dbgDiggerWinNtConstruct(PUVM pUVM, void *pvData)
 {
+    RT_NOREF1(pUVM);
     PDBGDIGGERWINNT pThis = (PDBGDIGGERWINNT)pvData;
     pThis->fValid = false;
     pThis->f32Bit = false;
diff --git a/src/VBox/Debugger/DBGPlugIns.h b/src/VBox/Debugger/DBGPlugIns.h
index 61bc972..a6ff9f5 100644
--- a/src/VBox/Debugger/DBGPlugIns.h
+++ b/src/VBox/Debugger/DBGPlugIns.h
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Debugger/Makefile.kmk b/src/VBox/Debugger/Makefile.kmk
index 544a536..e5d1dbd 100644
--- a/src/VBox/Debugger/Makefile.kmk
+++ b/src/VBox/Debugger/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Debugger/VBoxDbg.cpp b/src/VBox/Debugger/VBoxDbg.cpp
index 9448e61..bb01f4e 100644
--- a/src/VBox/Debugger/VBoxDbg.cpp
+++ b/src/VBox/Debugger/VBoxDbg.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Debugger/VBoxDbgBase.cpp b/src/VBox/Debugger/VBoxDbgBase.cpp
index ca5e502..344b96a 100644
--- a/src/VBox/Debugger/VBoxDbgBase.cpp
+++ b/src/VBox/Debugger/VBoxDbgBase.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -35,6 +35,8 @@
 VBoxDbgBase::VBoxDbgBase(VBoxDbgGui *a_pDbgGui)
     : m_pDbgGui(a_pDbgGui), m_pUVM(NULL), m_hGUIThread(RTThreadNativeSelf())
 {
+    NOREF(m_pDbgGui); /* shut up warning. */
+
     /*
      * Register
      */
diff --git a/src/VBox/Debugger/VBoxDbgBase.h b/src/VBox/Debugger/VBoxDbgBase.h
index 9f22899..042fe57 100644
--- a/src/VBox/Debugger/VBoxDbgBase.h
+++ b/src/VBox/Debugger/VBoxDbgBase.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Debugger/VBoxDbgConsole.cpp b/src/VBox/Debugger/VBoxDbgConsole.cpp
index ac60cd9..b3df51a 100644
--- a/src/VBox/Debugger/VBoxDbgConsole.cpp
+++ b/src/VBox/Debugger/VBoxDbgConsole.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -291,7 +291,7 @@ VBoxDbgConsoleInput::returnPressed()
     Assert(m_hGUIThread == RTThreadNativeSelf());
 
     QString strCommand = currentText();
-    /* TODO: trim whitespace? */
+    /** @todo trim whitespace? */
     if (strCommand.isEmpty())
         return;
 
diff --git a/src/VBox/Debugger/VBoxDbgConsole.h b/src/VBox/Debugger/VBoxDbgConsole.h
index 9915605..5820adb 100644
--- a/src/VBox/Debugger/VBoxDbgConsole.h
+++ b/src/VBox/Debugger/VBoxDbgConsole.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Debugger/VBoxDbgDisas.h b/src/VBox/Debugger/VBoxDbgDisas.h
index aa8cd54..7031899 100644
--- a/src/VBox/Debugger/VBoxDbgDisas.h
+++ b/src/VBox/Debugger/VBoxDbgDisas.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Debugger/VBoxDbgGui.cpp b/src/VBox/Debugger/VBoxDbgGui.cpp
index 5ddaff5..0781963 100644
--- a/src/VBox/Debugger/VBoxDbgGui.cpp
+++ b/src/VBox/Debugger/VBoxDbgGui.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Debugger/VBoxDbgGui.h b/src/VBox/Debugger/VBoxDbgGui.h
index c202a20..a1a0a99 100644
--- a/src/VBox/Debugger/VBoxDbgGui.h
+++ b/src/VBox/Debugger/VBoxDbgGui.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Debugger/VBoxDbgStatsQt4.cpp b/src/VBox/Debugger/VBoxDbgStatsQt4.cpp
index 033436d..05f3582 100644
--- a/src/VBox/Debugger/VBoxDbgStatsQt4.cpp
+++ b/src/VBox/Debugger/VBoxDbgStatsQt4.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Debugger/VBoxDbgStatsQt4.h b/src/VBox/Debugger/VBoxDbgStatsQt4.h
index cbbb863..57659e0 100644
--- a/src/VBox/Debugger/VBoxDbgStatsQt4.h
+++ b/src/VBox/Debugger/VBoxDbgStatsQt4.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Debugger/testcase/tstDBGCParser.cpp b/src/VBox/Debugger/testcase/tstDBGCParser.cpp
index 745ab66..b0b24f3 100644
--- a/src/VBox/Debugger/testcase/tstDBGCParser.cpp
+++ b/src/VBox/Debugger/testcase/tstDBGCParser.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Debugger/testcase/tstDBGCStubs.cpp b/src/VBox/Debugger/testcase/tstDBGCStubs.cpp
index 8472ba9..33e32ec 100644
--- a/src/VBox/Debugger/testcase/tstDBGCStubs.cpp
+++ b/src/VBox/Debugger/testcase/tstDBGCStubs.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Debugger/testcase/tstVBoxDbg.cpp b/src/VBox/Debugger/testcase/tstVBoxDbg.cpp
index 21cd4b2..107ea80 100644
--- a/src/VBox/Debugger/testcase/tstVBoxDbg.cpp
+++ b/src/VBox/Debugger/testcase/tstVBoxDbg.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Audio/AudioMixBuffer.cpp b/src/VBox/Devices/Audio/AudioMixBuffer.cpp
index b9a3611..998447c 100644
--- a/src/VBox/Devices/Audio/AudioMixBuffer.cpp
+++ b/src/VBox/Devices/Audio/AudioMixBuffer.cpp
@@ -60,7 +60,9 @@
 # define AUDMIXBUF_LOG(x) RTPrintf x
 #endif
 
+#ifdef DEBUG
 DECLINLINE(void) audioMixBufDbgPrintInternal(PPDMAUDIOMIXBUF pMixBuf);
+#endif
 
 /*
  *   Soft Volume Control
@@ -575,16 +577,20 @@ AUDMIXBUF_CONVERT(U32 /* Name */, uint32_t, 0         /* Min */, UINT32_MAX /* M
 
 /* audioMixBufOpAssign: Assigns values from source buffer to destination bufffer, overwriting the destination. */
 AUDMIXBUF_MIXOP(Assign /* Name */,  = /* Operation */)
+#if 0 /* unused */
 /* audioMixBufOpBlend: Blends together the values from both, the source and the destination buffer. */
 AUDMIXBUF_MIXOP(Blend  /* Name */, += /* Operation */)
+#endif
 
 #undef AUDMIXBUF_MIXOP
 #undef AUDMIXBUF_MACRO_LOG
 
 /** Dummy conversion used when the source is muted. */
-static DECLCALLBACK(uint32_t) audioMixBufConvFromSilence(PPDMAUDIOSAMPLE paDst, const void *pvSrc,
-                                                         uint32_t cbSrc, PCPDMAUDMIXBUFCONVOPTS pOpts)
+static DECLCALLBACK(uint32_t)
+audioMixBufConvFromSilence(PPDMAUDIOSAMPLE paDst, const void *pvSrc, uint32_t cbSrc, PCPDMAUDMIXBUFCONVOPTS pOpts)
 {
+    RT_NOREF(cbSrc, pvSrc);
+
     /* Internally zero always corresponds to silence. */
     RT_BZERO(paDst, pOpts->cSamples * sizeof(paDst[0]));
     return pOpts->cSamples;
@@ -647,8 +653,7 @@ static PFNPDMAUDIOMIXBUFCONVFROM audioMixBufConvFromLookup(PDMAUDIOMIXBUFFMT enm
             }
         }
     }
-
-    return NULL;
+    /* not reached */
 }
 
 /**
@@ -708,8 +713,7 @@ static PFNPDMAUDIOMIXBUFCONVTO audioMixBufConvToLookup(PDMAUDIOMIXBUFFMT enmFmt)
             }
         }
     }
-
-    return NULL;
+    /* not reached */
 }
 
 /**
@@ -745,7 +749,7 @@ static int audioMixBufConvVol(PPDMAUDMIXBUFVOL pVolDst, PPDMAUDIOVOLUME pVolSrc)
  * @param   pProps                  PCM audio properties to use for the mixing buffer.
  * @param   cSamples                Maximum number of audio samples the mixing buffer can hold.
  */
-int AudioMixBufInit(PPDMAUDIOMIXBUF pMixBuf, const char *pszName, PPDMPCMPROPS pProps, uint32_t cSamples)
+int AudioMixBufInit(PPDMAUDIOMIXBUF pMixBuf, const char *pszName, PPDMAUDIOPCMPROPS pProps, uint32_t cSamples)
 {
     AssertPtrReturn(pMixBuf, VERR_INVALID_POINTER);
     AssertPtrReturn(pszName, VERR_INVALID_POINTER);
@@ -1018,7 +1022,7 @@ static int audioMixBufMixTo(PPDMAUDIOMIXBUF pDst, PPDMAUDIOMIXBUF pSrc, uint32_t
     audioMixBufDbgPrintInternal(pDst);
 #endif
 
-    uint32_t cSrcToRead;
+    uint32_t cSrcToRead = 0;
     uint32_t cSrcRead;
 
     uint32_t cDstToWrite;
@@ -1136,6 +1140,7 @@ int AudioMixBufMixToParent(PPDMAUDIOMIXBUF pMixBuf, uint32_t cSamples,
 }
 
 #ifdef DEBUG
+
 /**
  * Prints a single mixing buffer.
  * Internal helper function for debugging. Do not use directly.
@@ -1242,7 +1247,8 @@ void AudioMixBufDbgPrint(PPDMAUDIOMIXBUF pMixBuf)
 {
     audioMixBufDbgPrintInternal(pMixBuf);
 }
-#endif
+
+#endif /* DEBUG */
 
 /**
  * Returns the total number of samples used.
@@ -1361,11 +1367,9 @@ int AudioMixBufReadAtEx(PPDMAUDIOMIXBUF pMixBuf, PDMAUDIOMIXBUFFMT enmFmt,
  * @param   cbBuf                   Size (in bytes) of buffer to write to.
  * @param   pcRead                  Number of audio samples read. Optional.
  */
-int AudioMixBufReadCirc(PPDMAUDIOMIXBUF pMixBuf,
-                        void *pvBuf, uint32_t cbBuf, uint32_t *pcRead)
+int AudioMixBufReadCirc(PPDMAUDIOMIXBUF pMixBuf, void *pvBuf, uint32_t cbBuf, uint32_t *pcRead)
 {
-    return AudioMixBufReadCircEx(pMixBuf, pMixBuf->AudioFmt,
-                                 pvBuf, cbBuf, pcRead);
+    return AudioMixBufReadCircEx(pMixBuf, pMixBuf->AudioFmt, pvBuf, cbBuf, pcRead);
 }
 
 /**
@@ -1380,8 +1384,7 @@ int AudioMixBufReadCirc(PPDMAUDIOMIXBUF pMixBuf,
  * @param   cbBuf                   Size (in bytes) of buffer to write to.
  * @param   pcRead                  Number of audio samples read. Optional.
  */
-int AudioMixBufReadCircEx(PPDMAUDIOMIXBUF pMixBuf, PDMAUDIOMIXBUFFMT enmFmt,
-                          void *pvBuf, uint32_t cbBuf, uint32_t *pcRead)
+int AudioMixBufReadCircEx(PPDMAUDIOMIXBUF pMixBuf, PDMAUDIOMIXBUFFMT enmFmt, void *pvBuf, uint32_t cbBuf, uint32_t *pcRead)
 {
     AssertPtrReturn(pMixBuf, VERR_INVALID_POINTER);
     AssertPtrReturn(pvBuf, VERR_INVALID_POINTER);
@@ -1783,7 +1786,7 @@ int AudioMixBufWriteCircEx(PPDMAUDIOMIXBUF pMixBuf, PDMAUDIOMIXBUFFMT enmFmt,
 
     PPDMAUDIOMIXBUF pParent = pMixBuf->pParent;
 
-    AUDMIXBUF_LOG(("%s: enmFmt=%ld, pvBuf=%p, cbBuf=%RU32 (%RU32 samples)\n",
+    AUDMIXBUF_LOG(("%s: enmFmt=%d, pvBuf=%p, cbBuf=%RU32 (%RU32 samples)\n",
                    pMixBuf->pszName, enmFmt, pvBuf, cbBuf, AUDIOMIXBUF_B2S(pMixBuf, cbBuf)));
 
     if (   pParent
diff --git a/src/VBox/Devices/Audio/AudioMixBuffer.h b/src/VBox/Devices/Audio/AudioMixBuffer.h
index 096f422..4f1a244 100644
--- a/src/VBox/Devices/Audio/AudioMixBuffer.h
+++ b/src/VBox/Devices/Audio/AudioMixBuffer.h
@@ -1,7 +1,6 @@
 /* $Id: AudioMixBuffer.h $ */
 /** @file
- * VBox audio: Mixing buffer to convert audio samples to/from different
- *             rates / formats.
+ * VBox audio - Mixing buffer to convert audio samples to/from different rates / formats.
  */
 
 /*
@@ -56,7 +55,7 @@ void AudioMixBufDestroy(PPDMAUDIOMIXBUF pMixBuf);
 void AudioMixBufFinish(PPDMAUDIOMIXBUF pMixBuf, uint32_t cSamplesToClear);
 uint32_t AudioMixBufFree(PPDMAUDIOMIXBUF pMixBuf);
 uint32_t AudioMixBufFreeBytes(PPDMAUDIOMIXBUF pMixBuf);
-int AudioMixBufInit(PPDMAUDIOMIXBUF pMixBuf, const char *pszName, PPDMPCMPROPS pProps, uint32_t cSamples);
+int AudioMixBufInit(PPDMAUDIOMIXBUF pMixBuf, const char *pszName, PPDMAUDIOPCMPROPS pProps, uint32_t cSamples);
 bool AudioMixBufIsEmpty(PPDMAUDIOMIXBUF pMixBuf);
 int AudioMixBufLinkTo(PPDMAUDIOMIXBUF pMixBuf, PPDMAUDIOMIXBUF pParent);
 uint32_t AudioMixBufLive(PPDMAUDIOMIXBUF pMixBuf);
@@ -81,5 +80,5 @@ void AudioMixBufDbgPrint(PPDMAUDIOMIXBUF pMixBuf);
 void AudioMixBufDbgPrintChain(PPDMAUDIOMIXBUF pMixBuf);
 #endif
 
-#endif /* AUDIO_MIXBUF_H */
+#endif
 
diff --git a/src/VBox/Devices/Audio/AudioMixer.cpp b/src/VBox/Devices/Audio/AudioMixer.cpp
index 2fc2282..120184b 100644
--- a/src/VBox/Devices/Audio/AudioMixer.cpp
+++ b/src/VBox/Devices/Audio/AudioMixer.cpp
@@ -60,6 +60,15 @@ static int audioMixerSinkUpdateInternal(PAUDMIXSINK pSink);
 static void audioMixerStreamDestroyInternal(PAUDMIXSTREAM pStream);
 
 
+/**
+ * Creates an audio sink and attaches it to the given mixer.
+ *
+ * @returns IPRT status code.
+ * @param   pMixer              Mixer to attach created sink to.
+ * @param   pszName             Name of the sink to create.
+ * @param   enmDir              Direction of the sink to create.
+ * @param   ppSink              Pointer which returns the created sink on success.
+ */
 int AudioMixerCreateSink(PAUDIOMIXER pMixer, const char *pszName, AUDMIXSINKDIR enmDir, PAUDMIXSINK *ppSink)
 {
     AssertPtrReturn(pMixer, VERR_INVALID_POINTER);
@@ -109,10 +118,19 @@ int AudioMixerCreateSink(PAUDIOMIXER pMixer, const char *pszName, AUDMIXSINKDIR
     return rc;
 }
 
-int AudioMixerCreate(const char *pszName, uint32_t uFlags, PAUDIOMIXER *ppMixer)
+/**
+ * Creates an audio mixer.
+ *
+ * @returns IPRT status code.
+ * @param   pszName             Name of the audio mixer.
+ * @param   fFlags              Creation flags. Not used at the moment and must be 0.
+ * @param   ppMixer             Pointer which returns the created mixer object.
+ */
+int AudioMixerCreate(const char *pszName, uint32_t fFlags, PAUDIOMIXER *ppMixer)
 {
+    RT_NOREF(fFlags);
     AssertPtrReturn(pszName, VERR_INVALID_POINTER);
-    /** @todo Add flag validation. */
+    /** @todo Add fFlags validation. */
     AssertPtrReturn(ppMixer, VERR_INVALID_POINTER);
 
     int rc = VINF_SUCCESS;
@@ -148,8 +166,17 @@ int AudioMixerCreate(const char *pszName, uint32_t uFlags, PAUDIOMIXER *ppMixer)
     return rc;
 }
 
+/**
+ * Helper function for the internal debugger to print the mixer's current
+ * state, along with the attached sinks.
+ *
+ * @param   pMixer              Mixer to print debug output for.
+ * @param   pHlp                Debug info helper to use.
+ * @param   pszArgs             Optional arguments. Not being used at the moment.
+ */
 void AudioMixerDebug(PAUDIOMIXER pMixer, PCDBGFINFOHLP pHlp, const char *pszArgs)
 {
+    RT_NOREF(pszArgs);
     PAUDMIXSINK pSink;
     unsigned    iSink = 0;
 
@@ -164,6 +191,11 @@ void AudioMixerDebug(PAUDIOMIXER pMixer, PCDBGFINFOHLP pHlp, const char *pszArgs
     }
 }
 
+/**
+ * Destroys an audio mixer.
+ *
+ * @param   pMixer              Audio mixer to destroy.
+ */
 void AudioMixerDestroy(PAUDIOMIXER pMixer)
 {
     if (!pMixer)
@@ -194,17 +226,12 @@ void AudioMixerDestroy(PAUDIOMIXER pMixer)
     pMixer = NULL;
 }
 
-int AudioMixerGetDeviceFormat(PAUDIOMIXER pMixer, PPDMAUDIOSTREAMCFG pCfg)
-{
-    AssertPtrReturn(pMixer, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg,   VERR_INVALID_POINTER);
-
-    /** @todo Perform a deep copy, if needed. */
-    *pCfg = pMixer->devFmt;
-
-    return VINF_SUCCESS;
-}
-
+/**
+ * Invalidates all internal data, internal version.
+ *
+ * @returns IPRT status code.
+ * @param   pMixer              Mixer to invalidate data for.
+ */
 int audioMixerInvalidateInternal(PAUDIOMIXER pMixer)
 {
     AssertPtrReturn(pMixer, VERR_INVALID_POINTER);
@@ -222,6 +249,12 @@ int audioMixerInvalidateInternal(PAUDIOMIXER pMixer)
     return VINF_SUCCESS;
 }
 
+/**
+ * Invalidates all internal data.
+ *
+ * @returns IPRT status code.
+ * @param   pMixer              Mixer to invalidate data for.
+ */
 void AudioMixerInvalidate(PAUDIOMIXER pMixer)
 {
     AssertPtrReturnVoid(pMixer);
@@ -232,6 +265,13 @@ void AudioMixerInvalidate(PAUDIOMIXER pMixer)
     AssertRC(rc2);
 }
 
+/**
+ * Removes a formerly attached audio sink for an audio mixer, internal version.
+ *
+ * @returns IPRT status code.
+ * @param   pMixer              Mixer to remove sink from.
+ * @param   pSink               Sink to remove.
+ */
 static int audioMixerRemoveSinkInternal(PAUDIOMIXER pMixer, PAUDMIXSINK pSink)
 {
     AssertPtrReturn(pMixer, VERR_INVALID_POINTER);
@@ -255,29 +295,26 @@ static int audioMixerRemoveSinkInternal(PAUDIOMIXER pMixer, PAUDMIXSINK pSink)
     return VINF_SUCCESS;
 }
 
+/**
+ * Removes a formerly attached audio sink for an audio mixer.
+ *
+ * @returns IPRT status code.
+ * @param   pMixer              Mixer to remove sink from.
+ * @param   pSink               Sink to remove.
+ */
+
 void AudioMixerRemoveSink(PAUDIOMIXER pMixer, PAUDMIXSINK pSink)
 {
     audioMixerSinkRemoveAllStreamsInternal(pSink);
     audioMixerRemoveSinkInternal(pMixer, pSink);
 }
 
-int AudioMixerSetDeviceFormat(PAUDIOMIXER pMixer, PPDMAUDIOSTREAMCFG pCfg)
-{
-    AssertPtrReturn(pMixer, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
-
-    /** @todo Perform a deep copy, if needed. */
-    pMixer->devFmt = *pCfg;
-
-    return VINF_SUCCESS;
-}
-
 /**
  * Sets the mixer's master volume.
  *
  * @returns IPRT status code.
- * @param   pMixer          Mixer to set master volume for.
- * @param   pVol            Volume to set.
+ * @param   pMixer              Mixer to set master volume for.
+ * @param   pVol                Volume to set.
  */
 int AudioMixerSetMasterVolume(PAUDIOMIXER pMixer, PPDMAUDIOVOLUME pVol)
 {
@@ -297,6 +334,13 @@ int AudioMixerSetMasterVolume(PAUDIOMIXER pMixer, PPDMAUDIOVOLUME pVol)
  * Mixer Sink implementation.
  ********************************************************************************************************************************/
 
+/**
+ * Adds an audio stream to a specific audio sink.
+ *
+ * @returns IPRT status code.
+ * @param   pSink               Sink to add audio stream to.
+ * @param   pStream             Stream to add.
+ */
 int AudioMixerSinkAddStream(PAUDMIXSINK pSink, PAUDMIXSTREAM pStream)
 {
     AssertPtrReturn(pSink,   VERR_INVALID_POINTER);
@@ -339,7 +383,7 @@ int AudioMixerSinkAddStream(PAUDMIXSINK pSink, PAUDMIXSTREAM pStream)
 #endif /* VBOX_AUDIO_MIXER_WITH_MIXBUF */
         }
         else
-            rc = VERR_WRONG_TYPE;
+            AssertFailedStmt(rc = VERR_WRONG_TYPE);
     }
     else if (pStream->enmDir == PDMAUDIODIR_OUT)
     {
@@ -354,7 +398,7 @@ int AudioMixerSinkAddStream(PAUDMIXSINK pSink, PAUDMIXSTREAM pStream)
 #endif /* VBOX_AUDIO_MIXER_WITH_MIXBUF */
         }
         else
-            rc = VERR_WRONG_TYPE;
+            AssertFailedStmt(rc = VERR_WRONG_TYPE);
     }
     else
         AssertFailedStmt(rc = VERR_NOT_IMPLEMENTED);
@@ -383,12 +427,22 @@ int AudioMixerSinkAddStream(PAUDMIXSINK pSink, PAUDMIXSTREAM pStream)
     return rc;
 }
 
+/**
+ * Creates an audio mixer stream.
+ *
+ * @returns IPRT status code.
+ * @param   pSink               Sink to use for creating the stream.
+ * @param   pConn               Audio connector interface to use.
+ * @param   pCfg                Audio stream configuration to use.
+ * @param   fFlags              Stream creation flags. Currently unused, set to 0.
+ * @param   ppStream            Pointer which receives the the newly created audio stream.
+ */
 int AudioMixerSinkCreateStream(PAUDMIXSINK pSink,
                                PPDMIAUDIOCONNECTOR pConn, PPDMAUDIOSTREAMCFG pCfg, uint32_t fFlags, PAUDMIXSTREAM *ppStream)
 {
-    AssertPtrReturn(pSink,  VERR_INVALID_POINTER);
-    AssertPtrReturn(pConn,  VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg,   VERR_INVALID_POINTER);
+    AssertPtrReturn(pSink, VERR_INVALID_POINTER);
+    AssertPtrReturn(pConn, VERR_INVALID_POINTER);
+    AssertPtrReturn(pCfg,  VERR_INVALID_POINTER);
     /** @todo Validate fFlags. */
     /* ppStream is optional. */
 
@@ -403,7 +457,7 @@ int AudioMixerSinkCreateStream(PAUDMIXSINK pSink,
         return VERR_NO_MEMORY;
     }
 
-    LogFlowFunc(("[%s]: fFlags=0x%x (enmDir=%ld, %s, %RU8 channels, %RU32Hz)\n",
+    LogFlowFunc(("[%s]: fFlags=0x%x (enmDir=%d, %s, %RU8 channels, %RU32Hz)\n",
                  pSink->pszName, fFlags, pCfg->enmDir, DrvAudioHlpAudFmtToStr(pCfg->enmFormat), pCfg->cChannels, pCfg->uHz));
 
     /*
@@ -438,7 +492,7 @@ int AudioMixerSinkCreateStream(PAUDMIXSINK pSink,
 
         /* Increase the stream's reference count to let others know
          * we're reyling on it to be around now. */
-        pConn->pfnStreamAddRef(pConn, pStream);
+        pConn->pfnStreamRetain(pConn, pStream);
     }
 
     if (RT_SUCCESS(rc))
@@ -464,6 +518,13 @@ int AudioMixerSinkCreateStream(PAUDMIXSINK pSink,
     return rc;
 }
 
+/**
+ * Static helper function to translate a sink command
+ * to a PDM audio stream command.
+ *
+ * @returns PDM audio stream command, or PDMAUDIOSTREAMCMD_UNKNOWN if not found.
+ * @param   enmCmd              Mixer sink command to translate.
+ */
 static PDMAUDIOSTREAMCMD audioMixerSinkToStreamCmd(AUDMIXSINKCMD enmCmd)
 {
     switch (enmCmd)
@@ -475,10 +536,17 @@ static PDMAUDIOSTREAMCMD audioMixerSinkToStreamCmd(AUDMIXSINKCMD enmCmd)
         default:                     break;
     }
 
-    AssertMsgFailed(("Unsupported sink command %ld\n", enmCmd));
+    AssertMsgFailed(("Unsupported sink command %d\n", enmCmd));
     return PDMAUDIOSTREAMCMD_UNKNOWN;
 }
 
+/**
+ * Controls a mixer sink.
+ *
+ * @returns IPRT status code.
+ * @param   pSink               Mixer sink to control.
+ * @param   enmSinkCmd          Sink command to set.
+ */
 int AudioMixerSinkCtl(PAUDMIXSINK pSink, AUDMIXSINKCMD enmSinkCmd)
 {
     AssertPtrReturn(pSink, VERR_INVALID_POINTER);
@@ -513,10 +581,15 @@ int AudioMixerSinkCtl(PAUDMIXSINK pSink, AUDMIXSINKCMD enmSinkCmd)
     if (!(pSink->fStatus & AUDMIXSINK_STS_RUNNING))
         audioMixerSinkReset(pSink);
 
-    LogFlowFunc(("[%s]: enmCmd=%ld, fStatus=0x%x, rc=%Rrc\n", pSink->pszName, enmSinkCmd, pSink->fStatus, rc));
+    LogFlowFunc(("[%s]: enmCmd=%d, fStatus=0x%x, rc=%Rrc\n", pSink->pszName, enmSinkCmd, pSink->fStatus, rc));
     return rc;
 }
 
+/**
+ * Destroys a mixer sink and removes it from the attached mixer (if any).
+ *
+ * @param   pSink               Mixer sink to destroy.
+ */
 void AudioMixerSinkDestroy(PAUDMIXSINK pSink)
 {
     if (!pSink)
@@ -537,6 +610,11 @@ void AudioMixerSinkDestroy(PAUDMIXSINK pSink)
     audioMixerSinkDestroyInternal(pSink);
 }
 
+/**
+ * Destroys a mixer sink.
+ *
+ * @param   pSink               Mixer sink to destroy.
+ */
 static void audioMixerSinkDestroyInternal(PAUDMIXSINK pSink)
 {
     AssertPtrReturnVoid(pSink);
@@ -569,7 +647,7 @@ static void audioMixerSinkDestroyInternal(PAUDMIXSINK pSink)
  * to AudioMixerSinkUpdate().
  *
  * @returns Amount of bytes ready to be read from the sink.
- * @param   pSink           Sink to return number of available samples for.
+ * @param   pSink               Sink to return number of available samples for.
  */
 uint32_t AudioMixerSinkGetReadable(PAUDMIXSINK pSink)
 {
@@ -590,7 +668,7 @@ uint32_t AudioMixerSinkGetReadable(PAUDMIXSINK pSink)
  * to AudioMixerSinkUpdate().
  *
  * @returns Amount of bytes ready to be written to the sink.
- * @param   pSink           Sink to return number of available samples for.
+ * @param   pSink               Sink to return number of available samples for.
  */
 uint32_t AudioMixerSinkGetWritable(PAUDMIXSINK pSink)
 {
@@ -610,9 +688,7 @@ uint32_t AudioMixerSinkGetWritable(PAUDMIXSINK pSink)
  * Returns the sink's mixing direction.
  *
  * @returns Mixing direction.
- * @param   pSink           Sink to return direction for.
- *
- * @remark
+ * @param   pSink               Sink to return direction for.
  */
 AUDMIXSINKDIR AudioMixerSinkGetDir(PAUDMIXSINK pSink)
 {
@@ -620,6 +696,13 @@ AUDMIXSINKDIR AudioMixerSinkGetDir(PAUDMIXSINK pSink)
     return pSink->enmDir;
 }
 
+/**
+ * Returns a specific mixer stream from a sink, based on its index.
+ *
+ * @returns Mixer stream if found, or NULL if not found.
+ * @param   pSink               Sink to retrieve mixer stream from.
+ * @param   uIndex              Index of the mixer stream to return.
+ */
 PAUDMIXSTREAM AudioMixerSinkGetStream(PAUDMIXSINK pSink, uint8_t uIndex)
 {
     AssertPtrReturn(pSink, NULL);
@@ -638,6 +721,12 @@ PAUDMIXSTREAM AudioMixerSinkGetStream(PAUDMIXSINK pSink, uint8_t uIndex)
     return pStream;
 }
 
+/**
+ * Returns the current status of a mixer sink.
+ *
+ * @returns IPRT status code.
+ * @param   pSink               Mixer sink to return status for.
+ */
 AUDMIXSINKSTS AudioMixerSinkGetStatus(PAUDMIXSINK pSink)
 {
     if (!pSink)
@@ -649,6 +738,12 @@ AUDMIXSINKSTS AudioMixerSinkGetStatus(PAUDMIXSINK pSink)
     return pSink->fStatus;
 }
 
+/**
+ * Returns the number of attached mixer streams to a mixer sink.
+ *
+ * @returns IPRT status code.
+ * @param   pSink               Mixer sink to return number for.
+ */
 uint8_t AudioMixerSinkGetStreamCount(PAUDMIXSINK pSink)
 {
     if (!pSink)
@@ -657,8 +752,19 @@ uint8_t AudioMixerSinkGetStreamCount(PAUDMIXSINK pSink)
     return pSink->cStreams;
 }
 
+/**
+ * Reads audio data from a mixer sink.
+ *
+ * @returns IPRT status code.
+ * @param   pSink               Mixer sink to read data from.
+ * @param   enmOp               Mixer operation to use for reading the data.
+ * @param   pvBuf               Buffer where to store the read data.
+ * @param   cbBuf               Buffer size (in bytes) where to store the data.
+ * @param   pcbRead             Number of bytes read. Optional.
+ */
 int AudioMixerSinkRead(PAUDMIXSINK pSink, AUDMIXOP enmOp, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead)
 {
+    RT_NOREF(enmOp);
     AssertPtrReturn(pSink, VERR_INVALID_POINTER);
     AssertPtrReturn(pvBuf, VERR_INVALID_POINTER);
     AssertReturn(cbBuf,    VERR_INVALID_PARAMETER);
@@ -743,6 +849,13 @@ int AudioMixerSinkRead(PAUDMIXSINK pSink, AUDMIXOP enmOp, void *pvBuf, uint32_t
     return rc;
 }
 
+/**
+ * Removes a mixer stream from a mixer sink, internal version.
+ *
+ * @returns IPRT status code.
+ * @param   pSink               Sink to remove mixer stream from.
+ * @param   pStream             Stream to remove.
+ */
 static int audioMixerSinkRemoveStreamInternal(PAUDMIXSINK pSink, PAUDMIXSTREAM pStream)
 {
     AssertPtrReturn(pSink, VERR_INVALID_PARAMETER);
@@ -772,6 +885,12 @@ static int audioMixerSinkRemoveStreamInternal(PAUDMIXSINK pSink, PAUDMIXSTREAM p
     return VINF_SUCCESS;
 }
 
+/**
+ * Removes a mixer stream from a mixer sink.
+ *
+ * @param   pSink               Sink to remove mixer stream from.
+ * @param   pStream             Stream to remove.
+ */
 void AudioMixerSinkRemoveStream(PAUDMIXSINK pSink, PAUDMIXSTREAM pStream)
 {
     int rc = audioMixerSinkRemoveStreamInternal(pSink, pStream);
@@ -785,7 +904,7 @@ void AudioMixerSinkRemoveStream(PAUDMIXSINK pSink, PAUDMIXSTREAM pStream)
 /**
  * Removes all attached streams from a given sink.
  *
- * @param pSink         Sink to remove attached streams from.
+ * @param pSink                 Sink to remove attached streams from.
  */
 static void audioMixerSinkRemoveAllStreamsInternal(PAUDMIXSINK pSink)
 {
@@ -802,7 +921,7 @@ static void audioMixerSinkRemoveAllStreamsInternal(PAUDMIXSINK pSink)
 /**
  * Resets the sink's state.
  *
- * @param   pSink       Sink to reset.
+ * @param   pSink               Sink to reset.
  */
 static void audioMixerSinkReset(PAUDMIXSINK pSink)
 {
@@ -838,7 +957,7 @@ static void audioMixerSinkReset(PAUDMIXSINK pSink)
 /**
  * Removes all attached streams from a given sink.
  *
- * @param pSink         Sink to remove attached streams from.
+ * @param pSink                 Sink to remove attached streams from.
  */
 void AudioMixerSinkRemoveAllStreams(PAUDMIXSINK pSink)
 {
@@ -850,7 +969,14 @@ void AudioMixerSinkRemoveAllStreams(PAUDMIXSINK pSink)
     pSink->cStreams = 0;
 }
 
-int AudioMixerSinkSetFormat(PAUDMIXSINK pSink, PPDMPCMPROPS pPCMProps)
+/**
+ * Sets the audio format of a mixer sink.
+ *
+ * @returns IPRT status code.
+ * @param   pSink               Sink to set audio format for.
+ * @param   pPCMProps           Audio format (PCM properties) to set.
+ */
+int AudioMixerSinkSetFormat(PAUDMIXSINK pSink, PPDMAUDIOPCMPROPS pPCMProps)
 {
     AssertPtrReturn(pSink,     VERR_INVALID_POINTER);
     AssertPtrReturn(pPCMProps, VERR_INVALID_POINTER);
@@ -862,7 +988,7 @@ int AudioMixerSinkSetFormat(PAUDMIXSINK pSink, PPDMPCMPROPS pPCMProps)
         LogFlowFunc(("[%s]: Old format: %RU8 bit, %RU8 channels, %RU32Hz\n",
                      pSink->pszName, pSink->PCMProps.cBits, pSink->PCMProps.cChannels, pSink->PCMProps.uHz));
 
-    memcpy(&pSink->PCMProps, pPCMProps, sizeof(PDMPCMPROPS));
+    memcpy(&pSink->PCMProps, pPCMProps, sizeof(PDMAUDIOPCMPROPS));
 
     LogFlowFunc(("[%s]: New format %RU8 bit, %RU8 channels, %RU32Hz\n",
                  pSink->pszName, pSink->PCMProps.cBits, pSink->PCMProps.cChannels, pSink->PCMProps.uHz));
@@ -891,8 +1017,8 @@ int AudioMixerSinkSetFormat(PAUDMIXSINK pSink, PPDMPCMPROPS pPCMProps)
  * Set the volume of an individual sink.
  *
  * @returns IPRT status code.
- * @param   pSink           Sink to set volume for.
- * @param   pVol            Volume to set.
+ * @param   pSink               Sink to set volume for.
+ * @param   pVol                Volume to set.
  */
 int AudioMixerSinkSetVolume(PAUDMIXSINK pSink, PPDMAUDIOVOLUME pVol)
 {
@@ -908,6 +1034,12 @@ int AudioMixerSinkSetVolume(PAUDMIXSINK pSink, PPDMAUDIOVOLUME pVol)
     return audioMixerSinkUpdateVolume(pSink, &pSink->pParent->VolMaster);
 }
 
+/**
+ * Updates a mixer sink, internal version.
+ *
+ * @returns IPRT status code.
+ * @param   pSink               Mixer sink to update.
+ */
 static int audioMixerSinkUpdateInternal(PAUDMIXSINK pSink)
 {
     AssertPtrReturn(pSink, VERR_INVALID_POINTER);
@@ -950,7 +1082,6 @@ static int audioMixerSinkUpdateInternal(PAUDMIXSINK pSink)
         PPDMIAUDIOCONNECTOR pConn = pMixStream->pConn;
         AssertPtr(pConn);
 
-        uint32_t cPlayed   = 0;
         uint32_t cCaptured = 0;
 
         int rc2 = pConn->pfnStreamIterate(pConn, pStream);
@@ -1033,7 +1164,7 @@ static int audioMixerSinkUpdateInternal(PAUDMIXSINK pSink)
             }
         }
 
-        Log3Func(("\t%s: cPlayed=%RU32, cCaptured=%RU32\n", pMixStream->pStream->szName, cPlayed, cCaptured));
+        Log3Func(("\t%s: cCaptured=%RU32\n", pMixStream->pStream->szName, cCaptured));
     }
 
     /* All streams disabled and the sink is in pending disable mode? */
@@ -1052,6 +1183,12 @@ static int audioMixerSinkUpdateInternal(PAUDMIXSINK pSink)
     return rc;
 }
 
+/**
+ * Updates (invalidates) a mixer sink.
+ *
+ * @returns IPRT status code.
+ * @param   pSink               Mixer sink to update.
+ */
 int AudioMixerSinkUpdate(PAUDMIXSINK pSink)
 {
     AssertPtrReturn(pSink, VERR_INVALID_POINTER);
@@ -1068,6 +1205,13 @@ int AudioMixerSinkUpdate(PAUDMIXSINK pSink)
     return audioMixerSinkUpdateInternal(pSink);
 }
 
+/**
+ * Updates the (master) volume of a mixer sink.
+ *
+ * @returns IPRT status code.
+ * @param   pSink               Mixer sink to update volume for.
+ * @param   pVolMaster          Master volume to set.
+ */
 static int audioMixerSinkUpdateVolume(PAUDMIXSINK pSink, const PPDMAUDIOVOLUME pVolMaster)
 {
     AssertPtrReturn(pSink,      VERR_INVALID_POINTER);
@@ -1102,8 +1246,19 @@ static int audioMixerSinkUpdateVolume(PAUDMIXSINK pSink, const PPDMAUDIOVOLUME p
     return VINF_SUCCESS;
 }
 
+/**
+ * Writes data to a mixer sink.
+ *
+ * @returns IPRT status code.
+ * @param   pSink               Sink to write data to.
+ * @param   enmOp               Mixer operation to use when writing data to the sink.
+ * @param   pvBuf               Buffer containing the audio data to write.
+ * @param   cbBuf               Size (in bytes) of the buffer containing the audio data.
+ * @param   pcbWritten          Number of bytes written. Optional.
+ */
 int AudioMixerSinkWrite(PAUDMIXSINK pSink, AUDMIXOP enmOp, const void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten)
 {
+    RT_NOREF(enmOp);
     AssertPtrReturn(pSink, VERR_INVALID_POINTER);
     /* pcbWritten is optional. */
 
@@ -1117,7 +1272,7 @@ int AudioMixerSinkWrite(PAUDMIXSINK pSink, AUDMIXOP enmOp, const void *pvBuf, ui
     AssertMsg(pSink->enmDir == AUDMIXSINKDIR_OUTPUT,
               ("Can't write to a sink which is not an output sink\n"));
 
-    LogFlowFunc(("%s: enmOp=%ld, cbBuf=%RU32\n", pSink->pszName, enmOp, cbBuf));
+    LogFlowFunc(("%s: enmOp=%d, cbBuf=%RU32\n", pSink->pszName, enmOp, cbBuf));
 
     uint32_t cbProcessed;
 
@@ -1157,16 +1312,30 @@ int AudioMixerSinkWrite(PAUDMIXSINK pSink, AUDMIXOP enmOp, const void *pvBuf, ui
  * Mixer Stream implementation.
  ********************************************************************************************************************************/
 
+/**
+ * Controls a mixer stream.
+ *
+ * @returns IPRT status code.
+ * @param   pMixStream          Mixer stream to control.
+ * @param   enmCmd              Mixer stream command to use.
+ * @param   fCtl                Additional control flags. Pass 0.
+ */
 int AudioMixerStreamCtl(PAUDMIXSTREAM pMixStream, PDMAUDIOSTREAMCMD enmCmd, uint32_t fCtl)
 {
+    RT_NOREF(fCtl);
     AssertPtrReturn(pMixStream, VERR_INVALID_POINTER);
     /** @todo Validate fCtl. */
 
-    LogFlowFunc(("[%s] enmCmd=%ld\n", pMixStream->pszName, enmCmd));
+    LogFlowFunc(("[%s] enmCmd=%d\n", pMixStream->pszName, enmCmd));
 
     return pMixStream->pConn->pfnStreamControl(pMixStream->pConn, pMixStream->pStream, enmCmd);
 }
 
+/**
+ * Destroys a mixer stream, internal version.
+ *
+ * @param   pMixStream          Mixer stream to destroy.
+ */
 static void audioMixerStreamDestroyInternal(PAUDMIXSTREAM pMixStream)
 {
     AssertPtrReturnVoid(pMixStream);
@@ -1196,6 +1365,11 @@ static void audioMixerStreamDestroyInternal(PAUDMIXSTREAM pMixStream)
     pMixStream = NULL;
 }
 
+/**
+ * Destroys a mixer stream.
+ *
+ * @param   pMixStream          Mixer stream to destroy.
+ */
 void AudioMixerStreamDestroy(PAUDMIXSTREAM pMixStream)
 {
     if (!pMixStream)
@@ -1227,6 +1401,12 @@ void AudioMixerStreamDestroy(PAUDMIXSTREAM pMixStream)
     LogFlowFunc(("Returning %Rrc\n", rc));
 }
 
+/**
+ * Returns whether a mixer stream currently is active (playing/recording) or not.
+ *
+ * @returns @true if playing/recording, @false if not.
+ * @param   pMixStream          Mixer stream to return status for.
+ */
 bool AudioMixerStreamIsActive(PAUDMIXSTREAM pMixStream)
 {
     bool fIsActive =
@@ -1236,6 +1416,12 @@ bool AudioMixerStreamIsActive(PAUDMIXSTREAM pMixStream)
     return fIsActive;
 }
 
+/**
+ * Returns whether a mixer stream is valid (e.g. initialized and in a working state) or not.
+ *
+ * @returns @true if valid, @false if not.
+ * @param   pMixStream          Mixer stream to return status for.
+ */
 bool AudioMixerStreamIsValid(PAUDMIXSTREAM pMixStream)
 {
     bool fIsValid =
diff --git a/src/VBox/Devices/Audio/AudioMixer.h b/src/VBox/Devices/Audio/AudioMixer.h
index cc284ff..ca4a66f 100644
--- a/src/VBox/Devices/Audio/AudioMixer.h
+++ b/src/VBox/Devices/Audio/AudioMixer.h
@@ -172,7 +172,7 @@ typedef struct AUDMIXSINK
     /** Sink status of type AUDMIXSINK_STS_XXX. */
     AUDMIXSINKSTS           fStatus;
     /** The sink's PCM format. */
-    PDMPCMPROPS             PCMProps;
+    PDMAUDIOPCMPROPS        PCMProps;
     /** Number of streams assigned. */
     uint8_t                 cStreams;
     /** List of assigned streams.
@@ -196,7 +196,9 @@ typedef enum AUDMIXOP
 {
     /** Invalid operation, do not use. */
     AUDMIXOP_INVALID = 0,
+    /** Copy data from A to B, overwriting data in B. */
     AUDMIXOP_COPY,
+    /** Blend data from A with (existing) data in B. */
     AUDMIXOP_BLEND,
     /** The usual 32-bit hack. */
     AUDMIXOP_32BIT_HACK = 0x7fffffff
@@ -208,10 +210,8 @@ typedef enum AUDMIXOP
 int AudioMixerCreate(const char *pszName, uint32_t uFlags, PAUDIOMIXER *ppMixer);
 int AudioMixerCreateSink(PAUDIOMIXER pMixer, const char *pszName, AUDMIXSINKDIR enmDir, PAUDMIXSINK *ppSink);
 void AudioMixerDestroy(PAUDIOMIXER pMixer);
-int AudioMixerGetDeviceFormat(PAUDIOMIXER pMixer, PPDMAUDIOSTREAMCFG pCfg);
 void AudioMixerInvalidate(PAUDIOMIXER pMixer);
 void AudioMixerRemoveSink(PAUDIOMIXER pMixer, PAUDMIXSINK pSink);
-int AudioMixerSetDeviceFormat(PAUDIOMIXER pMixer, PPDMAUDIOSTREAMCFG pCfg);
 int AudioMixerSetMasterVolume(PAUDIOMIXER pMixer, PPDMAUDIOVOLUME pVol);
 void AudioMixerDebug(PAUDIOMIXER pMixer, PCDBGFINFOHLP pHlp, const char *pszArgs);
 
@@ -228,7 +228,7 @@ uint8_t AudioMixerSinkGetStreamCount(PAUDMIXSINK pSink);
 int AudioMixerSinkRead(PAUDMIXSINK pSink, AUDMIXOP enmOp, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead);
 void AudioMixerSinkRemoveStream(PAUDMIXSINK pSink, PAUDMIXSTREAM pStream);
 void AudioMixerSinkRemoveAllStreams(PAUDMIXSINK pSink);
-int AudioMixerSinkSetFormat(PAUDMIXSINK pSink, PPDMPCMPROPS pPCMProps);
+int AudioMixerSinkSetFormat(PAUDMIXSINK pSink, PPDMAUDIOPCMPROPS pPCMProps);
 int AudioMixerSinkSetVolume(PAUDMIXSINK pSink, PPDMAUDIOVOLUME pVol);
 int AudioMixerSinkWrite(PAUDMIXSINK pSink, AUDMIXOP enmOp, const void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten);
 int AudioMixerSinkUpdate(PAUDMIXSINK pSink);
diff --git a/src/VBox/Devices/Audio/DevIchAc97.cpp b/src/VBox/Devices/Audio/DevIchAc97.cpp
index 33aa334..fb0a15c 100644
--- a/src/VBox/Devices/Audio/DevIchAc97.cpp
+++ b/src/VBox/Devices/Audio/DevIchAc97.cpp
@@ -250,6 +250,7 @@ enum
 
 #define AC97_PORT2IDX(a_idx)   ( ((a_idx) >> 4) & 3 )
 
+
 /*********************************************************************************************************************************
 *   Structures and Typedefs                                                                                                      *
 *********************************************************************************************************************************/
@@ -492,7 +493,7 @@ static void ichac97StreamUpdateStatus(PAC97STATE pThis, PAC97STREAM pStream, uin
     PAC97BMREGS pRegs   = &pStream->Regs;
 
     bool fSignal = false;
-    int  iIRQL;
+    int  iIRQL = 0;
 
     uint32_t new_mask = new_sr & AC97_SR_INT_MASK;
     uint32_t old_mask = pRegs->sr  & AC97_SR_INT_MASK;
@@ -749,7 +750,7 @@ static int ichac97CreateIn(PAC97STATE pThis,
     }
 
     /* Update the sink's format. */
-    PDMPCMPROPS PCMProps;
+    PDMAUDIOPCMPROPS PCMProps;
     int rc = DrvAudioHlpStreamCfgToProps(pCfg, &PCMProps);
     if (RT_SUCCESS(rc))
         rc = AudioMixerSinkSetFormat(pSink, &PCMProps);
@@ -799,7 +800,7 @@ static int ichac97CreateOut(PAC97STATE pThis, const char *pszName, PPDMAUDIOSTRE
     AssertPtrReturn(pCfg,    VERR_INVALID_POINTER);
 
     /* Update the sink's format. */
-    PDMPCMPROPS PCMProps;
+    PDMAUDIOPCMPROPS PCMProps;
     int rc = DrvAudioHlpStreamCfgToProps(pCfg, &PCMProps);
     if (RT_SUCCESS(rc))
         rc = AudioMixerSinkSetFormat(pThis->pSinkOutput, &PCMProps);
@@ -973,7 +974,7 @@ static int ichac97MixerSetVolume(PAC97STATE pThis, int index, PDMAUDIOMIXERCTL e
      *
      * Linux ALSA depends on this behavior.
      */
-    //@todo: Does this apply to anything other than the master volume control?
+    /// @todo Does this apply to anything other than the master volume control?
     if (uVal & RT_BIT(5))
         uVal |= RT_BIT(4) | RT_BIT(3) | RT_BIT(2) | RT_BIT(1) | RT_BIT(0);
     if (uVal & RT_BIT(13))
@@ -1386,6 +1387,7 @@ static void ichac97TimerMaybeStop(PAC97STATE pThis)
 
 static DECLCALLBACK(void) ichac97Timer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
 {
+    RT_NOREF(pDevIns);
     PAC97STATE pThis = (PAC97STATE)pvUser;
     Assert(pThis == PDMINS_2_DATA(pDevIns, PAC97STATE));
     AssertPtr(pThis);
@@ -1393,8 +1395,6 @@ static DECLCALLBACK(void) ichac97Timer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void
     STAM_PROFILE_START(&pThis->StatTimer, a);
 
     uint64_t cTicksNow     = TMTimerGet(pTimer);
-    uint64_t cTicksElapsed = cTicksNow  - pThis->uTimerTS;
-    uint64_t cTicksPerSec  = TMTimerGetFreq(pTimer);
 
     LogFlowFuncEnter();
 
@@ -1623,9 +1623,9 @@ static int ichac97TransferAudio(PAC97STATE pThis, PAC97STREAM pStream, uint32_t
 /**
  * @callback_method_impl{FNIOMIOPORTIN}
  */
-static DECLCALLBACK(int) ichac97IOPortNABMRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port,
-                                               uint32_t *pu32Val, unsigned cbVal)
+static DECLCALLBACK(int) ichac97IOPortNABMRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32Val, unsigned cbVal)
 {
+    RT_NOREF(pDevIns);
     PAC97STATE pThis = (PAC97STATE)pvUser;
 
     /* Get the index of the NABMBAR port. */
@@ -1776,6 +1776,7 @@ static DECLCALLBACK(int) ichac97IOPortNABMRead(PPDMDEVINS pDevIns, void *pvUser,
 static DECLCALLBACK(int) ichac97IOPortNABMWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port,
                                                 uint32_t u32Val, unsigned cbVal)
 {
+    RT_NOREF(pDevIns);
     PAC97STATE  pThis   = (PAC97STATE)pvUser;
 
     /* Get the index of the NABMBAR register. */
@@ -1916,6 +1917,7 @@ static DECLCALLBACK(int) ichac97IOPortNABMWrite(PPDMDEVINS pDevIns, void *pvUser
  */
 static DECLCALLBACK(int) ichac97IOPortNAMRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32Val, unsigned cbVal)
 {
+    RT_NOREF(pDevIns);
     PAC97STATE pThis = (PAC97STATE)pvUser;
 
     switch (cbVal)
@@ -1960,9 +1962,9 @@ static DECLCALLBACK(int) ichac97IOPortNAMRead(PPDMDEVINS pDevIns, void *pvUser,
 /**
  * @callback_method_impl{FNIOMIOPORTOUT}
  */
-static DECLCALLBACK(int) ichac97IOPortNAMWrite(PPDMDEVINS pDevIns,
-                                               void *pvUser, RTIOPORT Port, uint32_t u32Val, unsigned cbVal)
+static DECLCALLBACK(int) ichac97IOPortNAMWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32Val, unsigned cbVal)
 {
+    RT_NOREF(pDevIns);
     PAC97STATE pThis = (PAC97STATE)pvUser;
 
     switch (cbVal)
@@ -2096,9 +2098,10 @@ static DECLCALLBACK(int) ichac97IOPortNAMWrite(PPDMDEVINS pDevIns,
 /**
  * @callback_method_impl{FNPCIIOREGIONMAP}
  */
-static DECLCALLBACK(int) ichac97IOPortMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, uint32_t cb,
-                                          PCIADDRESSSPACE enmType)
+static DECLCALLBACK(int)
+ichac97IOPortMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, uint32_t cb, PCIADDRESSSPACE enmType)
 {
+    RT_NOREF(cb, enmType);
     PPDMDEVINS  pDevIns = pPciDev->pDevIns;
     PAC97STATE  pThis   = RT_FROM_MEMBER(pPciDev, AC97STATE, PciDev);
     RTIOPORT    Port    = (RTIOPORT)GCPhysAddress;
@@ -2141,6 +2144,7 @@ DECLINLINE(PAC97STREAM) ichac97GetStreamFromID(PAC97STATE pThis, uint32_t uID)
 #ifdef IN_RING3
 static int ichac97SaveStream(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, PAC97STREAM pStream)
 {
+    RT_NOREF(pDevIns);
     PAC97BMREGS pRegs = &pStream->Regs;
 
     SSMR3PutU32(pSSM, pRegs->bdbar);
@@ -2195,6 +2199,7 @@ static DECLCALLBACK(int) ichac97SaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
 
 static int ichac97LoadStream(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, PAC97STREAM pStream)
 {
+    RT_NOREF(pDevIns);
     PAC97BMREGS pRegs = &pStream->Regs;
 
     SSMR3GetU32(pSSM, &pRegs->bdbar);
@@ -2399,6 +2404,7 @@ static DECLCALLBACK(int) ichac97Destruct(PPDMDEVINS pDevIns)
  */
 static DECLCALLBACK(int) ichac97AttachInternal(PPDMDEVINS pDevIns, PAC97DRIVER pDrv, unsigned uLUN, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
     PAC97STATE pThis = PDMINS_2_DATA(pDevIns, PAC97STATE);
 
     /*
@@ -2430,7 +2436,7 @@ static DECLCALLBACK(int) ichac97AttachInternal(PPDMDEVINS pDevIns, PAC97DRIVER p
              * host backend. This might change in the future.
              */
             if (pDrv->uLUN == 0)
-                pDrv->Flags |= PDMAUDIODRVFLAG_PRIMARY;
+                pDrv->Flags |= PDMAUDIODRVFLAGS_PRIMARY;
 
             LogFunc(("LUN#%RU8: pCon=%p, drvFlags=0x%x\n", uLUN, pDrv->pConnector, pDrv->Flags));
 
@@ -2478,6 +2484,7 @@ static DECLCALLBACK(int) ichac97Attach(PPDMDEVINS pDevIns, unsigned uLUN, uint32
 
 static DECLCALLBACK(void) ichac97Detach(PPDMDEVINS pDevIns, unsigned uLUN, uint32_t fFlags)
 {
+    RT_NOREF(pDevIns, uLUN, fFlags);
     LogFunc(("iLUN=%u, fFlags=0x%x\n", uLUN, fFlags));
 }
 
@@ -2546,6 +2553,7 @@ static int ichac97Reattach(PAC97STATE pThis, PAC97DRIVER pDrv, uint8_t uLUN, con
  */
 static DECLCALLBACK(int) ichac97Construct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
 {
+    RT_NOREF(iInstance);
     PAC97STATE pThis = PDMINS_2_DATA(pDevIns, PAC97STATE);
 
     /* NB: This must be done *before* any possible failure (and running the destructor). */
@@ -2585,7 +2593,6 @@ static DECLCALLBACK(int) ichac97Construct(PPDMDEVINS pDevIns, int iInstance, PCF
      * in the Linux kernel; Linux makes no attempt to measure the data rate and assumes
      * 48 kHz rate, which is exactly what we need. Same goes for AD1981B.
      */
-    bool fChipAD1980 = false;
     if (!strcmp(szCodec, "STAC9700"))
         pThis->uCodecModel = AC97_CODEC_STAC9700;
     else if (!strcmp(szCodec, "AD1980"))
@@ -2691,16 +2698,6 @@ static DECLCALLBACK(int) ichac97Construct(PPDMDEVINS pDevIns, int iInstance, PCF
         rc = AudioMixerCreate("AC'97 Mixer", 0 /* uFlags */, &pThis->pMixer);
         if (RT_SUCCESS(rc))
         {
-            /* Set a default audio format for our mixer. */
-            PDMAUDIOSTREAMCFG streamCfg;
-            streamCfg.uHz           = 44100;
-            streamCfg.cChannels     = 2;
-            streamCfg.enmFormat     = PDMAUDIOFMT_S16;
-            streamCfg.enmEndianness = PDMAUDIOHOSTENDIANNESS;
-
-            rc = AudioMixerSetDeviceFormat(pThis->pMixer, &streamCfg);
-            AssertRC(rc);
-
             /* Add all required audio sinks. */
             int rc2 = AudioMixerCreateSink(pThis->pMixer, "[Playback] PCM Output", AUDMIXSINKDIR_OUTPUT, &pThis->pSinkOutput);
             AssertRC(rc2);
@@ -2726,7 +2723,7 @@ static DECLCALLBACK(int) ichac97Construct(PPDMDEVINS pDevIns, int iInstance, PCF
              * Only primary drivers are critical for the VM to run. Everything else
              * might not worth showing an own error message box in the GUI.
              */
-            if (!(pDrv->Flags & PDMAUDIODRVFLAG_PRIMARY))
+            if (!(pDrv->Flags & PDMAUDIODRVFLAGS_PRIMARY))
                 continue;
 
             PPDMIAUDIOCONNECTOR pCon = pDrv->pConnector;
@@ -2845,7 +2842,7 @@ static DECLCALLBACK(int) ichac97Construct(PPDMDEVINS pDevIns, int iInstance, PCF
         {
             /* Only register primary driver.
              * The device emulation does the output multiplexing then. */
-            if (!(pDrv->Flags & PDMAUDIODRVFLAG_PRIMARY))
+            if (!(pDrv->Flags & PDMAUDIODRVFLAGS_PRIMARY))
                 continue;
 
             PDMAUDIOCALLBACK AudioCallbacks[2];
diff --git a/src/VBox/Devices/Audio/DevIchHda.cpp b/src/VBox/Devices/Audio/DevIchHda.cpp
index fae6ac2..4376578 100644
--- a/src/VBox/Devices/Audio/DevIchHda.cpp
+++ b/src/VBox/Devices/Audio/DevIchHda.cpp
@@ -629,8 +629,8 @@ typedef struct HDASTREAMSTATE
     volatile bool           fInReset;
     /** Unused, padding. */
     bool                    fPadding;
-    /** Mutex semaphore handle to serialize access. */
-    RTSEMMUTEX              hMtx;
+    /** Critical section to serialize access. */
+    RTCRITSECT              CritSect;
     /** Event signalling that the stream's state has been changed. */
     RTSEMEVENT              hStateChangedEvent;
     /** This stream's data mapping. */
@@ -875,28 +875,32 @@ typedef struct HDACALLBACKCTX
 } HDACALLBACKCTX, *PHDACALLBACKCTX;
 #endif
 
+
 /*********************************************************************************************************************************
 *   Internal Functions                                                                                                           *
 *********************************************************************************************************************************/
 #ifndef VBOX_DEVICE_STRUCT_TESTCASE
+#ifdef IN_RING3
 static FNPDMDEVRESET hdaReset;
+#endif
 
-/*
- * Stubs.
+/** @name Register read/write stubs.
+ * @{
  */
 static int hdaRegReadUnimpl(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value);
 static int hdaRegWriteUnimpl(PHDASTATE pThis, uint32_t iReg, uint32_t pu32Value);
+/** @} */
 
-/*
- * Global register set read/write functions.
+/** @name Global register set read/write functions.
+ * @{
  */
 static int hdaRegWriteGCTL(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
 static int hdaRegReadINTSTS(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value);
 static int hdaRegReadLPIB(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value);
 static int hdaRegReadWALCLK(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value);
-static int hdaRegReadSSYNC(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value);
-static int hdaRegWriteSSYNC(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
-static int hdaRegWriteINTSTS(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
+//static int hdaRegReadSSYNC(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value); - unused
+//static int hdaRegWriteSSYNC(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);  - unused
+//static int hdaRegWriteINTSTS(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value); - implementation not found.
 static int hdaRegWriteCORBWP(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
 static int hdaRegWriteCORBRP(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
 static int hdaRegWriteCORBCTL(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
@@ -907,40 +911,49 @@ static int hdaRegWriteSTATESTS(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value
 static int hdaRegWriteIRS(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
 static int hdaRegReadIRS(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value);
 static int hdaRegWriteBase(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
+/** @} */
 
-/*
- * {IOB}SDn read/write functions.
+/** @name {IOB}SDn write functions.
+ * @{
  */
 static int       hdaRegWriteSDCBL(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
 static int       hdaRegWriteSDCTL(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
 static int       hdaRegWriteSDSTS(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
 static int       hdaRegWriteSDLVI(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
-static int       hdaRegWriteSDFIFOW(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
-static int       hdaRegWriteSDFIFOS(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
+//static int       hdaRegWriteSDFIFOW(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value); - unused
+//static int       hdaRegWriteSDFIFOS(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value); - unused
 static int       hdaRegWriteSDFMT(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
 static int       hdaRegWriteSDBDPL(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
 static int       hdaRegWriteSDBDPU(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
+/** @} */
+
+/* Locking + logging. */
+#ifdef IN_RING3
 DECLINLINE(int)  hdaRegWriteSDLock(PHDASTATE pThis, PHDASTREAM pStream, uint32_t iReg, uint32_t u32Value);
 DECLINLINE(void) hdaRegWriteSDUnlock(PHDASTREAM pStream);
+#endif
 
-/*
- * Generic register read/write functions.
+/** @name Generic register read/write functions.
+ * @{
  */
 static int hdaRegReadU32(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value);
 static int hdaRegWriteU32(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
 static int hdaRegReadU24(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value);
+#ifdef IN_RING3
 static int hdaRegWriteU24(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
+#endif
 static int hdaRegReadU16(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value);
 static int hdaRegWriteU16(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
 static int hdaRegReadU8(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value);
 static int hdaRegWriteU8(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
+/** @} */
 
 #ifdef IN_RING3
 static void hdaStreamDestroy(PHDASTREAM pStream);
 static int hdaStreamSetActive(PHDASTATE pThis, PHDASTREAM pStream, bool fActive);
-static int hdaStreamStart(PHDASTREAM pStream);
+//static int hdaStreamStart(PHDASTREAM pStream); - unused
 static int hdaStreamStop(PHDASTREAM pStream);
-static int hdaStreamWaitForStateChange(PHDASTREAM pStream, RTMSINTERVAL msTimeout);
+/*static int hdaStreamWaitForStateChange(PHDASTREAM pStream, RTMSINTERVAL msTimeout); - currently unused */
 static int hdaTransfer(PHDASTATE pThis, PHDASTREAM pStream, uint32_t cbToProcess, uint32_t *pcbProcessed);
 #endif
 
@@ -962,11 +975,12 @@ static int           hdaProcessInterrupt(PHDASTATE pThis);
 /*
  * Timer routines.
  */
-#ifndef VBOX_WITH_AUDIO_CALLBACKS
+#if !defined(VBOX_WITH_AUDIO_CALLBACKS) && defined(IN_RING3)
 static void hdaTimerMaybeStart(PHDASTATE pThis);
 static void hdaTimerMaybeStop(PHDASTATE pThis);
 #endif
 
+
 /*********************************************************************************************************************************
 *   Global Variables                                                                                                             *
 *********************************************************************************************************************************/
@@ -1148,6 +1162,7 @@ static uint32_t const g_afMasks[5] =
 };
 
 #ifdef IN_RING3
+
 DECLINLINE(uint32_t) hdaStreamUpdateLPIB(PHDASTATE pThis, PHDASTREAM pStream, uint32_t u32LPIB)
 {
     AssertPtrReturn(pThis,   0);
@@ -1172,7 +1187,7 @@ DECLINLINE(uint32_t) hdaStreamUpdateLPIB(PHDASTATE pThis, PHDASTREAM pStream, ui
 
     return u32LPIB;
 }
-#endif
+
 
 /**
  * Retrieves the number of bytes of a FIFOS register.
@@ -1205,6 +1220,8 @@ DECLINLINE(uint16_t) hdaSDFIFOSToBytes(uint32_t u32RegFIFOS)
     return cb;
 }
 
+
+# if defined(IN_RING3) && (defined(DEBUG) || defined(VBOX_HDA_WITH_FIFO))
 /**
  * Retrieves the number of bytes of a FIFOW register.
  *
@@ -1221,13 +1238,12 @@ DECLINLINE(uint8_t) hdaSDFIFOWToBytes(uint32_t u32RegFIFOW)
         default:              cb = 0;  break;
     }
 
-#ifdef RT_STRICT
     Assert(RT_IS_POWER_OF_TWO(cb));
-#endif
     return cb;
 }
+#endif
+
 
-#ifdef IN_RING3
 /**
  * Fetches the next BDLE to use for a stream.
  *
@@ -1244,9 +1260,9 @@ DECLINLINE(int) hdaStreamGetNextBDLE(PHDASTATE pThis, PHDASTREAM pStream)
 
     LogFlowFuncEnter();
 
-#ifdef DEBUG
-    uint32_t uOldBDLE = pStream->State.uCurBDLE;
-#endif
+# ifdef LOG_ENABLED
+    uint32_t const uOldBDLE = pStream->State.uCurBDLE;
+# endif
 
     PHDABDLE pBDLE = &pStream->State.BDLE;
 
@@ -1267,14 +1283,11 @@ DECLINLINE(int) hdaStreamGetNextBDLE(PHDASTATE pThis, PHDASTREAM pStream)
     /* Fetch the next BDLE entry. */
     int rc = hdaBDLEFetch(pThis, pBDLE, pStream->u64BDLBase, pStream->State.uCurBDLE);
 
-#ifdef DEBUG
     LogFlowFunc(("[SD%RU8]: uOldBDLE=%RU16, uCurBDLE=%RU16, LVI=%RU32, rc=%Rrc, %R[bdle]\n",
                  pStream->u8SD, uOldBDLE, pStream->State.uCurBDLE, pStream->u16LVI, rc, pBDLE));
-#endif
-
     return rc;
 }
-#endif /* IN_RING3 */
+
 
 /**
  * Returns the audio direction of a specified stream descriptor.
@@ -1298,6 +1311,7 @@ DECLINLINE(PDMAUDIODIR) hdaGetDirFromSD(uint8_t uSD)
     return PDMAUDIODIR_OUT;
 }
 
+
 /**
  * Returns the HDA stream of specified stream descriptor number.
  *
@@ -1314,6 +1328,7 @@ DECLINLINE(PHDASTREAM) hdaStreamFromSD(PHDASTATE pThis, uint8_t uSD)
     return &pThis->aStreams[uSD];
 }
 
+
 /**
  * Returns the HDA stream of specified HDA sink.
  *
@@ -1341,13 +1356,15 @@ DECLINLINE(uint8_t) hdaStreamGetFIFOW(PHDASTATE pThis, PHDASTREAM pStream)
     AssertPtrReturn(pThis, 0);
     AssertPtrReturn(pStream, 0);
 
-#ifdef VBOX_HDA_WITH_FIFO
+# ifdef VBOX_HDA_WITH_FIFO
     return hdaSDFIFOWToBytes(HDA_STREAM_REG(pThis, FIFOW, pStream->u8SD));
-#else
+# else
     return 0;
-#endif
+# endif
 }
 
+#endif /* IN_RING3 */
+
 static int hdaProcessInterrupt(PHDASTATE pThis)
 {
 #define IS_INTERRUPT_OCCURED_AND_ENABLED(pThis, num) \
@@ -1394,10 +1411,9 @@ static int hdaProcessInterrupt(PHDASTATE pThis)
  * Looks up a register at the exact offset given by @a offReg.
  *
  * @returns Register index on success, -1 if not found.
- * @param   pThis               The HDA device state.
  * @param   offReg              The register offset.
  */
-static int hdaRegLookup(PHDASTATE pThis, uint32_t offReg)
+static int hdaRegLookup(uint32_t offReg)
 {
     /*
      * Aliases.
@@ -1446,10 +1462,9 @@ static int hdaRegLookup(PHDASTATE pThis, uint32_t offReg)
  * Looks up a register covering the offset given by @a offReg.
  *
  * @returns Register index on success, -1 if not found.
- * @param   pThis               The HDA device state.
  * @param   offReg              The register offset.
  */
-static int hdaRegLookupWithin(PHDASTATE pThis, uint32_t offReg)
+static int hdaRegLookupWithin(uint32_t offReg)
 {
     /*
      * Aliases.
@@ -1498,6 +1513,7 @@ static int hdaRegLookupWithin(PHDASTATE pThis, uint32_t offReg)
 }
 
 #ifdef IN_RING3
+
 static int hdaCmdSync(PHDASTATE pThis, bool fLocal)
 {
     int rc = VINF_SUCCESS;
@@ -1511,7 +1527,7 @@ static int hdaCmdSync(PHDASTATE pThis, bool fLocal)
         rc = PDMDevHlpPhysRead(pThis->CTX_SUFF(pDevIns), pThis->u64CORBBase, pThis->pu32CorbBuf, pThis->cbCorbBuf);
         if (RT_FAILURE(rc))
             AssertRCReturn(rc, rc);
-#ifdef DEBUG_CMD_BUFFER
+# ifdef DEBUG_CMD_BUFFER
         uint8_t i = 0;
         do
         {
@@ -1532,7 +1548,7 @@ static int hdaCmdSync(PHDASTATE pThis, bool fLocal)
             LogFunc(("\n"));
             i += 8;
         } while(i != 0);
-#endif
+# endif
     }
     else
     {
@@ -1540,7 +1556,7 @@ static int hdaCmdSync(PHDASTATE pThis, bool fLocal)
         rc = PDMDevHlpPCIPhysWrite(pThis->CTX_SUFF(pDevIns), pThis->u64RIRBBase, pThis->pu64RirbBuf, pThis->cbRirbBuf);
         if (RT_FAILURE(rc))
             AssertRCReturn(rc, rc);
-#ifdef DEBUG_CMD_BUFFER
+# ifdef DEBUG_CMD_BUFFER
         uint8_t i = 0;
         do {
             LogFunc(("RIRB%02x: ", i));
@@ -1556,7 +1572,7 @@ static int hdaCmdSync(PHDASTATE pThis, bool fLocal)
             LogFunc(("\n"));
             i += 8;
         } while (i != 0);
-#endif
+# endif
     }
     return rc;
 }
@@ -1627,7 +1643,7 @@ static int hdaStreamCreate(PHDASTREAM pStream, uint8_t uSD)
 
     int rc = RTSemEventCreate(&pStream->State.hStateChangedEvent);
     if (RT_SUCCESS(rc))
-        rc = RTSemMutexCreate(&pStream->State.hMtx);
+        rc = RTCritSectInit(&pStream->State.CritSect);
 
     if (RT_SUCCESS(rc))
     {
@@ -1654,12 +1670,8 @@ static void hdaStreamDestroy(PHDASTREAM pStream)
 
     hdaStreamMapDestroy(&pStream->State.Mapping);
 
-    if (pStream->State.hMtx != NIL_RTSEMMUTEX)
-    {
-        rc2 = RTSemMutexDestroy(pStream->State.hMtx);
-        AssertRC(rc2);
-        pStream->State.hMtx = NIL_RTSEMMUTEX;
-    }
+    rc2 = RTCritSectDelete(&pStream->State.CritSect);
+    AssertRC(rc2);
 
     if (pStream->State.hStateChangedEvent != NIL_RTSEMEVENT)
     {
@@ -1691,7 +1703,7 @@ static int hdaStreamInit(PHDASTATE pThis, PHDASTREAM pStream, uint8_t u8SD)
     LogFlowFunc(("[SD%RU8]: DMA @ 0x%x (%RU32 bytes), LVI=%RU16, FIFOS=%RU16\n",
                  pStream->u8SD, pStream->u64BDLBase, pStream->u32CBL, pStream->u16LVI, pStream->u16FIFOS));
 
-#ifdef DEBUG
+# ifdef DEBUG
     uint64_t u64BaseDMA = RT_MAKE_U64(HDA_STREAM_REG(pThis, BDPL, pStream->u8SD),
                                       HDA_STREAM_REG(pThis, BDPU, pStream->u8SD));
     uint16_t u16LVI     = HDA_STREAM_REG(pThis, LVI, pStream->u8SD);
@@ -1700,7 +1712,7 @@ static int hdaStreamInit(PHDASTATE pThis, PHDASTREAM pStream, uint8_t u8SD)
     LogFlowFunc(("\t-> DMA @ 0x%x, LVI=%RU16, CBL=%RU32\n", u64BaseDMA, u16LVI, u32CBL));
 
     hdaBDLEDumpAll(pThis, u64BaseDMA, u16LVI + 1);
-#endif
+# endif
 
     return VINF_SUCCESS;
 }
@@ -1712,10 +1724,10 @@ static void hdaStreamReset(PHDASTATE pThis, PHDASTREAM pStream)
 
     const uint8_t uSD = pStream->u8SD;
 
-#ifdef VBOX_STRICT
+# ifdef VBOX_STRICT
     AssertReleaseMsg(!RT_BOOL(HDA_STREAM_REG(pThis, CTL, uSD) & HDA_REG_FIELD_FLAG_MASK(SDCTL, RUN)),
                      ("[SD%RU8] Cannot reset stream while in running state\n", uSD));
-#endif
+# endif
 
     LogFunc(("[SD%RU8]: Reset\n", uSD));
 
@@ -1761,6 +1773,7 @@ static void hdaStreamReset(PHDASTATE pThis, PHDASTREAM pStream)
     ASMAtomicXchgBool(&pStream->State.fInReset, false);
 }
 
+# if 0 /* unused */
 static bool hdaStreamIsActive(PHDASTATE pThis, PHDASTREAM pStream)
 {
     AssertPtrReturn(pThis,   false);
@@ -1771,6 +1784,7 @@ static bool hdaStreamIsActive(PHDASTATE pThis, PHDASTREAM pStream)
     LogFlowFunc(("SD=%RU8, fActive=%RTbool\n", pStream->u8SD, fActive));
     return fActive;
 }
+# endif
 
 static int hdaStreamSetActive(PHDASTATE pThis, PHDASTREAM pStream, bool fActive)
 {
@@ -1813,16 +1827,16 @@ static int hdaStreamSetActive(PHDASTATE pThis, PHDASTREAM pStream, bool fActive)
         if (pThis->cStreamsActive) /* Disable can be called mupltiple times. */
             pThis->cStreamsActive--;
 
-#ifndef VBOX_WITH_AUDIO_CALLBACKS
+# ifndef VBOX_WITH_AUDIO_CALLBACKS
         hdaTimerMaybeStop(pThis);
-#endif
+# endif
     }
     else
     {
         pThis->cStreamsActive++;
-#ifndef VBOX_WITH_AUDIO_CALLBACKS
+# ifndef VBOX_WITH_AUDIO_CALLBACKS
         hdaTimerMaybeStart(pThis);
-#endif
+# endif
     }
 
     LogFlowFunc(("u8Strm=%RU8, fActive=%RTbool, cStreamsActive=%RU8\n", pStream->u8SD, fActive, pThis->cStreamsActive));
@@ -1833,16 +1847,17 @@ static void hdaStreamAssignToSink(PHDASTREAM pStream, PHDAMIXERSINK pMixSink)
 {
     AssertPtrReturnVoid(pStream);
 
-    int rc2 = RTSemMutexRequest(pStream->State.hMtx, RT_INDEFINITE_WAIT);
+    int rc2 = RTCritSectEnter(&pStream->State.CritSect);
     if (RT_SUCCESS(rc2))
     {
         pStream->pMixSink = pMixSink;
 
-        rc2 = RTSemMutexRelease(pStream->State.hMtx);
+        rc2 = RTCritSectLeave(&pStream->State.CritSect);
         AssertRC(rc2);
     }
 }
 
+# if 0 /** @todo hdaStreamStart is unused */
 static int hdaStreamStart(PHDASTREAM pStream)
 {
     AssertPtrReturn(pStream, VERR_INVALID_POINTER);
@@ -1853,6 +1868,7 @@ static int hdaStreamStart(PHDASTREAM pStream)
     LogFlowFuncLeave();
     return VINF_SUCCESS;
 }
+# endif /* unused */
 
 static int hdaStreamStop(PHDASTREAM pStream)
 {
@@ -1863,7 +1879,7 @@ static int hdaStreamStop(PHDASTREAM pStream)
     if (!fActive)
         return VINF_SUCCESS;
 
-#if 0 /** @todo Does not work (yet), as EMT deadlocks then. */
+# if 0 /** @todo Does not work (yet), as EMT deadlocks then. */
     /*
      * Wait for the stream to stop.
      */
@@ -1880,14 +1896,15 @@ static int hdaStreamStop(PHDASTREAM pStream)
         LogRel(("HDA: Warning: Unable to stop stream %RU8 (state: %s), rc=%Rrc\n",
                 pStream->u8Strm, fActive ? "active" : "stopped", rc));
     }
-#else
+# else
     int rc = VINF_SUCCESS;
-#endif
+# endif
 
     LogFlowFuncLeaveRC(rc);
     return rc;
 }
 
+# if defined(VBOX_WITH_HDA_INTERLEAVING_STREAMS_SUPPORT) || defined(VBOX_WITH_HDA_51_SURROUND)
 static int hdaStreamChannelExtract(PPDMAUDIOSTREAMCHANNEL pChan, const void *pvBuf, size_t cbBuf)
 {
     AssertPtrReturn(pChan, VERR_INVALID_POINTER);
@@ -1935,7 +1952,9 @@ static int hdaStreamChannelExtract(PPDMAUDIOSTREAMCHANNEL pChan, const void *pvB
 
     return VINF_SUCCESS;
 }
+# endif /* defined(VBOX_WITH_HDA_INTERLEAVING_STREAMS_SUPPORT) || defined(VBOX_WITH_HDA_51_SURROUND) */
 
+# if 0 /** @todo hdaStreamChannelAdvance is unused */
 static int hdaStreamChannelAdvance(PPDMAUDIOSTREAMCHANNEL pChan, size_t cbAdv)
 {
     AssertPtrReturn(pChan, VERR_INVALID_POINTER);
@@ -1945,6 +1964,7 @@ static int hdaStreamChannelAdvance(PPDMAUDIOSTREAMCHANNEL pChan, size_t cbAdv)
 
     return VINF_SUCCESS;
 }
+# endif
 
 static int hdaStreamChannelDataInit(PPDMAUDIOSTREAMCHANNELDATA pChanData, uint32_t fFlags)
 {
@@ -1976,6 +1996,8 @@ static void hdaStreamChannelDataDestroy(PPDMAUDIOSTREAMCHANNELDATA pChanData)
     pChanData->fFlags = PDMAUDIOSTREAMCHANNELDATA_FLAG_NONE;
 }
 
+# if defined(VBOX_WITH_HDA_INTERLEAVING_STREAMS_SUPPORT) || defined(VBOX_WITH_HDA_51_SURROUND)
+
 static int hdaStreamChannelAcquireData(PPDMAUDIOSTREAMCHANNELDATA pChanData, void *pvData, size_t *pcbData)
 {
     AssertPtrReturn(pChanData, VERR_INVALID_POINTER);
@@ -1996,6 +2018,9 @@ static int hdaStreamChannelReleaseData(PPDMAUDIOSTREAMCHANNELDATA pChanData)
     return VINF_SUCCESS;
 }
 
+# endif /* defined(VBOX_WITH_HDA_INTERLEAVING_STREAMS_SUPPORT) || defined(VBOX_WITH_HDA_51_SURROUND) */
+
+# if 0 /* currently unused */
 static int hdaStreamWaitForStateChange(PHDASTREAM pStream, RTMSINTERVAL msTimeout)
 {
     AssertPtrReturn(pStream, VERR_INVALID_POINTER);
@@ -2003,18 +2028,22 @@ static int hdaStreamWaitForStateChange(PHDASTREAM pStream, RTMSINTERVAL msTimeou
     LogFlowFunc(("[SD%RU8]: msTimeout=%RU32\n", pStream->u8SD, msTimeout));
     return RTSemEventWait(pStream->State.hStateChangedEvent, msTimeout);
 }
+# endif /* currently unused */
+
 #endif /* IN_RING3 */
 
 /* Register access handlers. */
 
 static int hdaRegReadUnimpl(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value)
 {
+    RT_NOREF_PV(pThis); RT_NOREF_PV(iReg);
     *pu32Value = 0;
     return VINF_SUCCESS;
 }
 
 static int hdaRegWriteUnimpl(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
 {
+    RT_NOREF_PV(pThis); RT_NOREF_PV(iReg); RT_NOREF_PV(u32Value);
     return VINF_SUCCESS;
 }
 
@@ -2051,11 +2080,13 @@ static int hdaRegReadU24(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value)
     return hdaRegReadU32(pThis, iReg, pu32Value);
 }
 
+#ifdef IN_RING3
 static int hdaRegWriteU24(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
 {
     Assert((u32Value & 0xff000000) == 0);
     return hdaRegWriteU32(pThis, iReg, u32Value);
 }
+#endif
 
 /* U32 */
 static int hdaRegReadU32(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value)
@@ -2077,6 +2108,8 @@ static int hdaRegWriteU32(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
 
 static int hdaRegWriteGCTL(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
 {
+    RT_NOREF_PV(iReg);
+
     if (u32Value & HDA_REG_FIELD_FLAG_MASK(GCTL, RST))
     {
         /* Set the CRST bit to indicate that we're leaving reset mode. */
@@ -2127,6 +2160,8 @@ static int hdaRegWriteSTATESTS(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value
 
 static int hdaRegReadINTSTS(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value)
 {
+    RT_NOREF_PV(iReg);
+
     uint32_t v = 0;
     if (   HDA_REG_FLAG_VALUE(pThis, RIRBSTS, RIRBOIS)
         || HDA_REG_FLAG_VALUE(pThis, RIRBSTS, RINTFL)
@@ -2169,10 +2204,11 @@ static int hdaRegReadINTSTS(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value)
 static int hdaRegReadLPIB(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value)
 {
     const uint8_t  u8Strm  = HDA_SD_NUM_FROM_REG(pThis, LPIB, iReg);
-          uint32_t u32LPIB = HDA_STREAM_REG(pThis, LPIB, u8Strm);
+    uint32_t       u32LPIB = HDA_STREAM_REG(pThis, LPIB, u8Strm);
+#ifdef LOG_ENABLED
     const uint32_t u32CBL  = HDA_STREAM_REG(pThis, CBL,  u8Strm);
-
     LogFlowFunc(("[SD%RU8]: LPIB=%RU32, CBL=%RU32\n", u8Strm, u32LPIB, u32CBL));
+#endif
 
     *pu32Value = u32LPIB;
     return VINF_SUCCESS;
@@ -2180,6 +2216,8 @@ static int hdaRegReadLPIB(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value)
 
 static int hdaRegReadWALCLK(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value)
 {
+    RT_NOREF_PV(iReg);
+
     /* HDA spec (1a): 3.3.16 WALCLK counter ticks with 24Mhz bitclock rate. */
     *pu32Value = (uint32_t)ASMMultU64ByU32DivByU32(PDMDevHlpTMTimeVirtGetNano(pThis->CTX_SUFF(pDevIns))
                                                    - pThis->u64BaseTS, 24, 1000);
@@ -2187,8 +2225,12 @@ static int hdaRegReadWALCLK(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value)
     return VINF_SUCCESS;
 }
 
+#if 0 /** @todo hdaRegReadSSYNC &  hdaRegWriteSSYNC are unused */
+
 static int hdaRegReadSSYNC(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value)
 {
+    RT_NOREF_PV(iReg);
+
     /* HDA spec (1a): 3.3.16 WALCLK counter ticks with 24Mhz bitclock rate. */
     *pu32Value = HDA_REG(pThis, SSYNC);
     LogFlowFunc(("%RU32\n", *pu32Value));
@@ -2201,8 +2243,12 @@ static int hdaRegWriteSSYNC(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
     return hdaRegWriteU32(pThis, iReg, u32Value);
 }
 
+#endif /* unused */
+
 static int hdaRegWriteCORBRP(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
 {
+    RT_NOREF_PV(iReg);
+
     if (u32Value & HDA_REG_FIELD_FLAG_MASK(CORBRP, RST))
     {
         HDA_REG(pThis, CORBRP) = 0;
@@ -2226,12 +2272,15 @@ static int hdaRegWriteCORBCTL(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
     }
     return rc;
 #else
+    RT_NOREF_PV(pThis); RT_NOREF_PV(iReg); RT_NOREF_PV(u32Value);
     return VINF_IOM_R3_MMIO_WRITE;
 #endif
 }
 
 static int hdaRegWriteCORBSTS(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
 {
+    RT_NOREF_PV(iReg);
+
     uint32_t v = HDA_REG(pThis, CORBSTS);
     HDA_REG(pThis, CORBSTS) &= ~(v & u32Value);
     return VINF_SUCCESS;
@@ -2251,6 +2300,7 @@ static int hdaRegWriteCORBWP(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
     rc = hdaCORBCmdProcess(pThis);
     return rc;
 #else  /* !IN_RING3 */
+    RT_NOREF_PV(pThis); RT_NOREF_PV(iReg); RT_NOREF_PV(u32Value);
     return VINF_IOM_R3_MMIO_WRITE;
 #endif /* IN_RING3 */
 }
@@ -2285,19 +2335,22 @@ static int hdaRegWriteSDCBL(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
 
     return VINF_SUCCESS; /* Always return success to the MMIO handler. */
 #else  /* !IN_RING3 */
+    RT_NOREF_PV(pThis); RT_NOREF_PV(iReg); RT_NOREF_PV(u32Value);
     return VINF_IOM_R3_MMIO_WRITE;
 #endif /* IN_RING3 */
 }
 
 static int hdaRegWriteSDCTL(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
 {
+#ifdef IN_RING3
     bool fRun      = RT_BOOL(u32Value & HDA_REG_FIELD_FLAG_MASK(SDCTL, RUN));
     bool fInRun    = RT_BOOL(HDA_REG_IND(pThis, iReg) & HDA_REG_FIELD_FLAG_MASK(SDCTL, RUN));
+
     bool fReset    = RT_BOOL(u32Value & HDA_REG_FIELD_FLAG_MASK(SDCTL, SRST));
     bool fInReset  = RT_BOOL(HDA_REG_IND(pThis, iReg) & HDA_REG_FIELD_FLAG_MASK(SDCTL, SRST));
 
     if (HDA_REG_IND(pThis, iReg) == u32Value) /* Value already set? */
-        return VINF_SUCCESS;
+        return VINF_SUCCESS; /* Always return success to the MMIO handler. */
 
     /* Get the stream descriptor. */
     uint8_t uSD = HDA_SD_NUM_FROM_REG(pThis, CTL, iReg);
@@ -2316,7 +2369,6 @@ static int hdaRegWriteSDCTL(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
         return hdaRegWriteU24(pThis, iReg, u32Value);
     }
 
-#ifdef IN_RING3
     PHDATAG pTag = &pThis->aTags[uTag];
     AssertPtr(pTag);
 
@@ -2330,9 +2382,8 @@ static int hdaRegWriteSDCTL(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
     AssertPtr(pStream);
 
     /* Note: Do not use hdaRegWriteSDLock() here, as SDnCTL might change the RUN bit. */
-    int rc2 = RTSemMutexRequest(pStream->State.hMtx, RT_INDEFINITE_WAIT);
+    int rc2 = RTCritSectEnter(&pStream->State.CritSect);
     AssertRC(rc2);
-#endif /* IN_RING3 */
 
     LogFunc(("[SD%RU8]: fRun=%RTbool, fInRun=%RTbool, fReset=%RTbool, fInReset=%RTbool, %R[sdctl]\n",
              uSD, fRun, fInRun, fReset, fInReset, u32Value));
@@ -2349,17 +2400,14 @@ static int hdaRegWriteSDCTL(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
     }
     else if (fReset)
     {
-#ifdef IN_RING3
         /* ICH6 datasheet 18.2.33 says that RUN bit should be cleared before initiation of reset. */
         Assert(!fInRun && !fRun);
 
         LogFunc(("[SD%RU8]: Guest initiated enter to stream reset\n", pStream->u8SD));
         hdaStreamReset(pThis, pStream);
-#endif
     }
     else
     {
-#ifdef IN_RING3
         /*
          * We enter here to change DMA states only.
          */
@@ -2380,21 +2428,20 @@ static int hdaRegWriteSDCTL(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
 
         if (!fInRun && !fRun)
             hdaStreamInit(pThis, pStream, pStream->u8SD);
-#endif /* IN_RING3 */
     }
 
     /* Make sure to handle interrupts here as well. */
     hdaProcessInterrupt(pThis);
 
-#ifdef IN_RING3
     rc2 = hdaRegWriteU24(pThis, iReg, u32Value);
     AssertRC(rc2);
 
     hdaRegWriteSDUnlock(pStream);
     return VINF_SUCCESS; /* Always return success to the MMIO handler. */
-#else
+#else  /* !IN_RING3 */
+    RT_NOREF_PV(pThis); RT_NOREF_PV(iReg); RT_NOREF_PV(u32Value);
     return VINF_IOM_R3_MMIO_WRITE;
-#endif
+#endif /* IN_RING3 */
 }
 
 static int hdaRegWriteSDSTS(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
@@ -2439,11 +2486,14 @@ static int hdaRegWriteSDLVI(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
     hdaRegWriteSDUnlock(pStream);
 
     return VINF_SUCCESS; /* Always return success to the MMIO handler. */
+
 #else  /* !IN_RING3 */
+    RT_NOREF_PV(pThis); RT_NOREF_PV(iReg); RT_NOREF_PV(u32Value);
     return VINF_IOM_R3_MMIO_WRITE;
 #endif /* IN_RING3 */
 }
 
+#if 0 /** @todo hdaRegWriteSDFIFOW & hdaRegWriteSDFIFOS are unused */
 static int hdaRegWriteSDFIFOW(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
 {
     uint8_t  uSD      = HDA_SD_NUM_FROM_REG(pThis, FIFOW, iReg);
@@ -2529,6 +2579,8 @@ static int hdaRegWriteSDFIFOS(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
     return VINF_SUCCESS;
 }
 
+#endif /* unused */
+
 #ifdef IN_RING3
 static int hdaSDFMTToStrmCfg(uint32_t u32SDFMT, PPDMAUDIOSTREAMCFG pStrmCfg)
 {
@@ -2587,6 +2639,7 @@ static int hdaSDFMTToStrmCfg(uint32_t u32SDFMT, PPDMAUDIOSTREAMCFG pStrmCfg)
         default:
             AssertMsgFailed(("Unsupported bits per sample %x\n",
                              EXTRACT_VALUE(u32SDFMT, HDA_SDFMT_BITS_MASK, HDA_SDFMT_BITS_SHIFT)));
+            enmFmt = PDMAUDIOFMT_INVALID;
             rc = VERR_NOT_SUPPORTED;
             break;
     }
@@ -2784,8 +2837,8 @@ static int hdaRegWriteSDFMT(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
         return hdaRegWriteU16(pThis, iReg, u32Value);
     }
 
-    rc = hdaRegWriteSDLock(pThis, pStream, iReg, u32Value);
-    AssertRC(rc);
+    int rcSem = hdaRegWriteSDLock(pThis, pStream, iReg, u32Value);
+    AssertRC(rcSem);
 
     LogFunc(("[SD%RU8]: Hz=%RU32, Channels=%RU8, enmFmt=%RU32\n",
              pStream->u8SD, strmCfg.uHz, strmCfg.cChannels, strmCfg.enmFormat));
@@ -2795,12 +2848,12 @@ static int hdaRegWriteSDFMT(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
     switch (strmCfg.enmDir)
     {
         case PDMAUDIODIR_IN:
-#ifdef VBOX_WITH_HDA_MIC_IN
-# error "Implement me!"
-#else
+# ifdef VBOX_WITH_HDA_MIC_IN
+#  error "Implement me!"
+# else
             strmCfg.DestSource.Source = PDMAUDIORECSOURCE_LINE;
-            RTStrPrintf(strmCfg.szName, RT_ELEMENTS(strmCfg.szName), "Line In");
-#endif
+            RTStrCopy(strmCfg.szName, sizeof(strmCfg.szName), "Line In");
+# endif
             break;
 
         case PDMAUDIODIR_OUT:
@@ -2829,10 +2882,10 @@ static int hdaRegWriteSDFMT(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
 
     if (RT_SUCCESS(rc))
     {
-        int rc2;
         PHDADRIVER pDrv;
         RTListForEach(&pThis->lstDrv, pDrv, HDADRIVER, Node)
         {
+            int rc2;
             switch (strmCfg.enmDir)
             {
                 case PDMAUDIODIR_OUT:
@@ -2850,7 +2903,7 @@ static int hdaRegWriteSDFMT(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
             }
 
             if (   RT_FAILURE(rc2)
-                && (pDrv->Flags & PDMAUDIODRVFLAG_PRIMARY)) /* We only care about primary drivers here, the rest may fail. */
+                && (pDrv->Flags & PDMAUDIODRVFLAGS_PRIMARY)) /* We only care about primary drivers here, the rest may fail. */
             {
                 if (RT_SUCCESS(rc))
                     rc = rc2;
@@ -2867,12 +2920,14 @@ static int hdaRegWriteSDFMT(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
         }
         else
             LogFunc(("[SD%RU8]: (Re-)Opening stream failed with rc=%Rrc\n", pStream->u8SD, rc));
+    }
 
+    if (RT_SUCCESS(rcSem))
         hdaRegWriteSDUnlock(pStream);
-    }
 
     return VINF_SUCCESS; /* Never return failure. */
 #else /* !IN_RING3 */
+    RT_NOREF_PV(pThis); RT_NOREF_PV(iReg); RT_NOREF_PV(u32Value);
     return VINF_IOM_R3_MMIO_WRITE;
 #endif
 }
@@ -2909,6 +2964,7 @@ DECLINLINE(int) hdaRegWriteSDBDPX(PHDASTATE pThis, uint32_t iReg, uint32_t u32Va
 
     return VINF_SUCCESS; /* Always return success to the MMIO handler. */
 #else  /* !IN_RING3 */
+    RT_NOREF_PV(pThis); RT_NOREF_PV(iReg); RT_NOREF_PV(u32Value); RT_NOREF_PV(u8Strm);
     return VINF_IOM_R3_MMIO_WRITE;
 #endif /* IN_RING3 */
 }
@@ -2927,17 +2983,19 @@ static int hdaRegWriteSDBDPU(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
 /**
  * XXX
  *
- * @return  bool                Returns @true if write is allowed, @false if not.
+ * @return  VBox status code.  ALL THE CALLERS IGNORES THIS. DUH.
+ *
  * @param   pThis               Pointer to HDA state.
- * @param   iReg                Register to write.
- * @param   u32Value            Value to write.
+ * @param   iReg                Register to write (logging only).
+ * @param   u32Value            Value to write (logging only).
  */
 DECLINLINE(int) hdaRegWriteSDLock(PHDASTATE pThis, PHDASTREAM pStream, uint32_t iReg, uint32_t u32Value)
 {
-    AssertPtrReturn(pThis,   VERR_INVALID_POINTER);
-    AssertPtrReturn(pStream, VERR_INVALID_POINTER);
+    RT_NOREF(pThis, iReg, u32Value);
+    AssertPtr(pThis);   /* don't bother returning errors */
+    AssertPtr(pStream);
 
-#ifdef VBOX_STRICT
+# ifdef VBOX_STRICT
     /* Check if the SD's RUN bit is set. */
     uint32_t u32SDCTL = HDA_STREAM_REG(pThis, CTL, pStream->u8SD);
     bool fIsRunning   = RT_BOOL(u32SDCTL & HDA_REG_FIELD_FLAG_MASK(SDCTL, RUN));
@@ -2945,21 +3003,21 @@ DECLINLINE(int) hdaRegWriteSDLock(PHDASTATE pThis, PHDASTREAM pStream, uint32_t
     {
         LogFunc(("[SD%RU8]: Warning: Cannot write to register 0x%x (0x%x) when RUN bit is set (%R[sdctl])\n",
                  pStream->u8SD, iReg, u32Value, u32SDCTL));
-# ifdef DEBUG_andy
+#  ifdef DEBUG_andy
         AssertFailed();
-# endif
+#  endif
         return VERR_ACCESS_DENIED;
     }
-#endif
+# endif
 
-    return RTSemMutexRequest(pStream->State.hMtx, RT_INDEFINITE_WAIT);
+    return RTCritSectEnter(&pStream->State.CritSect);
 }
 
 DECLINLINE(void) hdaRegWriteSDUnlock(PHDASTREAM pStream)
 {
     AssertPtrReturnVoid(pStream);
 
-    int rc2 = RTSemMutexRelease(pStream->State.hMtx);
+    int rc2 = RTCritSectLeave(&pStream->State.CritSect);
     AssertRC(rc2);
 }
 #endif /* IN_RING3 */
@@ -2978,7 +3036,7 @@ static int hdaRegReadIRS(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value)
 
 static int hdaRegWriteIRS(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
 {
-    int rc = VINF_SUCCESS;
+    RT_NOREF_PV(iReg);
 
     /*
      * If the guest set the ICB bit of IRS register, HDA should process the verb in IC register,
@@ -2996,7 +3054,7 @@ static int hdaRegWriteIRS(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
              * 3.4.3: Defines behavior of immediate Command status register.
              */
             LogRel(("HDA: Guest attempted process immediate verb (%x) with active CORB\n", uCmd));
-            return rc;
+            return VINF_SUCCESS;
         }
 
         HDA_REG(pThis, IRS) = HDA_REG_FIELD_FLAG_MASK(IRS, ICB);  /* busy */
@@ -3005,15 +3063,15 @@ static int hdaRegWriteIRS(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
         int rc2 = pThis->pCodec->pfnLookup(pThis->pCodec,
                                            HDA_CODEC_CMD(uCmd, 0 /* LUN */), &uResp);
         if (RT_FAILURE(rc2))
-            LogFunc(("Codec lookup failed with rc=%Rrc\n", rc2));
+            LogFunc(("Codec lookup failed with rc2=%Rrc\n", rc2));
 
         HDA_REG(pThis, IR)   = (uint32_t)uResp; /** @todo r=andy Do we need a 64-bit response? */
         HDA_REG(pThis, IRS)  = HDA_REG_FIELD_FLAG_MASK(IRS, IRV);  /* result is ready  */
         HDA_REG(pThis, IRS) &= ~HDA_REG_FIELD_FLAG_MASK(IRS, ICB); /* busy is clear */
-#else /* !IN_RING3 */
-        rc = VINF_IOM_R3_MMIO_WRITE;
-#endif
-        return rc;
+        return VINF_SUCCESS;
+#else  /* !IN_RING3 */
+        return VINF_IOM_R3_MMIO_WRITE;
+#endif /* !IN_RING3 */
     }
 
     /*
@@ -3022,11 +3080,13 @@ static int hdaRegWriteIRS(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
     if (   u32Value & HDA_REG_FIELD_FLAG_MASK(IRS, IRV)
         && HDA_REG_FLAG_VALUE(pThis, IRS, IRV))
         HDA_REG(pThis, IRS) &= ~HDA_REG_FIELD_FLAG_MASK(IRS, IRV);
-    return rc;
+    return VINF_SUCCESS;
 }
 
 static int hdaRegWriteRIRBWP(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
 {
+    RT_NOREF_PV(iReg);
+
     if (u32Value & HDA_REG_FIELD_FLAG_MASK(RIRBWP, RST))
         HDA_REG(pThis, RIRBWP) = 0;
 
@@ -3085,6 +3145,8 @@ static int hdaRegWriteBase(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
 
 static int hdaRegWriteRIRBSTS(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
 {
+    RT_NOREF_PV(iReg);
+
     uint8_t v = HDA_REG(pThis, RIRBSTS);
     HDA_REG(pThis, RIRBSTS) &= ~(v & u32Value);
 
@@ -3277,7 +3339,7 @@ static int hdaStreamMapInit(PHDASTREAMMAPPING pMapping, PPDMAUDIOSTREAMCFG pCfg)
     if (!pMapping->paChannels)
         return VERR_NO_MEMORY;
 
-    PDMPCMPROPS Props;
+    PDMAUDIOPCMPROPS Props;
     int rc = DrvAudioHlpStreamCfgToProps(pCfg, &Props);
     if (RT_FAILURE(rc))
         return rc;
@@ -3437,7 +3499,9 @@ static bool hdaStreamTransferIsComplete(PHDASTATE pThis, PHDASTREAM pStream, boo
     bool fIsComplete = false;
 
     PHDABDLE       pBDLE   = &pStream->State.BDLE;
+#ifdef LOG_ENABLED
     const uint32_t u32LPIB = HDA_STREAM_REG(pThis, LPIB, pStream->u8SD);
+#endif
 
     /* Check if the current BDLE entry is complete (full). */
     if (pBDLE->State.u32BufOff >= pBDLE->u32BufSize)
@@ -3602,7 +3666,9 @@ static int hdaWriteAudio(PHDASTATE pThis, PHDASTREAM pStream, uint32_t cbToWrite
          */
         if (cbBuf >= hdaStreamGetFIFOW(pThis, pStream))
         {
+#if defined(VBOX_WITH_HDA_INTERLEAVING_STREAMS_SUPPORT) || defined(VBOX_WITH_HDA_51_SURROUND)
             PHDASTREAMMAPPING pMapping            = &pStream->State.Mapping;
+#endif
 
             /** @todo Which channel is which? */
 #ifdef VBOX_WITH_HDA_INTERLEAVING_STREAMS_SUPPORT
@@ -3647,7 +3713,7 @@ static int hdaWriteAudio(PHDASTATE pThis, PHDASTREAM pStream, uint32_t cbToWrite
             /*
              * Write data to according mixer sinks.
              */
-            rc2 = AudioMixerSinkWrite(pThis->SinkFront.pMixSink, AUDMIXOP_COPY, pvDataFront,     cbDataFront,
+            rc2 = AudioMixerSinkWrite(pThis->SinkFront.pMixSink, AUDMIXOP_COPY, pvDataFront,     (uint32_t)cbDataFront,
                                       NULL /* pcbWritten */);
             AssertRC(rc2);
 #ifdef VBOX_WITH_HDA_51_SURROUND
@@ -3763,7 +3829,7 @@ static DECLCALLBACK(int) hdaMixerAddStream(PHDASTATE pThis, PHDAMIXERSINK pSink,
     LogFunc(("Sink=%s, Stream=%s\n", pSink->pMixSink->pszName, pCfg->szName));
 
     /* Update the sink's format. */
-    PDMPCMPROPS PCMProps;
+    PDMAUDIOPCMPROPS PCMProps;
     int rc = DrvAudioHlpStreamCfgToProps(pCfg, &PCMProps);
     if (RT_SUCCESS(rc))
         rc = AudioMixerSinkSetFormat(pSink->pMixSink, &PCMProps);
@@ -3789,7 +3855,7 @@ static DECLCALLBACK(int) hdaMixerAddStream(PHDASTATE pThis, PHDAMIXERSINK pSink,
 
         if (pStreamCfg->enmDir == PDMAUDIODIR_IN)
         {
-            LogFunc(("enmRecSource=%ld\n", pStreamCfg->DestSource.Source));
+            LogFunc(("enmRecSource=%d\n", pStreamCfg->DestSource.Source));
 
             switch (pStreamCfg->DestSource.Source)
             {
@@ -3808,7 +3874,7 @@ static DECLCALLBACK(int) hdaMixerAddStream(PHDASTATE pThis, PHDAMIXERSINK pSink,
         }
         else if (pStreamCfg->enmDir == PDMAUDIODIR_OUT)
         {
-            LogFunc(("enmPlaybackDest=%ld\n", pStreamCfg->DestSource.Dest));
+            LogFunc(("enmPlaybackDest=%d\n", pStreamCfg->DestSource.Dest));
 
             switch (pStreamCfg->DestSource.Dest)
             {
@@ -3889,7 +3955,7 @@ static DECLCALLBACK(int) hdaMixerAddStream(PHDASTATE pThis, PDMAUDIOMIXERCTL enm
         rc = hdaMixerAddStream(pThis, pSink, pCfg);
 
         AssertPtr(pSink->pMixSink);
-        LogFlowFunc(("Sink=%s, enmMixerCtl=%ld\n", pSink->pMixSink->pszName, enmMixerCtl));
+        LogFlowFunc(("Sink=%s, enmMixerCtl=%d\n", pSink->pMixSink->pszName, enmMixerCtl));
     }
     else
         rc = VERR_NOT_FOUND;
@@ -3951,7 +4017,7 @@ static DECLCALLBACK(int) hdaMixerRemoveStream(PHDASTATE pThis, PDMAUDIOMIXERCTL
                     break;
 #endif
                 default:
-                    AssertMsgFailed(("Mixer control %ld not implemented\n", enmMixerCtl));
+                    AssertMsgFailed(("Mixer control %d not implemented\n", enmMixerCtl));
                     break;
             }
 
@@ -3970,7 +4036,7 @@ static DECLCALLBACK(int) hdaMixerRemoveStream(PHDASTATE pThis, PDMAUDIOMIXERCTL
     else
         rc = VERR_NOT_FOUND;
 
-    LogFlowFunc(("enmMixerCtl=%ld, rc=%Rrc\n", enmMixerCtl, rc));
+    LogFlowFunc(("enmMixerCtl=%d, rc=%Rrc\n", enmMixerCtl, rc));
     return rc;
 }
 
@@ -3983,14 +4049,13 @@ static DECLCALLBACK(int) hdaMixerRemoveStream(PHDASTATE pThis, PDMAUDIOMIXERCTL
  * @param   uSD                 SD stream number (number + 1) to set. Set to 0 for unassign.
  * @param   uChannel            Channel to set. Only valid if a valid SD stream number is specified.
  */
-static DECLCALLBACK(int) hdaMixerSetStream(PHDASTATE pThis,
-                                           PDMAUDIOMIXERCTL enmMixerCtl, uint8_t uSD, uint8_t uChannel)
+static DECLCALLBACK(int) hdaMixerSetStream(PHDASTATE pThis, PDMAUDIOMIXERCTL enmMixerCtl, uint8_t uSD, uint8_t uChannel)
 {
     LogFlowFunc(("enmMixerCtl=%RU32, uSD=%RU8, uChannel=%RU8\n", enmMixerCtl, uSD, uChannel));
 
     if (uSD == 0) /* Stream number 0 is reserved. */
     {
-        LogFlowFunc(("Invalid SDn (%RU8) number for mixer control %ld, ignoring\n", uSD, enmMixerCtl));
+        LogFlowFunc(("Invalid SDn (%RU8) number for mixer control %d, ignoring\n", uSD, enmMixerCtl));
         return VINF_SUCCESS;
     }
     /* uChannel is optional. */
@@ -4107,14 +4172,14 @@ static void hdaTimerMaybeStop(PHDASTATE pThis)
 
 static DECLCALLBACK(void) hdaTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
 {
+    RT_NOREF(pDevIns);
     PHDASTATE pThis = (PHDASTATE)pvUser;
     Assert(pThis == PDMINS_2_DATA(pDevIns, PHDASTATE));
     AssertPtr(pThis);
 
     STAM_PROFILE_START(&pThis->StatTimer, a);
 
-    uint64_t cTicksNow     = TMTimerGet(pTimer);
-    uint64_t cTicksElapsed = cTicksNow - pThis->uTimerTS;
+    uint64_t cTicksNow = TMTimerGet(pTimer);
 
     LogFlowFuncEnter();
 
@@ -4270,7 +4335,7 @@ static int hdaTransfer(PHDASTATE pThis, PHDASTREAM pStream, uint32_t cbToProcess
     }
 
     bool fProceed = true;
-    int rc = RTSemMutexRequest(pStream->State.hMtx, RT_INDEFINITE_WAIT);
+    int rc = RTCritSectEnter(&pStream->State.CritSect);
     if (RT_FAILURE(rc))
         return rc;
 
@@ -4304,7 +4369,7 @@ static int hdaTransfer(PHDASTATE pThis, PHDASTREAM pStream, uint32_t cbToProcess
     {
         Log3Func(("[SD%RU8]: Skipping\n", pStream->u8SD));
 
-        rc = RTSemMutexRelease(pStream->State.hMtx);
+        rc = RTCritSectLeave(&pStream->State.CritSect);
         AssertRC(rc);
 
         if (pcbProcessed)
@@ -4319,9 +4384,7 @@ static int hdaTransfer(PHDASTATE pThis, PHDASTREAM pStream, uint32_t cbToProcess
 
     /* State sanity checks. */
     Assert(pStream->State.fInReset == false);
-
-    uint32_t u32LPIB = HDA_STREAM_REG(pThis, LPIB, pStream->u8SD);
-    Assert(u32LPIB <= pStream->u32CBL);
+    Assert(HDA_STREAM_REG(pThis, LPIB, pStream->u8SD) <= pStream->u32CBL);
 
     bool fInterrupt = false;
 
@@ -4440,7 +4503,7 @@ static int hdaTransfer(PHDASTATE pThis, PHDASTREAM pStream, uint32_t cbToProcess
             *pcbProcessed = cbTotal;
     }
 
-    int rc2 = RTSemMutexRelease(pStream->State.hMtx);
+    int rc2 = RTCritSectLeave(&pStream->State.CritSect);
     if (RT_SUCCESS(rc))
         rc = rc2;
 
@@ -4461,12 +4524,13 @@ PDMBOTHCBDECL(int) hdaMMIORead(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhys
 {
     PHDASTATE   pThis  = PDMINS_2_DATA(pDevIns, PHDASTATE);
     int         rc;
+    RT_NOREF_PV(pvUser);
 
     /*
      * Look up and log.
      */
     uint32_t        offReg = GCPhysAddr - pThis->MMIOBaseAddr;
-    int             idxRegDsc = hdaRegLookup(pThis, offReg);    /* Register descriptor index. */
+    int             idxRegDsc = hdaRegLookup(offReg);    /* Register descriptor index. */
 #ifdef LOG_ENABLED
     unsigned const  cbLog     = cb;
     uint32_t        offRegLog = offReg;
@@ -4551,13 +4615,14 @@ DECLINLINE(int) hdaWriteReg(PHDASTATE pThis, int idxRegDsc, uint32_t u32Value, c
         return VINF_SUCCESS;
     }
 
-    uint32_t idxRegMem = g_aHdaRegMap[idxRegDsc].mem_idx;
 #ifdef LOG_ENABLED
+    uint32_t const idxRegMem   = g_aHdaRegMap[idxRegDsc].mem_idx;
     uint32_t const u32CurValue = pThis->au32Regs[idxRegMem];
 #endif
     int rc = g_aHdaRegMap[idxRegDsc].pfnWrite(pThis, idxRegDsc, u32Value);
     Log3Func(("Written value %#x to %s[%d byte]; %x => %x%s\n", u32Value, g_aHdaRegMap[idxRegDsc].abbrev,
               g_aHdaRegMap[idxRegDsc].size, u32CurValue, pThis->au32Regs[idxRegMem], pszLog));
+    RT_NOREF1(pszLog);
     return rc;
 }
 
@@ -4569,6 +4634,7 @@ PDMBOTHCBDECL(int) hdaMMIOWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhy
 {
     PHDASTATE pThis  = PDMINS_2_DATA(pDevIns, PHDASTATE);
     int       rc;
+    RT_NOREF_PV(pvUser);
 
     /*
      * The behavior of accesses that aren't aligned on natural boundraries is
@@ -4583,7 +4649,7 @@ PDMBOTHCBDECL(int) hdaMMIOWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhy
      * Look up and log the access.
      */
     uint32_t    offReg = GCPhysAddr - pThis->MMIOBaseAddr;
-    int         idxRegDsc = hdaRegLookup(pThis, offReg);
+    int         idxRegDsc = hdaRegLookup(offReg);
     uint32_t    idxRegMem = idxRegDsc != -1 ? g_aHdaRegMap[idxRegDsc].mem_idx : UINT32_MAX;
     uint64_t    u64Value;
     if (cb == 4)        u64Value = *(uint32_t const *)pv;
@@ -4630,7 +4696,7 @@ PDMBOTHCBDECL(int) hdaMMIOWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhy
          * will only see 1 or 2 byte accesses of this kind, so no risk of
          * shifting out input values.
          */
-        if (idxRegDsc == -1 && (idxRegDsc = hdaRegLookupWithin(pThis, offReg)) != -1)
+        if (idxRegDsc == -1 && (idxRegDsc = hdaRegLookupWithin(offReg)) != -1)
         {
             uint32_t const cbBefore = offReg - g_aHdaRegMap[idxRegDsc].offset; Assert(cbBefore > 0 && cbBefore < 4);
             offReg    -= cbBefore;
@@ -4656,9 +4722,11 @@ PDMBOTHCBDECL(int) hdaMMIOWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhy
                     Log3Func(("\tSupplying missing bits (%#x): %#llx -> %#llx ...\n",
                               g_afMasks[cbReg] & ~g_afMasks[cb], u64Value & g_afMasks[cb], u64Value));
                 }
-                uint32_t u32LogOldVal = pThis->au32Regs[idxRegMem];
+#ifdef LOG_ENABLED
+                uint32_t uLogOldVal = pThis->au32Regs[idxRegMem];
+#endif
                 rc = hdaWriteReg(pThis, idxRegDsc, u64Value, "*");
-                Log3Func(("\t%#x -> %#x\n", u32LogOldVal, pThis->au32Regs[idxRegMem]));
+                Log3Func(("\t%#x -> %#x\n", uLogOldVal, pThis->au32Regs[idxRegMem]));
             }
             else
             {
@@ -4675,7 +4743,7 @@ PDMBOTHCBDECL(int) hdaMMIOWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhy
             cb     -= cbReg;
             u64Value >>= cbReg * 8;
             if (idxRegDsc == -1)
-                idxRegDsc = hdaRegLookup(pThis, offReg);
+                idxRegDsc = hdaRegLookup(offReg);
             else
             {
                 idxRegDsc++;
@@ -4698,13 +4766,12 @@ PDMBOTHCBDECL(int) hdaMMIOWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhy
 /**
  * @callback_method_impl{FNPCIIOREGIONMAP}
  */
-static DECLCALLBACK(int) hdaPciIoRegionMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, uint32_t cb,
-                                           PCIADDRESSSPACE enmType)
+static DECLCALLBACK(int)
+hdaPciIoRegionMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, uint32_t cb, PCIADDRESSSPACE enmType)
 {
+    RT_NOREF(iRegion, enmType);
     PPDMDEVINS  pDevIns = pPciDev->pDevIns;
     PHDASTATE   pThis = RT_FROM_MEMBER(pPciDev, HDASTATE, PciDev);
-    RTIOPORT    Port = (RTIOPORT)GCPhysAddress;
-    int         rc;
 
     /*
      * 18.2 of the ICH6 datasheet defines the valid access widths as byte, word, and double word.
@@ -4713,11 +4780,9 @@ static DECLCALLBACK(int) hdaPciIoRegionMap(PPCIDEVICE pPciDev, int iRegion, RTGC
      * writing though, we have to do it all ourselves because of sideeffects.
      */
     Assert(enmType == PCI_ADDRESS_SPACE_MEM);
-    rc = PDMDevHlpMMIORegister(pDevIns, GCPhysAddress, cb, NULL /*pvUser*/,
-                                 IOMMMIO_FLAGS_READ_DWORD
-                               | IOMMMIO_FLAGS_WRITE_PASSTHRU,
-                               hdaMMIOWrite, hdaMMIORead, "HDA");
-
+    int rc = PDMDevHlpMMIORegister(pDevIns, GCPhysAddress, cb, NULL /*pvUser*/,
+                                   IOMMMIO_FLAGS_READ_DWORD | IOMMMIO_FLAGS_WRITE_PASSTHRU,
+                                   hdaMMIOWrite, hdaMMIORead, "HDA");
     if (RT_FAILURE(rc))
         return rc;
 
@@ -4746,8 +4811,10 @@ static DECLCALLBACK(int) hdaPciIoRegionMap(PPCIDEVICE pPciDev, int iRegion, RTGC
 
 static int hdaSaveStream(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, PHDASTREAM pStrm)
 {
+    RT_NOREF(pDevIns);
+#ifdef DEBUG
     PHDASTATE pThis = PDMINS_2_DATA(pDevIns, PHDASTATE);
-
+#endif
     LogFlowFunc(("[SD%RU8]\n", pStrm->u8SD));
 
     /* Save stream ID. */
@@ -4820,14 +4887,13 @@ static DECLCALLBACK(int) hdaSaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
     SSMR3PutU32(pSSM, HDA_MAX_STREAMS);
 
     /* Save stream states. */
-    int rc;
     for (uint8_t i = 0; i < HDA_MAX_STREAMS; i++)
     {
-        rc = hdaSaveStream(pDevIns, pSSM, &pThis->aStreams[i]);
+        int rc = hdaSaveStream(pDevIns, pSSM, &pThis->aStreams[i]);
         AssertRCReturn(rc, rc);
     }
 
-    return rc;
+    return VINF_SUCCESS;
 }
 
 
@@ -5130,10 +5196,11 @@ static DECLCALLBACK(int) hdaLoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32
  * @callback_method_impl{FNRTSTRFORMATTYPE}
  */
 static DECLCALLBACK(size_t) hdaDbgFmtBDLE(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput,
-                                           const char *pszType, void const *pvValue,
-                                           int cchWidth, int cchPrecision, unsigned fFlags,
-                                           void *pvUser)
+                                          const char *pszType, void const *pvValue,
+                                          int cchWidth, int cchPrecision, unsigned fFlags,
+                                          void *pvUser)
 {
+    RT_NOREF(pszType, cchWidth,  cchPrecision, fFlags, pvUser);
     PHDABDLE pBDLE = (PHDABDLE)pvValue;
     return RTStrFormat(pfnOutput,  pvArgOutput, NULL, 0,
                        "BDLE(idx:%RU32, off:%RU32, fifow:%RU32, IOC:%RTbool, DMA[%RU32 bytes @ 0x%x])",
@@ -5149,6 +5216,7 @@ static DECLCALLBACK(size_t) hdaDbgFmtSDCTL(PFNRTSTROUTPUT pfnOutput, void *pvArg
                                            int cchWidth, int cchPrecision, unsigned fFlags,
                                            void *pvUser)
 {
+    RT_NOREF(pszType, cchWidth,  cchPrecision, fFlags, pvUser);
     uint32_t uSDCTL = (uint32_t)(uintptr_t)pvValue;
     return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0,
                        "SDCTL(raw:%#x, DIR:%s, TP:%RTbool, STRIPE:%x, DEIE:%RTbool, FEIE:%RTbool, IOCE:%RTbool, RUN:%RTbool, RESET:%RTbool)",
@@ -5171,6 +5239,7 @@ static DECLCALLBACK(size_t) hdaDbgFmtSDFIFOS(PFNRTSTROUTPUT pfnOutput, void *pvA
                                              int cchWidth, int cchPrecision, unsigned fFlags,
                                              void *pvUser)
 {
+    RT_NOREF(pszType, cchWidth,  cchPrecision, fFlags, pvUser);
     uint32_t uSDFIFOS = (uint32_t)(uintptr_t)pvValue;
     return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "SDFIFOS(raw:%#x, sdfifos:%RU8 B)", uSDFIFOS, hdaSDFIFOSToBytes(uSDFIFOS));
 }
@@ -5183,6 +5252,7 @@ static DECLCALLBACK(size_t) hdaDbgFmtSDFIFOW(PFNRTSTROUTPUT pfnOutput, void *pvA
                                              int cchWidth, int cchPrecision, unsigned fFlags,
                                              void *pvUser)
 {
+    RT_NOREF(pszType, cchWidth,  cchPrecision, fFlags, pvUser);
     uint32_t uSDFIFOW = (uint32_t)(uintptr_t)pvValue;
     return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "SDFIFOW(raw: %#0x, sdfifow:%d B)", uSDFIFOW, hdaSDFIFOWToBytes(uSDFIFOW));
 }
@@ -5195,6 +5265,7 @@ static DECLCALLBACK(size_t) hdaDbgFmtSDSTS(PFNRTSTROUTPUT pfnOutput, void *pvArg
                                            int cchWidth, int cchPrecision, unsigned fFlags,
                                            void *pvUser)
 {
+    RT_NOREF(pszType, cchWidth,  cchPrecision, fFlags, pvUser);
     uint32_t uSdSts = (uint32_t)(uintptr_t)pvValue;
     return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0,
                        "SDSTS(raw:%#0x, fifordy:%RTbool, dese:%RTbool, fifoe:%RTbool, bcis:%RTbool)",
@@ -5205,7 +5276,7 @@ static DECLCALLBACK(size_t) hdaDbgFmtSDSTS(PFNRTSTROUTPUT pfnOutput, void *pvArg
                        RT_BOOL(uSdSts & HDA_REG_FIELD_FLAG_MASK(SDSTS, BCIS)));
 }
 
-static int hdaDbgLookupRegByName(PHDASTATE pThis, const char *pszArgs)
+static int hdaDbgLookupRegByName(const char *pszArgs)
 {
     int iReg = 0;
     for (; iReg < HDA_NUM_REGS; ++iReg)
@@ -5229,7 +5300,7 @@ static void hdaDbgPrintRegister(PHDASTATE pThis, PCDBGFINFOHLP pHlp, int iHdaInd
 static DECLCALLBACK(void) hdaDbgInfo(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
 {
     PHDASTATE pThis = PDMINS_2_DATA(pDevIns, PHDASTATE);
-    int iHdaRegisterIndex = hdaDbgLookupRegByName(pThis, pszArgs);
+    int iHdaRegisterIndex = hdaDbgLookupRegByName(pszArgs);
     if (iHdaRegisterIndex != -1)
         hdaDbgPrintRegister(pThis, pHlp, iHdaRegisterIndex);
     else
@@ -5270,7 +5341,7 @@ static void hdaDbgPrintBDLE(PHDASTATE pThis, PCDBGFINFOHLP pHlp, int iIdx)
     uint64_t u64BaseDMA = RT_MAKE_U64(HDA_STREAM_REG(pThis, BDPL, iIdx),
                                       HDA_STREAM_REG(pThis, BDPU, iIdx));
     uint16_t u16LVI     = HDA_STREAM_REG(pThis, LVI, iIdx);
-    uint32_t u32CBL     = HDA_STREAM_REG(pThis, CBL, iIdx);
+    /*uint32_t u32CBL     = HDA_STREAM_REG(pThis, CBL, iIdx); - unused */
 
     if (!u64BaseDMA)
         return;
@@ -5312,6 +5383,7 @@ static void hdaDbgPrintBDLE(PHDASTATE pThis, PCDBGFINFOHLP pHlp, int iIdx)
 
 static int hdaDbgLookupStrmIdx(PHDASTATE pThis, const char *pszArgs)
 {
+    RT_NOREF(pThis, pszArgs);
     /** @todo Add args parsing. */
     return -1;
 }
@@ -5561,6 +5633,7 @@ static DECLCALLBACK(int) hdaDestruct(PPDMDEVINS pDevIns)
  */
 static int hdaAttachInternal(PPDMDEVINS pDevIns, PHDADRIVER pDrv, unsigned uLUN, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
     PHDASTATE pThis = PDMINS_2_DATA(pDevIns, PHDASTATE);
 
     /*
@@ -5592,7 +5665,7 @@ static int hdaAttachInternal(PPDMDEVINS pDevIns, PHDADRIVER pDrv, unsigned uLUN,
              * host backend. This might change in the future.
              */
             if (pDrv->uLUN == 0)
-                pDrv->Flags |= PDMAUDIODRVFLAG_PRIMARY;
+                pDrv->Flags |= PDMAUDIODRVFLAGS_PRIMARY;
 
             LogFunc(("LUN#%u: pCon=%p, drvFlags=0x%x\n", uLUN, pDrv->pConnector, pDrv->Flags));
 
@@ -5639,6 +5712,7 @@ static DECLCALLBACK(int) hdaAttach(PPDMDEVINS pDevIns, unsigned uLUN, uint32_t f
 
 static DECLCALLBACK(void) hdaDetach(PPDMDEVINS pDevIns, unsigned uLUN, uint32_t fFlags)
 {
+    RT_NOREF(pDevIns, uLUN, fFlags);
     LogFunc(("iLUN=%u, fFlags=0x%x\n", uLUN, fFlags));
 }
 
@@ -5733,9 +5807,10 @@ static int hdaReattach(PHDASTATE pThis, PHDADRIVER pDrv, uint8_t uLUN, const cha
  */
 static DECLCALLBACK(int) hdaConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
 {
+    RT_NOREF(iInstance);
+    PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
     PHDASTATE pThis = PDMINS_2_DATA(pDevIns, PHDASTATE);
     Assert(iInstance == 0);
-    PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
 
     /*
      * Validations.
@@ -5908,16 +5983,6 @@ static DECLCALLBACK(int) hdaConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNO
         rc = AudioMixerCreate("HDA Mixer", 0 /* uFlags */, &pThis->pMixer);
         if (RT_SUCCESS(rc))
         {
-            /* Set a default audio format for our mixer. */
-            PDMAUDIOSTREAMCFG streamCfg;
-            streamCfg.uHz           = 44100;
-            streamCfg.cChannels     = 2;
-            streamCfg.enmFormat     = PDMAUDIOFMT_S16;
-            streamCfg.enmEndianness = PDMAUDIOHOSTENDIANNESS;
-
-            rc = AudioMixerSetDeviceFormat(pThis->pMixer, &streamCfg);
-            AssertRC(rc);
-
             /*
              * Add mixer output sinks.
              */
@@ -6004,7 +6069,7 @@ static DECLCALLBACK(int) hdaConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNO
              * Only primary drivers are critical for the VM to run. Everything else
              * might not worth showing an own error message box in the GUI.
              */
-            if (!(pDrv->Flags & PDMAUDIODRVFLAG_PRIMARY))
+            if (!(pDrv->Flags & PDMAUDIODRVFLAGS_PRIMARY))
                 continue;
 
             PPDMIAUDIOCONNECTOR pCon = pDrv->pConnector;
@@ -6213,7 +6278,7 @@ static DECLCALLBACK(int) hdaConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNO
         {
             /* Only register primary driver.
              * The device emulation does the output multiplexing then. */
-            if (pDrv->Flags != PDMAUDIODRVFLAG_PRIMARY)
+            if (pDrv->Flags != PDMAUDIODRVFLAGS_PRIMARY)
                 continue;
 
             PDMAUDIOCALLBACK AudioCallbacks[2];
diff --git a/src/VBox/Devices/Audio/DevIchHdaCodec.cpp b/src/VBox/Devices/Audio/DevIchHdaCodec.cpp
index e4ae7c3..4231f5c 100644
--- a/src/VBox/Devices/Audio/DevIchHdaCodec.cpp
+++ b/src/VBox/Devices/Audio/DevIchHdaCodec.cpp
@@ -34,6 +34,7 @@
 #include <iprt/cpp/utils.h>
 
 #include "VBoxDD.h"
+#include "DrvAudio.h"
 #include "DevIchHdaCodec.h"
 #include "DevIchHdaCommon.h"
 #include "AudioMixer.h"
@@ -240,10 +241,10 @@
 
 /* Input Amplifier capabilities (7.3.4.10). */
 #define CODEC_MAKE_F00_0D(mute_cap, step_size, num_steps, offset) \
-        (  (((mute_cap)  & 0x1)  << 31)                           \
-         | (((step_size) & 0xFF) << 16)                           \
-         | (((num_steps) & 0xFF) << 8)                            \
-         |  ((offset)    & 0xFF))
+        (  (((mute_cap)  & UINT32_C(0x1))  << 31) \
+         | (((step_size) & UINT32_C(0xFF)) << 16) \
+         | (((num_steps) & UINT32_C(0xFF)) << 8) \
+         |  ((offset)    & UINT32_C(0xFF)))
 
 #define CODEC_F00_0D_CAP_MUTE                              RT_BIT(7)
 
@@ -305,11 +306,11 @@
 
 /* GPIO count (7.3.4.14). */
 #define CODEC_MAKE_F00_11(wake, unsol, numgpi, numgpo, numgpio) \
-    (  (((wake) & 0x1) << 31)                                   \
-     | (((unsol) & 0x1) << 30)                                  \
-     | (((numgpi) & 0xFF) << 16)                                \
-     | (((numgpo) & 0xFF) << 8)                                 \
-     | ((numgpio) & 0xFF))
+    (  (((wake)   & UINT32_C(0x1))  << 31) \
+     | (((unsol)  & UINT32_C(0x1))  << 30) \
+     | (((numgpi) & UINT32_C(0xFF)) << 16) \
+     | (((numgpo) & UINT32_C(0xFF)) << 8) \
+     | ((numgpio) & UINT32_C(0xFF)))
 
 /* Processing States (7.3.3.4). */
 #define CODEC_F03_OFF                                      (0)
@@ -317,10 +318,10 @@
 #define CODEC_F03_BENING                                   RT_BIT(1)
 /* Power States (7.3.3.10). */
 #define CODEC_MAKE_F05(reset, stopok, error, act, set) \
-    (   (((reset)  & 0x1) << 10)                       \
-     | (((stopok) & 0x1) << 9)                         \
-     | (((error)  & 0x1) << 8)                         \
-     | (((act)    & 0xF) << 4)                         \
+    (  (((reset)  & 0x1) << 10) \
+     | (((stopok) & 0x1) << 9) \
+     | (((error)  & 0x1) << 8) \
+     | (((act)    & 0xF) << 4) \
      | ((set)     & 0xF))
 #define CODEC_F05_D3COLD                                   (4)
 #define CODEC_F05_D3                                       (3)
@@ -376,11 +377,11 @@
 /* Pin Sense (7.3.3.15). */
 #define CODEC_MAKE_F09_ANALOG(fPresent, impedance)  \
 (  (((fPresent) & 0x1) << 31)                       \
- | (((impedance) & 0x7FFFFFFF)))
-#define CODEC_F09_ANALOG_NA    0x7FFFFFFF
+ | (((impedance) & UINT32_C(0x7FFFFFFF))))
+#define CODEC_F09_ANALOG_NA    UINT32_C(0x7FFFFFFF)
 #define CODEC_MAKE_F09_DIGITAL(fPresent, fELDValid) \
-(   (((fPresent) & 0x1) << 31)                      \
-  | (((fELDValid) & 0x1) << 30))
+(   (((fPresent)  & UINT32_C(0x1)) << 31)                      \
+  | (((fELDValid) & UINT32_C(0x1)) << 30))
 
 #define CODEC_MAKE_F0C(lrswap, eapd, btl) ((((lrswap) & 1) << 2) | (((eapd) & 1) << 1) | ((btl) & 1))
 #define CODEC_FOC_IS_LRSWAP(f0c)                           RT_BOOL((f0c) & RT_BIT(2))
@@ -866,10 +867,11 @@ static SSMFIELD const g_aCodecNodeFieldsV1[] =
 
 
 
-
+#if 0 /* unused */
 static DECLCALLBACK(void) stac9220DbgNodes(PHDACODEC pThis, PCDBGFINFOHLP pHlp, const char *pszArgs)
 {
-    for (int i = 1; i < pThis->cTotalNodes; i++)
+    RT_NOREF(pszArgs);
+    for (uint8_t i = 1; i < pThis->cTotalNodes; i++)
     {
         PCODECNODE pNode = &pThis->paNodes[i];
         AMPLIFIER *pAmp = &pNode->dac.B_params;
@@ -880,7 +882,7 @@ static DECLCALLBACK(void) stac9220DbgNodes(PHDACODEC pThis, PCDBGFINFOHLP pHlp,
         pHlp->pfnPrintf(pHlp, "0x%x: lVol=%RU8, rVol=%RU8\n", i, lVol, rVol);
     }
 }
-
+#endif
 
 static DECLCALLBACK(int) stac9220ResetNode(PHDACODEC pThis, uint8_t uNID, PCODECNODE pNode)
 {
@@ -1175,7 +1177,10 @@ static DECLCALLBACK(int) stac9220ResetNode(PHDACODEC pThis, uint8_t uNID, PCODEC
         {
             pNode->port.u32F07_param = CODEC_F07_IN_ENABLE;
             pNode->port.u32F08_param = 0;
-            pNode->port.u32F09_param = CODEC_MAKE_F09_ANALOG(true /* fPresent */, CODEC_F09_ANALOG_NA);
+            /* If Line in is reported as enabled, OS X sees no speakers! Windows does
+             * not care either way, although Linux does.
+             */
+            pNode->port.u32F09_param = CODEC_MAKE_F09_ANALOG(0, 0);
 
             pNode->port.node.au32F00_param[0x9] = CODEC_MAKE_F00_09(CODEC_F00_09_TYPE_PIN_COMPLEX, 0, 0)
                                                 | CODEC_F00_09_CAP_UNSOL
@@ -1547,7 +1552,7 @@ static int hdaCodecToAudVolume(PHDACODEC pThis, AMPLIFIER *pAmp, PDMAUDIOMIXERCT
             iDir = AMPLIFIER_IN;
             break;
         default:
-            AssertMsgFailedReturn(("Invalid mixer control %ld\n", enmMixerCtl), VERR_INVALID_PARAMETER);
+            AssertMsgFailedReturn(("Invalid mixer control %d\n", enmMixerCtl), VERR_INVALID_PARAMETER);
             break;
     }
 
@@ -1594,8 +1599,11 @@ DECLINLINE(void) hdaCodecSetRegisterU16(uint32_t *pu32Reg, uint32_t u32Cmd, uint
 /*
  * Verb processor functions.
  */
+#if 0 /* unused */
+
 static DECLCALLBACK(int) vrbProcUnimplemented(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
 {
+    RT_NOREF(pThis, cmd);
     LogFlowFunc(("cmd(raw:%x: cad:%x, d:%c, nid:%x, verb:%x)\n", cmd,
                  CODEC_CAD(cmd), CODEC_DIRECT(cmd) ? 'N' : 'Y', CODEC_NID(cmd), CODEC_VERBDATA(cmd)));
     *pResp = 0;
@@ -1610,13 +1618,15 @@ static DECLCALLBACK(int) vrbProcBreak(PHDACODEC pThis, uint32_t cmd, uint64_t *p
     return rc;
 }
 
+#endif /* unused */
+
 /* B-- */
 static DECLCALLBACK(int) vrbProcGetAmplifier(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
 {
     *pResp = 0;
 
     /* HDA spec 7.3.3.7 Note A */
-    /** @todo: If index out of range response should be 0. */
+    /** @todo If index out of range response should be 0. */
     uint8_t u8Index = CODEC_GET_AMP_DIRECTION(cmd) == AMPLIFIER_OUT ? 0 : CODEC_GET_AMP_INDEX(cmd);
 
     PCODECNODE pNode = &pThis->paNodes[CODEC_NID(cmd)];
@@ -2134,20 +2144,19 @@ static DECLCALLBACK(int) vrbProcSetPowerState(PHDACODEC pThis, uint32_t cmd, uin
     if (!pu32Reg)
         return VINF_SUCCESS;
 
+    uint8_t uPwrCmd = CODEC_F05_SET      (cmd);
     bool    fReset  = CODEC_F05_IS_RESET (*pu32Reg);
     bool    fStopOk = CODEC_F05_IS_STOPOK(*pu32Reg);
+#ifdef LOG_ENABLED
     bool    fError  = CODEC_F05_IS_ERROR (*pu32Reg);
     uint8_t uPwrAct = CODEC_F05_ACT      (*pu32Reg);
     uint8_t uPwrSet = CODEC_F05_SET      (*pu32Reg);
-
-    uint8_t uPwrCmd = CODEC_F05_SET      (cmd);
-
     LogFunc(("[NID0x%02x] Cmd=D%RU8, fReset=%RTbool, fStopOk=%RTbool, fError=%RTbool, uPwrAct=D%RU8, uPwrSet=D%RU8\n",
              CODEC_NID(cmd), uPwrCmd, fReset, fStopOk, fError, uPwrAct, uPwrSet));
-
     LogFunc(("AFG: Act=D%RU8, Set=D%RU8\n",
             CODEC_F05_ACT(pThis->paNodes[STAC9220_NID_AFG].afg.u32F05_param),
             CODEC_F05_SET(pThis->paNodes[STAC9220_NID_AFG].afg.u32F05_param)));
+#endif
 
     if (CODEC_NID(cmd) == STAC9220_NID_AFG)
         *pu32Reg = CODEC_MAKE_F05(fReset, fStopOk, 0, uPwrCmd /* PS-Act */, uPwrCmd /* PS-Set */);
@@ -2481,32 +2490,32 @@ static DECLCALLBACK(int) vrbProcSetVolumeKnobCtrl(PHDACODEC pThis, uint32_t cmd,
 /* F15 */
 static DECLCALLBACK(int) vrbProcGetGPIOData(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
 {
+    RT_NOREF(pThis, cmd);
     *pResp = 0;
-
     return VINF_SUCCESS;
 }
 
 /* 715 */
 static DECLCALLBACK(int) vrbProcSetGPIOData(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
 {
+    RT_NOREF(pThis, cmd);
     *pResp = 0;
-
     return VINF_SUCCESS;
 }
 
 /* F16 */
 static DECLCALLBACK(int) vrbProcGetGPIOEnableMask(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
 {
+    RT_NOREF(pThis, cmd);
     *pResp = 0;
-
     return VINF_SUCCESS;
 }
 
 /* 716 */
 static DECLCALLBACK(int) vrbProcSetGPIOEnableMask(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
 {
+    RT_NOREF(pThis, cmd);
     *pResp = 0;
-
     return VINF_SUCCESS;
 }
 
@@ -2794,6 +2803,7 @@ static void codecDbgPrintNodeAmp(PCODECDBGINFO pInfo, uint32_t *paReg, uint8_t u
 #undef CODECDBG_AMP
 }
 
+#if 0 /* unused */
 static void codecDbgPrintNodeConnections(PCODECDBGINFO pInfo, PCODECNODE pNode)
 {
     if (pNode->node.au32F00_param[0xE] == 0) /* Directly connected to HDA link. */
@@ -2802,6 +2812,7 @@ static void codecDbgPrintNodeConnections(PCODECDBGINFO pInfo, PCODECNODE pNode)
          return;
     }
 }
+#endif
 
 static void codecDbgPrintNode(PCODECDBGINFO pInfo, PCODECNODE pNode, bool fRecursive)
 {
@@ -2931,6 +2942,7 @@ static void codecDbgPrintNode(PCODECDBGINFO pInfo, PCODECNODE pNode, bool fRecur
 
 static DECLCALLBACK(void) codecDbgListNodes(PHDACODEC pThis, PCDBGFINFOHLP pHlp, const char *pszArgs)
 {
+    RT_NOREF(pszArgs);
     pHlp->pfnPrintf(pHlp, "HDA LINK / INPUTS\n");
 
     CODECDBGINFO dbgInfo;
@@ -2954,7 +2966,7 @@ static DECLCALLBACK(void) codecDbgListNodes(PHDACODEC pThis, PCDBGFINFOHLP pHlp,
 
 static DECLCALLBACK(void) codecDbgSelector(PHDACODEC pThis, PCDBGFINFOHLP pHlp, const char *pszArgs)
 {
-
+    RT_NOREF(pThis, pHlp, pszArgs);
 }
 #endif
 
@@ -3026,7 +3038,7 @@ int hdaCodecAddStream(PHDACODEC pThis, PDMAUDIOMIXERCTL enmMixerCtl, PPDMAUDIOST
             break;
         }
         default:
-            AssertMsgFailed(("Mixer control %ld not implemented\n", enmMixerCtl));
+            AssertMsgFailed(("Mixer control %d not implemented\n", enmMixerCtl));
             rc = VERR_NOT_IMPLEMENTED;
             break;
     }
diff --git a/src/VBox/Devices/Audio/DevIchHdaCommon.h b/src/VBox/Devices/Audio/DevIchHdaCommon.h
index dfcdd1f..3c1c040 100644
--- a/src/VBox/Devices/Audio/DevIchHdaCommon.h
+++ b/src/VBox/Devices/Audio/DevIchHdaCommon.h
@@ -1,4 +1,4 @@
-/* $Id$ */
+/* $Id: DevIchHdaCommon.h $ */
 /** @file
  * DevIchHdaCommon.h - Shared defines / functions between controller and codec.
  */
diff --git a/src/VBox/Devices/Audio/DevSB16.cpp b/src/VBox/Devices/Audio/DevSB16.cpp
index 58e9371..0e1fe32 100644
--- a/src/VBox/Devices/Audio/DevSB16.cpp
+++ b/src/VBox/Devices/Audio/DevSB16.cpp
@@ -224,8 +224,9 @@ static void sb16TimerMaybeStop(PSB16STATE pThis);
  * @param   uLUN        The logical unit which is being detached.
  * @param   fFlags      Flags, combination of the PDMDEVATT_FLAGS_* \#defines.
  */
-static DECLCALLBACK(int) sb16AttachInternal(PPDMDEVINS pDevIns, PSB16DRIVER pDrv, unsigned uLUN, uint32_t fFlags)
+static int sb16AttachInternal(PPDMDEVINS pDevIns, PSB16DRIVER pDrv, unsigned uLUN, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
     PSB16STATE pThis = PDMINS_2_DATA(pDevIns, PSB16STATE);
 
     /*
@@ -257,7 +258,7 @@ static DECLCALLBACK(int) sb16AttachInternal(PPDMDEVINS pDevIns, PSB16DRIVER pDrv
              * host backend. This might change in the future.
              */
             if (pDrv->uLUN == 0)
-                pDrv->Flags |= PDMAUDIODRVFLAG_PRIMARY;
+                pDrv->Flags |= PDMAUDIODRVFLAGS_PRIMARY;
 
             LogFunc(("LUN#%RU8: pCon=%p, drvFlags=0x%x\n", uLUN, pDrv->pConnector, pDrv->Flags));
 
@@ -309,6 +310,7 @@ static DECLCALLBACK(int) sb16Attach(PPDMDEVINS pDevIns, unsigned uLUN, uint32_t
 
 static DECLCALLBACK(void) sb16Detach(PPDMDEVINS pDevIns, unsigned uLUN, uint32_t fFlags)
 {
+    RT_NOREF(pDevIns, uLUN, fFlags);
     LogFunc(("iLUN=%u, fFlags=0x%x\n", uLUN, fFlags));
 }
 
@@ -372,7 +374,6 @@ static int sb16Reattach(PSB16STATE pThis, PSB16DRIVER pDrv, uint8_t uLUN, const
     return rc;
 }
 
-static void sb16AudioCallback(void *pvContext, uint32_t cbFree);
 
 static int magic_of_irq(int irq)
 {
@@ -414,8 +415,8 @@ static int irq_of_magic(int magic)
     return -1;
 }
 
-#ifdef DEBUG
-static inline void log_dsp(PSB16STATE pThis)
+#if 0 // unused // def DEBUG
+DECLINLINE(void) log_dsp(PSB16STATE pThis)
 {
     LogFlowFunc(("%s:%s:%d:%s:dmasize=%d:freq=%d:const=%d:speaker=%d\n",
                  pThis->fmt_stereo ? "Stereo" : "Mono",
@@ -469,12 +470,13 @@ static void sb16Control(PSB16STATE pThis, int hold)
 
         int rc2 = pDrv->pConnector->pfnStreamControl(pDrv->pConnector, pDrv->Out.pStream,
                                                      hold == 1 ? PDMAUDIOSTREAMCMD_ENABLE : PDMAUDIOSTREAMCMD_DISABLE);
-        LogFlowFunc(("%s: rc=%Rrc\n", pDrv->Out.pStream->szName, rc2));
+        LogFlowFunc(("%s: rc=%Rrc\n", pDrv->Out.pStream->szName, rc2)); NOREF(rc2);
     }
 }
 
 static DECLCALLBACK(void) sb16TimerIRQ(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvThis)
 {
+    RT_NOREF(pDevIns, pTimer);
     PSB16STATE pThis = (PSB16STATE)pvThis;
     pThis->can_write = 1;
     PDMDevHlpISASetIrq(pThis->pDevInsR3, pThis->irq, 1);
@@ -1201,6 +1203,7 @@ static void sb16Reset(PSB16STATE pThis)
 
 static IO_WRITE_PROTO(dsp_write)
 {
+    RT_NOREF(pDevIns, cb);
     PSB16STATE pThis = (PSB16STATE)opaque;
     int iport = nport - pThis->port;
 
@@ -1297,6 +1300,7 @@ static IO_WRITE_PROTO(dsp_write)
 
 static IO_READ_PROTO(dsp_read)
 {
+    RT_NOREF(pDevIns, cb);
     PSB16STATE pThis = (PSB16STATE)opaque;
     int iport, retval, ack = 0;
 
@@ -1408,6 +1412,7 @@ static void sb16MixerReset(PSB16STATE pThis)
 
 static IO_WRITE_PROTO(mixer_write_indexb)
 {
+    RT_NOREF(pDevIns, cb);
     PSB16STATE pThis = (PSB16STATE)opaque;
     (void) nport;
     pThis->mixer_nreg = val;
@@ -1455,6 +1460,7 @@ static inline void sb16ConvVolumeOldToNew(PSB16STATE pThis, unsigned reg, uint8_
 
 static IO_WRITE_PROTO(mixer_write_datab)
 {
+    RT_NOREF(pDevIns, cb);
     PSB16STATE  pThis = (PSB16STATE)opaque;
     bool        fUpdateMaster = false;
     bool        fUpdateStream = false;
@@ -1615,6 +1621,7 @@ static IO_WRITE_PROTO(mixer_write)
 
 static IO_READ_PROTO(mixer_read)
 {
+    RT_NOREF(pDevIns, cb);
     PSB16STATE pThis = (PSB16STATE)opaque;
 
     (void) nport;
@@ -1631,8 +1638,7 @@ static IO_READ_PROTO(mixer_read)
     return VINF_SUCCESS;
 }
 
-static int sb16WriteAudio(PSB16STATE pThis, int nchan, uint32_t dma_pos,
-                          uint32_t dma_len, int len)
+static int sb16WriteAudio(PSB16STATE pThis, int nchan, uint32_t dma_pos, uint32_t dma_len, int len)
 {
     uint8_t  tmpbuf[_4K]; /** @todo Have a buffer on the heap. */
     uint32_t cbToWrite = len;
@@ -1687,6 +1693,7 @@ static int sb16WriteAudio(PSB16STATE pThis, int nchan, uint32_t dma_pos,
 
 static DECLCALLBACK(uint32_t) sb16DMARead(PPDMDEVINS pDevIns, void *opaque, unsigned nchan, uint32_t dma_pos, uint32_t dma_len)
 {
+    RT_NOREF(pDevIns);
     PSB16STATE pThis = (PSB16STATE)opaque;
     int till, copy, written, free;
 
@@ -1786,14 +1793,12 @@ static void sb16TimerMaybeStop(PSB16STATE pThis)
 
 static DECLCALLBACK(void) sb16TimerIO(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
 {
+    RT_NOREF(pDevIns);
     PSB16STATE pThis = (PSB16STATE)pvUser;
     Assert(pThis == PDMINS_2_DATA(pDevIns, PSB16STATE));
     AssertPtr(pThis);
 
     uint64_t cTicksNow     = TMTimerGet(pTimer);
-    uint64_t cTicksElapsed = cTicksNow - pThis->uTimerTSIO;
-    uint64_t cTicksPerSec  = TMTimerGetFreq(pTimer);
-
     bool     fIsPlaying    = false; /* Whether one or more streams are still playing. */
     bool     fDoTransfer   = false;
 
@@ -1826,7 +1831,7 @@ static DECLCALLBACK(void) sb16TimerIO(PPDMDEVINS pDevIns, PTMTIMER pTimer, void
             AssertMsg(pStream->Cfg.cChannels == pStreamPrev->Cfg.cChannels,
                       ("%RU8 vs. %RU8 channels\n", pStream->Cfg.cChannels, pStreamPrev->Cfg.cChannels));
             AssertMsg(pStream->Cfg.enmFormat == pStreamPrev->Cfg.enmFormat,
-                      ("%ld vs. %ld format\n", pStream->Cfg.enmFormat, pStreamPrev->Cfg.enmFormat));
+                      ("%d vs. %d format\n", pStream->Cfg.enmFormat, pStreamPrev->Cfg.enmFormat));
         }
 #endif
         PPDMIAUDIOCONNECTOR pConn = pDrv->pConnector;
@@ -1850,7 +1855,7 @@ static DECLCALLBACK(void) sb16TimerIO(PPDMDEVINS pDevIns, PTMTIMER pTimer, void
                 }
             }
 
-            if (pDrv->Flags & PDMAUDIODRVFLAG_PRIMARY)
+            if (pDrv->Flags & PDMAUDIODRVFLAGS_PRIMARY)
             {
                 /* Only do the next DMA transfer if we're able to write the entire
                  * next data block. */
@@ -1942,7 +1947,7 @@ static void sb16Save(PSSMHANDLE pSSM, PSB16STATE pThis)
 
 }
 
-static int sb16Load(PSSMHANDLE pSSM, PSB16STATE pThis, int version_id)
+static int sb16Load(PSSMHANDLE pSSM, PSB16STATE pThis)
 {
     SSMR3GetS32(pSSM, &pThis->irq);
     SSMR3GetS32(pSSM, &pThis->dma);
@@ -2036,6 +2041,7 @@ static int sb16Load(PSSMHANDLE pSSM, PSB16STATE pThis, int version_id)
 
 static DECLCALLBACK(int) sb16LiveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uPass)
 {
+    RT_NOREF(uPass);
     PSB16STATE pThis = PDMINS_2_DATA(pDevIns, PSB16STATE);
 
     SSMR3PutS32(pSSM, pThis->irqCfg);
@@ -2096,7 +2102,7 @@ static DECLCALLBACK(int) sb16LoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint3
     if (uPass != SSM_PASS_FINAL)
         return VINF_SUCCESS;
 
-    sb16Load(pSSM, pThis, uVersion);
+    sb16Load(pSSM, pThis);
     return VINF_SUCCESS;
 }
 
@@ -2152,7 +2158,7 @@ static int sb16OpenOut(PSB16STATE pThis, PPDMAUDIOSTREAMCFG pCfg)
         {
             rc2 = pDrv->pConnector->pfnStreamCreate(pDrv->pConnector, &CfgHost, pCfg, &pDrv->Out.pStream);
             if (RT_SUCCESS(rc2))
-                pDrv->pConnector->pfnStreamAddRef(pDrv->pConnector, pDrv->Out.pStream);
+                pDrv->pConnector->pfnStreamRetain(pDrv->pConnector, pDrv->Out.pStream);
         }
 
         LogFlowFunc(("LUN#%RU8: Created output \"%s\", rc=%Rrc\n", pDrv->uLUN, pCfg->szName, rc2));
@@ -2255,6 +2261,7 @@ static DECLCALLBACK(void) sb16PowerOff(PPDMDEVINS pDevIns)
  */
 static DECLCALLBACK(int) sb16Destruct(PPDMDEVINS pDevIns)
 {
+    PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
     PSB16STATE pThis = PDMINS_2_DATA(pDevIns, PSB16STATE);
 
     LogFlowFuncEnter();
@@ -2273,13 +2280,14 @@ static DECLCALLBACK(int) sb16Destruct(PPDMDEVINS pDevIns)
 
 static DECLCALLBACK(int) sb16Construct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
 {
+    RT_NOREF(iInstance);
+    PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
     PSB16STATE pThis = PDMINS_2_DATA(pDevIns, PSB16STATE);
 
     /*
      * Validations.
      */
     Assert(iInstance == 0);
-    PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
     if (!CFGMR3AreValuesValid(pCfg,
                               "IRQ\0"
                               "DMA\0"
@@ -2420,7 +2428,7 @@ static DECLCALLBACK(int) sb16Construct(PPDMDEVINS pDevIns, int iInstance, PCFGMN
          * Only primary drivers are critical for the VM to run. Everything else
          * might not worth showing an own error message box in the GUI.
          */
-        if (!(pDrv->Flags & PDMAUDIODRVFLAG_PRIMARY))
+        if (!(pDrv->Flags & PDMAUDIODRVFLAGS_PRIMARY))
             continue;
 
         PPDMIAUDIOCONNECTOR pCon = pDrv->pConnector;
@@ -2467,7 +2475,7 @@ static DECLCALLBACK(int) sb16Construct(PPDMDEVINS pDevIns, int iInstance, PCFGMN
         {
             /* Only register primary driver.
              * The device emulation does the output multiplexing then. */
-            if (pDrv->Flags != PDMAUDIODRVFLAG_PRIMARY)
+            if (pDrv->Flags != PDMAUDIODRVFLAGS_PRIMARY)
                 continue;
 
             PDMAUDIOCALLBACK AudioCallbacks[2];
diff --git a/src/VBox/Devices/Audio/DrvAudio.cpp b/src/VBox/Devices/Audio/DrvAudio.cpp
index 1fe3746..1833fc8 100644
--- a/src/VBox/Devices/Audio/DrvAudio.cpp
+++ b/src/VBox/Devices/Audio/DrvAudio.cpp
@@ -50,6 +50,9 @@ static int drvAudioStreamIterateInternal(PDRVAUDIO pThis, PPDMAUDIOSTREAM pStrea
 static int drvAudioStreamReInitInternal(PDRVAUDIO pThis, PPDMAUDIOSTREAM pStream);
 
 #ifndef VBOX_AUDIO_TESTCASE
+
+# if 0 /* unused */
+
 static PDMAUDIOFMT drvAudioGetConfFormat(PCFGMNODE pCfgHandle, const char *pszKey,
                                          PDMAUDIOFMT enmDefault, bool *pfDefault)
 {
@@ -125,6 +128,8 @@ static const char *drvAudioGetConfStr(PCFGMNODE pCfgHandle, const char *pszKey,
     return pszValue;
 }
 
+# endif /* unused */
+
 /**
  * Returns the host stream part of an audio stream pair, or NULL
  * if no host stream has been assigned / is not available.
@@ -132,7 +137,7 @@ static const char *drvAudioGetConfStr(PCFGMNODE pCfgHandle, const char *pszKey,
  * @returns IPRT status code.
  * @param   pStream             Audio stream to retrieve host stream part for.
  */
-inline PPDMAUDIOSTREAM drvAudioGetHostStream(PPDMAUDIOSTREAM pStream)
+DECLINLINE(PPDMAUDIOSTREAM) drvAudioGetHostStream(PPDMAUDIOSTREAM pStream)
 {
     AssertPtrReturn(pStream, NULL);
 
@@ -152,6 +157,7 @@ inline PPDMAUDIOSTREAM drvAudioGetHostStream(PPDMAUDIOSTREAM pStream)
     return pHstStream;
 }
 
+# if 0 /* unused */
 static int drvAudioProcessOptions(PCFGMNODE pCfgHandle, const char *pszPrefix, audio_option *paOpts, size_t cOpts)
 {
     AssertPtrReturn(pCfgHandle, VERR_INVALID_POINTER);
@@ -243,9 +249,14 @@ static int drvAudioProcessOptions(PCFGMNODE pCfgHandle, const char *pszPrefix, a
 
     return VINF_SUCCESS;
 }
+# endif /* unused */
 #endif /* !VBOX_AUDIO_TESTCASE */
 
-static DECLCALLBACK(int) drvAudioStreamControl(PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)
+/**
+ * @interface_method_impl{PDMIAUDIOCONNECTOR,pfnStreamControl}
+ */
+static DECLCALLBACK(int) drvAudioStreamControl(PPDMIAUDIOCONNECTOR pInterface,
+                                               PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
 
@@ -269,6 +280,14 @@ static DECLCALLBACK(int) drvAudioStreamControl(PPDMIAUDIOCONNECTOR pInterface, P
     return rc;
 }
 
+/**
+ * Controls an audio stream.
+ *
+ * @returns IPRT status code.
+ * @param   pThis               Pointer to driver instance.
+ * @param   pStream             Stream to control.
+ * @param   enmStreamCmd        Control command.
+ */
 static int drvAudioStreamControlInternal(PDRVAUDIO pThis, PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)
 {
     AssertPtrReturn(pThis,   VERR_INVALID_POINTER);
@@ -362,13 +381,23 @@ static int drvAudioStreamControlInternal(PDRVAUDIO pThis, PPDMAUDIOSTREAM pStrea
     return rc;
 }
 
+/**
+ * Controls a stream's backend.
+ * If the stream has no backend available, VERR_NOT_FOUND is returned.
+ *
+ * @returns IPRT status code.
+ * @param   pThis               Pointer to driver instance.
+ * @param   pStream             Stream to control.
+ * @param   enmStreamCmd        Control command.
+ */
 static int drvAudioStreamControlInternalBackend(PDRVAUDIO pThis, PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)
 {
     AssertPtrReturn(pThis,   VERR_INVALID_POINTER);
     AssertPtrReturn(pStream, VERR_INVALID_POINTER);
 
     PPDMAUDIOSTREAM pHstStream = drvAudioGetHostStream(pStream);
-    AssertPtr(pHstStream);
+    if (!pHstStream) /* Stream does not have a host backend? Bail out. */
+        return VERR_NOT_FOUND;
 
     LogFlowFunc(("[%s] enmStreamCmd=%RU32, fStatus=0x%x\n", pHstStream->szName, enmStreamCmd, pHstStream->fStatus));
 
@@ -376,90 +405,87 @@ static int drvAudioStreamControlInternalBackend(PDRVAUDIO pThis, PPDMAUDIOSTREAM
 
     int rc = VINF_SUCCESS;
 
-    if (RT_SUCCESS(rc))
+    switch (enmStreamCmd)
     {
-        switch (enmStreamCmd)
+        case PDMAUDIOSTREAMCMD_ENABLE:
         {
-            case PDMAUDIOSTREAMCMD_ENABLE:
+            if (!(pHstStream->fStatus & PDMAUDIOSTRMSTS_FLAG_ENABLED))
             {
-                if (!(pHstStream->fStatus & PDMAUDIOSTRMSTS_FLAG_ENABLED))
+                LogRel2(("Audio: Enabling stream '%s'\n", pHstStream->szName));
+                rc = pThis->pHostDrvAudio->pfnStreamControl(pThis->pHostDrvAudio, pHstStream, PDMAUDIOSTREAMCMD_ENABLE);
+                if (RT_SUCCESS(rc))
                 {
-                    LogRel2(("Audio: Enabling stream '%s'\n", pHstStream->szName));
-                    rc = pThis->pHostDrvAudio->pfnStreamControl(pThis->pHostDrvAudio, pHstStream, PDMAUDIOSTREAMCMD_ENABLE);
-                    if (RT_SUCCESS(rc))
-                    {
-                        pHstStream->fStatus |= PDMAUDIOSTRMSTS_FLAG_ENABLED;
-                    }
-                    else
-                        LogRel2(("Audio: Disabling stream '%s' failed with %Rrc\n", pHstStream->szName, rc));
+                    pHstStream->fStatus |= PDMAUDIOSTRMSTS_FLAG_ENABLED;
                 }
-                break;
+                else
+                    LogRel2(("Audio: Disabling stream '%s' failed with %Rrc\n", pHstStream->szName, rc));
             }
+            break;
+        }
 
-            case PDMAUDIOSTREAMCMD_DISABLE:
+        case PDMAUDIOSTREAMCMD_DISABLE:
+        {
+            if (pHstStream->fStatus & PDMAUDIOSTRMSTS_FLAG_ENABLED)
             {
-                if (pHstStream->fStatus & PDMAUDIOSTRMSTS_FLAG_ENABLED)
+                LogRel2(("Audio: Disabling stream '%s'\n", pHstStream->szName));
+                rc = pThis->pHostDrvAudio->pfnStreamControl(pThis->pHostDrvAudio, pHstStream, PDMAUDIOSTREAMCMD_DISABLE);
+                if (RT_SUCCESS(rc))
                 {
-                    LogRel2(("Audio: Disabling stream '%s'\n", pHstStream->szName));
-                    rc = pThis->pHostDrvAudio->pfnStreamControl(pThis->pHostDrvAudio, pHstStream, PDMAUDIOSTREAMCMD_DISABLE);
-                    if (RT_SUCCESS(rc))
-                    {
-                        pHstStream->fStatus &= ~PDMAUDIOSTRMSTS_FLAG_ENABLED;
-                        pHstStream->fStatus &= ~PDMAUDIOSTRMSTS_FLAG_PENDING_DISABLE;
-                        AudioMixBufReset(&pHstStream->MixBuf);
-                    }
-                    else
-                        LogRel2(("Audio: Disabling stream '%s' failed with %Rrc\n", pHstStream->szName, rc));
+                    pHstStream->fStatus &= ~PDMAUDIOSTRMSTS_FLAG_ENABLED;
+                    pHstStream->fStatus &= ~PDMAUDIOSTRMSTS_FLAG_PENDING_DISABLE;
+                    AudioMixBufReset(&pHstStream->MixBuf);
                 }
-                break;
+                else
+                    LogRel2(("Audio: Disabling stream '%s' failed with %Rrc\n", pHstStream->szName, rc));
             }
+            break;
+        }
 
-            case PDMAUDIOSTREAMCMD_PAUSE:
-            {
-                /* Only pause if the stream is enabled. */
-                if (!(pHstStream->fStatus & PDMAUDIOSTRMSTS_FLAG_ENABLED))
-                    break;
+        case PDMAUDIOSTREAMCMD_PAUSE:
+        {
+            /* Only pause if the stream is enabled. */
+            if (!(pHstStream->fStatus & PDMAUDIOSTRMSTS_FLAG_ENABLED))
+                break;
 
-                if (!(pHstStream->fStatus & PDMAUDIOSTRMSTS_FLAG_PAUSED))
+            if (!(pHstStream->fStatus & PDMAUDIOSTRMSTS_FLAG_PAUSED))
+            {
+                LogRel2(("Audio: Pausing stream '%s'\n", pHstStream->szName));
+                rc = pThis->pHostDrvAudio->pfnStreamControl(pThis->pHostDrvAudio, pHstStream, PDMAUDIOSTREAMCMD_PAUSE);
+                if (RT_SUCCESS(rc))
                 {
-                    LogRel2(("Audio: Pausing stream '%s'\n", pHstStream->szName));
-                    rc = pThis->pHostDrvAudio->pfnStreamControl(pThis->pHostDrvAudio, pHstStream, PDMAUDIOSTREAMCMD_PAUSE);
-                    if (RT_SUCCESS(rc))
-                    {
-                        pHstStream->fStatus |= PDMAUDIOSTRMSTS_FLAG_PAUSED;
-                    }
-                    else
-                        LogRel2(("Audio: Pausing stream '%s' failed with %Rrc\n", pHstStream->szName, rc));
+                    pHstStream->fStatus |= PDMAUDIOSTRMSTS_FLAG_PAUSED;
                 }
-                break;
+                else
+                    LogRel2(("Audio: Pausing stream '%s' failed with %Rrc\n", pHstStream->szName, rc));
             }
+            break;
+        }
 
-            case PDMAUDIOSTREAMCMD_RESUME:
-            {
-                /* Only need to resume if the stream is enabled. */
-                if (!(pHstStream->fStatus & PDMAUDIOSTRMSTS_FLAG_ENABLED))
-                    break;
+        case PDMAUDIOSTREAMCMD_RESUME:
+        {
+            /* Only need to resume if the stream is enabled. */
+            if (!(pHstStream->fStatus & PDMAUDIOSTRMSTS_FLAG_ENABLED))
+                break;
 
-                if (pHstStream->fStatus & PDMAUDIOSTRMSTS_FLAG_PAUSED)
+            if (pHstStream->fStatus & PDMAUDIOSTRMSTS_FLAG_PAUSED)
+            {
+                LogRel2(("Audio: Resuming stream '%s'\n", pHstStream->szName));
+                rc = pThis->pHostDrvAudio->pfnStreamControl(pThis->pHostDrvAudio, pHstStream, PDMAUDIOSTREAMCMD_RESUME);
+                if (RT_SUCCESS(rc))
                 {
-                    LogRel2(("Audio: Resuming stream '%s'\n", pHstStream->szName));
-                    rc = pThis->pHostDrvAudio->pfnStreamControl(pThis->pHostDrvAudio, pHstStream, PDMAUDIOSTREAMCMD_RESUME);
-                    if (RT_SUCCESS(rc))
-                    {
-                        pHstStream->fStatus &= ~PDMAUDIOSTRMSTS_FLAG_PAUSED;
-                    }
-                    else
-                        LogRel2(("Audio: Resuming stream '%s' failed with %Rrc\n", pHstStream->szName, rc));
+                    pHstStream->fStatus &= ~PDMAUDIOSTRMSTS_FLAG_PAUSED;
                 }
-                break;
+                else
+                    LogRel2(("Audio: Resuming stream '%s' failed with %Rrc\n", pHstStream->szName, rc));
             }
+            break;
+        }
 
-            default:
-            {
-                AssertMsgFailed(("Command %RU32 not implemented\n", enmStreamCmd));
-                rc = VERR_NOT_IMPLEMENTED;
-                break;
-            }
+        default:
+        {
+            AssertMsgFailed(("Command %RU32 not implemented\n", enmStreamCmd));
+            rc = VERR_NOT_IMPLEMENTED;
+            break;
         }
     }
 
@@ -469,6 +495,15 @@ static int drvAudioStreamControlInternalBackend(PDRVAUDIO pThis, PPDMAUDIOSTREAM
     return rc;
 }
 
+/**
+ * Initializes an audio stream with a given host and guest stream configuration.
+ *
+ * @returns IPRT status code.
+ * @param   pThis               Pointer to driver instance.
+ * @param   pStream             Stream to initialize.
+ * @param   pCfgHost            Stream configuration to use for the host side (backend).
+ * @param   pCfgGuest           Stream configuration to use for the guest side.
+ */
 static int drvAudioStreamInitInternal(PDRVAUDIO pThis,
                                       PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfgHost, PPDMAUDIOSTREAMCFG pCfgGuest)
 {
@@ -479,39 +514,63 @@ static int drvAudioStreamInitInternal(PDRVAUDIO pThis,
     PPDMAUDIOSTREAM pGstStream = pHstStream ? pHstStream->pPair : pStream;
     AssertPtr(pGstStream);
 
-    LogFlowFunc(("[%s]\n", pStream->szName));
-
     /*
      * Init host stream.
      */
 
-    uint32_t cSamples = 0;
-    int rc = pThis->pHostDrvAudio->pfnStreamCreate(pThis->pHostDrvAudio, pHstStream, pCfgHost, &cSamples);
-    if (RT_SUCCESS(rc))
+    /* Make the acquired host configuration the requested host configuration initially,
+     * in case the backend does not report back an acquired configuration. */
+    PDMAUDIOSTREAMCFG CfgHostAcq;
+    memcpy(&CfgHostAcq, pCfgHost, sizeof(PDMAUDIOSTREAMCFG));
+
+#ifdef DEBUG
+    LogFunc(("[%s] Requested host format:\n", pStream->szName));
+    DrvAudioHlpStreamCfgPrint(pCfgHost);
+#else
+    LogRel2(("Audio: Requested %s host format for '%s': %RU32Hz, %s, %RU8 %s\n",
+             pCfgGuest->enmDir == PDMAUDIODIR_IN ? "recording" : "playback",  pStream->szName,
+             pCfgHost->uHz, DrvAudioHlpAudFmtToStr(pCfgHost->enmFormat),
+             pCfgHost->cChannels, pCfgHost->cChannels == 0 ? "Channel" : "Channels"));
+#endif
+
+    int rc = pThis->pHostDrvAudio->pfnStreamCreate(pThis->pHostDrvAudio, pHstStream,
+                                                   pCfgHost /* pCfgReq */, &CfgHostAcq /* pCfgAcq */);
+    if (RT_FAILURE(rc))
     {
-        /* Only set the host's stream to initialized if we were able create the stream
-         * in the host backend. This is necessary for trying to re-initialize the stream
-         * at some later point in time. */
-        pHstStream->fStatus |= PDMAUDIOSTRMSTS_FLAG_INITIALIZED;
-    }
-    else
         LogFlowFunc(("[%s] Initializing stream in host backend failed with rc=%Rrc\n", pStream->szName, rc));
+        return rc;
+    }
 
-    int rc2 = DrvAudioHlpStreamCfgToProps(pCfgHost, &pHstStream->Props);
+    /* Only set the host's stream to initialized if we were able create the stream
+     * in the host backend. This is necessary for trying to re-initialize the stream
+     * at some later point in time. */
+    pHstStream->fStatus |= PDMAUDIOSTRMSTS_FLAG_INITIALIZED;
+
+#ifdef DEBUG
+    LogFunc(("[%s] Acquired host format:\n",  pStream->szName));
+    DrvAudioHlpStreamCfgPrint(&CfgHostAcq);
+#else
+    LogRel2(("Audio: Acquired %s host format for '%s': %RU32Hz, %s, %RU8 %s\n",
+             pCfgGuest->enmDir == PDMAUDIODIR_IN ? "recording" : "playback",  pStream->szName,
+             CfgHostAcq.uHz, DrvAudioHlpAudFmtToStr(CfgHostAcq.enmFormat),
+             CfgHostAcq.cChannels, CfgHostAcq.cChannels == 0 ? "Channel" : "Channels"));
+#endif
+
+    /* No sample buffer size hint given by the backend? Default to some sane value. */
+    if (!CfgHostAcq.cSampleBufferSize)
+        CfgHostAcq.cSampleBufferSize = _1K; /** @todo Make this configurable? */
+
+    PDMAUDIOPCMPROPS PCMProps;
+    int rc2 = DrvAudioHlpStreamCfgToProps(&CfgHostAcq, &PCMProps);
     AssertRC(rc2);
 
     /* Destroy any former mixing buffer. */
     AudioMixBufDestroy(&pHstStream->MixBuf);
 
-    if (cSamples)
-    {
-        cSamples = cSamples * 4;
-
-        LogFlowFunc(("[%s] cSamples=%RU32\n", pHstStream->szName, cSamples));
+    LogFlowFunc(("[%s] cSamples=%RU32\n", pHstStream->szName, CfgHostAcq.cSampleBufferSize * 4));
 
-        rc2 = AudioMixBufInit(&pHstStream->MixBuf, pHstStream->szName, &pHstStream->Props, cSamples);
-        AssertRC(rc2);
-    }
+    rc2 = AudioMixBufInit(&pHstStream->MixBuf, pHstStream->szName, &PCMProps, CfgHostAcq.cSampleBufferSize * 4);
+    AssertRC(rc2);
 
     /* Make a copy of the host stream configuration. */
     memcpy(&pHstStream->Cfg, pCfgHost, sizeof(PDMAUDIOSTREAMCFG));
@@ -520,68 +579,61 @@ static int drvAudioStreamInitInternal(PDRVAUDIO pThis,
      * Init guest stream.
      */
 
-    rc2 = DrvAudioHlpStreamCfgToProps(pCfgGuest, &pGstStream->Props);
+    RT_ZERO(PCMProps);
+    rc2 = DrvAudioHlpStreamCfgToProps(pCfgGuest, &PCMProps);
     AssertRC(rc2);
 
     /* Destroy any former mixing buffer. */
     AudioMixBufDestroy(&pGstStream->MixBuf);
 
-    if (cSamples)
-    {
-        cSamples = cSamples * 2;
-
-        LogFlowFunc(("[%s] cSamples=%RU32\n", pGstStream->szName, cSamples));
+    LogFlowFunc(("[%s] cSamples=%RU32\n", pGstStream->szName, CfgHostAcq.cSampleBufferSize * 2));
 
-        rc2 = AudioMixBufInit(&pGstStream->MixBuf, pGstStream->szName, &pGstStream->Props, cSamples);
-        AssertRC(rc2);
-    }
+    rc2 = AudioMixBufInit(&pGstStream->MixBuf, pGstStream->szName, &PCMProps, CfgHostAcq.cSampleBufferSize * 2);
+    AssertRC(rc2);
 
 #ifdef VBOX_WITH_STATISTICS
     char szStatName[255];
 #endif
 
-    if (cSamples)
+    if (pCfgGuest->enmDir == PDMAUDIODIR_IN)
     {
-        if (pCfgGuest->enmDir == PDMAUDIODIR_IN)
-        {
-            /* Host (Parent) -> Guest (Child). */
-            rc2 = AudioMixBufLinkTo(&pHstStream->MixBuf, &pGstStream->MixBuf);
-            AssertRC(rc2);
+        /* Host (Parent) -> Guest (Child). */
+        rc2 = AudioMixBufLinkTo(&pHstStream->MixBuf, &pGstStream->MixBuf);
+        AssertRC(rc2);
 
 #ifdef VBOX_WITH_STATISTICS
-            RTStrPrintf(szStatName, sizeof(szStatName), "Guest/%s/BytesElapsed", pGstStream->szName);
-            PDMDrvHlpSTAMRegCounterEx(pThis->pDrvIns, &pGstStream->In.StatBytesElapsed,
-                                      szStatName, STAMUNIT_BYTES, "Elapsed bytes read.");
+        RTStrPrintf(szStatName, sizeof(szStatName), "Guest/%s/BytesElapsed", pGstStream->szName);
+        PDMDrvHlpSTAMRegCounterEx(pThis->pDrvIns, &pGstStream->In.StatBytesElapsed,
+                                  szStatName, STAMUNIT_BYTES, "Elapsed bytes read.");
 
-            RTStrPrintf(szStatName, sizeof(szStatName), "Guest/%s/BytesRead", pGstStream->szName);
-            PDMDrvHlpSTAMRegCounterEx(pThis->pDrvIns, &pGstStream->In.StatBytesTotalRead,
-                                      szStatName, STAMUNIT_BYTES, "Total bytes read.");
+        RTStrPrintf(szStatName, sizeof(szStatName), "Guest/%s/BytesRead", pGstStream->szName);
+        PDMDrvHlpSTAMRegCounterEx(pThis->pDrvIns, &pGstStream->In.StatBytesTotalRead,
+                                  szStatName, STAMUNIT_BYTES, "Total bytes read.");
 
-            RTStrPrintf(szStatName, sizeof(szStatName), "Host/%s/SamplesCaptured", pHstStream->szName);
-            PDMDrvHlpSTAMRegCounterEx(pThis->pDrvIns, &pHstStream->In.StatSamplesCaptured,
-                                      szStatName, STAMUNIT_COUNT, "Total samples captured.");
+        RTStrPrintf(szStatName, sizeof(szStatName), "Host/%s/SamplesCaptured", pHstStream->szName);
+        PDMDrvHlpSTAMRegCounterEx(pThis->pDrvIns, &pHstStream->In.StatSamplesCaptured,
+                                  szStatName, STAMUNIT_COUNT, "Total samples captured.");
 #endif
-        }
-        else
-        {
-            /* Guest (Parent) -> Host (Child). */
-            rc2 = AudioMixBufLinkTo(&pGstStream->MixBuf, &pHstStream->MixBuf);
-            AssertRC(rc2);
+    }
+    else
+    {
+        /* Guest (Parent) -> Host (Child). */
+        rc2 = AudioMixBufLinkTo(&pGstStream->MixBuf, &pHstStream->MixBuf);
+        AssertRC(rc2);
 
 #ifdef VBOX_WITH_STATISTICS
-            RTStrPrintf(szStatName, sizeof(szStatName), "Guest/%s/BytesElapsed", pGstStream->szName);
-            PDMDrvHlpSTAMRegCounterEx(pThis->pDrvIns, &pGstStream->Out.StatBytesElapsed,
-                                      szStatName, STAMUNIT_BYTES, "Elapsed bytes written.");
+        RTStrPrintf(szStatName, sizeof(szStatName), "Guest/%s/BytesElapsed", pGstStream->szName);
+        PDMDrvHlpSTAMRegCounterEx(pThis->pDrvIns, &pGstStream->Out.StatBytesElapsed,
+                                  szStatName, STAMUNIT_BYTES, "Elapsed bytes written.");
 
-            RTStrPrintf(szStatName, sizeof(szStatName), "Guest/%s/BytesRead", pGstStream->szName);
-            PDMDrvHlpSTAMRegCounterEx(pThis->pDrvIns, &pGstStream->Out.StatBytesTotalWritten,
-                                      szStatName, STAMUNIT_BYTES, "Total bytes written.");
+        RTStrPrintf(szStatName, sizeof(szStatName), "Guest/%s/BytesRead", pGstStream->szName);
+        PDMDrvHlpSTAMRegCounterEx(pThis->pDrvIns, &pGstStream->Out.StatBytesTotalWritten,
+                                  szStatName, STAMUNIT_BYTES, "Total bytes written.");
 
-            RTStrPrintf(szStatName, sizeof(szStatName), "Host/%s/SamplesPlayed", pHstStream->szName);
-            PDMDrvHlpSTAMRegCounterEx(pThis->pDrvIns, &pHstStream->Out.StatSamplesPlayed,
-                                      szStatName, STAMUNIT_COUNT, "Total samples played.");
+        RTStrPrintf(szStatName, sizeof(szStatName), "Host/%s/SamplesPlayed", pHstStream->szName);
+        PDMDrvHlpSTAMRegCounterEx(pThis->pDrvIns, &pHstStream->Out.StatSamplesPlayed,
+                                  szStatName, STAMUNIT_COUNT, "Total samples played.");
 #endif
-        }
     }
 
     /* Make a copy of the host stream configuration. */
@@ -591,6 +643,13 @@ static int drvAudioStreamInitInternal(PDRVAUDIO pThis,
     return rc;
 }
 
+/**
+ * Re-initializes an audio stream with its existing host and guest stream configuration.
+ *
+ * @returns IPRT status code.
+ * @param   pThis               Pointer to driver instance.
+ * @param   pStream             Stream to re-initialize.
+ */
 static int drvAudioStreamReInitInternal(PDRVAUDIO pThis, PPDMAUDIOSTREAM pStream)
 {
     AssertPtrReturn(pThis,   VERR_INVALID_POINTER);
@@ -656,17 +715,7 @@ static int drvAudioStreamReInitInternal(PDRVAUDIO pThis, PPDMAUDIOSTREAM pStream
 }
 
 /**
- * Writes VM audio output data from the guest stream into the host stream.
- * The attached host driver backend then will play out the audio in a
- * later step then.
- *
- * @return  IPRT status code.
- * @return  int
- * @param   pThis
- * @param   pGstStrmOut
- * @param   pvBuf
- * @param   cbBuf
- * @param   pcbWritten
+ * @interface_method_impl{PDMIAUDIOCONNECTOR,pfnStreamWrite}
  */
 static DECLCALLBACK(int) drvAudioStreamWrite(PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream,
                                              const void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten)
@@ -717,6 +766,8 @@ static DECLCALLBACK(int) drvAudioStreamWrite(PPDMIAUDIOCONNECTOR pInterface, PPD
         AssertMsg(pGstStream->fStatus & PDMAUDIOSTRMSTS_FLAG_ENABLED,
                   ("Writing to disabled guest output stream \"%s\" not possible\n", pGstStream->szName));
 
+        pGstStream->Out.tsLastWriteMS = RTTimeMilliTS();
+
         if (!AudioMixBufFreeBytes(&pGstStream->MixBuf))
         {
             LogRel2(("Audio: Guest stream '%s' full, expect stuttering audio output\n", pGstStream->szName));
@@ -756,20 +807,26 @@ static DECLCALLBACK(int) drvAudioStreamWrite(PPDMIAUDIOCONNECTOR pInterface, PPD
     return rc;
 }
 
-static DECLCALLBACK(uint32_t) drvAudioStreamAddRef(PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream)
+/**
+ * @interface_method_impl{PDMIAUDIOCONNECTOR,pfnStreamRetain}
+ */
+static DECLCALLBACK(uint32_t) drvAudioStreamRetain(PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream)
 {
-   AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
-   AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
+   AssertPtrReturn(pInterface, UINT32_MAX);
+   AssertPtrReturn(pStream,    UINT32_MAX);
 
    NOREF(pInterface);
 
    return ++pStream->cRefs;
 }
 
+/**
+ * @interface_method_impl{PDMIAUDIOCONNECTOR,pfnStreamRelease}
+ */
 static DECLCALLBACK(uint32_t) drvAudioStreamRelease(PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream)
 {
-   AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
-   AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
+   AssertPtrReturn(pInterface, UINT32_MAX);
+   AssertPtrReturn(pStream,    UINT32_MAX);
 
    NOREF(pInterface);
 
@@ -779,6 +836,9 @@ static DECLCALLBACK(uint32_t) drvAudioStreamRelease(PPDMIAUDIOCONNECTOR pInterfa
    return pStream->cRefs;
 }
 
+/**
+ * @interface_method_impl{PDMIAUDIOCONNECTOR,pfnStreamIterate}
+ */
 static DECLCALLBACK(int) drvAudioStreamIterate(PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
@@ -803,6 +863,17 @@ static DECLCALLBACK(int) drvAudioStreamIterate(PPDMIAUDIOCONNECTOR pInterface, P
     return rc;
 }
 
+/**
+ * Does one iteration of an audio stream.
+ * This function gives the backend the chance of iterating / altering data and
+ * does the actual mixing between the guest <-> host mixing buffers.
+ *
+ * @returns IPRT status code.
+ * @param   pThis               Pointer to driver instance.
+ * @param   pStream             Stream to iterate.
+ *
+ * @remark
+ */
 static int drvAudioStreamIterateInternal(PDRVAUDIO pThis, PPDMAUDIOSTREAM pStream)
 {
     AssertPtrReturn(pThis, VERR_INVALID_POINTER);
@@ -853,25 +924,19 @@ static int drvAudioStreamIterateInternal(PDRVAUDIO pThis, PPDMAUDIOSTREAM pStrea
         }
         else if (pHstStream->enmDir == PDMAUDIODIR_OUT)
         {
-            uint32_t cSamplesLive = AudioMixBufLive(&pGstStream->MixBuf);
-            if (!cSamplesLive) /* No live samples at the moment? */
+            /* When playing samples, the host is the parent while the guest is the child.
+             * So try mixing not yet mixed guest-side samples to the host-side buffer. */
+            rc = AudioMixBufMixToParent(&pGstStream->MixBuf, AudioMixBufUsed(&pGstStream->MixBuf), &cSamplesMixed);
+            if (   RT_SUCCESS(rc)
+                && cSamplesMixed)
             {
-                /* When playing samples, the host is the parent while the guest is the child.
-                 * So try mixing not yet mixed guest-side samples to the host-side buffer. */
-                rc = AudioMixBufMixToParent(&pGstStream->MixBuf, AudioMixBufUsed(&pGstStream->MixBuf), &cSamplesMixed);
-                if (   RT_SUCCESS(rc)
-                    && cSamplesMixed)
-                {
-                    Log3Func(("[%s] %RU32 samples mixed\n", pHstStream->szName, cSamplesMixed));
-                }
-
-                if (RT_SUCCESS(rc))
-                    cSamplesLive = AudioMixBufLive(&pGstStream->MixBuf);
+                Log3Func(("[%s] %RU32 samples mixed, guest has %RU32 samples left (%RU32 live)\n",
+                          pHstStream->szName, cSamplesMixed,
+                          AudioMixBufUsed(&pGstStream->MixBuf), AudioMixBufLive(&pGstStream->MixBuf)));
             }
 
-            Log3Func(("[%s] %RU32 live samples\n", pHstStream->szName, cSamplesLive));
-
-            if (!cSamplesLive) /* No live samples (anymore)? */
+            uint32_t cSamplesLeft = AudioMixBufUsed(&pGstStream->MixBuf);
+            if (!cSamplesLeft) /* No samples (anymore)? */
             {
                 fTryClosePending = true;
             }
@@ -898,12 +963,19 @@ static int drvAudioStreamIterateInternal(PDRVAUDIO pThis, PPDMAUDIOSTREAM pStrea
 
     } while (0);
 
+    /* Update timestamps. */
+    pHstStream->tsLastIterateMS = RTTimeMilliTS();
+    pGstStream->tsLastIterateMS = RTTimeMilliTS();
+
     if (RT_FAILURE(rc))
         LogFunc(("Failed with %Rrc\n", rc));
 
     return rc;
 }
 
+/**
+ * @interface_method_impl{PDMIAUDIOCONNECTOR,pfnStreamPlay}
+ */
 static DECLCALLBACK(int) drvAudioStreamPlay(PPDMIAUDIOCONNECTOR pInterface,
                                             PPDMAUDIOSTREAM pStream, uint32_t *pcSamplesPlayed)
 {
@@ -972,7 +1044,8 @@ static DECLCALLBACK(int) drvAudioStreamPlay(PPDMIAUDIOCONNECTOR pInterface,
                 && (strmSts & PDMAUDIOSTRMSTS_FLAG_DATA_WRITABLE))
             {
                 AssertPtr(pThis->pHostDrvAudio->pfnStreamPlay);
-                rc = pThis->pHostDrvAudio->pfnStreamPlay(pThis->pHostDrvAudio, pHstStream, &cSamplesPlayed);
+                rc = pThis->pHostDrvAudio->pfnStreamPlay(pThis->pHostDrvAudio, pHstStream, NULL /* pvBuf */, 0 /* cbBuf */,
+                                                         &cSamplesPlayed);
                 if (RT_FAILURE(rc))
                 {
                     int rc2 = drvAudioStreamControlInternalBackend(pThis, pHstStream, PDMAUDIOSTREAMCMD_DISABLE);
@@ -984,10 +1057,9 @@ static DECLCALLBACK(int) drvAudioStreamPlay(PPDMIAUDIOCONNECTOR pInterface,
                     STAM_COUNTER_ADD(&pThis->Stats.TotalSamplesPlayed, cSamplesPlayed);
                     STAM_COUNTER_ADD(&pHstStream->Out.StatSamplesPlayed, cSamplesPlayed);
 #endif
+                    cSamplesLive = AudioMixBufLive(&pGstStream->MixBuf);
                 }
             }
-
-            Log3Func(("[%s] strmSts=0x%x, cSamplesPlayed=%RU32, rc=%Rrc\n", pHstStream->szName, strmSts, cSamplesPlayed, rc));
         }
 
         if (!cSamplesLive)
@@ -1025,6 +1097,9 @@ static DECLCALLBACK(int) drvAudioStreamPlay(PPDMIAUDIOCONNECTOR pInterface,
     return rc;
 }
 
+/**
+ * @interface_method_impl{PDMIAUDIOCONNECTOR,pfnStreamCapture}
+ */
 static DECLCALLBACK(int) drvAudioStreamCapture(PPDMIAUDIOCONNECTOR pInterface,
                                                PPDMAUDIOSTREAM pStream, uint32_t *pcSamplesCaptured)
 {
@@ -1077,7 +1152,8 @@ static DECLCALLBACK(int) drvAudioStreamCapture(PPDMIAUDIOCONNECTOR pInterface,
             if (   (strmSts & PDMAUDIOSTRMSTS_FLAG_INITIALIZED)
                 && (strmSts & PDMAUDIOSTRMSTS_FLAG_DATA_READABLE))
             {
-                rc = pThis->pHostDrvAudio->pfnStreamCapture(pThis->pHostDrvAudio, pHstStream, &cSamplesCaptured);
+                rc = pThis->pHostDrvAudio->pfnStreamCapture(pThis->pHostDrvAudio, pHstStream, NULL /* pvBuf */, 0 /* cbBuf */,
+                                                            &cSamplesCaptured);
                 if (RT_FAILURE(rc))
                 {
                     int rc2 = drvAudioStreamControlInternalBackend(pThis, pHstStream, PDMAUDIOSTREAMCMD_DISABLE);
@@ -1113,8 +1189,16 @@ static DECLCALLBACK(int) drvAudioStreamCapture(PPDMIAUDIOCONNECTOR pInterface,
 }
 
 #ifdef VBOX_WITH_AUDIO_CALLBACKS
+/**
+ * Duplicates an audio callback.
+ *
+ * @returns Pointer to duplicated callback, or NULL on failure.
+ * @param   pCB                 Callback to duplicate.
+ */
 static PPDMAUDIOCALLBACK drvAudioCallbackDuplicate(PPDMAUDIOCALLBACK pCB)
 {
+    AssertPtrReturn(pCB, VERR_INVALID_POINTER);
+
     PPDMAUDIOCALLBACK pCBCopy = (PPDMAUDIOCALLBACK)RTMemDup((void *)pCB, sizeof(PDMAUDIOCALLBACK));
     if (!pCBCopy)
         return NULL;
@@ -1134,6 +1218,11 @@ static PPDMAUDIOCALLBACK drvAudioCallbackDuplicate(PPDMAUDIOCALLBACK pCB)
     return pCBCopy;
 }
 
+/**
+ * Destroys a given callback.
+ *
+ * @param   pCB                 Callback to destroy.
+ */
 static void drvAudioCallbackDestroy(PPDMAUDIOCALLBACK pCB)
 {
     if (!pCB)
@@ -1148,6 +1237,9 @@ static void drvAudioCallbackDestroy(PPDMAUDIOCALLBACK pCB)
     RTMemFree(pCB);
 }
 
+/**
+ * @interface_method_impl{PDMIAUDIOCONNECTOR,pfnRegisterCallbacks}
+ */
 static DECLCALLBACK(int) drvAudioRegisterCallbacks(PPDMIAUDIOCONNECTOR pInterface,
                                                    PPDMAUDIOCALLBACK paCallbacks, size_t cCallbacks)
 {
@@ -1195,6 +1287,9 @@ static DECLCALLBACK(int) drvAudioRegisterCallbacks(PPDMIAUDIOCONNECTOR pInterfac
     return rc;
 }
 
+/**
+ * @interface_method_impl{PDMIAUDIOCONNECTOR,pfnCallback}
+ */
 static DECLCALLBACK(int) drvAudioCallback(PPDMIAUDIOCONNECTOR pInterface, PDMAUDIOCALLBACKTYPE enmType,
                                           void *pvUser, size_t cbUser)
 {
@@ -1298,6 +1393,12 @@ static int drvAudioHostInit(PDRVAUDIO pThis, PCFGMNODE pCfgHandle)
     return VINF_SUCCESS;
 }
 
+/**
+ * Handles state changes for all audio streams.
+ *
+ * @param   pDrvIns             Pointer to driver instance.
+ * @param   enmCmd              Stream command to set for all streams.
+ */
 static void drvAudioStateHandler(PPDMDRVINS pDrvIns, PDMAUDIOSTREAMCMD enmCmd)
 {
     PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns);
@@ -1313,7 +1414,14 @@ static void drvAudioStateHandler(PPDMDRVINS pDrvIns, PDMAUDIOSTREAMCMD enmCmd)
         drvAudioStreamControlInternalBackend(pThis, pHstStream, enmCmd);
 }
 
-static DECLCALLBACK(int) drvAudioInit(PCFGMNODE pCfgHandle, PPDMDRVINS pDrvIns)
+/**
+ * Intializes an audio driver instance.
+ *
+ * @returns IPRT status code.
+ * @param   pDrvIns             Pointer to driver instance.
+ * @param   pCfgHandle          CFGM handle to use for configuration.
+ */
+static int drvAudioInit(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle)
 {
     AssertPtrReturn(pCfgHandle, VERR_INVALID_POINTER);
     AssertPtrReturn(pDrvIns,    VERR_INVALID_POINTER);
@@ -1335,6 +1443,9 @@ static DECLCALLBACK(int) drvAudioInit(PCFGMNODE pCfgHandle, PPDMDRVINS pDrvIns)
     return rc;
 }
 
+/**
+ * @interface_method_impl{PDMIAUDIOCONNECTOR,pfnStreamRead}
+ */
 static DECLCALLBACK(int) drvAudioStreamRead(PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream,
                                             void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead)
 {
@@ -1384,6 +1495,8 @@ static DECLCALLBACK(int) drvAudioStreamRead(PPDMIAUDIOCONNECTOR pInterface, PPDM
         AssertMsg(pHstStream->fStatus & PDMAUDIOSTRMSTS_FLAG_ENABLED,
                   ("Reading from disabled host input stream '%s' not possible\n", pHstStream->szName));
 
+        pGstStream->In.tsLastReadMS = RTTimeMilliTS();
+
         Log3Func(("%s\n", pStream->szName));
 
         /*
@@ -1423,6 +1536,9 @@ static DECLCALLBACK(int) drvAudioStreamRead(PPDMIAUDIOCONNECTOR pInterface, PPDM
     return rc;
 }
 
+/**
+ * @interface_method_impl{PDMIAUDIOCONNECTOR,pfnStreamCreate}
+ */
 static DECLCALLBACK(int) drvAudioStreamCreate(PPDMIAUDIOCONNECTOR pInterface,
                                               PPDMAUDIOSTREAMCFG pCfgHost, PPDMAUDIOSTREAMCFG pCfgGuest,
                                               PPDMAUDIOSTREAM *ppStream)
@@ -1597,6 +1713,9 @@ static DECLCALLBACK(int) drvAudioStreamCreate(PPDMIAUDIOCONNECTOR pInterface,
     return rc;
 }
 
+/**
+ * @interface_method_impl{PDMIAUDIOCONNECTOR,pfnGetConfig}
+ */
 static DECLCALLBACK(int) drvAudioGetConfig(PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOBACKENDCFG pCfg)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
@@ -1626,6 +1745,9 @@ static DECLCALLBACK(int) drvAudioGetConfig(PPDMIAUDIOCONNECTOR pInterface, PPDMA
     return rc;
 }
 
+/**
+ * @interface_method_impl{PDMIAUDIOCONNECTOR,pfnGetStatus}
+ */
 static DECLCALLBACK(PDMAUDIOBACKENDSTS) drvAudioGetStatus(PPDMIAUDIOCONNECTOR pInterface, PDMAUDIODIR enmDir)
 {
     AssertPtrReturn(pInterface, PDMAUDIOBACKENDSTS_UNKNOWN);
@@ -1652,6 +1774,9 @@ static DECLCALLBACK(PDMAUDIOBACKENDSTS) drvAudioGetStatus(PPDMIAUDIOCONNECTOR pI
     return backendSts;
 }
 
+/**
+ * @interface_method_impl{PDMIAUDIOCONNECTOR,pfnStreamGetReadable}
+ */
 static DECLCALLBACK(uint32_t) drvAudioStreamGetReadable(PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream)
 {
     AssertPtrReturn(pInterface, 0);
@@ -1679,7 +1804,8 @@ static DECLCALLBACK(uint32_t) drvAudioStreamGetReadable(PPDMIAUDIOCONNECTOR pInt
     if (pGstStream)
         cReadable = AudioMixBufLive(&pGstStream->MixBuf);
 
-    Log3Func(("[%s] cbReadable=%RU32\n", pHstStream->szName, cReadable));
+    Log3Func(("[%s] cbReadable=%RU32 (%zu bytes)\n", pHstStream->szName, cReadable,
+              AUDIOMIXBUF_S2B(&pGstStream->MixBuf, cReadable)));
 
     rc2 = RTCritSectLeave(&pThis->CritSect);
     AssertRC(rc2);
@@ -1688,6 +1814,9 @@ static DECLCALLBACK(uint32_t) drvAudioStreamGetReadable(PPDMIAUDIOCONNECTOR pInt
     return AUDIOMIXBUF_S2B(&pGstStream->MixBuf, cReadable);
 }
 
+/**
+ * @interface_method_impl{PDMIAUDIOCONNECTOR,pfnStreamGetWritable}
+ */
 static DECLCALLBACK(uint32_t) drvAudioStreamGetWritable(PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream)
 {
     AssertPtrReturn(pInterface, 0);
@@ -1706,17 +1835,17 @@ static DECLCALLBACK(uint32_t) drvAudioStreamGetWritable(PPDMIAUDIOCONNECTOR pInt
         rc2 = RTCritSectLeave(&pThis->CritSect);
         AssertRC(rc2);
 
+        AssertMsgFailed(("Guest stream '%s' does not have a host stream attached\n", pStream->szName));
         return 0;
     }
 
     PPDMAUDIOSTREAM pGstStream = pHstStream->pPair;
+    AssertPtr(pGstStream);
 
-    uint32_t cWritable = 0;
-
-    if (AudioMixBufLive(&pHstStream->MixBuf) == 0)
-        cWritable = AudioMixBufFreeBytes(&pGstStream->MixBuf);
+    uint32_t cWritable = AudioMixBufFree(&pGstStream->MixBuf);
 
-    Log3Func(("[%s] cWritable=%RU32\n", pHstStream->szName, cWritable));
+    Log3Func(("[%s] cWritable=%RU32 (%zu bytes)\n", pHstStream->szName, cWritable,
+              AUDIOMIXBUF_S2B(&pGstStream->MixBuf, cWritable)));
 
     rc2 = RTCritSectLeave(&pThis->CritSect);
     AssertRC(rc2);
@@ -1725,6 +1854,9 @@ static DECLCALLBACK(uint32_t) drvAudioStreamGetWritable(PPDMIAUDIOCONNECTOR pInt
     return AUDIOMIXBUF_S2B(&pGstStream->MixBuf, cWritable);
 }
 
+/**
+ * @interface_method_impl{PDMIAUDIOCONNECTOR,pfnStreamGetStatus}
+ */
 static DECLCALLBACK(PDMAUDIOSTRMSTS) drvAudioStreamGetStatus(PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream)
 {
     AssertPtrReturn(pInterface, false);
@@ -1752,14 +1884,15 @@ static DECLCALLBACK(PDMAUDIOSTRMSTS) drvAudioStreamGetStatus(PPDMIAUDIOCONNECTOR
     return strmSts;
 }
 
+/**
+ * @interface_method_impl{PDMIAUDIOCONNECTOR,pfnStreamSetVolume}
+ */
 static DECLCALLBACK(int) drvAudioStreamSetVolume(PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream, PPDMAUDIOVOLUME pVol)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
     AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
     AssertPtrReturn(pVol,       VERR_INVALID_POINTER);
 
-    PDRVAUDIO pThis = PDMIAUDIOCONNECTOR_2_DRVAUDIO(pInterface);
-
     LogFlowFunc(("%s: volL=%RU32, volR=%RU32, fMute=%RTbool\n", pStream->szName, pVol->uLeft, pVol->uRight, pVol->fMuted));
 
     PPDMAUDIOSTREAM pHstStream = drvAudioGetHostStream(pStream);
@@ -1770,6 +1903,9 @@ static DECLCALLBACK(int) drvAudioStreamSetVolume(PPDMIAUDIOCONNECTOR pInterface,
     return VINF_SUCCESS;
 }
 
+/**
+ * @interface_method_impl{PDMIAUDIOCONNECTOR,pfnStreamDestroy}
+ */
 static DECLCALLBACK(int) drvAudioStreamDestroy(PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
@@ -1846,6 +1982,13 @@ static DECLCALLBACK(int) drvAudioStreamDestroy(PPDMIAUDIOCONNECTOR pInterface, P
     return rc;
 }
 
+/**
+ * Calls the backend to give it the chance to destroy its part of the audio stream.
+ *
+ * @returns IPRT status code.
+ * @param   pThis               Pointer to driver instance.
+ * @param   pHstStream          Host audio stream to call the backend destruction for.
+ */
 static int drvAudioStreamDestroyInternalBackend(PDRVAUDIO pThis, PPDMAUDIOSTREAM pHstStream)
 {
     AssertPtrReturn(pThis,      VERR_INVALID_POINTER);
@@ -1872,6 +2015,14 @@ static int drvAudioStreamDestroyInternalBackend(PDRVAUDIO pThis, PPDMAUDIOSTREAM
     return rc;
 }
 
+/**
+ * Destroys an audio stream.
+ *
+ * @returns IPRT status code.
+ * @param   pThis               Pointer to driver instance.
+ * @param   pStream             Pointer to audio stream to destroy.
+ *                              That pointer will be invalid after successful destruction.
+ */
 static int drvAudioStreamDestroyInternal(PDRVAUDIO pThis, PPDMAUDIOSTREAM pStream)
 {
     AssertPtrReturn(pThis,   VERR_INVALID_POINTER);
@@ -2022,7 +2173,7 @@ static DECLCALLBACK(int) drvAudioConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHan
     pThis->IAudioConnector.pfnGetStatus         = drvAudioGetStatus;
     pThis->IAudioConnector.pfnStreamCreate      = drvAudioStreamCreate;
     pThis->IAudioConnector.pfnStreamDestroy     = drvAudioStreamDestroy;
-    pThis->IAudioConnector.pfnStreamAddRef      = drvAudioStreamAddRef;
+    pThis->IAudioConnector.pfnStreamRetain      = drvAudioStreamRetain;
     pThis->IAudioConnector.pfnStreamRelease     = drvAudioStreamRelease;
     pThis->IAudioConnector.pfnStreamControl     = drvAudioStreamControl;
     pThis->IAudioConnector.pfnStreamRead        = drvAudioStreamRead;
@@ -2059,7 +2210,7 @@ static DECLCALLBACK(int) drvAudioConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHan
                                 N_("Host audio backend missing or invalid"));
     }
 
-    rc = drvAudioInit(pCfgHandle, pDrvIns);
+    rc = drvAudioInit(pDrvIns, pCfgHandle);
     if (RT_SUCCESS(rc))
     {
         pThis->fTerminate = false;
@@ -2179,7 +2330,7 @@ const PDMDRVREG g_DrvAUDIO =
     /* fClass */
     PDM_DRVREG_CLASS_AUDIO,
     /* cMaxInstances */
-    2,
+    UINT32_MAX,
     /* cbInstance */
     sizeof(DRVAUDIO),
     /* pfnConstruct */
diff --git a/src/VBox/Devices/Audio/DrvAudio.h b/src/VBox/Devices/Audio/DrvAudio.h
index aeeab12..552d5d9 100644
--- a/src/VBox/Devices/Audio/DrvAudio.h
+++ b/src/VBox/Devices/Audio/DrvAudio.h
@@ -47,6 +47,8 @@
 
 #include <iprt/circbuf.h>
 #include <iprt/critsect.h>
+#include <iprt/file.h>
+#include <iprt/path.h>
 
 #include <VBox/vmm/pdmdev.h>
 #include <VBox/vmm/pdm.h>
@@ -136,15 +138,27 @@ typedef struct DRVAUDIO
 bool DrvAudioHlpAudFmtIsSigned(PDMAUDIOFMT enmFmt);
 uint8_t DrvAudioHlpAudFmtToBits(PDMAUDIOFMT enmFmt);
 const char *DrvAudioHlpAudFmtToStr(PDMAUDIOFMT enmFmt);
-void DrvAudioHlpClearBuf(PPDMPCMPROPS pPCMInfo, void *pvBuf, size_t cbBuf, uint32_t cSamples);
-bool DrvAudioHlpPCMPropsAreEqual(PPDMPCMPROPS pPCMProps1, PPDMPCMPROPS pPCMProps2);
-bool DrvAudioHlpPCMPropsAreEqual(PPDMPCMPROPS pPCMProps, PPDMAUDIOSTREAMCFG pCfg);
-int DrvAudioHlpPCMPropsToStreamCfg(PPDMPCMPROPS pPCMProps, PPDMAUDIOSTREAMCFG pCfg);
+void DrvAudioHlpClearBuf(PPDMAUDIOPCMPROPS pPCMInfo, void *pvBuf, size_t cbBuf, uint32_t cSamples);
+uint32_t DrvAudioHlpCalcBitrate(uint8_t cBits, uint32_t uHz, uint8_t cChannels);
+uint32_t DrvAudioHlpCalcBitrate(PPDMAUDIOSTREAMCFG pCfg);
+bool DrvAudioHlpPCMPropsAreEqual(PPDMAUDIOPCMPROPS pPCMProps1, PPDMAUDIOPCMPROPS pPCMProps2);
+bool DrvAudioHlpPCMPropsAreEqual(PPDMAUDIOPCMPROPS pPCMProps, PPDMAUDIOSTREAMCFG pCfg);
+int DrvAudioHlpPCMPropsToStreamCfg(PPDMAUDIOPCMPROPS pPCMProps, PPDMAUDIOSTREAMCFG pCfg);
 const char *DrvAudioHlpRecSrcToStr(PDMAUDIORECSOURCE enmRecSource);
 void DrvAudioHlpStreamCfgPrint(PPDMAUDIOSTREAMCFG pCfg);
 bool DrvAudioHlpStreamCfgIsValid(PPDMAUDIOSTREAMCFG pCfg);
-int DrvAudioHlpStreamCfgToProps(PPDMAUDIOSTREAMCFG pCfg, PPDMPCMPROPS pProps);
+int DrvAudioHlpStreamCfgToProps(PPDMAUDIOSTREAMCFG pCfg, PPDMAUDIOPCMPROPS pProps);
 PDMAUDIOFMT DrvAudioHlpStrToAudFmt(const char *pszFmt);
 
+int DrvAudioHlpSanitizeFileName(char *pszPath, size_t cbPath);
+int DrvAudioHlpGetFileName(char *pszFile, size_t cchFile, const char *pszPath, const char *pszName, PDMAUDIOFILETYPE enmType);
+
+int DrvAudioHlpWAVFileOpen(PPDMAUDIOFILE pFile, const char *pszFile, uint32_t fOpen, PPDMAUDIOPCMPROPS pProps, PDMAUDIOFILEFLAGS fFlags);
+int DrvAudioHlpWAVFileClose(PPDMAUDIOFILE pFile);
+size_t DrvAudioHlpWAVFileGetDataSize(PPDMAUDIOFILE pFile);
+int DrvAudioHlpWAVFileWrite(PPDMAUDIOFILE pFile, const void *pvBuf, size_t cbBuf, uint32_t fFlags);
+
+#define AUDIO_MAKE_FOURCC(c0, c1, c2, c3) RT_H2LE_U32_C(RT_MAKE_U32_FROM_U8(c0, c1, c2, c3))
+
 #endif /* DRV_AUDIO_H */
 
diff --git a/src/VBox/Devices/Audio/DrvAudioCommon.cpp b/src/VBox/Devices/Audio/DrvAudioCommon.cpp
index a1b68b5..577ffc3 100644
--- a/src/VBox/Devices/Audio/DrvAudioCommon.cpp
+++ b/src/VBox/Devices/Audio/DrvAudioCommon.cpp
@@ -41,13 +41,13 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  * THE SOFTWARE.
  */
-#define LOG_GROUP LOG_GROUP_DRV_AUDIO
-#include <VBox/log.h>
+#include <iprt/alloc.h>
 #include <iprt/asm-math.h>
 #include <iprt/assert.h>
-#include <iprt/uuid.h>
+#include <iprt/dir.h>
+#include <iprt/file.h>
 #include <iprt/string.h>
-#include <iprt/alloc.h>
+#include <iprt/uuid.h>
 
 #include <VBox/vmm/pdmdev.h>
 #include <VBox/vmm/pdm.h>
@@ -60,6 +60,38 @@
 #include "DrvAudio.h"
 #include "AudioMixBuffer.h"
 
+#pragma pack(1)
+/**
+ * Structure for building up a .WAV file header.
+ */
+typedef struct AUDIOWAVFILEHDR
+{
+    uint32_t u32RIFF;
+    uint32_t u32Size;
+    uint32_t u32WAVE;
+
+    uint32_t u32Fmt;
+    uint32_t u32Size1;
+    uint16_t u16AudioFormat;
+    uint16_t u16NumChannels;
+    uint32_t u32SampleRate;
+    uint32_t u32ByteRate;
+    uint16_t u16BlockAlign;
+    uint16_t u16BitsPerSample;
+
+    uint32_t u32ID2;
+    uint32_t u32Size2;
+} AUDIOWAVFILEHDR, *PAUDIOWAVFILEHDR;
+#pragma pack()
+
+/**
+ * Structure for keeeping the internal .WAV file data
+ */
+typedef struct AUDIOWAVFILEDATA
+{
+    /** The file header/footer. */
+    AUDIOWAVFILEHDR Hdr;
+} AUDIOWAVFILEDATA, *PAUDIOWAVFILEDATA;
 
 /**
  * Retrieves the matching PDMAUDIOFMT for given bits + signing flag.
@@ -105,7 +137,7 @@ PDMAUDIOFMT DrvAudioAudFmtBitsToAudFmt(uint8_t cBits, bool fSigned)
  * @param   cbBuf                   Size (in bytes) of the buffer.
  * @param   cSamples                Number of audio samples to clear in the buffer.
  */
-void DrvAudioHlpClearBuf(PPDMPCMPROPS pPCMProps, void *pvBuf, size_t cbBuf, uint32_t cSamples)
+void DrvAudioHlpClearBuf(PPDMAUDIOPCMPROPS pPCMProps, void *pvBuf, size_t cbBuf, uint32_t cSamples)
 {
     AssertPtrReturnVoid(pPCMProps);
     AssertPtrReturnVoid(pvBuf);
@@ -169,6 +201,12 @@ void DrvAudioHlpClearBuf(PPDMPCMPROPS pPCMProps, void *pvBuf, size_t cbBuf, uint
     }
 }
 
+/**
+ * Converts a recording source enumeration to a string.
+ *
+ * @returns Stringified recording source, or "Unknown", if not found.
+ * @param   enmRecSrc           Recording source to convert.
+ */
 const char *DrvAudioHlpRecSrcToStr(PDMAUDIORECSOURCE enmRecSrc)
 {
     switch (enmRecSrc)
@@ -248,6 +286,12 @@ uint8_t DrvAudioHlpAudFmtToBits(PDMAUDIOFMT enmFmt)
     return 0;
 }
 
+/**
+ * Converts an audio format to a string.
+ *
+ * @returns Stringified audio format, or "Unknown", if not found.
+ * @param   enmFmt              Audio format to convert.
+ */
 const char *DrvAudioHlpAudFmtToStr(PDMAUDIOFMT enmFmt)
 {
     switch (enmFmt)
@@ -275,9 +319,15 @@ const char *DrvAudioHlpAudFmtToStr(PDMAUDIOFMT enmFmt)
     }
 
     AssertMsgFailed(("Bogus audio format %ld\n", enmFmt));
-    return "Invalid";
+    return "Unknown";
 }
 
+/**
+ * Converts a given string to an audio format.
+ *
+ * @returns Audio format for the given string, or PDMAUDIOFMT_INVALID if not found.
+ * @param   pszFmt              String to convert to an audio format.
+ */
 PDMAUDIOFMT DrvAudioHlpStrToAudFmt(const char *pszFmt)
 {
     AssertPtrReturn(pszFmt, PDMAUDIOFMT_INVALID);
@@ -299,7 +349,15 @@ PDMAUDIOFMT DrvAudioHlpStrToAudFmt(const char *pszFmt)
     return PDMAUDIOFMT_INVALID;
 }
 
-bool DrvAudioHlpPCMPropsAreEqual(PPDMPCMPROPS pProps, PPDMAUDIOSTREAMCFG pCfg)
+/**
+ * Checks whether the given PCM properties are equal with the given
+ * stream configuration.
+ *
+ * @returns @true if equal, @false if not.
+ * @param   pProps              PCM properties to compare.
+ * @param   pCfg                Stream configuration to compare.
+ */
+bool DrvAudioHlpPCMPropsAreEqual(PPDMAUDIOPCMPROPS pProps, PPDMAUDIOSTREAMCFG pCfg)
 {
     AssertPtrReturn(pProps, false);
     AssertPtrReturn(pCfg,   false);
@@ -339,11 +397,21 @@ bool DrvAudioHlpPCMPropsAreEqual(PPDMPCMPROPS pProps, PPDMAUDIOSTREAMCFG pCfg)
     return fEqual;
 }
 
-bool DrvAudioHlpPCMPropsAreEqual(PPDMPCMPROPS pProps1, PPDMPCMPROPS pProps2)
+/**
+ * Checks whether two given PCM properties are equal.
+ *
+ * @returns @true if equal, @false if not.
+ * @param   pProps1             First properties to compare.
+ * @param   pProps2             Second properties to compare.
+ */
+bool DrvAudioHlpPCMPropsAreEqual(PPDMAUDIOPCMPROPS pProps1, PPDMAUDIOPCMPROPS pProps2)
 {
     AssertPtrReturn(pProps1, false);
     AssertPtrReturn(pProps2, false);
 
+    if (pProps1 == pProps2) /* If the pointers match, take a shortcut. */
+        return true;
+
     return    pProps1->uHz         == pProps2->uHz
            && pProps1->cChannels   == pProps2->cChannels
            && pProps1->fSigned     == pProps2->fSigned
@@ -358,7 +426,7 @@ bool DrvAudioHlpPCMPropsAreEqual(PPDMPCMPROPS pProps1, PPDMPCMPROPS pProps2)
  * @param   pPCMProps           Pointer to PCM properties to convert.
  * @param   pCfg                Pointer to audio stream configuration to store result into.
  */
-int DrvAudioHlpPCMPropsToStreamCfg(PPDMPCMPROPS pPCMProps, PPDMAUDIOSTREAMCFG pCfg)
+int DrvAudioHlpPCMPropsToStreamCfg(PPDMAUDIOPCMPROPS pPCMProps, PPDMAUDIOSTREAMCFG pCfg)
 {
     AssertPtrReturn(pPCMProps, VERR_INVALID_POINTER);
     AssertPtrReturn(pCfg,      VERR_INVALID_POINTER);
@@ -372,6 +440,12 @@ int DrvAudioHlpPCMPropsToStreamCfg(PPDMPCMPROPS pPCMProps, PPDMAUDIOSTREAMCFG pC
     return VINF_SUCCESS;
 }
 
+/**
+ * Checks whether a given stream configuration is valid or not.
+ *
+ * Returns @true if configuration is valid, @false if not.
+ * @param   pCfg                Stream configuration to check.
+ */
 bool DrvAudioHlpStreamCfgIsValid(PPDMAUDIOSTREAMCFG pCfg)
 {
     bool fValid = (   pCfg->cChannels == 1
@@ -400,8 +474,8 @@ bool DrvAudioHlpStreamCfgIsValid(PPDMAUDIOSTREAMCFG pCfg)
         }
     }
 
-    /** @todo Check for defined frequencies supported. */
     fValid |= pCfg->uHz > 0;
+    /** @todo Check for defined frequencies supported. */
 
     return fValid;
 }
@@ -413,7 +487,7 @@ bool DrvAudioHlpStreamCfgIsValid(PPDMAUDIOSTREAMCFG pCfg)
  * @param   pCfg                    Audio stream configuration to convert.
  * @param   pProps                  PCM properties to save result to.
  */
-int DrvAudioHlpStreamCfgToProps(PPDMAUDIOSTREAMCFG pCfg, PPDMPCMPROPS pProps)
+int DrvAudioHlpStreamCfgToProps(PPDMAUDIOSTREAMCFG pCfg, PPDMAUDIOPCMPROPS pProps)
 {
     AssertPtrReturn(pCfg,   VERR_INVALID_POINTER);
     AssertPtrReturn(pProps, VERR_INVALID_POINTER);
@@ -455,16 +529,20 @@ int DrvAudioHlpStreamCfgToProps(PPDMAUDIOSTREAMCFG pCfg, PPDMPCMPROPS pProps)
         pProps->uHz         = pCfg->uHz;
         pProps->cBits       = cBits;
         pProps->fSigned     = fSigned;
-        pProps->cChannels   = pCfg->cChannels;
         pProps->cShift      = (pCfg->cChannels == 2) + cShift;
+        pProps->cChannels   = pCfg->cChannels;
         pProps->uAlign      = (1 << pProps->cShift) - 1;
-        pProps->cbBitrate   = (pProps->cBits * pProps->uHz * pProps->cChannels) / 8;
         pProps->fSwapEndian = pCfg->enmEndianness != PDMAUDIOHOSTENDIANNESS;
     }
 
     return rc;
 }
 
+/**
+ * Prints an audio stream configuration to the debug log.
+ *
+ * @param   pCfg                Stream configuration to log.
+ */
 void DrvAudioHlpStreamCfgPrint(PPDMAUDIOSTREAMCFG pCfg)
 {
     AssertPtrReturnVoid(pCfg);
@@ -511,3 +589,319 @@ void DrvAudioHlpStreamCfgPrint(PPDMAUDIOSTREAMCFG pCfg)
     }
 }
 
+/**
+ * Calculates the audio bit rate of the given bits per sample, the Hz and the number
+ * of audio channels.
+ *
+ * Divide the result by 8 to get the byte rate.
+ *
+ * @returns The calculated bit rate.
+ * @param   cBits               Number of bits per sample.
+ * @param   uHz                 Hz (Hertz) rate.
+ * @param   cChannels           Number of audio channels.
+ */
+uint32_t DrvAudioHlpCalcBitrate(uint8_t cBits, uint32_t uHz, uint8_t cChannels)
+{
+    return (cBits * uHz * cChannels);
+}
+
+/**
+ * Calculates the audio bit rate out of a given audio stream configuration.
+ *
+ * Divide the result by 8 to get the byte rate.
+ *
+ * @returns The calculated bit rate.
+ * @param   pCfg                Audio stream configuration to calculate bit rate for.
+ *
+ * @remark
+ */
+uint32_t DrvAudioHlpCalcBitrate(PPDMAUDIOSTREAMCFG pCfg)
+{
+    return DrvAudioHlpCalcBitrate(DrvAudioHlpAudFmtToBits(pCfg->enmFormat), pCfg->uHz, pCfg->cChannels);
+}
+
+/**
+ * Sanitizes the file name component so that unsupported characters
+ * will be replaced by an underscore ("_").
+ *
+ * @return  IPRT status code.
+ * @param   pszPath             Path to sanitize.
+ * @param   cbPath              Size (in bytes) of path to sanitize.
+ */
+int DrvAudioHlpSanitizeFileName(char *pszPath, size_t cbPath)
+{
+    RT_NOREF(cbPath);
+    int rc = VINF_SUCCESS;
+#ifdef RT_OS_WINDOWS
+    /* Filter out characters not allowed on Windows platforms, put in by
+       RTTimeSpecToString(). */
+    /** @todo Use something like RTPathSanitize() if available later some time. */
+    static RTUNICP const s_uszValidRangePairs[] =
+    {
+        ' ', ' ',
+        '(', ')',
+        '-', '.',
+        '0', '9',
+        'A', 'Z',
+        'a', 'z',
+        '_', '_',
+        0xa0, 0xd7af,
+        '\0'
+    };
+    ssize_t cReplaced = RTStrPurgeComplementSet(pszPath, s_uszValidRangePairs, '_' /* Replacement */);
+    if (cReplaced < 0)
+        rc = VERR_INVALID_UTF8_ENCODING;
+#else
+    RT_NOREF(pszPath);
+#endif
+    return rc;
+}
+
+/**
+ * Constructs an unique file name, based on the given path and the audio file type.
+ *
+ * @returns IPRT status code.
+ * @param   pszFile             Where to store the constructed file name.
+ * @param   cchFile             Size (in characters) of the file name buffer.
+ * @param   pszPath             Base path to use.
+ * @param   pszName             A name for better identifying the file. Optional.
+ * @param   enmType             Audio file type to construct file name for.
+ */
+int DrvAudioHlpGetFileName(char *pszFile, size_t cchFile, const char *pszPath, const char *pszName, PDMAUDIOFILETYPE enmType)
+{
+    AssertPtrReturn(pszFile, VERR_INVALID_POINTER);
+    AssertReturn(cchFile,    VERR_INVALID_PARAMETER);
+    AssertPtrReturn(pszPath, VERR_INVALID_POINTER);
+    /* pszName is optional. */
+
+    int rc;
+
+    do
+    {
+        char szFilePath[RTPATH_MAX];
+        RTStrPrintf(szFilePath, sizeof(szFilePath), "%s", pszPath);
+
+        /* Create it when necessary. */
+        if (!RTDirExists(szFilePath))
+        {
+            rc = RTDirCreateFullPath(szFilePath, RTFS_UNIX_IRWXU);
+            if (RT_FAILURE(rc))
+                break;
+        }
+
+        /* The actually drop directory consist of the current time stamp and a
+         * unique number when necessary. */
+        char pszTime[64];
+        RTTIMESPEC time;
+        if (!RTTimeSpecToString(RTTimeNow(&time), pszTime, sizeof(pszTime)))
+        {
+            rc = VERR_BUFFER_OVERFLOW;
+            break;
+        }
+
+        rc = DrvAudioHlpSanitizeFileName(pszTime, sizeof(pszTime));
+        if (RT_FAILURE(rc))
+            break;
+
+        rc = RTPathAppend(szFilePath, sizeof(szFilePath), pszTime);
+        if (RT_FAILURE(rc))
+            break;
+
+        if (pszName) /* Optional name given? */
+        {
+            rc = RTStrCat(szFilePath, sizeof(szFilePath), "-");
+            if (RT_FAILURE(rc))
+                break;
+
+            rc = RTStrCat(szFilePath, sizeof(szFilePath), pszName);
+            if (RT_FAILURE(rc))
+                break;
+        }
+
+        switch (enmType)
+        {
+            case PDMAUDIOFILETYPE_WAV:
+                rc = RTStrCat(szFilePath, sizeof(szFilePath), ".wav");
+                break;
+
+            default:
+                AssertFailedStmt(rc = VERR_NOT_IMPLEMENTED);
+        }
+
+        if (RT_FAILURE(rc))
+            break;
+
+        RTStrPrintf(pszFile, cchFile, "%s", szFilePath);
+
+    } while (0);
+
+    LogFlowFuncLeaveRC(rc);
+    return rc;
+}
+
+/**
+ * Opens or creates a wave (.WAV) file.
+ *
+ * @returns IPRT status code.
+ * @param   pFile               Pointer to audio file handle to use.
+ * @param   pszFile             File path of file to open or create.
+ * @param   fOpen               Open flags.
+ * @param   pProps              PCM properties to use.
+ * @param   fFlags              Audio file flags.
+ */
+int DrvAudioHlpWAVFileOpen(PPDMAUDIOFILE pFile, const char *pszFile, uint32_t fOpen, PPDMAUDIOPCMPROPS pProps,
+                           PDMAUDIOFILEFLAGS fFlags)
+{
+    AssertPtrReturn(pFile,   VERR_INVALID_POINTER);
+    AssertPtrReturn(pszFile, VERR_INVALID_POINTER);
+    /** @todo Validate fOpen flags. */
+    AssertPtrReturn(pProps,  VERR_INVALID_POINTER);
+    RT_NOREF(fFlags); /** @todo Validate fFlags flags. */
+
+    Assert(pProps->cChannels);
+    Assert(pProps->uHz);
+    Assert(pProps->cBits);
+
+    pFile->pvData = (PAUDIOWAVFILEDATA)RTMemAllocZ(sizeof(AUDIOWAVFILEDATA));
+    if (!pFile->pvData)
+        return VERR_NO_MEMORY;
+    pFile->cbData = sizeof(PAUDIOWAVFILEDATA);
+
+    PAUDIOWAVFILEDATA pData = (PAUDIOWAVFILEDATA)pFile->pvData;
+    AssertPtr(pData);
+
+    /* Header. */
+    pData->Hdr.u32RIFF          = AUDIO_MAKE_FOURCC('R','I','F','F');
+    pData->Hdr.u32Size          = 36;
+    pData->Hdr.u32WAVE          = AUDIO_MAKE_FOURCC('W','A','V','E');
+
+    pData->Hdr.u32Fmt           = AUDIO_MAKE_FOURCC('f','m','t',' ');
+    pData->Hdr.u32Size1         = 16; /* Means PCM. */
+    pData->Hdr.u16AudioFormat   = 1;  /* PCM, linear quantization. */
+    pData->Hdr.u16NumChannels   = pProps->cChannels;
+    pData->Hdr.u32SampleRate    = pProps->uHz;
+    pData->Hdr.u32ByteRate      = DrvAudioHlpCalcBitrate(pProps->cBits, pProps->uHz, pProps->cChannels) / 8;
+    pData->Hdr.u16BlockAlign    = pProps->cChannels * pProps->cBits / 8;
+    pData->Hdr.u16BitsPerSample = pProps->cBits;
+
+    /* Data chunk. */
+    pData->Hdr.u32ID2           = AUDIO_MAKE_FOURCC('d','a','t','a');
+    pData->Hdr.u32Size2         = 0;
+
+    int rc = RTFileOpen(&pFile->hFile, pszFile, fOpen);
+    if (RT_SUCCESS(rc))
+    {
+        rc = RTFileWrite(pFile->hFile, &pData->Hdr, sizeof(pData->Hdr), NULL);
+        if (RT_FAILURE(rc))
+        {
+            RTFileClose(pFile->hFile);
+            pFile->hFile = NIL_RTFILE;
+        }
+    }
+
+    if (RT_SUCCESS(rc))
+    {
+        pFile->enmType = PDMAUDIOFILETYPE_WAV;
+
+        RTStrPrintf(pFile->szName, RT_ELEMENTS(pFile->szName), "%s", pszFile);
+    }
+    else
+    {
+        RTMemFree(pFile->pvData);
+        pFile->pvData = NULL;
+        pFile->cbData = 0;
+    }
+
+    return rc;
+}
+
+/**
+ * Closes a wave (.WAV) audio file.
+ *
+ * @returns IPRT status code.
+ * @param   pFile               Audio file handle to close.
+ */
+int DrvAudioHlpWAVFileClose(PPDMAUDIOFILE pFile)
+{
+    AssertPtrReturn(pFile, VERR_INVALID_POINTER);
+
+    Assert(pFile->enmType == PDMAUDIOFILETYPE_WAV);
+
+    if (pFile->hFile != NIL_RTFILE)
+    {
+        PAUDIOWAVFILEDATA pData = (PAUDIOWAVFILEDATA)pFile->pvData;
+        AssertPtr(pData);
+
+        /* Update the header with the current data size. */
+        RTFileWriteAt(pFile->hFile, 0, &pData->Hdr, sizeof(pData->Hdr), NULL);
+
+        RTFileClose(pFile->hFile);
+        pFile->hFile = NIL_RTFILE;
+    }
+
+    if (pFile->pvData)
+    {
+        RTMemFree(pFile->pvData);
+        pFile->pvData = NULL;
+    }
+
+    pFile->cbData  = 0;
+    pFile->enmType = PDMAUDIOFILETYPE_UNKNOWN;
+
+    return VINF_SUCCESS;
+}
+
+/**
+ * Returns the raw PCM audio data size of a wave file.
+ * This does *not* include file headers and other data which does
+ * not belong to the actual PCM audio data.
+ *
+ * @returns Size (in bytes) of the raw PCM audio data.
+ * @param   pFile               Audio file handle to retrieve the audio data size for.
+ */
+size_t DrvAudioHlpWAVFileGetDataSize(PPDMAUDIOFILE pFile)
+{
+    AssertPtrReturn(pFile, 0);
+
+    Assert(pFile->enmType == PDMAUDIOFILETYPE_WAV);
+
+    PAUDIOWAVFILEDATA pData = (PAUDIOWAVFILEDATA)pFile->pvData;
+    AssertPtr(pData);
+
+    return pData->Hdr.u32Size2;
+}
+
+/**
+ * Write PCM data to a wave (.WAV) file.
+ *
+ * @returns IPRT status code.
+ * @param   pFile               Audio file handle to write PCM data to.
+ * @param   pvBuf               Audio data to write.
+ * @param   cbBuf               Size (in bytes) of audio data to write.
+ * @param   fFlags              Additional write flags. Not being used at the moment and must be 0.
+ */
+int DrvAudioHlpWAVFileWrite(PPDMAUDIOFILE pFile, const void *pvBuf, size_t cbBuf, uint32_t fFlags)
+{
+    AssertPtrReturn(pFile, VERR_INVALID_POINTER);
+    AssertPtrReturn(pvBuf, VERR_INVALID_POINTER);
+
+    AssertReturn(fFlags == 0, VERR_INVALID_PARAMETER); /** @todo fFlags are currently not implemented. */
+
+    Assert(pFile->enmType == PDMAUDIOFILETYPE_WAV);
+
+    if (!cbBuf)
+        return VINF_SUCCESS;
+
+    PAUDIOWAVFILEDATA pData = (PAUDIOWAVFILEDATA)pFile->pvData;
+    AssertPtr(pData);
+
+    int rc = RTFileWrite(pFile->hFile, pvBuf, cbBuf, NULL);
+    if (RT_SUCCESS(rc))
+    {
+        pData->Hdr.u32Size  += (uint32_t)cbBuf;
+        pData->Hdr.u32Size2 += (uint32_t)cbBuf;
+    }
+
+    return rc;
+}
+
diff --git a/src/VBox/Devices/Audio/DrvHostALSAAudio.cpp b/src/VBox/Devices/Audio/DrvHostALSAAudio.cpp
index c4d1cff..ec12c83 100644
--- a/src/VBox/Devices/Audio/DrvHostALSAAudio.cpp
+++ b/src/VBox/Devices/Audio/DrvHostALSAAudio.cpp
@@ -63,6 +63,7 @@ RT_C_DECLS_END
 
 #include "VBoxDD.h"
 
+
 /*********************************************************************************************************************************
 *   Defines                                                                                                                      *
 *********************************************************************************************************************************/
@@ -71,6 +72,7 @@ RT_C_DECLS_END
 #define PDMIHOSTAUDIO_2_DRVHOSTALSAAUDIO(pInterface) \
     ( (PDRVHOSTALSAAUDIO)((uintptr_t)pInterface - RT_OFFSETOF(DRVHOSTALSAAUDIO, IHostAudio)) )
 
+
 /*********************************************************************************************************************************
 *   Structures                                                                                                                   *
 *********************************************************************************************************************************/
@@ -217,6 +219,7 @@ static snd_pcm_format_t alsaAudioFmtToALSA(PDMAUDIOFMT fmt)
     return SND_PCM_FORMAT_U8;
 }
 
+
 static int alsaALSAToAudioFmt(snd_pcm_format_t fmt,
                               PDMAUDIOFMT *pFmt, PDMAUDIOENDIANNESS *pEndianness)
 {
@@ -293,6 +296,7 @@ static int alsaALSAToAudioFmt(snd_pcm_format_t fmt,
     return VINF_SUCCESS;
 }
 
+
 static int alsaGetSampleShift(snd_pcm_format_t fmt, unsigned *puShift)
 {
     AssertPtrReturn(puShift, VERR_INVALID_POINTER);
@@ -326,6 +330,7 @@ static int alsaGetSampleShift(snd_pcm_format_t fmt, unsigned *puShift)
     return VINF_SUCCESS;
 }
 
+
 static int alsaStreamSetThreshold(snd_pcm_t *phPCM, snd_pcm_uframes_t threshold)
 {
     snd_pcm_sw_params_t *pSWParms = NULL;
@@ -380,6 +385,7 @@ static int alsaStreamSetThreshold(snd_pcm_t *phPCM, snd_pcm_uframes_t threshold)
     return rc;
 }
 
+
 static int alsaStreamClose(snd_pcm_t **pphPCM)
 {
     if (!pphPCM || !*pphPCM)
@@ -401,6 +407,7 @@ static int alsaStreamClose(snd_pcm_t **pphPCM)
     return rc;
 }
 
+
 #if 0 /* After Beta. */
 static int alsaSetHWParams(snd_pcm_t *phPCM, PALSAAUDIOSTREAMCFG pCfg)
 {
@@ -529,6 +536,8 @@ static int alsaSetHWParams(snd_pcm_t *phPCM, PALSAAUDIOSTREAMCFG pCfg)
     LogFlowFuncLeaveRC(rc);
     return rc;
 }
+
+
 static int alsaSetSWParams(snd_pcm_t *phPCM, PALSAAUDIOCFG pCfg)
 {
     int rc;
@@ -592,6 +601,7 @@ static int alsaSetSWParams(snd_pcm_t *phPCM, PALSAAUDIOCFG pCfg)
 }
 #endif
 
+
 static int alsaStreamOpen(bool fIn, PALSAAUDIOSTREAMCFG pCfgReq, PALSAAUDIOSTREAMCFG pCfgObt, snd_pcm_t **pphPCM)
 {
     snd_pcm_t *phPCM = NULL;
@@ -881,14 +891,17 @@ static int alsaStreamOpen(bool fIn, PALSAAUDIOSTREAMCFG pCfgReq, PALSAAUDIOSTREA
     return rc;
 }
 
+
 #ifdef DEBUG
 static void alsaDbgErrorHandler(const char *file, int line, const char *function,
                                 int err, const char *fmt, ...)
 {
     /** @todo Implement me! */
+    RT_NOREF(file, line, function, err, fmt);
 }
 #endif
 
+
 static int alsaStreamGetAvail(snd_pcm_t *phPCM, snd_pcm_sframes_t *pFramesAvail)
 {
     AssertPtrReturn(phPCM, VERR_INVALID_POINTER);
@@ -918,6 +931,7 @@ static int alsaStreamGetAvail(snd_pcm_t *phPCM, snd_pcm_sframes_t *pFramesAvail)
     return rc;
 }
 
+
 static int alsaStreamRecover(snd_pcm_t *phPCM)
 {
     AssertPtrReturn(phPCM, VERR_INVALID_POINTER);
@@ -932,6 +946,7 @@ static int alsaStreamRecover(snd_pcm_t *phPCM)
     return VINF_SUCCESS;
 }
 
+
 static int alsaStreamResume(snd_pcm_t *phPCM)
 {
     AssertPtrReturn(phPCM, VERR_INVALID_POINTER);
@@ -946,6 +961,7 @@ static int alsaStreamResume(snd_pcm_t *phPCM)
     return VINF_SUCCESS;
 }
 
+
 static int drvHostALSAAudioStreamCtl(snd_pcm_t *phPCM, bool fPause)
 {
     int err;
@@ -971,6 +987,10 @@ static int drvHostALSAAudioStreamCtl(snd_pcm_t *phPCM, bool fPause)
     return VINF_SUCCESS;
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnInit}
+ */
 static DECLCALLBACK(int) drvHostALSAAudioInit(PPDMIHOSTAUDIO pInterface)
 {
     NOREF(pInterface);
@@ -990,11 +1010,16 @@ static DECLCALLBACK(int) drvHostALSAAudioInit(PPDMIHOSTAUDIO pInterface)
     return rc;
 }
 
-static DECLCALLBACK(int) drvHostALSAAudioStreamCapture(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream,
-                                                       uint32_t *pcSamplesCaptured)
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamCapture}
+ */
+static DECLCALLBACK(int) drvHostALSAAudioStreamCapture(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead)
 {
-    NOREF(pInterface);
-    AssertPtrReturn(pStream, VERR_INVALID_POINTER);
+    RT_NOREF(pvBuf, cbBuf);
+    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
+    AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
+    /* pcbRead is optional. */
 
     PALSAAUDIOSTREAMIN pThisStream = (PALSAAUDIOSTREAMIN)pStream;
 
@@ -1032,8 +1057,8 @@ static DECLCALLBACK(int) drvHostALSAAudioStreamCapture(PPDMIHOSTAUDIO pInterface
 
         if (!cAvail)
         {
-            if (pcSamplesCaptured)
-                *pcSamplesCaptured = 0;
+            if (pcbRead)
+                *pcbRead = 0;
             return VINF_SUCCESS;
         }
     }
@@ -1130,8 +1155,8 @@ static DECLCALLBACK(int) drvHostALSAAudioStreamCapture(PPDMIHOSTAUDIO pInterface
             rc = AudioMixBufMixToParent(&pStream->MixBuf, cWrittenTotal,
                                         &cProcessed);
 
-        if (pcSamplesCaptured)
-            *pcSamplesCaptured = cWrittenTotal;
+        if (pcbRead)
+            *pcbRead = cWrittenTotal;
 
         LogFlowFunc(("cWrittenTotal=%RU32 (%RU32 processed), rc=%Rrc\n",
                      cWrittenTotal, cProcessed, rc));
@@ -1141,11 +1166,15 @@ static DECLCALLBACK(int) drvHostALSAAudioStreamCapture(PPDMIHOSTAUDIO pInterface
     return rc;
 }
 
-static DECLCALLBACK(int) drvHostALSAAudioStreamPlay(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream,
-                                                    uint32_t *pcSamplesPlayed)
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamPlay}
+ */
+static DECLCALLBACK(int) drvHostALSAAudioStreamPlay(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream, const void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten)
 {
-    NOREF(pInterface);
-    AssertPtrReturn(pStream, VERR_INVALID_POINTER);
+    RT_NOREF(pvBuf, cbBuf);
+    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
+    AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
+    /* pcbWritten is optional. */
 
     PALSAAUDIOSTREAMOUT pThisStream = (PALSAAUDIOSTREAMOUT)pStream;
 
@@ -1251,8 +1280,8 @@ static DECLCALLBACK(int) drvHostALSAAudioStreamPlay(PPDMIHOSTAUDIO pInterface, P
         if (cReadTotal)
             AudioMixBufFinish(&pStream->MixBuf, cReadTotal);
 
-        if (pcSamplesPlayed)
-            *pcSamplesPlayed = cReadTotal;
+        if (pcbWritten)
+            *pcbWritten = cReadTotal;
 
         LogFlowFunc(("cReadTotal=%RU32 (%RU32 bytes), rc=%Rrc\n",
                      cReadTotal, cbReadTotal, rc));
@@ -1262,6 +1291,7 @@ static DECLCALLBACK(int) drvHostALSAAudioStreamPlay(PPDMIHOSTAUDIO pInterface, P
     return rc;
 }
 
+
 static int alsaDestroyStreamIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
 {
     NOREF(pInterface);
@@ -1280,6 +1310,7 @@ static int alsaDestroyStreamIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStrea
     return VINF_SUCCESS;
 }
 
+
 static int alsaDestroyStreamOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
 {
     NOREF(pInterface);
@@ -1298,15 +1329,11 @@ static int alsaDestroyStreamOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStre
     return VINF_SUCCESS;
 }
 
-static int alsaCreateStreamOut(PPDMIHOSTAUDIO pInterface,
-                               PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfg,
-                               uint32_t *pcSamples)
-{
-    NOREF(pInterface);
-    AssertPtrReturn(pStream, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
 
+static int alsaCreateStreamOut(PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
+{
     PALSAAUDIOSTREAMOUT pThisStream = (PALSAAUDIOSTREAMOUT)pStream;
+
     snd_pcm_t *phPCM = NULL;
 
     int rc;
@@ -1314,9 +1341,9 @@ static int alsaCreateStreamOut(PPDMIHOSTAUDIO pInterface,
     do
     {
         ALSAAUDIOSTREAMCFG req;
-        req.fmt         = alsaAudioFmtToALSA(pCfg->enmFormat);
-        req.freq        = pCfg->uHz;
-        req.nchannels   = pCfg->cChannels;
+        req.fmt         = alsaAudioFmtToALSA(pCfgReq->enmFormat);
+        req.freq        = pCfgReq->uHz;
+        req.nchannels   = pCfgReq->cChannels;
         req.period_size = s_ALSAConf.period_size_out;
         req.buffer_size = s_ALSAConf.buffer_size_out;
 
@@ -1331,33 +1358,31 @@ static int alsaCreateStreamOut(PPDMIHOSTAUDIO pInterface,
         if (RT_FAILURE(rc))
             break;
 
-        PDMAUDIOSTREAMCFG streamCfg;
-        streamCfg.uHz           = obt.freq;
-        streamCfg.cChannels     = obt.nchannels;
-        streamCfg.enmFormat     = enmFormat;
-        streamCfg.enmEndianness = enmEnd;
+        pCfgAcq->uHz               = obt.freq;
+        pCfgAcq->cChannels         = obt.nchannels;
+        pCfgAcq->enmFormat         = enmFormat;
+        pCfgAcq->enmEndianness     = enmEnd;
+        pCfgAcq->cSampleBufferSize = obt.samples * 4;
 
-        rc = DrvAudioHlpStreamCfgToProps(&streamCfg, &pStream->Props);
+        PDMAUDIOPCMPROPS Props;
+        rc = DrvAudioHlpStreamCfgToProps(pCfgAcq, &Props);
         if (RT_FAILURE(rc))
             break;
 
         AssertBreakStmt(obt.samples, rc = VERR_INVALID_PARAMETER);
-        size_t cbBuf = obt.samples * (1 << pStream->Props.cShift);
+        size_t cbBuf = obt.samples * (1 << Props.cShift); /** @todo Get rid of using Props! */
         AssertBreakStmt(cbBuf, rc = VERR_INVALID_PARAMETER);
         pThisStream->pvBuf = RTMemAlloc(cbBuf);
         if (!pThisStream->pvBuf)
         {
             LogRel(("ALSA: Not enough memory for output DAC buffer (%RU32 samples, each %d bytes)\n",
-                    obt.samples, 1 << pStream->Props.cShift));
+                    obt.samples, 1 << Props.cShift));
             rc = VERR_NO_MEMORY;
             break;
         }
 
-        pThisStream->cbBuf       = cbBuf;
-        pThisStream->phPCM       = phPCM;
-
-        if (pcSamples)
-            *pcSamples = obt.samples * 4;
+        pThisStream->cbBuf = cbBuf;
+        pThisStream->phPCM = phPCM;
     }
     while (0);
 
@@ -1368,13 +1393,9 @@ static int alsaCreateStreamOut(PPDMIHOSTAUDIO pInterface,
     return rc;
 }
 
-static int alsaCreateStreamIn(PPDMIHOSTAUDIO pInterface,
-                              PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfg, uint32_t *pcSamples)
-{
-    NOREF(pInterface);
-    AssertPtrReturn(pStream, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
 
+static int alsaCreateStreamIn(PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
+{
     int rc;
 
     PALSAAUDIOSTREAMIN pThisStream = (PALSAAUDIOSTREAMIN)pStream;
@@ -1383,9 +1404,9 @@ static int alsaCreateStreamIn(PPDMIHOSTAUDIO pInterface,
     do
     {
         ALSAAUDIOSTREAMCFG req;
-        req.fmt         = alsaAudioFmtToALSA(pCfg->enmFormat);
-        req.freq        = pCfg->uHz;
-        req.nchannels   = pCfg->cChannels;
+        req.fmt         = alsaAudioFmtToALSA(pCfgReq->enmFormat);
+        req.freq        = pCfgReq->uHz;
+        req.nchannels   = pCfgReq->cChannels;
         req.period_size = s_ALSAConf.period_size_in;
         req.buffer_size = s_ALSAConf.buffer_size_in;
 
@@ -1400,33 +1421,31 @@ static int alsaCreateStreamIn(PPDMIHOSTAUDIO pInterface,
         if (RT_FAILURE(rc))
             break;
 
-        PDMAUDIOSTREAMCFG streamCfg;
-        streamCfg.uHz           = obt.freq;
-        streamCfg.cChannels     = obt.nchannels;
-        streamCfg.enmFormat     = enmFormat;
-        streamCfg.enmEndianness = enmEnd;
+        pCfgAcq->uHz               = obt.freq;
+        pCfgAcq->cChannels         = obt.nchannels;
+        pCfgAcq->enmFormat         = enmFormat;
+        pCfgAcq->enmEndianness     = enmEnd;
+        pCfgAcq->cSampleBufferSize = obt.samples;
 
-        rc = DrvAudioHlpStreamCfgToProps(&streamCfg, &pStream->Props);
+        PDMAUDIOPCMPROPS Props;
+        rc = DrvAudioHlpStreamCfgToProps(pCfgAcq, &Props);
         if (RT_FAILURE(rc))
             break;
 
         AssertBreakStmt(obt.samples, rc = VERR_INVALID_PARAMETER);
-        size_t cbBuf = obt.samples * (1 << pStream->Props.cShift);
+        size_t cbBuf = obt.samples * (1 << Props.cShift); /** @todo Get rid of using Props! */
         AssertBreakStmt(cbBuf, rc = VERR_INVALID_PARAMETER);
         pThisStream->pvBuf = RTMemAlloc(cbBuf);
         if (!pThisStream->pvBuf)
         {
             LogRel(("ALSA: Not enough memory for input ADC buffer (%RU32 samples, each %d bytes)\n",
-                    obt.samples, 1 << pStream->Props.cShift));
+                    obt.samples, 1 << Props.cShift));
             rc = VERR_NO_MEMORY;
             break;
         }
 
-        pThisStream->cbBuf       = cbBuf;
-        pThisStream->phPCM       = phPCM;
-
-        if (pcSamples)
-            *pcSamples = obt.samples;
+        pThisStream->cbBuf = cbBuf;
+        pThisStream->phPCM = phPCM;
     }
     while (0);
 
@@ -1437,6 +1456,7 @@ static int alsaCreateStreamIn(PPDMIHOSTAUDIO pInterface,
     return rc;
 }
 
+
 static int alsaControlStreamIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream,
                                PDMAUDIOSTREAMCMD enmStreamCmd)
 {
@@ -1468,6 +1488,7 @@ static int alsaControlStreamIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStrea
     return rc;
 }
 
+
 static int alsaControlStreamOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream,
                                 PDMAUDIOSTREAMCMD enmStreamCmd)
 {
@@ -1499,16 +1520,20 @@ static int alsaControlStreamOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStre
     return rc;
 }
 
-static DECLCALLBACK(int) drvHostALSAAudioGetConfig(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDCFG pCfg)
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnGetConfig}
+ */
+static DECLCALLBACK(int) drvHostALSAAudioGetConfig(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDCFG pBackendCfg)
 {
     NOREF(pInterface);
-    AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
+    AssertPtrReturn(pBackendCfg, VERR_INVALID_POINTER);
 
-    pCfg->cbStreamIn  = sizeof(ALSAAUDIOSTREAMIN);
-    pCfg->cbStreamOut = sizeof(ALSAAUDIOSTREAMOUT);
+    pBackendCfg->cbStreamIn  = sizeof(ALSAAUDIOSTREAMIN);
+    pBackendCfg->cbStreamOut = sizeof(ALSAAUDIOSTREAMOUT);
 
-    pCfg->cSources    = 0;
-    pCfg->cSinks      = 0;
+    pBackendCfg->cSources    = 0;
+    pBackendCfg->cSinks      = 0;
 
     /* Enumerate sound devices. */
     char **pszHints;
@@ -1533,14 +1558,14 @@ static DECLCALLBACK(int) drvHostALSAAudioGetConfig(PPDMIHOSTAUDIO pInterface, PP
             if (pszIOID)
             {
                 if (!RTStrICmp("input", pszIOID))
-                    pCfg->cSources++;
+                    pBackendCfg->cSources++;
                 else if (!RTStrICmp("output", pszIOID))
-                    pCfg->cSinks++;
+                    pBackendCfg->cSinks++;
             }
             else /* NULL means bidirectional, input + output. */
             {
-                pCfg->cSources++;
-                pCfg->cSinks++;
+                pBackendCfg->cSources++;
+                pBackendCfg->cSinks++;
             }
 
             LogRel2(("ALSA: Found %s device: %s\n", pszIOID ?  RTStrToLower(pszIOID) : "bidirectional", pszDev));
@@ -1559,8 +1584,8 @@ static DECLCALLBACK(int) drvHostALSAAudioGetConfig(PPDMIHOSTAUDIO pInterface, PP
             pszHintCur++;
         }
 
-        LogRel2(("ALSA: Found %RU8 host playback devices\n",  pCfg->cSinks));
-        LogRel2(("ALSA: Found %RU8 host capturing devices\n", pCfg->cSources));
+        LogRel2(("ALSA: Found %RU8 host playback devices\n",  pBackendCfg->cSinks));
+        LogRel2(("ALSA: Found %RU8 host capturing devices\n", pBackendCfg->cSources));
 
         snd_device_name_free_hint((void **)pszHints);
         pszHints = NULL;
@@ -1569,41 +1594,58 @@ static DECLCALLBACK(int) drvHostALSAAudioGetConfig(PPDMIHOSTAUDIO pInterface, PP
         LogRel2(("ALSA: Error enumerating PCM devices: %Rrc (%d)\n", RTErrConvertFromErrno(err), err));
 
     /* ALSA allows exactly one input and one output used at a time for the selected device(s). */
-    pCfg->cMaxStreamsIn  = 1;
-    pCfg->cMaxStreamsOut = 1;
+    pBackendCfg->cMaxStreamsIn  = 1;
+    pBackendCfg->cMaxStreamsOut = 1;
 
     return VINF_SUCCESS;
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnShutdown}
+ */
 static DECLCALLBACK(void) drvHostALSAAudioShutdown(PPDMIHOSTAUDIO pInterface)
 {
     NOREF(pInterface);
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnGetStatus}
+ */
 static DECLCALLBACK(PDMAUDIOBACKENDSTS) drvHostALSAAudioGetStatus(PPDMIHOSTAUDIO pInterface, PDMAUDIODIR enmDir)
 {
+    RT_NOREF(enmDir);
     AssertPtrReturn(pInterface, PDMAUDIOBACKENDSTS_UNKNOWN);
 
     return PDMAUDIOBACKENDSTS_RUNNING;
 }
 
-static DECLCALLBACK(int) drvHostALSAAudioStreamCreate(PPDMIHOSTAUDIO pInterface,
-                                                      PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfg, uint32_t *pcSamples)
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamCreate}
+ */
+static DECLCALLBACK(int) drvHostALSAAudioStreamCreate(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
     AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg,       VERR_INVALID_POINTER);
+    AssertPtrReturn(pCfgReq,    VERR_INVALID_POINTER);
+    AssertPtrReturn(pCfgAcq,    VERR_INVALID_POINTER);
 
     int rc;
-    if (pCfg->enmDir == PDMAUDIODIR_IN)
-        rc = alsaCreateStreamIn(pInterface,  pStream, pCfg, pcSamples);
+    if (pCfgReq->enmDir == PDMAUDIODIR_IN)
+        rc = alsaCreateStreamIn(pStream, pCfgReq, pCfgAcq);
     else
-        rc = alsaCreateStreamOut(pInterface, pStream, pCfg, pcSamples);
+        rc = alsaCreateStreamOut(pStream, pCfgReq, pCfgAcq);
 
     LogFlowFunc(("%s: rc=%Rrc\n", pStream->szName, rc));
     return rc;
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamDestroy}
+ */
 static DECLCALLBACK(int) drvHostALSAAudioStreamDestroy(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
@@ -1618,8 +1660,11 @@ static DECLCALLBACK(int) drvHostALSAAudioStreamDestroy(PPDMIHOSTAUDIO pInterface
     return rc;
 }
 
-static DECLCALLBACK(int) drvHostALSAAudioStreamControl(PPDMIHOSTAUDIO pInterface,
-                                                       PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamControl}
+ */
+static DECLCALLBACK(int) drvHostALSAAudioStreamControl(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
     AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
@@ -1635,6 +1680,10 @@ static DECLCALLBACK(int) drvHostALSAAudioStreamControl(PPDMIHOSTAUDIO pInterface
     return rc;
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnGetStatus}
+ */
 static DECLCALLBACK(PDMAUDIOSTRMSTS) drvHostALSAAudioStreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
 {
     NOREF(pInterface);
@@ -1656,7 +1705,7 @@ static DECLCALLBACK(PDMAUDIOSTRMSTS) drvHostALSAAudioStreamGetStatus(PPDMIHOSTAU
         if (RT_SUCCESS(rc2))
         {
             LogFlowFunc(("cAvail=%ld\n", cAvail));
-            if (cAvail >= pStreamOut->cSamplesMin)
+            if (cAvail >= (snd_pcm_sframes_t)pStreamOut->cSamplesMin)
                 strmSts |= PDMAUDIOSTRMSTS_FLAG_DATA_WRITABLE;
         }
     }
@@ -1664,6 +1713,10 @@ static DECLCALLBACK(PDMAUDIOSTRMSTS) drvHostALSAAudioStreamGetStatus(PPDMIHOSTAU
     return strmSts;
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamIterate}
+ */
 static DECLCALLBACK(int) drvHostALSAAudioStreamIterate(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
@@ -1675,6 +1728,7 @@ static DECLCALLBACK(int) drvHostALSAAudioStreamIterate(PPDMIHOSTAUDIO pInterface
     return VINF_SUCCESS;
 }
 
+
 /**
  * @interface_method_impl{PDMIBASE,pfnQueryInterface}
  */
@@ -1688,6 +1742,7 @@ static DECLCALLBACK(void *) drvHostALSAAudioQueryInterface(PPDMIBASE pInterface,
     return NULL;
 }
 
+
 /**
  * Construct a DirectSound Audio driver instance.
  *
@@ -1695,6 +1750,8 @@ static DECLCALLBACK(void *) drvHostALSAAudioQueryInterface(PPDMIBASE pInterface,
  */
 static DECLCALLBACK(int) drvHostAlsaAudioConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
+    RT_NOREF(pCfg, fFlags);
+    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
     PDRVHOSTALSAAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTALSAAUDIO);
     LogRel(("Audio: Initializing ALSA driver\n"));
 
@@ -1710,6 +1767,7 @@ static DECLCALLBACK(int) drvHostAlsaAudioConstruct(PPDMDRVINS pDrvIns, PCFGMNODE
     return VINF_SUCCESS;
 }
 
+
 /**
  * Char driver registration record.
  */
@@ -1761,6 +1819,7 @@ const PDMDRVREG g_DrvHostALSAAudio =
     PDM_DRVREG_VERSION
 };
 
+#if 0 /* unused */
 static struct audio_option alsa_options[] =
 {
     {"DACSizeInUsec", AUD_OPT_BOOL, &s_ALSAConf.size_in_usec_out,
@@ -1786,4 +1845,4 @@ static struct audio_option alsa_options[] =
     {"ADCDev", AUD_OPT_STR, &s_ALSAConf.pcm_name_in,
      "ADC device name", NULL, 0}
 };
-
+#endif
diff --git a/src/VBox/Devices/Audio/DrvHostCoreAudio.cpp b/src/VBox/Devices/Audio/DrvHostCoreAudio.cpp
index d367891..6f026c7 100644
--- a/src/VBox/Devices/Audio/DrvHostCoreAudio.cpp
+++ b/src/VBox/Devices/Audio/DrvHostCoreAudio.cpp
@@ -1,6 +1,6 @@
 /* $Id: DrvHostCoreAudio.cpp $ */
 /** @file
- * VBox audio devices: Mac OS X CoreAudio audio driver.
+ * VBox audio devices - Mac OS X CoreAudio audio driver.
  */
 
 /*
@@ -14,6 +14,11 @@
  * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
 #define LOG_GROUP LOG_GROUP_DRV_HOST_AUDIO
 #include <VBox/log.h>
 #include <VBox/vmm/pdmaudioifs.h>
@@ -45,7 +50,7 @@
 # endif
 #endif
 
-/* TODO:
+/** @todo
  * - Maybe make sure the threads are immediately stopped if playing/recording stops.
  */
 
@@ -58,17 +63,6 @@
  * http://developer.apple.com/mac/library/documentation/AudioUnit/Reference/AUComponentServicesReference/Reference/reference.html
  */
 
-/**
- * Host Coreaudio driver instance data.
- * @implements PDMIAUDIOCONNECTOR
- */
-typedef struct DRVHOSTCOREAUDIO
-{
-    /** Pointer to the driver instance structure. */
-    PPDMDRVINS    pDrvIns;
-    /** Pointer to host audio interface. */
-    PDMIHOSTAUDIO IHostAudio;
-} DRVHOSTCOREAUDIO, *PDRVHOSTCOREAUDIO;
 
 /*******************************************************************************
  *
@@ -76,6 +70,8 @@ typedef struct DRVHOSTCOREAUDIO
  *
  ******************************************************************************/
 
+/* Move these down below the internal function prototypes... */
+
 static void coreAudioPrintASBD(const char *pszDesc, const AudioStreamBasicDescription *pASBD)
 {
     char pszSampleRate[32];
@@ -110,7 +106,7 @@ static void coreAudioPrintASBD(const char *pszDesc, const AudioStreamBasicDescri
     LogRel2(("CoreAudio: BytesPerPacket  : %RU32\n", pASBD->mBytesPerPacket));
 }
 
-static void coreAudioPCMPropsToASBD(PDMPCMPROPS *pPCMProps, AudioStreamBasicDescription *pASBD)
+static void coreAudioPCMPropsToASBD(PDMAUDIOPCMPROPS *pPCMProps, AudioStreamBasicDescription *pASBD)
 {
     AssertPtrReturnVoid(pPCMProps);
     AssertPtrReturnVoid(pASBD);
@@ -129,6 +125,19 @@ static void coreAudioPCMPropsToASBD(PDMPCMPROPS *pPCMProps, AudioStreamBasicDesc
     pASBD->mBytesPerPacket   = pASBD->mFramesPerPacket * pASBD->mBytesPerFrame;
 }
 
+static int coreAudioStreamCfgToASBD(PPDMAUDIOSTREAMCFG pCfg, AudioStreamBasicDescription *pASBD)
+{
+    AssertPtrReturn(pCfg,  VERR_INVALID_PARAMETER);
+    AssertPtrReturn(pASBD, VERR_INVALID_PARAMETER);
+
+    PDMAUDIOPCMPROPS Props;
+    int rc = DrvAudioHlpStreamCfgToProps(pCfg, &Props);
+    if (RT_SUCCESS(rc))
+        coreAudioPCMPropsToASBD(&Props, pASBD);
+
+    return rc;
+}
+
 static OSStatus coreAudioSetFrameBufferSize(AudioDeviceID deviceID, bool fInput, UInt32 cReqSize, UInt32 *pcActSize)
 {
     AudioObjectPropertyScope propScope = fInput
@@ -229,6 +238,7 @@ static int coreAudioCFStringToCString(const CFStringRef pCFString, char **ppszSt
     return VINF_SUCCESS;
 }
 
+#if 0 /* unused */
 static AudioDeviceID coreAudioDeviceUIDtoID(const char* pszUID)
 {
     /* Create a CFString out of our CString. */
@@ -259,23 +269,32 @@ static AudioDeviceID coreAudioDeviceUIDtoID(const char* pszUID)
     /* Return the unknown device on error. */
     return kAudioDeviceUnknown;
 }
+#endif /* unused */
 
-/*******************************************************************************
- *
- * Global structures section
- *
- ******************************************************************************/
 
-/* Initialization status indicator used for the recreation of the AudioUnits. */
-#define CA_STATUS_UNINIT    UINT32_C(0) /* The device is uninitialized */
-#define CA_STATUS_IN_INIT   UINT32_C(1) /* The device is currently initializing */
-#define CA_STATUS_INIT      UINT32_C(2) /* The device is initialized */
-#define CA_STATUS_IN_UNINIT UINT32_C(3) /* The device is currently uninitializing */
-#define CA_STATUS_REINIT    UINT32_C(4) /* The device has to be reinitialized */
+/*********************************************************************************************************************************
+*   Defined Constants And Macros                                                                                                 *
+*********************************************************************************************************************************/
+/** @name Initialization status indicator used for the recreation of the AudioUnits.
+ * @{ */
+#define CA_STATUS_UNINIT    UINT32_C(0) /**< The device is uninitialized */
+#define CA_STATUS_IN_INIT   UINT32_C(1) /**< The device is currently initializing */
+#define CA_STATUS_INIT      UINT32_C(2) /**< The device is initialized */
+#define CA_STATUS_IN_UNINIT UINT32_C(3) /**< The device is currently uninitializing */
+#define CA_STATUS_REINIT    UINT32_C(4) /**< The device has to be reinitialized */
+/** @} */
+
 
+/*********************************************************************************************************************************
+*   Global Variables                                                                                                             *
+*********************************************************************************************************************************/
 /* Error code which indicates "End of data" */
-static const OSStatus caConverterEOFDErr = 0x656F6664; /* 'eofd' */
+static const OSStatus g_caConverterEOFDErr = 0x656F6664; /* 'eofd' */
 
+
+/*********************************************************************************************************************************
+*   Structures and Typedefs                                                                                                      *
+*********************************************************************************************************************************/
 /* Prototypes needed for COREAUDIOSTREAMCBCTX. */
 struct COREAUDIOSTREAMIN;
 typedef struct COREAUDIOSTREAMIN *PCOREAUDIOSTREAMIN;
@@ -283,6 +302,19 @@ struct COREAUDIOSTREAMOUT;
 typedef struct COREAUDIOSTREAMOUT *PCOREAUDIOSTREAMOUT;
 
 /**
+ * Host Coreaudio driver instance data.
+ * @implements PDMIAUDIOCONNECTOR
+ */
+typedef struct DRVHOSTCOREAUDIO
+{
+    /** Pointer to the driver instance structure. */
+    PPDMDRVINS    pDrvIns;
+    /** Pointer to host audio interface. */
+    PDMIHOSTAUDIO IHostAudio;
+} DRVHOSTCOREAUDIO, *PDRVHOSTCOREAUDIO;
+
+
+/**
  * Simple structure for maintaining a stream's callback context.
  ** @todo Remove this as soon as we have unified input/output streams in this backend.
  */
@@ -387,18 +419,13 @@ typedef struct COREAUDIOSTREAMIN
 } COREAUDIOSTREAMIN, *PCOREAUDIOSTREAMIN;
 
 
-static int coreAudioInitIn(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOSTREAM pStream, uint32_t *pcSamples);
-static int coreAudioInitOut(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOSTREAM pStream, uint32_t *pcSamples);
-static int coreAudioControlStreamIn(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd);
-static int coreAudioControlStreamOut(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd);
-static int coreAudioCreateStreamIn(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfg, uint32_t *pcSamples);
-static int coreAudioCreateStreamOut(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfg, uint32_t *pcSamples);
-static int coreAudioDestroyStreamIn(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOSTREAM pStream);
-static int coreAudioDestroyStreamOut(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOSTREAM pStream);
-
-static OSStatus coreAudioPlaybackAudioDevicePropertyChanged(AudioObjectID propertyID, UInt32 nAddresses, const AudioObjectPropertyAddress properties[], void *pvUser);
+/*********************************************************************************************************************************
+*   Internal Functions                                                                                                           *
+*********************************************************************************************************************************/
+static OSStatus coreAudioPlaybackAudioDevicePropertyChanged(AudioObjectID propertyID, UInt32 cAddresses, const AudioObjectPropertyAddress properties[], void *pvUser);
 static OSStatus coreAudioPlaybackCb(void *pvUser, AudioUnitRenderActionFlags *pActionFlags, const AudioTimeStamp *pAudioTS, UInt32 uBusID, UInt32 cFrames, AudioBufferList* pBufData);
 
+
 /**
  * Initializes a conversion callback context.
  *
@@ -454,6 +481,7 @@ static void coreAudioUninitConvCbCtx(PCOREAUDIOCONVCBCTX pConvCbCtx)
  */
 static int coreAudioDevicesEnumerate(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOBACKENDCFG pCfg, bool fIn, uint32_t fEnum)
 {
+    RT_NOREF(fEnum);
     AssertPtrReturn(pThis, VERR_INVALID_POINTER);
     /* pCfg is optional. */
 
@@ -579,6 +607,7 @@ static int coreAudioDevicesEnumerate(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOBACKENDCF
  */
 int coreAudioUpdateStatusInternalEx(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOBACKENDCFG pCfg, uint32_t fEnum)
 {
+    RT_NOREF(fEnum);
     AssertPtrReturn(pThis, VERR_INVALID_POINTER);
     /* pCfg is optional. */
 
@@ -602,12 +631,17 @@ int coreAudioUpdateStatusInternalEx(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOBACKENDCFG
     return rc;
 }
 
-static DECLCALLBACK(OSStatus) drvHostCoreAudioDeviceStateChanged(AudioObjectID propertyID,
-                                                                 UInt32 nAddresses,
-                                                                 const AudioObjectPropertyAddress properties[],
-                                                                 void *pvUser)
+
+/**
+ * Implements the OS X callback AudioObjectPropertyListenerProc.
+ */
+static OSStatus drvHostCoreAudioDeviceStateChanged(AudioObjectID propertyID,
+                                                   UInt32 cAddresses,
+                                                   const AudioObjectPropertyAddress paProperties[],
+                                                   void *pvUser)
 {
-    LogFlowFunc(("propertyID=%u nAddresses=%u pvUser=%p\n", propertyID, nAddresses, pvUser));
+    RT_NOREF(propertyID, cAddresses, paProperties)
+    LogFlowFunc(("propertyID=%u cAddresses=%u pvUser=%p\n", propertyID, cAddresses, pvUser));
 
     PCOREAUDIOSTREAMCBCTX pCbCtx = (PCOREAUDIOSTREAMCBCTX)pvUser;
     AssertPtr(pCbCtx);
@@ -674,20 +708,24 @@ static DECLCALLBACK(OSStatus) drvHostCoreAudioDeviceStateChanged(AudioObjectID p
     return noErr;
 }
 
-/* Callback for getting notified when the default recording/playback device has been changed. */
-static DECLCALLBACK(OSStatus) coreAudioDefaultDeviceChanged(AudioObjectID propertyID,
-                                                            UInt32 nAddresses,
-                                                            const AudioObjectPropertyAddress properties[],
-                                                            void *pvUser)
-{
-    OSStatus err = noErr;
 
-    LogFlowFunc(("propertyID=%u nAddresses=%u pvUser=%p\n", propertyID, nAddresses, pvUser));
+/**
+ * Implements the OS X callback AudioObjectPropertyListenerProc for getting
+ * notified when the default recording/playback device has been changed.
+ */
+static OSStatus coreAudioDefaultDeviceChanged(AudioObjectID propertyID,
+                                              UInt32 cAddresses,
+                                              const AudioObjectPropertyAddress properties[],
+                                              void *pvUser)
+{
+    RT_NOREF(propertyID);
+    LogFlowFunc(("propertyID=%u cAddresses=%u pvUser=%p\n", propertyID, cAddresses, pvUser));
 
     PCOREAUDIOSTREAMCBCTX pCbCtx = (PCOREAUDIOSTREAMCBCTX)pvUser;
     AssertPtr(pCbCtx);
 
-    for (UInt32 idxAddress = 0; idxAddress < nAddresses; idxAddress++)
+    OSStatus err = noErr;
+    for (UInt32 idxAddress = 0; idxAddress < cAddresses; idxAddress++)
     {
         const AudioObjectPropertyAddress *pProperty = &properties[idxAddress];
 
@@ -764,12 +802,17 @@ static DECLCALLBACK(OSStatus) coreAudioDefaultDeviceChanged(AudioObjectID proper
     return noErr;
 }
 
-/* Callback for getting notified when some of the properties of an audio device has changed. */
-static DECLCALLBACK(OSStatus) coreAudioRecordingAudioDevicePropertyChanged(AudioObjectID                     propertyID,
-                                                                           UInt32                            cAdresses,
-                                                                           const AudioObjectPropertyAddress  aProperties[],
-                                                                           void                             *pvUser)
+
+/**
+ * Implements the OS X callback AudioObjectPropertyListenerProc for getting
+ * notified when some of the properties of an audio device has changed.
+ */
+static OSStatus coreAudioRecordingAudioDevicePropertyChanged(AudioObjectID                     propertyID,
+                                                             UInt32                            cAddresses,
+                                                             const AudioObjectPropertyAddress  paProperties[],
+                                                             void                             *pvUser)
 {
+    RT_NOREF(cAddresses, paProperties);
     PCOREAUDIOSTREAMIN pStreamIn = (PCOREAUDIOSTREAMIN)pvUser;
 
     switch (propertyID)
@@ -799,15 +842,19 @@ static DECLCALLBACK(OSStatus) coreAudioRecordingAudioDevicePropertyChanged(Audio
     return noErr;
 }
 
-/* Callback to convert audio input data from one format to another. */
-static DECLCALLBACK(OSStatus) coreAudioConverterCallback(AudioConverterRef              inAudioConverter,
-                                                         UInt32                        *ioNumberDataPackets,
-                                                         AudioBufferList               *ioData,
-                                                         AudioStreamPacketDescription **ppASPD,
-                                                         void                          *pvUser)
+/**
+ * Implements the OS X callback AudioConverterComplexInputDataProc for
+ * converting audio input data from one format to another.
+ */
+static OSStatus coreAudioConverterCallback(AudioConverterRef              inAudioConverter,
+                                           UInt32                        *ioNumberDataPackets,
+                                           AudioBufferList               *ioData,
+                                           AudioStreamPacketDescription **ppASPD,
+                                           void                          *pvUser)
 {
-    AssertPtrReturn(ioNumberDataPackets, caConverterEOFDErr);
-    AssertPtrReturn(ioData,              caConverterEOFDErr);
+    RT_NOREF(inAudioConverter, ppASPD);
+    AssertPtrReturn(ioNumberDataPackets, g_caConverterEOFDErr);
+    AssertPtrReturn(ioData,              g_caConverterEOFDErr);
 
     PCOREAUDIOCONVCBCTX pConvCbCtx = (PCOREAUDIOCONVCBCTX)pvUser;
     AssertPtr(pConvCbCtx);
@@ -874,14 +921,19 @@ static DECLCALLBACK(OSStatus) coreAudioConverterCallback(AudioConverterRef
     return noErr;
 }
 
-/* Callback to feed audio input buffer. */
-static DECLCALLBACK(OSStatus) coreAudioRecordingCb(void                       *pvUser,
-                                                   AudioUnitRenderActionFlags *pActionFlags,
-                                                   const AudioTimeStamp       *pAudioTS,
-                                                   UInt32                      uBusID,
-                                                   UInt32                      cFrames,
-                                                   AudioBufferList            *pBufData)
+/**
+ * Implements the OS X callback AURenderCallback in order to feed the audio
+ * input buffer.
+ */
+static OSStatus coreAudioRecordingCb(void                       *pvUser,
+                                     AudioUnitRenderActionFlags *pActionFlags,
+                                     const AudioTimeStamp       *pAudioTS,
+                                     UInt32                      uBusID,
+                                     UInt32                      cFrames,
+                                     AudioBufferList            *pBufData)
 {
+    RT_NOREF(pBufData);
+
     /* If nothing is pending return immediately. */
     if (cFrames == 0)
         return noErr;
@@ -1087,22 +1139,27 @@ static DECLCALLBACK(OSStatus) coreAudioRecordingCb(void                       *p
     return err;
 }
 
-# define CA_BREAK_STMT(stmt) \
-    stmt; \
-    break;
+#define CA_BREAK_STMT(stmt) if (true) \
+    { \
+        stmt; \
+        break; \
+    } else do { } while (0)
 
 /** @todo Eventually split up this function, as this already is huge! */
-static int coreAudioInitIn(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOSTREAM pStream, uint32_t *pcSamples)
+static int coreAudioInitIn(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOSTREAM pStream,
+                           PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
 {
+    RT_NOREF(pThis);
+
     int rc = VINF_SUCCESS;
 
     PCOREAUDIOSTREAMIN pStreamIn = (PCOREAUDIOSTREAMIN)pStream;
     UInt32 cSamples = 0;
 
     OSStatus err = noErr;
-    AudioDeviceID deviceID = pStreamIn->deviceID;
-
     UInt32 uSize = 0;
+
+    AudioDeviceID deviceID = pStreamIn->deviceID;
     if (deviceID == kAudioDeviceUnknown)
     {
         /* Fetch the default audio recording device currently in use. */
@@ -1197,14 +1254,15 @@ static int coreAudioInitIn(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOSTREAM pStream, uin
 
         LogFlowFunc(("cFrames=%RU32\n", cFrames));
 
-        ComponentDescription cd;
+        /* Try to find the default HAL output component. */
+        AudioComponentDescription cd;
+
         RT_ZERO(cd);
         cd.componentType         = kAudioUnitType_Output;
         cd.componentSubType      = kAudioUnitSubType_HALOutput;
         cd.componentManufacturer = kAudioUnitManufacturer_Apple;
 
-        /* Try to find the default HAL output component. */
-        Component cp = FindNextComponent(NULL, &cd);
+        AudioComponent cp = AudioComponentFindNext(NULL, &cd);
         if (cp == 0)
         {
             LogRel(("CoreAudio: Failed to find HAL output component\n")); /** @todo Return error value? */
@@ -1212,7 +1270,7 @@ static int coreAudioInitIn(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOSTREAM pStream, uin
         }
 
         /* Open the default HAL output component. */
-        err = OpenAComponent(cp, &pStreamIn->audioUnit);
+        err = AudioComponentInstanceNew(cp, &pStreamIn->audioUnit);
         if (err != noErr)
         {
             LogRel(("CoreAudio: Failed to open output component (%RI32)\n", err));
@@ -1278,7 +1336,7 @@ static int coreAudioInitIn(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOSTREAM pStream, uin
 
         /* Create an AudioStreamBasicDescription based on our required audio settings. */
         RT_ZERO(pStreamIn->streamFormat);
-        coreAudioPCMPropsToASBD(&pStreamIn->Stream.Props, &pStreamIn->streamFormat);
+        coreAudioStreamCfgToASBD(pCfgReq, &pStreamIn->streamFormat);
 
         coreAudioPrintASBD("Recording device", &pStreamIn->deviceFormat);
         coreAudioPrintASBD("Recording stream", &pStreamIn->streamFormat);
@@ -1449,13 +1507,17 @@ static int coreAudioInitIn(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOSTREAM pStream, uin
             CA_BREAK_STMT(rc = VERR_INVALID_PARAMETER);
         }
 
-        if (RT_SUCCESS(rc))
-            rc = RTCircBufCreate(&pStreamIn->pCircBuf, cSamples << pStreamIn->Stream.Props.cShift);
+        PDMAUDIOPCMPROPS PCMProps;
+        int rc2 = DrvAudioHlpStreamCfgToProps(pCfgAcq, &PCMProps);
+        AssertRC(rc2);
+
+        rc = RTCircBufCreate(&pStreamIn->pCircBuf, cSamples << PCMProps.cShift);
+        if (RT_FAILURE(rc))
+            break;
 
         /* Init the converter callback context. */
-        if (RT_SUCCESS(rc))
-            rc = coreAudioInitConvCbCtx(&pStreamIn->convCbCtx,
-                                        &pStreamIn->deviceFormat /* Source */, &pStreamIn->streamFormat /* Dest */);
+        rc = coreAudioInitConvCbCtx(&pStreamIn->convCbCtx,
+                                    &pStreamIn->deviceFormat /* Source */, &pStreamIn->streamFormat /* Dest */);
 
         if (RT_SUCCESS(rc))
         {
@@ -1484,8 +1546,8 @@ static int coreAudioInitIn(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOSTREAM pStream, uin
 
         LogFunc(("cSamples=%RU32\n", cSamples));
 
-        if (pcSamples)
-            *pcSamples = cSamples;
+        if (pCfgAcq)
+            pCfgAcq->cSampleBufferSize = cSamples;
     }
     else
     {
@@ -1507,24 +1569,27 @@ static int coreAudioInitIn(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOSTREAM pStream, uin
 }
 
 /** @todo Eventually split up this function, as this already is huge! */
-static int coreAudioInitOut(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOSTREAM pStream, uint32_t *pcSamples)
+static int coreAudioInitOut(PDRVHOSTCOREAUDIO pThis,
+                            PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
 {
+    RT_NOREF(pThis);
+
     int rc = VINF_SUCCESS;
 
     PCOREAUDIOSTREAMOUT pStreamOut = (PCOREAUDIOSTREAMOUT)pStream;
     UInt32 cSamples = 0;
 
     OSStatus err = noErr;
-    AudioDeviceID deviceID = pStreamOut->deviceID;
-
     UInt32 uSize = 0;
-    if (pStreamOut->deviceID == kAudioDeviceUnknown)
+
+    AudioDeviceID deviceID = pStreamOut->deviceID;
+    if (deviceID == kAudioDeviceUnknown)
     {
         /* Fetch the default audio recording device currently in use. */
         AudioObjectPropertyAddress propAdr = { kAudioHardwarePropertyDefaultOutputDevice,
                                                kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster };
-        uSize = sizeof(pStreamOut->deviceID);
-        err = AudioObjectGetPropertyData(kAudioObjectSystemObject, &propAdr, 0, NULL, &uSize, &pStreamOut->deviceID);
+        uSize = sizeof(deviceID);
+        err = AudioObjectGetPropertyData(kAudioObjectSystemObject, &propAdr, 0, NULL, &uSize, &deviceID);
         if (err != noErr)
         {
             LogRel(("CoreAudio: Unable to determine default playback device (%RI32)\n", err));
@@ -1604,14 +1669,15 @@ static int coreAudioInitOut(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOSTREAM pStream, ui
             CA_BREAK_STMT(rc = VERR_AUDIO_BACKEND_INIT_FAILED);
         }
 
-        ComponentDescription cd;
+        /* Try to find the default HAL output component. */
+        AudioComponentDescription cd;
         RT_ZERO(cd);
+
         cd.componentType         = kAudioUnitType_Output;
         cd.componentSubType      = kAudioUnitSubType_HALOutput;
         cd.componentManufacturer = kAudioUnitManufacturer_Apple;
 
-        /* Try to find the default HAL output component. */
-        Component cp = FindNextComponent(NULL, &cd);
+        AudioComponent cp = AudioComponentFindNext(NULL, &cd);
         if (cp == 0)
         {
             LogRel(("CoreAudio: Failed to find HAL output component\n")); /** @todo Return error value? */
@@ -1619,7 +1685,7 @@ static int coreAudioInitOut(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOSTREAM pStream, ui
         }
 
         /* Open the default HAL output component. */
-        err = OpenAComponent(cp, &pStreamOut->audioUnit);
+        err = AudioComponentInstanceNew(cp, &pStreamOut->audioUnit);
         if (err != noErr)
         {
             LogRel(("CoreAudio: Failed to open output component (%RI32)\n", err));
@@ -1673,7 +1739,7 @@ static int coreAudioInitOut(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOSTREAM pStream, ui
         }
 
         /* Create an AudioStreamBasicDescription based on our required audio settings. */
-        coreAudioPCMPropsToASBD(&pStreamOut->Stream.Props, &pStreamOut->streamFormat);
+        coreAudioStreamCfgToASBD(pCfgReq, &pStreamOut->streamFormat);
 
         coreAudioPrintASBD("Playback device", &pStreamOut->deviceFormat);
         coreAudioPrintASBD("Playback format", &pStreamOut->streamFormat);
@@ -1754,30 +1820,33 @@ static int coreAudioInitOut(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOSTREAM pStream, ui
             pStreamOut->pCircBuf = NULL;
         }
 
-        /* Create the internal ring buffer. */
-        rc = RTCircBufCreate(&pStreamOut->pCircBuf, cSamples << pStream->Props.cShift);
-        if (RT_SUCCESS(rc))
-        {
-            /*
-             * Register callbacks.
-             */
+        PDMAUDIOPCMPROPS PCMProps;
+        int rc2 = DrvAudioHlpStreamCfgToProps(pCfgAcq, &PCMProps);
+        AssertRC(rc2);
+
+        rc = RTCircBufCreate(&pStreamOut->pCircBuf, cSamples << PCMProps.cShift);
+        if (RT_FAILURE(rc))
+            break;
+
+        /*
+         * Register callbacks.
+         */
 #ifdef DEBUG
-            propAdr.mSelector = kAudioDeviceProcessorOverload;
-            propAdr.mScope    = kAudioUnitScope_Global;
-            err = AudioObjectAddPropertyListener(pStreamOut->deviceID, &propAdr,
-                                                 coreAudioPlaybackAudioDevicePropertyChanged, (void *)pStreamOut);
-            if (err != noErr)
-                LogRel(("CoreAudio: Failed to register processor overload listener for output stream (%RI32)\n", err));
+        propAdr.mSelector = kAudioDeviceProcessorOverload;
+        propAdr.mScope    = kAudioUnitScope_Global;
+        err = AudioObjectAddPropertyListener(pStreamOut->deviceID, &propAdr,
+                                             coreAudioPlaybackAudioDevicePropertyChanged, (void *)pStreamOut);
+        if (err != noErr)
+            LogRel(("CoreAudio: Failed to register processor overload listener for output stream (%RI32)\n", err));
 #endif /* DEBUG */
 
-            propAdr.mSelector = kAudioDevicePropertyNominalSampleRate;
-            propAdr.mScope    = kAudioUnitScope_Global;
-            err = AudioObjectAddPropertyListener(pStreamOut->deviceID, &propAdr,
-                                                 coreAudioPlaybackAudioDevicePropertyChanged, (void *)pStreamOut);
-            /* Not fatal. */
-            if (err != noErr)
-                LogRel(("CoreAudio: Failed to register sample rate changed listener for output stream (%RI32)\n", err));
-        }
+        propAdr.mSelector = kAudioDevicePropertyNominalSampleRate;
+        propAdr.mScope    = kAudioUnitScope_Global;
+        err = AudioObjectAddPropertyListener(pStreamOut->deviceID, &propAdr,
+                                             coreAudioPlaybackAudioDevicePropertyChanged, (void *)pStreamOut);
+        /* Not fatal. */
+        if (err != noErr)
+            LogRel(("CoreAudio: Failed to register sample rate changed listener for output stream (%RI32)\n", err));
 
     } while (0);
 
@@ -1787,8 +1856,8 @@ static int coreAudioInitOut(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOSTREAM pStream, ui
 
         LogFunc(("cSamples=%RU32\n", cSamples));
 
-        if (pcSamples)
-            *pcSamples = cSamples;
+        if (pCfgAcq)
+            pCfgAcq->cSampleBufferSize = cSamples;
     }
     else
     {
@@ -1807,12 +1876,18 @@ static int coreAudioInitOut(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOSTREAM pStream, ui
     return rc;
 }
 
-/* Callback for getting notified when some of the properties of an audio device has changed. */
-static DECLCALLBACK(OSStatus) coreAudioPlaybackAudioDevicePropertyChanged(AudioObjectID propertyID,
-                                                                          UInt32 nAddresses,
-                                                                          const AudioObjectPropertyAddress properties[],
-                                                                          void *pvUser)
+
+/**
+ * Implements the OS X callback AudioObjectPropertyListenerProc for getting
+ * notified when some of the properties of an audio device has changed.
+ */
+static OSStatus coreAudioPlaybackAudioDevicePropertyChanged(AudioObjectID propertyID,
+                                                            UInt32 cAddresses,
+                                                            const AudioObjectPropertyAddress paProperties[],
+                                                            void *pvUser)
 {
+    RT_NOREF(propertyID, cAddresses, paProperties, pvUser)
+
     switch (propertyID)
     {
 #ifdef DEBUG
@@ -1824,16 +1899,20 @@ static DECLCALLBACK(OSStatus) coreAudioPlaybackAudioDevicePropertyChanged(AudioO
     return noErr;
 }
 
-/* Callback to feed audio output buffer. */
-static DECLCALLBACK(OSStatus) coreAudioPlaybackCb(void *pvUser,
-                                                  AudioUnitRenderActionFlags *pActionFlags,
-                                                  const AudioTimeStamp       *pAudioTS,
-                                                  UInt32                      uBusID,
-                                                  UInt32                      cFrames,
-                                                  AudioBufferList            *pBufData)
+
+/**
+ * Implements the OS X callback AURenderCallback in order to feed the audio
+ * output buffer.
+ */
+static OSStatus coreAudioPlaybackCb(void *pvUser,
+                                    AudioUnitRenderActionFlags *pActionFlags,
+                                    const AudioTimeStamp       *pAudioTS,
+                                    UInt32                      uBusID,
+                                    UInt32                      cFrames,
+                                    AudioBufferList            *pBufData)
 {
+    RT_NOREF(pActionFlags, pAudioTS, uBusID, cFrames);
     PCOREAUDIOSTREAMOUT pStreamOut  = (PCOREAUDIOSTREAMOUT)pvUser;
-    PPDMAUDIOSTREAM     pStream     = &pStreamOut->Stream;
 
     if (ASMAtomicReadU32(&pStreamOut->status) != CA_STATUS_INIT)
     {
@@ -1892,31 +1971,48 @@ static DECLCALLBACK(OSStatus) coreAudioPlaybackCb(void *pvUser,
     return noErr;
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO, pfnInit}
+ *
+ * @todo Please put me next to the shutdown function, because then it would be
+ *       clear why I'm empty.  While at it, it would be nice if you also
+ *       reordered my PDMIHOSTAUDIO sibilings according to the interface
+ *       (doesn't matter if it's reversed (like all other PDM drivers and
+ *       devices) or not).
+ */
 static DECLCALLBACK(int) drvHostCoreAudioInit(PPDMIHOSTAUDIO pInterface)
 {
-    NOREF(pInterface);
+    RT_NOREF(pInterface);
 
     LogFlowFuncEnter();
 
     return VINF_SUCCESS;
 }
 
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO, pfnStreamCapture}
+ */
 static DECLCALLBACK(int) drvHostCoreAudioStreamCapture(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream,
-                                                       uint32_t *pcSamplesCaptured)
+                                                       void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead)
 {
-    PPDMDRVINS pDrvIns      = PDMIBASE_2_PDMDRV(pInterface);
-    PDRVHOSTCOREAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTCOREAUDIO);
+    RT_NOREF(pvBuf, cbBuf); /** @todo r=bird: this looks totally weird at first glance! */
+
+    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
+    AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
+    /* pcbRead is optional. */
 
     PCOREAUDIOSTREAMIN pStreamIn = (PCOREAUDIOSTREAMIN)pStream;
 
+/* unused, make you wonder why...
     size_t csReads = 0;
     char *pcSrc;
-    PPDMAUDIOSAMPLE psDst;
+    PPDMAUDIOSAMPLE psDst; */
 
     if (ASMAtomicReadU32(&pStreamIn->status) != CA_STATUS_INIT)
     {
-        if (pcSamplesCaptured)
-            *pcSamplesCaptured = 0;
+        if (pcbRead)
+            *pcbRead = 0;
         return VINF_SUCCESS;
     }
 
@@ -1925,14 +2021,14 @@ static DECLCALLBACK(int) drvHostCoreAudioStreamCapture(PPDMIHOSTAUDIO pInterface
 
     do
     {
-        size_t cbBuf     = AudioMixBufSizeBytes(&pStream->MixBuf);
-        size_t cbToWrite = RT_MIN(cbBuf, RTCircBufUsed(pStreamIn->pCircBuf));
+        size_t cbMixBuf  = AudioMixBufSizeBytes(&pStream->MixBuf);
+        size_t cbToWrite = RT_MIN(cbMixBuf, RTCircBufUsed(pStreamIn->pCircBuf));
 
         uint32_t cWritten, cbWritten;
         uint8_t *puBuf;
         size_t   cbToRead;
 
-        Log3Func(("cbBuf=%zu, cbToWrite=%zu/%zu\n", cbBuf, cbToWrite, RTCircBufSize(pStreamIn->pCircBuf)));
+        Log3Func(("cbMixBuf=%zu, cbToWrite=%zu/%zu\n", cbMixBuf, cbToWrite, RTCircBufSize(pStreamIn->pCircBuf)));
 
         while (cbToWrite)
         {
@@ -1994,8 +2090,8 @@ static DECLCALLBACK(int) drvHostCoreAudioStreamCapture(PPDMIHOSTAUDIO pInterface
         if (cCaptured)
             LogFlowFunc(("%RU32 samples captured\n", cCaptured));
 
-        if (pcSamplesCaptured)
-            *pcSamplesCaptured = cCaptured;
+        if (pcbRead)
+            *pcbRead = cCaptured;
     }
 
     if (RT_FAILURE(rc))
@@ -2004,11 +2100,16 @@ static DECLCALLBACK(int) drvHostCoreAudioStreamCapture(PPDMIHOSTAUDIO pInterface
     return rc;
 }
 
-static DECLCALLBACK(int) drvHostCoreAudioStreamPlay(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream,
-                                                    uint32_t *pcSamplesPlayed)
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO, pfnStreamPlay}
+ */
+int drvHostCoreAudioStreamPlay(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream, const void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten)
 {
-    PPDMDRVINS pDrvIns      = PDMIBASE_2_PDMDRV(pInterface);
-    PDRVHOSTCOREAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTCOREAUDIO);
+    RT_NOREF(pvBuf, cbBuf); /** @todo r=bird: this looks weird at first glance... */
+
+    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
+    AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
+    /* pcbWritten is optional. */
 
     PCOREAUDIOSTREAMOUT pStreamOut = (PCOREAUDIOSTREAMOUT)pStream;
 
@@ -2017,8 +2118,8 @@ static DECLCALLBACK(int) drvHostCoreAudioStreamPlay(PPDMIHOSTAUDIO pInterface, P
     uint32_t cLive = AudioMixBufLive(&pStream->MixBuf);
     if (!cLive) /* Not live samples to play? Bail out. */
     {
-        if (pcSamplesPlayed)
-            *pcSamplesPlayed = 0;
+        if (pcbWritten)
+            *pcbWritten = 0;
         return VINF_SUCCESS;
     }
 
@@ -2073,15 +2174,14 @@ static DECLCALLBACK(int) drvHostCoreAudioStreamPlay(PPDMIHOSTAUDIO pInterface, P
 
         Log3Func(("cReadTotal=%RU32 (%RU32 bytes)\n", cReadTotal, cbReadTotal));
 
-        if (pcSamplesPlayed)
-            *pcSamplesPlayed = cReadTotal;
+        if (pcbWritten)
+            *pcbWritten = cReadTotal;
     }
 
     return rc;
 }
 
-static DECLCALLBACK(int) coreAudioControlStreamOut(PDRVHOSTCOREAUDIO pThis,
-                                                   PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)
+static int coreAudioControlStreamOut(PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)
 {
     PCOREAUDIOSTREAMOUT pStreamOut = (PCOREAUDIOSTREAMOUT)pStream;
 
@@ -2156,8 +2256,7 @@ static DECLCALLBACK(int) coreAudioControlStreamOut(PDRVHOSTCOREAUDIO pThis,
     return rc;
 }
 
-static int coreAudioControlStreamIn(PDRVHOSTCOREAUDIO pThis,
-                                    PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)
+static int coreAudioControlStreamIn(PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)
 {
     PCOREAUDIOSTREAMIN pStreamIn = (PCOREAUDIOSTREAMIN)pStream;
 
@@ -2228,7 +2327,7 @@ static int coreAudioControlStreamIn(PDRVHOSTCOREAUDIO pThis,
     return rc;
 }
 
-static int coreAudioDestroyStreamIn(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOSTREAM pStream)
+static int coreAudioDestroyStreamIn(PPDMAUDIOSTREAM pStream)
 {
     PCOREAUDIOSTREAMIN pStreamIn = (PCOREAUDIOSTREAMIN)pStream;
 
@@ -2243,7 +2342,7 @@ static int coreAudioDestroyStreamIn(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOSTREAM pSt
 
     OSStatus err = noErr;
 
-    int rc = coreAudioControlStreamIn(pThis, &pStreamIn->Stream, PDMAUDIOSTREAMCMD_DISABLE);
+    int rc = coreAudioControlStreamIn(&pStreamIn->Stream, PDMAUDIOSTREAMCMD_DISABLE);
     if (RT_SUCCESS(rc))
     {
         ASMAtomicXchgU32(&pStreamIn->status, CA_STATUS_IN_UNINIT);
@@ -2311,7 +2410,7 @@ static int coreAudioDestroyStreamIn(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOSTREAM pSt
 
         err = AudioUnitUninitialize(pStreamIn->audioUnit);
         if (err == noErr)
-            err = CloseComponent(pStreamIn->audioUnit);
+            err = AudioComponentInstanceDispose(pStreamIn->audioUnit);
 
         if (   err != noErr
             && err != kAudioHardwareBadObjectError)
@@ -2343,7 +2442,7 @@ static int coreAudioDestroyStreamIn(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOSTREAM pSt
     return rc;
 }
 
-static int coreAudioDestroyStreamOut(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOSTREAM pStream)
+static int coreAudioDestroyStreamOut(PPDMAUDIOSTREAM pStream)
 {
     PCOREAUDIOSTREAMOUT pStreamOut = (PCOREAUDIOSTREAMOUT)pStream;
 
@@ -2356,7 +2455,7 @@ static int coreAudioDestroyStreamOut(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOSTREAM pS
         return VINF_SUCCESS;
     }
 
-    int rc = coreAudioControlStreamOut(pThis, &pStreamOut->Stream, PDMAUDIOSTREAMCMD_DISABLE);
+    int rc = coreAudioControlStreamOut(&pStreamOut->Stream, PDMAUDIOSTREAMCMD_DISABLE);
     if (RT_SUCCESS(rc))
     {
         ASMAtomicXchgU32(&pStreamOut->status, CA_STATUS_IN_UNINIT);
@@ -2422,7 +2521,7 @@ static int coreAudioDestroyStreamOut(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOSTREAM pS
 
         err = AudioUnitUninitialize(pStreamOut->audioUnit);
         if (err == noErr)
-            err = CloseComponent(pStreamOut->audioUnit);
+            err = AudioComponentInstanceDispose(pStreamOut->audioUnit);
 
         if (   err != noErr
             && err != kAudioHardwareBadObjectError)
@@ -2448,11 +2547,16 @@ static int coreAudioDestroyStreamOut(PDRVHOSTCOREAUDIO pThis, PPDMAUDIOSTREAM pS
 }
 
 static int coreAudioCreateStreamIn(PDRVHOSTCOREAUDIO pThis,
-                                   PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfg, uint32_t *pcSamples)
+                                   PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
 {
+    AssertPtrReturn(pThis,   VERR_INVALID_POINTER);
+    AssertPtrReturn(pStream, VERR_INVALID_POINTER);
+    AssertPtrReturn(pCfgReq, VERR_INVALID_POINTER);
+    AssertPtrReturn(pCfgAcq, VERR_INVALID_POINTER);
+
     PCOREAUDIOSTREAMIN pStreamIn = (PCOREAUDIOSTREAMIN)pStream;
 
-    LogFlowFunc(("enmRecSource=%RU32\n", pCfg->DestSource.Source));
+    LogFlowFunc(("enmRecSource=%RU32\n", pCfgReq->DestSource.Source));
 
     pStreamIn->deviceID            = kAudioDeviceUnknown;
     pStreamIn->audioUnit           = NULL;
@@ -2470,60 +2574,57 @@ static int coreAudioCreateStreamIn(PDRVHOSTCOREAUDIO pThis,
 
     bool fDeviceByUser = false; /* Do we use a device which was set by the user? */
 
-    /* Initialize the hardware info section with the audio settings */
-    int rc = DrvAudioHlpStreamCfgToProps(pCfg, &pStreamIn->Stream.Props);
+#if 0
+    /* Try to find the audio device set by the user */
+    if (DeviceUID.pszInputDeviceUID)
+    {
+        pStreamIn->deviceID = drvHostCoreAudioDeviceUIDtoID(DeviceUID.pszInputDeviceUID);
+        /* Not fatal */
+        if (pStreamIn->deviceID == kAudioDeviceUnknown)
+            LogRel(("CoreAudio: Unable to find recording device %s. Falling back to the default audio device. \n", DeviceUID.pszInputDeviceUID));
+        else
+            fDeviceByUser = true;
+    }
+#endif
+    int rc = coreAudioInitIn(pThis, &pStreamIn->Stream, pCfgReq, pCfgAcq);
     if (RT_SUCCESS(rc))
     {
-#if 0
-        /* Try to find the audio device set by the user */
-        if (DeviceUID.pszInputDeviceUID)
+        OSStatus err;
+
+        /* When the devices isn't forced by the user, we want default device change notifications. */
+        if (!fDeviceByUser)
         {
-            pStreamIn->deviceID = drvHostCoreAudioDeviceUIDtoID(DeviceUID.pszInputDeviceUID);
-            /* Not fatal */
-            if (pStreamIn->deviceID == kAudioDeviceUnknown)
-                LogRel(("CoreAudio: Unable to find recording device %s. Falling back to the default audio device. \n", DeviceUID.pszInputDeviceUID));
-            else
-                fDeviceByUser = true;
+            if (!pStreamIn->fDefDevChgListReg)
+            {
+                AudioObjectPropertyAddress propAdr = { kAudioHardwarePropertyDefaultInputDevice, kAudioObjectPropertyScopeGlobal,
+                                                       kAudioObjectPropertyElementMaster };
+                err = AudioObjectAddPropertyListener(kAudioObjectSystemObject, &propAdr,
+                                                     coreAudioDefaultDeviceChanged, &pStreamIn->cbCtx);
+                if (   err == noErr
+                    || err == kAudioHardwareIllegalOperationError)
+                {
+                    pStreamIn->fDefDevChgListReg = true;
+                }
+                else
+                    LogRel(("CoreAudio: Failed to add the default recording device changed listener (%RI32)\n", err));
+            }
         }
-#endif
-        rc = coreAudioInitIn(pThis, &pStreamIn->Stream, pcSamples);
-    }
 
-    OSStatus err;
-
-    /* When the devices isn't forced by the user, we want default device change notifications. */
-    if (!fDeviceByUser)
-    {
-        if (!pStreamIn->fDefDevChgListReg)
+        if (   !pStreamIn->fDevStateChgListReg
+            && (pStreamIn->deviceID != kAudioDeviceUnknown))
         {
-            AudioObjectPropertyAddress propAdr = { kAudioHardwarePropertyDefaultInputDevice, kAudioObjectPropertyScopeGlobal,
+            /* Register callback for being notified if the device stops being alive. */
+            AudioObjectPropertyAddress propAdr = { kAudioDevicePropertyDeviceIsAlive, kAudioObjectPropertyScopeGlobal,
                                                    kAudioObjectPropertyElementMaster };
-            err = AudioObjectAddPropertyListener(kAudioObjectSystemObject, &propAdr,
-                                                 coreAudioDefaultDeviceChanged, &pStreamIn->cbCtx);
-            if (   err == noErr
-                || err == kAudioHardwareIllegalOperationError)
+            err = AudioObjectAddPropertyListener(pStreamIn->deviceID, &propAdr, drvHostCoreAudioDeviceStateChanged,
+                                                 &pStreamIn->cbCtx);
+            if (err == noErr)
             {
-                pStreamIn->fDefDevChgListReg = true;
+                pStreamIn->fDevStateChgListReg = true;
             }
             else
-                LogRel(("CoreAudio: Failed to add the default recording device changed listener (%RI32)\n", err));
-        }
-    }
-
-    if (   !pStreamIn->fDevStateChgListReg
-        && (pStreamIn->deviceID != kAudioDeviceUnknown))
-    {
-        /* Register callback for being notified if the device stops being alive. */
-        AudioObjectPropertyAddress propAdr = { kAudioDevicePropertyDeviceIsAlive, kAudioObjectPropertyScopeGlobal,
-                                               kAudioObjectPropertyElementMaster };
-        err = AudioObjectAddPropertyListener(pStreamIn->deviceID, &propAdr, drvHostCoreAudioDeviceStateChanged,
-                                             &pStreamIn->cbCtx);
-        if (err == noErr)
-        {
-            pStreamIn->fDevStateChgListReg = true;
+                LogRel(("CoreAudio: Failed to add the recording device state changed listener (%RI32)\n", err));
         }
-        else
-            LogRel(("CoreAudio: Failed to add the recording device state changed listener (%RI32)\n", err));
     }
 
     LogFlowFuncLeaveRC(rc);
@@ -2531,9 +2632,13 @@ static int coreAudioCreateStreamIn(PDRVHOSTCOREAUDIO pThis,
 }
 
 static int coreAudioCreateStreamOut(PDRVHOSTCOREAUDIO pThis,
-                                    PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfg,
-                                    uint32_t *pcSamples)
+                                    PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
 {
+    AssertPtrReturn(pThis,   VERR_INVALID_POINTER);
+    AssertPtrReturn(pStream, VERR_INVALID_POINTER);
+    AssertPtrReturn(pCfgReq, VERR_INVALID_POINTER);
+    AssertPtrReturn(pCfgAcq, VERR_INVALID_POINTER);
+
     PCOREAUDIOSTREAMOUT pStreamOut = (PCOREAUDIOSTREAMOUT)pStream;
 
     LogFlowFuncEnter();
@@ -2552,142 +2657,157 @@ static int coreAudioCreateStreamOut(PDRVHOSTCOREAUDIO pThis,
 
     bool fDeviceByUser = false; /* Do we use a device which was set by the user? */
 
-    /* If a stream configuration is given, apply that to the stream. */
-    int rc = DrvAudioHlpStreamCfgToProps(pCfg, &pStreamOut->Stream.Props);
-    if (RT_SUCCESS(rc))
-    {
 #if 0
-        /* Try to find the audio device set by the user. Use
-         * export VBOX_COREAUDIO_OUTPUT_DEVICE_UID=AppleHDAEngineOutput:0
-         * to set it. */
-        if (DeviceUID.pszOutputDeviceUID)
-        {
-            pStreamOut->audioDeviceId = drvHostCoreAudioDeviceUIDtoID(DeviceUID.pszOutputDeviceUID);
-            /* Not fatal */
-            if (pStreamOut->audioDeviceId == kAudioDeviceUnknown)
-                LogRel(("CoreAudio: Unable to find playback device %s. Falling back to the default audio device. \n", DeviceUID.pszOutputDeviceUID));
-            else
-                fDeviceByUser = true;
-        }
-#endif
-        rc = coreAudioInitOut(pThis, pStream, pcSamples);
+    /* Try to find the audio device set by the user. Use
+     * export VBOX_COREAUDIO_OUTPUT_DEVICE_UID=AppleHDAEngineOutput:0
+     * to set it. */
+    if (DeviceUID.pszOutputDeviceUID)
+    {
+        pStreamOut->audioDeviceId = drvHostCoreAudioDeviceUIDtoID(DeviceUID.pszOutputDeviceUID);
+        /* Not fatal */
+        if (pStreamOut->audioDeviceId == kAudioDeviceUnknown)
+            LogRel(("CoreAudio: Unable to find playback device %s. Falling back to the default audio device. \n", DeviceUID.pszOutputDeviceUID));
+        else
+            fDeviceByUser = true;
     }
-
-    OSStatus err;
-
-    /* When the devices isn't forced by the user, we want default device change notifications. */
-    if (!fDeviceByUser)
+#endif
+    int rc = coreAudioInitOut(pThis, pStream, pCfgReq, pCfgAcq);
+    if (RT_SUCCESS(rc))
     {
-        AudioObjectPropertyAddress propAdr = { kAudioHardwarePropertyDefaultOutputDevice, kAudioObjectPropertyScopeGlobal,
-                                               kAudioObjectPropertyElementMaster };
-        err = AudioObjectAddPropertyListener(kAudioObjectSystemObject, &propAdr,
-                                             coreAudioDefaultDeviceChanged, &pStreamOut->cbCtx);
-        if (err == noErr)
+        OSStatus err;
+
+        /* When the devices isn't forced by the user, we want default device change notifications. */
+        if (!fDeviceByUser)
         {
-            pStreamOut->fDefDevChgListReg = true;
+            AudioObjectPropertyAddress propAdr = { kAudioHardwarePropertyDefaultOutputDevice, kAudioObjectPropertyScopeGlobal,
+                                                   kAudioObjectPropertyElementMaster };
+            err = AudioObjectAddPropertyListener(kAudioObjectSystemObject, &propAdr,
+                                                 coreAudioDefaultDeviceChanged, &pStreamOut->cbCtx);
+            if (err == noErr)
+            {
+                pStreamOut->fDefDevChgListReg = true;
+            }
+            else
+                LogRel(("CoreAudio: Failed to add the default playback device changed listener (%RI32)\n", err));
         }
-        else
-            LogRel(("CoreAudio: Failed to add the default playback device changed listener (%RI32)\n", err));
-    }
 
-    if (   !pStreamOut->fDevStateChgListReg
-        && (pStreamOut->deviceID != kAudioDeviceUnknown))
-    {
-        /* Register callback for being notified if the device stops being alive. */
-        AudioObjectPropertyAddress propAdr = { kAudioDevicePropertyDeviceIsAlive, kAudioObjectPropertyScopeGlobal,
-                                               kAudioObjectPropertyElementMaster };
-        err = AudioObjectAddPropertyListener(pStreamOut->deviceID, &propAdr, drvHostCoreAudioDeviceStateChanged,
-                                             (void *)&pStreamOut->cbCtx);
-        if (err == noErr)
+        if (   !pStreamOut->fDevStateChgListReg
+            && (pStreamOut->deviceID != kAudioDeviceUnknown))
         {
-            pStreamOut->fDevStateChgListReg = true;
+            /* Register callback for being notified if the device stops being alive. */
+            AudioObjectPropertyAddress propAdr = { kAudioDevicePropertyDeviceIsAlive, kAudioObjectPropertyScopeGlobal,
+                                                   kAudioObjectPropertyElementMaster };
+            err = AudioObjectAddPropertyListener(pStreamOut->deviceID, &propAdr, drvHostCoreAudioDeviceStateChanged,
+                                                 (void *)&pStreamOut->cbCtx);
+            if (err == noErr)
+            {
+                pStreamOut->fDevStateChgListReg = true;
+            }
+            else
+                LogRel(("CoreAudio: Failed to add the playback device state changed listener (%RI32)\n", err));
         }
-        else
-            LogRel(("CoreAudio: Failed to add the playback device state changed listener (%RI32)\n", err));
     }
 
     LogFlowFuncLeaveRC(rc);
     return rc;
 }
 
-static DECLCALLBACK(int) drvHostCoreAudioGetConfig(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDCFG pCfg)
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO, pfnGetConfig}
+ */
+int drvHostCoreAudioGetConfig(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDCFG pBackendCfg)
 {
-    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg,       VERR_INVALID_POINTER);
+    AssertPtrReturn(pInterface,  VERR_INVALID_POINTER);
+    AssertPtrReturn(pBackendCfg, VERR_INVALID_POINTER);
 
     PPDMDRVINS        pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
     PDRVHOSTCOREAUDIO pThis   = PDMINS_2_DATA(pDrvIns, PDRVHOSTCOREAUDIO);
 
-    return coreAudioUpdateStatusInternalEx(pThis, pCfg, 0 /* fEnum */);
+    return coreAudioUpdateStatusInternalEx(pThis, pBackendCfg, 0 /* fEnum */);
 }
 
-static DECLCALLBACK(PDMAUDIOBACKENDSTS) drvHostCoreAudioGetStatus(PPDMIHOSTAUDIO pInterface, PDMAUDIODIR enmDir)
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO, pfnStreamGetStatus}
+ */
+PDMAUDIOBACKENDSTS drvHostCoreAudioGetStatus(PPDMIHOSTAUDIO pInterface, PDMAUDIODIR enmDir)
 {
+    RT_NOREF(enmDir);
     AssertPtrReturn(pInterface, PDMAUDIOBACKENDSTS_UNKNOWN);
 
     return PDMAUDIOBACKENDSTS_RUNNING;
 }
 
-static DECLCALLBACK(int) drvHostCoreAudioStreamCreate(PPDMIHOSTAUDIO pInterface,
-                                                       PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfg, uint32_t *pcSamples)
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO, pfnStreamCreate}
+ */
+int drvHostCoreAudioStreamCreate(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
     AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg,       VERR_INVALID_POINTER);
+    AssertPtrReturn(pCfgReq,    VERR_INVALID_POINTER);
+    AssertPtrReturn(pCfgAcq,    VERR_INVALID_POINTER);
 
     PPDMDRVINS        pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
     PDRVHOSTCOREAUDIO pThis   = PDMINS_2_DATA(pDrvIns, PDRVHOSTCOREAUDIO);
 
     int rc;
-    if (pCfg->enmDir == PDMAUDIODIR_IN)
-        rc = coreAudioCreateStreamIn(pThis,  pStream, pCfg, pcSamples);
+    if (pCfgReq->enmDir == PDMAUDIODIR_IN)
+        rc = coreAudioCreateStreamIn(pThis,  pStream, pCfgReq, pCfgAcq);
     else
-        rc = coreAudioCreateStreamOut(pThis, pStream, pCfg, pcSamples);
+        rc = coreAudioCreateStreamOut(pThis, pStream, pCfgReq, pCfgAcq);
 
     LogFlowFunc(("%s: rc=%Rrc\n", pStream->szName, rc));
     return rc;
 }
 
-static DECLCALLBACK(int) drvHostCoreAudioStreamDestroy(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO, pfnStreamDestroy}
+ */
+int drvHostCoreAudioStreamDestroy(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
     AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
 
-    PPDMDRVINS        pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
-    PDRVHOSTCOREAUDIO pThis   = PDMINS_2_DATA(pDrvIns, PDRVHOSTCOREAUDIO);
-
     int rc;
     if (pStream->enmDir == PDMAUDIODIR_IN)
-        rc = coreAudioDestroyStreamIn(pThis,  pStream);
+        rc = coreAudioDestroyStreamIn(pStream);
     else
-        rc = coreAudioDestroyStreamOut(pThis, pStream);
+        rc = coreAudioDestroyStreamOut(pStream);
 
     return rc;
 }
 
-static DECLCALLBACK(int) drvHostCoreAudioStreamControl(PPDMIHOSTAUDIO pInterface,
-                                                       PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO, pfnStreamControl}
+ */
+int drvHostCoreAudioStreamControl(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
     AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
 
     Assert(pStream->enmCtx == PDMAUDIOSTREAMCTX_HOST);
 
-    PPDMDRVINS        pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
-    PDRVHOSTCOREAUDIO pThis   = PDMINS_2_DATA(pDrvIns, PDRVHOSTCOREAUDIO);
-
     int rc;
     if (pStream->enmDir == PDMAUDIODIR_IN)
-        rc = coreAudioControlStreamIn(pThis,  pStream, enmStreamCmd);
+        rc = coreAudioControlStreamIn(pStream, enmStreamCmd);
     else
-        rc = coreAudioControlStreamOut(pThis, pStream, enmStreamCmd);
+        rc = coreAudioControlStreamOut(pStream, enmStreamCmd);
 
     return rc;
 }
 
-static DECLCALLBACK(PDMAUDIOSTRMSTS) drvHostCoreAudioStreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO, pfnStreamGetStatus}
+ */
+PDMAUDIOSTRMSTS drvHostCoreAudioStreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
 {
-    NOREF(pInterface);
+    RT_NOREF(pInterface);
     AssertPtrReturn(pStream, VERR_INVALID_POINTER);
 
     Assert(pStream->enmCtx == PDMAUDIOSTREAMCTX_HOST);
@@ -2720,7 +2840,11 @@ static DECLCALLBACK(PDMAUDIOSTRMSTS) drvHostCoreAudioStreamGetStatus(PPDMIHOSTAU
     return strmSts;
 }
 
-static DECLCALLBACK(int) drvHostCoreAudioStreamIterate(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO, pfnStreamIterate}
+ */
+int drvHostCoreAudioStreamIterate(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
     AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
@@ -2729,15 +2853,23 @@ static DECLCALLBACK(int) drvHostCoreAudioStreamIterate(PPDMIHOSTAUDIO pInterface
     return VINF_SUCCESS;
 }
 
-static DECLCALLBACK(void) drvHostCoreAudioShutdown(PPDMIHOSTAUDIO pInterface)
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO, pfnShutdown}
+ */
+void drvHostCoreAudioShutdown(PPDMIHOSTAUDIO pInterface)
 {
-    NOREF(pInterface);
+    RT_NOREF(pInterface);
 }
 
+
+/**
+ * @interface_method_impl{PDMIBASE,pfnQueryInterface}
+ */
 static DECLCALLBACK(void *) drvHostCoreAudioQueryInterface(PPDMIBASE pInterface, const char *pszIID)
 {
-    PPDMDRVINS pDrvIns       = PDMIBASE_2_PDMDRV(pInterface);
-    PDRVHOSTCOREAUDIO  pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTCOREAUDIO);
+    PPDMDRVINS          pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
+    PDRVHOSTCOREAUDIO   pThis   = PDMINS_2_DATA(pDrvIns, PDRVHOSTCOREAUDIO);
 
     PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase);
     PDMIBASE_RETURN_INTERFACE(pszIID, PDMIHOSTAUDIO, &pThis->IHostAudio);
@@ -2745,12 +2877,14 @@ static DECLCALLBACK(void *) drvHostCoreAudioQueryInterface(PPDMIBASE pInterface,
     return NULL;
 }
 
- /* Construct a DirectSound Audio driver instance.
- *
- * @copydoc FNPDMDRVCONSTRUCT
+/**
+ * @callback_method_impl{FNPDMDRVCONSTRUCT,
+ *      Construct a DirectSound Audio driver instance.}
  */
 static DECLCALLBACK(int) drvHostCoreAudioConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
+    RT_NOREF(pCfg, fFlags);
+    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
     PDRVHOSTCOREAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTCOREAUDIO);
     LogRel(("Audio: Initializing Core Audio driver\n"));
 
diff --git a/src/VBox/Devices/Audio/DrvHostDSound.cpp b/src/VBox/Devices/Audio/DrvHostDSound.cpp
index 7e936e3..7a196eb 100644
--- a/src/VBox/Devices/Audio/DrvHostDSound.cpp
+++ b/src/VBox/Devices/Audio/DrvHostDSound.cpp
@@ -13,11 +13,15 @@
  * Foundation, in version 2 as it comes in the "COPYING" file of the
  * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- * --------------------------------------------------------------------
- *
  */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
 #define LOG_GROUP LOG_GROUP_DRV_HOST_AUDIO
 #include <VBox/log.h>
+#include <iprt/win/windows.h>
 #include <dsound.h>
 
 #include <iprt/alloc.h>
@@ -27,6 +31,10 @@
 #include "DrvAudio.h"
 #include "VBoxDD.h"
 
+
+/*********************************************************************************************************************************
+*   Defined Constants And Macros                                                                                                 *
+*********************************************************************************************************************************/
 /*
  * IDirectSound* interface uses HRESULT status codes and the driver callbacks use
  * the IPRT status codes. To minimize HRESULT->IPRT conversion most internal functions
@@ -44,26 +52,35 @@
  * Messages which always should go to the release log use LogRel.
  */
 /* General code behavior. */
-#define DSLOG(a) do { LogRel2(a); } while(0)
+#define DSLOG(a)    do { LogRel2(a); } while(0)
 /* Something which produce a lot of logging during playback/recording. */
-#define DSLOGF(a) do { LogRel3(a); } while(0)
+#define DSLOGF(a)   do { LogRel3(a); } while(0)
 /* Important messages like errors. Limited in the default release log to avoid log flood. */
-#define DSLOGREL(a)                 \
-    do {                            \
-        static int8_t scLogged = 0; \
-        if (scLogged < 8) {         \
-            ++scLogged;             \
-            LogRel(a);              \
-        }                           \
-        else {                      \
-            DSLOG(a);               \
-        }                           \
+#define DSLOGREL(a) \
+    do {  \
+        static int8_t s_cLogged = 0; \
+        if (s_cLogged < 8) { \
+            ++s_cLogged; \
+            LogRel(a); \
+        } else DSLOG(a); \
     } while (0)
 
+
+/** Maximum number of attempts to restore the sound buffer before giving up. */
+#define DRV_DSOUND_RESTORE_ATTEMPTS_MAX         3
+
+/** Makes DRVHOSTDSOUND out of PDMIHOSTAUDIO. */
+#define PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface) \
+    ( (PDRVHOSTDSOUND)((uintptr_t)pInterface - RT_OFFSETOF(DRVHOSTDSOUND, IHostAudio)) )
+
+
+/*********************************************************************************************************************************
+*   Structures and Typedefs                                                                                                      *
+*********************************************************************************************************************************/
 /* Dynamically load dsound.dll. */
-typedef HRESULT WINAPI FNDIRECTSOUNDENUMERATEW(LPDSENUMCALLBACKW pDSEnumCallback, LPVOID pContext);
+typedef HRESULT WINAPI FNDIRECTSOUNDENUMERATEW(LPDSENUMCALLBACKW pDSEnumCallback, PVOID pContext);
 typedef FNDIRECTSOUNDENUMERATEW *PFNDIRECTSOUNDENUMERATEW;
-typedef HRESULT WINAPI FNDIRECTSOUNDCAPTUREENUMERATEW(LPDSENUMCALLBACKW pDSEnumCallback, LPVOID pContext);
+typedef HRESULT WINAPI FNDIRECTSOUNDCAPTUREENUMERATEW(LPDSENUMCALLBACKW pDSEnumCallback, PVOID pContext);
 typedef FNDIRECTSOUNDCAPTUREENUMERATEW *PFNDIRECTSOUNDCAPTUREENUMERATEW;
 
 #ifdef VBOX_WITH_AUDIO_CALLBACKS
@@ -89,13 +106,14 @@ typedef struct DSOUNDHOSTCFG
 
 typedef struct DSOUNDSTREAMOUT
 {
-    /** Associated host output stream.
-     *  Note: Always must come first! */
+    /** Note: Always must come first! */
     PDMAUDIOSTREAM       Stream;
+    /** The PCM properties of this stream. */
+    PDMAUDIOPCMPROPS     Props;
     LPDIRECTSOUND8       pDS;     /** @todo Move this out of this structure! Not required per-stream (e.g. for multi-channel). */
     LPDIRECTSOUNDBUFFER8 pDSB;
-    DWORD                cbPlayWritePos;
-    DWORD                csPlaybackBufferSize;
+    DWORD                offPlayWritePos;
+    DWORD                cMaxSamplesInBuffer;
     bool                 fEnabled;
     bool                 fRestartPlayback;
     PDMAUDIOSTREAMCFG    streamCfg;
@@ -103,13 +121,14 @@ typedef struct DSOUNDSTREAMOUT
 
 typedef struct DSOUNDSTREAMIN
 {
-    /** Associated host input stream.
-     *  Note: Always must come first! */
+    /** Associated host input stream. */
     PDMAUDIOSTREAM              Stream;
+    /** The PCM properties of this stream. */
+    PDMAUDIOPCMPROPS            Props;
     LPDIRECTSOUNDCAPTURE8       pDSC;
     LPDIRECTSOUNDCAPTUREBUFFER8 pDSCB;
-    DWORD                       csCaptureReadPos;
-    DWORD                       csCaptureBufferSize;
+    DWORD                       idxSampleCaptureReadPos;
+    DWORD                       cMaxSamplesInBuffer;
     HRESULT                     hrLastCapture;
     PDMAUDIORECSOURCE           enmRecSource;
     bool                        fEnabled;
@@ -180,34 +199,25 @@ typedef struct DSOUNDDEV
     GUID        Guid;
 } DSOUNDDEV, *PDSOUNDDEV;
 
-/*********************************************************************************************************************************
-*   Defines                                                                                                                      *
-*********************************************************************************************************************************/
-
-/** Maximum number of attempts to restore the sound buffer before giving up. */
-#define DRV_DSOUND_RESTORE_ATTEMPTS_MAX         3
-
-/** Makes DRVHOSTDSOUND out of PDMIHOSTAUDIO. */
-#define PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface) \
-    ( (PDRVHOSTDSOUND)((uintptr_t)pInterface - RT_OFFSETOF(DRVHOSTDSOUND, IHostAudio)) )
 
 /*********************************************************************************************************************************
-*   Prototypes                                                                                                                   *
+*   Internal Functions                                                                                                           *
 *********************************************************************************************************************************/
-
-static HRESULT directSoundPlayRestore(PDRVHOSTDSOUND pThis, LPDIRECTSOUNDBUFFER8 pDSB);
-
-static void dsoundDeviceRemove(PDSOUNDDEV pDev);
-static int dsoundDevicesEnumerate(PDRVHOSTDSOUND pThis, PPDMAUDIOBACKENDCFG pCfg);
+static HRESULT  directSoundPlayRestore(PDRVHOSTDSOUND pThis, LPDIRECTSOUNDBUFFER8 pDSB);
+static void     dsoundDeviceRemove(PDSOUNDDEV pDev);
+static int      dsoundDevicesEnumerate(PDRVHOSTDSOUND pThis, PPDMAUDIOBACKENDCFG pCfg);
 #ifdef VBOX_WITH_AUDIO_CALLBACKS
-static int dsoundNotifyThread(PDRVHOSTDSOUND pThis, bool fShutdown);
+static int      dsoundNotifyThread(PDRVHOSTDSOUND pThis, bool fShutdown);
 #endif
 
+
+
 static DWORD dsoundRingDistance(DWORD offEnd, DWORD offBegin, DWORD cSize)
 {
     return offEnd >= offBegin ? offEnd - offBegin : cSize - offBegin + offEnd;
 }
 
+
 static int dsoundWaveFmtFromCfg(PPDMAUDIOSTREAMCFG pCfg, PWAVEFORMATEX pFmt)
 {
     AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
@@ -244,80 +254,66 @@ static int dsoundWaveFmtFromCfg(PPDMAUDIOSTREAMCFG pCfg, PWAVEFORMATEX pFmt)
             break;
 
         default:
-            AssertMsgFailed(("Wave format %ld not supported\n", pCfg->enmFormat));
+            AssertMsgFailed(("Wave format %d not supported\n", pCfg->enmFormat));
             return VERR_NOT_SUPPORTED;
     }
 
     return VINF_SUCCESS;
 }
 
+
 static int dsoundGetPosOut(PDRVHOSTDSOUND   pThis,
                            PDSOUNDSTREAMOUT pDSoundStream, DWORD *pdwBuffer, DWORD *pdwFree, DWORD *pdwPlayPos)
 {
-    AssertPtrReturn(pThis,         VERR_INVALID_POINTER);
+    AssertPtr(pThis);
     AssertPtrReturn(pDSoundStream, VERR_INVALID_POINTER);
-    /* pdwBuffer is optional. */
-    /* pdwFree is optional. */
-    /* pdwPlayPos is optional. */
+    AssertPtrNull(pdwBuffer);
+    AssertPtrNull(pdwFree);
+    AssertPtrNull(pdwPlayPos);
 
     LPDIRECTSOUNDBUFFER8 pDSB = pDSoundStream->pDSB;
     if (!pDSB)
         return VERR_INVALID_POINTER;
 
-    DWORD cbBuffer = AUDIOMIXBUF_S2B(&pDSoundStream->Stream.MixBuf, pDSoundStream->csPlaybackBufferSize);
-
     /* Get the current play position which is used for calculating the free space in the buffer. */
     DWORD cbPlayPos;
-
-    HRESULT hr;
+    HRESULT hr = E_FAIL;
     for (unsigned i = 0; i < DRV_DSOUND_RESTORE_ATTEMPTS_MAX; i++)
     {
         hr = IDirectSoundBuffer8_GetCurrentPosition(pDSB, &cbPlayPos, NULL);
-        if (   SUCCEEDED(hr)
-            || hr != DSERR_BUFFERLOST) /** @todo: MSDN doesn't state this error for GetCurrentPosition(). */
-        {
-            break;
-        }
-        else
+        if (SUCCEEDED(hr))
         {
-            LogFlowFunc(("Getting playing position failed due to lost buffer, restoring ...\n"));
-            directSoundPlayRestore(pThis, pDSB);
+            DWORD const cbBuffer = AUDIOMIXBUF_S2B(&pDSoundStream->Stream.MixBuf, pDSoundStream->cMaxSamplesInBuffer);
+            if (pdwBuffer)
+                *pdwBuffer  = cbBuffer;
+            if (pdwFree)
+                *pdwFree    = cbBuffer - dsoundRingDistance(pDSoundStream->offPlayWritePos, cbPlayPos, cbBuffer);
+            if (pdwPlayPos)
+                *pdwPlayPos = cbPlayPos;
+            return VINF_SUCCESS;
         }
+        if (hr != DSERR_BUFFERLOST) /** @todo MSDN doesn't state this error for GetCurrentPosition(). */
+            break;
+        LogFlowFunc(("Getting playing position failed due to lost buffer, restoring ...\n"));
+        directSoundPlayRestore(pThis, pDSB);
     }
 
-    int rc = VINF_SUCCESS;
-
-    if (FAILED(hr))
-    {
-        if (hr != DSERR_BUFFERLOST) /* Avoid log flooding if the error is still there. */
-            DSLOGREL(("DSound: Getting current playback position failed with %Rhrc\n", hr));
-        LogFlowFunc(("Failed with %Rhrc\n", hr));
-
-        rc = VERR_NOT_AVAILABLE;
-    }
-    else
-    {
-        if (pdwBuffer)
-            *pdwBuffer = cbBuffer;
-
-        if (pdwFree)
-            *pdwFree = cbBuffer - dsoundRingDistance(pDSoundStream->cbPlayWritePos, cbPlayPos, cbBuffer);
+    if (hr != DSERR_BUFFERLOST) /* Avoid log flooding if the error is still there. */
+        DSLOGREL(("DSound: Getting current playback position failed with %Rhrc\n", hr));
+    LogFlowFunc(("Failed with %Rhrc\n", hr));
 
-        if (pdwPlayPos)
-            *pdwPlayPos = cbPlayPos;
-    }
-
-    if (RT_FAILURE(rc))
-        LogFlowFuncLeaveRC(rc);
+    int rc = VERR_NOT_AVAILABLE;
+    LogFlowFuncLeaveRC(rc);
     return rc;
 }
 
-static char *dsoundGUIDToUtf8StrA(LPCGUID lpGUID)
+
+static char *dsoundGUIDToUtf8StrA(LPCGUID pGUID)
 {
-    if (lpGUID)
+    if (pGUID)
     {
         LPOLESTR lpOLEStr;
-        HRESULT hr = StringFromCLSID(*lpGUID, &lpOLEStr);
+        HRESULT hr = StringFromCLSID(*pGUID, &lpOLEStr);
         if (SUCCEEDED(hr))
         {
             char *pszGUID;
@@ -331,6 +327,7 @@ static char *dsoundGUIDToUtf8StrA(LPCGUID lpGUID)
     return RTStrDup("{Default device}");
 }
 
+
 /**
  * Clears the list of the host's playback + capturing devices.
  *
@@ -354,26 +351,31 @@ static void dsoundDevicesClear(PDRVHOSTDSOUND pThis)
     }
 }
 
+
 static HRESULT directSoundPlayRestore(PDRVHOSTDSOUND pThis, LPDIRECTSOUNDBUFFER8 pDSB)
 {
+    RT_NOREF(pThis);
     HRESULT hr = IDirectSoundBuffer8_Restore(pDSB);
     if (FAILED(hr))
         DSLOGREL(("DSound: Restoring playback buffer failed with %Rhrc\n", hr));
     return hr;
 }
 
+
 static HRESULT directSoundPlayUnlock(PDRVHOSTDSOUND pThis, LPDIRECTSOUNDBUFFER8 pDSB,
-                                     LPVOID pv1, LPVOID pv2,
+                                     PVOID pv1, PVOID pv2,
                                      DWORD cb1, DWORD cb2)
 {
+    RT_NOREF(pThis);
     HRESULT hr = IDirectSoundBuffer8_Unlock(pDSB, pv1, cb1, pv2, cb2);
     if (FAILED(hr))
         DSLOGREL(("DSound: Unlocking playback buffer failed with %Rhrc\n", hr));
     return hr;
 }
 
+
 static HRESULT directSoundCaptureUnlock(LPDIRECTSOUNDCAPTUREBUFFER8 pDSCB,
-                                        LPVOID pv1, LPVOID pv2,
+                                        PVOID pv1, PVOID pv2,
                                         DWORD cb1, DWORD cb2)
 {
     HRESULT hr = IDirectSoundCaptureBuffer8_Unlock(pDSCB, pv1, cb1, pv2, cb2);
@@ -382,63 +384,52 @@ static HRESULT directSoundCaptureUnlock(LPDIRECTSOUNDCAPTUREBUFFER8 pDSCB,
     return hr;
 }
 
+
 static HRESULT directSoundPlayLock(PDRVHOSTDSOUND pThis,
-                                   LPDIRECTSOUNDBUFFER8 pDSB, PDMPCMPROPS *pProps,
+                                   LPDIRECTSOUNDBUFFER8 pDSB, PPDMAUDIOPCMPROPS pProps,
                                    DWORD dwOffset, DWORD dwBytes,
-                                   LPVOID *ppv1, LPVOID *ppv2,
+                                   PVOID *ppv1, PVOID *ppv2,
                                    DWORD *pcb1, DWORD *pcb2,
                                    DWORD dwFlags)
 {
-    LPVOID pv1 = NULL;
-    LPVOID pv2 = NULL;
-    DWORD cb1 = 0;
-    DWORD cb2 = 0;
-
-    HRESULT hr;
+    HRESULT hr = E_FAIL;
+    AssertCompile(DRV_DSOUND_RESTORE_ATTEMPTS_MAX > 0);
     for (unsigned i = 0; i < DRV_DSOUND_RESTORE_ATTEMPTS_MAX; i++)
     {
-        hr = IDirectSoundBuffer8_Lock(pDSB, dwOffset, dwBytes, &pv1, &cb1, &pv2, &cb2, dwFlags);
-        if (   SUCCEEDED(hr)
-            || hr != DSERR_BUFFERLOST)
-            break;
-        else
+        *ppv1 = *ppv2 = NULL;
+        *pcb1 = *pcb2 = 0;
+        hr = IDirectSoundBuffer8_Lock(pDSB, dwOffset, dwBytes, ppv1, pcb1, ppv2, pcb2, dwFlags);
+        if (SUCCEEDED(hr))
         {
-            LogFlowFunc(("Locking failed due to lost buffer, restoring ...\n"));
-            directSoundPlayRestore(pThis, pDSB);
+            if (   (!*ppv1 || !(*pcb1 & pProps->uAlign))
+                && (!*ppv2 || !(*pcb2 & pProps->uAlign)) )
+                return S_OK;
+            DSLOGREL(("DSound: Locking playback buffer returned misaligned buffer: cb1=%#RX32, cb2=%#RX32 (alignment: %#RX32)\n",
+                      *pcb1, *pcb2, pProps->uAlign));
+            directSoundPlayUnlock(pThis, pDSB, *ppv1, *ppv2, *pcb1, *pcb2);
+            return E_FAIL;
         }
-    }
 
-    if (FAILED(hr))
-    {
-        DSLOGREL(("DSound: Locking playback buffer failed with %Rhrc\n", hr));
-        return hr;
-    }
+        if (hr != DSERR_BUFFERLOST)
+            break;
 
-    if (   (pv1 && (cb1 & pProps->uAlign))
-        || (pv2 && (cb2 & pProps->uAlign)))
-    {
-        DSLOGREL(("DSound: Locking playback buffer returned misaligned buffer: cb1=%RI32, cb2=%RI32 (alignment: %RU32)\n",
-                  cb1, cb2, pProps->uAlign));
-        directSoundPlayUnlock(pThis, pDSB, pv1, pv2, cb1, cb2);
-        return E_FAIL;
+        LogFlowFunc(("Locking failed due to lost buffer, restoring ...\n"));
+        directSoundPlayRestore(pThis, pDSB);
     }
 
-    *ppv1 = pv1;
-    *ppv2 = pv2;
-    *pcb1 = cb1;
-    *pcb2 = cb2;
-
-    return S_OK;
+    DSLOGREL(("DSound: Locking playback buffer failed with %Rhrc\n", hr));
+    return hr;
 }
 
-static HRESULT directSoundCaptureLock(LPDIRECTSOUNDCAPTUREBUFFER8 pDSCB, PPDMPCMPROPS pProps,
+
+static HRESULT directSoundCaptureLock(LPDIRECTSOUNDCAPTUREBUFFER8 pDSCB, PPDMAUDIOPCMPROPS pProps,
                                       DWORD dwOffset, DWORD dwBytes,
-                                      LPVOID *ppv1, LPVOID *ppv2,
+                                      PVOID *ppv1, PVOID *ppv2,
                                       DWORD *pcb1, DWORD *pcb2,
                                       DWORD dwFlags)
 {
-    LPVOID pv1 = NULL;
-    LPVOID pv2 = NULL;
+    PVOID pv1 = NULL;
+    PVOID pv2 = NULL;
     DWORD cb1 = 0;
     DWORD cb2 = 0;
 
@@ -481,6 +472,7 @@ static void directSoundPlayInterfaceRelease(PDSOUNDSTREAMOUT pDSoundStream)
     }
 }
 
+
 static HRESULT directSoundPlayInterfaceCreate(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMOUT pDSoundStream)
 {
     if (pDSoundStream->pDS != NULL)
@@ -520,6 +512,7 @@ static HRESULT directSoundPlayInterfaceCreate(PDRVHOSTDSOUND pThis, PDSOUNDSTREA
     return hr;
 }
 
+
 static HRESULT directSoundPlayClose(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMOUT pDSoundStream)
 {
     AssertPtrReturn(pThis, E_POINTER);
@@ -562,18 +555,19 @@ static HRESULT directSoundPlayClose(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMOUT pDSou
     return hr;
 }
 
+
 static HRESULT directSoundPlayOpen(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMOUT pDSoundStream)
 {
-    AssertPtrReturn(pThis, E_POINTER);
+    AssertPtrReturn(pThis,         E_POINTER);
     AssertPtrReturn(pDSoundStream, E_POINTER);
 
-    DSLOG(("DSound: pDSoundStream=%p, cbBufferOut=%ld, uHz=%RU32, cChannels=%RU8, cBits=%RU8, fSigned=%RTbool\n",
+    DSLOG(("DSound: pDSoundStream=%p, cbBufferOut=%RU32, uHz=%RU32, cChannels=%RU8, cBits=%RU8, fSigned=%RTbool\n",
            pDSoundStream,
            pThis->cfg.cbBufferOut,
-           pDSoundStream->Stream.Props.uHz,
-           pDSoundStream->Stream.Props.cChannels,
-           pDSoundStream->Stream.Props.cBits,
-           pDSoundStream->Stream.Props.fSigned));
+           pDSoundStream->Props.uHz,
+           pDSoundStream->Props.cChannels,
+           pDSoundStream->Props.cBits,
+           pDSoundStream->Props.fSigned));
 
     if (pDSoundStream->pDSB != NULL)
     {
@@ -625,7 +619,7 @@ static HRESULT directSoundPlayOpen(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMOUT pDSoun
         }
 
         /* "Upgrade" to IDirectSoundBuffer8 interface. */
-        hr = IDirectSoundBuffer_QueryInterface(pDSB, IID_IDirectSoundBuffer8, (LPVOID *)&pDSoundStream->pDSB);
+        hr = IDirectSoundBuffer_QueryInterface(pDSB, IID_IDirectSoundBuffer8, (PVOID *)&pDSoundStream->pDSB);
         IDirectSoundBuffer_Release(pDSB);
         if (FAILED(hr))
         {
@@ -673,9 +667,9 @@ static HRESULT directSoundPlayOpen(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMOUT pDSoun
                wfx.wBitsPerSample,
                wfx.cbSize));
 
-        if (bc.dwBufferBytes & pDSoundStream->Stream.Props.uAlign)
+        if (bc.dwBufferBytes & pDSoundStream->Props.uAlign)
             DSLOGREL(("DSound: Playback capabilities returned misaligned buffer: size %RU32, alignment %RU32\n",
-                      bc.dwBufferBytes, pDSoundStream->Stream.Props.uAlign + 1));
+                      bc.dwBufferBytes, pDSoundStream->Props.uAlign + 1));
 
         if (bc.dwBufferBytes != pThis->cfg.cbBufferOut)
             DSLOGREL(("DSound: Playback buffer size mismatched: DirectSound %RU32, requested %RU32 bytes\n",
@@ -686,8 +680,8 @@ static HRESULT directSoundPlayOpen(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMOUT pDSoun
          * dsoundPlayStart initializes part of it to make sure that Stop/Start continues with a correct
          * playback buffer position.
          */
-        pDSoundStream->csPlaybackBufferSize = bc.dwBufferBytes >> pDSoundStream->Stream.Props.cShift;
-        DSLOG(("DSound: csPlaybackBufferSize=%RU32\n", pDSoundStream->csPlaybackBufferSize));
+        pDSoundStream->cMaxSamplesInBuffer = bc.dwBufferBytes >> pDSoundStream->Props.cShift;
+        DSLOG(("DSound: cMaxSamplesInBuffer=%RU32\n", pDSoundStream->cMaxSamplesInBuffer));
 
 #ifdef VBOX_WITH_AUDIO_CALLBACKS
         /*
@@ -704,7 +698,7 @@ static HRESULT directSoundPlayOpen(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMOUT pDSoun
         }
 
         LPDIRECTSOUNDNOTIFY8 pNotify;
-        hr = IDirectSoundNotify_QueryInterface(pDSoundStream->pDSB, IID_IDirectSoundNotify8, (LPVOID *)&pNotify);
+        hr = IDirectSoundNotify_QueryInterface(pDSoundStream->pDSB, IID_IDirectSoundNotify8, (PVOID *)&pNotify);
         if (SUCCEEDED(hr))
         {
             DSBPOSITIONNOTIFY dsBufPosNotify;
@@ -745,16 +739,17 @@ static HRESULT directSoundPlayOpen(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMOUT pDSoun
     return hr;
 }
 
+
 static void dsoundPlayClearSamples(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMOUT pDSoundStream)
 {
     AssertPtrReturnVoid(pDSoundStream);
 
     PPDMAUDIOSTREAM pStream = &pDSoundStream->Stream;
 
-    LPVOID pv1, pv2;
+    PVOID pv1, pv2;
     DWORD cb1, cb2;
-    HRESULT hr = directSoundPlayLock(pThis, pDSoundStream->pDSB, &pDSoundStream->Stream.Props,
-                                     0 /* dwOffset */, AUDIOMIXBUF_S2B(&pStream->MixBuf, pDSoundStream->csPlaybackBufferSize),
+    HRESULT hr = directSoundPlayLock(pThis, pDSoundStream->pDSB, &pDSoundStream->Props,
+                                     0 /* dwOffset */, AUDIOMIXBUF_S2B(&pStream->MixBuf, pDSoundStream->cMaxSamplesInBuffer),
                                      &pv1, &pv2, &cb1, &cb2, DSBLOCK_ENTIREBUFFER);
     if (SUCCEEDED(hr))
     {
@@ -762,24 +757,24 @@ static void dsoundPlayClearSamples(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMOUT pDSoun
         DWORD len2 = AUDIOMIXBUF_B2S(&pStream->MixBuf, cb2);
 
         if (pv1 && len1)
-            DrvAudioHlpClearBuf(&pDSoundStream->Stream.Props, pv1, cb1, len1);
+            DrvAudioHlpClearBuf(&pDSoundStream->Props, pv1, cb1, len1);
 
         if (pv2 && len2)
-            DrvAudioHlpClearBuf(&pDSoundStream->Stream.Props, pv2, cb2, len2);
+            DrvAudioHlpClearBuf(&pDSoundStream->Props, pv2, cb2, len2);
 
         directSoundPlayUnlock(pThis, pDSoundStream->pDSB, pv1, pv2, cb1, cb2);
     }
 }
 
+
 static HRESULT directSoundPlayGetStatus(PDRVHOSTDSOUND pThis, LPDIRECTSOUNDBUFFER8 pDSB, DWORD *pdwStatus)
 {
-    AssertPtrReturn(pThis, E_POINTER);
+    AssertPtr(pThis);
     AssertPtrReturn(pDSB,  E_POINTER);
-    /* pdwStatus is optional. */
+    AssertPtrNull(pdwStatus);
 
     DWORD dwStatus = 0;
-
-    HRESULT hr;
+    HRESULT hr = E_FAIL;
     for (unsigned i = 0; i < DRV_DSOUND_RESTORE_ATTEMPTS_MAX; i++)
     {
         hr = IDirectSoundBuffer8_GetStatus(pDSB, &dwStatus);
@@ -805,6 +800,7 @@ static HRESULT directSoundPlayGetStatus(PDRVHOSTDSOUND pThis, LPDIRECTSOUNDBUFFE
     return hr;
 }
 
+
 static HRESULT directSoundPlayStop(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMOUT pDSoundStream)
 {
     AssertPtrReturn(pThis,         E_POINTER);
@@ -843,6 +839,7 @@ static HRESULT directSoundPlayStop(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMOUT pDSoun
     return hr;
 }
 
+
 static HRESULT directSoundPlayStart(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMOUT pDSoundStream)
 {
     AssertPtrReturn(pThis,         E_POINTER);
@@ -960,6 +957,7 @@ static LPCGUID dsoundCaptureSelectDevice(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMIN p
     return pGUID;
 }
 
+
 static void directSoundCaptureInterfaceRelease(PDSOUNDSTREAMIN pDSoundStream)
 {
     if (pDSoundStream->pDSC)
@@ -970,6 +968,7 @@ static void directSoundCaptureInterfaceRelease(PDSOUNDSTREAMIN pDSoundStream)
     }
 }
 
+
 static HRESULT directSoundCaptureInterfaceCreate(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMIN pDSoundStream)
 {
     if (pDSoundStream->pDSC != NULL)
@@ -1003,6 +1002,7 @@ static HRESULT directSoundCaptureInterfaceCreate(PDRVHOSTDSOUND pThis, PDSOUNDST
     return hr;
 }
 
+
 static HRESULT directSoundCaptureClose(PDSOUNDSTREAMIN pDSoundStream)
 {
     AssertPtrReturn(pDSoundStream, E_POINTER);
@@ -1030,18 +1030,19 @@ static HRESULT directSoundCaptureClose(PDSOUNDSTREAMIN pDSoundStream)
     return hr;
 }
 
+
 static HRESULT directSoundCaptureOpen(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMIN pDSoundStream)
 {
     AssertPtrReturn(pThis, E_POINTER);
     AssertPtrReturn(pDSoundStream, E_POINTER);
 
-    DSLOG(("DSound: pDSoundStream=%p, cbBufferIn=%ld, uHz=%RU32, cChannels=%RU8, cBits=%RU8, fSigned=%RTbool\n",
+    DSLOG(("DSound: pDSoundStream=%p, cbBufferIn=%RU32, uHz=%RU32, cChannels=%RU8, cBits=%RU8, fSigned=%RTbool\n",
            pDSoundStream,
            pThis->cfg.cbBufferIn,
-           pDSoundStream->Stream.Props.uHz,
-           pDSoundStream->Stream.Props.cChannels,
-           pDSoundStream->Stream.Props.cBits,
-           pDSoundStream->Stream.Props.fSigned));
+           pDSoundStream->Props.uHz,
+           pDSoundStream->Props.cChannels,
+           pDSoundStream->Props.cBits,
+           pDSoundStream->Props.fSigned));
 
     if (pDSoundStream->pDSCB != NULL)
     {
@@ -1091,11 +1092,11 @@ static HRESULT directSoundCaptureOpen(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMIN pDSo
         /*
          * Query the actual parameters.
          */
-        DWORD cbReadPos = 0;
-        hr = IDirectSoundCaptureBuffer8_GetCurrentPosition(pDSoundStream->pDSCB, NULL, &cbReadPos);
+        DWORD offByteReadPos = 0;
+        hr = IDirectSoundCaptureBuffer8_GetCurrentPosition(pDSoundStream->pDSCB, NULL, &offByteReadPos);
         if (FAILED(hr))
         {
-            cbReadPos = 0;
+            offByteReadPos = 0;
             DSLOGREL(("DSound: Getting capture position failed with %Rhrc\n", hr));
         }
 
@@ -1137,21 +1138,21 @@ static HRESULT directSoundCaptureOpen(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMIN pDSo
                wfx.wBitsPerSample,
                wfx.cbSize));
 
-        if (bc.dwBufferBytes & pDSoundStream->Stream.Props.uAlign)
+        if (bc.dwBufferBytes & pDSoundStream->Props.uAlign)
             DSLOGREL(("DSound: Capture GetCaps returned misaligned buffer: size %RU32, alignment %RU32\n",
-                      bc.dwBufferBytes, pDSoundStream->Stream.Props.uAlign + 1));
+                      bc.dwBufferBytes, pDSoundStream->Props.uAlign + 1));
 
         if (bc.dwBufferBytes != pThis->cfg.cbBufferIn)
             DSLOGREL(("DSound: Capture buffer size mismatched: DirectSound %RU32, requested %RU32 bytes\n",
                       bc.dwBufferBytes, pThis->cfg.cbBufferIn));
 
         /* Initial state: reading at the initial capture position, no error. */
-        pDSoundStream->csCaptureReadPos    = cbReadPos >> pDSoundStream->Stream.Props.cShift;
-        pDSoundStream->csCaptureBufferSize = bc.dwBufferBytes >> pDSoundStream->Stream.Props.cShift;
-        pDSoundStream->hrLastCapture       = S_OK;
+        pDSoundStream->idxSampleCaptureReadPos = offByteReadPos >> pDSoundStream->Props.cShift;
+        pDSoundStream->cMaxSamplesInBuffer     = bc.dwBufferBytes >> pDSoundStream->Props.cShift;
+        pDSoundStream->hrLastCapture           = S_OK;
 
-        DSLOG(("DSound: csCaptureReadPos=%RU32, csCaptureBufferSize=%RU32\n",
-                     pDSoundStream->csCaptureReadPos, pDSoundStream->csCaptureBufferSize));
+        DSLOG(("DSound: idxSampleCaptureReadPos=%RU32, cMaxSamplesInBuffer=%RU32\n",
+                     pDSoundStream->idxSampleCaptureReadPos, pDSoundStream->cMaxSamplesInBuffer));
 
     } while (0);
 
@@ -1162,6 +1163,7 @@ static HRESULT directSoundCaptureOpen(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMIN pDSo
     return hr;
 }
 
+
 static HRESULT directSoundCaptureStop(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMIN pDSoundStream)
 {
     AssertPtrReturn(pThis        , E_POINTER);
@@ -1189,6 +1191,7 @@ static HRESULT directSoundCaptureStop(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMIN pDSo
     return hr;
 }
 
+
 static HRESULT directSoundCaptureStart(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMIN pDSoundStream)
 {
     AssertPtrReturn(pThis,         VERR_INVALID_POINTER);
@@ -1232,20 +1235,20 @@ static HRESULT directSoundCaptureStart(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMIN pDS
     return hr;
 }
 
-static int dsoundDevAdd(PRTLISTANCHOR pList, LPGUID lpGUID,
-                        LPCWSTR lpwstrDescription, PDSOUNDDEV *ppDev)
+
+static int dsoundDevAdd(PRTLISTANCHOR pList, LPGUID pGUID, LPCWSTR pwszDescription, PDSOUNDDEV *ppDev)
 {
     AssertPtrReturn(pList, VERR_INVALID_POINTER);
-    AssertPtrReturn(lpGUID, VERR_INVALID_POINTER);
-    AssertPtrReturn(lpwstrDescription, VERR_INVALID_POINTER);
+    AssertPtrReturn(pGUID, VERR_INVALID_POINTER);
+    AssertPtrReturn(pwszDescription, VERR_INVALID_POINTER);
 
     PDSOUNDDEV pDev = (PDSOUNDDEV)RTMemAlloc(sizeof(DSOUNDDEV));
     if (!pDev)
         return VERR_NO_MEMORY;
 
-    int rc = RTUtf16ToUtf8(lpwstrDescription, &pDev->pszName);
+    int rc = RTUtf16ToUtf8(pwszDescription, &pDev->pszName);
     if (RT_SUCCESS(rc))
-        memcpy(&pDev->Guid, lpGUID, sizeof(GUID));
+        memcpy(&pDev->Guid, pGUID, sizeof(GUID));
 
     if (RT_SUCCESS(rc))
         RTListAppend(pList, &pDev->Node);
@@ -1256,6 +1259,7 @@ static int dsoundDevAdd(PRTLISTANCHOR pList, LPGUID lpGUID,
     return rc;
 }
 
+
 static void dsoundDeviceRemove(PDSOUNDDEV pDev)
 {
     if (pDev)
@@ -1269,33 +1273,33 @@ static void dsoundDeviceRemove(PDSOUNDDEV pDev)
     }
 }
 
-static void dsoundLogDevice(const char *pszType, LPGUID lpGUID, LPCWSTR lpwstrDescription, LPCWSTR lpwstrModule)
+
+static void dsoundLogDevice(const char *pszType, LPGUID pGUID, LPCWSTR pwszDescription, LPCWSTR pwszModule)
 {
-    char *pszGUID = dsoundGUIDToUtf8StrA(lpGUID);
+    char *pszGUID = dsoundGUIDToUtf8StrA(pGUID);
     /* This always has to be in the release log. */
-    LogRel(("DSound: %s: GUID: %s [%ls] (Module: %ls)\n",
-            pszType, pszGUID? pszGUID: "{?}", lpwstrDescription, lpwstrModule));
+    LogRel(("DSound: %s: GUID: %s [%ls] (Module: %ls)\n", pszType, pszGUID ? pszGUID : "{?}", pwszDescription, pwszModule));
     RTStrFree(pszGUID);
 }
 
-static BOOL CALLBACK dsoundDevicesEnumCbPlayback(LPGUID lpGUID, LPCWSTR lpwstrDescription,
-                                                 LPCWSTR lpwstrModule, LPVOID lpContext)
+
+static BOOL CALLBACK dsoundDevicesEnumCbPlayback(LPGUID pGUID, LPCWSTR pwszDescription, LPCWSTR pwszModule, PVOID lpContext)
 {
     PDSOUNDENUMCBCTX pCtx = (PDSOUNDENUMCBCTX)lpContext;
     AssertPtrReturn(pCtx, FALSE);
     AssertPtrReturn(pCtx->pDrv, FALSE);
 
-    if (!lpGUID)
+    if (!pGUID)
         return TRUE;
 
-    AssertPtrReturn(lpwstrDescription, FALSE);
-    /* Do not care about lpwstrModule. */
+    AssertPtrReturn(pwszDescription, FALSE);
+    /* Do not care about pwszModule. */
 
     if (pCtx->fFlags & DSOUNDENUMCBFLAGS_LOG)
-        dsoundLogDevice("Output", lpGUID, lpwstrDescription, lpwstrModule);
+        dsoundLogDevice("Output", pGUID, pwszDescription, pwszModule);
 
     int rc = dsoundDevAdd(&pCtx->pDrv->lstDevOutput,
-                          lpGUID, lpwstrDescription, NULL /* ppDev */);
+                          pGUID, pwszDescription, NULL /* ppDev */);
     if (RT_FAILURE(rc))
         return FALSE; /* Abort enumeration. */
 
@@ -1304,21 +1308,21 @@ static BOOL CALLBACK dsoundDevicesEnumCbPlayback(LPGUID lpGUID, LPCWSTR lpwstrDe
     return TRUE;
 }
 
-static BOOL CALLBACK dsoundDevicesEnumCbCapture(LPGUID lpGUID, LPCWSTR lpwstrDescription,
-                                                LPCWSTR lpwstrModule, LPVOID lpContext)
+
+static BOOL CALLBACK dsoundDevicesEnumCbCapture(LPGUID pGUID, LPCWSTR pwszDescription, LPCWSTR pwszModule, PVOID lpContext)
 {
     PDSOUNDENUMCBCTX pCtx = (PDSOUNDENUMCBCTX)lpContext;
     AssertPtrReturn(pCtx, FALSE);
     AssertPtrReturn(pCtx->pDrv, FALSE);
 
-    if (!lpGUID)
+    if (!pGUID)
         return TRUE;
 
     if (pCtx->fFlags & DSOUNDENUMCBFLAGS_LOG)
-        dsoundLogDevice("Input", lpGUID, lpwstrDescription, lpwstrModule);
+        dsoundLogDevice("Input", pGUID, pwszDescription, pwszModule);
 
     int rc = dsoundDevAdd(&pCtx->pDrv->lstDevInput,
-                          lpGUID, lpwstrDescription, NULL /* ppDev */);
+                          pGUID, pwszDescription, NULL /* ppDev */);
     if (RT_FAILURE(rc))
         return FALSE; /* Abort enumeration. */
 
@@ -1327,6 +1331,7 @@ static BOOL CALLBACK dsoundDevicesEnumCbCapture(LPGUID lpGUID, LPCWSTR lpwstrDes
     return TRUE;
 }
 
+
 /**
  * Does a (Re-)enumeration of the host's playback + capturing devices.
  *
@@ -1381,6 +1386,7 @@ static int dsoundDevicesEnumerate(PDRVHOSTDSOUND pThis, PDSOUNDENUMCBCTX pEnmCtx
     return rc;
 }
 
+
 /**
  * Updates this host driver's internal status, according to the global, overall input/output
  * state and all connected (native) audio streams.
@@ -1389,7 +1395,7 @@ static int dsoundDevicesEnumerate(PDRVHOSTDSOUND pThis, PDSOUNDENUMCBCTX pEnmCtx
  * @param   pCfg                Where to store the backend configuration. Optional.
  * @param   fEnum               Enumeration flags.
  */
-void dsoundUpdateStatusInternalEx(PDRVHOSTDSOUND pThis, PPDMAUDIOBACKENDCFG pCfg, uint32_t fEnum)
+static void dsoundUpdateStatusInternalEx(PDRVHOSTDSOUND pThis, PPDMAUDIOBACKENDCFG pCfg, uint32_t fEnum)
 {
     AssertPtrReturnVoid(pThis);
     /* pCfg is optional. */
@@ -1429,60 +1435,47 @@ void dsoundUpdateStatusInternalEx(PDRVHOSTDSOUND pThis, PPDMAUDIOBACKENDCFG pCfg
     LogFlowFuncLeaveRC(rc);
 }
 
-void dsoundUpdateStatusInternal(PDRVHOSTDSOUND pThis)
+
+static void dsoundUpdateStatusInternal(PDRVHOSTDSOUND pThis)
 {
     dsoundUpdateStatusInternalEx(pThis, NULL /* pCfg */, 0 /* fEnum */);
 }
 
-static int dsoundCreateStreamOut(PPDMIHOSTAUDIO pInterface,
-                                 PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfg, uint32_t *pcSamples)
-{
-    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
-    AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg,       VERR_INVALID_POINTER);
-    /* pcSamples is optional. */
-
-    LogFlowFunc(("pStream=%p, pCfg=%p\n", pStream, pCfg));
 
-    PDRVHOSTDSOUND   pThis         = PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface);
+static int dsoundCreateStreamOut(PDRVHOSTDSOUND pThis, PPDMAUDIOSTREAM pStream,
+                                 PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
+{
+    LogFlowFunc(("pStream=%p, pCfg=%p\n", pStream, pCfgReq));
     PDSOUNDSTREAMOUT pDSoundStream = (PDSOUNDSTREAMOUT)pStream;
 
-    pDSoundStream->streamCfg = *pCfg;
+    pDSoundStream->streamCfg = *pCfgReq;
     pDSoundStream->streamCfg.enmEndianness = PDMAUDIOHOSTENDIANNESS;
 
-    int rc = DrvAudioHlpStreamCfgToProps(&pDSoundStream->streamCfg, &pDSoundStream->Stream.Props);
+    int rc = DrvAudioHlpStreamCfgToProps(&pDSoundStream->streamCfg, &pDSoundStream->Props);
     if (RT_SUCCESS(rc))
     {
         pDSoundStream->pDS = NULL;
         pDSoundStream->pDSB = NULL;
-        pDSoundStream->cbPlayWritePos = 0;
+        pDSoundStream->offPlayWritePos = 0;
         pDSoundStream->fRestartPlayback = true;
-        pDSoundStream->csPlaybackBufferSize = 0;
+        pDSoundStream->cMaxSamplesInBuffer = 0;
 
-        if (pcSamples)
-            *pcSamples = pThis->cfg.cbBufferOut >> pStream->Props.cShift;
+        if (pCfgAcq)
+            pCfgAcq->cSampleBufferSize = pThis->cfg.cbBufferOut >> pDSoundStream->Props.cShift;
 
         /* Try to open playback in case the device is already there. */
         directSoundPlayOpen(pThis, pDSoundStream);
     }
     else
-    {
         RT_ZERO(pDSoundStream->streamCfg);
-    }
 
     LogFlowFuncLeaveRC(rc);
     return rc;
 }
 
-static int dsoundControlStreamOut(PPDMIHOSTAUDIO pInterface,
-                                  PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)
+static int dsoundControlStreamOut(PDRVHOSTDSOUND pThis, PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)
 {
-    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
-    AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
-
     LogFlowFunc(("pStream=%p, cmd=%d\n", pStream, enmStreamCmd));
-
-    PDRVHOSTDSOUND   pThis          = PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface);
     PDSOUNDSTREAMOUT pDSoundStream = (PDSOUNDSTREAMOUT)pStream;
 
     int rc = VINF_SUCCESS;
@@ -1532,14 +1525,19 @@ static int dsoundControlStreamOut(PPDMIHOSTAUDIO pInterface,
     return rc;
 }
 
-static DECLCALLBACK(int) drvHostDSoundStreamPlay(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream,
-                                                 uint32_t *pcSamplesPlayed)
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamPlay}
+ */
+int drvHostDSoundStreamPlay(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream, const void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten)
 {
+    RT_NOREF2(pvBuf, cbBuf);
+
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
     AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
-    /* pcSamplesPlayed is optional. */
+    /* pcbRead is optional. */
 
-    PDRVHOSTDSOUND pThis = PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface);
+    PDRVHOSTDSOUND   pThis         = PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface);
     PDSOUNDSTREAMOUT pDSoundStream = (PDSOUNDSTREAMOUT)pStream;
 
     int rc = VINF_SUCCESS;
@@ -1557,7 +1555,7 @@ static DECLCALLBACK(int) drvHostDSoundStreamPlay(PPDMIHOSTAUDIO pInterface, PPDM
             break;
 
         /*
-         * Check for full buffer, do not allow the cbPlayWritePos to catch cbPlayPos during playback,
+         * Check for full buffer, do not allow the offPlayWritePos to catch cbPlayPos during playback,
          * i.e. always leave a free space for 1 audio sample.
          */
         const DWORD cbSample = AUDIOMIXBUF_S2B(&pStream->MixBuf, 1);
@@ -1570,21 +1568,20 @@ static DECLCALLBACK(int) drvHostDSoundStreamPlay(PPDMIHOSTAUDIO pInterface, PPDM
 
         /* Do not write more than available space in the DirectSound playback buffer. */
         cbLive = RT_MIN(cbFree, cbLive);
-
-        cbLive &= ~pStream->Props.uAlign;
+        cbLive &= ~pDSoundStream->Props.uAlign;
         if (cbLive == 0 || cbLive > cbBuffer)
         {
-            DSLOG(("DSound: cbLive=%RU32, cbBuffer=%ld, cbPlayWritePos=%ld, cbPlayPos=%ld\n",
-                   cbLive, cbBuffer, pDSoundStream->cbPlayWritePos, cbPlayPos));
+            DSLOG(("DSound: cbLive=%RU32, cbBuffer=%ld, offPlayWritePos=%ld, cbPlayPos=%ld\n",
+                   cbLive, cbBuffer, pDSoundStream->offPlayWritePos, cbPlayPos));
             break;
         }
 
         LPDIRECTSOUNDBUFFER8 pDSB = pDSoundStream->pDSB;
         AssertPtr(pDSB);
 
-        LPVOID pv1, pv2;
+        PVOID pv1, pv2;
         DWORD cb1, cb2;
-        HRESULT hr = directSoundPlayLock(pThis, pDSB, &pStream->Props, pDSoundStream->cbPlayWritePos, cbLive,
+        HRESULT hr = directSoundPlayLock(pThis, pDSB, &pDSoundStream->Props, pDSoundStream->offPlayWritePos, cbLive,
                                          &pv1, &pv2, &cb1, &cb2, 0 /* dwFlags */);
         if (FAILED(hr))
         {
@@ -1592,9 +1589,10 @@ static DECLCALLBACK(int) drvHostDSoundStreamPlay(PPDMIHOSTAUDIO pInterface, PPDM
             break;
         }
 
-        DWORD len1 = AUDIOMIXBUF_B2S(&pStream->MixBuf, cb1);
-        DWORD len2 = AUDIOMIXBUF_B2S(&pStream->MixBuf, cb2);
+        /** @todo r=bird: Can pv1/cb1 really be NULL? Docs says they're always set
+         *        and pv2/cb2 only used when there is a buffer wrap araound. */
 
+        DWORD cSamplesIn1 = AUDIOMIXBUF_B2S(&pStream->MixBuf, cb1);
         uint32_t cRead = 0;
 
         if (pv1 && cb1)
@@ -1605,7 +1603,7 @@ static DECLCALLBACK(int) drvHostDSoundStreamPlay(PPDMIHOSTAUDIO pInterface, PPDM
         }
 
         if (   RT_SUCCESS(rc)
-            && cReadTotal == len1
+            && cReadTotal == cSamplesIn1
             && pv2 && cb2)
         {
             rc = AudioMixBufReadCirc(&pStream->MixBuf, pv2, cb2, &cRead);
@@ -1615,13 +1613,13 @@ static DECLCALLBACK(int) drvHostDSoundStreamPlay(PPDMIHOSTAUDIO pInterface, PPDM
 
         directSoundPlayUnlock(pThis, pDSB, pv1, pv2, cb1, cb2);
 
-        pDSoundStream->cbPlayWritePos =
-            (pDSoundStream->cbPlayWritePos + AUDIOMIXBUF_S2B(&pStream->MixBuf, cReadTotal)) % cbBuffer;
+        pDSoundStream->offPlayWritePos = (pDSoundStream->offPlayWritePos + AUDIOMIXBUF_S2B(&pStream->MixBuf, cReadTotal))
+                                       % cbBuffer;
 
         DSLOGF(("DSound: %RU32 (%RU32 samples) out of %RU32%s, buffer write pos %ld, rc=%Rrc\n",
                 AUDIOMIXBUF_S2B(&pStream->MixBuf, cReadTotal), cReadTotal, cbLive,
                 cbLive != AUDIOMIXBUF_S2B(&pStream->MixBuf, cReadTotal) ? " !!!": "",
-                pDSoundStream->cbPlayWritePos, rc));
+                pDSoundStream->offPlayWritePos, rc));
 
         if (cReadTotal)
         {
@@ -1669,66 +1667,56 @@ static DECLCALLBACK(int) drvHostDSoundStreamPlay(PPDMIHOSTAUDIO pInterface, PPDM
     } while (0);
 
     if (RT_FAILURE(rc))
-    {
         dsoundUpdateStatusInternal(pThis);
-    }
-    else
-    {
-        if (pcSamplesPlayed)
-            *pcSamplesPlayed = cReadTotal;
-    }
+    else if (pcbWritten)
+        *pcbWritten = cReadTotal;
 
     LogFlowFuncLeaveRC(rc);
     return rc;
 }
 
-static int dsoundDestroyStreamOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
+
+static int dsoundDestroyStreamOut(PDRVHOSTDSOUND pThis, PPDMAUDIOSTREAM pStream)
 {
-    PDRVHOSTDSOUND   pThis         = PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface);
     PDSOUNDSTREAMOUT pDSoundStream = (PDSOUNDSTREAMOUT)pStream;
 
     directSoundPlayClose(pThis, pDSoundStream);
 
-    pDSoundStream->cbPlayWritePos       = 0;
+    pDSoundStream->offPlayWritePos      = 0;
     pDSoundStream->fRestartPlayback     = true;
-    pDSoundStream->csPlaybackBufferSize = 0;
+    pDSoundStream->cMaxSamplesInBuffer  = 0;
 
     RT_ZERO(pDSoundStream->streamCfg);
 
     return VINF_SUCCESS;
 }
 
-static int dsoundCreateStreamIn(PPDMIHOSTAUDIO pInterface,
-                                PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfg, uint32_t *pcSamples)
+static int dsoundCreateStreamIn(PDRVHOSTDSOUND pThis, PPDMAUDIOSTREAM pStream,
+                                PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
 {
-    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
-    AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg,       VERR_INVALID_POINTER);
-
-    PDRVHOSTDSOUND  pThis         = PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface);
     PDSOUNDSTREAMIN pDSoundStream = (PDSOUNDSTREAMIN)pStream;
 
-    LogFlowFunc(("pStream=%p, pCfg=%p, enmRecSource=%ld\n", pStream, pCfg, pCfg->DestSource.Source));
+    LogFlowFunc(("pStream=%p, pCfg=%p, enmRecSource=%ld\n", pStream, pCfgReq, pCfgReq->DestSource.Source));
 
-    memcpy(&pDSoundStream->streamCfg, pCfg, sizeof(PDMAUDIOSTREAMCFG));
+    memcpy(&pDSoundStream->streamCfg, pCfgReq, sizeof(PDMAUDIOSTREAMCFG));
 
     /** @todo caller should already init Props? */
-    int rc = DrvAudioHlpStreamCfgToProps(&pDSoundStream->streamCfg, &pStream->Props);
+    int rc = DrvAudioHlpStreamCfgToProps(&pDSoundStream->streamCfg, &pDSoundStream->Props);
     if (RT_SUCCESS(rc))
     {
         /* Init the stream structure and save relevant information to it. */
-        pDSoundStream->csCaptureReadPos    = 0;
-        pDSoundStream->csCaptureBufferSize = 0;
+        pDSoundStream->idxSampleCaptureReadPos    = 0;
+        pDSoundStream->cMaxSamplesInBuffer = 0;
         pDSoundStream->pDSC                = NULL;
         pDSoundStream->pDSCB               = NULL;
-        pDSoundStream->enmRecSource        = pCfg->DestSource.Source;
+        pDSoundStream->enmRecSource        = pCfgReq->DestSource.Source;
         pDSoundStream->hrLastCapture       = S_OK;
 
-        if (pcSamples)
-            *pcSamples = pThis->cfg.cbBufferIn >> pStream->Props.cShift;
+        if (pCfgAcq)
+            pCfgAcq->cSampleBufferSize = pThis->cfg.cbBufferIn >> pDSoundStream->Props.cShift;
 
         /* Try to open capture in case the device is already there. */
-        directSoundCaptureOpen(pThis, pDSoundStream);
+        directSoundCaptureOpen(pThis, pDSoundStream); /** @todo r=andy Why not checking the result here?? */
     }
     else
     {
@@ -1739,15 +1727,9 @@ static int dsoundCreateStreamIn(PPDMIHOSTAUDIO pInterface,
     return rc;
 }
 
-static int dsoundControlStreamIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream,
-                                 PDMAUDIOSTREAMCMD enmStreamCmd)
+static int dsoundControlStreamIn(PDRVHOSTDSOUND pThis, PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)
 {
-    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
-    AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
-
     LogFlowFunc(("pStream=%p, enmStreamCmd=%ld\n", pStream, enmStreamCmd));
-
-    PDRVHOSTDSOUND  pThis         = PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface);
     PDSOUNDSTREAMIN pDSoundStream = (PDSOUNDSTREAMIN)pStream;
 
     int rc = VINF_SUCCESS;
@@ -1796,9 +1778,14 @@ static int dsoundControlStreamIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStr
     return rc;
 }
 
-static DECLCALLBACK(int) drvHostDSoundStreamCapture(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream,
-                                                    uint32_t *pcSamplesCaptured)
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamCapture}
+ */
+int drvHostDSoundStreamCapture(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead)
 {
+    RT_NOREF2(pvBuf, cbBuf);
+
     PDRVHOSTDSOUND pThis = PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface);
 
     PDSOUNDSTREAMIN             pDSoundStream = (PDSOUNDSTREAMIN)pStream;
@@ -1806,7 +1793,7 @@ static DECLCALLBACK(int) drvHostDSoundStreamCapture(PPDMIHOSTAUDIO pInterface, P
 
     int rc = VINF_SUCCESS;
 
-    uint32_t cCaptured = 0;
+    uint32_t cSamplesProcessed = 0;
 
     do
     {
@@ -1817,8 +1804,8 @@ static DECLCALLBACK(int) drvHostDSoundStreamCapture(PPDMIHOSTAUDIO pInterface, P
         }
 
         /* Get DirectSound capture position in bytes. */
-        DWORD cbReadPos;
-        HRESULT hr = IDirectSoundCaptureBuffer_GetCurrentPosition(pDSCB, NULL, &cbReadPos);
+        DWORD offByteReadPos;
+        HRESULT hr = IDirectSoundCaptureBuffer_GetCurrentPosition(pDSCB, NULL, &offByteReadPos);
         if (FAILED(hr))
         {
             if (hr != pDSoundStream->hrLastCapture)
@@ -1833,37 +1820,38 @@ static DECLCALLBACK(int) drvHostDSoundStreamCapture(PPDMIHOSTAUDIO pInterface, P
 
         pDSoundStream->hrLastCapture = hr;
 
-        if (cbReadPos & pStream->Props.uAlign)
-            DSLOGF(("DSound: Misaligned capture read position %ld (alignment: %RU32)\n", cbReadPos, pStream->Props.uAlign));
+        if (offByteReadPos & pDSoundStream->Props.uAlign)
+            DSLOGF(("DSound: Misaligned capture read position %ld (alignment: %RU32)\n", offByteReadPos, pDSoundStream->Props.uAlign));
 
         /* Capture position in samples. */
-        DWORD csReadPos = cbReadPos >> pStream->Props.cShift;
+        DWORD idxSampleReadPos = offByteReadPos >> pDSoundStream->Props.cShift;
 
         /* Number of samples available in the DirectSound capture buffer. */
-        DWORD csCaptured = dsoundRingDistance(csReadPos, pDSoundStream->csCaptureReadPos, pDSoundStream->csCaptureBufferSize);
-        if (csCaptured == 0)
+        DWORD cSamplesToCapture = dsoundRingDistance(idxSampleReadPos, pDSoundStream->idxSampleCaptureReadPos,
+                                                     pDSoundStream->cMaxSamplesInBuffer);
+        if (cSamplesToCapture == 0)
             break;
 
         /* Get number of free samples in the mix buffer and check that is has free space */
-        uint32_t csMixFree = AudioMixBufFree(&pStream->MixBuf);
-        if (csMixFree == 0)
+        uint32_t cFreeMixSamples = AudioMixBufFree(&pStream->MixBuf);
+        if (cFreeMixSamples == 0)
         {
             DSLOGF(("DSound: Capture buffer full\n"));
             break;
         }
 
-        DSLOGF(("DSound: Capture csMixFree=%RU32, csReadPos=%ld, csCaptureReadPos=%ld, csCaptured=%ld\n",
-                csMixFree, csReadPos, pDSoundStream->csCaptureReadPos, csCaptured));
+        DSLOGF(("DSound: Capture cFreeMixSamples=%RU32, idxSampleReadPos=%u, idxSampleCaptureReadPos=%u, cSamplesToCapture=%u\n",
+                cFreeMixSamples, idxSampleReadPos, pDSoundStream->idxSampleCaptureReadPos, cSamplesToCapture));
 
         /* No need to fetch more samples than mix buffer can receive. */
-        csCaptured = RT_MIN(csCaptured, csMixFree);
+        cSamplesToCapture = RT_MIN(cSamplesToCapture, cFreeMixSamples);
 
         /* Lock relevant range in the DirectSound capture buffer. */
-        LPVOID pv1, pv2;
+        PVOID pv1, pv2;
         DWORD cb1, cb2;
-        hr = directSoundCaptureLock(pDSCB, &pStream->Props,
-                                    AUDIOMIXBUF_S2B(&pStream->MixBuf, pDSoundStream->csCaptureReadPos), /* dwOffset */
-                                    AUDIOMIXBUF_S2B(&pStream->MixBuf, csCaptured),                      /* dwBytes */
+        hr = directSoundCaptureLock(pDSCB, &pDSoundStream->Props,
+                                    AUDIOMIXBUF_S2B(&pStream->MixBuf, pDSoundStream->idxSampleCaptureReadPos), /* dwOffset */
+                                    AUDIOMIXBUF_S2B(&pStream->MixBuf, cSamplesToCapture),                      /* dwBytes */
                                     &pv1, &pv2, &cb1, &cb2,
                                     0 /* dwFlags */);
         if (FAILED(hr))
@@ -1875,79 +1863,79 @@ static DECLCALLBACK(int) drvHostDSoundStreamCapture(PPDMIHOSTAUDIO pInterface, P
         DWORD len1 = AUDIOMIXBUF_B2S(&pStream->MixBuf, cb1);
         DWORD len2 = AUDIOMIXBUF_B2S(&pStream->MixBuf, cb2);
 
-        uint32_t csWrittenTotal = 0;
-        uint32_t csWritten;
+        uint32_t cSamplesWrittenTotal = 0;
+        uint32_t cSamplesWritten;
         if (pv1 && len1)
         {
-            rc = AudioMixBufWriteCirc(&pStream->MixBuf, pv1, cb1, &csWritten);
+            rc = AudioMixBufWriteCirc(&pStream->MixBuf, pv1, cb1, &cSamplesWritten);
             if (RT_SUCCESS(rc))
-                csWrittenTotal += csWritten;
+                cSamplesWrittenTotal += cSamplesWritten;
         }
 
         if (   RT_SUCCESS(rc)
-            && csWrittenTotal == len1
+            && cSamplesWrittenTotal == len1
             && pv2 && len2)
         {
-            rc = AudioMixBufWriteCirc(&pStream->MixBuf, pv2, cb2, &csWritten);
+            rc = AudioMixBufWriteCirc(&pStream->MixBuf, pv2, cb2, &cSamplesWritten);
             if (RT_SUCCESS(rc))
-                csWrittenTotal += csWritten;
+                cSamplesWrittenTotal += cSamplesWritten;
         }
 
         directSoundCaptureUnlock(pDSCB, pv1, pv2, cb1, cb2);
 
-        if (csWrittenTotal) /* Captured something? */
-            rc = AudioMixBufMixToParent(&pStream->MixBuf, csWrittenTotal, &cCaptured);
+        if (cSamplesWrittenTotal) /* Captured something? */
+            rc = AudioMixBufMixToParent(&pStream->MixBuf, cSamplesWrittenTotal, &cSamplesProcessed);
 
         if (RT_SUCCESS(rc))
         {
-            pDSoundStream->csCaptureReadPos = (pDSoundStream->csCaptureReadPos + cCaptured) % pDSoundStream->csCaptureBufferSize;
-            DSLOGF(("DSound: Capture %ld (%ld+%ld), processed %RU32/%RU32\n",
-                    csCaptured, len1, len2, cCaptured, csWrittenTotal));
+            pDSoundStream->idxSampleCaptureReadPos = (pDSoundStream->idxSampleCaptureReadPos + cSamplesProcessed)
+                                                   % pDSoundStream->cMaxSamplesInBuffer;
+            DSLOGF(("DSound: Capture %u (%u+%u), processed %RU32/%RU32\n",
+                    cSamplesToCapture, len1, len2, cSamplesProcessed, cSamplesWrittenTotal));
         }
 
     } while (0);
 
     if (RT_FAILURE(rc))
-    {
         dsoundUpdateStatusInternal(pThis);
-    }
-    else
-    {
-        if (pcSamplesCaptured)
-            *pcSamplesCaptured = cCaptured;
-    }
+    else if (pcbRead)
+        *pcbRead = cSamplesProcessed;
 
     LogFlowFuncLeaveRC(rc);
     return rc;
 }
 
-static int dsoundDestroyStreamIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
+static int dsoundDestroyStreamIn(PPDMAUDIOSTREAM pStream)
 {
-    PDRVHOSTDSOUND pThis = PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface);
     PDSOUNDSTREAMIN pDSoundStream = (PDSOUNDSTREAMIN)pStream;
 
     directSoundCaptureClose(pDSoundStream);
 
-    pDSoundStream->csCaptureReadPos    = 0;
-    pDSoundStream->csCaptureBufferSize = 0;
+    pDSoundStream->idxSampleCaptureReadPos = 0;
+    pDSoundStream->cMaxSamplesInBuffer = 0;
     RT_ZERO(pDSoundStream->streamCfg);
 
     return VINF_SUCCESS;
 }
 
-static DECLCALLBACK(int) drvHostDSoundGetConfig(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDCFG pCfg)
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnGetConfig}
+ */
+int drvHostDSoundGetConfig(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDCFG pBackendCfg)
 {
-    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg,       VERR_INVALID_POINTER);
+    AssertPtrReturn(pInterface,  VERR_INVALID_POINTER);
+    AssertPtrReturn(pBackendCfg, VERR_INVALID_POINTER);
 
     PDRVHOSTDSOUND pThis = PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface);
 
-    dsoundUpdateStatusInternalEx(pThis, pCfg, 0 /* fEnum */);
+    dsoundUpdateStatusInternalEx(pThis, pBackendCfg, 0 /* fEnum */);
 
     return VINF_SUCCESS;
 }
 
 #ifdef VBOX_WITH_AUDIO_CALLBACKS
+
 static int dsoundNotifyThread(PDRVHOSTDSOUND pThis, bool fShutdown)
 {
     AssertPtrReturn(pThis, VERR_INVALID_POINTER);
@@ -1965,6 +1953,7 @@ static int dsoundNotifyThread(PDRVHOSTDSOUND pThis, bool fShutdown)
     return VINF_SUCCESS;
 }
 
+
 static DECLCALLBACK(int) dsoundNotificationThread(RTTHREAD hThreadSelf, void *pvUser)
 {
     PDRVHOSTDSOUND pThis = (PDRVHOSTDSOUND)pvUser;
@@ -2053,9 +2042,14 @@ static DECLCALLBACK(int) dsoundNotificationThread(RTTHREAD hThreadSelf, void *pv
     LogFlowFunc(("Exited with fShutdown=%RTbool, rc=%Rrc\n", pThis->fShutdown, rc));
     return rc;
 }
+
 #endif /* VBOX_WITH_AUDIO_CALLBACKS */
 
-static DECLCALLBACK(void) drvHostDSoundShutdown(PPDMIHOSTAUDIO pInterface)
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnShutdown}
+ */
+void drvHostDSoundShutdown(PPDMIHOSTAUDIO pInterface)
 {
     PDRVHOSTDSOUND pThis = PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface);
 
@@ -2075,24 +2069,28 @@ static DECLCALLBACK(void) drvHostDSoundShutdown(PPDMIHOSTAUDIO pInterface)
     {
         CloseHandle(pThis->aEvents[DSOUNDEVENT_NOTIFY]);
         pThis->aEvents[DSOUNDEVENT_NOTIFY] = NULL;
-}
+    }
+#else
+    RT_NOREF_PV(pThis);
 #endif
 
     LogFlowFuncLeave();
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnInit}
+ */
 static DECLCALLBACK(int) drvHostDSoundInit(PPDMIHOSTAUDIO pInterface)
 {
     PDRVHOSTDSOUND pThis = PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface);
-
     LogFlowFuncEnter();
 
     int rc;
 
     /* Verify that IDirectSound is available. */
     LPDIRECTSOUND pDirectSound = NULL;
-    HRESULT hr = CoCreateInstance(CLSID_DirectSound, NULL, CLSCTX_ALL,
-                                  IID_IDirectSound, (void **)&pDirectSound);
+    HRESULT hr = CoCreateInstance(CLSID_DirectSound, NULL, CLSCTX_ALL, IID_IDirectSound, (void **)&pDirectSound);
     if (SUCCEEDED(hr))
     {
         IDirectSound_Release(pDirectSound);
@@ -2133,15 +2131,6 @@ static DECLCALLBACK(int) drvHostDSoundInit(PPDMIHOSTAUDIO pInterface)
     return rc;
 }
 
-static DECLCALLBACK(void *) drvHostDSoundQueryInterface(PPDMIBASE pInterface, const char *pszIID)
-{
-    PPDMDRVINS     pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
-    PDRVHOSTDSOUND pThis   = PDMINS_2_DATA(pDrvIns, PDRVHOSTDSOUND);
-
-    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase);
-    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIHOSTAUDIO, &pThis->IHostAudio);
-    return NULL;
-}
 
 static LPCGUID dsoundConfigQueryGUID(PCFGMNODE pCfg, const char *pszName, RTUUID *pUuid)
 {
@@ -2163,6 +2152,7 @@ static LPCGUID dsoundConfigQueryGUID(PCFGMNODE pCfg, const char *pszName, RTUUID
     return pGuid;
 }
 
+
 static void dsoundConfigInit(PDRVHOSTDSOUND pThis, PCFGMNODE pCfg)
 {
     unsigned int uBufsizeOut, uBufsizeIn;
@@ -2182,65 +2172,86 @@ static void dsoundConfigInit(PDRVHOSTDSOUND pThis, PCFGMNODE pCfg)
            &pThis->cfg.uuidCapture));
 }
 
-/*
- * PDMIHOSTAUDIO
- */
 
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnGetStatus}
+ */
 static DECLCALLBACK(PDMAUDIOBACKENDSTS) drvHostDSoundGetStatus(PPDMIHOSTAUDIO pInterface, PDMAUDIODIR enmDir)
 {
+    RT_NOREF(enmDir);
     AssertPtrReturn(pInterface, PDMAUDIOBACKENDSTS_UNKNOWN);
 
     return PDMAUDIOBACKENDSTS_RUNNING;
 }
 
-static DECLCALLBACK(int) drvHostDSoundStreamCreate(PPDMIHOSTAUDIO pInterface,
-                                                   PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfg, uint32_t *pcSamples)
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamCreate}
+ */
+static DECLCALLBACK(int) drvHostDSoundStreamCreate(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
     AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg,       VERR_INVALID_POINTER);
+    AssertPtrReturn(pCfgReq,    VERR_INVALID_POINTER);
+    AssertPtrReturn(pCfgAcq,    VERR_INVALID_POINTER);
+
+    PDRVHOSTDSOUND pThis = PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface);
 
     int rc;
-    if (pCfg->enmDir == PDMAUDIODIR_IN)
-        rc = dsoundCreateStreamIn(pInterface,  pStream, pCfg, pcSamples);
+    if (pCfgReq->enmDir == PDMAUDIODIR_IN)
+        rc = dsoundCreateStreamIn(pThis,  pStream, pCfgReq, pCfgAcq);
     else
-        rc = dsoundCreateStreamOut(pInterface, pStream, pCfg, pcSamples);
+        rc = dsoundCreateStreamOut(pThis, pStream, pCfgReq, pCfgAcq);
 
-    LogFlowFunc(("%s: rc=%Rrc\n", pStream->szName, rc));
     return rc;
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamDestroy}
+ */
 static DECLCALLBACK(int) drvHostDSoundStreamDestroy(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
     AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
 
+    PDRVHOSTDSOUND pThis = PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface);
+
     int rc;
     if (pStream->enmDir == PDMAUDIODIR_IN)
-        rc = dsoundDestroyStreamIn(pInterface,  pStream);
+        rc = dsoundDestroyStreamIn(pStream);
     else
-        rc = dsoundDestroyStreamOut(pInterface, pStream);
+        rc = dsoundDestroyStreamOut(pThis, pStream);
 
     return rc;
 }
 
-static DECLCALLBACK(int) drvHostDSoundStreamControl(PPDMIHOSTAUDIO pInterface,
-                                                    PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamControl}
+ */
+static DECLCALLBACK(int) drvHostDSoundStreamControl(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
     AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
 
+    PDRVHOSTDSOUND pThis = PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface);
+
     Assert(pStream->enmCtx == PDMAUDIOSTREAMCTX_HOST);
 
     int rc;
     if (pStream->enmDir == PDMAUDIODIR_IN)
-        rc = dsoundControlStreamIn(pInterface,  pStream, enmStreamCmd);
+        rc = dsoundControlStreamIn(pThis,  pStream, enmStreamCmd);
     else
-        rc = dsoundControlStreamOut(pInterface, pStream, enmStreamCmd);
+        rc = dsoundControlStreamOut(pThis, pStream, enmStreamCmd);
 
     return rc;
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetStatus}
+ */
 static DECLCALLBACK(PDMAUDIOSTRMSTS) drvHostDSoundStreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
 {
     AssertPtrReturn(pInterface, PDMAUDIOSTRMSTS_FLAG_NONE);
@@ -2276,6 +2287,10 @@ static DECLCALLBACK(PDMAUDIOSTRMSTS) drvHostDSoundStreamGetStatus(PPDMIHOSTAUDIO
     return strmSts;
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamIterate}
+ */
 static DECLCALLBACK(int) drvHostDSoundStreamIterate(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
@@ -2287,6 +2302,32 @@ static DECLCALLBACK(int) drvHostDSoundStreamIterate(PPDMIHOSTAUDIO pInterface, P
     return VINF_SUCCESS;
 }
 
+
+/*********************************************************************************************************************************
+*   PDMDRVINS::IBase Interface                                                                                                   *
+*********************************************************************************************************************************/
+
+/**
+ * @callback_method_impl{PDMIBASE,pfnQueryInterface}
+ */
+static DECLCALLBACK(void *) drvHostDSoundQueryInterface(PPDMIBASE pInterface, const char *pszIID)
+{
+    PPDMDRVINS     pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
+    PDRVHOSTDSOUND pThis   = PDMINS_2_DATA(pDrvIns, PDRVHOSTDSOUND);
+
+    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase);
+    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIHOSTAUDIO, &pThis->IHostAudio);
+    return NULL;
+}
+
+
+/*********************************************************************************************************************************
+*   PDMDRVREG Interface                                                                                                          *
+*********************************************************************************************************************************/
+
+/**
+ * @callback_method_impl{FNPDMDRVDESTRUCT, pfnDestruct}
+ */
 static DECLCALLBACK(void) drvHostDSoundDestruct(PPDMDRVINS pDrvIns)
 {
     PDRVHOSTDSOUND pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTDSOUND);
@@ -2299,13 +2340,14 @@ static DECLCALLBACK(void) drvHostDSoundDestruct(PPDMDRVINS pDrvIns)
     LogFlowFuncLeave();
 }
 
+
 /**
- * Construct a DirectSound Audio driver instance.
- *
- * @copydoc FNPDMDRVCONSTRUCT
+ * @callback_method_impl{FNPDMDRVCONSTRUCT,
+ *      Construct a DirectSound Audio driver instance.}
  */
 static DECLCALLBACK(int) drvHostDSoundConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
     PDRVHOSTDSOUND pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTDSOUND);
 
     LogRel(("Audio: Initializing DirectSound audio driver\n"));
@@ -2364,6 +2406,7 @@ static DECLCALLBACK(int) drvHostDSoundConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pC
     return VINF_SUCCESS;
 }
 
+
 /**
  * PDM driver registration.
  */
diff --git a/src/VBox/Devices/Audio/DrvHostDebugAudio.cpp b/src/VBox/Devices/Audio/DrvHostDebugAudio.cpp
new file mode 100644
index 0000000..f6874d5
--- /dev/null
+++ b/src/VBox/Devices/Audio/DrvHostDebugAudio.cpp
@@ -0,0 +1,470 @@
+/* $Id: DrvHostDebugAudio.cpp $ */
+/** @file
+ * Debug audio driver -- host backend for dumping and injecting audio data
+ * from/to the device emulation.
+ */
+
+/*
+ * Copyright (C) 2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ * --------------------------------------------------------------------
+ */
+
+#include <iprt/alloc.h>
+#include <iprt/uuid.h> /* For PDMIBASE_2_PDMDRV. */
+
+#define LOG_GROUP LOG_GROUP_DRV_HOST_AUDIO
+#include <VBox/log.h>
+#include <VBox/vmm/pdmaudioifs.h>
+
+#include "DrvAudio.h"
+#include "AudioMixBuffer.h"
+#include "VBoxDD.h"
+
+
+/**
+ * Structure for keeping a debug input/output stream.
+ */
+typedef struct DEBUGAUDIOSTREAM
+{
+    /** Note: Always must come first! */
+    PDMAUDIOSTREAM     Stream;
+    /** Audio file to dump output to or read input from. */
+    PDMAUDIOFILE       File;
+    union
+    {
+        struct
+        {
+            /** Timestamp of last captured samples. */
+            uint64_t   tsLastCaptured;
+        } In;
+        struct
+        {
+            /** Timestamp of last played samples. */
+            uint64_t   tsLastPlayed;
+            uint64_t   cMaxSamplesInPlayBuffer;
+            uint8_t   *pu8PlayBuffer;
+        } Out;
+    };
+
+} DEBUGAUDIOSTREAM, *PDEBUGAUDIOSTREAM;
+
+/**
+ * Debug audio driver instance data.
+ * @implements PDMIAUDIOCONNECTOR
+ */
+typedef struct DRVHOSTDEBUGAUDIO
+{
+    /** Pointer to the driver instance structure. */
+    PPDMDRVINS    pDrvIns;
+    /** Pointer to host audio interface. */
+    PDMIHOSTAUDIO IHostAudio;
+} DRVHOSTDEBUGAUDIO, *PDRVHOSTDEBUGAUDIO;
+
+/*******************************************PDM_AUDIO_DRIVER******************************/
+
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnGetConfig}
+ */
+static DECLCALLBACK(int) drvHostDebugAudioGetConfig(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDCFG pBackendCfg)
+{
+    NOREF(pInterface);
+    AssertPtrReturn(pBackendCfg, VERR_INVALID_POINTER);
+
+    pBackendCfg->cbStreamOut    = sizeof(DEBUGAUDIOSTREAM);
+    pBackendCfg->cbStreamIn     = sizeof(DEBUGAUDIOSTREAM);
+
+    /* The NULL backend has exactly one input source and one output sink. */
+    pBackendCfg->cSources       = 1;
+    pBackendCfg->cSinks         = 1;
+
+    pBackendCfg->cMaxStreamsOut = 1; /* Output */
+    pBackendCfg->cMaxStreamsIn  = 2; /* Line input + microphone input. */
+
+    return VINF_SUCCESS;
+}
+
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnInit}
+ */
+static DECLCALLBACK(int) drvHostDebugAudioInit(PPDMIHOSTAUDIO pInterface)
+{
+    NOREF(pInterface);
+
+    LogFlowFuncLeaveRC(VINF_SUCCESS);
+    return VINF_SUCCESS;
+}
+
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnShutdown}
+ */
+static DECLCALLBACK(void) drvHostDebugAudioShutdown(PPDMIHOSTAUDIO pInterface)
+{
+    NOREF(pInterface);
+}
+
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnGetStatus}
+ */
+static DECLCALLBACK(PDMAUDIOBACKENDSTS) drvHostDebugAudioGetStatus(PPDMIHOSTAUDIO pInterface, PDMAUDIODIR enmDir)
+{
+    RT_NOREF(enmDir);
+    AssertPtrReturn(pInterface, PDMAUDIOBACKENDSTS_UNKNOWN);
+
+    return PDMAUDIOBACKENDSTS_RUNNING;
+}
+
+
+static int debugCreateStreamIn(PPDMIHOSTAUDIO pInterface,
+                               PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
+{
+    RT_NOREF(pInterface, pStream);
+
+    /* Just adopt the wanted stream configuration. */
+    PDMAUDIOPCMPROPS Props;
+    int rc = DrvAudioHlpStreamCfgToProps(pCfgReq, &Props);
+    if (RT_SUCCESS(rc))
+    {
+        if (pCfgAcq)
+            pCfgAcq->cSampleBufferSize = _1K;
+    }
+
+    LogFlowFuncLeaveRC(rc);
+    return rc;
+}
+
+
+static int debugCreateStreamOut(PPDMIHOSTAUDIO pInterface,
+                                PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
+{
+    NOREF(pInterface);
+
+    PDEBUGAUDIOSTREAM pDbgStream = (PDEBUGAUDIOSTREAM)pStream;
+
+    /* Just adopt the wanted stream configuration. */
+    PDMAUDIOPCMPROPS Props;
+    int rc = DrvAudioHlpStreamCfgToProps(pCfgReq, &Props);
+    if (RT_SUCCESS(rc))
+    {
+        pDbgStream->Out.tsLastPlayed            = 0;
+        pDbgStream->Out.cMaxSamplesInPlayBuffer = _1K;
+        pDbgStream->Out.pu8PlayBuffer           = (uint8_t *)RTMemAlloc(pDbgStream->Out.cMaxSamplesInPlayBuffer << Props.cShift);
+        if (!pDbgStream->Out.pu8PlayBuffer)
+            rc = VERR_NO_MEMORY;
+    }
+
+    if (RT_SUCCESS(rc))
+    {
+        char szFile[RTPATH_MAX];
+        rc = DrvAudioHlpGetFileName(szFile, RT_ELEMENTS(szFile), "/tmp/", NULL, PDMAUDIOFILETYPE_WAV);
+        if (RT_SUCCESS(rc))
+        {
+            LogRel(("DebugAudio: Creating output file '%s'\n", szFile));
+            rc = DrvAudioHlpWAVFileOpen(&pDbgStream->File, szFile,
+                                        RTFILE_O_WRITE | RTFILE_O_DENY_WRITE | RTFILE_O_CREATE_REPLACE,
+                                        &Props, PDMAUDIOFILEFLAG_NONE);
+            if (RT_FAILURE(rc))
+                LogRel(("DebugAudio: Creating output file '%s' failed with %Rrc\n", szFile, rc));
+        }
+    }
+
+    if (RT_SUCCESS(rc))
+    {
+        if (pCfgAcq)
+            pCfgAcq->cSampleBufferSize = pDbgStream->Out.cMaxSamplesInPlayBuffer;
+    }
+
+    LogFlowFuncLeaveRC(rc);
+    return rc;
+}
+
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamCreate}
+ */
+static DECLCALLBACK(int) drvHostDebugAudioStreamCreate(PPDMIHOSTAUDIO pInterface,
+                                                       PPDMAUDIOSTREAM pStream,
+                                                       PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
+{
+    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
+    AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
+    AssertPtrReturn(pCfgReq,    VERR_INVALID_POINTER);
+
+    int rc;
+    if (pCfgReq->enmDir == PDMAUDIODIR_IN)
+        rc = debugCreateStreamIn( pInterface, pStream, pCfgReq, pCfgAcq);
+    else
+        rc = debugCreateStreamOut(pInterface, pStream, pCfgReq, pCfgAcq);
+
+    LogFlowFunc(("%s: rc=%Rrc\n", pStream->szName, rc));
+    return rc;
+}
+
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamPlay}
+ */
+static DECLCALLBACK(int) drvHostDebugAudioStreamPlay(PPDMIHOSTAUDIO pInterface,
+                                                     PPDMAUDIOSTREAM pStream, const void *pvBuf, uint32_t cbBuf,
+                                                     uint32_t *pcbWritten)
+{
+    RT_NOREF(pvBuf, cbBuf);
+
+    PDRVHOSTDEBUGAUDIO pDrv       = RT_FROM_MEMBER(pInterface, DRVHOSTDEBUGAUDIO, IHostAudio);
+    PDEBUGAUDIOSTREAM  pDbgStream = (PDEBUGAUDIOSTREAM)pStream;
+
+    /* Consume as many samples as would be played at the current frequency since last call. */
+    /*uint32_t cLive           = AudioMixBufLive(&pStream->MixBuf);*/
+
+    uint64_t u64TicksNow     = PDMDrvHlpTMGetVirtualTime(pDrv->pDrvIns);
+   // uint64_t u64TicksElapsed = u64TicksNow  - pDbgStream->Out.tsLastPlayed;
+   // uint64_t u64TicksFreq    = PDMDrvHlpTMGetVirtualFreq(pDrv->pDrvIns);
+
+    /*
+     * Minimize the rounding error by adding 0.5: samples = int((u64TicksElapsed * samplesFreq) / u64TicksFreq + 0.5).
+     * If rounding is not taken into account then the playback rate will be consistently lower that expected.
+     */
+   // uint64_t cSamplesPlayed = (2 * u64TicksElapsed * pStream->Props.uHz + u64TicksFreq) / u64TicksFreq / 2;
+
+    /* Don't play more than available. */
+    /*if (cSamplesPlayed > cLive)
+        cSamplesPlayed = cLive;*/
+
+    uint32_t cSamplesPlayed = 0;
+    uint32_t cSamplesAvail  = RT_MIN(AudioMixBufUsed(&pStream->MixBuf), pDbgStream->Out.cMaxSamplesInPlayBuffer);
+    while (cSamplesAvail)
+    {
+        uint32_t cSamplesRead = 0;
+        int rc2 = AudioMixBufReadCirc(&pStream->MixBuf, pDbgStream->Out.pu8PlayBuffer,
+                                      AUDIOMIXBUF_S2B(&pStream->MixBuf, cSamplesAvail), &cSamplesRead);
+
+        if (RT_FAILURE(rc2))
+            LogRel(("DebugAudio: Reading output failed with %Rrc\n", rc2));
+
+        if (!cSamplesRead)
+            break;
+#if 0
+        RTFILE fh;
+        RTFileOpen(&fh, "/tmp/AudioDebug-Output.pcm",
+                   RTFILE_O_OPEN_CREATE | RTFILE_O_APPEND | RTFILE_O_WRITE | RTFILE_O_DENY_NONE);
+        RTFileWrite(fh, pDbgStream->Out.pu8PlayBuffer, AUDIOMIXBUF_S2B(&pStream->MixBuf, cSamplesRead), NULL);
+        RTFileClose(fh);
+#endif
+        rc2 = DrvAudioHlpWAVFileWrite(&pDbgStream->File,
+                                      pDbgStream->Out.pu8PlayBuffer, AUDIOMIXBUF_S2B(&pStream->MixBuf, cSamplesRead),
+                                      0 /* fFlags */);
+        if (RT_FAILURE(rc2))
+            LogRel(("DebugAudio: Writing output failed with %Rrc\n", rc2));
+
+        AudioMixBufFinish(&pStream->MixBuf, cSamplesRead);
+
+        Assert(cSamplesAvail >= cSamplesRead);
+        cSamplesAvail -= cSamplesRead;
+
+        cSamplesPlayed += cSamplesRead;
+    }
+
+    /* Remember when samples were consumed. */
+    pDbgStream->Out.tsLastPlayed = u64TicksNow;
+
+    if (pcbWritten)
+        *pcbWritten = cSamplesPlayed;
+
+    return VINF_SUCCESS;
+}
+
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamCapture}
+ */
+static DECLCALLBACK(int) drvHostDebugAudioStreamCapture(PPDMIHOSTAUDIO pInterface,
+                                                        PPDMAUDIOSTREAM pStream, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead)
+{
+    RT_NOREF(pInterface, pStream, pvBuf, cbBuf);
+
+    /* Never capture anything. */
+    if (pcbRead)
+        *pcbRead = 0;
+
+    return VINF_SUCCESS;
+}
+
+
+static int debugDestroyStreamIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
+{
+    RT_NOREF(pInterface, pStream);
+    LogFlowFuncLeaveRC(VINF_SUCCESS);
+    return VINF_SUCCESS;
+}
+
+
+static int debugDestroyStreamOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
+{
+    RT_NOREF(pInterface);
+    PDEBUGAUDIOSTREAM pDbgStream = (PDEBUGAUDIOSTREAM)pStream;
+    if (   pDbgStream
+        && pDbgStream->Out.pu8PlayBuffer)
+    {
+        RTMemFree(pDbgStream->Out.pu8PlayBuffer);
+        pDbgStream->Out.pu8PlayBuffer = NULL;
+    }
+
+    size_t cbDataSize = DrvAudioHlpWAVFileGetDataSize(&pDbgStream->File);
+
+    int rc = DrvAudioHlpWAVFileClose(&pDbgStream->File);
+    if (RT_SUCCESS(rc))
+    {
+        /* Delete the file again if nothing but the header was written to it. */
+        if (!cbDataSize)
+            rc = RTFileDelete(pDbgStream->File.szName); /** @todo Make deletion configurable? */
+    }
+
+    LogFlowFuncLeaveRC(rc);
+    return rc;
+}
+
+
+static DECLCALLBACK(int) drvHostDebugAudioStreamDestroy(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
+{
+    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
+    AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
+
+    int rc;
+    if (pStream->enmDir == PDMAUDIODIR_IN)
+        rc = debugDestroyStreamIn(pInterface,  pStream);
+    else
+        rc = debugDestroyStreamOut(pInterface, pStream);
+
+    return rc;
+}
+
+static DECLCALLBACK(int) drvHostDebugAudioStreamControl(PPDMIHOSTAUDIO pInterface,
+                                                        PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)
+{
+    RT_NOREF(enmStreamCmd);
+    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
+    AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
+
+    Assert(pStream->enmCtx == PDMAUDIOSTREAMCTX_HOST);
+
+    return VINF_SUCCESS;
+}
+
+static DECLCALLBACK(PDMAUDIOSTRMSTS) drvHostDebugAudioStreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
+{
+    NOREF(pInterface);
+    NOREF(pStream);
+
+    return (  PDMAUDIOSTRMSTS_FLAG_INITIALIZED | PDMAUDIOSTRMSTS_FLAG_ENABLED
+            | PDMAUDIOSTRMSTS_FLAG_DATA_READABLE | PDMAUDIOSTRMSTS_FLAG_DATA_WRITABLE);
+}
+
+static DECLCALLBACK(int) drvHostDebugAudioStreamIterate(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
+{
+    NOREF(pInterface);
+    NOREF(pStream);
+
+    return VINF_SUCCESS;
+}
+
+
+/**
+ * @interface_method_impl{PDMIBASE,pfnQueryInterface}
+ */
+static DECLCALLBACK(void *) drvHostDebugAudioQueryInterface(PPDMIBASE pInterface, const char *pszIID)
+{
+    PPDMDRVINS         pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
+    PDRVHOSTDEBUGAUDIO pThis   = PDMINS_2_DATA(pDrvIns, PDRVHOSTDEBUGAUDIO);
+
+    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase);
+    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIHOSTAUDIO, &pThis->IHostAudio);
+    return NULL;
+}
+
+
+/**
+ * Constructs a Null audio driver instance.
+ *
+ * @copydoc FNPDMDRVCONSTRUCT
+ */
+static DECLCALLBACK(int) drvHostDebugAudioConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
+{
+    RT_NOREF(pCfg, fFlags);
+    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
+    PDRVHOSTDEBUGAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTDEBUGAUDIO);
+    LogRel(("Audio: Initializing DEBUG driver\n"));
+
+    /*
+     * Init the static parts.
+     */
+    pThis->pDrvIns                   = pDrvIns;
+    /* IBase */
+    pDrvIns->IBase.pfnQueryInterface = drvHostDebugAudioQueryInterface;
+    /* IHostAudio */
+    PDMAUDIO_IHOSTAUDIO_CALLBACKS(drvHostDebugAudio);
+
+    return VINF_SUCCESS;
+}
+
+/**
+ * Char driver registration record.
+ */
+const PDMDRVREG g_DrvHostDebugAudio =
+{
+    /* u32Version */
+    PDM_DRVREG_VERSION,
+    /* szName */
+    "DebugAudio",
+    /* szRCMod */
+    "",
+    /* szR0Mod */
+    "",
+    /* pszDescription */
+    "Debug audio host driver",
+    /* fFlags */
+    PDM_DRVREG_FLAGS_HOST_BITS_DEFAULT,
+    /* fClass. */
+    PDM_DRVREG_CLASS_AUDIO,
+    /* cMaxInstances */
+    ~0U,
+    /* cbInstance */
+    sizeof(DRVHOSTDEBUGAUDIO),
+    /* pfnConstruct */
+    drvHostDebugAudioConstruct,
+    /* pfnDestruct */
+    NULL,
+    /* pfnRelocate */
+    NULL,
+    /* pfnIOCtl */
+    NULL,
+    /* pfnPowerOn */
+    NULL,
+    /* pfnReset */
+    NULL,
+    /* pfnSuspend */
+    NULL,
+    /* pfnResume */
+    NULL,
+    /* pfnAttach */
+    NULL,
+    /* pfnDetach */
+    NULL,
+    /* pfnPowerOff */
+    NULL,
+    /* pfnSoftReset */
+    NULL,
+    /* u32EndVersion */
+    PDM_DRVREG_VERSION
+};
+
diff --git a/src/VBox/Devices/Audio/DrvHostNullAudio.cpp b/src/VBox/Devices/Audio/DrvHostNullAudio.cpp
index 46c1a58..01137ab 100644
--- a/src/VBox/Devices/Audio/DrvHostNullAudio.cpp
+++ b/src/VBox/Devices/Audio/DrvHostNullAudio.cpp
@@ -40,7 +40,12 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  * THE SOFTWARE.
  */
-#include <iprt/alloc.h>
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#include <iprt/mem.h>
 #include <iprt/uuid.h> /* For PDMIBASE_2_PDMDRV. */
 
 #define LOG_GROUP LOG_GROUP_DRV_HOST_AUDIO
@@ -52,20 +57,29 @@
 #include "VBoxDD.h"
 
 
+/*********************************************************************************************************************************
+*   Structures and Typedefs                                                                                                      *
+*********************************************************************************************************************************/
 typedef struct NULLAUDIOSTREAMOUT
 {
-    /** Note: Always must come first! */
-    PDMAUDIOSTREAM     Stream;
-    uint64_t           u64TicksLast;
-    uint64_t           csPlayBuffer;
-    uint8_t           *pu8PlayBuffer;
-} NULLAUDIOSTREAMOUT, *PNULLAUDIOSTREAMOUT;
+    /** @note Always must come first! */
+    PDMAUDIOSTREAM      Stream;
+    /** The PCM properties of this stream. */
+    PDMAUDIOPCMPROPS    Props;
+    uint64_t            u64TicksLast;
+    uint64_t            cMaxSamplesInPlayBuffer;
+    uint8_t            *pbPlayBuffer;
+} NULLAUDIOSTREAMOUT;
+typedef NULLAUDIOSTREAMOUT *PNULLAUDIOSTREAMOUT;
 
 typedef struct NULLAUDIOSTREAMIN
 {
-    /** Note: Always must come first! */
-    PDMAUDIOSTREAM     Stream;
-} NULLAUDIOSTREAMIN, *PNULLAUDIOSTREAMIN;
+    /** @note Always must come first! */
+    PDMAUDIOSTREAM      Stream;
+    /** The PCM properties of this stream. */
+    PDMAUDIOPCMPROPS    Props;
+} NULLAUDIOSTREAMIN;
+typedef NULLAUDIOSTREAMIN *PNULLAUDIOSTREAMIN;
 
 /**
  * NULL audio driver instance data.
@@ -74,32 +88,38 @@ typedef struct NULLAUDIOSTREAMIN
 typedef struct DRVHOSTNULLAUDIO
 {
     /** Pointer to the driver instance structure. */
-    PPDMDRVINS    pDrvIns;
+    PPDMDRVINS          pDrvIns;
     /** Pointer to host audio interface. */
-    PDMIHOSTAUDIO IHostAudio;
+    PDMIHOSTAUDIO       IHostAudio;
 } DRVHOSTNULLAUDIO, *PDRVHOSTNULLAUDIO;
 
-/*******************************************PDM_AUDIO_DRIVER******************************/
 
 
-static DECLCALLBACK(int) drvHostNullAudioGetConfig(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDCFG pCfg)
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnGetConfig}
+ */
+static DECLCALLBACK(int) drvHostNullAudioGetConfig(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDCFG pBackendCfg)
 {
     NOREF(pInterface);
-    AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
+    AssertPtrReturn(pBackendCfg, VERR_INVALID_POINTER);
 
-    pCfg->cbStreamOut    = sizeof(NULLAUDIOSTREAMOUT);
-    pCfg->cbStreamIn     = sizeof(NULLAUDIOSTREAMIN);
+    pBackendCfg->cbStreamOut    = sizeof(NULLAUDIOSTREAMOUT);
+    pBackendCfg->cbStreamIn     = sizeof(NULLAUDIOSTREAMIN);
 
     /* The NULL backend has exactly one input source and one output sink. */
-    pCfg->cSources       = 1;
-    pCfg->cSinks         = 1;
+    pBackendCfg->cSources       = 1;
+    pBackendCfg->cSinks         = 1;
 
-    pCfg->cMaxStreamsOut = 1; /* Output */
-    pCfg->cMaxStreamsIn  = 2; /* Line input + microphone input. */
+    pBackendCfg->cMaxStreamsOut = 1; /* Output */
+    pBackendCfg->cMaxStreamsIn  = 2; /* Line input + microphone input. */
 
     return VINF_SUCCESS;
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnInit}
+ */
 static DECLCALLBACK(int) drvHostNullAudioInit(PPDMIHOSTAUDIO pInterface)
 {
     NOREF(pInterface);
@@ -108,55 +128,40 @@ static DECLCALLBACK(int) drvHostNullAudioInit(PPDMIHOSTAUDIO pInterface)
     return VINF_SUCCESS;
 }
 
-static int nullCreateStreamIn(PPDMIHOSTAUDIO pInterface,
-                              PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfg, uint32_t *pcSamples)
-{
-    NOREF(pInterface);
 
-    /* Just adopt the wanted stream configuration. */
-    int rc = DrvAudioHlpStreamCfgToProps(pCfg, &pStream->Props);
-    if (RT_SUCCESS(rc))
-    {
-        if (pcSamples)
-            *pcSamples = _1K;
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnShutdown}
+ */
+static DECLCALLBACK(void) drvHostNullAudioShutdown(PPDMIHOSTAUDIO pInterface)
+{
+    RT_NOREF(pInterface);
 }
 
-static int nullCreateStreamOut(PPDMIHOSTAUDIO pInterface,
-                               PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfg,
-                               uint32_t *pcSamples)
-{
-    NOREF(pInterface);
 
-    /* Just adopt the wanted stream configuration. */
-    int rc = DrvAudioHlpStreamCfgToProps(pCfg, &pStream->Props);
-    if (RT_SUCCESS(rc))
-    {
-        PNULLAUDIOSTREAMOUT pNullStream = (PNULLAUDIOSTREAMOUT)pStream;
-        pNullStream->u64TicksLast  = 0;
-        pNullStream->csPlayBuffer  = _1K;
-        pNullStream->pu8PlayBuffer = (uint8_t *)RTMemAlloc(_1K << pStream->Props.cShift);
-        if (pNullStream->pu8PlayBuffer)
-        {
-            if (pcSamples)
-                *pcSamples = pNullStream->csPlayBuffer;
-        }
-        else
-            rc = VERR_NO_MEMORY;
-    }
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnGetStatus}
+ */
+static DECLCALLBACK(PDMAUDIOBACKENDSTS) drvHostNullAudioGetStatus(PPDMIHOSTAUDIO pInterface, PDMAUDIODIR enmDir)
+{
+    RT_NOREF(enmDir);
+    AssertPtrReturn(pInterface, PDMAUDIOBACKENDSTS_UNKNOWN);
 
-    LogFlowFuncLeaveRC(rc);
-    return rc;
+    return PDMAUDIOBACKENDSTS_RUNNING;
 }
 
-static DECLCALLBACK(int) drvHostNullAudioStreamPlay(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream,
-                                                    uint32_t *pcSamplesPlayed)
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamPlay}
+ */
+static DECLCALLBACK(int) drvHostNullAudioStreamPlay(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream, const void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten)
 {
-    PDRVHOSTNULLAUDIO pDrv = RT_FROM_MEMBER(pInterface, DRVHOSTNULLAUDIO, IHostAudio);
-    PNULLAUDIOSTREAMOUT pNullStream = (PNULLAUDIOSTREAMOUT)pStream;
+    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
+    AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
+
+    RT_NOREF2(pvBuf, cbBuf);
+
+    PDRVHOSTNULLAUDIO   pDrv        = RT_FROM_MEMBER(pInterface, DRVHOSTNULLAUDIO, IHostAudio);
+    PNULLAUDIOSTREAMOUT pNullStream = RT_FROM_MEMBER(pStream, NULLAUDIOSTREAMOUT, Stream);
 
     /* Consume as many samples as would be played at the current frequency since last call. */
     uint32_t cLive           = AudioMixBufLive(&pStream->MixBuf);
@@ -172,81 +177,129 @@ static DECLCALLBACK(int) drvHostNullAudioStreamPlay(PPDMIHOSTAUDIO pInterface, P
      * Minimize the rounding error by adding 0.5: samples = int((u64TicksElapsed * samplesFreq) / u64TicksFreq + 0.5).
      * If rounding is not taken into account then the playback rate will be consistently lower that expected.
      */
-    uint64_t cSamplesPlayed = (2 * u64TicksElapsed * pStream->Props.uHz + u64TicksFreq) / u64TicksFreq / 2;
+    uint64_t cSamplesPlayed = (2 * u64TicksElapsed * pNullStream->Props.uHz + u64TicksFreq) / u64TicksFreq / 2;
 
     /* Don't play more than available. */
     if (cSamplesPlayed > cLive)
         cSamplesPlayed = cLive;
 
-    cSamplesPlayed = RT_MIN(cSamplesPlayed, pNullStream->csPlayBuffer);
+    cSamplesPlayed = RT_MIN(cSamplesPlayed, pNullStream->cMaxSamplesInPlayBuffer);
 
-    uint32_t csRead = 0;
-    AudioMixBufReadCirc(&pStream->MixBuf, pNullStream->pu8PlayBuffer,
-                        AUDIOMIXBUF_S2B(&pStream->MixBuf, cSamplesPlayed), &csRead);
-    AudioMixBufFinish(&pStream->MixBuf, csRead);
+    uint32_t cSamplesToRead = 0;
+    AudioMixBufReadCirc(&pStream->MixBuf, pNullStream->pbPlayBuffer,
+                        AUDIOMIXBUF_S2B(&pStream->MixBuf, cSamplesPlayed), &cSamplesToRead);
+    AudioMixBufFinish(&pStream->MixBuf, cSamplesToRead);
 
-    if (pcSamplesPlayed)
-        *pcSamplesPlayed = csRead;
+    if (pcbWritten)
+        *pcbWritten = cSamplesToRead;
 
     return VINF_SUCCESS;
 }
 
-static DECLCALLBACK(int) drvHostNullAudioStreamCapture(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream,
-                                                       uint32_t *pcSamplesCaptured)
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamCapture}
+ */
+static DECLCALLBACK(int) drvHostNullAudioStreamCapture(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead)
 {
+    RT_NOREF4(pInterface, pStream, pvBuf, cbBuf);
+
     /* Never capture anything. */
-    if (pcSamplesCaptured)
-        *pcSamplesCaptured = 0;
+    if (pcbRead)
+        *pcbRead = 0;
 
     return VINF_SUCCESS;
 }
 
-static int nullDestroyStreamIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
-{
-    LogFlowFuncLeaveRC(VINF_SUCCESS);
-    return VINF_SUCCESS;
-}
 
-static int nullDestroyStreamOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
+static int nullCreateStreamIn(PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
 {
-    PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
+    PNULLAUDIOSTREAMIN pNullStream = RT_FROM_MEMBER(pStream, NULLAUDIOSTREAMIN, Stream);
 
-    PNULLAUDIOSTREAMOUT pNullStream = (PNULLAUDIOSTREAMOUT)pStream;
-    if (   pNullStream
-        && pNullStream->pu8PlayBuffer)
+    /* Just adopt the wanted stream configuration. */
+    int rc = DrvAudioHlpStreamCfgToProps(pCfgReq, &pNullStream->Props);
+    if (RT_SUCCESS(rc))
     {
-        RTMemFree(pNullStream->pu8PlayBuffer);
-        pNullStream->pu8PlayBuffer = NULL;
+        if (pCfgAcq)
+            pCfgAcq->cSampleBufferSize = _1K;
     }
 
-    LogFlowFuncLeaveRC(VINF_SUCCESS);
-    return VINF_SUCCESS;
+    LogFlowFuncLeaveRC(rc);
+    return rc;
 }
 
-static DECLCALLBACK(PDMAUDIOBACKENDSTS) drvHostNullAudioGetStatus(PPDMIHOSTAUDIO pInterface, PDMAUDIODIR enmDir)
+
+static int nullCreateStreamOut(PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
 {
-    AssertPtrReturn(pInterface, PDMAUDIOBACKENDSTS_UNKNOWN);
+    PNULLAUDIOSTREAMOUT pNullStream = RT_FROM_MEMBER(pStream, NULLAUDIOSTREAMOUT, Stream);
 
-    return PDMAUDIOBACKENDSTS_RUNNING;
+    /* Just adopt the wanted stream configuration. */
+    int rc = DrvAudioHlpStreamCfgToProps(pCfgReq, &pNullStream->Props);
+    if (RT_SUCCESS(rc))
+    {
+        pNullStream->u64TicksLast  = 0;
+        pNullStream->cMaxSamplesInPlayBuffer = _1K;
+
+        pNullStream->pbPlayBuffer = (uint8_t *)RTMemAlloc(_1K << pNullStream->Props.cShift);
+        if (pNullStream->pbPlayBuffer)
+        {
+            if (pCfgAcq)
+                pCfgAcq->cSampleBufferSize = pNullStream->cMaxSamplesInPlayBuffer;
+        }
+        else
+            rc = VERR_NO_MEMORY;
+    }
+
+    LogFlowFuncLeaveRC(rc);
+    return rc;
 }
 
-static DECLCALLBACK(int) drvHostNullAudioStreamCreate(PPDMIHOSTAUDIO pInterface,
-                                                      PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfg, uint32_t *pcSamples)
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamCreate}
+ */
+static DECLCALLBACK(int) drvHostNullAudioStreamCreate(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
     AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg,       VERR_INVALID_POINTER);
+    AssertPtrReturn(pCfgReq,    VERR_INVALID_POINTER);
 
     int rc;
-    if (pCfg->enmDir == PDMAUDIODIR_IN)
-        rc = nullCreateStreamIn(pInterface,  pStream, pCfg, pcSamples);
+    if (pCfgReq->enmDir == PDMAUDIODIR_IN)
+        rc = nullCreateStreamIn( pStream, pCfgReq, pCfgAcq);
     else
-        rc = nullCreateStreamOut(pInterface, pStream, pCfg, pcSamples);
+        rc = nullCreateStreamOut(pStream, pCfgReq, pCfgAcq);
 
     LogFlowFunc(("%s: rc=%Rrc\n", pStream->szName, rc));
     return rc;
 }
 
+
+static int nullDestroyStreamIn(void)
+{
+    LogFlowFuncLeaveRC(VINF_SUCCESS);
+    return VINF_SUCCESS;
+}
+
+
+static int nullDestroyStreamOut(PPDMAUDIOSTREAM pStream)
+{
+    PNULLAUDIOSTREAMOUT pNullStream = RT_FROM_MEMBER(pStream, NULLAUDIOSTREAMOUT, Stream);
+    if (   pNullStream
+        && pNullStream->pbPlayBuffer)
+    {
+        RTMemFree(pNullStream->pbPlayBuffer);
+        pNullStream->pbPlayBuffer = NULL;
+    }
+
+    LogFlowFuncLeaveRC(VINF_SUCCESS);
+    return VINF_SUCCESS;
+}
+
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamDestroy}
+ */
 static DECLCALLBACK(int) drvHostNullAudioStreamDestroy(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
@@ -254,16 +307,20 @@ static DECLCALLBACK(int) drvHostNullAudioStreamDestroy(PPDMIHOSTAUDIO pInterface
 
     int rc;
     if (pStream->enmDir == PDMAUDIODIR_IN)
-        rc = nullDestroyStreamIn(pInterface,  pStream);
+        rc = nullDestroyStreamIn();
     else
-        rc = nullDestroyStreamOut(pInterface, pStream);
+        rc = nullDestroyStreamOut(pStream);
 
     return rc;
 }
 
-static DECLCALLBACK(int) drvHostNullAudioStreamControl(PPDMIHOSTAUDIO pInterface,
-                                                       PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamControl}
+ */
+static DECLCALLBACK(int) drvHostNullAudioStreamControl(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)
 {
+    RT_NOREF(enmStreamCmd);
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
     AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
 
@@ -272,15 +329,21 @@ static DECLCALLBACK(int) drvHostNullAudioStreamControl(PPDMIHOSTAUDIO pInterface
     return VINF_SUCCESS;
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetStatus}
+ */
 static DECLCALLBACK(PDMAUDIOSTRMSTS) drvHostNullAudioStreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
 {
-    NOREF(pInterface);
-    NOREF(pStream);
-
-    return (  PDMAUDIOSTRMSTS_FLAG_INITIALIZED | PDMAUDIOSTRMSTS_FLAG_ENABLED
-            | PDMAUDIOSTRMSTS_FLAG_DATA_READABLE | PDMAUDIOSTRMSTS_FLAG_DATA_WRITABLE);
+    RT_NOREF(pInterface, pStream);
+    return PDMAUDIOSTRMSTS_FLAG_INITIALIZED | PDMAUDIOSTRMSTS_FLAG_ENABLED
+         | PDMAUDIOSTRMSTS_FLAG_DATA_READABLE | PDMAUDIOSTRMSTS_FLAG_DATA_WRITABLE;
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamIterate}
+ */
 static DECLCALLBACK(int) drvHostNullAudioStreamIterate(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
 {
     NOREF(pInterface);
@@ -289,6 +352,7 @@ static DECLCALLBACK(int) drvHostNullAudioStreamIterate(PPDMIHOSTAUDIO pInterface
     return VINF_SUCCESS;
 }
 
+
 /**
  * @interface_method_impl{PDMIBASE,pfnQueryInterface}
  */
@@ -302,10 +366,6 @@ static DECLCALLBACK(void *) drvHostNullAudioQueryInterface(PPDMIBASE pInterface,
     return NULL;
 }
 
-static DECLCALLBACK(void) drvHostNullAudioShutdown(PPDMIHOSTAUDIO pInterface)
-{
-    NOREF(pInterface);
-}
 
 /**
  * Constructs a Null audio driver instance.
@@ -314,6 +374,8 @@ static DECLCALLBACK(void) drvHostNullAudioShutdown(PPDMIHOSTAUDIO pInterface)
  */
 static DECLCALLBACK(int) drvHostNullAudioConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
+    RT_NOREF(pCfg, fFlags);
+    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
     AssertPtrReturn(pDrvIns, VERR_INVALID_POINTER);
     /* pCfg is optional. */
 
@@ -332,6 +394,7 @@ static DECLCALLBACK(int) drvHostNullAudioConstruct(PPDMDRVINS pDrvIns, PCFGMNODE
     return VINF_SUCCESS;
 }
 
+
 /**
  * Char driver registration record.
  */
diff --git a/src/VBox/Devices/Audio/DrvHostOSSAudio.cpp b/src/VBox/Devices/Audio/DrvHostOSSAudio.cpp
index 3120a18..02ac0dc 100644
--- a/src/VBox/Devices/Audio/DrvHostOSSAudio.cpp
+++ b/src/VBox/Devices/Audio/DrvHostOSSAudio.cpp
@@ -34,6 +34,7 @@
 
 #include "VBoxDD.h"
 
+
 /*********************************************************************************************************************************
 *   Defines                                                                                                                      *
 *********************************************************************************************************************************/
@@ -41,13 +42,14 @@
 #if ((SOUND_VERSION > 360) && (defined(OSS_SYSINFO)))
 /* OSS > 3.6 has a new syscall available for querying a bit more detailed information
  * about OSS' audio capabilities. This is handy for e.g. Solaris. */
-# define VBOX_WITH_OSS_SYSINFO 1
+# define VBOX_WITH_AUDIO_OSS_SYSINFO 1
 #endif
 
 /** Makes DRVHOSTOSSAUDIO out of PDMIHOSTAUDIO. */
 #define PDMIHOSTAUDIO_2_DRVHOSTOSSAUDIO(pInterface) \
     ( (PDRVHOSTOSSAUDIO)((uintptr_t)pInterface - RT_OFFSETOF(DRVHOSTOSSAUDIO, IHostAudio)) )
 
+
 /*********************************************************************************************************************************
 *   Structures                                                                                                                   *
 *********************************************************************************************************************************/
@@ -81,6 +83,8 @@ typedef struct OSSAUDIOSTREAMIN
 {
     /** Note: Always must come first! */
     PDMAUDIOSTREAM     pStreamIn;
+    /** The PCM properties of this stream. */
+    PDMAUDIOPCMPROPS   Props;
     int                hFile;
     int                cFragments;
     int                cbFragmentSize;
@@ -95,6 +99,8 @@ typedef struct OSSAUDIOSTREAMOUT
 {
     /** Note: Always must come first! */
     PDMAUDIOSTREAM      pStreamOut;
+    /** The PCM properties of this stream. */
+    PDMAUDIOPCMPROPS    Props;
     int                 hFile;
     int                 cFragments;
     int                 cbFragmentSize;
@@ -146,11 +152,13 @@ static uint32_t popcount(uint32_t u)
     return u;
 }
 
+
 static uint32_t lsbindex(uint32_t u)
 {
     return popcount ((u&-u)-1);
 }
 
+
 static int ossAudioFmtToOSS(PDMAUDIOFMT fmt)
 {
     switch (fmt)
@@ -175,6 +183,7 @@ static int ossAudioFmtToOSS(PDMAUDIOFMT fmt)
     return AFMT_U8;
 }
 
+
 static int ossOSSToAudioFmt(int fmt, PDMAUDIOFMT *pFmt, PDMAUDIOENDIANNESS *pENDIANNESS)
 {
     switch (fmt)
@@ -223,6 +232,7 @@ static int ossOSSToAudioFmt(int fmt, PDMAUDIOFMT *pFmt, PDMAUDIOENDIANNESS *pEND
     return VINF_SUCCESS;
 }
 
+
 static int ossStreamClose(int *phFile)
 {
     if (!phFile || !*phFile)
@@ -243,13 +253,9 @@ static int ossStreamClose(int *phFile)
     return rc;
 }
 
+
 static int ossStreamOpen(const char *pszDev, int fOpen, POSSAUDIOSTREAMCFG pReq, POSSAUDIOSTREAMCFG pObt, int *phFile)
 {
-    AssertPtrReturn(pszDev, VERR_INVALID_POINTER);
-    AssertPtrReturn(pReq,   VERR_INVALID_POINTER);
-    AssertPtrReturn(pObt,   VERR_INVALID_POINTER);
-    AssertPtrReturn(phFile, VERR_INVALID_POINTER);
-
     int rc;
 
     int hFile = -1;
@@ -333,30 +339,23 @@ static int ossStreamOpen(const char *pszDev, int fOpen, POSSAUDIOSTREAMCFG pReq,
     return rc;
 }
 
-static int ossControlStreamIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream,
-                              PDMAUDIOSTREAMCMD enmStreamCmd)
-{
-    NOREF(pInterface);
-    NOREF(pStream);
-    NOREF(enmStreamCmd);
 
+static int ossControlStreamIn(/*PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd*/ void)
+{
     /** @todo Nothing to do here right now!? */
 
     return VINF_SUCCESS;
 }
 
-static int ossControlStreamOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream,
-                               PDMAUDIOSTREAMCMD enmStreamCmd)
-{
-    NOREF(pInterface);
-    AssertPtrReturn(pStream, VERR_INVALID_POINTER);
 
-    POSSAUDIOSTREAMOUT pThisStream = (POSSAUDIOSTREAMOUT)pStream;
+static int ossControlStreamOut(PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)
+{
+    POSSAUDIOSTREAMOUT pStreamOut = (POSSAUDIOSTREAMOUT)pStream;
 
 #ifdef RT_OS_L4
     return VINF_SUCCESS;
 #else
-    if (!pThisStream->fMemMapped)
+    if (!pStreamOut->fMemMapped)
         return VINF_SUCCESS;
 #endif
 
@@ -367,11 +366,11 @@ static int ossControlStreamOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStrea
         case PDMAUDIOSTREAMCMD_ENABLE:
         case PDMAUDIOSTREAMCMD_RESUME:
         {
-            DrvAudioHlpClearBuf(&pStream->Props,
-                             pThisStream->pvBuf, pThisStream->cbBuf, AudioMixBufSize(&pStream->MixBuf));
+            DrvAudioHlpClearBuf(&pStreamOut->Props,
+                                pStreamOut->pvBuf, pStreamOut->cbBuf, AudioMixBufSize(&pStream->MixBuf));
 
             mask = PCM_ENABLE_OUTPUT;
-            if (ioctl(pThisStream->hFile, SNDCTL_DSP_SETTRIGGER, &mask) < 0)
+            if (ioctl(pStreamOut->hFile, SNDCTL_DSP_SETTRIGGER, &mask) < 0)
             {
                 LogRel(("OSS: Failed to enable output stream: %s\n", strerror(errno)));
                 rc = RTErrConvertFromErrno(errno);
@@ -384,7 +383,7 @@ static int ossControlStreamOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStrea
         case PDMAUDIOSTREAMCMD_PAUSE:
         {
             mask = 0;
-            if (ioctl(pThisStream->hFile, SNDCTL_DSP_SETTRIGGER, &mask) < 0)
+            if (ioctl(pStreamOut->hFile, SNDCTL_DSP_SETTRIGGER, &mask) < 0)
             {
                 LogRel(("OSS: Failed to disable output stream: %s\n", strerror(errno)));
                 rc = RTErrConvertFromErrno(errno);
@@ -403,19 +402,26 @@ static int ossControlStreamOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStrea
     return rc;
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnInit}
+ */
 static DECLCALLBACK(int) drvHostOSSAudioInit(PPDMIHOSTAUDIO pInterface)
 {
-    NOREF(pInterface);
+    RT_NOREF(pInterface);
 
     LogFlowFuncEnter();
 
     return VINF_SUCCESS;
 }
 
-static DECLCALLBACK(int) drvHostOSSAudioStreamCapture(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream,
-                                                      uint32_t *pcSamplesCaptured)
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamCapture}
+ */
+static DECLCALLBACK(int) drvHostOSSAudioStreamCapture(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead)
 {
-    NOREF(pInterface);
+    RT_NOREF(pInterface, cbBuf, pvBuf);
     AssertPtrReturn(pStream, VERR_INVALID_POINTER);
 
     POSSAUDIOSTREAMIN pStrm = (POSSAUDIOSTREAMIN)pStream;
@@ -491,8 +497,8 @@ static DECLCALLBACK(int) drvHostOSSAudioStreamCapture(PPDMIHOSTAUDIO pInterface,
         if (cWrittenTotal)
             rc = AudioMixBufMixToParent(&pStream->MixBuf, cWrittenTotal, &cProcessed);
 
-        if (pcSamplesCaptured)
-            *pcSamplesCaptured = cWrittenTotal;
+        if (pcbRead)
+            *pcbRead = cWrittenTotal;
 
         LogFlowFunc(("cWrittenTotal=%RU32 (%RU32 processed), rc=%Rrc\n",
                      cWrittenTotal, cProcessed, rc));
@@ -502,11 +508,9 @@ static DECLCALLBACK(int) drvHostOSSAudioStreamCapture(PPDMIHOSTAUDIO pInterface,
     return rc;
 }
 
-static int ossDestroyStreamIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
-{
-    NOREF(pInterface);
-    AssertPtrReturn(pStream, VERR_INVALID_POINTER);
 
+static int ossDestroyStreamIn(PPDMAUDIOSTREAM pStream)
+{
     POSSAUDIOSTREAMIN pStrm = (POSSAUDIOSTREAMIN)pStream;
 
     LogFlowFuncEnter();
@@ -526,11 +530,9 @@ static int ossDestroyStreamIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream
     return VINF_SUCCESS;
 }
 
-static int ossDestroyStreamOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
-{
-    NOREF(pInterface);
-    AssertPtrReturn(pStream, VERR_INVALID_POINTER);
 
+static int ossDestroyStreamOut(PPDMAUDIOSTREAM pStream)
+{
     POSSAUDIOSTREAMOUT pStrm = (POSSAUDIOSTREAMOUT)pStream;
 
     LogFlowFuncEnter();
@@ -575,15 +577,19 @@ static int ossDestroyStreamOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStrea
     return VINF_SUCCESS;
 }
 
-static DECLCALLBACK(int) drvHostOSSAudioGetConfig(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDCFG pCfg)
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnGetConfig}
+ */
+static DECLCALLBACK(int) drvHostOSSAudioGetConfig(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDCFG pBackendCfg)
 {
-    NOREF(pInterface);
+    RT_NOREF(pInterface);
 
-    pCfg->cbStreamIn  = sizeof(OSSAUDIOSTREAMIN);
-    pCfg->cbStreamOut = sizeof(OSSAUDIOSTREAMOUT);
+    pBackendCfg->cbStreamIn  = sizeof(OSSAUDIOSTREAMIN);
+    pBackendCfg->cbStreamOut = sizeof(OSSAUDIOSTREAMOUT);
 
-    pCfg->cSources    = 0;
-    pCfg->cSinks      = 0;
+    pBackendCfg->cSources    = 0;
+    pBackendCfg->cSinks      = 0;
 
     int hFile = open("/dev/dsp", O_WRONLY | O_NONBLOCK, 0);
     if (hFile == -1)
@@ -594,7 +600,7 @@ static DECLCALLBACK(int) drvHostOSSAudioGetConfig(PPDMIHOSTAUDIO pInterface, PPD
 
     int ossVer = -1;
 
-#ifdef VBOX_WITH_OSS_SYSINFO
+#ifdef VBOX_WITH_AUDIO_OSS_SYSINFO
     oss_sysinfo ossInfo;
     RT_ZERO(ossInfo);
 #endif
@@ -605,7 +611,7 @@ static DECLCALLBACK(int) drvHostOSSAudioGetConfig(PPDMIHOSTAUDIO pInterface, PPD
         if (err == 0)
         {
             LogRel2(("OSS: Using version: %d\n", ossVer));
-#ifdef VBOX_WITH_OSS_SYSINFO
+#ifdef VBOX_WITH_AUDIO_OSS_SYSINFO
             err = ioctl(hFile, OSS_SYSINFO, &ossInfo);
             if (err == 0)
             {
@@ -616,23 +622,23 @@ static DECLCALLBACK(int) drvHostOSSAudioGetConfig(PPDMIHOSTAUDIO pInterface, PPD
                 if (!cDev)
                     cDev = ossInfo.numaudios;
 
-                pCfg->cSources        = cDev;
-                pCfg->cSinks          = cDev;
+                pBackendCfg->cSources        = cDev;
+                pBackendCfg->cSinks          = cDev;
 
-                pCfg->cMaxStreamsIn   = UINT32_MAX;
-                pCfg->cMaxStreamsOut  = UINT32_MAX;
+                pBackendCfg->cMaxStreamsIn   = UINT32_MAX;
+                pBackendCfg->cMaxStreamsOut  = UINT32_MAX;
             }
             else
             {
 #endif
                 /* Since we cannot query anything, assume that we have at least
                  * one input and one output if we found "/dev/dsp" or "/dev/mixer". */
-                pCfg->cSources        = 1;
-                pCfg->cSinks          = 1;
+                pBackendCfg->cSources        = 1;
+                pBackendCfg->cSinks          = 1;
 
-                pCfg->cMaxStreamsIn   = UINT32_MAX;
-                pCfg->cMaxStreamsOut  = UINT32_MAX;
-#ifdef VBOX_WITH_OSS_SYSINFO
+                pBackendCfg->cMaxStreamsIn   = UINT32_MAX;
+                pBackendCfg->cMaxStreamsOut  = UINT32_MAX;
+#ifdef VBOX_WITH_AUDIO_OSS_SYSINFO
             }
 #endif
         }
@@ -645,14 +651,9 @@ static DECLCALLBACK(int) drvHostOSSAudioGetConfig(PPDMIHOSTAUDIO pInterface, PPD
     return VINF_SUCCESS;
 }
 
-static int ossCreateStreamIn(PPDMIHOSTAUDIO pInterface,
-                             PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfg, uint32_t *pcSamples)
-{
-    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
-    AssertPtrReturn(pStream, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg,       VERR_INVALID_POINTER);
 
-    PDRVHOSTOSSAUDIO  pThis = PDMIHOSTAUDIO_2_DRVHOSTOSSAUDIO(pInterface);
+static int ossCreateStreamIn(PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
+{
     POSSAUDIOSTREAMIN pStrm = (POSSAUDIOSTREAMIN)pStream;
 
     int rc;
@@ -663,56 +664,54 @@ static int ossCreateStreamIn(PPDMIHOSTAUDIO pInterface,
         uint32_t cSamples;
 
         OSSAUDIOSTREAMCFG reqStream, obtStream;
-        reqStream.enmFormat      = pCfg->enmFormat;
-        reqStream.uFreq          = pCfg->uHz;
-        reqStream.cChannels      = pCfg->cChannels;
+        reqStream.enmFormat      = pCfgReq->enmFormat;
+        reqStream.uFreq          = pCfgReq->uHz;
+        reqStream.cChannels      = pCfgReq->cChannels;
         reqStream.cFragments     = s_OSSConf.nfrags;
         reqStream.cbFragmentSize = s_OSSConf.fragsize;
 
         rc = ossStreamOpen(s_OSSConf.devpath_in, O_RDONLY | O_NONBLOCK, &reqStream, &obtStream, &hFile);
         if (RT_SUCCESS(rc))
         {
-            if (obtStream.cFragments * obtStream.cbFragmentSize & pStream->Props.uAlign)
-                LogRel(("OSS: Warning: Misaligned capturing buffer: Size = %zu, Alignment = %u\n",
-                        obtStream.cFragments * obtStream.cbFragmentSize,
-                        pStream->Props.uAlign + 1));
-
-            PDMAUDIOSTREAMCFG streamCfg;
-            streamCfg.enmFormat     = obtStream.enmFormat;
-            streamCfg.uHz           = obtStream.uFreq;
-            streamCfg.cChannels     = pCfg->cChannels;
-            streamCfg.enmEndianness = obtStream.enmENDIANNESS;
-
-            rc = DrvAudioHlpStreamCfgToProps(&streamCfg, &pStream->Props);
+            pCfgAcq->enmFormat     = obtStream.enmFormat;
+            pCfgAcq->uHz           = obtStream.uFreq;
+            pCfgAcq->cChannels     = pCfgReq->cChannels; /** @todo r=andy Why not using obtStream? */
+            pCfgAcq->enmEndianness = obtStream.enmENDIANNESS;
+
+            rc = DrvAudioHlpStreamCfgToProps(pCfgAcq, &pStrm->Props);
             if (RT_SUCCESS(rc))
             {
-                cSamples = (obtStream.cFragments * obtStream.cbFragmentSize)
-                           >> pStream->Props.cShift;
+                if (obtStream.cFragments * obtStream.cbFragmentSize & pStrm->Props.uAlign)
+                {
+                    LogRel(("OSS: Warning: Misaligned capturing buffer: Size = %zu, Alignment = %u\n",
+                            obtStream.cFragments * obtStream.cbFragmentSize, pStrm->Props.uAlign + 1));
+                }
+
+                cSamples = (obtStream.cFragments * obtStream.cbFragmentSize) >> pStrm->Props.cShift;
                 if (!cSamples)
                     rc = VERR_INVALID_PARAMETER;
             }
-        }
 
-        if (RT_SUCCESS(rc))
-        {
-            size_t cbSample = (1 << pStream->Props.cShift);
-
-            size_t cbBuf = cSamples * cbSample;
-            void  *pvBuf = RTMemAlloc(cbBuf);
-            if (!pvBuf)
+            if (RT_SUCCESS(rc))
             {
-                LogRel(("OSS: Failed allocating capturing buffer with %RU32 samples (%zu bytes per sample)\n",
-                        cSamples, cbSample));
-                rc = VERR_NO_MEMORY;
-                break;
-            }
+                size_t cbSample = (1 << pStrm->Props.cShift);
+
+                size_t cbBuf = cSamples * cbSample;
+                void  *pvBuf = RTMemAlloc(cbBuf);
+                if (!pvBuf)
+                {
+                    LogRel(("OSS: Failed allocating capturing buffer with %RU32 samples (%zu bytes per sample)\n",
+                            cSamples, cbSample));
+                    rc = VERR_NO_MEMORY;
+                    break;
+                }
 
-            pStrm->hFile = hFile;
-            pStrm->pvBuf = pvBuf;
-            pStrm->cbBuf = cbBuf;
+                pStrm->hFile = hFile;
+                pStrm->pvBuf = pvBuf;
+                pStrm->cbBuf = cbBuf;
 
-            if (pcSamples)
-                *pcSamples = cSamples;
+                pCfgAcq->cSampleBufferSize = cSamples;
+            }
         }
 
     } while (0);
@@ -724,15 +723,9 @@ static int ossCreateStreamIn(PPDMIHOSTAUDIO pInterface,
     return rc;
 }
 
-static int ossCreateStreamOut(PPDMIHOSTAUDIO pInterface,
-                              PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfg,
-                              uint32_t *pcSamples)
-{
-    AssertPtrReturn(pInterface,  VERR_INVALID_POINTER);
-    AssertPtrReturn(pStream, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg,        VERR_INVALID_POINTER);
 
-    PDRVHOSTOSSAUDIO   pThis = PDMIHOSTAUDIO_2_DRVHOSTOSSAUDIO(pInterface);
+static int ossCreateStreamOut(PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
+{
     POSSAUDIOSTREAMOUT pStrm = (POSSAUDIOSTREAMOUT)pStream;
 
     int rc;
@@ -743,37 +736,38 @@ static int ossCreateStreamOut(PPDMIHOSTAUDIO pInterface,
         uint32_t cSamples;
 
         OSSAUDIOSTREAMCFG reqStream, obtStream;
-        reqStream.enmFormat      = pCfg->enmFormat;
-        reqStream.uFreq          = pCfg->uHz;
-        reqStream.cChannels      = pCfg->cChannels;
+        reqStream.enmFormat      = pCfgReq->enmFormat;
+        reqStream.uFreq          = pCfgReq->uHz;
+        reqStream.cChannels      = pCfgReq->cChannels;
         reqStream.cFragments     = s_OSSConf.nfrags;
         reqStream.cbFragmentSize = s_OSSConf.fragsize;
 
         rc = ossStreamOpen(s_OSSConf.devpath_out, O_WRONLY | O_NONBLOCK, &reqStream, &obtStream, &hFile);
         if (RT_SUCCESS(rc))
         {
-            if (obtStream.cFragments * obtStream.cbFragmentSize & pStream->Props.uAlign)
-                LogRel(("OSS: Warning: Misaligned playback buffer: Size = %zu, Alignment = %u\n",
-                        obtStream.cFragments * obtStream.cbFragmentSize,
-                        pStream->Props.uAlign + 1));
-
-            PDMAUDIOSTREAMCFG streamCfg;
-            streamCfg.enmFormat     = obtStream.enmFormat;
-            streamCfg.uHz           = obtStream.uFreq;
-            streamCfg.cChannels     = pCfg->cChannels;
-            streamCfg.enmEndianness = obtStream.enmENDIANNESS;
-
-            rc = DrvAudioHlpStreamCfgToProps(&streamCfg, &pStream->Props);
+            pCfgAcq->enmFormat     = obtStream.enmFormat;
+            pCfgAcq->uHz           = obtStream.uFreq;
+            pCfgAcq->cChannels     = pCfgReq->cChannels; /** @todo r=andy Why not using obtStream? */
+            pCfgAcq->enmEndianness = obtStream.enmENDIANNESS;
+
+            rc = DrvAudioHlpStreamCfgToProps(pCfgAcq, &pStrm->Props);
             if (RT_SUCCESS(rc))
-                cSamples = (obtStream.cFragments * obtStream.cbFragmentSize)
-                           >> pStream->Props.cShift;
+            {
+                cSamples = (obtStream.cFragments * obtStream.cbFragmentSize) >> pStrm->Props.cShift;
+
+                if (obtStream.cFragments * obtStream.cbFragmentSize & pStrm->Props.uAlign)
+                {
+                    LogRel(("OSS: Warning: Misaligned playback buffer: Size = %zu, Alignment = %u\n",
+                            obtStream.cFragments * obtStream.cbFragmentSize, pStrm->Props.uAlign + 1));
+                }
+            }
         }
 
         if (RT_SUCCESS(rc))
         {
             pStrm->fMemMapped = false;
 
-            size_t cbSamples =  cSamples << pStream->Props.cShift;
+            size_t cbSamples =  cSamples << pStrm->Props.cShift;
             Assert(cbSamples);
 
 #ifndef RT_OS_L4
@@ -838,8 +832,7 @@ static int ossCreateStreamOut(PPDMIHOSTAUDIO pInterface,
 #ifndef RT_OS_L4
             }
 #endif
-            if (pcSamples)
-                *pcSamples = cSamples;
+            pCfgAcq->cSampleBufferSize = cSamples;
         }
 
     } while (0);
@@ -851,17 +844,13 @@ static int ossCreateStreamOut(PPDMIHOSTAUDIO pInterface,
     return rc;
 }
 
-static DECLCALLBACK(bool) drvHostOSSAudioIsEnabled(PPDMIHOSTAUDIO pInterface, PDMAUDIODIR enmDir)
-{
-    NOREF(pInterface);
-    NOREF(enmDir);
-    return true; /* Always all enabled. */
-}
 
-static DECLCALLBACK(int) drvHostOSSAudioStreamPlay(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream,
-                                                   uint32_t *pcSamplesPlayed)
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamPlay}
+ */
+static DECLCALLBACK(int) drvHostOSSAudioStreamPlay(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream, const void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten)
 {
-    NOREF(pInterface);
+    RT_NOREF(pInterface, cbBuf, pvBuf);
     AssertPtrReturn(pStream, VERR_INVALID_POINTER);
 
     POSSAUDIOSTREAMOUT pStrm = (POSSAUDIOSTREAMOUT)pStream;
@@ -872,7 +861,7 @@ static DECLCALLBACK(int) drvHostOSSAudioStreamPlay(PPDMIHOSTAUDIO pInterface, PP
 
     do
     {
-        size_t cbBuf = AudioMixBufSizeBytes(&pStream->MixBuf);
+        size_t cbBufSize = AudioMixBufSizeBytes(&pStream->MixBuf);
 
         uint32_t cLive = AudioMixBufLive(&pStream->MixBuf);
         uint32_t cToRead;
@@ -898,7 +887,7 @@ static DECLCALLBACK(int) drvHostOSSAudioStreamPlay(PPDMIHOSTAUDIO pInterface, PP
             if (cntinfo.ptr > pStrm->old_optr)
                 cbData = cntinfo.ptr - pStrm->old_optr;
             else
-                cbData = cbBuf + cntinfo.ptr - pStrm->old_optr;
+                cbData = cbBufSize + cntinfo.ptr - pStrm->old_optr;
             Assert(cbData);
 
             cToRead = RT_MIN((uint32_t)AUDIOMIXBUF_B2S(&pStream->MixBuf, cbData),
@@ -916,16 +905,16 @@ static DECLCALLBACK(int) drvHostOSSAudioStreamPlay(PPDMIHOSTAUDIO pInterface, PP
                 break;
             }
 
-            if ((size_t)abinfo.bytes > cbBuf)
+            if ((size_t)abinfo.bytes > cbBufSize)
             {
-                LogFlowFunc(("Warning: Invalid available size, size=%d, bufsize=%zu\n", abinfo.bytes, cbBuf));
-                abinfo.bytes = cbBuf;
+                LogFlowFunc(("Warning: Invalid available size, size=%d, bufsize=%zu\n", abinfo.bytes, cbBufSize));
+                abinfo.bytes = cbBufSize;
                 /* Keep going. */
             }
 
             if (abinfo.bytes < 0)
             {
-                LogFlowFunc(("Warning: Invalid available size, size=%d, bufsize=%zu\n", abinfo.bytes, cbBuf));
+                LogFlowFunc(("Warning: Invalid available size, size=%d, bufsize=%zu\n", abinfo.bytes, cbBufSize));
                 rc = VERR_INVALID_PARAMETER;
                 break;
             }
@@ -974,8 +963,8 @@ static DECLCALLBACK(int) drvHostOSSAudioStreamPlay(PPDMIHOSTAUDIO pInterface, PP
         if (cReadTotal)
             AudioMixBufFinish(&pStream->MixBuf, cReadTotal);
 
-        if (pcSamplesPlayed)
-            *pcSamplesPlayed = cReadTotal;
+        if (pcbWritten)
+            *pcbWritten = cReadTotal;
 
         LogFlowFunc(("cReadTotal=%RU32 (%RU32 bytes), rc=%Rrc\n", cReadTotal, cbReadTotal, rc));
     }
@@ -984,35 +973,51 @@ static DECLCALLBACK(int) drvHostOSSAudioStreamPlay(PPDMIHOSTAUDIO pInterface, PP
     return rc;
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnShutdown}
+ */
 static DECLCALLBACK(void) drvHostOSSAudioShutdown(PPDMIHOSTAUDIO pInterface)
 {
-    NOREF(pInterface);
+    RT_NOREF(pInterface);
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnGetStatus}
+ */
 static DECLCALLBACK(PDMAUDIOBACKENDSTS) drvHostOSSAudioGetStatus(PPDMIHOSTAUDIO pInterface, PDMAUDIODIR enmDir)
 {
     AssertPtrReturn(pInterface, PDMAUDIOBACKENDSTS_UNKNOWN);
+    RT_NOREF(enmDir);
 
     return PDMAUDIOBACKENDSTS_RUNNING;
 }
 
-static DECLCALLBACK(int) drvHostOSSAudioStreamCreate(PPDMIHOSTAUDIO pInterface,
-                                                     PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfg, uint32_t *pcSamples)
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamCreate}
+ */
+static DECLCALLBACK(int) drvHostOSSAudioStreamCreate(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
     AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg,       VERR_INVALID_POINTER);
+    AssertPtrReturn(pCfgReq,    VERR_INVALID_POINTER);
+    AssertPtrReturn(pCfgAcq,    VERR_INVALID_POINTER);
 
     int rc;
-    if (pCfg->enmDir == PDMAUDIODIR_IN)
-        rc = ossCreateStreamIn(pInterface,  pStream, pCfg, pcSamples);
+    if (pCfgReq->enmDir == PDMAUDIODIR_IN)
+        rc = ossCreateStreamIn(pStream, pCfgReq, pCfgAcq);
     else
-        rc = ossCreateStreamOut(pInterface, pStream, pCfg, pcSamples);
+        rc = ossCreateStreamOut(pStream, pCfgReq, pCfgAcq);
 
-    LogFlowFunc(("%s: rc=%Rrc\n", pStream->szName, rc));
     return rc;
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamDestroy}
+ */
 static DECLCALLBACK(int) drvHostOSSAudioStreamDestroy(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
@@ -1020,15 +1025,18 @@ static DECLCALLBACK(int) drvHostOSSAudioStreamDestroy(PPDMIHOSTAUDIO pInterface,
 
     int rc;
     if (pStream->enmDir == PDMAUDIODIR_IN)
-        rc = ossDestroyStreamIn(pInterface,  pStream);
+        rc = ossDestroyStreamIn(pStream);
     else
-        rc = ossDestroyStreamOut(pInterface, pStream);
+        rc = ossDestroyStreamOut(pStream);
 
     return rc;
 }
 
-static DECLCALLBACK(int) drvHostOSSAudioStreamControl(PPDMIHOSTAUDIO pInterface,
-                                                      PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamControl}
+ */
+static DECLCALLBACK(int) drvHostOSSAudioStreamControl(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
     AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
@@ -1037,13 +1045,17 @@ static DECLCALLBACK(int) drvHostOSSAudioStreamControl(PPDMIHOSTAUDIO pInterface,
 
     int rc;
     if (pStream->enmDir == PDMAUDIODIR_IN)
-        rc = ossControlStreamIn(pInterface,  pStream, enmStreamCmd);
+        rc = ossControlStreamIn(/*pInterface,  pStream, enmStreamCmd*/);
     else
-        rc = ossControlStreamOut(pInterface, pStream, enmStreamCmd);
+        rc = ossControlStreamOut(pStream, enmStreamCmd);
 
     return rc;
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamIterate}
+ */
 static DECLCALLBACK(int) drvHostOSSAudioStreamIterate(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
@@ -1055,10 +1067,14 @@ static DECLCALLBACK(int) drvHostOSSAudioStreamIterate(PPDMIHOSTAUDIO pInterface,
     return VINF_SUCCESS;
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetStatus}
+ */
 static DECLCALLBACK(PDMAUDIOSTRMSTS) drvHostOSSAudioStreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
 {
-    NOREF(pInterface);
-    NOREF(pStream);
+    RT_NOREF(pInterface);
+    RT_NOREF(pStream);
 
     PDMAUDIOSTRMSTS strmSts =   PDMAUDIOSTRMSTS_FLAG_INITIALIZED
                               | PDMAUDIOSTRMSTS_FLAG_ENABLED;
@@ -1069,13 +1085,15 @@ static DECLCALLBACK(PDMAUDIOSTRMSTS) drvHostOSSAudioStreamGetStatus(PPDMIHOSTAUD
 
     return strmSts;
 }
+
 /**
  * @interface_method_impl{PDMIBASE,pfnQueryInterface}
  */
 static DECLCALLBACK(void *) drvHostOSSAudioQueryInterface(PPDMIBASE pInterface, const char *pszIID)
 {
-    PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
-    PDRVHOSTOSSAUDIO  pThis   = PDMINS_2_DATA(pDrvIns, PDRVHOSTOSSAUDIO);
+    PPDMDRVINS       pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
+    PDRVHOSTOSSAUDIO pThis   = PDMINS_2_DATA(pDrvIns, PDRVHOSTOSSAUDIO);
+
     PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase);
     PDMIBASE_RETURN_INTERFACE(pszIID, PDMIHOSTAUDIO, &pThis->IHostAudio);
 
@@ -1089,6 +1107,8 @@ static DECLCALLBACK(void *) drvHostOSSAudioQueryInterface(PPDMIBASE pInterface,
  */
 static DECLCALLBACK(int) drvHostOSSAudioConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
+    RT_NOREF(pCfg, fFlags);
+    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
     PDRVHOSTOSSAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTOSSAUDIO);
     LogRel(("Audio: Initializing OSS driver\n"));
 
diff --git a/src/VBox/Devices/Audio/DrvHostPulseAudio.cpp b/src/VBox/Devices/Audio/DrvHostPulseAudio.cpp
index c495ec9..ff32521 100644
--- a/src/VBox/Devices/Audio/DrvHostPulseAudio.cpp
+++ b/src/VBox/Devices/Audio/DrvHostPulseAudio.cpp
@@ -15,6 +15,7 @@
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
@@ -40,6 +41,7 @@ RT_C_DECLS_END
 
 #include "VBoxDD.h"
 
+
 /*********************************************************************************************************************************
 *   Defines                                                                                                                      *
 *********************************************************************************************************************************/
@@ -62,6 +64,7 @@ RT_C_DECLS_END
 #define PDMIHOSTAUDIO_2_DRVHOSTPULSEAUDIO(pInterface) \
     ( (PDRVHOSTPULSEAUDIO)((uintptr_t)pInterface - RT_OFFSETOF(DRVHOSTPULSEAUDIO, IHostAudio)) )
 
+
 /*********************************************************************************************************************************
 *   Structures                                                                                                                   *
 *********************************************************************************************************************************/
@@ -154,6 +157,7 @@ typedef struct PULSEAUDIOENUMCBCTX
     char               *pszDefaultSource;
 } PULSEAUDIOENUMCBCTX, *PPULSEAUDIOENUMCBCTX;
 
+
 /*********************************************************************************************************************************
 *   Prototypes                                                                                                                   *
 *********************************************************************************************************************************/
@@ -162,6 +166,8 @@ static int  paEnumerate(PDRVHOSTPULSEAUDIO pThis, PPDMAUDIOBACKENDCFG pCfg, uint
 static int  paError(PDRVHOSTPULSEAUDIO pThis, const char *szMsg);
 static void paStreamCbSuccess(pa_stream *pStream, int fSuccess, void *pvContext);
 
+
+
 /**
  * Signal the main loop to abort. Just signalling isn't sufficient as the
  * mainloop might not have been entered yet.
@@ -175,6 +181,7 @@ static void paSignalWaiter(PDRVHOSTPULSEAUDIO pThis)
     pa_threaded_mainloop_signal(pThis->pMainLoop, 0);
 }
 
+
 static pa_sample_format_t paFmtToPulse(PDMAUDIOFMT fmt)
 {
     switch (fmt)
@@ -197,6 +204,7 @@ static pa_sample_format_t paFmtToPulse(PDMAUDIOFMT fmt)
     return PA_SAMPLE_U8;
 }
 
+
 static int paPulseToFmt(pa_sample_format_t pulsefmt,
                         PDMAUDIOFMT *pFmt, PDMAUDIOENDIANNESS *pEndianness)
 {
@@ -239,6 +247,7 @@ static int paPulseToFmt(pa_sample_format_t pulsefmt,
     return VINF_SUCCESS;
 }
 
+
 /**
  * Synchronously wait until an operation completed.
  */
@@ -272,11 +281,13 @@ static int paWaitForEx(PDRVHOSTPULSEAUDIO pThis, pa_operation *pOP, RTMSINTERVAL
     return rc;
 }
 
+
 static int paWaitFor(PDRVHOSTPULSEAUDIO pThis, pa_operation *pOP)
 {
     return paWaitForEx(pThis, pOP, 10 * 1000 /* 10s timeout */);
 }
 
+
 /**
  * Context status changed.
  */
@@ -304,6 +315,7 @@ static void paContextCbStateChanged(pa_context *pCtx, void *pvUser)
     }
 }
 
+
 /**
  * Callback called when our pa_stream_drain operation was completed.
  */
@@ -330,6 +342,7 @@ static void paStreamCbDrain(pa_stream *pStream, int fSuccess, void *pvUser)
     }
 }
 
+
 /**
  * Stream status changed.
  */
@@ -353,6 +366,7 @@ static void paStreamCbStateChanged(pa_stream *pStream, void *pvUser)
     }
 }
 
+
 static void paStreamCbSuccess(pa_stream *pStream, int fSuccess, void *pvUser)
 {
     AssertPtrReturnVoid(pStream);
@@ -368,6 +382,7 @@ static void paStreamCbSuccess(pa_stream *pStream, int fSuccess, void *pvUser)
         paError(pStrm->pDrv, "Failed to finish stream operation");
 }
 
+
 static int paStreamOpen(PDRVHOSTPULSEAUDIO pThis, bool fIn, const char *pszName,
                         pa_sample_spec *pSampleSpec, pa_buffer_attr *pBufAttr,
                         pa_stream **ppStream)
@@ -503,6 +518,10 @@ static int paStreamOpen(PDRVHOSTPULSEAUDIO pThis, bool fIn, const char *pszName,
     return rc;
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnInit}
+ */
 static DECLCALLBACK(int) drvHostPulseAudioInit(PPDMIHOSTAUDIO pInterface)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
@@ -611,14 +630,10 @@ static DECLCALLBACK(int) drvHostPulseAudioInit(PPDMIHOSTAUDIO pInterface)
     return rc;
 }
 
+
 static int paCreateStreamOut(PPDMIHOSTAUDIO pInterface,
-                             PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfg, uint32_t *pcSamples)
+                             PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
 {
-    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
-    AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg,       VERR_INVALID_POINTER);
-    /* pcSamples is optional. */
-
     PDRVHOSTPULSEAUDIO pThis = PDMIHOSTAUDIO_2_DRVHOSTPULSEAUDIO(pInterface);
     PPULSEAUDIOSTREAM  pStrm = (PPULSEAUDIOSTREAM)pStream;
 
@@ -626,9 +641,9 @@ static int paCreateStreamOut(PPDMIHOSTAUDIO pInterface,
 
     pStrm->pDrainOp            = NULL;
 
-    pStrm->SampleSpec.format   = paFmtToPulse(pCfg->enmFormat);
-    pStrm->SampleSpec.rate     = pCfg->uHz;
-    pStrm->SampleSpec.channels = pCfg->cChannels;
+    pStrm->SampleSpec.format   = paFmtToPulse(pCfgReq->enmFormat);
+    pStrm->SampleSpec.rate     = pCfgReq->uHz;
+    pStrm->SampleSpec.channels = pCfgReq->cChannels;
 
     /* Note that setting maxlength to -1 does not work on PulseAudio servers
      * older than 0.9.10. So use the suggested value of 3/2 of tlength */
@@ -643,19 +658,19 @@ static int paCreateStreamOut(PPDMIHOSTAUDIO pInterface,
     if (RT_FAILURE(rc))
         return rc;
 
-    PDMAUDIOSTREAMCFG streamCfg;
     rc = paPulseToFmt(pStrm->SampleSpec.format,
-                      &streamCfg.enmFormat, &streamCfg.enmEndianness);
+                      &pCfgAcq->enmFormat, &pCfgAcq->enmEndianness);
     if (RT_FAILURE(rc))
     {
         LogRel(("PulseAudio: Cannot find audio output format %ld\n", pStrm->SampleSpec.format));
         return rc;
     }
 
-    streamCfg.uHz       = pStrm->SampleSpec.rate;
-    streamCfg.cChannels = pStrm->SampleSpec.channels;
+    pCfgAcq->uHz       = pStrm->SampleSpec.rate;
+    pCfgAcq->cChannels = pStrm->SampleSpec.channels;
 
-    rc = DrvAudioHlpStreamCfgToProps(&streamCfg, &pStream->Props);
+    PDMAUDIOPCMPROPS Props;
+    rc = DrvAudioHlpStreamCfgToProps(pCfgAcq, &Props);
     if (RT_SUCCESS(rc))
     {
         uint32_t cbBuf  = RT_MIN(pStrm->BufAttr.tlength * 2,
@@ -666,15 +681,9 @@ static int paCreateStreamOut(PPDMIHOSTAUDIO pInterface,
             if (pStrm->pvPCMBuf)
             {
                 pStrm->cbPCMBuf = cbBuf;
+                pStrm->pDrv     = pThis;
 
-                uint32_t cSamples = cbBuf >> pStream->Props.cShift;
-                if (pcSamples)
-                    *pcSamples = cSamples;
-
-                /* Save pointer to driver instance. */
-                pStrm->pDrv = pThis;
-
-                LogFunc(("cbBuf=%RU32, cSamples=%RU32\n", cbBuf, cSamples));
+                pCfgAcq->cSampleBufferSize = cbBuf >> Props.cShift;
             }
             else
                 rc = VERR_NO_MEMORY;
@@ -687,71 +696,61 @@ static int paCreateStreamOut(PPDMIHOSTAUDIO pInterface,
     return rc;
 }
 
+
 static int paCreateStreamIn(PPDMIHOSTAUDIO pInterface,
-                            PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfg, uint32_t *pcSamples)
+                            PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
 {
-    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
-    AssertPtrReturn(pStream, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg,       VERR_INVALID_POINTER);
-    /* pcSamples is optional. */
+    PDRVHOSTPULSEAUDIO pThis   = PDMIHOSTAUDIO_2_DRVHOSTPULSEAUDIO(pInterface);
+    PPULSEAUDIOSTREAM  pPAStrm = (PPULSEAUDIOSTREAM)pStream;
 
-    PDRVHOSTPULSEAUDIO pThis = PDMIHOSTAUDIO_2_DRVHOSTPULSEAUDIO(pInterface);
-    PPULSEAUDIOSTREAM  pStrm = (PPULSEAUDIOSTREAM)pStream;
+    pPAStrm->SampleSpec.format   = paFmtToPulse(pCfgReq->enmFormat);
+    pPAStrm->SampleSpec.rate     = pCfgReq->uHz;
+    pPAStrm->SampleSpec.channels = pCfgReq->cChannels;
 
-    pStrm->SampleSpec.format   = paFmtToPulse(pCfg->enmFormat);
-    pStrm->SampleSpec.rate     = pCfg->uHz;
-    pStrm->SampleSpec.channels = pCfg->cChannels;
-
-    /* XXX check these values */
-    pStrm->BufAttr.fragsize    = (pa_bytes_per_second(&pStrm->SampleSpec)
-                                   * s_pulseCfg.buffer_msecs_in) / 1000;
-    pStrm->BufAttr.maxlength   = (pStrm->BufAttr.fragsize * 3) / 2;
+    /** @todo Check these values! */
+    pPAStrm->BufAttr.fragsize    = (pa_bytes_per_second(&pPAStrm->SampleSpec) * s_pulseCfg.buffer_msecs_in) / 1000;
+    pPAStrm->BufAttr.maxlength   = (pPAStrm->BufAttr.fragsize * 3) / 2;
 
     /* Note: Other members of BufAttr are ignored for record streams. */
-    int rc = paStreamOpen(pThis, true /* fIn */, "PulseAudio (In)", &pStrm->SampleSpec, &pStrm->BufAttr,
-                          &pStrm->pPAStream);
+    int rc = paStreamOpen(pThis, true /* fIn */, "PulseAudio (In)", &pPAStrm->SampleSpec, &pPAStrm->BufAttr,
+                          &pPAStrm->pPAStream);
     if (RT_FAILURE(rc))
         return rc;
 
-    PDMAUDIOSTREAMCFG streamCfg;
-    rc = paPulseToFmt(pStrm->SampleSpec.format, &streamCfg.enmFormat,
-                      &streamCfg.enmEndianness);
+    rc = paPulseToFmt(pPAStrm->SampleSpec.format, &pCfgAcq->enmFormat,
+                      &pCfgAcq->enmEndianness);
     if (RT_FAILURE(rc))
     {
-        LogRel(("PulseAudio: Cannot find audio capture format %ld\n", pStrm->SampleSpec.format));
+        LogRel(("PulseAudio: Cannot find audio capture format %ld\n", pPAStrm->SampleSpec.format));
         return rc;
     }
 
-    streamCfg.uHz       = pStrm->SampleSpec.rate;
-    streamCfg.cChannels = pStrm->SampleSpec.channels;
-
-    rc = DrvAudioHlpStreamCfgToProps(&streamCfg, &pStream->Props);
+    PDMAUDIOPCMPROPS Props;
+    rc = DrvAudioHlpStreamCfgToProps(pCfgAcq, &Props);
     if (RT_SUCCESS(rc))
     {
-        uint32_t cSamples = RT_MIN(pStrm->BufAttr.fragsize * 10, pStrm->BufAttr.maxlength)
-                            >> pStream->Props.cShift;
+        pPAStrm->pDrv       = pThis;
+        pPAStrm->pu8PeekBuf = NULL;
 
-        LogFunc(("uHz=%RU32, cChannels=%RU8, cShift=%RU8, cSamples=%RU32\n",
-                 pStream->Props.uHz, pStream->Props.cChannels, pStream->Props.cShift, cSamples));
-
-        /* Save pointer to driver instance. */
-        pStrm->pDrv       = pThis;
-        pStrm->pu8PeekBuf = NULL;
-
-        if (pcSamples)
-            *pcSamples = cSamples;
+        pCfgAcq->uHz               = pPAStrm->SampleSpec.rate;
+        pCfgAcq->cChannels         = pPAStrm->SampleSpec.channels;
+        pCfgAcq->cSampleBufferSize = RT_MIN(pPAStrm->BufAttr.fragsize * 10, pPAStrm->BufAttr.maxlength) >> Props.cShift;
     }
 
     LogFlowFuncLeaveRC(rc);
     return rc;
 }
 
-static DECLCALLBACK(int) drvHostPulseAudioStreamCapture(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream,
-                                                        uint32_t *pcSamplesCaptured)
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamCapture}
+ */
+static DECLCALLBACK(int) drvHostPulseAudioStreamCapture(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead)
 {
+    RT_NOREF(pvBuf, cbBuf);
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
     AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
-    /* pcSamplesPlayed is optional. */
+    /* pcbRead is optional. */
 
     PDRVHOSTPULSEAUDIO pThis = PDMIHOSTAUDIO_2_DRVHOSTPULSEAUDIO(pInterface);
     PPULSEAUDIOSTREAM  pStrm = (PPULSEAUDIOSTREAM)pStream;
@@ -775,8 +774,8 @@ static DECLCALLBACK(int) drvHostPulseAudioStreamCapture(PPDMIHOSTAUDIO pInterfac
 
     if (!cbAvail) /* No data? Bail out. */
     {
-        if (pcSamplesCaptured)
-            *pcSamplesCaptured = 0;
+        if (pcbRead)
+            *pcbRead = 0;
         return VINF_SUCCESS;
     }
 
@@ -787,7 +786,6 @@ static DECLCALLBACK(int) drvHostPulseAudioStreamCapture(PPDMIHOSTAUDIO pInterfac
     LogFlowFunc(("cbToRead=%zu, cbAvail=%zu, offPeekBuf=%zu, cbPeekBuf=%zu\n",
                  cbToRead, cbAvail, pStrm->offPeekBuf, pStrm->cbPeekBuf));
 
-    size_t   offWrite      = 0;
     uint32_t cWrittenTotal = 0;
 
     while (cbToRead)
@@ -857,9 +855,9 @@ static DECLCALLBACK(int) drvHostPulseAudioStreamCapture(PPDMIHOSTAUDIO pInterfac
       /*  if (cWrittenTotal)
             rc = AudioMixBufMixToParent(&pStream->MixBuf, cWrittenTotal,
                                         &cProcessed);*/
-
-        if (pcSamplesCaptured)
-            *pcSamplesCaptured = cWrittenTotal;
+        NOREF(cProcessed);
+        if (pcbRead)
+            *pcbRead = cWrittenTotal;
 
         LogFlowFunc(("cWrittenTotal=%RU32 (%RU32 processed), rc=%Rrc\n",
                      cWrittenTotal, cProcessed, rc));
@@ -869,12 +867,16 @@ static DECLCALLBACK(int) drvHostPulseAudioStreamCapture(PPDMIHOSTAUDIO pInterfac
     return rc;
 }
 
-static DECLCALLBACK(int) drvHostPulseAudioStreamPlay(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream,
-                                                     uint32_t *pcSamplesPlayed)
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamPlay}
+ */
+static DECLCALLBACK(int) drvHostPulseAudioStreamPlay(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream, const void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten)
 {
-    AssertPtrReturn(pInterface,  VERR_INVALID_POINTER);
-    AssertPtrReturn(pStream, VERR_INVALID_POINTER);
-    /* pcSamplesPlayed is optional. */
+    RT_NOREF(pvBuf, cbBuf);
+    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
+    AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
+    /* pcbWritten is optional. */
 
     PDRVHOSTPULSEAUDIO pThis     = PDMIHOSTAUDIO_2_DRVHOSTPULSEAUDIO(pInterface);
     PPULSEAUDIOSTREAM  pPAStream = (PPULSEAUDIOSTREAM)pStream;
@@ -886,8 +888,8 @@ static DECLCALLBACK(int) drvHostPulseAudioStreamPlay(PPDMIHOSTAUDIO pInterface,
     if (!cLive)
     {
         LogFlowFunc(("No live samples, skipping\n"));
-        if (pcSamplesPlayed)
-            *pcSamplesPlayed = 0;
+        if (pcbWritten)
+            *pcbWritten = 0;
         return VINF_SUCCESS;
     }
 
@@ -945,8 +947,8 @@ static DECLCALLBACK(int) drvHostPulseAudioStreamPlay(PPDMIHOSTAUDIO pInterface,
         if (cReadTotal)
             AudioMixBufFinish(&pStream->MixBuf, cReadTotal);
 
-        if (pcSamplesPlayed)
-            *pcSamplesPlayed = cReadTotal;
+        if (pcbWritten)
+            *pcbWritten = cReadTotal;
 
         LogFlowFunc(("cReadTotal=%RU32 (%RU32 bytes), rc=%Rrc\n", cReadTotal, cbReadTotal, rc));
     }
@@ -955,6 +957,7 @@ static DECLCALLBACK(int) drvHostPulseAudioStreamPlay(PPDMIHOSTAUDIO pInterface,
     return rc;
 }
 
+
 /** @todo Implement va handling. */
 static int paError(PDRVHOSTPULSEAUDIO pThis, const char *szMsg)
 {
@@ -971,6 +974,7 @@ static int paError(PDRVHOSTPULSEAUDIO pThis, const char *szMsg)
     return VERR_GENERAL_FAILURE;
 }
 
+
 static void paEnumSinkCb(pa_context *pCtx, const pa_sink_info *pInfo, int eol, void *pvUserData)
 {
     if (eol != 0)
@@ -991,6 +995,7 @@ static void paEnumSinkCb(pa_context *pCtx, const pa_sink_info *pInfo, int eol, v
     pa_threaded_mainloop_signal(pCbCtx->pDrv->pMainLoop, 0);
 }
 
+
 static void paEnumSourceCb(pa_context *pCtx, const pa_source_info *pInfo, int eol, void *pvUserData)
 {
     if (eol != 0)
@@ -1011,6 +1016,7 @@ static void paEnumSourceCb(pa_context *pCtx, const pa_source_info *pInfo, int eo
     pa_threaded_mainloop_signal(pCbCtx->pDrv->pMainLoop, 0);
 }
 
+
 static void paEnumServerCb(pa_context *pCtx, const pa_server_info *pInfo, void *pvUserData)
 {
     AssertPtrReturnVoid(pCtx);
@@ -1037,6 +1043,7 @@ static void paEnumServerCb(pa_context *pCtx, const pa_server_info *pInfo, void *
     pa_threaded_mainloop_signal(pThis->pMainLoop, 0);
 }
 
+
 static int paEnumerate(PDRVHOSTPULSEAUDIO pThis, PPDMAUDIOBACKENDCFG pCfg, uint32_t fEnum)
 {
     AssertPtrReturn(pThis, VERR_INVALID_POINTER);
@@ -1130,6 +1137,7 @@ static int paEnumerate(PDRVHOSTPULSEAUDIO pThis, PPDMAUDIOBACKENDCFG pCfg, uint3
     return rc;
 }
 
+
 static int paDestroyStreamIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
@@ -1155,6 +1163,7 @@ static int paDestroyStreamIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
     return VINF_SUCCESS;
 }
 
+
 static int paDestroyStreamOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
 {
     AssertPtrReturn(pInterface,  VERR_INVALID_POINTER);
@@ -1194,6 +1203,7 @@ static int paDestroyStreamOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream
     return VINF_SUCCESS;
 }
 
+
 static int paControlStreamOut(PPDMIHOSTAUDIO pInterface,
                               PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)
 {
@@ -1257,6 +1267,7 @@ static int paControlStreamOut(PPDMIHOSTAUDIO pInterface,
     return rc;
 }
 
+
 static int paControlStreamIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream,
                              PDMAUDIOSTREAMCMD enmStreamCmd)
 {
@@ -1305,6 +1316,10 @@ static int paControlStreamIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream,
     return rc;
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnShutdown}
+ */
 static DECLCALLBACK(void) drvHostPulseAudioShutdown(PPDMIHOSTAUDIO pInterface)
 {
     AssertPtrReturnVoid(pInterface);
@@ -1332,49 +1347,63 @@ static DECLCALLBACK(void) drvHostPulseAudioShutdown(PPDMIHOSTAUDIO pInterface)
     LogFlowFuncLeave();
 }
 
-static DECLCALLBACK(int) drvHostPulseAudioGetConfig(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDCFG pCfg)
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnGetConfig}
+ */
+static DECLCALLBACK(int) drvHostPulseAudioGetConfig(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDCFG pBackendCfg)
 {
-    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg,       VERR_INVALID_POINTER);
+    AssertPtrReturn(pInterface,  VERR_INVALID_POINTER);
+    AssertPtrReturn(pBackendCfg, VERR_INVALID_POINTER);
 
     PDRVHOSTPULSEAUDIO pThis = PDMIHOSTAUDIO_2_DRVHOSTPULSEAUDIO(pInterface);
 
-    return paEnumerate(pThis, pCfg, PULSEAUDIOENUMCBFLAGS_LOG /* fEnum */);
+    return paEnumerate(pThis, pBackendCfg, PULSEAUDIOENUMCBFLAGS_LOG /* fEnum */);
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnGetStatus}
+ */
 static DECLCALLBACK(PDMAUDIOBACKENDSTS) drvHostPulseAudioGetStatus(PPDMIHOSTAUDIO pInterface, PDMAUDIODIR enmDir)
 {
+    RT_NOREF(enmDir);
     AssertPtrReturn(pInterface, PDMAUDIOBACKENDSTS_UNKNOWN);
 
     return PDMAUDIOBACKENDSTS_RUNNING;
 }
 
-static DECLCALLBACK(int) drvHostPulseAudioStreamCreate(PPDMIHOSTAUDIO pInterface,
-                                                       PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfg, uint32_t *pcSamples)
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamCreate}
+ */
+static DECLCALLBACK(int) drvHostPulseAudioStreamCreate(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
     AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg,       VERR_INVALID_POINTER);
+    AssertPtrReturn(pCfgReq,    VERR_INVALID_POINTER);
+    AssertPtrReturn(pCfgAcq,    VERR_INVALID_POINTER);
 
     int rc;
-    if (pCfg->enmDir == PDMAUDIODIR_IN)
-        rc = paCreateStreamIn(pInterface,  pStream, pCfg, pcSamples);
+    if (pCfgReq->enmDir == PDMAUDIODIR_IN)
+        rc = paCreateStreamIn(pInterface,  pStream, pCfgReq, pCfgAcq);
     else if (pStream->enmDir == PDMAUDIODIR_OUT)
-        rc = paCreateStreamOut(pInterface, pStream, pCfg, pcSamples);
+        rc = paCreateStreamOut(pInterface, pStream, pCfgReq, pCfgAcq);
     else
         AssertFailedReturn(VERR_NOT_IMPLEMENTED);
 
-    LogFlowFunc(("%s: rc=%Rrc\n", pStream->szName, rc));
     return rc;
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamDestroy}
+ */
 static DECLCALLBACK(int) drvHostPulseAudioStreamDestroy(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
     AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
 
-    LogFlowFunc(("%s\n", pStream->szName));
-
     int rc;
     if (pStream->enmDir == PDMAUDIODIR_IN)
         rc = paDestroyStreamIn(pInterface,  pStream);
@@ -1383,12 +1412,14 @@ static DECLCALLBACK(int) drvHostPulseAudioStreamDestroy(PPDMIHOSTAUDIO pInterfac
     else
         AssertFailedReturn(VERR_NOT_IMPLEMENTED);
 
-    LogFlowFunc(("%s: rc=%Rrc\n", pStream->szName, rc));
     return rc;
 }
 
-static DECLCALLBACK(int) drvHostPulseAudioStreamControl(PPDMIHOSTAUDIO pInterface,
-                                                        PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamControl}
+ */
+static DECLCALLBACK(int) drvHostPulseAudioStreamControl(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
     AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
@@ -1403,10 +1434,13 @@ static DECLCALLBACK(int) drvHostPulseAudioStreamControl(PPDMIHOSTAUDIO pInterfac
     else
         AssertFailedReturn(VERR_NOT_IMPLEMENTED);
 
-    LogFlowFunc(("%s: rc=%Rrc\n", pStream->szName, rc));
     return rc;
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetStatus}
+ */
 static DECLCALLBACK(PDMAUDIOSTRMSTS) drvHostPulseAudioStreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
@@ -1420,7 +1454,7 @@ static DECLCALLBACK(PDMAUDIOSTRMSTS) drvHostPulseAudioStreamGetStatus(PPDMIHOSTA
 
     pa_threaded_mainloop_lock(pThis->pMainLoop);
 
-    pa_context_state_t ctxState = pa_context_get_state(pThis->pContext);
+    /*pa_context_state_t ctxState = pa_context_get_state(pThis->pContext); - unused */
 
     if (   pa_context_get_state(pThis->pContext) == PA_CONTEXT_READY
         && pa_stream_get_state(pStrm->pPAStream) == PA_STREAM_READY)
@@ -1444,20 +1478,22 @@ static DECLCALLBACK(PDMAUDIOSTRMSTS) drvHostPulseAudioStreamGetStatus(PPDMIHOSTA
     return strmSts;
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetConfig}
+ */
 static DECLCALLBACK(int) drvHostPulseAudioStreamIterate(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
     AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
 
-    PDRVHOSTPULSEAUDIO pThis = PDMIHOSTAUDIO_2_DRVHOSTPULSEAUDIO(pInterface);
-    PPULSEAUDIOSTREAM  pStrm = (PPULSEAUDIOSTREAM)pStream;
-
     LogFlowFuncEnter();
 
     /* Nothing to do here for PulseAudio. */
     return VINF_SUCCESS;
 }
 
+
 /**
  * @interface_method_impl{PDMIBASE,pfnQueryInterface}
  */
@@ -1474,6 +1510,19 @@ static DECLCALLBACK(void *) drvHostPulseAudioQueryInterface(PPDMIBASE pInterface
     return NULL;
 }
 
+
+/**
+ * Destructs a PulseAudio Audio driver instance.
+ *
+ * @copydoc FNPDMDRVCONSTRUCT
+ */
+static DECLCALLBACK(void) drvHostPulseAudioDestruct(PPDMDRVINS pDrvIns)
+{
+    PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns);
+    LogFlowFuncEnter();
+}
+
+
 /**
  * Constructs a PulseAudio Audio driver instance.
  *
@@ -1481,6 +1530,8 @@ static DECLCALLBACK(void *) drvHostPulseAudioQueryInterface(PPDMIBASE pInterface
  */
 static DECLCALLBACK(int) drvHostPulseAudioConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
+    RT_NOREF(pCfg, fFlags);
+    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
     AssertPtrReturn(pDrvIns, VERR_INVALID_POINTER);
 
     PDRVHOSTPULSEAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTPULSEAUDIO);
@@ -1495,19 +1546,9 @@ static DECLCALLBACK(int) drvHostPulseAudioConstruct(PPDMDRVINS pDrvIns, PCFGMNOD
     return VINF_SUCCESS;
 }
 
-/**
- * Destructs a PulseAudio Audio driver instance.
- *
- * @copydoc FNPDMDRVCONSTRUCT
- */
-static DECLCALLBACK(void) drvHostPulseAudioDestruct(PPDMDRVINS pDrvIns)
-{
-    PDRVHOSTPULSEAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTPULSEAUDIO);
-    LogFlowFuncEnter();
-}
 
 /**
- * Char driver registration record.
+ * Pulse audio driver registration record.
  */
 const PDMDRVREG g_DrvHostPulseAudio =
 {
@@ -1557,6 +1598,7 @@ const PDMDRVREG g_DrvHostPulseAudio =
     PDM_DRVREG_VERSION
 };
 
+#if 0 /* unused */
 static struct audio_option pulse_options[] =
 {
     {"DAC_MS", AUD_OPT_INT, &s_pulseCfg.buffer_msecs_out,
@@ -1564,4 +1606,5 @@ static struct audio_option pulse_options[] =
     {"ADC_MS", AUD_OPT_INT, &s_pulseCfg.buffer_msecs_in,
      "ADC period size in milliseconds", NULL, 0}
 };
+#endif
 
diff --git a/src/VBox/Devices/Audio/alsa_stubs.h b/src/VBox/Devices/Audio/alsa_stubs.h
index 889add3..6464f7a 100644
--- a/src/VBox/Devices/Audio/alsa_stubs.h
+++ b/src/VBox/Devices/Audio/alsa_stubs.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Audio/pulse_stubs.h b/src/VBox/Devices/Audio/pulse_stubs.h
index af393d3..f63980f 100644
--- a/src/VBox/Devices/Audio/pulse_stubs.h
+++ b/src/VBox/Devices/Audio/pulse_stubs.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Audio/testcase/Makefile.kmk b/src/VBox/Devices/Audio/testcase/Makefile.kmk
index 4b57e7c..54e6351 100644
--- a/src/VBox/Devices/Audio/testcase/Makefile.kmk
+++ b/src/VBox/Devices/Audio/testcase/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2014-2015 Oracle Corporation
+# Copyright (C) 2014-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Audio/testcase/tstAudioMixBuffer.cpp b/src/VBox/Devices/Audio/testcase/tstAudioMixBuffer.cpp
index 35c66d6..11859a7 100644
--- a/src/VBox/Devices/Audio/testcase/tstAudioMixBuffer.cpp
+++ b/src/VBox/Devices/Audio/testcase/tstAudioMixBuffer.cpp
@@ -50,7 +50,7 @@ static int tstSingle(RTTEST hTest)
         PDMAUDIOFMT_S16           /* Format */,
         PDMAUDIOENDIANNESS_LITTLE /* ENDIANNESS */
     };
-    PDMPCMPROPS props;
+    PDMAUDIOPCMPROPS props;
 
     int rc = DrvAudioHlpStreamCfgToProps(&config, &props);
     AssertRC(rc);
@@ -71,67 +71,67 @@ static int tstSingle(RTTEST hTest)
     /*
      * Absolute writes.
      */
-    uint32_t read  = 0, written = 0, written_abs = 0;
+    uint32_t cSamplesRead  = 0, cSamplesWritten = 0, cSamplesWrittenAbs = 0;
     int8_t  samples8 [2] = { 0x12, 0x34 };
     int16_t samples16[2] = { 0xAA, 0xBB };
     int32_t samples32[2] = { 0xCC, 0xDD };
-    int64_t samples64[2] = { 0xEE, 0xFF };
+    /* int64_t samples64[2] = { 0xEE, 0xFF }; - unused */
 
-    RTTESTI_CHECK_RC_OK(AudioMixBufWriteAt(&mb, 0, &samples8, sizeof(samples8), &written));
-    RTTESTI_CHECK(written == 0 /* Samples */);
+    RTTESTI_CHECK_RC_OK(AudioMixBufWriteAt(&mb, 0, &samples8, sizeof(samples8), &cSamplesWritten));
+    RTTESTI_CHECK(cSamplesWritten == 0 /* Samples */);
 
-    RTTESTI_CHECK_RC_OK(AudioMixBufWriteAt(&mb, 0, &samples16, sizeof(samples16), &written));
-    RTTESTI_CHECK(written == 1 /* Samples */);
+    RTTESTI_CHECK_RC_OK(AudioMixBufWriteAt(&mb, 0, &samples16, sizeof(samples16), &cSamplesWritten));
+    RTTESTI_CHECK(cSamplesWritten == 1 /* Samples */);
 
-    RTTESTI_CHECK_RC_OK(AudioMixBufWriteAt(&mb, 2, &samples32, sizeof(samples32), &written));
-    RTTESTI_CHECK(written == 2 /* Samples */);
-    written_abs = 0;
+    RTTESTI_CHECK_RC_OK(AudioMixBufWriteAt(&mb, 2, &samples32, sizeof(samples32), &cSamplesWritten));
+    RTTESTI_CHECK(cSamplesWritten == 2 /* Samples */);
+    cSamplesWrittenAbs = 0;
 
     /* Beyond buffer. */
     RTTESTI_CHECK_RC(AudioMixBufWriteAt(&mb, AudioMixBufSize(&mb) + 1, &samples16, sizeof(samples16),
-                                        &written), VINF_BUFFER_OVERFLOW);
+                                        &cSamplesWritten), VINF_BUFFER_OVERFLOW);
     /** @todo (bird): this was checking for VERR_BUFFER_OVERFLOW, which do you want
      *        the function to actually return? */
 
     /*
      * Circular writes.
      */
-    uint32_t cToWrite = AudioMixBufSize(&mb) - written_abs - 1; /* -1 as padding plus -2 samples for above. */
+    uint32_t cToWrite = AudioMixBufSize(&mb) - cSamplesWrittenAbs - 1; /* -1 as padding plus -2 samples for above. */
     for (uint32_t i = 0; i < cToWrite; i++)
     {
-        RTTESTI_CHECK_RC_OK(AudioMixBufWriteCirc(&mb, &samples16, sizeof(samples16), &written));
-        RTTESTI_CHECK(written == 1);
+        RTTESTI_CHECK_RC_OK(AudioMixBufWriteCirc(&mb, &samples16, sizeof(samples16), &cSamplesWritten));
+        RTTESTI_CHECK(cSamplesWritten == 1);
     }
     RTTESTI_CHECK(!AudioMixBufIsEmpty(&mb));
     RTTESTI_CHECK(AudioMixBufFree(&mb) == 1);
     RTTESTI_CHECK(AudioMixBufFreeBytes(&mb) == AUDIOMIXBUF_S2B(&mb, 1U));
-    RTTESTI_CHECK(AudioMixBufUsed(&mb) == cToWrite + written_abs /* + last absolute write */);
+    RTTESTI_CHECK(AudioMixBufUsed(&mb) == cToWrite + cSamplesWrittenAbs /* + last absolute write */);
 
-    RTTESTI_CHECK_RC_OK(AudioMixBufWriteCirc(&mb, &samples16, sizeof(samples16), &written));
-    RTTESTI_CHECK(written == 1);
+    RTTESTI_CHECK_RC_OK(AudioMixBufWriteCirc(&mb, &samples16, sizeof(samples16), &cSamplesWritten));
+    RTTESTI_CHECK(cSamplesWritten == 1);
     RTTESTI_CHECK(AudioMixBufFree(&mb) == 0);
-    RTTESTI_CHECK(AudioMixBufFreeBytes(&mb) == AUDIOMIXBUF_S2B(&mb, 0));
+    RTTESTI_CHECK(AudioMixBufFreeBytes(&mb) == AUDIOMIXBUF_S2B(&mb, 0U));
     RTTESTI_CHECK(AudioMixBufUsed(&mb) == cBufSize);
 
     /* Circular reads. */
-    uint32_t cToRead = AudioMixBufSize(&mb) - written_abs - 1;
+    uint32_t cToRead = AudioMixBufSize(&mb) - cSamplesWrittenAbs - 1;
     for (uint32_t i = 0; i < cToWrite; i++)
     {
-        RTTESTI_CHECK_RC_OK(AudioMixBufReadCirc(&mb, &samples16, sizeof(samples16), &read));
-        RTTESTI_CHECK(read == 1);
-        AudioMixBufFinish(&mb, read);
+        RTTESTI_CHECK_RC_OK(AudioMixBufReadCirc(&mb, &samples16, sizeof(samples16), &cSamplesRead));
+        RTTESTI_CHECK(cSamplesRead == 1);
+        AudioMixBufFinish(&mb, cSamplesRead);
     }
     RTTESTI_CHECK(!AudioMixBufIsEmpty(&mb));
-    RTTESTI_CHECK(AudioMixBufFree(&mb) == AudioMixBufSize(&mb) - written_abs - 1);
-    RTTESTI_CHECK(AudioMixBufFreeBytes(&mb) == AUDIOMIXBUF_S2B(&mb, cBufSize - written_abs - 1));
-    RTTESTI_CHECK(AudioMixBufUsed(&mb) == cBufSize - cToRead + written_abs);
+    RTTESTI_CHECK(AudioMixBufFree(&mb) == AudioMixBufSize(&mb) - cSamplesWrittenAbs - 1);
+    RTTESTI_CHECK(AudioMixBufFreeBytes(&mb) == AUDIOMIXBUF_S2B(&mb, cBufSize - cSamplesWrittenAbs - 1));
+    RTTESTI_CHECK(AudioMixBufUsed(&mb) == cBufSize - cToRead + cSamplesWrittenAbs);
 
-    RTTESTI_CHECK_RC_OK(AudioMixBufReadCirc(&mb, &samples16, sizeof(samples16), &read));
-    RTTESTI_CHECK(read == 1);
-    AudioMixBufFinish(&mb, read);
-    RTTESTI_CHECK(AudioMixBufFree(&mb) == cBufSize - written_abs);
-    RTTESTI_CHECK(AudioMixBufFreeBytes(&mb) == AUDIOMIXBUF_S2B(&mb, cBufSize - written_abs));
-    RTTESTI_CHECK(AudioMixBufUsed(&mb) == written_abs);
+    RTTESTI_CHECK_RC_OK(AudioMixBufReadCirc(&mb, &samples16, sizeof(samples16), &cSamplesRead));
+    RTTESTI_CHECK(cSamplesRead == 1);
+    AudioMixBufFinish(&mb, cSamplesRead);
+    RTTESTI_CHECK(AudioMixBufFree(&mb) == cBufSize - cSamplesWrittenAbs);
+    RTTESTI_CHECK(AudioMixBufFreeBytes(&mb) == AUDIOMIXBUF_S2B(&mb, cBufSize - cSamplesWrittenAbs));
+    RTTESTI_CHECK(AudioMixBufUsed(&mb) == cSamplesWrittenAbs);
 
     AudioMixBufDestroy(&mb);
 
@@ -153,8 +153,8 @@ static int tstParentChild(RTTEST hTest)
         PDMAUDIOFMT_S16           /* Format */,
         PDMAUDIOENDIANNESS_LITTLE /* ENDIANNESS */
     };
-    PDMPCMPROPS props;
 
+    PDMAUDIOPCMPROPS props;
     int rc = DrvAudioHlpStreamCfgToProps(&cfg_p, &props);
     AssertRC(rc);
 
@@ -203,16 +203,9 @@ static int tstParentChild(RTTEST hTest)
     uint32_t cbBuf = _1K;
     char pvBuf[_1K];
     int16_t samples[32] = { 0xAA, 0xBB };
-    uint32_t read , written, mixed;
+    uint32_t cSamplesRead, cSamplesWritten, cSamplesMixed;
 
-    uint32_t cChild1Free     = cBufSize;
-    uint32_t cChild1Mixed    = 0;
-    uint32_t cSamplesParent1 = cSamples;
     uint32_t cSamplesChild1  = cSamples;
-
-    uint32_t cChild2Free     = cBufSize;
-    uint32_t cChild2Mixed    = 0;
-    uint32_t cSamplesParent2 = cSamples;
     uint32_t cSamplesChild2  = cSamples;
 
     uint32_t t = RTRandU32() % 1024;
@@ -227,18 +220,18 @@ static int tstParentChild(RTTEST hTest)
     for (uint32_t i = 0; i < t; i++)
     {
         RTTestPrintf(hTest, RTTESTLVL_DEBUG, "i=%RU32\n", i);
-        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufWriteAt(&child1, 0, &samples, sizeof(samples), &written));
-        RTTESTI_CHECK_MSG_BREAK(written == cSamplesChild1, ("Child1: Expected %RU32 written samples, got %RU32\n", cSamplesChild1, written));
-        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufMixToParent(&child1, written, &mixed));
-        RTTESTI_CHECK_MSG_BREAK(AudioMixBufLive(&child1) == mixed, ("Child1: Expected %RU32 mixed samples, got %RU32\n", AudioMixBufLive(&child1), mixed));
-        RTTESTI_CHECK_MSG_BREAK(AudioMixBufUsed(&child1) == AUDIOMIXBUF_S2S_RATIO(&parent, mixed), ("Child1: Expected %RU32 used samples, got %RU32\n", AudioMixBufLive(&child1), AUDIOMIXBUF_S2S_RATIO(&parent, mixed)));
+        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufWriteAt(&child1, 0, &samples, sizeof(samples), &cSamplesWritten));
+        RTTESTI_CHECK_MSG_BREAK(cSamplesWritten == cSamplesChild1, ("Child1: Expected %RU32 written samples, got %RU32\n", cSamplesChild1, cSamplesWritten));
+        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufMixToParent(&child1, cSamplesWritten, &cSamplesMixed));
+        RTTESTI_CHECK_MSG_BREAK(AudioMixBufLive(&child1) == cSamplesMixed, ("Child1: Expected %RU32 mixed samples, got %RU32\n", AudioMixBufLive(&child1), cSamplesMixed));
+        RTTESTI_CHECK_MSG_BREAK(AudioMixBufUsed(&child1) == AUDIOMIXBUF_S2S_RATIO(&parent, cSamplesMixed), ("Child1: Expected %RU32 used samples, got %RU32\n", AudioMixBufLive(&child1), AUDIOMIXBUF_S2S_RATIO(&parent, cSamplesMixed)));
         RTTESTI_CHECK_MSG_BREAK(AudioMixBufUsed(&parent) == 0, ("Parent: Expected 0 used samples, got %RU32\n", AudioMixBufUsed(&parent)));
 
-        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufWriteAt(&child2, 0, &samples, sizeof(samples), &written));
-        RTTESTI_CHECK_MSG_BREAK(written == cSamplesChild2, ("Child2: Expected %RU32 written samples, got %RU32\n", cSamplesChild2, written));
-        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufMixToParent(&child2, written, &mixed));
-        RTTESTI_CHECK_MSG_BREAK(AudioMixBufLive(&child2) == mixed, ("Child2: Expected %RU32 mixed samples, got %RU32\n", AudioMixBufLive(&child2), AudioMixBufUsed(&parent)));
-        RTTESTI_CHECK_MSG_BREAK(AudioMixBufUsed(&child2) == AUDIOMIXBUF_S2S_RATIO(&parent, mixed), ("Child2: Expected %RU32 used samples, got %RU32\n", AudioMixBufLive(&child2), AUDIOMIXBUF_S2S_RATIO(&parent, mixed)));
+        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufWriteAt(&child2, 0, &samples, sizeof(samples), &cSamplesWritten));
+        RTTESTI_CHECK_MSG_BREAK(cSamplesWritten == cSamplesChild2, ("Child2: Expected %RU32 written samples, got %RU32\n", cSamplesChild2, cSamplesWritten));
+        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufMixToParent(&child2, cSamplesWritten, &cSamplesMixed));
+        RTTESTI_CHECK_MSG_BREAK(AudioMixBufLive(&child2) == cSamplesMixed, ("Child2: Expected %RU32 mixed samples, got %RU32\n", AudioMixBufLive(&child2), AudioMixBufUsed(&parent)));
+        RTTESTI_CHECK_MSG_BREAK(AudioMixBufUsed(&child2) == AUDIOMIXBUF_S2S_RATIO(&parent, cSamplesMixed), ("Child2: Expected %RU32 used samples, got %RU32\n", AudioMixBufLive(&child2), AUDIOMIXBUF_S2S_RATIO(&parent, cSamplesMixed)));
         RTTESTI_CHECK_MSG_BREAK(AudioMixBufUsed(&parent) == 0, ("Parent2: Expected 0 used samples, got %RU32\n", AudioMixBufUsed(&parent)));
     }
 
@@ -246,10 +239,10 @@ static int tstParentChild(RTTEST hTest)
 
     for (;;)
     {
-        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufReadCirc(&parent, pvBuf, cbBuf, &read));
-        if (!read)
+        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufReadCirc(&parent, pvBuf, cbBuf, &cSamplesRead));
+        if (!cSamplesRead)
             break;
-        AudioMixBufFinish(&parent, read);
+        AudioMixBufFinish(&parent, cSamplesRead);
     }
 
     RTTESTI_CHECK(AudioMixBufUsed(&parent) == 0);
@@ -266,9 +259,9 @@ static int tstParentChild(RTTEST hTest)
 /* Test 8-bit sample conversion (8-bit -> internal -> 8-bit). */
 static int tstConversion8(RTTEST hTest)
 {
-    unsigned        i;
-    uint32_t        cBufSize = 256;
-    PDMPCMPROPS     props;
+    unsigned         i;
+    uint32_t         cBufSize = 256;
+    PDMAUDIOPCMPROPS props;
 
     RTTestSubF(hTest, "Sample conversion (U8)");
 
@@ -323,34 +316,32 @@ static int tstConversion8(RTTEST hTest)
      */
     uint32_t    cbBuf = 256;
     char        achBuf[256];
-    uint32_t    read, written, mixed, temp;
+    uint32_t    cSamplesRead, cSamplesWritten, cSamplesMixed;
 
-    uint32_t cChildFree     = cBufSize;
-    uint32_t cChildMixed    = 0;
     uint32_t cSamplesChild  = 16;
     uint32_t cSamplesParent = cSamplesChild * 2 - 2;
-    uint32_t cSamplesRead   = 0;
+    uint32_t cSamplesTotalRead   = 0;
 
     /**** 8-bit unsigned samples ****/
     RTTestPrintf(hTest, RTTESTLVL_DEBUG, "Conversion test %uHz %uch 8-bit\n", cfg_c.uHz, cfg_c.cChannels);
-    RTTESTI_CHECK_RC_OK(AudioMixBufWriteCirc(&child, &samples, sizeof(samples), &written));
-    RTTESTI_CHECK_MSG(written == cSamplesChild, ("Child: Expected %RU32 written samples, got %RU32\n", cSamplesChild, written));
-    RTTESTI_CHECK_RC_OK(AudioMixBufMixToParent(&child, written, &mixed));
-    temp = AudioMixBufUsed(&parent);
-    RTTESTI_CHECK_MSG(AudioMixBufLive(&child) == temp, ("Child: Expected %RU32 mixed samples, got %RU32\n", AudioMixBufLive(&child), temp));
+    RTTESTI_CHECK_RC_OK(AudioMixBufWriteCirc(&child, &samples, sizeof(samples), &cSamplesWritten));
+    RTTESTI_CHECK_MSG(cSamplesWritten == cSamplesChild, ("Child: Expected %RU32 written samples, got %RU32\n", cSamplesChild, cSamplesWritten));
+    RTTESTI_CHECK_RC_OK(AudioMixBufMixToParent(&child, cSamplesWritten, &cSamplesMixed));
+    uint32_t cSamples = AudioMixBufUsed(&parent);
+    RTTESTI_CHECK_MSG(AudioMixBufLive(&child) == cSamples, ("Child: Expected %RU32 mixed samples, got %RU32\n", AudioMixBufLive(&child), cSamples));
 
     RTTESTI_CHECK(AudioMixBufUsed(&parent) == AudioMixBufLive(&child));
 
     for (;;)
     {
-        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufReadCirc(&parent, achBuf, cbBuf, &read));
-        if (!read)
+        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufReadCirc(&parent, achBuf, cbBuf, &cSamplesRead));
+        if (!cSamplesRead)
             break;
-        cSamplesRead += read;
-        AudioMixBufFinish(&parent, read);
+        cSamplesTotalRead += cSamplesRead;
+        AudioMixBufFinish(&parent, cSamplesRead);
     }
 
-    RTTESTI_CHECK_MSG(cSamplesRead == cSamplesParent, ("Parent: Expected %RU32 mixed samples, got %RU32\n", cSamplesParent, cSamplesRead));
+    RTTESTI_CHECK_MSG(cSamplesTotalRead == cSamplesParent, ("Parent: Expected %RU32 mixed samples, got %RU32\n", cSamplesParent, cSamplesTotalRead));
 
     /* Check that the samples came out unharmed. Every other sample is interpolated and we ignore it. */
     /* NB: This also checks that the default volume setting is 0dB attenuation. */
@@ -376,9 +367,9 @@ static int tstConversion8(RTTEST hTest)
 /* Test 16-bit sample conversion (16-bit -> internal -> 16-bit). */
 static int tstConversion16(RTTEST hTest)
 {
-    unsigned        i;
-    uint32_t        cBufSize = 256;
-    PDMPCMPROPS     props;
+    unsigned         i;
+    uint32_t         cBufSize = 256;
+    PDMAUDIOPCMPROPS props;
 
     RTTestSubF(hTest, "Sample conversion (S16)");
 
@@ -426,33 +417,31 @@ static int tstConversion16(RTTEST hTest)
      */
     uint32_t    cbBuf = 256;
     char        achBuf[256];
-    uint32_t    read, written, mixed, temp;
+    uint32_t    cSamplesRead, cSamplesWritten, cSamplesMixed;
 
-    uint32_t cChildFree     = cBufSize;
-    uint32_t cChildMixed    = 0;
     uint32_t cSamplesChild  = 16;
     uint32_t cSamplesParent = cSamplesChild * 2 - 2;
-    uint32_t cSamplesRead   = 0;
+    uint32_t cSamplesTotalRead   = 0;
 
     /**** 16-bit signed samples ****/
     RTTestPrintf(hTest, RTTESTLVL_DEBUG, "Conversion test %uHz %uch 16-bit\n", cfg_c.uHz, cfg_c.cChannels);
-    RTTESTI_CHECK_RC_OK(AudioMixBufWriteCirc(&child, &samples, sizeof(samples), &written));
-    RTTESTI_CHECK_MSG(written == cSamplesChild, ("Child: Expected %RU32 written samples, got %RU32\n", cSamplesChild, written));
-    RTTESTI_CHECK_RC_OK(AudioMixBufMixToParent(&child, written, &mixed));
-    temp = AudioMixBufUsed(&parent);
-    RTTESTI_CHECK_MSG(AudioMixBufLive(&child) == temp, ("Child: Expected %RU32 mixed samples, got %RU32\n", AudioMixBufLive(&child), temp));
+    RTTESTI_CHECK_RC_OK(AudioMixBufWriteCirc(&child, &samples, sizeof(samples), &cSamplesWritten));
+    RTTESTI_CHECK_MSG(cSamplesWritten == cSamplesChild, ("Child: Expected %RU32 written samples, got %RU32\n", cSamplesChild, cSamplesWritten));
+    RTTESTI_CHECK_RC_OK(AudioMixBufMixToParent(&child, cSamplesWritten, &cSamplesMixed));
+    uint32_t cSamples = AudioMixBufUsed(&parent);
+    RTTESTI_CHECK_MSG(AudioMixBufLive(&child) == cSamples, ("Child: Expected %RU32 mixed samples, got %RU32\n", AudioMixBufLive(&child), cSamples));
 
     RTTESTI_CHECK(AudioMixBufUsed(&parent) == AudioMixBufLive(&child));
 
     for (;;)
     {
-        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufReadCirc(&parent, achBuf, cbBuf, &read));
-        if (!read)
+        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufReadCirc(&parent, achBuf, cbBuf, &cSamplesRead));
+        if (!cSamplesRead)
             break;
-        cSamplesRead += read;
-        AudioMixBufFinish(&parent, read);
+        cSamplesTotalRead += cSamplesRead;
+        AudioMixBufFinish(&parent, cSamplesRead);
     }
-    RTTESTI_CHECK_MSG(cSamplesRead == cSamplesParent, ("Parent: Expected %RU32 mixed samples, got %RU32\n", cSamplesParent, cSamplesRead));
+    RTTESTI_CHECK_MSG(cSamplesTotalRead == cSamplesParent, ("Parent: Expected %RU32 mixed samples, got %RU32\n", cSamplesParent, cSamplesTotalRead));
 
     /* Check that the samples came out unharmed. Every other sample is interpolated and we ignore it. */
     /* NB: This also checks that the default volume setting is 0dB attenuation. */
@@ -478,9 +467,9 @@ static int tstConversion16(RTTEST hTest)
 /* Test volume control. */
 static int tstVolume(RTTEST hTest)
 {
-    unsigned        i;
-    uint32_t        cBufSize = 256;
-    PDMPCMPROPS     props;
+    unsigned         i;
+    uint32_t         cBufSize = 256;
+    PDMAUDIOPCMPROPS props;
 
     RTTestSubF(hTest, "Volume control");
 
@@ -516,13 +505,11 @@ static int tstVolume(RTTEST hTest)
      */
     uint32_t    cbBuf = 256;
     char        achBuf[256];
-    uint32_t    read, written, mixed;
+    uint32_t    cSamplesRead, cSamplesWritten, cSamplesMixed;
 
-    uint32_t cChildFree     = cBufSize;
-    uint32_t cChildMixed    = 0;
     uint32_t cSamplesChild  = 8;
     uint32_t cSamplesParent = cSamplesChild;
-    uint32_t cSamplesRead;
+    uint32_t cSamplesTotalRead;
     int16_t *pSrc16;
     int16_t *pDst16;
 
@@ -533,20 +520,20 @@ static int tstVolume(RTTEST hTest)
     vol.uLeft = vol.uRight = 255;
     AudioMixBufSetVolume(&child, &vol);
 
-    RTTESTI_CHECK_RC_OK(AudioMixBufWriteCirc(&child, &samples, sizeof(samples), &written));
-    RTTESTI_CHECK_MSG(written == cSamplesChild, ("Child: Expected %RU32 written samples, got %RU32\n", cSamplesChild, written));
-    RTTESTI_CHECK_RC_OK(AudioMixBufMixToParent(&child, written, &mixed));
+    RTTESTI_CHECK_RC_OK(AudioMixBufWriteCirc(&child, &samples, sizeof(samples), &cSamplesWritten));
+    RTTESTI_CHECK_MSG(cSamplesWritten == cSamplesChild, ("Child: Expected %RU32 written samples, got %RU32\n", cSamplesChild, cSamplesWritten));
+    RTTESTI_CHECK_RC_OK(AudioMixBufMixToParent(&child, cSamplesWritten, &cSamplesMixed));
 
-    cSamplesRead = 0;
+    cSamplesTotalRead = 0;
     for (;;)
     {
-        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufReadCirc(&parent, achBuf, cbBuf, &read));
-        if (!read)
+        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufReadCirc(&parent, achBuf, cbBuf, &cSamplesRead));
+        if (!cSamplesRead)
             break;
-        cSamplesRead += read;
-        AudioMixBufFinish(&parent, read);
+        cSamplesTotalRead += cSamplesRead;
+        AudioMixBufFinish(&parent, cSamplesRead);
     }
-    RTTESTI_CHECK_MSG(cSamplesRead == cSamplesParent, ("Parent: Expected %RU32 mixed samples, got %RU32\n", cSamplesParent, cSamplesRead));
+    RTTESTI_CHECK_MSG(cSamplesTotalRead == cSamplesParent, ("Parent: Expected %RU32 mixed samples, got %RU32\n", cSamplesParent, cSamplesTotalRead));
 
     /* Check that at 0dB the samples came out unharmed. */
     pSrc16 = &samples[0];
@@ -564,20 +551,20 @@ static int tstVolume(RTTEST hTest)
     vol.uLeft = vol.uRight = 255 - 16;
     AudioMixBufSetVolume(&child, &vol);
 
-    RTTESTI_CHECK_RC_OK(AudioMixBufWriteCirc(&child, &samples, sizeof(samples), &written));
-    RTTESTI_CHECK_MSG(written == cSamplesChild, ("Child: Expected %RU32 written samples, got %RU32\n", cSamplesChild, written));
-    RTTESTI_CHECK_RC_OK(AudioMixBufMixToParent(&child, written, &mixed));
+    RTTESTI_CHECK_RC_OK(AudioMixBufWriteCirc(&child, &samples, sizeof(samples), &cSamplesWritten));
+    RTTESTI_CHECK_MSG(cSamplesWritten == cSamplesChild, ("Child: Expected %RU32 written samples, got %RU32\n", cSamplesChild, cSamplesWritten));
+    RTTESTI_CHECK_RC_OK(AudioMixBufMixToParent(&child, cSamplesWritten, &cSamplesMixed));
 
-    cSamplesRead = 0;
+    cSamplesTotalRead = 0;
     for (;;)
     {
-        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufReadCirc(&parent, achBuf, cbBuf, &read));
-        if (!read)
+        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufReadCirc(&parent, achBuf, cbBuf, &cSamplesRead));
+        if (!cSamplesRead)
             break;
-        cSamplesRead += read;
-        AudioMixBufFinish(&parent, read);
+        cSamplesTotalRead += cSamplesRead;
+        AudioMixBufFinish(&parent, cSamplesRead);
     }
-    RTTESTI_CHECK_MSG(cSamplesRead == cSamplesParent, ("Parent: Expected %RU32 mixed samples, got %RU32\n", cSamplesParent, cSamplesRead));
+    RTTESTI_CHECK_MSG(cSamplesTotalRead == cSamplesParent, ("Parent: Expected %RU32 mixed samples, got %RU32\n", cSamplesParent, cSamplesTotalRead));
 
     /* Check that at -6dB the sample values are halved. */
     pSrc16 = &samples[0];
diff --git a/src/VBox/Devices/Audio_old/AudioMixBuffer.cpp b/src/VBox/Devices/Audio_old/AudioMixBuffer.cpp
deleted file mode 100644
index 80db4e7..0000000
--- a/src/VBox/Devices/Audio_old/AudioMixBuffer.cpp
+++ /dev/null
@@ -1,1749 +0,0 @@
-/* $Id: AudioMixBuffer.cpp $ */
-/** @file
- * VBox audio: Audio mixing buffer for converting reading/writing audio
- *             samples.
- */
-
-/*
- * Copyright (C) 2014-2015 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-#define LOG_GROUP LOG_GROUP_AUDIO_MIXER_BUFFER
-#include <VBox/log.h>
-
-/*
- * DEBUG_DUMP_PCM_DATA enables dumping the raw PCM data
- * to a file on the host. Be sure to adjust DEBUG_DUMP_PCM_DATA_PATH
- * to your needs before using this!
- */
-#ifdef DEBUG
-//# define DEBUG_DUMP_PCM_DATA
-# define DEBUG_DUMP_PCM_DATA_PATH "c:\\temp\\"
-#endif
-
-#include <iprt/asm-math.h>
-#include <iprt/assert.h>
-#ifdef DEBUG_DUMP_PCM_DATA
-# include <iprt/file.h>
-#endif
-#include <iprt/mem.h>
-#include <iprt/string.h> /* For RT_BZERO. */
-
-#ifdef TESTCASE
-# define LOG_ENABLED
-# include <iprt/stream.h>
-#endif
-#include <VBox/err.h>
-
-#include "AudioMixBuffer.h"
-
-#if 0
-# define AUDMIXBUF_LOG(x) LogFlowFunc(x)
-#else
-# if defined(TESTCASE)
-#  define AUDMIXBUF_LOG(x) LogFunc(x)
-# else
-#  define AUDMIXBUF_LOG(x) do {} while (0)
-# endif
-#endif
-
-
-/*
- *   Soft Volume Control
- *
- * The external code supplies an 8-bit volume (attenuation) value in the
- * 0 .. 255 range. This represents 0 to -96dB attenuation where an input
- * value of 0 corresponds to -96dB and 255 corresponds to 0dB (unchanged).
- *
- * Each step thus correspons to 96 / 256 or 0.375dB. Every 6dB (16 steps)
- * represents doubling the sample value.
- *
- * For internal use, the volume control needs to be converted to a 16-bit
- * (sort of) exponential value between 1 and 65536. This is used with fixed
- * point arithmetic such that 65536 means 1.0 and 1 means 1/65536.
- *
- * For actual volume calculation, 33.31 fixed point is used. Maximum (or
- * unattenuated) volume is represented as 0x40000000; conveniently, this
- * value fits into a uint32_t.
- *
- * To enable fast processing, the maximum volume must be a power of two
- * and must not have a sign when converted to int32_t. While 0x80000000
- * violates these constraints, 0x40000000 does not.
- */
-
-
-/** Logarithmic/exponential volume conversion table. */
-static uint32_t s_aVolumeConv[256] = {
-        1,     1,     1,     1,     1,     1,     1,     1, /*   7 */
-        1,     2,     2,     2,     2,     2,     2,     2, /*  15 */
-        2,     2,     2,     2,     2,     3,     3,     3, /*  23 */
-        3,     3,     3,     3,     4,     4,     4,     4, /*  31 */
-        4,     4,     5,     5,     5,     5,     5,     6, /*  39 */
-        6,     6,     6,     7,     7,     7,     8,     8, /*  47 */
-        8,     9,     9,    10,    10,    10,    11,    11, /*  55 */
-       12,    12,    13,    13,    14,    15,    15,    16, /*  63 */
-       17,    17,    18,    19,    20,    21,    22,    23, /*  71 */
-       24,    25,    26,    27,    28,    29,    31,    32, /*  79 */
-       33,    35,    36,    38,    40,    41,    43,    45, /*  87 */
-       47,    49,    52,    54,    56,    59,    61,    64, /*  95 */
-       67,    70,    73,    76,    79,    83,    87,    91, /* 103 */
-       95,    99,   103,   108,   112,   117,   123,   128, /* 111 */
-      134,   140,   146,   152,   159,   166,   173,   181, /* 119 */
-      189,   197,   206,   215,   225,   235,   245,   256, /* 127 */
-      267,   279,   292,   304,   318,   332,   347,   362, /* 135 */
-      378,   395,   412,   431,   450,   470,   490,   512, /* 143 */
-      535,   558,   583,   609,   636,   664,   693,   724, /* 151 */
-      756,   790,   825,   861,   899,   939,   981,  1024, /* 159 */
-     1069,  1117,  1166,  1218,  1272,  1328,  1387,  1448, /* 167 */
-     1512,  1579,  1649,  1722,  1798,  1878,  1961,  2048, /* 175 */
-     2139,  2233,  2332,  2435,  2543,  2656,  2774,  2896, /* 183 */
-     3025,  3158,  3298,  3444,  3597,  3756,  3922,  4096, /* 191 */
-     4277,  4467,  4664,  4871,  5087,  5312,  5547,  5793, /* 199 */
-     6049,  6317,  6597,  6889,  7194,  7512,  7845,  8192, /* 207 */
-     8555,  8933,  9329,  9742, 10173, 10624, 11094, 11585, /* 215 */
-    12098, 12634, 13193, 13777, 14387, 15024, 15689, 16384, /* 223 */
-    17109, 17867, 18658, 19484, 20347, 21247, 22188, 23170, /* 231 */
-    24196, 25268, 26386, 27554, 28774, 30048, 31379, 32768, /* 239 */
-    34219, 35734, 37316, 38968, 40693, 42495, 44376, 46341, /* 247 */
-    48393, 50535, 52773, 55109, 57549, 60097, 62757, 65536, /* 255 */
-};
-
-/* Bit shift for fixed point conversion. */
-#define AUDIOMIXBUF_VOL_SHIFT       30
-
-/* Internal representation of 0dB volume (1.0 in fixed point). */
-#define AUDIOMIXBUF_VOL_0DB         (1 << AUDIOMIXBUF_VOL_SHIFT)
-
-AssertCompile(AUDIOMIXBUF_VOL_0DB <= 0x40000000);   /* Must always hold. */
-AssertCompile(AUDIOMIXBUF_VOL_0DB == 0x40000000);   /* For now -- when only attenuation is used. */
-
-/**
- * Structure for holding sample conversion parameters for
- * the audioMixBufConvFromXXX / audioMixBufConvToXXX macros.
- */
-typedef struct AUDMIXBUF_CONVOPTS
-{
-    /** Number of audio samples to convert. */
-    uint32_t       cSamples;
-    /** Volume to apply during conversion. Pass 0
-     *  to convert the original values. May not apply to
-     *  all conversion functions. */
-    PDMAUDIOVOLUME Volume;
-} AUDMIXBUF_CONVOPTS, *PAUDMIXBUF_CONVOPTS;
-
-/*
- * When running the audio testcases we want to verfiy
- * the macro-generated routines separately, so unmark them as being
- * inlined + static.
- */
-#ifdef TESTCASE
-# define AUDMIXBUF_MACRO_FN
-#else
-# define AUDMIXBUF_MACRO_FN static inline
-#endif
-
-#ifdef DEBUG
-static uint64_t s_cSamplesMixedTotal = 0;
-static inline void audioMixBufPrint(PPDMAUDIOMIXBUF pMixBuf);
-#endif
-
-typedef uint32_t (AUDMIXBUF_FN_CONVFROM) (PPDMAUDIOSAMPLE paDst, const void *pvSrc, uint32_t cbSrc, const PAUDMIXBUF_CONVOPTS pOpts);
-typedef AUDMIXBUF_FN_CONVFROM *PAUDMIXBUF_FN_CONVFROM;
-
-typedef void (AUDMIXBUF_FN_CONVTO) (void *pvDst, const PPDMAUDIOSAMPLE paSrc, const PAUDMIXBUF_CONVOPTS pOpts);
-typedef AUDMIXBUF_FN_CONVTO *PAUDMIXBUF_FN_CONVTO;
-
-/* Can return VINF_TRY_AGAIN for getting next pointer at beginning (circular) */
-
-/**
- * Acquires (reads) a mutable pointer to the mixing buffer's audio samples without
- * any conversion done.
- ** @todo Rename to AudioMixBufPeek(Mutable/Raw)?
- ** @todo Protect the buffer's data?
- *
- * @return  IPRT status code.
- * @param   pMixBuf                 Mixing buffer to acquire audio samples from.
- * @param   cSamplesToRead          Number of audio samples to read.
- * @param   ppvSamples              Returns a mutable pointer to the buffer's audio sample data.
- * @param   pcSamplesRead           Number of audio samples read (acquired).
- *
- * @remark  This function is not thread safe!
- */
-int AudioMixBufAcquire(PPDMAUDIOMIXBUF pMixBuf, uint32_t cSamplesToRead,
-                       PPDMAUDIOSAMPLE *ppvSamples, uint32_t *pcSamplesRead)
-{
-    AssertPtrReturn(pMixBuf, VERR_INVALID_POINTER);
-    AssertPtrReturn(ppvSamples, VERR_INVALID_POINTER);
-    AssertPtrReturn(pcSamplesRead, VERR_INVALID_POINTER);
-
-    int rc;
-
-    if (!cSamplesToRead)
-    {
-        *pcSamplesRead = 0;
-        return VINF_SUCCESS;
-    }
-
-    uint32_t cSamplesRead;
-    if (pMixBuf->offReadWrite + cSamplesToRead > pMixBuf->cSamples)
-    {
-        cSamplesRead = pMixBuf->cSamples - pMixBuf->offReadWrite;
-        rc = VINF_TRY_AGAIN;
-    }
-    else
-    {
-        cSamplesRead = cSamplesToRead;
-        rc = VINF_SUCCESS;
-    }
-
-    *ppvSamples = &pMixBuf->pSamples[pMixBuf->offReadWrite];
-    AssertPtr(ppvSamples);
-
-    pMixBuf->offReadWrite = (pMixBuf->offReadWrite + cSamplesRead) % pMixBuf->cSamples;
-    Assert(pMixBuf->offReadWrite <= pMixBuf->cSamples);
-    pMixBuf->cProcessed -= RT_MIN(cSamplesRead, pMixBuf->cProcessed);
-
-    *pcSamplesRead = cSamplesRead;
-
-    return rc;
-}
-
-/**
- * Returns available number of samples for reading.
- *
- * @return  uint32_t                Number of samples available for reading.
- * @param   pMixBuf                 Mixing buffer to return value for.
- */
-uint32_t AudioMixBufAvail(PPDMAUDIOMIXBUF pMixBuf)
-{
-    AssertPtrReturn(pMixBuf, true);
-
-    uint32_t cAvail;
-    if (pMixBuf->pParent) /* Child */
-        cAvail = pMixBuf->cMixed;
-    else
-        cAvail = pMixBuf->cProcessed;
-
-    Assert(cAvail <= pMixBuf->cSamples);
-    return cAvail;
-}
-
-/**
- * Clears the entire sample buffer.
- *
- * @param   pMixBuf                 Mixing buffer to clear.
- *
- */
-void AudioMixBufClear(PPDMAUDIOMIXBUF pMixBuf)
-{
-    AssertPtrReturnVoid(pMixBuf);
-
-    if (pMixBuf->cSamples)
-        RT_BZERO(pMixBuf->pSamples, pMixBuf->cSamples * sizeof(PDMAUDIOSAMPLE));
-}
-
-/**
- * Clears (zeroes) the buffer by a certain amount of (processed) samples and
- * keeps track to eventually assigned children buffers.
- *
- * @param   pMixBuf                 Mixing buffer to clear.
- * @param   cSamplesToClear         Number of audio samples to clear.
- */
-void AudioMixBufFinish(PPDMAUDIOMIXBUF pMixBuf, uint32_t cSamplesToClear)
-{
-    AUDMIXBUF_LOG(("cSamples=%RU32\n", cSamplesToClear));
-    AUDMIXBUF_LOG(("%s: offReadWrite=%RU32, cProcessed=%RU32\n",
-                   pMixBuf->pszName, pMixBuf->offReadWrite, pMixBuf->cProcessed));
-
-    PPDMAUDIOMIXBUF pIter;
-    RTListForEach(&pMixBuf->lstBuffers, pIter, PDMAUDIOMIXBUF, Node)
-    {
-        AUDMIXBUF_LOG(("\t%s: cMixed=%RU32 -> %RU32\n",
-                       pIter->pszName, pIter->cMixed, pIter->cMixed - cSamplesToClear));
-
-        pIter->cMixed -= RT_MIN(pIter->cMixed, cSamplesToClear);
-        pIter->offReadWrite = 0;
-    }
-
-    uint32_t cLeft = RT_MIN(cSamplesToClear, pMixBuf->cSamples);
-    uint32_t offClear;
-
-    if (cLeft > pMixBuf->offReadWrite) /* Zero end of buffer first (wrap-around). */
-    {
-        AUDMIXBUF_LOG(("Clearing1: %RU32 - %RU32\n",
-                       (pMixBuf->cSamples - (cLeft - pMixBuf->offReadWrite)),
-                        pMixBuf->cSamples));
-
-        RT_BZERO(pMixBuf->pSamples + (pMixBuf->cSamples - (cLeft - pMixBuf->offReadWrite)),
-                 (cLeft - pMixBuf->offReadWrite) * sizeof(PDMAUDIOSAMPLE));
-
-        cLeft -= cLeft - pMixBuf->offReadWrite;
-        offClear = 0;
-    }
-    else
-        offClear = pMixBuf->offReadWrite - cLeft;
-
-    if (cLeft)
-    {
-        AUDMIXBUF_LOG(("Clearing2: %RU32 - %RU32\n",
-                       offClear, offClear + cLeft));
-        RT_BZERO(pMixBuf->pSamples + offClear, cLeft * sizeof(PDMAUDIOSAMPLE));
-    }
-}
-
-/**
- * Destroys (uninitializes) a mixing buffer.
- *
- * @param   pMixBuf                 Mixing buffer to destroy.
- */
-void AudioMixBufDestroy(PPDMAUDIOMIXBUF pMixBuf)
-{
-    if (!pMixBuf)
-        return;
-
-    AudioMixBufUnlink(pMixBuf);
-
-    if (pMixBuf->pszName)
-    {
-        AUDMIXBUF_LOG(("%s\n", pMixBuf->pszName));
-
-        RTStrFree(pMixBuf->pszName);
-        pMixBuf->pszName = NULL;
-    }
-
-    if (pMixBuf->pRate)
-    {
-        RTMemFree(pMixBuf->pRate);
-        pMixBuf->pRate = NULL;
-    }
-
-    if (pMixBuf->pSamples)
-    {
-        Assert(pMixBuf->cSamples);
-
-        RTMemFree(pMixBuf->pSamples);
-        pMixBuf->pSamples = NULL;
-    }
-
-    pMixBuf->cSamples = 0;
-}
-
-/**
- * Returns the size (in audio samples) of free audio buffer space.
- *
- * @return  uint32_t                Size (in audio samples) of free audio buffer space.
- * @param   pMixBuf                 Mixing buffer to return free size for.
- */
-uint32_t AudioMixBufFree(PPDMAUDIOMIXBUF pMixBuf)
-{
-    AssertPtrReturn(pMixBuf, 0);
-
-    uint32_t cSamplesFree;
-    if (pMixBuf->pParent)
-    {
-        /*
-         * As a linked child buffer we want to know how many samples
-         * already have been consumed by the parent.
-         */
-        Assert(pMixBuf->cMixed <= pMixBuf->pParent->cSamples);
-        cSamplesFree = pMixBuf->pParent->cSamples - pMixBuf->cMixed;
-    }
-    else /* As a parent. */
-    {
-        Assert(pMixBuf->cSamples >= pMixBuf->cProcessed);
-        cSamplesFree = pMixBuf->cSamples - pMixBuf->cProcessed;
-    }
-
-    AUDMIXBUF_LOG(("%s: cSamplesFree=%RU32\n", pMixBuf->pszName, cSamplesFree));
-    return cSamplesFree;
-}
-
-/**
- * Returns the size (in bytes) of free audio buffer space.
- *
- * @return  uint32_t                Size (in bytes) of free audio buffer space.
- * @param   pMixBuf                 Mixing buffer to return free size for.
- */
-uint32_t AudioMixBufFreeBytes(PPDMAUDIOMIXBUF pMixBuf)
-{
-    return AUDIOMIXBUF_S2B(pMixBuf, AudioMixBufFree(pMixBuf));
-}
-
-/**
- * Allocates the internal audio sample buffer.
- *
- * @return  IPRT status code.
- * @param   pMixBuf                 Mixing buffer to allocate sample buffer for.
- * @param   cSamples                Number of audio samples to allocate.
- */
-static int audioMixBufAlloc(PPDMAUDIOMIXBUF pMixBuf, uint32_t cSamples)
-{
-    AssertPtrReturn(pMixBuf, VERR_INVALID_POINTER);
-    AssertReturn(cSamples, VERR_INVALID_PARAMETER);
-
-    AUDMIXBUF_LOG(("%s: cSamples=%RU32\n", pMixBuf->pszName, cSamples));
-
-    size_t cbSamples = cSamples * sizeof(PDMAUDIOSAMPLE);
-    if (!cbSamples)
-        return VERR_INVALID_PARAMETER;
-
-    pMixBuf->pSamples = (PPDMAUDIOSAMPLE)RTMemAllocZ(cbSamples);
-    if (!pMixBuf->pSamples)
-        return VERR_NO_MEMORY;
-
-    pMixBuf->cSamples = cSamples;
-
-    return VINF_SUCCESS;
-}
-
-/** Note: Enabling this will generate huge logs! */
-//#define DEBUG_MACROS
-
-#ifdef DEBUG_MACROS
-# define AUDMIXBUF_MACRO_LOG(x) AUDMIXBUF_LOG(x)
-#elif defined(TESTCASE)
-# define AUDMIXBUF_MACRO_LOG(x) RTPrintf x
-#else
-# define AUDMIXBUF_MACRO_LOG(x) do {} while (0)
-#endif
-
-/**
- * Macro for generating the conversion routines from/to different formats.
- * Be careful what to pass in/out, as most of the macros are optimized for speed and
- * thus don't do any bounds checking!
- *
- * Note: Currently does not handle any endianness conversion yet!
- */
-#define AUDMIXBUF_CONVERT(_aName, _aType, _aMin, _aMax, _aSigned, _aShift) \
-    /* Clips a specific output value to a single sample value. */ \
-    AUDMIXBUF_MACRO_FN int64_t audioMixBufClipFrom##_aName(_aType aVal) \
-    { \
-        if (_aSigned) \
-            return ((int64_t) aVal) << (32 - _aShift); \
-        return ((int64_t) aVal - ((_aMax >> 1) + 1)) << (32 - _aShift); \
-    } \
-    \
-    /* Clips a single sample value to a specific output value. */ \
-    AUDMIXBUF_MACRO_FN _aType audioMixBufClipTo##_aName(int64_t iVal) \
-    { \
-        if (iVal >= 0x7fffffff) \
-            return _aMax; \
-        else if (iVal < -INT64_C(0x80000000)) \
-            return _aMin; \
-        \
-        if (_aSigned) \
-            return (_aType) (iVal >> (32 - _aShift)); \
-        return ((_aType) ((iVal >> (32 - _aShift)) + ((_aMax >> 1) + 1))); \
-    } \
-    \
-    AUDMIXBUF_MACRO_FN uint32_t audioMixBufConvFrom##_aName##Stereo(PPDMAUDIOSAMPLE paDst, const void *pvSrc, uint32_t cbSrc, \
-                                                                    const PAUDMIXBUF_CONVOPTS pOpts) \
-    { \
-        _aType *pSrc = (_aType *)pvSrc; \
-        uint32_t cSamples = (uint32_t)RT_MIN(pOpts->cSamples, cbSrc / sizeof(_aType)); \
-        AUDMIXBUF_MACRO_LOG(("cSamples=%RU32, sizeof(%zu), lVol=%RU32, rVol=%RU32\n", \
-                             pOpts->cSamples, sizeof(_aType), pOpts->Volume.uLeft, pOpts->Volume.uRight)); \
-        for (uint32_t i = 0; i < cSamples; i++) \
-        { \
-            AUDMIXBUF_MACRO_LOG(("%p: l=%RI16, r=%RI16\n", paDst, *pSrc, *(pSrc + 1))); \
-            paDst->i64LSample = ASMMult2xS32RetS64((int32_t)audioMixBufClipFrom##_aName(*pSrc++), pOpts->Volume.uLeft ) >> AUDIOMIXBUF_VOL_SHIFT; \
-            paDst->i64RSample = ASMMult2xS32RetS64((int32_t)audioMixBufClipFrom##_aName(*pSrc++), pOpts->Volume.uRight) >> AUDIOMIXBUF_VOL_SHIFT; \
-            AUDMIXBUF_MACRO_LOG(("\t-> l=%RI64, r=%RI64\n", paDst->i64LSample, paDst->i64RSample)); \
-            paDst++; \
-        } \
-        \
-        return cSamples; \
-    } \
-    \
-    AUDMIXBUF_MACRO_FN uint32_t audioMixBufConvFrom##_aName##Mono(PPDMAUDIOSAMPLE paDst, const void *pvSrc, uint32_t cbSrc, \
-                                                                  const PAUDMIXBUF_CONVOPTS pOpts) \
-    { \
-        _aType *pSrc = (_aType *)pvSrc; \
-        uint32_t cSamples = (uint32_t)RT_MIN(pOpts->cSamples, cbSrc / sizeof(_aType)); \
-        AUDMIXBUF_MACRO_LOG(("cSamples=%RU32, sizeof(%zu), lVol=%RU32, rVol=%RU32\n", \
-                             cSamples, sizeof(_aType), pOpts->Volume.uLeft, pOpts->Volume.uRight)); \
-        for (uint32_t i = 0; i < cSamples; i++) \
-        { \
-            AUDMIXBUF_MACRO_LOG(("%p: s=%RI16\n", paDst, *pSrc)); \
-            paDst->i64LSample = ASMMult2xS32RetS64((int32_t)audioMixBufClipFrom##_aName(*pSrc), pOpts->Volume.uLeft)  >> AUDIOMIXBUF_VOL_SHIFT; \
-            paDst->i64RSample = ASMMult2xS32RetS64((int32_t)audioMixBufClipFrom##_aName(*pSrc), pOpts->Volume.uRight) >> AUDIOMIXBUF_VOL_SHIFT; \
-            ++pSrc; \
-            AUDMIXBUF_MACRO_LOG(("\t-> l=%RI64, r=%RI64\n", paDst->i64LSample, paDst->i64RSample)); \
-            paDst++; \
-        } \
-        \
-        return cSamples; \
-    } \
-    \
-    AUDMIXBUF_MACRO_FN void audioMixBufConvTo##_aName##Stereo(void *pvDst, const PPDMAUDIOSAMPLE paSrc, \
-                                                              const PAUDMIXBUF_CONVOPTS pOpts) \
-    { \
-        PPDMAUDIOSAMPLE pSrc = paSrc; \
-        _aType *pDst = (_aType *)pvDst; \
-        _aType l, r; \
-        uint32_t cSamples = pOpts->cSamples; \
-        while (cSamples--) \
-        { \
-            AUDMIXBUF_MACRO_LOG(("%p: l=%RI64, r=%RI64\n", pSrc, pSrc->i64LSample, pSrc->i64RSample)); \
-            l = audioMixBufClipTo##_aName(pSrc->i64LSample); \
-            r = audioMixBufClipTo##_aName(pSrc->i64RSample); \
-            AUDMIXBUF_MACRO_LOG(("\t-> l=%RI16, r=%RI16\n", l, r)); \
-            *pDst++ = l; \
-            *pDst++ = r; \
-            pSrc++; \
-        } \
-    } \
-    \
-    AUDMIXBUF_MACRO_FN void audioMixBufConvTo##_aName##Mono(void *pvDst, const PPDMAUDIOSAMPLE paSrc, \
-                                                            const PAUDMIXBUF_CONVOPTS pOpts) \
-    { \
-        PPDMAUDIOSAMPLE pSrc = paSrc; \
-        _aType *pDst = (_aType *)pvDst; \
-        uint32_t cSamples = pOpts->cSamples; \
-        while (cSamples--) \
-        { \
-            *pDst++ = audioMixBufClipTo##_aName((pSrc->i64LSample + pSrc->i64RSample) / 2); \
-            pSrc++; \
-        } \
-    }
-
-/* audioMixBufConvXXXS8: 8 bit, signed. */
-AUDMIXBUF_CONVERT(S8 /* Name */,  int8_t,   INT8_MIN  /* Min */, INT8_MAX   /* Max */, true  /* fSigned */, 8  /* cShift */)
-/* audioMixBufConvXXXU8: 8 bit, unsigned. */
-AUDMIXBUF_CONVERT(U8 /* Name */,  uint8_t,  0         /* Min */, UINT8_MAX  /* Max */, false /* fSigned */, 8  /* cShift */)
-/* audioMixBufConvXXXS16: 16 bit, signed. */
-AUDMIXBUF_CONVERT(S16 /* Name */, int16_t,  INT16_MIN /* Min */, INT16_MAX  /* Max */, true  /* fSigned */, 16 /* cShift */)
-/* audioMixBufConvXXXU16: 16 bit, unsigned. */
-AUDMIXBUF_CONVERT(U16 /* Name */, uint16_t, 0         /* Min */, UINT16_MAX /* Max */, false /* fSigned */, 16 /* cShift */)
-/* audioMixBufConvXXXS32: 32 bit, signed. */
-AUDMIXBUF_CONVERT(S32 /* Name */, int32_t,  INT32_MIN /* Min */, INT32_MAX  /* Max */, true  /* fSigned */, 32 /* cShift */)
-/* audioMixBufConvXXXU32: 32 bit, unsigned. */
-AUDMIXBUF_CONVERT(U32 /* Name */, uint32_t, 0         /* Min */, UINT32_MAX /* Max */, false /* fSigned */, 32 /* cShift */)
-
-#undef AUDMIXBUF_CONVERT
-
-#define AUDMIXBUF_MIXOP(_aName, _aOp) \
-    AUDMIXBUF_MACRO_FN void audioMixBufOp##_aName(PPDMAUDIOSAMPLE paDst, uint32_t cDstSamples, \
-                                                  PPDMAUDIOSAMPLE paSrc, uint32_t cSrcSamples, \
-                                                  PPDMAUDIOSTRMRATE pRate, \
-                                                  uint32_t *pcDstWritten, uint32_t *pcSrcRead) \
-    { \
-        AUDMIXBUF_MACRO_LOG(("cSrcSamples=%RU32, cDstSamples=%RU32\n", cSrcSamples, cDstSamples)); \
-        AUDMIXBUF_MACRO_LOG(("pRate=%p: srcOffset=0x%RX32 (%RU32), dstOffset=0x%RX32 (%RU32), dstInc=0x%RX64 (%RU64)\n", \
-                             pRate, pRate->srcOffset, pRate->srcOffset, \
-                             (uint32_t)(pRate->dstOffset >> 32), (uint32_t)(pRate->dstOffset >> 32), \
-                             pRate->dstInc, pRate->dstInc)); \
-        \
-        if (pRate->dstInc == (UINT64_C(1) + UINT32_MAX)) /* No conversion needed? */ \
-        { \
-            uint32_t cSamples = RT_MIN(cSrcSamples, cDstSamples); \
-            AUDMIXBUF_MACRO_LOG(("cSamples=%RU32\n", cSamples)); \
-            for (uint32_t i = 0; i < cSamples; i++) \
-            { \
-                paDst[i].i64LSample _aOp paSrc[i].i64LSample; \
-                paDst[i].i64RSample _aOp paSrc[i].i64RSample; \
-            } \
-            \
-            if (pcDstWritten) \
-                *pcDstWritten = cSamples; \
-            if (pcSrcRead) \
-                *pcSrcRead = cSamples; \
-            return; \
-        } \
-        \
-        PPDMAUDIOSAMPLE paSrcStart = paSrc; \
-        PPDMAUDIOSAMPLE paSrcEnd   = paSrc + cSrcSamples; \
-        PPDMAUDIOSAMPLE paDstStart = paDst; \
-        PPDMAUDIOSAMPLE paDstEnd   = paDst + cDstSamples; \
-        PDMAUDIOSAMPLE  samCur = { 0 }; \
-        PDMAUDIOSAMPLE  samOut; \
-        PDMAUDIOSAMPLE  samLast    = pRate->srcSampleLast; \
-        uint64_t        lDelta = 0; \
-        \
-        AUDMIXBUF_MACRO_LOG(("Start: paDstEnd=%p - paDstStart=%p -> %zu\n", paDstEnd, paDst, paDstEnd - paDstStart)); \
-        AUDMIXBUF_MACRO_LOG(("Start: paSrcEnd=%p - paSrcStart=%p -> %zu\n", paSrcEnd, paSrc, paSrcEnd - paSrcStart)); \
-        \
-        while (paDst < paDstEnd) \
-        { \
-            Assert(paSrc <= paSrcEnd); \
-            Assert(paDst <= paDstEnd); \
-            if (paSrc == paSrcEnd) \
-                break; \
-            \
-            lDelta = 0; \
-            while (pRate->srcOffset <= (pRate->dstOffset >> 32)) \
-            { \
-                Assert(paSrc <= paSrcEnd); \
-                samLast = *paSrc++; \
-                pRate->srcOffset++; \
-                lDelta++; \
-                if (paSrc == paSrcEnd) \
-                    break; \
-            } \
-            \
-            Assert(paSrc <= paSrcEnd); \
-            if (paSrc == paSrcEnd) \
-                break; \
-            \
-            samCur = *paSrc; \
-            \
-            /* Interpolate. */ \
-            int64_t iDstOffInt = pRate->dstOffset & UINT32_MAX; \
-            \
-            samOut.i64LSample = (samLast.i64LSample * ((int64_t) (INT64_C(1) << 32) - iDstOffInt) + samCur.i64LSample * iDstOffInt) >> 32; \
-            samOut.i64RSample = (samLast.i64RSample * ((int64_t) (INT64_C(1) << 32) - iDstOffInt) + samCur.i64RSample * iDstOffInt) >> 32; \
-            \
-            paDst->i64LSample _aOp samOut.i64LSample; \
-            paDst->i64RSample _aOp samOut.i64RSample; \
-            \
-            AUDMIXBUF_MACRO_LOG(("\tlDelta=0x%RX64 (%RU64), iDstOffInt=0x%RX64 (%RI64), l=%RI64, r=%RI64 (cur l=%RI64, r=%RI64)\n", \
-                                 lDelta, lDelta, iDstOffInt, iDstOffInt, \
-                                 paDst->i64LSample, paDst->i64RSample, \
-                                 samCur.i64LSample, samCur.i64RSample)); \
-            \
-            paDst++; \
-            pRate->dstOffset += pRate->dstInc; \
-            \
-            AUDMIXBUF_MACRO_LOG(("\t\tpRate->dstOffset=0x%RX32 (%RU32)\n", pRate->dstOffset, pRate->dstOffset >> 32)); \
-            \
-        } \
-        \
-        AUDMIXBUF_MACRO_LOG(("End: paDst=%p - paDstStart=%p -> %zu\n", paDst, paDstStart, paDst - paDstStart)); \
-        AUDMIXBUF_MACRO_LOG(("End: paSrc=%p - paSrcStart=%p -> %zu\n", paSrc, paSrcStart, paSrc - paSrcStart)); \
-        \
-        pRate->srcSampleLast = samLast; \
-        \
-        AUDMIXBUF_MACRO_LOG(("pRate->srcSampleLast l=%RI64, r=%RI64, lDelta=0x%RX64 (%RU64)\n", \
-                              pRate->srcSampleLast.i64LSample, pRate->srcSampleLast.i64RSample, lDelta, lDelta)); \
-        \
-        if (pcDstWritten) \
-            *pcDstWritten = paDst - paDstStart; \
-        if (pcSrcRead) \
-            *pcSrcRead = paSrc - paSrcStart; \
-    }
-
-/* audioMixBufOpAssign: Assigns values from source buffer to destination bufffer, overwriting the destination. */
-AUDMIXBUF_MIXOP(Assign /* Name */,  = /* Operation */)
-/* audioMixBufOpBlend: Blends together the values from both, the source and the destination buffer. */
-AUDMIXBUF_MIXOP(Blend  /* Name */, += /* Operation */)
-
-#undef AUDMIXBUF_MIXOP
-#undef AUDMIXBUF_MACRO_LOG
-
-/** Dummy conversion used when the source is muted. */
-AUDMIXBUF_MACRO_FN uint32_t audioMixBufConvFromSilence(PPDMAUDIOSAMPLE paDst, const void *pvSrc,
-                                                       uint32_t cbSrc, const PAUDMIXBUF_CONVOPTS pOpts)
-{
-    /* Internally zero always corresponds to silence. */
-    memset(paDst, 0, pOpts->cSamples * sizeof(paDst[0]));
-    return pOpts->cSamples;
-}
-
-/**
- * Looks up the matching conversion (macro) routine for converting
- * audio samples from a source format.
- *
- ** @todo Speed up the lookup by binding it to the actual stream state.
- *
- * @return  PAUDMIXBUF_FN_CONVFROM  Function pointer to conversion macro if found, NULL if not supported.
- * @param   enmFmt                  Audio format to lookup conversion macro for.
- * @param   fMuted                  Flag determining whether the source is muted.
- */
-static inline PAUDMIXBUF_FN_CONVFROM audioMixBufConvFromLookup(PDMAUDIOMIXBUFFMT enmFmt, bool fMuted)
-{
-    if (fMuted)
-        return audioMixBufConvFromSilence;
-
-    if (AUDMIXBUF_FMT_SIGNED(enmFmt))
-    {
-        if (AUDMIXBUF_FMT_CHANNELS(enmFmt) == 2)
-        {
-            switch (AUDMIXBUF_FMT_BITS_PER_SAMPLE(enmFmt))
-            {
-                case 8:  return audioMixBufConvFromS8Stereo;
-                case 16: return audioMixBufConvFromS16Stereo;
-                case 32: return audioMixBufConvFromS32Stereo;
-                default: return NULL;
-            }
-        }
-        else if (AUDMIXBUF_FMT_CHANNELS(enmFmt) == 1)
-        {
-            switch (AUDMIXBUF_FMT_BITS_PER_SAMPLE(enmFmt))
-            {
-                case 8:  return audioMixBufConvFromS8Mono;
-                case 16: return audioMixBufConvFromS16Mono;
-                case 32: return audioMixBufConvFromS32Mono;
-                default: return NULL;
-            }
-        }
-    }
-    else /* Unsigned */
-    {
-        if (AUDMIXBUF_FMT_CHANNELS(enmFmt) == 2)
-        {
-            switch (AUDMIXBUF_FMT_BITS_PER_SAMPLE(enmFmt))
-            {
-                case 8:  return audioMixBufConvFromU8Stereo;
-                case 16: return audioMixBufConvFromU16Stereo;
-                case 32: return audioMixBufConvFromU32Stereo;
-                default: return NULL;
-            }
-        }
-        else if (AUDMIXBUF_FMT_CHANNELS(enmFmt) == 1)
-        {
-            switch (AUDMIXBUF_FMT_BITS_PER_SAMPLE(enmFmt))
-            {
-                case 8:  return audioMixBufConvFromU8Mono;
-                case 16: return audioMixBufConvFromU16Mono;
-                case 32: return audioMixBufConvFromU32Mono;
-                default: return NULL;
-            }
-        }
-    }
-
-    return NULL;
-}
-
-/**
- * Looks up the matching conversion (macro) routine for converting
- * audio samples to a destination format.
- *
- ** @todo Speed up the lookup by binding it to the actual stream state.
- *
- * @return  PAUDMIXBUF_FN_CONVTO    Function pointer to conversion macro if found, NULL if not supported.
- * @param   enmFmt                  Audio format to lookup conversion macro for.
- */
-static inline PAUDMIXBUF_FN_CONVTO audioMixBufConvToLookup(PDMAUDIOMIXBUFFMT enmFmt)
-{
-    if (AUDMIXBUF_FMT_SIGNED(enmFmt))
-    {
-        if (AUDMIXBUF_FMT_CHANNELS(enmFmt) == 2)
-        {
-            switch (AUDMIXBUF_FMT_BITS_PER_SAMPLE(enmFmt))
-            {
-                case 8:  return audioMixBufConvToS8Stereo;
-                case 16: return audioMixBufConvToS16Stereo;
-                case 32: return audioMixBufConvToS32Stereo;
-                default: return NULL;
-            }
-        }
-        else if (AUDMIXBUF_FMT_CHANNELS(enmFmt) == 1)
-        {
-            switch (AUDMIXBUF_FMT_BITS_PER_SAMPLE(enmFmt))
-            {
-                case 8:  return audioMixBufConvToS8Mono;
-                case 16: return audioMixBufConvToS16Mono;
-                case 32: return audioMixBufConvToS32Mono;
-                default: return NULL;
-            }
-        }
-    }
-    else /* Unsigned */
-    {
-        if (AUDMIXBUF_FMT_CHANNELS(enmFmt) == 2)
-        {
-            switch (AUDMIXBUF_FMT_BITS_PER_SAMPLE(enmFmt))
-            {
-                case 8:  return audioMixBufConvToU8Stereo;
-                case 16: return audioMixBufConvToU16Stereo;
-                case 32: return audioMixBufConvToU32Stereo;
-                default: return NULL;
-            }
-        }
-        else if (AUDMIXBUF_FMT_CHANNELS(enmFmt) == 1)
-        {
-            switch (AUDMIXBUF_FMT_BITS_PER_SAMPLE(enmFmt))
-            {
-                case 8:  return audioMixBufConvToU8Mono;
-                case 16: return audioMixBufConvToU16Mono;
-                case 32: return audioMixBufConvToU32Mono;
-                default: return NULL;
-            }
-        }
-    }
-
-    return NULL;
-}
-
-/**
- * Initializes a mixing buffer.
- *
- * @return  IPRT status code.
- * @param   pMixBuf                 Mixing buffer to initialize.
- * @param   pszName                 Name of mixing buffer for easier identification. Optional.
- * @param   pProps                  PCM audio properties to use for the mixing buffer.
- * @param   cSamples                Maximum number of audio samples the mixing buffer can hold.
- */
-int AudioMixBufInit(PPDMAUDIOMIXBUF pMixBuf, const char *pszName, PPDMPCMPROPS pProps, uint32_t cSamples)
-{
-    AssertPtrReturn(pMixBuf, VERR_INVALID_POINTER);
-    AssertPtrReturn(pszName, VERR_INVALID_POINTER);
-    AssertPtrReturn(pProps,  VERR_INVALID_POINTER);
-
-    pMixBuf->pParent = NULL;
-    RTListInit(&pMixBuf->lstBuffers);
-
-    pMixBuf->pSamples = NULL;
-    pMixBuf->cSamples = 0;
-
-    pMixBuf->offReadWrite = 0;
-    pMixBuf->cMixed       = 0;
-    pMixBuf->cProcessed   = 0;
-
-    /* Set initial volume to max. */
-    pMixBuf->Volume.fMuted = false;
-    pMixBuf->Volume.uLeft  = AUDIOMIXBUF_VOL_0DB;
-    pMixBuf->Volume.uRight = AUDIOMIXBUF_VOL_0DB;
-
-    /* Prevent division by zero.
-     * Do a 1:1 conversion according to AUDIOMIXBUF_S2B_RATIO. */
-    pMixBuf->iFreqRatio = 1 << 20;
-
-    pMixBuf->pRate = NULL;
-
-    pMixBuf->AudioFmt = AUDMIXBUF_AUDIO_FMT_MAKE(pProps->uHz,
-                                                 pProps->cChannels,
-                                                 pProps->cBits,
-                                                 pProps->fSigned);
-    pMixBuf->cShift = pProps->cShift;
-    pMixBuf->pszName = RTStrDup(pszName);
-    if (!pMixBuf->pszName)
-        return VERR_NO_MEMORY;
-
-    AUDMIXBUF_LOG(("%s: uHz=%RU32, cChan=%RU8, cBits=%RU8, fSigned=%RTbool\n",
-                   pMixBuf->pszName,
-                   AUDMIXBUF_FMT_SAMPLE_FREQ(pMixBuf->AudioFmt),
-                   AUDMIXBUF_FMT_CHANNELS(pMixBuf->AudioFmt),
-                   AUDMIXBUF_FMT_BITS_PER_SAMPLE(pMixBuf->AudioFmt),
-                   RT_BOOL(AUDMIXBUF_FMT_SIGNED(pMixBuf->AudioFmt))));
-
-    return audioMixBufAlloc(pMixBuf, cSamples);
-}
-
-/**
- * Returns @true if there are any audio samples available for processing,
- * @false if not.
- *
- * @return  bool                    @true if there are any audio samples available for processing, @false if not.
- * @param   pMixBuf                 Mixing buffer to return value for.
- */
-bool AudioMixBufIsEmpty(PPDMAUDIOMIXBUF pMixBuf)
-{
-    AssertPtrReturn(pMixBuf, true);
-
-    if (pMixBuf->pParent)
-        return (pMixBuf->cMixed == 0);
-    return (pMixBuf->cProcessed == 0);
-}
-
-/**
- * Links an audio mixing buffer to a parent mixing buffer. A parent mixing
- * buffer can have multiple children mixing buffers [1:N], whereas a child only can
- * have one parent mixing buffer [N:1].
- *
- * The mixing direction always goes from the child/children buffer(s) to the
- * parent buffer.
- *
- * For guest audio output the host backend owns the parent mixing buffer, the
- * device emulation owns the child/children.
- *
- * The audio format of each mixing buffer can vary; the internal mixing code
- * then will autiomatically do the (needed) conversion.
- *
- * @return  IPRT status code.
- * @param   pMixBuf                 Mixing buffer to link parent to.
- * @param   pParent                 Parent mixing buffer to use for linking.
- *
- * @remark  Circular linking is not allowed.
- */
-int AudioMixBufLinkTo(PPDMAUDIOMIXBUF pMixBuf, PPDMAUDIOMIXBUF pParent)
-{
-    AssertPtrReturn(pMixBuf, VERR_INVALID_POINTER);
-    AssertPtrReturn(pParent, VERR_INVALID_POINTER);
-
-    AssertMsgReturn(AUDMIXBUF_FMT_SAMPLE_FREQ(pParent->AudioFmt),
-                    ("Parent sample frequency (Hz) not set\n"), VERR_INVALID_PARAMETER);
-    AssertMsgReturn(AUDMIXBUF_FMT_SAMPLE_FREQ(pMixBuf->AudioFmt),
-                    ("Buffer sample frequency (Hz) not set\n"), VERR_INVALID_PARAMETER);
-    AssertMsgReturn(pMixBuf != pParent,
-                    ("Circular linking not allowed\n"), VERR_INVALID_PARAMETER);
-
-    if (pMixBuf->pParent) /* Already linked? */
-    {
-        AUDMIXBUF_LOG(("%s: Already linked to \"%s\"\n",
-                       pMixBuf->pszName, pMixBuf->pParent->pszName));
-        return VERR_ACCESS_DENIED;
-    }
-
-    RTListAppend(&pParent->lstBuffers, &pMixBuf->Node);
-    pMixBuf->pParent = pParent;
-
-    /* Calculate the frequency ratio. */
-    pMixBuf->iFreqRatio = ((int64_t)AUDMIXBUF_FMT_SAMPLE_FREQ(pParent->AudioFmt) << 32)
-                        /           AUDMIXBUF_FMT_SAMPLE_FREQ(pMixBuf->AudioFmt);
-
-    if (pMixBuf->iFreqRatio == 0) /* Catch division by zero. */
-        pMixBuf->iFreqRatio = 1 << 20; /* Do a 1:1 conversion instead. */
-
-    uint32_t cSamples = (uint32_t)RT_MIN(  ((uint64_t)pParent->cSamples << 32)
-                                         / pMixBuf->iFreqRatio, _64K /* 64K samples max. */);
-    if (!cSamples)
-        cSamples = pParent->cSamples;
-
-    int rc = VINF_SUCCESS;
-
-    if (cSamples != pMixBuf->cSamples)
-    {
-        AUDMIXBUF_LOG(("%s: Reallocating samples %RU32 -> %RU32\n",
-                       pMixBuf->pszName, pMixBuf->cSamples, cSamples));
-
-        uint32_t cbSamples = cSamples * sizeof(PDMAUDIOSAMPLE);
-        Assert(cbSamples);
-        pMixBuf->pSamples = (PPDMAUDIOSAMPLE)RTMemRealloc(pMixBuf->pSamples, cbSamples);
-        if (!pMixBuf->pSamples)
-            rc = VERR_NO_MEMORY;
-
-        if (RT_SUCCESS(rc))
-        {
-            pMixBuf->cSamples = cSamples;
-
-            /* Make sure to zero the reallocated buffer so that it can be
-             * used properly when blending with another buffer later. */
-            RT_BZERO(pMixBuf->pSamples, cbSamples);
-        }
-    }
-
-    if (RT_SUCCESS(rc))
-    {
-        if (!pMixBuf->pRate)
-        {
-            /* Create rate conversion. */
-            pMixBuf->pRate = (PPDMAUDIOSTRMRATE)RTMemAllocZ(sizeof(PDMAUDIOSTRMRATE));
-            if (!pMixBuf->pRate)
-                return VERR_NO_MEMORY;
-        }
-        else
-            RT_BZERO(pMixBuf->pRate, sizeof(PDMAUDIOSTRMRATE));
-
-        pMixBuf->pRate->dstInc = ((uint64_t)AUDMIXBUF_FMT_SAMPLE_FREQ(pMixBuf->AudioFmt) << 32)
-                               /            AUDMIXBUF_FMT_SAMPLE_FREQ(pParent->AudioFmt);
-
-        AUDMIXBUF_LOG(("uThisHz=%RU32, uParentHz=%RU32, iFreqRatio=0x%RX64 (%RI64), uRateInc=0x%RX64 (%RU64), cSamples=%RU32 (%RU32 parent)\n",
-                       AUDMIXBUF_FMT_SAMPLE_FREQ(pMixBuf->AudioFmt),
-                       AUDMIXBUF_FMT_SAMPLE_FREQ(pParent->AudioFmt),
-                       pMixBuf->iFreqRatio, pMixBuf->iFreqRatio,
-                       pMixBuf->pRate->dstInc, pMixBuf->pRate->dstInc,
-                       pMixBuf->cSamples,
-                       pParent->cSamples));
-        AUDMIXBUF_LOG(("%s (%RU32Hz) -> %s (%RU32Hz)\n",
-                       pMixBuf->pszName, AUDMIXBUF_FMT_SAMPLE_FREQ(pMixBuf->AudioFmt),
-                       pMixBuf->pParent->pszName, AUDMIXBUF_FMT_SAMPLE_FREQ(pParent->AudioFmt)));
-    }
-
-    return rc;
-}
-
-/**
- * Returns the number of audio samples mixed (processed) by
- * the parent mixing buffer.
- *
- * @return  uint32_t                Number of audio samples mixed (processed).
- * @param   pMixBuf                 Mixing buffer to return number from.
- */
-uint32_t AudioMixBufMixed(PPDMAUDIOMIXBUF pMixBuf)
-{
-    AssertPtrReturn(pMixBuf, 0);
-
-    AssertMsgReturn(VALID_PTR(pMixBuf->pParent),
-                              ("Buffer is not linked to a parent buffer\n"),
-                              0);
-
-    AUDMIXBUF_LOG(("%s: cMixed=%RU32\n", pMixBuf->pszName, pMixBuf->cMixed));
-    return pMixBuf->cMixed;
-}
-
-/**
- * Mixes audio samples from a source mixing buffer to a destination mixing buffer.
- *
- * @return  IPRT status code.
- * @param   pDst                    Destination mixing buffer.
- * @param   pSrc                    Source mixing buffer.
- * @param   cSamples                Number of source audio samples to mix.
- * @param   pcProcessed             Number of audio samples successfully mixed.
- */
-static int audioMixBufMixTo(PPDMAUDIOMIXBUF pDst, PPDMAUDIOMIXBUF pSrc, uint32_t cSamples, uint32_t *pcProcessed)
-{
-    AssertPtrReturn(pDst, VERR_INVALID_POINTER);
-    AssertPtrReturn(pSrc, VERR_INVALID_POINTER);
-    AssertReturn(cSamples, VERR_INVALID_PARAMETER);
-    /* pcProcessed is optional. */
-
-    /* Live samples indicate how many samples there are in the source buffer
-     * which have not been processed yet by the destination buffer. */
-    uint32_t cLive = pSrc->cMixed;
-    if (cLive >= pDst->cSamples)
-        AUDMIXBUF_LOG(("Destination buffer \"%s\" full (%RU32 samples max), live samples = %RU32\n",
-                       pDst->pszName, pDst->cSamples, cLive));
-
-    /* Dead samples are the number of samples in the destination buffer which
-     * will not be needed, that is, are not needed in order to process the live
-     * samples of the source buffer. */
-    uint32_t cDead = pDst->cSamples - cLive;
-
-    uint32_t cToReadTotal = (uint32_t)RT_MIN(cSamples, AUDIOMIXBUF_S2S_RATIO(pSrc, cDead));
-    uint32_t offRead = 0;
-
-    uint32_t cReadTotal = 0;
-    uint32_t cWrittenTotal = 0;
-    uint32_t offWrite = (pDst->offReadWrite + cLive) % pDst->cSamples;
-
-    AUDMIXBUF_LOG(("pSrc=%s (%RU32 samples), pDst=%s (%RU32 samples), cLive=%RU32, cDead=%RU32, cToReadTotal=%RU32, offWrite=%RU32\n",
-                   pSrc->pszName, pSrc->cSamples, pDst->pszName, pDst->cSamples, cLive, cDead, cToReadTotal, offWrite));
-
-    uint32_t cToRead, cToWrite;
-    uint32_t cWritten, cRead;
-
-    while (cToReadTotal)
-    {
-        cDead = pDst->cSamples - cLive;
-
-        cToRead  = cToReadTotal;
-        cToWrite = RT_MIN(cDead, pDst->cSamples - offWrite);
-        if (!cToWrite)
-        {
-            AUDMIXBUF_LOG(("Warning: Destination buffer \"%s\" full\n", pDst->pszName));
-            break;
-        }
-
-        Assert(offWrite + cToWrite <= pDst->cSamples);
-        Assert(offRead + cToRead <= pSrc->cSamples);
-
-        AUDMIXBUF_LOG(("\t%RU32Hz -> %RU32Hz\n", AUDMIXBUF_FMT_SAMPLE_FREQ(pSrc->AudioFmt), AUDMIXBUF_FMT_SAMPLE_FREQ(pDst->AudioFmt)));
-        AUDMIXBUF_LOG(("\tcDead=%RU32, offWrite=%RU32, cToWrite=%RU32, offRead=%RU32, cToRead=%RU32\n",
-                       cDead, offWrite, cToWrite, offRead, cToRead));
-
-        audioMixBufOpBlend(pDst->pSamples + offWrite, cToWrite,
-                           pSrc->pSamples + offRead, cToRead,
-                           pSrc->pRate, &cWritten, &cRead);
-
-        AUDMIXBUF_LOG(("\t\tcWritten=%RU32, cRead=%RU32\n", cWritten, cRead));
-
-        cReadTotal    += cRead;
-        cWrittenTotal += cWritten;
-
-        offRead += cRead;
-        Assert(cToReadTotal >= cRead);
-        cToReadTotal -= cRead;
-
-        offWrite = (offWrite + cWritten) % pDst->cSamples;
-
-        cLive += cWritten;
-    }
-
-    pSrc->cMixed     += cWrittenTotal;
-    pDst->cProcessed += cWrittenTotal;
-#ifdef DEBUG
-    s_cSamplesMixedTotal += cWrittenTotal;
-    audioMixBufPrint(pDst);
-#endif
-
-    if (pcProcessed)
-        *pcProcessed = cReadTotal;
-
-    AUDMIXBUF_LOG(("cReadTotal=%RU32 (pcProcessed), cWrittenTotal=%RU32, cSrcMixed=%RU32, cDstProc=%RU32\n",
-                   cReadTotal, cWrittenTotal, pSrc->cMixed, pDst->cProcessed));
-    return VINF_SUCCESS;
-}
-
-/**
- * Mixes (multiplexes) audio samples to all connected mixing buffer children.
- *
- * @return  IPRT status code.
- * @param   pMixBuf                 Mixing buffer to use.
- * @param   cSamples                Number of audio samples to mix to children.
- * @param   pcProcessed             Maximum number of audio samples successfully mixed
- *                                  to all children. Optional.
- */
-int AudioMixBufMixToChildren(PPDMAUDIOMIXBUF pMixBuf, uint32_t cSamples,
-                             uint32_t *pcProcessed)
-{
-    AssertPtrReturn(pMixBuf, VERR_INVALID_POINTER);
-
-    if (!cSamples)
-    {
-        if (pcProcessed)
-            *pcProcessed = 0;
-        return VINF_SUCCESS;
-    }
-
-    int rc = VINF_SUCCESS;
-
-    uint32_t cProcessed;
-    uint32_t cProcessedMax = 0;
-
-    PPDMAUDIOMIXBUF pIter;
-    RTListForEach(&pMixBuf->lstBuffers, pIter, PDMAUDIOMIXBUF, Node)
-    {
-        rc = audioMixBufMixTo(pIter, pMixBuf, cSamples, &cProcessed);
-        if (RT_FAILURE(rc))
-            break;
-
-        cProcessedMax = RT_MAX(cProcessedMax, cProcessed);
-    }
-
-    if (pcProcessed)
-        *pcProcessed = cProcessedMax;
-
-    return rc;
-}
-
-/**
- * Mixes audio samples down to the parent mixing buffer.
- *
- * @return  IPRT status code.
- * @param   pMixBuf                 Mixing buffer to mix samples down to parent.
- * @param   cSamples                Number of audio samples to mix down.
- * @param   pcProcessed             Number of audio samples successfully processed. Optional.
- */
-int AudioMixBufMixToParent(PPDMAUDIOMIXBUF pMixBuf, uint32_t cSamples,
-                           uint32_t *pcProcessed)
-{
-    AssertMsgReturn(VALID_PTR(pMixBuf->pParent),
-                    ("Buffer is not linked to a parent buffer\n"),
-                    VERR_INVALID_PARAMETER);
-
-    return audioMixBufMixTo(pMixBuf->pParent, pMixBuf, cSamples, pcProcessed);
-}
-
-#ifdef DEBUG
-/**
- * Prints statistics and status of a mixing buffer to the logger.
- * For debug versions only.
- *
- * @return  IPRT status code.
- * @param   pMixBuf                 Mixing buffer to print.
- */
-static inline void audioMixBufPrint(PPDMAUDIOMIXBUF pMixBuf)
-{
-    PPDMAUDIOMIXBUF pParent = pMixBuf;
-    if (pMixBuf->pParent)
-        pParent = pMixBuf->pParent;
-
-    AUDMIXBUF_LOG(("********************************************\n"));
-    AUDMIXBUF_LOG(("%s: offReadWrite=%RU32, cProcessed=%RU32, cMixed=%RU32 (BpS=%RU32)\n",
-                   pParent->pszName,
-                   pParent->offReadWrite, pParent->cProcessed, pParent->cMixed,
-                   AUDIOMIXBUF_S2B(pParent, 1)));
-
-    PPDMAUDIOMIXBUF pIter;
-    RTListForEach(&pParent->lstBuffers, pIter, PDMAUDIOMIXBUF, Node)
-    {
-        AUDMIXBUF_LOG(("\t%s: offReadWrite=%RU32, cProcessed=%RU32, cMixed=%RU32 (BpS=%RU32)\n",
-                       pIter->pszName,
-                       pIter->offReadWrite, pIter->cProcessed, pIter->cMixed,
-                       AUDIOMIXBUF_S2B(pIter, 1)));
-    }
-    AUDMIXBUF_LOG(("Total samples mixed: %RU64\n", s_cSamplesMixedTotal));
-    AUDMIXBUF_LOG(("********************************************\n"));
-}
-#endif
-
-/**
- * Returns the total number of samples processed.
- *
- * @return  uint32_t
- * @param   pMixBuf
- */
-uint32_t AudioMixBufProcessed(PPDMAUDIOMIXBUF pMixBuf)
-{
-    AssertPtrReturn(pMixBuf, 0);
-
-    AUDMIXBUF_LOG(("%s: cProcessed=%RU32\n", pMixBuf->pszName, pMixBuf->cProcessed));
-    return pMixBuf->cProcessed;
-}
-
-/**
- * Reads audio samples at a specific offset.
- *
- * @return  IPRT status code.
- * @param   pMixBuf                 Mixing buffer to read audio samples from.
- * @param   offSamples              Offset (in audio samples) to start reading from.
- * @param   pvBuf                   Pointer to buffer to write output to.
- * @param   cbBuf                   Size (in bytes) of buffer to write to.
- * @param   pcbRead                 Size (in bytes) of data read. Optional.
- */
-int AudioMixBufReadAt(PPDMAUDIOMIXBUF pMixBuf,
-                      uint32_t offSamples,
-                      void *pvBuf, uint32_t cbBuf,
-                      uint32_t *pcbRead)
-{
-    return AudioMixBufReadAtEx(pMixBuf, pMixBuf->AudioFmt,
-                               offSamples, pvBuf, cbBuf, pcbRead);
-}
-
-/**
- * Reads audio samples at a specific offset.
- * If the audio format of the mixing buffer and the requested audio format do
- * not match the output will be converted accordingly.
- *
- * @return  IPRT status code.
- * @param   pMixBuf                 Mixing buffer to read audio samples from.
- * @param   enmFmt                  Audio format to use for output.
- * @param   offSamples              Offset (in audio samples) to start reading from.
- * @param   pvBuf                   Pointer to buffer to write output to.
- * @param   cbBuf                   Size (in bytes) of buffer to write to.
- * @param   pcbRead                 Size (in bytes) of data read. Optional.
- */
-int AudioMixBufReadAtEx(PPDMAUDIOMIXBUF pMixBuf, PDMAUDIOMIXBUFFMT enmFmt,
-                        uint32_t offSamples,
-                        void *pvBuf, uint32_t cbBuf,
-                        uint32_t *pcbRead)
-{
-    AssertPtrReturn(pMixBuf, VERR_INVALID_POINTER);
-    AssertPtrReturn(pvBuf, VERR_INVALID_POINTER);
-    /* pcbRead is optional. */
-
-    uint32_t cDstSamples = pMixBuf->cSamples;
-    uint32_t cLive = pMixBuf->cProcessed;
-
-    uint32_t cDead = cDstSamples - cLive;
-    uint32_t cToProcess = (uint32_t)AUDIOMIXBUF_S2S_RATIO(pMixBuf, cDead);
-    cToProcess = RT_MIN(cToProcess, AUDIOMIXBUF_B2S(pMixBuf, cbBuf));
-
-    AUDMIXBUF_LOG(("%s: offSamples=%RU32, cLive=%RU32, cDead=%RU32, cToProcess=%RU32\n",
-                   pMixBuf->pszName, offSamples, cLive, cDead, cToProcess));
-
-    int rc;
-    if (cToProcess)
-    {
-        PAUDMIXBUF_FN_CONVTO pConv = audioMixBufConvToLookup(enmFmt);
-        if (pConv)
-        {
-            AUDMIXBUF_CONVOPTS convOpts = { cToProcess, pMixBuf->Volume };
-            pConv(pvBuf, pMixBuf->pSamples + offSamples, &convOpts);
-
-            rc = VINF_SUCCESS;
-        }
-        else
-            rc = VERR_INVALID_PARAMETER;
-
-#ifdef DEBUG
-        audioMixBufPrint(pMixBuf);
-#endif
-    }
-    else
-        rc = VINF_SUCCESS;
-
-    if (RT_SUCCESS(rc))
-    {
-        if (pcbRead)
-            *pcbRead = AUDIOMIXBUF_S2B(pMixBuf, cToProcess);
-    }
-
-    AUDMIXBUF_LOG(("cbRead=%RU32, rc=%Rrc\n", AUDIOMIXBUF_S2B(pMixBuf, cToProcess), rc));
-    return rc;
-}
-
-/**
- * Reads audio samples. The audio format of the mixing buffer will be used.
- *
- * @return  IPRT status code.
- * @param   pMixBuf                 Mixing buffer to read audio samples from.
- * @param   pvBuf                   Pointer to buffer to write output to.
- * @param   cbBuf                   Size (in bytes) of buffer to write to.
- * @param   pcRead                  Number of audio samples read. Optional.
- */
-int AudioMixBufReadCirc(PPDMAUDIOMIXBUF pMixBuf,
-                        void *pvBuf, uint32_t cbBuf, uint32_t *pcRead)
-{
-    return AudioMixBufReadCircEx(pMixBuf, pMixBuf->AudioFmt,
-                                 pvBuf, cbBuf, pcRead);
-}
-
-/**
- * Reads audio samples in a specific audio format.
- * If the audio format of the mixing buffer and the requested audio format do
- * not match the output will be converted accordingly.
- *
- * @return  IPRT status code.
- * @param   pMixBuf                 Mixing buffer to read audio samples from.
- * @param   enmFmt                  Audio format to use for output.
- * @param   pvBuf                   Pointer to buffer to write output to.
- * @param   cbBuf                   Size (in bytes) of buffer to write to.
- * @param   pcRead                  Number of audio samples read. Optional.
- */
-int AudioMixBufReadCircEx(PPDMAUDIOMIXBUF pMixBuf, PDMAUDIOMIXBUFFMT enmFmt,
-                          void *pvBuf, uint32_t cbBuf, uint32_t *pcRead)
-{
-    AssertPtrReturn(pMixBuf, VERR_INVALID_POINTER);
-    AssertPtrReturn(pvBuf, VERR_INVALID_POINTER);
-    /* pcbRead is optional. */
-
-    if (!cbBuf)
-        return VINF_SUCCESS;
-
-    uint32_t cToRead = RT_MIN(AUDIOMIXBUF_B2S(pMixBuf, cbBuf), pMixBuf->cProcessed);
-
-    AUDMIXBUF_LOG(("%s: pvBuf=%p, cbBuf=%zu (%RU32 samples), cToRead=%RU32\n",
-                   pMixBuf->pszName, pvBuf, cbBuf, AUDIOMIXBUF_B2S(pMixBuf, cbBuf), cToRead));
-
-    if (!cToRead)
-    {
-#ifdef DEBUG
-        audioMixBufPrint(pMixBuf);
-#endif
-        if (pcRead)
-            *pcRead = 0;
-        return VINF_SUCCESS;
-    }
-
-    PAUDMIXBUF_FN_CONVTO pConv = audioMixBufConvToLookup(enmFmt);
-    if (!pConv) /* Audio format not supported. */
-        return VERR_NOT_SUPPORTED;
-
-    PPDMAUDIOSAMPLE pSamplesSrc1 = pMixBuf->pSamples + pMixBuf->offReadWrite;
-    uint32_t cLenSrc1 = cToRead;
-
-    PPDMAUDIOSAMPLE pSamplesSrc2 = NULL;
-    uint32_t cLenSrc2 = 0;
-
-    uint32_t offRead = pMixBuf->offReadWrite + cToRead;
-
-    /*
-     * Do we need to wrap around to read all requested data, that is,
-     * starting at the beginning of our circular buffer? This then will
-     * be the optional second part to do.
-     */
-    if (offRead >= pMixBuf->cSamples)
-    {
-        Assert(pMixBuf->offReadWrite <= pMixBuf->cSamples);
-        cLenSrc1 = pMixBuf->cSamples - pMixBuf->offReadWrite;
-
-        pSamplesSrc2 = pMixBuf->pSamples;
-        Assert(cToRead >= cLenSrc1);
-        cLenSrc2 = RT_MIN(cToRead - cLenSrc1, pMixBuf->cSamples);
-
-        /* Save new read offset. */
-        offRead = cLenSrc2;
-    }
-
-    AUDMIXBUF_CONVOPTS convOpts;
-    convOpts.Volume = pMixBuf->Volume;
-
-    /* Anything to do at all? */
-    int rc = VINF_SUCCESS;
-    if (cLenSrc1)
-    {
-        convOpts.cSamples = cLenSrc1;
-
-        AUDMIXBUF_LOG(("P1: offRead=%RU32, cToRead=%RU32\n", pMixBuf->offReadWrite, cLenSrc1));
-        pConv(pvBuf, pSamplesSrc1, &convOpts);
-    }
-
-    /* Second part present? */
-    if (   RT_LIKELY(RT_SUCCESS(rc))
-        && cLenSrc2)
-    {
-        AssertPtr(pSamplesSrc2);
-
-        convOpts.cSamples = cLenSrc2;
-
-        AUDMIXBUF_LOG(("P2: cToRead=%RU32, offWrite=%RU32 (%zu bytes)\n", cLenSrc2, cLenSrc1,
-                       AUDIOMIXBUF_S2B(pMixBuf, cLenSrc1)));
-        pConv((uint8_t *)pvBuf + AUDIOMIXBUF_S2B(pMixBuf, cLenSrc1), pSamplesSrc2, &convOpts);
-    }
-
-    if (RT_SUCCESS(rc))
-    {
-#ifdef DEBUG_DUMP_PCM_DATA
-        RTFILE fh;
-        rc = RTFileOpen(&fh, DEBUG_DUMP_PCM_DATA_PATH "mixbuf_readcirc.pcm",
-                        RTFILE_O_OPEN_CREATE | RTFILE_O_APPEND | RTFILE_O_WRITE | RTFILE_O_DENY_NONE);
-        if (RT_SUCCESS(rc))
-        {
-            RTFileWrite(fh, pvBuf, AUDIOMIXBUF_S2B(pMixBuf, cLenSrc1 + cLenSrc2), NULL);
-            RTFileClose(fh);
-        }
-#endif
-        pMixBuf->offReadWrite  = offRead % pMixBuf->cSamples;
-        pMixBuf->cProcessed   -= RT_MIN(cLenSrc1 + cLenSrc2, pMixBuf->cProcessed);
-
-        if (pcRead)
-            *pcRead = cLenSrc1 + cLenSrc2;
-    }
-
-#ifdef DEBUG
-    audioMixBufPrint(pMixBuf);
-#endif
-
-    AUDMIXBUF_LOG(("cRead=%RU32 (%zu bytes), rc=%Rrc\n",
-                   cLenSrc1 + cLenSrc2,
-                   AUDIOMIXBUF_S2B(pMixBuf, cLenSrc1 + cLenSrc2), rc));
-    return rc;
-}
-
-/**
- * Resets a mixing buffer.
- *
- * @param   pMixBuf                 Mixing buffer to reset.
- */
-void AudioMixBufReset(PPDMAUDIOMIXBUF pMixBuf)
-{
-    AssertPtrReturnVoid(pMixBuf);
-
-    AUDMIXBUF_LOG(("%s\n", pMixBuf->pszName));
-
-    pMixBuf->offReadWrite = 0;
-    pMixBuf->cMixed       = 0;
-    pMixBuf->cProcessed   = 0;
-
-    AudioMixBufClear(pMixBuf);
-}
-
-/**
- * Sets the overall (master) volume.
- *
- * @param   pMixBuf                 Mixing buffer to set volume for.
- * @param   pVol                    Pointer to volume structure to set.
- */
-void AudioMixBufSetVolume(PPDMAUDIOMIXBUF pMixBuf, PPDMAUDIOVOLUME pVol)
-{
-    AssertPtrReturnVoid(pMixBuf);
-    AssertPtrReturnVoid(pVol);
-
-    LogFlowFunc(("%s: lVol=%RU32, rVol=%RU32\n", pMixBuf->pszName, pVol->uLeft, pVol->uRight));
-
-    pMixBuf->Volume.fMuted = pVol->fMuted;
-    /** @todo Ensure that the input is in the correct range/initialized! */
-    pMixBuf->Volume.uLeft  = s_aVolumeConv[pVol->uLeft  & 0xFF] * (AUDIOMIXBUF_VOL_0DB >> 16);
-    pMixBuf->Volume.uRight = s_aVolumeConv[pVol->uRight & 0xFF] * (AUDIOMIXBUF_VOL_0DB >> 16);
-
-    LogFlowFunc(("\t-> lVol=%#RX32, rVol=%#RX32\n", pMixBuf->Volume.uLeft, pMixBuf->Volume.uRight));
-}
-
-/**
- * Returns the maximum amount of audio samples this buffer can hold.
- *
- * @return  uint32_t                Size (in audio samples) the mixing buffer can hold.
- * @param   pMixBuf                 Mixing buffer to retrieve maximum for.
- */
-uint32_t AudioMixBufSize(PPDMAUDIOMIXBUF pMixBuf)
-{
-    AssertPtrReturn(pMixBuf, 0);
-    return pMixBuf->cSamples;
-}
-
-/**
- * Returns the maximum amount of bytes this buffer can hold.
- *
- * @return  uint32_t                Size (in bytes) the mixing buffer can hold.
- * @param   pMixBuf                 Mixing buffer to retrieve maximum for.
- */
-uint32_t AudioMixBufSizeBytes(PPDMAUDIOMIXBUF pMixBuf)
-{
-    AssertPtrReturn(pMixBuf, 0);
-    return AUDIOMIXBUF_S2B(pMixBuf, pMixBuf->cSamples);
-}
-
-/**
- * Unlinks a mixing buffer from its parent, if any.
- *
- * @return  IPRT status code.
- * @param   pMixBuf                 Mixing buffer to unlink from parent.
- */
-void AudioMixBufUnlink(PPDMAUDIOMIXBUF pMixBuf)
-{
-    if (!pMixBuf || !pMixBuf->pszName)
-        return;
-
-    AUDMIXBUF_LOG(("%s\n", pMixBuf->pszName));
-
-    if (pMixBuf->pParent)
-    {
-        AUDMIXBUF_LOG(("%s: Unlinking from parent \"%s\"\n",
-                       pMixBuf->pszName, pMixBuf->pParent->pszName));
-
-        RTListNodeRemove(&pMixBuf->Node);
-
-        /* Make sure to reset the parent mixing buffer each time it gets linked
-         * to a new child. */
-        AudioMixBufReset(pMixBuf->pParent);
-        pMixBuf->pParent = NULL;
-    }
-
-    PPDMAUDIOMIXBUF pIter;
-    while (!RTListIsEmpty(&pMixBuf->lstBuffers))
-    {
-        pIter = RTListGetFirst(&pMixBuf->lstBuffers, PDMAUDIOMIXBUF, Node);
-
-        AUDMIXBUF_LOG(("\tUnlinking \"%s\"\n", pIter->pszName));
-
-        AudioMixBufReset(pIter->pParent);
-        pIter->pParent = NULL;
-
-        RTListNodeRemove(&pIter->Node);
-    }
-
-    if (pMixBuf->pRate)
-    {
-        pMixBuf->pRate->dstOffset = pMixBuf->pRate->srcOffset = 0;
-        pMixBuf->pRate->dstInc = 0;
-    }
-
-    pMixBuf->iFreqRatio = 1; /* Prevent division by zero. */
-}
-
-/**
- * Writes audio samples at a specific offset.
- * The sample format being written must match the format of the mixing buffer.
- *
- * @return  IPRT status code.
- * @param   pMixBuf                 Pointer to mixing buffer to write to.
- * @param   enmFmt                  Audio format supplied in the buffer.
- * @param   offSamples              Offset (in samples) starting to write at.
- * @param   pvBuf                   Pointer to audio buffer to be written.
- * @param   cbBuf                   Size (in bytes) of audio buffer.
- * @param   pcWritten               Returns number of audio samples written. Optional.
- */
-int AudioMixBufWriteAt(PPDMAUDIOMIXBUF pMixBuf,
-                       uint32_t offSamples,
-                       const void *pvBuf, uint32_t cbBuf,
-                       uint32_t *pcWritten)
-{
-    return AudioMixBufWriteAtEx(pMixBuf, pMixBuf->AudioFmt,
-                                offSamples, pvBuf, cbBuf, pcWritten);
-}
-
-/**
- * Writes audio samples at a specific offset. The audio sample format
- * to be written can be different from the audio format the mixing buffer
- * operates on.
- *
- * @return  IPRT status code.
- * @param   pMixBuf                 Pointer to mixing buffer to write to.
- * @param   enmFmt                  Audio format supplied in the buffer.
- * @param   offSamples              Offset (in samples) starting to write at.
- * @param   pvBuf                   Pointer to audio buffer to be written.
- * @param   cbBuf                   Size (in bytes) of audio buffer.
- * @param   pcWritten               Returns number of audio samples written. Optional.
- */
-int AudioMixBufWriteAtEx(PPDMAUDIOMIXBUF pMixBuf, PDMAUDIOMIXBUFFMT enmFmt,
-                         uint32_t offSamples,
-                         const void *pvBuf, uint32_t cbBuf,
-                         uint32_t *pcWritten)
-{
-    AssertPtrReturn(pMixBuf, VERR_INVALID_POINTER);
-    AssertPtrReturn(pvBuf, VERR_INVALID_POINTER);
-    /* pcWritten is optional. */
-
-    uint32_t cDstSamples = pMixBuf->pParent
-                         ? pMixBuf->pParent->cSamples : pMixBuf->cSamples;
-    uint32_t cLive = pMixBuf->cProcessed;
-
-    uint32_t cDead = cDstSamples - cLive;
-    uint32_t cToProcess = (uint32_t)AUDIOMIXBUF_S2S_RATIO(pMixBuf, cDead);
-    cToProcess = RT_MIN(cToProcess, AUDIOMIXBUF_B2S(pMixBuf, cbBuf));
-
-    AUDMIXBUF_LOG(("%s: offSamples=%RU32, cLive=%RU32, cDead=%RU32, cToProcess=%RU32\n",
-                   pMixBuf->pszName, offSamples, cLive, cDead, cToProcess));
-
-    if (offSamples + cToProcess > pMixBuf->cSamples)
-        return VERR_BUFFER_OVERFLOW;
-
-    PAUDMIXBUF_FN_CONVFROM pConv = audioMixBufConvFromLookup(enmFmt, pMixBuf->Volume.fMuted);
-    if (!pConv)
-        return VERR_NOT_SUPPORTED;
-
-    int rc;
-    uint32_t cWritten;
-
-#ifdef DEBUG_DUMP_PCM_DATA
-    RTFILE fh;
-    rc = RTFileOpen(&fh, DEBUG_DUMP_PCM_DATA_PATH "mixbuf_writeat.pcm",
-                    RTFILE_O_OPEN_CREATE | RTFILE_O_APPEND | RTFILE_O_WRITE | RTFILE_O_DENY_NONE);
-    if (RT_SUCCESS(rc))
-    {
-        RTFileWrite(fh, pvBuf, cbBuf, NULL);
-        RTFileClose(fh);
-    }
-#endif
-
-    if (cToProcess)
-    {
-        AUDMIXBUF_CONVOPTS convOpts = { cToProcess, pMixBuf->Volume };
-
-        cWritten = pConv(pMixBuf->pSamples + offSamples, pvBuf, cbBuf, &convOpts);
-#ifdef DEBUG
-        audioMixBufPrint(pMixBuf);
-#endif
-        rc = cWritten ? VINF_SUCCESS : VERR_GENERAL_FAILURE; /** @todo Fudge! */
-    }
-    else
-    {
-        cWritten = 0;
-        rc = VINF_SUCCESS;
-    }
-
-    if (RT_SUCCESS(rc))
-    {
-        if (pcWritten)
-            *pcWritten = cWritten;
-    }
-
-    AUDMIXBUF_LOG(("cWritten=%RU32, rc=%Rrc\n", cWritten, rc));
-    return rc;
-}
-
-/**
- * Writes audio samples. The sample format being written must match the
- * format of the mixing buffer.
- *
- * @return  IPRT status code.
- * @param   pMixBuf                 Pointer to mixing buffer to write to.
- * @param   pvBuf                   Pointer to audio buffer to be written.
- * @param   cbBuf                   Size (in bytes) of audio buffer.
- * @param   pcWritten               Returns number of audio samples written. Optional.
- */
-int AudioMixBufWriteCirc(PPDMAUDIOMIXBUF pMixBuf,
-                         const void *pvBuf, uint32_t cbBuf,
-                         uint32_t *pcWritten)
-{
-    return AudioMixBufWriteCircEx(pMixBuf, pMixBuf->AudioFmt, pvBuf, cbBuf, pcWritten);
-}
-
-/**
- * Writes audio samples of a specific format.
- *
- * @return  IPRT status code.
- * @param   pMixBuf                 Pointer to mixing buffer to write to.
- * @param   enmFmt                  Audio format supplied in the buffer.
- * @param   pvBuf                   Pointer to audio buffer to be written.
- * @param   cbBuf                   Size (in bytes) of audio buffer.
- * @param   pcWritten               Returns number of audio samples written. Optional.
- */
-int AudioMixBufWriteCircEx(PPDMAUDIOMIXBUF pMixBuf, PDMAUDIOMIXBUFFMT enmFmt,
-                           const void *pvBuf, uint32_t cbBuf,
-                           uint32_t *pcWritten)
-{
-    AssertPtrReturn(pMixBuf, VERR_INVALID_POINTER);
-    AssertPtrReturn(pvBuf, VERR_INVALID_POINTER);
-    /* pcbWritten is optional. */
-
-    if (!cbBuf)
-    {
-        if (pcWritten)
-            *pcWritten = 0;
-        return VINF_SUCCESS;
-    }
-
-    PPDMAUDIOMIXBUF pParent = pMixBuf->pParent;
-
-    AUDMIXBUF_LOG(("%s: enmFmt=%ld, pBuf=%p, cbBuf=%zu, pParent=%p (%RU32)\n",
-                   pMixBuf->pszName, enmFmt, pvBuf, cbBuf, pParent, pParent ? pParent->cSamples : 0));
-
-    if (   pParent
-        && pParent->cSamples <= pMixBuf->cMixed)
-    {
-        if (pcWritten)
-            *pcWritten = 0;
-
-        AUDMIXBUF_LOG(("%s: Parent buffer %s is full\n",
-                       pMixBuf->pszName, pMixBuf->pParent->pszName));
-
-        return VINF_SUCCESS;
-    }
-
-    PAUDMIXBUF_FN_CONVFROM pConv = audioMixBufConvFromLookup(enmFmt, pMixBuf->Volume.fMuted);
-    if (!pConv)
-        return VERR_NOT_SUPPORTED;
-
-    int rc = VINF_SUCCESS;
-
-    uint32_t cToWrite = AUDIOMIXBUF_B2S(pMixBuf, cbBuf);
-    AssertMsg(cToWrite, ("cToWrite is 0 (cbBuf=%zu)\n", cbBuf));
-
-    PPDMAUDIOSAMPLE pSamplesDst1 = pMixBuf->pSamples + pMixBuf->offReadWrite;
-    uint32_t cLenDst1 = cToWrite;
-
-    PPDMAUDIOSAMPLE pSamplesDst2 = NULL;
-    uint32_t cLenDst2 = 0;
-
-    uint32_t offWrite = pMixBuf->offReadWrite + cToWrite;
-
-    /*
-     * Do we need to wrap around to write all requested data, that is,
-     * starting at the beginning of our circular buffer? This then will
-     * be the optional second part to do.
-     */
-    if (offWrite >= pMixBuf->cSamples)
-    {
-        Assert(pMixBuf->offReadWrite <= pMixBuf->cSamples);
-        cLenDst1 = pMixBuf->cSamples - pMixBuf->offReadWrite;
-
-        pSamplesDst2 = pMixBuf->pSamples;
-        Assert(cToWrite >= cLenDst1);
-        cLenDst2 = RT_MIN(cToWrite - cLenDst1, pMixBuf->cSamples);
-
-        /* Save new read offset. */
-        offWrite = cLenDst2;
-    }
-
-    uint32_t cWrittenTotal = 0;
-
-    AUDMIXBUF_CONVOPTS convOpts;
-    convOpts.Volume = pMixBuf->Volume;
-
-    /* Anything to do at all? */
-    if (cLenDst1)
-    {
-        convOpts.cSamples = cLenDst1;
-        cWrittenTotal = pConv(pSamplesDst1, pvBuf, cbBuf, &convOpts);
-    }
-
-    /* Second part present? */
-    if (   RT_LIKELY(RT_SUCCESS(rc))
-        && cLenDst2)
-    {
-        AssertPtr(pSamplesDst2);
-
-        convOpts.cSamples = cLenDst2;
-        cWrittenTotal += pConv(pSamplesDst2, (uint8_t *)pvBuf + AUDIOMIXBUF_S2B(pMixBuf, cLenDst1), cbBuf, &convOpts);
-    }
-
-#ifdef DEBUG_DUMP_PCM_DATA
-        RTFILE fh;
-        RTFileOpen(&fh, DEBUG_DUMP_PCM_DATA_PATH "mixbuf_writeex.pcm",
-                   RTFILE_O_OPEN_CREATE | RTFILE_O_APPEND | RTFILE_O_WRITE | RTFILE_O_DENY_NONE);
-        RTFileWrite(fh, pSamplesDst1, AUDIOMIXBUF_S2B(pMixBuf, cLenDst1), NULL);
-        RTFileClose(fh);
-#endif
-
-    AUDMIXBUF_LOG(("cLenDst1=%RU32, cLenDst2=%RU32, offWrite=%RU32\n",
-                   cLenDst1, cLenDst2, offWrite));
-
-    if (RT_SUCCESS(rc))
-    {
-        pMixBuf->offReadWrite = offWrite % pMixBuf->cSamples;
-        pMixBuf->cProcessed = RT_MIN(pMixBuf->cProcessed + cLenDst1 + cLenDst2,
-                                     pMixBuf->cSamples /* Max */);
-        if (pcWritten)
-            *pcWritten = cLenDst1 + cLenDst2;
-    }
-
-#ifdef DEBUG
-    audioMixBufPrint(pMixBuf);
-#endif
-
-    AUDMIXBUF_LOG(("cWritten=%RU32 (%zu bytes), rc=%Rrc\n",
-                   cLenDst1 + cLenDst2,
-                   AUDIOMIXBUF_S2B(pMixBuf, cLenDst1 + cLenDst2), rc));
-    return rc;
-}
-
diff --git a/src/VBox/Devices/Audio_old/AudioMixBuffer.h b/src/VBox/Devices/Audio_old/AudioMixBuffer.h
deleted file mode 100644
index c4caa7c..0000000
--- a/src/VBox/Devices/Audio_old/AudioMixBuffer.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* $Id: AudioMixBuffer.h $ */
-/** @file
- * VBox audio: Mixing buffer to convert audio samples to/from different
- *             rates / formats.
- */
-
-/*
- * Copyright (C) 2014-2015 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-#ifndef AUDIO_MIXBUF_H
-#define AUDIO_MIXBUF_H
-
-#include <iprt/cdefs.h>
-#include <VBox/vmm/pdmaudioifs.h>
-
-/** Constructs 32 bit value for given frequency, number of channels, bits per sample and signed bit.
- *  Note: This currently matches 1:1 the VRDE encoding -- this might change in the future, so better don't rely on this fact! */
-#define AUDMIXBUF_AUDIO_FMT_MAKE(freq, c, bps, s) ((((s) & 0x1) << 28) + (((bps) & 0xFF) << 20) + (((c) & 0xF) << 16) + ((freq) & 0xFFFF))
-
-/** Decodes frequency (Hz). */
-#define AUDMIXBUF_FMT_SAMPLE_FREQ(a) ((a) & 0xFFFF)
-/** Decodes number of channels. */
-#define AUDMIXBUF_FMT_CHANNELS(a) (((a) >> 16) & 0xF)
-/** Decodes signed bit. */
-#define AUDMIXBUF_FMT_SIGNED(a) (((a) >> 28) & 0x1)
-/** Decodes number of bits per sample. */
-#define AUDMIXBUF_FMT_BITS_PER_SAMPLE(a) (((a) >> 20) & 0xFF)
-/** Decodes number of bytes per sample. */
-#define AUDMIXBUF_FMT_BYTES_PER_SAMPLE(a) ((AUDMIXBUF_AUDIO_FMT_BITS_PER_SAMPLE(a) + 7) / 8)
-
-/** Converts samples to bytes. */
-#define AUDIOMIXBUF_S2B(pBuf, samples) ((samples) << (pBuf)->cShift)
-/** Converts samples to bytes, respecting the conversion ratio to
- *  a linked buffer. */
-#define AUDIOMIXBUF_S2B_RATIO(pBuf, samples) ((((int64_t) samples << 32) / (pBuf)->iFreqRatio) << (pBuf)->cShift)
-/** Converts bytes to samples, *not* taking the conversion ratio
- *  into account. */
-#define AUDIOMIXBUF_B2S(pBuf, cb)  (cb >> (pBuf)->cShift)
-/** Converts number of samples according to the buffer's ratio. */
-#define AUDIOMIXBUF_S2S_RATIO(pBuf, samples)  (((int64_t) samples << 32) / (pBuf)->iFreqRatio)
-
-
-int AudioMixBufAcquire(PPDMAUDIOMIXBUF pMixBuf, uint32_t cSamplesToRead, PPDMAUDIOSAMPLE *ppvSamples, uint32_t *pcSamplesRead);
-uint32_t AudioMixBufAvail(PPDMAUDIOMIXBUF pMixBuf);
-inline uint32_t AudioMixBufBytesToSamples(PPDMAUDIOMIXBUF pMixBuf);
-void AudioMixBufClear(PPDMAUDIOMIXBUF pMixBuf);
-void AudioMixBufDestroy(PPDMAUDIOMIXBUF pMixBuf);
-void AudioMixBufFinish(PPDMAUDIOMIXBUF pMixBuf, uint32_t cSamplesToClear);
-uint32_t AudioMixBufFree(PPDMAUDIOMIXBUF pMixBuf);
-uint32_t AudioMixBufFreeBytes(PPDMAUDIOMIXBUF pMixBuf);
-int AudioMixBufInit(PPDMAUDIOMIXBUF pMixBuf, const char *pszName, PPDMPCMPROPS pProps, uint32_t cSamples);
-bool AudioMixBufIsEmpty(PPDMAUDIOMIXBUF pMixBuf);
-int AudioMixBufLinkTo(PPDMAUDIOMIXBUF pMixBuf, PPDMAUDIOMIXBUF pParent);
-uint32_t AudioMixBufMixed(PPDMAUDIOMIXBUF pMixBuf);
-int AudioMixBufMixToChildren(PPDMAUDIOMIXBUF pMixBuf, uint32_t cSamples, uint32_t *pcProcessed);
-int AudioMixBufMixToParent(PPDMAUDIOMIXBUF pMixBuf, uint32_t cSamples, uint32_t *pcProcessed);
-uint32_t AudioMixBufProcessed(PPDMAUDIOMIXBUF pMixBuf);
-int AudioMixBufReadAt(PPDMAUDIOMIXBUF pMixBuf, uint32_t offSamples, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead);
-int AudioMixBufReadAtEx(PPDMAUDIOMIXBUF pMixBuf, PDMAUDIOMIXBUFFMT enmFmt, uint32_t offSamples, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead);
-int AudioMixBufReadCirc(PPDMAUDIOMIXBUF pMixBuf, void *pvBuf, uint32_t cbBuf, uint32_t *pcRead);
-int AudioMixBufReadCircEx(PPDMAUDIOMIXBUF pMixBuf, PDMAUDIOMIXBUFFMT enmFmt, void *pvBuf, uint32_t cbBuf, uint32_t *pcRead);
-void AudioMixBufReset(PPDMAUDIOMIXBUF pMixBuf);
-void AudioMixBufSetVolume(PPDMAUDIOMIXBUF pMixBuf, PPDMAUDIOVOLUME pVol);
-uint32_t AudioMixBufSize(PPDMAUDIOMIXBUF pMixBuf);
-uint32_t AudioMixBufSizeBytes(PPDMAUDIOMIXBUF pMixBuf);
-void AudioMixBufUnlink(PPDMAUDIOMIXBUF pMixBuf);
-int AudioMixBufWriteAt(PPDMAUDIOMIXBUF pMixBuf, uint32_t offSamples, const void *pvBuf, uint32_t cbBuf, uint32_t *pcWritten);
-int AudioMixBufWriteAtEx(PPDMAUDIOMIXBUF pMixBuf, PDMAUDIOMIXBUFFMT enmFmt, uint32_t offSamples, const void *pvBuf, uint32_t cbBuf, uint32_t *pcWritten);
-int AudioMixBufWriteCirc(PPDMAUDIOMIXBUF pMixBuf, const void *pvBuf, uint32_t cbBuf, uint32_t *pcWritten);
-int AudioMixBufWriteCircEx(PPDMAUDIOMIXBUF pMixBuf, PDMAUDIOMIXBUFFMT enmFmt, const void *pvBuf, uint32_t cbBuf, uint32_t *pcWritten);
-
-#endif /* AUDIO_MIXBUF_H */
-
diff --git a/src/VBox/Devices/Audio_old/AudioMixer.cpp b/src/VBox/Devices/Audio_old/AudioMixer.cpp
deleted file mode 100644
index 8261a70..0000000
--- a/src/VBox/Devices/Audio_old/AudioMixer.cpp
+++ /dev/null
@@ -1,514 +0,0 @@
-/* $Id: AudioMixer.cpp $ */
-/** @file
- * VBox audio: Mixing routines, mainly used by the various audio device
- *             emulations to achieve proper multiplexing from/to attached
- *             devices LUNs.
- */
-
-/*
- * Copyright (C) 2014-2016 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-#define LOG_GROUP LOG_GROUP_AUDIO_MIXER
-#include <VBox/log.h>
-#include "AudioMixer.h"
-#include "AudioMixBuffer.h"
-
-#include <VBox/vmm/pdm.h>
-#include <VBox/err.h>
-#include <VBox/vmm/mm.h>
-#include <VBox/vmm/pdmaudioifs.h>
-
-#include <iprt/alloc.h>
-#include <iprt/asm-math.h>
-#include <iprt/assert.h>
-#include <iprt/string.h>
-
-static int audioMixerUpdateSinkVolume(PAUDMIXSINK pSink, const PPDMAUDIOVOLUME pVolMaster);
-
-
-int AudioMixerAddSink(PAUDIOMIXER pMixer, const char *pszName, AUDMIXSINKDIR enmDir, PAUDMIXSINK *ppSink)
-{
-    AssertPtrReturn(pMixer, VERR_INVALID_POINTER);
-    AssertPtrReturn(pszName, VERR_INVALID_POINTER);
-    /** ppSink is optional. */
-
-    int rc = VINF_SUCCESS;
-
-    PAUDMIXSINK pSink = (PAUDMIXSINK)RTMemAllocZ(sizeof(AUDMIXSINK));
-    if (pSink)
-    {
-        pSink->pszName = RTStrDup(pszName);
-        if (!pSink->pszName)
-            rc = VERR_NO_MEMORY;
-
-        if (RT_SUCCESS(rc))
-        {
-            pSink->pParent  = pMixer;
-            pSink->cStreams = 0;
-            pSink->enmDir   = enmDir;
-            RTListInit(&pSink->lstStreams);
-
-            /* Set initial volume to max. */
-            pSink->Volume.fMuted = false;
-            pSink->Volume.uLeft  = 0x7F;
-            pSink->Volume.uRight = 0x7F;
-
-            RTListAppend(&pMixer->lstSinks, &pSink->Node);
-            pMixer->cSinks++;
-
-            LogFlowFunc(("pMixer=%p, pSink=%p, cSinks=%RU8\n",
-                         pMixer, pSink, pMixer->cSinks));
-
-            if (ppSink)
-                *ppSink = pSink;
-        }
-        else
-            RTMemFree(pSink);
-    }
-    else
-        rc = VERR_NO_MEMORY;
-
-    return rc;
-}
-
-int AudioMixerAddStreamIn(PAUDMIXSINK pSink, PPDMIAUDIOCONNECTOR pConnector, PPDMAUDIOGSTSTRMIN pStream,
-                          uint32_t uFlags, PAUDMIXSTREAM *ppStream)
-{
-    AssertPtrReturn(pSink, VERR_INVALID_POINTER);
-    AssertPtrReturn(pStream, VERR_INVALID_POINTER);
-    /** @todo Add flag validation. */
-    /* ppStream is optional. */
-
-    int rc;
-
-    if (pSink->cStreams == UINT8_MAX) /* 255 streams per sink max. */
-        return VERR_TOO_MUCH_DATA;
-
-    PAUDMIXSTREAM pMixStream
-        = (PAUDMIXSTREAM)RTMemAllocZ(sizeof(AUDMIXSTREAM));
-    if (pMixStream)
-    {
-        pMixStream->pConn = pConnector;
-        pMixStream->pIn   = pStream;
-        /** @todo Process flags. */
-
-        RTListAppend(&pSink->lstStreams, &pMixStream->Node);
-        pSink->cStreams++;
-
-        LogFlowFunc(("%s: pStream=%p, cStreams=%RU8\n",
-                     pSink->pszName, pMixStream, pSink->cStreams));
-
-        /* Increase the stream's reference count to let others know
-         * we're reyling on it to be around now. */
-        pStream->State.cRefs++;
-
-        if (ppStream)
-            *ppStream = pMixStream;
-
-        rc = VINF_SUCCESS;
-    }
-    else
-        rc = VERR_NO_MEMORY;
-
-    return rc;
-}
-
-int AudioMixerAddStreamOut(PAUDMIXSINK pSink, PPDMIAUDIOCONNECTOR pConnector, PPDMAUDIOGSTSTRMOUT pStream,
-                           uint32_t uFlags, PAUDMIXSTREAM *ppStream)
-{
-    AssertPtrReturn(pSink, VERR_INVALID_POINTER);
-    AssertPtrReturn(pStream, VERR_INVALID_POINTER);
-    /** @todo Add flag validation. */
-    /* ppStream is optional. */
-
-    int rc;
-
-    if (pSink->cStreams == UINT8_MAX) /* 255 streams per sink max. */
-        return VERR_TOO_MUCH_DATA;
-
-    PAUDMIXSTREAM pMixStream
-        = (PAUDMIXSTREAM)RTMemAllocZ(sizeof(AUDMIXSTREAM));
-    if (pMixStream)
-    {
-        pMixStream->pConn = pConnector;
-        pMixStream->pOut  = pStream;
-        /** @todo Process flags. */
-
-        RTListAppend(&pSink->lstStreams, &pMixStream->Node);
-        pSink->cStreams++;
-
-        LogFlowFunc(("%s: pStream=%p, cStreams=%RU8\n",
-                     pSink->pszName, pMixStream, pSink->cStreams));
-
-        /* Increase the stream's reference count to let others know
-         * we're reyling on it to be around now. */
-        pStream->State.cRefs++;
-
-        if (ppStream)
-            *ppStream = pMixStream;
-
-        rc = VINF_SUCCESS;
-    }
-    else
-        rc = VERR_NO_MEMORY;
-
-    return rc;
-}
-
-int AudioMixerControlStream(PAUDIOMIXER pMixer, PAUDMIXSTREAM pHandle)
-{
-    return VERR_NOT_IMPLEMENTED;
-}
-
-int AudioMixerCreate(const char *pszName, uint32_t uFlags, PAUDIOMIXER *ppMixer)
-{
-    AssertPtrReturn(pszName, VERR_INVALID_POINTER);
-    /** @todo Add flag validation. */
-    AssertPtrReturn(ppMixer, VERR_INVALID_POINTER);
-
-    int rc = VINF_SUCCESS;
-
-    PAUDIOMIXER pMixer = (PAUDIOMIXER)RTMemAllocZ(sizeof(AUDIOMIXER));
-    if (pMixer)
-    {
-        pMixer->pszName = RTStrDup(pszName);
-        if (!pMixer->pszName)
-            rc = VERR_NO_MEMORY;
-
-        if (RT_SUCCESS(rc))
-        {
-            pMixer->cSinks = 0;
-            RTListInit(&pMixer->lstSinks);
-
-            pMixer->VolMaster.fMuted = false;
-            pMixer->VolMaster.uLeft  = UINT32_MAX;
-            pMixer->VolMaster.uRight = UINT32_MAX;
-
-            LogFlowFunc(("Created %p ...\n", pMixer));
-
-            *ppMixer = pMixer;
-        }
-        else
-            RTMemFree(pMixer);
-    }
-    else
-        rc = VERR_NO_MEMORY;
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-void AudioMixerDestroy(PAUDIOMIXER pMixer)
-{
-    if (!pMixer)
-        return;
-
-    LogFlowFunc(("Destroying %s ...\n", pMixer->pszName));
-
-    PAUDMIXSINK pSink, pSinkNext;
-    RTListForEachSafe(&pMixer->lstSinks, pSink, pSinkNext, AUDMIXSINK, Node)
-        AudioMixerRemoveSink(pMixer, pSink);
-
-    Assert(pMixer->cSinks == 0);
-
-    if (pMixer->pszName)
-    {
-        RTStrFree(pMixer->pszName);
-        pMixer->pszName = NULL;
-    }
-
-    RTMemFree(pMixer);
-}
-
-static void audioMixerDestroySink(PAUDMIXSINK pSink)
-{
-    AssertPtrReturnVoid(pSink);
-    if (!pSink)
-        return;
-
-    if (pSink->pszName)
-        RTStrFree(pSink->pszName);
-
-    RTMemFree(pSink);
-}
-
-static void audioMixerDestroyStream(PAUDMIXSTREAM pStream)
-{
-    AssertPtrReturnVoid(pStream);
-    if (!pStream)
-        return;
-
-    RTMemFree(pStream);
-}
-
-int AudioMixerGetDeviceFormat(PAUDIOMIXER pMixer, PPDMAUDIOSTREAMCFG pCfg)
-{
-    AssertPtrReturn(pMixer, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
-
-    /** @todo Perform a deep copy, if needed. */
-    *pCfg = pMixer->devFmt;
-
-    return VINF_SUCCESS;
-}
-
-uint32_t AudioMixerGetStreamCount(PAUDIOMIXER pMixer)
-{
-    AssertPtrReturn(pMixer, 0);
-
-    uint32_t cStreams = 0;
-
-    PAUDMIXSINK pSink;
-    RTListForEach(&pMixer->lstSinks, pSink, AUDMIXSINK, Node)
-        cStreams += pSink->cStreams;
-
-    return cStreams;
-}
-
-void AudioMixerInvalidate(PAUDIOMIXER pMixer)
-{
-    AssertPtrReturnVoid(pMixer);
-
-    LogFlowFunc(("%s: Invalidating ...\n", pMixer->pszName));
-
-    /* Propagate new master volume to all connected sinks. */
-    PAUDMIXSINK pSink;
-    RTListForEach(&pMixer->lstSinks, pSink, AUDMIXSINK, Node)
-    {
-        int rc2 = audioMixerUpdateSinkVolume(pSink, &pMixer->VolMaster);
-        AssertRC(rc2);
-    }
-}
-
-int AudioMixerProcessSinkIn(PAUDMIXSINK pSink, AUDMIXOP enmOp, void *pvBuf, uint32_t cbBuf, uint32_t *pcbProcessed)
-{
-    AssertPtrReturn(pSink, VERR_INVALID_POINTER);
-    AssertPtrReturn(pvBuf, VERR_INVALID_POINTER);
-    AssertReturn(cbBuf, VERR_INVALID_PARAMETER);
-    /* pcbProcessed is optional. */
-
-    /** @todo Handle mixing operation enmOp! */
-
-    uint8_t *pvMixBuf = (uint8_t *)RTMemAlloc(cbBuf);
-    if (!pvMixBuf)
-        return VERR_NO_MEMORY;
-
-    int rc = VERR_NOT_FOUND;
-    uint32_t cbProcessed = 0;
-
-    LogFlowFunc(("%s: pvBuf=%p, cbBuf=%zu\n", pSink->pszName, pvBuf, cbBuf));
-
-    PAUDMIXSTREAM pStream;
-    RTListForEach(&pSink->lstStreams, pStream, AUDMIXSTREAM, Node)
-    {
-        /** @todo Support output sinks as well! */
-        if (!pStream->pConn->pfnIsActiveIn(pStream->pConn, pStream->pIn))
-            continue;
-
-        uint32_t cbTotalRead = 0;
-        uint32_t cbToRead = cbBuf;
-
-        while (cbToRead)
-        {
-            uint32_t cbRead;
-            AssertPtr(pStream->pConn);
-            rc = pStream->pConn->pfnRead(pStream->pConn, pStream->pIn,
-                                         (uint8_t *)pvMixBuf + cbTotalRead, cbToRead, &cbRead);
-            if (   RT_FAILURE(rc)
-                || !cbRead)
-                break;
-
-            AssertBreakStmt(cbRead <= cbToRead, rc = VERR_BUFFER_OVERFLOW);
-            cbToRead -= cbRead;
-            cbTotalRead += cbRead;
-        }
-
-        if (RT_FAILURE(rc))
-            continue;
-
-        cbProcessed = RT_MAX(cbProcessed, cbTotalRead);
-    }
-
-    if (RT_SUCCESS(rc))
-    {
-        memcpy(pvBuf, pvMixBuf, cbProcessed); /* @todo Use an intermediate mixing buffer per sink! */
-
-        if (pcbProcessed)
-            *pcbProcessed = cbProcessed;
-    }
-
-    RTMemFree(pvMixBuf);
-
-    LogFlowFunc(("cbProcessed=%RU32, rc=%Rrc\n", cbProcessed, rc));
-    return rc;
-}
-
-int AudioMixerProcessSinkOut(PAUDMIXSINK pSink, AUDMIXOP enmOp, const void *pvBuf, uint32_t cbBuf, uint32_t *pcbProcessed)
-{
-    return VERR_NOT_IMPLEMENTED;
-}
-
-void AudioMixerRemoveSink(PAUDIOMIXER pMixer, PAUDMIXSINK pSink)
-{
-    AssertPtrReturnVoid(pMixer);
-    if (!pSink)
-        return;
-
-    PAUDMIXSTREAM pStream, pStreamNext;
-    RTListForEachSafe(&pSink->lstStreams, pStream, pStreamNext, AUDMIXSTREAM, Node)
-        AudioMixerRemoveStream(pSink, pStream);
-
-    Assert(pSink->cStreams == 0);
-
-    RTListNodeRemove(&pSink->Node);
-    Assert(pMixer->cSinks);
-    pMixer->cSinks--;
-
-    LogFlowFunc(("%s: pSink=%s, cSinks=%RU8\n",
-                 pMixer->pszName, pSink->pszName, pMixer->cSinks));
-
-    audioMixerDestroySink(pSink);
-}
-
-void AudioMixerRemoveStream(PAUDMIXSINK pSink, PAUDMIXSTREAM pStream)
-{
-    AssertPtrReturnVoid(pSink);
-    if (!pStream)
-        return;
-
-    Assert(pSink->cStreams);
-    RTListNodeRemove(&pStream->Node);
-    pSink->cStreams--;
-
-#ifdef DEBUG
-    const char *pszStream = pSink->enmDir == AUDMIXSINKDIR_INPUT
-                          ? pStream->pIn->MixBuf.pszName : pStream->pOut->MixBuf.pszName;
-
-    LogFlowFunc(("%s: pStream=%s, cStreams=%RU8\n",
-                 pSink->pszName, pszStream ? pszStream : "<Unnamed>", pSink->cStreams));
-#endif
-
-    /* Decrease the reference count again. */
-    switch (pSink->enmDir)
-    {
-        case AUDMIXSINKDIR_INPUT:
-        {
-            Assert(pStream->pIn->State.cRefs);
-            pStream->pIn->State.cRefs--;
-            break;
-        }
-
-        case AUDMIXSINKDIR_OUTPUT:
-        {
-            Assert(pStream->pOut->State.cRefs);
-            pStream->pOut->State.cRefs--;
-            break;
-        }
-
-        default:
-            AssertMsgFailed(("Not implemented\n"));
-            break;
-    }
-
-    audioMixerDestroyStream(pStream);
-}
-
-int AudioMixerSetDeviceFormat(PAUDIOMIXER pMixer, PPDMAUDIOSTREAMCFG pCfg)
-{
-    AssertPtrReturn(pMixer, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
-
-    /** @todo Perform a deep copy, if needed. */
-    pMixer->devFmt = *pCfg;
-
-    return VINF_SUCCESS;
-}
-
-static int audioMixerUpdateSinkVolume(PAUDMIXSINK pSink, const PPDMAUDIOVOLUME pVolMaster)
-{
-    AssertPtrReturn(pSink,      VERR_INVALID_POINTER);
-    AssertPtrReturn(pVolMaster, VERR_INVALID_POINTER);
-
-    LogFlowFunc(("Master fMuted=%RTbool, lVol=%RU32, rVol=%RU32\n",
-                  pVolMaster->fMuted, pVolMaster->uLeft, pVolMaster->uRight));
-    LogFlowFunc(("%s: fMuted=%RTbool, lVol=%RU32, rVol=%RU32\n",
-                  pSink->pszName, pSink->Volume.fMuted, pSink->Volume.uLeft, pSink->Volume.uRight));
-
-    /** @todo Very crude implementation for now -- needs more work! */
-
-    PDMAUDIOVOLUME volSink;
-    volSink.fMuted  = pVolMaster->fMuted || pSink->Volume.fMuted;
-    volSink.uLeft   = (pSink->Volume.uLeft  * pVolMaster->uLeft)  / UINT8_MAX;
-    volSink.uRight  = (pSink->Volume.uRight * pVolMaster->uRight) / UINT8_MAX;
-
-    LogFlowFunc(("\t-> fMuted=%RTbool, lVol=%RU32, rVol=%RU32\n",
-                  volSink.fMuted, volSink.uLeft, volSink.uRight));
-
-    bool fOut = pSink->enmDir == AUDMIXSINKDIR_OUTPUT;
-
-    /* Propagate new sink volume to all streams in the sink. */
-    PAUDMIXSTREAM pStream;
-    RTListForEach(&pSink->lstStreams, pStream, AUDMIXSTREAM, Node)
-    {
-        if (fOut)
-            AudioMixBufSetVolume(&pStream->pOut->MixBuf, &volSink);
-        else
-            AudioMixBufSetVolume(&pStream->pIn->MixBuf,  &volSink);
-    }
-
-    return VINF_SUCCESS;
-}
-
-/** Set the master volume of the mixer. */
-int AudioMixerSetMasterVolume(PAUDIOMIXER pMixer, PPDMAUDIOVOLUME pVol)
-{
-    AssertPtrReturn(pMixer, VERR_INVALID_POINTER);
-    AssertPtrReturn(pVol,   VERR_INVALID_POINTER);
-
-    pMixer->VolMaster = *pVol;
-
-    LogFlowFunc(("%s: lVol=%RU32, rVol=%RU32 => fMuted=%RTbool, lVol=%RU32, rVol=%RU32\n",
-                 pMixer->pszName, pVol->uLeft, pVol->uRight,
-                 pMixer->VolMaster.fMuted, pMixer->VolMaster.uLeft, pMixer->VolMaster.uRight));
-
-    AudioMixerInvalidate(pMixer);
-    return VINF_SUCCESS;
-}
-
-/** Set the volume of an individual sink. */
-int AudioMixerSetSinkVolume(PAUDMIXSINK pSink, PPDMAUDIOVOLUME pVol)
-{
-    AssertPtrReturn(pSink, VERR_INVALID_POINTER);
-    AssertPtrReturn(pVol,  VERR_INVALID_POINTER);
-    AssertPtr(pSink->pParent);
-
-    LogFlowFunc(("%s: fMuted=%RTbool, lVol=%RU32, rVol=%RU32\n", pSink->pszName, pVol->fMuted, pVol->uLeft, pVol->uRight));
-
-    pSink->Volume = *pVol;
-
-    return audioMixerUpdateSinkVolume(pSink, &pSink->pParent->VolMaster);
-}
-
-void AudioMixerDebug(PAUDIOMIXER pMixer, PCDBGFINFOHLP pHlp, const char *pszArgs)
-{
-    PAUDMIXSINK pSink;
-    unsigned    iSink = 0;
-
-    pHlp->pfnPrintf(pHlp, "[Master] %s: lVol=%u, rVol=%u, fMuted=%RTbool\n", pMixer->pszName,
-                    pMixer->VolMaster.uLeft, pMixer->VolMaster.uRight, pMixer->VolMaster.fMuted);
-
-    RTListForEach(&pMixer->lstSinks, pSink, AUDMIXSINK, Node)
-    {
-        pHlp->pfnPrintf(pHlp, "[Sink %u] %s: lVol=%u, rVol=%u, fMuted=%RTbool\n", iSink, pSink->pszName,
-                        pSink->Volume.uLeft, pSink->Volume.uRight, pSink->Volume.fMuted);
-        ++iSink;
-    }
-}
diff --git a/src/VBox/Devices/Audio_old/AudioMixer.h b/src/VBox/Devices/Audio_old/AudioMixer.h
deleted file mode 100644
index e22f475..0000000
--- a/src/VBox/Devices/Audio_old/AudioMixer.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/* $Id: AudioMixer.h $ */
-/** @file
- * VBox audio: Mixing routines, mainly used by the various audio device
- *             emulations to achieve proper multiplexing from/to attached
- *             devices LUNs.
- */
-
-/*
- * Copyright (C) 2014-2016 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-#ifndef AUDIO_MIXER_H
-#define AUDIO_MIXER_H
-
-#include <iprt/cdefs.h>
-#include <VBox/vmm/pdmaudioifs.h>
-
-typedef struct AUDIOMIXER
-{
-    /** Mixer name. */
-    char                   *pszName;
-    /** Format the mixer should convert/output
-     *  data to so that the underlying device emulation
-     *  can work with it. */
-    PDMAUDIOSTREAMCFG       devFmt;
-    /** The master volume of this mixer. */
-    PDMAUDIOVOLUME          VolMaster;
-    /* List of audio mixer sinks. */
-    RTLISTANCHOR            lstSinks;
-    /** Number of used audio sinks. */
-    uint8_t                 cSinks;
-} AUDIOMIXER, *PAUDIOMIXER;
-
-typedef struct AUDMIXSTREAM
-{
-    RTLISTNODE              Node;
-    PPDMIAUDIOCONNECTOR     pConn;
-    union
-    {
-        PPDMAUDIOGSTSTRMIN  pIn;
-        PPDMAUDIOGSTSTRMOUT pOut;
-    };
-} AUDMIXSTREAM, *PAUDMIXSTREAM;
-
-typedef enum AUDMIXSINKDIR
-{
-    AUDMIXSINKDIR_UNKNOWN = 0,
-    AUDMIXSINKDIR_INPUT,
-    AUDMIXSINKDIR_OUTPUT,
-    /** The usual 32-bit hack. */
-    AUDMIXSINKDIR_32BIT_HACK = 0x7fffffff
-} AUDMIXSINKDIR;
-
-typedef struct AUDMIXSINK
-{
-    RTLISTNODE              Node;
-    /** Name of this sink. */
-    char                   *pszName;
-    /** The sink direction, that is,
-     *  if this sink handles input or output. */
-    AUDMIXSINKDIR           enmDir;
-    /** Pointer to mixer object this sink is bound
-     *  to. */
-    PAUDIOMIXER             pParent;
-    /** Number of streams assigned. */
-    uint8_t                 cStreams;
-    /** List of assigned streams. */
-    RTLISTANCHOR            lstStreams;
-    /** This sink's mixing buffer. */
-    PDMAUDIOMIXBUF          MixBuf;
-    /** The volume of this sink. The volume always will
-     *  be combined with the mixer's master volume. */
-    PDMAUDIOVOLUME          Volume;
-} AUDMIXSINK, *PAUDMIXSINK;
-
-typedef enum AUDMIXOP
-{
-    AUDMIXOP_NONE = 0,
-    AUDMIXOP_COPY,
-    AUDMIXOP_BLEND,
-    /** The usual 32-bit hack. */
-    AUDMIXOP_32BIT_HACK = 0x7fffffff
-} AUDMIXOP;
-
-
-int AudioMixerAddSink(PAUDIOMIXER pMixer, const char *pszName, AUDMIXSINKDIR enmDir, PAUDMIXSINK *ppSink);
-int AudioMixerAddStreamIn(PAUDMIXSINK pSink, PPDMIAUDIOCONNECTOR pConnector, PPDMAUDIOGSTSTRMIN pStream, uint32_t uFlags, PAUDMIXSTREAM *ppStream);
-int AudioMixerAddStreamOut(PAUDMIXSINK pSink, PPDMIAUDIOCONNECTOR pConnector, PPDMAUDIOGSTSTRMOUT pStream, uint32_t uFlags, PAUDMIXSTREAM *ppStream);
-int AudioMixerControlStream(AUDMIXSTREAM pHandle); /** @todo Implement me. */
-int AudioMixerCreate(const char *pszName, uint32_t uFlags, PAUDIOMIXER *ppMixer);
-void AudioMixerDestroy(PAUDIOMIXER pMixer);
-int AudioMixerGetDeviceFormat(PAUDIOMIXER pMixer, PPDMAUDIOSTREAMCFG pCfg);
-uint32_t AudioMixerGetStreamCount(PAUDIOMIXER pMixer);
-void AudioMixerInvalidate(PAUDIOMIXER pMixer);
-int AudioMixerProcessSinkIn(PAUDMIXSINK pSink, AUDMIXOP enmOp, void *pvBuf, uint32_t cbBuf, uint32_t *pcbProcessed);
-int AudioMixerProcessSinkOut(PAUDMIXSINK pSink, AUDMIXOP enmOp, const void *pvBuf, uint32_t cbBuf, uint32_t *pcbProcessed);
-void AudioMixerRemoveSink(PAUDIOMIXER pMixer, PAUDMIXSINK pSink);
-void AudioMixerRemoveStream(PAUDMIXSINK pSink, PAUDMIXSTREAM pStream);
-int AudioMixerSetDeviceFormat(PAUDIOMIXER pMixer, PPDMAUDIOSTREAMCFG pCfg);
-int AudioMixerSetMasterVolume(PAUDIOMIXER pMixer, PPDMAUDIOVOLUME pVol);
-int AudioMixerSetSinkVolume(PAUDMIXSINK pSink, PPDMAUDIOVOLUME pVol);
-void AudioMixerDebug(PAUDIOMIXER pMixer, PCDBGFINFOHLP pHlp, const char *pszArgs);
-
-#endif /* AUDIO_MIXER_H */
-
diff --git a/src/VBox/Devices/Audio_old/DevIchAc97.cpp b/src/VBox/Devices/Audio_old/DevIchAc97.cpp
deleted file mode 100644
index f51f5ac..0000000
--- a/src/VBox/Devices/Audio_old/DevIchAc97.cpp
+++ /dev/null
@@ -1,2747 +0,0 @@
-/* $Id: DevIchAc97.cpp $ */
-/** @file
- * DevIchAc97 - VBox ICH AC97 Audio Controller.
- */
-
-/*
- * Copyright (C) 2006-2016 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-
-/*********************************************************************************************************************************
-*   Header Files                                                                                                                 *
-*********************************************************************************************************************************/
-#define LOG_GROUP LOG_GROUP_DEV_AC97
-#include <VBox/log.h>
-#include <VBox/vmm/pdmdev.h>
-#include <VBox/vmm/pdmaudioifs.h>
-
-#include <iprt/assert.h>
-#ifdef IN_RING3
-# include <iprt/mem.h>
-# include <iprt/string.h>
-# include <iprt/uuid.h>
-#endif
-
-#include "VBoxDD.h"
-
-#include "AudioMixBuffer.h"
-#include "AudioMixer.h"
-#include "DrvAudio.h"
-
-
-/*********************************************************************************************************************************
-*   Defined Constants And Macros                                                                                                 *
-*********************************************************************************************************************************/
-
-#ifdef DEBUG
-//#define DEBUG_LUN
-# ifdef DEBUG_LUN
-#  define DEBUG_LUN_NUM 1
-# endif
-#endif /* DEBUG */
-
-#define AC97_SSM_VERSION 1
-
-#ifdef VBOX
-# define SOFT_VOLUME /** @todo Get rid of this crap. */
-#else
-# define SOFT_VOLUME
-#endif
-
-#define SR_FIFOE RT_BIT(4)          /* rwc, FIFO error. */
-#define SR_BCIS  RT_BIT(3)          /* rwc, Buffer completion interrupt status. */
-#define SR_LVBCI RT_BIT(2)          /* rwc, Last valid buffer completion interrupt. */
-#define SR_CELV  RT_BIT(1)          /* ro,  Current equals last valid. */
-#define SR_DCH   RT_BIT(0)          /* ro,  Controller halted. */
-#define SR_VALID_MASK (RT_BIT(5) - 1)
-#define SR_WCLEAR_MASK (SR_FIFOE | SR_BCIS | SR_LVBCI)
-#define SR_RO_MASK (SR_DCH | SR_CELV)
-#define SR_INT_MASK (SR_FIFOE | SR_BCIS | SR_LVBCI)
-
-#define CR_IOCE  RT_BIT(4)         /* rw,   Interrupt On Completion Enable. */
-#define CR_FEIE  RT_BIT(3)         /* rw    FIFO Error Interrupt Enable. */
-#define CR_LVBIE RT_BIT(2)         /* rw    */
-#define CR_RR    RT_BIT(1)         /* rw */
-#define CR_RPBM  RT_BIT(0)         /* rw */
-#define CR_VALID_MASK (RT_BIT(5) - 1)
-#define CR_DONT_CLEAR_MASK (CR_IOCE | CR_FEIE | CR_LVBIE)
-
-#define GC_WR    4              /* rw */
-#define GC_CR    2              /* rw */
-#define GC_VALID_MASK (RT_BIT(6) - 1)
-
-#define GS_MD3   RT_BIT(17)        /* rw */
-#define GS_AD3   RT_BIT(16)        /* rw */
-#define GS_RCS   RT_BIT(15)        /* rwc */
-#define GS_B3S12 RT_BIT(14)        /* ro */
-#define GS_B2S12 RT_BIT(13)        /* ro */
-#define GS_B1S12 RT_BIT(12)        /* ro */
-#define GS_S1R1  RT_BIT(11)        /* rwc */
-#define GS_S0R1  RT_BIT(10)        /* rwc */
-#define GS_S1CR  RT_BIT(9)         /* ro */
-#define GS_S0CR  RT_BIT(8)         /* ro */
-#define GS_MINT  RT_BIT(7)         /* ro */
-#define GS_POINT RT_BIT(6)         /* ro */
-#define GS_PIINT RT_BIT(5)         /* ro */
-#define GS_RSRVD (RT_BIT(4)|RT_BIT(3))
-#define GS_MOINT RT_BIT(2)         /* ro */
-#define GS_MIINT RT_BIT(1)         /* ro */
-#define GS_GSCI  RT_BIT(0)         /* rwc */
-#define GS_RO_MASK (GS_B3S12 |                   \
-                    GS_B2S12 |                   \
-                    GS_B1S12 |                   \
-                    GS_S1CR |                    \
-                    GS_S0CR |                    \
-                    GS_MINT |                    \
-                    GS_POINT |                   \
-                    GS_PIINT |                   \
-                    GS_RSRVD |                   \
-                    GS_MOINT |                   \
-                    GS_MIINT)
-#define GS_VALID_MASK (RT_BIT(18) - 1)
-#define GS_WCLEAR_MASK (GS_RCS|GS_S1R1|GS_S0R1|GS_GSCI)
-
-/** @name Buffer Descriptor
- * @{ */
-#define BD_IOC RT_BIT(31)          /**< Interrupt on Completion */
-#define BD_BUP RT_BIT(30)          /**< Buffer Underrun Policy */
-/** @} */
-
-#define EACS_VRA 1
-#define EACS_VRM 8
-
-#define VOL_MASK 0x1f
-#define MUTE_SHIFT 15
-
-#define REC_MASK 7
-enum
-{
-    REC_MIC = 0,
-    REC_CD,
-    REC_VIDEO,
-    REC_AUX,
-    REC_LINE_IN,
-    REC_STEREO_MIX,
-    REC_MONO_MIX,
-    REC_PHONE
-};
-
-enum
-{
-    AC97_Reset                     = 0x00,
-    AC97_Master_Volume_Mute        = 0x02,
-    AC97_Headphone_Volume_Mute     = 0x04, /** Also known as AUX, see table 16, section 5.7. */
-    AC97_Master_Volume_Mono_Mute   = 0x06,
-    AC97_Master_Tone_RL            = 0x08,
-    AC97_PC_BEEP_Volume_Mute       = 0x0A,
-    AC97_Phone_Volume_Mute         = 0x0C,
-    AC97_Mic_Volume_Mute           = 0x0E,
-    AC97_Line_In_Volume_Mute       = 0x10,
-    AC97_CD_Volume_Mute            = 0x12,
-    AC97_Video_Volume_Mute         = 0x14,
-    AC97_Aux_Volume_Mute           = 0x16,
-    AC97_PCM_Out_Volume_Mute       = 0x18,
-    AC97_Record_Select             = 0x1A,
-    AC97_Record_Gain_Mute          = 0x1C,
-    AC97_Record_Gain_Mic_Mute      = 0x1E,
-    AC97_General_Purpose           = 0x20,
-    AC97_3D_Control                = 0x22,
-    AC97_AC_97_RESERVED            = 0x24,
-    AC97_Powerdown_Ctrl_Stat       = 0x26,
-    AC97_Extended_Audio_ID         = 0x28,
-    AC97_Extended_Audio_Ctrl_Stat  = 0x2A,
-    AC97_PCM_Front_DAC_Rate        = 0x2C,
-    AC97_PCM_Surround_DAC_Rate     = 0x2E,
-    AC97_PCM_LFE_DAC_Rate          = 0x30,
-    AC97_PCM_LR_ADC_Rate           = 0x32,
-    AC97_MIC_ADC_Rate              = 0x34,
-    AC97_6Ch_Vol_C_LFE_Mute        = 0x36,
-    AC97_6Ch_Vol_L_R_Surround_Mute = 0x38,
-    AC97_Vendor_Reserved           = 0x58,
-    AC97_AD_Misc                   = 0x76,
-    AC97_Vendor_ID1                = 0x7c,
-    AC97_Vendor_ID2                = 0x7e
-};
-
-/* Codec models. */
-enum {
-    Codec_STAC9700 = 0,     /* SigmaTel STAC9700 */
-    Codec_AD1980,           /* Analog Devices AD1980 */
-    Codec_AD1981B           /* Analog Devices AD1981B */
-};
-
-/* Analog Devices miscellaneous regiter bits used in AD1980. */
-#define AD_MISC_LOSEL       RT_BIT(5)   /* Surround (rear) goes to line out outputs. */
-#define AD_MISC_HPSEL       RT_BIT(10)  /* PCM (front) goes to headphone outputs. */
-
-#define ICHAC97STATE_2_DEVINS(a_pAC97)   ((a_pAC97)->pDevInsR3)
-
-enum
-{
-    BUP_SET  = RT_BIT(0),
-    BUP_LAST = RT_BIT(1)
-};
-
-/** Emits registers for a specific (Native Audio Bus Master BAR) NABMBAR. */
-#define AC97_NABMBAR_REGS(prefix, off) \
-    enum {                             \
-        prefix ## _BDBAR = off,        \
-        prefix ## _CIV   = off + 4,    \
-        prefix ## _LVI   = off + 5,    \
-        prefix ## _SR    = off + 6,    \
-        prefix ## _PICB  = off + 8,    \
-        prefix ## _PIV   = off + 10,   \
-        prefix ## _CR    = off + 11    \
-    }
-
-#ifndef VBOX_DEVICE_STRUCT_TESTCASE
-typedef enum
-{
-    PI_INDEX = 0, /** PCM in */
-    PO_INDEX,     /** PCM out */
-    MC_INDEX,     /** Mic in */
-    LAST_INDEX
-} AC97SOUNDSOURCE;
-
-AC97_NABMBAR_REGS(PI, PI_INDEX * 16);
-AC97_NABMBAR_REGS(PO, PO_INDEX * 16);
-AC97_NABMBAR_REGS(MC, MC_INDEX * 16);
-#endif
-
-enum
-{
-    /** NABMBAR: Global Control Register. */
-    GLOB_CNT = 0x2c,
-    /** NABMBAR Global Status. */
-    GLOB_STA = 0x30,
-    /** Codec Access Semaphore Register. */
-    CAS      = 0x34
-};
-
-#define AC97_PORT2IDX(a_idx)   ( ((a_idx) >> 4) & 3 )
-
-/*********************************************************************************************************************************
-*   Structures and Typedefs                                                                                                      *
-*********************************************************************************************************************************/
-
-/**
- * Buffer Descriptor List Entry (BDLE).
- */
-typedef struct AC97BDLE
-{
-    uint32_t addr;
-    uint32_t ctl_len;
-} AC97BDLE, *PAC97BDLE;
-
-/**
- * Bus master register set for an audio stream.
- */
-typedef struct AC97BMREGS
-{
-    uint32_t bdbar;             /** rw 0, Buffer Descriptor List: BAR (Base Address Register). */
-    uint8_t  civ;               /** ro 0, Current index value. */
-    uint8_t  lvi;               /** rw 0, Last valid index. */
-    uint16_t sr;                /** rw 1, Status register. */
-    uint16_t picb;              /** ro 0, Position in current buffer. */
-    uint8_t  piv;               /** ro 0, Prefetched index value. */
-    uint8_t  cr;                /** rw 0, Control register. */
-    int      bd_valid;          /** Whether current BDLE is initialized or not. */
-    AC97BDLE bd;                /** Current Buffer Descriptor List Entry (BDLE). */
-} AC97BMREGS, *PAC97BMREGS;
-
-/**
- * Internal state of an AC97 stream.
- */
-typedef struct AC97STREAMSTATE
-{
-    /* Nothing yet. */
-} AC97STREAMSTATE, *PAC97STREAMSTATE;
-
-/**
- * Structure for keeping an AC97 stream state.
- *
- * Contains only register values which do *not* change until a
- * stream reset occurs.
- */
-typedef struct AC97STREAM
-{
-    /** Stream number (SDn). */
-    uint8_t         u8Strm;
-    /** Bus master registers of this stream. */
-    AC97BMREGS      Regs;
-    /** Internal state of this stream. */
-    AC97STREAMSTATE State;
-} AC97STREAM, *PAC97STREAM;
-
-typedef struct AC97INPUTSTREAM
-{
-    /** PCM line input stream. */
-    R3PTRTYPE(PPDMAUDIOGSTSTRMIN)      pStrmIn;
-    /** Mixer handle for line input stream. */
-    R3PTRTYPE(PAUDMIXSTREAM)           phStrmIn;
-} AC97INPUTSTREAM, *PAC97INPUTSTREAM;
-
-typedef struct AC97OUTPUTSTREAM
-{
-    /** PCM output stream. */
-    R3PTRTYPE(PPDMAUDIOGSTSTRMOUT)     pStrmOut;
-    /** Mixer handle for output stream. */
-    R3PTRTYPE(PAUDMIXSTREAM)           phStrmOut;
-} AC97OUTPUTSTREAM, *PAC97OUTPUTSTREAM;
-
-/**
- * Struct for maintaining a host backend driver.
- */
-typedef struct AC97STATE *PAC97STATE;
-typedef struct AC97DRIVER
-{
-    /** Node for storing this driver in our device driver list of AC97STATE. */
-    RTLISTNODER3                       Node;
-    /** Pointer to AC97 controller (state). */
-    R3PTRTYPE(PAC97STATE)              pAC97State;
-    /** Driver flags. */
-    PDMAUDIODRVFLAGS                   Flags;
-    uint32_t                           PaddingFlags;
-    /** LUN # to which this driver has been assigned. */
-    uint8_t                            uLUN;
-    /** Whether this driver is in an attached state or not. */
-    bool                               fAttached;
-    uint8_t                            Padding[4];
-    /** Pointer to attached driver base interface. */
-    R3PTRTYPE(PPDMIBASE)               pDrvBase;
-    /** Audio connector interface to the underlying host backend. */
-    R3PTRTYPE(PPDMIAUDIOCONNECTOR)     pConnector;
-    /** Stream for line input. */
-    AC97INPUTSTREAM                    LineIn;
-    /** Stream for mic input. */
-    AC97INPUTSTREAM                    MicIn;
-    /** Stream for output. */
-    AC97OUTPUTSTREAM                   Out;
-} AC97DRIVER, *PAC97DRIVER;
-
-typedef struct AC97STATE
-{
-    /** The PCI device state. */
-    PCIDevice               PciDev;
-    /** R3 Pointer to the device instance. */
-    PPDMDEVINSR3            pDevInsR3;
-    /** Global Control (Bus Master Control Register) */
-    uint32_t                glob_cnt;
-    /** Global Status (Bus Master Control Register) */
-    uint32_t                glob_sta;
-    /** Codec Access Semaphore Register (Bus Master Control Register) */
-    uint32_t                cas;
-    uint32_t                last_samp;
-    uint8_t                 mixer_data[256];
-    /** Stream state for line-in. */
-    AC97STREAM              StrmStLineIn;
-    /** Stream state for microphone-in. */
-    AC97STREAM              StrmStMicIn;
-    /** Stream state for output. */
-    AC97STREAM              StrmStOut;
-#ifndef VBOX_WITH_AUDIO_CALLBACKS
-    /** The timer for pumping data thru the attached LUN drivers. */
-    PTMTIMERR3              pTimer;
-    /** The timer interval for pumping data thru the LUN drivers in timer ticks. */
-    uint64_t                cTimerTicks;
-    /** Timestamp of the last timer callback (ac97Timer).
-     * Used to calculate the time actually elapsed between two timer callbacks. */
-    uint64_t                uTimerTS;
-#endif
-#ifdef VBOX_WITH_STATISTICS
-    STAMPROFILE             StatTimer;
-    STAMCOUNTER             StatBytesRead;
-    STAMCOUNTER             StatBytesWritten;
-#endif
-    /** List of associated LUN drivers (AC97DRIVER). */
-    RTLISTANCHOR            lstDrv;
-    /** The device' software mixer. */
-    R3PTRTYPE(PAUDIOMIXER)  pMixer;
-    /** Audio sink for PCM output. */
-    R3PTRTYPE(PAUDMIXSINK)  pSinkOutput;
-    /** Audio sink for line input. */
-    R3PTRTYPE(PAUDMIXSINK)  pSinkLineIn;
-    /** Audio sink for microphone input. */
-    R3PTRTYPE(PAUDMIXSINK)  pSinkMicIn;
-    uint8_t                 silence[128];
-    int                     bup_flag;
-    /** The base interface for LUN\#0. */
-    PDMIBASE                IBase;
-    /** Base port of the I/O space region. */
-    RTIOPORT                IOPortBase[2];
-    /** Pointer to temporary scratch read/write buffer. */
-    R3PTRTYPE(uint8_t *)    pvReadWriteBuf;
-    /** Size of the temporary scratch read/write buffer. */
-    uint32_t                cbReadWriteBuf;
-    /** Codec model. */
-    uint32_t                uCodecModel;
-} AC97STATE, *PAC97STATE;
-
-#ifdef VBOX_WITH_STATISTICS
-AssertCompileMemberAlignment(AC97STATE, StatTimer, 8);
-#endif
-
-#ifndef VBOX_DEVICE_STRUCT_TESTCASE
-
-DECLINLINE(PAC97STREAM) ichac97GetStreamFromID(PAC97STATE pThis, uint32_t uID);
-static DECLCALLBACK(void) ichac97Reset(PPDMDEVINS pDevIns);
-#ifndef VBOX_WITH_AUDIO_CALLBACKS
-static DECLCALLBACK(void) ichac97Timer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser);
-#endif
-static int ichac97TransferAudio(PAC97STATE pThis, AC97SOUNDSOURCE enmSrc, uint32_t cbElapsed);
-
-static void ichac97WarmReset(PAC97STATE pThis)
-{
-    NOREF(pThis);
-}
-
-static void ichac97ColdReset(PAC97STATE pThis)
-{
-    NOREF(pThis);
-}
-
-/** Fetches the buffer descriptor at _CIV. */
-static void ichac97StreamFetchBDLE(PAC97STATE pThis, PAC97STREAM pStrmSt)
-{
-    PPDMDEVINS  pDevIns = ICHAC97STATE_2_DEVINS(pThis);
-    PAC97BMREGS pRegs   = &pStrmSt->Regs;
-
-    uint32_t u32[2];
-
-    PDMDevHlpPhysRead(pDevIns, pRegs->bdbar + pRegs->civ * 8, &u32[0], sizeof(u32));
-    pRegs->bd_valid   = 1;
-#if !defined(RT_ARCH_X86) && !defined(RT_ARCH_AMD64)
-# error Please adapt the code (audio buffers are little endian)!
-#else
-    pRegs->bd.addr    = RT_H2LE_U32(u32[0] & ~3);
-    pRegs->bd.ctl_len = RT_H2LE_U32(u32[1]);
-#endif
-    pRegs->picb       = pRegs->bd.ctl_len & 0xffff;
-    LogFlowFunc(("bd %2d addr=%#x ctl=%#06x len=%#x(%d bytes)\n",
-                  pRegs->civ, pRegs->bd.addr, pRegs->bd.ctl_len >> 16,
-                  pRegs->bd.ctl_len & 0xffff, (pRegs->bd.ctl_len & 0xffff) << 1));
-}
-
-/**
- * Update the BM status register
- */
-static void ichac97StreamUpdateStatus(PAC97STATE pThis, PAC97STREAM pStrmSt, uint32_t new_sr)
-{
-    PPDMDEVINS  pDevIns = ICHAC97STATE_2_DEVINS(pThis);
-    PAC97BMREGS pRegs   = &pStrmSt->Regs;
-
-    bool fSignal   = false;
-    bool iIrqLevel;
-
-    uint32_t new_mask = new_sr & SR_INT_MASK;
-    uint32_t old_mask = pRegs->sr  & SR_INT_MASK;
-
-    static uint32_t const masks[] = { GS_PIINT, GS_POINT, GS_MINT };
-
-    if (new_mask ^ old_mask)
-    {
-        /** @todo Is IRQ deasserted when only one of status bits is cleared? */
-        if (!new_mask)
-        {
-            fSignal   = true;
-            iIrqLevel = 0;
-        }
-        else if ((new_mask & SR_LVBCI) && (pRegs->cr & CR_LVBIE))
-        {
-            fSignal   = true;
-            iIrqLevel = 1;
-        }
-        else if ((new_mask & SR_BCIS) && (pRegs->cr & CR_IOCE))
-        {
-            fSignal   = true;
-            iIrqLevel = 1;
-        }
-    }
-
-    pRegs->sr = new_sr;
-
-    LogFlowFunc(("IOC%d, LVB%d, sr=%#x, fSignal=%RTbool, iIrqLevel=%d\n",
-                 pRegs->sr & SR_BCIS, pRegs->sr & SR_LVBCI, pRegs->sr, fSignal, iIrqLevel));
-
-    if (fSignal)
-    {
-        if (iIrqLevel)
-            pThis->glob_sta |=  masks[pStrmSt->u8Strm];
-        else
-            pThis->glob_sta &= ~masks[pStrmSt->u8Strm];
-
-        LogFlowFunc(("set irq level=%d\n", !!iIrqLevel));
-        PDMDevHlpPCISetIrq(pDevIns, 0, !!iIrqLevel);
-    }
-}
-
-static int ichac97StreamSetActive(PAC97STATE pThis, PAC97STREAM pStrmSt, bool fActive)
-{
-    AssertPtrReturn(pThis,   VERR_INVALID_POINTER);
-    AssertPtrReturn(pStrmSt, VERR_INVALID_POINTER);
-
-    LogFlowFunc(("u8Strm=%RU8, fActive=%RTbool\n", pStrmSt->u8Strm, fActive));
-
-    int rc = VINF_SUCCESS;
-
-    PAC97DRIVER pDrv;
-    switch (pStrmSt->u8Strm)
-    {
-        case PI_INDEX:
-            RTListForEach(&pThis->lstDrv, pDrv, AC97DRIVER, Node)
-            {
-                int rc2 = pDrv->pConnector->pfnEnableIn(pDrv->pConnector,
-                                                        pDrv->LineIn.pStrmIn, fActive);
-                if (RT_SUCCESS(rc))
-                    rc = rc2;
-            }
-            break;
-
-        case PO_INDEX:
-            RTListForEach(&pThis->lstDrv, pDrv, AC97DRIVER, Node)
-            {
-                int rc2 = pDrv->pConnector->pfnEnableOut(pDrv->pConnector,
-                                                         pDrv->Out.pStrmOut, fActive);
-                if (RT_SUCCESS(rc))
-                    rc = rc2;
-            }
-            break;
-
-        case MC_INDEX:
-            RTListForEach(&pThis->lstDrv, pDrv, AC97DRIVER, Node)
-            {
-                int rc2 = pDrv->pConnector->pfnEnableIn(pDrv->pConnector,
-                                                        pDrv->MicIn.pStrmIn, fActive);
-                if (RT_SUCCESS(rc))
-                    rc = rc2;
-            }
-            break;
-
-        default:
-            AssertMsgFailed(("Wrong index %RU32\n", pStrmSt->u8Strm));
-            rc = VERR_NOT_SUPPORTED;
-            break;
-    }
-
-    return rc;
-}
-
-static void ichac97StreamResetBMRegs(PAC97STATE pThis, PAC97STREAM pStrmSt)
-{
-    AssertPtrReturnVoid(pThis);
-    AssertPtrReturnVoid(pStrmSt);
-
-    LogFlowFuncEnter();
-
-    PAC97BMREGS pRegs = &pStrmSt->Regs;
-
-    pRegs->bdbar    = 0;
-    pRegs->civ      = 0;
-    pRegs->lvi      = 0;
-
-    ichac97StreamUpdateStatus(pThis, pStrmSt, SR_DCH); /** @todo Do we need to do that? */
-
-    pRegs->picb     = 0;
-    pRegs->piv      = 0;
-    pRegs->cr       = pRegs->cr & CR_DONT_CLEAR_MASK;
-    pRegs->bd_valid = 0;
-
-    int rc = ichac97StreamSetActive(pThis, pStrmSt, false /* fActive */);
-    AssertRC(rc);
-
-    RT_ZERO(pThis->silence);
-}
-
-static void ichac97MixerSet(PAC97STATE pThis, uint32_t u8Idx, uint16_t v)
-{
-    if (u8Idx + 2 > sizeof(pThis->mixer_data))
-    {
-        AssertMsgFailed(("Index %RU8 out of bounds(%zu)\n", u8Idx, sizeof(pThis->mixer_data)));
-        return;
-    }
-
-    pThis->mixer_data[u8Idx + 0] = RT_LO_U8(v);
-    pThis->mixer_data[u8Idx + 1] = RT_HI_U8(v);
-}
-
-static uint16_t ichac97MixerGet(PAC97STATE pThis, uint32_t u8Idx)
-{
-    uint16_t uVal;
-
-    if (u8Idx + 2 > sizeof(pThis->mixer_data))
-    {
-        AssertMsgFailed(("Index %RU8 out of bounds (%zu)\n", u8Idx, sizeof(pThis->mixer_data)));
-        uVal = UINT16_MAX;
-    }
-    else
-        uVal = RT_MAKE_U16(pThis->mixer_data[u8Idx + 0], pThis->mixer_data[u8Idx + 1]);
-
-    return uVal;
-}
-
-static DECLCALLBACK(void) ichac97CloseIn(PAC97STATE pThis, PDMAUDIORECSOURCE enmRecSource)
-{
-    NOREF(pThis);
-    NOREF(enmRecSource);
-    LogFlowFuncEnter();
-}
-
-static DECLCALLBACK(void) ichac97CloseOut(PAC97STATE pThis)
-{
-    NOREF(pThis);
-    LogFlowFuncEnter();
-}
-
-static int ichac97OpenIn(PAC97STATE pThis,
-                         const char *pszName, PDMAUDIORECSOURCE enmRecSource,
-                         PPDMAUDIOSTREAMCFG pCfg)
-{
-    AssertPtrReturn(pThis,   VERR_INVALID_POINTER);
-    AssertPtrReturn(pszName, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg,    VERR_INVALID_POINTER);
-
-    PAUDMIXSINK pSink;
-    switch (enmRecSource)
-    {
-        case PDMAUDIORECSOURCE_MIC:
-            pSink = pThis->pSinkMicIn;
-            break;
-        case PDMAUDIORECSOURCE_LINE_IN:
-            pSink = pThis->pSinkLineIn;
-            break;
-        default:
-            AssertMsgFailed(("Audio source %ld not supported\n", enmRecSource));
-            return VERR_NOT_SUPPORTED;
-    }
-
-    int rc = VINF_SUCCESS;
-
-    PAC97DRIVER pDrv;
-    RTListForEach(&pThis->lstDrv, pDrv, AC97DRIVER, Node)
-    {
-        char *pszDesc;
-        if (RTStrAPrintf(&pszDesc, "[LUN#%RU8] %s", pDrv->uLUN, pszName) <= 0)
-        {
-            rc = VERR_NO_MEMORY;
-            break;
-        }
-
-        PAC97INPUTSTREAM pStrmIn;
-        if (enmRecSource == PDMAUDIORECSOURCE_MIC) /** @todo Refine this once we have more streams. */
-            pStrmIn = &pDrv->MicIn;
-        else
-            pStrmIn = &pDrv->LineIn;
-
-        rc = pDrv->pConnector->pfnCreateIn(pDrv->pConnector, pszDesc, enmRecSource, pCfg, &pStrmIn->pStrmIn);
-
-        LogFlowFunc(("LUN#%RU8: Created input \"%s\", with rc=%Rrc\n", pDrv->uLUN, pszDesc, rc));
-        if (rc == VINF_SUCCESS) /* Note: Could return VWRN_ALREADY_EXISTS. */
-        {
-            AudioMixerRemoveStream(pSink, pStrmIn->phStrmIn);
-            rc = AudioMixerAddStreamIn(pSink,
-                                       pDrv->pConnector, pStrmIn->pStrmIn,
-                                       0 /* uFlags */, &pStrmIn->phStrmIn);
-        }
-
-        RTStrFree(pszDesc);
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static int ichac97OpenOut(PAC97STATE pThis, const char *pszName, PPDMAUDIOSTREAMCFG pCfg)
-{
-    AssertPtrReturn(pThis,   VERR_INVALID_POINTER);
-    AssertPtrReturn(pszName, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg,    VERR_INVALID_POINTER);
-
-    int rc = VINF_SUCCESS;
-    char *pszDesc;
-
-    PAC97DRIVER pDrv;
-    RTListForEach(&pThis->lstDrv, pDrv, AC97DRIVER, Node)
-    {
-        if (RTStrAPrintf(&pszDesc, "[LUN#%RU8] %s (%RU32Hz, %RU8 %s)",
-                         pDrv->uLUN, pszName, pCfg->uHz, pCfg->cChannels, pCfg->cChannels > 1 ? "Channels" : "Channel") <= 0)
-        {
-            rc = VERR_NO_MEMORY;
-            break;
-        }
-
-        rc = pDrv->pConnector->pfnCreateOut(pDrv->pConnector, pszDesc, pCfg, &pDrv->Out.pStrmOut);
-        LogFlowFunc(("LUN#%RU8: Created output \"%s\", with rc=%Rrc\n", pDrv->uLUN, pszDesc, rc));
-        if (rc == VINF_SUCCESS) /* Note: Could return VWRN_ALREADY_EXISTS. */
-        {
-            AudioMixerRemoveStream(pThis->pSinkOutput, pDrv->Out.phStrmOut);
-            rc = AudioMixerAddStreamOut(pThis->pSinkOutput,
-                                        pDrv->pConnector, pDrv->Out.pStrmOut,
-                                        0 /* uFlags */, &pDrv->Out.phStrmOut);
-        }
-
-        RTStrFree(pszDesc);
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static int ichac97StreamInitEx(PAC97STATE pThis, PAC97STREAM pStrmSt, uint8_t u8Strm, PPDMAUDIOSTREAMCFG pCfg)
-{
-    AssertPtrReturn(pThis,             VERR_INVALID_POINTER);
-    AssertPtrReturn(pStrmSt,           VERR_INVALID_POINTER);
-    AssertReturn(u8Strm <= LAST_INDEX, VERR_INVALID_PARAMETER);
-    AssertPtrReturn(pCfg,              VERR_INVALID_POINTER);
-
-    pStrmSt->u8Strm = u8Strm;
-
-    LogFlowFunc(("u8Strm=%RU8, %RU32Hz, %RU8 %s\n",
-                 pStrmSt->u8Strm, pCfg->uHz, pCfg->cChannels, pCfg->cChannels > 1 ? "Channels" : "Channel"));
-
-    int rc;
-    switch (pStrmSt->u8Strm)
-    {
-        case PI_INDEX:
-            rc = ichac97OpenIn(pThis, "ac97.pi", PDMAUDIORECSOURCE_LINE_IN, pCfg);
-            break;
-
-        case MC_INDEX:
-            rc = ichac97OpenIn(pThis, "ac97.mc", PDMAUDIORECSOURCE_MIC, pCfg);
-            break;
-
-        case PO_INDEX:
-            rc = ichac97OpenOut(pThis, "ac97.po", pCfg);
-            break;
-
-        default:
-            rc = VERR_NOT_SUPPORTED;
-            break;
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static int ichac97StreamInit(PAC97STATE pThis, PAC97STREAM pStrmSt, uint8_t u8Strm)
-{
-    int rc = VINF_SUCCESS;
-
-    PDMAUDIOSTREAMCFG streamCfg;
-    RT_ZERO(streamCfg);
-
-    switch (u8Strm)
-    {
-        case PI_INDEX:
-            streamCfg.uHz = ichac97MixerGet(pThis, AC97_PCM_LR_ADC_Rate);
-            break;
-
-        case MC_INDEX:
-            streamCfg.uHz = ichac97MixerGet(pThis, AC97_MIC_ADC_Rate);
-            break;
-
-        case PO_INDEX:
-            streamCfg.uHz = ichac97MixerGet(pThis, AC97_PCM_Front_DAC_Rate);
-            break;
-
-        default:
-            rc = VERR_NOT_SUPPORTED;
-            break;
-    }
-
-    if (RT_FAILURE(rc))
-        return rc;
-
-    if (streamCfg.uHz)
-    {
-        streamCfg.cChannels     = 2;
-        streamCfg.enmFormat     = AUD_FMT_S16;
-        streamCfg.enmEndianness = PDMAUDIOHOSTENDIANNESS;
-
-        return ichac97StreamInitEx(pThis, pStrmSt, u8Strm, &streamCfg);
-    }
-
-    /* If no frequency is given, disable the stream. */
-    return ichac97StreamSetActive(pThis, pStrmSt, false /* fActive */);
-}
-
-static int ichac97StreamReInit(PAC97STATE pThis, PAC97STREAM pStrmSt)
-{
-    return ichac97StreamInit(pThis, pStrmSt, pStrmSt->u8Strm);
-}
-
-static void ichac97StreamReset(PAC97STATE pThis, PAC97STREAM pStrmSt)
-{
-    AssertPtrReturnVoid(pThis);
-    AssertPtrReturnVoid(pStrmSt);
-
-    LogFlowFunc(("uStrm=%RU8\n", pStrmSt->u8Strm));
-}
-
-static int ichac97MixerSetVolume(PAC97STATE pThis, int index, PDMAUDIOMIXERCTL mt, uint32_t val)
-{
-    int mute = (val >> MUTE_SHIFT) & 1;
-    uint8_t rvol = val & VOL_MASK;
-    uint8_t lvol = (val >> 8) & VOL_MASK;
-
-    /* For the master volume, 0 corresponds to 0dB gain. But for the other
-     * volume controls, 0 corresponds to +12dB and 8 to 0dB. */
-    if (mt != PDMAUDIOMIXERCTL_VOLUME)
-    {
-        /* NB: Currently there is no gain support, only attenuation. */
-        lvol = lvol < 8 ? 0 : lvol - 8;
-        rvol = rvol < 8 ? 0 : rvol - 8;
-    }
-
-    /* AC'97 has 1.5dB steps; we use 0.375dB steps. */
-    rvol = 255 - rvol * 4;
-    lvol = 255 - lvol * 4;
-
-    LogFunc(("mt=%ld, val=%RX32, mute=%RTbool\n", mt, val, RT_BOOL(mute)));
-
-    int rc;
-
-#ifdef SOFT_VOLUME
-    if (pThis->pMixer) /* Device can be in reset state, so no mixer available. */
-    {
-        PDMAUDIOVOLUME vol = { RT_BOOL(mute), lvol, rvol };
-        switch (mt)
-        {
-            case PDMAUDIOMIXERCTL_VOLUME:
-                rc = AudioMixerSetMasterVolume(pThis->pMixer, &vol);
-                break;
-
-            case PDMAUDIOMIXERCTL_PCM:
-                rc = AudioMixerSetSinkVolume(pThis->pSinkOutput, &vol);
-                break;
-
-            case PDMAUDIOMIXERCTL_MIC_IN:
-                rc = AudioMixerSetSinkVolume(pThis->pSinkMicIn, &vol);
-                break;
-
-            case PDMAUDIOMIXERCTL_LINE_IN:
-                rc = AudioMixerSetSinkVolume(pThis->pSinkLineIn, &vol);
-                break;
-
-            default:
-                rc = VERR_NOT_SUPPORTED;
-                break;
-        }
-    }
-    else
-        rc = VERR_NOT_SUPPORTED;
-
-    if (RT_FAILURE(rc))
-        return rc;
-#else
-    rc = VINF_SUCCESS;
-#endif /* SOFT_VOLUME */
-
-    rvol = VOL_MASK - ((VOL_MASK * rvol) / 255);
-    lvol = VOL_MASK - ((VOL_MASK * lvol) / 255);
-
-    /*
-     * From AC'97 SoundMax Codec AD1981A: "Because AC '97 defines 6-bit volume registers, to
-     * maintain compatibility whenever the D5 or D13 bits are set to `1,' their respective
-     * lower five volume bits are automatically set to `1' by the Codec logic. On readback,
-     * all lower 5 bits will read ones whenever these bits are set to `1.'"
-     *
-     *  Linux ALSA depends on this behavior.
-     */
-    if (val & RT_BIT(5))
-        val |= RT_BIT(4) | RT_BIT(3) | RT_BIT(2) | RT_BIT(1) | RT_BIT(0);
-    if (val & RT_BIT(13))
-        val |= RT_BIT(12) | RT_BIT(11) | RT_BIT(10) | RT_BIT(9) | RT_BIT(8);
-
-    ichac97MixerSet(pThis, index, val);
-
-    return rc;
-}
-
-static PDMAUDIORECSOURCE ichac97IndextoRecSource(uint8_t i)
-{
-    switch (i)
-    {
-        case REC_MIC:     return PDMAUDIORECSOURCE_MIC;
-        case REC_CD:      return PDMAUDIORECSOURCE_CD;
-        case REC_VIDEO:   return PDMAUDIORECSOURCE_VIDEO;
-        case REC_AUX:     return PDMAUDIORECSOURCE_AUX;
-        case REC_LINE_IN: return PDMAUDIORECSOURCE_LINE_IN;
-        case REC_PHONE:   return PDMAUDIORECSOURCE_PHONE;
-        default:
-            break;
-    }
-
-    LogFlowFunc(("Unknown record source %d, using MIC\n", i));
-    return PDMAUDIORECSOURCE_MIC;
-}
-
-static uint8_t ichac97RecSourceToIndex(PDMAUDIORECSOURCE rs)
-{
-    switch (rs)
-    {
-        case PDMAUDIORECSOURCE_MIC:     return REC_MIC;
-        case PDMAUDIORECSOURCE_CD:      return REC_CD;
-        case PDMAUDIORECSOURCE_VIDEO:   return REC_VIDEO;
-        case PDMAUDIORECSOURCE_AUX:     return REC_AUX;
-        case PDMAUDIORECSOURCE_LINE_IN: return REC_LINE_IN;
-        case PDMAUDIORECSOURCE_PHONE:   return REC_PHONE;
-        default:
-            break;
-    }
-
-    LogFlowFunc(("Unknown audio recording source %d using MIC\n", rs));
-    return REC_MIC;
-}
-
-static void ichac97RecordSelect(PAC97STATE pThis, uint32_t val)
-{
-    uint8_t rs = val & REC_MASK;
-    uint8_t ls = (val >> 8) & REC_MASK;
-    PDMAUDIORECSOURCE ars = ichac97IndextoRecSource(rs);
-    PDMAUDIORECSOURCE als = ichac97IndextoRecSource(ls);
-    //AUD_set_record_source(&als, &ars);
-    rs = ichac97RecSourceToIndex(ars);
-    ls = ichac97RecSourceToIndex(als);
-    ichac97MixerSet(pThis, AC97_Record_Select, rs | (ls << 8));
-}
-
-static int ichac97MixerReset(PAC97STATE pThis)
-{
-    AssertPtrReturn(pThis, VERR_INVALID_PARAMETER);
-
-    LogFlowFuncEnter();
-
-    RT_ZERO(pThis->mixer_data);
-
-    /* Note: Make sure to reset all registers first before bailing out on error. */
-
-    ichac97MixerSet(pThis, AC97_Reset                   , 0x0000); /* 6940 */
-    ichac97MixerSet(pThis, AC97_Master_Volume_Mono_Mute , 0x8000);
-    ichac97MixerSet(pThis, AC97_PC_BEEP_Volume_Mute     , 0x0000);
-
-    ichac97MixerSet(pThis, AC97_Phone_Volume_Mute       , 0x8008);
-    ichac97MixerSet(pThis, AC97_Mic_Volume_Mute         , 0x8008);
-    ichac97MixerSet(pThis, AC97_CD_Volume_Mute          , 0x8808);
-    ichac97MixerSet(pThis, AC97_Aux_Volume_Mute         , 0x8808);
-    ichac97MixerSet(pThis, AC97_Record_Gain_Mic_Mute    , 0x8000);
-    ichac97MixerSet(pThis, AC97_General_Purpose         , 0x0000);
-    ichac97MixerSet(pThis, AC97_3D_Control              , 0x0000);
-    ichac97MixerSet(pThis, AC97_Powerdown_Ctrl_Stat     , 0x000f);
-
-    ichac97MixerSet(pThis, AC97_Extended_Audio_ID       , 0x0809);
-    ichac97MixerSet(pThis, AC97_Extended_Audio_Ctrl_Stat, 0x0009);
-    ichac97MixerSet(pThis, AC97_PCM_Front_DAC_Rate      , 0xbb80);
-    ichac97MixerSet(pThis, AC97_PCM_Surround_DAC_Rate   , 0xbb80);
-    ichac97MixerSet(pThis, AC97_PCM_LFE_DAC_Rate        , 0xbb80);
-    ichac97MixerSet(pThis, AC97_PCM_LR_ADC_Rate         , 0xbb80);
-    ichac97MixerSet(pThis, AC97_MIC_ADC_Rate            , 0xbb80);
-
-    if (pThis->uCodecModel == Codec_AD1980)
-    {
-        /* Analog Devices 1980 (AD1980) */
-        ichac97MixerSet(pThis, AC97_Reset                   , 0x0010);    /* Headphones. */
-        ichac97MixerSet(pThis, AC97_Vendor_ID1              , 0x4144);
-        ichac97MixerSet(pThis, AC97_Vendor_ID2              , 0x5370);
-        ichac97MixerSet(pThis, AC97_Headphone_Volume_Mute   , 0x8000);
-    }
-    else if (pThis->uCodecModel == Codec_AD1981B)
-    {
-        /* Analog Devices 1981B (AD1981B) */
-        ichac97MixerSet(pThis, AC97_Vendor_ID1              , 0x4144);
-        ichac97MixerSet(pThis, AC97_Vendor_ID2              , 0x5374);
-    }
-    else
-    {
-        /* Sigmatel 9700 (STAC9700) */
-        ichac97MixerSet(pThis, AC97_Vendor_ID1              , 0x8384);
-        ichac97MixerSet(pThis, AC97_Vendor_ID2              , 0x7600); /* 7608 */
-    }
-    ichac97RecordSelect(pThis, 0);
-
-    ichac97MixerSetVolume(pThis, AC97_Master_Volume_Mute,  PDMAUDIOMIXERCTL_VOLUME,  0x8000);
-    ichac97MixerSetVolume(pThis, AC97_PCM_Out_Volume_Mute, PDMAUDIOMIXERCTL_PCM,     0x8808);
-    ichac97MixerSetVolume(pThis, AC97_Line_In_Volume_Mute, PDMAUDIOMIXERCTL_LINE_IN, 0x8808);
-
-    return VINF_SUCCESS;
-}
-
-/**
- * Writes data from the device to the host backends.
- *
- * @return  IPRT status code.
- * @param   pThis
- * @param   pStrmSt
- * @param   cbMax
- * @param   pcbWritten
- */
-static int ichac97WriteAudio(PAC97STATE pThis, PAC97STREAM pStrmSt, uint32_t cbMax, uint32_t *pcbWritten)
-{
-    AssertPtrReturn(pThis,      VERR_INVALID_POINTER);
-    AssertPtrReturn(pStrmSt,    VERR_INVALID_POINTER);
-    AssertReturn(cbMax,         VERR_INVALID_PARAMETER);
-    /* pcbWritten is optional. */
-
-    PPDMDEVINS  pDevIns = ICHAC97STATE_2_DEVINS(pThis);
-    PAC97BMREGS pRegs   = &pStrmSt->Regs;
-
-    uint32_t    addr           = pRegs->bd.addr;
-    uint32_t    cbWrittenTotal = 0;
-    uint32_t    cbToRead;
-
-    uint32_t cbToWrite = RT_MIN((uint32_t)(pRegs->picb << 1), cbMax);
-    if (!cbToWrite)
-    {
-        if (pcbWritten)
-            *pcbWritten = 0;
-        return VINF_EOF;
-    }
-
-    int rc = VINF_SUCCESS;
-
-    LogFlowFunc(("pReg=%p, cbMax=%RU32, cbToWrite=%RU32\n", pRegs, cbMax, cbToWrite));
-
-    while (cbToWrite)
-    {
-        cbToRead = RT_MIN(cbToWrite, pThis->cbReadWriteBuf);
-        PDMDevHlpPhysRead(pDevIns, addr, pThis->pvReadWriteBuf, cbToRead); /** @todo Check rc? */
-
-        uint32_t cbWritten;
-
-        /* Just multiplex the output to the connected backends.
-         * No need to utilize the virtual mixer here (yet). */
-        PAC97DRIVER pDrv;
-        RTListForEach(&pThis->lstDrv, pDrv, AC97DRIVER, Node)
-        {
-            int rc2 = pDrv->pConnector->pfnWrite(pDrv->pConnector, pDrv->Out.pStrmOut,
-                                                 pThis->pvReadWriteBuf, cbToRead, &cbWritten);
-            LogFlowFunc(("\tLUN#%RU8: rc=%Rrc, cbWritten=%RU32\n", pDrv->uLUN, rc2, cbWritten));
-        }
-
-        LogFlowFunc(("\tcbToRead=%RU32, cbToWrite=%RU32, cbLeft=%RU32\n",
-                     cbToRead, cbToWrite, cbToWrite - cbWrittenTotal));
-
-        Assert(cbToWrite >= cbToRead);
-        cbToWrite      -= cbToRead;
-        addr           += cbToRead;
-        cbWrittenTotal += cbToRead;
-    }
-
-    pRegs->bd.addr = addr;
-
-    if (RT_SUCCESS(rc))
-    {
-        if (!cbToWrite) /* All data written? */
-        {
-            if (cbToRead < 4)
-            {
-                AssertMsgFailed(("Unable to save last written sample, cbToRead < 4 (is %RU32)\n", cbToRead));
-                pThis->last_samp = 0;
-            }
-            else
-                pThis->last_samp = *(uint32_t *)&pThis->pvReadWriteBuf[cbToRead - 4];
-        }
-
-        if (pcbWritten)
-            *pcbWritten = cbWrittenTotal;
-    }
-
-    LogFlowFunc(("cbWrittenTotal=%RU32, rc=%Rrc\n", cbWrittenTotal, rc));
-    return rc;
-}
-
-static void ichac97WriteBUP(PAC97STATE pThis, uint32_t cbElapsed)
-{
-    if (!(pThis->bup_flag & BUP_SET))
-    {
-        if (pThis->bup_flag & BUP_LAST)
-        {
-            unsigned int i;
-            uint32_t *p = (uint32_t*)pThis->silence;
-            for (i = 0; i < sizeof(pThis->silence) / 4; i++)
-                *p++ = pThis->last_samp;
-        }
-        else
-            RT_ZERO(pThis->silence);
-
-        pThis->bup_flag |= BUP_SET;
-    }
-
-    while (cbElapsed)
-    {
-        uint32_t cbToWrite = RT_MIN(cbElapsed, (uint32_t)sizeof(pThis->silence));
-        uint32_t cbWrittenToStream;
-        int rc2;
-
-        PAC97DRIVER pDrv;
-        RTListForEach(&pThis->lstDrv, pDrv, AC97DRIVER, Node)
-        {
-            if (pDrv->pConnector->pfnIsActiveOut(pDrv->pConnector, pDrv->Out.pStrmOut))
-            {
-                rc2 = pDrv->pConnector->pfnWrite(pDrv->pConnector, pDrv->Out.pStrmOut,
-                                                 pThis->silence, cbToWrite, &cbWrittenToStream);
-                if (RT_SUCCESS(rc2))
-                {
-                    if (cbWrittenToStream < cbToWrite) /* Lagging behind? */
-                        LogFlowFunc(("\tLUN#%RU8: Warning: Only written %RU32 / %RU32 bytes, expect lags\n",
-                                     pDrv->uLUN, cbWrittenToStream, cbToWrite));
-                }
-            }
-            else /* Stream disabled, not fatal. */
-            {
-                cbWrittenToStream = 0;
-                rc2 = VERR_NOT_AVAILABLE;
-                /* Keep going. */
-            }
-        }
-
-        /* Always report all data as being written;
-         * backends who were not able to catch up have to deal with it themselves. */
-        Assert(cbElapsed >= cbToWrite);
-        cbElapsed -= cbToWrite;
-    }
-}
-
-static int ichac97ReadAudio(PAC97STATE pThis, PAC97STREAM pStrmSt, uint32_t cbMax, uint32_t *pcbRead)
-{
-    AssertPtrReturn(pThis,   VERR_INVALID_POINTER);
-    AssertPtrReturn(pStrmSt, VERR_INVALID_POINTER);
-    AssertReturn(cbMax,      VERR_INVALID_PARAMETER);
-    /* pcbRead is optional. */
-
-    PPDMDEVINS pDevIns = ICHAC97STATE_2_DEVINS(pThis);
-    PAC97BMREGS pRegs  = &pStrmSt->Regs;
-
-    /* Select audio sink to process. */
-    AssertMsg(pStrmSt->u8Strm != PO_INDEX, ("Can't read from output\n"));
-    PAUDMIXSINK pSink = pStrmSt->u8Strm == MC_INDEX ? pThis->pSinkMicIn : pThis->pSinkLineIn;
-    AssertPtr(pSink);
-
-    uint32_t cbRead   = 0;
-
-    uint32_t cbMixBuf = cbMax;
-    uint32_t cbToRead = RT_MIN((uint32_t)(pRegs->picb << 1), cbMixBuf);
-
-    if (!cbToRead)
-    {
-        if (pcbRead)
-            *pcbRead = 0;
-        return VINF_EOF;
-    }
-
-    int rc;
-
-    uint8_t *pvMixBuf = (uint8_t *)RTMemAlloc(cbMixBuf);
-    if (pvMixBuf)
-    {
-        rc = AudioMixerProcessSinkIn(pSink, AUDMIXOP_BLEND, pvMixBuf, cbToRead, &cbRead);
-        if (   RT_SUCCESS(rc)
-            && cbRead)
-        {
-            PDMDevHlpPCIPhysWrite(pDevIns, pRegs->bd.addr, pvMixBuf, cbRead);
-            pRegs->bd.addr += cbRead;
-        }
-
-        RTMemFree(pvMixBuf);
-    }
-    else
-        rc = VERR_NO_MEMORY;
-
-    if (RT_SUCCESS(rc))
-    {
-        if (pcbRead)
-            *pcbRead = cbRead;
-    }
-
-    return rc;
-}
-
-#ifndef VBOX_WITH_AUDIO_CALLBACKS
-
-static DECLCALLBACK(void) ichac97Timer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
-{
-    PAC97STATE pThis = (PAC97STATE)pvUser;
-    Assert(pThis == PDMINS_2_DATA(pDevIns, PAC97STATE));
-    AssertPtr(pThis);
-
-    STAM_PROFILE_START(&pThis->StatTimer, a);
-
-    uint32_t cbInMax  = 0;
-    uint32_t cbOutMin = UINT32_MAX;
-
-    PAC97DRIVER pDrv;
-
-    uint64_t cTicksNow     = TMTimerGet(pTimer);
-    uint64_t cTicksElapsed = cTicksNow  - pThis->uTimerTS;
-    uint64_t cTicksPerSec  = TMTimerGetFreq(pTimer);
-
-    pThis->uTimerTS = cTicksNow;
-
-    /*
-     * Calculate the mixer's (fixed) sampling rate.
-     */
-    AssertPtr(pThis->pMixer);
-
-    PDMAUDIOSTREAMCFG mixerStrmCfg;
-    int rc = AudioMixerGetDeviceFormat(pThis->pMixer, &mixerStrmCfg);
-    AssertRC(rc);
-
-    PDMPCMPROPS mixerStrmProps;
-    rc = DrvAudioStreamCfgToProps(&mixerStrmCfg, &mixerStrmProps);
-    AssertRC(rc);
-
-    uint32_t cMixerSamplesMin  = (int)((2 * cTicksElapsed * mixerStrmCfg.uHz + cTicksPerSec) / cTicksPerSec / 2);
-    uint32_t cbMixerSamplesMin = cMixerSamplesMin << mixerStrmProps.cShift;
-
-    RTListForEach(&pThis->lstDrv, pDrv, AC97DRIVER, Node)
-    {
-        uint32_t cbIn = 0;
-        uint32_t cbOut = 0;
-
-        rc = pDrv->pConnector->pfnQueryStatus(pDrv->pConnector,
-                                              &cbIn, &cbOut, NULL /* cSamplesLive */);
-        if (RT_SUCCESS(rc))
-            rc = pDrv->pConnector->pfnPlayOut(pDrv->pConnector, NULL /* cSamplesPlayed */);
-
-#ifdef DEBUG_TIMER
-        LogFlowFunc(("LUN#%RU8: rc=%Rrc, cbIn=%RU32, cbOut=%RU32\n", pDrv->uLUN, rc, cbIn, cbOut));
-#endif
-        /* If we there was an error handling (available) output or there simply is no output available,
-         * then calculate the minimum data rate which must be processed by the device emulation in order
-         * to function correctly.
-         *
-         * This is not the optimal solution, but as we have to deal with this on a timer-based approach
-         * (until we have the audio callbacks) we need to have device' DMA engines running. */
-        if (!pDrv->pConnector->pfnIsValidOut(pDrv->pConnector, pDrv->Out.pStrmOut))
-        {
-            /* Use the mixer's (fixed) sampling rate. */
-            cbOut = RT_MAX(cbOut, cbMixerSamplesMin);
-            continue;
-        }
-
-        const bool fIsActiveOut = pDrv->pConnector->pfnIsActiveOut(pDrv->pConnector, pDrv->Out.pStrmOut);
-        if (   RT_FAILURE(rc)
-            || !fIsActiveOut)
-        {
-            uint32_t cSamplesMin  = (int)((2 * cTicksElapsed * pDrv->Out.pStrmOut->Props.uHz + cTicksPerSec) / cTicksPerSec / 2);
-            uint32_t cbSamplesMin = AUDIOMIXBUF_S2B(&pDrv->Out.pStrmOut->MixBuf, cSamplesMin);
-
-#ifdef DEBUG_TIMER
-            LogFlowFunc(("\trc=%Rrc, cSamplesMin=%RU32, cbSamplesMin=%RU32\n", rc, cSamplesMin, cbSamplesMin));
-#endif
-            cbOut = RT_MAX(cbOut, cbSamplesMin);
-        }
-
-        cbOutMin = RT_MIN(cbOutMin, cbOut);
-        cbInMax  = RT_MAX(cbInMax, cbIn);
-    }
-
-#ifdef DEBUG_TIMER
-    LogFlowFunc(("cbInMax=%RU32, cbOutMin=%RU32\n", cbInMax, cbOutMin));
-#endif
-
-    if (cbOutMin == UINT32_MAX)
-        cbOutMin = 0;
-
-    /*
-     * Playback.
-     */
-    if (cbOutMin)
-    {
-        Assert(cbOutMin != UINT32_MAX);
-        ichac97TransferAudio(pThis, PO_INDEX, cbOutMin); /** @todo Add rc! */
-    }
-
-    /*
-     * Recording.
-     */
-    if (cbInMax)
-        ichac97TransferAudio(pThis, PI_INDEX, cbInMax); /** @todo Add rc! */
-
-    /* Kick the timer again. */
-    uint64_t cTicks = pThis->cTimerTicks;
-    /** @todo adjust cTicks down by now much cbOutMin represents. */
-    TMTimerSet(pThis->pTimer, cTicksNow + cTicks);
-
-    STAM_PROFILE_STOP(&pThis->StatTimer, a);
-}
-
-#endif
-
-static int ichac97TransferAudio(PAC97STATE pThis, AC97SOUNDSOURCE enmSrc, uint32_t cbElapsed)
-{
-    LogFlowFunc(("pThis=%p, enmSrc=%RU32, cbElapsed=%RU32\n", pThis, enmSrc, cbElapsed));
-
-    PAC97STREAM pStrmSt;
-    switch (enmSrc)
-    {
-        case PI_INDEX: pStrmSt = &pThis->StrmStLineIn; break;
-        case MC_INDEX: pStrmSt = &pThis->StrmStMicIn;  break;
-        case PO_INDEX: pStrmSt = &pThis->StrmStOut;    break;
-        default:
-        {
-            AssertMsgFailed(("Unknown source index %ld\n", enmSrc));
-            return VERR_NOT_SUPPORTED;
-        }
-    }
-
-    PAC97BMREGS pRegs = &pStrmSt->Regs;
-
-    if (pRegs->sr & SR_DCH) /* Controller halted? */
-    {
-        if (pRegs->cr & CR_RPBM)
-        {
-            switch (enmSrc)
-            {
-                case PO_INDEX:
-                    ichac97WriteBUP(pThis, cbElapsed);
-                    break;
-
-                default:
-                    break;
-            }
-        }
-
-        return VINF_SUCCESS;
-    }
-
-    int rc = VINF_SUCCESS;
-    uint32_t cbWrittenTotal = 0;
-
-    while (cbElapsed >> 1)
-    {
-        if (!pRegs->bd_valid)
-        {
-            LogFlowFunc(("Invalid buffer descriptor, fetching next one ...\n"));
-            ichac97StreamFetchBDLE(pThis, pStrmSt);
-        }
-
-        if (!pRegs->picb) /* Got a new buffer descriptor, that is, the position is 0? */
-        {
-            LogFlowFunc(("Fresh buffer descriptor %RU8 is empty, addr=%#x, len=%#x, skipping\n",
-                         pRegs->civ, pRegs->bd.addr, pRegs->bd.ctl_len));
-            if (pRegs->civ == pRegs->lvi)
-            {
-                pRegs->sr |= SR_DCH; /* CELV? */
-                pThis->bup_flag = 0;
-
-                rc = VINF_EOF;
-                break;
-            }
-
-            pRegs->sr &= ~SR_CELV;
-            pRegs->civ = pRegs->piv;
-            pRegs->piv = (pRegs->piv + 1) % 32;
-
-            ichac97StreamFetchBDLE(pThis, pStrmSt);
-            continue;
-        }
-
-        uint32_t cbTransferred;
-        switch (enmSrc)
-        {
-            case PO_INDEX:
-            {
-                rc = ichac97WriteAudio(pThis, pStrmSt, cbElapsed, &cbTransferred);
-                if (   RT_SUCCESS(rc)
-                    && cbTransferred)
-                {
-                    cbWrittenTotal += cbTransferred;
-                    Assert(cbElapsed >= cbTransferred);
-                    cbElapsed      -= cbTransferred;
-                    Assert((cbTransferred & 1) == 0);    /* Else the following shift won't work */
-                    pRegs->picb    -= (cbTransferred >> 1);
-                }
-                break;
-            }
-
-            case PI_INDEX:
-            case MC_INDEX:
-            {
-                rc = ichac97ReadAudio(pThis, pStrmSt, cbElapsed, &cbTransferred);
-                if (   RT_SUCCESS(rc)
-                    && cbTransferred)
-                {
-                    Assert(cbElapsed >= cbTransferred);
-                    cbElapsed  -= cbTransferred;
-                    Assert((cbTransferred & 1) == 0);    /* Else the following shift won't work */
-                    pRegs->picb -= (cbTransferred >> 1);
-                }
-                break;
-            }
-
-            default:
-                AssertMsgFailed(("Source %RU32 not supported\n", enmSrc));
-                rc = VERR_NOT_SUPPORTED;
-                break;
-        }
-
-        LogFlowFunc(("pReg->picb=%#x, cbWrittenTotal=%RU32\n", pRegs->picb, cbWrittenTotal));
-
-        if (!pRegs->picb)
-        {
-            uint32_t new_sr = pRegs->sr & ~SR_CELV;
-
-            if (pRegs->bd.ctl_len & BD_IOC)
-            {
-                new_sr |= SR_BCIS;
-            }
-
-            if (pRegs->civ == pRegs->lvi)
-            {
-                LogFlowFunc(("Underrun civ (%RU8) == lvi (%RU8)\n", pRegs->civ, pRegs->lvi));
-                new_sr |= SR_LVBCI | SR_DCH | SR_CELV;
-                pThis->bup_flag = (pRegs->bd.ctl_len & BD_BUP) ? BUP_LAST : 0;
-
-                rc = VINF_EOF;
-            }
-            else
-            {
-                pRegs->civ = pRegs->piv;
-                pRegs->piv = (pRegs->piv + 1) % 32;
-                ichac97StreamFetchBDLE(pThis, pStrmSt);
-            }
-
-            ichac97StreamUpdateStatus(pThis, pStrmSt, new_sr);
-        }
-
-        if (   RT_FAILURE(rc)
-            || rc == VINF_EOF) /* All data processed? */
-        {
-            break;
-        }
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-/**
- * @callback_method_impl{FNIOMIOPORTIN}
- */
-static DECLCALLBACK(int) ichac97IOPortNABMRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port,
-                                               uint32_t *pu32Val, unsigned cbVal)
-{
-    PAC97STATE pThis    = (PAC97STATE)pvUser;
-
-    /* Get the index of the NABMBAR port. */
-    const uint32_t uPortIdx = Port - pThis->IOPortBase[1];
-
-    PAC97STREAM pStrmSt     = ichac97GetStreamFromID(pThis, AC97_PORT2IDX(uPortIdx));
-    PAC97BMREGS pRegs       = pStrmSt ? &pStrmSt->Regs : NULL;
-
-    switch (cbVal)
-    {
-        case 1:
-        {
-            switch (uPortIdx)
-            {
-                case CAS:
-                    /* Codec Access Semaphore Register */
-                    LogFlowFunc(("CAS %d\n", pThis->cas));
-                    *pu32Val = pThis->cas;
-                    pThis->cas = 1;
-                    break;
-                case PI_CIV:
-                case PO_CIV:
-                case MC_CIV:
-                    /* Current Index Value Register */
-                    *pu32Val = pRegs->civ;
-                    LogFlowFunc(("CIV[%d] -> %#x\n", AC97_PORT2IDX(uPortIdx), *pu32Val));
-                    break;
-                case PI_LVI:
-                case PO_LVI:
-                case MC_LVI:
-                    /* Last Valid Index Register */
-                    *pu32Val = pRegs->lvi;
-                    LogFlowFunc(("LVI[%d] -> %#x\n", AC97_PORT2IDX(uPortIdx), *pu32Val));
-                    break;
-                case PI_PIV:
-                case PO_PIV:
-                case MC_PIV:
-                    /* Prefetched Index Value Register */
-                    *pu32Val = pRegs->piv;
-                    LogFlowFunc(("PIV[%d] -> %#x\n", AC97_PORT2IDX(uPortIdx), *pu32Val));
-                    break;
-                case PI_CR:
-                case PO_CR:
-                case MC_CR:
-                    /* Control Register */
-                    *pu32Val = pRegs->cr;
-                    LogFlowFunc(("CR[%d] -> %#x\n", AC97_PORT2IDX(uPortIdx), *pu32Val));
-                    break;
-                case PI_SR:
-                case PO_SR:
-                case MC_SR:
-                    /* Status Register (lower part) */
-                    *pu32Val = pRegs->sr & 0xff; /** @todo r=andy Use RT_LO_U8. */
-                    LogFlowFunc(("SRb[%d] -> %#x\n", AC97_PORT2IDX(uPortIdx), *pu32Val));
-                    break;
-                default:
-                    *pu32Val = UINT32_MAX;
-                    LogFlowFunc(("U nabm readb %#x -> %#x\n", Port, *pu32Val));
-                    break;
-            }
-            break;
-        }
-
-        case 2:
-        {
-            switch (uPortIdx)
-            {
-                case PI_SR:
-                case PO_SR:
-                case MC_SR:
-                    /* Status Register */
-                    *pu32Val = pRegs->sr;
-                    LogFlowFunc(("SR[%d] -> %#x\n", AC97_PORT2IDX(uPortIdx), *pu32Val));
-                    break;
-                case PI_PICB:
-                case PO_PICB:
-                case MC_PICB:
-                    /* Position in Current Buffer Register */
-                    *pu32Val = pRegs->picb;
-                    LogFlowFunc(("PICB[%d] -> %#x\n", AC97_PORT2IDX(uPortIdx), *pu32Val));
-                    break;
-                default:
-                    *pu32Val = UINT32_MAX;
-                    LogFlowFunc(("U nabm readw %#x -> %#x\n", Port, *pu32Val));
-                    break;
-            }
-            break;
-        }
-
-        case 4:
-        {
-            switch (uPortIdx)
-            {
-                case PI_BDBAR:
-                case PO_BDBAR:
-                case MC_BDBAR:
-                    /* Buffer Descriptor Base Address Register */
-                    *pu32Val = pRegs->bdbar;
-                    LogFlowFunc(("BMADDR[%d] -> %#x\n", AC97_PORT2IDX(uPortIdx), *pu32Val));
-                    break;
-                case PI_CIV:
-                case PO_CIV:
-                case MC_CIV:
-                    /* 32-bit access: Current Index Value Register +
-                     *                Last Valid Index Register +
-                     *                Status Register */
-                    *pu32Val = pRegs->civ | (pRegs->lvi << 8) | (pRegs->sr << 16); /** @todo r=andy Use RT_MAKE_U32_FROM_U8. */
-                    LogFlowFunc(("CIV LVI SR[%d] -> %#x, %#x, %#x\n",
-                                 AC97_PORT2IDX(uPortIdx), pRegs->civ, pRegs->lvi, pRegs->sr));
-                    break;
-                case PI_PICB:
-                case PO_PICB:
-                case MC_PICB:
-                    /* 32-bit access: Position in Current Buffer Register +
-                     *                Prefetched Index Value Register +
-                     *                Control Register */
-                    *pu32Val = pRegs->picb | (pRegs->piv << 16) | (pRegs->cr << 24); /** @todo r=andy Use RT_MAKE_U32_FROM_U8. */
-                    LogFlowFunc(("PICB PIV CR[%d] -> %#x %#x %#x %#x\n",
-                                 AC97_PORT2IDX(uPortIdx), *pu32Val, pRegs->picb, pRegs->piv, pRegs->cr));
-                    break;
-                case GLOB_CNT:
-                    /* Global Control */
-                    *pu32Val = pThis->glob_cnt;
-                    LogFlowFunc(("glob_cnt -> %#x\n", *pu32Val));
-                    break;
-                case GLOB_STA:
-                    /* Global Status */
-                    *pu32Val = pThis->glob_sta | GS_S0CR;
-                    LogFlowFunc(("glob_sta -> %#x\n", *pu32Val));
-                    break;
-                default:
-                    *pu32Val = UINT32_MAX;
-                    LogFlowFunc(("U nabm readl %#x -> %#x\n", Port, *pu32Val));
-                    break;
-            }
-            break;
-        }
-
-        default:
-            return VERR_IOM_IOPORT_UNUSED;
-    }
-    return VINF_SUCCESS;
-}
-
-/**
- * @callback_method_impl{FNIOMIOPORTOUT}
- */
-static DECLCALLBACK(int) ichac97IOPortNABMWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port,
-                                                uint32_t u32Val, unsigned cbVal)
-{
-    PAC97STATE  pThis   = (PAC97STATE)pvUser;
-
-    /* Get the index of the NABMBAR register. */
-    const uint32_t uPortIdx = Port - pThis->IOPortBase[1];
-
-    PAC97STREAM pStrmSt     = ichac97GetStreamFromID(pThis, AC97_PORT2IDX(uPortIdx));
-    PAC97BMREGS pRegs       = pStrmSt ? &pStrmSt->Regs : NULL;
-
-    switch (cbVal)
-    {
-        case 1:
-        {
-            switch (uPortIdx)
-            {
-                case PI_LVI:
-                case PO_LVI:
-                case MC_LVI:
-                    /* Last Valid Index */
-                    if ((pRegs->cr & CR_RPBM) && (pRegs->sr & SR_DCH))
-                    {
-                        pRegs->sr &= ~(SR_DCH | SR_CELV);
-                        pRegs->civ = pRegs->piv;
-                        pRegs->piv = (pRegs->piv + 1) % 32;
-
-                        ichac97StreamFetchBDLE(pThis, pStrmSt);
-                    }
-                    pRegs->lvi = u32Val % 32;
-                    LogFlowFunc(("LVI[%d] <- %#x\n", AC97_PORT2IDX(uPortIdx), u32Val));
-                    break;
-                case PI_CR:
-                case PO_CR:
-                case MC_CR:
-                {
-                    /* Control Register */
-                    if (u32Val & CR_RR) /* Busmaster reset */
-                    {
-                        ichac97StreamResetBMRegs(pThis, pStrmSt);
-                    }
-                    else
-                    {
-                        pRegs->cr = u32Val & CR_VALID_MASK;
-                        if (!(pRegs->cr & CR_RPBM))
-                        {
-                            ichac97StreamSetActive(pThis, pStrmSt, false /* fActive */);
-                            pRegs->sr |= SR_DCH;
-                        }
-                        else
-                        {
-                            pRegs->civ = pRegs->piv;
-                            pRegs->piv = (pRegs->piv + 1) % 32;
-
-                            ichac97StreamFetchBDLE(pThis, pStrmSt);
-
-                            pRegs->sr &= ~SR_DCH;
-                            ichac97StreamSetActive(pThis, pStrmSt, true /* fActive */);
-                        }
-                    }
-                    LogFlowFunc(("CR[%d] <- %#x (cr %#x)\n", AC97_PORT2IDX(uPortIdx), u32Val, pRegs->cr));
-                    break;
-                }
-                case PI_SR:
-                case PO_SR:
-                case MC_SR:
-                    /* Status Register */
-                    pRegs->sr |= u32Val & ~(SR_RO_MASK | SR_WCLEAR_MASK);
-                    ichac97StreamUpdateStatus(pThis, pStrmSt, pRegs->sr & ~(u32Val & SR_WCLEAR_MASK));
-                    LogFlowFunc(("SR[%d] <- %#x (sr %#x)\n", AC97_PORT2IDX(uPortIdx), u32Val, pRegs->sr));
-                    break;
-                default:
-                    LogFlowFunc(("U nabm writeb %#x <- %#x\n", Port, u32Val));
-                    break;
-            }
-            break;
-        }
-
-        case 2:
-        {
-            switch (uPortIdx)
-            {
-                case PI_SR:
-                case PO_SR:
-                case MC_SR:
-                    /* Status Register */
-                    pRegs->sr |= u32Val & ~(SR_RO_MASK | SR_WCLEAR_MASK);
-                    ichac97StreamUpdateStatus(pThis, pStrmSt, pRegs->sr & ~(u32Val & SR_WCLEAR_MASK));
-                    LogFlowFunc(("SR[%d] <- %#x (sr %#x)\n", AC97_PORT2IDX(uPortIdx), u32Val, pRegs->sr));
-                    break;
-                default:
-                    LogFlowFunc(("U nabm writew %#x <- %#x\n", Port, u32Val));
-                    break;
-            }
-            break;
-        }
-
-        case 4:
-        {
-            switch (uPortIdx)
-            {
-                case PI_BDBAR:
-                case PO_BDBAR:
-                case MC_BDBAR:
-                    /* Buffer Descriptor list Base Address Register */
-                    pRegs->bdbar = u32Val & ~3;
-                    LogFlowFunc(("BDBAR[%d] <- %#x (bdbar %#x)\n", AC97_PORT2IDX(uPortIdx), u32Val, pRegs->bdbar));
-                    break;
-                case GLOB_CNT:
-                    /* Global Control */
-                    if (u32Val & GC_WR)
-                        ichac97WarmReset(pThis);
-                    if (u32Val & GC_CR)
-                        ichac97ColdReset(pThis);
-                    if (!(u32Val & (GC_WR | GC_CR)))
-                        pThis->glob_cnt = u32Val & GC_VALID_MASK;
-                    LogFlowFunc(("glob_cnt <- %#x (glob_cnt %#x)\n", u32Val, pThis->glob_cnt));
-                    break;
-                case GLOB_STA:
-                    /* Global Status */
-                    pThis->glob_sta &= ~(u32Val & GS_WCLEAR_MASK);
-                    pThis->glob_sta |= (u32Val & ~(GS_WCLEAR_MASK | GS_RO_MASK)) & GS_VALID_MASK;
-                    LogFlowFunc(("glob_sta <- %#x (glob_sta %#x)\n", u32Val, pThis->glob_sta));
-                    break;
-                default:
-                    LogFlowFunc(("U nabm writel %#x <- %#x\n", Port, u32Val));
-                    break;
-            }
-            break;
-        }
-
-        default:
-            AssertMsgFailed(("Port=%#x cb=%d u32=%#x\n", Port, cbVal, u32Val));
-            break;
-    }
-    return VINF_SUCCESS;
-}
-
-/**
- * @callback_method_impl{FNIOMIOPORTIN}
- */
-static DECLCALLBACK(int) ichac97IOPortNAMRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32Val, unsigned cbVal)
-{
-    PAC97STATE pThis = (PAC97STATE)pvUser;
-
-    switch (cbVal)
-    {
-        case 1:
-        {
-            LogFlowFunc(("U nam readb %#x\n", Port));
-            pThis->cas = 0;
-            *pu32Val = UINT32_MAX;
-            break;
-        }
-
-        case 2:
-        {
-            uint32_t index = Port - pThis->IOPortBase[0];
-            *pu32Val = UINT32_MAX;
-            pThis->cas = 0;
-            switch (index)
-            {
-                default:
-                    *pu32Val = ichac97MixerGet(pThis, index);
-                    LogFlowFunc(("nam readw %#x -> %#x\n", Port, *pu32Val));
-                    break;
-            }
-            break;
-        }
-
-        case 4:
-        {
-            LogFlowFunc(("U nam readl %#x\n", Port));
-            pThis->cas = 0;
-            *pu32Val = UINT32_MAX;
-            break;
-        }
-
-        default:
-            return VERR_IOM_IOPORT_UNUSED;
-    }
-    return VINF_SUCCESS;
-}
-
-/**
- * @callback_method_impl{FNIOMIOPORTOUT}
- */
-static DECLCALLBACK(int) ichac97IOPortNAMWrite(PPDMDEVINS pDevIns,
-                                               void *pvUser, RTIOPORT Port, uint32_t u32Val, unsigned cbVal)
-{
-    PAC97STATE pThis = (PAC97STATE)pvUser;
-
-    switch (cbVal)
-    {
-        case 1:
-        {
-            LogFlowFunc(("U nam writeb %#x <- %#x\n", Port, u32Val));
-            pThis->cas = 0;
-            break;
-        }
-
-        case 2:
-        {
-            uint32_t index = Port - pThis->IOPortBase[0];
-            pThis->cas = 0;
-            switch (index)
-            {
-                case AC97_Reset:
-                    ichac97Reset(pThis->CTX_SUFF(pDevIns));
-                    break;
-                case AC97_Powerdown_Ctrl_Stat:
-                    u32Val &= ~0xf;
-                    u32Val |= ichac97MixerGet(pThis, index) & 0xf;
-                    ichac97MixerSet(pThis, index, u32Val);
-                    break;
-                case AC97_Master_Volume_Mute:
-                    if (pThis->uCodecModel == Codec_AD1980)
-                        if (ichac97MixerGet(pThis, AC97_AD_Misc) & AD_MISC_LOSEL)
-                            break;  /* Register controls surround (rear), do nothing. */
-                    ichac97MixerSetVolume(pThis, index, PDMAUDIOMIXERCTL_VOLUME, u32Val);
-                    break;
-                case AC97_Headphone_Volume_Mute:
-                    if (pThis->uCodecModel == Codec_AD1980)
-                        if (ichac97MixerGet(pThis, AC97_AD_Misc) & AD_MISC_HPSEL)
-                            /* Register controls PCM (front) outputs. */
-                            ichac97MixerSetVolume(pThis, index, PDMAUDIOMIXERCTL_VOLUME, u32Val);
-                    break;
-                case AC97_PCM_Out_Volume_Mute:
-                    ichac97MixerSetVolume(pThis, index, PDMAUDIOMIXERCTL_PCM, u32Val);
-                    break;
-                case AC97_Line_In_Volume_Mute:
-                    ichac97MixerSetVolume(pThis, index, PDMAUDIOMIXERCTL_LINE_IN, u32Val);
-                    break;
-                case AC97_Record_Select:
-                    ichac97RecordSelect(pThis, u32Val);
-                    break;
-                case AC97_Vendor_ID1:
-                case AC97_Vendor_ID2:
-                    LogFlowFunc(("Attempt to write vendor ID to %#x\n", u32Val));
-                    break;
-                case AC97_Extended_Audio_ID:
-                    LogFlowFunc(("Attempt to write extended audio ID to %#x\n", u32Val));
-                    break;
-                case AC97_Extended_Audio_Ctrl_Stat:
-                    if (!(u32Val & EACS_VRA))
-                    {
-                        ichac97MixerSet(pThis, AC97_PCM_Front_DAC_Rate, 48000);
-                        ichac97StreamReInit(pThis, &pThis->StrmStOut);
-
-                        ichac97MixerSet(pThis, AC97_PCM_LR_ADC_Rate,    48000);
-                        ichac97StreamReInit(pThis, &pThis->StrmStLineIn);
-                    }
-                    if (!(u32Val & EACS_VRM))
-                    {
-                        ichac97MixerSet(pThis, AC97_MIC_ADC_Rate,       48000);
-                        ichac97StreamReInit(pThis, &pThis->StrmStMicIn);
-                    }
-                    LogFlowFunc(("Setting extended audio control to %#x\n", u32Val));
-                    ichac97MixerSet(pThis, AC97_Extended_Audio_Ctrl_Stat, u32Val);
-                    break;
-                case AC97_PCM_Front_DAC_Rate:
-                    if (ichac97MixerGet(pThis, AC97_Extended_Audio_Ctrl_Stat) & EACS_VRA)
-                    {
-                        ichac97MixerSet(pThis, index, u32Val);
-                        LogFlowFunc(("Set front DAC rate to %RU32\n", u32Val));
-                        ichac97StreamReInit(pThis, &pThis->StrmStOut);
-                    }
-                    else
-                        LogFlowFunc(("Attempt to set front DAC rate to %RU32, but VRA is not set\n", u32Val));
-                    break;
-                case AC97_MIC_ADC_Rate:
-                    if (ichac97MixerGet(pThis, AC97_Extended_Audio_Ctrl_Stat) & EACS_VRM)
-                    {
-                        ichac97MixerSet(pThis, index, u32Val);
-                        LogFlowFunc(("Set MIC ADC rate to %RU32\n", u32Val));
-                        ichac97StreamReInit(pThis, &pThis->StrmStMicIn);
-                    }
-                    else
-                        LogFlowFunc(("Attempt to set MIC ADC rate to %RU32, but VRM is not set\n", u32Val));
-                    break;
-                case AC97_PCM_LR_ADC_Rate:
-                    if (ichac97MixerGet(pThis, AC97_Extended_Audio_Ctrl_Stat) & EACS_VRA)
-                    {
-                        ichac97MixerSet(pThis, index, u32Val);
-                        LogFlowFunc(("Set front LR ADC rate to %RU32\n", u32Val));
-                        ichac97StreamReInit(pThis, &pThis->StrmStLineIn);
-                    }
-                    else
-                        LogFlowFunc(("Attempt to set LR ADC rate to %RU32, but VRA is not set\n", u32Val));
-                    break;
-                default:
-                    LogFlowFunc(("U nam writew %#x <- %#x\n", Port, u32Val));
-                    ichac97MixerSet(pThis, index, u32Val);
-                    break;
-            }
-            break;
-        }
-
-        case 4:
-        {
-            LogFlowFunc(("U nam writel %#x <- %#x\n", Port, u32Val));
-            pThis->cas = 0;
-            break;
-        }
-
-        default:
-            AssertMsgFailed(("Port=%#x cb=%d u32=%#x\n", Port, cbVal, u32Val));
-            break;
-    }
-
-    return VINF_SUCCESS;
-}
-
-
-/**
- * @callback_method_impl{FNPCIIOREGIONMAP}
- */
-static DECLCALLBACK(int) ichac97IOPortMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, uint32_t cb,
-                                          PCIADDRESSSPACE enmType)
-{
-    PPDMDEVINS  pDevIns = pPciDev->pDevIns;
-    PAC97STATE  pThis   = RT_FROM_MEMBER(pPciDev, AC97STATE, PciDev);
-    RTIOPORT    Port    = (RTIOPORT)GCPhysAddress;
-
-    Assert(enmType == PCI_ADDRESS_SPACE_IO);
-    Assert(cb >= 0x20);
-
-    if (iRegion < 0 || iRegion > 1) /* We support 2 regions max. at the moment. */
-        return VERR_INVALID_PARAMETER;
-
-    int rc;
-    if (iRegion == 0)
-        rc = PDMDevHlpIOPortRegister(pDevIns, Port, 256, pThis,
-                                     ichac97IOPortNAMWrite, ichac97IOPortNAMRead,
-                                     NULL, NULL, "ICHAC97 NAM");
-    else
-        rc = PDMDevHlpIOPortRegister(pDevIns, Port, 64, pThis,
-                                     ichac97IOPortNABMWrite, ichac97IOPortNABMRead,
-                                     NULL, NULL, "ICHAC97 NABM");
-    if (RT_FAILURE(rc))
-        return rc;
-
-    pThis->IOPortBase[iRegion] = Port;
-    return VINF_SUCCESS;
-}
-
-DECLINLINE(PAC97STREAM) ichac97GetStreamFromID(PAC97STATE pThis, uint32_t uID)
-{
-    switch (uID)
-    {
-        case PI_INDEX: return &pThis->StrmStLineIn;
-        case MC_INDEX: return &pThis->StrmStMicIn;
-        case PO_INDEX: return &pThis->StrmStOut;
-        default:       break;
-    }
-
-    return NULL;
-}
-
-#ifdef IN_RING3
-static int ichac97SaveStream(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, PAC97STREAM pStrmSt)
-{
-    PAC97BMREGS pRegs = &pStrmSt->Regs;
-
-    SSMR3PutU32(pSSM, pRegs->bdbar);
-    SSMR3PutU8( pSSM, pRegs->civ);
-    SSMR3PutU8( pSSM, pRegs->lvi);
-    SSMR3PutU16(pSSM, pRegs->sr);
-    SSMR3PutU16(pSSM, pRegs->picb);
-    SSMR3PutU8( pSSM, pRegs->piv);
-    SSMR3PutU8( pSSM, pRegs->cr);
-    SSMR3PutS32(pSSM, pRegs->bd_valid);
-    SSMR3PutU32(pSSM, pRegs->bd.addr);
-    SSMR3PutU32(pSSM, pRegs->bd.ctl_len);
-
-    return VINF_SUCCESS;
-}
-
-/**
- * @callback_method_impl{FNSSMDEVSAVEEXEC}
- */
-static DECLCALLBACK(int) ichac97SaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
-{
-    PAC97STATE pThis = PDMINS_2_DATA(pDevIns, PAC97STATE);
-
-    SSMR3PutU32(pSSM, pThis->glob_cnt);
-    SSMR3PutU32(pSSM, pThis->glob_sta);
-    SSMR3PutU32(pSSM, pThis->cas);
-
-    /** @todo r=andy For the next saved state version, add unique stream identifiers and a stream count. */
-    /* Note: The order the streams are saved here is critical, so don't touch. */
-    int rc2 = ichac97SaveStream(pDevIns, pSSM, &pThis->StrmStLineIn);
-    AssertRC(rc2);
-    rc2 = ichac97SaveStream(pDevIns, pSSM, &pThis->StrmStOut);
-    AssertRC(rc2);
-    rc2 = ichac97SaveStream(pDevIns, pSSM, &pThis->StrmStMicIn);
-    AssertRC(rc2);
-
-    SSMR3PutMem(pSSM, pThis->mixer_data, sizeof(pThis->mixer_data));
-
-    uint8_t active[LAST_INDEX];
-
-    PAC97DRIVER pDrv;
-    RTListForEach(&pThis->lstDrv, pDrv, AC97DRIVER, Node)
-    {
-        PPDMIAUDIOCONNECTOR pCon = pDrv->pConnector;
-        AssertPtr(pCon);
-        active[PI_INDEX] = pCon->pfnIsActiveIn (pCon, pDrv->LineIn.pStrmIn) ? 1 : 0;
-        active[PO_INDEX] = pCon->pfnIsActiveOut(pCon, pDrv->Out.pStrmOut)   ? 1 : 0;
-        active[MC_INDEX] = pCon->pfnIsActiveIn (pCon, pDrv->MicIn.pStrmIn)  ? 1 : 0;
-    }
-
-    SSMR3PutMem(pSSM, active, sizeof(active));
-
-    return VINF_SUCCESS;
-}
-
-static int ichac97LoadStream(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, PAC97STREAM pStrmSt)
-{
-    PAC97BMREGS pRegs = &pStrmSt->Regs;
-
-    SSMR3GetU32(pSSM, &pRegs->bdbar);
-    SSMR3GetU8( pSSM, &pRegs->civ);
-    SSMR3GetU8( pSSM, &pRegs->lvi);
-    SSMR3GetU16(pSSM, &pRegs->sr);
-    SSMR3GetU16(pSSM, &pRegs->picb);
-    SSMR3GetU8( pSSM, &pRegs->piv);
-    SSMR3GetU8( pSSM, &pRegs->cr);
-    SSMR3GetS32(pSSM, &pRegs->bd_valid);
-    SSMR3GetU32(pSSM, &pRegs->bd.addr);
-    SSMR3GetU32(pSSM, &pRegs->bd.ctl_len);
-
-    return VINF_SUCCESS;
-}
-
-/**
- * @callback_method_impl{FNSSMDEVLOADEXEC}
- */
-static DECLCALLBACK(int) ichac97LoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass)
-{
-    PAC97STATE pThis = PDMINS_2_DATA(pDevIns, PAC97STATE);
-
-    AssertMsgReturn (uVersion == AC97_SSM_VERSION, ("%RU32\n", uVersion), VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION);
-    Assert(uPass == SSM_PASS_FINAL); NOREF(uPass);
-
-    SSMR3GetU32(pSSM, &pThis->glob_cnt);
-    SSMR3GetU32(pSSM, &pThis->glob_sta);
-    SSMR3GetU32(pSSM, &pThis->cas);
-
-    /** @todo r=andy For the next saved state version, add unique stream identifiers and a stream count. */
-    /* Note: The order the streams are loaded here is critical, so don't touch. */
-    int rc2 = ichac97LoadStream(pDevIns, pSSM, &pThis->StrmStLineIn);
-    AssertRC(rc2);
-    rc2 = ichac97LoadStream(pDevIns, pSSM, &pThis->StrmStOut);
-    AssertRC(rc2);
-    rc2 = ichac97LoadStream(pDevIns, pSSM, &pThis->StrmStMicIn);
-    AssertRC(rc2);
-
-    SSMR3GetMem(pSSM, pThis->mixer_data, sizeof(pThis->mixer_data));
-
-    /** @todo r=andy Stream IDs are hardcoded to certain streams. */
-    uint8_t uaStrmsActive[LAST_INDEX];
-    SSMR3GetMem(pSSM, uaStrmsActive, sizeof(uaStrmsActive));
-
-    ichac97RecordSelect(pThis, ichac97MixerGet(pThis, AC97_Record_Select));
-# define V_(a, b) ichac97MixerSetVolume(pThis, a, b, ichac97MixerGet(pThis, a))
-    V_(AC97_Master_Volume_Mute,  PDMAUDIOMIXERCTL_VOLUME);
-    V_(AC97_PCM_Out_Volume_Mute, PDMAUDIOMIXERCTL_PCM);
-    V_(AC97_Line_In_Volume_Mute, PDMAUDIOMIXERCTL_LINE_IN);
-# undef V_
-    if (pThis->uCodecModel == Codec_AD1980)
-        if (ichac97MixerGet(pThis, AC97_AD_Misc) & AD_MISC_HPSEL)
-            ichac97MixerSetVolume(pThis, AC97_Headphone_Volume_Mute, PDMAUDIOMIXERCTL_VOLUME,
-                             ichac97MixerGet(pThis, AC97_Headphone_Volume_Mute));
-
-    int rc;
-    rc = ichac97StreamInit(pThis, &pThis->StrmStLineIn, PI_INDEX);
-    AssertRC(rc);
-    rc = ichac97StreamInit(pThis, &pThis->StrmStMicIn,  MC_INDEX);
-    AssertRC(rc);
-    rc = ichac97StreamInit(pThis, &pThis->StrmStOut,    PO_INDEX);
-    AssertRC(rc);
-
-    /** @todo r=andy Stream IDs are hardcoded to certain streams. */
-    rc = ichac97StreamSetActive(pThis, &pThis->StrmStLineIn, RT_BOOL(uaStrmsActive[PI_INDEX]));
-    AssertRC(rc);
-    rc = ichac97StreamSetActive(pThis, &pThis->StrmStMicIn,  RT_BOOL(uaStrmsActive[MC_INDEX]));
-    AssertRC(rc);
-    rc = ichac97StreamSetActive(pThis, &pThis->StrmStOut,    RT_BOOL(uaStrmsActive[PO_INDEX]));
-    AssertRC(rc);
-
-    pThis->bup_flag = 0;
-    pThis->last_samp = 0;
-
-    return VINF_SUCCESS;
-}
-
-
-/**
- * @interface_method_impl{PDMIBASE,pfnQueryInterface}
- */
-static DECLCALLBACK(void *) ichac97QueryInterface(struct PDMIBASE *pInterface, const char *pszIID)
-{
-    PAC97STATE pThis = RT_FROM_MEMBER(pInterface, AC97STATE, IBase);
-    Assert(&pThis->IBase == pInterface);
-
-    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->IBase);
-    return NULL;
-}
-
-
-/**
- * @interface_method_impl{PDMDEVREG,pfnReset}
- *
- * @remarks The original sources didn't install a reset handler, but it seems to
- *          make sense to me so we'll do it.
- */
-static DECLCALLBACK(void) ichac97Reset(PPDMDEVINS pDevIns)
-{
-    PAC97STATE pThis = PDMINS_2_DATA(pDevIns, PAC97STATE);
-
-    LogFlowFuncEnter();
-
-    /*
-     * Reset the device state (will need pDrv later).
-     */
-    ichac97StreamResetBMRegs(pThis, &pThis->StrmStLineIn);
-    ichac97StreamResetBMRegs(pThis, &pThis->StrmStMicIn);
-    ichac97StreamResetBMRegs(pThis, &pThis->StrmStOut);
-
-    /*
-     * Reset the mixer too. The Windows XP driver seems to rely on
-     * this. At least it wants to read the vendor id before it resets
-     * the codec manually.
-     */
-    ichac97MixerReset(pThis);
-
-    /*
-     * Stop any audio currently playing.
-     */
-    PAC97DRIVER pDrv;
-    RTListForEach(&pThis->lstDrv, pDrv, AC97DRIVER, Node)
-    {
-        pDrv->pConnector->pfnEnableIn(pDrv->pConnector,  pDrv->LineIn.pStrmIn, false /* Disable */);
-        /* Ignore rc. */
-        pDrv->pConnector->pfnEnableIn(pDrv->pConnector,  pDrv->MicIn.pStrmIn,  false /* Disable */);
-        /* Ditto. */
-        pDrv->pConnector->pfnEnableOut(pDrv->pConnector, pDrv->Out.pStrmOut,   false /* Disable */);
-        /* Ditto. */
-    }
-
-    /*
-     * Reset all streams.
-     */
-    ichac97StreamReset(pThis, &pThis->StrmStLineIn);
-    ichac97StreamReset(pThis, &pThis->StrmStMicIn);
-    ichac97StreamReset(pThis, &pThis->StrmStOut);
-
-    LogRel(("AC97: Reset\n"));
-}
-
-
-/**
- * @interface_method_impl{PDMDEVREG,pfnDestruct}
- */
-static DECLCALLBACK(int) ichac97Destruct(PPDMDEVINS pDevIns)
-{
-    PAC97STATE pThis = PDMINS_2_DATA(pDevIns, PAC97STATE);
-
-    LogFlowFuncEnter();
-
-    PAC97DRIVER pDrv;
-    while (!RTListIsEmpty(&pThis->lstDrv))
-    {
-        pDrv = RTListGetFirst(&pThis->lstDrv, AC97DRIVER, Node);
-
-        RTListNodeRemove(&pDrv->Node);
-        RTMemFree(pDrv);
-    }
-
-    if (pThis->pMixer)
-    {
-        AudioMixerDestroy(pThis->pMixer);
-        pThis->pMixer = NULL;
-    }
-
-    if (pThis->pvReadWriteBuf)
-    {
-        RTMemFree(pThis->pvReadWriteBuf);
-        pThis->pvReadWriteBuf = NULL;
-        pThis->cbReadWriteBuf = 0;
-    }
-
-    LogFlowFuncLeave();
-    return VINF_SUCCESS;
-}
-
-
-/**
- * Attach command, internal version.
- *
- * This is called to let the device attach to a driver for a specified LUN
- * during runtime. This is not called during VM construction, the device
- * constructor has to attach to all the available drivers.
- *
- * @returns VBox status code.
- * @param   pDevIns     The device instance.
- * @param   pDrv        Driver to (re-)use for (re-)attaching to.
- *                      If NULL is specified, a new driver will be created and appended
- *                      to the driver list.
- * @param   uLUN        The logical unit which is being detached.
- * @param   fFlags      Flags, combination of the PDMDEVATT_FLAGS_* \#defines.
- */
-static DECLCALLBACK(int) ichac97AttachInternal(PPDMDEVINS pDevIns, PAC97DRIVER pDrv, unsigned uLUN, uint32_t fFlags)
-{
-    PAC97STATE pThis = PDMINS_2_DATA(pDevIns, PAC97STATE);
-
-    /*
-     * Attach driver.
-     */
-    char *pszDesc = NULL;
-    if (RTStrAPrintf(&pszDesc, "Audio driver port (AC'97) for LUN #%u", uLUN) <= 0)
-        AssertReleaseMsgReturn(pszDesc,
-                               ("Not enough memory for AC'97 driver port description of LUN #%u\n", uLUN),
-                               VERR_NO_MEMORY);
-
-    PPDMIBASE pDrvBase;
-    int rc = PDMDevHlpDriverAttach(pDevIns, uLUN,
-                                   &pThis->IBase, &pDrvBase, pszDesc);
-    if (RT_SUCCESS(rc))
-    {
-        if (pDrv == NULL)
-            pDrv = (PAC97DRIVER)RTMemAllocZ(sizeof(AC97DRIVER));
-        if (pDrv)
-        {
-            pDrv->pDrvBase   = pDrvBase;
-            pDrv->pConnector = PDMIBASE_QUERY_INTERFACE(pDrvBase, PDMIAUDIOCONNECTOR);
-            AssertMsg(pDrv->pConnector != NULL, ("Configuration error: LUN #%u has no host audio interface, rc=%Rrc\n", uLUN, rc));
-            pDrv->pAC97State = pThis;
-            pDrv->uLUN       = uLUN;
-
-            /*
-             * For now we always set the driver at LUN 0 as our primary
-             * host backend. This might change in the future.
-             */
-            if (pDrv->uLUN == 0)
-                pDrv->Flags |= PDMAUDIODRVFLAG_PRIMARY;
-
-            LogFunc(("LUN#%RU8: pCon=%p, drvFlags=0x%x\n", uLUN, pDrv->pConnector, pDrv->Flags));
-
-            /* Attach to driver list if not attached yet. */
-            if (!pDrv->fAttached)
-            {
-                RTListAppend(&pThis->lstDrv, &pDrv->Node);
-                pDrv->fAttached = true;
-            }
-        }
-        else
-            rc = VERR_NO_MEMORY;
-    }
-    else if (rc == VERR_PDM_NO_ATTACHED_DRIVER)
-        LogFunc(("No attached driver for LUN #%u\n", uLUN));
-
-    if (RT_FAILURE(rc))
-    {
-        /* Only free this string on failure;
-         * must remain valid for the live of the driver instance. */
-        RTStrFree(pszDesc);
-    }
-
-    LogFunc(("iLUN=%u, fFlags=0x%x, rc=%Rrc\n", uLUN, fFlags, rc));
-    return rc;
-}
-
-
-/**
- * Attach command.
- *
- * This is called to let the device attach to a driver for a specified LUN
- * during runtime. This is not called during VM construction, the device
- * constructor has to attach to all the available drivers.
- *
- * @returns VBox status code.
- * @param   pDevIns     The device instance.
- * @param   uLUN        The logical unit which is being detached.
- * @param   fFlags      Flags, combination of the PDMDEVATT_FLAGS_* \#defines.
- */
-static DECLCALLBACK(int) ichac97Attach(PPDMDEVINS pDevIns, unsigned uLUN, uint32_t fFlags)
-{
-    return ichac97AttachInternal(pDevIns, NULL /* pDrv */, uLUN, fFlags);
-}
-
-static DECLCALLBACK(void) ichac97Detach(PPDMDEVINS pDevIns, unsigned uLUN, uint32_t fFlags)
-{
-    LogFunc(("iLUN=%u, fFlags=0x%x\n", uLUN, fFlags));
-}
-
-/**
- * Re-attach.
- *
- * @returns VBox status code.
- * @param   pThis       Device instance.
- * @param   pDrv        Driver instance used for attaching to.
- *                      If NULL is specified, a new driver will be created and appended
- *                      to the driver list.
- * @param   uLUN        The logical unit which is being re-detached.
- * @param   pszDriver   Driver name.
- */
-static int ichac97Reattach(PAC97STATE pThis, PAC97DRIVER pDrv, uint8_t uLUN, const char *pszDriver)
-{
-    AssertPtrReturn(pThis,     VERR_INVALID_POINTER);
-    AssertPtrReturn(pszDriver, VERR_INVALID_POINTER);
-
-    PVM pVM = PDMDevHlpGetVM(pThis->pDevInsR3);
-    PCFGMNODE pRoot = CFGMR3GetRoot(pVM);
-    PCFGMNODE pDev0 = CFGMR3GetChild(pRoot, "Devices/ichac97/0/");
-
-    /* Remove LUN branch. */
-    CFGMR3RemoveNode(CFGMR3GetChildF(pDev0, "LUN#%u/", uLUN));
-
-    if (pDrv)
-    {
-        /* Re-use a driver instance => detach the driver before. */
-        int rc = PDMDevHlpDriverDetach(pThis->pDevInsR3, PDMIBASE_2_PDMDRV(pDrv->pDrvBase), 0 /* fFlags */);
-        if (RT_FAILURE(rc))
-            return rc;
-    }
-
-#define RC_CHECK() if (RT_FAILURE(rc)) { AssertReleaseRC(rc); break; }
-
-    int rc = VINF_SUCCESS;
-    do
-    {
-        PCFGMNODE pLunL0;
-        rc = CFGMR3InsertNodeF(pDev0, &pLunL0, "LUN#%u/", uLUN);        RC_CHECK();
-        rc = CFGMR3InsertString(pLunL0, "Driver",       "AUDIO");       RC_CHECK();
-        rc = CFGMR3InsertNode(pLunL0,   "Config/",       NULL);         RC_CHECK();
-
-        PCFGMNODE pLunL1, pLunL2;
-        rc = CFGMR3InsertNode  (pLunL0, "AttachedDriver/", &pLunL1);    RC_CHECK();
-        rc = CFGMR3InsertNode  (pLunL1,  "Config/",        &pLunL2);    RC_CHECK();
-        rc = CFGMR3InsertString(pLunL1,  "Driver",          pszDriver); RC_CHECK();
-
-        rc = CFGMR3InsertString(pLunL2, "AudioDriver", pszDriver);      RC_CHECK();
-
-    } while (0);
-
-    if (RT_SUCCESS(rc))
-        rc = ichac97AttachInternal(pThis->pDevInsR3, pDrv, uLUN, 0 /* fFlags */);
-
-    LogFunc(("pThis=%p, uLUN=%u, pszDriver=%s, rc=%Rrc\n", pThis, uLUN, pszDriver, rc));
-
-#undef RC_CHECK
-
-    return rc;
-}
-
-/**
- * @interface_method_impl{PDMDEVREG,pfnConstruct}
- */
-static DECLCALLBACK(int) ichac97Construct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
-{
-    PAC97STATE pThis = PDMINS_2_DATA(pDevIns, PAC97STATE);
-
-    /* NB: This must be done *before* any possible failure (and running the destructor). */
-    RTListInit(&pThis->lstDrv);
-
-    Assert(iInstance == 0);
-    PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
-
-    /*
-     * Validations.
-     */
-    if (!CFGMR3AreValuesValid(pCfg,
-                              "Codec\0"
-                              "TimerHz\0"))
-        return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES,
-                                N_("Invalid configuration for the AC'97 device"));
-
-    /*
-     * Read config data.
-     */
-    char szCodec[20];
-    int rc = CFGMR3QueryStringDef(pCfg, "Codec", &szCodec[0], sizeof(szCodec), "STAC9700");
-    if (RT_FAILURE(rc))
-        return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES,
-                                N_("AC'97 configuration error: Querying \"Codec\" as string failed"));
-
-#ifndef VBOX_WITH_AUDIO_CALLBACKS
-    uint16_t uTimerHz;
-    rc = CFGMR3QueryU16Def(pCfg, "TimerHz", &uTimerHz, 200 /* Hz */);
-    if (RT_FAILURE(rc))
-        return PDMDEV_SET_ERROR(pDevIns, rc,
-                                N_("AC'97 configuration error: failed to read Hertz (Hz) rate as unsigned integer"));
-#endif
-
-    /*
-     * The AD1980 codec (with corresponding PCI subsystem vendor ID) is whitelisted
-     * in the Linux kernel; Linux makes no attempt to measure the data rate and assumes
-     * 48 kHz rate, which is exactly what we need. Same goes for AD1981B.
-     */
-    bool fChipAD1980 = false;
-    if (!strcmp(szCodec, "STAC9700"))
-        pThis->uCodecModel = Codec_STAC9700;
-    else if (!strcmp(szCodec, "AD1980"))
-        pThis->uCodecModel = Codec_AD1980;
-    else if (!strcmp(szCodec, "AD1981B"))
-        pThis->uCodecModel = Codec_AD1981B;
-    else
-    {
-        return PDMDevHlpVMSetError(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES, RT_SRC_POS,
-                                   N_("AC'97 configuration error: The \"Codec\" value \"%s\" is unsupported"),
-                                   szCodec);
-    }
-
-    /*
-     * Initialize data (most of it anyway).
-     */
-    pThis->pDevInsR3                = pDevIns;
-    /* IBase */
-    pThis->IBase.pfnQueryInterface  = ichac97QueryInterface;
-
-    /* PCI Device (the assertions will be removed later) */
-    PCIDevSetVendorId         (&pThis->PciDev, 0x8086); /* 00 ro - intel. */               Assert(pThis->PciDev.config[0x00] == 0x86); Assert(pThis->PciDev.config[0x01] == 0x80);
-    PCIDevSetDeviceId         (&pThis->PciDev, 0x2415); /* 02 ro - 82801 / 82801aa(?). */  Assert(pThis->PciDev.config[0x02] == 0x15); Assert(pThis->PciDev.config[0x03] == 0x24);
-    PCIDevSetCommand          (&pThis->PciDev, 0x0000); /* 04 rw,ro - pcicmd. */           Assert(pThis->PciDev.config[0x04] == 0x00); Assert(pThis->PciDev.config[0x05] == 0x00);
-    PCIDevSetStatus           (&pThis->PciDev, VBOX_PCI_STATUS_DEVSEL_MEDIUM |  VBOX_PCI_STATUS_FAST_BACK); /* 06 rwc?,ro? - pcists. */      Assert(pThis->PciDev.config[0x06] == 0x80); Assert(pThis->PciDev.config[0x07] == 0x02);
-    PCIDevSetRevisionId       (&pThis->PciDev, 0x01);   /* 08 ro - rid. */                 Assert(pThis->PciDev.config[0x08] == 0x01);
-    PCIDevSetClassProg        (&pThis->PciDev, 0x00);   /* 09 ro - pi. */                  Assert(pThis->PciDev.config[0x09] == 0x00);
-    PCIDevSetClassSub         (&pThis->PciDev, 0x01);   /* 0a ro - scc; 01 == Audio. */    Assert(pThis->PciDev.config[0x0a] == 0x01);
-    PCIDevSetClassBase        (&pThis->PciDev, 0x04);   /* 0b ro - bcc; 04 == multimedia. */ Assert(pThis->PciDev.config[0x0b] == 0x04);
-    PCIDevSetHeaderType       (&pThis->PciDev, 0x00);   /* 0e ro - headtyp. */             Assert(pThis->PciDev.config[0x0e] == 0x00);
-    PCIDevSetBaseAddress      (&pThis->PciDev, 0,       /* 10 rw - nambar - native audio mixer base. */
-                               true /* fIoSpace */, false /* fPrefetchable */, false /* f64Bit */, 0x00000000); Assert(pThis->PciDev.config[0x10] == 0x01); Assert(pThis->PciDev.config[0x11] == 0x00); Assert(pThis->PciDev.config[0x12] == 0x00); Assert(pThis->PciDev.config[0x13] == 0x00);
-    PCIDevSetBaseAddress      (&pThis->PciDev, 1,       /* 14 rw - nabmbar - native audio bus mastering. */
-                               true /* fIoSpace */, false /* fPrefetchable */, false /* f64Bit */, 0x00000000); Assert(pThis->PciDev.config[0x14] == 0x01); Assert(pThis->PciDev.config[0x15] == 0x00); Assert(pThis->PciDev.config[0x16] == 0x00); Assert(pThis->PciDev.config[0x17] == 0x00);
-    PCIDevSetInterruptLine    (&pThis->PciDev, 0x00);   /* 3c rw. */                       Assert(pThis->PciDev.config[0x3c] == 0x00);
-    PCIDevSetInterruptPin     (&pThis->PciDev, 0x01);   /* 3d ro - INTA#. */               Assert(pThis->PciDev.config[0x3d] == 0x01);
-
-    if (pThis->uCodecModel == Codec_AD1980)
-    {
-        PCIDevSetSubSystemVendorId(&pThis->PciDev, 0x1028); /* 2c ro - Dell.) */
-        PCIDevSetSubSystemId      (&pThis->PciDev, 0x0177); /* 2e ro. */
-    }
-    else if (pThis->uCodecModel == Codec_AD1981B)
-    {
-        PCIDevSetSubSystemVendorId(&pThis->PciDev, 0x1028); /* 2c ro - Dell.) */
-        PCIDevSetSubSystemId      (&pThis->PciDev, 0x01ad); /* 2e ro. */
-    }
-    else
-    {
-        PCIDevSetSubSystemVendorId(&pThis->PciDev, 0x8086); /* 2c ro - Intel.) */
-        PCIDevSetSubSystemId      (&pThis->PciDev, 0x0000); /* 2e ro. */
-    }
-
-    /*
-     * Register the PCI device, it's I/O regions, the timer and the
-     * saved state item.
-     */
-    rc = PDMDevHlpPCIRegister(pDevIns, &pThis->PciDev);
-    if (RT_FAILURE(rc))
-        return rc;
-
-    rc = PDMDevHlpPCIIORegionRegister(pDevIns, 0, 256, PCI_ADDRESS_SPACE_IO, ichac97IOPortMap);
-    if (RT_FAILURE(rc))
-        return rc;
-
-    rc = PDMDevHlpPCIIORegionRegister(pDevIns, 1, 64, PCI_ADDRESS_SPACE_IO, ichac97IOPortMap);
-    if (RT_FAILURE(rc))
-        return rc;
-
-    rc = PDMDevHlpSSMRegister(pDevIns, AC97_SSM_VERSION, sizeof(*pThis), ichac97SaveExec, ichac97LoadExec);
-    if (RT_FAILURE(rc))
-        return rc;
-
-    /*
-     * Attach driver.
-     */
-    uint8_t uLUN;
-    for (uLUN = 0; uLUN < UINT8_MAX; ++uLUN)
-    {
-        LogFunc(("Trying to attach driver for LUN #%RU8 ...\n", uLUN));
-        rc = ichac97AttachInternal(pDevIns, NULL /* pDrv */, uLUN, 0 /* fFlags */);
-        if (RT_FAILURE(rc))
-        {
-            if (rc == VERR_PDM_NO_ATTACHED_DRIVER)
-                rc = VINF_SUCCESS;
-            else if (rc == VERR_AUDIO_BACKEND_INIT_FAILED)
-            {
-                ichac97Reattach(pThis, NULL /* pDrv */, uLUN, "NullAudio");
-                PDMDevHlpVMSetRuntimeError(pDevIns, 0 /*fFlags*/, "HostAudioNotResponding",
-                        N_("No audio devices could be opened. Selecting the NULL audio backend "
-                            "with the consequence that no sound is audible"));
-                /* attaching to the NULL audio backend will never fail */
-                rc = VINF_SUCCESS;
-            }
-            break;
-        }
-    }
-
-    LogFunc(("cLUNs=%RU8, rc=%Rrc\n", uLUN, rc));
-
-    if (RT_SUCCESS(rc))
-    {
-        rc = AudioMixerCreate("AC'97 Mixer", 0 /* uFlags */, &pThis->pMixer);
-        if (RT_SUCCESS(rc))
-        {
-            /* Set a default audio format for our mixer. */
-            PDMAUDIOSTREAMCFG streamCfg;
-            streamCfg.uHz           = 44100;
-            streamCfg.cChannels     = 2;
-            streamCfg.enmFormat     = AUD_FMT_S16;
-            streamCfg.enmEndianness = PDMAUDIOHOSTENDIANNESS;
-
-            rc = AudioMixerSetDeviceFormat(pThis->pMixer, &streamCfg);
-            AssertRC(rc);
-
-            /* Add all required audio sinks. */
-            rc = AudioMixerAddSink(pThis->pMixer, "[Playback] PCM Output", AUDMIXSINKDIR_OUTPUT, &pThis->pSinkOutput);
-            AssertRC(rc);
-
-            rc = AudioMixerAddSink(pThis->pMixer, "[Recording] Line In", AUDMIXSINKDIR_INPUT, &pThis->pSinkLineIn);
-            AssertRC(rc);
-
-            rc = AudioMixerAddSink(pThis->pMixer, "[Recording] Microphone In", AUDMIXSINKDIR_INPUT, &pThis->pSinkMicIn);
-            AssertRC(rc);
-        }
-    }
-
-    ichac97Reset(pDevIns);
-
-    if (RT_SUCCESS(rc))
-    {
-        rc = ichac97StreamInit(pThis, &pThis->StrmStLineIn, PI_INDEX);
-        if (RT_FAILURE(rc))
-            return rc;
-        rc = ichac97StreamInit(pThis, &pThis->StrmStMicIn,  MC_INDEX);
-        if (RT_FAILURE(rc))
-            return rc;
-        rc = ichac97StreamInit(pThis, &pThis->StrmStOut,    PO_INDEX);
-        if (RT_FAILURE(rc))
-            return rc;
-
-        PAC97DRIVER pDrv;
-        RTListForEach(&pThis->lstDrv, pDrv, AC97DRIVER, Node)
-        {
-            /*
-             * Only primary drivers are critical for the VM to run. Everything else
-             * might not worth showing an own error message box in the GUI.
-             */
-            if (!(pDrv->Flags & PDMAUDIODRVFLAG_PRIMARY))
-                continue;
-
-            PPDMIAUDIOCONNECTOR pCon = pDrv->pConnector;
-            AssertPtr(pCon);
-
-            bool fValidLineIn = pCon->pfnIsValidIn(pCon, pDrv->LineIn.pStrmIn);
-            bool fValidMicIn  = pCon->pfnIsValidIn (pCon, pDrv->MicIn.pStrmIn);
-            bool fValidOut    = pCon->pfnIsValidOut(pCon, pDrv->Out.pStrmOut);
-
-            if (    !fValidLineIn
-                 && !fValidMicIn
-                 && !fValidOut)
-            {
-                LogRel(("AC97: Falling back to NULL backend (no sound audible)\n"));
-
-                ichac97Reset(pDevIns);
-                ichac97Reattach(pThis, pDrv, pDrv->uLUN, "NullAudio");
-
-                PDMDevHlpVMSetRuntimeError(pDevIns, 0 /*fFlags*/, "HostAudioNotResponding",
-                    N_("No audio devices could be opened. Selecting the NULL audio backend "
-                       "with the consequence that no sound is audible"));
-            }
-            else
-            {
-                bool fWarn = false;
-
-                PDMAUDIOBACKENDCFG backendCfg;
-                int rc2 = pCon->pfnGetConfiguration(pCon, &backendCfg);
-                if (RT_SUCCESS(rc2))
-                {
-                    if (backendCfg.cMaxHstStrmsIn)
-                    {
-                        /* If the audio backend supports two or more input streams at once,
-                         * warn if one of our two inputs (microphone-in and line-in) failed to initialize. */
-                        if (backendCfg.cMaxHstStrmsIn >= 2)
-                            fWarn = !fValidLineIn || !fValidMicIn;
-                        /* If the audio backend only supports one input stream at once (e.g. pure ALSA, and
-                         * *not* ALSA via PulseAudio plugin!), only warn if both of our inputs failed to initialize.
-                         * One of the two simply is not in use then. */
-                        else if (backendCfg.cMaxHstStrmsIn == 1)
-                            fWarn = !fValidLineIn && !fValidMicIn;
-                        /* Don't warn if our backend is not able of supporting any input streams at all. */
-                    }
-
-                    if (   !fWarn
-                        && backendCfg.cMaxHstStrmsOut)
-                    {
-                        fWarn = !fValidOut;
-                    }
-                }
-                else
-                    AssertReleaseMsgFailed(("Unable to retrieve audio backend configuration for LUN #%RU8, rc=%Rrc\n",
-                                            pDrv->uLUN, rc2));
-
-                if (fWarn)
-                {
-                    char   szMissingStreams[255];
-                    size_t len = 0;
-                    if (!fValidLineIn)
-                    {
-                        LogRel(("AC97: WARNING: Unable to open PCM line input for LUN #%RU8!\n", pDrv->uLUN));
-                        len = RTStrPrintf(szMissingStreams, sizeof(szMissingStreams), "PCM Input");
-                    }
-                    if (!fValidMicIn)
-                    {
-                        LogRel(("AC97: WARNING: Unable to open PCM microphone input for LUN #%RU8!\n", pDrv->uLUN));
-                        len += RTStrPrintf(szMissingStreams + len,
-                                           sizeof(szMissingStreams) - len, len ? ", PCM Microphone" : "PCM Microphone");
-                    }
-                    if (!fValidOut)
-                    {
-                        LogRel(("AC97: WARNING: Unable to open PCM output for LUN #%RU8!\n", pDrv->uLUN));
-                        len += RTStrPrintf(szMissingStreams + len,
-                                           sizeof(szMissingStreams) - len, len ? ", PCM Output" : "PCM Output");
-                    }
-
-                    PDMDevHlpVMSetRuntimeError(pDevIns, 0 /*fFlags*/, "HostAudioNotResponding",
-                                               N_("Some AC'97 audio streams (%s) could not be opened. Guest applications generating audio "
-                                                  "output or depending on audio input may hang. Make sure your host audio device "
-                                                  "is working properly. Check the logfile for error messages of the audio "
-                                                  "subsystem"), szMissingStreams);
-                }
-            }
-        }
-    }
-
-    if (RT_SUCCESS(rc))
-    {
-        pThis->cbReadWriteBuf = _4K; /** @todo Make this configurable. */
-        pThis->pvReadWriteBuf = (uint8_t *)RTMemAllocZ(pThis->cbReadWriteBuf);
-        if (!pThis->pvReadWriteBuf)
-            rc = VERR_NO_MEMORY;
-    }
-
-# ifndef VBOX_WITH_AUDIO_CALLBACKS
-    if (RT_SUCCESS(rc))
-    {
-        /* Start the emulation timer. */
-        rc = PDMDevHlpTMTimerCreate(pDevIns, TMCLOCK_VIRTUAL, ichac97Timer, pThis,
-                                    TMTIMER_FLAGS_NO_CRIT_SECT, "DevIchAc97", &pThis->pTimer);
-        AssertRCReturn(rc, rc);
-
-        if (RT_SUCCESS(rc))
-        {
-            pThis->cTimerTicks = TMTimerGetFreq(pThis->pTimer) / uTimerHz;
-            pThis->uTimerTS    = TMTimerGet(pThis->pTimer);
-            LogFunc(("Timer ticks=%RU64 (%RU16 Hz)\n", pThis->cTimerTicks, uTimerHz));
-
-            /* Fire off timer. */
-            TMTimerSet(pThis->pTimer, TMTimerGet(pThis->pTimer) + pThis->cTimerTicks);
-        }
-    }
-# else
-    if (RT_SUCCESS(rc))
-    {
-        PAC97DRIVER pDrv;
-        RTListForEach(&pThis->lstDrv, pDrv, AC97DRIVER, Node)
-        {
-            /* Only register primary driver.
-             * The device emulation does the output multiplexing then. */
-            if (!(pDrv->Flags & PDMAUDIODRVFLAG_PRIMARY))
-                continue;
-
-            PDMAUDIOCALLBACK AudioCallbacks[2];
-
-            AC97CALLBACKCTX Ctx = { pThis, pDrv };
-
-            AudioCallbacks[0].enmType     = PDMAUDIOCALLBACKTYPE_INPUT;
-            AudioCallbacks[0].pfnCallback = ac97CallbackInput;
-            AudioCallbacks[0].pvCtx       = &Ctx;
-            AudioCallbacks[0].cbCtx       = sizeof(AC97CALLBACKCTX);
-
-            AudioCallbacks[1].enmType     = PDMAUDIOCALLBACKTYPE_OUTPUT;
-            AudioCallbacks[1].pfnCallback = ac97CallbackOutput;
-            AudioCallbacks[1].pvCtx       = &Ctx;
-            AudioCallbacks[1].cbCtx       = sizeof(AC97CALLBACKCTX);
-
-            rc = pDrv->pConnector->pfnRegisterCallbacks(pDrv->pConnector, AudioCallbacks, RT_ELEMENTS(AudioCallbacks));
-            if (RT_FAILURE(rc))
-                break;
-        }
-    }
-# endif
-
-# ifdef VBOX_WITH_STATISTICS
-    if (RT_SUCCESS(rc))
-    {
-        /*
-         * Register statistics.
-         */
-        PDMDevHlpSTAMRegister(pDevIns, &pThis->StatTimer,            STAMTYPE_PROFILE, "/Devices/AC97/Timer",             STAMUNIT_TICKS_PER_CALL, "Profiling ichac97Timer.");
-        PDMDevHlpSTAMRegister(pDevIns, &pThis->StatBytesRead,        STAMTYPE_COUNTER, "/Devices/AC97/BytesRead"   ,      STAMUNIT_BYTES,          "Bytes read from AC97 emulation.");
-        PDMDevHlpSTAMRegister(pDevIns, &pThis->StatBytesWritten,     STAMTYPE_COUNTER, "/Devices/AC97/BytesWritten",      STAMUNIT_BYTES,          "Bytes written to AC97 emulation.");
-    }
-# endif
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-/**
- * The device registration structure.
- */
-const PDMDEVREG g_DeviceICHAC97 =
-{
-    /* u32Version */
-    PDM_DEVREG_VERSION,
-    /* szName */
-    "ichac97",
-    /* szRCMod */
-    "",
-    /* szR0Mod */
-    "",
-    /* pszDescription */
-    "ICH AC'97 Audio Controller",
-    /* fFlags */
-    PDM_DEVREG_FLAGS_DEFAULT_BITS,
-    /* fClass */
-    PDM_DEVREG_CLASS_AUDIO,
-    /* cMaxInstances */
-    1,
-    /* cbInstance */
-    sizeof(AC97STATE),
-    /* pfnConstruct */
-    ichac97Construct,
-    /* pfnDestruct */
-    ichac97Destruct,
-    /* pfnRelocate */
-    NULL,
-    /* pfnMemSetup */
-    NULL,
-    /* pfnPowerOn */
-    NULL,
-    /* pfnReset */
-    ichac97Reset,
-    /* pfnSuspend */
-    NULL,
-    /* pfnResume */
-    NULL,
-    /* pfnAttach */
-    ichac97Attach,
-    /* pfnDetach */
-    ichac97Detach,
-    /* pfnQueryInterface. */
-    NULL,
-    /* pfnInitComplete */
-    NULL,
-    /* pfnPowerOff */
-    NULL,
-    /* pfnSoftReset */
-    NULL,
-    /* u32VersionEnd */
-    PDM_DEVREG_VERSION
-};
-
-#endif /* !IN_RING3 */
-#endif /* !VBOX_DEVICE_STRUCT_TESTCASE */
diff --git a/src/VBox/Devices/Audio_old/DevIchHda.cpp b/src/VBox/Devices/Audio_old/DevIchHda.cpp
deleted file mode 100644
index 2e610e0..0000000
--- a/src/VBox/Devices/Audio_old/DevIchHda.cpp
+++ /dev/null
@@ -1,5076 +0,0 @@
-/* $Id: DevIchHda.cpp $ */
-/** @file
- * DevIchHda - VBox ICH Intel HD Audio Controller.
- *
- * Implemented against the specifications found in "High Definition Audio
- * Specification", Revision 1.0a June 17, 2010, and  "Intel I/O Controller
- * HUB 6 (ICH6) Family, Datasheet", document number 301473-002.
- */
-
-/*
- * Copyright (C) 2006-2016 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-
-/*********************************************************************************************************************************
-*   Header Files                                                                                                                 *
-*********************************************************************************************************************************/
-#define LOG_GROUP LOG_GROUP_DEV_HDA
-#include <VBox/log.h>
-#include <VBox/vmm/pdmdev.h>
-#include <VBox/vmm/pdmaudioifs.h>
-#include <VBox/version.h>
-
-#include <iprt/assert.h>
-#include <iprt/asm.h>
-#include <iprt/asm-math.h>
-#include <iprt/list.h>
-#ifdef IN_RING3
-# include <iprt/mem.h>
-# include <iprt/semaphore.h>
-# include <iprt/string.h>
-# include <iprt/uuid.h>
-#endif
-
-#include "VBoxDD.h"
-
-#include "AudioMixBuffer.h"
-#include "AudioMixer.h"
-#include "DevIchHdaCodec.h"
-#include "DrvAudio.h"
-
-
-/*********************************************************************************************************************************
-*   Defined Constants And Macros                                                                                                 *
-*********************************************************************************************************************************/
-//#define HDA_AS_PCI_EXPRESS
-#define VBOX_WITH_INTEL_HDA
-
-#ifdef DEBUG_andy
-/* Enables experimental support for separate mic-in handling.
-   Do not enable this yet for regular builds, as this needs more testing first! */
-//# define VBOX_WITH_HDA_MIC_IN
-#endif
-
-#if defined(VBOX_WITH_HP_HDA)
-/* HP Pavilion dv4t-1300 */
-# define HDA_PCI_VENDOR_ID 0x103c
-# define HDA_PCI_DEVICE_ID 0x30f7
-#elif defined(VBOX_WITH_INTEL_HDA)
-/* Intel HDA controller */
-# define HDA_PCI_VENDOR_ID 0x8086
-# define HDA_PCI_DEVICE_ID 0x2668
-#elif defined(VBOX_WITH_NVIDIA_HDA)
-/* nVidia HDA controller */
-# define HDA_PCI_VENDOR_ID 0x10de
-# define HDA_PCI_DEVICE_ID 0x0ac0
-#else
-# error "Please specify your HDA device vendor/device IDs"
-#endif
-
-/** @todo r=bird: Looking at what the linux driver (accidentally?) does when
- * updating CORBWP, I belive that the ICH6 datahsheet is wrong and that CORBRP
- * is read only except for bit 15 like the HDA spec states.
- *
- * Btw. the CORBRPRST implementation is incomplete according to both docs (sw
- * writes 1, hw sets it to 1 (after completion), sw reads 1, sw writes 0). */
-#define BIRD_THINKS_CORBRP_IS_MOSTLY_RO
-
-#define HDA_NREGS           114
-#define HDA_NREGS_SAVED     112
-
-/**
- *  NB: Register values stored in memory (au32Regs[]) are indexed through
- *  the HDA_RMX_xxx macros (also HDA_MEM_IND_NAME()). On the other hand, the
- *  register descriptors in g_aHdaRegMap[] are indexed through the
- *  HDA_REG_xxx macros (also HDA_REG_IND_NAME()).
- *
- *  The au32Regs[] layout is kept unchanged for saved state
- *  compatibility. */
-
-/* Registers */
-#define HDA_REG_IND_NAME(x)                 HDA_REG_##x
-#define HDA_MEM_IND_NAME(x)                 HDA_RMX_##x
-#define HDA_REG_FIELD_MASK(reg, x)          HDA_##reg##_##x##_MASK
-#define HDA_REG_FIELD_FLAG_MASK(reg, x)     RT_BIT(HDA_##reg##_##x##_SHIFT)
-#define HDA_REG_FIELD_SHIFT(reg, x)         HDA_##reg##_##x##_SHIFT
-#define HDA_REG_IND(pThis, x)               ((pThis)->au32Regs[g_aHdaRegMap[x].mem_idx])
-#define HDA_REG(pThis, x)                   (HDA_REG_IND((pThis), HDA_REG_IND_NAME(x)))
-#define HDA_REG_FLAG_VALUE(pThis, reg, val) (HDA_REG((pThis),reg) & (((HDA_REG_FIELD_FLAG_MASK(reg, val)))))
-
-
-#define HDA_REG_GCAP                0 /* range 0x00-0x01*/
-#define HDA_RMX_GCAP                0
-/* GCAP HDASpec 3.3.2 This macro encodes the following information about HDA in a compact manner:
- * oss (15:12) - number of output streams supported
- * iss (11:8)  - number of input streams supported
- * bss (7:3)   - number of bidirectional streams supported
- * bds (2:1)   - number of serial data out signals supported
- * b64sup (0)  - 64 bit addressing supported.
- */
-#define HDA_MAKE_GCAP(oss, iss, bss, bds, b64sup) \
-    (  (((oss) & 0xF)  << 12)   \
-     | (((iss) & 0xF)  << 8)    \
-     | (((bss) & 0x1F) << 3)    \
-     | (((bds) & 0x3)  << 2)    \
-     | ((b64sup) & 1))
-
-#define HDA_REG_VMIN                1 /* 0x02 */
-#define HDA_RMX_VMIN                1
-
-#define HDA_REG_VMAJ                2 /* 0x03 */
-#define HDA_RMX_VMAJ                2
-
-#define HDA_REG_OUTPAY              3 /* 0x04-0x05 */
-#define HDA_RMX_OUTPAY              3
-
-#define HDA_REG_INPAY               4 /* 0x06-0x07 */
-#define HDA_RMX_INPAY               4
-
-#define HDA_REG_GCTL                5 /* 0x08-0x0B */
-#define HDA_RMX_GCTL                5
-#define HDA_GCTL_RST_SHIFT          0
-#define HDA_GCTL_FSH_SHIFT          1
-#define HDA_GCTL_UR_SHIFT           8
-
-#define HDA_REG_WAKEEN              6 /* 0x0C */
-#define HDA_RMX_WAKEEN              6
-
-#define HDA_REG_STATESTS            7 /* 0x0E */
-#define HDA_RMX_STATESTS            7
-#define HDA_STATES_SCSF             0x7
-
-#define HDA_REG_GSTS                8 /* 0x10-0x11*/
-#define HDA_RMX_GSTS                8
-#define HDA_GSTS_FSH_SHIFT          1
-
-#define HDA_REG_OUTSTRMPAY          9  /* 0x18 */
-#define HDA_RMX_OUTSTRMPAY          112
-
-#define HDA_REG_INSTRMPAY           10 /* 0x1a */
-#define HDA_RMX_INSTRMPAY           113
-
-#define HDA_REG_INTCTL              11 /* 0x20 */
-#define HDA_RMX_INTCTL              9
-#define HDA_INTCTL_GIE_SHIFT        31
-#define HDA_INTCTL_CIE_SHIFT        30
-#define HDA_INTCTL_S0_SHIFT         0
-#define HDA_INTCTL_S1_SHIFT         1
-#define HDA_INTCTL_S2_SHIFT         2
-#define HDA_INTCTL_S3_SHIFT         3
-#define HDA_INTCTL_S4_SHIFT         4
-#define HDA_INTCTL_S5_SHIFT         5
-#define HDA_INTCTL_S6_SHIFT         6
-#define HDA_INTCTL_S7_SHIFT         7
-#define INTCTL_SX(pThis, X)         (HDA_REG_FLAG_VALUE((pThis), INTCTL, S##X))
-
-#define HDA_REG_INTSTS              12 /* 0x24 */
-#define HDA_RMX_INTSTS              10
-#define HDA_INTSTS_GIS_SHIFT        31
-#define HDA_INTSTS_CIS_SHIFT        30
-#define HDA_INTSTS_S0_SHIFT         0
-#define HDA_INTSTS_S1_SHIFT         1
-#define HDA_INTSTS_S2_SHIFT         2
-#define HDA_INTSTS_S3_SHIFT         3
-#define HDA_INTSTS_S4_SHIFT         4
-#define HDA_INTSTS_S5_SHIFT         5
-#define HDA_INTSTS_S6_SHIFT         6
-#define HDA_INTSTS_S7_SHIFT         7
-#define HDA_INTSTS_S_MASK(num)      RT_BIT(HDA_REG_FIELD_SHIFT(S##num))
-
-#define HDA_REG_WALCLK              13 /* 0x24 */
-#define HDA_RMX_WALCLK              /* Not defined! */
-
-/* Note: The HDA specification defines a SSYNC register at offset 0x38. The
- * ICH6/ICH9 datahseet defines SSYNC at offset 0x34. The Linux HDA driver matches
- * the datasheet.
- */
-#define HDA_REG_SSYNC               14 /* 0x34 */
-#define HDA_RMX_SSYNC               12
-
-#define HDA_REG_CORBLBASE           15 /* 0x40 */
-#define HDA_RMX_CORBLBASE           13
-
-#define HDA_REG_CORBUBASE           16 /* 0x44 */
-#define HDA_RMX_CORBUBASE           14
-
-#define HDA_REG_CORBWP              17 /* 0x48 */
-#define HDA_RMX_CORBWP              15
-
-#define HDA_REG_CORBRP              18 /* 0x4A */
-#define HDA_RMX_CORBRP              16
-#define HDA_CORBRP_RST_SHIFT        15
-#define HDA_CORBRP_WP_SHIFT         0
-#define HDA_CORBRP_WP_MASK          0xFF
-
-#define HDA_REG_CORBCTL             19 /* 0x4C */
-#define HDA_RMX_CORBCTL             17
-#define HDA_CORBCTL_DMA_SHIFT       1
-#define HDA_CORBCTL_CMEIE_SHIFT     0
-
-#define HDA_REG_CORBSTS             20 /* 0x4D */
-#define HDA_RMX_CORBSTS             18
-#define HDA_CORBSTS_CMEI_SHIFT      0
-
-#define HDA_REG_CORBSIZE            21 /* 0x4E */
-#define HDA_RMX_CORBSIZE            19
-#define HDA_CORBSIZE_SZ_CAP         0xF0
-#define HDA_CORBSIZE_SZ             0x3
-/* till ich 10 sizes of CORB and RIRB are hardcoded to 256 in real hw */
-
-#define HDA_REG_RIRBLBASE           22 /* 0x50 */
-#define HDA_RMX_RIRBLBASE           20
-
-#define HDA_REG_RIRBUBASE           23 /* 0x54 */
-#define HDA_RMX_RIRBUBASE           21
-
-#define HDA_REG_RIRBWP              24 /* 0x58 */
-#define HDA_RMX_RIRBWP              22
-#define HDA_RIRBWP_RST_SHIFT        15
-#define HDA_RIRBWP_WP_MASK          0xFF
-
-#define HDA_REG_RINTCNT             25 /* 0x5A */
-#define HDA_RMX_RINTCNT             23
-#define RINTCNT_N(pThis)            (HDA_REG(pThis, RINTCNT) & 0xff)
-
-#define HDA_REG_RIRBCTL             26 /* 0x5C */
-#define HDA_RMX_RIRBCTL             24
-#define HDA_RIRBCTL_RIC_SHIFT       0
-#define HDA_RIRBCTL_DMA_SHIFT       1
-#define HDA_ROI_DMA_SHIFT           2
-
-#define HDA_REG_RIRBSTS             27 /* 0x5D */
-#define HDA_RMX_RIRBSTS             25
-#define HDA_RIRBSTS_RINTFL_SHIFT    0
-#define HDA_RIRBSTS_RIRBOIS_SHIFT   2
-
-#define HDA_REG_RIRBSIZE            28 /* 0x5E */
-#define HDA_RMX_RIRBSIZE            26
-#define HDA_RIRBSIZE_SZ_CAP         0xF0
-#define HDA_RIRBSIZE_SZ             0x3
-
-#define RIRBSIZE_SZ(pThis)          (HDA_REG(pThis, HDA_REG_RIRBSIZE) & HDA_RIRBSIZE_SZ)
-#define RIRBSIZE_SZ_CAP(pThis)      (HDA_REG(pThis, HDA_REG_RIRBSIZE) & HDA_RIRBSIZE_SZ_CAP)
-
-
-#define HDA_REG_IC                  29 /* 0x60 */
-#define HDA_RMX_IC                  27
-
-#define HDA_REG_IR                  30 /* 0x64 */
-#define HDA_RMX_IR                  28
-
-#define HDA_REG_IRS                 31 /* 0x68 */
-#define HDA_RMX_IRS                 29
-#define HDA_IRS_ICB_SHIFT           0
-#define HDA_IRS_IRV_SHIFT           1
-
-#define HDA_REG_DPLBASE             32 /* 0x70 */
-#define HDA_RMX_DPLBASE             30
-#define DPLBASE(pThis)              (HDA_REG((pThis), DPLBASE))
-
-#define HDA_REG_DPUBASE             33 /* 0x74 */
-#define HDA_RMX_DPUBASE             31
-#define DPUBASE(pThis)              (HDA_REG((pThis), DPUBASE))
-
-#define DPBASE_ADDR_MASK            (~(uint64_t)0x7f)
-
-#define HDA_STREAM_REG_DEF(name, num)           (HDA_REG_SD##num##name)
-#define HDA_STREAM_RMX_DEF(name, num)           (HDA_RMX_SD##num##name)
-/* Note: sdnum here _MUST_ be stream reg number [0,7]. */
-#define HDA_STREAM_REG(pThis, name, sdnum)      (HDA_REG_IND((pThis), HDA_REG_SD0##name + (sdnum) * 10))
-
-#define HDA_SD_NUM_FROM_REG(pThis, func, reg)   ((reg - HDA_STREAM_REG_DEF(func, 0)) / 10)
-
-#define HDA_REG_SD0CTL              34 /* 0x80 */
-#define HDA_REG_SD1CTL              (HDA_STREAM_REG_DEF(CTL, 0) + 10) /* 0xA0 */
-#define HDA_REG_SD2CTL              (HDA_STREAM_REG_DEF(CTL, 0) + 20) /* 0xC0 */
-#define HDA_REG_SD3CTL              (HDA_STREAM_REG_DEF(CTL, 0) + 30) /* 0xE0 */
-#define HDA_REG_SD4CTL              (HDA_STREAM_REG_DEF(CTL, 0) + 40) /* 0x100 */
-#define HDA_REG_SD5CTL              (HDA_STREAM_REG_DEF(CTL, 0) + 50) /* 0x120 */
-#define HDA_REG_SD6CTL              (HDA_STREAM_REG_DEF(CTL, 0) + 60) /* 0x140 */
-#define HDA_REG_SD7CTL              (HDA_STREAM_REG_DEF(CTL, 0) + 70) /* 0x160 */
-#define HDA_RMX_SD0CTL              32
-#define HDA_RMX_SD1CTL              (HDA_STREAM_RMX_DEF(CTL, 0) + 10)
-#define HDA_RMX_SD2CTL              (HDA_STREAM_RMX_DEF(CTL, 0) + 20)
-#define HDA_RMX_SD3CTL              (HDA_STREAM_RMX_DEF(CTL, 0) + 30)
-#define HDA_RMX_SD4CTL              (HDA_STREAM_RMX_DEF(CTL, 0) + 40)
-#define HDA_RMX_SD5CTL              (HDA_STREAM_RMX_DEF(CTL, 0) + 50)
-#define HDA_RMX_SD6CTL              (HDA_STREAM_RMX_DEF(CTL, 0) + 60)
-#define HDA_RMX_SD7CTL              (HDA_STREAM_RMX_DEF(CTL, 0) + 70)
-
-#define SD(func, num)               SD##num##func
-
-#define HDA_SDCTL(pThis, num)       HDA_REG((pThis), SD(CTL, num))
-#define HDA_SDCTL_NUM(pThis, num)   ((HDA_SDCTL((pThis), num) & HDA_REG_FIELD_MASK(SDCTL,NUM)) >> HDA_REG_FIELD_SHIFT(SDCTL, NUM))
-#define HDA_SDCTL_NUM_MASK          0xF
-#define HDA_SDCTL_NUM_SHIFT         20
-#define HDA_SDCTL_DIR_SHIFT         19
-#define HDA_SDCTL_TP_SHIFT          18
-#define HDA_SDCTL_STRIPE_MASK       0x3
-#define HDA_SDCTL_STRIPE_SHIFT      16
-#define HDA_SDCTL_DEIE_SHIFT        4
-#define HDA_SDCTL_FEIE_SHIFT        3
-#define HDA_SDCTL_ICE_SHIFT         2
-#define HDA_SDCTL_RUN_SHIFT         1
-#define HDA_SDCTL_SRST_SHIFT        0
-
-#define HDA_REG_SD0STS              35 /* 0x83 */
-#define HDA_REG_SD1STS              (HDA_STREAM_REG_DEF(STS, 0) + 10) /* 0xA3 */
-#define HDA_REG_SD2STS              (HDA_STREAM_REG_DEF(STS, 0) + 20) /* 0xC3 */
-#define HDA_REG_SD3STS              (HDA_STREAM_REG_DEF(STS, 0) + 30) /* 0xE3 */
-#define HDA_REG_SD4STS              (HDA_STREAM_REG_DEF(STS, 0) + 40) /* 0x103 */
-#define HDA_REG_SD5STS              (HDA_STREAM_REG_DEF(STS, 0) + 50) /* 0x123 */
-#define HDA_REG_SD6STS              (HDA_STREAM_REG_DEF(STS, 0) + 60) /* 0x143 */
-#define HDA_REG_SD7STS              (HDA_STREAM_REG_DEF(STS, 0) + 70) /* 0x163 */
-#define HDA_RMX_SD0STS              33
-#define HDA_RMX_SD1STS              (HDA_STREAM_RMX_DEF(STS, 0) + 10)
-#define HDA_RMX_SD2STS              (HDA_STREAM_RMX_DEF(STS, 0) + 20)
-#define HDA_RMX_SD3STS              (HDA_STREAM_RMX_DEF(STS, 0) + 30)
-#define HDA_RMX_SD4STS              (HDA_STREAM_RMX_DEF(STS, 0) + 40)
-#define HDA_RMX_SD5STS              (HDA_STREAM_RMX_DEF(STS, 0) + 50)
-#define HDA_RMX_SD6STS              (HDA_STREAM_RMX_DEF(STS, 0) + 60)
-#define HDA_RMX_SD7STS              (HDA_STREAM_RMX_DEF(STS, 0) + 70)
-
-#define SDSTS(pThis, num)           HDA_REG((pThis), SD(STS, num))
-#define HDA_SDSTS_FIFORDY_SHIFT     5
-#define HDA_SDSTS_DE_SHIFT          4
-#define HDA_SDSTS_FE_SHIFT          3
-#define HDA_SDSTS_BCIS_SHIFT        2
-
-#define HDA_REG_SD0LPIB             36 /* 0x84 */
-#define HDA_REG_SD1LPIB             (HDA_STREAM_REG_DEF(LPIB, 0) + 10) /* 0xA4 */
-#define HDA_REG_SD2LPIB             (HDA_STREAM_REG_DEF(LPIB, 0) + 20) /* 0xC4 */
-#define HDA_REG_SD3LPIB             (HDA_STREAM_REG_DEF(LPIB, 0) + 30) /* 0xE4 */
-#define HDA_REG_SD4LPIB             (HDA_STREAM_REG_DEF(LPIB, 0) + 40) /* 0x104 */
-#define HDA_REG_SD5LPIB             (HDA_STREAM_REG_DEF(LPIB, 0) + 50) /* 0x124 */
-#define HDA_REG_SD6LPIB             (HDA_STREAM_REG_DEF(LPIB, 0) + 60) /* 0x144 */
-#define HDA_REG_SD7LPIB             (HDA_STREAM_REG_DEF(LPIB, 0) + 70) /* 0x164 */
-#define HDA_RMX_SD0LPIB             34
-#define HDA_RMX_SD1LPIB             (HDA_STREAM_RMX_DEF(LPIB, 0) + 10)
-#define HDA_RMX_SD2LPIB             (HDA_STREAM_RMX_DEF(LPIB, 0) + 20)
-#define HDA_RMX_SD3LPIB             (HDA_STREAM_RMX_DEF(LPIB, 0) + 30)
-#define HDA_RMX_SD4LPIB             (HDA_STREAM_RMX_DEF(LPIB, 0) + 40)
-#define HDA_RMX_SD5LPIB             (HDA_STREAM_RMX_DEF(LPIB, 0) + 50)
-#define HDA_RMX_SD6LPIB             (HDA_STREAM_RMX_DEF(LPIB, 0) + 60)
-#define HDA_RMX_SD7LPIB             (HDA_STREAM_RMX_DEF(LPIB, 0) + 70)
-
-#define HDA_REG_SD0CBL              37 /* 0x88 */
-#define HDA_REG_SD1CBL              (HDA_STREAM_REG_DEF(CBL, 0) + 10) /* 0xA8 */
-#define HDA_REG_SD2CBL              (HDA_STREAM_REG_DEF(CBL, 0) + 20) /* 0xC8 */
-#define HDA_REG_SD3CBL              (HDA_STREAM_REG_DEF(CBL, 0) + 30) /* 0xE8 */
-#define HDA_REG_SD4CBL              (HDA_STREAM_REG_DEF(CBL, 0) + 40) /* 0x108 */
-#define HDA_REG_SD5CBL              (HDA_STREAM_REG_DEF(CBL, 0) + 50) /* 0x128 */
-#define HDA_REG_SD6CBL              (HDA_STREAM_REG_DEF(CBL, 0) + 60) /* 0x148 */
-#define HDA_REG_SD7CBL              (HDA_STREAM_REG_DEF(CBL, 0) + 70) /* 0x168 */
-#define HDA_RMX_SD0CBL              35
-#define HDA_RMX_SD1CBL              (HDA_STREAM_RMX_DEF(CBL, 0) + 10)
-#define HDA_RMX_SD2CBL              (HDA_STREAM_RMX_DEF(CBL, 0) + 20)
-#define HDA_RMX_SD3CBL              (HDA_STREAM_RMX_DEF(CBL, 0) + 30)
-#define HDA_RMX_SD4CBL              (HDA_STREAM_RMX_DEF(CBL, 0) + 40)
-#define HDA_RMX_SD5CBL              (HDA_STREAM_RMX_DEF(CBL, 0) + 50)
-#define HDA_RMX_SD6CBL              (HDA_STREAM_RMX_DEF(CBL, 0) + 60)
-#define HDA_RMX_SD7CBL              (HDA_STREAM_RMX_DEF(CBL, 0) + 70)
-
-#define HDA_REG_SD0LVI              38 /* 0x8C */
-#define HDA_REG_SD1LVI              (HDA_STREAM_REG_DEF(LVI, 0) + 10) /* 0xAC */
-#define HDA_REG_SD2LVI              (HDA_STREAM_REG_DEF(LVI, 0) + 20) /* 0xCC */
-#define HDA_REG_SD3LVI              (HDA_STREAM_REG_DEF(LVI, 0) + 30) /* 0xEC */
-#define HDA_REG_SD4LVI              (HDA_STREAM_REG_DEF(LVI, 0) + 40) /* 0x10C */
-#define HDA_REG_SD5LVI              (HDA_STREAM_REG_DEF(LVI, 0) + 50) /* 0x12C */
-#define HDA_REG_SD6LVI              (HDA_STREAM_REG_DEF(LVI, 0) + 60) /* 0x14C */
-#define HDA_REG_SD7LVI              (HDA_STREAM_REG_DEF(LVI, 0) + 70) /* 0x16C */
-#define HDA_RMX_SD0LVI              36
-#define HDA_RMX_SD1LVI              (HDA_STREAM_RMX_DEF(LVI, 0) + 10)
-#define HDA_RMX_SD2LVI              (HDA_STREAM_RMX_DEF(LVI, 0) + 20)
-#define HDA_RMX_SD3LVI              (HDA_STREAM_RMX_DEF(LVI, 0) + 30)
-#define HDA_RMX_SD4LVI              (HDA_STREAM_RMX_DEF(LVI, 0) + 40)
-#define HDA_RMX_SD5LVI              (HDA_STREAM_RMX_DEF(LVI, 0) + 50)
-#define HDA_RMX_SD6LVI              (HDA_STREAM_RMX_DEF(LVI, 0) + 60)
-#define HDA_RMX_SD7LVI              (HDA_STREAM_RMX_DEF(LVI, 0) + 70)
-
-#define HDA_REG_SD0FIFOW            39 /* 0x8E */
-#define HDA_REG_SD1FIFOW            (HDA_STREAM_REG_DEF(FIFOW, 0) + 10) /* 0xAE */
-#define HDA_REG_SD2FIFOW            (HDA_STREAM_REG_DEF(FIFOW, 0) + 20) /* 0xCE */
-#define HDA_REG_SD3FIFOW            (HDA_STREAM_REG_DEF(FIFOW, 0) + 30) /* 0xEE */
-#define HDA_REG_SD4FIFOW            (HDA_STREAM_REG_DEF(FIFOW, 0) + 40) /* 0x10E */
-#define HDA_REG_SD5FIFOW            (HDA_STREAM_REG_DEF(FIFOW, 0) + 50) /* 0x12E */
-#define HDA_REG_SD6FIFOW            (HDA_STREAM_REG_DEF(FIFOW, 0) + 60) /* 0x14E */
-#define HDA_REG_SD7FIFOW            (HDA_STREAM_REG_DEF(FIFOW, 0) + 70) /* 0x16E */
-#define HDA_RMX_SD0FIFOW            37
-#define HDA_RMX_SD1FIFOW            (HDA_STREAM_RMX_DEF(FIFOW, 0) + 10)
-#define HDA_RMX_SD2FIFOW            (HDA_STREAM_RMX_DEF(FIFOW, 0) + 20)
-#define HDA_RMX_SD3FIFOW            (HDA_STREAM_RMX_DEF(FIFOW, 0) + 30)
-#define HDA_RMX_SD4FIFOW            (HDA_STREAM_RMX_DEF(FIFOW, 0) + 40)
-#define HDA_RMX_SD5FIFOW            (HDA_STREAM_RMX_DEF(FIFOW, 0) + 50)
-#define HDA_RMX_SD6FIFOW            (HDA_STREAM_RMX_DEF(FIFOW, 0) + 60)
-#define HDA_RMX_SD7FIFOW            (HDA_STREAM_RMX_DEF(FIFOW, 0) + 70)
-
-/*
- * ICH6 datasheet defined limits for FIFOW values (18.2.38).
- */
-#define HDA_SDFIFOW_8B              0x2
-#define HDA_SDFIFOW_16B             0x3
-#define HDA_SDFIFOW_32B             0x4
-
-#define HDA_REG_SD0FIFOS            40 /* 0x90 */
-#define HDA_REG_SD1FIFOS            (HDA_STREAM_REG_DEF(FIFOS, 0) + 10) /* 0xB0 */
-#define HDA_REG_SD2FIFOS            (HDA_STREAM_REG_DEF(FIFOS, 0) + 20) /* 0xD0 */
-#define HDA_REG_SD3FIFOS            (HDA_STREAM_REG_DEF(FIFOS, 0) + 30) /* 0xF0 */
-#define HDA_REG_SD4FIFOS            (HDA_STREAM_REG_DEF(FIFOS, 0) + 40) /* 0x110 */
-#define HDA_REG_SD5FIFOS            (HDA_STREAM_REG_DEF(FIFOS, 0) + 50) /* 0x130 */
-#define HDA_REG_SD6FIFOS            (HDA_STREAM_REG_DEF(FIFOS, 0) + 60) /* 0x150 */
-#define HDA_REG_SD7FIFOS            (HDA_STREAM_REG_DEF(FIFOS, 0) + 70) /* 0x170 */
-#define HDA_RMX_SD0FIFOS            38
-#define HDA_RMX_SD1FIFOS            (HDA_STREAM_RMX_DEF(FIFOS, 0) + 10)
-#define HDA_RMX_SD2FIFOS            (HDA_STREAM_RMX_DEF(FIFOS, 0) + 20)
-#define HDA_RMX_SD3FIFOS            (HDA_STREAM_RMX_DEF(FIFOS, 0) + 30)
-#define HDA_RMX_SD4FIFOS            (HDA_STREAM_RMX_DEF(FIFOS, 0) + 40)
-#define HDA_RMX_SD5FIFOS            (HDA_STREAM_RMX_DEF(FIFOS, 0) + 50)
-#define HDA_RMX_SD6FIFOS            (HDA_STREAM_RMX_DEF(FIFOS, 0) + 60)
-#define HDA_RMX_SD7FIFOS            (HDA_STREAM_RMX_DEF(FIFOS, 0) + 70)
-
-/*
- * ICH6 datasheet defines limits for FIFOS registers (18.2.39)
- * formula: size - 1
- * Other values not listed are not supported.
- */
-#define HDA_SDINFIFO_120B           0x77 /* 8-, 16-, 20-, 24-, 32-bit Input Streams */
-#define HDA_SDINFIFO_160B           0x9F /* 20-, 24-bit Input Streams Streams */
-
-#define HDA_SDONFIFO_16B            0x0F /* 8-, 16-, 20-, 24-, 32-bit Output Streams */
-#define HDA_SDONFIFO_32B            0x1F /* 8-, 16-, 20-, 24-, 32-bit Output Streams */
-#define HDA_SDONFIFO_64B            0x3F /* 8-, 16-, 20-, 24-, 32-bit Output Streams */
-#define HDA_SDONFIFO_128B           0x7F /* 8-, 16-, 20-, 24-, 32-bit Output Streams */
-#define HDA_SDONFIFO_192B           0xBF /* 8-, 16-, 20-, 24-, 32-bit Output Streams */
-#define HDA_SDONFIFO_256B           0xFF /* 20-, 24-bit Output Streams */
-#define SDFIFOS(pThis, num)         HDA_REG((pThis), SD(FIFOS, num))
-
-#define HDA_REG_SD0FMT              41 /* 0x92 */
-#define HDA_REG_SD1FMT              (HDA_STREAM_REG_DEF(FMT, 0) + 10) /* 0xB2 */
-#define HDA_REG_SD2FMT              (HDA_STREAM_REG_DEF(FMT, 0) + 20) /* 0xD2 */
-#define HDA_REG_SD3FMT              (HDA_STREAM_REG_DEF(FMT, 0) + 30) /* 0xF2 */
-#define HDA_REG_SD4FMT              (HDA_STREAM_REG_DEF(FMT, 0) + 40) /* 0x112 */
-#define HDA_REG_SD5FMT              (HDA_STREAM_REG_DEF(FMT, 0) + 50) /* 0x132 */
-#define HDA_REG_SD6FMT              (HDA_STREAM_REG_DEF(FMT, 0) + 60) /* 0x152 */
-#define HDA_REG_SD7FMT              (HDA_STREAM_REG_DEF(FMT, 0) + 70) /* 0x172 */
-#define HDA_RMX_SD0FMT              39
-#define HDA_RMX_SD1FMT              (HDA_STREAM_RMX_DEF(FMT, 0) + 10)
-#define HDA_RMX_SD2FMT              (HDA_STREAM_RMX_DEF(FMT, 0) + 20)
-#define HDA_RMX_SD3FMT              (HDA_STREAM_RMX_DEF(FMT, 0) + 30)
-#define HDA_RMX_SD4FMT              (HDA_STREAM_RMX_DEF(FMT, 0) + 40)
-#define HDA_RMX_SD5FMT              (HDA_STREAM_RMX_DEF(FMT, 0) + 50)
-#define HDA_RMX_SD6FMT              (HDA_STREAM_RMX_DEF(FMT, 0) + 60)
-#define HDA_RMX_SD7FMT              (HDA_STREAM_RMX_DEF(FMT, 0) + 70)
-
-#define SDFMT(pThis, num)           (HDA_REG((pThis), SD(FMT, num)))
-#define HDA_SDFMT_BASE_RATE_SHIFT   14
-#define HDA_SDFMT_MULT_SHIFT        11
-#define HDA_SDFMT_MULT_MASK         0x7
-#define HDA_SDFMT_DIV_SHIFT         8
-#define HDA_SDFMT_DIV_MASK          0x7
-#define HDA_SDFMT_BITS_SHIFT        4
-#define HDA_SDFMT_BITS_MASK         0x7
-#define SDFMT_BASE_RATE(pThis, num) ((SDFMT(pThis, num) & HDA_REG_FIELD_FLAG_MASK(SDFMT, BASE_RATE)) >> HDA_REG_FIELD_SHIFT(SDFMT, BASE_RATE))
-#define SDFMT_MULT(pThis, num)      ((SDFMT((pThis), num) & HDA_REG_FIELD_MASK(SDFMT,MULT)) >> HDA_REG_FIELD_SHIFT(SDFMT, MULT))
-#define SDFMT_DIV(pThis, num)       ((SDFMT((pThis), num) & HDA_REG_FIELD_MASK(SDFMT,DIV)) >> HDA_REG_FIELD_SHIFT(SDFMT, DIV))
-
-#define HDA_REG_SD0BDPL             42 /* 0x98 */
-#define HDA_REG_SD1BDPL             (HDA_STREAM_REG_DEF(BDPL, 0) + 10) /* 0xB8 */
-#define HDA_REG_SD2BDPL             (HDA_STREAM_REG_DEF(BDPL, 0) + 20) /* 0xD8 */
-#define HDA_REG_SD3BDPL             (HDA_STREAM_REG_DEF(BDPL, 0) + 30) /* 0xF8 */
-#define HDA_REG_SD4BDPL             (HDA_STREAM_REG_DEF(BDPL, 0) + 40) /* 0x118 */
-#define HDA_REG_SD5BDPL             (HDA_STREAM_REG_DEF(BDPL, 0) + 50) /* 0x138 */
-#define HDA_REG_SD6BDPL             (HDA_STREAM_REG_DEF(BDPL, 0) + 60) /* 0x158 */
-#define HDA_REG_SD7BDPL             (HDA_STREAM_REG_DEF(BDPL, 0) + 70) /* 0x178 */
-#define HDA_RMX_SD0BDPL             40
-#define HDA_RMX_SD1BDPL             (HDA_STREAM_RMX_DEF(BDPL, 0) + 10)
-#define HDA_RMX_SD2BDPL             (HDA_STREAM_RMX_DEF(BDPL, 0) + 20)
-#define HDA_RMX_SD3BDPL             (HDA_STREAM_RMX_DEF(BDPL, 0) + 30)
-#define HDA_RMX_SD4BDPL             (HDA_STREAM_RMX_DEF(BDPL, 0) + 40)
-#define HDA_RMX_SD5BDPL             (HDA_STREAM_RMX_DEF(BDPL, 0) + 50)
-#define HDA_RMX_SD6BDPL             (HDA_STREAM_RMX_DEF(BDPL, 0) + 60)
-#define HDA_RMX_SD7BDPL             (HDA_STREAM_RMX_DEF(BDPL, 0) + 70)
-
-#define HDA_REG_SD0BDPU             43 /* 0x9C */
-#define HDA_REG_SD1BDPU             (HDA_STREAM_REG_DEF(BDPU, 0) + 10) /* 0xBC */
-#define HDA_REG_SD2BDPU             (HDA_STREAM_REG_DEF(BDPU, 0) + 20) /* 0xDC */
-#define HDA_REG_SD3BDPU             (HDA_STREAM_REG_DEF(BDPU, 0) + 30) /* 0xFC */
-#define HDA_REG_SD4BDPU             (HDA_STREAM_REG_DEF(BDPU, 0) + 40) /* 0x11C */
-#define HDA_REG_SD5BDPU             (HDA_STREAM_REG_DEF(BDPU, 0) + 50) /* 0x13C */
-#define HDA_REG_SD6BDPU             (HDA_STREAM_REG_DEF(BDPU, 0) + 60) /* 0x15C */
-#define HDA_REG_SD7BDPU             (HDA_STREAM_REG_DEF(BDPU, 0) + 70) /* 0x17C */
-#define HDA_RMX_SD0BDPU             41
-#define HDA_RMX_SD1BDPU             (HDA_STREAM_RMX_DEF(BDPU, 0) + 10)
-#define HDA_RMX_SD2BDPU             (HDA_STREAM_RMX_DEF(BDPU, 0) + 20)
-#define HDA_RMX_SD3BDPU             (HDA_STREAM_RMX_DEF(BDPU, 0) + 30)
-#define HDA_RMX_SD4BDPU             (HDA_STREAM_RMX_DEF(BDPU, 0) + 40)
-#define HDA_RMX_SD5BDPU             (HDA_STREAM_RMX_DEF(BDPU, 0) + 50)
-#define HDA_RMX_SD6BDPU             (HDA_STREAM_RMX_DEF(BDPU, 0) + 60)
-#define HDA_RMX_SD7BDPU             (HDA_STREAM_RMX_DEF(BDPU, 0) + 70)
-
-#define HDA_CODEC_CAD_SHIFT         28
-/* Encodes the (required) LUN into a codec command. */
-#define HDA_CODEC_CMD(cmd, lun)     ((cmd) | (lun << HDA_CODEC_CAD_SHIFT))
-
-
-
-/*********************************************************************************************************************************
-*   Structures and Typedefs                                                                                                      *
-*********************************************************************************************************************************/
-
-/**
- * Internal state of a Buffer Descriptor List Entry (BDLE),
- * needed to keep track of the data needed for the actual device
- * emulation.
- */
-typedef struct HDABDLESTATE
-{
-    /** Own index within the BDL (Buffer Descriptor List). */
-    uint32_t     u32BDLIndex;
-    /** Number of bytes below the stream's FIFO watermark (SDFIFOW).
-     *  Used to check if we need fill up the FIFO again. */
-    uint32_t     cbBelowFIFOW;
-    /** The buffer descriptor's internal DMA buffer. */
-    uint8_t      au8FIFO[HDA_SDONFIFO_256B + 1];
-    /** Current offset in DMA buffer (in bytes).*/
-    uint32_t     u32BufOff;
-    uint32_t     Padding;
-} HDABDLESTATE, *PHDABDLESTATE;
-
-/**
- * Buffer Descriptor List Entry (BDLE) (3.6.3).
- *
- * Contains only register values which do *not* change until a
- * stream reset occurs.
- */
-typedef struct HDABDLE
-{
-    /** Starting address of the actual buffer. Must be 128-bit aligned. */
-    uint64_t     u64BufAdr;
-    /** Size of the actual buffer (in bytes). */
-    uint32_t     u32BufSize;
-    /** Interrupt on completion; the controller will generate
-     *  an interrupt when the last byte of the buffer has been
-     *  fetched by the DMA engine. */
-    bool         fIntOnCompletion;
-    /** Internal state of this BDLE.
-     *  Not part of the actual BDLE registers. */
-    HDABDLESTATE State;
-} HDABDLE, *PHDABDLE;
-
-/**
- * Internal state of a HDA stream.
- */
-typedef struct HDASTREAMSTATE
-{
-    /** Current BDLE to use. Wraps around to 0 if
-     *  maximum (cBDLE) is reached. */
-    uint16_t            uCurBDLE;
-    /** Stop indicator. */
-    volatile bool       fDoStop;
-    /** Flag indicating whether this stream is in an
-     *  active (operative) state or not. */
-    volatile bool       fActive;
-    /** Flag indicating whether this stream currently is
-     *  in reset mode and therefore not acccessible by the guest. */
-    volatile bool       fInReset;
-    /** Unused, padding. */
-    bool                fPadding;
-    /** Event signalling that the stream's state has been changed. */
-    RTSEMEVENT          hStateChangedEvent;
-    /** Current BDLE (Buffer Descriptor List Entry). */
-    HDABDLE             BDLE;
-} HDASTREAMSTATE, *PHDASTREAMSTATE;
-
-/**
- * Structure for keeping a HDA stream state.
- *
- * Contains only register values which do *not* change until a
- * stream reset occurs.
- */
-typedef struct HDASTREAM
-{
-    /** Stream number (SDn). */
-    uint8_t        u8Strm;
-    uint8_t        Padding0[7];
-    /** DMA base address (SDnBDPU - SDnBDPL). */
-    uint64_t       u64BDLBase;
-    /** Cyclic Buffer Length (SDnCBL).
-     *  Represents the size of the ring buffer. */
-    uint32_t       u32CBL;
-    /** Format (SDnFMT). */
-    uint16_t       u16FMT;
-    /** FIFO Size (FIFOS).
-     *  Maximum number of bytes that may have been DMA'd into
-     *  memory but not yet transmitted on the link.
-     *
-     *  Must be a power of two. */
-    uint16_t       u16FIFOS;
-    /** Last Valid Index (SDnLVI). */
-    uint16_t       u16LVI;
-    uint16_t       Padding1[3];
-    /** Internal state of this stream. */
-    HDASTREAMSTATE State;
-} HDASTREAM, *PHDASTREAM;
-
-typedef struct HDAINPUTSTREAM
-{
-    /** PCM line input stream. */
-    R3PTRTYPE(PPDMAUDIOGSTSTRMIN)      pStrmIn;
-    /** Mixer handle for line input stream. */
-    R3PTRTYPE(PAUDMIXSTREAM)           phStrmIn;
-} HDAINPUTSTREAM, *PHDAINPUTSTREAM;
-
-typedef struct HDAOUTPUTSTREAM
-{
-    /** PCM output stream. */
-    R3PTRTYPE(PPDMAUDIOGSTSTRMOUT)     pStrmOut;
-    /** Mixer handle for line output stream. */
-    R3PTRTYPE(PAUDMIXSTREAM)           phStrmOut;
-} HDAOUTPUTSTREAM, *PHDAOUTPUTSTREAM;
-
-/**
- * Struct for maintaining a host backend driver.
- * This driver must be associated to one, and only one,
- * HDA codec. The HDA controller does the actual multiplexing
- * of HDA codec data to various host backend drivers then.
- *
- * This HDA device uses a timer in order to synchronize all
- * read/write accesses across all attached LUNs / backends.
- */
-typedef struct HDADRIVER
-{
-    /** Node for storing this driver in our device driver list of HDASTATE. */
-    RTLISTNODER3                       Node;
-    /** Pointer to HDA controller (state). */
-    R3PTRTYPE(PHDASTATE)               pHDAState;
-    /** Driver flags. */
-    PDMAUDIODRVFLAGS                   Flags;
-    uint8_t                            u32Padding0[2];
-    /** LUN to which this driver has been assigned. */
-    uint8_t                            uLUN;
-    /** Whether this driver is in an attached state or not. */
-    bool                               fAttached;
-    /** Pointer to attached driver base interface. */
-    R3PTRTYPE(PPDMIBASE)               pDrvBase;
-    /** Audio connector interface to the underlying host backend. */
-    R3PTRTYPE(PPDMIAUDIOCONNECTOR)     pConnector;
-    /** Stream for line input. */
-    HDAINPUTSTREAM                     LineIn;
-    /** Stream for mic input. */
-    HDAINPUTSTREAM                     MicIn;
-    /** Stream for output. */
-    HDAOUTPUTSTREAM                    Out;
-} HDADRIVER;
-
-/**
- * ICH Intel HD Audio Controller state.
- */
-typedef struct HDASTATE
-{
-    /** The PCI device structure. */
-    PCIDevice                          PciDev;
-    /** R3 Pointer to the device instance. */
-    PPDMDEVINSR3                       pDevInsR3;
-    /** R0 Pointer to the device instance. */
-    PPDMDEVINSR0                       pDevInsR0;
-    /** R0 Pointer to the device instance. */
-    PPDMDEVINSRC                       pDevInsRC;
-    /** Padding for alignment. */
-    uint32_t                           u32Padding;
-    /** The base interface for LUN\#0. */
-    PDMIBASE                           IBase;
-    RTGCPHYS                           MMIOBaseAddr;
-    /** The HDA's register set. */
-    uint32_t                           au32Regs[HDA_NREGS];
-    /** Stream state for line-in. */
-    HDASTREAM                          StrmStLineIn;
-    /** Stream state for microphone-in. */
-    HDASTREAM                          StrmStMicIn;
-    /** Stream state for output. */
-    HDASTREAM                          StrmStOut;
-    /** CORB buffer base address. */
-    uint64_t                           u64CORBBase;
-    /** RIRB buffer base address. */
-    uint64_t                           u64RIRBBase;
-    /** DMA base address.
-     *  Made out of DPLBASE + DPUBASE (3.3.32 + 3.3.33). */
-    uint64_t                           u64DPBase;
-    /** DMA position buffer enable bit. */
-    bool                               fDMAPosition;
-    /** Padding for alignment. */
-    uint8_t                            u32Padding0[7];
-    /** Pointer to CORB buffer. */
-    R3PTRTYPE(uint32_t *)              pu32CorbBuf;
-    /** Size in bytes of CORB buffer. */
-    uint32_t                           cbCorbBuf;
-    /** Padding for alignment. */
-    uint32_t                           u32Padding1;
-    /** Pointer to RIRB buffer. */
-    R3PTRTYPE(uint64_t *)              pu64RirbBuf;
-    /** Size in bytes of RIRB buffer. */
-    uint32_t                           cbRirbBuf;
-    /** Indicates if HDA is in reset. */
-    bool                               fInReset;
-    /** Flag whether the R0 part is enabled. */
-    bool                               fR0Enabled;
-    /** Flag whether the RC part is enabled. */
-    bool                               fRCEnabled;
-#ifndef VBOX_WITH_AUDIO_CALLBACKS
-    /** The timer for pumping data thru the attached LUN drivers. */
-    PTMTIMERR3                         pTimer;
-    /** The timer interval for pumping data thru the LUN drivers in timer ticks. */
-    uint64_t                           cTimerTicks;
-    /** Timestamp of the last timer callback (hdaTimer).
-     * Used to calculate the time actually elapsed between two timer callbacks. */
-    uint64_t                           uTimerTS;
-#endif
-#ifdef VBOX_WITH_STATISTICS
-# ifndef VBOX_WITH_AUDIO_CALLBACKS
-    STAMPROFILE                        StatTimer;
-# endif
-    STAMCOUNTER                        StatBytesRead;
-    STAMCOUNTER                        StatBytesWritten;
-#endif
-    /** Pointer to HDA codec to use. */
-    R3PTRTYPE(PHDACODEC)               pCodec;
-    /** List of associated LUN drivers (HDADRIVER). */
-    RTLISTANCHORR3                     lstDrv;
-    /** The device' software mixer. */
-    R3PTRTYPE(PAUDIOMIXER)             pMixer;
-    /** Audio sink for PCM output. */
-    R3PTRTYPE(PAUDMIXSINK)             pSinkOutput;
-    /** Audio mixer sink for line input. */
-    R3PTRTYPE(PAUDMIXSINK)             pSinkLineIn;
-    /** Audio mixer sink for microphone input. */
-    R3PTRTYPE(PAUDMIXSINK)             pSinkMicIn;
-    uint64_t                           u64BaseTS;
-    /** Response Interrupt Count (RINTCNT). */
-    uint8_t                            u8RespIntCnt;
-    /** Padding for alignment. */
-    uint8_t                            au8Padding2[7];
-} HDASTATE;
-/** Pointer to the ICH Intel HD Audio Controller state. */
-typedef HDASTATE *PHDASTATE;
-
-#ifdef VBOX_WITH_AUDIO_CALLBACKS
-typedef struct HDACALLBACKCTX
-{
-    PHDASTATE  pThis;
-    PHDADRIVER pDriver;
-} HDACALLBACKCTX, *PHDACALLBACKCTX;
-#endif
-
-/*********************************************************************************************************************************
-*   Internal Functions                                                                                                           *
-*********************************************************************************************************************************/
-#ifndef VBOX_DEVICE_STRUCT_TESTCASE
-static FNPDMDEVRESET hdaReset;
-
-/*
- * Stubs.
- */
-static int hdaRegReadUnimpl(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value);
-static int hdaRegWriteUnimpl(PHDASTATE pThis, uint32_t iReg, uint32_t pu32Value);
-
-/*
- * Global register set read/write functions.
- */
-static int hdaRegWriteGCTL(PHDASTATE pThis, uint32_t iReg, uint32_t pu32Value);
-static int hdaRegReadINTSTS(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value);
-static int hdaRegReadLPIB(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value);
-static int hdaRegReadWALCLK(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value);
-static int hdaRegWriteINTSTS(PHDASTATE pThis, uint32_t iReg, uint32_t pu32Value);
-static int hdaRegWriteCORBWP(PHDASTATE pThis, uint32_t iReg, uint32_t pu32Value);
-static int hdaRegWriteCORBRP(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
-static int hdaRegWriteCORBCTL(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
-static int hdaRegWriteCORBSTS(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
-static int hdaRegWriteRIRBWP(PHDASTATE pThis, uint32_t iReg, uint32_t pu32Value);
-static int hdaRegWriteRIRBSTS(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
-static int hdaRegWriteSTATESTS(PHDASTATE pThis, uint32_t iReg, uint32_t pu32Value);
-static int hdaRegWriteIRS(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
-static int hdaRegReadIRS(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value);
-static int hdaRegWriteBase(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
-
-/*
- * {IOB}SDn read/write functions.
- */
-static int  hdaRegWriteSDCBL(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
-static int  hdaRegWriteSDCTL(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
-static int  hdaRegWriteSDSTS(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
-static int  hdaRegWriteSDLVI(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
-static int  hdaRegWriteSDFIFOW(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
-static int  hdaRegWriteSDFIFOS(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
-static int  hdaRegWriteSDFMT(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
-static int  hdaRegWriteSDBDPL(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
-static int  hdaRegWriteSDBDPU(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
-inline bool hdaRegWriteSDIsAllowed(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
-
-/*
- * Generic register read/write functions.
- */
-static int hdaRegReadU32(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value);
-static int hdaRegWriteU32(PHDASTATE pThis, uint32_t iReg, uint32_t pu32Value);
-static int hdaRegReadU24(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value);
-static int hdaRegWriteU24(PHDASTATE pThis, uint32_t iReg, uint32_t pu32Value);
-static int hdaRegReadU16(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value);
-static int hdaRegWriteU16(PHDASTATE pThis, uint32_t iReg, uint32_t pu32Value);
-static int hdaRegReadU8(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value);
-static int hdaRegWriteU8(PHDASTATE pThis, uint32_t iReg, uint32_t pu32Value);
-
-#ifdef IN_RING3
-static void hdaStreamDestroy(PHDASTREAM pStrmSt);
-static int hdaStreamStart(PHDASTREAM pStrmSt);
-static int hdaStreamStop(PHDASTREAM pStrmSt);
-static int hdaStreamWaitForStateChange(PHDASTREAM pStrmSt, RTMSINTERVAL msTimeout);
-static int hdaTransfer(PHDASTATE pThis, ENMSOUNDSOURCE enmSrc, uint32_t cbToProcess, uint32_t *pcbProcessed);
-#endif
-
-#ifdef IN_RING3
-static int       hdaBDLEFetch(PHDASTATE pThis, PHDABDLE pBDLE, uint64_t u64BaseDMA, uint16_t u16Entry);
-DECLINLINE(void) hdaStreamUpdateLPIB(PHDASTATE pThis, PHDASTREAM pStrmSt, uint32_t u32LPIB);
-# ifdef LOG_ENABLED
-static void             hdaBDLEDumpAll(PHDASTATE pThis, uint64_t u64BaseDMA, uint16_t cBDLE);
-# endif
-#endif
-
-
-/*********************************************************************************************************************************
-*   Global Variables                                                                                                             *
-*********************************************************************************************************************************/
-
-/** Offset of the SD0 register map. */
-#define HDA_REG_DESC_SD0_BASE 0x80
-
-/** Turn a short global register name into an memory index and a stringized name. */
-#define HDA_REG_IDX(abbrev)         HDA_MEM_IND_NAME(abbrev), #abbrev
-
-/** Turns a short stream register name into an memory index and a stringized name. */
-#define HDA_REG_IDX_STRM(reg, suff) HDA_MEM_IND_NAME(reg ## suff), #reg #suff
-
-/** Same as above for a register *not* stored in memory. */
-#define HDA_REG_IDX_LOCAL(abbrev)   0, #abbrev
-
-/** Emits a single audio stream register set (e.g. OSD0) at a specified offset. */
-#define HDA_REG_MAP_STRM(offset, name) \
-    /* offset        size     read mask   write mask  read callback   write callback     index + abbrev                  description */ \
-    /* -------       -------  ----------  ----------  --------------  -----------------  ------------------------------  ----------- */ \
-    /* Offset 0x80 (SD0) */ \
-    { offset,        0x00003, 0x00FF001F, 0x00F0001F, hdaRegReadU24 , hdaRegWriteSDCTL , HDA_REG_IDX_STRM(name, CTL)  , #name " Stream Descriptor Control" }, \
-    /* Offset 0x83 (SD0) */ \
-    { offset + 0x3,  0x00001, 0x0000001C, 0x0000003C, hdaRegReadU8  , hdaRegWriteSDSTS , HDA_REG_IDX_STRM(name, STS)  , #name " Status" }, \
-    /* Offset 0x84 (SD0) */ \
-    { offset + 0x4,  0x00004, 0xFFFFFFFF, 0x00000000, hdaRegReadLPIB, hdaRegWriteU32   , HDA_REG_IDX_STRM(name, LPIB) , #name " Link Position In Buffer" }, \
-    /* Offset 0x88 (SD0) */ \
-    { offset + 0x8,  0x00004, 0xFFFFFFFF, 0xFFFFFFFF, hdaRegReadU32, hdaRegWriteSDCBL  , HDA_REG_IDX_STRM(name, CBL)  , #name " Cyclic Buffer Length" }, \
-    /* Offset 0x8C (SD0) */ \
-    { offset + 0xC,  0x00002, 0x0000FFFF, 0x0000FFFF, hdaRegReadU16, hdaRegWriteSDLVI  , HDA_REG_IDX_STRM(name, LVI)  , #name " Last Valid Index" }, \
-    /* Reserved: FIFO Watermark. ** @todo Document this! */ \
-    { offset + 0xE,  0x00002, 0x00000007, 0x00000007, hdaRegReadU16, hdaRegWriteSDFIFOW, HDA_REG_IDX_STRM(name, FIFOW), #name " FIFO Watermark" }, \
-    /* Offset 0x90 (SD0) */ \
-    { offset + 0x10, 0x00002, 0x000000FF, 0x00000000, hdaRegReadU16, hdaRegWriteSDFIFOS, HDA_REG_IDX_STRM(name, FIFOS), #name " FIFO Size" }, \
-    /* Offset 0x92 (SD0) */ \
-    { offset + 0x12, 0x00002, 0x00007F7F, 0x00007F7F, hdaRegReadU16, hdaRegWriteSDFMT  , HDA_REG_IDX_STRM(name, FMT)  , #name " Stream Format" }, \
-    /* Reserved: 0x94 - 0x98. */ \
-    /* Offset 0x98 (SD0) */ \
-    { offset + 0x18, 0x00004, 0xFFFFFF80, 0xFFFFFF80, hdaRegReadU32, hdaRegWriteSDBDPL , HDA_REG_IDX_STRM(name, BDPL) , #name " Buffer Descriptor List Pointer-Lower Base Address" }, \
-    /* Offset 0x9C (SD0) */ \
-    { offset + 0x1C, 0x00004, 0xFFFFFFFF, 0xFFFFFFFF, hdaRegReadU32, hdaRegWriteSDBDPU , HDA_REG_IDX_STRM(name, BDPU) , #name " Buffer Descriptor List Pointer-Upper Base Address" }
-
-/** Defines a single audio stream register set (e.g. OSD0). */
-#define HDA_REG_MAP_DEF_STREAM(index, name) \
-    HDA_REG_MAP_STRM(HDA_REG_DESC_SD0_BASE + (index * 32 /* 0x20 */), name)
-
-/* See 302349 p 6.2. */
-static const struct HDAREGDESC
-{
-    /** Register offset in the register space. */
-    uint32_t    offset;
-    /** Size in bytes. Registers of size > 4 are in fact tables. */
-    uint32_t    size;
-    /** Readable bits. */
-    uint32_t    readable;
-    /** Writable bits. */
-    uint32_t    writable;
-    /** Read callback. */
-    int       (*pfnRead)(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value);
-    /** Write callback. */
-    int       (*pfnWrite)(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value);
-    /** Index into the register storage array. */
-    uint32_t    mem_idx;
-    /** Abbreviated name. */
-    const char *abbrev;
-    /** Descripton. */
-    const char *desc;
-} g_aHdaRegMap[HDA_NREGS] =
-
-{
-    /* offset  size     read mask   write mask  read callback            write callback         index + abbrev   */
-    /*-------  -------  ----------  ----------  -----------------------  ---------------------- ---------------- */
-    { 0x00000, 0x00002, 0x0000FFFB, 0x00000000, hdaRegReadU16          , hdaRegWriteUnimpl     , HDA_REG_IDX(GCAP)         }, /* Global Capabilities */
-    { 0x00002, 0x00001, 0x000000FF, 0x00000000, hdaRegReadU8           , hdaRegWriteUnimpl     , HDA_REG_IDX(VMIN)         }, /* Minor Version */
-    { 0x00003, 0x00001, 0x000000FF, 0x00000000, hdaRegReadU8           , hdaRegWriteUnimpl     , HDA_REG_IDX(VMAJ)         }, /* Major Version */
-    { 0x00004, 0x00002, 0x0000FFFF, 0x00000000, hdaRegReadU16          , hdaRegWriteUnimpl     , HDA_REG_IDX(OUTPAY)       }, /* Output Payload Capabilities */
-    { 0x00006, 0x00002, 0x0000FFFF, 0x00000000, hdaRegReadU16          , hdaRegWriteUnimpl     , HDA_REG_IDX(INPAY)        }, /* Input Payload Capabilities */
-    { 0x00008, 0x00004, 0x00000103, 0x00000103, hdaRegReadU32          , hdaRegWriteGCTL       , HDA_REG_IDX(GCTL)         }, /* Global Control */
-    { 0x0000c, 0x00002, 0x00007FFF, 0x00007FFF, hdaRegReadU16          , hdaRegWriteU16        , HDA_REG_IDX(WAKEEN)       }, /* Wake Enable */
-    { 0x0000e, 0x00002, 0x00000007, 0x00000007, hdaRegReadU8           , hdaRegWriteSTATESTS   , HDA_REG_IDX(STATESTS)     }, /* State Change Status */
-    { 0x00010, 0x00002, 0xFFFFFFFF, 0x00000000, hdaRegReadUnimpl       , hdaRegWriteUnimpl     , HDA_REG_IDX(GSTS)         }, /* Global Status */
-    { 0x00018, 0x00002, 0x0000FFFF, 0x00000000, hdaRegReadU16          , hdaRegWriteUnimpl     , HDA_REG_IDX(OUTSTRMPAY)   }, /* Output Stream Payload Capability */
-    { 0x0001A, 0x00002, 0x0000FFFF, 0x00000000, hdaRegReadU16          , hdaRegWriteUnimpl     , HDA_REG_IDX(INSTRMPAY)    }, /* Input Stream Payload Capability */
-    { 0x00020, 0x00004, 0xC00000FF, 0xC00000FF, hdaRegReadU32          , hdaRegWriteU32        , HDA_REG_IDX(INTCTL)       }, /* Interrupt Control */
-    { 0x00024, 0x00004, 0xC00000FF, 0x00000000, hdaRegReadINTSTS       , hdaRegWriteUnimpl     , HDA_REG_IDX(INTSTS)       }, /* Interrupt Status */
-    { 0x00030, 0x00004, 0xFFFFFFFF, 0x00000000, hdaRegReadWALCLK       , hdaRegWriteUnimpl     , HDA_REG_IDX_LOCAL(WALCLK) }, /* Wall Clock Counter */
-    { 0x00034, 0x00004, 0x000000FF, 0x000000FF, hdaRegReadU32          , hdaRegWriteU32        , HDA_REG_IDX(SSYNC)        }, /* Stream Synchronization */
-    { 0x00040, 0x00004, 0xFFFFFF80, 0xFFFFFF80, hdaRegReadU32          , hdaRegWriteBase       , HDA_REG_IDX(CORBLBASE)    }, /* CORB Lower Base Address */
-    { 0x00044, 0x00004, 0xFFFFFFFF, 0xFFFFFFFF, hdaRegReadU32          , hdaRegWriteBase       , HDA_REG_IDX(CORBUBASE)    }, /* CORB Upper Base Address */
-    { 0x00048, 0x00002, 0x000000FF, 0x000000FF, hdaRegReadU16          , hdaRegWriteCORBWP     , HDA_REG_IDX(CORBWP)       }, /* CORB Write Pointer */
-    { 0x0004A, 0x00002, 0x000080FF, 0x000080FF, hdaRegReadU16          , hdaRegWriteCORBRP     , HDA_REG_IDX(CORBRP)       }, /* CORB Read Pointer */
-    { 0x0004C, 0x00001, 0x00000003, 0x00000003, hdaRegReadU8           , hdaRegWriteCORBCTL    , HDA_REG_IDX(CORBCTL)      }, /* CORB Control */
-    { 0x0004D, 0x00001, 0x00000001, 0x00000001, hdaRegReadU8           , hdaRegWriteCORBSTS    , HDA_REG_IDX(CORBSTS)      }, /* CORB Status */
-    { 0x0004E, 0x00001, 0x000000F3, 0x00000000, hdaRegReadU8           , hdaRegWriteUnimpl     , HDA_REG_IDX(CORBSIZE)     }, /* CORB Size */
-    { 0x00050, 0x00004, 0xFFFFFF80, 0xFFFFFF80, hdaRegReadU32          , hdaRegWriteBase       , HDA_REG_IDX(RIRBLBASE)    }, /* RIRB Lower Base Address */
-    { 0x00054, 0x00004, 0xFFFFFFFF, 0xFFFFFFFF, hdaRegReadU32          , hdaRegWriteBase       , HDA_REG_IDX(RIRBUBASE)    }, /* RIRB Upper Base Address */
-    { 0x00058, 0x00002, 0x000000FF, 0x00008000, hdaRegReadU8           , hdaRegWriteRIRBWP     , HDA_REG_IDX(RIRBWP)       }, /* RIRB Write Pointer */
-    { 0x0005A, 0x00002, 0x000000FF, 0x000000FF, hdaRegReadU16          , hdaRegWriteU16        , HDA_REG_IDX(RINTCNT)      }, /* Response Interrupt Count */
-    { 0x0005C, 0x00001, 0x00000007, 0x00000007, hdaRegReadU8           , hdaRegWriteU8         , HDA_REG_IDX(RIRBCTL)      }, /* RIRB Control */
-    { 0x0005D, 0x00001, 0x00000005, 0x00000005, hdaRegReadU8           , hdaRegWriteRIRBSTS    , HDA_REG_IDX(RIRBSTS)      }, /* RIRB Status */
-    { 0x0005E, 0x00001, 0x000000F3, 0x00000000, hdaRegReadU8           , hdaRegWriteUnimpl     , HDA_REG_IDX(RIRBSIZE)     }, /* RIRB Size */
-    { 0x00060, 0x00004, 0xFFFFFFFF, 0xFFFFFFFF, hdaRegReadU32          , hdaRegWriteU32        , HDA_REG_IDX(IC)           }, /* Immediate Command */
-    { 0x00064, 0x00004, 0x00000000, 0xFFFFFFFF, hdaRegReadU32          , hdaRegWriteUnimpl     , HDA_REG_IDX(IR)           }, /* Immediate Response */
-    { 0x00068, 0x00002, 0x00000002, 0x00000002, hdaRegReadIRS          , hdaRegWriteIRS        , HDA_REG_IDX(IRS)          }, /* Immediate Command Status */
-    { 0x00070, 0x00004, 0xFFFFFFFF, 0xFFFFFF81, hdaRegReadU32          , hdaRegWriteBase       , HDA_REG_IDX(DPLBASE)      }, /* DMA Position Lower Base */
-    { 0x00074, 0x00004, 0xFFFFFFFF, 0xFFFFFFFF, hdaRegReadU32          , hdaRegWriteBase       , HDA_REG_IDX(DPUBASE)      }, /* DMA Position Upper Base */
-    /* 4 Input Stream Descriptors (ISD). */
-    HDA_REG_MAP_DEF_STREAM(0, SD0),
-    HDA_REG_MAP_DEF_STREAM(1, SD1),
-    HDA_REG_MAP_DEF_STREAM(2, SD2),
-    HDA_REG_MAP_DEF_STREAM(3, SD3),
-    /* 4 Output Stream Descriptors (OSD). */
-    HDA_REG_MAP_DEF_STREAM(4, SD4),
-    HDA_REG_MAP_DEF_STREAM(5, SD5),
-    HDA_REG_MAP_DEF_STREAM(6, SD6),
-    HDA_REG_MAP_DEF_STREAM(7, SD7)
-};
-
-/**
- * HDA register aliases (HDA spec 3.3.45).
- * @remarks Sorted by offReg.
- */
-static const struct
-{
-    /** The alias register offset. */
-    uint32_t    offReg;
-    /** The register index. */
-    int         idxAlias;
-} g_aHdaRegAliases[] =
-{
-    { 0x2084, HDA_REG_SD0LPIB },
-    { 0x20a4, HDA_REG_SD1LPIB },
-    { 0x20c4, HDA_REG_SD2LPIB },
-    { 0x20e4, HDA_REG_SD3LPIB },
-    { 0x2104, HDA_REG_SD4LPIB },
-    { 0x2124, HDA_REG_SD5LPIB },
-    { 0x2144, HDA_REG_SD6LPIB },
-    { 0x2164, HDA_REG_SD7LPIB },
-};
-
-#ifdef IN_RING3
-/** HDABDLE field descriptors for the v6+ saved state. */
-static SSMFIELD const g_aSSMBDLEFields6[] =
-{
-    SSMFIELD_ENTRY(HDABDLE, u64BufAdr),
-    SSMFIELD_ENTRY(HDABDLE, u32BufSize),
-    SSMFIELD_ENTRY(HDABDLE, fIntOnCompletion),
-    SSMFIELD_ENTRY_TERM()
-};
-
-/** HDABDLESTATE field descriptors for the v6+ saved state. */
-static SSMFIELD const g_aSSMBDLEStateFields6[] =
-{
-    SSMFIELD_ENTRY(HDABDLESTATE, u32BDLIndex),
-    SSMFIELD_ENTRY(HDABDLESTATE, cbBelowFIFOW),
-    SSMFIELD_ENTRY(HDABDLESTATE, au8FIFO),
-    SSMFIELD_ENTRY(HDABDLESTATE, u32BufOff),
-    SSMFIELD_ENTRY_TERM()
-};
-
-/** HDASTREAMSTATE field descriptors for the v6+ saved state. */
-static SSMFIELD const g_aSSMStreamStateFields6[] =
-{
-    SSMFIELD_ENTRY_OLD(cBDLE, 2),
-    SSMFIELD_ENTRY(HDASTREAMSTATE, uCurBDLE),
-    SSMFIELD_ENTRY(HDASTREAMSTATE, fDoStop),
-    SSMFIELD_ENTRY(HDASTREAMSTATE, fActive),
-    SSMFIELD_ENTRY(HDASTREAMSTATE, fInReset),
-    SSMFIELD_ENTRY_TERM()
-};
-#endif
-
-/**
- * 32-bit size indexed masks, i.e. g_afMasks[2 bytes] = 0xffff.
- */
-static uint32_t const g_afMasks[5] =
-{
-    UINT32_C(0), UINT32_C(0x000000ff), UINT32_C(0x0000ffff), UINT32_C(0x00ffffff), UINT32_C(0xffffffff)
-};
-
-#ifdef IN_RING3
-DECLINLINE(void) hdaStreamUpdateLPIB(PHDASTATE pThis, PHDASTREAM pStrmSt, uint32_t u32LPIB)
-{
-    AssertPtrReturnVoid(pThis);
-    AssertPtrReturnVoid(pStrmSt);
-
-    Assert(u32LPIB <= pStrmSt->u32CBL);
-
-    LogFlowFunc(("[SD%RU8]: LPIB=%RU32 (DMA Position Buffer Enabled: %RTbool)\n",
-                 pStrmSt->u8Strm, u32LPIB, pThis->fDMAPosition));
-
-    /* Update LPIB in any case. */
-    HDA_STREAM_REG(pThis, LPIB, pStrmSt->u8Strm) = u32LPIB;
-
-    /* Do we need to tell the current DMA position? */
-    if (pThis->fDMAPosition)
-    {
-        int rc2 = PDMDevHlpPCIPhysWrite(pThis->CTX_SUFF(pDevIns),
-                                        (pThis->u64DPBase & DPBASE_ADDR_MASK) + (pStrmSt->u8Strm * 2 * sizeof(uint32_t)),
-                                        (void *)&u32LPIB, sizeof(uint32_t));
-        AssertRC(rc2);
-#ifdef DEBUG
-        hdaBDLEDumpAll(pThis, pStrmSt->u64BDLBase, pStrmSt->State.uCurBDLE);
-#endif
-    }
-}
-#endif
-
-/**
- * Retrieves the number of bytes of a FIFOS register.
- *
- * @return Number of bytes of a given FIFOS register.
- */
-DECLINLINE(uint16_t) hdaSDFIFOSToBytes(uint32_t u32RegFIFOS)
-{
-    uint16_t cb;
-    switch (u32RegFIFOS)
-    {
-        /* Input */
-        case HDA_SDINFIFO_120B: cb = 120; break;
-        case HDA_SDINFIFO_160B: cb = 160; break;
-
-        /* Output */
-        case HDA_SDONFIFO_16B:  cb = 16;  break;
-        case HDA_SDONFIFO_32B:  cb = 32;  break;
-        case HDA_SDONFIFO_64B:  cb = 64;  break;
-        case HDA_SDONFIFO_128B: cb = 128; break;
-        case HDA_SDONFIFO_192B: cb = 192; break;
-        case HDA_SDONFIFO_256B: cb = 256; break;
-        default:
-        {
-            cb = 0; /* Can happen on stream reset. */
-            break;
-        }
-    }
-
-    return cb;
-}
-
-/**
- * Retrieves the number of bytes of a FIFOW register.
- *
- * @return Number of bytes of a given FIFOW register.
- */
-DECLINLINE(uint8_t) hdaSDFIFOWToBytes(uint32_t u32RegFIFOW)
-{
-    uint32_t cb;
-    switch (u32RegFIFOW)
-    {
-        case HDA_SDFIFOW_8B:  cb = 8;  break;
-        case HDA_SDFIFOW_16B: cb = 16; break;
-        case HDA_SDFIFOW_32B: cb = 32; break;
-        default:              cb = 0;  break;
-    }
-
-#ifdef RT_STRICT
-    Assert(RT_IS_POWER_OF_TWO(cb));
-#endif
-    return cb;
-}
-
-#ifdef IN_RING3
-/**
- * Fetches the next BDLE to use for a stream.
- *
- * @return  IPRT status code.
- */
-DECLINLINE(int) hdaStreamGetNextBDLE(PHDASTATE pThis, PHDASTREAM pStrmSt)
-{
-    AssertPtrReturn(pThis,   VERR_INVALID_POINTER);
-    AssertPtrReturn(pStrmSt, VERR_INVALID_POINTER);
-
-    NOREF(pThis);
-
-    Assert(pStrmSt->State.uCurBDLE < pStrmSt->u16LVI + 1);
-
-#ifdef DEBUG
-    uint32_t uOldBDLE = pStrmSt->State.uCurBDLE;
-#endif
-
-    /*
-     * Switch to the next BDLE entry and do a wrap around
-     * if we reached the end of the Buffer Descriptor List (BDL).
-     */
-    pStrmSt->State.uCurBDLE++;
-    if (pStrmSt->State.uCurBDLE == pStrmSt->u16LVI + 1)
-    {
-        pStrmSt->State.uCurBDLE = 0;
-
-        hdaStreamUpdateLPIB(pThis, pStrmSt, 0);
-    }
-
-    Assert(pStrmSt->State.uCurBDLE < pStrmSt->u16LVI + 1);
-
-    int rc = hdaBDLEFetch(pThis, &pStrmSt->State.BDLE, pStrmSt->u64BDLBase, pStrmSt->State.uCurBDLE);
-
-#ifdef DEBUG
-    LogFlowFunc(("[SD%RU8]: uOldBDLE=%RU16, uCurBDLE=%RU16, LVI=%RU32, %R[bdle]\n",
-                 pStrmSt->u8Strm, uOldBDLE, pStrmSt->State.uCurBDLE, pStrmSt->u16LVI, &pStrmSt->State.BDLE));
-#endif
-    return rc;
-}
-#endif
-
-DECLINLINE(PHDASTREAM) hdaStreamFromID(PHDASTATE pThis, uint8_t uStreamID)
-{
-    PHDASTREAM pStrmSt;
-
-    switch (uStreamID)
-    {
-        case 0: /** @todo Use dynamic indices, based on stream assignment. */
-        {
-            pStrmSt = &pThis->StrmStLineIn;
-            break;
-        }
-# ifdef VBOX_WITH_HDA_MIC_IN
-        case 2: /** @todo Use dynamic indices, based on stream assignment. */
-        {
-            pStrmSt = &pThis->StrmStMicIn;
-            break;
-        }
-# endif
-        case 4: /** @todo Use dynamic indices, based on stream assignment. */
-        {
-            pStrmSt = &pThis->StrmStOut;
-            break;
-        }
-
-        default:
-        {
-            pStrmSt = NULL;
-            LogFunc(("Warning: Stream with ID=%RU8 not handled\n", uStreamID));
-            break;
-        }
-    }
-
-    return pStrmSt;
-}
-
-/**
- * Retrieves the minimum number of bytes accumulated/free in the
- * FIFO before the controller will start a fetch/eviction of data.
- *
- * Uses SDFIFOW (FIFO Watermark Register).
- *
- * @return Number of bytes accumulated/free in the FIFO.
- */
-DECLINLINE(uint8_t) hdaStreamGetFIFOW(PHDASTATE pThis, PHDASTREAM pStrmSt)
-{
-    AssertPtrReturn(pThis, 0);
-    AssertPtrReturn(pStrmSt, 0);
-
-#ifdef VBOX_HDA_WITH_FIFO
-    return hdaSDFIFOWToBytes(HDA_STREAM_REG(pThis, FIFOW, pStrmSt->u8Strm));
-#else
-    return 0;
-#endif
-}
-
-static int hdaProcessInterrupt(PHDASTATE pThis)
-{
-#define IS_INTERRUPT_OCCURED_AND_ENABLED(pThis, num) \
-        (   INTCTL_SX((pThis), num) \
-         && (SDSTS(pThis, num) & HDA_REG_FIELD_FLAG_MASK(SDSTS, BCIS)))
-
-    bool fIrq = false;
-
-    if (/* Controller Interrupt Enable (CIE). */
-          HDA_REG_FLAG_VALUE(pThis, INTCTL, CIE)
-       && (   HDA_REG_FLAG_VALUE(pThis, RIRBSTS, RINTFL)
-           || HDA_REG_FLAG_VALUE(pThis, RIRBSTS, RIRBOIS)
-           || (HDA_REG(pThis, STATESTS) & HDA_REG(pThis, WAKEEN))))
-        fIrq = true;
-
-    /** @todo Don't hardcode stream numbers here. */
-    if (   IS_INTERRUPT_OCCURED_AND_ENABLED(pThis, 0)
-        || IS_INTERRUPT_OCCURED_AND_ENABLED(pThis, 4))
-    {
-#ifdef IN_RING3
-        LogFunc(("BCIS\n"));
-#endif
-        fIrq = true;
-    }
-
-    if (HDA_REG_FLAG_VALUE(pThis, INTCTL, GIE))
-    {
-        LogFunc(("%s\n", fIrq ? "Asserted" : "Deasserted"));
-        PDMDevHlpPCISetIrq(pThis->CTX_SUFF(pDevIns), 0 , fIrq);
-    }
-
-#undef IS_INTERRUPT_OCCURED_AND_ENABLED
-
-    return VINF_SUCCESS;
-}
-
-/**
- * Looks up a register at the exact offset given by @a offReg.
- *
- * @returns Register index on success, -1 if not found.
- * @param   pThis               The HDA device state.
- * @param   offReg              The register offset.
- */
-static int hdaRegLookup(PHDASTATE pThis, uint32_t offReg)
-{
-    /*
-     * Aliases.
-     */
-    if (offReg >= g_aHdaRegAliases[0].offReg)
-    {
-        for (unsigned i = 0; i < RT_ELEMENTS(g_aHdaRegAliases); i++)
-            if (offReg == g_aHdaRegAliases[i].offReg)
-                return g_aHdaRegAliases[i].idxAlias;
-        Assert(g_aHdaRegMap[RT_ELEMENTS(g_aHdaRegMap) - 1].offset < offReg);
-        return -1;
-    }
-
-    /*
-     * Binary search the
-     */
-    int idxEnd  = RT_ELEMENTS(g_aHdaRegMap);
-    int idxLow  = 0;
-    for (;;)
-    {
-        int idxMiddle = idxLow + (idxEnd - idxLow) / 2;
-        if (offReg < g_aHdaRegMap[idxMiddle].offset)
-        {
-            if (idxLow == idxMiddle)
-                break;
-            idxEnd = idxMiddle;
-        }
-        else if (offReg > g_aHdaRegMap[idxMiddle].offset)
-        {
-            idxLow = idxMiddle + 1;
-            if (idxLow >= idxEnd)
-                break;
-        }
-        else
-            return idxMiddle;
-    }
-
-#ifdef RT_STRICT
-    for (unsigned i = 0; i < RT_ELEMENTS(g_aHdaRegMap); i++)
-        Assert(g_aHdaRegMap[i].offset != offReg);
-#endif
-    return -1;
-}
-
-/**
- * Looks up a register covering the offset given by @a offReg.
- *
- * @returns Register index on success, -1 if not found.
- * @param   pThis               The HDA device state.
- * @param   offReg              The register offset.
- */
-static int hdaRegLookupWithin(PHDASTATE pThis, uint32_t offReg)
-{
-    /*
-     * Aliases.
-     */
-    if (offReg >= g_aHdaRegAliases[0].offReg)
-    {
-        for (unsigned i = 0; i < RT_ELEMENTS(g_aHdaRegAliases); i++)
-        {
-            uint32_t off = offReg - g_aHdaRegAliases[i].offReg;
-            if (off < 4 && off < g_aHdaRegMap[g_aHdaRegAliases[i].idxAlias].size)
-                return g_aHdaRegAliases[i].idxAlias;
-        }
-        Assert(g_aHdaRegMap[RT_ELEMENTS(g_aHdaRegMap) - 1].offset < offReg);
-        return -1;
-    }
-
-    /*
-     * Binary search the register map.
-     */
-    int idxEnd  = RT_ELEMENTS(g_aHdaRegMap);
-    int idxLow  = 0;
-    for (;;)
-    {
-        int idxMiddle = idxLow + (idxEnd - idxLow) / 2;
-        if (offReg < g_aHdaRegMap[idxMiddle].offset)
-        {
-            if (idxLow == idxMiddle)
-                break;
-            idxEnd = idxMiddle;
-        }
-        else if (offReg >= g_aHdaRegMap[idxMiddle].offset + g_aHdaRegMap[idxMiddle].size)
-        {
-            idxLow = idxMiddle + 1;
-            if (idxLow >= idxEnd)
-                break;
-        }
-        else
-            return idxMiddle;
-    }
-
-#ifdef RT_STRICT
-    for (unsigned i = 0; i < RT_ELEMENTS(g_aHdaRegMap); i++)
-        Assert(offReg - g_aHdaRegMap[i].offset >= g_aHdaRegMap[i].size);
-#endif
-    return -1;
-}
-
-#ifdef IN_RING3
-static int hdaCmdSync(PHDASTATE pThis, bool fLocal)
-{
-    int rc = VINF_SUCCESS;
-    if (fLocal)
-    {
-        Assert((HDA_REG_FLAG_VALUE(pThis, CORBCTL, DMA)));
-        rc = PDMDevHlpPhysRead(pThis->CTX_SUFF(pDevIns), pThis->u64CORBBase, pThis->pu32CorbBuf, pThis->cbCorbBuf);
-        if (RT_FAILURE(rc))
-            AssertRCReturn(rc, rc);
-#ifdef DEBUG_CMD_BUFFER
-        uint8_t i = 0;
-        do
-        {
-            LogFunc(("CORB%02x: ", i));
-            uint8_t j = 0;
-            do
-            {
-                const char *pszPrefix;
-                if ((i + j) == HDA_REG(pThis, CORBRP));
-                    pszPrefix = "[R]";
-                else if ((i + j) == HDA_REG(pThis, CORBWP));
-                    pszPrefix = "[W]";
-                else
-                    pszPrefix = "   "; /* three spaces */
-                LogFunc(("%s%08x", pszPrefix, pThis->pu32CorbBuf[i + j]));
-                j++;
-            } while (j < 8);
-            LogFunc(("\n"));
-            i += 8;
-        } while(i != 0);
-#endif
-    }
-    else
-    {
-        Assert((HDA_REG_FLAG_VALUE(pThis, RIRBCTL, DMA)));
-        rc = PDMDevHlpPCIPhysWrite(pThis->CTX_SUFF(pDevIns), pThis->u64RIRBBase, pThis->pu64RirbBuf, pThis->cbRirbBuf);
-        if (RT_FAILURE(rc))
-            AssertRCReturn(rc, rc);
-#ifdef DEBUG_CMD_BUFFER
-        uint8_t i = 0;
-        do {
-            LogFunc(("RIRB%02x: ", i));
-            uint8_t j = 0;
-            do {
-                const char *prefix;
-                if ((i + j) == HDA_REG(pThis, RIRBWP))
-                    prefix = "[W]";
-                else
-                    prefix = "   ";
-                LogFunc((" %s%016lx", prefix, pThis->pu64RirbBuf[i + j]));
-            } while (++j < 8);
-            LogFunc(("\n"));
-            i += 8;
-        } while (i != 0);
-#endif
-    }
-    return rc;
-}
-
-static int hdaCORBCmdProcess(PHDASTATE pThis)
-{
-    PFNHDACODECVERBPROCESSOR pfn = (PFNHDACODECVERBPROCESSOR)NULL;
-
-    int rc = hdaCmdSync(pThis, true);
-    if (RT_FAILURE(rc))
-        AssertRCReturn(rc, rc);
-
-    uint8_t corbRp = HDA_REG(pThis, CORBRP);
-    uint8_t corbWp = HDA_REG(pThis, CORBWP);
-    uint8_t rirbWp = HDA_REG(pThis, RIRBWP);
-
-    Assert((corbWp != corbRp));
-    LogFlowFunc(("CORB(RP:%x, WP:%x) RIRBWP:%x\n", HDA_REG(pThis, CORBRP), HDA_REG(pThis, CORBWP), HDA_REG(pThis, RIRBWP)));
-
-    while (corbRp != corbWp)
-    {
-        uint32_t cmd;
-        uint64_t resp;
-        pfn = NULL;
-        corbRp++;
-        cmd = pThis->pu32CorbBuf[corbRp];
-
-        rc = pThis->pCodec->pfnLookup(pThis->pCodec, HDA_CODEC_CMD(cmd, 0 /* Codec index */), &pfn);
-        if (RT_SUCCESS(rc))
-        {
-            AssertPtr(pfn);
-            rc = pfn(pThis->pCodec, HDA_CODEC_CMD(cmd, 0 /* LUN */), &resp);
-        }
-
-        if (RT_FAILURE(rc))
-            AssertRCReturn(rc, rc);
-        (rirbWp)++;
-
-        LogFunc(("verb:%08x->%016lx\n", cmd, resp));
-        if (   (resp & CODEC_RESPONSE_UNSOLICITED)
-            && !HDA_REG_FLAG_VALUE(pThis, GCTL, UR))
-        {
-            LogFunc(("unexpected unsolicited response.\n"));
-            HDA_REG(pThis, CORBRP) = corbRp;
-            return rc;
-        }
-
-        pThis->pu64RirbBuf[rirbWp] = resp;
-
-        pThis->u8RespIntCnt++;
-        if (pThis->u8RespIntCnt == RINTCNT_N(pThis))
-            break;
-    }
-    HDA_REG(pThis, CORBRP) = corbRp;
-    HDA_REG(pThis, RIRBWP) = rirbWp;
-    rc = hdaCmdSync(pThis, false);
-    LogFunc(("CORB(RP:%x, WP:%x) RIRBWP:%x\n", HDA_REG(pThis, CORBRP),
-         HDA_REG(pThis, CORBWP), HDA_REG(pThis, RIRBWP)));
-    if (HDA_REG_FLAG_VALUE(pThis, RIRBCTL, RIC))
-    {
-        HDA_REG(pThis, RIRBSTS) |= HDA_REG_FIELD_FLAG_MASK(RIRBSTS,RINTFL);
-
-        pThis->u8RespIntCnt = 0;
-        rc = hdaProcessInterrupt(pThis);
-    }
-    if (RT_FAILURE(rc))
-        AssertRCReturn(rc, rc);
-    return rc;
-}
-
-static int hdaStreamCreate(PHDASTREAM pStrmSt)
-{
-    AssertPtrReturn(pStrmSt, VERR_INVALID_POINTER);
-
-    int rc = RTSemEventCreate(&pStrmSt->State.hStateChangedEvent);
-    AssertRC(rc);
-
-    pStrmSt->u8Strm         = UINT8_MAX;
-
-    pStrmSt->State.fActive  = false;
-    pStrmSt->State.fInReset = false;
-    pStrmSt->State.fDoStop  = false;
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static void hdaStreamDestroy(PHDASTREAM pStrmSt)
-{
-    AssertPtrReturnVoid(pStrmSt);
-
-    LogFlowFunc(("[SD%RU8]: Destroy\n", pStrmSt->u8Strm));
-
-    int rc2 = hdaStreamStop(pStrmSt);
-    AssertRC(rc2);
-
-    if (pStrmSt->State.hStateChangedEvent != NIL_RTSEMEVENT)
-    {
-        rc2 = RTSemEventDestroy(pStrmSt->State.hStateChangedEvent);
-        AssertRC(rc2);
-    }
-
-    LogFlowFuncLeave();
-}
-
-static int hdaStreamInit(PHDASTATE pThis, PHDASTREAM pStrmSt, uint8_t u8Strm)
-{
-    AssertPtrReturn(pThis,   VERR_INVALID_POINTER);
-    AssertPtrReturn(pStrmSt, VERR_INVALID_POINTER);
-
-    pStrmSt->u8Strm     = u8Strm;
-    pStrmSt->u64BDLBase = RT_MAKE_U64(HDA_STREAM_REG(pThis, BDPL, pStrmSt->u8Strm),
-                                      HDA_STREAM_REG(pThis, BDPU, pStrmSt->u8Strm));
-    pStrmSt->u16LVI     = HDA_STREAM_REG(pThis, LVI, pStrmSt->u8Strm);
-    pStrmSt->u32CBL     = HDA_STREAM_REG(pThis, CBL, pStrmSt->u8Strm);
-    pStrmSt->u16FIFOS   = hdaSDFIFOSToBytes(HDA_STREAM_REG(pThis, FIFOS, pStrmSt->u8Strm));
-
-    RT_ZERO(pStrmSt->State.BDLE);
-    pStrmSt->State.uCurBDLE = 0;
-
-    LogFlowFunc(("[SD%RU8]: DMA @ 0x%x (%RU32 bytes), LVI=%RU16, FIFOS=%RU16\n",
-                 pStrmSt->u8Strm, pStrmSt->u64BDLBase, pStrmSt->u32CBL, pStrmSt->u16LVI, pStrmSt->u16FIFOS));
-
-#ifdef DEBUG
-    uint64_t u64BaseDMA = RT_MAKE_U64(HDA_STREAM_REG(pThis, BDPL, u8Strm),
-                                      HDA_STREAM_REG(pThis, BDPU, u8Strm));
-    uint16_t u16LVI     = HDA_STREAM_REG(pThis, LVI, u8Strm);
-    uint32_t u32CBL     = HDA_STREAM_REG(pThis, CBL, u8Strm);
-
-    LogFlowFunc(("\t-> DMA @ 0x%x, LVI=%RU16, CBL=%RU32\n", u64BaseDMA, u16LVI, u32CBL));
-
-    hdaBDLEDumpAll(pThis, u64BaseDMA, u16LVI + 1);
-#endif
-
-    return VINF_SUCCESS;
-}
-
-static void hdaStreamReset(PHDASTATE pThis, PHDASTREAM pStrmSt, uint8_t u8Strm)
-{
-    AssertPtrReturnVoid(pThis);
-    AssertPtrReturnVoid(pStrmSt);
-    AssertReturnVoid(u8Strm <= 7); /** @todo Use a define for MAX_STREAMS! */
-
-#ifdef VBOX_STRICT
-    AssertReleaseMsg(!RT_BOOL(HDA_STREAM_REG(pThis, CTL, u8Strm) & HDA_REG_FIELD_FLAG_MASK(SDCTL, RUN)),
-                     ("Cannot reset stream %RU8 while in running state\n", u8Strm));
-#endif
-
-    /*
-     * Set reset state.
-     */
-    Assert(ASMAtomicReadBool(&pStrmSt->State.fInReset) == false); /* No nested calls. */
-    ASMAtomicXchgBool(&pStrmSt->State.fInReset, true);
-
-    /*
-     * First, reset the internal stream state.
-     */
-    RT_BZERO(pStrmSt, sizeof(HDASTREAM));
-
-    /*
-     * Second, initialize the registers.
-     */
-    HDA_STREAM_REG(pThis, STS,   u8Strm) = 0;
-    /* According to the ICH6 datasheet, 0x40000 is the default value for stream descriptor register 23:20
-     * bits are reserved for stream number 18.2.33, resets SDnCTL except SRST bit. */
-    HDA_STREAM_REG(pThis, CTL,   u8Strm) = 0x40000 | (HDA_STREAM_REG(pThis, CTL, u8Strm) & HDA_REG_FIELD_FLAG_MASK(SDCTL, SRST));
-    /* ICH6 defines default values (0x77 for input and 0xBF for output descriptors) of FIFO size. 18.2.39. */
-    HDA_STREAM_REG(pThis, FIFOS, u8Strm) = u8Strm < 4 ? HDA_SDINFIFO_120B : HDA_SDONFIFO_192B;
-    /* See 18.2.38: Always defaults to 0x4 (32 bytes). */
-    HDA_STREAM_REG(pThis, FIFOW, u8Strm) = HDA_SDFIFOW_32B;
-    HDA_STREAM_REG(pThis, LPIB,  u8Strm) = 0;
-    HDA_STREAM_REG(pThis, CBL,   u8Strm) = 0;
-    HDA_STREAM_REG(pThis, LVI,   u8Strm) = 0;
-    HDA_STREAM_REG(pThis, FMT,   u8Strm) = 0;
-    HDA_STREAM_REG(pThis, BDPU,  u8Strm) = 0;
-    HDA_STREAM_REG(pThis, BDPL,  u8Strm) = 0;
-
-    /*
-     * Third, set the internal state according to the just set registers.
-     */
-    pStrmSt->u8Strm   = u8Strm;
-    pStrmSt->u16FIFOS = HDA_STREAM_REG(pThis, FIFOS, u8Strm);
-
-
-    /* Report that we're done resetting this stream. */
-    HDA_STREAM_REG(pThis, CTL,   u8Strm) = 0;
-
-    LogFunc(("[SD%RU8]: Reset\n", u8Strm));
-
-    /* Exit reset mode. */
-    ASMAtomicXchgBool(&pStrmSt->State.fInReset, false);
-}
-
-static int hdaStreamStart(PHDASTREAM pStrmSt)
-{
-    AssertPtrReturn(pStrmSt, VERR_INVALID_POINTER);
-
-    ASMAtomicXchgBool(&pStrmSt->State.fDoStop, false);
-    ASMAtomicXchgBool(&pStrmSt->State.fActive, true);
-
-    LogFlowFuncLeave();
-    return VINF_SUCCESS;
-}
-
-static int hdaStreamStop(PHDASTREAM pStrmSt)
-{
-    AssertPtrReturn(pStrmSt, VERR_INVALID_POINTER);
-
-    /* Already in stopped state? */
-    bool fActive = ASMAtomicReadBool(&pStrmSt->State.fActive);
-    if (!fActive)
-        return VINF_SUCCESS;
-
-#if 0 /** @todo Does not work (yet), as EMT deadlocks then. */
-    /*
-     * Wait for the stream to stop.
-     */
-    ASMAtomicXchgBool(&pStrmSt->State.fDoStop, true);
-
-    int rc = hdaStreamWaitForStateChange(pStrmSt, 60 * 1000 /* ms timeout */);
-    fActive = ASMAtomicReadBool(&pStrmSt->State.fActive);
-    if (   /* Waiting failed? */
-           RT_FAILURE(rc)
-           /* Stream is still active? */
-        || fActive)
-    {
-        AssertRC(rc);
-        LogRel(("HDA: Warning: Unable to stop stream %RU8 (state: %s), rc=%Rrc\n",
-                pStrmSt->u8Strm, fActive ? "active" : "stopped", rc));
-    }
-#else
-    int rc = VINF_SUCCESS;
-#endif
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static int hdaStreamWaitForStateChange(PHDASTREAM pStrmSt, RTMSINTERVAL msTimeout)
-{
-    AssertPtrReturn(pStrmSt, VERR_INVALID_POINTER);
-
-    LogFlowFunc(("[SD%RU8]: msTimeout=%RU32\n", pStrmSt->u8Strm, msTimeout));
-    return RTSemEventWait(pStrmSt->State.hStateChangedEvent, msTimeout);
-}
-#endif /* IN_RING3 */
-
-/* Register access handlers. */
-
-static int hdaRegReadUnimpl(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value)
-{
-    *pu32Value = 0;
-    return VINF_SUCCESS;
-}
-
-static int hdaRegWriteUnimpl(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
-{
-    return VINF_SUCCESS;
-}
-
-/* U8 */
-static int hdaRegReadU8(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value)
-{
-    Assert(((pThis->au32Regs[g_aHdaRegMap[iReg].mem_idx] & g_aHdaRegMap[iReg].readable) & 0xffffff00) == 0);
-    return hdaRegReadU32(pThis, iReg, pu32Value);
-}
-
-static int hdaRegWriteU8(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
-{
-    Assert((u32Value & 0xffffff00) == 0);
-    return hdaRegWriteU32(pThis, iReg, u32Value);
-}
-
-/* U16 */
-static int hdaRegReadU16(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value)
-{
-    Assert(((pThis->au32Regs[g_aHdaRegMap[iReg].mem_idx] & g_aHdaRegMap[iReg].readable) & 0xffff0000) == 0);
-    return hdaRegReadU32(pThis, iReg, pu32Value);
-}
-
-static int hdaRegWriteU16(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
-{
-    Assert((u32Value & 0xffff0000) == 0);
-    return hdaRegWriteU32(pThis, iReg, u32Value);
-}
-
-/* U24 */
-static int hdaRegReadU24(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value)
-{
-    Assert(((pThis->au32Regs[g_aHdaRegMap[iReg].mem_idx] & g_aHdaRegMap[iReg].readable) & 0xff000000) == 0);
-    return hdaRegReadU32(pThis, iReg, pu32Value);
-}
-
-static int hdaRegWriteU24(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
-{
-    Assert((u32Value & 0xff000000) == 0);
-    return hdaRegWriteU32(pThis, iReg, u32Value);
-}
-
-/* U32 */
-static int hdaRegReadU32(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value)
-{
-    uint32_t iRegMem = g_aHdaRegMap[iReg].mem_idx;
-
-    *pu32Value = pThis->au32Regs[iRegMem] & g_aHdaRegMap[iReg].readable;
-    return VINF_SUCCESS;
-}
-
-static int hdaRegWriteU32(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
-{
-    uint32_t iRegMem = g_aHdaRegMap[iReg].mem_idx;
-
-    pThis->au32Regs[iRegMem]  = (u32Value & g_aHdaRegMap[iReg].writable)
-                              | (pThis->au32Regs[iRegMem] & ~g_aHdaRegMap[iReg].writable);
-    return VINF_SUCCESS;
-}
-
-static int hdaRegWriteGCTL(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
-{
-    if (u32Value & HDA_REG_FIELD_FLAG_MASK(GCTL, RST))
-    {
-        /* Set the CRST bit to indicate that we're leaving reset mode. */
-        HDA_REG(pThis, GCTL) |= HDA_REG_FIELD_FLAG_MASK(GCTL, RST);
-
-        if (pThis->fInReset)
-        {
-            LogFunc(("Leaving reset\n"));
-            pThis->fInReset = false;
-        }
-    }
-    else
-    {
-#ifdef IN_RING3
-        /* Enter reset state. */
-        if (   HDA_REG_FLAG_VALUE(pThis, CORBCTL, DMA)
-            || HDA_REG_FLAG_VALUE(pThis, RIRBCTL, DMA))
-        {
-            LogFunc(("Entering reset with DMA(RIRB:%s, CORB:%s)\n",
-                     HDA_REG_FLAG_VALUE(pThis, CORBCTL, DMA) ? "on" : "off",
-                     HDA_REG_FLAG_VALUE(pThis, RIRBCTL, DMA) ? "on" : "off"));
-        }
-
-        /* Clear the CRST bit to indicate that we're in reset mode. */
-        HDA_REG(pThis, GCTL) &= ~HDA_REG_FIELD_FLAG_MASK(GCTL, RST);
-        pThis->fInReset = true;
-
-        /* As the CRST bit now is set, we now can proceed resetting stuff. */
-        hdaReset(pThis->CTX_SUFF(pDevIns));
-#else
-        return VINF_IOM_R3_MMIO_WRITE;
-#endif
-    }
-    if (u32Value & HDA_REG_FIELD_FLAG_MASK(GCTL, FSH))
-    {
-        /* Flush: GSTS:1 set, see 6.2.6. */
-        HDA_REG(pThis, GSTS) |= HDA_REG_FIELD_FLAG_MASK(GSTS, FSH); /* Set the flush state. */
-        /* DPLBASE and DPUBASE should be initialized with initial value (see 6.2.6). */
-    }
-    return VINF_SUCCESS;
-}
-
-static int hdaRegWriteSTATESTS(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
-{
-    uint32_t iRegMem = g_aHdaRegMap[iReg].mem_idx;
-
-    uint32_t v = pThis->au32Regs[iRegMem];
-    uint32_t nv = u32Value & HDA_STATES_SCSF;
-    pThis->au32Regs[iRegMem] &= ~(v & nv); /* write of 1 clears corresponding bit */
-    return VINF_SUCCESS;
-}
-
-static int hdaRegReadINTSTS(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value)
-{
-    uint32_t v = 0;
-    if (   HDA_REG_FLAG_VALUE(pThis, RIRBSTS, RIRBOIS)
-        || HDA_REG_FLAG_VALUE(pThis, RIRBSTS, RINTFL)
-        || HDA_REG_FLAG_VALUE(pThis, CORBSTS, CMEI)
-        || HDA_REG(pThis, STATESTS))
-    {
-        v |= RT_BIT(30); /* Touch CIS. */
-    }
-
-#define HDA_IS_STREAM_EVENT(pThis, num)                                  \
-       (   (SDSTS((pThis), num) & HDA_REG_FIELD_FLAG_MASK(SDSTS, DE))    \
-        || (SDSTS((pThis), num) & HDA_REG_FIELD_FLAG_MASK(SDSTS, FE))    \
-        || (SDSTS((pThis), num) & HDA_REG_FIELD_FLAG_MASK(SDSTS, BCIS)))
-
-#define HDA_MARK_STREAM(pThis, num, v) \
-        do { (v) |= HDA_IS_STREAM_EVENT((pThis), num) ? RT_BIT((num)) : 0; } while(0)
-
-    HDA_MARK_STREAM(pThis, 0, v);
-    HDA_MARK_STREAM(pThis, 1, v);
-    HDA_MARK_STREAM(pThis, 2, v);
-    HDA_MARK_STREAM(pThis, 3, v);
-    HDA_MARK_STREAM(pThis, 4, v);
-    HDA_MARK_STREAM(pThis, 5, v);
-    HDA_MARK_STREAM(pThis, 6, v);
-    HDA_MARK_STREAM(pThis, 7, v);
-
-#undef HDA_IS_STREAM_EVENT
-#undef HDA_MARK_STREAM
-
-    v |= v ? RT_BIT(31) : 0;
-
-    *pu32Value = v;
-    return VINF_SUCCESS;
-}
-
-static int hdaRegReadLPIB(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value)
-{
-    const uint8_t  u8Strm  = HDA_SD_NUM_FROM_REG(pThis, LPIB, iReg);
-          uint32_t u32LPIB = HDA_STREAM_REG(pThis, LPIB, u8Strm);
-    const uint32_t u32CBL  = HDA_STREAM_REG(pThis, CBL,  u8Strm);
-
-    LogFlowFunc(("[SD%RU8]: LPIB=%RU32, CBL=%RU32\n", u8Strm, u32LPIB, u32CBL));
-
-    *pu32Value = u32LPIB;
-    return VINF_SUCCESS;
-}
-
-static int hdaRegReadWALCLK(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value)
-{
-    /* HDA spec (1a): 3.3.16 WALCLK counter ticks with 24Mhz bitclock rate. */
-    *pu32Value = (uint32_t)ASMMultU64ByU32DivByU32(PDMDevHlpTMTimeVirtGetNano(pThis->CTX_SUFF(pDevIns))
-                                                   - pThis->u64BaseTS, 24, 1000);
-    LogFlowFunc(("%RU32\n", *pu32Value));
-    return VINF_SUCCESS;
-}
-
-static int hdaRegWriteCORBRP(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
-{
-    if (u32Value & HDA_REG_FIELD_FLAG_MASK(CORBRP, RST))
-    {
-        HDA_REG(pThis, CORBRP) = 0;
-    }
-#ifndef BIRD_THINKS_CORBRP_IS_MOSTLY_RO
-    else
-        return hdaRegWriteU8(pThis, iReg, u32Value);
-#endif
-    return VINF_SUCCESS;
-}
-
-static int hdaRegWriteCORBCTL(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
-{
-#ifdef IN_RING3
-    int rc = hdaRegWriteU8(pThis, iReg, u32Value);
-    AssertRC(rc);
-    if (   HDA_REG(pThis, CORBWP)                  != HDA_REG(pThis, CORBRP)
-        && HDA_REG_FLAG_VALUE(pThis, CORBCTL, DMA) != 0)
-    {
-        return hdaCORBCmdProcess(pThis);
-    }
-    return rc;
-#else
-    return VINF_IOM_R3_MMIO_WRITE;
-#endif
-}
-
-static int hdaRegWriteCORBSTS(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
-{
-    uint32_t v = HDA_REG(pThis, CORBSTS);
-    HDA_REG(pThis, CORBSTS) &= ~(v & u32Value);
-    return VINF_SUCCESS;
-}
-
-static int hdaRegWriteCORBWP(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
-{
-#ifdef IN_RING3
-    int rc;
-    rc = hdaRegWriteU16(pThis, iReg, u32Value);
-    if (RT_FAILURE(rc))
-        AssertRCReturn(rc, rc);
-    if (HDA_REG(pThis, CORBWP) == HDA_REG(pThis, CORBRP))
-        return VINF_SUCCESS;
-    if (!HDA_REG_FLAG_VALUE(pThis, CORBCTL, DMA))
-        return VINF_SUCCESS;
-    rc = hdaCORBCmdProcess(pThis);
-    return rc;
-#else
-    return VINF_IOM_R3_MMIO_WRITE;
-#endif
-}
-
-static int hdaRegWriteSDCBL(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
-{
-    int rc = hdaRegWriteU32(pThis, iReg, u32Value);
-    if (RT_SUCCESS(rc))
-    {
-        uint8_t u8Strm  = HDA_SD_NUM_FROM_REG(pThis, CBL, iReg);
-
-        PHDASTREAM pStrmSt = hdaStreamFromID(pThis, u8Strm);
-        if (pStrmSt)
-        {
-            pStrmSt->u32CBL = u32Value;
-
-            /* Reset BDLE state. */
-            RT_ZERO(pStrmSt->State.BDLE);
-            pStrmSt->State.uCurBDLE = 0;
-        }
-
-        LogFlowFunc(("[SD%RU8]: CBL=%RU32\n", u8Strm, u32Value));
-    }
-    else
-        AssertRCReturn(rc, VINF_SUCCESS);
-
-    return rc;
-}
-
-static int hdaRegWriteSDCTL(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
-{
-    bool fRun      = RT_BOOL(u32Value & HDA_REG_FIELD_FLAG_MASK(SDCTL, RUN));
-    bool fInRun    = RT_BOOL(HDA_REG_IND(pThis, iReg) & HDA_REG_FIELD_FLAG_MASK(SDCTL, RUN));
-    bool fReset    = RT_BOOL(u32Value & HDA_REG_FIELD_FLAG_MASK(SDCTL, SRST));
-    bool fInReset  = RT_BOOL(HDA_REG_IND(pThis, iReg) & HDA_REG_FIELD_FLAG_MASK(SDCTL, SRST));
-
-    uint8_t u8Strm = HDA_SD_NUM_FROM_REG(pThis, CTL, iReg);
-
-    PHDASTREAM pStrmSt = hdaStreamFromID(pThis, u8Strm);
-    if (!pStrmSt)
-    {
-        LogFunc(("Warning: Changing SDCTL on non-attached stream with ID=%RU8 (iReg=0x%x)\n", u8Strm, iReg));
-        return hdaRegWriteU24(pThis, iReg, u32Value); /* Write 3 bytes. */
-    }
-
-    LogFunc(("[SD%RU8]: fRun=%RTbool, fInRun=%RTbool, fReset=%RTbool, fInReset=%RTbool, %R[sdctl]\n",
-             u8Strm, fRun, fInRun, fReset, fInReset, u32Value));
-
-    if (fInReset)
-    {
-        /* Guest is resetting HDA's stream, we're expecting guest will mark stream as exit. */
-        Assert(!fReset);
-        LogFunc(("Guest initiated exit of stream reset\n"));
-    }
-    else if (fReset)
-    {
-#ifdef IN_RING3
-        /* ICH6 datasheet 18.2.33 says that RUN bit should be cleared before initiation of reset. */
-        Assert(!fInRun && !fRun);
-
-        LogFunc(("Guest initiated enter to stream reset\n"));
-        hdaStreamReset(pThis, pStrmSt, u8Strm);
-#else
-        return VINF_IOM_R3_MMIO_WRITE;
-#endif
-    }
-    else
-    {
-#ifdef IN_RING3
-        /*
-         * We enter here to change DMA states only.
-         */
-        if (fInRun != fRun)
-        {
-            Assert(!fReset && !fInReset);
-            LogFunc(("[SD%RU8]: fRun=%RTbool\n", u8Strm, fRun));
-
-            PHDADRIVER pDrv;
-            switch (u8Strm)
-            {
-                case 0: /** @todo Use a variable here. Later. */
-                {
-                    RTListForEach(&pThis->lstDrv, pDrv, HDADRIVER, Node)
-                        pDrv->pConnector->pfnEnableIn(pDrv->pConnector,
-                                                      pDrv->LineIn.pStrmIn, fRun);
-                    break;
-                }
-# ifdef VBOX_WITH_HDA_MIC_IN
-                case 2: /** @todo Use a variable here. Later. */
-                {
-                    RTListForEach(&pThis->lstDrv, pDrv, HDADRIVER, Node)
-                        pDrv->pConnector->pfnEnableIn(pDrv->pConnector,
-                                                      pDrv->MicIn.pStrmIn, fRun);
-                    break;
-                }
-# endif
-                case 4: /** @todo Use a variable here. Later. */
-                {
-                    RTListForEach(&pThis->lstDrv, pDrv, HDADRIVER, Node)
-                        pDrv->pConnector->pfnEnableOut(pDrv->pConnector,
-                                                       pDrv->Out.pStrmOut, fRun);
-                    break;
-                }
-                default:
-                    AssertMsgFailed(("Changing RUN bit on non-attached stream, register %RU32\n", iReg));
-                    break;
-            }
-        }
-
-        if (!fInRun && !fRun)
-            hdaStreamInit(pThis, pStrmSt, u8Strm);
-
-#else /* !IN_RING3 */
-        return VINF_IOM_R3_MMIO_WRITE;
-#endif /* IN_RING3 */
-    }
-
-    return hdaRegWriteU24(pThis, iReg, u32Value);
-}
-
-static int hdaRegWriteSDSTS(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
-{
-    uint32_t v = HDA_REG_IND(pThis, iReg);
-    v &= ~(u32Value & v);
-    HDA_REG_IND(pThis, iReg) = v;
-    hdaProcessInterrupt(pThis);
-    return VINF_SUCCESS;
-}
-
-static int hdaRegWriteSDLVI(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
-{
-    if (!hdaRegWriteSDIsAllowed(pThis, iReg, u32Value))
-        return VINF_SUCCESS;
-
-    int rc = hdaRegWriteU16(pThis, iReg, u32Value);
-    if (RT_SUCCESS(rc))
-    {
-        uint8_t u8Strm = HDA_SD_NUM_FROM_REG(pThis, LVI, iReg);
-
-        PHDASTREAM pStrmSt = hdaStreamFromID(pThis, u8Strm);
-        if (pStrmSt)
-        {
-            pStrmSt->u16LVI = u32Value;
-
-            /* Reset BDLE state. */
-            RT_ZERO(pStrmSt->State.BDLE);
-            pStrmSt->State.uCurBDLE = 0;
-        }
-
-        LogFlowFunc(("[SD%RU8]: CBL=%RU32\n", u8Strm, u32Value));
-    }
-    else
-        AssertRCReturn(rc, VINF_SUCCESS);
-
-    return rc;
-}
-
-static int hdaRegWriteSDFIFOW(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
-{
-    switch (u32Value)
-    {
-        case HDA_SDFIFOW_8B:
-        case HDA_SDFIFOW_16B:
-        case HDA_SDFIFOW_32B:
-            return hdaRegWriteU16(pThis, iReg, u32Value);
-        default:
-            LogFunc(("Attempt to store unsupported value(%x) in SDFIFOW\n", u32Value));
-            return hdaRegWriteU16(pThis, iReg, HDA_SDFIFOW_32B);
-    }
-    return VINF_SUCCESS; /* Never reached. */
-}
-
-/**
- * @note This method could be called for changing value on Output Streams
- *       only (ICH6 datasheet 18.2.39).
- */
-static int hdaRegWriteSDFIFOS(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
-{
-    /** @todo Only allow updating FIFOS if RUN bit is 0? */
-    uint32_t u32FIFOS = 0;
-
-    switch (iReg)
-    {
-        /* SDInFIFOS is RO, n=0-3. */
-        case HDA_REG_SD0FIFOS:
-        case HDA_REG_SD1FIFOS:
-        case HDA_REG_SD2FIFOS:
-        case HDA_REG_SD3FIFOS:
-        {
-            LogFunc(("Guest tries to change R/O value of FIFO size of input stream, ignoring\n"));
-            break;
-        }
-        case HDA_REG_SD4FIFOS:
-        case HDA_REG_SD5FIFOS:
-        case HDA_REG_SD6FIFOS:
-        case HDA_REG_SD7FIFOS:
-        {
-            switch(u32Value)
-            {
-                case HDA_SDONFIFO_16B:
-                case HDA_SDONFIFO_32B:
-                case HDA_SDONFIFO_64B:
-                case HDA_SDONFIFO_128B:
-                case HDA_SDONFIFO_192B:
-                    u32FIFOS = u32Value;
-                    break;
-
-                case HDA_SDONFIFO_256B: /** @todo r=andy Investigate this. */
-                    LogFunc(("256-bit is unsupported, HDA is switched into 192-bit mode\n"));
-                    /* Fall through is intentional. */
-                default:
-                    u32FIFOS = HDA_SDONFIFO_192B;
-                    break;
-            }
-
-            break;
-        }
-        default:
-        {
-            AssertMsgFailed(("Something weird happened with register lookup routine\n"));
-            break;
-        }
-    }
-
-    if (u32FIFOS)
-    {
-        LogFunc(("[SD%RU8]: Updating FIFOS to %RU32 bytes\n", 0, hdaSDFIFOSToBytes(u32FIFOS)));
-        /** @todo Update internal stream state with new FIFOS. */
-
-        return hdaRegWriteU16(pThis, iReg, u32FIFOS);
-    }
-
-    return VINF_SUCCESS;
-}
-
-#ifdef IN_RING3
-static int hdaSDFMTToStrmCfg(uint32_t u32SDFMT, PPDMAUDIOSTREAMCFG pCfg)
-{
-    AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
-
-# define EXTRACT_VALUE(v, mask, shift) ((v & ((mask) << (shift))) >> (shift))
-
-    int rc = VINF_SUCCESS;
-
-    uint32_t u32Hz     = (u32SDFMT & HDA_SDFMT_BASE_RATE_SHIFT) ? 44100 : 48000;
-    uint32_t u32HzMult = 1;
-    uint32_t u32HzDiv  = 1;
-
-    switch (EXTRACT_VALUE(u32SDFMT, HDA_SDFMT_MULT_MASK, HDA_SDFMT_MULT_SHIFT))
-    {
-        case 0: u32HzMult = 1; break;
-        case 1: u32HzMult = 2; break;
-        case 2: u32HzMult = 3; break;
-        case 3: u32HzMult = 4; break;
-        default:
-            LogFunc(("Unsupported multiplier %x\n",
-                     EXTRACT_VALUE(u32SDFMT, HDA_SDFMT_MULT_MASK, HDA_SDFMT_MULT_SHIFT)));
-            rc = VERR_NOT_SUPPORTED;
-            break;
-    }
-    switch (EXTRACT_VALUE(u32SDFMT, HDA_SDFMT_DIV_MASK, HDA_SDFMT_DIV_SHIFT))
-    {
-        case 0: u32HzDiv = 1; break;
-        case 1: u32HzDiv = 2; break;
-        case 2: u32HzDiv = 3; break;
-        case 3: u32HzDiv = 4; break;
-        case 4: u32HzDiv = 5; break;
-        case 5: u32HzDiv = 6; break;
-        case 6: u32HzDiv = 7; break;
-        case 7: u32HzDiv = 8; break;
-        default:
-            LogFunc(("Unsupported divisor %x\n",
-                     EXTRACT_VALUE(u32SDFMT, HDA_SDFMT_DIV_MASK, HDA_SDFMT_DIV_SHIFT)));
-            rc = VERR_NOT_SUPPORTED;
-            break;
-    }
-
-    PDMAUDIOFMT enmFmt = AUD_FMT_S16; /* Default to 16-bit signed. */
-    switch (EXTRACT_VALUE(u32SDFMT, HDA_SDFMT_BITS_MASK, HDA_SDFMT_BITS_SHIFT))
-    {
-        case 0:
-            LogFunc(("Requested 8-bit\n"));
-            enmFmt = AUD_FMT_S8;
-            break;
-        case 1:
-            LogFunc(("Requested 16-bit\n"));
-            enmFmt = AUD_FMT_S16;
-            break;
-        case 2:
-            LogFunc(("Requested 20-bit\n"));
-            break;
-        case 3:
-            LogFunc(("Requested 24-bit\n"));
-            break;
-        case 4:
-            LogFunc(("Requested 32-bit\n"));
-            enmFmt = AUD_FMT_S32;
-            break;
-        default:
-            AssertMsgFailed(("Unsupported bits shift %x\n",
-                             EXTRACT_VALUE(u32SDFMT, HDA_SDFMT_BITS_MASK, HDA_SDFMT_BITS_SHIFT)));
-            rc = VERR_NOT_SUPPORTED;
-            break;
-    }
-
-    if (RT_SUCCESS(rc))
-    {
-        pCfg->uHz           = u32Hz * u32HzMult / u32HzDiv;
-        pCfg->cChannels     = (u32SDFMT & 0xf) + 1;
-        pCfg->enmFormat     = enmFmt;
-        pCfg->enmEndianness = PDMAUDIOHOSTENDIANNESS;
-    }
-
-# undef EXTRACT_VALUE
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-#endif
-
-static int hdaRegWriteSDFMT(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
-{
-#ifdef IN_RING3
-# ifdef VBOX_WITH_HDA_CODEC_EMU
-    /* No reason to re-open stream with same settings. */
-    if (u32Value == HDA_REG_IND(pThis, iReg))
-        return VINF_SUCCESS;
-
-    PDMAUDIOSTREAMCFG strmCfg;
-    int rc = hdaSDFMTToStrmCfg(u32Value, &strmCfg);
-    if (RT_FAILURE(rc))
-        return VINF_SUCCESS; /* Always return success to the MMIO handler. */
-
-    uint8_t u8Strm = HDA_SD_NUM_FROM_REG(pThis, FMT, iReg);
-
-    PHDADRIVER pDrv;
-    switch (iReg)
-    {
-        case HDA_REG_SD0FMT:
-            RTListForEach(&pThis->lstDrv, pDrv, HDADRIVER, Node)
-                rc = hdaCodecOpenStream(pThis->pCodec, PI_INDEX, &strmCfg);
-            break;
-#  ifdef VBOX_WITH_HDA_MIC_IN
-        case HDA_REG_SD2FMT:
-            RTListForEach(&pThis->lstDrv, pDrv, HDADRIVER, Node)
-                rc = hdaCodecOpenStream(pThis->pCodec, MC_INDEX, &strmCfg);
-            break;
-#  endif
-        case HDA_REG_SD4FMT:
-            RTListForEach(&pThis->lstDrv, pDrv, HDADRIVER, Node)
-                rc = hdaCodecOpenStream(pThis->pCodec, PO_INDEX, &strmCfg);
-            break;
-        default:
-            LogFunc(("Warning: Changing SDFMT on non-attached stream with ID=%RU8 (iReg=0x%x)\n", u8Strm, iReg));
-            break;
-    }
-
-    /** @todo r=andy rc gets lost; needs fixing. */
-    return hdaRegWriteU16(pThis, iReg, u32Value);
-# else /* !VBOX_WITH_HDA_CODEC_EMU */
-    return hdaRegWriteU16(pThis, iReg, u32Value);
-# endif
-#else /* !IN_RING3 */
-    return VINF_IOM_R3_MMIO_WRITE;
-#endif
-}
-
-/* Note: Will be called for both, BDPL and BDPU, registers. */
-DECLINLINE(int) hdaRegWriteSDBDPX(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value, uint8_t u8Strm)
-{
-    if (!hdaRegWriteSDIsAllowed(pThis, iReg, u32Value))
-        return VINF_SUCCESS;
-
-    int rc = hdaRegWriteU32(pThis, iReg, u32Value);
-    if (RT_SUCCESS(rc))
-    {
-        PHDASTREAM pStrmSt = hdaStreamFromID(pThis, u8Strm);
-        if (pStrmSt)
-        {
-            pStrmSt->u64BDLBase = RT_MAKE_U64(HDA_STREAM_REG(pThis, BDPL, u8Strm),
-                                              HDA_STREAM_REG(pThis, BDPU, u8Strm));
-            /* Reset BDLE state. */
-            RT_ZERO(pStrmSt->State.BDLE);
-            pStrmSt->State.uCurBDLE = 0;
-        }
-    }
-    else
-        AssertRCReturn(rc, VINF_SUCCESS);
-
-    return rc;
-}
-
-static int hdaRegWriteSDBDPL(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
-{
-    return hdaRegWriteSDBDPX(pThis, iReg, u32Value, HDA_SD_NUM_FROM_REG(pThis, BDPL, iReg));
-}
-
-static int hdaRegWriteSDBDPU(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
-{
-    return hdaRegWriteSDBDPX(pThis, iReg, u32Value, HDA_SD_NUM_FROM_REG(pThis, BDPU, iReg));
-}
-
-/**
- * Checks whether a write to a specific SDnXXX register is allowed or not.
- *
- * @return  bool                Returns @true if write is allowed, @false if not.
- * @param   pThis               Pointer to HDA state.
- * @param   iReg                Register to write.
- * @param   u32Value            Value to write.
- */
-inline bool hdaRegWriteSDIsAllowed(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
-{
-    /* Check if the SD's RUN bit is set. */
-    bool fIsRunning = RT_BOOL(HDA_REG_IND(pThis, iReg) & HDA_REG_FIELD_FLAG_MASK(SDCTL, RUN));
-    if (fIsRunning)
-    {
-#ifdef VBOX_STRICT
-        AssertMsgFailed(("[SD%RU8]: Cannot write to register 0x%x (0x%x) when RUN bit is set\n",
-                         HDA_SD_NUM_FROM_REG(pThis, CTL, iReg), iReg, u32Value));
-#endif
-        return false;
-    }
-
-    return true;
-}
-
-static int hdaRegReadIRS(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value)
-{
-    int rc = VINF_SUCCESS;
-    /* regarding 3.4.3 we should mark IRS as busy in case CORB is active */
-    if (   HDA_REG(pThis, CORBWP) != HDA_REG(pThis, CORBRP)
-        || HDA_REG_FLAG_VALUE(pThis, CORBCTL, DMA))
-        HDA_REG(pThis, IRS) = HDA_REG_FIELD_FLAG_MASK(IRS, ICB);  /* busy */
-
-    rc = hdaRegReadU32(pThis, iReg, pu32Value);
-    return rc;
-}
-
-static int hdaRegWriteIRS(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
-{
-    int rc = VINF_SUCCESS;
-
-    /*
-     * If the guest set the ICB bit of IRS register, HDA should process the verb in IC register,
-     * write the response to IR register, and set the IRV (valid in case of success) bit of IRS register.
-     */
-    if (   u32Value & HDA_REG_FIELD_FLAG_MASK(IRS, ICB)
-        && !HDA_REG_FLAG_VALUE(pThis, IRS, ICB))
-    {
-#ifdef IN_RING3
-        PFNHDACODECVERBPROCESSOR    pfn = NULL;
-        uint64_t                    resp;
-        uint32_t cmd = HDA_REG(pThis, IC);
-        if (HDA_REG(pThis, CORBWP) != HDA_REG(pThis, CORBRP))
-        {
-            /*
-             * 3.4.3 defines behavior of immediate Command status register.
-             */
-            LogRel(("guest attempted process immediate verb (%x) with active CORB\n", cmd));
-            return rc;
-        }
-        HDA_REG(pThis, IRS) = HDA_REG_FIELD_FLAG_MASK(IRS, ICB);  /* busy */
-        LogFunc(("IC:%x\n", cmd));
-
-        rc = pThis->pCodec->pfnLookup(pThis->pCodec,
-                                      HDA_CODEC_CMD(cmd, 0 /* LUN */),
-                                      &pfn);
-        if (RT_FAILURE(rc))
-            AssertRCReturn(rc, rc);
-        rc = pfn(pThis->pCodec,
-                 HDA_CODEC_CMD(cmd, 0 /* LUN */), &resp);
-        if (RT_FAILURE(rc))
-            AssertRCReturn(rc, rc);
-
-        HDA_REG(pThis, IR) = (uint32_t)resp;
-        LogFunc(("IR:%x\n", HDA_REG(pThis, IR)));
-        HDA_REG(pThis, IRS) = HDA_REG_FIELD_FLAG_MASK(IRS, IRV);  /* result is ready  */
-        HDA_REG(pThis, IRS) &= ~HDA_REG_FIELD_FLAG_MASK(IRS, ICB); /* busy is clear */
-#else /* !IN_RING3 */
-        rc = VINF_IOM_R3_MMIO_WRITE;
-#endif
-        return rc;
-    }
-    /*
-     * Once the guest read the response, it should clean the IRV bit of the IRS register.
-     */
-    if (   u32Value & HDA_REG_FIELD_FLAG_MASK(IRS, IRV)
-        && HDA_REG_FLAG_VALUE(pThis, IRS, IRV))
-        HDA_REG(pThis, IRS) &= ~HDA_REG_FIELD_FLAG_MASK(IRS, IRV);
-    return rc;
-}
-
-static int hdaRegWriteRIRBWP(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
-{
-    if (u32Value & HDA_REG_FIELD_FLAG_MASK(RIRBWP, RST))
-    {
-        HDA_REG(pThis, RIRBWP) = 0;
-    }
-    /* The remaining bits are O, see 6.2.22 */
-    return VINF_SUCCESS;
-}
-
-static int hdaRegWriteBase(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
-{
-    uint32_t iRegMem = g_aHdaRegMap[iReg].mem_idx;
-    int rc = hdaRegWriteU32(pThis, iReg, u32Value);
-    if (RT_FAILURE(rc))
-        AssertRCReturn(rc, rc);
-
-    switch(iReg)
-    {
-        case HDA_REG_CORBLBASE:
-            pThis->u64CORBBase &= UINT64_C(0xFFFFFFFF00000000);
-            pThis->u64CORBBase |= pThis->au32Regs[iRegMem];
-            break;
-        case HDA_REG_CORBUBASE:
-            pThis->u64CORBBase &= UINT64_C(0x00000000FFFFFFFF);
-            pThis->u64CORBBase |= ((uint64_t)pThis->au32Regs[iRegMem] << 32);
-            break;
-        case HDA_REG_RIRBLBASE:
-            pThis->u64RIRBBase &= UINT64_C(0xFFFFFFFF00000000);
-            pThis->u64RIRBBase |= pThis->au32Regs[iRegMem];
-            break;
-        case HDA_REG_RIRBUBASE:
-            pThis->u64RIRBBase &= UINT64_C(0x00000000FFFFFFFF);
-            pThis->u64RIRBBase |= ((uint64_t)pThis->au32Regs[iRegMem] << 32);
-            break;
-        case HDA_REG_DPLBASE:
-        {
-            pThis->u64DPBase &= UINT64_C(0xFFFFFFFF00000000);
-            pThis->u64DPBase |= pThis->au32Regs[iRegMem];
-
-            /* Also make sure to handle the DMA position enable bit. */
-            pThis->fDMAPosition = pThis->au32Regs[iRegMem] & RT_BIT_32(0);
-            LogRel(("HDA: %s DMA position buffer\n", pThis->fDMAPosition ? "Enabled" : "Disabled"));
-            break;
-        }
-        case HDA_REG_DPUBASE:
-            pThis->u64DPBase &= UINT64_C(0x00000000FFFFFFFF);
-            pThis->u64DPBase |= ((uint64_t)pThis->au32Regs[iRegMem] << 32);
-            break;
-        default:
-            AssertMsgFailed(("Invalid index\n"));
-            break;
-    }
-
-    LogFunc(("CORB base:%llx RIRB base: %llx DP base: %llx\n",
-             pThis->u64CORBBase, pThis->u64RIRBBase, pThis->u64DPBase));
-    return rc;
-}
-
-static int hdaRegWriteRIRBSTS(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
-{
-    uint8_t v = HDA_REG(pThis, RIRBSTS);
-    HDA_REG(pThis, RIRBSTS) &= ~(v & u32Value);
-
-    return hdaProcessInterrupt(pThis);
-}
-
-#ifdef IN_RING3
-#ifdef LOG_ENABLED
-static void hdaBDLEDumpAll(PHDASTATE pThis, uint64_t u64BDLBase, uint16_t cBDLE)
-{
-    LogFlowFunc(("BDLEs @ 0x%x (%RU16):\n", u64BDLBase, cBDLE));
-    if (!u64BDLBase)
-        return;
-
-    uint32_t cbBDLE = 0;
-    for (uint16_t i = 0; i < cBDLE; i++)
-    {
-        uint8_t bdle[16]; /** @todo Use a define. */
-        PDMDevHlpPhysRead(pThis->CTX_SUFF(pDevIns), u64BDLBase + i * 16, bdle, 16); /** @todo Use a define. */
-
-        uint64_t addr = *(uint64_t *)bdle;
-        uint32_t len  = *(uint32_t *)&bdle[8];
-        uint32_t ioc  = *(uint32_t *)&bdle[12];
-
-        LogFlowFunc(("\t#%03d BDLE(adr:0x%llx, size:%RU32, ioc:%RTbool)\n",
-                     i, addr, len, RT_BOOL(ioc & 0x1)));
-
-        cbBDLE += len;
-    }
-
-    LogFlowFunc(("Total: %RU32 bytes\n", cbBDLE));
-
-    if (!pThis->u64DPBase) /* No DMA base given? Bail out. */
-        return;
-
-    LogFlowFunc(("DMA counters:\n"));
-
-    for (int i = 0; i < cBDLE; i++)
-    {
-        uint32_t uDMACnt;
-        PDMDevHlpPhysRead(pThis->CTX_SUFF(pDevIns), (pThis->u64DPBase & DPBASE_ADDR_MASK) + (i * 2 * sizeof(uint32_t)),
-                          &uDMACnt, sizeof(uDMACnt));
-
-        LogFlowFunc(("\t#%03d DMA @ 0x%x\n", i , uDMACnt));
-    }
-}
-#endif
-
-/**
- * Fetches a Bundle Descriptor List Entry (BDLE) from the DMA engine.
- *
- * @param   pThis                   Pointer to HDA state.
- * @param   pBDLE                   Where to store the fetched result.
- * @param   u64BaseDMA              Address base of DMA engine to use.
- * @param   u16Entry                BDLE entry to fetch.
- */
-static int hdaBDLEFetch(PHDASTATE pThis, PHDABDLE pBDLE, uint64_t u64BaseDMA, uint16_t u16Entry)
-{
-    AssertPtrReturn(pThis,   VERR_INVALID_POINTER);
-    AssertPtrReturn(pBDLE,   VERR_INVALID_POINTER);
-    AssertReturn(u64BaseDMA, VERR_INVALID_PARAMETER);
-    /** @todo Compare u16Entry with LVI. */
-
-    uint8_t uBundleEntry[16]; /** @todo Define a BDLE length. */
-    int rc = PDMDevHlpPhysRead(pThis->CTX_SUFF(pDevIns), u64BaseDMA + u16Entry * 16, /** @todo Define a BDLE length. */
-                               uBundleEntry, RT_ELEMENTS(uBundleEntry));
-    if (RT_FAILURE(rc))
-        return rc;
-
-    RT_BZERO(pBDLE, sizeof(HDABDLE));
-
-    pBDLE->State.u32BDLIndex = u16Entry;
-    pBDLE->u64BufAdr         = *(uint64_t *) uBundleEntry;
-    pBDLE->u32BufSize        = *(uint32_t *)&uBundleEntry[8];
-    if (pBDLE->u32BufSize < sizeof(uint16_t)) /* Must be at least one word. */
-        return VERR_INVALID_STATE;
-
-    pBDLE->fIntOnCompletion  = (*(uint32_t *)&uBundleEntry[12]) & 0x1;
-
-    return VINF_SUCCESS;
-}
-
-/**
- * Returns the number of outstanding stream data bytes which need to be processed
- * by the DMA engine assigned to this stream.
- *
- * @return Number of bytes for the DMA engine to process.
- */
-DECLINLINE(uint32_t) hdaStreamGetTransferSize(PHDASTATE pThis, PHDASTREAM pStrmSt, uint32_t cbMax)
-{
-    AssertPtrReturn(pThis, 0);
-    AssertPtrReturn(pStrmSt, 0);
-
-    if (!cbMax)
-        return 0;
-
-    PHDABDLE pBDLE = &pStrmSt->State.BDLE;
-
-    uint32_t cbFree = pStrmSt->u32CBL - HDA_STREAM_REG(pThis, LPIB, pStrmSt->u8Strm);
-    if (cbFree)
-    {
-        /* Limit to the available free space of the current BDLE. */
-        cbFree = RT_MIN(cbFree, pBDLE->u32BufSize - pBDLE->State.u32BufOff);
-
-        /* Make sure we only copy as much as the stream's FIFO can hold (SDFIFOS, 18.2.39). */
-        cbFree = RT_MIN(cbFree, pStrmSt->u16FIFOS);
-
-        /* Make sure we only transfer as many bytes as requested. */
-        cbFree = RT_MIN(cbFree, cbMax);
-
-        if (pBDLE->State.cbBelowFIFOW)
-        {
-            /* Are we not going to reach (or exceed) the FIFO watermark yet with the data to copy?
-             * No need to read data from DMA then. */
-            if (cbFree > pBDLE->State.cbBelowFIFOW)
-            {
-                /* Subtract the amount of bytes that still would fit in the stream's FIFO
-                 * and therefore do not need to be processed by DMA. */
-                cbFree -= pBDLE->State.cbBelowFIFOW;
-            }
-        }
-    }
-
-    LogFlowFunc(("[SD%RU8]: CBL=%RU32, LPIB=%RU32, cbFree=%RU32, %R[bdle]\n", pStrmSt->u8Strm,
-                 pStrmSt->u32CBL, HDA_STREAM_REG(pThis, LPIB, pStrmSt->u8Strm), cbFree, pBDLE));
-    return cbFree;
-}
-
-DECLINLINE(void) hdaBDLEUpdate(PHDABDLE pBDLE, uint32_t cbData, uint32_t cbProcessed)
-{
-    AssertPtrReturnVoid(pBDLE);
-
-    if (!cbData || !cbProcessed)
-        return;
-
-    /* Fewer than cbBelowFIFOW bytes were copied.
-     * Probably we need to move the buffer, but it is rather hard to imagine a situation
-     * where it might happen. */
-    AssertMsg((cbProcessed == pBDLE->State.cbBelowFIFOW + cbData), /* we assume that we write the entire buffer including unreported bytes */
-              ("cbProcessed=%RU32 != pBDLE->State.cbBelowFIFOW=%RU32 + cbData=%RU32\n",
-              cbProcessed, pBDLE->State.cbBelowFIFOW, cbData));
-
-#if 0
-    if (   pBDLE->State.cbBelowFIFOW
-        && pBDLE->State.cbBelowFIFOW <= cbWritten)
-    {
-        LogFlowFunc(("BDLE(cbUnderFifoW:%RU32, off:%RU32, size:%RU32)\n",
-                     pBDLE->State.cbBelowFIFOW, pBDLE->State.u32BufOff, pBDLE->u32BufSize));
-    }
-#endif
-
-    pBDLE->State.cbBelowFIFOW -= RT_MIN(pBDLE->State.cbBelowFIFOW, cbProcessed);
-    Assert(pBDLE->State.cbBelowFIFOW == 0);
-
-    /* We always increment the position of DMA buffer counter because we're always reading
-     * into an intermediate buffer. */
-    pBDLE->State.u32BufOff += cbData;
-    Assert(pBDLE->State.u32BufOff <= pBDLE->u32BufSize);
-
-    LogFlowFunc(("cbData=%RU32, cbProcessed=%RU32, %R[bdle]\n", cbData, cbProcessed, pBDLE));
-}
-
-DECLINLINE(bool) hdaStreamNeedsNextBDLE(PHDASTATE pThis, PHDASTREAM pStrmSt)
-{
-    AssertPtrReturn(pThis,   false);
-    AssertPtrReturn(pStrmSt, false);
-
-    PHDABDLE pBDLE   = &pStrmSt->State.BDLE;
-    uint32_t u32LPIB = HDA_STREAM_REG(pThis, LPIB, pStrmSt->u8Strm);
-
-    /* Did we reach the CBL (Cyclic Buffer List) limit? */
-    bool fCBLLimitReached = u32LPIB >= pStrmSt->u32CBL;
-
-    /* Do we need to use the next BDLE entry? Either because we reached
-     * the CBL limit or our internal DMA buffer is full. */
-    bool fNeedsNextBDLE   = (   fCBLLimitReached
-                             || (pBDLE->State.u32BufOff >= pBDLE->u32BufSize));
-
-    Assert(u32LPIB                <= pStrmSt->u32CBL);
-    Assert(pBDLE->State.u32BufOff <= pBDLE->u32BufSize);
-
-    LogFlowFunc(("[SD%RU8]: LPIB=%RU32, CBL=%RU32, fCBLLimitReached=%RTbool, fNeedsNextBDLE=%RTbool, %R[bdle]\n",
-                 pStrmSt->u8Strm, u32LPIB, pStrmSt->u32CBL, fCBLLimitReached, fNeedsNextBDLE, pBDLE));
-
-    if (fCBLLimitReached)
-    {
-        /* Reset LPIB register. */
-        u32LPIB -= RT_MIN(u32LPIB, pStrmSt->u32CBL);
-        hdaStreamUpdateLPIB(pThis, pStrmSt, u32LPIB);
-    }
-
-    return fNeedsNextBDLE;
-}
-
-DECLINLINE(void) hdaStreamTransferUpdate(PHDASTATE pThis, PHDASTREAM pStrmSt, uint32_t cbInc)
-{
-    AssertPtrReturnVoid(pThis);
-    AssertPtrReturnVoid(pStrmSt);
-
-    LogFlowFunc(("[SD%RU8]: cbInc=%RU32\n", pStrmSt->u8Strm, cbInc));
-
-    Assert(cbInc <= pStrmSt->u16FIFOS);
-
-    PHDABDLE pBDLE = &pStrmSt->State.BDLE;
-
-    /*
-     * If we're below the FIFO watermark (SDFIFOW), it's expected that HDA
-     * doesn't fetch anything via DMA, so just update LPIB.
-     * (ICH6 datasheet 18.2.38).
-     */
-    if (pBDLE->State.cbBelowFIFOW == 0) /* Did we hit (or exceed) the watermark? */
-    {
-        const uint32_t u32LPIB = RT_MIN(HDA_STREAM_REG(pThis, LPIB, pStrmSt->u8Strm) + cbInc,
-                                        pStrmSt->u32CBL);
-
-        LogFlowFunc(("[SD%RU8]: LPIB: %RU32 -> %RU32, CBL=%RU32\n",
-                     pStrmSt->u8Strm,
-                     HDA_STREAM_REG(pThis, LPIB, pStrmSt->u8Strm), HDA_STREAM_REG(pThis, LPIB, pStrmSt->u8Strm) + cbInc,
-                     pStrmSt->u32CBL));
-
-        hdaStreamUpdateLPIB(pThis, pStrmSt, u32LPIB);
-    }
-}
-
-static bool hdaStreamTransferIsComplete(PHDASTATE pThis, PHDASTREAM pStrmSt)
-{
-    AssertPtrReturn(pThis,   true);
-    AssertPtrReturn(pStrmSt, true);
-
-    bool fIsComplete = false;
-
-    PHDABDLE       pBDLE   = &pStrmSt->State.BDLE;
-    const uint32_t u32LPIB = HDA_STREAM_REG(pThis, LPIB, pStrmSt->u8Strm);
-
-    if (   pBDLE->State.u32BufOff >= pBDLE->u32BufSize
-        || u32LPIB                >= pStrmSt->u32CBL)
-    {
-        Assert(pBDLE->State.u32BufOff <= pBDLE->u32BufSize);
-        Assert(u32LPIB                <= pStrmSt->u32CBL);
-
-        if (/* IOC (Interrupt On Completion) bit set? */
-               pBDLE->fIntOnCompletion
-            /* All data put into the DMA FIFO? */
-            && pBDLE->State.cbBelowFIFOW == 0
-           )
-        {
-            /**
-             * Set the BCIS (Buffer Completion Interrupt Status) flag as the
-             * last byte of data for the current descriptor has been fetched
-             * from memory and put into the DMA FIFO.
-             *
-             ** @todo More carefully investigate BCIS flag.
-             *
-             * Speech synthesis works fine on Mac Guest if this bit isn't set
-             * but in general sound quality gets worse.
-             */
-            HDA_STREAM_REG(pThis, STS, pStrmSt->u8Strm) |= HDA_REG_FIELD_FLAG_MASK(SDSTS, BCIS);
-
-            /*
-             * If the ICE (IOCE, "Interrupt On Completion Enable") bit of the SDCTL register is set
-             * we need to generate an interrupt.
-             */
-            if (HDA_STREAM_REG(pThis, CTL, pStrmSt->u8Strm) & HDA_REG_FIELD_FLAG_MASK(SDCTL, ICE))
-                hdaProcessInterrupt(pThis);
-        }
-
-        fIsComplete = true;
-    }
-
-    LogFlowFunc(("[SD%RU8]: u32LPIB=%RU32, CBL=%RU32, %R[bdle] => %s\n",
-                 pStrmSt->u8Strm, u32LPIB, pStrmSt->u32CBL, pBDLE, fIsComplete ? "COMPLETE" : "INCOMPLETE"));
-
-    return fIsComplete;
-}
-
-/**
- * hdaReadAudio - copies samples from audio backend to DMA.
- * Note: This function writes to the DMA buffer immediately,
- *       but "reports bytes" when all conditions are met (FIFOW).
- */
-static int hdaReadAudio(PHDASTATE pThis, PHDASTREAM pStrmSt, PAUDMIXSINK pSink, uint32_t cbMax, uint32_t *pcbRead)
-{
-    AssertPtrReturn(pThis,   VERR_INVALID_POINTER);
-    AssertPtrReturn(pStrmSt, VERR_INVALID_POINTER);
-    AssertPtrReturn(pSink,   VERR_INVALID_POINTER);
-    /* pcbRead is optional. */
-
-    PHDABDLE pBDLE = &pStrmSt->State.BDLE;
-
-    int rc;
-    uint32_t cbRead = 0;
-    uint32_t cbBuf  = hdaStreamGetTransferSize(pThis, pStrmSt, cbMax);
-
-    LogFlowFunc(("cbBuf=%RU32, %R[bdle]\n", cbBuf, pBDLE));
-
-    if (!cbBuf)
-    {
-        /* Nothing to write, bail out. */
-        rc = VINF_EOF;
-    }
-    else
-    {
-        rc = AudioMixerProcessSinkIn(pSink, AUDMIXOP_BLEND, pBDLE->State.au8FIFO, cbBuf, &cbRead);
-        if (RT_SUCCESS(rc))
-        {
-            Assert(cbRead);
-            Assert(cbRead == cbBuf);
-            Assert(cbRead <= pBDLE->u32BufSize - pBDLE->State.u32BufOff);
-
-            /*
-             * Write to the BDLE's DMA buffer.
-             */
-            rc = PDMDevHlpPCIPhysWrite(pThis->CTX_SUFF(pDevIns),
-                                       pBDLE->u64BufAdr + pBDLE->State.u32BufOff,
-                                       pBDLE->State.au8FIFO, cbRead);
-            AssertRC(rc);
-
-            if (pBDLE->State.cbBelowFIFOW + cbRead > hdaStreamGetFIFOW(pThis, pStrmSt))
-            {
-                pBDLE->State.u32BufOff    += cbRead;
-                pBDLE->State.cbBelowFIFOW  = 0;
-                //hdaBackendReadTransferReported(pBDLE, cbDMAData, cbRead, &cbRead, pcbAvail);
-            }
-            else
-            {
-                pBDLE->State.u32BufOff    += cbRead;
-                pBDLE->State.cbBelowFIFOW += cbRead;
-                Assert(pBDLE->State.cbBelowFIFOW <= hdaStreamGetFIFOW(pThis, pStrmSt));
-                //hdaBackendTransferUnreported(pThis, pBDLE, pStreamDesc, cbRead, pcbAvail);
-
-                rc = VERR_NO_DATA;
-            }
-        }
-    }
-
-    Assert(cbRead <= pStrmSt->u16FIFOS);
-
-    if (RT_SUCCESS(rc))
-    {
-        if (pcbRead)
-            *pcbRead = cbRead;
-    }
-
-    LogFunc(("Returning cbRead=%RU32, rc=%Rrc\n", cbRead, rc));
-    return rc;
-}
-
-static int hdaWriteAudio(PHDASTATE pThis, PHDASTREAM pStrmSt, uint32_t cbMax, uint32_t *pcbWritten)
-{
-    AssertPtrReturn(pThis,      VERR_INVALID_POINTER);
-    AssertPtrReturn(pStrmSt,    VERR_INVALID_POINTER);
-    AssertPtrReturn(pcbWritten, VERR_INVALID_POINTER);
-    /* pcbWritten is optional. */
-
-    PHDABDLE pBDLE = &pStrmSt->State.BDLE;
-
-    uint32_t cbWritten = 0;
-    uint32_t cbData    = hdaStreamGetTransferSize(pThis, pStrmSt, cbMax);
-
-    LogFlowFunc(("cbData=%RU32, %R[bdle]\n", cbData, pBDLE));
-
-    /*
-     * Copy from DMA to the corresponding stream buffer (if there are any bytes from the
-     * previous unreported transfer we write at offset 'pBDLE->State.cbUnderFifoW').
-     */
-    int rc;
-    if (!cbData)
-    {
-        rc = VINF_EOF;
-    }
-    else
-    {
-        /*
-         * Read from the current BDLE's DMA buffer.
-         */
-        rc = PDMDevHlpPhysRead(pThis->CTX_SUFF(pDevIns),
-                               pBDLE->u64BufAdr + pBDLE->State.u32BufOff,
-                               pBDLE->State.au8FIFO + pBDLE->State.cbBelowFIFOW, cbData);
-        AssertRC(rc);
-
-#ifdef VBOX_WITH_STATISTICS
-        STAM_COUNTER_ADD(&pThis->StatBytesRead, cbData);
-#endif
-        /*
-         * Write to audio backend. We should ensure that we have enough bytes to copy to the backend.
-         */
-        uint32_t cbToWrite = cbData + pBDLE->State.cbBelowFIFOW;
-        if (cbToWrite >= hdaStreamGetFIFOW(pThis, pStrmSt))
-        {
-            uint32_t cbWrittenToStream;
-            int rc2;
-
-            PHDADRIVER pDrv;
-            RTListForEach(&pThis->lstDrv, pDrv, HDADRIVER, Node)
-            {
-                if (pDrv->pConnector->pfnIsActiveOut(pDrv->pConnector, pDrv->Out.pStrmOut))
-                {
-                    rc2 = pDrv->pConnector->pfnWrite(pDrv->pConnector, pDrv->Out.pStrmOut,
-                                                     pBDLE->State.au8FIFO, cbToWrite, &cbWrittenToStream);
-                    if (RT_SUCCESS(rc2))
-                    {
-                        if (cbWrittenToStream < cbToWrite) /* Lagging behind? */
-                            LogFlowFunc(("\tLUN#%RU8: Warning: Only written %RU32 / %RU32 bytes, expect lags\n",
-                                         pDrv->uLUN, cbWrittenToStream, cbToWrite));
-                    }
-                }
-                else /* Stream disabled, not fatal. */
-                {
-                    cbWrittenToStream = 0;
-                    rc2 = VERR_NOT_AVAILABLE;
-                    /* Keep going. */
-                }
-
-                LogFlowFunc(("\tLUN#%RU8: cbToWrite=%RU32, cbWrittenToStream=%RU32, rc=%Rrc\n",
-                             pDrv->uLUN, cbToWrite, cbWrittenToStream, rc2));
-            }
-
-            /* Always report all data as being written;
-             * backends who were not able to catch up have to deal with it themselves. */
-            cbWritten = cbToWrite;
-
-            hdaBDLEUpdate(pBDLE, cbData, cbWritten);
-        }
-        else
-        {
-            pBDLE->State.u32BufOff += cbWritten;
-            pBDLE->State.cbBelowFIFOW += cbWritten;
-            Assert(pBDLE->State.cbBelowFIFOW <= hdaStreamGetFIFOW(pThis, pStrmSt));
-
-            /* Not enough bytes to be processed and reported, we'll try our luck next time around. */
-            //hdaBackendTransferUnreported(pThis, pBDLE, pStreamDesc, cbAvail, NULL);
-            rc = VINF_EOF;
-        }
-    }
-
-    Assert(cbWritten <= pStrmSt->u16FIFOS);
-
-    if (RT_SUCCESS(rc))
-    {
-        if (pcbWritten)
-            *pcbWritten = cbWritten;
-    }
-
-    LogFunc(("Returning cbWritten=%RU32, rc=%Rrc\n", cbWritten, rc));
-    return rc;
-}
-
-/**
- * @interface_method_impl{HDACODEC,pfnReset}
- */
-static DECLCALLBACK(int) hdaCodecReset(PHDACODEC pCodec)
-{
-    PHDASTATE pThis = pCodec->pHDAState;
-    NOREF(pThis);
-    return VINF_SUCCESS;
-}
-
-
-static DECLCALLBACK(void) hdaCloseIn(PHDASTATE pThis, PDMAUDIORECSOURCE enmRecSource)
-{
-    NOREF(pThis);
-    NOREF(enmRecSource);
-    LogFlowFuncEnter();
-}
-
-static DECLCALLBACK(void) hdaCloseOut(PHDASTATE pThis)
-{
-    NOREF(pThis);
-    LogFlowFuncEnter();
-}
-
-static DECLCALLBACK(int) hdaOpenIn(PHDASTATE pThis,
-                                   const char *pszName, PDMAUDIORECSOURCE enmRecSource,
-                                   PPDMAUDIOSTREAMCFG pCfg)
-{
-    PAUDMIXSINK pSink;
-
-    switch (enmRecSource)
-    {
-# ifdef VBOX_WITH_HDA_MIC_IN
-        case PDMAUDIORECSOURCE_MIC:
-            pSink = pThis->pSinkMicIn;
-            break;
-# endif
-        case PDMAUDIORECSOURCE_LINE_IN:
-            pSink = pThis->pSinkLineIn;
-            break;
-        default:
-            AssertMsgFailed(("Audio source %ld not supported\n", enmRecSource));
-            return VERR_NOT_SUPPORTED;
-    }
-
-    int rc = VINF_SUCCESS;
-    char *pszDesc;
-
-    PHDADRIVER pDrv;
-    RTListForEach(&pThis->lstDrv, pDrv, HDADRIVER, Node)
-    {
-        if (RTStrAPrintf(&pszDesc, "[LUN#%RU8] %s", pDrv->uLUN, pszName) <= 0)
-        {
-            rc = VERR_NO_MEMORY;
-            break;
-        }
-
-        rc = pDrv->pConnector->pfnCreateIn(pDrv->pConnector, pszDesc, enmRecSource, pCfg, &pDrv->LineIn.pStrmIn);
-        LogFlowFunc(("LUN#%RU8: Created input \"%s\", with rc=%Rrc\n", pDrv->uLUN, pszDesc, rc));
-        if (rc == VINF_SUCCESS) /* Note: Could return VWRN_ALREADY_EXISTS. */
-        {
-            AudioMixerRemoveStream(pSink, pDrv->LineIn.phStrmIn);
-            rc = AudioMixerAddStreamIn(pSink,
-                                       pDrv->pConnector, pDrv->LineIn.pStrmIn,
-                                       0 /* uFlags */, &pDrv->LineIn.phStrmIn);
-        }
-
-        RTStrFree(pszDesc);
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(int) hdaOpenOut(PHDASTATE pThis,
-                                    const char *pszName, PPDMAUDIOSTREAMCFG pCfg)
-{
-    int rc = VINF_SUCCESS;
-    char *pszDesc;
-
-    PHDADRIVER pDrv;
-    RTListForEach(&pThis->lstDrv, pDrv, HDADRIVER, Node)
-    {
-        if (RTStrAPrintf(&pszDesc, "[LUN#%RU8] %s (%RU32Hz, %RU8 %s)",
-                         pDrv->uLUN, pszName, pCfg->uHz, pCfg->cChannels, pCfg->cChannels > 1 ? "Channels" : "Channel") <= 0)
-        {
-            rc = VERR_NO_MEMORY;
-            break;
-        }
-
-        rc = pDrv->pConnector->pfnCreateOut(pDrv->pConnector, pszDesc, pCfg, &pDrv->Out.pStrmOut);
-        LogFlowFunc(("LUN#%RU8: Created output \"%s\", with rc=%Rrc\n", pDrv->uLUN, pszDesc, rc));
-        if (rc == VINF_SUCCESS) /* Note: Could return VWRN_ALREADY_EXISTS. */
-        {
-            AudioMixerRemoveStream(pThis->pSinkOutput, pDrv->Out.phStrmOut);
-            rc = AudioMixerAddStreamOut(pThis->pSinkOutput,
-                                        pDrv->pConnector, pDrv->Out.pStrmOut,
-                                        0 /* uFlags */, &pDrv->Out.phStrmOut);
-        }
-
-        RTStrFree(pszDesc);
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(int) hdaSetVolume(PHDASTATE pThis, ENMSOUNDSOURCE enmSource,
-                                      bool fMute, uint8_t uVolLeft, uint8_t uVolRight)
-{
-    int             rc = VINF_SUCCESS;
-    PDMAUDIOVOLUME  vol = { fMute, uVolLeft, uVolRight };
-    PAUDMIXSINK     pSink;
-
-    /* Convert the audio source to corresponding sink. */
-    switch (enmSource)
-    {
-        case PO_INDEX:
-            pSink = pThis->pSinkOutput;
-            break;
-        case PI_INDEX:
-            pSink = pThis->pSinkLineIn;
-            break;
-        case MC_INDEX:
-            pSink = pThis->pSinkMicIn;
-            break;
-        default:
-            AssertFailedReturn(VERR_INVALID_PARAMETER);
-            break;
-    }
-
-    /* Set the volume. Codec already converted it to the correct range. */
-    AudioMixerSetSinkVolume(pSink, &vol);
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-#ifndef VBOX_WITH_AUDIO_CALLBACKS
-
-static DECLCALLBACK(void) hdaTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
-{
-    PHDASTATE pThis = (PHDASTATE)pvUser;
-    Assert(pThis == PDMINS_2_DATA(pDevIns, PHDASTATE));
-    AssertPtr(pThis);
-
-    STAM_PROFILE_START(&pThis->StatTimer, a);
-
-    uint32_t cbInMax  = 0;
-    uint32_t cbOutMin = UINT32_MAX;
-
-    PHDADRIVER pDrv;
-
-    uint64_t cTicksNow     = TMTimerGet(pTimer);
-    uint64_t cTicksElapsed = cTicksNow  - pThis->uTimerTS;
-    uint64_t cTicksPerSec  = TMTimerGetFreq(pTimer);
-
-    pThis->uTimerTS = cTicksNow;
-
-    /*
-     * Calculate the codec's (fixed) sampling rate.
-     */
-    AssertPtr(pThis->pCodec);
-    PDMPCMPROPS codecStrmProps;
-
-    int rc = DrvAudioStreamCfgToProps(&pThis->pCodec->strmCfg, &codecStrmProps);
-    AssertRC(rc);
-
-    uint32_t cCodecSamplesMin  = (int)((2 * cTicksElapsed * pThis->pCodec->strmCfg.uHz + cTicksPerSec) / cTicksPerSec / 2);
-    uint32_t cbCodecSamplesMin = cCodecSamplesMin << codecStrmProps.cShift;
-
-    /*
-     * Process all driver nodes.
-     */
-    RTListForEach(&pThis->lstDrv, pDrv, HDADRIVER, Node)
-    {
-        uint32_t cbIn = 0;
-        uint32_t cbOut = 0;
-
-        rc = pDrv->pConnector->pfnQueryStatus(pDrv->pConnector, &cbIn, &cbOut, NULL /* pcSamplesLive */);
-        if (RT_SUCCESS(rc))
-            rc = pDrv->pConnector->pfnPlayOut(pDrv->pConnector, NULL /* pcSamplesPlayed */);
-
-#ifdef DEBUG_TIMER
-        LogFlowFunc(("LUN#%RU8: rc=%Rrc, cbIn=%RU32, cbOut=%RU32\n", pDrv->uLUN, rc, cbIn, cbOut));
-#endif
-        /* If we there was an error handling (available) output or there simply is no output available,
-         * then calculate the minimum data rate which must be processed by the device emulation in order
-         * to function correctly.
-         *
-         * This is not the optimal solution, but as we have to deal with this on a timer-based approach
-         * (until we have the audio callbacks) we need to have device' DMA engines running. */
-        if (!pDrv->pConnector->pfnIsValidOut(pDrv->pConnector, pDrv->Out.pStrmOut))
-        {
-            /* Use the codec's (fixed) sampling rate. */
-            cbOut = RT_MAX(cbOut, cbCodecSamplesMin);
-            continue;
-        }
-
-        const bool fIsActiveOut = pDrv->pConnector->pfnIsActiveOut(pDrv->pConnector, pDrv->Out.pStrmOut);
-        if (   RT_FAILURE(rc)
-            || !fIsActiveOut)
-        {
-            uint32_t cSamplesMin  = (int)((2 * cTicksElapsed * pDrv->Out.pStrmOut->Props.uHz + cTicksPerSec) / cTicksPerSec / 2);
-            uint32_t cbSamplesMin = AUDIOMIXBUF_S2B(&pDrv->Out.pStrmOut->MixBuf, cSamplesMin);
-
-#ifdef DEBUG_TIMER
-            LogFlowFunc(("\trc=%Rrc, cSamplesMin=%RU32, cbSamplesMin=%RU32\n", rc, cSamplesMin, cbSamplesMin));
-#endif
-            cbOut = RT_MAX(cbOut, cbSamplesMin);
-        }
-
-        cbOutMin = RT_MIN(cbOutMin, cbOut);
-        cbInMax  = RT_MAX(cbInMax, cbIn);
-    }
-
-#ifdef DEBUG_TIMER
-    LogFlowFunc(("cbInMax=%RU32, cbOutMin=%RU32\n", cbInMax, cbOutMin));
-#endif
-
-    if (cbOutMin == UINT32_MAX)
-        cbOutMin = 0;
-
-    /* Do the actual device transfers. */
-    hdaTransfer(pThis, PO_INDEX, cbOutMin /* cbToProcess */, NULL /* pcbProcessed */);
-    hdaTransfer(pThis, PI_INDEX, cbInMax  /* cbToProcess */, NULL /* pcbProcessed */);
-
-    /* Kick the timer again. */
-    uint64_t cTicks = pThis->cTimerTicks;
-    /** @todo adjust cTicks down by now much cbOutMin represents. */
-    TMTimerSet(pThis->pTimer, cTicksNow + cTicks);
-
-    STAM_PROFILE_STOP(&pThis->StatTimer, a);
-}
-
-#else /* VBOX_WITH_AUDIO_CALLBACKS */
-
-static DECLCALLBACK(int) hdaCallbackInput(PDMAUDIOCALLBACKTYPE enmType, void *pvCtx, size_t cbCtx, void *pvUser, size_t cbUser)
-{
-    Assert(enmType == PDMAUDIOCALLBACKTYPE_INPUT);
-    AssertPtrReturn(pvCtx,  VERR_INVALID_POINTER);
-    AssertReturn(cbCtx,     VERR_INVALID_PARAMETER);
-    AssertPtrReturn(pvUser, VERR_INVALID_POINTER);
-    AssertReturn(cbUser,    VERR_INVALID_PARAMETER);
-
-    PHDACALLBACKCTX pCtx = (PHDACALLBACKCTX)pvCtx;
-    AssertReturn(cbCtx == sizeof(HDACALLBACKCTX), VERR_INVALID_PARAMETER);
-
-    PPDMAUDIOCALLBACKDATAIN pData = (PPDMAUDIOCALLBACKDATAIN)pvUser;
-    AssertReturn(cbUser == sizeof(PDMAUDIOCALLBACKDATAIN), VERR_INVALID_PARAMETER);
-
-    return hdaTransfer(pCtx->pThis, PI_INDEX, UINT32_MAX, &pData->cbOutRead);
-}
-
-static DECLCALLBACK(int) hdaCallbackOutput(PDMAUDIOCALLBACKTYPE enmType, void *pvCtx, size_t cbCtx, void *pvUser, size_t cbUser)
-{
-    Assert(enmType == PDMAUDIOCALLBACKTYPE_OUTPUT);
-    AssertPtrReturn(pvCtx,  VERR_INVALID_POINTER);
-    AssertReturn(cbCtx,     VERR_INVALID_PARAMETER);
-    AssertPtrReturn(pvUser, VERR_INVALID_POINTER);
-    AssertReturn(cbUser,    VERR_INVALID_PARAMETER);
-
-    PHDACALLBACKCTX pCtx = (PHDACALLBACKCTX)pvCtx;
-    AssertReturn(cbCtx == sizeof(HDACALLBACKCTX), VERR_INVALID_PARAMETER);
-
-    PPDMAUDIOCALLBACKDATAOUT pData = (PPDMAUDIOCALLBACKDATAOUT)pvUser;
-    AssertReturn(cbUser == sizeof(PDMAUDIOCALLBACKDATAOUT), VERR_INVALID_PARAMETER);
-
-    PHDASTATE pThis = pCtx->pThis;
-
-    int rc = hdaTransfer(pCtx->pThis, PO_INDEX, UINT32_MAX, &pData->cbOutWritten);
-    if (   RT_SUCCESS(rc)
-        && pData->cbOutWritten)
-    {
-        PHDADRIVER pDrv;
-        RTListForEach(&pThis->lstDrv, pDrv, HDADRIVER, Node)
-        {
-            uint32_t cSamplesPlayed;
-            int rc2 = pDrv->pConnector->pfnPlayOut(pDrv->pConnector, &cSamplesPlayed);
-            LogFlowFunc(("LUN#%RU8: cSamplesPlayed=%RU32, rc=%Rrc\n", pDrv->uLUN, cSamplesPlayed, rc2));
-        }
-    }
-}
-#endif /* VBOX_WITH_AUDIO_CALLBACKS */
-
-static int hdaTransfer(PHDASTATE pThis, ENMSOUNDSOURCE enmSrc, uint32_t cbToProcess, uint32_t *pcbProcessed)
-{
-    AssertPtrReturn(pThis, VERR_INVALID_POINTER);
-    /* pcbProcessed is optional. */
-
-    if (ASMAtomicReadBool(&pThis->fInReset)) /* HDA controller in reset mode? Bail out. */
-    {
-        LogFlowFunc(("In reset mode, skipping\n"));
-
-        if (pcbProcessed)
-            *pcbProcessed = 0;
-        return VINF_SUCCESS;
-    }
-
-    PHDASTREAM pStrmSt;
-    switch (enmSrc)
-    {
-        case PI_INDEX:
-        {
-            pStrmSt = &pThis->StrmStLineIn;
-            break;
-        }
-
-#ifdef VBOX_WITH_HDA_MIC_IN
-        case MC_INDEX:
-        {
-            pStrmSt = &pThis->StrmStMicIn;
-            break;
-        }
-#endif
-        case PO_INDEX:
-        {
-            pStrmSt = &pThis->StrmStOut;
-            break;
-        }
-
-        default:
-        {
-            AssertMsgFailed(("Unknown source index %ld\n", enmSrc));
-            return VERR_NOT_SUPPORTED;
-        }
-    }
-
-    int  rc       = VINF_SUCCESS;
-    bool fProceed = true;
-
-    /* Stop request received? */
-    if (ASMAtomicReadBool(&pStrmSt->State.fDoStop))
-    {
-        pStrmSt->State.fActive = false;
-
-        rc = RTSemEventSignal(pStrmSt->State.hStateChangedEvent);
-        AssertRC(rc);
-
-        fProceed = false;
-    }
-    /* Is the stream not in a running state currently? */
-    else if (!(HDA_STREAM_REG(pThis, CTL, pStrmSt->u8Strm) & HDA_REG_FIELD_FLAG_MASK(SDCTL, RUN)))
-        fProceed = false;
-    /* Nothing to process? */
-    else if (!cbToProcess)
-        fProceed = false;
-
-    if (!fProceed)
-    {
-        if (pcbProcessed)
-            *pcbProcessed = 0;
-        return VINF_SUCCESS;
-    }
-
-    LogFlowFunc(("enmSrc=%RU32, cbToProcess=%RU32\n", enmSrc, cbToProcess));
-
-    /* Sanity checks. */
-    Assert(pStrmSt->u8Strm <= 7); /** @todo Use a define for MAX_STREAMS! */
-    Assert(pStrmSt->u64BDLBase);
-    Assert(pStrmSt->u32CBL);
-
-    /* State sanity checks. */
-    Assert(ASMAtomicReadBool(&pStrmSt->State.fInReset) == false);
-
-    uint32_t cbProcessedTotal = 0;
-    bool     fIsComplete      = false;
-
-    while (cbToProcess)
-    {
-        /* Do we need to fetch the next Buffer Descriptor Entry (BDLE)? */
-        if (hdaStreamNeedsNextBDLE(pThis, pStrmSt))
-            hdaStreamGetNextBDLE(pThis, pStrmSt);
-
-        /* Set the FIFORDY bit on the stream while doing the transfer. */
-        HDA_STREAM_REG(pThis, STS, pStrmSt->u8Strm) |= HDA_REG_FIELD_FLAG_MASK(SDSTS, FIFORDY);
-
-        uint32_t cbProcessed;
-        switch (enmSrc)
-        {
-            case PI_INDEX:
-                rc = hdaReadAudio(pThis, pStrmSt, pThis->pSinkLineIn, cbToProcess, &cbProcessed);
-                break;
-            case PO_INDEX:
-                rc = hdaWriteAudio(pThis, pStrmSt, cbToProcess, &cbProcessed);
-                break;
-#ifdef VBOX_WITH_HDA_MIC_IN
-            case MC_INDEX:
-                rc = hdaReadAudio(pThis, pStrmSt, pThis->pSinkMicIn, cbToProcess, &cbProcessed);
-                break;
-#endif
-            default:
-                AssertMsgFailed(("Unsupported source index %ld\n", enmSrc));
-                rc = VERR_NOT_SUPPORTED;
-                break;
-        }
-
-        /* Remove the FIFORDY bit again. */
-        HDA_STREAM_REG(pThis, STS, pStrmSt->u8Strm) &= ~HDA_REG_FIELD_FLAG_MASK(SDSTS, FIFORDY);
-
-        if (RT_FAILURE(rc))
-            break;
-
-        hdaStreamTransferUpdate(pThis, pStrmSt, cbProcessed);
-
-        cbToProcess      -= RT_MIN(cbToProcess, cbProcessed);
-        cbProcessedTotal += cbProcessed;
-
-        LogFlowFunc(("cbProcessed=%RU32, cbToProcess=%RU32, cbProcessedTotal=%RU32, rc=%Rrc\n",
-                     cbProcessed, cbToProcess, cbProcessedTotal, rc));
-
-        if (rc == VINF_EOF)
-            fIsComplete = true;
-
-        if (!fIsComplete)
-            fIsComplete = hdaStreamTransferIsComplete(pThis, pStrmSt);
-
-        if (fIsComplete)
-            break;
-    }
-
-    if (RT_SUCCESS(rc))
-    {
-        if (pcbProcessed)
-            *pcbProcessed = cbProcessedTotal;
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-#endif /* IN_RING3 */
-
-/* MMIO callbacks */
-
-/**
- * @callback_method_impl{FNIOMMMIOREAD, Looks up and calls the appropriate handler.}
- *
- * @note During implementation, we discovered so-called "forgotten" or "hole"
- *       registers whose description is not listed in the RPM, datasheet, or
- *       spec.
- */
-PDMBOTHCBDECL(int) hdaMMIORead(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void *pv, unsigned cb)
-{
-    PHDASTATE   pThis  = PDMINS_2_DATA(pDevIns, PHDASTATE);
-    int         rc;
-
-    /*
-     * Look up and log.
-     */
-    uint32_t        offReg = GCPhysAddr - pThis->MMIOBaseAddr;
-    int             idxRegDsc = hdaRegLookup(pThis, offReg);    /* Register descriptor index. */
-#ifdef LOG_ENABLED
-    unsigned const  cbLog     = cb;
-    uint32_t        offRegLog = offReg;
-#endif
-
-    LogFunc(("offReg=%#x cb=%#x\n", offReg, cb));
-    Assert(cb == 4); Assert((offReg & 3) == 0);
-
-    if (pThis->fInReset && idxRegDsc != HDA_REG_GCTL)
-        LogFunc(("\tAccess to registers except GCTL is blocked while reset\n"));
-
-    if (idxRegDsc == -1)
-        LogRel(("HDA: Invalid read access @0x%x (bytes=%d)\n", offReg, cb));
-
-    if (idxRegDsc != -1)
-    {
-        /* ASSUMES gapless DWORD at end of map. */
-        if (g_aHdaRegMap[idxRegDsc].size == 4)
-        {
-            /*
-             * Straight forward DWORD access.
-             */
-            rc = g_aHdaRegMap[idxRegDsc].pfnRead(pThis, idxRegDsc, (uint32_t *)pv);
-            LogFunc(("\tRead %s => %x (%Rrc)\n", g_aHdaRegMap[idxRegDsc].abbrev, *(uint32_t *)pv, rc));
-        }
-        else
-        {
-            /*
-             * Multi register read (unless there are trailing gaps).
-             * ASSUMES that only DWORD reads have sideeffects.
-             */
-            uint32_t u32Value = 0;
-            unsigned cbLeft   = 4;
-            do
-            {
-                uint32_t const  cbReg        = g_aHdaRegMap[idxRegDsc].size;
-                uint32_t        u32Tmp       = 0;
-
-                rc = g_aHdaRegMap[idxRegDsc].pfnRead(pThis, idxRegDsc, &u32Tmp);
-                LogFunc(("\tRead %s[%db] => %x (%Rrc)*\n", g_aHdaRegMap[idxRegDsc].abbrev, cbReg, u32Tmp, rc));
-                if (rc != VINF_SUCCESS)
-                    break;
-                u32Value |= (u32Tmp & g_afMasks[cbReg]) << ((4 - cbLeft) * 8);
-
-                cbLeft -= cbReg;
-                offReg += cbReg;
-                idxRegDsc++;
-            } while (cbLeft > 0 && g_aHdaRegMap[idxRegDsc].offset == offReg);
-
-            if (rc == VINF_SUCCESS)
-                *(uint32_t *)pv = u32Value;
-            else
-                Assert(!IOM_SUCCESS(rc));
-        }
-    }
-    else
-    {
-        rc = VINF_IOM_MMIO_UNUSED_FF;
-        LogFunc(("\tHole at %x is accessed for read\n", offReg));
-    }
-
-    /*
-     * Log the outcome.
-     */
-#ifdef LOG_ENABLED
-    if (cbLog == 4)
-        LogFunc(("\tReturning @%#05x -> %#010x %Rrc\n", offRegLog, *(uint32_t *)pv, rc));
-    else if (cbLog == 2)
-        LogFunc(("\tReturning @%#05x -> %#06x %Rrc\n", offRegLog, *(uint16_t *)pv, rc));
-    else if (cbLog == 1)
-        LogFunc(("\tReturning @%#05x -> %#04x %Rrc\n", offRegLog, *(uint8_t *)pv, rc));
-#endif
-    return rc;
-}
-
-
-DECLINLINE(int) hdaWriteReg(PHDASTATE pThis, int idxRegDsc, uint32_t u32Value, char const *pszLog)
-{
-    if (pThis->fInReset && idxRegDsc != HDA_REG_GCTL)
-    {
-        LogRel2(("HDA: Access to register 0x%x is blocked while reset\n", idxRegDsc));
-        return VINF_SUCCESS;
-    }
-
-    uint32_t idxRegMem = g_aHdaRegMap[idxRegDsc].mem_idx;
-#ifdef LOG_ENABLED
-    uint32_t const u32CurValue = pThis->au32Regs[idxRegMem];
-#endif
-    int rc = g_aHdaRegMap[idxRegDsc].pfnWrite(pThis, idxRegDsc, u32Value);
-    LogFunc(("write %#x -> %s[%db]; %x => %x%s\n", u32Value, g_aHdaRegMap[idxRegDsc].abbrev,
-             g_aHdaRegMap[idxRegDsc].size, u32CurValue, pThis->au32Regs[idxRegMem], pszLog));
-    return rc;
-}
-
-
-/**
- * @callback_method_impl{FNIOMMMIOWRITE, Looks up and calls the appropriate handler.}
- */
-PDMBOTHCBDECL(int) hdaMMIOWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void const *pv, unsigned cb)
-{
-    PHDASTATE pThis  = PDMINS_2_DATA(pDevIns, PHDASTATE);
-    int       rc;
-
-    /*
-     * The behavior of accesses that aren't aligned on natural boundraries is
-     * undefined. Just reject them outright.
-     */
-    /** @todo IOM could check this, it could also split the 8 byte accesses for us. */
-    Assert(cb == 1 || cb == 2 || cb == 4 || cb == 8);
-    if (GCPhysAddr & (cb - 1))
-        return PDMDevHlpDBGFStop(pDevIns, RT_SRC_POS, "misaligned write access: GCPhysAddr=%RGp cb=%u\n", GCPhysAddr, cb);
-
-    /*
-     * Look up and log the access.
-     */
-    uint32_t    offReg = GCPhysAddr - pThis->MMIOBaseAddr;
-    int         idxRegDsc = hdaRegLookup(pThis, offReg);
-    uint32_t    idxRegMem = idxRegDsc != -1 ? g_aHdaRegMap[idxRegDsc].mem_idx : UINT32_MAX;
-    uint64_t    u64Value;
-    if (cb == 4)        u64Value = *(uint32_t const *)pv;
-    else if (cb == 2)   u64Value = *(uint16_t const *)pv;
-    else if (cb == 1)   u64Value = *(uint8_t const *)pv;
-    else if (cb == 8)   u64Value = *(uint64_t const *)pv;
-    else
-    {
-        u64Value = 0;   /* shut up gcc. */
-        AssertReleaseMsgFailed(("%u\n", cb));
-    }
-
-#ifdef LOG_ENABLED
-    uint32_t const u32LogOldValue = idxRegDsc >= 0 ? pThis->au32Regs[idxRegMem] : UINT32_MAX;
-    if (idxRegDsc == -1)
-        LogFunc(("@%#05x u32=%#010x cb=%d\n", offReg, *(uint32_t const *)pv, cb));
-    else if (cb == 4)
-        LogFunc(("@%#05x u32=%#010x %s\n", offReg, *(uint32_t *)pv, g_aHdaRegMap[idxRegDsc].abbrev));
-    else if (cb == 2)
-        LogFunc(("@%#05x u16=%#06x (%#010x) %s\n", offReg, *(uint16_t *)pv, *(uint32_t *)pv, g_aHdaRegMap[idxRegDsc].abbrev));
-    else if (cb == 1)
-        LogFunc(("@%#05x u8=%#04x (%#010x) %s\n", offReg, *(uint8_t *)pv, *(uint32_t *)pv, g_aHdaRegMap[idxRegDsc].abbrev));
-
-    if (idxRegDsc >= 0 && g_aHdaRegMap[idxRegDsc].size != cb)
-        LogFunc(("\tsize=%RU32 != cb=%u!!\n", g_aHdaRegMap[idxRegDsc].size, cb));
-#endif
-
-    /*
-     * Try for a direct hit first.
-     */
-    if (idxRegDsc != -1 && g_aHdaRegMap[idxRegDsc].size == cb)
-    {
-        rc = hdaWriteReg(pThis, idxRegDsc, u64Value, "");
-#ifdef LOG_ENABLED
-        LogFunc(("\t%#x -> %#x\n", u32LogOldValue, idxRegMem != UINT32_MAX ? pThis->au32Regs[idxRegMem] : UINT32_MAX));
-#endif
-    }
-    /*
-     * Partial or multiple register access, loop thru the requested memory.
-     */
-    else
-    {
-        /*
-         * If it's an access beyond the start of the register, shift the input
-         * value and fill in missing bits. Natural alignment rules means we
-         * will only see 1 or 2 byte accesses of this kind, so no risk of
-         * shifting out input values.
-         */
-        if (idxRegDsc == -1 && (idxRegDsc = hdaRegLookupWithin(pThis, offReg)) != -1)
-        {
-            uint32_t const cbBefore = offReg - g_aHdaRegMap[idxRegDsc].offset; Assert(cbBefore > 0 && cbBefore < 4);
-            offReg    -= cbBefore;
-            idxRegMem = g_aHdaRegMap[idxRegDsc].mem_idx;
-            u64Value <<= cbBefore * 8;
-            u64Value  |= pThis->au32Regs[idxRegMem] & g_afMasks[cbBefore];
-            LogFunc(("\tWithin register, supplied %u leading bits: %#llx -> %#llx ...\n",
-                     cbBefore * 8, ~g_afMasks[cbBefore] & u64Value, u64Value));
-        }
-
-        /* Loop thru the write area, it may cover multiple registers. */
-        rc = VINF_SUCCESS;
-        for (;;)
-        {
-            uint32_t cbReg;
-            if (idxRegDsc != -1)
-            {
-                idxRegMem = g_aHdaRegMap[idxRegDsc].mem_idx;
-                cbReg = g_aHdaRegMap[idxRegDsc].size;
-                if (cb < cbReg)
-                {
-                    u64Value |= pThis->au32Regs[idxRegMem] & g_afMasks[cbReg] & ~g_afMasks[cb];
-                    LogFunc(("\tSupplying missing bits (%#x): %#llx -> %#llx ...\n",
-                             g_afMasks[cbReg] & ~g_afMasks[cb], u64Value & g_afMasks[cb], u64Value));
-                }
-                uint32_t u32LogOldVal = pThis->au32Regs[idxRegMem];
-                rc = hdaWriteReg(pThis, idxRegDsc, u64Value, "*");
-                LogFunc(("\t%#x -> %#x\n", u32LogOldVal, pThis->au32Regs[idxRegMem]));
-            }
-            else
-            {
-                LogRel(("HDA: Invalid write access @0x%x\n", offReg));
-                cbReg = 1;
-            }
-            if (rc != VINF_SUCCESS)
-                break;
-            if (cbReg >= cb)
-                break;
-
-            /* Advance. */
-            offReg += cbReg;
-            cb     -= cbReg;
-            u64Value >>= cbReg * 8;
-            if (idxRegDsc == -1)
-                idxRegDsc = hdaRegLookup(pThis, offReg);
-            else
-            {
-                idxRegDsc++;
-                if (   (unsigned)idxRegDsc >= RT_ELEMENTS(g_aHdaRegMap)
-                    || g_aHdaRegMap[idxRegDsc].offset != offReg)
-                {
-                    idxRegDsc = -1;
-                }
-            }
-        }
-    }
-
-    return rc;
-}
-
-
-/* PCI callback. */
-
-#ifdef IN_RING3
-/**
- * @callback_method_impl{FNPCIIOREGIONMAP}
- */
-static DECLCALLBACK(int) hdaPciIoRegionMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, uint32_t cb,
-                                           PCIADDRESSSPACE enmType)
-{
-    PPDMDEVINS  pDevIns = pPciDev->pDevIns;
-    PHDASTATE   pThis = RT_FROM_MEMBER(pPciDev, HDASTATE, PciDev);
-    RTIOPORT    Port = (RTIOPORT)GCPhysAddress;
-    int         rc;
-
-    /*
-     * 18.2 of the ICH6 datasheet defines the valid access widths as byte, word, and double word.
-     *
-     * Let IOM talk DWORDs when reading, saves a lot of complications. On
-     * writing though, we have to do it all ourselves because of sideeffects.
-     */
-    Assert(enmType == PCI_ADDRESS_SPACE_MEM);
-    rc = PDMDevHlpMMIORegister(pDevIns, GCPhysAddress, cb, NULL /*pvUser*/,
-                                 IOMMMIO_FLAGS_READ_DWORD
-                               | IOMMMIO_FLAGS_WRITE_PASSTHRU,
-                               hdaMMIOWrite, hdaMMIORead, "HDA");
-
-    if (RT_FAILURE(rc))
-        return rc;
-
-    if (pThis->fR0Enabled)
-    {
-        rc = PDMDevHlpMMIORegisterR0(pDevIns, GCPhysAddress, cb, NIL_RTR0PTR /*pvUser*/,
-                                     "hdaMMIOWrite", "hdaMMIORead");
-        if (RT_FAILURE(rc))
-            return rc;
-    }
-
-    if (pThis->fRCEnabled)
-    {
-        rc = PDMDevHlpMMIORegisterRC(pDevIns, GCPhysAddress, cb, NIL_RTRCPTR /*pvUser*/,
-                                     "hdaMMIOWrite", "hdaMMIORead");
-        if (RT_FAILURE(rc))
-            return rc;
-    }
-
-    pThis->MMIOBaseAddr = GCPhysAddress;
-    return VINF_SUCCESS;
-}
-
-
-/* Saved state callbacks. */
-
-static int hdaSaveStream(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, PHDASTREAM pStrm)
-{
-    PHDASTATE pThis = PDMINS_2_DATA(pDevIns, PHDASTATE);
-
-    LogFlowFunc(("[SD%RU8]\n", pStrm->u8Strm));
-
-    /* Save stream ID. */
-    int rc = SSMR3PutU8(pSSM, pStrm->u8Strm);
-    AssertRCReturn(rc, rc);
-    Assert(pStrm->u8Strm <= 7); /** @todo Use a define. */
-
-    rc = SSMR3PutStructEx(pSSM, &pStrm->State, sizeof(HDASTREAMSTATE), 0 /*fFlags*/, g_aSSMStreamStateFields6, NULL);
-    AssertRCReturn(rc, rc);
-
-#ifdef DEBUG /* Sanity checks. */
-    uint64_t u64BaseDMA = RT_MAKE_U64(HDA_STREAM_REG(pThis, BDPL, pStrm->u8Strm),
-                                      HDA_STREAM_REG(pThis, BDPU, pStrm->u8Strm));
-    uint16_t u16LVI     = HDA_STREAM_REG(pThis, LVI, pStrm->u8Strm);
-    uint32_t u32CBL     = HDA_STREAM_REG(pThis, CBL, pStrm->u8Strm);
-
-    hdaBDLEDumpAll(pThis, u64BaseDMA, u16LVI + 1);
-
-    Assert(u64BaseDMA == pStrm->u64BDLBase);
-    Assert(u16LVI     == pStrm->u16LVI);
-    Assert(u32CBL     == pStrm->u32CBL);
-#endif
-
-    rc = SSMR3PutStructEx(pSSM, &pStrm->State.BDLE, sizeof(HDABDLE),
-                          0 /*fFlags*/, g_aSSMBDLEFields6, NULL);
-    AssertRCReturn(rc, rc);
-
-    rc = SSMR3PutStructEx(pSSM, &pStrm->State.BDLE.State, sizeof(HDABDLESTATE),
-                          0 /*fFlags*/, g_aSSMBDLEStateFields6, NULL);
-    AssertRCReturn(rc, rc);
-
-#ifdef DEBUG /* Sanity checks. */
-    PHDABDLE pBDLE = &pStrm->State.BDLE;
-    if (u64BaseDMA)
-    {
-        Assert(pStrm->State.uCurBDLE <= u16LVI + 1);
-
-        HDABDLE curBDLE;
-        rc = hdaBDLEFetch(pThis, &curBDLE, u64BaseDMA, pStrm->State.uCurBDLE);
-        AssertRC(rc);
-
-        Assert(curBDLE.u32BufSize       == pBDLE->u32BufSize);
-        Assert(curBDLE.u64BufAdr        == pBDLE->u64BufAdr);
-        Assert(curBDLE.fIntOnCompletion == pBDLE->fIntOnCompletion);
-    }
-    else
-    {
-        Assert(pBDLE->u64BufAdr  == 0);
-        Assert(pBDLE->u32BufSize == 0);
-    }
-#endif
-    return rc;
-}
-
-/**
- * @callback_method_impl{FNSSMDEVSAVEEXEC}
- */
-static DECLCALLBACK(int) hdaSaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
-{
-    PHDASTATE pThis = PDMINS_2_DATA(pDevIns, PHDASTATE);
-
-    /* Save Codec nodes states. */
-    hdaCodecSaveState(pThis->pCodec, pSSM);
-
-    /* Save MMIO registers. */
-    AssertCompile(RT_ELEMENTS(pThis->au32Regs) >= HDA_NREGS_SAVED);
-    SSMR3PutU32(pSSM, RT_ELEMENTS(pThis->au32Regs));
-    SSMR3PutMem(pSSM, pThis->au32Regs, sizeof(pThis->au32Regs));
-
-    /* Save number of streams. */
-#ifdef VBOX_WITH_HDA_MIC_IN
-    SSMR3PutU32(pSSM, 3);
-#else
-    SSMR3PutU32(pSSM, 2);
-#endif
-
-    /* Save stream states. */
-    int rc = hdaSaveStream(pDevIns, pSSM, &pThis->StrmStOut);
-    AssertRCReturn(rc, rc);
-#ifdef VBOX_WITH_HDA_MIC_IN
-    rc = hdaSaveStream(pDevIns, pSSM, &pThis->StrmStMicIn);
-    AssertRCReturn(rc, rc);
-#endif
-    rc = hdaSaveStream(pDevIns, pSSM, &pThis->StrmStLineIn);
-    AssertRCReturn(rc, rc);
-
-    return rc;
-}
-
-
-/**
- * @callback_method_impl{FNSSMDEVLOADEXEC}
- */
-static DECLCALLBACK(int) hdaLoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass)
-{
-    PHDASTATE pThis = PDMINS_2_DATA(pDevIns, PHDASTATE);
-
-    Assert(uPass == SSM_PASS_FINAL); NOREF(uPass);
-
-    LogRel2(("hdaLoadExec: uVersion=%RU32, uPass=0x%x\n", uVersion, uPass));
-
-    /*
-     * Load Codec nodes states.
-     */
-    int rc = hdaCodecLoadState(pThis->pCodec, pSSM, uVersion);
-    if (RT_FAILURE(rc))
-    {
-        LogRel(("HDA: Failed loading codec state (version %RU32, pass 0x%x), rc=%Rrc\n", uVersion, uPass, rc));
-        return rc;
-    }
-
-    /*
-     * Load MMIO registers.
-     */
-    uint32_t cRegs;
-    switch (uVersion)
-    {
-        case HDA_SSM_VERSION_1:
-            /* Starting with r71199, we would save 112 instead of 113
-               registers due to some code cleanups.  This only affected trunk
-               builds in the 4.1 development period. */
-            cRegs = 113;
-            if (SSMR3HandleRevision(pSSM) >= 71199)
-            {
-                uint32_t uVer = SSMR3HandleVersion(pSSM);
-                if (   VBOX_FULL_VERSION_GET_MAJOR(uVer) == 4
-                    && VBOX_FULL_VERSION_GET_MINOR(uVer) == 0
-                    && VBOX_FULL_VERSION_GET_BUILD(uVer) >= 51)
-                    cRegs = 112;
-            }
-            break;
-
-        case HDA_SSM_VERSION_2:
-        case HDA_SSM_VERSION_3:
-            cRegs = 112;
-            AssertCompile(RT_ELEMENTS(pThis->au32Regs) >= HDA_NREGS_SAVED);
-            break;
-
-        /* Since version 4 we store the register count to stay flexible. */
-        case HDA_SSM_VERSION_4:
-        case HDA_SSM_VERSION_5:
-        case HDA_SSM_VERSION:
-            rc = SSMR3GetU32(pSSM, &cRegs); AssertRCReturn(rc, rc);
-            if (cRegs != RT_ELEMENTS(pThis->au32Regs))
-                LogRel(("HDA: SSM version cRegs is %RU32, expected %RU32\n", cRegs, RT_ELEMENTS(pThis->au32Regs)));
-            break;
-
-        default:
-            LogRel(("HDA: Unsupported / too new saved state version (%RU32)\n", uVersion));
-            return VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION;
-    }
-
-    if (cRegs >= RT_ELEMENTS(pThis->au32Regs))
-    {
-        SSMR3GetMem(pSSM, pThis->au32Regs, sizeof(pThis->au32Regs));
-        SSMR3Skip(pSSM, sizeof(uint32_t) * (cRegs - RT_ELEMENTS(pThis->au32Regs)));
-    }
-    else
-        SSMR3GetMem(pSSM, pThis->au32Regs, sizeof(uint32_t) * cRegs);
-
-    /*
-     * Note: Saved states < v5 store LVI (u32BdleMaxCvi) for
-     *       *every* BDLE state, whereas it only needs to be stored
-     *       *once* for every stream. Most of the BDLE state we can
-     *       get out of the registers anyway, so just ignore those values.
-     *
-     *       Also, only the current BDLE was saved, regardless whether
-     *       there were more than one (and there are at least two entries,
-     *       according to the spec).
-     */
-#define HDA_SSM_LOAD_BDLE_STATE_PRE_V5(v, x)                            \
-    rc = SSMR3Skip(pSSM, sizeof(uint32_t));        /* Begin marker */   \
-    AssertRCReturn(rc, rc);                                             \
-    rc = SSMR3GetU64(pSSM, &x.u64BufAdr);          /* u64BdleCviAddr */ \
-    AssertRCReturn(rc, rc);                                             \
-    rc = SSMR3Skip(pSSM, sizeof(uint32_t));        /* u32BdleMaxCvi */  \
-    AssertRCReturn(rc, rc);                                             \
-    rc = SSMR3GetU32(pSSM, &x.State.u32BDLIndex);  /* u32BdleCvi */     \
-    AssertRCReturn(rc, rc);                                             \
-    rc = SSMR3GetU32(pSSM, &x.u32BufSize);         /* u32BdleCviLen */  \
-    AssertRCReturn(rc, rc);                                             \
-    rc = SSMR3GetU32(pSSM, &x.State.u32BufOff);    /* u32BdleCviPos */  \
-    AssertRCReturn(rc, rc);                                             \
-    rc = SSMR3GetBool(pSSM, &x.fIntOnCompletion);  /* fBdleCviIoc */    \
-    AssertRCReturn(rc, rc);                                             \
-    rc = SSMR3GetU32(pSSM, &x.State.cbBelowFIFOW); /* cbUnderFifoW */   \
-    AssertRCReturn(rc, rc);                                             \
-    rc = SSMR3GetMem(pSSM, &x.State.au8FIFO, sizeof(x.State.au8FIFO));  \
-    AssertRCReturn(rc, rc);                                             \
-    rc = SSMR3Skip(pSSM, sizeof(uint32_t));        /* End marker */     \
-    AssertRCReturn(rc, rc);                                             \
-
-    /*
-     * Load BDLEs (Buffer Descriptor List Entries) and DMA counters.
-     */
-    switch (uVersion)
-    {
-        case HDA_SSM_VERSION_1:
-        case HDA_SSM_VERSION_2:
-        case HDA_SSM_VERSION_3:
-        case HDA_SSM_VERSION_4:
-        {
-            /* Only load the internal states.
-             * The rest will be initialized from the saved registers later. */
-
-            /* Note 1: Only the *current* BDLE for a stream was saved! */
-            /* Note 2: The stream's saving order is/was fixed, so don't touch! */
-
-            /* Output */
-            rc = hdaStreamInit(pThis, &pThis->StrmStOut,    4 /* Stream number, hardcoded */);
-            if (RT_FAILURE(rc))
-                break;
-            HDA_SSM_LOAD_BDLE_STATE_PRE_V5(uVersion, pThis->StrmStOut.State.BDLE);
-            pThis->StrmStOut.State.uCurBDLE = pThis->StrmStOut.State.BDLE.State.u32BDLIndex;
-
-            /* Microphone-In */
-            rc = hdaStreamInit(pThis, &pThis->StrmStMicIn,  2 /* Stream number, hardcoded */);
-            if (RT_FAILURE(rc))
-                break;
-            HDA_SSM_LOAD_BDLE_STATE_PRE_V5(uVersion, pThis->StrmStMicIn.State.BDLE);
-            pThis->StrmStMicIn.State.uCurBDLE = pThis->StrmStMicIn.State.BDLE.State.u32BDLIndex;
-
-            /* Line-In */
-            rc = hdaStreamInit(pThis, &pThis->StrmStLineIn, 0 /* Stream number, hardcoded */);
-            if (RT_FAILURE(rc))
-                break;
-            HDA_SSM_LOAD_BDLE_STATE_PRE_V5(uVersion, pThis->StrmStLineIn.State.BDLE);
-            pThis->StrmStLineIn.State.uCurBDLE = pThis->StrmStLineIn.State.BDLE.State.u32BDLIndex;
-            break;
-        }
-
-        /* Since v5 we support flexible stream and BDLE counts. */
-        case HDA_SSM_VERSION_5:
-        case HDA_SSM_VERSION:
-        {
-            uint32_t cStreams;
-            rc = SSMR3GetU32(pSSM, &cStreams);
-            if (RT_FAILURE(rc))
-                break;
-
-            LogRel2(("hdaLoadExec: cStreams=%RU32\n", cStreams));
-
-            /* Load stream states. */
-            for (uint32_t i = 0; i < cStreams; i++)
-            {
-                uint8_t uStreamID;
-                rc = SSMR3GetU8(pSSM, &uStreamID);
-                if (RT_FAILURE(rc))
-                    break;
-
-                PHDASTREAM pStrm = hdaStreamFromID(pThis, uStreamID);
-                HDASTREAM  StreamDummy;
-
-                if (!pStrm)
-                {
-                    pStrm = &StreamDummy;
-                    LogRel2(("HDA: Warning: Stream ID=%RU32 not supported, skipping to load ...\n", uStreamID));
-                    break;
-                }
-
-                RT_BZERO(pStrm, sizeof(HDASTREAM));
-
-                rc = hdaStreamInit(pThis, pStrm, uStreamID);
-                if (RT_FAILURE(rc))
-                {
-                    LogRel(("HDA: Stream #%RU32: Initialization of stream %RU8 failed, rc=%Rrc\n", i, uStreamID, rc));
-                    break;
-                }
-
-                if (uVersion == HDA_SSM_VERSION_5)
-                {
-                    /* Get the current BDLE entry and skip the rest. */
-                    uint16_t cBDLE;
-
-                    rc = SSMR3Skip(pSSM, sizeof(uint32_t)); /* Begin marker */
-                    AssertRC(rc);
-                    rc = SSMR3GetU16(pSSM, &cBDLE);                 /* cBDLE */
-                    AssertRC(rc);
-                    rc = SSMR3GetU16(pSSM, &pStrm->State.uCurBDLE); /* uCurBDLE */
-                    AssertRC(rc);
-                    rc = SSMR3Skip(pSSM, sizeof(uint32_t));         /* End marker */
-                    AssertRC(rc);
-
-                    uint32_t u32BDLEIndex;
-                    for (uint16_t a = 0; a < cBDLE; a++)
-                    {
-                        rc = SSMR3Skip(pSSM, sizeof(uint32_t)); /* Begin marker */
-                        AssertRC(rc);
-                        rc = SSMR3GetU32(pSSM, &u32BDLEIndex);  /* u32BDLIndex */
-                        AssertRC(rc);
-
-                        /* Does the current BDLE index match the current BDLE to process? */
-                        if (u32BDLEIndex == pStrm->State.uCurBDLE)
-                        {
-                            rc = SSMR3GetU32(pSSM, &pStrm->State.BDLE.State.cbBelowFIFOW); /* cbBelowFIFOW */
-                            AssertRC(rc);
-                            rc = SSMR3GetMem(pSSM,
-                                             &pStrm->State.BDLE.State.au8FIFO,
-                                             sizeof(pStrm->State.BDLE.State.au8FIFO));     /* au8FIFO */
-                            AssertRC(rc);
-                            rc = SSMR3GetU32(pSSM, &pStrm->State.BDLE.State.u32BufOff);    /* u32BufOff */
-                            AssertRC(rc);
-                            rc = SSMR3Skip(pSSM, sizeof(uint32_t));                        /* End marker */
-                            AssertRC(rc);
-                        }
-                        else /* Skip not current BDLEs. */
-                        {
-                            rc = SSMR3Skip(pSSM,   sizeof(uint32_t)      /* cbBelowFIFOW */
-                                                 + sizeof(uint8_t) * 256 /* au8FIFO */
-                                                 + sizeof(uint32_t)      /* u32BufOff */
-                                                 + sizeof(uint32_t));    /* End marker */
-                            AssertRC(rc);
-                        }
-                    }
-                }
-                else
-                {
-                    rc = SSMR3GetStructEx(pSSM, &pStrm->State, sizeof(HDASTREAMSTATE),
-                                          0 /* fFlags */, g_aSSMStreamStateFields6, NULL);
-                    if (RT_FAILURE(rc))
-                        break;
-
-                    rc = SSMR3GetStructEx(pSSM, &pStrm->State.BDLE, sizeof(HDABDLE),
-                                          0 /* fFlags */, g_aSSMBDLEFields6, NULL);
-                    if (RT_FAILURE(rc))
-                        break;
-
-                    rc = SSMR3GetStructEx(pSSM, &pStrm->State.BDLE.State, sizeof(HDABDLESTATE),
-                                          0 /* fFlags */, g_aSSMBDLEStateFields6, NULL);
-                    if (RT_FAILURE(rc))
-                        break;
-                }
-            }
-            break;
-        }
-
-        default:
-            AssertReleaseFailed(); /* Never reached. */
-            return VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION;
-    }
-
-#undef HDA_SSM_LOAD_BDLE_STATE_PRE_V5
-
-    if (RT_SUCCESS(rc))
-    {
-        /*
-         * Update stuff after the state changes.
-         */
-        bool fEnableIn    = RT_BOOL(HDA_SDCTL(pThis, 0 /** @todo Use a define. */) & HDA_REG_FIELD_FLAG_MASK(SDCTL, RUN));
-#ifdef VBOX_WITH_HDA_MIC_IN
-        bool fEnableMicIn = RT_BOOL(HDA_SDCTL(pThis, 2 /** @todo Use a define. */) & HDA_REG_FIELD_FLAG_MASK(SDCTL, RUN));
-#endif
-        bool fEnableOut   = RT_BOOL(HDA_SDCTL(pThis, 4 /** @todo Use a define. */) & HDA_REG_FIELD_FLAG_MASK(SDCTL, RUN));
-
-        PHDADRIVER pDrv;
-        RTListForEach(&pThis->lstDrv, pDrv, HDADRIVER, Node)
-        {
-            rc = pDrv->pConnector->pfnEnableIn(pDrv->pConnector, pDrv->LineIn.pStrmIn, fEnableIn);
-            if (RT_FAILURE(rc))
-                break;
-#ifdef VBOX_WITH_HDA_MIC_IN
-            rc = pDrv->pConnector->pfnEnableIn(pDrv->pConnector, pDrv->MicIn.pStrmIn, fEnableMicIn);
-            if (RT_FAILURE(rc))
-                break;
-#endif
-            rc = pDrv->pConnector->pfnEnableOut(pDrv->pConnector, pDrv->Out.pStrmOut, fEnableOut);
-            if (RT_FAILURE(rc))
-                break;
-        }
-    }
-
-    if (RT_SUCCESS(rc))
-    {
-        pThis->u64CORBBase  = RT_MAKE_U64(HDA_REG(pThis, CORBLBASE), HDA_REG(pThis, CORBUBASE));
-        pThis->u64RIRBBase  = RT_MAKE_U64(HDA_REG(pThis, RIRBLBASE), HDA_REG(pThis, RIRBUBASE));
-        pThis->u64DPBase    = RT_MAKE_U64(HDA_REG(pThis, DPLBASE),   HDA_REG(pThis, DPUBASE));
-
-        /* Also make sure to update the DMA position bit if this was enabled when saving the state. */
-        pThis->fDMAPosition = RT_BOOL(HDA_REG(pThis, DPLBASE) & RT_BIT_32(0));
-    }
-    else
-        LogRel(("HDA: Failed loading device state (version %RU32, pass 0x%x), rc=%Rrc\n", uVersion, uPass, rc));
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-#ifdef DEBUG
-/* Debug and log type formatters. */
-
-/**
- * @callback_method_impl{FNRTSTRFORMATTYPE}
- */
-static DECLCALLBACK(size_t) hdaDbgFmtBDLE(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput,
-                                           const char *pszType, void const *pvValue,
-                                           int cchWidth, int cchPrecision, unsigned fFlags,
-                                           void *pvUser)
-{
-    PHDABDLE pBDLE = (PHDABDLE)pvValue;
-    return RTStrFormat(pfnOutput,  pvArgOutput, NULL, 0,
-                       "BDLE(idx:%RU32, off:%RU32, fifow:%RU32, DMA[%RU32 bytes @ 0x%x])",
-                       pBDLE->State.u32BDLIndex, pBDLE->State.u32BufOff, pBDLE->State.cbBelowFIFOW, pBDLE->u32BufSize, pBDLE->u64BufAdr);
-}
-
-/**
- * @callback_method_impl{FNRTSTRFORMATTYPE}
- */
-static DECLCALLBACK(size_t) hdaDbgFmtSDCTL(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput,
-                                           const char *pszType, void const *pvValue,
-                                           int cchWidth, int cchPrecision, unsigned fFlags,
-                                           void *pvUser)
-{
-    uint32_t uSDCTL = (uint32_t)(uintptr_t)pvValue;
-    return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0,
-                       "SDCTL(raw:%#x, DIR:%s, TP:%RTbool, STRIPE:%x, DEIE:%RTbool, FEIE:%RTbool, IOCE:%RTbool, RUN:%RTbool, RESET:%RTbool)",
-                       uSDCTL,
-                       (uSDCTL & HDA_REG_FIELD_FLAG_MASK(SDCTL, DIR)) ? "OUT" : "IN",
-                       RT_BOOL(uSDCTL & HDA_REG_FIELD_FLAG_MASK(SDCTL, TP)),
-                       (uSDCTL & HDA_REG_FIELD_MASK(SDCTL, STRIPE)) >> HDA_SDCTL_STRIPE_SHIFT,
-                       RT_BOOL(uSDCTL & HDA_REG_FIELD_FLAG_MASK(SDCTL, DEIE)),
-                       RT_BOOL(uSDCTL & HDA_REG_FIELD_FLAG_MASK(SDCTL, FEIE)),
-                       RT_BOOL(uSDCTL & HDA_REG_FIELD_FLAG_MASK(SDCTL, ICE)),
-                       RT_BOOL(uSDCTL & HDA_REG_FIELD_FLAG_MASK(SDCTL, RUN)),
-                       RT_BOOL(uSDCTL & HDA_REG_FIELD_FLAG_MASK(SDCTL, SRST)));
-}
-
-/**
- * @callback_method_impl{FNRTSTRFORMATTYPE}
- */
-static DECLCALLBACK(size_t) hdaDbgFmtSDFIFOS(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput,
-                                             const char *pszType, void const *pvValue,
-                                             int cchWidth, int cchPrecision, unsigned fFlags,
-                                             void *pvUser)
-{
-    uint32_t uSDFIFOS = (uint32_t)(uintptr_t)pvValue;
-    return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "SDFIFOS(raw:%#x, sdfifos:%RU8 B)", uSDFIFOS, hdaSDFIFOSToBytes(uSDFIFOS));
-}
-
-/**
- * @callback_method_impl{FNRTSTRFORMATTYPE}
- */
-static DECLCALLBACK(size_t) hdaDbgFmtSDFIFOW(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput,
-                                             const char *pszType, void const *pvValue,
-                                             int cchWidth, int cchPrecision, unsigned fFlags,
-                                             void *pvUser)
-{
-    uint32_t uSDFIFOW = (uint32_t)(uintptr_t)pvValue;
-    return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "SDFIFOW(raw: %#0x, sdfifow:%d B)", uSDFIFOW, hdaSDFIFOWToBytes(uSDFIFOW));
-}
-
-/**
- * @callback_method_impl{FNRTSTRFORMATTYPE}
- */
-static DECLCALLBACK(size_t) hdaDbgFmtSDSTS(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput,
-                                           const char *pszType, void const *pvValue,
-                                           int cchWidth, int cchPrecision, unsigned fFlags,
-                                           void *pvUser)
-{
-    uint32_t uSdSts = (uint32_t)(uintptr_t)pvValue;
-    return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0,
-                       "SDSTS(raw:%#0x, fifordy:%RTbool, dese:%RTbool, fifoe:%RTbool, bcis:%RTbool)",
-                       uSdSts,
-                       RT_BOOL(uSdSts & HDA_REG_FIELD_FLAG_MASK(SDSTS, FIFORDY)),
-                       RT_BOOL(uSdSts & HDA_REG_FIELD_FLAG_MASK(SDSTS, DE)),
-                       RT_BOOL(uSdSts & HDA_REG_FIELD_FLAG_MASK(SDSTS, FE)),
-                       RT_BOOL(uSdSts & HDA_REG_FIELD_FLAG_MASK(SDSTS, BCIS)));
-}
-
-static int hdaLookUpRegisterByName(PHDASTATE pThis, const char *pszArgs)
-{
-    int iReg = 0;
-    for (; iReg < HDA_NREGS; ++iReg)
-        if (!RTStrICmp(g_aHdaRegMap[iReg].abbrev, pszArgs))
-            return iReg;
-    return -1;
-}
-
-
-static void hdaDbgPrintRegister(PHDASTATE pThis, PCDBGFINFOHLP pHlp, int iHdaIndex)
-{
-    Assert(   pThis
-           && iHdaIndex >= 0
-           && iHdaIndex < HDA_NREGS);
-    pHlp->pfnPrintf(pHlp, "%s: 0x%x\n", g_aHdaRegMap[iHdaIndex].abbrev, pThis->au32Regs[g_aHdaRegMap[iHdaIndex].mem_idx]);
-}
-
-/**
- * @callback_method_impl{FNDBGFHANDLERDEV}
- */
-static DECLCALLBACK(void) hdaInfo(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
-{
-    PHDASTATE pThis = PDMINS_2_DATA(pDevIns, PHDASTATE);
-    int iHdaRegisterIndex = hdaLookUpRegisterByName(pThis, pszArgs);
-    if (iHdaRegisterIndex != -1)
-        hdaDbgPrintRegister(pThis, pHlp, iHdaRegisterIndex);
-    else
-        for(iHdaRegisterIndex = 0; (unsigned int)iHdaRegisterIndex < HDA_NREGS; ++iHdaRegisterIndex)
-            hdaDbgPrintRegister(pThis, pHlp, iHdaRegisterIndex);
-}
-
-static void hdaDbgPrintStream(PHDASTATE pThis, PCDBGFINFOHLP pHlp, int iHdaStrmIndex)
-{
-    Assert(   pThis
-           && iHdaStrmIndex >= 0
-           && iHdaStrmIndex < 7);
-    pHlp->pfnPrintf(pHlp, "Dump of %d HDA Stream:\n", iHdaStrmIndex);
-    pHlp->pfnPrintf(pHlp, "SD%dCTL: %R[sdctl]\n", iHdaStrmIndex, HDA_STREAM_REG(pThis, CTL, iHdaStrmIndex));
-    pHlp->pfnPrintf(pHlp, "SD%dCTS: %R[sdsts]\n", iHdaStrmIndex, HDA_STREAM_REG(pThis, STS, iHdaStrmIndex));
-    pHlp->pfnPrintf(pHlp, "SD%dFIFOS: %R[sdfifos]\n", iHdaStrmIndex, HDA_STREAM_REG(pThis, FIFOS, iHdaStrmIndex));
-    pHlp->pfnPrintf(pHlp, "SD%dFIFOW: %R[sdfifow]\n", iHdaStrmIndex, HDA_STREAM_REG(pThis, FIFOW, iHdaStrmIndex));
-}
-
-static int hdaLookUpStreamIndex(PHDASTATE pThis, const char *pszArgs)
-{
-    /* todo: add args parsing */
-    return -1;
-}
-
-/**
- * @callback_method_impl{FNDBGFHANDLERDEV}
- */
-static DECLCALLBACK(void) hdaInfoStream(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
-{
-    PHDASTATE   pThis         = PDMINS_2_DATA(pDevIns, PHDASTATE);
-    int         iHdaStrmIndex = hdaLookUpStreamIndex(pThis, pszArgs);
-    if (iHdaStrmIndex != -1)
-        hdaDbgPrintStream(pThis, pHlp, iHdaStrmIndex);
-    else
-        for(iHdaStrmIndex = 0; iHdaStrmIndex < 7; ++iHdaStrmIndex)
-            hdaDbgPrintStream(pThis, pHlp, iHdaStrmIndex);
-}
-
-/**
- * @callback_method_impl{FNDBGFHANDLERDEV}
- */
-static DECLCALLBACK(void) hdaInfoCodecNodes(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
-{
-    PHDASTATE pThis = PDMINS_2_DATA(pDevIns, PHDASTATE);
-
-    if (pThis->pCodec->pfnDbgListNodes)
-        pThis->pCodec->pfnDbgListNodes(pThis->pCodec, pHlp, pszArgs);
-    else
-        pHlp->pfnPrintf(pHlp, "Codec implementation doesn't provide corresponding callback\n");
-}
-
-/**
- * @callback_method_impl{FNDBGFHANDLERDEV}
- */
-static DECLCALLBACK(void) hdaInfoCodecSelector(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
-{
-    PHDASTATE pThis = PDMINS_2_DATA(pDevIns, PHDASTATE);
-
-    if (pThis->pCodec->pfnDbgSelector)
-        pThis->pCodec->pfnDbgSelector(pThis->pCodec, pHlp, pszArgs);
-    else
-        pHlp->pfnPrintf(pHlp, "Codec implementation doesn't provide corresponding callback\n");
-}
-
-/**
- * @callback_method_impl{FNDBGFHANDLERDEV}
- */
-static DECLCALLBACK(void) hdaInfoMixer(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
-{
-    PHDASTATE pThis = PDMINS_2_DATA(pDevIns, PHDASTATE);
-
-    if (pThis->pMixer)
-        AudioMixerDebug(pThis->pMixer, pHlp, pszArgs);
-    else
-        pHlp->pfnPrintf(pHlp, "Mixer not available\n");
-}
-#endif /* DEBUG */
-
-/* PDMIBASE */
-
-/**
- * @interface_method_impl{PDMIBASE,pfnQueryInterface}
- */
-static DECLCALLBACK(void *) hdaQueryInterface(struct PDMIBASE *pInterface, const char *pszIID)
-{
-    PHDASTATE pThis = RT_FROM_MEMBER(pInterface, HDASTATE, IBase);
-    Assert(&pThis->IBase == pInterface);
-
-    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->IBase);
-    return NULL;
-}
-
-
-/* PDMDEVREG */
-
-/**
- * Reset notification.
- *
- * @returns VBox status code.
- * @param   pDevIns     The device instance data.
- *
- * @remark  The original sources didn't install a reset handler, but it seems to
- *          make sense to me so we'll do it.
- */
-static DECLCALLBACK(void) hdaReset(PPDMDEVINS pDevIns)
-{
-    PHDASTATE pThis = PDMINS_2_DATA(pDevIns, PHDASTATE);
-
-    HDA_REG(pThis, GCAP)     = HDA_MAKE_GCAP(4,4,0,0,1); /* see 6.2.1 */
-    HDA_REG(pThis, VMIN)     = 0x00;                     /* see 6.2.2 */
-    HDA_REG(pThis, VMAJ)     = 0x01;                     /* see 6.2.3 */
-    HDA_REG(pThis, OUTPAY)   = 0x003C;                   /* see 6.2.4 */
-    HDA_REG(pThis, INPAY)    = 0x001D;                   /* see 6.2.5 */
-    HDA_REG(pThis, CORBSIZE) = 0x42;                     /* see 6.2.1 */
-    HDA_REG(pThis, RIRBSIZE) = 0x42;                     /* see 6.2.1 */
-    HDA_REG(pThis, CORBRP)   = 0x0;
-    HDA_REG(pThis, RIRBWP)   = 0x0;
-
-    LogFunc(("Resetting ...\n"));
-
-# ifndef VBOX_WITH_AUDIO_CALLBACKS
-    /*
-     * Stop the timer, if any.
-     */
-    int rc2;
-    if (pThis->pTimer)
-    {
-        rc2 = TMTimerStop(pThis->pTimer);
-        AssertRC(rc2);
-    }
-# endif
-
-    /*
-     * Stop any audio currently playing and/or recording.
-     */
-    PHDADRIVER pDrv;
-    RTListForEach(&pThis->lstDrv, pDrv, HDADRIVER, Node)
-    {
-        pDrv->pConnector->pfnEnableIn(pDrv->pConnector, pDrv->LineIn.pStrmIn, false /* Disable */);
-# ifdef VBOX_WITH_HDA_MIC_IN
-        /* Ignore rc. */
-        pDrv->pConnector->pfnEnableIn(pDrv->pConnector, pDrv->MicIn.pStrmIn, false /* Disable */);
-# endif
-        /* Ditto. */
-        pDrv->pConnector->pfnEnableOut(pDrv->pConnector, pDrv->Out.pStrmOut, false /* Disable */);
-        /* Ditto. */
-    }
-
-    pThis->cbCorbBuf = 256 * sizeof(uint32_t); /** @todo Use a define here. */
-
-    if (pThis->pu32CorbBuf)
-        RT_BZERO(pThis->pu32CorbBuf, pThis->cbCorbBuf);
-    else
-        pThis->pu32CorbBuf = (uint32_t *)RTMemAllocZ(pThis->cbCorbBuf);
-
-    pThis->cbRirbBuf = 256 * sizeof(uint64_t); /** @todo Use a define here. */
-    if (pThis->pu64RirbBuf)
-        RT_BZERO(pThis->pu64RirbBuf, pThis->cbRirbBuf);
-    else
-        pThis->pu64RirbBuf = (uint64_t *)RTMemAllocZ(pThis->cbRirbBuf);
-
-    pThis->u64BaseTS = PDMDevHlpTMTimeVirtGetNano(pDevIns);
-
-    for (uint8_t u8Strm = 0; u8Strm < 8; u8Strm++) /** @todo Use a define here. */
-    {
-        PHDASTREAM pStrmSt = NULL;
-        if (u8Strm == 0)      /** @todo Implement dynamic stream IDs. */
-            pStrmSt = &pThis->StrmStLineIn;
-# ifdef VBOX_WITH_HDA_MIC_IN
-        else if (u8Strm == 2) /** @todo Implement dynamic stream IDs. */
-            pStrmSt = &pThis->StrmStMicIn;
-# endif
-        else if (u8Strm == 4) /** @todo Implement dynamic stream IDs. */
-            pStrmSt = &pThis->StrmStOut;
-
-        if (pStrmSt)
-        {
-            /* Remove the RUN bit from SDnCTL in case the stream was in a running state before. */
-            HDA_STREAM_REG(pThis, CTL, u8Strm) &= ~HDA_REG_FIELD_FLAG_MASK(SDCTL, RUN);
-
-            hdaStreamReset(pThis, pStrmSt, u8Strm);
-        }
-    }
-
-    /* Emulation of codec "wake up" (HDA spec 5.5.1 and 6.5). */
-    HDA_REG(pThis, STATESTS) = 0x1;
-
-# ifndef VBOX_WITH_AUDIO_CALLBACKS
-    /*
-     * Start timer again, if any.
-     */
-    if (pThis->pTimer)
-    {
-        LogFunc(("Restarting timer\n"));
-        rc2 = TMTimerSet(pThis->pTimer, TMTimerGet(pThis->pTimer) + pThis->cTimerTicks);
-        AssertRC(rc2);
-    }
-# endif
-
-    LogRel(("HDA: Reset\n"));
-}
-
-/**
- * @interface_method_impl{PDMDEVREG,pfnDestruct}
- */
-static DECLCALLBACK(int) hdaDestruct(PPDMDEVINS pDevIns)
-{
-    PHDASTATE pThis = PDMINS_2_DATA(pDevIns, PHDASTATE);
-
-    PHDADRIVER pDrv;
-    while (!RTListIsEmpty(&pThis->lstDrv))
-    {
-        pDrv = RTListGetFirst(&pThis->lstDrv, HDADRIVER, Node);
-
-        RTListNodeRemove(&pDrv->Node);
-        RTMemFree(pDrv);
-    }
-
-    if (pThis->pMixer)
-    {
-        AudioMixerDestroy(pThis->pMixer);
-        pThis->pMixer = NULL;
-    }
-
-    if (pThis->pCodec)
-    {
-        int rc = hdaCodecDestruct(pThis->pCodec);
-        AssertRC(rc);
-
-        RTMemFree(pThis->pCodec);
-        pThis->pCodec = NULL;
-    }
-
-    RTMemFree(pThis->pu32CorbBuf);
-    pThis->pu32CorbBuf = NULL;
-
-    RTMemFree(pThis->pu64RirbBuf);
-    pThis->pu64RirbBuf = NULL;
-
-    hdaStreamDestroy(&pThis->StrmStLineIn);
-    hdaStreamDestroy(&pThis->StrmStMicIn);
-    hdaStreamDestroy(&pThis->StrmStOut);
-
-    return VINF_SUCCESS;
-}
-
-
-/**
- * Attach command, internal version.
- *
- * This is called to let the device attach to a driver for a specified LUN
- * during runtime. This is not called during VM construction, the device
- * constructor has to attach to all the available drivers.
- *
- * @returns VBox status code.
- * @param   pDevIns     The device instance.
- * @param   pDrv        Driver to (re-)use for (re-)attaching to.
- *                      If NULL is specified, a new driver will be created and appended
- *                      to the driver list.
- * @param   uLUN        The logical unit which is being detached.
- * @param   fFlags      Flags, combination of the PDMDEVATT_FLAGS_* \#defines.
- */
-static int hdaAttachInternal(PPDMDEVINS pDevIns, PHDADRIVER pDrv, unsigned uLUN, uint32_t fFlags)
-{
-    PHDASTATE pThis = PDMINS_2_DATA(pDevIns, PHDASTATE);
-
-    /*
-     * Attach driver.
-     */
-    char *pszDesc = NULL;
-    if (RTStrAPrintf(&pszDesc, "Audio driver port (HDA) for LUN#%u", uLUN) <= 0)
-        AssertReleaseMsgReturn(pszDesc,
-                               ("Not enough memory for HDA driver port description of LUN #%u\n", uLUN),
-                               VERR_NO_MEMORY);
-
-    PPDMIBASE pDrvBase;
-    int rc = PDMDevHlpDriverAttach(pDevIns, uLUN,
-                                   &pThis->IBase, &pDrvBase, pszDesc);
-    if (RT_SUCCESS(rc))
-    {
-        if (pDrv == NULL)
-            pDrv = (PHDADRIVER)RTMemAllocZ(sizeof(HDADRIVER));
-        if (pDrv)
-        {
-            pDrv->pDrvBase   = pDrvBase;
-            pDrv->pConnector = PDMIBASE_QUERY_INTERFACE(pDrvBase, PDMIAUDIOCONNECTOR);
-            AssertMsg(pDrv->pConnector != NULL, ("Configuration error: LUN#%u has no host audio interface, rc=%Rrc\n", uLUN, rc));
-            pDrv->pHDAState  = pThis;
-            pDrv->uLUN       = uLUN;
-
-            /*
-             * For now we always set the driver at LUN 0 as our primary
-             * host backend. This might change in the future.
-             */
-            if (pDrv->uLUN == 0)
-                pDrv->Flags |= PDMAUDIODRVFLAG_PRIMARY;
-
-            LogFunc(("LUN#%u: pCon=%p, drvFlags=0x%x\n", uLUN, pDrv->pConnector, pDrv->Flags));
-
-            /* Attach to driver list if not attached yet. */
-            if (!pDrv->fAttached)
-            {
-                RTListAppend(&pThis->lstDrv, &pDrv->Node);
-                pDrv->fAttached = true;
-            }
-        }
-        else
-            rc = VERR_NO_MEMORY;
-    }
-    else if (rc == VERR_PDM_NO_ATTACHED_DRIVER)
-        LogFunc(("No attached driver for LUN #%u\n", uLUN));
-
-    if (RT_FAILURE(rc))
-    {
-        /* Only free this string on failure;
-         * must remain valid for the live of the driver instance. */
-        RTStrFree(pszDesc);
-    }
-
-    LogFunc(("uLUN=%u, fFlags=0x%x, rc=%Rrc\n", uLUN, fFlags, rc));
-    return rc;
-}
-
-/**
- * Attach command.
- *
- * This is called to let the device attach to a driver for a specified LUN
- * during runtime. This is not called during VM construction, the device
- * constructor has to attach to all the available drivers.
- *
- * @returns VBox status code.
- * @param   pDevIns     The device instance.
- * @param   uLUN        The logical unit which is being detached.
- * @param   fFlags      Flags, combination of the PDMDEVATT_FLAGS_* \#defines.
- */
-static DECLCALLBACK(int) hdaAttach(PPDMDEVINS pDevIns, unsigned uLUN, uint32_t fFlags)
-{
-    return hdaAttachInternal(pDevIns, NULL /* pDrv */, uLUN, fFlags);
-}
-
-static DECLCALLBACK(void) hdaDetach(PPDMDEVINS pDevIns, unsigned uLUN, uint32_t fFlags)
-{
-    LogFunc(("iLUN=%u, fFlags=0x%x\n", uLUN, fFlags));
-}
-
-/**
- * Re-attach.
- *
- * @returns VBox status code.
- * @param   pThis       Device instance.
- * @param   pDrv        Driver instance used for attaching to.
- *                      If NULL is specified, a new driver will be created and appended
- *                      to the driver list.
- * @param   uLUN        The logical unit which is being re-detached.
- * @param   pszDriver   Driver name.
- */
-static int hdaReattach(PHDASTATE pThis, PHDADRIVER pDrv, uint8_t uLUN, const char *pszDriver)
-{
-    AssertPtrReturn(pThis,     VERR_INVALID_POINTER);
-    AssertPtrReturn(pszDriver, VERR_INVALID_POINTER);
-
-    PVM pVM = PDMDevHlpGetVM(pThis->pDevInsR3);
-    PCFGMNODE pRoot = CFGMR3GetRoot(pVM);
-    PCFGMNODE pDev0 = CFGMR3GetChild(pRoot, "Devices/hda/0/");
-
-    /* Remove LUN branch. */
-    CFGMR3RemoveNode(CFGMR3GetChildF(pDev0, "LUN#%u/", uLUN));
-
-    if (pDrv)
-    {
-        /* Re-use a driver instance => detach the driver before. */
-        int rc = PDMDevHlpDriverDetach(pThis->pDevInsR3, PDMIBASE_2_PDMDRV(pDrv->pDrvBase), 0 /* fFlags */);
-        if (RT_FAILURE(rc))
-            return rc;
-    }
-
-#define RC_CHECK() if (RT_FAILURE(rc)) { AssertReleaseRC(rc); break; }
-
-    int rc = VINF_SUCCESS;
-    do
-    {
-        PCFGMNODE pLunL0;
-        rc = CFGMR3InsertNodeF(pDev0, &pLunL0, "LUN#%u/", uLUN);        RC_CHECK();
-        rc = CFGMR3InsertString(pLunL0, "Driver",       "AUDIO");       RC_CHECK();
-        rc = CFGMR3InsertNode(pLunL0,   "Config/",       NULL);         RC_CHECK();
-
-        PCFGMNODE pLunL1, pLunL2;
-        rc = CFGMR3InsertNode  (pLunL0, "AttachedDriver/", &pLunL1);    RC_CHECK();
-        rc = CFGMR3InsertNode  (pLunL1,  "Config/",        &pLunL2);    RC_CHECK();
-        rc = CFGMR3InsertString(pLunL1,  "Driver",          pszDriver); RC_CHECK();
-
-        rc = CFGMR3InsertString(pLunL2, "AudioDriver", pszDriver);      RC_CHECK();
-
-    } while (0);
-
-    if (RT_SUCCESS(rc))
-        rc = hdaAttachInternal(pThis->pDevInsR3, pDrv, uLUN, 0 /* fFlags */);
-
-    LogFunc(("pThis=%p, uLUN=%u, pszDriver=%s, rc=%Rrc\n", pThis, uLUN, pszDriver, rc));
-
-#undef RC_CHECK
-
-    return rc;
-}
-
-/**
- * @interface_method_impl{PDMDEVREG,pfnConstruct}
- */
-static DECLCALLBACK(int) hdaConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
-{
-    PHDASTATE pThis = PDMINS_2_DATA(pDevIns, PHDASTATE);
-    Assert(iInstance == 0);
-    PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
-
-    /*
-     * Validations.
-     */
-    if (!CFGMR3AreValuesValid(pCfg, "R0Enabled\0"
-                                    "RCEnabled\0"
-                                    "TimerHz\0"))
-        return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES,
-                                N_ ("Invalid configuration for the Intel HDA device"));
-
-    int rc = CFGMR3QueryBoolDef(pCfg, "RCEnabled", &pThis->fRCEnabled, false);
-    if (RT_FAILURE(rc))
-        return PDMDEV_SET_ERROR(pDevIns, rc,
-                                N_("HDA configuration error: failed to read RCEnabled as boolean"));
-    rc = CFGMR3QueryBoolDef(pCfg, "R0Enabled", &pThis->fR0Enabled, false);
-    if (RT_FAILURE(rc))
-        return PDMDEV_SET_ERROR(pDevIns, rc,
-                                N_("HDA configuration error: failed to read R0Enabled as boolean"));
-#ifndef VBOX_WITH_AUDIO_CALLBACKS
-    uint16_t uTimerHz;
-    rc = CFGMR3QueryU16Def(pCfg, "TimerHz", &uTimerHz, 200 /* Hz */);
-    if (RT_FAILURE(rc))
-        return PDMDEV_SET_ERROR(pDevIns, rc,
-                                N_("HDA configuration error: failed to read Hertz (Hz) rate as unsigned integer"));
-#endif
-
-    /*
-     * Initialize data (most of it anyway).
-     */
-    pThis->pDevInsR3                = pDevIns;
-    pThis->pDevInsR0                = PDMDEVINS_2_R0PTR(pDevIns);
-    pThis->pDevInsRC                = PDMDEVINS_2_RCPTR(pDevIns);
-    /* IBase */
-    pThis->IBase.pfnQueryInterface  = hdaQueryInterface;
-
-    /* PCI Device */
-    PCIDevSetVendorId           (&pThis->PciDev, HDA_PCI_VENDOR_ID); /* nVidia */
-    PCIDevSetDeviceId           (&pThis->PciDev, HDA_PCI_DEVICE_ID); /* HDA */
-
-    PCIDevSetCommand            (&pThis->PciDev, 0x0000); /* 04 rw,ro - pcicmd. */
-    PCIDevSetStatus             (&pThis->PciDev, VBOX_PCI_STATUS_CAP_LIST); /* 06 rwc?,ro? - pcists. */
-    PCIDevSetRevisionId         (&pThis->PciDev, 0x01);   /* 08 ro - rid. */
-    PCIDevSetClassProg          (&pThis->PciDev, 0x00);   /* 09 ro - pi. */
-    PCIDevSetClassSub           (&pThis->PciDev, 0x03);   /* 0a ro - scc; 03 == HDA. */
-    PCIDevSetClassBase          (&pThis->PciDev, 0x04);   /* 0b ro - bcc; 04 == multimedia. */
-    PCIDevSetHeaderType         (&pThis->PciDev, 0x00);   /* 0e ro - headtyp. */
-    PCIDevSetBaseAddress        (&pThis->PciDev, 0,       /* 10 rw - MMIO */
-                                 false /* fIoSpace */, false /* fPrefetchable */, true /* f64Bit */, 0x00000000);
-    PCIDevSetInterruptLine      (&pThis->PciDev, 0x00);   /* 3c rw. */
-    PCIDevSetInterruptPin       (&pThis->PciDev, 0x01);   /* 3d ro - INTA#. */
-
-#if defined(HDA_AS_PCI_EXPRESS)
-    PCIDevSetCapabilityList     (&pThis->PciDev, 0x80);
-#elif defined(VBOX_WITH_MSI_DEVICES)
-    PCIDevSetCapabilityList     (&pThis->PciDev, 0x60);
-#else
-    PCIDevSetCapabilityList     (&pThis->PciDev, 0x50);   /* ICH6 datasheet 18.1.16 */
-#endif
-
-    /// @todo r=michaln: If there are really no PCIDevSetXx for these, the meaning
-    /// of these values needs to be properly documented!
-    /* HDCTL off 0x40 bit 0 selects signaling mode (1-HDA, 0 - Ac97) 18.1.19 */
-    PCIDevSetByte(&pThis->PciDev, 0x40, 0x01);
-
-    /* Power Management */
-    PCIDevSetByte(&pThis->PciDev, 0x50 + 0, VBOX_PCI_CAP_ID_PM);
-    PCIDevSetByte(&pThis->PciDev, 0x50 + 1, 0x0); /* next */
-    PCIDevSetWord(&pThis->PciDev, 0x50 + 2, VBOX_PCI_PM_CAP_DSI | 0x02 /* version, PM1.1 */ );
-
-#ifdef HDA_AS_PCI_EXPRESS
-    /* PCI Express */
-    PCIDevSetByte(&pThis->PciDev, 0x80 + 0, VBOX_PCI_CAP_ID_EXP); /* PCI_Express */
-    PCIDevSetByte(&pThis->PciDev, 0x80 + 1, 0x60); /* next */
-    /* Device flags */
-    PCIDevSetWord(&pThis->PciDev, 0x80 + 2,
-                   /* version */ 0x1     |
-                   /* Root Complex Integrated Endpoint */ (VBOX_PCI_EXP_TYPE_ROOT_INT_EP << 4) |
-                   /* MSI */ (100) << 9 );
-    /* Device capabilities */
-    PCIDevSetDWord(&pThis->PciDev, 0x80 + 4, VBOX_PCI_EXP_DEVCAP_FLRESET);
-    /* Device control */
-    PCIDevSetWord( &pThis->PciDev, 0x80 + 8, 0);
-    /* Device status */
-    PCIDevSetWord( &pThis->PciDev, 0x80 + 10, 0);
-    /* Link caps */
-    PCIDevSetDWord(&pThis->PciDev, 0x80 + 12, 0);
-    /* Link control */
-    PCIDevSetWord( &pThis->PciDev, 0x80 + 16, 0);
-    /* Link status */
-    PCIDevSetWord( &pThis->PciDev, 0x80 + 18, 0);
-    /* Slot capabilities */
-    PCIDevSetDWord(&pThis->PciDev, 0x80 + 20, 0);
-    /* Slot control */
-    PCIDevSetWord( &pThis->PciDev, 0x80 + 24, 0);
-    /* Slot status */
-    PCIDevSetWord( &pThis->PciDev, 0x80 + 26, 0);
-    /* Root control */
-    PCIDevSetWord( &pThis->PciDev, 0x80 + 28, 0);
-    /* Root capabilities */
-    PCIDevSetWord( &pThis->PciDev, 0x80 + 30, 0);
-    /* Root status */
-    PCIDevSetDWord(&pThis->PciDev, 0x80 + 32, 0);
-    /* Device capabilities 2 */
-    PCIDevSetDWord(&pThis->PciDev, 0x80 + 36, 0);
-    /* Device control 2 */
-    PCIDevSetQWord(&pThis->PciDev, 0x80 + 40, 0);
-    /* Link control 2 */
-    PCIDevSetQWord(&pThis->PciDev, 0x80 + 48, 0);
-    /* Slot control 2 */
-    PCIDevSetWord( &pThis->PciDev, 0x80 + 56, 0);
-#endif
-
-    /*
-     * Register the PCI device.
-     */
-    rc = PDMDevHlpPCIRegister(pDevIns, &pThis->PciDev);
-    if (RT_FAILURE(rc))
-        return rc;
-
-    rc = PDMDevHlpPCIIORegionRegister(pDevIns, 0, 0x4000, PCI_ADDRESS_SPACE_MEM, hdaPciIoRegionMap);
-    if (RT_FAILURE(rc))
-        return rc;
-
-#ifdef VBOX_WITH_MSI_DEVICES
-    PDMMSIREG MsiReg;
-    RT_ZERO(MsiReg);
-    MsiReg.cMsiVectors    = 1;
-    MsiReg.iMsiCapOffset  = 0x60;
-    MsiReg.iMsiNextOffset = 0x50;
-    rc = PDMDevHlpPCIRegisterMsi(pDevIns, &MsiReg);
-    if (RT_FAILURE(rc))
-    {
-        /* That's OK, we can work without MSI */
-        PCIDevSetCapabilityList(&pThis->PciDev, 0x50);
-    }
-#endif
-
-    rc = PDMDevHlpSSMRegister(pDevIns, HDA_SSM_VERSION, sizeof(*pThis), hdaSaveExec, hdaLoadExec);
-    if (RT_FAILURE(rc))
-        return rc;
-
-    RTListInit(&pThis->lstDrv);
-
-    uint8_t uLUN;
-    for (uLUN = 0; uLUN < UINT8_MAX; ++uLUN)
-    {
-        LogFunc(("Trying to attach driver for LUN #%RU32 ...\n", uLUN));
-        rc = hdaAttachInternal(pDevIns, NULL /* pDrv */, uLUN, 0 /* fFlags */);
-        if (RT_FAILURE(rc))
-        {
-            if (rc == VERR_PDM_NO_ATTACHED_DRIVER)
-                rc = VINF_SUCCESS;
-            else if (rc == VERR_AUDIO_BACKEND_INIT_FAILED)
-            {
-                hdaReattach(pThis, NULL /* pDrv */, uLUN, "NullAudio");
-                PDMDevHlpVMSetRuntimeError(pDevIns, 0 /*fFlags*/, "HostAudioNotResponding",
-                    N_("No audio devices could be opened. Selecting the NULL audio backend "
-                       "with the consequence that no sound is audible"));
-                /* attaching to the NULL audio backend will never fail */
-                rc = VINF_SUCCESS;
-            }
-            break;
-        }
-    }
-
-    LogFunc(("cLUNs=%RU8, rc=%Rrc\n", uLUN, rc));
-
-    if (RT_SUCCESS(rc))
-    {
-        rc = AudioMixerCreate("HDA Mixer", 0 /* uFlags */, &pThis->pMixer);
-        if (RT_SUCCESS(rc))
-        {
-            /* Set a default audio format for our mixer. */
-            PDMAUDIOSTREAMCFG streamCfg;
-            streamCfg.uHz           = 44100;
-            streamCfg.cChannels     = 2;
-            streamCfg.enmFormat     = AUD_FMT_S16;
-            streamCfg.enmEndianness = PDMAUDIOHOSTENDIANNESS;
-
-            rc = AudioMixerSetDeviceFormat(pThis->pMixer, &streamCfg);
-            AssertRC(rc);
-
-            /* Add all required audio sinks. */
-            rc = AudioMixerAddSink(pThis->pMixer, "[Playback] PCM Output",
-                                   AUDMIXSINKDIR_OUTPUT, &pThis->pSinkOutput);
-            AssertRC(rc);
-
-            rc = AudioMixerAddSink(pThis->pMixer, "[Recording] Line In",
-                                   AUDMIXSINKDIR_INPUT, &pThis->pSinkLineIn);
-            AssertRC(rc);
-
-            rc = AudioMixerAddSink(pThis->pMixer, "[Recording] Microphone In",
-                                   AUDMIXSINKDIR_INPUT, &pThis->pSinkMicIn);
-            AssertRC(rc);
-
-            /* There is no master volume control. Set the master to max. */
-            PDMAUDIOVOLUME vol = { false, 255, 255 };
-            rc = AudioMixerSetMasterVolume(pThis->pMixer, &vol);
-            AssertRC(rc);
-        }
-    }
-
-    if (RT_SUCCESS(rc))
-    {
-        /* Construct codec. */
-        pThis->pCodec = (PHDACODEC)RTMemAllocZ(sizeof(HDACODEC));
-        if (!pThis->pCodec)
-            return PDMDEV_SET_ERROR(pDevIns, VERR_NO_MEMORY, N_("Out of memory allocating HDA codec state"));
-
-        /* Audio driver callbacks for multiplexing. */
-        pThis->pCodec->pfnCloseIn   = hdaCloseIn;
-        pThis->pCodec->pfnCloseOut  = hdaCloseOut;
-        pThis->pCodec->pfnOpenIn    = hdaOpenIn;
-        pThis->pCodec->pfnOpenOut   = hdaOpenOut;
-        pThis->pCodec->pfnReset     = hdaCodecReset;
-        pThis->pCodec->pfnSetVolume = hdaSetVolume;
-
-        pThis->pCodec->pHDAState = pThis; /* Assign HDA controller state to codec. */
-
-        /* Construct the codec. */
-        rc = hdaCodecConstruct(pDevIns, pThis->pCodec, 0 /* Codec index */, pCfg);
-        if (RT_FAILURE(rc))
-            AssertRCReturn(rc, rc);
-
-        /* ICH6 datasheet defines 0 values for SVID and SID (18.1.14-15), which together with values returned for
-           verb F20 should provide device/codec recognition. */
-        Assert(pThis->pCodec->u16VendorId);
-        Assert(pThis->pCodec->u16DeviceId);
-        PCIDevSetSubSystemVendorId(&pThis->PciDev, pThis->pCodec->u16VendorId); /* 2c ro - intel.) */
-        PCIDevSetSubSystemId(      &pThis->PciDev, pThis->pCodec->u16DeviceId); /* 2e ro. */
-    }
-
-    if (RT_SUCCESS(rc))
-    {
-        rc = hdaStreamCreate(&pThis->StrmStLineIn);
-        AssertRC(rc);
-#ifdef VBOX_WITH_HDA_MIC_IN
-        rc = hdaStreamCreate(&pThis->StrmStMicIn);
-        AssertRC(rc);
-#endif
-        rc = hdaStreamCreate(&pThis->StrmStOut);
-        AssertRC(rc);
-
-        PHDADRIVER pDrv;
-        RTListForEach(&pThis->lstDrv, pDrv, HDADRIVER, Node)
-        {
-            /*
-             * Only primary drivers are critical for the VM to run. Everything else
-             * might not worth showing an own error message box in the GUI.
-             */
-            if (!(pDrv->Flags & PDMAUDIODRVFLAG_PRIMARY))
-                continue;
-
-            PPDMIAUDIOCONNECTOR pCon = pDrv->pConnector;
-            AssertPtr(pCon);
-
-            bool fValidLineIn = pCon->pfnIsValidIn(pCon, pDrv->LineIn.pStrmIn);
-#ifdef VBOX_WITH_HDA_MIC_IN
-            bool fValidMicIn  = pCon->pfnIsValidIn (pCon, pDrv->MicIn.pStrmIn);
-#endif
-            bool fValidOut    = pCon->pfnIsValidOut(pCon, pDrv->Out.pStrmOut);
-
-            if (    !fValidLineIn
-#ifdef VBOX_WITH_HDA_MIC_IN
-                 && !fValidMicIn
-#endif
-                 && !fValidOut)
-            {
-                LogRel(("HDA: Falling back to NULL backend (no sound audible)\n"));
-
-                hdaReset(pDevIns);
-                hdaReattach(pThis, pDrv, pDrv->uLUN, "NullAudio");
-
-                PDMDevHlpVMSetRuntimeError(pDevIns, 0 /*fFlags*/, "HostAudioNotResponding",
-                    N_("No audio devices could be opened. Selecting the NULL audio backend "
-                       "with the consequence that no sound is audible"));
-            }
-            else
-            {
-                bool fWarn = false;
-
-                PDMAUDIOBACKENDCFG backendCfg;
-                int rc2 = pCon->pfnGetConfiguration(pCon, &backendCfg);
-                if (RT_SUCCESS(rc2))
-                {
-                    if (backendCfg.cMaxHstStrmsIn)
-                    {
-#ifdef VBOX_WITH_HDA_MIC_IN
-                        /* If the audio backend supports two or more input streams at once,
-                         * warn if one of our two inputs (microphone-in and line-in) failed to initialize. */
-                        if (backendCfg.cMaxHstStrmsIn >= 2)
-                            fWarn = !fValidLineIn || !fValidMicIn;
-                        /* If the audio backend only supports one input stream at once (e.g. pure ALSA, and
-                         * *not* ALSA via PulseAudio plugin!), only warn if both of our inputs failed to initialize.
-                         * One of the two simply is not in use then. */
-                        else if (backendCfg.cMaxHstStrmsIn == 1)
-                            fWarn = !fValidLineIn && !fValidMicIn;
-                        /* Don't warn if our backend is not able of supporting any input streams at all. */
-#else
-                        /* We only have line-in as input source. */
-                        fWarn = !fValidLineIn;
-#endif
-                    }
-
-                    if (   !fWarn
-                        && backendCfg.cMaxHstStrmsOut)
-                    {
-                        fWarn = !fValidOut;
-                    }
-                }
-                else
-                    AssertReleaseMsgFailed(("Unable to retrieve audio backend configuration for LUN #%RU8, rc=%Rrc\n",
-                                            pDrv->uLUN, rc2));
-
-                if (fWarn)
-                {
-                    char   szMissingStreams[255];
-                    size_t len = 0;
-                    if (!fValidLineIn)
-                    {
-                        LogRel(("HDA: WARNING: Unable to open PCM line input for LUN #%RU8!\n", pDrv->uLUN));
-                        len = RTStrPrintf(szMissingStreams, sizeof(szMissingStreams), "PCM Input");
-                    }
-#ifdef VBOX_WITH_HDA_MIC_IN
-                    if (!fValidMicIn)
-                    {
-                        LogRel(("HDA: WARNING: Unable to open PCM microphone input for LUN #%RU8!\n", pDrv->uLUN));
-                        len += RTStrPrintf(szMissingStreams + len,
-                                           sizeof(szMissingStreams) - len, len ? ", PCM Microphone" : "PCM Microphone");
-                    }
-#endif
-                    if (!fValidOut)
-                    {
-                        LogRel(("HDA: WARNING: Unable to open PCM output for LUN #%RU8!\n", pDrv->uLUN));
-                        len += RTStrPrintf(szMissingStreams + len,
-                                           sizeof(szMissingStreams) - len, len ? ", PCM Output" : "PCM Output");
-                    }
-
-                    PDMDevHlpVMSetRuntimeError(pDevIns, 0 /*fFlags*/, "HostAudioNotResponding",
-                                               N_("Some HDA audio streams (%s) could not be opened. Guest applications generating audio "
-                                                  "output or depending on audio input may hang. Make sure your host audio device "
-                                                  "is working properly. Check the logfile for error messages of the audio "
-                                                  "subsystem"), szMissingStreams);
-                }
-            }
-        }
-    }
-
-    if (RT_SUCCESS(rc))
-    {
-        hdaReset(pDevIns);
-
-        /*
-         * 18.2.6,7 defines that values of this registers might be cleared on power on/reset
-         * hdaReset shouldn't affects these registers.
-         */
-        HDA_REG(pThis, WAKEEN)   = 0x0;
-        HDA_REG(pThis, STATESTS) = 0x0;
-
-#ifdef DEBUG
-        /*
-         * Debug and string formatter types.
-         */
-        PDMDevHlpDBGFInfoRegister(pDevIns, "hda",         "HDA info. (hda [register case-insensitive])",    hdaInfo);
-        PDMDevHlpDBGFInfoRegister(pDevIns, "hdastrm",     "HDA stream info. (hdastrm [stream number])",     hdaInfoStream);
-        PDMDevHlpDBGFInfoRegister(pDevIns, "hdcnodes",    "HDA codec nodes.",                               hdaInfoCodecNodes);
-        PDMDevHlpDBGFInfoRegister(pDevIns, "hdcselector", "HDA codec's selector states [node number].",     hdaInfoCodecSelector);
-        PDMDevHlpDBGFInfoRegister(pDevIns, "hdamixer",    "HDA mixer state.",                               hdaInfoMixer);
-
-        rc = RTStrFormatTypeRegister("bdle",    hdaDbgFmtBDLE,    NULL);
-        AssertRC(rc);
-        rc = RTStrFormatTypeRegister("sdctl",   hdaDbgFmtSDCTL,   NULL);
-        AssertRC(rc);
-        rc = RTStrFormatTypeRegister("sdsts",   hdaDbgFmtSDSTS,   NULL);
-        AssertRC(rc);
-        rc = RTStrFormatTypeRegister("sdfifos", hdaDbgFmtSDFIFOS, NULL);
-        AssertRC(rc);
-        rc = RTStrFormatTypeRegister("sdfifow", hdaDbgFmtSDFIFOW, NULL);
-        AssertRC(rc);
-#endif /* DEBUG */
-
-        /*
-         * Some debug assertions.
-         */
-        for (unsigned i = 0; i < RT_ELEMENTS(g_aHdaRegMap); i++)
-        {
-            struct HDAREGDESC const *pReg     = &g_aHdaRegMap[i];
-            struct HDAREGDESC const *pNextReg = i + 1 < RT_ELEMENTS(g_aHdaRegMap) ?  &g_aHdaRegMap[i + 1] : NULL;
-
-            /* binary search order. */
-            AssertReleaseMsg(!pNextReg || pReg->offset + pReg->size <= pNextReg->offset,
-                             ("[%#x] = {%#x LB %#x}  vs. [%#x] = {%#x LB %#x}\n",
-                              i, pReg->offset, pReg->size, i + 1, pNextReg->offset, pNextReg->size));
-
-            /* alignment. */
-            AssertReleaseMsg(   pReg->size == 1
-                             || (pReg->size == 2 && (pReg->offset & 1) == 0)
-                             || (pReg->size == 3 && (pReg->offset & 3) == 0)
-                             || (pReg->size == 4 && (pReg->offset & 3) == 0),
-                             ("[%#x] = {%#x LB %#x}\n", i, pReg->offset, pReg->size));
-
-            /* registers are packed into dwords - with 3 exceptions with gaps at the end of the dword. */
-            AssertRelease(((pReg->offset + pReg->size) & 3) == 0 || pNextReg);
-            if (pReg->offset & 3)
-            {
-                struct HDAREGDESC const *pPrevReg = i > 0 ?  &g_aHdaRegMap[i - 1] : NULL;
-                AssertReleaseMsg(pPrevReg, ("[%#x] = {%#x LB %#x}\n", i, pReg->offset, pReg->size));
-                if (pPrevReg)
-                    AssertReleaseMsg(pPrevReg->offset + pPrevReg->size == pReg->offset,
-                                     ("[%#x] = {%#x LB %#x}  vs. [%#x] = {%#x LB %#x}\n",
-                                      i - 1, pPrevReg->offset, pPrevReg->size, i + 1, pReg->offset, pReg->size));
-            }
-#if 0
-            if ((pReg->offset + pReg->size) & 3)
-            {
-                AssertReleaseMsg(pNextReg, ("[%#x] = {%#x LB %#x}\n", i, pReg->offset, pReg->size));
-                if (pNextReg)
-                    AssertReleaseMsg(pReg->offset + pReg->size == pNextReg->offset,
-                                     ("[%#x] = {%#x LB %#x}  vs. [%#x] = {%#x LB %#x}\n",
-                                      i, pReg->offset, pReg->size, i + 1,  pNextReg->offset, pNextReg->size));
-            }
-#endif
-            /* The final entry is a full DWORD, no gaps! Allows shortcuts. */
-            AssertReleaseMsg(pNextReg || ((pReg->offset + pReg->size) & 3) == 0,
-                             ("[%#x] = {%#x LB %#x}\n", i, pReg->offset, pReg->size));
-        }
-    }
-
-# ifndef VBOX_WITH_AUDIO_CALLBACKS
-    if (RT_SUCCESS(rc))
-    {
-        /* Start the emulation timer. */
-        rc = PDMDevHlpTMTimerCreate(pDevIns, TMCLOCK_VIRTUAL, hdaTimer, pThis,
-                                    TMTIMER_FLAGS_NO_CRIT_SECT, "DevIchHda", &pThis->pTimer);
-        AssertRCReturn(rc, rc);
-
-        if (RT_SUCCESS(rc))
-        {
-            pThis->cTimerTicks = TMTimerGetFreq(pThis->pTimer) / uTimerHz;
-            pThis->uTimerTS    = TMTimerGet(pThis->pTimer);
-            LogFunc(("Timer ticks=%RU64 (%RU16 Hz)\n", pThis->cTimerTicks, uTimerHz));
-
-            /* Fire off timer. */
-            TMTimerSet(pThis->pTimer, TMTimerGet(pThis->pTimer) + pThis->cTimerTicks);
-        }
-    }
-# else
-    if (RT_SUCCESS(rc))
-    {
-        PHDADRIVER pDrv;
-        RTListForEach(&pThis->lstDrv, pDrv, HDADRIVER, Node)
-        {
-            /* Only register primary driver.
-             * The device emulation does the output multiplexing then. */
-            if (pDrv->Flags != PDMAUDIODRVFLAG_PRIMARY)
-                continue;
-
-            PDMAUDIOCALLBACK AudioCallbacks[2];
-
-            HDACALLBACKCTX Ctx = { pThis, pDrv };
-
-            AudioCallbacks[0].enmType     = PDMAUDIOCALLBACKTYPE_INPUT;
-            AudioCallbacks[0].pfnCallback = hdaCallbackInput;
-            AudioCallbacks[0].pvCtx       = &Ctx;
-            AudioCallbacks[0].cbCtx       = sizeof(HDACALLBACKCTX);
-
-            AudioCallbacks[1].enmType     = PDMAUDIOCALLBACKTYPE_OUTPUT;
-            AudioCallbacks[1].pfnCallback = hdaCallbackOutput;
-            AudioCallbacks[1].pvCtx       = &Ctx;
-            AudioCallbacks[1].cbCtx       = sizeof(HDACALLBACKCTX);
-
-            rc = pDrv->pConnector->pfnRegisterCallbacks(pDrv->pConnector, AudioCallbacks, RT_ELEMENTS(AudioCallbacks));
-            if (RT_FAILURE(rc))
-                break;
-        }
-    }
-# endif
-
-# ifdef VBOX_WITH_STATISTICS
-    if (RT_SUCCESS(rc))
-    {
-        /*
-         * Register statistics.
-         */
-#  ifndef VBOX_WITH_AUDIO_CALLBACKS
-        PDMDevHlpSTAMRegister(pDevIns, &pThis->StatTimer,            STAMTYPE_PROFILE, "/Devices/HDA/Timer",             STAMUNIT_TICKS_PER_CALL, "Profiling hdaTimer.");
-#  endif
-        PDMDevHlpSTAMRegister(pDevIns, &pThis->StatBytesRead,        STAMTYPE_COUNTER, "/Devices/HDA/BytesRead"   ,      STAMUNIT_BYTES,          "Bytes read from HDA emulation.");
-        PDMDevHlpSTAMRegister(pDevIns, &pThis->StatBytesWritten,     STAMTYPE_COUNTER, "/Devices/HDA/BytesWritten",      STAMUNIT_BYTES,          "Bytes written to HDA emulation.");
-    }
-# endif
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-/**
- * The device registration structure.
- */
-const PDMDEVREG g_DeviceICH6_HDA =
-{
-    /* u32Version */
-    PDM_DEVREG_VERSION,
-    /* szName */
-    "hda",
-    /* szRCMod */
-    "VBoxDDRC.rc",
-    /* szR0Mod */
-    "VBoxDDR0.r0",
-    /* pszDescription */
-    "Intel HD Audio Controller",
-    /* fFlags */
-    PDM_DEVREG_FLAGS_DEFAULT_BITS | PDM_DEVREG_FLAGS_RC | PDM_DEVREG_FLAGS_R0,
-    /* fClass */
-    PDM_DEVREG_CLASS_AUDIO,
-    /* cMaxInstances */
-    1,
-    /* cbInstance */
-    sizeof(HDASTATE),
-    /* pfnConstruct */
-    hdaConstruct,
-    /* pfnDestruct */
-    hdaDestruct,
-    /* pfnRelocate */
-    NULL,
-    /* pfnMemSetup */
-    NULL,
-    /* pfnPowerOn */
-    NULL,
-    /* pfnReset */
-    hdaReset,
-    /* pfnSuspend */
-    NULL,
-    /* pfnResume */
-    NULL,
-    /* pfnAttach */
-    hdaAttach,
-    /* pfnDetach */
-    hdaDetach,
-    /* pfnQueryInterface. */
-    NULL,
-    /* pfnInitComplete */
-    NULL,
-    /* pfnPowerOff */
-    NULL,
-    /* pfnSoftReset */
-    NULL,
-    /* u32VersionEnd */
-    PDM_DEVREG_VERSION
-};
-
-#endif /* IN_RING3 */
-#endif /* !VBOX_DEVICE_STRUCT_TESTCASE */
diff --git a/src/VBox/Devices/Audio_old/DevIchHdaCodec.cpp b/src/VBox/Devices/Audio_old/DevIchHdaCodec.cpp
deleted file mode 100644
index 8e029de..0000000
--- a/src/VBox/Devices/Audio_old/DevIchHdaCodec.cpp
+++ /dev/null
@@ -1,2774 +0,0 @@
-/* $Id: DevIchHdaCodec.cpp $ */
-/** @file
- * DevIchHdaCodec - VBox ICH Intel HD Audio Codec.
- *
- * Implemented against "Intel I/O Controller Hub 6 (ICH6) High Definition
- * Audio / AC '97 - Programmer's Reference Manual (PRM)", document number
- * 302349-003.
- */
-
-/*
- * Copyright (C) 2006-2016 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-
-/*********************************************************************************************************************************
-*   Header Files                                                                                                                 *
-*********************************************************************************************************************************/
-#define LOG_GROUP LOG_GROUP_DEV_HDA_CODEC
-#include <VBox/vmm/pdmdev.h>
-#include <VBox/vmm/pdmaudioifs.h>
-#include <iprt/assert.h>
-#include <iprt/uuid.h>
-#include <iprt/string.h>
-#include <iprt/mem.h>
-#include <iprt/asm.h>
-#include <iprt/cpp/utils.h>
-
-#include "VBoxDD.h"
-#include "DevIchHdaCodec.h"
-
-
-/*********************************************************************************************************************************
-*   Defined Constants And Macros                                                                                                 *
-*********************************************************************************************************************************/
-/* PRM 5.3.1 */
-/** Codec address mask. */
-#define CODEC_CAD_MASK                                     0xF0000000
-/** Codec address shift. */
-#define CODEC_CAD_SHIFT                                    28
-#define CODEC_DIRECT_MASK                                  RT_BIT(27)
-/** Node ID mask. */
-#define CODEC_NID_MASK                                     0x07F00000
-/** Node ID shift. */
-#define CODEC_NID_SHIFT                                    20
-#define CODEC_VERBDATA_MASK                                0x000FFFFF
-#define CODEC_VERB_4BIT_CMD                                0x000FFFF0
-#define CODEC_VERB_4BIT_DATA                               0x0000000F
-#define CODEC_VERB_8BIT_CMD                                0x000FFF00
-#define CODEC_VERB_8BIT_DATA                               0x000000FF
-#define CODEC_VERB_16BIT_CMD                               0x000F0000
-#define CODEC_VERB_16BIT_DATA                              0x0000FFFF
-
-#define CODEC_CAD(cmd)                                     (((cmd) & CODEC_CAD_MASK) >> CODEC_CAD_SHIFT)
-#define CODEC_DIRECT(cmd)                                  ((cmd) & CODEC_DIRECT_MASK)
-#define CODEC_NID(cmd)                                     ((((cmd) & CODEC_NID_MASK)) >> CODEC_NID_SHIFT)
-#define CODEC_VERBDATA(cmd)                                ((cmd) & CODEC_VERBDATA_MASK)
-#define CODEC_VERB_CMD(cmd, mask, x)                       (((cmd) & (mask)) >> (x))
-#define CODEC_VERB_CMD4(cmd)                               (CODEC_VERB_CMD((cmd), CODEC_VERB_4BIT_CMD, 4))
-#define CODEC_VERB_CMD8(cmd)                               (CODEC_VERB_CMD((cmd), CODEC_VERB_8BIT_CMD, 8))
-#define CODEC_VERB_CMD16(cmd)                              (CODEC_VERB_CMD((cmd), CODEC_VERB_16BIT_CMD, 16))
-#define CODEC_VERB_PAYLOAD4(cmd)                           ((cmd) & CODEC_VERB_4BIT_DATA)
-#define CODEC_VERB_PAYLOAD8(cmd)                           ((cmd) & CODEC_VERB_8BIT_DATA)
-#define CODEC_VERB_PAYLOAD16(cmd)                          ((cmd) & CODEC_VERB_16BIT_DATA)
-
-#define CODEC_VERB_GET_AMP_DIRECTION                       RT_BIT(15)
-#define CODEC_VERB_GET_AMP_SIDE                            RT_BIT(13)
-#define CODEC_VERB_GET_AMP_INDEX                           0x7
-
-/* HDA spec 7.3.3.7 NoteA */
-#define CODEC_GET_AMP_DIRECTION(cmd)                       (((cmd) & CODEC_VERB_GET_AMP_DIRECTION) >> 15)
-#define CODEC_GET_AMP_SIDE(cmd)                            (((cmd) & CODEC_VERB_GET_AMP_SIDE) >> 13)
-#define CODEC_GET_AMP_INDEX(cmd)                           (CODEC_GET_AMP_DIRECTION(cmd) ? 0 : ((cmd) & CODEC_VERB_GET_AMP_INDEX))
-
-/* HDA spec 7.3.3.7 NoteC */
-#define CODEC_VERB_SET_AMP_OUT_DIRECTION                   RT_BIT(15)
-#define CODEC_VERB_SET_AMP_IN_DIRECTION                    RT_BIT(14)
-#define CODEC_VERB_SET_AMP_LEFT_SIDE                       RT_BIT(13)
-#define CODEC_VERB_SET_AMP_RIGHT_SIDE                      RT_BIT(12)
-#define CODEC_VERB_SET_AMP_INDEX                           (0x7 << 8)
-#define CODEC_VERB_SET_AMP_MUTE                            RT_BIT(7)
-/** Note: 7-bit value [6:0]. */
-#define CODEC_VERB_SET_AMP_GAIN                            0x7F
-
-#define CODEC_SET_AMP_IS_OUT_DIRECTION(cmd)                (((cmd) & CODEC_VERB_SET_AMP_OUT_DIRECTION) != 0)
-#define CODEC_SET_AMP_IS_IN_DIRECTION(cmd)                 (((cmd) & CODEC_VERB_SET_AMP_IN_DIRECTION) != 0)
-#define CODEC_SET_AMP_IS_LEFT_SIDE(cmd)                    (((cmd) & CODEC_VERB_SET_AMP_LEFT_SIDE) != 0)
-#define CODEC_SET_AMP_IS_RIGHT_SIDE(cmd)                   (((cmd) & CODEC_VERB_SET_AMP_RIGHT_SIDE) != 0)
-#define CODEC_SET_AMP_INDEX(cmd)                           (((cmd) & CODEC_VERB_SET_AMP_INDEX) >> 7)
-#define CODEC_SET_AMP_MUTE(cmd)                            ((cmd) & CODEC_VERB_SET_AMP_MUTE)
-#define CODEC_SET_AMP_GAIN(cmd)                            ((cmd) & CODEC_VERB_SET_AMP_GAIN)
-
-/* HDA spec 7.3.3.1 defines layout of configuration registers/verbs (0xF00) */
-/* VendorID (7.3.4.1) */
-#define CODEC_MAKE_F00_00(vendorID, deviceID)              (((vendorID) << 16) | (deviceID))
-#define CODEC_F00_00_VENDORID(f00_00)                      (((f00_00) >> 16) & 0xFFFF)
-#define CODEC_F00_00_DEVICEID(f00_00)                      ((f00_00) & 0xFFFF)
-/* RevisionID (7.3.4.2)*/
-#define CODEC_MAKE_F00_02(MajRev, MinRev, RevisionID, SteppingID) (((MajRev) << 20)|((MinRev) << 16)|((RevisionID) << 8)|(SteppingID))
-/* Subordinate node count (7.3.4.3)*/
-#define CODEC_MAKE_F00_04(startNodeNumber, totalNodeNumber) ((((startNodeNumber) & 0xFF) << 16)|((totalNodeNumber) & 0xFF))
-#define CODEC_F00_04_TO_START_NODE_NUMBER(f00_04)          (((f00_04) >> 16) & 0xFF)
-#define CODEC_F00_04_TO_NODE_COUNT(f00_04)                 ((f00_04) & 0xFF)
-/*
- * Function Group Type  (7.3.4.4)
- * 0 & [0x3-0x7f] are reserved types
- * [0x80 - 0xff] are vendor defined function groups
- */
-#define CODEC_MAKE_F00_05(UnSol, NodeType)                 (((UnSol) << 8)|(NodeType))
-#define CODEC_F00_05_UNSOL                                 RT_BIT(8)
-#define CODEC_F00_05_AFG                                   (0x1)
-#define CODEC_F00_05_MFG                                   (0x2)
-#define CODEC_F00_05_IS_UNSOL(f00_05)                      RT_BOOL((f00_05) & RT_BIT(8))
-#define CODEC_F00_05_GROUP(f00_05)                         ((f00_05) & 0xff)
-/*  Audio Function Group capabilities (7.3.4.5) */
-#define CODEC_MAKE_F00_08(BeepGen, InputDelay, OutputDelay) ((((BeepGen) & 0x1) << 16)| (((InputDelay) & 0xF) << 8) | ((OutputDelay) & 0xF))
-#define CODEC_F00_08_BEEP_GEN(f00_08)                      ((f00_08) & RT_BIT(16)
-
-/* Widget Capabilities (7.3.4.6) */
-#define CODEC_MAKE_F00_09(type, delay, chanel_count) \
-    ( (((type) & 0xF) << 20)            \
-    | (((delay) & 0xF) << 16)           \
-    | (((chanel_count) & 0xF) << 13))
-/* note: types 0x8-0xe are reserved */
-#define CODEC_F00_09_TYPE_AUDIO_OUTPUT                     (0x0)
-#define CODEC_F00_09_TYPE_AUDIO_INPUT                      (0x1)
-#define CODEC_F00_09_TYPE_AUDIO_MIXER                      (0x2)
-#define CODEC_F00_09_TYPE_AUDIO_SELECTOR                   (0x3)
-#define CODEC_F00_09_TYPE_PIN_COMPLEX                      (0x4)
-#define CODEC_F00_09_TYPE_POWER_WIDGET                     (0x5)
-#define CODEC_F00_09_TYPE_VOLUME_KNOB                      (0x6)
-#define CODEC_F00_09_TYPE_BEEP_GEN                         (0x7)
-#define CODEC_F00_09_TYPE_VENDOR_DEFINED                   (0xF)
-
-#define CODEC_F00_09_CAP_CP                                RT_BIT(12)
-#define CODEC_F00_09_CAP_L_R_SWAP                          RT_BIT(11)
-#define CODEC_F00_09_CAP_POWER_CTRL                        RT_BIT(10)
-#define CODEC_F00_09_CAP_DIGITAL                           RT_BIT(9)
-#define CODEC_F00_09_CAP_CONNECTION_LIST                   RT_BIT(8)
-#define CODEC_F00_09_CAP_UNSOL                             RT_BIT(7)
-#define CODEC_F00_09_CAP_PROC_WIDGET                       RT_BIT(6)
-#define CODEC_F00_09_CAP_STRIPE                            RT_BIT(5)
-#define CODEC_F00_09_CAP_FMT_OVERRIDE                      RT_BIT(4)
-#define CODEC_F00_09_CAP_AMP_FMT_OVERRIDE                  RT_BIT(3)
-#define CODEC_F00_09_CAP_OUT_AMP_PRESENT                   RT_BIT(2)
-#define CODEC_F00_09_CAP_IN_AMP_PRESENT                    RT_BIT(1)
-#define CODEC_F00_09_CAP_LSB                               RT_BIT(0)
-
-#define CODEC_F00_09_TYPE(f00_09)                          (((f00_09) >> 20) & 0xF)
-
-#define CODEC_F00_09_IS_CAP_CP(f00_09)                     RT_BOOL((f00_09) & RT_BIT(12))
-#define CODEC_F00_09_IS_CAP_L_R_SWAP(f00_09)               RT_BOOL((f00_09) & RT_BIT(11))
-#define CODEC_F00_09_IS_CAP_POWER_CTRL(f00_09)             RT_BOOL((f00_09) & RT_BIT(10))
-#define CODEC_F00_09_IS_CAP_DIGITAL(f00_09)                RT_BOOL((f00_09) & RT_BIT(9))
-#define CODEC_F00_09_IS_CAP_CONNECTION_LIST(f00_09)        RT_BOOL((f00_09) & RT_BIT(8))
-#define CODEC_F00_09_IS_CAP_UNSOL(f00_09)                  RT_BOOL((f00_09) & RT_BIT(7))
-#define CODEC_F00_09_IS_CAP_PROC_WIDGET(f00_09)            RT_BOOL((f00_09) & RT_BIT(6))
-#define CODEC_F00_09_IS_CAP_STRIPE(f00_09)                 RT_BOOL((f00_09) & RT_BIT(5))
-#define CODEC_F00_09_IS_CAP_FMT_OVERRIDE(f00_09)           RT_BOOL((f00_09) & RT_BIT(4))
-#define CODEC_F00_09_IS_CAP_AMP_OVERRIDE(f00_09)           RT_BOOL((f00_09) & RT_BIT(3))
-#define CODEC_F00_09_IS_CAP_OUT_AMP_PRESENT(f00_09)        RT_BOOL((f00_09) & RT_BIT(2))
-#define CODEC_F00_09_IS_CAP_IN_AMP_PRESENT(f00_09)         RT_BOOL((f00_09) & RT_BIT(1))
-#define CODEC_F00_09_IS_CAP_LSB(f00_09)                    RT_BOOL((f00_09) & RT_BIT(0))
-
-/* Supported PCM size, rates (7.3.4.7) */
-#define CODEC_F00_0A_32_BIT                                RT_BIT(19)
-#define CODEC_F00_0A_24_BIT                                RT_BIT(18)
-#define CODEC_F00_0A_16_BIT                                RT_BIT(17)
-#define CODEC_F00_0A_8_BIT                                 RT_BIT(16)
-
-#define CODEC_F00_0A_48KHZ_MULT_8X                         RT_BIT(11)
-#define CODEC_F00_0A_48KHZ_MULT_4X                         RT_BIT(10)
-#define CODEC_F00_0A_44_1KHZ_MULT_4X                       RT_BIT(9)
-#define CODEC_F00_0A_48KHZ_MULT_2X                         RT_BIT(8)
-#define CODEC_F00_0A_44_1KHZ_MULT_2X                       RT_BIT(7)
-#define CODEC_F00_0A_48KHZ                                 RT_BIT(6)
-#define CODEC_F00_0A_44_1KHZ                               RT_BIT(5)
-/* 2/3 * 48kHz */
-#define CODEC_F00_0A_48KHZ_2_3X                            RT_BIT(4)
-/* 1/2 * 44.1kHz */
-#define CODEC_F00_0A_44_1KHZ_1_2X                          RT_BIT(3)
-/* 1/3 * 48kHz */
-#define CODEC_F00_0A_48KHZ_1_3X                            RT_BIT(2)
-/* 1/4 * 44.1kHz */
-#define CODEC_F00_0A_44_1KHZ_1_4X                          RT_BIT(1)
-/* 1/6 * 48kHz */
-#define CODEC_F00_0A_48KHZ_1_6X                            RT_BIT(0)
-
-/* Supported streams formats (7.3.4.8) */
-#define CODEC_F00_0B_AC3                                   RT_BIT(2)
-#define CODEC_F00_0B_FLOAT32                               RT_BIT(1)
-#define CODEC_F00_0B_PCM                                   RT_BIT(0)
-
-/* Pin Capabilities (7.3.4.9)*/
-#define CODEC_MAKE_F00_0C(vref_ctrl) (((vref_ctrl) & 0xFF) << 8)
-#define CODEC_F00_0C_CAP_HBR                               RT_BIT(27)
-#define CODEC_F00_0C_CAP_DP                                RT_BIT(24)
-#define CODEC_F00_0C_CAP_EAPD                              RT_BIT(16)
-#define CODEC_F00_0C_CAP_HDMI                              RT_BIT(7)
-#define CODEC_F00_0C_CAP_BALANCED_IO                       RT_BIT(6)
-#define CODEC_F00_0C_CAP_INPUT                             RT_BIT(5)
-#define CODEC_F00_0C_CAP_OUTPUT                            RT_BIT(4)
-#define CODEC_F00_0C_CAP_HP                                RT_BIT(3)
-#define CODEC_F00_0C_CAP_PRESENSE_DETECT                   RT_BIT(2)
-#define CODEC_F00_0C_CAP_TRIGGER_REQUIRED                  RT_BIT(1)
-#define CODEC_F00_0C_CAP_IMPENDANCE_SENSE                  RT_BIT(0)
-
-#define CODEC_F00_0C_IS_CAP_HBR(f00_0c)                    ((f00_0c) & RT_BIT(27))
-#define CODEC_F00_0C_IS_CAP_DP(f00_0c)                     ((f00_0c) & RT_BIT(24))
-#define CODEC_F00_0C_IS_CAP_EAPD(f00_0c)                   ((f00_0c) & RT_BIT(16))
-#define CODEC_F00_0C_IS_CAP_HDMI(f00_0c)                   ((f00_0c) & RT_BIT(7))
-#define CODEC_F00_0C_IS_CAP_BALANCED_IO(f00_0c)            ((f00_0c) & RT_BIT(6))
-#define CODEC_F00_0C_IS_CAP_INPUT(f00_0c)                  ((f00_0c) & RT_BIT(5))
-#define CODEC_F00_0C_IS_CAP_OUTPUT(f00_0c)                 ((f00_0c) & RT_BIT(4))
-#define CODEC_F00_0C_IS_CAP_HP(f00_0c)                     ((f00_0c) & RT_BIT(3))
-#define CODEC_F00_0C_IS_CAP_PRESENSE_DETECT(f00_0c)        ((f00_0c) & RT_BIT(2))
-#define CODEC_F00_0C_IS_CAP_TRIGGER_REQUIRED(f00_0c)       ((f00_0c) & RT_BIT(1))
-#define CODEC_F00_0C_IS_CAP_IMPENDANCE_SENSE(f00_0c)       ((f00_0c) & RT_BIT(0))
-
-/* Input Amplifier capabilities (7.3.4.10) */
-#define CODEC_MAKE_F00_0D(mute_cap, step_size, num_steps, offset) \
-        (  (((mute_cap) & 0x1) << 31)                             \
-         | (((step_size) & 0xFF) << 16)                           \
-         | (((num_steps) & 0xFF) << 8)                            \
-         | ((offset) & 0xFF))
-
-#define CODEC_F00_0D_CAP_MUTE                              RT_BIT(7)
-
-#define CODEC_F00_0D_IS_CAP_MUTE(f00_0d)                   ( ( f00_0d) & RT_BIT(31))
-#define CODEC_F00_0D_STEP_SIZE(f00_0d)                     ((( f00_0d) & (0x7F << 16)) >> 16)
-#define CODEC_F00_0D_NUM_STEPS(f00_0d)                     ((((f00_0d) & (0x7F << 8)) >> 8) + 1)
-#define CODEC_F00_0D_OFFSET(f00_0d)                        (  (f00_0d) & 0x7F)
-
-/* Output Amplifier capabilities (7.3.4.10) */
-#define CODEC_MAKE_F00_12                                  CODEC_MAKE_F00_0D
-
-#define CODEC_F00_12_IS_CAP_MUTE(f00_12)                   CODEC_F00_0D_IS_CAP_MUTE(f00_12)
-#define CODEC_F00_12_STEP_SIZE(f00_12)                     CODEC_F00_0D_STEP_SIZE(f00_12)
-#define CODEC_F00_12_NUM_STEPS(f00_12)                     CODEC_F00_0D_NUM_STEPS(f00_12)
-#define CODEC_F00_12_OFFSET(f00_12)                        CODEC_F00_0D_OFFSET(f00_12)
-
-/* Connection list lenght (7.3.4.11) */
-#define CODEC_MAKE_F00_0E(long_form, length)    \
-    (  (((long_form) & 0x1) << 7)               \
-     | ((length) & 0x7F))
-/* Indicates short-form NIDs. */
-#define CODEC_F00_0E_LIST_NID_SHORT                        0
-/* Indicates long-form NIDs. */
-#define CODEC_F00_0E_LIST_NID_LONG                         1
-#define CODEC_F00_0E_IS_LONG(f00_0e)                       RT_BOOL((f00_0e) & RT_BIT(7))
-#define CODEC_F00_0E_COUNT(f00_0e)                         ((f00_0e) & 0x7F)
-/* Supported Power States (7.3.4.12) */
-#define CODEC_F00_0F_EPSS                                  RT_BIT(31)
-#define CODEC_F00_0F_CLKSTOP                               RT_BIT(30)
-#define CODEC_F00_0F_S3D3                                  RT_BIT(29)
-#define CODEC_F00_0F_D3COLD                                RT_BIT(4)
-#define CODEC_F00_0F_D3                                    RT_BIT(3)
-#define CODEC_F00_0F_D2                                    RT_BIT(2)
-#define CODEC_F00_0F_D1                                    RT_BIT(1)
-#define CODEC_F00_0F_D0                                    RT_BIT(0)
-
-/* Processing capabilities 7.3.4.13 */
-#define CODEC_MAKE_F00_10(num, benign)                     ((((num) & 0xFF) << 8) | ((benign) & 0x1))
-#define CODEC_F00_10_NUM(f00_10)                           (((f00_10) & (0xFF << 8)) >> 8)
-#define CODEC_F00_10_BENING(f00_10)                        ((f00_10) & 0x1)
-
-/* CP/IO Count (7.3.4.14) */
-#define CODEC_MAKE_F00_11(wake, unsol, numgpi, numgpo, numgpio) \
-    (  (((wake) & 0x1) << 31)                                   \
-     | (((unsol) & 0x1) << 30)                                  \
-     | (((numgpi) & 0xFF) << 16)                                \
-     | (((numgpo) & 0xFF) << 8)                                 \
-     | ((numgpio) & 0xFF))
-
-/* Processing States (7.3.3.4) */
-#define CODEC_F03_OFF                                      (0)
-#define CODEC_F03_ON                                       RT_BIT(0)
-#define CODEC_F03_BENING                                   RT_BIT(1)
-/* Power States (7.3.3.10) */
-#define CODEC_MAKE_F05(reset, stopok, error, act, set)          \
-    (   (((reset) & 0x1) << 10)                                 \
-      | (((stopok) & 0x1) << 9)                                 \
-      | (((error) & 0x1) << 8)                                  \
-      | (((act) & 0x7) << 4)                                    \
-      | ((set) & 0x7))
-#define CODEC_F05_D3COLD                                   (4)
-#define CODEC_F05_D3                                       (3)
-#define CODEC_F05_D2                                       (2)
-#define CODEC_F05_D1                                       (1)
-#define CODEC_F05_D0                                       (0)
-
-#define CODEC_F05_IS_RESET(value)                          (((value) & RT_BIT(10)) != 0)
-#define CODEC_F05_IS_STOPOK(value)                         (((value) & RT_BIT(9)) != 0)
-#define CODEC_F05_IS_ERROR(value)                          (((value) & RT_BIT(8)) != 0)
-#define CODEC_F05_ACT(value)                               (((value) & 0x7) >> 4)
-#define CODEC_F05_SET(value)                               (((value) & 0x7))
-
-#define CODEC_F05_GE(p0, p1)                               ((p0) <= (p1))
-#define CODEC_F05_LE(p0, p1)                               ((p0) >= (p1))
-
-/* Pin Widged Control (7.3.3.13) */
-#define CODEC_F07_VREF_HIZ                                 (0)
-#define CODEC_F07_VREF_50                                  (0x1)
-#define CODEC_F07_VREF_GROUND                              (0x2)
-#define CODEC_F07_VREF_80                                  (0x4)
-#define CODEC_F07_VREF_100                                 (0x5)
-#define CODEC_F07_IN_ENABLE                                RT_BIT(5)
-#define CODEC_F07_OUT_ENABLE                               RT_BIT(6)
-#define CODEC_F07_OUT_H_ENABLE                             RT_BIT(7)
-
-/* Unsolicited enabled (7.3.3.14) */
-#define CODEC_MAKE_F08(enable, tag) ((((enable) & 1) << 7) | ((tag) & 0x3F))
-
-/* Converter formats (7.3.3.8) and (3.7.1) */
-#define CODEC_MAKE_A(fNonPCM, f44_1BaseRate, mult, div, bits, chan) \
-    (  (((fNonPCM) & 0x1) << 15)                                    \
-     | (((f44_1BaseRate) & 0x1) << 14)                              \
-     | (((mult) & 0x7) << 11)                                       \
-     | (((div) & 0x7) << 8)                                         \
-     | (((bits) & 0x7) << 4)                                        \
-     | ((chan) & 0xF))
-
-#define CODEC_A_TYPE                                       RT_BIT(15)
-#define CODEC_A_TYPE_PCM                                   (0)
-#define CODEC_A_TYPE_NON_PCM                               (1)
-
-#define CODEC_A_BASE                                       RT_BIT(14)
-#define CODEC_A_BASE_48KHZ                                 (0)
-#define CODEC_A_BASE_44KHZ                                 (1)
-
-#define CODEC_A_MULT_1X                                    (0)
-#define CODEC_A_MULT_2X                                    (1)
-#define CODEC_A_MULT_3X                                    (2)
-#define CODEC_A_MULT_4X                                    (3)
-
-#define CODEC_A_DIV_1X                                     (0)
-#define CODEC_A_DIV_2X                                     (1)
-#define CODEC_A_DIV_3X                                     (2)
-#define CODEC_A_DIV_4X                                     (3)
-#define CODEC_A_DIV_5X                                     (4)
-#define CODEC_A_DIV_6X                                     (5)
-#define CODEC_A_DIV_7X                                     (6)
-#define CODEC_A_DIV_8X                                     (7)
-
-#define CODEC_A_8_BIT                                      (0)
-#define CODEC_A_16_BIT                                     (1)
-#define CODEC_A_20_BIT                                     (2)
-#define CODEC_A_24_BIT                                     (3)
-#define CODEC_A_32_BIT                                     (4)
-
-#define CODEC_A_CHAN_MONO                                  (0)
-#define CODEC_A_CHAN_STEREO                                (1)
-
-/* Pin Sense (7.3.3.15) */
-#define CODEC_MAKE_F09_ANALOG(fPresent, impedance)  \
-(  (((fPresent) & 0x1) << 31)                       \
- | (((impedance) & 0x7FFFFFFF)))
-#define CODEC_F09_ANALOG_NA    0x7FFFFFFF
-#define CODEC_MAKE_F09_DIGITAL(fPresent, fELDValid) \
-(   (((fPresent) & 0x1) << 31)                      \
-  | (((fELDValid) & 0x1) << 30))
-
-#define CODEC_MAKE_F0C(lrswap, eapd, btl) ((((lrswap) & 1) << 2) | (((eapd) & 1) << 1) | ((btl) & 1))
-#define CODEC_FOC_IS_LRSWAP(f0c)                           RT_BOOL((f0c) & RT_BIT(2))
-#define CODEC_FOC_IS_EAPD(f0c)                             RT_BOOL((f0c) & RT_BIT(1))
-#define CODEC_FOC_IS_BTL(f0c)                              RT_BOOL((f0c) & RT_BIT(0))
-/* HDA spec 7.3.3.31 defines layout of configuration registers/verbs (0xF1C) */
-/* Configuration's port connection */
-#define CODEC_F1C_PORT_MASK                                (0x3)
-#define CODEC_F1C_PORT_SHIFT                               (30)
-
-#define CODEC_F1C_PORT_COMPLEX                             (0x0)
-#define CODEC_F1C_PORT_NO_PHYS                             (0x1)
-#define CODEC_F1C_PORT_FIXED                               (0x2)
-#define CODEC_F1C_BOTH                                     (0x3)
-
-/* Configuration default: connection */
-#define CODEC_F1C_PORT_MASK                                (0x3)
-#define CODEC_F1C_PORT_SHIFT                               (30)
-
-/* Connected to a jack (1/8", ATAPI, ...). */
-#define CODEC_F1C_PORT_COMPLEX                             (0x0)
-/* No physical connection. */
-#define CODEC_F1C_PORT_NO_PHYS                             (0x1)
-/* Fixed function device (integrated speaker, integrated mic, ...). */
-#define CODEC_F1C_PORT_FIXED                               (0x2)
-/* Both, a jack and an internal device are attached. */
-#define CODEC_F1C_BOTH                                     (0x3)
-
-/* Configuration default: Location */
-#define CODEC_F1C_LOCATION_MASK                            (0x3F)
-#define CODEC_F1C_LOCATION_SHIFT                           (24)
-
-/* [4:5] bits of location region means chassis attachment */
-#define CODEC_F1C_LOCATION_PRIMARY_CHASSIS                 (0)
-#define CODEC_F1C_LOCATION_INTERNAL                        RT_BIT(4)
-#define CODEC_F1C_LOCATION_SECONDRARY_CHASSIS              RT_BIT(5)
-#define CODEC_F1C_LOCATION_OTHER                           RT_BIT(5)
-
-/* [0:3] bits of location region means geometry location attachment */
-#define CODEC_F1C_LOCATION_NA                              (0)
-#define CODEC_F1C_LOCATION_REAR                            (0x1)
-#define CODEC_F1C_LOCATION_FRONT                           (0x2)
-#define CODEC_F1C_LOCATION_LEFT                            (0x3)
-#define CODEC_F1C_LOCATION_RIGTH                           (0x4)
-#define CODEC_F1C_LOCATION_TOP                             (0x5)
-#define CODEC_F1C_LOCATION_BOTTOM                          (0x6)
-#define CODEC_F1C_LOCATION_SPECIAL_0                       (0x7)
-#define CODEC_F1C_LOCATION_SPECIAL_1                       (0x8)
-#define CODEC_F1C_LOCATION_SPECIAL_2                       (0x9)
-
-/* Configuration default: Device type */
-#define CODEC_F1C_DEVICE_MASK                              (0xF)
-#define CODEC_F1C_DEVICE_SHIFT                             (20)
-#define CODEC_F1C_DEVICE_LINE_OUT                          (0)
-#define CODEC_F1C_DEVICE_SPEAKER                           (0x1)
-#define CODEC_F1C_DEVICE_HP                                (0x2)
-#define CODEC_F1C_DEVICE_CD                                (0x3)
-#define CODEC_F1C_DEVICE_SPDIF_OUT                         (0x4)
-#define CODEC_F1C_DEVICE_DIGITAL_OTHER_OUT                 (0x5)
-#define CODEC_F1C_DEVICE_MODEM_LINE_SIDE                   (0x6)
-#define CODEC_F1C_DEVICE_MODEM_HANDSET_SIDE                (0x7)
-#define CODEC_F1C_DEVICE_LINE_IN                           (0x8)
-#define CODEC_F1C_DEVICE_AUX                               (0x9)
-#define CODEC_F1C_DEVICE_MIC                               (0xA)
-#define CODEC_F1C_DEVICE_PHONE                             (0xB)
-#define CODEC_F1C_DEVICE_SPDIF_IN                          (0xC)
-#define CODEC_F1C_DEVICE_RESERVED                          (0xE)
-#define CODEC_F1C_DEVICE_OTHER                             (0xF)
-
-/* Configuration default: Connection type */
-#define CODEC_F1C_CONNECTION_TYPE_MASK                     (0xF)
-#define CODEC_F1C_CONNECTION_TYPE_SHIFT                    (16)
-
-#define CODEC_F1C_CONNECTION_TYPE_UNKNOWN                  (0)
-#define CODEC_F1C_CONNECTION_TYPE_1_8INCHES                (0x1)
-#define CODEC_F1C_CONNECTION_TYPE_1_4INCHES                (0x2)
-#define CODEC_F1C_CONNECTION_TYPE_ATAPI                    (0x3)
-#define CODEC_F1C_CONNECTION_TYPE_RCA                      (0x4)
-#define CODEC_F1C_CONNECTION_TYPE_OPTICAL                  (0x5)
-#define CODEC_F1C_CONNECTION_TYPE_OTHER_DIGITAL            (0x6)
-#define CODEC_F1C_CONNECTION_TYPE_ANALOG                   (0x7)
-#define CODEC_F1C_CONNECTION_TYPE_DIN                      (0x8)
-#define CODEC_F1C_CONNECTION_TYPE_XLR                      (0x9)
-#define CODEC_F1C_CONNECTION_TYPE_RJ_11                    (0xA)
-#define CODEC_F1C_CONNECTION_TYPE_COMBO                    (0xB)
-#define CODEC_F1C_CONNECTION_TYPE_OTHER                    (0xF)
-
-/* Configuration's color */
-#define CODEC_F1C_COLOR_MASK                               (0xF)
-#define CODEC_F1C_COLOR_SHIFT                              (12)
-#define CODEC_F1C_COLOR_UNKNOWN                            (0)
-#define CODEC_F1C_COLOR_BLACK                              (0x1)
-#define CODEC_F1C_COLOR_GREY                               (0x2)
-#define CODEC_F1C_COLOR_BLUE                               (0x3)
-#define CODEC_F1C_COLOR_GREEN                              (0x4)
-#define CODEC_F1C_COLOR_RED                                (0x5)
-#define CODEC_F1C_COLOR_ORANGE                             (0x6)
-#define CODEC_F1C_COLOR_YELLOW                             (0x7)
-#define CODEC_F1C_COLOR_PURPLE                             (0x8)
-#define CODEC_F1C_COLOR_PINK                               (0x9)
-#define CODEC_F1C_COLOR_RESERVED_0                         (0xA)
-#define CODEC_F1C_COLOR_RESERVED_1                         (0xB)
-#define CODEC_F1C_COLOR_RESERVED_2                         (0xC)
-#define CODEC_F1C_COLOR_RESERVED_3                         (0xD)
-#define CODEC_F1C_COLOR_WHITE                              (0xE)
-#define CODEC_F1C_COLOR_OTHER                              (0xF)
-
-/* Configuration's misc */
-#define CODEC_F1C_MISC_MASK                                (0xF)
-#define CODEC_F1C_MISC_SHIFT                               (8)
-#define CODEC_F1C_MISC_JACK_DETECT                         (0)
-#define CODEC_F1C_MISC_RESERVED_0                          (1)
-#define CODEC_F1C_MISC_RESERVED_1                          (2)
-#define CODEC_F1C_MISC_RESERVED_2                          (3)
-
-/* Configuration default: Association */
-#define CODEC_F1C_ASSOCIATION_MASK                         (0xF)
-#define CODEC_F1C_ASSOCIATION_SHIFT                        (4)
-
-/* Reserved; don't use. */
-#define CODEC_F1C_ASSOCIATION_INVALID                      0x0
-#define CODEC_F1C_ASSOCIATION_GROUP_0                      0x1
-#define CODEC_F1C_ASSOCIATION_GROUP_1                      0x2
-#define CODEC_F1C_ASSOCIATION_GROUP_2                      0x3
-#define CODEC_F1C_ASSOCIATION_GROUP_3                      0x4
-#define CODEC_F1C_ASSOCIATION_GROUP_4                      0x5
-#define CODEC_F1C_ASSOCIATION_GROUP_5                      0x6
-#define CODEC_F1C_ASSOCIATION_GROUP_6                      0x7
-#define CODEC_F1C_ASSOCIATION_GROUP_7                      0x8
-#define CODEC_F1C_ASSOCIATION_GROUP_15                     0xF
-
-/* Configuration default: Association Sequence */
-#define CODEC_F1C_SEQ_MASK                                 (0xF)
-#define CODEC_F1C_SEQ_SHIFT                                (0)
-
-/* Implementation identification (7.3.3.30) */
-#define CODEC_MAKE_F20(bmid, bsku, aid)     \
-    (  (((bmid) & 0xFFFF) << 16)            \
-     | (((bsku) & 0xFF) << 8)               \
-     | (((aid) & 0xFF))                     \
-    )
-
-/* macro definition helping in filling the configuration registers. */
-#define CODEC_MAKE_F1C(port_connectivity, location, device, connection_type, color, misc, association, sequence)    \
-    (  ((port_connectivity) << CODEC_F1C_PORT_SHIFT)          \
-     | ((location) << CODEC_F1C_LOCATION_SHIFT)               \
-     | ((device) << CODEC_F1C_DEVICE_SHIFT)                   \
-     | ((connection_type) << CODEC_F1C_CONNECTION_TYPE_SHIFT) \
-     | ((color) << CODEC_F1C_COLOR_SHIFT)                     \
-     | ((misc) << CODEC_F1C_MISC_SHIFT)                       \
-     | ((association) << CODEC_F1C_ASSOCIATION_SHIFT)         \
-     | ((sequence)))
-
-
-/*********************************************************************************************************************************
-*   Structures and Typedefs                                                                                                      *
-*********************************************************************************************************************************/
-/** The F00 parameter length (in dwords). */
-#define CODECNODE_F00_PARAM_LENGTH  20
-/** The F02 parameter length (in dwords). */
-#define CODECNODE_F02_PARAM_LENGTH  16
-
-/**
- * Common (or core) codec node structure.
- */
-typedef struct CODECCOMMONNODE
-{
-    /** Node id - 7 bit format */
-    uint8_t         id;
-    /** The node name. */
-    char const     *pszName;
-    /* PRM 5.3.6 */
-    uint32_t au32F00_param[CODECNODE_F00_PARAM_LENGTH];
-    uint32_t au32F02_param[CODECNODE_F02_PARAM_LENGTH];
-} CODECCOMMONNODE;
-typedef CODECCOMMONNODE *PCODECCOMMONNODE;
-AssertCompile(CODECNODE_F00_PARAM_LENGTH == 20);  /* saved state */
-AssertCompile(CODECNODE_F02_PARAM_LENGTH == 16); /* saved state */
-
-/**
- * Compile time assertion on the expected node size.
- */
-#define AssertNodeSize(a_Node, a_cParams) \
-    AssertCompile((a_cParams) <= (60 + 6)); /* the max size - saved state */ \
-    AssertCompile(   sizeof(a_Node) - sizeof(CODECCOMMONNODE)  \
-                  == (((a_cParams) * sizeof(uint32_t) + sizeof(void *) - 1) & ~(sizeof(void *) - 1)) )
-
-typedef struct ROOTCODECNODE
-{
-    CODECCOMMONNODE node;
-} ROOTCODECNODE, *PROOTCODECNODE;
-AssertNodeSize(ROOTCODECNODE, 0);
-
-#define AMPLIFIER_SIZE 60
-typedef uint32_t AMPLIFIER[AMPLIFIER_SIZE];
-#define AMPLIFIER_IN    0
-#define AMPLIFIER_OUT   1
-#define AMPLIFIER_LEFT  1
-#define AMPLIFIER_RIGHT 0
-#define AMPLIFIER_REGISTER(amp, inout, side, index) ((amp)[30*(inout) + 15*(side) + (index)])
-typedef struct DACNODE
-{
-    CODECCOMMONNODE node;
-    uint32_t    u32F0d_param;
-    uint32_t    u32F04_param;
-    uint32_t    u32F05_param;
-    uint32_t    u32F06_param;
-    uint32_t    u32F0c_param;
-
-    uint32_t    u32A_param;
-    AMPLIFIER B_params;
-
-} DACNODE, *PDACNODE;
-AssertNodeSize(DACNODE, 6 + 60);
-
-typedef struct ADCNODE
-{
-    CODECCOMMONNODE node;
-    uint32_t    u32F03_param;
-    uint32_t    u32F05_param;
-    uint32_t    u32F06_param;
-    uint32_t    u32F09_param;
-
-    uint32_t    u32A_param;
-    uint32_t    u32F01_param;
-    AMPLIFIER   B_params;
-} ADCNODE, *PADCNODE;
-AssertNodeSize(DACNODE, 6 + 60);
-
-typedef struct SPDIFOUTNODE
-{
-    CODECCOMMONNODE node;
-    uint32_t    u32F05_param;
-    uint32_t    u32F06_param;
-    uint32_t    u32F09_param;
-    uint32_t    u32F0d_param;
-
-    uint32_t    u32A_param;
-    AMPLIFIER   B_params;
-} SPDIFOUTNODE, *PSPDIFOUTNODE;
-AssertNodeSize(SPDIFOUTNODE, 5 + 60);
-
-typedef struct SPDIFINNODE
-{
-    CODECCOMMONNODE node;
-    uint32_t    u32F05_param;
-    uint32_t    u32F06_param;
-    uint32_t    u32F09_param;
-    uint32_t    u32F0d_param;
-
-    uint32_t    u32A_param;
-    AMPLIFIER   B_params;
-} SPDIFINNODE, *PSPDIFINNODE;
-AssertNodeSize(SPDIFINNODE, 5 + 60);
-
-typedef struct AFGCODECNODE
-{
-    CODECCOMMONNODE node;
-    uint32_t  u32F05_param;
-    uint32_t  u32F08_param;
-    uint32_t  u32F20_param;
-    uint32_t  u32F17_param;
-} AFGCODECNODE, *PAFGCODECNODE;
-AssertNodeSize(AFGCODECNODE, 4);
-
-typedef struct PORTNODE
-{
-    CODECCOMMONNODE node;
-    uint32_t u32F07_param;
-    uint32_t u32F08_param;
-    uint32_t u32F09_param;
-    uint32_t u32F01_param;
-    uint32_t u32F1c_param;
-    AMPLIFIER   B_params;
-} PORTNODE, *PPORTNODE;
-AssertNodeSize(PORTNODE, 5 + 60);
-
-typedef struct DIGOUTNODE
-{
-    CODECCOMMONNODE node;
-    uint32_t u32F01_param;
-    uint32_t u32F08_param;
-    uint32_t u32F07_param;
-    uint32_t u32F09_param;
-    uint32_t u32F1c_param;
-} DIGOUTNODE, *PDIGOUTNODE;
-AssertNodeSize(DIGOUTNODE, 5);
-
-typedef struct DIGINNODE
-{
-    CODECCOMMONNODE node;
-    uint32_t u32F05_param;
-    uint32_t u32F07_param;
-    uint32_t u32F08_param;
-    uint32_t u32F09_param;
-    uint32_t u32F0c_param;
-    uint32_t u32F1c_param;
-    uint32_t u32F1e_param;
-} DIGINNODE, *PDIGINNODE;
-AssertNodeSize(DIGINNODE, 7);
-
-typedef struct ADCMUXNODE
-{
-    CODECCOMMONNODE node;
-    uint32_t    u32F01_param;
-
-    uint32_t    u32A_param;
-    AMPLIFIER   B_params;
-} ADCMUXNODE, *PADCMUXNODE;
-AssertNodeSize(ADCMUXNODE, 2 + 60);
-
-typedef struct PCBEEPNODE
-{
-    CODECCOMMONNODE node;
-    uint32_t    u32F07_param;
-    uint32_t    u32F0a_param;
-
-    uint32_t    u32A_param;
-    AMPLIFIER   B_params;
-    uint32_t    u32F1c_param;
-} PCBEEPNODE, *PPCBEEPNODE;
-AssertNodeSize(PCBEEPNODE, 3 + 60 + 1);
-
-typedef struct CDNODE
-{
-    CODECCOMMONNODE node;
-    uint32_t u32F07_param;
-    uint32_t u32F1c_param;
-} CDNODE, *PCDNODE;
-AssertNodeSize(CDNODE, 2);
-
-typedef struct VOLUMEKNOBNODE
-{
-    CODECCOMMONNODE node;
-    uint32_t    u32F08_param;
-    uint32_t    u32F0f_param;
-} VOLUMEKNOBNODE, *PVOLUMEKNOBNODE;
-AssertNodeSize(VOLUMEKNOBNODE, 2);
-
-typedef struct ADCVOLNODE
-{
-    CODECCOMMONNODE node;
-    uint32_t    u32F0c_param;
-    uint32_t    u32F01_param;
-    uint32_t    u32A_params;
-    AMPLIFIER   B_params;
-} ADCVOLNODE, *PADCVOLNODE;
-AssertNodeSize(ADCVOLNODE, 3 + 60);
-
-typedef struct RESNODE
-{
-    CODECCOMMONNODE node;
-    uint32_t    u32F05_param;
-    uint32_t    u32F06_param;
-    uint32_t    u32F07_param;
-    uint32_t    u32F1c_param;
-} RESNODE, *PRESNODE;
-AssertNodeSize(RESNODE, 4);
-
-/**
- * Used for the saved state.
- */
-typedef struct CODECSAVEDSTATENODE
-{
-    CODECCOMMONNODE Core;
-    uint32_t        au32Params[60 + 6];
-} CODECSAVEDSTATENODE;
-AssertNodeSize(CODECSAVEDSTATENODE, 60 + 6);
-
-typedef union CODECNODE
-{
-    CODECCOMMONNODE node;
-    ROOTCODECNODE   root;
-    AFGCODECNODE    afg;
-    DACNODE         dac;
-    ADCNODE         adc;
-    SPDIFOUTNODE    spdifout;
-    SPDIFINNODE     spdifin;
-    PORTNODE        port;
-    DIGOUTNODE      digout;
-    DIGINNODE       digin;
-    ADCMUXNODE      adcmux;
-    PCBEEPNODE      pcbeep;
-    CDNODE          cdnode;
-    VOLUMEKNOBNODE  volumeKnob;
-    ADCVOLNODE      adcvol;
-    RESNODE         reserved;
-    CODECSAVEDSTATENODE SavedState;
-} CODECNODE, *PCODECNODE;
-AssertNodeSize(CODECNODE, 60 + 6);
-
-
-/*********************************************************************************************************************************
-*   Global Variables                                                                                                             *
-*********************************************************************************************************************************/
-/* STAC9220 - Nodes IDs / names. */
-#define STAC9220_NID_ROOT                                  0x0  /* Root node */
-#define STAC9220_NID_AFG                                   0x1  /* Audio Configuration Group */
-#define STAC9220_NID_DAC0                                  0x2  /* Out */
-#define STAC9220_NID_DAC1                                  0x3  /* Out */
-#define STAC9220_NID_DAC2                                  0x4  /* Out */
-#define STAC9220_NID_DAC3                                  0x5  /* Out */
-#define STAC9220_NID_ADC0                                  0x6  /* In */
-#define STAC9220_NID_ADC1                                  0x7  /* In */
-#define STAC9220_NID_SPDIF_OUT                             0x8  /* Out */
-#define STAC9220_NID_SPDIF_IN                              0x9  /* In */
-#define STAC9220_NID_PIN_HEADPHONE0                        0xA  /* In, Out */
-#define STAC9220_NID_PIN_B                                 0xB  /* In, Out */
-#define STAC9220_NID_PIN_C                                 0xC  /* In, Out */
-#define STAC9220_NID_PIN_HEADPHONE1                        0xD  /* In, Out */
-#define STAC9220_NID_PIN_E                                 0xE  /* In */
-#define STAC9220_NID_PIN_F                                 0xF  /* In, Out */
-#define STAC9220_NID_PIN_SPDIF_OUT                         0x10 /* Out */
-#define STAC9220_NID_PIN_SPDIF_IN                          0x11 /* In */
-#define STAC9220_NID_ADC0_MUX                              0x12 /* In */
-#define STAC9220_NID_ADC1_MUX                              0x13 /* In */
-#define STAC9220_NID_PCBEEP                                0x14 /* Out */
-#define STAC9220_NID_PIN_CD                                0x15 /* In */
-#define STAC9220_NID_VOL_KNOB                              0x16
-#define STAC9220_NID_AMP_ADC0                              0x17 /* In */
-#define STAC9220_NID_AMP_ADC1                              0x18 /* In */
-/* STAC9221. */
-#define STAC9221_NID_ADAT_OUT                              0x19 /* Out */
-#define STAC9221_NID_I2S_OUT                               0x1A /* Out */
-#define STAC9221_NID_PIN_I2S_OUT                           0x1B /* Out */
-
-#if 1
-/* STAC9220 - Referenced thru STAC9220WIDGET in the constructor below. */
-static uint8_t const g_abStac9220Ports[]      = { 0x0A, 0xB, 0xC, 0xD, 0xE, 0xF, 0};
-static uint8_t const g_abStac9220Dacs[]       = { 0x02, 0x3, 0x4, 0x5, 0};
-static uint8_t const g_abStac9220Adcs[]       = { 0x06, 0x7, 0};
-static uint8_t const g_abStac9220SpdifOuts[]  = { 0x08, 0 };
-static uint8_t const g_abStac9220SpdifIns[]   = { 0x09, 0 };
-static uint8_t const g_abStac9220DigOutPins[] = { 0x10, 0 };
-static uint8_t const g_abStac9220DigInPins[]  = { 0x11, 0 };
-static uint8_t const g_abStac9220AdcVols[]    = { 0x17, 0x18, 0};
-static uint8_t const g_abStac9220AdcMuxs[]    = { 0x12, 0x13, 0};
-static uint8_t const g_abStac9220Pcbeeps[]    = { 0x14, 0 };
-static uint8_t const g_abStac9220Cds[]        = { 0x15, 0 };
-static uint8_t const g_abStac9220VolKnobs[]   = { 0x16, 0 };
-static uint8_t const g_abStac9220Reserveds[]  = { 0x09, 0x19, 0x1a, 0x1b, 0 };
-#else /** @todo Enable this after 5.0 -- needs more testing first. */
-static uint8_t const g_abStac9220Ports[]      = { STAC9220_NID_PIN_HEADPHONE0, STAC9220_NID_PIN_B, STAC9220_NID_PIN_C, STAC9220_NID_PIN_HEADPHONE1, STAC9220_NID_PIN_E, STAC9220_NID_PIN_F, 0};
-static uint8_t const g_abStac9220Dacs[]       = { STAC9220_NID_DAC0, STAC9220_NID_DAC1, STAC9220_NID_DAC2, STAC9220_NID_DAC3, 0};
-static uint8_t const g_abStac9220Adcs[]       = { STAC9220_NID_ADC0, STAC9220_NID_ADC1, 0};
-static uint8_t const g_abStac9220SpdifOuts[]  = { STAC9220_NID_SPDIF_OUT, 0 };
-static uint8_t const g_abStac9220SpdifIns[]   = { STAC9220_NID_SPDIF_IN, 0 };
-static uint8_t const g_abStac9220DigOutPins[] = { STAC9220_NID_PIN_SPDIF_OUT, 0 };
-static uint8_t const g_abStac9220DigInPins[]  = { STAC9220_NID_PIN_SPDIF_IN, 0 };
-static uint8_t const g_abStac9220AdcVols[]    = { STAC9220_NID_AMP_ADC0, STAC9220_NID_AMP_ADC1, 0};
-static uint8_t const g_abStac9220AdcMuxs[]    = { STAC9220_NID_ADC0_MUX, STAC9220_NID_ADC1_MUX, 0};
-static uint8_t const g_abStac9220Pcbeeps[]    = { STAC9220_NID_PCBEEP, 0 };
-static uint8_t const g_abStac9220Cds[]        = { STAC9220_NID_PIN_CD, 0 };
-static uint8_t const g_abStac9220VolKnobs[]   = { STAC9220_NID_VOL_KNOB, 0 };
-/* STAC 9221. */
-/** @todo Is STAC9220_NID_SPDIF_IN really correct for reserved nodes? */
-static uint8_t const g_abStac9220Reserveds[]  = { STAC9220_NID_SPDIF_IN, STAC9221_NID_ADAT_OUT, STAC9221_NID_I2S_OUT, STAC9221_NID_PIN_I2S_OUT, 0 };
-#endif
-
-/** SSM description of a CODECNODE. */
-static SSMFIELD const g_aCodecNodeFields[] =
-{
-    SSMFIELD_ENTRY(     CODECSAVEDSTATENODE, Core.id),
-    SSMFIELD_ENTRY_PAD_HC_AUTO(3, 3),
-    SSMFIELD_ENTRY(     CODECSAVEDSTATENODE, Core.au32F00_param),
-    SSMFIELD_ENTRY(     CODECSAVEDSTATENODE, Core.au32F02_param),
-    SSMFIELD_ENTRY(     CODECSAVEDSTATENODE, au32Params),
-    SSMFIELD_ENTRY_TERM()
-};
-
-/** Backward compatibility with v1 of the CODECNODE. */
-static SSMFIELD const g_aCodecNodeFieldsV1[] =
-{
-    SSMFIELD_ENTRY(     CODECSAVEDSTATENODE, Core.id),
-    SSMFIELD_ENTRY_PAD_HC_AUTO(3, 7),
-    SSMFIELD_ENTRY_OLD_HCPTR(Core.name),
-    SSMFIELD_ENTRY(     CODECSAVEDSTATENODE, Core.au32F00_param),
-    SSMFIELD_ENTRY(     CODECSAVEDSTATENODE, Core.au32F02_param),
-    SSMFIELD_ENTRY(     CODECSAVEDSTATENODE, au32Params),
-    SSMFIELD_ENTRY_TERM()
-};
-
-
-
-
-static DECLCALLBACK(void) stac9220DbgNodes(PHDACODEC pThis, PCDBGFINFOHLP pHlp, const char *pszArgs)
-{
-    for (int i = 1; i < 12; i++)
-    {
-        PCODECNODE pNode = &pThis->paNodes[i];
-        AMPLIFIER *pAmp = &pNode->dac.B_params;
-
-        uint8_t lVol = AMPLIFIER_REGISTER(*pAmp, AMPLIFIER_OUT, AMPLIFIER_LEFT, 0) & 0x7f;
-        uint8_t rVol = AMPLIFIER_REGISTER(*pAmp, AMPLIFIER_OUT, AMPLIFIER_RIGHT, 0) & 0x7f;
-
-        pHlp->pfnPrintf(pHlp, "0x%x: lVol=%RU8, rVol=%RU8\n", i, lVol, rVol);
-    }
-}
-
-
-static DECLCALLBACK(int) stac9220ResetNode(PHDACODEC pThis, uint8_t nodenum, PCODECNODE pNode)
-{
-    pNode->node.id = nodenum;
-    pNode->node.au32F00_param[0xF] = 0; /* Power statest Supported: are the same as AFG reports */
-    switch (nodenum)
-    {
-        /* Root Node*/
-        case 0:
-            pNode->node.au32F00_param[0x02] = CODEC_MAKE_F00_02(0x1, 0x0, 0x34, 0x1); /* rev id */
-            break;
-        case 1:
-            pNode->node.au32F00_param[0x08] = CODEC_MAKE_F00_08(1, 0xd, 0xd);
-            pNode->node.au32F00_param[0x0C] = CODEC_MAKE_F00_0C(0x17)
-                                            | CODEC_F00_0C_CAP_BALANCED_IO
-                                            | CODEC_F00_0C_CAP_INPUT
-                                            | CODEC_F00_0C_CAP_PRESENSE_DETECT
-                                            | CODEC_F00_0C_CAP_TRIGGER_REQUIRED
-                                            | CODEC_F00_0C_CAP_IMPENDANCE_SENSE;//(17 << 8)|RT_BIT(6)|RT_BIT(5)|RT_BIT(2)|RT_BIT(1)|RT_BIT(0);
-            pNode->node.au32F00_param[0x0B] = CODEC_F00_0B_PCM;
-            pNode->node.au32F00_param[0x0D] = CODEC_MAKE_F00_0D(1, 0x5, 0xE, 0);//RT_BIT(31)|(0x5 << 16)|(0xE)<<8;
-            pNode->node.au32F00_param[0x12] = RT_BIT(31)|(0x2 << 16)|(0x7f << 8)|0x7f;
-            pNode->node.au32F00_param[0x11] = CODEC_MAKE_F00_11(1, 1, 0, 0, 4);//0xc0000004;
-            pNode->node.au32F00_param[0x0F] = CODEC_F00_0F_D3|CODEC_F00_0F_D2|CODEC_F00_0F_D1|CODEC_F00_0F_D0;
-            pNode->afg.u32F05_param = CODEC_MAKE_F05(0, 0, 0, CODEC_F05_D2, CODEC_F05_D2);//0x2 << 4| 0x2; /* PS-Act: D3, PS->Set D3  */
-            pNode->afg.u32F08_param = 0;
-            pNode->afg.u32F17_param = 0;
-            break;
-        case 2:
-        case 3:
-        case 4:
-        case 5:
-            memset(pNode->dac.B_params, 0, AMPLIFIER_SIZE);
-            pNode->dac.u32A_param = CODEC_MAKE_A(0, 1, CODEC_A_MULT_1X, CODEC_A_DIV_1X, CODEC_A_16_BIT, 1);//RT_BIT(14)|(0x1 << 4)|0x1; /* 44100Hz/16bit/2ch */
-
-            AMPLIFIER_REGISTER(pNode->dac.B_params, AMPLIFIER_OUT, AMPLIFIER_LEFT, 0) = 0x7F | RT_BIT(7);
-            AMPLIFIER_REGISTER(pNode->dac.B_params, AMPLIFIER_OUT, AMPLIFIER_RIGHT, 0) = 0x7F | RT_BIT(7);
-
-            pNode->dac.node.au32F00_param[9] = CODEC_MAKE_F00_09(CODEC_F00_09_TYPE_AUDIO_OUTPUT, 0xD, 0)
-                                             | CODEC_F00_09_CAP_L_R_SWAP
-                                             | CODEC_F00_09_CAP_POWER_CTRL
-                                             | CODEC_F00_09_CAP_OUT_AMP_PRESENT
-                                             | CODEC_F00_09_CAP_LSB;//(0xD << 16) | RT_BIT(11) |  RT_BIT(10) | RT_BIT(2) | RT_BIT(0);
-            pNode->dac.u32F0c_param = 0;
-            pNode->dac.u32F05_param = CODEC_MAKE_F05(0, 0, 0, CODEC_F05_D3, CODEC_F05_D3);//0x3 << 4 | 0x3; /* PS-Act: D3, Set: D3  */
-            break;
-        case 6:
-            pNode->node.au32F02_param[0] = 0x17;
-            goto adc_init;
-        case 7:
-            pNode->node.au32F02_param[0] = 0x18;
-        adc_init:
-            pNode->adc.u32A_param = CODEC_MAKE_A(0, 1, CODEC_A_MULT_1X, CODEC_A_DIV_1X, CODEC_A_16_BIT, 1);//RT_BIT(14)|(0x1 << 3)|0x1; /* 44100Hz/16bit/2ch */
-            pNode->adc.node.au32F00_param[0xE] = CODEC_MAKE_F00_0E(0, 1);//RT_BIT(0);
-            pNode->adc.u32F03_param = RT_BIT(0);
-            pNode->adc.u32F05_param = CODEC_MAKE_F05(0, 0, 0, CODEC_F05_D3, CODEC_F05_D3);//0x3 << 4 | 0x3; /* PS-Act: D3 Set: D3 */
-            pNode->adc.u32F06_param = 0;
-            pNode->adc.node.au32F00_param[9] = CODEC_MAKE_F00_09(CODEC_F00_09_TYPE_AUDIO_INPUT, 0xD, 0)
-                                             | CODEC_F00_09_CAP_POWER_CTRL
-                                             | CODEC_F00_09_CAP_CONNECTION_LIST
-                                             | CODEC_F00_09_CAP_PROC_WIDGET
-                                             | CODEC_F00_09_CAP_LSB;//RT_BIT(20)| (0xd << 16) |  RT_BIT(10) | RT_BIT(8) | RT_BIT(6)| RT_BIT(0);
-            break;
-        case 8:
-            pNode->spdifout.u32A_param = CODEC_MAKE_A(0, 1, CODEC_A_MULT_1X, CODEC_A_DIV_1X, CODEC_A_16_BIT, 1);//(1<<14)|(0x1<<4) | 0x1;
-            pNode->spdifout.node.au32F00_param[9] = CODEC_MAKE_F00_09(CODEC_F00_09_TYPE_AUDIO_OUTPUT, 0x4, 0)
-                                                  | CODEC_F00_09_CAP_DIGITAL
-                                                  | CODEC_F00_09_CAP_FMT_OVERRIDE
-                                                  | CODEC_F00_09_CAP_LSB;//(4 << 16) | RT_BIT(9)|RT_BIT(4)|0x1;
-            pNode->node.au32F00_param[0xa] = pThis->paNodes[1].node.au32F00_param[0xA];
-            pNode->spdifout.node.au32F00_param[0xB] = CODEC_F00_0B_PCM;
-            pNode->spdifout.u32F06_param = 0;
-            pNode->spdifout.u32F0d_param = 0;
-            break;
-        case 9:
-            pNode->spdifin.u32A_param = CODEC_MAKE_A(0, 1, CODEC_A_MULT_1X, CODEC_A_DIV_1X, CODEC_A_16_BIT, 1);//(0x1<<4) | 0x1;
-            pNode->spdifin.node.au32F00_param[9] = CODEC_MAKE_F00_09(CODEC_F00_09_TYPE_AUDIO_INPUT, 0x4, 0)
-                                                 | CODEC_F00_09_CAP_DIGITAL
-                                                 | CODEC_F00_09_CAP_CONNECTION_LIST
-                                                 | CODEC_F00_09_CAP_FMT_OVERRIDE
-                                                 | CODEC_F00_09_CAP_LSB;//(0x1 << 20)|(4 << 16) | RT_BIT(9)| RT_BIT(8)|RT_BIT(4)|0x1;
-            pNode->node.au32F00_param[0xA] = pThis->paNodes[1].node.au32F00_param[0xA];
-            pNode->node.au32F00_param[0xE] = CODEC_MAKE_F00_0E(0, 1);//RT_BIT(0);
-            pNode->node.au32F02_param[0] = 0x11;
-            pNode->spdifin.node.au32F00_param[0xB] = CODEC_F00_0B_PCM;
-            pNode->spdifin.u32F06_param = 0;
-            pNode->spdifin.u32F0d_param = 0;
-            break;
-        case 0xA:
-            pNode->node.au32F00_param[0xC] = CODEC_MAKE_F00_0C(0x17)
-                                           | CODEC_F00_0C_CAP_INPUT
-                                           | CODEC_F00_0C_CAP_OUTPUT
-                                           | CODEC_F00_0C_CAP_HP
-                                           | CODEC_F00_0C_CAP_PRESENSE_DETECT
-                                           | CODEC_F00_0C_CAP_TRIGGER_REQUIRED
-                                           | CODEC_F00_0C_CAP_IMPENDANCE_SENSE;//0x173f;
-            pNode->node.au32F02_param[0] = 0x2;
-            pNode->port.u32F07_param = CODEC_F07_IN_ENABLE
-                                     | CODEC_F07_OUT_ENABLE;
-            pNode->port.u32F08_param = 0;
-            if (!pThis->fInReset)
-                pNode->port.u32F1c_param = CODEC_MAKE_F1C(CODEC_F1C_PORT_COMPLEX,
-                                                          CODEC_F1C_LOCATION_FRONT,
-                                                          CODEC_F1C_DEVICE_HP,
-                                                          CODEC_F1C_CONNECTION_TYPE_1_8INCHES,
-                                                          CODEC_F1C_COLOR_GREEN,
-                                                          CODEC_F1C_MISC_JACK_DETECT,
-                                                          0x2, 0);//RT_MAKE_U32_FROM_U8(0x20, 0x40, 0x21, 0x02);
-            pNode->port.u32F09_param = CODEC_MAKE_F09_ANALOG(0, CODEC_F09_ANALOG_NA);//0x7fffffff;
-            goto port_init;
-        case 0xB:
-            pNode->node.au32F00_param[0xC] = CODEC_MAKE_F00_0C(0x17)
-                                           | CODEC_F00_0C_CAP_INPUT
-                                           | CODEC_F00_0C_CAP_OUTPUT
-                                           | CODEC_F00_0C_CAP_PRESENSE_DETECT
-                                           | CODEC_F00_0C_CAP_TRIGGER_REQUIRED
-                                           | CODEC_F00_0C_CAP_IMPENDANCE_SENSE;//0x1737;
-            pNode->node.au32F02_param[0] = 0x4;
-            pNode->port.u32F07_param = CODEC_F07_IN_ENABLE;
-            if (!pThis->fInReset)
-                pNode->port.u32F1c_param = CODEC_MAKE_F1C(CODEC_F1C_PORT_COMPLEX,
-                                                          CODEC_F1C_LOCATION_INTERNAL|CODEC_F1C_LOCATION_REAR,
-                                                          CODEC_F1C_DEVICE_SPEAKER,
-                                                          CODEC_F1C_CONNECTION_TYPE_1_8INCHES,
-                                                          CODEC_F1C_COLOR_BLACK,
-                                                          CODEC_F1C_MISC_JACK_DETECT,
-                                                          0x1, 0x1);//RT_MAKE_U32_FROM_U8(0x11, 0x60, 0x11, 0x01);
-            pNode->port.u32F09_param = CODEC_MAKE_F09_ANALOG(1, CODEC_F09_ANALOG_NA);//RT_BIT(31)|0x7fffffff;
-            goto port_init;
-        case 0xC:
-            pNode->node.au32F02_param[0] = 0x3;
-            pNode->node.au32F00_param[0xC] = CODEC_MAKE_F00_0C(0x17)
-                                           | CODEC_F00_0C_CAP_INPUT
-                                           | CODEC_F00_0C_CAP_OUTPUT
-                                           | CODEC_F00_0C_CAP_PRESENSE_DETECT
-                                           | CODEC_F00_0C_CAP_TRIGGER_REQUIRED
-                                           | CODEC_F00_0C_CAP_IMPENDANCE_SENSE;//0x1737;
-            pNode->port.u32F07_param = CODEC_F07_IN_ENABLE;
-            if (!pThis->fInReset)
-                pNode->port.u32F1c_param = CODEC_MAKE_F1C(CODEC_F1C_PORT_COMPLEX,
-                                                          CODEC_F1C_LOCATION_REAR,
-                                                          CODEC_F1C_DEVICE_SPEAKER,
-                                                          CODEC_F1C_CONNECTION_TYPE_1_8INCHES,
-                                                          CODEC_F1C_COLOR_GREEN,
-                                                          0x0, 0x1, 0x0);//RT_MAKE_U32_FROM_U8(0x10, 0x40, 0x11, 0x01);
-            pNode->port.u32F09_param = CODEC_MAKE_F09_ANALOG(1, CODEC_F09_ANALOG_NA);//RT_BIT(31)|0x7fffffff;
-            goto port_init;
-        case 0xD:
-            pNode->node.au32F00_param[0xC] = CODEC_MAKE_F00_0C(0x17)
-                                           | CODEC_F00_0C_CAP_INPUT
-                                           | CODEC_F00_0C_CAP_OUTPUT
-                                           | CODEC_F00_0C_CAP_PRESENSE_DETECT
-                                           | CODEC_F00_0C_CAP_TRIGGER_REQUIRED
-                                           | CODEC_F00_0C_CAP_IMPENDANCE_SENSE;//0x1737;
-            pNode->port.u32F07_param = CODEC_F07_IN_ENABLE;
-            pNode->node.au32F02_param[0] = 0x2;
-            if (!pThis->fInReset)
-                pNode->port.u32F1c_param = CODEC_MAKE_F1C(CODEC_F1C_PORT_COMPLEX,
-                                                          CODEC_F1C_LOCATION_FRONT,
-                                                          CODEC_F1C_DEVICE_MIC,
-                                                          CODEC_F1C_CONNECTION_TYPE_1_8INCHES,
-                                                          CODEC_F1C_COLOR_PINK,
-                                                          0x0, 0x5, 0x0);//RT_MAKE_U32_FROM_U8(0x50, 0x90, 0xA1, 0x02); /* Microphone */
-            pNode->port.u32F09_param = CODEC_MAKE_F09_ANALOG(1, CODEC_F09_ANALOG_NA);//RT_BIT(31)|0x7fffffff;
-        port_init:
-            pNode->port.u32F08_param = 0;
-            pNode->node.au32F00_param[9] = CODEC_MAKE_F00_09(CODEC_F00_09_TYPE_PIN_COMPLEX, 0x0, 0)
-                                         | CODEC_F00_09_CAP_CONNECTION_LIST
-                                         | CODEC_F00_09_CAP_UNSOL
-                                         | CODEC_F00_09_CAP_LSB;//(4 << 20)|RT_BIT(8)|RT_BIT(7)|RT_BIT(0);
-            pNode->node.au32F00_param[0xE] = CODEC_MAKE_F00_0E(0, 1);//0x1;
-            break;
-        case 0xE:
-            pNode->node.au32F00_param[9] = CODEC_MAKE_F00_09(CODEC_F00_09_TYPE_PIN_COMPLEX, 0x0, 0)
-                                         | CODEC_F00_09_CAP_UNSOL
-                                         | CODEC_F00_09_CAP_LSB;//(4 << 20)|RT_BIT(7)|RT_BIT(0);
-            pNode->port.u32F08_param = 0;
-            pNode->node.au32F00_param[0xC] = CODEC_F00_0C_CAP_INPUT
-                                           | CODEC_F00_0C_CAP_OUTPUT
-                                           | CODEC_F00_0C_CAP_PRESENSE_DETECT;//0x34;
-            pNode->port.u32F07_param = CODEC_F07_IN_ENABLE;
-            pNode->port.u32F09_param = CODEC_MAKE_F09_ANALOG(0, CODEC_F09_ANALOG_NA);//0x7fffffff;
-            if (!pThis->fInReset)
-                pNode->port.u32F1c_param = CODEC_MAKE_F1C(CODEC_F1C_PORT_COMPLEX,
-                                                          CODEC_F1C_LOCATION_REAR,
-                                                          CODEC_F1C_DEVICE_LINE_OUT,
-                                                          CODEC_F1C_CONNECTION_TYPE_1_8INCHES,
-                                                          CODEC_F1C_COLOR_BLUE,
-                                                          0x0, 0x4, 0x0);//0x01013040;  /* Line Out */
-            break;
-        case 0xF:
-            pNode->node.au32F00_param[9] = CODEC_MAKE_F00_09(CODEC_F00_09_TYPE_PIN_COMPLEX, 0x0, 0x0)
-                                         | CODEC_F00_09_CAP_CONNECTION_LIST
-                                         | CODEC_F00_09_CAP_UNSOL
-                                         | CODEC_F00_09_CAP_OUT_AMP_PRESENT
-                                         | CODEC_F00_09_CAP_LSB;//(4 << 20)|RT_BIT(8)|RT_BIT(7)|RT_BIT(2)|RT_BIT(0);
-            pNode->node.au32F00_param[0xC] = CODEC_F00_0C_CAP_INPUT
-                                           | CODEC_F00_0C_CAP_OUTPUT
-                                           | CODEC_F00_0C_CAP_PRESENSE_DETECT
-                                           /* | CODEC_F00_0C_CAP_TRIGGER_REQUIRED
-                                           | CODEC_F00_0C_CAP_IMPENDANCE_SENSE */;//0x37;
-            pNode->node.au32F00_param[0xE] = CODEC_MAKE_F00_0E(0, 1);//0x1;
-            pNode->port.u32F08_param = 0;
-            pNode->port.u32F07_param = CODEC_F07_OUT_ENABLE
-                                     | CODEC_F07_IN_ENABLE;
-            if (!pThis->fInReset)
-                pNode->port.u32F1c_param = CODEC_MAKE_F1C(CODEC_F1C_PORT_COMPLEX,
-                                                          CODEC_F1C_LOCATION_INTERNAL,
-                                                          CODEC_F1C_DEVICE_SPEAKER,
-                                                          CODEC_F1C_CONNECTION_TYPE_1_8INCHES,
-                                                          CODEC_F1C_COLOR_ORANGE,
-                                                          0x0, 0x1, 0x2);//RT_MAKE_U32_FROM_U8(0x12, 0x60, 0x11, 0x01);
-            pNode->node.au32F02_param[0] = 0x5;
-            pNode->port.u32F09_param = CODEC_MAKE_F09_ANALOG(0, CODEC_F09_ANALOG_NA);//0x7fffffff;
-            break;
-        case 0x10:
-            pNode->node.au32F00_param[9] = CODEC_MAKE_F00_09(CODEC_F00_09_TYPE_PIN_COMPLEX, 0x0, 0x0)
-                                         | CODEC_F00_09_CAP_DIGITAL
-                                         | CODEC_F00_09_CAP_CONNECTION_LIST
-                                         | CODEC_F00_09_CAP_LSB;//(4<<20)|RT_BIT(9)|RT_BIT(8)|RT_BIT(0);
-            pNode->node.au32F00_param[0xC] = CODEC_F00_0C_CAP_OUTPUT;//RT_BIT(4);
-            pNode->node.au32F00_param[0xE] = CODEC_MAKE_F00_0E(0, 0x3);
-            pNode->node.au32F02_param[0] = RT_MAKE_U32_FROM_U8(0x08, 0x17, 0x19, 0);
-            if (!pThis->fInReset)
-                pNode->digout.u32F1c_param = CODEC_MAKE_F1C(CODEC_F1C_PORT_COMPLEX,
-                                                            CODEC_F1C_LOCATION_REAR,
-                                                            CODEC_F1C_DEVICE_SPDIF_OUT,
-                                                            CODEC_F1C_CONNECTION_TYPE_DIN,
-                                                            CODEC_F1C_COLOR_BLACK,
-                                                            0x0, 0x3, 0x0);//RT_MAKE_U32_FROM_U8(0x30, 0x10, 0x45, 0x01);
-            break;
-        case 0x11:
-            pNode->node.au32F00_param[9] = (4 << 20) | (3 << 16) | RT_BIT(10) | RT_BIT(9) | RT_BIT(7) | RT_BIT(0);
-            pNode->node.au32F00_param[0xC] = CODEC_F00_0C_CAP_EAPD
-                                           | CODEC_F00_0C_CAP_INPUT
-                                           | CODEC_F00_0C_CAP_PRESENSE_DETECT;//RT_BIT(16)| RT_BIT(5)|RT_BIT(2);
-            pNode->digin.u32F05_param = CODEC_MAKE_F05(0, 0, 0, CODEC_F05_D3, CODEC_F05_D3);//0x3 << 4 | 0x3; /* PS-Act: D3 -> D3 */
-            pNode->digin.u32F07_param = 0;
-            pNode->digin.u32F08_param = 0;
-            pNode->digin.u32F09_param = CODEC_MAKE_F09_DIGITAL(0, 0);
-            pNode->digin.u32F0c_param = 0;
-            if (!pThis->fInReset)
-                pNode->digin.u32F1c_param = CODEC_MAKE_F1C(CODEC_F1C_PORT_COMPLEX,
-                                                           CODEC_F1C_LOCATION_REAR,
-                                                           CODEC_F1C_DEVICE_SPDIF_IN,
-                                                           CODEC_F1C_CONNECTION_TYPE_OTHER_DIGITAL,
-                                                           CODEC_F1C_COLOR_BLACK,
-                                                           0x0, 0x6, 0x0);//(0x1 << 24) | (0xc5 << 16) | (0x10 << 8) | 0x60;
-            break;
-        case 0x12:
-            pNode->adcmux.u32F01_param = 0;
-            goto adcmux_init;
-        case 0x13:
-            pNode->adcmux.u32F01_param = 1;
-            adcmux_init:
-            pNode->node.au32F00_param[9] = CODEC_MAKE_F00_09(CODEC_F00_09_TYPE_AUDIO_SELECTOR, 0x0, 0)
-                                         | CODEC_F00_09_CAP_CONNECTION_LIST
-                                         | CODEC_F00_09_CAP_AMP_FMT_OVERRIDE
-                                         | CODEC_F00_09_CAP_OUT_AMP_PRESENT
-                                         | CODEC_F00_09_CAP_LSB;//(3<<20)|RT_BIT(8)|RT_BIT(3)|RT_BIT(2)|RT_BIT(0);
-            pNode->node.au32F00_param[0xe] = CODEC_MAKE_F00_0E(0, 0x7);
-            pNode->node.au32F00_param[0x12] = (0x27 << 16)|(0x4 << 8);
-            /* STAC 9220 v10 6.21-22.{4,5} both(left and right) out amplefiers inited with 0*/
-            memset(pNode->adcmux.B_params, 0, AMPLIFIER_SIZE);
-            pNode->node.au32F02_param[0] = RT_MAKE_U32_FROM_U8(0xe, 0x15, 0xf, 0xb);
-            pNode->node.au32F02_param[4] = RT_MAKE_U32_FROM_U8(0xc, 0xd, 0xa, 0x0);
-            break;
-        case 0x14:
-            pNode->node.au32F00_param[9] = CODEC_MAKE_F00_09(CODEC_F00_09_TYPE_BEEP_GEN, 0, 0)
-                                         | CODEC_F00_09_CAP_AMP_FMT_OVERRIDE
-                                         | CODEC_F00_09_CAP_OUT_AMP_PRESENT;//(7 << 20) | RT_BIT(3) | RT_BIT(2);
-            pNode->node.au32F00_param[0x12] = (0x17 << 16)|(0x3 << 8)| 0x3;
-            pNode->pcbeep.u32F0a_param = 0;
-            memset(pNode->pcbeep.B_params, 0, AMPLIFIER_SIZE);
-            break;
-        case 0x15:
-            pNode->node.au32F00_param[0x9] = CODEC_MAKE_F00_09(CODEC_F00_09_TYPE_PIN_COMPLEX, 0, 0)
-                                           | CODEC_F00_09_CAP_LSB;//(4 << 20)|RT_BIT(0);
-            pNode->node.au32F00_param[0xc] = CODEC_F00_0C_CAP_INPUT;//RT_BIT(5);
-            if (!pThis->fInReset)
-                pNode->cdnode.u32F1c_param = CODEC_MAKE_F1C(CODEC_F1C_PORT_FIXED,
-                                                            CODEC_F1C_LOCATION_INTERNAL,
-                                                            CODEC_F1C_DEVICE_CD,
-                                                            CODEC_F1C_CONNECTION_TYPE_ATAPI,
-                                                            CODEC_F1C_COLOR_UNKNOWN,
-                                                            0x0, 0x7, 0x0);//RT_MAKE_U32_FROM_U8(0x70, 0x0, 0x33, 0x90);
-            break;
-        case 0x16:
-            pNode->node.au32F00_param[0x9] = CODEC_MAKE_F00_09(CODEC_F00_09_TYPE_VOLUME_KNOB, 0x0, 0x0);//(0x6 << 20);
-            pNode->node.au32F00_param[0x13] = RT_BIT(7)| 0x7F;
-            pNode->node.au32F00_param[0xe] = CODEC_MAKE_F00_0E(0, 0x4);
-            pNode->node.au32F02_param[0] = RT_MAKE_U32_FROM_U8(0x2, 0x3, 0x4, 0x5);
-            pNode->volumeKnob.u32F08_param = 0;
-            pNode->volumeKnob.u32F0f_param = 0x7f;
-            break;
-        case 0x17:
-            pNode->node.au32F02_param[0] = 0x12;
-            goto adcvol_init;
-        case 0x18:
-            pNode->node.au32F02_param[0] = 0x13;
-        adcvol_init:
-            memset(pNode->adcvol.B_params, 0, AMPLIFIER_SIZE);
-
-            pNode->node.au32F00_param[0x9] = CODEC_MAKE_F00_09(CODEC_F00_09_TYPE_AUDIO_SELECTOR, 0, 0)
-                                           | CODEC_F00_09_CAP_L_R_SWAP
-                                           | CODEC_F00_09_CAP_CONNECTION_LIST
-                                           | CODEC_F00_09_CAP_IN_AMP_PRESENT
-                                           | CODEC_F00_09_CAP_LSB;//(0x3 << 20)|RT_BIT(11)|RT_BIT(8)|RT_BIT(1)|RT_BIT(0);
-            pNode->node.au32F00_param[0xe] = CODEC_MAKE_F00_0E(0, 0x1);
-            AMPLIFIER_REGISTER(pNode->adcvol.B_params, AMPLIFIER_IN, AMPLIFIER_LEFT, 0) = RT_BIT(7);
-            AMPLIFIER_REGISTER(pNode->adcvol.B_params, AMPLIFIER_IN, AMPLIFIER_RIGHT, 0) = RT_BIT(7);
-            pNode->adcvol.u32F0c_param = 0;
-            break;
-        case 0x19:
-            pNode->node.au32F00_param[0x9] = CODEC_MAKE_F00_09(CODEC_F00_09_TYPE_VENDOR_DEFINED, 0x3, 0)
-                                           | CODEC_F00_09_CAP_DIGITAL
-                                           | CODEC_F00_09_CAP_LSB;//(0xF << 20)|(0x3 << 16)|RT_BIT(9)|RT_BIT(0);
-            break;
-        case 0x1A:
-            pNode->node.au32F00_param[0x9] = CODEC_MAKE_F00_09(CODEC_F00_09_TYPE_AUDIO_OUTPUT, 0x3, 0)
-                                           | CODEC_F00_09_CAP_DIGITAL
-                                           | CODEC_F00_09_CAP_LSB;//(0x3 << 16)|RT_BIT(9)|RT_BIT(0);
-            break;
-        case 0x1B:
-            pNode->node.au32F00_param[0x9] = CODEC_MAKE_F00_09(CODEC_F00_09_TYPE_PIN_COMPLEX, 0, 0)
-                                           | CODEC_F00_09_CAP_DIGITAL
-                                           | CODEC_F00_09_CAP_CONNECTION_LIST
-                                           | CODEC_F00_09_CAP_LSB;//(0x4 << 20)|RT_BIT(9)|RT_BIT(8)|RT_BIT(0);
-            pNode->node.au32F00_param[0xE] = CODEC_MAKE_F00_0E(0, 0x1);
-            pNode->node.au32F00_param[0xC] = CODEC_F00_0C_CAP_OUTPUT;//0x10;
-            pNode->node.au32F02_param[0] = 0x1a;
-            pNode->reserved.u32F1c_param = CODEC_MAKE_F1C(CODEC_F1C_PORT_NO_PHYS,
-                                                          CODEC_F1C_LOCATION_NA,
-                                                          CODEC_F1C_DEVICE_LINE_OUT,
-                                                          CODEC_F1C_CONNECTION_TYPE_UNKNOWN,
-                                                          CODEC_F1C_COLOR_UNKNOWN,
-                                                          0x0, 0x0, 0xf);//0x4000000f;
-            break;
-        default:
-        break;
-    }
-    return VINF_SUCCESS;
-}
-
-
-static int stac9220Construct(PHDACODEC pThis)
-{
-    unconst(pThis->cTotalNodes) = 0x1C;
-    pThis->pfnCodecNodeReset = stac9220ResetNode;
-    pThis->pfnDbgListNodes   = stac9220DbgNodes;
-    pThis->u16VendorId = 0x8384;
-    pThis->u16DeviceId = 0x7680;
-    pThis->u8BSKU = 0x76;
-    pThis->u8AssemblyId = 0x80;
-    pThis->paNodes = (PCODECNODE)RTMemAllocZ(sizeof(CODECNODE) * pThis->cTotalNodes);
-    if (!pThis->paNodes)
-        return VERR_NO_MEMORY;
-    pThis->fInReset = false;
-#define STAC9220WIDGET(type) pThis->au8##type##s = g_abStac9220##type##s
-    STAC9220WIDGET(Port);
-    STAC9220WIDGET(Dac);
-    STAC9220WIDGET(Adc);
-    STAC9220WIDGET(AdcVol);
-    STAC9220WIDGET(AdcMux);
-    STAC9220WIDGET(Pcbeep);
-    STAC9220WIDGET(SpdifIn);
-    STAC9220WIDGET(SpdifOut);
-    STAC9220WIDGET(DigInPin);
-    STAC9220WIDGET(DigOutPin);
-    STAC9220WIDGET(Cd);
-    STAC9220WIDGET(VolKnob);
-    STAC9220WIDGET(Reserved);
-#undef STAC9220WIDGET
-    unconst(pThis->u8AdcVolsLineIn) = 0x17;
-    unconst(pThis->u8DacLineOut) = 0x3;
-
-    return VINF_SUCCESS;
-}
-
-
-/*
- * Some generic predicate functions.
- */
-
-#define DECLISNODEOFTYPE(type)                                                                  \
-    DECLINLINE(int) hdaCodecIs##type##Node(PHDACODEC pThis, uint8_t cNode)                     \
-    {                                                                                           \
-        Assert(pThis->au8##type##s);                                                           \
-        for (int i = 0; pThis->au8##type##s[i] != 0; ++i)                                      \
-            if (pThis->au8##type##s[i] == cNode)                                               \
-                return 1;                                                                       \
-        return 0;                                                                               \
-    }
-/* hdaCodecIsPortNode */
-DECLISNODEOFTYPE(Port)
-/* hdaCodecIsDacNode */
-DECLISNODEOFTYPE(Dac)
-/* hdaCodecIsAdcVolNode */
-DECLISNODEOFTYPE(AdcVol)
-/* hdaCodecIsAdcNode */
-DECLISNODEOFTYPE(Adc)
-/* hdaCodecIsAdcMuxNode */
-DECLISNODEOFTYPE(AdcMux)
-/* hdaCodecIsPcbeepNode */
-DECLISNODEOFTYPE(Pcbeep)
-/* hdaCodecIsSpdifOutNode */
-DECLISNODEOFTYPE(SpdifOut)
-/* hdaCodecIsSpdifInNode */
-DECLISNODEOFTYPE(SpdifIn)
-/* hdaCodecIsDigInPinNode */
-DECLISNODEOFTYPE(DigInPin)
-/* hdaCodecIsDigOutPinNode */
-DECLISNODEOFTYPE(DigOutPin)
-/* hdaCodecIsCdNode */
-DECLISNODEOFTYPE(Cd)
-/* hdaCodecIsVolKnobNode */
-DECLISNODEOFTYPE(VolKnob)
-/* hdaCodecIsReservedNode */
-DECLISNODEOFTYPE(Reserved)
-
-
-/*
- * Misc helpers.
- */
-static int hdaCodecToAudVolume(PHDACODEC pThis, AMPLIFIER *pAmp, PDMAUDIOMIXERCTL mt)
-{
-    uint32_t dir = AMPLIFIER_OUT;
-    ENMSOUNDSOURCE enmSrc;
-    switch (mt)
-    {
-        case PDMAUDIOMIXERCTL_PCM:
-            enmSrc = PO_INDEX;
-            dir = AMPLIFIER_OUT;
-            break;
-        case PDMAUDIOMIXERCTL_LINE_IN:
-            enmSrc = PI_INDEX;
-            dir = AMPLIFIER_IN;
-            break;
-        default:
-            AssertMsgFailedReturn(("Invalid mixer control %ld\n", mt), VERR_INVALID_PARAMETER);
-            break;
-    }
-
-    int mute = AMPLIFIER_REGISTER(*pAmp, dir, AMPLIFIER_LEFT, 0) & RT_BIT(7);
-    mute |= AMPLIFIER_REGISTER(*pAmp, dir, AMPLIFIER_RIGHT, 0) & RT_BIT(7);
-    mute >>=7;
-    mute &= 0x1;
-    uint8_t lVol = AMPLIFIER_REGISTER(*pAmp, dir, AMPLIFIER_LEFT, 0) & 0x7f;
-    uint8_t rVol = AMPLIFIER_REGISTER(*pAmp, dir, AMPLIFIER_RIGHT, 0) & 0x7f;
-
-    /* The STAC9220 volume controls have 0 to -96dB attenuation range in 128 steps.
-     * We have 0 to -96dB range in 256 steps. HDA volume setting of 127 must map
-     * to 255 internally (0dB), while HDA volume setting of 0 (-96dB) should map
-     * to 1 (rather than zero) internally.
-     */
-    lVol = (lVol + 1) * (2 * 255) / 256;
-    rVol = (rVol + 1) * (2 * 255) / 256;
-
-    return pThis->pfnSetVolume(pThis->pHDAState, enmSrc, RT_BOOL(mute), lVol, rVol);
-}
-
-DECLINLINE(void) hdaCodecSetRegister(uint32_t *pu32Reg, uint32_t u32Cmd, uint8_t u8Offset, uint32_t mask)
-{
-    Assert((pu32Reg && u8Offset < 32));
-    *pu32Reg &= ~(mask << u8Offset);
-    *pu32Reg |= (u32Cmd & mask) << u8Offset;
-}
-
-DECLINLINE(void) hdaCodecSetRegisterU8(uint32_t *pu32Reg, uint32_t u32Cmd, uint8_t u8Offset)
-{
-    hdaCodecSetRegister(pu32Reg, u32Cmd, u8Offset, CODEC_VERB_8BIT_DATA);
-}
-
-DECLINLINE(void) hdaCodecSetRegisterU16(uint32_t *pu32Reg, uint32_t u32Cmd, uint8_t u8Offset)
-{
-    hdaCodecSetRegister(pu32Reg, u32Cmd, u8Offset, CODEC_VERB_16BIT_DATA);
-}
-
-
-/*
- * Verb processor functions.
- */
-
-static DECLCALLBACK(int) vrbProcUnimplemented(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    LogFlowFunc(("cmd(raw:%x: cad:%x, d:%c, nid:%x, verb:%x)\n", cmd,
-        CODEC_CAD(cmd), CODEC_DIRECT(cmd) ? 'N' : 'Y', CODEC_NID(cmd), CODEC_VERBDATA(cmd)));
-    *pResp = 0;
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) vrbProcBreak(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    int rc;
-    rc = vrbProcUnimplemented(pThis, cmd, pResp);
-    *pResp |= CODEC_RESPONSE_UNSOLICITED;
-    return rc;
-}
-
-/* B-- */
-static DECLCALLBACK(int) vrbProcGetAmplifier(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    Assert(CODEC_NID(cmd) < pThis->cTotalNodes);
-    if (CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        LogFlowFunc(("invalid node address %d\n", CODEC_NID(cmd)));
-        return VINF_SUCCESS;
-    }
-    *pResp = 0;
-    /* HDA spec 7.3.3.7 Note A */
-    /** @todo: if index out of range response should be 0 */
-    uint8_t u8Index = CODEC_GET_AMP_DIRECTION(cmd) == AMPLIFIER_OUT? 0 : CODEC_GET_AMP_INDEX(cmd);
-
-    PCODECNODE pNode = &pThis->paNodes[CODEC_NID(cmd)];
-    if (hdaCodecIsDacNode(pThis, CODEC_NID(cmd)))
-        *pResp = AMPLIFIER_REGISTER(pNode->dac.B_params,
-                            CODEC_GET_AMP_DIRECTION(cmd),
-                            CODEC_GET_AMP_SIDE(cmd),
-                            u8Index);
-    else if (hdaCodecIsAdcVolNode(pThis, CODEC_NID(cmd)))
-        *pResp = AMPLIFIER_REGISTER(pNode->adcvol.B_params,
-                            CODEC_GET_AMP_DIRECTION(cmd),
-                            CODEC_GET_AMP_SIDE(cmd),
-                            u8Index);
-    else if (hdaCodecIsAdcMuxNode(pThis, CODEC_NID(cmd)))
-        *pResp = AMPLIFIER_REGISTER(pNode->adcmux.B_params,
-                            CODEC_GET_AMP_DIRECTION(cmd),
-                            CODEC_GET_AMP_SIDE(cmd),
-                            u8Index);
-    else if (hdaCodecIsPcbeepNode(pThis, CODEC_NID(cmd)))
-        *pResp = AMPLIFIER_REGISTER(pNode->pcbeep.B_params,
-                            CODEC_GET_AMP_DIRECTION(cmd),
-                            CODEC_GET_AMP_SIDE(cmd),
-                            u8Index);
-    else if (hdaCodecIsPortNode(pThis, CODEC_NID(cmd)))
-        *pResp = AMPLIFIER_REGISTER(pNode->port.B_params,
-                            CODEC_GET_AMP_DIRECTION(cmd),
-                            CODEC_GET_AMP_SIDE(cmd),
-                            u8Index);
-    else if (hdaCodecIsAdcNode(pThis, CODEC_NID(cmd)))
-        *pResp = AMPLIFIER_REGISTER(pNode->adc.B_params,
-                            CODEC_GET_AMP_DIRECTION(cmd),
-                            CODEC_GET_AMP_SIDE(cmd),
-                            u8Index);
-    else
-        AssertMsgFailedReturn(("access to fields of %x need to be implemented\n", CODEC_NID(cmd)), VINF_SUCCESS);
-    return VINF_SUCCESS;
-}
-
-/* 3-- */
-static DECLCALLBACK(int) vrbProcSetAmplifier(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    bool fIsLeft = false;
-    bool fIsRight = false;
-    bool fIsOut = false;
-    bool fIsIn = false;
-    uint8_t u8Index = 0;
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    if (CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        LogFlowFunc(("invalid node address %d\n", CODEC_NID(cmd)));
-        return VINF_SUCCESS;
-    }
-    *pResp = 0;
-    PCODECNODE pNode = &pThis->paNodes[CODEC_NID(cmd)];
-    AMPLIFIER *pAmplifier;
-    if (hdaCodecIsDacNode(pThis, CODEC_NID(cmd)))
-        pAmplifier = &pNode->dac.B_params;
-    else if (hdaCodecIsAdcVolNode(pThis, CODEC_NID(cmd)))
-        pAmplifier = &pNode->adcvol.B_params;
-    else if (hdaCodecIsAdcMuxNode(pThis, CODEC_NID(cmd)))
-        pAmplifier = &pNode->adcmux.B_params;
-    else if (hdaCodecIsPcbeepNode(pThis, CODEC_NID(cmd)))
-        pAmplifier = &pNode->pcbeep.B_params;
-    else if (hdaCodecIsPortNode(pThis, CODEC_NID(cmd)))
-        pAmplifier = &pNode->port.B_params;
-    else if (hdaCodecIsAdcNode(pThis, CODEC_NID(cmd)))
-        pAmplifier = &pNode->adc.B_params;
-    else
-        AssertFailedReturn(VINF_SUCCESS);
-
-    fIsOut = CODEC_SET_AMP_IS_OUT_DIRECTION(cmd);
-    fIsIn = CODEC_SET_AMP_IS_IN_DIRECTION(cmd);
-    fIsRight = CODEC_SET_AMP_IS_RIGHT_SIDE(cmd);
-    fIsLeft = CODEC_SET_AMP_IS_LEFT_SIDE(cmd);
-    u8Index = CODEC_SET_AMP_INDEX(cmd);
-    if (   (!fIsLeft && !fIsRight)
-        || (!fIsOut && !fIsIn))
-        return VINF_SUCCESS;
-    if (fIsIn)
-    {
-        if (fIsLeft)
-            hdaCodecSetRegisterU8(&AMPLIFIER_REGISTER(*pAmplifier, AMPLIFIER_IN, AMPLIFIER_LEFT, u8Index), cmd, 0);
-        if (fIsRight)
-            hdaCodecSetRegisterU8(&AMPLIFIER_REGISTER(*pAmplifier, AMPLIFIER_IN, AMPLIFIER_RIGHT, u8Index), cmd, 0);
-
-        /** @todo Fix ID of u8AdcVolsLineIn! */
-        hdaCodecToAudVolume(pThis, pAmplifier, PDMAUDIOMIXERCTL_LINE_IN);
-    }
-    if (fIsOut)
-    {
-        if (fIsLeft)
-            hdaCodecSetRegisterU8(&AMPLIFIER_REGISTER(*pAmplifier, AMPLIFIER_OUT, AMPLIFIER_LEFT, u8Index), cmd, 0);
-        if (fIsRight)
-            hdaCodecSetRegisterU8(&AMPLIFIER_REGISTER(*pAmplifier, AMPLIFIER_OUT, AMPLIFIER_RIGHT, u8Index), cmd, 0);
-
-        if (CODEC_NID(cmd) == pThis->u8DacLineOut)
-            hdaCodecToAudVolume(pThis, pAmplifier, PDMAUDIOMIXERCTL_PCM);
-    }
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) vrbProcGetParameter(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    if (CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        LogFlowFunc(("invalid node address %d\n", CODEC_NID(cmd)));
-        return VINF_SUCCESS;
-    }
-    Assert((cmd & CODEC_VERB_8BIT_DATA) < CODECNODE_F00_PARAM_LENGTH);
-    if ((cmd & CODEC_VERB_8BIT_DATA) >= CODECNODE_F00_PARAM_LENGTH)
-    {
-        LogFlowFunc(("invalid F00 parameter %d\n", (cmd & CODEC_VERB_8BIT_DATA)));
-        return VINF_SUCCESS;
-    }
-    *pResp = pThis->paNodes[CODEC_NID(cmd)].node.au32F00_param[cmd & CODEC_VERB_8BIT_DATA];
-    return VINF_SUCCESS;
-}
-
-/* F01 */
-static DECLCALLBACK(int) vrbProcGetConSelectCtrl(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    Assert(CODEC_NID(cmd) < pThis->cTotalNodes);
-    if (CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        LogFlowFunc(("invalid node address %d\n", CODEC_NID(cmd)));
-        return VINF_SUCCESS;
-    }
-    *pResp = 0;
-    if (hdaCodecIsAdcMuxNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].adcmux.u32F01_param;
-    else if (hdaCodecIsDigOutPinNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].digout.u32F01_param;
-    else if (hdaCodecIsPortNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].port.u32F01_param;
-    else if (hdaCodecIsAdcNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].adc.u32F01_param;
-    else if (hdaCodecIsAdcVolNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].adcvol.u32F01_param;
-    return VINF_SUCCESS;
-}
-
-/* 701 */
-static DECLCALLBACK(int) vrbProcSetConSelectCtrl(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    Assert(CODEC_NID(cmd) < pThis->cTotalNodes);
-    if (CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        LogFlowFunc(("invalid node address %d\n", CODEC_NID(cmd)));
-        return VINF_SUCCESS;
-    }
-    *pResp = 0;
-    uint32_t *pu32Reg;
-    if (hdaCodecIsAdcMuxNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].adcmux.u32F01_param;
-    else if (hdaCodecIsDigOutPinNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].digout.u32F01_param;
-    else if (hdaCodecIsPortNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].port.u32F01_param;
-    else if (hdaCodecIsAdcNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].adc.u32F01_param;
-    else if (hdaCodecIsAdcVolNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].adcvol.u32F01_param;
-    else
-        AssertFailedReturn(VINF_SUCCESS);
-    hdaCodecSetRegisterU8(pu32Reg, cmd, 0);
-    return VINF_SUCCESS;
-}
-
-/* F07 */
-static DECLCALLBACK(int) vrbProcGetPinCtrl(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    Assert(CODEC_NID(cmd) < pThis->cTotalNodes);
-    if (CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        LogFlowFunc(("invalid node address %d\n", CODEC_NID(cmd)));
-        return VINF_SUCCESS;
-    }
-    *pResp = 0;
-    if (hdaCodecIsPortNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].port.u32F07_param;
-    else if (hdaCodecIsDigOutPinNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].digout.u32F07_param;
-    else if (hdaCodecIsDigInPinNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].digin.u32F07_param;
-    else if (hdaCodecIsCdNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].cdnode.u32F07_param;
-    else if (hdaCodecIsPcbeepNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].pcbeep.u32F07_param;
-    else if (hdaCodecIsReservedNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].reserved.u32F07_param;
-    else
-        AssertMsgFailed(("Unsupported"));
-    return VINF_SUCCESS;
-}
-
-/* 707 */
-static DECLCALLBACK(int) vrbProcSetPinCtrl(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    Assert(CODEC_NID(cmd) < pThis->cTotalNodes);
-    if (CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        LogFlowFunc(("invalid node address %d\n", CODEC_NID(cmd)));
-        return VINF_SUCCESS;
-    }
-    *pResp = 0;
-    uint32_t *pu32Reg;
-    if (hdaCodecIsPortNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].port.u32F07_param;
-    else if (hdaCodecIsDigInPinNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].digin.u32F07_param;
-    else if (hdaCodecIsDigOutPinNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].digout.u32F07_param;
-    else if (hdaCodecIsCdNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].cdnode.u32F07_param;
-    else if (hdaCodecIsPcbeepNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].pcbeep.u32F07_param;
-    else if (   hdaCodecIsReservedNode(pThis, CODEC_NID(cmd))
-             && CODEC_NID(cmd) == 0x1b)
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].reserved.u32F07_param;
-    else
-        AssertFailedReturn(VINF_SUCCESS);
-    hdaCodecSetRegisterU8(pu32Reg, cmd, 0);
-    return VINF_SUCCESS;
-}
-
-/* F08 */
-static DECLCALLBACK(int) vrbProcGetUnsolicitedEnabled(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    Assert(CODEC_NID(cmd) < pThis->cTotalNodes);
-    if (CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        LogFlowFunc(("invalid node address %d\n", CODEC_NID(cmd)));
-        return VINF_SUCCESS;
-    }
-    *pResp = 0;
-    if (hdaCodecIsPortNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].port.u32F08_param;
-    else if (hdaCodecIsDigInPinNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].digin.u32F08_param;
-    else if ((cmd) == 1 /* AFG */)
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].afg.u32F08_param;
-    else if (hdaCodecIsVolKnobNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].volumeKnob.u32F08_param;
-    else if (hdaCodecIsDigOutPinNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].digout.u32F08_param;
-    else if (hdaCodecIsDigInPinNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].digin.u32F08_param;
-    else
-        AssertMsgFailed(("unsupported operation %x on node: %x\n", CODEC_VERB_CMD8(cmd), CODEC_NID(cmd)));
-    return VINF_SUCCESS;
-}
-
-/* 708 */
-static DECLCALLBACK(int) vrbProcSetUnsolicitedEnabled(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    Assert(CODEC_NID(cmd) < pThis->cTotalNodes);
-    if (CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        LogFlowFunc(("invalid node address %d\n", CODEC_NID(cmd)));
-        return VINF_SUCCESS;
-    }
-    *pResp = 0;
-    uint32_t *pu32Reg;
-    if (hdaCodecIsPortNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].port.u32F08_param;
-    else if (hdaCodecIsDigInPinNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].digin.u32F08_param;
-    else if (CODEC_NID(cmd) == 1 /* AFG */)
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].afg.u32F08_param;
-    else if (hdaCodecIsVolKnobNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].volumeKnob.u32F08_param;
-    else if (hdaCodecIsDigInPinNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].digin.u32F08_param;
-    else if (hdaCodecIsDigOutPinNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].digout.u32F08_param;
-    else
-        AssertMsgFailedReturn(("unsupported operation %x on node: %x\n", CODEC_VERB_CMD8(cmd), CODEC_NID(cmd)), VINF_SUCCESS);
-    hdaCodecSetRegisterU8(pu32Reg, cmd, 0);
-    return VINF_SUCCESS;
-}
-
-/* F09 */
-static DECLCALLBACK(int) vrbProcGetPinSense(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    Assert(CODEC_NID(cmd) < pThis->cTotalNodes);
-    if (CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        LogFlowFunc(("invalid node address %d\n", CODEC_NID(cmd)));
-        return VINF_SUCCESS;
-    }
-    *pResp = 0;
-    if (hdaCodecIsPortNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].port.u32F09_param;
-    else if (hdaCodecIsDigInPinNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].digin.u32F09_param;
-    else
-        AssertMsgFailed(("unsupported operation %x on node: %x\n", CODEC_VERB_CMD8(cmd), CODEC_NID(cmd)));
-    return VINF_SUCCESS;
-}
-
-/* 709 */
-static DECLCALLBACK(int) vrbProcSetPinSense(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    Assert(CODEC_NID(cmd) < pThis->cTotalNodes);
-    if (CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        LogFlowFunc(("invalid node address %d\n", CODEC_NID(cmd)));
-        return VINF_SUCCESS;
-    }
-    *pResp = 0;
-    uint32_t *pu32Reg;
-    if (hdaCodecIsPortNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].port.u32F09_param;
-    else if (hdaCodecIsDigInPinNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].digin.u32F09_param;
-    else
-        AssertFailedReturn(VINF_SUCCESS);
-    hdaCodecSetRegisterU8(pu32Reg, cmd, 0);
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) vrbProcGetConnectionListEntry(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    Assert(CODEC_NID(cmd) < pThis->cTotalNodes);
-    *pResp = 0;
-    if (CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        LogFlowFunc(("invalid node address %d\n", CODEC_NID(cmd)));
-        return VINF_SUCCESS;
-    }
-    Assert((cmd & CODEC_VERB_8BIT_DATA) < CODECNODE_F02_PARAM_LENGTH);
-    if ((cmd & CODEC_VERB_8BIT_DATA) >= CODECNODE_F02_PARAM_LENGTH)
-    {
-        LogFlowFunc(("access to invalid F02 index %d\n", (cmd & CODEC_VERB_8BIT_DATA)));
-        return VINF_SUCCESS;
-    }
-    *pResp = pThis->paNodes[CODEC_NID(cmd)].node.au32F02_param[cmd & CODEC_VERB_8BIT_DATA];
-    return VINF_SUCCESS;
-}
-
-/* F03 */
-static DECLCALLBACK(int) vrbProcGetProcessingState(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    Assert(CODEC_NID(cmd) < pThis->cTotalNodes);
-    if (CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        LogFlowFunc(("invalid node address %d\n", CODEC_NID(cmd)));
-        return VINF_SUCCESS;
-    }
-    *pResp = 0;
-    if (hdaCodecIsAdcNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].adc.u32F03_param;
-    return VINF_SUCCESS;
-}
-
-/* 703 */
-static DECLCALLBACK(int) vrbProcSetProcessingState(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    Assert(CODEC_NID(cmd) < pThis->cTotalNodes);
-    if (CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        LogFlowFunc(("invalid node address %d\n", CODEC_NID(cmd)));
-        return VINF_SUCCESS;
-    }
-    *pResp = 0;
-    if (hdaCodecIsAdcNode(pThis, CODEC_NID(cmd)))
-        hdaCodecSetRegisterU8(&pThis->paNodes[CODEC_NID(cmd)].adc.u32F03_param, cmd, 0);
-    return VINF_SUCCESS;
-}
-
-/* F0D */
-static DECLCALLBACK(int) vrbProcGetDigitalConverter(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    Assert(CODEC_NID(cmd) < pThis->cTotalNodes);
-    if (CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        LogFlowFunc(("invalid node address %d\n", CODEC_NID(cmd)));
-        return VINF_SUCCESS;
-    }
-    *pResp = 0;
-    if (hdaCodecIsSpdifOutNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].spdifout.u32F0d_param;
-    else if (hdaCodecIsSpdifInNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].spdifin.u32F0d_param;
-    return VINF_SUCCESS;
-}
-
-static int codecSetDigitalConverter(PHDACODEC pThis, uint32_t cmd, uint8_t u8Offset, uint64_t *pResp)
-{
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    Assert(CODEC_NID(cmd) < pThis->cTotalNodes);
-    if (CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        LogFlowFunc(("invalid node address %d\n", CODEC_NID(cmd)));
-        return VINF_SUCCESS;
-    }
-    *pResp = 0;
-    if (hdaCodecIsSpdifOutNode(pThis, CODEC_NID(cmd)))
-        hdaCodecSetRegisterU8(&pThis->paNodes[CODEC_NID(cmd)].spdifout.u32F0d_param, cmd, u8Offset);
-    else if (hdaCodecIsSpdifInNode(pThis, CODEC_NID(cmd)))
-        hdaCodecSetRegisterU8(&pThis->paNodes[CODEC_NID(cmd)].spdifin.u32F0d_param, cmd, u8Offset);
-    return VINF_SUCCESS;
-}
-
-/* 70D */
-static DECLCALLBACK(int) vrbProcSetDigitalConverter1(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    return codecSetDigitalConverter(pThis, cmd, 0, pResp);
-}
-
-/* 70E */
-static DECLCALLBACK(int) vrbProcSetDigitalConverter2(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    return codecSetDigitalConverter(pThis, cmd, 8, pResp);
-}
-
-/* F20 */
-static DECLCALLBACK(int) vrbProcGetSubId(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    Assert(CODEC_NID(cmd) < pThis->cTotalNodes);
-    if (CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        LogFlowFunc(("invalid node address %d\n", CODEC_NID(cmd)));
-        return VINF_SUCCESS;
-    }
-    if (CODEC_NID(cmd) == 1 /* AFG */)
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].afg.u32F20_param;
-    else
-        *pResp = 0;
-    return VINF_SUCCESS;
-}
-
-static int codecSetSubIdX(PHDACODEC pThis, uint32_t cmd, uint8_t u8Offset)
-{
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    Assert(CODEC_NID(cmd) < pThis->cTotalNodes);
-    if (CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        LogFlowFunc(("invalid node address %d\n", CODEC_NID(cmd)));
-        return VINF_SUCCESS;
-    }
-    uint32_t *pu32Reg;
-    if (CODEC_NID(cmd) == 0x1 /* AFG */)
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].afg.u32F20_param;
-    else
-        AssertFailedReturn(VINF_SUCCESS);
-    hdaCodecSetRegisterU8(pu32Reg, cmd, u8Offset);
-    return VINF_SUCCESS;
-}
-
-/* 720 */
-static DECLCALLBACK(int) vrbProcSetSubId0(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    *pResp = 0;
-    return codecSetSubIdX(pThis, cmd, 0);
-}
-
-/* 721 */
-static DECLCALLBACK(int) vrbProcSetSubId1(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    *pResp = 0;
-    return codecSetSubIdX(pThis, cmd, 8);
-}
-
-/* 722 */
-static DECLCALLBACK(int) vrbProcSetSubId2(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    *pResp = 0;
-    return codecSetSubIdX(pThis, cmd, 16);
-}
-
-/* 723 */
-static DECLCALLBACK(int) vrbProcSetSubId3(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    *pResp = 0;
-    return codecSetSubIdX(pThis, cmd, 24);
-}
-
-static DECLCALLBACK(int) vrbProcReset(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    Assert(CODEC_NID(cmd) == 1 /* AFG */);
-    if (   CODEC_NID(cmd) == 1 /* AFG */
-        && pThis->pfnCodecNodeReset)
-    {
-        uint8_t i;
-        LogFlowFunc(("enters reset\n"));
-        Assert(pThis->pfnCodecNodeReset);
-        for (i = 0; i < pThis->cTotalNodes; ++i)
-        {
-            pThis->pfnCodecNodeReset(pThis, i, &pThis->paNodes[i]);
-        }
-        pThis->fInReset = false;
-        LogFlowFunc(("exits reset\n"));
-    }
-    *pResp = 0;
-    return VINF_SUCCESS;
-}
-
-/* F05 */
-static DECLCALLBACK(int) vrbProcGetPowerState(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    Assert(CODEC_NID(cmd) < pThis->cTotalNodes);
-    if (CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        LogFlowFunc(("invalid node address %d\n", CODEC_NID(cmd)));
-        return VINF_SUCCESS;
-    }
-    *pResp = 0;
-    if (CODEC_NID(cmd) == 1 /* AFG */)
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].afg.u32F05_param;
-    else if (hdaCodecIsDacNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].dac.u32F05_param;
-    else if (hdaCodecIsDigInPinNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].digin.u32F05_param;
-    else if (hdaCodecIsAdcNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].adc.u32F05_param;
-    else if (hdaCodecIsSpdifOutNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].spdifout.u32F05_param;
-    else if (hdaCodecIsSpdifInNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].spdifin.u32F05_param;
-    else if (hdaCodecIsReservedNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].reserved.u32F05_param;
-    return VINF_SUCCESS;
-}
-
-/* 705 */
-
-DECLINLINE(void) codecPropogatePowerState(uint32_t *pu32F05_param)
-{
-    Assert(pu32F05_param);
-    if (!pu32F05_param)
-        return;
-    bool fReset = CODEC_F05_IS_RESET(*pu32F05_param);
-    bool fStopOk = CODEC_F05_IS_STOPOK(*pu32F05_param);
-    uint8_t u8SetPowerState = CODEC_F05_SET(*pu32F05_param);
-    *pu32F05_param = CODEC_MAKE_F05(fReset, fStopOk, 0, u8SetPowerState, u8SetPowerState);
-}
-
-static DECLCALLBACK(int) vrbProcSetPowerState(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    Assert(CODEC_NID(cmd) < pThis->cTotalNodes);
-    if (CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        LogFlowFunc(("invalid node address %d\n", CODEC_NID(cmd)));
-        return VINF_SUCCESS;
-    }
-    *pResp = 0;
-    uint32_t *pu32Reg;
-    if (CODEC_NID(cmd) == 1 /* AFG */)
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].afg.u32F05_param;
-    else if (hdaCodecIsDacNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].dac.u32F05_param;
-    else if (hdaCodecIsDigInPinNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].digin.u32F05_param;
-    else if (hdaCodecIsAdcNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].adc.u32F05_param;
-    else if (hdaCodecIsSpdifOutNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].spdifout.u32F05_param;
-    else if (hdaCodecIsSpdifInNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].spdifin.u32F05_param;
-    else if (hdaCodecIsReservedNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].reserved.u32F05_param;
-    else
-        AssertFailedReturn(VINF_SUCCESS);
-
-    bool fReset = CODEC_F05_IS_RESET(*pu32Reg);
-    bool fStopOk = CODEC_F05_IS_STOPOK(*pu32Reg);
-
-    if (CODEC_NID(cmd) != 1 /* AFG */)
-    {
-        /*
-         * We shouldn't propogate actual power state, which actual for AFG
-         */
-        *pu32Reg = CODEC_MAKE_F05(fReset, fStopOk, 0,
-                                  CODEC_F05_ACT(pThis->paNodes[1].afg.u32F05_param),
-                                  CODEC_F05_SET(cmd));
-    }
-
-    /* Propagate next power state only if AFG is on or verb modifies AFG power state */
-    if (   CODEC_NID(cmd) == 1 /* AFG */
-        || !CODEC_F05_ACT(pThis->paNodes[1].afg.u32F05_param))
-    {
-        *pu32Reg = CODEC_MAKE_F05(fReset, fStopOk, 0, CODEC_F05_SET(cmd), CODEC_F05_SET(cmd));
-        if (   CODEC_NID(cmd) == 1 /* AFG */
-            && (CODEC_F05_SET(cmd)) == CODEC_F05_D0)
-        {
-            /* now we're powered on AFG and may propogate power states on nodes */
-            const uint8_t *pu8NodeIndex = &pThis->au8Dacs[0];
-            while (*(++pu8NodeIndex))
-                codecPropogatePowerState(&pThis->paNodes[*pu8NodeIndex].dac.u32F05_param);
-
-            pu8NodeIndex = &pThis->au8Adcs[0];
-            while (*(++pu8NodeIndex))
-                codecPropogatePowerState(&pThis->paNodes[*pu8NodeIndex].adc.u32F05_param);
-
-            pu8NodeIndex = &pThis->au8DigInPins[0];
-            while (*(++pu8NodeIndex))
-                codecPropogatePowerState(&pThis->paNodes[*pu8NodeIndex].digin.u32F05_param);
-        }
-    }
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) vrbProcGetStreamId(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    Assert(CODEC_NID(cmd) < pThis->cTotalNodes);
-    if (CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        LogFlowFunc(("invalid node address %d\n", CODEC_NID(cmd)));
-        return VINF_SUCCESS;
-    }
-    *pResp = 0;
-    if (hdaCodecIsDacNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].dac.u32F06_param;
-    else if (hdaCodecIsAdcNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].adc.u32F06_param;
-    else if (hdaCodecIsSpdifInNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].spdifin.u32F06_param;
-    else if (hdaCodecIsSpdifOutNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].spdifout.u32F06_param;
-    else if (CODEC_NID(cmd) == 0x1A)
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].reserved.u32F06_param;
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) vrbProcSetStreamId(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    Assert(CODEC_NID(cmd) < pThis->cTotalNodes);
-    if (CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        LogFlowFunc(("invalid node address %d\n", CODEC_NID(cmd)));
-        return VINF_SUCCESS;
-    }
-    *pResp = 0;
-    uint32_t *pu32addr;
-    if (hdaCodecIsDacNode(pThis, CODEC_NID(cmd)))
-        pu32addr = &pThis->paNodes[CODEC_NID(cmd)].dac.u32F06_param;
-    else if (hdaCodecIsAdcNode(pThis, CODEC_NID(cmd)))
-        pu32addr = &pThis->paNodes[CODEC_NID(cmd)].adc.u32F06_param;
-    else if (hdaCodecIsSpdifOutNode(pThis, CODEC_NID(cmd)))
-        pu32addr = &pThis->paNodes[CODEC_NID(cmd)].spdifout.u32F06_param;
-    else if (hdaCodecIsSpdifInNode(pThis, CODEC_NID(cmd)))
-        pu32addr = &pThis->paNodes[CODEC_NID(cmd)].spdifin.u32F06_param;
-    else if (hdaCodecIsReservedNode(pThis, CODEC_NID(cmd)))
-        pu32addr = &pThis->paNodes[CODEC_NID(cmd)].reserved.u32F06_param;
-    else
-        AssertFailedReturn(VINF_SUCCESS);
-    hdaCodecSetRegisterU8(pu32addr, cmd, 0);
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) vrbProcGetConverterFormat(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    Assert(CODEC_NID(cmd) < pThis->cTotalNodes);
-    if (CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        LogFlowFunc(("invalid node address %d\n", CODEC_NID(cmd)));
-        return VINF_SUCCESS;
-    }
-    *pResp = 0;
-    if (hdaCodecIsDacNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].dac.u32A_param;
-    else if (hdaCodecIsAdcNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].adc.u32A_param;
-    else if (hdaCodecIsSpdifOutNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].spdifout.u32A_param;
-    else if (hdaCodecIsSpdifInNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].spdifin.u32A_param;
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) vrbProcSetConverterFormat(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    Assert(CODEC_NID(cmd) < pThis->cTotalNodes);
-    if (CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        LogFlowFunc(("invalid node address %d\n", CODEC_NID(cmd)));
-        return VINF_SUCCESS;
-    }
-    *pResp = 0;
-    if (hdaCodecIsDacNode(pThis, CODEC_NID(cmd)))
-        hdaCodecSetRegisterU16(&pThis->paNodes[CODEC_NID(cmd)].dac.u32A_param, cmd, 0);
-    else if (hdaCodecIsAdcNode(pThis, CODEC_NID(cmd)))
-        hdaCodecSetRegisterU16(&pThis->paNodes[CODEC_NID(cmd)].adc.u32A_param, cmd, 0);
-    else if (hdaCodecIsSpdifOutNode(pThis, CODEC_NID(cmd)))
-        hdaCodecSetRegisterU16(&pThis->paNodes[CODEC_NID(cmd)].spdifout.u32A_param, cmd, 0);
-    else if (hdaCodecIsSpdifInNode(pThis, CODEC_NID(cmd)))
-        hdaCodecSetRegisterU16(&pThis->paNodes[CODEC_NID(cmd)].spdifin.u32A_param, cmd, 0);
-    return VINF_SUCCESS;
-}
-
-/* F0C */
-static DECLCALLBACK(int) vrbProcGetEAPD_BTLEnabled(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    Assert(CODEC_NID(cmd) < pThis->cTotalNodes);
-    if (CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        LogFlowFunc(("invalid node address %d\n", CODEC_NID(cmd)));
-        return VINF_SUCCESS;
-    }
-    *pResp = 0;
-    if (hdaCodecIsAdcVolNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].adcvol.u32F0c_param;
-    else if (hdaCodecIsDacNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].dac.u32F0c_param;
-    else if (hdaCodecIsDigInPinNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].digin.u32F0c_param;
-    return VINF_SUCCESS;
-}
-
-/* 70C */
-static DECLCALLBACK(int) vrbProcSetEAPD_BTLEnabled(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    Assert(CODEC_NID(cmd) < pThis->cTotalNodes);
-    if (CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        LogFlowFunc(("invalid node address %d\n", CODEC_NID(cmd)));
-        return VINF_SUCCESS;
-    }
-
-    *pResp = 0;
-    uint32_t *pu32Reg;
-    if (hdaCodecIsAdcVolNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].adcvol.u32F0c_param;
-    else if (hdaCodecIsDacNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].dac.u32F0c_param;
-    else if (hdaCodecIsDigInPinNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].digin.u32F0c_param;
-    else
-        AssertFailedReturn(VINF_SUCCESS);
-    hdaCodecSetRegisterU8(pu32Reg, cmd, 0);
-
-    return VINF_SUCCESS;
-}
-
-/* F0F */
-static DECLCALLBACK(int) vrbProcGetVolumeKnobCtrl(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    Assert(CODEC_NID(cmd) < pThis->cTotalNodes);
-    if (CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        LogFlowFunc(("invalid node address %d\n", CODEC_NID(cmd)));
-        return VINF_SUCCESS;
-    }
-    *pResp = 0;
-    if (hdaCodecIsVolKnobNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].volumeKnob.u32F0f_param;
-    return VINF_SUCCESS;
-}
-
-/* 70F */
-static DECLCALLBACK(int) vrbProcSetVolumeKnobCtrl(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    Assert(CODEC_NID(cmd) < pThis->cTotalNodes);
-    if (CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        LogFlowFunc(("invalid node address %d\n", CODEC_NID(cmd)));
-        return VINF_SUCCESS;
-    }
-    uint32_t *pu32Reg = NULL;
-    *pResp = 0;
-    if (hdaCodecIsVolKnobNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].volumeKnob.u32F0f_param;
-    Assert(pu32Reg);
-    if (pu32Reg)
-        hdaCodecSetRegisterU8(pu32Reg, cmd, 0);
-    return VINF_SUCCESS;
-}
-
-/* F17 */
-static DECLCALLBACK(int) vrbProcGetGPIOUnsolisted(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    Assert(CODEC_NID(cmd) < pThis->cTotalNodes);
-    if (CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        LogFlowFunc(("invalid node address %d\n", CODEC_NID(cmd)));
-        return VINF_SUCCESS;
-    }
-    *pResp = 0;
-    /* note: this is true for ALC885 */
-    if (CODEC_NID(cmd) == 0x1 /* AFG */)
-        *pResp = pThis->paNodes[1].afg.u32F17_param;
-    return VINF_SUCCESS;
-}
-
-/* 717 */
-static DECLCALLBACK(int) vrbProcSetGPIOUnsolisted(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    Assert(CODEC_NID(cmd) < pThis->cTotalNodes);
-    if (CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        LogFlowFunc(("invalid node address %d\n", CODEC_NID(cmd)));
-        return VINF_SUCCESS;
-    }
-    uint32_t *pu32Reg = NULL;
-    *pResp = 0;
-    if (CODEC_NID(cmd) == 1 /* AFG */)
-        pu32Reg = &pThis->paNodes[1].afg.u32F17_param;
-    Assert(pu32Reg);
-    if (pu32Reg)
-        hdaCodecSetRegisterU8(pu32Reg, cmd, 0);
-    return VINF_SUCCESS;
-}
-
-/* F1C */
-static DECLCALLBACK(int) vrbProcGetConfig(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    Assert(CODEC_NID(cmd) < pThis->cTotalNodes);
-    if (CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        LogFlowFunc(("invalid node address %d\n", CODEC_NID(cmd)));
-        return VINF_SUCCESS;
-    }
-    *pResp = 0;
-    if (hdaCodecIsPortNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].port.u32F1c_param;
-    else if (hdaCodecIsDigOutPinNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].digout.u32F1c_param;
-    else if (hdaCodecIsDigInPinNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].digin.u32F1c_param;
-    else if (hdaCodecIsPcbeepNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].pcbeep.u32F1c_param;
-    else if (hdaCodecIsCdNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].cdnode.u32F1c_param;
-    else if (hdaCodecIsReservedNode(pThis, CODEC_NID(cmd)))
-        *pResp = pThis->paNodes[CODEC_NID(cmd)].reserved.u32F1c_param;
-    return VINF_SUCCESS;
-}
-
-static int codecSetConfigX(PHDACODEC pThis, uint32_t cmd, uint8_t u8Offset)
-{
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    Assert(CODEC_NID(cmd) < pThis->cTotalNodes);
-    if (CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        LogFlowFunc(("invalid node address %d\n", CODEC_NID(cmd)));
-        return VINF_SUCCESS;
-    }
-    uint32_t *pu32Reg = NULL;
-    if (hdaCodecIsPortNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].port.u32F1c_param;
-    else if (hdaCodecIsDigInPinNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].digin.u32F1c_param;
-    else if (hdaCodecIsDigOutPinNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].digout.u32F1c_param;
-    else if (hdaCodecIsCdNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].cdnode.u32F1c_param;
-    else if (hdaCodecIsPcbeepNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].pcbeep.u32F1c_param;
-    else if (hdaCodecIsReservedNode(pThis, CODEC_NID(cmd)))
-        pu32Reg = &pThis->paNodes[CODEC_NID(cmd)].reserved.u32F1c_param;
-    Assert(pu32Reg);
-    if (pu32Reg)
-        hdaCodecSetRegisterU8(pu32Reg, cmd, u8Offset);
-    return VINF_SUCCESS;
-}
-
-/* 71C */
-static DECLCALLBACK(int) vrbProcSetConfig0(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    *pResp = 0;
-    return codecSetConfigX(pThis, cmd, 0);
-}
-
-/* 71D */
-static DECLCALLBACK(int) vrbProcSetConfig1(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    *pResp = 0;
-    return codecSetConfigX(pThis, cmd, 8);
-}
-
-/* 71E */
-static DECLCALLBACK(int) vrbProcSetConfig2(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    *pResp = 0;
-    return codecSetConfigX(pThis, cmd, 16);
-}
-
-/* 71E */
-static DECLCALLBACK(int) vrbProcSetConfig3(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp)
-{
-    *pResp = 0;
-    return codecSetConfigX(pThis, cmd, 24);
-}
-
-
-/**
- * HDA codec verb map.
- * @todo Any reason not to use binary search here?
- */
-static const CODECVERB g_aCodecVerbs[] =
-{
-/*     verb     | verb mask              | callback               */
-/*   -----------  --------------------   -----------------------  */
-    { 0x000F0000, CODEC_VERB_8BIT_CMD , vrbProcGetParameter           },
-    { 0x000F0100, CODEC_VERB_8BIT_CMD , vrbProcGetConSelectCtrl       },
-    { 0x00070100, CODEC_VERB_8BIT_CMD , vrbProcSetConSelectCtrl       },
-    { 0x000F0600, CODEC_VERB_8BIT_CMD , vrbProcGetStreamId            },
-    { 0x00070600, CODEC_VERB_8BIT_CMD , vrbProcSetStreamId            },
-    { 0x000F0700, CODEC_VERB_8BIT_CMD , vrbProcGetPinCtrl             },
-    { 0x00070700, CODEC_VERB_8BIT_CMD , vrbProcSetPinCtrl             },
-    { 0x000F0800, CODEC_VERB_8BIT_CMD , vrbProcGetUnsolicitedEnabled  },
-    { 0x00070800, CODEC_VERB_8BIT_CMD , vrbProcSetUnsolicitedEnabled  },
-    { 0x000F0900, CODEC_VERB_8BIT_CMD , vrbProcGetPinSense            },
-    { 0x00070900, CODEC_VERB_8BIT_CMD , vrbProcSetPinSense            },
-    { 0x000F0200, CODEC_VERB_8BIT_CMD , vrbProcGetConnectionListEntry },
-    { 0x000F0300, CODEC_VERB_8BIT_CMD , vrbProcGetProcessingState     },
-    { 0x00070300, CODEC_VERB_8BIT_CMD , vrbProcSetProcessingState     },
-    { 0x000F0D00, CODEC_VERB_8BIT_CMD , vrbProcGetDigitalConverter    },
-    { 0x00070D00, CODEC_VERB_8BIT_CMD , vrbProcSetDigitalConverter1   },
-    { 0x00070E00, CODEC_VERB_8BIT_CMD , vrbProcSetDigitalConverter2   },
-    { 0x000F2000, CODEC_VERB_8BIT_CMD , vrbProcGetSubId               },
-    { 0x00072000, CODEC_VERB_8BIT_CMD , vrbProcSetSubId0              },
-    { 0x00072100, CODEC_VERB_8BIT_CMD , vrbProcSetSubId1              },
-    { 0x00072200, CODEC_VERB_8BIT_CMD , vrbProcSetSubId2              },
-    { 0x00072300, CODEC_VERB_8BIT_CMD , vrbProcSetSubId3              },
-    { 0x0007FF00, CODEC_VERB_8BIT_CMD , vrbProcReset                  },
-    { 0x000F0500, CODEC_VERB_8BIT_CMD , vrbProcGetPowerState          },
-    { 0x00070500, CODEC_VERB_8BIT_CMD , vrbProcSetPowerState          },
-    { 0x000F0C00, CODEC_VERB_8BIT_CMD , vrbProcGetEAPD_BTLEnabled     },
-    { 0x00070C00, CODEC_VERB_8BIT_CMD , vrbProcSetEAPD_BTLEnabled     },
-    { 0x000F0F00, CODEC_VERB_8BIT_CMD , vrbProcGetVolumeKnobCtrl      },
-    { 0x00070F00, CODEC_VERB_8BIT_CMD , vrbProcSetVolumeKnobCtrl      },
-    { 0x000F1700, CODEC_VERB_8BIT_CMD , vrbProcGetGPIOUnsolisted      },
-    { 0x00071700, CODEC_VERB_8BIT_CMD , vrbProcSetGPIOUnsolisted      },
-    { 0x000F1C00, CODEC_VERB_8BIT_CMD , vrbProcGetConfig              },
-    { 0x00071C00, CODEC_VERB_8BIT_CMD , vrbProcSetConfig0             },
-    { 0x00071D00, CODEC_VERB_8BIT_CMD , vrbProcSetConfig1             },
-    { 0x00071E00, CODEC_VERB_8BIT_CMD , vrbProcSetConfig2             },
-    { 0x00071F00, CODEC_VERB_8BIT_CMD , vrbProcSetConfig3             },
-    { 0x000A0000, CODEC_VERB_16BIT_CMD, vrbProcGetConverterFormat     },
-    { 0x00020000, CODEC_VERB_16BIT_CMD, vrbProcSetConverterFormat     },
-    { 0x000B0000, CODEC_VERB_16BIT_CMD, vrbProcGetAmplifier           },
-    { 0x00030000, CODEC_VERB_16BIT_CMD, vrbProcSetAmplifier           },
-};
-
-#ifdef DEBUG
-typedef struct CODECDBGINFO
-{
-    /** DBGF info helpers. */
-    PCDBGFINFOHLP pHlp;
-    /** Current recursion level. */
-    uint8_t uLevel;
-    /** Pointer to codec state. */
-    PHDACODEC pThis;
-
-} CODECDBGINFO, *PCODECDBGINFO;
-
-#define CODECDBG_INDENT   pInfo->uLevel++;
-#define CODECDBG_UNINDENT if (pInfo->uLevel) pInfo->uLevel--;
-
-#define CODECDBG_PRINT(...)  pInfo->pHlp->pfnPrintf(pInfo->pHlp, __VA_ARGS__)
-#define CODECDBG_PRINTI(...) codecDbgPrintf(pInfo, __VA_ARGS__)
-
-static void codecDbgPrintfIndentV(PCODECDBGINFO pInfo, uint16_t uIndent, const char *pszFormat, va_list va)
-{
-    char *pszValueFormat;
-    if (RTStrAPrintfV(&pszValueFormat, pszFormat, va))
-    {
-        pInfo->pHlp->pfnPrintf(pInfo->pHlp, "%*s%s", uIndent, "", pszValueFormat);
-        RTStrFree(pszValueFormat);
-    }
-}
-
-static void codecDbgPrintf(PCODECDBGINFO pInfo, const char *pszFormat, ...)
-{
-    va_list va;
-    va_start(va, pszFormat);
-    codecDbgPrintfIndentV(pInfo, pInfo->uLevel * 4, pszFormat, va);
-    va_end(va);
-}
-
-/* Power state */
-static void codecDbgPrintNodeRegF05(PCODECDBGINFO pInfo, uint32_t u32Reg)
-{
-    codecDbgPrintf(pInfo, "Power (F05): fReset=%RTbool, fStopOk=%RTbool, Set=%RU8, Act=%RU8\n",
-                   CODEC_F05_IS_RESET(u32Reg), CODEC_F05_IS_STOPOK(u32Reg), CODEC_F05_SET(u32Reg), CODEC_F05_ACT(u32Reg));
-}
-
-static void codecDbgPrintNodeRegA(PCODECDBGINFO pInfo, uint32_t u32Reg)
-{
-    codecDbgPrintf(pInfo, "RegA: %x\n", u32Reg);
-}
-
-static void codecDbgPrintNodeRegF00(PCODECDBGINFO pInfo, uint32_t *paReg00)
-{
-    codecDbgPrintf(pInfo, "Parameters (F00):\n");
-
-    CODECDBG_INDENT
-        codecDbgPrintf(pInfo, "Amplifier Caps:\n");
-        uint32_t uReg = paReg00[0xD];
-        CODECDBG_INDENT
-            codecDbgPrintf(pInfo, "Input Steps=%02RU8, StepSize=%02RU8, StepOff=%02RU8, fCanMute=%RTbool\n",
-                           CODEC_F00_0D_NUM_STEPS(uReg),
-                           CODEC_F00_0D_STEP_SIZE(uReg),
-                           CODEC_F00_0D_OFFSET(uReg),
-                           RT_BOOL(CODEC_F00_0D_IS_CAP_MUTE(uReg)));
-
-            uReg = paReg00[0x12];
-            codecDbgPrintf(pInfo, "Output Steps=%02RU8, StepSize=%02RU8, StepOff=%02RU8, fCanMute=%RTbool\n",
-                           CODEC_F00_12_NUM_STEPS(uReg),
-                           CODEC_F00_12_STEP_SIZE(uReg),
-                           CODEC_F00_12_OFFSET(uReg),
-                           RT_BOOL(CODEC_F00_0D_IS_CAP_MUTE(uReg)));
-        CODECDBG_UNINDENT
-    CODECDBG_UNINDENT
-}
-
-static void codecDbgPrintNodeAmp(PCODECDBGINFO pInfo, uint32_t *paReg, uint8_t uIdx, uint8_t uDir)
-{
-#define CODECDBG_AMP(reg, chan) \
-    codecDbgPrintf(pInfo, "Amp %RU8 %s %s: In=%RTbool, Out=%RTbool, Left=%RTbool, Right=%RTbool, Idx=%RU8, fMute=%RTbool, uGain=%RU8\n", \
-                   uIdx, chan, uDir == AMPLIFIER_IN ? "In" : "Out", \
-                   RT_BOOL(CODEC_SET_AMP_IS_IN_DIRECTION(reg)), RT_BOOL(CODEC_SET_AMP_IS_OUT_DIRECTION(reg)), \
-                   RT_BOOL(CODEC_SET_AMP_IS_LEFT_SIDE(reg)), RT_BOOL(CODEC_SET_AMP_IS_RIGHT_SIDE(reg)), \
-                   CODEC_SET_AMP_INDEX(reg), RT_BOOL(CODEC_SET_AMP_MUTE(reg)), CODEC_SET_AMP_GAIN(reg));
-
-    uint32_t regAmp = AMPLIFIER_REGISTER(paReg, uDir, AMPLIFIER_LEFT, uIdx);
-    CODECDBG_AMP(regAmp, "Left");
-    regAmp = AMPLIFIER_REGISTER(paReg, uDir, AMPLIFIER_RIGHT, uIdx);
-    CODECDBG_AMP(regAmp, "Right");
-
-#undef CODECDBG_AMP
-}
-
-static void codecDbgPrintNodeConnections(PCODECDBGINFO pInfo, PCODECNODE pNode)
-{
-    if (pNode->node.au32F00_param[0xE] == 0) /* Directly connected to HDA link. */
-    {
-         codecDbgPrintf(pInfo, "[HDA LINK]\n");
-         return;
-    }
-}
-
-static void codecDbgPrintNode(PCODECDBGINFO pInfo, PCODECNODE pNode)
-{
-    codecDbgPrintf(pInfo, "Node 0x%02x (%02RU8): ", pNode->node.id, pNode->node.id);
-
-    if (pNode->node.id == STAC9220_NID_ROOT)
-    {
-        CODECDBG_PRINT("ROOT\n");
-    }
-    else if (pNode->node.id == STAC9220_NID_AFG)
-    {
-        CODECDBG_PRINT("AFG\n");
-        CODECDBG_INDENT
-            codecDbgPrintNodeRegF00(pInfo, pNode->node.au32F00_param);
-            codecDbgPrintNodeRegF05(pInfo, pNode->afg.u32F05_param);
-        CODECDBG_UNINDENT
-    }
-    else if (hdaCodecIsPortNode(pInfo->pThis, pNode->node.id))
-    {
-        CODECDBG_PRINT("PORT\n");
-    }
-    else if (hdaCodecIsDacNode(pInfo->pThis, pNode->node.id))
-    {
-        CODECDBG_PRINT("DAC\n");
-        CODECDBG_INDENT
-            codecDbgPrintNodeRegF00(pInfo, pNode->node.au32F00_param);
-            codecDbgPrintNodeRegF05(pInfo, pNode->dac.u32F05_param);
-            codecDbgPrintNodeRegA  (pInfo, pNode->dac.u32A_param);
-            codecDbgPrintNodeAmp   (pInfo, pNode->dac.B_params, 0, AMPLIFIER_OUT);
-        CODECDBG_UNINDENT
-    }
-    else if (hdaCodecIsAdcVolNode(pInfo->pThis, pNode->node.id))
-    {
-        CODECDBG_PRINT("ADC VOLUME\n");
-        CODECDBG_INDENT
-            codecDbgPrintNodeRegF00(pInfo, pNode->node.au32F00_param);
-            codecDbgPrintNodeRegA  (pInfo, pNode->adcvol.u32A_params);
-            codecDbgPrintNodeAmp   (pInfo, pNode->adcvol.B_params, 0, AMPLIFIER_IN);
-        CODECDBG_UNINDENT
-    }
-    else if (hdaCodecIsAdcNode(pInfo->pThis, pNode->node.id))
-    {
-        CODECDBG_PRINT("ADC\n");
-        CODECDBG_INDENT
-            codecDbgPrintNodeRegF00(pInfo, pNode->node.au32F00_param);
-            codecDbgPrintNodeRegF05(pInfo, pNode->adc.u32F05_param);
-            codecDbgPrintNodeRegA  (pInfo, pNode->adc.u32A_param);
-            codecDbgPrintNodeAmp   (pInfo, pNode->adc.B_params, 0, AMPLIFIER_IN);
-        CODECDBG_UNINDENT
-    }
-    else if (hdaCodecIsAdcMuxNode(pInfo->pThis, pNode->node.id))
-    {
-        CODECDBG_PRINT("ADC MUX\n");
-        CODECDBG_INDENT
-            codecDbgPrintNodeRegF00(pInfo, pNode->node.au32F00_param);
-            codecDbgPrintNodeRegA  (pInfo, pNode->adcmux.u32A_param);
-            codecDbgPrintNodeAmp   (pInfo, pNode->adcmux.B_params, 0, AMPLIFIER_IN);
-        CODECDBG_UNINDENT
-    }
-    else if (hdaCodecIsPcbeepNode(pInfo->pThis, pNode->node.id))
-    {
-        CODECDBG_PRINT("PC BEEP\n");
-    }
-    else if (hdaCodecIsSpdifOutNode(pInfo->pThis, pNode->node.id))
-    {
-        CODECDBG_PRINT("SPDIF OUT\n");
-    }
-    else if (hdaCodecIsSpdifInNode(pInfo->pThis, pNode->node.id))
-    {
-        CODECDBG_PRINT("SPDIF IN\n");
-    }
-    else if (hdaCodecIsDigInPinNode(pInfo->pThis, pNode->node.id))
-    {
-        CODECDBG_PRINT("DIGITAL IN PIN\n");
-    }
-    else if (hdaCodecIsDigOutPinNode(pInfo->pThis, pNode->node.id))
-    {
-        CODECDBG_PRINT("DIGITAL OUT PIN\n");
-    }
-    else if (hdaCodecIsCdNode(pInfo->pThis, pNode->node.id))
-    {
-        CODECDBG_PRINT("CD\n");
-    }
-    else if (hdaCodecIsVolKnobNode(pInfo->pThis, pNode->node.id))
-    {
-        CODECDBG_PRINT("VOLUME KNOB\n");
-    }
-    else if (hdaCodecIsReservedNode(pInfo->pThis, pNode->node.id))
-    {
-        CODECDBG_PRINT("RESERVED\n");
-    }
-    else
-        CODECDBG_PRINT("UNKNOWN TYPE 0x%x\n", pNode->node.id);
-}
-
-static DECLCALLBACK(void) codecDbgListNodes(PHDACODEC pThis, PCDBGFINFOHLP pHlp, const char *pszArgs)
-{
-    pHlp->pfnPrintf(pHlp, "HDA LINK\n");
-
-    CODECDBGINFO dbgInfo;
-    dbgInfo.pHlp   = pHlp;
-    dbgInfo.pThis  = pThis;
-    dbgInfo.uLevel = 0;
-
-    PCODECDBGINFO pInfo = &dbgInfo;
-
-    CODECDBG_INDENT
-        for (uint8_t i = 0; i < pThis->cTotalNodes; i++)
-        {
-            PCODECNODE pNode = &pThis->paNodes[i];
-            if (pNode->node.au32F00_param[0xE] == 0) /* Start with all nodes connected directly to the HDA (Azalia) link. */
-                codecDbgPrintNode(&dbgInfo, pNode);
-        }
-    CODECDBG_UNINDENT
-}
-
-static DECLCALLBACK(void) codecDbgSelector(PHDACODEC pThis, PCDBGFINFOHLP pHlp, const char *pszArgs)
-{
-
-}
-#endif
-
-static DECLCALLBACK(int) codecLookup(PHDACODEC pThis, uint32_t cmd, PPFNHDACODECVERBPROCESSOR pfn)
-{
-    Assert(CODEC_CAD(cmd) == pThis->id);
-    if (hdaCodecIsReservedNode(pThis, CODEC_NID(cmd)))
-        LogFlowFunc(("cmd %x was addressed to reserved node\n", cmd));
-
-    if (   CODEC_VERBDATA(cmd) == 0
-        || CODEC_NID(cmd) >= pThis->cTotalNodes)
-    {
-        *pfn = vrbProcUnimplemented;
-        /// @todo r=michaln: There needs to be a counter to avoid log flooding (see e.g. DevRTC.cpp)
-        LogFlowFunc(("cmd %x was ignored\n", cmd));
-        return VINF_SUCCESS;
-    }
-
-    for (int i = 0; i < pThis->cVerbs; ++i)
-    {
-        if ((CODEC_VERBDATA(cmd) & pThis->paVerbs[i].mask) == pThis->paVerbs[i].verb)
-        {
-            *pfn = pThis->paVerbs[i].pfn;
-            return VINF_SUCCESS;
-        }
-    }
-
-    *pfn = vrbProcUnimplemented;
-    LogFlowFunc(("callback for %x wasn't found\n", CODEC_VERBDATA(cmd)));
-    return VINF_SUCCESS;
-}
-
-/*
- * APIs exposed to DevHDA.
- */
-
-/**
- *
- * routines open one of the voices (IN, OUT) with corresponding parameters.
- * this routine could be called from HDA on setting/resseting sound format.
- *
- * @todo Probably passed settings should be verified (if AFG's declared proposed
- *       format) before enabling.
- */
-int hdaCodecOpenStream(PHDACODEC pThis, ENMSOUNDSOURCE enmSoundSource, PPDMAUDIOSTREAMCFG pCfg)
-{
-    AssertPtrReturn(pThis, VERR_INVALID_POINTER);
-
-    int rc;
-    switch (enmSoundSource)
-    {
-        case PI_INDEX:
-            rc = pThis->pfnOpenIn(pThis->pHDAState,  "hda.in", PDMAUDIORECSOURCE_LINE_IN, pCfg);
-            break;
-#ifdef VBOX_WITH_HDA_MIC_IN
-        case MC_INDEX:
-            rc = pThis->pfnOpenIn(pThis->pHDAState,  "hda.mc", PDMAUDIORECSOURCE_MIC, pCfg);
-            break;
-#endif
-        case PO_INDEX:
-            rc = pThis->pfnOpenOut(pThis->pHDAState, "hda.out", pCfg);
-            break;
-
-        default:
-            AssertMsgFailed(("Index %ld not implemented\n", enmSoundSource));
-            rc = VERR_NOT_IMPLEMENTED;
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-int hdaCodecSaveState(PHDACODEC pThis, PSSMHANDLE pSSM)
-{
-    AssertLogRelMsgReturn(pThis->cTotalNodes == 0x1c, ("cTotalNodes=%#x, should be 0x1c", pThis->cTotalNodes),
-                          VERR_INTERNAL_ERROR);
-    SSMR3PutU32(pSSM, pThis->cTotalNodes);
-    for (unsigned idxNode = 0; idxNode < pThis->cTotalNodes; ++idxNode)
-        SSMR3PutStructEx(pSSM, &pThis->paNodes[idxNode].SavedState, sizeof(pThis->paNodes[idxNode].SavedState),
-                         0 /*fFlags*/, g_aCodecNodeFields, NULL /*pvUser*/);
-    return VINF_SUCCESS;
-}
-
-int hdaCodecLoadState(PHDACODEC pThis, PSSMHANDLE pSSM, uint32_t uVersion)
-{
-    PCSSMFIELD pFields;
-    uint32_t   fFlags;
-    switch (uVersion)
-    {
-        case HDA_SSM_VERSION_1:
-            AssertReturn(pThis->cTotalNodes == 0x1c, VERR_INTERNAL_ERROR);
-            pFields = g_aCodecNodeFieldsV1;
-            fFlags  = SSMSTRUCT_FLAGS_MEM_BAND_AID_RELAXED;
-            break;
-
-        case HDA_SSM_VERSION_2:
-        case HDA_SSM_VERSION_3:
-            AssertReturn(pThis->cTotalNodes == 0x1c, VERR_INTERNAL_ERROR);
-            pFields = g_aCodecNodeFields;
-            fFlags  = SSMSTRUCT_FLAGS_MEM_BAND_AID_RELAXED;
-            break;
-
-        /* Since version 4 a flexible node count is supported. */
-        case HDA_SSM_VERSION_4:
-        case HDA_SSM_VERSION_5:
-        case HDA_SSM_VERSION:
-        {
-            uint32_t cNodes;
-            int rc2 = SSMR3GetU32(pSSM, &cNodes);
-            AssertRCReturn(rc2, rc2);
-            if (cNodes != 0x1c)
-                return VERR_SSM_DATA_UNIT_FORMAT_CHANGED;
-            AssertReturn(pThis->cTotalNodes == 0x1c, VERR_INTERNAL_ERROR);
-
-            pFields = g_aCodecNodeFields;
-            fFlags  = 0;
-            break;
-        }
-
-        default:
-            return VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION;
-    }
-
-    for (unsigned idxNode = 0; idxNode < pThis->cTotalNodes; ++idxNode)
-    {
-        uint8_t idOld = pThis->paNodes[idxNode].SavedState.Core.id;
-        int rc = SSMR3GetStructEx(pSSM, &pThis->paNodes[idxNode].SavedState,
-                                  sizeof(pThis->paNodes[idxNode].SavedState),
-                                  fFlags, pFields, NULL);
-        if (RT_FAILURE(rc))
-            return rc;
-        AssertLogRelMsgReturn(idOld == pThis->paNodes[idxNode].SavedState.Core.id,
-                              ("loaded %#x, expected %#x\n", pThis->paNodes[idxNode].SavedState.Core.id, idOld),
-                              VERR_SSM_DATA_UNIT_FORMAT_CHANGED);
-    }
-
-    /*
-     * Update stuff after changing the state.
-     */
-    if (hdaCodecIsDacNode(pThis, pThis->u8DacLineOut))
-        hdaCodecToAudVolume(pThis, &pThis->paNodes[pThis->u8DacLineOut].dac.B_params, PDMAUDIOMIXERCTL_PCM);
-    else if (hdaCodecIsSpdifOutNode(pThis, pThis->u8DacLineOut))
-        hdaCodecToAudVolume(pThis, &pThis->paNodes[pThis->u8DacLineOut].spdifout.B_params, PDMAUDIOMIXERCTL_PCM);
-    hdaCodecToAudVolume(pThis, &pThis->paNodes[pThis->u8AdcVolsLineIn].adcvol.B_params, PDMAUDIOMIXERCTL_LINE_IN);
-
-    return VINF_SUCCESS;
-}
-
-int hdaCodecDestruct(PHDACODEC pThis)
-{
-    AssertPtrReturn(pThis, VERR_INVALID_POINTER);
-
-    if (pThis->paNodes)
-    {
-        RTMemFree(pThis->paNodes);
-        pThis->paNodes = NULL;
-    }
-
-    return VINF_SUCCESS;
-}
-
-int hdaCodecConstruct(PPDMDEVINS pDevIns, PHDACODEC pThis,
-                      uint16_t uLUN, PCFGMNODE pCfg)
-{
-    AssertPtrReturn(pDevIns, VERR_INVALID_POINTER);
-    AssertPtrReturn(pThis, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
-
-    pThis->id        = uLUN;
-    pThis->paVerbs   = &g_aCodecVerbs[0];
-    pThis->cVerbs    = RT_ELEMENTS(g_aCodecVerbs);
-
-    pThis->pfnLookup       = codecLookup;
-#ifdef DEBUG
-    pThis->pfnDbgSelector  = codecDbgSelector;
-    pThis->pfnDbgListNodes = codecDbgListNodes;
-#endif
-    int rc = stac9220Construct(pThis);
-    AssertRC(rc);
-
-    /* common root node initializers */
-    pThis->paNodes[0].node.au32F00_param[0] = CODEC_MAKE_F00_00(pThis->u16VendorId, pThis->u16DeviceId);
-    pThis->paNodes[0].node.au32F00_param[4] = CODEC_MAKE_F00_04(0x1, 0x1);
-    /* common AFG node initializers */
-    pThis->paNodes[1].node.au32F00_param[4] = CODEC_MAKE_F00_04(0x2, pThis->cTotalNodes - 2);
-    pThis->paNodes[1].node.au32F00_param[5] = CODEC_MAKE_F00_05(1, CODEC_F00_05_AFG);
-    pThis->paNodes[1].afg.u32F20_param = CODEC_MAKE_F20(pThis->u16VendorId, pThis->u8BSKU, pThis->u8AssemblyId);
-
-    /* This codec uses a fixed setting (44.1 kHz, 16-bit signed, 2 channels). */
-    pThis->strmCfg.uHz           = 44100;
-    pThis->strmCfg.cChannels     = 2;
-    pThis->strmCfg.enmFormat     = AUD_FMT_S16;
-    pThis->strmCfg.enmEndianness = PDMAUDIOHOSTENDIANNESS;
-
-    hdaCodecOpenStream(pThis, PI_INDEX, &pThis->strmCfg);
-#ifdef VBOX_WITH_HDA_MIC_IN
-    hdaCodecOpenStream(pThis, MC_INDEX, &pThis->strmCfg);
-#endif
-    hdaCodecOpenStream(pThis, PO_INDEX, &pThis->strmCfg);
-
-    /* Initialize the AFG node with the fixed setting. */
-    pThis->paNodes[1].node.au32F00_param[0xA] = CODEC_F00_0A_44_1KHZ | CODEC_F00_0A_16_BIT;
-
-    AssertPtr(pThis->paNodes);
-    AssertPtr(pThis->pfnCodecNodeReset);
-
-    for (uint8_t i = 0; i < pThis->cTotalNodes; i++)
-        pThis->pfnCodecNodeReset(pThis, i, &pThis->paNodes[i]);
-
-    hdaCodecToAudVolume(pThis, &pThis->paNodes[pThis->u8DacLineOut].dac.B_params,       PDMAUDIOMIXERCTL_PCM);
-    hdaCodecToAudVolume(pThis, &pThis->paNodes[pThis->u8AdcVolsLineIn].adcvol.B_params, PDMAUDIOMIXERCTL_LINE_IN);
-
-    return VINF_SUCCESS;
-}
-
diff --git a/src/VBox/Devices/Audio_old/DevIchHdaCodec.h b/src/VBox/Devices/Audio_old/DevIchHdaCodec.h
deleted file mode 100644
index 825a553..0000000
--- a/src/VBox/Devices/Audio_old/DevIchHdaCodec.h
+++ /dev/null
@@ -1,155 +0,0 @@
-/* $Id: DevIchHdaCodec.h $ */
-/** @file
- * DevIchHdaCodec - VBox ICH Intel HD Audio Codec.
- */
-
-/*
- * Copyright (C) 2006-2016 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-#ifndef DEV_CODEC_H
-#define DEV_CODEC_H
-
-/** The ICH HDA (Intel) controller. */
-typedef struct HDASTATE *PHDASTATE;
-/** The ICH HDA (Intel) codec state. */
-typedef struct HDACODEC *PHDACODEC;
-/** The HDA host driver backend. */
-typedef struct HDADRIVER *PHDADRIVER;
-typedef struct PDMIAUDIOCONNECTOR *PPDMIAUDIOCONNECTOR;
-typedef struct PDMAUDIOGSTSTRMOUT *PPDMAUDIOGSTSTRMOUT;
-typedef struct PDMAUDIOGSTSTRMIN  *PPDMAUDIOGSTSTRMIN;
-
-/**
- * Verb processor method.
- */
-typedef DECLCALLBACK(int) FNHDACODECVERBPROCESSOR(PHDACODEC pThis, uint32_t cmd, uint64_t *pResp);
-typedef FNHDACODECVERBPROCESSOR *PFNHDACODECVERBPROCESSOR;
-typedef FNHDACODECVERBPROCESSOR **PPFNHDACODECVERBPROCESSOR;
-
-/* PRM 5.3.1 */
-#define CODEC_RESPONSE_UNSOLICITED RT_BIT_64(34)
-
-
-#ifndef VBOX_WITH_HDA_CODEC_EMU
-typedef struct CODECVERB
-{
-    uint32_t verb;
-    /** operation bitness mask */
-    uint32_t mask;
-    PFNHDACODECVERBPROCESSOR pfn;
-} CODECVERB;
-#endif
-
-#ifndef VBOX_WITH_HDA_CODEC_EMU
-# define TYPE union
-#else
-# define TYPE struct
-typedef struct CODECEMU CODECEMU;
-typedef CODECEMU *PCODECEMU;
-#endif
-TYPE CODECNODE;
-typedef TYPE CODECNODE CODECNODE;
-typedef TYPE CODECNODE *PCODECNODE;
-
-typedef enum
-{
-    PI_INDEX = 0,    /**< PCM in */
-    PO_INDEX,        /**< PCM out */
-    MC_INDEX,        /**< Mic in */
-    LAST_INDEX
-} ENMSOUNDSOURCE;
-
-typedef struct HDACODEC
-{
-    uint16_t                id;
-    uint16_t                u16VendorId;
-    uint16_t                u16DeviceId;
-    uint8_t                 u8BSKU;
-    uint8_t                 u8AssemblyId;
-    /** List of assigned HDA drivers to this codec.
-     * A driver only can be assigned to one codec at a time. */
-    RTLISTANCHOR            lstDrv;
-    /** The codec's current audio stream configuration. */
-    PDMAUDIOSTREAMCFG       strmCfg;
-
-#ifndef VBOX_WITH_HDA_CODEC_EMU
-    CODECVERB const        *paVerbs;
-    int                     cVerbs;
-#else
-    PCODECEMU               pCodecBackend;
-#endif
-    PCODECNODE              paNodes;
-    /** Pointer to HDA state (controller) this
-     *  codec is assigned to. */
-    PHDASTATE               pHDAState;
-    bool                    fInReset;
-#ifndef VBOX_WITH_HDA_CODEC_EMU
-    const uint8_t           cTotalNodes;
-    const uint8_t          *au8Ports;
-    const uint8_t          *au8Dacs;
-    const uint8_t          *au8AdcVols;
-    const uint8_t          *au8Adcs;
-    const uint8_t          *au8AdcMuxs;
-    const uint8_t          *au8Pcbeeps;
-    const uint8_t          *au8SpdifIns;
-    const uint8_t          *au8SpdifOuts;
-    const uint8_t          *au8DigInPins;
-    const uint8_t          *au8DigOutPins;
-    const uint8_t          *au8Cds;
-    const uint8_t          *au8VolKnobs;
-    const uint8_t          *au8Reserveds;
-    const uint8_t           u8AdcVolsLineIn;
-    const uint8_t           u8DacLineOut;
-#endif
-    /** Callbacks to the HDA controller, mostly used for multiplexing to the various host backends. */
-    DECLR3CALLBACKMEMBER(void, pfnCloseIn, (PHDASTATE pThis, PDMAUDIORECSOURCE enmRecSource));
-    DECLR3CALLBACKMEMBER(void, pfnCloseOut, (PHDASTATE pThis));
-    DECLR3CALLBACKMEMBER(int, pfnOpenIn, (PHDASTATE pThis, const char *pszName, PDMAUDIORECSOURCE enmRecSource, PPDMAUDIOSTREAMCFG pCfg));
-    DECLR3CALLBACKMEMBER(int, pfnOpenOut, (PHDASTATE pThis, const char *pszName, PPDMAUDIOSTREAMCFG pCfg));
-    DECLR3CALLBACKMEMBER(int, pfnSetVolume, (PHDASTATE pThis, ENMSOUNDSOURCE enmSource, bool fMute, uint8_t uVolLeft, uint8_t uVolRight));
-    /** Callbacks by codec implementation. */
-    DECLR3CALLBACKMEMBER(int, pfnLookup, (PHDACODEC pThis, uint32_t verb, PPFNHDACODECVERBPROCESSOR));
-    DECLR3CALLBACKMEMBER(int, pfnReset, (PHDACODEC pThis));
-    DECLR3CALLBACKMEMBER(int, pfnCodecNodeReset, (PHDACODEC pThis, uint8_t, PCODECNODE));
-    /** These callbacks are set by codec implementation to answer debugger requests. */
-    DECLR3CALLBACKMEMBER(void, pfnDbgListNodes, (PHDACODEC pThis, PCDBGFINFOHLP pHlp, const char *pszArgs));
-    DECLR3CALLBACKMEMBER(void, pfnDbgSelector, (PHDACODEC pThis, PCDBGFINFOHLP pHlp, const char *pszArgs));
-} HDACODEC;
-
-int hdaCodecConstruct(PPDMDEVINS pDevIns, PHDACODEC pThis, uint16_t uLUN, PCFGMNODE pCfg);
-int hdaCodecDestruct(PHDACODEC pThis);
-int hdaCodecSaveState(PHDACODEC pThis, PSSMHANDLE pSSM);
-int hdaCodecLoadState(PHDACODEC pThis, PSSMHANDLE pSSM, uint32_t uVersion);
-int hdaCodecOpenStream(PHDACODEC pThis, ENMSOUNDSOURCE enmSoundSource, PPDMAUDIOSTREAMCFG pCfg);
-
-#define HDA_SSM_VERSION   6
-/** Introduced dynamic number of streams + stream identifiers for serialization.
- *  Bug: Did not save the BDLE states correctly.
- *  Those will be skipped on load then. */
-#define HDA_SSM_VERSION_5 5
-/** Since this version the number of MMIO registers can be flexible. */
-#define HDA_SSM_VERSION_4 4
-#define HDA_SSM_VERSION_3 3
-#define HDA_SSM_VERSION_2 2
-#define HDA_SSM_VERSION_1 1
-
-# ifdef VBOX_WITH_HDA_CODEC_EMU
-/* */
-struct CODECEMU
-{
-    DECLR3CALLBACKMEMBER(int, pfnCodecEmuConstruct,(PHDACODEC pThis));
-    DECLR3CALLBACKMEMBER(int, pfnCodecEmuDestruct,(PHDACODEC pThis));
-    DECLR3CALLBACKMEMBER(int, pfnCodecEmuReset,(PHDACODEC pThis, bool fInit));
-};
-# endif
-#endif
-
diff --git a/src/VBox/Devices/Audio_old/DevSB16.cpp b/src/VBox/Devices/Audio_old/DevSB16.cpp
deleted file mode 100644
index 7996bf4..0000000
--- a/src/VBox/Devices/Audio_old/DevSB16.cpp
+++ /dev/null
@@ -1,2438 +0,0 @@
-/* $Id: DevSB16.cpp $ */
-/** @file
- * DevSB16 - VBox SB16 Audio Controller.
- *
- * @todo hiccups on NT4 and Win98.
- */
-
-/*
- * Copyright (C) 2015-2016 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- * --------------------------------------------------------------------
- *
- * This code is based on: sb16.c from QEMU AUDIO subsystem (r3917).
- * QEMU Soundblaster 16 emulation
- *
- * Copyright (c) 2003-2005 Vassili Karpov (malc)
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#define LOG_GROUP LOG_GROUP_DEV_SB16
-#include <VBox/log.h>
-#include <iprt/assert.h>
-#ifdef IN_RING3
-# include <iprt/mem.h>
-# include <iprt/string.h>
-# include <iprt/uuid.h>
-#endif
-
-#include <VBox/vmm/pdmdev.h>
-#include <VBox/vmm/pdmaudioifs.h>
-
-#include "VBoxDD.h"
-
-#include "AudioMixBuffer.h"
-#include "AudioMixer.h"
-#include "DrvAudio.h"
-
-/** Current saved state version. */
-#define SB16_SAVE_STATE_VERSION         2
-/** The version used in VirtualBox version 3.0 and earlier. This didn't include the config dump. */
-#define SB16_SAVE_STATE_VERSION_VBOX_30 1
-
-#define IO_READ_PROTO(name)                                             \
-    DECLCALLBACK(int) name (PPDMDEVINS pDevIns, void *opaque,       \
-                            RTIOPORT nport, uint32_t *pu32, unsigned cb)
-
-#define IO_WRITE_PROTO(name)                                            \
-    DECLCALLBACK(int) name (PPDMDEVINS pDevIns, void *opaque,       \
-                            RTIOPORT nport, uint32_t val, unsigned cb)
-
-static const char e3[] = "COPYRIGHT (C) CREATIVE TECHNOLOGY LTD, 1992.";
-
-typedef struct SB16OUTPUTSTREAM
-{
-    /** PCM output stream. */
-    R3PTRTYPE(PPDMAUDIOGSTSTRMOUT)     pStrmOut;
-    /** Mixer handle for output stream. */
-    R3PTRTYPE(PAUDMIXSTREAM)           phStrmOut;
-} SB16OUTPUTSTREAM, *PSB16OUTPUTSTREAM;
-
-/**
- * Struct for maintaining a host backend driver.
- */
-typedef struct SB16STATE *PSB16STATE;
-typedef struct SB16DRIVER
-{
-    /** Node for storing this driver in our device driver list of SB16STATE. */
-    RTLISTNODER3                       Node;
-    /** Pointer to SB16 controller (state). */
-    R3PTRTYPE(PSB16STATE)              pSB16State;
-    /** Driver flags. */
-    PDMAUDIODRVFLAGS                   Flags;
-    uint32_t                           PaddingFlags;
-    /** LUN # to which this driver has been assigned. */
-    uint8_t                            uLUN;
-    /** Whether this driver is in an attached state or not. */
-    bool                               fAttached;
-    uint8_t                            Padding[4];
-    /** Pointer to attached driver base interface. */
-    R3PTRTYPE(PPDMIBASE)               pDrvBase;
-    /** Audio connector interface to the underlying host backend. */
-    R3PTRTYPE(PPDMIAUDIOCONNECTOR)     pConnector;
-    /** Stream for output. */
-    SB16OUTPUTSTREAM                   Out;
-} SB16DRIVER, *PSB16DRIVER;
-
-typedef struct SB16STATE
-{
-#ifdef VBOX
-    /** Pointer to the device instance. */
-    PPDMDEVINSR3        pDevInsR3;
-    /** Pointer to the connector of the attached audio driver. */
-    PPDMIAUDIOCONNECTOR pDrv;
-    int irqCfg;
-    int dmaCfg;
-    int hdmaCfg;
-    int portCfg;
-    int verCfg;
-#endif
-    int irq;
-    int dma;
-    int hdma;
-    int port;
-    int ver;
-
-    int in_index;
-    int out_data_len;
-    int fmt_stereo;
-    int fmt_signed;
-    int fmt_bits;
-    PDMAUDIOFMT fmt;
-    int dma_auto;
-    int block_size;
-    int fifo;
-    int freq;
-    int time_const;
-    int speaker;
-    int needed_bytes;
-    int cmd;
-    int use_hdma;
-    int highspeed;
-    int can_write; /** @todo Value never gets 0? */
-
-    int v2x6;
-
-    uint8_t csp_param;
-    uint8_t csp_value;
-    uint8_t csp_mode;
-    uint8_t csp_regs[256];
-    uint8_t csp_index;
-    uint8_t csp_reg83[4];
-    int csp_reg83r;
-    int csp_reg83w;
-
-    uint8_t in2_data[10];
-    uint8_t out_data[50];
-    uint8_t test_reg;
-    uint8_t last_read_byte;
-    int nzero;
-
-    int left_till_irq; /** Note: Can be < 0. */
-
-    int dma_running;
-    int bytes_per_second;
-    int align;
-
-    RTLISTANCHOR                   lstDrv;
-    /** The device' software mixer. */
-    R3PTRTYPE(PAUDIOMIXER)         pMixer;
-    /** Audio sink for PCM output. */
-    R3PTRTYPE(PAUDMIXSINK)         pSinkOutput;
-#ifndef VBOX_WITH_AUDIO_CALLBACKS
-    /** The timer for pumping data thru the attached LUN drivers. */
-    PTMTIMERR3                     pTimerIO;
-    /** The timer interval for pumping data thru the LUN drivers in timer ticks. */
-    uint64_t                       cTimerTicksIO;
-    /** Timestamp of the last timer callback (sb16TimerIO).
-     * Used to calculate the time actually elapsed between two timer callbacks. */
-    uint64_t                       uTimerTSIO;
-#endif
-    PTMTIMER                       pTimerIRQ;
-    /** The base interface for LUN\#0. */
-    PDMIBASE                       IBase;
-
-    /* mixer state */
-    int mixer_nreg;
-    uint8_t mixer_regs[256];
-} SB16STATE, *PSB16STATE;
-
-static int sb16OpenOut(PSB16STATE pThis, PPDMAUDIOSTREAMCFG pCfg);
-
-/**
- * Attach command, internal version.
- *
- * This is called to let the device attach to a driver for a specified LUN
- * during runtime. This is not called during VM construction, the device
- * constructor has to attach to all the available drivers.
- *
- * @returns VBox status code.
- * @param   pDevIns     The device instance.
- * @param   pDrv        Driver to (re-)use for (re-)attaching to.
- *                      If NULL is specified, a new driver will be created and appended
- *                      to the driver list.
- * @param   uLUN        The logical unit which is being detached.
- * @param   fFlags      Flags, combination of the PDMDEVATT_FLAGS_* \#defines.
- */
-static DECLCALLBACK(int) sb16AttachInternal(PPDMDEVINS pDevIns, PSB16DRIVER pDrv, unsigned uLUN, uint32_t fFlags)
-{
-    PSB16STATE pThis = PDMINS_2_DATA(pDevIns, PSB16STATE);
-
-    /*
-     * Attach driver.
-     */
-    char *pszDesc = NULL;
-    if (RTStrAPrintf(&pszDesc, "Audio driver port (SB16) for LUN #%u", uLUN) <= 0)
-        AssertReleaseMsgReturn(pszDesc,
-                               ("Not enough memory for SB16 driver port description of LUN #%u\n", uLUN),
-                               VERR_NO_MEMORY);
-
-    PPDMIBASE pDrvBase;
-    int rc = PDMDevHlpDriverAttach(pDevIns, uLUN,
-                                   &pThis->IBase, &pDrvBase, pszDesc);
-    if (RT_SUCCESS(rc))
-    {
-        if (pDrv == NULL)
-            pDrv = (PSB16DRIVER)RTMemAllocZ(sizeof(SB16DRIVER));
-        if (pDrv)
-        {
-            pDrv->pDrvBase   = pDrvBase;
-            pDrv->pConnector = PDMIBASE_QUERY_INTERFACE(pDrvBase, PDMIAUDIOCONNECTOR);
-            AssertMsg(pDrv->pConnector != NULL, ("Configuration error: LUN #%u has no host audio interface, rc=%Rrc\n", uLUN, rc));
-            pDrv->pSB16State = pThis;
-            pDrv->uLUN       = uLUN;
-
-            /*
-             * For now we always set the driver at LUN 0 as our primary
-             * host backend. This might change in the future.
-             */
-            if (pDrv->uLUN == 0)
-                pDrv->Flags |= PDMAUDIODRVFLAG_PRIMARY;
-
-            LogFunc(("LUN#%RU8: pCon=%p, drvFlags=0x%x\n", uLUN, pDrv->pConnector, pDrv->Flags));
-
-            /* Attach to driver list if not attached yet. */
-            if (!pDrv->fAttached)
-            {
-                RTListAppend(&pThis->lstDrv, &pDrv->Node);
-                pDrv->fAttached = true;
-            }
-        }
-        else
-            rc = VERR_NO_MEMORY;
-    }
-    else if (rc == VERR_PDM_NO_ATTACHED_DRIVER)
-    {
-        LogFunc(("No attached driver for LUN #%u\n", uLUN));
-    }
-    else if (RT_FAILURE(rc))
-        AssertMsgFailed(("Failed to attach SB16 LUN #%u (\"%s\"), rc=%Rrc\n",
-                        uLUN, pszDesc, rc));
-
-    if (RT_FAILURE(rc))
-    {
-        /* Only free this string on failure;
-         * must remain valid for the live of the driver instance. */
-        RTStrFree(pszDesc);
-    }
-
-    LogFunc(("iLUN=%u, fFlags=0x%x, rc=%Rrc\n", uLUN, fFlags, rc));
-    return rc;
-}
-
-/**
- * Attach command.
- *
- * This is called to let the device attach to a driver for a specified LUN
- * during runtime. This is not called during VM construction, the device
- * constructor has to attach to all the available drivers.
- *
- * @returns VBox status code.
- * @param   pDevIns     The device instance.
- * @param   uLUN        The logical unit which is being detached.
- * @param   fFlags      Flags, combination of the PDMDEVATT_FLAGS_* \#defines.
- */
-static DECLCALLBACK(int) sb16Attach(PPDMDEVINS pDevIns, unsigned uLUN, uint32_t fFlags)
-{
-    return sb16AttachInternal(pDevIns, NULL /* pDrv */, uLUN, fFlags);
-}
-
-static DECLCALLBACK(void) sb16Detach(PPDMDEVINS pDevIns, unsigned uLUN, uint32_t fFlags)
-{
-    LogFunc(("iLUN=%u, fFlags=0x%x\n", uLUN, fFlags));
-}
-
-/**
- * Re-attach.
- *
- * @returns VBox status code.
- * @param   pThis       Device instance.
- * @param   pDrv        Driver instance used for attaching to.
- *                      If NULL is specified, a new driver will be created and appended
- *                      to the driver list.
- * @param   uLUN        The logical unit which is being re-detached.
- * @param   pszDriver   Driver name.
- */
-static int sb16Reattach(PSB16STATE pThis, PSB16DRIVER pDrv, uint8_t uLUN, const char *pszDriver)
-{
-    AssertPtrReturn(pThis,     VERR_INVALID_POINTER);
-    AssertPtrReturn(pszDriver, VERR_INVALID_POINTER);
-
-    PVM pVM = PDMDevHlpGetVM(pThis->pDevInsR3);
-    PCFGMNODE pRoot = CFGMR3GetRoot(pVM);
-    PCFGMNODE pDev0 = CFGMR3GetChild(pRoot, "Devices/sb16/0/");
-
-    /* Remove LUN branch. */
-    CFGMR3RemoveNode(CFGMR3GetChildF(pDev0, "LUN#%u/", uLUN));
-
-    if (pDrv)
-    {
-        /* Re-use the driver instance so detach it before. */
-        int rc = PDMDevHlpDriverDetach(pThis->pDevInsR3, PDMIBASE_2_PDMDRV(pDrv->pDrvBase), 0 /* fFlags */);
-        if (RT_FAILURE(rc))
-            return rc;
-    }
-
-#define RC_CHECK() if (RT_FAILURE(rc)) { AssertReleaseRC(rc); break; }
-
-    int rc = VINF_SUCCESS;
-    do
-    {
-        PCFGMNODE pLunL0;
-        rc = CFGMR3InsertNodeF(pDev0, &pLunL0, "LUN#%u/", uLUN);        RC_CHECK();
-        rc = CFGMR3InsertString(pLunL0, "Driver",       "AUDIO");       RC_CHECK();
-        rc = CFGMR3InsertNode(pLunL0,   "Config/",       NULL);         RC_CHECK();
-
-        PCFGMNODE pLunL1, pLunL2;
-        rc = CFGMR3InsertNode  (pLunL0, "AttachedDriver/", &pLunL1);    RC_CHECK();
-        rc = CFGMR3InsertNode  (pLunL1,  "Config/",        &pLunL2);    RC_CHECK();
-        rc = CFGMR3InsertString(pLunL1,  "Driver",          pszDriver); RC_CHECK();
-
-        rc = CFGMR3InsertString(pLunL2, "AudioDriver", pszDriver);      RC_CHECK();
-
-    } while (0);
-
-    if (RT_SUCCESS(rc))
-        rc = sb16AttachInternal(pThis->pDevInsR3, pDrv, uLUN, 0 /* fFlags */);
-
-    LogFunc(("pThis=%p, uLUN=%u, pszDriver=%s, rc=%Rrc\n", pThis, uLUN, pszDriver, rc));
-
-#undef RC_CHECK
-
-    return rc;
-}
-
-static void sb16AudioCallback(void *pvContext, uint32_t cbFree);
-
-static int magic_of_irq(int irq)
-{
-    switch (irq)
-    {
-        case 5:
-            return 2;
-        case 7:
-            return 4;
-        case 9:
-            return 1;
-        case 10:
-            return 8;
-        default:
-            break;
-    }
-
-    LogFlowFunc(("bad irq %d\n", irq));
-    return 2;
-}
-
-static int irq_of_magic(int magic)
-{
-    switch (magic)
-    {
-        case 1:
-            return 9;
-        case 2:
-            return 5;
-        case 4:
-            return 7;
-        case 8:
-            return 10;
-        default:
-            break;
-    }
-
-    LogFlowFunc(("bad irq magic %d\n", magic));
-    return -1;
-}
-
-#ifdef DEBUG
-static inline void log_dsp(PSB16STATE pThis)
-{
-    LogFlowFunc(("%s:%s:%d:%s:dmasize=%d:freq=%d:const=%d:speaker=%d\n",
-                 pThis->fmt_stereo ? "Stereo" : "Mono",
-                 pThis->fmt_signed ? "Signed" : "Unsigned",
-                 pThis->fmt_bits,
-                 pThis->dma_auto ? "Auto" : "Single",
-                 pThis->block_size,
-                 pThis->freq,
-                 pThis->time_const,
-                 pThis->speaker));
-}
-#endif
-
-static void sb16SpeakerControl(PSB16STATE pThis, int on)
-{
-    pThis->speaker = on;
-    /* AUD_enable (pThis->voice, on); */
-}
-
-static void sb16Control(PSB16STATE pThis, int hold)
-{
-    int dma = pThis->use_hdma ? pThis->hdma : pThis->dma;
-    pThis->dma_running = hold;
-
-    LogFlowFunc(("hold %d high %d dma %d\n", hold, pThis->use_hdma, dma));
-
-    PSB16DRIVER pDrv;
-    if (hold)
-    {
-        PDMDevHlpDMASetDREQ (pThis->pDevInsR3, dma, 1);
-        PDMDevHlpDMASchedule (pThis->pDevInsR3);
-        RTListForEach(&pThis->lstDrv, pDrv, SB16DRIVER, Node)
-            pDrv->pConnector->pfnEnableOut(pDrv->pConnector,
-                                           pDrv->Out.pStrmOut, true /* fEnable */);
-    }
-    else
-    {
-        PDMDevHlpDMASetDREQ (pThis->pDevInsR3, dma, 0);
-        RTListForEach(&pThis->lstDrv, pDrv, SB16DRIVER, Node)
-            pDrv->pConnector->pfnEnableOut(pDrv->pConnector,
-                                           pDrv->Out.pStrmOut, false /* fEnable */);
-    }
-}
-
-static DECLCALLBACK(void) sb16TimerIRQ(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvThis)
-{
-    PSB16STATE pThis = (PSB16STATE)pvThis;
-    pThis->can_write = 1;
-    PDMDevHlpISASetIrq(pThis->pDevInsR3, pThis->irq, 1);
-}
-
-#define DMA8_AUTO 1
-#define DMA8_HIGH 2
-
-static void continue_dma8(PSB16STATE pThis)
-{
-    if (pThis->freq > 0)
-    {
-        PDMAUDIOSTREAMCFG streamCfg;
-        streamCfg.uHz           = pThis->freq;
-        streamCfg.cChannels     = 1 << pThis->fmt_stereo;
-        streamCfg.enmFormat     = pThis->fmt;
-        streamCfg.enmEndianness = PDMAUDIOHOSTENDIANNESS;
-
-        int rc = sb16OpenOut(pThis, &streamCfg);
-        AssertRC(rc);
-    }
-
-    sb16Control(pThis, 1);
-}
-
-static void dma_cmd8(PSB16STATE pThis, int mask, int dma_len)
-{
-    pThis->fmt        = AUD_FMT_U8;
-    pThis->use_hdma   = 0;
-    pThis->fmt_bits   = 8;
-    pThis->fmt_signed = 0;
-    pThis->fmt_stereo = (pThis->mixer_regs[0x0e] & 2) != 0;
-
-    if (-1 == pThis->time_const)
-    {
-        if (pThis->freq <= 0)
-            pThis->freq = 11025;
-    }
-    else
-    {
-        int tmp = (256 - pThis->time_const);
-        pThis->freq = (1000000 + (tmp / 2)) / tmp;
-    }
-
-    if (dma_len != -1)
-    {
-        pThis->block_size = dma_len << pThis->fmt_stereo;
-    }
-    else
-    {
-        /* This is apparently the only way to make both Act1/PL
-           and SecondReality/FC work
-
-           r=andy Wow, actually someone who remembers Future Crew :-)
-
-           Act1 sets block size via command 0x48 and it's an odd number
-           SR does the same with even number
-           Both use stereo, and Creatives own documentation states that
-           0x48 sets block size in bytes less one.. go figure */
-        pThis->block_size &= ~pThis->fmt_stereo;
-    }
-
-    pThis->freq >>= pThis->fmt_stereo;
-    pThis->left_till_irq = pThis->block_size;
-    pThis->bytes_per_second = (pThis->freq << pThis->fmt_stereo);
-    /* pThis->highspeed = (mask & DMA8_HIGH) != 0; */
-    pThis->dma_auto = (mask & DMA8_AUTO) != 0;
-    pThis->align = (1 << pThis->fmt_stereo) - 1;
-
-    if (pThis->block_size & pThis->align)
-        LogFlowFunc(("warning: misaligned block size %d, alignment %d\n",
-                     pThis->block_size, pThis->align + 1));
-
-    LogFlowFunc(("freq %d, stereo %d, sign %d, bits %d, dma %d, auto %d, fifo %d, high %d\n",
-                 pThis->freq, pThis->fmt_stereo, pThis->fmt_signed, pThis->fmt_bits,
-                 pThis->block_size, pThis->dma_auto, pThis->fifo, pThis->highspeed));
-
-    continue_dma8(pThis);
-    sb16SpeakerControl(pThis, 1);
-}
-
-static void dma_cmd(PSB16STATE pThis, uint8_t cmd, uint8_t d0, int dma_len)
-{
-    pThis->use_hdma   = cmd < 0xc0;
-    pThis->fifo       = (cmd >> 1) & 1;
-    pThis->dma_auto   = (cmd >> 2) & 1;
-    pThis->fmt_signed = (d0 >> 4) & 1;
-    pThis->fmt_stereo = (d0 >> 5) & 1;
-
-    switch (cmd >> 4)
-    {
-        case 11:
-            pThis->fmt_bits = 16;
-            break;
-
-        case 12:
-            pThis->fmt_bits = 8;
-            break;
-    }
-
-    if (-1 != pThis->time_const)
-    {
-#if 1
-        int tmp = 256 - pThis->time_const;
-        pThis->freq = (1000000 + (tmp / 2)) / tmp;
-#else
-        /* pThis->freq = 1000000 / ((255 - pThis->time_const) << pThis->fmt_stereo); */
-        pThis->freq = 1000000 / ((255 - pThis->time_const));
-#endif
-        pThis->time_const = -1;
-    }
-
-    pThis->block_size = dma_len + 1;
-    pThis->block_size <<= ((pThis->fmt_bits == 16) ? 1 : 0);
-    if (!pThis->dma_auto)
-    {
-        /*
-         * It is clear that for DOOM and auto-init this value
-         * shouldn't take stereo into account, while Miles Sound Systems
-         * setsound.exe with single transfer mode wouldn't work without it
-         * wonders of SB16 yet again.
-         */
-        pThis->block_size <<= pThis->fmt_stereo;
-    }
-
-    LogFlowFunc(("freq %d, stereo %d, sign %d, bits %d, dma %d, auto %d, fifo %d, high %d\n",
-                 pThis->freq, pThis->fmt_stereo, pThis->fmt_signed, pThis->fmt_bits,
-                 pThis->block_size, pThis->dma_auto, pThis->fifo, pThis->highspeed));
-
-    if (16 == pThis->fmt_bits)
-        pThis->fmt = pThis->fmt_signed ? AUD_FMT_S16 : AUD_FMT_U16;
-    else
-        pThis->fmt = pThis->fmt_signed ? AUD_FMT_S8 : AUD_FMT_U8;
-
-    pThis->left_till_irq = pThis->block_size;
-
-    pThis->bytes_per_second = (pThis->freq << pThis->fmt_stereo) << ((pThis->fmt_bits == 16) ? 1 : 0);
-    pThis->highspeed = 0;
-    pThis->align = (1 << (pThis->fmt_stereo + (pThis->fmt_bits == 16))) - 1;
-    if (pThis->block_size & pThis->align)
-    {
-        LogFlowFunc(("warning: misaligned block size %d, alignment %d\n",
-                     pThis->block_size, pThis->align + 1));
-    }
-
-    if (pThis->freq)
-    {
-        PDMAUDIOSTREAMCFG streamCfg;
-        streamCfg.uHz           = pThis->freq;
-        streamCfg.cChannels     = 1 << pThis->fmt_stereo;
-        streamCfg.enmFormat     = pThis->fmt;
-        streamCfg.enmEndianness = PDMAUDIOHOSTENDIANNESS;
-
-        int rc = sb16OpenOut(pThis, &streamCfg);
-        AssertRC(rc);
-    }
-
-    sb16Control(pThis, 1);
-    sb16SpeakerControl(pThis, 1);
-}
-
-static inline void dsp_out_data (PSB16STATE pThis, uint8_t val)
-{
-    LogFlowFunc(("outdata %#x\n", val));
-    if ((size_t) pThis->out_data_len < sizeof (pThis->out_data)) {
-        pThis->out_data[pThis->out_data_len++] = val;
-    }
-}
-
-static inline uint8_t dsp_get_data (PSB16STATE pThis)
-{
-    if (pThis->in_index) {
-        return pThis->in2_data[--pThis->in_index];
-    }
-    else {
-        LogFlowFunc(("buffer underflow\n"));
-        return 0;
-    }
-}
-
-static void sb16HandleCommand(PSB16STATE pThis, uint8_t cmd)
-{
-    LogFlowFunc(("command %#x\n", cmd));
-
-    if (cmd > 0xaf && cmd < 0xd0)
-    {
-        if (cmd & 8) /** @todo Handle recording. */
-            LogFlowFunc(("ADC not yet supported (command %#x)\n", cmd));
-
-        switch (cmd >> 4)
-        {
-            case 11:
-            case 12:
-                break;
-            default:
-                LogFlowFunc(("%#x wrong bits\n", cmd));
-        }
-
-        pThis->needed_bytes = 3;
-    }
-    else
-    {
-        pThis->needed_bytes = 0;
-
-        switch (cmd)
-        {
-            case 0x03:
-                dsp_out_data(pThis, 0x10); /* pThis->csp_param); */
-                goto warn;
-
-            case 0x04:
-                pThis->needed_bytes = 1;
-                goto warn;
-
-            case 0x05:
-                pThis->needed_bytes = 2;
-                goto warn;
-
-            case 0x08:
-                /* __asm__ ("int3"); */
-                goto warn;
-
-            case 0x0e:
-                pThis->needed_bytes = 2;
-                goto warn;
-
-            case 0x09:
-                dsp_out_data(pThis, 0xf8);
-                goto warn;
-
-            case 0x0f:
-                pThis->needed_bytes = 1;
-                goto warn;
-
-            case 0x10:
-                pThis->needed_bytes = 1;
-                goto warn;
-
-            case 0x14:
-                pThis->needed_bytes = 2;
-                pThis->block_size = 0;
-                break;
-
-            case 0x1c:              /* Auto-Initialize DMA DAC, 8-bit */
-                dma_cmd8(pThis, DMA8_AUTO, -1);
-                break;
-
-            case 0x20:              /* Direct ADC, Juice/PL */
-                dsp_out_data(pThis, 0xff);
-                goto warn;
-
-            case 0x35:
-                LogFlowFunc(("0x35 - MIDI command not implemented\n"));
-                break;
-
-            case 0x40:
-                pThis->freq = -1;
-                pThis->time_const = -1;
-                pThis->needed_bytes = 1;
-                break;
-
-            case 0x41:
-                pThis->freq = -1;
-                pThis->time_const = -1;
-                pThis->needed_bytes = 2;
-                break;
-
-            case 0x42:
-                pThis->freq = -1;
-                pThis->time_const = -1;
-                pThis->needed_bytes = 2;
-                goto warn;
-
-            case 0x45:
-                dsp_out_data(pThis, 0xaa);
-                goto warn;
-
-            case 0x47:                /* Continue Auto-Initialize DMA 16bit */
-                break;
-
-            case 0x48:
-                pThis->needed_bytes = 2;
-                break;
-
-            case 0x74:
-                pThis->needed_bytes = 2; /* DMA DAC, 4-bit ADPCM */
-                LogFlowFunc(("0x75 - DMA DAC, 4-bit ADPCM not implemented\n"));
-                break;
-
-            case 0x75:              /* DMA DAC, 4-bit ADPCM Reference */
-                pThis->needed_bytes = 2;
-                LogFlowFunc(("0x74 - DMA DAC, 4-bit ADPCM Reference not implemented\n"));
-                break;
-
-            case 0x76:              /* DMA DAC, 2.6-bit ADPCM */
-                pThis->needed_bytes = 2;
-                LogFlowFunc(("0x74 - DMA DAC, 2.6-bit ADPCM not implemented\n"));
-                break;
-
-            case 0x77:              /* DMA DAC, 2.6-bit ADPCM Reference */
-                pThis->needed_bytes = 2;
-                LogFlowFunc(("0x74 - DMA DAC, 2.6-bit ADPCM Reference not implemented\n"));
-                break;
-
-            case 0x7d:
-                LogFlowFunc(("0x7d - Autio-Initialize DMA DAC, 4-bit ADPCM Reference\n"));
-                LogFlowFunc(("not implemented\n"));
-                break;
-
-            case 0x7f:
-                LogFlowFunc(("0x7d - Autio-Initialize DMA DAC, 2.6-bit ADPCM Reference\n"));
-                LogFlowFunc(("not implemented\n"));
-                break;
-
-            case 0x80:
-                pThis->needed_bytes = 2;
-                break;
-
-            case 0x90:
-            case 0x91:
-                dma_cmd8(pThis, (((cmd & 1) == 0) ? 1 : 0) | DMA8_HIGH, -1);
-                break;
-
-            case 0xd0:              /* halt DMA operation. 8bit */
-                sb16Control(pThis, 0);
-                break;
-
-            case 0xd1:              /* speaker on */
-                sb16SpeakerControl(pThis, 1);
-                break;
-
-            case 0xd3:              /* speaker off */
-                sb16SpeakerControl(pThis, 0);
-                break;
-
-            case 0xd4:              /* continue DMA operation. 8bit */
-                /* KQ6 (or maybe Sierras audblst.drv in general) resets
-                   the frequency between halt/continue */
-                continue_dma8(pThis);
-                break;
-
-            case 0xd5:              /* halt DMA operation. 16bit */
-                sb16Control(pThis, 0);
-                break;
-
-            case 0xd6:              /* continue DMA operation. 16bit */
-                sb16Control(pThis, 1);
-                break;
-
-            case 0xd9:              /* exit auto-init DMA after this block. 16bit */
-                pThis->dma_auto = 0;
-                break;
-
-            case 0xda:              /* exit auto-init DMA after this block. 8bit */
-                pThis->dma_auto = 0;
-                break;
-
-            case 0xe0:              /* DSP identification */
-                pThis->needed_bytes = 1;
-                break;
-
-            case 0xe1:
-                dsp_out_data(pThis, pThis->ver & 0xff);
-                dsp_out_data(pThis, pThis->ver >> 8);
-                break;
-
-            case 0xe2:
-                pThis->needed_bytes = 1;
-                goto warn;
-
-            case 0xe3:
-            {
-                for (int i = sizeof (e3) - 1; i >= 0; --i)
-                    dsp_out_data(pThis, e3[i]);
-
-                break;
-            }
-
-            case 0xe4:              /* write test reg */
-                pThis->needed_bytes = 1;
-                break;
-
-            case 0xe7:
-                LogFlowFunc(("Attempt to probe for ESS (0xe7)?\n"));
-                break;
-
-            case 0xe8:              /* read test reg */
-                dsp_out_data(pThis, pThis->test_reg);
-                break;
-
-            case 0xf2:
-            case 0xf3:
-                dsp_out_data(pThis, 0xaa);
-                pThis->mixer_regs[0x82] |= (cmd == 0xf2) ? 1 : 2;
-                PDMDevHlpISASetIrq(pThis->pDevInsR3, pThis->irq, 1);
-                break;
-
-            case 0xf8:
-                /* Undocumented, used by old Creative diagnostic programs. */
-                dsp_out_data (pThis, 0);
-                goto warn;
-
-            case 0xf9:
-                pThis->needed_bytes = 1;
-                goto warn;
-
-            case 0xfa:
-                dsp_out_data (pThis, 0);
-                goto warn;
-
-            case 0xfc:              /* FIXME */
-                dsp_out_data (pThis, 0);
-                goto warn;
-
-            default:
-                LogFlowFunc(("Unrecognized command %#x\n", cmd));
-                break;
-        }
-    }
-
-    if (!pThis->needed_bytes)
-        LogFlow(("\n"));
-
-exit:
-
-     if (!pThis->needed_bytes)
-        pThis->cmd = -1;
-     else
-        pThis->cmd = cmd;
-
-    return;
-
-warn:
-    LogFlowFunc(("warning: command %#x,%d is not truly understood yet\n",
-                 cmd, pThis->needed_bytes));
-    goto exit;
-}
-
-static uint16_t dsp_get_lohi (PSB16STATE pThis)
-{
-    uint8_t hi = dsp_get_data (pThis);
-    uint8_t lo = dsp_get_data (pThis);
-    return (hi << 8) | lo;
-}
-
-static uint16_t dsp_get_hilo (PSB16STATE pThis)
-{
-    uint8_t lo = dsp_get_data (pThis);
-    uint8_t hi = dsp_get_data (pThis);
-    return (hi << 8) | lo;
-}
-
-static void complete(PSB16STATE pThis)
-{
-    int d0, d1, d2;
-    LogFlowFunc(("complete command %#x, in_index %d, needed_bytes %d\n",
-            pThis->cmd, pThis->in_index, pThis->needed_bytes));
-
-    if (pThis->cmd > 0xaf && pThis->cmd < 0xd0)
-    {
-        d2 = dsp_get_data (pThis);
-        d1 = dsp_get_data (pThis);
-        d0 = dsp_get_data (pThis);
-
-        if (pThis->cmd & 8)
-            LogFlowFunc(("ADC params cmd = %#x d0 = %d, d1 = %d, d2 = %d\n", pThis->cmd, d0, d1, d2));
-        else
-        {
-            LogFlowFunc(("cmd = %#x d0 = %d, d1 = %d, d2 = %d\n", pThis->cmd, d0, d1, d2));
-            dma_cmd(pThis, pThis->cmd, d0, d1 + (d2 << 8));
-        }
-    }
-    else
-    {
-        switch (pThis->cmd)
-        {
-        case 0x04:
-            pThis->csp_mode = dsp_get_data (pThis);
-            pThis->csp_reg83r = 0;
-            pThis->csp_reg83w = 0;
-            LogFlowFunc(("CSP command 0x04: mode=%#x\n", pThis->csp_mode));
-            break;
-
-        case 0x05:
-            pThis->csp_param = dsp_get_data (pThis);
-            pThis->csp_value = dsp_get_data (pThis);
-            LogFlowFunc(("CSP command 0x05: param=%#x value=%#x\n",
-                    pThis->csp_param,
-                    pThis->csp_value));
-            break;
-
-        case 0x0e:
-        {
-            d0 = dsp_get_data(pThis);
-            d1 = dsp_get_data(pThis);
-            LogFlowFunc(("write CSP register %d <- %#x\n", d1, d0));
-            if (d1 == 0x83)
-            {
-                LogFlowFunc(("0x83[%d] <- %#x\n", pThis->csp_reg83r, d0));
-                pThis->csp_reg83[pThis->csp_reg83r % 4] = d0;
-                pThis->csp_reg83r += 1;
-            }
-            else
-                pThis->csp_regs[d1] = d0;
-            break;
-        }
-
-        case 0x0f:
-            d0 = dsp_get_data(pThis);
-            LogFlowFunc(("read CSP register %#x -> %#x, mode=%#x\n", d0, pThis->csp_regs[d0], pThis->csp_mode));
-            if (d0 == 0x83)
-            {
-                LogFlowFunc(("0x83[%d] -> %#x\n",
-                        pThis->csp_reg83w,
-                        pThis->csp_reg83[pThis->csp_reg83w % 4]));
-                dsp_out_data (pThis, pThis->csp_reg83[pThis->csp_reg83w % 4]);
-                pThis->csp_reg83w += 1;
-            }
-            else
-                dsp_out_data(pThis, pThis->csp_regs[d0]);
-            break;
-
-        case 0x10:
-            d0 = dsp_get_data(pThis);
-            LogFlowFunc(("cmd 0x10 d0=%#x\n", d0));
-            break;
-
-        case 0x14:
-            dma_cmd8(pThis, 0, dsp_get_lohi (pThis) + 1);
-            break;
-
-        case 0x40:
-            pThis->time_const = dsp_get_data(pThis);
-            LogFlowFunc(("set time const %d\n", pThis->time_const));
-            break;
-
-        case 0x42:              /* FT2 sets output freq with this, go figure */
-#if 0
-            LogFlowFunc(("cmd 0x42 might not do what it think it should\n"));
-#endif
-        case 0x41:
-            pThis->freq = dsp_get_hilo(pThis);
-            LogFlowFunc(("set freq %d\n", pThis->freq));
-            break;
-
-        case 0x48:
-            pThis->block_size = dsp_get_lohi(pThis) + 1;
-            LogFlowFunc(("set dma block len %d\n", pThis->block_size));
-            break;
-
-        case 0x74:
-        case 0x75:
-        case 0x76:
-        case 0x77:
-            /* ADPCM stuff, ignore */
-            break;
-
-        case 0x80:
-        {
-            int freq, samples, bytes;
-            uint64_t ticks;
-
-            freq = pThis->freq > 0 ? pThis->freq : 11025;
-            samples = dsp_get_lohi (pThis) + 1;
-            bytes = samples << pThis->fmt_stereo << ((pThis->fmt_bits == 16) ? 1 : 0);
-            ticks = (bytes * TMTimerGetFreq(pThis->pTimerIRQ)) / freq;
-            if (ticks < TMTimerGetFreq(pThis->pTimerIRQ) / 1024)
-                PDMDevHlpISASetIrq(pThis->pDevInsR3, pThis->irq, 1);
-            else
-                TMTimerSet(pThis->pTimerIRQ, TMTimerGet(pThis->pTimerIRQ) + ticks);
-            LogFlowFunc(("mix silence: %d samples, %d bytes, %RU64 ticks\n", samples, bytes, ticks));
-            break;
-        }
-
-        case 0xe0:
-            d0 = dsp_get_data(pThis);
-            pThis->out_data_len = 0;
-            LogFlowFunc(("E0 data = %#x\n", d0));
-            dsp_out_data(pThis, ~d0);
-            break;
-
-        case 0xe2:
-            d0 = dsp_get_data(pThis);
-            LogFlow(("SB16:E2 = %#x\n", d0));
-            break;
-
-        case 0xe4:
-            pThis->test_reg = dsp_get_data(pThis);
-            break;
-
-        case 0xf9:
-            d0 = dsp_get_data(pThis);
-            LogFlowFunc(("command 0xf9 with %#x\n", d0));
-            switch (d0) {
-            case 0x0e:
-                dsp_out_data(pThis, 0xff);
-                break;
-
-            case 0x0f:
-                dsp_out_data(pThis, 0x07);
-                break;
-
-            case 0x37:
-                dsp_out_data(pThis, 0x38);
-                break;
-
-            default:
-                dsp_out_data(pThis, 0x00);
-                break;
-            }
-            break;
-
-        default:
-            LogFlowFunc(("complete: unrecognized command %#x\n", pThis->cmd));
-            return;
-        }
-    }
-
-    LogFlow(("\n"));
-    pThis->cmd = -1;
-    return;
-}
-
-static uint8_t sb16MixRegToVol(PSB16STATE pThis, int reg)
-{
-    /* The SB16 mixer has a 0 to -62dB range in 32 levels (2dB each step).
-     * We use a 0 to -96dB range in 256 levels (0.375dB each step).
-     * Only the top 5 bits of a mixer register are used.
-     */
-    uint8_t steps = 31 - (pThis->mixer_regs[reg] >> 3);
-    uint8_t vol   = 255 - steps * 16 / 3;   /* (2dB*8) / (0.375dB*8) */
-    return vol;
-}
-
-static void sb16SetMasterVolume(PSB16STATE pThis)
-{
-    /* There's no mute switch, only volume controls. */
-    uint8_t lvol = sb16MixRegToVol(pThis, 0x30);
-    uint8_t rvol = sb16MixRegToVol(pThis, 0x31);
-    PDMAUDIOVOLUME vol = { false, lvol, rvol };
-    AudioMixerSetMasterVolume(pThis->pMixer, &vol);
-}
-
-static void sb16SetPcmOutVolume(PSB16STATE pThis)
-{
-    /* There's no mute switch, only volume controls. */
-    uint8_t lvol = sb16MixRegToVol(pThis, 0x32);
-    uint8_t rvol = sb16MixRegToVol(pThis, 0x33);
-    PDMAUDIOVOLUME vol = { false, lvol, rvol };
-    AudioMixerSetSinkVolume(pThis->pSinkOutput, &vol);
-}
-
-static void sb16ResetLegacy(PSB16STATE pThis)
-{
-    pThis->freq       = 11025;
-    pThis->fmt_signed = 0;
-    pThis->fmt_bits   = 8;
-    pThis->fmt_stereo = 0;
-
-    PDMAUDIOSTREAMCFG streamCfg;
-    streamCfg.uHz           = pThis->freq;
-    streamCfg.cChannels     = 1; /* Mono */
-    streamCfg.enmFormat     = AUD_FMT_U8;
-    streamCfg.enmEndianness = PDMAUDIOHOSTENDIANNESS;
-
-    int rc2 = sb16OpenOut(pThis, &streamCfg);
-    AssertRC(rc2);
-}
-
-static void sb16Reset(PSB16STATE pThis)
-{
-    PDMDevHlpISASetIrq(pThis->pDevInsR3, pThis->irq, 0);
-    if (pThis->dma_auto)
-    {
-        PDMDevHlpISASetIrq(pThis->pDevInsR3, pThis->irq, 1);
-        PDMDevHlpISASetIrq(pThis->pDevInsR3, pThis->irq, 0);
-    }
-
-    pThis->mixer_regs[0x82] = 0;
-    pThis->dma_auto = 0;
-    pThis->in_index = 0;
-    pThis->out_data_len = 0;
-    pThis->left_till_irq = 0;
-    pThis->needed_bytes = 0;
-    pThis->block_size = -1;
-    pThis->nzero = 0;
-    pThis->highspeed = 0;
-    pThis->v2x6 = 0;
-    pThis->cmd = -1;
-
-    dsp_out_data(pThis, 0xaa);
-    sb16SpeakerControl(pThis, 0);
-    sb16Control(pThis, 0);
-    sb16ResetLegacy(pThis);
-}
-
-static IO_WRITE_PROTO(dsp_write)
-{
-    PSB16STATE pThis = (PSB16STATE)opaque;
-    int iport = nport - pThis->port;
-
-    LogFlowFunc(("write %#x <- %#x\n", nport, val));
-    switch (iport)
-    {
-        case 0x06:
-            switch (val)
-            {
-                case 0x00:
-                {
-                    if (pThis->v2x6 == 1)
-                    {
-                        if (0 && pThis->highspeed)
-                        {
-                            pThis->highspeed = 0;
-                            PDMDevHlpISASetIrq(pThis->pDevInsR3, pThis->irq, 0);
-                            sb16Control(pThis, 0);
-                        }
-                        else
-                            sb16Reset(pThis);
-                    }
-                    pThis->v2x6 = 0;
-                    break;
-                }
-
-                case 0x01:
-                case 0x03:              /* FreeBSD kludge */
-                    pThis->v2x6 = 1;
-                    break;
-
-                case 0xc6:
-                    pThis->v2x6 = 0;    /* Prince of Persia, csp.sys, diagnose.exe */
-                    break;
-
-                case 0xb8:              /* Panic */
-                    sb16Reset(pThis);
-                    break;
-
-                case 0x39:
-                    dsp_out_data(pThis, 0x38);
-                    sb16Reset(pThis);
-                    pThis->v2x6 = 0x39;
-                    break;
-
-                default:
-                    pThis->v2x6 = val;
-                    break;
-            }
-            break;
-
-        case 0x0c:                      /* Write data or command | write status */
-#if 0
-            if (pThis->highspeed)
-                break;
-#endif
-            if (0 == pThis->needed_bytes)
-            {
-                sb16HandleCommand(pThis, val);
-#if 0
-                if (0 == pThis->needed_bytes) {
-                    log_dsp (pThis);
-                }
-#endif
-            }
-            else
-            {
-                if (pThis->in_index == sizeof (pThis->in2_data))
-                {
-                    LogFlowFunc(("in data overrun\n"));
-                }
-                else
-                {
-                    pThis->in2_data[pThis->in_index++] = val;
-                    if (pThis->in_index == pThis->needed_bytes)
-                    {
-                        pThis->needed_bytes = 0;
-                        complete (pThis);
-#if 0
-                        log_dsp (pThis);
-#endif
-                    }
-                }
-            }
-            break;
-
-        default:
-            LogFlowFunc(("nport=%#x, val=%#x)\n", nport, val));
-            break;
-    }
-
-    return VINF_SUCCESS;
-}
-
-static IO_READ_PROTO(dsp_read)
-{
-    PSB16STATE pThis = (PSB16STATE)opaque;
-    int iport, retval, ack = 0;
-
-    iport = nport - pThis->port;
-
-    /** @todo reject non-byte access?
-     *  The spec does not mention a non-byte access so we should check how real hardware behaves. */
-
-    switch (iport)
-    {
-        case 0x06:                  /* reset */
-            retval = 0xff;
-            break;
-
-        case 0x0a:                  /* read data */
-            if (pThis->out_data_len)
-            {
-                retval = pThis->out_data[--pThis->out_data_len];
-                pThis->last_read_byte = retval;
-            }
-            else
-            {
-                if (pThis->cmd != -1)
-                    LogFlowFunc(("empty output buffer for command %#x\n", pThis->cmd));
-                retval = pThis->last_read_byte;
-                /* goto error; */
-            }
-            break;
-
-        case 0x0c:                  /* 0 can write */
-            retval = pThis->can_write ? 0 : 0x80;
-            break;
-
-        case 0x0d:                  /* timer interrupt clear */
-            /* LogFlowFunc(("timer interrupt clear\n")); */
-            retval = 0;
-            break;
-
-        case 0x0e:                  /* data available status | irq 8 ack */
-            retval = (!pThis->out_data_len || pThis->highspeed) ? 0 : 0x80;
-            if (pThis->mixer_regs[0x82] & 1)
-            {
-                ack = 1;
-                pThis->mixer_regs[0x82] &= ~1;
-                PDMDevHlpISASetIrq(pThis->pDevInsR3, pThis->irq, 0);
-            }
-            break;
-
-        case 0x0f:                  /* irq 16 ack */
-            retval = 0xff;
-            if (pThis->mixer_regs[0x82] & 2)
-            {
-                ack = 1;
-                pThis->mixer_regs[0x82] &= ~2;
-               PDMDevHlpISASetIrq(pThis->pDevInsR3, pThis->irq, 0);
-            }
-            break;
-
-        default:
-            goto error;
-    }
-
-    if (!ack)
-        LogFlowFunc(("read %#x -> %#x\n", nport, retval));
-
-    *pu32 = retval;
-    return VINF_SUCCESS;
-
- error:
-    LogFlowFunc(("warning: dsp_read %#x error\n", nport));
-    return VERR_IOM_IOPORT_UNUSED;
-}
-
-static void sb16MixerReset(PSB16STATE pThis)
-{
-    PSB16DRIVER pDrv;
-
-    RTListForEach(&pThis->lstDrv, pDrv, SB16DRIVER, Node)
-        pDrv->Out.phStrmOut = NULL;
-
-    pThis->pSinkOutput = NULL;
-
-    if (pThis->pMixer)
-    {
-        AudioMixerDestroy(pThis->pMixer);
-        pThis->pMixer = NULL;
-    }
-
-    memset(pThis->mixer_regs, 0xff, 0x7f);
-    memset(pThis->mixer_regs + 0x83, 0xff, sizeof (pThis->mixer_regs) - 0x83);
-
-    pThis->mixer_regs[0x02] = 4;    /* master volume 3bits */
-    pThis->mixer_regs[0x06] = 4;    /* MIDI volume 3bits */
-    pThis->mixer_regs[0x08] = 0;    /* CD volume 3bits */
-    pThis->mixer_regs[0x0a] = 0;    /* voice volume 2bits */
-
-    /* d5=input filt, d3=lowpass filt, d1,d2=input source */
-    pThis->mixer_regs[0x0c] = 0;
-
-    /* d5=output filt, d1=stereo switch */
-    pThis->mixer_regs[0x0e] = 0;
-
-    /* voice volume L d5,d7, R d1,d3 */
-    pThis->mixer_regs[0x04] = (12 << 4) | 12;
-    /* master ... */
-    pThis->mixer_regs[0x22] = (12 << 4) | 12;
-    /* MIDI ... */
-    pThis->mixer_regs[0x26] = (12 << 4) | 12;
-
-    /* master/voice/MIDI L/R volume */
-    for (int i = 0x30; i < 0x36; i++)
-        pThis->mixer_regs[i] = 24 << 3; /* -14 dB */
-
-    /* treble/bass */
-    for (int i = 0x44; i < 0x48; i++)
-        pThis->mixer_regs[i] = 0x80;
-
-    int rc2 = AudioMixerCreate("SB16 Mixer", 0 /* uFlags */, &pThis->pMixer);
-    if (RT_SUCCESS(rc2))
-    {
-        /* Set a default audio format for our mixer. */
-        PDMAUDIOSTREAMCFG streamCfg;
-        streamCfg.uHz           = 44100;
-        streamCfg.cChannels     = 2;
-        streamCfg.enmFormat     = AUD_FMT_S16;
-        streamCfg.enmEndianness = PDMAUDIOHOSTENDIANNESS;
-
-        rc2 = AudioMixerSetDeviceFormat(pThis->pMixer, &streamCfg);
-        AssertRC(rc2);
-
-        /* Add all required audio sinks. */
-        rc2 = AudioMixerAddSink(pThis->pMixer, "[Playback] PCM Output",
-                                AUDMIXSINKDIR_OUTPUT, &pThis->pSinkOutput);
-        AssertRC(rc2);
-    }
-
-    /* Update the master (mixer) and PCM out volumes. */
-    sb16SetMasterVolume(pThis);
-    sb16SetPcmOutVolume(pThis);
-}
-
-static IO_WRITE_PROTO(mixer_write_indexb)
-{
-    PSB16STATE pThis = (PSB16STATE)opaque;
-    (void) nport;
-    pThis->mixer_nreg = val;
-
-    return VINF_SUCCESS;
-}
-
-uint32_t popcount(uint32_t u) /** @todo r=andy WTF? */
-{
-    u = ((u&0x55555555) + ((u>>1)&0x55555555));
-    u = ((u&0x33333333) + ((u>>2)&0x33333333));
-    u = ((u&0x0f0f0f0f) + ((u>>4)&0x0f0f0f0f));
-    u = ((u&0x00ff00ff) + ((u>>8)&0x00ff00ff));
-    u = ( u&0x0000ffff) + (u>>16);
-    return u;
-}
-
-uint32_t lsbindex(uint32_t u)
-{
-    return popcount((u & -(int32_t)u) - 1);
-}
-
-/* Convert SB16 to SB Pro mixer volume (left). */
-static inline void sb16ConvVolumeL(PSB16STATE pThis, unsigned reg, uint8_t val)
-{
-    /* High nibble in SBP mixer. */
-    pThis->mixer_regs[reg] = (pThis->mixer_regs[reg] & 0x0f) | (val & 0xf0);
-}
-
-/* Convert SB16 to SB Pro mixer volume (right). */
-static inline void sb16ConvVolumeR(PSB16STATE pThis, unsigned reg, uint8_t val)
-{
-    /* Low nibble in SBP mixer. */
-    pThis->mixer_regs[reg] = (pThis->mixer_regs[reg] & 0xf0) | (val >> 4);
-}
-
-/* Convert SB Pro to SB16 mixer volume (left + right). */
-static inline void sb16ConvVolumeOldToNew(PSB16STATE pThis, unsigned reg, uint8_t val)
-{
-    /* Left channel. */
-    pThis->mixer_regs[reg + 0] = (val & 0xf0) | RT_BIT(3);
-    /* Right channel (the register immediately following). */
-    pThis->mixer_regs[reg + 1] = (val << 4)   | RT_BIT(3);
-}
-
-static IO_WRITE_PROTO(mixer_write_datab)
-{
-    PSB16STATE  pThis = (PSB16STATE)opaque;
-    bool        fUpdateMaster = false;
-    bool        fUpdateStream = false;
-
-    (void) nport;
-    LogFlowFunc(("mixer_write [%#x] <- %#x\n", pThis->mixer_nreg, val));
-
-    switch (pThis->mixer_nreg)
-    {
-        case 0x00:
-            sb16MixerReset(pThis);
-            /* And update the actual volume, too. */
-            fUpdateMaster = true;
-            fUpdateStream = true;
-            break;
-
-        case 0x04:  /* Translate from old style voice volume (L/R). */
-            sb16ConvVolumeOldToNew(pThis, 0x32, val);
-            fUpdateStream = true;
-            break;
-
-        case 0x22:  /* Translate from old style master volume (L/R). */
-            sb16ConvVolumeOldToNew(pThis, 0x30, val);
-            fUpdateMaster = true;
-            break;
-
-        case 0x26:  /* Translate from old style MIDI volume (L/R). */
-            sb16ConvVolumeOldToNew(pThis, 0x34, val);
-            break;
-
-        case 0x28:  /* Translate from old style CD volume (L/R). */
-            sb16ConvVolumeOldToNew(pThis, 0x36, val);
-            break;
-
-        case 0x2E:  /* Translate from old style line volume (L/R). */
-            sb16ConvVolumeOldToNew(pThis, 0x38, val);
-            break;
-
-        case 0x30:  /* Translate to old style master volume (L). */
-            sb16ConvVolumeL(pThis, 0x22, val);
-            fUpdateMaster = true;
-            break;
-
-        case 0x31:  /* Translate to old style master volume (R). */
-            sb16ConvVolumeR(pThis, 0x22, val);
-            fUpdateMaster = true;
-            break;
-
-        case 0x32:  /* Translate to old style voice volume (L). */
-            sb16ConvVolumeL(pThis, 0x04, val);
-            fUpdateStream = true;
-            break;
-
-        case 0x33:  /* Translate to old style voice volume (R). */
-            sb16ConvVolumeR(pThis, 0x04, val);
-            fUpdateStream = true;
-            break;
-
-        case 0x34:  /* Translate to old style MIDI volume (L). */
-            sb16ConvVolumeL(pThis, 0x26, val);
-            break;
-
-        case 0x35:  /* Translate to old style MIDI volume (R). */
-            sb16ConvVolumeR(pThis, 0x26, val);
-            break;
-
-        case 0x36:  /* Translate to old style CD volume (L). */
-            sb16ConvVolumeL(pThis, 0x28, val);
-            break;
-
-        case 0x37:  /* Translate to old style CD volume (R). */
-            sb16ConvVolumeR(pThis, 0x28, val);
-            break;
-
-        case 0x38:  /* Translate to old style line volume (L). */
-            sb16ConvVolumeL(pThis, 0x2E, val);
-            break;
-
-        case 0x39:  /* Translate to old style line volume (R). */
-            sb16ConvVolumeR(pThis, 0x2E, val);
-            break;
-
-        case 0x80:
-        {
-            int irq = irq_of_magic(val);
-            LogFlowFunc(("setting irq to %d (val=%#x)\n", irq, val));
-            if (irq > 0)
-                pThis->irq = irq;
-            break;
-        }
-
-        case 0x81:
-        {
-            int dma, hdma;
-
-            dma = lsbindex (val & 0xf);
-            hdma = lsbindex (val & 0xf0);
-            if (dma != pThis->dma || hdma != pThis->hdma)
-                LogFlow(("SB16: attempt to change DMA 8bit %d(%d), 16bit %d(%d) (val=%#x)\n",
-                         dma, pThis->dma, hdma, pThis->hdma, val));
-#if 0
-            pThis->dma = dma;
-            pThis->hdma = hdma;
-#endif
-            break;
-        }
-
-        case 0x82:
-            LogFlowFunc(("attempt to write into IRQ status register (val=%#x)\n", val));
-            return VINF_SUCCESS;
-
-        default:
-            if (pThis->mixer_nreg >= 0x80)
-                LogFlowFunc(("attempt to write mixer[%#x] <- %#x\n", pThis->mixer_nreg, val));
-            break;
-    }
-
-    pThis->mixer_regs[pThis->mixer_nreg] = val;
-
-    /* Update the master (mixer) volume. */
-    if (fUpdateMaster)
-        sb16SetMasterVolume(pThis);
-
-    /* Update the stream (PCM) volume. */
-    if (fUpdateStream)
-        sb16SetPcmOutVolume(pThis);
-
-    return VINF_SUCCESS;
-}
-
-static IO_WRITE_PROTO(mixer_write)
-{
-    PSB16STATE pThis = (PSB16STATE)opaque;
-    int iport = nport - pThis->port;
-    switch (cb)
-    {
-        case 1:
-            switch (iport)
-            {
-                case 4:
-                    mixer_write_indexb (pDevIns, opaque, nport, val, 1);
-                    break;
-                case 5:
-                    mixer_write_datab (pDevIns, opaque, nport, val, 1);
-                    break;
-            }
-            break;
-        case 2:
-            mixer_write_indexb (pDevIns, opaque, nport, val & 0xff, 1);
-            mixer_write_datab (pDevIns, opaque, nport, (val >> 8) & 0xff, 1);
-            break;
-        default:
-            AssertMsgFailed(("Port=%#x cb=%d u32=%#x\n", nport, cb, val));
-            break;
-    }
-    return VINF_SUCCESS;
-}
-
-static IO_READ_PROTO(mixer_read)
-{
-    PSB16STATE pThis = (PSB16STATE)opaque;
-
-    (void) nport;
-#ifndef DEBUG_SB16_MOST
-    if (pThis->mixer_nreg != 0x82) {
-        LogFlowFunc(("mixer_read[%#x] -> %#x\n",
-                pThis->mixer_nreg, pThis->mixer_regs[pThis->mixer_nreg]));
-    }
-#else
-    LogFlowFunc(("mixer_read[%#x] -> %#x\n",
-            pThis->mixer_nreg, pThis->mixer_regs[pThis->mixer_nreg]));
-#endif
-    *pu32 = pThis->mixer_regs[pThis->mixer_nreg];
-    return VINF_SUCCESS;
-}
-
-static int sb16WriteAudio(PSB16STATE pThis, int nchan, uint32_t dma_pos,
-                          uint32_t dma_len, int len)
-{
-    uint8_t  tmpbuf[_4K]; /** @todo Have a buffer on the heap. */
-    uint32_t cbToWrite = len;
-    uint32_t cbWrittenTotal = 0;
-
-    while (cbToWrite)
-    {
-        uint32_t cbToRead;
-        uint32_t cbRead;
-
-        cbToRead = RT_MIN(dma_len - dma_pos, cbToWrite);
-        if (cbToRead > sizeof(tmpbuf))
-            cbToRead = sizeof(tmpbuf);
-
-        int rc = PDMDevHlpDMAReadMemory(pThis->pDevInsR3, nchan, tmpbuf, dma_pos, cbToRead, &cbRead);
-        AssertMsgRC(rc, ("DMAReadMemory -> %Rrc\n", rc));
-
-        uint32_t cbWritten;
-
-        /* Just multiplex the output to the connected backends.
-         * No need to utilize the virtual mixer here (yet). */
-        PSB16DRIVER pDrv;
-        RTListForEach(&pThis->lstDrv, pDrv, SB16DRIVER, Node)
-        {
-            int rc2 = pDrv->pConnector->pfnWrite(pDrv->pConnector, pDrv->Out.pStrmOut,
-                                                 tmpbuf, cbToRead, &cbWritten);
-            LogFlowFunc(("\tLUN#%RU8: rc=%Rrc, cbWritten=%RU32\n", pDrv->uLUN, rc2, cbWritten));
-        }
-
-        Assert(cbToWrite >= cbToRead);
-        cbToWrite      -= cbToRead;
-        dma_pos         = (dma_pos + cbToRead) % dma_len;
-        cbWrittenTotal += cbToRead;
-
-        if (!cbRead)
-            break;
-    }
-
-    return cbWrittenTotal;
-}
-
-static DECLCALLBACK(uint32_t) sb16DMARead(PPDMDEVINS pDevIns, void *opaque, unsigned nchan, uint32_t dma_pos, uint32_t dma_len)
-{
-    PSB16STATE pThis = (PSB16STATE)opaque;
-    int till, copy, written, free;
-
-    if (pThis->block_size <= 0)
-    {
-        LogFlowFunc(("invalid block size=%d nchan=%d dma_pos=%d dma_len=%d\n",
-                     pThis->block_size, nchan, dma_pos, dma_len));
-        return dma_pos;
-    }
-
-    if (pThis->left_till_irq < 0)
-        pThis->left_till_irq = pThis->block_size;
-
-    PSB16DRIVER pDrv;
-
-    uint32_t cbOutMin = UINT32_MAX;
-    uint32_t cbOut;
-    RTListForEach(&pThis->lstDrv, pDrv, SB16DRIVER, Node)
-    {
-        int rc2 = pDrv->pConnector->pfnQueryStatus(pDrv->pConnector,
-                                                   NULL /* pcbIn */, &cbOut, NULL /* pcSamplesLive */);
-        if (RT_SUCCESS(rc2))
-            cbOutMin = RT_MIN(cbOutMin, cbOut);
-    }
-
-    LogFlowFunc(("cbOutMin=%RU32\n", cbOutMin));
-    if (cbOutMin == UINT32_MAX)
-    {
-        free = dma_len;
-    }
-    else
-    {
-        free = cbOutMin & ~pThis->align; /** @todo int vs. uint32. */
-        if ((free <= 0) || !dma_len)
-            return dma_pos;
-    }
-
-    copy = free;
-    till = pThis->left_till_irq;
-
-#ifdef DEBUG_SB16_MOST
-    LogFlowFunc(("pos:%06d %d till:%d len:%d\n", dma_pos, free, till, dma_len));
-#endif
-
-    if (copy >= till)
-    {
-        if (0 == pThis->dma_auto)
-        {
-            copy = till;
-        }
-        else
-        {
-            if (copy >= till + pThis->block_size)
-                copy = till; /* Make sure we won't skip IRQs. */
-        }
-    }
-
-    written = sb16WriteAudio(pThis, nchan, dma_pos, dma_len, copy);
-    dma_pos = (dma_pos + written) % dma_len;
-    pThis->left_till_irq -= written;
-
-    if (pThis->left_till_irq <= 0)
-    {
-        pThis->mixer_regs[0x82] |= (nchan & 4) ? 2 : 1;
-        PDMDevHlpISASetIrq(pThis->pDevInsR3, pThis->irq, 1);
-        if (0 == pThis->dma_auto)
-        {
-            sb16Control(pThis, 0);
-            sb16SpeakerControl(pThis, 0);
-        }
-    }
-
-#ifdef DEBUG_SB16_MOST
-    LogFlowFunc(("pos %5d free %5d size %5d till % 5d copy %5d written %5d size %5d\n",
-                 dma_pos, free, dma_len, pThis->left_till_irq, copy, written,
-                 pThis->block_size));
-#endif
-
-    while (pThis->left_till_irq <= 0)
-        pThis->left_till_irq += pThis->block_size;
-
-    return dma_pos;
-}
-
-static DECLCALLBACK(void) sb16TimerIO(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
-{
-    PSB16STATE pThis = (PSB16STATE)pvUser;
-    Assert(pThis == PDMINS_2_DATA(pDevIns, PSB16STATE));
-    AssertPtr(pThis);
-
-    uint32_t cbInMax  = 0;
-    uint32_t cbOutMin = UINT32_MAX;
-
-    PSB16DRIVER pDrv;
-
-    uint64_t cTicksNow     = TMTimerGet(pTimer);
-    uint64_t cTicksElapsed = cTicksNow  - pThis->uTimerTSIO;
-    uint64_t cTicksPerSec  = TMTimerGetFreq(pTimer);
-
-    pThis->uTimerTSIO = cTicksNow;
-
-    /*
-     * Calculate the mixer's (fixed) sampling rate.
-     */
-    AssertPtr(pThis->pMixer);
-
-    PDMAUDIOSTREAMCFG mixerStrmCfg;
-    int rc = AudioMixerGetDeviceFormat(pThis->pMixer, &mixerStrmCfg);
-    AssertRC(rc);
-
-    PDMPCMPROPS mixerStrmProps;
-    rc = DrvAudioStreamCfgToProps(&mixerStrmCfg, &mixerStrmProps);
-    AssertRC(rc);
-
-    uint32_t cMixerSamplesMin  = (int)((2 * cTicksElapsed * mixerStrmCfg.uHz + cTicksPerSec) / cTicksPerSec / 2);
-    uint32_t cbMixerSamplesMin = cMixerSamplesMin << mixerStrmProps.cShift;
-
-    RTListForEach(&pThis->lstDrv, pDrv, SB16DRIVER, Node)
-    {
-        uint32_t cbIn = 0;
-        uint32_t cbOut = 0;
-
-        rc = pDrv->pConnector->pfnQueryStatus(pDrv->pConnector,
-                                              &cbIn, &cbOut, NULL /* cSamplesLive */);
-        if (RT_SUCCESS(rc))
-            rc = pDrv->pConnector->pfnPlayOut(pDrv->pConnector, NULL /* cSamplesPlayed */);
-
-#ifdef DEBUG_TIMER
-        LogFlowFunc(("LUN#%RU8: rc=%Rrc, cbIn=%RU32, cbOut=%RU32\n", pDrv->uLUN, rc, cbIn, cbOut));
-#endif
-        /* If we there was an error handling (available) output or there simply is no output available,
-         * then calculate the minimum data rate which must be processed by the device emulation in order
-         * to function correctly.
-         *
-         * This is not the optimal solution, but as we have to deal with this on a timer-based approach
-         * (until we have the audio callbacks) we need to have device' DMA engines running. */
-        if (!pDrv->pConnector->pfnIsValidOut(pDrv->pConnector, pDrv->Out.pStrmOut))
-        {
-            /* Use the mixer's (fixed) sampling rate. */
-            cbOut = RT_MAX(cbOut, cbMixerSamplesMin);
-            continue;
-        }
-
-        const bool fIsActiveOut = pDrv->pConnector->pfnIsActiveOut(pDrv->pConnector, pDrv->Out.pStrmOut);
-        if (   RT_FAILURE(rc)
-            || !fIsActiveOut)
-        {
-            uint32_t cSamplesMin  = (int)((2 * cTicksElapsed * pDrv->Out.pStrmOut->Props.uHz + cTicksPerSec) / cTicksPerSec / 2);
-            uint32_t cbSamplesMin = AUDIOMIXBUF_S2B(&pDrv->Out.pStrmOut->MixBuf, cSamplesMin);
-
-            Log2Func(("\trc=%Rrc, cSamplesMin=%RU32, cbSamplesMin=%RU32\n", rc, cSamplesMin, cbSamplesMin));
-
-            cbOut = RT_MAX(cbOut, cbSamplesMin);
-        }
-
-        cbOutMin = RT_MIN(cbOutMin, cbOut);
-        cbInMax  = RT_MAX(cbInMax, cbIn);
-    }
-
-    Log2Func(("cbInMax=%RU32, cbOutMin=%RU32\n", cbInMax, cbOutMin));
-
-    if (cbOutMin == UINT32_MAX)
-        cbOutMin = 0;
-
-    /*
-     * Playback.
-     */
-    if (cbOutMin)
-    {
-        Assert(cbOutMin != UINT32_MAX);
-
-        /* New space available, see if we can transfer more. */
-        PDMDevHlpDMASchedule(pThis->pDevInsR3);
-    }
-
-    /*
-     * Recording.
-     */
-    /** @todo Implement recording. */
-
-    /* Kick the timer again. */
-    uint64_t cTicks = pThis->cTimerTicksIO;
-    /** @todo adjust cTicks down by now much cbOutMin represents. */
-    TMTimerSet(pThis->pTimerIO, cTicksNow + cTicks);
-}
-
-static void sb16Save(PSSMHANDLE pSSM, PSB16STATE pThis)
-{
-    SSMR3PutS32(pSSM, pThis->irq);
-    SSMR3PutS32(pSSM, pThis->dma);
-    SSMR3PutS32(pSSM, pThis->hdma);
-    SSMR3PutS32(pSSM, pThis->port);
-    SSMR3PutS32(pSSM, pThis->ver);
-    SSMR3PutS32(pSSM, pThis->in_index);
-    SSMR3PutS32(pSSM, pThis->out_data_len);
-    SSMR3PutS32(pSSM, pThis->fmt_stereo);
-    SSMR3PutS32(pSSM, pThis->fmt_signed);
-    SSMR3PutS32(pSSM, pThis->fmt_bits);
-
-    SSMR3PutU32(pSSM, pThis->fmt);
-
-    SSMR3PutS32(pSSM, pThis->dma_auto);
-    SSMR3PutS32(pSSM, pThis->block_size);
-    SSMR3PutS32(pSSM, pThis->fifo);
-    SSMR3PutS32(pSSM, pThis->freq);
-    SSMR3PutS32(pSSM, pThis->time_const);
-    SSMR3PutS32(pSSM, pThis->speaker);
-    SSMR3PutS32(pSSM, pThis->needed_bytes);
-    SSMR3PutS32(pSSM, pThis->cmd);
-    SSMR3PutS32(pSSM, pThis->use_hdma);
-    SSMR3PutS32(pSSM, pThis->highspeed);
-    SSMR3PutS32(pSSM, pThis->can_write);
-    SSMR3PutS32(pSSM, pThis->v2x6);
-
-    SSMR3PutU8 (pSSM, pThis->csp_param);
-    SSMR3PutU8 (pSSM, pThis->csp_value);
-    SSMR3PutU8 (pSSM, pThis->csp_mode);
-    SSMR3PutU8 (pSSM, pThis->csp_param); /* Bug compatible! */
-    SSMR3PutMem(pSSM, pThis->csp_regs, 256);
-    SSMR3PutU8 (pSSM, pThis->csp_index);
-    SSMR3PutMem(pSSM, pThis->csp_reg83, 4);
-    SSMR3PutS32(pSSM, pThis->csp_reg83r);
-    SSMR3PutS32(pSSM, pThis->csp_reg83w);
-
-    SSMR3PutMem(pSSM, pThis->in2_data, sizeof (pThis->in2_data));
-    SSMR3PutMem(pSSM, pThis->out_data, sizeof (pThis->out_data));
-    SSMR3PutU8 (pSSM, pThis->test_reg);
-    SSMR3PutU8 (pSSM, pThis->last_read_byte);
-
-    SSMR3PutS32(pSSM, pThis->nzero);
-    SSMR3PutS32(pSSM, pThis->left_till_irq);
-    SSMR3PutS32(pSSM, pThis->dma_running);
-    SSMR3PutS32(pSSM, pThis->bytes_per_second);
-    SSMR3PutS32(pSSM, pThis->align);
-
-    SSMR3PutS32(pSSM, pThis->mixer_nreg);
-    SSMR3PutMem(pSSM, pThis->mixer_regs, 256);
-
-}
-
-static int sb16Load(PSSMHANDLE pSSM, PSB16STATE pThis, int version_id)
-{
-    SSMR3GetS32(pSSM, &pThis->irq);
-    SSMR3GetS32(pSSM, &pThis->dma);
-    SSMR3GetS32(pSSM, &pThis->hdma);
-    SSMR3GetS32(pSSM, &pThis->port);
-    SSMR3GetS32(pSSM, &pThis->ver);
-    SSMR3GetS32(pSSM, &pThis->in_index);
-    SSMR3GetS32(pSSM, &pThis->out_data_len);
-    SSMR3GetS32(pSSM, &pThis->fmt_stereo);
-    SSMR3GetS32(pSSM, &pThis->fmt_signed);
-    SSMR3GetS32(pSSM, &pThis->fmt_bits);
-
-    SSMR3GetU32(pSSM, (uint32_t *)&pThis->fmt);
-
-    SSMR3GetS32(pSSM, &pThis->dma_auto);
-    SSMR3GetS32(pSSM, &pThis->block_size);
-    SSMR3GetS32(pSSM, &pThis->fifo);
-    SSMR3GetS32(pSSM, &pThis->freq);
-    SSMR3GetS32(pSSM, &pThis->time_const);
-    SSMR3GetS32(pSSM, &pThis->speaker);
-    SSMR3GetS32(pSSM, &pThis->needed_bytes);
-    SSMR3GetS32(pSSM, &pThis->cmd);
-    SSMR3GetS32(pSSM, &pThis->use_hdma);
-    SSMR3GetS32(pSSM, &pThis->highspeed);
-    SSMR3GetS32(pSSM, &pThis->can_write);
-    SSMR3GetS32(pSSM, &pThis->v2x6);
-
-    SSMR3GetU8 (pSSM, &pThis->csp_param);
-    SSMR3GetU8 (pSSM, &pThis->csp_value);
-    SSMR3GetU8 (pSSM, &pThis->csp_mode);
-    SSMR3GetU8 (pSSM, &pThis->csp_param);   /* Bug compatible! */
-    SSMR3GetMem(pSSM, pThis->csp_regs, 256);
-    SSMR3GetU8 (pSSM, &pThis->csp_index);
-    SSMR3GetMem(pSSM, pThis->csp_reg83, 4);
-    SSMR3GetS32(pSSM, &pThis->csp_reg83r);
-    SSMR3GetS32(pSSM, &pThis->csp_reg83w);
-
-    SSMR3GetMem(pSSM, pThis->in2_data, sizeof (pThis->in2_data));
-    SSMR3GetMem(pSSM, pThis->out_data, sizeof (pThis->out_data));
-    SSMR3GetU8 (pSSM, &pThis->test_reg);
-    SSMR3GetU8 (pSSM, &pThis->last_read_byte);
-
-    SSMR3GetS32(pSSM, &pThis->nzero);
-    SSMR3GetS32(pSSM, &pThis->left_till_irq);
-    SSMR3GetS32(pSSM, &pThis->dma_running);
-    SSMR3GetS32(pSSM, &pThis->bytes_per_second);
-    SSMR3GetS32(pSSM, &pThis->align);
-
-    SSMR3GetS32(pSSM, &pThis->mixer_nreg);
-    SSMR3GetMem(pSSM, pThis->mixer_regs, 256);
-
-#if 0
-    PSB16DRIVER pDrv;
-    RTListForEach(&pThis->lstDrv, pDrv, SB16DRIVER, Node)
-    {
-        if (pDrv->Out.pStrmOut)
-        {
-            pDrv->pConnector->pfnCloseOut(pThis->pDrv, pDrv->Out.pStrmOut);
-            pDrv->Out.pStrmOut = NULL;
-        }
-    }
-#endif
-
-    if (pThis->dma_running)
-    {
-        if (pThis->freq)
-        {
-            PDMAUDIOSTREAMCFG streamCfg;
-            streamCfg.uHz           = pThis->freq;
-            streamCfg.cChannels     = 1 << pThis->fmt_stereo;
-            streamCfg.enmFormat     = pThis->fmt;
-            streamCfg.enmEndianness = PDMAUDIOHOSTENDIANNESS;
-
-            int rc = sb16OpenOut(pThis, &streamCfg);
-            AssertRC(rc);
-        }
-
-        sb16Control(pThis, 1);
-        sb16SpeakerControl(pThis, pThis->speaker);
-    }
-
-    /* Update the master (mixer) and PCM out volumes. */
-    sb16SetMasterVolume(pThis);
-    sb16SetPcmOutVolume(pThis);
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) sb16LiveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uPass)
-{
-    PSB16STATE pThis = PDMINS_2_DATA(pDevIns, PSB16STATE);
-
-    SSMR3PutS32(pSSM, pThis->irqCfg);
-    SSMR3PutS32(pSSM, pThis->dmaCfg);
-    SSMR3PutS32(pSSM, pThis->hdmaCfg);
-    SSMR3PutS32(pSSM, pThis->portCfg);
-    SSMR3PutS32(pSSM, pThis->verCfg);
-    return VINF_SSM_DONT_CALL_AGAIN;
-}
-
-static DECLCALLBACK(int) sb16SaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
-{
-    PSB16STATE pThis = PDMINS_2_DATA(pDevIns, PSB16STATE);
-
-    sb16LiveExec(pDevIns, pSSM, 0);
-    sb16Save(pSSM, pThis);
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) sb16LoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass)
-{
-    PSB16STATE pThis = PDMINS_2_DATA(pDevIns, PSB16STATE);
-
-    AssertMsgReturn(    uVersion == SB16_SAVE_STATE_VERSION
-                    ||  uVersion == SB16_SAVE_STATE_VERSION_VBOX_30,
-                    ("%u\n", uVersion),
-                    VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION);
-    if (uVersion > SB16_SAVE_STATE_VERSION_VBOX_30)
-    {
-        int32_t irq;
-        SSMR3GetS32 (pSSM, &irq);
-        int32_t dma;
-        SSMR3GetS32 (pSSM, &dma);
-        int32_t hdma;
-        SSMR3GetS32 (pSSM, &hdma);
-        int32_t port;
-        SSMR3GetS32 (pSSM, &port);
-        int32_t ver;
-        int rc = SSMR3GetS32 (pSSM, &ver);
-        AssertRCReturn (rc, rc);
-
-        if (   irq  != pThis->irqCfg
-            || dma  != pThis->dmaCfg
-            || hdma != pThis->hdmaCfg
-            || port != pThis->portCfg
-            || ver  != pThis->verCfg)
-        {
-            return SSMR3SetCfgError(pSSM, RT_SRC_POS,
-                                    N_("config changed: irq=%x/%x dma=%x/%x hdma=%x/%x port=%x/%x ver=%x/%x (saved/config)"),
-                                    irq,  pThis->irqCfg,
-                                    dma,  pThis->dmaCfg,
-                                    hdma, pThis->hdmaCfg,
-                                    port, pThis->portCfg,
-                                    ver,  pThis->verCfg);
-        }
-    }
-
-    if (uPass != SSM_PASS_FINAL)
-        return VINF_SUCCESS;
-
-    sb16Load(pSSM, pThis, uVersion);
-    return VINF_SUCCESS;
-}
-
-static int sb16OpenOut(PSB16STATE pThis, PPDMAUDIOSTREAMCFG pCfg)
-{
-    AssertPtrReturn(pThis, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
-
-    int rc = VINF_SUCCESS;
-
-    PSB16DRIVER pDrv;
-    uint8_t uLUN = 0;
-
-    RTListForEach(&pThis->lstDrv, pDrv, SB16DRIVER, Node)
-    {
-        char *pszDesc;
-        if (RTStrAPrintf(&pszDesc, "[LUN#%RU8] sb16.po", uLUN) <= 0)
-        {
-            rc = VERR_NO_MEMORY;
-            break;
-        }
-
-        int rc2 = pDrv->pConnector->pfnCreateOut(pDrv->pConnector, pszDesc, pCfg, &pDrv->Out.pStrmOut);
-        LogFlowFunc(("LUN#%RU8: Created output with rc=%Rrc\n", uLUN, rc));
-        if (rc2 == VINF_SUCCESS) /* Note: Could return VWRN_ALREADY_EXISTS. */
-        {
-            AudioMixerRemoveStream(pThis->pSinkOutput, pDrv->Out.phStrmOut);
-            rc = AudioMixerAddStreamOut(pThis->pSinkOutput,
-                                        pDrv->pConnector, pDrv->Out.pStrmOut,
-                                        0 /* uFlags */,
-                                        &pDrv->Out.phStrmOut);
-        }
-
-        RTStrFree(pszDesc);
-
-        if (RT_FAILURE(rc2))
-        {
-            if (RT_SUCCESS(rc))
-                rc = rc2;
-            break;
-        }
-
-        uLUN++;
-    }
-
-    /* Ensure volume gets propagated. */
-    AudioMixerInvalidate(pThis->pMixer);
-
-    return rc;
-}
-
-/**
- * @interface_method_impl{PDMDEVREG,pfnReset}
- */
-static DECLCALLBACK(void) sb16DevReset(PPDMDEVINS pDevIns)
-{
-    PSB16STATE pThis = PDMINS_2_DATA(pDevIns, PSB16STATE);
-
-    /* Bring back the device to initial state, and especially make
-     * sure there's no interrupt or DMA activity.
-     */
-    PDMDevHlpISASetIrq(pThis->pDevInsR3, pThis->irq, 0);
-
-    pThis->mixer_regs[0x82] = 0;
-    pThis->csp_regs[5]      = 1;
-    pThis->csp_regs[9]      = 0xf8;
-
-    pThis->dma_auto = 0;
-    pThis->in_index = 0;
-    pThis->out_data_len = 0;
-    pThis->left_till_irq = 0;
-    pThis->needed_bytes = 0;
-    pThis->block_size = -1;
-    pThis->nzero = 0;
-    pThis->highspeed = 0;
-    pThis->v2x6 = 0;
-    pThis->cmd = -1;
-
-    sb16MixerReset(pThis);
-    sb16SpeakerControl(pThis, 0);
-    sb16Control(pThis, 0);
-    sb16ResetLegacy(pThis);
-}
-
-/**
- * @interface_method_impl{PDMIBASE,pfnQueryInterface}
- */
-static DECLCALLBACK(void *) sb16QueryInterface(struct PDMIBASE *pInterface, const char *pszIID)
-{
-    PSB16STATE pThis = RT_FROM_MEMBER(pInterface, SB16STATE, IBase);
-    Assert(&pThis->IBase == pInterface);
-
-    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->IBase);
-    return NULL;
-}
-
-/**
- * @interface_method_impl{PDMDEVREG,pfnDestruct}
- */
-static DECLCALLBACK(int) sb16Destruct(PPDMDEVINS pDevIns)
-{
-    PSB16STATE pThis = PDMINS_2_DATA(pDevIns, PSB16STATE);
-
-    PSB16DRIVER pDrv;
-
-    RTListForEach(&pThis->lstDrv, pDrv, SB16DRIVER, Node)
-        pDrv->Out.phStrmOut = NULL;
-
-    pThis->pSinkOutput = NULL;
-
-    if (pThis->pMixer)
-    {
-        AudioMixerDestroy(pThis->pMixer);
-        pThis->pMixer = NULL;
-    }
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) sb16Construct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
-{
-    PSB16STATE pThis = PDMINS_2_DATA(pDevIns, PSB16STATE);
-
-    /*
-     * Validations.
-     */
-    Assert(iInstance == 0);
-    PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
-    if (!CFGMR3AreValuesValid(pCfg,
-                              "IRQ\0"
-                              "DMA\0"
-                              "DMA16\0"
-                              "Port\0"
-                              "Version\0"
-                              "TimerHz\0"))
-        return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES,
-                                N_("Invalid configuration for SB16 device"));
-
-    /*
-     * Read config data.
-     */
-    int rc = CFGMR3QuerySIntDef(pCfg, "IRQ", &pThis->irq, 5);
-    if (RT_FAILURE(rc))
-        return PDMDEV_SET_ERROR(pDevIns, rc,
-                                N_("SB16 configuration error: Failed to get the \"IRQ\" value"));
-    pThis->irqCfg  = pThis->irq;
-
-    rc = CFGMR3QuerySIntDef(pCfg, "DMA", &pThis->dma, 1);
-    if (RT_FAILURE(rc))
-        return PDMDEV_SET_ERROR(pDevIns, rc,
-                                N_("SB16 configuration error: Failed to get the \"DMA\" value"));
-    pThis->dmaCfg  = pThis->dma;
-
-    rc = CFGMR3QuerySIntDef(pCfg, "DMA16", &pThis->hdma, 5);
-    if (RT_FAILURE(rc))
-        return PDMDEV_SET_ERROR(pDevIns, rc,
-                                N_("SB16 configuration error: Failed to get the \"DMA16\" value"));
-    pThis->hdmaCfg = pThis->hdma;
-
-    RTIOPORT Port;
-    rc = CFGMR3QueryPortDef(pCfg, "Port", &Port, 0x220);
-    if (RT_FAILURE(rc))
-        return PDMDEV_SET_ERROR(pDevIns, rc,
-                                N_("SB16 configuration error: Failed to get the \"Port\" value"));
-    pThis->port    = Port;
-    pThis->portCfg = Port;
-
-    uint16_t u16Version;
-    rc = CFGMR3QueryU16Def(pCfg, "Version", &u16Version, 0x0405);
-    if (RT_FAILURE(rc))
-        return PDMDEV_SET_ERROR(pDevIns, rc,
-                                N_("SB16 configuration error: Failed to get the \"Version\" value"));
-
-#ifndef VBOX_WITH_AUDIO_CALLBACKS
-    uint16_t uTimerHz;
-    rc = CFGMR3QueryU16Def(pCfg, "TimerHz", &uTimerHz, 200 /* Hz */);
-    if (RT_FAILURE(rc))
-        return PDMDEV_SET_ERROR(pDevIns, rc,
-                                N_("SB16 configuration error: failed to read Hertz (Hz) rate as unsigned integer"));
-#endif
-
-    pThis->ver     = u16Version;
-    pThis->verCfg  = u16Version;
-
-    /*
-     * Init instance data.
-     */
-    pThis->pDevInsR3               = pDevIns;
-    pThis->IBase.pfnQueryInterface = sb16QueryInterface;
-    pThis->cmd                     = -1;
-
-    pThis->mixer_regs[0x80]        = magic_of_irq (pThis->irq);
-    pThis->mixer_regs[0x81]        = (1 << pThis->dma) | (1 << pThis->hdma);
-    pThis->mixer_regs[0x82]        = 2 << 5;
-
-    pThis->csp_regs[5]             = 1;
-    pThis->csp_regs[9]             = 0xf8;
-
-    RTListInit(&pThis->lstDrv);
-
-    sb16MixerReset(pThis);
-
-    /*
-     * Create timer(s), register & attach stuff.
-     */
-    rc = PDMDevHlpTMTimerCreate(pDevIns, TMCLOCK_VIRTUAL, sb16TimerIRQ, pThis,
-                                TMTIMER_FLAGS_DEFAULT_CRIT_SECT, "SB16 IRQ timer", &pThis->pTimerIRQ);
-    if (RT_FAILURE(rc))
-        AssertMsgFailedReturn(("Error creating IRQ timer, rc=%Rrc\n", rc), rc);
-
-    rc = PDMDevHlpIOPortRegister(pDevIns, pThis->port + 0x04,  2, pThis,
-                                 mixer_write, mixer_read, NULL, NULL, "SB16");
-    if (RT_FAILURE(rc))
-        return rc;
-    rc = PDMDevHlpIOPortRegister(pDevIns, pThis->port + 0x06, 10, pThis,
-                                 dsp_write, dsp_read, NULL, NULL, "SB16");
-    if (RT_FAILURE(rc))
-        return rc;
-
-    rc = PDMDevHlpDMARegister(pDevIns, pThis->hdma, sb16DMARead, pThis);
-    if (RT_FAILURE(rc))
-        return rc;
-    rc = PDMDevHlpDMARegister(pDevIns, pThis->dma, sb16DMARead, pThis);
-    if (RT_FAILURE(rc))
-        return rc;
-
-    pThis->can_write = 1;
-
-    rc = PDMDevHlpSSMRegister3(pDevIns, SB16_SAVE_STATE_VERSION, sizeof(SB16STATE), sb16LiveExec, sb16SaveExec, sb16LoadExec);
-    if (RT_FAILURE(rc))
-        return rc;
-
-    /*
-     * Attach driver.
-     */
-    uint8_t uLUN;
-    for (uLUN = 0; uLUN < UINT8_MAX; ++uLUN)
-    {
-        LogFunc(("Trying to attach driver for LUN #%RU8 ...\n", uLUN));
-        rc = sb16AttachInternal(pDevIns, NULL /* pDrv */, uLUN, 0 /* fFlags */);
-        if (RT_FAILURE(rc))
-        {
-            if (rc == VERR_PDM_NO_ATTACHED_DRIVER)
-                rc = VINF_SUCCESS;
-            else if (rc == VERR_AUDIO_BACKEND_INIT_FAILED)
-            {
-                sb16Reattach(pThis, NULL /* pDrv */, uLUN, "NullAudio");
-                PDMDevHlpVMSetRuntimeError(pDevIns, 0 /*fFlags*/, "HostAudioNotResponding",
-                        N_("No audio devices could be opened. Selecting the NULL audio backend "
-                           "with the consequence that no sound is audible"));
-                /* attaching to the NULL audio backend will never fail */
-                rc = VINF_SUCCESS;
-            }
-            break;
-        }
-    }
-
-    LogFunc(("cLUNs=%RU8, rc=%Rrc\n", uLUN, rc));
-
-    sb16ResetLegacy(pThis);
-
-    PSB16DRIVER pDrv;
-    RTListForEach(&pThis->lstDrv, pDrv, SB16DRIVER, Node)
-    {
-        /*
-         * Only primary drivers are critical for the VM to run. Everything else
-         * might not worth showing an own error message box in the GUI.
-         */
-        if (!(pDrv->Flags & PDMAUDIODRVFLAG_PRIMARY))
-            continue;
-
-        PPDMIAUDIOCONNECTOR pCon = pDrv->pConnector;
-        AssertPtr(pCon);
-
-        /* Note: No input streams available for SB16 yet. */
-        bool fValidOut = pCon->pfnIsValidOut(pCon, pDrv->Out.pStrmOut);
-        if (!fValidOut)
-        {
-            LogRel(("SB16: Falling back to NULL backend (no sound audible)\n"));
-
-            sb16ResetLegacy(pThis);
-            sb16Reattach(pThis, pDrv, pDrv->uLUN, "NullAudio");
-
-            PDMDevHlpVMSetRuntimeError(pDevIns, 0 /*fFlags*/, "HostAudioNotResponding",
-                N_("No audio devices could be opened. Selecting the NULL audio backend "
-                   "with the consequence that no sound is audible"));
-        }
-    }
-
-#ifndef VBOX_WITH_AUDIO_CALLBACKS
-    if (RT_SUCCESS(rc))
-    {
-        rc = PDMDevHlpTMTimerCreate(pDevIns, TMCLOCK_VIRTUAL, sb16TimerIO, pThis,
-                                    TMTIMER_FLAGS_DEFAULT_CRIT_SECT, "SB16 IO timer", &pThis->pTimerIO);
-        if (RT_FAILURE(rc))
-            AssertMsgFailedReturn(("Error creating I/O timer, rc=%Rrc\n", rc), rc);
-        else
-        {
-            pThis->cTimerTicksIO = TMTimerGetFreq(pThis->pTimerIO) / uTimerHz;
-            pThis->uTimerTSIO    = TMTimerGet(pThis->pTimerIO);
-            LogFunc(("Timer ticks=%RU64 (%RU16 Hz)\n", pThis->cTimerTicksIO, uTimerHz));
-
-            /* Fire off timer. */
-            TMTimerSet(pThis->pTimerIO, TMTimerGet(pThis->pTimerIO) + pThis->cTimerTicksIO);
-        }
-    }
-#else
-    if (RT_SUCCESS(rc))
-    {
-        /** @todo Merge this callback registration with the validation block above once
-         *  this becomes the standard. */
-        PSB16DRIVER pDrv;
-        RTListForEach(&pThis->lstDrv, pDrv, SB16DRIVER, Node)
-        {
-            /* Only register primary driver.
-             * The device emulation does the output multiplexing then. */
-            if (pDrv->Flags != PDMAUDIODRVFLAG_PRIMARY)
-                continue;
-
-            PDMAUDIOCALLBACK AudioCallbacks[2];
-
-            SB16CALLBACKCTX Ctx = { pThis, pDrv };
-
-            AudioCallbacks[0].enmType     = PDMAUDIOCALLBACKTYPE_INPUT;
-            AudioCallbacks[0].pfnCallback = sb16CallbackInput;
-            AudioCallbacks[0].pvCtx       = &Ctx;
-            AudioCallbacks[0].cbCtx       = sizeof(SB16CALLBACKCTX);
-
-            AudioCallbacks[1].enmType     = PDMAUDIOCALLBACKTYPE_OUTPUT;
-            AudioCallbacks[1].pfnCallback = sb16CallbackOutput;
-            AudioCallbacks[1].pvCtx       = &Ctx;
-            AudioCallbacks[1].cbCtx       = sizeof(SB16CALLBACKCTX);
-
-            rc = pDrv->pConnector->pfnRegisterCallbacks(pDrv->pConnector, AudioCallbacks, RT_ELEMENTS(AudioCallbacks));
-            if (RT_FAILURE(rc))
-                break;
-        }
-    }
-#endif
-
-    return VINF_SUCCESS;
-}
-
-const PDMDEVREG g_DeviceSB16 =
-{
-    /* u32Version */
-    PDM_DEVREG_VERSION,
-    /* szName */
-    "sb16",
-    /* szRCMod */
-    "",
-    /* szR0Mod */
-    "",
-    /* pszDescription */
-    "Sound Blaster 16 Controller",
-    /* fFlags */
-    PDM_DEVREG_FLAGS_DEFAULT_BITS,
-    /* fClass */
-    PDM_DEVREG_CLASS_AUDIO,
-    /* cMaxInstances */
-    1,
-    /* cbInstance */
-    sizeof(SB16STATE),
-    /* pfnConstruct */
-    sb16Construct,
-    /* pfnDestruct */
-    sb16Destruct,
-    /* pfnRelocate */
-    NULL,
-    /* pfnMemSetup */
-    NULL,
-    /* pfnPowerOn */
-    NULL,
-    /* pfnReset */
-    sb16DevReset,
-    /* pfnSuspend */
-    NULL,
-    /* pfnResume */
-    NULL,
-    /* pfnAttach */
-    sb16Attach,
-    /* pfnDetach */
-    sb16Detach,
-    /* pfnQueryInterface */
-    NULL,
-    /* pfnInitComplete */
-    NULL,
-    /* pfnPowerOff */
-    NULL,
-    /* pfnSoftReset */
-    NULL,
-    /* u32VersionEnd */
-    PDM_DEVREG_VERSION
-};
diff --git a/src/VBox/Devices/Audio_old/DrvAudio.cpp b/src/VBox/Devices/Audio_old/DrvAudio.cpp
deleted file mode 100644
index ea7af74..0000000
--- a/src/VBox/Devices/Audio_old/DrvAudio.cpp
+++ /dev/null
@@ -1,2521 +0,0 @@
-/* $Id: DrvAudio.cpp $ */
-/** @file
- * Intermediate audio driver header.
- *
- * @remarks Intermediate audio driver for connecting the audio device emulation
- *          with the host backend.
- */
-
-/*
- * Copyright (C) 2006-2016 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- * --------------------------------------------------------------------
- *
- * This code is based on: audio.c from QEMU AUDIO subsystem.
- *
- * QEMU Audio subsystem
- *
- * Copyright (c) 2003-2005 Vassili Karpov (malc)
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#define LOG_GROUP LOG_GROUP_DRV_AUDIO
-#include <VBox/log.h>
-#include <VBox/vmm/pdm.h>
-#include <VBox/err.h>
-#include <VBox/vmm/mm.h>
-#include <VBox/vmm/pdmaudioifs.h>
-
-#include <iprt/alloc.h>
-#include <iprt/asm-math.h>
-#include <iprt/assert.h>
-#include <iprt/circbuf.h>
-#include <iprt/string.h>
-#include <iprt/uuid.h>
-
-#include "VBoxDD.h"
-
-#include <ctype.h>
-#include <stdlib.h>
-
-#include "DrvAudio.h"
-#include "AudioMixBuffer.h"
-
-static int drvAudioDestroyGstIn(PDRVAUDIO pThis, PPDMAUDIOGSTSTRMIN pGstStrmIn);
-
-static int drvAudioAllocHstIn(PDRVAUDIO pThis, const char *pszName, PPDMAUDIOSTREAMCFG pCfg, PDMAUDIORECSOURCE enmRecSource, PPDMAUDIOHSTSTRMIN *ppHstStrmIn);
-static int drvAudioDestroyHstIn(PDRVAUDIO pThis, PPDMAUDIOHSTSTRMIN pHstStrmIn);
-
-int drvAudioAddHstOut(PDRVAUDIO pThis, const char *pszName, PPDMAUDIOSTREAMCFG pCfg, PPDMAUDIOHSTSTRMOUT *ppHstStrmOut)
-{
-    AssertPtrReturn(pThis, VERR_INVALID_POINTER);
-    AssertPtrReturn(pszName, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
-
-    PPDMAUDIOHSTSTRMOUT pHstStrmOut;
-
-    int rc;
-    if (   conf.fixed_out.enabled /** @todo Get rid of these settings! */
-        && conf.fixed_out.greedy)
-    {
-        rc = drvAudioAllocHstOut(pThis, pszName, pCfg, &pHstStrmOut);
-    }
-    else
-        rc = VERR_NOT_FOUND;
-
-    if (RT_FAILURE(rc))
-    {
-        pHstStrmOut = drvAudioFindSpecificOut(pThis, NULL, pCfg);
-        if (!pHstStrmOut)
-        {
-            rc = drvAudioAllocHstOut(pThis, pszName, pCfg, &pHstStrmOut);
-            if (RT_FAILURE(rc))
-                pHstStrmOut = drvAudioFindAnyHstOut(pThis, NULL /* pHstStrmOut */);
-        }
-
-        rc = pHstStrmOut ? VINF_SUCCESS : rc;
-    }
-
-    if (RT_SUCCESS(rc))
-        *ppHstStrmOut = pHstStrmOut;
-
-    return rc;
-}
-
-static PDMAUDIOFMT drvAudioGetConfFormat(PCFGMNODE pCfgHandle, const char *pszKey,
-                                         PDMAUDIOFMT enmDefault, bool *pfDefault)
-{
-    if (   pCfgHandle == NULL
-        || pszKey == NULL)
-    {
-        *pfDefault = true;
-        return enmDefault;
-    }
-
-    char *pszValue = NULL;
-    int rc = CFGMR3QueryStringAlloc(pCfgHandle, pszKey, &pszValue);
-    if (RT_FAILURE(rc))
-    {
-        *pfDefault = true;
-        return enmDefault;
-    }
-
-    PDMAUDIOFMT fmt = drvAudioHlpStringToFormat(pszValue);
-    if (fmt == AUD_FMT_INVALID)
-    {
-         *pfDefault = true;
-        return enmDefault;
-    }
-
-    *pfDefault = false;
-    return fmt;
-}
-
-static int drvAudioGetConfInt(PCFGMNODE pCfgHandle, const char *pszKey,
-                              int iDefault, bool *pfDefault)
-{
-
-    if (   pCfgHandle == NULL
-        || pszKey == NULL)
-    {
-        *pfDefault = true;
-        return iDefault;
-    }
-
-    uint64_t u64Data = 0;
-    int rc = CFGMR3QueryInteger(pCfgHandle, pszKey, &u64Data);
-    if (RT_FAILURE(rc))
-    {
-        *pfDefault = true;
-        return iDefault;
-
-    }
-
-    *pfDefault = false;
-    return u64Data;
-}
-
-static const char *drvAudioGetConfStr(PCFGMNODE pCfgHandle, const char *pszKey,
-                                      const char *pszDefault, bool *pfDefault)
-{
-    if (   pCfgHandle == NULL
-        || pszKey == NULL)
-    {
-        *pfDefault = true;
-        return pszDefault;
-    }
-
-    char *pszValue = NULL;
-    int rc = CFGMR3QueryStringAlloc(pCfgHandle, pszKey, &pszValue);
-    if (RT_FAILURE(rc))
-    {
-        *pfDefault = true;
-        return pszDefault;
-    }
-
-    *pfDefault = false;
-    return pszValue;
-}
-
-static int drvAudioProcessOptions(PCFGMNODE pCfgHandle, const char *pszPrefix, struct audio_option *opt)
-{
-    AssertPtrReturn(pCfgHandle, VERR_INVALID_POINTER);
-    AssertPtrReturn(pszPrefix, VERR_INVALID_POINTER);
-    AssertPtrReturn(opt, VERR_INVALID_POINTER);
-
-    PCFGMNODE pCfgChildHandle = NULL;
-    PCFGMNODE pCfgChildChildHandle = NULL;
-
-   /* If pCfgHandle is NULL, let NULL be passed to get int and get string functions..
-    * The getter function will return default values.
-    */
-    if (pCfgHandle != NULL)
-    {
-       /* If its audio general setting, need to traverse to one child node.
-        * /Devices/ichac97/0/LUN#0/Config/Audio
-        */
-       if(!strncmp(pszPrefix, "AUDIO", 5)) /** @todo Use a \#define */
-       {
-            pCfgChildHandle = CFGMR3GetFirstChild(pCfgHandle);
-            if(pCfgChildHandle)
-                pCfgHandle = pCfgChildHandle;
-        }
-        else
-        {
-            /* If its driver specific configuration , then need to traverse two level deep child
-             * child nodes. for eg. in case of DirectSoundConfiguration item
-             * /Devices/ichac97/0/LUN#0/Config/Audio/DirectSoundConfig
-             */
-            pCfgChildHandle = CFGMR3GetFirstChild(pCfgHandle);
-            if (pCfgChildHandle)
-            {
-                pCfgChildChildHandle = CFGMR3GetFirstChild(pCfgChildHandle);
-                if (pCfgChildChildHandle)
-                    pCfgHandle = pCfgChildChildHandle;
-            }
-        }
-    }
-
-    for (; opt->name; opt++)
-    {
-        LogFlowFunc(("Option value pointer for `%s' is not set\n",
-                     opt->name));
-        if (!opt->valp) {
-            LogFlowFunc(("Option value pointer for `%s' is not set\n",
-                   opt->name));
-            continue;
-        }
-
-        bool fUseDefault;
-
-        switch (opt->tag)
-        {
-            case AUD_OPT_BOOL:
-            case AUD_OPT_INT:
-            {
-                int *intp = (int *)opt->valp;
-                *intp = drvAudioGetConfInt(pCfgHandle, opt->name, *intp, &fUseDefault);
-
-                break;
-            }
-
-            case AUD_OPT_FMT:
-            {
-                PDMAUDIOFMT *fmtp = (PDMAUDIOFMT *)opt->valp;
-                *fmtp = drvAudioGetConfFormat(pCfgHandle, opt->name, *fmtp, &fUseDefault);
-
-                break;
-            }
-
-            case AUD_OPT_STR:
-            {
-                const char **strp = (const char **)opt->valp;
-                *strp = drvAudioGetConfStr(pCfgHandle, opt->name, *strp, &fUseDefault);
-
-                break;
-            }
-
-            default:
-                LogFlowFunc(("Bad value tag for option `%s' - %d\n", opt->name, opt->tag));
-                fUseDefault = false;
-                break;
-        }
-
-        if (!opt->overridenp)
-            opt->overridenp = &opt->overriden;
-
-        *opt->overridenp = !fUseDefault;
-    }
-
-    return VINF_SUCCESS;
-}
-
-static bool drvAudioStreamCfgIsValid(PPDMAUDIOSTREAMCFG pCfg)
-{
-    bool fValid = (   pCfg->cChannels == 1
-                   || pCfg->cChannels == 2); /* Either stereo (2) or mono (1), per stream. */
-
-    fValid |= (   pCfg->enmEndianness == PDMAUDIOENDIANNESS_LITTLE
-               || pCfg->enmEndianness == PDMAUDIOENDIANNESS_BIG);
-
-    if (fValid)
-    {
-        switch (pCfg->enmFormat)
-        {
-            case AUD_FMT_S8:
-            case AUD_FMT_U8:
-            case AUD_FMT_S16:
-            case AUD_FMT_U16:
-            case AUD_FMT_S32:
-            case AUD_FMT_U32:
-                break;
-            default:
-                fValid = false;
-                break;
-        }
-    }
-
-    /** @todo Check for defined frequencies supported. */
-    fValid |= pCfg->uHz > 0;
-
-#ifdef DEBUG
-    drvAudioStreamCfgPrint(pCfg);
-#endif
-
-    LogFlowFunc(("pCfg=%p, fValid=%RTbool\n", pCfg, fValid));
-    return fValid;
-}
-
-/**
- * Clears a sample buffer by the given amount of audio samples.
- *
- * @return  IPRT status code.
- * @param   pPCMProps               PCM properties to use for the buffer to clear.
- * @param   pvBuf                   Buffer to clear.
- * @param   cbBuf                   Size (in bytes) of the buffer.
- * @param   cSamples                Number of audio samples to clear in the buffer.
- */
-void DrvAudioClearBuf(PPDMPCMPROPS pPCMProps, void *pvBuf, size_t cbBuf, uint32_t cSamples)
-{
-    AssertPtrReturnVoid(pPCMProps);
-    AssertPtrReturnVoid(pvBuf);
-
-    if (!cbBuf || !cSamples)
-        return;
-
-    Log2Func(("pPCMInfo=%p, pvBuf=%p, cSamples=%RU32, fSigned=%RTbool, cBits=%RU8, cShift=%RU8\n",
-              pPCMProps, pvBuf, cSamples, pPCMProps->fSigned, pPCMProps->cBits, pPCMProps->cShift));
-
-    if (pPCMProps->fSigned)
-    {
-        memset(pvBuf, 0, cSamples << pPCMProps->cShift);
-    }
-    else
-    {
-        switch (pPCMProps->cBits)
-        {
-            case 8:
-            {
-                memset(pvBuf, 0x80, cSamples << pPCMProps->cShift);
-                break;
-            }
-
-            case 16:
-            {
-                uint16_t *p = (uint16_t *)pvBuf;
-                int shift = pPCMProps->cChannels - 1;
-                short s = INT16_MAX;
-
-                if (pPCMProps->fSwapEndian)
-                    s = RT_BSWAP_U16(s);
-
-                for (unsigned i = 0; i < cSamples << shift; i++)
-                    p[i] = s;
-
-                break;
-            }
-
-            case 32:
-            {
-                uint32_t *p = (uint32_t *)pvBuf;
-                int shift = pPCMProps->cChannels - 1;
-                int32_t s = INT32_MAX;
-
-                if (pPCMProps->fSwapEndian)
-                    s = RT_BSWAP_U32(s);
-
-                for (unsigned i = 0; i < cSamples << shift; i++)
-                    p[i] = s;
-
-                break;
-            }
-
-            default:
-            {
-                AssertMsgFailed(("Invalid bits: %RU8\n", pPCMProps->cBits));
-                break;
-            }
-        }
-    }
-}
-
-static int drvAudioControlHstIn(PDRVAUDIO pThis, PPDMAUDIOHSTSTRMIN pHstStrmIn, PDMAUDIOSTREAMCMD enmStreamCmd)
-{
-    AssertPtrReturn(pThis, VERR_INVALID_POINTER);
-    AssertPtrReturn(pHstStrmIn, VERR_INVALID_POINTER);
-
-    int rc = RTCritSectEnter(&pHstStrmIn->CritSect);
-    if (RT_FAILURE(rc))
-        return rc;
-
-    switch (enmStreamCmd)
-    {
-        case PDMAUDIOSTREAMCMD_ENABLE:
-        {
-            if (!(pHstStrmIn->fStatus & PDMAUDIOSTRMSTS_FLAG_ENABLED))
-            {
-                rc = pThis->pHostDrvAudio->pfnControlIn(pThis->pHostDrvAudio, pHstStrmIn, PDMAUDIOSTREAMCMD_ENABLE);
-                if (RT_SUCCESS(rc))
-                {
-                    pHstStrmIn->fStatus |= PDMAUDIOSTRMSTS_FLAG_ENABLED;
-                }
-                else
-                    LogFlowFunc(("Backend reported an error when opening input stream, rc=%Rrc\n", rc));
-            }
-            else
-                rc = VINF_SUCCESS;
-
-            break;
-        }
-
-        case PDMAUDIOSTREAMCMD_DISABLE:
-        {
-            if (pHstStrmIn->fStatus & PDMAUDIOSTRMSTS_FLAG_ENABLED)
-            {
-                rc = pThis->pHostDrvAudio->pfnControlIn(pThis->pHostDrvAudio, pHstStrmIn, PDMAUDIOSTREAMCMD_DISABLE);
-                if (RT_SUCCESS(rc))
-                {
-                    pHstStrmIn->fStatus = PDMAUDIOSTRMSTS_FLAG_NONE; /* Clear all. */
-                    AudioMixBufClear(&pHstStrmIn->MixBuf);
-                }
-                else
-                    LogFlowFunc(("Backend vetoed closing output stream, rc=%Rrc\n", rc));
-            }
-            else
-                rc = VINF_SUCCESS;
-
-            break;
-        }
-
-        case PDMAUDIOSTREAMCMD_PAUSE:
-        {
-            if (!(pHstStrmIn->fStatus & PDMAUDIOSTRMSTS_FLAG_PAUSED))
-            {
-                Assert(pHstStrmIn->fStatus & PDMAUDIOSTRMSTS_FLAG_ENABLED);
-                rc = pThis->pHostDrvAudio->pfnControlIn(pThis->pHostDrvAudio, pHstStrmIn, PDMAUDIOSTREAMCMD_PAUSE);
-                if (RT_SUCCESS(rc))
-                {
-                    LogFunc(("[%s] Pausing stream\n", pHstStrmIn->MixBuf.pszName));
-                    pHstStrmIn->fStatus |= PDMAUDIOSTRMSTS_FLAG_PAUSED;
-                }
-                else
-                    LogFlowFunc(("Backend vetoed pausing input stream, rc=%Rrc\n", rc));
-            }
-            else
-                rc = VINF_SUCCESS;
-
-            break;
-        }
-
-        case PDMAUDIOSTREAMCMD_RESUME:
-        {
-            if (pHstStrmIn->fStatus & PDMAUDIOSTRMSTS_FLAG_PAUSED)
-            {
-                Assert(pHstStrmIn->fStatus & PDMAUDIOSTRMSTS_FLAG_ENABLED);
-                rc = pThis->pHostDrvAudio->pfnControlIn(pThis->pHostDrvAudio, pHstStrmIn, PDMAUDIOSTREAMCMD_RESUME);
-                if (RT_SUCCESS(rc))
-                {
-                    pHstStrmIn->fStatus &= ~PDMAUDIOSTRMSTS_FLAG_PAUSED;
-                    LogFunc(("[%s] Resumed stream\n", pHstStrmIn->MixBuf.pszName));
-                }
-                else
-                    LogFlowFunc(("Backend vetoed resuming input stream, rc=%Rrc\n", rc));
-            }
-            else
-                rc = VINF_SUCCESS;
-
-            break;
-        }
-
-        default:
-            AssertMsgFailed(("Command %ld not implemented\n", enmStreamCmd));
-            rc = VERR_NOT_IMPLEMENTED;
-            break;
-    }
-
-    int rc2 = RTCritSectLeave(&pHstStrmIn->CritSect);
-    if (RT_SUCCESS(rc))
-        rc = rc2;
-
-    return rc;
-}
-
-static int drvAudioControlHstOut(PDRVAUDIO pThis, PPDMAUDIOHSTSTRMOUT pHstStrmOut, PDMAUDIOSTREAMCMD enmStreamCmd)
-{
-    AssertPtrReturn(pThis, VERR_INVALID_POINTER);
-    AssertPtrReturn(pHstStrmOut, VERR_INVALID_POINTER);
-
-    int rc = RTCritSectEnter(&pHstStrmOut->CritSect);
-    if (RT_FAILURE(rc))
-        return rc;
-
-    switch (enmStreamCmd)
-    {
-        case PDMAUDIOSTREAMCMD_ENABLE:
-        {
-            if (!(pHstStrmOut->fStatus & PDMAUDIOSTRMSTS_FLAG_ENABLED))
-            {
-                rc = pThis->pHostDrvAudio->pfnControlOut(pThis->pHostDrvAudio, pHstStrmOut, PDMAUDIOSTREAMCMD_ENABLE);
-                if (RT_SUCCESS(rc))
-                {
-                    Assert(!(pHstStrmOut->fStatus & PDMAUDIOSTRMSTS_FLAG_PENDING_DISABLE));
-                    pHstStrmOut->fStatus |= PDMAUDIOSTRMSTS_FLAG_ENABLED;
-                    LogFunc(("[%s] Enabled stream\n", pHstStrmOut->MixBuf.pszName));
-                }
-                else
-                    LogFlowFunc(("[%s] Backend reported an error when enabling output stream, rc=%Rrc\n",
-                                 pHstStrmOut->MixBuf.pszName, rc));
-            }
-            else
-                rc = VINF_SUCCESS;
-
-            break;
-        }
-
-        case PDMAUDIOSTREAMCMD_DISABLE:
-        {
-            if (pHstStrmOut->fStatus & PDMAUDIOSTRMSTS_FLAG_ENABLED)
-            {
-                rc = pThis->pHostDrvAudio->pfnControlOut(pThis->pHostDrvAudio, pHstStrmOut, PDMAUDIOSTREAMCMD_DISABLE);
-                if (RT_SUCCESS(rc))
-                {
-                    pHstStrmOut->fStatus = PDMAUDIOSTRMSTS_FLAG_NONE; /* Clear all. */
-                    AudioMixBufClear(&pHstStrmOut->MixBuf);
-
-                    LogFunc(("[%s] Disabled stream\n", pHstStrmOut->MixBuf.pszName));
-                }
-                else
-                    LogFlowFunc(("[%s] Backend vetoed disabling output stream, rc=%Rrc\n", pHstStrmOut->MixBuf.pszName, rc));
-            }
-            else
-                rc = VINF_SUCCESS;
-
-            break;
-        }
-
-        case PDMAUDIOSTREAMCMD_PAUSE:
-        {
-            if (!(pHstStrmOut->fStatus & PDMAUDIOSTRMSTS_FLAG_PAUSED))
-            {
-                Assert(pHstStrmOut->fStatus & PDMAUDIOSTRMSTS_FLAG_ENABLED);
-                rc = pThis->pHostDrvAudio->pfnControlOut(pThis->pHostDrvAudio, pHstStrmOut, PDMAUDIOSTREAMCMD_PAUSE);
-                if (RT_SUCCESS(rc))
-                {
-                    pHstStrmOut->fStatus |= PDMAUDIOSTRMSTS_FLAG_PAUSED;
-                    LogFunc(("[%s] Pausing stream\n", pHstStrmOut->MixBuf.pszName));
-                }
-                else
-                    LogFlowFunc(("[%s] Backend vetoed pausing output stream, rc=%Rrc\n", pHstStrmOut->MixBuf.pszName, rc));
-            }
-            else
-                rc = VINF_SUCCESS;
-
-            break;
-        }
-
-        case PDMAUDIOSTREAMCMD_RESUME:
-        {
-            if (pHstStrmOut->fStatus & PDMAUDIOSTRMSTS_FLAG_PAUSED)
-            {
-                Assert(pHstStrmOut->fStatus & PDMAUDIOSTRMSTS_FLAG_ENABLED);
-                rc = pThis->pHostDrvAudio->pfnControlOut(pThis->pHostDrvAudio, pHstStrmOut, PDMAUDIOSTREAMCMD_RESUME);
-                if (RT_SUCCESS(rc))
-                {
-                    pHstStrmOut->fStatus &= ~PDMAUDIOSTRMSTS_FLAG_PAUSED;
-                    LogFunc(("[%s] Resumed stream\n", pHstStrmOut->MixBuf.pszName));
-                }
-                else
-                    LogFlowFunc(("[%s] Backend vetoed resuming output stream, rc=%Rrc\n", pHstStrmOut->MixBuf.pszName, rc));
-            }
-            else
-                rc = VINF_SUCCESS;
-
-            break;
-        }
-
-        default:
-            AssertMsgFailed(("Command %ld not implemented\n", enmStreamCmd));
-            rc = VERR_NOT_IMPLEMENTED;
-            break;
-    }
-
-    int rc2 = RTCritSectLeave(&pHstStrmOut->CritSect);
-    if (RT_SUCCESS(rc))
-        rc = rc2;
-
-    return rc;
-}
-
-int drvAudioDestroyHstOut(PDRVAUDIO pThis, PPDMAUDIOHSTSTRMOUT pHstStrmOut)
-{
-    AssertPtrReturn(pThis, VERR_INVALID_POINTER);
-    AssertPtrReturn(pHstStrmOut, VERR_INVALID_POINTER);
-
-    LogFlowFunc(("%s\n", pHstStrmOut->MixBuf.pszName));
-
-    int rc;
-    if (RTListIsEmpty(&pHstStrmOut->lstGstStrmOut))
-    {
-        rc = pThis->pHostDrvAudio->pfnFiniOut(pThis->pHostDrvAudio, pHstStrmOut);
-        if (RT_SUCCESS(rc))
-        {
-            drvAudioHstOutFreeRes(pHstStrmOut);
-
-            /* Remove from driver instance list. */
-            RTListNodeRemove(&pHstStrmOut->Node);
-
-            if (RTCritSectIsInitialized(&pHstStrmOut->CritSect))
-            {
-                int rc2 = RTCritSectDelete(&pHstStrmOut->CritSect);
-                AssertRC(rc2);
-            }
-
-            RTMemFree(pHstStrmOut);
-            pThis->cFreeOutputStreams++;
-            return VINF_SUCCESS;
-        }
-    }
-    else
-    {
-        rc = VERR_ACCESS_DENIED;
-        LogFlowFunc(("[%s] Still is being used, rc=%Rrc\n", pHstStrmOut->MixBuf.pszName, rc));
-    }
-
-    return rc;
-}
-
-int drvAudioDestroyGstOut(PDRVAUDIO pThis, PPDMAUDIOGSTSTRMOUT pGstStrmOut)
-{
-    AssertPtrReturn(pThis, VERR_INVALID_POINTER);
-
-    if (!pGstStrmOut)
-        return VINF_SUCCESS;
-
-    if (pGstStrmOut->State.cRefs > 1) /* Do other objects still have a reference to it? Bail out. */
-        return VERR_WRONG_ORDER;
-
-    drvAudioGstOutFreeRes(pGstStrmOut);
-
-    if (pGstStrmOut->pHstStrmOut)
-    {
-        /* Unregister from parent first. */
-        RTListNodeRemove(&pGstStrmOut->Node);
-
-        /* Try destroying the associated host output stream. This could
-         * be skipped if there are other guest output streams with this
-         * host stream. */
-        drvAudioDestroyHstOut(pThis, pGstStrmOut->pHstStrmOut);
-    }
-
-    RTMemFree(pGstStrmOut);
-
-    return VINF_SUCCESS;
-}
-
-PPDMAUDIOHSTSTRMIN drvAudioFindNextHstIn(PDRVAUDIO pThis, PPDMAUDIOHSTSTRMIN pHstStrmIn)
-{
-    if (pHstStrmIn)
-    {
-        if (RTListNodeIsLast(&pThis->lstHstStrmIn, &pHstStrmIn->Node))
-            return NULL;
-
-        return RTListNodeGetNext(&pHstStrmIn->Node, PDMAUDIOHSTSTRMIN, Node);
-    }
-
-    return RTListGetFirst(&pThis->lstHstStrmIn, PDMAUDIOHSTSTRMIN, Node);
-}
-
-PPDMAUDIOHSTSTRMIN drvAudioFindNextEnabledHstIn(PDRVAUDIO pThis, PPDMAUDIOHSTSTRMIN pHstStrmIn)
-{
-    while ((pHstStrmIn = drvAudioFindNextHstIn(pThis, pHstStrmIn)))
-        if (pHstStrmIn->fStatus & PDMAUDIOSTRMSTS_FLAG_ENABLED)
-            return pHstStrmIn;
-
-    return NULL;
-}
-
-PPDMAUDIOHSTSTRMIN drvAudioFindNextEqHstIn(PDRVAUDIO pThis, PPDMAUDIOHSTSTRMIN pHstStrmIn,
-                                           PPDMAUDIOSTREAMCFG pCfg)
-{
-    while ((pHstStrmIn = drvAudioFindNextHstIn(pThis, pHstStrmIn)))
-        if (drvAudioPCMPropsAreEqual(&pHstStrmIn->Props, pCfg))
-            return pHstStrmIn;
-
-    return NULL;
-}
-
-static int drvAudioHstInAdd(PDRVAUDIO pThis, const char *pszName, PPDMAUDIOSTREAMCFG pCfg, PDMAUDIORECSOURCE enmRecSource,
-                            PPDMAUDIOHSTSTRMIN *ppHstStrmIn)
-{
-    AssertPtrReturn(pThis, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
-    AssertPtrReturn(ppHstStrmIn, VERR_INVALID_POINTER);
-
-    PPDMAUDIOHSTSTRMIN pHstStrmIn;
-    int rc = drvAudioAllocHstIn(pThis, pszName, pCfg, enmRecSource, &pHstStrmIn);
-    if (RT_SUCCESS(rc))
-        *ppHstStrmIn = pHstStrmIn;
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-int drvAudioGstOutInit(PPDMAUDIOGSTSTRMOUT pGstStrmOut, PPDMAUDIOHSTSTRMOUT pHostStrmOut,
-                       const char *pszName, PPDMAUDIOSTREAMCFG pCfg)
-{
-    AssertPtrReturn(pGstStrmOut,  VERR_INVALID_POINTER);
-    AssertPtrReturn(pHostStrmOut, VERR_INVALID_POINTER);
-    AssertPtrReturn(pszName,      VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg,         VERR_INVALID_POINTER);
-
-    int rc = DrvAudioStreamCfgToProps(pCfg, &pGstStrmOut->Props);
-    if (RT_SUCCESS(rc))
-    {
-        char *pszTemp;
-        if (RTStrAPrintf(&pszTemp, "%s (Guest)", pszName) <= 0)
-            return VERR_NO_MEMORY;
-
-        rc = AudioMixBufInit(&pGstStrmOut->MixBuf, pszTemp, &pGstStrmOut->Props, AudioMixBufSize(&pHostStrmOut->MixBuf));
-        if (RT_SUCCESS(rc))
-            rc = AudioMixBufLinkTo(&pGstStrmOut->MixBuf, &pHostStrmOut->MixBuf);
-
-        RTStrFree(pszTemp);
-
-        if (RT_SUCCESS(rc))
-        {
-            pGstStrmOut->State.cRefs   = 1;
-            pGstStrmOut->State.fActive = false;
-            pGstStrmOut->State.fEmpty  = true;
-
-            pGstStrmOut->State.pszName = RTStrDup(pszName);
-            if (!pGstStrmOut->State.pszName)
-                return VERR_NO_MEMORY;
-
-            pGstStrmOut->pHstStrmOut = pHostStrmOut;
-        }
-    }
-
-    LogFlowFunc(("pszName=%s, rc=%Rrc\n", pszName, rc));
-    return rc;
-}
-
-int drvAudioAllocHstOut(PDRVAUDIO pThis, const char *pszName, PPDMAUDIOSTREAMCFG pCfg, PPDMAUDIOHSTSTRMOUT *ppHstStrmOut)
-{
-    AssertPtrReturn(pThis, VERR_INVALID_POINTER);
-    AssertPtrReturn(pszName, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
-
-    if (!pThis->cFreeOutputStreams)
-    {
-        LogFlowFunc(("Maximum number of host output streams reached\n"));
-        return VERR_NO_MORE_HANDLES;
-    }
-
-    /* Validate backend configuration. */
-    if (!pThis->BackendCfg.cbStreamOut)
-    {
-        LogFlowFunc(("Backend output configuration not valid, bailing out\n"));
-        return VERR_INVALID_PARAMETER;
-    }
-
-    PPDMAUDIOHSTSTRMOUT pHstStrmOut = (PPDMAUDIOHSTSTRMOUT)RTMemAllocZ(pThis->BackendCfg.cbStreamOut);
-    if (!pHstStrmOut)
-    {
-        LogFlowFunc(("Error allocating host output stream with %zu bytes\n",
-                     pThis->BackendCfg.cbStreamOut));
-        return VERR_NO_MEMORY;
-    }
-
-    int rc;
-    bool fInitialized = false;
-
-    do
-    {
-        RTListInit(&pHstStrmOut->lstGstStrmOut);
-
-        uint32_t cSamples;
-        rc = pThis->pHostDrvAudio->pfnInitOut(pThis->pHostDrvAudio, pHstStrmOut, pCfg, &cSamples);
-        if (RT_FAILURE(rc))
-        {
-            LogFlowFunc(("Initializing host backend failed with rc=%Rrc\n", rc));
-            break;
-        }
-
-        fInitialized = true;
-
-        char *pszTemp;
-        if (RTStrAPrintf(&pszTemp, "%s (Host)", pszName) <= 0)
-        {
-            rc = VERR_NO_MEMORY;
-            break;
-        }
-
-        rc = AudioMixBufInit(&pHstStrmOut->MixBuf, pszTemp, &pHstStrmOut->Props, cSamples);
-        if (RT_SUCCESS(rc))
-            rc = RTCritSectInit(&pHstStrmOut->CritSect);
-
-        if (RT_SUCCESS(rc))
-        {
-            RTListPrepend(&pThis->lstHstStrmOut, &pHstStrmOut->Node);
-            pThis->cFreeOutputStreams--;
-        }
-
-        RTStrFree(pszTemp);
-
-    } while (0);
-
-    if (RT_FAILURE(rc))
-    {
-        if (fInitialized)
-        {
-            int rc2 = pThis->pHostDrvAudio->pfnFiniOut(pThis->pHostDrvAudio, pHstStrmOut);
-            AssertRC(rc2);
-        }
-
-        drvAudioHstOutFreeRes(pHstStrmOut);
-        RTMemFree(pHstStrmOut);
-    }
-    else
-        *ppHstStrmOut = pHstStrmOut;
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-int drvAudioCreateStreamPairOut(PDRVAUDIO pThis, const char *pszName,
-                                PPDMAUDIOSTREAMCFG pCfg, PPDMAUDIOGSTSTRMOUT *ppGstStrmOut)
-{
-    AssertPtrReturn(pThis, VERR_INVALID_POINTER);
-    AssertPtrReturn(pszName, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
-
-    /*
-     * Try figuring out which audio stream configuration this backend
-     * should use. If fixed output is enabled the backend will be tied
-     * to a fixed rate (in Hz, among other parameters), regardless of
-     * what the backend could do else.
-     */
-    PPDMAUDIOSTREAMCFG pBackendCfg;
-    if (conf.fixed_out.enabled)
-        pBackendCfg = &conf.fixed_out.settings;
-    else
-        pBackendCfg = pCfg;
-
-    AssertPtrReturn(pBackendCfg, VERR_INVALID_POINTER);
-
-    LogFlowFunc(("Using fixed audio output settings: %RTbool\n",
-                 RT_BOOL(conf.fixed_out.enabled)));
-
-    PPDMAUDIOGSTSTRMOUT pGstStrmOut =
-        (PPDMAUDIOGSTSTRMOUT)RTMemAllocZ(sizeof(PDMAUDIOGSTSTRMOUT));
-    if (!pGstStrmOut)
-    {
-        LogFlowFunc(("Failed to allocate memory for guest output stream \"%s\"\n", pszName));
-        return VERR_NO_MEMORY;
-    }
-
-    /*
-     * The host stream always will get the backend audio stream configuration.
-     */
-    PPDMAUDIOHSTSTRMOUT pHstStrmOut;
-    int rc = drvAudioAddHstOut(pThis, pszName, pBackendCfg, &pHstStrmOut);
-    if (RT_FAILURE(rc))
-    {
-        LogFlowFunc(("Error adding host output stream \"%s\", rc=%Rrc\n", pszName, rc));
-
-        RTMemFree(pGstStrmOut);
-        return rc;
-    }
-
-    /*
-     * The guest stream always will get the audio stream configuration told
-     * by the device emulation (which in turn was/could be set by the guest OS).
-     */
-    rc = drvAudioGstOutInit(pGstStrmOut, pHstStrmOut, pszName, pCfg);
-    if (RT_SUCCESS(rc))
-    {
-        RTListPrepend(&pHstStrmOut->lstGstStrmOut, &pGstStrmOut->Node);
-
-        if (ppGstStrmOut)
-            *ppGstStrmOut = pGstStrmOut;
-    }
-
-    if (RT_FAILURE(rc))
-        drvAudioDestroyGstOut(pThis, pGstStrmOut);
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static int drvAudioCreateStreamPairIn(PDRVAUDIO pThis, const char *pszName, PDMAUDIORECSOURCE enmRecSource,
-                                      PPDMAUDIOSTREAMCFG pCfg, PPDMAUDIOGSTSTRMIN *ppGstStrmIn)
-{
-    AssertPtrReturn(pThis, VERR_INVALID_POINTER);
-    AssertPtrReturn(pszName, VERR_INVALID_POINTER);
-
-/*
-     * Try figuring out which audio stream configuration this backend
-     * should use for the audio input data. If fixed input is enabled
-     * the backend will be tied to a fixed rate (in Hz, among other parameters),
-     * regardless of what the backend initially wanted to use.
-     */
-    PPDMAUDIOSTREAMCFG pBackendCfg;
-    if (conf.fixed_in.enabled)
-        pBackendCfg = &conf.fixed_in.settings;
-    else
-        pBackendCfg = pCfg;
-
-    AssertPtrReturn(pBackendCfg, VERR_INVALID_POINTER);
-
-    LogFlowFunc(("Using fixed audio input settings: %RTbool\n",
-                 RT_BOOL(conf.fixed_in.enabled)));
-
-    PPDMAUDIOGSTSTRMIN pGstStrmIn = (PPDMAUDIOGSTSTRMIN)RTMemAllocZ(sizeof(PDMAUDIOGSTSTRMIN));
-    if (!pGstStrmIn)
-        return VERR_NO_MEMORY;
-
-    /*
-     * The host stream always will get the backend audio stream configuration.
-     */
-    PPDMAUDIOHSTSTRMIN pHstStrmIn;
-    int rc = drvAudioHstInAdd(pThis, pszName, pBackendCfg, enmRecSource, &pHstStrmIn);
-    if (RT_FAILURE(rc))
-    {
-        LogFunc(("Failed to add host audio input stream \"%s\", rc=%Rrc\n", pszName, rc));
-
-        RTMemFree(pGstStrmIn);
-        return rc;
-    }
-
-    /*
-     * The guest stream always will get the audio stream configuration told
-     * by the device emulation (which in turn was/could be set by the guest OS).
-     */
-    rc = drvAudioGstInInit(pGstStrmIn, pHstStrmIn, pszName, pCfg);
-    if (RT_SUCCESS(rc))
-    {
-        pHstStrmIn->pGstStrmIn = pGstStrmIn;
-
-        if (ppGstStrmIn)
-            *ppGstStrmIn = pGstStrmIn;
-    }
-    else
-        drvAudioDestroyGstIn(pThis, pGstStrmIn);
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-/**
- * Initializes a guest input stream.
- *
- * @return  IPRT status code.
- * @param   pGstStrmIn          Pointer to guest stream to initialize.
- * @param   pHstStrmIn          Pointer to host input stream to associate this guest
- *                              stream with.
- * @param   pszName             Pointer to stream name to use for this stream.
- * @param   pCfg                Pointer to stream configuration to use.
- */
-int drvAudioGstInInit(PPDMAUDIOGSTSTRMIN pGstStrmIn, PPDMAUDIOHSTSTRMIN pHstStrmIn,
-                      const char *pszName, PPDMAUDIOSTREAMCFG pCfg)
-{
-    AssertPtrReturn(pGstStrmIn, VERR_INVALID_POINTER);
-    AssertPtrReturn(pHstStrmIn, VERR_INVALID_POINTER);
-    AssertPtrReturn(pszName, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
-
-    int rc = DrvAudioStreamCfgToProps(pCfg, &pGstStrmIn->Props);
-    if (RT_SUCCESS(rc))
-    {
-        char *pszTemp;
-        if (RTStrAPrintf(&pszTemp, "%s (Guest)", pszName) <= 0)
-            return VERR_NO_MEMORY;
-
-        rc = AudioMixBufInit(&pGstStrmIn->MixBuf, pszTemp, &pGstStrmIn->Props, AudioMixBufSize(&pHstStrmIn->MixBuf));
-        if (RT_SUCCESS(rc))
-            rc = AudioMixBufLinkTo(&pHstStrmIn->MixBuf, &pGstStrmIn->MixBuf);
-
-        RTStrFree(pszTemp);
-
-        if (RT_SUCCESS(rc))
-        {
-#ifdef DEBUG
-            drvAudioStreamCfgPrint(pCfg);
-#endif
-            pGstStrmIn->State.cRefs   = 1;
-            pGstStrmIn->State.fActive = false;
-            pGstStrmIn->State.fEmpty  = true;
-
-            pGstStrmIn->State.pszName = RTStrDup(pszName);
-            if (!pGstStrmIn->State.pszName)
-                return VERR_NO_MEMORY;
-
-            pGstStrmIn->pHstStrmIn = pHstStrmIn;
-        }
-    }
-
-    LogFlowFunc(("pszName=%s, rc=%Rrc\n", pszName, rc));
-    return rc;
-}
-
-static int drvAudioAllocHstIn(PDRVAUDIO pThis, const char *pszName, PPDMAUDIOSTREAMCFG pCfg,
-                              PDMAUDIORECSOURCE enmRecSource, PPDMAUDIOHSTSTRMIN *ppHstStrmIn)
-{
-    if (!pThis->cFreeInputStreams)
-    {
-        LogFlowFunc(("No more input streams free to use, bailing out\n"));
-        return VERR_NO_MORE_HANDLES;
-    }
-
-    /* Validate backend configuration. */
-    if (!pThis->BackendCfg.cbStreamIn)
-    {
-        LogFlowFunc(("Backend input configuration not valid, bailing out\n"));
-        return VERR_INVALID_PARAMETER;
-    }
-
-    PPDMAUDIOHSTSTRMIN pHstStrmIn =
-        (PPDMAUDIOHSTSTRMIN)RTMemAllocZ(pThis->BackendCfg.cbStreamIn);
-    if (!pHstStrmIn)
-    {
-        LogFlowFunc(("Error allocating host innput stream with %RU32 bytes\n",
-                     pThis->BackendCfg.cbStreamOut));
-        return VERR_NO_MEMORY;
-    }
-
-    int rc;
-    bool fInitialized = false;
-
-    do
-    {
-        uint32_t cSamples;
-        rc = pThis->pHostDrvAudio->pfnInitIn(pThis->pHostDrvAudio, pHstStrmIn,
-                                             pCfg, enmRecSource, &cSamples);
-        if (RT_FAILURE(rc))
-        {
-            LogFlowFunc(("Initializing host backend failed with rc=%Rrc\n", rc));
-            break;
-        }
-
-        fInitialized = true;
-
-        char *pszTemp;
-        if (RTStrAPrintf(&pszTemp, "%s (Host)", pszName) <= 0)
-        {
-            rc = VERR_NO_MEMORY;
-            break;
-        }
-
-        rc = AudioMixBufInit(&pHstStrmIn->MixBuf, pszTemp, &pHstStrmIn->Props, cSamples);
-        if (RT_SUCCESS(rc))
-            rc = RTCritSectInit(&pHstStrmIn->CritSect);
-
-        if (RT_SUCCESS(rc))
-        {
-            RTListPrepend(&pThis->lstHstStrmIn, &pHstStrmIn->Node);
-            pThis->cFreeInputStreams--;
-        }
-
-        RTStrFree(pszTemp);
-
-    } while (0);
-
-    if (RT_FAILURE(rc))
-    {
-        if (fInitialized)
-        {
-            int rc2 = pThis->pHostDrvAudio->pfnFiniIn(pThis->pHostDrvAudio,
-                                                      pHstStrmIn);
-            AssertRC(rc2);
-        }
-
-        drvAudioHstInFreeRes(pHstStrmIn);
-        RTMemFree(pHstStrmIn);
-    }
-    else
-        *ppHstStrmIn = pHstStrmIn;
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-/**
- * Writes VM audio output data from the guest stream into the host stream.
- * The attached host driver backend then will play out the audio in a
- * later step then.
- *
- * @return  IPRT status code.
- * @return  int
- * @param   pThis
- * @param   pGstStrmOut
- * @param   pvBuf
- * @param   cbBuf
- * @param   pcbWritten
- */
-static DECLCALLBACK(int) drvAudioWrite(PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOGSTSTRMOUT pGstStrmOut,
-                                       const void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten)
-{
-    PDRVAUDIO pThis = PDMIAUDIOCONNECTOR_2_DRVAUDIO(pInterface);
-    AssertPtrReturn(pThis, VERR_INVALID_POINTER);
-
-    AssertPtrReturn(pGstStrmOut, VERR_INVALID_POINTER);
-    AssertPtrReturn(pvBuf,       VERR_INVALID_POINTER);
-    AssertReturn(cbBuf,          VERR_INVALID_PARAMETER);
-    /* pcbWritten is optional. */
-
-    int rc = RTCritSectEnter(&pThis->CritSect);
-    if (RT_FAILURE(rc))
-        return rc;
-
-    if (!pThis->pHostDrvAudio->pfnIsEnabled(pThis->pHostDrvAudio, PDMAUDIODIR_OUT))
-    {
-        rc = RTCritSectLeave(&pThis->CritSect);
-        AssertRC(rc);
-
-        return VERR_NOT_AVAILABLE;
-    }
-
-    PPDMAUDIOHSTSTRMOUT pHstStrmOut = pGstStrmOut->pHstStrmOut;
-    AssertPtrReturn(pHstStrmOut, VERR_INVALID_POINTER);
-
-    AssertMsg(pGstStrmOut->pHstStrmOut->fStatus & PDMAUDIOSTRMSTS_FLAG_ENABLED,
-              ("Writing to disabled host output stream \"%s\" not possible\n",
-              pHstStrmOut->MixBuf.pszName));
-
-    if (!AudioMixBufFreeBytes(&pGstStrmOut->MixBuf))
-    {
-        if (pcbWritten)
-            *pcbWritten = 0;
-
-        return RTCritSectLeave(&pThis->CritSect);
-    }
-
-    /*
-     * First, write data from the device emulation into our
-     * guest mixing buffer.
-     */
-    uint32_t cWritten;
-    rc = AudioMixBufWriteAt(&pGstStrmOut->MixBuf, 0 /* Offset in samples */, pvBuf, cbBuf, &cWritten);
-
-    /*
-     * Second, mix the guest mixing buffer with the host mixing
-     * buffer so that the host backend can play the data lateron.
-     */
-    uint32_t cMixed;
-    if (   RT_SUCCESS(rc)
-        && cWritten)
-    {
-        rc = AudioMixBufMixToParent(&pGstStrmOut->MixBuf, cWritten, &cMixed);
-    }
-    else
-        cMixed = 0;
-
-    if (RT_SUCCESS(rc))
-    {
-        /*
-         * Return the number of samples which actually have been mixed
-         * down to the parent, regardless how much samples were written
-         * into the children buffer.
-         */
-        if (pcbWritten)
-            *pcbWritten = AUDIOMIXBUF_S2B(&pGstStrmOut->MixBuf, cMixed);
-    }
-
-    LogFlowFunc(("%s -> %s: Written pvBuf=%p, cbBuf=%RU32, cWritten=%RU32 (%RU32 bytes), cMixed=%RU32, rc=%Rrc\n",
-                 pGstStrmOut->MixBuf.pszName, pHstStrmOut->MixBuf.pszName, pvBuf, cbBuf, cWritten,
-                 AUDIOMIXBUF_S2B(&pGstStrmOut->MixBuf, cWritten), cMixed, rc));
-
-    int rc2 = RTCritSectLeave(&pThis->CritSect);
-    if (RT_SUCCESS(rc))
-        rc = rc2;
-
-    return rc;
-}
-
-PPDMAUDIOHSTSTRMOUT drvAudioFindAnyHstOut(PDRVAUDIO pThis, PPDMAUDIOHSTSTRMOUT pHstStrmOut)
-{
-    if (pHstStrmOut)
-    {
-        if (RTListNodeIsLast(&pThis->lstHstStrmOut, &pHstStrmOut->Node))
-            return NULL;
-
-        return RTListNodeGetNext(&pHstStrmOut->Node, PDMAUDIOHSTSTRMOUT, Node);
-    }
-
-    return RTListGetFirst(&pThis->lstHstStrmOut, PDMAUDIOHSTSTRMOUT, Node);
-}
-
-PPDMAUDIOHSTSTRMOUT drvAudioHstFindAnyEnabledOut(PDRVAUDIO pThis, PPDMAUDIOHSTSTRMOUT pHostStrmOut)
-{
-    while ((pHostStrmOut = drvAudioFindAnyHstOut(pThis, pHostStrmOut)))
-    {
-        if (pHostStrmOut->fStatus & PDMAUDIOSTRMSTS_FLAG_ENABLED)
-            return pHostStrmOut;
-    }
-
-    return NULL;
-}
-
-PPDMAUDIOHSTSTRMOUT drvAudioFindSpecificOut(PDRVAUDIO pThis, PPDMAUDIOHSTSTRMOUT pHstStrmOut,
-                                            PPDMAUDIOSTREAMCFG pCfg)
-{
-    while ((pHstStrmOut = drvAudioFindAnyHstOut(pThis, pHstStrmOut)))
-    {
-        if (drvAudioPCMPropsAreEqual(&pHstStrmOut->Props, pCfg))
-            return pHstStrmOut;
-    }
-
-    return NULL;
-}
-
-int drvAudioDestroyHstIn(PDRVAUDIO pThis, PPDMAUDIOHSTSTRMIN pHstStrmIn)
-{
-    AssertPtrReturn(pThis, VERR_INVALID_POINTER);
-    AssertPtrReturn(pHstStrmIn, VERR_INVALID_POINTER);
-
-    LogFlowFunc(("%s\n", pHstStrmIn->MixBuf.pszName));
-
-    int rc;
-    if (!pHstStrmIn->pGstStrmIn) /* No parent anymore? */
-    {
-        rc = pThis->pHostDrvAudio->pfnFiniIn(pThis->pHostDrvAudio, pHstStrmIn);
-        if (RT_SUCCESS(rc))
-        {
-            drvAudioHstInFreeRes(pHstStrmIn);
-
-            if (RTCritSectIsInitialized(&pHstStrmIn->CritSect))
-            {
-                int rc2 = RTCritSectDelete(&pHstStrmIn->CritSect);
-                AssertRC(rc2);
-            }
-
-            /* Remove from driver instance list. */
-            RTListNodeRemove(&pHstStrmIn->Node);
-
-            RTMemFree(pHstStrmIn);
-            pThis->cFreeInputStreams++;
-        }
-    }
-    else
-    {
-        rc = VERR_ACCESS_DENIED;
-        LogFlowFunc(("[%s] Still is being used, rc=%Rrc\n", pHstStrmIn->MixBuf.pszName, rc));
-    }
-
-    return rc;
-}
-
-static int drvAudioDestroyGstIn(PDRVAUDIO pThis, PPDMAUDIOGSTSTRMIN pGstStrmIn)
-{
-    AssertPtrReturn(pThis, VERR_INVALID_POINTER);
-
-    LogFlowFunc(("%s\n", pGstStrmIn->MixBuf.pszName));
-
-    if (!pGstStrmIn)
-        return VINF_SUCCESS;
-
-    if (pGstStrmIn->State.cRefs > 1) /* Do other objects still have a reference to it? Bail out. */
-        return VERR_WRONG_ORDER;
-
-    drvAudioGstInFreeRes(pGstStrmIn);
-
-    if (pGstStrmIn->pHstStrmIn)
-    {
-        /* Unlink child. */
-        pGstStrmIn->pHstStrmIn->pGstStrmIn = NULL;
-
-        /* Try destroying the associated host input stream. This could
-         * be skipped if there are other guest input streams with this
-         * host stream. */
-        drvAudioDestroyHstIn(pThis, pGstStrmIn->pHstStrmIn);
-    }
-
-    RTMemFree(pGstStrmIn);
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) drvAudioQueryStatus(PPDMIAUDIOCONNECTOR pInterface,
-                                             uint32_t *pcbAvailIn, uint32_t *pcbFreeOut,
-                                             uint32_t *pcSamplesLive)
-{
-    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
-    /* pcbAvailIn is optional. */
-    /* pcbFreeOut is optional. */
-    /* pcSamplesLive is optional. */
-
-    PDRVAUDIO pThis = PDMIAUDIOCONNECTOR_2_DRVAUDIO(pInterface);
-
-    int rc = RTCritSectEnter(&pThis->CritSect);
-    if (RT_FAILURE(rc))
-        return rc;
-
-    /*
-     * Playback.
-     */
-    uint32_t cSamplesLive = 0;
-    uint32_t cbFreeOut    = UINT32_MAX;
-
-    PPDMAUDIOHSTSTRMOUT pHstStrmOut = NULL;
-    while ((pHstStrmOut = drvAudioHstFindAnyEnabledOut(pThis, pHstStrmOut)))
-    {
-        cSamplesLive = AudioMixBufAvail(&pHstStrmOut->MixBuf);
-
-        /* Has this stream marked as disabled but there still were guest streams relying
-         * on it? Check if this stream now can be closed and do so, if possible. */
-        if (   (pHstStrmOut->fStatus & PDMAUDIOSTRMSTS_FLAG_PENDING_DISABLE)
-            && !cSamplesLive)
-        {
-            /* Stop playing the current (pending) stream. */
-            int rc2 = drvAudioControlHstOut(pThis, pHstStrmOut, PDMAUDIOSTREAMCMD_DISABLE);
-            if (RT_SUCCESS(rc2))
-            {
-                pHstStrmOut->fStatus &= ~PDMAUDIOSTRMSTS_FLAG_PENDING_DISABLE;
-
-                LogFunc(("[%s] Disabling stream\n", pHstStrmOut->MixBuf.pszName));
-            }
-            else
-                LogFunc(("[%s] Backend vetoed against closing output stream, rc=%Rrc\n", pHstStrmOut->MixBuf.pszName, rc2));
-
-            continue;
-        }
-
-        LogFlowFunc(("[%s] cSamplesLive=%RU32\n", pHstStrmOut->MixBuf.pszName, cSamplesLive));
-
-        /*
-         * No live samples to play at the moment?
-         *
-         * Tell the device emulation for each connected guest stream how many
-         * bytes are free so that the device emulation can continue writing data to
-         * these streams.
-         */
-        PPDMAUDIOGSTSTRMOUT pGstStrmOut;
-        uint32_t cbFree2 = UINT32_MAX;
-        RTListForEach(&pHstStrmOut->lstGstStrmOut, pGstStrmOut, PDMAUDIOGSTSTRMOUT, Node)
-        {
-            if (pGstStrmOut->State.fActive)
-            {
-                /* Tell the sound device emulation how many samples are free
-                 * so that it can start writing PCM data to us. */
-                cbFree2 = RT_MIN(cbFree2, AUDIOMIXBUF_S2B_RATIO(&pGstStrmOut->MixBuf,
-                                                                AudioMixBufFree(&pGstStrmOut->MixBuf)));
-#ifdef DEBUG_andy
-                LogFlowFunc(("\t[%s] cbFreeOut=%RU32\n", pGstStrmOut->MixBuf.pszName, cbFree2));
-#endif
-            }
-        }
-
-        cbFreeOut = RT_MIN(cbFreeOut, cbFree2);
-    }
-
-    /*
-     * Recording.
-     */
-    uint32_t cbAvailIn = 0;
-
-    PPDMAUDIOHSTSTRMIN pHstStrmIn = NULL;
-    while ((pHstStrmIn = drvAudioFindNextEnabledHstIn(pThis, pHstStrmIn)))
-    {
-        /* Call the host backend to capture the audio input data. */
-        uint32_t cSamplesCaptured;
-        int rc2 = pThis->pHostDrvAudio->pfnCaptureIn(pThis->pHostDrvAudio, pHstStrmIn,
-                                                     &cSamplesCaptured);
-        if (RT_FAILURE(rc2))
-            continue;
-
-        PPDMAUDIOGSTSTRMIN pGstStrmIn = pHstStrmIn->pGstStrmIn;
-        AssertPtrBreak(pGstStrmIn);
-
-        if (pGstStrmIn->State.fActive)
-        {
-            cbAvailIn = RT_MAX(cbAvailIn, AUDIOMIXBUF_S2B(&pHstStrmIn->MixBuf,
-                                                          AudioMixBufMixed(&pHstStrmIn->MixBuf)));
-#ifdef DEBUG_andy
-            LogFlowFunc(("\t[%s] cbAvailIn=%RU32\n", pHstStrmIn->MixBuf.pszName, cbAvailIn));
-#endif
-        }
-    }
-
-    if (RT_SUCCESS(rc))
-    {
-        if (cbFreeOut == UINT32_MAX)
-            cbFreeOut = 0;
-
-        if (pcbAvailIn)
-            *pcbAvailIn = cbAvailIn;
-
-        if (pcbFreeOut)
-            *pcbFreeOut = cbFreeOut;
-
-        if (pcSamplesLive)
-            *pcSamplesLive = cSamplesLive;
-    }
-
-    int rc2 = RTCritSectLeave(&pThis->CritSect);
-    if (RT_SUCCESS(rc))
-        rc = rc2;
-
-    if (RT_FAILURE(rc))
-        LogFlowFuncLeaveRC(rc);
-
-    return rc;
-}
-
-static DECLCALLBACK(int) drvAudioPlayOut(PPDMIAUDIOCONNECTOR pInterface, uint32_t *pcSamplesPlayed)
-{
-    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
-    /* pcSamplesPlayed is optional. */
-
-    PDRVAUDIO pThis = PDMIAUDIOCONNECTOR_2_DRVAUDIO(pInterface);
-
-    int rc = RTCritSectEnter(&pThis->CritSect);
-    if (RT_FAILURE(rc))
-        return rc;
-
-    /* Backend output (temporarily) disabled / unavailable? */
-    if (!pThis->pHostDrvAudio->pfnIsEnabled(pThis->pHostDrvAudio, PDMAUDIODIR_OUT))
-    {
-        rc = pThis->pHostDrvAudio->pfnGetConf(pThis->pHostDrvAudio, &pThis->BackendCfg);
-        AssertRC(rc);
-
-        if (!pThis->BackendCfg.cMaxHstStrmsOut)
-        {
-            int rc2 = RTCritSectLeave(&pThis->CritSect);
-            AssertRC(rc2);
-
-            return VERR_NOT_AVAILABLE;
-        }
-    }
-
-    /*
-     * Process all enabled host output streams.
-     */
-    uint32_t            cSamplesPlayedMax = 0;
-    PPDMAUDIOHSTSTRMOUT pHstStrmOut       = NULL;
-    while ((pHstStrmOut = drvAudioHstFindAnyEnabledOut(pThis, pHstStrmOut)))
-    {
-#if 0
-        uint32_t cStreamsLive;
-        uint32_t cSamplesLive = drvAudioHstOutSamplesLive(pHstStrmOut, &cStreamsLive);
-        if (!cStreamsLive)
-            cSamplesLive = 0;
-
-        /* Has this stream marked as disabled but there still were guest streams relying
-         * on it? Check if this stream now can be closed and do so, if possible. */
-        if (   pHstStrmOut->fPendingDisable
-            && !cStreamsLive)
-        {
-            /* Stop playing the current (pending) stream. */
-            int rc2 = pThis->pHostDrvAudio->pfnControlOut(pThis->pHostDrvAudio, pHstStrmOut,
-                                                          PDMAUDIOSTREAMCMD_DISABLE);
-            if (RT_SUCCESS(rc2))
-            {
-                pHstStrmOut->fEnabled        = false;
-                pHstStrmOut->fPendingDisable = false;
-
-                LogFunc(("\t%p: Disabling stream\n", pHstStrmOut));
-            }
-            else
-                LogFunc(("\t%p: Backend vetoed against closing output stream, rc=%Rrc\n",
-                         pHstStrmOut, rc2));
-
-            continue;
-        }
-#endif
-
-        uint32_t cSamplesPlayed = 0;
-        int rc2 = pThis->pHostDrvAudio->pfnPlayOut(pThis->pHostDrvAudio, pHstStrmOut, &cSamplesPlayed);
-        if (RT_FAILURE(rc2))
-        {
-            rc2 = pThis->pHostDrvAudio->pfnControlOut(pThis->pHostDrvAudio, pHstStrmOut, PDMAUDIOSTREAMCMD_DISABLE);
-            AssertRC(rc2);
-        }
-        else
-            cSamplesPlayedMax = RT_MAX(cSamplesPlayed, cSamplesPlayedMax);
-
-        LogFlowFunc(("\t[%s] cSamplesPlayed=%RU32, cSamplesPlayedMax=%RU32, rc=%Rrc\n",
-                     pHstStrmOut->MixBuf.pszName, cSamplesPlayed, cSamplesPlayedMax, rc2));
-
-        bool fNeedsCleanup = false;
-
-        PPDMAUDIOGSTSTRMOUT pGstStrmOut;
-        RTListForEach(&pHstStrmOut->lstGstStrmOut, pGstStrmOut, PDMAUDIOGSTSTRMOUT, Node)
-        {
-            if (   !pGstStrmOut->State.fActive
-                && pGstStrmOut->State.fEmpty)
-                continue;
-
-            if (AudioMixBufIsEmpty(&pGstStrmOut->MixBuf))
-            {
-                pGstStrmOut->State.fEmpty = true;
-                fNeedsCleanup |= !pGstStrmOut->State.fActive;
-            }
-        }
-
-        if (fNeedsCleanup)
-        {
-            RTListForEach(&pHstStrmOut->lstGstStrmOut, pGstStrmOut, PDMAUDIOGSTSTRMOUT, Node)
-            {
-                if (!pGstStrmOut->State.fActive)
-                    drvAudioDestroyGstOut(pThis, pGstStrmOut);
-            }
-        }
-    }
-
-    if (RT_SUCCESS(rc))
-    {
-        if (pcSamplesPlayed)
-            *pcSamplesPlayed = cSamplesPlayedMax;
-    }
-
-    int rc2 = RTCritSectLeave(&pThis->CritSect);
-    if (RT_SUCCESS(rc))
-        rc = rc2;
-
-    if (RT_FAILURE(rc))
-        LogFlowFuncLeaveRC(rc);
-
-    return rc;
-}
-
-#ifdef VBOX_WITH_AUDIO_CALLBACKS
-static PPDMAUDIOCALLBACK drvAudioCallbackDuplicate(PPDMAUDIOCALLBACK pCB)
-{
-    PPDMAUDIOCALLBACK pCBCopy = (PPDMAUDIOCALLBACK)RTMemDup((void *)pCB, sizeof(PDMAUDIOCALLBACK));
-    if (!pCBCopy)
-        return NULL;
-
-    if (pCB->pvCtx)
-    {
-        pCBCopy->pvCtx = RTMemDup(pCB->pvCtx, pCB->cbCtx);
-        if (!pCBCopy->pvCtx)
-        {
-            RTMemFree(pCBCopy);
-            return NULL;
-        }
-
-        pCBCopy->cbCtx = pCB->cbCtx;
-    }
-
-    return pCBCopy;
-}
-
-static void drvAudioCallbackDestroy(PPDMAUDIOCALLBACK pCB)
-{
-    if (!pCB)
-        return;
-
-    RTListNodeRemove(&pCB->Node);
-    if (pCB->pvCtx)
-    {
-        Assert(pCB->cbCtx);
-        RTMemFree(pCB->pvCtx);
-    }
-    RTMemFree(pCB);
-}
-
-static DECLCALLBACK(int) drvAudioRegisterCallbacks(PPDMIAUDIOCONNECTOR pInterface,
-                                                   PPDMAUDIOCALLBACK paCallbacks, size_t cCallbacks)
-{
-    AssertPtrReturn(pInterface,  VERR_INVALID_POINTER);
-    AssertPtrReturn(paCallbacks, VERR_INVALID_POINTER);
-    AssertReturn(cCallbacks,     VERR_INVALID_PARAMETER);
-
-    PDRVAUDIO pThis = PDMIAUDIOCONNECTOR_2_DRVAUDIO(pInterface);
-
-    int rc = RTCritSectEnter(&pThis->CritSect);
-    if (RT_FAILURE(rc))
-        return rc;
-
-    for (size_t i = 0; i < cCallbacks; i++)
-    {
-        PPDMAUDIOCALLBACK pCB = drvAudioCallbackDuplicate(&paCallbacks[i]);
-        if (!pCB)
-        {
-            rc = VERR_NO_MEMORY;
-            break;
-        }
-
-        switch (pCB->enmType)
-        {
-            case PDMAUDIOCALLBACKTYPE_INPUT:
-                RTListAppend(&pThis->lstCBIn, &pCB->Node);
-                break;
-
-            case PDMAUDIOCALLBACKTYPE_OUTPUT:
-                RTListAppend(&pThis->lstCBOut, &pCB->Node);
-                break;
-
-            default:
-                AssertMsgFailed(("Not supported\n"));
-                break;
-        }
-    }
-
-    /** @todo Undo allocations on error. */
-
-    int rc2 = RTCritSectLeave(&pThis->CritSect);
-    if (RT_SUCCESS(rc))
-        rc = rc2;
-
-    return rc;
-}
-
-static DECLCALLBACK(int) drvAudioCallback(PPDMIAUDIOCONNECTOR pInterface, PDMAUDIOCALLBACKTYPE enmType,
-                                          void *pvUser, size_t cbUser)
-{
-    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
-    AssertPtrReturn(pvUser,     VERR_INVALID_POINTER);
-    AssertReturn(cbUser,        VERR_INVALID_PARAMETER);
-
-    PDRVAUDIO     pThis       = PDMIAUDIOCONNECTOR_2_DRVAUDIO(pInterface);
-    PRTLISTANCHOR pListAnchor = NULL;
-
-    switch (enmType)
-    {
-        case PDMAUDIOCALLBACKTYPE_INPUT:
-            pListAnchor = &pThis->lstCBIn;
-            break;
-
-        case PDMAUDIOCALLBACKTYPE_OUTPUT:
-            pListAnchor = &pThis->lstCBOut;
-            break;
-
-        default:
-            AssertMsgFailed(("Not supported\n"));
-            break;
-    }
-
-    if (pListAnchor)
-    {
-        PPDMAUDIOCALLBACK pCB;
-        RTListForEach(pListAnchor, pCB, PDMAUDIOCALLBACK, Node)
-        {
-            Assert(pCB->enmType == enmType);
-            pCB->pfnCallback(enmType, pCB->pvCtx, pCB->cbCtx, pvUser, cbUser);
-        }
-    }
-
-    return VINF_SUCCESS;
-}
-#endif
-
-static int drvAudioHostInit(PCFGMNODE pCfgHandle, PDRVAUDIO pThis)
-{
-    /* pCfgHandle is optional. */
-    AssertPtrReturn(pThis, VERR_INVALID_POINTER);
-
-    NOREF(pCfgHandle);
-
-    LogFlowFuncEnter();
-
-    AssertPtr(pThis->pHostDrvAudio);
-    int rc = pThis->pHostDrvAudio->pfnInit(pThis->pHostDrvAudio);
-    if (RT_FAILURE(rc))
-    {
-        LogFlowFunc(("Initialization of lower driver failed with rc=%Rrc\n", rc));
-        return rc;
-    }
-
-    /* Get the configuration data from backend. */
-    rc = pThis->pHostDrvAudio->pfnGetConf(pThis->pHostDrvAudio, &pThis->BackendCfg);
-    if (RT_FAILURE(rc))
-    {
-        LogFlowFunc(("Getting backend configuration failed with rc=%Rrc\n", rc));
-        return rc;
-    }
-
-    uint32_t cMaxHstStrmsOut = pThis->BackendCfg.cMaxHstStrmsOut;
-    size_t cbHstStrmsOut     = pThis->BackendCfg.cbStreamOut;
-
-    if (cbHstStrmsOut)
-    {
-        pThis->cFreeOutputStreams = cMaxHstStrmsOut;
-    }
-    else
-        pThis->cFreeOutputStreams = 0;
-
-    uint32_t cMaxHstStrmsIn = pThis->BackendCfg.cMaxHstStrmsIn;
-    size_t cbHstStrmIn      = pThis->BackendCfg.cbStreamIn;
-
-    if (cbHstStrmIn)
-    {
-        /*
-         * Note:
-         *  - Our AC'97 emulation has two inputs, line (ac97.pi) and microphone (ac97.mc).
-         *  - Our HDA emulation currently has only line input (hda.pi).
-         */
-        pThis->cFreeInputStreams = cMaxHstStrmsIn;
-    }
-    else
-        pThis->cFreeInputStreams = 0;
-
-    LogFlowFunc(("cMaxHstStrmsOut=%RU32 (cb=%zu), cMaxHstStrmsIn=%RU32 (cb=%zu)\n",
-                 cMaxHstStrmsOut, cbHstStrmsOut, cMaxHstStrmsIn, cbHstStrmIn));
-
-    LogFlowFunc(("cFreeInputStreams=%RU8, cFreeOutputStreams=%RU8\n",
-                 pThis->cFreeInputStreams, pThis->cFreeOutputStreams));
-
-    LogRel(("Audio: Host audio backend supports %RU32 output streams and %RU32 input streams at once\n",
-            /* Clamp for logging. Unlimited streams are defined by UINT32_MAX. */
-            RT_MIN(64, cMaxHstStrmsOut), RT_MIN(64, cMaxHstStrmsIn)));
-
-    LogFlowFuncLeave();
-    return VINF_SUCCESS;
-}
-
-static void drvAudioStateHandler(PPDMDRVINS pDrvIns, PDMAUDIOSTREAMCMD enmCmd)
-{
-    PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns);
-    PDRVAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIO);
-
-    LogFlowFunc(("enmCmd=%ld\n", enmCmd));
-
-    if (!pThis->pHostDrvAudio)
-        return;
-
-    PPDMAUDIOHSTSTRMOUT pHstStrmOut = NULL;
-    while ((pHstStrmOut = drvAudioHstFindAnyEnabledOut(pThis, pHstStrmOut)))
-        drvAudioControlHstOut(pThis, pHstStrmOut, enmCmd);
-
-    PPDMAUDIOHSTSTRMIN pHstStrmIn = NULL;
-    while ((pHstStrmIn = drvAudioFindNextEnabledHstIn(pThis, pHstStrmIn)))
-        drvAudioControlHstIn(pThis, pHstStrmIn, enmCmd);
-}
-
-static struct audio_option audio_options[] =
-{
-    /* DAC */
-    {"DACFixedSettings", AUD_OPT_BOOL, &conf.fixed_out.enabled,
-     "Use fixed settings for host DAC", NULL, 0},
-
-    {"DACFixedFreq", AUD_OPT_INT, &conf.fixed_out.settings.uHz,
-     "Frequency for fixed host DAC", NULL, 0},
-
-    {"DACFixedFmt", AUD_OPT_FMT, &conf.fixed_out.settings.enmFormat,
-     "Format for fixed host DAC", NULL, 0},
-
-    {"DACFixedChannels", AUD_OPT_INT, &conf.fixed_out.settings.cChannels,
-     "Number of channels for fixed DAC (1 - mono, 2 - stereo)", NULL, 0},
-
-    {"DACVoices", AUD_OPT_INT, &conf.fixed_out.cStreams, /** @todo Rename! */
-     "Number of streams for DAC", NULL, 0},
-
-    /* ADC */
-    {"ADCFixedSettings", AUD_OPT_BOOL, &conf.fixed_in.enabled,
-     "Use fixed settings for host ADC", NULL, 0},
-
-    {"ADCFixedFreq", AUD_OPT_INT, &conf.fixed_in.settings.uHz,
-     "Frequency for fixed host ADC", NULL, 0},
-
-    {"ADCFixedFmt", AUD_OPT_FMT, &conf.fixed_in.settings.enmFormat,
-     "Format for fixed host ADC", NULL, 0},
-
-    {"ADCFixedChannels", AUD_OPT_INT, &conf.fixed_in.settings.cChannels,
-     "Number of channels for fixed ADC (1 - mono, 2 - stereo)", NULL, 0},
-
-    {"ADCVoices", AUD_OPT_INT, &conf.fixed_in.cStreams, /** @todo Rename! */
-     "Number of streams for ADC", NULL, 0},
-
-    /* Misc */
-    {"TimerFreq", AUD_OPT_INT, &conf.period.hz,
-     "Timer frequency in Hz (0 - use lowest possible)", NULL, 0},
-
-    {"PLIVE", AUD_OPT_BOOL, &conf.plive,
-     "(undocumented)", NULL, 0}, /** @todo What is this? */
-
-    NULL
-};
-
-static DECLCALLBACK(int) drvAudioInit(PCFGMNODE pCfgHandle, PPDMDRVINS pDrvIns)
-{
-    AssertPtrReturn(pCfgHandle, VERR_INVALID_POINTER);
-    AssertPtrReturn(pDrvIns, VERR_INVALID_POINTER);
-
-    PDRVAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIO);
-    LogFlowFunc(("pDrvAudio=%p, pDrvIns=%p\n", pThis, pDrvIns));
-
-    RTListInit(&pThis->lstHstStrmIn);
-    RTListInit(&pThis->lstHstStrmOut);
-#ifdef VBOX_WITH_AUDIO_CALLBACKS
-    RTListInit(&pThis->lstCBIn);
-    RTListInit(&pThis->lstCBOut);
-#endif
-
-    int rc = RTCritSectInit(&pThis->CritSect);
-    if (RT_SUCCESS(rc))
-    {
-        rc = drvAudioProcessOptions(pCfgHandle, "AUDIO", audio_options);
-        /** @todo Check for invalid options? */
-
-        pThis->cFreeOutputStreams = conf.fixed_out.cStreams;
-        pThis->cFreeInputStreams  = conf.fixed_in.cStreams;
-
-        if (!pThis->cFreeOutputStreams)
-            pThis->cFreeOutputStreams = 1;
-
-        if (!pThis->cFreeInputStreams)
-            pThis->cFreeInputStreams = 1;
-    }
-
-    /*
-     * If everything went well, initialize the lower driver.
-     */
-    if (RT_SUCCESS(rc))
-        rc = drvAudioHostInit(pCfgHandle, pThis);
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(int) drvAudioRead(PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOGSTSTRMIN pGstStrmIn,
-                                      void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead)
-{
-    PDRVAUDIO pThis = PDMIAUDIOCONNECTOR_2_DRVAUDIO(pInterface);
-    AssertPtrReturn(pThis, VERR_INVALID_POINTER);
-
-    AssertPtrReturn(pGstStrmIn, VERR_INVALID_POINTER);
-    AssertPtrReturn(pvBuf,      VERR_INVALID_POINTER);
-    AssertReturn(cbBuf,         VERR_INVALID_PARAMETER);
-    /* pcbWritten is optional. */
-
-    int rc = RTCritSectEnter(&pThis->CritSect);
-    if (RT_FAILURE(rc))
-        return rc;
-
-    if (!pThis->pHostDrvAudio->pfnIsEnabled(pThis->pHostDrvAudio, PDMAUDIODIR_IN))
-    {
-        if (pcbRead)
-            *pcbRead = 0;
-
-        return RTCritSectLeave(&pThis->CritSect);
-    }
-
-    PPDMAUDIOHSTSTRMIN pHstStrmIn = pGstStrmIn->pHstStrmIn;
-    AssertPtrReturn(pHstStrmIn, VERR_INVALID_POINTER);
-
-    AssertMsg(pGstStrmIn->pHstStrmIn->fStatus & PDMAUDIOSTRMSTS_FLAG_ENABLED,
-              ("Reading from disabled host input stream \"%s\" not possible\n", pGstStrmIn->MixBuf.pszName));
-
-    /*
-     * Read from the parent buffer (that is, the guest buffer) which
-     * should have the audio data in the format the guest needs.
-     */
-    uint32_t cRead;
-    rc = AudioMixBufReadCirc(&pGstStrmIn->MixBuf, pvBuf, cbBuf, &cRead);
-    if (RT_SUCCESS(rc))
-    {
-        AudioMixBufFinish(&pGstStrmIn->MixBuf, cRead);
-
-        if (pcbRead)
-            *pcbRead = AUDIOMIXBUF_S2B(&pGstStrmIn->MixBuf, cRead);
-    }
-
-    LogFlowFunc(("cRead=%RU32 (%RU32 bytes), rc=%Rrc\n",
-                 cRead, AUDIOMIXBUF_S2B(&pGstStrmIn->MixBuf, cRead), rc));
-
-    int rc2 = RTCritSectLeave(&pThis->CritSect);
-    if (RT_SUCCESS(rc))
-        rc = rc2;
-
-    return rc;
-}
-
-static DECLCALLBACK(int) drvAudioEnableOut(PPDMIAUDIOCONNECTOR pInterface,
-                                           PPDMAUDIOGSTSTRMOUT pGstStrmOut, bool fEnable)
-{
-    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
-    /* pGstStrmOut is optional. */
-
-    PDRVAUDIO pThis = PDMIAUDIOCONNECTOR_2_DRVAUDIO(pInterface);
-
-    int rc = VINF_SUCCESS;
-
-    if (pGstStrmOut)
-    {
-        PPDMAUDIOHSTSTRMOUT pHstStrmOut = pGstStrmOut->pHstStrmOut;
-        AssertPtr(pHstStrmOut);
-
-        if (fEnable)
-        {
-            /* Is a pending disable outstanding? Then disable first. */
-            if (pHstStrmOut->fStatus & PDMAUDIOSTRMSTS_FLAG_PENDING_DISABLE)
-            {
-                rc = drvAudioControlHstOut(pThis, pHstStrmOut, PDMAUDIOSTREAMCMD_DISABLE);
-                if (RT_SUCCESS(rc))
-                    pHstStrmOut->fStatus &= ~PDMAUDIOSTRMSTS_FLAG_PENDING_DISABLE;
-            }
-
-            if (RT_SUCCESS(rc))
-                rc = drvAudioControlHstOut(pThis, pHstStrmOut, PDMAUDIOSTREAMCMD_ENABLE);
-        }
-        else /* Disable */
-        {
-            if (pHstStrmOut->fStatus & PDMAUDIOSTRMSTS_FLAG_ENABLED)
-            {
-                uint32_t cGstStrmsActive = 0;
-
-                /*
-                 * Check if there are any active guest streams assigned
-                 * to this host stream which still are being marked as active.
-                 *
-                 * In that case we have to defer closing the host stream and
-                 * wait until all guest streams have been finished.
-                 */
-                PPDMAUDIOGSTSTRMOUT pIter;
-                RTListForEach(&pHstStrmOut->lstGstStrmOut, pIter, PDMAUDIOGSTSTRMOUT, Node)
-                {
-                    if (pIter->State.fActive)
-                    {
-                        cGstStrmsActive++;
-                        break; /* At least one assigned & active guest stream is enough. */
-                    }
-                }
-
-                /* Do we need to defer closing the host stream? */
-                if (cGstStrmsActive >= 1)
-                    pHstStrmOut->fStatus |= PDMAUDIOSTRMSTS_FLAG_PENDING_DISABLE;
-
-                /* Can we close the host stream now instead of deferring it? */
-                if (!(pHstStrmOut->fStatus & PDMAUDIOSTRMSTS_FLAG_PENDING_DISABLE))
-                    rc = drvAudioControlHstOut(pThis, pHstStrmOut, PDMAUDIOSTREAMCMD_DISABLE);
-            }
-        }
-
-        if (RT_SUCCESS(rc))
-            pGstStrmOut->State.fActive = fEnable;
-
-        LogFlowFunc(("%s: fEnable=%RTbool, fStatus=0x%x, rc=%Rrc\n",
-                     pGstStrmOut->MixBuf.pszName, fEnable, pHstStrmOut->fStatus, rc));
-    }
-
-    return rc;
-}
-
-static DECLCALLBACK(int) drvAudioEnableIn(PPDMIAUDIOCONNECTOR pInterface,
-                                          PPDMAUDIOGSTSTRMIN pGstStrmIn, bool fEnable)
-{
-    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
-    /* pGstStrmIn is optional. */
-
-    PDRVAUDIO pThis = PDMIAUDIOCONNECTOR_2_DRVAUDIO(pInterface);
-
-    int rc = VINF_SUCCESS;
-
-    if (pGstStrmIn)
-    {
-        PPDMAUDIOHSTSTRMIN pHstStrmIn = pGstStrmIn->pHstStrmIn;
-        AssertPtr(pHstStrmIn);
-
-        LogFlowFunc(("%s: fEnable=%RTbool\n", pGstStrmIn->MixBuf.pszName, fEnable));
-
-        rc = drvAudioControlHstIn(pThis, pHstStrmIn,
-                                  fEnable ? PDMAUDIOSTREAMCMD_ENABLE : PDMAUDIOSTREAMCMD_DISABLE);
-        if (RT_SUCCESS(rc))
-            pGstStrmIn->State.fActive = fEnable;
-
-        LogFlowFunc(("%s: fEnable=%RTbool, rc=%Rrc\n", pGstStrmIn->MixBuf.pszName, fEnable, rc));
-    }
-
-    return rc;
-}
-
-static DECLCALLBACK(bool) drvAudioIsValidIn(PPDMIAUDIOCONNECTOR pInterface,
-                                            PPDMAUDIOGSTSTRMIN  pGstStrmIn)
-{
-    return (pGstStrmIn != NULL);
-}
-
-static DECLCALLBACK(bool) drvAudioIsValidOut(PPDMIAUDIOCONNECTOR pInterface,
-                                             PPDMAUDIOGSTSTRMOUT pGstStrmOut)
-{
-    return (pGstStrmOut != NULL);
-}
-
-static DECLCALLBACK(int) drvAudioCreateIn(PPDMIAUDIOCONNECTOR pInterface, const char *pszName,
-                                          PDMAUDIORECSOURCE enmRecSource, PPDMAUDIOSTREAMCFG pCfg,
-                                          PPDMAUDIOGSTSTRMIN *ppGstStrmIn)
-{
-    AssertPtrReturn(pInterface,  VERR_INVALID_POINTER);
-    AssertPtrReturn(ppGstStrmIn, VERR_INVALID_POINTER);
-    AssertPtrReturn(pszName,     VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg,        VERR_INVALID_POINTER);
-    AssertPtrReturn(ppGstStrmIn, VERR_INVALID_POINTER);
-
-    PDRVAUDIO pThis = PDMIAUDIOCONNECTOR_2_DRVAUDIO(pInterface);
-
-    int rc = RTCritSectEnter(&pThis->CritSect);
-    if (RT_FAILURE(rc))
-        return rc;
-
-    LogFlowFunc(("pszName=%s, pCfg=%p\n", pszName, pCfg));
-
-    if (!drvAudioStreamCfgIsValid(pCfg))
-    {
-        LogFunc(("Input stream configuration is not valid, bailing out\n"));
-        rc = VERR_INVALID_PARAMETER;
-    }
-
-    PPDMAUDIOGSTSTRMIN pGstStrmIn = *ppGstStrmIn;
-    if (   RT_SUCCESS(rc)
-        && pGstStrmIn
-        && drvAudioPCMPropsAreEqual(&pGstStrmIn->Props, pCfg))
-    {
-        LogFunc(("[%s] Exists and matches required configuration, skipping creation\n",
-                 pGstStrmIn->MixBuf.pszName));
-        rc = VWRN_ALREADY_EXISTS;
-    }
-
-    if (rc != VINF_SUCCESS) /* Note: Can be VWRN_ALREADY_EXISTS, so don't use VINF_SUCCESS here. */
-    {
-        int rc2 = RTCritSectLeave(&pThis->CritSect);
-        AssertRC(rc2);
-
-        return rc;
-    }
-
-    if (   !conf.fixed_in.enabled
-        && pGstStrmIn)
-    {
-        drvAudioDestroyGstIn(pThis, pGstStrmIn);
-        pGstStrmIn = NULL;
-    }
-
-    if (pGstStrmIn)
-    {
-        PPDMAUDIOHSTSTRMIN pHstStrmIn = pGstStrmIn->pHstStrmIn;
-        AssertPtr(pHstStrmIn);
-
-        drvAudioGstInFreeRes(pGstStrmIn);
-
-        char *pszTemp;
-        if (RTStrAPrintf(&pszTemp, "%s (Guest)", pszName) <= 0)
-        {
-            RTMemFree(pGstStrmIn);
-
-            int rc2 = RTCritSectLeave(&pThis->CritSect);
-            AssertRC(rc2);
-
-            return VERR_NO_MEMORY;
-        }
-
-        rc = drvAudioGstInInit(pGstStrmIn, pHstStrmIn, pszName, pCfg);
-
-        RTStrFree(pszTemp);
-    }
-    else
-        rc = drvAudioCreateStreamPairIn(pThis, pszName, enmRecSource, pCfg, &pGstStrmIn);
-
-    if (RT_SUCCESS(rc))
-    {
-        if (pGstStrmIn)
-            *ppGstStrmIn = pGstStrmIn;
-    }
-    else
-    {
-        switch (rc)
-        {
-            case VERR_NO_MORE_HANDLES: /** @todo Find a better rc. */
-                LogRel(("Audio: Skipping to create input stream \"%s\", " \
-                        "as the host audio backend reached its maximum of concurrent audio input streams\n", pszName));
-                break;
-
-            default:
-                break;
-        }
-    }
-
-    int rc2 = RTCritSectLeave(&pThis->CritSect);
-    if (RT_SUCCESS(rc))
-        rc = rc2;
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(int) drvAudioCreateOut(PPDMIAUDIOCONNECTOR pInterface, const char *pszName,
-                                           PPDMAUDIOSTREAMCFG pCfg, PPDMAUDIOGSTSTRMOUT *ppGstStrmOut)
-{
-    AssertPtrReturn(pInterface,   VERR_INVALID_POINTER);
-    AssertPtrReturn(pszName,      VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg,         VERR_INVALID_POINTER);
-    AssertPtrReturn(ppGstStrmOut, VERR_INVALID_POINTER);
-
-    PDRVAUDIO pThis = PDMIAUDIOCONNECTOR_2_DRVAUDIO(pInterface);
-
-    int rc = RTCritSectEnter(&pThis->CritSect);
-    if (RT_FAILURE(rc))
-        return rc;
-
-    LogFlowFunc(("pszName=%s, pCfg=%p\n", pszName, pCfg));
-
-    if (!drvAudioStreamCfgIsValid(pCfg))
-    {
-        LogFunc(("Output stream configuration is not valid, bailing out\n"));
-        rc = VERR_INVALID_PARAMETER;
-    }
-
-    PPDMAUDIOGSTSTRMOUT pGstStrmOut = *ppGstStrmOut;
-    if (   RT_SUCCESS(rc)
-        && pGstStrmOut
-        && drvAudioPCMPropsAreEqual(&pGstStrmOut->Props, pCfg))
-    {
-        LogFunc(("[%s] Exists and matches required configuration, skipping creation\n",
-                 pGstStrmOut->MixBuf.pszName));
-
-        rc = VWRN_ALREADY_EXISTS;
-    }
-
-    if (rc != VINF_SUCCESS) /* Note: Can be VWRN_ALREADY_EXISTS, so don't use VINF_SUCCESS here. */
-    {
-        int rc2 = RTCritSectLeave(&pThis->CritSect);
-        AssertRC(rc2);
-
-        return rc;
-    }
-
-#if 0
-    /* Any live samples that need to be updated after
-     * we set the new parameters? */
-    PPDMAUDIOGSTSTRMOUT pOldGstStrmOut = NULL;
-    uint32_t cLiveSamples = 0;
-
-    if (   conf.plive
-        && pGstStrmOut
-        && (   !pGstStrmOut->State.fActive
-            && !pGstStrmOut->State.fEmpty))
-    {
-        cLiveSamples = pGstStrmOut->cTotalSamplesWritten;
-        if (cLiveSamples)
-        {
-            pOldGstStrmOut = pGstStrmOut;
-            pGstStrmOut = NULL;
-        }
-    }
-#endif
-
-    if (   pGstStrmOut
-        && !conf.fixed_out.enabled)
-    {
-        drvAudioDestroyGstOut(pThis, pGstStrmOut);
-        pGstStrmOut = NULL;
-    }
-
-    if (pGstStrmOut)
-    {
-        PPDMAUDIOHSTSTRMOUT pHstStrmOut = pGstStrmOut->pHstStrmOut;
-        AssertPtr(pHstStrmOut);
-
-        drvAudioGstOutFreeRes(pGstStrmOut);
-
-        rc = drvAudioGstOutInit(pGstStrmOut, pHstStrmOut, pszName, pCfg);
-    }
-    else
-    {
-        rc = drvAudioCreateStreamPairOut(pThis, pszName, pCfg, &pGstStrmOut);
-        if (RT_FAILURE(rc))
-            LogFunc(("Failed to create output stream \"%s\", rc=%Rrc\n", pszName, rc));
-    }
-
-    if (RT_SUCCESS(rc))
-    {
-        if (pGstStrmOut)
-            *ppGstStrmOut = pGstStrmOut;
-#if 0
-        /* Update remaining live samples with new rate. */
-        if (cLiveSamples)
-        {
-            AssertPtr(pOldGstStrmOut);
-
-            uint32_t cSamplesMixed =
-                (cLiveSamples << pOldGstStrmOut->Props.cShift)
-                * pOldGstStrmOut->Props.cbPerSec
-                / (*ppGstStrmOut)->Props.cbPerSec;
-
-            pGstStrmOut->cTotalSamplesWritten += cSamplesMixed;
-        }
-#endif
-    }
-    else
-    {
-        switch (rc)
-        {
-            case VERR_NO_MORE_HANDLES: /** @todo Find a better rc. */
-                LogRel(("Audio: Skipping to create output stream \"%s\", " \
-                        "as the host audio backend reached its maximum of concurrent audio output streams\n", pszName));
-                break;
-
-            default:
-                break;
-        }
-    }
-
-    int rc2 = RTCritSectLeave(&pThis->CritSect);
-    if (RT_SUCCESS(rc))
-        rc = rc2;
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(int) drvAudioGetConfiguration(PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOBACKENDCFG pCfg)
-{
-    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg,       VERR_INVALID_POINTER);
-
-    PDRVAUDIO pThis = PDMIAUDIOCONNECTOR_2_DRVAUDIO(pInterface);
-
-    int rc = RTCritSectEnter(&pThis->CritSect);
-    if (RT_FAILURE(rc))
-        return rc;
-
-    rc = pThis->pHostDrvAudio->pfnGetConf(pThis->pHostDrvAudio, pCfg);
-
-    int rc2 = RTCritSectLeave(&pThis->CritSect);
-    if (RT_SUCCESS(rc))
-        rc = rc2;
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(bool) drvAudioIsActiveIn(PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOGSTSTRMIN pGstStrmIn)
-{
-    AssertPtrReturn(pInterface, false);
-    /* pGstStrmIn is optional. */
-
-    PDRVAUDIO pThis = PDMIAUDIOCONNECTOR_2_DRVAUDIO(pInterface);
-
-    int rc2 = RTCritSectEnter(&pThis->CritSect);
-    AssertRC(rc2);
-
-    bool fRet = pGstStrmIn ? pGstStrmIn->State.fActive : false;
-
-    rc2 = RTCritSectLeave(&pThis->CritSect);
-    AssertRC(rc2);
-
-    return fRet;
-}
-
-static DECLCALLBACK(bool) drvAudioIsActiveOut(PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOGSTSTRMOUT pGstStrmOut)
-{
-    AssertPtrReturn(pInterface,  false);
-    /* pGstStrmOut is optional. */
-
-    PDRVAUDIO pThis = PDMIAUDIOCONNECTOR_2_DRVAUDIO(pInterface);
-
-    int rc2 = RTCritSectEnter(&pThis->CritSect);
-    AssertRC(rc2);
-
-    bool fRet = pGstStrmOut ? pGstStrmOut->State.fActive : false;
-
-    rc2 = RTCritSectLeave(&pThis->CritSect);
-    AssertRC(rc2);
-
-    return fRet;
-}
-
-static DECLCALLBACK(void) drvAudioDestroyIn(PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOGSTSTRMIN pGstStrmIn)
-{
-    AssertPtrReturnVoid(pInterface);
-    /* pGstStrmIn is optional. */
-
-    PDRVAUDIO pThis = PDMIAUDIOCONNECTOR_2_DRVAUDIO(pInterface);
-
-    int rc2 = RTCritSectEnter(&pThis->CritSect);
-    AssertRC(rc2);
-
-    if (pGstStrmIn)
-        drvAudioDestroyGstIn(pThis, pGstStrmIn);
-
-    rc2 = RTCritSectLeave(&pThis->CritSect);
-    AssertRC(rc2);
-}
-
-static DECLCALLBACK(void) drvAudioDestroyOut(PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOGSTSTRMOUT pGstStrmOut)
-{
-    AssertPtrReturnVoid(pInterface);
-    /* pGstStrmOut is optional. */
-
-    PDRVAUDIO pThis = PDMIAUDIOCONNECTOR_2_DRVAUDIO(pInterface);
-
-    int rc2 = RTCritSectEnter(&pThis->CritSect);
-    AssertRC(rc2);
-
-    if (pGstStrmOut)
-        drvAudioDestroyGstOut(pThis, pGstStrmOut);
-
-    rc2 = RTCritSectLeave(&pThis->CritSect);
-    AssertRC(rc2);
-}
-
-/********************************************************************/
-
-/**
- * @interface_method_impl{PDMIBASE,pfnQueryInterface}
- */
-static DECLCALLBACK(void *) drvAudioQueryInterface(PPDMIBASE pInterface, const char *pszIID)
-{
-    LogFlowFunc(("pInterface=%p, pszIID=%s\n", pInterface, pszIID));
-
-    PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
-    PDRVAUDIO  pThis   = PDMINS_2_DATA(pDrvIns, PDRVAUDIO);
-
-    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase);
-    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIAUDIOCONNECTOR, &pThis->IAudioConnector);
-
-    return NULL;
-}
-
-/**
- * Power Off notification.
- *
- * @param   pDrvIns     The driver instance data.
- */
-static DECLCALLBACK(void) drvAudioPowerOff(PPDMDRVINS pDrvIns)
-{
-    LogFlowFuncEnter();
-    PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns);
-
-    PDRVAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIO);
-
-    if (!pThis->pHostDrvAudio)
-        return;
-
-    /* Tear down all host output streams. */
-    PPDMAUDIOHSTSTRMOUT pHstStrmOut = NULL;
-    while ((pHstStrmOut = drvAudioFindAnyHstOut(pThis, pHstStrmOut)))
-    {
-        drvAudioControlHstOut(pThis, pHstStrmOut, PDMAUDIOSTREAMCMD_DISABLE);
-        pThis->pHostDrvAudio->pfnFiniOut(pThis->pHostDrvAudio, pHstStrmOut);
-    }
-
-    /* Tear down all host input streams. */
-    PPDMAUDIOHSTSTRMIN pHstStrmIn = NULL;
-    while ((pHstStrmIn = drvAudioFindNextHstIn(pThis, pHstStrmIn)))
-    {
-        drvAudioControlHstIn(pThis, pHstStrmIn, PDMAUDIOSTREAMCMD_DISABLE);
-        pThis->pHostDrvAudio->pfnFiniIn(pThis->pHostDrvAudio, pHstStrmIn);
-    }
-
-    if (pThis->pHostDrvAudio->pfnShutdown)
-        pThis->pHostDrvAudio->pfnShutdown(pThis->pHostDrvAudio);
-
-#ifdef VBOX_WITH_AUDIO_CALLBACKS
-    PPDMAUDIOCALLBACK pCB, pCBNext;
-    RTListForEachSafe(&pThis->lstCBIn, pCB, pCBNext, PDMAUDIOCALLBACK, Node)
-        drvAudioCallbackDestroy(pCB);
-
-    RTListForEachSafe(&pThis->lstCBOut, pCB, pCBNext, PDMAUDIOCALLBACK, Node)
-        drvAudioCallbackDestroy(pCB);
-#endif
-
-    LogFlowFuncLeave();
-}
-
-/**
- * Constructs an audio driver instance.
- *
- * @copydoc FNPDMDRVCONSTRUCT
- */
-static DECLCALLBACK(int) drvAudioConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags)
-{
-    LogFlowFunc(("pDrvIns=%#p, pCfgHandle=%#p, fFlags=%x\n", pDrvIns, pCfgHandle, fFlags));
-
-    PDRVAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIO);
-    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
-
-    /*
-     * Init the static parts.
-     */
-    pThis->pDrvIns                                   = pDrvIns;
-    /* IBase. */
-    pDrvIns->IBase.pfnQueryInterface                 = drvAudioQueryInterface;
-    /* IAudioConnector. */
-    pThis->IAudioConnector.pfnQueryStatus            = drvAudioQueryStatus;
-    pThis->IAudioConnector.pfnRead                   = drvAudioRead;
-    pThis->IAudioConnector.pfnWrite                  = drvAudioWrite;
-    pThis->IAudioConnector.pfnGetConfiguration       = drvAudioGetConfiguration;
-    pThis->IAudioConnector.pfnIsActiveIn             = drvAudioIsActiveIn;
-    pThis->IAudioConnector.pfnIsActiveOut            = drvAudioIsActiveOut;
-    pThis->IAudioConnector.pfnIsValidIn              = drvAudioIsValidIn;
-    pThis->IAudioConnector.pfnIsValidOut             = drvAudioIsValidOut;
-    pThis->IAudioConnector.pfnEnableOut              = drvAudioEnableOut;
-    pThis->IAudioConnector.pfnEnableIn               = drvAudioEnableIn;
-    pThis->IAudioConnector.pfnDestroyIn              = drvAudioDestroyIn;
-    pThis->IAudioConnector.pfnDestroyOut             = drvAudioDestroyOut;
-    pThis->IAudioConnector.pfnCreateIn               = drvAudioCreateIn;
-    pThis->IAudioConnector.pfnCreateOut              = drvAudioCreateOut;
-    pThis->IAudioConnector.pfnPlayOut                = drvAudioPlayOut;
-#ifdef VBOX_WITH_AUDIO_CALLBACKS
-    pThis->IAudioConnector.pfnRegisterCallbacks      = drvAudioRegisterCallbacks;
-    pThis->IAudioConnector.pfnCallback               = drvAudioCallback;
-#endif
-
-    /*
-     * Attach driver below and query its connector interface.
-     */
-    PPDMIBASE pDownBase;
-    int rc = PDMDrvHlpAttach(pDrvIns, fFlags, &pDownBase);
-    if (RT_FAILURE(rc))
-    {
-        LogRel(("Audio: Failed to attach to driver %p below (flags=0x%x), rc=%Rrc\n",
-                pDrvIns, fFlags, rc));
-        return rc;
-    }
-
-    pThis->pHostDrvAudio = PDMIBASE_QUERY_INTERFACE(pDownBase, PDMIHOSTAUDIO);
-    if (!pThis->pHostDrvAudio)
-    {
-        LogRel(("Audio: Failed to query interface for underlying host driver\n"));
-        return PDMDRV_SET_ERROR(pDrvIns, VERR_PDM_MISSING_INTERFACE_BELOW,
-                                N_("Host audio backend missing or invalid"));
-    }
-
-#ifdef DEBUG_andy
-    CFGMR3Dump(pCfgHandle);
-#endif
-
-    rc = drvAudioInit(pCfgHandle, pDrvIns);
-    if (RT_SUCCESS(rc))
-    {
-        pThis->fTerminate = false;
-        pThis->pDrvIns    = pDrvIns;
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-/**
- * Destructs an audio driver instance.
- *
- * @copydoc FNPDMDRVDESTRUCT
- */
-static DECLCALLBACK(void) drvAudioDestruct(PPDMDRVINS pDrvIns)
-{
-    LogFlowFuncEnter();
-
-    PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns);
-    PDRVAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIO);
-
-    if (RTCritSectIsInitialized(&pThis->CritSect))
-    {
-        int rc2 = RTCritSectDelete(&pThis->CritSect);
-        AssertRC(rc2);
-    }
-}
-
-/**
- * Suspend notification.
- *
- * @param   pDrvIns     The driver instance data.
- */
-static DECLCALLBACK(void) drvAudioSuspend(PPDMDRVINS pDrvIns)
-{
-    drvAudioStateHandler(pDrvIns, PDMAUDIOSTREAMCMD_PAUSE);
-}
-
-/**
- * Resume notification.
- *
- * @param   pDrvIns     The driver instance data.
- */
-static DECLCALLBACK(void) drvAudioResume(PPDMDRVINS pDrvIns)
-{
-    drvAudioStateHandler(pDrvIns, PDMAUDIOSTREAMCMD_RESUME);
-}
-
-/**
- * Audio driver registration record.
- */
-const PDMDRVREG g_DrvAUDIO =
-{
-    /* u32Version */
-    PDM_DRVREG_VERSION,
-    /* szName */
-    "AUDIO",
-    /* szRCMod */
-    "",
-    /* szR0Mod */
-    "",
-    /* pszDescription */
-    "Audio connector driver",
-    /* fFlags */
-    PDM_DRVREG_FLAGS_HOST_BITS_DEFAULT,
-    /* fClass */
-    PDM_DRVREG_CLASS_AUDIO,
-    /* cMaxInstances */
-    2,
-    /* cbInstance */
-    sizeof(DRVAUDIO),
-    /* pfnConstruct */
-    drvAudioConstruct,
-    /* pfnDestruct */
-    drvAudioDestruct,
-    /* pfnRelocate */
-    NULL,
-    /* pfnIOCtl */
-    NULL,
-    /* pfnPowerOn */
-    NULL,
-    /* pfnReset */
-    NULL,
-    /* pfnSuspend */
-    drvAudioSuspend,
-    /* pfnResume */
-    drvAudioResume,
-    /* pfnAttach */
-    NULL,
-    /* pfnDetach */
-    NULL,
-    /* pfnPowerOff */
-    drvAudioPowerOff,
-    /* pfnSoftReset */
-    NULL,
-    /* u32EndVersion */
-    PDM_DRVREG_VERSION
-};
diff --git a/src/VBox/Devices/Audio_old/DrvAudio.h b/src/VBox/Devices/Audio_old/DrvAudio.h
deleted file mode 100644
index 383bb13..0000000
--- a/src/VBox/Devices/Audio_old/DrvAudio.h
+++ /dev/null
@@ -1,204 +0,0 @@
-/* $Id: DrvAudio.h $ */
-/** @file
- * Intermediate audio driver header.
- */
-
-/*
- * Copyright (C) 2006-2016 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- * --------------------------------------------------------------------
- *
- * This code is based on: audio.h
- *
- * QEMU Audio subsystem header
- *
- * Copyright (c) 2003-2005 Vassili Karpov (malc)
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-#ifndef DRV_AUDIO_H
-#define DRV_AUDIO_H
-
-#include <limits.h>
-
-#include <iprt/circbuf.h>
-#include <iprt/critsect.h>
-
-#include <VBox/vmm/pdmdev.h>
-#include <VBox/vmm/pdm.h>
-#include <VBox/vmm/pdmaudioifs.h>
-
-typedef enum
-{
-    AUD_OPT_INT,
-    AUD_OPT_FMT,
-    AUD_OPT_STR,
-    AUD_OPT_BOOL
-} audio_option_tag_e;
-
-typedef struct audio_option
-{
-    const char *name;
-    audio_option_tag_e tag;
-    void *valp;
-    const char *descr;
-    int *overridenp;
-    int overriden;
-} audio_option;
-
-/**
- * Audio driver instance data.
- *
- * @implements PDMIAUDIOCONNECTOR
- */
-typedef struct DRVAUDIO
-{
-    /** Input/output processing thread. */
-    RTTHREAD                hThread;
-    /** Critical section for serializing access. */
-    RTCRITSECT              CritSect;
-    /** Shutdown indicator. */
-    bool                    fTerminate;
-    /** Our audio connector interface. */
-    PDMIAUDIOCONNECTOR      IAudioConnector;
-    /** Pointer to the driver instance. */
-    PPDMDRVINS              pDrvIns;
-    /** Pointer to audio driver below us. */
-    PPDMIHOSTAUDIO          pHostDrvAudio;
-    /** List of host input streams. */
-    RTLISTANCHOR            lstHstStrmIn;
-    /** List of host output streams. */
-    RTLISTANCHOR            lstHstStrmOut;
-    /** Max. number of free input streams.
-     *  UINT32_MAX for unlimited streams. */
-    uint32_t                cFreeInputStreams;
-    /** Max. number of free output streams.
-     *  UINT32_MAX for unlimited streams. */
-    uint32_t                cFreeOutputStreams;
-    /** Audio configuration settings retrieved from the backend. */
-    PDMAUDIOBACKENDCFG      BackendCfg;
-#ifdef VBOX_WITH_AUDIO_CALLBACKS
-    /** @todo Use a map with primary key set to the callback type? */
-    RTLISTANCHOR            lstCBIn;
-    RTLISTANCHOR            lstCBOut;
-#endif
-} DRVAUDIO, *PDRVAUDIO;
-
-/** Makes a PDRVAUDIO out of a PPDMIAUDIOCONNECTOR. */
-#define PDMIAUDIOCONNECTOR_2_DRVAUDIO(pInterface) \
-    ( (PDRVAUDIO)((uintptr_t)pInterface - RT_OFFSETOF(DRVAUDIO, IAudioConnector)) )
-
-//const char *drvAudioHlpFormatToString(PDMAUDIOFMT fmt);
-const char *drvAudioRecSourceToString(PDMAUDIORECSOURCE enmRecSource);
-PDMAUDIOFMT drvAudioHlpStringToFormat(const char *pszFormat);
-
-bool drvAudioPCMPropsAreEqual(PPDMPCMPROPS info, PPDMAUDIOSTREAMCFG pCfg);
-void drvAudioStreamCfgPrint(PPDMAUDIOSTREAMCFG pCfg);
-
-/* AUDIO IN function declarations. */
-void drvAudioHlpPcmSwFreeResourcesIn(PPDMAUDIOGSTSTRMIN pGstStrmIn);
-void drvAudioGstInFreeRes(PPDMAUDIOGSTSTRMIN pGstStrmIn);
-void drvAudioGstInRemove(PPDMAUDIOGSTSTRMIN pGstStrmIn);
-uint32_t drvAudioHstInFindMinCaptured(PPDMAUDIOHSTSTRMIN pHstStrmIn);
-void drvAudioHstInFreeRes(PPDMAUDIOHSTSTRMIN pHstStrmIn);
-uint32_t drvAudioHstInGetFree(PPDMAUDIOHSTSTRMIN pHstStrmIn);
-uint32_t drvAudioHstInGetLive(PPDMAUDIOHSTSTRMIN pHstStrmIn);
-void drvAudioGstInRemove(PPDMAUDIOGSTSTRMIN pGstStrmIn);
-int  drvAudioGstInInit(PPDMAUDIOGSTSTRMIN pGstStrmIn, PPDMAUDIOHSTSTRMIN pHstStrmIn, const char *pszName, PPDMAUDIOSTREAMCFG pCfg);
-
-PPDMAUDIOHSTSTRMIN drvAudioFindNextHstIn(PDRVAUDIO pDrvAudio, PPDMAUDIOHSTSTRMIN pHstStrmIn);
-PPDMAUDIOHSTSTRMIN drvAudioFindNextEnabledHstIn(PDRVAUDIO pDrvAudio, PPDMAUDIOHSTSTRMIN pHstStrmIn);
-PPDMAUDIOHSTSTRMIN drvAudioFindNextEqHstIn(PDRVAUDIO pDrvAudio, PPDMAUDIOHSTSTRMIN pHstStrmIn, PPDMAUDIOSTREAMCFG pCfg);
-
-/* AUDIO OUT function declarations. */
-int  drvAudioGstOutAlloc(PPDMAUDIOGSTSTRMOUT pGstStrmOut);
-void drvAudioGstOutFreeRes(PPDMAUDIOGSTSTRMOUT pGstStrmOut);
-void drvAudioHstOutFreeRes(PPDMAUDIOHSTSTRMOUT pHstStrmOut);
-int  drvAudioDestroyGstOut(PDRVAUDIO pDrvAudio, PPDMAUDIOGSTSTRMOUT pGstStrmOut);
-void drvAudioDestroyHstOut(PDRVAUDIO pDrvAudio, PDMAUDIOHSTSTRMOUT pHstStrmOut);
-int  drvAudioGstOutInit(PPDMAUDIOGSTSTRMOUT pGstStrmOut, PPDMAUDIOHSTSTRMOUT pHstStrmOut, const char *pszName, PPDMAUDIOSTREAMCFG pCfg);
-
-PPDMAUDIOHSTSTRMOUT drvAudioFindAnyHstOut(PDRVAUDIO pDrvAudio, PPDMAUDIOHSTSTRMOUT pHstStrmOut);
-PPDMAUDIOHSTSTRMOUT drvAudioHstFindAnyEnabledOut(PDRVAUDIO pDrvAudio, PPDMAUDIOHSTSTRMOUT pHstStrmOut);
-PPDMAUDIOHSTSTRMOUT drvAudioFindSpecificOut(PDRVAUDIO pDrvAudio, PPDMAUDIOHSTSTRMOUT pHstStrmOut, PPDMAUDIOSTREAMCFG pCfg);
-int drvAudioAllocHstOut(PDRVAUDIO pDrvAudio, const char *pszName, PPDMAUDIOSTREAMCFG pCfg, PPDMAUDIOHSTSTRMOUT *ppHstStrmOut);
-int drvAudioHlpPcmHwAddOut(PDRVAUDIO pDrvAudio, PPDMAUDIOSTREAMCFG pCfg, PPDMAUDIOHSTSTRMOUT *ppHstStrmOut);
-int drvAudioHlpPcmCreateVoicePairOut(PDRVAUDIO pDrvAudio, const char *pszName, PPDMAUDIOSTREAMCFG pCfg, PPDMAUDIOGSTSTRMOUT *ppGstStrmOut);
-
-/* Common functions between DrvAudio and backends (host audio drivers). */
-void DrvAudioClearBuf(PPDMPCMPROPS pPCMInfo, void *pvBuf, size_t cbBuf, uint32_t cSamples);
-int DrvAudioStreamCfgToProps(PPDMAUDIOSTREAMCFG pCfg, PPDMPCMPROPS pProps);
-
-typedef struct fixed_settings
-{
-    int enabled;
-    int cStreams;
-    int greedy;
-    PDMAUDIOSTREAMCFG settings;
-} fixed_settings;
-
-static struct {
-    struct fixed_settings fixed_out;
-    struct fixed_settings fixed_in;
-    union {
-        int hz;
-        int64_t ticks;
-    } period;
-    int plive;
-} conf = {
-
-    /* Fixed output settings. */
-    {                           /* DAC fixed settings */
-        1,                      /* enabled */
-        1,                      /* cStreams */
-        1,                      /* greedy */
-        {
-            44100,              /* freq */
-            2,                  /* nchannels */
-            AUD_FMT_S16,        /* fmt */
-            PDMAUDIOHOSTENDIANNESS
-        }
-    },
-
-    /* Fixed input settings. */
-    {                           /* ADC fixed settings */
-        1,                      /* enabled */
-        2,                      /* cStreams */
-        1,                      /* greedy */
-        {
-            44100,              /* freq */
-            2,                  /* nchannels */
-            AUD_FMT_S16,        /* fmt */
-            PDMAUDIOHOSTENDIANNESS
-        }
-    },
-
-    { 200 },                    /* frequency (in Hz) */
-    0,                          /* plive */ /** @todo Disable pending live? */
-};
-#endif /* DRV_AUDIO_H */
-
diff --git a/src/VBox/Devices/Audio_old/DrvAudioCommon.cpp b/src/VBox/Devices/Audio_old/DrvAudioCommon.cpp
deleted file mode 100644
index 12c1e2c..0000000
--- a/src/VBox/Devices/Audio_old/DrvAudioCommon.cpp
+++ /dev/null
@@ -1,413 +0,0 @@
-/* $Id: DrvAudioCommon.cpp $ */
-/** @file
- * Intermedia audio driver, common routines. These are also used
- * in the drivers which are bound to Main, e.g. the VRDE or the
- * video audio recording drivers.
- */
-
-/*
- * Copyright (C) 2006-2015 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- * --------------------------------------------------------------------
- *
- * This code is based on: audio_template.h from QEMU AUDIO subsystem.
- *
- * QEMU Audio subsystem header
- *
- * Copyright (c) 2005 Vassili Karpov (malc)
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#define LOG_GROUP LOG_GROUP_DRV_AUDIO
-#include <VBox/log.h>
-#include <iprt/asm-math.h>
-#include <iprt/assert.h>
-#include <iprt/uuid.h>
-#include <iprt/string.h>
-#include <iprt/alloc.h>
-
-#include <VBox/vmm/pdmdev.h>
-#include <VBox/vmm/pdm.h>
-#include <VBox/err.h>
-#include <VBox/vmm/mm.h>
-
-#include <ctype.h>
-#include <stdlib.h>
-
-#include "DrvAudio.h"
-#include "AudioMixBuffer.h"
-
-bool drvAudioPCMPropsAreEqual(PPDMPCMPROPS pProps, PPDMAUDIOSTREAMCFG pCfg);
-
-const char *drvAudioRecSourceToString(PDMAUDIORECSOURCE enmRecSource)
-{
-    switch (enmRecSource)
-    {
-        case PDMAUDIORECSOURCE_MIC:     return "Microphone In";
-        case PDMAUDIORECSOURCE_CD:      return "CD";
-        case PDMAUDIORECSOURCE_VIDEO:   return "Video";
-        case PDMAUDIORECSOURCE_AUX:     return "AUX";
-        case PDMAUDIORECSOURCE_LINE_IN: return "Line In";
-        case PDMAUDIORECSOURCE_PHONE:   return "Phone";
-        default:
-            break;
-    }
-
-    AssertMsgFailed(("Bogus recording source %ld\n", enmRecSource));
-    return "Unknown";
-}
-
-const char *drvAudioHlpFormatToString(PDMAUDIOFMT enmFormat)
-{
-    switch (enmFormat)
-    {
-        case AUD_FMT_U8:
-            return "U8";
-
-        case AUD_FMT_U16:
-            return "U16";
-
-        case AUD_FMT_U32:
-            return "U32";
-
-        case AUD_FMT_S8:
-            return "S8";
-
-        case AUD_FMT_S16:
-            return "S16";
-
-        case AUD_FMT_S32:
-            return "S32";
-
-        default:
-            break;
-    }
-
-    AssertMsgFailed(("Bogus audio format %ld\n", enmFormat));
-    return "Invalid";
-}
-
-PDMAUDIOFMT drvAudioHlpStringToFormat(const char *pszFormat)
-{
-    if (!RTStrICmp(pszFormat, "u8"))
-        return AUD_FMT_U8;
-    else if (!RTStrICmp(pszFormat, "u16"))
-        return AUD_FMT_U16;
-    else if (!RTStrICmp(pszFormat, "u32"))
-        return AUD_FMT_U32;
-    else if (!RTStrICmp(pszFormat, "s8"))
-        return AUD_FMT_S8;
-    else if (!RTStrICmp(pszFormat, "s16"))
-        return AUD_FMT_S16;
-    else if (!RTStrICmp(pszFormat, "s32"))
-        return AUD_FMT_S32;
-
-    AssertMsgFailed(("Bogus audio format \"%s\"\n", pszFormat));
-    return AUD_FMT_INVALID;
-}
-
-/*********************************** In Stream Functions **********************************************/
-
-void drvAudioGstInFreeRes(PPDMAUDIOGSTSTRMIN pGstStrmIn)
-{
-    AssertPtrReturnVoid(pGstStrmIn);
-
-    if (pGstStrmIn->State.pszName)
-    {
-        RTStrFree(pGstStrmIn->State.pszName);
-        pGstStrmIn->State.pszName = NULL;
-    }
-
-    AudioMixBufDestroy(&pGstStrmIn->MixBuf);
-}
-
-void drvAudioHstInFreeRes(PPDMAUDIOHSTSTRMIN pHstStrmIn)
-{
-    AssertPtrReturnVoid(pHstStrmIn);
-    AudioMixBufDestroy(&pHstStrmIn->MixBuf);
-}
-
-void drvAudioGstOutFreeRes(PPDMAUDIOGSTSTRMOUT pGstStrmOut)
-{
-    if (!pGstStrmOut)
-        return;
-
-    if (pGstStrmOut->State.pszName)
-    {
-        RTStrFree(pGstStrmOut->State.pszName);
-        pGstStrmOut->State.pszName = NULL;
-    }
-
-    AudioMixBufDestroy(&pGstStrmOut->MixBuf);
-}
-
-#if 0
-
-/**
- * Finds the minimum number of not yet captured samples of all
- * attached guest input streams for a certain host input stream.
- *
- * @return  uint32_t            Minimum number of not yet captured samples.
- *                              UINT32_MAX if none found.
- * @param   pHstStrmIn          Host input stream to check for.
- */
-inline uint32_t drvAudioHstInFindMinCaptured(PPDMAUDIOHSTSTRMIN pHstStrmIn)
-{
-    AssertPtrReturn(pHstStrmIn, 0);
-    uint32_t cMinSamples = UINT32_MAX;
-
-    PPDMAUDIOGSTSTRMIN pGstStrmIn;
-    RTListForEach(&pHstStrmIn->lstGstStrmIn, pGstStrmIn, PDMAUDIOGSTSTRMIN, Node)
-    {
-        if (pGstStrmIn->State.fActive)
-            cMinSamples = RT_MIN(cMinSamples, audioMixBufMixed(&pGstStrmIn->MixBuf));
-    }
-
-#ifdef DEBUG_andy
-    LogFlowFunc(("cMinSamples=%RU32\n", cMinSamples));
-#endif
-    return cMinSamples;
-}
-
-uint32_t drvAudioHstInGetFree(PPDMAUDIOHSTSTRMIN pHstStrmIn)
-{
-    AssertPtrReturn(pHstStrmIn, 0);
-
-    return audioMixBufSize(&pHstStrmIn->MixBuf) - drvAudioHstInGetLive(pHstStrmIn);
-}
-
-uint32_t drvAudioHstInGetLive(PPDMAUDIOHSTSTRMIN pHstStrmIn)
-{
-    AssertPtrReturn(pHstStrmIn, 0);
-
-    uint32_t cMinSamplesCaptured = drvAudioHstInFindMinCaptured(pHstStrmIn);
-    uint32_t cSamplesCaptured = audioMixBufMixed(&pHstStrmIn->MixBuf);
-
-    Assert(cSamplesCaptured >= cMinSamplesCaptured);
-    uint32_t cSamplesLive = cSamplesCaptured - cMinSamplesCaptured;
-    Assert(cSamplesLive <= audioMixBufSize(&pHstStrmIn->MixBuf));
-
-#ifdef DEBUG_andy
-    LogFlowFunc(("cSamplesLive=%RU32\n", cSamplesLive));
-#endif
-    return cSamplesLive;
-}
-#endif
-
-void drvAudioHstOutFreeRes(PPDMAUDIOHSTSTRMOUT pHstStrmOut)
-{
-    AssertPtrReturnVoid(pHstStrmOut);
-    AudioMixBufDestroy(&pHstStrmOut->MixBuf);
-}
-
-#if 0
-/**
- * Returns the number of live sample data (in bytes) of a certain
- * guest input stream.
- *
- * @return  uint32_t            Live sample data (in bytes), 0 if none.
- * @param   pGstStrmIn          Guest input stream to check for.
- */
-uint32_t drvAudioGstInGetLiveBytes(PPDMAUDIOGSTSTRMIN pGstStrmIn)
-{
-    AssertPtrReturn(pGstStrmIn, 0);
-    AssertPtrReturn(pGstStrmIn->pHstStrmIn, 0);
-
-    Assert(pGstStrmIn->pHstStrmIn->cTotalSamplesCaptured >= pGstStrmIn->cTotalHostSamplesRead);
-    uint32_t cSamplesLive = pGstStrmIn->pHstStrmIn->cTotalSamplesCaptured - pGstStrmIn->cTotalHostSamplesRead;
-    if (!cSamplesLive)
-        return 0;
-    Assert(cSamplesLive <= pGstStrmIn->pHstStrmIn->cSamples);
-
-    /** @todo Document / refactor this! */
-    return (((int64_t) cSamplesLive << 32) / pGstStrmIn->State.uFreqRatio) << pGstStrmIn->Props.cShift;
-}
-
-
-/**
- * Returns the total number of unused sample data (in bytes) of a certain
- * guest output stream.
- *
- * @return  uint32_t            Number of unused sample data (in bytes), 0 if all used up.
- * @param   pGstStrmOut         Guest output stream to check for.
- */
-uint32_t drvAudioGstOutGetFreeBytes(PPDMAUDIOGSTSTRMOUT pGstStrmOut)
-{
-    AssertPtrReturn(pGstStrmOut, 0);
-
-    Assert(pGstStrmOut->cTotalSamplesWritten <= pGstStrmOut->pHstStrmOut->cSamples);
-    uint32_t cSamplesFree =   pGstStrmOut->pHstStrmOut->cSamples
-                            - pGstStrmOut->cTotalSamplesWritten;
-    if (!cSamplesFree)
-        return 0;
-
-    /** @todo Document / refactor this! */
-    return (((int64_t) cSamplesFree << 32) / pGstStrmOut->State.uFreqRatio) << pGstStrmOut->Props.cShift;
-}
-#endif
-
-bool drvAudioPCMPropsAreEqual(PPDMPCMPROPS pProps, PPDMAUDIOSTREAMCFG pCfg)
-{
-    int cBits = 8;
-    bool fSigned = false;
-
-    switch (pCfg->enmFormat)
-    {
-        case AUD_FMT_S8:
-            fSigned = true;
-        case AUD_FMT_U8:
-            break;
-
-        case AUD_FMT_S16:
-            fSigned = true;
-        case AUD_FMT_U16:
-            cBits = 16;
-            break;
-
-        case AUD_FMT_S32:
-            fSigned = true;
-        case AUD_FMT_U32:
-            cBits = 32;
-            break;
-
-        default:
-            AssertMsgFailed(("Unknown format %ld\n", pCfg->enmFormat));
-            break;
-    }
-
-    bool fEqual =    pProps->uHz         == pCfg->uHz
-                  && pProps->cChannels   == pCfg->cChannels
-                  && pProps->fSigned     == fSigned
-                  && pProps->cBits       == cBits
-                  && pProps->fSwapEndian == !(pCfg->enmEndianness == PDMAUDIOHOSTENDIANNESS);
-
-    LogFlowFunc(("fEqual=%RTbool\n", fEqual));
-    return fEqual;
-}
-
-/**
- * Converts an audio stream configuration to matching PCM properties.
- *
- * @return  IPRT status code.
- * @param   pCfg                    Audio stream configuration to convert.
- * @param   pProps                  PCM properties to save result to.
- */
-int DrvAudioStreamCfgToProps(PPDMAUDIOSTREAMCFG pCfg, PPDMPCMPROPS pProps)
-{
-    AssertPtrReturn(pCfg,   VERR_INVALID_POINTER);
-    AssertPtrReturn(pProps, VERR_INVALID_POINTER);
-
-    int rc = VINF_SUCCESS;
-
-    int cBits = 8, cShift = 0;
-    bool fSigned = false;
-
-    switch (pCfg->enmFormat)
-    {
-        case AUD_FMT_S8:
-            fSigned = true;
-        case AUD_FMT_U8:
-            break;
-
-        case AUD_FMT_S16:
-            fSigned = true;
-        case AUD_FMT_U16:
-            cBits = 16;
-            cShift = 1;
-            break;
-
-        case AUD_FMT_S32:
-            fSigned = true;
-        case AUD_FMT_U32:
-            cBits = 32;
-            cShift = 2;
-            break;
-
-        default:
-            AssertMsgFailed(("Unknown format %ld\n", pCfg->enmFormat));
-            rc = VERR_NOT_SUPPORTED;
-            break;
-    }
-
-    if (RT_SUCCESS(rc))
-    {
-        pProps->uHz         = pCfg->uHz;
-        pProps->cBits       = cBits;
-        pProps->fSigned     = fSigned;
-        pProps->cChannels   = pCfg->cChannels;
-        pProps->cShift      = (pCfg->cChannels == 2) + cShift;
-        pProps->uAlign      = (1 << pProps->cShift) - 1;
-        pProps->cbPerSec    = pProps->uHz << pProps->cShift;
-        pProps->fSwapEndian = pCfg->enmEndianness != PDMAUDIOHOSTENDIANNESS;
-    }
-
-    return rc;
-}
-
-void drvAudioStreamCfgPrint(PPDMAUDIOSTREAMCFG pCfg)
-{
-    LogFlowFunc(("uHz=%RU32, cChannels=%RU8, enmFormat=",
-                 pCfg->uHz, pCfg->cChannels));
-
-    switch (pCfg->enmFormat)
-    {
-        case AUD_FMT_S8:
-            LogFlow(("S8"));
-            break;
-        case AUD_FMT_U8:
-            LogFlow(("U8"));
-            break;
-        case AUD_FMT_S16:
-            LogFlow(("S16"));
-            break;
-        case AUD_FMT_U16:
-            LogFlow(("U16"));
-            break;
-        case AUD_FMT_S32:
-            LogFlow(("S32"));
-            break;
-        case AUD_FMT_U32:
-            LogFlow(("U32"));
-            break;
-        default:
-            LogFlow(("invalid(%d)", pCfg->enmFormat));
-            break;
-    }
-
-    LogFlow((", endianness="));
-    switch (pCfg->enmEndianness)
-    {
-        case PDMAUDIOENDIANNESS_LITTLE:
-            LogFlow(("little\n"));
-            break;
-        case PDMAUDIOENDIANNESS_BIG:
-            LogFlow(("big\n"));
-            break;
-        default:
-            LogFlow(("invalid\n"));
-            break;
-    }
-}
diff --git a/src/VBox/Devices/Audio_old/DrvHostALSAAudio.cpp b/src/VBox/Devices/Audio_old/DrvHostALSAAudio.cpp
deleted file mode 100644
index ff78688..0000000
--- a/src/VBox/Devices/Audio_old/DrvHostALSAAudio.cpp
+++ /dev/null
@@ -1,1421 +0,0 @@
-/* $Id: DrvHostALSAAudio.cpp $ */
-/** @file
- * VBox audio devices: ALSA audio driver.
- */
-
-/*
- * Copyright (C) 2006-2015 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- * --------------------------------------------------------------------
- *
- * This code is based on: alsaaudio.c
- *
- * QEMU ALSA audio driver
- *
- * Copyright (c) 2005 Vassili Karpov (malc)
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-
-/*********************************************************************************************************************************
-*   Header Files                                                                                                                 *
-*********************************************************************************************************************************/
-#define LOG_GROUP LOG_GROUP_DRV_HOST_AUDIO
-#include <VBox/log.h>
-#include <iprt/alloc.h>
-#include <iprt/uuid.h> /* For PDMIBASE_2_PDMDRV. */
-#include <VBox/vmm/pdmaudioifs.h>
-
-RT_C_DECLS_BEGIN
- #include "alsa_stubs.h"
- #include "alsa_mangling.h"
-RT_C_DECLS_END
-
-#include <alsa/asoundlib.h>
-
-#include "DrvAudio.h"
-#include "AudioMixBuffer.h"
-
-#include "VBoxDD.h"
-
-typedef struct ALSAAUDIOSTREAMIN
-{
-    PDMAUDIOHSTSTRMIN   pStreamIn;
-    snd_pcm_t          *phPCM;
-    void               *pvBuf;
-    size_t              cbBuf;
-} ALSAAUDIOSTREAMIN, *PALSAAUDIOSTREAMIN;
-
-typedef struct ALSAAUDIOSTREAMOUT
-{
-    PDMAUDIOHSTSTRMOUT  pStreamOut;
-    snd_pcm_t          *phPCM;
-    void               *pvBuf;
-    size_t              cbBuf;
-} ALSAAUDIOSTREAMOUT, *PALSAAUDIOSTREAMOUT;
-
-/* latency = period_size * periods / (rate * bytes_per_frame) */
-
-typedef struct ALSAAUDIOCFG
-{
-    int size_in_usec_in;
-    int size_in_usec_out;
-    const char *pcm_name_in;
-    const char *pcm_name_out;
-    unsigned int buffer_size_in;
-    unsigned int period_size_in;
-    unsigned int buffer_size_out;
-    unsigned int period_size_out;
-    unsigned int threshold;
-
-    int buffer_size_in_overriden;
-    int period_size_in_overriden;
-
-    int buffer_size_out_overriden;
-    int period_size_out_overriden;
-
-} ALSAAUDIOCFG, *PALSAAUDIOCFG;
-
-static int drvHostALSAAudioRecover(snd_pcm_t *phPCM);
-
-static ALSAAUDIOCFG s_ALSAConf =
-{
-#ifdef HIGH_LATENCY
-    1,
-    1,
-#else
-    0,
-    0,
-#endif
-    "default",
-    "default",
-#ifdef HIGH_LATENCY
-    400000,
-    400000 / 4,
-    400000,
-    400000 / 4,
-#else
-# define DEFAULT_BUFFER_SIZE 1024
-# define DEFAULT_PERIOD_SIZE 256
-    DEFAULT_BUFFER_SIZE * 4,
-    DEFAULT_PERIOD_SIZE * 4,
-    DEFAULT_BUFFER_SIZE,
-    DEFAULT_PERIOD_SIZE,
-#endif
-    0,
-    0,
-    0,
-    0,
-    0
-};
-
-/**
- * Host Alsa audio driver instance data.
- * @implements PDMIAUDIOCONNECTOR
- */
-typedef struct DRVHOSTALSAAUDIO
-{
-    /** Pointer to the driver instance structure. */
-    PPDMDRVINS         pDrvIns;
-    /** Pointer to host audio interface. */
-    PDMIHOSTAUDIO      IHostAudio;
-    /** Error count for not flooding the release log.
-     *  UINT32_MAX for unlimited logging. */
-    uint32_t           cLogErrors;
-} DRVHOSTALSAAUDIO, *PDRVHOSTALSAAUDIO;
-
-/** Maximum number of tries to recover a broken pipe. */
-#define ALSA_RECOVERY_TRIES_MAX    5
-
-typedef struct ALSAAUDIOSTREAMCFG
-{
-    unsigned int freq;
-    snd_pcm_format_t fmt;
-    int nchannels;
-    unsigned long buffer_size;
-    unsigned long period_size;
-    snd_pcm_uframes_t samples;
-} ALSAAUDIOSTREAMCFG, *PALSAAUDIOSTREAMCFG;
-
-static int drvHostALSAAudioClose(snd_pcm_t **pphPCM)
-{
-    if (!pphPCM || !*pphPCM)
-        return VINF_SUCCESS;
-
-    int rc;
-    int rc2 = snd_pcm_close(*pphPCM);
-    if (rc2)
-    {
-        LogRel(("ALSA: Closing PCM descriptor failed: %s\n", snd_strerror(rc2)));
-        rc = VERR_GENERAL_FAILURE; /** @todo */
-    }
-    else
-    {
-        *pphPCM = NULL;
-        rc = VINF_SUCCESS;
-    }
-
-    return rc;
-}
-
-static snd_pcm_format_t drvHostALSAAudioFmtToALSA(PDMAUDIOFMT fmt)
-{
-    switch (fmt)
-    {
-        case AUD_FMT_S8:
-            return SND_PCM_FORMAT_S8;
-
-        case AUD_FMT_U8:
-            return SND_PCM_FORMAT_U8;
-
-        case AUD_FMT_S16:
-            return SND_PCM_FORMAT_S16_LE;
-
-        case AUD_FMT_U16:
-            return SND_PCM_FORMAT_U16_LE;
-
-        case AUD_FMT_S32:
-            return SND_PCM_FORMAT_S32_LE;
-
-        case AUD_FMT_U32:
-            return SND_PCM_FORMAT_U32_LE;
-
-        default:
-            break;
-    }
-
-    AssertMsgFailed(("Format %ld not supported\n", fmt));
-    return SND_PCM_FORMAT_U8;
-}
-
-static int drvHostALSAAudioALSAToFmt(snd_pcm_format_t fmt,
-                                     PDMAUDIOFMT *pFmt, PDMAUDIOENDIANNESS *pEndianness)
-{
-    AssertPtrReturn(pFmt, VERR_INVALID_POINTER);
-    /* pEndianness is optional. */
-
-    switch (fmt)
-    {
-        case SND_PCM_FORMAT_S8:
-            *pFmt = AUD_FMT_S8;
-            if (pEndianness)
-                *pEndianness = PDMAUDIOENDIANNESS_LITTLE;
-            break;
-
-        case SND_PCM_FORMAT_U8:
-            *pFmt = AUD_FMT_U8;
-            if (pEndianness)
-                *pEndianness = PDMAUDIOENDIANNESS_LITTLE;
-            break;
-
-        case SND_PCM_FORMAT_S16_LE:
-            *pFmt = AUD_FMT_S16;
-            if (pEndianness)
-                *pEndianness = PDMAUDIOENDIANNESS_LITTLE;
-            break;
-
-        case SND_PCM_FORMAT_U16_LE:
-            *pFmt = AUD_FMT_U16;
-            if (pEndianness)
-                *pEndianness = PDMAUDIOENDIANNESS_LITTLE;
-            break;
-
-        case SND_PCM_FORMAT_S16_BE:
-            *pFmt = AUD_FMT_S16;
-            if (pEndianness)
-                *pEndianness = PDMAUDIOENDIANNESS_BIG;
-            break;
-
-        case SND_PCM_FORMAT_U16_BE:
-            *pFmt = AUD_FMT_U16;
-            if (pEndianness)
-                *pEndianness = PDMAUDIOENDIANNESS_BIG;
-            break;
-
-        case SND_PCM_FORMAT_S32_LE:
-            *pFmt = AUD_FMT_S32;
-            if (pEndianness)
-                *pEndianness = PDMAUDIOENDIANNESS_LITTLE;
-            break;
-
-        case SND_PCM_FORMAT_U32_LE:
-            *pFmt = AUD_FMT_U32;
-            if (pEndianness)
-                *pEndianness = PDMAUDIOENDIANNESS_LITTLE;
-            break;
-
-        case SND_PCM_FORMAT_S32_BE:
-            *pFmt = AUD_FMT_S32;
-            if (pEndianness)
-                *pEndianness = PDMAUDIOENDIANNESS_BIG;
-            break;
-
-        case SND_PCM_FORMAT_U32_BE:
-            *pFmt = AUD_FMT_U32;
-            if (pEndianness)
-                *pEndianness = PDMAUDIOENDIANNESS_BIG;
-            break;
-
-        default:
-            AssertMsgFailed(("Format %ld not supported\n", fmt));
-            return VERR_NOT_SUPPORTED;
-    }
-
-    return VINF_SUCCESS;
-}
-
-static int drvHostALSAAudioALSAGetShift(snd_pcm_format_t fmt, unsigned *puShift)
-{
-    AssertPtrReturn(puShift, VERR_INVALID_POINTER);
-
-    switch (fmt)
-    {
-        case SND_PCM_FORMAT_S8:
-        case SND_PCM_FORMAT_U8:
-            *puShift = 0;
-            break;
-
-        case SND_PCM_FORMAT_S16_LE:
-        case SND_PCM_FORMAT_U16_LE:
-        case SND_PCM_FORMAT_S16_BE:
-        case SND_PCM_FORMAT_U16_BE:
-            *puShift = 1;
-            break;
-
-        case SND_PCM_FORMAT_S32_LE:
-        case SND_PCM_FORMAT_U32_LE:
-        case SND_PCM_FORMAT_S32_BE:
-        case SND_PCM_FORMAT_U32_BE:
-            *puShift = 2;
-            break;
-
-        default:
-            AssertMsgFailed(("Format %ld not supported\n", fmt));
-            return VERR_NOT_SUPPORTED;
-    }
-
-    return VINF_SUCCESS;
-}
-
-static int drvHostALSAAudioSetThreshold(snd_pcm_t *phPCM,
-                                        snd_pcm_uframes_t threshold)
-{
-    snd_pcm_sw_params_t *pSWParms = NULL;
-    snd_pcm_sw_params_alloca(&pSWParms);
-    if (!pSWParms)
-        return VERR_NO_MEMORY;
-
-    int rc;
-    do
-    {
-        int err = snd_pcm_sw_params_current(phPCM, pSWParms);
-        if (err < 0)
-        {
-            LogRel(("ALSA: Failed to get current software parameters for threshold: %s\n",
-                    snd_strerror(err)));
-            rc = VERR_ACCESS_DENIED;
-            break;
-        }
-
-        err = snd_pcm_sw_params_set_start_threshold(phPCM, pSWParms, threshold);
-        if (err < 0)
-        {
-            LogRel(("ALSA: Failed to set software threshold to %ld: %s\n",
-                    threshold, snd_strerror(err)));
-            rc = VERR_ACCESS_DENIED;
-            break;
-        }
-
-        err = snd_pcm_sw_params(phPCM, pSWParms);
-        if (err < 0)
-        {
-            LogRel(("ALSA: Failed to set new software parameters for threshold: %s\n",
-                    snd_strerror(err)));
-            rc = VERR_ACCESS_DENIED;
-            break;
-        }
-
-        LogFlowFunc(("Setting threshold to %RU32\n", threshold));
-        rc = VINF_SUCCESS;
-    }
-    while (0);
-
-    return rc;
-}
-
-static int drvHostALSAAudioOpen(bool fIn,
-                                PALSAAUDIOSTREAMCFG pCfgReq,
-                                PALSAAUDIOSTREAMCFG pCfgObt,
-                                snd_pcm_t **pphPCM)
-{
-    snd_pcm_t *phPCM = NULL;
-    int rc;
-
-    unsigned int cChannels = pCfgReq->nchannels;
-    unsigned int uFreq = pCfgReq->freq;
-    snd_pcm_uframes_t obt_buffer_size;
-
-    do
-    {
-        const char *pszDev = fIn ? s_ALSAConf.pcm_name_in : s_ALSAConf.pcm_name_out;
-        if (!pszDev)
-        {
-            LogRel(("ALSA: Invalid or no %s device name set\n", fIn ? "input" : "output"));
-            rc = VERR_INVALID_PARAMETER;
-            break;
-        }
-
-        int err = snd_pcm_open(&phPCM, pszDev,
-                               fIn ? SND_PCM_STREAM_CAPTURE : SND_PCM_STREAM_PLAYBACK,
-                               SND_PCM_NONBLOCK);
-        if (err < 0)
-        {
-            LogRel(("ALSA: Failed to open \"%s\" as %s device: %s\n", pszDev, fIn ? "input" : "output", snd_strerror(err)));
-            rc = VERR_AUDIO_BACKEND_INIT_FAILED;
-            break;
-        }
-
-        LogRel(("ALSA: Using %s device \"%s\"\n", fIn ? "input" : "output", pszDev));
-
-        snd_pcm_hw_params_t *pHWParms;
-        snd_pcm_hw_params_alloca(&pHWParms); /** @todo Check for successful allocation? */
-        err = snd_pcm_hw_params_any(phPCM, pHWParms);
-        if (err < 0)
-        {
-            LogRel(("ALSA: Failed to initialize hardware parameters: %s\n", snd_strerror(err)));
-            rc = VERR_AUDIO_BACKEND_INIT_FAILED;
-            break;
-        }
-
-        err = snd_pcm_hw_params_set_access(phPCM, pHWParms,
-                                           SND_PCM_ACCESS_RW_INTERLEAVED);
-        if (err < 0)
-        {
-            LogRel(("ALSA: Failed to set access type: %s\n", snd_strerror(err)));
-            rc = VERR_AUDIO_BACKEND_INIT_FAILED;
-            break;
-        }
-
-        err = snd_pcm_hw_params_set_format(phPCM, pHWParms, pCfgReq->fmt);
-        if (err < 0)
-        {
-            LogRel(("ALSA: Failed to set audio format to %d: %s\n", pCfgReq->fmt, snd_strerror(err)));
-            rc = VERR_AUDIO_BACKEND_INIT_FAILED;
-            break;
-        }
-
-        err = snd_pcm_hw_params_set_rate_near(phPCM, pHWParms, &uFreq, 0);
-        if (err < 0)
-        {
-            LogRel(("ALSA: Failed to set frequency to %uHz: %s\n", pCfgReq->freq, snd_strerror(err)));
-            rc = VERR_AUDIO_BACKEND_INIT_FAILED;
-            break;
-        }
-
-        err = snd_pcm_hw_params_set_channels_near(phPCM, pHWParms, &cChannels);
-        if (err < 0)
-        {
-            LogRel(("ALSA: Failed to set number of channels to %d\n", pCfgReq->nchannels));
-            rc = VERR_AUDIO_BACKEND_INIT_FAILED;
-            break;
-        }
-
-        if (   cChannels != 1
-            && cChannels != 2)
-        {
-            LogRel(("ALSA: Number of audio channels (%u) not supported\n", cChannels));
-            rc = VERR_AUDIO_BACKEND_INIT_FAILED;
-            break;
-        }
-
-        unsigned int period_size = pCfgReq->period_size;
-        unsigned int buffer_size = pCfgReq->buffer_size;
-
-        if (   !((fIn && s_ALSAConf.size_in_usec_in)
-            ||  (!fIn && s_ALSAConf.size_in_usec_out)))
-        {
-            if (!buffer_size)
-            {
-                buffer_size = DEFAULT_BUFFER_SIZE;
-                period_size = DEFAULT_PERIOD_SIZE;
-            }
-        }
-
-        if (buffer_size)
-        {
-            if (   ( fIn && s_ALSAConf.size_in_usec_in)
-                || (!fIn && s_ALSAConf.size_in_usec_out))
-            {
-                if (period_size)
-                {
-                    err = snd_pcm_hw_params_set_period_time_near(phPCM, pHWParms,
-                                                                 &period_size, 0);
-                    if (err < 0)
-                    {
-                        LogRel(("ALSA: Failed to set period time %d\n", pCfgReq->period_size));
-                        rc = VERR_AUDIO_BACKEND_INIT_FAILED;
-                        break;
-                    }
-                }
-
-                err = snd_pcm_hw_params_set_buffer_time_near(phPCM, pHWParms,
-                                                             &buffer_size, 0);
-                if (err < 0)
-                {
-                    LogRel(("ALSA: Failed to set buffer time %d\n", pCfgReq->buffer_size));
-                    rc = VERR_AUDIO_BACKEND_INIT_FAILED;
-                    break;
-                }
-            }
-            else
-            {
-                snd_pcm_uframes_t period_size_f = (snd_pcm_uframes_t)period_size;
-                snd_pcm_uframes_t buffer_size_f = (snd_pcm_uframes_t)buffer_size;
-
-                snd_pcm_uframes_t minval;
-
-                if (period_size_f)
-                {
-                    minval = period_size_f;
-
-                    int dir = 0;
-                    err = snd_pcm_hw_params_get_period_size_min(pHWParms,
-                                                                &minval, &dir);
-                    if (err < 0)
-                    {
-                        LogRel(("ALSA: Could not determine minimal period size\n"));
-                        rc = VERR_AUDIO_BACKEND_INIT_FAILED;
-                        break;
-                    }
-                    else
-                    {
-                        LogFunc(("Minimal period size is: %ld\n", minval));
-                        if (period_size_f < minval)
-                        {
-                            if (   ( fIn && s_ALSAConf.period_size_in_overriden)
-                                || (!fIn && s_ALSAConf.period_size_out_overriden))
-                            {
-                                LogFunc(("Period size %RU32 is less than minimal period size %RU32\n",
-                                         period_size_f, minval));
-                            }
-
-                            period_size_f = minval;
-                        }
-                    }
-
-                    err = snd_pcm_hw_params_set_period_size_near(phPCM, pHWParms,
-                                                                 &period_size_f, 0);
-                    LogFunc(("Period size is: %RU32\n", period_size_f));
-                    if (err < 0)
-                    {
-                        LogRel(("ALSA: Failed to set period size %d (%s)\n",
-                                period_size_f, snd_strerror(err)));
-                        rc = VERR_AUDIO_BACKEND_INIT_FAILED;
-                        break;
-                    }
-                }
-
-                /* Calculate default buffer size here since it might have been changed
-                 * in the _near functions */
-                buffer_size_f = 4 * period_size_f;
-
-                minval = buffer_size_f;
-                err = snd_pcm_hw_params_get_buffer_size_min(pHWParms, &minval);
-                if (err < 0)
-                {
-                    LogRel(("ALSA: Could not retrieve minimal buffer size\n"));
-                    rc = VERR_AUDIO_BACKEND_INIT_FAILED;
-                    break;
-                }
-                else
-                {
-                    LogFunc(("Minimal buffer size is: %RU32\n", minval));
-                    if (buffer_size_f < minval)
-                    {
-                        if (   ( fIn && s_ALSAConf.buffer_size_in_overriden)
-                            || (!fIn && s_ALSAConf.buffer_size_out_overriden))
-                        {
-                            LogFunc(("Buffer size %RU32 is less than minimal buffer size %RU32\n",
-                                     buffer_size_f, minval));
-                        }
-
-                        buffer_size_f = minval;
-                    }
-                }
-
-                err = snd_pcm_hw_params_set_buffer_size_near(phPCM,
-                                                             pHWParms, &buffer_size_f);
-                LogFunc(("Buffer size is: %RU32\n", buffer_size_f));
-                if (err < 0)
-                {
-                    LogRel(("ALSA: Failed to set buffer size %d: %s\n",
-                            buffer_size_f, snd_strerror(err)));
-                    rc = VERR_AUDIO_BACKEND_INIT_FAILED;
-                    break;
-                }
-            }
-        }
-        else
-            LogFunc(("Warning: Buffer size is not set\n"));
-
-        err = snd_pcm_hw_params(phPCM, pHWParms);
-        if (err < 0)
-        {
-            LogRel(("ALSA: Failed to apply audio parameters\n"));
-            rc = VERR_AUDIO_BACKEND_INIT_FAILED;
-            break;
-        }
-
-        err = snd_pcm_hw_params_get_buffer_size(pHWParms, &obt_buffer_size);
-        if (err < 0)
-        {
-            LogRel(("ALSA: Failed to get buffer size\n"));
-            rc = VERR_AUDIO_BACKEND_INIT_FAILED;
-            break;
-        }
-
-        snd_pcm_uframes_t obt_period_size;
-        int dir = 0;
-        err = snd_pcm_hw_params_get_period_size(pHWParms, &obt_period_size, &dir);
-        if (err < 0)
-        {
-            LogRel(("ALSA: Failed to get period size\n"));
-            rc = VERR_AUDIO_BACKEND_INIT_FAILED;
-            break;
-        }
-
-        LogFunc(("Freq=%dHz, period size=%RU32, buffer size=%RU32\n",
-                 pCfgReq->freq, obt_period_size, obt_buffer_size));
-
-        err = snd_pcm_prepare(phPCM);
-        if (err < 0)
-        {
-            LogRel(("ALSA: Could not prepare hPCM %p\n", (void *)phPCM));
-            rc = VERR_AUDIO_BACKEND_INIT_FAILED;
-            break;
-        }
-
-        if (   !fIn
-            && s_ALSAConf.threshold)
-        {
-            unsigned uShift;
-            rc = drvHostALSAAudioALSAGetShift(pCfgReq->fmt, &uShift);
-            if (RT_SUCCESS(rc))
-            {
-                int bytes_per_sec = uFreq
-                    << (cChannels == 2)
-                    << uShift;
-
-                snd_pcm_uframes_t threshold
-                    = (s_ALSAConf.threshold * bytes_per_sec) / 1000;
-
-                rc = drvHostALSAAudioSetThreshold(phPCM, threshold);
-            }
-        }
-        else
-            rc = VINF_SUCCESS;
-    }
-    while (0);
-
-    if (RT_SUCCESS(rc))
-    {
-        pCfgObt->fmt       = pCfgReq->fmt;
-        pCfgObt->nchannels = cChannels;
-        pCfgObt->freq      = uFreq;
-        pCfgObt->samples   = obt_buffer_size;
-
-        *pphPCM = phPCM;
-    }
-    else
-        drvHostALSAAudioClose(&phPCM);
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-#ifdef DEBUG
-static void drvHostALSAAudioErrorHandler(const char *file, int line, const char *function,
-                                         int err, const char *fmt, ...)
-{
-    /** @todo Implement me! */
-}
-#endif
-
-static int drvHostALSAAudioGetAvail(snd_pcm_t *phPCM, snd_pcm_sframes_t *pFramesAvail)
-{
-    AssertPtrReturn(phPCM, VERR_INVALID_POINTER);
-    AssertPtrReturn(pFramesAvail, VERR_INVALID_POINTER);
-
-    int rc;
-
-    snd_pcm_sframes_t framesAvail;
-    framesAvail = snd_pcm_avail_update(phPCM);
-    if (framesAvail < 0)
-    {
-        if (framesAvail == -EPIPE)
-        {
-            rc = drvHostALSAAudioRecover(phPCM);
-            if (RT_SUCCESS(rc))
-                framesAvail = snd_pcm_avail_update(phPCM);
-        }
-        else
-            rc = VERR_ACCESS_DENIED; /** @todo Find a better rc. */
-    }
-    else
-        rc = VINF_SUCCESS;
-
-    if (framesAvail >= 0)
-        *pFramesAvail = framesAvail;
-
-    return rc;
-}
-
-static int drvHostALSAAudioRecover(snd_pcm_t *phPCM)
-{
-    AssertPtrReturn(phPCM, VERR_INVALID_POINTER);
-
-    int err = snd_pcm_prepare(phPCM);
-    if (err < 0)
-    {
-        LogFunc(("Failed to recover stream %p: %s\n", phPCM, snd_strerror(err)));
-        return VERR_ACCESS_DENIED; /** @todo Find a better rc. */
-    }
-
-    return VINF_SUCCESS;
-}
-
-static int drvHostALSAAudioResume(snd_pcm_t *phPCM)
-{
-    AssertPtrReturn(phPCM, VERR_INVALID_POINTER);
-
-    int err = snd_pcm_resume(phPCM);
-    if (err < 0)
-    {
-        LogFunc(("Failed to resume stream %p: %s\n", phPCM, snd_strerror(err)));
-        return VERR_ACCESS_DENIED; /** @todo Find a better rc. */
-    }
-
-    return VINF_SUCCESS;
-}
-
-static int drvHostALSAAudioStreamCtl(snd_pcm_t *phPCM, bool fPause)
-{
-    int err;
-    if (fPause)
-    {
-        err = snd_pcm_drop(phPCM);
-        if (err < 0)
-        {
-            LogRel(("ALSA: Error stopping stream %p: %s\n", phPCM, snd_strerror(err)));
-            return VERR_ACCESS_DENIED;
-        }
-    }
-    else
-    {
-        err = snd_pcm_prepare(phPCM);
-        if (err < 0)
-        {
-            LogRel(("ALSA: Error preparing stream %p: %s\n", phPCM, snd_strerror(err)));
-            return VERR_ACCESS_DENIED;
-        }
-    }
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) drvHostALSAAudioInit(PPDMIHOSTAUDIO pInterface)
-{
-    NOREF(pInterface);
-
-    LogFlowFuncEnter();
-
-    int rc = audioLoadAlsaLib();
-    if (RT_FAILURE(rc))
-        LogRel(("ALSA: Failed to load the ALSA shared library, rc=%Rrc\n", rc));
-    else
-    {
-#ifdef DEBUG
-        snd_lib_error_set_handler(drvHostALSAAudioErrorHandler);
-#endif
-    }
-
-    return rc;
-}
-
-static DECLCALLBACK(int) drvHostALSAAudioCaptureIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHstStrmIn,
-                                                   uint32_t *pcSamplesCaptured)
-{
-    NOREF(pInterface);
-    AssertPtrReturn(pHstStrmIn, VERR_INVALID_POINTER);
-
-    PALSAAUDIOSTREAMIN pThisStrmIn = (PALSAAUDIOSTREAMIN)pHstStrmIn;
-
-    snd_pcm_sframes_t cAvail;
-    int rc = drvHostALSAAudioGetAvail(pThisStrmIn->phPCM, &cAvail);
-    if (RT_FAILURE(rc))
-    {
-        LogFunc(("Error getting number of captured frames, rc=%Rrc\n", rc));
-        return rc;
-    }
-
-    if (!cAvail) /* No data yet? */
-    {
-        snd_pcm_state_t state = snd_pcm_state(pThisStrmIn->phPCM);
-        switch (state)
-        {
-            case SND_PCM_STATE_PREPARED:
-                cAvail = AudioMixBufFree(&pHstStrmIn->MixBuf);
-                break;
-
-            case SND_PCM_STATE_SUSPENDED:
-            {
-                rc = drvHostALSAAudioResume(pThisStrmIn->phPCM);
-                if (RT_FAILURE(rc))
-                    break;
-
-                LogFlow(("Resuming suspended input stream\n"));
-                break;
-            }
-
-            default:
-                LogFlow(("No frames available, state=%d\n", state));
-                break;
-        }
-
-        if (!cAvail)
-        {
-            if (pcSamplesCaptured)
-                *pcSamplesCaptured = 0;
-            return VINF_SUCCESS;
-        }
-    }
-
-    /*
-     * Check how much we can read from the capture device without overflowing
-     * the mixer buffer.
-     */
-    Assert(cAvail);
-    size_t cbMixFree = AudioMixBufFreeBytes(&pHstStrmIn->MixBuf);
-    size_t cbToRead = RT_MIN((size_t)AUDIOMIXBUF_S2B(&pHstStrmIn->MixBuf, cAvail), cbMixFree);
-
-    LogFlowFunc(("cbToRead=%zu, cAvail=%RI32\n", cbToRead, cAvail));
-
-    uint32_t cWrittenTotal = 0;
-    snd_pcm_uframes_t cToRead;
-    snd_pcm_sframes_t cRead;
-
-    while (   cbToRead
-           && RT_SUCCESS(rc))
-    {
-        cToRead = RT_MIN(AUDIOMIXBUF_B2S(&pHstStrmIn->MixBuf, cbToRead),
-                         AUDIOMIXBUF_B2S(&pHstStrmIn->MixBuf, pThisStrmIn->cbBuf));
-        AssertBreakStmt(cToRead, rc = VERR_NO_DATA);
-        cRead = snd_pcm_readi(pThisStrmIn->phPCM, pThisStrmIn->pvBuf, cToRead);
-        if (cRead <= 0)
-        {
-            switch (cRead)
-            {
-                case 0:
-                {
-                    LogFunc(("No input frames available\n"));
-                    rc = VERR_ACCESS_DENIED;
-                    break;
-                }
-
-                case -EAGAIN:
-                {
-                    /*
-                     * Don't set error here because EAGAIN means there are no further frames
-                     * available at the moment, try later. As we might have read some frames
-                     * already these need to be processed instead.
-                     */
-                    cbToRead = 0;
-                    break;
-                }
-
-                case -EPIPE:
-                {
-                    rc = drvHostALSAAudioRecover(pThisStrmIn->phPCM);
-                    if (RT_FAILURE(rc))
-                        break;
-
-                    LogFlowFunc(("Recovered from capturing\n"));
-                    continue;
-                }
-
-                default:
-                {
-                    LogFunc(("Failed to read input frames: %s\n", snd_strerror(cRead)));
-                    rc = VERR_GENERAL_FAILURE; /** @todo Fudge! */
-                    break;
-                }
-            }
-        }
-        else
-        {
-            uint32_t cWritten;
-            rc = AudioMixBufWriteCirc(&pHstStrmIn->MixBuf,
-                                      pThisStrmIn->pvBuf, AUDIOMIXBUF_S2B(&pHstStrmIn->MixBuf, cRead),
-                                      &cWritten);
-            if (RT_FAILURE(rc))
-                break;
-
-            /*
-             * We should not run into a full mixer buffer or we loose samples and
-             * run into an endless loop if ALSA keeps producing samples ("null"
-             * capture device for example).
-             */
-            AssertLogRelMsgBreakStmt(cWritten > 0, ("Mixer buffer shouldn't be full at this point!\n"),
-                                     rc = VERR_INTERNAL_ERROR);
-            uint32_t cbWritten = AUDIOMIXBUF_S2B(&pHstStrmIn->MixBuf, cWritten);
-
-            Assert(cbToRead >= cbWritten);
-            cbToRead -= cbWritten;
-            cWrittenTotal += cWritten;
-        }
-    }
-
-    if (RT_SUCCESS(rc))
-    {
-        uint32_t cProcessed = 0;
-        if (cWrittenTotal)
-            rc = AudioMixBufMixToParent(&pHstStrmIn->MixBuf, cWrittenTotal,
-                                        &cProcessed);
-
-        if (pcSamplesCaptured)
-            *pcSamplesCaptured = cWrittenTotal;
-
-        LogFlowFunc(("cWrittenTotal=%RU32 (%RU32 processed), rc=%Rrc\n",
-                     cWrittenTotal, cProcessed, rc));
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(int) drvHostALSAAudioPlayOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHstStrmOut,
-                                                 uint32_t *pcSamplesPlayed)
-{
-    NOREF(pInterface);
-    AssertPtrReturn(pHstStrmOut, VERR_INVALID_POINTER);
-
-    PALSAAUDIOSTREAMOUT pThisStrmOut = (PALSAAUDIOSTREAMOUT)pHstStrmOut;
-
-    int rc = VINF_SUCCESS;
-    uint32_t cbReadTotal = 0;
-
-    do
-    {
-        snd_pcm_sframes_t cAvail;
-        rc = drvHostALSAAudioGetAvail(pThisStrmOut->phPCM, &cAvail);
-        if (RT_FAILURE(rc))
-        {
-            LogFunc(("Error getting number of playback frames, rc=%Rrc\n", rc));
-            break;
-        }
-
-        size_t cbToRead = RT_MIN(AUDIOMIXBUF_S2B(&pHstStrmOut->MixBuf,
-                                                 (uint32_t)cAvail), /* cAvail is always >= 0 */
-                                 AUDIOMIXBUF_S2B(&pHstStrmOut->MixBuf,
-                                                 AudioMixBufAvail(&pHstStrmOut->MixBuf)));
-        LogFlowFunc(("cbToRead=%zu, cbAvail=%zu\n",
-                     cbToRead, AUDIOMIXBUF_S2B(&pHstStrmOut->MixBuf, cAvail)));
-
-        uint32_t cRead, cbRead;
-        snd_pcm_sframes_t cWritten;
-        while (cbToRead)
-        {
-            rc = AudioMixBufReadCirc(&pHstStrmOut->MixBuf, pThisStrmOut->pvBuf, cbToRead, &cRead);
-            if (RT_FAILURE(rc))
-                break;
-
-            cbRead = AUDIOMIXBUF_S2B(&pHstStrmOut->MixBuf, cRead);
-            AssertBreak(cbRead);
-
-            /* Don't try infinitely on recoverable errors. */
-            unsigned iTry;
-            for (iTry = 0; iTry < ALSA_RECOVERY_TRIES_MAX; iTry++)
-            {
-                cWritten = snd_pcm_writei(pThisStrmOut->phPCM, pThisStrmOut->pvBuf, cRead);
-                if (cWritten <= 0)
-                {
-                    switch (cWritten)
-                    {
-                        case 0:
-                        {
-                            LogFunc(("Failed to write %RI32 frames\n", cRead));
-                            rc = VERR_ACCESS_DENIED;
-                            break;
-                        }
-
-                        case -EPIPE:
-                        {
-                            rc = drvHostALSAAudioRecover(pThisStrmOut->phPCM);
-                            if (RT_FAILURE(rc))
-                                break;
-
-                            LogFlowFunc(("Recovered from playback\n"));
-                            continue;
-                        }
-
-                        case -ESTRPIPE:
-                        {
-                            /* Stream was suspended and waiting for a recovery. */
-                            rc = drvHostALSAAudioResume(pThisStrmOut->phPCM);
-                            if (RT_FAILURE(rc))
-                            {
-                                LogRel(("ALSA: Failed to resume output stream\n"));
-                                break;
-                            }
-
-                            LogFlowFunc(("Resumed suspended output stream\n"));
-                            continue;
-                        }
-
-                        default:
-                            LogFlowFunc(("Failed to write %RI32 output frames, rc=%Rrc\n",
-                                         cRead, rc));
-                            rc = VERR_GENERAL_FAILURE; /** @todo */
-                            break;
-                    }
-                }
-                else
-                    break;
-            } /* For number of tries. */
-
-            if (   iTry == ALSA_RECOVERY_TRIES_MAX
-                && cWritten <= 0)
-                rc = VERR_BROKEN_PIPE;
-
-            if (RT_FAILURE(rc))
-                break;
-
-            Assert(cbToRead >= cbRead);
-            cbToRead -= cbRead;
-            cbReadTotal += cbRead;
-        }
-    }
-    while (0);
-
-    if (RT_SUCCESS(rc))
-    {
-        uint32_t cReadTotal = AUDIOMIXBUF_B2S(&pHstStrmOut->MixBuf, cbReadTotal);
-        if (cReadTotal)
-            AudioMixBufFinish(&pHstStrmOut->MixBuf, cReadTotal);
-
-        if (pcSamplesPlayed)
-            *pcSamplesPlayed = cReadTotal;
-
-        LogFlowFunc(("cReadTotal=%RU32 (%RU32 bytes), rc=%Rrc\n",
-                     cReadTotal, cbReadTotal, rc));
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(int) drvHostALSAAudioFiniIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHstStrmIn)
-{
-    NOREF(pInterface);
-    AssertPtrReturn(pHstStrmIn, VERR_INVALID_POINTER);
-
-    PALSAAUDIOSTREAMIN pThisStrmIn = (PALSAAUDIOSTREAMIN)pHstStrmIn;
-
-    drvHostALSAAudioClose(&pThisStrmIn->phPCM);
-
-    if (pThisStrmIn->pvBuf)
-    {
-        RTMemFree(pThisStrmIn->pvBuf);
-        pThisStrmIn->pvBuf = NULL;
-    }
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) drvHostALSAAudioFiniOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHstStrmOut)
-{
-    NOREF(pInterface);
-    AssertPtrReturn(pHstStrmOut, VERR_INVALID_POINTER);
-
-    PALSAAUDIOSTREAMOUT pThisStrmOut = (PALSAAUDIOSTREAMOUT)pHstStrmOut;
-
-    drvHostALSAAudioClose(&pThisStrmOut->phPCM);
-
-    if (pThisStrmOut->pvBuf)
-    {
-        RTMemFree(pThisStrmOut->pvBuf);
-        pThisStrmOut->pvBuf = NULL;
-    }
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) drvHostALSAAudioInitOut(PPDMIHOSTAUDIO pInterface,
-                                                 PPDMAUDIOHSTSTRMOUT pHstStrmOut, PPDMAUDIOSTREAMCFG pCfg,
-                                                 uint32_t *pcSamples)
-{
-    NOREF(pInterface);
-    AssertPtrReturn(pHstStrmOut, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
-
-    PALSAAUDIOSTREAMOUT pThisStrmOut = (PALSAAUDIOSTREAMOUT)pHstStrmOut;
-    snd_pcm_t *phPCM = NULL;
-
-    int rc;
-
-    do
-    {
-        ALSAAUDIOSTREAMCFG req;
-        req.fmt         = drvHostALSAAudioFmtToALSA(pCfg->enmFormat);
-        req.freq        = pCfg->uHz;
-        req.nchannels   = pCfg->cChannels;
-        req.period_size = s_ALSAConf.period_size_out;
-        req.buffer_size = s_ALSAConf.buffer_size_out;
-
-        ALSAAUDIOSTREAMCFG obt;
-        rc = drvHostALSAAudioOpen(false /* false */, &req, &obt, &phPCM);
-        if (RT_FAILURE(rc))
-            break;
-
-        PDMAUDIOFMT enmFormat;
-        PDMAUDIOENDIANNESS enmEnd;
-        rc = drvHostALSAAudioALSAToFmt(obt.fmt, &enmFormat, &enmEnd);
-        if (RT_FAILURE(rc))
-            break;
-
-        PDMAUDIOSTREAMCFG streamCfg;
-        streamCfg.uHz           = obt.freq;
-        streamCfg.cChannels     = obt.nchannels;
-        streamCfg.enmFormat     = enmFormat;
-        streamCfg.enmEndianness = enmEnd;
-
-        rc = DrvAudioStreamCfgToProps(&streamCfg, &pHstStrmOut->Props);
-        if (RT_FAILURE(rc))
-            break;
-
-        AssertBreakStmt(obt.samples, rc = VERR_INVALID_PARAMETER);
-        size_t cbBuf = obt.samples * (1 << pHstStrmOut->Props.cShift);
-        AssertBreakStmt(cbBuf, rc = VERR_INVALID_PARAMETER);
-        pThisStrmOut->pvBuf = RTMemAlloc(cbBuf);
-        if (!pThisStrmOut->pvBuf)
-        {
-            LogRel(("ALSA: Not enough memory for output DAC buffer (%RU32 samples, each %d bytes)\n",
-                    obt.samples, 1 << pHstStrmOut->Props.cShift));
-            rc = VERR_NO_MEMORY;
-            break;
-        }
-
-        pThisStrmOut->cbBuf       = cbBuf;
-        pThisStrmOut->phPCM       = phPCM;
-
-        if (pcSamples)
-            *pcSamples = obt.samples;
-    }
-    while (0);
-
-    if (RT_FAILURE(rc))
-        drvHostALSAAudioClose(&phPCM);
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(int) drvHostALSAAudioInitIn(PPDMIHOSTAUDIO pInterface,
-                                                PPDMAUDIOHSTSTRMIN pHstStrmIn, PPDMAUDIOSTREAMCFG pCfg,
-                                                PDMAUDIORECSOURCE enmRecSource,
-                                                uint32_t *pcSamples)
-{
-    NOREF(pInterface);
-    AssertPtrReturn(pHstStrmIn, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
-
-    int rc;
-
-    PALSAAUDIOSTREAMIN pThisStrmIn = (PALSAAUDIOSTREAMIN)pHstStrmIn;
-    snd_pcm_t *phPCM = NULL;
-
-    do
-    {
-        ALSAAUDIOSTREAMCFG req;
-        req.fmt         = drvHostALSAAudioFmtToALSA(pCfg->enmFormat);
-        req.freq        = pCfg->uHz;
-        req.nchannels   = pCfg->cChannels;
-        req.period_size = s_ALSAConf.period_size_in;
-        req.buffer_size = s_ALSAConf.buffer_size_in;
-
-        ALSAAUDIOSTREAMCFG obt;
-        rc = drvHostALSAAudioOpen(true /* fIn */, &req, &obt, &phPCM);
-        if (RT_FAILURE(rc))
-            break;
-
-        PDMAUDIOFMT enmFormat;
-        PDMAUDIOENDIANNESS enmEnd;
-        rc = drvHostALSAAudioALSAToFmt(obt.fmt, &enmFormat, &enmEnd);
-        if (RT_FAILURE(rc))
-            break;
-
-        PDMAUDIOSTREAMCFG streamCfg;
-        streamCfg.uHz           = obt.freq;
-        streamCfg.cChannels     = obt.nchannels;
-        streamCfg.enmFormat     = enmFormat;
-        streamCfg.enmEndianness = enmEnd;
-
-        rc = DrvAudioStreamCfgToProps(&streamCfg, &pHstStrmIn->Props);
-        if (RT_FAILURE(rc))
-            break;
-
-        AssertBreakStmt(obt.samples, rc = VERR_INVALID_PARAMETER);
-        size_t cbBuf = obt.samples * (1 << pHstStrmIn->Props.cShift);
-        AssertBreakStmt(cbBuf, rc = VERR_INVALID_PARAMETER);
-        pThisStrmIn->pvBuf = RTMemAlloc(cbBuf);
-        if (!pThisStrmIn->pvBuf)
-        {
-            LogRel(("ALSA: Not enough memory for input ADC buffer (%RU32 samples, each %d bytes)\n",
-                    obt.samples, 1 << pHstStrmIn->Props.cShift));
-            rc = VERR_NO_MEMORY;
-            break;
-        }
-
-        pThisStrmIn->cbBuf       = cbBuf;
-        pThisStrmIn->phPCM       = phPCM;
-
-        if (pcSamples)
-            *pcSamples = obt.samples;
-    }
-    while (0);
-
-    if (RT_FAILURE(rc))
-        drvHostALSAAudioClose(&phPCM);
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(bool) drvHostALSAAudioIsEnabled(PPDMIHOSTAUDIO pInterface, PDMAUDIODIR enmDir)
-{
-    NOREF(pInterface);
-    NOREF(enmDir);
-    return true; /* Always all enabled. */
-}
-
-static DECLCALLBACK(int) drvHostALSAAudioControlIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHstStrmIn,
-                                                   PDMAUDIOSTREAMCMD enmStreamCmd)
-{
-    NOREF(pInterface);
-    AssertPtrReturn(pHstStrmIn, VERR_INVALID_POINTER);
-    PALSAAUDIOSTREAMIN pThisStrmIn = (PALSAAUDIOSTREAMIN)pHstStrmIn;
-
-    LogFlowFunc(("enmStreamCmd=%ld\n", enmStreamCmd));
-
-    int rc;
-    switch (enmStreamCmd)
-    {
-        case PDMAUDIOSTREAMCMD_ENABLE:
-        case PDMAUDIOSTREAMCMD_RESUME:
-            rc = drvHostALSAAudioStreamCtl(pThisStrmIn->phPCM, false /* fStop */);
-            break;
-
-        case PDMAUDIOSTREAMCMD_DISABLE:
-        case PDMAUDIOSTREAMCMD_PAUSE:
-            rc = drvHostALSAAudioStreamCtl(pThisStrmIn->phPCM, true /* fStop */);
-            break;
-
-        default:
-            AssertMsgFailed(("Invalid command %ld\n", enmStreamCmd));
-            rc = VERR_INVALID_PARAMETER;
-            break;
-    }
-
-    return rc;
-}
-
-static DECLCALLBACK(int) drvHostALSAAudioControlOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHstStrmOut,
-                                                    PDMAUDIOSTREAMCMD enmStreamCmd)
-{
-    NOREF(pInterface);
-    AssertPtrReturn(pHstStrmOut, VERR_INVALID_POINTER);
-    PALSAAUDIOSTREAMOUT pThisStrmOut = (PALSAAUDIOSTREAMOUT)pHstStrmOut;
-
-    LogFlowFunc(("enmStreamCmd=%ld\n", enmStreamCmd));
-
-    int rc;
-    switch (enmStreamCmd)
-    {
-        case PDMAUDIOSTREAMCMD_ENABLE:
-        case PDMAUDIOSTREAMCMD_RESUME:
-            rc = drvHostALSAAudioStreamCtl(pThisStrmOut->phPCM, false /* fStop */);
-            break;
-
-        case PDMAUDIOSTREAMCMD_DISABLE:
-        case PDMAUDIOSTREAMCMD_PAUSE:
-            rc = drvHostALSAAudioStreamCtl(pThisStrmOut->phPCM, true /* fStop */);
-            break;
-
-        default:
-            AssertMsgFailed(("Invalid command %ld\n", enmStreamCmd));
-            rc = VERR_INVALID_PARAMETER;
-            break;
-    }
-
-    return rc;
-}
-
-static DECLCALLBACK(int) drvHostALSAAudioGetConf(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDCFG pCfg)
-{
-    NOREF(pInterface);
-    AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
-
-    pCfg->cbStreamIn      = sizeof(ALSAAUDIOSTREAMIN);
-    pCfg->cbStreamOut     = sizeof(ALSAAUDIOSTREAMOUT);
-
-    /* ALSA only allows one input and one output used at a time for
-     * the selected device. */
-    pCfg->cMaxHstStrmsIn  = 1;
-    pCfg->cMaxHstStrmsOut = 1;
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(void) drvHostALSAAudioShutdown(PPDMIHOSTAUDIO pInterface)
-{
-    NOREF(pInterface);
-}
-
-/**
- * @interface_method_impl{PDMIBASE,pfnQueryInterface}
- */
-static DECLCALLBACK(void *) drvHostALSAAudioQueryInterface(PPDMIBASE pInterface, const char *pszIID)
-{
-    PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
-    PDRVHOSTALSAAUDIO  pThis   = PDMINS_2_DATA(pDrvIns, PDRVHOSTALSAAUDIO);
-    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase);
-    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIHOSTAUDIO, &pThis->IHostAudio);
-
-    return NULL;
-}
-
-/**
- * Construct a DirectSound Audio driver instance.
- *
- * @copydoc FNPDMDRVCONSTRUCT
- */
-static DECLCALLBACK(int) drvHostAlsaAudioConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
-{
-    PDRVHOSTALSAAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTALSAAUDIO);
-    LogRel(("Audio: Initializing ALSA driver\n"));
-
-    /*
-     * Init the static parts.
-     */
-    pThis->pDrvIns                   = pDrvIns;
-    /* IBase */
-    pDrvIns->IBase.pfnQueryInterface = drvHostALSAAudioQueryInterface;
-    /* IHostAudio */
-    PDMAUDIO_IHOSTAUDIO_CALLBACKS(drvHostALSAAudio);
-
-    return VINF_SUCCESS;
-}
-
-/**
- * Char driver registration record.
- */
-const PDMDRVREG g_DrvHostALSAAudio =
-{
-    /* u32Version */
-    PDM_DRVREG_VERSION,
-    /* szName */
-    "ALSAAudio",
-    /* szRCMod */
-    "",
-    /* szR0Mod */
-    "",
-    /* pszDescription */
-    "ALSA host audio driver",
-    /* fFlags */
-     PDM_DRVREG_FLAGS_HOST_BITS_DEFAULT,
-    /* fClass. */
-    PDM_DRVREG_CLASS_AUDIO,
-    /* cMaxInstances */
-    ~0U,
-    /* cbInstance */
-    sizeof(DRVHOSTALSAAUDIO),
-    /* pfnConstruct */
-    drvHostAlsaAudioConstruct,
-    /* pfnDestruct */
-    NULL,
-    /* pfnRelocate */
-    NULL,
-    /* pfnIOCtl */
-    NULL,
-    /* pfnPowerOn */
-    NULL,
-    /* pfnReset */
-    NULL,
-    /* pfnSuspend */
-    NULL,
-    /* pfnResume */
-    NULL,
-    /* pfnAttach */
-    NULL,
-    /* pfnDetach */
-    NULL,
-    /* pfnPowerOff */
-    NULL,
-    /* pfnSoftReset */
-    NULL,
-    /* u32EndVersion */
-    PDM_DRVREG_VERSION
-};
-
-static struct audio_option alsa_options[] =
-{
-    {"DACSizeInUsec", AUD_OPT_BOOL, &s_ALSAConf.size_in_usec_out,
-     "DAC period/buffer size in microseconds (otherwise in frames)", NULL, 0},
-    {"DACPeriodSize", AUD_OPT_INT, &s_ALSAConf.period_size_out,
-     "DAC period size", &s_ALSAConf.period_size_out_overriden, 0},
-    {"DACBufferSize", AUD_OPT_INT, &s_ALSAConf.buffer_size_out,
-     "DAC buffer size", &s_ALSAConf.buffer_size_out_overriden, 0},
-
-    {"ADCSizeInUsec", AUD_OPT_BOOL, &s_ALSAConf.size_in_usec_in,
-     "ADC period/buffer size in microseconds (otherwise in frames)", NULL, 0},
-    {"ADCPeriodSize", AUD_OPT_INT, &s_ALSAConf.period_size_in,
-     "ADC period size", &s_ALSAConf.period_size_in_overriden, 0},
-    {"ADCBufferSize", AUD_OPT_INT, &s_ALSAConf.buffer_size_in,
-     "ADC buffer size", &s_ALSAConf.buffer_size_in_overriden, 0},
-
-    {"Threshold", AUD_OPT_INT, &s_ALSAConf.threshold,
-     "(undocumented)", NULL, 0},
-
-    {"DACDev", AUD_OPT_STR, &s_ALSAConf.pcm_name_out,
-     "DAC device name (for instance dmix)", NULL, 0},
-
-    {"ADCDev", AUD_OPT_STR, &s_ALSAConf.pcm_name_in,
-     "ADC device name", NULL, 0},
-
-    NULL
-};
-
diff --git a/src/VBox/Devices/Audio_old/DrvHostCoreAudio.cpp b/src/VBox/Devices/Audio_old/DrvHostCoreAudio.cpp
deleted file mode 100644
index bae513d..0000000
--- a/src/VBox/Devices/Audio_old/DrvHostCoreAudio.cpp
+++ /dev/null
@@ -1,2188 +0,0 @@
-/* $Id: DrvHostCoreAudio.cpp $ */
-/** @file
- * VBox audio devices: Mac OS X CoreAudio audio driver.
- */
-
-/*
- * Copyright (C) 2010-2016 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-#define LOG_GROUP LOG_GROUP_DRV_HOST_AUDIO
-#include <VBox/log.h>
-
-#include "DrvAudio.h"
-#include "AudioMixBuffer.h"
-
-#include "VBoxDD.h"
-
-#include <iprt/asm.h>
-#include <iprt/cdefs.h>
-#include <iprt/circbuf.h>
-#include <iprt/mem.h>
-
-#include <iprt/uuid.h>
-
-#include <CoreAudio/CoreAudio.h>
-#include <CoreServices/CoreServices.h>
-#include <AudioUnit/AudioUnit.h>
-#include <AudioToolbox/AudioConverter.h>
-
-/* TODO:
- * - Maybe make sure the threads are immediately stopped if playing/recording stops.
- */
-
-/*
- * Most of this is based on:
- * http://developer.apple.com/mac/library/technotes/tn2004/tn2097.html
- * http://developer.apple.com/mac/library/technotes/tn2002/tn2091.html
- * http://developer.apple.com/mac/library/qa/qa2007/qa1533.html
- * http://developer.apple.com/mac/library/qa/qa2001/qa1317.html
- * http://developer.apple.com/mac/library/documentation/AudioUnit/Reference/AUComponentServicesReference/Reference/reference.html
- */
-
-/**
- * Host Coreaudio driver instance data.
- * @implements PDMIAUDIOCONNECTOR
- */
-typedef struct DRVHOSTCOREAUDIO
-{
-    /** Pointer to the driver instance structure. */
-    PPDMDRVINS    pDrvIns;
-    /** Pointer to host audio interface. */
-    PDMIHOSTAUDIO IHostAudio;
-} DRVHOSTCOREAUDIO, *PDRVHOSTCOREAUDIO;
-
-/*******************************************************************************
- *
- * Helper function section
- *
- ******************************************************************************/
-
-static void drvHostCoreAudioPrintASBDesc(const char *pszDesc, const AudioStreamBasicDescription *pStreamDesc)
-{
-    char pszSampleRate[32];
-    LogRel2(("CoreAudio: %s description:\n", pszDesc));
-    LogRel2(("CoreAudio: Format ID: %RU32 (%c%c%c%c)\n", pStreamDesc->mFormatID,
-             RT_BYTE4(pStreamDesc->mFormatID), RT_BYTE3(pStreamDesc->mFormatID),
-             RT_BYTE2(pStreamDesc->mFormatID), RT_BYTE1(pStreamDesc->mFormatID)));
-    LogRel2(("CoreAudio: Flags: %RU32", pStreamDesc->mFormatFlags));
-    if (pStreamDesc->mFormatFlags & kAudioFormatFlagIsFloat)
-        LogRel2((" Float"));
-    if (pStreamDesc->mFormatFlags & kAudioFormatFlagIsBigEndian)
-        LogRel2((" BigEndian"));
-    if (pStreamDesc->mFormatFlags & kAudioFormatFlagIsSignedInteger)
-        LogRel2((" SignedInteger"));
-    if (pStreamDesc->mFormatFlags & kAudioFormatFlagIsPacked)
-        LogRel2((" Packed"));
-    if (pStreamDesc->mFormatFlags & kAudioFormatFlagIsAlignedHigh)
-        LogRel2((" AlignedHigh"));
-    if (pStreamDesc->mFormatFlags & kAudioFormatFlagIsNonInterleaved)
-        LogRel2((" NonInterleaved"));
-    if (pStreamDesc->mFormatFlags & kAudioFormatFlagIsNonMixable)
-        LogRel2((" NonMixable"));
-    if (pStreamDesc->mFormatFlags & kAudioFormatFlagsAreAllClear)
-        LogRel2((" AllClear"));
-    LogRel2(("\n"));
-    snprintf(pszSampleRate, 32, "%.2f", (float)pStreamDesc->mSampleRate); /** @todo r=andy Use RTStrPrint*. */
-    LogRel2(("CoreAudio: SampleRate      : %s\n", pszSampleRate));
-    LogRel2(("CoreAudio: ChannelsPerFrame: %RU32\n", pStreamDesc->mChannelsPerFrame));
-    LogRel2(("CoreAudio: FramesPerPacket : %RU32\n", pStreamDesc->mFramesPerPacket));
-    LogRel2(("CoreAudio: BitsPerChannel  : %RU32\n", pStreamDesc->mBitsPerChannel));
-    LogRel2(("CoreAudio: BytesPerFrame   : %RU32\n", pStreamDesc->mBytesPerFrame));
-    LogRel2(("CoreAudio: BytesPerPacket  : %RU32\n", pStreamDesc->mBytesPerPacket));
-}
-
-static void drvHostCoreAudioPCMInfoToASBDesc(PDMPCMPROPS *pPcmProperties, AudioStreamBasicDescription *pStreamDesc)
-{
-    pStreamDesc->mFormatID         = kAudioFormatLinearPCM;
-    pStreamDesc->mFormatFlags      = kAudioFormatFlagIsPacked;
-    pStreamDesc->mFramesPerPacket  = 1;
-    pStreamDesc->mSampleRate       = (Float64)pPcmProperties->uHz;
-    pStreamDesc->mChannelsPerFrame = pPcmProperties->cChannels;
-    pStreamDesc->mBitsPerChannel   = pPcmProperties->cBits;
-    if (pPcmProperties->fSigned)
-        pStreamDesc->mFormatFlags |= kAudioFormatFlagIsSignedInteger;
-    pStreamDesc->mBytesPerFrame    = pStreamDesc->mChannelsPerFrame * (pStreamDesc->mBitsPerChannel / 8);
-    pStreamDesc->mBytesPerPacket   = pStreamDesc->mFramesPerPacket * pStreamDesc->mBytesPerFrame;
-}
-
-static OSStatus drvHostCoreAudioSetFrameBufferSize(AudioDeviceID deviceID, bool fInput, UInt32 cReqSize, UInt32 *pcActSize)
-{
-    AudioObjectPropertyScope propScope = fInput
-                                       ? kAudioDevicePropertyScopeInput : kAudioDevicePropertyScopeOutput;
-    AudioObjectPropertyAddress propAdr = { kAudioDevicePropertyBufferFrameSize, propScope,
-                                           kAudioObjectPropertyElementMaster };
-
-    /* First try to set the new frame buffer size. */
-    OSStatus err = AudioObjectSetPropertyData(deviceID, &propAdr, NULL, 0, sizeof(cReqSize), &cReqSize);
-
-    /* Check if it really was set. */
-    UInt32 cSize = sizeof(*pcActSize);
-    err = AudioObjectGetPropertyData(deviceID, &propAdr, 0, NULL, &cSize, pcActSize);
-    if (RT_UNLIKELY(err != noErr))
-        return err;
-
-    /* If both sizes are the same, we are done. */
-    if (cReqSize == *pcActSize)
-        return noErr;
-
-    /* If not we have to check the limits of the device. First get the size of
-       the buffer size range property. */
-    propAdr.mSelector = kAudioDevicePropertyBufferSizeRange;
-    err = AudioObjectGetPropertyDataSize(deviceID, &propAdr, 0, NULL, &cSize);
-    if (RT_UNLIKELY(err != noErr))
-        return err;
-
-    Assert(cSize);
-    AudioValueRange *pRange = (AudioValueRange *)RTMemAllocZ(cSize);
-    if (pRange)
-    {
-        err = AudioObjectGetPropertyData(deviceID, &propAdr, 0, NULL, &cSize, pRange);
-        if (err == noErr)
-        {
-            Float64 cMin = -1;
-            Float64 cMax = -1;
-            for (size_t a = 0; a < cSize / sizeof(AudioValueRange); a++)
-            {
-                /* Search for the absolute minimum. */
-                if (   pRange[a].mMinimum < cMin
-                    || cMin == -1)
-                    cMin = pRange[a].mMinimum;
-
-                /* Search for the best maximum which isn't bigger than cReqSize. */
-                if (pRange[a].mMaximum < cReqSize)
-                {
-                    if (pRange[a].mMaximum > cMax)
-                        cMax = pRange[a].mMaximum;
-                }
-            }
-            if (cMax == -1)
-                cMax = cMin;
-            cReqSize = cMax;
-
-            /* First try to set the new frame buffer size. */
-            propAdr.mSelector = kAudioDevicePropertyBufferFrameSize;
-            err = AudioObjectSetPropertyData(deviceID, &propAdr, 0, NULL, sizeof(cReqSize), &cReqSize);
-            if (err == noErr)
-            {
-                /* Check if it really was set. */
-                cSize = sizeof(*pcActSize);
-                err = AudioObjectGetPropertyData(deviceID, &propAdr, 0, NULL, &cSize, pcActSize);
-            }
-        }
-
-        RTMemFree(pRange);
-    }
-    else
-        err = notEnoughMemoryErr;
-
-    return err;
-}
-
-DECL_FORCE_INLINE(bool) drvHostCoreAudioIsRunning(AudioDeviceID deviceID)
-{
-    AudioObjectPropertyAddress propAdr = { kAudioDevicePropertyDeviceIsRunning, kAudioObjectPropertyScopeGlobal,
-                                           kAudioObjectPropertyElementMaster };
-    UInt32 uFlag = 0;
-    UInt32 uSize = sizeof(uFlag);
-    OSStatus err = AudioObjectGetPropertyData(deviceID, &propAdr, 0, NULL, &uSize, &uFlag);
-    if (err != kAudioHardwareNoError)
-        LogRel(("CoreAudio: Could not determine whether the device is running (%RI32)\n", err));
-
-    return (uFlag >= 1);
-}
-
-static int drvHostCoreAudioCFStringToCString(const CFStringRef pCFString, char **ppszString)
-{
-    CFIndex cLen = CFStringGetLength(pCFString) + 1;
-    char *pszResult = (char *)RTMemAllocZ(cLen * sizeof(char));
-    if (!CFStringGetCString(pCFString, pszResult, cLen, kCFStringEncodingUTF8))
-    {
-        RTMemFree(pszResult);
-        return VERR_NOT_FOUND;
-    }
-
-    *ppszString = pszResult;
-    return VINF_SUCCESS;
-}
-
-static AudioDeviceID drvHostCoreAudioDeviceUIDtoID(const char* pszUID)
-{
-    /* Create a CFString out of our CString. */
-    CFStringRef strUID = CFStringCreateWithCString(NULL, pszUID, kCFStringEncodingMacRoman);
-
-    /* Fill the translation structure. */
-    AudioDeviceID deviceID;
-
-    AudioValueTranslation translation;
-    translation.mInputData      = &strUID;
-    translation.mInputDataSize  = sizeof(CFStringRef);
-    translation.mOutputData     = &deviceID;
-    translation.mOutputDataSize = sizeof(AudioDeviceID);
-
-    /* Fetch the translation from the UID to the device ID. */
-    AudioObjectPropertyAddress propAdr = { kAudioHardwarePropertyDeviceForUID, kAudioObjectPropertyScopeGlobal,
-                                           kAudioObjectPropertyElementMaster };
-
-    UInt32 uSize = sizeof(AudioValueTranslation);
-    OSStatus err = AudioObjectGetPropertyData(kAudioObjectSystemObject, &propAdr, 0, NULL, &uSize, &translation);
-
-    /* Release the temporary CFString */
-    CFRelease(strUID);
-
-    if (RT_LIKELY(err == noErr))
-        return deviceID;
-
-    /* Return the unknown device on error. */
-    return kAudioDeviceUnknown;
-}
-
-/*******************************************************************************
- *
- * Global structures section
- *
- ******************************************************************************/
-
-/* Initialization status indicator used for the recreation of the AudioUnits. */
-#define CA_STATUS_UNINIT    UINT32_C(0) /* The device is uninitialized */
-#define CA_STATUS_IN_INIT   UINT32_C(1) /* The device is currently initializing */
-#define CA_STATUS_INIT      UINT32_C(2) /* The device is initialized */
-#define CA_STATUS_IN_UNINIT UINT32_C(3) /* The device is currently uninitializing */
-#define CA_STATUS_REINIT    UINT32_C(4) /* The device has to be reinitialized */
-
-/* Error code which indicates "End of data" */
-static const OSStatus caConverterEOFDErr = 0x656F6664; /* 'eofd' */
-
-typedef struct COREAUDIOSTREAMOUT
-{
-    /** Host stream out. */
-    PDMAUDIOHSTSTRMOUT          streamOut;
-    /** Stream description which is default on the device. */
-    AudioStreamBasicDescription deviceFormat;
-    /** Stream description which is selected for using with VBox. */
-    AudioStreamBasicDescription streamFormat;
-    /** The audio device ID of the currently used device. */
-    AudioDeviceID               deviceID;
-    /** The AudioUnit being used. */
-    AudioUnit                   audioUnit;
-    /** A ring buffer for transferring data to the playback thread. */
-    PRTCIRCBUF                  pBuf;
-    /** Initialization status tracker. Used when some of the device parameters
-     *  or the device itself is changed during the runtime. */
-    volatile uint32_t           status;
-    /** Flag whether the "default device changed" listener was registered. */
-    bool                        fDefDevChgListReg;
-} COREAUDIOSTREAMOUT, *PCOREAUDIOSTREAMOUT;
-
-typedef struct COREAUDIOSTREAMIN
-{
-    /** Host stream in. */
-    PDMAUDIOHSTSTRMIN           streamIn;
-    /** Stream description which is default on the device. */
-    AudioStreamBasicDescription deviceFormat;
-    /** Stream description which is selected for using with VBox. */
-    AudioStreamBasicDescription streamFormat;
-    /** The audio device ID of the currently used device. */
-    AudioDeviceID               deviceID;
-    /** The AudioUnit used. */
-    AudioUnit                   audioUnit;
-    /** The audio converter if necessary. */
-    AudioConverterRef           pConverter;
-    /** Native buffer used for render the audio data in the recording thread. */
-    AudioBufferList             bufferList;
-    /** Reading offset for the bufferList's buffer. */
-    uint32_t                    offBufferRead;
-    /** The ratio between the device & the stream sample rate. */
-    Float64                     sampleRatio;
-    /** A ring buffer for transferring data from the recording thread. */
-    PRTCIRCBUF                  pBuf;
-    /** Initialization status tracker. Used when some of the device parameters
-     *  or the device itself is changed during the runtime. */
-    volatile uint32_t           status;
-    /** Flag whether the "default device changed" listener was registered. */
-    bool                        fDefDevChgListReg;
-} COREAUDIOSTREAMIN, *PCOREAUDIOSTREAMIN;
-
-static int drvHostCoreAudioControlIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHstStrmIn, PDMAUDIOSTREAMCMD enmStreamCmd);
-static int drvHostCoreAudioInitInput(PPDMAUDIOHSTSTRMIN pHstStrmIn, uint32_t *pcSamples);
-static int drvHostCoreAudioFiniIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHstStrmIn);
-static int drvHostCoreAudioReinitInput(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHstStrmIn);
-
-static int drvHostCoreAudioControlOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHstStrmOut, PDMAUDIOSTREAMCMD enmStreamCmd);
-static int drvHostCoreAudioInitOutput(PPDMAUDIOHSTSTRMOUT pHstStrmOut, uint32_t *pcSamples);
-static int drvHostCoreAudioFiniOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHstStrmOut);
-static int drvHostCoreAudioReinitOutput(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHstStrmOut);
-static OSStatus drvHostCoreAudioPlaybackAudioDevicePropertyChanged(AudioObjectID propertyID, UInt32 nAddresses, const AudioObjectPropertyAddress properties[], void *pvUser);
-static OSStatus drvHostCoreAudioPlaybackCallback(void *pvUser, AudioUnitRenderActionFlags *pActionFlags, const AudioTimeStamp *pAudioTS, UInt32 uBusID, UInt32 cFrames, AudioBufferList* pBufData);
-
-/* Callback for getting notified when the default input/output device has been changed. */
-static DECLCALLBACK(OSStatus) drvHostCoreAudioDefaultDeviceChanged(AudioObjectID propertyID,
-                                                                   UInt32 nAddresses,
-                                                                   const AudioObjectPropertyAddress properties[],
-                                                                   void *pvUser)
-{
-    OSStatus err = noErr;
-
-    LogFlowFunc(("propertyID=%u nAddresses=%u pvUser=%p\n", propertyID, nAddresses, pvUser));
-
-    for (UInt32 idxAddress = 0; idxAddress < nAddresses; idxAddress++)
-    {
-        const AudioObjectPropertyAddress *pProperty = &properties[idxAddress];
-
-        switch (pProperty->mSelector)
-        {
-            case kAudioHardwarePropertyDefaultInputDevice:
-            {
-                PCOREAUDIOSTREAMIN pStreamIn = (PCOREAUDIOSTREAMIN)pvUser;
-
-                /* This listener is called on every change of the hardware
-                 * device. So check if the default device has really changed. */
-                UInt32 uSize = sizeof(pStreamIn->deviceID);
-                UInt32 uResp;
-                err = AudioObjectGetPropertyData(kAudioObjectSystemObject, pProperty, 0, NULL, &uSize, &uResp);
-
-                if (err == noErr)
-                {
-                    if (pStreamIn->deviceID != uResp)
-                    {
-                        LogRel(("CoreAudio: Default input device has changed\n"));
-
-                        /* We move the reinitialization to the next input event.
-                         * This make sure this thread isn't blocked and the
-                         * reinitialization is done when necessary only. */
-                        ASMAtomicXchgU32(&pStreamIn->status, CA_STATUS_REINIT);
-                    }
-                }
-                break;
-            }
-
-            case kAudioHardwarePropertyDefaultOutputDevice:
-            {
-                PCOREAUDIOSTREAMOUT pStreamOut = (PCOREAUDIOSTREAMOUT)pvUser;
-
-                /* This listener is called on every change of the hardware
-                 * device. So check if the default device has really changed. */
-                AudioObjectPropertyAddress propAdr = { kAudioHardwarePropertyDefaultOutputDevice,
-                                                       kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster };
-
-                UInt32 uSize = sizeof(pStreamOut->deviceID);
-                UInt32 uResp;
-                err = AudioObjectGetPropertyData(kAudioObjectSystemObject, &propAdr, 0, NULL, &uSize, &uResp);
-
-                if (err == noErr)
-                {
-                    if (pStreamOut->deviceID != uResp)
-                    {
-                        LogRel(("CoreAudio: Default output device has changed\n"));
-
-                        /* We move the reinitialization to the next input event.
-                         * This make sure this thread isn't blocked and the
-                         * reinitialization is done when necessary only. */
-                        ASMAtomicXchgU32(&pStreamOut->status, CA_STATUS_REINIT);
-                    }
-                }
-                break;
-            }
-
-            default:
-                break;
-        }
-    }
-
-    return noErr;
-}
-
-static int drvHostCoreAudioReinitInput(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHstStrmIn)
-{
-    PPDMDRVINS pDrvIns      = PDMIBASE_2_PDMDRV(pInterface);
-    PDRVHOSTCOREAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTCOREAUDIO);
-
-    PCOREAUDIOSTREAMIN pStreamIn = (PCOREAUDIOSTREAMIN)pHstStrmIn;
-
-    int rc = drvHostCoreAudioFiniIn(pInterface, &pStreamIn->streamIn);
-    if (RT_SUCCESS(rc))
-    {
-        rc = drvHostCoreAudioInitInput(&pStreamIn->streamIn, NULL /* pcSamples */);
-        if (RT_SUCCESS(rc))
-            rc = drvHostCoreAudioControlIn(pInterface, &pStreamIn->streamIn, PDMAUDIOSTREAMCMD_ENABLE);
-    }
-
-    if (RT_FAILURE(rc))
-        LogRel(("CoreAudio: Unable to re-init input stream: %Rrc\n", rc));
-
-    return rc;
-}
-
-static int drvHostCoreAudioReinitOutput(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHstStrmOut)
-{
-    PPDMDRVINS pDrvIns      = PDMIBASE_2_PDMDRV(pInterface);
-    PDRVHOSTCOREAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTCOREAUDIO);
-
-    PCOREAUDIOSTREAMOUT pStreamOut = (PCOREAUDIOSTREAMOUT)pHstStrmOut;
-
-    int rc = drvHostCoreAudioFiniOut(pInterface, &pStreamOut->streamOut);
-    if (RT_SUCCESS(rc))
-    {
-        rc = drvHostCoreAudioInitOutput(&pStreamOut->streamOut, NULL /* pcSamples */);
-        if (RT_SUCCESS(rc))
-            rc = drvHostCoreAudioControlOut(pInterface, &pStreamOut->streamOut, PDMAUDIOSTREAMCMD_ENABLE);
-    }
-
-    if (RT_FAILURE(rc))
-        LogRel(("CoreAudio: Unable to re-init output stream: %Rrc\n", rc));
-
-    return rc;
-}
-
-/* Callback for getting notified when some of the properties of an audio device has changed. */
-static DECLCALLBACK(OSStatus) drvHostCoreAudioRecordingAudioDevicePropertyChanged(AudioObjectID                     propertyID,
-                                                                                  UInt32                            cAdresses,
-                                                                                  const AudioObjectPropertyAddress  aProperties[],
-                                                                                  void                             *pvUser)
-{
-    PCOREAUDIOSTREAMIN pStreamIn = (PCOREAUDIOSTREAMIN)pvUser;
-
-    switch (propertyID)
-    {
-#ifdef DEBUG
-        case kAudioDeviceProcessorOverload:
-        {
-            LogFunc(("Processor overload detected!\n"));
-            break;
-        }
-#endif /* DEBUG */
-        case kAudioDevicePropertyNominalSampleRate:
-        {
-            LogRel(("CoreAudio: Recording sample rate changed\n"));
-
-            /* We move the reinitialization to the next input event.
-             * This make sure this thread isn't blocked and the
-             * reinitialization is done when necessary only. */
-            ASMAtomicXchgU32(&pStreamIn->status, CA_STATUS_REINIT);
-            break;
-        }
-
-        default:
-            break;
-    }
-
-    return noErr;
-}
-
-/* Callback to convert audio input data from one format to another. */
-static DECLCALLBACK(OSStatus) drvHostCoreAudioConverterCallback(AudioConverterRef              converterID,
-                                                                UInt32                        *pcPackets,
-                                                                AudioBufferList               *pBufData,
-                                                                AudioStreamPacketDescription **ppPacketDesc,
-                                                                void                          *pvUser)
-{
-    /** @todo Check incoming pointers. */
-
-    PCOREAUDIOSTREAMIN pStreamIn = (PCOREAUDIOSTREAMIN)pvUser;
-
-    /** @todo Check converter ID? */
-
-    const AudioBufferList *pBufferList = &pStreamIn->bufferList;
-
-    if (ASMAtomicReadU32(&pStreamIn->status) != CA_STATUS_INIT)
-        return noErr;
-
-    /** @todo In principle we had to check here if the source is non interleaved, and if so,
-     *        so go through all buffers not only the first one like now. */
-
-    /* Use the lower one of the packets to process & the available packets in the buffer. */
-    Assert(pBufferList->mBuffers[0].mDataByteSize >= pStreamIn->offBufferRead);
-    UInt32 cSize = RT_MIN(*pcPackets * pStreamIn->deviceFormat.mBytesPerPacket,
-                          pBufferList->mBuffers[0].mDataByteSize - pStreamIn->offBufferRead);
-
-    /* Set the new size on output, so the caller know what we have processed. */
-    Assert(pStreamIn->deviceFormat.mBytesPerPacket);
-    *pcPackets = cSize / pStreamIn->deviceFormat.mBytesPerPacket;
-
-    OSStatus err;
-
-    /* If no data is available anymore we return with an error code. This error code will be returned
-     * from AudioConverterFillComplexBuffer. */
-    if (*pcPackets == 0)
-    {
-        pBufData->mBuffers[0].mDataByteSize = 0;
-        pBufData->mBuffers[0].mData         = NULL;
-
-        err = caConverterEOFDErr;
-    }
-    else
-    {
-        pBufData->mBuffers[0].mNumberChannels = pBufferList->mBuffers[0].mNumberChannels;
-        pBufData->mBuffers[0].mDataByteSize   = cSize;
-        pBufData->mBuffers[0].mData           = (uint8_t *)pBufferList->mBuffers[0].mData + pStreamIn->offBufferRead;
-
-        pStreamIn->offBufferRead += cSize;
-
-        err = noErr;
-    }
-
-    return err;
-}
-
-/* Callback to feed audio input buffer. */
-static DECLCALLBACK(OSStatus) drvHostCoreAudioRecordingCallback(void                       *pvUser,
-                                                                AudioUnitRenderActionFlags *pActionFlags,
-                                                                const AudioTimeStamp       *pAudioTS,
-                                                                UInt32                      uBusID,
-                                                                UInt32                      cFrames,
-                                                                AudioBufferList            *pBufData)
-{
-    PCOREAUDIOSTREAMIN pStreamIn  = (PCOREAUDIOSTREAMIN)pvUser;
-    PPDMAUDIOHSTSTRMIN pHstStrmIN = &pStreamIn->streamIn;
-
-    if (ASMAtomicReadU32(&pStreamIn->status) != CA_STATUS_INIT)
-        return noErr;
-
-    /* If nothing is pending return immediately. */
-    if (cFrames == 0)
-        return noErr;
-
-    OSStatus err = noErr;
-    int rc = VINF_SUCCESS;
-
-    do
-    {
-        /* Are we using a converter? */
-        if (pStreamIn->pConverter)
-        {
-            /* First, render the data as usual. */
-            pStreamIn->bufferList.mBuffers[0].mNumberChannels = pStreamIn->deviceFormat.mChannelsPerFrame;
-            pStreamIn->bufferList.mBuffers[0].mDataByteSize   = pStreamIn->deviceFormat.mBytesPerFrame * cFrames;
-            AssertBreakStmt(pStreamIn->bufferList.mBuffers[0].mDataByteSize, rc = VERR_INVALID_PARAMETER);
-            pStreamIn->bufferList.mBuffers[0].mData           = RTMemAlloc(pStreamIn->bufferList.mBuffers[0].mDataByteSize);
-            if (!pStreamIn->bufferList.mBuffers[0].mData)
-            {
-                rc = VERR_NO_MEMORY;
-                break;
-            }
-
-            err = AudioUnitRender(pStreamIn->audioUnit, pActionFlags, pAudioTS, uBusID, cFrames, &pStreamIn->bufferList);
-            if (err != noErr)
-            {
-                LogRel2(("CoreAudio: Failed rendering converted audio input data (%RI32)\n", err));
-                rc = VERR_IO_GEN_FAILURE; /** @todo Improve this. */
-                break;
-            }
-
-            size_t cbAvail = RT_MIN(RTCircBufFree(pStreamIn->pBuf), pStreamIn->bufferList.mBuffers[0].mDataByteSize);
-
-            /* Initialize the temporary output buffer */
-            AudioBufferList tmpList;
-            tmpList.mNumberBuffers = 1;
-            tmpList.mBuffers[0].mNumberChannels = pStreamIn->streamFormat.mChannelsPerFrame;
-
-            /* Set the read position to zero. */
-            pStreamIn->offBufferRead = 0;
-
-            /* Iterate as long as data is available. */
-            uint8_t *puDst = NULL;
-            while (cbAvail)
-            {
-                /* Try to acquire the necessary space from the ring buffer. */
-                size_t cbToWrite = 0;
-                RTCircBufAcquireWriteBlock(pStreamIn->pBuf, cbAvail, (void **)&puDst, &cbToWrite);
-                if (!cbToWrite)
-                    break;
-
-                /* Now set how much space is available for output. */
-                Assert(pStreamIn->streamFormat.mBytesPerPacket);
-
-                UInt32 ioOutputDataPacketSize = cbToWrite / pStreamIn->streamFormat.mBytesPerPacket;
-
-                /* Set our ring buffer as target. */
-                tmpList.mBuffers[0].mDataByteSize = cbToWrite;
-                tmpList.mBuffers[0].mData         = puDst;
-
-                AudioConverterReset(pStreamIn->pConverter);
-
-                err = AudioConverterFillComplexBuffer(pStreamIn->pConverter, drvHostCoreAudioConverterCallback, pStreamIn,
-                                                      &ioOutputDataPacketSize, &tmpList, NULL);
-                if(   err != noErr
-                   && err != caConverterEOFDErr)
-                {
-                    LogFlowFunc(("Failed to convert audio data (%RI32:%c%c%c%c)\n", err,
-                                 RT_BYTE4(err), RT_BYTE3(err), RT_BYTE2(err), RT_BYTE1(err)));
-                    rc = VERR_IO_GEN_FAILURE;
-                    break;
-                }
-
-                /* Check in any case what processed size is returned. It could be less than we expected. */
-                cbToWrite = ioOutputDataPacketSize * pStreamIn->streamFormat.mBytesPerPacket;
-
-                /* Release the ring buffer, so the main thread could start reading this data. */
-                RTCircBufReleaseWriteBlock(pStreamIn->pBuf, cbToWrite);
-
-                /* If the error is "End of Data" it means there is no data anymore
-                 * which could be converted. So end here now. */
-                if (err == caConverterEOFDErr)
-                    break;
-
-                Assert(cbAvail >= cbToWrite);
-                cbAvail -= cbToWrite;
-            }
-        }
-        else /* No converter being used. */
-        {
-            AssertBreakStmt(pStreamIn->streamFormat.mChannelsPerFrame >= 1,    rc = VERR_INVALID_PARAMETER);
-            AssertBreakStmt(pStreamIn->streamFormat.mBytesPerFrame >= 1,       rc = VERR_INVALID_PARAMETER);
-
-            AssertBreakStmt(pStreamIn->bufferList.mNumberBuffers >= 1,         rc = VERR_INVALID_PARAMETER);
-            AssertBreakStmt(pStreamIn->bufferList.mBuffers[0].mNumberChannels, rc = VERR_INVALID_PARAMETER);
-
-            pStreamIn->bufferList.mBuffers[0].mNumberChannels = pStreamIn->streamFormat.mChannelsPerFrame;
-            pStreamIn->bufferList.mBuffers[0].mDataByteSize   = pStreamIn->streamFormat.mBytesPerFrame * cFrames;
-            pStreamIn->bufferList.mBuffers[0].mData           = RTMemAlloc(pStreamIn->bufferList.mBuffers[0].mDataByteSize);
-            if (!pStreamIn->bufferList.mBuffers[0].mData)
-            {
-                rc = VERR_NO_MEMORY;
-                break;
-            }
-
-            err = AudioUnitRender(pStreamIn->audioUnit, pActionFlags, pAudioTS, uBusID, cFrames, &pStreamIn->bufferList);
-            if (err != noErr)
-            {
-                LogRel2(("CoreAudio: Failed rendering non-coverted audio input data (%RI32)\n", err));
-                rc = VERR_IO_GEN_FAILURE; /** @todo Improve this. */
-                break;
-            }
-
-            const uint32_t cbDataSize = pStreamIn->bufferList.mBuffers[0].mDataByteSize;
-            const size_t   cbBufFree  = RTCircBufFree(pStreamIn->pBuf);
-                  size_t   cbAvail    = RT_MIN(cbDataSize, cbBufFree);
-
-            LogFlowFunc(("cbDataSize=%RU32, cbBufFree=%zu, cbAvail=%zu\n", cbDataSize, cbBufFree, cbAvail));
-
-            /* Iterate as long as data is available. */
-            uint8_t *puDst = NULL;
-            uint32_t cbWrittenTotal = 0;
-            while (cbAvail)
-            {
-                /* Try to acquire the necessary space from the ring buffer. */
-                size_t cbToWrite = 0;
-                RTCircBufAcquireWriteBlock(pStreamIn->pBuf, cbAvail, (void **)&puDst, &cbToWrite);
-                if (!cbToWrite)
-                    break;
-
-                /* Copy the data from the Core Audio buffer to the ring buffer. */
-                memcpy(puDst, (uint8_t *)pStreamIn->bufferList.mBuffers[0].mData + cbWrittenTotal, cbToWrite);
-
-                /* Release the ring buffer, so the main thread could start reading this data. */
-                RTCircBufReleaseWriteBlock(pStreamIn->pBuf, cbToWrite);
-
-                cbWrittenTotal += cbToWrite;
-
-                Assert(cbAvail >= cbToWrite);
-                cbAvail -= cbToWrite;
-            }
-
-            LogFlowFunc(("cbWrittenTotal=%RU32, cbLeft=%zu\n", cbWrittenTotal, cbAvail));
-        }
-
-    } while (0);
-
-    if (pStreamIn->bufferList.mBuffers[0].mData)
-    {
-        RTMemFree(pStreamIn->bufferList.mBuffers[0].mData);
-        pStreamIn->bufferList.mBuffers[0].mData = NULL;
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return err;
-}
-
-/** @todo Eventually split up this function, as this already is huge! */
-static int drvHostCoreAudioInitInput(PPDMAUDIOHSTSTRMIN pHstStrmIn, uint32_t *pcSamples)
-{
-    OSStatus err = noErr;
-
-    PCOREAUDIOSTREAMIN pStreamIn = (PCOREAUDIOSTREAMIN)pHstStrmIn;
-
-    ASMAtomicXchgU32(&pStreamIn->status, CA_STATUS_IN_INIT);
-
-    UInt32 uSize = 0;
-    if (pStreamIn->deviceID == kAudioDeviceUnknown)
-    {
-        /* Fetch the default audio input device currently in use. */
-        AudioObjectPropertyAddress propAdr = { kAudioHardwarePropertyDefaultInputDevice,
-                                               kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster };
-        uSize = sizeof(pStreamIn->deviceID);
-        err = AudioObjectGetPropertyData(kAudioObjectSystemObject, &propAdr, 0, NULL, &uSize,  &pStreamIn->deviceID);
-        if (err != noErr)
-        {
-            LogRel(("CoreAudio: Unable to determine default input device (%RI32)\n", err));
-            return VERR_NOT_FOUND;
-        }
-    }
-
-    /*
-     * Try to get the name of the input device and log it. It's not fatal if it fails.
-     */
-    CFStringRef strTemp;
-
-    AudioObjectPropertyAddress propAdr = { kAudioObjectPropertyName, kAudioObjectPropertyScopeGlobal,
-                                           kAudioObjectPropertyElementMaster };
-    uSize = sizeof(CFStringRef);
-    err = AudioObjectGetPropertyData(pStreamIn->deviceID, &propAdr, 0, NULL, &uSize, &strTemp);
-    if (err == noErr)
-    {
-        char *pszDevName = NULL;
-        err = drvHostCoreAudioCFStringToCString(strTemp, &pszDevName);
-        if (err == noErr)
-        {
-            CFRelease(strTemp);
-
-            /* Get the device' UUID. */
-            propAdr.mSelector = kAudioDevicePropertyDeviceUID;
-            err = AudioObjectGetPropertyData(pStreamIn->deviceID, &propAdr, 0, NULL, &uSize, &strTemp);
-            if (err == noErr)
-            {
-                char *pszUID = NULL;
-                err = drvHostCoreAudioCFStringToCString(strTemp, &pszUID);
-                if (err == noErr)
-                {
-                    CFRelease(strTemp);
-                    LogRel(("CoreAudio: Using input device: %s (UID: %s)\n", pszDevName, pszUID));
-
-                    RTMemFree(pszUID);
-                }
-            }
-
-            RTMemFree(pszDevName);
-        }
-    }
-    else
-        LogRel(("CoreAudio: Unable to determine input device name (%RI32)\n", err));
-
-    /* Get the default frames buffer size, so that we can setup our internal buffers. */
-    UInt32 cFrames;
-    uSize = sizeof(cFrames);
-    propAdr.mSelector = kAudioDevicePropertyBufferFrameSize;
-    propAdr.mScope    = kAudioDevicePropertyScopeInput;
-    err = AudioObjectGetPropertyData(pStreamIn->deviceID, &propAdr, 0, NULL, &uSize, &cFrames);
-    if (err != noErr)
-    {
-        LogRel(("CoreAudio: Failed to determine frame buffer size of the audio input device (%RI32)\n", err));
-        return VERR_AUDIO_BACKEND_INIT_FAILED;
-    }
-
-    /* Set the frame buffer size and honor any minimum/maximum restrictions on the device. */
-    err = drvHostCoreAudioSetFrameBufferSize(pStreamIn->deviceID, true /* fInput */, cFrames, &cFrames);
-    if (err != noErr)
-    {
-        LogRel(("CoreAudio: Failed to set frame buffer size for the audio input device (%RI32)\n", err));
-        return VERR_AUDIO_BACKEND_INIT_FAILED;
-    }
-
-    LogFlowFunc(("cFrames=%RU32\n", cFrames));
-
-    ComponentDescription cd;
-    RT_ZERO(cd);
-    cd.componentType         = kAudioUnitType_Output;
-    cd.componentSubType      = kAudioUnitSubType_HALOutput;
-    cd.componentManufacturer = kAudioUnitManufacturer_Apple;
-
-    /* Try to find the default HAL output component. */
-    Component cp = FindNextComponent(NULL, &cd);
-    if (cp == 0)
-    {
-        LogRel(("CoreAudio: Failed to find HAL output component\n")); /** @todo Return error value? */
-        return VERR_AUDIO_BACKEND_INIT_FAILED;
-    }
-
-    /* Open the default HAL output component. */
-    err = OpenAComponent(cp, &pStreamIn->audioUnit);
-    if (err != noErr)
-    {
-        LogRel(("CoreAudio: Failed to open output component (%RI32)\n", err));
-        return VERR_AUDIO_BACKEND_INIT_FAILED;
-    }
-
-    /* Switch the I/O mode for input to on. */
-    UInt32 uFlag = 1;
-    err = AudioUnitSetProperty(pStreamIn->audioUnit, kAudioOutputUnitProperty_EnableIO, kAudioUnitScope_Input,
-                               1, &uFlag, sizeof(uFlag));
-    if (err != noErr)
-    {
-        LogRel(("CoreAudio: Failed to disable input I/O mode for input stream (%RI32)\n", err));
-        return VERR_AUDIO_BACKEND_INIT_FAILED;
-    }
-
-    /* Switch the I/O mode for output to off. This is important, as this is a pure input stream. */
-    uFlag = 0;
-    err = AudioUnitSetProperty(pStreamIn->audioUnit, kAudioOutputUnitProperty_EnableIO, kAudioUnitScope_Output,
-                               0, &uFlag, sizeof(uFlag));
-    if (err != noErr)
-    {
-        LogRel(("CoreAudio: Failed to disable output I/O mode for input stream (%RI32)\n", err));
-        return VERR_AUDIO_BACKEND_INIT_FAILED;
-    }
-
-    /* Set the default audio input device as the device for the new AudioUnit. */
-    err = AudioUnitSetProperty(pStreamIn->audioUnit, kAudioOutputUnitProperty_CurrentDevice, kAudioUnitScope_Global,
-                               0, &pStreamIn->deviceID, sizeof(pStreamIn->deviceID));
-    if (err != noErr)
-    {
-        LogRel(("CoreAudio: Failed to set current device (%RI32)\n", err));
-        return VERR_AUDIO_BACKEND_INIT_FAILED;
-    }
-
-    /*
-     * CoreAudio will inform us on a second thread for new incoming audio data.
-     * Therefor register a callback function which will process the new data.
-     */
-    AURenderCallbackStruct cb;
-    RT_ZERO(cb);
-    cb.inputProc       = drvHostCoreAudioRecordingCallback;
-    cb.inputProcRefCon = pStreamIn;
-
-    err = AudioUnitSetProperty(pStreamIn->audioUnit, kAudioOutputUnitProperty_SetInputCallback, kAudioUnitScope_Global,
-                               0, &cb, sizeof(cb));
-    if (err != noErr)
-    {
-        LogRel(("CoreAudio: Failed to register input callback (%RI32)\n", err));
-        return VERR_AUDIO_BACKEND_INIT_FAILED;
-    }
-
-    /* Fetch the current stream format of the device. */
-    uSize = sizeof(pStreamIn->deviceFormat);
-    err = AudioUnitGetProperty(pStreamIn->audioUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input,
-                               1, &pStreamIn->deviceFormat, &uSize);
-    if (err != noErr)
-    {
-        LogRel(("CoreAudio: Failed to get device format (%RI32)\n", err));
-        return VERR_AUDIO_BACKEND_INIT_FAILED;
-    }
-
-    /* Create an AudioStreamBasicDescription based on our required audio settings. */
-    drvHostCoreAudioPCMInfoToASBDesc(&pStreamIn->streamIn.Props, &pStreamIn->streamFormat);
-
-    drvHostCoreAudioPrintASBDesc("CoreAudio: Input device", &pStreamIn->deviceFormat);
-    drvHostCoreAudioPrintASBDesc("CoreAudio: Input stream", &pStreamIn->streamFormat);
-
-    /* If the frequency of the device is different from the requested one we
-     * need a converter. The same count if the number of channels is different. */
-    if (   pStreamIn->deviceFormat.mSampleRate       != pStreamIn->streamFormat.mSampleRate
-        || pStreamIn->deviceFormat.mChannelsPerFrame != pStreamIn->streamFormat.mChannelsPerFrame)
-    {
-        LogRel(("CoreAudio: Input converter is active\n"));
-
-        err = AudioConverterNew(&pStreamIn->deviceFormat, &pStreamIn->streamFormat, &pStreamIn->pConverter);
-        if (RT_UNLIKELY(err != noErr))
-        {
-            LogRel(("CoreAudio: Failed to create the audio converter (%RI32)\n", err));
-            return VERR_AUDIO_BACKEND_INIT_FAILED;
-        }
-
-        if (   pStreamIn->deviceFormat.mChannelsPerFrame == 1 /* Mono */
-            && pStreamIn->streamFormat.mChannelsPerFrame == 2 /* Stereo */)
-        {
-            /*
-             * If the channel count is different we have to tell this the converter
-             * and supply a channel mapping. For now we only support mapping
-             * from mono to stereo. For all other cases the core audio defaults
-             * are used, which means dropping additional channels in most
-             * cases.
-             */
-            const SInt32 channelMap[2] = {0, 0}; /* Channel map for mono -> stereo, */
-
-            err = AudioConverterSetProperty(pStreamIn->pConverter, kAudioConverterChannelMap, sizeof(channelMap), channelMap);
-            if (err != noErr)
-            {
-                LogRel(("CoreAudio: Failed to set channel mapping (mono -> stereo) for the audio input converter (%RI32)\n", err));
-                return VERR_AUDIO_BACKEND_INIT_FAILED;
-            }
-        }
-#if 0
-        /* Set sample rate converter quality to maximum */
-        uFlag = kAudioConverterQuality_Max;
-        err = AudioConverterSetProperty(pStreamIn->converter, kAudioConverterSampleRateConverterQuality,
-                                        sizeof(uFlag), &uFlag);
-        if (err != noErr)
-            LogRel(("CoreAudio: Failed to set input audio converter quality to the maximum (%RI32)\n", err));
-#endif
-
-        /* Set the new format description for the stream. */
-        err = AudioUnitSetProperty(pStreamIn->audioUnit,
-                                   kAudioUnitProperty_StreamFormat,
-                                   kAudioUnitScope_Output,
-                                   1,
-                                   &pStreamIn->deviceFormat,
-                                   sizeof(pStreamIn->deviceFormat));
-        if (RT_UNLIKELY(err != noErr))
-        {
-            LogRel(("CoreAudio: Failed to set input stream output format (%RI32)\n", err));
-            return VERR_AUDIO_BACKEND_INIT_FAILED;
-        }
-
-        err = AudioUnitSetProperty(pStreamIn->audioUnit,
-                                   kAudioUnitProperty_StreamFormat,
-                                   kAudioUnitScope_Input,
-                                   1,
-                                   &pStreamIn->deviceFormat,
-                                   sizeof(pStreamIn->deviceFormat));
-        if (RT_UNLIKELY(err != noErr))
-        {
-            LogRel(("CoreAudio: Failed to set stream input format (%RI32)\n", err));
-            return VERR_AUDIO_BACKEND_INIT_FAILED;
-        }
-    }
-    else
-    {
-
-        /* Set the new output format description for the input stream. */
-        err = AudioUnitSetProperty(pStreamIn->audioUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Output,
-                                   1, &pStreamIn->streamFormat, sizeof(pStreamIn->streamFormat));
-        if (err != noErr)
-        {
-            LogRel(("CoreAudio: Failed to set output format for input stream (%RI32)\n", err));
-            return VERR_AUDIO_BACKEND_INIT_FAILED;
-        }
-    }
-
-    /*
-     * Also set the frame buffer size off the device on our AudioUnit. This
-     * should make sure that the frames count which we receive in the render
-     * thread is as we like.
-     */
-    err = AudioUnitSetProperty(pStreamIn->audioUnit, kAudioUnitProperty_MaximumFramesPerSlice, kAudioUnitScope_Global,
-                               1, &cFrames, sizeof(cFrames));
-    if (err != noErr)    {
-        LogRel(("CoreAudio: Failed to set maximum frame buffer size for input stream (%RI32)\n", err));
-        return VERR_AUDIO_BACKEND_INIT_FAILED;
-    }
-
-    /* Finally initialize the new AudioUnit. */
-    err = AudioUnitInitialize(pStreamIn->audioUnit);
-    if (err != noErr)
-    {
-        LogRel(("CoreAudio: Failed to initialize audio unit for input stream (%RI32)\n", err));
-        return VERR_AUDIO_BACKEND_INIT_FAILED;
-    }
-
-    uSize = sizeof(pStreamIn->deviceFormat);
-    err = AudioUnitGetProperty(pStreamIn->audioUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Output,
-                               1, &pStreamIn->deviceFormat, &uSize);
-    if (err != noErr)
-    {
-        LogRel(("CoreAudio: Failed to get input device format (%RI32)\n", err));
-        return VERR_AUDIO_BACKEND_INIT_FAILED;
-    }
-
-    /*
-     * There are buggy devices (e.g. my Bluetooth headset) which doesn't honor
-     * the frame buffer size set in the previous calls. So finally get the
-     * frame buffer size after the AudioUnit was initialized.
-     */
-    uSize = sizeof(cFrames);
-    err = AudioUnitGetProperty(pStreamIn->audioUnit, kAudioUnitProperty_MaximumFramesPerSlice, kAudioUnitScope_Global,
-                               0, &cFrames, &uSize);
-    if (err != noErr)
-    {
-        LogRel(("CoreAudio: Failed to get maximum frame buffer size from input audio device (%RI32)\n", err));
-        return VERR_AUDIO_BACKEND_INIT_FAILED;
-    }
-
-    /* Destroy any former internal ring buffer. */
-    if (pStreamIn->pBuf)
-    {
-        RTCircBufDestroy(pStreamIn->pBuf);
-        pStreamIn->pBuf = NULL;
-    }
-
-    /* Calculate the ratio between the device and the stream sample rate. */
-    pStreamIn->sampleRatio = pStreamIn->streamFormat.mSampleRate / pStreamIn->deviceFormat.mSampleRate;
-
-    /* Create the AudioBufferList structure with one buffer. */
-    pStreamIn->bufferList.mNumberBuffers = 1;
-    /* Initialize the buffer to nothing. */
-    pStreamIn->bufferList.mBuffers[0].mNumberChannels = pStreamIn->streamFormat.mChannelsPerFrame;
-    pStreamIn->bufferList.mBuffers[0].mDataByteSize = 0;
-    pStreamIn->bufferList.mBuffers[0].mData = NULL;
-
-    int rc = VINF_SUCCESS;
-
-    /*
-     * Make sure that the ring buffer is big enough to hold the recording
-     * data. Compare the maximum frames per slice value with the frames
-     * necessary when using the converter where the sample rate could differ.
-     * The result is always multiplied by the channels per frame to get the
-     * samples count.
-     */
-    UInt32 cSamples = RT_MAX(cFrames,
-                             (cFrames * pStreamIn->deviceFormat.mBytesPerFrame * pStreamIn->sampleRatio)
-                              / pStreamIn->streamFormat.mBytesPerFrame)
-                             * pStreamIn->streamFormat.mChannelsPerFrame;
-    if (!cSamples)
-    {
-        LogRel(("CoreAudio: Failed to determine samples buffer count input stream\n"));
-        rc = VERR_INVALID_PARAMETER;
-    }
-
-    /* Create the internal ring buffer. */
-    if (RT_SUCCESS(rc))
-        rc = RTCircBufCreate(&pStreamIn->pBuf, cSamples << pHstStrmIn->Props.cShift);
-    if (RT_SUCCESS(rc))
-    {
-#ifdef DEBUG
-        propAdr.mSelector = kAudioDeviceProcessorOverload;
-        propAdr.mScope    = kAudioUnitScope_Global;
-        err = AudioObjectAddPropertyListener(pStreamIn->deviceID, &propAdr,
-                                             drvHostCoreAudioRecordingAudioDevicePropertyChanged, (void *)pStreamIn);
-        if (RT_UNLIKELY(err != noErr))
-            LogRel(("CoreAudio: Failed to add the processor overload listener for input stream (%RI32)\n", err));
-#endif /* DEBUG */
-        propAdr.mSelector = kAudioDevicePropertyNominalSampleRate;
-        propAdr.mScope    = kAudioUnitScope_Global;
-        err = AudioObjectAddPropertyListener(pStreamIn->deviceID, &propAdr,
-                                             drvHostCoreAudioRecordingAudioDevicePropertyChanged, (void *)pStreamIn);
-        /* Not fatal. */
-        if (RT_UNLIKELY(err != noErr))
-            LogRel(("CoreAudio: Failed to register sample rate changed listener for input stream (%RI32)\n", err));
-    }
-
-    if (RT_SUCCESS(rc))
-    {
-        ASMAtomicXchgU32(&pStreamIn->status, CA_STATUS_INIT);
-
-        if (pcSamples)
-            *pcSamples = cSamples;
-    }
-    else
-    {
-        AudioUnitUninitialize(pStreamIn->audioUnit);
-
-        if (pStreamIn->pBuf)
-        {
-            RTCircBufDestroy(pStreamIn->pBuf);
-            pStreamIn->pBuf = NULL;
-        }
-    }
-
-    LogFunc(("cSamples=%RU32, rc=%Rrc\n", cSamples, rc));
-    return rc;
-}
-
-/** @todo Eventually split up this function, as this already is huge! */
-static int drvHostCoreAudioInitOutput(PPDMAUDIOHSTSTRMOUT pHstStrmOut, uint32_t *pcSamples)
-{
-    PCOREAUDIOSTREAMOUT pStreamOut = (PCOREAUDIOSTREAMOUT)pHstStrmOut;
-
-    ASMAtomicXchgU32(&pStreamOut->status, CA_STATUS_IN_INIT);
-
-    OSStatus err = noErr;
-
-    UInt32 uSize = 0;
-    if (pStreamOut->deviceID == kAudioDeviceUnknown)
-    {
-        /* Fetch the default audio input device currently in use. */
-        AudioObjectPropertyAddress propAdr = { kAudioHardwarePropertyDefaultOutputDevice,
-                                               kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster };
-        uSize = sizeof(pStreamOut->deviceID);
-        err = AudioObjectGetPropertyData(kAudioObjectSystemObject, &propAdr, 0, NULL, &uSize, &pStreamOut->deviceID);
-        if (err != noErr)
-        {
-            LogRel(("CoreAudio: Unable to determine default output device (%RI32)\n", err));
-            return VERR_NOT_FOUND;
-        }
-    }
-
-    /*
-     * Try to get the name of the output device and log it. It's not fatal if it fails.
-     */
-    CFStringRef strTemp;
-
-    AudioObjectPropertyAddress propAdr = { kAudioObjectPropertyName, kAudioObjectPropertyScopeGlobal,
-                                           kAudioObjectPropertyElementMaster };
-    uSize = sizeof(CFStringRef);
-    err = AudioObjectGetPropertyData(pStreamOut->deviceID, &propAdr, 0, NULL, &uSize, &strTemp);
-    if (err == noErr)
-    {
-        char *pszDevName = NULL;
-        err = drvHostCoreAudioCFStringToCString(strTemp, &pszDevName);
-        if (err == noErr)
-        {
-            CFRelease(strTemp);
-
-            /* Get the device' UUID. */
-            propAdr.mSelector = kAudioDevicePropertyDeviceUID;
-            err = AudioObjectGetPropertyData(pStreamOut->deviceID, &propAdr, 0, NULL, &uSize, &strTemp);
-            if (err == noErr)
-            {
-                char *pszUID = NULL;
-                err = drvHostCoreAudioCFStringToCString(strTemp, &pszUID);
-                if (err == noErr)
-                {
-                    CFRelease(strTemp);
-                    LogRel(("CoreAudio: Using output device: %s (UID: %s)\n", pszDevName, pszUID));
-
-                    RTMemFree(pszUID);
-                }
-            }
-
-            RTMemFree(pszDevName);
-        }
-    }
-    else
-        LogRel(("CoreAudio: Unable to determine output device name (%RI32)\n", err));
-
-    /* Get the default frames buffer size, so that we can setup our internal buffers. */
-    UInt32 cFrames;
-    uSize = sizeof(cFrames);
-    propAdr.mSelector = kAudioDevicePropertyBufferFrameSize;
-    propAdr.mScope    = kAudioDevicePropertyScopeInput;
-    err = AudioObjectGetPropertyData(pStreamOut->deviceID, &propAdr, 0, NULL, &uSize, &cFrames);
-    if (err != noErr)
-    {
-        LogRel(("CoreAudio: Failed to determine frame buffer size of the audio output device (%RI32)\n", err));
-        return VERR_AUDIO_BACKEND_INIT_FAILED;
-    }
-
-    /* Set the frame buffer size and honor any minimum/maximum restrictions on the device. */
-    err = drvHostCoreAudioSetFrameBufferSize(pStreamOut->deviceID, false /* fInput */, cFrames, &cFrames);
-    if (err != noErr)
-    {
-        LogRel(("CoreAudio: Failed to set frame buffer size for the audio output device (%RI32)\n", err));
-        return VERR_AUDIO_BACKEND_INIT_FAILED;
-    }
-
-    ComponentDescription cd;
-    RT_ZERO(cd);
-    cd.componentType         = kAudioUnitType_Output;
-    cd.componentSubType      = kAudioUnitSubType_HALOutput;
-    cd.componentManufacturer = kAudioUnitManufacturer_Apple;
-
-    /* Try to find the default HAL output component. */
-    Component cp = FindNextComponent(NULL, &cd);
-    if (cp == 0)
-    {
-        LogRel(("CoreAudio: Failed to find HAL output component\n")); /** @todo Return error value? */
-        return VERR_AUDIO_BACKEND_INIT_FAILED;
-    }
-
-    /* Open the default HAL output component. */
-    err = OpenAComponent(cp, &pStreamOut->audioUnit);
-    if (err != noErr)
-    {
-        LogRel(("CoreAudio: Failed to open output component (%RI32)\n", err));
-        return VERR_AUDIO_BACKEND_INIT_FAILED;
-    }
-
-    /* Switch the I/O mode for output to on. */
-    UInt32 uFlag = 1;
-    err = AudioUnitSetProperty(pStreamOut->audioUnit, kAudioOutputUnitProperty_EnableIO, kAudioUnitScope_Output,
-                               0, &uFlag, sizeof(uFlag));
-    if (err != noErr)
-    {
-        LogRel(("CoreAudio: Failed to disable I/O mode for output stream (%RI32)\n", err));
-        return VERR_AUDIO_BACKEND_INIT_FAILED;
-    }
-
-    /* Set the default audio output device as the device for the new AudioUnit. */
-    err = AudioUnitSetProperty(pStreamOut->audioUnit, kAudioOutputUnitProperty_CurrentDevice, kAudioUnitScope_Global,
-                               0, &pStreamOut->deviceID, sizeof(pStreamOut->deviceID));
-    if (err != noErr)
-    {
-        LogRel(("CoreAudio: Failed to set current device for output stream (%RI32)\n", err));
-        return VERR_AUDIO_BACKEND_INIT_FAILED;
-    }
-
-    /*
-     * CoreAudio will inform us on a second thread for new incoming audio data.
-     * Therefor register a callback function which will process the new data.
-     */
-    AURenderCallbackStruct cb;
-    RT_ZERO(cb);
-    cb.inputProc       = drvHostCoreAudioPlaybackCallback; /* pvUser */
-    cb.inputProcRefCon = pStreamOut;
-
-    err = AudioUnitSetProperty(pStreamOut->audioUnit, kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Input,
-                               0, &cb, sizeof(cb));
-    if (err != noErr)
-    {
-        LogRel(("CoreAudio: Failed to register output callback (%RI32)\n", err));
-        return VERR_AUDIO_BACKEND_INIT_FAILED;
-    }
-
-    /* Fetch the current stream format of the device. */
-    uSize = sizeof(pStreamOut->deviceFormat);
-    err = AudioUnitGetProperty(pStreamOut->audioUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input,
-                               0, &pStreamOut->deviceFormat, &uSize);
-    if (err != noErr)
-    {
-        LogRel(("CoreAudio: Failed to get device format (%RI32)\n", err));
-        return VERR_AUDIO_BACKEND_INIT_FAILED;
-    }
-
-    /* Create an AudioStreamBasicDescription based on our required audio settings. */
-    drvHostCoreAudioPCMInfoToASBDesc(&pStreamOut->streamOut.Props, &pStreamOut->streamFormat);
-
-    drvHostCoreAudioPrintASBDesc("CoreAudio: Output device", &pStreamOut->deviceFormat);
-    drvHostCoreAudioPrintASBDesc("CoreAudio: Output format", &pStreamOut->streamFormat);
-
-    /* Set the new output format description for the stream. */
-    err = AudioUnitSetProperty(pStreamOut->audioUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input,
-                               0, &pStreamOut->streamFormat, sizeof(pStreamOut->streamFormat));
-    if (err != noErr)
-    {
-        LogRel(("CoreAudio: Failed to set stream format for output stream (%RI32)\n", err));
-        return VERR_AUDIO_BACKEND_INIT_FAILED;
-    }
-
-    uSize = sizeof(pStreamOut->deviceFormat);
-    err = AudioUnitGetProperty(pStreamOut->audioUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input,
-                               0, &pStreamOut->deviceFormat, &uSize);
-    if (err != noErr)
-    {
-        LogRel(("CoreAudio: Failed to retrieve device format for output stream (%RI32)\n", err));
-        return VERR_AUDIO_BACKEND_INIT_FAILED;
-    }
-
-    /*
-     * Also set the frame buffer size off the device on our AudioUnit. This
-     * should make sure that the frames count which we receive in the render
-     * thread is as we like.
-     */
-    err = AudioUnitSetProperty(pStreamOut->audioUnit, kAudioUnitProperty_MaximumFramesPerSlice, kAudioUnitScope_Global,
-                               0, &cFrames, sizeof(cFrames));
-    if (err != noErr)
-    {
-        LogRel(("CoreAudio: Failed to set maximum frame buffer size for output AudioUnit (%RI32)\n", err));
-        return VERR_AUDIO_BACKEND_INIT_FAILED;
-    }
-
-    /* Finally initialize the new AudioUnit. */
-    err = AudioUnitInitialize(pStreamOut->audioUnit);
-    if (err != noErr)
-    {
-        LogRel(("CoreAudio: Failed to initialize the output audio device (%RI32)\n", err));
-        return VERR_AUDIO_BACKEND_INIT_FAILED;
-    }
-
-    /*
-     * There are buggy devices (e.g. my Bluetooth headset) which doesn't honor
-     * the frame buffer size set in the previous calls. So finally get the
-     * frame buffer size after the AudioUnit was initialized.
-     */
-    uSize = sizeof(cFrames);
-    err = AudioUnitGetProperty(pStreamOut->audioUnit, kAudioUnitProperty_MaximumFramesPerSlice, kAudioUnitScope_Global,
-                               0, &cFrames, &uSize);
-    if (err != noErr)
-    {
-        LogRel(("CoreAudio: Failed to get maximum frame buffer size from output audio device (%RI32)\n", err));
-
-        AudioUnitUninitialize(pStreamOut->audioUnit);
-        return VERR_AUDIO_BACKEND_INIT_FAILED;
-    }
-
-    /*
-     * Make sure that the ring buffer is big enough to hold the recording
-     * data. Compare the maximum frames per slice value with the frames
-     * necessary when using the converter where the sample rate could differ.
-     * The result is always multiplied by the channels per frame to get the
-     * samples count.
-     */
-    int rc = VINF_SUCCESS;
-
-    UInt32 cSamples = cFrames * pStreamOut->streamFormat.mChannelsPerFrame;
-    if (!cSamples)
-    {
-        LogRel(("CoreAudio: Failed to determine samples buffer count output stream\n"));
-        rc = VERR_INVALID_PARAMETER;
-    }
-
-    /* Destroy any former internal ring buffer. */
-    if (pStreamOut->pBuf)
-    {
-        RTCircBufDestroy(pStreamOut->pBuf);
-        pStreamOut->pBuf = NULL;
-    }
-
-    /* Create the internal ring buffer. */
-    rc = RTCircBufCreate(&pStreamOut->pBuf, cSamples << pHstStrmOut->Props.cShift);
-    if (RT_SUCCESS(rc))
-    {
-        /*
-         * Register callbacks.
-         */
-#ifdef DEBUG
-        propAdr.mSelector = kAudioDeviceProcessorOverload;
-        propAdr.mScope    = kAudioUnitScope_Global;
-        err = AudioObjectAddPropertyListener(pStreamOut->deviceID, &propAdr,
-                                             drvHostCoreAudioPlaybackAudioDevicePropertyChanged, (void *)pStreamOut);
-        if (err != noErr)
-            LogRel(("CoreAudio: Failed to register processor overload listener for output stream (%RI32)\n", err));
-#endif /* DEBUG */
-
-        propAdr.mSelector = kAudioDevicePropertyNominalSampleRate;
-        propAdr.mScope    = kAudioUnitScope_Global;
-        err = AudioObjectAddPropertyListener(pStreamOut->deviceID, &propAdr,
-                                             drvHostCoreAudioPlaybackAudioDevicePropertyChanged, (void *)pStreamOut);
-        /* Not fatal. */
-        if (err != noErr)
-            LogRel(("CoreAudio: Failed to register sample rate changed listener for output stream (%RI32)\n", err));
-    }
-
-    if (RT_SUCCESS(rc))
-    {
-        ASMAtomicXchgU32(&pStreamOut->status, CA_STATUS_INIT);
-
-        if (pcSamples)
-            *pcSamples = cSamples;
-    }
-    else
-    {
-        AudioUnitUninitialize(pStreamOut->audioUnit);
-
-        if (pStreamOut->pBuf)
-        {
-            RTCircBufDestroy(pStreamOut->pBuf);
-            pStreamOut->pBuf = NULL;
-        }
-    }
-
-    LogFunc(("cSamples=%RU32, rc=%Rrc\n", cSamples, rc));
-    return rc;
-}
-
-static DECLCALLBACK(int) drvHostCoreAudioInit(PPDMIHOSTAUDIO pInterface)
-{
-    NOREF(pInterface);
-
-    LogFlowFuncEnter();
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) drvHostCoreAudioCaptureIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHstStrmIn,
-                                                   uint32_t *pcSamplesCaptured)
-{
-    PPDMDRVINS pDrvIns      = PDMIBASE_2_PDMDRV(pInterface);
-    PDRVHOSTCOREAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTCOREAUDIO);
-
-    PCOREAUDIOSTREAMIN pStreamIn = (PCOREAUDIOSTREAMIN)pHstStrmIn;
-
-    size_t csReads = 0;
-    char *pcSrc;
-    PPDMAUDIOSAMPLE psDst;
-
-    /* Check if the audio device should be reinitialized. If so do it. */
-    if (ASMAtomicReadU32(&pStreamIn->status) == CA_STATUS_REINIT)
-        drvHostCoreAudioReinitInput(pInterface, &pStreamIn->streamIn);
-
-    if (ASMAtomicReadU32(&pStreamIn->status) != CA_STATUS_INIT)
-    {
-        if (pcSamplesCaptured)
-            *pcSamplesCaptured = 0;
-        return VINF_SUCCESS;
-    }
-
-    int rc = VINF_SUCCESS;
-    uint32_t cbWrittenTotal = 0;
-
-    do
-    {
-        size_t cbBuf = AudioMixBufSizeBytes(&pHstStrmIn->MixBuf);
-        size_t cbToWrite = RT_MIN(cbBuf, RTCircBufUsed(pStreamIn->pBuf));
-
-        uint32_t cWritten, cbWritten;
-        uint8_t *puBuf;
-        size_t   cbToRead;
-
-        LogFlowFunc(("cbBuf=%zu, cbToWrite=%zu\n", cbBuf, cbToWrite));
-
-        while (cbToWrite)
-        {
-            /* Try to acquire the necessary block from the ring buffer. */
-            RTCircBufAcquireReadBlock(pStreamIn->pBuf, cbToWrite, (void **)&puBuf, &cbToRead);
-            if (!cbToRead)
-            {
-                RTCircBufReleaseReadBlock(pStreamIn->pBuf, cbToRead);
-                break;
-            }
-
-            rc = AudioMixBufWriteCirc(&pHstStrmIn->MixBuf, puBuf, cbToRead, &cWritten);
-            if (   RT_FAILURE(rc)
-                || !cWritten)
-            {
-                RTCircBufReleaseReadBlock(pStreamIn->pBuf, cbToRead);
-                break;
-            }
-
-            cbWritten = AUDIOMIXBUF_S2B(&pHstStrmIn->MixBuf, cWritten);
-
-            /* Release the read buffer, so it could be used for new data. */
-            RTCircBufReleaseReadBlock(pStreamIn->pBuf, cbWritten);
-
-            Assert(cbToWrite >= cbWritten);
-            cbToWrite      -= cbWritten;
-            cbWrittenTotal += cbWritten;
-        }
-
-        LogFlowFunc(("cbToWrite=%zu, cbToRead=%zu, cbWrittenTotal=%RU32, rc=%Rrc\n", cbToWrite, cbToRead, cbWrittenTotal, rc));
-    }
-    while (0);
-
-    if (RT_SUCCESS(rc))
-    {
-        uint32_t cCaptured     = 0;
-        uint32_t cWrittenTotal = AUDIOMIXBUF_B2S(&pHstStrmIn->MixBuf, cbWrittenTotal);
-        if (cWrittenTotal)
-            rc = AudioMixBufMixToParent(&pHstStrmIn->MixBuf, cWrittenTotal, &cCaptured);
-
-        LogFlowFunc(("cWrittenTotal=%RU32 (%RU32 bytes), cCaptured=%RU32, rc=%Rrc\n", cWrittenTotal, cbWrittenTotal, cCaptured, rc));
-
-        if (pcSamplesCaptured)
-            *pcSamplesCaptured = cCaptured;
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-/* Callback for getting notified when some of the properties of an audio device has changed. */
-static DECLCALLBACK(OSStatus) drvHostCoreAudioPlaybackAudioDevicePropertyChanged(AudioObjectID propertyID,
-                                                                                 UInt32 nAddresses,
-                                                                                 const AudioObjectPropertyAddress properties[],
-                                                                                 void *pvUser)
-{
-    switch (propertyID)
-    {
-#ifdef DEBUG
-        case kAudioDeviceProcessorOverload:
-        {
-            Log2(("CoreAudio: [Output] Processor overload detected!\n"));
-            break;
-        }
-#endif /* DEBUG */
-        default:
-            break;
-    }
-
-    return noErr;
-}
-
-/* Callback to feed audio output buffer. */
-static DECLCALLBACK(OSStatus) drvHostCoreAudioPlaybackCallback(void                       *pvUser,
-                                                               AudioUnitRenderActionFlags *pActionFlags,
-                                                               const AudioTimeStamp       *pAudioTS,
-                                                               UInt32                      uBusID,
-                                                               UInt32                      cFrames,
-                                                               AudioBufferList            *pBufData)
-{
-    PCOREAUDIOSTREAMOUT pStreamOut = (PCOREAUDIOSTREAMOUT)pvUser;
-    PPDMAUDIOHSTSTRMOUT pHstStrmOut = &pStreamOut->streamOut;
-
-    if (ASMAtomicReadU32(&pStreamOut->status) != CA_STATUS_INIT)
-    {
-        pBufData->mBuffers[0].mDataByteSize = 0;
-        return noErr;
-    }
-
-    /* How much space is used in the ring buffer? */
-    size_t cbDataAvail = RT_MIN(RTCircBufUsed(pStreamOut->pBuf), pBufData->mBuffers[0].mDataByteSize);
-    if (!cbDataAvail)
-    {
-        pBufData->mBuffers[0].mDataByteSize = 0;
-        return noErr;
-    }
-
-    uint8_t *pbSrc = NULL;
-    size_t cbRead = 0;
-    size_t cbToRead;
-    while (cbDataAvail)
-    {
-        /* Try to acquire the necessary block from the ring buffer. */
-        RTCircBufAcquireReadBlock(pStreamOut->pBuf, cbDataAvail, (void **)&pbSrc, &cbToRead);
-
-        /* Break if nothing is used anymore. */
-        if (!cbToRead)
-            break;
-
-        /* Copy the data from our ring buffer to the core audio buffer. */
-        memcpy((uint8_t *)pBufData->mBuffers[0].mData + cbRead, pbSrc, cbToRead);
-
-        /* Release the read buffer, so it could be used for new data. */
-        RTCircBufReleaseReadBlock(pStreamOut->pBuf, cbToRead);
-
-        /* Move offset. */
-        cbRead += cbToRead;
-        Assert(pBufData->mBuffers[0].mDataByteSize >= cbRead);
-
-        Assert(cbToRead <= cbDataAvail);
-        cbDataAvail -= cbToRead;
-    }
-
-    /* Write the bytes to the core audio buffer which where really written. */
-    pBufData->mBuffers[0].mDataByteSize = cbRead;
-
-    LogFlowFunc(("CoreAudio: [Output] Read %zu / %zu bytes\n", cbRead, cbDataAvail));
-
-    return noErr;
-}
-
-static DECLCALLBACK(int) drvHostCoreAudioPlayOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHstStrmOut,
-                                                 uint32_t *pcSamplesPlayed)
-{
-    PPDMDRVINS pDrvIns      = PDMIBASE_2_PDMDRV(pInterface);
-    PDRVHOSTCOREAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTCOREAUDIO);
-
-    PCOREAUDIOSTREAMOUT pStreamOut = (PCOREAUDIOSTREAMOUT)pHstStrmOut;
-
-    int rc = VINF_SUCCESS;
-
-    /* Check if the audio device should be reinitialized. If so do it. */
-    if (ASMAtomicReadU32(&pStreamOut->status) == CA_STATUS_REINIT)
-    {
-        rc = drvHostCoreAudioReinitOutput(pInterface, &pStreamOut->streamOut);
-        if (RT_FAILURE(rc))
-            return rc;
-    }
-
-    /* Not much else to do here. */
-
-    uint32_t cLive = AudioMixBufAvail(&pHstStrmOut->MixBuf);;
-    if (!cLive) /* Not samples to play? Bail out. */
-    {
-        if (pcSamplesPlayed)
-            *pcSamplesPlayed = 0;
-        return VINF_SUCCESS;
-    }
-
-    uint32_t cbReadTotal = 0;
-    uint32_t cAvail = AudioMixBufAvail(&pHstStrmOut->MixBuf);
-    size_t cbAvail  = AUDIOMIXBUF_S2B(&pHstStrmOut->MixBuf, cAvail);
-    size_t cbToRead = RT_MIN(cbAvail, RTCircBufFree(pStreamOut->pBuf));
-    LogFlowFunc(("cbToRead=%zu\n", cbToRead));
-
-    while (cbToRead)
-    {
-        uint32_t cRead, cbRead;
-        uint8_t *puBuf;
-        size_t   cbCopy;
-
-        /* Try to acquire the necessary space from the ring buffer. */
-        RTCircBufAcquireWriteBlock(pStreamOut->pBuf, cbToRead, (void **)&puBuf, &cbCopy);
-        if (!cbCopy)
-        {
-            RTCircBufReleaseWriteBlock(pStreamOut->pBuf, cbCopy);
-            break;
-        }
-
-        Assert(cbCopy <= cbToRead);
-
-        rc = AudioMixBufReadCirc(&pHstStrmOut->MixBuf,
-                                 puBuf, cbCopy, &cRead);
-
-        if (   RT_FAILURE(rc)
-            || !cRead)
-        {
-            RTCircBufReleaseWriteBlock(pStreamOut->pBuf, 0);
-            break;
-        }
-
-        cbRead = AUDIOMIXBUF_S2B(&pHstStrmOut->MixBuf, cRead);
-
-        /* Release the ring buffer, so the read thread could start reading this data. */
-        RTCircBufReleaseWriteBlock(pStreamOut->pBuf, cbRead);
-
-        Assert(cbToRead >= cbRead);
-        cbToRead -= cbRead;
-        cbReadTotal += cbRead;
-    }
-
-    if (RT_SUCCESS(rc))
-    {
-        uint32_t cReadTotal = AUDIOMIXBUF_B2S(&pHstStrmOut->MixBuf, cbReadTotal);
-        if (cReadTotal)
-            AudioMixBufFinish(&pHstStrmOut->MixBuf, cReadTotal);
-
-        LogFlowFunc(("cReadTotal=%RU32 (%RU32 bytes)\n", cReadTotal, cbReadTotal));
-
-        if (pcSamplesPlayed)
-            *pcSamplesPlayed = cReadTotal;
-    }
-
-    return rc;
-}
-
-static DECLCALLBACK(int) drvHostCoreAudioControlOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHstStrmOut,
-                                                    PDMAUDIOSTREAMCMD enmStreamCmd)
-{
-    PCOREAUDIOSTREAMOUT pStreamOut = (PCOREAUDIOSTREAMOUT)pHstStrmOut;
-
-    LogFlowFunc(("enmStreamCmd=%ld\n", enmStreamCmd));
-
-    uint32_t uStatus = ASMAtomicReadU32(&pStreamOut->status);
-    if (!(   uStatus == CA_STATUS_INIT
-          || uStatus == CA_STATUS_REINIT))
-    {
-        return VINF_SUCCESS;
-    }
-
-    int rc = VINF_SUCCESS;
-    OSStatus err;
-
-    switch (enmStreamCmd)
-    {
-        case PDMAUDIOSTREAMCMD_ENABLE:
-        case PDMAUDIOSTREAMCMD_RESUME:
-        {
-            /* Only start the device if it is actually stopped */
-            if (!drvHostCoreAudioIsRunning(pStreamOut->deviceID))
-            {
-                err = AudioUnitReset(pStreamOut->audioUnit, kAudioUnitScope_Input, 0);
-                if (err != noErr)
-                {
-                    LogRel(("CoreAudio: Failed to reset AudioUnit (%RI32)\n", err));
-                    /* Keep going. */
-                }
-                RTCircBufReset(pStreamOut->pBuf);
-
-                err = AudioOutputUnitStart(pStreamOut->audioUnit);
-                if (RT_UNLIKELY(err != noErr))
-                {
-                    LogRel(("CoreAudio: Failed to start playback (%RI32)\n", err));
-                    rc = VERR_GENERAL_FAILURE; /** @todo Fudge! */
-                }
-            }
-            break;
-        }
-
-        case PDMAUDIOSTREAMCMD_DISABLE:
-        case PDMAUDIOSTREAMCMD_PAUSE:
-        {
-            /* Only stop the device if it is actually running */
-            if (drvHostCoreAudioIsRunning(pStreamOut->deviceID))
-            {
-                err = AudioOutputUnitStop(pStreamOut->audioUnit);
-                if (err != noErr)
-                {
-                    LogRel(("CoreAudio: Failed to stop playback (%RI32)\n", err));
-                    rc = VERR_GENERAL_FAILURE; /** @todo Fudge! */
-                    break;
-                }
-
-                err = AudioUnitReset(pStreamOut->audioUnit, kAudioUnitScope_Input, 0);
-                if (err != noErr)
-                {
-                    LogRel(("CoreAudio: Failed to reset AudioUnit (%RI32)\n", err));
-                    rc = VERR_GENERAL_FAILURE; /** @todo Fudge! */
-                }
-            }
-            break;
-        }
-
-        default:
-            rc = VERR_NOT_SUPPORTED;
-            break;
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(int) drvHostCoreAudioControlIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHstStrmIn,
-                                                   PDMAUDIOSTREAMCMD enmStreamCmd)
-{
-    PCOREAUDIOSTREAMIN pStreamIn = (PCOREAUDIOSTREAMIN)pHstStrmIn;
-
-    LogFlowFunc(("enmStreamCmd=%ld\n", enmStreamCmd));
-
-    uint32_t uStatus = ASMAtomicReadU32(&pStreamIn->status);
-    if (!(   uStatus == CA_STATUS_INIT
-          || uStatus == CA_STATUS_REINIT))
-    {
-        return VINF_SUCCESS;
-    }
-
-    int rc = VINF_SUCCESS;
-    OSStatus err;
-
-    switch (enmStreamCmd)
-    {
-        case PDMAUDIOSTREAMCMD_ENABLE:
-        case PDMAUDIOSTREAMCMD_RESUME:
-        {
-            /* Only start the device if it is actually stopped */
-            if (!drvHostCoreAudioIsRunning(pStreamIn->deviceID))
-            {
-                RTCircBufReset(pStreamIn->pBuf);
-                err = AudioOutputUnitStart(pStreamIn->audioUnit);
-                if (err != noErr)
-                {
-                    LogRel(("CoreAudio: Failed to start recording (%RI32)\n", err));
-                    rc = VERR_GENERAL_FAILURE; /** @todo Fudge! */
-                    break;
-                }
-            }
-
-            if (err != noErr)
-            {
-                LogRel(("CoreAudio: Failed to start recording (%RI32)\n", err));
-                rc = VERR_GENERAL_FAILURE; /** @todo Fudge! */
-            }
-            break;
-        }
-
-        case PDMAUDIOSTREAMCMD_DISABLE:
-        case PDMAUDIOSTREAMCMD_PAUSE:
-        {
-            /* Only stop the device if it is actually running */
-            if (drvHostCoreAudioIsRunning(pStreamIn->deviceID))
-            {
-                err = AudioOutputUnitStop(pStreamIn->audioUnit);
-                if (err != noErr)
-                {
-                    LogRel(("CoreAudio: Failed to stop recording (%RI32)\n", err));
-                    rc = VERR_GENERAL_FAILURE; /** @todo Fudge! */
-                    break;
-                }
-
-                err = AudioUnitReset(pStreamIn->audioUnit, kAudioUnitScope_Input, 0);
-                if (err != noErr)
-                {
-                    LogRel(("CoreAudio: Failed to reset AudioUnit (%RI32)\n", err));
-                    rc = VERR_GENERAL_FAILURE; /** @todo Fudge! */
-                    break;
-                }
-            }
-            break;
-        }
-
-        default:
-            rc = VERR_NOT_SUPPORTED;
-            break;
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(int) drvHostCoreAudioFiniIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHstStrmIn)
-{
-    PCOREAUDIOSTREAMIN pStreamIn = (PCOREAUDIOSTREAMIN) pHstStrmIn;
-
-    PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
-    PDRVHOSTCOREAUDIO  pThis   = PDMINS_2_DATA(pDrvIns, PDRVHOSTCOREAUDIO);
-
-    LogFlowFuncEnter();
-
-    uint32_t status = ASMAtomicReadU32(&pStreamIn->status);
-    if (!(   status == CA_STATUS_INIT
-          || status == CA_STATUS_REINIT))
-    {
-        return VINF_SUCCESS;
-    }
-
-    OSStatus err = noErr;
-
-    int rc = drvHostCoreAudioControlIn(pInterface, &pStreamIn->streamIn, PDMAUDIOSTREAMCMD_DISABLE);
-    if (RT_SUCCESS(rc))
-    {
-        ASMAtomicXchgU32(&pStreamIn->status, CA_STATUS_IN_UNINIT);
-
-        /*
-         * Unregister input device callbacks.
-         */
-        AudioObjectPropertyAddress propAdr = { kAudioDeviceProcessorOverload, kAudioObjectPropertyScopeGlobal,
-                                               kAudioObjectPropertyElementMaster };
-#ifdef DEBUG
-        err = AudioObjectRemovePropertyListener(pStreamIn->deviceID, &propAdr,
-                                                drvHostCoreAudioRecordingAudioDevicePropertyChanged, pStreamIn);
-        /* Not Fatal */
-        if (RT_UNLIKELY(err != noErr))
-            LogRel(("CoreAudio: Failed to remove the processor overload listener (%RI32)\n", err));
-#endif /* DEBUG */
-
-        propAdr.mSelector = kAudioDevicePropertyNominalSampleRate;
-        err = AudioObjectRemovePropertyListener(pStreamIn->deviceID, &propAdr,
-                                                drvHostCoreAudioRecordingAudioDevicePropertyChanged, pStreamIn);
-        /* Not Fatal */
-        if (RT_UNLIKELY(err != noErr))
-            LogRel(("CoreAudio: Failed to remove the sample rate changed listener (%RI32)\n", err));
-
-        if (pStreamIn->fDefDevChgListReg)
-        {
-            propAdr.mSelector = kAudioHardwarePropertyDefaultInputDevice;
-            err = AudioObjectRemovePropertyListener(kAudioObjectSystemObject, &propAdr,
-                                                    drvHostCoreAudioDefaultDeviceChanged, pStreamIn);
-            if (RT_LIKELY(err == noErr))
-            {
-                pStreamIn->fDefDevChgListReg = false;
-            }
-            else
-                LogRel(("CoreAudio: [Output] Failed to remove the default input device changed listener (%RI32)\n", err));
-        }
-
-        if (pStreamIn->pConverter)
-        {
-            AudioConverterDispose(pStreamIn->pConverter);
-            pStreamIn->pConverter = NULL;
-        }
-
-        err = AudioUnitUninitialize(pStreamIn->audioUnit);
-        if (RT_LIKELY(err == noErr))
-        {
-            err = CloseComponent(pStreamIn->audioUnit);
-            if (RT_LIKELY(err == noErr))
-            {
-                pStreamIn->deviceID      = kAudioDeviceUnknown;
-                pStreamIn->audioUnit     = NULL;
-                pStreamIn->offBufferRead = 0;
-                pStreamIn->sampleRatio   = 1;
-                if (pStreamIn->pBuf)
-                {
-                    RTCircBufDestroy(pStreamIn->pBuf);
-                    pStreamIn->pBuf = NULL;
-                }
-
-                ASMAtomicXchgU32(&pStreamIn->status, CA_STATUS_UNINIT);
-            }
-            else
-            {
-                LogRel(("CoreAudio: Failed to close the AudioUnit (%RI32)\n", err));
-                rc = VERR_GENERAL_FAILURE; /** @todo Fudge! */
-            }
-        }
-        else
-        {
-            LogRel(("CoreAudio: Failed to uninitialize the AudioUnit (%RI32)\n", err));
-            rc = VERR_GENERAL_FAILURE; /** @todo Fudge! */
-        }
-    }
-    else
-    {
-        LogRel(("CoreAudio: Failed to stop recording (%RI32)\n", err));
-        rc = VERR_GENERAL_FAILURE; /** @todo Fudge! */
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(int) drvHostCoreAudioFiniOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHstStrmOut)
-{
-    PPDMDRVINS pDrvIns      = PDMIBASE_2_PDMDRV(pInterface);
-    PDRVHOSTCOREAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTCOREAUDIO);
-
-    PCOREAUDIOSTREAMOUT pStreamOut = (PCOREAUDIOSTREAMOUT)pHstStrmOut;
-
-    LogFlowFuncEnter();
-
-    uint32_t status = ASMAtomicReadU32(&pStreamOut->status);
-    if (!(   status == CA_STATUS_INIT
-          || status == CA_STATUS_REINIT))
-    {
-        return VINF_SUCCESS;
-    }
-
-    int rc = drvHostCoreAudioControlOut(pInterface, &pStreamOut->streamOut, PDMAUDIOSTREAMCMD_DISABLE);
-    if (RT_SUCCESS(rc))
-    {
-        ASMAtomicXchgU32(&pStreamOut->status, CA_STATUS_IN_UNINIT);
-
-        OSStatus err;
-
-        /*
-         * Unregister playback device callbacks.
-         */
-        AudioObjectPropertyAddress propAdr = { kAudioDeviceProcessorOverload, kAudioObjectPropertyScopeGlobal,
-                                               kAudioObjectPropertyElementMaster };
-#ifdef DEBUG
-        err = AudioObjectRemovePropertyListener(pStreamOut->deviceID, &propAdr,
-                                                drvHostCoreAudioPlaybackAudioDevicePropertyChanged, pStreamOut);
-        /* Not Fatal */
-        if (RT_UNLIKELY(err != noErr))
-            LogRel(("CoreAudio: Failed to remove the processor overload listener (%RI32)\n", err));
-#endif /* DEBUG */
-
-        propAdr.mSelector = kAudioDevicePropertyNominalSampleRate;
-        err = AudioObjectRemovePropertyListener(pStreamOut->deviceID, &propAdr,
-                                                drvHostCoreAudioPlaybackAudioDevicePropertyChanged, pStreamOut);
-        /* Not Fatal */
-        if (RT_UNLIKELY(err != noErr))
-            LogRel(("CoreAudio: Failed to remove the sample rate changed listener (%RI32)\n", err));
-
-        if (pStreamOut->fDefDevChgListReg)
-        {
-            propAdr.mSelector = kAudioHardwarePropertyDefaultOutputDevice;
-            propAdr.mScope    = kAudioObjectPropertyScopeGlobal;
-            propAdr.mElement  = kAudioObjectPropertyElementMaster;
-            err = AudioObjectRemovePropertyListener(kAudioObjectSystemObject, &propAdr,
-                                                    drvHostCoreAudioDefaultDeviceChanged, pStreamOut);
-            if (RT_LIKELY(err == noErr))
-            {
-                pStreamOut->fDefDevChgListReg = false;
-            }
-            else
-                LogRel(("CoreAudio: [Output] Failed to remove the default playback device changed listener (%RI32)\n", err));
-        }
-
-        err = AudioUnitUninitialize(pStreamOut->audioUnit);
-        if (err == noErr)
-        {
-            err = CloseComponent(pStreamOut->audioUnit);
-            if (err == noErr)
-            {
-                pStreamOut->deviceID  = kAudioDeviceUnknown;
-                pStreamOut->audioUnit = NULL;
-                if (pStreamOut->pBuf)
-                {
-                    RTCircBufDestroy(pStreamOut->pBuf);
-                    pStreamOut->pBuf = NULL;
-                }
-
-                ASMAtomicXchgU32(&pStreamOut->status, CA_STATUS_UNINIT);
-            }
-            else
-                LogRel(("CoreAudio: Failed to close the AudioUnit (%RI32)\n", err));
-        }
-        else
-            LogRel(("CoreAudio: Failed to uninitialize the AudioUnit (%RI32)\n", err));
-    }
-    else
-        LogRel(("CoreAudio: Failed to stop playback, rc=%Rrc\n", rc));
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(int) drvHostCoreAudioInitIn(PPDMIHOSTAUDIO pInterface,
-                                                PPDMAUDIOHSTSTRMIN pHstStrmIn, PPDMAUDIOSTREAMCFG pCfg,
-                                                PDMAUDIORECSOURCE enmRecSource,
-                                                uint32_t *pcSamples)
-{
-    PCOREAUDIOSTREAMIN pStreamIn = (PCOREAUDIOSTREAMIN)pHstStrmIn;
-
-    LogFlowFunc(("enmRecSource=%ld\n", enmRecSource));
-
-    pStreamIn->deviceID                  = kAudioDeviceUnknown;
-    pStreamIn->audioUnit                 = NULL;
-    pStreamIn->pConverter                = NULL;
-    pStreamIn->bufferList.mNumberBuffers = 0;
-    pStreamIn->offBufferRead             = 0;
-    pStreamIn->sampleRatio               = 1;
-    pStreamIn->pBuf                      = NULL;
-    pStreamIn->status                    = CA_STATUS_UNINIT;
-    pStreamIn->fDefDevChgListReg         = false;
-
-    bool fDeviceByUser = false; /* Do we use a device which was set by the user? */
-
-    /* Initialize the hardware info section with the audio settings */
-    int rc = DrvAudioStreamCfgToProps(pCfg, &pStreamIn->streamIn.Props);
-    if (RT_SUCCESS(rc))
-    {
-#if 0
-        /* Try to find the audio device set by the user */
-        if (DeviceUID.pszInputDeviceUID)
-        {
-            pStreamIn->deviceID = drvHostCoreAudioDeviceUIDtoID(DeviceUID.pszInputDeviceUID);
-            /* Not fatal */
-            if (pStreamIn->deviceID == kAudioDeviceUnknown)
-                LogRel(("CoreAudio: Unable to find input device %s. Falling back to the default audio device. \n", DeviceUID.pszInputDeviceUID));
-            else
-                fDeviceByUser = true;
-        }
-#endif
-        rc = drvHostCoreAudioInitInput(&pStreamIn->streamIn, pcSamples);
-    }
-
-    if (RT_SUCCESS(rc))
-    {
-        /* When the devices isn't forced by the user, we want default device change notifications. */
-        if (!fDeviceByUser)
-        {
-            AudioObjectPropertyAddress propAdr = { kAudioHardwarePropertyDefaultInputDevice, kAudioObjectPropertyScopeGlobal,
-                                                   kAudioObjectPropertyElementMaster };
-            OSStatus err = AudioObjectAddPropertyListener(kAudioObjectSystemObject, &propAdr,
-                                                          drvHostCoreAudioDefaultDeviceChanged, (void *)pStreamIn);
-            /* Not fatal. */
-            if (RT_LIKELY(err == noErr))
-            {
-                pStreamIn->fDefDevChgListReg = true;
-            }
-            else
-                LogRel(("CoreAudio: Failed to add the default input device changed listener (%RI32)\n", err));
-        }
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(int) drvHostCoreAudioInitOut(PPDMIHOSTAUDIO pInterface,
-                                                 PPDMAUDIOHSTSTRMOUT pHstStrmOut, PPDMAUDIOSTREAMCFG pCfg,
-                                                 uint32_t *pcSamples)
-{
-    PCOREAUDIOSTREAMOUT pStreamOut = (PCOREAUDIOSTREAMOUT)pHstStrmOut;
-
-    LogFlowFuncEnter();
-
-    pStreamOut->deviceID                  = kAudioDeviceUnknown;
-    pStreamOut->audioUnit                 = NULL;
-    pStreamOut->pBuf                      = NULL;
-    pStreamOut->status                    = CA_STATUS_UNINIT;
-    pStreamOut->fDefDevChgListReg         = false;
-
-    bool fDeviceByUser = false; /* Do we use a device which was set by the user? */
-
-    /* Initialize the hardware info section with the audio settings */
-    int rc = DrvAudioStreamCfgToProps(pCfg, &pStreamOut->streamOut.Props);
-    if (RT_SUCCESS(rc))
-    {
-#if 0
-        /* Try to find the audio device set by the user. Use
-         * export VBOX_COREAUDIO_OUTPUT_DEVICE_UID=AppleHDAEngineOutput:0
-         * to set it. */
-        if (DeviceUID.pszOutputDeviceUID)
-        {
-            pStreamOut->audioDeviceId = drvHostCoreAudioDeviceUIDtoID(DeviceUID.pszOutputDeviceUID);
-            /* Not fatal */
-            if (pStreamOut->audioDeviceId == kAudioDeviceUnknown)
-                LogRel(("CoreAudio: Unable to find output device %s. Falling back to the default audio device. \n", DeviceUID.pszOutputDeviceUID));
-            else
-                fDeviceByUser = true;
-        }
-#endif
-        rc = drvHostCoreAudioInitOutput(pHstStrmOut, pcSamples);
-    }
-
-    if (RT_SUCCESS(rc))
-    {
-        /* When the devices isn't forced by the user, we want default device change notifications. */
-        if (!fDeviceByUser)
-        {
-            AudioObjectPropertyAddress propAdr = { kAudioHardwarePropertyDefaultOutputDevice, kAudioObjectPropertyScopeGlobal,
-                                                   kAudioObjectPropertyElementMaster };
-            OSStatus err = AudioObjectAddPropertyListener(kAudioObjectSystemObject, &propAdr,
-                                                          drvHostCoreAudioDefaultDeviceChanged, (void *)pStreamOut);
-            /* Not fatal. */
-            if (RT_LIKELY(err == noErr))
-            {
-                pStreamOut->fDefDevChgListReg = true;
-            }
-            else
-                LogRel(("CoreAudio: Failed to add the default output device changed listener (%RI32)\n", err));
-        }
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(bool) drvHostCoreAudioIsEnabled(PPDMIHOSTAUDIO pInterface, PDMAUDIODIR enmDir)
-{
-    NOREF(pInterface);
-    NOREF(enmDir);
-    return true; /* Always all enabled. */
-}
-
-static DECLCALLBACK(int) drvHostCoreAudioGetConf(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDCFG pAudioConf)
-{
-    pAudioConf->cbStreamOut     = sizeof(COREAUDIOSTREAMOUT);
-    pAudioConf->cbStreamIn      = sizeof(COREAUDIOSTREAMIN);
-    pAudioConf->cMaxHstStrmsOut = 1;
-    pAudioConf->cMaxHstStrmsIn  = 2;
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(void) drvHostCoreAudioShutdown(PPDMIHOSTAUDIO pInterface)
-{
-    NOREF(pInterface);
-}
-
-static DECLCALLBACK(void *) drvHostCoreAudioQueryInterface(PPDMIBASE pInterface, const char *pszIID)
-{
-    PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
-    PDRVHOSTCOREAUDIO  pThis   = PDMINS_2_DATA(pDrvIns, PDRVHOSTCOREAUDIO);
-    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase);
-    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIHOSTAUDIO, &pThis->IHostAudio);
-
-    return NULL;
-}
-
- /* Construct a DirectSound Audio driver instance.
- *
- * @copydoc FNPDMDRVCONSTRUCT
- */
-static DECLCALLBACK(int) drvHostCoreAudioConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
-{
-    PDRVHOSTCOREAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTCOREAUDIO);
-    LogRel(("Audio: Initializing Core Audio driver\n"));
-
-    /*
-     * Init the static parts.
-     */
-    pThis->pDrvIns                   = pDrvIns;
-    /* IBase */
-    pDrvIns->IBase.pfnQueryInterface = drvHostCoreAudioQueryInterface;
-    /* IHostAudio */
-    PDMAUDIO_IHOSTAUDIO_CALLBACKS(drvHostCoreAudio);
-
-    return VINF_SUCCESS;
-}
-
-/**
- * Char driver registration record.
- */
-const PDMDRVREG g_DrvHostCoreAudio =
-{
-    /* u32Version */
-    PDM_DRVREG_VERSION,
-    /* szName */
-    "CoreAudio",
-    /* szRCMod */
-    "",
-    /* szR0Mod */
-    "",
-    /* pszDescription */
-    "Core Audio host driver",
-    /* fFlags */
-     PDM_DRVREG_FLAGS_HOST_BITS_DEFAULT,
-    /* fClass. */
-    PDM_DRVREG_CLASS_AUDIO,
-    /* cMaxInstances */
-    ~0U,
-    /* cbInstance */
-    sizeof(DRVHOSTCOREAUDIO),
-    /* pfnConstruct */
-    drvHostCoreAudioConstruct,
-    /* pfnDestruct */
-    NULL,
-    /* pfnRelocate */
-    NULL,
-    /* pfnIOCtl */
-    NULL,
-    /* pfnPowerOn */
-    NULL,
-    /* pfnReset */
-    NULL,
-    /* pfnSuspend */
-    NULL,
-    /* pfnResume */
-    NULL,
-    /* pfnAttach */
-    NULL,
-    /* pfnDetach */
-    NULL,
-    /* pfnPowerOff */
-    NULL,
-    /* pfnSoftReset */
-    NULL,
-    /* u32EndVersion */
-    PDM_DRVREG_VERSION
-};
-
diff --git a/src/VBox/Devices/Audio_old/DrvHostDSound.cpp b/src/VBox/Devices/Audio_old/DrvHostDSound.cpp
deleted file mode 100644
index 01c04da..0000000
--- a/src/VBox/Devices/Audio_old/DrvHostDSound.cpp
+++ /dev/null
@@ -1,2289 +0,0 @@
-/* $Id: DrvHostDSound.cpp $ */
-/** @file
- * Windows host backend driver using DirectSound.
- */
-
-/*
- * Copyright (C) 2006-2016 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- * --------------------------------------------------------------------
- *
- */
-#define LOG_GROUP LOG_GROUP_DRV_HOST_AUDIO
-#include <VBox/log.h>
-#include <dsound.h>
-
-#include <iprt/alloc.h>
-#include <iprt/uuid.h>
-
-#include "AudioMixBuffer.h"
-#include "DrvAudio.h"
-#include "VBoxDD.h"
-
-/*
- * IDirectSound* interface uses HRESULT status codes and the driver callbacks use
- * the IPRT status codes. To minimize HRESULT->IPRT conversion most internal functions
- * in the driver return HRESULT and conversion is done in the driver callbacks.
- *
- * Naming convention:
- * 'dsound*' functions return IPRT status code;
- * 'directSound*' - return HRESULT.
- */
-
-/*
- * Optional release logging, which a user can turn on with the
- * 'VBoxManage debugvm' command.
- * Debug logging still uses the common Log* macros from IPRT.
- * Messages which always should go to the release log use LogRel.
- */
-/* General code behavior. */
-#define DSLOG(a) do { LogRel2(a); } while(0)
-/* Something which produce a lot of logging during playback/recording. */
-#define DSLOGF(a) do { LogRel3(a); } while(0)
-/* Important messages like errors. Limited in the default release log to avoid log flood. */
-#define DSLOGREL(a)                 \
-    do {                            \
-        static int8_t scLogged = 0; \
-        if (scLogged < 8) {         \
-            ++scLogged;             \
-            LogRel(a);              \
-        }                           \
-        else {                      \
-            DSLOG(a);               \
-        }                           \
-    } while (0)
-
-/* Dynamically load dsound.dll. */
-typedef HRESULT WINAPI FNDIRECTSOUNDENUMERATEW(LPDSENUMCALLBACKW pDSEnumCallback, LPVOID pContext);
-typedef FNDIRECTSOUNDENUMERATEW *PFNDIRECTSOUNDENUMERATEW;
-typedef HRESULT WINAPI FNDIRECTSOUNDCAPTUREENUMERATEW(LPDSENUMCALLBACKW pDSEnumCallback, LPVOID pContext);
-typedef FNDIRECTSOUNDCAPTUREENUMERATEW *PFNDIRECTSOUNDCAPTUREENUMERATEW;
-
-#ifdef VBOX_WITH_AUDIO_CALLBACKS
-# define VBOX_DSOUND_MAX_EVENTS 3
-
-typedef enum DSOUNDEVENT
-{
-    DSOUNDEVENT_NOTIFY = 0,
-    DSOUNDEVENT_INPUT,
-    DSOUNDEVENT_OUTPUT,
- } DSOUNDEVENT;
-#endif /* VBOX_WITH_AUDIO_CALLBACKS */
-
-typedef struct DSOUNDHOSTCFG
-{
-    DWORD   cbBufferIn;
-    DWORD   cbBufferOut;
-    RTUUID  uuidPlay;
-    LPCGUID pGuidPlay;
-    RTUUID  uuidCapture;
-    LPCGUID pGuidCapture;
-} DSOUNDHOSTCFG, *PDSOUNDHOSTCFG;
-
-typedef struct DSOUNDSTREAMOUT
-{
-    PDMAUDIOHSTSTRMOUT   strmOut; /* Always must come first! */
-    LPDIRECTSOUND8       pDS;
-    LPDIRECTSOUNDBUFFER8 pDSB;
-    DWORD                cbPlayWritePos;
-    DWORD                csPlaybackBufferSize;
-    bool                 fEnabled;
-    bool                 fRestartPlayback;
-    PDMAUDIOSTREAMCFG    streamCfg;
-} DSOUNDSTREAMOUT, *PDSOUNDSTREAMOUT;
-
-typedef struct DSOUNDSTREAMIN
-{
-    PDMAUDIOHSTSTRMIN           strmIn; /* Always must come first! */
-    LPDIRECTSOUNDCAPTURE8       pDSC;
-    LPDIRECTSOUNDCAPTUREBUFFER8 pDSCB;
-    DWORD                       csCaptureReadPos;
-    DWORD                       csCaptureBufferSize;
-    HRESULT                     hrLastCaptureIn;
-    PDMAUDIORECSOURCE           enmRecSource;
-    bool                        fEnabled;
-    PDMAUDIOSTREAMCFG           streamCfg;
-} DSOUNDSTREAMIN, *PDSOUNDSTREAMIN;
-
-typedef struct DRVHOSTDSOUND
-{
-    /** Pointer to the driver instance structure. */
-    PPDMDRVINS          pDrvIns;
-    /** Our audio host audio interface. */
-    PDMIHOSTAUDIO       IHostAudio;
-    /** List of found host input devices. */
-    RTLISTANCHOR        lstDevInput;
-    /** List of found host output devices. */
-    RTLISTANCHOR        lstDevOutput;
-    /** DirectSound configuration options. */
-    DSOUNDHOSTCFG       cfg;
-    /** Whether this backend supports any audio input. */
-    bool                fEnabledIn;
-    /** Whether this backend supports any audio output. */
-    bool                fEnabledOut;
-#ifdef VBOX_WITH_AUDIO_CALLBACKS
-    /** Pointer to the audio connector interface of the driver/device above us. */
-    PPDMIAUDIOCONNECTOR pUpIAudioConnector;
-    /** Stopped indicator. */
-    bool                fStopped;
-    /** Shutdown indicator. */
-    bool                fShutdown;
-    /** Notification thread. */
-    RTTHREAD            Thread;
-    /** Array of events to wait for in notification thread. */
-    HANDLE              aEvents[VBOX_DSOUND_MAX_EVENTS];
-    /** Number of events to wait for in notification thread.
-     *  Must not exceed VBOX_DSOUND_MAX_EVENTS. */
-    uint8_t             cEvents;
-    /** Pointer to the input stream. */
-    PDSOUNDSTREAMIN     pDSStrmIn;
-    /** Pointer to the output stream. */
-    PDSOUNDSTREAMOUT    pDSStrmOut;
-#endif
-} DRVHOSTDSOUND, *PDRVHOSTDSOUND;
-
-/** No flags specified. */
-#define DSOUNDENUMCBFLAGS_NONE          0
-/** (Release) log found devices. */
-#define DSOUNDENUMCBFLAGS_LOG           RT_BIT(0)
-
-/**
- * Callback context for enumeration callbacks
- */
-typedef struct DSOUNDENUMCBCTX
-{
-    PDRVHOSTDSOUND      pDrv;
-    PPDMAUDIOBACKENDCFG pCfg;
-    /** Enumeration flags. */
-    uint32_t            fFlags;
-} DSOUNDENUMCBCTX, *PDSOUNDENUMCBCTX;
-
-typedef struct DSOUNDDEV
-{
-    RTLISTNODE  Node;
-    char       *pszName;
-    GUID        Guid;
-} DSOUNDDEV, *PDSOUNDDEV;
-
-/** Maximum number of attempts to restore the sound buffer before giving up. */
-#define DRV_DSOUND_RESTORE_ATTEMPTS_MAX         3
-
-/** Makes DRVHOSTDSOUND out of PDMIHOSTAUDIO. */
-#define PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface) \
-    ( (PDRVHOSTDSOUND)((uintptr_t)pInterface - RT_OFFSETOF(DRVHOSTDSOUND, IHostAudio)) )
-
-static HRESULT directSoundPlayRestore(PDRVHOSTDSOUND pThis, LPDIRECTSOUNDBUFFER8 pDSB);
-
-static void dsoundDeviceRemove(PDSOUNDDEV pDev);
-static int dsoundDevicesEnumerate(PDRVHOSTDSOUND pThis, PPDMAUDIOBACKENDCFG pCfg);
-#ifdef VBOX_WITH_AUDIO_CALLBACKS
-static int dsoundNotifyThread(PDRVHOSTDSOUND pThis, bool fShutdown);
-#endif
-
-static DWORD dsoundRingDistance(DWORD offEnd, DWORD offBegin, DWORD cSize)
-{
-    return offEnd >= offBegin ? offEnd - offBegin : cSize - offBegin + offEnd;
-}
-
-static int dsoundWaveFmtFromCfg(PPDMAUDIOSTREAMCFG pCfg, PWAVEFORMATEX pFmt)
-{
-    AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
-    AssertPtrReturn(pFmt, VERR_INVALID_POINTER);
-
-    RT_BZERO(pFmt, sizeof(WAVEFORMATEX));
-
-    pFmt->wFormatTag      = WAVE_FORMAT_PCM;
-    pFmt->nChannels       = pCfg->cChannels;
-    pFmt->nSamplesPerSec  = pCfg->uHz;
-    pFmt->nAvgBytesPerSec = pCfg->uHz << (pCfg->cChannels == 2 ? 1: 0);
-    pFmt->nBlockAlign     = 1 << (pCfg->cChannels == 2 ? 1: 0);
-    pFmt->cbSize          = 0; /* No extra data specified. */
-
-    switch (pCfg->enmFormat)
-    {
-        case AUD_FMT_S8:
-        case AUD_FMT_U8:
-            pFmt->wBitsPerSample = 8;
-            break;
-
-        case AUD_FMT_S16:
-        case AUD_FMT_U16:
-            pFmt->wBitsPerSample = 16;
-            pFmt->nAvgBytesPerSec <<= 1;
-            pFmt->nBlockAlign <<= 1;
-            break;
-
-        case AUD_FMT_S32:
-        case AUD_FMT_U32:
-            pFmt->wBitsPerSample = 32;
-            pFmt->nAvgBytesPerSec <<= 2;
-            pFmt->nBlockAlign <<= 2;
-            break;
-
-        default:
-            AssertMsgFailed(("Wave format %ld not supported\n", pCfg->enmFormat));
-            return VERR_NOT_SUPPORTED;
-    }
-
-    return VINF_SUCCESS;
-}
-
-static int dsoundGetPosOut(PDRVHOSTDSOUND   pThis,
-                           PDSOUNDSTREAMOUT pDSoundStrmOut, DWORD *pdwBuffer, DWORD *pdwFree, DWORD *pdwPlayPos)
-{
-    AssertPtrReturn(pThis,          VERR_INVALID_POINTER);
-    AssertPtrReturn(pDSoundStrmOut, VERR_INVALID_POINTER);
-
-    LPDIRECTSOUNDBUFFER8 pDSB = pDSoundStrmOut->pDSB;
-    if (!pDSB)
-        return VERR_INVALID_POINTER;
-
-    DWORD cbBuffer = AUDIOMIXBUF_S2B(&pDSoundStrmOut->strmOut.MixBuf, pDSoundStrmOut->csPlaybackBufferSize);
-
-    /* Get the current play position which is used for calculating the free space in the buffer. */
-    DWORD cbPlayPos;
-
-    HRESULT hr;
-    for (unsigned i = 0; i < DRV_DSOUND_RESTORE_ATTEMPTS_MAX; i++)
-    {
-        hr = IDirectSoundBuffer8_GetCurrentPosition(pDSB, &cbPlayPos, NULL);
-        if (   SUCCEEDED(hr)
-            || hr != DSERR_BUFFERLOST) /** @todo: MSDN doesn't state this error for GetCurrentPosition(). */
-        {
-            break;
-        }
-        else
-        {
-            LogFlowFunc(("Getting playing position failed due to lost buffer, restoring ...\n"));
-            directSoundPlayRestore(pThis, pDSB);
-        }
-    }
-
-    int rc = VINF_SUCCESS;
-
-    if (FAILED(hr))
-    {
-        if (hr != DSERR_BUFFERLOST) /* Avoid log flooding if the error is still there. */
-            DSLOGREL(("DSound: Getting current playback position failed with %Rhrc\n", hr));
-        LogFlowFunc(("Failed with %Rhrc\n", hr));
-
-        rc = VERR_NOT_AVAILABLE;
-    }
-    else
-    {
-        if (pdwBuffer)
-            *pdwBuffer = cbBuffer;
-
-        if (pdwFree)
-            *pdwFree = cbBuffer - dsoundRingDistance(pDSoundStrmOut->cbPlayWritePos, cbPlayPos, cbBuffer);
-
-        if (pdwPlayPos)
-            *pdwPlayPos = cbPlayPos;
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static char *dsoundGUIDToUtf8StrA(LPCGUID lpGUID)
-{
-    if (lpGUID)
-    {
-        LPOLESTR lpOLEStr;
-        HRESULT hr = StringFromCLSID(*lpGUID, &lpOLEStr);
-        if (SUCCEEDED(hr))
-        {
-            char *pszGUID;
-            int rc = RTUtf16ToUtf8(lpOLEStr, &pszGUID);
-            CoTaskMemFree(lpOLEStr);
-
-            return RT_SUCCESS(rc) ? pszGUID : NULL;
-        }
-    }
-
-    return RTStrDup("{Default device}");
-}
-
-/**
- * Clears the list of the host's playback + capturing devices.
- *
- * @param   pThis               Host audio driver instance.
- */
-static void dsoundDevicesClear(PDRVHOSTDSOUND pThis)
-{
-    AssertPtrReturnVoid(pThis);
-
-    PDSOUNDDEV pDev;
-    while (!RTListIsEmpty(&pThis->lstDevInput))
-    {
-        pDev = RTListGetFirst(&pThis->lstDevInput, DSOUNDDEV, Node);
-        dsoundDeviceRemove(pDev);
-    }
-
-    while (!RTListIsEmpty(&pThis->lstDevOutput))
-    {
-        pDev = RTListGetFirst(&pThis->lstDevOutput, DSOUNDDEV, Node);
-        dsoundDeviceRemove(pDev);
-    }
-}
-
-static HRESULT directSoundPlayRestore(PDRVHOSTDSOUND pThis, LPDIRECTSOUNDBUFFER8 pDSB)
-{
-    HRESULT hr = IDirectSoundBuffer8_Restore(pDSB);
-    if (FAILED(hr))
-        DSLOGREL(("DSound: Restoring playback buffer failed with %Rhrc\n", hr));
-    return hr;
-}
-
-static HRESULT directSoundPlayUnlock(PDRVHOSTDSOUND pThis, LPDIRECTSOUNDBUFFER8 pDSB,
-                                     LPVOID pv1, LPVOID pv2,
-                                     DWORD cb1, DWORD cb2)
-{
-    HRESULT hr = IDirectSoundBuffer8_Unlock(pDSB, pv1, cb1, pv2, cb2);
-    if (FAILED(hr))
-        DSLOGREL(("DSound: Unlocking playback buffer failed with %Rhrc\n", hr));
-    return hr;
-}
-
-static HRESULT directSoundCaptureUnlock(LPDIRECTSOUNDCAPTUREBUFFER8 pDSCB,
-                                        LPVOID pv1, LPVOID pv2,
-                                        DWORD cb1, DWORD cb2)
-{
-    HRESULT hr = IDirectSoundCaptureBuffer8_Unlock(pDSCB, pv1, cb1, pv2, cb2);
-    if (FAILED(hr))
-        DSLOGREL(("DSound: Unlocking capture buffer failed with %Rhrc\n", hr));
-    return hr;
-}
-
-static HRESULT directSoundPlayLock(PDRVHOSTDSOUND pThis,
-                                   LPDIRECTSOUNDBUFFER8 pDSB, PDMPCMPROPS *pProps,
-                                   DWORD dwOffset, DWORD dwBytes,
-                                   LPVOID *ppv1, LPVOID *ppv2,
-                                   DWORD *pcb1, DWORD *pcb2,
-                                   DWORD dwFlags)
-{
-    LPVOID pv1 = NULL;
-    LPVOID pv2 = NULL;
-    DWORD cb1 = 0;
-    DWORD cb2 = 0;
-
-    HRESULT hr;
-    for (unsigned i = 0; i < DRV_DSOUND_RESTORE_ATTEMPTS_MAX; i++)
-    {
-        hr = IDirectSoundBuffer8_Lock(pDSB, dwOffset, dwBytes, &pv1, &cb1, &pv2, &cb2, dwFlags);
-        if (   SUCCEEDED(hr)
-            || hr != DSERR_BUFFERLOST)
-            break;
-        else
-        {
-            LogFlowFunc(("Locking failed due to lost buffer, restoring ...\n"));
-            directSoundPlayRestore(pThis, pDSB);
-        }
-    }
-
-    if (FAILED(hr))
-    {
-        DSLOGREL(("DSound: Locking playback buffer failed with %Rhrc\n", hr));
-        return hr;
-    }
-
-    if (   (pv1 && (cb1 & pProps->uAlign))
-        || (pv2 && (cb2 & pProps->uAlign)))
-    {
-        DSLOGREL(("DSound: Locking playback buffer returned misaligned buffer: cb1=%RI32, cb2=%RI32 (alignment: %RU32)\n",
-                  cb1, cb2, pProps->uAlign));
-        directSoundPlayUnlock(pThis, pDSB, pv1, pv2, cb1, cb2);
-        return E_FAIL;
-    }
-
-    *ppv1 = pv1;
-    *ppv2 = pv2;
-    *pcb1 = cb1;
-    *pcb2 = cb2;
-
-    return S_OK;
-}
-
-static HRESULT directSoundCaptureLock(LPDIRECTSOUNDCAPTUREBUFFER8 pDSCB, PPDMPCMPROPS pProps,
-                                      DWORD dwOffset, DWORD dwBytes,
-                                      LPVOID *ppv1, LPVOID *ppv2,
-                                      DWORD *pcb1, DWORD *pcb2,
-                                      DWORD dwFlags)
-{
-    LPVOID pv1 = NULL;
-    LPVOID pv2 = NULL;
-    DWORD cb1 = 0;
-    DWORD cb2 = 0;
-
-    HRESULT hr = IDirectSoundCaptureBuffer8_Lock(pDSCB, dwOffset, dwBytes,
-                                                 &pv1, &cb1, &pv2, &cb2, dwFlags);
-    if (FAILED(hr))
-    {
-        DSLOGREL(("DSound: Locking capture buffer failed with %Rhrc\n", hr));
-        return hr;
-    }
-
-    if (   (pv1 && (cb1 & pProps->uAlign))
-        || (pv2 && (cb2 & pProps->uAlign)))
-    {
-        DSLOGREL(("DSound: Locking capture buffer returned misaligned buffer: cb1=%RI32, cb2=%RI32 (alignment: %RU32)\n",
-                  cb1, cb2, pProps->uAlign));
-        directSoundCaptureUnlock(pDSCB, pv1, pv2, cb1, cb2);
-        return E_FAIL;
-    }
-
-    *ppv1 = pv1;
-    *ppv2 = pv2;
-    *pcb1 = cb1;
-    *pcb2 = cb2;
-
-    return S_OK;
-}
-
-
-/*
- * DirectSound playback
- */
-
-static void directSoundPlayInterfaceRelease(PDSOUNDSTREAMOUT pDSoundStrmOut)
-{
-    if (pDSoundStrmOut->pDS)
-    {
-        IDirectSound8_Release(pDSoundStrmOut->pDS);
-        pDSoundStrmOut->pDS = NULL;
-    }
-}
-
-static HRESULT directSoundPlayInterfaceCreate(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMOUT pDSoundStrmOut)
-{
-    if (pDSoundStrmOut->pDS != NULL)
-    {
-        DSLOG(("DSound: DirectSound instance already exists\n"));
-        return S_OK;
-    }
-
-    HRESULT hr = CoCreateInstance(CLSID_DirectSound8, NULL, CLSCTX_ALL,
-                                  IID_IDirectSound8, (void **)&pDSoundStrmOut->pDS);
-    if (FAILED(hr))
-    {
-        DSLOGREL(("DSound: Creating playback instance failed with %Rhrc\n", hr));
-    }
-    else
-    {
-        hr = IDirectSound8_Initialize(pDSoundStrmOut->pDS, pThis->cfg.pGuidPlay);
-        if (SUCCEEDED(hr))
-        {
-            HWND hWnd = GetDesktopWindow();
-            hr = IDirectSound8_SetCooperativeLevel(pDSoundStrmOut->pDS, hWnd, DSSCL_PRIORITY);
-            if (FAILED(hr))
-                DSLOGREL(("DSound: Setting cooperative level for window %p failed with %Rhrc\n", hWnd, hr));
-        }
-
-        if (FAILED(hr))
-        {
-            if (hr == DSERR_NODRIVER) /* Usually means that no playback devices are attached. */
-                DSLOGREL(("DSound: DirectSound playback is currently unavailable\n"));
-            else
-                DSLOGREL(("DSound: DirectSound playback initialization failed with %Rhrc\n", hr));
-
-            directSoundPlayInterfaceRelease(pDSoundStrmOut);
-        }
-    }
-
-    return hr;
-}
-
-static HRESULT directSoundPlayClose(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMOUT pDSoundStrmOut)
-{
-    AssertPtrReturn(pThis, E_POINTER);
-    AssertPtrReturn(pDSoundStrmOut, E_POINTER);
-
-    DSLOG(("DSound: Closing playback stream %p, buffer %p\n", pDSoundStrmOut, pDSoundStrmOut->pDSB));
-
-    HRESULT hr = S_OK;
-
-    if (pDSoundStrmOut->pDSB)
-    {
-        hr = IDirectSoundBuffer8_Stop(pDSoundStrmOut->pDSB);
-        if (SUCCEEDED(hr))
-        {
-#ifdef VBOX_WITH_AUDIO_CALLBACKS
-            if (pThis->aEvents[DSOUNDEVENT_OUTPUT] != NULL)
-            {
-                CloseHandle(pThis->aEvents[DSOUNDEVENT_OUTPUT]);
-                pThis->aEvents[DSOUNDEVENT_OUTPUT] = NULL;
-
-                if (pThis->cEvents)
-                    pThis->cEvents--;
-
-                pThis->pDSStrmOut = NULL;
-            }
-
-            int rc2 = dsoundNotifyThread(pThis, false /* fShutdown */);
-            AssertRC(rc2);
-#endif
-            IDirectSoundBuffer8_Release(pDSoundStrmOut->pDSB);
-            pDSoundStrmOut->pDSB = NULL;
-        }
-        else
-            DSLOGREL(("DSound: Stop playback stream %p when closing %Rhrc\n", pDSoundStrmOut, hr));
-    }
-
-    if (SUCCEEDED(hr))
-        directSoundPlayInterfaceRelease(pDSoundStrmOut);
-
-    return hr;
-}
-
-static HRESULT directSoundPlayOpen(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMOUT pDSoundStrmOut)
-{
-    AssertPtrReturn(pThis, E_POINTER);
-    AssertPtrReturn(pDSoundStrmOut, E_POINTER);
-
-    DSLOG(("DSound: pDSoundStrmOut=%p, cbBufferOut=%ld, uHz=%RU32, cChannels=%RU8, cBits=%RU8, fSigned=%RTbool\n",
-           pDSoundStrmOut,
-           pThis->cfg.cbBufferOut,
-           pDSoundStrmOut->strmOut.Props.uHz,
-           pDSoundStrmOut->strmOut.Props.cChannels,
-           pDSoundStrmOut->strmOut.Props.cBits,
-           pDSoundStrmOut->strmOut.Props.fSigned));
-
-    if (pDSoundStrmOut->pDSB != NULL)
-    {
-        /* Should not happen but be forgiving. */
-        DSLOGREL(("DSound: Playback buffer already exists\n"));
-        directSoundPlayClose(pThis, pDSoundStrmOut);
-    }
-
-    WAVEFORMATEX wfx;
-    int rc = dsoundWaveFmtFromCfg(&pDSoundStrmOut->streamCfg, &wfx);
-    if (RT_FAILURE(rc))
-        return E_INVALIDARG;
-
-    HRESULT hr = directSoundPlayInterfaceCreate(pThis, pDSoundStrmOut);
-    if (FAILED(hr))
-        return hr;
-
-    do /* To use breaks. */
-    {
-        LPDIRECTSOUNDBUFFER pDSB = NULL;
-
-        DSBUFFERDESC bd;
-        RT_ZERO(bd);
-        bd.dwSize      = sizeof(bd);
-        bd.lpwfxFormat = &wfx;
-
-        /*
-         * As we reuse our (secondary) buffer for playing out data as it comes in,
-         * we're using this buffer as a so-called static buffer.
-         *
-         * However, as we do not want to use memory on the sound device directly
-         * (as most modern audio hardware on the host doesn't have this anyway),
-         * we're *not* going to use DSBCAPS_STATIC for that.
-         *
-         * Instead we're specifying DSBCAPS_LOCSOFTWARE, as this fits the bill
-         * of copying own buffer data (from AudioMixBuf) to our secondary's Direct Sound buffer.
-         */
-        bd.dwFlags     = DSBCAPS_GLOBALFOCUS | DSBCAPS_GETCURRENTPOSITION2 | DSBCAPS_LOCSOFTWARE;
-#ifdef VBOX_WITH_AUDIO_CALLBACKS
-        bd.dwFlags    |= DSBCAPS_CTRLPOSITIONNOTIFY;
-#endif
-        bd.dwBufferBytes = pThis->cfg.cbBufferOut;
-
-        hr = IDirectSound8_CreateSoundBuffer(pDSoundStrmOut->pDS, &bd, &pDSB, NULL);
-        if (FAILED(hr))
-        {
-            DSLOGREL(("DSound: Creating playback sound buffer failed with %Rhrc\n", hr));
-            break;
-        }
-
-        /* "Upgrade" to IDirectSoundBuffer8 interface. */
-        hr = IDirectSoundBuffer_QueryInterface(pDSB, IID_IDirectSoundBuffer8, (LPVOID *)&pDSoundStrmOut->pDSB);
-        IDirectSoundBuffer_Release(pDSB);
-        if (FAILED(hr))
-        {
-            DSLOGREL(("DSound: Querying playback sound buffer interface failed with %Rhrc\n", hr));
-            break;
-        }
-
-        /*
-         * Query the actual parameters.
-         */
-        hr = IDirectSoundBuffer8_GetFormat(pDSoundStrmOut->pDSB, &wfx, sizeof(wfx), NULL);
-        if (FAILED(hr))
-        {
-            DSLOGREL(("DSound: Getting playback format failed with %Rhrc\n", hr));
-            break;
-        }
-
-        DSBCAPS bc;
-        RT_ZERO(bc);
-        bc.dwSize = sizeof(bc);
-        hr = IDirectSoundBuffer8_GetCaps(pDSoundStrmOut->pDSB, &bc);
-        if (FAILED(hr))
-        {
-            DSLOGREL(("DSound: Getting playback capabilities failed with %Rhrc\n", hr));
-            break;
-        }
-
-        DSLOG(("DSound: Playback format:\n"
-               "  dwBufferBytes   = %RI32\n"
-               "  dwFlags         = 0x%x\n"
-               "  wFormatTag      = %RI16\n"
-               "  nChannels       = %RI16\n"
-               "  nSamplesPerSec  = %RU32\n"
-               "  nAvgBytesPerSec = %RU32\n"
-               "  nBlockAlign     = %RI16\n"
-               "  wBitsPerSample  = %RI16\n"
-               "  cbSize          = %RI16\n",
-               bc.dwBufferBytes,
-               bc.dwFlags,
-               wfx.wFormatTag,
-               wfx.nChannels,
-               wfx.nSamplesPerSec,
-               wfx.nAvgBytesPerSec,
-               wfx.nBlockAlign,
-               wfx.wBitsPerSample,
-               wfx.cbSize));
-
-        if (bc.dwBufferBytes & pDSoundStrmOut->strmOut.Props.uAlign)
-            DSLOGREL(("DSound: Playback capabilities returned misaligned buffer: size %RU32, alignment %RU32\n",
-                      bc.dwBufferBytes, pDSoundStrmOut->strmOut.Props.uAlign + 1));
-
-        if (bc.dwBufferBytes != pThis->cfg.cbBufferOut)
-            DSLOGREL(("DSound: Playback buffer size mismatched: DirectSound %RU32, requested %RU32 bytes\n",
-                      bc.dwBufferBytes, pThis->cfg.cbBufferOut));
-
-        /*
-         * Initial state.
-         * dsoundPlayStart initializes part of it to make sure that Stop/Start continues with a correct
-         * playback buffer position.
-         */
-        pDSoundStrmOut->csPlaybackBufferSize = bc.dwBufferBytes >> pDSoundStrmOut->strmOut.Props.cShift;
-        DSLOG(("DSound: csPlaybackBufferSize=%RU32\n", pDSoundStrmOut->csPlaybackBufferSize));
-
-#ifdef VBOX_WITH_AUDIO_CALLBACKS
-        /*
-         * Install notification.
-         */
-        pThis->aEvents[DSOUNDEVENT_OUTPUT] = CreateEvent(NULL /* Security attribute */,
-                                                         FALSE /* bManualReset */, FALSE /* bInitialState */,
-                                                         NULL /* lpName */);
-        if (pThis->aEvents[DSOUNDEVENT_OUTPUT] == NULL)
-        {
-            hr = HRESULT_FROM_WIN32(GetLastError());
-            DSLOGREL(("DSound: CreateEvent for output failed with %Rhrc\n", hr));
-            break;
-        }
-
-        LPDIRECTSOUNDNOTIFY8 pNotify;
-        hr = IDirectSoundNotify_QueryInterface(pDSoundStrmOut->pDSB, IID_IDirectSoundNotify8, (LPVOID *)&pNotify);
-        if (SUCCEEDED(hr))
-        {
-            DSBPOSITIONNOTIFY dsBufPosNotify;
-            RT_ZERO(dsBufPosNotify);
-            dsBufPosNotify.dwOffset     = DSBPN_OFFSETSTOP;
-            dsBufPosNotify.hEventNotify = pThis->aEvents[DSOUNDEVENT_OUTPUT];
-
-            hr = IDirectSoundNotify_SetNotificationPositions(pNotify, 1 /* Count */, &dsBufPosNotify);
-            if (FAILED(hr))
-                DSLOGREL(("DSound: Setting playback position notification failed with %Rhrc\n", hr));
-
-            IDirectSoundNotify_Release(pNotify);
-        }
-        else
-            DSLOGREL(("DSound: Querying interface for position notification failed with %Rhrc\n", hr));
-
-        if (FAILED(hr))
-            break;
-
-        pThis->pDSStrmOut = pDSoundStrmOut;
-
-        Assert(pThis->cEvents < VBOX_DSOUND_MAX_EVENTS);
-        pThis->cEvents++;
-
-        /* Let the thread know. */
-        dsoundNotifyThread(pThis, false /* fShutdown */);
-
-        /* Trigger the just installed output notification. */
-        hr = IDirectSoundBuffer8_Play(pDSoundStrmOut->pDSB, 0, 0, 0);
-
-#endif /* VBOX_WITH_AUDIO_CALLBACKS */
-
-    } while (0);
-
-    if (FAILED(hr))
-        directSoundPlayClose(pThis, pDSoundStrmOut);
-
-    return hr;
-}
-
-static void dsoundPlayClearSamples(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMOUT pDSoundStrmOut)
-{
-    AssertPtrReturnVoid(pDSoundStrmOut);
-
-    PPDMAUDIOHSTSTRMOUT pStrmOut = &pDSoundStrmOut->strmOut;
-
-    LPVOID pv1, pv2;
-    DWORD cb1, cb2;
-    HRESULT hr = directSoundPlayLock(pThis, pDSoundStrmOut->pDSB, &pDSoundStrmOut->strmOut.Props,
-                                     0 /* dwOffset */, AUDIOMIXBUF_S2B(&pStrmOut->MixBuf, pDSoundStrmOut->csPlaybackBufferSize),
-                                     &pv1, &pv2, &cb1, &cb2, DSBLOCK_ENTIREBUFFER);
-    if (SUCCEEDED(hr))
-    {
-        DWORD len1 = AUDIOMIXBUF_B2S(&pStrmOut->MixBuf, cb1);
-        DWORD len2 = AUDIOMIXBUF_B2S(&pStrmOut->MixBuf, cb2);
-
-        if (pv1 && len1)
-            DrvAudioClearBuf(&pDSoundStrmOut->strmOut.Props, pv1, cb1, len1);
-
-        if (pv2 && len2)
-            DrvAudioClearBuf(&pDSoundStrmOut->strmOut.Props, pv2, cb2, len2);
-
-        directSoundPlayUnlock(pThis, pDSoundStrmOut->pDSB, pv1, pv2, cb1, cb2);
-    }
-}
-
-static HRESULT directSoundPlayGetStatus(PDRVHOSTDSOUND pThis, LPDIRECTSOUNDBUFFER8 pDSB, DWORD *pdwStatus)
-{
-    AssertPtrReturn(pThis, E_POINTER);
-    AssertPtrReturn(pDSB,  E_POINTER);
-    /* pdwStatus is optional. */
-
-    DWORD dwStatus = 0;
-
-    HRESULT hr;
-    for (unsigned i = 0; i < DRV_DSOUND_RESTORE_ATTEMPTS_MAX; i++)
-    {
-        hr = IDirectSoundBuffer8_GetStatus(pDSB, &dwStatus);
-        if (   hr == DSERR_BUFFERLOST
-            || (   SUCCEEDED(hr)
-                && (dwStatus & DSBSTATUS_BUFFERLOST)))
-        {
-            LogFlowFunc(("Getting status failed due to lost buffer, restoring ...\n"));
-            directSoundPlayRestore(pThis, pDSB);
-        }
-        else
-            break;
-    }
-
-    if (SUCCEEDED(hr))
-    {
-        if (pdwStatus)
-            *pdwStatus = dwStatus;
-    }
-    else
-        DSLOGREL(("DSound: Retrieving playback status failed with %Rhrc\n", hr));
-
-    return hr;
-}
-
-static HRESULT directSoundPlayStop(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMOUT pDSoundStrmOut)
-{
-    AssertPtrReturn(pThis,          E_POINTER);
-    AssertPtrReturn(pDSoundStrmOut, E_POINTER);
-
-    HRESULT hr;
-
-    if (pDSoundStrmOut->pDSB != NULL)
-    {
-        DSLOG(("DSound: Stopping playback\n"));
-
-        HRESULT hr2 = IDirectSoundBuffer8_Stop(pDSoundStrmOut->pDSB);
-        if (FAILED(hr2))
-        {
-            hr2 = directSoundPlayRestore(pThis, pDSoundStrmOut->pDSB);
-            if (FAILED(hr2))
-                hr2 = IDirectSoundBuffer8_Stop(pDSoundStrmOut->pDSB);
-        }
-
-        if (FAILED(hr2))
-            DSLOG(("DSound: Stopping playback failed with %Rhrc\n", hr2));
-
-        hr = S_OK; /* Always report success here. */
-    }
-    else
-        hr = E_UNEXPECTED;
-
-    if (SUCCEEDED(hr))
-    {
-        dsoundPlayClearSamples(pThis, pDSoundStrmOut);
-        pDSoundStrmOut->fEnabled = false;
-    }
-    else
-        DSLOGREL(("DSound: Stopping playback failed with %Rhrc\n", hr));
-
-    return hr;
-}
-
-static HRESULT directSoundPlayStart(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMOUT pDSoundStrmOut)
-{
-    AssertPtrReturn(pThis,          E_POINTER);
-    AssertPtrReturn(pDSoundStrmOut, E_POINTER);
-
-    HRESULT hr;
-    if (pDSoundStrmOut->pDSB != NULL)
-    {
-        DWORD dwStatus;
-        hr = directSoundPlayGetStatus(pThis, pDSoundStrmOut->pDSB, &dwStatus);
-        if (SUCCEEDED(hr))
-        {
-            if (dwStatus & DSBSTATUS_PLAYING)
-            {
-                DSLOG(("DSound: Already playing\n"));
-            }
-            else
-            {
-                dsoundPlayClearSamples(pThis, pDSoundStrmOut);
-
-                pDSoundStrmOut->fRestartPlayback = true;
-                pDSoundStrmOut->fEnabled         = true;
-
-                DSLOG(("DSound: Playback started\n"));
-
-                /*
-                 * The actual IDirectSoundBuffer8_Play call will be made in drvHostDSoundPlayOut,
-                 * because it is necessary to put some samples into the buffer first.
-                 */
-            }
-        }
-    }
-    else
-        hr = E_UNEXPECTED;
-
-    if (FAILED(hr))
-        DSLOGREL(("DSound: Starting playback failed with %Rhrc\n", hr));
-
-    return hr;
-}
-
-/*
- * DirectSoundCapture
- */
-
-static LPCGUID dsoundCaptureSelectDevice(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMIN pDSoundStrmIn)
-{
-    AssertPtrReturn(pThis, NULL);
-    AssertPtrReturn(pDSoundStrmIn, NULL);
-
-    LPCGUID pGUID = pThis->cfg.pGuidCapture;
-
-    if (!pGUID)
-    {
-        PDSOUNDDEV  pDev = NULL;
-
-        switch (pDSoundStrmIn->enmRecSource)
-        {
-            case PDMAUDIORECSOURCE_MIC:
-            {
-                RTListForEach(&pThis->lstDevInput, pDev, DSOUNDDEV, Node)
-                {
-                    if (RTStrIStr(pDev->pszName, "Mic")) /** @todo what is with non en_us windows versions? */
-                        break;
-                }
-                if (RTListNodeIsDummy(&pThis->lstDevInput, pDev, DSOUNDDEV, Node))
-                    pDev = NULL;    /* Found nothing. */
-
-                break;
-            }
-
-            case PDMAUDIORECSOURCE_LINE_IN:
-            default:
-                /* Try opening the default device (NULL). */
-                break;
-        }
-
-        if (pDev)
-        {
-            DSLOG(("DSound: Guest \"%s\" is using host \"%s\"\n",
-                   drvAudioRecSourceToString(pDSoundStrmIn->enmRecSource), pDev->pszName));
-
-            pGUID = &pDev->Guid;
-        }
-    }
-
-    char *pszGUID = dsoundGUIDToUtf8StrA(pGUID);
-    /* This always has to be in the release log. */
-    LogRel(("DSound: Guest \"%s\" is using host device with GUID: %s\n",
-            drvAudioRecSourceToString(pDSoundStrmIn->enmRecSource), pszGUID? pszGUID: "{?}"));
-    RTStrFree(pszGUID);
-
-    return pGUID;
-}
-
-static void directSoundCaptureInterfaceRelease(PDSOUNDSTREAMIN pDSoundStrmIn)
-{
-    if (pDSoundStrmIn->pDSC)
-    {
-        LogFlowFuncEnter();
-        IDirectSoundCapture_Release(pDSoundStrmIn->pDSC);
-        pDSoundStrmIn->pDSC = NULL;
-    }
-}
-
-static HRESULT directSoundCaptureInterfaceCreate(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMIN pDSoundStrmIn)
-{
-    if (pDSoundStrmIn->pDSC != NULL)
-    {
-        DSLOG(("DSound: DirectSoundCapture instance already exists\n"));
-        return S_OK;
-    }
-
-    HRESULT hr = CoCreateInstance(CLSID_DirectSoundCapture8, NULL, CLSCTX_ALL,
-                                  IID_IDirectSoundCapture8, (void **)&pDSoundStrmIn->pDSC);
-    if (FAILED(hr))
-    {
-        DSLOGREL(("DSound: Creating capture instance failed with %Rhrc\n", hr));
-    }
-    else
-    {
-        LPCGUID pGUID = dsoundCaptureSelectDevice(pThis, pDSoundStrmIn);
-        hr = IDirectSoundCapture_Initialize(pDSoundStrmIn->pDSC, pGUID);
-        if (FAILED(hr))
-        {
-            if (hr == DSERR_NODRIVER) /* Usually means that no capture devices are attached. */
-                DSLOGREL(("DSound: Capture device currently is unavailable\n"));
-            else
-                DSLOGREL(("DSound: Initializing capturing device failed with %Rhrc\n", hr));
-
-            directSoundCaptureInterfaceRelease(pDSoundStrmIn);
-        }
-    }
-
-    LogFlowFunc(("Returning %Rhrc\n", hr));
-    return hr;
-}
-
-static HRESULT directSoundCaptureClose(PDSOUNDSTREAMIN pDSoundStrmIn)
-{
-    AssertPtrReturn(pDSoundStrmIn, E_POINTER);
-
-    DSLOG(("DSound: pDSoundStrmIn=%p, pDSCB=%p\n", pDSoundStrmIn, pDSoundStrmIn->pDSCB));
-
-    HRESULT hr = S_OK;
-
-    if (pDSoundStrmIn->pDSCB)
-    {
-        hr = IDirectSoundCaptureBuffer_Stop(pDSoundStrmIn->pDSCB);
-        if (SUCCEEDED(hr))
-        {
-            IDirectSoundCaptureBuffer8_Release(pDSoundStrmIn->pDSCB);
-            pDSoundStrmIn->pDSCB = NULL;
-        }
-        else
-            DSLOGREL(("DSound: Stopping capture buffer failed with %Rhrc\n", hr));
-    }
-
-    if (SUCCEEDED(hr))
-        directSoundCaptureInterfaceRelease(pDSoundStrmIn);
-
-    LogFlowFunc(("Returning %Rhrc\n", hr));
-    return hr;
-}
-
-static HRESULT directSoundCaptureOpen(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMIN pDSoundStrmIn)
-{
-    AssertPtrReturn(pThis, E_POINTER);
-    AssertPtrReturn(pDSoundStrmIn, E_POINTER);
-
-    DSLOG(("DSound: pDSoundStrmIn=%p, cbBufferIn=%ld, uHz=%RU32, cChannels=%RU8, cBits=%RU8, fSigned=%RTbool\n",
-           pDSoundStrmIn,
-           pThis->cfg.cbBufferIn,
-           pDSoundStrmIn->strmIn.Props.uHz,
-           pDSoundStrmIn->strmIn.Props.cChannels,
-           pDSoundStrmIn->strmIn.Props.cBits,
-           pDSoundStrmIn->strmIn.Props.fSigned));
-
-    if (pDSoundStrmIn->pDSCB != NULL)
-    {
-        /* Should not happen but be forgiving. */
-        DSLOGREL(("DSound: DirectSoundCaptureBuffer already exists\n"));
-        directSoundCaptureClose(pDSoundStrmIn);
-    }
-
-    WAVEFORMATEX wfx;
-    int rc = dsoundWaveFmtFromCfg(&pDSoundStrmIn->streamCfg, &wfx);
-    if (RT_FAILURE(rc))
-        return E_INVALIDARG;
-
-    HRESULT hr = directSoundCaptureInterfaceCreate(pThis, pDSoundStrmIn);
-    if (FAILED(hr))
-        return hr;
-
-    do /* To use breaks. */
-    {
-        LPDIRECTSOUNDCAPTUREBUFFER pDSCB = NULL;
-        DSCBUFFERDESC bd;
-        RT_ZERO(bd);
-        bd.dwSize = sizeof(bd);
-        bd.lpwfxFormat = &wfx;
-        bd.dwBufferBytes = pThis->cfg.cbBufferIn;
-        hr = IDirectSoundCapture_CreateCaptureBuffer(pDSoundStrmIn->pDSC,
-                                                     &bd, &pDSCB, NULL);
-        if (FAILED(hr))
-        {
-            if (hr == E_ACCESSDENIED)
-            {
-                DSLOGREL(("DSound: Capturing input from host not possible, access denied\n"));
-            }
-            else
-                DSLOGREL(("DSound: Creating capture buffer failed with %Rhrc\n", hr));
-            break;
-        }
-
-        hr = IDirectSoundCaptureBuffer_QueryInterface(pDSCB, IID_IDirectSoundCaptureBuffer8, (void **)&pDSoundStrmIn->pDSCB);
-        IDirectSoundCaptureBuffer_Release(pDSCB);
-        if (FAILED(hr))
-        {
-            DSLOGREL(("DSound: Querying interface for capture buffer failed with %Rhrc\n", hr));
-            break;
-        }
-
-        /*
-         * Query the actual parameters.
-         */
-        DWORD cbReadPos = 0;
-        hr = IDirectSoundCaptureBuffer8_GetCurrentPosition(pDSoundStrmIn->pDSCB, NULL, &cbReadPos);
-        if (FAILED(hr))
-        {
-            cbReadPos = 0;
-            DSLOGREL(("DSound: Getting capture position failed with %Rhrc\n", hr));
-        }
-
-        RT_ZERO(wfx);
-        hr = IDirectSoundCaptureBuffer8_GetFormat(pDSoundStrmIn->pDSCB, &wfx, sizeof(wfx), NULL);
-        if (FAILED(hr))
-        {
-            DSLOGREL(("DSound: Getting capture format failed with %Rhrc\n", hr));
-            break;
-        }
-
-        DSCBCAPS bc;
-        RT_ZERO(bc);
-        bc.dwSize = sizeof(bc);
-        hr = IDirectSoundCaptureBuffer8_GetCaps(pDSoundStrmIn->pDSCB, &bc);
-        if (FAILED(hr))
-        {
-            DSLOGREL(("Getting capture capabilities failed with %Rhrc\n", hr));
-            break;
-        }
-
-        DSLOG(("DSound: Capture format:\n"
-               "  dwBufferBytes   = %RI32\n"
-               "  dwFlags         = 0x%x\n"
-               "  wFormatTag      = %RI16\n"
-               "  nChannels       = %RI16\n"
-               "  nSamplesPerSec  = %RU32\n"
-               "  nAvgBytesPerSec = %RU32\n"
-               "  nBlockAlign     = %RI16\n"
-               "  wBitsPerSample  = %RI16\n"
-               "  cbSize          = %RI16\n",
-               bc.dwBufferBytes,
-               bc.dwFlags,
-               wfx.wFormatTag,
-               wfx.nChannels,
-               wfx.nSamplesPerSec,
-               wfx.nAvgBytesPerSec,
-               wfx.nBlockAlign,
-               wfx.wBitsPerSample,
-               wfx.cbSize));
-
-        if (bc.dwBufferBytes & pDSoundStrmIn->strmIn.Props.uAlign)
-            DSLOGREL(("DSound: Capture GetCaps returned misaligned buffer: size %RU32, alignment %RU32\n",
-                      bc.dwBufferBytes, pDSoundStrmIn->strmIn.Props.uAlign + 1));
-
-        if (bc.dwBufferBytes != pThis->cfg.cbBufferIn)
-            DSLOGREL(("DSound: Capture buffer size mismatched: DirectSound %RU32, requested %RU32 bytes\n",
-                      bc.dwBufferBytes, pThis->cfg.cbBufferIn));
-
-        /* Initial state: reading at the initial capture position, no error. */
-        pDSoundStrmIn->csCaptureReadPos    = cbReadPos >> pDSoundStrmIn->strmIn.Props.cShift;
-        pDSoundStrmIn->csCaptureBufferSize = bc.dwBufferBytes >> pDSoundStrmIn->strmIn.Props.cShift;
-        pDSoundStrmIn->hrLastCaptureIn = S_OK;
-
-        DSLOG(("DSound: csCaptureReadPos=%RU32, csCaptureBufferSize=%RU32\n",
-                     pDSoundStrmIn->csCaptureReadPos, pDSoundStrmIn->csCaptureBufferSize));
-
-    } while (0);
-
-    if (FAILED(hr))
-        directSoundCaptureClose(pDSoundStrmIn);
-
-    LogFlowFunc(("Returning %Rhrc\n", hr));
-    return hr;
-}
-
-static HRESULT directSoundCaptureStop(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMIN pDSoundStrmIn)
-{
-    AssertPtrReturn(pThis        , E_POINTER);
-    AssertPtrReturn(pDSoundStrmIn, E_POINTER);
-
-    NOREF(pThis);
-
-    HRESULT hr;
-
-    if (pDSoundStrmIn->pDSCB)
-    {
-        DSLOG(("DSound: Stopping capture\n"));
-
-        hr = IDirectSoundCaptureBuffer_Stop(pDSoundStrmIn->pDSCB);
-        if (FAILED(hr))
-            DSLOGREL(("DSound: Stopping capture buffer failed with %Rhrc\n", hr));
-    }
-    else
-        hr = E_UNEXPECTED;
-
-    if (SUCCEEDED(hr))
-        pDSoundStrmIn->fEnabled = false;
-
-    LogFlowFunc(("Returning %Rhrc\n", hr));
-    return hr;
-}
-
-static HRESULT directSoundCaptureStart(PDRVHOSTDSOUND pThis, PDSOUNDSTREAMIN pDSoundStrmIn)
-{
-    AssertPtrReturn(pThis, VERR_INVALID_POINTER);
-    AssertPtrReturn(pDSoundStrmIn, VERR_INVALID_POINTER);
-
-    HRESULT hr;
-    if (pDSoundStrmIn->pDSCB != NULL)
-    {
-        DWORD dwStatus;
-        hr = IDirectSoundCaptureBuffer8_GetStatus(pDSoundStrmIn->pDSCB, &dwStatus);
-        if (FAILED(hr))
-        {
-            DSLOGREL(("DSound: Retrieving capture status failed with %Rhrc\n", hr));
-        }
-        else
-        {
-            if (dwStatus & DSCBSTATUS_CAPTURING)
-            {
-                DSLOG(("DSound: Already capturing\n"));
-            }
-            else
-            {
-                DWORD fFlags = 0;
-#ifndef VBOX_WITH_AUDIO_CALLBACKS
-                fFlags |= DSCBSTART_LOOPING;
-#endif
-                DSLOG(("DSound: Starting to capture\n"));
-                hr = IDirectSoundCaptureBuffer8_Start(pDSoundStrmIn->pDSCB, fFlags);
-                if (FAILED(hr))
-                    DSLOGREL(("DSound: Starting to capture failed with %Rhrc\n", hr));
-            }
-        }
-    }
-    else
-        hr = E_UNEXPECTED;
-
-    if (SUCCEEDED(hr))
-        pDSoundStrmIn->fEnabled = true;
-
-    LogFlowFunc(("Returning %Rhrc\n", hr));
-    return hr;
-}
-
-static int dsoundDevAdd(PRTLISTANCHOR pList, LPGUID lpGUID,
-                        LPCWSTR lpwstrDescription, PDSOUNDDEV *ppDev)
-{
-    AssertPtrReturn(pList, VERR_INVALID_POINTER);
-    AssertPtrReturn(lpGUID, VERR_INVALID_POINTER);
-    AssertPtrReturn(lpwstrDescription, VERR_INVALID_POINTER);
-
-    PDSOUNDDEV pDev = (PDSOUNDDEV)RTMemAlloc(sizeof(DSOUNDDEV));
-    if (!pDev)
-        return VERR_NO_MEMORY;
-
-    int rc = RTUtf16ToUtf8(lpwstrDescription, &pDev->pszName);
-    if (RT_SUCCESS(rc))
-        memcpy(&pDev->Guid, lpGUID, sizeof(GUID));
-
-    if (RT_SUCCESS(rc))
-        RTListAppend(pList, &pDev->Node);
-
-    if (ppDev)
-        *ppDev = pDev;
-
-    return rc;
-}
-
-static void dsoundDeviceRemove(PDSOUNDDEV pDev)
-{
-    if (pDev)
-    {
-        RTStrFree(pDev->pszName);
-        pDev->pszName = NULL;
-
-        RTListNodeRemove(&pDev->Node);
-
-        RTMemFree(pDev);
-    }
-}
-
-static void dsoundLogDevice(const char *pszType, LPGUID lpGUID, LPCWSTR lpwstrDescription, LPCWSTR lpwstrModule)
-{
-    char *pszGUID = dsoundGUIDToUtf8StrA(lpGUID);
-    /* This always has to be in the release log. */
-    LogRel(("DSound: %s: GUID: %s [%ls] (Module: %ls)\n",
-            pszType, pszGUID? pszGUID: "{?}", lpwstrDescription, lpwstrModule));
-    RTStrFree(pszGUID);
-}
-
-static BOOL CALLBACK dsoundDevicesEnumCbPlayback(LPGUID lpGUID, LPCWSTR lpwstrDescription,
-                                                 LPCWSTR lpwstrModule, LPVOID lpContext)
-{
-    PDSOUNDENUMCBCTX pCtx = (PDSOUNDENUMCBCTX)lpContext;
-    AssertPtrReturn(pCtx, FALSE);
-    AssertPtrReturn(pCtx->pDrv, FALSE);
-    AssertPtrReturn(pCtx->pCfg, FALSE);
-
-    if (!lpGUID)
-        return TRUE;
-
-    AssertPtrReturn(lpwstrDescription, FALSE);
-    /* Do not care about lpwstrModule. */
-
-    if (pCtx->fFlags & DSOUNDENUMCBFLAGS_LOG)
-        dsoundLogDevice("Output", lpGUID, lpwstrDescription, lpwstrModule);
-
-    int rc = dsoundDevAdd(&pCtx->pDrv->lstDevOutput,
-                          lpGUID, lpwstrDescription, NULL /* ppDev */);
-    if (RT_FAILURE(rc))
-        return FALSE; /* Abort enumeration. */
-
-    pCtx->pCfg->cMaxHstStrmsOut++;
-
-    return TRUE;
-}
-
-static BOOL CALLBACK dsoundDevicesEnumCbCapture(LPGUID lpGUID, LPCWSTR lpwstrDescription,
-                                                LPCWSTR lpwstrModule, LPVOID lpContext)
-{
-    PDSOUNDENUMCBCTX pCtx = (PDSOUNDENUMCBCTX)lpContext;
-    AssertPtrReturn(pCtx, FALSE);
-    AssertPtrReturn(pCtx->pDrv, FALSE);
-    AssertPtrReturn(pCtx->pCfg, FALSE);
-
-    if (!lpGUID)
-        return TRUE;
-
-    if (pCtx->fFlags & DSOUNDENUMCBFLAGS_LOG)
-        dsoundLogDevice("Input", lpGUID, lpwstrDescription, lpwstrModule);
-
-    int rc = dsoundDevAdd(&pCtx->pDrv->lstDevInput,
-                          lpGUID, lpwstrDescription, NULL /* ppDev */);
-    if (RT_FAILURE(rc))
-        return FALSE; /* Abort enumeration. */
-
-    pCtx->pCfg->cMaxHstStrmsIn++;
-
-    return TRUE;
-}
-
-/**
- * Does a (Re-)enumeration of the host's playback + capturing devices.
- *
- * @return  IPRT status code.
- * @param   pThis               Host audio driver instance.
- * @param   pCfg                Where to store the enumeration results.
- * @param   fEnum               Enumeration flags.
- */
-static int dsoundDevicesEnumerate(PDRVHOSTDSOUND pThis, PPDMAUDIOBACKENDCFG pCfg, uint32_t fEnum)
-{
-    AssertPtrReturn(pThis, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg,  VERR_INVALID_POINTER);
-
-    dsoundDevicesClear(pThis);
-
-    pCfg->cMaxHstStrmsOut = 0;
-    pCfg->cMaxHstStrmsIn  = 0;
-
-    RTLDRMOD hDSound = NULL;
-    int rc = RTLdrLoadSystem("dsound.dll", true /*fNoUnload*/, &hDSound);
-    if (RT_SUCCESS(rc))
-    {
-        PFNDIRECTSOUNDENUMERATEW pfnDirectSoundEnumerateW = NULL;
-        PFNDIRECTSOUNDCAPTUREENUMERATEW pfnDirectSoundCaptureEnumerateW = NULL;
-
-        rc = RTLdrGetSymbol(hDSound, "DirectSoundEnumerateW", (void**)&pfnDirectSoundEnumerateW);
-        if (RT_SUCCESS(rc))
-            rc = RTLdrGetSymbol(hDSound, "DirectSoundCaptureEnumerateW", (void**)&pfnDirectSoundCaptureEnumerateW);
-
-        if (RT_SUCCESS(rc))
-        {
-            DSOUNDENUMCBCTX ctx = { pThis, pCfg, fEnum };
-
-            HRESULT hr = pfnDirectSoundEnumerateW(&dsoundDevicesEnumCbPlayback, &ctx);
-            if (FAILED(hr))
-                LogRel2(("DSound: Error enumerating host playback devices: %Rhrc\n", hr));
-
-            hr = pfnDirectSoundCaptureEnumerateW(&dsoundDevicesEnumCbCapture, &ctx);
-            if (FAILED(hr))
-                LogRel2(("DSound: Error enumerating host capturing devices: %Rhrc\n", hr));
-        }
-
-        RTLdrClose(hDSound);
-    }
-    else
-    {
-        /* No dsound.dll on this system. */
-        LogRel2(("DSound: Could not load dsound.dll: %Rrc\n", rc));
-    }
-
-    return rc;
-}
-
-/**
- * Updates this host driver's internal status, according to the global, overall input/output
- * state and all connected (native) audio streams.
- *
- * @param   pThis               Host audio driver instance.
- * @param   pCfg                Where to store the backend configuration. Optional.
- * @param   fEnum               Enumeration flags.
- */
-void dsoundUpdateStatusInternalEx(PDRVHOSTDSOUND pThis, PPDMAUDIOBACKENDCFG pCfg, uint32_t fEnum)
-{
-    AssertPtrReturnVoid(pThis);
-    /* pCfg is optional. */
-
-    PDMAUDIOBACKENDCFG Cfg;
-    RT_ZERO(Cfg);
-
-    Cfg.cbStreamOut = sizeof(DSOUNDSTREAMOUT);
-    Cfg.cbStreamIn  = sizeof(DSOUNDSTREAMIN);
-
-    int rc = dsoundDevicesEnumerate(pThis, &Cfg, fEnum);
-    AssertRC(rc);
-
-#ifdef VBOX_WITH_AUDIO_CALLBACKS
-    if (   pThis->fEnabledOut != RT_BOOL(Cfg.cMaxHstStrmsOut)
-        || pThis->fEnabledIn  != RT_BOOL(Cfg.cMaxHstStrmsIn))
-    {
-        /** @todo Use a registered callback to the audio connector (e.g "OnConfigurationChanged") to
-         *        let the connector know that something has changed within the host backend. */
-    }
-#else
-    pThis->fEnabledOut = RT_BOOL(Cfg.cMaxHstStrmsOut);
-    pThis->fEnabledIn  = RT_BOOL(Cfg.cMaxHstStrmsIn);
-#endif
-
-    if (pCfg)
-        memcpy(pCfg, &Cfg, sizeof(PDMAUDIOBACKENDCFG));
-
-    LogFlowFuncLeaveRC(rc);
-}
-
-void dsoundUpdateStatusInternal(PDRVHOSTDSOUND pThis)
-{
-    dsoundUpdateStatusInternalEx(pThis, NULL /* pCfg */, 0 /* fEnum */);
-}
-
-/*
- * PDMIHOSTAUDIO
- */
-
-static DECLCALLBACK(int) drvHostDSoundInitOut(PPDMIHOSTAUDIO pInterface,
-                                              PPDMAUDIOHSTSTRMOUT pHstStrmOut, PPDMAUDIOSTREAMCFG pCfg,
-                                              uint32_t *pcSamples)
-{
-    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
-    AssertPtrReturn(pHstStrmOut, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
-    /* pcSamples is optional. */
-
-    LogFlowFunc(("pHstStrmOut=%p, pCfg=%p\n", pHstStrmOut, pCfg));
-
-    PDRVHOSTDSOUND pThis = PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface);
-    PDSOUNDSTREAMOUT pDSoundStrmOut = (PDSOUNDSTREAMOUT)pHstStrmOut;
-
-    pDSoundStrmOut->streamCfg = *pCfg;
-    pDSoundStrmOut->streamCfg.enmEndianness = PDMAUDIOHOSTENDIANNESS;
-
-    int rc = DrvAudioStreamCfgToProps(&pDSoundStrmOut->streamCfg, &pDSoundStrmOut->strmOut.Props);
-    if (RT_SUCCESS(rc))
-    {
-        pDSoundStrmOut->pDS = NULL;
-        pDSoundStrmOut->pDSB = NULL;
-        pDSoundStrmOut->cbPlayWritePos = 0;
-        pDSoundStrmOut->fRestartPlayback = true;
-        pDSoundStrmOut->csPlaybackBufferSize = 0;
-
-        if (pcSamples)
-            *pcSamples = pThis->cfg.cbBufferOut >> pHstStrmOut->Props.cShift;
-
-        /* Try to open playback in case the device is already there. */
-        directSoundPlayOpen(pThis, pDSoundStrmOut);
-    }
-    else
-    {
-        RT_ZERO(pDSoundStrmOut->streamCfg);
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(int) drvHostDSoundControlOut(PPDMIHOSTAUDIO pInterface,
-                                                 PPDMAUDIOHSTSTRMOUT pHstStrmOut, PDMAUDIOSTREAMCMD enmStreamCmd)
-{
-    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
-    AssertPtrReturn(pHstStrmOut, VERR_INVALID_POINTER);
-
-    LogFlowFunc(("pHstStrmOut=%p, cmd=%d\n", pHstStrmOut, enmStreamCmd));
-
-    PDRVHOSTDSOUND   pThis          = PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface);
-    PDSOUNDSTREAMOUT pDSoundStrmOut = (PDSOUNDSTREAMOUT)pHstStrmOut;
-
-    int rc = VINF_SUCCESS;
-
-    HRESULT hr;
-    switch (enmStreamCmd)
-    {
-        case PDMAUDIOSTREAMCMD_ENABLE:
-        case PDMAUDIOSTREAMCMD_RESUME:
-        {
-            DSLOG(("DSound: Playback PDMAUDIOSTREAMCMD_ENABLE\n"));
-            /* Try to start playback. If it fails, then reopen and try again. */
-            hr = directSoundPlayStart(pThis, pDSoundStrmOut);
-            if (FAILED(hr))
-            {
-                hr = directSoundPlayClose(pThis, pDSoundStrmOut);
-                if (SUCCEEDED(hr))
-                    hr = directSoundPlayOpen(pThis, pDSoundStrmOut);
-                if (SUCCEEDED(hr))
-                    hr = directSoundPlayStart(pThis, pDSoundStrmOut);
-            }
-
-            if (FAILED(hr))
-                rc = VERR_NOT_SUPPORTED;
-            break;
-        }
-
-        case PDMAUDIOSTREAMCMD_DISABLE:
-        case PDMAUDIOSTREAMCMD_PAUSE:
-        {
-            DSLOG(("DSound: Playback PDMAUDIOSTREAMCMD_DISABLE\n"));
-            hr = directSoundPlayStop(pThis, pDSoundStrmOut);
-            if (FAILED(hr))
-                rc = VERR_NOT_SUPPORTED;
-            break;
-        }
-
-        default:
-        {
-            AssertMsgFailed(("Invalid command: %ld\n", enmStreamCmd));
-            rc = VERR_INVALID_PARAMETER;
-            break;
-        }
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(int) drvHostDSoundPlayOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHstStrmOut,
-                                              uint32_t *pcSamplesPlayed)
-{
-    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
-    AssertPtrReturn(pHstStrmOut, VERR_INVALID_POINTER);
-    /* pcSamplesPlayed is optional. */
-
-    PDRVHOSTDSOUND pThis = PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface);
-    PDSOUNDSTREAMOUT pDSoundStrmOut = (PDSOUNDSTREAMOUT)pHstStrmOut;
-
-    int rc = VINF_SUCCESS;
-    uint32_t cReadTotal = 0;
-
-#ifdef DEBUG_andy
-    LogFlowFuncEnter();
-#endif
-
-    do /* to use 'break' */
-    {
-        DWORD cbBuffer, cbFree, cbPlayPos;
-        rc = dsoundGetPosOut(pThis, pDSoundStrmOut, &cbBuffer, &cbFree, &cbPlayPos);
-        if (RT_FAILURE(rc))
-            break;
-
-        /*
-         * Check for full buffer, do not allow the cbPlayWritePos to catch cbPlayPos during playback,
-         * i.e. always leave a free space for 1 audio sample.
-         */
-        const DWORD cbSample = AUDIOMIXBUF_S2B(&pHstStrmOut->MixBuf, 1);
-        if (cbFree <= cbSample)
-            break;
-        cbFree     -= cbSample;
-
-        uint32_t csLive = AudioMixBufAvail(&pHstStrmOut->MixBuf);
-        uint32_t cbLive = AUDIOMIXBUF_S2B(&pHstStrmOut->MixBuf, csLive);
-
-        /* Do not write more than available space in the DirectSound playback buffer. */
-        cbLive = RT_MIN(cbFree, cbLive);
-
-        cbLive &= ~pHstStrmOut->Props.uAlign;
-        if (cbLive == 0 || cbLive > cbBuffer)
-        {
-            DSLOG(("DSound: cbLive=%RU32, cbBuffer=%ld, cbPlayWritePos=%ld, cbPlayPos=%ld\n",
-                   cbLive, cbBuffer, pDSoundStrmOut->cbPlayWritePos, cbPlayPos));
-            break;
-        }
-
-        LPDIRECTSOUNDBUFFER8 pDSB = pDSoundStrmOut->pDSB;
-        AssertPtr(pDSB);
-
-        LPVOID pv1, pv2;
-        DWORD cb1, cb2;
-        HRESULT hr = directSoundPlayLock(pThis, pDSB, &pHstStrmOut->Props, pDSoundStrmOut->cbPlayWritePos, cbLive,
-                                         &pv1, &pv2, &cb1, &cb2, 0 /* dwFlags */);
-        if (FAILED(hr))
-        {
-            rc = VERR_ACCESS_DENIED;
-            break;
-        }
-
-        DWORD len1 = AUDIOMIXBUF_B2S(&pHstStrmOut->MixBuf, cb1);
-        DWORD len2 = AUDIOMIXBUF_B2S(&pHstStrmOut->MixBuf, cb2);
-
-        uint32_t cRead = 0;
-
-        if (pv1 && cb1)
-        {
-            rc = AudioMixBufReadCirc(&pHstStrmOut->MixBuf, pv1, cb1, &cRead);
-            if (RT_SUCCESS(rc))
-                cReadTotal += cRead;
-        }
-
-        if (   RT_SUCCESS(rc)
-            && cReadTotal == len1
-            && pv2 && cb2)
-        {
-            rc = AudioMixBufReadCirc(&pHstStrmOut->MixBuf, pv2, cb2, &cRead);
-            if (RT_SUCCESS(rc))
-                cReadTotal += cRead;
-        }
-
-        directSoundPlayUnlock(pThis, pDSB, pv1, pv2, cb1, cb2);
-
-        pDSoundStrmOut->cbPlayWritePos =
-            (pDSoundStrmOut->cbPlayWritePos + AUDIOMIXBUF_S2B(&pHstStrmOut->MixBuf, cReadTotal)) % cbBuffer;
-
-        DSLOGF(("DSound: %RU32 (%RU32 samples) out of %RU32%s, buffer write pos %ld, rc=%Rrc\n",
-                AUDIOMIXBUF_S2B(&pHstStrmOut->MixBuf, cReadTotal), cReadTotal, cbLive,
-                cbLive != AUDIOMIXBUF_S2B(&pHstStrmOut->MixBuf, cReadTotal) ? " !!!": "",
-                pDSoundStrmOut->cbPlayWritePos, rc));
-
-        if (cReadTotal)
-        {
-            AudioMixBufFinish(&pHstStrmOut->MixBuf, cReadTotal);
-            rc = VINF_SUCCESS; /* Played something. */
-        }
-
-        if (RT_FAILURE(rc))
-            break;
-
-        if (pDSoundStrmOut->fRestartPlayback)
-        {
-            /*
-             * The playback has been just started.
-             * Some samples of the new sound have been copied to the buffer
-             * and it can start playing.
-             */
-            pDSoundStrmOut->fRestartPlayback = false;
-
-            DWORD fFlags = 0;
-#ifndef VBOX_WITH_AUDIO_CALLBACKS
-            fFlags |= DSCBSTART_LOOPING;
-#endif
-            for (unsigned i = 0; i < DRV_DSOUND_RESTORE_ATTEMPTS_MAX; i++)
-            {
-                hr = IDirectSoundBuffer8_Play(pDSoundStrmOut->pDSB, 0, 0, fFlags);
-                if (   SUCCEEDED(hr)
-                    || hr != DSERR_BUFFERLOST)
-                    break;
-                else
-                {
-                    LogFlowFunc(("Restarting playback failed due to lost buffer, restoring ...\n"));
-                    directSoundPlayRestore(pThis, pDSoundStrmOut->pDSB);
-                }
-            }
-
-            if (FAILED(hr))
-            {
-                DSLOGREL(("DSound: Starting playback failed with %Rhrc\n", hr));
-                rc = VERR_NOT_SUPPORTED;
-                break;
-            }
-        }
-
-    } while (0);
-
-    if (RT_FAILURE(rc))
-    {
-        dsoundUpdateStatusInternal(pThis);
-    }
-    else
-    {
-        if (pcSamplesPlayed)
-            *pcSamplesPlayed = cReadTotal;
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(int) drvHostDSoundFiniOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHstStrmOut)
-{
-    PDRVHOSTDSOUND pThis = PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface);
-    PDSOUNDSTREAMOUT pDSoundStrmOut = (PDSOUNDSTREAMOUT)pHstStrmOut;
-
-    directSoundPlayClose(pThis, pDSoundStrmOut);
-
-    pDSoundStrmOut->cbPlayWritePos = 0;
-    pDSoundStrmOut->fRestartPlayback = true;
-    pDSoundStrmOut->csPlaybackBufferSize = 0;
-
-    RT_ZERO(pDSoundStrmOut->streamCfg);
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) drvHostDSoundInitIn(PPDMIHOSTAUDIO pInterface,
-                                             PPDMAUDIOHSTSTRMIN pHstStrmIn, PPDMAUDIOSTREAMCFG pCfg,
-                                             PDMAUDIORECSOURCE enmRecSource,
-                                             uint32_t *pcSamples)
-{
-    PDRVHOSTDSOUND pThis = PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface);
-    PDSOUNDSTREAMIN pDSoundStrmIn = (PDSOUNDSTREAMIN)pHstStrmIn;
-
-    LogFlowFunc(("pHstStrmIn=%p, pAudioSettings=%p, enmRecSource=%ld\n",
-                 pHstStrmIn, pCfg, enmRecSource));
-
-    pDSoundStrmIn->streamCfg = *pCfg;
-    pDSoundStrmIn->streamCfg.enmEndianness = PDMAUDIOHOSTENDIANNESS;
-
-    /** @todo caller should already init Props? */
-    int rc = DrvAudioStreamCfgToProps(&pDSoundStrmIn->streamCfg, &pHstStrmIn->Props);
-    if (RT_SUCCESS(rc))
-    {
-        /* Init the stream structure and save relevant information to it. */
-        pDSoundStrmIn->csCaptureReadPos = 0;
-        pDSoundStrmIn->csCaptureBufferSize = 0;
-        pDSoundStrmIn->pDSC = NULL;
-        pDSoundStrmIn->pDSCB = NULL;
-        pDSoundStrmIn->enmRecSource = enmRecSource;
-        pDSoundStrmIn->hrLastCaptureIn = S_OK;
-
-        if (pcSamples)
-            *pcSamples = pThis->cfg.cbBufferIn >> pHstStrmIn->Props.cShift;
-
-        /* Try to open capture in case the device is already there. */
-        directSoundCaptureOpen(pThis, pDSoundStrmIn);
-    }
-    else
-    {
-        RT_ZERO(pDSoundStrmIn->streamCfg);
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(int) drvHostDSoundControlIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHstStrmIn,
-                                                PDMAUDIOSTREAMCMD enmStreamCmd)
-{
-    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
-    AssertPtrReturn(pHstStrmIn, VERR_INVALID_POINTER);
-
-    LogFlowFunc(("pHstStrmIn=%p, enmStreamCmd=%ld\n", pHstStrmIn, enmStreamCmd));
-
-    PDRVHOSTDSOUND  pThis         = PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface);
-    PDSOUNDSTREAMIN pDSoundStrmIn = (PDSOUNDSTREAMIN)pHstStrmIn;
-
-    int rc = VINF_SUCCESS;
-
-    HRESULT hr;
-    switch (enmStreamCmd)
-    {
-        case PDMAUDIOSTREAMCMD_ENABLE:
-        case PDMAUDIOSTREAMCMD_RESUME:
-        {
-            /* Try to start capture. If it fails, then reopen and try again. */
-            hr = directSoundCaptureStart(pThis, pDSoundStrmIn);
-            if (FAILED(hr))
-            {
-                hr = directSoundCaptureClose(pDSoundStrmIn);
-                if (SUCCEEDED(hr))
-                {
-                    hr = directSoundCaptureOpen(pThis, pDSoundStrmIn);
-                    if (SUCCEEDED(hr))
-                        hr = directSoundCaptureStart(pThis, pDSoundStrmIn);
-                }
-            }
-
-            if (FAILED(hr))
-                rc = VERR_NOT_SUPPORTED;
-            break;
-        }
-
-        case PDMAUDIOSTREAMCMD_DISABLE:
-        case PDMAUDIOSTREAMCMD_PAUSE:
-        {
-            hr = directSoundCaptureStop(pThis, pDSoundStrmIn);
-            if (FAILED(hr))
-                rc = VERR_NOT_SUPPORTED;
-            break;
-        }
-
-        default:
-        {
-            AssertMsgFailed(("Invalid command %ld\n", enmStreamCmd));
-            rc = VERR_INVALID_PARAMETER;
-            break;
-        }
-    }
-
-    return rc;
-}
-
-static DECLCALLBACK(int) drvHostDSoundCaptureIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHstStrmIn,
-                                                uint32_t *pcSamplesCaptured)
-{
-    PDRVHOSTDSOUND pThis = PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface);
-
-    PDSOUNDSTREAMIN             pDSoundStrmIn = (PDSOUNDSTREAMIN)pHstStrmIn;
-    LPDIRECTSOUNDCAPTUREBUFFER8 pDSCB         = pDSoundStrmIn->pDSCB;
-
-    int rc = VINF_SUCCESS;
-
-    uint32_t cCaptured = 0;
-
-    do
-    {
-        if (pDSCB == NULL)
-        {
-            rc = VERR_NOT_AVAILABLE;
-            break;
-        }
-
-        /* Get DirectSound capture position in bytes. */
-        DWORD cbReadPos;
-        HRESULT hr = IDirectSoundCaptureBuffer_GetCurrentPosition(pDSCB, NULL, &cbReadPos);
-        if (FAILED(hr))
-        {
-            if (hr != pDSoundStrmIn->hrLastCaptureIn)
-            {
-                DSLOGREL(("DSound: Getting capture position failed with %Rhrc\n", hr));
-                pDSoundStrmIn->hrLastCaptureIn = hr;
-            }
-
-            rc = VERR_NOT_AVAILABLE;
-            break;
-        }
-
-        pDSoundStrmIn->hrLastCaptureIn = hr;
-
-        if (cbReadPos & pHstStrmIn->Props.uAlign)
-            DSLOGF(("DSound: Misaligned capture read position %ld (alignment: %RU32)\n", cbReadPos, pHstStrmIn->Props.uAlign));
-
-        /* Capture position in samples. */
-        DWORD csReadPos = cbReadPos >> pHstStrmIn->Props.cShift;
-
-        /* Number of samples available in the DirectSound capture buffer. */
-        DWORD csCaptured = dsoundRingDistance(csReadPos, pDSoundStrmIn->csCaptureReadPos, pDSoundStrmIn->csCaptureBufferSize);
-        if (csCaptured == 0)
-            break;
-
-        /* Using as an intermediate not circular buffer. */
-        AudioMixBufReset(&pHstStrmIn->MixBuf);
-
-        /* Get number of free samples in the mix buffer and check that is has free space */
-        uint32_t csMixFree = AudioMixBufFree(&pHstStrmIn->MixBuf);
-        if (csMixFree == 0)
-        {
-            DSLOGF(("DSound: Capture buffer full\n"));
-            break;
-        }
-
-        DSLOGF(("DSound: Capture csMixFree=%RU32, csReadPos=%ld, csCaptureReadPos=%ld, csCaptured=%ld\n",
-                csMixFree, csReadPos, pDSoundStrmIn->csCaptureReadPos, csCaptured));
-
-        /* No need to fetch more samples than mix buffer can receive. */
-        csCaptured = RT_MIN(csCaptured, csMixFree);
-
-        /* Lock relevant range in the DirectSound capture buffer. */
-        LPVOID pv1, pv2;
-        DWORD cb1, cb2;
-        hr = directSoundCaptureLock(pDSCB, &pHstStrmIn->Props,
-                                    AUDIOMIXBUF_S2B(&pHstStrmIn->MixBuf, pDSoundStrmIn->csCaptureReadPos), /* dwOffset */
-                                    AUDIOMIXBUF_S2B(&pHstStrmIn->MixBuf, csCaptured),                      /* dwBytes */
-                                    &pv1, &pv2, &cb1, &cb2,
-                                    0 /* dwFlags */);
-        if (FAILED(hr))
-        {
-            rc = VERR_ACCESS_DENIED;
-            break;
-        }
-
-        DWORD len1 = AUDIOMIXBUF_B2S(&pHstStrmIn->MixBuf, cb1);
-        DWORD len2 = AUDIOMIXBUF_B2S(&pHstStrmIn->MixBuf, cb2);
-
-        uint32_t csWrittenTotal = 0;
-        uint32_t csWritten;
-        if (pv1 && len1)
-        {
-            rc = AudioMixBufWriteAt(&pHstStrmIn->MixBuf, 0 /* offWrite */,
-                                    pv1, cb1, &csWritten);
-            if (RT_SUCCESS(rc))
-                csWrittenTotal += csWritten;
-        }
-
-        if (   RT_SUCCESS(rc)
-            && csWrittenTotal == len1
-            && pv2 && len2)
-        {
-            rc = AudioMixBufWriteAt(&pHstStrmIn->MixBuf, csWrittenTotal,
-                                    pv2, cb2, &csWritten);
-            if (RT_SUCCESS(rc))
-                csWrittenTotal += csWritten;
-        }
-
-        directSoundCaptureUnlock(pDSCB, pv1, pv2, cb1, cb2);
-
-        if (csWrittenTotal) /* Captured something? */
-            rc = AudioMixBufMixToParent(&pHstStrmIn->MixBuf, csWrittenTotal, &cCaptured);
-
-        if (RT_SUCCESS(rc))
-        {
-            pDSoundStrmIn->csCaptureReadPos = (pDSoundStrmIn->csCaptureReadPos + cCaptured) % pDSoundStrmIn->csCaptureBufferSize;
-            DSLOGF(("DSound: Capture %ld (%ld+%ld), processed %RU32/%RU32\n",
-                    csCaptured, len1, len2, cCaptured, csWrittenTotal));
-        }
-
-    } while (0);
-
-    if (RT_FAILURE(rc))
-    {
-        dsoundUpdateStatusInternal(pThis);
-    }
-    else
-    {
-        if (pcSamplesCaptured)
-            *pcSamplesCaptured = cCaptured;
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(int) drvHostDSoundFiniIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHstStrmIn)
-{
-    PDRVHOSTDSOUND pThis = PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface);
-    PDSOUNDSTREAMIN pDSoundStrmIn = (PDSOUNDSTREAMIN)pHstStrmIn;
-
-    directSoundCaptureClose(pDSoundStrmIn);
-
-    pDSoundStrmIn->csCaptureReadPos    = 0;
-    pDSoundStrmIn->csCaptureBufferSize = 0;
-    RT_ZERO(pDSoundStrmIn->streamCfg);
-
-    return VINF_SUCCESS;
-}
-
-/** @todo Replace PDMAUDIODIR with a (registered? unique) channel ID to provide multi-channel input/output. */
-static DECLCALLBACK(bool) drvHostDSoundIsEnabled(PPDMIHOSTAUDIO pInterface, PDMAUDIODIR enmDir)
-{
-    AssertPtrReturn(pInterface, false);
-
-    PDRVHOSTDSOUND pThis = PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface);
-
-    if (enmDir == PDMAUDIODIR_IN)
-        return pThis->fEnabledIn;
-
-    return pThis->fEnabledOut;
-}
-
-static DECLCALLBACK(int) drvHostDSoundGetConf(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDCFG pCfg)
-{
-    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg,       VERR_INVALID_POINTER);
-
-    PDRVHOSTDSOUND pThis = PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface);
-
-    dsoundUpdateStatusInternalEx(pThis, pCfg, 0 /* fEnum */);
-
-    return VINF_SUCCESS;
-}
-
-#ifdef VBOX_WITH_AUDIO_CALLBACKS
-static int dsoundNotifyThread(PDRVHOSTDSOUND pThis, bool fShutdown)
-{
-    AssertPtrReturn(pThis, VERR_INVALID_POINTER);
-
-    if (fShutdown)
-    {
-        LogFlowFunc(("Shutting down thread ...\n"));
-        pThis->fShutdown = fShutdown;
-    }
-
-    /* Set the notification event so that the thread is being notified. */
-    BOOL fRc = SetEvent(pThis->aEvents[DSOUNDEVENT_NOTIFY]);
-    Assert(fRc);
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) drvHostDSoundThread(RTTHREAD hThreadSelf, void *pvUser)
-{
-    PDRVHOSTDSOUND pThis = (PDRVHOSTDSOUND)pvUser;
-    AssertPtr(pThis);
-
-    LogFlowFuncEnter();
-
-    /* Let caller know that we're done initializing, regardless of the result. */
-    int rc = RTThreadUserSignal(hThreadSelf);
-    AssertRC(rc);
-
-    do
-    {
-        HANDLE aEvents[VBOX_DSOUND_MAX_EVENTS];
-        DWORD  cEvents = 0;
-        for (uint8_t i = 0; i < VBOX_DSOUND_MAX_EVENTS; i++)
-        {
-            if (pThis->aEvents[i])
-                aEvents[cEvents++] = pThis->aEvents[i];
-        }
-        Assert(cEvents);
-
-        LogFlowFunc(("Waiting: cEvents=%ld\n", cEvents));
-
-        DWORD dwObj = WaitForMultipleObjects(cEvents, aEvents, FALSE /* bWaitAll */, INFINITE);
-        switch (dwObj)
-        {
-            case WAIT_FAILED:
-            {
-                rc = VERR_CANCELLED;
-                break;
-            }
-
-            case WAIT_TIMEOUT:
-            {
-                rc = VERR_TIMEOUT;
-                break;
-            }
-
-            default:
-            {
-                dwObj = WAIT_OBJECT_0 + cEvents - 1;
-                if (aEvents[dwObj] == pThis->aEvents[DSOUNDEVENT_NOTIFY])
-                {
-                    LogFlowFunc(("Notify\n"));
-                }
-                else if (aEvents[dwObj] == pThis->aEvents[DSOUNDEVENT_INPUT])
-                {
-
-                }
-                else if (aEvents[dwObj] == pThis->aEvents[DSOUNDEVENT_OUTPUT])
-                {
-                    DWORD cbBuffer, cbFree, cbPlayPos;
-                    rc = dsoundGetPosOut(pThis->pDSStrmOut, &cbBuffer, &cbFree, &cbPlayPos);
-                    if (   RT_SUCCESS(rc)
-                        && cbFree)
-                    {
-                        PDMAUDIOCALLBACKDATAOUT Out;
-                        Out.cbInFree     = cbFree;
-                        Out.cbOutWritten = 0;
-
-                        while (!Out.cbOutWritten)
-                        {
-                            rc = pThis->pUpIAudioConnector->pfnCallback(pThis->pUpIAudioConnector,
-                                                                        PDMAUDIOCALLBACKTYPE_OUTPUT, &Out, sizeof(Out));
-                            if (RT_FAILURE(rc))
-                                break;
-                            RTThreadSleep(100);
-                        }
-
-                        LogFlowFunc(("Output: cbBuffer=%ld, cbFree=%ld, cbPlayPos=%ld, cbWritten=%RU32, rc=%Rrc\n",
-                                     cbBuffer, cbFree, cbPlayPos, Out.cbOutWritten, rc));
-                    }
-                }
-                break;
-            }
-        }
-
-        if (pThis->fShutdown)
-            break;
-
-    } while (RT_SUCCESS(rc));
-
-    pThis->fStopped = true;
-
-    LogFlowFunc(("Exited with fShutdown=%RTbool, rc=%Rrc\n", pThis->fShutdown, rc));
-    return rc;
-}
-#endif /* VBOX_WITH_AUDIO_CALLBACKS */
-
-static DECLCALLBACK(void) drvHostDSoundShutdown(PPDMIHOSTAUDIO pInterface)
-{
-    PDRVHOSTDSOUND pThis = PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface);
-
-    LogFlowFuncEnter();
-
-#ifdef VBOX_WITH_AUDIO_CALLBACKS
-    int rc = dsoundNotifyThread(pThis, true /* fShutdown */);
-    AssertRC(rc);
-
-    int rcThread;
-    rc = RTThreadWait(pThis->Thread,  15 * 1000 /* 15s timeout */, &rcThread);
-    LogFlowFunc(("rc=%Rrc, rcThread=%Rrc\n", rc, rcThread));
-
-    Assert(pThis->fStopped);
-
-    if (pThis->aEvents[DSOUNDEVENT_NOTIFY])
-    {
-        CloseHandle(pThis->aEvents[DSOUNDEVENT_NOTIFY]);
-        pThis->aEvents[DSOUNDEVENT_NOTIFY] = NULL;
-}
-#endif
-
-    LogFlowFuncLeave();
-}
-
-static DECLCALLBACK(int) drvHostDSoundInit(PPDMIHOSTAUDIO pInterface)
-{
-    PDRVHOSTDSOUND pThis = PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface);
-
-    LogFlowFuncEnter();
-
-    int rc;
-
-    /* Verify that IDirectSound is available. */
-    LPDIRECTSOUND pDirectSound = NULL;
-    HRESULT hr = CoCreateInstance(CLSID_DirectSound, NULL, CLSCTX_ALL,
-                                  IID_IDirectSound, (void **)&pDirectSound);
-    if (SUCCEEDED(hr))
-    {
-        IDirectSound_Release(pDirectSound);
-
-#ifdef VBOX_WITH_AUDIO_CALLBACKS
-        /* Create notification event. */
-        pThis->aEvents[DSOUNDEVENT_NOTIFY] = CreateEvent(NULL /* Security attribute */,
-                                                         FALSE /* bManualReset */, FALSE /* bInitialState */,
-                                                         NULL /* lpName */);
-        Assert(pThis->aEvents[DSOUNDEVENT_NOTIFY] != NULL);
-
-        /* Start notification thread. */
-        rc = RTThreadCreate(&pThis->Thread, drvHostDSoundThread,
-                            pThis /*pvUser*/, 0 /*cbStack*/,
-                            RTTHREADTYPE_DEFAULT, RTTHREADFLAGS_WAITABLE, "dSoundNtfy");
-        if (RT_SUCCESS(rc))
-        {
-            /* Wait for the thread to initialize. */
-            rc = RTThreadUserWait(pThis->Thread, RT_MS_1MIN);
-            if (RT_FAILURE(rc))
-                DSLOGREL(("DSound: Waiting for thread to initialize failed with rc=%Rrc\n", rc));
-        }
-    else
-            DSLOGREL(("DSound: Creating thread failed with rc=%Rrc\n", rc));
-#else
-        rc = VINF_SUCCESS;
-#endif
-
-        PDMAUDIOBACKENDCFG Cfg;
-        dsoundUpdateStatusInternalEx(pThis, &Cfg, DSOUNDENUMCBFLAGS_LOG /* fEnum */);
-
-        DSLOGREL(("DSound: Found %RU32 host playback devices\n",  Cfg.cMaxHstStrmsOut));
-        DSLOGREL(("DSound: Found %RU32 host capturing devices\n", Cfg.cMaxHstStrmsIn));
-    }
-    else
-    {
-        DSLOGREL(("DSound: DirectSound not available: %Rhrc\n", hr));
-        rc = VERR_NOT_SUPPORTED;
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(void *) drvHostDSoundQueryInterface(PPDMIBASE pInterface, const char *pszIID)
-{
-    PPDMDRVINS     pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
-    PDRVHOSTDSOUND pThis   = PDMINS_2_DATA(pDrvIns, PDRVHOSTDSOUND);
-
-    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase);
-    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIHOSTAUDIO, &pThis->IHostAudio);
-    return NULL;
-}
-
-static LPCGUID dsoundConfigQueryGUID(PCFGMNODE pCfg, const char *pszName, RTUUID *pUuid)
-{
-    LPCGUID pGuid = NULL;
-
-    char *pszGuid = NULL;
-    int rc = CFGMR3QueryStringAlloc(pCfg, pszName, &pszGuid);
-    if (RT_SUCCESS(rc))
-    {
-        rc = RTUuidFromStr(pUuid, pszGuid);
-        if (RT_SUCCESS(rc))
-            pGuid = (LPCGUID)&pUuid;
-        else
-            DSLOGREL(("DSound: Error parsing device GUID for device '%s': %Rrc\n", pszName, rc));
-
-        RTStrFree(pszGuid);
-    }
-
-    return pGuid;
-}
-
-static void dSoundConfigInit(PDRVHOSTDSOUND pThis, PCFGMNODE pCfg)
-{
-    unsigned int uBufsizeOut, uBufsizeIn;
-
-    CFGMR3QueryUIntDef(pCfg, "BufsizeOut", &uBufsizeOut, _16K);
-    CFGMR3QueryUIntDef(pCfg, "BufsizeIn",  &uBufsizeIn,  _16K);
-    pThis->cfg.cbBufferOut = uBufsizeOut;
-    pThis->cfg.cbBufferIn  = uBufsizeIn;
-
-    pThis->cfg.pGuidPlay    = dsoundConfigQueryGUID(pCfg, "DeviceGuidOut", &pThis->cfg.uuidPlay);
-    pThis->cfg.pGuidCapture = dsoundConfigQueryGUID(pCfg, "DeviceGuidIn",  &pThis->cfg.uuidCapture);
-
-    DSLOG(("DSound: BufsizeOut %u, BufsizeIn %u, DeviceGuidOut {%RTuuid}, DeviceGuidIn {%RTuuid}\n",
-           pThis->cfg.cbBufferOut,
-           pThis->cfg.cbBufferIn,
-           &pThis->cfg.uuidPlay,
-           &pThis->cfg.uuidCapture));
-}
-
-static DECLCALLBACK(void) drvHostDSoundDestruct(PPDMDRVINS pDrvIns)
-{
-    PDRVHOSTDSOUND pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTDSOUND);
-    PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns);
-    LogFlowFuncEnter();
-
-    if (pThis->pDrvIns)
-        CoUninitialize();
-
-    LogFlowFuncLeave();
-}
-
-/**
- * Construct a DirectSound Audio driver instance.
- *
- * @copydoc FNPDMDRVCONSTRUCT
- */
-static DECLCALLBACK(int) drvHostDSoundConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
-{
-    PDRVHOSTDSOUND pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTDSOUND);
-
-    LogRel(("Audio: Initializing DirectSound audio driver\n"));
-
-    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
-
-    HRESULT hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
-    if (FAILED(hr))
-    {
-        DSLOGREL(("DSound: CoInitializeEx failed with %Rhrc\n", hr));
-        return VERR_NOT_SUPPORTED;
-    }
-
-    /*
-     * Init basic data members and interfaces.
-     */
-    pThis->pDrvIns                   = pDrvIns;
-    /* IBase */
-    pDrvIns->IBase.pfnQueryInterface = drvHostDSoundQueryInterface;
-    /* IHostAudio */
-    PDMAUDIO_IHOSTAUDIO_CALLBACKS(drvHostDSound);
-
-#ifdef VBOX_WITH_AUDIO_CALLBACKS
-    /*
-     * Get the IAudioConnector interface of the above driver/device.
-     */
-    pThis->pUpIAudioConnector = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMIAUDIOCONNECTOR);
-    if (!pThis->pUpIAudioConnector)
-    {
-        AssertMsgFailed(("Configuration error: No audio connector interface above!\n"));
-        return VERR_PDM_MISSING_INTERFACE_ABOVE;
-    }
-#endif
-
-    /*
-     * Init the static parts.
-     */
-    RTListInit(&pThis->lstDevInput);
-    RTListInit(&pThis->lstDevOutput);
-
-    pThis->fEnabledIn  = false;
-    pThis->fEnabledOut = false;
-#ifdef VBOX_WITH_AUDIO_CALLBACKS
-    pThis->fStopped    = false;
-    pThis->fShutdown   = false;
-
-    RT_ZERO(pThis->aEvents);
-    pThis->cEvents = 0;
-#endif
-
-    /*
-     * Initialize configuration values.
-     */
-    dSoundConfigInit(pThis, pCfg);
-
-    return VINF_SUCCESS;
-}
-
-/**
- * PDM driver registration.
- */
-const PDMDRVREG g_DrvHostDSound =
-{
-    /* u32Version */
-    PDM_DRVREG_VERSION,
-    /* szName */
-    "DSoundAudio",
-    /* szRCMod */
-    "",
-    /* szR0Mod */
-    "",
-    /* pszDescription */
-    "DirectSound Audio host driver",
-    /* fFlags */
-    PDM_DRVREG_FLAGS_HOST_BITS_DEFAULT,
-    /* fClass. */
-    PDM_DRVREG_CLASS_AUDIO,
-    /* cMaxInstances */
-    ~0U,
-    /* cbInstance */
-    sizeof(DRVHOSTDSOUND),
-    /* pfnConstruct */
-    drvHostDSoundConstruct,
-    /* pfnDestruct */
-    drvHostDSoundDestruct,
-    /* pfnRelocate */
-    NULL,
-    /* pfnIOCtl */
-    NULL,
-    /* pfnPowerOn */
-    NULL,
-    /* pfnReset */
-    NULL,
-    /* pfnSuspend */
-    NULL,
-    /* pfnResume */
-    NULL,
-    /* pfnAttach */
-    NULL,
-    /* pfnDetach */
-    NULL,
-    /* pfnPowerOff */
-    NULL,
-    /* pfnSoftReset */
-    NULL,
-    /* u32EndVersion */
-    PDM_DRVREG_VERSION
-};
diff --git a/src/VBox/Devices/Audio_old/DrvHostNullAudio.cpp b/src/VBox/Devices/Audio_old/DrvHostNullAudio.cpp
deleted file mode 100644
index e84b41a..0000000
--- a/src/VBox/Devices/Audio_old/DrvHostNullAudio.cpp
+++ /dev/null
@@ -1,336 +0,0 @@
-/* $Id: DrvHostNullAudio.cpp $ */
-/** @file
- * NULL audio driver -- also acts as a fallback if no
- * other backend is available.
- */
-
-/*
- * Copyright (C) 2006-2015 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- * --------------------------------------------------------------------
- *
- * This code is based on: noaudio.c QEMU based code.
- *
- * QEMU Timer based audio emulation
- *
- * Copyright (c) 2004-2005 Vassili Karpov (malc)
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#define LOG_GROUP LOG_GROUP_DRV_HOST_AUDIO
-#include <VBox/log.h>
-#include "DrvAudio.h"
-#include "AudioMixBuffer.h"
-
-#include "VBoxDD.h"
-
-#include <iprt/alloc.h>
-#include <iprt/uuid.h> /* For PDMIBASE_2_PDMDRV. */
-#include <VBox/vmm/pdmaudioifs.h>
-
-typedef struct NULLAUDIOSTREAMOUT
-{
-    /** Note: Always must come first! */
-    PDMAUDIOHSTSTRMOUT streamOut;
-    uint64_t           u64TicksLast;
-    uint64_t           csPlayBuffer;
-    uint8_t           *pu8PlayBuffer;
-} NULLAUDIOSTREAMOUT, *PNULLAUDIOSTREAMOUT;
-
-typedef struct NULLAUDIOSTREAMIN
-{
-    /** Note: Always must come first! */
-    PDMAUDIOHSTSTRMIN  streamIn;
-} NULLAUDIOSTREAMIN, *PNULLAUDIOSTREAMIN;
-
-/**
- * NULL audio driver instance data.
- * @implements PDMIAUDIOCONNECTOR
- */
-typedef struct DRVHOSTNULLAUDIO
-{
-    /** Pointer to the driver instance structure. */
-    PPDMDRVINS    pDrvIns;
-    /** Pointer to host audio interface. */
-    PDMIHOSTAUDIO IHostAudio;
-} DRVHOSTNULLAUDIO, *PDRVHOSTNULLAUDIO;
-
-/*******************************************PDM_AUDIO_DRIVER******************************/
-
-
-static DECLCALLBACK(int) drvHostNullAudioGetConf(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDCFG pCfg)
-{
-    NOREF(pInterface);
-    AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
-
-    pCfg->cbStreamOut = sizeof(NULLAUDIOSTREAMOUT);
-    pCfg->cbStreamIn  = sizeof(NULLAUDIOSTREAMIN);
-
-    pCfg->cMaxHstStrmsOut = 1; /* Output */
-    pCfg->cMaxHstStrmsIn  = 2; /* Line input + microphone input. */
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) drvHostNullAudioInit(PPDMIHOSTAUDIO pInterface)
-{
-    NOREF(pInterface);
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) drvHostNullAudioInitIn(PPDMIHOSTAUDIO pInterface,
-                                                PPDMAUDIOHSTSTRMIN pHstStrmIn, PPDMAUDIOSTREAMCFG pCfg,
-                                                PDMAUDIORECSOURCE enmRecSource,
-                                                uint32_t *pcSamples)
-{
-    NOREF(pInterface);
-    NOREF(enmRecSource);
-
-    /* Just adopt the wanted stream configuration. */
-    int rc = DrvAudioStreamCfgToProps(pCfg, &pHstStrmIn->Props);
-    if (RT_SUCCESS(rc))
-    {
-        if (pcSamples)
-            *pcSamples = _1K;
-    }
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) drvHostNullAudioInitOut(PPDMIHOSTAUDIO pInterface,
-                                                 PPDMAUDIOHSTSTRMOUT pHstStrmOut, PPDMAUDIOSTREAMCFG pCfg,
-                                                 uint32_t *pcSamples)
-{
-    NOREF(pInterface);
-
-    /* Just adopt the wanted stream configuration. */
-    int rc = DrvAudioStreamCfgToProps(pCfg, &pHstStrmOut->Props);
-    if (RT_SUCCESS(rc))
-    {
-        PNULLAUDIOSTREAMOUT pNullStrmOut = (PNULLAUDIOSTREAMOUT)pHstStrmOut;
-        pNullStrmOut->u64TicksLast  = 0;
-        pNullStrmOut->csPlayBuffer  = _1K;
-        pNullStrmOut->pu8PlayBuffer = (uint8_t *)RTMemAlloc(_1K << pHstStrmOut->Props.cShift);
-        if (pNullStrmOut->pu8PlayBuffer)
-        {
-            if (pcSamples)
-                *pcSamples = pNullStrmOut->csPlayBuffer;
-        }
-        else
-        {
-            rc = VERR_NO_MEMORY;
-        }
-    }
-
-    return rc;
-}
-
-static DECLCALLBACK(bool) drvHostNullAudioIsEnabled(PPDMIHOSTAUDIO pInterface, PDMAUDIODIR enmDir)
-{
-    NOREF(pInterface);
-    NOREF(enmDir);
-    return true; /* Always all enabled. */
-}
-
-static DECLCALLBACK(int) drvHostNullAudioPlayOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHstStrmOut,
-                                                 uint32_t *pcSamplesPlayed)
-{
-    PDRVHOSTNULLAUDIO pDrv = RT_FROM_MEMBER(pInterface, DRVHOSTNULLAUDIO, IHostAudio);
-    PNULLAUDIOSTREAMOUT pNullStrmOut = (PNULLAUDIOSTREAMOUT)pHstStrmOut;
-
-    /* Consume as many samples as would be played at the current frequency since last call. */
-    uint32_t csLive          = AudioMixBufAvail(&pHstStrmOut->MixBuf);
-    uint64_t u64TicksNow     = PDMDrvHlpTMGetVirtualTime(pDrv->pDrvIns);
-    uint64_t u64TicksElapsed = u64TicksNow  - pNullStrmOut->u64TicksLast;
-    uint64_t u64TicksFreq    = PDMDrvHlpTMGetVirtualFreq(pDrv->pDrvIns);
-
-    /* Remember when samples were consumed. */
-    pNullStrmOut->u64TicksLast = u64TicksNow;
-
-    /*
-     * Minimize the rounding error by adding 0.5: samples = int((u64TicksElapsed * samplesFreq) / u64TicksFreq + 0.5).
-     * If rounding is not taken into account then the playback rate will be consistently lower that expected.
-     */
-    uint64_t cSamplesPlayed = (2 * u64TicksElapsed * pHstStrmOut->Props.uHz + u64TicksFreq) / u64TicksFreq / 2;
-
-    /* Don't play more than available. */
-    if (cSamplesPlayed > csLive)
-        cSamplesPlayed = csLive;
-
-    cSamplesPlayed = RT_MIN(cSamplesPlayed, pNullStrmOut->csPlayBuffer);
-
-    uint32_t csRead = 0;
-    AudioMixBufReadCirc(&pHstStrmOut->MixBuf, pNullStrmOut->pu8PlayBuffer,
-                        AUDIOMIXBUF_S2B(&pHstStrmOut->MixBuf, cSamplesPlayed), &csRead);
-    AudioMixBufFinish(&pHstStrmOut->MixBuf, csRead);
-
-    if (pcSamplesPlayed)
-        *pcSamplesPlayed = csRead;
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) drvHostNullAudioCaptureIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHstStrmIn,
-                                                   uint32_t *pcSamplesCaptured)
-{
-    /* Never capture anything. */
-    if (pcSamplesCaptured)
-        *pcSamplesCaptured = 0;
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) drvHostNullAudioControlIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHstStrmIn,
-                                                   PDMAUDIOSTREAMCMD enmStreamCmd)
-{
-    NOREF(pInterface);
-    NOREF(pHstStrmIn);
-    NOREF(enmStreamCmd);
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) drvHostNullAudioControlOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHstStrmOut,
-                                                    PDMAUDIOSTREAMCMD enmStreamCmd)
-{
-    NOREF(pInterface);
-    NOREF(pHstStrmOut);
-    NOREF(enmStreamCmd);
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) drvHostNullAudioFiniIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHstStrmIn)
-{
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) drvHostNullAudioFiniOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHstStrmOut)
-{
-    PNULLAUDIOSTREAMOUT pNullStrmOut = (PNULLAUDIOSTREAMOUT)pHstStrmOut;
-    if (   pNullStrmOut
-        && pNullStrmOut->pu8PlayBuffer)
-    {
-        RTMemFree(pNullStrmOut->pu8PlayBuffer);
-    }
-    return VINF_SUCCESS;
-}
-
-/**
- * @interface_method_impl{PDMIBASE,pfnQueryInterface}
- */
-static DECLCALLBACK(void *) drvHostNullAudioQueryInterface(PPDMIBASE pInterface, const char *pszIID)
-{
-    PPDMDRVINS        pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
-    PDRVHOSTNULLAUDIO pThis   = PDMINS_2_DATA(pDrvIns, PDRVHOSTNULLAUDIO);
-
-    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase);
-    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIHOSTAUDIO, &pThis->IHostAudio);
-    return NULL;
-}
-
-static DECLCALLBACK(void) drvHostNullAudioShutdown(PPDMIHOSTAUDIO pInterface)
-{
-    NOREF(pInterface);
-}
-
-/**
- * Constructs a Null audio driver instance.
- *
- * @copydoc FNPDMDRVCONSTRUCT
- */
-static DECLCALLBACK(int) drvHostNullAudioConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
-{
-    AssertPtrReturn(pDrvIns, VERR_INVALID_POINTER);
-    /* pCfg is optional. */
-
-    PDRVHOSTNULLAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTNULLAUDIO);
-    LogRel(("Audio: Initializing NULL driver\n"));
-
-    /*
-     * Init the static parts.
-     */
-    pThis->pDrvIns                   = pDrvIns;
-    /* IBase */
-    pDrvIns->IBase.pfnQueryInterface = drvHostNullAudioQueryInterface;
-    /* IHostAudio */
-    PDMAUDIO_IHOSTAUDIO_CALLBACKS(drvHostNullAudio);
-
-    return VINF_SUCCESS;
-}
-
-/**
- * Char driver registration record.
- */
-const PDMDRVREG g_DrvHostNullAudio =
-{
-    /* u32Version */
-    PDM_DRVREG_VERSION,
-    /* szName */
-    "NullAudio",
-    /* szRCMod */
-    "",
-    /* szR0Mod */
-    "",
-    /* pszDescription */
-    "NULL audio host driver",
-    /* fFlags */
-    PDM_DRVREG_FLAGS_HOST_BITS_DEFAULT,
-    /* fClass. */
-    PDM_DRVREG_CLASS_AUDIO,
-    /* cMaxInstances */
-    ~0U,
-    /* cbInstance */
-    sizeof(DRVHOSTNULLAUDIO),
-    /* pfnConstruct */
-    drvHostNullAudioConstruct,
-    /* pfnDestruct */
-    NULL,
-    /* pfnRelocate */
-    NULL,
-    /* pfnIOCtl */
-    NULL,
-    /* pfnPowerOn */
-    NULL,
-    /* pfnReset */
-    NULL,
-    /* pfnSuspend */
-    NULL,
-    /* pfnResume */
-    NULL,
-    /* pfnAttach */
-    NULL,
-    /* pfnDetach */
-    NULL,
-    /* pfnPowerOff */
-    NULL,
-    /* pfnSoftReset */
-    NULL,
-    /* u32EndVersion */
-    PDM_DRVREG_VERSION
-};
-
diff --git a/src/VBox/Devices/Audio_old/DrvHostOSSAudio.cpp b/src/VBox/Devices/Audio_old/DrvHostOSSAudio.cpp
deleted file mode 100644
index 038b5f1..0000000
--- a/src/VBox/Devices/Audio_old/DrvHostOSSAudio.cpp
+++ /dev/null
@@ -1,1004 +0,0 @@
-/* $Id: DrvHostOSSAudio.cpp $ */
-/** @file
- * OSS (Open Sound System) host audio backend.
- */
-
-/*
- * Copyright (C) 2014-2015 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- * --------------------------------------------------------------------
- */
-#define LOG_GROUP LOG_GROUP_DRV_HOST_AUDIO
-#include <VBox/log.h>
-#include "DrvAudio.h"
-#include "AudioMixBuffer.h"
-
-#include "VBoxDD.h"
-
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/ioctl.h>
-#include <sys/mman.h>
-#include <sys/soundcard.h>
-#include <unistd.h>
-
-#include <iprt/alloc.h>
-#include <iprt/uuid.h> /* For PDMIBASE_2_PDMDRV. */
-#include <VBox/vmm/pdmaudioifs.h>
-
-/**
- * OSS host audio driver instance data.
- * @implements PDMIAUDIOCONNECTOR
- */
-typedef struct DRVHOSTOSSAUDIO
-{
-    /** Pointer to the driver instance structure. */
-    PPDMDRVINS         pDrvIns;
-    /** Pointer to host audio interface. */
-    PDMIHOSTAUDIO      IHostAudio;
-    /** Error count for not flooding the release log.
-     *  UINT32_MAX for unlimited logging. */
-    uint32_t           cLogErrors;
-} DRVHOSTOSSAUDIO, *PDRVHOSTOSSAUDIO;
-
-typedef struct OSSAUDIOSTREAMCFG
-{
-    PDMAUDIOFMT       enmFormat;
-    PDMAUDIOENDIANNESS enmENDIANNESS;
-    uint16_t          uFreq;
-    uint8_t           cChannels;
-    uint16_t          cFragments;
-    uint32_t          cbFragmentSize;
-} OSSAUDIOSTREAMCFG, *POSSAUDIOSTREAMCFG;
-
-typedef struct OSSAUDIOSTREAMIN
-{
-    /** Note: Always must come first! */
-    PDMAUDIOHSTSTRMIN  pStreamIn;
-    int                hFile;
-    int                cFragments;
-    int                cbFragmentSize;
-    /** Own PCM buffer. */
-    void              *pvPCMBuf;
-    /** Size (in bytes) of own PCM buffer. */
-    size_t             cbPCMBuf;
-    int                old_optr;
-} OSSAUDIOSTREAMIN, *POSSAUDIOSTREAMIN;
-
-typedef struct OSSAUDIOSTREAMOUT
-{
-    /** Note: Always must come first! */
-    PDMAUDIOHSTSTRMOUT  pStreamOut;
-    int                 hFile;
-    int                 cFragments;
-    int                 cbFragmentSize;
-#ifndef RT_OS_L4
-    /** Whether we use a memory mapped file instead of our
-     *  own allocated PCM buffer below. */
-    bool                fMemMapped;
-#endif
-    /** Own PCM buffer in case memory mapping is unavailable. */
-    void               *pvPCMBuf;
-    /** Size (in bytes) of own PCM buffer. */
-    size_t              cbPCMBuf;
-    int                 old_optr;
-} OSSAUDIOSTREAMOUT, *POSSAUDIOSTREAMOUT;
-
-typedef struct OSSAUDIOCFG
-{
-#ifndef RT_OS_L4
-    bool try_mmap;
-#endif
-    int nfrags;
-    int fragsize;
-    const char *devpath_out;
-    const char *devpath_in;
-    int debug;
-} OSSAUDIOCFG, *POSSAUDIOCFG;
-
-static OSSAUDIOCFG s_OSSConf =
-{
-#ifndef RT_OS_L4
-    false,
-#endif
-    4,
-    4096,
-    "/dev/dsp",
-    "/dev/dsp",
-    0
-};
-
-
-/* http://www.df.lth.se/~john_e/gems/gem002d.html */
-static uint32_t popcount(uint32_t u)
-{
-    u = ((u&0x55555555) + ((u>>1)&0x55555555));
-    u = ((u&0x33333333) + ((u>>2)&0x33333333));
-    u = ((u&0x0f0f0f0f) + ((u>>4)&0x0f0f0f0f));
-    u = ((u&0x00ff00ff) + ((u>>8)&0x00ff00ff));
-    u = ( u&0x0000ffff) + (u>>16);
-    return u;
-}
-
-static uint32_t lsbindex(uint32_t u)
-{
-    return popcount ((u&-u)-1);
-}
-
-static int drvHostOSSAudioFmtToOSS(PDMAUDIOFMT fmt)
-{
-    switch (fmt)
-    {
-        case AUD_FMT_S8:
-            return AFMT_S8;
-
-        case AUD_FMT_U8:
-            return AFMT_U8;
-
-        case AUD_FMT_S16:
-            return AFMT_S16_LE;
-
-        case AUD_FMT_U16:
-            return AFMT_U16_LE;
-
-        default:
-            break;
-    }
-
-    AssertMsgFailed(("Format %ld not supported\n", fmt));
-    return AFMT_U8;
-}
-
-static int drvHostOSSAudioOSSToFmt(int fmt,
-                                   PDMAUDIOFMT *pFmt, PDMAUDIOENDIANNESS *pENDIANNESS)
-{
-    switch (fmt)
-    {
-        case AFMT_S8:
-            *pFmt = AUD_FMT_S8;
-            if (pENDIANNESS)
-                *pENDIANNESS = PDMAUDIOENDIANNESS_LITTLE;
-            break;
-
-        case AFMT_U8:
-            *pFmt = AUD_FMT_U8;
-            if (pENDIANNESS)
-                *pENDIANNESS = PDMAUDIOENDIANNESS_LITTLE;
-            break;
-
-        case AFMT_S16_LE:
-            *pFmt = AUD_FMT_S16;
-            if (pENDIANNESS)
-                *pENDIANNESS = PDMAUDIOENDIANNESS_LITTLE;
-            break;
-
-        case AFMT_U16_LE:
-            *pFmt = AUD_FMT_U16;
-            if (pENDIANNESS)
-                *pENDIANNESS = PDMAUDIOENDIANNESS_LITTLE;
-            break;
-
-        case AFMT_S16_BE:
-            *pFmt = AUD_FMT_S16;
-            if (pENDIANNESS)
-                *pENDIANNESS = PDMAUDIOENDIANNESS_BIG;
-            break;
-
-        case AFMT_U16_BE:
-            *pFmt = AUD_FMT_U16;
-            if (pENDIANNESS)
-                *pENDIANNESS = PDMAUDIOENDIANNESS_BIG;
-            break;
-
-        default:
-            AssertMsgFailed(("Format %ld not supported\n", fmt));
-            return VERR_NOT_SUPPORTED;
-    }
-
-    return VINF_SUCCESS;
-}
-
-static int drvHostOSSAudioClose(int *phFile)
-{
-    if (!phFile || !*phFile)
-        return VINF_SUCCESS;
-
-    int rc;
-    if (close(*phFile))
-    {
-        LogRel(("OSS: Closing descriptor failed: %s\n",
-                strerror(errno)));
-        rc = VERR_GENERAL_FAILURE; /** @todo */
-    }
-    else
-    {
-        *phFile = -1;
-        rc = VINF_SUCCESS;
-    }
-
-    return rc;
-}
-
-static int drvHostOSSAudioOpen(bool fIn,
-                               POSSAUDIOSTREAMCFG pReq, POSSAUDIOSTREAMCFG pObt,
-                               int *phFile)
-{
-    AssertPtrReturn(pReq, VERR_INVALID_POINTER);
-    AssertPtrReturn(pObt, VERR_INVALID_POINTER);
-    AssertPtrReturn(phFile, VERR_INVALID_POINTER);
-
-    int rc;
-    int hFile;
-
-    do
-    {
-        const char *pszDev = fIn ? s_OSSConf.devpath_in : s_OSSConf.devpath_out;
-        if (!pszDev)
-        {
-            LogRel(("OSS: Invalid or no %s device name set\n",
-                    fIn ? "input" : "output"));
-            rc = VERR_INVALID_PARAMETER;
-            break;
-        }
-
-        hFile = open(pszDev, (fIn ? O_RDONLY : O_WRONLY) | O_NONBLOCK);
-        if (hFile == -1)
-        {
-            LogRel(("OSS: Failed to open %s: %s(%d)\n", pszDev, strerror(errno), errno));
-            rc = RTErrConvertFromErrno(errno);
-            break;
-        }
-
-        int iFormat = drvHostOSSAudioFmtToOSS(pReq->enmFormat);
-        if (ioctl(hFile, SNDCTL_DSP_SAMPLESIZE, &iFormat))
-        {
-            LogRel(("OSS: Failed to set audio format to %ld errno=%s(%d)\n", iFormat, strerror(errno), errno));
-            rc = RTErrConvertFromErrno(errno);
-            break;
-        }
-
-        int cChannels = pReq->cChannels;
-        if (ioctl(hFile, SNDCTL_DSP_CHANNELS, &cChannels))
-        {
-            LogRel(("OSS: Failed to set number of audio channels (%d): %s(%d)\n", pReq->cChannels, strerror(errno), errno));
-            rc = RTErrConvertFromErrno(errno);
-            break;
-        }
-
-        int freq = pReq->uFreq;
-        if (ioctl(hFile, SNDCTL_DSP_SPEED, &freq))
-        {
-            LogRel(("OSS: Failed to set audio frequency (%dHZ): %s(%d)\n", pReq->uFreq, strerror(errno), errno));
-            rc = RTErrConvertFromErrno(errno);
-            break;
-        }
-
-        /* Obsolete on Solaris (using O_NONBLOCK is sufficient). */
-#if !(defined(VBOX) && defined(RT_OS_SOLARIS))
-        if (ioctl(hFile, SNDCTL_DSP_NONBLOCK))
-        {
-            LogRel(("OSS: Failed to set non-blocking mode: %s(%d)\n", strerror(errno), errno));
-            rc = RTErrConvertFromErrno(errno);
-            break;
-        }
-#endif
-        int mmmmssss = (pReq->cFragments << 16) | lsbindex(pReq->cbFragmentSize);
-        if (ioctl(hFile, SNDCTL_DSP_SETFRAGMENT, &mmmmssss))
-        {
-            LogRel(("OSS: Failed to set %RU16 fragments to %RU32 bytes each: %s(%d)\n",
-                    pReq->cFragments, pReq->cbFragmentSize, strerror(errno), errno));
-            rc = RTErrConvertFromErrno(errno);
-            break;
-        }
-
-        audio_buf_info abinfo;
-        if (ioctl(hFile, fIn ? SNDCTL_DSP_GETISPACE : SNDCTL_DSP_GETOSPACE, &abinfo))
-        {
-            LogRel(("OSS: Failed to retrieve buffer length: %s(%d)\n", strerror(errno), errno));
-            rc = RTErrConvertFromErrno(errno);
-            break;
-        }
-
-        rc = drvHostOSSAudioOSSToFmt(iFormat, &pObt->enmFormat, &pObt->enmENDIANNESS);
-        if (RT_SUCCESS(rc))
-        {
-            pObt->cChannels      = cChannels;
-            pObt->uFreq          = freq;
-            pObt->cFragments     = abinfo.fragstotal;
-            pObt->cbFragmentSize = abinfo.fragsize;
-
-            *phFile = hFile;
-        }
-    }
-    while (0);
-
-    if (RT_FAILURE(rc))
-        drvHostOSSAudioClose(&hFile);
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(int) drvHostOSSAudioControlIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHstStrmIn,
-                                                   PDMAUDIOSTREAMCMD enmStreamCmd)
-{
-    NOREF(pInterface);
-    NOREF(pHstStrmIn);
-    NOREF(enmStreamCmd);
-
-    /** @todo Nothing to do here right now!? */
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) drvHostOSSAudioControlOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHstStrmOut,
-                                                   PDMAUDIOSTREAMCMD enmStreamCmd)
-{
-    NOREF(pInterface);
-    AssertPtrReturn(pHstStrmOut, VERR_INVALID_POINTER);
-
-    POSSAUDIOSTREAMOUT pThisStrmOut = (POSSAUDIOSTREAMOUT)pHstStrmOut;
-
-#ifdef RT_OS_L4
-    return VINF_SUCCESS;
-#else
-    if (!pThisStrmOut->fMemMapped)
-        return VINF_SUCCESS;
-#endif
-
-    int rc = VINF_SUCCESS;
-    int mask;
-    switch (enmStreamCmd)
-    {
-        case PDMAUDIOSTREAMCMD_ENABLE:
-        case PDMAUDIOSTREAMCMD_RESUME:
-        {
-            DrvAudioClearBuf(&pHstStrmOut->Props,
-                             pThisStrmOut->pvPCMBuf, pThisStrmOut->cbPCMBuf, AudioMixBufSize(&pHstStrmOut->MixBuf));
-
-            mask = PCM_ENABLE_OUTPUT;
-            if (ioctl(pThisStrmOut->hFile, SNDCTL_DSP_SETTRIGGER, &mask) < 0)
-            {
-                LogRel(("OSS: Failed to enable output stream: %s\n", strerror(errno)));
-                rc = RTErrConvertFromErrno(errno);
-            }
-
-            break;
-        }
-
-        case PDMAUDIOSTREAMCMD_DISABLE:
-        case PDMAUDIOSTREAMCMD_PAUSE:
-        {
-            mask = 0;
-            if (ioctl(pThisStrmOut->hFile, SNDCTL_DSP_SETTRIGGER, &mask) < 0)
-            {
-                LogRel(("OSS: Failed to disable output stream: %s\n", strerror(errno)));
-                rc = RTErrConvertFromErrno(errno);
-            }
-
-            break;
-        }
-
-        default:
-            AssertMsgFailed(("Invalid command %ld\n", enmStreamCmd));
-            rc = VERR_INVALID_PARAMETER;
-            break;
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(int) drvHostOSSAudioInit(PPDMIHOSTAUDIO pInterface)
-{
-    NOREF(pInterface);
-
-    LogFlowFuncEnter();
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) drvHostOSSAudioCaptureIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHstStrmIn,
-                                                  uint32_t *pcSamplesCaptured)
-{
-    NOREF(pInterface);
-    AssertPtrReturn(pHstStrmIn, VERR_INVALID_POINTER);
-
-    POSSAUDIOSTREAMIN pThisStrmIn = (POSSAUDIOSTREAMIN)pHstStrmIn;
-
-    int rc = VINF_SUCCESS;
-    size_t cbToRead = RT_MIN(pThisStrmIn->cbPCMBuf,
-                             AudioMixBufFreeBytes(&pHstStrmIn->MixBuf));
-
-    LogFlowFunc(("cbToRead=%zu\n", cbToRead));
-
-    uint32_t cWrittenTotal = 0;
-    uint32_t cbTemp;
-    ssize_t  cbRead;
-    size_t   offWrite = 0;
-
-    while (cbToRead)
-    {
-        cbTemp = RT_MIN(cbToRead, pThisStrmIn->cbPCMBuf);
-        AssertBreakStmt(cbTemp, rc = VERR_NO_DATA);
-        cbRead = read(pThisStrmIn->hFile, (uint8_t *)pThisStrmIn->pvPCMBuf + offWrite, cbTemp);
-
-        LogFlowFunc(("cbRead=%zi, cbTemp=%RU32, cbToRead=%zu\n",
-                     cbRead, cbTemp, cbToRead));
-
-        if (cbRead < 0)
-        {
-            switch (errno)
-            {
-                case 0:
-                {
-                    LogFunc(("Failed to read %z frames\n", cbRead));
-                    rc = VERR_ACCESS_DENIED;
-                    break;
-                }
-
-                case EINTR:
-                case EAGAIN:
-                    rc = VERR_NO_DATA;
-                    break;
-
-                default:
-                    LogFlowFunc(("Failed to read %zu input frames, rc=%Rrc\n",
-                                 cbTemp, rc));
-                    rc = VERR_GENERAL_FAILURE; /** @todo */
-                    break;
-            }
-
-            if (RT_FAILURE(rc))
-                break;
-        }
-        else if (cbRead)
-        {
-            uint32_t cWritten;
-            rc = AudioMixBufWriteCirc(&pHstStrmIn->MixBuf,
-                                      pThisStrmIn->pvPCMBuf, cbRead,
-                                      &cWritten);
-            if (RT_FAILURE(rc))
-                break;
-
-            uint32_t cbWritten = AUDIOMIXBUF_S2B(&pHstStrmIn->MixBuf, cWritten);
-
-            Assert(cbToRead >= cbWritten);
-            cbToRead      -= cbWritten;
-            offWrite      += cbWritten;
-            cWrittenTotal += cWritten;
-        }
-        else /* No more data, try next round. */
-            break;
-    }
-
-    if (rc == VERR_NO_DATA)
-        rc = VINF_SUCCESS;
-
-    if (RT_SUCCESS(rc))
-    {
-        uint32_t cProcessed = 0;
-        if (cWrittenTotal)
-            rc = AudioMixBufMixToParent(&pHstStrmIn->MixBuf, cWrittenTotal,
-                                        &cProcessed);
-
-        if (pcSamplesCaptured)
-            *pcSamplesCaptured = cWrittenTotal;
-
-        LogFlowFunc(("cWrittenTotal=%RU32 (%RU32 processed), rc=%Rrc\n",
-                     cWrittenTotal, cProcessed, rc));
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(int) drvHostOSSAudioFiniIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHstStrmIn)
-{
-    NOREF(pInterface);
-    AssertPtrReturn(pHstStrmIn, VERR_INVALID_POINTER);
-
-    POSSAUDIOSTREAMIN pThisStrmIn = (POSSAUDIOSTREAMIN)pHstStrmIn;
-
-    LogFlowFuncEnter();
-
-    if (pThisStrmIn->pvPCMBuf)
-    {
-        Assert(pThisStrmIn->cbPCMBuf);
-
-        RTMemFree(pThisStrmIn->pvPCMBuf);
-        pThisStrmIn->pvPCMBuf = NULL;
-    }
-
-    pThisStrmIn->cbPCMBuf = 0;
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) drvHostOSSAudioFiniOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHstStrmOut)
-{
-    NOREF(pInterface);
-    AssertPtrReturn(pHstStrmOut, VERR_INVALID_POINTER);
-
-    POSSAUDIOSTREAMOUT pThisStrmOut = (POSSAUDIOSTREAMOUT)pHstStrmOut;
-
-    LogFlowFuncEnter();
-
-#ifndef RT_OS_L4
-    if (!pThisStrmOut->fMemMapped)
-    {
-        if (pThisStrmOut->pvPCMBuf)
-        {
-            Assert(pThisStrmOut->cbPCMBuf);
-
-            RTMemFree(pThisStrmOut->pvPCMBuf);
-            pThisStrmOut->pvPCMBuf = NULL;
-        }
-
-        pThisStrmOut->cbPCMBuf = 0;
-    }
-#endif
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) drvHostOSSAudioGetConf(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDCFG pCfg)
-{
-    NOREF(pInterface);
-
-    pCfg->cbStreamOut = sizeof(OSSAUDIOSTREAMOUT);
-    pCfg->cbStreamIn = sizeof(OSSAUDIOSTREAMIN);
-    pCfg->cMaxHstStrmsOut = INT_MAX;
-    pCfg->cMaxHstStrmsIn = INT_MAX;
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) drvHostOSSAudioInitIn(PPDMIHOSTAUDIO pInterface,
-                                               PPDMAUDIOHSTSTRMIN pHstStrmIn, PPDMAUDIOSTREAMCFG pCfg,
-                                               PDMAUDIORECSOURCE enmRecSource,
-                                               uint32_t *pcSamples)
-{
-    NOREF(pInterface);
-    AssertPtrReturn(pHstStrmIn, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
-
-    POSSAUDIOSTREAMIN pThisStrmIn = (POSSAUDIOSTREAMIN)pHstStrmIn;
-
-    int rc;
-    int hFile = -1;
-
-    do
-    {
-        uint32_t cSamples;
-
-        OSSAUDIOSTREAMCFG reqStream, obtStream;
-        reqStream.enmFormat      = pCfg->enmFormat;
-        reqStream.uFreq          = pCfg->uHz;
-        reqStream.cChannels      = pCfg->cChannels;
-        reqStream.cFragments     = s_OSSConf.nfrags;
-        reqStream.cbFragmentSize = s_OSSConf.fragsize;
-
-        rc = drvHostOSSAudioOpen(true /* fIn */,
-                                 &reqStream, &obtStream, &hFile);
-        if (RT_SUCCESS(rc))
-        {
-            if (obtStream.cFragments * obtStream.cbFragmentSize & pHstStrmIn->Props.uAlign)
-                LogRel(("OSS: Warning: Misaligned DAC output buffer: Size = %zu, Alignment = %u\n",
-                        obtStream.cFragments * obtStream.cbFragmentSize,
-                        pHstStrmIn->Props.uAlign + 1));
-
-            pThisStrmIn->hFile = hFile;
-
-            PDMAUDIOSTREAMCFG streamCfg;
-            streamCfg.enmFormat     = obtStream.enmFormat;
-            streamCfg.uHz           = obtStream.uFreq;
-            streamCfg.cChannels     = pCfg->cChannels;
-            streamCfg.enmEndianness = obtStream.enmENDIANNESS;
-
-            rc = DrvAudioStreamCfgToProps(&streamCfg, &pHstStrmIn->Props);
-            if (RT_SUCCESS(rc))
-            {
-                cSamples = (obtStream.cFragments * obtStream.cbFragmentSize)
-                           >> pHstStrmIn->Props.cShift;
-                if (!cSamples)
-                    rc = VERR_INVALID_PARAMETER;
-            }
-        }
-
-        if (RT_SUCCESS(rc))
-        {
-            size_t cbSample = (1 << pHstStrmIn->Props.cShift);
-            size_t cbBuf    = cSamples * cbSample;
-            pThisStrmIn->pvPCMBuf = RTMemAlloc(cbBuf);
-            if (!pThisStrmIn->pvPCMBuf)
-            {
-                LogRel(("OSS: Failed allocating ADC buffer with %RU32 samples (%zu bytes per sample)\n", cSamples, cbSample));
-                rc = VERR_NO_MEMORY;
-            }
-
-            pThisStrmIn->cbPCMBuf = cbBuf;
-
-            if (pcSamples)
-                *pcSamples = cSamples;
-        }
-
-    } while (0);
-
-    if (RT_FAILURE(rc))
-        drvHostOSSAudioClose(&hFile);
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(int) drvHostOSSAudioInitOut(PPDMIHOSTAUDIO pInterface,
-                                                PPDMAUDIOHSTSTRMOUT pHstStrmOut, PPDMAUDIOSTREAMCFG pCfg,
-                                                uint32_t *pcSamples)
-{
-    NOREF(pInterface);
-    AssertPtrReturn(pHstStrmOut, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
-
-    POSSAUDIOSTREAMOUT pThisStrmOut = (POSSAUDIOSTREAMOUT)pHstStrmOut;
-
-    int rc;
-    int hFile = -1;
-
-    do
-    {
-        uint32_t cSamples;
-
-        OSSAUDIOSTREAMCFG reqStream, obtStream;
-        reqStream.enmFormat      = pCfg->enmFormat;
-        reqStream.uFreq          = pCfg->uHz;
-        reqStream.cChannels      = pCfg->cChannels;
-        reqStream.cFragments     = s_OSSConf.nfrags;
-        reqStream.cbFragmentSize = s_OSSConf.fragsize;
-
-        rc = drvHostOSSAudioOpen(false /* fIn */,
-                                 &reqStream, &obtStream, &hFile);
-        if (RT_SUCCESS(rc))
-        {
-            if (obtStream.cFragments * obtStream.cbFragmentSize & pHstStrmOut->Props.uAlign)
-                LogRel(("OSS: Warning: Misaligned DAC output buffer: Size = %zu, Alignment = %u\n",
-                        obtStream.cFragments * obtStream.cbFragmentSize,
-                        pHstStrmOut->Props.uAlign + 1));
-
-            pThisStrmOut->hFile = hFile;
-
-            PDMAUDIOSTREAMCFG streamCfg;
-            streamCfg.enmFormat     = obtStream.enmFormat;
-            streamCfg.uHz           = obtStream.uFreq;
-            streamCfg.cChannels     = pCfg->cChannels;
-            streamCfg.enmEndianness = obtStream.enmENDIANNESS;
-
-            rc = DrvAudioStreamCfgToProps(&streamCfg, &pHstStrmOut->Props);
-            if (RT_SUCCESS(rc))
-                cSamples = (obtStream.cFragments * obtStream.cbFragmentSize)
-                           >> pHstStrmOut->Props.cShift;
-        }
-
-        if (RT_SUCCESS(rc))
-        {
-#ifndef RT_OS_L4
-            pThisStrmOut->fMemMapped = false;
-            if (s_OSSConf.try_mmap)
-            {
-                pThisStrmOut->pvPCMBuf = mmap(0, cSamples << pHstStrmOut->Props.cShift,
-                                              PROT_READ | PROT_WRITE, MAP_SHARED, hFile, 0);
-                if (pThisStrmOut->pvPCMBuf == MAP_FAILED)
-                {
-                    LogRel(("OSS: Failed to memory map %zu bytes of DAC output file: %s\n",
-                            cSamples << pHstStrmOut->Props.cShift, strerror(errno)));
-                    rc = RTErrConvertFromErrno(errno);
-                    break;
-                }
-                else
-                {
-                    int mask = 0;
-                    if (ioctl(hFile, SNDCTL_DSP_SETTRIGGER, &mask) < 0)
-                    {
-                        LogRel(("OSS: Failed to retrieve initial trigger mask: %s\n",
-                                strerror(errno)));
-                        rc = RTErrConvertFromErrno(errno);
-                        /* Note: No break here, need to unmap file first! */
-                    }
-                    else
-                    {
-                        mask = PCM_ENABLE_OUTPUT;
-                        if (ioctl (hFile, SNDCTL_DSP_SETTRIGGER, &mask) < 0)
-                        {
-                            LogRel(("OSS: Failed to retrieve PCM_ENABLE_OUTPUT mask: %s\n",
-                                    strerror(errno)));
-                            rc = RTErrConvertFromErrno(errno);
-                            /* Note: No break here, need to unmap file first! */
-                        }
-                        else
-                            pThisStrmOut->fMemMapped = true;
-                    }
-
-                    if (!pThisStrmOut->fMemMapped)
-                    {
-                        int rc2 = munmap(pThisStrmOut->pvPCMBuf,
-                                         cSamples << pHstStrmOut->Props.cShift);
-                        if (rc2)
-                            LogRel(("OSS: Failed to unmap DAC output file: %s\n", strerror(errno)));
-                        break;
-                    }
-                }
-            }
-#endif /* !RT_OS_L4 */
-
-            /* Memory mapping failed above? Try allocating an own buffer. */
-#ifndef RT_OS_L4
-            if (!pThisStrmOut->fMemMapped)
-            {
-#endif
-                size_t cbSample = (1 << pHstStrmOut->Props.cShift);
-                size_t cbPCMBuf = cSamples * cbSample;
-
-                LogFlowFunc(("cSamples=%RU32\n", cSamples));
-
-                pThisStrmOut->pvPCMBuf = RTMemAlloc(cbPCMBuf);
-                if (!pThisStrmOut->pvPCMBuf)
-                {
-                    LogRel(("OSS: Failed allocating DAC buffer with %RU32 samples (%zu bytes per sample)\n", cSamples, cbSample));
-                    rc = VERR_NO_MEMORY;
-                    break;
-                }
-
-                pThisStrmOut->cbPCMBuf = cbPCMBuf;
-#ifndef RT_OS_L4
-            }
-#endif
-            if (pcSamples)
-                *pcSamples = cSamples;
-        }
-
-    } while (0);
-
-    if (RT_FAILURE(rc))
-        drvHostOSSAudioClose(&hFile);
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(bool) drvHostOSSAudioIsEnabled(PPDMIHOSTAUDIO pInterface, PDMAUDIODIR enmDir)
-{
-    NOREF(pInterface);
-    NOREF(enmDir);
-    return true; /* Always all enabled. */
-}
-
-static DECLCALLBACK(int) drvHostOSSAudioPlayOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHstStrmOut,
-                                                uint32_t *pcSamplesPlayed)
-{
-    NOREF(pInterface);
-    AssertPtrReturn(pHstStrmOut, VERR_INVALID_POINTER);
-
-    POSSAUDIOSTREAMOUT pThisStrmOut = (POSSAUDIOSTREAMOUT)pHstStrmOut;
-
-    int rc = VINF_SUCCESS;
-    uint32_t cbReadTotal = 0;
-    count_info cntinfo;
-
-    do
-    {
-        size_t cbBuf = AudioMixBufSizeBytes(&pHstStrmOut->MixBuf);
-
-        uint32_t cLive = AudioMixBufAvail(&pHstStrmOut->MixBuf);
-        uint32_t cToRead;
-
-#ifndef RT_OS_L4
-        if (pThisStrmOut->fMemMapped)
-        {
-            /* Get current playback pointer. */
-            int rc2 = ioctl(pThisStrmOut->hFile, SNDCTL_DSP_GETOPTR, &cntinfo);
-            if (!rc2)
-            {
-                LogRel(("OSS: Failed to retrieve current playback pointer: %s\n",
-                        strerror(errno)));
-                rc = RTErrConvertFromErrno(errno);
-                break;
-            }
-
-            /* Nothing to play? */
-            if (cntinfo.ptr == pThisStrmOut->old_optr)
-                break;
-
-            int cbData;
-            if (cntinfo.ptr > pThisStrmOut->old_optr)
-                cbData = cntinfo.ptr - pThisStrmOut->old_optr;
-            else
-                cbData = cbBuf + cntinfo.ptr - pThisStrmOut->old_optr;
-            Assert(cbData);
-
-            cToRead = RT_MIN((uint32_t)AUDIOMIXBUF_B2S(&pHstStrmOut->MixBuf, cbData),
-                             cLive);
-        }
-        else
-        {
-#endif
-            audio_buf_info abinfo;
-            int rc2 = ioctl(pThisStrmOut->hFile, SNDCTL_DSP_GETOSPACE, &abinfo);
-            if (rc2 < 0)
-            {
-                LogRel(("OSS: Failed to retrieve current playback buffer: %s\n",
-                        strerror(errno)));
-                rc = RTErrConvertFromErrno(errno);
-                break;
-            }
-
-            if ((size_t)abinfo.bytes > cbBuf)
-            {
-                LogFlowFunc(("Warning: Invalid available size, size=%d, bufsize=%d\n",
-                             abinfo.bytes, cbBuf));
-                abinfo.bytes = cbBuf;
-                /* Keep going. */
-            }
-
-            if (abinfo.bytes < 0)
-            {
-                LogFlowFunc(("Warning: Invalid available size, size=%d, bufsize=%d\n",
-                             abinfo.bytes, cbBuf));
-                rc = VERR_INVALID_PARAMETER;
-                break;
-            }
-
-            cToRead = RT_MIN((uint32_t)AUDIOMIXBUF_B2S(&pHstStrmOut->MixBuf, abinfo.bytes),
-                             cLive);
-            if (!cToRead)
-                break;
-#ifndef RT_OS_L4
-        }
-#endif
-        size_t cbToRead = AUDIOMIXBUF_S2B(&pHstStrmOut->MixBuf, cToRead);
-        LogFlowFunc(("cbToRead=%zu\n", cbToRead));
-
-        uint32_t cRead, cbRead;
-        while (cbToRead)
-        {
-            rc = AudioMixBufReadCirc(&pHstStrmOut->MixBuf,
-                                     pThisStrmOut->pvPCMBuf, cbToRead, &cRead);
-            if (RT_FAILURE(rc))
-                break;
-
-            cbRead = AUDIOMIXBUF_S2B(&pHstStrmOut->MixBuf, cRead);
-            ssize_t cbWritten = write(pThisStrmOut->hFile, pThisStrmOut->pvPCMBuf,
-                                      cbRead);
-            if (cbWritten == -1)
-            {
-                LogRel(("OSS: Failed writing output data: %s\n", strerror(errno)));
-                rc = RTErrConvertFromErrno(errno);
-                break;
-            }
-
-            Assert(cbToRead >= cbRead);
-            cbToRead -= cbRead;
-            cbReadTotal += cbRead;
-        }
-
-#ifndef RT_OS_L4
-        /* Update read pointer. */
-        if (pThisStrmOut->fMemMapped)
-            pThisStrmOut->old_optr = cntinfo.ptr;
-#endif
-
-    } while(0);
-
-    if (RT_SUCCESS(rc))
-    {
-        uint32_t cReadTotal = AUDIOMIXBUF_B2S(&pHstStrmOut->MixBuf, cbReadTotal);
-        if (cReadTotal)
-            AudioMixBufFinish(&pHstStrmOut->MixBuf, cReadTotal);
-
-        if (pcSamplesPlayed)
-            *pcSamplesPlayed = cReadTotal;
-
-        LogFlowFunc(("cReadTotal=%RU32 (%RU32 bytes), rc=%Rrc\n",
-                     cReadTotal, cbReadTotal, rc));
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(void) drvHostOSSAudioShutdown(PPDMIHOSTAUDIO pInterface)
-{
-    NOREF(pInterface);
-}
-
-/**
- * @interface_method_impl{PDMIBASE,pfnQueryInterface}
- */
-static DECLCALLBACK(void *) drvHostOSSAudioQueryInterface(PPDMIBASE pInterface, const char *pszIID)
-{
-    PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
-    PDRVHOSTOSSAUDIO  pThis   = PDMINS_2_DATA(pDrvIns, PDRVHOSTOSSAUDIO);
-    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase);
-    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIHOSTAUDIO, &pThis->IHostAudio);
-
-    return NULL;
-}
-
-/**
- * Constructs an OSS audio driver instance.
- *
- * @copydoc FNPDMDRVCONSTRUCT
- */
-static DECLCALLBACK(int) drvHostOSSAudioConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
-{
-    PDRVHOSTOSSAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTOSSAUDIO);
-    LogRel(("Audio: Initializing OSS driver\n"));
-
-    /*
-     * Init the static parts.
-     */
-    pThis->pDrvIns                   = pDrvIns;
-    /* IBase */
-    pDrvIns->IBase.pfnQueryInterface = drvHostOSSAudioQueryInterface;
-    /* IHostAudio */
-    PDMAUDIO_IHOSTAUDIO_CALLBACKS(drvHostOSSAudio);
-
-    return VINF_SUCCESS;
-}
-
-/**
- * Char driver registration record.
- */
-const PDMDRVREG g_DrvHostOSSAudio =
-{
-    /* u32Version */
-    PDM_DRVREG_VERSION,
-    /* szName */
-    "OSSAudio",
-    /* szRCMod */
-    "",
-    /* szR0Mod */
-    "",
-    /* pszDescription */
-    "OSS audio host driver",
-    /* fFlags */
-    PDM_DRVREG_FLAGS_HOST_BITS_DEFAULT,
-    /* fClass. */
-    PDM_DRVREG_CLASS_AUDIO,
-    /* cMaxInstances */
-    ~0U,
-    /* cbInstance */
-    sizeof(DRVHOSTOSSAUDIO),
-    /* pfnConstruct */
-    drvHostOSSAudioConstruct,
-    /* pfnDestruct */
-    NULL,
-    /* pfnRelocate */
-    NULL,
-    /* pfnIOCtl */
-    NULL,
-    /* pfnPowerOn */
-    NULL,
-    /* pfnReset */
-    NULL,
-    /* pfnSuspend */
-    NULL,
-    /* pfnResume */
-    NULL,
-    /* pfnAttach */
-    NULL,
-    /* pfnDetach */
-    NULL,
-    /* pfnPowerOff */
-    NULL,
-    /* pfnSoftReset */
-    NULL,
-    /* u32EndVersion */
-    PDM_DRVREG_VERSION
-};
diff --git a/src/VBox/Devices/Audio_old/DrvHostPulseAudio.cpp b/src/VBox/Devices/Audio_old/DrvHostPulseAudio.cpp
deleted file mode 100644
index 8ee40ad..0000000
--- a/src/VBox/Devices/Audio_old/DrvHostPulseAudio.cpp
+++ /dev/null
@@ -1,1252 +0,0 @@
-/* $Id: DrvHostPulseAudio.cpp $ */
-/** @file
- * VBox audio devices: Pulse Audio audio driver.
- */
-
-/*
- * Copyright (C) 2006-2016 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-
-/*********************************************************************************************************************************
-*   Header Files                                                                                                                 *
-*********************************************************************************************************************************/
-#define LOG_GROUP LOG_GROUP_DRV_HOST_AUDIO
-#include <VBox/log.h>
-
-#include <stdio.h>
-
-#include <iprt/alloc.h>
-#include <iprt/mem.h>
-#include <iprt/uuid.h>
-
-RT_C_DECLS_BEGIN
- #include "pulse_mangling.h"
- #include "pulse_stubs.h"
-RT_C_DECLS_END
-
-#include <pulse/pulseaudio.h>
-
-#include "DrvAudio.h"
-#include "AudioMixBuffer.h"
-
-#include "VBoxDD.h"
-
-#define VBOX_PULSEAUDIO_MAX_LOG_REL_ERRORS 32 /** @todo Make this configurable thru driver options. */
-
-#ifndef PA_STREAM_NOFLAGS
-# define PA_STREAM_NOFLAGS (pa_context_flags_t)0x0000U /* since 0.9.19 */
-#endif
-
-#ifndef PA_CONTEXT_NOFLAGS
-# define PA_CONTEXT_NOFLAGS (pa_context_flags_t)0x0000U /* since 0.9.19 */
-#endif
-
-/*
- * We use a g_pMainLoop in a separate thread g_pContext. We have to call functions for
- * manipulating objects either from callback functions or we have to protect
- * these functions by pa_threaded_mainloop_lock() / pa_threaded_mainloop_unlock().
- */
-static struct pa_threaded_mainloop *g_pMainLoop;
-static struct pa_context           *g_pContext;
-static volatile bool                g_fAbortMainLoop;
-
-/**
- * Host Pulse audio driver instance data.
- * @implements PDMIAUDIOCONNECTOR
- */
-typedef struct DRVHOSTPULSEAUDIO
-{
-    /** Pointer to the driver instance structure. */
-    PPDMDRVINS         pDrvIns;
-    /** Pointer to host audio interface. */
-    PDMIHOSTAUDIO      IHostAudio;
-    /** Error count for not flooding the release log.
-     *  UINT32_MAX for unlimited logging. */
-    uint32_t           cLogErrors;
-    /** Configuration option: stream name. */
-    char               *pszStreamName;
-} DRVHOSTPULSEAUDIO, *PDRVHOSTPULSEAUDIO;
-
-typedef struct PULSEAUDIOSTREAM
-{
-    /** Must come first, as this struct might be
-     *  casted to one of these structs. */
-    union
-    {
-        PDMAUDIOHSTSTRMIN  In;
-        PDMAUDIOHSTSTRMOUT Out;
-    };
-    /** Pointer to driver instance. */
-    PDRVHOSTPULSEAUDIO     pDrv;
-    /** DAC/ADC buffer. */
-    void                  *pvPCMBuf;
-    /** Size (in bytes) of DAC/ADC buffer. */
-    uint32_t               cbPCMBuf;
-    /** Pointer to opaque PulseAudio stream. */
-    pa_stream             *pStream;
-    /** Pulse sample format and attribute specification. */
-    pa_sample_spec         SampleSpec;
-    /** Pulse playback and buffer metrics. */
-    pa_buffer_attr         BufAttr;
-    int                    fOpSuccess;
-    /** Pointer to Pulse sample peeking buffer. */
-    const uint8_t         *pu8PeekBuf;
-    /** Current size (in bytes) of peeking data in
-     *  buffer. */
-    size_t                 cbPeekBuf;
-    /** Our offset (in bytes) in peeking buffer. */
-    size_t                 offPeekBuf;
-    pa_operation          *pDrainOp;
-} PULSEAUDIOSTREAM, *PPULSEAUDIOSTREAM;
-
-/* The desired buffer length in milliseconds. Will be the target total stream
- * latency on newer version of pulse. Apparent latency can be less (or more.)
- */
-typedef struct PULSEAUDIOCFG
-{
-    RTMSINTERVAL buffer_msecs_out;
-    RTMSINTERVAL buffer_msecs_in;
-} PULSEAUDIOCFG, *PPULSEAUDIOCFG;
-
-static PULSEAUDIOCFG s_pulseCfg =
-{
-    100, /* buffer_msecs_out */
-    100  /* buffer_msecs_in */
-};
-
-/** Makes DRVHOSTPULSEAUDIO out of PDMIHOSTAUDIO. */
-#define PDMIHOSTAUDIO_2_DRVHOSTPULSEAUDIO(pInterface) \
-    ( (PDRVHOSTPULSEAUDIO)((uintptr_t)pInterface - RT_OFFSETOF(DRVHOSTPULSEAUDIO, IHostAudio)) )
-
-static int  drvHostPulseAudioError(PDRVHOSTPULSEAUDIO pThis, const char *szMsg);
-static void drvHostPulseAudioCbSuccess(pa_stream *pStream, int fSuccess, void *pvContext);
-
-/**
- * Signal the main loop to abort. Just signalling isn't sufficient as the
- * mainloop might not have been entered yet.
- */
-static void drvHostPulseAudioAbortMainLoop(void)
-{
-    g_fAbortMainLoop = true;
-    pa_threaded_mainloop_signal(g_pMainLoop, 0);
-}
-
-static pa_sample_format_t drvHostPulseAudioFmtToPulse(PDMAUDIOFMT fmt)
-{
-    switch (fmt)
-    {
-        case AUD_FMT_U8:
-            return PA_SAMPLE_U8;
-
-        case AUD_FMT_S16:
-            return PA_SAMPLE_S16LE;
-
-#ifdef PA_SAMPLE_S32LE
-        case AUD_FMT_S32:
-            return PA_SAMPLE_S32LE;
-#endif
-        default:
-            break;
-    }
-
-    AssertMsgFailed(("Format %ld not supported\n", fmt));
-    return PA_SAMPLE_U8;
-}
-
-static int drvHostPulseAudioPulseToFmt(pa_sample_format_t pulsefmt,
-                                       PDMAUDIOFMT *pFmt, PDMAUDIOENDIANNESS *pEndianness)
-{
-    switch (pulsefmt)
-    {
-        case PA_SAMPLE_U8:
-            *pFmt = AUD_FMT_U8;
-            *pEndianness = PDMAUDIOENDIANNESS_LITTLE;
-            break;
-
-        case PA_SAMPLE_S16LE:
-            *pFmt = AUD_FMT_S16;
-            *pEndianness = PDMAUDIOENDIANNESS_LITTLE;
-            break;
-
-        case PA_SAMPLE_S16BE:
-            *pFmt = AUD_FMT_S16;
-            *pEndianness = PDMAUDIOENDIANNESS_BIG;
-            break;
-
-#ifdef PA_SAMPLE_S32LE
-        case PA_SAMPLE_S32LE:
-            *pFmt = AUD_FMT_S32;
-            *pEndianness = PDMAUDIOENDIANNESS_LITTLE;
-            break;
-#endif
-
-#ifdef PA_SAMPLE_S32BE
-        case PA_SAMPLE_S32BE:
-            *pFmt = AUD_FMT_S32;
-            *pEndianness = PDMAUDIOENDIANNESS_BIG;
-            break;
-#endif
-
-        default:
-            AssertMsgFailed(("Format %ld not supported\n", pulsefmt));
-            return VERR_NOT_SUPPORTED;
-    }
-
-    return VINF_SUCCESS;
-}
-
-/**
- * Synchronously wait until an operation completed.
- */
-static int drvHostPulseAudioWaitFor(pa_operation *pOP, RTMSINTERVAL cMsTimeout)
-{
-    AssertPtrReturn(pOP, VERR_INVALID_POINTER);
-
-    int rc = VINF_SUCCESS;
-    if (pOP)
-    {
-        uint64_t u64StartMs = RTTimeMilliTS();
-        while (pa_operation_get_state(pOP) == PA_OPERATION_RUNNING)
-        {
-            if (!g_fAbortMainLoop)
-                pa_threaded_mainloop_wait(g_pMainLoop);
-            g_fAbortMainLoop = false;
-
-            uint64_t u64ElapsedMs = RTTimeMilliTS() - u64StartMs;
-            if (u64ElapsedMs >= cMsTimeout)
-            {
-                rc = VERR_TIMEOUT;
-                break;
-            }
-        }
-
-        pa_operation_unref(pOP);
-    }
-
-    return rc;
-}
-
-/**
- * Context status changed.
- */
-static void drvHostPulseAudioCbCtxState(pa_context *pContext, void *pvUser)
-{
-    AssertPtrReturnVoid(pContext);
-    NOREF(pvUser);
-
-    switch (pa_context_get_state(pContext))
-    {
-        case PA_CONTEXT_READY:
-        case PA_CONTEXT_TERMINATED:
-            drvHostPulseAudioAbortMainLoop();
-            break;
-
-        case PA_CONTEXT_FAILED:
-            LogRel(("PulseAudio: Audio input/output stopped!\n"));
-            drvHostPulseAudioAbortMainLoop();
-            break;
-
-        default:
-            break;
-    }
-}
-
-/**
- * Callback called when our pa_stream_drain operation was completed.
- */
-static void drvHostPulseAudioCbStreamDrain(pa_stream *pStream, int fSuccess, void *pvContext)
-{
-    AssertPtrReturnVoid(pStream);
-
-    PPULSEAUDIOSTREAM pStrm = (PPULSEAUDIOSTREAM)pvContext;
-    AssertPtrReturnVoid(pStrm);
-
-    pStrm->fOpSuccess = fSuccess;
-    if (fSuccess)
-    {
-        pa_operation_unref(pa_stream_cork(pStream, 1,
-                                          drvHostPulseAudioCbSuccess, pvContext));
-    }
-    else
-        drvHostPulseAudioError(pStrm->pDrv, "Failed to drain stream");
-
-    pa_operation_unref(pStrm->pDrainOp);
-    pStrm->pDrainOp = NULL;
-}
-
-/**
- * Stream status changed.
- */
-static void drvHostPulseAudioCbStreamState(pa_stream *pStream, void *pvContext)
-{
-    AssertPtrReturnVoid(pStream);
-    NOREF(pvContext);
-
-    switch (pa_stream_get_state(pStream))
-    {
-        case PA_STREAM_READY:
-        case PA_STREAM_FAILED:
-        case PA_STREAM_TERMINATED:
-            drvHostPulseAudioAbortMainLoop();
-            break;
-
-        default:
-            break;
-    }
-}
-
-static void drvHostPulseAudioCbSuccess(pa_stream *pStream, int fSuccess, void *pvContext)
-{
-    AssertPtrReturnVoid(pStream);
-
-    PPULSEAUDIOSTREAM pStrm = (PPULSEAUDIOSTREAM)pvContext;
-    AssertPtrReturnVoid(pStrm);
-
-    pStrm->fOpSuccess = fSuccess;
-
-    if (fSuccess)
-        drvHostPulseAudioAbortMainLoop();
-    else
-        drvHostPulseAudioError(pStrm->pDrv, "Failed to finish stream operation");
-}
-
-static int drvHostPulseAudioOpen(bool fIn, const char *pszName,
-                                 pa_sample_spec *pSampleSpec, pa_buffer_attr *pBufAttr,
-                                 pa_stream **ppStream)
-{
-    AssertPtrReturn(pszName, VERR_INVALID_POINTER);
-    AssertPtrReturn(pSampleSpec, VERR_INVALID_POINTER);
-    AssertPtrReturn(pBufAttr, VERR_INVALID_POINTER);
-    AssertPtrReturn(ppStream, VERR_INVALID_POINTER);
-
-    if (!pa_sample_spec_valid(pSampleSpec))
-    {
-        LogRel(("PulseAudio: Unsupported sample specification for stream \"%s\"\n",
-                pszName));
-        return VERR_NOT_SUPPORTED;
-    }
-
-    int rc = VINF_SUCCESS;
-
-    pa_stream *pStream = NULL;
-    uint32_t   flags = PA_STREAM_NOFLAGS;
-
-    LogFunc(("Opening \"%s\", rate=%dHz, channels=%d, format=%s\n",
-             pszName, pSampleSpec->rate, pSampleSpec->channels,
-             pa_sample_format_to_string(pSampleSpec->format)));
-
-    pa_threaded_mainloop_lock(g_pMainLoop);
-
-    do
-    {
-        if (!(pStream = pa_stream_new(g_pContext, pszName, pSampleSpec,
-                                      NULL /* pa_channel_map */)))
-        {
-            LogRel(("PulseAudio: Could not create stream \"%s\"\n", pszName));
-            rc = VERR_NO_MEMORY;
-            break;
-        }
-
-        pa_stream_set_state_callback(pStream, drvHostPulseAudioCbStreamState, NULL);
-
-#if PA_API_VERSION >= 12
-        /* XXX */
-        flags |= PA_STREAM_ADJUST_LATENCY;
-#endif
-
-#if 0
-        /* Not applicable as we don't use pa_stream_get_latency() and pa_stream_get_time(). */
-        flags |= PA_STREAM_INTERPOLATE_TIMING | PA_STREAM_AUTO_TIMING_UPDATE;
-#endif
-        /* No input/output right away after the stream was started. */
-        flags |= PA_STREAM_START_CORKED;
-
-        if (fIn)
-        {
-            LogFunc(("Input stream attributes: maxlength=%d fragsize=%d\n",
-                     pBufAttr->maxlength, pBufAttr->fragsize));
-
-            if (pa_stream_connect_record(pStream, /*dev=*/NULL, pBufAttr, (pa_stream_flags_t)flags) < 0)
-            {
-                LogRel(("PulseAudio: Could not connect input stream \"%s\": %s\n",
-                        pszName, pa_strerror(pa_context_errno(g_pContext))));
-                rc = VERR_AUDIO_BACKEND_INIT_FAILED;
-                break;
-            }
-        }
-        else
-        {
-            LogFunc(("Output buffer attributes: maxlength=%d tlength=%d prebuf=%d minreq=%d\n",
-                     pBufAttr->maxlength, pBufAttr->tlength, pBufAttr->prebuf, pBufAttr->minreq));
-
-            if (pa_stream_connect_playback(pStream, /*dev=*/NULL, pBufAttr, (pa_stream_flags_t)flags,
-                                           /*cvolume=*/NULL, /*sync_stream=*/NULL) < 0)
-            {
-                LogRel(("PulseAudio: Could not connect playback stream \"%s\": %s\n",
-                        pszName, pa_strerror(pa_context_errno(g_pContext))));
-                rc = VERR_AUDIO_BACKEND_INIT_FAILED;
-                break;
-            }
-        }
-
-        /* Wait until the stream is ready. */
-        for (;;)
-        {
-            if (!g_fAbortMainLoop)
-                pa_threaded_mainloop_wait(g_pMainLoop);
-            g_fAbortMainLoop = false;
-
-            pa_stream_state_t sstate = pa_stream_get_state(pStream);
-            if (sstate == PA_STREAM_READY)
-                break;
-            else if (   sstate == PA_STREAM_FAILED
-                     || sstate == PA_STREAM_TERMINATED)
-            {
-                LogRel(("PulseAudio: Failed to initialize stream \"%s\" (state %ld)\n",
-                        pszName, sstate));
-                rc = VERR_AUDIO_BACKEND_INIT_FAILED;
-                break;
-            }
-        }
-
-        if (RT_FAILURE(rc))
-            break;
-
-        const pa_buffer_attr *pBufAttrObtained = pa_stream_get_buffer_attr(pStream);
-        AssertPtr(pBufAttrObtained);
-        memcpy(pBufAttr, pBufAttrObtained, sizeof(pa_buffer_attr));
-
-        if (fIn)
-            LogFunc(("Obtained record buffer attributes: maxlength=%RU32, fragsize=%RU32\n",
-                     pBufAttr->maxlength, pBufAttr->fragsize));
-        else
-            LogFunc(("Obtained playback buffer attributes: maxlength=%d, tlength=%d, prebuf=%d, minreq=%d\n",
-                     pBufAttr->maxlength, pBufAttr->tlength, pBufAttr->prebuf, pBufAttr->minreq));
-
-    }
-    while (0);
-
-    if (   RT_FAILURE(rc)
-        && pStream)
-        pa_stream_disconnect(pStream);
-
-    pa_threaded_mainloop_unlock(g_pMainLoop);
-
-    if (RT_FAILURE(rc))
-    {
-        if (pStream)
-            pa_stream_unref(pStream);
-    }
-    else
-        *ppStream = pStream;
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(int) drvHostPulseAudioInit(PPDMIHOSTAUDIO pInterface)
-{
-    NOREF(pInterface);
-
-    LogFlowFuncEnter();
-
-    int rc = audioLoadPulseLib();
-    if (RT_FAILURE(rc))
-    {
-        LogRel(("PulseAudio: Failed to load the PulseAudio shared library! Error %Rrc\n", rc));
-        return rc;
-    }
-
-    bool fLocked = false;
-
-    do
-    {
-        if (!(g_pMainLoop = pa_threaded_mainloop_new()))
-        {
-            LogRel(("PulseAudio: Failed to allocate main loop: %s\n",
-                     pa_strerror(pa_context_errno(g_pContext))));
-            rc = VERR_NO_MEMORY;
-            break;
-        }
-
-        if (!(g_pContext = pa_context_new(pa_threaded_mainloop_get_api(g_pMainLoop), "VirtualBox")))
-        {
-            LogRel(("PulseAudio: Failed to allocate context: %s\n",
-                     pa_strerror(pa_context_errno(g_pContext))));
-            rc = VERR_NO_MEMORY;
-            break;
-        }
-
-        if (pa_threaded_mainloop_start(g_pMainLoop) < 0)
-        {
-            LogRel(("PulseAudio: Failed to start threaded mainloop: %s\n",
-                     pa_strerror(pa_context_errno(g_pContext))));
-            rc = VERR_AUDIO_BACKEND_INIT_FAILED;
-            break;
-        }
-
-        g_fAbortMainLoop = false;
-        pa_context_set_state_callback(g_pContext, drvHostPulseAudioCbCtxState, NULL);
-        pa_threaded_mainloop_lock(g_pMainLoop);
-        fLocked = true;
-
-        if (pa_context_connect(g_pContext, NULL /* pszServer */,
-                               PA_CONTEXT_NOFLAGS, NULL) < 0)
-        {
-            LogRel(("PulseAudio: Failed to connect to server: %s\n",
-                     pa_strerror(pa_context_errno(g_pContext))));
-            rc = VERR_AUDIO_BACKEND_INIT_FAILED;
-            break;
-        }
-
-        /* Wait until the g_pContext is ready */
-        for (;;)
-        {
-            if (!g_fAbortMainLoop)
-                pa_threaded_mainloop_wait(g_pMainLoop);
-            g_fAbortMainLoop = false;
-
-            pa_context_state_t cstate = pa_context_get_state(g_pContext);
-            if (cstate == PA_CONTEXT_READY)
-                break;
-            else if (   cstate == PA_CONTEXT_TERMINATED
-                     || cstate == PA_CONTEXT_FAILED)
-            {
-                LogRel(("PulseAudio: Failed to initialize context (state %d)\n", cstate));
-                rc = VERR_AUDIO_BACKEND_INIT_FAILED;
-                break;
-            }
-        }
-    }
-    while (0);
-
-    if (fLocked)
-        pa_threaded_mainloop_unlock(g_pMainLoop);
-
-    if (RT_FAILURE(rc))
-    {
-        if (g_pMainLoop)
-            pa_threaded_mainloop_stop(g_pMainLoop);
-
-        if (g_pContext)
-        {
-            pa_context_disconnect(g_pContext);
-            pa_context_unref(g_pContext);
-            g_pContext = NULL;
-        }
-
-        if (g_pMainLoop)
-        {
-            pa_threaded_mainloop_free(g_pMainLoop);
-            g_pMainLoop = NULL;
-        }
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(int) drvHostPulseAudioInitOut(PPDMIHOSTAUDIO pInterface,
-                                                  PPDMAUDIOHSTSTRMOUT pHstStrmOut, PPDMAUDIOSTREAMCFG pCfg,
-                                                  uint32_t *pcSamples)
-{
-    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
-    AssertPtrReturn(pHstStrmOut, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
-    /* pcSamples is optional. */
-
-    PDRVHOSTPULSEAUDIO pDrv = PDMIHOSTAUDIO_2_DRVHOSTPULSEAUDIO(pInterface);
-    PPULSEAUDIOSTREAM pThisStrmOut = (PPULSEAUDIOSTREAM)pHstStrmOut;
-
-    LogFlowFuncEnter();
-
-    pThisStrmOut->pDrainOp            = NULL;
-
-    pThisStrmOut->SampleSpec.format   = drvHostPulseAudioFmtToPulse(pCfg->enmFormat);
-    pThisStrmOut->SampleSpec.rate     = pCfg->uHz;
-    pThisStrmOut->SampleSpec.channels = pCfg->cChannels;
-
-    /* Note that setting maxlength to -1 does not work on PulseAudio servers
-     * older than 0.9.10. So use the suggested value of 3/2 of tlength */
-    pThisStrmOut->BufAttr.tlength     =   (pa_bytes_per_second(&pThisStrmOut->SampleSpec)
-                                        * s_pulseCfg.buffer_msecs_out) / 1000;
-    pThisStrmOut->BufAttr.maxlength   = (pThisStrmOut->BufAttr.tlength * 3) / 2;
-    pThisStrmOut->BufAttr.prebuf      = -1; /* Same as tlength */
-    pThisStrmOut->BufAttr.minreq      = -1; /* Pulse should set something sensible for minreq on it's own */
-
-    /* Note that the struct BufAttr is updated to the obtained values after this call! */
-    char achName[64];
-    RTStrPrintf(achName, sizeof(achName), "%.32s (out)", pDrv->pszStreamName);
-    int rc = drvHostPulseAudioOpen(false /* fIn */, achName, &pThisStrmOut->SampleSpec, &pThisStrmOut->BufAttr,
-                                   &pThisStrmOut->pStream);
-    if (RT_FAILURE(rc))
-        return rc;
-
-    PDMAUDIOSTREAMCFG streamCfg;
-    rc = drvHostPulseAudioPulseToFmt(pThisStrmOut->SampleSpec.format,
-                                     &streamCfg.enmFormat, &streamCfg.enmEndianness);
-    if (RT_FAILURE(rc))
-    {
-        LogRel(("PulseAudio: Cannot find audio output format %ld\n", pThisStrmOut->SampleSpec.format));
-        return rc;
-    }
-
-    streamCfg.uHz       = pThisStrmOut->SampleSpec.rate;
-    streamCfg.cChannels = pThisStrmOut->SampleSpec.channels;
-
-    rc = DrvAudioStreamCfgToProps(&streamCfg, &pHstStrmOut->Props);
-    if (RT_SUCCESS(rc))
-    {
-        uint32_t cbBuf  = RT_MIN(pThisStrmOut->BufAttr.tlength * 2,
-                                 pThisStrmOut->BufAttr.maxlength); /** @todo Make this configurable! */
-        if (cbBuf)
-        {
-            pThisStrmOut->pvPCMBuf = RTMemAllocZ(cbBuf);
-            if (pThisStrmOut->pvPCMBuf)
-            {
-                pThisStrmOut->cbPCMBuf = cbBuf;
-
-                uint32_t cSamples = cbBuf >> pHstStrmOut->Props.cShift;
-                if (pcSamples)
-                    *pcSamples = cSamples;
-
-                /* Save pointer to driver instance. */
-                pThisStrmOut->pDrv = pDrv;
-
-                LogFunc(("cbBuf=%RU32, cSamples=%RU32\n", cbBuf, cSamples));
-            }
-            else
-                rc = VERR_NO_MEMORY;
-        }
-        else
-            rc = VERR_INVALID_PARAMETER;
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(bool) drvHostPulseAudioIsEnabled(PPDMIHOSTAUDIO pInterface, PDMAUDIODIR enmDir)
-{
-    NOREF(pInterface);
-    NOREF(enmDir);
-    return true; /* Always all enabled. */
-}
-
-static DECLCALLBACK(int) drvHostPulseAudioInitIn(PPDMIHOSTAUDIO pInterface,
-                                                 PPDMAUDIOHSTSTRMIN pHstStrmIn, PPDMAUDIOSTREAMCFG pCfg,
-                                                 PDMAUDIORECSOURCE enmRecSource,
-                                                 uint32_t *pcSamples)
-{
-    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
-    AssertPtrReturn(pHstStrmIn, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
-    /* pcSamples is optional. */
-
-    PDRVHOSTPULSEAUDIO pDrv = PDMIHOSTAUDIO_2_DRVHOSTPULSEAUDIO(pInterface);
-    PPULSEAUDIOSTREAM pThisStrmIn = (PPULSEAUDIOSTREAM)pHstStrmIn;
-
-    LogFunc(("enmRecSrc=%ld\n", enmRecSource));
-
-    pThisStrmIn->SampleSpec.format   = drvHostPulseAudioFmtToPulse(pCfg->enmFormat);
-    pThisStrmIn->SampleSpec.rate     = pCfg->uHz;
-    pThisStrmIn->SampleSpec.channels = pCfg->cChannels;
-
-    /* XXX check these values */
-    pThisStrmIn->BufAttr.fragsize    = (pa_bytes_per_second(&pThisStrmIn->SampleSpec)
-                                   * s_pulseCfg.buffer_msecs_in) / 1000;
-    pThisStrmIn->BufAttr.maxlength   = (pThisStrmIn->BufAttr.fragsize * 3) / 2;
-    /* Note: Other members of pa_buffer_attr are ignored for record streams. */
-
-    char achName[64];
-    RTStrPrintf(achName, sizeof(achName), "%.32s (in)", pDrv->pszStreamName);
-    int rc = drvHostPulseAudioOpen(true /* fIn */, achName, &pThisStrmIn->SampleSpec, &pThisStrmIn->BufAttr,
-                                   &pThisStrmIn->pStream);
-    if (RT_FAILURE(rc))
-        return rc;
-
-    PDMAUDIOSTREAMCFG streamCfg;
-    rc = drvHostPulseAudioPulseToFmt(pThisStrmIn->SampleSpec.format, &streamCfg.enmFormat,
-                                     &streamCfg.enmEndianness);
-    if (RT_FAILURE(rc))
-    {
-        LogRel(("PulseAudio: Cannot find audio capture format %ld\n", pThisStrmIn->SampleSpec.format));
-        return rc;
-    }
-
-    streamCfg.uHz       = pThisStrmIn->SampleSpec.rate;
-    streamCfg.cChannels = pThisStrmIn->SampleSpec.channels;
-
-    rc = DrvAudioStreamCfgToProps(&streamCfg, &pHstStrmIn->Props);
-    if (RT_SUCCESS(rc))
-    {
-        uint32_t cSamples = RT_MIN(pThisStrmIn->BufAttr.fragsize * 10, pThisStrmIn->BufAttr.maxlength)
-                            >> pHstStrmIn->Props.cShift;
-        LogFunc(("cShift=%RU8, cSamples=%RU32\n", pHstStrmIn->Props.cShift, cSamples));
-
-        if (pcSamples)
-            *pcSamples = cSamples;
-
-        /* Save pointer to driver instance. */
-        pThisStrmIn->pDrv = pDrv;
-
-        pThisStrmIn->pu8PeekBuf = NULL;
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(int) drvHostPulseAudioCaptureIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHstStrmIn,
-                                                    uint32_t *pcSamplesCaptured)
-{
-    NOREF(pInterface);
-    AssertPtrReturn(pHstStrmIn, VERR_INVALID_POINTER);
-    /* pcSamplesPlayed is optional. */
-
-    PPULSEAUDIOSTREAM pThisStrmIn = (PPULSEAUDIOSTREAM)pHstStrmIn;
-
-    /* We should only call pa_stream_readable_size() once and trust the first value. */
-    pa_threaded_mainloop_lock(g_pMainLoop);
-    size_t cbAvail = pa_stream_readable_size(pThisStrmIn->pStream);
-    pa_threaded_mainloop_unlock(g_pMainLoop);
-
-    if (cbAvail == (size_t)-1)
-        return drvHostPulseAudioError(pThisStrmIn->pDrv, "Failed to determine input data size");
-
-    /* If the buffer was not dropped last call, add what remains. */
-    if (pThisStrmIn->pu8PeekBuf)
-    {
-        Assert(pThisStrmIn->cbPeekBuf >= pThisStrmIn->offPeekBuf);
-        cbAvail += (pThisStrmIn->cbPeekBuf - pThisStrmIn->offPeekBuf);
-    }
-
-    if (!cbAvail) /* No data? Bail out. */
-    {
-        if (pcSamplesCaptured)
-            *pcSamplesCaptured = 0;
-        return VINF_SUCCESS;
-    }
-
-    int rc = VINF_SUCCESS;
-    size_t cbToRead = RT_MIN(cbAvail, AudioMixBufFreeBytes(&pHstStrmIn->MixBuf));
-
-    LogFlowFunc(("cbToRead=%zu, cbAvail=%zu, offPeekBuf=%zu, cbPeekBuf=%zu\n",
-                 cbToRead, cbAvail, pThisStrmIn->offPeekBuf, pThisStrmIn->cbPeekBuf));
-
-    size_t offWrite = 0;
-    uint32_t cWrittenTotal = 0;
-
-    while (cbToRead)
-    {
-        /* If there is no data, do another peek. */
-        if (!pThisStrmIn->pu8PeekBuf)
-        {
-            pa_threaded_mainloop_lock(g_pMainLoop);
-            pa_stream_peek(pThisStrmIn->pStream,
-                           (const void**)&pThisStrmIn->pu8PeekBuf, &pThisStrmIn->cbPeekBuf);
-            pa_threaded_mainloop_unlock(g_pMainLoop);
-
-            pThisStrmIn->offPeekBuf = 0;
-
-            /* No data anymore?
-             * Note: If there's a data hole (cbPeekBuf then contains the length of the hole)
-             *       we need to drop the stream lateron. */
-            if (   !pThisStrmIn->pu8PeekBuf
-                && !pThisStrmIn->cbPeekBuf)
-            {
-                break;
-            }
-        }
-
-        Assert(pThisStrmIn->cbPeekBuf >= pThisStrmIn->offPeekBuf);
-        size_t cbToWrite = RT_MIN(pThisStrmIn->cbPeekBuf - pThisStrmIn->offPeekBuf, cbToRead);
-
-        LogFlowFunc(("cbToRead=%zu, cbToWrite=%zu, offPeekBuf=%zu, cbPeekBuf=%zu, pu8PeekBuf=%p\n",
-                     cbToRead, cbToWrite,
-                     pThisStrmIn->offPeekBuf, pThisStrmIn->cbPeekBuf, pThisStrmIn->pu8PeekBuf));
-
-        if (cbToWrite)
-        {
-            uint32_t cWritten;
-            rc = AudioMixBufWriteCirc(&pHstStrmIn->MixBuf,
-                                      pThisStrmIn->pu8PeekBuf + pThisStrmIn->offPeekBuf,
-                                      cbToWrite, &cWritten);
-            if (RT_FAILURE(rc))
-                break;
-
-            uint32_t cbWritten = AUDIOMIXBUF_S2B(&pHstStrmIn->MixBuf, cWritten);
-
-            Assert(cbToRead >= cbWritten);
-            cbToRead -= cbWritten;
-            cWrittenTotal += cWritten;
-            pThisStrmIn->offPeekBuf += cbWritten;
-        }
-
-        if (/* Nothing to write anymore? Drop the buffer. */
-               !cbToWrite
-            /* Was there a hole in the peeking buffer? Drop it. */
-            || !pThisStrmIn->pu8PeekBuf
-            /* If the buffer is done, drop it. */
-            || pThisStrmIn->offPeekBuf == pThisStrmIn->cbPeekBuf)
-        {
-            pa_threaded_mainloop_lock(g_pMainLoop);
-            pa_stream_drop(pThisStrmIn->pStream);
-            pa_threaded_mainloop_unlock(g_pMainLoop);
-
-            pThisStrmIn->pu8PeekBuf = NULL;
-        }
-    }
-
-    if (RT_SUCCESS(rc))
-    {
-        uint32_t cProcessed = 0;
-        if (cWrittenTotal)
-            rc = AudioMixBufMixToParent(&pHstStrmIn->MixBuf, cWrittenTotal,
-                                        &cProcessed);
-
-        if (pcSamplesCaptured)
-            *pcSamplesCaptured = cWrittenTotal;
-
-        LogFlowFunc(("cWrittenTotal=%RU32 (%RU32 processed), rc=%Rrc\n",
-                     cWrittenTotal, cProcessed, rc));
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(int) drvHostPulseAudioPlayOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHstStrmOut,
-                                                  uint32_t *pcSamplesPlayed)
-{
-    NOREF(pInterface);
-    AssertPtrReturn(pHstStrmOut, VERR_INVALID_POINTER);
-    /* pcSamplesPlayed is optional. */
-
-    PPULSEAUDIOSTREAM pThisStrmOut = (PPULSEAUDIOSTREAM)pHstStrmOut;
-
-    int rc = VINF_SUCCESS;
-    uint32_t cbReadTotal = 0;
-
-    uint32_t cLive = AudioMixBufAvail(&pHstStrmOut->MixBuf);
-    if (!cLive)
-    {
-        LogFlowFunc(("%p: No live samples, skipping\n", pHstStrmOut));
-
-        if (pcSamplesPlayed)
-            *pcSamplesPlayed = 0;
-        return VINF_SUCCESS;
-    }
-
-    pa_threaded_mainloop_lock(g_pMainLoop);
-
-    do
-    {
-        size_t cbWriteable = pa_stream_writable_size(pThisStrmOut->pStream);
-        if (cbWriteable == (size_t)-1)
-        {
-            rc = drvHostPulseAudioError(pThisStrmOut->pDrv, "Failed to determine output data size");
-            break;
-        }
-
-        size_t cbLive   = AUDIOMIXBUF_S2B(&pHstStrmOut->MixBuf, cLive);
-        size_t cbToRead = RT_MIN(cbWriteable, cbLive);
-
-        LogFlowFunc(("cbToRead=%zu, cbWriteable=%zu, cbLive=%zu\n",
-                     cbToRead, cbWriteable, cbLive));
-
-        uint32_t cRead, cbRead;
-        while (cbToRead)
-        {
-            rc = AudioMixBufReadCirc(&pHstStrmOut->MixBuf, pThisStrmOut->pvPCMBuf,
-                                     RT_MIN(cbToRead, pThisStrmOut->cbPCMBuf), &cRead);
-            if (   !cRead
-                || RT_FAILURE(rc))
-            {
-                break;
-            }
-
-            cbRead = AUDIOMIXBUF_S2B(&pHstStrmOut->MixBuf, cRead);
-            if (pa_stream_write(pThisStrmOut->pStream, pThisStrmOut->pvPCMBuf, cbRead, NULL /* Cleanup callback */,
-                                0, PA_SEEK_RELATIVE) < 0)
-            {
-                rc = drvHostPulseAudioError(pThisStrmOut->pDrv, "Failed to write to output stream");
-                break;
-            }
-
-            Assert(cbToRead >= cbRead);
-            cbToRead    -= cbRead;
-            cbReadTotal += cbRead;
-
-            LogFlowFunc(("\tcRead=%RU32 (%zu bytes) cbReadTotal=%RU32, cbToRead=%RU32\n",
-                         cRead, AUDIOMIXBUF_S2B(&pHstStrmOut->MixBuf, cRead), cbReadTotal, cbToRead));
-        }
-
-    } while (0);
-
-    pa_threaded_mainloop_unlock(g_pMainLoop);
-
-    if (RT_SUCCESS(rc))
-    {
-        uint32_t cReadTotal = AUDIOMIXBUF_B2S(&pHstStrmOut->MixBuf, cbReadTotal);
-        if (cReadTotal)
-            AudioMixBufFinish(&pHstStrmOut->MixBuf, cReadTotal);
-
-        if (pcSamplesPlayed)
-            *pcSamplesPlayed = cReadTotal;
-
-        LogFlowFunc(("cReadTotal=%RU32 (%RU32 bytes), rc=%Rrc\n", cReadTotal, cbReadTotal, rc));
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-/** @todo Implement va handling. */
-static int drvHostPulseAudioError(PDRVHOSTPULSEAUDIO pThis, const char *szMsg)
-{
-    AssertPtrReturn(pThis, VERR_INVALID_POINTER);
-    AssertPtrReturn(szMsg, VERR_INVALID_POINTER);
-
-    if (pThis->cLogErrors++ < VBOX_PULSEAUDIO_MAX_LOG_REL_ERRORS)
-    {
-        int rc2 = pa_context_errno(g_pContext);
-        LogRel(("PulseAudio: %s: %s\n", szMsg, pa_strerror(rc2)));
-    }
-
-    /** @todo Implement some PulseAudio -> IPRT mapping here. */
-    return VERR_GENERAL_FAILURE;
-}
-
-static DECLCALLBACK(int) drvHostPulseAudioFiniIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHstStrmIn)
-{
-    NOREF(pInterface);
-    AssertPtrReturn(pHstStrmIn, VERR_INVALID_POINTER);
-
-    LogFlowFuncEnter();
-
-    PPULSEAUDIOSTREAM pThisStrmIn = (PPULSEAUDIOSTREAM)pHstStrmIn;
-    if (pThisStrmIn->pStream)
-    {
-        pa_threaded_mainloop_lock(g_pMainLoop);
-        pa_stream_disconnect(pThisStrmIn->pStream);
-        pa_stream_unref(pThisStrmIn->pStream);
-        pa_threaded_mainloop_unlock(g_pMainLoop);
-
-        pThisStrmIn->pStream = NULL;
-    }
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) drvHostPulseAudioFiniOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHstStrmOut)
-{
-    NOREF(pInterface);
-    AssertPtrReturn(pHstStrmOut, VERR_INVALID_POINTER);
-
-    LogFlowFuncEnter();
-
-    PPULSEAUDIOSTREAM pThisStrmOut = (PPULSEAUDIOSTREAM)pHstStrmOut;
-    if (pThisStrmOut->pStream)
-    {
-        pa_threaded_mainloop_lock(g_pMainLoop);
-        pa_stream_disconnect(pThisStrmOut->pStream);
-        pa_stream_unref(pThisStrmOut->pStream);
-        pa_threaded_mainloop_unlock(g_pMainLoop);
-
-        pThisStrmOut->pStream = NULL;
-    }
-
-    if (pThisStrmOut->pvPCMBuf)
-    {
-        RTMemFree(pThisStrmOut->pvPCMBuf);
-        pThisStrmOut->pvPCMBuf = NULL;
-
-        pThisStrmOut->cbPCMBuf = 0;
-    }
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) drvHostPulseAudioControlOut(PPDMIHOSTAUDIO pInterface,
-                                                     PPDMAUDIOHSTSTRMOUT pHstStrmOut, PDMAUDIOSTREAMCMD enmStreamCmd)
-{
-    NOREF(pInterface);
-    AssertPtrReturn(pHstStrmOut, VERR_INVALID_POINTER);
-
-    PPULSEAUDIOSTREAM pThisStrmOut = (PPULSEAUDIOSTREAM)pHstStrmOut;
-    int rc = VINF_SUCCESS;
-
-    LogFlowFunc(("enmStreamCmd=%ld\n", enmStreamCmd));
-
-    switch (enmStreamCmd)
-    {
-        case PDMAUDIOSTREAMCMD_ENABLE:
-        case PDMAUDIOSTREAMCMD_RESUME:
-        {
-            pa_threaded_mainloop_lock(g_pMainLoop);
-
-            if (   pThisStrmOut->pDrainOp
-                && pa_operation_get_state(pThisStrmOut->pDrainOp) != PA_OPERATION_DONE)
-            {
-                pa_operation_cancel(pThisStrmOut->pDrainOp);
-                pa_operation_unref(pThisStrmOut->pDrainOp);
-
-                pThisStrmOut->pDrainOp = NULL;
-            }
-            else
-            {
-                /* This should return immediately. */
-                rc = drvHostPulseAudioWaitFor(pa_stream_cork(pThisStrmOut->pStream, 0,
-                                                             drvHostPulseAudioCbSuccess, pThisStrmOut),
-                                              15 * 1000 /* 15s timeout */);
-            }
-
-            pa_threaded_mainloop_unlock(g_pMainLoop);
-            break;
-        }
-
-        case PDMAUDIOSTREAMCMD_DISABLE:
-        case PDMAUDIOSTREAMCMD_PAUSE:
-        {
-            /* Pause audio output (the Pause bit of the AC97 x_CR register is set).
-             * Note that we must return immediately from here! */
-            pa_threaded_mainloop_lock(g_pMainLoop);
-            if (!pThisStrmOut->pDrainOp)
-            {
-                /* This should return immediately. */
-                rc = drvHostPulseAudioWaitFor(pa_stream_trigger(pThisStrmOut->pStream,
-                                                                drvHostPulseAudioCbSuccess, pThisStrmOut),
-                                              15 * 1000 /* 15s timeout */);
-                if (RT_LIKELY(RT_SUCCESS(rc)))
-                    pThisStrmOut->pDrainOp = pa_stream_drain(pThisStrmOut->pStream,
-                                                             drvHostPulseAudioCbStreamDrain, pThisStrmOut);
-            }
-            pa_threaded_mainloop_unlock(g_pMainLoop);
-            break;
-        }
-
-        default:
-            AssertMsgFailed(("Invalid command %ld\n", enmStreamCmd));
-            rc = VERR_INVALID_PARAMETER;
-            break;
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-static DECLCALLBACK(int) drvHostPulseAudioControlIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHstStrmIn,
-                                                    PDMAUDIOSTREAMCMD enmStreamCmd)
-{
-    NOREF(pInterface);
-    AssertPtrReturn(pHstStrmIn, VERR_INVALID_POINTER);
-
-    PPULSEAUDIOSTREAM pThisStrmIn = (PPULSEAUDIOSTREAM)pHstStrmIn;
-    int rc = VINF_SUCCESS;
-
-    LogFlowFunc(("enmStreamCmd=%ld\n", enmStreamCmd));
-
-    switch (enmStreamCmd)
-    {
-        case PDMAUDIOSTREAMCMD_ENABLE:
-        case PDMAUDIOSTREAMCMD_RESUME:
-        {
-            pa_threaded_mainloop_lock(g_pMainLoop);
-            /* This should return immediately. */
-            rc = drvHostPulseAudioWaitFor(pa_stream_cork(pThisStrmIn->pStream, 0 /* Play / resume */,
-                                                         drvHostPulseAudioCbSuccess, pThisStrmIn),
-                                          15 * 1000 /* 15s timeout */);
-            pa_threaded_mainloop_unlock(g_pMainLoop);
-            break;
-        }
-
-        case PDMAUDIOSTREAMCMD_DISABLE:
-        case PDMAUDIOSTREAMCMD_PAUSE:
-        {
-            pa_threaded_mainloop_lock(g_pMainLoop);
-            if (pThisStrmIn->pu8PeekBuf) /* Do we need to drop the peek buffer?*/
-            {
-                pa_stream_drop(pThisStrmIn->pStream);
-                pThisStrmIn->pu8PeekBuf = NULL;
-            }
-            /* This should return immediately. */
-            rc = drvHostPulseAudioWaitFor(pa_stream_cork(pThisStrmIn->pStream, 1 /* Stop / pause */,
-                                                         drvHostPulseAudioCbSuccess, pThisStrmIn),
-                                          15 * 1000 /* 15s timeout */);
-            pa_threaded_mainloop_unlock(g_pMainLoop);
-            break;
-        }
-
-        default:
-            AssertMsgFailed(("Invalid command %ld\n", enmStreamCmd));
-            rc = VERR_INVALID_PARAMETER;
-            break;
-    }
-
-    return rc;
-}
-
-static DECLCALLBACK(int) drvHostPulseAudioGetConf(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDCFG pCfg)
-{
-    NOREF(pInterface);
-    AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
-
-    pCfg->cbStreamOut     = sizeof(PULSEAUDIOSTREAM);
-    pCfg->cbStreamIn      = sizeof(PULSEAUDIOSTREAM);
-    pCfg->cMaxHstStrmsOut = UINT32_MAX;
-    pCfg->cMaxHstStrmsIn  = UINT32_MAX;
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(void) drvHostPulseAudioShutdown(PPDMIHOSTAUDIO pInterface)
-{
-    NOREF(pInterface);
-
-    LogFlowFuncEnter();
-
-    if (g_pMainLoop)
-        pa_threaded_mainloop_stop(g_pMainLoop);
-
-    if (g_pContext)
-    {
-        pa_context_disconnect(g_pContext);
-        pa_context_unref(g_pContext);
-        g_pContext = NULL;
-    }
-
-    if (g_pMainLoop)
-    {
-        pa_threaded_mainloop_free(g_pMainLoop);
-        g_pMainLoop = NULL;
-    }
-
-    LogFlowFuncLeave();
-}
-
-/**
- * @interface_method_impl{PDMIBASE,pfnQueryInterface}
- */
-static DECLCALLBACK(void *) drvHostPulseAudioQueryInterface(PPDMIBASE pInterface, const char *pszIID)
-{
-    AssertPtrReturn(pInterface, NULL);
-    AssertPtrReturn(pszIID, NULL);
-
-    PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
-    PDRVHOSTPULSEAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTPULSEAUDIO);
-    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase);
-    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIHOSTAUDIO, &pThis->IHostAudio);
-
-    return NULL;
-}
-
-/**
- * Constructs a PulseAudio Audio driver instance.
- *
- * @copydoc FNPDMDRVCONSTRUCT
- */
-static DECLCALLBACK(int) drvHostPulseAudioConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
-{
-    AssertPtrReturn(pDrvIns, VERR_INVALID_POINTER);
-
-    PDRVHOSTPULSEAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTPULSEAUDIO);
-    LogRel(("Audio: Initializing PulseAudio driver\n"));
-
-    CFGMR3QueryStringAlloc(pCfg, "StreamName", &pThis->pszStreamName);
-
-    pThis->pDrvIns                   = pDrvIns;
-    /* IBase */
-    pDrvIns->IBase.pfnQueryInterface = drvHostPulseAudioQueryInterface;
-    /* IHostAudio */
-    PDMAUDIO_IHOSTAUDIO_CALLBACKS(drvHostPulseAudio);
-
-    return VINF_SUCCESS;
-}
-
-/**
- * Destructs a PulseAudio Audio driver instance.
- *
- * @copydoc FNPDMDRVCONSTRUCT
- */
-static DECLCALLBACK(void) drvHostPulseAudioDestruct(PPDMDRVINS pDrvIns)
-{
-    PDRVHOSTPULSEAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTPULSEAUDIO);
-    LogFlowFuncEnter();
-    if (pThis->pszStreamName)
-    {
-        MMR3HeapFree(pThis->pszStreamName);
-        pThis->pszStreamName = NULL;
-    }
-}
-
-/**
- * Char driver registration record.
- */
-const PDMDRVREG g_DrvHostPulseAudio =
-{
-    /* u32Version */
-    PDM_DRVREG_VERSION,
-    /* szName */
-    "PulseAudio",
-    /* szRCMod */
-    "",
-    /* szR0Mod */
-    "",
-    /* pszDescription */
-    "Pulse Audio host driver",
-    /* fFlags */
-     PDM_DRVREG_FLAGS_HOST_BITS_DEFAULT,
-    /* fClass. */
-    PDM_DRVREG_CLASS_AUDIO,
-    /* cMaxInstances */
-    ~0U,
-    /* cbInstance */
-    sizeof(DRVHOSTPULSEAUDIO),
-    /* pfnConstruct */
-    drvHostPulseAudioConstruct,
-    /* pfnDestruct */
-    drvHostPulseAudioDestruct,
-    /* pfnRelocate */
-    NULL,
-    /* pfnIOCtl */
-    NULL,
-    /* pfnPowerOn */
-    NULL,
-    /* pfnReset */
-    NULL,
-    /* pfnSuspend */
-    NULL,
-    /* pfnResume */
-    NULL,
-    /* pfnAttach */
-    NULL,
-    /* pfnDetach */
-    NULL,
-    /* pfnPowerOff */
-    NULL,
-    /* pfnSoftReset */
-    NULL,
-    /* u32EndVersion */
-    PDM_DRVREG_VERSION
-};
-
-static struct audio_option pulse_options[] =
-{
-    {"DAC_MS", AUD_OPT_INT, &s_pulseCfg.buffer_msecs_out,
-     "DAC period size in milliseconds", NULL, 0},
-    {"ADC_MS", AUD_OPT_INT, &s_pulseCfg.buffer_msecs_in,
-     "ADC period size in milliseconds", NULL, 0},
-
-    NULL
-};
-
diff --git a/src/VBox/Devices/Audio_old/alsa_mangling.h b/src/VBox/Devices/Audio_old/alsa_mangling.h
deleted file mode 100644
index fde5840..0000000
--- a/src/VBox/Devices/Audio_old/alsa_mangling.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/** @file
- *
- * Mangle libasound symbols. This is necessary on hosts which don't
- * support the -fvisibility gcc switch.
- */
-
-/*
- * Copyright (C) 2013-2015 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-#ifndef AUDIO_ALSA_MANGLING_H
-#define AUDIO_ALSA_MANGLING_H
-
-#define ALSA_MANGLER(symbol) VBox_##symbol
-
-#define snd_pcm_hw_params_any                   ALSA_MANGLER(snd_pcm_hw_params_any)
-#define snd_pcm_close                           ALSA_MANGLER(snd_pcm_close)
-#define snd_pcm_avail_update                    ALSA_MANGLER(snd_pcm_avail_update)
-#define snd_pcm_hw_params_set_channels_near     ALSA_MANGLER(snd_pcm_hw_params_set_channels_near)
-#define snd_pcm_hw_params_set_period_time_near  ALSA_MANGLER(snd_pcm_hw_params_set_period_time_near)
-#define snd_pcm_prepare                         ALSA_MANGLER(snd_pcm_prepare)
-#define snd_pcm_sw_params_sizeof                ALSA_MANGLER(snd_pcm_sw_params_sizeof)
-#define snd_pcm_hw_params_set_period_size_near  ALSA_MANGLER(snd_pcm_hw_params_set_period_size_near)
-#define snd_pcm_hw_params_get_period_size       ALSA_MANGLER(snd_pcm_hw_params_get_period_size)
-#define snd_pcm_hw_params                       ALSA_MANGLER(snd_pcm_hw_params)
-#define snd_pcm_hw_params_sizeof                ALSA_MANGLER(snd_pcm_hw_params_sizeof)
-#define snd_pcm_state                           ALSA_MANGLER(snd_pcm_state)
-#define snd_pcm_open                            ALSA_MANGLER(snd_pcm_open)
-#define snd_lib_error_set_handler               ALSA_MANGLER(snd_lib_error_set_handler)
-#define snd_pcm_sw_params                       ALSA_MANGLER(snd_pcm_sw_params)
-#define snd_pcm_hw_params_get_period_size_min   ALSA_MANGLER(snd_pcm_hw_params_get_period_size_min)
-#define snd_pcm_writei                          ALSA_MANGLER(snd_pcm_writei)
-#define snd_pcm_readi                           ALSA_MANGLER(snd_pcm_readi)
-#define snd_strerror                            ALSA_MANGLER(snd_strerror)
-#define snd_pcm_drop                            ALSA_MANGLER(snd_pcm_drop)
-#define snd_pcm_resume                          ALSA_MANGLER(snd_pcm_resume)
-#define snd_pcm_hw_params_get_buffer_size       ALSA_MANGLER(snd_pcm_hw_params_get_buffer_size)
-#define snd_pcm_hw_params_set_rate_near         ALSA_MANGLER(snd_pcm_hw_params_set_rate_near)
-#define snd_pcm_hw_params_set_access            ALSA_MANGLER(snd_pcm_hw_params_set_access)
-#define snd_pcm_hw_params_set_buffer_time_near  ALSA_MANGLER(snd_pcm_hw_params_set_buffer_time_near)
-#define snd_pcm_hw_params_set_buffer_size_near  ALSA_MANGLER(snd_pcm_hw_params_set_buffer_size_near)
-#define snd_pcm_hw_params_get_buffer_size_min   ALSA_MANGLER(snd_pcm_hw_params_get_buffer_size_min)
-#define snd_pcm_hw_params_set_format            ALSA_MANGLER(snd_pcm_hw_params_set_format)
-#define snd_pcm_sw_params_current               ALSA_MANGLER(snd_pcm_sw_params_current)
-#define snd_pcm_sw_params_set_start_threshold   ALSA_MANGLER(snd_pcm_sw_params_set_start_threshold)
-
-#endif /* !AUDIO_ALSA_MANGLING_H */
diff --git a/src/VBox/Devices/Audio_old/alsa_stubs.c b/src/VBox/Devices/Audio_old/alsa_stubs.c
deleted file mode 100644
index cda485b..0000000
--- a/src/VBox/Devices/Audio_old/alsa_stubs.c
+++ /dev/null
@@ -1,190 +0,0 @@
-/* $Id: alsa_stubs.c $ */
-/** @file
- * Stubs for libasound.
- */
-
-/*
- * Copyright (C) 2006-2015 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-#define LOG_GROUP LOG_GROUP_DRV_HOST_AUDIO
-#include <iprt/assert.h>
-#include <iprt/ldr.h>
-#include <VBox/log.h>
-#include <VBox/err.h>
-
-#include <alsa/asoundlib.h>
-
-#include "alsa_stubs.h"
-
-#define VBOX_ALSA_LIB "libasound.so.2"
-
-#define PROXY_STUB(function, rettype, signature, shortsig) \
-    static rettype (*pfn_ ## function) signature; \
-    \
-    rettype VBox_##function signature; \
-    rettype VBox_##function signature \
-    { \
-        return pfn_ ## function shortsig; \
-    }
-
-PROXY_STUB(snd_pcm_hw_params_any, int,
-           (snd_pcm_t *pcm, snd_pcm_hw_params_t *params),
-           (pcm, params))
-PROXY_STUB(snd_pcm_close, int, (snd_pcm_t *pcm), (pcm))
-PROXY_STUB(snd_pcm_avail_update, snd_pcm_sframes_t, (snd_pcm_t *pcm),
-           (pcm))
-PROXY_STUB(snd_pcm_hw_params_set_channels_near, int,
-           (snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val),
-           (pcm, params, val))
-PROXY_STUB(snd_pcm_hw_params_set_period_time_near, int,
-           (snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir),
-           (pcm, params, val, dir))
-PROXY_STUB(snd_pcm_prepare, int, (snd_pcm_t *pcm), (pcm))
-PROXY_STUB(snd_pcm_sw_params_sizeof, size_t, (void), ())
-PROXY_STUB(snd_pcm_hw_params_set_period_size_near, int,
-           (snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val, int *dir),
-           (pcm, params, val, dir))
-PROXY_STUB(snd_pcm_hw_params_get_period_size, int,
-           (const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *frames, int *dir),
-           (params, frames, dir))
-PROXY_STUB(snd_pcm_hw_params, int,
-           (snd_pcm_t *pcm, snd_pcm_hw_params_t *params),
-           (pcm, params))
-PROXY_STUB(snd_pcm_hw_params_sizeof, size_t, (void), ())
-PROXY_STUB(snd_pcm_state, snd_pcm_state_t, (snd_pcm_t *pcm), (pcm))
-PROXY_STUB(snd_pcm_open, int,
-           (snd_pcm_t **pcm, const char *name, snd_pcm_stream_t stream, int mode),
-           (pcm, name, stream, mode))
-PROXY_STUB(snd_lib_error_set_handler, int, (snd_lib_error_handler_t handler),
-           (handler))
-PROXY_STUB(snd_pcm_sw_params, int,
-           (snd_pcm_t *pcm, snd_pcm_sw_params_t *params),
-           (pcm, params))
-PROXY_STUB(snd_pcm_hw_params_get_period_size_min, int,
-           (const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *frames, int *dir),
-           (params, frames, dir))
-PROXY_STUB(snd_pcm_writei, snd_pcm_sframes_t,
-           (snd_pcm_t *pcm, const void *buffer, snd_pcm_uframes_t size),
-           (pcm, buffer, size))
-PROXY_STUB(snd_pcm_readi, snd_pcm_sframes_t,
-           (snd_pcm_t *pcm, void *buffer, snd_pcm_uframes_t size),
-           (pcm, buffer, size))
-PROXY_STUB(snd_strerror, const char *, (int errnum), (errnum))
-PROXY_STUB(snd_pcm_drop, int, (snd_pcm_t *pcm), (pcm))
-PROXY_STUB(snd_pcm_resume, int, (snd_pcm_t *pcm), (pcm))
-PROXY_STUB(snd_pcm_hw_params_get_buffer_size, int,
-           (const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val),
-           (params, val))
-PROXY_STUB(snd_pcm_hw_params_set_rate_near, int,
-           (snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir),
-           (pcm, params, val, dir))
-PROXY_STUB(snd_pcm_hw_params_set_access, int,
-           (snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_access_t _access),
-           (pcm, params, _access))
-PROXY_STUB(snd_pcm_hw_params_set_buffer_time_near, int,
-           (snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir),
-           (pcm, params, val, dir))
-PROXY_STUB(snd_pcm_hw_params_set_buffer_size_near, int,
-           (snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val),
-           (pcm, params, val))
-PROXY_STUB(snd_pcm_hw_params_get_buffer_size_min, int,
-           (const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val),
-           (params, val))
-PROXY_STUB(snd_pcm_hw_params_set_format, int,
-           (snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_t val),
-           (pcm, params, val))
-PROXY_STUB(snd_pcm_sw_params_current, int,
-           (snd_pcm_t *pcm, snd_pcm_sw_params_t *params),
-           (pcm, params))
-PROXY_STUB(snd_pcm_sw_params_set_start_threshold, int,
-           (snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_uframes_t val),
-           (pcm, params, val))
-
-typedef struct
-{
-    const char *name;
-    void (**fn)(void);
-} SHARED_FUNC;
-
-#define ELEMENT(function) { #function , (void (**)(void)) & pfn_ ## function }
-static SHARED_FUNC SharedFuncs[] =
-{
-    ELEMENT(snd_pcm_hw_params_any),
-    ELEMENT(snd_pcm_close),
-    ELEMENT(snd_pcm_avail_update),
-    ELEMENT(snd_pcm_hw_params_set_channels_near),
-    ELEMENT(snd_pcm_hw_params_set_period_time_near),
-    ELEMENT(snd_pcm_prepare),
-    ELEMENT(snd_pcm_sw_params_sizeof),
-    ELEMENT(snd_pcm_hw_params_set_period_size_near),
-    ELEMENT(snd_pcm_hw_params_get_period_size),
-    ELEMENT(snd_pcm_hw_params),
-    ELEMENT(snd_pcm_hw_params_sizeof),
-    ELEMENT(snd_pcm_state),
-    ELEMENT(snd_pcm_open),
-    ELEMENT(snd_lib_error_set_handler),
-    ELEMENT(snd_pcm_sw_params),
-    ELEMENT(snd_pcm_hw_params_get_period_size_min),
-    ELEMENT(snd_pcm_writei),
-    ELEMENT(snd_pcm_readi),
-    ELEMENT(snd_strerror),
-    ELEMENT(snd_pcm_drop),
-    ELEMENT(snd_pcm_resume),
-    ELEMENT(snd_pcm_hw_params_get_buffer_size),
-    ELEMENT(snd_pcm_hw_params_set_rate_near),
-    ELEMENT(snd_pcm_hw_params_set_access),
-    ELEMENT(snd_pcm_hw_params_set_buffer_time_near),
-    ELEMENT(snd_pcm_hw_params_set_buffer_size_near),
-    ELEMENT(snd_pcm_hw_params_get_buffer_size_min),
-    ELEMENT(snd_pcm_hw_params_set_format),
-    ELEMENT(snd_pcm_sw_params_current),
-    ELEMENT(snd_pcm_sw_params_set_start_threshold),
-};
-#undef ELEMENT
-
-/**
- * Try to dynamically load the ALSA libraries.  This function is not
- * thread-safe, and should be called before attempting to use any of the
- * ALSA functions.
- *
- * @returns iprt status code
- */
-int audioLoadAlsaLib(void)
-{
-    int rc = VINF_SUCCESS;
-    unsigned i;
-    static enum { NO = 0, YES, FAIL } isLibLoaded = NO;
-    RTLDRMOD hLib;
-
-    LogFlowFunc(("\n"));
-    /* If this is not NO then the function has obviously been called twice,
-       which is likely to be a bug. */
-    if (NO != isLibLoaded)
-    {
-        AssertMsgFailed(("isLibLoaded == %s\n", YES == isLibLoaded ? "YES" : "NO"));
-        return YES == isLibLoaded ? VINF_SUCCESS : VERR_NOT_SUPPORTED;
-    }
-    isLibLoaded = FAIL;
-    rc = RTLdrLoad(VBOX_ALSA_LIB, &hLib);
-    if (RT_FAILURE(rc))
-    {
-        LogRelFunc(("Failed to load library %s\n", VBOX_ALSA_LIB));
-        return rc;
-    }
-    for (i=0; i<RT_ELEMENTS(SharedFuncs); i++)
-    {
-        rc = RTLdrGetSymbol(hLib, SharedFuncs[i].name, (void**)SharedFuncs[i].fn);
-        if (RT_FAILURE(rc))
-            return rc;
-    }
-    isLibLoaded = YES;
-    return rc;
-}
diff --git a/src/VBox/Devices/Audio_old/alsa_stubs.h b/src/VBox/Devices/Audio_old/alsa_stubs.h
deleted file mode 100644
index 889add3..0000000
--- a/src/VBox/Devices/Audio_old/alsa_stubs.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/** @file
- *
- * Stubs for libasound.
- */
-
-/*
- * Copyright (C) 2006-2015 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-#ifndef AUDIO_ALSA_STUBS_H
-# define AUDIO_ALSA_STUBS_H
-extern int audioLoadAlsaLib(void);
-#endif
diff --git a/src/VBox/Devices/Audio_old/pulse_mangling.h b/src/VBox/Devices/Audio_old/pulse_mangling.h
deleted file mode 100644
index 8b02ef3..0000000
--- a/src/VBox/Devices/Audio_old/pulse_mangling.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/** @file
- *
- * Mangle libpulse symbols. This is necessary on hosts which don't
- * support the -fvisibility gcc switch.
- */
-
-/*
- * Copyright (C) 2013-2015 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-#ifndef AUDIO_PULSE_MANGLING_H
-#define AUDIO_PULSE_MANGLING_H
-
-#define PULSE_MANGLER(symbol) VBox_##symbol
-
-#define pa_stream_connect_playback              PULSE_MANGLER(pa_stream_connect_playback)
-#define pa_stream_connect_record                PULSE_MANGLER(pa_stream_connect_record)
-#define pa_stream_disconnect                    PULSE_MANGLER(pa_stream_disconnect)
-#define pa_stream_get_sample_spec               PULSE_MANGLER(pa_stream_get_sample_spec)
-#define pa_stream_set_latency_update_callback   PULSE_MANGLER(pa_stream_set_latency_update_callback)
-#define pa_stream_write                         PULSE_MANGLER(pa_stream_write)
-#define pa_stream_unref                         PULSE_MANGLER(pa_stream_unref)
-#define pa_stream_get_state                     PULSE_MANGLER(pa_stream_get_state)
-#define pa_stream_set_state_callback            PULSE_MANGLER(pa_stream_set_state_callback)
-#define pa_stream_flush                         PULSE_MANGLER(pa_stream_flush)
-#define pa_stream_drain                         PULSE_MANGLER(pa_stream_drain)
-#define pa_stream_trigger                       PULSE_MANGLER(pa_stream_trigger)
-#define pa_stream_new                           PULSE_MANGLER(pa_stream_new)
-#define pa_stream_get_buffer_attr               PULSE_MANGLER(pa_stream_get_buffer_attr)
-#define pa_stream_peek                          PULSE_MANGLER(pa_stream_peek)
-#define pa_stream_cork                          PULSE_MANGLER(pa_stream_cork)
-#define pa_stream_drop                          PULSE_MANGLER(pa_stream_drop)
-#define pa_stream_writable_size                 PULSE_MANGLER(pa_stream_writable_size)
-#define pa_context_connect                      PULSE_MANGLER(pa_context_connect)
-#define pa_context_disconnect                   PULSE_MANGLER(pa_context_disconnect)
-#define pa_context_get_state                    PULSE_MANGLER(pa_context_get_state)
-#define pa_context_unref                        PULSE_MANGLER(pa_context_unref)
-#define pa_context_errno                        PULSE_MANGLER(pa_context_errno)
-#define pa_context_new                          PULSE_MANGLER(pa_context_new)
-#define pa_context_set_state_callback           PULSE_MANGLER(pa_context_set_state_callback)
-#define pa_threaded_mainloop_stop               PULSE_MANGLER(pa_threaded_mainloop_stop)
-#define pa_threaded_mainloop_get_api            PULSE_MANGLER(pa_threaded_mainloop_get_api)
-#define pa_threaded_mainloop_free               PULSE_MANGLER(pa_threaded_mainloop_free)
-#define pa_threaded_mainloop_signal             PULSE_MANGLER(pa_threaded_mainloop_signal)
-#define pa_threaded_mainloop_unlock             PULSE_MANGLER(pa_threaded_mainloop_unlock)
-#define pa_threaded_mainloop_new                PULSE_MANGLER(pa_threaded_mainloop_new)
-#define pa_threaded_mainloop_wait               PULSE_MANGLER(pa_threaded_mainloop_wait)
-#define pa_threaded_mainloop_start              PULSE_MANGLER(pa_threaded_mainloop_start)
-#define pa_threaded_mainloop_lock               PULSE_MANGLER(pa_threaded_mainloop_lock)
-#define pa_bytes_per_second                     PULSE_MANGLER(pa_bytes_per_second)
-#define pa_frame_size                           PULSE_MANGLER(pa_frame_size)
-#define pa_sample_format_to_string              PULSE_MANGLER(pa_sample_format_to_string)
-#define pa_sample_spec_valid                    PULSE_MANGLER(pa_sample_spec_valid)
-#define pa_channel_map_init_auto                PULSE_MANGLER(pa_channel_map_init_auto)
-#define pa_operation_unref                      PULSE_MANGLER(pa_operation_unref)
-#define pa_operation_get_state                  PULSE_MANGLER(pa_operation_get_state)
-#define pa_operation_cancel                     PULSE_MANGLER(pa_operation_cancel)
-#define pa_strerror                             PULSE_MANGLER(pa_strerror)
-#define pa_stream_readable_size                 PULSE_MANGLER(pa_stream_readable_size)
-
-#endif /* !AUDIO_PULSE_MANGLING_H */
diff --git a/src/VBox/Devices/Audio_old/pulse_stubs.c b/src/VBox/Devices/Audio_old/pulse_stubs.c
deleted file mode 100644
index c38c090..0000000
--- a/src/VBox/Devices/Audio_old/pulse_stubs.c
+++ /dev/null
@@ -1,287 +0,0 @@
-/* $Id: pulse_stubs.c $ */
-/** @file
- * Stubs for libpulse.
- */
-
-/*
- * Copyright (C) 2006-2015 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-#define LOG_GROUP LOG_GROUP_DRV_HOST_AUDIO
-#include <iprt/assert.h>
-#include <iprt/ldr.h>
-#include <VBox/log.h>
-#include <VBox/err.h>
-
-#include <pulse/pulseaudio.h>
-
-#include "pulse_stubs.h"
-
-#define VBOX_PULSE_LIB "libpulse.so.0"
-
-#define PROXY_STUB(function, rettype, signature, shortsig) \
-    static rettype (*g_pfn_ ## function) signature; \
-    \
-    rettype VBox_##function signature; \
-    rettype VBox_##function signature \
-    { \
-        return g_pfn_ ## function shortsig; \
-    }
-
-#define PROXY_STUB_VOID(function, signature, shortsig) \
-    static void (*g_pfn_ ## function) signature; \
-    \
-    void VBox_##function signature; \
-    void VBox_##function signature \
-    { \
-        g_pfn_ ## function shortsig; \
-    }
-
-#if PA_PROTOCOL_VERSION >= 16
-PROXY_STUB     (pa_stream_connect_playback, int,
-                (pa_stream *s, const char *dev, const pa_buffer_attr *attr,
-                 pa_stream_flags_t flags, const pa_cvolume *volume, pa_stream *sync_stream),
-                (s, dev, attr, flags, volume, sync_stream))
-#else
-PROXY_STUB     (pa_stream_connect_playback, int,
-                (pa_stream *s, const char *dev, const pa_buffer_attr *attr,
-                 pa_stream_flags_t flags, pa_cvolume *volume, pa_stream *sync_stream),
-                (s, dev, attr, flags, volume, sync_stream))
-#endif
-PROXY_STUB     (pa_stream_connect_record, int,
-                (pa_stream *s, const char *dev, const pa_buffer_attr *attr,
-                pa_stream_flags_t flags),
-                (s, dev, attr, flags))
-PROXY_STUB     (pa_stream_disconnect, int,
-                (pa_stream *s),
-                (s))
-PROXY_STUB     (pa_stream_get_sample_spec, const pa_sample_spec*,
-                (pa_stream *s),
-                (s))
-PROXY_STUB_VOID(pa_stream_set_latency_update_callback,
-                (pa_stream *p, pa_stream_notify_cb_t cb, void *userdata),
-                (p, cb, userdata))
-PROXY_STUB     (pa_stream_write, int,
-                (pa_stream *p, const void *data, size_t bytes, pa_free_cb_t free_cb,
-                 int64_t offset, pa_seek_mode_t seek),
-                (p, data, bytes, free_cb, offset, seek))
-PROXY_STUB_VOID(pa_stream_unref,
-                (pa_stream *s),
-                (s))
-PROXY_STUB     (pa_stream_get_state, pa_stream_state_t,
-                (pa_stream *p),
-                (p))
-PROXY_STUB_VOID(pa_stream_set_state_callback,
-                (pa_stream *s, pa_stream_notify_cb_t cb, void *userdata),
-                (s, cb, userdata))
-PROXY_STUB     (pa_stream_flush, pa_operation*,
-                (pa_stream *s, pa_stream_success_cb_t cb, void *userdata),
-                (s, cb, userdata))
-PROXY_STUB     (pa_stream_drain, pa_operation*,
-                (pa_stream *s, pa_stream_success_cb_t cb, void *userdata),
-                (s, cb, userdata))
-PROXY_STUB     (pa_stream_trigger, pa_operation*,
-                (pa_stream *s, pa_stream_success_cb_t cb, void *userdata),
-                (s, cb, userdata))
-PROXY_STUB     (pa_stream_new, pa_stream*,
-                (pa_context *c, const char *name, const pa_sample_spec *ss,
-                 const pa_channel_map *map),
-                (c, name, ss, map))
-PROXY_STUB     (pa_stream_get_buffer_attr, const pa_buffer_attr*,
-                (pa_stream *s),
-                (s))
-PROXY_STUB     (pa_stream_peek, int,
-                (pa_stream *p, const void **data, size_t *bytes),
-                (p, data, bytes))
-PROXY_STUB     (pa_stream_cork, pa_operation*,
-                (pa_stream *s, int b, pa_stream_success_cb_t cb, void *userdata),
-                (s, b, cb, userdata))
-PROXY_STUB     (pa_stream_drop, int,
-                (pa_stream *p),
-                (p))
-PROXY_STUB     (pa_stream_writable_size, size_t,
-                (pa_stream *p),
-                (p))
-PROXY_STUB     (pa_context_connect, int,
-                (pa_context *c, const char *server, pa_context_flags_t flags,
-                 const pa_spawn_api *api),
-                (c, server, flags, api))
-PROXY_STUB_VOID(pa_context_disconnect,
-                (pa_context *c),
-                (c))
-PROXY_STUB     (pa_context_get_state, pa_context_state_t,
-                (pa_context *c),
-                (c))
-PROXY_STUB_VOID(pa_context_unref,
-                (pa_context *c),
-                (c))
-PROXY_STUB     (pa_context_errno, int,
-                (pa_context *c),
-                (c))
-PROXY_STUB     (pa_context_new, pa_context*,
-                (pa_mainloop_api *mainloop, const char *name),
-                (mainloop, name))
-PROXY_STUB_VOID(pa_context_set_state_callback,
-                (pa_context *c, pa_context_notify_cb_t cb, void *userdata),
-                (c, cb, userdata))
-PROXY_STUB_VOID(pa_threaded_mainloop_stop,
-                (pa_threaded_mainloop *m),
-                (m))
-PROXY_STUB     (pa_threaded_mainloop_get_api, pa_mainloop_api*,
-                (pa_threaded_mainloop *m),
-                (m))
-PROXY_STUB_VOID(pa_threaded_mainloop_free,
-                (pa_threaded_mainloop* m),
-                (m))
-PROXY_STUB_VOID(pa_threaded_mainloop_signal,
-                (pa_threaded_mainloop *m, int wait_for_accept),
-                (m, wait_for_accept))
-PROXY_STUB_VOID(pa_threaded_mainloop_unlock,
-                (pa_threaded_mainloop *m),
-                (m))
-PROXY_STUB     (pa_threaded_mainloop_new, pa_threaded_mainloop *,
-                (void),
-                ())
-PROXY_STUB_VOID(pa_threaded_mainloop_wait,
-                (pa_threaded_mainloop *m),
-                (m))
-PROXY_STUB     (pa_threaded_mainloop_start, int,
-                (pa_threaded_mainloop *m),
-                (m))
-PROXY_STUB_VOID(pa_threaded_mainloop_lock,
-                (pa_threaded_mainloop *m),
-                (m))
-PROXY_STUB     (pa_bytes_per_second, size_t,
-                (const pa_sample_spec *spec),
-                (spec))
-PROXY_STUB     (pa_frame_size, size_t,
-                (const pa_sample_spec *spec),
-                (spec))
-PROXY_STUB     (pa_sample_format_to_string, const char*,
-                (pa_sample_format_t f),
-                (f))
-PROXY_STUB     (pa_sample_spec_valid, int,
-                (const pa_sample_spec *spec),
-                (spec))
-PROXY_STUB     (pa_channel_map_init_auto, pa_channel_map*,
-                (pa_channel_map *m, unsigned channels, pa_channel_map_def_t def),
-                (m, channels, def))
-PROXY_STUB_VOID(pa_operation_unref,
-                (pa_operation *o),
-                (o))
-PROXY_STUB     (pa_operation_get_state, pa_operation_state_t,
-                (pa_operation *o),
-                (o))
-PROXY_STUB_VOID(pa_operation_cancel,
-                (pa_operation *o),
-                (o))
-PROXY_STUB     (pa_strerror, const char*,
-                (int error),
-                (error))
-PROXY_STUB     (pa_stream_readable_size, size_t,
-                (pa_stream *p),
-                (p))
-
-
-typedef struct
-{
-    const char *name;
-    void (**fn)(void);
-} SHARED_FUNC;
-
-#define ELEMENT(function) { #function , (void (**)(void)) & g_pfn_ ## function }
-static SHARED_FUNC SharedFuncs[] =
-{
-    ELEMENT(pa_stream_connect_playback),
-    ELEMENT(pa_stream_connect_record),
-    ELEMENT(pa_stream_disconnect),
-    ELEMENT(pa_stream_get_sample_spec),
-    ELEMENT(pa_stream_set_latency_update_callback),
-    ELEMENT(pa_stream_write),
-    ELEMENT(pa_stream_unref),
-    ELEMENT(pa_stream_get_state),
-    ELEMENT(pa_stream_set_state_callback),
-    ELEMENT(pa_stream_flush),
-    ELEMENT(pa_stream_drain),
-    ELEMENT(pa_stream_trigger),
-    ELEMENT(pa_stream_new),
-    ELEMENT(pa_stream_get_buffer_attr),
-    ELEMENT(pa_stream_peek),
-    ELEMENT(pa_stream_cork),
-    ELEMENT(pa_stream_drop),
-    ELEMENT(pa_stream_writable_size),
-    ELEMENT(pa_context_connect),
-    ELEMENT(pa_context_disconnect),
-    ELEMENT(pa_context_get_state),
-    ELEMENT(pa_context_unref),
-    ELEMENT(pa_context_errno),
-    ELEMENT(pa_context_new),
-    ELEMENT(pa_context_set_state_callback),
-    ELEMENT(pa_threaded_mainloop_stop),
-    ELEMENT(pa_threaded_mainloop_get_api),
-    ELEMENT(pa_threaded_mainloop_free),
-    ELEMENT(pa_threaded_mainloop_signal),
-    ELEMENT(pa_threaded_mainloop_unlock),
-    ELEMENT(pa_threaded_mainloop_new),
-    ELEMENT(pa_threaded_mainloop_wait),
-    ELEMENT(pa_threaded_mainloop_start),
-    ELEMENT(pa_threaded_mainloop_lock),
-    ELEMENT(pa_bytes_per_second),
-    ELEMENT(pa_frame_size),
-    ELEMENT(pa_sample_format_to_string),
-    ELEMENT(pa_sample_spec_valid),
-    ELEMENT(pa_channel_map_init_auto),
-    ELEMENT(pa_operation_unref),
-    ELEMENT(pa_operation_get_state),
-    ELEMENT(pa_operation_cancel),
-    ELEMENT(pa_strerror),
-    ELEMENT(pa_stream_readable_size)
-};
-#undef ELEMENT
-
-/**
- * Try to dynamically load the PulseAudio libraries.  This function is not
- * thread-safe, and should be called before attempting to use any of the
- * PulseAudio functions.
- *
- * @returns iprt status code
- */
-int audioLoadPulseLib(void)
-{
-    int rc = VINF_SUCCESS;
-    unsigned i;
-    static enum { NO = 0, YES, FAIL } isLibLoaded = NO;
-    RTLDRMOD hLib;
-
-    LogFlowFunc(("\n"));
-    /* If this is not NO then the function has obviously been called twice,
-       which is likely to be a bug. */
-    if (NO != isLibLoaded)
-    {
-        AssertMsgFailed(("isLibLoaded == %s\n", YES == isLibLoaded ? "YES" : "NO"));
-        return YES == isLibLoaded ? VINF_SUCCESS : VERR_NOT_SUPPORTED;
-    }
-    isLibLoaded = FAIL;
-    rc = RTLdrLoad(VBOX_PULSE_LIB, &hLib);
-    if (RT_FAILURE(rc))
-    {
-        LogRelFunc(("Failed to load library %s\n", VBOX_PULSE_LIB));
-        return rc;
-    }
-    for (i=0; i<RT_ELEMENTS(SharedFuncs); i++)
-    {
-        rc = RTLdrGetSymbol(hLib, SharedFuncs[i].name, (void**)SharedFuncs[i].fn);
-        if (RT_FAILURE(rc))
-            return rc;
-    }
-    isLibLoaded = YES;
-    return rc;
-}
-
diff --git a/src/VBox/Devices/Audio_old/pulse_stubs.h b/src/VBox/Devices/Audio_old/pulse_stubs.h
deleted file mode 100644
index af393d3..0000000
--- a/src/VBox/Devices/Audio_old/pulse_stubs.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/** @file
- *
- * Stubs for libpulse.
- */
-
-/*
- * Copyright (C) 2006-2015 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-#ifndef AUDIO_PULSE_STUBS_H
-#define AUDIO_PULSE_STUBS_H
-extern int audioLoadPulseLib(void);
-#endif
diff --git a/src/VBox/Devices/Audio_old/sys-queue.h b/src/VBox/Devices/Audio_old/sys-queue.h
deleted file mode 100644
index 5b6e2a0..0000000
--- a/src/VBox/Devices/Audio_old/sys-queue.h
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- * Copyright (c) 1991, 1993
- *	The Regents of the University of California.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *	@(#)queue.h	8.3 (Berkeley) 12/13/93
- */
-
-#ifndef	_SYS_QUEUE_H
-#define	_SYS_QUEUE_H 1
-
-/*
- * This file defines three types of data structures: lists, tail queues,
- * and circular queues.
- *
- * A list is headed by a single forward pointer (or an array of forward
- * pointers for a hash table header). The elements are doubly linked
- * so that an arbitrary element can be removed without a need to
- * traverse the list. New elements can be added to the list after
- * an existing element or at the head of the list. A list may only be
- * traversed in the forward direction.
- *
- * A tail queue is headed by a pair of pointers, one to the head of the
- * list and the other to the tail of the list. The elements are doubly
- * linked so that an arbitrary element can be removed without a need to
- * traverse the list. New elements can be added to the list after
- * an existing element, at the head of the list, or at the end of the
- * list. A tail queue may only be traversed in the forward direction.
- *
- * A circle queue is headed by a pair of pointers, one to the head of the
- * list and the other to the tail of the list. The elements are doubly
- * linked so that an arbitrary element can be removed without a need to
- * traverse the list. New elements can be added to the list before or after
- * an existing element, at the head of the list, or at the end of the list.
- * A circle queue may be traversed in either direction, but has a more
- * complex end of list detection.
- *
- * For details on the use of these macros, see the queue(3) manual page.
- */
-
-/*
- * List definitions.
- */
-#define LIST_HEAD(name, type)						\
-struct name {								\
-	struct type *lh_first;	/* first element */			\
-}
-
-#define LIST_ENTRY(type)						\
-struct {								\
-	struct type *le_next;	/* next element */			\
-	struct type **le_prev;	/* address of previous next element */	\
-}
-
-/*
- * List functions.
- */
-#define	LIST_INIT(head) {						\
-	(head)->lh_first = NULL;					\
-}
-
-#define LIST_INSERT_AFTER(listelm, elm, field) {			\
-	if (((elm)->field.le_next = (listelm)->field.le_next) != NULL)	\
-		(listelm)->field.le_next->field.le_prev =		\
-		    &(elm)->field.le_next;				\
-	(listelm)->field.le_next = (elm);				\
-	(elm)->field.le_prev = &(listelm)->field.le_next;		\
-}
-
-#define LIST_INSERT_HEAD(head, elm, field) {				\
-	if (((elm)->field.le_next = (head)->lh_first) != NULL)		\
-		(head)->lh_first->field.le_prev = &(elm)->field.le_next;\
-	(head)->lh_first = (elm);					\
-	(elm)->field.le_prev = &(head)->lh_first;			\
-}
-
-#define LIST_REMOVE(elm, field) {					\
-	if ((elm)->field.le_next != NULL)				\
-		(elm)->field.le_next->field.le_prev = 			\
-		    (elm)->field.le_prev;				\
-	*(elm)->field.le_prev = (elm)->field.le_next;			\
-}
-
-/*
- * Tail queue definitions.
- */
-#define TAILQ_HEAD(name, type)						\
-struct name {								\
-	struct type *tqh_first;	/* first element */			\
-	struct type **tqh_last;	/* addr of last next element */		\
-}
-
-#define TAILQ_ENTRY(type)						\
-struct {								\
-	struct type *tqe_next;	/* next element */			\
-	struct type **tqe_prev;	/* address of previous next element */	\
-}
-
-/*
- * Tail queue functions.
- */
-#define	TAILQ_INIT(head) {						\
-	(head)->tqh_first = NULL;					\
-	(head)->tqh_last = &(head)->tqh_first;				\
-}
-
-#define TAILQ_INSERT_HEAD(head, elm, field) {				\
-	if (((elm)->field.tqe_next = (head)->tqh_first) != NULL)	\
-		(elm)->field.tqe_next->field.tqe_prev =			\
-		    &(elm)->field.tqe_next;				\
-	else								\
-		(head)->tqh_last = &(elm)->field.tqe_next;		\
-	(head)->tqh_first = (elm);					\
-	(elm)->field.tqe_prev = &(head)->tqh_first;			\
-}
-
-#define TAILQ_INSERT_TAIL(head, elm, field) {				\
-	(elm)->field.tqe_next = NULL;					\
-	(elm)->field.tqe_prev = (head)->tqh_last;			\
-	*(head)->tqh_last = (elm);					\
-	(head)->tqh_last = &(elm)->field.tqe_next;			\
-}
-
-#define TAILQ_INSERT_AFTER(head, listelm, elm, field) {			\
-	if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
-		(elm)->field.tqe_next->field.tqe_prev = 		\
-		    &(elm)->field.tqe_next;				\
-	else								\
-		(head)->tqh_last = &(elm)->field.tqe_next;		\
-	(listelm)->field.tqe_next = (elm);				\
-	(elm)->field.tqe_prev = &(listelm)->field.tqe_next;		\
-}
-
-#define TAILQ_REMOVE(head, elm, field) {				\
-	if (((elm)->field.tqe_next) != NULL)				\
-		(elm)->field.tqe_next->field.tqe_prev = 		\
-		    (elm)->field.tqe_prev;				\
-	else								\
-		(head)->tqh_last = (elm)->field.tqe_prev;		\
-	*(elm)->field.tqe_prev = (elm)->field.tqe_next;			\
-}
-
-/*
- * Circular queue definitions.
- */
-#define CIRCLEQ_HEAD(name, type)					\
-struct name {								\
-	struct type *cqh_first;		/* first element */		\
-	struct type *cqh_last;		/* last element */		\
-}
-
-#define CIRCLEQ_ENTRY(type)						\
-struct {								\
-	struct type *cqe_next;		/* next element */		\
-	struct type *cqe_prev;		/* previous element */		\
-}
-
-/*
- * Circular queue functions.
- */
-#define	CIRCLEQ_INIT(head) {						\
-	(head)->cqh_first = (void *)(head);				\
-	(head)->cqh_last = (void *)(head);				\
-}
-
-#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) {		\
-	(elm)->field.cqe_next = (listelm)->field.cqe_next;		\
-	(elm)->field.cqe_prev = (listelm);				\
-	if ((listelm)->field.cqe_next == (void *)(head))		\
-		(head)->cqh_last = (elm);				\
-	else								\
-		(listelm)->field.cqe_next->field.cqe_prev = (elm);	\
-	(listelm)->field.cqe_next = (elm);				\
-}
-
-#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) {		\
-	(elm)->field.cqe_next = (listelm);				\
-	(elm)->field.cqe_prev = (listelm)->field.cqe_prev;		\
-	if ((listelm)->field.cqe_prev == (void *)(head))		\
-		(head)->cqh_first = (elm);				\
-	else								\
-		(listelm)->field.cqe_prev->field.cqe_next = (elm);	\
-	(listelm)->field.cqe_prev = (elm);				\
-}
-
-#define CIRCLEQ_INSERT_HEAD(head, elm, field) {				\
-	(elm)->field.cqe_next = (head)->cqh_first;			\
-	(elm)->field.cqe_prev = (void *)(head);				\
-	if ((head)->cqh_last == (void *)(head))				\
-		(head)->cqh_last = (elm);				\
-	else								\
-		(head)->cqh_first->field.cqe_prev = (elm);		\
-	(head)->cqh_first = (elm);					\
-}
-
-#define CIRCLEQ_INSERT_TAIL(head, elm, field) {				\
-	(elm)->field.cqe_next = (void *)(head);				\
-	(elm)->field.cqe_prev = (head)->cqh_last;			\
-	if ((head)->cqh_first == (void *)(head))			\
-		(head)->cqh_first = (elm);				\
-	else								\
-		(head)->cqh_last->field.cqe_next = (elm);		\
-	(head)->cqh_last = (elm);					\
-}
-
-#define	CIRCLEQ_REMOVE(head, elm, field) {				\
-	if ((elm)->field.cqe_next == (void *)(head))			\
-		(head)->cqh_last = (elm)->field.cqe_prev;		\
-	else								\
-		(elm)->field.cqe_next->field.cqe_prev =			\
-		    (elm)->field.cqe_prev;				\
-	if ((elm)->field.cqe_prev == (void *)(head))			\
-		(head)->cqh_first = (elm)->field.cqe_next;		\
-	else								\
-		(elm)->field.cqe_prev->field.cqe_next =			\
-		    (elm)->field.cqe_next;				\
-}
-#endif	/* sys/queue.h */
diff --git a/src/VBox/Devices/Audio_old/testcase/Makefile.kmk b/src/VBox/Devices/Audio_old/testcase/Makefile.kmk
deleted file mode 100644
index 5f4a4cd..0000000
--- a/src/VBox/Devices/Audio_old/testcase/Makefile.kmk
+++ /dev/null
@@ -1,41 +0,0 @@
-# $Id: Makefile.kmk $
-## @file
-# Sub-Makefile for the audio testcases.
-#
-
-#
-# Copyright (C) 2014-2015 Oracle Corporation
-#
-# This file is part of VirtualBox Open Source Edition (OSE), as
-# available from http://www.virtualbox.org. This file is free software;
-# you can redistribute it and/or modify it under the terms of the GNU
-# General Public License (GPL) as published by the Free Software
-# Foundation, in version 2 as it comes in the "COPYING" file of the
-# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
-# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-#
-
-SUB_DEPTH = ../../../../..
-include $(KBUILD_PATH)/subheader.kmk
-
-if defined(VBOX_WITH_TESTCASES) && !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_SDK)
-
- PROGRAMS += tstAudioMixBuffer
- TESTING  += $(tstAudioMixBuffer_0_OUTDIR)/tstAudioMixBuffer.run
-
- tstAudioMixBuffer_TEMPLATE = VBOXR3TSTEXE
- tstAudioMixBuffer_DEFS    += TESTCASE
- tstAudioMixBuffer_SOURCES  = \
-	tstAudioMixBuffer.cpp \
-	../AudioMixBuffer.cpp \
-	../DrvAudioCommon.cpp
- tstAudioMixBuffer_LIBS     = $(LIB_RUNTIME)
-
- $$(tstAudioMixBuffer_0_OUTDIR)/tstAudioMixBuffer.run: $$(tstAudioMixBuffer_1_STAGE_TARGET)
-	export VBOX_LOG_DEST=nofile; $(tstAudioMixBuffer_1_STAGE_TARGET) quiet
-	$(QUIET)$(APPEND) -t "$@" "done"
-
-endif
-
-include $(FILE_KBUILD_SUB_FOOTER)
-
diff --git a/src/VBox/Devices/Audio_old/testcase/tstAudioMixBuffer.cpp b/src/VBox/Devices/Audio_old/testcase/tstAudioMixBuffer.cpp
deleted file mode 100644
index e877c1f..0000000
--- a/src/VBox/Devices/Audio_old/testcase/tstAudioMixBuffer.cpp
+++ /dev/null
@@ -1,592 +0,0 @@
-/* $Id: tstAudioMixBuffer.cpp $ */
-/** @file
- * Audio testcase - Mixing buffer.
- */
-
-/*
- * Copyright (C) 2014-2015 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-
-/*********************************************************************************************************************************
-*   Header Files                                                                                                                 *
-*********************************************************************************************************************************/
-#include <iprt/err.h>
-#include <iprt/initterm.h>
-#include <iprt/mem.h>
-#include <iprt/rand.h>
-#include <iprt/stream.h>
-#include <iprt/string.h>
-#include <iprt/test.h>
-
-
-#include "../AudioMixBuffer.h"
-#include "../DrvAudio.h"
-
-
-/*********************************************************************************************************************************
-*   Structures and Typedefs                                                                                                      *
-*********************************************************************************************************************************/
-
-static int tstSingle(RTTEST hTest)
-{
-    RTTestSubF(hTest, "Single buffer");
-
-    PDMAUDIOSTREAMCFG config =
-    {
-        44100,                   /* Hz */
-        2                        /* Channels */,
-        AUD_FMT_S16              /* Format */,
-        PDMAUDIOENDIANNESS_LITTLE /* ENDIANNESS */
-    };
-    PDMPCMPROPS props;
-
-    int rc = DrvAudioStreamCfgToProps(&config, &props);
-    AssertRC(rc);
-
-    uint32_t cBufSize = _1K;
-
-    /*
-     * General stuff.
-     */
-    PDMAUDIOMIXBUF mb;
-    RTTESTI_CHECK_RC_OK(AudioMixBufInit(&mb, "Single", &props, cBufSize));
-    RTTESTI_CHECK(AudioMixBufSize(&mb) == cBufSize);
-    RTTESTI_CHECK(AUDIOMIXBUF_B2S(&mb, AudioMixBufSizeBytes(&mb)) == cBufSize);
-    RTTESTI_CHECK(AUDIOMIXBUF_S2B(&mb, AudioMixBufSize(&mb)) == AudioMixBufSizeBytes(&mb));
-    RTTESTI_CHECK(AudioMixBufFree(&mb) == cBufSize);
-    RTTESTI_CHECK(AUDIOMIXBUF_S2B(&mb, AudioMixBufFree(&mb)) == AudioMixBufFreeBytes(&mb));
-
-    /*
-     * Absolute writes.
-     */
-    uint32_t read  = 0, written = 0, written_abs = 0;
-    int8_t  samples8 [2] = { 0x12, 0x34 };
-    int16_t samples16[2] = { 0xAA, 0xBB };
-    int32_t samples32[2] = { 0xCC, 0xDD };
-    int64_t samples64[2] = { 0xEE, 0xFF };
-
-    RTTESTI_CHECK_RC_OK(AudioMixBufWriteAt(&mb, 0, &samples8, sizeof(samples8), &written));
-    RTTESTI_CHECK(written == 0 /* Samples */);
-
-    RTTESTI_CHECK_RC_OK(AudioMixBufWriteAt(&mb, 0, &samples16, sizeof(samples16), &written));
-    RTTESTI_CHECK(written == 1 /* Samples */);
-
-    RTTESTI_CHECK_RC_OK(AudioMixBufWriteAt(&mb, 2, &samples32, sizeof(samples32), &written));
-    RTTESTI_CHECK(written == 2 /* Samples */);
-    written_abs = 0;
-
-    /* Beyond buffer. */
-    RTTESTI_CHECK_RC(AudioMixBufWriteAt(&mb, AudioMixBufSize(&mb) + 1, &samples16, sizeof(samples16),
-                                        &written), VERR_BUFFER_OVERFLOW);
-
-    /*
-     * Circular writes.
-     */
-    uint32_t cToWrite = AudioMixBufSize(&mb) - written_abs - 1; /* -1 as padding plus -2 samples for above. */
-    for (uint32_t i = 0; i < cToWrite; i++)
-    {
-        RTTESTI_CHECK_RC_OK(AudioMixBufWriteCirc(&mb, &samples16, sizeof(samples16), &written));
-        RTTESTI_CHECK(written == 1);
-    }
-    RTTESTI_CHECK(!AudioMixBufIsEmpty(&mb));
-    RTTESTI_CHECK(AudioMixBufFree(&mb) == 1);
-    RTTESTI_CHECK(AudioMixBufFreeBytes(&mb) == AUDIOMIXBUF_S2B(&mb, 1U));
-    RTTESTI_CHECK(AudioMixBufProcessed(&mb) == cToWrite + written_abs /* + last absolute write */);
-
-    RTTESTI_CHECK_RC_OK(AudioMixBufWriteCirc(&mb, &samples16, sizeof(samples16), &written));
-    RTTESTI_CHECK(written == 1);
-    RTTESTI_CHECK(AudioMixBufFree(&mb) == 0);
-    RTTESTI_CHECK(AudioMixBufFreeBytes(&mb) == AUDIOMIXBUF_S2B(&mb, 0));
-    RTTESTI_CHECK(AudioMixBufProcessed(&mb) == cBufSize);
-
-    /* Circular reads. */
-    uint32_t cToRead = AudioMixBufSize(&mb) - written_abs - 1;
-    for (uint32_t i = 0; i < cToWrite; i++)
-    {
-        RTTESTI_CHECK_RC_OK(AudioMixBufReadCirc(&mb, &samples16, sizeof(samples16), &read));
-        RTTESTI_CHECK(read == 1);
-        AudioMixBufFinish(&mb, read);
-    }
-    RTTESTI_CHECK(!AudioMixBufIsEmpty(&mb));
-    RTTESTI_CHECK(AudioMixBufFree(&mb) == AudioMixBufSize(&mb) - written_abs - 1);
-    RTTESTI_CHECK(AudioMixBufFreeBytes(&mb) == AUDIOMIXBUF_S2B(&mb, cBufSize - written_abs - 1));
-    RTTESTI_CHECK(AudioMixBufProcessed(&mb) == cBufSize - cToRead + written_abs);
-
-    RTTESTI_CHECK_RC_OK(AudioMixBufReadCirc(&mb, &samples16, sizeof(samples16), &read));
-    RTTESTI_CHECK(read == 1);
-    AudioMixBufFinish(&mb, read);
-    RTTESTI_CHECK(AudioMixBufFree(&mb) == cBufSize - written_abs);
-    RTTESTI_CHECK(AudioMixBufFreeBytes(&mb) == AUDIOMIXBUF_S2B(&mb, cBufSize - written_abs));
-    RTTESTI_CHECK(AudioMixBufProcessed(&mb) == written_abs);
-
-    AudioMixBufDestroy(&mb);
-
-    return RTTestSubErrorCount(hTest) ? VERR_GENERAL_FAILURE : VINF_SUCCESS;
-}
-
-static int tstParentChild(RTTEST hTest)
-{
-    RTTestSubF(hTest, "2 Children -> Parent");
-
-    uint32_t cBufSize = _1K;
-
-    PDMAUDIOSTREAMCFG cfg_p =
-    {
-        44100,                   /* Hz */
-        2                        /* Channels */,
-        AUD_FMT_S16              /* Format */,
-        PDMAUDIOENDIANNESS_LITTLE /* ENDIANNESS */
-    };
-    PDMPCMPROPS props;
-
-    int rc = DrvAudioStreamCfgToProps(&cfg_p, &props);
-    AssertRC(rc);
-
-    PDMAUDIOMIXBUF parent;
-    RTTESTI_CHECK_RC_OK(AudioMixBufInit(&parent, "Parent", &props, cBufSize));
-
-    PDMAUDIOSTREAMCFG cfg_c1 = /* Upmixing to parent */
-    {
-        22100,                   /* Hz */
-        2                        /* Channels */,
-        AUD_FMT_S16              /* Format */,
-        PDMAUDIOENDIANNESS_LITTLE /* ENDIANNESS */
-    };
-
-    rc = DrvAudioStreamCfgToProps(&cfg_c1, &props);
-    AssertRC(rc);
-
-    PDMAUDIOMIXBUF child1;
-    RTTESTI_CHECK_RC_OK(AudioMixBufInit(&child1, "Child1", &props, cBufSize));
-    RTTESTI_CHECK_RC_OK(AudioMixBufLinkTo(&child1, &parent));
-
-    PDMAUDIOSTREAMCFG cfg_c2 = /* Downmixing to parent */
-    {
-        48000,                   /* Hz */
-        2                        /* Channels */,
-        AUD_FMT_S16              /* Format */,
-        PDMAUDIOENDIANNESS_LITTLE /* ENDIANNESS */
-    };
-
-    rc = DrvAudioStreamCfgToProps(&cfg_c2, &props);
-    AssertRC(rc);
-
-    PDMAUDIOMIXBUF child2;
-    RTTESTI_CHECK_RC_OK(AudioMixBufInit(&child2, "Child2", &props, cBufSize));
-    RTTESTI_CHECK_RC_OK(AudioMixBufLinkTo(&child2, &parent));
-
-    /*
-     * Writing + mixing from child/children -> parent, sequential.
-     */
-    uint32_t cbBuf = _1K;
-    char pvBuf[_1K];
-    int16_t samples[32] = { 0xAA, 0xBB };
-    uint32_t read , written, mixed, temp;
-
-    uint32_t cChild1Free     = cBufSize;
-    uint32_t cChild1Mixed    = 0;
-    uint32_t cSamplesParent1 = 16;
-    uint32_t cSamplesChild1  = 16;
-
-    uint32_t cChild2Free     = cBufSize;
-    uint32_t cChild2Mixed    = 0;
-    uint32_t cSamplesParent2 = 16;
-    uint32_t cSamplesChild2  = 16;
-
-    uint32_t t = RTRandU32() % 64;
-
-    for (uint32_t i = 0; i < t; i++)
-    {
-        RTTestPrintf(hTest, RTTESTLVL_DEBUG, "i=%RU32\n", i);
-        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufWriteAt(&child1, 0, &samples, sizeof(samples), &written));
-        RTTESTI_CHECK_MSG_BREAK(written == cSamplesChild1, ("Child1: Expected %RU32 written samples, got %RU32\n", cSamplesChild1, written));
-        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufMixToParent(&child1, written, &mixed));
-        temp = AudioMixBufProcessed(&parent) - AudioMixBufMixed(&child2);
-        RTTESTI_CHECK_MSG_BREAK(AudioMixBufMixed(&child1) == temp, ("Child1: Expected %RU32 mixed samples, got %RU32\n", AudioMixBufMixed(&child1), temp));
-
-        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufWriteAt(&child2, 0, &samples, sizeof(samples), &written));
-        RTTESTI_CHECK_MSG_BREAK(written == cSamplesChild2, ("Child2: Expected %RU32 written samples, got %RU32\n", cSamplesChild2, written));
-        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufMixToParent(&child2, written, &mixed));
-        temp = AudioMixBufProcessed(&parent) - AudioMixBufMixed(&child1);
-        RTTESTI_CHECK_MSG_BREAK(AudioMixBufMixed(&child2) == temp, ("Child2: Expected %RU32 mixed samples, got %RU32\n", AudioMixBufMixed(&child2), temp));
-    }
-
-    RTTESTI_CHECK(AudioMixBufProcessed(&parent) == AudioMixBufMixed(&child1) + AudioMixBufMixed(&child2));
-
-    for (;;)
-    {
-        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufReadCirc(&parent, pvBuf, cbBuf, &read));
-        if (!read)
-            break;
-        AudioMixBufFinish(&parent, read);
-    }
-
-    RTTESTI_CHECK(AudioMixBufProcessed(&parent) == 0);
-    RTTESTI_CHECK(AudioMixBufMixed(&child1) == 0);
-    RTTESTI_CHECK(AudioMixBufMixed(&child2) == 0);
-
-    AudioMixBufDestroy(&parent);
-    AudioMixBufDestroy(&child1);
-    AudioMixBufDestroy(&child2);
-
-    return RTTestSubErrorCount(hTest) ? VERR_GENERAL_FAILURE : VINF_SUCCESS;
-}
-
-/* Test 8-bit sample conversion (8-bit -> internal -> 8-bit). */
-static int tstConversion8(RTTEST hTest)
-{
-    unsigned        i;
-    uint32_t        cBufSize = 256;
-    PDMPCMPROPS     props;
-
-
-    RTTestSubF(hTest, "Sample conversion");
-
-    PDMAUDIOSTREAMCFG cfg_p =
-    {
-        44100,                   /* Hz */
-        1                        /* Channels */,
-        AUD_FMT_U8               /* Format */,
-        PDMAUDIOENDIANNESS_LITTLE /* ENDIANNESS */
-    };
-
-    int rc = DrvAudioStreamCfgToProps(&cfg_p, &props);
-    AssertRC(rc);
-
-    PDMAUDIOMIXBUF parent;
-    RTTESTI_CHECK_RC_OK(AudioMixBufInit(&parent, "Parent", &props, cBufSize));
-
-    /* Child uses half the sample rate; that ensures the mixing engine can't
-     * take shortcuts and performs conversion. Because conversion to double
-     * the sample rate effectively inserts one additional sample between every
-     * two source samples, N source samples will be converted to N * 2 - 1
-     * samples. However, the last source sample will be saved for later
-     * interpolation and not immediately output.
-     */
-    PDMAUDIOSTREAMCFG cfg_c =   /* Upmixing to parent */
-    {
-        22050,                   /* Hz */
-        1                        /* Channels */,
-        AUD_FMT_U8               /* Format */,
-        PDMAUDIOENDIANNESS_LITTLE /* ENDIANNESS */
-    };
-
-    rc = DrvAudioStreamCfgToProps(&cfg_c, &props);
-    AssertRC(rc);
-
-    PDMAUDIOMIXBUF child;
-    RTTESTI_CHECK_RC_OK(AudioMixBufInit(&child, "Child", &props, cBufSize));
-    RTTESTI_CHECK_RC_OK(AudioMixBufLinkTo(&child, &parent));
-
-    /* 8-bit unsigned samples. Often used with SB16 device. */
-    uint8_t     samples[16]  = { 0xAA, 0xBB, 0, 1, 43, 125, 126, 127,
-                                 128, 129, 130, 131, 132, UINT8_MAX - 1, UINT8_MAX, 0 };
-
-    /*
-     * Writing + mixing from child -> parent, sequential.
-     */
-    uint32_t    cbBuf = 256;
-    char        achBuf[256];
-    uint32_t    read, written, mixed, temp;
-
-    uint32_t cChildFree     = cBufSize;
-    uint32_t cChildMixed    = 0;
-    uint32_t cSamplesChild  = 16;
-    uint32_t cSamplesParent = cSamplesChild * 2 - 2;
-    uint32_t cSamplesRead   = 0;
-
-    /**** 8-bit unsigned samples ****/
-    RTTestPrintf(hTest, RTTESTLVL_DEBUG, "Conversion test %uHz %uch 8-bit\n", cfg_c.uHz, cfg_c.cChannels);
-    RTTESTI_CHECK_RC_OK(AudioMixBufWriteAt(&child, 0, &samples, sizeof(samples), &written));
-    RTTESTI_CHECK_MSG(written == cSamplesChild, ("Child: Expected %RU32 written samples, got %RU32\n", cSamplesChild, written));
-    RTTESTI_CHECK_RC_OK(AudioMixBufMixToParent(&child, written, &mixed));
-    temp = AudioMixBufProcessed(&parent);
-    RTTESTI_CHECK_MSG(AudioMixBufMixed(&child) == temp, ("Child: Expected %RU32 mixed samples, got %RU32\n", AudioMixBufMixed(&child), temp));
-
-    RTTESTI_CHECK(AudioMixBufProcessed(&parent) == AudioMixBufMixed(&child));
-
-    for (;;)
-    {
-        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufReadCirc(&parent, achBuf, cbBuf, &read));
-        if (!read)
-            break;
-        cSamplesRead += read;
-        AudioMixBufFinish(&parent, read);
-    }
-    RTTESTI_CHECK_MSG(cSamplesRead == cSamplesParent, ("Parent: Expected %RU32 mixed samples, got %RU32\n", cSamplesParent, cSamplesRead));
-
-    /* Check that the samples came out unharmed. Every other sample is interpolated and we ignore it. */
-    /* NB: This also checks that the default volume setting is 0dB attenuation. */
-    uint8_t *pSrc8 = &samples[0];
-    uint8_t *pDst8 = (uint8_t *)achBuf;
-
-    for (i = 0; i < cSamplesChild - 1; ++i)
-    {
-        RTTESTI_CHECK_MSG(*pSrc8 == *pDst8, ("index %u: Dst=%d, Src=%d\n", i, *pDst8, *pSrc8));
-        pSrc8 += 1;
-        pDst8 += 2;
-    }
-
-    RTTESTI_CHECK(AudioMixBufProcessed(&parent) == 0);
-    RTTESTI_CHECK(AudioMixBufMixed(&child) == 0);
-
-    AudioMixBufDestroy(&parent);
-    AudioMixBufDestroy(&child);
-
-    return RTTestSubErrorCount(hTest) ? VERR_GENERAL_FAILURE : VINF_SUCCESS;
-}
-
-/* Test 16-bit sample conversion (16-bit -> internal -> 16-bit). */
-static int tstConversion16(RTTEST hTest)
-{
-    unsigned        i;
-    uint32_t        cBufSize = 256;
-    PDMPCMPROPS     props;
-
-
-    RTTestSubF(hTest, "Sample conversion 16-bit");
-
-    PDMAUDIOSTREAMCFG cfg_p =
-    {
-        44100,                   /* Hz */
-        1                        /* Channels */,
-        AUD_FMT_S16              /* Format */,
-        PDMAUDIOENDIANNESS_LITTLE /* ENDIANNESS */
-    };
-
-    int rc = DrvAudioStreamCfgToProps(&cfg_p, &props);
-    AssertRC(rc);
-
-    PDMAUDIOMIXBUF parent;
-    RTTESTI_CHECK_RC_OK(AudioMixBufInit(&parent, "Parent", &props, cBufSize));
-
-    PDMAUDIOSTREAMCFG cfg_c =   /* Upmixing to parent */
-    {
-        22050,                   /* Hz */
-        1                        /* Channels */,
-        AUD_FMT_S16              /* Format */,
-        PDMAUDIOENDIANNESS_LITTLE /* ENDIANNESS */
-    };
-
-    rc = DrvAudioStreamCfgToProps(&cfg_c, &props);
-    AssertRC(rc);
-
-    PDMAUDIOMIXBUF child;
-    RTTESTI_CHECK_RC_OK(AudioMixBufInit(&child, "Child", &props, cBufSize));
-    RTTESTI_CHECK_RC_OK(AudioMixBufLinkTo(&child, &parent));
-
-    /* 16-bit signed. More or less exclusively used as output, and usually as input, too. */
-    int16_t     samples[16] = { 0xAA, 0xBB, INT16_MIN, INT16_MIN + 1, INT16_MIN / 2, -3, -2, -1,
-                                0, 1, 2, 3, INT16_MAX / 2, INT16_MAX - 1, INT16_MAX, 0 };
-
-    /*
-     * Writing + mixing from child -> parent, sequential.
-     */
-    uint32_t    cbBuf = 256;
-    char        achBuf[256];
-    uint32_t    read, written, mixed, temp;
-
-    uint32_t cChildFree     = cBufSize;
-    uint32_t cChildMixed    = 0;
-    uint32_t cSamplesChild  = 16;
-    uint32_t cSamplesParent = cSamplesChild * 2 - 2;
-    uint32_t cSamplesRead   = 0;
-
-    /**** 16-bit signed samples ****/
-    RTTestPrintf(hTest, RTTESTLVL_DEBUG, "Conversion test %uHz %uch 16-bit\n", cfg_c.uHz, cfg_c.cChannels);
-    RTTESTI_CHECK_RC_OK(AudioMixBufWriteAt(&child, 0, &samples, sizeof(samples), &written));
-    RTTESTI_CHECK_MSG(written == cSamplesChild, ("Child: Expected %RU32 written samples, got %RU32\n", cSamplesChild, written));
-    RTTESTI_CHECK_RC_OK(AudioMixBufMixToParent(&child, written, &mixed));
-    temp = AudioMixBufProcessed(&parent);
-    RTTESTI_CHECK_MSG(AudioMixBufMixed(&child) == temp, ("Child: Expected %RU32 mixed samples, got %RU32\n", AudioMixBufMixed(&child), temp));
-
-    RTTESTI_CHECK(AudioMixBufProcessed(&parent) == AudioMixBufMixed(&child));
-
-    for (;;)
-    {
-        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufReadCirc(&parent, achBuf, cbBuf, &read));
-        if (!read)
-            break;
-        cSamplesRead += read;
-        AudioMixBufFinish(&parent, read);
-    }
-    RTTESTI_CHECK_MSG(cSamplesRead == cSamplesParent, ("Parent: Expected %RU32 mixed samples, got %RU32\n", cSamplesParent, cSamplesRead));
-
-    /* Check that the samples came out unharmed. Every other sample is interpolated and we ignore it. */
-    /* NB: This also checks that the default volume setting is 0dB attenuation. */
-    int16_t *pSrc16 = &samples[0];
-    int16_t *pDst16 = (int16_t *)achBuf;
-
-    for (i = 0; i < cSamplesChild - 1; ++i)
-    {
-        RTTESTI_CHECK_MSG(*pSrc16 == *pDst16, ("index %u: Dst=%d, Src=%d\n", i, *pDst16, *pSrc16));
-        pSrc16 += 1;
-        pDst16 += 2;
-    }
-
-    RTTESTI_CHECK(AudioMixBufProcessed(&parent) == 0);
-    RTTESTI_CHECK(AudioMixBufMixed(&child) == 0);
-
-    AudioMixBufDestroy(&parent);
-    AudioMixBufDestroy(&child);
-
-    return RTTestSubErrorCount(hTest) ? VERR_GENERAL_FAILURE : VINF_SUCCESS;
-}
-
-/* Test volume control. */
-static int tstVolume(RTTEST hTest)
-{
-    unsigned        i;
-    uint32_t        cBufSize = 256;
-    PDMPCMPROPS     props;
-
-
-    RTTestSubF(hTest, "Volume control");
-
-    /* Same for parent/child. */
-    PDMAUDIOSTREAMCFG cfg =
-    {
-        44100,                   /* Hz */
-        2                        /* Channels */,
-        AUD_FMT_S16              /* Format */,
-        PDMAUDIOENDIANNESS_LITTLE /* ENDIANNESS */
-    };
-
-    int rc = DrvAudioStreamCfgToProps(&cfg, &props);
-    AssertRC(rc);
-
-    PDMAUDIOVOLUME vol = { false, 0, 0 };   /* Not muted. */
-    PDMAUDIOMIXBUF parent;
-    RTTESTI_CHECK_RC_OK(AudioMixBufInit(&parent, "Parent", &props, cBufSize));
-
-    PDMAUDIOMIXBUF child;
-    RTTESTI_CHECK_RC_OK(AudioMixBufInit(&child, "Child", &props, cBufSize));
-    RTTESTI_CHECK_RC_OK(AudioMixBufLinkTo(&child, &parent));
-
-    /* A few 16-bit signed samples. */
-    int16_t     samples[16] = { INT16_MIN, INT16_MIN + 1, -128, -64, -4, -1, 0, 1,
-                                2, 255, 256, INT16_MAX / 2, INT16_MAX - 2, INT16_MAX - 1, INT16_MAX, 0 };
-
-    /*
-     * Writing + mixing from child -> parent.
-     */
-    uint32_t    cbBuf = 256;
-    char        achBuf[256];
-    uint32_t    read, written, mixed;
-
-    uint32_t cChildFree     = cBufSize;
-    uint32_t cChildMixed    = 0;
-    uint32_t cSamplesChild  = 8;
-    uint32_t cSamplesParent = cSamplesChild;
-    uint32_t cSamplesRead;
-    int16_t *pSrc16;
-    int16_t *pDst16;
-
-    /**** Volume control test ****/
-    RTTestPrintf(hTest, RTTESTLVL_DEBUG, "Volume control test %uHz %uch \n", cfg.uHz, cfg.cChannels);
-
-    /* 1) Full volume/0dB attenuation (255). */
-    vol.uLeft = vol.uRight = 255;
-    AudioMixBufSetVolume(&child, &vol);
-
-    RTTESTI_CHECK_RC_OK(AudioMixBufWriteAt(&child, 0, &samples, sizeof(samples), &written));
-    RTTESTI_CHECK_MSG(written == cSamplesChild, ("Child: Expected %RU32 written samples, got %RU32\n", cSamplesChild, written));
-    RTTESTI_CHECK_RC_OK(AudioMixBufMixToParent(&child, written, &mixed));
-
-    cSamplesRead = 0;
-    for (;;)
-    {
-        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufReadCirc(&parent, achBuf, cbBuf, &read));
-        if (!read)
-            break;
-        cSamplesRead += read;
-        AudioMixBufFinish(&parent, read);
-    }
-    RTTESTI_CHECK_MSG(cSamplesRead == cSamplesParent, ("Parent: Expected %RU32 mixed samples, got %RU32\n", cSamplesParent, cSamplesRead));
-
-    /* Check that at 0dB the samples came out unharmed. */
-    pSrc16 = &samples[0];
-    pDst16 = (int16_t *)achBuf;
-
-    for (i = 0; i < cSamplesParent * 2 /* stereo */; ++i)
-    {
-        RTTESTI_CHECK_MSG(*pSrc16 == *pDst16, ("index %u: Dst=%d, Src=%d\n", i, *pDst16, *pSrc16));
-        ++pSrc16;
-        ++pDst16;
-    }
-    AudioMixBufReset(&child);
-
-    /* 2) Half volume/-6dB attenuation (16 steps down). */
-    vol.uLeft = vol.uRight = 255 - 16;
-    AudioMixBufSetVolume(&child, &vol);
-
-    RTTESTI_CHECK_RC_OK(AudioMixBufWriteAt(&child, 0, &samples, sizeof(samples), &written));
-    RTTESTI_CHECK_MSG(written == cSamplesChild, ("Child: Expected %RU32 written samples, got %RU32\n", cSamplesChild, written));
-    RTTESTI_CHECK_RC_OK(AudioMixBufMixToParent(&child, written, &mixed));
-
-    cSamplesRead = 0;
-    for (;;)
-    {
-        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufReadCirc(&parent, achBuf, cbBuf, &read));
-        if (!read)
-            break;
-        cSamplesRead += read;
-        AudioMixBufFinish(&parent, read);
-    }
-    RTTESTI_CHECK_MSG(cSamplesRead == cSamplesParent, ("Parent: Expected %RU32 mixed samples, got %RU32\n", cSamplesParent, cSamplesRead));
-
-    /* Check that at -6dB the sample values are halved. */
-    pSrc16 = &samples[0];
-    pDst16 = (int16_t *)achBuf;
-
-    for (i = 0; i < cSamplesParent * 2 /* stereo */; ++i)
-    {
-        /* Watch out! For negative values, x >> 1 is not the same as x / 2. */
-        RTTESTI_CHECK_MSG(*pSrc16 >> 1 == *pDst16, ("index %u: Dst=%d, Src=%d\n", i, *pDst16, *pSrc16));
-        ++pSrc16;
-        ++pDst16;
-    }
-
-    AudioMixBufDestroy(&parent);
-    AudioMixBufDestroy(&child);
-
-    return RTTestSubErrorCount(hTest) ? VERR_GENERAL_FAILURE : VINF_SUCCESS;
-}
-
-int main(int argc, char **argv)
-{
-    RTR3InitExe(argc, &argv, 0);
-
-    /*
-     * Initialize IPRT and create the test.
-     */
-    RTTEST hTest;
-    int rc = RTTestInitAndCreate("tstAudioMixBuffer", &hTest);
-    if (rc)
-        return rc;
-    RTTestBanner(hTest);
-
-    rc = tstSingle(hTest);
-    if (RT_SUCCESS(rc))
-        rc = tstParentChild(hTest);
-    if (RT_SUCCESS(rc))
-        rc = tstConversion8(hTest);
-    if (RT_SUCCESS(rc))
-        rc = tstConversion16(hTest);
-    if (RT_SUCCESS(rc))
-        rc = tstVolume(hTest);
-
-    /*
-     * Summary
-     */
-    return RTTestSummaryAndDestroy(hTest);
-}
diff --git a/src/VBox/Devices/BiosCommonCode/DoUInt32Div.c b/src/VBox/Devices/BiosCommonCode/DoUInt32Div.c
index 0cd3a91..4359533 100644
--- a/src/VBox/Devices/BiosCommonCode/DoUInt32Div.c
+++ b/src/VBox/Devices/BiosCommonCode/DoUInt32Div.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/BiosCommonCode/MakeAlternativeSource.cpp b/src/VBox/Devices/BiosCommonCode/MakeAlternativeSource.cpp
index 7b02145..9419842 100644
--- a/src/VBox/Devices/BiosCommonCode/MakeAlternativeSource.cpp
+++ b/src/VBox/Devices/BiosCommonCode/MakeAlternativeSource.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -337,6 +337,7 @@ static bool disIsString(uint32_t uFlatAddr, uint32_t cb)
 }
 
 
+#if 0 /* unused */
 /**
  * Checks if a dword could be a far 16:16 BIOS address.
  *
@@ -355,6 +356,7 @@ static bool disIsFarBiosAddr(uint32_t uFlatAddr)
         return false;
     return true;
 }
+#endif
 
 
 static bool disByteData(uint32_t uFlatAddr, uint32_t cb)
@@ -810,6 +812,8 @@ static bool disDataSegment(uint32_t iSeg)
 
 static bool disIsCodeAndAdjustSize(uint32_t uFlatAddr, PRTDBGSYMBOL pSym, PBIOSSEG pSeg)
 {
+    RT_NOREF_PV(uFlatAddr);
+
     switch (g_enmBiosType)
     {
         /*
@@ -851,6 +855,7 @@ static bool disIsCodeAndAdjustSize(uint32_t uFlatAddr, PRTDBGSYMBOL pSym, PBIOSS
 
 static bool disIs16BitCode(const char *pszSymbol)
 {
+    RT_NOREF_PV(pszSymbol);
     return true;
 }
 
@@ -923,6 +928,8 @@ static size_t disHandleYasmDifferences(PDISCPUSTATE pCpuState, uint32_t uFlatAdd
  */
 static DECLCALLBACK(int) disReadOpcodeBytes(PDISCPUSTATE pDis, uint8_t offInstr, uint8_t cbMinRead, uint8_t cbMaxRead)
 {
+    RT_NOREF_PV(cbMinRead);
+
     RTUINTPTR   offBios  = pDis->uInstrAddr + offInstr - g_uBiosFlatBase;
     size_t      cbToRead = cbMaxRead;
     if (offBios + cbToRead > g_cbImg)
@@ -2030,7 +2037,7 @@ int main(int argc, char **argv)
             case 'V':
             {
                 /* The following is assuming that svn does it's job here. */
-                char szRev[] = "$Revision: 108956 $";
+                char szRev[] = "$Revision: 109163 $";
                 char *psz = szRev;
                 while (*psz && !RT_C_IS_DIGIT(*psz))
                     psz++;
diff --git a/src/VBox/Devices/BiosCommonCode/Makefile.kmk b/src/VBox/Devices/BiosCommonCode/Makefile.kmk
index 0c45471..e6615e3 100644
--- a/src/VBox/Devices/BiosCommonCode/Makefile.kmk
+++ b/src/VBox/Devices/BiosCommonCode/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2012-2015 Oracle Corporation
+# Copyright (C) 2012-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/BiosCommonCode/__I4D.asm b/src/VBox/Devices/BiosCommonCode/__I4D.asm
index 13c5879..bbd436b 100644
--- a/src/VBox/Devices/BiosCommonCode/__I4D.asm
+++ b/src/VBox/Devices/BiosCommonCode/__I4D.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2012-2015 Oracle Corporation
+; Copyright (C) 2012-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/BiosCommonCode/__I4M.asm b/src/VBox/Devices/BiosCommonCode/__I4M.asm
index c5c9b86..e7f1945 100644
--- a/src/VBox/Devices/BiosCommonCode/__I4M.asm
+++ b/src/VBox/Devices/BiosCommonCode/__I4M.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2012-2015 Oracle Corporation
+; Copyright (C) 2012-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/BiosCommonCode/__U4M.asm b/src/VBox/Devices/BiosCommonCode/__U4M.asm
index 6c45f31..5599002 100644
--- a/src/VBox/Devices/BiosCommonCode/__U4M.asm
+++ b/src/VBox/Devices/BiosCommonCode/__U4M.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2012-2015 Oracle Corporation
+; Copyright (C) 2012-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/BiosCommonCode/__U8LS.asm b/src/VBox/Devices/BiosCommonCode/__U8LS.asm
index 31d2375..31da560 100644
--- a/src/VBox/Devices/BiosCommonCode/__U8LS.asm
+++ b/src/VBox/Devices/BiosCommonCode/__U8LS.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2012-2015 Oracle Corporation
+; Copyright (C) 2012-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/BiosCommonCode/__U8RS.asm b/src/VBox/Devices/BiosCommonCode/__U8RS.asm
index 1ea52e5..a2a0b40 100644
--- a/src/VBox/Devices/BiosCommonCode/__U8RS.asm
+++ b/src/VBox/Devices/BiosCommonCode/__U8RS.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2012-2015 Oracle Corporation
+; Copyright (C) 2012-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/BiosCommonCode/biosorg_check.sed b/src/VBox/Devices/BiosCommonCode/biosorg_check.sed
index ef3d32c..961018d 100644
--- a/src/VBox/Devices/BiosCommonCode/biosorg_check.sed
+++ b/src/VBox/Devices/BiosCommonCode/biosorg_check.sed
@@ -40,7 +40,7 @@ x
 s/^....:\(....\)/\1 /
 
 
-# Loop for comparing the two addresses.  The one in the pattern buffer (left) must be 
+# Loop for comparing the two addresses.  The one in the pattern buffer (left) must be
 # smaller or equal to the one in in the pattern buffer (BIOSORG address).
 :compare_loop
 /^f/b match_f_or_greater
@@ -167,7 +167,7 @@ x
 b bad_other
 
 
-# Next round of the loop. 
+# Next round of the loop.
 # 1. Drop the leading digit of the max address (BIOSORG).
 # 2. Check if we've reached end of the address. If so, check that we've reached the space in the actual address.
 # 3. Switch buffers so the actual address in the pattern space.
diff --git a/src/VBox/Devices/BiosCommonCode/fmemcpy.asm b/src/VBox/Devices/BiosCommonCode/fmemcpy.asm
index 67801fa..7b9bc3b 100644
--- a/src/VBox/Devices/BiosCommonCode/fmemcpy.asm
+++ b/src/VBox/Devices/BiosCommonCode/fmemcpy.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2012-2015 Oracle Corporation
+; Copyright (C) 2012-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/BiosCommonCode/fmemset.asm b/src/VBox/Devices/BiosCommonCode/fmemset.asm
index 4a1362b..97253c5 100644
--- a/src/VBox/Devices/BiosCommonCode/fmemset.asm
+++ b/src/VBox/Devices/BiosCommonCode/fmemset.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2012-2015 Oracle Corporation
+; Copyright (C) 2012-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Bus/DevPCI.cpp b/src/VBox/Devices/Bus/DevPCI.cpp
index 5266ea2..23d38cc 100644
--- a/src/VBox/Devices/Bus/DevPCI.cpp
+++ b/src/VBox/Devices/Bus/DevPCI.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -450,20 +450,20 @@ static DECLCALLBACK(void) pci_default_write_config(PCIDevice *d, uint32_t addres
         if (addr == 0x05)       /* Command register, bits 8-15. */
         {
             /* don't change reserved bits (11-15) */
-            val &= UINT32_C(~0xf8);
+            val &= ~UINT32_C(0xf8);
             d->config[addr] = val;
         }
         else if (addr == 0x06)  /* Status register, bits 0-7. */
         {
             /* don't change read-only bits => actually all lower bits are read-only */
-            val &= UINT32_C(~0xff);
+            val &= ~UINT32_C(0xff);
             /* status register, low part: clear bits by writing a '1' to the corresponding bit */
             d->config[addr] &= ~val;
         }
         else if (addr == 0x07)  /* Status register, bits 8-15. */
         {
             /* don't change read-only bits */
-            val &= UINT32_C(~0x06);
+            val &= ~UINT32_C(0x06);
             /* status register, high part: clear bits by writing a '1' to the corresponding bit */
             d->config[addr] &= ~val;
         }
@@ -513,6 +513,7 @@ static int pci_data_write(PPCIGLOBALS pGlobals, uint32_t addr, uint32_t val, int
                 pBridgeDevice->Int.s.pfnBridgeConfigWrite(pBridgeDevice->pDevIns, iBus, iDevice, config_addr, val, len);
             }
 #else
+            RT_NOREF2(val, len);
             return VINF_IOM_R3_IOPORT_WRITE;
 #endif
         }
@@ -1156,7 +1157,7 @@ static void pci_bios_init_device(PPCIGLOBALS pGlobals, uint8_t uBus, uint8_t uDe
 PDMBOTHCBDECL(int) pciIOPortAddressWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb)
 {
     Log(("pciIOPortAddressWrite: Port=%#x u32=%#x cb=%d\n", Port, u32, cb));
-    NOREF(pvUser);
+    RT_NOREF2(Port, pvUser);
     if (cb == 4)
     {
         PPCIGLOBALS pThis = PDMINS_2_DATA(pDevIns, PPCIGLOBALS);
@@ -1175,7 +1176,7 @@ PDMBOTHCBDECL(int) pciIOPortAddressWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOP
  */
 PDMBOTHCBDECL(int) pciIOPortAddressRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb)
 {
-    NOREF(pvUser);
+    RT_NOREF2(Port, pvUser);
     if (cb == 4)
     {
         PPCIGLOBALS pThis = PDMINS_2_DATA(pDevIns, PPCIGLOBALS);
@@ -1288,7 +1289,7 @@ static DECLCALLBACK(int) pciR3SaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
     SSMR3PutU32(pSSM, pThis->acpi_irq_level);
     SSMR3PutS32(pSSM, pThis->acpi_irq);
 
-    SSMR3PutU32(pSSM, ~0);        /* separator */
+    SSMR3PutU32(pSSM, UINT32_MAX);      /* separator */
 
     /*
      * Join paths with pcibridgeR3SaveExec.
@@ -2139,6 +2140,7 @@ static DECLCALLBACK(void) pciR3Reset(PPDMDEVINS pDevIns)
  */
 static DECLCALLBACK(int)   pciR3Construct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
 {
+    RT_NOREF1(iInstance);
     Assert(iInstance == 0);
     PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
 
diff --git a/src/VBox/Devices/Bus/DevPciIch9.cpp b/src/VBox/Devices/Bus/DevPciIch9.cpp
index 6950481..408a251 100644
--- a/src/VBox/Devices/Bus/DevPciIch9.cpp
+++ b/src/VBox/Devices/Bus/DevPciIch9.cpp
@@ -252,7 +252,7 @@ PDMBOTHCBDECL(void) ich9pcibridgeSetIrq(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev,
 PDMBOTHCBDECL(int) ich9pciIOPortAddressWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb)
 {
     LogFlow(("ich9pciIOPortAddressWrite: Port=%#x u32=%#x cb=%d\n", Port, u32, cb));
-    NOREF(pvUser);
+    RT_NOREF2(Port, pvUser);
     if (cb == 4)
     {
         PICH9PCIGLOBALS pThis = PDMINS_2_DATA(pDevIns, PICH9PCIGLOBALS);
@@ -288,7 +288,7 @@ PDMBOTHCBDECL(int) ich9pciIOPortAddressWrite(PPDMDEVINS pDevIns, void *pvUser, R
  */
 PDMBOTHCBDECL(int) ich9pciIOPortAddressRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb)
 {
-    NOREF(pvUser);
+    RT_NOREF2(Port, pvUser);
     if (cb == 4)
     {
         PICH9PCIGLOBALS pThis = PDMINS_2_DATA(pDevIns, PICH9PCIGLOBALS);
@@ -315,6 +315,8 @@ static int ich9pciDataWriteAddr(PICH9PCIGLOBALS pGlobals, PciAddress* pAddr,
     int rc = VINF_SUCCESS;
 #ifdef IN_RING3
     NOREF(rcReschedule);
+#else
+    RT_NOREF2(val, cb);
 #endif
 
     if (pAddr->iBus != 0)       /* forward to subordinate bus */
@@ -538,6 +540,8 @@ DECLINLINE(int) ich9pciSlot2ApicIrq(uint8_t uSlot, int irq_num)
     return (irq_num + uSlot) & 7;
 }
 
+#ifdef IN_RING3
+
 /* return the global irq number corresponding to a given device irq
    pin. We could also use the bus number to have a more precise
    mapping. This is the implementation note described in the PCI spec chapter 2.2.6 */
@@ -551,6 +555,8 @@ DECLINLINE(int) ich9pciSlotGetPirq(uint8_t uBus, uint8_t uDevFn, int iIrqNum)
 /* irqs corresponding to PCI irqs A-D, must match pci_irq_list in rombios.c */
 static const uint8_t aPciIrqs[4] = { 11, 10, 9, 5 };
 
+#endif /* IN_RING3 */
+
 /* Add one more level up request on APIC input line */
 DECLINLINE(void) ich9pciApicLevelUp(PICH9PCIGLOBALS pGlobals, int irq_num)
 {
@@ -1144,7 +1150,7 @@ static DECLCALLBACK(int) ich9pciR3SaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
     for (int i = 0; i < PCI_APIC_IRQ_PINS; i++)
         SSMR3PutU32(pSSM, pThis->uaPciApicIrqLevels[i]);
 
-    SSMR3PutU32(pSSM, ~0);        /* separator */
+    SSMR3PutU32(pSSM, UINT32_MAX);  /* separator */
 
     return ich9pciR3CommonSaveExec(&pThis->aPciBus, pSSM);
 }
@@ -1940,8 +1946,6 @@ static void ich9pciInitBridgeTopology(PICH9PCIGLOBALS pGlobals, PICH9PCIBUS pBus
 static DECLCALLBACK(int) ich9pciFakePCIBIOS(PPDMDEVINS pDevIns)
 {
     PICH9PCIGLOBALS pGlobals = PDMINS_2_DATA(pDevIns, PICH9PCIGLOBALS);
-    PVM             pVM = PDMDevHlpGetVM(pDevIns);
-    Assert(pVM);
 
     /*
      * Set the start addresses.
@@ -1960,9 +1964,7 @@ static DECLCALLBACK(int) ich9pciFakePCIBIOS(PPDMDEVINS pDevIns)
      * Init the devices.
      */
     for (int i = 0; i < 256; i++)
-    {
         ich9pciBiosInitDevice(pGlobals, 0, i);
-    }
 
     return VINF_SUCCESS;
 }
@@ -2175,18 +2177,18 @@ static DECLCALLBACK(void) ich9pciConfigWriteDev(PCIDevice *aDev, uint32_t u32Add
                 goto default_case;
             case VBOX_PCI_COMMAND+1: /* Command register, bits 8-15. */
                 /* don't change reserved bits (11-15) */
-                u8Val &= UINT32_C(~0xf8);
+                u8Val &= ~UINT32_C(0xf8);
                 fUpdateMappings = true;
                 goto default_case;
             case VBOX_PCI_STATUS:  /* Status register, bits 0-7. */
                 /* don't change read-only bits => actually all lower bits are read-only */
-                u8Val &= UINT32_C(~0xff);
+                u8Val &= ~UINT32_C(0xff);
                 /* status register, low part: clear bits by writing a '1' to the corresponding bit */
                 aDev->config[addr] &= ~u8Val;
                 break;
             case VBOX_PCI_STATUS+1:  /* Status register, bits 8-15. */
                 /* don't change read-only bits */
-                u8Val &= UINT32_C(~0x06);
+                u8Val &= ~UINT32_C(0x06);
                 /* status register, high part: clear bits by writing a '1' to the corresponding bit */
                 aDev->config[addr] &= ~u8Val;
                 break;
@@ -2514,10 +2516,9 @@ static DECLCALLBACK(void) ich9pciInfo(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, co
 }
 
 
-static DECLCALLBACK(int) ich9pciConstruct(PPDMDEVINS pDevIns,
-                                          int        iInstance,
-                                          PCFGMNODE  pCfg)
+static DECLCALLBACK(int) ich9pciConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE  pCfg)
 {
+    RT_NOREF1(iInstance);
     Assert(iInstance == 0);
     PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
 
@@ -2612,7 +2613,7 @@ static DECLCALLBACK(int) ich9pciConstruct(PPDMDEVINS pDevIns,
     /*
      * Fill in PCI configs and add them to the bus.
      */
-    /** @todo: Disabled for now because this causes error messages with Linux guests.
+    /** @todo Disabled for now because this causes error messages with Linux guests.
      *         The guest loads the x38_edac device which tries to map a memory region
      *         using an address given at place 0x48 - 0x4f in the PCi config space.
      *         This fails. because we don't register such a region.
@@ -2693,7 +2694,7 @@ static DECLCALLBACK(int) ich9pciConstruct(PPDMDEVINS pDevIns,
         return rc;
 
 
-    /** @todo: other chipset devices shall be registered too */
+    /** @todo other chipset devices shall be registered too */
 
     PDMDevHlpDBGFInfoRegister(pDevIns, "pci", "Display PCI bus status. Recognizes 'basic' or 'verbose' "
                                               "as arguments, defaults to 'basic'.", ich9pciInfo);
@@ -2716,7 +2717,7 @@ static void ich9pciResetDevice(PPCIDEVICE pDev)
     if (pciDevIsPassthrough(pDev))
     {
         // no reset handler - we can do what we need in PDM reset handler
-        // @todo: is it correct?
+        /// @todo is it correct?
     }
     else
     {
diff --git a/src/VBox/Devices/Bus/MsiCommon.cpp b/src/VBox/Devices/Bus/MsiCommon.cpp
index 6b5e66c..db67fae 100644
--- a/src/VBox/Devices/Bus/MsiCommon.cpp
+++ b/src/VBox/Devices/Bus/MsiCommon.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -98,6 +98,8 @@ DECLINLINE(uint32_t) msiGetMsiData(PPCIDEVICE pDev, int32_t iVector)
     return RT_MAKE_U32(lo, 0);
 }
 
+#ifdef IN_RING3
+
 DECLINLINE(bool) msiBitJustCleared(uint32_t uOldValue,
                                    uint32_t uNewValue,
                                    uint32_t uMask)
@@ -112,7 +114,6 @@ DECLINLINE(bool) msiBitJustSet(uint32_t uOldValue,
     return (!(uOldValue & uMask) && !!(uNewValue & uMask));
 }
 
-#ifdef IN_RING3
 void     MsiPciConfigWrite(PPDMDEVINS pDevIns, PCPDMPCIHLP pPciHlp, PPCIDEVICE pDev,
                            uint32_t u32Address, uint32_t val, unsigned len)
 {
@@ -200,9 +201,11 @@ void     MsiPciConfigWrite(PPDMDEVINS pDevIns, PCPDMPCIHLP pPciHlp, PPCIDEVICE p
 
 uint32_t MsiPciConfigRead (PPDMDEVINS pDevIns, PPCIDEVICE pDev, uint32_t u32Address, unsigned len)
 {
-    int32_t iOff = u32Address - pDev->Int.s.u8MsiCapOffset;
-
-    Assert(iOff >= 0 && (pciDevIsMsiCapable(pDev) && iOff < pDev->Int.s.u8MsiCapSize));
+    RT_NOREF1(pDevIns);
+#if defined(LOG_ENABLED) || defined(VBOX_STRICT)
+    int32_t off = u32Address - pDev->Int.s.u8MsiCapOffset;
+    Assert(off >= 0 && (pciDevIsMsiCapable(pDev) && off < pDev->Int.s.u8MsiCapSize));
+#endif
     uint32_t rv = 0;
 
     switch (len)
@@ -220,7 +223,7 @@ uint32_t MsiPciConfigRead (PPDMDEVINS pDevIns, PPCIDEVICE pDev, uint32_t u32Addr
             Assert(false);
     }
 
-    Log2(("MsiPciConfigRead: %d (%d) -> %x\n", iOff, len, rv));
+    Log2(("MsiPciConfigRead: %d (%d) -> %x\n", off, len, rv));
 
     return rv;
 }
@@ -305,7 +308,7 @@ void MsiNotify(PPDMDEVINS pDevIns, PCPDMPCIHLP pPciHlp, PPCIDEVICE pDev, int iVe
     /* We only trigger MSI on level up */
     if ((iLevel & PDM_IRQ_LEVEL_HIGH) == 0)
     {
-        /* @todo: maybe clear pending interrupts on level down? */
+        /** @todo maybe clear pending interrupts on level down? */
 #if 0
         if (puPending)
         {
diff --git a/src/VBox/Devices/Bus/MsiCommon.h b/src/VBox/Devices/Bus/MsiCommon.h
index 6a0efaa..38351bf 100644
--- a/src/VBox/Devices/Bus/MsiCommon.h
+++ b/src/VBox/Devices/Bus/MsiCommon.h
@@ -3,7 +3,7 @@
  * Header for MSI/MSI-X support routines.
  */
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Bus/MsixCommon.cpp b/src/VBox/Devices/Bus/MsixCommon.cpp
index ab6f620..cb13b3d 100644
--- a/src/VBox/Devices/Bus/MsixCommon.cpp
+++ b/src/VBox/Devices/Bus/MsixCommon.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -38,7 +38,7 @@ typedef struct
 AssertCompileSize(MsixTableRecord, VBOX_MSIX_ENTRY_SIZE);
 #pragma pack()
 
-/** @todo: use accessors so that raw PCI devices work correctly with MSI-X. */
+/** @todo use accessors so that raw PCI devices work correctly with MSI-X. */
 DECLINLINE(uint16_t)  msixGetMessageControl(PPCIDEVICE pDev)
 {
     return PCIDevGetWord(pDev, pDev->Int.s.u8MsixCapOffset + VBOX_MSIX_CAP_MESSAGE_CONTROL);
@@ -131,7 +131,7 @@ PDMBOTHCBDECL(int) msixMMIORead(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhy
 
 PDMBOTHCBDECL(int) msixMMIOWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void const *pv, unsigned cb)
 {
-    /// @todo: qword accesses?
+    /// @todo qword accesses?
     AssertMsgReturn(cb == 4,
                     ("MSI-X must be accessed with 4-byte reads"),
                     VERR_INTERNAL_ERROR);
@@ -329,12 +329,12 @@ void MsixPciConfigWrite(PPDMDEVINS pDevIns, PCPDMPCIHLP pPciHlp, PPCIDEVICE pDev
 
 uint32_t MsixPciConfigRead(PPDMDEVINS pDevIns, PPCIDEVICE pDev, uint32_t u32Address, unsigned len)
 {
-    int32_t iOff = u32Address - pDev->Int.s.u8MsixCapOffset;
     NOREF(pDevIns);
-
+#if defined(LOG_ENABLED) || defined(VBOX_STRICT)
+    int32_t iOff = u32Address - pDev->Int.s.u8MsixCapOffset;
     Assert(iOff >= 0 && (pciDevIsMsixCapable(pDev) && iOff < pDev->Int.s.u8MsixCapSize));
-    uint32_t rv = 0;
-
+#endif
+    uint32_t rv;
     switch (len)
     {
         case 1:
@@ -347,10 +347,11 @@ uint32_t MsixPciConfigRead(PPDMDEVINS pDevIns, PPCIDEVICE pDev, uint32_t u32Addr
             rv = PCIDevGetDWord(pDev, u32Address);
             break;
         default:
-            Assert(false);
+            AssertFailed();
+            rv = 0;
     }
 
     Log2(("MsixPciConfigRead: %d (%d) -> %x\n", iOff, len, rv));
-
     return rv;
 }
+
diff --git a/src/VBox/Devices/Bus/PCIInternal.h b/src/VBox/Devices/Bus/PCIInternal.h
index eba6a8a..b60bfa1 100644
--- a/src/VBox/Devices/Bus/PCIInternal.h
+++ b/src/VBox/Devices/Bus/PCIInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Bus/SrvPciRawR0.cpp b/src/VBox/Devices/Bus/SrvPciRawR0.cpp
index bc1577a..c3c160d 100644
--- a/src/VBox/Devices/Bus/SrvPciRawR0.cpp
+++ b/src/VBox/Devices/Bus/SrvPciRawR0.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -881,7 +881,7 @@ static int pcirawr0GetIrq(PSUPDRVSESSION    pSession,
             rc = RTSemEventWaitNoResume(pDev->hIrqEvent, iTimeout);
             if (RT_SUCCESS(rc))
             {
-                /** @todo: racy */
+                /** @todo racy */
                 if (!ASMAtomicReadBool(&pDev->fTerminate))
                 {
                     RTSpinlockAcquire(pDev->hSpinlock);
diff --git a/src/VBox/Devices/Config.kmk b/src/VBox/Devices/Config.kmk
index 1a862df..fc6a636 100644
--- a/src/VBox/Devices/Config.kmk
+++ b/src/VBox/Devices/Config.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -27,6 +27,11 @@ VBOX_PATH_DEVICES_SRC := $(PATH_ROOT)/src/VBox/Devices
 #
 # VBoxBios - Template for building 16-bit BIOS code.
 #
+# Disabled linker warnings:
+#   W1014: ?
+#   W1023: ?
+#   W2120: ?
+#   W1080: file F:\tinderbox\win-rel\out\win.amd64\release\obj\VBoxVgaBios386\vberom.obj is a 32-bit object file
 TEMPLATE_VBoxBios = ROM
 TEMPLATE_VBoxBios_INSTTYPE     = none
 TEMPLATE_VBoxBios_TOOL         = OPENWATCOM-16
@@ -43,7 +48,7 @@ TEMPLATE_VBoxBios_DEPS         = $(VBOX_VERSION_HEADER)
 TEMPLATE_VBoxBios_LDFLAGS      = system dos  \
 	debug codeview all \
 	option quiet, nofarcalls, map, verbose, statics, symfile \
-	disable 1014, 1023, 2120
+	disable 1014, 1023, 2120, 1080
 TEMPLATE_VBoxBios_LNK_DEPS = $(VBOX_BIOSSUMS) $(VBOX_PATH_DEVICES_SRC)/BiosCommonCode/biosorg_check.sed
 TEMPLATE_VBoxBios_POST_CMDS = \
  	$(QUIET)$(SED_EXT) -n -f $(VBOX_PATH_DEVICES_SRC)/BiosCommonCode/biosorg_check.sed $(outbase).map \
diff --git a/src/VBox/Devices/EFI/DevEFI.cpp b/src/VBox/Devices/EFI/DevEFI.cpp
index eb70e42..996b73f 100644
--- a/src/VBox/Devices/EFI/DevEFI.cpp
+++ b/src/VBox/Devices/EFI/DevEFI.cpp
@@ -53,7 +53,14 @@
 #include "../PC/DevFwCommon.h"
 
 /* EFI includes */
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable:4668)
+#endif
 #include <ProcessorBind.h>
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
 #include <Common/UefiBaseTypes.h>
 #include <Common/PiFirmwareVolume.h>
 #include <Common/PiFirmwareFile.h>
@@ -1049,6 +1056,7 @@ static bool efiInfoNvramIsUtf16(PCEFIVAR pEfiVar, bool *pfZeroTerm)
  */
 static DECLCALLBACK(void) efiInfoNvram(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
 {
+    RT_NOREF(pszArgs);
     PDEVEFI pThis = PDMINS_2_DATA(pDevIns, PDEVEFI);
     PDMCritSectEnter(pDevIns->pCritSectRoR3, VERR_IGNORED);
 
@@ -1199,7 +1207,7 @@ static uint8_t efiInfoNextByte(PDEVEFI pThis)
 
 
 #ifdef IN_RING3
-static void efiVBoxDbgScript(PDEVEFI pThis, const char *pszFormat, ...)
+static void efiVBoxDbgScript(const char *pszFormat, ...)
 {
 # ifdef DEVEFI_WITH_VBOXDBG_SCRIPT
     PRTSTREAM pStrm;
@@ -1212,6 +1220,8 @@ static void efiVBoxDbgScript(PDEVEFI pThis, const char *pszFormat, ...)
         va_end(va);
         RTStrmClose(pStrm);
     }
+# else
+    RT_NOREF(pszFormat);
 # endif
 }
 #endif /* IN_RING3 */
@@ -1228,6 +1238,7 @@ static void efiVBoxDbgScript(PDEVEFI pThis, const char *pszFormat, ...)
  */
 static int efiPortImageEventWrite(PDEVEFI pThis, uint32_t u32, unsigned cb)
 {
+    RT_NOREF(cb);
     switch (u32 & EFI_IMAGE_EVT_CMD_MASK)
     {
         case EFI_IMAGE_EVT_CMD_START_LOAD32:
@@ -1258,14 +1269,14 @@ static int efiPortImageEventWrite(PDEVEFI pThis, uint32_t u32, unsigned cb)
                         LogRel(("EFI: VBoxDbg> loadimage32 '%.*s.efi' %#llx LB %#llx\n",
                                 pThis->ImageEvt.offName - 4, pThis->ImageEvt.szName, pThis->ImageEvt.uAddr0, pThis->ImageEvt.cb0));
                         if (pThis->ImageEvt.offName > 4)
-                            efiVBoxDbgScript(pThis, "loadimage32 '%.*s.efi' %#llx\n",
+                            efiVBoxDbgScript("loadimage32 '%.*s.efi' %#llx\n",
                                              pThis->ImageEvt.offName - 4, pThis->ImageEvt.szName, pThis->ImageEvt.uAddr0);
                         break;
                     case EFI_IMAGE_EVT_CMD_START_LOAD64:
                         LogRel(("EFI: VBoxDbg> loadimage64 '%.*s.efi' %#llx LB %#llx\n",
                                 pThis->ImageEvt.offName - 4, pThis->ImageEvt.szName, pThis->ImageEvt.uAddr0, pThis->ImageEvt.cb0));
                         if (pThis->ImageEvt.offName > 4)
-                            efiVBoxDbgScript(pThis, "loadimage64 '%.*s.efi' %#llx\n",
+                            efiVBoxDbgScript("loadimage64 '%.*s.efi' %#llx\n",
                                              pThis->ImageEvt.offName - 4, pThis->ImageEvt.szName, pThis->ImageEvt.uAddr0);
                         break;
                     case EFI_IMAGE_EVT_CMD_START_UNLOAD32:
@@ -1276,7 +1287,7 @@ static int efiPortImageEventWrite(PDEVEFI pThis, uint32_t u32, unsigned cb)
                                 &pThis->ImageEvt.szName[pThis->ImageEvt.offNameLastComponent],
                                 pThis->ImageEvt.uAddr0, pThis->ImageEvt.cb0));
                         if (pThis->ImageEvt.offName > 4)
-                            efiVBoxDbgScript(pThis, "unload '%.*s.efi'\n",
+                            efiVBoxDbgScript("unload '%.*s.efi'\n",
                                              pThis->ImageEvt.offName - 4 - pThis->ImageEvt.offNameLastComponent,
                                              &pThis->ImageEvt.szName[pThis->ImageEvt.offNameLastComponent]);
                         break;
@@ -1341,6 +1352,7 @@ static int efiPortImageEventWrite(PDEVEFI pThis, uint32_t u32, unsigned cb)
  */
 static DECLCALLBACK(int) efiIOPortRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb)
 {
+    RT_NOREF(pvUser);
     PDEVEFI pThis = PDMINS_2_DATA(pDevIns, PDEVEFI);
     Log4(("EFI in: %x %x\n", Port, cb));
 
@@ -1426,6 +1438,7 @@ static const char *efiDbgPointName(EFIDBGPOINT enmDbgPoint)
  */
 static DECLCALLBACK(int) efiIOPortWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb)
 {
+    RT_NOREF(pvUser);
     PDEVEFI pThis = PDMINS_2_DATA(pDevIns, PDEVEFI);
     int     rc    = VINF_SUCCESS;
     Log4(("efi: out %x %x %d\n", Port, u32, cb));
@@ -1768,6 +1781,7 @@ static DECLCALLBACK(int) efiInitComplete(PPDMDEVINS pDevIns)
  */
 static DECLCALLBACK(void) efiMemSetup(PPDMDEVINS pDevIns, PDMDEVMEMSETUPCTX enmCtx)
 {
+    RT_NOREF(enmCtx);
     PDEVEFI pThis = PDMINS_2_DATA(pDevIns, PDEVEFI);
 
     /*
@@ -1894,6 +1908,8 @@ static DECLCALLBACK(int) efiDestruct(PPDMDEVINS pDevIns)
     return VINF_SUCCESS;
 }
 
+
+#if 0 /* unused */
 /**
  * Helper that searches for a FFS file of a given type.
  *
@@ -1907,7 +1923,7 @@ static DECLCALLBACK(int) efiDestruct(PPDMDEVINS pDevIns)
 DECLINLINE(EFI_FFS_FILE_HEADER const *)
 efiFwVolFindFileByType(EFI_FFS_FILE_HEADER const *pFfsFile, uint8_t const *pbEnd, EFI_FV_FILETYPE FileType, uint32_t *pcbFile)
 {
-#define FFS_SIZE(hdr)   RT_MAKE_U32_FROM_U8((hdr)->Size[0], (hdr)->Size[1], (hdr)->Size[2], 0)
+# define FFS_SIZE(hdr)   RT_MAKE_U32_FROM_U8((hdr)->Size[0], (hdr)->Size[1], (hdr)->Size[2], 0)
     while ((uintptr_t)pFfsFile < (uintptr_t)pbEnd)
     {
         if (pFfsFile->Type == FileType)
@@ -1918,9 +1934,10 @@ efiFwVolFindFileByType(EFI_FFS_FILE_HEADER const *pFfsFile, uint8_t const *pbEnd
         }
         pFfsFile = (EFI_FFS_FILE_HEADER *)((uintptr_t)pFfsFile + RT_ALIGN(FFS_SIZE(pFfsFile), 8));
     }
-#undef FFS_SIZE
+# undef FFS_SIZE
     return NULL;
 }
+#endif /* unused */
 
 
 /**
@@ -1953,7 +1970,6 @@ static int efiParseFirmware(PDEVEFI pThis)
 
     AssertLogRelMsgReturn(!(pThis->cbEfiRom & PAGE_OFFSET_MASK), ("%RX64\n", pThis->cbEfiRom), VERR_INVALID_PARAMETER);
 
-    uint8_t const * const pbFwVolEnd = pThis->pu8EfiRom + pFwVolHdr->FvLength;
     pThis->GCLoadAddress = UINT32_C(0xfffff000) - pThis->cbEfiRom + PAGE_SIZE;
 
     return VINF_SUCCESS;
@@ -1968,6 +1984,8 @@ static int efiParseFirmware(PDEVEFI pThis)
  */
 static int efiLoadRom(PDEVEFI pThis, PCFGMNODE pCfg)
 {
+    RT_NOREF(pCfg);
+
     /*
      * Read the entire firmware volume into memory.
      */
@@ -2103,9 +2121,10 @@ static int efiParseDeviceString(PDEVEFI pThis, const char *pszDeviceProps)
  */
 static DECLCALLBACK(int)  efiConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
 {
+    RT_NOREF(iInstance);
+    PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
     PDEVEFI     pThis = PDMINS_2_DATA(pDevIns, PDEVEFI);
     int         rc;
-    PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
 
     Assert(iInstance == 0);
 
diff --git a/src/VBox/Devices/EFI/DevEFI.h b/src/VBox/Devices/EFI/DevEFI.h
index 4a5cd82..b87e729 100644
--- a/src/VBox/Devices/EFI/DevEFI.h
+++ b/src/VBox/Devices/EFI/DevEFI.h
@@ -8,7 +8,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/DevSmc.cpp b/src/VBox/Devices/EFI/DevSmc.cpp
index 0783d41..e91722b 100644
--- a/src/VBox/Devices/EFI/DevSmc.cpp
+++ b/src/VBox/Devices/EFI/DevSmc.cpp
@@ -10,7 +10,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -370,7 +370,7 @@ static uint8_t  g_abOsk0And1[32+32];
  */
 static bool devR0SmcWaitHostState(uint8_t bState, const char *pszWhat)
 {
-    uint8_t bCurState;
+    uint8_t bCurState = 0; /* (MSC is potentially uninitialized) */
     for (uint32_t cMsSleep = 1; cMsSleep <= 64; cMsSleep <<= 1)
     {
         RTThreadSleep(cMsSleep);
@@ -487,6 +487,7 @@ PDMBOTHCBDECL(int) devR0SmcReqHandler(PPDMDEVINS pDevIns, uint32_t uOperation, u
 {
     PDEVSMC pThis = PDMINS_2_DATA(pDevIns, PDEVSMC);
     int     rc    = VERR_INVALID_FUNCTION;
+    RT_NOREF_PV(u64Arg);
 
     if (uOperation == SMC_CALLR0_READ_OSK)
     {
@@ -580,6 +581,7 @@ static int getSmcKeyOs(char *pabKey, uint32_t cbKey)
 /** @callback_method_impl{DEVSMCKEYGETTER, OSK0 and OSK1} */
 static uint8_t scmKeyGetOSKs(PDEVSMC pThis, PDEVSMCCURKEY pCurKey, uint8_t bCmd, PCDEVSMCKEYDESC pKeyDesc)
 {
+    RT_NOREF1(bCmd);
     Assert(SMC4CH_EQ(&pKeyDesc->Key, "OSK0") || SMC4CH_EQ(&pKeyDesc->Key, "OSK1"));
     const char *pszSrc = pThis->szOsk0And1;
     if (SMC4CH_EQ(&pKeyDesc->Key, "OSK1"))
@@ -592,6 +594,7 @@ static uint8_t scmKeyGetOSKs(PDEVSMC pThis, PDEVSMCCURKEY pCurKey, uint8_t bCmd,
 /** @callback_method_impl{DEVSMCKEYGETTER, \#KEY} */
 static uint8_t scmKeyGetKeyCount(PDEVSMC pThis, PDEVSMCCURKEY pCurKey, uint8_t bCmd, PCDEVSMCKEYDESC pKeyDesc)
 {
+    RT_NOREF3(pThis, bCmd, pKeyDesc);
     Assert(pKeyDesc == &g_aSmcKeys[SMC_KEYIDX_FIRST_ENUM]);
     uint32_t cKeys = RT_ELEMENTS(g_aSmcKeys) - SMC_KEYIDX_FIRST_ENUM;
     pCurKey->Value.u32 = RT_H2BE_U32(cKeys);
@@ -602,6 +605,7 @@ static uint8_t scmKeyGetKeyCount(PDEVSMC pThis, PDEVSMCCURKEY pCurKey, uint8_t b
 /** @callback_method_impl{DEVSMCKEYGETTER, REV - Source revision.} */
 static uint8_t scmKeyGetRevision(PDEVSMC pThis, PDEVSMCCURKEY pCurKey, uint8_t bCmd, PCDEVSMCKEYDESC pKeyDesc)
 {
+    RT_NOREF3(pThis, bCmd, pKeyDesc);
 #ifdef VBOX_WITH_SMC_2_x
     pCurKey->Value.ab[0] = 0x02;
     pCurKey->Value.ab[1] = 0x03;
@@ -625,6 +629,7 @@ static uint8_t scmKeyGetRevision(PDEVSMC pThis, PDEVSMCCURKEY pCurKey, uint8_t b
 /** @callback_method_impl{DEVSMCKEYGETTER, $Adr - SMC address.} */
 static uint8_t scmKeyGetDollarAddress(PDEVSMC pThis, PDEVSMCCURKEY pCurKey, uint8_t bCmd, PCDEVSMCKEYDESC pKeyDesc)
 {
+    RT_NOREF3(pThis, bCmd, pKeyDesc);
     pCurKey->Value.u32 = RT_H2BE_U32(SMC_PORT_FIRST);
     return VINF_SUCCESS;
 }
@@ -633,6 +638,7 @@ static uint8_t scmKeyGetDollarAddress(PDEVSMC pThis, PDEVSMCCURKEY pCurKey, uint
 /** @callback_method_impl{DEVSMCKEYGETTER, $Num - Some kind of number.} */
 static uint8_t scmKeyGetDollarNumber(PDEVSMC pThis, PDEVSMCCURKEY pCurKey, uint8_t bCmd, PCDEVSMCKEYDESC pKeyDesc)
 {
+    RT_NOREF2(bCmd, pKeyDesc);
     pCurKey->Value.ab[0] = pThis->bDollaryNumber;
     return VINF_SUCCESS;
 }
@@ -640,6 +646,7 @@ static uint8_t scmKeyGetDollarNumber(PDEVSMC pThis, PDEVSMCCURKEY pCurKey, uint8
 /** @callback_method_impl{DEVSMCKEYPUTTER, $Num - Some kind of number.} */
 static uint8_t scmKeyPutDollarNumber(PDEVSMC pThis, PCDEVSMCCURKEY pCurKey, uint8_t bCmd, PCDEVSMCKEYDESC pKeyDesc)
 {
+    RT_NOREF2(bCmd, pKeyDesc);
     Log(("scmKeyPutDollarNumber: %#x -> %#x\n", pThis->bDollaryNumber, pCurKey->Value.ab[0]));
     pThis->bDollaryNumber = pCurKey->Value.ab[0];
     return VINF_SUCCESS;
@@ -650,6 +657,7 @@ static uint8_t scmKeyPutDollarNumber(PDEVSMC pThis, PCDEVSMCCURKEY pCurKey, uint
 /** @callback_method_impl{DEVSMCKEYGETTER, MSSD - Machine Shutdown reason.} */
 static uint8_t scmKeyGetShutdownReason(PDEVSMC pThis, PDEVSMCCURKEY pCurKey, uint8_t bCmd, PCDEVSMCKEYDESC pKeyDesc)
 {
+    RT_NOREF2(bCmd, pKeyDesc);
     pCurKey->Value.ab[0] = pThis->bShutdownReason;
     return SMC_STATUS_CD_SUCCESS;
 }
@@ -658,6 +666,7 @@ static uint8_t scmKeyGetShutdownReason(PDEVSMC pThis, PDEVSMCCURKEY pCurKey, uin
 /** @callback_method_impl{DEVSMCKEYPUTTER, MSSD - Machine Shutdown reason.} */
 static uint8_t scmKeyPutShutdownReason(PDEVSMC pThis, PCDEVSMCCURKEY pCurKey, uint8_t bCmd, PCDEVSMCKEYDESC pKeyDesc)
 {
+    RT_NOREF2(bCmd, pKeyDesc);
     Log(("scmKeyPutShutdownReason: %#x -> %#x\n", pThis->bShutdownReason, pCurKey->Value.ab[0]));
     pThis->bShutdownReason = pCurKey->Value.ab[0];
     return SMC_STATUS_CD_SUCCESS;
@@ -667,6 +676,7 @@ static uint8_t scmKeyPutShutdownReason(PDEVSMC pThis, PCDEVSMCCURKEY pCurKey, ui
 /** @callback_method_impl{DEVSMCKEYGETTER, MSSD - Ninja timer action job.} */
 static uint8_t scmKeyGetNinjaTimerAction(PDEVSMC pThis, PDEVSMCCURKEY pCurKey, uint8_t bCmd, PCDEVSMCKEYDESC pKeyDesc)
 {
+    RT_NOREF2(bCmd, pKeyDesc);
     pCurKey->Value.ab[0] = pThis->bNinjaActionTimerJob;
     return SMC_STATUS_CD_SUCCESS;
 }
@@ -675,6 +685,7 @@ static uint8_t scmKeyGetNinjaTimerAction(PDEVSMC pThis, PDEVSMCCURKEY pCurKey, u
 /** @callback_method_impl{DEVSMCKEYPUTTER, NATJ - Ninja timer action job.} */
 static uint8_t scmKeyPutNinjaTimerAction(PDEVSMC pThis, PCDEVSMCCURKEY pCurKey, uint8_t bCmd, PCDEVSMCKEYDESC pKeyDesc)
 {
+    RT_NOREF2(bCmd, pKeyDesc);
     Log(("scmKeyPutNinjaTimerAction: %#x -> %#x\n", pThis->bNinjaActionTimerJob, pCurKey->Value.ab[0]));
     pThis->bNinjaActionTimerJob = pCurKey->Value.ab[0];
     return SMC_STATUS_CD_SUCCESS;
@@ -685,6 +696,7 @@ static uint8_t scmKeyPutNinjaTimerAction(PDEVSMC pThis, PCDEVSMCCURKEY pCurKey,
 /** @callback_method_impl{DEVSMCKEYGETTER, Generic one getter.} */
 static uint8_t scmKeyGetOne(PDEVSMC pThis, PDEVSMCCURKEY pCurKey, uint8_t bCmd, PCDEVSMCKEYDESC pKeyDesc)
 {
+    RT_NOREF2(pThis, bCmd);
     memset(&pCurKey->Value.ab[0], 0, pKeyDesc->cbValue);
     pCurKey->Value.ab[pKeyDesc->cbValue - 1] = 1;
     return SMC_STATUS_CD_SUCCESS;
@@ -695,6 +707,7 @@ static uint8_t scmKeyGetOne(PDEVSMC pThis, PDEVSMCCURKEY pCurKey, uint8_t bCmd,
 /** @callback_method_impl{DEVSMCKEYGETTER, Generic zero getter.} */
 static uint8_t scmKeyGetZero(PDEVSMC pThis, PDEVSMCCURKEY pCurKey, uint8_t bCmd, PCDEVSMCKEYDESC pKeyDesc)
 {
+    RT_NOREF2(pThis, bCmd);
     memset(&pCurKey->Value.ab[0], 0, pKeyDesc->cbValue);
     return SMC_STATUS_CD_SUCCESS;
 }
@@ -704,10 +717,9 @@ static uint8_t scmKeyGetZero(PDEVSMC pThis, PDEVSMCCURKEY pCurKey, uint8_t bCmd,
  * Looks up a key and copies its value and attributes into the CurKey.
  *
  * @returns Key index on success, UINT32_MAX on failure.
- * @param   pThis       The SMC instance data.
  * @param   uKeyValue   The key value (DEVSMC4CHID.u32).
  */
-static uint32_t smcKeyLookup(PDEVSMC pThis, uint32_t uKeyValue)
+static uint32_t smcKeyLookup(uint32_t uKeyValue)
 {
     uint32_t iKey = RT_ELEMENTS(g_aSmcKeys);
     while (iKey-- > 0)
@@ -729,7 +741,7 @@ static uint8_t smcKeyGetByName(PDEVSMC pThis)
 #ifdef LOG_ENABLED
     uint32_t const uKeyValueLog = RT_H2LE_U32(pThis->CurKey.Key.u32);
 #endif
-    uint32_t iKey = smcKeyLookup(pThis, pThis->CurKey.Key.u32);
+    uint32_t iKey = smcKeyLookup(pThis->CurKey.Key.u32);
     if (iKey != UINT32_MAX)
     {
         if (   g_aSmcKeys[iKey].cbValue == pThis->CurKey.cbValue
@@ -816,7 +828,7 @@ static uint8_t smcKeyGetAttrByName(PDEVSMC pThis)
 #ifdef LOG_ENABLED
     uint32_t const uKeyValueLog = RT_H2LE_U32(pThis->CurKey.Key.u32);
 #endif
-    uint32_t iKey = smcKeyLookup(pThis, pThis->CurKey.Key.u32);
+    uint32_t iKey = smcKeyLookup(pThis->CurKey.Key.u32);
     if (iKey != UINT32_MAX)
     {
         pThis->CurKey.Type    = g_aSmcKeys[iKey].Type;
@@ -849,11 +861,13 @@ static uint8_t smcKeyGetAttrByName(PDEVSMC pThis)
 
 static uint8_t smcKeyPutPrepare(PDEVSMC pThis)
 {
+    RT_NOREF1(pThis);
     return 0;
 }
 
 static uint8_t smcKeyPutValue(PDEVSMC pThis)
 {
+    RT_NOREF1(pThis);
     return 0;
 }
 
@@ -867,6 +881,7 @@ static uint8_t smcKeyPutValue(PDEVSMC pThis)
  */
 static int smcRegData_r(PDEVSMC pThis, uint8_t uReg, uint8_t *pbValue)
 {
+    RT_NOREF1(uReg);
     switch (pThis->bCmd)
     {
         case SMC_CMD_GET_KEY_VALUE:
@@ -956,6 +971,7 @@ static int smcRegData_r(PDEVSMC pThis, uint8_t uReg, uint8_t *pbValue)
  */
 static int smcRegData_w(PDEVSMC pThis, uint8_t uReg, uint8_t bValue)
 {
+    RT_NOREF1(uReg);
     switch (pThis->bCmd)
     {
         /*
@@ -1141,6 +1157,7 @@ static int smcRegGen_r(PDEVSMC pThis, uint8_t uReg, uint8_t *pbValue)
  */
 static int smcRegFF_w(PDEVSMC pThis, uint8_t uReg, uint8_t bValue)
 {
+    RT_NOREF3(pThis, uReg, bValue);
     Log(("SMC: %#04x: Writing %#x to unknown register!\n", uReg, bValue));
     return VINF_SUCCESS;
 }
@@ -1155,6 +1172,7 @@ static int smcRegFF_w(PDEVSMC pThis, uint8_t uReg, uint8_t bValue)
  */
 static int smcRegFF_r(PDEVSMC pThis, uint8_t uReg, uint8_t *pbValue)
 {
+    RT_NOREF2(pThis, uReg);
     Log(("SMC: %#04x: Reading from unknown register!\n", uReg));
     *pbValue = 0xff;
     return VINF_SUCCESS;
@@ -1258,6 +1276,7 @@ static const struct
 /** @callback_method_impl{FNIOMIOPORTOUT} */
 PDMBOTHCBDECL(int) smcIoPortWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb)
 {
+    RT_NOREF1(pvUser);
 #ifndef IN_RING3
     if (cb > 1)
         return VINF_IOM_R3_IOPORT_WRITE;
@@ -1299,6 +1318,7 @@ PDMBOTHCBDECL(int) smcIoPortWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Por
 /** @callback_method_impl{FNIOMIOPORTIN} */
 PDMBOTHCBDECL(int) smcIoPortRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb)
 {
+    RT_NOREF1(pvUser);
 #ifndef IN_RING3
     if (cb > 1)
         return VINF_IOM_R3_IOPORT_READ;
@@ -1350,6 +1370,7 @@ PDMBOTHCBDECL(int) smcIoPortRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port
 static DECLCALLBACK(int) smcSaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
 {
     PDEVSMC pThis = PDMINS_2_DATA(pDevIns, PDEVSMC);
+    RT_NOREF2(pSSM, pThis);
 
     /** @todo */
 
@@ -1362,10 +1383,13 @@ static DECLCALLBACK(int) smcLoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32
 {
     PDEVSMC pThis = PDMINS_2_DATA(pDevIns, PDEVSMC);
     Assert(uPass == SSM_PASS_FINAL); NOREF(uPass);
+    RT_NOREF2(pSSM, pThis);
 
     /* Fend off unsupported versions. */
     if (   uVersion != SMC_SAVED_STATE_VERSION
+#if SMC_SAVED_STATE_VERSION != SMC_SAVED_STATE_VERSION_BAKA
         && uVersion != SMC_SAVED_STATE_VERSION_BAKA
+#endif
         && uVersion != SMC_SAVED_STATE_VERSION_BAKA + 1)
         return VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION;
 
@@ -1386,6 +1410,7 @@ static DECLCALLBACK(int) smcLoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32
  */
 static DECLCALLBACK(int)  smcConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
 {
+    RT_NOREF1(iInstance);
     PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
     PDEVSMC pThis = PDMINS_2_DATA(pDevIns, PDEVSMC);
     Assert(iInstance == 0);
diff --git a/src/VBox/Devices/EFI/Firmware/AppPkg/Applications/Python/PyMod-2.7.2/Modules/errnomodule.c b/src/VBox/Devices/EFI/Firmware/AppPkg/Applications/Python/PyMod-2.7.2/Modules/errnomodule.c
index 669a935..330ed78 100644
--- a/src/VBox/Devices/EFI/Firmware/AppPkg/Applications/Python/PyMod-2.7.2/Modules/errnomodule.c
+++ b/src/VBox/Devices/EFI/Firmware/AppPkg/Applications/Python/PyMod-2.7.2/Modules/errnomodule.c
@@ -15,7 +15,11 @@
 
 /* Windows socket errors (WSA*)  */
 #ifdef MS_WINDOWS
+# ifdef VBOX
+#  include <iprt/win/windows.h>
+# else
 #include <windows.h>
+# endif
 #endif
 
 /*
diff --git a/src/VBox/Devices/EFI/Firmware/AppPkg/Applications/Python/PyMod-2.7.2/Python/import.c b/src/VBox/Devices/EFI/Firmware/AppPkg/Applications/Python/PyMod-2.7.2/Python/import.c
index 2ec0dd3..b595bdc 100644
--- a/src/VBox/Devices/EFI/Firmware/AppPkg/Applications/Python/PyMod-2.7.2/Python/import.c
+++ b/src/VBox/Devices/EFI/Firmware/AppPkg/Applications/Python/PyMod-2.7.2/Python/import.c
@@ -1558,7 +1558,11 @@ PyAPI_FUNC(int) _PyImport_IsScript(struct filedescr * fd)
  * of #if's here should match the sequence in the body of case_ok().
  */
 #if defined(MS_WINDOWS)
+# ifdef VBOX
+#  include <iprt/win/windows.h>
+# else
 #include <windows.h>
+# endif
 
 #elif defined(DJGPP)
 #include <dir.h>
diff --git a/src/VBox/Devices/EFI/Firmware/BaseTools/Makefile.kmk b/src/VBox/Devices/EFI/Firmware/BaseTools/Makefile.kmk
index ff4f39f..09e036b 100644
--- a/src/VBox/Devices/EFI/Firmware/BaseTools/Makefile.kmk
+++ b/src/VBox/Devices/EFI/Firmware/BaseTools/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2013-2015 Oracle Corporation
+# Copyright (C) 2013-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/BootSectImage/Makefile.kmk b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/BootSectImage/Makefile.kmk
index 555dcb7..99a40d8 100644
--- a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/BootSectImage/Makefile.kmk
+++ b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/BootSectImage/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2013-2015 Oracle Corporation
+# Copyright (C) 2013-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/Common/Makefile.kmk b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/Common/Makefile.kmk
index 8518118..5bc88a9 100644
--- a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/Common/Makefile.kmk
+++ b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/Common/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2013-2015 Oracle Corporation
+# Copyright (C) 2013-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/Common/WinNtInclude.h b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/Common/WinNtInclude.h
index 938f983..17e92b9 100644
--- a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/Common/WinNtInclude.h
+++ b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/Common/WinNtInclude.h
@@ -19,11 +19,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define _LIST_ENTRY  _WINNT_DUP_LIST_ENTRY_FORWARD
 #define LIST_ENTRY   _WINNT_DUP_LIST_ENTRY
 
+#ifndef VBOX
 #if (_MSC_VER < 1800)
 #define InterlockedIncrement _WINNT_DUP_InterlockedIncrement
 #define InterlockedDecrement _WINNT_DUP_InterlockedDecrement
 #define InterlockedCompareExchange64 _WINNT_DUP_InterlockedCompareExchange64
 #endif
+#endif
 
 #undef UNALIGNED
 #undef CONST
@@ -33,7 +35,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 # ifdef VBOX
 #  define RUNTIME_FUNCTION _WINNT_DUP_RUNTIME_FUNCTION
 # endif
+#ifdef VBOX
+#include <iprt/win/windows.h>
+#else
 #include "windows.h"
+#endif
 
 //
 // Win32 include files do not compile clean with /W4, so we use the warning
diff --git a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/EfiLdrImage/Makefile.kmk b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/EfiLdrImage/Makefile.kmk
index 1aa62c9..861352f 100644
--- a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/EfiLdrImage/Makefile.kmk
+++ b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/EfiLdrImage/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2013-2015 Oracle Corporation
+# Copyright (C) 2013-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/EfiRom/Makefile.kmk b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/EfiRom/Makefile.kmk
index 236691b..823256b 100644
--- a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/EfiRom/Makefile.kmk
+++ b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/EfiRom/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2013-2015 Oracle Corporation
+# Copyright (C) 2013-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenBootSector/GenBootSector.c b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenBootSector/GenBootSector.c
index a60efdf..2254d21 100644
--- a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenBootSector/GenBootSector.c
+++ b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenBootSector/GenBootSector.c
@@ -15,7 +15,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 
 **/
 
+#ifdef VBOX
+# include <iprt/win/windows.h>
+#else
 #include <windows.h>
+#endif
 #include <stdio.h>
 #include <string.h>
 #include <Common/UefiBaseTypes.h>
diff --git a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenCrc32/Makefile.kmk b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenCrc32/Makefile.kmk
index 45e3083..f3d273c 100644
--- a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenCrc32/Makefile.kmk
+++ b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenCrc32/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2013-2015 Oracle Corporation
+# Copyright (C) 2013-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenFfs/Makefile.kmk b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenFfs/Makefile.kmk
index be2e727..02571d5 100644
--- a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenFfs/Makefile.kmk
+++ b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenFfs/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2013-2015 Oracle Corporation
+# Copyright (C) 2013-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenFv/Makefile.kmk b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenFv/Makefile.kmk
index ee5a0ee..da4b13e 100644
--- a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenFv/Makefile.kmk
+++ b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenFv/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2013-2015 Oracle Corporation
+# Copyright (C) 2013-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenFw/Makefile.kmk b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenFw/Makefile.kmk
index 3b86dee..598a1ff 100644
--- a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenFw/Makefile.kmk
+++ b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenFw/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2013-2015 Oracle Corporation
+# Copyright (C) 2013-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenPage/Makefile.kmk b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenPage/Makefile.kmk
index 053f13a..423153c 100644
--- a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenPage/Makefile.kmk
+++ b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenPage/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2013-2015 Oracle Corporation
+# Copyright (C) 2013-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenSec/Makefile.kmk b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenSec/Makefile.kmk
index f907564..c8de868 100644
--- a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenSec/Makefile.kmk
+++ b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenSec/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2013-2015 Oracle Corporation
+# Copyright (C) 2013-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenVtf/Makefile.kmk b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenVtf/Makefile.kmk
index c86bfaf..5190252 100644
--- a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenVtf/Makefile.kmk
+++ b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenVtf/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2013-2015 Oracle Corporation
+# Copyright (C) 2013-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GnuGenBootSector/Makefile.kmk b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GnuGenBootSector/Makefile.kmk
index 0ae8b5d..a26ac04 100644
--- a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GnuGenBootSector/Makefile.kmk
+++ b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GnuGenBootSector/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2013-2015 Oracle Corporation
+# Copyright (C) 2013-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/LzmaCompress/Makefile.kmk b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/LzmaCompress/Makefile.kmk
index 83e8899..29719f9 100644
--- a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/LzmaCompress/Makefile.kmk
+++ b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/LzmaCompress/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2013-2015 Oracle Corporation
+# Copyright (C) 2013-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/LzmaCompress/Sdk/C/7zFile.h b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/LzmaCompress/Sdk/C/7zFile.h
index fbef683..3bdfb4b 100644
--- a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/LzmaCompress/Sdk/C/7zFile.h
+++ b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/LzmaCompress/Sdk/C/7zFile.h
@@ -9,7 +9,11 @@
 #endif
 
 #ifdef USE_WINDOWS_FILE
+# ifdef VBOX
+#  include <iprt/win/windows.h>
+# else
 #include <windows.h>
+# endif
 #else
 #include <stdio.h>
 #endif
diff --git a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/LzmaCompress/Sdk/C/Alloc.c b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/LzmaCompress/Sdk/C/Alloc.c
index 152b623..e62c10e 100644
--- a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/LzmaCompress/Sdk/C/Alloc.c
+++ b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/LzmaCompress/Sdk/C/Alloc.c
@@ -4,7 +4,11 @@ Igor Pavlov
 Public domain */
 
 #ifdef _WIN32
+# ifdef VBOX
+#  include <iprt/win/windows.h>
+# else
 #include <windows.h>
+# endif
 #endif
 #include <stdlib.h>
 
diff --git a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/LzmaCompress/Sdk/C/Types.h b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/LzmaCompress/Sdk/C/Types.h
index 1af5cfc..01db4ea 100644
--- a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/LzmaCompress/Sdk/C/Types.h
+++ b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/LzmaCompress/Sdk/C/Types.h
@@ -7,7 +7,11 @@
 #include <stddef.h>
 
 #ifdef _WIN32
+# ifdef VBOX
+#  include <iprt/win/windows.h>
+# else
 #include <windows.h>
+# endif
 #endif
 
 #define SZ_OK 0
diff --git a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/Makefile.kmk b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/Makefile.kmk
index 42280e5..9b65095 100644
--- a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/Makefile.kmk
+++ b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2013-2015 Oracle Corporation
+# Copyright (C) 2013-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/PyUtility/PyUtility.c b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/PyUtility/PyUtility.c
index 92f39a6..c46af84 100644
--- a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/PyUtility/PyUtility.c
+++ b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/PyUtility/PyUtility.c
@@ -13,7 +13,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 **/
 
 #include <Python.h>
+# ifdef VBOX
+#  include <iprt/win/windows.h>
+# else
 #include <Windows.h>
+# endif
 #include <Common/UefiBaseTypes.h>
 
 /*
diff --git a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/Split/Makefile.kmk b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/Split/Makefile.kmk
index 1460285..5b0a3f5 100644
--- a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/Split/Makefile.kmk
+++ b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/Split/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2013-2015 Oracle Corporation
+# Copyright (C) 2013-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/TianoCompress/Makefile.kmk b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/TianoCompress/Makefile.kmk
index 12919c3..954b012 100644
--- a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/TianoCompress/Makefile.kmk
+++ b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/TianoCompress/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2013-2015 Oracle Corporation
+# Copyright (C) 2013-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/VfrCompile/Makefile.kmk b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/VfrCompile/Makefile.kmk
index 6124cf3..25caa51 100644
--- a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/VfrCompile/Makefile.kmk
+++ b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/VfrCompile/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2013-2015 Oracle Corporation
+# Copyright (C) 2013-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/VfrCompile/Pccts/antlr/fset2.c b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/VfrCompile/Pccts/antlr/fset2.c
index d0c59e2..4929c1f 100644
--- a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/VfrCompile/Pccts/antlr/fset2.c
+++ b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/VfrCompile/Pccts/antlr/fset2.c
@@ -63,7 +63,7 @@ static int tmember_of_context(Tree *, Predicate *);
 static int tmember_of_context();
 #endif
 
-#if TREE_DEBUG
+#ifdef TREE_DEBUG /* VBox: +def */
 set     set_of_tnodes_in_use;
 int     stop_on_tnode_seq_number=(-1);     /* (-1) to disable */
 #endif
diff --git a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/VfrCompile/Pccts/antlr/hash.c b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/VfrCompile/Pccts/antlr/hash.c
index 538fd55..787cf65 100644
--- a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/VfrCompile/Pccts/antlr/hash.c
+++ b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/VfrCompile/Pccts/antlr/hash.c
@@ -38,6 +38,9 @@
  */
 
 #include <stdio.h>
+#ifdef VBOX
+# include <iprt/stdint.h> /* for intptr.h */
+#endif
 #include "pcctscfg.h"
 #include "hash.h"
 
@@ -132,7 +135,7 @@ char *key;
 	char *p=key;
 	Entry *q;
 /*	require(table!=NULL && key!=NULL, "get: invalid table and/or key");*/
-	if ( !(table!=NULL && key!=NULL) ) *((char *) 34) = 3;
+	if ( !(table!=NULL && key!=NULL) ) *((char *)(/*vbox:*/ intptr_t) 34) = 3;
 
 	Hash(p,h,size);
 	for (q = table[h]; q != NULL; q = q->next)
diff --git a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/VfrCompile/Pccts/dlg/automata.c b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/VfrCompile/Pccts/dlg/automata.c
index c8ece5e..a80dfef 100644
--- a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/VfrCompile/Pccts/dlg/automata.c
+++ b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/VfrCompile/Pccts/dlg/automata.c
@@ -190,7 +190,7 @@ clear_hash()
 		dfa_hash[i] = 0;
 }
 
-#if HASH_STAT
+#ifdef HASH_STAT /* VBox: 'def' */
 void
 #ifdef __USE_PROTOS
 fprint_hash_stats(FILE *f)
diff --git a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/VolInfo/Makefile.kmk b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/VolInfo/Makefile.kmk
index 22a5a88..7a3db86 100644
--- a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/VolInfo/Makefile.kmk
+++ b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/VolInfo/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2013-2015 Oracle Corporation
+# Copyright (C) 2013-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/Makefile.kmk b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/Makefile.kmk
index 3742cfb..7e9ddab 100644
--- a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/Makefile.kmk
+++ b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2013-2015 Oracle Corporation
+# Copyright (C) 2013-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/Config.kmk b/src/VBox/Devices/EFI/Firmware/Config.kmk
index 8f8cee9..dfd9801 100644
--- a/src/VBox/Devices/EFI/Firmware/Config.kmk
+++ b/src/VBox/Devices/EFI/Firmware/Config.kmk
@@ -7,7 +7,7 @@
 #
 
 #
-# Copyright (C) 2013-2015 Oracle Corporation
+# Copyright (C) 2013-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -75,6 +75,28 @@ TEMPLATE_VBoxEfiBldProg = EFI build program.
 TEMPLATE_VBoxEfiBldProg_EXTENDS = VBoxBldProg
 TEMPLATE_VBoxEfiBldProg_INST = EfiBldProgs/
 TEMPLATE_VBoxEfiBldProg_INSTTYPE = stage
+TEMPLATE_VBoxEfiBldProg_DEFS.win = $(TEMPLATE_VBoxBldProg_DEFS.win) \
+	__STDC_VERSION__=199409L
+TEMPLATE_VBoxEfiBldProg_CFLAGS.win  = $(TEMPLATE_VBoxBldProg_CFLAGS.win)
+TEMPLATE_VBoxEfiBldProg_CFLAGS.win += -wd4100 # warning C4100: '_text' : unreferenced formal parameter
+TEMPLATE_VBoxEfiBldProg_CFLAGS.win += -wd4189 # warning C4189: 'zzpf' : local variable is initialized but not referenced
+TEMPLATE_VBoxEfiBldProg_CFLAGS.win += -wd4255 # warning C4255: 'AllocateMemory' : no function prototype given: converting '()' to '(void)'
+TEMPLATE_VBoxEfiBldProg_CFLAGS.win += -wd4267 # warning C4267: '=' : conversion from 'size_t' to 'UINT32', possible loss of data
+TEMPLATE_VBoxEfiBldProg_CFLAGS.win += -wd4287 # warning C4287: '>' : unsigned/negative constant mismatch
+TEMPLATE_VBoxEfiBldProg_CFLAGS.win += -wd4334 # warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
+TEMPLATE_VBoxEfiBldProg_CFLAGS.win += -wd4555 # warning C4555: expression has no effect; expected expression with side-effect
+TEMPLATE_VBoxEfiBldProg_CFLAGS.win += -wd4701 # warning C4701: potentially uninitialized local variable 'save_line' used
+TEMPLATE_VBoxEfiBldProg_CFLAGS.win += -wd4702 # warning C4702: unreachable code
+TEMPLATE_VBoxEfiBldProg_CXXFLAGS.win  = $(TEMPLATE_VBoxBldProg_CXXFLAGS.win)
+TEMPLATE_VBoxEfiBldProg_CXXFLAGS.win += -wd4101 # warning C4101: 'LineBuf' : unreferenced local variable
+TEMPLATE_VBoxEfiBldProg_CXXFLAGS.win += -wd4102 # warning C4102: 'fail' : unreferenced labe
+TEMPLATE_VBoxEfiBldProg_CXXFLAGS.win += -wd4189 # warning C4189: 'zzpf' : local variable is initialized but not referenced
+TEMPLATE_VBoxEfiBldProg_CXXFLAGS.win += -wd4267 # warning C4267: '=' : conversion from 'size_t' to 'UINT32', possible loss of data
+TEMPLATE_VBoxEfiBldProg_CXXFLAGS.win += -wd4370 # warning C4370: 'ANTLRParser' : layout of class has changed from a previous version of the compiler due to better packing
+TEMPLATE_VBoxEfiBldProg_CXXFLAGS.win += -wd4555 # warning C4555: expression has no effect; expected expression with side-effect
+TEMPLATE_VBoxEfiBldProg_CXXFLAGS.win += -wd4701 # warning C4701: potentially uninitialized local variable 'save_line' used
+TEMPLATE_VBoxEfiBldProg_CXXFLAGS.win += -wd4702 # warning C4702: unreachable code
+
 TEMPLATE_VBoxEfiBldProg_INCS = $(TEMPLATE_VBoxBldProg_INCS) \
 	$(VBOX_PATH_EFI_FIRMWARE)/BaseTools/Source/C/Include/IndustryStandard \
 	$(VBOX_PATH_EFI_FIRMWARE)/BaseTools/Source/C/Common \
diff --git a/src/VBox/Devices/EFI/Firmware/EfiModules.kmk b/src/VBox/Devices/EFI/Firmware/EfiModules.kmk
index 4a9ad55..b9dd7b7 100644
--- a/src/VBox/Devices/EFI/Firmware/EfiModules.kmk
+++ b/src/VBox/Devices/EFI/Firmware/EfiModules.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2013-2015 Oracle Corporation
+# Copyright (C) 2013-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/Types.h b/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/Types.h
index 06c4700..bea7c84 100644
--- a/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/Types.h
+++ b/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/Types.h
@@ -28,7 +28,11 @@
 #include <stddef.h>
 
 #ifdef _WIN32
+# ifdef VBOX
+#  include <iprt/win/windows.h>
+# else
 #include <windows.h>
+# endif
 #endif
 
 #endif
diff --git a/src/VBox/Devices/EFI/Firmware/Makefile.kmk b/src/VBox/Devices/EFI/Firmware/Makefile.kmk
index ce75f8d..2181df7 100644
--- a/src/VBox/Devices/EFI/Firmware/Makefile.kmk
+++ b/src/VBox/Devices/EFI/Firmware/Makefile.kmk
@@ -7,7 +7,7 @@
 #
 
 #
-# Copyright (C) 2013-2015 Oracle Corporation
+# Copyright (C) 2013-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/Types.h b/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/Types.h
index 06c4700..bea7c84 100644
--- a/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/Types.h
+++ b/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/Types.h
@@ -28,7 +28,11 @@
 #include <stddef.h>
 
 #ifdef _WIN32
+# ifdef VBOX
+#  include <iprt/win/windows.h>
+# else
 #include <windows.h>
+# endif
 #endif
 
 #endif
diff --git a/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Disk/PartitionDxe/Apple.c b/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Disk/PartitionDxe/Apple.c
index a291aeb..2b87a2e 100644
--- a/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Disk/PartitionDxe/Apple.c
+++ b/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Disk/PartitionDxe/Apple.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/OvmfPkg/OvmfPkgIa32.dsc b/src/VBox/Devices/EFI/Firmware/OvmfPkg/OvmfPkgIa32.dsc
index c916178..2926cb0 100644
--- a/src/VBox/Devices/EFI/Firmware/OvmfPkg/OvmfPkgIa32.dsc
+++ b/src/VBox/Devices/EFI/Firmware/OvmfPkg/OvmfPkgIa32.dsc
@@ -335,10 +335,6 @@
 !if $(SECURE_BOOT_ENABLE) == TRUE
   gUefiOvmfPkgTokenSpaceGuid.PcdSecureBootEnable|TRUE
 !endif
-!ifdef $(VBOX)
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeReplayIn|FALSE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE
-!endif
 
 [PcdsFixedAtBuild]
   gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1
diff --git a/src/VBox/Devices/EFI/Firmware/OvmfPkg/OvmfPkgX64.dsc b/src/VBox/Devices/EFI/Firmware/OvmfPkg/OvmfPkgX64.dsc
index 1f2fcc1..3325875 100644
--- a/src/VBox/Devices/EFI/Firmware/OvmfPkg/OvmfPkgX64.dsc
+++ b/src/VBox/Devices/EFI/Firmware/OvmfPkg/OvmfPkgX64.dsc
@@ -339,10 +339,6 @@
 !if $(SECURE_BOOT_ENABLE) == TRUE
   gUefiOvmfPkgTokenSpaceGuid.PcdSecureBootEnable|TRUE
 !endif
-!ifdef $(VBOX)
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeReplayIn|FALSE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE
-!endif
 
 [PcdsFixedAtBuild]
   gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Include/IndustryStandard/VBoxFatImage.h b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Include/IndustryStandard/VBoxFatImage.h
index 7b737bf..ad9ef6e 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Include/IndustryStandard/VBoxFatImage.h
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Include/IndustryStandard/VBoxFatImage.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Include/VBoxDebugLib.h b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Include/VBoxDebugLib.h
index 4ff5334..377aa9a 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Include/VBoxDebugLib.h
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Include/VBoxDebugLib.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Include/VBoxMemLayout.h b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Include/VBoxMemLayout.h
index 539e734..7db09fa 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Include/VBoxMemLayout.h
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Include/VBoxMemLayout.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Include/VBoxPkg.h b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Include/VBoxPkg.h
index a227235..937eb06 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Include/VBoxPkg.h
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Include/VBoxPkg.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugAgentLib/VBoxDebugAgentLib.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugAgentLib/VBoxDebugAgentLib.c
index 9da890f..a146fcb 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugAgentLib/VBoxDebugAgentLib.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugAgentLib/VBoxDebugAgentLib.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugAgentLib/VBoxDebugAgentLib.inf b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugAgentLib/VBoxDebugAgentLib.inf
index 626f39c..3168367 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugAgentLib/VBoxDebugAgentLib.inf
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugAgentLib/VBoxDebugAgentLib.inf
@@ -5,7 +5,7 @@
 #
 
 #
-# Copyright (C) 2013-2015 Oracle Corporation
+# Copyright (C) 2013-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.c
index 0de3b16..e2821b6 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.inf b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.inf
index 7bb99d3..a017429 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.inf
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.inf
@@ -5,7 +5,7 @@
 
 
 #
-# Copyright (C) 2009-2015 Oracle Corporation
+# Copyright (C) 2009-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxPrintChar.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxPrintChar.c
index 2aea3f1..e23cb69 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxPrintChar.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxPrintChar.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxPrintGuid.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxPrintGuid.c
index 4144fec..37cf0ad 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxPrintGuid.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxPrintGuid.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxPrintHex.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxPrintHex.c
index 011520b..eeef766 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxPrintHex.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxPrintHex.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxPrintHexDump.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxPrintHexDump.c
index 359f260..5946106 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxPrintHexDump.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxPrintHexDump.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxPrintString.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxPrintString.c
index adc5b0c..e918400 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxPrintString.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxPrintString.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxOemHookStatusCodeLib/VBoxOemHookStatusCodeLib.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxOemHookStatusCodeLib/VBoxOemHookStatusCodeLib.c
index 334a71a..ee81d17 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxOemHookStatusCodeLib/VBoxOemHookStatusCodeLib.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxOemHookStatusCodeLib/VBoxOemHookStatusCodeLib.c
@@ -5,7 +5,7 @@
 
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxOemHookStatusCodeLib/VBoxOemHookStatusCodeLib.inf b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxOemHookStatusCodeLib/VBoxOemHookStatusCodeLib.inf
index 01a738f..15b469e 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxOemHookStatusCodeLib/VBoxOemHookStatusCodeLib.inf
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxOemHookStatusCodeLib/VBoxOemHookStatusCodeLib.inf
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2009-2015 Oracle Corporation
+# Copyright (C) 2009-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxPeCoffExtraActionLib/VBoxPeCoffExtraActionLib.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxPeCoffExtraActionLib/VBoxPeCoffExtraActionLib.c
index 30625f0..a5fe6a2 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxPeCoffExtraActionLib/VBoxPeCoffExtraActionLib.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxPeCoffExtraActionLib/VBoxPeCoffExtraActionLib.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxPeCoffExtraActionLib/VBoxPeCoffExtraActionLib.inf b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxPeCoffExtraActionLib/VBoxPeCoffExtraActionLib.inf
index cdee7e9..9bb62f8 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxPeCoffExtraActionLib/VBoxPeCoffExtraActionLib.inf
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxPeCoffExtraActionLib/VBoxPeCoffExtraActionLib.inf
@@ -5,7 +5,7 @@
 #
 
 #
-# Copyright (C) 2013-2015 Oracle Corporation
+# Copyright (C) 2013-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxPeCoffLib/BasePeCoff.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxPeCoffLib/BasePeCoff.c
index c29ceaf..2664d0e 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxPeCoffLib/BasePeCoff.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxPeCoffLib/BasePeCoff.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxPeCoffLib/BasePeCoffLibInternals.h b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxPeCoffLib/BasePeCoffLibInternals.h
index 485ef5b..9eb23da 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxPeCoffLib/BasePeCoffLibInternals.h
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxPeCoffLib/BasePeCoffLibInternals.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxPeCoffLib/PeCoffLoaderEx.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxPeCoffLib/PeCoffLoaderEx.c
index 24d0a3c..2ea1d23 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxPeCoffLib/PeCoffLoaderEx.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxPeCoffLib/PeCoffLoaderEx.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxPeCoffLib/VBoxPeCoffLib.inf b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxPeCoffLib/VBoxPeCoffLib.inf
index d014799..cf75cd7 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxPeCoffLib/VBoxPeCoffLib.inf
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxPeCoffLib/VBoxPeCoffLib.inf
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2010-2015 Oracle Corporation
+# Copyright (C) 2010-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxAppleSim/Console.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxAppleSim/Console.c
index b1b9a14..bd9c11d 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxAppleSim/Console.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxAppleSim/Console.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxAppleSim/ConsoleControl.h b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxAppleSim/ConsoleControl.h
index d53a217..3a89cd4 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxAppleSim/ConsoleControl.h
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxAppleSim/ConsoleControl.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxAppleSim/Cpu.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxAppleSim/Cpu.c
index 1cbb2d0..e000b91 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxAppleSim/Cpu.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxAppleSim/Cpu.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxAppleSim/VBoxAppleSim.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxAppleSim/VBoxAppleSim.c
index ac254b0..d284c5b 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxAppleSim/VBoxAppleSim.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxAppleSim/VBoxAppleSim.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxAppleSim/VBoxAppleSim.inf b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxAppleSim/VBoxAppleSim.inf
index c26c55a..8341e53 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxAppleSim/VBoxAppleSim.inf
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxAppleSim/VBoxAppleSim.inf
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2010-2015 Oracle Corporation
+# Copyright (C) 2010-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/VBoxFsDxe.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/VBoxFsDxe.c
index 87ac999..110ffb3 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/VBoxFsDxe.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/VBoxFsDxe.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/VBoxFsDxe.inf b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/VBoxFsDxe.inf
index c82d046..38986e1 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/VBoxFsDxe.inf
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/VBoxFsDxe.inf
@@ -8,7 +8,7 @@
 #
 
 #
-# Copyright (C) 2010-2015 Oracle Corporation
+# Copyright (C) 2010-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/VBoxFswParam.h b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/VBoxFswParam.h
index ccca971..56682b4 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/VBoxFswParam.h
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/VBoxFswParam.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/VBoxHfs.inf b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/VBoxHfs.inf
index 53c4f6b..fe3ec4a 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/VBoxHfs.inf
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/VBoxHfs.inf
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2010-2015 Oracle Corporation
+# Copyright (C) 2010-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/VBoxIso9660.inf b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/VBoxIso9660.inf
index 0638afc..25d828d 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/VBoxIso9660.inf
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/VBoxIso9660.inf
@@ -3,7 +3,7 @@
 # VBox ISO9660 FS driver
 
 #
-# Copyright (C) 2010-2015 Oracle Corporation
+# Copyright (C) 2010-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_base.h b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_base.h
index 4678c98..0f408c9 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_base.h
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_base.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_core.h b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_core.h
index beb092d..5393027 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_core.h
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_core.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_efi.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_efi.c
index fc5ab16..3ec352c 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_efi.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_efi.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_efi.h b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_efi.h
index b317a20..dae52dd 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_efi.h
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_efi.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_efi_base.h b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_efi_base.h
index ae0f46b..f1c0911 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_efi_base.h
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_efi_base.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_efi_lib.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_efi_lib.c
index b8f4398..c5b0654 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_efi_lib.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_efi_lib.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_hfs.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_hfs.c
index 3cf1047..52d90bb 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_hfs.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_hfs.c
@@ -13,7 +13,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_hfs.h b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_hfs.h
index 40ff21d..85ba34e 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_hfs.h
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_hfs.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_iso9660.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_iso9660.c
index 3324baf..4de2b59 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_iso9660.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_iso9660.c
@@ -14,7 +14,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_lib.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_lib.c
index e7c471b..2f03027 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_lib.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_lib.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_strfunc.h b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_strfunc.h
index dd92b27..5fac6da 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_strfunc.h
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_strfunc.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/BootService.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/BootService.c
index d111997..ecc3bff 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/BootService.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/BootService.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/RunTime.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/RunTime.c
index 48f6aae..b893a94 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/RunTime.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/RunTime.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/VBoxInterceptor.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/VBoxInterceptor.c
index c1dc902..7b3f0bb 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/VBoxInterceptor.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/VBoxInterceptor.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/VBoxInterceptor.h b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/VBoxInterceptor.h
index 1d7e7d9..7c54b94 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/VBoxInterceptor.h
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/VBoxInterceptor.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/VBoxInterceptorDxe.inf b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/VBoxInterceptorDxe.inf
index b7ba95c..72dc169 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/VBoxInterceptorDxe.inf
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/VBoxInterceptorDxe.inf
@@ -4,7 +4,7 @@
 
 
 #
-# Copyright (C) 2009-2015 Oracle Corporation
+# Copyright (C) 2009-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/boot_service_table.h b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/boot_service_table.h
index 5407eb4..f1f4935 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/boot_service_table.h
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/boot_service_table.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/interceptor.h b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/interceptor.h
index ae3e101..00f66c8 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/interceptor.h
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/interceptor.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/print_types.h b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/print_types.h
index 524c9ff..9505f56 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/print_types.h
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/print_types.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/runtime_service_table.h b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/runtime_service_table.h
index b790d3b..e5a939f 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/runtime_service_table.h
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxInterceptorDxe/runtime_service_table.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxMimicryDxe/VBoxMimicry.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxMimicryDxe/VBoxMimicry.c
index 6d2b4a2..f21e6a6 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxMimicryDxe/VBoxMimicry.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxMimicryDxe/VBoxMimicry.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxMimicryDxe/VBoxMimicry.h b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxMimicryDxe/VBoxMimicry.h
index b2b8df7..17c3142 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxMimicryDxe/VBoxMimicry.h
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxMimicryDxe/VBoxMimicry.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxMimicryDxe/VBoxMimicryDxe.inf b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxMimicryDxe/VBoxMimicryDxe.inf
index 224f441..c170815 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxMimicryDxe/VBoxMimicryDxe.inf
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxMimicryDxe/VBoxMimicryDxe.inf
@@ -4,7 +4,7 @@
 
 
 #
-# Copyright (C) 2009-2015 Oracle Corporation
+# Copyright (C) 2009-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxMimicryDxe/mimic_tbl.h b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxMimicryDxe/mimic_tbl.h
index f1dae60..b2f4e7f 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxMimicryDxe/mimic_tbl.h
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxMimicryDxe/mimic_tbl.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxPkg.dec b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxPkg.dec
index 1596785..5dbd964 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxPkg.dec
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxPkg.dec
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2009-2015 Oracle Corporation
+# Copyright (C) 2009-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxSysTables/LegacyBiosMpTable.h b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxSysTables/LegacyBiosMpTable.h
index 445bace..53809c3 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxSysTables/LegacyBiosMpTable.h
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxSysTables/LegacyBiosMpTable.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxSysTables/TableConversion.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxSysTables/TableConversion.c
index a342887..3403ade 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxSysTables/TableConversion.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxSysTables/TableConversion.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxSysTables/VBoxSysTables.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxSysTables/VBoxSysTables.c
index d8004b7..2e116c8 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxSysTables/VBoxSysTables.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxSysTables/VBoxSysTables.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxSysTables/VBoxSysTables.inf b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxSysTables/VBoxSysTables.inf
index ae5c361..404ea5c 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxSysTables/VBoxSysTables.inf
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxSysTables/VBoxSysTables.inf
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2010-2015 Oracle Corporation
+# Copyright (C) 2010-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/ComponentName.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/ComponentName.c
index 98a3470..515ea06 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/ComponentName.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/ComponentName.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/DriverSupportedEfiVersion.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/DriverSupportedEfiVersion.c
index bc006c0..6bef5e4 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/DriverSupportedEfiVersion.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/DriverSupportedEfiVersion.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/Edid.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/Edid.c
index 133d985..38a5c3b 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/Edid.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/Edid.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVga.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVga.c
index 327131f..adec403 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVga.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVga.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVga.h b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVga.h
index 58e91c8..93f8a81 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVga.h
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVga.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVgaDxe.inf b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVgaDxe.inf
index 8d8c980..5db9308 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVgaDxe.inf
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVgaDxe.inf
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2010-2015 Oracle Corporation
+# Copyright (C) 2010-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVgaGraphicsOutput.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVgaGraphicsOutput.c
index 44491df..0c2017c 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVgaGraphicsOutput.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVgaGraphicsOutput.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVgaI2c.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVgaI2c.c
index afdc90a..0ae2792 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVgaI2c.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVgaI2c.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVgaI2c.h b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVgaI2c.h
index 11b0078..443ba46 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVgaI2c.h
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVgaI2c.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVgaUgaDraw.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVgaUgaDraw.c
index f89bf47..85cef2b 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVgaUgaDraw.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/VBoxVgaUgaDraw.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaMiniPortDxe/VBoxVgaMiniPortDxe.c b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaMiniPortDxe/VBoxVgaMiniPortDxe.c
index 7d79a6d..203bc95 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaMiniPortDxe/VBoxVgaMiniPortDxe.c
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaMiniPortDxe/VBoxVgaMiniPortDxe.c
@@ -5,7 +5,7 @@
 
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaMiniPortDxe/VBoxVgaMiniPortDxe.inf b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaMiniPortDxe/VBoxVgaMiniPortDxe.inf
index 5e01466..0354605 100644
--- a/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaMiniPortDxe/VBoxVgaMiniPortDxe.inf
+++ b/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaMiniPortDxe/VBoxVgaMiniPortDxe.inf
@@ -5,7 +5,7 @@
 
 
 #
-# Copyright (C) 2009-2015 Oracle Corporation
+# Copyright (C) 2009-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/EFI/FirmwareBin/VBoxEFI32.fd b/src/VBox/Devices/EFI/FirmwareBin/VBoxEFI32.fd
index b8d7d6a..8ac754b 100644
Binary files a/src/VBox/Devices/EFI/FirmwareBin/VBoxEFI32.fd and b/src/VBox/Devices/EFI/FirmwareBin/VBoxEFI32.fd differ
diff --git a/src/VBox/Devices/EFI/FirmwareBin/VBoxEFI64.fd b/src/VBox/Devices/EFI/FirmwareBin/VBoxEFI64.fd
index 3b4806f..42e8f80 100644
Binary files a/src/VBox/Devices/EFI/FirmwareBin/VBoxEFI64.fd and b/src/VBox/Devices/EFI/FirmwareBin/VBoxEFI64.fd differ
diff --git a/src/VBox/Devices/EFI/VBoxSmcUtil-darwin.cpp b/src/VBox/Devices/EFI/VBoxSmcUtil-darwin.cpp
index 64d3f03..848bfa5 100644
--- a/src/VBox/Devices/EFI/VBoxSmcUtil-darwin.cpp
+++ b/src/VBox/Devices/EFI/VBoxSmcUtil-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/GIMDev/DrvUDP.cpp b/src/VBox/Devices/GIMDev/DrvUDP.cpp
index 6cf30f2..ce12089 100644
--- a/src/VBox/Devices/GIMDev/DrvUDP.cpp
+++ b/src/VBox/Devices/GIMDev/DrvUDP.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -67,7 +67,7 @@ typedef struct DRVUDP
 *********************************************************************************************************************************/
 
 
-/** @copydoc PDMISTREAM::pfnRead */
+/** @interface_method_impl{PDMISTREAM,pfnRead} */
 static DECLCALLBACK(int) drvUDPRead(PPDMISTREAM pInterface, void *pvBuf, size_t *pcbRead)
 {
     int rc = VINF_SUCCESS;
@@ -91,7 +91,7 @@ static DECLCALLBACK(int) drvUDPRead(PPDMISTREAM pInterface, void *pvBuf, size_t
 }
 
 
-/** @copydoc PDMISTREAM::pfnWrite */
+/** @interface_method_impl{PDMISTREAM,pfnWrite} */
 static DECLCALLBACK(int) drvUDPWrite(PPDMISTREAM pInterface, const void *pvBuf, size_t *pcbWrite)
 {
     int rc = VINF_SUCCESS;
@@ -170,6 +170,7 @@ static DECLCALLBACK(void) drvUDPDestruct(PPDMDRVINS pDrvIns)
  */
 static DECLCALLBACK(int) drvUDPConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
+    RT_NOREF1(fFlags);
     PDRVUDP pThis = PDMINS_2_DATA(pDrvIns, PDRVUDP);
     PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
 
@@ -202,15 +203,11 @@ static DECLCALLBACK(int) drvUDPConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uin
      */
     rc = RTUdpCreateClientSocket(pThis->pszServerAddress, pThis->uServerPort, NULL, &pThis->hSocket);
     if (RT_SUCCESS(rc))
-    {
-        LogRel(("DrvUDP#%u: Connected socket to %s:%u\n", pThis->pDrvIns->iInstance, pThis->pszServerAddress,
-                pThis->uServerPort));
-    }
+        LogRel(("DrvUDP#%u: Connected socket to %s:%u\n",
+                pThis->pDrvIns->iInstance, pThis->pszServerAddress, pThis->uServerPort));
     else
-    {
-        LogRel(("DrvUDP#%u: Failed to create/connect socket to %s:%u rc=%Rrc\n", pThis->pDrvIns->iInstance,
-                pThis->pszServerAddress, pThis->uServerPort, rc));
-    }
+        LogRel(("DrvUDP#%u: Failed to create/connect socket to %s:%u rc=%Rrc\n",
+                pThis->pDrvIns->iInstance, pThis->pszServerAddress, pThis->uServerPort, rc));
     return VINF_SUCCESS;
 }
 
diff --git a/src/VBox/Devices/GIMDev/GIMDev.cpp b/src/VBox/Devices/GIMDev/GIMDev.cpp
index 4c20531..295e9a1 100644
--- a/src/VBox/Devices/GIMDev/GIMDev.cpp
+++ b/src/VBox/Devices/GIMDev/GIMDev.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -83,8 +83,10 @@ static DECLCALLBACK(void *) gimdevR3QueryInterface(PPDMIBASE pInterface, const c
 }
 
 
-static DECLCALLBACK(int) gimDevR3DbgRecvThread(RTTHREAD ThreadSelf, void *pvUser)
+static DECLCALLBACK(int) gimDevR3DbgRecvThread(RTTHREAD hThreadSelf, void *pvUser)
 {
+    RT_NOREF1(hThreadSelf);
+
     /*
      * Validate.
      */
@@ -175,6 +177,7 @@ static DECLCALLBACK(int) gimDevR3DbgRecvThread(RTTHREAD ThreadSelf, void *pvUser
  */
 static DECLCALLBACK(int) gimdevR3Construct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
 {
+    RT_NOREF2(iInstance, pCfg);
     Assert(iInstance == 0);
     PGIMDEV pThis = PDMINS_2_DATA(pDevIns, PGIMDEV);
     PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
diff --git a/src/VBox/Devices/Audio_old/Makefile.kup b/src/VBox/Devices/GIMDev/Makefile.kup
similarity index 100%
copy from src/VBox/Devices/Audio_old/Makefile.kup
copy to src/VBox/Devices/GIMDev/Makefile.kup
diff --git a/src/VBox/Devices/Graphics/BIOS/Makefile.kmk b/src/VBox/Devices/Graphics/BIOS/Makefile.kmk
index ba3605c..76b4d85 100644
--- a/src/VBox/Devices/Graphics/BIOS/Makefile.kmk
+++ b/src/VBox/Devices/Graphics/BIOS/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2012-2015 Oracle Corporation
+# Copyright (C) 2012-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative286.asm b/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative286.asm
index 8c7d7bc..2e1c93d 100644
--- a/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative286.asm
+++ b/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative286.asm
@@ -7293,7 +7293,7 @@ vesa_pm_end:                                 ; 0xc4514 LB 0x1
 
 section _DATA progbits vstart=0x4600 align=1 ; size=0x371e class=DATA group=DGROUP
 _msg_vga_init:                               ; 0xc4600 LB 0x2e
-    db  'Oracle VM VirtualBox Version 5.1.2 VGA BIOS', 00dh, 00ah, 000h
+    db  'Oracle VM VirtualBox Version 5.1.4 VGA BIOS', 00dh, 00ah, 000h
 _vga_modes:                                  ; 0xc462e LB 0x80
     db  000h, 000h, 000h, 004h, 000h, 0b8h, 0ffh, 002h, 001h, 000h, 000h, 004h, 000h, 0b8h, 0ffh, 002h
     db  002h, 000h, 000h, 004h, 000h, 0b8h, 0ffh, 002h, 003h, 000h, 000h, 004h, 000h, 0b8h, 0ffh, 002h
@@ -8188,7 +8188,7 @@ _vbebios_vendor_name:                        ; 0xc7c73 LB 0x13
 _vbebios_product_name:                       ; 0xc7c86 LB 0x21
     db  'Oracle VM VirtualBox VBE Adapter', 000h
 _vbebios_product_revision:                   ; 0xc7ca7 LB 0x23
-    db  'Oracle VM VirtualBox Version 5.1.2', 000h
+    db  'Oracle VM VirtualBox Version 5.1.4', 000h
 _vbebios_info_string:                        ; 0xc7cca LB 0x2b
     db  'VirtualBox VBE Display Adapter enabled', 00dh, 00ah, 00dh, 00ah, 000h
 _no_vbebios_info_string:                     ; 0xc7cf5 LB 0x29
@@ -8245,4 +8245,4 @@ section CONST2 progbits vstart=0x7d1e align=1 ; size=0x0 class=DATA group=DGROUP
     db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
     db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
     db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
-    db  000h, 045h
+    db  000h, 041h
diff --git a/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative286.md5sum b/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative286.md5sum
index a7c3017..2fb7bf9 100644
--- a/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative286.md5sum
+++ b/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative286.md5sum
@@ -1 +1 @@
-1dff2988b38fc4359443b0df66364f0b *VBoxVgaBios286.rom
+4a30a63db90620d15961cdf305ffa1e5 *VBoxVgaBios286.rom
diff --git a/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative386.asm b/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative386.asm
index 879e117..16065c8 100644
--- a/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative386.asm
+++ b/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative386.asm
@@ -6769,7 +6769,7 @@ vesa_pm_end:                                 ; 0xc4514 LB 0x1
 
 section _DATA progbits vstart=0x4600 align=1 ; size=0x371e class=DATA group=DGROUP
 _msg_vga_init:                               ; 0xc4600 LB 0x2e
-    db  'Oracle VM VirtualBox Version 5.1.2 VGA BIOS', 00dh, 00ah, 000h
+    db  'Oracle VM VirtualBox Version 5.1.4 VGA BIOS', 00dh, 00ah, 000h
 _vga_modes:                                  ; 0xc462e LB 0x80
     db  000h, 000h, 000h, 004h, 000h, 0b8h, 0ffh, 002h, 001h, 000h, 000h, 004h, 000h, 0b8h, 0ffh, 002h
     db  002h, 000h, 000h, 004h, 000h, 0b8h, 0ffh, 002h, 003h, 000h, 000h, 004h, 000h, 0b8h, 0ffh, 002h
@@ -7664,7 +7664,7 @@ _vbebios_vendor_name:                        ; 0xc7c73 LB 0x13
 _vbebios_product_name:                       ; 0xc7c86 LB 0x21
     db  'Oracle VM VirtualBox VBE Adapter', 000h
 _vbebios_product_revision:                   ; 0xc7ca7 LB 0x23
-    db  'Oracle VM VirtualBox Version 5.1.2', 000h
+    db  'Oracle VM VirtualBox Version 5.1.4', 000h
 _vbebios_info_string:                        ; 0xc7cca LB 0x2b
     db  'VirtualBox VBE Display Adapter enabled', 00dh, 00ah, 00dh, 00ah, 000h
 _no_vbebios_info_string:                     ; 0xc7cf5 LB 0x29
@@ -7721,4 +7721,4 @@ section CONST2 progbits vstart=0x7d1e align=1 ; size=0x0 class=DATA group=DGROUP
     db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
     db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
     db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
-    db  000h, 03ah
+    db  000h, 036h
diff --git a/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative386.md5sum b/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative386.md5sum
index f6bc224..88c1d2d 100644
--- a/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative386.md5sum
+++ b/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative386.md5sum
@@ -1 +1 @@
-b64d0c0c484fa191007e0a4a472a9508 *VBoxVgaBios386.rom
+94ee217f1ebe5f8c4df7be8c9ce16477 *VBoxVgaBios386.rom
diff --git a/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative8086.asm b/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative8086.asm
index d0998b4..a1653e6 100644
--- a/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative8086.asm
+++ b/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative8086.asm
@@ -7434,7 +7434,7 @@ vesa_pm_end:                                 ; 0xc4514 LB 0x1
 
 section _DATA progbits vstart=0x4600 align=1 ; size=0x371e class=DATA group=DGROUP
 _msg_vga_init:                               ; 0xc4600 LB 0x2e
-    db  'Oracle VM VirtualBox Version 5.1.2 VGA BIOS', 00dh, 00ah, 000h
+    db  'Oracle VM VirtualBox Version 5.1.4 VGA BIOS', 00dh, 00ah, 000h
 _vga_modes:                                  ; 0xc462e LB 0x80
     db  000h, 000h, 000h, 004h, 000h, 0b8h, 0ffh, 002h, 001h, 000h, 000h, 004h, 000h, 0b8h, 0ffh, 002h
     db  002h, 000h, 000h, 004h, 000h, 0b8h, 0ffh, 002h, 003h, 000h, 000h, 004h, 000h, 0b8h, 0ffh, 002h
@@ -8329,7 +8329,7 @@ _vbebios_vendor_name:                        ; 0xc7c73 LB 0x13
 _vbebios_product_name:                       ; 0xc7c86 LB 0x21
     db  'Oracle VM VirtualBox VBE Adapter', 000h
 _vbebios_product_revision:                   ; 0xc7ca7 LB 0x23
-    db  'Oracle VM VirtualBox Version 5.1.2', 000h
+    db  'Oracle VM VirtualBox Version 5.1.4', 000h
 _vbebios_info_string:                        ; 0xc7cca LB 0x2b
     db  'VirtualBox VBE Display Adapter enabled', 00dh, 00ah, 00dh, 00ah, 000h
 _no_vbebios_info_string:                     ; 0xc7cf5 LB 0x29
@@ -8386,4 +8386,4 @@ section CONST2 progbits vstart=0x7d1e align=1 ; size=0x0 class=DATA group=DGROUP
     db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
     db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
     db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
-    db  000h, 0cch
+    db  000h, 0c8h
diff --git a/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative8086.md5sum b/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative8086.md5sum
index 33cbb8c..8605e22 100644
--- a/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative8086.md5sum
+++ b/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative8086.md5sum
@@ -1 +1 @@
-d36758122a585147d0c6edb4cebf2984 *VBoxVgaBios8086.rom
+0f2240f63a349b1e3e27796ef81200d8 *VBoxVgaBios8086.rom
diff --git a/src/VBox/Devices/Graphics/BIOS/inlines.h b/src/VBox/Devices/Graphics/BIOS/inlines.h
index 8a48ad9..4420eb0 100644
--- a/src/VBox/Devices/Graphics/BIOS/inlines.h
+++ b/src/VBox/Devices/Graphics/BIOS/inlines.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Graphics/BIOS/vbetables-gen.c b/src/VBox/Devices/Graphics/BIOS/vbetables-gen.c
index b7e8c5f..f572386 100644
--- a/src/VBox/Devices/Graphics/BIOS/vbetables-gen.c
+++ b/src/VBox/Devices/Graphics/BIOS/vbetables-gen.c
@@ -68,6 +68,8 @@ int main(int argc, char **argv)
   const char *str;
   long vram_size = VBE_DISPI_TOTAL_VIDEO_MEMORY_MB * 1024 * 1024;
 
+  (void)argc; (void)argv;
+
   printf("/* THIS FILE IS AUTOMATICALLY GENERATED - DO NOT EDIT */\n\n");
   printf("#define VBE_DISPI_TOTAL_VIDEO_MEMORY_MB %d\n\n", VBE_DISPI_TOTAL_VIDEO_MEMORY_MB);
   printf("static ModeInfoListItem mode_info_list[]=\n");
diff --git a/src/VBox/Devices/Graphics/BIOS/vgabios.c b/src/VBox/Devices/Graphics/BIOS/vgabios.c
index 389e711..241c649 100644
--- a/src/VBox/Devices/Graphics/BIOS/vgabios.c
+++ b/src/VBox/Devices/Graphics/BIOS/vgabios.c
@@ -143,7 +143,7 @@ void init_vga_card(void)
     /* Switch to color mode and enable CPU access 480 lines. */
     outb(0x3C2, 0xC3);
     /* More than 64k 3C4/04. */
-    //@todo: 16-bit write
+    /// @todo 16-bit write
     outb(0x3C4, 0x04);
     outb(0x3C5, 0x02);
 
@@ -363,7 +363,7 @@ static void vga_read_char_attr(uint8_t page, uint16_t STACK_BASED *chr_atr)
         address  = SCREEN_MEM_START(nbcols, nbrows, page) + (xcurs + ycurs * nbcols) * 2;
         *chr_atr = read_word(vga_modes[line].sstart, address);
     } else {
-        //@todo: graphics modes (not so easy - or useful!)
+        /// @todo graphics modes (not so easy - or useful!)
 #ifdef VGA_DEBUG
         unimplemented();
 #endif
@@ -628,7 +628,7 @@ static void biosfn_set_active_page(uint8_t page)
  biosfn_set_cursor_pos(page,cursor);
 }
 
-//@todo: Evaluate whether executing INT 10h is the right thing here
+/// @todo Evaluate whether executing INT 10h is the right thing here
 extern void vga_font_set(uint8_t function, uint8_t data);
 #pragma aux vga_font_set =  \
     "mov    ah, 11h"        \
@@ -1784,7 +1784,7 @@ uint16_t biosfn_read_video_state_size2(uint16_t state)
     if (state & 4)
         size += 3 + 256 * 3 + 1;
 
-    //@todo: Is this supposed to be in 1-byte or 64-byte units?
+    /// @todo Is this supposed to be in 1-byte or 64-byte units?
     return size;
 }
 
@@ -2094,7 +2094,7 @@ void __cdecl printf(char *s, ...)
 }
 #endif
 
-//@todo: rearrange, call only from VBE module?
+/// @todo rearrange, call only from VBE module?
 extern void vbe_biosfn_return_controller_information(uint16_t STACK_BASED *AX, uint16_t ES, uint16_t DI);
 extern void vbe_biosfn_return_mode_information(uint16_t STACK_BASED *AX, uint16_t CX, uint16_t ES, uint16_t DI);
 extern void vbe_biosfn_set_mode(uint16_t STACK_BASED *AX, uint16_t BX, uint16_t ES, uint16_t DI);
diff --git a/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp b/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp
index a97e0f1..69c9b3e 100644
--- a/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp
+++ b/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp
@@ -11,7 +11,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -292,8 +292,8 @@ static void vmsvgaSetTraces(PVGASTATE pThis, bool fTraces);
 
 #endif /* IN_RING3 */
 
-
 #ifdef LOG_ENABLED
+
 /**
  * Index register string name lookup
  *
@@ -414,6 +414,7 @@ static const char *vmsvgaIndexToString(PVGASTATE pThis)
     }
 }
 
+#ifdef IN_RING3
 /**
  * FIFO command name lookup
  *
@@ -532,7 +533,9 @@ static const char *vmsvgaFIFOCmdToString(uint32_t u32Cmd)
         return "UNKNOWN";
     }
 }
-#endif
+# endif /* IN_RING3 */
+
+#endif /* LOG_ENABLED */
 
 #ifdef IN_RING3
 /**
@@ -578,6 +581,8 @@ DECLCALLBACK(void) vmsvgaPortSetViewport(PPDMIDISPLAYPORT pInterface, uint32_t u
      */
     if (pThis->svga.f3DEnabled)
         vmsvga3dUpdateHostScreenViewport(pThis, uScreenId, &OldViewport);
+# else
+    RT_NOREF(uScreenId, OldViewport);
 # endif
 }
 #endif /* IN_RING3 */
@@ -848,7 +853,8 @@ PDMBOTHCBDECL(int) vmsvgaReadPort(PVGASTATE pThis, uint32_t *pu32)
             /* Go to ring-3 and halt the CPU. */
             rc = VINF_IOM_R3_IOPORT_READ;
             break;
-#elif defined(VMSVGA_USE_EMT_HALT_CODE)
+#else
+# if defined(VMSVGA_USE_EMT_HALT_CODE)
             /* The guest is basically doing a HLT via the device here, but with
                a special wake up condition on FIFO completion. */
             PVMSVGAR3STATE pSVGAState = pThis->svga.pSvgaR3State;
@@ -861,7 +867,7 @@ PDMBOTHCBDECL(int) vmsvgaReadPort(PVGASTATE pThis, uint32_t *pu32)
                 rc = VMR3WaitForDeviceReady(pVM, idCpu);
             ASMAtomicDecU32(&pSVGAState->cBusyDelayedEmts);
             VMCPUSET_ATOMIC_DEL(&pSVGAState->BusyDelayedEmts, idCpu);
-#else
+# else
 
             /* Delay the EMT a bit so the FIFO and others can get some work done.
                This used to be a crude 50 ms sleep. The current code tries to be
@@ -890,8 +896,9 @@ PDMBOTHCBDECL(int) vmsvgaReadPort(PVGASTATE pThis, uint32_t *pu32)
                 ASMAtomicDecU32(&pSVGAState->cBusyDelayedEmts);
             }
             STAM_REL_PROFILE_STOP(&pSVGAState->StatBusyDelayEmts, EmtDelay);
-#endif
+# endif
             *pu32 = pThis->svga.fBusy != 0;
+#endif
         }
         else
             *pu32 = false;
@@ -1103,7 +1110,7 @@ DECLINLINE(void) vmsvgaSafeFifoBusyRegUpdate(PVGASTATE pThis, bool fState)
  */
 PDMBOTHCBDECL(int) vmsvgaWritePort(PVGASTATE pThis, uint32_t u32)
 {
-#ifdef IN_RING3
+#if defined(IN_RING3) && defined(VBOX_WITH_VMSVGA3D)
     PVMSVGAR3STATE pSVGAState = pThis->svga.pSvgaR3State;
 #endif
     int            rc = VINF_SUCCESS;
@@ -1157,9 +1164,11 @@ PDMBOTHCBDECL(int) vmsvgaWritePort(PVGASTATE pThis, uint32_t u32)
                 rc = vmsvgaChangeMode(pThis);
                 AssertRCReturn(rc, rc);
             }
+# ifdef LOG_ENABLED
             Log(("configured=%d busy=%d\n", pThis->svga.fConfigured, pThis->svga.pFIFOR3[SVGA_FIFO_BUSY]));
             uint32_t *pFIFO = pThis->svga.pFIFOR3;
             Log(("next %x stop %x\n", pFIFO[SVGA_FIFO_NEXT_CMD], pFIFO[SVGA_FIFO_STOP]));
+# endif
 
             /* Disable or enable dirty page tracking according to the current fTraces value. */
             vmsvgaSetTraces(pThis, !!pThis->svga.fTraces);
@@ -1483,13 +1492,13 @@ PDMBOTHCBDECL(int) vmsvgaWritePort(PVGASTATE pThis, uint32_t u32)
 PDMBOTHCBDECL(int) vmsvgaIORead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb)
 {
     PVGASTATE   pThis = PDMINS_2_DATA(pDevIns, PVGASTATE);
-    int rc = VINF_SUCCESS;
+    RT_NOREF_PV(pvUser);
 
     /* Ignore non-dword accesses. */
     if (cb != 4)
     {
         Log(("Ignoring non-dword read at %x cb=%d\n", Port, cb));
-        *pu32 = ~0;
+        *pu32 = UINT32_MAX;
         return VINF_SUCCESS;
     }
 
@@ -1512,7 +1521,8 @@ PDMBOTHCBDECL(int) vmsvgaIORead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port,
         *pu32 = pThis->svga.u32IrqStatus;
         break;
     }
-    return rc;
+
+    return VINF_SUCCESS;
 }
 
 /**
@@ -1529,7 +1539,7 @@ PDMBOTHCBDECL(int) vmsvgaIORead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port,
 PDMBOTHCBDECL(int) vmsvgaIOWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb)
 {
     PVGASTATE   pThis = PDMINS_2_DATA(pDevIns, PVGASTATE);
-    int rc = VINF_SUCCESS;
+    RT_NOREF_PV(pvUser);
 
     /* Ignore non-dword accesses. */
     if (cb != 4)
@@ -1562,7 +1572,7 @@ PDMBOTHCBDECL(int) vmsvgaIOWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port
         }
         break;
     }
-    return rc;
+    return VINF_SUCCESS;
 }
 
 #ifdef DEBUG_FIFO_ACCESS
@@ -2627,7 +2637,6 @@ static DECLCALLBACK(int) vmsvgaFIFOLoop(PPDMDEVINS pDevIns, PPDMTHREAD pThread)
         {
             uint32_t cbPayload = 0;
             uint32_t u32IrqStatus = 0;
-            bool     fTriggerIrq = false;
 
             Assert(offCurrentCmd < offFifoMax && offCurrentCmd >= offFifoMin);
 
@@ -2777,25 +2786,29 @@ static DECLCALLBACK(int) vmsvgaFIFOLoop(PPDMDEVINS pDevIns, PPDMTHREAD pThread)
 
                     switch (cmd)
                     {
-                    case SVGA_ESCAPE_VMWARE_VIDEO_SET_REGS:
-                    {
-                        SVGAEscapeVideoSetRegs *pVideoCmd = (SVGAEscapeVideoSetRegs *)(pEscape + 1);
-                        AssertBreak(pEscape->size >= sizeof(pVideoCmd->header));
-                        uint32_t cRegs = (pEscape->size - sizeof(pVideoCmd->header)) / sizeof(pVideoCmd->items[0]);
-
-                        Log(("SVGA_ESCAPE_VMWARE_VIDEO_SET_REGS: stream %x\n", pVideoCmd->header.streamId));
-                        for (uint32_t iReg = 0; iReg < cRegs; iReg++)
+                        case SVGA_ESCAPE_VMWARE_VIDEO_SET_REGS:
                         {
-                            Log(("SVGA_ESCAPE_VMWARE_VIDEO_SET_REGS: reg %x val %x\n", pVideoCmd->items[iReg].registerId, pVideoCmd->items[iReg].value));
+                            SVGAEscapeVideoSetRegs *pVideoCmd = (SVGAEscapeVideoSetRegs *)(pEscape + 1);
+                            AssertBreak(pEscape->size >= sizeof(pVideoCmd->header));
+                            uint32_t cRegs = (pEscape->size - sizeof(pVideoCmd->header)) / sizeof(pVideoCmd->items[0]);
+
+                            Log(("SVGA_ESCAPE_VMWARE_VIDEO_SET_REGS: stream %x\n", pVideoCmd->header.streamId));
+                            for (uint32_t iReg = 0; iReg < cRegs; iReg++)
+                                Log(("SVGA_ESCAPE_VMWARE_VIDEO_SET_REGS: reg %x val %x\n", pVideoCmd->items[iReg].registerId, pVideoCmd->items[iReg].value));
+
+                            RT_NOREF_PV(pVideoCmd);
+                            break;
+
                         }
-                        break;
-                    }
 
-                    case SVGA_ESCAPE_VMWARE_VIDEO_FLUSH:
-                        SVGAEscapeVideoFlush *pVideoCmd = (SVGAEscapeVideoFlush *)(pEscape + 1);
-                        AssertBreak(pEscape->size >= sizeof(*pVideoCmd));
-                        Log(("SVGA_ESCAPE_VMWARE_VIDEO_FLUSH: stream %x\n", pVideoCmd->streamId));
-                        break;
+                        case SVGA_ESCAPE_VMWARE_VIDEO_FLUSH:
+                        {
+                            SVGAEscapeVideoFlush *pVideoCmd = (SVGAEscapeVideoFlush *)(pEscape + 1);
+                            AssertBreak(pEscape->size >= sizeof(*pVideoCmd));
+                            Log(("SVGA_ESCAPE_VMWARE_VIDEO_FLUSH: stream %x\n", pVideoCmd->streamId));
+                            RT_NOREF_PV(pVideoCmd);
+                            break;
+                        }
                     }
                 }
                 else
@@ -2898,7 +2911,6 @@ static DECLCALLBACK(int) vmsvgaFIFOLoop(PPDMDEVINS pDevIns, PPDMTHREAD pThread)
                     uint64_t            *pPage64 = (uint64_t *)(pCmd + 1);
                     uint32_t             iDescriptor = 0;
                     RTGCPHYS             GCPhys;
-                    PVMSVGAGMRDESCRIPTOR paDescOld = NULL;
                     bool                 fGCPhys64 = !!(pCmd->flags & SVGA_REMAP_GMR2_PPN64);
 
                     if (paNewPage64)
@@ -3093,8 +3105,8 @@ static DECLCALLBACK(int) vmsvgaFIFOLoop(PPDMDEVINS pDevIns, PPDMTHREAD pThread)
 
             default:
 # ifdef VBOX_WITH_VMSVGA3D
-                if (    enmCmdId >= SVGA_3D_CMD_BASE
-                    &&  enmCmdId <  SVGA_3D_CMD_MAX)
+                if (    (int)enmCmdId >= SVGA_3D_CMD_BASE
+                    &&  (int)enmCmdId <  SVGA_3D_CMD_MAX)
                 {
                     /* All 3d commands start with a common header, which defines the size of the command. */
                     SVGA3dCmdHeader *pHdr;
@@ -3690,6 +3702,7 @@ int vmsvgaGMRTransfer(PVGASTATE pThis, const SVGA3dTransferType enmTransferType,
  */
 static DECLCALLBACK(int) vmsvgaFIFOLoopWakeUp(PPDMDEVINS pDevIns, PPDMTHREAD pThread)
 {
+    RT_NOREF(pDevIns);
     PVGASTATE pThis = (PVGASTATE)pThread->pvUser;
     Log(("vmsvgaFIFOLoopWakeUp\n"));
     return SUPSemEventSignal(pThis->svga.pSupDrvSession, pThis->svga.FIFORequestSem);
@@ -3921,6 +3934,7 @@ DECLCALLBACK(void) vmsvgaR3Info3dContext(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp,
  */
 static DECLCALLBACK(void) vmsvgaR3Info(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
 {
+    RT_NOREF(pszArgs);
     PVGASTATE       pThis = PDMINS_2_DATA(pDevIns, PVGASTATE);
     PVMSVGAR3STATE  pSVGAState = pThis->svga.pSvgaR3State;
 
@@ -3966,6 +3980,7 @@ static DECLCALLBACK(void) vmsvgaR3Info(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, c
  */
 int vmsvgaLoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass)
 {
+    RT_NOREF(uVersion, uPass);
     PVGASTATE       pThis = PDMINS_2_DATA(pDevIns, PVGASTATE);
     PVMSVGAR3STATE  pSVGAState = pThis->svga.pSvgaR3State;
     int             rc;
@@ -4484,13 +4499,11 @@ static const char * const g_apszVmSvgaDevCapNames[] =
  */
 DECLCALLBACK(void) vmsvgaR3PowerOn(PPDMDEVINS pDevIns)
 {
-    PVGASTATE pThis = PDMINS_2_DATA(pDevIns, PVGASTATE);
-    int       rc;
-
 # ifdef VBOX_WITH_VMSVGA3D
+    PVGASTATE pThis = PDMINS_2_DATA(pDevIns, PVGASTATE);
     if (pThis->svga.f3DEnabled)
     {
-        rc = vmsvga3dPowerOn(pThis);
+        int rc = vmsvga3dPowerOn(pThis);
 
         if (RT_SUCCESS(rc))
         {
@@ -4536,7 +4549,9 @@ DECLCALLBACK(void) vmsvgaR3PowerOn(PPDMDEVINS pDevIns)
             RTLogRelSetBuffering(fSavedBuffering);
         }
     }
-# endif // VBOX_WITH_VMSVGA3D
+# else  /* !VBOX_WITH_VMSVGA3D */
+    RT_NOREF(pDevIns);
+# endif /* !VBOX_WITH_VMSVGA3D */
 }
 
 #endif /* IN_RING3 */
diff --git a/src/VBox/Devices/Graphics/DevVGA-SVGA.h b/src/VBox/Devices/Graphics/DevVGA-SVGA.h
index 6b85b96..55e286f 100644
--- a/src/VBox/Devices/Graphics/DevVGA-SVGA.h
+++ b/src/VBox/Devices/Graphics/DevVGA-SVGA.h
@@ -2,7 +2,7 @@
  * VMware SVGA device
  */
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Graphics/DevVGA-SVGA3d-cocoa.h b/src/VBox/Devices/Graphics/DevVGA-SVGA3d-cocoa.h
index a351aff..6a6ec27 100644
--- a/src/VBox/Devices/Graphics/DevVGA-SVGA3d-cocoa.h
+++ b/src/VBox/Devices/Graphics/DevVGA-SVGA3d-cocoa.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Graphics/DevVGA-SVGA3d-cocoa.m b/src/VBox/Devices/Graphics/DevVGA-SVGA3d-cocoa.m
index 2433292..5b1b557 100644
--- a/src/VBox/Devices/Graphics/DevVGA-SVGA3d-cocoa.m
+++ b/src/VBox/Devices/Graphics/DevVGA-SVGA3d-cocoa.m
@@ -279,6 +279,7 @@
 #ifdef USE_NSOPENGLVIEW
     self = [super initWithFrame:frame pixelFormat:pFmt];
 #else
+    RT_NOREF(pFmt);
     m_cSetViewAttempts = 0;
     m_pCtx = NULL;
     self = [super initWithFrame:frame];
@@ -289,8 +290,8 @@
         self.autoresizingMask = NSViewNotSizable;
 
         /*
-         * Get notifications when we're moved or resized and when we're moved 
-         * to a different screen or GPU or when the GL context simply needs updating. 
+         * Get notifications when we're moved or resized and when we're moved
+         * to a different screen or GPU or when the GL context simply needs updating.
          */
         if (pParentView)
         {
@@ -471,34 +472,37 @@
 
 /**
  * This is called when the bounds change.
- *  
+ *
  * We indicate that the FIFO thread must update the GL context.
  */
 - (void)vboxBoundsDidChange:(NSNotification *)pNotification
 {
+    RT_NOREF(pNotification);
     LogFlow(("OvlView(%p) vboxBoundsDidChange:\n", (void *)self));
     self->m_fUpdateCtx = true;
 }
 
 /**
  * This is called when the frame changes size or position.
- *  
+ *
  * We indicate that the FIFO thread must update the GL context.
  */
 - (void)vboxFrameDidChange:(NSNotification *)pNotification
 {
+    RT_NOREF(pNotification);
     LogFlow(("OvlView(%p) vboxFrameDidChange:\n", (void *)self));
     self->m_fUpdateCtx = true;
 }
 
-/** 
- * This is called when moved to different screen/GPU or/and when the GL context 
+/**
+ * This is called when moved to different screen/GPU or/and when the GL context
  * needs updating.
- *  
+ *
  * We indicate that the FIFO thread must update the GL context.
  */
 - (void)vboxFrameDidChangeGlobal:(NSNotification *)pNotification
 {
+    RT_NOREF(pNotification);
     LogFlow(("OvlView(%p) vboxFrameDidChangeGlobal:\n", (void *)self));
     self->m_fUpdateCtx = true;
 }
@@ -663,6 +667,7 @@
 
 - (void)drawRect:(NSRect)rect
 {
+    RT_NOREF(rect);
 //    if (m_fClear)
 //    {
 //        m_fClear = false;
@@ -829,6 +834,7 @@ VMSVGA3DCOCOA_DECL(void) vmsvga3dCocoaViewInfo(PCDBGFINFOHLP pHlp, NativeNSViewR
 /** @note Not currently used. */
 VMSVGA3DCOCOA_DECL(void) vmsvga3dCocoaViewSetPosition(NativeNSViewRef pView, NativeNSViewRef pParentView, int x, int y)
 {
+    RT_NOREF(pParentView);
     LogFlow(("vmsvga3dCocoaViewSetPosition: pView=%p pParentView=%p (%d,%d)\n", (void *)pView, (void *)pParentView, x, y));
     NSAutoreleasePool *pPool = [[NSAutoreleasePool alloc] init];
 
diff --git a/src/VBox/Devices/Graphics/DevVGA-SVGA3d-info.cpp b/src/VBox/Devices/Graphics/DevVGA-SVGA3d-info.cpp
index c6e923d..cc4252f 100644
--- a/src/VBox/Devices/Graphics/DevVGA-SVGA3d-info.cpp
+++ b/src/VBox/Devices/Graphics/DevVGA-SVGA3d-info.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -654,6 +654,7 @@ void vmsvga3dInfoHostWindow(PCDBGFINFOHLP pHlp, uint64_t idHostWindow)
         pHlp->pfnPrintf(pHlp, "    Windows info:   vmsvga3dCocoaViewInfo failed to load (%Rrc)\n", rc);
 
 #else
+    RT_NOREF(idHostWindow);
     pHlp->pfnPrintf(pHlp, "    Windows info:   Not implemented on this platform\n");
 #endif
 }
@@ -813,6 +814,8 @@ void vmsvga3dAsciiPrint(PFMVMSVGAASCIIPRINTLN pfnPrintLine, void *pvUser, void c
                         uint32_t cx, uint32_t cy, uint32_t cbScanline, SVGA3dSurfaceFormat enmFormat, bool fInvY,
                         uint32_t cchMaxX, uint32_t cchMaxY)
 {
+    RT_NOREF(cbImage);
+
     /*
      * Skip stuff we can't or won't need to handle.
      */
@@ -1506,6 +1509,7 @@ static const char * const g_apszRenderTargets[] =
 
 static void vmsvga3dInfoContextWorkerOne(PCDBGFINFOHLP pHlp, PVMSVGA3DCONTEXT pContext, bool fVerbose)
 {
+    RT_NOREF(fVerbose);
     char szTmp[128];
 
     pHlp->pfnPrintf(pHlp, "*** VMSVGA 3d context %#x (%d) ***\n", pContext->id, pContext->id);
diff --git a/src/VBox/Devices/Graphics/DevVGA-SVGA3d-internal.h b/src/VBox/Devices/Graphics/DevVGA-SVGA3d-internal.h
index 332dd51..fd605e0 100644
--- a/src/VBox/Devices/Graphics/DevVGA-SVGA3d-internal.h
+++ b/src/VBox/Devices/Graphics/DevVGA-SVGA3d-internal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -39,7 +39,7 @@
 #include "DevVGA-SVGA3d.h"
 
 #ifdef RT_OS_WINDOWS
-# include <Windows.h>
+# include <iprt/win/windows.h>
 # ifdef VMSVGA3D_DIRECT3D
 #  include <d3d9.h>
 #  include <iprt/avl.h>
@@ -136,7 +136,7 @@ typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname,
         if ((pState)->idActiveContext != (pContext)->id) \
         { \
             BOOL fMakeCurrentRc = wglMakeCurrent((pContext)->hdc, (pContext)->hglrc); \
-            Assert(fMakeCurrentRc == TRUE); \
+            Assert(fMakeCurrentRc == TRUE); RT_NOREF_PV(fMakeCurrentRc); \
             LogFlowFunc(("Changing context: %#x -> %#x\n", (pState)->idActiveContext, (pContext)->id)); \
             (pState)->idActiveContext = (pContext)->id; \
         } \
@@ -160,7 +160,7 @@ typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname,
             Bool fMakeCurrentRc = glXMakeCurrent((pState)->display, \
                                                  (pContext)->window, \
                                                  (pContext)->glxContext); \
-            Assert(fMakeCurrentRc == True); \
+            Assert(fMakeCurrentRc == True); RT_NOREF_PV(fMakeCurrentRc); \
             LogFlowFunc(("Changing context: %#x -> %#x\n", (pState)->idActiveContext, (pContext)->id)); \
             (pState)->idActiveContext = (pContext)->id; \
         } \
@@ -863,7 +863,7 @@ typedef struct VMSVGA3DSTATE
 #endif
 
 #ifdef VMSVGA3D_OPENGL
-    float                   fGLVersion;
+    float                   rsGLVersion;
     /* Current active context. */
     uint32_t                idActiveContext;
 
@@ -950,7 +950,7 @@ typedef struct VMSVGA3DSTATE
      * bunch of others when using a OpenGL core profile instead of a legacy one */
     R3PTRTYPE(char *)       pszOtherExtensions;
     /** The version of the other GL profile. */
-    float                   fOtherGLVersion;
+    float                   rsOtherGLVersion;
 
     /** Shader talk back interface. */
     VBOXVMSVGASHADERIF      ShaderIf;
@@ -971,7 +971,7 @@ typedef struct VMSVGA3DSTATE
 static SSMFIELD const g_aVMSVGA3DSTATEFields[] =
 {
 # ifdef VMSVGA3D_OPENGL
-    SSMFIELD_ENTRY(                 VMSVGA3DSTATE, fGLVersion), /** @todo Why are we saving the GL version?? */
+    SSMFIELD_ENTRY(                 VMSVGA3DSTATE, rsGLVersion), /** @todo Why are we saving the GL version?? */
 # endif
     SSMFIELD_ENTRY(                 VMSVGA3DSTATE, cContexts),
     SSMFIELD_ENTRY(                 VMSVGA3DSTATE, cSurfaces),
@@ -1040,8 +1040,8 @@ void vmsvga3dSurfaceFormat2OGL(PVMSVGA3DSURFACE pSurface, SVGA3dSurfaceFormat fo
 
 
 /* DevVGA-SVGA3d-shared.cpp: */
-uint32_t vmsvga3dSaveShaderConst(PVMSVGA3DCONTEXT pContext, uint32_t reg, SVGA3dShaderType type, SVGA3dShaderConstType ctype,
-                                 uint32_t val1, uint32_t val2, uint32_t val3, uint32_t val4);
+int vmsvga3dSaveShaderConst(PVMSVGA3DCONTEXT pContext, uint32_t reg, SVGA3dShaderType type, SVGA3dShaderConstType ctype,
+                            uint32_t val1, uint32_t val2, uint32_t val3, uint32_t val4);
 
 
 
diff --git a/src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp b/src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp
index 6c2f679..94ca2e0 100644
--- a/src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp
+++ b/src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -173,14 +173,15 @@ extern "C" int ExplicitlyLoadVBoxSVGA3D(bool fResolveAllImports, PRTERRINFO pErr
  * @returns true if supported, false if not.
  * @param   pState              The VMSVGA3d state.
  * @param   fActualGLVersion    The actual OpenGL version we're working against.
- * @param   fMinGLVersion       The OpenGL version that introduced this feature
+ * @param   rsMinGLVersion      The OpenGL version that introduced this feature
  *                              into the core.
  * @param   pszWantedExtension  The name of the OpenGL extension we want padded
  *                              with one space at each end.
  * @remarks Init time only.
  */
-static bool vmsvga3dCheckGLExtension(PVMSVGA3DSTATE pState, float fMinGLVersion, const char *pszWantedExtension)
+static bool vmsvga3dCheckGLExtension(PVMSVGA3DSTATE pState, float rsMinGLVersion, const char *pszWantedExtension)
 {
+    RT_NOREF(rsMinGLVersion);
     /* check padding. */
     Assert(pszWantedExtension[0] == ' ');
     Assert(pszWantedExtension[1] != ' ');
@@ -191,17 +192,17 @@ static bool vmsvga3dCheckGLExtension(PVMSVGA3DSTATE pState, float fMinGLVersion,
     if (strstr(pState->pszExtensions, pszWantedExtension))
         fRet = true;
 
-    /* Temporarily.  Later start if (fMinGLVersion != 0.0 && fActualGLVersion >= fMinGLVersion) return true; */
+    /* Temporarily.  Later start if (rsMinGLVersion != 0.0 && fActualGLVersion >= rsMinGLVersion) return true; */
 #ifdef RT_OS_DARWIN
-    AssertMsg(   fMinGLVersion == 0.0
-              || fRet == (pState->fGLVersion >= fMinGLVersion)
+    AssertMsg(   rsMinGLVersion == 0.0
+              || fRet == (pState->rsGLVersion >= rsMinGLVersion)
               || VBOX_VMSVGA3D_DEFAULT_OGL_PROFILE == 2.1,
               ("%s actual:%d min:%d fRet=%d\n",
-               pszWantedExtension, (int)(pState->fGLVersion * 10), (int)(fMinGLVersion * 10), fRet));
+               pszWantedExtension, (int)(pState->rsGLVersion * 10), (int)(rsMinGLVersion * 10), fRet));
 #else
-    AssertMsg(fMinGLVersion == 0.0 || fRet == (pState->fGLVersion >= fMinGLVersion),
+    AssertMsg(rsMinGLVersion == 0.0 || fRet == (pState->rsGLVersion >= rsMinGLVersion),
               ("%s actual:%d min:%d fRet=%d\n",
-               pszWantedExtension, (int)(pState->fGLVersion * 10), (int)(fMinGLVersion * 10), fRet));
+               pszWantedExtension, (int)(pState->rsGLVersion * 10), (int)(rsMinGLVersion * 10), fRet));
 #endif
     return fRet;
 }
@@ -483,12 +484,14 @@ static int vmsvga3dGatherExtensions(char **ppszExtensions, float fGLProfileVersi
         const char *pszExt = s_aPromotedExtensions[i].pszzExtensions;
         while (*pszExt)
         {
+# ifdef VBOX_STRICT
             size_t cchExt = strlen(pszExt);
             Assert(cchExt > 3);
             Assert(pszExt[0] == ' ');
             Assert(pszExt[1] != ' ');
             Assert(pszExt[cchExt - 2] != ' ');
             Assert(pszExt[cchExt - 1] == ' ');
+# endif
 
             if (strstr(*ppszExtensions, pszExt) == NULL)
             {
@@ -632,7 +635,7 @@ int vmsvga3dPowerOn(PVGASTATE pThis)
 #endif
     int              rc;
 
-    if (pState->fGLVersion != 0.0)
+    if (pState->rsGLVersion != 0.0)
         return VINF_SUCCESS;    /* already initialized (load state) */
 
     /*
@@ -655,7 +658,7 @@ int vmsvga3dPowerOn(PVGASTATE pThis)
     AssertRCReturn(rc, rc);
     vmsvga3dLogRelExtensions("", pState->pszExtensions);
 
-    pState->fGLVersion = atof((const char *)glGetString(GL_VERSION));
+    pState->rsGLVersion = atof((const char *)glGetString(GL_VERSION));
 
 
 #ifdef VBOX_VMSVGA3D_DUAL_OPENGL_PROFILE
@@ -681,12 +684,12 @@ int vmsvga3dPowerOn(PVGASTATE pThis)
     AssertRCReturn(rc, rc);
     vmsvga3dLogRelExtensions("Alternative ", pState->pszOtherExtensions);
 
-    pState->fOtherGLVersion = atof((const char *)glGetString(GL_VERSION));
+    pState->rsOtherGLVersion = atof((const char *)glGetString(GL_VERSION));
 
     VMSVGA3D_SET_CURRENT_CONTEXT(pState, pContext);
 #else
     pState->pszOtherExtensions = (char *)"";
-    pState->fOtherGLVersion = pState->fGLVersion;
+    pState->rsOtherGLVersion = pState->rsGLVersion;
 #endif
 
 
@@ -977,8 +980,8 @@ int vmsvga3dPowerOn(PVGASTATE pThis)
     AssertRC(rc);
 #endif
 
-    if (   pState->fGLVersion < 3.0
-        && pState->fOtherGLVersion < 3.0 /* darwin: legacy profile hack */)
+    if (   pState->rsGLVersion < 3.0
+        && pState->rsOtherGLVersion < 3.0 /* darwin: legacy profile hack */)
     {
         LogRel(("VMSVGA3d: unsupported OpenGL version; minimum is 3.0\n"));
         return VERR_NOT_IMPLEMENTED;
@@ -1086,6 +1089,7 @@ void vmsvga3dUpdateHostScreenViewport(PVGASTATE pThis, uint32_t idScreen, VMSVGA
      *        redraw it. */
 
 #ifdef RT_OS_DARWIN
+    RT_NOREF(pOldViewport);
     PVMSVGA3DSTATE pState = pThis->svga.p3dState;
     if (   pState
         && idScreen == 0
@@ -1094,7 +1098,7 @@ void vmsvga3dUpdateHostScreenViewport(PVGASTATE pThis, uint32_t idScreen, VMSVGA
         vmsvga3dCocoaViewUpdateViewport(pState->SharedCtx.cocoaView);
     }
 #else
-    NOREF(pThis); NOREF(idScreen);
+    RT_NOREF(pThis, idScreen, pOldViewport);
 #endif
 }
 
@@ -1104,14 +1108,13 @@ void vmsvga3dUpdateHostScreenViewport(PVGASTATE pThis, uint32_t idScreen, VMSVGA
  * given surface format capability.
  *
  * @returns Supported/indented operations (SVGA3DFORMAT_OP_XXX).
- * @param   pState3D        The 3D state.
  * @param   idx3dCaps       The SVGA3D_CAPS_XXX value of the surface format.
  *
  * @remarks See fromat_cap_table in svga_format.c (mesa/gallium) for a reference
  *          of implicit guest expectations:
  *              http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/svga/svga_format.c
  */
-static uint32_t vmsvga3dGetSurfaceFormatSupport(PVMSVGA3DSTATE pState3D, uint32_t idx3dCaps)
+static uint32_t vmsvga3dGetSurfaceFormatSupport(uint32_t idx3dCaps)
 {
     uint32_t result = 0;
 
@@ -1215,16 +1218,18 @@ static uint32_t vmsvga3dGetSurfaceFormatSupport(PVMSVGA3DSTATE pState3D, uint32_
     return result;
 }
 
+#if 0 /* unused */
 static uint32_t vmsvga3dGetDepthFormatSupport(PVMSVGA3DSTATE pState3D, uint32_t idx3dCaps)
 {
-    uint32_t result = 0;
+    RT_NOREF(pState3D, idx3dCaps);
 
     /** @todo test this somehow */
-    result = SVGA3DFORMAT_OP_ZSTENCIL | SVGA3DFORMAT_OP_ZSTENCIL_WITH_ARBITRARY_COLOR_DEPTH;
+    uint32_t result = SVGA3DFORMAT_OP_ZSTENCIL | SVGA3DFORMAT_OP_ZSTENCIL_WITH_ARBITRARY_COLOR_DEPTH;
 
     Log(("CAPS: %s =\n%s\n", vmsvga3dGetCapString(idx3dCaps), vmsvga3dGet3dFormatString(result)));
     return result;
 }
+#endif
 
 
 int vmsvga3dQueryCaps(PVGASTATE pThis, uint32_t idx3dCaps, uint32_t *pu32Val)
@@ -1446,7 +1451,7 @@ int vmsvga3dQueryCaps(PVGASTATE pThis, uint32_t idx3dCaps, uint32_t *pu32Val)
     case SVGA3D_DEVCAP_SURFACEFMT_Z_DF24:
     case SVGA3D_DEVCAP_SURFACEFMT_Z_D24S8_INT:
     case SVGA3D_DEVCAP_SURFACEFMT_DXT1:
-        *pu32Val = vmsvga3dGetSurfaceFormatSupport(pState, idx3dCaps);
+        *pu32Val = vmsvga3dGetSurfaceFormatSupport(idx3dCaps);
         break;
 
     case SVGA3D_DEVCAP_SURFACEFMT_DXT2:
@@ -1474,7 +1479,7 @@ int vmsvga3dQueryCaps(PVGASTATE pThis, uint32_t idx3dCaps, uint32_t *pu32Val)
     case SVGA3D_DEVCAP_SURFACEFMT_YUY2:
     case SVGA3D_DEVCAP_SURFACEFMT_NV12:
     case SVGA3D_DEVCAP_SURFACEFMT_AYUV:
-        *pu32Val = vmsvga3dGetSurfaceFormatSupport(pState, idx3dCaps);
+        *pu32Val = vmsvga3dGetSurfaceFormatSupport(idx3dCaps);
         break;
 
     /* Linux: Not referenced in current sources. */
@@ -1557,7 +1562,7 @@ void vmsvga3dSurfaceFormat2OGL(PVMSVGA3DSURFACE pSurface, SVGA3dSurfaceFormat fo
         pSurface->typeGL = GL_UNSIGNED_INT;
         break;
     case SVGA3D_Z_D15S1:                /* D3DFMT_D15S1 - WINED3DFMT_S1_UINT_D15_UNORM */
-        pSurface->internalFormatGL = GL_DEPTH_COMPONENT16;  /* @todo ??? */
+        pSurface->internalFormatGL = GL_DEPTH_COMPONENT16;  /** @todo ??? */
         pSurface->formatGL = GL_DEPTH_STENCIL;
         pSurface->typeGL = GL_UNSIGNED_SHORT;
         /** @todo Wine sources hints at no hw support for this, so test this one! */
@@ -1927,6 +1932,8 @@ int vmsvga3dSurfaceCopy(PVGASTATE pThis, SVGA3dSurfaceImageId dest, SVGA3dSurfac
 void vmsvga3dOglSetUnpackParams(PVMSVGA3DSTATE pState, PVMSVGA3DCONTEXT pContext, PVMSVGA3DSURFACE pSurface,
                                 PVMSVGAPACKPARAMS pSave)
 {
+    RT_NOREF(pState);
+
     /*
      * Save (ignore errors, setting the defaults we want and avoids restore).
      */
@@ -2002,7 +2009,8 @@ void vmsvga3dOglSetUnpackParams(PVMSVGA3DSTATE pState, PVMSVGA3DCONTEXT pContext
 void vmsvga3dOglRestoreUnpackParams(PVMSVGA3DSTATE pState, PVMSVGA3DCONTEXT pContext, PVMSVGA3DSURFACE pSurface,
                                     PCVMSVGAPACKPARAMS pSave)
 {
-    NOREF(pSurface);
+    RT_NOREF(pState, pSurface);
+
     if (pSave->iAlignment != 1)
         VMSVGA3D_ASSERT_GL_CALL(glPixelStorei(GL_UNPACK_ALIGNMENT, pSave->iAlignment), pState, pContext);
     if (pSave->cxRow != 0)
@@ -2037,6 +2045,7 @@ void vmsvga3dOglRestoreUnpackParams(PVMSVGA3DSTATE pState, PVMSVGA3DCONTEXT pCon
 int vmsvga3dBackCreateTexture(PVMSVGA3DSTATE pState, PVMSVGA3DCONTEXT pContext, uint32_t idAssociatedContext,
                               PVMSVGA3DSURFACE pSurface)
 {
+    RT_NOREF(idAssociatedContext);
     GLint activeTexture = 0;
     uint32_t idPrevCtx = pState->idActiveContext;
     pContext = &pState->SharedCtx;
@@ -2126,6 +2135,8 @@ int vmsvga3dBackSurfaceStretchBlt(PVGASTATE pThis, PVMSVGA3DSTATE pState,
                                   PVMSVGA3DSURFACE pSrcSurface, uint32_t uSrcMipmap, SVGA3dBox const *pSrcBox,
                                   SVGA3dStretchBltMode enmMode, PVMSVGA3DCONTEXT pContext)
 {
+    RT_NOREF(pThis);
+
     /* Activate the read and draw framebuffer objects. */
     pState->ext.glBindFramebuffer(GL_READ_FRAMEBUFFER, pContext->idReadFramebuffer);
     VMSVGA3D_CHECK_LAST_ERROR(pState, pContext);
@@ -2191,6 +2202,7 @@ int vmsvga3dBackSurfaceStretchBlt(PVGASTATE pThis, PVMSVGA3DSTATE pState,
 void vmsvga3dOglSetPackParams(PVMSVGA3DSTATE pState, PVMSVGA3DCONTEXT pContext, PVMSVGA3DSURFACE pSurface,
                               PVMSVGAPACKPARAMS pSave)
 {
+    RT_NOREF(pState);
     /*
      * Save (ignore errors, setting the defaults we want and avoids restore).
      */
@@ -2266,7 +2278,7 @@ void vmsvga3dOglSetPackParams(PVMSVGA3DSTATE pState, PVMSVGA3DCONTEXT pContext,
 void vmsvga3dOglRestorePackParams(PVMSVGA3DSTATE pState, PVMSVGA3DCONTEXT pContext, PVMSVGA3DSURFACE pSurface,
                                   PCVMSVGAPACKPARAMS pSave)
 {
-    NOREF(pSurface);
+    RT_NOREF(pState, pSurface);
     if (pSave->iAlignment != 1)
         VMSVGA3D_ASSERT_GL_CALL(glPixelStorei(GL_PACK_ALIGNMENT, pSave->iAlignment), pState, pContext);
     if (pSave->cxRow != 0)
@@ -2308,6 +2320,7 @@ int vmsvga3dBackSurfaceDMACopyBox(PVGASTATE pThis, PVMSVGA3DSTATE pState, PVMSVG
                                   SVGAGuestPtr GuestPtr, uint32_t cbSrcPitch, SVGA3dTransferType transfer,
                                   SVGA3dCopyBox const *pBox, PVMSVGA3DCONTEXT pContext, int rc, int iBox)
 {
+    RT_NOREF(iBox);
     PVMSVGA3DMIPMAPLEVEL pMipLevel = &pSurface->pMipmapLevels[uHostMipmap];
 
     switch (pSurface->flags & VMSVGA3D_SURFACE_HINT_SWITCH_MASK)
@@ -2648,7 +2661,6 @@ int vmsvga3dCommandPresent(PVGASTATE pThis, uint32_t sid, uint32_t cRects, SVGA3
 {
     PVMSVGA3DSTATE      pState = pThis->svga.p3dState;
     PVMSVGA3DSURFACE    pSurface;
-    int                 rc = VINF_SUCCESS;
     PVMSVGA3DCONTEXT    pContext;
     uint32_t            cid;
 
@@ -3124,8 +3136,8 @@ int vmsvga3dCommandPresent(PVGASTATE pThis, uint32_t sid, uint32_t cRects, SVGA3
      * Flip the front and back buffers.
      */
 #ifdef RT_OS_WINDOWS
-    BOOL ret = SwapBuffers(pContext->hdc);
-    AssertMsg(ret, ("SwapBuffers failed with %d\n", GetLastError()));
+    BOOL fRef = SwapBuffers(pContext->hdc);
+    AssertMsg(fRef, ("SwapBuffers failed with %d\n", GetLastError())); NOREF(fRef);
 #elif defined(RT_OS_DARWIN)
     vmsvga3dCocoaSwapBuffers(pContext->cocoaView, pContext->cocoaContext);
 #else
@@ -3149,13 +3161,15 @@ int vmsvga3dCommandPresent(PVGASTATE pThis, uint32_t sid, uint32_t cRects, SVGA3
 
 #ifdef RT_OS_LINUX
 /**
- * X11 event handling thread
- * @param ThreadSelf thread handle
- * @param pvUser pointer to pState structure
- * @returns VBox status code
+ * X11 event handling thread.
+ *
+ * @returns VINF_SUCCESS (ignored)
+ * @param   hThreadSelf     thread handle
+ * @param   pvUser          pointer to pState structure
  */
-DECLCALLBACK(int) vmsvga3dXEventThread(RTTHREAD ThreadSelf, void *pvUser)
+DECLCALLBACK(int) vmsvga3dXEventThread(RTTHREAD hThreadSelf, void *pvUser)
 {
+    RT_NOREF(hThreadSelf);
     PVMSVGA3DSTATE pState = (PVMSVGA3DSTATE)pvUser;
     while (!pState->bTerminate)
     {
@@ -3394,7 +3408,7 @@ int vmsvga3dContextDefineOgl(PVGASTATE pThis, uint32_t cid, uint32_t fFlags)
                                      0, vi->depth, InputOutput,
                                      vi->visual, flags, &swa);
     AssertMsgReturn(pContext->window, ("XCreateWindow failed"), VERR_INTERNAL_ERROR);
-    uint32_t cardinal_alpha = (uint32_t) (0.5 * (uint32_t)-1) ;
+    //uint32_t cardinal_alpha = (uint32_t) (0.5 * (uint32_t)-1); - unused
 
     /* the window is hidden by default and only mapped when CommandPresent is executed on it */
 
@@ -3587,6 +3601,7 @@ static void vmsvga3dChangeModeOneContext(PVGASTATE pThis, PVMSVGA3DSTATE pState,
     AssertRC(rc);
 
 #elif defined(RT_OS_DARWIN)
+    RT_NOREF(pState);
     vmsvga3dCocoaViewSetSize(pContext->cocoaView, pThis->svga.uWidth, pThis->svga.uHeight);
 
 #elif defined(RT_OS_LINUX)
@@ -3870,7 +3885,7 @@ static GLenum vmsvgaStencipOp2GL(uint32_t stencilOp)
 
 int vmsvga3dSetRenderState(PVGASTATE pThis, uint32_t cid, uint32_t cRenderStates, SVGA3dRenderState *pRenderState)
 {
-    uint32_t                    val;
+    uint32_t                    val = UINT32_MAX; /* Shut up MSC. */
     PVMSVGA3DCONTEXT            pContext;
     PVMSVGA3DSTATE              pState = pThis->svga.p3dState;
     AssertReturn(pState, VERR_NO_MEMORY);
@@ -3888,7 +3903,7 @@ int vmsvga3dSetRenderState(PVGASTATE pThis, uint32_t cid, uint32_t cRenderStates
 
     for (unsigned i = 0; i < cRenderStates; i++)
     {
-        GLenum enableCap = ~0U;
+        GLenum enableCap = ~(GLenum)0;
         Log(("vmsvga3dSetRenderState: cid=%x state=%s (%d) val=%x\n", cid, vmsvga3dGetRenderStateName(pRenderState[i].state), pRenderState[i].state, pRenderState[i].uintValue));
         /* Save the render state for vm state saving. */
         if (pRenderState[i].state < SVGA3D_RS_MAX)
@@ -4687,7 +4702,7 @@ int vmsvga3dSetRenderState(PVGASTATE pThis, uint32_t cid, uint32_t cRenderStates
             break;
         }
 
-        if (enableCap != ~0U)
+        if (enableCap != ~(GLenum)0)
         {
             if (val)
                 glEnable(enableCap);
@@ -5015,8 +5030,8 @@ uint32_t vmsvga3dSVGA3dColor2RGBA(SVGA3dColor value)
 
 int vmsvga3dSetTextureState(PVGASTATE pThis, uint32_t cid, uint32_t cTextureStates, SVGA3dTextureState *pTextureState)
 {
-    GLenum                      val;
-    GLenum                      currentStage = ~0L;
+    GLenum                      val = ~(GLenum)0; /* Shut up MSC. */
+    GLenum                      currentStage = ~(GLenum)0;
     PVMSVGA3DCONTEXT            pContext;
     PVMSVGA3DSTATE              pState = pThis->svga.p3dState;
     AssertReturn(pState, VERR_NO_MEMORY);
@@ -5034,8 +5049,10 @@ int vmsvga3dSetTextureState(PVGASTATE pThis, uint32_t cid, uint32_t cTextureStat
 
     for (unsigned i = 0; i < cTextureStates; i++)
     {
-        GLenum textureType = ~0U;
-        GLenum samplerType = ~0U;
+        GLenum textureType = ~(GLenum)0;
+#if 0
+        GLenum samplerType = ~(GLenum)0;
+#endif
 
         Log(("vmsvga3dSetTextureState: cid=%x stage=%d type=%s (%x) val=%x\n", cid, pTextureState[i].stage, vmsvga3dTextureStateToString(pTextureState[i].name), pTextureState[i].name, pTextureState[i].value));
         /* Record the texture state for vm state saving. */
@@ -5256,7 +5273,7 @@ int vmsvga3dSetTextureState(PVGASTATE pThis, uint32_t cid, uint32_t cTextureStat
             break;
         }
 
-        if (textureType != ~0U)
+        if (textureType != ~(GLenum)0)
         {
             glTexParameteri(GL_TEXTURE_2D /** @todo flexible type */, textureType, val);
             VMSVGA3D_CHECK_LAST_ERROR(pState, pContext);
@@ -6138,11 +6155,14 @@ int vmsvga3dDrawPrimitivesCleanupVertexDecls(PVGASTATE pThis, PVMSVGA3DCONTEXT p
     return VINF_SUCCESS;
 }
 
-int vmsvga3dDrawPrimitives(PVGASTATE pThis, uint32_t cid, uint32_t numVertexDecls, SVGA3dVertexDecl *pVertexDecl, uint32_t numRanges, SVGA3dPrimitiveRange *pRange, uint32_t cVertexDivisor, SVGA3dVertexDivisor *pVertexDivisor)
+int vmsvga3dDrawPrimitives(PVGASTATE pThis, uint32_t cid, uint32_t numVertexDecls, SVGA3dVertexDecl *pVertexDecl,
+                           uint32_t numRanges, SVGA3dPrimitiveRange *pRange, uint32_t cVertexDivisor,
+                           SVGA3dVertexDivisor *pVertexDivisor)
 {
+    RT_NOREF(pVertexDivisor);
     PVMSVGA3DSTATE               pState = pThis->svga.p3dState;
-    PVMSVGA3DCONTEXT             pContext;
     AssertReturn(pState, VERR_INTERNAL_ERROR);
+    PVMSVGA3DCONTEXT             pContext;
     int                          rc = VERR_NOT_IMPLEMENTED;
     uint32_t                     iCurrentVertex;
 
@@ -6168,12 +6188,14 @@ int vmsvga3dDrawPrimitives(PVGASTATE pThis, uint32_t cid, uint32_t numVertexDecl
     {
         switch (pVertexDecl[iVertex].identity.usage)
         {
-        case SVGA3D_DECLUSAGE_POSITIONT:
-            Log(("ShaderSetPositionTransformed: (%d,%d)\n", pContext->state.RectViewPort.w, pContext->state.RectViewPort.h));
-        case SVGA3D_DECLUSAGE_POSITION:
-            ShaderSetPositionTransformed(pContext->pShaderContext, pContext->state.RectViewPort.w, pContext->state.RectViewPort.h, 
-                                         pVertexDecl[iVertex].identity.usage == SVGA3D_DECLUSAGE_POSITIONT);
-            break;
+            case SVGA3D_DECLUSAGE_POSITIONT:
+                Log(("ShaderSetPositionTransformed: (%d,%d)\n", pContext->state.RectViewPort.w, pContext->state.RectViewPort.h));
+            case SVGA3D_DECLUSAGE_POSITION:
+                ShaderSetPositionTransformed(pContext->pShaderContext, pContext->state.RectViewPort.w,
+                                             pContext->state.RectViewPort.h,
+                                             pVertexDecl[iVertex].identity.usage == SVGA3D_DECLUSAGE_POSITIONT);
+                break;
+            default:  /* Shut up MSC. */ break;
         }
     }
 
@@ -6731,18 +6753,21 @@ int vmsvga3dShaderSetConst(PVGASTATE pThis, uint32_t cid, uint32_t reg, SVGA3dSh
 
 int vmsvga3dQueryBegin(PVGASTATE pThis, uint32_t cid, SVGA3dQueryType type)
 {
+    RT_NOREF(pThis, cid, type);
     AssertFailed();
     return VERR_NOT_IMPLEMENTED;
 }
 
 int vmsvga3dQueryEnd(PVGASTATE pThis, uint32_t cid, SVGA3dQueryType type, SVGAGuestPtr guestResult)
 {
+    RT_NOREF(pThis, cid, type, guestResult);
     AssertFailed();
     return VERR_NOT_IMPLEMENTED;
 }
 
 int vmsvga3dQueryWait(PVGASTATE pThis, uint32_t cid, SVGA3dQueryType type, SVGAGuestPtr guestResult)
 {
+    RT_NOREF(pThis, cid, type, guestResult);
     AssertFailed();
     return VERR_NOT_IMPLEMENTED;
 }
diff --git a/src/VBox/Devices/Graphics/DevVGA-SVGA3d-savedstate.cpp b/src/VBox/Devices/Graphics/DevVGA-SVGA3d-savedstate.cpp
index b5d976e..fe15caf 100644
--- a/src/VBox/Devices/Graphics/DevVGA-SVGA3d-savedstate.cpp
+++ b/src/VBox/Devices/Graphics/DevVGA-SVGA3d-savedstate.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -148,6 +148,7 @@ static int vmsvga3dLoadReinitContext(PVGASTATE pThis, PVMSVGA3DCONTEXT pContext)
 
 int vmsvga3dLoadExec(PVGASTATE pThis, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass)
 {
+    RT_NOREF(uVersion, uPass);
     PVMSVGA3DSTATE pState = pThis->svga.p3dState;
     AssertReturn(pState, VERR_NO_MEMORY);
     int            rc;
@@ -426,6 +427,7 @@ int vmsvga3dLoadExec(PVGASTATE pThis, PSSMHANDLE pSSM, uint32_t uVersion, uint32
 
 static int vmsvga3dSaveContext(PVGASTATE pThis, PSSMHANDLE pSSM, PVMSVGA3DCONTEXT pContext)
 {
+    RT_NOREF(pThis);
     uint32_t cid = pContext->id;
 
     /* Save the id first. */
@@ -609,7 +611,7 @@ int vmsvga3dSaveExec(PVGASTATE pThis, PSSMHANDLE pSSM)
                         {
                         case SVGA3D_SURFACE_HINT_DEPTHSTENCIL:
                         case SVGA3D_SURFACE_HINT_DEPTHSTENCIL | SVGA3D_SURFACE_HINT_TEXTURE:
-                            /* @todo unable to easily fetch depth surface data in d3d 9 */
+                            /** @todo unable to easily fetch depth surface data in d3d 9 */
                             fSkipSave = true;
                             break;
                         case SVGA3D_SURFACE_HINT_TEXTURE | SVGA3D_SURFACE_HINT_RENDERTARGET:
@@ -632,7 +634,7 @@ int vmsvga3dSaveExec(PVGASTATE pThis, PSSMHANDLE pSSM)
                                     {
                                         IDirect3DSurface9 *pSrc, *pDest;
 
-                                        /* @todo stricter checks for associated context */
+                                        /** @todo stricter checks for associated context */
                                         uint32_t cid = pSurface->idAssociatedContext;
                                         if (    cid >= pState->cContexts
                                             ||  pState->papContexts[cid]->id != cid)
@@ -756,7 +758,7 @@ int vmsvga3dSaveExec(PVGASTATE pThis, PSSMHANDLE pSSM)
                             /* no break */
                         case SVGA3D_SURFACE_HINT_DEPTHSTENCIL:
                         case SVGA3D_SURFACE_HINT_DEPTHSTENCIL | SVGA3D_SURFACE_HINT_TEXTURE:
-                            /* @todo fetch data from the renderbuffer */
+                            /** @todo fetch data from the renderbuffer */
                             /* No data follows */
                             rc = SSMR3PutBool(pSSM, false);
                             AssertRCReturn(rc, rc);
@@ -845,7 +847,8 @@ int vmsvga3dSaveExec(PVGASTATE pThis, PSSMHANDLE pSSM)
     return VINF_SUCCESS;
 }
 
-uint32_t vmsvga3dSaveShaderConst(PVMSVGA3DCONTEXT pContext, uint32_t reg, SVGA3dShaderType type, SVGA3dShaderConstType ctype, uint32_t val1, uint32_t val2, uint32_t val3, uint32_t val4)
+int vmsvga3dSaveShaderConst(PVMSVGA3DCONTEXT pContext, uint32_t reg, SVGA3dShaderType type, SVGA3dShaderConstType ctype,
+                            uint32_t val1, uint32_t val2, uint32_t val3, uint32_t val4)
 {
     /* Choose a sane upper limit. */
     AssertReturn(reg < _32K, VERR_INVALID_PARAMETER);
diff --git a/src/VBox/Devices/Graphics/DevVGA-SVGA3d-shared.cpp b/src/VBox/Devices/Graphics/DevVGA-SVGA3d-shared.cpp
index 3e1eeef..750048c 100644
--- a/src/VBox/Devices/Graphics/DevVGA-SVGA3d-shared.cpp
+++ b/src/VBox/Devices/Graphics/DevVGA-SVGA3d-shared.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -77,11 +77,12 @@ int vmsvga3dSendThreadMessage(RTTHREAD pWindowThread, RTSEMEVENT WndRequestSem,
  * The async window handling thread
  *
  * @returns VBox status code.
- * @param   pDevIns     The VGA device instance.
- * @param   pThread     The send thread.
+ * @param   hThreadSelf     This thread.
+ * @param   pvUser          Request sempahore handle.
  */
-DECLCALLBACK(int) vmsvga3dWindowThread(RTTHREAD ThreadSelf, void *pvUser)
+DECLCALLBACK(int) vmsvga3dWindowThread(RTTHREAD hThreadSelf, void *pvUser)
 {
+    RT_NOREF(hThreadSelf);
     RTSEMEVENT      WndRequestSem = (RTSEMEVENT)pvUser;
     WNDCLASSEX      wc;
 
@@ -91,7 +92,7 @@ DECLCALLBACK(int) vmsvga3dWindowThread(RTTHREAD ThreadSelf, void *pvUser)
     wc.lpfnWndProc      = (WNDPROC) vmsvga3dWndProc;
     wc.cbClsExtra       = 0;
     wc.cbWndExtra       = 0;
-    wc.hInstance        = GetModuleHandle("VBoxDD.dll");    /* @todo hardcoded name.. */
+    wc.hInstance        = GetModuleHandle("VBoxDD.dll");    /** @todo hardcoded name.. */
     wc.hIcon            = LoadIcon(NULL, IDI_APPLICATION);
     wc.hCursor          = LoadCursor(NULL, IDC_ARROW);
     wc.hbrBackground    = NULL;
@@ -169,8 +170,8 @@ DECLCALLBACK(int) vmsvga3dWindowThread(RTTHREAD ThreadSelf, void *pvUser)
             }
             if (msg.message == WM_VMSVGA3D_DESTROYWINDOW)
             {
-                BOOL ret = DestroyWindow((HWND)msg.wParam);
-                Assert(ret);
+                BOOL fRc = DestroyWindow((HWND)msg.wParam);
+                Assert(fRc); NOREF(fRc);
                 /* Signal to the caller that we're done. */
                 RTSemEventSignal(WndRequestSem);
                 continue;
@@ -191,8 +192,8 @@ DECLCALLBACK(int) vmsvga3dWindowThread(RTTHREAD ThreadSelf, void *pvUser)
                 pCS->cx = rectClient.right - rectClient.left;
                 pCS->cy = rectClient.bottom - rectClient.top;
 #endif
-                BOOL ret = SetWindowPos(hwnd, 0, pCS->x, pCS->y, pCS->cx, pCS->cy, SWP_NOZORDER | SWP_NOMOVE);
-                Assert(ret);
+                BOOL fRc = SetWindowPos(hwnd, 0, pCS->x, pCS->y, pCS->cx, pCS->cy, SWP_NOZORDER | SWP_NOMOVE);
+                Assert(fRc); NOREF(fRc);
 
                 /* Signal to the caller that we're done. */
                 RTSemEventSignal(WndRequestSem);
diff --git a/src/VBox/Devices/Graphics/DevVGA-SVGA3d-win.cpp b/src/VBox/Devices/Graphics/DevVGA-SVGA3d-win.cpp
index 28c6a08..e432a04 100644
--- a/src/VBox/Devices/Graphics/DevVGA-SVGA3d-win.cpp
+++ b/src/VBox/Devices/Graphics/DevVGA-SVGA3d-win.cpp
@@ -404,6 +404,7 @@ static uint32_t vmsvga3dGetSurfaceFormatSupport(PVMSVGA3DSTATE pState3D, uint32_
 
 static uint32_t vmsvga3dGetDepthFormatSupport(PVMSVGA3DSTATE pState3D, uint32_t idx3dCaps, D3DFORMAT format)
 {
+    RT_NOREF(idx3dCaps);
     HRESULT  hr;
     uint32_t result = 0;
 
@@ -544,7 +545,7 @@ int vmsvga3dQueryCaps(PVGASTATE pThis, uint32_t idx3dCaps, uint32_t *pu32Val)
         break;
 
     case SVGA3D_DEVCAP_MAX_SHADER_TEXTURES:
-        /* @todo ?? */
+        /** @todo ?? */
         rc = VERR_INVALID_PARAMETER;
         break;
 
@@ -618,7 +619,7 @@ int vmsvga3dQueryCaps(PVGASTATE pThis, uint32_t idx3dCaps, uint32_t *pu32Val)
     case SVGA3D_DEVCAP_MAX_VERTEX_SHADER_TEXTURES:
         break;
 
-    case SVGA3D_DEVCAP_MAX_RENDER_TARGETS:  /* @todo same thing? */
+    case SVGA3D_DEVCAP_MAX_RENDER_TARGETS:  /** @todo same thing? */
     case SVGA3D_DEVCAP_MAX_SIMULTANEOUS_RENDER_TARGETS:
         *pu32Val = pCaps->NumSimultaneousRTs;
         break;
@@ -689,7 +690,7 @@ int vmsvga3dQueryCaps(PVGASTATE pThis, uint32_t idx3dCaps, uint32_t *pu32Val)
         break;
 
     case SVGA3D_DEVCAP_SURFACEFMT_Z_D24S8:
-    case SVGA3D_DEVCAP_SURFACEFMT_Z_D24S8_INT: /* @todo not correct */
+    case SVGA3D_DEVCAP_SURFACEFMT_Z_D24S8_INT: /** @todo not correct */
         *pu32Val = vmsvga3dGetDepthFormatSupport(pState, idx3dCaps, D3DFMT_D24S8);
         break;
 
@@ -698,7 +699,7 @@ int vmsvga3dQueryCaps(PVGASTATE pThis, uint32_t idx3dCaps, uint32_t *pu32Val)
         break;
 
     case SVGA3D_DEVCAP_SURFACEFMT_Z_DF16:
-        /* @todo supposed to be floating-point, but unable to find a match for D3D9... */
+        /** @todo supposed to be floating-point, but unable to find a match for D3D9... */
         *pu32Val = 0;
         break;
 
@@ -947,7 +948,7 @@ D3DFORMAT vmsvga3dSurfaceFormat2D3D(SVGA3dSurfaceFormat format)
         return D3DFMT_D32;
     case SVGA3D_Z_D16:
         return D3DFMT_D16;
-    case SVGA3D_Z_D24S8_INT:    /* @todo not correct */
+    case SVGA3D_Z_D24S8_INT:    /** @todo not correct */
     case SVGA3D_Z_D24S8:
         return D3DFMT_D24S8;
     case SVGA3D_Z_D15S1:
@@ -956,7 +957,7 @@ D3DFORMAT vmsvga3dSurfaceFormat2D3D(SVGA3dSurfaceFormat format)
         return D3DFMT_D24X8;
     /* Advanced D3D9 depth formats. */
     case SVGA3D_Z_DF16:
-        /* @todo supposed to be floating-point, but unable to find a match for D3D9... */
+        /** @todo supposed to be floating-point, but unable to find a match for D3D9... */
         AssertFailedReturn(D3DFMT_UNKNOWN);
     case SVGA3D_Z_DF24:
         return D3DFMT_D24FS8;
@@ -1059,6 +1060,10 @@ D3DFORMAT vmsvga3dSurfaceFormat2D3D(SVGA3dSurfaceFormat format)
     case SVGA3D_BC5_UNORM:
         /* Unknown; only in DX10 & 11 */
         break;
+
+    case SVGA3D_FORMAT_MAX:     /* shut up MSC */
+    case SVGA3D_FORMAT_INVALID:
+        break;
     }
     AssertFailedReturn(D3DFMT_UNKNOWN);
 }
@@ -1074,7 +1079,7 @@ D3DMULTISAMPLE_TYPE vmsvga3dMultipeSampleCount2D3D(uint32_t multisampleCount)
     if (multisampleCount > 16)
         return D3DMULTISAMPLE_NONE;
 
-    /* @todo exact same mapping as d3d? */
+    /** @todo exact same mapping as d3d? */
     return (D3DMULTISAMPLE_TYPE)multisampleCount;
 }
 
@@ -1087,6 +1092,7 @@ D3DMULTISAMPLE_TYPE vmsvga3dMultipeSampleCount2D3D(uint32_t multisampleCount)
  */
 void vmsvga3dBackSurfaceDestroy(PVMSVGA3DSTATE pState, PVMSVGA3DSURFACE pSurface)
 {
+    RT_NOREF(pState);
     RTAvlU32Destroy(&pSurface->pSharedObjectTree, vmsvga3dSharedSurfaceDestroyTree, pSurface);
     Assert(pSurface->pSharedObjectTree == NULL);
 
@@ -1163,6 +1169,7 @@ DECLCALLBACK(int) vmsvga3dSharedSurfaceDestroyTree(PAVLU32NODECORE pNode, void *
 /* Get the shared surface copy or create a new one. */
 static PVMSVGA3DSHAREDSURFACE vmsvga3dSurfaceGetSharedCopy(PVGASTATE pThis, PVMSVGA3DCONTEXT pContext, PVMSVGA3DSURFACE pSurface)
 {
+    RT_NOREF(pThis);
     Assert(pSurface->hSharedObject);
 
     PVMSVGA3DSHAREDSURFACE pSharedSurface = (PVMSVGA3DSHAREDSURFACE)RTAvlU32Get(&pSurface->pSharedObjectTree, pContext->id);
@@ -1204,6 +1211,7 @@ static PVMSVGA3DSHAREDSURFACE vmsvga3dSurfaceGetSharedCopy(PVGASTATE pThis, PVMS
  */
 static int vmsvga3dSurfaceTrackUsage(PVMSVGA3DSTATE pState, PVMSVGA3DCONTEXT pContext, PVMSVGA3DSURFACE pSurface)
 {
+    RT_NOREF(pState);
 #ifndef VBOX_VMSVGA3D_WITH_WINE_OPENGL
     Assert(pSurface->id != SVGA3D_INVALID_ID);
 
@@ -1253,6 +1261,7 @@ static int vmsvga3dSurfaceTrackUsageById(PVMSVGA3DSTATE pState, PVMSVGA3DCONTEXT
 /* Wait for all drawing, that uses this surface, to finish. */
 int vmsvga3dSurfaceFlush(PVGASTATE pThis, PVMSVGA3DSURFACE pSurface)
 {
+    RT_NOREF(pThis);
 #ifndef VBOX_VMSVGA3D_WITH_WINE_OPENGL
     HRESULT hr;
 
@@ -1314,7 +1323,7 @@ int vmsvga3dSurfaceCopy(PVGASTATE pThis, SVGA3dSurfaceImageId dest, SVGA3dSurfac
         uint32_t            cid;
         PVMSVGA3DCONTEXT    pContext;
 
-        /* @todo stricter checks for associated context */
+        /** @todo stricter checks for associated context */
         cid = pSurfaceSrc->idAssociatedContext;
         if (    cid >= pState->cContexts
             ||  pState->papContexts[cid]->id != cid)
@@ -1336,7 +1345,7 @@ int vmsvga3dSurfaceCopy(PVGASTATE pThis, SVGA3dSurfaceImageId dest, SVGA3dSurfac
         PVMSVGA3DCONTEXT        pContext;
         IDirect3DTexture9      *pSrcTexture = pSurfaceSrc->u.pTexture;
 
-        /* @todo stricter checks for associated context */
+        /** @todo stricter checks for associated context */
         cid = pSurfaceDest->idAssociatedContext;
         if (    cid >= pState->cContexts
             ||  pState->papContexts[cid]->id != cid)
@@ -1541,6 +1550,7 @@ int vmsvga3dBackCreateTexture(PVMSVGA3DSTATE pState, PVMSVGA3DCONTEXT pContext,
                               PVMSVGA3DSURFACE pSurface)
 
 {
+    RT_NOREF(pState);
     HRESULT hr;
     IDirect3DTexture9 *pTexture;
 
@@ -1810,7 +1820,7 @@ int vmsvga3dBackSurfaceDMACopyBox(PVGASTATE pThis, PVMSVGA3DSTATE pState, PVMSVG
         Rect.right  = pBox->x + pBox->w;   /* exclusive */
         Rect.bottom = pBox->y + pBox->h;   /* exclusive */
 
-        /* @todo inefficient for VRAM buffers!! */
+        /** @todo inefficient for VRAM buffers!! */
         if (fTexture)
         {
             if (pSurface->bounce.pTexture)
@@ -1821,7 +1831,7 @@ int vmsvga3dBackSurfaceDMACopyBox(PVGASTATE pThis, PVMSVGA3DSTATE pState, PVMSVG
                 {
                     IDirect3DSurface9 *pSrc, *pDest;
 
-                    /* @todo stricter checks for associated context */
+                    /** @todo stricter checks for associated context */
                     uint32_t cid = pSurface->idAssociatedContext;
                     if (    cid >= pState->cContexts
                         ||  pState->papContexts[cid]->id != cid)
@@ -1831,7 +1841,7 @@ int vmsvga3dBackSurfaceDMACopyBox(PVGASTATE pThis, PVMSVGA3DSTATE pState, PVMSVG
                     }
                     pContext = pState->papContexts[cid];
 
-                    /* @todo only sync when something was actually rendered (since the last sync) */
+                    /** @todo only sync when something was actually rendered (since the last sync) */
                     Log(("vmsvga3dSurfaceDMA: sync bounce buffer\n"));
                     hr = pSurface->bounce.pTexture->GetSurfaceLevel(uHostMipmap, &pDest);
                     AssertMsgReturn(hr == D3D_OK, ("vmsvga3dSurfaceDMA: GetSurfaceLevel failed with %x\n", hr), VERR_INTERNAL_ERROR);
@@ -1890,7 +1900,7 @@ int vmsvga3dBackSurfaceDMACopyBox(PVGASTATE pThis, PVMSVGA3DSTATE pState, PVMSVG
 
                 if (transfer == SVGA3D_WRITE_HOST_VRAM)
                 {
-                    /* @todo stricter checks for associated context */
+                    /** @todo stricter checks for associated context */
                     uint32_t cid = pSurface->idAssociatedContext;
                     if (    cid >= pState->cContexts
                         ||  pState->papContexts[cid]->id != cid)
@@ -1979,10 +1989,10 @@ int vmsvga3dSurfaceBlitToScreen(PVGASTATE pThis, uint32_t dest, SVGASignedRect d
         Log(("vmsvga3dSurfaceBlitToScreen: clipping rect %d (%d,%d)(%d,%d)\n", i, pRect[i].left, pRect[i].top, pRect[i].right, pRect[i].bottom));
     }
 
-    /* @todo Only screen 0 for now. */
+    /** @todo Only screen 0 for now. */
     AssertReturn(dest == 0, VERR_INTERNAL_ERROR);
     AssertReturn(src.mipmap == 0 && src.face == 0, VERR_INVALID_PARAMETER);
-    /* @todo scaling */
+    /** @todo scaling */
     AssertReturn(destRect.right - destRect.left == srcRect.right - srcRect.left && destRect.bottom - destRect.top == srcRect.bottom - srcRect.top, VERR_INVALID_PARAMETER);
 
     if (cRects == 0)
@@ -2024,7 +2034,7 @@ int vmsvga3dSurfaceBlitToScreen(PVGASTATE pThis, uint32_t dest, SVGASignedRect d
         dest.ptr.offset = 0;
         dest.pitch      = pThis->svga.cbScanline;
 
-        /* @todo merge into one SurfaceDMA call */
+        /** @todo merge into one SurfaceDMA call */
         for (uint32_t i = 0; i < cRects; i++)
         {
             /* The clipping rectangle is relative to the top-left corner of srcRect & destRect. Adjust here. */
@@ -2056,7 +2066,7 @@ int vmsvga3dSurfaceBlitToScreen(PVGASTATE pThis, uint32_t dest, SVGASignedRect d
             pSurface = pState->papSurfaces[sid];
             uint32_t            cid;
 
-            /* @todo stricter checks for associated context */
+            /** @todo stricter checks for associated context */
             cid = pSurface->idAssociatedContext;
 
             if (    cid >= pState->cContexts
@@ -2110,7 +2120,7 @@ int vmsvga3dGenerateMipmaps(PVGASTATE pThis, uint32_t sid, SVGA3dTextureFilter f
         PVMSVGA3DCONTEXT    pContext;
         uint32_t            cid;
 
-        /* @todo stricter checks for associated context */
+        /** @todo stricter checks for associated context */
         cid = pSurface->idAssociatedContext;
 
         if (    cid >= pState->cContexts
@@ -2142,7 +2152,6 @@ int vmsvga3dCommandPresent(PVGASTATE pThis, uint32_t sid, uint32_t cRects, SVGA3
 {
     PVMSVGA3DSTATE      pState = pThis->svga.p3dState;
     PVMSVGA3DSURFACE    pSurface;
-    int                 rc = VINF_SUCCESS;
     PVMSVGA3DCONTEXT    pContext;
     uint32_t            cid;
     HRESULT             hr;
@@ -2156,7 +2165,7 @@ int vmsvga3dCommandPresent(PVGASTATE pThis, uint32_t sid, uint32_t cRects, SVGA3
     pSurface = pState->papSurfaces[sid];
     AssertReturn(pSurface->idAssociatedContext != SVGA3D_INVALID_ID, VERR_INTERNAL_ERROR);
 
-    /* @todo stricter checks for associated context */
+    /** @todo stricter checks for associated context */
     cid = pSurface->idAssociatedContext;
     Log(("vmsvga3dCommandPresent: sid=%x cRects=%d cid=%x\n", sid, cRects, cid));
     for (uint32_t i=0; i < cRects; i++)
@@ -2461,12 +2470,12 @@ int vmsvga3dContextDefine(PVGASTATE pThis, uint32_t cid)
     PresParam.MultiSampleQuality            = 0;
     PresParam.SwapEffect                    = D3DSWAPEFFECT_FLIP;
     PresParam.hDeviceWindow                 = pContext->hwnd;
-    PresParam.Windowed                      = TRUE;     /* @todo */
+    PresParam.Windowed                      = TRUE;     /** @todo */
     PresParam.EnableAutoDepthStencil        = FALSE;
     PresParam.AutoDepthStencilFormat        = D3DFMT_UNKNOWN;   /* not relevant */
     PresParam.Flags                         = 0;
     PresParam.FullScreen_RefreshRateInHz    = 0;        /* windowed -> 0 */
-    /* @todo consider using D3DPRESENT_DONOTWAIT so we don't wait for the GPU during Present calls. */
+    /** @todo consider using D3DPRESENT_DONOTWAIT so we don't wait for the GPU during Present calls. */
     PresParam.PresentationInterval          = D3DPRESENT_INTERVAL_IMMEDIATE;
 
 #ifdef VBOX_VMSVGA3D_WITH_WINE_OPENGL
@@ -2686,7 +2695,7 @@ int vmsvga3dChangeMode(PVGASTATE pThis)
                             {
                                 IDirect3DSurface9 *pSrc, *pDest;
 
-                                /* @todo only sync when something was actually rendered (since the last sync) */
+                                /** @todo only sync when something was actually rendered (since the last sync) */
                                 Log(("vmsvga3dChangeMode: sync bounce buffer (level %d)\n", i));
                                 hr = pSurface->bounce.pTexture->GetSurfaceLevel(i, &pDest);
                                 AssertMsgReturn(hr == D3D_OK, ("vmsvga3dChangeMode: GetSurfaceLevel failed with %x\n", hr), VERR_INTERNAL_ERROR);
@@ -2730,7 +2739,7 @@ int vmsvga3dChangeMode(PVGASTATE pThis)
                     switch (pSurface->flags & (SVGA3D_SURFACE_HINT_INDEXBUFFER | SVGA3D_SURFACE_HINT_VERTEXBUFFER | SVGA3D_SURFACE_HINT_TEXTURE | SVGA3D_SURFACE_HINT_RENDERTARGET | SVGA3D_SURFACE_HINT_DEPTHSTENCIL | SVGA3D_SURFACE_CUBEMAP))
                     {
                     case SVGA3D_SURFACE_CUBEMAP:
-                        AssertFailed(); /* @todo */
+                        AssertFailed(); /** @todo */
                         break;
 
                     case SVGA3D_SURFACE_HINT_INDEXBUFFER:
@@ -2799,12 +2808,12 @@ int vmsvga3dChangeMode(PVGASTATE pThis)
             PresParam.MultiSampleQuality            = 0;
             PresParam.SwapEffect                    = D3DSWAPEFFECT_FLIP;
             PresParam.hDeviceWindow                 = pContext->hwnd;
-            PresParam.Windowed                      = TRUE;     /* @todo */
+            PresParam.Windowed                      = TRUE;     /** @todo */
             PresParam.EnableAutoDepthStencil        = FALSE;
             PresParam.AutoDepthStencilFormat        = D3DFMT_UNKNOWN;   /* not relevant */
             PresParam.Flags                         = 0;
             PresParam.FullScreen_RefreshRateInHz    = 0;        /* windowed -> 0 */
-            /* @todo consider using D3DPRESENT_DONOTWAIT so we don't wait for the GPU during Present calls. */
+            /** @todo consider using D3DPRESENT_DONOTWAIT so we don't wait for the GPU during Present calls. */
             PresParam.PresentationInterval          = D3DPRESENT_INTERVAL_IMMEDIATE;;
 
 #ifdef VBOX_VMSVGA3D_WITH_WINE_OPENGL
@@ -2997,7 +3006,7 @@ int vmsvga3dSetZRange(PVGASTATE pThis, uint32_t cid, SVGA3dZRange zRange)
     AssertMsgReturn(hr == D3D_OK, ("vmsvga3dSetZRange: GetViewport failed with %x\n", hr), VERR_INTERNAL_ERROR);
 
     Log(("vmsvga3dSetZRange: old viewport settings (%d,%d)(%d,%d) z=%d/%d\n", viewport.X, viewport.Y, viewport.Width, viewport.Height, (uint32_t)(viewport.MinZ * 100.0), (uint32_t)(viewport.MaxZ * 100.0)));
-    /* @todo convert the depth range from -1-1 to 0-1 although we shouldn't be getting such values in the first place... */
+    /** @todo convert the depth range from -1-1 to 0-1 although we shouldn't be getting such values in the first place... */
     if (zRange.min < 0.0)
         zRange.min = 0.0;
     if (zRange.max > 1.0)
@@ -3051,7 +3060,7 @@ static DWORD vmsvga3dBlendOp2D3D(uint32_t blendOp, DWORD defaultBlendOp)
 
 int vmsvga3dSetRenderState(PVGASTATE pThis, uint32_t cid, uint32_t cRenderStates, SVGA3dRenderState *pRenderState)
 {
-    DWORD                       val;
+    DWORD                       val = 0; /* Shut up MSC */
     HRESULT                     hr;
     PVMSVGA3DCONTEXT            pContext;
     PVMSVGA3DSTATE              pState = pThis->svga.p3dState;
@@ -3283,7 +3292,7 @@ int vmsvga3dSetRenderState(PVGASTATE pThis, uint32_t cid, uint32_t cRenderStates
                 AssertMsgFailedReturn(("Unexpected fill mode %d\n", mode.s.mode), VERR_INTERNAL_ERROR);
                 break;
             }
-            /* @todo ignoring face for now. */
+            /** @todo ignoring face for now. */
             renderState = D3DRS_FILLMODE;
             break;
         }
@@ -3296,7 +3305,7 @@ int vmsvga3dSetRenderState(PVGASTATE pThis, uint32_t cid, uint32_t cRenderStates
 
         case SVGA3D_RS_LINEPATTERN:            /* SVGA3dLinePattern */
             /* No longer supported by d3d; mesagl comments suggest not all backends support it */
-            /* @todo */
+            /** @todo */
             Log(("WARNING: SVGA3D_RS_LINEPATTERN %x not supported!!\n", pRenderState[i].uintValue));
             /*
             renderState = D3DRS_LINEPATTERN;
@@ -3413,7 +3422,7 @@ int vmsvga3dSetRenderState(PVGASTATE pThis, uint32_t cid, uint32_t cRenderStates
 
         case SVGA3D_RS_COORDINATETYPE:         /* SVGA3dCoordinateType */
             Assert(pRenderState[i].uintValue == SVGA3D_COORDINATE_LEFTHANDED);
-            /* @todo setup a view matrix to scale the world space by -1 in the z-direction for right handed coordinates. */
+            /** @todo setup a view matrix to scale the world space by -1 in the z-direction for right handed coordinates. */
             /*
             renderState = D3DRS_COORDINATETYPE;
             val = pRenderState[i].uintValue;
@@ -3421,7 +3430,7 @@ int vmsvga3dSetRenderState(PVGASTATE pThis, uint32_t cid, uint32_t cRenderStates
             break;
 
         case SVGA3D_RS_ZBIAS:                  /* float */
-            /* @todo unknown meaning; depth bias is not identical
+            /** @todo unknown meaning; depth bias is not identical
             renderState = D3DRS_DEPTHBIAS;
             val = pRenderState[i].uintValue;
             */
@@ -3709,6 +3718,10 @@ int vmsvga3dSetRenderState(PVGASTATE pThis, uint32_t cid, uint32_t cRenderStates
             val = pRenderState[i].uintValue;
             */
             break;
+
+        case SVGA3D_RS_MAX:                   /* shut up MSC */
+        case SVGA3D_RS_INVALID:
+            AssertFailedBreak();
         }
 
         if (renderState != D3DRS_FORCE_DWORD)
@@ -3894,7 +3907,7 @@ int vmsvga3dSetRenderTarget(PVGASTATE pThis, uint32_t cid, SVGA3dRenderTargetTyp
         }
         Assert(pRenderTarget->idAssociatedContext == cid);
 
-        /* @todo Assert(!pRenderTarget->fDirty); */
+        /** @todo Assert(!pRenderTarget->fDirty); */
 
         AssertReturn(pRenderTarget->u.pSurface, VERR_INVALID_PARAMETER);
 
@@ -4072,7 +4085,7 @@ static DWORD vmsvga3dTextureCombiner2D3D(uint32_t value)
     case SVGA3D_TC_MODULATE4X:
         return D3DTOP_MODULATE4X;
     case SVGA3D_TC_DSDT:
-        AssertFailed(); /* @todo ??? */
+        AssertFailed(); /** @todo ??? */
         return D3DTOP_DISABLE;
     case SVGA3D_TC_DOTPRODUCT3:
         return D3DTOP_DOTPRODUCT3;
@@ -4137,13 +4150,13 @@ static DWORD vmsvga3dTextTransformFlags2D3D(uint32_t value)
     case SVGA3D_TEX_TRANSFORM_OFF:
         return D3DTTFF_DISABLE;
     case SVGA3D_TEX_TRANSFORM_S:
-        return D3DTTFF_COUNT1;      /* @todo correct? */
+        return D3DTTFF_COUNT1;      /** @todo correct? */
     case SVGA3D_TEX_TRANSFORM_T:
-        return D3DTTFF_COUNT2;      /* @todo correct? */
+        return D3DTTFF_COUNT2;      /** @todo correct? */
     case SVGA3D_TEX_TRANSFORM_R:
-        return D3DTTFF_COUNT3;      /* @todo correct? */
+        return D3DTTFF_COUNT3;      /** @todo correct? */
     case SVGA3D_TEX_TRANSFORM_Q:
-        return D3DTTFF_COUNT4;      /* @todo correct? */
+        return D3DTTFF_COUNT4;      /** @todo correct? */
     case SVGA3D_TEX_PROJECTED:
         return D3DTTFF_PROJECTED;
     default:
@@ -4154,7 +4167,7 @@ static DWORD vmsvga3dTextTransformFlags2D3D(uint32_t value)
 
 int vmsvga3dSetTextureState(PVGASTATE pThis, uint32_t cid, uint32_t cTextureStates, SVGA3dTextureState *pTextureState)
 {
-    DWORD                       val;
+    DWORD                       val = 0; /* Shut up MSC */
     HRESULT                     hr;
     PVMSVGA3DCONTEXT            pContext;
     PVMSVGA3DSTATE              pState = pThis->svga.p3dState;
@@ -4403,6 +4416,10 @@ int vmsvga3dSetTextureState(PVGASTATE pThis, uint32_t cid, uint32_t cTextureStat
         case SVGA3D_TS_TEXCOORDGEN:                 /* SVGA3dTextureCoordGen */
             AssertFailed();
             break;
+
+        case SVGA3D_TS_MAX:                   /* shut up MSC */
+        case SVGA3D_TS_INVALID:
+            AssertFailedBreak();
         }
 
         if (textureType != D3DTSS_FORCE_DWORD)
@@ -4447,7 +4464,7 @@ int vmsvga3dSetMaterial(PVGASTATE pThis, uint32_t cid, SVGA3dFace face, SVGA3dMa
     pContext->state.u32UpdateFlags |= VMSVGA3D_UPDATE_MATERIAL;
 
     /* @note face not used for D3D9 */
-    /* @todo ignore everything except SVGA3D_FACE_NONE? */
+    /** @todo ignore everything except SVGA3D_FACE_NONE? */
     //Assert(face == SVGA3D_FACE_NONE);
     if (face != SVGA3D_FACE_NONE)
         Log(("Unsupported face %d!!\n", face));
@@ -4852,10 +4869,11 @@ int vmsvga3dDrawPrimitives(PVGASTATE pThis, uint32_t cid, uint32_t numVertexDecl
                            uint32_t numRanges, SVGA3dPrimitiveRange *pRange,
                            uint32_t cVertexDivisor, SVGA3dVertexDivisor *pVertexDivisor)
 {
+    RT_NOREF(pVertexDivisor);
     PVMSVGA3DCONTEXT             pContext;
     PVMSVGA3DSTATE               pState = pThis->svga.p3dState;
     AssertReturn(pState, VERR_INTERNAL_ERROR);
-    int                          rc;
+    int                          rc = VINF_SUCCESS;
     HRESULT                      hr;
     uint32_t                     iCurrentVertex, iCurrentStreamId;
     IDirect3DVertexDeclaration9 *pVertexDeclD3D = NULL;
@@ -4867,7 +4885,7 @@ int vmsvga3dDrawPrimitives(PVGASTATE pThis, uint32_t cid, uint32_t numVertexDecl
     AssertReturn(numVertexDecls && numVertexDecls <= SVGA3D_MAX_VERTEX_ARRAYS, VERR_INVALID_PARAMETER);
     AssertReturn(numRanges && numRanges <= SVGA3D_MAX_DRAW_PRIMITIVE_RANGES, VERR_INVALID_PARAMETER);
     AssertReturn(!cVertexDivisor || cVertexDivisor == numVertexDecls, VERR_INVALID_PARAMETER);
-    /* @todo */
+    /** @todo */
     Assert(!cVertexDivisor);
 
     if (    cid >= pState->cContexts
@@ -5055,7 +5073,7 @@ int vmsvga3dDrawPrimitives(PVGASTATE pThis, uint32_t cid, uint32_t numVertexDecl
         }
         else
         {
-            Assert(pRange[iPrimitive].indexBias >= 0);  /* @todo */
+            Assert(pRange[iPrimitive].indexBias >= 0);  /** @todo */
 
             UINT numVertices;
 
@@ -5484,18 +5502,21 @@ int vmsvga3dShaderSetConst(PVGASTATE pThis, uint32_t cid, uint32_t reg, SVGA3dSh
 
 int vmsvga3dQueryBegin(PVGASTATE pThis, uint32_t cid, SVGA3dQueryType type)
 {
+    RT_NOREF(pThis, cid, type);
     AssertFailed();
     return VERR_NOT_IMPLEMENTED;
 }
 
 int vmsvga3dQueryEnd(PVGASTATE pThis, uint32_t cid, SVGA3dQueryType type, SVGAGuestPtr guestResult)
 {
+    RT_NOREF(pThis, cid, type, guestResult);
     AssertFailed();
     return VERR_NOT_IMPLEMENTED;
 }
 
 int vmsvga3dQueryWait(PVGASTATE pThis, uint32_t cid, SVGA3dQueryType type, SVGAGuestPtr guestResult)
 {
+    RT_NOREF(pThis, cid, type, guestResult);
     AssertFailed();
     return VERR_NOT_IMPLEMENTED;
 }
diff --git a/src/VBox/Devices/Graphics/DevVGA-SVGA3d.cpp b/src/VBox/Devices/Graphics/DevVGA-SVGA3d.cpp
index d3e01da..c6ef690 100644
--- a/src/VBox/Devices/Graphics/DevVGA-SVGA3d.cpp
+++ b/src/VBox/Devices/Graphics/DevVGA-SVGA3d.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Graphics/DevVGA-SVGA3d.h b/src/VBox/Devices/Graphics/DevVGA-SVGA3d.h
index 1388244..9f8bc42 100644
--- a/src/VBox/Devices/Graphics/DevVGA-SVGA3d.h
+++ b/src/VBox/Devices/Graphics/DevVGA-SVGA3d.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -98,7 +98,7 @@ int vmsvga3dQueryWait(PVGASTATE pThis, uint32_t cid, SVGA3dQueryType type, SVGAG
 
 /* DevVGA-SVGA3d-shared.h: */
 #if defined(RT_OS_WINDOWS) && defined(IN_RING3)
-# include <Windows.h>
+# include <iprt/win/windows.h>
 
 # define WM_VMSVGA3D_WAKEUP                     (WM_APP+1)
 # define WM_VMSVGA3D_CREATEWINDOW               (WM_APP+2)
diff --git a/src/VBox/Devices/Graphics/DevVGA.cpp b/src/VBox/Devices/Graphics/DevVGA.cpp
index 4c22241..6dc659c 100644
--- a/src/VBox/Devices/Graphics/DevVGA.cpp
+++ b/src/VBox/Devices/Graphics/DevVGA.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -266,19 +266,9 @@ typedef WINHDR *PWINHDR;
 
 
 /*********************************************************************************************************************************
-*   Internal Functions                                                                                                           *
-*********************************************************************************************************************************/
-#ifndef IN_RING3
-RT_C_DECLS_BEGIN
-DECLEXPORT(FNPGMRZPHYSPFHANDLER)  vgaLbfAccessPfHandler;
-RT_C_DECLS_END
-#endif
-PGM_ALL_CB_DECL(FNPGMPHYSHANDLER) vgaLFBAccessHandler;
-
-
-/*********************************************************************************************************************************
 *   Global Variables                                                                                                             *
 *********************************************************************************************************************************/
+#ifdef IN_RING3
 /* "Press F12 to select boot device." bitmap. */
 static const uint8_t g_abLogoF12BootText[] =
 {
@@ -316,6 +306,7 @@ static const uint8_t g_abLogoF12BootText[] =
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
 };
+#endif /* IN_RING3 */
 
 
 #ifndef VBOX_DEVICE_STRUCT_TESTCASE
@@ -348,6 +339,7 @@ DECLINLINE(bool) vga_is_dirty(PVGASTATE pThis, RTGCPHYS offVRAM)
     return ASMBitTest(&pThis->au32DirtyBitmap[0], offVRAM >> PAGE_SHIFT);
 }
 
+#ifdef IN_RING3
 /**
  * Reset dirty flags in a give range.
  *
@@ -362,6 +354,12 @@ DECLINLINE(void) vga_reset_dirty(PVGASTATE pThis, RTGCPHYS offVRAMStart, RTGCPHY
     Assert(offVRAMStart < offVRAMEnd);
     ASMBitClearRange(&pThis->au32DirtyBitmap[0], offVRAMStart >> PAGE_SHIFT, offVRAMEnd >> PAGE_SHIFT);
 }
+#endif /* IN_RING3 */
+
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable:4310 4245) /* Buggy warnings: cast truncates constant value; conversion from 'int' to 'const uint8_t', signed/unsigned mismatch */
+#endif
 
 /* force some bits to zero */
 static const uint8_t sr_mask[8] = {
@@ -394,6 +392,10 @@ static const uint8_t gr_mask[16] = {
     (uint8_t)~0xff, /* 0x0f */
 };
 
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
+
 #define cbswap_32(__x) \
 ((uint32_t)( \
                 (((uint32_t)(__x) & (uint32_t)0x000000ffUL) << 24) | \
@@ -446,6 +448,8 @@ static const uint32_t mask16[16] = {
 #define PAT(x) cbswap_32(x)
 #endif
 
+#ifdef IN_RING3
+
 static const uint32_t dmask16[16] = {
     PAT(0x00000000),
     PAT(0x000000ff),
@@ -472,10 +476,10 @@ static const uint32_t dmask4[4] = {
     PAT(0xffffffff),
 };
 
-#if defined(IN_RING3)
 static uint32_t expand4[256];
 static uint16_t expand2[256];
 static uint8_t expand4to8[16];
+
 #endif /* IN_RING3 */
 
 /* Update the values needed for calculating Vertical Retrace and
@@ -1517,7 +1521,8 @@ static int vga_mem_writeb(PVGASTATE pThis, RTGCPHYS addr, uint32_t val)
     return VINF_SUCCESS;
 }
 
-#if defined(IN_RING3)
+#ifdef IN_RING3
+
 typedef void vga_draw_glyph8_func(uint8_t *d, int linesize,
                                   const uint8_t *font_ptr, int h,
                                   uint32_t fgcol, uint32_t bgcol,
@@ -1860,9 +1865,9 @@ static int vga_draw_text(PVGASTATE pThis, bool full_update, bool fFailOnResize,
       /* if the cursor position changed, we update the old and new
          chars */
         if (pThis->cursor_offset < CH_ATTR_SIZE)
-            pThis->last_ch_attr[pThis->cursor_offset] = ~0;
+            pThis->last_ch_attr[pThis->cursor_offset] = UINT32_MAX;
         if (cursor_offset < CH_ATTR_SIZE)
-            pThis->last_ch_attr[cursor_offset] = ~0;
+            pThis->last_ch_attr[cursor_offset] = UINT32_MAX;
         pThis->cursor_offset = cursor_offset;
         pThis->cursor_start = pThis->cr[0xa];
         pThis->cursor_end = pThis->cr[0xb];
@@ -2100,7 +2105,7 @@ static int vga_resize_graphic(PVGASTATE pThis, int cx, int cy,
         return VERR_INTERNAL_ERROR;
 
 #if 0 //def VBOX_WITH_VDMA
-    /** @todo: we get a second resize here when VBVA is on, while we actually should not */
+    /** @todo we get a second resize here when VBVA is on, while we actually should not */
     /* do not do pfnResize in case VBVA is on since all mode changes are performed over VBVA
      * we are checking for VDMA state here to ensure this code works only for WDDM driver,
      * although we should avoid calling pfnResize for XPDM as well, since pfnResize is actually an extra resize
@@ -2151,7 +2156,8 @@ static int vga_resize_graphic(PVGASTATE pThis, int cx, int cy,
     return VINF_SUCCESS;
 }
 
-#ifdef VBOX_WITH_VMSVGA
+# ifdef VBOX_WITH_VMSVGA
+
 int vgaR3UpdateDisplay(VGAState *s, unsigned xStart, unsigned yStart, unsigned cx, unsigned cy)
 {
     uint32_t v;
@@ -2223,6 +2229,7 @@ int vgaR3UpdateDisplay(VGAState *s, unsigned xStart, unsigned yStart, unsigned c
 static int vmsvga_draw_graphic(PVGASTATE pThis, bool full_update, bool fFailOnResize, bool reset_dirty,
                                PDMIDISPLAYCONNECTOR *pDrv)
 {
+    RT_NOREF1(fFailOnResize);
     int y, page_min, page_max, linesize, y_start;
     int width, height, page0, page1, bwidth, bits;
     int disp_width;
@@ -2330,7 +2337,8 @@ static int vmsvga_draw_graphic(PVGASTATE pThis, bool full_update, bool fFailOnRe
     memset(pThis->invalidated_y_table, 0, ((height + 31) >> 5) * 4);
     return VINF_SUCCESS;
 }
-#endif /* VBOX_WITH_VMSVGA */
+
+# endif /* VBOX_WITH_VMSVGA */
 
 /*
  * graphic modes
@@ -3548,6 +3556,7 @@ static int vgaLFBAccess(PVM pVM, PVGASTATE pThis, RTGCPHYS GCPhys, RTGCPTR GCPtr
 #else /* IN_RING3 : We don't have any virtual page address of the access here. */
         PDMCritSectLeave(&pThis->CritSect);
         Assert(GCPtr == 0);
+        RT_NOREF1(GCPtr);
 #endif
         return VINF_SUCCESS;
     }
@@ -3569,7 +3578,7 @@ PDMBOTHCBDECL(VBOXSTRICTRC) vgaLbfAccessPfHandler(PVM pVM, PVMCPU pVCpu, RTGCUIN
     AssertPtr(pThis);
     Assert(GCPhysFault >= pThis->GCPhysVRAM);
     AssertMsg(uErrorCode & X86_TRAP_PF_RW, ("uErrorCode=%#x\n", uErrorCode));
-    NOREF(pRegFrame);
+    RT_NOREF3(pVCpu, pRegFrame, uErrorCode);
 
     return vgaLFBAccess(pVM, pThis, GCPhysFault, pvFault);
 }
@@ -3620,8 +3629,7 @@ PDMBOTHCBDECL(int) vgaIOPortReadBIOS(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT
 PDMBOTHCBDECL(int) vgaIOPortWriteBIOS(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb)
 {
     static int lastWasNotNewline = 0;  /* We are only called in a single-threaded way */
-    PVGASTATE pThis = PDMINS_2_DATA(pDevIns, PVGASTATE);
-    NOREF(pvUser);
+    RT_NOREF2(pDevIns, pvUser);
     Assert(PDMCritSectIsOwner(pDevIns->CTX_SUFF(pCritSectRo)));
 
     /*
@@ -4584,8 +4592,6 @@ static DECLCALLBACK(int) vgaPortQueryStatusLed(PPDMILEDPORTS pInterface, unsigne
             AssertMsgFailed(("Invalid LUN #%d\n", iLUN));
             return VERR_PDM_NO_SUCH_LUN;
     }
-
-    return VERR_PDM_LUN_NOT_FOUND;
 }
 
 /* -=-=-=-=-=- Ring 3: Dummy IDisplayConnector -=-=-=-=-=- */
@@ -4785,7 +4791,7 @@ static DECLCALLBACK(int) vgaPortSetRefreshRate(PPDMIDISPLAYPORT pInterface, uint
 }
 
 
-/** @copydoc PDMIDISPLAYPORT::pfnQueryVideoMode */
+/** @interface_method_impl{PDMIDISPLAYPORT,pfnQueryVideoMode} */
 static DECLCALLBACK(int) vgaPortQueryVideoMode(PPDMIDISPLAYPORT pInterface, uint32_t *pcBits, uint32_t *pcx, uint32_t *pcy)
 {
     PVGASTATE pThis = IDISPLAYPORT_2_VGASTATE(pInterface);
@@ -5401,14 +5407,18 @@ int vgaR3UnregisterVRAMHandler(PVGASTATE pVGAState)
  *                          This address is *NOT* relative to pci_mem_base like earlier!
  * @param   enmType         One of the PCI_ADDRESS_SPACE_* values.
  */
-static DECLCALLBACK(int) vgaR3IORegionMap(PPCIDEVICE pPciDev, /*unsigned*/ int iRegion, RTGCPHYS GCPhysAddress, uint32_t cb, PCIADDRESSSPACE enmType)
+static DECLCALLBACK(int) vgaR3IORegionMap(PPCIDEVICE pPciDev, /*unsigned*/ int iRegion, RTGCPHYS GCPhysAddress, uint32_t cb,
+                                          PCIADDRESSSPACE enmType)
 {
+    RT_NOREF1(cb);
     int         rc;
     PPDMDEVINS  pDevIns = pPciDev->pDevIns;
     PVGASTATE   pThis = PDMINS_2_DATA(pDevIns, PVGASTATE);
     Log(("vgaR3IORegionMap: iRegion=%d GCPhysAddress=%RGp cb=%#x enmType=%d\n", iRegion, GCPhysAddress, cb, enmType));
 #ifdef VBOX_WITH_VMSVGA
-    AssertReturn((iRegion == ((pThis->fVMSVGAEnabled) ? 1 : 0)) && (enmType == ((pThis->fVMSVGAEnabled) ? PCI_ADDRESS_SPACE_MEM : PCI_ADDRESS_SPACE_MEM_PREFETCH)), VERR_INTERNAL_ERROR);
+    AssertReturn(   (iRegion == ((pThis->fVMSVGAEnabled) ? 1 : 0))
+                 && (enmType == ((pThis->fVMSVGAEnabled) ? PCI_ADDRESS_SPACE_MEM : PCI_ADDRESS_SPACE_MEM_PREFETCH)),
+                 VERR_INTERNAL_ERROR);
 #else
     AssertReturn(iRegion == 0 && enmType == PCI_ADDRESS_SPACE_MEM_PREFETCH, VERR_INTERNAL_ERROR);
 #endif
@@ -5452,8 +5462,8 @@ static DECLCALLBACK(int) vgaR3IORegionMap(PPCIDEVICE pPciDev, /*unsigned*/ int i
            )
         {
 #endif
-        rc = PGMHandlerPhysicalDeregister(PDMDevHlpGetVM(pDevIns), pThis->GCPhysVRAM);
-        AssertRC(rc);
+            rc = PGMHandlerPhysicalDeregister(PDMDevHlpGetVM(pDevIns), pThis->GCPhysVRAM);
+            AssertRC(rc);
 #ifdef VBOX_WITH_VMSVGA
         }
         else
@@ -5483,7 +5493,7 @@ static void vgaR3SaveConfig(PVGASTATE pThis, PSSMHANDLE pSSM)
 
 
 /**
- * @copydoc FNSSMDEVLIVEEXEC
+ * @callback_method_impl{FNSSMDEVLIVEEXEC}
  */
 static DECLCALLBACK(int) vgaR3LiveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uPass)
 {
@@ -5495,35 +5505,42 @@ static DECLCALLBACK(int) vgaR3LiveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint
 
 
 /**
- * @copydoc FNSSMDEVSAVEPREP
+ * @callback_method_impl{FNSSMDEVSAVEPREP}
  */
 static DECLCALLBACK(int) vgaR3SavePrep(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
 {
 #ifdef VBOX_WITH_VIDEOHWACCEL
-    return vboxVBVASaveStatePrep(pDevIns, pSSM);
+    RT_NOREF(pSSM);
+    return vboxVBVASaveStatePrep(pDevIns);
 #else
+    RT_NOREF(pDevIns, pSSM);
     return VINF_SUCCESS;
 #endif
 }
 
+/**
+ * @callback_method_impl{FNSSMDEVSAVEDONE}
+ */
 static DECLCALLBACK(int) vgaR3SaveDone(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
 {
 #ifdef VBOX_WITH_VIDEOHWACCEL
-    return vboxVBVASaveStateDone(pDevIns, pSSM);
+    RT_NOREF(pSSM);
+    return vboxVBVASaveStateDone(pDevIns);
 #else
+    RT_NOREF(pDevIns, pSSM);
     return VINF_SUCCESS;
 #endif
 }
 
 /**
- * @copydoc FNSSMDEVSAVEEXEC
+ * @callback_method_impl{FNSSMDEVSAVEEXEC}
  */
 static DECLCALLBACK(int) vgaR3SaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
 {
     PVGASTATE pThis = PDMINS_2_DATA(pDevIns, PVGASTATE);
 
 #ifdef VBOX_WITH_VDMA
-    vboxVDMASaveStateExecPrep(pThis->pVdma, pSSM);
+    vboxVDMASaveStateExecPrep(pThis->pVdma);
 #endif
 
     vgaR3SaveConfig(pThis, pSSM);
@@ -5550,7 +5567,7 @@ static DECLCALLBACK(int) vgaR3SaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
     AssertRCReturn(rc, rc);
 
 #ifdef VBOX_WITH_VDMA
-    vboxVDMASaveStateExecDone(pThis->pVdma, pSSM);
+    vboxVDMASaveStateExecDone(pThis->pVdma);
 #endif
 
     VGA_SAVED_STATE_PUT_MARKER(pSSM, 5);
@@ -5661,11 +5678,12 @@ static DECLCALLBACK(int) vgaR3LoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint
  */
 static DECLCALLBACK(int) vgaR3LoadDone(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
 {
+    RT_NOREF(pSSM);
     int rc = VINF_SUCCESS;
 
 #ifdef VBOX_WITH_HGSMI
     PVGASTATE pThis = PDMINS_2_DATA(pDevIns, PVGASTATE);
-    rc = vboxVBVALoadStateDone(pDevIns, pSSM);
+    rc = vboxVBVALoadStateDone(pDevIns);
     AssertRCReturn(rc, rc);
 # ifdef VBOX_WITH_VDMA
     rc = vboxVDMASaveLoadDone(pThis->pVdma);
@@ -5882,14 +5900,13 @@ static DECLCALLBACK(int)  vgaAttach(PPDMDEVINS pDevIns, unsigned iLUN, uint32_t
  */
 static DECLCALLBACK(void)  vgaDetach(PPDMDEVINS pDevIns, unsigned iLUN, uint32_t fFlags)
 {
+    RT_NOREF1(fFlags);
+    PVGASTATE   pThis = PDMINS_2_DATA(pDevIns, PVGASTATE);
+    AssertMsg(fFlags & PDM_TACH_FLAGS_NOT_HOT_PLUG, ("VGA device does not support hotplugging\n"));
+
     /*
      * Reset the interfaces and update the controller state.
      */
-    PVGASTATE   pThis = PDMINS_2_DATA(pDevIns, PVGASTATE);
-
-    AssertMsg(fFlags & PDM_TACH_FLAGS_NOT_HOT_PLUG,
-              ("VGA device does not support hotplugging\n"));
-
     switch (iLUN)
     {
         /* LUN #0: Display port. */
diff --git a/src/VBox/Devices/Graphics/DevVGA.h b/src/VBox/Devices/Graphics/DevVGA.h
index 01829e2..5f43251 100644
--- a/src/VBox/Devices/Graphics/DevVGA.h
+++ b/src/VBox/Devices/Graphics/DevVGA.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -696,7 +696,7 @@ void     VBVAOnResume(PVGASTATE pThis);
 bool VBVAIsPaused(PVGASTATE pVGAState);
 bool VBVAIsEnabled(PVGASTATE pVGAState);
 
-void VBVARaiseIrq (PVGASTATE pVGAState, uint32_t fFlags);
+void VBVARaiseIrq(PVGASTATE pVGAState, uint32_t fFlags);
 
 int VBVAInfoView(PVGASTATE pVGAState, const VBVAINFOVIEW *pView);
 int VBVAInfoScreen(PVGASTATE pVGAState, const VBVAINFOSCREEN *pScreen);
@@ -705,17 +705,17 @@ int VBVAGetInfoViewAndScreen(PVGASTATE pVGAState, uint32_t u32ViewIndex, VBVAINF
 /* @return host-guest flags that were set on reset
  * this allows the caller to make further cleaning when needed,
  * e.g. reset the IRQ */
-uint32_t HGSMIReset (PHGSMIINSTANCE pIns);
+uint32_t HGSMIReset(PHGSMIINSTANCE pIns);
 
 # ifdef VBOX_WITH_VIDEOHWACCEL
 DECLCALLBACK(int) vbvaVHWACommandCompleteAsync(PPDMIDISPLAYVBVACALLBACKS pInterface, PVBOXVHWACMD pCmd);
-int vbvaVHWAConstruct (PVGASTATE pVGAState);
-int vbvaVHWAReset (PVGASTATE pVGAState);
+int vbvaVHWAConstruct(PVGASTATE pVGAState);
+int vbvaVHWAReset(PVGASTATE pVGAState);
 
 void vbvaTimerCb(PVGASTATE pVGAState);
 
-int vboxVBVASaveStatePrep (PPDMDEVINS pDevIns, PSSMHANDLE pSSM);
-int vboxVBVASaveStateDone (PPDMDEVINS pDevIns, PSSMHANDLE pSSM);
+int vboxVBVASaveStatePrep(PPDMDEVINS pDevIns);
+int vboxVBVASaveStateDone(PPDMDEVINS pDevIns);
 # endif
 
 #ifdef VBOX_WITH_HGSMI
@@ -735,9 +735,9 @@ DECLCALLBACK(int) vboxCmdVBVACmdHostCtlSync(PPDMIDISPLAYVBVACALLBACKS pInterface
                                             struct VBOXCRCMDCTL* pCmd, uint32_t cbCmd);
 # endif
 
-int vboxVBVASaveStateExec (PPDMDEVINS pDevIns, PSSMHANDLE pSSM);
-int vboxVBVALoadStateExec (PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t u32Version);
-int vboxVBVALoadStateDone (PPDMDEVINS pDevIns, PSSMHANDLE pSSM);
+int vboxVBVASaveStateExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM);
+int vboxVBVALoadStateExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t u32Version);
+int vboxVBVALoadStateDone(PPDMDEVINS pDevIns);
 
 DECLCALLBACK(int) vgaUpdateDisplayAll(PVGASTATE pThis, bool fFailOnResize);
 DECLCALLBACK(int) vbvaPortSendModeHint(PPDMIDISPLAYPORT pInterface, uint32_t cx,
@@ -756,8 +756,8 @@ int vboxVDMADestruct(PVBOXVDMAHOST pVdma);
 int vboxVDMAReset(PVBOXVDMAHOST pVdma);
 void vboxVDMAControl(PVBOXVDMAHOST pVdma, PVBOXVDMA_CTL pCmd, uint32_t cbCmd);
 void vboxVDMACommand(PVBOXVDMAHOST pVdma, PVBOXVDMACBUF_DR pCmd, uint32_t cbCmd);
-int vboxVDMASaveStateExecPrep(struct VBOXVDMAHOST *pVdma, PSSMHANDLE pSSM);
-int vboxVDMASaveStateExecDone(struct VBOXVDMAHOST *pVdma, PSSMHANDLE pSSM);
+int vboxVDMASaveStateExecPrep(struct VBOXVDMAHOST *pVdma);
+int vboxVDMASaveStateExecDone(struct VBOXVDMAHOST *pVdma);
 int vboxVDMASaveStateExecPerform(struct VBOXVDMAHOST *pVdma, PSSMHANDLE pSSM);
 int vboxVDMASaveLoadExecPerform(struct VBOXVDMAHOST *pVdma, PSSMHANDLE pSSM, uint32_t u32Version);
 int vboxVDMASaveLoadDone(struct VBOXVDMAHOST *pVdma);
diff --git a/src/VBox/Devices/Graphics/DevVGAModes.h b/src/VBox/Devices/Graphics/DevVGAModes.h
index 0ea162c..7bf57e4 100644
--- a/src/VBox/Devices/Graphics/DevVGAModes.h
+++ b/src/VBox/Devices/Graphics/DevVGAModes.h
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Graphics/DevVGASavedState.h b/src/VBox/Devices/Graphics/DevVGASavedState.h
index 0ddbe14..e514485 100644
--- a/src/VBox/Devices/Graphics/DevVGASavedState.h
+++ b/src/VBox/Devices/Graphics/DevVGASavedState.h
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -37,7 +37,7 @@
         { \
             uint64_t uMarker; \
             int rcMarker = SSMR3GetU64(pSSM, &uMarker); \
-            AssertLogRelRCReturn(rc, rc); \
+            AssertLogRelRCReturn(rcMarker, rcMarker); \
             AssertLogRelMsgReturn(uMarker == VGA_SAVED_STATE_MAKE_MARKER(uSub), \
                                   ("Bad VGA marker: expected %llx, got %llx\n", VGA_SAVED_STATE_MAKE_MARKER(uSub), uMarker), \
                                   VERR_SSM_DATA_UNIT_FORMAT_CHANGED); \
diff --git a/src/VBox/Devices/Graphics/DevVGATmpl.h b/src/VBox/Devices/Graphics/DevVGATmpl.h
index 86d3a03..8bfcac6 100644
--- a/src/VBox/Devices/Graphics/DevVGATmpl.h
+++ b/src/VBox/Devices/Graphics/DevVGATmpl.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp b/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp
index 3933fb3..0ab4d87 100644
--- a/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp
+++ b/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -403,7 +403,7 @@ static int vbvaFlushProcess(unsigned uScreenId, PVGASTATE pVGAState, VBVADATA *p
     for (;;)
     {
         VBVACMDHDR *phdr = NULL;
-        uint32_t cbCmd = ~0;
+        uint32_t cbCmd = UINT32_MAX;
 
         /* Fetch the command data. */
         if (!vbvaFetchCmd(pVBVAData, &phdr, &cbCmd))
@@ -616,7 +616,7 @@ static int vbvaEnable(unsigned uScreenId, PVGASTATE pVGAState, VBVACONTEXT *pCtx
 
         if (!fRestored)
         {
-            /* @todo Actually this function must not touch the partialRecord structure at all,
+            /** @todo Actually this function must not touch the partialRecord structure at all,
              * because initially it is a zero and when VBVA is disabled this should be set to zero.
              * But I'm not sure that no code depends on zeroing partialRecord here.
              * So for now (a quick fix for 4.1) just do not do this if the VM was restored,
@@ -824,7 +824,7 @@ static uint32_t vbvaViewFromBufferPtr(PHGSMIINSTANCE pIns, const VBVACONTEXT *pC
         }
     }
 
-    return UINT32_C(~0);
+    return UINT32_MAX;
 }
 
 #ifdef DEBUG_sunlover
@@ -881,9 +881,9 @@ static void vbvaVHWAHHCommandReinit(VBOXVHWACMD* pHdr, VBOXVHWACMD_TYPE enmCmd,
     pHdr->Flags = VBOXVHWACMD_FLAG_HH_CMD;
 }
 
-static VBOXVHWACMD* vbvaVHWAHHCommandCreate (PVGASTATE pVGAState, VBOXVHWACMD_TYPE enmCmd, int32_t iDisplay, VBOXVHWACMD_LENGTH cbCmd)
+static VBOXVHWACMD *vbvaVHWAHHCommandCreate(VBOXVHWACMD_TYPE enmCmd, int32_t iDisplay, VBOXVHWACMD_LENGTH cbCmd)
 {
-    VBOXVHWACMD* pHdr = (VBOXVHWACMD*)RTMemAllocZ(cbCmd + VBOXVHWACMD_HEADSIZE());
+    VBOXVHWACMD *pHdr = (VBOXVHWACMD *)RTMemAllocZ(cbCmd + VBOXVHWACMD_HEADSIZE());
     Assert(pHdr);
     if (pHdr)
         vbvaVHWAHHCommandReinit(pHdr, enmCmd, iDisplay);
@@ -891,16 +891,14 @@ static VBOXVHWACMD* vbvaVHWAHHCommandCreate (PVGASTATE pVGAState, VBOXVHWACMD_TY
     return pHdr;
 }
 
-DECLINLINE(void) vbvaVHWAHHCommandRelease (VBOXVHWACMD* pCmd)
+DECLINLINE(void) vbvaVHWAHHCommandRelease(VBOXVHWACMD *pCmd)
 {
     uint32_t cRefs = ASMAtomicDecU32(&pCmd->cRefs);
-    if(!cRefs)
-    {
+    if (!cRefs)
         RTMemFree(pCmd);
-    }
 }
 
-DECLINLINE(void) vbvaVHWAHHCommandRetain (VBOXVHWACMD* pCmd)
+DECLINLINE(void) vbvaVHWAHHCommandRetain(VBOXVHWACMD *pCmd)
 {
     ASMAtomicIncU32(&pCmd->cRefs);
 }
@@ -915,7 +913,7 @@ static void vbvaVHWACommandComplete(PVGASTATE pVGAState, PVBOXVHWACMD pCommand,
     else
     {
         Log(("VGA Command <<< Sync rc %d %#p, %d\n", pCommand->rc, pCommand, pCommand->enmCmd));
-        pCommand->Flags &= (~VBOXVHWACMD_FLAG_HG_ASYNCH);
+        pCommand->Flags &= ~VBOXVHWACMD_FLAG_HG_ASYNCH;
     }
 
 }
@@ -925,10 +923,9 @@ static void vbvaVHWACommandCompleteAllPending(PVGASTATE pVGAState, int rc)
     if (!ASMAtomicUoReadU32(&pVGAState->pendingVhwaCommands.cPending))
         return;
 
-    VBOX_VHWA_PENDINGCMD *pIter, *pNext;
-
     PDMCritSectEnter(&pVGAState->CritSect, VERR_SEM_BUSY);
 
+    VBOX_VHWA_PENDINGCMD *pIter, *pNext;
     RTListForEachSafe(&pVGAState->pendingVhwaCommands.PendingList, pIter, pNext, VBOX_VHWA_PENDINGCMD, Node)
     {
         pIter->pCommand->rc = rc;
@@ -948,10 +945,9 @@ static void vbvaVHWACommandClearAllPending(PVGASTATE pVGAState)
     if (!ASMAtomicUoReadU32(&pVGAState->pendingVhwaCommands.cPending))
         return;
 
-    VBOX_VHWA_PENDINGCMD *pIter, *pNext;
-
     PDMCritSectEnter(&pVGAState->CritSect, VERR_SEM_BUSY);
 
+    VBOX_VHWA_PENDINGCMD *pIter, *pNext;
     RTListForEachSafe(&pVGAState->pendingVhwaCommands.PendingList, pIter, pNext, VBOX_VHWA_PENDINGCMD, Node)
     {
         RTListNodeRemove(&pIter->Node);
@@ -968,7 +964,7 @@ static void vbvaVHWACommandPend(PVGASTATE pVGAState, PVBOXVHWACMD pCommand)
 
     if (ASMAtomicUoReadU32(&pVGAState->pendingVhwaCommands.cPending) < VBOX_VHWA_MAX_PENDING_COMMANDS)
     {
-        VBOX_VHWA_PENDINGCMD *pPend = (VBOX_VHWA_PENDINGCMD*)RTMemAlloc(sizeof (*pPend));
+        VBOX_VHWA_PENDINGCMD *pPend = (VBOX_VHWA_PENDINGCMD *)RTMemAlloc(sizeof(*pPend));
         if (pPend)
         {
             pCommand->Flags |= VBOXVHWACMD_FLAG_HG_ASYNCH;
@@ -1017,6 +1013,7 @@ static int vbvaVHWACommandSavePending(PVGASTATE pVGAState, PSSMHANDLE pSSM)
 {
     int rc = SSMR3PutU32(pSSM, pVGAState->pendingVhwaCommands.cPending);
     AssertRCReturn(rc, rc);
+
     VBOX_VHWA_PENDINGCMD *pIter;
     RTListForEach(&pVGAState->pendingVhwaCommands.PendingList, pIter, VBOX_VHWA_PENDINGCMD, Node)
     {
@@ -1031,16 +1028,15 @@ static int vbvaVHWACommandLoadPending(PVGASTATE pVGAState, PSSMHANDLE pSSM, uint
     if (u32Version < VGA_SAVEDSTATE_VERSION_WITH_PENDVHWA)
         return VINF_SUCCESS;
 
-    int rc;
     uint32_t u32;
-    rc = SSMR3GetU32(pSSM, &u32);
+    int rc = SSMR3GetU32(pSSM, &u32);
     AssertRCReturn(rc, rc);
     for (uint32_t i = 0; i < u32; ++i)
     {
         uint32_t off32;
         rc = SSMR3GetU32(pSSM, &off32);
         AssertRCReturn(rc, rc);
-        PVBOXVHWACMD pCommand = (PVBOXVHWACMD)(((uint8_t*)pVGAState->vram_ptrR3) + off32);
+        PVBOXVHWACMD pCommand = (PVBOXVHWACMD)((uint8_t *)pVGAState->vram_ptrR3 + off32);
         vbvaVHWACommandPend(pVGAState, pCommand);
     }
     return rc;
@@ -1049,7 +1045,6 @@ static int vbvaVHWACommandLoadPending(PVGASTATE pVGAState, PSSMHANDLE pSSM, uint
 
 static bool vbvaVHWACommandSubmit(PVGASTATE pVGAState, PVBOXVHWACMD pCommand, bool fAsyncCommand)
 {
-    unsigned id = (unsigned)pCommand->iDisplay;
     bool fPend = false;
 
     if (pVGAState->pDrv->pfnVHWACommandProcess)
@@ -1178,7 +1173,7 @@ int vbvaVHWAConstruct (PVGASTATE pVGAState)
     pVGAState->pendingVhwaCommands.cPending = 0;
     RTListInit(&pVGAState->pendingVhwaCommands.PendingList);
 
-    VBOXVHWACMD *pCmd = vbvaVHWAHHCommandCreate(pVGAState, VBOXVHWACMD_TYPE_HH_CONSTRUCT, 0, sizeof(VBOXVHWACMD_HH_CONSTRUCT));
+    VBOXVHWACMD *pCmd = vbvaVHWAHHCommandCreate(VBOXVHWACMD_TYPE_HH_CONSTRUCT, 0, sizeof(VBOXVHWACMD_HH_CONSTRUCT));
     Assert(pCmd);
     if(pCmd)
     {
@@ -1205,7 +1200,7 @@ int vbvaVHWAConstruct (PVGASTATE pVGAState)
                 AssertMsg(RT_SUCCESS(rc) || rc == VERR_NOT_IMPLEMENTED, ("%Rrc\n", rc));
                 if(rc == VERR_NOT_IMPLEMENTED)
                 {
-                    /* @todo: set some flag in pVGAState indicating VHWA is not supported */
+                    /** @todo set some flag in pVGAState indicating VHWA is not supported */
                     /* VERR_NOT_IMPLEMENTED is not a failure, we just do not support it */
                     rc = VINF_SUCCESS;
                 }
@@ -1234,7 +1229,7 @@ int vbvaVHWAReset (PVGASTATE pVGAState)
     vbvaVHWACommandClearAllPending(pVGAState);
 
     /* ensure we have all pending cmds processed and h->g cmds disabled */
-    VBOXVHWACMD *pCmd = vbvaVHWAHHCommandCreate(pVGAState, VBOXVHWACMD_TYPE_HH_RESET, 0, 0);
+    VBOXVHWACMD *pCmd = vbvaVHWAHHCommandCreate(VBOXVHWACMD_TYPE_HH_RESET, 0, 0);
     Assert(pCmd);
     if(pCmd)
     {
@@ -1320,13 +1315,11 @@ int vbvaVHWAHHPost(PVGASTATE pVGAState, VBOXVHWACMD *pCmd, PFNVBOXVHWAHHCMDPRECB
     return rc;
 }
 
-/* @todo call this also on reset? */
+/** @todo call this also on reset? */
 int vbvaVHWAEnable (PVGASTATE pVGAState, bool bEnable)
 {
     const VBOXVHWACMD_TYPE enmType = bEnable ? VBOXVHWACMD_TYPE_HH_ENABLE : VBOXVHWACMD_TYPE_HH_DISABLE;
-    VBOXVHWACMD *pCmd = vbvaVHWAHHCommandCreate(pVGAState,
-                        enmType,
-                    0, 0);
+    VBOXVHWACMD *pCmd = vbvaVHWAHHCommandCreate(enmType, 0, 0);
     Assert(pCmd);
     if(pCmd)
     {
@@ -1337,13 +1330,13 @@ int vbvaVHWAEnable (PVGASTATE pVGAState, bool bEnable)
     return VERR_OUT_OF_RESOURCES;
 }
 
-int vboxVBVASaveStatePrep (PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
+int vboxVBVASaveStatePrep(PPDMDEVINS pDevIns)
 {
     /* ensure we have no pending commands */
     return vbvaVHWAEnable(PDMINS_2_DATA(pDevIns, PVGASTATE), false);
 }
 
-int vboxVBVASaveStateDone (PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
+int vboxVBVASaveStateDone(PPDMDEVINS pDevIns)
 {
     /* ensure we have no pending commands */
     return vbvaVHWAEnable(PDMINS_2_DATA(pDevIns, PVGASTATE), true);
@@ -1354,7 +1347,7 @@ DECLCALLBACK(int) vbvaVHWACommandCompleteAsync(PPDMIDISPLAYVBVACALLBACKS pInterf
     int rc;
     Log(("VGA Command <<< Async rc %d %#p, %d\n", pCmd->rc, pCmd, pCmd->enmCmd));
 
-    if((pCmd->Flags & VBOXVHWACMD_FLAG_HH_CMD) == 0)
+    if ((pCmd->Flags & VBOXVHWACMD_FLAG_HH_CMD) == 0)
     {
         PVGASTATE pVGAState = PPDMIDISPLAYVBVACALLBACKS_2_PVGASTATE(pInterface);
         PHGSMIINSTANCE pIns = pVGAState->pHGSMI;
@@ -1369,18 +1362,16 @@ DECLCALLBACK(int) vbvaVHWACommandCompleteAsync(PPDMIDISPLAYVBVACALLBACKS pInterf
         else
 #endif
         {
-            VBVAHOSTCMD *pHostCmd;
-            int32_t iDisplay = pCmd->iDisplay;
-
-            if(pCmd->Flags & VBOXVHWACMD_FLAG_GH_ASYNCH_EVENT)
+            VBVAHOSTCMD *pHostCmd = NULL; /* Shut up MSC. */
+            if (pCmd->Flags & VBOXVHWACMD_FLAG_GH_ASYNCH_EVENT)
             {
-                rc = HGSMIHostCommandAlloc (pIns,
-                                              (void**)&pHostCmd,
-                                              VBVAHOSTCMD_SIZE(sizeof(VBVAHOSTCMDEVENT)),
-                                              HGSMI_CH_VBVA,
-                                              VBVAHG_EVENT);
+                rc = HGSMIHostCommandAlloc(pIns,
+                                           (void **)&pHostCmd,
+                                           VBVAHOSTCMD_SIZE(sizeof(VBVAHOSTCMDEVENT)),
+                                           HGSMI_CH_VBVA,
+                                           VBVAHG_EVENT);
                 AssertRC(rc);
-                if(RT_SUCCESS(rc))
+                if (RT_SUCCESS(rc))
                 {
                     memset(pHostCmd, 0 , VBVAHOSTCMD_SIZE(sizeof(VBVAHOSTCMDEVENT)));
                     pHostCmd->iDstID = pCmd->iDisplay;
@@ -1391,17 +1382,17 @@ DECLCALLBACK(int) vbvaVHWACommandCompleteAsync(PPDMIDISPLAYVBVACALLBACKS pInterf
             }
             else
             {
-                HGSMIOFFSET offCmd = HGSMIPointerToOffsetHost (pIns, pCmd);
+                HGSMIOFFSET offCmd = HGSMIPointerToOffsetHost(pIns, pCmd);
                 Assert(offCmd != HGSMIOFFSET_VOID);
-                if(offCmd != HGSMIOFFSET_VOID)
+                if (offCmd != HGSMIOFFSET_VOID)
                 {
-                    rc = HGSMIHostCommandAlloc (pIns,
-                                              (void**)&pHostCmd,
-                                              VBVAHOSTCMD_SIZE(sizeof(VBVAHOSTCMDVHWACMDCOMPLETE)),
-                                              HGSMI_CH_VBVA,
-                                              VBVAHG_DISPLAY_CUSTOM);
+                    rc = HGSMIHostCommandAlloc(pIns,
+                                               (void **)&pHostCmd,
+                                               VBVAHOSTCMD_SIZE(sizeof(VBVAHOSTCMDVHWACMDCOMPLETE)),
+                                               HGSMI_CH_VBVA,
+                                               VBVAHG_DISPLAY_CUSTOM);
                     AssertRC(rc);
-                    if(RT_SUCCESS(rc))
+                    if (RT_SUCCESS(rc))
                     {
                         memset(pHostCmd, 0 , VBVAHOSTCMD_SIZE(sizeof(VBVAHOSTCMDVHWACMDCOMPLETE)));
                         pHostCmd->iDstID = pCmd->iDisplay;
@@ -1411,19 +1402,16 @@ DECLCALLBACK(int) vbvaVHWACommandCompleteAsync(PPDMIDISPLAYVBVACALLBACKS pInterf
                     }
                 }
                 else
-                {
                     rc = VERR_INVALID_PARAMETER;
-                }
             }
 
-            if(RT_SUCCESS(rc))
+            if (RT_SUCCESS(rc))
             {
                 rc = HGSMIHostCommandSubmitAndFreeAsynch(pIns, pHostCmd, RT_BOOL(pCmd->Flags & VBOXVHWACMD_FLAG_GH_ASYNCH_IRQ));
                 AssertRC(rc);
-                if(RT_SUCCESS(rc))
-                {
+                if (RT_SUCCESS(rc))
                     return rc;
-                }
+
                 HGSMIHostCommandFree (pIns, pHostCmd);
             }
         }
@@ -1431,10 +1419,8 @@ DECLCALLBACK(int) vbvaVHWACommandCompleteAsync(PPDMIDISPLAYVBVACALLBACKS pInterf
     else
     {
         PFNVBOXVHWA_HH_CALLBACK pfn = VBOXVHWA_HH_CALLBACK_GET(pCmd);
-        if(pfn)
-        {
+        if (pfn)
             pfn(VBOXVHWA_HH_CALLBACK_GET_ARG(pCmd));
-        }
         rc = VINF_SUCCESS;
     }
     return rc;
@@ -1447,8 +1433,10 @@ typedef struct VBOXVBVASAVEDSTATECBDATA
     bool ab2DOn[VBOX_VIDEO_MAX_SCREENS];
 } VBOXVBVASAVEDSTATECBDATA, *PVBOXVBVASAVEDSTATECBDATA;
 
-static DECLCALLBACK(bool) vboxVBVASaveStateBeginPostCb(PVGASTATE pVGAState, VBOXVHWACMD *pCmd, uint32_t iDisplay, int rc, void *pvContext)
+static DECLCALLBACK(bool) vboxVBVASaveStateBeginPostCb(PVGASTATE pVGAState, VBOXVHWACMD *pCmd, uint32_t iDisplay,
+                                                       int rc, void *pvContext)
 {
+    RT_NOREF(pVGAState, pCmd);
     PVBOXVBVASAVEDSTATECBDATA pData = (PVBOXVBVASAVEDSTATECBDATA)pvContext;
     if (RT_FAILURE(pData->rc))
         return false;
@@ -1479,8 +1467,10 @@ static DECLCALLBACK(bool) vboxVBVASaveStateBeginPostCb(PVGASTATE pVGAState, VBOX
     return true;
 }
 
-static DECLCALLBACK(bool) vboxVBVASaveStatePerformPreCb(PVGASTATE pVGAState, VBOXVHWACMD *pCmd, uint32_t iDisplay, void *pvContext)
+static DECLCALLBACK(bool)
+vboxVBVASaveStatePerformPreCb(PVGASTATE pVGAState, VBOXVHWACMD *pCmd, uint32_t iDisplay, void *pvContext)
 {
+    RT_NOREF(pVGAState, pCmd);
     PVBOXVBVASAVEDSTATECBDATA pData = (PVBOXVBVASAVEDSTATECBDATA)pvContext;
     if (RT_FAILURE(pData->rc))
         return false;
@@ -1517,6 +1507,7 @@ static DECLCALLBACK(bool) vboxVBVASaveStatePerformPreCb(PVGASTATE pVGAState, VBO
 
 static DECLCALLBACK(bool) vboxVBVASaveStateEndPreCb(PVGASTATE pVGAState, VBOXVHWACMD *pCmd, uint32_t iDisplay, void *pvContext)
 {
+    RT_NOREF(pVGAState, pCmd);
     PVBOXVBVASAVEDSTATECBDATA pData = (PVBOXVBVASAVEDSTATECBDATA)pvContext;
     Assert(iDisplay < RT_ELEMENTS(pData->ab2DOn));
     if (pData->ab2DOn[iDisplay])
@@ -1527,8 +1518,10 @@ static DECLCALLBACK(bool) vboxVBVASaveStateEndPreCb(PVGASTATE pVGAState, VBOXVHW
     return false;
 }
 
-static DECLCALLBACK(bool) vboxVBVALoadStatePerformPostCb(PVGASTATE pVGAState, VBOXVHWACMD *pCmd, uint32_t iDisplay, int rc, void *pvContext)
+static DECLCALLBACK(bool)
+vboxVBVALoadStatePerformPostCb(PVGASTATE pVGAState, VBOXVHWACMD *pCmd, uint32_t iDisplay, int rc, void *pvContext)
 {
+    RT_NOREF(pVGAState, pCmd);
     PVBOXVBVASAVEDSTATECBDATA pData = (PVBOXVBVASAVEDSTATECBDATA)pvContext;
     if (RT_FAILURE(pData->rc))
         return false;
@@ -1561,8 +1554,10 @@ static DECLCALLBACK(bool) vboxVBVALoadStatePerformPostCb(PVGASTATE pVGAState, VB
     return true;
 }
 
-static DECLCALLBACK(bool) vboxVBVALoadStatePerformPreCb(PVGASTATE pVGAState, VBOXVHWACMD *pCmd, uint32_t iDisplay, void *pvContext)
+static DECLCALLBACK(bool)
+vboxVBVALoadStatePerformPreCb(PVGASTATE pVGAState, VBOXVHWACMD *pCmd, uint32_t iDisplay, void *pvContext)
 {
+    RT_NOREF(pVGAState, pCmd);
     PVBOXVBVASAVEDSTATECBDATA pData = (PVBOXVBVASAVEDSTATECBDATA)pvContext;
     if (RT_FAILURE(pData->rc))
         return false;
@@ -1730,7 +1725,7 @@ int vboxVBVASaveStateExec (PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
     VBOXVBVASAVEDSTATECBDATA VhwaData = {0};
     VhwaData.pSSM = pSSM;
     uint32_t cbCmd = sizeof (VBOXVHWACMD_HH_SAVESTATE_SAVEPERFORM); /* maximum cmd size */
-    VBOXVHWACMD *pCmd = vbvaVHWAHHCommandCreate(pVGAState, VBOXVHWACMD_TYPE_HH_SAVESTATE_SAVEBEGIN, 0, cbCmd);
+    VBOXVHWACMD *pCmd = vbvaVHWAHHCommandCreate(VBOXVHWACMD_TYPE_HH_SAVESTATE_SAVEBEGIN, 0, cbCmd);
     Assert(pCmd);
     if(pCmd)
     {
@@ -1978,7 +1973,7 @@ int vboxVBVALoadStateExec (PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uVersio
 
 #ifdef VBOX_WITH_VIDEOHWACCEL
                 uint32_t cbCmd = sizeof (VBOXVHWACMD_HH_SAVESTATE_LOADPERFORM); /* maximum cmd size */
-                VBOXVHWACMD *pCmd = vbvaVHWAHHCommandCreate(pVGAState, VBOXVHWACMD_TYPE_HH_SAVESTATE_LOADPERFORM, 0, cbCmd);
+                VBOXVHWACMD *pCmd = vbvaVHWAHHCommandCreate(VBOXVHWACMD_TYPE_HH_SAVESTATE_LOADPERFORM, 0, cbCmd);
                 Assert(pCmd);
                 if(pCmd)
                 {
@@ -2039,18 +2034,16 @@ int vboxVBVALoadStateExec (PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uVersio
     return rc;
 }
 
-int vboxVBVALoadStateDone (PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
+int vboxVBVALoadStateDone(PPDMDEVINS pDevIns)
 {
     PVGASTATE pVGAState = PDMINS_2_DATA(pDevIns, PVGASTATE);
-    VBVACONTEXT *pCtx = (VBVACONTEXT *)HGSMIContext (pVGAState->pHGSMI);
-
+    VBVACONTEXT *pCtx = (VBVACONTEXT *)HGSMIContext(pVGAState->pHGSMI);
     if (pCtx)
     {
         uint32_t iView;
         for (iView = 0; iView < pCtx->cViews; iView++)
         {
             VBVAVIEW *pView = &pCtx->aViews[iView];
-
             if (pView->vbva.guest.pVBVA)
             {
 #ifdef VBOX_WITH_CRHGSMI
@@ -2058,20 +2051,14 @@ int vboxVBVALoadStateDone (PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
 #endif
                 int rc = vbvaEnable(iView, pVGAState, pCtx, pView->vbva.guest.pVBVA, pView->vbva.u32VBVAOffset, true /* fRestored */);
                 if (RT_SUCCESS(rc))
-                {
                     vbvaResize(pVGAState, pView, &pView->screen, false);
-                }
                 else
-                {
                     LogRel(("VBVA: can not restore: %Rrc\n", rc));
-                }
             }
         }
 
         if (pCtx->mouseShapeInfo.fSet)
-        {
             vbvaUpdateMousePointerShape(pVGAState, &pCtx->mouseShapeInfo, true);
-        }
     }
 
     return VINF_SUCCESS;
@@ -2135,7 +2122,7 @@ static int vbvaHandleQueryConf32(PVGASTATE pVGAState, VBVACONF32 *pConf32)
     }
     else if (u32Index == VBOX_VBVA_CONF32_HOST_HEAP_SIZE)
     {
-        /* @todo a value calculated from the vram size */
+        /** @todo a value calculated from the vram size */
         pConf32->u32Value = 64*_1K;
     }
     else if (   u32Index == VBOX_VBVA_CONF32_MODE_HINT_REPORTING
diff --git a/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp b/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp
index f937d0d..4ec1a70 100644
--- a/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp
+++ b/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -14,6 +14,11 @@
  * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
 #include <VBox/VMMDev.h>
 #include <VBox/vmm/pdmdev.h>
 #include <VBox/vmm/pgm.h>
@@ -39,10 +44,14 @@
 # include <iprt/memcache.h>
 #endif
 
+
+/*********************************************************************************************************************************
+*   Defined Constants And Macros                                                                                                 *
+*********************************************************************************************************************************/
 #ifdef DEBUG_misha
-#define WARN_BP() do { AssertFailed(); } while (0)
+# define WARN_BP() do { AssertFailed(); } while (0)
 #else
-#define WARN_BP() do { } while (0)
+# define WARN_BP() do { } while (0)
 #endif
 #define WARN(_msg) do { \
         LogRel(_msg); \
@@ -54,11 +63,17 @@
 #define VBOXVDMATHREAD_STATE_CREATED                3
 #define VBOXVDMATHREAD_STATE_TERMINATING            4
 
+
+/*********************************************************************************************************************************
+*   Structures and Typedefs                                                                                                      *
+*********************************************************************************************************************************/
 struct VBOXVDMATHREAD;
 
 typedef DECLCALLBACKPTR(void, PFNVBOXVDMATHREAD_CHANGED)(struct VBOXVDMATHREAD *pThread, int rc, void *pvThreadContext, void *pvChangeContext);
 
+#ifdef VBOX_WITH_CRHGSMI
 static DECLCALLBACK(int) vboxCmdVBVACmdCallout(struct VBOXVDMAHOST *pVdma, struct VBOXCRCMDCTL* pCmd, VBOXCRCMDCTL_CALLOUT_LISTENTRY *pEntry, PFNVBOXCRCMDCTL_CALLOUT_CB pfnCb);
+#endif
 
 
 typedef struct VBOXVDMATHREAD
@@ -155,9 +170,40 @@ typedef enum
     VBVAEXHOST_DATA_TYPE_GUESTCTL
 } VBVAEXHOST_DATA_TYPE;
 
-static DECLCALLBACK(int) vdmaVBVANotifyDisable(PVGASTATE pVGAState);
 
+#ifdef VBOX_WITH_CRHGSMI
+typedef struct VBOXVDMA_SOURCE
+{
+    VBVAINFOSCREEN Screen;
+    VBOXCMDVBVA_SCREENMAP_DECL(uint32_t, aTargetMap);
+} VBOXVDMA_SOURCE;
+#endif
 
+typedef struct VBOXVDMAHOST
+{
+    PHGSMIINSTANCE pHgsmi;
+    PVGASTATE pVGAState;
+#ifdef VBOX_WITH_CRHGSMI
+    VBVAEXHOSTCONTEXT CmdVbva;
+    VBOXVDMATHREAD Thread;
+    VBOXCRCMD_SVRINFO CrSrvInfo;
+    VBVAEXHOSTCTL* pCurRemainingHostCtl;
+    RTSEMEVENTMULTI HostCrCtlCompleteEvent;
+    int32_t volatile i32cHostCrCtlCompleted;
+    RTCRITSECT CalloutCritSect;
+//    VBOXVDMA_SOURCE aSources[VBOX_VIDEO_MAX_SCREENS];
+#endif
+#ifdef VBOX_VDMA_WITH_WATCHDOG
+    PTMTIMERR3 WatchDogTimer;
+#endif
+} VBOXVDMAHOST, *PVBOXVDMAHOST;
+
+
+/*********************************************************************************************************************************
+*   Internal Functions                                                                                                           *
+*********************************************************************************************************************************/
+#ifdef VBOX_WITH_CRHGSMI
+static DECLCALLBACK(int) vdmaVBVANotifyDisable(PVGASTATE pVGAState);
 static VBVAEXHOST_DATA_TYPE VBoxVBVAExHPDataGet(struct VBVAEXHOSTCONTEXT *pCmdVbva, uint8_t **ppCmd, uint32_t *pcbCmd);
 
 static void VBoxVBVAExHPDataCompleteCmd(struct VBVAEXHOSTCONTEXT *pCmdVbva, uint32_t cbCmd);
@@ -174,25 +220,31 @@ static void VBoxVBVAExHSTerm(struct VBVAEXHOSTCONTEXT *pCmdVbva);
 static int VBoxVBVAExHSSaveState(struct VBVAEXHOSTCONTEXT *pCmdVbva, uint8_t* pu8VramBase, PSSMHANDLE pSSM);
 static int VBoxVBVAExHSLoadState(struct VBVAEXHOSTCONTEXT *pCmdVbva, uint8_t* pu8VramBase, PSSMHANDLE pSSM, uint32_t u32Version);
 
+#endif /* VBOX_WITH_CRHGSMI */
+
+
+
+#ifdef VBOX_WITH_CRHGSMI
+
 static VBVAEXHOSTCTL* VBoxVBVAExHCtlAlloc(VBVAEXHOSTCONTEXT *pCmdVbva)
 {
-#ifndef VBOXVDBG_MEMCACHE_DISABLE
+# ifndef VBOXVDBG_MEMCACHE_DISABLE
     return (VBVAEXHOSTCTL*)RTMemCacheAlloc(pCmdVbva->CtlCache);
-#else
+# else
     return (VBVAEXHOSTCTL*)RTMemAlloc(sizeof (VBVAEXHOSTCTL));
-#endif
+# endif
 }
 
 static void VBoxVBVAExHCtlFree(VBVAEXHOSTCONTEXT *pCmdVbva, VBVAEXHOSTCTL *pCtl)
 {
-#ifndef VBOXVDBG_MEMCACHE_DISABLE
+# ifndef VBOXVDBG_MEMCACHE_DISABLE
     RTMemCacheFree(pCmdVbva->CtlCache, pCtl);
-#else
+# else
     RTMemFree(pCtl);
-#endif
+# endif
 }
 
-static VBVAEXHOSTCTL* VBoxVBVAExHCtlCreate(VBVAEXHOSTCONTEXT *pCmdVbva, VBVAEXHOSTCTL_TYPE enmType)
+static VBVAEXHOSTCTL *VBoxVBVAExHCtlCreate(VBVAEXHOSTCONTEXT *pCmdVbva, VBVAEXHOSTCTL_TYPE enmType)
 {
     VBVAEXHOSTCTL* pCtl = VBoxVBVAExHCtlAlloc(pCmdVbva);
     if (!pCtl)
@@ -218,7 +270,7 @@ static VBVAEXHOSTCTL* vboxVBVAExHPCheckCtl(struct VBVAEXHOSTCONTEXT *pCmdVbva, b
 {
     Assert(pCmdVbva->i32State == VBVAEXHOSTCONTEXT_STATE_PROCESSING);
 
-    if(!fHostOnlyMode && !ASMAtomicUoReadU32(&pCmdVbva->u32cCtls))
+    if (!fHostOnlyMode && !ASMAtomicUoReadU32(&pCmdVbva->u32cCtls))
         return NULL;
 
     int rc = RTCritSectEnter(&pCmdVbva->CltCritSect);
@@ -287,20 +339,19 @@ static int VBoxVBVAExHPResume(struct VBVAEXHOSTCONTEXT *pCmdVbva)
     return VINF_SUCCESS;
 }
 
-
 static bool vboxVBVAExHPCheckProcessCtlInternal(struct VBVAEXHOSTCONTEXT *pCmdVbva, VBVAEXHOSTCTL* pCtl)
 {
     switch (pCtl->enmType)
     {
         case VBVAEXHOSTCTL_TYPE_HH_INTERNAL_PAUSE:
         {
-            int rc = VBoxVBVAExHPPause(pCmdVbva);
+            VBoxVBVAExHPPause(pCmdVbva);
             VBoxVBVAExHPDataCompleteCtl(pCmdVbva, pCtl, VINF_SUCCESS);
             return true;
         }
         case VBVAEXHOSTCTL_TYPE_HH_INTERNAL_RESUME:
         {
-            int rc = VBoxVBVAExHPResume(pCmdVbva);
+            VBoxVBVAExHPResume(pCmdVbva);
             VBoxVBVAExHPDataCompleteCtl(pCmdVbva, pCtl, VINF_SUCCESS);
             return true;
         }
@@ -404,13 +455,14 @@ static void VBoxVBVAExHPDataCompleteCtl(struct VBVAEXHOSTCONTEXT *pCmdVbva, VBVA
         VBoxVBVAExHCtlFree(pCmdVbva, pCtl);
 }
 
+
 static VBVAEXHOST_DATA_TYPE vboxVBVAExHPDataGet(struct VBVAEXHOSTCONTEXT *pCmdVbva, uint8_t **ppCmd, uint32_t *pcbCmd)
 {
     Assert(pCmdVbva->i32State == VBVAEXHOSTCONTEXT_STATE_PROCESSING);
     VBVAEXHOSTCTL*pCtl;
     bool fHostClt;
 
-    for(;;)
+    for (;;)
     {
         pCtl = vboxVBVAExHPCheckCtl(pCmdVbva, &fHostClt, false);
         if (pCtl)
@@ -452,9 +504,7 @@ static VBVAEXHOST_DATA_TYPE vboxVBVAExHPDataGet(struct VBVAEXHOSTCONTEXT *pCmdVb
                 return VBVAEXHOST_DATA_TYPE_NO_DATA;
         }
     }
-
-    WARN(("Warning: VBoxVBVAExHCmdGet unexpected state\n"));
-    return VBVAEXHOST_DATA_TYPE_NO_DATA;
+    /* not reached */
 }
 
 static VBVAEXHOST_DATA_TYPE VBoxVBVAExHPDataGet(struct VBVAEXHOSTCONTEXT *pCmdVbva, uint8_t **ppCmd, uint32_t *pcbCmd)
@@ -506,7 +556,7 @@ DECLINLINE(bool) vboxVBVAExHSHasCommands(struct VBVAEXHOSTCONTEXT *pCmdVbva)
     return !!ASMAtomicReadU32(&pCmdVbva->u32cCtls);
 }
 
-/* Checks whether the new commands are ready for processing
+/** Checks whether the new commands are ready for processing
  * @returns
  *   VINF_SUCCESS - there are commands are in a queue, and the given thread is now the processor (i.e. typically it would delegate processing to a worker thread)
  *   VINF_EOF - no commands in a queue
@@ -538,7 +588,7 @@ static int VBoxVBVAExHSInit(struct VBVAEXHOSTCONTEXT *pCmdVbva)
     int rc = RTCritSectInit(&pCmdVbva->CltCritSect);
     if (RT_SUCCESS(rc))
     {
-#ifndef VBOXVDBG_MEMCACHE_DISABLE
+# ifndef VBOXVDBG_MEMCACHE_DISABLE
         rc = RTMemCacheCreate(&pCmdVbva->CtlCache, sizeof (VBVAEXHOSTCTL),
                                 0, /* size_t cbAlignment */
                                 UINT32_MAX, /* uint32_t cMaxObjects */
@@ -548,7 +598,7 @@ static int VBoxVBVAExHSInit(struct VBVAEXHOSTCONTEXT *pCmdVbva)
                                 0 /* uint32_t fFlags*/
                                 );
         if (RT_SUCCESS(rc))
-#endif
+# endif
         {
             RTListInit(&pCmdVbva->GuestCtlList);
             RTListInit(&pCmdVbva->HostCtlList);
@@ -556,10 +606,10 @@ static int VBoxVBVAExHSInit(struct VBVAEXHOSTCONTEXT *pCmdVbva)
             pCmdVbva->i32EnableState = VBVAEXHOSTCONTEXT_ESTATE_DISABLED;
             return VINF_SUCCESS;
         }
-#ifndef VBOXVDBG_MEMCACHE_DISABLE
+# ifndef VBOXVDBG_MEMCACHE_DISABLE
         else
             WARN(("RTMemCacheCreate failed %d\n", rc));
-#endif
+# endif
     }
     else
         WARN(("RTCritSectInit failed %d\n", rc));
@@ -614,15 +664,16 @@ static void VBoxVBVAExHSTerm(struct VBVAEXHOSTCONTEXT *pCmdVbva)
 
     RTCritSectDelete(&pCmdVbva->CltCritSect);
 
-#ifndef VBOXVDBG_MEMCACHE_DISABLE
+# ifndef VBOXVDBG_MEMCACHE_DISABLE
     RTMemCacheDestroy(pCmdVbva->CtlCache);
-#endif
+# endif
 
     memset(pCmdVbva, 0, sizeof (*pCmdVbva));
 }
 
 static int vboxVBVAExHSSaveGuestCtl(struct VBVAEXHOSTCONTEXT *pCmdVbva, VBVAEXHOSTCTL* pCtl, uint8_t* pu8VramBase, PSSMHANDLE pSSM)
 {
+    RT_NOREF(pCmdVbva);
     int rc = SSMR3PutU32(pSSM, pCtl->enmType);
     AssertRCReturn(rc, rc);
     rc = SSMR3PutU32(pSSM, pCtl->u.cmd.cbCmd);
@@ -654,7 +705,9 @@ static int vboxVBVAExHSSaveStateLocked(struct VBVAEXHOSTCONTEXT *pCmdVbva, uint8
 
     return VINF_SUCCESS;
 }
-/* Saves state
+
+
+/** Saves state
  * @returns - same as VBoxVBVAExHSCheckCommands, or failure on load state fail
  */
 static int VBoxVBVAExHSSaveState(struct VBVAEXHOSTCONTEXT *pCmdVbva, uint8_t* pu8VramBase, PSSMHANDLE pSSM)
@@ -677,6 +730,7 @@ static int VBoxVBVAExHSSaveState(struct VBVAEXHOSTCONTEXT *pCmdVbva, uint8_t* pu
 
 static int vboxVBVAExHSLoadGuestCtl(struct VBVAEXHOSTCONTEXT *pCmdVbva, uint8_t* pu8VramBase, PSSMHANDLE pSSM, uint32_t u32Version)
 {
+    RT_NOREF(u32Version);
     uint32_t u32;
     int rc = SSMR3GetU32(pSSM, &u32);
     AssertLogRelRCReturn(rc, rc);
@@ -724,7 +778,7 @@ static int vboxVBVAExHSLoadStateLocked(struct VBVAEXHOSTCONTEXT *pCmdVbva, uint8
     return VINF_SUCCESS;
 }
 
-/* Loads state
+/** Loads state
  * @returns - same as VBoxVBVAExHSCheckCommands, or failure on load state fail
  */
 static int VBoxVBVAExHSLoadState(struct VBVAEXHOSTCONTEXT *pCmdVbva, uint8_t* pu8VramBase, PSSMHANDLE pSSM, uint32_t u32Version)
@@ -793,35 +847,6 @@ static int VBoxVBVAExHCtlSubmit(VBVAEXHOSTCONTEXT *pCmdVbva, VBVAEXHOSTCTL* pCtl
     return rc;
 }
 
-#ifdef VBOX_WITH_CRHGSMI
-typedef struct VBOXVDMA_SOURCE
-{
-    VBVAINFOSCREEN Screen;
-    VBOXCMDVBVA_SCREENMAP_DECL(uint32_t, aTargetMap);
-} VBOXVDMA_SOURCE;
-#endif
-
-typedef struct VBOXVDMAHOST
-{
-    PHGSMIINSTANCE pHgsmi;
-    PVGASTATE pVGAState;
-#ifdef VBOX_WITH_CRHGSMI
-    VBVAEXHOSTCONTEXT CmdVbva;
-    VBOXVDMATHREAD Thread;
-    VBOXCRCMD_SVRINFO CrSrvInfo;
-    VBVAEXHOSTCTL* pCurRemainingHostCtl;
-    RTSEMEVENTMULTI HostCrCtlCompleteEvent;
-    int32_t volatile i32cHostCrCtlCompleted;
-    RTCRITSECT CalloutCritSect;
-//    VBOXVDMA_SOURCE aSources[VBOX_VIDEO_MAX_SCREENS];
-#endif
-#ifdef VBOX_VDMA_WITH_WATCHDOG
-    PTMTIMERR3 WatchDogTimer;
-#endif
-} VBOXVDMAHOST, *PVBOXVDMAHOST;
-
-#ifdef VBOX_WITH_CRHGSMI
-
 void VBoxVDMAThreadNotifyConstructSucceeded(PVBOXVDMATHREAD pThread, void *pvThreadContext)
 {
     Assert(pThread->u32State == VBOXVDMATHREAD_STATE_CREATING);
@@ -988,7 +1013,7 @@ typedef struct VBOXVDMACMD_CHROMIUM_CTL_PRIVATE
     VBOXVDMACMD_CHROMIUM_CTL Cmd;
 } VBOXVDMACMD_CHROMIUM_CTL_PRIVATE, *PVBOXVDMACMD_CHROMIUM_CTL_PRIVATE;
 
-#define VBOXVDMACMD_CHROMIUM_CTL_PRIVATE_FROM_CTL(_p) ((PVBOXVDMACMD_CHROMIUM_CTL_PRIVATE)(((uint8_t*)(_p)) - RT_OFFSETOF(VBOXVDMACMD_CHROMIUM_CTL_PRIVATE, Cmd)))
+# define VBOXVDMACMD_CHROMIUM_CTL_PRIVATE_FROM_CTL(_p) ((PVBOXVDMACMD_CHROMIUM_CTL_PRIVATE)(((uint8_t*)(_p)) - RT_OFFSETOF(VBOXVDMACMD_CHROMIUM_CTL_PRIVATE, Cmd)))
 
 static PVBOXVDMACMD_CHROMIUM_CTL vboxVDMACrCtlCreate(VBOXVDMACMD_CHROMIUM_CTL_TYPE enmCmd, uint32_t cbCmd)
 {
@@ -1010,17 +1035,17 @@ DECLINLINE(void) vboxVDMACrCtlRelease (PVBOXVDMACMD_CHROMIUM_CTL pCmd)
 {
     PVBOXVDMACMD_CHROMIUM_CTL_PRIVATE pHdr = VBOXVDMACMD_CHROMIUM_CTL_PRIVATE_FROM_CTL(pCmd);
     uint32_t cRefs = ASMAtomicDecU32(&pHdr->cRefs);
-    if(!cRefs)
-    {
+    if (!cRefs)
         RTMemFree(pHdr);
-    }
 }
 
-DECLINLINE(void) vboxVDMACrCtlRetain (PVBOXVDMACMD_CHROMIUM_CTL pCmd)
+#if 0 /* unused */
+DECLINLINE(void) vboxVDMACrCtlRetain(PVBOXVDMACMD_CHROMIUM_CTL pCmd)
 {
     PVBOXVDMACMD_CHROMIUM_CTL_PRIVATE pHdr = VBOXVDMACMD_CHROMIUM_CTL_PRIVATE_FROM_CTL(pCmd);
     ASMAtomicIncU32(&pHdr->cRefs);
 }
+#endif /* unused */
 
 DECLINLINE(int) vboxVDMACrCtlGetRc (PVBOXVDMACMD_CHROMIUM_CTL pCmd)
 {
@@ -1030,14 +1055,17 @@ DECLINLINE(int) vboxVDMACrCtlGetRc (PVBOXVDMACMD_CHROMIUM_CTL pCmd)
 
 static DECLCALLBACK(void) vboxVDMACrCtlCbSetEvent(PVGASTATE pVGAState, PVBOXVDMACMD_CHROMIUM_CTL pCmd, void* pvContext)
 {
+    RT_NOREF(pVGAState, pCmd);
     RTSemEventSignal((RTSEMEVENT)pvContext);
 }
 
+# if 0 /** @todo vboxVDMACrCtlCbReleaseCmd is unused */
 static DECLCALLBACK(void) vboxVDMACrCtlCbReleaseCmd(PVGASTATE pVGAState, PVBOXVDMACMD_CHROMIUM_CTL pCmd, void* pvContext)
 {
+    RT_NOREF(pVGAState, pvContext);
     vboxVDMACrCtlRelease(pCmd);
 }
-
+# endif
 
 static int vboxVDMACrCtlPostAsync (PVGASTATE pVGAState, PVBOXVDMACMD_CHROMIUM_CTL pCmd, uint32_t cbCmd, PFNVBOXVDMACRCTL_CALLBACK pfnCompletion, void *pvCompletion)
 {
@@ -1050,9 +1078,9 @@ static int vboxVDMACrCtlPostAsync (PVGASTATE pVGAState, PVBOXVDMACMD_CHROMIUM_CT
         pVGAState->pDrv->pfnCrHgsmiControlProcess(pVGAState->pDrv, pCmd, cbCmd);
         return VINF_SUCCESS;
     }
-#ifdef DEBUG_misha
+# ifdef DEBUG_misha
     Assert(0);
-#endif
+# endif
     return VERR_NOT_SUPPORTED;
 }
 
@@ -1061,17 +1089,17 @@ static int vboxVDMACrCtlPost(PVGASTATE pVGAState, PVBOXVDMACMD_CHROMIUM_CTL pCmd
     RTSEMEVENT hComplEvent;
     int rc = RTSemEventCreate(&hComplEvent);
     AssertRC(rc);
-    if(RT_SUCCESS(rc))
+    if (RT_SUCCESS(rc))
     {
         rc = vboxVDMACrCtlPostAsync(pVGAState, pCmd, cbCmd, vboxVDMACrCtlCbSetEvent, (void*)hComplEvent);
-#ifdef DEBUG_misha
+# ifdef DEBUG_misha
         AssertRC(rc);
-#endif
+# endif
         if (RT_SUCCESS(rc))
         {
             rc = RTSemEventWaitNoResume(hComplEvent, RT_INDEFINITE_WAIT);
             AssertRC(rc);
-            if(RT_SUCCESS(rc))
+            if (RT_SUCCESS(rc))
             {
                 RTSemEventDestroy(hComplEvent);
             }
@@ -1093,6 +1121,7 @@ typedef struct VDMA_VBVA_CTL_CYNC_COMPLETION
 
 static DECLCALLBACK(void) vboxVDMACrHgcmSubmitSyncCompletion(struct VBOXCRCMDCTL* pCmd, uint32_t cbCmd, int rc, void *pvCompletion)
 {
+    RT_NOREF(pCmd, cbCmd);
     VDMA_VBVA_CTL_CYNC_COMPLETION *pData = (VDMA_VBVA_CTL_CYNC_COMPLETION*)pvCompletion;
     pData->rc = rc;
     rc = RTSemEventSignal(pData->hEvent);
@@ -1181,9 +1210,13 @@ static DECLCALLBACK(uint8_t*) vboxVDMACrHgcmHandleEnableRemainingHostCommand(HVB
 
 static DECLCALLBACK(void) vboxVDMACrHgcmNotifyTerminatingDoneCb(HVBOXCRCMDCTL_NOTIFY_TERMINATING hClient)
 {
+# ifdef VBOX_STRICT
     struct VBOXVDMAHOST *pVdma = hClient;
     Assert(pVdma->CmdVbva.i32State == VBVAEXHOSTCONTEXT_STATE_PROCESSING);
     Assert(pVdma->Thread.u32State == VBOXVDMATHREAD_STATE_TERMINATING);
+# else
+    RT_NOREF(hClient);
+# endif
 }
 
 static DECLCALLBACK(int) vboxVDMACrHgcmNotifyTerminatingCb(HVBOXCRCMDCTL_NOTIFY_TERMINATING hClient, VBOXCRCMDCTL_HGCMENABLE_DATA *pHgcmEnableData)
@@ -1245,10 +1278,10 @@ static int vdmaVBVAEnableProcess(struct VBOXVDMAHOST *pVdma, uint32_t u32Offset)
 
     if (!pVdma->CrSrvInfo.pfnEnable)
     {
-#ifdef DEBUG_misha
+# ifdef DEBUG_misha
         WARN(("pfnEnable is NULL\n"));
         return VERR_NOT_SUPPORTED;
-#endif
+# endif
     }
 
     int rc = VBoxVBVAExHSEnable(&pVdma->CmdVbva, pVBVA);
@@ -1733,7 +1766,6 @@ static int8_t vboxVDMACrCmdVbvaPagingDataInit(PVGASTATE pVGAState, const VBOXCMD
     const VBOXCMDVBVAPAGEIDX *pPages = pData->aPageNumbers;
 
     uint8_t * pu8VramBase = pVGAState->vram_ptrR3;
-    uint8_t *pu8VramMax = pu8VramBase + pVGAState->vram_size;
     if (offVRAM >= pVGAState->vram_size)
     {
         WARN(("invalid vram offset"));
@@ -1772,7 +1804,6 @@ static int8_t vboxVDMACrCmdVbvaPagingFill(PVGASTATE pVGAState, VBOXCMDVBVA_PAGIN
     }
 
     uint8_t * pu8VramBase = pVGAState->vram_ptrR3;
-    uint8_t *pu8VramMax = pu8VramBase + pVGAState->vram_size;
     if (offVRAM >= pVGAState->vram_size)
     {
         WARN(("invalid vram offset"));
@@ -1847,7 +1878,7 @@ static int8_t vboxVDMACrCmdVbvaProcessCmdData(struct VBOXVDMAHOST *pVdma, const
     }
 }
 
-#if 0
+# if 0
 typedef struct VBOXCMDVBVA_PAGING_TRANSFER
 {
     VBOXCMDVBVA_HDR Hdr;
@@ -1857,14 +1888,14 @@ typedef struct VBOXCMDVBVA_PAGING_TRANSFER
     uint32_t u32Reserved;
     VBOXCMDVBVA_SYSMEMEL aSysMem[1];
 } VBOXCMDVBVA_PAGING_TRANSFER;
-#endif
+# endif
 
 AssertCompile(sizeof (VBOXCMDVBVA_HDR) == 8);
 AssertCompile(sizeof (VBOXCMDVBVA_ALLOCINFO) == 4);
 AssertCompile(sizeof (VBOXCMDVBVAPAGEIDX) == 4);
 AssertCompile(!(PAGE_SIZE % sizeof (VBOXCMDVBVAPAGEIDX)));
 
-#define VBOXCMDVBVA_NUM_SYSMEMEL_PER_PAGE (PAGE_SIZE / sizeof (VBOXCMDVBVA_SYSMEMEL))
+# define VBOXCMDVBVA_NUM_SYSMEMEL_PER_PAGE (PAGE_SIZE / sizeof (VBOXCMDVBVA_SYSMEMEL))
 
 static int8_t vboxVDMACrCmdVbvaProcess(struct VBOXVDMAHOST *pVdma, const VBOXCMDVBVA_HDR *pCmd, uint32_t cbCmd)
 {
@@ -2239,11 +2270,11 @@ int vboxVDMACrHgsmiControlCompleteAsync(PPDMIDISPLAYVBVACALLBACKS pInterface, PV
     return VINF_SUCCESS;
 }
 
-static int vboxVDMACmdExecBltPerform(PVBOXVDMAHOST pVdma,
-        uint8_t *pvDstSurf, const uint8_t *pvSrcSurf,
-        const PVBOXVDMA_SURF_DESC pDstDesc, const PVBOXVDMA_SURF_DESC pSrcDesc,
-        const VBOXVDMA_RECTL * pDstRectl, const VBOXVDMA_RECTL * pSrcRectl)
+static int vboxVDMACmdExecBltPerform(PVBOXVDMAHOST pVdma, uint8_t *pvDstSurf, const uint8_t *pvSrcSurf,
+                                     const PVBOXVDMA_SURF_DESC pDstDesc, const PVBOXVDMA_SURF_DESC pSrcDesc,
+                                     const VBOXVDMA_RECTL * pDstRectl, const VBOXVDMA_RECTL * pSrcRectl)
 {
+    RT_NOREF(pVdma);
     /* we do not support color conversion */
     Assert(pDstDesc->format == pSrcDesc->format);
     /* we do not support stretching */
@@ -2272,8 +2303,10 @@ static int vboxVDMACmdExecBltPerform(PVBOXVDMAHOST pVdma,
         uint8_t * pvDstStart = pvDstSurf + offDstStart;
 
         uint32_t offSrcLineStart = pSrcRectl->left * pSrcDesc->bpp >> 3;
+# ifdef VBOX_STRICT
         uint32_t offSrcLineEnd = ((pSrcRectl->left * pSrcDesc->bpp + 7) >> 3) + ((pSrcDesc->bpp * pSrcRectl->width + 7) >> 3);
         uint32_t cbSrcLine = offSrcLineEnd - offSrcLineStart;
+# endif
         uint32_t offSrcStart = pSrcDesc->pitch * pSrcRectl->top + offSrcLineStart;
         Assert(cbSrcLine <= pSrcDesc->pitch);
         uint32_t cbSrcSkip = pSrcDesc->pitch;
@@ -2493,12 +2526,11 @@ static int vboxVDMACmdExec(PVBOXVDMAHOST pVdma, const uint8_t *pvBuffer, uint32_
             return VERR_INVALID_PARAMETER;
 
         PVBOXVDMACMD pCmd = (PVBOXVDMACMD)pvBuffer;
-        uint32_t cbCmd = 0;
         switch (pCmd->enmType)
         {
             case VBOXVDMACMD_TYPE_CHROMIUM_CMD:
             {
-#ifdef VBOXWDDM_TEST_UHGSMI
+# ifdef VBOXWDDM_TEST_UHGSMI
                 static int count = 0;
                 static uint64_t start, end;
                 if (count==0)
@@ -2512,8 +2544,8 @@ static int vboxVDMACmdExec(PVBOXVDMAHOST pVdma, const uint8_t *pvBuffer, uint32_
                     float ems = (end-start)/1000000.f;
                     LogRel(("100000 calls took %i ms, %i cps\n", (int)ems, (int)(100000.f*1000.f/ems) ));
                 }
-#endif
-                /* todo: post the buffer to chromium */
+# endif
+                /** @todo post the buffer to chromium */
                 return VINF_SUCCESS;
             }
             case VBOXVDMACMD_TYPE_DMA_PRESENT_BLT:
@@ -2571,12 +2603,12 @@ static int vboxVDMACmdExec(PVBOXVDMAHOST pVdma, const uint8_t *pvBuffer, uint32_
     return VERR_INVALID_STATE;
 }
 
-static DECLCALLBACK(int) vboxVDMAWorkerThread(RTTHREAD ThreadSelf, void *pvUser)
+static DECLCALLBACK(int) vboxVDMAWorkerThread(RTTHREAD hThreadSelf, void *pvUser)
 {
+    RT_NOREF(hThreadSelf);
     PVBOXVDMAHOST pVdma = (PVBOXVDMAHOST)pvUser;
     PVGASTATE pVGAState = pVdma->pVGAState;
     VBVAEXHOSTCONTEXT *pCmdVbva = &pVdma->CmdVbva;
-    PHGSMIINSTANCE pHgsmi = pVdma->pHgsmi;
     uint8_t *pCmd;
     uint32_t cbCmd;
     int rc;
@@ -2622,6 +2654,7 @@ static DECLCALLBACK(int) vboxVDMAWorkerThread(RTTHREAD ThreadSelf, void *pvUser)
 
 static void vboxVDMACommandProcess(PVBOXVDMAHOST pVdma, PVBOXVDMACBUF_DR pCmd, uint32_t cbCmd)
 {
+    RT_NOREF(cbCmd);
     PHGSMIINSTANCE pHgsmi = pVdma->pHgsmi;
     const uint8_t * pvBuf;
     PGMPAGEMAPLOCK Lock;
@@ -2646,7 +2679,7 @@ static void vboxVDMACommandProcess(PVBOXVDMAHOST pVdma, PVBOXVDMACBUF_DR pCmd, u
             Assert(offset + pCmd->cbBuf <= 0x1000);
             if (offset + pCmd->cbBuf > 0x1000)
             {
-                /* @todo: more advanced mechanism of command buffer proc is actually needed */
+                /** @todo more advanced mechanism of command buffer proc is actually needed */
                 rc = VERR_INVALID_PARAMETER;
                 break;
             }
@@ -2656,7 +2689,7 @@ static void vboxVDMACommandProcess(PVBOXVDMAHOST pVdma, PVBOXVDMACBUF_DR pCmd, u
             AssertRC(rc);
             if (!RT_SUCCESS(rc))
             {
-                /* @todo: if (rc == VERR_PGM_PHYS_PAGE_RESERVED) -> fall back on using PGMPhysRead ?? */
+                /** @todo if (rc == VERR_PGM_PHYS_PAGE_RESERVED) -> fall back on using PGMPhysRead ?? */
                 break;
             }
 
@@ -2679,6 +2712,7 @@ static void vboxVDMACommandProcess(PVBOXVDMAHOST pVdma, PVBOXVDMACBUF_DR pCmd, u
     AssertRC(rc);
 }
 
+# if 0 /** @todo vboxVDMAControlProcess is unused */
 static void vboxVDMAControlProcess(PVBOXVDMAHOST pVdma, PVBOXVDMA_CTL pCmd)
 {
     PHGSMIINSTANCE pHgsmi = pVdma->pHgsmi;
@@ -2686,10 +2720,11 @@ static void vboxVDMAControlProcess(PVBOXVDMAHOST pVdma, PVBOXVDMA_CTL pCmd)
     int rc = VBoxSHGSMICommandComplete (pHgsmi, pCmd);
     AssertRC(rc);
 }
+# endif
 
-#endif /* #ifdef VBOX_WITH_CRHGSMI */
-
+#endif /* VBOX_WITH_CRHGSMI */
 #ifdef VBOX_VDMA_WITH_WATCHDOG
+
 static DECLCALLBACK(void) vboxVDMAWatchDogTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
 {
     VBOXVDMAHOST *pVdma = (VBOXVDMAHOST *)pvUser;
@@ -2706,10 +2741,12 @@ static int vboxVDMAWatchDogCtl(struct VBOXVDMAHOST *pVdma, uint32_t cMillis)
         TMTimerStop(pVdma->WatchDogTimer);
     return VINF_SUCCESS;
 }
-#endif
+
+#endif /* VBOX_VDMA_WITH_WATCHDOG */
 
 int vboxVDMAConstruct(PVGASTATE pVGAState, uint32_t cPipeElements)
 {
+    RT_NOREF(cPipeElements);
     int rc;
     PVBOXVDMAHOST pVdma = (PVBOXVDMAHOST)RTMemAllocZ(sizeof(*pVdma));
     Assert(pVdma);
@@ -2740,11 +2777,8 @@ int vboxVDMAConstruct(PVGASTATE pVGAState, uint32_t cPipeElements)
                     pVGAState->pVdma = pVdma;
                     int rcIgnored = vboxVDMACrCtlHgsmiSetup(pVdma); NOREF(rcIgnored); /** @todo is this ignoring intentional? */
                     return VINF_SUCCESS;
-
-                    RTCritSectDelete(&pVdma->CalloutCritSect);
                 }
-                else
-                    WARN(("RTCritSectInit failed %d\n", rc));
+                WARN(("RTCritSectInit failed %d\n", rc));
 
                 VBoxVBVAExHSTerm(&pVdma->CmdVbva);
             }
@@ -2773,6 +2807,8 @@ int vboxVDMAReset(struct VBOXVDMAHOST *pVdma)
 {
 #ifdef VBOX_WITH_CRHGSMI
     vdmaVBVACtlDisableSync(pVdma);
+#else
+    RT_NOREF(pVdma);
 #endif
     return VINF_SUCCESS;
 }
@@ -2794,6 +2830,7 @@ int vboxVDMADestruct(struct VBOXVDMAHOST *pVdma)
 
 void vboxVDMAControl(struct VBOXVDMAHOST *pVdma, PVBOXVDMA_CTL pCmd, uint32_t cbCmd)
 {
+    RT_NOREF(cbCmd);
     PHGSMIINSTANCE pIns = pVdma->pHgsmi;
 
     switch (pCmd->enmCtl)
@@ -2842,13 +2879,13 @@ void vboxVDMACommand(struct VBOXVDMAHOST *pVdma, PVBOXVDMACBUF_DR pCmd, uint32_t
 
     vboxVDMACommandProcess(pVdma, pCmd, cbCmd);
 #else
+    RT_NOREF(cbCmd);
     pCmd->rc = rc;
     rc = VBoxSHGSMICommandComplete (pVdma->pHgsmi, pCmd);
     AssertRC(rc);
 #endif
 }
 
-/**/
 #ifdef VBOX_WITH_CRHGSMI
 
 static DECLCALLBACK(void) vdmaVBVACtlSubmitSyncCompletion(VBVAEXHOSTCONTEXT *pVbva, struct VBVAEXHOSTCTL *pCtl, int rc, void *pvContext);
@@ -2980,8 +3017,10 @@ static DECLCALLBACK(int) vdmaVBVANotifyDisable(PVGASTATE pVGAState)
     return VINF_SUCCESS;
 }
 
-static DECLCALLBACK(void) vdmaVBVACtlThreadCreatedEnable(struct VBOXVDMATHREAD *pThread, int rc, void *pvThreadContext, void *pvContext)
+static DECLCALLBACK(void) vdmaVBVACtlThreadCreatedEnable(struct VBOXVDMATHREAD *pThread, int rc,
+                                                         void *pvThreadContext, void *pvContext)
 {
+    RT_NOREF(pThread);
     PVBOXVDMAHOST pVdma = (PVBOXVDMAHOST)pvThreadContext;
     VBVAEXHOSTCTL* pHCtl = (VBVAEXHOSTCTL*)pvContext;
 
@@ -3124,8 +3163,10 @@ static int vdmaVBVACtlEnableDisableSubmit(PVBOXVDMAHOST pVdma, VBOXCMDVBVA_CTL_E
     return VINF_SUCCESS;
 }
 
-static DECLCALLBACK(void) vdmaVBVACtlSubmitSyncCompletion(VBVAEXHOSTCONTEXT *pVbva, struct VBVAEXHOSTCTL *pCtl, int rc, void *pvContext)
+static DECLCALLBACK(void) vdmaVBVACtlSubmitSyncCompletion(VBVAEXHOSTCONTEXT *pVbva, struct VBVAEXHOSTCTL *pCtl,
+                                                          int rc, void *pvContext)
 {
+    RT_NOREF(pVbva, pCtl);
     VDMA_VBVA_CTL_CYNC_COMPLETION *pData = (VDMA_VBVA_CTL_CYNC_COMPLETION*)pvContext;
     pData->rc = rc;
     rc = RTSemEventSignal(pData->hEvent);
@@ -3219,6 +3260,7 @@ typedef struct VBOXCMDVBVA_CMDHOSTCTL_SYNC
 
 static DECLCALLBACK(void) vboxCmdVBVACmdHostCtlSyncCb(struct VBOXCRCMDCTL* pCmd, uint32_t cbCmd, int rc, void *pvCompletion)
 {
+    RT_NOREF(pCmd, cbCmd);
     VBOXCMDVBVA_CMDHOSTCTL_SYNC *pData = (VBOXCMDVBVA_CMDHOSTCTL_SYNC*)pvCompletion;
 
     pData->rc = rc;
@@ -3253,7 +3295,7 @@ static DECLCALLBACK(int) vboxCmdVBVACmdCallout(struct VBOXVDMAHOST *pVdma, struc
 static int vboxCmdVBVACmdCalloutProcess(struct VBOXVDMAHOST *pVdma, struct VBOXCRCMDCTL* pCmd)
 {
     int rc = VINF_SUCCESS;
-    for(;;)
+    for (;;)
     {
         rc = RTCritSectEnter(&pVdma->CalloutCritSect);
         if (RT_SUCCESS(rc))
@@ -3391,9 +3433,10 @@ bool vboxCmdVBVAIsEnabled(PVGASTATE pVGAState)
 {
     return VBoxVBVAExHSIsEnabled(&pVGAState->pVdma->CmdVbva);
 }
-#endif
 
-int vboxVDMASaveStateExecPrep(struct VBOXVDMAHOST *pVdma, PSSMHANDLE pSSM)
+#endif /* VBOX_WITH_CRHGSMI */
+
+int vboxVDMASaveStateExecPrep(struct VBOXVDMAHOST *pVdma)
 {
 #ifdef VBOX_WITH_CRHGSMI
     int rc = vdmaVBVAPause(pVdma);
@@ -3406,9 +3449,9 @@ int vboxVDMASaveStateExecPrep(struct VBOXVDMAHOST *pVdma, PSSMHANDLE pSSM)
         return rc;
     }
 
-#ifdef DEBUG_misha
+# ifdef DEBUG_misha
     WARN(("debug prep"));
-#endif
+# endif
 
     PVGASTATE pVGAState = pVdma->pVGAState;
     PVBOXVDMACMD_CHROMIUM_CTL pCmd = (PVBOXVDMACMD_CHROMIUM_CTL)vboxVDMACrCtlCreate(
@@ -3427,11 +3470,12 @@ int vboxVDMASaveStateExecPrep(struct VBOXVDMAHOST *pVdma, PSSMHANDLE pSSM)
     }
     return VERR_NO_MEMORY;
 #else
+    RT_NOREF(pVdma);
     return VINF_SUCCESS;
 #endif
 }
 
-int vboxVDMASaveStateExecDone(struct VBOXVDMAHOST *pVdma, PSSMHANDLE pSSM)
+int vboxVDMASaveStateExecDone(struct VBOXVDMAHOST *pVdma)
 {
 #ifdef VBOX_WITH_CRHGSMI
     int rc = vdmaVBVAResume(pVdma);
@@ -3444,9 +3488,9 @@ int vboxVDMASaveStateExecDone(struct VBOXVDMAHOST *pVdma, PSSMHANDLE pSSM)
         return rc;
     }
 
-#ifdef DEBUG_misha
+# ifdef DEBUG_misha
     WARN(("debug done"));
-#endif
+# endif
 
     PVGASTATE pVGAState = pVdma->pVGAState;
     PVBOXVDMACMD_CHROMIUM_CTL pCmd = (PVBOXVDMACMD_CHROMIUM_CTL)vboxVDMACrCtlCreate(
@@ -3465,6 +3509,7 @@ int vboxVDMASaveStateExecDone(struct VBOXVDMAHOST *pVdma, PSSMHANDLE pSSM)
     }
     return VERR_NO_MEMORY;
 #else
+    RT_NOREF(pVdma);
     return VINF_SUCCESS;
 #endif
 }
@@ -3472,12 +3517,14 @@ int vboxVDMASaveStateExecDone(struct VBOXVDMAHOST *pVdma, PSSMHANDLE pSSM)
 int vboxVDMASaveStateExecPerform(struct VBOXVDMAHOST *pVdma, PSSMHANDLE pSSM)
 {
     int rc;
+#ifndef VBOX_WITH_CRHGSMI
+    RT_NOREF(pVdma, pSSM);
 
-#ifdef VBOX_WITH_CRHGSMI
+#else
     if (!VBoxVBVAExHSIsEnabled(&pVdma->CmdVbva))
 #endif
     {
-        rc = SSMR3PutU32(pSSM, 0xffffffff);
+        rc = SSMR3PutU32(pSSM, UINT32_MAX);
         AssertRCReturn(rc, rc);
         return VINF_SUCCESS;
     }
@@ -3503,7 +3550,7 @@ int vboxVDMASaveLoadExecPerform(struct VBOXVDMAHOST *pVdma, PSSMHANDLE pSSM, uin
     int rc = SSMR3GetU32(pSSM, &u32);
     AssertLogRelRCReturn(rc, rc);
 
-    if (u32 != 0xffffffff)
+    if (u32 != UINT32_MAX)
     {
 #ifdef VBOX_WITH_CRHGSMI
         rc = vdmaVBVACtlEnableSubmitSync(pVdma, u32, true);
@@ -3523,6 +3570,7 @@ int vboxVDMASaveLoadExecPerform(struct VBOXVDMAHOST *pVdma, PSSMHANDLE pSSM, uin
 
         return VINF_SUCCESS;
 #else
+        RT_NOREF(pVdma, u32Version);
         WARN(("Unsupported VBVACtl info!\n"));
         return VERR_VERSION_MISMATCH;
 #endif
@@ -3558,6 +3606,9 @@ int vboxVDMASaveLoadDone(struct VBOXVDMAHOST *pVdma)
         VBoxVBVAExHCtlFree(&pVdma->CmdVbva, pHCtl);
         return rc;
     }
+#else
+    RT_NOREF(pVdma);
 #endif
     return VINF_SUCCESS;
 }
+
diff --git a/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.cpp b/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.cpp
index 2308060..26c562d 100644
--- a/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.cpp
+++ b/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.cpp
@@ -9,7 +9,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -90,10 +90,10 @@
 #define VBOXHGSMI_STATE_FIFOSTART_MAGIC 0x9abcdef1
 #define VBOXHGSMI_STATE_FIFOSTOP_MAGIC 0x1fedcba9
 
-#define VBOXHGSMI_SAVE_START(_pSSM)     do{ int rc2 = SSMR3PutU32(_pSSM, VBOXHGSMI_STATE_START_MAGIC);      AssertRC(rc2);}while(0)
-#define VBOXHGSMI_SAVE_STOP(_pSSM)      do{ int rc2 = SSMR3PutU32(_pSSM, VBOXHGSMI_STATE_STOP_MAGIC);       AssertRC(rc2);}while(0)
-#define VBOXHGSMI_SAVE_FIFOSTART(_pSSM) do{ int rc2 = SSMR3PutU32(_pSSM, VBOXHGSMI_STATE_FIFOSTART_MAGIC);  AssertRC(rc2);}while(0)
-#define VBOXHGSMI_SAVE_FIFOSTOP(_pSSM)  do{ int rc2 = SSMR3PutU32(_pSSM, VBOXHGSMI_STATE_FIFOSTOP_MAGIC);   AssertRC(rc2);}while(0)
+#define VBOXHGSMI_SAVE_START(_pSSM)     do{ int rc2 = SSMR3PutU32(_pSSM, VBOXHGSMI_STATE_START_MAGIC);     AssertRC(rc2); }while(0)
+#define VBOXHGSMI_SAVE_STOP(_pSSM)      do{ int rc2 = SSMR3PutU32(_pSSM, VBOXHGSMI_STATE_STOP_MAGIC);      AssertRC(rc2); }while(0)
+#define VBOXHGSMI_SAVE_FIFOSTART(_pSSM) do{ int rc2 = SSMR3PutU32(_pSSM, VBOXHGSMI_STATE_FIFOSTART_MAGIC); AssertRC(rc2); }while(0)
+#define VBOXHGSMI_SAVE_FIFOSTOP(_pSSM)  do{ int rc2 = SSMR3PutU32(_pSSM, VBOXHGSMI_STATE_FIFOSTOP_MAGIC);  AssertRC(rc2); }while(0)
 
 #define VBOXHGSMI_LOAD_CHECK(_pSSM, _v) \
     do{ \
@@ -303,10 +303,8 @@ static HGSMIOFFSET hgsmiProcessGuestCmdCompletion(HGSMIINSTANCE *pIns)
 
         if (RTListIsEmpty(&pIns->guestCmdCompleted))
         {
-            if(pIns->pHGFlags)
-            {
+            if (pIns->pHGFlags)
                 ASMAtomicAndU32(&pIns->pHGFlags->u32HostFlags, ~HGSMIHOSTFLAGS_GCOMMAND_COMPLETED);
-            }
         }
 
         hgsmiFIFOUnlock(pIns);
@@ -354,7 +352,7 @@ static bool hgsmiProcessHostCmdCompletion(HGSMIINSTANCE *pIns,
     VM_ASSERT_EMT(pIns->pVM);
 
     int rc = hgsmiFIFOLock(pIns);
-    if(RT_SUCCESS(rc))
+    if (RT_SUCCESS(rc))
     {
         /* Search the Read list for the given buffer offset. */
         HGSMIHOSTFIFOENTRY *pEntry = NULL;
@@ -391,7 +389,7 @@ static bool hgsmiProcessHostCmdCompletion(HGSMIINSTANCE *pIns,
         }
 
         hgsmiFIFOUnlock(pIns);
-        if(!bCompleteFirst)
+        if (!bCompleteFirst)
             LogRel(("HGSMI[%s]: ignored invalid write to the host FIFO: 0x%08X!!!\n", pIns->pszName, offBuffer));
     }
     return false;
@@ -419,10 +417,10 @@ HGSMIOFFSET HGSMIHostRead (HGSMIINSTANCE *pIns)
 
     VM_ASSERT_EMT(pIns->pVM);
 
-    AssertPtrReturn(pIns->pHGFlags, VERR_WRONG_ORDER);
+    AssertPtrReturn(pIns->pHGFlags, HGSMIOFFSET_VOID);
     int rc = hgsmiFIFOLock(pIns);
     AssertRC(rc);
-    if(RT_SUCCESS(rc))
+    if (RT_SUCCESS(rc))
     {
         /* Get the host FIFO head entry. */
         HGSMIHOSTFIFOENTRY *pEntry = RTListGetFirst(&pIns->hostFIFO, HGSMIHOSTFIFOENTRY, nodeEntry);
@@ -453,6 +451,7 @@ HGSMIOFFSET HGSMIHostRead (HGSMIINSTANCE *pIns)
             /* Return the buffer offset of the host FIFO head. */
             return pEntry->offBuffer;
         }
+
         hgsmiFIFOUnlock(pIns);
     }
     /* Special value that means there is no host buffers to be processed. */
@@ -722,7 +721,7 @@ static int hgsmiHostCommandFreeByEntry (HGSMIHOSTFIFOENTRY *pEntry)
 
     HGSMIINSTANCE *pIns = pEntry->pIns;
     int rc = hgsmiFIFOLock (pIns);
-    if(RT_SUCCESS(rc))
+    if (RT_SUCCESS(rc))
     {
         RTListNodeRemove(&pEntry->nodeEntry);
         hgsmiFIFOUnlock (pIns);
@@ -730,7 +729,7 @@ static int hgsmiHostCommandFreeByEntry (HGSMIHOSTFIFOENTRY *pEntry)
         void *pvData = HGSMIBufferDataFromOffset(&pIns->hostHeap.area, pEntry->offBuffer);
 
         rc = hgsmiHostHeapLock (pIns);
-        if(RT_SUCCESS(rc))
+        if (RT_SUCCESS(rc))
         {
             /* Deallocate the host heap memory. */
             hgsmiHostHeapDataFree(&pIns->hostHeap, pvData);
@@ -1291,14 +1290,14 @@ int HGSMIHostSaveStateExec (PHGSMIINSTANCE pIns, PSSMHANDLE pSSM)
               0:
               hgsmiHostHeapHandleLocationOffset(&pIns->hostHeap);
     rc = SSMR3PutU32 (pSSM, off);
-    if(off != HGSMIOFFSET_VOID)
+    if (off != HGSMIOFFSET_VOID)
     {
         SSMR3PutU32 (pSSM, hgsmiHostHeapOffset(&pIns->hostHeap));
         SSMR3PutU32 (pSSM, hgsmiHostHeapSize(&pIns->hostHeap));
         /* need save mem pointer to calculate offset on restore */
         SSMR3PutU64 (pSSM, (uint64_t)(uintptr_t)pIns->area.pu8Base);
         rc = hgsmiFIFOLock (pIns);
-        if(RT_SUCCESS(rc))
+        if (RT_SUCCESS(rc))
         {
             rc = hgsmiHostSaveFifoLocked (&pIns->hostFIFO, pSSM); AssertRC(rc);
             rc = hgsmiHostSaveFifoLocked (&pIns->hostFIFORead, pSSM); AssertRC(rc);
@@ -1326,7 +1325,7 @@ int HGSMIHostSaveStateExec (PHGSMIINSTANCE pIns, PSSMHANDLE pSSM)
 
 int HGSMIHostLoadStateExec (PHGSMIINSTANCE pIns, PSSMHANDLE pSSM, uint32_t u32Version)
 {
-    if(u32Version < VGA_SAVEDSTATE_VERSION_HGSMI)
+    if (u32Version < VGA_SAVEDSTATE_VERSION_HGSMI)
         return VINF_SUCCESS;
 
     VBOXHGSMI_LOAD_START(pSSM);
@@ -1345,10 +1344,9 @@ int HGSMIHostLoadStateExec (PHGSMIINSTANCE pIns, PSSMHANDLE pSSM, uint32_t u32Ve
     AssertLogRelRCReturn(rc, rc);
     pIns->pHGFlags = (off != HGSMIOFFSET_VOID) ? (HGSMIHOSTFLAGS*)HGSMIOffsetToPointer (&pIns->area, off) : NULL;
 
-    HGSMIHOSTHEAP hHeap = pIns->hostHeap;
     rc = SSMR3GetU32(pSSM, &off);
     AssertLogRelRCReturn(rc, rc);
-    if(off != HGSMIOFFSET_VOID)
+    if (off != HGSMIOFFSET_VOID)
     {
         /* There is a saved heap. */
         if (u32HeapType == HGSMI_HEAP_TYPE_NULL)
@@ -1369,7 +1367,7 @@ int HGSMIHostLoadStateExec (PHGSMIINSTANCE pIns, PSSMHANDLE pSSM, uint32_t u32Ve
         if (RT_SUCCESS(rc))
         {
             rc = hgsmiFIFOLock (pIns);
-            if(RT_SUCCESS(rc))
+            if (RT_SUCCESS(rc))
             {
                 rc = hgsmiHostLoadFifoLocked (pIns, &pIns->hostFIFO, pSSM);
                 if (RT_SUCCESS(rc))
@@ -1439,11 +1437,10 @@ int HGSMIHostLoadStateExec (PHGSMIINSTANCE pIns, PSSMHANDLE pSSM, uint32_t u32Ve
  * Channels management.
  */
 
-static int hgsmiChannelMapCreate (PHGSMIINSTANCE pIns,
-                                  const char *pszChannel,
-                                  uint8_t *pu8Channel)
+static int hgsmiChannelMapCreate(PHGSMIINSTANCE pIns, const char *pszChannel, uint8_t *pu8Channel)
 {
-    /* @todo later */
+    RT_NOREF(pIns, pszChannel, pu8Channel);
+    /** @todo later */
     return VERR_NOT_SUPPORTED;
 }
 
@@ -1477,11 +1474,11 @@ int HGSMIHostChannelRegister(PHGSMIINSTANCE pIns,
 
 /* Register a new HGSMI channel by name.
  */
-int HGSMIChannelRegisterName (PHGSMIINSTANCE pIns,
-                              const char *pszChannel,
-                              PFNHGSMICHANNELHANDLER pfnChannelHandler,
-                              void *pvChannelHandler,
-                              uint8_t *pu8Channel)
+int HGSMIChannelRegisterName(PHGSMIINSTANCE pIns,
+                             const char *pszChannel,
+                             PFNHGSMICHANNELHANDLER pfnChannelHandler,
+                             void *pvChannelHandler,
+                             uint8_t *pu8Channel)
 {
     LogFlowFunc(("pIns %p, pszChannel %s, pfnChannelHandler %p, pvChannelHandler %p, pu8Channel %p\n",
                   pIns, pszChannel, pfnChannelHandler, pvChannelHandler, pu8Channel));
@@ -1590,7 +1587,7 @@ static DECLCALLBACK(int) hgsmiChannelHandler (void *pvHandler, uint16_t u16Chann
             }
 
             HGSMIBUFFERLOCATION *pLoc = (HGSMIBUFFERLOCATION *)pvBuffer;
-            if(pLoc->cbLocation != sizeof(HGSMIHOSTFLAGS))
+            if (pLoc->cbLocation != sizeof(HGSMIHOSTFLAGS))
             {
                 rc = VERR_INVALID_PARAMETER;
                 break;
@@ -1704,19 +1701,22 @@ int HGSMICreate (PHGSMIINSTANCE *ppIns,
 uint32_t HGSMIReset (PHGSMIINSTANCE pIns)
 {
     uint32_t flags = 0;
-    if(pIns->pHGFlags)
+    if (pIns->pHGFlags)
     {
         /* treat the abandoned commands as read.. */
-        while(HGSMIHostRead (pIns) != HGSMIOFFSET_VOID)  {}
+        while (HGSMIHostRead(pIns) != HGSMIOFFSET_VOID)
+        {}
         flags = pIns->pHGFlags->u32HostFlags;
         pIns->pHGFlags->u32HostFlags = 0;
     }
 
     /* .. and complete them */
-    while(hgsmiProcessHostCmdCompletion (pIns, 0, true)) {}
+    while (hgsmiProcessHostCmdCompletion(pIns, 0, true))
+    {}
 
 #ifdef VBOX_WITH_WDDM
-    while(hgsmiProcessGuestCmdCompletion(pIns) != HGSMIOFFSET_VOID) {}
+    while(hgsmiProcessGuestCmdCompletion(pIns) != HGSMIOFFSET_VOID)
+    {}
 #endif
 
     hgsmiHostHeapDestroy(&pIns->hostHeap);
@@ -1793,7 +1793,7 @@ int hgsmiCompleteGuestCommand(PHGSMIINSTANCE pIns,
     int rc = hgsmiGuestCommandComplete (pIns, offBuffer);
     if (RT_SUCCESS (rc))
     {
-        if(bDoIrq)
+        if (bDoIrq)
         {
             /* Now guest can read the FIFO, the notification is informational. */
             hgsmiNotifyGuest (pIns);
diff --git a/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.h b/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.h
index 898f642..5b52684 100644
--- a/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.h
+++ b/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Graphics/HGSMI/SHGSMIHost.cpp b/src/VBox/Devices/Graphics/HGSMI/SHGSMIHost.cpp
index b17946f..09d2757 100644
--- a/src/VBox/Devices/Graphics/HGSMI/SHGSMIHost.cpp
+++ b/src/VBox/Devices/Graphics/HGSMI/SHGSMIHost.cpp
@@ -1,6 +1,10 @@
 /* $Id: SHGSMIHost.cpp $ */
+/** @file
+ * Missing description.
+ */
+
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -10,6 +14,7 @@
  * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
+
 #include "SHGSMIHost.h"
 #include <VBox/VBoxVideo.h>
 
diff --git a/src/VBox/Devices/Graphics/HGSMI/SHGSMIHost.h b/src/VBox/Devices/Graphics/HGSMI/SHGSMIHost.h
index e414f94..3cb2381 100644
--- a/src/VBox/Devices/Graphics/HGSMI/SHGSMIHost.h
+++ b/src/VBox/Devices/Graphics/HGSMI/SHGSMIHost.h
@@ -1,6 +1,10 @@
 /* $Id: SHGSMIHost.h $ */
+/** @file
+ * Missing description
+ */
+
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -10,6 +14,7 @@
  * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
+
 #ifndef ___SHGSMIHost_h___
 #define ___SHGSMIHost_h___
 
@@ -19,4 +24,5 @@ int VBoxSHGSMICommandComplete (PHGSMIINSTANCE pIns, void *pvData);
 
 void VBoxSHGSMICommandMarkAsynchCompletion (void *pvData);
 
-#endif /* #ifndef ___SHGSMIHost_h___ */
+#endif
+
diff --git a/src/VBox/Devices/Graphics/VBoxSVGA3D.def b/src/VBox/Devices/Graphics/VBoxSVGA3D.def
index 35b6c96..c6814c8 100644
--- a/src/VBox/Devices/Graphics/VBoxSVGA3D.def
+++ b/src/VBox/Devices/Graphics/VBoxSVGA3D.def
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2014-2015 Oracle Corporation
+; Copyright (C) 2014-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
@@ -37,4 +37,3 @@ EXPORTS
     ShaderTransformProjection
     ShaderSetPositionTransformed
 
-
diff --git a/src/VBox/Devices/Graphics/VBoxSVGA3DObjC.def b/src/VBox/Devices/Graphics/VBoxSVGA3DObjC.def
index ca5378e..d748d6c 100644
--- a/src/VBox/Devices/Graphics/VBoxSVGA3DObjC.def
+++ b/src/VBox/Devices/Graphics/VBoxSVGA3DObjC.def
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2014-2015 Oracle Corporation
+; Copyright (C) 2014-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Graphics/shaderlib/directx.c b/src/VBox/Devices/Graphics/shaderlib/directx.c
index bb0eb46..03d349a 100644
--- a/src/VBox/Devices/Graphics/shaderlib/directx.c
+++ b/src/VBox/Devices/Graphics/shaderlib/directx.c
@@ -55,7 +55,9 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d_caps);
 #define WINE_DEFAULT_VIDMEM (64 * 1024 * 1024)
 
 /* The d3d device ID */
+#if 0 /* VBox: unused */
 static const GUID IID_D3DDEVICE_D3DUID = { 0xaeb2cdd4, 0x6e41, 0x43ea, { 0x94,0x1c,0x83,0x61,0xcc,0x76,0x07,0x81 } };
+#endif
 
 
 /* Extension detection */
@@ -251,7 +253,7 @@ static inline BOOL test_arb_vs_offset_limit(const struct wined3d_gl_info *gl_inf
     }
     GL_EXTCALL(glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prog));
     GL_EXTCALL(glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
-                                  strlen(testcode), testcode));
+                                  (GLsizei)strlen(testcode), testcode));
     if(glGetError() != 0) {
         TRACE("OpenGL implementation does not allow indirect addressing offsets > 63\n");
         TRACE("error: %s\n", debugstr_a((const char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB)));
@@ -493,7 +495,7 @@ static BOOL match_broken_nv_clip(const struct wined3d_gl_info *gl_info, const ch
     }
     GL_EXTCALL(glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prog));
     GL_EXTCALL(glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
-                                  strlen(testcode), testcode));
+                                  (GLsizei)strlen(testcode), testcode));
     glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &pos);
     if(pos != -1)
     {
@@ -903,6 +905,7 @@ struct driver_version_information
     WORD lopart_hi, lopart_lo;      /* driver loword to report      */
 };
 
+#if 0 /* VBox: unused */
 static const struct driver_version_information driver_version_table[] =
 {
     /* Nvidia drivers. Geforce6 and newer cards are supported by the current driver (180.x)
@@ -959,6 +962,7 @@ static const struct driver_version_information driver_version_table[] =
 
     /* TODO: Add information about legacy ATI hardware, Intel and other cards. */
 };
+#endif /* VBox: unused */
 
 
 static DWORD wined3d_parse_gl_version(const char *gl_version)
@@ -1927,24 +1931,32 @@ static void check_gl_extension(struct wined3d_gl_info *pGlInfo, const char *pszE
 /* Context activation is done by the caller. */
 BOOL IWineD3DImpl_FillGLCaps(struct wined3d_adapter *adapter, struct VBOXVMSVGASHADERIF *pVBoxShaderIf)
 {
+#ifndef VBOX_WITH_VMSVGA
     struct wined3d_driver_info *driver_info = &adapter->driver_info;
+#endif
     struct wined3d_gl_info *gl_info = &adapter->gl_info;
 #ifndef VBOX_WITH_VMSVGA
     const char *GL_Extensions    = NULL;
     const char *WGL_Extensions   = NULL;
 #endif
     const char *gl_vendor_str, *gl_renderer_str, *gl_version_str;
+#ifndef VBOX_WITH_VMSVGA
     struct fragment_caps fragment_caps;
+#endif
     enum wined3d_gl_vendor gl_vendor;
     enum wined3d_pci_vendor card_vendor;
     enum wined3d_pci_device device;
     GLint       gl_max;
     GLfloat     gl_floatv[2];
     unsigned    i;
+#ifndef VBOX_WITH_VMSVGA
     HDC         hdc;
+#endif
     unsigned int vidmem=0;
     DWORD gl_version;
+#ifndef VBOX_WITH_VMSVGA
     size_t len;
+#endif
 
     TRACE_(d3d_caps)("(%p)\n", gl_info);
 
@@ -2073,7 +2085,7 @@ BOOL IWineD3DImpl_FillGLCaps(struct wined3d_adapter *adapter, struct VBOXVMSVGAS
         while (pVBoxShaderIf->pfnGetNextExtension(pVBoxShaderIf, &pvEnumCtx, szCurExt, sizeof(szCurExt), true /*fOtherProfile*/))
             check_gl_extension(gl_info, szCurExt);
     }
-#else /* VBOX_WITH_VMSVGA */
+#else /* !VBOX_WITH_VMSVGA */
     while (*GL_Extensions)
     {
         const char *start;
@@ -2100,7 +2112,7 @@ BOOL IWineD3DImpl_FillGLCaps(struct wined3d_adapter *adapter, struct VBOXVMSVGAS
             }
         }
     }
-#endif
+#endif /* !VBOX_WITH_VMSVGA */
 
 #ifdef VBOX_WITH_VMSVGA
 # ifdef RT_OS_WINDOWS
diff --git a/src/VBox/Devices/Graphics/shaderlib/glsl_shader.c b/src/VBox/Devices/Graphics/shaderlib/glsl_shader.c
index 21bb33a..4289737 100644
--- a/src/VBox/Devices/Graphics/shaderlib/glsl_shader.c
+++ b/src/VBox/Devices/Graphics/shaderlib/glsl_shader.c
@@ -2013,7 +2013,7 @@ static void shader_glsl_color_correction(const struct wined3d_shader_instruction
     if (is_complex_fixup(fixup))
     {
         enum complex_fixup complex_fixup = get_complex_fixup(fixup);
-        FIXME("Complex fixup (%#x) not supported\n",complex_fixup);
+        FIXME("Complex fixup (%#x) not supported\n",complex_fixup); (void)complex_fixup;
         return;
     }
 
@@ -3639,8 +3639,8 @@ static void shader_glsl_texm3x3vspec(const struct wined3d_shader_instruction *in
  */
 static void shader_glsl_texbem(const struct wined3d_shader_instruction *ins)
 {
-    IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)ins->ctx->shader;
-    IWineD3DDeviceImpl *deviceImpl = (IWineD3DDeviceImpl *)shader->baseShader.device;
+    /*IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)ins->ctx->shader;
+    IWineD3DDeviceImpl *deviceImpl = (IWineD3DDeviceImpl *)shader->baseShader.device; - unused */
     const struct wined3d_gl_info *gl_info = ins->ctx->gl_info;
     const struct shader_glsl_ctx_priv *priv = ins->ctx->backend_data;
     glsl_sample_function_t sample_function;
diff --git a/src/VBox/Devices/Audio_old/Makefile.kup b/src/VBox/Devices/Graphics/shaderlib/libWineStub/Makefile.kup
similarity index 100%
copy from src/VBox/Devices/Audio_old/Makefile.kup
copy to src/VBox/Devices/Graphics/shaderlib/libWineStub/Makefile.kup
diff --git a/src/VBox/Devices/Graphics/shaderlib/libWineStub/debug.c b/src/VBox/Devices/Graphics/shaderlib/libWineStub/debug.c
index e3467a8..e604756 100644
--- a/src/VBox/Devices/Graphics/shaderlib/libWineStub/debug.c
+++ b/src/VBox/Devices/Graphics/shaderlib/libWineStub/debug.c
@@ -31,9 +31,19 @@
 #include "wine/port.h"
 
 #include "initguid.h"
+#ifdef VBOX
+# include <iprt/win/objbase.h>
+# include <wine/wined3d.h>
+# ifdef _MSC_VER
+#  include <iprt/win/windows.h>
+# else
+#  include <windows.h>
+# endif
+#else
 #include <objbase.h>
 #include <wine/wined3d.h>
 #include <windows.h>
+#endif
 
 #include <stdlib.h>
 #include <stdio.h>
@@ -170,7 +180,7 @@ static void parse_options( const char *str )
         {
             for (i = 0; i < sizeof(debug_classes)/sizeof(debug_classes[0]); i++)
             {
-                int len = strlen(debug_classes[i]);
+                int len = (int)strlen(debug_classes[i]);
                 if (len != (p - opt)) continue;
                 if (!memcmp( opt, debug_classes[i], len ))  /* found it */
                 {
@@ -208,7 +218,8 @@ static void debug_usage(void)
         "Example: WINEDEBUG=+all,warn-heap\n"
         "    turns on all messages except warning heap messages\n"
         "Available message classes: err, warn, fixme, trace\n";
-    write( 2, usage, sizeof(usage) - 1 );
+    int res = write( 2, usage, sizeof(usage) - 1 );
+    NOREF(res);
     exit(1);
 }
 
@@ -311,7 +322,7 @@ int wine_dbg_log( enum __wine_debug_class cls, struct __wine_debug_channel *chan
 #if !defined(VBOX_WITH_VMSVGA) || defined(RT_OS_WINDOWS)
 int interlocked_xchg_add( int *dest, int incr )
 {
-    return InterlockedExchangeAdd(dest, incr);
+    return InterlockedExchangeAdd((LONG *)dest, incr);
 }
 #endif
 
@@ -340,7 +351,7 @@ static void release_temp_buffer( char *buffer, size_t size )
 /* default implementation of wine_dbgstr_an */
 static const char *default_dbgstr_an( const char *str, int n )
 {
-    static const char hex[16] = "0123456789abcdef";
+    static const char hex[16+1] = "0123456789abcdef";
     char *dst, *res;
     size_t size;
 
@@ -351,7 +362,7 @@ static const char *default_dbgstr_an( const char *str, int n )
         sprintf( res, "#%04x", LOWORD(str) );
         return res;
     }
-    if (n == -1) n = strlen(str);
+    if (n == -1) n = (int)strlen(str);
     if (n < 0) n = 0;
     size = 10 + min( 300, n * 4 );
     dst = res = funcs.get_temp_buffer( size );
diff --git a/src/VBox/Devices/Graphics/shaderlib/libWineStub/include/wine/debug.h b/src/VBox/Devices/Graphics/shaderlib/libWineStub/include/wine/debug.h
index dd01932..4866a27 100644
--- a/src/VBox/Devices/Graphics/shaderlib/libWineStub/include/wine/debug.h
+++ b/src/VBox/Devices/Graphics/shaderlib/libWineStub/include/wine/debug.h
@@ -314,9 +314,9 @@ static inline const char *wine_dbgstr_longlong( ULONGLONG ll )
 #define WINE_ERR_ON(ch)            __WINE_IS_DEBUG_ON(_ERR,&__wine_dbch_##ch)
 
 #define WINE_DECLARE_DEBUG_CHANNEL(ch) \
-    static struct __wine_debug_channel __wine_dbch_##ch = { ~0, #ch }
+    static struct __wine_debug_channel __wine_dbch_##ch = { /* was: ~0, VBox:*/ UINT8_MAX, #ch }
 #define WINE_DEFAULT_DEBUG_CHANNEL(ch) \
-    static struct __wine_debug_channel __wine_dbch_##ch = { ~0, #ch }; \
+    static struct __wine_debug_channel __wine_dbch_##ch = { /* was: ~0, VBox:*/ UINT8_MAX, #ch }; \
     static struct __wine_debug_channel * const __wine_dbch___default = &__wine_dbch_##ch
 
 #define WINE_DPRINTF               wine_dbg_printf
diff --git a/src/VBox/Devices/Graphics/shaderlib/libWineStub/include/wine/list.h b/src/VBox/Devices/Graphics/shaderlib/libWineStub/include/wine/list.h
index cdc61fb..fbe38e8 100644
--- a/src/VBox/Devices/Graphics/shaderlib/libWineStub/include/wine/list.h
+++ b/src/VBox/Devices/Graphics/shaderlib/libWineStub/include/wine/list.h
@@ -241,6 +241,6 @@ static inline void list_move_head( struct list *dst, struct list *src )
 /* get pointer to object containing list element */
 #undef LIST_ENTRY
 #define LIST_ENTRY(elem, type, field) \
-    ((type *)((char *)(elem) - (unsigned long)(&((type *)0)->field)))
+    ((type *)((char *)(elem) - (uintptr_t)(&((type *)0)->field)))
 
 #endif  /* __WINE_SERVER_LIST_H */
diff --git a/src/VBox/Devices/Graphics/shaderlib/shader_sm1.c b/src/VBox/Devices/Graphics/shaderlib/shader_sm1.c
index b8cb550..576d042 100644
--- a/src/VBox/Devices/Graphics/shaderlib/shader_sm1.c
+++ b/src/VBox/Devices/Graphics/shaderlib/shader_sm1.c
@@ -423,7 +423,7 @@ static const struct wined3d_sm1_opcode_info *shader_get_opcode(const struct wine
 
     while (opcode_table[i].handler_idx != WINED3DSIH_TABLE_SIZE)
     {
-        if ((code & WINED3DSI_OPCODE_MASK) == opcode_table[i].opcode
+        if ((code & WINED3DSI_OPCODE_MASK) == (DWORD)opcode_table[i].opcode
                 && shader_version >= opcode_table[i].min_version
                 && (!opcode_table[i].max_version || shader_version <= opcode_table[i].max_version))
         {
diff --git a/src/VBox/Devices/Graphics/shaderlib/shaderapi.c b/src/VBox/Devices/Graphics/shaderlib/shaderapi.c
index 469684e..e975ed8 100644
--- a/src/VBox/Devices/Graphics/shaderlib/shaderapi.c
+++ b/src/VBox/Devices/Graphics/shaderlib/shaderapi.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -14,6 +14,7 @@
  * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
+
 #include <iprt/err.h>
 #include <iprt/mem.h>
 #include <iprt/assert.h>
@@ -143,9 +144,10 @@ SHADERDECL(int) ShaderInitLib(PVBOXVMSVGASHADERIF pVBoxShaderIf)
 
     /* Dynamically load all GL core functions. */
 #ifdef RT_OS_WINDOWS
-# define USE_GL_FUNC(pfn) pfn = (void*)GetProcAddress(GetModuleHandle("opengl32.dll"), #pfn);
+    HANDLE hOpenGl32 = GetModuleHandle("opengl32.dll");
+# define USE_GL_FUNC(pfn) *(FARPROC *)(&pfn) = GetProcAddress(hOpenGl32, #pfn);
 #else
-# define USE_GL_FUNC(pfn) pfn = (void*)OGLGETPROCADDRESS(#pfn);
+# define USE_GL_FUNC(pfn) pfn = (void *)OGLGETPROCADDRESS(#pfn);
 #endif
     GL_FUNCS_GEN;
 #undef USE_GL_FUNC
@@ -153,7 +155,7 @@ SHADERDECL(int) ShaderInitLib(PVBOXVMSVGASHADERIF pVBoxShaderIf)
     /* Dynamically load all GL extension functions. */
 #define USE_GL_FUNC(type, pfn, ext, replace) \
 { \
-    gl_info->pfn = (void*)OGLGETPROCADDRESS(#pfn); \
+    gl_info->pfn = (type)OGLGETPROCADDRESS(#pfn); \
 }
     GL_EXT_FUNCS_GEN;
 
@@ -203,6 +205,7 @@ struct wined3d_context *context_get_current(void)
 
 struct wined3d_context *context_acquire(IWineD3DDeviceImpl *This, IWineD3DSurface *target, enum ContextUsage usage)
 {
+    RT_NOREF(This, target, usage);
     return g_pCurrentContext;
 }
 
@@ -321,7 +324,7 @@ SHADERDECL(int) ShaderCreateVertexShader(void *pShaderContext, const uint32_t *p
         return VERR_NO_MEMORY;
     }
 
-    hr = vertexshader_init(object, This, pShaderData, NULL, NULL, NULL);
+    hr = vertexshader_init(object, This, (DWORD const *)pShaderData, NULL, NULL, NULL);
     if (FAILED(hr))
     {
         Log(("Failed to initialize vertex shader, hr %#x.\n", hr));
@@ -355,7 +358,7 @@ SHADERDECL(int) ShaderCreatePixelShader(void *pShaderContext, const uint32_t *pS
         return VERR_NO_MEMORY;
     }
 
-    hr = pixelshader_init(object, This, pShaderData, NULL, NULL, NULL);
+    hr = pixelshader_init(object, This, (DWORD const *)pShaderData, NULL, NULL, NULL);
     if (FAILED(hr))
     {
         Log(("Failed to initialize pixel shader, hr %#x.\n", hr));
diff --git a/src/VBox/Devices/Graphics/shaderlib/shaderlib.h b/src/VBox/Devices/Graphics/shaderlib/shaderlib.h
index 45f8d99..39f684d 100644
--- a/src/VBox/Devices/Graphics/shaderlib/shaderlib.h
+++ b/src/VBox/Devices/Graphics/shaderlib/shaderlib.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Graphics/shaderlib/utils.c b/src/VBox/Devices/Graphics/shaderlib/utils.c
index 20fa935..05fd6a0 100644
--- a/src/VBox/Devices/Graphics/shaderlib/utils.c
+++ b/src/VBox/Devices/Graphics/shaderlib/utils.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -18,7 +18,11 @@
 #include <iprt/err.h>
 #include <iprt/mem.h>
 #include <iprt/assert.h>
-#include <windows.h>
+#ifdef _MSC_VER
+# include <iprt/win/windows.h>
+#else
+# include <windows.h>
+#endif
 #include "wined3d_private.h"
 
 
@@ -79,6 +83,7 @@ UINT wined3d_log2i(UINT32 x)
  * and the user preferences in wined3d_settings. */
 void select_shader_mode(const struct wined3d_gl_info *gl_info, int *ps_selected, int *vs_selected)
 {
+    RT_NOREF(gl_info);
     *vs_selected = SHADER_GLSL;
     *ps_selected = SHADER_GLSL;
 }
@@ -102,10 +107,12 @@ const char *debug_glerror(GLenum error) {
 
 void dump_color_fixup_desc(struct color_fixup_desc fixup)
 {
+    RT_NOREF(fixup);
 }
 
 void context_release(struct wined3d_context *context)
 {
+    RT_NOREF(context);
 }
 
 static void CDECL wined3d_do_nothing(void)
@@ -117,21 +124,24 @@ void (* CDECL wine_tsx11_unlock_ptr)(void) = wined3d_do_nothing;
 
 LPVOID      WINAPI VBoxHeapAlloc(HANDLE hHeap, DWORD heaptype,SIZE_T size)
 {
+    RT_NOREF(hHeap, heaptype);
     return RTMemAllocZ(size);
 }
 
 BOOL        WINAPI VBoxHeapFree(HANDLE hHeap, DWORD heaptype,LPVOID ptr)
 {
+    RT_NOREF(hHeap, heaptype);
     RTMemFree(ptr);
     return TRUE;
 }
 
-LPVOID      WINAPI VBoxHeapReAlloc(HANDLE hHeap,DWORD heaptype,LPVOID ptr ,SIZE_T size)
+LPVOID      WINAPI VBoxHeapReAlloc(HANDLE hHeap, DWORD heaptype, LPVOID ptr, SIZE_T size)
 {
+    RT_NOREF(hHeap, heaptype);
     return RTMemRealloc(ptr, size);
 }
 
-void VBoxDebugBreak()
+void VBoxDebugBreak(void)
 {
     AssertFailed();
 }
diff --git a/src/VBox/Devices/Graphics/shaderlib/vboxext.h b/src/VBox/Devices/Graphics/shaderlib/vboxext.h
index 2a52b1b..52ebfd6 100644
--- a/src/VBox/Devices/Graphics/shaderlib/vboxext.h
+++ b/src/VBox/Devices/Graphics/shaderlib/vboxext.h
@@ -1,9 +1,11 @@
 /* $Id: vboxext.h $ */
 /** @file
- *
  * VBox extension to Wine D3D
+ */
+
+/*
  *
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -13,17 +15,22 @@
  * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
-#ifndef ___VBOXEXT_H__
-#define ___VBOXEXT_H__
+
+#ifndef ___VBOXEXT_H___
+#define ___VBOXEXT_H___
 
 #ifdef VBOX_WINE_WITHOUT_LIBWINE
-# include <windows.h>
+# ifdef _MSC_VER
+#  include <iprt/win/windows.h>
+# else
+#  include <windows.h>
+# endif
 #endif
 
 #include <iprt/list.h>
 
-HRESULT VBoxExtCheckInit();
-HRESULT VBoxExtCheckTerm();
+HRESULT VBoxExtCheckInit(void);
+HRESULT VBoxExtCheckTerm(void);
 #if defined(VBOX_WINE_WITH_SINGLE_CONTEXT) || defined(VBOX_WINE_WITH_SINGLE_SWAPCHAIN_CONTEXT)
 # ifndef VBOX_WITH_WDDM
 /* Windows destroys HDC created by a given thread when the thread is terminated
@@ -154,4 +161,5 @@ DECLINLINE(void) VBoxExtCacheTerm(PVBOXEXT_HASHCACHE pCache)
     VBoxExtCacheCleanup(pCache);
 }
 
-#endif /* #ifndef ___VBOXEXT_H__*/
+#endif
+
diff --git a/src/VBox/Devices/Graphics/shaderlib/wine/include/advpub.h b/src/VBox/Devices/Graphics/shaderlib/wine/include/advpub.h
index 4dd31b3..9c088a7 100644
--- a/src/VBox/Devices/Graphics/shaderlib/wine/include/advpub.h
+++ b/src/VBox/Devices/Graphics/shaderlib/wine/include/advpub.h
@@ -28,7 +28,7 @@
 #ifndef __WINE_ADVPUB_H
 #define __WINE_ADVPUB_H
 
-#include <setupapi.h>
+#include <iprt/win/setupapi.h>
 #include <cfgmgr32.h>
 
 #ifdef __cplusplus
diff --git a/src/VBox/Devices/Graphics/shaderlib/wine/vbox/VBoxDbgGl.c b/src/VBox/Devices/Graphics/shaderlib/wine/vbox/VBoxDbgGl.c
index 6bbec7c..a5c2c5f 100644
--- a/src/VBox/Devices/Graphics/shaderlib/wine/vbox/VBoxDbgGl.c
+++ b/src/VBox/Devices/Graphics/shaderlib/wine/vbox/VBoxDbgGl.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Graphics/shaderlib/wine/vbox/VBoxDbgGl.h b/src/VBox/Devices/Graphics/shaderlib/wine/vbox/VBoxDbgGl.h
index 27c949a..acc6978 100644
--- a/src/VBox/Devices/Graphics/shaderlib/wine/vbox/VBoxDbgGl.h
+++ b/src/VBox/Devices/Graphics/shaderlib/wine/vbox/VBoxDbgGl.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Graphics/shaderlib/wine/vbox/VBoxWineEx.h b/src/VBox/Devices/Graphics/shaderlib/wine/vbox/VBoxWineEx.h
index 038dd1d..105e38b 100644
--- a/src/VBox/Devices/Graphics/shaderlib/wine/vbox/VBoxWineEx.h
+++ b/src/VBox/Devices/Graphics/shaderlib/wine/vbox/VBoxWineEx.h
@@ -2,7 +2,7 @@
  *
  * VBox extension to Wine D3D
  *
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Graphics/shaderlib/wined3d_private.h b/src/VBox/Devices/Graphics/shaderlib/wined3d_private.h
index 948057c..dcf659e 100644
--- a/src/VBox/Devices/Graphics/shaderlib/wined3d_private.h
+++ b/src/VBox/Devices/Graphics/shaderlib/wined3d_private.h
@@ -46,7 +46,12 @@
 #include "wingdi.h"
 #include "winuser.h"
 #else
-#include <windows.h>
+# ifdef _MSC_VER
+#  include <iprt/win/windows.h>
+# else
+#  include <windows.h>
+#  undef cdecl /* see windef.h */
+# endif
 #endif
 #include "wine/debug.h"
 #include "wine/unicode.h"
@@ -79,7 +84,6 @@
 # define VBoxTlsRefGetImpl(_tls) (TlsGetValue((DWORD)(_tls)))
 # define VBoxTlsRefSetImpl(_tls, _val) (TlsSetValue((DWORD)(_tls), (_val)))
 # define VBoxTlsRefAssertImpl Assert
-# undef cdecl /* see windef.h */
 # include <VBox/VBoxVideo3D.h>
 #endif
 
@@ -1332,7 +1336,7 @@ void context_set_draw_buffer(struct wined3d_context *context, GLenum buffer) DEC
 void context_set_tls_idx(DWORD idx) DECLSPEC_HIDDEN;
 void context_surface_update(struct wined3d_context *context, IWineD3DSurfaceImpl *surface) DECLSPEC_HIDDEN;
 #if defined(VBOX_WINE_WITH_SINGLE_CONTEXT) || defined(VBOX_WINE_WITH_SINGLE_SWAPCHAIN_CONTEXT)
-void context_clear_on_thread_detach();
+void context_clear_on_thread_detach(void);
 #endif
 /* Macros for doing basic GPU detection based on opengl capabilities */
 #define WINE_D3D6_CAPABLE(gl_info) (gl_info->supported[ARB_MULTITEXTURE])
diff --git a/src/VBox/Devices/Graphics/shaderlib/winoverride.h b/src/VBox/Devices/Graphics/shaderlib/winoverride.h
index 01d39aa..cb68476 100644
--- a/src/VBox/Devices/Graphics/shaderlib/winoverride.h
+++ b/src/VBox/Devices/Graphics/shaderlib/winoverride.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Graphics/testcase/dump-vmwgfx.c b/src/VBox/Devices/Graphics/testcase/dump-vmwgfx.c
index 0d144af..840c0d8 100644
--- a/src/VBox/Devices/Graphics/testcase/dump-vmwgfx.c
+++ b/src/VBox/Devices/Graphics/testcase/dump-vmwgfx.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Input/DevPS2.cpp b/src/VBox/Devices/Input/DevPS2.cpp
index 27b803e..82fed87 100644
--- a/src/VBox/Devices/Input/DevPS2.cpp
+++ b/src/VBox/Devices/Input/DevPS2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -57,11 +57,7 @@
  * cause instant triple faults when booting Windows VMs. */
 #define TARGET_I386
 
-#ifndef VBOX_WITH_NEW_PS2M
-#define PCKBD_SAVED_STATE_VERSION 7
-#else
 #define PCKBD_SAVED_STATE_VERSION 8
-#endif
 
 #ifndef VBOX_DEVICE_STRUCT_TESTCASE
 
@@ -127,62 +123,6 @@ RT_C_DECLS_END
 #define KBD_MODE_KCC            0x40    /* Scan code conversion to PC format */
 #define KBD_MODE_RFU            0x80
 
-#ifndef VBOX_WITH_NEW_PS2M
-/* Mouse Commands */
-#define AUX_SET_SCALE11         0xE6    /* Set 1:1 scaling */
-#define AUX_SET_SCALE21         0xE7    /* Set 2:1 scaling */
-#define AUX_SET_RES             0xE8    /* Set resolution */
-#define AUX_GET_SCALE           0xE9    /* Get scaling factor */
-#define AUX_SET_STREAM          0xEA    /* Set stream mode */
-#define AUX_POLL                0xEB    /* Poll */
-#define AUX_RESET_WRAP          0xEC    /* Reset wrap mode */
-#define AUX_SET_WRAP            0xEE    /* Set wrap mode */
-#define AUX_SET_REMOTE          0xF0    /* Set remote mode */
-#define AUX_GET_TYPE            0xF2    /* Get type */
-#define AUX_SET_SAMPLE          0xF3    /* Set sample rate */
-#define AUX_ENABLE_DEV          0xF4    /* Enable aux device */
-#define AUX_DISABLE_DEV         0xF5    /* Disable aux device */
-#define AUX_SET_DEFAULT         0xF6
-#define AUX_RESET               0xFF    /* Reset aux device */
-#define AUX_ACK                 0xFA    /* Command byte ACK. */
-#define AUX_NACK                0xFE    /* Command byte NACK. */
-
-#define MOUSE_STATUS_REMOTE     0x40
-#define MOUSE_STATUS_ENABLED    0x20
-#define MOUSE_STATUS_SCALE21    0x10
-
-/** Supported mouse protocols */
-enum
-{
-    MOUSE_PROT_PS2 = 0,
-    MOUSE_PROT_IMPS2 = 3,
-    MOUSE_PROT_IMEX = 4
-};
-
-/** @name Mouse flags */
-/** @{ */
-/** IMEX horizontal scroll-wheel mode is active */
-# define MOUSE_REPORT_HORIZONTAL  0x01
-/** @} */
-
-#define MOUSE_CMD_QUEUE_SIZE 8
-
-typedef struct {
-    uint8_t data[MOUSE_CMD_QUEUE_SIZE];
-    int rptr, wptr, count;
-} MouseCmdQueue;
-
-
-#define MOUSE_EVENT_QUEUE_SIZE 256
-
-typedef struct
-{
-    uint8_t data[MOUSE_EVENT_QUEUE_SIZE];
-    int     rptr;
-    int     wptr;
-    int     count;
-} MouseEventQueue;
-#endif
 
 /**
  * The keyboard controller/device state.
@@ -191,10 +131,6 @@ typedef struct
  */
 typedef struct KBDState
 {
-#ifndef VBOX_WITH_NEW_PS2M
-    MouseCmdQueue mouse_command_queue;
-    MouseEventQueue mouse_event_queue;
-#endif
     uint8_t write_cmd; /* if non zero, write data to port 60 is expected */
     uint8_t status;
     uint8_t mode;
@@ -202,25 +138,6 @@ typedef struct KBDState
     /* keyboard state */
     int32_t translate;
     int32_t xlat_state;
-#ifndef VBOX_WITH_NEW_PS2M
-    /* mouse state */
-    int32_t mouse_write_cmd;
-    uint8_t mouse_status;
-    uint8_t mouse_resolution;
-    uint8_t mouse_sample_rate;
-    uint8_t mouse_wrap;
-    uint8_t mouse_type; /* MOUSE_PROT_PS2, *_IMPS/2, *_IMEX */
-    uint8_t mouse_detect_state;
-    int32_t mouse_dx; /* current values, needed for 'poll' mode */
-    int32_t mouse_dy;
-    int32_t mouse_dz;
-    int32_t mouse_dw;
-    int32_t mouse_flags;
-    uint8_t mouse_buttons;
-    uint8_t mouse_buttons_reported;
-
-    uint32_t    Alignment0;
-#endif
 
     /** Pointer to the device instance - RC. */
     PPDMDEVINSRC                pDevInsRC;
@@ -236,33 +153,12 @@ typedef struct KBDState
     PS2K                        Kbd;
 #endif
 
-#ifdef VBOX_WITH_NEW_PS2M
     /** Mouse state (implemented in separate PS2M module). */
 #ifdef VBOX_DEVICE_STRUCT_TESTCASE
     uint8_t                     AuxFiller[PS2M_STRUCT_FILLER];
 #else
     PS2M                        Aux;
 #endif
-#else
-    /**
-     * Mouse port - LUN#1.
-     *
-     * @implements  PDMIBASE
-     * @implements  PDMIMOUSEPORT
-     */
-    struct
-    {
-        /** The base interface for the mouse port. */
-        PDMIBASE                            IBase;
-        /** The mouse port base interface. */
-        PDMIMOUSEPORT                       IPort;
-
-        /** The base interface of the attached mouse driver. */
-        R3PTRTYPE(PPDMIBASE)                pDrvBase;
-        /** The mouse interface of the attached mouse driver. */
-        R3PTRTYPE(PPDMIMOUSECONNECTOR)      pDrv;
-    } Mouse;
-#endif
 } KBDState;
 
 #ifndef VBOX_DEVICE_STRUCT_TESTCASE
@@ -270,10 +166,6 @@ typedef struct KBDState
 /* update irq and KBD_STAT_[MOUSE_]OBF */
 static void kbd_update_irq(KBDState *s)
 {
-#ifndef VBOX_WITH_NEW_PS2M
-    MouseCmdQueue *mcq = &s->mouse_command_queue;
-    MouseEventQueue *meq = &s->mouse_event_queue;
-#endif
     int irq12_level, irq1_level;
     uint8_t val;
 
@@ -317,32 +209,11 @@ static void kbd_update_irq(KBDState *s)
                 s->status |= KBD_STAT_OBF;
             }
         }
-#ifdef VBOX_WITH_NEW_PS2M
         else if (!(s->mode & KBD_MODE_DISABLE_MOUSE) && PS2MByteFromAux(&s->Aux, &val) == VINF_SUCCESS)
         {
             s->dbbout = val;
             s->status |= KBD_STAT_OBF | KBD_STAT_MOUSE_OBF;
         }
-#else
-        else if ((mcq->count || meq->count) && !(s->mode & KBD_MODE_DISABLE_MOUSE))
-        {
-            s->status |= KBD_STAT_OBF | KBD_STAT_MOUSE_OBF;
-            if (mcq->count)
-            {
-                s->dbbout = mcq->data[mcq->rptr];
-                if (++mcq->rptr == MOUSE_CMD_QUEUE_SIZE)
-                    mcq->rptr = 0;
-                mcq->count--;
-            }
-            else
-            {
-                s->dbbout = meq->data[meq->rptr];
-                if (++meq->rptr == MOUSE_EVENT_QUEUE_SIZE)
-                    meq->rptr = 0;
-                meq->count--;
-            }
-        }
-#endif
     }
     /* Determine new IRQ state. */
     if (s->status & KBD_STAT_OBF) {
@@ -367,50 +238,6 @@ void KBCUpdateInterrupts(void *pKbc)
     kbd_update_irq(s);
 }
 
-#ifndef VBOX_WITH_NEW_PS2M
-static void kbd_queue(KBDState *s, int b, int aux)
-{
-    MouseCmdQueue *mcq = &s->mouse_command_queue;
-    MouseEventQueue *meq = &s->mouse_event_queue;
-
-#if defined(DEBUG_MOUSE) || defined(DEBUG_KBD)
-    if (aux == 1)
-        LogRel3(("%s: mouse command response: 0x%02x\n", __PRETTY_FUNCTION__, b));
-    else if (aux == 2)
-        LogRel3(("%s: mouse event data: 0x%02x\n", __PRETTY_FUNCTION__, b));
-#ifdef DEBUG_KBD
-    else
-        LogRel3(("%s: kbd event: 0x%02x\n", __PRETTY_FUNCTION__, b));
-#endif
-#endif
-    switch (aux)
-    {
-        case 0: /* keyboard */
-            AssertMsgFailed(("kbd_queue() no longer supported for keyboard!\n"));
-            break;
-        case 1: /* mouse command response */
-            if (mcq->count >= MOUSE_CMD_QUEUE_SIZE)
-                return;
-            mcq->data[mcq->wptr] = b;
-            if (++mcq->wptr == MOUSE_CMD_QUEUE_SIZE)
-                mcq->wptr = 0;
-            mcq->count++;
-            break;
-        case 2: /* mouse event data */
-            if (meq->count >= MOUSE_EVENT_QUEUE_SIZE)
-                return;
-            meq->data[meq->wptr] = b;
-            if (++meq->wptr == MOUSE_EVENT_QUEUE_SIZE)
-                meq->wptr = 0;
-            meq->count++;
-            break;
-        default:
-            AssertMsgFailed(("aux=%d\n", aux));
-    }
-    kbd_update_irq(s);
-}
-#endif
-
 static void kbc_dbb_out(void *opaque, uint8_t val)
 {
     KBDState *s = (KBDState*)opaque;
@@ -606,372 +433,8 @@ PS2K *KBDGetPS2KFromDevIns(PPDMDEVINS pDevIns)
 PS2M *KBDGetPS2MFromDevIns(PPDMDEVINS pDevIns)
 {
     KBDState *pThis = PDMINS_2_DATA(pDevIns, KBDState *);
-#ifdef VBOX_WITH_NEW_PS2M
     return &pThis->Aux;
-#else
-    return NULL;
-#endif
-}
-
-#ifndef VBOX_WITH_NEW_PS2M
-static void kbd_mouse_set_reported_buttons(KBDState *s, unsigned fButtons, unsigned fButtonMask)
-{
-    s->mouse_buttons_reported |= (fButtons & fButtonMask);
-    s->mouse_buttons_reported &= (fButtons | ~fButtonMask);
-}
-
-/**
- * Send a single relative packet in 3-byte PS/2 format to the PS/2 controller.
- * @param  s               keyboard state object
- * @param  dx              relative X value, must be between -256 and +255
- * @param  dy              relative y value, must be between -256 and +255
- * @param  fButtonsLow     the state of the two first mouse buttons
- * @param  fButtonsPacked  the state of the upper three mouse buttons and
- *                         scroll wheel movement, packed as per the
- *                         MOUSE_EXT_* defines.  For standard PS/2 packets
- *                         only pass the value of button 3 here.
- */
-static void kbd_mouse_send_rel3_packet(KBDState *s, bool fToCmdQueue)
-{
-    int aux = fToCmdQueue ? 1 : 2;
-    int dx1 = s->mouse_dx < 0 ? RT_MAX(s->mouse_dx, -256)
-                              : RT_MIN(s->mouse_dx, 255);
-    int dy1 = s->mouse_dy < 0 ? RT_MAX(s->mouse_dy, -256)
-                              : RT_MIN(s->mouse_dy, 255);
-    unsigned int b;
-    unsigned fButtonsLow = s->mouse_buttons & 0x07;
-    s->mouse_dx -= dx1;
-    s->mouse_dy -= dy1;
-    kbd_mouse_set_reported_buttons(s, fButtonsLow, 0x07);
-    LogRel3(("%s: dx1=%d, dy1=%d, fButtonsLow=0x%x\n",
-             __PRETTY_FUNCTION__, dx1, dy1, fButtonsLow));
-    b = 0x08 | ((dx1 < 0 ? 1 : 0) << 4) | ((dy1 < 0 ? 1 : 0) << 5)
-             | fButtonsLow;
-    kbd_queue(s, b, aux);
-    kbd_queue(s, dx1 & 0xff, aux);
-    kbd_queue(s, dy1 & 0xff, aux);
-}
-
-static void kbd_mouse_send_imps2_byte4(KBDState *s, bool fToCmdQueue)
-{
-    int aux = fToCmdQueue ? 1 : 2;
-
-    int dz1 = s->mouse_dz < 0 ? RT_MAX(s->mouse_dz, -127)
-                              : RT_MIN(s->mouse_dz, 127);
-    LogRel3(("%s: dz1=%d\n", __PRETTY_FUNCTION__, dz1));
-    s->mouse_dz -= dz1;
-    kbd_queue(s, dz1 & 0xff, aux);
-}
-
-static void kbd_mouse_send_imex_byte4(KBDState *s, bool fToCmdQueue)
-{
-    int aux = fToCmdQueue ? 1 : 2;
-    int dz1 = 0, dw1 = 0;
-    unsigned fButtonsHigh = s->mouse_buttons & 0x18;
-
-    if (s->mouse_dw > 0)
-        dw1 = 1;
-    else if (s->mouse_dw < 0)
-        dw1 = -1;
-    else if (s->mouse_dz > 0)
-        dz1 = 1;
-    else if (s->mouse_dz < 0)
-        dz1 = -1;
-    if (s->mouse_dw && s->mouse_flags & MOUSE_REPORT_HORIZONTAL)
-    {
-        LogRel3(("%s: dw1=%d\n", __PRETTY_FUNCTION__, dw1));
-        kbd_queue(s, 0x40 | (dw1 & 0x3f), aux);
-    }
-    else
-    {
-        LogRel3(("%s: dz1=%d, dw1=%d, fButtonsHigh=0x%x\n",
-                 __PRETTY_FUNCTION__, dz1, dw1, fButtonsHigh));
-        unsigned u4Low =   dw1 > 0 ? 9 /* -7 & 0xf */
-                         : dw1 < 0 ? 7
-                         : dz1 > 0 ? 1
-                         : dz1 < 0 ? 0xf /* -1 & 0xf */
-                         : 0;
-        kbd_mouse_set_reported_buttons(s, fButtonsHigh, 0x18);
-        kbd_queue(s, (fButtonsHigh << 1) | u4Low, aux);
-    }
-    s->mouse_dz -= dz1;
-    s->mouse_dw -= dw1;
-}
-
-/**
- * Send a single relative packet in (IM)PS/2 or IMEX format to the PS/2
- * controller.
- * @param  s            keyboard state object
- * @param  fToCmdQueue  should this packet go to the command queue (or the
- *                      event queue)?
- */
-static void kbd_mouse_send_packet(KBDState *s, bool fToCmdQueue)
-{
-    kbd_mouse_send_rel3_packet(s, fToCmdQueue);
-    if (s->mouse_type == MOUSE_PROT_IMPS2)
-        kbd_mouse_send_imps2_byte4(s, fToCmdQueue);
-    if (s->mouse_type == MOUSE_PROT_IMEX)
-        kbd_mouse_send_imex_byte4(s, fToCmdQueue);
-}
-
-#ifdef IN_RING3
-
-static bool kbd_mouse_unreported(KBDState *s)
-{
-    return s->mouse_dx
-        || s->mouse_dy
-        || s->mouse_dz
-        || s->mouse_dw
-        || s->mouse_buttons != s->mouse_buttons_reported;
-}
-
-static size_t kbd_mouse_event_queue_free(KBDState *s)
-{
-    AssertReturn(s->mouse_event_queue.count <= MOUSE_EVENT_QUEUE_SIZE, 0);
-    return MOUSE_EVENT_QUEUE_SIZE - s->mouse_event_queue.count;
-}
-
-static void pc_kbd_mouse_event(void *opaque, int dx, int dy, int dz, int dw,
-                               int buttons_state)
-{
-    LogRel3(("%s: dx=%d, dy=%d, dz=%d, dw=%d, buttons_state=0x%x\n",
-             __PRETTY_FUNCTION__, dx, dy, dz, dw, buttons_state));
-    KBDState *s = (KBDState*)opaque;
-
-    /* check if deltas are recorded when disabled */
-    if (!(s->mouse_status & MOUSE_STATUS_ENABLED))
-        return;
-    AssertReturnVoid((buttons_state & ~0x1f) == 0);
-
-    s->mouse_dx += dx;
-    s->mouse_dy -= dy;
-    if (   (s->mouse_type == MOUSE_PROT_IMPS2)
-        || (s->mouse_type == MOUSE_PROT_IMEX))
-        s->mouse_dz += dz;
-    if (s->mouse_type == MOUSE_PROT_IMEX)
-        s->mouse_dw += dw;
-    s->mouse_buttons = buttons_state;
-    if (!(s->mouse_status & MOUSE_STATUS_REMOTE))
-        /* if not remote, send event. Multiple events are sent if
-           too big deltas */
-        while (   kbd_mouse_unreported(s)
-               && kbd_mouse_event_queue_free(s) > 4)
-            kbd_mouse_send_packet(s, false);
-}
-
-/* Report a change in status down the driver chain */
-static void kbd_mouse_update_downstream_status(KBDState *pThis)
-{
-    PPDMIMOUSECONNECTOR pDrv = pThis->Mouse.pDrv;
-    bool fEnabled = !!(pThis->mouse_status & MOUSE_STATUS_ENABLED);
-    if (pDrv)
-        pDrv->pfnReportModes(pDrv, fEnabled, false, false);
-}
-
-#endif /* IN_RING3 */
-
-static int kbd_write_mouse(KBDState *s, int val)
-{
-#ifdef DEBUG_MOUSE
-    LogRelFlowFunc(("kbd: write mouse 0x%02x\n", val));
-#endif
-    int rc = VINF_SUCCESS;
-    /* Flush the mouse command response queue. */
-    s->mouse_command_queue.count = 0;
-    s->mouse_command_queue.rptr = 0;
-    s->mouse_command_queue.wptr = 0;
-    switch(s->mouse_write_cmd) {
-    default:
-    case -1:
-        /* mouse command */
-        if (s->mouse_wrap) {
-            if (val == AUX_RESET_WRAP) {
-                s->mouse_wrap = 0;
-                kbd_queue(s, AUX_ACK, 1);
-                return VINF_SUCCESS;
-            } else if (val != AUX_RESET) {
-                kbd_queue(s, val, 1);
-                return VINF_SUCCESS;
-            }
-        }
-        switch(val) {
-        case AUX_SET_SCALE11:
-            s->mouse_status &= ~MOUSE_STATUS_SCALE21;
-            kbd_queue(s, AUX_ACK, 1);
-            break;
-        case AUX_SET_SCALE21:
-            s->mouse_status |= MOUSE_STATUS_SCALE21;
-            kbd_queue(s, AUX_ACK, 1);
-            break;
-        case AUX_SET_STREAM:
-            s->mouse_status &= ~MOUSE_STATUS_REMOTE;
-            kbd_queue(s, AUX_ACK, 1);
-            break;
-        case AUX_SET_WRAP:
-            s->mouse_wrap = 1;
-            kbd_queue(s, AUX_ACK, 1);
-            break;
-        case AUX_SET_REMOTE:
-            s->mouse_status |= MOUSE_STATUS_REMOTE;
-            kbd_queue(s, AUX_ACK, 1);
-            break;
-        case AUX_GET_TYPE:
-            kbd_queue(s, AUX_ACK, 1);
-            kbd_queue(s, s->mouse_type, 1);
-            break;
-        case AUX_SET_RES:
-        case AUX_SET_SAMPLE:
-            s->mouse_write_cmd = val;
-            kbd_queue(s, AUX_ACK, 1);
-            break;
-        case AUX_GET_SCALE:
-            kbd_queue(s, AUX_ACK, 1);
-            kbd_queue(s, s->mouse_status, 1);
-            kbd_queue(s, s->mouse_resolution, 1);
-            kbd_queue(s, s->mouse_sample_rate, 1);
-            break;
-        case AUX_POLL:
-            kbd_queue(s, AUX_ACK, 1);
-            kbd_mouse_send_packet(s, true);
-            break;
-        case AUX_ENABLE_DEV:
-#ifdef IN_RING3
-            LogRelFlowFunc(("Enabling mouse device\n"));
-            s->mouse_status |= MOUSE_STATUS_ENABLED;
-            kbd_queue(s, AUX_ACK, 1);
-            kbd_mouse_update_downstream_status(s);
-#else
-            LogRelFlowFunc(("Enabling mouse device, R0 stub\n"));
-            rc = VINF_IOM_R3_IOPORT_WRITE;
-#endif
-            break;
-        case AUX_DISABLE_DEV:
-#ifdef IN_RING3
-            s->mouse_status &= ~MOUSE_STATUS_ENABLED;
-            kbd_queue(s, AUX_ACK, 1);
-            /* Flush the mouse events queue. */
-            s->mouse_event_queue.count = 0;
-            s->mouse_event_queue.rptr = 0;
-            s->mouse_event_queue.wptr = 0;
-            kbd_mouse_update_downstream_status(s);
-#else
-            rc = VINF_IOM_R3_IOPORT_WRITE;
-#endif
-            break;
-        case AUX_SET_DEFAULT:
-#ifdef IN_RING3
-            s->mouse_sample_rate = 100;
-            s->mouse_resolution = 2;
-            s->mouse_status = 0;
-            kbd_queue(s, AUX_ACK, 1);
-            kbd_mouse_update_downstream_status(s);
-#else
-            rc = VINF_IOM_R3_IOPORT_WRITE;
-#endif
-            break;
-        case AUX_RESET:
-#ifdef IN_RING3
-            s->mouse_sample_rate = 100;
-            s->mouse_resolution = 2;
-            s->mouse_status = 0;
-            s->mouse_type = MOUSE_PROT_PS2;
-            kbd_queue(s, AUX_ACK, 1);
-            kbd_queue(s, 0xaa, 1);
-            kbd_queue(s, s->mouse_type, 1);
-            /* Flush the mouse events queue. */
-            s->mouse_event_queue.count = 0;
-            s->mouse_event_queue.rptr = 0;
-            s->mouse_event_queue.wptr = 0;
-            kbd_mouse_update_downstream_status(s);
-#else
-            rc = VINF_IOM_R3_IOPORT_WRITE;
-#endif
-            break;
-        default:
-            /* NACK all commands we don't know.
-
-               The usecase for this is the OS/2 mouse driver which will try
-               read 0xE2 in order to figure out if it's a trackpoint device
-               or not. If it doesn't get a NACK (or ACK) on the command it'll
-               do several hundred thousand status reads before giving up. This
-               is slows down the OS/2 boot up considerably. (It also seems that
-               the code is somehow vulnerable while polling like this and that
-               mouse or keyboard input at this point might screw things up badly.)
-
-               From http://www.win.tue.nl/~aeb/linux/kbd/scancodes-13.html:
-
-               Every command or data byte sent to the mouse (except for the
-               resend command fe) is ACKed with fa. If the command or data
-               is invalid, it is NACKed with fe. If the next byte is again
-               invalid, the reply is ERROR: fc. */
-            /** @todo send error if we NACKed the previous command? */
-            kbd_queue(s, AUX_NACK, 1);
-            break;
-        }
-        break;
-    case AUX_SET_SAMPLE:
-        s->mouse_sample_rate = val;
-        /* detect IMPS/2 or IMEX */
-        /* And enable horizontal scrolling reporting when requested */
-        switch(s->mouse_detect_state) {
-        default:
-        case 0:
-            if (val == 200)
-                s->mouse_detect_state = 1;
-            break;
-        case 1:
-            if (val == 100)
-                s->mouse_detect_state = 2;
-            else if (val == 200)
-                s->mouse_detect_state = 3;
-            else if ((val == 80) && s->mouse_type == MOUSE_PROT_IMEX)
-                /* enable horizontal scrolling, byte two */
-                s->mouse_detect_state = 4;
-            else
-                s->mouse_detect_state = 0;
-            break;
-        case 2:
-            if (val == 80 && s->mouse_type < MOUSE_PROT_IMEX)
-            {
-                LogRelFlowFunc(("switching mouse device to IMPS/2 mode\n"));
-                s->mouse_type = MOUSE_PROT_IMPS2;
-            }
-            s->mouse_detect_state = 0;
-            break;
-        case 3:
-            if (val == 80)
-            {
-                LogRelFlowFunc(("switching mouse device to IMEX mode\n"));
-                s->mouse_type = MOUSE_PROT_IMEX;
-            }
-            s->mouse_detect_state = 0;
-            break;
-        case 4:
-            if (val == 40)
-            {
-                LogRelFlowFunc(("enabling IMEX horizontal scrolling reporting\n"));
-                s->mouse_flags |= MOUSE_REPORT_HORIZONTAL;
-            }
-            s->mouse_detect_state = 0;
-            break;
-        }
-        kbd_queue(s, AUX_ACK, 1);
-        s->mouse_write_cmd = -1;
-        break;
-    case AUX_SET_RES:
-        if (0 <= val && val < 4)
-        {
-            s->mouse_resolution = val;
-            kbd_queue(s, AUX_ACK, 1);
-        }
-        else
-            kbd_queue(s, AUX_NACK, 1);
-        s->mouse_write_cmd = -1;
-        break;
-    }
-    return rc;
 }
-#endif
 
 static int kbd_write_data(void *opaque, uint32_t addr, uint32_t val)
 {
@@ -1022,13 +485,9 @@ static int kbd_write_data(void *opaque, uint32_t addr, uint32_t val)
     case KBD_CCMD_WRITE_MOUSE:
         /* Automatically enables aux interface. */
         s->mode &= ~KBD_MODE_DISABLE_MOUSE;
-#ifdef VBOX_WITH_NEW_PS2M
         rc = PS2MByteToAux(&s->Aux, val);
         if (rc == VINF_SUCCESS)
             kbd_update_irq(s);
-#else
-        rc = kbd_write_mouse(s, val);
-#endif
         break;
     default:
         break;
@@ -1043,88 +502,22 @@ static int kbd_write_data(void *opaque, uint32_t addr, uint32_t val)
 static void kbd_reset(void *opaque)
 {
     KBDState *s = (KBDState*)opaque;
-#ifndef VBOX_WITH_NEW_PS2M
-    MouseCmdQueue *mcq;
-    MouseEventQueue *meq;
-
-    s->mouse_write_cmd = -1;
-#endif
     s->mode = KBD_MODE_KBD_INT | KBD_MODE_MOUSE_INT;
     s->status = KBD_STAT_CMD | KBD_STAT_UNLOCKED;
     /* Resetting everything, keyword was not working right on NT4 reboot. */
     s->write_cmd = 0;
     s->translate = 0;
-#ifndef VBOX_WITH_NEW_PS2M
-    if (s->mouse_status)
-    {
-        s->mouse_status = 0;
-        kbd_mouse_update_downstream_status(s);
-    }
-    s->mouse_resolution = 0;
-    s->mouse_sample_rate = 0;
-    s->mouse_wrap = 0;
-    s->mouse_type = MOUSE_PROT_PS2;
-    s->mouse_detect_state = 0;
-    s->mouse_dx = 0;
-    s->mouse_dy = 0;
-    s->mouse_dz = 0;
-    s->mouse_dw = 0;
-    s->mouse_flags = 0;
-    s->mouse_buttons = 0;
-    s->mouse_buttons_reported = 0;
-    mcq = &s->mouse_command_queue;
-    mcq->rptr = 0;
-    mcq->wptr = 0;
-    mcq->count = 0;
-    meq = &s->mouse_event_queue;
-    meq->rptr = 0;
-    meq->wptr = 0;
-    meq->count = 0;
-#endif
 }
 
 static void kbd_save(PSSMHANDLE pSSM, KBDState *s)
 {
-#ifndef VBOX_WITH_NEW_PS2M
-    uint32_t    cItems;
-    int i;
-#endif
-
     SSMR3PutU8(pSSM, s->write_cmd);
     SSMR3PutU8(pSSM, s->status);
     SSMR3PutU8(pSSM, s->mode);
     SSMR3PutU8(pSSM, s->dbbout);
-#ifndef VBOX_WITH_NEW_PS2M
-    SSMR3PutU32(pSSM, s->mouse_write_cmd);
-    SSMR3PutU8(pSSM, s->mouse_status);
-    SSMR3PutU8(pSSM, s->mouse_resolution);
-    SSMR3PutU8(pSSM, s->mouse_sample_rate);
-    SSMR3PutU8(pSSM, s->mouse_wrap);
-    SSMR3PutU8(pSSM, s->mouse_type);
-    SSMR3PutU8(pSSM, s->mouse_detect_state);
-    SSMR3PutU32(pSSM, s->mouse_dx);
-    SSMR3PutU32(pSSM, s->mouse_dy);
-    SSMR3PutU32(pSSM, s->mouse_dz);
-    SSMR3PutU32(pSSM, s->mouse_dw);
-    SSMR3PutU32(pSSM, s->mouse_flags);
-    SSMR3PutU8(pSSM, s->mouse_buttons);
-    SSMR3PutU8(pSSM, s->mouse_buttons_reported);
-
-    cItems = s->mouse_command_queue.count;
-    SSMR3PutU32(pSSM, cItems);
-    for (i = s->mouse_command_queue.rptr; cItems-- > 0; i = (i + 1) % RT_ELEMENTS(s->mouse_command_queue.data))
-        SSMR3PutU8(pSSM, s->mouse_command_queue.data[i]);
-    Log(("kbd_save: %d mouse command queue items stored\n", s->mouse_command_queue.count));
-
-    cItems = s->mouse_event_queue.count;
-    SSMR3PutU32(pSSM, cItems);
-    for (i = s->mouse_event_queue.rptr; cItems-- > 0; i = (i + 1) % RT_ELEMENTS(s->mouse_event_queue.data))
-        SSMR3PutU8(pSSM, s->mouse_event_queue.data[i]);
-    Log(("kbd_save: %d mouse event queue items stored\n", s->mouse_event_queue.count));
-#endif
 
     /* terminator */
-    SSMR3PutU32(pSSM, ~0);
+    SSMR3PutU32(pSSM, UINT32_MAX);
 }
 
 static int kbd_load(PSSMHANDLE pSSM, KBDState *s, uint32_t version_id)
@@ -1154,39 +547,6 @@ static int kbd_load(PSSMHANDLE pSSM, KBDState *s, uint32_t version_id)
     {
         SSMR3GetU8(pSSM, &s->dbbout);
     }
-#ifndef VBOX_WITH_NEW_PS2M
-    SSMR3GetU32(pSSM, (uint32_t *)&s->mouse_write_cmd);
-    SSMR3GetU8(pSSM, &s->mouse_status);
-    SSMR3GetU8(pSSM, &s->mouse_resolution);
-    SSMR3GetU8(pSSM, &s->mouse_sample_rate);
-    SSMR3GetU8(pSSM, &s->mouse_wrap);
-    SSMR3GetU8(pSSM, &s->mouse_type);
-    SSMR3GetU8(pSSM, &s->mouse_detect_state);
-    SSMR3GetU32(pSSM, (uint32_t *)&s->mouse_dx);
-    SSMR3GetU32(pSSM, (uint32_t *)&s->mouse_dy);
-    SSMR3GetU32(pSSM, (uint32_t *)&s->mouse_dz);
-    if (version_id > 2)
-    {
-        SSMR3GetS32(pSSM, &s->mouse_dw);
-        SSMR3GetS32(pSSM, &s->mouse_flags);
-    }
-    SSMR3GetU8(pSSM, &s->mouse_buttons);
-    if (version_id == 4)
-    {
-        SSMR3GetU32(pSSM, &u32Dummy);
-        SSMR3GetU32(pSSM, &u32Dummy);
-    }
-    if (version_id > 3)
-        SSMR3GetU8(pSSM, &s->mouse_buttons_reported);
-    if (version_id == 4)
-        SSMR3GetU8(pSSM, &u8Dummy);
-    s->mouse_command_queue.count = 0;
-    s->mouse_command_queue.rptr = 0;
-    s->mouse_command_queue.wptr = 0;
-    s->mouse_event_queue.count = 0;
-    s->mouse_event_queue.rptr = 0;
-    s->mouse_event_queue.wptr = 0;
-#else
     if (version_id <= 7)
     {
         int32_t     i32Dummy;
@@ -1223,7 +583,6 @@ static int kbd_load(PSSMHANDLE pSSM, KBDState *s, uint32_t version_id)
 
         PS2MFixupState(&s->Aux, u8State, u8Rate, u8Proto);
     }
-#endif
 
     /* Determine the translation state. */
     s->translate = (s->mode & KBD_MODE_KCC) == KBD_MODE_KCC;
@@ -1245,43 +604,6 @@ static int kbd_load(PSSMHANDLE pSSM, KBDState *s, uint32_t version_id)
         Log(("kbd_load: %d keyboard queue items discarded from old saved state\n", u32));
     }
 
-#ifndef VBOX_WITH_NEW_PS2M
-    rc = SSMR3GetU32(pSSM, &u32);
-    if (RT_FAILURE(rc))
-        return rc;
-    if (u32 > RT_ELEMENTS(s->mouse_command_queue.data))
-    {
-        AssertMsgFailed(("u32=%#x\n", u32));
-        return VERR_SSM_DATA_UNIT_FORMAT_CHANGED;
-    }
-    for (i = 0; i < u32; i++)
-    {
-        rc = SSMR3GetU8(pSSM, &s->mouse_command_queue.data[i]);
-        if (RT_FAILURE(rc))
-            return rc;
-    }
-    s->mouse_command_queue.wptr = u32 % RT_ELEMENTS(s->mouse_command_queue.data);
-    s->mouse_command_queue.count = u32;
-    Log(("kbd_load: %d mouse command queue items loaded\n", u32));
-
-    rc = SSMR3GetU32(pSSM, &u32);
-    if (RT_FAILURE(rc))
-        return rc;
-    if (u32 > RT_ELEMENTS(s->mouse_event_queue.data))
-    {
-        AssertMsgFailed(("u32=%#x\n", u32));
-        return VERR_SSM_DATA_UNIT_FORMAT_CHANGED;
-    }
-    for (i = 0; i < u32; i++)
-    {
-        rc = SSMR3GetU8(pSSM, &s->mouse_event_queue.data[i]);
-        if (RT_FAILURE(rc))
-            return rc;
-    }
-    s->mouse_event_queue.wptr = u32 % RT_ELEMENTS(s->mouse_event_queue.data);
-    s->mouse_event_queue.count = u32;
-    Log(("kbd_load: %d mouse event queue items loaded\n", u32));
-#else
     if (version_id <= 7)
     {
         rc = SSMR3GetU32(pSSM, &u32);
@@ -1306,7 +628,6 @@ static int kbd_load(PSSMHANDLE pSSM, KBDState *s, uint32_t version_id)
         }
         Log(("kbd_load: %d mouse command queue items discarded from old saved state\n", u32));
     }
-#endif
 
     /* terminator */
     rc = SSMR3GetU32(pSSM, &u32);
@@ -1317,10 +638,6 @@ static int kbd_load(PSSMHANDLE pSSM, KBDState *s, uint32_t version_id)
         AssertMsgFailed(("u32=%#x\n", u32));
         return VERR_SSM_DATA_UNIT_FORMAT_CHANGED;
     }
-#ifndef VBOX_WITH_NEW_PS2M
-    /* Resend a notification to Main if the device is active */
-    kbd_mouse_update_downstream_status(s);
-#endif
     return 0;
 }
 #endif /* IN_RING3 */
@@ -1451,9 +768,7 @@ static DECLCALLBACK(int) kbdSaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
     KBDState    *pThis = PDMINS_2_DATA(pDevIns, KBDState *);
     kbd_save(pSSM, pThis);
     PS2KSaveState(&pThis->Kbd, pSSM);
-#ifdef VBOX_WITH_NEW_PS2M
     PS2MSaveState(&pThis->Aux, pSSM);
-#endif
     return VINF_SUCCESS;
 }
 
@@ -1476,10 +791,8 @@ static DECLCALLBACK(int) kbdLoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32
     rc = kbd_load(pSSM, pThis, uVersion);
     if (uVersion >= 6)
         rc = PS2KLoadState(&pThis->Kbd, pSSM, uVersion);
-#ifdef VBOX_WITH_NEW_PS2M
     if (uVersion >= 8)
         rc = PS2MLoadState(&pThis->Aux, pSSM, uVersion);
-#endif
     return rc;
 }
 
@@ -1507,70 +820,10 @@ static DECLCALLBACK(void)  kbdReset(PPDMDEVINS pDevIns)
 
     kbd_reset(pThis);
     PS2KReset(&pThis->Kbd);
-#ifdef VBOX_WITH_NEW_PS2M
     PS2MReset(&pThis->Aux);
-#endif
 }
 
 
-#ifndef VBOX_WITH_NEW_PS2M
-/* -=-=-=-=-=- Mouse: IBase  -=-=-=-=-=- */
-
-/**
- * @interface_method_impl{PDMIBASE,pfnQueryInterface}
- */
-static DECLCALLBACK(void *)  kbdMouseQueryInterface(PPDMIBASE pInterface, const char *pszIID)
-{
-    KBDState *pThis = RT_FROM_MEMBER(pInterface, KBDState, Mouse.IBase);
-    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->Mouse.IBase);
-    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIMOUSEPORT, &pThis->Mouse.IPort);
-    return NULL;
-}
-
-
-/* -=-=-=-=-=- Mouse: IMousePort  -=-=-=-=-=- */
-
-/**
- * @interface_method_impl{PDMIMOUSEPORT,pfnPutEvent}
- */
-static DECLCALLBACK(int) kbdMousePutEvent(PPDMIMOUSEPORT pInterface, int32_t dx,
-                                          int32_t dy, int32_t dz, int32_t dw,
-                                          uint32_t fButtons)
-{
-    KBDState *pThis = RT_FROM_MEMBER(pInterface, KBDState, Mouse.IPort);
-    int rc = PDMCritSectEnter(pThis->pDevInsR3->pCritSectRoR3, VERR_SEM_BUSY);
-    AssertReleaseRC(rc);
-
-    pc_kbd_mouse_event(pThis, dx, dy, dz, dw, fButtons);
-
-    PDMCritSectLeave(pThis->pDevInsR3->pCritSectRoR3);
-    return VINF_SUCCESS;
-}
-
-/**
- * @interface_method_impl{PDMIMOUSEPORT,pfnPutEventAbs}
- */
-static DECLCALLBACK(int) kbdMousePutEventAbs(PPDMIMOUSEPORT pInterface,
-                                             uint32_t x, uint32_t y, int32_t dz,
-                                             int32_t dw, uint32_t fButtons)
-{
-    AssertFailedReturn(VERR_NOT_SUPPORTED);
-    NOREF(pInterface); NOREF(x); NOREF(y); NOREF(dz); NOREF(dw); NOREF(fButtons);
-}
-
-/**
- * @interface_method_impl{PDMIMOUSEPORT,pfnPutEventMultiTouch}
- */
-static DECLCALLBACK(int) kbdMousePutEventMultiTouch(PPDMIMOUSEPORT pInterface,
-                                                    uint8_t cContacts,
-                                                    const uint64_t *pau64Contacts,
-                                                    uint32_t u32ScanTime)
-{
-    AssertFailedReturn(VERR_NOT_SUPPORTED);
-    NOREF(pInterface); NOREF(cContacts); NOREF(pau64Contacts); NOREF(u32ScanTime);
-}
-#endif
-
 /* -=-=-=-=-=- real code -=-=-=-=-=- */
 
 
@@ -1610,27 +863,7 @@ static DECLCALLBACK(int)  kbdAttach(PPDMDEVINS pDevIns, unsigned iLUN, uint32_t
 
         /* LUN #1: aux/mouse */
         case 1:
-#ifdef VBOX_WITH_NEW_PS2M
             rc = PS2MAttach(&pThis->Aux, pDevIns, iLUN, fFlags);
-#else
-            rc = PDMDevHlpDriverAttach(pDevIns, iLUN, &pThis->Mouse.IBase, &pThis->Mouse.pDrvBase, "Aux (Mouse) Port");
-            if (RT_SUCCESS(rc))
-            {
-                pThis->Mouse.pDrv = PDMIBASE_QUERY_INTERFACE(pThis->Mouse.pDrvBase, PDMIMOUSECONNECTOR);
-                if (!pThis->Mouse.pDrv)
-                {
-                    AssertLogRelMsgFailed(("LUN #1 doesn't have a mouse interface! rc=%Rrc\n", rc));
-                    rc = VERR_PDM_MISSING_INTERFACE;
-                }
-            }
-            else if (rc == VERR_PDM_NO_ATTACHED_DRIVER)
-            {
-                Log(("%s/%d: warning: no driver attached to LUN #1!\n", pDevIns->pReg->szName, pDevIns->iInstance));
-                rc = VINF_SUCCESS;
-            }
-            else
-                AssertLogRelMsgFailed(("Failed to attach LUN #1! rc=%Rrc\n", rc));
-#endif
             break;
 
         default:
@@ -1696,9 +929,7 @@ static DECLCALLBACK(void) kbdRelocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta)
     KBDState   *pThis = PDMINS_2_DATA(pDevIns, KBDState *);
     pThis->pDevInsRC = PDMDEVINS_2_RCPTR(pDevIns);
     PS2KRelocate(&pThis->Kbd, offDelta, pDevIns);
-#ifdef VBOX_WITH_NEW_PS2M
     PS2MRelocate(&pThis->Aux, offDelta, pDevIns);
-#endif
 }
 
 
@@ -1740,16 +971,9 @@ static DECLCALLBACK(int) kbdConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNO
     if (RT_FAILURE(rc))
         return rc;
 
-#ifdef VBOX_WITH_NEW_PS2M
     rc = PS2MConstruct(&pThis->Aux, pDevIns, pThis, iInstance);
     if (RT_FAILURE(rc))
         return rc;
-#else
-    pThis->Mouse.IBase.pfnQueryInterface    = kbdMouseQueryInterface;
-    pThis->Mouse.IPort.pfnPutEvent          = kbdMousePutEvent;
-    pThis->Mouse.IPort.pfnPutEventAbs       = kbdMousePutEventAbs;
-    pThis->Mouse.IPort.pfnPutEventMultiTouch = kbdMousePutEventMultiTouch;
-#endif
 
     /*
      * Register I/O ports, save state, keyboard event handler and mouse event handlers.
diff --git a/src/VBox/Devices/Input/DrvKeyboardQueue.cpp b/src/VBox/Devices/Input/DrvKeyboardQueue.cpp
index a7d4729..2c72b6c 100644
--- a/src/VBox/Devices/Input/DrvKeyboardQueue.cpp
+++ b/src/VBox/Devices/Input/DrvKeyboardQueue.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -350,6 +350,7 @@ static DECLCALLBACK(void)  drvKbdQueueReset(PPDMDRVINS pDrvIns)
 {
     //PDRVKBDQUEUE        pThis = PDMINS_2_DATA(pDrvIns, PDRVKBDQUEUE);
     /** @todo purge the queue on reset. */
+    RT_NOREF(pDrvIns);
 }
 
 
diff --git a/src/VBox/Devices/Input/DrvMouseQueue.cpp b/src/VBox/Devices/Input/DrvMouseQueue.cpp
index 689864f..b5fc9da 100644
--- a/src/VBox/Devices/Input/DrvMouseQueue.cpp
+++ b/src/VBox/Devices/Input/DrvMouseQueue.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -278,6 +278,7 @@ static DECLCALLBACK(void)  drvMouseQueueReset(PPDMDRVINS pDrvIns)
 {
     //PDRVKBDQUEUE        pThis = PDMINS_2_DATA(pDrvIns, PDRVKBDQUEUE);
     /** @todo purge the queue on reset. */
+    RT_NOREF(pDrvIns);
 }
 
 
@@ -344,6 +345,7 @@ static DECLCALLBACK(int) drvMouseQueueConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pC
     pDrvIns->IBase.pfnQueryInterface        = drvMouseQueueQueryInterface;
     /* IMouseConnector. */
     pDrv->IConnector.pfnReportModes         = drvMousePassThruReportModes;
+    pDrv->IConnector.pfnFlushQueue          = drvMouseFlushQueue;
     /* IMousePort. */
     pDrv->IPort.pfnPutEvent                 = drvMouseQueuePutEvent;
     pDrv->IPort.pfnPutEventAbs              = drvMouseQueuePutEventAbs;
diff --git a/src/VBox/Devices/Input/PS2Dev.h b/src/VBox/Devices/Input/PS2Dev.h
index ff6386a..85044a1 100644
--- a/src/VBox/Devices/Input/PS2Dev.h
+++ b/src/VBox/Devices/Input/PS2Dev.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Input/PS2K.cpp b/src/VBox/Devices/Input/PS2K.cpp
index 88f0cda..80eae0f 100644
--- a/src/VBox/Devices/Input/PS2K.cpp
+++ b/src/VBox/Devices/Input/PS2K.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -209,7 +209,7 @@ typedef struct PS2K
     /** Typematic timer - R0 Ptr. */
     PTMTIMERR0          pKbdTypematicTimerR0;
 
-    scan_state_t        XlatState;      ///@todo: temporary
+    scan_state_t        XlatState;      /// @todo temporary
     uint32_t            Alignment1;
 
     /**
@@ -266,6 +266,11 @@ typedef struct {
     uint8_t keyMatic;    /* Set 3 typematic default. */
 } key_def;
 
+
+/*********************************************************************************************************************************
+*   Global Variables                                                                                                             *
+*********************************************************************************************************************************/
+#ifdef IN_RING3
 /* USB to PS/2 conversion table for regular keys. */
 static const   key_def   aPS2Keys[] = {
     /* 00 */ {NONE, NONE, NONE, KF_NB, T_U }, /* Key N/A: No Event */
@@ -460,16 +465,9 @@ static const   key_def   aPS2ModKeys[] = {
     /* E7 */ {0x5C, 0x27, UNKN, KF_E0, T_U }, /* Key 128: Right GUI */
 };
 
-
-/*********************************************************************************************************************************
-*   Global Variables                                                                                                             *
-*********************************************************************************************************************************/
+#endif /* IN_RING3 */
 
 
-/*********************************************************************************************************************************
-*   Internal Functions                                                                                                           *
-*********************************************************************************************************************************/
-
 
 /**
  * Clear a queue.
@@ -686,7 +684,7 @@ int PS2KByteToKbd(PPS2K pThis, uint8_t cmd)
         case KCMD_ALL_MK_BRK:
         case KCMD_ALL_MAKE:
         case KCMD_ALL_TMB:
-            ///@todo Set the key types here.
+            /// @todo Set the key types here.
             ps2kInsertQueue((GeneriQ *)&pThis->cmdQ, KRSP_ACK);
             pThis->u8CurrCmd = 0;
             break;
@@ -696,7 +694,7 @@ int PS2KByteToKbd(PPS2K pThis, uint8_t cmd)
         case KCMD_RESET:
             pThis->u8ScanSet = 2;
             ps2kSetDefaults(pThis);
-            ///@todo reset more?
+            /// @todo reset more?
             ps2kInsertQueue((GeneriQ *)&pThis->cmdQ, KRSP_ACK);
             pThis->u8CurrCmd = cmd;
             /* Delay BAT completion; the test may take hundreds of ms. */
@@ -888,7 +886,7 @@ static int ps2kProcessKeyEvent(PPS2K pThis, uint8_t u8HidCode, bool fKeyDown)
                 }
             }
             /* Feed the bytes to the queue if there is room. */
-            ///@todo check empty space!
+            /// @todo check empty space!
             while (abCodes[i])
                 ps2kInsertQueue((GeneriQ *)&pThis->keyQ, abCodes[i++]);
             Assert(i < sizeof(abCodes));
@@ -956,7 +954,7 @@ static int ps2kProcessKeyEvent(PPS2K pThis, uint8_t u8HidCode, bool fKeyDown)
             }
 
             /* Feed any additional bytes to the queue if there is room. */
-            ///@todo check empty space!
+            /// @todo check empty space!
             while (abCodes[i])
                 ps2kInsertQueue((GeneriQ *)&pThis->keyQ, abCodes[i++]);
             Assert(i < sizeof(abCodes));
@@ -973,7 +971,7 @@ static int ps2kProcessKeyEvent(PPS2K pThis, uint8_t u8HidCode, bool fKeyDown)
         else
         {
             /* Send a key release code unless it's a make only key. */
-            ///@todo Look up the current typematic setting, not the default!
+            /// @todo Look up the current typematic setting, not the default!
             if (pKeyDef->keyMatic != T_M)
             {
                 ps2kInsertQueue((GeneriQ *)&pThis->keyQ, 0xF0);
@@ -997,8 +995,8 @@ static int ps2kProcessKeyEvent(PPS2K pThis, uint8_t u8HidCode, bool fKeyDown)
     {
         pThis->u8TypematicKey    = 0;
         pThis->enmTypematicState = KBD_TMS_IDLE;
-        ///@todo Cancel timer right away?
-        ///@todo Cancel timer before pushing key up code!?
+        /// @todo Cancel timer right away?
+        /// @todo Cancel timer before pushing key up code!?
     }
 
     /* Poke the KBC to update its state. */
@@ -1012,7 +1010,8 @@ static int ps2kProcessKeyEvent(PPS2K pThis, uint8_t u8HidCode, bool fKeyDown)
  */
 static DECLCALLBACK(void) ps2kTypematicTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
 {
-    PPS2K pThis = (PS2K *)pvUser; NOREF(pDevIns);
+    RT_NOREF2(pDevIns, pTimer);
+    PPS2K pThis = (PS2K *)pvUser;
     LogFlowFunc(("Typematic state=%d, key %02X\n", pThis->enmTypematicState, pThis->u8TypematicKey));
 
     /* If the current typematic key is zero, the repeat was canceled just when
@@ -1036,7 +1035,8 @@ static DECLCALLBACK(void) ps2kTypematicTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer
  */
 static DECLCALLBACK(void) ps2kDelayTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
 {
-    PPS2K pThis = (PS2K *)pvUser; NOREF(pDevIns);
+    RT_NOREF2(pDevIns, pTimer);
+    PPS2K pThis = (PS2K *)pvUser;
 
     LogFlowFunc(("Delay timer: cmd %02X\n", pThis->u8CurrCmd));
 
@@ -1045,7 +1045,7 @@ static DECLCALLBACK(void) ps2kDelayTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, vo
     pThis->fScanning = true;    /* BAT completion enables scanning! */
     pThis->u8CurrCmd = 0;
 
-    ///@todo Might want a PS2KCompleteCommand() to push last response, clear command, and kick the KBC...
+    /// @todo Might want a PS2KCompleteCommand() to push last response, clear command, and kick the KBC...
     /* Give the KBC a kick. */
     KBCUpdateInterrupts(pThis->pParent);
 }
@@ -1348,6 +1348,8 @@ int PS2KLoadState(PPS2K pThis, PSSMHANDLE pSSM, uint32_t uVersion)
 
 int PS2KLoadDone(PPS2K pThis, PSSMHANDLE pSSM)
 {
+    RT_NOREF1(pSSM);
+
     /* This *must* be done after the inital load because it may trigger
      * interrupts and change the interrupt controller state.
      */
@@ -1379,6 +1381,7 @@ void PS2KReset(PPS2K pThis)
 
 void PS2KRelocate(PPS2K pThis, RTGCINTPTR offDelta, PPDMDEVINS pDevIns)
 {
+    RT_NOREF1(pDevIns);
     LogFlowFunc(("Relocating PS2K\n"));
     pThis->pKbdDelayTimerRC     = TMTimerRCPtr(pThis->pKbdDelayTimerR3);
     pThis->pKbdTypematicTimerRC = TMTimerRCPtr(pThis->pKbdTypematicTimerR3);
@@ -1387,8 +1390,7 @@ void PS2KRelocate(PPS2K pThis, RTGCINTPTR offDelta, PPDMDEVINS pDevIns)
 
 int PS2KConstruct(PPS2K pThis, PPDMDEVINS pDevIns, void *pParent, int iInstance)
 {
-    int     rc;
-
+    RT_NOREF2(pDevIns, iInstance);
     LogFlowFunc(("iInstance=%d\n", iInstance));
 
     pThis->pParent = pParent;
@@ -1409,8 +1411,8 @@ int PS2KConstruct(PPS2K pThis, PPDMDEVINS pDevIns, void *pParent, int iInstance)
      * Create the typematic delay/repeat timer. Does not use virtual time!
      */
     PTMTIMER pTimer;
-    rc = PDMDevHlpTMTimerCreate(pDevIns, TMCLOCK_REAL, ps2kTypematicTimer, pThis,
-                                TMTIMER_FLAGS_DEFAULT_CRIT_SECT, "PS2K Typematic Timer", &pTimer);
+    int rc = PDMDevHlpTMTimerCreate(pDevIns, TMCLOCK_REAL, ps2kTypematicTimer, pThis,
+                                    TMTIMER_FLAGS_DEFAULT_CRIT_SECT, "PS2K Typematic Timer", &pTimer);
     if (RT_FAILURE(rc))
         return rc;
 
@@ -1440,7 +1442,7 @@ int PS2KConstruct(PPS2K pThis, PPDMDEVINS pDevIns, void *pParent, int iInstance)
 
 #endif
 
-///@todo The following should live with the KBC implementation.
+/// @todo The following should live with the KBC implementation.
 
 /* Table used by the keyboard controller to optionally translate the incoming
  * keyboard data. Note that the translation is designed for essentially taking
diff --git a/src/VBox/Devices/Input/PS2M.cpp b/src/VBox/Devices/Input/PS2M.cpp
index 3345c8d..d5c9c47 100644
--- a/src/VBox/Devices/Input/PS2M.cpp
+++ b/src/VBox/Devices/Input/PS2M.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -171,7 +171,7 @@
 
 DEF_PS2Q_TYPE(AuxEvtQ, AUX_EVT_QUEUE_SIZE);
 DEF_PS2Q_TYPE(AuxCmdQ, AUX_CMD_QUEUE_SIZE);
-#ifndef VBOX_DEVICE_STRUCT_TESTCASE //@todo: hack
+#ifndef VBOX_DEVICE_STRUCT_TESTCASE /// @todo hack
 DEF_PS2Q_TYPE(GeneriQ, 1);
 #endif
 
@@ -413,7 +413,7 @@ static void ps2mReset(PPS2M pThis)
     pThis->enmMode   = AUX_MODE_STD;
     pThis->u8CurrCmd = 0;
 
-    //@todo: move to its proper home!
+    /// @todo move to its proper home!
     ps2mSetDriverState(pThis, true);
 }
 
@@ -696,7 +696,7 @@ int PS2MByteToAux(PPS2M pThis, uint8_t cmd)
             break;
         case ACMD_RESET:
             ps2mSetDefaults(pThis);
-            ///@todo reset more?
+            /// @todo reset more?
             pThis->u8CurrCmd = cmd;
             pThis->enmMode   = AUX_MODE_RESET;
             ps2kInsertQueue((GeneriQ *)&pThis->cmdQ, ARSP_ACK);
@@ -813,11 +813,11 @@ int PS2MByteFromAux(PPS2M pThis, uint8_t *pb)
     AssertPtr(pb);
 
     /* Anything in the command queue has priority over data
-     * in the event queue. Additionally, keystrokes are //@todo: true?
+     * in the event queue. Additionally, keystrokes are /// @todo true?
      * blocked if a command is currently in progress, even if
      * the command queue is empty.
      */
-    //@todo: Probably should flush/not fill queue if stream mode reporting disabled?!
+    /// @todo Probably should flush/not fill queue if stream mode reporting disabled?!
     rc = ps2kRemoveQueue((GeneriQ *)&pThis->cmdQ, pb);
     if (rc != VINF_SUCCESS && !pThis->u8CurrCmd && (pThis->u8State & AUX_STATE_ENABLED))
         rc = ps2kRemoveQueue((GeneriQ *)&pThis->evtQ, pb);
@@ -834,7 +834,8 @@ int PS2MByteFromAux(PPS2M pThis, uint8_t *pb)
  */
 static DECLCALLBACK(void) ps2mThrottleTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
 {
-    PPS2M       pThis = (PS2M *)pvUser; NOREF(pDevIns);
+    RT_NOREF2(pDevIns, pTimer);
+    PPS2M       pThis = (PS2M *)pvUser;
     uint32_t    uHaveEvents;
 
     /* Grab the lock to avoid races with PutEvent(). */
@@ -867,14 +868,15 @@ static DECLCALLBACK(void) ps2mThrottleTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer,
  */
 static DECLCALLBACK(void) ps2mDelayTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
 {
-    PPS2M pThis = (PS2M *)pvUser; NOREF(pDevIns);
+    RT_NOREF2(pDevIns, pTimer);
+    PPS2M pThis = (PS2M *)pvUser;
 
     LogFlowFunc(("Delay timer: cmd %02X\n", pThis->u8CurrCmd));
 
     Assert(pThis->u8CurrCmd == ACMD_RESET);
     ps2mReset(pThis);
 
-    ///@todo Might want a PS2MCompleteCommand() to push last response, clear command, and kick the KBC...
+    /// @todo Might want a PS2MCompleteCommand() to push last response, clear command, and kick the KBC...
     /* Give the KBC a kick. */
     KBCUpdateInterrupts(pThis->pParent);
 }
@@ -941,13 +943,14 @@ static DECLCALLBACK(void *) ps2mQueryInterface(PPDMIBASE pInterface, const char
 static int ps2mPutEventWorker(PPS2M pThis, int32_t dx, int32_t dy,
                               int32_t dz, int32_t dw, uint32_t fButtons)
 {
+    RT_NOREF1(dw);
     int             rc = VINF_SUCCESS;
 
     /* Update internal accumulators and button state. */
     pThis->iAccumX += dx;
     pThis->iAccumY += dy;
     pThis->iAccumZ += dz;
-    pThis->fAccumB |= fButtons;     //@todo: accumulate based on current protocol?
+    pThis->fAccumB |= fButtons;     /// @todo accumulate based on current protocol?
     pThis->fCurrB   = fButtons;
 
 #if 1
@@ -1078,8 +1081,6 @@ int PS2MAttach(PPS2M pThis, PPDMDEVINS pDevIns, unsigned iLUN, uint32_t fFlags)
 
 void PS2MSaveState(PPS2M pThis, PSSMHANDLE pSSM)
 {
-    uint32_t    cPressed = 0;
-
     LogFlowFunc(("Saving PS2M state\n"));
 
     /* Save the core auxiliary device state. */
@@ -1171,15 +1172,15 @@ void PS2MReset(PPS2M pThis)
 
 void PS2MRelocate(PPS2M pThis, RTGCINTPTR offDelta, PPDMDEVINS pDevIns)
 {
+    RT_NOREF2(pDevIns, offDelta);
     LogFlowFunc(("Relocating PS2M\n"));
     pThis->pDelayTimerRC    = TMTimerRCPtr(pThis->pDelayTimerR3);
     pThis->pThrottleTimerRC = TMTimerRCPtr(pThis->pThrottleTimerR3);
-    NOREF(offDelta);
 }
 
 int PS2MConstruct(PPS2M pThis, PPDMDEVINS pDevIns, void *pParent, int iInstance)
 {
-    int     rc;
+    RT_NOREF1(iInstance);
 
     LogFlowFunc(("iInstance=%d\n", iInstance));
 
@@ -1203,8 +1204,8 @@ int PS2MConstruct(PPS2M pThis, PPDMDEVINS pDevIns, void *pParent, int iInstance)
      * Create the input rate throttling timer. Does not use virtual time!
      */
     PTMTIMER pTimer;
-    rc = PDMDevHlpTMTimerCreate(pDevIns, TMCLOCK_REAL, ps2mThrottleTimer, pThis,
-                                TMTIMER_FLAGS_DEFAULT_CRIT_SECT, "PS2M Throttle Timer", &pTimer);
+    int rc = PDMDevHlpTMTimerCreate(pDevIns, TMCLOCK_REAL, ps2mThrottleTimer, pThis,
+                                    TMTIMER_FLAGS_DEFAULT_CRIT_SECT, "PS2M Throttle Timer", &pTimer);
     if (RT_FAILURE(rc))
         return rc;
 
@@ -1229,7 +1230,7 @@ int PS2MConstruct(PPS2M pThis, PPDMDEVINS pDevIns, void *pParent, int iInstance)
      */
     PDMDevHlpDBGFInfoRegister(pDevIns, "ps2m", "Display PS/2 mouse state.", ps2mInfoState);
 
-    //@todo: Where should we do this?
+    /// @todo Where should we do this?
     ps2mSetDriverState(pThis, true);
     pThis->u8State = 0;
     pThis->enmMode = AUX_MODE_STD;
diff --git a/src/VBox/Devices/Input/UsbKbd.cpp b/src/VBox/Devices/Input/UsbKbd.cpp
index be10fc9..dee79b5 100644
--- a/src/VBox/Devices/Input/UsbKbd.cpp
+++ b/src/VBox/Devices/Input/UsbKbd.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -462,6 +462,7 @@ DECLINLINE(bool) usbHidQueueRemove(PUSBHIDURBQUEUE pQueue, PVUSBURB pUrb)
 }
 
 
+#if 0 /* unused */
 /**
  * Checks if the queue is empty or not.
  *
@@ -472,6 +473,7 @@ DECLINLINE(bool) usbHidQueueIsEmpty(PCUSBHIDURBQUEUE pQueue)
 {
     return pQueue->pHead == NULL;
 }
+#endif /* unused */
 
 
 /**
@@ -497,6 +499,7 @@ static void usbHidLinkDone(PUSBHID pThis, PVUSBURB pUrb)
  */
 static int usbHidCompleteStall(PUSBHID pThis, PUSBHIDEP pEp, PVUSBURB pUrb, const char *pszWhy)
 {
+    RT_NOREF1(pszWhy);
     Log(("usbHidCompleteStall/#%u: pUrb=%p:%s: %s\n", pThis->pUsbIns->iInstance, pUrb, pUrb->pszDesc, pszWhy));
 
     pUrb->enmStatus = VUSBSTATUS_STALL;
@@ -759,7 +762,7 @@ static DECLCALLBACK(int) usbHidKeyboardPutEvent(PPDMIKEYBOARDPORT pInterface, ui
 }
 
 /**
- * @copydoc PDMUSBREG::pfnUrbReap
+ * @interface_method_impl{PDMUSBREG,pfnUrbReap}
  */
 static DECLCALLBACK(PVUSBURB) usbHidUrbReap(PPDMUSBINS pUsbIns, RTMSINTERVAL cMillies)
 {
@@ -792,7 +795,7 @@ static DECLCALLBACK(PVUSBURB) usbHidUrbReap(PPDMUSBINS pUsbIns, RTMSINTERVAL cMi
 
 
 /**
- * @copydoc PDMUSBREG::pfnWakeup
+ * @interface_method_impl{PDMUSBREG,pfnWakeup}
  */
 static DECLCALLBACK(int) usbHidWakeup(PPDMUSBINS pUsbIns)
 {
@@ -803,7 +806,7 @@ static DECLCALLBACK(int) usbHidWakeup(PPDMUSBINS pUsbIns)
 
 
 /**
- * @copydoc PDMUSBREG::pfnUrbCancel
+ * @interface_method_impl{PDMUSBREG,pfnUrbCancel}
  */
 static DECLCALLBACK(int) usbHidUrbCancel(PPDMUSBINS pUsbIns, PVUSBURB pUrb)
 {
@@ -1091,7 +1094,7 @@ static int usbHidHandleDefaultPipe(PUSBHID pThis, PUSBHIDEP pEp, PVUSBURB pUrb)
 
 
 /**
- * @copydoc PDMUSBREG::pfnUrbQueue
+ * @interface_method_impl{PDMUSBREG,pfnUrbQueue}
  */
 static DECLCALLBACK(int) usbHidQueue(PPDMUSBINS pUsbIns, PVUSBURB pUrb)
 {
@@ -1127,7 +1130,7 @@ static DECLCALLBACK(int) usbHidQueue(PPDMUSBINS pUsbIns, PVUSBURB pUrb)
 
 
 /**
- * @copydoc PDMUSBREG::pfnUsbClearHaltedEndpoint
+ * @interface_method_impl{PDMUSBREG,pfnUsbClearHaltedEndpoint}
  */
 static DECLCALLBACK(int) usbHidUsbClearHaltedEndpoint(PPDMUSBINS pUsbIns, unsigned uEndpoint)
 {
@@ -1146,10 +1149,11 @@ static DECLCALLBACK(int) usbHidUsbClearHaltedEndpoint(PPDMUSBINS pUsbIns, unsign
 
 
 /**
- * @copydoc PDMUSBREG::pfnUsbSetInterface
+ * @interface_method_impl{PDMUSBREG,pfnUsbSetInterface}
  */
 static DECLCALLBACK(int) usbHidUsbSetInterface(PPDMUSBINS pUsbIns, uint8_t bInterfaceNumber, uint8_t bAlternateSetting)
 {
+    RT_NOREF3(pUsbIns, bInterfaceNumber, bAlternateSetting);
     LogFlow(("usbHidUsbSetInterface/#%u: bInterfaceNumber=%u bAlternateSetting=%u\n", pUsbIns->iInstance, bInterfaceNumber, bAlternateSetting));
     Assert(bAlternateSetting == 0);
     return VINF_SUCCESS;
@@ -1157,11 +1161,12 @@ static DECLCALLBACK(int) usbHidUsbSetInterface(PPDMUSBINS pUsbIns, uint8_t bInte
 
 
 /**
- * @copydoc PDMUSBREG::pfnUsbSetConfiguration
+ * @interface_method_impl{PDMUSBREG,pfnUsbSetConfiguration}
  */
 static DECLCALLBACK(int) usbHidUsbSetConfiguration(PPDMUSBINS pUsbIns, uint8_t bConfigurationValue,
                                                    const void *pvOldCfgDesc, const void *pvOldIfState, const void *pvNewCfgDesc)
 {
+    RT_NOREF3(pvOldCfgDesc, pvOldIfState, pvNewCfgDesc);
     PUSBHID pThis = PDMINS_2_DATA(pUsbIns, PUSBHID);
     LogFlow(("usbHidUsbSetConfiguration/#%u: bConfigurationValue=%u\n", pUsbIns->iInstance, bConfigurationValue));
     Assert(bConfigurationValue == 1);
@@ -1186,21 +1191,22 @@ static DECLCALLBACK(int) usbHidUsbSetConfiguration(PPDMUSBINS pUsbIns, uint8_t b
 
 
 /**
- * @copydoc PDMUSBREG::pfnUsbGetDescriptorCache
+ * @interface_method_impl{PDMUSBREG,pfnUsbGetDescriptorCache}
  */
 static DECLCALLBACK(PCPDMUSBDESCCACHE) usbHidUsbGetDescriptorCache(PPDMUSBINS pUsbIns)
 {
-    PUSBHID pThis = PDMINS_2_DATA(pUsbIns, PUSBHID);
+    PUSBHID pThis = PDMINS_2_DATA(pUsbIns, PUSBHID); RT_NOREF_PV(pThis);
     LogFlow(("usbHidUsbGetDescriptorCache/#%u:\n", pUsbIns->iInstance));
     return &g_UsbHidDescCache;
 }
 
 
 /**
- * @copydoc PDMUSBREG::pfnUsbReset
+ * @interface_method_impl{PDMUSBREG,pfnUsbReset}
  */
 static DECLCALLBACK(int) usbHidUsbReset(PPDMUSBINS pUsbIns, bool fResetOnLinux)
 {
+    RT_NOREF1(fResetOnLinux);
     PUSBHID pThis = PDMINS_2_DATA(pUsbIns, PUSBHID);
     LogFlow(("usbHidUsbReset/#%u:\n", pUsbIns->iInstance));
     RTCritSectEnter(&pThis->CritSect);
@@ -1213,10 +1219,11 @@ static DECLCALLBACK(int) usbHidUsbReset(PPDMUSBINS pUsbIns, bool fResetOnLinux)
 
 
 /**
- * @copydoc PDMUSBREG::pfnDestruct
+ * @interface_method_impl{PDMUSBREG,pfnDestruct}
  */
 static DECLCALLBACK(void) usbHidDestruct(PPDMUSBINS pUsbIns)
 {
+    PDMUSB_CHECK_VERSIONS_RETURN_VOID(pUsbIns);
     PUSBHID pThis = PDMINS_2_DATA(pUsbIns, PUSBHID);
     LogFlow(("usbHidDestruct/#%u:\n", pUsbIns->iInstance));
 
@@ -1237,10 +1244,12 @@ static DECLCALLBACK(void) usbHidDestruct(PPDMUSBINS pUsbIns)
 
 
 /**
- * @copydoc PDMUSBREG::pfnConstruct
+ * @interface_method_impl{PDMUSBREG,pfnConstruct}
  */
 static DECLCALLBACK(int) usbHidConstruct(PPDMUSBINS pUsbIns, int iInstance, PCFGMNODE pCfg, PCFGMNODE pCfgGlobal)
 {
+    RT_NOREF1(pCfgGlobal);
+    PDMUSB_CHECK_VERSIONS_RETURN(pUsbIns);
     PUSBHID pThis = PDMINS_2_DATA(pUsbIns, PUSBHID);
     Log(("usbHidConstruct/#%u:\n", iInstance));
 
diff --git a/src/VBox/Devices/Input/UsbMouse.cpp b/src/VBox/Devices/Input/UsbMouse.cpp
index 5287bbb..1430d8e 100644
--- a/src/VBox/Devices/Input/UsbMouse.cpp
+++ b/src/VBox/Devices/Input/UsbMouse.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1070,6 +1070,7 @@ DECLINLINE(bool) usbHidQueueRemove(PUSBHIDURBQUEUE pQueue, PVUSBURB pUrb)
 }
 
 
+#if 0 /* unused */
 /**
  * Checks if the queue is empty or not.
  *
@@ -1080,6 +1081,7 @@ DECLINLINE(bool) usbHidQueueIsEmpty(PCUSBHIDURBQUEUE pQueue)
 {
     return pQueue->pHead == NULL;
 }
+#endif /* unused */
 
 
 /**
@@ -1439,10 +1441,10 @@ static DECLCALLBACK(void *) usbHidMouseQueryInterface(PPDMIBASE pInterface, cons
 /**
  * @interface_method_impl{PDMIMOUSEPORT,pfnPutEvent}
  */
-static DECLCALLBACK(int) usbHidMousePutEvent(PPDMIMOUSEPORT pInterface,
-                                             int32_t dx, int32_t dy, int32_t dz,
-                                             int32_t dw, uint32_t fButtons)
+static DECLCALLBACK(int) usbHidMousePutEvent(PPDMIMOUSEPORT pInterface, int32_t dx, int32_t dy,
+                                             int32_t dz, int32_t dw, uint32_t fButtons)
 {
+    RT_NOREF1(dw);
     PUSBHID pThis = RT_FROM_MEMBER(pInterface, USBHID, Lun0.IPort);
     RTCritSectEnter(&pThis->CritSect);
 
@@ -1666,7 +1668,7 @@ static DECLCALLBACK(int) usbHidMousePutEventMultiTouch(PPDMIMOUSEPORT pInterface
 }
 
 /**
- * @copydoc PDMUSBREG::pfnUrbReap
+ * @interface_method_impl{PDMUSBREG,pfnUrbReap}
  */
 static DECLCALLBACK(PVUSBURB) usbHidUrbReap(PPDMUSBINS pUsbIns, RTMSINTERVAL cMillies)
 {
@@ -1700,7 +1702,7 @@ static DECLCALLBACK(PVUSBURB) usbHidUrbReap(PPDMUSBINS pUsbIns, RTMSINTERVAL cMi
 }
 
 /**
- * @copydoc PDMUSBREG::pfnWakeup
+ * @interface_method_impl{PDMUSBREG,pfnWakeup}
  */
 static DECLCALLBACK(int) usbHidWakeup(PPDMUSBINS pUsbIns)
 {
@@ -1710,7 +1712,7 @@ static DECLCALLBACK(int) usbHidWakeup(PPDMUSBINS pUsbIns)
 }
 
 /**
- * @copydoc PDMUSBREG::pfnUrbCancel
+ * @interface_method_impl{PDMUSBREG,pfnUrbCancel}
  */
 static DECLCALLBACK(int) usbHidUrbCancel(PPDMUSBINS pUsbIns, PVUSBURB pUrb)
 {
@@ -1795,7 +1797,7 @@ static int usbHidHandleIntrDevToHost(PUSBHID pThis, PUSBHIDEP pEp, PVUSBURB pUrb
 #define SET_IDLE     0x0A
 #define SET_PROTOCOL 0x0B
 
-static uint8_t sau8QASampleBlob[256] =
+static uint8_t const g_abQASampleBlob[256] =
 {
     0xfc, 0x28, 0xfe, 0x84, 0x40, 0xcb, 0x9a, 0x87,
     0x0d, 0xbe, 0x57, 0x3c, 0xb6, 0x70, 0x09, 0x88,
@@ -1887,11 +1889,10 @@ static int usbHidRequestClass(PUSBHID pThis, PUSBHIDEP pEp, PVUSBURB pUrb)
                 }
                 else if (u8ReportType == 3 && u8ReportID == REPORTID_TOUCH_QABLOB)
                 {
-                    uint32_t cbLeft = pUrb->cbData;
                     pUrb->abData[sizeof(VUSBSETUP) + 0] = REPORTID_TOUCH_QABLOB;  /* Report Id. */
                     memcpy(&pUrb->abData[sizeof(VUSBSETUP) + 1],
-                           sau8QASampleBlob, sizeof(sau8QASampleBlob));
-                    cbData = sizeof(sau8QASampleBlob) + 1;
+                           g_abQASampleBlob, sizeof(g_abQASampleBlob));
+                    cbData = sizeof(g_abQASampleBlob) + 1;
                 }
                 else if (u8ReportType == 3 && u8ReportID == REPORTID_TOUCH_DEVCONFIG)
                 {
@@ -1975,22 +1976,22 @@ static int usbHidHandleDefaultPipe(PUSBHID pThis, PUSBHIDEP pEp, PVUSBURB pUrb)
                             {
                                 switch (pThis->enmMode)
                                 {
-                                case USBHIDMODE_ABSOLUTE:
-                                    cbDesc = sizeof(g_UsbHidTIfHidDesc);
-                                    pDesc = (const uint8_t *)&g_UsbHidTIfHidDesc;
-                                    break;
-                                case USBHIDMODE_RELATIVE:
-                                    cbDesc = sizeof(g_UsbHidMIfHidDesc);
-                                    pDesc = (const uint8_t *)&g_UsbHidMIfHidDesc;
-                                    break;
-                                case USBHIDMODE_MULTI_TOUCH:
-                                    cbDesc = sizeof(g_UsbHidMTIfHidDesc);
-                                    pDesc = (const uint8_t *)&g_UsbHidMTIfHidDesc;
-                                    break;
-                                default:
-                                    cbDesc = 0;
-                                    pDesc = 0;
-                                    break;
+                                    case USBHIDMODE_ABSOLUTE:
+                                        cbDesc = sizeof(g_UsbHidTIfHidDesc);
+                                        pDesc = (const uint8_t *)&g_UsbHidTIfHidDesc;
+                                        break;
+                                    case USBHIDMODE_RELATIVE:
+                                        cbDesc = sizeof(g_UsbHidMIfHidDesc);
+                                        pDesc = (const uint8_t *)&g_UsbHidMIfHidDesc;
+                                        break;
+                                    case USBHIDMODE_MULTI_TOUCH:
+                                        cbDesc = sizeof(g_UsbHidMTIfHidDesc);
+                                        pDesc = (const uint8_t *)&g_UsbHidMTIfHidDesc;
+                                        break;
+                                    default:
+                                        cbDesc = 0;
+                                        pDesc = 0;
+                                        break;
                                 }
                                 /* Returned data is written after the setup message. */
                                 cbCopy = pUrb->cbData - sizeof(*pSetup);
@@ -2006,22 +2007,22 @@ static int usbHidHandleDefaultPipe(PUSBHID pThis, PUSBHIDEP pEp, PVUSBURB pUrb)
                             {
                                 switch (pThis->enmMode)
                                 {
-                                case USBHIDMODE_ABSOLUTE:
-                                    cbDesc = sizeof(g_UsbHidTReportDesc);
-                                    pDesc = (const uint8_t *)&g_UsbHidTReportDesc;
-                                    break;
-                                case USBHIDMODE_RELATIVE:
-                                    cbDesc = sizeof(g_UsbHidMReportDesc);
-                                    pDesc = (const uint8_t *)&g_UsbHidMReportDesc;
-                                    break;
-                                case USBHIDMODE_MULTI_TOUCH:
-                                    cbDesc = sizeof(g_UsbHidMTReportDesc);
-                                    pDesc = (const uint8_t *)&g_UsbHidMTReportDesc;
-                                    break;
-                                default:
-                                    cbDesc = 0;
-                                    pDesc = 0;
-                                    break;
+                                    case USBHIDMODE_ABSOLUTE:
+                                        cbDesc = sizeof(g_UsbHidTReportDesc);
+                                        pDesc = (const uint8_t *)&g_UsbHidTReportDesc;
+                                        break;
+                                    case USBHIDMODE_RELATIVE:
+                                        cbDesc = sizeof(g_UsbHidMReportDesc);
+                                        pDesc = (const uint8_t *)&g_UsbHidMReportDesc;
+                                        break;
+                                    case USBHIDMODE_MULTI_TOUCH:
+                                        cbDesc = sizeof(g_UsbHidMTReportDesc);
+                                        pDesc = (const uint8_t *)&g_UsbHidMTReportDesc;
+                                        break;
+                                    default:
+                                        cbDesc = 0;
+                                        pDesc = 0;
+                                        break;
                                 }
                                 /* Returned data is written after the setup message. */
                                 cbCopy = pUrb->cbData - sizeof(*pSetup);
@@ -2147,7 +2148,7 @@ static int usbHidHandleDefaultPipe(PUSBHID pThis, PUSBHIDEP pEp, PVUSBURB pUrb)
 
 
 /**
- * @copydoc PDMUSBREG::pfnUrbQueue
+ * @interface_method_impl{PDMUSBREG,pfnUrbQueue}
  */
 static DECLCALLBACK(int) usbHidQueue(PPDMUSBINS pUsbIns, PVUSBURB pUrb)
 {
@@ -2184,7 +2185,7 @@ static DECLCALLBACK(int) usbHidQueue(PPDMUSBINS pUsbIns, PVUSBURB pUrb)
 
 
 /**
- * @copydoc PDMUSBREG::pfnUsbClearHaltedEndpoint
+ * @interface_method_impl{PDMUSBREG,pfnUsbClearHaltedEndpoint}
  */
 static DECLCALLBACK(int) usbHidUsbClearHaltedEndpoint(PPDMUSBINS pUsbIns, unsigned uEndpoint)
 {
@@ -2204,7 +2205,7 @@ static DECLCALLBACK(int) usbHidUsbClearHaltedEndpoint(PPDMUSBINS pUsbIns, unsign
 
 
 /**
- * @copydoc PDMUSBREG::pfnUsbSetInterface
+ * @interface_method_impl{PDMUSBREG,pfnUsbSetInterface}
  */
 static DECLCALLBACK(int) usbHidUsbSetInterface(PPDMUSBINS pUsbIns, uint8_t bInterfaceNumber, uint8_t bAlternateSetting)
 {
@@ -2216,11 +2217,12 @@ static DECLCALLBACK(int) usbHidUsbSetInterface(PPDMUSBINS pUsbIns, uint8_t bInte
 
 
 /**
- * @copydoc PDMUSBREG::pfnUsbSetConfiguration
+ * @interface_method_impl{PDMUSBREG,pfnUsbSetConfiguration}
  */
 static DECLCALLBACK(int) usbHidUsbSetConfiguration(PPDMUSBINS pUsbIns, uint8_t bConfigurationValue,
                                                    const void *pvOldCfgDesc, const void *pvOldIfState, const void *pvNewCfgDesc)
 {
+    RT_NOREF3(pvOldCfgDesc, pvOldIfState, pvNewCfgDesc);
     PUSBHID pThis = PDMINS_2_DATA(pUsbIns, PUSBHID);
     LogRelFlow(("usbHidUsbSetConfiguration/#%u: bConfigurationValue=%u\n",
                 pUsbIns->iInstance, bConfigurationValue));
@@ -2248,7 +2250,7 @@ static DECLCALLBACK(int) usbHidUsbSetConfiguration(PPDMUSBINS pUsbIns, uint8_t b
 
 
 /**
- * @copydoc PDMUSBREG::pfnUsbGetDescriptorCache
+ * @interface_method_impl{PDMUSBREG,pfnUsbGetDescriptorCache}
  */
 static DECLCALLBACK(PCPDMUSBDESCCACHE) usbHidUsbGetDescriptorCache(PPDMUSBINS pUsbIns)
 {
@@ -2256,23 +2258,24 @@ static DECLCALLBACK(PCPDMUSBDESCCACHE) usbHidUsbGetDescriptorCache(PPDMUSBINS pU
     LogRelFlow(("usbHidUsbGetDescriptorCache/#%u:\n", pUsbIns->iInstance));
     switch (pThis->enmMode)
     {
-    case USBHIDMODE_ABSOLUTE:
-        return &g_UsbHidTDescCache;
-    case USBHIDMODE_RELATIVE:
-        return &g_UsbHidMDescCache;
-    case USBHIDMODE_MULTI_TOUCH:
-        return &g_UsbHidMTDescCache;
-    default:
-        return NULL;
+        case USBHIDMODE_ABSOLUTE:
+            return &g_UsbHidTDescCache;
+        case USBHIDMODE_RELATIVE:
+            return &g_UsbHidMDescCache;
+        case USBHIDMODE_MULTI_TOUCH:
+            return &g_UsbHidMTDescCache;
+        default:
+            return NULL;
     }
 }
 
 
 /**
- * @copydoc PDMUSBREG::pfnUsbReset
+ * @interface_method_impl{PDMUSBREG,pfnUsbReset}
  */
 static DECLCALLBACK(int) usbHidUsbReset(PPDMUSBINS pUsbIns, bool fResetOnLinux)
 {
+    RT_NOREF1(fResetOnLinux);
     PUSBHID pThis = PDMINS_2_DATA(pUsbIns, PUSBHID);
     LogRelFlow(("usbHidUsbReset/#%u:\n", pUsbIns->iInstance));
     RTCritSectEnter(&pThis->CritSect);
@@ -2285,10 +2288,11 @@ static DECLCALLBACK(int) usbHidUsbReset(PPDMUSBINS pUsbIns, bool fResetOnLinux)
 
 
 /**
- * @copydoc PDMUSBREG::pfnDestruct
+ * @interface_method_impl{PDMUSBREG,pfnDestruct}
  */
 static DECLCALLBACK(void) usbHidDestruct(PPDMUSBINS pUsbIns)
 {
+    PDMUSB_CHECK_VERSIONS_RETURN_VOID(pUsbIns);
     PUSBHID pThis = PDMINS_2_DATA(pUsbIns, PUSBHID);
     LogRelFlow(("usbHidDestruct/#%u:\n", pUsbIns->iInstance));
 
@@ -2308,12 +2312,13 @@ static DECLCALLBACK(void) usbHidDestruct(PPDMUSBINS pUsbIns)
 
 
 /**
- * @copydoc PDMUSBREG::pfnConstruct
+ * @interface_method_impl{PDMUSBREG,pfnConstruct}
  */
 static DECLCALLBACK(int) usbHidConstruct(PPDMUSBINS pUsbIns, int iInstance, PCFGMNODE pCfg, PCFGMNODE pCfgGlobal)
 {
+    RT_NOREF1(pCfgGlobal);
+    PDMUSB_CHECK_VERSIONS_RETURN(pUsbIns);
     PUSBHID pThis = PDMINS_2_DATA(pUsbIns, PUSBHID);
-    char szMode[64];
     LogRelFlow(("usbHidConstruct/#%u:\n", iInstance));
 
     /*
@@ -2337,6 +2342,7 @@ static DECLCALLBACK(int) usbHidConstruct(PPDMUSBINS pUsbIns, int iInstance, PCFG
     rc = CFGMR3ValidateConfig(pCfg, "/", "Mode|CoordShift", "Config", "UsbHid", iInstance);
     if (RT_FAILURE(rc))
         return rc;
+    char szMode[64];
     rc = CFGMR3QueryStringDef(pCfg, "Mode", szMode, sizeof(szMode), "relative");
     if (RT_FAILURE(rc))
         return PDMUsbHlpVMSetError(pUsbIns, rc, RT_SRC_POS, N_("HID failed to query settings"));
diff --git a/src/VBox/Devices/Input/testcase/Makefile.kmk b/src/VBox/Devices/Input/testcase/Makefile.kmk
index cc45cb5..91700e9 100644
--- a/src/VBox/Devices/Input/testcase/Makefile.kmk
+++ b/src/VBox/Devices/Input/testcase/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2013-2015 Oracle Corporation
+# Copyright (C) 2013-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Input/testcase/tstUsbMouse.cpp b/src/VBox/Devices/Input/testcase/tstUsbMouse.cpp
index c8081bc..3c19dcd 100644
--- a/src/VBox/Devices/Input/testcase/tstUsbMouse.cpp
+++ b/src/VBox/Devices/Input/testcase/tstUsbMouse.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -45,12 +45,17 @@ typedef struct DRVTSTMOUSE
     bool                        fAbs;
     /** Is multi-touch mode currently supported? */
     bool                        fMT;
-} DRVTSTMOUSE, *PDRVTSTMOUSE;
+} DRVTSTMOUSE;
+typedef DRVTSTMOUSE *PDRVTSTMOUSE;
 
 
+/*********************************************************************************************************************************
+*   Global Variables                                                                                                             *
+*********************************************************************************************************************************/
+static PDMUSBHLP   g_tstUsbHlp;
 /** Global mouse driver variable.
  * @todo To be improved some time. */
-static DRVTSTMOUSE s_drvTstMouse;
+static DRVTSTMOUSE g_drvTstMouse;
 
 
 /** @interface_method_impl{PDMUSBHLPR3,pfnVMSetErrorV} */
@@ -58,7 +63,7 @@ static DECLCALLBACK(int) tstVMSetErrorV(PPDMUSBINS pUsbIns, int rc,
                                         RT_SRC_POS_DECL, const char *pszFormat,
                                         va_list va)
 {
-    NOREF(pUsbIns);
+    RT_NOREF(pUsbIns);
     RTPrintf("Error: %s:%u:%s:", RT_SRC_POS_ARGS);
     RTPrintfV(pszFormat, va);
     return rc;
@@ -67,33 +72,26 @@ static DECLCALLBACK(int) tstVMSetErrorV(PPDMUSBINS pUsbIns, int rc,
 /** @interface_method_impl{PDMUSBHLPR3,pfnDriverAttach} */
 /** @todo We currently just take the driver interface from the global
  * variable.  This is sufficient for a unit test but still a bit sad. */
-static DECLCALLBACK(int) tstDriverAttach(PPDMUSBINS pUsbIns, RTUINT iLun,
-                                         PPDMIBASE pBaseInterface,
-                                         PPDMIBASE *ppBaseInterface,
-                                         const char *pszDesc)
+static DECLCALLBACK(int) tstDriverAttach(PPDMUSBINS pUsbIns, RTUINT iLun, PPDMIBASE pBaseInterface,
+                                         PPDMIBASE *ppBaseInterface, const char *pszDesc)
 {
-    NOREF(iLun);
-    NOREF(pszDesc);
-    s_drvTstMouse.pDrvBase = pBaseInterface;
-    s_drvTstMouse.pDrv = PDMIBASE_QUERY_INTERFACE(pBaseInterface,
-                                                  PDMIMOUSEPORT);
-    *ppBaseInterface = &s_drvTstMouse.IBase;
+    RT_NOREF3(pUsbIns, iLun, pszDesc);
+    g_drvTstMouse.pDrvBase = pBaseInterface;
+    g_drvTstMouse.pDrv = PDMIBASE_QUERY_INTERFACE(pBaseInterface, PDMIMOUSEPORT);
+    *ppBaseInterface = &g_drvTstMouse.IBase;
     return VINF_SUCCESS;
 }
 
 
-static PDMUSBHLP s_tstUsbHlp;
-
-
 /**
  * @interface_method_impl{PDMIBASE,pfnQueryInterface}
  */
 static DECLCALLBACK(void *) tstMouseQueryInterface(PPDMIBASE pInterface,
                                                    const char *pszIID)
 {
-    PDRVTSTMOUSE pThis = RT_FROM_MEMBER(pInterface, DRVTSTMOUSE, IBase);
-    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->IBase);
-    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIMOUSECONNECTOR, &pThis->IConnector);
+    PDRVTSTMOUSE pUsbIns = RT_FROM_MEMBER(pInterface, DRVTSTMOUSE, IBase);
+    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pUsbIns->IBase);
+    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIMOUSECONNECTOR, &pUsbIns->IConnector);
     return NULL;
 }
 
@@ -112,13 +110,14 @@ static DECLCALLBACK(void) tstMouseReportModes(PPDMIMOUSECONNECTOR pInterface,
 
 
 static int tstMouseConstruct(int iInstance, const char *pcszMode,
-                             uint8_t u8CoordShift, PPDMUSBINS *ppThis)
+                             uint8_t u8CoordShift, PPDMUSBINS *ppThis,
+                             uint32_t uInstanceVersion = PDM_USBINS_VERSION)
 {
     int rc = VERR_NO_MEMORY;
-    PPDMUSBINS pThis = (PPDMUSBINS)RTMemAllocZ(  sizeof(*pThis)
+    PPDMUSBINS pUsbIns = (PPDMUSBINS)RTMemAllocZ(  sizeof(*pUsbIns)
                                                + g_UsbHidMou.cbInstance);
     PCFGMNODE pCfg = NULL;
-    if (pThis)
+    if (pUsbIns)
     pCfg = CFGMR3CreateTree(NULL);
     if (pCfg)
         rc = CFGMR3InsertString(pCfg, "Mode", pcszMode);
@@ -126,58 +125,102 @@ static int tstMouseConstruct(int iInstance, const char *pcszMode,
         rc = CFGMR3InsertInteger(pCfg, "CoordShift", u8CoordShift);
     if (RT_SUCCESS(rc))
     {
-        s_drvTstMouse.pDrv = NULL;
-        s_drvTstMouse.pDrvBase = NULL;
-        pThis->iInstance = iInstance;
-        pThis->pHlpR3 = &s_tstUsbHlp;
-        rc = g_UsbHidMou.pfnConstruct(pThis, iInstance, pCfg, NULL);
+        g_drvTstMouse.pDrv     = NULL;
+        g_drvTstMouse.pDrvBase = NULL;
+        pUsbIns->u32Version = uInstanceVersion;
+        pUsbIns->iInstance  = iInstance;
+        pUsbIns->pHlpR3     = &g_tstUsbHlp;
+        rc = g_UsbHidMou.pfnConstruct(pUsbIns, iInstance, pCfg, NULL);
         if (RT_SUCCESS(rc))
         {
-           *ppThis = pThis;
+           *ppThis = pUsbIns;
            return rc;
         }
     }
     /* Failure */
     if (pCfg)
         CFGMR3DestroyTree(pCfg);
-    if (pThis)
-        RTMemFree(pThis);
+    if (pUsbIns)
+        RTMemFree(pUsbIns);
     return rc;
 }
 
 
 static void testConstructAndDestruct(RTTEST hTest)
 {
-    PPDMUSBINS pThis;
     RTTestSub(hTest, "simple construction and destruction");
-    int rc = tstMouseConstruct(0, "relative", 1, &pThis);
-    RTTEST_CHECK_RC_OK(hTest, rc);
-    if (pThis)
-        g_UsbHidMou.pfnDestruct(pThis);
+
+    /*
+     * Normal check first.
+     */
+    PPDMUSBINS pUsbIns = NULL;
+    RTTEST_CHECK_RC(hTest, tstMouseConstruct(0, "relative", 1, &pUsbIns), VINF_SUCCESS);
+    if (pUsbIns)
+        g_UsbHidMou.pfnDestruct(pUsbIns);
+
+    /*
+     * Modify the dev hlp version.
+     */
+    static struct
+    {
+        int         rc;
+        uint32_t    uInsVersion;
+        uint32_t    uHlpVersion;
+    } const s_aVersionTests[] =
+    {
+        {  VERR_PDM_USBHLPR3_VERSION_MISMATCH, PDM_USBINS_VERSION, 0 },
+        {  VERR_PDM_USBHLPR3_VERSION_MISMATCH, PDM_USBINS_VERSION, PDM_USBHLP_VERSION - PDM_VERSION_MAKE(0, 1, 0) },
+        {  VERR_PDM_USBHLPR3_VERSION_MISMATCH, PDM_USBINS_VERSION, PDM_USBHLP_VERSION + PDM_VERSION_MAKE(0, 1, 0) },
+        {  VERR_PDM_USBHLPR3_VERSION_MISMATCH, PDM_USBINS_VERSION, PDM_USBHLP_VERSION + PDM_VERSION_MAKE(0, 1, 1) },
+        {  VERR_PDM_USBHLPR3_VERSION_MISMATCH, PDM_USBINS_VERSION, PDM_USBHLP_VERSION + PDM_VERSION_MAKE(1, 0, 0) },
+        {  VERR_PDM_USBHLPR3_VERSION_MISMATCH, PDM_USBINS_VERSION, PDM_USBHLP_VERSION - PDM_VERSION_MAKE(1, 0, 0) },
+        {  VINF_SUCCESS,                       PDM_USBINS_VERSION, PDM_USBHLP_VERSION + PDM_VERSION_MAKE(0, 0, 1) },
+        {  VERR_PDM_USBINS_VERSION_MISMATCH,   PDM_USBINS_VERSION - PDM_VERSION_MAKE(0, 1, 0), PDM_USBHLP_VERSION },
+        {  VERR_PDM_USBINS_VERSION_MISMATCH,   PDM_USBINS_VERSION + PDM_VERSION_MAKE(0, 1, 0), PDM_USBHLP_VERSION },
+        {  VERR_PDM_USBINS_VERSION_MISMATCH,   PDM_USBINS_VERSION + PDM_VERSION_MAKE(0, 1, 1), PDM_USBHLP_VERSION },
+        {  VERR_PDM_USBINS_VERSION_MISMATCH,   PDM_USBINS_VERSION + PDM_VERSION_MAKE(1, 0, 0), PDM_USBHLP_VERSION },
+        {  VERR_PDM_USBINS_VERSION_MISMATCH,   PDM_USBINS_VERSION - PDM_VERSION_MAKE(1, 0, 0), PDM_USBHLP_VERSION },
+        {  VINF_SUCCESS,                       PDM_USBINS_VERSION + PDM_VERSION_MAKE(0, 0, 1), PDM_USBHLP_VERSION },
+        {  VINF_SUCCESS,
+           PDM_USBINS_VERSION + PDM_VERSION_MAKE(0, 0, 1),         PDM_USBHLP_VERSION + PDM_VERSION_MAKE(0, 0, 1) },
+    };
+    bool const fSavedMayPanic = RTAssertSetMayPanic(false);
+    bool const fSavedQuiet    = RTAssertSetQuiet(true);
+    for (unsigned i = 0; i < RT_ELEMENTS(s_aVersionTests); i++)
+    {
+        g_tstUsbHlp.u32Version = g_tstUsbHlp.u32TheEnd = s_aVersionTests[i].uHlpVersion;
+        pUsbIns = NULL;
+        RTTEST_CHECK_RC(hTest, tstMouseConstruct(0, "relative", 1, &pUsbIns, s_aVersionTests[i].uInsVersion),
+                        s_aVersionTests[i].rc);
+    }
+    RTAssertSetMayPanic(fSavedMayPanic);
+    RTAssertSetQuiet(fSavedQuiet);
+
+    g_tstUsbHlp.u32Version = g_tstUsbHlp.u32TheEnd = PDM_USBHLP_VERSION;
 }
 
 
 static void testSendPositionRel(RTTEST hTest)
 {
-    PPDMUSBINS pThis = NULL;
+    PPDMUSBINS pUsbIns = NULL;
     VUSBURB Urb;
     RTTestSub(hTest, "sending a relative position event");
-    int rc = tstMouseConstruct(0, "relative", 1, &pThis);
+    int rc = tstMouseConstruct(0, "relative", 1, &pUsbIns);
     RT_ZERO(Urb);
     if (RT_SUCCESS(rc))
-        rc = g_UsbHidMou.pfnUsbReset(pThis, false);
-    if (RT_SUCCESS(rc) && !s_drvTstMouse.pDrv)
+        rc = g_UsbHidMou.pfnUsbReset(pUsbIns, false);
+    if (RT_SUCCESS(rc) && !g_drvTstMouse.pDrv)
         rc = VERR_PDM_MISSING_INTERFACE;
     RTTEST_CHECK_RC_OK(hTest, rc);
     if (RT_SUCCESS(rc))
     {
-        s_drvTstMouse.pDrv->pfnPutEvent(s_drvTstMouse.pDrv, 123, -16, 1, -1, 3);
+        g_drvTstMouse.pDrv->pfnPutEvent(g_drvTstMouse.pDrv, 123, -16, 1, -1, 3);
         Urb.EndPt = 0x01;
-        rc = g_UsbHidMou.pfnUrbQueue(pThis, &Urb);
+        rc = g_UsbHidMou.pfnUrbQueue(pUsbIns, &Urb);
     }
     if (RT_SUCCESS(rc))
     {
-        PVUSBURB pUrb = g_UsbHidMou.pfnUrbReap(pThis, 0);
+        PVUSBURB pUrb = g_UsbHidMou.pfnUrbReap(pUsbIns, 0);
         if (pUrb)
         {
             if (pUrb == &Urb)
@@ -195,26 +238,26 @@ static void testSendPositionRel(RTTEST hTest)
             rc = VERR_GENERAL_FAILURE;
     }
     RTTEST_CHECK_RC_OK(hTest, rc);
-    if (pThis)
-        g_UsbHidMou.pfnDestruct(pThis);
+    if (pUsbIns)
+        g_UsbHidMou.pfnDestruct(pUsbIns);
 }
 
 
 static void testSendPositionAbs(RTTEST hTest)
 {
-    PPDMUSBINS pThis = NULL;
+    PPDMUSBINS pUsbIns = NULL;
     VUSBURB Urb;
     RTTestSub(hTest, "sending an absolute position event");
-    int rc = tstMouseConstruct(0, "absolute", 1, &pThis);
+    int rc = tstMouseConstruct(0, "absolute", 1, &pUsbIns);
     RT_ZERO(Urb);
     if (RT_SUCCESS(rc))
     {
-        rc = g_UsbHidMou.pfnUsbReset(pThis, false);
+        rc = g_UsbHidMou.pfnUsbReset(pUsbIns, false);
     }
     if (RT_SUCCESS(rc))
     {
-        if (s_drvTstMouse.pDrv)
-            s_drvTstMouse.pDrv->pfnPutEventAbs(s_drvTstMouse.pDrv, 300, 200, 1,
+        if (g_drvTstMouse.pDrv)
+            g_drvTstMouse.pDrv->pfnPutEventAbs(g_drvTstMouse.pDrv, 300, 200, 1,
                                                3, 3);
         else
             rc = VERR_PDM_MISSING_INTERFACE;
@@ -222,11 +265,11 @@ static void testSendPositionAbs(RTTEST hTest)
     if (RT_SUCCESS(rc))
     {
         Urb.EndPt = 0x01;
-        rc = g_UsbHidMou.pfnUrbQueue(pThis, &Urb);
+        rc = g_UsbHidMou.pfnUrbQueue(pUsbIns, &Urb);
     }
     if (RT_SUCCESS(rc))
     {
-        PVUSBURB pUrb = g_UsbHidMou.pfnUrbReap(pThis, 0);
+        PVUSBURB pUrb = g_UsbHidMou.pfnUrbReap(pUsbIns, 0);
         if (pUrb)
         {
             if (pUrb == &Urb)
@@ -245,27 +288,27 @@ static void testSendPositionAbs(RTTEST hTest)
             rc = VERR_GENERAL_FAILURE;
     }
     RTTEST_CHECK_RC_OK(hTest, rc);
-    if (pThis)
-        g_UsbHidMou.pfnDestruct(pThis);
+    if (pUsbIns)
+        g_UsbHidMou.pfnDestruct(pUsbIns);
 }
 
 #if 0
 /** @todo PDM interface was updated. This is not working anymore. */
 static void testSendPositionMT(RTTEST hTest)
 {
-    PPDMUSBINS pThis = NULL;
+    PPDMUSBINS pUsbIns = NULL;
     VUSBURB Urb;
     RTTestSub(hTest, "sending a multi-touch position event");
-    int rc = tstMouseConstruct(0, "multitouch", 1, &pThis);
+    int rc = tstMouseConstruct(0, "multitouch", 1, &pUsbIns);
     RT_ZERO(Urb);
     if (RT_SUCCESS(rc))
     {
-        rc = g_UsbHidMou.pfnUsbReset(pThis, false);
+        rc = g_UsbHidMou.pfnUsbReset(pUsbIns, false);
     }
     if (RT_SUCCESS(rc))
     {
-        if (s_drvTstMouse.pDrv)
-            s_drvTstMouse.pDrv->pfnPutEventMT(s_drvTstMouse.pDrv, 300, 200, 2,
+        if (g_drvTstMouse.pDrv)
+            g_drvTstMouse.pDrv->pfnPutEventMT(g_drvTstMouse.pDrv, 300, 200, 2,
                                               3);
         else
             rc = VERR_PDM_MISSING_INTERFACE;
@@ -273,11 +316,11 @@ static void testSendPositionMT(RTTEST hTest)
     if (RT_SUCCESS(rc))
     {
         Urb.EndPt = 0x01;
-        rc = g_UsbHidMou.pfnUrbQueue(pThis, &Urb);
+        rc = g_UsbHidMou.pfnUrbQueue(pUsbIns, &Urb);
     }
     if (RT_SUCCESS(rc))
     {
-        PVUSBURB pUrb = g_UsbHidMou.pfnUrbReap(pThis, 0);
+        PVUSBURB pUrb = g_UsbHidMou.pfnUrbReap(pUsbIns, 0);
         if (pUrb)
         {
             if (pUrb == &Urb)
@@ -296,8 +339,8 @@ static void testSendPositionMT(RTTEST hTest)
             rc = VERR_GENERAL_FAILURE;
     }
     RTTEST_CHECK_RC_OK(hTest, rc);
-    if (pThis)
-        g_UsbHidMou.pfnDestruct(pThis);
+    if (pUsbIns)
+        g_UsbHidMou.pfnDestruct(pUsbIns);
 }
 #endif
 
@@ -312,11 +355,13 @@ int main()
         return rc;
     RTTestBanner(hTest);
     /* Set up our faked PDMUSBHLP interface. */
-    s_tstUsbHlp.pfnVMSetErrorV  = tstVMSetErrorV;
-    s_tstUsbHlp.pfnDriverAttach = tstDriverAttach;
+    g_tstUsbHlp.u32Version      = PDM_USBHLP_VERSION;
+    g_tstUsbHlp.pfnVMSetErrorV  = tstVMSetErrorV;
+    g_tstUsbHlp.pfnDriverAttach = tstDriverAttach;
+    g_tstUsbHlp.u32TheEnd       = PDM_USBHLP_VERSION;
     /* Set up our global mouse driver */
-    s_drvTstMouse.IBase.pfnQueryInterface = tstMouseQueryInterface;
-    s_drvTstMouse.IConnector.pfnReportModes = tstMouseReportModes;
+    g_drvTstMouse.IBase.pfnQueryInterface = tstMouseQueryInterface;
+    g_drvTstMouse.IConnector.pfnReportModes = tstMouseReportModes;
 
     /*
      * Run the tests.
diff --git a/src/VBox/Devices/Makefile.kmk b/src/VBox/Devices/Makefile.kmk
index a3c5ae6..629d1e2 100644
--- a/src/VBox/Devices/Makefile.kmk
+++ b/src/VBox/Devices/Makefile.kmk
@@ -155,7 +155,7 @@ if !defined(VBOX_ONLY_EXTPACKS)         # Goes on almost to the end of the file.
  	Network/DevPCNet.cpp \
  	PC/DevDMA.cpp \
  	PC/DevHPET.cpp \
- 	$(if $(VBOX_WITH_NEW_IOAPIC),PC/DevIOAPIC_New.cpp,) \
+ 	$(if $(VBOX_WITH_NEW_IOAPIC),PC/DevIoApic.cpp,) \
  	Storage/DevFdc.cpp \
  	Serial/DevSerial.cpp \
  	Parallel/DevParallel.cpp \
@@ -191,7 +191,7 @@ if !defined(VBOX_ONLY_EXTPACKS)         # Goes on almost to the end of the file.
  endif
 
  VBoxDD_SOURCES.darwin += Storage/HBDMgmt-darwin.cpp
- #VBoxDD_SOURCES.win += Storage/HBDMgmt-win.cpp Disabled until remaining issues are sorted out
+ #VBoxDD_SOURCES.win += Storage/HBDMgmt-win.cpp #Disabled until remaining issues are sorted out
 
  VBoxDD_LIBS             = # more later.
  VBoxDD_LDFLAGS.darwin   = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDD.dylib \
@@ -406,18 +406,16 @@ if !defined(VBOX_ONLY_EXTPACKS)         # Goes on almost to the end of the file.
  # --- Networking bits. ---
 
  ifdef VBOX_WITH_INIP
-  VBoxDD_DEFS           += VBOX_WITH_INIP
-  VBoxDD_SOURCES        += \
-        Network/DevINIP.cpp
-  # XXX: do not depend on order
   ifndef LWIP_SOURCES
-    include $(PATH_SUB_CURRENT)/Network/lwip-new/Makefile.kmk
+   include $(PATH_SUB_CURRENT)/Network/lwip-new/Config.kmk
   endif
-  VBoxDD_LWIP_INCS += Network # for lwipopts.h
-  $(eval $(call def_vbox_lwip_private, \
-                    VBoxDD, Network/lwip-new))
-  $(eval $(call def_vbox_lwip_flags, \
-                    VBoxDD, Network/DevINIP.cpp, Network/lwip-new))
+  VBoxDD_DEFS           += VBOX_WITH_INIP
+  VBoxDD_SOURCES        += \
+  	Network/DevINIP.cpp \
+  	$(addprefix Network/lwip-new/,$(LWIP_SOURCES))
+  VBoxDD_INCS           += \
+  	Network \
+  	$(addprefix Network/lwip-new/,$(LWIP_INCS))
  endif # VBOX_WITH_INIP
 
  ifdef VBOX_WITH_E1000
@@ -529,14 +527,6 @@ if !defined(VBOX_ONLY_EXTPACKS)         # Goes on almost to the end of the file.
   VBoxDD_DEFS           += VBOX_WITH_DYNAMIC_DSDT
  endif
 
-
- # --- Input bits. ---
-
- ifdef VBOX_WITH_NEW_PS2M
-  VBoxDD_DEFS           += VBOX_WITH_NEW_PS2M
- endif
-
-
  # --- Audio bits. ---
 
  if 0 # Not stable yet.
@@ -544,70 +534,51 @@ if !defined(VBOX_ONLY_EXTPACKS)         # Goes on almost to the end of the file.
   VBoxDD_DEFS += VBOX_WITH_HDA_51_SURROUND
  endif
 
- VBoxDD_DEFS  += $(if $(VBOX_WITH_AUDIO_50),VBOX_WITH_AUDIO_50,)
-
  VBoxDD_SOURCES         += \
-   $(VBOX_AUDIO_PATH_SOURCES)/DevIchAc97.cpp \
-   $(VBOX_AUDIO_PATH_SOURCES)/DevSB16.cpp \
-   $(VBOX_AUDIO_PATH_SOURCES)/DevIchHda.cpp \
-   $(VBOX_AUDIO_PATH_SOURCES)/DevIchHdaCodec.cpp \
-   $(VBOX_AUDIO_PATH_SOURCES)/AudioMixBuffer.cpp \
-   $(VBOX_AUDIO_PATH_SOURCES)/AudioMixer.cpp \
-   $(VBOX_AUDIO_PATH_SOURCES)/DrvAudio.cpp \
-   $(VBOX_AUDIO_PATH_SOURCES)/DrvAudioCommon.cpp \
-   $(VBOX_AUDIO_PATH_SOURCES)/DrvHostNullAudio.cpp
+	Audio/DevIchAc97.cpp \
+	Audio/DevSB16.cpp \
+	Audio/DevIchHda.cpp \
+	Audio/DevIchHdaCodec.cpp \
+	Audio/AudioMixBuffer.cpp \
+	Audio/AudioMixer.cpp \
+	Audio/DrvAudio.cpp \
+	Audio/DrvAudioCommon.cpp \
+	Audio/DrvHostNullAudio.cpp
+
+ ifdef VBOX_WITH_AUDIO_DEBUG
+  VBoxDD_DEFS    += VBOX_WITH_AUDIO_DEBUG
+  VBoxDD_SOURCES += \
+	Audio/DrvHostDebugAudio.cpp
+ endif
 
  ifeq ($(KBUILD_TARGET),darwin)
   VBoxDD_SOURCES += \
-   $(VBOX_AUDIO_PATH_SOURCES)/DrvHostCoreAudio.cpp
+	Audio/DrvHostCoreAudio.cpp
  endif
 
  ifeq ($(KBUILD_TARGET),win)
   VBoxDD_SOURCES += \
-   $(VBOX_AUDIO_PATH_SOURCES)/DrvHostDSound.cpp
+	Audio/DrvHostDSound.cpp
  endif
 
- ifeq ($(KBUILD_TARGET),linux)
-  ifdef VBOX_WITH_OSS
-   VBoxDD_DEFS    += VBOX_WITH_OSS
-   VBoxDD_SOURCES += \
-        $(VBOX_AUDIO_PATH_SOURCES)/DrvHostOSSAudio.cpp
-  endif
-
-  ifdef VBOX_WITH_PULSE
-   VBoxDD_DEFS    += VBOX_WITH_PULSE
-   VBoxDD_SOURCES += \
-   $(VBOX_AUDIO_PATH_SOURCES)/DrvHostPulseAudio.cpp \
-   $(VBOX_AUDIO_PATH_SOURCES)/pulse_stubs.c
-  endif
-
-  ifdef VBOX_WITH_ALSA
-   VBoxDD_DEFS    += VBOX_WITH_ALSA
-   VBoxDD_SOURCES += \
-   	$(VBOX_AUDIO_PATH_SOURCES)/DrvHostALSAAudio.cpp \
-   	$(VBOX_AUDIO_PATH_SOURCES)/alsa_stubs.c
-  endif
+ ifdef VBOX_WITH_AUDIO_OSS
+  VBoxDD_DEFS    += VBOX_WITH_AUDIO_OSS
+  VBoxDD_SOURCES += \
+	Audio/DrvHostOSSAudio.cpp
  endif
 
- ifeq ($(KBUILD_TARGET),freebsd)
-  ifdef VBOX_WITH_OSS
-   VBoxDD_DEFS    += VBOX_WITH_OSS
-   VBoxDD_SOURCES += \
-    	$(VBOX_AUDIO_PATH_SOURCES)/DrvHostOSSAudio.cpp
-  endif
-  ifdef VBOX_WITH_PULSE
-   VBoxDD_DEFS    += VBOX_WITH_PULSE
-   VBoxDD_SOURCES += \
-   $(VBOX_AUDIO_PATH_SOURCES)/DrvHostPulseAudio.cpp \
-   $(VBOX_AUDIO_PATH_SOURCES)/pulse_stubs.c
-  endif
+ ifdef VBOX_WITH_AUDIO_ALSA
+  VBoxDD_DEFS    += VBOX_WITH_AUDIO_ALSA
+  VBoxDD_SOURCES += \
+	Audio/DrvHostALSAAudio.cpp \
+	Audio/alsa_stubs.c
  endif
 
- ifeq ($(KBUILD_TARGET),solaris)
-  ifdef VBOX_WITH_OSS
-   VBoxDD_SOURCES += $(VBOX_AUDIO_PATH_SOURCES)/DrvHostOSSAudio.cpp
-   VBoxDD_DEFS    += VBOX_WITH_OSS
-  endif
+ ifdef VBOX_WITH_AUDIO_PULSE
+  VBoxDD_DEFS    += VBOX_WITH_AUDIO_PULSE
+  VBoxDD_SOURCES += \
+	Audio/DrvHostPulseAudio.cpp \
+	Audio/pulse_stubs.c
  endif
 
  # --- WARNING! SLIRP MESS AHEAD! ;-) ---
@@ -893,7 +864,7 @@ if !defined(VBOX_ONLY_EXTPACKS)         # Goes on almost to the end of the file.
   	Input/PS2K.cpp \
   	Input/PS2M.cpp \
   	PC/DevACPI.cpp \
-  	$(if $(VBOX_WITH_NEW_IOAPIC),PC/DevIOAPIC_New.cpp,) \
+  	$(if $(VBOX_WITH_NEW_IOAPIC),PC/DevIoApic.cpp,) \
   	PC/DevPit-i8254.cpp \
   	PC/DevPIC.cpp \
   	PC/DevRTC.cpp \
@@ -904,9 +875,8 @@ if !defined(VBOX_ONLY_EXTPACKS)         # Goes on almost to the end of the file.
   	Parallel/DevParallel.cpp \
   	VMMDev/VMMDevTesting.cpp
 
-  VBoxDDRC_DEFS         += $(if $(VBOX_WITH_AUDIO_50),VBOX_WITH_AUDIO_50,)
   VBoxDDRC_SOURCES      += \
- 	$(VBOX_AUDIO_PATH_SOURCES)/DevIchHda.cpp
+ 	Audio/DevIchHda.cpp
 
   ifdef VBOX_WITH_E1000
    VBoxDDRC_DEFS        += VBOX_WITH_E1000
@@ -997,10 +967,6 @@ if !defined(VBOX_ONLY_EXTPACKS)         # Goes on almost to the end of the file.
   	Storage/DevNVMe.cpp
   endif
 
-  ifdef VBOX_WITH_NEW_PS2M
-  VBoxDDRC_DEFS         += VBOX_WITH_NEW_PS2M
-  endif
-
   if1of ($(VBOX_LDR_FMT32), pe lx)
   VBoxDDRC_LIBS           = \
   	$(PATH_STAGE_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB) \
@@ -1015,19 +981,19 @@ if !defined(VBOX_ONLY_EXTPACKS)         # Goes on almost to the end of the file.
  # VBoxDD2 (shared object)
  #
  VBoxDD2_TEMPLATE        = VBoxR3DllWarnNoPic
- VBoxDD2_DEFS            = IN_VBOXDD2
+ VBoxDD2_DEFS            = \
+	IN_VBOXDD2 \
+	$(if $(VBOX_WITH_PXE_ROM),VBOX_WITH_PXE_ROM,) \
+	$(if $(VBOX_WITH_NEW_APIC),VBOX_WITH_NEW_APIC,) \
+	$(if $(VBOX_WITH_NEW_IOAPIC),VBOX_WITH_NEW_IOAPIC,)
  VBoxDD2_INCS           := \
 	build \
  	$(PATH_SUB_CURRENT)
  VBoxDD2_SOURCES         = \
  	build/VBoxDD2.cpp  \
- 	PC/DevLPC.cpp
- ifndef VBOX_WITH_NEW_APIC
-  VBoxDD2_SOURCES += PC/DevAPIC.cpp
- endif
- ifndef VBOX_WITH_NEW_IOAPIC
-  VBoxDD2_SOURCES += PC/DevIoApic.cpp
- endif
+ 	PC/DevLPC.cpp \
+	$(if $(VBOX_WITH_NEW_APIC),,PC/DevAPIC.cpp) \
+	$(if $(VBOX_WITH_NEW_IOAPIC),,PC/DevIoApic_Old.cpp)
  VBoxDD2_LIBS            = \
  	$(PATH_STAGE_LIB)/PcBiosBin$(VBOX_SUFF_LIB) \
  	$(PATH_STAGE_LIB)/VgaBiosBin$(VBOX_SUFF_LIB) \
@@ -1041,16 +1007,6 @@ if !defined(VBOX_ONLY_EXTPACKS)         # Goes on almost to the end of the file.
  VBoxDD2_LDFLAGS.darwin  = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDD2.dylib
  VBoxDD2_LDFLAGS.linux   = -Wl,--no-undefined
 
- ifdef VBOX_WITH_PXE_ROM
-  VBoxDD2_DEFS          += VBOX_WITH_PXE_ROM
- endif
- ifdef VBOX_WITH_NEW_APIC
-  VBoxDD2_DEFS          += VBOX_WITH_NEW_APIC
- endif
- ifdef VBOX_WITH_NEW_IOAPIC
-  VBoxDD2_DEFS          += VBOX_WITH_NEW_IOAPIC
- endif
-
  $(call VBOX_SET_VER_INFO_DLL,VBoxDD2,VirtualBox VMM Devices and Drivers 2) # (last!)
 
  #
@@ -1073,7 +1029,7 @@ if !defined(VBOX_ONLY_EXTPACKS)         # Goes on almost to the end of the file.
  	Input/PS2K.cpp \
  	Input/PS2M.cpp \
  	PC/DevACPI.cpp \
- 	$(if $(VBOX_WITH_NEW_IOAPIC),PC/DevIOAPIC_New.cpp,) \
+ 	$(if $(VBOX_WITH_NEW_IOAPIC),PC/DevIoApic.cpp,) \
  	PC/DevPit-i8254.cpp \
  	PC/DevPIC.cpp \
  	PC/DevRTC.cpp \
@@ -1084,13 +1040,18 @@ if !defined(VBOX_ONLY_EXTPACKS)         # Goes on almost to the end of the file.
  	Parallel/DevParallel.cpp \
  	VMMDev/VMMDevTesting.cpp \
  	Network/DrvIntNet.cpp \
- 	Network/DrvDedicatedNic.cpp
+ 	Network/DrvDedicatedNic.cpp \
+ 	Audio/DevIchHda.cpp
 
  VBoxDDR0_SOURCES.win += Parallel/DrvHostParallel.cpp
 
- VBoxDDR0_DEFS          += $(if $(VBOX_WITH_AUDIO_50),VBOX_WITH_AUDIO_50,)
- VBoxDDR0_SOURCES       += \
- 	$(VBOX_AUDIO_PATH_SOURCES)/DevIchHda.cpp
+ VBoxDDR0_DEFS          += \
+	$(if $(VBOX_WITH_HGSMI),VBOX_WITH_HGSMI,) \
+	$(if $(VBOX_WITH_WDDM),VBOX_WITH_WDDM,) \
+	$(if $(VBOX_WITH_VDMA),VBOX_WITH_VDMA,) \
+	$(if $(VBOX_WITH_CRHGSMI),VBOX_WITH_CRHGSMI,) \
+	$(if $(VBOXWDDM_WITH_VBVA),VBOXWDDM_WITH_VBVA,) \
+	$(if $(VBOX_VDMA_WITH_WATCHDOG),VBOX_VDMA_WITH_WATCHDOG,)
 
  ifdef VBOX_WITH_E1000
   VBoxDDR0_DEFS         += VBOX_WITH_E1000
@@ -1121,25 +1082,6 @@ if !defined(VBOX_ONLY_EXTPACKS)         # Goes on almost to the end of the file.
   VBoxDDR0_DEFS         += VBOX_WITH_VMSVGA3D
  endif
 
- ifdef VBOX_WITH_HGSMI
-  VBoxDDR0_DEFS         += VBOX_WITH_HGSMI
- endif
- ifdef VBOX_WITH_WDDM
-  VBoxDDR0_DEFS         += VBOX_WITH_WDDM
- endif
- ifdef VBOX_WITH_VDMA
-  VBoxDDR0_DEFS         += VBOX_WITH_VDMA
- endif
- ifdef VBOX_WITH_CRHGSMI
-  VBoxDDR0_DEFS         += VBOX_WITH_CRHGSMI
- endif
- ifdef VBOXWDDM_WITH_VBVA
-  VBoxDDR0_DEFS         += VBOXWDDM_WITH_VBVA
- endif
- ifdef VBOX_VDMA_WITH_WATCHDOG
-  VBoxDDR0_DEFS        += VBOX_VDMA_WITH_WATCHDOG
- endif
-
  ifdef VBOX_WITH_VUSB
   VBoxDDR0_DEFS         += VBOX_WITH_VUSB
   VBoxDDR0_SOURCES      += \
@@ -1188,10 +1130,6 @@ if !defined(VBOX_ONLY_EXTPACKS)         # Goes on almost to the end of the file.
  	Storage/DevNVMe.cpp
  endif
 
- ifdef VBOX_WITH_NEW_PS2M
-  VBoxDDR0_DEFS         += VBOX_WITH_NEW_PS2M
- endif
-
  ifdef VBOX_WITH_HGSMI
   VBoxDDR0_DEFS         += VBOX_WITH_HGSMI
  endif
@@ -1215,8 +1153,9 @@ if !defined(VBOX_ONLY_EXTPACKS)         # Goes on almost to the end of the file.
   VBoxDD2RC_TEMPLATE       = VBoxRc
   VBoxDD2RC_INCS           = build
   VBoxDD2RC_SOURCES        = \
-   	PC/DevIoApic.cpp \
-   	$(if $(VBOX_WITH_NEW_APIC),,PC/DevAPIC.cpp)
+ 	$(if $(VBOX_WITH_NEW_IOAPIC),,PC/DevIoApic_Old.cpp) \
+   	$(if $(VBOX_WITH_NEW_APIC),,PC/DevAPIC.cpp) \
+ 	build/VBoxDD2R0.cpp # Dummy to prevent linking errors.
   if1of ($(VBOX_LDR_FMT32), pe lx)
    VBoxDD2RC_LIBS          = \
    	$(PATH_STAGE_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB) \
@@ -1234,7 +1173,7 @@ if !defined(VBOX_ONLY_EXTPACKS)         # Goes on almost to the end of the file.
  VBoxDD2R0_INCS           = build
  VBoxDD2R0_SOURCES        = \
  	build/VBoxDD2R0.cpp \
- 	$(if $(VBOX_WITH_NEW_IOAPIC),,PC/DevIoApic.cpp) \
+ 	$(if $(VBOX_WITH_NEW_IOAPIC),,PC/DevIoApic_Old.cpp) \
  	$(if $(VBOX_WITH_NEW_APIC),,PC/DevAPIC.cpp)
  if1of ($(VBOX_LDR_FMT), pe lx)
   VBoxDD2R0_LIBS          = \
@@ -1511,6 +1450,14 @@ if defined(VBOX_WITH_VMSVGA3D) && !defined(VBOX_ONLY_EXTPACKS)
  VBoxSVGA3D_LDFLAGS.darwin += \
  	-install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSVGA3D.dylib
  $(call VBOX_SET_VER_INFO_DLL,VBoxSVGA3D,VirtualBox VMSVGA 3D)
+ #  -wd4100: unreferenced format parameter
+ #  -wd4204: nonstandard extension used : non-constant initializer
+ #  -wd4245: '=' : conversion from 'int' to 'DWORD', signed/unsigned mismatch
+ #  -wd4305: 'function' : truncation from 'double' to 'GLclampf'
+ VBoxSVGA3D_CFLAGS.win = -wd4100  -wd4204 -wd4245 -wd4305
+ ifneq ($(KBUILD_TARGET),win)
+  VBoxSVGA3D_CFLAGS   += -Wno-unused-parameter -Wno-unused-function
+ endif
 
  #
  # The Objective C code needs to be separate since the shaderlib redefines most
@@ -1540,7 +1487,6 @@ if defined(VBOX_WITH_VMSVGA3D) && !defined(VBOX_ONLY_EXTPACKS)
  endif
 
 
-
 endif # defined(VBOX_WITH_VMSVGA3D) && !defined(VBOX_ONLY_EXTPACKS)
 
 include $(FILE_KBUILD_SUB_FOOTER)
diff --git a/src/VBox/Devices/Misc/VirtualKD.cpp b/src/VBox/Devices/Misc/VirtualKD.cpp
index 2bcd728..5c13904 100644
--- a/src/VBox/Devices/Misc/VirtualKD.cpp
+++ b/src/VBox/Devices/Misc/VirtualKD.cpp
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -22,8 +22,9 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
-#define LOG_GROUP LOG_GROUP_DEV_VIRTUALKD
+#define LOG_GROUP LOG_GROUP_DEV // LOG_GROUP_DEV_VIRTUALKD
 #include <VBox/vmm/pdmdev.h>
+#include <VBox/log.h>
 #include <iprt/assert.h>
 #include <iprt/path.h>
 
@@ -82,6 +83,7 @@ typedef struct VIRTUALKD
 
 static DECLCALLBACK(int) vkdPortRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb)
 {
+    RT_NOREF(pvUser, Port, cb);
     VIRTUALKD *pThis = PDMINS_2_DATA(pDevIns, VIRTUALKD *);
 
     if (pThis->fOpenChannelDetected)
@@ -91,13 +93,14 @@ static DECLCALLBACK(int) vkdPortRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT
         pThis->fChannelDetectSuccessful = true;
     }
     else
-        *pu32 = -1;
+        *pu32 = UINT32_MAX;
 
     return VINF_SUCCESS;
 }
 
 static DECLCALLBACK(int) vkdPortWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb)
 {
+    RT_NOREF(pvUser, cb);
     VIRTUALKD *pThis = PDMINS_2_DATA(pDevIns, VIRTUALKD *);
 
     if (Port == 0x5659)
@@ -146,10 +149,28 @@ static DECLCALLBACK(int) vkdPortWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT
 
 
 /**
+ * @interface_method_impl{PDMDEVREG,pfnDestruct}
+ */
+static DECLCALLBACK(int) vkdDestruct(PPDMDEVINS pDevIns)
+{
+    PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
+    VIRTUALKD *pThis = PDMINS_2_DATA(pDevIns, VIRTUALKD *);
+
+    delete pThis->pKDClient;
+    if (pThis->hLib != NIL_RTLDRMOD)
+        RTLdrClose(pThis->hLib);
+
+    return VINF_SUCCESS;
+}
+
+
+/**
  * @interface_method_impl{PDMDEVREG,pfnConstruct}
  */
 static DECLCALLBACK(int) vkdConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
 {
+    RT_NOREF(iInstance);
+    PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
     VIRTUALKD *pThis = PDMINS_2_DATA(pDevIns, VIRTUALKD *);
 
     pThis->fOpenChannelDetected = false;
@@ -167,13 +188,7 @@ static DECLCALLBACK(int) vkdConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNO
     char szPath[RTPATH_MAX] = "";
     CFGMR3QueryString(pCfg, "Path", szPath, sizeof(szPath));
 
-    RTPathAppend(szPath, sizeof(szPath),
-#if HC_ARCH_BITS == 64
-        "kdclient64.dll"
-#else
-        "kdclient.dll"
-#endif
-        );
+    RTPathAppend(szPath, sizeof(szPath), HC_ARCH_BITS == 64 ?  "kdclient64.dll" : "kdclient.dll");
     int rc = RTLdrLoad(szPath, &pThis->hLib);
     if (RT_FAILURE(rc))
     {
@@ -208,19 +223,6 @@ static DECLCALLBACK(int) vkdConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNO
     return VINF_SUCCESS;
 }
 
-/**
- * @interface_method_impl{PDMDEVREG,pfnDestruct}
- */
-static DECLCALLBACK(int) vkdDestruct(PPDMDEVINS pDevIns)
-{
-    VIRTUALKD *pThis = PDMINS_2_DATA(pDevIns, VIRTUALKD *);
-
-    delete pThis->pKDClient;
-    if (pThis->hLib != NIL_RTLDRMOD)
-        RTLdrClose(pThis->hLib);
-
-    return VINF_SUCCESS;
-}
 
 /**
  * The device registration structure.
@@ -276,3 +278,4 @@ const PDMDEVREG g_DeviceVirtualKD =
     /* u32VersionEnd */
     PDM_DEVREG_VERSION
 };
+
diff --git a/src/VBox/Devices/Network/DevE1000.cpp b/src/VBox/Devices/Network/DevE1000.cpp
index b3d2c7b..7dc04bf 100644
--- a/src/VBox/Devices/Network/DevE1000.cpp
+++ b/src/VBox/Devices/Network/DevE1000.cpp
@@ -14,7 +14,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -217,6 +217,7 @@ typedef uint32_t E1KCHIP;
 #define E1K_CHIP_82543GC 1
 #define E1K_CHIP_82545EM 2
 
+#ifdef IN_RING3
 /** Different E1000 chips. */
 static const struct E1kChips
 {
@@ -225,20 +226,21 @@ static const struct E1kChips
     uint16_t uPCISubsystemVendorId;
     uint16_t uPCISubsystemId;
     const char *pcszName;
-} g_Chips[] =
+} g_aChips[] =
 {
     /* Vendor Device SSVendor SubSys  Name */
     { 0x8086,
       /* Temporary code, as MSI-aware driver dislike 0x100E. How to do that right? */
-#ifdef E1K_WITH_MSI
+# ifdef E1K_WITH_MSI
       0x105E,
-#else
+# else
       0x100E,
-#endif
+# endif
                       0x8086, 0x001E, "82540EM" }, /* Intel 82540EM-A in Intel PRO/1000 MT Desktop */
     { 0x8086, 0x1004, 0x8086, 0x1004, "82543GC" }, /* Intel 82543GC   in Intel PRO/1000 T  Server */
     { 0x8086, 0x100F, 0x15AD, 0x0750, "82545EM" }  /* Intel 82545EM-A in VMWare Network Adapter */
 };
+#endif /* IN_RING3 */
 
 
 /* The size of register area mapped to I/O space */
@@ -1551,6 +1553,7 @@ DECLINLINE(void) e1kArmTimer(PE1KSTATE pThis, PTMTIMER pTimer, uint32_t uExpireI
     TMTimerSetMicro(pTimer, uExpireIn);
 }
 
+#ifdef IN_RING3
 /**
  * Cancel a timer.
  *
@@ -1563,11 +1566,11 @@ DECLINLINE(void) e1kCancelTimer(PE1KSTATE pThis, PTMTIMER pTimer)
             pThis->szPrf, e1kGetTimerName(pThis, pTimer)));
     int rc = TMTimerStop(pTimer);
     if (RT_FAILURE(rc))
-    {
         E1kLog2(("%s e1kCancelTimer: TMTimerStop() failed with %Rrc\n",
                 pThis->szPrf, rc));
-    }
+    RT_NOREF1(pThis);
 }
+#endif /* IN_RING3 */
 
 #define e1kCsEnter(ps, rc) PDMCritSectEnter(&ps->cs, rc)
 #define e1kCsLeave(ps) PDMCritSectLeave(&ps->cs)
@@ -1657,7 +1660,7 @@ static void e1kHardReset(PE1KSTATE pThis)
  * @param   pThis       The device state structure.
  * @param   cpPacket    The packet.
  * @param   cb          The size of the packet.
- * @param   cszText     A string denoting direction of packet transfer.
+ * @param   pszText     A string denoting direction of packet transfer.
  *
  * @return  The 1's complement of the 1's complement sum.
  *
@@ -1686,16 +1689,16 @@ static uint16_t e1kCSum16(const void *pvBuf, size_t cb)
  * @param   pThis       The device state structure.
  * @param   cpPacket    The packet.
  * @param   cb          The size of the packet.
- * @param   cszText     A string denoting direction of packet transfer.
+ * @param   pszText     A string denoting direction of packet transfer.
  * @thread  E1000_TX
  */
-DECLINLINE(void) e1kPacketDump(PE1KSTATE pThis, const uint8_t *cpPacket, size_t cb, const char *cszText)
+DECLINLINE(void) e1kPacketDump(PE1KSTATE pThis, const uint8_t *cpPacket, size_t cb, const char *pszText)
 {
 #ifdef DEBUG
     if (RT_LIKELY(e1kCsEnter(pThis, VERR_SEM_BUSY) == VINF_SUCCESS))
     {
         Log4(("%s --- %s packet #%d: %RTmac => %RTmac (%d bytes) ---\n",
-                pThis->szPrf, cszText, ++pThis->u32PktNo, cpPacket+6, cpPacket, cb));
+                pThis->szPrf, pszText, ++pThis->u32PktNo, cpPacket+6, cpPacket, cb));
         if (ntohs(*(uint16_t*)(cpPacket+12)) == 0x86DD)
         {
             Log4(("%s --- IPv6: %RTnaipv6 => %RTnaipv6\n",
@@ -1720,15 +1723,16 @@ DECLINLINE(void) e1kPacketDump(PE1KSTATE pThis, const uint8_t *cpPacket, size_t
     {
         if (ntohs(*(uint16_t*)(cpPacket+12)) == 0x86DD)
             E1kLogRel(("E1000: %s packet #%d, %RTmac => %RTmac, %RTnaipv6 => %RTnaipv6, seq=%x ack=%x\n",
-                       cszText, ++pThis->u32PktNo, cpPacket+6, cpPacket, cpPacket+14+8, cpPacket+14+24,
+                       pszText, ++pThis->u32PktNo, cpPacket+6, cpPacket, cpPacket+14+8, cpPacket+14+24,
                        ntohl(*(uint32_t*)(cpPacket+14+40+4)), ntohl(*(uint32_t*)(cpPacket+14+40+8))));
         else
             E1kLogRel(("E1000: %s packet #%d, %RTmac => %RTmac, %RTnaipv4 => %RTnaipv4, seq=%x ack=%x\n",
-                       cszText, ++pThis->u32PktNo, cpPacket+6, cpPacket,
+                       pszText, ++pThis->u32PktNo, cpPacket+6, cpPacket,
                        *(uint32_t*)(cpPacket+14+12), *(uint32_t*)(cpPacket+14+16),
                        ntohl(*(uint32_t*)(cpPacket+14+20+4)), ntohl(*(uint32_t*)(cpPacket+14+20+8))));
         e1kCsLeave(pThis);
     }
+    RT_NOREF2(cb, pszText);
 #endif
 }
 
@@ -1740,13 +1744,15 @@ DECLINLINE(void) e1kPacketDump(PE1KSTATE pThis, const uint8_t *cpPacket, size_t
  * @param   pDesc       Pointer to descriptor union.
  * @thread  E1000_TX
  */
-DECLINLINE(int) e1kGetDescType(E1KTXDESC* pDesc)
+DECLINLINE(int) e1kGetDescType(E1KTXDESC *pDesc)
 {
     if (pDesc->legacy.cmd.fDEXT)
         return pDesc->context.dw2.u4DTYP;
     return E1K_DTYP_LEGACY;
 }
 
+
+#if defined(E1K_WITH_RXD_CACHE) && defined(IN_RING3) /* currently only used in ring-3 due to stack space requirements of the caller */
 /**
  * Dump receive descriptor to debug log.
  *
@@ -1754,8 +1760,9 @@ DECLINLINE(int) e1kGetDescType(E1KTXDESC* pDesc)
  * @param   pDesc       Pointer to the descriptor.
  * @thread  E1000_RX
  */
-static void e1kPrintRDesc(PE1KSTATE pThis, E1KRXDESC* pDesc)
+static void e1kPrintRDesc(PE1KSTATE pThis, E1KRXDESC *pDesc)
 {
+    RT_NOREF2(pThis, pDesc);
     E1kLog2(("%s <-- Receive Descriptor (%d bytes):\n", pThis->szPrf, pDesc->u16Length));
     E1kLog2(("        Address=%16LX Length=%04X Csum=%04X\n",
              pDesc->u64BufAddr, pDesc->u16Length, pDesc->u16Checksum));
@@ -1775,18 +1782,21 @@ static void e1kPrintRDesc(PE1KSTATE pThis, E1KRXDESC* pDesc)
              E1K_SPEC_VLAN(pDesc->status.u16Special),
              E1K_SPEC_PRI(pDesc->status.u16Special)));
 }
+#endif /* E1K_WITH_RXD_CACHE && IN_RING3 */
 
 /**
  * Dump transmit descriptor to debug log.
  *
  * @param   pThis       The device state structure.
  * @param   pDesc       Pointer to descriptor union.
- * @param   cszDir      A string denoting direction of descriptor transfer
+ * @param   pszDir      A string denoting direction of descriptor transfer
  * @thread  E1000_TX
  */
-static void e1kPrintTDesc(PE1KSTATE pThis, E1KTXDESC* pDesc, const char* cszDir,
+static void e1kPrintTDesc(PE1KSTATE pThis, E1KTXDESC *pDesc, const char *pszDir,
                           unsigned uLevel = RTLOGGRPFLAGS_LEVEL_2)
 {
+    RT_NOREF4(pThis, pDesc, pszDir, uLevel);
+
     /*
      * Unfortunately we cannot use our format handler here, we want R0 logging
      * as well.
@@ -1795,7 +1805,7 @@ static void e1kPrintTDesc(PE1KSTATE pThis, E1KTXDESC* pDesc, const char* cszDir,
     {
         case E1K_DTYP_CONTEXT:
             E1kLogX(uLevel, ("%s %s Context Transmit Descriptor %s\n",
-                    pThis->szPrf, cszDir, cszDir));
+                    pThis->szPrf, pszDir, pszDir));
             E1kLogX(uLevel, ("        IPCSS=%02X IPCSO=%02X IPCSE=%04X TUCSS=%02X TUCSO=%02X TUCSE=%04X\n",
                     pDesc->context.ip.u8CSS, pDesc->context.ip.u8CSO, pDesc->context.ip.u16CSE,
                     pDesc->context.tu.u8CSS, pDesc->context.tu.u8CSO, pDesc->context.tu.u16CSE));
@@ -1812,7 +1822,7 @@ static void e1kPrintTDesc(PE1KSTATE pThis, E1KTXDESC* pDesc, const char* cszDir,
             break;
         case E1K_DTYP_DATA:
             E1kLogX(uLevel, ("%s %s Data Transmit Descriptor (%d bytes) %s\n",
-                    pThis->szPrf, cszDir, pDesc->data.cmd.u20DTALEN, cszDir));
+                    pThis->szPrf, pszDir, pDesc->data.cmd.u20DTALEN, pszDir));
             E1kLogX(uLevel, ("        Address=%16LX DTALEN=%05X\n",
                     pDesc->data.u64BufAddr,
                     pDesc->data.cmd.u20DTALEN));
@@ -1835,7 +1845,7 @@ static void e1kPrintTDesc(PE1KSTATE pThis, E1KTXDESC* pDesc, const char* cszDir,
             break;
         case E1K_DTYP_LEGACY:
             E1kLogX(uLevel, ("%s %s Legacy Transmit Descriptor (%d bytes) %s\n",
-                    pThis->szPrf, cszDir, pDesc->legacy.cmd.u16Length, cszDir));
+                    pThis->szPrf, pszDir, pDesc->legacy.cmd.u16Length, pszDir));
             E1kLogX(uLevel, ("        Address=%16LX DTALEN=%05X\n",
                     pDesc->data.u64BufAddr,
                     pDesc->legacy.cmd.u16Length));
@@ -1858,7 +1868,7 @@ static void e1kPrintTDesc(PE1KSTATE pThis, E1KTXDESC* pDesc, const char* cszDir,
             break;
         default:
             E1kLog(("%s %s Invalid Transmit Descriptor %s\n",
-                    pThis->szPrf, cszDir, cszDir));
+                    pThis->szPrf, pszDir, pszDir));
             break;
     }
 }
@@ -1950,6 +1960,7 @@ DECLINLINE(RTGCPHYS) e1kDescAddr(uint32_t baseHigh, uint32_t baseLow, uint32_t i
     return ((uint64_t)baseHigh << 32) + baseLow + idxDesc * sizeof(E1KRXDESC);
 }
 
+#ifdef IN_RING3 /* currently only used in ring-3 due to stack space requirements of the caller */
 /**
  * Advance the head pointer of the receive descriptor queue.
  *
@@ -1988,8 +1999,10 @@ DECLINLINE(void) e1kAdvanceRDH(PE1KSTATE pThis)
              pThis->szPrf, RDH, RDT, uRQueueLen));
     //e1kCsLeave(pThis);
 }
+#endif /* IN_RING3 */
 
 #ifdef E1K_WITH_RXD_CACHE
+
 /**
  * Return the number of RX descriptor that belong to the hardware.
  *
@@ -2083,6 +2096,8 @@ DECLINLINE(unsigned) e1kRxDPrefetch(PE1KSTATE pThis)
     return nDescsToFetch;
 }
 
+# ifdef IN_RING3 /* currently only used in ring-3 due to stack space requirements of the caller */
+
 /**
  * Obtain the next RX descriptor from RXD cache, fetching descriptors from the
  * RX ring if the cache is empty.
@@ -2108,6 +2123,7 @@ DECLINLINE(E1KRXDESC*) e1kRxDGet(PE1KSTATE pThis)
     return NULL;
 }
 
+
 /**
  * Return the RX descriptor obtained with e1kRxDGet() and advance the cache
  * pointer. The descriptor gets written back to the RXD ring.
@@ -2150,6 +2166,8 @@ static DECLCALLBACK(void) e1kStoreRxFragment(PE1KSTATE pThis, E1KRXDESC *pDesc,
     STAM_PROFILE_ADV_STOP(&pThis->StatReceiveStore, a);
 }
 
+# endif
+
 #else /* !E1K_WITH_RXD_CACHE */
 
 /**
@@ -2200,6 +2218,7 @@ static DECLCALLBACK(void) e1kStoreRxFragment(PE1KSTATE pThis, E1KRXDESC *pDesc,
     }
     STAM_PROFILE_ADV_STOP(&pThis->StatReceiveStore, a);
 }
+
 #endif /* !E1K_WITH_RXD_CACHE */
 
 /**
@@ -2226,6 +2245,7 @@ DECLINLINE(bool) e1kIsMulticast(const void *pvBuf)
     return (*(char*)pvBuf) & 1;
 }
 
+#ifdef IN_RING3 /* currently only used in ring-3 due to stack space requirements of the caller */
 /**
  * Set IXSM, IPCS and TCPCS flags according to the packet type.
  *
@@ -2245,7 +2265,7 @@ static int e1kRxChecksumOffload(PE1KSTATE pThis, const uint8_t *pFrame, size_t c
      * coming from so we tell the driver to ignore our checksum flags
      * and do verification in software.
      */
-#if 0
+# if 0
     uint16_t uEtherType = ntohs(*(uint16_t*)(pFrame + 12));
 
     E1kLog2(("%s e1kRxChecksumOffload: EtherType=%x\n", pThis->szPrf, uEtherType));
@@ -2270,11 +2290,13 @@ static int e1kRxChecksumOffload(PE1KSTATE pThis, const uint8_t *pFrame, size_t c
             pStatus->fIXSM = true;
             break;
     }
-#else
+# else
     pStatus->fIXSM = true;
-#endif
+    RT_NOREF_PV(pThis); RT_NOREF_PV(pFrame); RT_NOREF_PV(cb);
+# endif
     return VINF_SUCCESS;
 }
+#endif /* IN_RING3 */
 
 /**
  * Pad and store received packet.
@@ -2371,7 +2393,7 @@ static int e1kHandleRxPacket(PE1KSTATE pThis, const void *pvBuf, size_t cb, E1KR
 
     E1K_INC_ISTAT_CNT(pThis->uStatRxFrm);
 
-#ifdef E1K_WITH_RXD_CACHE
+# ifdef E1K_WITH_RXD_CACHE
     while (cb > 0)
     {
         E1KRXDESC *pDesc = e1kRxDGet(pThis);
@@ -2383,7 +2405,7 @@ static int e1kHandleRxPacket(PE1KSTATE pThis, const void *pvBuf, size_t cb, E1KR
                     pThis->szPrf, cb, e1kRxDInCache(pThis), RDH, RDT));
             break;
         }
-#else /* !E1K_WITH_RXD_CACHE */
+# else /* !E1K_WITH_RXD_CACHE */
     if (RDH == RDT)
     {
         E1kLog(("%s Out of receive buffers, dropping the packet\n",
@@ -2396,7 +2418,7 @@ static int e1kHandleRxPacket(PE1KSTATE pThis, const void *pvBuf, size_t cb, E1KR
         E1KRXDESC desc, *pDesc = &desc;
         PDMDevHlpPhysRead(pThis->CTX_SUFF(pDevIns), e1kDescAddr(RDBAH, RDBAL, RDH),
                           &desc, sizeof(desc));
-#endif /* !E1K_WITH_RXD_CACHE */
+# endif /* !E1K_WITH_RXD_CACHE */
         if (pDesc->u64BufAddr)
         {
             /* Update descriptor */
@@ -2428,26 +2450,26 @@ static int e1kHandleRxPacket(PE1KSTATE pThis, const void *pvBuf, size_t cb, E1KR
                 pDesc->status.fEOP = true;
                 e1kCsRxLeave(pThis);
                 e1kStoreRxFragment(pThis, pDesc, ptr, cb);
-#ifdef E1K_WITH_RXD_CACHE
+# ifdef E1K_WITH_RXD_CACHE
                 rc = e1kCsRxEnter(pThis, VERR_SEM_BUSY);
                 if (RT_UNLIKELY(rc != VINF_SUCCESS))
                     return rc;
                 cb = 0;
-#else /* !E1K_WITH_RXD_CACHE */
+# else /* !E1K_WITH_RXD_CACHE */
                 pThis->led.Actual.s.fReading = 0;
                 return VINF_SUCCESS;
-#endif /* !E1K_WITH_RXD_CACHE */
+# endif /* !E1K_WITH_RXD_CACHE */
             }
             /*
              * Note: RDH is advanced by e1kStoreRxFragment if E1K_WITH_RXD_CACHE
              * is not defined.
              */
         }
-#ifdef E1K_WITH_RXD_CACHE
+# ifdef E1K_WITH_RXD_CACHE
         /* Write back the descriptor. */
         pDesc->status.fDD = true;
         e1kRxDPut(pThis, pDesc);
-#else /* !E1K_WITH_RXD_CACHE */
+# else /* !E1K_WITH_RXD_CACHE */
         else
         {
             /* Write back the descriptor. */
@@ -2457,7 +2479,7 @@ static int e1kHandleRxPacket(PE1KSTATE pThis, const void *pvBuf, size_t cb, E1KR
                                   pDesc, sizeof(E1KRXDESC));
             e1kAdvanceRDH(pThis);
         }
-#endif /* !E1K_WITH_RXD_CACHE */
+# endif /* !E1K_WITH_RXD_CACHE */
     }
 
     if (cb > 0)
@@ -2466,9 +2488,9 @@ static int e1kHandleRxPacket(PE1KSTATE pThis, const void *pvBuf, size_t cb, E1KR
     pThis->led.Actual.s.fReading = 0;
 
     e1kCsRxLeave(pThis);
-#ifdef E1K_WITH_RXD_CACHE
+# ifdef E1K_WITH_RXD_CACHE
     /* Complete packet has been stored -- it is time to let the guest know. */
-# ifdef E1K_USE_RX_TIMERS
+#  ifdef E1K_USE_RX_TIMERS
     if (RDTR)
     {
         /* Arm the timer to fire in RDTR usec (discard .024) */
@@ -2479,19 +2501,20 @@ static int e1kHandleRxPacket(PE1KSTATE pThis, const void *pvBuf, size_t cb, E1KR
     }
     else
     {
-# endif /* E1K_USE_RX_TIMERS */
+#  endif /* E1K_USE_RX_TIMERS */
         /* 0 delay means immediate interrupt */
         E1K_INC_ISTAT_CNT(pThis->uStatIntRx);
         e1kRaiseInterrupt(pThis, VERR_SEM_BUSY, ICR_RXT0);
-# ifdef E1K_USE_RX_TIMERS
+#  ifdef E1K_USE_RX_TIMERS
     }
-# endif /* E1K_USE_RX_TIMERS */
-#endif /* E1K_WITH_RXD_CACHE */
+#  endif /* E1K_USE_RX_TIMERS */
+# endif /* E1K_WITH_RXD_CACHE */
 
     return VINF_SUCCESS;
-#else
+#else  /* !IN_RING3 */
+    RT_NOREF_PV(pThis); RT_NOREF_PV(pvBuf); RT_NOREF_PV(cb); RT_NOREF_PV(status);
     return VERR_INTERNAL_ERROR_2;
-#endif
+#endif /* !IN_RING3 */
 }
 
 
@@ -2683,6 +2706,7 @@ static int e1kRegWriteCTRL(PE1KSTATE pThis, uint32_t offset, uint32_t index, uin
  */
 static int e1kRegWriteEECD(PE1KSTATE pThis, uint32_t offset, uint32_t index, uint32_t value)
 {
+    RT_NOREF(offset, index);
 #ifdef IN_RING3
     /* So far we are concerned with lower byte only */
     if ((EECD & EECD_EE_GNT) || pThis->eChip == E1K_CHIP_82543GC)
@@ -2701,6 +2725,7 @@ static int e1kRegWriteEECD(PE1KSTATE pThis, uint32_t offset, uint32_t index, uin
 
     return VINF_SUCCESS;
 #else /* !IN_RING3 */
+    RT_NOREF(pThis, value);
     return VINF_IOM_R3_MMIO_WRITE;
 #endif /* !IN_RING3 */
 }
@@ -2738,6 +2763,7 @@ static int e1kRegReadEECD(PE1KSTATE pThis, uint32_t offset, uint32_t index, uint
 
     return rc;
 #else /* !IN_RING3 */
+    RT_NOREF_PV(pThis); RT_NOREF_PV(offset); RT_NOREF_PV(index); RT_NOREF_PV(pu32Value);
     return VINF_IOM_R3_MMIO_READ;
 #endif /* !IN_RING3 */
 }
@@ -2773,6 +2799,7 @@ static int e1kRegWriteEERD(PE1KSTATE pThis, uint32_t offset, uint32_t index, uin
 
     return VINF_SUCCESS;
 #else /* !IN_RING3 */
+    RT_NOREF_PV(pThis); RT_NOREF_PV(offset); RT_NOREF_PV(index); RT_NOREF_PV(value);
     return VINF_IOM_R3_MMIO_WRITE;
 #endif /* !IN_RING3 */
 }
@@ -2846,6 +2873,7 @@ static int e1kRegWriteICR(PE1KSTATE pThis, uint32_t offset, uint32_t index, uint
 {
     ICR &= ~value;
 
+    RT_NOREF_PV(pThis); RT_NOREF_PV(offset); RT_NOREF_PV(index);
     return VINF_SUCCESS;
 }
 
@@ -2929,6 +2957,7 @@ static int e1kRegReadICR(PE1KSTATE pThis, uint32_t offset, uint32_t index, uint3
  */
 static int e1kRegWriteICS(PE1KSTATE pThis, uint32_t offset, uint32_t index, uint32_t value)
 {
+    RT_NOREF_PV(offset); RT_NOREF_PV(index);
     E1K_INC_ISTAT_CNT(pThis->uStatIntICS);
     return e1kRaiseInterrupt(pThis, VINF_IOM_R3_MMIO_WRITE, value & g_aE1kRegMap[ICS_IDX].writable);
 }
@@ -2947,6 +2976,8 @@ static int e1kRegWriteICS(PE1KSTATE pThis, uint32_t offset, uint32_t index, uint
  */
 static int e1kRegWriteIMS(PE1KSTATE pThis, uint32_t offset, uint32_t index, uint32_t value)
 {
+    RT_NOREF_PV(offset); RT_NOREF_PV(index);
+
     IMS |= value;
     E1kLogRel(("E1000: irq enabled, RDH=%x RDT=%x TDH=%x TDT=%x\n", RDH, RDT, TDH, TDT));
     E1kLog(("%s e1kRegWriteIMS: IRQ enabled\n", pThis->szPrf));
@@ -2969,6 +3000,8 @@ static int e1kRegWriteIMS(PE1KSTATE pThis, uint32_t offset, uint32_t index, uint
  */
 static int e1kRegWriteIMC(PE1KSTATE pThis, uint32_t offset, uint32_t index, uint32_t value)
 {
+    RT_NOREF_PV(offset); RT_NOREF_PV(index);
+
     int rc = e1kCsEnter(pThis, VINF_IOM_R3_MMIO_WRITE);
     if (RT_UNLIKELY(rc != VINF_SUCCESS))
         return rc;
@@ -3176,8 +3209,8 @@ DECLINLINE(uint32_t) e1kGetTxLen(PE1KSTATE pThis)
 }
 
 #ifdef IN_RING3
-#ifdef E1K_TX_DELAY
 
+# ifdef E1K_TX_DELAY
 /**
  * Transmit Delay Timer handler.
  *
@@ -3194,17 +3227,17 @@ static DECLCALLBACK(void) e1kTxDelayTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, v
     Assert(PDMCritSectIsOwner(&pThis->csTx));
 
     E1K_INC_ISTAT_CNT(pThis->uStatTxDelayExp);
-#ifdef E1K_INT_STATS
+#  ifdef E1K_INT_STATS
     uint64_t u64Elapsed = RTTimeNanoTS() - pThis->u64ArmedAt;
     if (u64Elapsed > pThis->uStatMaxTxDelay)
         pThis->uStatMaxTxDelay = u64Elapsed;
-#endif
+#  endif
     int rc = e1kXmitPending(pThis, false /*fOnWorkerThread*/);
     AssertMsg(RT_SUCCESS(rc) || rc == VERR_TRY_AGAIN, ("%Rrc\n", rc));
 }
-#endif /* E1K_TX_DELAY */
+# endif /* E1K_TX_DELAY */
 
-#ifdef E1K_USE_TX_TIMERS
+# ifdef E1K_USE_TX_TIMERS
 
 /**
  * Transmit Interrupt Delay Timer handler.
@@ -3222,9 +3255,9 @@ static DECLCALLBACK(void) e1kTxIntDelayTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer
 
     E1K_INC_ISTAT_CNT(pThis->uStatTID);
     /* Cancel absolute delay timer as we have already got attention */
-#ifndef E1K_NO_TAD
+#  ifndef E1K_NO_TAD
     e1kCancelTimer(pThis, pThis->CTX_SUFF(pTADTimer));
-#endif /* E1K_NO_TAD */
+#  endif
     e1kRaiseInterrupt(pThis, ICR_TXDW);
 }
 
@@ -3248,8 +3281,8 @@ static DECLCALLBACK(void) e1kTxAbsDelayTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer
     e1kRaiseInterrupt(pThis, ICR_TXDW);
 }
 
-#endif /* E1K_USE_TX_TIMERS */
-#ifdef E1K_USE_RX_TIMERS
+# endif /* E1K_USE_TX_TIMERS */
+# ifdef E1K_USE_RX_TIMERS
 
 /**
  * Receive Interrupt Delay Timer handler.
@@ -3291,7 +3324,7 @@ static DECLCALLBACK(void) e1kRxAbsDelayTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer
     e1kRaiseInterrupt(pThis, ICR_RXT0);
 }
 
-#endif /* E1K_USE_RX_TIMERS */
+# endif /* E1K_USE_RX_TIMERS */
 
 /**
  * Late Interrupt Timer handler.
@@ -3303,15 +3336,16 @@ static DECLCALLBACK(void) e1kRxAbsDelayTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer
  */
 static DECLCALLBACK(void) e1kLateIntTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
 {
+    RT_NOREF(pDevIns, pTimer);
     PE1KSTATE pThis = (PE1KSTATE )pvUser;
 
     STAM_PROFILE_ADV_START(&pThis->StatLateIntTimer, a);
     STAM_COUNTER_INC(&pThis->StatLateInts);
     E1K_INC_ISTAT_CNT(pThis->uStatIntLate);
-#if 0
+# if 0
     if (pThis->iStatIntLost > -100)
         pThis->iStatIntLost--;
-#endif
+# endif
     e1kRaiseInterrupt(pThis, VERR_SEM_BUSY, 0);
     STAM_PROFILE_ADV_STOP(&pThis->StatLateIntTimer, a);
 }
@@ -3326,6 +3360,7 @@ static DECLCALLBACK(void) e1kLateIntTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, v
  */
 static DECLCALLBACK(void) e1kLinkUpTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
 {
+    RT_NOREF(pDevIns, pTimer);
     PE1KSTATE pThis = (PE1KSTATE )pvUser;
 
     /*
@@ -3430,7 +3465,7 @@ DECLINLINE(void) e1kSetupGsoCtx(PPDMNETWORKGSO pGso, E1KTXCTX const *pCtx)
     }
     else
     {
-        pGso->cbHdrsSeg = pCtx->dw3.u8HDRLEN; /* @todo IPv6 UFO */
+        pGso->cbHdrsSeg = pCtx->dw3.u8HDRLEN; /** @todo IPv6 UFO */
         if (pCtx->dw2.fTCP)
             pGso->u8Type = PDMNETWORKGSOTYPE_IPV6_TCP;
         else
@@ -3690,7 +3725,7 @@ DECLINLINE(bool) e1kXmitIsGsoBuf(PDMSCATTERGATHER const *pTxSg)
  * @param   addr        Physical address in guest context.
  * @thread  E1000_TX
  */
-DECLINLINE(void) e1kLoadDesc(PE1KSTATE pThis, E1KTXDESC* pDesc, RTGCPHYS addr)
+DECLINLINE(void) e1kLoadDesc(PE1KSTATE pThis, E1KTXDESC *pDesc, RTGCPHYS addr)
 {
     PDMDevHlpPhysRead(pThis->CTX_SUFF(pDevIns), addr, pDesc, sizeof(E1KTXDESC));
 }
@@ -3770,7 +3805,7 @@ DECLINLINE(bool) e1kTxDLazyLoad(PE1KSTATE pThis)
  * @param   addr        Physical address in guest context.
  * @thread  E1000_TX
  */
-DECLINLINE(void) e1kWriteBackDesc(PE1KSTATE pThis, E1KTXDESC* pDesc, RTGCPHYS addr)
+DECLINLINE(void) e1kWriteBackDesc(PE1KSTATE pThis, E1KTXDESC *pDesc, RTGCPHYS addr)
 {
     /* Only the last half of the descriptor has to be written back. */
     e1kPrintTDesc(pThis, pDesc, "^^^");
@@ -3923,6 +3958,8 @@ static void e1kTransmitFrame(PE1KSTATE pThis, bool fOnWorkerThread)
  */
 static void e1kInsertChecksum(PE1KSTATE pThis, uint8_t *pPkt, uint16_t u16PktLen, uint8_t cso, uint8_t css, uint16_t cse)
 {
+    RT_NOREF1(pThis);
+
     if (css >= u16PktLen)
     {
         E1kLog2(("%s css(%X) is greater than packet length-1(%X), checksum is not inserted\n",
@@ -4199,7 +4236,7 @@ static int e1kFallbackAddSegment(PE1KSTATE pThis, RTGCPHYS PhysAddr, uint16_t u1
  * @param   fOnWorkerThread Whether we're on a worker thread or an EMT.
  * @thread  E1000_TX
  */
-static bool e1kFallbackAddToFrame(PE1KSTATE pThis, E1KTXDESC* pDesc, uint32_t cbFragment, bool fOnWorkerThread)
+static bool e1kFallbackAddToFrame(PE1KSTATE pThis, E1KTXDESC *pDesc, uint32_t cbFragment, bool fOnWorkerThread)
 {
     PPDMSCATTERGATHER pTxSg = pThis->CTX_SUFF(pTxSg);
     Assert(e1kGetDescType(pDesc) == E1K_DTYP_DATA);
@@ -4264,13 +4301,14 @@ static bool e1kFallbackAddToFrame(PE1KSTATE pThis, E1KTXDESC* pDesc, uint32_t cb
  * @param   fOnWorkerThread Whether we're on a worker thread or an EMT.
  * @thread  E1000_TX
  */
-static int e1kFallbackAddToFrame(PE1KSTATE pThis, E1KTXDESC* pDesc, bool fOnWorkerThread)
+static int e1kFallbackAddToFrame(PE1KSTATE pThis, E1KTXDESC *pDesc, bool fOnWorkerThread)
 {
-    int rc = VINF_SUCCESS;
+#ifdef VBOX_STRICT
     PPDMSCATTERGATHER pTxSg = pThis->CTX_SUFF(pTxSg);
     Assert(e1kGetDescType(pDesc) == E1K_DTYP_DATA);
     Assert(pDesc->data.cmd.fTSE);
     Assert(!e1kXmitIsGsoBuf(pTxSg));
+#endif
 
     uint16_t u16MaxPktLen = pThis->contextTSE.dw3.u8HDRLEN + pThis->contextTSE.dw3.u16MSS;
     Assert(u16MaxPktLen != 0);
@@ -4279,6 +4317,7 @@ static int e1kFallbackAddToFrame(PE1KSTATE pThis, E1KTXDESC* pDesc, bool fOnWork
     /*
      * Carve out segments.
      */
+    int rc;
     do
     {
         /* Calculate how many bytes we have left in this TCP segment */
@@ -4371,7 +4410,7 @@ static bool e1kAddToFrame(PE1KSTATE pThis, RTGCPHYS PhysAddr, uint32_t cbFragmen
  * @param   addr        Physical address of the descriptor in guest memory.
  * @thread  E1000_TX
  */
-static void e1kDescReport(PE1KSTATE pThis, E1KTXDESC* pDesc, RTGCPHYS addr)
+static void e1kDescReport(PE1KSTATE pThis, E1KTXDESC *pDesc, RTGCPHYS addr)
 {
     /*
      * We fake descriptor write-back bursting. Descriptors are written back as they are
@@ -4425,7 +4464,7 @@ static void e1kDescReport(PE1KSTATE pThis, E1KTXDESC* pDesc, RTGCPHYS addr)
 # ifndef E1K_NO_TAD
                 /* Cancel both timers if armed and fire immediately. */
                 e1kCancelTimer(pThis, pThis->CTX_SUFF(pTADTimer));
-# endif /* E1K_NO_TAD */
+# endif
 #endif /* E1K_USE_TX_TIMERS */
                 E1K_INC_ISTAT_CNT(pThis->uStatIntTx);
                 e1kRaiseInterrupt(pThis, VERR_SEM_BUSY, ICR_TXDW);
@@ -4456,7 +4495,7 @@ static void e1kDescReport(PE1KSTATE pThis, E1KTXDESC* pDesc, RTGCPHYS addr)
  * @param   fOnWorkerThread Whether we're on a worker thread or an EMT.
  * @thread  E1000_TX
  */
-static int e1kXmitDesc(PE1KSTATE pThis, E1KTXDESC* pDesc, RTGCPHYS addr, bool fOnWorkerThread)
+static int e1kXmitDesc(PE1KSTATE pThis, E1KTXDESC *pDesc, RTGCPHYS addr, bool fOnWorkerThread)
 {
     int rc = VINF_SUCCESS;
     uint32_t cbVTag = 0;
@@ -4716,11 +4755,10 @@ static int e1kXmitDesc(PE1KSTATE pThis, E1KTXDESC* pDesc, RTGCPHYS addr, bool fO
  * @param   cbPacketSize    Size of the packet as previously computed.
  * @thread  E1000_TX
  */
-static int e1kXmitDesc(PE1KSTATE pThis, E1KTXDESC* pDesc, RTGCPHYS addr,
+static int e1kXmitDesc(PE1KSTATE pThis, E1KTXDESC *pDesc, RTGCPHYS addr,
                        bool fOnWorkerThread)
 {
     int rc = VINF_SUCCESS;
-    uint32_t cbVTag = 0;
 
     e1kPrintTDesc(pThis, pDesc, "vvv");
 
@@ -4865,7 +4903,7 @@ static int e1kXmitDesc(PE1KSTATE pThis, E1KTXDESC* pDesc, RTGCPHYS addr,
     return rc;
 }
 
-DECLINLINE(void) e1kUpdateTxContext(PE1KSTATE pThis, E1KTXDESC* pDesc)
+DECLINLINE(void) e1kUpdateTxContext(PE1KSTATE pThis, E1KTXDESC *pDesc)
 {
     if (pDesc->context.dw2.fTSE)
     {
@@ -5084,8 +5122,8 @@ static int e1kXmitPending(PE1KSTATE pThis, bool fOnWorkerThread)
             STAM_PROFILE_ADV_STOP(&pThis->CTX_SUFF_Z(StatTransmit), a);
         }
 
-        /// @todo: uncomment: pThis->uStatIntTXQE++;
-        /// @todo: uncomment: e1kRaiseInterrupt(pThis, ICR_TXQE);
+        /// @todo uncomment: pThis->uStatIntTXQE++;
+        /// @todo uncomment: e1kRaiseInterrupt(pThis, ICR_TXQE);
         /*
          * Release the lock.
          */
@@ -5248,8 +5286,8 @@ static int e1kXmitPending(PE1KSTATE pThis, bool fOnWorkerThread)
 out:
         STAM_PROFILE_ADV_STOP(&pThis->CTX_SUFF_Z(StatTransmit), a);
 
-        /// @todo: uncomment: pThis->uStatIntTXQE++;
-        /// @todo: uncomment: e1kRaiseInterrupt(pThis, ICR_TXQE);
+        /// @todo uncomment: pThis->uStatIntTXQE++;
+        /// @todo uncomment: e1kRaiseInterrupt(pThis, ICR_TXQE);
 
         e1kCsTxLeave(pThis);
     }
@@ -5292,9 +5330,10 @@ static DECLCALLBACK(bool) e1kTxQueueConsumer(PPDMDEVINS pDevIns, PPDMQUEUEITEMCO
     PE1KSTATE pThis = PDMINS_2_DATA(pDevIns, PE1KSTATE);
     E1kLog2(("%s e1kTxQueueConsumer:\n", pThis->szPrf));
 
-    int rc = e1kXmitPending(pThis, false /*fOnWorkerThread*/);
+    int rc = e1kXmitPending(pThis, false /*fOnWorkerThread*/); NOREF(rc);
+#ifndef DEBUG_andy /** @todo r=andy Happens for me a lot, mute this for me. */
     AssertMsg(RT_SUCCESS(rc) || rc == VERR_TRY_AGAIN, ("%Rrc\n", rc));
-
+#endif
     return true;
 }
 
@@ -5303,6 +5342,7 @@ static DECLCALLBACK(bool) e1kTxQueueConsumer(PPDMDEVINS pDevIns, PPDMQUEUEITEMCO
  */
 static DECLCALLBACK(bool) e1kCanRxQueueConsumer(PPDMDEVINS pDevIns, PPDMQUEUEITEMCORE pItem)
 {
+    RT_NOREF(pItem);
     e1kWakeupReceive(pDevIns);
     return true;
 }
@@ -5495,6 +5535,7 @@ static int e1kRegReadVFTA(PE1KSTATE pThis, uint32_t offset, uint32_t index, uint
  */
 static int e1kRegReadUnimplemented(PE1KSTATE pThis, uint32_t offset, uint32_t index, uint32_t *pu32Value)
 {
+    RT_NOREF3(pThis, offset, index);
     E1kLog(("%s At %08X read (00000000) attempt from unimplemented register %s (%s)\n",
             pThis->szPrf, offset, g_aE1kRegMap[index].abbrev, g_aE1kRegMap[index].name));
     *pu32Value = 0;
@@ -5545,6 +5586,8 @@ static int e1kRegReadAutoClear(PE1KSTATE pThis, uint32_t offset, uint32_t index,
  */
 static int e1kRegReadDefault(PE1KSTATE pThis, uint32_t offset, uint32_t index, uint32_t *pu32Value)
 {
+    RT_NOREF_PV(offset);
+
     AssertReturn(index < E1K_NUM_OF_32BIT_REGS, VERR_DEV_IO_ERROR);
     *pu32Value = pThis->auRegs[index] & g_aE1kRegMap[index].readable;
 
@@ -5565,6 +5608,8 @@ static int e1kRegReadDefault(PE1KSTATE pThis, uint32_t offset, uint32_t index, u
 
  static int e1kRegWriteUnimplemented(PE1KSTATE pThis, uint32_t offset, uint32_t index, uint32_t value)
 {
+    RT_NOREF_PV(pThis); RT_NOREF_PV(offset); RT_NOREF_PV(index); RT_NOREF_PV(value);
+
     E1kLog(("%s At %08X write attempt (%08X) to  unimplemented register %s (%s)\n",
             pThis->szPrf, offset, value, g_aE1kRegMap[index].abbrev, g_aE1kRegMap[index].name));
 
@@ -5589,6 +5634,8 @@ static int e1kRegReadDefault(PE1KSTATE pThis, uint32_t offset, uint32_t index, u
 
 static int e1kRegWriteDefault(PE1KSTATE pThis, uint32_t offset, uint32_t index, uint32_t value)
 {
+    RT_NOREF_PV(offset);
+
     AssertReturn(index < E1K_NUM_OF_32BIT_REGS, VERR_DEV_IO_ERROR);
     pThis->auRegs[index] = (value & g_aE1kRegMap[index].writable)
                          | (pThis->auRegs[index] & ~g_aE1kRegMap[index].writable);
@@ -5601,12 +5648,12 @@ static int e1kRegWriteDefault(PE1KSTATE pThis, uint32_t offset, uint32_t index,
  *
  * @returns Index in the register table or -1 if not found.
  *
- * @param   pThis       The device state structure.
  * @param   offReg      Register offset in memory-mapped region.
  * @thread  EMT
  */
-static int e1kRegLookup(PE1KSTATE pThis, uint32_t offReg)
+static int e1kRegLookup(uint32_t offReg)
 {
+
 #if 0
     int index;
 
@@ -5676,7 +5723,7 @@ static int e1kRegReadUnaligned(PE1KSTATE pThis, uint32_t offReg, void *pv, uint3
     uint32_t    u32    = 0;
     uint32_t    shift;
     int         rc     = VINF_SUCCESS;
-    int         index  = e1kRegLookup(pThis, offReg);
+    int         index  = e1kRegLookup(offReg);
 #ifdef LOG_ENABLED
     char        buf[9];
 #endif
@@ -5765,7 +5812,7 @@ static int e1kRegReadAlignedU32(PE1KSTATE pThis, uint32_t offReg, uint32_t *pu32
      * Lookup the register and check that it's readable.
      */
     int rc     = VINF_SUCCESS;
-    int idxReg = e1kRegLookup(pThis, offReg);
+    int idxReg = e1kRegLookup(offReg);
     if (RT_LIKELY(idxReg != -1))
     {
         if (RT_UNLIKELY(g_aE1kRegMap[idxReg].readable))
@@ -5811,7 +5858,7 @@ static int e1kRegReadAlignedU32(PE1KSTATE pThis, uint32_t offReg, uint32_t *pu32
 static int e1kRegWriteAlignedU32(PE1KSTATE pThis, uint32_t offReg, uint32_t u32Value)
 {
     int         rc    = VINF_SUCCESS;
-    int         index = e1kRegLookup(pThis, offReg);
+    int         index = e1kRegLookup(offReg);
     if (RT_LIKELY(index != -1))
     {
         if (RT_LIKELY(g_aE1kRegMap[index].writable))
@@ -5851,7 +5898,7 @@ static int e1kRegWriteAlignedU32(PE1KSTATE pThis, uint32_t offReg, uint32_t u32V
  */
 PDMBOTHCBDECL(int) e1kMMIORead(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void *pv, unsigned cb)
 {
-    NOREF(pvUser);
+    RT_NOREF2(pvUser, cb);
     PE1KSTATE pThis  = PDMINS_2_DATA(pDevIns, PE1KSTATE);
     STAM_PROFILE_ADV_START(&pThis->CTX_SUFF_Z(StatMMIORead), a);
 
@@ -5871,7 +5918,7 @@ PDMBOTHCBDECL(int) e1kMMIORead(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhys
  */
 PDMBOTHCBDECL(int) e1kMMIOWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void const *pv, unsigned cb)
 {
-    NOREF(pvUser);
+    RT_NOREF2(pvUser, cb);
     PE1KSTATE pThis  = PDMINS_2_DATA(pDevIns, PE1KSTATE);
     STAM_PROFILE_ADV_START(&pThis->CTX_SUFF_Z(StatMMIOWrite), a);
 
@@ -5894,6 +5941,7 @@ PDMBOTHCBDECL(int) e1kIOPortIn(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT uPort,
     PE1KSTATE   pThis = PDMINS_2_DATA(pDevIns, PE1KSTATE);
     int         rc;
     STAM_PROFILE_ADV_START(&pThis->CTX_SUFF_Z(StatIORead), a);
+    RT_NOREF_PV(pvUser);
 
     uPort -= pThis->IOPortBase;
     if (RT_LIKELY(cb == 4))
@@ -5938,6 +5986,7 @@ PDMBOTHCBDECL(int) e1kIOPortOut(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT uPort
     PE1KSTATE   pThis = PDMINS_2_DATA(pDevIns, PE1KSTATE);
     int         rc;
     STAM_PROFILE_ADV_START(&pThis->CTX_SUFF_Z(StatIOWrite), a);
+    RT_NOREF_PV(pvUser);
 
     E1kLog2(("%s e1kIOPortOut: uPort=%RTiop value=%08x\n", pThis->szPrf, uPort, u32));
     if (RT_LIKELY(cb == 4))
@@ -5988,11 +6037,9 @@ PDMBOTHCBDECL(int) e1kIOPortOut(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT uPort
  */
 static void e1kDumpState(PE1KSTATE pThis)
 {
+    RT_NOREF(pThis);
     for (int i = 0; i < E1K_NUM_OF_32BIT_REGS; ++i)
-    {
-        E1kLog2(("%s %8.8s = %08x\n", pThis->szPrf,
-                g_aE1kRegMap[i].abbrev, pThis->auRegs[i]));
-    }
+        E1kLog2(("%s %8.8s = %08x\n", pThis->szPrf, g_aE1kRegMap[i].abbrev, pThis->auRegs[i]));
 # ifdef E1K_INT_STATS
     LogRel(("%s Interrupt attempts: %d\n", pThis->szPrf, pThis->uStatIntTry));
     LogRel(("%s Interrupts raised : %d\n", pThis->szPrf, pThis->uStatInt));
@@ -6041,6 +6088,7 @@ static void e1kDumpState(PE1KSTATE pThis)
  */
 static DECLCALLBACK(int) e1kMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, uint32_t cb, PCIADDRESSSPACE enmType)
 {
+    RT_NOREF(iRegion);
     PE1KSTATE pThis = PDMINS_2_DATA(pPciDev->pDevIns, E1KSTATE*);
     int       rc;
 
@@ -6551,6 +6599,7 @@ static void e1kSaveConfig(PE1KSTATE pThis, PSSMHANDLE pSSM)
  */
 static DECLCALLBACK(int) e1kLiveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uPass)
 {
+    RT_NOREF(uPass);
     PE1KSTATE pThis = PDMINS_2_DATA(pDevIns, E1KSTATE*);
     e1kSaveConfig(pThis, pSSM);
     return VINF_SSM_DONT_CALL_AGAIN;
@@ -6561,6 +6610,7 @@ static DECLCALLBACK(int) e1kLiveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32
  */
 static DECLCALLBACK(int) e1kSavePrep(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
 {
+    RT_NOREF(pSSM);
     PE1KSTATE pThis = PDMINS_2_DATA(pDevIns, E1KSTATE*);
 
     int rc = e1kCsEnter(pThis, VERR_SEM_BUSY);
@@ -6637,7 +6687,7 @@ static DECLCALLBACK(int) e1kSaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
     SSMR3PutU8(pSSM, 0);
 #endif
 #endif /* E1K_WITH_TXD_CACHE */
-/**@todo GSO requires some more state here. */
+/** @todo GSO requires some more state here. */
     E1kLog(("%s State has been saved\n", pThis->szPrf));
     return VINF_SUCCESS;
 }
@@ -6665,6 +6715,7 @@ static DECLCALLBACK(int) e1kSaveDone(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
  */
 static DECLCALLBACK(int) e1kLoadPrep(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
 {
+    RT_NOREF(pSSM);
     PE1KSTATE pThis = PDMINS_2_DATA(pDevIns, E1KSTATE*);
 
     int rc = e1kCsEnter(pThis, VERR_SEM_BUSY);
@@ -6718,7 +6769,7 @@ static DECLCALLBACK(int) e1kLoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32
         /* the state */
         SSMR3GetMem(pSSM, &pThis->auRegs, sizeof(pThis->auRegs));
         SSMR3GetBool(pSSM, &pThis->fIntRaised);
-        /** @todo: PHY could be made a separate device with its own versioning */
+        /** @todo PHY could be made a separate device with its own versioning */
         Phy::loadState(pSSM, &pThis->phy);
         SSMR3GetU32(pSSM, &pThis->uSelectedReg);
         SSMR3GetMem(pSSM, &pThis->auMTA, sizeof(pThis->auMTA));
@@ -6783,6 +6834,7 @@ static DECLCALLBACK(int) e1kLoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32
  */
 static DECLCALLBACK(int) e1kLoadDone(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
 {
+    RT_NOREF(pSSM);
     PE1KSTATE pThis = PDMINS_2_DATA(pDevIns, E1KSTATE*);
 
     /* Update promiscuous mode */
@@ -6820,6 +6872,7 @@ static DECLCALLBACK(size_t) e1kFmtRxDesc(PFNRTSTROUTPUT pfnOutput,
                                          unsigned fFlags,
                                          void *pvUser)
 {
+    RT_NOREF(cchWidth,  cchPrecision,  fFlags, pvUser);
     AssertReturn(strcmp(pszType, "e1krxd") == 0, 0);
     E1KRXDESC* pDesc = (E1KRXDESC*)pvValue;
     if (!pDesc)
@@ -6858,8 +6911,9 @@ static DECLCALLBACK(size_t) e1kFmtTxDesc(PFNRTSTROUTPUT pfnOutput,
                                          unsigned fFlags,
                                          void *pvUser)
 {
+    RT_NOREF(cchWidth, cchPrecision, fFlags, pvUser);
     AssertReturn(strcmp(pszType, "e1ktxd") == 0, 0);
-    E1KTXDESC* pDesc = (E1KTXDESC*)pvValue;
+    E1KTXDESC *pDesc = (E1KTXDESC*)pvValue;
     if (!pDesc)
         return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "NULL_TXD");
 
@@ -6957,6 +7011,7 @@ static int e1kInitDebugHelpers(void)
  */
 static DECLCALLBACK(void) e1kInfo(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
 {
+    RT_NOREF(pszArgs);
     PE1KSTATE pThis = PDMINS_2_DATA(pDevIns, E1KSTATE*);
     unsigned  i;
     // bool        fRcvRing = false;
@@ -6976,7 +7031,7 @@ static DECLCALLBACK(void) e1kInfo(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const
      */
     pHlp->pfnPrintf(pHlp, "E1000 #%d: port=%RTiop mmio=%RGp mac-cfg=%RTmac %s%s%s\n",
                     pDevIns->iInstance, pThis->IOPortBase, pThis->addrMMReg,
-                    &pThis->macConfigured, g_Chips[pThis->eChip].pcszName,
+                    &pThis->macConfigured, g_aChips[pThis->eChip].pcszName,
                     pThis->fRCEnabled ? " GC" : "", pThis->fR0Enabled ? " R0" : "");
 
     e1kCsEnter(pThis, VERR_INTERNAL_ERROR); /* Not sure why but PCNet does it */
@@ -7117,6 +7172,7 @@ static DECLCALLBACK(void) e1kInfo(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const
  */
 static DECLCALLBACK(void) e1kR3Detach(PPDMDEVINS pDevIns, unsigned iLUN, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
     PE1KSTATE pThis = PDMINS_2_DATA(pDevIns, E1KSTATE*);
     Log(("%s e1kR3Detach:\n", pThis->szPrf));
 
@@ -7124,7 +7180,7 @@ static DECLCALLBACK(void) e1kR3Detach(PPDMDEVINS pDevIns, unsigned iLUN, uint32_
 
     PDMCritSectEnter(&pThis->cs, VERR_SEM_BUSY);
 
-    /** @todo: r=pritesh still need to check if i missed
+    /** @todo r=pritesh still need to check if i missed
      * to clean something in this function
      */
 
@@ -7153,6 +7209,7 @@ static DECLCALLBACK(void) e1kR3Detach(PPDMDEVINS pDevIns, unsigned iLUN, uint32_
  */
 static DECLCALLBACK(int) e1kR3Attach(PPDMDEVINS pDevIns, unsigned iLUN, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
     PE1KSTATE pThis = PDMINS_2_DATA(pDevIns, E1KSTATE*);
     LogFlow(("%s e1kR3Attach:\n",  pThis->szPrf));
 
@@ -7267,6 +7324,7 @@ static DECLCALLBACK(void) e1kR3Suspend(PPDMDEVINS pDevIns)
  */
 static DECLCALLBACK(void) e1kR3Relocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta)
 {
+    RT_NOREF(offDelta);
     PE1KSTATE pThis = PDMINS_2_DATA(pDevIns, E1KSTATE*);
     pThis->pDevInsRC     = PDMDEVINS_2_RCPTR(pDevIns);
     pThis->pTxQueueRC    = PDMQueueRCPtr(pThis->pTxQueueR3);
@@ -7330,12 +7388,12 @@ static DECLCALLBACK(int) e1kR3Destruct(PPDMDEVINS pDevIns)
  */
 static DECLCALLBACK(void) e1kConfigurePciDev(PPCIDEVICE pPciDev, E1KCHIP eChip)
 {
-    Assert(eChip < RT_ELEMENTS(g_Chips));
+    Assert(eChip < RT_ELEMENTS(g_aChips));
     /* Configure PCI Device, assume 32-bit mode ******************************/
-    PCIDevSetVendorId(pPciDev, g_Chips[eChip].uPCIVendorId);
-    PCIDevSetDeviceId(pPciDev, g_Chips[eChip].uPCIDeviceId);
-    PCIDevSetWord( pPciDev, VBOX_PCI_SUBSYSTEM_VENDOR_ID, g_Chips[eChip].uPCISubsystemVendorId);
-    PCIDevSetWord( pPciDev, VBOX_PCI_SUBSYSTEM_ID, g_Chips[eChip].uPCISubsystemId);
+    PCIDevSetVendorId(pPciDev, g_aChips[eChip].uPCIVendorId);
+    PCIDevSetDeviceId(pPciDev, g_aChips[eChip].uPCIDeviceId);
+    PCIDevSetWord( pPciDev, VBOX_PCI_SUBSYSTEM_VENDOR_ID, g_aChips[eChip].uPCISubsystemVendorId);
+    PCIDevSetWord( pPciDev, VBOX_PCI_SUBSYSTEM_ID, g_aChips[eChip].uPCISubsystemId);
 
     PCIDevSetWord( pPciDev, VBOX_PCI_COMMAND,            0x0000);
     /* DEVSEL Timing (medium device), 66 MHz Capable, New capabilities */
@@ -7459,7 +7517,7 @@ static DECLCALLBACK(int) e1kR3Construct(PPDMDEVINS pDevIns, int iInstance, PCFGM
         return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES,
                                 N_("Invalid configuration for E1000 device"));
 
-    /** @todo: LineSpeed unused! */
+    /** @todo LineSpeed unused! */
 
     pThis->fR0Enabled    = true;
     pThis->fRCEnabled    = true;
@@ -7523,7 +7581,7 @@ static DECLCALLBACK(int) e1kR3Construct(PPDMDEVINS pDevIns, int iInstance, PCFGM
         LogRel(("%s WARNING! Link up delay is disabled!\n", pThis->szPrf));
 
     LogRel(("%s Chip=%s LinkUpDelay=%ums EthernetCRC=%s GSO=%s Itr=%s ItrRx=%s R0=%s GC=%s\n", pThis->szPrf,
-            g_Chips[pThis->eChip].pcszName, pThis->cMsLinkUpDelay,
+            g_aChips[pThis->eChip].pcszName, pThis->cMsLinkUpDelay,
             pThis->fEthernetCRC ? "on" : "off",
             pThis->fGSOEnabled ? "enabled" : "disabled",
             pThis->fItrEnabled ? "enabled" : "disabled",
diff --git a/src/VBox/Devices/Network/DevE1000Phy.cpp b/src/VBox/Devices/Network/DevE1000Phy.cpp
index 8b09b14..2df22ef 100644
--- a/src/VBox/Devices/Network/DevE1000Phy.cpp
+++ b/src/VBox/Devices/Network/DevE1000Phy.cpp
@@ -10,7 +10,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -50,8 +50,10 @@
 
 /* Internals */
 namespace Phy {
+#if defined(LOG_ENABLED) && !defined(PHY_UNIT_TEST)
     /** Retrieves state name by id */
     static const char * getStateName(uint16_t u16State);
+#endif
     /** Look up register index by address. */
     static int lookupRegister(uint32_t u32Address);
     /** Software-triggered reset. */
@@ -158,6 +160,7 @@ static void Phy::regWriteDefault(PPHY pPhy, uint32_t index, uint16_t u16Value)
  */
 static uint16_t Phy::regReadForbidden(PPHY pPhy, uint32_t index)
 {
+    RT_NOREF2(pPhy, index);
     PhyLog(("PHY#%d At %02d read attempted from write-only '%s'\n",
             pPhy->iInstance, s_regMap[index].u32Address, s_regMap[index].pszName));
     return 0;
@@ -173,6 +176,7 @@ static uint16_t Phy::regReadForbidden(PPHY pPhy, uint32_t index)
  */
 static void Phy::regWriteForbidden(PPHY pPhy, uint32_t index, uint16_t u16Value)
 {
+    RT_NOREF_PV(pPhy); RT_NOREF_PV(index); RT_NOREF_PV(u16Value);
     PhyLog(("PHY#%d At %02d write attempted to read-only '%s'\n",
             pPhy->iInstance, s_regMap[index].u32Address, s_regMap[index].pszName));
 }
@@ -188,6 +192,7 @@ static void Phy::regWriteForbidden(PPHY pPhy, uint32_t index, uint16_t u16Value)
  */
 static uint16_t Phy::regReadUnimplemented(PPHY pPhy, uint32_t index)
 {
+    RT_NOREF_PV(pPhy); RT_NOREF_PV(index);
     PhyLog(("PHY#%d At %02d read attempted from unimplemented '%s'\n",
             pPhy->iInstance, s_regMap[index].u32Address, s_regMap[index].pszName));
     return 0;
@@ -203,6 +208,7 @@ static uint16_t Phy::regReadUnimplemented(PPHY pPhy, uint32_t index)
  */
 static void Phy::regWriteUnimplemented(PPHY pPhy, uint32_t index, uint16_t u16Value)
 {
+    RT_NOREF_PV(pPhy); RT_NOREF_PV(index); RT_NOREF_PV(u16Value);
     PhyLog(("PHY#%d At %02d write attempted to unimplemented '%s'\n",
             pPhy->iInstance, s_regMap[index].u32Address, s_regMap[index].pszName));
 }
@@ -344,6 +350,7 @@ void Phy::hardReset(PPHY pPhy)
  */
 static void Phy::softReset(PPHY pPhy)
 {
+    RT_NOREF1(pPhy);
     PhyLog(("PHY#%d Soft reset is not yet implemented!\n", pPhy->iInstance));
 }
 
@@ -440,6 +447,8 @@ static void Phy::regWritePCTRL(PPHY pPhy, uint32_t index, uint16_t u16Value)
  */
 static uint16_t Phy::regReadPSTATUS(PPHY pPhy, uint32_t index)
 {
+    RT_NOREF_PV(pPhy); RT_NOREF_PV(index);
+
     /* Read latched value */
     uint16_t u16 = REG(PSTATUS);
     if (REG(PSSTAT) & PSSTAT_LINK)
@@ -458,6 +467,8 @@ static uint16_t Phy::regReadPSTATUS(PPHY pPhy, uint32_t index)
  */
 static uint16_t Phy::regReadGSTATUS(PPHY pPhy, uint32_t index)
 {
+    RT_NOREF_PV(pPhy); RT_NOREF_PV(index);
+
     /*
      * - Link partner is capable of 1000BASE-T half duplex
      * - Link partner is capable of 1000BASE-T full duplex
@@ -468,6 +479,7 @@ static uint16_t Phy::regReadGSTATUS(PPHY pPhy, uint32_t index)
     return 0x3C00;
 }
 
+#if defined(LOG_ENABLED) && !defined(PHY_UNIT_TEST)
 static const char * Phy::getStateName(uint16_t u16State)
 {
     static const char *pcszState[] =
@@ -483,6 +495,7 @@ static const char * Phy::getStateName(uint16_t u16State)
 
     return (u16State < RT_ELEMENTS(pcszState)) ? pcszState[u16State] : "<invalid>";
 }
+#endif
 
 bool Phy::readMDIO(PPHY pPhy)
 {
diff --git a/src/VBox/Devices/Network/DevE1000Phy.h b/src/VBox/Devices/Network/DevE1000Phy.h
index 149031c..ad274f4 100644
--- a/src/VBox/Devices/Network/DevE1000Phy.h
+++ b/src/VBox/Devices/Network/DevE1000Phy.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/DevEEPROM.cpp b/src/VBox/Devices/Network/DevEEPROM.cpp
index a689488..d7dc213 100644
--- a/src/VBox/Devices/Network/DevEEPROM.cpp
+++ b/src/VBox/Devices/Network/DevEEPROM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/DevEEPROM.h b/src/VBox/Devices/Network/DevEEPROM.h
index 918e5bf..5f6c3cf 100644
--- a/src/VBox/Devices/Network/DevEEPROM.h
+++ b/src/VBox/Devices/Network/DevEEPROM.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/DevINIP.cpp b/src/VBox/Devices/Network/DevINIP.cpp
index a7fce41..c71741f 100644
--- a/src/VBox/Devices/Network/DevINIP.cpp
+++ b/src/VBox/Devices/Network/DevINIP.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -142,14 +142,7 @@ static const PFNRT g_pDevINILinkHack[] =
 };
 
 
-/*********************************************************************************************************************************
-*   Internal Functions                                                                                                           *
-*********************************************************************************************************************************/
-static err_t devINIPOutput(struct netif *netif, struct pbuf *p, struct ip_addr *ipaddr);
-static err_t devINIPOutputRaw(struct netif *netif, struct pbuf *p);
-static err_t devINIPInterface(struct netif *netif);
-
-
+#if 0 /* unused */
 /**
  * Output a TCP/IP packet on the interface. Uses the generic lwIP ARP
  * code to resolve the address and call the link-level packet function.
@@ -170,6 +163,7 @@ static err_t devINIPOutput(struct netif *netif, struct pbuf *p, struct ip_addr *
     LogFlow(("%s: return %d\n", __FUNCTION__, lrc));
     return lrc;
 }
+#endif
 
 /**
  * Output a raw packet on the interface.
@@ -180,6 +174,7 @@ static err_t devINIPOutput(struct netif *netif, struct pbuf *p, struct ip_addr *
  */
 static err_t devINIPOutputRaw(struct netif *netif, struct pbuf *p)
 {
+    NOREF(netif);
     int rc = VINF_SUCCESS;
 
     LogFlow(("%s: netif=%p p=%p\n", __FUNCTION__, netif, p));
@@ -288,7 +283,7 @@ static DECLCALLBACK(int) devINIPNetworkConfiguration(PPDMDEVINS pDevIns, PDEVINT
     {
         PDMDEV_SET_ERROR(pDevIns, rc,
                          N_("Configuration error: Failed to get the \"IP\" value"));
-        /* @todo: perhaps we should panic if IPv4 address isn't specify, with assumtion that
+        /** @todo perhaps we should panic if IPv4 address isn't specify, with assumtion that
          * ISCSI target specified in IPv6 form.
          */
         return rc;
@@ -321,6 +316,7 @@ static DECLCALLBACK(int) devINIPNetworkConfiguration(PPDMDEVINS pDevIns, PDEVINT
  */
 static DECLCALLBACK(int) devINIPNetworkDown_WaitInputAvail(PPDMINETWORKDOWN pInterface, RTMSINTERVAL cMillies)
 {
+    RT_NOREF(pInterface, cMillies);
     LogFlow(("%s: pInterface=%p\n", __FUNCTION__, pInterface));
     LogFlow(("%s: return VINF_SUCCESS\n", __FUNCTION__));
     return VINF_SUCCESS;
@@ -336,11 +332,11 @@ static DECLCALLBACK(int) devINIPNetworkDown_WaitInputAvail(PPDMINETWORKDOWN pInt
  */
 static DECLCALLBACK(int) devINIPNetworkDown_Input(PPDMINETWORKDOWN pInterface, const void *pvBuf, size_t cb)
 {
+    RT_NOREF(pInterface);
     const uint8_t *pbBuf = (const uint8_t *)pvBuf;
     size_t len = cb;
     const struct eth_hdr *ethhdr;
     struct pbuf *p, *q;
-    int rc = VINF_SUCCESS;
 
     LogFlow(("%s: pInterface=%p pvBuf=%p cb=%lu\n", __FUNCTION__, pInterface, pvBuf, cb));
     Assert(g_pDevINIPData);
@@ -349,7 +345,7 @@ static DECLCALLBACK(int) devINIPNetworkDown_Input(PPDMINETWORKDOWN pInterface, c
     /* Silently ignore packets being received while lwIP isn't set up. */
     if (!g_pDevINIPData)
     {
-        LogFlow(("%s: return %Rrc (no global)\n", __FUNCTION__, rc));
+        LogFlow(("%s: return %Rrc (no global)\n", __FUNCTION__, VINF_SUCCESS));
         return VINF_SUCCESS;
     }
 
@@ -358,7 +354,8 @@ static DECLCALLBACK(int) devINIPNetworkDown_Input(PPDMINETWORKDOWN pInterface, c
 #endif
 
     /* We allocate a pbuf chain of pbufs from the pool. */
-    p = lwip_pbuf_alloc(PBUF_RAW, len, PBUF_POOL);
+    Assert((u16_t)len == len);
+    p = lwip_pbuf_alloc(PBUF_RAW, (u16_t)len, PBUF_POOL);
     if (p != NULL)
     {
 #if ETH_PAD_SIZE
@@ -383,8 +380,8 @@ static DECLCALLBACK(int) devINIPNetworkDown_Input(PPDMINETWORKDOWN pInterface, c
         tcpip_input(p,iface);
     }
 
-    LogFlow(("%s: return %Rrc\n", __FUNCTION__, rc));
-    return rc;
+    LogFlow(("%s: return %Rrc\n", __FUNCTION__, VINF_SUCCESS));
+    return VINF_SUCCESS;
 }
 
 /**
@@ -604,9 +601,8 @@ static DECLCALLBACK(int) devINIPDestruct(PPDMDEVINS pDevIns)
  */
 static DECLCALLBACK(int) devINIPConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
 {
+    RT_NOREF(iInstance);
     PDEVINTNETIP pThis = PDMINS_2_DATA(pDevIns, PDEVINTNETIP);
-    int rc = VINF_SUCCESS;
-    err_t errRc = ERR_OK;
 
     LogFlow(("%s: pDevIns=%p iInstance=%d pCfg=%p\n", __FUNCTION__,
              pDevIns, iInstance, pCfg));
@@ -645,7 +641,7 @@ static DECLCALLBACK(int) devINIPConstruct(PPDMDEVINS pDevIns, int iInstance, PCF
     /*
      * Get the configuration settings.
      */
-    rc = CFGMR3QueryBytes(pCfg, "MAC", &pThis->MAC, sizeof(pThis->MAC));
+    int rc = CFGMR3QueryBytes(pCfg, "MAC", &pThis->MAC, sizeof(pThis->MAC));
     if (rc == VERR_CFGM_NOT_BYTES)
     {
         char szMAC[64];
diff --git a/src/VBox/Devices/Network/DevPCNet.cpp b/src/VBox/Devices/Network/DevPCNet.cpp
index 7f321fc..e5fb543 100644
--- a/src/VBox/Devices/Network/DevPCNet.cpp
+++ b/src/VBox/Devices/Network/DevPCNet.cpp
@@ -10,7 +10,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -638,7 +638,6 @@ static void pcnetPollTimerStart(PPCNETSTATE pThis);
 #endif
 static int  pcnetXmitPending(PPCNETSTATE pThis, bool fOnWorkerThread);
 #ifdef PCNET_NO_POLLING
-PGM_ALL_CB_DECL(FNPGMPHYSHANDLER)   pcnetHandleRingWrite;
 # ifndef IN_RING3
 RT_C_DECLS_BEGIN
 DECLEXPORT(FNPGMRZPHYSPFHANDLER)    pcnetHandleRingWritePf;
@@ -1030,6 +1029,7 @@ DECLINLINE(int) padr_match(PPCNETSTATE pThis, const uint8_t *buf, size_t size)
          hdr->ether_dhost[3],hdr->ether_dhost[4],hdr->ether_dhost[5],
          padr[0],padr[1],padr[2],padr[3],padr[4],padr[5], result));
 #endif
+    RT_NOREF_PV(size);
     return result;
 }
 
@@ -1041,6 +1041,7 @@ DECLINLINE(int) padr_bcast(PPCNETSTATE pThis, const uint8_t *buf, size_t size)
 #ifdef PCNET_DEBUG_MATCH
     Log(("#%d padr_bcast result=%d\n", PCNET_INST_NR, result));
 #endif
+    RT_NOREF_PV(size);
    return result;
 }
 
@@ -1067,6 +1068,7 @@ static int ladr_match(PPCNETSTATE pThis, const uint8_t *buf, size_t size)
         return (ladr[index >> 3] & (1 << (index & 7)));
 #endif
     }
+    RT_NOREF_PV(size);
     return 0;
 }
 
@@ -1541,6 +1543,7 @@ static void pcnetStop(PPCNETSTATE pThis)
 }
 
 #ifdef IN_RING3
+
 static DECLCALLBACK(void) pcnetWakeupReceive(PPDMDEVINS pDevIns)
 {
     PPCNETSTATE pThis = PDMINS_2_DATA(pDevIns, PPCNETSTATE);
@@ -1551,9 +1554,11 @@ static DECLCALLBACK(void) pcnetWakeupReceive(PPDMDEVINS pDevIns)
 
 static DECLCALLBACK(bool) pcnetCanRxQueueConsumer(PPDMDEVINS pDevIns, PPDMQUEUEITEMCORE pItem)
 {
+    RT_NOREF(pItem);
     pcnetWakeupReceive(pDevIns);
     return true;
 }
+
 #endif /* IN_RING3 */
 
 
@@ -1858,7 +1863,7 @@ static void pcnetReceiveNoSync(PPCNETSTATE pThis, const uint8_t *buf, size_t cbT
 
                 if (fAddFCS)
                 {
-                    uint32_t fcs = ~0;
+                    uint32_t fcs = UINT32_MAX;
                     uint8_t *p = src;
 
                     while (p != &src[cbToRecv])
@@ -2008,6 +2013,7 @@ static void pcnetReceiveNoSync(PPCNETSTATE pThis, const uint8_t *buf, size_t cbT
 }
 
 
+#ifdef IN_RING3
 /**
  * Transmit queue consumer
  * This is just a very simple way of delaying sending to R3.
@@ -2029,6 +2035,7 @@ static DECLCALLBACK(bool) pcnetXmitQueueConsumer(PPDMDEVINS pDevIns, PPDMQUEUEIT
 
     return true;
 }
+#endif /* IN_RING3 */
 
 
 /**
@@ -2619,7 +2626,8 @@ static int pcnetAsyncTransmit(PPCNETSTATE pThis, bool fOnWorkerThread)
  */
 static int pcnetXmitPending(PPCNETSTATE pThis, bool fOnWorkerThread)
 {
-    int rc = VINF_SUCCESS;
+    RT_NOREF_PV(fOnWorkerThread);
+    int rc;
 
     /*
      * Grab the xmit lock of the driver as well as the E1K device state.
@@ -3301,7 +3309,7 @@ PDMBOTHCBDECL(int) pcnetIOPortAPromRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPO
     int         rc    = VINF_SUCCESS;
     STAM_PROFILE_ADV_START(&pThis->StatAPROMRead, a);
     Assert(PDMCritSectIsOwner(&pThis->CritSect));
-
+    RT_NOREF_PV(pvUser);
 
     /* FreeBSD is accessing in dwords. */
     if (cb == 1)
@@ -3334,6 +3342,7 @@ PDMBOTHCBDECL(int) pcnetIOPortAPromWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOP
     PPCNETSTATE pThis = PDMINS_2_DATA(pDevIns, PPCNETSTATE);
     int         rc    = VINF_SUCCESS;
     Assert(PDMCritSectIsOwner(&pThis->CritSect));
+    RT_NOREF_PV(pvUser);
 
     if (cb == 1)
     {
@@ -3354,11 +3363,9 @@ PDMBOTHCBDECL(int) pcnetIOPortAPromWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOP
 
 static int pcnetIoportWriteU8(PPCNETSTATE pThis, uint32_t addr, uint32_t val)
 {
-    int rc = VINF_SUCCESS;
-
+    RT_NOREF1(val);
 #ifdef PCNET_DEBUG_IO
-    Log2(("#%d pcnetIoportWriteU8: addr=%#010x val=%#06x\n", PCNET_INST_NR,
-         addr, val));
+    Log2(("#%d pcnetIoportWriteU8: addr=%#010x val=%#06x\n", PCNET_INST_NR, addr, val));
 #endif
     if (RT_LIKELY(!BCR_DWIO(pThis)))
     {
@@ -3371,12 +3378,12 @@ static int pcnetIoportWriteU8(PPCNETSTATE pThis, uint32_t addr, uint32_t val)
     else
         Log(("#%d pcnetIoportWriteU8: addr=%#010x val=%#06x BCR_DWIO !!\n", PCNET_INST_NR, addr, val));
 
-    return rc;
+    return VINF_SUCCESS;
 }
 
 static uint32_t pcnetIoportReadU8(PPCNETSTATE pThis, uint32_t addr, int *pRC)
 {
-    uint32_t val = ~0U;
+    uint32_t val = UINT32_MAX;
 
     *pRC = VINF_SUCCESS;
 
@@ -3406,8 +3413,7 @@ static int pcnetIoportWriteU16(PPCNETSTATE pThis, uint32_t addr, uint32_t val)
     int rc = VINF_SUCCESS;
 
 #ifdef PCNET_DEBUG_IO
-    Log2(("#%d pcnetIoportWriteU16: addr=%#010x val=%#06x\n", PCNET_INST_NR,
-         addr, val));
+    Log2(("#%d pcnetIoportWriteU16: addr=%#010x val=%#06x\n", PCNET_INST_NR, addr, val));
 #endif
     if (RT_LIKELY(!BCR_DWIO(pThis)))
     {
@@ -3568,6 +3574,7 @@ PDMBOTHCBDECL(int) pcnetIOPortRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Po
     int         rc    = VINF_SUCCESS;
     STAM_PROFILE_ADV_START(&pThis->CTX_SUFF_Z(StatIORead), a);
     Assert(PDMCritSectIsOwner(&pThis->CritSect));
+    RT_NOREF_PV(pvUser);
 
     switch (cb)
     {
@@ -3595,6 +3602,7 @@ PDMBOTHCBDECL(int) pcnetIOPortWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT P
     int         rc    = VINF_SUCCESS;
     STAM_PROFILE_ADV_START(&pThis->CTX_SUFF_Z(StatIOWrite), a);
     Assert(PDMCritSectIsOwner(&pThis->CritSect));
+    RT_NOREF_PV(pvUser);
 
     switch (cb)
     {
@@ -3716,6 +3724,7 @@ PDMBOTHCBDECL(int) pcnetMMIORead(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPh
     PPCNETSTATE pThis = (PPCNETSTATE)pvUser;
     int         rc    = VINF_SUCCESS;
     Assert(PDMCritSectIsOwner(&pThis->CritSect));
+    RT_NOREF_PV(pDevIns);
 
     /*
      * We have to check the range, because we're page aligning the MMIO.
@@ -3752,6 +3761,7 @@ PDMBOTHCBDECL(int) pcnetMMIOWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCP
     PPCNETSTATE pThis = (PPCNETSTATE)pvUser;
     int         rc    = VINF_SUCCESS;
     Assert(PDMCritSectIsOwner(&pThis->CritSect));
+    RT_NOREF_PV(pDevIns);
 
     /*
      * We have to check the range, because we're page aligning the MMIO stuff presently.
@@ -3787,6 +3797,7 @@ PDMBOTHCBDECL(int) pcnetMMIOWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCP
  */
 static DECLCALLBACK(void) pcnetTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
 {
+    RT_NOREF(pDevIns, pTimer);
     PPCNETSTATE pThis = (PPCNETSTATE)pvUser;
     Assert(PDMCritSectIsOwner(&pThis->CritSect));
 
@@ -3802,6 +3813,7 @@ static DECLCALLBACK(void) pcnetTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *
  */
 static DECLCALLBACK(void) pcnetTimerSoftInt(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
 {
+    RT_NOREF(pDevIns, pTimer);
     PPCNETSTATE pThis = (PPCNETSTATE)pvUser;
     Assert(PDMCritSectIsOwner(&pThis->CritSect));
 
@@ -3820,6 +3832,7 @@ static DECLCALLBACK(void) pcnetTimerSoftInt(PPDMDEVINS pDevIns, PTMTIMER pTimer,
  */
 static DECLCALLBACK(void) pcnetTimerRestore(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
 {
+    RT_NOREF(pTimer, pvUser);
     PPCNETSTATE pThis = PDMINS_2_DATA(pDevIns, PPCNETSTATE);
     int         rc = PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY);
     AssertReleaseRC(rc);
@@ -3856,6 +3869,7 @@ static DECLCALLBACK(void) pcnetTimerRestore(PPDMDEVINS pDevIns, PTMTIMER pTimer,
 static DECLCALLBACK(int) pcnetIOPortMap(PPCIDEVICE pPciDev, /*unsigned*/ int iRegion,
                                         RTGCPHYS GCPhysAddress, uint32_t cb, PCIADDRESSSPACE enmType)
 {
+    RT_NOREF(iRegion, cb, enmType);
     int         rc;
     PPDMDEVINS  pDevIns = pPciDev->pDevIns;
     RTIOPORT    Port    = (RTIOPORT)GCPhysAddress;
@@ -3907,6 +3921,7 @@ static DECLCALLBACK(int) pcnetIOPortMap(PPCIDEVICE pPciDev, /*unsigned*/ int iRe
 static DECLCALLBACK(int) pcnetMMIOMap(PPCIDEVICE pPciDev, /*unsigned*/ int iRegion,
                                       RTGCPHYS GCPhysAddress, uint32_t cb, PCIADDRESSSPACE enmType)
 {
+    RT_NOREF(iRegion, cb, enmType);
     PPCNETSTATE pThis = PCIDEV_2_PCNETSTATE(pPciDev);
     int         rc;
 
@@ -4199,6 +4214,7 @@ static void pcnetSaveConfig(PPCNETSTATE pThis, PSSMHANDLE pSSM)
  */
 static DECLCALLBACK(int) pcnetLiveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uPass)
 {
+    RT_NOREF(uPass);
     PPCNETSTATE pThis = PDMINS_2_DATA(pDevIns, PPCNETSTATE);
     pcnetSaveConfig(pThis, pSSM);
     return VINF_SSM_DONT_CALL_AGAIN;
@@ -4211,6 +4227,7 @@ static DECLCALLBACK(int) pcnetLiveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint
  */
 static DECLCALLBACK(int) pcnetSavePrep(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
 {
+    RT_NOREF(pSSM);
     PPCNETSTATE pThis = PDMINS_2_DATA(pDevIns, PPCNETSTATE);
 
     int rc = PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY);
@@ -4394,6 +4411,7 @@ static DECLCALLBACK(int) pcnetLoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint
  */
 static DECLCALLBACK(int) pcnetLoadDone(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
 {
+    RT_NOREF(pSSM);
     PPCNETSTATE pThis = PDMINS_2_DATA(pDevIns, PPCNETSTATE);
     int rc = VINF_SUCCESS;
     if (pThis->fSharedRegion)
@@ -4685,6 +4703,7 @@ static DECLCALLBACK(void) pcnetPowerOff(PPDMDEVINS pDevIns)
  */
 static DECLCALLBACK(void) pcnetDetach(PPDMDEVINS pDevIns, unsigned iLUN, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
     PPCNETSTATE pThis = PDMINS_2_DATA(pDevIns, PPCNETSTATE);
     Log(("#%d pcnetDetach:\n", PCNET_INST_NR));
 
@@ -4692,7 +4711,7 @@ static DECLCALLBACK(void) pcnetDetach(PPDMDEVINS pDevIns, unsigned iLUN, uint32_
 
     PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY);
 
-    /** @todo: r=pritesh still need to check if i missed
+    /** @todo r=pritesh still need to check if i missed
      * to clean something in this function
      */
 
@@ -4714,6 +4733,7 @@ static DECLCALLBACK(void) pcnetDetach(PPDMDEVINS pDevIns, unsigned iLUN, uint32_
  */
 static DECLCALLBACK(int) pcnetAttach(PPDMDEVINS pDevIns, unsigned iLUN, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
     PPCNETSTATE pThis = PDMINS_2_DATA(pDevIns, PPCNETSTATE);
     LogFlow(("#%d pcnetAttach:\n", PCNET_INST_NR));
 
@@ -4798,6 +4818,7 @@ static DECLCALLBACK(void) pcnetReset(PPDMDEVINS pDevIns)
  */
 static DECLCALLBACK(void) pcnetRelocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta)
 {
+    RT_NOREF(offDelta);
     PPCNETSTATE pThis = PDMINS_2_DATA(pDevIns, PPCNETSTATE);
     pThis->pDevInsRC     = PDMDEVINS_2_RCPTR(pDevIns);
     pThis->pXmitQueueRC  = PDMQueueRCPtr(pThis->pXmitQueueR3);
diff --git a/src/VBox/Devices/Network/DevVirtioNet.cpp b/src/VBox/Devices/Network/DevVirtioNet.cpp
index 5789acc..0927e12 100644
--- a/src/VBox/Devices/Network/DevVirtioNet.cpp
+++ b/src/VBox/Devices/Network/DevVirtioNet.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -273,6 +273,8 @@ typedef struct VNetCtlHdr VNETCTLHDR;
 typedef VNETCTLHDR *PVNETCTLHDR;
 AssertCompileSize(VNETCTLHDR, 2);
 
+#ifdef IN_RING3
+
 /** Returns true if large packets are written into several RX buffers. */
 DECLINLINE(bool) vnetMergeableRxBuffers(PVNETSTATE pThis)
 {
@@ -289,8 +291,12 @@ DECLINLINE(void) vnetCsLeave(PVNETSTATE pThis)
     vpciCsLeave(&pThis->VPCI);
 }
 
+#endif /* IN_RING3 */
+
 DECLINLINE(int) vnetCsRxEnter(PVNETSTATE pThis, int rcBusy)
 {
+    RT_NOREF_PV(pThis);
+    RT_NOREF_PV(rcBusy);
     // STAM_PROFILE_START(&pThis->CTXSUFF(StatCsRx), a);
     // int rc = PDMCritSectEnter(&pThis->csRx, rcBusy);
     // STAM_PROFILE_STOP(&pThis->CTXSUFF(StatCsRx), a);
@@ -300,25 +306,30 @@ DECLINLINE(int) vnetCsRxEnter(PVNETSTATE pThis, int rcBusy)
 
 DECLINLINE(void) vnetCsRxLeave(PVNETSTATE pThis)
 {
+    RT_NOREF_PV(pThis);
     // PDMCritSectLeave(&pThis->csRx);
 }
 
+#ifdef IN_RING3
 /**
  * Dump a packet to debug log.
  *
- * @param   pThis      The device state structure.
- * @param   cpPacket    The packet.
+ * @param   pThis       The device state structure.
+ * @param   pbPacket    The packet.
  * @param   cb          The size of the packet.
- * @param   cszText     A string denoting direction of packet transfer.
+ * @param   pszText     A string denoting direction of packet transfer.
  */
-DECLINLINE(void) vnetPacketDump(PVNETSTATE pThis, const uint8_t *cpPacket, size_t cb, const char *cszText)
+DECLINLINE(void) vnetPacketDump(PVNETSTATE pThis, const uint8_t *pbPacket, size_t cb, const char *pszText)
 {
-#ifdef DEBUG
+# ifdef DEBUG
     Log(("%s %s packet #%d (%d bytes):\n",
-         INSTANCE(pThis), cszText, ++pThis->u32PktNo, cb));
-    Log3(("%.*Rhxd\n", cb, cpPacket));
-#endif
+         INSTANCE(pThis), pszText, ++pThis->u32PktNo, cb));
+    Log3(("%.*Rhxd\n", cb, pbPacket));
+# else
+    RT_NOREF4(pThis, pbPacket, cb, pszText);
+# endif
 }
+#endif /* IN_RING3 */
 
 /**
  * Print features given in uFeatures to debug log.
@@ -361,11 +372,15 @@ DECLINLINE(void) vnetPrintFeatures(PVNETSTATE pThis, uint32_t fFeatures, const c
         if (s_aFeatures[i].uMask & fFeatures)
             Log3(("%s --> %s\n", INSTANCE(pThis), s_aFeatures[i].pcszDesc));
     }
-#endif /* DEBUG */
+#else  /* !DEBUG */
+    RT_NOREF3(pThis, fFeatures, pcszText);
+#endif /* !DEBUG */
 }
 
 static DECLCALLBACK(uint32_t) vnetIoCb_GetHostFeatures(void *pvState)
 {
+    RT_NOREF_PV(pvState);
+
     /* We support:
      * - Host-provided MAC address
      * - Link status reporting in config space
@@ -397,6 +412,7 @@ static DECLCALLBACK(uint32_t) vnetIoCb_GetHostFeatures(void *pvState)
 
 static DECLCALLBACK(uint32_t) vnetIoCb_GetHostMinimalFeatures(void *pvState)
 {
+    RT_NOREF_PV(pvState);
     return VNET_F_MAC;
 }
 
@@ -454,7 +470,7 @@ static DECLCALLBACK(int) vnetIoCb_Reset(void *pvState)
     vpciReset(&pThis->VPCI);
     vnetCsRxLeave(pThis);
 
-    // TODO: Implement reset
+    /// @todo Implement reset
     if (pThis->fCableConnected)
         STATUS = VNET_S_LINK_UP;
     else
@@ -528,6 +544,7 @@ static void vnetTempLinkDown(PVNETSTATE pThis)
  */
 static DECLCALLBACK(void) vnetLinkUpTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
 {
+    RT_NOREF(pTimer);
     PVNETSTATE pThis = (PVNETSTATE)pvUser;
 
     int rc = vnetCsEnter(pThis, VERR_SEM_BUSY);
@@ -548,6 +565,7 @@ static DECLCALLBACK(void) vnetLinkUpTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, v
  */
 static DECLCALLBACK(bool) vnetCanRxQueueConsumer(PPDMDEVINS pDevIns, PPDMQUEUEITEMCORE pItem)
 {
+    RT_NOREF(pItem);
     vnetWakeupReceive(pDevIns);
     return true;
 }
@@ -760,7 +778,7 @@ static bool vnetAddressFilter(PVNETSTATE pThis, const void *pvBuf, size_t cb)
             return true;
 
     Log2(("%s vnetAddressFilter: failed all tests, returning false, packet dump follows:\n", INSTANCE(pThis)));
-    vnetPacketDump(pThis, (const uint8_t*)pvBuf, cb, "<-- Incoming");
+    vnetPacketDump(pThis, (const uint8_t *)pvBuf, cb, "<-- Incoming");
 
     return false;
 }
@@ -822,7 +840,7 @@ static int vnetHandleRxPacket(PVNETSTATE pThis, const void *pvBuf, size_t cb,
     else
         uHdrLen = sizeof(VNETHDR);
 
-    vnetPacketDump(pThis, (const uint8_t*)pvBuf, cb, "<-- Incoming");
+    vnetPacketDump(pThis, (const uint8_t *)pvBuf, cb, "<-- Incoming");
 
     unsigned int uOffset = 0;
     unsigned int nElem;
@@ -1057,6 +1075,7 @@ static DECLCALLBACK(int) vnetSetLinkState(PPDMINETWORKCONFIG pInterface, PDMNETW
 
 static DECLCALLBACK(void) vnetQueueReceive(void *pvState, PVQUEUE pQueue)
 {
+    RT_NOREF(pQueue);
     PVNETSTATE pThis = (PVNETSTATE)pvState;
     Log(("%s Receive buffers has been added, waking up receive thread.\n", INSTANCE(pThis)));
     vnetWakeupReceive(pThis->VPCI.CTX_SUFF(pDevIns));
@@ -1219,7 +1238,7 @@ static void vnetTransmitPendingPackets(PVNETSTATE pThis, PVQUEUE pQueue, bool fO
                         uOffset += elem.aSegsOut[i].cb;
                     }
                     pSgBuf->cbUsed = uSize;
-                    vnetPacketDump(pThis, (uint8_t*)pSgBuf->aSegs[0].pvSeg, uSize, "--> Outgoing");
+                    vnetPacketDump(pThis, (uint8_t *)pSgBuf->aSegs[0].pvSeg, uSize, "--> Outgoing");
                     if (pGso)
                     {
                         /* Some guests (RHEL) may report HdrLen excluding transport layer header! */
@@ -1309,7 +1328,7 @@ static DECLCALLBACK(void) vnetQueueTransmit(void *pvState, PVQUEUE pQueue)
 
     if (TMTimerIsActive(pThis->CTX_SUFF(pTxTimer)))
     {
-        int rc = TMTimerStop(pThis->CTX_SUFF(pTxTimer));
+        TMTimerStop(pThis->CTX_SUFF(pTxTimer));
         Log3(("%s vnetQueueTransmit: Got kicked with notification disabled, re-enable notification and flush TX queue\n", INSTANCE(pThis)));
         vnetTransmitPendingPackets(pThis, pQueue, false /*fOnWorkerThread*/);
         if (RT_FAILURE(vnetCsEnter(pThis, VERR_SEM_BUSY)))
@@ -1339,6 +1358,7 @@ static DECLCALLBACK(void) vnetQueueTransmit(void *pvState, PVQUEUE pQueue)
  */
 static DECLCALLBACK(void) vnetTxTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
 {
+    RT_NOREF(pDevIns, pTimer);
     PVNETSTATE pThis = (PVNETSTATE)pvUser;
 
     uint32_t u32MicroDiff = (uint32_t)((RTTimeNanoTS() - pThis->u64NanoTS)/1000);
@@ -1527,7 +1547,6 @@ static DECLCALLBACK(void) vnetQueueControl(void *pvState, PVQUEUE pQueue)
     VQUEUEELEM elem;
     while (vqueueGet(&pThis->VPCI, pQueue, &elem))
     {
-        unsigned int uOffset = 0;
         if (elem.nOut < 1 || elem.aSegsOut[0].cb < sizeof(VNETCTLHDR))
         {
             Log(("%s vnetQueueControl: The first 'out' segment is not the header! (%u < 1 || %u < %u).\n",
@@ -1591,6 +1610,7 @@ static void vnetSaveConfig(PVNETSTATE pThis, PSSMHANDLE pSSM)
  */
 static DECLCALLBACK(int) vnetLiveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uPass)
 {
+    RT_NOREF(uPass);
     PVNETSTATE pThis = PDMINS_2_DATA(pDevIns, PVNETSTATE);
     vnetSaveConfig(pThis, pSSM);
     return VINF_SSM_DONT_CALL_AGAIN;
@@ -1602,6 +1622,7 @@ static DECLCALLBACK(int) vnetLiveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint3
  */
 static DECLCALLBACK(int) vnetSavePrep(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
 {
+    RT_NOREF(pSSM);
     PVNETSTATE pThis = PDMINS_2_DATA(pDevIns, PVNETSTATE);
 
     int rc = vnetCsRxEnter(pThis, VERR_SEM_BUSY);
@@ -1650,6 +1671,7 @@ static DECLCALLBACK(int) vnetSaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
  */
 static DECLCALLBACK(int) vnetLoadPrep(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
 {
+    RT_NOREF(pSSM);
     PVNETSTATE pThis = PDMINS_2_DATA(pDevIns, PVNETSTATE);
 
     int rc = vnetCsRxEnter(pThis, VERR_SEM_BUSY);
@@ -1728,6 +1750,7 @@ static DECLCALLBACK(int) vnetLoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint3
  */
 static DECLCALLBACK(int) vnetLoadDone(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
 {
+    RT_NOREF(pSSM);
     PVNETSTATE pThis = PDMINS_2_DATA(pDevIns, PVNETSTATE);
 
     if (pThis->pDrv)
@@ -1749,9 +1772,9 @@ static DECLCALLBACK(int) vnetLoadDone(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
 /**
  * @callback_method_impl{FNPCIIOREGIONMAP}
  */
-static DECLCALLBACK(int) vnetMap(PPCIDEVICE pPciDev, int iRegion,
-                                 RTGCPHYS GCPhysAddress, uint32_t cb, PCIADDRESSSPACE enmType)
+static DECLCALLBACK(int) vnetMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, uint32_t cb, PCIADDRESSSPACE enmType)
 {
+    RT_NOREF(iRegion);
     PVNETSTATE pThis = PDMINS_2_DATA(pPciDev->pDevIns, PVNETSTATE);
     int       rc;
 
@@ -1788,6 +1811,7 @@ static DECLCALLBACK(int) vnetMap(PPCIDEVICE pPciDev, int iRegion,
  */
 static DECLCALLBACK(void) vnetDetach(PPDMDEVINS pDevIns, unsigned iLUN, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
     PVNETSTATE pThis = PDMINS_2_DATA(pDevIns, PVNETSTATE);
     Log(("%s vnetDetach:\n", INSTANCE(pThis)));
 
@@ -1815,6 +1839,7 @@ static DECLCALLBACK(void) vnetDetach(PPDMDEVINS pDevIns, unsigned iLUN, uint32_t
  */
 static DECLCALLBACK(int) vnetAttach(PPDMDEVINS pDevIns, unsigned iLUN, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
     PVNETSTATE pThis = PDMINS_2_DATA(pDevIns, PVNETSTATE);
     LogFlow(("%s vnetAttach:\n",  INSTANCE(pThis)));
 
@@ -2055,7 +2080,7 @@ static DECLCALLBACK(int) vnetConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMN
     pThis->pTxTimerRC = TMTimerRCPtr(pThis->pTxTimerR3);
 
     pThis->u32i = pThis->u32AvgDiff = pThis->u32MaxDiff = 0;
-    pThis->u32MinDiff = ~0;
+    pThis->u32MinDiff = UINT32_MAX;
 #endif /* VNET_TX_DELAY */
 
     rc = PDMDevHlpDriverAttach(pDevIns, 0, &pThis->VPCI.IBase, &pThis->pDrvBase, "Network Port");
diff --git a/src/VBox/Devices/Network/DrvDedicatedNic.cpp b/src/VBox/Devices/Network/DrvDedicatedNic.cpp
index 128fcda..84aec71 100644
--- a/src/VBox/Devices/Network/DrvDedicatedNic.cpp
+++ b/src/VBox/Devices/Network/DrvDedicatedNic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -139,6 +139,7 @@ typedef enum DRVDEDICATEDNICR0OP
  */
 PDMBOTHCBDECL(int) drvR0DedicatedNicReqHandler(PPDMDRVINS pDrvIns, uint32_t uOperation, uint64_t u64Arg)
 {
+    RT_NOREF_PV(pDrvIns); RT_NOREF_PV(u64Arg);
     switch ((DRVDEDICATEDNICR0OP)uOperation)
     {
         case DRVDEDICATEDNICR0OP_INIT:
@@ -166,13 +167,14 @@ PDMBOTHCBDECL(int) drvR0DedicatedNicReqHandler(PPDMDRVINS pDrvIns, uint32_t uOpe
         default:
             return VERR_INVALID_FUNCTION;
     }
-    return VINF_SUCCESS;
 }
 
 #endif /* IN_RING0 */
 
 
 
+#if 0 /* currently unused */
+
 /* -=-=-=-=- PDMINETWORKUP -=-=-=-=- */
 
 /**
@@ -205,6 +207,7 @@ PDMBOTHCBDECL(int) drvDedicatedNicUp_AllocBuf(PPDMINETWORKUP pInterface, size_t
 
 #ifdef IN_RING0
     /** @todo Ask the driver for a buffer, atomically if we're called on EMT.  */
+    RT_NOREF_PV(cbMin); RT_NOREF_PV(pGso); RT_NOREF_PV(ppSgBuf);
     return VERR_TRY_AGAIN;
 
 #else  /* IN_RING3 */
@@ -252,10 +255,14 @@ PDMBOTHCBDECL(int) drvDedicatedNicUp_AllocBuf(PPDMINETWORKUP pInterface, size_t
  */
 PDMBOTHCBDECL(int) drvDedicatedNicUp_FreeBuf(PPDMINETWORKUP pInterface, PPDMSCATTERGATHER pSgBuf)
 {
+#ifdef VBOX_STRICT
     PDRVDEDICATEDNIC  pThis = RT_FROM_MEMBER(pInterface, DRVDEDICATEDNIC, CTX_SUFF(INetworkUp));
     Assert(pSgBuf->fFlags == (PDMSCATTERGATHER_FLAGS_MAGIC | PDMSCATTERGATHER_FLAGS_OWNER_1));
     Assert(pSgBuf->cbUsed <= pSgBuf->cbAvailable);
     Assert(PDMCritSectIsOwner(&pThis->XmitLock));
+#else
+    RT_NOREF1(pInterface);
+#endif
 
     if (pSgBuf)
     {
@@ -292,10 +299,12 @@ PDMBOTHCBDECL(int) drvDedicatedNicUp_SendBuf(PPDMINETWORKUP pInterface, PPDMSCAT
     /*
      * Tell the driver to send the packet.
      */
-
+    RT_NOREF_PV(pThis); RT_NOREF_PV(pSgBuf); RT_NOREF_PV(fOnWorkerThread);
     return VERR_INTERNAL_ERROR_4;
 
 #else  /* IN_RING3 */
+    NOREF(fOnWorkerThread);
+
     /*
      * Call ring-0 to start the transfer.
      */
@@ -326,10 +335,12 @@ PDMBOTHCBDECL(void) drvDedicatedNicUp_SetPromiscuousMode(PPDMINETWORKUP pInterfa
 {
     PDRVDEDICATEDNIC pThis = RT_FROM_MEMBER(pInterface, DRVDEDICATEDNIC, CTX_SUFF(INetworkUp));
     /** @todo enable/disable promiscuous mode (should be easy) */
-    NOREF(pThis);
+    NOREF(pThis); RT_NOREF_PV(fPromiscuous);
 }
 
+#endif /* unused */
 #ifdef IN_RING3
+# if 0 /* currently unused */
 
 /**
  * @interface_method_impl{PDMINETWORKUP,pfnNotifyLinkChanged}
@@ -384,6 +395,8 @@ static DECLCALLBACK(void *) drvR3DedicatedNicIBase_QueryInterface(PPDMIBASE pInt
     return NULL;
 }
 
+# endif /* Currently unused */
+
 
 /* -=-=-=-=- PDMDRVREG -=-=-=-=- */
 
@@ -393,8 +406,6 @@ static DECLCALLBACK(void *) drvR3DedicatedNicIBase_QueryInterface(PPDMIBASE pInt
 static DECLCALLBACK(void) drvR3DedicatedNicPowerOff(PPDMDRVINS pDrvIns)
 {
     LogFlow(("drvR3DedicatedNicPowerOff\n"));
-    PDRVDEDICATEDNIC pThis = PDMINS_2_DATA(pDrvIns, PDRVDEDICATEDNIC);
-
     int rc = PDMDrvHlpCallR0(pDrvIns, DRVDEDICATEDNICR0OP_SUSPEND, 0);
     AssertRC(rc);
 }
@@ -406,8 +417,6 @@ static DECLCALLBACK(void) drvR3DedicatedNicPowerOff(PPDMDRVINS pDrvIns)
 static DECLCALLBACK(void) drvR3DedicatedNicResume(PPDMDRVINS pDrvIns)
 {
     LogFlow(("drvR3DedicatedNicPowerResume\n"));
-    PDRVDEDICATEDNIC pThis = PDMINS_2_DATA(pDrvIns, PDRVDEDICATEDNIC);
-
     int rc = PDMDrvHlpCallR0(pDrvIns, DRVDEDICATEDNICR0OP_RESUME, 0);
     AssertRC(rc);
 }
@@ -419,8 +428,6 @@ static DECLCALLBACK(void) drvR3DedicatedNicResume(PPDMDRVINS pDrvIns)
 static DECLCALLBACK(void) drvR3DedicatedNicSuspend(PPDMDRVINS pDrvIns)
 {
     LogFlow(("drvR3DedicatedNicPowerSuspend\n"));
-    PDRVDEDICATEDNIC pThis = PDMINS_2_DATA(pDrvIns, PDRVDEDICATEDNIC);
-
     int rc = PDMDrvHlpCallR0(pDrvIns, DRVDEDICATEDNICR0OP_SUSPEND, 0);
     AssertRC(rc);
 }
@@ -432,8 +439,6 @@ static DECLCALLBACK(void) drvR3DedicatedNicSuspend(PPDMDRVINS pDrvIns)
 static DECLCALLBACK(void) drvR3DedicatedNicPowerOn(PPDMDRVINS pDrvIns)
 {
     LogFlow(("drvR3DedicatedNicPowerOn\n"));
-    PDRVDEDICATEDNIC pThis = PDMINS_2_DATA(pDrvIns, PDRVDEDICATEDNIC);
-
     int rc = PDMDrvHlpCallR0(pDrvIns, DRVDEDICATEDNICR0OP_RESUME, 0);
     AssertRC(rc);
 }
@@ -461,9 +466,9 @@ static DECLCALLBACK(void) drvR3DedicatedNicDestruct(PPDMDRVINS pDrvIns)
  */
 static DECLCALLBACK(int) drvR3DedicatedNicConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
-    PDRVDEDICATEDNIC pThis = PDMINS_2_DATA(pDrvIns, PDRVDEDICATEDNIC);
-    bool f;
+    RT_NOREF(pCfg, fFlags);
     PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
+    PDRVDEDICATEDNIC pThis = PDMINS_2_DATA(pDrvIns, PDRVDEDICATEDNIC);
 
     /*
      * Init the static parts.
diff --git a/src/VBox/Devices/Network/DrvIntNet.cpp b/src/VBox/Devices/Network/DrvIntNet.cpp
index 3f190e4..5f08394 100644
--- a/src/VBox/Devices/Network/DrvIntNet.cpp
+++ b/src/VBox/Devices/Network/DrvIntNet.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -261,13 +261,14 @@ static int drvR3IntNetSetActive(PDRVINTNET pThis, bool fActive)
 
 /* -=-=-=-=- PDMINETWORKUP -=-=-=-=- */
 
+#ifndef IN_RING3
 /**
  * Helper for signalling the xmit thread.
  *
  * @returns VERR_TRY_AGAIN (convenience).
  * @param   pThis               The instance data..
  */
-DECLINLINE(int) drvIntNetSignalXmit(PDRVINTNET pThis)
+DECLINLINE(int) drvR0IntNetSignalXmit(PDRVINTNET pThis)
 {
     /// @todo if (!ASMAtomicXchgBool(&pThis->fXmitSignalled, true)) - needs careful optimizing.
     {
@@ -277,6 +278,7 @@ DECLINLINE(int) drvIntNetSignalXmit(PDRVINTNET pThis)
     }
     return VERR_TRY_AGAIN;
 }
+#endif /* !IN_RING3 */
 
 
 /**
@@ -303,7 +305,7 @@ DECLINLINE(int) drvIntNetProcessXmit(PDRVINTNET pThis)
     if (rc == VERR_TRY_AGAIN)
     {
         ASMAtomicUoWriteBool(&pThis->fXmitProcessRing, true);
-        drvIntNetSignalXmit(pThis);
+        drvR0IntNetSignalXmit(pThis);
         rc = VINF_SUCCESS;
     }
 #endif
@@ -348,7 +350,7 @@ PDMBOTHCBDECL(int) drvIntNetUp_BeginXmit(PPDMINETWORKUP pInterface, bool fOnWork
         }
         rc = VERR_TRY_AGAIN;
 #else  /* IN_RING0 */
-        rc = drvIntNetSignalXmit(pThis);
+        rc = drvR0IntNetSignalXmit(pThis);
 #endif /* IN_RING0 */
     }
     return rc;
@@ -378,7 +380,7 @@ PDMBOTHCBDECL(int) drvIntNetUp_AllocBuf(PPDMINETWORKUP pInterface, size_t cbMin,
 #else
     PPDMSCATTERGATHER pSgBuf = &pThis->u.Sg;
     if (RT_UNLIKELY(pSgBuf->fFlags != 0))
-        return drvIntNetSignalXmit(pThis);
+        return drvR0IntNetSignalXmit(pThis);
 #endif
 
     /*
@@ -441,7 +443,7 @@ PDMBOTHCBDECL(int) drvIntNetUp_AllocBuf(PPDMINETWORKUP pInterface, size_t cbMin,
     if (pThis->CTX_SUFF(pBuf)->cbSend >= cbMin * 2 + sizeof(INTNETHDR))
     {
         pThis->fXmitProcessRing = true;
-        rc = drvIntNetSignalXmit(pThis);
+        rc = drvR0IntNetSignalXmit(pThis);
     }
     else
         rc = VERR_NO_MEMORY;
@@ -487,6 +489,7 @@ PDMBOTHCBDECL(int) drvIntNetUp_SendBuf(PPDMINETWORKUP pInterface, PPDMSCATTERGAT
 {
     PDRVINTNET  pThis = RT_FROM_MEMBER(pInterface, DRVINTNET, CTX_SUFF(INetworkUp));
     STAM_PROFILE_START(&pThis->StatTransmit, a);
+    RT_NOREF_PV(fOnWorkerThread);
 
     AssertPtr(pSgBuf);
     Assert(pSgBuf->fFlags == (PDMSCATTERGATHER_FLAGS_MAGIC | PDMSCATTERGATHER_FLAGS_OWNER_1));
@@ -640,6 +643,7 @@ static DECLCALLBACK(int) drvR3IntNetXmitThread(PPDMDRVINS pDrvIns, PPDMTHREAD pT
  */
 static DECLCALLBACK(int) drvR3IntNetXmitWakeUp(PPDMDRVINS pDrvIns, PPDMTHREAD pThread)
 {
+    RT_NOREF(pThread);
     PDRVINTNET pThis = PDMINS_2_DATA(pDrvIns, PDRVINTNET);
     return SUPSemEventSignal(pThis->pSupDrvSession, pThis->hXmitEvt);
 }
@@ -775,11 +779,11 @@ static int drvR3IntNetRecvRun(PDRVINTNET pThis)
                                           cbFrame - sizeof(*pGso), pGso + 1));
                                 }
 #endif
-                                for (size_t iSeg = 0; iSeg < cSegs; iSeg++)
+                                for (uint32_t iSeg = 0; iSeg < cSegs; iSeg++)
                                 {
                                     uint32_t cbSegFrame;
-                                    void    *pvSegFrame = PDMNetGsoCarveSegmentQD(pGso, (uint8_t *)(pGso + 1), cbFrame, abHdrScratch,
-                                                                                  iSeg, cSegs, &cbSegFrame);
+                                    void    *pvSegFrame = PDMNetGsoCarveSegmentQD(pGso, (uint8_t *)(pGso + 1), cbFrame,
+                                                                                  abHdrScratch, iSeg, cSegs, &cbSegFrame);
                                     rc = drvR3IntNetRecvWaitForSpace(pThis);
                                     if (RT_FAILURE(rc))
                                     {
@@ -870,11 +874,12 @@ static int drvR3IntNetRecvRun(PDRVINTNET pThis)
  * Asynchronous I/O thread for handling receive.
  *
  * @returns VINF_SUCCESS (ignored).
- * @param   ThreadSelf      Thread handle.
+ * @param   hThreadSelf     Thread handle.
  * @param   pvUser          Pointer to a DRVINTNET structure.
  */
-static DECLCALLBACK(int) drvR3IntNetRecvThread(RTTHREAD ThreadSelf, void *pvUser)
+static DECLCALLBACK(int) drvR3IntNetRecvThread(RTTHREAD hThreadSelf, void *pvUser)
 {
+    RT_NOREF(hThreadSelf);
     PDRVINTNET pThis = (PDRVINTNET)pvUser;
     LogFlow(("drvR3IntNetRecvThread: pThis=%p\n", pThis));
     STAM_PROFILE_ADV_START(&pThis->StatReceive, a);
@@ -932,6 +937,8 @@ static DECLCALLBACK(RTRCPTR) drvR3IntNetIBaseRC_QueryInterface(PPDMIBASERC pInte
 
 #if 0
     PDMIBASERC_RETURN_INTERFACE(pThis->pDrvInsR3, pszIID, PDMINETWORKUP, &pThis->INetworkUpRC);
+#else
+    RT_NOREF(pThis, pszIID);
 #endif
     return NIL_RTRCPTR;
 }
@@ -1147,6 +1154,7 @@ static DECLCALLBACK(void) drvR3IntNetPowerOn(PPDMDRVINS pDrvIns)
 static DECLCALLBACK(void) drvR3IntNetRelocate(PPDMDRVINS pDrvIns, RTGCINTPTR offDelta)
 {
     /* nothing to do here yet */
+    RT_NOREF(pDrvIns, offDelta);
 }
 
 
@@ -1184,7 +1192,7 @@ static DECLCALLBACK(void) drvR3IntNetDestruct(PPDMDRVINS pDrvIns)
         AbortWaitReq.hIf          = pThis->hIf;
         AbortWaitReq.fNoMoreWaits = true;
         int rc = PDMDrvHlpSUPCallVMMR0Ex(pDrvIns, VMMR0_DO_INTNET_IF_ABORT_WAIT, &AbortWaitReq, sizeof(AbortWaitReq));
-        AssertMsg(RT_SUCCESS(rc) || rc == VERR_SEM_DESTROYED, ("%Rrc\n", rc));
+        AssertMsg(RT_SUCCESS(rc) || rc == VERR_SEM_DESTROYED, ("%Rrc\n", rc)); RT_NOREF_PV(rc);
     }
 
     /*
@@ -1345,9 +1353,10 @@ static int drvIntNetR3CfgGetPolicy(PPDMDRVINS pDrvIns, const char *pszName, PCDR
  */
 static DECLCALLBACK(int) drvR3IntNetConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
+    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
     PDRVINTNET pThis = PDMINS_2_DATA(pDrvIns, PDRVINTNET);
     bool f;
-    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
 
     /*
      * Init the static parts.
diff --git a/src/VBox/Devices/Network/DrvNAT.cpp b/src/VBox/Devices/Network/DrvNAT.cpp
index 893d287..af966ca 100644
--- a/src/VBox/Devices/Network/DrvNAT.cpp
+++ b/src/VBox/Devices/Network/DrvNAT.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -233,6 +233,9 @@ DECLINLINE(void) drvNATUpdateDNS(PDRVNAT pThis, bool fFlapLink);
 static DECLCALLBACK(int) drvNATReinitializeHostNameResolving(PDRVNAT pThis);
 
 
+/**
+ * @callback_method_impl{FNPDMTHREADDRV}
+ */
 static DECLCALLBACK(int) drvNATRecv(PPDMDRVINS pDrvIns, PPDMTHREAD pThread)
 {
     PDRVNAT pThis = PDMINS_2_DATA(pDrvIns, PDRVNAT);
@@ -250,8 +253,12 @@ static DECLCALLBACK(int) drvNATRecv(PPDMDRVINS pDrvIns, PPDMTHREAD pThread)
 }
 
 
+/**
+ * @callback_method_impl{FNPDMTHREADWAKEUPDRV}
+ */
 static DECLCALLBACK(int) drvNATRecvWakeup(PPDMDRVINS pDrvIns, PPDMTHREAD pThread)
 {
+    RT_NOREF(pThread);
     PDRVNAT pThis = PDMINS_2_DATA(pDrvIns, PDRVNAT);
     int rc;
     rc = RTSemEventSignal(pThis->EventRecv);
@@ -260,6 +267,10 @@ static DECLCALLBACK(int) drvNATRecvWakeup(PPDMDRVINS pDrvIns, PPDMTHREAD pThread
     return VINF_SUCCESS;
 }
 
+
+/**
+ * @callback_method_impl{FNPDMTHREADDRV}
+ */
 static DECLCALLBACK(int) drvNATUrgRecv(PPDMDRVINS pDrvIns, PPDMTHREAD pThread)
 {
     PDRVNAT pThis = PDMINS_2_DATA(pDrvIns, PDRVNAT);
@@ -279,8 +290,13 @@ static DECLCALLBACK(int) drvNATUrgRecv(PPDMDRVINS pDrvIns, PPDMTHREAD pThread)
     return VINF_SUCCESS;
 }
 
+
+/**
+ * @callback_method_impl{FNPDMTHREADWAKEUPDRV}
+ */
 static DECLCALLBACK(int) drvNATUrgRecvWakeup(PPDMDRVINS pDrvIns, PPDMTHREAD pThread)
 {
+    RT_NOREF(pThread);
     PDRVNAT pThis = PDMINS_2_DATA(pDrvIns, PDRVNAT);
     int rc = RTSemEventSignal(pThis->EventUrgRecv);
     AssertRC(rc);
@@ -288,6 +304,7 @@ static DECLCALLBACK(int) drvNATUrgRecvWakeup(PPDMDRVINS pDrvIns, PPDMTHREAD pThr
     return VINF_SUCCESS;
 }
 
+
 static DECLCALLBACK(void) drvNATUrgRecvWorker(PDRVNAT pThis, uint8_t *pu8Buf, int cb, struct mbuf *m)
 {
     int rc = RTCritSectEnter(&pThis->DevAccessLock);
@@ -422,7 +439,7 @@ static void drvNATSendWorker(PDRVNAT pThis, PPDMSCATTERGATHER pSgBuf)
             uint8_t const  *pbFrame = (uint8_t const *)pSgBuf->aSegs[0].pvSeg;
             PCPDMNETWORKGSO pGso    = (PCPDMNETWORKGSO)pSgBuf->pvUser;
             uint32_t const  cSegs   = PDMNetGsoCalcSegmentCount(pGso, pSgBuf->cbUsed);  Assert(cSegs > 1);
-            for (size_t iSeg = 0; iSeg < cSegs; iSeg++)
+            for (uint32_t iSeg = 0; iSeg < cSegs; iSeg++)
             {
                 size_t cbSeg;
                 void  *pvSeg;
@@ -458,6 +475,7 @@ static void drvNATSendWorker(PDRVNAT pThis, PPDMSCATTERGATHER pSgBuf)
  */
 static DECLCALLBACK(int) drvNATNetworkUp_BeginXmit(PPDMINETWORKUP pInterface, bool fOnWorkerThread)
 {
+    RT_NOREF(fOnWorkerThread);
     PDRVNAT pThis = RT_FROM_MEMBER(pInterface, DRVNAT, INetworkUp);
     int rc = RTCritSectTryEnter(&pThis->XmitLock);
     if (RT_FAILURE(rc))
@@ -571,6 +589,7 @@ static DECLCALLBACK(int) drvNATNetworkUp_FreeBuf(PPDMINETWORKUP pInterface, PPDM
  */
 static DECLCALLBACK(int) drvNATNetworkUp_SendBuf(PPDMINETWORKUP pInterface, PPDMSCATTERGATHER pSgBuf, bool fOnWorkerThread)
 {
+    RT_NOREF(fOnWorkerThread);
     PDRVNAT pThis = RT_FROM_MEMBER(pInterface, DRVNAT, INetworkUp);
     Assert((pSgBuf->fFlags & PDMSCATTERGATHER_FLAGS_OWNER_MASK) == PDMSCATTERGATHER_FLAGS_OWNER_1);
     Assert(RTCritSectIsOwner(&pThis->XmitLock));
@@ -612,6 +631,7 @@ static DECLCALLBACK(void) drvNATNetworkUp_EndXmit(PPDMINETWORKUP pInterface)
  */
 static void drvNATNotifyNATThread(PDRVNAT pThis, const char *pszWho)
 {
+    RT_NOREF(pszWho);
     int rc;
 #ifndef RT_OS_WINDOWS
     /* kick poll() */
@@ -629,6 +649,7 @@ static void drvNATNotifyNATThread(PDRVNAT pThis, const char *pszWho)
  */
 static DECLCALLBACK(void) drvNATNetworkUp_SetPromiscuousMode(PPDMINETWORKUP pInterface, bool fPromiscuous)
 {
+    RT_NOREF(pInterface, fPromiscuous);
     LogFlow(("drvNATNetworkUp_SetPromiscuousMode: fPromiscuous=%d\n", fPromiscuous));
     /* nothing to do */
 }
@@ -848,7 +869,8 @@ static DECLCALLBACK(int) drvNATAsyncIoThread(PPDMDRVINS pDrvIns, PPDMTHREAD pThr
         DWORD dwEvent = WSAWaitForMultipleEvents(nFDs, phEvents, FALSE,
                                                  slirp_get_timeout_ms(pThis->pNATState),
                                                  /* :fAlertable */ TRUE);
-        if (   (dwEvent < WSA_WAIT_EVENT_0 || dwEvent > WSA_WAIT_EVENT_0 + nFDs - 1)
+        AssertCompile(WSA_WAIT_EVENT_0 == 0);
+        if (   (/*dwEvent < WSA_WAIT_EVENT_0 ||*/ dwEvent > WSA_WAIT_EVENT_0 + nFDs - 1)
             && dwEvent != WSA_WAIT_TIMEOUT && dwEvent != WSA_WAIT_IO_COMPLETION)
         {
             int error = WSAGetLastError();
@@ -890,6 +912,7 @@ static DECLCALLBACK(int) drvNATAsyncIoThread(PPDMDRVINS pDrvIns, PPDMTHREAD pThr
  */
 static DECLCALLBACK(int) drvNATAsyncIoWakeup(PPDMDRVINS pDrvIns, PPDMTHREAD pThread)
 {
+    RT_NOREF(pThread);
     PDRVNAT pThis = PDMINS_2_DATA(pDrvIns, PDRVNAT);
 
     drvNATNotifyNATThread(pThis, "drvNATAsyncIoWakeup");
@@ -925,6 +948,7 @@ static DECLCALLBACK(int) drvNATReqQueueInterrupt()
 
 static DECLCALLBACK(int) drvNATHostResWakeup(PPDMDRVINS pDrvIns, PPDMTHREAD pThread)
 {
+    RT_NOREF(pThread);
     PDRVNAT pThis = PDMINS_2_DATA(pDrvIns, PDRVNAT);
     Assert(pThis != NULL);
 
@@ -943,6 +967,7 @@ static DECLCALLBACK(int) drvNATHostResWakeup(PPDMDRVINS pDrvIns, PPDMTHREAD pThr
  */
 int slirp_can_output(void *pvUser)
 {
+    RT_NOREF(pvUser);
     return 1;
 }
 
@@ -958,8 +983,6 @@ void slirp_urg_output(void *pvUser, struct mbuf *m, const uint8_t *pu8Buf, int c
     PDRVNAT pThis = (PDRVNAT)pvUser;
     Assert(pThis);
 
-    PRTREQ pReq = NULL;
-
     /* don't queue new requests when the NAT thread is about to stop */
     if (pThis->pSlirpThread->enmState != PDMTHREADSTATE_RUNNING)
         return;
@@ -994,8 +1017,6 @@ void slirp_output(void *pvUser, struct mbuf *m, const uint8_t *pu8Buf, int cb)
     LogFlow(("slirp_output BEGIN %p %d\n", pu8Buf, cb));
     Log6(("slirp_output: pu8Buf=%p cb=%#x (pThis=%p)\n%.*Rhxd\n", pu8Buf, cb, pThis, cb, pu8Buf));
 
-    PRTREQ pReq = NULL;
-
     /* don't queue new requests when the NAT thread is about to stop */
     if (pThis->pSlirpThread->enmState != PDMTHREADSTATE_RUNNING)
         return;
@@ -1060,6 +1081,7 @@ int slirp_call_hostres(void *pvUser, PRTREQ *ppReq, RTMSINTERVAL cMillies,
 }
 
 
+#if HAVE_NOTIFICATION_FOR_DNS_UPDATE && !defined(RT_OS_DARWIN)
 /**
  * @interface_method_impl{PDMINETWORKNATCONFIG,pfnNotifyDnsChanged}
  *
@@ -1072,7 +1094,7 @@ static DECLCALLBACK(void) drvNATNotifyDnsChanged(PPDMINETWORKNATCONFIG pInterfac
     PDRVNAT pThis = RT_FROM_MEMBER(pInterface, DRVNAT, INetworkNATCfg);
     drvNATUpdateDNS(pThis, /* fFlapLink */ true);
 }
-
+#endif
 
 #ifdef RT_OS_DARWIN
 /**
@@ -1122,6 +1144,8 @@ static DECLCALLBACK(void) drvNatDnsChanged(SCDynamicStoreRef hDynStor, CFArrayRe
             }
             else
                 LogRel(("NAT: DNS server list is empty (2)\n"));
+#else
+            RT_NOREF(hDynStor);
 #endif
             drvNATUpdateDNS(pThis, /* fFlapLink */ true);
         }
@@ -1161,6 +1185,8 @@ static void drvNATSetMac(PDRVNAT pThis)
         RTMAC Mac;
         pThis->pIAboveConfig->pfnGetMac(pThis->pIAboveConfig, &Mac);
     }
+#else
+    RT_NOREF(pThis);
 #endif
 }
 
@@ -1170,8 +1196,9 @@ static void drvNATSetMac(PDRVNAT pThis)
  * Otherwise the guest is not reachable until it performs a DHCP request or an ARP request
  * (usually done during guest boot).
  */
-static DECLCALLBACK(int) drvNATLoadDone(PPDMDRVINS pDrvIns, PSSMHANDLE pSSMHandle)
+static DECLCALLBACK(int) drvNATLoadDone(PPDMDRVINS pDrvIns, PSSMHANDLE pSSM)
 {
+    RT_NOREF(pSSM);
     PDRVNAT pThis = PDMINS_2_DATA(pDrvIns, PDRVNAT);
     drvNATSetMac(pThis);
     return VINF_SUCCESS;
@@ -1291,6 +1318,7 @@ static DECLCALLBACK(void) drvNATInfo(PPDMDRVINS pDrvIns, PCDBGFINFOHLP pHlp, con
 #ifdef VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER
 static int drvNATConstructDNSMappings(unsigned iInstance, PDRVNAT pThis, PCFGMNODE pMappingsCfg)
 {
+    RT_NOREF(iInstance);
     int rc = VINF_SUCCESS;
     LogFlowFunc(("ENTER: iInstance:%d\n", iInstance));
     for (PCFGMNODE pNode = CFGMR3GetFirstChild(pMappingsCfg); pNode; pNode = CFGMR3GetNextChild(pNode))
@@ -1316,6 +1344,7 @@ static int drvNATConstructDNSMappings(unsigned iInstance, PDRVNAT pThis, PCFGMNO
             fPattern = true;
         }
         struct in_addr HostIP;
+        RT_ZERO(HostIP);
         GETIP_DEF(rc, pThis, pNode, HostIP, INADDR_ANY);
         if (rc == VERR_CFGM_VALUE_NOT_FOUND)
         {
@@ -1338,6 +1367,8 @@ static int drvNATConstructDNSMappings(unsigned iInstance, PDRVNAT pThis, PCFGMNO
  */
 static int drvNATConstructRedir(unsigned iInstance, PDRVNAT pThis, PCFGMNODE pCfg, PRTNETADDRIPV4 pNetwork)
 {
+    RT_NOREF(pNetwork); /** @todo figure why pNetwork isn't used */
+
     /*
      * Enumerate redirections.
      */
@@ -1392,10 +1423,12 @@ static int drvNATConstructRedir(unsigned iInstance, PDRVNAT pThis, PCFGMNODE pCf
 
         /* host address ("BindIP" name is rather unfortunate given "HostPort" to go with it) */
         struct in_addr BindIP;
+        RT_ZERO(BindIP);
         GETIP_DEF(rc, pThis, pNode, BindIP, INADDR_ANY);
 
         /* guest address */
         struct in_addr GuestIP;
+        RT_ZERO(GuestIP);
         GETIP_DEF(rc, pThis, pNode, GuestIP, INADDR_ANY);
 
         /*
@@ -1479,9 +1512,10 @@ static DECLCALLBACK(void) drvNATDestruct(PPDMDRVINS pDrvIns)
  */
 static DECLCALLBACK(int) drvNATConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
+    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
     PDRVNAT pThis = PDMINS_2_DATA(pDrvIns, PDRVNAT);
     LogFlow(("drvNATConstruct:\n"));
-    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
 
     /*
      * Init the static parts.
diff --git a/src/VBox/Devices/Network/DrvNetShaper.cpp b/src/VBox/Devices/Network/DrvNetShaper.cpp
index adf99fa..a996f97 100644
--- a/src/VBox/Devices/Network/DrvNetShaper.cpp
+++ b/src/VBox/Devices/Network/DrvNetShaper.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -312,6 +312,7 @@ static DECLCALLBACK(RTR0PTR) drvR3NetShaperIBaseR0_QueryInterface(PPDMIBASER0 pI
  */
 static DECLCALLBACK(RTRCPTR) drvR3NetShaperIBaseRC_QueryInterface(PPDMIBASERC pInterface, const char *pszIID)
 {
+    RT_NOREF(pInterface, pszIID);
     return NIL_RTRCPTR;
 }
 
@@ -337,6 +338,7 @@ static DECLCALLBACK(void *) drvR3NetShaperIBase_QueryInterface(PPDMIBASE pInterf
  */
 static DECLCALLBACK(void) drvR3NetShaperDetach(PPDMDRVINS pDrvIns, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
     PDRVNETSHAPER pThis = PDMINS_2_DATA(pDrvIns, PDRVNETSHAPER);
 
     LogFlow(("drvNetShaperDetach: pDrvIns: %p, fFlags: %u\n", pDrvIns, fFlags));
diff --git a/src/VBox/Devices/Network/DrvNetSniffer.cpp b/src/VBox/Devices/Network/DrvNetSniffer.cpp
index 1752eca..6b4bf9a 100644
--- a/src/VBox/Devices/Network/DrvNetSniffer.cpp
+++ b/src/VBox/Devices/Network/DrvNetSniffer.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -296,6 +296,7 @@ static DECLCALLBACK(void *) drvNetSnifferQueryInterface(PPDMIBASE pInterface, co
  */
 static DECLCALLBACK(void) drvNetSnifferDetach(PPDMDRVINS pDrvIns, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
     PDRVNETSNIFFER pThis = PDMINS_2_DATA(pDrvIns, PDRVNETSNIFFER);
 
     LogFlow(("drvNetSnifferDetach: pDrvIns: %p, fFlags: %u\n", pDrvIns, fFlags));
diff --git a/src/VBox/Devices/Network/DrvTAP.cpp b/src/VBox/Devices/Network/DrvTAP.cpp
index bc0f98a..22c0eaf 100644
--- a/src/VBox/Devices/Network/DrvTAP.cpp
+++ b/src/VBox/Devices/Network/DrvTAP.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -150,6 +150,7 @@ static int              SolarisTAPAttach(PDRVTAP pThis);
  */
 static DECLCALLBACK(int) drvTAPNetworkUp_BeginXmit(PPDMINETWORKUP pInterface, bool fOnWorkerThread)
 {
+    RT_NOREF(fOnWorkerThread);
     PDRVTAP pThis = PDMINETWORKUP_2_DRVTAP(pInterface);
     int rc = RTCritSectTryEnter(&pThis->XmitLock);
     if (RT_FAILURE(rc))
@@ -167,8 +168,11 @@ static DECLCALLBACK(int) drvTAPNetworkUp_BeginXmit(PPDMINETWORKUP pInterface, bo
 static DECLCALLBACK(int) drvTAPNetworkUp_AllocBuf(PPDMINETWORKUP pInterface, size_t cbMin,
                                                   PCPDMNETWORKGSO pGso, PPPDMSCATTERGATHER ppSgBuf)
 {
+    RT_NOREF(pInterface);
+#ifdef VBOX_STRICT
     PDRVTAP pThis = PDMINETWORKUP_2_DRVTAP(pInterface);
     Assert(RTCritSectIsOwner(&pThis->XmitLock));
+#endif
 
     /*
      * Allocate a scatter / gather buffer descriptor that is immediately
@@ -212,8 +216,12 @@ static DECLCALLBACK(int) drvTAPNetworkUp_AllocBuf(PPDMINETWORKUP pInterface, siz
  */
 static DECLCALLBACK(int) drvTAPNetworkUp_FreeBuf(PPDMINETWORKUP pInterface, PPDMSCATTERGATHER pSgBuf)
 {
+    RT_NOREF(pInterface);
+#ifdef VBOX_STRICT
     PDRVTAP pThis = PDMINETWORKUP_2_DRVTAP(pInterface);
     Assert(RTCritSectIsOwner(&pThis->XmitLock));
+#endif
+
     if (pSgBuf)
     {
         Assert((pSgBuf->fFlags & PDMSCATTERGATHER_FLAGS_MAGIC_MASK) == PDMSCATTERGATHER_FLAGS_MAGIC);
@@ -229,6 +237,7 @@ static DECLCALLBACK(int) drvTAPNetworkUp_FreeBuf(PPDMINETWORKUP pInterface, PPDM
  */
 static DECLCALLBACK(int) drvTAPNetworkUp_SendBuf(PPDMINETWORKUP pInterface, PPDMSCATTERGATHER pSgBuf, bool fOnWorkerThread)
 {
+    RT_NOREF(fOnWorkerThread);
     PDRVTAP pThis = PDMINETWORKUP_2_DRVTAP(pInterface);
     STAM_COUNTER_INC(&pThis->StatPktSent);
     STAM_COUNTER_ADD(&pThis->StatPktSentBytes, pSgBuf->cbUsed);
@@ -300,6 +309,7 @@ static DECLCALLBACK(void) drvTAPNetworkUp_EndXmit(PPDMINETWORKUP pInterface)
  */
 static DECLCALLBACK(void) drvTAPNetworkUp_SetPromiscuousMode(PPDMINETWORKUP pInterface, bool fPromiscuous)
 {
+    RT_NOREF(pInterface, fPromiscuous);
     LogFlow(("drvTAPNetworkUp_SetPromiscuousMode: fPromiscuous=%d\n", fPromiscuous));
     /* nothing to do */
 }
@@ -314,6 +324,7 @@ static DECLCALLBACK(void) drvTAPNetworkUp_SetPromiscuousMode(PPDMINETWORKUP pInt
  */
 static DECLCALLBACK(void) drvTAPNetworkUp_NotifyLinkChanged(PPDMINETWORKUP pInterface, PDMNETWORKLINKSTATE enmLinkState)
 {
+    RT_NOREF(pInterface, enmLinkState);
     LogFlow(("drvTAPNetworkUp_NotifyLinkChanged: enmLinkState=%d\n", enmLinkState));
     /** @todo take action on link down and up. Stop the polling and such like. */
 }
@@ -466,6 +477,7 @@ static DECLCALLBACK(int) drvTAPAsyncIoThread(PPDMDRVINS pDrvIns, PPDMTHREAD pThr
  */
 static DECLCALLBACK(int) drvTapAsyncIoWakeup(PPDMDRVINS pDrvIns, PPDMTHREAD pThread)
 {
+    RT_NOREF(pThread);
     PDRVTAP pThis = PDMINS_2_DATA(pDrvIns, PDRVTAP);
 
     size_t cbIgnored;
@@ -842,8 +854,9 @@ static DECLCALLBACK(void) drvTAPDestruct(PPDMDRVINS pDrvIns)
  */
 static DECLCALLBACK(int) drvTAPConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
-    PDRVTAP pThis = PDMINS_2_DATA(pDrvIns, PDRVTAP);
+    RT_NOREF(fFlags);
     PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
+    PDRVTAP pThis = PDMINS_2_DATA(pDrvIns, PDRVTAP);
 
     /*
      * Init the static parts.
diff --git a/src/VBox/Devices/Network/DrvUDPTunnel.cpp b/src/VBox/Devices/Network/DrvUDPTunnel.cpp
index 80cb96b..3048e01 100644
--- a/src/VBox/Devices/Network/DrvUDPTunnel.cpp
+++ b/src/VBox/Devices/Network/DrvUDPTunnel.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -112,6 +112,7 @@ typedef struct DRVUDPTUNNEL
  */
 static DECLCALLBACK(int) drvUDPTunnelUp_BeginXmit(PPDMINETWORKUP pInterface, bool fOnWorkerThread)
 {
+    RT_NOREF(fOnWorkerThread);
     PDRVUDPTUNNEL pThis = PDMINETWORKUP_2_DRVUDPTUNNEL(pInterface);
     int rc = RTCritSectTryEnter(&pThis->XmitLock);
     if (RT_FAILURE(rc))
@@ -126,10 +127,10 @@ static DECLCALLBACK(int) drvUDPTunnelUp_BeginXmit(PPDMINETWORKUP pInterface, boo
  * @interface_method_impl{PDMINETWORKUP,pfnAllocBuf}
  */
 static DECLCALLBACK(int) drvUDPTunnelUp_AllocBuf(PPDMINETWORKUP pInterface, size_t cbMin,
-                                                  PCPDMNETWORKGSO pGso, PPPDMSCATTERGATHER ppSgBuf)
+                                                 PCPDMNETWORKGSO pGso, PPPDMSCATTERGATHER ppSgBuf)
 {
     PDRVUDPTUNNEL pThis = PDMINETWORKUP_2_DRVUDPTUNNEL(pInterface);
-    Assert(RTCritSectIsOwner(&pThis->XmitLock));
+    Assert(RTCritSectIsOwner(&pThis->XmitLock)); NOREF(pThis);
 
     /*
      * Allocate a scatter / gather buffer descriptor that is immediately
@@ -174,7 +175,7 @@ static DECLCALLBACK(int) drvUDPTunnelUp_AllocBuf(PPDMINETWORKUP pInterface, size
 static DECLCALLBACK(int) drvUDPTunnelUp_FreeBuf(PPDMINETWORKUP pInterface, PPDMSCATTERGATHER pSgBuf)
 {
     PDRVUDPTUNNEL pThis = PDMINETWORKUP_2_DRVUDPTUNNEL(pInterface);
-    Assert(RTCritSectIsOwner(&pThis->XmitLock));
+    Assert(RTCritSectIsOwner(&pThis->XmitLock)); NOREF(pThis);
     if (pSgBuf)
     {
         Assert((pSgBuf->fFlags & PDMSCATTERGATHER_FLAGS_MAGIC_MASK) == PDMSCATTERGATHER_FLAGS_MAGIC);
@@ -190,6 +191,7 @@ static DECLCALLBACK(int) drvUDPTunnelUp_FreeBuf(PPDMINETWORKUP pInterface, PPDMS
  */
 static DECLCALLBACK(int) drvUDPTunnelUp_SendBuf(PPDMINETWORKUP pInterface, PPDMSCATTERGATHER pSgBuf, bool fOnWorkerThread)
 {
+    RT_NOREF(fOnWorkerThread);
     PDRVUDPTUNNEL pThis = PDMINETWORKUP_2_DRVUDPTUNNEL(pInterface);
     STAM_COUNTER_INC(&pThis->StatPktSent);
     STAM_COUNTER_ADD(&pThis->StatPktSentBytes, pSgBuf->cbUsed);
@@ -223,7 +225,7 @@ static DECLCALLBACK(int) drvUDPTunnelUp_SendBuf(PPDMINETWORKUP pInterface, PPDMS
         PCPDMNETWORKGSO pGso    = (PCPDMNETWORKGSO)pSgBuf->pvUser;
         uint32_t const  cSegs   = PDMNetGsoCalcSegmentCount(pGso, pSgBuf->cbUsed);  Assert(cSegs > 1);
         rc = VINF_SUCCESS;
-        for (size_t iSeg = 0; iSeg < cSegs; iSeg++)
+        for (uint32_t iSeg = 0; iSeg < cSegs; iSeg++)
         {
             uint32_t cbSegFrame;
             void *pvSegFrame = PDMNetGsoCarveSegmentQD(pGso, (uint8_t *)pbFrame, pSgBuf->cbUsed, abHdrScratch,
@@ -263,6 +265,7 @@ static DECLCALLBACK(void) drvUDPTunnelUp_EndXmit(PPDMINETWORKUP pInterface)
  */
 static DECLCALLBACK(void) drvUDPTunnelUp_SetPromiscuousMode(PPDMINETWORKUP pInterface, bool fPromiscuous)
 {
+    RT_NOREF(pInterface, fPromiscuous);
     LogFlowFunc(("fPromiscuous=%d\n", fPromiscuous));
     /* nothing to do */
 }
@@ -449,8 +452,9 @@ static DECLCALLBACK(void) drvUDPTunnelDestruct(PPDMDRVINS pDrvIns)
  */
 static DECLCALLBACK(int) drvUDPTunnelConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
-    PDRVUDPTUNNEL pThis = PDMINS_2_DATA(pDrvIns, PDRVUDPTUNNEL);
+    RT_NOREF(fFlags);
     PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
+    PDRVUDPTUNNEL pThis = PDMINS_2_DATA(pDrvIns, PDRVUDPTUNNEL);
 
     /*
      * Init the static parts.
diff --git a/src/VBox/Devices/Network/DrvVDE.cpp b/src/VBox/Devices/Network/DrvVDE.cpp
index 652cec7..4bf8f74 100644
--- a/src/VBox/Devices/Network/DrvVDE.cpp
+++ b/src/VBox/Devices/Network/DrvVDE.cpp
@@ -5,7 +5,7 @@
 
 /*
  * Contributed by Renzo Davoli. VirtualSquare. University of Bologna, 2010
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -119,6 +119,7 @@ typedef struct DRVVDE
  */
 static DECLCALLBACK(int) drvVDENetworkUp_BeginXmit(PPDMINETWORKUP pInterface, bool fOnWorkerThread)
 {
+    RT_NOREF(fOnWorkerThread);
     PDRVVDE pThis = PDMINETWORKUP_2_DRVVDE(pInterface);
     int rc = RTCritSectTryEnter(&pThis->XmitLock);
     if (RT_FAILURE(rc))
@@ -136,8 +137,11 @@ static DECLCALLBACK(int) drvVDENetworkUp_BeginXmit(PPDMINETWORKUP pInterface, bo
 static DECLCALLBACK(int) drvVDENetworkUp_AllocBuf(PPDMINETWORKUP pInterface, size_t cbMin,
                                                   PCPDMNETWORKGSO pGso, PPPDMSCATTERGATHER ppSgBuf)
 {
+    RT_NOREF(pInterface);
+#ifdef VBOX_STRICT
     PDRVVDE pThis = PDMINETWORKUP_2_DRVVDE(pInterface);
     Assert(RTCritSectIsOwner(&pThis->XmitLock));
+#endif
 
     /*
      * Allocate a scatter / gather buffer descriptor that is immediately
@@ -181,8 +185,11 @@ static DECLCALLBACK(int) drvVDENetworkUp_AllocBuf(PPDMINETWORKUP pInterface, siz
  */
 static DECLCALLBACK(int) drvVDENetworkUp_FreeBuf(PPDMINETWORKUP pInterface, PPDMSCATTERGATHER pSgBuf)
 {
+    RT_NOREF(pInterface);
+#ifdef VBOX_STRICT
     PDRVVDE pThis = PDMINETWORKUP_2_DRVVDE(pInterface);
     Assert(RTCritSectIsOwner(&pThis->XmitLock));
+#endif
     if (pSgBuf)
     {
         Assert((pSgBuf->fFlags & PDMSCATTERGATHER_FLAGS_MAGIC_MASK) == PDMSCATTERGATHER_FLAGS_MAGIC);
@@ -198,6 +205,7 @@ static DECLCALLBACK(int) drvVDENetworkUp_FreeBuf(PPDMINETWORKUP pInterface, PPDM
  */
 static DECLCALLBACK(int) drvVDENetworkUp_SendBuf(PPDMINETWORKUP pInterface, PPDMSCATTERGATHER pSgBuf, bool fOnWorkerThread)
 {
+    RT_NOREF(fOnWorkerThread);
     PDRVVDE pThis = PDMINETWORKUP_2_DRVVDE(pInterface);
     STAM_COUNTER_INC(&pThis->StatPktSent);
     STAM_COUNTER_ADD(&pThis->StatPktSentBytes, pSgBuf->cbUsed);
@@ -273,6 +281,7 @@ static DECLCALLBACK(void) drvVDENetworkUp_EndXmit(PPDMINETWORKUP pInterface)
  */
 static DECLCALLBACK(void) drvVDENetworkUp_SetPromiscuousMode(PPDMINETWORKUP pInterface, bool fPromiscuous)
 {
+    RT_NOREF(pInterface, fPromiscuous);
     LogFlow(("drvVDESetPromiscuousMode: fPromiscuous=%d\n", fPromiscuous));
     /* nothing to do */
 }
@@ -287,6 +296,7 @@ static DECLCALLBACK(void) drvVDENetworkUp_SetPromiscuousMode(PPDMINETWORKUP pInt
  */
 static DECLCALLBACK(void) drvVDENetworkUp_NotifyLinkChanged(PPDMINETWORKUP pInterface, PDMNETWORKLINKSTATE enmLinkState)
 {
+    RT_NOREF(pInterface, enmLinkState);
     LogFlow(("drvNATNetworkUp_NotifyLinkChanged: enmLinkState=%d\n", enmLinkState));
     /** @todo take action on link down and up. Stop the polling and such like. */
 }
@@ -437,6 +447,7 @@ static DECLCALLBACK(int) drvVDEAsyncIoThread(PPDMDRVINS pDrvIns, PPDMTHREAD pThr
  */
 static DECLCALLBACK(int) drvVDEAsyncIoWakeup(PPDMDRVINS pDrvIns, PPDMTHREAD pThread)
 {
+    RT_NOREF(pThread);
     PDRVVDE pThis = PDMINS_2_DATA(pDrvIns, PDRVVDE);
 
     size_t cbIgnored;
@@ -528,8 +539,9 @@ static DECLCALLBACK(void) drvVDEDestruct(PPDMDRVINS pDrvIns)
  */
 static DECLCALLBACK(int) drvVDEConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
-    PDRVVDE pThis = PDMINS_2_DATA(pDrvIns, PDRVVDE);
+    RT_NOREF(fFlags);
     PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
+    PDRVVDE pThis = PDMINS_2_DATA(pDrvIns, PDRVVDE);
 
     /*
      * Init the static parts.
diff --git a/src/VBox/Devices/Network/Pcap.cpp b/src/VBox/Devices/Network/Pcap.cpp
index 00eb03c..37b1850 100644
--- a/src/VBox/Devices/Network/Pcap.cpp
+++ b/src/VBox/Devices/Network/Pcap.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/Pcap.h b/src/VBox/Devices/Network/Pcap.h
index 6b4d8c1..4289b5c 100644
--- a/src/VBox/Devices/Network/Pcap.h
+++ b/src/VBox/Devices/Network/Pcap.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/SrvIntNetR0.cpp b/src/VBox/Devices/Network/SrvIntNetR0.cpp
index 3ef7ac1..630c19c 100644
--- a/src/VBox/Devices/Network/SrvIntNetR0.cpp
+++ b/src/VBox/Devices/Network/SrvIntNetR0.cpp
@@ -9,7 +9,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -885,6 +885,7 @@ DECLINLINE(bool) intnetR0IPv6AddrIsGood(RTNETADDRIPV6 addr)
 }
 
 
+#if 0 /* unused */
 /**
  * Checks if the IPv4 address is a broadcast address.
  * @returns true/false.
@@ -895,6 +896,7 @@ DECLINLINE(bool) intnetR0IPv4AddrIsBroadcast(RTNETADDRIPV4 Addr)
     /* Just check for 255.255.255.255 atm. */
     return Addr.u == UINT32_MAX;
 }
+#endif /* unused */
 
 
 /**
@@ -1030,6 +1032,7 @@ DECLINLINE(int) intnetR0IfAddrCacheLookupLikely(PCINTNETADDRCACHE pCache, PCRTNE
     return intnetR0IfAddrCacheLookup(pCache, pAddr, cbAddr);
 }
 
+#if 0 /* unused */
 
 /**
  * Worker for intnetR0IfAddrCacheLookupUnlikely that performs
@@ -1097,6 +1100,8 @@ DECLINLINE(int) intnetR0IfAddrCacheLookupUnlikely(PCINTNETADDRCACHE pCache, PCRT
     return intnetR0IfAddrCacheInCacheUnlikelySlow(pCache, pAddr, cbAddr);
 }
 
+#endif /* unused */
+
 
 /**
  * Deletes a specific cache entry.
@@ -1130,6 +1135,8 @@ static void intnetR0IfAddrCacheDeleteIt(PINTNETIF pIf, PINTNETADDRCACHE pCache,
                  pIf->hIf, &pIf->MacAddr, enmAddrType, iEntry, pCache->cbAddress, pAddr, pszMsg));
             break;
     }
+#else
+    RT_NOREF2(pIf, pszMsg);
 #endif
 
     pCache->cEntries--;
@@ -1210,6 +1217,7 @@ DECLINLINE(void) intnetR0NetworkAddrCacheDelete(PINTNETNETWORK pNetwork, PCRTNET
 }
 
 
+#if 0 /* unused */
 /**
  * Deletes the address from all the interface caches except the specified one.
  *
@@ -1241,6 +1249,7 @@ DECLINLINE(void) intnetR0NetworkAddrCacheDeleteMinusIf(PINTNETNETWORK pNetwork,
 
     RTSpinlockRelease(pNetwork->hAddrSpinlock);
 }
+#endif /* unused */
 
 
 /**
@@ -1403,8 +1412,10 @@ static void intnetR0IfAddrCacheAddIt(PINTNETIF pIf, INTNETADDRTYPE enmAddrType,
 
     PINTNETADDRCACHE pCache = &pIf->aAddrCache[enmAddrType];
 
+#if defined(LOG_ENABLED) || defined(VBOX_STRICT)
     const uint8_t cbAddr = pCache->cbAddress;
     Assert(cbAddr == intnetR0AddrSize(enmAddrType));
+#endif
 
     RTSpinlockAcquire(pNetwork->hAddrSpinlock);
 
@@ -1473,6 +1484,8 @@ static void intnetR0IfAddrCacheAddIt(PINTNETIF pIf, INTNETADDRTYPE enmAddrType,
                  pIf->hIf, &pIf->MacAddr, enmAddrType, pCache->cEntries, pCache->cbAddress, pAddr, pszMsg));
             break;
     }
+#else
+    RT_NOREF1(pszMsg);
 #endif
     pCache->cEntries++;
     Assert(pCache->cEntries <= pCache->cEntriesAlloc);
@@ -4873,6 +4886,7 @@ static DECLCALLBACK(void) intnetR0IfDestruct(void *pvObj, void *pvUser1, void *p
     PINTNETIF pIf     = (PINTNETIF)pvUser1;
     PINTNET   pIntNet = (PINTNET)pvUser2;
     Log(("intnetR0IfDestruct: pvObj=%p pIf=%p pIntNet=%p hIf=%RX32\n", pvObj, pIf, pIntNet, pIf->hIf));
+    RT_NOREF1(pvObj);
 
     /*
      * For paranoid reasons we must now mark the interface as destroyed.
@@ -5225,7 +5239,7 @@ static int intnetR0NetworkCreateIf(PINTNETNETWORK pNetwork, PSUPDRVSESSION pSess
 }
 
 
-/** @copydoc INTNETTRUNKSWPORT::pfnSetSGPhys */
+/** @interface_method_impl{INTNETTRUNKSWPORT,pfnSetSGPhys} */
 static DECLCALLBACK(bool) intnetR0TrunkIfPortSetSGPhys(PINTNETTRUNKSWPORT pSwitchPort, bool fEnable)
 {
     PINTNETTRUNKIF pThis = INTNET_SWITCHPORT_2_TRUNKIF(pSwitchPort);
@@ -5234,7 +5248,7 @@ static DECLCALLBACK(bool) intnetR0TrunkIfPortSetSGPhys(PINTNETTRUNKSWPORT pSwitc
 }
 
 
-/** @copydoc INTNETTRUNKSWPORT::pfnReportMacAddress */
+/** @interface_method_impl{INTNETTRUNKSWPORT,pfnReportMacAddress} */
 static DECLCALLBACK(void) intnetR0TrunkIfPortReportMacAddress(PINTNETTRUNKSWPORT pSwitchPort, PCRTMAC pMacAddr)
 {
     PINTNETTRUNKIF pThis = INTNET_SWITCHPORT_2_TRUNKIF(pSwitchPort);
@@ -5260,7 +5274,7 @@ static DECLCALLBACK(void) intnetR0TrunkIfPortReportMacAddress(PINTNETTRUNKSWPORT
 }
 
 
-/** @copydoc INTNETTRUNKSWPORT::pfnReportPromiscuousMode */
+/** @interface_method_impl{INTNETTRUNKSWPORT,pfnReportPromiscuousMode} */
 static DECLCALLBACK(void) intnetR0TrunkIfPortReportPromiscuousMode(PINTNETTRUNKSWPORT pSwitchPort, bool fPromiscuous)
 {
     PINTNETTRUNKIF pThis = INTNET_SWITCHPORT_2_TRUNKIF(pSwitchPort);
@@ -5286,7 +5300,7 @@ static DECLCALLBACK(void) intnetR0TrunkIfPortReportPromiscuousMode(PINTNETTRUNKS
 }
 
 
-/** @copydoc INTNETTRUNKSWPORT::pfnReportGsoCapabilities */
+/** @interface_method_impl{INTNETTRUNKSWPORT,pfnReportGsoCapabilities} */
 static DECLCALLBACK(void) intnetR0TrunkIfPortReportGsoCapabilities(PINTNETTRUNKSWPORT pSwitchPort,
                                                                    uint32_t fGsoCapabilities, uint32_t fDst)
 {
@@ -5305,7 +5319,7 @@ static DECLCALLBACK(void) intnetR0TrunkIfPortReportGsoCapabilities(PINTNETTRUNKS
 }
 
 
-/** @copydoc INTNETTRUNKSWPORT::pfnReportNoPreemptDsts */
+/** @interface_method_impl{INTNETTRUNKSWPORT,pfnReportNoPreemptDsts} */
 static DECLCALLBACK(void) intnetR0TrunkIfPortReportNoPreemptDsts(PINTNETTRUNKSWPORT pSwitchPort, uint32_t fNoPreemptDsts)
 {
     PINTNETTRUNKIF pThis = INTNET_SWITCHPORT_2_TRUNKIF(pSwitchPort);
@@ -5315,7 +5329,7 @@ static DECLCALLBACK(void) intnetR0TrunkIfPortReportNoPreemptDsts(PINTNETTRUNKSWP
 }
 
 
-/** @copydoc INTNETTRUNKSWPORT::pfnDisconnect */
+/** @interface_method_impl{INTNETTRUNKSWPORT,pfnDisconnect} */
 static DECLCALLBACK(void) intnetR0TrunkIfPortDisconnect(PINTNETTRUNKSWPORT pSwitchPort, PINTNETTRUNKIFPORT pIfPort,
                                                         PFNINTNETTRUNKIFPORTRELEASEBUSY pfnReleaseBusy)
 {
@@ -5374,7 +5388,7 @@ static DECLCALLBACK(void) intnetR0TrunkIfPortDisconnect(PINTNETTRUNKSWPORT pSwit
 }
 
 
-/** @copydoc INTNETTRUNKSWPORT::pfnPreRecv */
+/** @interface_method_impl{INTNETTRUNKSWPORT,pfnPreRecv} */
 static DECLCALLBACK(INTNETSWDECISION) intnetR0TrunkIfPortPreRecv(PINTNETTRUNKSWPORT pSwitchPort,
                                                                  void const *pvSrc, size_t cbSrc, uint32_t fSrc)
 {
@@ -5416,7 +5430,7 @@ static DECLCALLBACK(INTNETSWDECISION) intnetR0TrunkIfPortPreRecv(PINTNETTRUNKSWP
 }
 
 
-/** @copydoc INTNETTRUNKSWPORT::pfnRecv */
+/** @interface_method_impl{INTNETTRUNKSWPORT,pfnRecv} */
 static DECLCALLBACK(bool) intnetR0TrunkIfPortRecv(PINTNETTRUNKSWPORT pSwitchPort, void *pvIf, PINTNETSG pSG, uint32_t fSrc)
 {
     PINTNETTRUNKIF pThis = INTNET_SWITCHPORT_2_TRUNKIF(pSwitchPort);
@@ -5532,7 +5546,7 @@ static DECLCALLBACK(bool) intnetR0TrunkIfPortRecv(PINTNETTRUNKSWPORT pSwitchPort
 }
 
 
-/** @copydoc INTNETTRUNKSWPORT::pfnSGRetain */
+/** @interface_method_impl{INTNETTRUNKSWPORT,pfnSGRetain} */
 static DECLCALLBACK(void) intnetR0TrunkIfPortSGRetain(PINTNETTRUNKSWPORT pSwitchPort, PINTNETSG pSG)
 {
     PINTNETTRUNKIF pThis = INTNET_SWITCHPORT_2_TRUNKIF(pSwitchPort);
@@ -5549,7 +5563,7 @@ static DECLCALLBACK(void) intnetR0TrunkIfPortSGRetain(PINTNETTRUNKSWPORT pSwitch
 }
 
 
-/** @copydoc INTNETTRUNKSWPORT::pfnSGRelease */
+/** @interface_method_impl{INTNETTRUNKSWPORT,pfnSGRelease} */
 static DECLCALLBACK(void) intnetR0TrunkIfPortSGRelease(PINTNETTRUNKSWPORT pSwitchPort, PINTNETSG pSG)
 {
     PINTNETTRUNKIF pThis = INTNET_SWITCHPORT_2_TRUNKIF(pSwitchPort);
@@ -5571,7 +5585,7 @@ static DECLCALLBACK(void) intnetR0TrunkIfPortSGRelease(PINTNETTRUNKSWPORT pSwitc
 }
 
 
-/** @copydoc INTNETTRUNKSWPORT::pfnNotifyHostAddress */
+/** @interface_method_impl{INTNETTRUNKSWPORT,pfnNotifyHostAddress} */
 static DECLCALLBACK(void) intnetR0NetworkNotifyHostAddress(PINTNETTRUNKSWPORT pSwitchPort,
                                                            bool fAdded,
                                                            INTNETADDRTYPE enmType, const void *pvAddr)
@@ -5893,6 +5907,7 @@ static DECLCALLBACK(void) intnetR0NetworkDestruct(void *pvObj, void *pvUser1, vo
     PINTNET         pIntNet  = (PINTNET)pvUser2;
     Log(("intnetR0NetworkDestruct: pvObj=%p pNetwork=%p pIntNet=%p %s\n", pvObj, pNetwork, pIntNet, pNetwork->szName));
     Assert(pNetwork->pIntNet == pIntNet);
+    RT_NOREF1(pvObj);
 
     /* Take the big create/open/destroy sem. */
     RTSemMutexRequest(pIntNet->hMtxCreateOpenDestroy, RT_INDEFINITE_WAIT);
@@ -6212,7 +6227,7 @@ static int intnetR0OpenNetwork(PINTNET pIntNet, PSUPDRVSESSION pSession, const c
             int rc;
             if (   enmTrunkType == kIntNetTrunkType_WhateverNone
 #ifdef VBOX_WITH_NAT_SERVICE
-                || enmTrunkType == kIntNetTrunkType_SrvNat /* @todo: what does it mean */
+                || enmTrunkType == kIntNetTrunkType_SrvNat /** @todo what does it mean */
 #endif
                 || (   pCur->enmTrunkType == enmTrunkType
                     && !strcmp(pCur->szTrunk, pszTrunk)))
diff --git a/src/VBox/Devices/Network/VDEPlug.cpp b/src/VBox/Devices/Network/VDEPlug.cpp
index a7c6554..19537e3 100644
--- a/src/VBox/Devices/Network/VDEPlug.cpp
+++ b/src/VBox/Devices/Network/VDEPlug.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/lwip-new/Config.kmk b/src/VBox/Devices/Network/lwip-new/Config.kmk
new file mode 100644
index 0000000..6fd5cd6
--- /dev/null
+++ b/src/VBox/Devices/Network/lwip-new/Config.kmk
@@ -0,0 +1,97 @@
+# $Id: Config.kmk $
+## @file
+# Define the include dirs and source files for LWIP pre-1.5.0.
+#
+# This file is included by Devices/Makefile.kmk and NetworkServices/NAT/Makefile.kmk.
+#
+
+#
+# Copyright (C) 2006-2016 Oracle Corporation
+#
+# This file is part of VirtualBox Open Source Edition (OSE), as
+# available from http://www.virtualbox.org. This file is free software;
+# you can redistribute it and/or modify it under the terms of the GNU
+# General Public License (GPL) as published by the Free Software
+# Foundation, in version 2 as it comes in the "COPYING" file of the
+# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+#
+
+LWIP_INCS += \
+    src/include \
+    src/include/ipv4 \
+    src/include/ipv6 \
+    vbox/include \
+    vbox
+
+LWIP_SOURCES += \
+    src/api/api_lib.c \
+    src/api/api_msg.c \
+    src/api/err.c \
+    src/api/netbuf.c \
+    src/api/netdb.c \
+    src/api/netifapi.c \
+    src/api/sockets.c \
+    src/api/tcpip.c \
+    src/core/def.c \
+    src/core/dhcp.c \
+    src/core/dns.c \
+    src/core/inet_chksum.c \
+    src/core/init.c \
+    src/core/ipv4/autoip.c \
+    src/core/ipv4/icmp.c \
+    src/core/ipv4/igmp.c \
+    src/core/ipv4/ip4.c \
+    src/core/ipv4/ip4_addr.c \
+    src/core/ipv4/ip_frag.c \
+    src/core/ipv6/dhcp6.c \
+    src/core/ipv6/ethip6.c \
+    src/core/ipv6/icmp6.c \
+    src/core/ipv6/inet6.c \
+    src/core/ipv6/ip6.c \
+    src/core/ipv6/ip6_addr.c \
+    src/core/ipv6/ip6_frag.c \
+    src/core/ipv6/mld6.c \
+    src/core/ipv6/nd6.c \
+    src/core/mem.c \
+    src/core/memp.c \
+    src/core/netif.c \
+    src/core/pbuf.c \
+    src/core/raw.c \
+    src/core/stats.c \
+    src/core/sys.c \
+    src/core/tcp.c \
+    src/core/tcp_in.c \
+    src/core/tcp_out.c \
+    src/core/timers.c \
+    src/core/udp.c \
+    src/netif/etharp.c \
+    vbox/sys_arch.c \
+    vbox/VBoxLwipCore.cpp
+
+# LWIP_SOURCES += \
+#     src/core/snmp/asn1_dec.c \
+#     src/core/snmp/asn1_enc.c \
+#     src/core/snmp/mib2.c \
+#     src/core/snmp/mib_structs.c \
+#     src/core/snmp/msg_in.c \
+#     src/core/snmp/msg_out.c \
+
+# LWIP_SOURCES += \
+#     src/netif/slipif.c \
+
+# LWIP_SOURCES += \
+#     src/netif/ppp/auth.c \
+#     src/netif/ppp/chap.c \
+#     src/netif/ppp/chpms.c \
+#     src/netif/ppp/fsm.c \
+#     src/netif/ppp/ipcp.c \
+#     src/netif/ppp/lcp.c \
+#     src/netif/ppp/magic.c \
+#     src/netif/ppp/md5.c \
+#     src/netif/ppp/pap.c \
+#     src/netif/ppp/ppp.c \
+#     src/netif/ppp/ppp_oe.c \
+#     src/netif/ppp/randm.c \
+#     src/netif/ppp/vj.c
+
diff --git a/src/VBox/Devices/Network/lwip-new/Makefile.kmk b/src/VBox/Devices/Network/lwip-new/Makefile.kmk
deleted file mode 100644
index 34fdfe3..0000000
--- a/src/VBox/Devices/Network/lwip-new/Makefile.kmk
+++ /dev/null
@@ -1,164 +0,0 @@
-# $Id: Makefile.kmk $
-## @file
-# Adds sources list and defines required to LWIP pre-1.5.0 compilation
-#
-
-#
-# Copyright (C) 2006-2015 Oracle Corporation
-#
-# This file is part of VirtualBox Open Source Edition (OSE), as
-# available from http://www.virtualbox.org. This file is free software;
-# you can redistribute it and/or modify it under the terms of the GNU
-# General Public License (GPL) as published by the Free Software
-# Foundation, in version 2 as it comes in the "COPYING" file of the
-# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
-# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-#
-
-LWIP_INCS += \
-    src/include \
-    src/include/ipv4 \
-    src/include/ipv6 \
-    vbox/include \
-    vbox
-
-LWIP_SOURCES += \
-    src/api/api_lib.c \
-    src/api/api_msg.c \
-    src/api/err.c \
-    src/api/netbuf.c \
-    src/api/netdb.c \
-    src/api/netifapi.c \
-    src/api/sockets.c \
-    src/api/tcpip.c \
-    src/core/def.c \
-    src/core/dhcp.c \
-    src/core/dns.c \
-    src/core/inet_chksum.c \
-    src/core/init.c \
-    src/core/ipv4/autoip.c \
-    src/core/ipv4/icmp.c \
-    src/core/ipv4/igmp.c \
-    src/core/ipv4/ip4.c \
-    src/core/ipv4/ip4_addr.c \
-    src/core/ipv4/ip_frag.c \
-    src/core/ipv6/dhcp6.c \
-    src/core/ipv6/ethip6.c \
-    src/core/ipv6/icmp6.c \
-    src/core/ipv6/inet6.c \
-    src/core/ipv6/ip6.c \
-    src/core/ipv6/ip6_addr.c \
-    src/core/ipv6/ip6_frag.c \
-    src/core/ipv6/mld6.c \
-    src/core/ipv6/nd6.c \
-    src/core/mem.c \
-    src/core/memp.c \
-    src/core/netif.c \
-    src/core/pbuf.c \
-    src/core/raw.c \
-    src/core/stats.c \
-    src/core/sys.c \
-    src/core/tcp.c \
-    src/core/tcp_in.c \
-    src/core/tcp_out.c \
-    src/core/timers.c \
-    src/core/udp.c \
-    src/netif/etharp.c \
-    vbox/sys_arch.c \
-    vbox/VBoxLwipCore.cpp
-
-# LWIP_SOURCES += \
-#     src/core/snmp/asn1_dec.c \
-#     src/core/snmp/asn1_enc.c \
-#     src/core/snmp/mib2.c \
-#     src/core/snmp/mib_structs.c \
-#     src/core/snmp/msg_in.c \
-#     src/core/snmp/msg_out.c \
-
-# LWIP_SOURCES += \
-#     src/netif/slipif.c \
-
-# LWIP_SOURCES += \
-#     src/netif/ppp/auth.c \
-#     src/netif/ppp/chap.c \
-#     src/netif/ppp/chpms.c \
-#     src/netif/ppp/fsm.c \
-#     src/netif/ppp/ipcp.c \
-#     src/netif/ppp/lcp.c \
-#     src/netif/ppp/magic.c \
-#     src/netif/ppp/md5.c \
-#     src/netif/ppp/pap.c \
-#     src/netif/ppp/ppp.c \
-#     src/netif/ppp/ppp_oe.c \
-#     src/netif/ppp/randm.c \
-#     src/netif/ppp/vj.c
-
-
-
-define _def_vbox_lwip_use # VAR_BaseName, path/to/lwip/dir
-  $(strip $1)_SOURCES += \
-        $(foreach file, $(LWIP_SOURCES), $(strip $2)/$(file))
-
-  # if individual lwip files need special settings, add them here:
-  # $(strip $2)/src/foo/bar.c_CFLAGS += -magic
-endef
-
-
-define def_vbox_lwip_flags # PROTO_BaseName, VAR_BaseName, path/to/lwip/dir
-  # add anything configured for the component via PROTO_BaseName
-  $(foreach suffix, INCS DEFS,
-    $(if $(value $(strip $1)_LWIP_$(suffix)),
-      $(eval #
-        $(strip $2)_$(suffix) += $(value $(strip $1)_LWIP_$(suffix))
-      )))
-
-  # add lwip's own includes
-  $(strip $2)_INCS += $(foreach incdir, $(LWIP_INCS), $(strip $3)/$(incdir))
-
-  # disable lwip assertions for some build types
-  $(strip $2)_DEFS.release  += LWIP_NOASSERT
-  $(strip $2)_DEFS.profile  += LWIP_NOASSERT
-  $(strip $2)_DEFS.kprofile += LWIP_NOASSERT
-endef
-
-
-###
-### Call this if you want to expose lwip to your component as a whole.
-### In this case individual lwip files (added to _SOURCES of your
-### component) will pick up lwip includes etc from your component
-### settings.
-###
-### This is, for example, how NetworkServices/NAT uses it.
-###
-define def_vbox_lwip_public # VAR_BaseName, path/to/lwip/dir
-  $(eval $(call _def_vbox_lwip_use, $1, $2))
-  $(eval $(call def_vbox_lwip_flags, $1, $1, $2))
-endef
-
-
-###
-### Call this if you want to expose lwip only to a few selected files.
-### In this case each lwip file is configured with lwip includes etc
-### separately and you are supposed to call def_vbox_lwip_flags
-### yourself for those of your files that use lwip.
-###
-### This is, for example, how Devices uses it.
-###
-define def_vbox_lwip_private # VAR_BaseName, path/to/lwip/dir
-  $(eval $(call _def_vbox_lwip_use, $1, $2))
-  $(foreach file, $(LWIP_SOURCES), \
-    $(eval $(call def_vbox_lwip_flags, $1, $(strip $2)/$(file), $2)))
-endef
-
-
-ifeq ($(USERNAME), vvl)
-$(foreach lwip_file, $(LWIP_SOURCES), $(eval $(lwip_file)_DEFS=RTMEM_WRAP_TO_EF_APIS))
-
-LWIPTEST_SOURCES= Network/lwip-new/test/unit/core/test_mem.c \
-    Network/lwip-new/test/unit/etharp/test_etharp.c \
-    Network/lwip-new/test/unit/lwip_unittests.c \
-    Network/lwip-new/test/unit/tcp/tcp_helper.c \
-    Network/lwip-new/test/unit/tcp/test_tcp.c \
-    Network/lwip-new/test/unit/tcp/test_tcp_oos.c \
-    Network/lwip-new/test/unit/udp/test_udp.c
-endif
diff --git a/src/VBox/Devices/Audio_old/Makefile.kup b/src/VBox/Devices/Network/lwip-new/Makefile.kup
similarity index 100%
copy from src/VBox/Devices/Audio_old/Makefile.kup
copy to src/VBox/Devices/Network/lwip-new/Makefile.kup
diff --git a/src/VBox/Devices/Audio_old/Makefile.kup b/src/VBox/Devices/Network/lwip-new/src/Makefile.kup
similarity index 100%
copy from src/VBox/Devices/Audio_old/Makefile.kup
copy to src/VBox/Devices/Network/lwip-new/src/Makefile.kup
diff --git a/src/VBox/Devices/Audio_old/Makefile.kup b/src/VBox/Devices/Network/lwip-new/src/api/Makefile.kup
similarity index 100%
copy from src/VBox/Devices/Audio_old/Makefile.kup
copy to src/VBox/Devices/Network/lwip-new/src/api/Makefile.kup
diff --git a/src/VBox/Devices/Audio_old/Makefile.kup b/src/VBox/Devices/Network/lwip-new/src/core/Makefile.kup
similarity index 100%
copy from src/VBox/Devices/Audio_old/Makefile.kup
copy to src/VBox/Devices/Network/lwip-new/src/core/Makefile.kup
diff --git a/src/VBox/Devices/Audio_old/Makefile.kup b/src/VBox/Devices/Network/lwip-new/src/core/ipv4/Makefile.kup
similarity index 100%
copy from src/VBox/Devices/Audio_old/Makefile.kup
copy to src/VBox/Devices/Network/lwip-new/src/core/ipv4/Makefile.kup
diff --git a/src/VBox/Devices/Network/lwip-new/src/core/ipv4/icmp.c b/src/VBox/Devices/Network/lwip-new/src/core/ipv4/icmp.c
index d87eb25..318b6c1 100644
--- a/src/VBox/Devices/Network/lwip-new/src/core/ipv4/icmp.c
+++ b/src/VBox/Devices/Network/lwip-new/src/core/ipv4/icmp.c
@@ -281,6 +281,9 @@ void
 icmp_proxy_input(struct pbuf *p, struct netif *inp)
 {
   u8_t type, code;
+# ifdef VBOX
+  (void)inp;
+# endif
 
   ICMP_STATS_INC(icmp.recv);
   snmp_inc_icmpinmsgs();
diff --git a/src/VBox/Devices/Audio_old/Makefile.kup b/src/VBox/Devices/Network/lwip-new/src/core/ipv6/Makefile.kup
similarity index 100%
copy from src/VBox/Devices/Audio_old/Makefile.kup
copy to src/VBox/Devices/Network/lwip-new/src/core/ipv6/Makefile.kup
diff --git a/src/VBox/Devices/Network/lwip-new/src/core/ipv6/icmp6.c b/src/VBox/Devices/Network/lwip-new/src/core/ipv6/icmp6.c
index 28d6611..66f5f90 100644
--- a/src/VBox/Devices/Network/lwip-new/src/core/ipv6/icmp6.c
+++ b/src/VBox/Devices/Network/lwip-new/src/core/ipv6/icmp6.c
@@ -220,6 +220,9 @@ void
 icmp6_proxy_input(struct pbuf *p, struct netif *inp)
 {
   struct icmp6_hdr *icmp6hdr;
+# ifdef VBOX
+  (void)inp;
+# endif
 
   ICMP6_STATS_INC(icmp6.recv);
 
diff --git a/src/VBox/Devices/Network/lwip-new/src/core/ipv6/ip6_frag.c b/src/VBox/Devices/Network/lwip-new/src/core/ipv6/ip6_frag.c
index ee1ea31..b3cba0e 100644
--- a/src/VBox/Devices/Network/lwip-new/src/core/ipv6/ip6_frag.c
+++ b/src/VBox/Devices/Network/lwip-new/src/core/ipv6/ip6_frag.c
@@ -448,7 +448,12 @@ ip6_reass(struct pbuf *p)
 
   /* Adjust datagram length by adding preceding header lengths. */
   unfrag_len = (u8_t *)p->payload - (u8_t *)ipr->iphdr0;
+# ifndef VBOX
   ipr->datagram_len += unfrag_len - IP6_HLEN + IP6_FRAG_HLEN;
+# else
+  LWIP_ASSERT("overflow", (s16_t)unfrag_len == (ssize_t)unfrag_len); /* s16_t because of pbuf_header call */
+  ipr->datagram_len += (u16_t)(unfrag_len - IP6_HLEN + IP6_FRAG_HLEN);
+# endif
 
   /* Set payload length in ip header. */
   ipr->iphdr._plen = htons(ipr->datagram_len);
@@ -473,7 +478,11 @@ ip6_reass(struct pbuf *p)
   ip6_reass_pbufcount -= pbuf_clen(p);
 
   /* Move pbuf back to IPv6 header. */
+# ifndef VBOX
   if (pbuf_header(p, unfrag_len) != 0) {
+# else
+  if (pbuf_header(p, (s16_t)unfrag_len) != 0) {
+# endif
     LWIP_ASSERT("ip6_reass: moving p->payload to ip6 header failed\n", 0);
     goto nullreturn;
   }
diff --git a/src/VBox/Devices/Network/lwip-new/src/core/netif.c b/src/VBox/Devices/Network/lwip-new/src/core/netif.c
index 385711f..f88486e 100644
--- a/src/VBox/Devices/Network/lwip-new/src/core/netif.c
+++ b/src/VBox/Devices/Network/lwip-new/src/core/netif.c
@@ -887,7 +887,7 @@ netif_matches_ip6_addr(struct netif * netif, ip6_addr_t * ip6addr)
 void
 netif_create_ip6_linklocal_address(struct netif * netif, u8_t from_mac_48bit)
 {
-  u8_t i, addr_index;
+  u8_t i;
 
   /* Link-local prefix. */
   netif->ip6_addr[0].addr[0] = PP_HTONL(0xfe800000ul);
diff --git a/src/VBox/Devices/Audio_old/Makefile.kup b/src/VBox/Devices/Network/lwip-new/src/core/snmp/Makefile.kup
similarity index 100%
copy from src/VBox/Devices/Audio_old/Makefile.kup
copy to src/VBox/Devices/Network/lwip-new/src/core/snmp/Makefile.kup
diff --git a/src/VBox/Devices/Network/lwip-new/src/core/tcp_in.c b/src/VBox/Devices/Network/lwip-new/src/core/tcp_in.c
index 4973a75..51de9c0 100644
--- a/src/VBox/Devices/Network/lwip-new/src/core/tcp_in.c
+++ b/src/VBox/Devices/Network/lwip-new/src/core/tcp_in.c
@@ -605,6 +605,8 @@ tcp_listen_input(struct tcp_pcb_listen *pcb, struct pbuf *syn)
        * tcp_proxy_accept_confirm(). */
       return ERR_OK;
     }
+#else
+    LWIP_UNUSED_ARG(syn);
 #endif
 
     snmp_inc_tcppassiveopens();
diff --git a/src/VBox/Devices/Network/lwip-new/src/netif/etharp.c b/src/VBox/Devices/Network/lwip-new/src/netif/etharp.c
index 0a02245..e6d70b2 100644
--- a/src/VBox/Devices/Network/lwip-new/src/netif/etharp.c
+++ b/src/VBox/Devices/Network/lwip-new/src/netif/etharp.c
@@ -755,6 +755,9 @@ etharp_arp_input(struct netif *netif, struct eth_addr *ethaddr, struct pbuf *p)
   /* this interface is not configured? */
   if (ip_addr_isany(&netif->ip_addr)) {
     for_us = 0;
+#if defined(VBOX) && ARP_PROXY
+    proxy = 0; /* Shup up MSC. */
+#endif
   } else {
     /* ARP packet directed to us? */
     for_us = (u8_t)ip_addr_cmp(&dipaddr, &(netif->ip_addr));
diff --git a/src/VBox/Devices/Audio_old/Makefile.kup b/src/VBox/Devices/Network/lwip-new/vbox/Makefile.kup
similarity index 100%
copy from src/VBox/Devices/Audio_old/Makefile.kup
copy to src/VBox/Devices/Network/lwip-new/vbox/Makefile.kup
diff --git a/src/VBox/Devices/Network/lwip-new/vbox/VBoxLwipCore.cpp b/src/VBox/Devices/Network/lwip-new/vbox/VBoxLwipCore.cpp
index ad8cd98..45cae6b 100644
--- a/src/VBox/Devices/Network/lwip-new/vbox/VBoxLwipCore.cpp
+++ b/src/VBox/Devices/Network/lwip-new/vbox/VBoxLwipCore.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@
  */
 #include <iprt/types.h>
 #include "VBoxLwipCore.h"
-/* @todo: lwip or nat ? */
+/** @todo lwip or nat ? */
 #define LOG_GROUP LOG_GROUP_DRV_NAT
 #include <iprt/cpp/lock.h>
 #include <iprt/timer.h>
@@ -154,7 +154,7 @@ int vboxLwipCoreInitialize(PFNRT1 pfnCallback, void *pvCallbackArg)
   done:
     if (lwipRc != ERR_OK)
     {
-        /* @todo: map lwip error code? */
+        /** @todo map lwip error code? */
         rc = VERR_INTERNAL_ERROR;
     }
     LogFlowFuncLeaveRC(rc);
diff --git a/src/VBox/Devices/Network/lwip-new/vbox/VBoxLwipCore.h b/src/VBox/Devices/Network/lwip-new/vbox/VBoxLwipCore.h
index a5f583e..d4e4499 100644
--- a/src/VBox/Devices/Network/lwip-new/vbox/VBoxLwipCore.h
+++ b/src/VBox/Devices/Network/lwip-new/vbox/VBoxLwipCore.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/lwip-new/vbox/include/lwip-log.h b/src/VBox/Devices/Network/lwip-new/vbox/include/lwip-log.h
index fa0a5fa..cb02021 100644
--- a/src/VBox/Devices/Network/lwip-new/vbox/include/lwip-log.h
+++ b/src/VBox/Devices/Network/lwip-new/vbox/include/lwip-log.h
@@ -22,71 +22,82 @@
  * Debug levels are mapped to RT debug levels so lwip's default level
  * ends up as RT's level4.  Non-default levels are currently not used
  * much in lwip sources, so enable l4 to get the logs.
+ *
+ * Caveat:  Slight snag.  The LOG_GROUP_LWIP_XXXX are enum values and
+ *          the  lwIP XXXX_DEBUG macros are used in \#if XXXX_DEBUG
+ *          tests around the place.  This make MSC raise complaint
+ *          C4668, that e.g. 'LOG_GROUP_LWIP_IP4' is not defined as a
+ *          preprocessor macro and therefore placed with '0'.  However,
+ *          that works just fine because we or LWIP_DB_ON so the test
+ *          is true despite the warning. Thus the pragma below
  */
+# ifdef _MSC_VER
+#  pragma warning(disable:4668)
+# endif
 
-#define LWIP_DEBUGF_LOG_GROUP_SHIFT 8
-#define LWIP_DEBUGF_LOG_GROUP(_g) \
-    (((_g) << LWIP_DEBUGF_LOG_GROUP_SHIFT) | LWIP_DBG_ON)
+# define LWIP_DEBUGF_LOG_GROUP_SHIFT 8
+# define LWIP_DEBUGF_LOG_GROUP(_g) \
+     (((_g) << LWIP_DEBUGF_LOG_GROUP_SHIFT) | LWIP_DBG_ON)
 
-#define API_LIB_DEBUG    LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_API_LIB)
-#define API_MSG_DEBUG    LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_API_MSG)
-#define ETHARP_DEBUG     LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_ETHARP)
-#define ICMP_DEBUG       LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_ICMP)
-#define IGMP_DEBUG       LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_IGMP)
-#define INET_DEBUG       LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_INET)
-#define IP_DEBUG         LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_IP4)
-#define IP_REASS_DEBUG   LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_IP4_REASS)
-#define IP6_DEBUG        LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_IP6)
-#define MEM_DEBUG        LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_MEM)
-#define MEMP_DEBUG       LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_MEMP)
-#define NETIF_DEBUG      LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_NETIF)
-#define PBUF_DEBUG       LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_PBUF)
-#define RAW_DEBUG        LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_RAW)
-#define SOCKETS_DEBUG    LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_SOCKETS)
-#define SYS_DEBUG        LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_SYS)
-#define TCP_CWND_DEBUG   LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_TCP_CWND)
-#define TCP_DEBUG        LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_TCP)
-#define TCP_FR_DEBUG     LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_TCP_FR)
-#define TCP_INPUT_DEBUG  LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_TCP_INPUT)
-#define TCP_OUTPUT_DEBUG LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_TCP_OUTPUT)
-#define TCP_QLEN_DEBUG   LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_TCP_QLEN)
-#define TCP_RST_DEBUG    LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_TCP_RST)
-#define TCP_RTO_DEBUG    LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_TCP_RTO)
-#define TCP_WND_DEBUG    LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_TCP_WND)
-#define TCPIP_DEBUG      LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_TCPIP)
-#define TIMERS_DEBUG     LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_TIMERS)
-#define UDP_DEBUG        LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_UDP)
+# define API_LIB_DEBUG    LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_API_LIB)
+# define API_MSG_DEBUG    LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_API_MSG)
+# define ETHARP_DEBUG     LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_ETHARP)
+# define ICMP_DEBUG       LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_ICMP)
+# define IGMP_DEBUG       LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_IGMP)
+# define INET_DEBUG       LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_INET)
+# define IP_DEBUG         LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_IP4)
+# define IP_REASS_DEBUG   LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_IP4_REASS)
+# define IP6_DEBUG        LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_IP6)
+# define MEM_DEBUG        LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_MEM)
+# define MEMP_DEBUG       LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_MEMP)
+# define NETIF_DEBUG      LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_NETIF)
+# define PBUF_DEBUG       LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_PBUF)
+# define RAW_DEBUG        LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_RAW)
+# define SOCKETS_DEBUG    LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_SOCKETS)
+# define SYS_DEBUG        LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_SYS)
+# define TCP_CWND_DEBUG   LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_TCP_CWND)
+# define TCP_DEBUG        LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_TCP)
+# define TCP_FR_DEBUG     LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_TCP_FR)
+# define TCP_INPUT_DEBUG  LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_TCP_INPUT)
+# define TCP_OUTPUT_DEBUG LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_TCP_OUTPUT)
+# define TCP_QLEN_DEBUG   LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_TCP_QLEN)
+# define TCP_RST_DEBUG    LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_TCP_RST)
+# define TCP_RTO_DEBUG    LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_TCP_RTO)
+# define TCP_WND_DEBUG    LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_TCP_WND)
+# define TCPIP_DEBUG      LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_TCPIP)
+# define TIMERS_DEBUG     LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_TIMERS)
+# define UDP_DEBUG        LWIP_DEBUGF_LOG_GROUP(LOG_GROUP_LWIP_UDP)
 
 /*
  * The following symbols are for debugging of modules that are not
  * compiled in.  They are listed here for reference but there're no
  * log groups defined for them currently.
  */
-#undef AUTOIP_DEBUG
-#undef DHCP_DEBUG
-#undef DNS_DEBUG
-#undef PPP_DEBUG
-#undef SLIP_DEBUG
-#undef SNMP_MIB_DEBUG
-#undef SNMP_MSG_DEBUG
+# undef AUTOIP_DEBUG
+# undef DHCP_DEBUG
+# undef DNS_DEBUG
+# undef PPP_DEBUG
+# undef SLIP_DEBUG
+# undef SNMP_MIB_DEBUG
+# undef SNMP_MSG_DEBUG
 
-#ifdef LOG_ENABLED
+# ifdef LOG_ENABLED
 
-# define LWIP_DEBUGF(_when, _args) \
-    do { \
-        const VBOX_LOGGROUP _group = (_when) >> LWIP_DEBUGF_LOG_GROUP_SHIFT; \
-        if (_group >= LOG_GROUP_DEFAULT) { \
-            /* severe => l1; serious => l2; warning => l3; default => l4 */ \
-            const unsigned int _level = 1U << (LWIP_DBG_MASK_LEVEL + 1 - ((_when) & LWIP_DBG_MASK_LEVEL)); \
-            LogIt(_level, _group, _args);  \
-        } \
-    } while (0)
+#  define LWIP_DEBUGF(_when, _args) \
+     do { \
+         const VBOX_LOGGROUP _group = (_when) >> LWIP_DEBUGF_LOG_GROUP_SHIFT; \
+         if (_group >= LOG_GROUP_DEFAULT) { \
+             /* severe => l1; serious => l2; warning => l3; default => l4 */ \
+             const unsigned int _level = 1U << (LWIP_DBG_MASK_LEVEL + 1 - ((_when) & LWIP_DBG_MASK_LEVEL)); \
+             LogIt(_level, _group, _args);  \
+         } \
+     } while (0)
 
-#else  /* !LOG_ENABLED */
+# else  /* !LOG_ENABLED */
 
-# define LWIP_DEBUGF(_when, _args) do { } while (0)
+#  define LWIP_DEBUGF(_when, _args) do { } while (0)
 
-#endif /* !LOG_ENABLED */
+# endif /* !LOG_ENABLED */
 
 #endif /* LWIP_DEBUG */
 #endif /* __VBOX_LWIP_LOG_H__ */
diff --git a/src/VBox/Devices/Network/lwip-new/vbox/sys_arch.c b/src/VBox/Devices/Network/lwip-new/vbox/sys_arch.c
index 066f5fb..6fe02df 100644
--- a/src/VBox/Devices/Network/lwip-new/vbox/sys_arch.c
+++ b/src/VBox/Devices/Network/lwip-new/vbox/sys_arch.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -63,7 +63,7 @@ typedef struct
 } THREADLOCALSTORAGE;
 
 /** Actual declaration of the mbox type. */
-/* @todo: magic - ??? */
+/** @todo magic - ??? */
 struct sys_mbox
 {
     LWIPMUTEXTYPE mutex;
@@ -178,6 +178,7 @@ err_t sys_mbox_new(sys_mbox_t *pvMbox, int size)
 {
     int rc;
     struct sys_mbox *mbox = NULL;
+    RT_NOREF(size); /** @todo safe to ignore this? */
 
     if (pvMbox == NULL)
         return ERR_ARG;
@@ -325,8 +326,8 @@ u32_t sys_arch_mbox_fetch(sys_mbox_t *pvMbox, void **msg, u32_t timeout)
     RTMSINTERVAL cMillies;
     uint64_t tsStart, tsEnd;
     struct sys_mbox *mbox = NULL;
+
     if (!pvMbox || !*pvMbox) return 0;
-    AssertReturn(pvMbox && *pvMbox, ERR_ARG);
     mbox = (struct sys_mbox*)*pvMbox;
 
     tsStart = RTTimeMilliTS();
@@ -492,11 +493,14 @@ struct sys_timeouts *sys_arch_timeouts(void)
  * Internal: thread main function adapter, dropping the first parameter. Needed
  * to make lwip thread main function compatible with IPRT thread main function.
  */
-static DECLCALLBACK(int) sys_thread_adapter(RTTHREAD ThreadSelf, void *pvUser)
+static DECLCALLBACK(int) sys_thread_adapter(RTTHREAD hThreadSelf, void *pvUser)
 {
     THREADLOCALSTORAGE *tls = (THREADLOCALSTORAGE *)pvUser;
+    RT_NOREF(hThreadSelf);
+
     tls->thread(tls->arg);
-    return 0;
+
+    return VINF_SUCCESS;
 }
 
 /**
@@ -511,6 +515,8 @@ sys_thread_t sys_thread_new(const char*name, lwip_thread_fn thread, void *arg, i
     unsigned id;
     RTTHREAD tid;
 
+    RT_NOREF(prio, stacksize, name);
+
 #if SYS_LIGHTWEIGHT_PROT
     SYS_ARCH_PROTECT(old_level);
 #else
diff --git a/src/VBox/Devices/Network/lwipopts.h b/src/VBox/Devices/Network/lwipopts.h
index 2e04c63..1248384 100644
--- a/src/VBox/Devices/Network/lwipopts.h
+++ b/src/VBox/Devices/Network/lwipopts.h
@@ -1,6 +1,7 @@
 #ifndef VBOX_LWIP_OPTS_H_
 #define VBOX_LWIP_OPTS_H_
 
+#include <VBox/cdefs.h>     /* For VBOX_STRICT. */
 #include <iprt/mem.h>
 #include <iprt/alloca.h>    /* This may include malloc.h (msc), which is something that has
                              * to be done before redefining any of the functions therein. */
@@ -171,6 +172,10 @@
 #define realloc(x,y) RTMemRealloc((x), (y))
 #define free(x) RTMemFree(x)
 
+/* Align VBOX_STRICT and LWIP_NOASSERT. */
+#ifndef VBOX_STRICT
+# define LWIP_NOASSERT 1
+#endif
 
 #include "lwip-namespace.h"
 
diff --git a/src/VBox/Devices/Network/scripts/VBoxPortForwarding.py b/src/VBox/Devices/Network/scripts/VBoxPortForwarding.py
index 5134391..749bc52 100755
--- a/src/VBox/Devices/Network/scripts/VBoxPortForwarding.py
+++ b/src/VBox/Devices/Network/scripts/VBoxPortForwarding.py
@@ -1,7 +1,7 @@
 #!/usr/bin/python
 
 """
-Copyright (C) 2009-2015 Oracle Corporation
+Copyright (C) 2009-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/slirp/bootp.c b/src/VBox/Devices/Network/slirp/bootp.c
index df266e2..11469ee 100644
--- a/src/VBox/Devices/Network/slirp/bootp.c
+++ b/src/VBox/Devices/Network/slirp/bootp.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -66,7 +66,7 @@ static uint8_t *dhcp_find_option(uint8_t *vend, uint8_t tag)
 {
     uint8_t *q = vend;
     uint8_t len;
-    /*@todo magic validation */
+    /** @todo magic validation */
     q += 4; /*magic*/
     while(*q != RFC1533_END)
     {
@@ -591,21 +591,17 @@ static int dhcp_decode_discover(PNATState pData, struct bootp_t *bp, int fDhcpDi
         offReply = dhcp_send_offer(pData, bp, bc, m);
         return offReply;
     }
-    else
-    {
-        bc = find_addr(pData, &daddr, bp->bp_hwaddr);
-        if (!bc)
-        {
-            LogRel(("NAT: DHCP Inform was ignored no boot client was found\n"));
-            return -1;
-        }
 
-        LogRel(("NAT: DHCP offered IP address %RTnaipv4\n", bc->addr.s_addr));
-        offReply = dhcp_send_ack(pData, bp, bc, m, /* fDhcpRequest=*/ 0);
-        return offReply;
+    bc = find_addr(pData, &daddr, bp->bp_hwaddr);
+    if (!bc)
+    {
+        LogRel(("NAT: DHCP Inform was ignored no boot client was found\n"));
+        return -1;
     }
 
-    return -1;
+    LogRel(("NAT: DHCP offered IP address %RTnaipv4\n", bc->addr.s_addr));
+    offReply = dhcp_send_ack(pData, bp, bc, m, /* fDhcpRequest=*/ 0);
+    return offReply;
 }
 
 static int dhcp_decode_release(PNATState pData, struct bootp_t *bp)
@@ -616,6 +612,7 @@ static int dhcp_decode_release(PNATState pData, struct bootp_t *bp)
             bp->bp_ciaddr.s_addr));
     return 0;
 }
+
 /**
  * fields for discovering t
  * Field      DHCPDISCOVER          DHCPREQUEST           DHCPDECLINE,
diff --git a/src/VBox/Devices/Network/slirp/bootp.h b/src/VBox/Devices/Network/slirp/bootp.h
index f4121e0..d31d2ce 100644
--- a/src/VBox/Devices/Network/slirp/bootp.h
+++ b/src/VBox/Devices/Network/slirp/bootp.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Audio_old/Makefile.kup b/src/VBox/Devices/Network/slirp/bsd/Makefile.kup
similarity index 100%
copy from src/VBox/Devices/Audio_old/Makefile.kup
copy to src/VBox/Devices/Network/slirp/bsd/Makefile.kup
diff --git a/src/VBox/Devices/Audio_old/Makefile.kup b/src/VBox/Devices/Network/slirp/bsd/amd64/Makefile.kup
similarity index 100%
copy from src/VBox/Devices/Audio_old/Makefile.kup
copy to src/VBox/Devices/Network/slirp/bsd/amd64/Makefile.kup
diff --git a/src/VBox/Devices/Network/slirp/bsd/amd64/in_cksum.c b/src/VBox/Devices/Network/slirp/bsd/amd64/in_cksum.c
index 2c87158..e99fa67 100644
--- a/src/VBox/Devices/Network/slirp/bsd/amd64/in_cksum.c
+++ b/src/VBox/Devices/Network/slirp/bsd/amd64/in_cksum.c
@@ -102,13 +102,13 @@ in_cksumdata(const void *buf, int len)
 	int offset;
 	union q_util q_util;
 
-	if ((3 & (long) lw) == 0 && len == 20) {
+	if ((3 & (intptr_t) lw) == 0 && len == 20) {
 	     sum = (u_int64_t) lw[0] + lw[1] + lw[2] + lw[3] + lw[4];
 	     REDUCE32;
 	     return sum;
 	}
 
-	if ((offset = 3 & (long) lw) != 0) {
+	if ((offset = 3 & (intptr_t) lw) != 0) {
 		const u_int32_t *masks = in_masks + (offset << 2);
 		lw = (u_int32_t *) (((RTHCUINTPTR) lw) - offset);
 		sum = *lw++ & masks[len >= 3 ? 3 : len];
@@ -224,7 +224,7 @@ in_cksum_skip(struct mbuf *m, int len, int skip)
 skip_start:
 		if (len < mlen)
 			mlen = len;
-		if ((clen ^ (long) addr) & 1)
+		if ((clen ^ (intptr_t) addr) & 1)
 		    sum += in_cksumdata(addr, mlen) << 8;
 		else
 		    sum += in_cksumdata(addr, mlen);
diff --git a/src/VBox/Devices/Audio_old/Makefile.kup b/src/VBox/Devices/Network/slirp/bsd/i386/Makefile.kup
similarity index 100%
copy from src/VBox/Devices/Audio_old/Makefile.kup
copy to src/VBox/Devices/Network/slirp/bsd/i386/Makefile.kup
diff --git a/src/VBox/Devices/Audio_old/Makefile.kup b/src/VBox/Devices/Network/slirp/bsd/kern/Makefile.kup
similarity index 100%
copy from src/VBox/Devices/Audio_old/Makefile.kup
copy to src/VBox/Devices/Network/slirp/bsd/kern/Makefile.kup
diff --git a/src/VBox/Devices/Network/slirp/bsd/kern/kern_mbuf.c b/src/VBox/Devices/Network/slirp/bsd/kern/kern_mbuf.c
index dbcba93..c908e2f 100644
--- a/src/VBox/Devices/Network/slirp/bsd/kern/kern_mbuf.c
+++ b/src/VBox/Devices/Network/slirp/bsd/kern/kern_mbuf.c
@@ -255,7 +255,7 @@ static int	mb_zinit_pack(PNATState, void *, int, int);
 static void	mb_zfini_pack(PNATState, void *, int);
 #endif
 
-static void	mb_reclaim(void *);
+/*static void	mb_reclaim(void *); - unused */
 #ifndef VBOX
 static void	mbuf_init(void *);
 static void    *mbuf_jumbo_alloc(uma_zone_t, int, u_int8_t *, int);
@@ -528,13 +528,13 @@ mb_dtor_mbuf(PNATState pData, void *mem, int size, void *arg)
 #endif
 {
 	struct mbuf *m;
-	unsigned long flags;
+	uintptr_t flags;
 #ifdef VBOX
-    NOREF(pData);
+	NOREF(pData);
 #endif
 
 	m = (struct mbuf *)mem;
-	flags = (unsigned long)arg;
+	flags = (uintptr_t)arg;
 
 	if ((flags & MB_NOTAGS) == 0 && (m->m_flags & M_PKTHDR) != 0)
 		m_tag_delete_chain(m, NULL);
@@ -543,8 +543,8 @@ mb_dtor_mbuf(PNATState pData, void *mem, int size, void *arg)
 #ifdef INVARIANTS
 	trash_dtor(mem, size, arg);
 #elif defined(VBOX)
-    NOREF(size);
-    NOREF(arg);
+	NOREF(size);
+	NOREF(arg);
 #endif
 }
 
@@ -795,6 +795,7 @@ mb_ctor_pack(PNATState pData, void *mem, int size, void *arg, int how)
 	return (0);
 }
 
+#if 0 /* unused */
 /*
  * This is the protocol drain routine.
  *
@@ -820,3 +821,4 @@ mb_reclaim(void *junk)
     NOREF(junk);
 #endif
 }
+#endif /* unused */
diff --git a/src/VBox/Devices/Network/slirp/bsd/kern/uipc_mbuf.c b/src/VBox/Devices/Network/slirp/bsd/kern/uipc_mbuf.c
index ee968bf..aa4cff0 100644
--- a/src/VBox/Devices/Network/slirp/bsd/kern/uipc_mbuf.c
+++ b/src/VBox/Devices/Network/slirp/bsd/kern/uipc_mbuf.c
@@ -268,7 +268,7 @@ mb_free_ext(PNATState pData, struct mbuf *m)
 
 	/* Free attached storage if this mbuf is the only reference to it. */
 	if (*(m->m_ext.ref_cnt) == 1 ||
-	    atomic_fetchadd_int(m->m_ext.ref_cnt, -1) == 1) {
+	    atomic_fetchadd_int(m->m_ext.ref_cnt, (uint32_t)-1) == 1) {
 		switch (m->m_ext.ext_type) {
 		case EXT_PACKET:	/* The packet zone is special. */
 			if (*(m->m_ext.ref_cnt) == 0)
@@ -433,7 +433,7 @@ m_sanity(PNATState pData, struct mbuf *m0, int sanitize)
 #else
 				m_freem(pData, m->m_nextpkt);
 #endif
-				m->m_nextpkt = (struct mbuf *)0xDEADC0DE;
+				m->m_nextpkt = (struct mbuf *)(uintptr_t)UINT32_C(0xDEADC0DE);
 			} else
 				M_SANITY_ACTION("m->m_nextpkt on in-chain mbuf");
 		}
diff --git a/src/VBox/Devices/Network/slirp/bsd/sys/mbuf.h b/src/VBox/Devices/Network/slirp/bsd/sys/mbuf.h
index ca576d2..d6bdb42 100644
--- a/src/VBox/Devices/Network/slirp/bsd/sys/mbuf.h
+++ b/src/VBox/Devices/Network/slirp/bsd/sys/mbuf.h
@@ -62,8 +62,12 @@ DECLNORETURN(static void) panic (char *fmt, ...)
 /* for non-gnu compilers */
 # define __func__ RT_GCC_EXTENSION __FUNCTION__
 # ifndef __inline
+#  ifdef __GNUC__
+#  define __inline __inline__
+# else
 #  define __inline
 # endif
+# endif
 
 # define bzero(a1, len) memset((a1), 0, (len))
 
@@ -622,7 +626,7 @@ m_free_fast(PNATState pData, struct mbuf *m)
 {
 	AssertMsg(SLIST_EMPTY(&m->m_pkthdr.tags), ("doing fast free of mbuf with tags"));
 
-	uma_zfree_arg(zone_mbuf, m, (void *)MB_NOTAGS);
+	uma_zfree_arg(zone_mbuf, m, (void *)(uintptr_t)MB_NOTAGS);
 }
 #endif
 
diff --git a/src/VBox/Devices/Network/slirp/cksum.c b/src/VBox/Devices/Network/slirp/cksum.c
index 0b40569..6ff9a1c 100644
--- a/src/VBox/Devices/Network/slirp/cksum.c
+++ b/src/VBox/Devices/Network/slirp/cksum.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/slirp/counters.h b/src/VBox/Devices/Network/slirp/counters.h
index 131d2b6..72450c1 100644
--- a/src/VBox/Devices/Network/slirp/counters.h
+++ b/src/VBox/Devices/Network/slirp/counters.h
@@ -8,7 +8,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/slirp/ctl.h b/src/VBox/Devices/Network/slirp/ctl.h
index 8f5a22c..a863d09 100644
--- a/src/VBox/Devices/Network/slirp/ctl.h
+++ b/src/VBox/Devices/Network/slirp/ctl.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/slirp/debug.c b/src/VBox/Devices/Network/slirp/debug.c
index 5098074..0734b05 100644
--- a/src/VBox/Devices/Network/slirp/debug.c
+++ b/src/VBox/Devices/Network/slirp/debug.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/slirp/debug.h b/src/VBox/Devices/Network/slirp/debug.h
index 7e739ad..b8708fc 100644
--- a/src/VBox/Devices/Network/slirp/debug.h
+++ b/src/VBox/Devices/Network/slirp/debug.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/slirp/dnsproxy/dnsproxy.c b/src/VBox/Devices/Network/slirp/dnsproxy/dnsproxy.c
index 831ca4e..6db5aa3 100644
--- a/src/VBox/Devices/Network/slirp/dnsproxy/dnsproxy.c
+++ b/src/VBox/Devices/Network/slirp/dnsproxy/dnsproxy.c
@@ -1,7 +1,7 @@
 /* $Id: dnsproxy.c $ */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/slirp/ext.h b/src/VBox/Devices/Network/slirp/ext.h
index dd0f692..f0cb59d 100644
--- a/src/VBox/Devices/Network/slirp/ext.h
+++ b/src/VBox/Devices/Network/slirp/ext.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -15,7 +15,7 @@
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
 
-# ifndef IN_BSD
+#ifndef IN_BSD
 # define zone_mbuf slirp_zone_mbuf(pData)
 # define zone_clust slirp_zone_clust(pData)
 # define zone_pack slirp_zone_pack(pData)
@@ -50,10 +50,12 @@ static inline uma_zone_t slirp_zone_ext_refcnt(PNATState);
 
 #ifndef _EXT_H_
 #define _EXT_H_
+
 # define fprintf vbox_slirp_fprintf
 # define printf vbox_slirp_printf
-#ifndef vbox_slirp_printfV
-static void vbox_slirp_printV(char *format, va_list args)
+
+# ifndef vbox_slirp_printfV
+DECLINLINE(void) vbox_slirp_printV(char *format, va_list args)
 {
     char buffer[1024];
     memset(buffer, 0, 1024);
@@ -61,10 +63,10 @@ static void vbox_slirp_printV(char *format, va_list args)
 
     LogRel(("NAT:EXT: %s\n", buffer));
 }
-#endif
+# endif
 
 # ifndef vbox_slirp_printf
-static void vbox_slirp_printf(char *format, ...)
+DECLINLINE(void) vbox_slirp_printf(char *format, ...)
 {
     va_list args;
     va_start(args, format);
@@ -74,7 +76,7 @@ static void vbox_slirp_printf(char *format, ...)
 # endif
 
 # ifndef vbox_slirp_fprintf
-static void vbox_slirp_fprintf(void *ignored, char *format, ...)
+DECLINLINE(void) vbox_slirp_fprintf(void *ignored, char *format, ...)
 {
 #  ifdef LOG_ENABLED
     va_list args;
@@ -88,4 +90,6 @@ static void vbox_slirp_fprintf(void *ignored, char *format, ...)
 #  endif
 }
 # endif
+
 #endif
+
diff --git a/src/VBox/Devices/Network/slirp/hostres.c b/src/VBox/Devices/Network/slirp/hostres.c
index 1778695..96db3a4 100644
--- a/src/VBox/Devices/Network/slirp/hostres.c
+++ b/src/VBox/Devices/Network/slirp/hostres.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -145,7 +145,7 @@ static int get_in_addr_arpa(struct in_addr *paddr, struct label *root);
 static int labelstrcmp(struct label *l, const char *s);
 static void strnlabels(char *namebuf, size_t nbuflen, const uint8_t *msg, size_t off);
 
-static void LogLabelsTree(const char *before, struct label *l, const char *after);
+/*static void LogLabelsTree(const char *before, struct label *l, const char *after); - unused */
 static void free_labels(struct label *root);
 
 #ifdef VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER
@@ -174,7 +174,7 @@ struct mbuf *
 hostresolver(PNATState pData, struct mbuf *m, uint32_t src, uint16_t sport)
 {
     struct response *res;
-    size_t mlen;
+    u_int mlen;
     int rc;
 
     rc = verify_header(pData, &m);
@@ -379,7 +379,7 @@ hostres_slirp_reply(struct response *res)
     m->m_data += sizeof(struct ip) + sizeof(struct udphdr);
 
     m->m_len = 0;
-    ok = m_append(pData, m, res->end, (c_caddr_t)res->buf);
+    ok = m_append(pData, m, (int)res->end, (c_caddr_t)res->buf);
     if (!ok)
     {
         m_freem(pData, m);
@@ -535,7 +535,7 @@ respond(struct response *res)
      */
     if (off < res->qlen)
     {
-        int trailer = res->qlen - off;
+        ssize_t trailer = res->qlen - off;
 
         LogDbg(("NAT: hostres: question %zu < mlen %zu\n", off, res->qlen));
 
@@ -750,7 +750,7 @@ resolve(struct response *res, uint16_t qtype, size_t qname)
 #endif
 
   out:
-    pHdr->ancount = RT_H2N_U16(nanswers);
+    pHdr->ancount = RT_H2N_U16((uint16_t)nanswers);
     return VINF_SUCCESS;
 }
 
@@ -767,7 +767,6 @@ resolve_reverse(struct response *res, uint16_t qtype, size_t qname,
     size_t oend;
     size_t nanswers;
     ssize_t nbytes;
-    int i;
 
     pHdr = (struct dnsmsg_header *)res->buf;
     nanswers = 0;
@@ -790,7 +789,7 @@ resolve_reverse(struct response *res, uint16_t qtype, size_t qname,
      * we reply with the answer from the map, the answer will be lost.
      */
     {
-        PDNSMAPPINGENTRY pReverseMapping = getDNSMapByAddr(res->pData, &in_addr_arpa.s_addr);
+        PDNSMAPPINGENTRY pReverseMapping = getDNSMapByAddr(res->pData, (const uint32_t *)&in_addr_arpa.s_addr);
         if (pReverseMapping != NULL)
         {
             LogDbg(("NAT: hostres: %RTnaipv4 resolved from mapping\n",
@@ -812,7 +811,11 @@ resolve_reverse(struct response *res, uint16_t qtype, size_t qname,
 
     if (h == NULL)
     {
+#ifdef RT_OS_WINDOWS
+        h = gethostbyaddr((const char *)&in_addr_arpa, sizeof(struct in_addr), AF_INET);
+#else
         h = gethostbyaddr(&in_addr_arpa, sizeof(struct in_addr), AF_INET);
+#endif
     }
 
     if (h == NULL)
@@ -847,7 +850,7 @@ resolve_reverse(struct response *res, uint16_t qtype, size_t qname,
     }
 
   out:
-    pHdr->ancount = RT_H2N_U16(nanswers);
+    pHdr->ancount = RT_H2N_U16((uint16_t)nanswers);
     return VINF_SUCCESS;
 }
 
@@ -900,7 +903,7 @@ append_a(struct response *res, const char *name, struct in_addr addr)
     CHECKED( append_rrhdr(res, name, Type_A, 3600) );
     CHECKED( append_u16(res, RT_H2N_U16_C(sizeof(addr))) );
     CHECKED( append_u32(res, addr.s_addr) );
- 
+
     APPEND_EPILOGUE();
 }
 
@@ -1020,7 +1023,7 @@ append_name(struct response *res, const char *name)
 
             ++s;
         }
-        
+
         poff = wr;
 
         buf[poff] = (uint8_t)plen; /* length byte */
@@ -1188,6 +1191,7 @@ get_in_addr_arpa(struct in_addr *paddr, struct label *root)
     RTNETADDRIPV4 addr;
     struct label *l;
     int i;
+    RT_ZERO(addr); /* makes MSC happy*/
 
     l = root;
     if (l == NULL || labelstrcmp(l, "arpa") != 0)
@@ -1300,6 +1304,7 @@ strnlabels(char *namebuf, size_t nbuflen, const uint8_t *msg, size_t off)
 }
 
 
+#if 0 /* unused */
 static void
 LogLabelsTree(const char *before, struct label *l, const char *after)
 {
@@ -1344,6 +1349,7 @@ LogLabelsTree(const char *before, struct label *l, const char *after)
     if (after != NULL)
         LogDbg(("%s", after));
 }
+#endif /* unused */
 
 
 static void
diff --git a/src/VBox/Devices/Network/slirp/icmp_var.h b/src/VBox/Devices/Network/slirp/icmp_var.h
index 540104c..f81e75f 100644
--- a/src/VBox/Devices/Network/slirp/icmp_var.h
+++ b/src/VBox/Devices/Network/slirp/icmp_var.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/slirp/if.h b/src/VBox/Devices/Network/slirp/if.h
index 181fc94..ffd4476 100644
--- a/src/VBox/Devices/Network/slirp/if.h
+++ b/src/VBox/Devices/Network/slirp/if.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/slirp/ip.h b/src/VBox/Devices/Network/slirp/ip.h
index 38dbebc..3788348 100644
--- a/src/VBox/Devices/Network/slirp/ip.h
+++ b/src/VBox/Devices/Network/slirp/ip.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/slirp/ip_icmp.c b/src/VBox/Devices/Network/slirp/ip_icmp.c
index c5d7519..ba65141 100644
--- a/src/VBox/Devices/Network/slirp/ip_icmp.c
+++ b/src/VBox/Devices/Network/slirp/ip_icmp.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -63,7 +63,9 @@ int getrawsock(int type);
 
 /* The message sent when emulating PING */
 /* Be nice and tell them it's just a psuedo-ping packet */
+#if 0 /* unused */
 static const char icmp_ping_msg[] = "This is a psuedo-PING packet used by Slirp to emulate ICMP ECHO-REQUEST packets.\n";
+#endif
 
 /* list of actions for icmp_error() on RX of an icmp message */
 static const int icmp_flush[19] =
@@ -129,7 +131,10 @@ icmp_init(PNATState pData, int iIcmpCacheLimit)
     }
     fd_nonblock(pData->icmp_socket.s);
     NSOCK_INC();
+
 #else /* RT_OS_WINDOWS */
+    RT_NOREF(iIcmpCacheLimit);
+
     if (icmpwin_init(pData) != 0)
         return 1;
 #endif /* RT_OS_WINDOWS */
@@ -432,7 +437,7 @@ icmp_input(PNATState pData, struct mbuf *m, int hlen)
 
     /* int code; */
 
-    LogFlowFunc(("ENTER: m = %lx, m_len = %d\n", (long)m, m ? m->m_len : 0));
+    LogFlowFunc(("ENTER: m = %p, m_len = %d\n", m, m ? m->m_len : 0));
 
     icmpstat.icps_received++;
 
@@ -617,6 +622,7 @@ void icmp_error(PNATState pData, struct mbuf *msrc, u_char type, u_char code, in
     struct ip *oip, *ip;
     struct icmp *icp;
     void *payload;
+    RT_NOREF(minsize);
 
     LogFlow(("icmp_error: msrc = %p, msrc_len = %d\n",
              (void *)msrc, msrc ? msrc->m_len : 0));
diff --git a/src/VBox/Devices/Network/slirp/ip_icmp.h b/src/VBox/Devices/Network/slirp/ip_icmp.h
index c6c7e07..aaf7afc 100644
--- a/src/VBox/Devices/Network/slirp/ip_icmp.h
+++ b/src/VBox/Devices/Network/slirp/ip_icmp.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/slirp/ip_icmpwin.c b/src/VBox/Devices/Network/slirp/ip_icmpwin.c
index 8e6e520..bc33558 100644
--- a/src/VBox/Devices/Network/slirp/ip_icmpwin.c
+++ b/src/VBox/Devices/Network/slirp/ip_icmpwin.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -19,7 +19,10 @@
 #include "ip_icmp.h"
 
 #include <winternl.h>           /* for PIO_APC_ROUTINE &c */
-#include <iphlpapi.h>
+#ifndef PIO_APC_ROUTINE_DEFINED
+# define PIO_APC_ROUTINE_DEFINED 1
+#endif
+#include <iprt/win/iphlpapi.h>
 #include <icmpapi.h>
 
 /*
@@ -70,13 +73,13 @@ static struct mbuf *icmpwin_get_mbuf(PNATState pData, size_t reqsize);
  *
  * XXX: this is system-wide, but what about multiple NAT threads?
  */
-static void *pfIcmpCallback;
+static PIO_APC_ROUTINE g_pfnIcmpCallback;
 
 
 int
 icmpwin_init(PNATState pData)
 {
-    if (pfIcmpCallback == NULL)
+    if (g_pfnIcmpCallback == NULL)
     {
         OSVERSIONINFO osvi;
         int status;
@@ -88,9 +91,9 @@ icmpwin_init(PNATState pData)
             return 1;
 
         if (osvi.dwMajorVersion >= 6)
-            pfIcmpCallback = icmpwin_callback_apc;
+            g_pfnIcmpCallback = icmpwin_callback_apc;
         else
-            pfIcmpCallback = icmpwin_callback_old;
+            g_pfnIcmpCallback = (PIO_APC_ROUTINE)icmpwin_callback_old;
     }
 
     TAILQ_INIT(&pData->pongs_expected);
@@ -175,7 +178,7 @@ icmpwin_ping(PNATState pData, struct mbuf *m, int hlen)
         /* use reply buffer as temporary storage */
         reqdata = pong->buf;
         m_copydata(m, sizeof(struct ip) + sizeof(struct icmp_echo),
-                   reqsize, reqdata);
+                   (int)reqsize, reqdata);
     }
 
     dst = ip->ip_dst.s_addr;
@@ -188,7 +191,7 @@ icmpwin_ping(PNATState pData, struct mbuf *m, int hlen)
 
 
     status = IcmpSendEcho2(pData->icmp_socket.sh, NULL,
-                           pfIcmpCallback, pong,
+                           g_pfnIcmpCallback, pong,
                            dst, reqdata, (WORD)reqsize, &opts,
                            pong->buf, (DWORD)pong->bufsize,
                            5 * 1000 /* ms */);
@@ -249,6 +252,7 @@ icmpwin_callback_apc(void *ctx, PIO_STATUS_BLOCK iob, ULONG reserved)
     struct pong *pong = (struct pong *)ctx;
     if (pong != NULL)
         icmpwin_callback(pong);
+    RT_NOREF2(iob, reserved);
 }
 
 
@@ -388,7 +392,7 @@ icmpwin_pong(struct pong *pong)
 
         /* fill in ip (ip_output0() does the boilerplate for us) */
         ip->ip_tos = reply->Options.Tos;
-        ip->ip_len = sizeof(*ip) + sizeof(*icmp) + reqsize;
+        ip->ip_len = sizeof(*ip) + sizeof(*icmp) + (int)reqsize;
         ip->ip_off = 0;
         ip->ip_ttl = reply->Options.Ttl;
         ip->ip_p = IPPROTO_ICMP;
@@ -401,7 +405,7 @@ icmpwin_pong(struct pong *pong)
         icmp->icmp_echo_id = pong->reqicmph.icmp_echo_id;
         icmp->icmp_echo_seq = pong->reqicmph.icmp_echo_seq;
 
-        m_append(pData, m, reqsize, reply->Data);
+        m_append(pData, m, (int)reqsize, reply->Data);
 
         icmp->icmp_cksum = in_cksum_skip(m, ip->ip_len, sizeof(*ip));
     }
@@ -484,7 +488,7 @@ icmpwin_get_error(struct pong *pong, int type, int code)
     icmp = (struct icmp_echo *)(mtod(m, char *) + sizeof(*ip));
 
     ip->ip_tos = 0;
-    ip->ip_len = sizeof(*ip) + sizeof(*icmp) + reqsize;
+    ip->ip_len = sizeof(*ip) + sizeof(*icmp) + (int)reqsize;
     ip->ip_off = 0;
     ip->ip_ttl = IPDEFTTL;
     ip->ip_p = IPPROTO_ICMP;
@@ -523,7 +527,7 @@ icmpwin_get_mbuf(PNATState pData, size_t reqsize)
         /* good pings come in small packets */
         m = m_gethdr(pData, M_NOWAIT, MT_HEADER);
     else
-        m = m_getjcl(pData, M_NOWAIT, MT_HEADER, M_PKTHDR, slirp_size(pData));
+        m = m_getjcl(pData, M_NOWAIT, MT_HEADER, M_PKTHDR, (int)slirp_size(pData));
 
     if (m == NULL)
         return NULL;
@@ -536,3 +540,4 @@ icmpwin_get_mbuf(PNATState pData, size_t reqsize)
 
     return m;
 }
+
diff --git a/src/VBox/Devices/Network/slirp/ip_input.c b/src/VBox/Devices/Network/slirp/ip_input.c
index 2dea12e..5c43297 100644
--- a/src/VBox/Devices/Network/slirp/ip_input.c
+++ b/src/VBox/Devices/Network/slirp/ip_input.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -97,7 +97,7 @@ ip_input(PNATState pData, struct mbuf *m)
 
     STAM_PROFILE_START(&pData->StatIP_input, a);
 
-    LogFlowFunc(("ENTER: m = %lx\n", (long)m));
+    LogFlowFunc(("ENTER: m = %p\n", m));
     ip = mtod(m, struct ip *);
     Log2(("ip_dst=%RTnaipv4(len:%d) m_len = %d\n", ip->ip_dst, RT_N2H_U16(ip->ip_len), m->m_len));
 
@@ -659,7 +659,7 @@ ip_stripoptions(struct mbuf *m, struct mbuf *mopt)
     struct ip *ip = mtod(m, struct ip *);
     register caddr_t opts;
     int olen;
-    NOREF(mopt); /* @todo: do we really will need this options buffer? */
+    NOREF(mopt); /** @todo do we really will need this options buffer? */
 
     olen = (ip->ip_hl<<2) - sizeof(struct ip);
     opts = (caddr_t)(ip + 1);
diff --git a/src/VBox/Devices/Network/slirp/ip_output.c b/src/VBox/Devices/Network/slirp/ip_output.c
index 1576319..5f11a6b 100644
--- a/src/VBox/Devices/Network/slirp/ip_output.c
+++ b/src/VBox/Devices/Network/slirp/ip_output.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -128,7 +128,7 @@ ip_output0(PNATState pData, struct socket *so, struct mbuf *m0, int urg)
     STAM_PROFILE_START(&pData->StatIP_output, a);
 
 #ifdef LOG_ENABLED
-    LogFlowFunc(("ip_output: so = %R[natsock], m0 = %lx\n", so, (long)m0));
+    LogFlowFunc(("ip_output: so = %R[natsock], m0 = %p\n", so, m0));
 #else
     NOREF(so);
 #endif
@@ -173,7 +173,6 @@ ip_output0(PNATState pData, struct socket *so, struct mbuf *m0, int urg)
         ip->ip_sum = cksum(m, hlen);
 
         if (!(m->m_flags & M_SKIP_FIREWALL)){
-            struct m_tag *t;
             STAM_PROFILE_START(&pData->StatALIAS_output, b);
             rc = LibAliasOut(pData->proxy_alias, mtod(m, char *), m_length(m, NULL));
             if (rc == PKT_ALIAS_IGNORED)
@@ -292,7 +291,7 @@ ip_output0(PNATState pData, struct socket *so, struct mbuf *m0, int urg)
 
 send_or_free:
         if (!(m->m_flags & M_SKIP_FIREWALL)){
-            /* @todo: We can't alias all fragments because the way libalias processing
+            /** @todo We can't alias all fragments because the way libalias processing
              * the fragments brake the sequence. libalias put alias_address to the source
              * address of IP header of fragment, while IP header of the first packet is
              * is unmodified. That confuses guest's TCP/IP stack and guest drop the sequence.
@@ -301,7 +300,6 @@ send_or_free:
              * Here we need investigate what should be done to avoid such behavior and find right
              * solution.
              */
-            struct m_tag *t;
             int rcLa;
 
             rcLa = LibAliasOut(pData->proxy_alias, mtod(m, char *), m->m_len);
diff --git a/src/VBox/Devices/Network/slirp/libalias/alias.c b/src/VBox/Devices/Network/slirp/libalias/alias.c
index bb60ba9..f5c94f3 100644
--- a/src/VBox/Devices/Network/slirp/libalias/alias.c
+++ b/src/VBox/Devices/Network/slirp/libalias/alias.c
@@ -161,7 +161,7 @@ twowords(void *p)
 {
     uint8_t *c = p;
 
-#if BYTE_ORDER == LITTLE_ENDIAN
+#ifdef RT_LITTLE_ENDIAN /*BYTE_ORDER == LITTLE_ENDIAN*/
     uint16_t s1 = ((uint16_t)c[1] << 8) + (uint16_t)c[0];
     uint16_t s2 = ((uint16_t)c[3] << 8) + (uint16_t)c[2];
 #else
@@ -976,7 +976,7 @@ TcpAliasOut(struct libalias *la, struct ip *pip, int maxpacketsize, int create)
 {
     int proxy_type, error;
     u_short dest_port;
-    u_short proxy_server_port;
+    u_short proxy_server_port = 0; /* Shut up MSC. */
     struct in_addr dest_address;
     struct in_addr proxy_server_address;
     struct tcphdr *tc;
@@ -1578,7 +1578,7 @@ getout:
 int
 LibAliasRefreshModules(void)
 {
-    /* @todo (r - vasily) here should be module loading */
+    /** @todo (r - vasily) here should be module loading */
 #ifndef VBOX
     char buf[256], conf[] = "/etc/libalias.conf";
     FILE *fd;
diff --git a/src/VBox/Devices/Network/slirp/libalias/alias_db.c b/src/VBox/Devices/Network/slirp/libalias/alias_db.c
index 7a37dc8..a4f3c16 100644
--- a/src/VBox/Devices/Network/slirp/libalias/alias_db.c
+++ b/src/VBox/Devices/Network/slirp/libalias/alias_db.c
@@ -2277,7 +2277,7 @@ InitPacketAliasLog(struct libalias *la)
             return (ENOMEM); /* log initialization failed */
 #else
         Log2(("NAT: PacketAlias/InitPacketAliasLog: Packet alias logging enabled.\n"));
-        la->logDesc = (void *)1; /* XXX: in vbox we don't use this param */
+        la->logDesc = (void *)(uintptr_t)1; /* XXX: in vbox we don't use this param */
 #endif
         la->packetAliasMode |= PKT_ALIAS_LOG;
     }
diff --git a/src/VBox/Devices/Network/slirp/libalias/alias_ftp.c b/src/VBox/Devices/Network/slirp/libalias/alias_ftp.c
index 64596be..9c218ad 100644
--- a/src/VBox/Devices/Network/slirp/libalias/alias_ftp.c
+++ b/src/VBox/Devices/Network/slirp/libalias/alias_ftp.c
@@ -181,7 +181,7 @@ ftp_alias_handler(PNATState pData, int type)
     handlers[0].proto = TCP;
     handlers[0].fingerprint = &fingerprint;
     handlers[0].protohandler = &protohandler;
-    handlers[1].pri = EOH;
+    handlers[1].pri = (u_int)EOH;
 #endif /* VBOX */
 
     switch (type) {
@@ -727,7 +727,7 @@ NewFtpMessage(struct libalias *la, struct ip *pip,
             }
 
 /* Save string length for IP header modification */
-            slen = strlen(stemp);
+            slen = (int)strlen(stemp);
 
 /* Copy modified buffer into IP packet. */
             sptr = (char *)pip;
diff --git a/src/VBox/Devices/Network/slirp/libalias/alias_nbt.c b/src/VBox/Devices/Network/slirp/libalias/alias_nbt.c
index a77acc5..eab4fa4 100644
--- a/src/VBox/Devices/Network/slirp/libalias/alias_nbt.c
+++ b/src/VBox/Devices/Network/slirp/libalias/alias_nbt.c
@@ -218,7 +218,7 @@ nbt_alias_handler(PNATState pData, int type)
     handlers[2].fingerprint = &fingerprint2;
     handlers[2].protohandler = &protohandler2out;
 
-    handlers[3].pri = EOH;
+    handlers[3].pri = (u_int)EOH;
 #endif /* VBOX */
 
     switch (type) {
diff --git a/src/VBox/Devices/Network/slirp/libalias/alias_proxy.c b/src/VBox/Devices/Network/slirp/libalias/alias_proxy.c
index 5c74b2d..b49b726 100644
--- a/src/VBox/Devices/Network/slirp/libalias/alias_proxy.c
+++ b/src/VBox/Devices/Network/slirp/libalias/alias_proxy.c
@@ -426,7 +426,7 @@ ProxyEncodeTcpStream(struct alias_link *lnk,
 #endif
 
 /* Pad string out to a multiple of two in length */
-    slen = strlen(buffer);
+    slen = (int)strlen(buffer);
     switch (slen % 2) {
     case 0:
         strcat(buffer, " \n");
@@ -692,7 +692,7 @@ LibAliasProxyRule(struct libalias *la, const char *cmd)
     ret = 0;
 /* Copy command line into a buffer */
     cmd += strspn(cmd, " \t");
-    cmd_len = strlen(cmd);
+    cmd_len = (int)strlen(cmd);
     if (cmd_len > (int)(sizeof(buffer) - 1)) {
         ret = -1;
         goto getout;
@@ -700,7 +700,7 @@ LibAliasProxyRule(struct libalias *la, const char *cmd)
     strcpy(buffer, cmd);
 
 /* Convert to lower case */
-    len = strlen(buffer);
+    len = (int)strlen(buffer);
     for (i = 0; i < len; i++)
         buffer[i] = tolower((unsigned char)buffer[i]);
 
diff --git a/src/VBox/Devices/Network/slirp/libslirp.h b/src/VBox/Devices/Network/slirp/libslirp.h
index 4771306..0c6c90f 100644
--- a/src/VBox/Devices/Network/slirp/libslirp.h
+++ b/src/VBox/Devices/Network/slirp/libslirp.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -19,7 +19,7 @@
 #define _LIBSLIRP_H
 
 #ifdef RT_OS_WINDOWS
-# include <winsock2.h>
+# include <iprt/win/winsock2.h>
 # ifdef __cplusplus
 extern "C" {
 # endif
diff --git a/src/VBox/Devices/Network/slirp/main.h b/src/VBox/Devices/Network/slirp/main.h
index 5960844..1f704bd 100644
--- a/src/VBox/Devices/Network/slirp/main.h
+++ b/src/VBox/Devices/Network/slirp/main.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/slirp/misc.c b/src/VBox/Devices/Network/slirp/misc.c
index 8588260..3437e33 100644
--- a/src/VBox/Devices/Network/slirp/misc.c
+++ b/src/VBox/Devices/Network/slirp/misc.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -90,8 +90,11 @@ void
 fd_nonblock(int fd)
 {
 # ifdef FIONBIO
+#  ifdef RT_OS_WINDOWS
+    u_long opt = 1;
+#  else
     int opt = 1;
-
+#  endif
     ioctlsocket(fd, FIONBIO, &opt);
 # else /* !FIONBIO */
     int opt;
@@ -170,7 +173,7 @@ static void *slirp_uma_alloc(uma_zone_t zone,
             Assert(it->magic == ITEM_MAGIC);
             rc = 0;
             if (zone->pfInit)
-                rc = zone->pfInit(zone->pData, (void *)&it[1], zone->size, M_DONTWAIT);
+                rc = zone->pfInit(zone->pData, (void *)&it[1], (int /*sigh*/)zone->size, M_DONTWAIT);
             if (rc == 0)
             {
                 zone->cur_items++;
@@ -199,7 +202,7 @@ static void *slirp_uma_alloc(uma_zone_t zone,
         /* we're on a sub-zone, we need get a chunk from the master zone and split
          * it into sub-zone conforming chunks.
          */
-        sub_area = slirp_uma_alloc(zone->master_zone, zone->master_zone->size, NULL, 0);
+        sub_area = slirp_uma_alloc(zone->master_zone, (int /*sigh*/)zone->master_zone->size, NULL, 0);
         if (!sub_area)
         {
             /* No room on master */
@@ -252,11 +255,11 @@ static void slirp_uma_free(void *item, int size, uint8_t flags)
     LIST_REMOVE(it, list);
     if (zone->pfFini)
     {
-        zone->pfFini(zone->pData, item, zone->size);
+        zone->pfFini(zone->pData, item, (int /*sigh*/)zone->size);
     }
     if (zone->pfDtor)
     {
-        zone->pfDtor(zone->pData, item, zone->size, NULL);
+        zone->pfDtor(zone->pData, item, (int /*sigh*/)zone->size, NULL);
     }
     LIST_INSERT_HEAD(&zone->free_items, it, list);
     zone->cur_items--;
@@ -387,11 +390,11 @@ void *uma_zalloc_arg(uma_zone_t zone, void *args, int how)
         return NULL;
     }
     RTCritSectEnter(&zone->csZone);
-    mem = zone->pfAlloc(zone, zone->size, NULL, 0);
+    mem = zone->pfAlloc(zone, (int /*sigh*/)zone->size, NULL, 0);
     if (mem != NULL)
     {
         if (zone->pfCtor)
-            zone->pfCtor(zone->pData, mem, zone->size, args, M_DONTWAIT);
+            zone->pfCtor(zone->pData, mem, (int /*sigh*/)zone->size, args, M_DONTWAIT);
     }
     RTCritSectLeave(&zone->csZone);
     LogFlowFunc(("LEAVE: %p\n", mem));
@@ -493,7 +496,7 @@ void *uma_zalloc(uma_zone_t zone, int len)
 struct mbuf *slirp_ext_m_get(PNATState pData, size_t cbMin, void **ppvBuf, size_t *pcbBuf)
 {
     struct mbuf *m;
-    size_t size = MCLBYTES;
+    int size = MCLBYTES;
     LogFlowFunc(("ENTER: cbMin:%d, ppvBuf:%p, pcbBuf:%p\n", cbMin, ppvBuf, pcbBuf));
 
     if (cbMin < MCLBYTES)
diff --git a/src/VBox/Devices/Network/slirp/misc.h b/src/VBox/Devices/Network/slirp/misc.h
index 1d3a2e0..76b6037 100644
--- a/src/VBox/Devices/Network/slirp/misc.h
+++ b/src/VBox/Devices/Network/slirp/misc.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/slirp/queue.h b/src/VBox/Devices/Network/slirp/queue.h
index 8f56d96..90169eb 100644
--- a/src/VBox/Devices/Network/slirp/queue.h
+++ b/src/VBox/Devices/Network/slirp/queue.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/slirp/resolv_conf_parser.c b/src/VBox/Devices/Network/slirp/resolv_conf_parser.c
index 7b1cb52..70d720e 100644
--- a/src/VBox/Devices/Network/slirp/resolv_conf_parser.c
+++ b/src/VBox/Devices/Network/slirp/resolv_conf_parser.c
@@ -110,7 +110,9 @@ int rcp_parse(struct rcp_state *state, const char *filename)
     char *pszSearchBuf;
     size_t cbSearchBuf;
     uint32_t flags;
+#ifdef RCP_ACCEPT_PORT /* OS X extention */
     uint32_t default_port = RTNETADDR_PORT_NA;
+#endif
     unsigned i;
     int rc;
 
@@ -244,7 +246,7 @@ int rcp_parse(struct rcp_state *state, const char *filename)
             if (NetAddr.enmType == RTNETADDRTYPE_INVALID)
             {
                 LogRel(("NAT: resolv.conf: bad nameserver address %s\n", tok));
-                continue;                
+                continue;
             }
 
 
diff --git a/src/VBox/Devices/Network/slirp/resolv_conf_parser.h b/src/VBox/Devices/Network/slirp/resolv_conf_parser.h
index 58bd755..fad8fcf 100644
--- a/src/VBox/Devices/Network/slirp/resolv_conf_parser.h
+++ b/src/VBox/Devices/Network/slirp/resolv_conf_parser.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/slirp/sbuf.c b/src/VBox/Devices/Network/slirp/sbuf.c
index 4e6dee3..7bcc810 100644
--- a/src/VBox/Devices/Network/slirp/sbuf.c
+++ b/src/VBox/Devices/Network/slirp/sbuf.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -76,7 +76,7 @@ sbreserve(PNATState pData, struct sbuf *sb, int size)
     if (sb->sb_data)
     {
         /* Already alloced, realloc if necessary */
-        if (sb->sb_datalen != size)
+        if (sb->sb_datalen != (u_int)size)
         {
             sb->sb_wptr =
             sb->sb_rptr =
@@ -112,7 +112,7 @@ sbappend(PNATState pData, struct socket *so, struct mbuf *m)
     int mlen = 0;
 
     STAM_PROFILE_START(&pData->StatIOSBAppend_pf, a);
-    LogFlow(("sbappend: so = %lx, m = %lx, m->m_len = %d\n", (long)so, (long)m, m ? m->m_len : 0));
+    LogFlow(("sbappend: so = %p, m = %p, m->m_len = %d\n", so, m, m ? m->m_len : 0));
 
     STAM_COUNTER_INC(&pData->StatIOSBAppend);
     /* Shouldn't happen, but...  e.g. foreign host closes connection */
diff --git a/src/VBox/Devices/Network/slirp/sbuf.h b/src/VBox/Devices/Network/slirp/sbuf.h
index ab61d7a..9af5abb 100644
--- a/src/VBox/Devices/Network/slirp/sbuf.h
+++ b/src/VBox/Devices/Network/slirp/sbuf.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/slirp/slirp.c b/src/VBox/Devices/Network/slirp/slirp.c
index e253e19..ef6c5ca 100644
--- a/src/VBox/Devices/Network/slirp/slirp.c
+++ b/src/VBox/Devices/Network/slirp/slirp.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -58,7 +58,7 @@
 #else
 # include <Winnls.h>
 # define _WINSOCK2API_
-# include <IPHlpApi.h>
+# include <iprt/win/iphlpapi.h>
 #endif
 #include <alias.h>
 
@@ -235,7 +235,7 @@
 /*
  * Loging macros
  */
-#if VBOX_WITH_DEBUG_NAT_SOCKETS
+#ifdef VBOX_WITH_DEBUG_NAT_SOCKETS
 # if defined(RT_OS_WINDOWS)
 #  define  DO_LOG_NAT_SOCK(so, proto, winevent, r_fdset, w_fdset, x_fdset)             \
    do {                                                                                \
@@ -253,7 +253,7 @@
                     CHECK_FD_SET(so, ign, nval) ? "RDNVAL":""));                   \
    } while (0)
 # endif /* !RT_OS_WINDOWS */
-#else /* !VBOX_WITH_DEBUG_NAT_SOCKETS */
+#else  /* !VBOX_WITH_DEBUG_NAT_SOCKETS */
 # define DO_LOG_NAT_SOCK(so, proto, winevent, r_fdset, w_fdset, x_fdset) do {} while (0)
 #endif /* !VBOX_WITH_DEBUG_NAT_SOCKETS */
 
@@ -340,10 +340,10 @@ int slirp_init(PNATState *ppData, uint32_t u32NetAddr, uint32_t u32Netmask,
 
         WSAStartup(MAKEWORD(2, 0), &Data);
 
-        rc = RTLdrLoadSystem("Iphlpapi.dll", /* :fNoUnload */ true, &hLdrMod);
+        rc = RTLdrLoadSystem("Iphlpapi.dll", true /*fNoUnload*/, &hLdrMod);
         if (RT_SUCCESS(rc))
         {
-            rc = RTLdrGetSymbol(hLdrMod, "GetAdaptersAddresses", (void **)&pData->pfGetAdaptersAddresses);
+            rc = RTLdrGetSymbol(hLdrMod, "GetAdaptersAddresses", (void **)&pData->pfnGetAdaptersAddresses);
             if (RT_FAILURE(rc))
                 LogRel(("NAT: Can't find GetAdapterAddresses in Iphlpapi.dll\n"));
 
@@ -372,7 +372,7 @@ int slirp_init(PNATState *ppData, uint32_t u32NetAddr, uint32_t u32Netmask,
     pData->special_addr.s_addr = u32NetAddr;
     pData->slirp_ethaddr = &special_ethaddr[0];
     alias_addr.s_addr = pData->special_addr.s_addr | RT_H2N_U32_C(CTL_ALIAS);
-    /* @todo: add ability to configure this staff */
+    /** @todo add ability to configure this staff */
 
     /*
      * Some guests won't reacquire DHCP lease on link flap when VM is
@@ -410,14 +410,14 @@ int slirp_init(PNATState *ppData, uint32_t u32NetAddr, uint32_t u32Netmask,
         flags |= PKT_ALIAS_PUNCH_FW;
 #endif
         flags |= pData->i32AliasMode; /* do transparent proxying */
-        flags = LibAliasSetMode(pData->proxy_alias, flags, ~0);
+        flags = LibAliasSetMode(pData->proxy_alias, flags, ~0U);
         proxy_addr.s_addr = RT_H2N_U32(RT_N2H_U32(pData->special_addr.s_addr) | CTL_ALIAS);
         LibAliasSetAddress(pData->proxy_alias, proxy_addr);
         ftp_alias_load(pData);
         nbt_alias_load(pData);
     }
 #ifdef VBOX_WITH_NAT_SEND2HOME
-    /* @todo: we should know all interfaces available on host. */
+    /** @todo we should know all interfaces available on host. */
     pData->pInSockAddrHomeAddress = RTMemAllocZ(sizeof(struct sockaddr));
     pData->cInHomeAddressSize = 1;
     inet_aton("192.168.1.25", &pData->pInSockAddrHomeAddress[0].sin_addr);
@@ -733,7 +733,7 @@ void slirp_select_fill(PNATState pData, int *pnfds, struct pollfd *polls)
          * Set for reading (and urgent data) if we are connected, can
          * receive more, and we have room for it XXX /2 ?
          */
-        /* @todo: vvl - check which predicat here will be more useful here in rerm of new sbufs. */
+        /** @todo vvl - check which predicat here will be more useful here in rerm of new sbufs. */
         if (   CONN_CANFRCV(so)
             && (SBUF_LEN(&so->so_snd) < (SBUF_SIZE(&so->so_snd)/2))
 #ifdef RT_OS_WINDOWS
@@ -1069,7 +1069,7 @@ void slirp_select_poll(PNATState pData, struct pollfd *polls, int ndfs)
                 /* Finish connection first */
                 /* should we ignore return value? */
                 bool fRet = slirpConnectOrWrite(pData, so, true);
-                LogFunc(("fRet:%RTbool\n", fRet));
+                LogFunc(("fRet:%RTbool\n", fRet)); NOREF(fRet);
                 if (slirpVerifyAndFreeSocket(pData, so))
                     CONTINUE(tcp);
             }
@@ -1379,7 +1379,7 @@ void slirp_input(PNATState pData, struct mbuf *m, size_t cbBuf)
     static bool fWarnedIpv6;
     struct ethhdr *eh;
 
-    m->m_len = cbBuf;
+    m->m_len = (int)cbBuf; Assert((size_t)m->m_len == cbBuf);
     if (cbBuf < ETH_HLEN)
     {
         Log(("NAT: packet having size %d has been ignored\n", m->m_len));
@@ -1430,7 +1430,7 @@ void if_encap(PNATState pData, uint16_t eth_proto, struct mbuf *m, int flags)
 {
     struct ethhdr *eh;
     uint8_t *mbuf = NULL;
-    size_t mlen = 0;
+    int mlen;
     STAM_PROFILE_START(&pData->StatIF_encap, a);
     LogFlowFunc(("ENTER: pData:%p, eth_proto:%RX16, m:%p, flags:%d\n",
                 pData, eth_proto, m, flags));
diff --git a/src/VBox/Devices/Network/slirp/slirp.h b/src/VBox/Devices/Network/slirp/slirp.h
index cba1b00..d6e1b98 100644
--- a/src/VBox/Devices/Network/slirp/slirp.h
+++ b/src/VBox/Devices/Network/slirp/slirp.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -21,8 +21,8 @@
 #include <VBox/vmm/stam.h>
 
 #ifdef RT_OS_WINDOWS
-# include <winsock2.h>
-# include <ws2tcpip.h>
+# include <iprt/win/winsock2.h>
+# include <iprt/win/ws2tcpip.h>
 typedef int socklen_t;
 #endif
 #ifdef RT_OS_OS2 /* temporary workaround, see ticket #127 */
@@ -46,7 +46,7 @@ typedef int socklen_t;
 #include <VBox/log.h>
 #include <iprt/mem.h>
 #ifdef RT_OS_WINDOWS
-# include <windows.h>
+# include <iprt/win/windows.h>
 # include <io.h>
 #endif
 #include <iprt/asm.h>
@@ -76,7 +76,7 @@ typedef int socklen_t;
 
 
 # include <sys/timeb.h>
-# include <iphlpapi.h>
+# include <iprt/win/iphlpapi.h>
 
 /* We don't want the errno.h versions of these error defines. */
 # if defined(_MSC_VER) && _MSC_VER >= 1600
@@ -177,6 +177,9 @@ typedef unsigned char u_int8_t;
 # include <sys/time.h>
 # include <time.h>
 #else
+# ifndef HAVE_SYS_TIME_H
+#  define HAVE_SYS_TIME_H 0
+# endif
 # if HAVE_SYS_TIME_H
 #  include <sys/time.h>
 # else
@@ -470,7 +473,7 @@ int nbt_alias_unload(PNATState);
 int slirp_arp_lookup_ip_by_ether(PNATState, const uint8_t *, uint32_t *);
 int slirp_arp_lookup_ether_by_ip(PNATState, uint32_t, uint8_t *);
 
-static inline size_t slirp_size(PNATState pData)
+DECLINLINE(unsigned) slirp_size(PNATState pData)
 {
         if (if_mtu < MSIZE)
             return MCLBYTES;
diff --git a/src/VBox/Devices/Network/slirp/slirp_config.h b/src/VBox/Devices/Network/slirp/slirp_config.h
index aa958d1..ba8361d 100644
--- a/src/VBox/Devices/Network/slirp/slirp_config.h
+++ b/src/VBox/Devices/Network/slirp/slirp_config.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/slirp/slirp_dns.c b/src/VBox/Devices/Network/slirp/slirp_dns.c
index 4349070..d4c4805 100644
--- a/src/VBox/Devices/Network/slirp/slirp_dns.c
+++ b/src/VBox/Devices/Network/slirp/slirp_dns.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -28,17 +28,15 @@
 #ifdef RT_OS_WINDOWS
 # include <Winnls.h>
 # define _WINSOCK2API_
-# include <IPHlpApi.h>
+# include <iprt/win/iphlpapi.h>
 
-static int get_dns_addr_domain(PNATState pData,
-                               const char **ppszDomain)
+static int get_dns_addr_domain(PNATState pData)
 {
-    ULONG flags = GAA_FLAG_INCLUDE_PREFIX; /*GAA_FLAG_INCLUDE_ALL_INTERFACES;*/ /* all interfaces registered in NDIS */
+    /*ULONG flags = GAA_FLAG_INCLUDE_PREFIX;*/ /*GAA_FLAG_INCLUDE_ALL_INTERFACES;*/ /* all interfaces registered in NDIS */
     PIP_ADAPTER_ADDRESSES pAdapterAddr = NULL;
     PIP_ADAPTER_ADDRESSES pAddr = NULL;
     PIP_ADAPTER_DNS_SERVER_ADDRESS pDnsAddr = NULL;
     ULONG size;
-    int wlen = 0;
     char *pszSuffix;
     struct dns_domain_entry *pDomain = NULL;
     ULONG ret = ERROR_SUCCESS;
@@ -47,7 +45,7 @@ static int get_dns_addr_domain(PNATState pData,
 
     /* determine size of buffer */
     size = 0;
-    ret = pData->pfGetAdaptersAddresses(AF_INET, 0, NULL /* reserved */, pAdapterAddr, &size);
+    ret = pData->pfnGetAdaptersAddresses(AF_INET, 0, NULL /* reserved */, pAdapterAddr, &size);
     if (ret != ERROR_BUFFER_OVERFLOW)
     {
         Log(("NAT: error %lu occurred on capacity detection operation\n", ret));
@@ -65,7 +63,7 @@ static int get_dns_addr_domain(PNATState pData,
         Log(("NAT: No memory available\n"));
         return -1;
     }
-    ret = pData->pfGetAdaptersAddresses(AF_INET, 0, NULL /* reserved */, pAdapterAddr, &size);
+    ret = pData->pfnGetAdaptersAddresses(AF_INET, 0, NULL /* reserved */, pAdapterAddr, &size);
     if (ret != ERROR_SUCCESS)
     {
         Log(("NAT: error %lu occurred on fetching adapters info\n", ret));
@@ -153,7 +151,7 @@ static int get_dns_addr_domain(PNATState pData,
 
 #include "resolv_conf_parser.h"
 
-static int get_dns_addr_domain(PNATState pData, const char **ppszDomain)
+static int get_dns_addr_domain(PNATState pData)
 {
     struct rcp_state st;
     int rc;
@@ -221,9 +219,6 @@ static int get_dns_addr_domain(PNATState pData, const char **ppszDomain)
         LIST_INSERT_HEAD(&pData->pDomainList, pDomain, dd_list);
     }
 
-    if (ppszDomain && st.rcps_domain != 0)
-        *ppszDomain = RTStrDup(st.rcps_domain);
-
     return 0;
 }
 
@@ -243,10 +238,8 @@ int slirpInitializeDnsSettings(PNATState pData)
          * Some distributions haven't got /etc/resolv.conf
          * so we should other way to configure DNS settings.
          */
-        if (get_dns_addr_domain(pData, NULL) < 0)
-        {
+        if (get_dns_addr_domain(pData) < 0)
             pData->fUseHostResolver = true;
-        }
         else
         {
             pData->fUseHostResolver = false;
diff --git a/src/VBox/Devices/Network/slirp/slirp_dns.h b/src/VBox/Devices/Network/slirp/slirp_dns.h
index 2471d2b..dfd8e0a 100644
--- a/src/VBox/Devices/Network/slirp/slirp_dns.h
+++ b/src/VBox/Devices/Network/slirp/slirp_dns.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/slirp/slirp_state.h b/src/VBox/Devices/Network/slirp/slirp_state.h
index b0b369c..ddb77f7 100644
--- a/src/VBox/Devices/Network/slirp/slirp_state.h
+++ b/src/VBox/Devices/Network/slirp/slirp_state.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -143,7 +143,7 @@ typedef struct NATState
     int socket_snd;
     int soMaxConn;
 #ifdef RT_OS_WINDOWS
-    ULONG (WINAPI * pfGetAdaptersAddresses)(ULONG, ULONG, PVOID, PIP_ADAPTER_ADDRESSES, PULONG);
+    ULONG (WINAPI * pfnGetAdaptersAddresses)(ULONG, ULONG, PVOID, PIP_ADAPTER_ADDRESSES, PULONG);
 #endif
     struct dns_list_head pDnsList;
     struct dns_domain_list_head pDomainList;
diff --git a/src/VBox/Devices/Network/slirp/socket.c b/src/VBox/Devices/Network/slirp/socket.c
index 4e5af6a..0bd0361 100644
--- a/src/VBox/Devices/Network/slirp/socket.c
+++ b/src/VBox/Devices/Network/slirp/socket.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -32,7 +32,7 @@
 #endif
 #include <VBox/vmm/pdmdrv.h>
 #if defined (RT_OS_WINDOWS)
-#include <iphlpapi.h>
+#include <iprt/win/iphlpapi.h>
 #include <icmpapi.h>
 #endif
 
@@ -114,7 +114,7 @@ DECLINLINE(bool) slirpSend2Home(PNATState pData, struct socket *pSo, const void
         struct socket *pNewSocket = soCloneUDPSocketWithForegnAddr(pData, pSo, pData->pInSockAddrHomeAddress[idxAddr].sin_addr);
         AssertReturn((pNewSocket, false));
         pData->pInSockAddrHomeAddress[idxAddr].sin_port = pSo->so_fport;
-        /* @todo: more verbose on errors,
+        /** @todo more verbose on errors,
          * @note: we shouldn't care if this send fail or not (we're in broadcast).
          */
         LogFunc(("send %d bytes to %RTnaipv4 from %R[natsock]\n", cbBuf, pData->pInSockAddrHomeAddress[idxAddr].sin_addr.s_addr, pNewSocket));
@@ -134,7 +134,7 @@ static void sorecvfrom_icmp_unix(PNATState, struct socket *);
 #endif /* !RT_OS_WINDOWS */
 
 void
-so_init()
+so_init(void)
 {
 }
 
@@ -162,7 +162,7 @@ solookup(struct socket *head, struct in_addr laddr,
  * insque() it into the correct linked-list
  */
 struct socket *
-socreate()
+socreate(void)
 {
     struct socket *so;
 
@@ -240,7 +240,7 @@ soread(PNATState pData, struct socket *so)
 {
     int n, nn, lss, total;
     struct sbuf *sb = &so->so_snd;
-    size_t len = sb->sb_datalen - sb->sb_cc;
+    u_int len = sb->sb_datalen - sb->sb_cc;
     struct iovec iov[2];
     int mss = so->so_tcpcb->t_maxseg;
 
@@ -391,7 +391,7 @@ soread(PNATState pData, struct socket *so)
      * a close will be detected on next iteration.
      * A return of -1 wont (shouldn't) happen, since it didn't happen above
      */
-    if (n == 2 && nn == iov[0].iov_len)
+    if (n == 2 && (unsigned)nn == iov[0].iov_len)
     {
         int ret;
         ret = recv(so->s, iov[1].iov_base, iov[1].iov_len, 0);
@@ -529,7 +529,7 @@ sowrite(PNATState pData, struct socket *so)
 {
     int n, nn;
     struct sbuf *sb = &so->so_rcv;
-    size_t len = sb->sb_cc;
+    u_int len = sb->sb_cc;
     struct iovec iov[2];
 
     STAM_PROFILE_START(&pData->StatIOwrite, a);
@@ -633,19 +633,19 @@ sowrite(PNATState pData, struct socket *so)
     }
 
 #ifndef HAVE_READV
-    if (n == 2 && nn == iov[0].iov_len)
+    if (n == 2 && (unsigned)nn == iov[0].iov_len)
     {
         int ret;
         ret = send(so->s, iov[1].iov_base, iov[1].iov_len, 0);
         if (ret > 0)
             nn += ret;
-        STAM_STATS({
-            if (ret > 0 && ret != iov[1].iov_len)
-            {
-                STAM_COUNTER_INC(&pData->StatIOWrite_rest);
-                STAM_COUNTER_ADD(&pData->StatIOWrite_rest_bytes, (iov[1].iov_len - ret));
-            }
-        });
+# ifdef VBOX_WITH_STATISTICS
+        if (ret > 0 && ret != (ssize_t)iov[1].iov_len)
+        {
+            STAM_COUNTER_INC(&pData->StatIOWrite_rest);
+            STAM_COUNTER_ADD(&pData->StatIOWrite_rest_bytes, (iov[1].iov_len - ret));
+        }
+#endif
     }
     Log2(("%s: wrote(2) nn = %d bytes\n", RT_GCC_EXTENSION __PRETTY_FUNCTION__, nn));
 #endif
@@ -678,7 +678,7 @@ sowrite(PNATState pData, struct socket *so)
 void
 sorecvfrom(PNATState pData, struct socket *so)
 {
-    LogFlowFunc(("sorecvfrom: so = %lx\n", (long)so));
+    LogFlowFunc(("sorecvfrom: so = %p\n", so));
 
 #ifdef RT_OS_WINDOWS
     /* ping is handled with ICMP API in ip_icmpwin.c */
@@ -693,7 +693,7 @@ sorecvfrom(PNATState pData, struct socket *so)
     else
 #endif /* !RT_OS_WINDOWS */
     {
-        static uint8_t au8Buf[64 * 1024];
+        static char achBuf[64 * 1024];
 
         /* A "normal" UDP packet */
         struct sockaddr_in addr;
@@ -723,8 +723,8 @@ sorecvfrom(PNATState pData, struct socket *so)
         iov[0].iov_len = M_TRAILINGSPACE(m);
 
         /* large packets will spill into a temp buffer */
-        iov[1].iov_base = au8Buf;
-        iov[1].iov_len = sizeof(au8Buf);
+        iov[1].iov_base = achBuf;
+        iov[1].iov_len = sizeof(achBuf);
 
 #if !defined(RT_OS_WINDOWS)
         {
@@ -741,11 +741,12 @@ sorecvfrom(PNATState pData, struct socket *so)
 #else  /* RT_OS_WINDOWS */
         {
             DWORD nbytes; /* NB: can't use nread b/c of different size */
-            DWORD flags;
+            DWORD flags = 0;
             int status;
-
-            flags = 0;
-            status = WSARecvFrom(so->s, iov, 2, &nbytes, &flags,
+            AssertCompile(sizeof(WSABUF) == sizeof(struct iovec));
+            AssertCompileMembersSameSizeAndOffset(WSABUF, len, struct iovec, iov_len);
+            AssertCompileMembersSameSizeAndOffset(WSABUF, buf, struct iovec, iov_base);
+            status = WSARecvFrom(so->s, (WSABUF *)&iov[0], 2, &nbytes, &flags,
                                  (struct sockaddr *)&addr, &addrlen,
                                  NULL, NULL);
             if (status != SOCKET_ERROR)
@@ -763,7 +764,7 @@ sorecvfrom(PNATState pData, struct socket *so)
                 m->m_len = iov[0].iov_len;
                 m_append(pData, m, nread - iov[0].iov_len, iov[1].iov_base);
             }
-            Assert((m_length(m, NULL) == nread));
+            Assert(m_length(m, NULL) == (size_t)nread);
 
             /*
              * Hack: domain name lookup will be used the most for UDP,
@@ -838,7 +839,7 @@ sosendto(PNATState pData, struct socket *so, struct mbuf *m)
     caddr_t buf = 0;
     int mlen;
 
-    LogFlowFunc(("sosendto: so = %R[natsock], m = %lx\n", so, (long)m));
+    LogFlowFunc(("sosendto: so = %R[natsock], m = %p\n", so, m));
 
     memset(&addr, 0, sizeof(struct sockaddr));
 #ifdef RT_OS_DARWIN
diff --git a/src/VBox/Devices/Network/slirp/socket.h b/src/VBox/Devices/Network/slirp/socket.h
index 3608dff..1f90900 100644
--- a/src/VBox/Devices/Network/slirp/socket.h
+++ b/src/VBox/Devices/Network/slirp/socket.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/slirp/tcp.h b/src/VBox/Devices/Network/slirp/tcp.h
index 40bdd5d..40ca24e 100644
--- a/src/VBox/Devices/Network/slirp/tcp.h
+++ b/src/VBox/Devices/Network/slirp/tcp.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/slirp/tcp_input.c b/src/VBox/Devices/Network/slirp/tcp_input.c
index 2355e21..e130232 100644
--- a/src/VBox/Devices/Network/slirp/tcp_input.c
+++ b/src/VBox/Devices/Network/slirp/tcp_input.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -293,7 +293,8 @@ tcp_input(PNATState pData, register struct mbuf *m, int iphlen, struct socket *i
     register struct tcpiphdr *ti;
     caddr_t optp = NULL;
     int optlen = 0;
-    int len, tlen, off;
+    int len, off;
+    int tlen = 0; /* Shut up MSC (didn't check whether MSC was right). */
     register struct tcpcb *tp = 0;
     register int tiflags;
     struct socket *so = 0;
@@ -302,13 +303,12 @@ tcp_input(PNATState pData, register struct mbuf *m, int iphlen, struct socket *i
     int iss = 0;
     u_long tiwin;
 /*  int ts_present = 0; */
-    size_t ohdrlen;
+    unsigned ohdrlen;
     uint8_t ohdr[60 + 8]; /* max IP header plus 8 bytes of payload for icmp */
 
     STAM_PROFILE_START(&pData->StatTCP_input, counter_input);
 
-    LogFlow(("tcp_input: m = %8lx, iphlen = %2d, inso = %R[natsock]\n",
-             (long)m, iphlen, inso));
+    LogFlow(("tcp_input: m = %p, iphlen = %2d, inso = %R[natsock]\n", m, iphlen, inso));
 
     if (inso != NULL)
     {
@@ -359,7 +359,7 @@ tcp_input(PNATState pData, register struct mbuf *m, int iphlen, struct socket *i
     ip = mtod(m, struct ip *);
 
     /* ip_input() subtracts iphlen from ip::ip_len */
-    AssertStmt((ip->ip_len + iphlen == m_length(m, NULL)), goto drop);
+    AssertStmt(ip->ip_len + iphlen == (ssize_t)m_length(m, NULL), goto drop);
     if (RT_UNLIKELY(ip->ip_len < sizeof(struct tcphdr)))
     {
         /* tcps_rcvshort++; */
@@ -480,7 +480,7 @@ findso:
         || so->so_faddr.s_addr != ti->ti_dst.s_addr)
     {
         QSOCKET_UNLOCK(tcb);
-        /* @todo fix SOLOOKUP macrodefinition to be usable here */
+        /** @todo fix SOLOOKUP macrodefinition to be usable here */
         so = solookup(&tcb, ti->ti_src, ti->ti_sport,
                       ti->ti_dst, ti->ti_dport);
         if (so)
@@ -1256,7 +1256,7 @@ close:
                 if (ti->ti_len == 0 && tiwin == tp->snd_wnd)
                 {
                     tcpstat.tcps_rcvdupack++;
-                    Log2((" dup ack  m = %lx, so = %lx\n", (long)m, (long)so));
+                    Log2((" dup ack  m = %p, so = %p\n", m, so));
                     /*
                      * If we have outstanding data (other than
                      * a window probe), this is a completely
@@ -1783,7 +1783,7 @@ tcp_fconnect_failed(PNATState pData, struct socket *so, int sockerr)
     if (code >= 0)
     {
         struct ip *oip;
-        size_t ohdrlen;
+        unsigned ohdrlen;
         struct mbuf *m;
 
         if (RT_UNLIKELY(so->so_ohdr == NULL))
diff --git a/src/VBox/Devices/Network/slirp/tcp_output.c b/src/VBox/Devices/Network/slirp/tcp_output.c
index 869bf6a..00d52d0 100644
--- a/src/VBox/Devices/Network/slirp/tcp_output.c
+++ b/src/VBox/Devices/Network/slirp/tcp_output.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -438,7 +438,7 @@ send:
          * give data to the user when a buffer fills or
          * a PUSH comes in.)
          */
-        if (off + len == SBUF_LEN(&so->so_snd))
+        if (off + len == (ssize_t)SBUF_LEN(&so->so_snd))
             flags |= TH_PUSH;
     }
     else
@@ -539,7 +539,7 @@ send:
     if (optlen)
     {
         memcpy((caddr_t)(ti + 1), (caddr_t)opt, optlen);
-        ti->ti_off = (sizeof (struct tcphdr) + optlen) >> 2;
+        ti->ti_off = (uint8_t)((sizeof (struct tcphdr) + optlen) >> 2);
     }
     ti->ti_flags = flags;
     /*
diff --git a/src/VBox/Devices/Network/slirp/tcp_subr.c b/src/VBox/Devices/Network/slirp/tcp_subr.c
index 2405aaa..26cdb4d 100644
--- a/src/VBox/Devices/Network/slirp/tcp_subr.c
+++ b/src/VBox/Devices/Network/slirp/tcp_subr.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -126,8 +126,7 @@ tcp_respond(PNATState pData, struct tcpcb *tp, struct tcpiphdr *ti, struct mbuf
 {
     register int tlen;
 
-    LogFlowFunc(("ENTER: tp = %R[tcpcb793], ti = %lx, m = %lx, ack = %u, seq = %u, flags = %x\n",
-                 tp, (long)ti, (long)m, ack, seq, flags));
+    LogFlowFunc(("ENTER: tp = %R[tcpcb793], ti = %p, m = %p, ack = %u, seq = %u, flags = %x\n", tp, ti, m, ack, seq, flags));
 
     if (m == 0)
     {
@@ -314,7 +313,7 @@ tcp_close(PNATState pData, register struct tcpcb *tp)
 }
 
 void
-tcp_drain()
+tcp_drain(void)
 {
     /* XXX */
 }
@@ -562,7 +561,7 @@ tcp_connect(PNATState pData, struct socket *inso)
     }
     if (cVerbose > 0)
         LogRel(("NAT: Old socket recv size: %dKB\n", opt / 1024));
-    /* @todo (r-vvl) make it configurable (via extra data) */
+    /** @todo (r-vvl) make it configurable (via extra data) */
     opt = pData->socket_rcv;
     status = setsockopt(s, SOL_SOCKET, SO_RCVBUF, (char *)&opt, sizeof(int));
     if (status < 0)
diff --git a/src/VBox/Devices/Network/slirp/tcp_timer.c b/src/VBox/Devices/Network/slirp/tcp_timer.c
index b706e88..1000eb3 100644
--- a/src/VBox/Devices/Network/slirp/tcp_timer.c
+++ b/src/VBox/Devices/Network/slirp/tcp_timer.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/slirp/tcp_timer.h b/src/VBox/Devices/Network/slirp/tcp_timer.h
index b643ba4..d385f1e 100644
--- a/src/VBox/Devices/Network/slirp/tcp_timer.h
+++ b/src/VBox/Devices/Network/slirp/tcp_timer.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/slirp/tcp_var.h b/src/VBox/Devices/Network/slirp/tcp_var.h
index 198d06f..4ce037a 100644
--- a/src/VBox/Devices/Network/slirp/tcp_var.h
+++ b/src/VBox/Devices/Network/slirp/tcp_var.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/slirp/tcpip.h b/src/VBox/Devices/Network/slirp/tcpip.h
index 8d305f7..11b7ad3 100644
--- a/src/VBox/Devices/Network/slirp/tcpip.h
+++ b/src/VBox/Devices/Network/slirp/tcpip.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/slirp/tftp.c b/src/VBox/Devices/Network/slirp/tftp.c
index ee5470c..56e7f5d 100644
--- a/src/VBox/Devices/Network/slirp/tftp.c
+++ b/src/VBox/Devices/Network/slirp/tftp.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -195,6 +195,7 @@ DECLINLINE(int) tftpFindOptionIdxbyName(int *piIdxOpt, const char *pszOpt)
 }
 
 
+#if 0 /* unused */
 DECLINLINE(bool) tftpIsAcceptableOption(const char *pszOptionName)
 {
     int idxOptDesc = 0;
@@ -213,6 +214,7 @@ DECLINLINE(bool) tftpIsAcceptableOption(const char *pszOptionName)
     }
     return false;
 }
+#endif /* unused */
 
 
 /**
@@ -253,7 +255,7 @@ DECLINLINE(int) tftpSessionOptionParse(PTFTPSESSION pTftpSession, PCTFTPIPHDR pc
     int rc = VINF_SUCCESS;
     char *pszTftpRRQRaw;
     size_t idxTftpRRQRaw = 0;
-    int cbTftpRRQRaw = 0;
+    ssize_t cbTftpRRQRaw = 0;
     int fWithArg = 0;
     int idxOptionArg = 0;
     AssertPtrReturn(pTftpSession, VERR_INVALID_PARAMETER);
@@ -262,7 +264,7 @@ DECLINLINE(int) tftpSessionOptionParse(PTFTPSESSION pTftpSession, PCTFTPIPHDR pc
     LogFlowFunc(("pTftpSession:%p, pcTftpIpHeader:%p\n", pTftpSession, pcTftpIpHeader));
     pszTftpRRQRaw = (char *)&pcTftpIpHeader->Core;
     cbTftpRRQRaw = RT_H2N_U16(pcTftpIpHeader->UdpHdr.uh_ulen) + sizeof(struct ip) - RT_OFFSETOF(TFTPIPHDR, Core);
-    while(cbTftpRRQRaw)
+    while (cbTftpRRQRaw)
     {
         idxTftpRRQRaw = RTStrNLen(pszTftpRRQRaw, 512 - idxTftpRRQRaw) + 1;
         if (RTStrNLen((char *)pTftpSession->pszFilename, TFTP_FILENAME_MAX) == 0)
@@ -300,12 +302,12 @@ DECLINLINE(int) tftpSessionOptionParse(PTFTPSESSION pTftpSession, PCTFTPIPHDR pc
                 && !RTStrICmp("tsize", g_TftpDesc[idxOptionArg].pszName))
                 rc = tftpSessionParseAndMarkOption(pszTftpRRQRaw, &pTftpSession->OptionTSize);
 
-            /* @todo: we don't use timeout, but its value in the range 0-255 */
+            /** @todo we don't use timeout, but its value in the range 0-255 */
             if (   RT_SUCCESS(rc)
                 && !RTStrICmp("timeout", g_TftpDesc[idxOptionArg].pszName))
                 rc = tftpSessionParseAndMarkOption(pszTftpRRQRaw, &pTftpSession->OptionTimeout);
 
-            /* @todo: unknown option detection */
+            /** @todo unknown option detection */
             if (RT_FAILURE(rc))
             {
                 LogFlowFuncLeaveRC(rc);
@@ -326,7 +328,7 @@ DECLINLINE(int) tftpSessionOptionParse(PTFTPSESSION pTftpSession, PCTFTPIPHDR pc
             }
         }
         pszTftpRRQRaw += idxTftpRRQRaw;
-        cbTftpRRQRaw -= idxTftpRRQRaw;
+        cbTftpRRQRaw  -= idxTftpRRQRaw;
     }
 
     LogFlowFuncLeaveRC(rc);
@@ -537,7 +539,7 @@ DECLINLINE(int) tftpReadDataBlock(PNATState pData,
 DECLINLINE(int) tftpAddOptionToOACK(PNATState pData, struct mbuf *pMBuf, const char *pszOptName, uint64_t u64OptValue)
 {
     char aszOptionBuffer[256];
-    size_t iOptLength = 0;
+    size_t iOptLength;
     int rc = VINF_SUCCESS;
     int cbMBufCurrent = pMBuf->m_len;
     LogFlowFunc(("pMBuf:%p, pszOptName:%s, u16OptValue:%ld\n", pMBuf, pszOptName, u64OptValue));
@@ -545,14 +547,14 @@ DECLINLINE(int) tftpAddOptionToOACK(PNATState pData, struct mbuf *pMBuf, const c
     AssertPtrReturn(pszOptName, VERR_INVALID_PARAMETER);
 
     RT_ZERO(aszOptionBuffer);
-    iOptLength += RTStrPrintf(aszOptionBuffer, 256 , "%s", pszOptName) + 1;
+    iOptLength  = RTStrPrintf(aszOptionBuffer, 256 , "%s", pszOptName) + 1;
     iOptLength += RTStrPrintf(aszOptionBuffer + iOptLength, 256 - iOptLength , "%llu", u64OptValue) + 1;
     if (iOptLength > M_TRAILINGSPACE(pMBuf))
         rc = VERR_BUFFER_OVERFLOW; /* buffer too small */
     else
     {
-        pMBuf->m_len += iOptLength;
-        m_copyback(pData, pMBuf, cbMBufCurrent, iOptLength, aszOptionBuffer);
+        pMBuf->m_len += (int)iOptLength;
+        m_copyback(pData, pMBuf, cbMBufCurrent, (int)iOptLength, aszOptionBuffer);
     }
     LogFlowFuncLeaveRC(rc);
     return rc;
@@ -608,6 +610,7 @@ DECLINLINE(int) tftpSendError(PNATState pData,
 {
     struct mbuf *m = NULL;
     PTFTPIPHDR pTftpIpHeader = NULL;
+    u_int cbMsg = (u_int)strlen(msg) + 1; /* ending zero */
 
     LogFlowFunc(("ENTER: errorcode: %RX16, msg: %s\n", errorcode, msg));
     m = slirpTftpMbufAlloc(pData);
@@ -618,15 +621,14 @@ DECLINLINE(int) tftpSendError(PNATState pData,
     }
 
     m->m_data += if_maxlinkhdr;
-    m->m_len = sizeof(TFTPIPHDR)
-             + strlen(msg) + 1; /* ending zero */
+    m->m_len = sizeof(TFTPIPHDR) + cbMsg;
     m->m_pkthdr.header = mtod(m, void *);
     pTftpIpHeader = mtod(m, PTFTPIPHDR);
 
     pTftpIpHeader->u16TftpOpType = RT_H2N_U16_C(TFTP_ERROR);
     pTftpIpHeader->Core.u16TftpOpCode = RT_H2N_U16(errorcode);
 
-    m_copyback(pData, m, sizeof(TFTPIPHDR), strlen(msg) + 1 /* copy ending zerro*/, (c_caddr_t)msg);
+    m_copyback(pData, m, sizeof(TFTPIPHDR), cbMsg, (c_caddr_t)msg);
 
     tftpSend(pData, pTftpSession, m, pcTftpIpHeaderRecv);
 
diff --git a/src/VBox/Devices/Network/slirp/tftp.h b/src/VBox/Devices/Network/slirp/tftp.h
index e8190ad..70538ed 100644
--- a/src/VBox/Devices/Network/slirp/tftp.h
+++ b/src/VBox/Devices/Network/slirp/tftp.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/slirp/udp.c b/src/VBox/Devices/Network/slirp/udp.c
index 03514e4..2c66373 100644
--- a/src/VBox/Devices/Network/slirp/udp.c
+++ b/src/VBox/Devices/Network/slirp/udp.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -122,7 +122,7 @@ udp_input(PNATState pData, register struct mbuf *m, int iphlen)
      * If not enough data to reflect UDP length, drop.
      */
     len = RT_N2H_U16((u_int16_t)uh->uh_ulen);
-    Assert((ip->ip_len + iphlen == m_length(m, NULL)));
+    Assert(ip->ip_len + iphlen == (ssize_t)m_length(m, NULL));
 
     if (ip->ip_len != len)
     {
@@ -333,9 +333,8 @@ udp_input(PNATState pData, register struct mbuf *m, int iphlen)
          * Different OSes have different socket options for DF.  We
          * can't use IP_HDRINCL here as it's only valid for SOCK_RAW.
          */
-#     define USE_DF_OPTION(_Optname)                    \
-        const int dfopt = _Optname;                     \
-        const char * const dfoptname = #_Optname;
+#     define USE_DF_OPTION(_Optname) \
+        const int dfopt = _Optname
 #if   defined(IP_MTU_DISCOVER)
         USE_DF_OPTION(IP_MTU_DISCOVER);
 #elif defined(IP_DONTFRAG)      /* Solaris 11+, FreeBSD */
@@ -433,7 +432,7 @@ int udp_output2(PNATState pData, struct socket *so, struct mbuf *m,
     ui = mtod(m, struct udpiphdr *);
     memset(ui->ui_x1, 0, 9);
     ui->ui_pr = IPPROTO_UDP;
-    ui->ui_len = RT_H2N_U16(mlen - sizeof(struct ip));
+    ui->ui_len = RT_H2N_U16((uint16_t)(mlen - sizeof(struct ip)));
     /* XXXXX Check for from-one-location sockets, or from-any-location sockets */
     ui->ui_src = saddr->sin_addr;
     ui->ui_dst = daddr->sin_addr;
@@ -472,8 +471,7 @@ int udp_output(PNATState pData, struct socket *so, struct mbuf *m,
     struct socket *pSocketClone = NULL;
 #endif
     Assert(so->so_type == IPPROTO_UDP);
-    LogFlowFunc(("ENTER: so = %R[natsock], m = %p, saddr = %RTnaipv4\n",
-                 so, (long)m, addr->sin_addr.s_addr));
+    LogFlowFunc(("ENTER: so = %R[natsock], m = %p, saddr = %RTnaipv4\n", so, m, addr->sin_addr.s_addr));
 
     if (so->so_laddr.s_addr == INADDR_ANY)
     {
@@ -687,7 +685,7 @@ udp_listen(PNATState pData, u_int32_t bind_addr, u_int port, u_int32_t laddr, u_
 #if 0
     /* The original check was completely broken, as the commented out
      * if statement was always true (INADDR_ANY=0). */
-    /* @todo: vvl - alias_addr should be set (if required)
+    /** @todo vvl - alias_addr should be set (if required)
      * later by liabalias module.
      */
     if (addr.sin_addr.s_addr == 0 || addr.sin_addr.s_addr == loopback_addr.s_addr)
diff --git a/src/VBox/Devices/Network/slirp/udp.h b/src/VBox/Devices/Network/slirp/udp.h
index 3a8dc43..2fd3e07 100644
--- a/src/VBox/Devices/Network/slirp/udp.h
+++ b/src/VBox/Devices/Network/slirp/udp.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/slirp/zone.h b/src/VBox/Devices/Network/slirp/zone.h
index cc1926f..3a87a52 100644
--- a/src/VBox/Devices/Network/slirp/zone.h
+++ b/src/VBox/Devices/Network/slirp/zone.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/testcase/tstDevEEPROM.cpp b/src/VBox/Devices/Network/testcase/tstDevEEPROM.cpp
index bf7ed9c..44b39db 100644
--- a/src/VBox/Devices/Network/testcase/tstDevEEPROM.cpp
+++ b/src/VBox/Devices/Network/testcase/tstDevEEPROM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/testcase/tstDevPhy.cpp b/src/VBox/Devices/Network/testcase/tstDevPhy.cpp
index ad2f795..10dd377 100644
--- a/src/VBox/Devices/Network/testcase/tstDevPhy.cpp
+++ b/src/VBox/Devices/Network/testcase/tstDevPhy.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Network/testcase/tstIntNet-1.cpp b/src/VBox/Devices/Network/testcase/tstIntNet-1.cpp
index 1962d9c..48bae24 100644
--- a/src/VBox/Devices/Network/testcase/tstIntNet-1.cpp
+++ b/src/VBox/Devices/Network/testcase/tstIntNet-1.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -650,6 +650,8 @@ static int getDefaultIfaceName(char *pszName)
  */
 extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
 {
+    RT_NOREF(envp);
+
     /*
      * Init the runtime and parse the arguments.
      */
@@ -705,7 +707,6 @@ extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
 
     int rc;
     int ch;
-    int iArg = 1;
     RTGETOPTUNION Value;
     RTGETOPTSTATE GetState;
     RTGetOptInit(&GetState, argc, argv, s_aOptions, RT_ELEMENTS(s_aOptions), 1, 0 /* fFlags */);
@@ -807,7 +808,7 @@ extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
                 return 1;
 
             case 'V':
-                RTPrintf("$Revision: 102121 $\n");
+                RTPrintf("$Revision: 109605 $\n");
                 return 0;
 
             default:
diff --git a/src/VBox/Devices/Network/testcase/tstIntNetR0.cpp b/src/VBox/Devices/Network/testcase/tstIntNetR0.cpp
index bf5a323..cb8c62e 100644
--- a/src/VBox/Devices/Network/testcase/tstIntNetR0.cpp
+++ b/src/VBox/Devices/Network/testcase/tstIntNetR0.cpp
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -194,7 +194,7 @@ static int tstIntNetSendBuf(PINTNETRINGBUF pRingBuf, INTNETIFHANDLE hIf,
                             PSUPDRVSESSION pSession, void const *pvBuf, size_t cbBuf)
 {
     INTNETSG Sg;
-    IntNetSgInitTemp(&Sg, (void *)pvBuf, cbBuf);
+    IntNetSgInitTemp(&Sg, (void *)pvBuf, (uint32_t)cbBuf);
     int rc = intnetR0RingWriteFrame(pRingBuf, &Sg, NULL);
     if (RT_SUCCESS(rc))
         rc = IntNetR0IfSend(hIf, pSession);
diff --git a/src/VBox/Devices/PC/ACPI/VBoxAcpi.cpp b/src/VBox/Devices/PC/ACPI/VBoxAcpi.cpp
index e897204..4c9de92 100644
--- a/src/VBox/Devices/PC/ACPI/VBoxAcpi.cpp
+++ b/src/VBox/Devices/PC/ACPI/VBoxAcpi.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -390,11 +390,12 @@ int acpiPrepareDsdt(PPDMDEVINS pDevIns,  void **ppvPtr, size_t *pcbDsdt)
 }
 
 /** No docs, lazy coder. */
-int acpiCleanupDsdt(PPDMDEVINS pDevIns,  void *pvPtr)
+int acpiCleanupDsdt(PPDMDEVINS pDevIns, void *pvPtr)
 {
 #ifdef VBOX_WITH_DYNAMIC_DSDT
     return cleanupDynamicDsdt(pDevIns, pvPtr);
 #else
+    RT_NOREF1(pDevIns);
     if (pvPtr)
         RTMemFree(pvPtr);
     return VINF_SUCCESS;
@@ -457,6 +458,7 @@ int acpiPrepareSsdt(PPDMDEVINS pDevIns, void **ppvPtr, size_t *pcbSsdt)
 /** No docs, lazy coder. */
 int acpiCleanupSsdt(PPDMDEVINS pDevIns, void *pvPtr)
 {
+    RT_NOREF1(pDevIns);
     if (pvPtr)
         RTMemFree(pvPtr);
     return VINF_SUCCESS;
diff --git a/src/VBox/Devices/PC/BIOS/Makefile.kmk b/src/VBox/Devices/PC/BIOS/Makefile.kmk
index 0f20e5f..a474c17 100644
--- a/src/VBox/Devices/PC/BIOS/Makefile.kmk
+++ b/src/VBox/Devices/PC/BIOS/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2012-2015 Oracle Corporation
+# Copyright (C) 2012-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative286.asm b/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative286.asm
index ec84a62..f644a41 100644
--- a/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative286.asm
+++ b/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative286.asm
@@ -10,7 +10,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2004-2015 Oracle Corporation
+;  Copyright (C) 2004-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -24,7 +24,7 @@
 ; Source file: bios.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -66,7 +66,7 @@
 ; Source file: print.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -108,7 +108,7 @@
 ; Source file: ata.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -150,7 +150,7 @@
 ; Source file: floppy.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -196,7 +196,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2011-2015 Oracle Corporation
+;  Copyright (C) 2011-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -210,7 +210,7 @@
 ; Source file: eltorito.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -252,7 +252,7 @@
 ; Source file: boot.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -294,7 +294,7 @@
 ; Source file: keyboard.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -336,7 +336,7 @@
 ; Source file: disk.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -378,7 +378,7 @@
 ; Source file: serial.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -466,7 +466,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2013-2015 Oracle Corporation
+;  Copyright (C) 2013-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -480,7 +480,7 @@
 ; Source file: timepci.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -522,7 +522,7 @@
 ; Source file: ps2mouse.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -564,7 +564,7 @@
 ; Source file: parallel.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -610,7 +610,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2004-2015 Oracle Corporation
+;  Copyright (C) 2004-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -628,7 +628,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2004-2015 Oracle Corporation
+;  Copyright (C) 2004-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -646,7 +646,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2011-2015 Oracle Corporation
+;  Copyright (C) 2011-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -664,7 +664,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2004-2015 Oracle Corporation
+;  Copyright (C) 2004-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -682,7 +682,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2004-2015 Oracle Corporation
+;  Copyright (C) 2004-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -699,7 +699,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2011-2015 Oracle Corporation
+;  Copyright (C) 2011-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -716,7 +716,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2011-2015 Oracle Corporation
+;  Copyright (C) 2011-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -734,7 +734,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2012-2015 Oracle Corporation
+;  Copyright (C) 2012-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -772,7 +772,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2012-2015 Oracle Corporation
+;  Copyright (C) 2012-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -791,7 +791,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2012-2015 Oracle Corporation
+;  Copyright (C) 2012-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -810,7 +810,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2012-2015 Oracle Corporation
+;  Copyright (C) 2012-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -829,7 +829,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2012-2015 Oracle Corporation
+;  Copyright (C) 2012-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -844,7 +844,7 @@
 ; Source file: pcibio32.asm
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -860,7 +860,7 @@
 ; Source file: apm_pm.asm
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -879,7 +879,7 @@
 ; Source file: orgs.asm
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -926,7 +926,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2011-2015 Oracle Corporation
+;  Copyright (C) 2011-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -963,7 +963,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2004-2015 Oracle Corporation
+;  Copyright (C) 2004-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -1115,7 +1115,7 @@ section CONST progbits vstart=0xb0 align=1 ; size=0xcde class=DATA group=DGROUP
 
 section CONST2 progbits vstart=0xd8e align=1 ; size=0x3fa class=DATA group=DGROUP
 _bios_cvs_version_string:                    ; 0xf0d8e LB 0x12
-    db  'VirtualBox 5.1.2', 000h, 000h
+    db  'VirtualBox 5.1.4', 000h, 000h
 _bios_prefix_string:                         ; 0xf0da0 LB 0x8
     db  'BIOS: ', 000h, 000h
 _isotag:                                     ; 0xf0da8 LB 0x6
@@ -17798,4 +17798,4 @@ biosorg_check_before_or_at_0FFEEh:           ; 0xfff80 LB 0x70
     db  'XM'
 cpu_reset:                                   ; 0xffff0 LB 0x10
     jmp far 0f000h:0e05bh                     ; ea 5b e0 00 f0
-    db  030h, 036h, 02fh, 032h, 033h, 02fh, 039h, 039h, 000h, 0fch, 089h
+    db  030h, 036h, 02fh, 032h, 033h, 02fh, 039h, 039h, 000h, 0fch, 087h
diff --git a/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative286.md5sum b/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative286.md5sum
index 993f762..81ba84a 100644
--- a/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative286.md5sum
+++ b/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative286.md5sum
@@ -1 +1 @@
-5f745a736014b416ef1fa17602a68a12 *VBoxPcBios286.rom
+93fdca31e59bf023799f623118cbee9d *VBoxPcBios286.rom
diff --git a/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative386.asm b/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative386.asm
index 35208ad..178e72b 100644
--- a/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative386.asm
+++ b/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative386.asm
@@ -10,7 +10,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2004-2015 Oracle Corporation
+;  Copyright (C) 2004-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -24,7 +24,7 @@
 ; Source file: bios.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -66,7 +66,7 @@
 ; Source file: print.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -108,7 +108,7 @@
 ; Source file: ata.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -150,7 +150,7 @@
 ; Source file: floppy.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -196,7 +196,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2011-2015 Oracle Corporation
+;  Copyright (C) 2011-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -210,7 +210,7 @@
 ; Source file: eltorito.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -252,7 +252,7 @@
 ; Source file: boot.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -294,7 +294,7 @@
 ; Source file: keyboard.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -336,7 +336,7 @@
 ; Source file: disk.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -378,7 +378,7 @@
 ; Source file: serial.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -466,7 +466,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2013-2015 Oracle Corporation
+;  Copyright (C) 2013-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -480,7 +480,7 @@
 ; Source file: timepci.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -522,7 +522,7 @@
 ; Source file: ps2mouse.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -564,7 +564,7 @@
 ; Source file: parallel.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -610,7 +610,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2004-2015 Oracle Corporation
+;  Copyright (C) 2004-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -628,7 +628,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2004-2015 Oracle Corporation
+;  Copyright (C) 2004-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -646,7 +646,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2011-2015 Oracle Corporation
+;  Copyright (C) 2011-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -664,7 +664,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2004-2015 Oracle Corporation
+;  Copyright (C) 2004-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -682,7 +682,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2004-2015 Oracle Corporation
+;  Copyright (C) 2004-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -699,7 +699,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2011-2015 Oracle Corporation
+;  Copyright (C) 2011-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -716,7 +716,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2011-2015 Oracle Corporation
+;  Copyright (C) 2011-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -734,7 +734,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2012-2015 Oracle Corporation
+;  Copyright (C) 2012-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -772,7 +772,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2012-2015 Oracle Corporation
+;  Copyright (C) 2012-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -791,7 +791,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2012-2015 Oracle Corporation
+;  Copyright (C) 2012-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -810,7 +810,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2012-2015 Oracle Corporation
+;  Copyright (C) 2012-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -829,7 +829,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2012-2015 Oracle Corporation
+;  Copyright (C) 2012-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -844,7 +844,7 @@
 ; Source file: pcibio32.asm
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -860,7 +860,7 @@
 ; Source file: apm_pm.asm
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -879,7 +879,7 @@
 ; Source file: orgs.asm
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -926,7 +926,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2004-2015 Oracle Corporation
+;  Copyright (C) 2004-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -1078,7 +1078,7 @@ section CONST progbits vstart=0xb0 align=1 ; size=0xcde class=DATA group=DGROUP
 
 section CONST2 progbits vstart=0xd8e align=1 ; size=0x3fa class=DATA group=DGROUP
 _bios_cvs_version_string:                    ; 0xf0d8e LB 0x12
-    db  'VirtualBox 5.1.2', 000h, 000h
+    db  'VirtualBox 5.1.4', 000h, 000h
 _bios_prefix_string:                         ; 0xf0da0 LB 0x8
     db  'BIOS: ', 000h, 000h
 _isotag:                                     ; 0xf0da8 LB 0x6
@@ -17197,4 +17197,4 @@ biosorg_check_before_or_at_0FFEEh:           ; 0xfff80 LB 0x70
     db  'XM'
 cpu_reset:                                   ; 0xffff0 LB 0x10
     jmp far 0f000h:0e05bh                     ; ea 5b e0 00 f0
-    db  030h, 036h, 02fh, 032h, 033h, 02fh, 039h, 039h, 000h, 0fch, 01ah
+    db  030h, 036h, 02fh, 032h, 033h, 02fh, 039h, 039h, 000h, 0fch, 018h
diff --git a/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative386.md5sum b/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative386.md5sum
index 84c45ad..e6c279a 100644
--- a/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative386.md5sum
+++ b/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative386.md5sum
@@ -1 +1 @@
-c003d8ab6825d254dea0b1d1e4ed4da7 *VBoxPcBios386.rom
+6edd2ad6c1d2822c7df8efbc560f379b *VBoxPcBios386.rom
diff --git a/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative8086.asm b/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative8086.asm
index 5e6d1c4..cab9062 100644
--- a/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative8086.asm
+++ b/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative8086.asm
@@ -10,7 +10,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2004-2015 Oracle Corporation
+;  Copyright (C) 2004-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -24,7 +24,7 @@
 ; Source file: bios.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -66,7 +66,7 @@
 ; Source file: print.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -108,7 +108,7 @@
 ; Source file: ata.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -150,7 +150,7 @@
 ; Source file: floppy.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -196,7 +196,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2011-2015 Oracle Corporation
+;  Copyright (C) 2011-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -210,7 +210,7 @@
 ; Source file: eltorito.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -252,7 +252,7 @@
 ; Source file: boot.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -294,7 +294,7 @@
 ; Source file: keyboard.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -336,7 +336,7 @@
 ; Source file: disk.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -378,7 +378,7 @@
 ; Source file: serial.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -466,7 +466,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2013-2015 Oracle Corporation
+;  Copyright (C) 2013-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -480,7 +480,7 @@
 ; Source file: timepci.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -522,7 +522,7 @@
 ; Source file: ps2mouse.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -564,7 +564,7 @@
 ; Source file: parallel.c
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -610,7 +610,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2004-2015 Oracle Corporation
+;  Copyright (C) 2004-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -628,7 +628,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2004-2015 Oracle Corporation
+;  Copyright (C) 2004-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -646,7 +646,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2011-2015 Oracle Corporation
+;  Copyright (C) 2011-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -664,7 +664,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2004-2015 Oracle Corporation
+;  Copyright (C) 2004-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -682,7 +682,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2004-2015 Oracle Corporation
+;  Copyright (C) 2004-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -699,7 +699,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2011-2015 Oracle Corporation
+;  Copyright (C) 2011-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -716,7 +716,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2011-2015 Oracle Corporation
+;  Copyright (C) 2011-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -734,7 +734,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2012-2015 Oracle Corporation
+;  Copyright (C) 2012-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -772,7 +772,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2012-2015 Oracle Corporation
+;  Copyright (C) 2012-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -791,7 +791,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2012-2015 Oracle Corporation
+;  Copyright (C) 2012-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -810,7 +810,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2012-2015 Oracle Corporation
+;  Copyright (C) 2012-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -829,7 +829,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2012-2015 Oracle Corporation
+;  Copyright (C) 2012-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -844,7 +844,7 @@
 ; Source file: pcibio32.asm
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -860,7 +860,7 @@
 ; Source file: apm_pm.asm
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -879,7 +879,7 @@
 ; Source file: orgs.asm
 ;
 ;  
-;  Copyright (C) 2006-2015 Oracle Corporation
+;  Copyright (C) 2006-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -926,7 +926,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2011-2015 Oracle Corporation
+;  Copyright (C) 2011-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -963,7 +963,7 @@
 ;  
 ;  
 ;  
-;  Copyright (C) 2004-2015 Oracle Corporation
+;  Copyright (C) 2004-2016 Oracle Corporation
 ;  
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -1115,7 +1115,7 @@ section CONST progbits vstart=0xb0 align=1 ; size=0xcde class=DATA group=DGROUP
 
 section CONST2 progbits vstart=0xd8e align=1 ; size=0x3fa class=DATA group=DGROUP
 _bios_cvs_version_string:                    ; 0xf0d8e LB 0x12
-    db  'VirtualBox 5.1.2', 000h, 000h
+    db  'VirtualBox 5.1.4', 000h, 000h
 _bios_prefix_string:                         ; 0xf0da0 LB 0x8
     db  'BIOS: ', 000h, 000h
 _isotag:                                     ; 0xf0da8 LB 0x6
@@ -18273,4 +18273,4 @@ biosorg_check_before_or_at_0FFEEh:           ; 0xfff80 LB 0x70
     db  'XM'
 cpu_reset:                                   ; 0xffff0 LB 0x10
     jmp far 0f000h:0e05bh                     ; ea 5b e0 00 f0
-    db  030h, 036h, 02fh, 032h, 033h, 02fh, 039h, 039h, 000h, 0fbh, 037h
+    db  030h, 036h, 02fh, 032h, 033h, 02fh, 039h, 039h, 000h, 0fbh, 035h
diff --git a/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative8086.md5sum b/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative8086.md5sum
index 66af268..c6bdb1f 100644
--- a/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative8086.md5sum
+++ b/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative8086.md5sum
@@ -1 +1 @@
-330a9aa8398ed5ec4c2d8ab184d0b782 *VBoxPcBios8086.rom
+3ef56c0331728fdeba1df2ab23a5ebdc *VBoxPcBios8086.rom
diff --git a/src/VBox/Devices/PC/BIOS/ahci.c b/src/VBox/Devices/PC/BIOS/ahci.c
index 6d160a2..4018a34 100644
--- a/src/VBox/Devices/PC/BIOS/ahci.c
+++ b/src/VBox/Devices/PC/BIOS/ahci.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -129,7 +129,7 @@ ct_assert(sizeof(ahci_t) <= 1024);
 /** Global register set. */
 #define AHCI_HBA_SIZE 0x100
 
-//@todo: what are the casts good for?
+/// @todo what are the casts good for?
 #define AHCI_REG_CAP ((uint32_t)0x00)
 #define AHCI_REG_GHC ((uint32_t)0x04)
 # define AHCI_GHC_AE RT_BIT_32(31)
@@ -442,7 +442,7 @@ static void ahci_port_deinit_current(ahci_t __far *ahci)
          * Port idles, set up memory for commands and received FIS and program the
          * address registers.
          */
-        //@todo: merge memsets?
+        /// @todo merge memsets?
         _fmemset(&ahci->aCmdHdr[0], 0, sizeof(ahci->aCmdHdr));
         _fmemset(&ahci->abCmd[0], 0, sizeof(ahci->abCmd));
         _fmemset(&ahci->abFisRecv[0], 0, sizeof(ahci->abFisRecv));
@@ -483,7 +483,7 @@ static void ahci_port_init(ahci_t __far *ahci, uint8_t u8Port)
      * Port idles, set up memory for commands and received FIS and program the
      * address registers.
      */
-    //@todo: just one memset?
+    /// @todo just one memset?
     _fmemset(&ahci->aCmdHdr[0], 0, sizeof(ahci->aCmdHdr));
     _fmemset(&ahci->abCmd[0], 0, sizeof(ahci->abCmd));
     _fmemset(&ahci->abFisRecv[0], 0, sizeof(ahci->abFisRecv));
@@ -568,7 +568,7 @@ int ahci_write_sectors(bio_dsk_t __far *bios_dsk)
     return rc;
 }
 
-//@todo: move
+/// @todo move
 #define ATA_DATA_NO      0x00
 #define ATA_DATA_IN      0x01
 #define ATA_DATA_OUT     0x02
@@ -600,7 +600,7 @@ uint16_t ahci_cmd_packet(uint16_t device_id, uint8_t cmdlen, char __far *cmdbuf,
     DBG_AHCI("%s: reading %u %u-byte sectors\n", __func__,
              bios_dsk->drqp.nsect, bios_dsk->drqp.sect_sz);
 
-    bios_dsk->drqp.lba     = length << 8;     //@todo: xfer length limit
+    bios_dsk->drqp.lba     = length << 8;     /// @todo xfer length limit
     bios_dsk->drqp.buffer  = buffer;
     bios_dsk->drqp.nsect   = length / bios_dsk->drqp.sect_sz;
 //    bios_dsk->drqp.sect_sz = 2048;
@@ -614,7 +614,7 @@ uint16_t ahci_cmd_packet(uint16_t device_id, uint8_t cmdlen, char __far *cmdbuf,
     _fmemcpy(ahci->abAcmd, cmdbuf, cmdlen);
 
     /* Reset transferred counts. */
-    // @todo: clear in calling code?
+    /// @todo clear in calling code?
     bios_dsk->drqp.trsfsectors = 0;
     bios_dsk->drqp.trsfbytes   = 0;
 
@@ -677,7 +677,7 @@ void ahci_port_detect_device(ahci_t __far *ahci, uint8_t u8Port)
 
         DBG_AHCI("AHCI: Device detected on port %d\n", u8Port);
 
-        //@todo: Merge common HD/CDROM detection code
+        /// @todo Merge common HD/CDROM detection code
         if (devcount_ahci < BX_MAX_AHCI_DEVICES)
         {
             /* Device detected, enable FIS receive. */
@@ -876,7 +876,7 @@ static int ahci_hba_init(uint16_t io_base)
     /* Physical address of memory used for throwing away ATAPI data when reading 512-byte
      * blocks from 2048-byte CD sectors.
      */
-    ahci->sink_buf_phys = 0xCC000;  //@todo: find some better place!
+    ahci->sink_buf_phys = 0xCC000;  /// @todo find some better place!
 
     /* Reset the controller. */
     ahci_ctrl_set_bits(io_base, AHCI_REG_GHC, AHCI_GHC_HR);
diff --git a/src/VBox/Devices/PC/BIOS/apm.c b/src/VBox/Devices/PC/BIOS/apm.c
index 5103521..565d019 100644
--- a/src/VBox/Devices/PC/BIOS/apm.c
+++ b/src/VBox/Devices/PC/BIOS/apm.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2004-2015 Oracle Corporation
+ * Copyright (C) 2004-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -78,7 +78,7 @@ enum apm_power_state {
 
 #define APM_PORT        0x8900      /* Bochs power control port. */
 
-// @todo: merge with system.c
+/// @todo merge with system.c
 #define AX      r.gr.u.r16.ax
 #define BX      r.gr.u.r16.bx
 #define CX      r.gr.u.r16.cx
@@ -159,14 +159,14 @@ void BIOSCALL apm_function(sys_regs_t r)
         CX = 3;         /* Bits 0/1: 16-bit/32-bit PM interface */
         break;
     case APM_RM_CONN:
-        // @todo: validate device ID
-        // @todo: validate current connection state
-        // @todo: change connection state
+        /// @todo validate device ID
+        /// @todo validate current connection state
+        /// @todo change connection state
         break;
     case APM_PM_CONN:
-        // @todo: validate device ID
-        // @todo: validate current connection state
-        // @todo: change connection state
+        /// @todo validate device ID
+        /// @todo validate current connection state
+        /// @todo change connection state
         AX = APM_BIOS_SEG;              /* 16-bit PM code segment (RM segment base). */
         BX = (uint16_t)apm_pm16_entry;  /* 16-bit PM entry point offset. */
         CX = APM_BIOS_SEG;              /* 16-bit data segment. */
@@ -174,9 +174,9 @@ void BIOSCALL apm_function(sys_regs_t r)
         DI = APM_BIOS_SEG_LEN;          /* Data segment length. */
         break;
     case APM_32_CONN:
-        // @todo: validate device ID
-        // @todo: validate current connection state
-        // @todo: change connection state
+        /// @todo validate device ID
+        /// @todo validate current connection state
+        /// @todo change connection state
         AX = APM_BIOS_SEG;              /* 32-bit PM code segment (RM segment base). */
         BX = (uint16_t)apm_pm32_entry;  /* 32-bit entry point offset. */
         CX = APM_BIOS_SEG;              /* 16-bit code segment. */
@@ -191,8 +191,8 @@ void BIOSCALL apm_function(sys_regs_t r)
         halt();
         break;
     case APM_SET_PWR:
-        // @todo: validate device ID
-        // @todo: validate current connection state
+        /// @todo validate device ID
+        /// @todo validate current connection state
         switch (CX) {
         case APM_PS_STANDBY:
             apm_out_str("Standby", APM_PORT);
@@ -209,14 +209,14 @@ void BIOSCALL apm_function(sys_regs_t r)
         }
         break;
     case APM_DRV_VER:
-        AX = 0x0102;    // @todo: Not right - must take driver version into account!
+        AX = 0x0102;    /// @todo Not right - must take driver version into account!
         break;
     case APM_DISCONN:
-        // @todo: actually perform a disconnect...
+        /// @todo actually perform a disconnect...
     case APM_BUSY:      /* Nothing to do as APM Idle doesn't slow CPU clock. */
         break;
     case APM_GET_EVT:
-        // @todo: error should be different if interface not connected + engaged
+        /// @todo error should be different if interface not connected + engaged
         SET_AH(APM_ERR_NO_EVENTS);  /* PM events don't happen. */
         SET_CF();
         break;
diff --git a/src/VBox/Devices/PC/BIOS/apm_pm.asm b/src/VBox/Devices/PC/BIOS/apm_pm.asm
index a689863..c3baa71 100644
--- a/src/VBox/Devices/PC/BIOS/apm_pm.asm
+++ b/src/VBox/Devices/PC/BIOS/apm_pm.asm
@@ -1,5 +1,5 @@
 ;;
-;; Copyright (C) 2006-2015 Oracle Corporation
+;; Copyright (C) 2006-2016 Oracle Corporation
 ;;
 ;; This file is part of VirtualBox Open Source Edition (OSE), as
 ;; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/PC/BIOS/ata.c b/src/VBox/Devices/PC/BIOS/ata.c
index c134edb..5ee0551 100644
--- a/src/VBox/Devices/PC/BIOS/ata.c
+++ b/src/VBox/Devices/PC/BIOS/ata.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -378,7 +378,7 @@ void BIOSCALL ata_detect(void)
     bios_dsk->channels[1].iobase2 = 0x370;
     bios_dsk->channels[1].irq     = 15;
 #endif
-#if 0   //@todo - temporarily removed to avoid conflict with AHCI
+#if 0   /// @todo - temporarily removed to avoid conflict with AHCI
 #if BX_MAX_ATA_INTERFACES > 2
     bios_dsk->channels[2].iface   = ATA_IFACE_ISA;
     bios_dsk->channels[2].iobase1 = 0x1e8;
@@ -936,7 +936,7 @@ uint16_t ata_cmd_packet(uint16_t device, uint8_t cmdlen, char __far *cmdbuf,
     cmdlen >>= 1;
 
     // Reset count of transferred data
-    // @todo: clear in calling code?
+    /// @todo clear in calling code?
     bios_dsk->drqp.trsfsectors = 0;
     bios_dsk->drqp.trsfbytes   = 0;
 
diff --git a/src/VBox/Devices/PC/BIOS/ata.h b/src/VBox/Devices/PC/BIOS/ata.h
index 2a9e363..b463eee 100644
--- a/src/VBox/Devices/PC/BIOS/ata.h
+++ b/src/VBox/Devices/PC/BIOS/ata.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/PC/BIOS/bios.c b/src/VBox/Devices/PC/BIOS/bios.c
index 6a940eb..7ac6168 100644
--- a/src/VBox/Devices/PC/BIOS/bios.c
+++ b/src/VBox/Devices/PC/BIOS/bios.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -154,7 +154,7 @@ void set_mode(uint8_t mode);
     "int    10h"            \
     parm [al] modify [ax];
 
-//@todo: restore
+/// @todo restore
 //#undef VBOX
 
 #define BX_PCIBIOS  1
diff --git a/src/VBox/Devices/PC/BIOS/biosint.h b/src/VBox/Devices/PC/BIOS/biosint.h
index f52f964..ed915ef 100644
--- a/src/VBox/Devices/PC/BIOS/biosint.h
+++ b/src/VBox/Devices/PC/BIOS/biosint.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/PC/BIOS/boot.c b/src/VBox/Devices/PC/BIOS/boot.c
index 344bf9a..49090f4 100644
--- a/src/VBox/Devices/PC/BIOS/boot.c
+++ b/src/VBox/Devices/PC/BIOS/boot.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -91,7 +91,7 @@ int read_boot_sec(uint8_t bootdrv, uint16_t segment);
 
 static const char drivetypes[][10]={"Floppy","Hard Disk","CD-ROM","LAN"};
 
-//@todo: pass inputs as bit flags rather than bytes?
+/// @todo pass inputs as bit flags rather than bytes?
 void print_boot_device(uint8_t cdboot, uint8_t lanboot, uint8_t drive)
 {
     int     i;
@@ -113,7 +113,7 @@ void print_boot_device(uint8_t cdboot, uint8_t lanboot, uint8_t drive)
 // print_boot_failure
 //   displays the reason why boot failed
 //--------------------------------------------------------------------------
-//@todo: pass inputs as bit flags rather than bytes?
+/// @todo pass inputs as bit flags rather than bytes?
 void print_boot_failure(uint8_t cdboot, uint8_t lanboot, uint8_t drive,
                         uint8_t reason, uint8_t lastdrive)
 {
@@ -155,7 +155,7 @@ void print_cdromboot_failure(uint16_t code)
 // returns bootsegment in ax, drive in bl
 uint32_t BIOSCALL int19_function(uint8_t bseqnr)
 {
-    //@todo: common code for getting the EBDA segment
+    /// @todo common code for getting the EBDA segment
     uint16_t    ebda_seg=read_word(0x0040,0x000E);
     uint16_t    bootseq;
     uint8_t     bootdrv;
diff --git a/src/VBox/Devices/PC/BIOS/disk.c b/src/VBox/Devices/PC/BIOS/disk.c
index 08bf1a5..a79c045 100644
--- a/src/VBox/Devices/PC/BIOS/disk.c
+++ b/src/VBox/Devices/PC/BIOS/disk.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -79,7 +79,7 @@ dsk_acc_t   dskacc[DSKTYP_CNT] = {
 };
 
 
-//@todo: put in a header
+/// @todo put in a header
 #define AX      r.gr.u.r16.ax
 #define BX      r.gr.u.r16.bx
 #define CX      r.gr.u.r16.cx
@@ -202,7 +202,7 @@ void BIOSCALL int13_harddisk(disk_regs_t r)
             goto int13_success;
 
         /* If required, translate LCHS to LBA and execute command. */
-        //@todo: The IS_SCSI_DEVICE check should be redundant...
+        /// @todo The IS_SCSI_DEVICE check should be redundant...
         if (( (bios_dsk->devices[device].pchs.heads != nlh) || (bios_dsk->devices[device].pchs.spt != nlspt)) || VBOX_IS_SCSI_DEVICE(device)) {
             lba = ((((uint32_t)cylinder * (uint32_t)nlh) + (uint32_t)head) * (uint32_t)nlspt) + (uint32_t)sector - 1;
             sector = 0; // this forces the command to be lba
@@ -219,7 +219,7 @@ void BIOSCALL int13_harddisk(disk_regs_t r)
         bios_dsk->drqp.lba      = lba;
         bios_dsk->drqp.buffer   = MK_FP(ES, BX);
         bios_dsk->drqp.nsect    = count;
-        bios_dsk->drqp.sect_sz  = 512;  //@todo: device specific?
+        bios_dsk->drqp.sect_sz  = 512;  /// @todo device specific?
         bios_dsk->drqp.cylinder = cylinder;
         bios_dsk->drqp.head     = head;
         bios_dsk->drqp.sector   = sector;
@@ -261,7 +261,7 @@ void BIOSCALL int13_harddisk(disk_regs_t r)
         SET_DL(count); /* FIXME returns 0, 1, or n hard drives */
 
         // FIXME should set ES & DI
-        // @todo: Actually, the above comment is nonsense.
+        /// @todo Actually, the above comment is nonsense.
 
         goto int13_success;
         break;
@@ -410,7 +410,7 @@ void BIOSCALL int13_harddisk_ext(disk_regs_t r)
         bios_dsk->drqp.lba     = lba;
         bios_dsk->drqp.buffer  = MK_FP(segment, offset);
         bios_dsk->drqp.nsect   = count;
-        bios_dsk->drqp.sect_sz = 512;   //@todo: device specific?
+        bios_dsk->drqp.sect_sz = 512;   /// @todo device specific?
         bios_dsk->drqp.sector  = 0;     /* Indicate LBA. */
         bios_dsk->drqp.dev_id  = device;
 
diff --git a/src/VBox/Devices/PC/BIOS/ebda.h b/src/VBox/Devices/PC/BIOS/ebda.h
index a1cd5df..7b0f94e 100644
--- a/src/VBox/Devices/PC/BIOS/ebda.h
+++ b/src/VBox/Devices/PC/BIOS/ebda.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/PC/BIOS/eltorito.c b/src/VBox/Devices/PC/BIOS/eltorito.c
index df8eb68..eb56791 100644
--- a/src/VBox/Devices/PC/BIOS/eltorito.c
+++ b/src/VBox/Devices/PC/BIOS/eltorito.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -65,7 +65,7 @@
 #endif
 
 
-//@todo: put in a header
+/// @todo put in a header
 #define AX      r.gr.u.r16.ax
 #define BX      r.gr.u.r16.bx
 #define CX      r.gr.u.r16.cx
@@ -141,7 +141,7 @@ extern  int     diskette_param_table;
 
 void BIOSCALL cdemu_init(void)
 {
-    // @TODO: a macro or a function for getting the EBDA segment
+    /// @todo a macro or a function for getting the EBDA segment
     uint16_t    ebda_seg = read_word(0x0040,0x000E);
 
     // the only important data is this one for now
@@ -150,7 +150,7 @@ void BIOSCALL cdemu_init(void)
 
 uint8_t BIOSCALL cdemu_isactive(void)
 {
-    // @TODO: a macro or a function for getting the EBDA segment
+    /// @todo a macro or a function for getting the EBDA segment
     uint16_t    ebda_seg = read_word(0x0040,0x000E);
 
     return read_byte(ebda_seg,(uint16_t)&EbdaData->cdemu.active);
@@ -158,7 +158,7 @@ uint8_t BIOSCALL cdemu_isactive(void)
 
 uint8_t BIOSCALL cdemu_emulated_drive(void)
 {
-    // @TODO: a macro or a function for getting the EBDA segment
+    /// @todo a macro or a function for getting the EBDA segment
     uint16_t    ebda_seg = read_word(0x0040,0x000E);
 
     return read_byte(ebda_seg,(uint16_t)&EbdaData->cdemu.emulated_drive);
@@ -170,7 +170,7 @@ uint8_t BIOSCALL cdemu_emulated_drive(void)
 
 void BIOSCALL int13_eltorito(disk_regs_t r)
 {
-    // @TODO: a macro or a function for getting the EBDA segment
+    /// @todo a macro or a function for getting the EBDA segment
     uint16_t        ebda_seg=read_word(0x0040,0x000E);
     cdemu_t __far   *cdemu;
 
@@ -192,7 +192,7 @@ void BIOSCALL int13_eltorito(disk_regs_t r)
 
     case 0x4b: // ElTorito - Terminate disk emu
         // FIXME ElTorito Hardcoded
-        //@todo: maybe our cdemu struct should match El Torito to allow memcpy()?
+        /// @todo maybe our cdemu struct should match El Torito to allow memcpy()?
         write_byte(DS,SI+0x00,0x13);
         write_byte(DS,SI+0x01,cdemu->media);
         write_byte(DS,SI+0x02,cdemu->emulated_drive);
@@ -239,7 +239,7 @@ int13_success:
 // ---------------------------------------------------------------------------
 
 /* Utility routine to check if a device is a CD-ROM. */
-//@todo: this function is kinda useless as the ATAPI type check is obsolete.
+/// @todo this function is kinda useless as the ATAPI type check is obsolete.
 static uint16_t device_is_cdrom(uint8_t device)
 {
     bio_dsk_t __far *bios_dsk;
@@ -268,7 +268,7 @@ static const char eltorito[]="EL TORITO SPECIFICATION";
 //
 uint16_t cdrom_boot(void)
 {
-    // @TODO: a macro or a function for getting the EBDA segment
+    /// @todo a macro or a function for getting the EBDA segment
     uint16_t            ebda_seg=read_word(0x0040,0x000E);
     uint8_t             buffer[2048];
     cdb_atapi           atapicmd;
@@ -313,7 +313,7 @@ uint16_t cdrom_boot(void)
     /* Check for a valid BRVD. */
     if (buffer[0] != 0)
         return 4;
-    //@todo: what's wrong with memcmp()?
+    /// @todo what's wrong with memcmp()?
     for (i = 0; i < 5; ++i) {
         if (buffer[1+i] != isotag[i])
             return 5;
@@ -340,7 +340,7 @@ uint16_t cdrom_boot(void)
     if (error != 0)
         return 7;
 
-    //@todo: Define a struct for the Boot Catalog, the hardcoded offsets are so dumb...
+    /// @todo Define a struct for the Boot Catalog, the hardcoded offsets are so dumb...
 
     /* Check if the Boot Catalog looks valid. */
     if (buffer[0x00] != 0x01)
@@ -463,7 +463,7 @@ uint16_t cdrom_boot(void)
 
 void BIOSCALL int13_cdemu(disk_regs_t r)
 {
-    // @TODO: a macro or a function for getting the EBDA segment
+    /// @todo a macro or a function for getting the EBDA segment
     uint16_t            ebda_seg=read_word(0x0040,0x000E);
     uint8_t             device, status;
     uint16_t            vheads, vspt, vcylinders;
@@ -627,8 +627,8 @@ void BIOSCALL int13_cdemu(disk_regs_t r)
 
         /* Only set the DPT pointer for emulated floppies. */
         if (cdemu->media < 4) {
-            DI = (uint16_t)&diskette_param_table;   // @todo: should this depend on emulated medium?
-            ES = 0xF000;                            // @todo: how to make this relocatable?
+            DI = (uint16_t)&diskette_param_table;   /// @todo should this depend on emulated medium?
+            ES = 0xF000;                            /// @todo how to make this relocatable?
         }
         goto int13_success;
         break;
@@ -851,7 +851,7 @@ void BIOSCALL int13_cdrom(uint16_t EHBX, disk_regs_t r)
         // FIXME should handle 0x31 no media in device
         // FIXME should handle 0xb5 valid request failed
 
-#if 0 //@todo: implement!
+#if 0 /// @todo implement!
         // Call removable media eject
         ASM_START
         push bp
@@ -875,7 +875,7 @@ int13_cdrom_rme_end:
         goto int13_success;
         break;
 
-    //@todo: Part of this should be merged with analogous code in disk.c
+    /// @todo Part of this should be merged with analogous code in disk.c
     case 0x48: // IBM/MS get drive parameters
         dpt = DS :> (dpt_t *)SI;
         size = dpt->size;
diff --git a/src/VBox/Devices/PC/BIOS/floppy.c b/src/VBox/Devices/PC/BIOS/floppy.c
index 3f27bf5..e01901a 100644
--- a/src/VBox/Devices/PC/BIOS/floppy.c
+++ b/src/VBox/Devices/PC/BIOS/floppy.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -344,7 +344,7 @@ bx_bool floppy_media_sense(uint16_t drive)
     //    110 reserved
     //    111 all other formats/drives
 
-    // @todo: break out drive type determination
+    /// @todo break out drive type determination
     drive_type = inb_cmos(0x10);
     if (drive == 0)
         drive_type >>= 4;
@@ -430,7 +430,7 @@ bx_bool floppy_drive_exists(uint16_t drive)
     uint8_t     drive_type;
 
     // check CMOS to see if drive exists
-    // @todo: break out drive type determination
+    /// @todo break out drive type determination
     drive_type = inb_cmos(0x10);
     if (drive == 0)
         drive_type >>= 4;
@@ -439,7 +439,7 @@ bx_bool floppy_drive_exists(uint16_t drive)
     return drive_type != 0;
 }
 
-//@todo: put in a header
+/// @todo put in a header
 #define AX      r.gr.u.r16.ax
 #define BX      r.gr.u.r16.bx
 #define CX      r.gr.u.r16.cx
@@ -476,7 +476,7 @@ void BIOSCALL int13_diskette_function(disk_regs_t r)
             SET_CF();
             return;
         }
-        // @todo: break out drive type determination
+        /// @todo break out drive type determination
         drive_type = inb_cmos(0x10);
         if (drive == 0)
             drive_type >>= 4;
@@ -558,7 +558,7 @@ void BIOSCALL int13_diskette_function(disk_regs_t r)
             // es:bx = pointer to where to place information from diskette
             // port 04: DMA-1 base and current address, channel 2
             // port 05: DMA-1 base and current count, channel 2
-            // @todo: merge/factor out pointer normalization
+            /// @todo merge/factor out pointer normalization
             page = (ES >> 12);              // upper 4 bits
             base_es = (ES << 4);            // lower 16bits contributed by ES
             base_address = base_es + BX;    // lower 16 bits of address
@@ -705,7 +705,7 @@ void BIOSCALL int13_diskette_function(disk_regs_t r)
             // es:bx = pointer to where to place information from diskette
             // port 04: DMA-1 base and current address, channel 2
             // port 05: DMA-1 base and current count, channel 2
-            // @todo: merge/factor out pointer normalization
+            /// @todo merge/factor out pointer normalization
             page = (ES >> 12);              // upper 4 bits
             base_es = (ES << 4);            // lower 16bits contributed by ES
             base_address = base_es + BX;    // lower 16 bits of address
@@ -881,7 +881,7 @@ void BIOSCALL int13_diskette_function(disk_regs_t r)
         }
 
         // set up DMA controller for transfer
-        // @todo: merge/factor out pointer normalization
+        /// @todo merge/factor out pointer normalization
         page = (ES >> 12);              // upper 4 bits
         base_es = (ES << 4);            // lower 16bits contributed by ES
         base_address = base_es + BX;    // lower 16 bits of address
@@ -1015,7 +1015,7 @@ void BIOSCALL int13_diskette_function(disk_regs_t r)
             return;
         }
 
-        // @todo: break out drive type determination
+        /// @todo break out drive type determination
         drive_type = inb_cmos(0x10);
         num_floppies = 0;
         if (drive_type & 0xf0)
@@ -1075,7 +1075,7 @@ void BIOSCALL int13_diskette_function(disk_regs_t r)
         }
 
         /* set es & di to point to 11 byte diskette param table in ROM */
-        ES = 0xF000;    // @todo: any way to make this relocatable?
+        ES = 0xF000;    /// @todo any way to make this relocatable?
         DI = get_floppy_dpt(drive_type);
         CLEAR_CF(); // success
         /* disk status not changed upon success */
@@ -1090,7 +1090,7 @@ void BIOSCALL int13_diskette_function(disk_regs_t r)
             SET_CF();
             return;
         }
-        // @todo: break out drive type determination
+        /// @todo break out drive type determination
         drive_type = inb_cmos(0x10);
         if (drive == 0)
             drive_type >>= 4;
@@ -1234,7 +1234,7 @@ void BIOSCALL int13_diskette_function(disk_regs_t r)
             }
         }
 
-        // @todo: break out drive type determination
+        /// @todo break out drive type determination
         drive_type = inb_cmos(0x10);
         if (drive == 0)
             drive_type >>= 4;
@@ -1304,7 +1304,7 @@ void BIOSCALL int13_diskette_function(disk_regs_t r)
         write_byte(0x0040, base_address, media_state);
 
         // set es & di to point to 11 byte diskette param table in ROM
-        ES = 0xF000;    // @todo: any way to make this relocatable?
+        ES = 0xF000;    /// @todo any way to make this relocatable?
         DI = get_floppy_dpt(drive_type);
 
         // return success!
diff --git a/src/VBox/Devices/PC/BIOS/floppyt.c b/src/VBox/Devices/PC/BIOS/floppyt.c
index 9539985..6b74cb6 100644
--- a/src/VBox/Devices/PC/BIOS/floppyt.c
+++ b/src/VBox/Devices/PC/BIOS/floppyt.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/PC/BIOS/inlines.h b/src/VBox/Devices/PC/BIOS/inlines.h
index 42d1936..ca7f049 100644
--- a/src/VBox/Devices/PC/BIOS/inlines.h
+++ b/src/VBox/Devices/PC/BIOS/inlines.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/PC/BIOS/invop.c b/src/VBox/Devices/PC/BIOS/invop.c
index 4447eba..6083610 100644
--- a/src/VBox/Devices/PC/BIOS/invop.c
+++ b/src/VBox/Devices/PC/BIOS/invop.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/PC/BIOS/keyboard.c b/src/VBox/Devices/PC/BIOS/keyboard.c
index 79fe7f7..4740a03 100644
--- a/src/VBox/Devices/PC/BIOS/keyboard.c
+++ b/src/VBox/Devices/PC/BIOS/keyboard.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -353,7 +353,7 @@ unsigned int enqueue_key(uint8_t scan_code, uint8_t ascii_code)
 
 
 /* Keyboard hardware interrupt handler. */
-//@todo: should this be declared as taking arguments at all?
+/// @todo should this be declared as taking arguments at all?
 void BIOSCALL int09_function(uint16_t ES, uint16_t DI, uint16_t SI, uint16_t BP, uint16_t SP,
                              uint16_t BX, uint16_t DX, uint16_t CX, uint16_t AX)
 {
@@ -473,7 +473,7 @@ void BIOSCALL int09_function(uint16_t ES, uint16_t DI, uint16_t SI, uint16_t BP,
             while (read_byte(0x0040, 0x18) & 0x08)
                 ;   /* Hold on and wait... */
 
-            //@todo: We will send EOI again (and enable keyboard) on the way out; we shouldn't
+            /// @todo We will send EOI again (and enable keyboard) on the way out; we shouldn't
         }
         break;
     case 0xc5: /* Num Lock/Pause release */
@@ -511,14 +511,14 @@ void BIOSCALL int09_function(uint16_t ES, uint16_t DI, uint16_t SI, uint16_t BP,
         if (!(mf2_flags & 0x04)) {  /* If not already down */
             mf2_flags |= 0x04;
             write_byte(0x0040, 0x18, mf2_flags);
-            //@todo: EOI/enable kbd/enable interrupts/call INT 15h/8500h
+            /// @todo EOI/enable kbd/enable interrupts/call INT 15h/8500h
         }
         break;
 
     case 0xd4: /* SysRq release */
         mf2_flags &= ~0x04;
         write_byte(0x0040, 0x18, mf2_flags);
-        //@todo: EOI/enable kbd/enable interrupts/call INT 15h/8501h
+        /// @todo EOI/enable kbd/enable interrupts/call INT 15h/8501h
         break;
 
     case 0x53: /* Del press */
@@ -634,7 +634,7 @@ unsigned int dequeue_key(uint8_t __far *scan_code, uint8_t __far *ascii_code, un
 }
 
 
-//@todo: move somewhere else?
+/// @todo move somewhere else?
 #define AX      r.gr.u.r16.ax
 #define BX      r.gr.u.r16.bx
 #define CX      r.gr.u.r16.cx
@@ -657,7 +657,7 @@ void BIOSCALL int16_function(volatile kbd_regs_t r)
     shift_flags = read_byte(0x0040, 0x17);
     led_flags   = read_byte(0x0040, 0x97);
     if ((((shift_flags >> 4) & 0x07) ^ (led_flags & 0x07)) != 0) {
-        int_disable();    //@todo: interrupts should be disabled already??
+        int_disable();    /// @todo interrupts should be disabled already??
         outb(0x60, 0xed);
         while ((inb(0x64) & 0x01) == 0) outb(0x80, 0x21);
         if ((inb(0x60) == 0xfa)) {
@@ -729,7 +729,7 @@ void BIOSCALL int16_function(volatile kbd_regs_t r)
     case 0x0A: /* GET KEYBOARD ID */
         count = 2;
         kbd_code = 0x0;
-        //@todo: Might be better to just mask the KB interrupt
+        /// @todo Might be better to just mask the KB interrupt
         int_disable();
         outb(0x60, 0xf2);
         /* Wait for data */
@@ -790,7 +790,7 @@ void BIOSCALL int16_function(volatile kbd_regs_t r)
         // don't change AH : function int16 ah=0x20-0x22 NOT supported
         break;
 
-    //@todo: what's the point of handling this??
+    /// @todo what's the point of handling this??
 #if 0
     case 0x6F:
         if (GET_AL() == 0x08)
diff --git a/src/VBox/Devices/PC/BIOS/logo.c b/src/VBox/Devices/PC/BIOS/logo.c
index b9ed5cb..b1d7d2f 100644
--- a/src/VBox/Devices/PC/BIOS/logo.c
+++ b/src/VBox/Devices/PC/BIOS/logo.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2004-2015 Oracle Corporation
+ * Copyright (C) 2004-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -65,7 +65,7 @@ uint16_t vesa_get_mode(uint16_t __far *mode);
  * Check for keystroke.
  * @returns    True if keystroke available, False if not.
  */
-//@todo: INT 16h should already be returning the right value in al; could also use setz
+/// @todo INT 16h should already be returning the right value in al; could also use setz
 uint8_t check_for_keystroke(void);
 #pragma aux check_for_keystroke =   \
     "mov    ax, 100h"               \
@@ -91,7 +91,7 @@ uint8_t get_keystroke(void);
     modify [ax] nomemory;
 
 
-//@todo: This whole business with reprogramming the PIT is rather suspect.
+/// @todo This whole business with reprogramming the PIT is rather suspect.
 // The BIOS already has waiting facilities in INT 15h (fn 83h, 86h) which
 // should be utilized instead.
 
@@ -106,7 +106,7 @@ void wait_init(void);
     "out    40h, al"    \
     modify [ax] nomemory;
 
-//@todo: using this private interface is not great
+/// @todo using this private interface is not great
 extern void rtc_post(void);
 #pragma aux rtc_post "*";
 
diff --git a/src/VBox/Devices/PC/BIOS/orgs.asm b/src/VBox/Devices/PC/BIOS/orgs.asm
index f5f982c..cd63c15 100644
--- a/src/VBox/Devices/PC/BIOS/orgs.asm
+++ b/src/VBox/Devices/PC/BIOS/orgs.asm
@@ -1,5 +1,5 @@
 ;;
-;; Copyright (C) 2006-2015 Oracle Corporation
+;; Copyright (C) 2006-2016 Oracle Corporation
 ;;
 ;; This file is part of VirtualBox Open Source Edition (OSE), as
 ;; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/PC/BIOS/parallel.c b/src/VBox/Devices/PC/BIOS/parallel.c
index b59071b..c7dd53b 100644
--- a/src/VBox/Devices/PC/BIOS/parallel.c
+++ b/src/VBox/Devices/PC/BIOS/parallel.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/PC/BIOS/pci32.c b/src/VBox/Devices/PC/BIOS/pci32.c
index 418a810..c0ffa01 100644
--- a/src/VBox/Devices/PC/BIOS/pci32.c
+++ b/src/VBox/Devices/PC/BIOS/pci32.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2004-2015 Oracle Corporation
+ * Copyright (C) 2004-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/PC/BIOS/pcibio32.asm b/src/VBox/Devices/PC/BIOS/pcibio32.asm
index 61cc3b2..f4497c7 100644
--- a/src/VBox/Devices/PC/BIOS/pcibio32.asm
+++ b/src/VBox/Devices/PC/BIOS/pcibio32.asm
@@ -1,5 +1,5 @@
 ;;
-;; Copyright (C) 2006-2015 Oracle Corporation
+;; Copyright (C) 2006-2016 Oracle Corporation
 ;;
 ;; This file is part of VirtualBox Open Source Edition (OSE), as
 ;; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/PC/BIOS/pcibios.c b/src/VBox/Devices/PC/BIOS/pcibios.c
index 4e2d592..7b8864e 100644
--- a/src/VBox/Devices/PC/BIOS/pcibios.c
+++ b/src/VBox/Devices/PC/BIOS/pcibios.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2004-2015 Oracle Corporation
+ * Copyright (C) 2004-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -52,7 +52,7 @@ enum pci_error {
     BUFFER_TOO_SMALL    = 0x89      /* Routing table buffer insufficient. */
 };
 
-// @todo: merge with system.c
+/// @todo merge with system.c
 #define AX      r.gr.u.r16.ax
 #define BX      r.gr.u.r16.bx
 #define CX      r.gr.u.r16.cx
@@ -133,7 +133,7 @@ extern unsigned outpd(unsigned port, unsigned value);
 
 #else
 
-//@todo: merge with AHCI code
+/// @todo merge with AHCI code
 
 /* Warning: Destroys high bits of EAX. */
 uint32_t inpd(uint16_t port);
@@ -322,7 +322,7 @@ void BIOSCALL PCIxx(function)(volatile pci_regs_t r)
     case PCI_BIOS_PRESENT:
         AX  = 0x0001;   /* Configuration mechanism #1 supported. */
         BX  = 0x0210;   /* Version 2.1. */
-        //@todo: return true max bus # in CL
+        /// @todo return true max bus # in CL
         CX  = 0;        /* Maximum bus number. */
         EDX = 'P' | ('C' << 8) | ((uint32_t)'I' << 16) | ((uint32_t)' ' << 24);
         break;
diff --git a/src/VBox/Devices/PC/BIOS/pciutil.c b/src/VBox/Devices/PC/BIOS/pciutil.c
index e42a9df..43fdab2 100644
--- a/src/VBox/Devices/PC/BIOS/pciutil.c
+++ b/src/VBox/Devices/PC/BIOS/pciutil.c
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/PC/BIOS/pciutil.h b/src/VBox/Devices/PC/BIOS/pciutil.h
index 8867592..9001a82 100644
--- a/src/VBox/Devices/PC/BIOS/pciutil.h
+++ b/src/VBox/Devices/PC/BIOS/pciutil.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/PC/BIOS/post.c b/src/VBox/Devices/PC/BIOS/post.c
index 0507fc8..2aa3940 100644
--- a/src/VBox/Devices/PC/BIOS/post.c
+++ b/src/VBox/Devices/PC/BIOS/post.c
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2004-2015 Oracle Corporation
+ * Copyright (C) 2004-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/PC/BIOS/print.c b/src/VBox/Devices/PC/BIOS/print.c
index 95311f7..7d41d19 100644
--- a/src/VBox/Devices/PC/BIOS/print.c
+++ b/src/VBox/Devices/PC/BIOS/print.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/PC/BIOS/ps2mouse.c b/src/VBox/Devices/PC/BIOS/ps2mouse.c
index a73a432..c480ad6 100644
--- a/src/VBox/Devices/PC/BIOS/ps2mouse.c
+++ b/src/VBox/Devices/PC/BIOS/ps2mouse.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/PC/BIOS/scsi.c b/src/VBox/Devices/PC/BIOS/scsi.c
index fc124c1..216c3aa 100644
--- a/src/VBox/Devices/PC/BIOS/scsi.c
+++ b/src/VBox/Devices/PC/BIOS/scsi.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2004-2015 Oracle Corporation
+ * Copyright (C) 2004-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -294,7 +294,7 @@ int scsi_write_sectors(bio_dsk_t __far *bios_dsk)
 }
 
 
-//@todo: move
+/// @todo move
 #define ATA_DATA_NO      0x00
 #define ATA_DATA_IN      0x01
 #define ATA_DATA_OUT     0x02
diff --git a/src/VBox/Devices/PC/BIOS/serial.c b/src/VBox/Devices/PC/BIOS/serial.c
index fdcd347..2b2ad71 100644
--- a/src/VBox/Devices/PC/BIOS/serial.c
+++ b/src/VBox/Devices/PC/BIOS/serial.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/PC/BIOS/system.c b/src/VBox/Devices/PC/BIOS/system.c
index 1290e8a..df6c2e5 100644
--- a/src/VBox/Devices/PC/BIOS/system.c
+++ b/src/VBox/Devices/PC/BIOS/system.c
@@ -52,9 +52,9 @@
 
 #define UNSUPPORTED_FUNCTION    0x86    /* Specific to INT 15h. */
 
-#define BIOS_CONFIG_TABLE       0xe6f5  /* TODO: configurable? put elsewhere? */
+#define BIOS_CONFIG_TABLE       0xe6f5  /** @todo configurable? put elsewhere? */
 
-#define ACPI_DATA_SIZE    0x00010000L   /* TODO: configurable? put elsewhere? */
+#define ACPI_DATA_SIZE    0x00010000L   /** @todo configurable? put elsewhere? */
 
 #define BX_CPU                  3
 
@@ -265,7 +265,7 @@ void pm_unwind(uint16_t args);
     "retf"                  \
     parm [ax] modify nomemory aborts;
 
-// @todo: This method is silly. The RTC should be programmed to fire an interrupt
+/// @todo This method is silly. The RTC should be programmed to fire an interrupt
 // instead of hogging the CPU with inaccurate code.
 void timer_wait(uint32_t usec_wait)
 {
@@ -327,7 +327,7 @@ void set_e820_range(uint16_t ES, uint16_t DI, uint32_t start, uint32_t end,
     range->type   = type;
 }
 
-// @todo: move elsewhere?
+/// @todo move elsewhere?
 #define AX      r.gr.u.r16.ax
 #define BX      r.gr.u.r16.bx
 #define CX      r.gr.u.r16.cx
@@ -399,7 +399,7 @@ void BIOSCALL int15_function(sys_regs_t r)
         SET_AH(UNSUPPORTED_FUNCTION);
         break;
 
-    //@todo: Why does this need special handling? All we need is to set CF
+    /// @todo Why does this need special handling? All we need is to set CF
     //       but not handle this as an unknown function (regardless of CPU type).
     case 0x4f:
         /* keyboard intercept */
@@ -477,7 +477,7 @@ void BIOSCALL int15_function(sys_regs_t r)
         // This subfunction does not return!
 
         // turn off interrupts
-        int_disable();  //@todo: aren't they off already?
+        int_disable();  /// @todo aren't they off already?
 
         set_enable_a20(1); // enable A20 line; we're supposed to fail if that fails
 
@@ -833,7 +833,7 @@ void BIOSCALL int15_blkmove(disk_regs_t r)
     // +++ should have exception handlers
 
     // turn off interrupts
-    int_disable();    //@todo: aren't they disabled already?
+    int_disable();    /// @todo aren't they disabled already?
 
     prev_a20_enable = set_enable_a20(1); // enable A20 line
 
diff --git a/src/VBox/Devices/PC/BIOS/timepci.c b/src/VBox/Devices/PC/BIOS/timepci.c
index 8bdcc50..23a4b92 100644
--- a/src/VBox/Devices/PC/BIOS/timepci.c
+++ b/src/VBox/Devices/PC/BIOS/timepci.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -142,7 +142,7 @@ void BIOSCALL int70_function(pusha_regs_t regs, uint16_t ds, uint16_t es, iret_a
     eoi_both_pics();
 }
 
-// @todo: the coding style WRT register access is totally inconsistent
+/// @todo the coding style WRT register access is totally inconsistent
 // in the following routines
 
 void BIOSCALL int1a_function(pusha_regs_t regs, uint16_t ds, uint16_t es, iret_addr_t iret_addr)
diff --git a/src/VBox/Devices/PC/BIOS/vds.c b/src/VBox/Devices/PC/BIOS/vds.c
index c874523..4f9041c 100644
--- a/src/VBox/Devices/PC/BIOS/vds.c
+++ b/src/VBox/Devices/PC/BIOS/vds.c
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/PC/DevACPI.cpp b/src/VBox/Devices/PC/DevACPI.cpp
index c62e283..1ec9564 100644
--- a/src/VBox/Devices/PC/DevACPI.cpp
+++ b/src/VBox/Devices/PC/DevACPI.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -63,8 +63,13 @@
 #define DEBUG_HEX       0x3000
 #define DEBUG_CHR       0x3001
 
+/** PM Base Address PCI config space offset */
+#define PMBA            0x40
+/** PM Miscellaneous Power Management PCI config space offset */
+#define PMREGMISC       0x80
+
 #define PM_TMR_FREQ     3579545
-/* Default base for PM PIIX4 device */
+/** Default base for PM PIIX4 device */
 #define PM_PORT_BASE    0x4000
 /* Port offsets in PM device */
 enum
@@ -203,6 +208,70 @@ enum
 #define STA_DEVICE_FUNCTIONING_PROPERLY_MASK    RT_BIT(3) /**< functioning properly */
 #define STA_BATTERY_PRESENT_MASK                RT_BIT(4) /**< the battery is present */
 
+/** SMBus Base Address PCI config space offset */
+#define SMBBA           0x90
+/** SMBus Host Configuration PCI config space offset */
+#define SMBHSTCFG       0xd2
+/** SMBus Slave Command PCI config space offset */
+#define SMBSLVC         0xd3
+/** SMBus Slave Shadow Port 1 PCI config space offset */
+#define SMBSHDW1        0xd4
+/** SMBus Slave Shadow Port 2 PCI config space offset */
+#define SMBSHDW2        0xd5
+/** SMBus Revision Identification PCI config space offset */
+#define SMBREV          0xd6
+
+#define SMBHSTCFG_SMB_HST_EN    RT_BIT(0)
+#define SMBHSTCFG_INTRSEL       (RT_BIT(1) | RT_BIT(2) | RT_BIT(3))
+#define SMBHSTCFG_INTRSEL_SMI   0
+#define SMBHSTCFG_INTRSEL_IRQ9  4
+#define SMBHSTCFG_INTRSEL_SHIFT 1
+
+/** Default base for SMBus PIIX4 device */
+#define SMB_PORT_BASE   0x4100
+
+/** SMBus Host Status Register I/O offset */
+#define SMBHSTSTS_OFF   0x0000
+/** SMBus Slave Status Register I/O offset */
+#define SMBSLVSTS_OFF   0x0001
+/** SMBus Host Count Register I/O offset */
+#define SMBHSTCNT_OFF   0x0002
+/** SMBus Host Command Register I/O offset */
+#define SMBHSTCMD_OFF   0x0003
+/** SMBus Host Address Register I/O offset */
+#define SMBHSTADD_OFF   0x0004
+/** SMBus Host Data 0 Register I/O offset */
+#define SMBHSTDAT0_OFF  0x0005
+/** SMBus Host Data 1 Register I/O offset */
+#define SMBHSTDAT1_OFF  0x0006
+/** SMBus Block Data Register I/O offset */
+#define SMBBLKDAT_OFF   0x0007
+/** SMBus Slave Control Register I/O offset */
+#define SMBSLVCNT_OFF   0x0008
+/** SMBus Shadow Command Register I/O offset */
+#define SMBSHDWCMD_OFF  0x0009
+/** SMBus Slave Event Register I/O offset */
+#define SMBSLVEVT_OFF   0x000a
+/** SMBus Slave Data Register I/O offset */
+#define SMBSLVDAT_OFF   0x000c
+
+#define SMBHSTSTS_HOST_BUSY RT_BIT(0)
+#define SMBHSTSTS_INTER     RT_BIT(1)
+#define SMBHSTSTS_DEV_ERR   RT_BIT(2)
+#define SMBHSTSTS_BUS_ERR   RT_BIT(3)
+#define SMBHSTSTS_FAILED    RT_BIT(4)
+#define SMBHSTSTS_INT_MASK  (SMBHSTSTS_INTER | SMBHSTSTS_DEV_ERR | SMBHSTSTS_BUS_ERR | SMBHSTSTS_FAILED)
+
+#define SMBSLVSTS_WRITE_MASK 0x3c
+
+#define SMBHSTCNT_INTEREN   RT_BIT(0)
+#define SMBHSTCNT_KILL      RT_BIT(1)
+#define SMBHSTCNT_CMD_PROT  (RT_BIT(2) | RT_BIT(3) | RT_BIT(4))
+#define SMBHSTCNT_START     RT_BIT(6)
+#define SMBHSTCNT_WRITE_MASK (SMBHSTCNT_INTEREN | SMBHSTCNT_KILL | SMBHSTCNT_CMD_PROT)
+
+#define SMBSLVCNT_WRITE_MASK (RT_BIT(0) | RT_BIT(1) | RT_BIT(2) | RT_BIT(3))
+
 
 /*********************************************************************************************************************************
 *   Structures and Typedefs                                                                                                      *
@@ -270,6 +339,8 @@ typedef struct ACPIState
     bool                fShowRtc;
     /** I/O port address of PM device. */
     RTIOPORT            uPmIoPortBase;
+    /** I/O port address of SMBus device. */
+    RTIOPORT            uSMBusIoPortBase;
     /** Flag whether the GC part of the device is enabled. */
     bool                fGCEnabled;
     /** Flag whether the R0 part of the device is enabled. */
@@ -304,6 +375,9 @@ typedef struct ACPIState
     uint32_t            u32IocPciAddress;
     /** PCI address of the host bus controller device. */
     uint32_t            u32HbcPciAddress;
+
+    uint32_t            Alignment1;
+
     /* Physical address of PCI config space MMIO region */
     uint64_t            u64PciConfigMMioAddress;
     /* Length of PCI config space MMIO region */
@@ -337,7 +411,7 @@ typedef struct ACPIState
     RTIOPORT            uParallel1IoPortBase;
     /** @} */
 
-    uint32_t            u32Alignment1;
+    uint32_t            Alignment2;
 
     /** ACPI port base interface. */
     PDMIBASE            IBase;
@@ -348,7 +422,7 @@ typedef struct ACPIState
     PPDMDEVINSR0        pDevInsR0;
     PPDMDEVINSRC        pDevInsRC;
 
-    uint32_t            Alignment2;
+    uint32_t            Alignment3;
     /** Pointer to the driver base interface. */
     R3PTRTYPE(PPDMIBASE) pDrvBase;
     /** Pointer to the driver connector interface. */
@@ -371,12 +445,39 @@ typedef struct ACPIState
     uint8_t             au8OemTabId[8];
     /** ACPI custom OEM Rev */
     uint32_t            u32OemRevision;
-    uint32_t            Alignment3;
+    uint32_t            Alignment4;
 
     /** The custom table binary data. */
     R3PTRTYPE(uint8_t *) pu8CustBin;
     /** The size of the custom table binary. */
     uint64_t            cbCustBin;
+
+    /** SMBus Host Status Register */
+    uint8_t             u8SMBusHstSts;
+    /** SMBus Slave Status Register */
+    uint8_t             u8SMBusSlvSts;
+    /** SMBus Host Control Register */
+    uint8_t             u8SMBusHstCnt;
+    /** SMBus Host Command Register */
+    uint8_t             u8SMBusHstCmd;
+    /** SMBus Host Address Register */
+    uint8_t             u8SMBusHstAdd;
+    /** SMBus Host Data 0 Register */
+    uint8_t             u8SMBusHstDat0;
+    /** SMBus Host Data 1 Register */
+    uint8_t             u8SMBusHstDat1;
+    /** SMBus Slave Control Register */
+    uint8_t             u8SMBusSlvCnt;
+    /** SMBus Shadow Command Register */
+    uint8_t             u8SMBusShdwCmd;
+    /** SMBus Slave Event Register */
+    uint16_t            u16SMBusSlvEvt;
+    /** SMBus Slave Data Register */
+    uint16_t            u16SMBusSlvDat;
+    /** SMBus Host Block Data Buffer */
+    uint8_t             au8SMBusBlkDat[32];
+    /** SMBus Host Block Index */
+    uint8_t             u8SMBusBlkIdx;
 } ACPIState;
 
 #pragma pack(1)
@@ -671,31 +772,34 @@ RT_C_DECLS_END
 static int acpiR3PlantTables(ACPIState *pThis);
 #endif
 
-/* SCI IRQ */
+/* SCI, usually IRQ9 */
 DECLINLINE(void) acpiSetIrq(ACPIState *pThis, int level)
 {
-    if (pThis->pm1a_ctl & SCI_EN)
-        PDMDevHlpPCISetIrq(pThis->CTX_SUFF(pDevIns), 0, level);
+    PDMDevHlpPCISetIrq(pThis->CTX_SUFF(pDevIns), 0, level);
 }
 
-DECLINLINE(uint32_t) pm1a_pure_en(uint32_t en)
+DECLINLINE(bool) pm1a_level(ACPIState *pThis)
 {
-    return en & ~(RSR_EN | IGN_EN);
+    return    (pThis->pm1a_ctl & SCI_EN)
+           && (pThis->pm1a_en & pThis->pm1a_sts & ~(RSR_EN | IGN_EN));
 }
 
-DECLINLINE(uint32_t) pm1a_pure_sts(uint32_t sts)
+DECLINLINE(bool) gpe0_level(ACPIState *pThis)
 {
-    return sts & ~(RSR_STS | IGN_STS);
+    return !!(pThis->gpe0_en & pThis->gpe0_sts);
 }
 
-DECLINLINE(int) pm1a_level(ACPIState *pThis)
+DECLINLINE(bool) smbus_level(ACPIState *pThis)
 {
-    return (pm1a_pure_en(pThis->pm1a_en) & pm1a_pure_sts(pThis->pm1a_sts)) != 0;
+    return    (pThis->u8SMBusHstCnt & SMBHSTCNT_INTEREN)
+           && (pThis->dev.config[SMBHSTCFG] & SMBHSTCFG_SMB_HST_EN)
+           && (pThis->dev.config[SMBHSTCFG] & SMBHSTCFG_INTRSEL) == SMBHSTCFG_INTRSEL_IRQ9 << SMBHSTCFG_INTRSEL_SHIFT
+           && (pThis->u8SMBusHstSts & SMBHSTSTS_INT_MASK);
 }
 
-DECLINLINE(bool) gpe0_level(ACPIState *pThis)
+DECLINLINE(bool) acpiSCILevel(ACPIState *pThis)
 {
-    return (pThis->gpe0_en & pThis->gpe0_sts) != 0;
+    return pm1a_level(pThis) || gpe0_level(pThis) || smbus_level(pThis);
 }
 
 /**
@@ -714,16 +818,12 @@ static void apicUpdatePm1a(ACPIState *pThis, uint32_t sts, uint32_t en)
 {
     Assert(PDMCritSectIsOwner(&pThis->CritSect));
 
-    if (gpe0_level(pThis))
-        return;
-
-    int const old_level = pm1a_level(pThis);
-    int const new_level = (pm1a_pure_en(en) & pm1a_pure_sts(sts)) != 0;
-
-    Log(("apicUpdatePm1a() old=%x new=%x\n", old_level, new_level));
-
+    const bool old_level = acpiSCILevel(pThis);
     pThis->pm1a_en = en;
     pThis->pm1a_sts = sts;
+    const bool new_level = acpiSCILevel(pThis);
+
+    LogFunc(("old=%x new=%x\n", old_level, new_level));
 
     if (new_level != old_level)
         acpiSetIrq(pThis, new_level);
@@ -745,14 +845,12 @@ static void apicR3UpdateGpe0(ACPIState *pThis, uint32_t sts, uint32_t en)
 {
     Assert(PDMCritSectIsOwner(&pThis->CritSect));
 
-    if (pm1a_level(pThis))
-        return;
-
-    int const old_level = gpe0_level(pThis);
-    int const new_level = (en & sts) != 0;
-
+    const bool old_level = acpiSCILevel(pThis);
     pThis->gpe0_en  = en;
     pThis->gpe0_sts = sts;
+    const bool new_level = acpiSCILevel(pThis);
+
+    LogFunc(("old=%x new=%x\n", old_level, new_level));
 
     if (new_level != old_level)
         acpiSetIrq(pThis, new_level);
@@ -1293,7 +1391,7 @@ PDMBOTHCBDECL(int) acpiR3SysInfoDataRead(PPDMDEVINS pDevIns, void *pvUser, RTIOP
 
         case SYSTEM_INFO_INDEX_PCI_LENGTH:
             /** @todo couldn't MCFG be in 64-bit range? */
-            Assert(pThis->u64PciConfigMMioLength< 0xffffffff);
+            Assert(pThis->u64PciConfigMMioLength < 0xffffffff);
             *pu32 = (uint32_t)pThis->u64PciConfigMMioLength;
             break;
 
@@ -1822,6 +1920,19 @@ PDMBOTHCBDECL(int) acpiR3DchrWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Po
 # endif /* DEBUG_ACPI */
 
 /**
+ * Called by acpiR3Reset and acpiR3Construct to set up the PM PCI config space.
+ *
+ * @param   pThis               The ACPI instance.
+ */
+static void acpiR3PmPCIBIOSFake(ACPIState *pThis)
+{
+    pThis->dev.config[PMBA  ] = pThis->uPmIoPortBase | 1; /* PMBA, PM base address, bit 0 marks it as IO range */
+    pThis->dev.config[PMBA+1] = pThis->uPmIoPortBase >> 8;
+    pThis->dev.config[PMBA+2] = 0x00;
+    pThis->dev.config[PMBA+3] = 0x00;
+}
+
+/**
  * Used to calculate the value of a PM I/O port.
  *
  * @returns The actual I/O port value.
@@ -1847,12 +1958,13 @@ static RTIOPORT acpiR3CalcPmPort(ACPIState *pThis, int32_t offset)
  */
 static int acpiR3RegisterPmHandlers(ACPIState *pThis)
 {
-    int   rc = VINF_SUCCESS;
+    if (pThis->uPmIoPortBase == 0)
+        return VINF_SUCCESS;
 
 #define R(offset, cnt, writer, reader, description) \
     do { \
-        rc = PDMDevHlpIOPortRegister(pThis->pDevInsR3, acpiR3CalcPmPort(pThis, offset), cnt, pThis, writer, reader, \
-                                      NULL, NULL, description); \
+        int rc = PDMDevHlpIOPortRegister(pThis->pDevInsR3, acpiR3CalcPmPort(pThis, offset), cnt, pThis, writer, reader, \
+                                         NULL, NULL, description); \
         if (RT_FAILURE(rc)) \
             return rc; \
     } while (0)
@@ -1870,22 +1982,22 @@ static int acpiR3RegisterPmHandlers(ACPIState *pThis)
     /* register RC stuff */
     if (pThis->fGCEnabled)
     {
-        rc = PDMDevHlpIOPortRegisterRC(pThis->pDevInsR3, acpiR3CalcPmPort(pThis, PM_TMR_OFFSET),
-                                       1, 0, NULL, "acpiPMTmrRead",
-                                       NULL, NULL, "ACPI PM Timer");
+        int rc = PDMDevHlpIOPortRegisterRC(pThis->pDevInsR3, acpiR3CalcPmPort(pThis, PM_TMR_OFFSET),
+                                           1, 0, NULL, "acpiPMTmrRead",
+                                           NULL, NULL, "ACPI PM Timer");
         AssertRCReturn(rc, rc);
     }
 
     /* register R0 stuff */
     if (pThis->fR0Enabled)
     {
-        rc = PDMDevHlpIOPortRegisterR0(pThis->pDevInsR3, acpiR3CalcPmPort(pThis, PM_TMR_OFFSET),
-                                       1, 0, NULL, "acpiPMTmrRead",
-                                       NULL, NULL, "ACPI PM Timer");
+        int rc = PDMDevHlpIOPortRegisterR0(pThis->pDevInsR3, acpiR3CalcPmPort(pThis, PM_TMR_OFFSET),
+                                           1, 0, NULL, "acpiPMTmrRead",
+                                           NULL, NULL, "ACPI PM Timer");
         AssertRCReturn(rc, rc);
     }
 
-    return rc;
+    return VINF_SUCCESS;
 }
 
 /**
@@ -1897,6 +2009,9 @@ static int acpiR3RegisterPmHandlers(ACPIState *pThis)
  */
 static int acpiR3UnregisterPmHandlers(ACPIState *pThis)
 {
+    if (pThis->uPmIoPortBase == 0)
+        return VINF_SUCCESS;
+
 #define U(offset, cnt) \
     do { \
         int rc = PDMDevHlpIOPortDeregister(pThis->pDevInsR3, acpiR3CalcPmPort(pThis, offset), cnt); \
@@ -1950,6 +2065,274 @@ static int acpiR3UpdatePmHandlers(ACPIState *pThis, RTIOPORT NewIoPortBase)
     return VINF_SUCCESS;
 }
 
+/**
+ * @callback_method_impl{FNIOMIOPORTOUT, SMBus}
+ */
+PDMBOTHCBDECL(int) acpiR3SMBusWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb)
+{
+    ACPIState *pThis = (ACPIState *)pvUser;
+    DEVACPI_LOCK_R3(pThis);
+
+    LogFunc(("Port=%#x u32=%#x cb=%u\n", Port, u32, cb));
+    uint8_t off = Port & 0x000f;
+    if (   (cb != 1 && off <= SMBSHDWCMD_OFF)
+        || (cb != 2 && (off == SMBSLVEVT_OFF || off == SMBSLVDAT_OFF)))
+        return PDMDevHlpDBGFStop(pDevIns, RT_SRC_POS, "cb=%d Port=%u u32=%#x\n", cb, Port, u32);
+
+    switch (off)
+    {
+        case SMBHSTSTS_OFF:
+            /* Bit 0 is readonly, bits 1..4 are write clear, bits 5..7 are reserved */
+            pThis->u8SMBusHstSts &= ~(u32 & SMBHSTSTS_INT_MASK);
+            break;
+        case SMBSLVSTS_OFF:
+            /* Bit 0 is readonly, bit 1 is reserved, bits 2..5 are write clear, bits 6..7 are reserved */
+            pThis->u8SMBusSlvSts &= ~(u32 & SMBSLVSTS_WRITE_MASK);
+            break;
+        case SMBHSTCNT_OFF:
+        {
+            Assert(PDMCritSectIsOwner(&pThis->CritSect));
+
+            const bool old_level = acpiSCILevel(pThis);
+            pThis->u8SMBusHstCnt = u32 & SMBHSTCNT_WRITE_MASK;
+            if (u32 & SMBHSTCNT_START)
+            {
+                /* Start, trigger error as this is a dummy implementation */
+                pThis->u8SMBusHstSts |= SMBHSTSTS_DEV_ERR | SMBHSTSTS_INTER;
+            }
+            if (u32 & SMBHSTCNT_KILL)
+            {
+                /* Kill */
+                pThis->u8SMBusHstSts |= SMBHSTSTS_FAILED | SMBHSTSTS_INTER;
+            }
+            const bool new_level = acpiSCILevel(pThis);
+
+            LogFunc(("old=%x new=%x\n", old_level, new_level));
+
+            /* This handles only SCI/IRQ9. SMI# makes not much sense today and
+             * needs to be implemented later if it ever becomes relevant. */
+            if (new_level != old_level)
+                acpiSetIrq(pThis, new_level);
+            break;
+        }
+        case SMBHSTCMD_OFF:
+            pThis->u8SMBusHstCmd = u32;
+            break;
+        case SMBHSTADD_OFF:
+            pThis->u8SMBusHstAdd = u32;
+            break;
+        case SMBHSTDAT0_OFF:
+            pThis->u8SMBusHstDat0 = u32;
+            break;
+        case SMBHSTDAT1_OFF:
+            pThis->u8SMBusHstDat1 = u32;
+            break;
+        case SMBBLKDAT_OFF:
+            pThis->au8SMBusBlkDat[pThis->u8SMBusBlkIdx] = u32;
+            pThis->u8SMBusBlkIdx++;
+            pThis->u8SMBusBlkIdx &= sizeof(pThis->au8SMBusBlkDat) - 1;
+            break;
+        case SMBSLVCNT_OFF:
+            pThis->u8SMBusSlvCnt = u32 & SMBSLVCNT_WRITE_MASK;
+            break;
+        case SMBSHDWCMD_OFF:
+            /* readonly register */
+            break;
+        case SMBSLVEVT_OFF:
+            pThis->u16SMBusSlvEvt = u32;
+            break;
+        case SMBSLVDAT_OFF:
+            /* readonly register */
+            break;
+        default:
+            /* caught by the sanity check above */
+            ;
+    }
+
+    DEVACPI_UNLOCK(pThis);
+    return VINF_SUCCESS;
+}
+
+/**
+ * @callback_method_impl{FNIOMIOPORTIN, SMBus}
+ */
+PDMBOTHCBDECL(int) acpiR3SMBusRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb)
+{
+    RT_NOREF1(pDevIns);
+    ACPIState *pThis = (ACPIState *)pvUser;
+    DEVACPI_LOCK_R3(pThis);
+
+    int rc = VINF_SUCCESS;
+    LogFunc(("Port=%#x cb=%u\n", Port, cb));
+    uint8_t off = Port & 0x000f;
+    if (   (cb != 1 && off <= SMBSHDWCMD_OFF)
+        || (cb != 2 && (off == SMBSLVEVT_OFF || off == SMBSLVDAT_OFF)))
+        return VERR_IOM_IOPORT_UNUSED;
+
+    switch (off)
+    {
+        case SMBHSTSTS_OFF:
+            *pu32 = pThis->u8SMBusHstSts;
+            break;
+        case SMBSLVSTS_OFF:
+            *pu32 = pThis->u8SMBusSlvSts;
+            break;
+        case SMBHSTCNT_OFF:
+            pThis->u8SMBusBlkIdx = 0;
+            *pu32 = pThis->u8SMBusHstCnt;
+            break;
+        case SMBHSTCMD_OFF:
+            *pu32 = pThis->u8SMBusHstCmd;
+            break;
+        case SMBHSTADD_OFF:
+            *pu32 = pThis->u8SMBusHstAdd;
+            break;
+        case SMBHSTDAT0_OFF:
+            *pu32 = pThis->u8SMBusHstDat0;
+            break;
+        case SMBHSTDAT1_OFF:
+            *pu32 = pThis->u8SMBusHstDat1;
+            break;
+        case SMBBLKDAT_OFF:
+            *pu32 = pThis->au8SMBusBlkDat[pThis->u8SMBusBlkIdx];
+            pThis->u8SMBusBlkIdx++;
+            pThis->u8SMBusBlkIdx &= sizeof(pThis->au8SMBusBlkDat) - 1;
+            break;
+        case SMBSLVCNT_OFF:
+            *pu32 = pThis->u8SMBusSlvCnt;
+            break;
+        case SMBSHDWCMD_OFF:
+            *pu32 = pThis->u8SMBusShdwCmd;
+            break;
+        case SMBSLVEVT_OFF:
+            *pu32 = pThis->u16SMBusSlvEvt;
+            break;
+        case SMBSLVDAT_OFF:
+            *pu32 = pThis->u16SMBusSlvDat;
+            break;
+        default:
+            /* caught by the sanity check above */
+            rc = VERR_IOM_IOPORT_UNUSED;
+    }
+
+    DEVACPI_UNLOCK(pThis);
+    LogFunc(("Port=%#x u32=%#x cb=%u rc=%Rrc\n", Port, *pu32, cb, rc));
+    return rc;
+}
+
+/**
+ * Called by acpiR3Reset and acpiR3Construct to set up the SMBus PCI config space.
+ *
+ * @param   pThis           The ACPI instance.
+ */
+static void acpiR3SMBusPCIBIOSFake(ACPIState *pThis)
+{
+    pThis->dev.config[SMBBA  ] = pThis->uSMBusIoPortBase | 1; /* SMBBA, SMBus base address, bit 0 marks it as IO range */
+    pThis->dev.config[SMBBA+1] = pThis->uSMBusIoPortBase >> 8;
+    pThis->dev.config[SMBBA+2] = 0x00;
+    pThis->dev.config[SMBBA+3] = 0x00;
+    pThis->dev.config[SMBHSTCFG] = SMBHSTCFG_INTRSEL_IRQ9 << SMBHSTCFG_INTRSEL_SHIFT | SMBHSTCFG_SMB_HST_EN; /* SMBHSTCFG */
+    pThis->dev.config[SMBSLVC] = 0x00; /* SMBSLVC */
+    pThis->dev.config[SMBSHDW1] = 0x00; /* SMBSHDW1 */
+    pThis->dev.config[SMBSHDW2] = 0x00; /* SMBSHDW2 */
+    pThis->dev.config[SMBREV] = 0x00; /* SMBREV */
+}
+
+/**
+ * Called by acpiR3LoadState, acpiR3Reset and acpiR3Construct to reset the SMBus device register state.
+ *
+ * @param   pThis           The ACPI instance.
+ */
+static void acpiR3SMBusResetDevice(ACPIState *pThis)
+{
+    pThis->u8SMBusHstSts = 0x00;
+    pThis->u8SMBusSlvSts = 0x00;
+    pThis->u8SMBusHstCnt = 0x00;
+    pThis->u8SMBusHstCmd = 0x00;
+    pThis->u8SMBusHstAdd = 0x00;
+    pThis->u8SMBusHstDat0 = 0x00;
+    pThis->u8SMBusHstDat1 = 0x00;
+    pThis->u8SMBusSlvCnt = 0x00;
+    pThis->u8SMBusShdwCmd = 0x00;
+    pThis->u16SMBusSlvEvt = 0x0000;
+    pThis->u16SMBusSlvDat = 0x0000;
+    memset(pThis->au8SMBusBlkDat, 0x00, sizeof(pThis->au8SMBusBlkDat));
+    pThis->u8SMBusBlkIdx = 0;
+}
+
+/**
+ * Called by acpiR3LoadState and acpiR3UpdateSMBusHandlers to register the SMBus ports.
+ *
+ * @returns VBox status code.
+ * @param   pThis           The ACPI instance.
+ */
+static int acpiR3RegisterSMBusHandlers(ACPIState *pThis)
+{
+    int   rc = VINF_SUCCESS;
+
+    if (pThis->uSMBusIoPortBase == 0)
+        return VINF_SUCCESS;
+
+    rc = PDMDevHlpIOPortRegister(pThis->pDevInsR3, pThis->uSMBusIoPortBase, 16, pThis, acpiR3SMBusWrite, acpiR3SMBusRead, NULL, NULL, "SMBus");
+    if (RT_FAILURE(rc))
+        return rc;
+
+    return VINF_SUCCESS;
+}
+
+/**
+ * Called by acpiR3LoadState and acpiR3UpdateSMBusHandlers to unregister the SMBus ports.
+ *
+ * @returns VBox status code.
+ * @param   pThis           The ACPI instance.
+ */
+static int acpiR3UnregisterSMBusHandlers(ACPIState *pThis)
+{
+    if (pThis->uSMBusIoPortBase == 0)
+        return VINF_SUCCESS;
+
+    int rc = PDMDevHlpIOPortDeregister(pThis->pDevInsR3, pThis->uSMBusIoPortBase, 16);
+    AssertRCReturn(rc, rc);
+
+    return VINF_SUCCESS;
+}
+
+/**
+ * Called by acpiR3PciConfigWrite and acpiReset to change the location of the
+ * SMBus ports.
+ *
+ * @returns VBox status code.
+ *
+ * @param   pThis           The ACPI instance.
+ * @param   NewIoPortBase   The new base address of the I/O ports.
+ */
+static int acpiR3UpdateSMBusHandlers(ACPIState *pThis, RTIOPORT NewIoPortBase)
+{
+    Log(("acpi: rebasing SMBus 0x%x -> 0x%x\n", pThis->uSMBusIoPortBase, NewIoPortBase));
+    if (NewIoPortBase != pThis->uSMBusIoPortBase)
+    {
+        int rc = acpiR3UnregisterSMBusHandlers(pThis);
+        if (RT_FAILURE(rc))
+            return rc;
+
+        pThis->uSMBusIoPortBase = NewIoPortBase;
+
+        rc = acpiR3RegisterSMBusHandlers(pThis);
+        if (RT_FAILURE(rc))
+            return rc;
+
+#if 0 /* is there an FADT table entry for the SMBus base? */
+        /* We have to update FADT table acccording to the new base */
+        rc = acpiR3PlantTables(pThis);
+        AssertRC(rc);
+        if (RT_FAILURE(rc))
+            return rc;
+#endif
+    }
+
+    return VINF_SUCCESS;
+}
+
 
 /**
  * Saved state structure description, version 4.
@@ -2032,12 +2415,47 @@ static const SSMFIELD g_AcpiSavedStateFields7[] =
 };
 
 /**
+ * Saved state structure description, version 8.
+ */
+static const SSMFIELD g_AcpiSavedStateFields8[] =
+{
+    SSMFIELD_ENTRY(ACPIState, pm1a_en),
+    SSMFIELD_ENTRY(ACPIState, pm1a_sts),
+    SSMFIELD_ENTRY(ACPIState, pm1a_ctl),
+    SSMFIELD_ENTRY(ACPIState, u64PmTimerInitial),
+    SSMFIELD_ENTRY(ACPIState, uPmTimerVal),
+    SSMFIELD_ENTRY(ACPIState, gpe0_en),
+    SSMFIELD_ENTRY(ACPIState, gpe0_sts),
+    SSMFIELD_ENTRY(ACPIState, uBatteryIndex),
+    SSMFIELD_ENTRY(ACPIState, uSystemInfoIndex),
+    SSMFIELD_ENTRY(ACPIState, uSleepState),
+    SSMFIELD_ENTRY(ACPIState, u8IndexShift),
+    SSMFIELD_ENTRY(ACPIState, uPmIoPortBase),
+    SSMFIELD_ENTRY(ACPIState, fSuspendToSavedState),
+    SSMFIELD_ENTRY(ACPIState, uSMBusIoPortBase),
+    SSMFIELD_ENTRY(ACPIState, u8SMBusHstSts),
+    SSMFIELD_ENTRY(ACPIState, u8SMBusSlvSts),
+    SSMFIELD_ENTRY(ACPIState, u8SMBusHstCnt),
+    SSMFIELD_ENTRY(ACPIState, u8SMBusHstCmd),
+    SSMFIELD_ENTRY(ACPIState, u8SMBusHstAdd),
+    SSMFIELD_ENTRY(ACPIState, u8SMBusHstDat0),
+    SSMFIELD_ENTRY(ACPIState, u8SMBusHstDat1),
+    SSMFIELD_ENTRY(ACPIState, u8SMBusSlvCnt),
+    SSMFIELD_ENTRY(ACPIState, u8SMBusShdwCmd),
+    SSMFIELD_ENTRY(ACPIState, u16SMBusSlvEvt),
+    SSMFIELD_ENTRY(ACPIState, u16SMBusSlvDat),
+    SSMFIELD_ENTRY(ACPIState, au8SMBusBlkDat),
+    SSMFIELD_ENTRY(ACPIState, u8SMBusBlkIdx),
+    SSMFIELD_ENTRY_TERM()
+};
+
+/**
  * @callback_method_impl{FNSSMDEVSAVEEXEC}
  */
 static DECLCALLBACK(int) acpiR3SaveState(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
 {
     ACPIState *pThis = PDMINS_2_DATA(pDevIns, ACPIState *);
-    return SSMR3PutStruct(pSSM, pThis, &g_AcpiSavedStateFields7[0]);
+    return SSMR3PutStruct(pSSM, pThis, &g_AcpiSavedStateFields8[0]);
 }
 
 /**
@@ -2056,6 +2474,15 @@ static DECLCALLBACK(int) acpiR3LoadState(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, ui
     if (RT_FAILURE(rc))
         return rc;
 
+    /*
+     * Unregister SMBus handlers, will register with actual base after state
+     * successfully loaded.
+     */
+    rc = acpiR3UnregisterSMBusHandlers(pThis);
+    if (RT_FAILURE(rc))
+        return rc;
+    acpiR3SMBusResetDevice(pThis);
+
     switch (uVersion)
     {
         case 4:
@@ -2070,6 +2497,9 @@ static DECLCALLBACK(int) acpiR3LoadState(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, ui
         case 7:
             rc = SSMR3GetStruct(pSSM, pThis, &g_AcpiSavedStateFields7[0]);
             break;
+        case 8:
+            rc = SSMR3GetStruct(pSSM, pThis, &g_AcpiSavedStateFields8[0]);
+            break;
         default:
             rc = VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION;
             break;
@@ -2079,6 +2509,9 @@ static DECLCALLBACK(int) acpiR3LoadState(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, ui
         rc = acpiR3RegisterPmHandlers(pThis);
         if (RT_FAILURE(rc))
             return rc;
+        rc = acpiR3RegisterSMBusHandlers(pThis);
+        if (RT_FAILURE(rc))
+            return rc;
         rc = acpiR3FetchBatteryStatus(pThis);
         if (RT_FAILURE(rc))
             return rc;
@@ -2860,18 +3293,36 @@ static DECLCALLBACK(void) acpiR3PciConfigWrite(PPCIDEVICE pPciDev, uint32_t Addr
 
     pThis->pfnAcpiPciConfigWrite(pPciDev, Address, u32Value, cb);
 
-    /* PMREGMISC written */
-    if (Address == 0x80)
+    /* Assume that the base address is only changed when the corresponding
+     * hardware functionality is disabled. The IO region is mapped when the
+     * functionality is enabled by the guest. */
+
+    if (Address == PMREGMISC)
     {
+        RTIOPORT NewIoPortBase = 0;
         /* Check Power Management IO Space Enable (PMIOSE) bit */
-        if (pPciDev->config[0x80] & 0x1)
+        if (pPciDev->config[PMREGMISC] & 0x01)
         {
-            RTIOPORT NewIoPortBase = (RTIOPORT)PCIDevGetDWord(pPciDev, 0x40);
+            NewIoPortBase = (RTIOPORT)PCIDevGetDWord(pPciDev, PMBA);
             NewIoPortBase &= 0xffc0;
+        }
 
-            int rc = acpiR3UpdatePmHandlers(pThis, NewIoPortBase);
-            AssertRC(rc);
+        int rc = acpiR3UpdatePmHandlers(pThis, NewIoPortBase);
+        AssertRC(rc);
+    }
+
+    if (Address == SMBHSTCFG)
+    {
+        RTIOPORT NewIoPortBase = 0;
+        /* Check SMBus Controller Host Interface Enable (SMB_HST_EN) bit */
+        if (pPciDev->config[SMBHSTCFG] & SMBHSTCFG_SMB_HST_EN)
+        {
+            NewIoPortBase = (RTIOPORT)PCIDevGetDWord(pPciDev, SMBBA);
+            NewIoPortBase &= 0xfff0;
         }
+
+        int rc = acpiR3UpdateSMBusHandlers(pThis, NewIoPortBase);
+        AssertRC(rc);
     }
 
     DEVACPI_UNLOCK(pThis);
@@ -2980,6 +3431,7 @@ static DECLCALLBACK(void) acpiR3Resume(PPDMDEVINS pDevIns)
  */
 static DECLCALLBACK(void) acpiR3MemSetup(PPDMDEVINS pDevIns, PDMDEVMEMSETUPCTX enmCtx)
 {
+    RT_NOREF1(enmCtx);
     ACPIState *pThis = PDMINS_2_DATA(pDevIns, ACPIState *);
     acpiR3PlantTables(pThis);
 }
@@ -2991,6 +3443,9 @@ static DECLCALLBACK(void) acpiR3Reset(PPDMDEVINS pDevIns)
 {
     ACPIState *pThis = PDMINS_2_DATA(pDevIns, ACPIState *);
 
+    /* Play safe: make sure that the IRQ isn't stuck after a reset. */
+    acpiSetIrq(pThis, 0);
+
     TMTimerLock(pThis->pPmTimerR3, VERR_IGNORED);
     pThis->pm1a_en           = 0;
     pThis->pm1a_sts          = 0;
@@ -3005,8 +3460,17 @@ static DECLCALLBACK(void) acpiR3Reset(PPDMDEVINS pDevIns)
     pThis->uSleepState       = 0;
     TMTimerUnlock(pThis->pPmTimerR3);
 
-    /** @todo Should we really reset PM base? */
+    /* Real device behavior is resetting only the PM controller state,
+     * but we're additionally doing the job of the BIOS. */
     acpiR3UpdatePmHandlers(pThis, PM_PORT_BASE);
+    acpiR3PmPCIBIOSFake(pThis);
+
+    /* Reset SMBus base and PCI config space in addition to the SMBus controller
+     * state. Real device behavior is only the SMBus controller state reset,
+     * but we're additionally doing the job of the BIOS. */
+    acpiR3UpdateSMBusHandlers(pThis, SMB_PORT_BASE);
+    acpiR3SMBusPCIBIOSFake(pThis);
+    acpiR3SMBusResetDevice(pThis);
 }
 
 /**
@@ -3442,9 +3906,12 @@ static DECLCALLBACK(int) acpiR3Construct(PPDMDEVINS pDevIns, int iInstance, PCFG
                                     N_("Error reading custom ACPI table"));
     }
 
-    /* Set default port base */
+    /* Set default PM port base */
     pThis->uPmIoPortBase = PM_PORT_BASE;
 
+    /* Set default SMBus port base */
+    pThis->uSMBusIoPortBase = SMB_PORT_BASE;
+
     /*
      * FDC and SMC try to use the same non-shareable interrupt (6),
      * enable only one device.
@@ -3479,6 +3946,10 @@ static DECLCALLBACK(int) acpiR3Construct(PPDMDEVINS pDevIns, int iInstance, PCFG
     if (RT_FAILURE(rc))
         return rc;
 
+    rc = acpiR3RegisterSMBusHandlers(pThis);
+    if (RT_FAILURE(rc))
+        return rc;
+
 #define R(addr, cnt, writer, reader, description)       \
     do { \
         rc = PDMDevHlpIOPortRegister(pDevIns, addr, cnt, pThis, writer, reader, \
@@ -3538,13 +4009,12 @@ static DECLCALLBACK(int) acpiR3Construct(PPDMDEVINS pDevIns, int iInstance, PCFG
     PCIDevSetInterruptLine(&pThis->dev, SCI_INT);
     PCIDevSetInterruptPin (&pThis->dev, 0x01);
 
-    pThis->dev.config[0x40] = 0x01; /* PM base address, this bit marks it as IO range, not PA */
+    Assert((pThis->uPmIoPortBase & 0x003f) == 0);
+    acpiR3PmPCIBIOSFake(pThis);
 
-#if 0
-    int smb_io_base = 0xb100;
-    dev->config[0x90] = smb_io_base | 1; /* SMBus base address */
-    dev->config[0x90] = smb_io_base >> 8;
-#endif
+    Assert((pThis->uSMBusIoPortBase & 0x000f) == 0);
+    acpiR3SMBusPCIBIOSFake(pThis);
+    acpiR3SMBusResetDevice(pThis);
 
     rc = PDMDevHlpPCIRegister(pDevIns, &pThis->dev);
     if (RT_FAILURE(rc))
@@ -3557,7 +4027,7 @@ static DECLCALLBACK(int) acpiR3Construct(PPDMDEVINS pDevIns, int iInstance, PCFG
     /*
      * Register the saved state.
      */
-    rc = PDMDevHlpSSMRegister(pDevIns, 7, sizeof(*pThis), acpiR3SaveState, acpiR3LoadState);
+    rc = PDMDevHlpSSMRegister(pDevIns, 8, sizeof(*pThis), acpiR3SaveState, acpiR3LoadState);
     if (RT_FAILURE(rc))
         return rc;
 
diff --git a/src/VBox/Devices/PC/DevAPIC.cpp b/src/VBox/Devices/PC/DevAPIC.cpp
index 4018ddd..3d3ac86 100644
--- a/src/VBox/Devices/PC/DevAPIC.cpp
+++ b/src/VBox/Devices/PC/DevAPIC.cpp
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -2358,8 +2358,9 @@ static DECLCALLBACK(int) apicR3Construct(PPDMDEVINS pDevIns, int iInstance, PCFG
 
     /*
      * Validate configuration.
+     * "Mode" is ignored (used by newer APIC code).
      */
-    PDMDEV_VALIDATE_CONFIG_RETURN(pDevIns, "IOAPIC|RZEnabled|NumCPUs", "");
+    PDMDEV_VALIDATE_CONFIG_RETURN(pDevIns, "IOAPIC|RZEnabled|NumCPUs|Mode", "");
 
     bool fIoApic;
     int rc = CFGMR3QueryBoolDef(pCfg, "IOAPIC", &fIoApic, true);
diff --git a/src/VBox/Devices/PC/DevApic.h b/src/VBox/Devices/PC/DevApic.h
index 624c22c..447a76b 100644
--- a/src/VBox/Devices/PC/DevApic.h
+++ b/src/VBox/Devices/PC/DevApic.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/PC/DevDMA.cpp b/src/VBox/Devices/PC/DevDMA.cpp
index 4e38708..f4a0942 100644
--- a/src/VBox/Devices/PC/DevDMA.cpp
+++ b/src/VBox/Devices/PC/DevDMA.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -191,9 +191,11 @@ enum {
 /* Convert DMA channel number (0-7) to controller number (0-1). */
 #define DMACH2C(c)      (c < 4 ? 0 : 1)
 
+#ifdef LOG_ENABLED
 static int dmaChannelMap[8] = {-1, 2, 3, 1, -1, -1, -1, 0};
 /* Map a DMA page register offset (0-7) to channel index (0-3). */
 #define DMAPG2CX(c)     (dmaChannelMap[c])
+#endif
 
 static int dmaMapChannel[4] = {7, 3, 1, 2};
 /* Map a channel index (0-3) to DMA page register offset (0-7). */
@@ -208,6 +210,7 @@ static int dmaMapChannel[4] = {7, 3, 1, 2};
 /* Extract the transfer type bits of mode register. */
 #define GET_MODE_XTYP(c)(((c) & 0x0c) >> 2)
 
+
 /* Perform a master clear (reset) on a DMA controller. */
 static void dmaClear(DMAControl *dc)
 {
@@ -216,11 +219,12 @@ static void dmaClear(DMAControl *dc)
     dc->u8Temp    = 0;
     dc->u8ModeCtr = 0;
     dc->fHiByte   = false;
-    dc->u8Mask    = ~0;
+    dc->u8Mask    = UINT8_MAX;
 }
 
-/* Read the byte pointer and flip it. */
-static inline bool dmaReadBytePtr(DMAControl *dc)
+
+/** Read the byte pointer and flip it. */
+DECLINLINE(bool) dmaReadBytePtr(DMAControl *dc)
 {
     bool    bHighByte;
 
@@ -229,10 +233,15 @@ static inline bool dmaReadBytePtr(DMAControl *dc)
     return bHighByte;
 }
 
+
 /* DMA address registers writes and reads. */
 
+/**
+ * @callback_method_impl{FNIOMIOPORTOUT, Ports 0-7 & 0xc0-0xcf}
+ */
 static DECLCALLBACK(int) dmaWriteAddr(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT port, uint32_t u32, unsigned cb)
 {
+    RT_NOREF(pDevIns);
     if (cb == 1)
     {
         DMAControl  *dc = (DMAControl *)pvUser;
@@ -275,8 +284,13 @@ static DECLCALLBACK(int) dmaWriteAddr(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT
     return VINF_SUCCESS;
 }
 
+
+/**
+ * @callback_method_impl{FNIOMIOPORTIN, Ports 0-7 & 0xc0-0xcf}
+ */
 static DECLCALLBACK(int) dmaReadAddr(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT port, uint32_t *pu32, unsigned cb)
 {
+    RT_NOREF(pDevIns);
     if (cb == 1)
     {
         DMAControl  *dc = (DMAControl *)pvUser;
@@ -300,15 +314,17 @@ static DECLCALLBACK(int) dmaReadAddr(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT
         Log(("Count read: port %#06x, reg %#04x, data %#x\n", port, reg, val));
         return VINF_SUCCESS;
     }
-    else
-        return VERR_IOM_IOPORT_UNUSED;
+    return VERR_IOM_IOPORT_UNUSED;
 }
 
 /* DMA control registers writes and reads. */
 
-static DECLCALLBACK(int) dmaWriteCtl(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT port,
-                                     uint32_t u32, unsigned cb)
+/**
+ * @callback_method_impl{FNIOMIOPORTOUT, Ports 0x8-0xf & 0xd0-0xdf}
+ */
+static DECLCALLBACK(int) dmaWriteCtl(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT port, uint32_t u32, unsigned cb)
 {
+    RT_NOREF(pDevIns);
     if (cb == 1)
     {
         DMAControl  *dc = (DMAControl *)pvUser;
@@ -386,8 +402,13 @@ static DECLCALLBACK(int) dmaWriteCtl(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT
     return VINF_SUCCESS;
 }
 
+
+/**
+ * @callback_method_impl{FNIOMIOPORTIN, Ports 0x8-0xf & 0xd0-0xdf}
+ */
 static DECLCALLBACK(int) dmaReadCtl(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT port, uint32_t *pu32, unsigned cb)
 {
+    RT_NOREF(pDevIns);
     if (cb == 1)
     {
         DMAControl  *dc = (DMAControl *)pvUser;
@@ -437,13 +458,21 @@ static DECLCALLBACK(int) dmaReadCtl(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT p
     return VERR_IOM_IOPORT_UNUSED;
 }
 
-/** DMA page registers. There are 16 R/W page registers for compatibility with
- * the IBM PC/AT; only some of those registers are used for DMA. The page register
- * accessible via port 80h may be read to insert small delays or used as a scratch
- * register by a BIOS.
+/**
+ */
+
+/**
+ * @callback_method_impl{FNIOMIOPORTIN,
+ *          DMA page registers - Ports 0x80-0x87 & 0x88-0x8f}
+ *
+ * There are 16 R/W page registers for compatibility with the IBM PC/AT; only
+ * some of those registers are used for DMA. The page register accessible via
+ * port 80h may be read to insert small delays or used as a scratch register by
+ * a BIOS.
  */
 static DECLCALLBACK(int) dmaReadPage(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT port, uint32_t *pu32, unsigned cb)
 {
+    RT_NOREF(pDevIns);
     DMAControl  *dc = (DMAControl *)pvUser;
     int         reg;
 
@@ -468,8 +497,14 @@ static DECLCALLBACK(int) dmaReadPage(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT
     return VERR_IOM_IOPORT_UNUSED;
 }
 
+
+/**
+ * @callback_method_impl{FNIOMIOPORTOUT,
+ *      DMA page registers - Ports 0x80-0x87 & 0x88-0x8f}
+ */
 static DECLCALLBACK(int) dmaWritePage(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT port, uint32_t u32, unsigned cb)
 {
+    RT_NOREF(pDevIns);
     DMAControl  *dc = (DMAControl *)pvUser;
     int         reg;
 
@@ -501,12 +536,15 @@ static DECLCALLBACK(int) dmaWritePage(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT
     return VINF_SUCCESS;
 }
 
+
 /**
- * EISA style high page registers, for extending the DMA addresses to cover
- * the entire 32-bit address space.
+ * @callback_method_impl{FNIOMIOPORTIN,
+ *      EISA style high page registers, for extending the DMA addresses to cover
+ *      the entire 32-bit address space.  Ports 0x480-0x487 & 0x488-0x48f}
  */
 static DECLCALLBACK(int) dmaReadHiPage(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT port, uint32_t *pu32, unsigned cb)
 {
+    RT_NOREF(pDevIns);
     if (cb == 1)
     {
         DMAControl  *dc = (DMAControl *)pvUser;
@@ -521,8 +559,13 @@ static DECLCALLBACK(int) dmaReadHiPage(PPDMDEVINS pDevIns, void *pvUser, RTIOPOR
     return VERR_IOM_IOPORT_UNUSED;
 }
 
+
+/**
+ * @callback_method_impl{FNIOMIOPORTOUT, Ports 0x480-0x487 & 0x488-0x48f}
+ */
 static DECLCALLBACK(int) dmaWriteHiPage(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT port, uint32_t u32, unsigned cb)
 {
+    RT_NOREF(pDevIns);
     if (cb == 1)
     {
         DMAControl  *dc = (DMAControl *)pvUser;
@@ -727,7 +770,7 @@ static DECLCALLBACK(uint32_t) dmaWriteMemory(PPDMDEVINS pDevIns, unsigned uChann
 
     if (IS_MODE_DEC(ch->u8Mode))
     {
-        //@todo: This would need a temporary buffer.
+        /// @todo This would need a temporary buffer.
         Assert(0);
 #if 0
         if (dc->is16bit)
@@ -937,11 +980,12 @@ static DECLCALLBACK(int) dmaLoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32
  */
 static DECLCALLBACK(int) dmaConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
 {
-    DMAState    *pThis = PDMINS_2_DATA(pDevIns, DMAState *);
-    bool        bHighPage = false;
-    PDMDMACREG  reg;
-    int         rc;
+    RT_NOREF(iInstance);
+    DMAState *pThis = PDMINS_2_DATA(pDevIns, DMAState *);
 
+    /*
+     * Initialize data.
+     */
     pThis->pDevIns = pDevIns;
 
     /*
@@ -950,6 +994,7 @@ static DECLCALLBACK(int) dmaConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNO
     if (!CFGMR3AreValuesValid(pCfg, "\0")) /* "HighPageEnable\0")) */
         return VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES;
 
+    bool        bHighPage = false;
 #if 0
     rc = CFGMR3QueryBool(pCfg, "HighPageEnable", &bHighPage);
     if (RT_FAILURE (rc))
@@ -959,15 +1004,16 @@ static DECLCALLBACK(int) dmaConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNO
     dmaIORegister(pDevIns, bHighPage);
     dmaReset(pDevIns);
 
-    reg.u32Version        = PDM_DMACREG_VERSION;
-    reg.pfnRun            = dmaRun;
-    reg.pfnRegister       = dmaRegister;
-    reg.pfnReadMemory     = dmaReadMemory;
-    reg.pfnWriteMemory    = dmaWriteMemory;
-    reg.pfnSetDREQ        = dmaSetDREQ;
-    reg.pfnGetChannelMode = dmaGetChannelMode;
+    PDMDMACREG Reg;
+    Reg.u32Version        = PDM_DMACREG_VERSION;
+    Reg.pfnRun            = dmaRun;
+    Reg.pfnRegister       = dmaRegister;
+    Reg.pfnReadMemory     = dmaReadMemory;
+    Reg.pfnWriteMemory    = dmaWriteMemory;
+    Reg.pfnSetDREQ        = dmaSetDREQ;
+    Reg.pfnGetChannelMode = dmaGetChannelMode;
 
-    rc = PDMDevHlpDMACRegister(pDevIns, &reg, &pThis->pHlp);
+    int rc = PDMDevHlpDMACRegister(pDevIns, &Reg, &pThis->pHlp);
     if (RT_FAILURE (rc))
         return rc;
 
diff --git a/src/VBox/Devices/PC/DevFwCommon.cpp b/src/VBox/Devices/PC/DevFwCommon.cpp
index 0ddf308..91b7c16 100644
--- a/src/VBox/Devices/PC/DevFwCommon.cpp
+++ b/src/VBox/Devices/PC/DevFwCommon.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1013,6 +1013,8 @@ void FwCommonPlantSmbiosAndDmiHdrs(PPDMDEVINS pDevIns, uint16_t cbDmiTables, uin
  */
 void FwCommonPlantMpsTable(PPDMDEVINS pDevIns, uint8_t *pTable, unsigned cbMax, uint16_t cCpus)
 {
+    RT_NOREF1(cbMax);
+
     /* configuration table */
     PMPSCFGTBLHEADER pCfgTab      = (MPSCFGTBLHEADER*)pTable;
     memcpy(pCfgTab->au8Signature, "PCMP", 4);
diff --git a/src/VBox/Devices/PC/DevFwCommon.h b/src/VBox/Devices/PC/DevFwCommon.h
index 90320d2..e1240f8 100644
--- a/src/VBox/Devices/PC/DevFwCommon.h
+++ b/src/VBox/Devices/PC/DevFwCommon.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/PC/DevHPET.cpp b/src/VBox/Devices/PC/DevHPET.cpp
index a1ffcf6..74acbd5 100644
--- a/src/VBox/Devices/PC/DevHPET.cpp
+++ b/src/VBox/Devices/PC/DevHPET.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -414,7 +414,7 @@ static void hpetProgramTimer(HPETTIMER *pHpetTimer)
     /*
      * HACK ALERT! Avoid killing VM with interrupts.
      */
-#if 1 /** @todo: HACK, rethink, may have negative impact on the guest */
+#if 1 /** @todo HACK, rethink, may have negative impact on the guest */
     if (u64Diff == 0)
         u64Diff = 100000; /* 1 millisecond */
 #endif
@@ -993,7 +993,7 @@ static uint32_t hpetR3TimerGetIrq(struct HPETTIMER const *pHpetTimer)
  */
 static void hpetR3TimerUpdateIrq(HPET *pThis, struct HPETTIMER *pHpetTimer)
 {
-    /** @todo: is it correct? */
+    /** @todo is it correct? */
     if (   !!(pHpetTimer->u64Config & HPET_TN_ENABLE)
         && !!(pThis->u64HpetConfig & HPET_CFG_ENABLE))
     {
@@ -1010,7 +1010,7 @@ static void hpetR3TimerUpdateIrq(HPET *pThis, struct HPETTIMER *pHpetTimer)
             pThis->pHpetHlpR3->pfnSetIrq(pThis->CTX_SUFF(pDevIns), irq, PDM_IRQ_LEVEL_FLIP_FLOP);
         else
             AssertFailed();
-        /** @todo: implement IRQs in level-triggered mode */
+        /** @todo implement IRQs in level-triggered mode */
     }
 }
 
@@ -1307,6 +1307,7 @@ static DECLCALLBACK(void) hpetR3Reset(PPDMDEVINS pDevIns)
  */
 static DECLCALLBACK(int) hpetR3Construct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
 {
+    RT_NOREF(iInstance);
     PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
     HPET   *pThis = PDMINS_2_DATA(pDevIns, HPET *);
 
diff --git a/src/VBox/Devices/PC/DevIOAPIC_New.cpp b/src/VBox/Devices/PC/DevIOAPIC_New.cpp
deleted file mode 100644
index 00b7403..0000000
--- a/src/VBox/Devices/PC/DevIOAPIC_New.cpp
+++ /dev/null
@@ -1,1366 +0,0 @@
-/* $Id: DevIOAPIC_New.cpp $ */
-/** @file
- * IO APIC - Input/Output Advanced Programmable Interrupt Controller.
- */
-
-/*
- * Copyright (C) 2016 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-
-/*********************************************************************************************************************************
-*   Header Files                                                                                                                 *
-*********************************************************************************************************************************/
-#define LOG_GROUP LOG_GROUP_DEV_IOAPIC
-#include <VBox/log.h>
-#include <VBox/vmm/hm.h>
-#include <VBox/msi.h>
-#include <VBox/vmm/pdmdev.h>
-
-#include "VBoxDD.h"
-#include <iprt/x86.h>
-
-
-/*********************************************************************************************************************************
-*   Defined Constants And Macros                                                                                                 *
-*********************************************************************************************************************************/
-/** The current IO APIC saved state version. */
-#define IOAPIC_SAVED_STATE_VERSION              2
-/** The saved state version used by VirtualBox 5.0 and
- *  earlier.  */
-#define IOAPIC_SAVED_STATE_VERSION_VBOX_50      1
-
-/** Implementation specified by the "Intel I/O Controller Hub 9
- *  (ICH9) Family" */
-#define IOAPIC_HARDWARE_VERSION_ICH9            1
-/** Implementation specified by the "82093AA I/O Advanced Programmable Interrupt
-Controller" */
-#define IOAPIC_HARDWARE_VERSION_82093AA         2
-/** The IO APIC implementation to use. */
-#define IOAPIC_HARDWARE_VERSION                 IOAPIC_HARDWARE_VERSION_ICH9
-
-#if IOAPIC_HARDWARE_VERSION == IOAPIC_HARDWARE_VERSION_82093AA
-/** The version. */
-# define IOAPIC_VERSION                         0x11
-/** The ID mask. */
-# define IOAPIC_ID_MASK                         0x0f
-#elif IOAPIC_HARDWARE_VERSION == IOAPIC_HARDWARE_VERSION_ICH9
-/** The version. */
-# define IOAPIC_VERSION                         0x20
-/** The ID mask. */
-# define IOAPIC_ID_MASK                         0xff
-#else
-# error "Implement me"
-#endif
-
-/** The default MMIO base physical address. */
-#define IOAPIC_MMIO_BASE_PHYSADDR               UINT64_C(0xfec00000)
-/** The size of the MMIO range. */
-#define IOAPIC_MMIO_SIZE                        X86_PAGE_4K_SIZE
-/** The mask for getting direct registers from physical address. */
-#define IOAPIC_MMIO_REG_MASK                    0xff
-
-/** The number of interrupt input pins. */
-#define IOAPIC_NUM_INTR_PINS                    24
-/** Maximum redirection entires. */
-#define IOAPIC_MAX_REDIR_ENTRIES                (IOAPIC_NUM_INTR_PINS - 1)
-
-/** Version register - Gets the version. */
-#define IOAPIC_VER_GET_VER(a_Reg)               ((a_Reg) & 0xff)
-/** Version register - Gets the maximum redirection entry. */
-#define IOAPIC_VER_GET_MRE(a_Reg)               (((a_Reg) >> 16) & 0xff)
-/** Version register - Gets whether Pin Assertion Register (PRQ) is
- *  supported. */
-#define IOAPIC_VER_HAS_PRQ(a_Reg)               RT_BOOL((a_Reg) & RT_BIT_32(15))
-
-/** Index register - Valid write mask. */
-#define IOAPIC_INDEX_VALID_WRITE_MASK           UINT32_C(0xff)
-
-/** Arbitration register - Gets the ID. */
-#define IOAPIC_ARB_GET_ID(a_Reg)                ((a_Reg) >> 24 & 0xf)
-
-/** ID register - Gets the ID. */
-#define IOAPIC_ID_GET_ID(a_Reg)                 ((a_Reg) >> 24 & IOAPIC_ID_MASK)
-
-/** Redirection table entry - Vector. */
-#define IOAPIC_RTE_VECTOR                       UINT64_C(0xff)
-/** Redirection table entry - Delivery mode. */
-#define IOAPIC_RTE_DELIVERY_MODE                (RT_BIT_64(8) | RT_BIT_64(9) | RT_BIT_64(10))
-/** Redirection table entry - Destination mode. */
-#define IOAPIC_RTE_DEST_MODE                    RT_BIT_64(11)
-/** Redirection table entry - Delivery status. */
-#define IOAPIC_RTE_DELIVERY_STATUS              RT_BIT_64(12)
-/** Redirection table entry - Interrupt input pin polarity. */
-#define IOAPIC_RTE_POLARITY                     RT_BIT_64(13)
-/** Redirection table entry - Remote IRR. */
-#define IOAPIC_RTE_REMOTE_IRR                   RT_BIT_64(14)
-/** Redirection table entry - Trigger Mode. */
-#define IOAPIC_RTE_TRIGGER_MODE                 RT_BIT_64(15)
-/** Redirection table entry - the mask bit number. */
-#define IOAPIC_RTE_MASK_BIT                     16
-/** Redirection table entry - the mask. */
-#define IOAPIC_RTE_MASK                         RT_BIT_64(IOAPIC_RTE_MASK_BIT)
-/** Redirection table entry - Extended Destination ID. */
-#define IOAPIC_RTE_EXT_DEST_ID                  UINT64_C(0x00ff000000000000)
-/** Redirection table entry - Destination. */
-#define IOAPIC_RTE_DEST                         UINT64_C(0xff00000000000000)
-
-/** Redirection table entry - Gets the destination. */
-#define IOAPIC_RTE_GET_DEST(a_Reg)              ((a_Reg) >> 56 & 0xff)
-/** Redirection table entry - Gets the mask flag. */
-#define IOAPIC_RTE_GET_MASK(a_Reg)              (((a_Reg) >> IOAPIC_RTE_MASK_BIT) & 0x1)
-/** Redirection table entry - Checks whether it's masked. */
-#define IOAPIC_RTE_IS_MASKED(a_Reg)             ((a_Reg) & IOAPIC_RTE_MASK)
-/** Redirection table entry - Gets the trigger mode. */
-#define IOAPIC_RTE_GET_TRIGGER_MODE(a_Reg)      (((a_Reg) >> 15) & 0x1)
-/** Redirection table entry - Gets the remote IRR flag. */
-#define IOAPIC_RTE_GET_REMOTE_IRR(a_Reg)        (((a_Reg) >> 14) & 0x1)
-/** Redirection table entry - Gets the interrupt pin polarity. */
-#define IOAPIC_RTE_GET_POLARITY(a_Reg)          (((a_Reg) >> 13) & 0x1)
-/** Redirection table entry - Gets the delivery status. */
-#define IOAPIC_RTE_GET_DELIVERY_STATUS(a_Reg)   (((a_Reg) >> 12) & 0x1)
-/** Redirection table entry - Gets the destination mode. */
-#define IOAPIC_RTE_GET_DEST_MODE(a_Reg)         (((a_Reg) >> 11) & 0x1)
-/** Redirection table entry - Gets the delivery mode. */
-#define IOAPIC_RTE_GET_DELIVERY_MODE(a_Reg)     (((a_Reg) >> 8)  & 0x7)
-/** Redirection table entry - Gets the vector. */
-#define IOAPIC_RTE_GET_VECTOR(a_Reg)            ((a_Reg) & IOAPIC_RTE_VECTOR)
-/** Redirection table entry - Valid write mask. */
-#define IOAPIC_RTE_VALID_WRITE_MASK             (  IOAPIC_RTE_DEST     | IOAPIC_RTE_MASK      | IOAPIC_RTE_TRIGGER_MODE \
-                                                 | IOAPIC_RTE_POLARITY | IOAPIC_RTE_DEST_MODE | IOAPIC_RTE_DELIVERY_MODE \
-                                                 | IOAPIC_RTE_VECTOR)
-
-#if IOAPIC_HARDWARE_VERSION == IOAPIC_HARDWARE_VERSION_82093AA
-/** Redirection table entry - Valid read mask. */
-# define IOAPIC_RTE_VALID_READ_MASK             (  IOAPIC_RTE_DEST       | IOAPIC_RTE_MASK          | IOAPIC_RTE_TRIGGER_MODE \
-                                                 | IOAPIC_RTE_REMOTE_IRR | IOAPIC_RTE_POLARITY      | IOAPIC_RTE_DELIVERY_STATUS \
-                                                 | IOAPIC_RTE_DEST_MODE  | IOAPIC_RTE_DELIVERY_MODE | IOAPIC_RTE_VECTOR)
-#elif IOAPIC_HARDWARE_VERSION == IOAPIC_HARDWARE_VERSION_ICH9
-/** Redirection table entry - Valid read mask. */
-# define IOAPIC_RTE_VALID_READ_MASK             (  IOAPIC_RTE_DEST            | IOAPIC_RTE_EXT_DEST_ID | IOAPIC_RTE_MASK \
-                                                 | IOAPIC_RTE_TRIGGER_MODE    | IOAPIC_RTE_REMOTE_IRR  | IOAPIC_RTE_POLARITY \
-                                                 | IOAPIC_RTE_DELIVERY_STATUS | IOAPIC_RTE_DEST_MODE   | IOAPIC_RTE_DELIVERY_MODE \
-                                                 | IOAPIC_RTE_VECTOR)
-#endif
-/** Redirection table entry - Trigger mode edge. */
-#define IOAPIC_RTE_TRIGGER_MODE_EDGE            0
-/** Redirection table entry - Trigger mode level. */
-#define IOAPIC_RTE_TRIGGER_MODE_LEVEL           1
-/** Redirection table entry - Destination mode physical. */
-#define IOAPIC_RTE_DEST_MODE_PHYSICAL           0
-/** Redirection table entry - Destination mode logical. */
-#define IOAPIC_RTE_DEST_MODE_LOGICAL            1
-
-
-/** Index of indirect registers in the I/O APIC register table. */
-#define IOAPIC_INDIRECT_INDEX_ID                0x0
-#define IOAPIC_INDIRECT_INDEX_VERSION           0x1
-#if IOAPIC_HARDWARE_VERSION == IOAPIC_HARDWARE_VERSION_82093AA
-# define IOAPIC_INDIRECT_INDEX_ARB              0x2
-#endif
-#define IOAPIC_INDIRECT_INDEX_REDIR_TBL_START   0x10
-#define IOAPIC_INDIRECT_INDEX_REDIR_TBL_END     0x3F
-
-/** Offset of direct registers in the I/O APIC MMIO space. */
-#define IOAPIC_DIRECT_OFF_INDEX                 0x00
-#define IOAPIC_DIRECT_OFF_DATA                  0x10
-#if IOAPIC_HARDWARE_VERSION == IOAPIC_HARDWARE_VERSION_ICH9
-# define IOAPIC_DIRECT_OFF_EOI                  0x40
-#endif
-
-/* Use PDM critsect for now for I/O APIC locking, see @bugref{8245#c121}. */
-#define IOAPIC_WITH_PDM_CRITSECT
-#ifdef IOAPIC_WITH_PDM_CRITSECT
-# define IOAPIC_LOCK(pThis, rcBusy)         (pThis)->CTX_SUFF(pIoApicHlp)->pfnLock((pThis)->CTX_SUFF(pDevIns), (rcBusy))
-# define IOAPIC_UNLOCK(pThis)               (pThis)->CTX_SUFF(pIoApicHlp)->pfnUnlock((pThis)->CTX_SUFF(pDevIns))
-#else
-# define IOAPIC_LOCK(pThis, rcBusy)         PDMCritSectEnter(&(pThis)->CritSect, (rcBusy))
-# define IOAPIC_UNLOCK(pThis)               PDMCritSectLeave(&(pThis)->CritSect)
-#endif
-
-
-/*********************************************************************************************************************************
-*   Structures and Typedefs                                                                                                      *
-*********************************************************************************************************************************/
-/**
- * The per-VM I/O APIC device state.
- */
-typedef struct IOAPIC
-{
-    /** The device instance - R3 Ptr. */
-    PPDMDEVINSR3            pDevInsR3;
-    /** The IOAPIC helpers - R3 Ptr. */
-    PCPDMIOAPICHLPR3        pIoApicHlpR3;
-
-    /** The device instance - R0 Ptr. */
-    PPDMDEVINSR0            pDevInsR0;
-    /** The IOAPIC helpers - R0 Ptr. */
-    PCPDMIOAPICHLPR0        pIoApicHlpR0;
-
-    /** The device instance - RC Ptr. */
-    PPDMDEVINSRC            pDevInsRC;
-    /** The IOAPIC helpers - RC Ptr. */
-    PCPDMIOAPICHLPRC        pIoApicHlpRC;
-
-    /** The ID register. */
-    uint8_t volatile        u8Id;
-    /** The index register. */
-    uint8_t volatile        u8Index;
-    /** Number of CPUs. */
-    uint8_t                 cCpus;
-    /* Alignment padding. */
-    uint8_t                 u8Padding0[5];
-
-    /** The redirection table registers. */
-    uint64_t                au64RedirTable[IOAPIC_NUM_INTR_PINS];
-    /** The IRQ tags and source IDs for each pin (tracing purposes). */
-    uint32_t                au32TagSrc[IOAPIC_NUM_INTR_PINS];
-
-    /** Alignment padding. */
-    uint32_t                u32Padding2;
-    /** The internal IRR reflecting state of the interrupt lines. */
-    uint32_t                uIrr;
-
-#ifndef IOAPIC_WITH_PDM_CRITSECT
-    /** The critsect for updating to the RTEs. */
-    PDMCRITSECT             CritSect;
-#endif
-
-#ifdef VBOX_WITH_STATISTICS
-    /** Number of MMIO reads in RZ. */
-    STAMCOUNTER             StatMmioReadRZ;
-    /** Number of MMIO reads in R3. */
-    STAMCOUNTER             StatMmioReadR3;
-
-    /** Number of MMIO writes in RZ. */
-    STAMCOUNTER             StatMmioWriteRZ;
-    /** Number of MMIO writes in R3. */
-    STAMCOUNTER             StatMmioWriteR3;
-
-    /** Number of SetIrq calls in RZ. */
-    STAMCOUNTER             StatSetIrqRZ;
-    /** Number of SetIrq calls in R3. */
-    STAMCOUNTER             StatSetIrqR3;
-
-    /** Number of SetEoi calls in RZ. */
-    STAMCOUNTER             StatSetEoiRZ;
-    /** Number of SetEoi calls in R3. */
-    STAMCOUNTER             StatSetEoiR3;
-
-    /** Number of redundant edge-triggered interrupts. */
-    STAMCOUNTER             StatRedundantEdgeIntr;
-    /** Number of redundant level-triggered interrupts. */
-    STAMCOUNTER             StatRedundantLevelIntr;
-    /** Number of suppressed level-triggered interrupts (by remote IRR). */
-    STAMCOUNTER             StatSuppressedLevelIntr;
-    /** Number of returns to ring-3 due to EOI broadcast lock contention. */
-    STAMCOUNTER             StatEoiContention;
-    /** Number of returns to ring-3 due to Set RTE lock contention. */
-    STAMCOUNTER             StatSetRteContention;
-    /** Number of level-triggered interrupts dispatched to the local APIC(s). */
-    STAMCOUNTER             StatLevelIrqSent;
-    /** Number of EOIs received for level-triggered interrupts from the local
-     *  APIC(s). */
-    STAMCOUNTER             StatEoiReceived;
-#endif
-} IOAPIC;
-/** Pointer to IOAPIC data. */
-typedef IOAPIC *PIOAPIC;
-/** Pointer to a const IOAPIC data. */
-typedef IOAPIC const *PCIOAPIC;
-AssertCompileMemberAlignment(IOAPIC, au64RedirTable, 8);
-
-#ifndef VBOX_DEVICE_STRUCT_TESTCASE
-
-#if IOAPIC_HARDWARE_VERSION == IOAPIC_HARDWARE_VERSION_82093AA
-/**
- * Gets the arbitration register.
- *
- * @returns The arbitration.
- */
-DECLINLINE(uint32_t) ioapicGetArb(void)
-{
-    Log2(("IOAPIC: ioapicGetArb: returns 0\n"));
-    return 0;
-}
-#endif
-
-
-/**
- * Gets the version register.
- *
- * @returns The version.
- */
-DECLINLINE(uint32_t) ioapicGetVersion(void)
-{
-    uint32_t uValue = RT_MAKE_U32(IOAPIC_VERSION, IOAPIC_MAX_REDIR_ENTRIES);
-    Log2(("IOAPIC: ioapicGetVersion: returns %#RX32\n", uValue));
-    return uValue;
-}
-
-
-/**
- * Sets the ID register.
- *
- * @param   pThis       Pointer to the IOAPIC instance.
- * @param   uValue      The value to set.
- */
-DECLINLINE(void) ioapicSetId(PIOAPIC pThis, uint32_t uValue)
-{
-    Log2(("IOAPIC: ioapicSetId: uValue=%#RX32\n", uValue));
-    ASMAtomicWriteU8(&pThis->u8Id, (uValue >> 24) & IOAPIC_ID_MASK);
-}
-
-
-/**
- * Gets the ID register.
- *
- * @returns The ID.
- * @param   pThis       Pointer to the IOAPIC instance.
- */
-DECLINLINE(uint32_t) ioapicGetId(PCIOAPIC pThis)
-{
-    uint32_t uValue = (uint32_t)(pThis->u8Id & IOAPIC_ID_MASK) << 24;
-    Log2(("IOAPIC: ioapicGetId: returns %#RX32\n", uValue));
-    return uValue;
-}
-
-
-/**
- * Sets the index register.
- *
- * @param pThis     Pointer to the IOAPIC instance.
- * @param uValue    The value to set.
- */
-DECLINLINE(void) ioapicSetIndex(PIOAPIC pThis, uint32_t uValue)
-{
-    LogFlow(("IOAPIC: ioapicSetIndex: uValue=%#RX32\n", uValue));
-    ASMAtomicWriteU8(&pThis->u8Index, uValue & IOAPIC_INDEX_VALID_WRITE_MASK);
-}
-
-
-/**
- * Gets the index register.
- *
- * @returns The index value.
- */
-DECLINLINE(uint32_t) ioapicGetIndex(PCIOAPIC pThis)
-{
-    uint32_t const uValue = pThis->u8Index;
-    LogFlow(("IOAPIC: ioapicGetIndex: returns %#x\n", uValue));
-    return uValue;
-}
-
-
-/**
- * Signals the next pending interrupt for the specified Redirection Table Entry
- * (RTE).
- *
- * @param   pThis       The IOAPIC instance.
- * @param   idxRte      The index of the RTE.
- *
- * @remarks It is the responsibility of the caller to verify that an interrupt is
- *          pending for the pin corresponding to the RTE before calling this
- *          function.
- */
-static void ioapicSignalIntrForRte(PIOAPIC pThis, uint8_t idxRte)
-{
-#ifndef IOAPIC_WITH_PDM_CRITSECT
-    Assert(PDMCritSectIsOwner(&pThis->CritSect));
-#endif
-
-    /* Ensure the RTE isn't masked. */
-    uint64_t const u64Rte = pThis->au64RedirTable[idxRte];
-    if (!IOAPIC_RTE_IS_MASKED(u64Rte))
-    {
-        /* We cannot accept another level-triggered interrupt until remote IRR has been cleared. */
-        uint8_t const u8TriggerMode = IOAPIC_RTE_GET_TRIGGER_MODE(u64Rte);
-        if (u8TriggerMode == IOAPIC_RTE_TRIGGER_MODE_LEVEL)
-        {
-            uint8_t const u8RemoteIrr = IOAPIC_RTE_GET_REMOTE_IRR(u64Rte);
-            if (u8RemoteIrr)
-            {
-                STAM_COUNTER_INC(&pThis->StatSuppressedLevelIntr);
-                return;
-            }
-        }
-
-        uint8_t const  u8Vector       = IOAPIC_RTE_GET_VECTOR(u64Rte);
-        uint8_t const  u8DeliveryMode = IOAPIC_RTE_GET_DELIVERY_MODE(u64Rte);
-        uint8_t const  u8DestMode     = IOAPIC_RTE_GET_DEST_MODE(u64Rte);
-        uint8_t const  u8Polarity     = IOAPIC_RTE_GET_POLARITY(u64Rte);
-        uint8_t const  u8Dest         = IOAPIC_RTE_GET_DEST(u64Rte);
-        uint32_t const u32TagSrc      = pThis->au32TagSrc[idxRte];
-
-        Log2(("IOAPIC: Signaling %s-triggered interrupt. Dest=%#x DestMode=%s Vector=%#x (%u)",
-              u8TriggerMode == IOAPIC_RTE_TRIGGER_MODE_EDGE ? "edge" : "level", u8Dest,
-              u8DestMode == IOAPIC_RTE_DEST_MODE_PHYSICAL ? "physical" : "logical", u8Vector, u8Vector));
-
-        /*
-         * Deliver to the local APIC via the system/3-wire-APIC bus.
-         */
-        int rc = pThis->CTX_SUFF(pIoApicHlp)->pfnApicBusDeliver(pThis->CTX_SUFF(pDevIns),
-                                                                u8Dest,
-                                                                u8DestMode,
-                                                                u8DeliveryMode,
-                                                                u8Vector,
-                                                                u8Polarity,
-                                                                u8TriggerMode,
-                                                                u32TagSrc);
-        /* Can't reschedule to R3. */
-        Assert(rc == VINF_SUCCESS || rc == VERR_APIC_INTR_DISCARDED);
-#ifdef DEBUG_ramshankar
-        if (rc == VERR_APIC_INTR_DISCARDED)
-            AssertMsgFailed(("APIC: Interrupt discarded u8Vector=%#x (%u) u64Rte=%#RX64\n", u8Vector, u8Vector, u64Rte));
-#endif
-
-        /*
-         * For level-triggered interrupts, we set the remote IRR bit to indicate
-         * the local APIC has accepted the interrupt.
-         *
-         * For edge-triggered interrupts, we should not clear the IRR bit as it
-         * should remain intact to reflect the state of the interrupt line.
-         * The device will explicitly transition to inactive state via the
-         * ioapicSetIrq() callback.
-         */
-        if (   u8TriggerMode == IOAPIC_RTE_TRIGGER_MODE_LEVEL
-            && rc == VINF_SUCCESS)
-        {
-            Assert(u8TriggerMode == IOAPIC_RTE_TRIGGER_MODE_LEVEL);
-            pThis->au64RedirTable[idxRte] |= IOAPIC_RTE_REMOTE_IRR;
-            STAM_COUNTER_INC(&pThis->StatLevelIrqSent);
-        }
-    }
-}
-
-
-/**
- * Gets the redirection table entry.
- *
- * @returns The redirection table entry.
- * @param   pThis       Pointer to the IOAPIC instance.
- * @param   uIndex      The index value.
- */
-DECLINLINE(uint32_t) ioapicGetRedirTableEntry(PCIOAPIC pThis, uint32_t uIndex)
-{
-    uint8_t const idxRte = (uIndex - IOAPIC_INDIRECT_INDEX_REDIR_TBL_START) >> 1;
-    uint32_t uValue;
-    if (!(uIndex & 1))
-        uValue = RT_LO_U32(pThis->au64RedirTable[idxRte]) & RT_LO_U32(IOAPIC_RTE_VALID_READ_MASK);
-    else
-        uValue = RT_HI_U32(pThis->au64RedirTable[idxRte]) & RT_HI_U32(IOAPIC_RTE_VALID_READ_MASK);
-
-    LogFlow(("IOAPIC: ioapicGetRedirTableEntry: uIndex=%#RX32 idxRte=%u returns %#RX32\n", uIndex, idxRte, uValue));
-    return uValue;
-}
-
-
-/**
- * Sets the redirection table entry.
- *
- * @param   pThis       Pointer to the IOAPIC instance.
- * @param   uIndex      The index value.
- * @param   uValue      The value to set.
- */
-static int ioapicSetRedirTableEntry(PIOAPIC pThis, uint32_t uIndex, uint32_t uValue)
-{
-    uint8_t const idxRte = (uIndex - IOAPIC_INDIRECT_INDEX_REDIR_TBL_START) >> 1;
-    AssertMsg(idxRte < RT_ELEMENTS(pThis->au64RedirTable), ("Invalid index %u, expected <= %u\n", idxRte,
-                                                            RT_ELEMENTS(pThis->au64RedirTable)));
-
-    int rc = IOAPIC_LOCK(pThis, VINF_IOM_R3_MMIO_WRITE);
-    if (rc == VINF_SUCCESS)
-    {
-        /*
-         * Write the low or high 32-bit value into the specified 64-bit RTE register,
-         * update only the valid, writable bits.
-         *
-         * We need to preserve the read-only bits as it can have dire consequences
-         * otherwise, see @bugref{8386#c24}.
-         */
-        uint64_t const u64Rte = pThis->au64RedirTable[idxRte];
-        if (!(uIndex & 1))
-        {
-            uint32_t const u32RtePreserveLo = RT_LO_U32(u64Rte) & ~RT_LO_U32(IOAPIC_RTE_VALID_WRITE_MASK);
-            uint32_t const u32RteNewLo      = (uValue & RT_LO_U32(IOAPIC_RTE_VALID_WRITE_MASK)) | u32RtePreserveLo;
-            uint64_t const u64RteHi         = u64Rte & UINT64_C(0xffffffff00000000);
-            pThis->au64RedirTable[idxRte]   = u64RteHi | u32RteNewLo;
-        }
-        else
-        {
-            uint32_t const u32RtePreserveHi = RT_HI_U32(u64Rte) & ~RT_HI_U32(IOAPIC_RTE_VALID_WRITE_MASK);
-            uint32_t const u32RteLo         = RT_LO_U32(u64Rte);
-            uint64_t const u64RteNewHi      = ((uint64_t)((uValue & RT_HI_U32(IOAPIC_RTE_VALID_WRITE_MASK)) | u32RtePreserveHi) << 32);
-            pThis->au64RedirTable[idxRte]   = u64RteNewHi | u32RteLo;
-        }
-
-        /*
-         * Signal the next pending interrupt for this RTE.
-         */
-        uint32_t const uPinMask = UINT32_C(1) << idxRte;
-        if (pThis->uIrr & uPinMask)
-            ioapicSignalIntrForRte(pThis, idxRte);
-
-        IOAPIC_UNLOCK(pThis);
-        LogFlow(("IOAPIC: ioapicSetRedirTableEntry: uIndex=%#RX32 idxRte=%u uValue=%#RX32\n", uIndex, idxRte, uValue));
-    }
-    else
-        STAM_COUNTER_INC(&pThis->StatSetRteContention);
-
-    return rc;
-}
-
-
-/**
- * Gets the data register.
- *
- * @returns The data value.
- * @param pThis     Pointer to the IOAPIC instance.
- */
-static uint32_t ioapicGetData(PCIOAPIC pThis)
-{
-    uint8_t const uIndex = pThis->u8Index;
-    if (   uIndex >= IOAPIC_INDIRECT_INDEX_REDIR_TBL_START
-        && uIndex <= IOAPIC_INDIRECT_INDEX_REDIR_TBL_END)
-        return ioapicGetRedirTableEntry(pThis, uIndex);
-
-    uint32_t uValue;
-    switch (uIndex)
-    {
-        case IOAPIC_INDIRECT_INDEX_ID:
-            uValue = ioapicGetId(pThis);
-            break;
-
-        case IOAPIC_INDIRECT_INDEX_VERSION:
-            uValue = ioapicGetVersion();
-            break;
-
-#if IOAPIC_HARDWARE_VERSION == IOAPIC_HARDWARE_VERSION_82093AA
-        case IOAPIC_INDIRECT_INDEX_ARB:
-            uValue = ioapicGetArb();
-            break;
-#endif
-
-        default:
-            uValue = UINT32_C(0xffffffff);
-            Log2(("IOAPIC: Attempt to read register at invalid index %#x\n", uIndex));
-            break;
-    }
-    return uValue;
-}
-
-
-/**
- * Sets the data register.
- *
- * @param pThis     Pointer to the IOAPIC instance.
- * @param uValue    The value to set.
- */
-static int ioapicSetData(PIOAPIC pThis, uint32_t uValue)
-{
-    uint8_t const uIndex = pThis->u8Index;
-    LogFlow(("IOAPIC: ioapicSetData: uIndex=%#x uValue=%#RX32\n", uIndex, uValue));
-
-    if (   uIndex >= IOAPIC_INDIRECT_INDEX_REDIR_TBL_START
-        && uIndex <= IOAPIC_INDIRECT_INDEX_REDIR_TBL_END)
-        return ioapicSetRedirTableEntry(pThis, uIndex, uValue);
-
-    if (uIndex == IOAPIC_INDIRECT_INDEX_ID)
-        ioapicSetId(pThis, uValue);
-    else
-        Log2(("IOAPIC: ioapicSetData: Invalid index %#RX32, ignoring write request with uValue=%#RX32\n", uIndex, uValue));
-
-    return VINF_SUCCESS;
-}
-
-
-/**
- * @interface_method_impl{PDMIOAPICREG,pfnSetEoiR3}
- */
-PDMBOTHCBDECL(int) ioapicSetEoi(PPDMDEVINS pDevIns, uint8_t u8Vector)
-{
-    PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
-    STAM_COUNTER_INC(&pThis->CTX_SUFF_Z(StatSetEoi));
-    LogFlow(("IOAPIC: ioapicSetEoi: u8Vector=%#x (%u)\n", u8Vector, u8Vector));
-
-    bool fRemoteIrrCleared = false;
-    int rc = IOAPIC_LOCK(pThis, VINF_IOM_R3_MMIO_WRITE);
-    if (rc == VINF_SUCCESS)
-    {
-        for (uint8_t idxRte = 0; idxRte < RT_ELEMENTS(pThis->au64RedirTable); idxRte++)
-        {
-            uint64_t const u64Rte = pThis->au64RedirTable[idxRte];
-            if (IOAPIC_RTE_GET_VECTOR(u64Rte) == u8Vector)
-            {
-#ifdef DEBUG_ramshankar
-                /* This assertion may trigger when restoring saved-states created using the old, incorrect I/O APIC code. */
-                Assert(IOAPIC_RTE_GET_REMOTE_IRR(u64Rte));
-#endif
-                pThis->au64RedirTable[idxRte] &= ~IOAPIC_RTE_REMOTE_IRR;
-                fRemoteIrrCleared = true;
-                STAM_COUNTER_INC(&pThis->StatEoiReceived);
-                Log2(("IOAPIC: ioapicSetEoi: Cleared remote IRR, idxRte=%u vector=%#x (%u)\n", idxRte, u8Vector, u8Vector));
-
-                /*
-                 * Signal the next pending interrupt for this RTE.
-                 */
-                uint32_t const uPinMask = UINT32_C(1) << idxRte;
-                if (pThis->uIrr & uPinMask)
-                    ioapicSignalIntrForRte(pThis, idxRte);
-            }
-        }
-
-        IOAPIC_UNLOCK(pThis);
-        AssertMsg(fRemoteIrrCleared, ("Failed to clear remote IRR for vector %#x (%u)\n", u8Vector, u8Vector));
-    }
-    else
-        STAM_COUNTER_INC(&pThis->StatEoiContention);
-
-    return rc;
-}
-
-
-/**
- * @interface_method_impl{PDMIOAPICREG,pfnSetIrqR3}
- */
-PDMBOTHCBDECL(void) ioapicSetIrq(PPDMDEVINS pDevIns, int iIrq, int iLevel, uint32_t uTagSrc)
-{
-#define IOAPIC_ASSERT_IRQ(a_idxRte, a_PinMask)       do { \
-        pThis->au32TagSrc[(a_idxRte)] = !pThis->au32TagSrc[(a_idxRte)] ? uTagSrc : RT_BIT_32(31); \
-        pThis->uIrr |= a_PinMask; \
-        ioapicSignalIntrForRte(pThis, (a_idxRte)); \
-    } while (0)
-
-    PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
-    LogFlow(("IOAPIC: ioapicSetIrq: iIrq=%d iLevel=%d uTagSrc=%#x\n", iIrq, iLevel, uTagSrc));
-
-    STAM_COUNTER_INC(&pThis->CTX_SUFF_Z(StatSetIrq));
-
-    if (RT_LIKELY(iIrq >= 0 && iIrq < (int)RT_ELEMENTS(pThis->au64RedirTable)))
-    {
-        int rc = IOAPIC_LOCK(pThis, VINF_SUCCESS);
-        AssertRC(rc);
-
-        uint8_t  const idxRte        = iIrq;
-        uint32_t const uPinMask      = UINT32_C(1) << idxRte;
-        uint32_t const u32RteLo      = RT_LO_U32(pThis->au64RedirTable[idxRte]);
-        uint8_t  const u8TriggerMode = IOAPIC_RTE_GET_TRIGGER_MODE(u32RteLo);
-
-        bool fActive = RT_BOOL(iLevel & 1);
-        /** @todo Polarity is busted elsewhere, we need to fix that
-         *        first. See @bugref{8386#c7}. */
-#if 0
-        uint8_t const u8Polarity = IOAPIC_RTE_GET_POLARITY(u32RteLo);
-        fActive ^= u8Polarity; */
-#endif
-        if (!fActive)
-        {
-            pThis->uIrr &= ~uPinMask;
-            IOAPIC_UNLOCK(pThis);
-            return;
-        }
-
-        bool const     fFlipFlop = ((iLevel & PDM_IRQ_LEVEL_FLIP_FLOP) == PDM_IRQ_LEVEL_FLIP_FLOP);
-        uint32_t const uPrevIrr  = pThis->uIrr & uPinMask;
-        if (!fFlipFlop)
-        {
-            if (u8TriggerMode == IOAPIC_RTE_TRIGGER_MODE_EDGE)
-            {
-                /*
-                 * For edge-triggered interrupts, we need to act only on a low to high edge transition.
-                 * See ICH9 spec. 13.5.7 "REDIR_TBL: Redirection Table (LPC I/F-D31:F0)".
-                 */
-                if (!uPrevIrr)
-                    IOAPIC_ASSERT_IRQ(idxRte, uPinMask);
-                else
-                {
-                    STAM_COUNTER_INC(&pThis->StatRedundantEdgeIntr);
-                    Log2(("IOAPIC: Redundant edge-triggered interrupt %#x (%u)\n", idxRte, idxRte));
-                }
-            }
-            else
-            {
-                Assert(u8TriggerMode == IOAPIC_RTE_TRIGGER_MODE_LEVEL);
-
-                /*
-                 * For level-triggered interrupts, redundant interrupts are not a problem
-                 * and will eventually be delivered anyway after an EOI, but our PDM devices
-                 * should not typically call us with no change to the level.
-                 */
-                if (!uPrevIrr)
-                { /* likely */ }
-                else
-                {
-                    STAM_COUNTER_INC(&pThis->StatRedundantLevelIntr);
-                    Log2(("IOAPIC: Redundant level-triggered interrupt %#x (%u)\n", idxRte, idxRte));
-                }
-
-                IOAPIC_ASSERT_IRQ(idxRte, uPinMask);
-            }
-        }
-        else
-        {
-            /*
-             * The device is flip-flopping the interrupt line, which implies we should de-assert
-             * and assert the interrupt line. The interrupt line is left in the asserted state
-             * after a flip-flop request. The de-assert is a NOP wrts to signaling an interrupt
-             * hence just the assert is done.
-             */
-            IOAPIC_ASSERT_IRQ(idxRte, uPinMask);
-        }
-
-        IOAPIC_UNLOCK(pThis);
-    }
-#undef IOAPIC_ASSERT_IRQ
-}
-
-
-/**
- * @interface_method_impl{PDMIOAPICREG,pfnSendMsiR3}
- */
-PDMBOTHCBDECL(void) ioapicSendMsi(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, uint32_t uValue, uint32_t uTagSrc)
-{
-    PCIOAPIC pThis = PDMINS_2_DATA(pDevIns, PCIOAPIC);
-    LogFlow(("IOAPIC: ioapicSendMsi: GCPhys=%#RGp uValue=%#RX32\n", GCPhys, uValue));
-
-    /*
-     * Parse the message from the physical address.
-     * See Intel spec. 10.11.1 "Message Address Register Format".
-     */
-    uint8_t const u8DestAddr = (GCPhys & VBOX_MSI_ADDR_DEST_ID_MASK) >> VBOX_MSI_ADDR_DEST_ID_SHIFT;
-    uint8_t const u8DestMode = (GCPhys >> VBOX_MSI_ADDR_DEST_MODE_SHIFT) & 0x1;
-    /** @todo Check if we need to implement Redirection Hint Indicator. */
-    /* uint8_t const uRedirectHint  = (GCPhys >> VBOX_MSI_ADDR_REDIRECTION_SHIFT) & 0x1; */
-
-    /*
-     * Parse the message data.
-     * See Intel spec. 10.11.2 "Message Data Register Format".
-     */
-    uint8_t const u8Vector       = (uValue & VBOX_MSI_DATA_VECTOR_MASK)  >> VBOX_MSI_DATA_VECTOR_SHIFT;
-    uint8_t const u8TriggerMode  = (uValue >> VBOX_MSI_DATA_TRIGGER_SHIFT) & 0x1;
-    uint8_t const u8DeliveryMode = (uValue >> VBOX_MSI_DATA_DELIVERY_MODE_SHIFT) & 0x7;
-
-    /*
-     * Deliver to the local APIC via the system/3-wire-APIC bus.
-     */
-    int rc = pThis->CTX_SUFF(pIoApicHlp)->pfnApicBusDeliver(pDevIns,
-                                                            u8DestAddr,
-                                                            u8DestMode,
-                                                            u8DeliveryMode,
-                                                            u8Vector,
-                                                            0 /* u8Polarity - N/A */,
-                                                            u8TriggerMode,
-                                                            uTagSrc);
-    /* Can't reschedule to R3. */
-    Assert(rc == VINF_SUCCESS || rc == VERR_APIC_INTR_DISCARDED);
-}
-
-
-/**
- * @callback_method_impl{FNIOMMMIOREAD}
- */
-PDMBOTHCBDECL(int) ioapicMmioRead(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void *pv, unsigned cb)
-{
-    PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
-    STAM_COUNTER_INC(&pThis->CTX_SUFF_Z(StatMmioRead));
-
-    int       rc      = VINF_SUCCESS;
-    uint32_t *puValue = (uint32_t *)pv;
-    uint32_t  offReg  = GCPhysAddr & IOAPIC_MMIO_REG_MASK;
-    switch (offReg)
-    {
-        case IOAPIC_DIRECT_OFF_INDEX:
-            *puValue = ioapicGetIndex(pThis);
-            break;
-
-        case IOAPIC_DIRECT_OFF_DATA:
-            *puValue = ioapicGetData(pThis);
-            break;
-
-        default:
-            Log2(("IOAPIC: ioapicMmioRead: Invalid offset. GCPhysAddr=%#RGp offReg=%#x\n", GCPhysAddr, offReg));
-            rc = VINF_IOM_MMIO_UNUSED_FF;
-            break;
-    }
-
-    LogFlow(("IOAPIC: ioapicMmioRead: offReg=%#x, returns %#RX32\n", offReg, *puValue));
-    return rc;
-}
-
-
-/**
- * @callback_method_impl{FNIOMMMIOWRITE}
- */
-PDMBOTHCBDECL(int) ioapicMmioWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void const *pv, unsigned cb)
-{
-    PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
-
-    STAM_COUNTER_INC(&pThis->CTX_SUFF_Z(StatMmioWrite));
-
-    Assert(!(GCPhysAddr & 3));
-    Assert(cb == 4);
-
-    uint32_t const uValue = *(uint32_t const *)pv;
-    uint32_t const offReg = GCPhysAddr & IOAPIC_MMIO_REG_MASK;
-
-    LogFlow(("IOAPIC: ioapicMmioWrite: pThis=%p GCPhysAddr=%#RGp cb=%u uValue=%#RX32\n", pThis, GCPhysAddr, cb, uValue));
-    int rc = VINF_SUCCESS;
-    switch (offReg)
-    {
-        case IOAPIC_DIRECT_OFF_INDEX:
-            ioapicSetIndex(pThis, uValue);
-            break;
-
-        case IOAPIC_DIRECT_OFF_DATA:
-            rc = ioapicSetData(pThis, uValue);
-            break;
-
-#if IOAPIC_HARDWARE_VERSION == IOAPIC_HARDWARE_VERSION_ICH9
-        case IOAPIC_DIRECT_OFF_EOI:
-            rc = ioapicSetEoi(pDevIns, uValue);
-            break;
-#endif
-
-        default:
-            Log2(("IOAPIC: ioapicMmioWrite: Invalid offset. GCPhysAddr=%#RGp offReg=%#x\n", GCPhysAddr, offReg));
-            break;
-    }
-
-    return rc;
-}
-
-
-#ifdef IN_RING3
-/** @interface_method_impl{DBGFREGDESC,pfnGet} */
-static DECLCALLBACK(int) ioapicDbgReg_GetIndex(void *pvUser, PCDBGFREGDESC pDesc, PDBGFREGVAL pValue)
-{
-    pValue->u32 = ioapicGetIndex(PDMINS_2_DATA((PPDMDEVINS)pvUser, PCIOAPIC));
-    return VINF_SUCCESS;
-}
-
-/** @interface_method_impl{DBGFREGDESC,pfnSet} */
-static DECLCALLBACK(int) ioapicDbgReg_SetIndex(void *pvUser, PCDBGFREGDESC pDesc, PCDBGFREGVAL pValue, PCDBGFREGVAL pfMask)
-{
-    ioapicSetIndex(PDMINS_2_DATA((PPDMDEVINS)pvUser, PIOAPIC), pValue->u8);
-    return VINF_SUCCESS;
-}
-
-/** @interface_method_impl{DBGFREGDESC,pfnGet} */
-static DECLCALLBACK(int) ioapicDbgReg_GetData(void *pvUser, PCDBGFREGDESC pDesc, PDBGFREGVAL pValue)
-{
-    pValue->u32 = ioapicGetData((PDMINS_2_DATA((PPDMDEVINS)pvUser, PCIOAPIC)));
-    return VINF_SUCCESS;
-}
-
-/** @interface_method_impl{DBGFREGDESC,pfnSet} */
-static DECLCALLBACK(int) ioapicDbgReg_SetData(void *pvUser, PCDBGFREGDESC pDesc, PCDBGFREGVAL pValue, PCDBGFREGVAL pfMask)
-{
-     return ioapicSetData(PDMINS_2_DATA((PPDMDEVINS)pvUser, PIOAPIC), pValue->u32);
-}
-
-/** @interface_method_impl{DBGFREGDESC,pfnGet} */
-static DECLCALLBACK(int) ioapicDbgReg_GetVersion(void *pvUser, PCDBGFREGDESC pDesc, PDBGFREGVAL pValue)
-{
-    pValue->u32 = ioapicGetVersion();
-    return VINF_SUCCESS;
-}
-
-/** @interface_method_impl{DBGFREGDESC,pfnGet} */
-static DECLCALLBACK(int) ioapicDbgReg_GetArb(void *pvUser, PCDBGFREGDESC pDesc, PDBGFREGVAL pValue)
-{
-#if IOAPIC_HARDWARE_VERSION == IOAPIC_HARDWARE_VERSION_82093AA
-    pValue->u32 = ioapicGetArb(PDMINS_2_DATA((PPDMDEVINS)pvUser, PCIOAPIC));
-#else
-    pValue->u32 = UINT32_C(0xffffffff);
-#endif
-    return VINF_SUCCESS;
-}
-
-/** @interface_method_impl{DBGFREGDESC,pfnGet} */
-static DECLCALLBACK(int) ioapicDbgReg_GetRte(void *pvUser, PCDBGFREGDESC pDesc, PDBGFREGVAL pValue)
-{
-    PCIOAPIC pThis = PDMINS_2_DATA((PPDMDEVINS)pvUser, PCIOAPIC);
-    Assert(pDesc->offRegister < RT_ELEMENTS(pThis->au64RedirTable));
-    pValue->u64 = pThis->au64RedirTable[pDesc->offRegister];
-    return VINF_SUCCESS;
-}
-
-/** @interface_method_impl{DBGFREGDESC,pfnSet} */
-static DECLCALLBACK(int) ioapicDbgReg_SetRte(void *pvUser, PCDBGFREGDESC pDesc, PCDBGFREGVAL pValue, PCDBGFREGVAL pfMask)
-{
-    PIOAPIC pThis = PDMINS_2_DATA((PPDMDEVINS)pvUser, PIOAPIC);
-    /* No locks, no checks, just do it. */
-    Assert(pDesc->offRegister < RT_ELEMENTS(pThis->au64RedirTable));
-    pThis->au64RedirTable[pDesc->offRegister] = pValue->u64;
-    return VINF_SUCCESS;
-}
-
-/** IOREDTBLn sub fields. */
-static DBGFREGSUBFIELD const g_aRteSubs[] =
-{
-    { "vector",       0,   8,  0,  0, NULL, NULL },
-    { "dlvr_mode",    8,   3,  0,  0, NULL, NULL },
-    { "dest_mode",    11,  1,  0,  0, NULL, NULL },
-    { "dlvr_status",  12,  1,  0,  DBGFREGSUBFIELD_FLAGS_READ_ONLY, NULL, NULL },
-    { "polarity",     13,  1,  0,  0, NULL, NULL },
-    { "remote_irr",   14,  1,  0,  DBGFREGSUBFIELD_FLAGS_READ_ONLY, NULL, NULL },
-    { "trigger_mode", 15,  1,  0,  0, NULL, NULL },
-    { "mask",         16,  1,  0,  0, NULL, NULL },
-#if IOAPIC_HARDWARE_VERSION == IOAPIC_HARDWARE_VERSION_ICH9
-    { "ext_dest_id",  48,  8,  0,  DBGFREGSUBFIELD_FLAGS_READ_ONLY, NULL, NULL },
-#endif
-    { "dest",         56,  8,  0,  0, NULL, NULL },
-    DBGFREGSUBFIELD_TERMINATOR()
-};
-
-/** Register descriptors for DBGF. */
-static DBGFREGDESC const g_aRegDesc[] =
-{
-    { "index",      DBGFREG_END, DBGFREGVALTYPE_U8,  0,  0, ioapicDbgReg_GetIndex, ioapicDbgReg_SetIndex,    NULL, NULL },
-    { "data",       DBGFREG_END, DBGFREGVALTYPE_U32, 0,  0, ioapicDbgReg_GetData,  ioapicDbgReg_SetData,     NULL, NULL },
-    { "version",    DBGFREG_END, DBGFREGVALTYPE_U32, DBGFREG_FLAGS_READ_ONLY, 0, ioapicDbgReg_GetVersion, NULL, NULL, NULL },
-#if IOAPIC_HARDWARE_VERSION == IOAPIC_HARDWARE_VERSION_82093AA
-    { "arb",        DBGFREG_END, DBGFREGVALTYPE_U32, DBGFREG_FLAGS_READ_ONLY, 0, ioapicDbgReg_GetArb,     NULL, NULL, NULL },
-#endif
-    { "rte0",       DBGFREG_END, DBGFREGVALTYPE_U64, 0,  0, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
-    { "rte1",       DBGFREG_END, DBGFREGVALTYPE_U64, 0,  1, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
-    { "rte2",       DBGFREG_END, DBGFREGVALTYPE_U64, 0,  2, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
-    { "rte3",       DBGFREG_END, DBGFREGVALTYPE_U64, 0,  3, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
-    { "rte4",       DBGFREG_END, DBGFREGVALTYPE_U64, 0,  4, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
-    { "rte5",       DBGFREG_END, DBGFREGVALTYPE_U64, 0,  5, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
-    { "rte6",       DBGFREG_END, DBGFREGVALTYPE_U64, 0,  6, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
-    { "rte7",       DBGFREG_END, DBGFREGVALTYPE_U64, 0,  7, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
-    { "rte8",       DBGFREG_END, DBGFREGVALTYPE_U64, 0,  8, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
-    { "rte9",       DBGFREG_END, DBGFREGVALTYPE_U64, 0,  9, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
-    { "rte10",      DBGFREG_END, DBGFREGVALTYPE_U64, 0, 10, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
-    { "rte11",      DBGFREG_END, DBGFREGVALTYPE_U64, 0, 11, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
-    { "rte12",      DBGFREG_END, DBGFREGVALTYPE_U64, 0, 12, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
-    { "rte13",      DBGFREG_END, DBGFREGVALTYPE_U64, 0, 13, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
-    { "rte14",      DBGFREG_END, DBGFREGVALTYPE_U64, 0, 14, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
-    { "rte15",      DBGFREG_END, DBGFREGVALTYPE_U64, 0, 15, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
-    { "rte16",      DBGFREG_END, DBGFREGVALTYPE_U64, 0, 16, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
-    { "rte17",      DBGFREG_END, DBGFREGVALTYPE_U64, 0, 17, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
-    { "rte18",      DBGFREG_END, DBGFREGVALTYPE_U64, 0, 18, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
-    { "rte19",      DBGFREG_END, DBGFREGVALTYPE_U64, 0, 19, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
-    { "rte20",      DBGFREG_END, DBGFREGVALTYPE_U64, 0, 20, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
-    { "rte21",      DBGFREG_END, DBGFREGVALTYPE_U64, 0, 21, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
-    { "rte22",      DBGFREG_END, DBGFREGVALTYPE_U64, 0, 22, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
-    { "rte23",      DBGFREG_END, DBGFREGVALTYPE_U64, 0, 23, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
-    DBGFREGDESC_TERMINATOR()
-};
-
-
-/**
- * @callback_method_impl{FNDBGFHANDLERDEV}
- */
-static DECLCALLBACK(void) ioapicR3DbgInfo(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
-{
-    PCIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
-    LogFlow(("IOAPIC: ioapicR3DbgInfo: pThis=%p pszArgs=%s\n", pThis, pszArgs));
-
-    pHlp->pfnPrintf(pHlp, "I/O APIC at %#010x:\n", IOAPIC_MMIO_BASE_PHYSADDR);
-
-    uint32_t const uId = ioapicGetId(pThis);
-    pHlp->pfnPrintf(pHlp, "  ID                      = %#RX32\n", uId);
-    pHlp->pfnPrintf(pHlp, "    ID                      = %#x\n",     IOAPIC_ID_GET_ID(uId));
-
-    uint32_t const uVer = ioapicGetVersion();
-    pHlp->pfnPrintf(pHlp, "  Version                 = %#RX32\n",  uVer);
-    pHlp->pfnPrintf(pHlp, "    Version                 = %#x\n",     IOAPIC_VER_GET_VER(uVer));
-    pHlp->pfnPrintf(pHlp, "    Pin Assert Reg. Support = %RTbool\n", IOAPIC_VER_HAS_PRQ(uVer));
-    pHlp->pfnPrintf(pHlp, "    Max. Redirection Entry  = %u\n",      IOAPIC_VER_GET_MRE(uVer));
-
-#if IOAPIC_HARDWARE_VERSION == IOAPIC_HARDWARE_VERSION_82093AA
-    uint32_t const uArb = ioapicGetArb();
-    pHlp->pfnPrintf(pHlp, "  Arbitration             = %#RX32\n", uArb);
-    pHlp->pfnPrintf(pHlp, "    Arbitration ID          = %#x\n",     IOAPIC_ARB_GET_ID(uArb));
-#endif
-
-    pHlp->pfnPrintf(pHlp, "  Current index           = %#x\n",     ioapicGetIndex(pThis));
-
-    pHlp->pfnPrintf(pHlp, "  I/O Redirection Table and IRR:\n");
-    pHlp->pfnPrintf(pHlp, "  idx dst_mode dst_addr mask irr trigger rirr polar dlvr_st dlvr_mode vector\n");
-
-    for (uint8_t idxRte = 0; idxRte < RT_ELEMENTS(pThis->au64RedirTable); idxRte++)
-    {
-        static const char * const s_apszDeliveryModes[] =
-        {
-            "Fixed ",
-            "LowPri",
-            "SMI   ",
-            "Rsvd  ",
-            "NMI   ",
-            "INIT  ",
-            "Rsvd  ",
-            "ExtINT"
-        };
-
-        const uint64_t u64Rte = pThis->au64RedirTable[idxRte];
-        const char    *pszDestMode       = IOAPIC_RTE_GET_DEST_MODE(u64Rte) == 0 ? "phys" : "log ";
-        const uint8_t  uDest             = IOAPIC_RTE_GET_DEST(u64Rte);
-        const uint8_t  uMask             = IOAPIC_RTE_GET_MASK(u64Rte);
-        const char    *pszTriggerMode    = IOAPIC_RTE_GET_TRIGGER_MODE(u64Rte) == 0 ? "edge " : "level";
-        const uint8_t  uRemoteIrr        = IOAPIC_RTE_GET_REMOTE_IRR(u64Rte);
-        const char    *pszPolarity       = IOAPIC_RTE_GET_POLARITY(u64Rte) == 0 ? "acthi" : "actlo";
-        const char    *pszDeliveryStatus = IOAPIC_RTE_GET_DELIVERY_STATUS(u64Rte) == 0 ? "idle" : "pend";
-        const uint8_t  uDeliveryMode     = IOAPIC_RTE_GET_DELIVERY_MODE(u64Rte);
-        Assert(uDeliveryMode < RT_ELEMENTS(s_apszDeliveryModes));
-        const char    *pszDeliveryMode   = s_apszDeliveryModes[uDeliveryMode];
-        const uint8_t  uVector           = IOAPIC_RTE_GET_VECTOR(u64Rte);
-
-        pHlp->pfnPrintf(pHlp, "   %02d   %s      %02x     %u    %u   %s   %u   %s  %s     %s   %3u (%016llx)\n",
-                        idxRte,
-                        pszDestMode,
-                        uDest,
-                        uMask,
-                        (pThis->uIrr >> idxRte) & 1,
-                        pszTriggerMode,
-                        uRemoteIrr,
-                        pszPolarity,
-                        pszDeliveryStatus,
-                        pszDeliveryMode,
-                        uVector,
-                        u64Rte);
-    }
-}
-
-
-/**
- * @copydoc FNSSMDEVSAVEEXEC
- */
-static DECLCALLBACK(int) ioapicR3SaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
-{
-    PCIOAPIC pThis = PDMINS_2_DATA(pDevIns, PCIOAPIC);
-    LogFlow(("IOAPIC: ioapicR3SaveExec\n"));
-
-    SSMR3PutU32(pSSM, pThis->uIrr);
-    SSMR3PutU8(pSSM,  pThis->u8Id);
-    SSMR3PutU8(pSSM,  pThis->u8Index);
-    for (uint8_t idxRte = 0; idxRte < RT_ELEMENTS(pThis->au64RedirTable); idxRte++)
-        SSMR3PutU64(pSSM, pThis->au64RedirTable[idxRte]);
-
-    return VINF_SUCCESS;
-}
-
-
-/**
- * @copydoc FNSSMDEVLOADEXEC
- */
-static DECLCALLBACK(int) ioapicR3LoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass)
-{
-    PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
-    LogFlow(("APIC: apicR3LoadExec: uVersion=%u uPass=%#x\n", uVersion, uPass));
-
-    Assert(uPass == SSM_PASS_FINAL);
-    NOREF(uPass);
-
-    /* Weed out invalid versions. */
-    if (   uVersion != IOAPIC_SAVED_STATE_VERSION
-        && uVersion != IOAPIC_SAVED_STATE_VERSION_VBOX_50)
-    {
-        LogRel(("IOAPIC: ioapicR3LoadExec: Invalid/unrecognized saved-state version %u (%#x)\n", uVersion, uVersion));
-        return VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION;
-    }
-
-    if (uVersion == IOAPIC_SAVED_STATE_VERSION)
-        SSMR3GetU32(pSSM, (uint32_t *)&pThis->uIrr);
-
-    SSMR3GetU8(pSSM, (uint8_t *)&pThis->u8Id);
-    SSMR3GetU8(pSSM, (uint8_t *)&pThis->u8Index);
-    for (uint8_t idxRte = 0; idxRte < RT_ELEMENTS(pThis->au64RedirTable); idxRte++)
-        SSMR3GetU64(pSSM, &pThis->au64RedirTable[idxRte]);
-
-    return VINF_SUCCESS;
-}
-
-
-/**
- * @interface_method_impl{PDMDEVREG,pfnReset}
- */
-static DECLCALLBACK(void) ioapicR3Reset(PPDMDEVINS pDevIns)
-{
-    PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
-    LogFlow(("IOAPIC: ioapicR3Reset: pThis=%p\n", pThis));
-
-    /* There might be devices threads calling ioapicSetIrq() in parallel, hence the lock. */
-    IOAPIC_LOCK(pThis, VERR_IGNORED);
-
-    pThis->uIrr    = 0;
-    pThis->u8Index = 0;
-    pThis->u8Id    = 0;
-
-    for (uint8_t idxRte = 0; idxRte < RT_ELEMENTS(pThis->au64RedirTable); idxRte++)
-    {
-        pThis->au64RedirTable[idxRte] = IOAPIC_RTE_MASK;
-        pThis->au32TagSrc[idxRte] = 0;
-    }
-
-    IOAPIC_UNLOCK(pThis);
-}
-
-
-/**
- * @interface_method_impl{PDMDEVREG,pfnRelocate}
- */
-static DECLCALLBACK(void) ioapicR3Relocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta)
-{
-    PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
-    LogFlow(("IOAPIC: ioapicR3Relocate: pThis=%p offDelta=%RGi\n", pThis, offDelta));
-
-    pThis->pDevInsRC    = PDMDEVINS_2_RCPTR(pDevIns);
-    pThis->pIoApicHlpRC = pThis->pIoApicHlpR3->pfnGetRCHelpers(pDevIns);
-}
-
-
-/**
- * @interface_method_impl{PDMDEVREG,pfnDestruct}
- */
-static DECLCALLBACK(int) ioapicR3Destruct(PPDMDEVINS pDevIns)
-{
-    PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
-    LogFlow(("IOAPIC: ioapicR3Destruct: pThis=%p\n", pThis));
-    PDMDEV_CHECK_VERSIONS_RETURN_QUIET(pDevIns);
-
-#ifndef IOAPIC_WITH_PDM_CRITSECT
-    /*
-     * Destroy the RTE critical section.
-     */
-    if (PDMCritSectIsInitialized(&pThis->CritSect))
-        PDMR3CritSectDelete(&pThis->CritSect);
-#endif
-
-    return VINF_SUCCESS;
-}
-
-
-/**
- * @interface_method_impl{PDMDEVREG,pfnConstruct}
- */
-static DECLCALLBACK(int) ioapicR3Construct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
-{
-    PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
-    LogFlow(("IOAPIC: ioapicR3Construct: pThis=%p iInstance=%d\n", pThis, iInstance));
-    Assert(iInstance == 0);
-
-    /*
-     * Initialize the state data.
-     */
-    pThis->pDevInsR3 = pDevIns;
-    pThis->pDevInsR0 = PDMDEVINS_2_R0PTR(pDevIns);
-    pThis->pDevInsRC = PDMDEVINS_2_RCPTR(pDevIns);
-
-    /*
-     * Validate and read the configuration.
-     */
-    PDMDEV_VALIDATE_CONFIG_RETURN(pDevIns, "NumCPUs|RZEnabled", "");
-
-    /* The number of CPUs is currently unused, but left in CFGM and saved-state in case an ID of 0 is
-       upsets some guest which we haven't yet tested. */
-    uint32_t cCpus;
-    int rc = CFGMR3QueryU32Def(pCfg, "NumCPUs", &cCpus, 1);
-    if (RT_FAILURE(rc))
-        return PDMDEV_SET_ERROR(pDevIns, rc, N_("Configuration error: Failed to query integer value \"NumCPUs\""));
-    pThis->cCpus = (uint8_t)cCpus;
-
-    bool fRZEnabled;
-    rc = CFGMR3QueryBoolDef(pCfg, "RZEnabled", &fRZEnabled, true);
-    if (RT_FAILURE(rc))
-        return PDMDEV_SET_ERROR(pDevIns, rc,
-                                N_("Configuration error: Failed to query boolean value \"RZEnabled\""));
-
-    Log2(("IOAPIC: cCpus=%u fRZEnabled=%RTbool\n", cCpus, fRZEnabled));
-
-    /*
-     * We will use our own critical section for the IOAPIC device.
-     */
-    rc = PDMDevHlpSetDeviceCritSect(pDevIns, PDMDevHlpCritSectGetNop(pDevIns));
-    AssertRCReturn(rc, rc);
-
-#ifndef IOAPIC_WITH_PDM_CRITSECT
-    /*
-     * Setup the critical section to protect concurrent writes to the RTEs.
-     */
-    rc = PDMDevHlpCritSectInit(pDevIns, &pThis->CritSect, RT_SRC_POS, "IOAPIC");
-    if (RT_FAILURE(rc))
-        return PDMDevHlpVMSetError(pDevIns, rc, RT_SRC_POS, N_("IOAPIC: Failed to create critical section. rc=%Rrc"), rc);
-#endif
-
-    /*
-     * Register the IOAPIC.
-     */
-    PDMIOAPICREG IoApicReg;
-    RT_ZERO(IoApicReg);
-    IoApicReg.u32Version   = PDM_IOAPICREG_VERSION;
-    IoApicReg.pfnSetIrqR3  = ioapicSetIrq;
-    IoApicReg.pfnSendMsiR3 = ioapicSendMsi;
-    IoApicReg.pfnSetEoiR3  = ioapicSetEoi;
-    if (fRZEnabled)
-    {
-        IoApicReg.pszSetIrqRC  = "ioapicSetIrq";
-        IoApicReg.pszSetIrqR0  = "ioapicSetIrq";
-
-        IoApicReg.pszSendMsiRC = "ioapicSendMsi";
-        IoApicReg.pszSendMsiR0 = "ioapicSendMsi";
-
-        IoApicReg.pszSetEoiRC = "ioapicSetEoi";
-        IoApicReg.pszSetEoiR0 = "ioapicSetEoi";
-    }
-    rc = PDMDevHlpIOAPICRegister(pDevIns, &IoApicReg, &pThis->pIoApicHlpR3);
-    if (RT_FAILURE(rc))
-    {
-        AssertMsgFailed(("IOAPIC: PDMDevHlpIOAPICRegister failed! rc=%Rrc\n", rc));
-        return rc;
-    }
-
-    /*
-     * Register MMIO callbacks.
-     */
-    rc = PDMDevHlpMMIORegister(pDevIns, IOAPIC_MMIO_BASE_PHYSADDR, IOAPIC_MMIO_SIZE, pThis,
-                               IOMMMIO_FLAGS_READ_DWORD | IOMMMIO_FLAGS_WRITE_DWORD_ZEROED, ioapicMmioWrite, ioapicMmioRead,
-                               "I/O APIC");
-    if (RT_SUCCESS(rc))
-    {
-        if (fRZEnabled)
-        {
-            pThis->pIoApicHlpRC = pThis->pIoApicHlpR3->pfnGetRCHelpers(pDevIns);
-            rc = PDMDevHlpMMIORegisterRC(pDevIns, IOAPIC_MMIO_BASE_PHYSADDR, IOAPIC_MMIO_SIZE, NIL_RTRCPTR /* pvUser */,
-                                         "ioapicMmioWrite", "ioapicMmioRead");
-            AssertRCReturn(rc, rc);
-
-            pThis->pIoApicHlpR0 = pThis->pIoApicHlpR3->pfnGetR0Helpers(pDevIns);
-            rc = PDMDevHlpMMIORegisterR0(pDevIns, IOAPIC_MMIO_BASE_PHYSADDR, IOAPIC_MMIO_SIZE, NIL_RTR0PTR /* pvUser */,
-                                         "ioapicMmioWrite", "ioapicMmioRead");
-            AssertRCReturn(rc, rc);
-        }
-    }
-    else
-    {
-        LogRel(("IOAPIC: PDMDevHlpMMIORegister failed! rc=%Rrc\n", rc));
-        return rc;
-    }
-
-    /*
-     * Register saved-state callbacks.
-     */
-    rc = PDMDevHlpSSMRegister(pDevIns, IOAPIC_SAVED_STATE_VERSION, sizeof(*pThis), ioapicR3SaveExec, ioapicR3LoadExec);
-    if (RT_FAILURE(rc))
-    {
-        LogRel(("IOAPIC: PDMDevHlpSSMRegister failed! rc=%Rrc\n", rc));
-        return rc;
-    }
-
-    /*
-     * Register debugger info callback.
-     */
-    rc = PDMDevHlpDBGFInfoRegister(pDevIns, "ioapic", "Display IO APIC state.", ioapicR3DbgInfo);
-    AssertRCReturn(rc, rc);
-
-    /*
-     * Register debugger register access.
-     */
-    rc = PDMDevHlpDBGFRegRegister(pDevIns, g_aRegDesc); AssertRC(rc);
-    AssertRCReturn(rc, rc);
-
-#ifdef VBOX_WITH_STATISTICS
-    /*
-     * Statistics.
-     */
-    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMmioReadRZ,  STAMTYPE_COUNTER, "/Devices/IOAPIC/RZ/MmioReadRZ",  STAMUNIT_OCCURENCES, "Number of IOAPIC MMIO reads in RZ.");
-    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMmioWriteRZ, STAMTYPE_COUNTER, "/Devices/IOAPIC/RZ/MmioWriteRZ", STAMUNIT_OCCURENCES, "Number of IOAPIC MMIO writes in RZ.");
-    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatSetIrqRZ,    STAMTYPE_COUNTER, "/Devices/IOAPIC/RZ/SetIrqRZ",    STAMUNIT_OCCURENCES, "Number of IOAPIC SetIrq calls in RZ.");
-    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatSetEoiRZ,    STAMTYPE_COUNTER, "/Devices/IOAPIC/RZ/SetEoiRZ",    STAMUNIT_OCCURENCES, "Number of IOAPIC SetEoi calls in RZ.");
-
-    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMmioReadR3,  STAMTYPE_COUNTER, "/Devices/IOAPIC/R3/MmioReadR3",  STAMUNIT_OCCURENCES, "Number of IOAPIC MMIO reads in R3");
-    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMmioWriteR3, STAMTYPE_COUNTER, "/Devices/IOAPIC/R3/MmioWriteR3", STAMUNIT_OCCURENCES, "Number of IOAPIC MMIO writes in R3.");
-    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatSetIrqR3,    STAMTYPE_COUNTER, "/Devices/IOAPIC/R3/SetIrqR3",    STAMUNIT_OCCURENCES, "Number of IOAPIC SetIrq calls in R3.");
-    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatSetEoiR3,    STAMTYPE_COUNTER, "/Devices/IOAPIC/R3/SetEoiR3",    STAMUNIT_OCCURENCES, "Number of IOAPIC SetEoi calls in R3.");
-
-    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatRedundantEdgeIntr,   STAMTYPE_COUNTER, "/Devices/IOAPIC/RedundantEdgeIntr",   STAMUNIT_OCCURENCES, "Number of redundant edge-triggered interrupts (no IRR change).");
-    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatRedundantLevelIntr,  STAMTYPE_COUNTER, "/Devices/IOAPIC/RedundantLevelIntr",  STAMUNIT_OCCURENCES, "Number of redundant level-triggered interrupts (no IRR change).");
-    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatSuppressedLevelIntr, STAMTYPE_COUNTER, "/Devices/IOAPIC/SuppressedLevelIntr", STAMUNIT_OCCURENCES, "Number of suppressed level-triggered interrupts by remote IRR.");
-
-    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatEoiContention,    STAMTYPE_COUNTER, "/Devices/IOAPIC/CritSect/ContentionSetEoi", STAMUNIT_OCCURENCES, "Number of times the critsect is busy during EOI writes causing trips to R3.");
-    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatSetRteContention, STAMTYPE_COUNTER, "/Devices/IOAPIC/CritSect/ContentionSetRte", STAMUNIT_OCCURENCES, "Number of times the critsect is busy during RTE writes causing trips to R3.");
-
-    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatLevelIrqSent, STAMTYPE_COUNTER, "/Devices/IOAPIC/LevelIntr/Sent", STAMUNIT_OCCURENCES, "Number of level-triggered interrupts sent to the local APIC(s).");
-    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatEoiReceived,  STAMTYPE_COUNTER, "/Devices/IOAPIC/LevelIntr/Recv", STAMUNIT_OCCURENCES, "Number of EOIs received for level-triggered interrupts from the local APIC(s).");
-#endif
-
-    /*
-     * Init. the device state.
-     */
-    LogRel(("IOAPIC: Using implementation 2.0!\n"));
-    ioapicR3Reset(pDevIns);
-
-    return VINF_SUCCESS;
-}
-
-
-/**
- * IO APIC device registration structure.
- */
-const PDMDEVREG g_DeviceIOAPIC =
-{
-    /* u32Version */
-    PDM_DEVREG_VERSION,
-    /* szName */
-    "ioapic",
-    /* szRCMod */
-    "VBoxDDRC.rc",
-    /* szR0Mod */
-    "VBoxDDR0.r0",
-    /* pszDescription */
-    "I/O Advanced Programmable Interrupt Controller (IO-APIC) Device",
-    /* fFlags */
-      PDM_DEVREG_FLAGS_HOST_BITS_DEFAULT | PDM_DEVREG_FLAGS_GUEST_BITS_32_64 | PDM_DEVREG_FLAGS_PAE36
-    | PDM_DEVREG_FLAGS_RC | PDM_DEVREG_FLAGS_R0,
-    /* fClass */
-    PDM_DEVREG_CLASS_PIC,
-    /* cMaxInstances */
-    1,
-    /* cbInstance */
-    sizeof(IOAPIC),
-    /* pfnConstruct */
-    ioapicR3Construct,
-    /* pfnDestruct */
-    ioapicR3Destruct,
-    /* pfnRelocate */
-    ioapicR3Relocate,
-    /* pfnMemSetup */
-    NULL,
-    /* pfnPowerOn */
-    NULL,
-    /* pfnReset */
-    ioapicR3Reset,
-    /* pfnSuspend */
-    NULL,
-    /* pfnResume */
-    NULL,
-    /* pfnAttach */
-    NULL,
-    /* pfnDetach */
-    NULL,
-    /* pfnQueryInterface. */
-    NULL,
-    /* pfnInitComplete */
-    NULL,
-    /* pfnPowerOff */
-    NULL,
-    /* pfnSoftReset */
-    NULL,
-    /* u32VersionEnd */
-    PDM_DEVREG_VERSION
-};
-
-#endif /* IN_RING3 */
-
-#endif /* !VBOX_DEVICE_STRUCT_TESTCASE */
-
diff --git a/src/VBox/Devices/PC/DevIoApic.cpp b/src/VBox/Devices/PC/DevIoApic.cpp
index 07d292d..ca1de9d 100644
--- a/src/VBox/Devices/PC/DevIoApic.cpp
+++ b/src/VBox/Devices/PC/DevIoApic.cpp
@@ -1,10 +1,10 @@
 /* $Id: DevIoApic.cpp $ */
 /** @file
- * I/O Advanced Programmable Interrupt Controller (IO-APIC) Device.
+ * IO APIC - Input/Output Advanced Programmable Interrupt Controller.
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -13,29 +13,6 @@
  * Foundation, in version 2 as it comes in the "COPYING" file of the
  * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- * --------------------------------------------------------------------
- *
- * This code is based on:
- *
- * apic.c revision 1.5  @@OSETODO
- *
- *  APIC support
- *
- *  Copyright (c) 2004-2005 Fabrice Bellard
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 
@@ -43,58 +20,185 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #define LOG_GROUP LOG_GROUP_DEV_IOAPIC
-#include <VBox/vmm/pdmdev.h>
-
 #include <VBox/log.h>
-#include <VBox/vmm/stam.h>
-#include <iprt/assert.h>
-#include <iprt/asm.h>
-
+#include <VBox/vmm/hm.h>
 #include <VBox/msi.h>
+#include <VBox/vmm/pdmdev.h>
 
-#include "VBoxDD2.h"
-#include "DevApic.h"
+#include "VBoxDD.h"
+#include <iprt/x86.h>
 
 
 /*********************************************************************************************************************************
 *   Defined Constants And Macros                                                                                                 *
 *********************************************************************************************************************************/
-/** @def IOAPIC_LOCK
- * Acquires the PDM lock. */
-#define IOAPIC_LOCK(pThis, rc) \
-    do { \
-        int rc2 = (pThis)->CTX_SUFF(pIoApicHlp)->pfnLock((pThis)->CTX_SUFF(pDevIns), rc); \
-        if (rc2 != VINF_SUCCESS) \
-            return rc2; \
-    } while (0)
+/** The current IO APIC saved state version. */
+#define IOAPIC_SAVED_STATE_VERSION              2
+/** The saved state version used by VirtualBox 5.0 and
+ *  earlier.  */
+#define IOAPIC_SAVED_STATE_VERSION_VBOX_50      1
 
-/** @def IOAPIC_UNLOCK
- * Releases the PDM lock. */
-#define IOAPIC_UNLOCK(pThis) (pThis)->CTX_SUFF(pIoApicHlp)->pfnUnlock((pThis)->CTX_SUFF(pDevIns))
+/** Implementation specified by the "Intel I/O Controller Hub 9
+ *  (ICH9) Family" */
+#define IOAPIC_HARDWARE_VERSION_ICH9            1
+/** Implementation specified by the "82093AA I/O Advanced Programmable Interrupt
+Controller" */
+#define IOAPIC_HARDWARE_VERSION_82093AA         2
+/** The IO APIC implementation to use. */
+#define IOAPIC_HARDWARE_VERSION                 IOAPIC_HARDWARE_VERSION_ICH9
+
+#if IOAPIC_HARDWARE_VERSION == IOAPIC_HARDWARE_VERSION_82093AA
+/** The version. */
+# define IOAPIC_VERSION                         0x11
+/** The ID mask. */
+# define IOAPIC_ID_MASK                         0x0f
+#elif IOAPIC_HARDWARE_VERSION == IOAPIC_HARDWARE_VERSION_ICH9
+/** The version. */
+# define IOAPIC_VERSION                         0x20
+/** The ID mask. */
+# define IOAPIC_ID_MASK                         0xff
+#else
+# error "Implement me"
+#endif
 
-#define DEBUG_IOAPIC
-#define IOAPIC_NUM_PINS                 0x18
+/** The default MMIO base physical address. */
+#define IOAPIC_MMIO_BASE_PHYSADDR               UINT64_C(0xfec00000)
+/** The size of the MMIO range. */
+#define IOAPIC_MMIO_SIZE                        X86_PAGE_4K_SIZE
+/** The mask for getting direct registers from physical address. */
+#define IOAPIC_MMIO_REG_MASK                    0xff
+
+/** The number of interrupt input pins. */
+#define IOAPIC_NUM_INTR_PINS                    24
+/** Maximum redirection entires. */
+#define IOAPIC_MAX_REDIR_ENTRIES                (IOAPIC_NUM_INTR_PINS - 1)
+
+/** Version register - Gets the version. */
+#define IOAPIC_VER_GET_VER(a_Reg)               ((a_Reg) & 0xff)
+/** Version register - Gets the maximum redirection entry. */
+#define IOAPIC_VER_GET_MRE(a_Reg)               (((a_Reg) >> 16) & 0xff)
+/** Version register - Gets whether Pin Assertion Register (PRQ) is
+ *  supported. */
+#define IOAPIC_VER_HAS_PRQ(a_Reg)               RT_BOOL((a_Reg) & RT_BIT_32(15))
+
+/** Index register - Valid write mask. */
+#define IOAPIC_INDEX_VALID_WRITE_MASK           UINT32_C(0xff)
+
+/** Arbitration register - Gets the ID. */
+#define IOAPIC_ARB_GET_ID(a_Reg)                ((a_Reg) >> 24 & 0xf)
+
+/** ID register - Gets the ID. */
+#define IOAPIC_ID_GET_ID(a_Reg)                 ((a_Reg) >> 24 & IOAPIC_ID_MASK)
+
+/** Redirection table entry - Vector. */
+#define IOAPIC_RTE_VECTOR                       UINT64_C(0xff)
+/** Redirection table entry - Delivery mode. */
+#define IOAPIC_RTE_DELIVERY_MODE                (RT_BIT_64(8) | RT_BIT_64(9) | RT_BIT_64(10))
+/** Redirection table entry - Destination mode. */
+#define IOAPIC_RTE_DEST_MODE                    RT_BIT_64(11)
+/** Redirection table entry - Delivery status. */
+#define IOAPIC_RTE_DELIVERY_STATUS              RT_BIT_64(12)
+/** Redirection table entry - Interrupt input pin polarity. */
+#define IOAPIC_RTE_POLARITY                     RT_BIT_64(13)
+/** Redirection table entry - Remote IRR. */
+#define IOAPIC_RTE_REMOTE_IRR                   RT_BIT_64(14)
+/** Redirection table entry - Trigger Mode. */
+#define IOAPIC_RTE_TRIGGER_MODE                 RT_BIT_64(15)
+/** Redirection table entry - the mask bit number. */
+#define IOAPIC_RTE_MASK_BIT                     16
+/** Redirection table entry - the mask. */
+#define IOAPIC_RTE_MASK                         RT_BIT_64(IOAPIC_RTE_MASK_BIT)
+/** Redirection table entry - Extended Destination ID. */
+#define IOAPIC_RTE_EXT_DEST_ID                  UINT64_C(0x00ff000000000000)
+/** Redirection table entry - Destination. */
+#define IOAPIC_RTE_DEST                         UINT64_C(0xff00000000000000)
+
+/** Redirection table entry - Gets the destination. */
+#define IOAPIC_RTE_GET_DEST(a_Reg)              ((a_Reg) >> 56 & 0xff)
+/** Redirection table entry - Gets the mask flag. */
+#define IOAPIC_RTE_GET_MASK(a_Reg)              (((a_Reg) >> IOAPIC_RTE_MASK_BIT) & 0x1)
+/** Redirection table entry - Checks whether it's masked. */
+#define IOAPIC_RTE_IS_MASKED(a_Reg)             ((a_Reg) & IOAPIC_RTE_MASK)
+/** Redirection table entry - Gets the trigger mode. */
+#define IOAPIC_RTE_GET_TRIGGER_MODE(a_Reg)      (((a_Reg) >> 15) & 0x1)
+/** Redirection table entry - Gets the remote IRR flag. */
+#define IOAPIC_RTE_GET_REMOTE_IRR(a_Reg)        (((a_Reg) >> 14) & 0x1)
+/** Redirection table entry - Gets the interrupt pin polarity. */
+#define IOAPIC_RTE_GET_POLARITY(a_Reg)          (((a_Reg) >> 13) & 0x1)
+/** Redirection table entry - Gets the delivery status. */
+#define IOAPIC_RTE_GET_DELIVERY_STATUS(a_Reg)   (((a_Reg) >> 12) & 0x1)
+/** Redirection table entry - Gets the destination mode. */
+#define IOAPIC_RTE_GET_DEST_MODE(a_Reg)         (((a_Reg) >> 11) & 0x1)
+/** Redirection table entry - Gets the delivery mode. */
+#define IOAPIC_RTE_GET_DELIVERY_MODE(a_Reg)     (((a_Reg) >> 8)  & 0x7)
+/** Redirection table entry - Gets the vector. */
+#define IOAPIC_RTE_GET_VECTOR(a_Reg)            ((a_Reg) & IOAPIC_RTE_VECTOR)
+
+#if IOAPIC_HARDWARE_VERSION == IOAPIC_HARDWARE_VERSION_82093AA
+/** Redirection table entry - Valid write mask. */
+#define IOAPIC_RTE_VALID_WRITE_MASK             (  IOAPIC_RTE_DEST     | IOAPIC_RTE_MASK      | IOAPIC_RTE_TRIGGER_MODE \
+                                                 | IOAPIC_RTE_POLARITY | IOAPIC_RTE_DEST_MODE | IOAPIC_RTE_DELIVERY_MODE \
+                                                 | IOAPIC_RTE_VECTOR)
+/** Redirection table entry - Valid read mask. */
+# define IOAPIC_RTE_VALID_READ_MASK             (  IOAPIC_RTE_DEST       | IOAPIC_RTE_MASK          | IOAPIC_RTE_TRIGGER_MODE \
+                                                 | IOAPIC_RTE_REMOTE_IRR | IOAPIC_RTE_POLARITY      | IOAPIC_RTE_DELIVERY_STATUS \
+                                                 | IOAPIC_RTE_DEST_MODE  | IOAPIC_RTE_DELIVERY_MODE | IOAPIC_RTE_VECTOR)
+#elif IOAPIC_HARDWARE_VERSION == IOAPIC_HARDWARE_VERSION_ICH9
+/** Redirection table entry - Valid write mask (incl. remote IRR). */
+#define IOAPIC_RTE_VALID_WRITE_MASK             (  IOAPIC_RTE_DEST       | IOAPIC_RTE_MASK      | IOAPIC_RTE_TRIGGER_MODE \
+                                                 /*| IOAPIC_RTE_REMOTE_IRR */| IOAPIC_RTE_POLARITY  | IOAPIC_RTE_DEST_MODE \
+                                                 | IOAPIC_RTE_DELIVERY_MODE | IOAPIC_RTE_VECTOR)
+/** Redirection table entry - Valid read mask (incl. ExtDestID). */
+# define IOAPIC_RTE_VALID_READ_MASK             (  IOAPIC_RTE_DEST            | IOAPIC_RTE_EXT_DEST_ID | IOAPIC_RTE_MASK \
+                                                 | IOAPIC_RTE_TRIGGER_MODE    | IOAPIC_RTE_REMOTE_IRR  | IOAPIC_RTE_POLARITY \
+                                                 | IOAPIC_RTE_DELIVERY_STATUS | IOAPIC_RTE_DEST_MODE   | IOAPIC_RTE_DELIVERY_MODE \
+                                                 | IOAPIC_RTE_VECTOR)
+#endif
+/** Redirection table entry - Trigger mode edge. */
+#define IOAPIC_RTE_TRIGGER_MODE_EDGE            0
+/** Redirection table entry - Trigger mode level. */
+#define IOAPIC_RTE_TRIGGER_MODE_LEVEL           1
+/** Redirection table entry - Destination mode physical. */
+#define IOAPIC_RTE_DEST_MODE_PHYSICAL           0
+/** Redirection table entry - Destination mode logical. */
+#define IOAPIC_RTE_DEST_MODE_LOGICAL            1
+
+
+/** Index of indirect registers in the I/O APIC register table. */
+#define IOAPIC_INDIRECT_INDEX_ID                0x0
+#define IOAPIC_INDIRECT_INDEX_VERSION           0x1
+#if IOAPIC_HARDWARE_VERSION == IOAPIC_HARDWARE_VERSION_82093AA
+# define IOAPIC_INDIRECT_INDEX_ARB              0x2
+#endif
+#define IOAPIC_INDIRECT_INDEX_REDIR_TBL_START   0x10
+#define IOAPIC_INDIRECT_INDEX_REDIR_TBL_END     0x3F
+
+/** Offset of direct registers in the I/O APIC MMIO space. */
+#define IOAPIC_DIRECT_OFF_INDEX                 0x00
+#define IOAPIC_DIRECT_OFF_DATA                  0x10
+#if IOAPIC_HARDWARE_VERSION == IOAPIC_HARDWARE_VERSION_ICH9
+# define IOAPIC_DIRECT_OFF_EOI                  0x40
+#endif
 
-/** The old code (this file) */
-#define IOAPIC_SAVED_STATE_VERSION_VBOX_50      1
-/** The new code (DevIOAPIC_New). We need to be able to load this SSM as well. */
-#define IOAPIC_SAVED_STATE_VERSION_NEW_CODE     2
+/* Use PDM critsect for now for I/O APIC locking, see @bugref{8245#c121}. */
+#define IOAPIC_WITH_PDM_CRITSECT
+#ifdef IOAPIC_WITH_PDM_CRITSECT
+# define IOAPIC_LOCK(pThis, rcBusy)         (pThis)->CTX_SUFF(pIoApicHlp)->pfnLock((pThis)->CTX_SUFF(pDevIns), (rcBusy))
+# define IOAPIC_UNLOCK(pThis)               (pThis)->CTX_SUFF(pIoApicHlp)->pfnUnlock((pThis)->CTX_SUFF(pDevIns))
+#else
+# define IOAPIC_LOCK(pThis, rcBusy)         PDMCritSectEnter(&(pThis)->CritSect, (rcBusy))
+# define IOAPIC_UNLOCK(pThis)               PDMCritSectLeave(&(pThis)->CritSect)
+#endif
 
 
 /*********************************************************************************************************************************
 *   Structures and Typedefs                                                                                                      *
 *********************************************************************************************************************************/
+/**
+ * The per-VM I/O APIC device state.
+ */
 typedef struct IOAPIC
 {
-    uint8_t                 id;
-    uint8_t                 ioregsel;
-    uint8_t                 cCpus;
-
-    uint32_t                irr;
-    uint64_t                ioredtbl[IOAPIC_NUM_PINS];
-    /** The IRQ tags and source IDs for each pin (tracing purposes). */
-    uint32_t                auTagSrc[IOAPIC_NUM_PINS];
-
     /** The device instance - R3 Ptr. */
     PPDMDEVINSR3            pDevInsR3;
     /** The IOAPIC helpers - R3 Ptr. */
@@ -110,654 +214,967 @@ typedef struct IOAPIC
     /** The IOAPIC helpers - RC Ptr. */
     PCPDMIOAPICHLPRC        pIoApicHlpRC;
 
-# ifdef VBOX_WITH_STATISTICS
-    STAMCOUNTER             StatMMIOReadGC;
-    STAMCOUNTER             StatMMIOReadHC;
-    STAMCOUNTER             StatMMIOWriteGC;
-    STAMCOUNTER             StatMMIOWriteHC;
-    STAMCOUNTER             StatSetIrqGC;
-    STAMCOUNTER             StatSetIrqHC;
-# endif
+    /** The ID register. */
+    uint8_t volatile        u8Id;
+    /** The index register. */
+    uint8_t volatile        u8Index;
+    /** Number of CPUs. */
+    uint8_t                 cCpus;
+    /* Alignment padding. */
+    uint8_t                 u8Padding0[5];
+
+    /** The redirection table registers. */
+    uint64_t                au64RedirTable[IOAPIC_NUM_INTR_PINS];
+    /** The IRQ tags and source IDs for each pin (tracing purposes). */
+    uint32_t                au32TagSrc[IOAPIC_NUM_INTR_PINS];
+
+    /** Alignment padding. */
+    uint32_t                u32Padding2;
+    /** The internal IRR reflecting state of the interrupt lines. */
+    uint32_t                uIrr;
+
+#ifndef IOAPIC_WITH_PDM_CRITSECT
+    /** The critsect for updating to the RTEs. */
+    PDMCRITSECT             CritSect;
+#endif
+
+#ifdef VBOX_WITH_STATISTICS
+    /** Number of MMIO reads in RZ. */
+    STAMCOUNTER             StatMmioReadRZ;
+    /** Number of MMIO reads in R3. */
+    STAMCOUNTER             StatMmioReadR3;
+
+    /** Number of MMIO writes in RZ. */
+    STAMCOUNTER             StatMmioWriteRZ;
+    /** Number of MMIO writes in R3. */
+    STAMCOUNTER             StatMmioWriteR3;
+
+    /** Number of SetIrq calls in RZ. */
+    STAMCOUNTER             StatSetIrqRZ;
+    /** Number of SetIrq calls in R3. */
+    STAMCOUNTER             StatSetIrqR3;
+
+    /** Number of SetEoi calls in RZ. */
+    STAMCOUNTER             StatSetEoiRZ;
+    /** Number of SetEoi calls in R3. */
+    STAMCOUNTER             StatSetEoiR3;
+
+    /** Number of redundant edge-triggered interrupts. */
+    STAMCOUNTER             StatRedundantEdgeIntr;
+    /** Number of redundant level-triggered interrupts. */
+    STAMCOUNTER             StatRedundantLevelIntr;
+    /** Number of suppressed level-triggered interrupts (by remote IRR). */
+    STAMCOUNTER             StatSuppressedLevelIntr;
+    /** Number of returns to ring-3 due to EOI broadcast lock contention. */
+    STAMCOUNTER             StatEoiContention;
+    /** Number of returns to ring-3 due to Set RTE lock contention. */
+    STAMCOUNTER             StatSetRteContention;
+    /** Number of level-triggered interrupts dispatched to the local APIC(s). */
+    STAMCOUNTER             StatLevelIrqSent;
+    /** Number of EOIs received for level-triggered interrupts from the local
+     *  APIC(s). */
+    STAMCOUNTER             StatEoiReceived;
+#endif
 } IOAPIC;
+/** Pointer to IOAPIC data. */
 typedef IOAPIC *PIOAPIC;
+/** Pointer to a const IOAPIC data. */
+typedef IOAPIC const *PCIOAPIC;
+AssertCompileMemberAlignment(IOAPIC, au64RedirTable, 8);
 
 #ifndef VBOX_DEVICE_STRUCT_TESTCASE
 
-
-/*********************************************************************************************************************************
-*   Internal Functions                                                                                                           *
-*********************************************************************************************************************************/
+#if IOAPIC_HARDWARE_VERSION == IOAPIC_HARDWARE_VERSION_82093AA
+/**
+ * Gets the arbitration register.
+ *
+ * @returns The arbitration.
+ */
+DECLINLINE(uint32_t) ioapicGetArb(void)
+{
+    Log2(("IOAPIC: ioapicGetArb: returns 0\n"));
+    return 0;
+}
+#endif
 
 
-static void ioapic_service(PIOAPIC pThis)
+/**
+ * Gets the version register.
+ *
+ * @returns The version.
+ */
+DECLINLINE(uint32_t) ioapicGetVersion(void)
 {
-    uint8_t i;
-    uint8_t trig_mode;
-    uint8_t vector;
-    uint8_t delivery_mode;
-    uint32_t mask;
-    uint64_t entry;
-    uint8_t dest;
-    uint8_t dest_mode;
-    uint8_t polarity;
-
-    for (i = 0; i < IOAPIC_NUM_PINS; i++)
-    {
-        mask = 1 << i;
-        if (pThis->irr & mask)
-        {
-            entry = pThis->ioredtbl[i];
-            if (!(entry & APIC_LVT_MASKED))
-            {
-                trig_mode = ((entry >> 15) & 1);
-                dest = entry >> 56;
-                dest_mode = (entry >> 11) & 1;
-                delivery_mode = (entry >> 8) & 7;
-                polarity = (entry >> 13) & 1;
-                uint32_t uTagSrc = pThis->auTagSrc[i];
-                if (trig_mode == APIC_TRIGGER_EDGE)
-                {
-                    pThis->auTagSrc[i] = 0;
-                    pThis->irr &= ~mask;
-                }
-                if (delivery_mode == APIC_DM_EXTINT)
-                    /* malc: i'm still not so sure about ExtINT delivery */
-                {
-                    AssertMsgFailed(("Delivery mode ExtINT"));
-                    vector = 0xff; /* incorrect but shuts up gcc. */
-                }
-                else
-                    vector = entry & 0xff;
-
-                int rc = pThis->CTX_SUFF(pIoApicHlp)->pfnApicBusDeliver(pThis->CTX_SUFF(pDevIns),
-                                                                        dest,
-                                                                        dest_mode,
-                                                                        delivery_mode,
-                                                                        vector,
-                                                                        polarity,
-                                                                        trig_mode,
-                                                                        uTagSrc);
-                /* We must be sure that attempts to reschedule in R3
-                   never get here */
-                Assert(rc == VINF_SUCCESS || rc == VERR_APIC_INTR_DISCARDED);
-            }
-        }
-    }
+    uint32_t uValue = RT_MAKE_U32(IOAPIC_VERSION, IOAPIC_MAX_REDIR_ENTRIES);
+    Log2(("IOAPIC: ioapicGetVersion: returns %#RX32\n", uValue));
+    return uValue;
 }
 
 
-static void ioapic_set_irq(PIOAPIC pThis, int vector, int level, uint32_t uTagSrc)
+/**
+ * Sets the ID register.
+ *
+ * @param   pThis       Pointer to the IOAPIC instance.
+ * @param   uValue      The value to set.
+ */
+DECLINLINE(void) ioapicSetId(PIOAPIC pThis, uint32_t uValue)
 {
-    if (vector >= 0 && vector < IOAPIC_NUM_PINS)
-    {
-        uint32_t mask = 1 << vector;
-        uint64_t entry = pThis->ioredtbl[vector];
+    Log2(("IOAPIC: ioapicSetId: uValue=%#RX32\n", uValue));
+    ASMAtomicWriteU8(&pThis->u8Id, (uValue >> 24) & IOAPIC_ID_MASK);
+}
 
-        if ((entry >> 15) & 1)
-        {
-            /* level triggered */
-            if (level)
-            {
-                pThis->irr |= mask;
-                if (!pThis->auTagSrc[vector])
-                    pThis->auTagSrc[vector] = uTagSrc;
-                else
-                    pThis->auTagSrc[vector] = RT_BIT_32(31);
 
-                ioapic_service(pThis);
+/**
+ * Gets the ID register.
+ *
+ * @returns The ID.
+ * @param   pThis       Pointer to the IOAPIC instance.
+ */
+DECLINLINE(uint32_t) ioapicGetId(PCIOAPIC pThis)
+{
+    uint32_t uValue = (uint32_t)(pThis->u8Id & IOAPIC_ID_MASK) << 24;
+    Log2(("IOAPIC: ioapicGetId: returns %#RX32\n", uValue));
+    return uValue;
+}
 
-                if ((level & PDM_IRQ_LEVEL_FLIP_FLOP) == PDM_IRQ_LEVEL_FLIP_FLOP)
-                {
-                    pThis->irr &= ~mask;
-                    pThis->auTagSrc[vector] = 0;
-                }
-            }
-            else
-            {
-                pThis->irr &= ~mask;
-                pThis->auTagSrc[vector] = 0;
-            }
-        }
-        else
-        {
-            /* edge triggered */
-            if (level)
-            {
-                pThis->irr |= mask;
-                if (!pThis->auTagSrc[vector])
-                    pThis->auTagSrc[vector] = uTagSrc;
-                else
-                    pThis->auTagSrc[vector] = RT_BIT_32(31);
 
-                ioapic_service(pThis);
-            }
-        }
-    }
+/**
+ * Sets the index register.
+ *
+ * @param pThis     Pointer to the IOAPIC instance.
+ * @param uValue    The value to set.
+ */
+DECLINLINE(void) ioapicSetIndex(PIOAPIC pThis, uint32_t uValue)
+{
+    LogFlow(("IOAPIC: ioapicSetIndex: uValue=%#RX32\n", uValue));
+    ASMAtomicWriteU8(&pThis->u8Index, uValue & IOAPIC_INDEX_VALID_WRITE_MASK);
 }
 
 
 /**
- * Handles a read from the IOAPICID register.
+ * Gets the index register.
+ *
+ * @returns The index value.
  */
-static int ioapic_IoApicId_r(PIOAPIC pThis, uint32_t *pu32Value)
+DECLINLINE(uint32_t) ioapicGetIndex(PCIOAPIC pThis)
 {
-    *pu32Value = (uint32_t)pThis->id << 24;
-    return VINF_SUCCESS;
+    uint32_t const uValue = pThis->u8Index;
+    LogFlow(("IOAPIC: ioapicGetIndex: returns %#x\n", uValue));
+    return uValue;
 }
 
 
 /**
- * Handles a write to the IOAPICID register.
+ * Signals the next pending interrupt for the specified Redirection Table Entry
+ * (RTE).
+ *
+ * @param   pThis       The IOAPIC instance.
+ * @param   idxRte      The index of the RTE.
+ *
+ * @remarks It is the responsibility of the caller to verify that an interrupt is
+ *          pending for the pin corresponding to the RTE before calling this
+ *          function.
  */
-static int ioapic_IoApicId_w(PIOAPIC pThis, uint32_t u32Value)
+static void ioapicSignalIntrForRte(PIOAPIC pThis, uint8_t idxRte)
 {
-    /* Note! Compared to the 82093AA spec, we've extended the IOAPIC
-             identification from bits 27:24 to bits 31:24. */
-    Log(("ioapic: IOAPICID %#x -> %#x\n", pThis->id, u32Value >> 24));
-    pThis->id = u32Value >> 24;
-    return VINF_SUCCESS;
+#ifndef IOAPIC_WITH_PDM_CRITSECT
+    Assert(PDMCritSectIsOwner(&pThis->CritSect));
+#endif
+
+    /* Ensure the RTE isn't masked. */
+    uint64_t const u64Rte = pThis->au64RedirTable[idxRte];
+    if (!IOAPIC_RTE_IS_MASKED(u64Rte))
+    {
+        /* We cannot accept another level-triggered interrupt until remote IRR has been cleared. */
+        uint8_t const u8TriggerMode = IOAPIC_RTE_GET_TRIGGER_MODE(u64Rte);
+        if (u8TriggerMode == IOAPIC_RTE_TRIGGER_MODE_LEVEL)
+        {
+            uint8_t const u8RemoteIrr = IOAPIC_RTE_GET_REMOTE_IRR(u64Rte);
+            if (u8RemoteIrr)
+            {
+                STAM_COUNTER_INC(&pThis->StatSuppressedLevelIntr);
+                return;
+            }
+        }
+
+        uint8_t const  u8Vector       = IOAPIC_RTE_GET_VECTOR(u64Rte);
+        uint8_t const  u8DeliveryMode = IOAPIC_RTE_GET_DELIVERY_MODE(u64Rte);
+        uint8_t const  u8DestMode     = IOAPIC_RTE_GET_DEST_MODE(u64Rte);
+        uint8_t const  u8Polarity     = IOAPIC_RTE_GET_POLARITY(u64Rte);
+        uint8_t const  u8Dest         = IOAPIC_RTE_GET_DEST(u64Rte);
+        uint32_t const u32TagSrc      = pThis->au32TagSrc[idxRte];
+
+        Log2(("IOAPIC: Signaling %s-triggered interrupt. Dest=%#x DestMode=%s Vector=%#x (%u)\n",
+              u8TriggerMode == IOAPIC_RTE_TRIGGER_MODE_EDGE ? "edge" : "level", u8Dest,
+              u8DestMode == IOAPIC_RTE_DEST_MODE_PHYSICAL ? "physical" : "logical", u8Vector, u8Vector));
+
+        /*
+         * Deliver to the local APIC via the system/3-wire-APIC bus.
+         */
+        int rc = pThis->CTX_SUFF(pIoApicHlp)->pfnApicBusDeliver(pThis->CTX_SUFF(pDevIns),
+                                                                u8Dest,
+                                                                u8DestMode,
+                                                                u8DeliveryMode,
+                                                                u8Vector,
+                                                                u8Polarity,
+                                                                u8TriggerMode,
+                                                                u32TagSrc);
+        /* Can't reschedule to R3. */
+        Assert(rc == VINF_SUCCESS || rc == VERR_APIC_INTR_DISCARDED);
+#ifdef DEBUG_ramshankar
+        if (rc == VERR_APIC_INTR_DISCARDED)
+            AssertMsgFailed(("APIC: Interrupt discarded u8Vector=%#x (%u) u64Rte=%#RX64\n", u8Vector, u8Vector, u64Rte));
+#endif
+
+        /*
+         * For level-triggered interrupts, we set the remote IRR bit to indicate
+         * the local APIC has accepted the interrupt.
+         *
+         * For edge-triggered interrupts, we should not clear the IRR bit as it
+         * should remain intact to reflect the state of the interrupt line.
+         * The device will explicitly transition to inactive state via the
+         * ioapicSetIrq() callback.
+         */
+        if (   u8TriggerMode == IOAPIC_RTE_TRIGGER_MODE_LEVEL
+            && rc == VINF_SUCCESS)
+        {
+            Assert(u8TriggerMode == IOAPIC_RTE_TRIGGER_MODE_LEVEL);
+            pThis->au64RedirTable[idxRte] |= IOAPIC_RTE_REMOTE_IRR;
+            STAM_COUNTER_INC(&pThis->StatLevelIrqSent);
+        }
+    }
 }
 
 
 /**
- * Handles a read from the IOAPICVER register.
+ * Gets the redirection table entry.
+ *
+ * @returns The redirection table entry.
+ * @param   pThis       Pointer to the IOAPIC instance.
+ * @param   uIndex      The index value.
  */
-static int ioapic_IoApicVer_r(PIOAPIC pThis, uint32_t *pu32Value)
+DECLINLINE(uint32_t) ioapicGetRedirTableEntry(PCIOAPIC pThis, uint32_t uIndex)
 {
-    *pu32Value = RT_MAKE_U32(0x11, IOAPIC_NUM_PINS - 1); /* (0x11 is the version.) */
-    return VINF_SUCCESS;
+    uint8_t const idxRte = (uIndex - IOAPIC_INDIRECT_INDEX_REDIR_TBL_START) >> 1;
+    uint32_t uValue;
+    if (!(uIndex & 1))
+        uValue = RT_LO_U32(pThis->au64RedirTable[idxRte]) & RT_LO_U32(IOAPIC_RTE_VALID_READ_MASK);
+    else
+        uValue = RT_HI_U32(pThis->au64RedirTable[idxRte]) & RT_HI_U32(IOAPIC_RTE_VALID_READ_MASK);
+
+    LogFlow(("IOAPIC: ioapicGetRedirTableEntry: uIndex=%#RX32 idxRte=%u returns %#RX32\n", uIndex, idxRte, uValue));
+    return uValue;
 }
 
 
 /**
- * Handles a read from the IOAPICARB register.
+ * Sets the redirection table entry.
+ *
+ * @param   pThis       Pointer to the IOAPIC instance.
+ * @param   uIndex      The index value.
+ * @param   uValue      The value to set.
  */
-static int ioapic_IoApicArb_r(PIOAPIC pThis, uint32_t *pu32Value)
+static int ioapicSetRedirTableEntry(PIOAPIC pThis, uint32_t uIndex, uint32_t uValue)
 {
-    *pu32Value = 0; /* (arbitration winner) */
-    return VINF_SUCCESS;
+    uint8_t const idxRte = (uIndex - IOAPIC_INDIRECT_INDEX_REDIR_TBL_START) >> 1;
+    AssertMsg(idxRte < RT_ELEMENTS(pThis->au64RedirTable), ("Invalid index %u, expected <= %u\n", idxRte,
+                                                            RT_ELEMENTS(pThis->au64RedirTable)));
+
+    int rc = IOAPIC_LOCK(pThis, VINF_IOM_R3_MMIO_WRITE);
+    if (rc == VINF_SUCCESS)
+    {
+        /*
+         * Write the low or high 32-bit value into the specified 64-bit RTE register,
+         * update only the valid, writable bits.
+         *
+         * We need to preserve the read-only bits as it can have dire consequences
+         * otherwise, see @bugref{8386#c24}.
+         */
+        uint64_t const u64Rte = pThis->au64RedirTable[idxRte];
+        if (!(uIndex & 1))
+        {
+            uint32_t const u32RtePreserveLo = RT_LO_U32(u64Rte) & ~RT_LO_U32(IOAPIC_RTE_VALID_WRITE_MASK);
+            uint32_t const u32RteNewLo      = (uValue & RT_LO_U32(IOAPIC_RTE_VALID_WRITE_MASK)) | u32RtePreserveLo;
+            uint64_t const u64RteHi         = u64Rte & UINT64_C(0xffffffff00000000);
+            pThis->au64RedirTable[idxRte]   = u64RteHi | u32RteNewLo;
+        }
+        else
+        {
+            uint32_t const u32RtePreserveHi = RT_HI_U32(u64Rte) & ~RT_HI_U32(IOAPIC_RTE_VALID_WRITE_MASK);
+            uint32_t const u32RteLo         = RT_LO_U32(u64Rte);
+            uint64_t const u64RteNewHi      = ((uint64_t)((uValue & RT_HI_U32(IOAPIC_RTE_VALID_WRITE_MASK)) | u32RtePreserveHi) << 32);
+            pThis->au64RedirTable[idxRte]   = u64RteNewHi | u32RteLo;
+        }
+
+        /*
+         * Signal the next pending interrupt for this RTE.
+         */
+        uint32_t const uPinMask = UINT32_C(1) << idxRte;
+        if (pThis->uIrr & uPinMask)
+            ioapicSignalIntrForRte(pThis, idxRte);
+
+        IOAPIC_UNLOCK(pThis);
+        LogFlow(("IOAPIC: ioapicSetRedirTableEntry: uIndex=%#RX32 idxRte=%u uValue=%#RX32\n", uIndex, idxRte, uValue));
+    }
+    else
+        STAM_COUNTER_INC(&pThis->StatSetRteContention);
+
+    return rc;
 }
 
 
 /**
- * Handles a read from the IOREGSEL register.
+ * Gets the data register.
+ *
+ * @returns The data value.
+ * @param pThis     Pointer to the IOAPIC instance.
  */
-static int ioapic_IoRegSel_r(PIOAPIC pThis, uint32_t *pu32Value)
+static uint32_t ioapicGetData(PCIOAPIC pThis)
 {
-    *pu32Value = pThis->ioregsel;
-    return VINF_SUCCESS;
+    uint8_t const uIndex = pThis->u8Index;
+    if (   uIndex >= IOAPIC_INDIRECT_INDEX_REDIR_TBL_START
+        && uIndex <= IOAPIC_INDIRECT_INDEX_REDIR_TBL_END)
+        return ioapicGetRedirTableEntry(pThis, uIndex);
+
+    uint32_t uValue;
+    switch (uIndex)
+    {
+        case IOAPIC_INDIRECT_INDEX_ID:
+            uValue = ioapicGetId(pThis);
+            break;
+
+        case IOAPIC_INDIRECT_INDEX_VERSION:
+            uValue = ioapicGetVersion();
+            break;
+
+#if IOAPIC_HARDWARE_VERSION == IOAPIC_HARDWARE_VERSION_82093AA
+        case IOAPIC_INDIRECT_INDEX_ARB:
+            uValue = ioapicGetArb();
+            break;
+#endif
+
+        default:
+            uValue = UINT32_C(0xffffffff);
+            Log2(("IOAPIC: Attempt to read register at invalid index %#x\n", uIndex));
+            break;
+    }
+    return uValue;
 }
 
+
 /**
- * Handles a write to the IOREGSEL register.
+ * Sets the data register.
+ *
+ * @param pThis     Pointer to the IOAPIC instance.
+ * @param uValue    The value to set.
  */
-static int ioapic_IoRegSel_w(PIOAPIC pThis, uint32_t u32Value)
+static int ioapicSetData(PIOAPIC pThis, uint32_t uValue)
 {
-    Log2(("ioapic: IOREGSEL %#04x -> %#04x\n", pThis->ioregsel, u32Value & 0xff));
-    /* Bits 7:0 are writable, the rest aren't. Confirmed on recent AMD box. */
-    pThis->ioregsel = u32Value & 0xff;
+    uint8_t const uIndex = pThis->u8Index;
+    LogFlow(("IOAPIC: ioapicSetData: uIndex=%#x uValue=%#RX32\n", uIndex, uValue));
+
+    if (   uIndex >= IOAPIC_INDIRECT_INDEX_REDIR_TBL_START
+        && uIndex <= IOAPIC_INDIRECT_INDEX_REDIR_TBL_END)
+        return ioapicSetRedirTableEntry(pThis, uIndex, uValue);
+
+    if (uIndex == IOAPIC_INDIRECT_INDEX_ID)
+        ioapicSetId(pThis, uValue);
+    else
+        Log2(("IOAPIC: ioapicSetData: Invalid index %#RX32, ignoring write request with uValue=%#RX32\n", uIndex, uValue));
+
     return VINF_SUCCESS;
 }
 
 
 /**
- * Handles a write to the IOWIN register.
+ * @interface_method_impl{PDMIOAPICREG,pfnSetEoiR3}
  */
-static int ioapic_IoWin_r(PIOAPIC pThis, uint32_t *pu32Value)
+PDMBOTHCBDECL(int) ioapicSetEoi(PPDMDEVINS pDevIns, uint8_t u8Vector)
 {
-    int             rc = VINF_SUCCESS;
-    uint32_t const  uIoRegSel = pThis->ioregsel;
+    PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
+    STAM_COUNTER_INC(&pThis->CTX_SUFF_Z(StatSetEoi));
+    LogFlow(("IOAPIC: ioapicSetEoi: u8Vector=%#x (%u)\n", u8Vector, u8Vector));
 
-    if (uIoRegSel == 0)
-        rc = ioapic_IoApicId_r(pThis, pu32Value);
-    else if (uIoRegSel == 1)
-        rc = ioapic_IoApicVer_r(pThis, pu32Value);
-    else if (uIoRegSel == 2)
-        rc = ioapic_IoApicArb_r(pThis, pu32Value);
-    /*
-     * IOREDTBL0..IOREDTBL23.
-     */
-    else if (uIoRegSel - UINT32_C(0x10) < IOAPIC_NUM_PINS * 2)
+    bool fRemoteIrrCleared = false;
+    int rc = IOAPIC_LOCK(pThis, VINF_IOM_R3_MMIO_WRITE);
+    if (rc == VINF_SUCCESS)
     {
-        uint32_t const  idxIoRedTbl = (uIoRegSel - UINT32_C(0x10)) >> 1;
-        if (!(uIoRegSel & 1))
-            /** @todo r=bird: Do we need to emulate DELIVS or/and Remote IRR? */
-            *pu32Value = RT_LODWORD(pThis->ioredtbl[idxIoRedTbl]);
-        else
-            *pu32Value = RT_HIDWORD(pThis->ioredtbl[idxIoRedTbl]);
+        for (uint8_t idxRte = 0; idxRte < RT_ELEMENTS(pThis->au64RedirTable); idxRte++)
+        {
+            uint64_t const u64Rte = pThis->au64RedirTable[idxRte];
+            if (IOAPIC_RTE_GET_VECTOR(u64Rte) == u8Vector)
+            {
+#ifdef DEBUG_ramshankar
+                /* This assertion may trigger when restoring saved-states created using the old, incorrect I/O APIC code. */
+                Assert(IOAPIC_RTE_GET_REMOTE_IRR(u64Rte));
+#endif
+                pThis->au64RedirTable[idxRte] &= ~IOAPIC_RTE_REMOTE_IRR;
+                fRemoteIrrCleared = true;
+                STAM_COUNTER_INC(&pThis->StatEoiReceived);
+                Log2(("IOAPIC: ioapicSetEoi: Cleared remote IRR, idxRte=%u vector=%#x (%u)\n", idxRte, u8Vector, u8Vector));
+
+                /*
+                 * Signal the next pending interrupt for this RTE.
+                 */
+                uint32_t const uPinMask = UINT32_C(1) << idxRte;
+                if (pThis->uIrr & uPinMask)
+                    ioapicSignalIntrForRte(pThis, idxRte);
+            }
+        }
+
+        IOAPIC_UNLOCK(pThis);
+        AssertMsg(fRemoteIrrCleared, ("Failed to clear remote IRR for vector %#x (%u)\n", u8Vector, u8Vector));
     }
     else
-    {
-        Log(("ioapic: Attempt to read from register %#x.\n", uIoRegSel));
-        *pu32Value = UINT32_MAX;
-    }
+        STAM_COUNTER_INC(&pThis->StatEoiContention);
 
-    Log(("ioapic: IOWIN rd -> %#010x (%Rrc)\n", *pu32Value, rc));
     return rc;
 }
 
 
 /**
- * Handles a write to the IOWIN register.
+ * @interface_method_impl{PDMIOAPICREG,pfnSetIrqR3}
  */
-static int ioapic_IoWin_w(PIOAPIC pThis, uint32_t u32Value)
+PDMBOTHCBDECL(void) ioapicSetIrq(PPDMDEVINS pDevIns, int iIrq, int iLevel, uint32_t uTagSrc)
 {
-    int             rc = VINF_SUCCESS;
-    uint32_t const  uIoRegSel = pThis->ioregsel;
-    Log2(("ioapic: IOWIN[%#04x] = %#x\n", uIoRegSel, u32Value));
+#define IOAPIC_ASSERT_IRQ(a_idxRte, a_PinMask)       do { \
+        pThis->au32TagSrc[(a_idxRte)] = !pThis->au32TagSrc[(a_idxRte)] ? uTagSrc : RT_BIT_32(31); \
+        pThis->uIrr |= a_PinMask; \
+        ioapicSignalIntrForRte(pThis, (a_idxRte)); \
+    } while (0)
 
-    /*
-     * IOAPICID.
-     */
-    if (uIoRegSel == 0)
-        rc = ioapic_IoApicId_w(pThis, u32Value);
-    /*
-     * IOREDTBL0..IOREDTBL23.
-     */
-    else if (uIoRegSel - UINT32_C(0x10) < IOAPIC_NUM_PINS * 2)
+    PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
+    LogFlow(("IOAPIC: ioapicSetIrq: iIrq=%d iLevel=%d uTagSrc=%#x\n", iIrq, iLevel, uTagSrc));
+
+    STAM_COUNTER_INC(&pThis->CTX_SUFF_Z(StatSetIrq));
+
+    if (RT_LIKELY(iIrq >= 0 && iIrq < (int)RT_ELEMENTS(pThis->au64RedirTable)))
     {
-        uint32_t const  idxIoRedTbl = (uIoRegSel - UINT32_C(0x10)) >> 1;
-        uint64_t        u64NewValue;
-        if (!(uIoRegSel & 1))
+        int rc = IOAPIC_LOCK(pThis, VINF_SUCCESS);
+        AssertRC(rc);
+
+        uint8_t  const idxRte        = iIrq;
+        uint32_t const uPinMask      = UINT32_C(1) << idxRte;
+        uint32_t const u32RteLo      = RT_LO_U32(pThis->au64RedirTable[idxRte]);
+        uint8_t  const u8TriggerMode = IOAPIC_RTE_GET_TRIGGER_MODE(u32RteLo);
+
+        bool fActive = RT_BOOL(iLevel & 1);
+        /** @todo Polarity is busted elsewhere, we need to fix that
+         *        first. See @bugref{8386#c7}. */
+#if 0
+        uint8_t const u8Polarity = IOAPIC_RTE_GET_POLARITY(u32RteLo);
+        fActive ^= u8Polarity; */
+#endif
+        if (!fActive)
         {
-            /*
-             * Low DWORD.
-             *
-             * Have to do some sanity checks here because Linux 2.6 kernels
-             * writes seemingly bogus value (u32Value = 0) in their
-             * unlock_ExtINT_logic() function. Not sure what it's good for, but
-             * we ran into trouble with INTVEC = 0.  Luckily the 82093AA specs
-             * limits the INTVEC range to 0x10 thru 0xfe, so we use this to
-             * ignore harmful values.
-             *
-             * Update: Looking at real hw (recent AMD), they don't reject
-             * invalid vector numbers, at least not at this point. Could be that
-             * some other code path needs to refuse something instead.  Results:
-             *  - Writing 0 to lo+hi -> 0.
-             *  - Writing ~0 to lo+hi -> 0xff0000000001afff.
-             *  - Writing ~0 w/ DELMOD set to 011b or 110b (both reserved)
-             *    results in DELMOD containing the reserved values.
-             *  - Ditto with same + DELMOD in [0..7], DELMOD is stored as written.
-             */
-            if (   (u32Value & APIC_LVT_MASKED)
-                || ((u32Value & UINT32_C(0xff)) - UINT32_C(0x10)) <= UINT32_C(0xee) /* (0xfe - 0x10 = 0xee) */ )
-                u64NewValue = (pThis->ioredtbl[idxIoRedTbl] & (UINT64_C(0xffffffff00000000) | RT_BIT(14) | RT_BIT(12)))
-                            | (u32Value & ~(RT_BIT(14) | RT_BIT(12)));
+            pThis->uIrr &= ~uPinMask;
+            IOAPIC_UNLOCK(pThis);
+            return;
+        }
+
+        bool const     fFlipFlop = ((iLevel & PDM_IRQ_LEVEL_FLIP_FLOP) == PDM_IRQ_LEVEL_FLIP_FLOP);
+        uint32_t const uPrevIrr  = pThis->uIrr & uPinMask;
+        if (!fFlipFlop)
+        {
+            if (u8TriggerMode == IOAPIC_RTE_TRIGGER_MODE_EDGE)
+            {
+                /*
+                 * For edge-triggered interrupts, we need to act only on a low to high edge transition.
+                 * See ICH9 spec. 13.5.7 "REDIR_TBL: Redirection Table (LPC I/F-D31:F0)".
+                 */
+                if (!uPrevIrr)
+                    IOAPIC_ASSERT_IRQ(idxRte, uPinMask);
+                else
+                {
+                    STAM_COUNTER_INC(&pThis->StatRedundantEdgeIntr);
+                    Log2(("IOAPIC: Redundant edge-triggered interrupt %#x (%u)\n", idxRte, idxRte));
+                }
+            }
             else
             {
-                LogRel(("IOAPIC GUEST BUG: bad vector writing %x(sel=%x) to %u\n", u32Value, uIoRegSel, idxIoRedTbl));
-                u64NewValue = pThis->ioredtbl[idxIoRedTbl];
+                Assert(u8TriggerMode == IOAPIC_RTE_TRIGGER_MODE_LEVEL);
+
+                /*
+                 * For level-triggered interrupts, redundant interrupts are not a problem
+                 * and will eventually be delivered anyway after an EOI, but our PDM devices
+                 * should not typically call us with no change to the level.
+                 */
+                if (!uPrevIrr)
+                { /* likely */ }
+                else
+                {
+                    STAM_COUNTER_INC(&pThis->StatRedundantLevelIntr);
+                    Log2(("IOAPIC: Redundant level-triggered interrupt %#x (%u)\n", idxRte, idxRte));
+                }
+
+                IOAPIC_ASSERT_IRQ(idxRte, uPinMask);
             }
         }
         else
         {
             /*
-             * High DWORD.
+             * The device is flip-flopping the interrupt line, which implies we should de-assert
+             * and assert the interrupt line. The interrupt line is left in the asserted state
+             * after a flip-flop request. The de-assert is a NOP wrts to signaling an interrupt
+             * hence just the assert is done.
              */
-            u64NewValue = (pThis->ioredtbl[idxIoRedTbl] & UINT64_C(0x00000000ffffffff))
-                        | ((uint64_t)(u32Value & UINT32_C(0xff000000)) << 32);
+            IOAPIC_ASSERT_IRQ(idxRte, uPinMask);
         }
 
-        Log(("ioapic: IOREDTBL%u %#018llx -> %#018llx\n", idxIoRedTbl, pThis->ioredtbl[idxIoRedTbl], u64NewValue));
-        pThis->ioredtbl[idxIoRedTbl] = u64NewValue;
-
-        ioapic_service(pThis);
+        IOAPIC_UNLOCK(pThis);
     }
-    /*
-     * Read-only or unknown registers. Log it.
-     */
-    else if (uIoRegSel == 1)
-        Log(("ioapic: Attempt to write (%#x) to IOAPICVER.\n", u32Value));
-    else if (uIoRegSel == 2)
-        Log(("ioapic: Attempt to write (%#x) to IOAPICARB.\n", u32Value));
-    else
-        Log(("ioapic: Attempt to write (%#x) to register %#x.\n", u32Value, uIoRegSel));
-
-    return rc;
+#undef IOAPIC_ASSERT_IRQ
 }
 
 
-PDMBOTHCBDECL(int) ioapicMMIORead(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void *pv, unsigned cb)
+/**
+ * @interface_method_impl{PDMIOAPICREG,pfnSendMsiR3}
+ */
+PDMBOTHCBDECL(void) ioapicSendMsi(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, uint32_t uValue, uint32_t uTagSrc)
 {
-    PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
-    IOAPIC_LOCK(pThis, VINF_IOM_R3_MMIO_READ);
-
-    STAM_COUNTER_INC(&CTXSUFF(pThis->StatMMIORead));
+    PCIOAPIC pThis = PDMINS_2_DATA(pDevIns, PCIOAPIC);
+    LogFlow(("IOAPIC: ioapicSendMsi: GCPhys=%#RGp uValue=%#RX32\n", GCPhys, uValue));
 
     /*
-     * Pass it on to the register read handlers.
-     * (See 0xff comments in ioapicMMIOWrite.)
+     * Parse the message from the physical address.
+     * See Intel spec. 10.11.1 "Message Address Register Format".
      */
-    int      rc;
-    uint32_t offReg = GCPhysAddr & 0xff;
-    if (offReg == 0)
-        rc = ioapic_IoRegSel_r(pThis, (uint32_t *)pv);
-    else if (offReg == 0x10)
-        rc = ioapic_IoWin_r(pThis, (uint32_t *)pv);
-    else
-    {
-        Log(("ioapicMMIORead: Invalid access: offReg=%#x\n", offReg));
-        rc = VINF_IOM_MMIO_UNUSED_FF;
-    }
-    Log3(("ioapicMMIORead: @%#x -> %#x %Rrc\n", offReg, *(uint32_t *)pv, rc));
-
-    IOAPIC_UNLOCK(pThis);
-    return rc;
-}
-
-PDMBOTHCBDECL(int) ioapicMMIOWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void const *pv, unsigned cb)
-{
-    PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
-
-    STAM_COUNTER_INC(&CTXSUFF(pThis->StatMMIOWrite));
-    IOAPIC_LOCK(pThis, VINF_IOM_R3_MMIO_WRITE);
+    uint8_t const u8DestAddr = (GCPhys & VBOX_MSI_ADDR_DEST_ID_MASK) >> VBOX_MSI_ADDR_DEST_ID_SHIFT;
+    uint8_t const u8DestMode = (GCPhys >> VBOX_MSI_ADDR_DEST_MODE_SHIFT) & 0x1;
+    /** @todo Check if we need to implement Redirection Hint Indicator. */
+    /* uint8_t const uRedirectHint  = (GCPhys >> VBOX_MSI_ADDR_REDIRECTION_SHIFT) & 0x1; */
 
     /*
-     * Fetch the value.
-     *
-     * We've told IOM to only give us DWORD accesses.  Observations on AMD
-     * indicates that unaligned writes get their missing bytes written as zero.
+     * Parse the message data.
+     * See Intel spec. 10.11.2 "Message Data Register Format".
      */
-    Assert(!(GCPhysAddr & 3)); Assert(cb == 4);
-    uint32_t u32Value = *(uint32_t const *)pv;
+    uint8_t const u8Vector       = (uValue & VBOX_MSI_DATA_VECTOR_MASK)  >> VBOX_MSI_DATA_VECTOR_SHIFT;
+    uint8_t const u8TriggerMode  = (uValue >> VBOX_MSI_DATA_TRIGGER_SHIFT) & 0x1;
+    uint8_t const u8DeliveryMode = (uValue >> VBOX_MSI_DATA_DELIVERY_MODE_SHIFT) & 0x7;
 
     /*
-     * The 0xff mask is because we don't really implement the APICBASE register
-     * in the PIIX3, so if the guest tries to relocate the IOAPIC via PIIX3 we
-     * won't know. The I/O APIC address is on the form FEC0xy00h, where xy is
-     * programmable. Masking 0xff means we cover the y. The x would require
-     * reregistering MMIO memory, which means the guest is out of luck there.
+     * Deliver to the local APIC via the system/3-wire-APIC bus.
      */
-    int      rc;
-    uint32_t offReg = GCPhysAddr & 0xff;
-    if (offReg == 0)
-        rc = ioapic_IoRegSel_w(pThis, u32Value);
-    else if (offReg == 0x10)
-        rc = ioapic_IoWin_w(pThis, u32Value);
-    else
+    int rc = pThis->CTX_SUFF(pIoApicHlp)->pfnApicBusDeliver(pDevIns,
+                                                            u8DestAddr,
+                                                            u8DestMode,
+                                                            u8DeliveryMode,
+                                                            u8Vector,
+                                                            0 /* u8Polarity - N/A */,
+                                                            u8TriggerMode,
+                                                            uTagSrc);
+    /* Can't reschedule to R3. */
+    Assert(rc == VINF_SUCCESS || rc == VERR_APIC_INTR_DISCARDED); NOREF(rc);
+}
+
+
+/**
+ * @callback_method_impl{FNIOMMMIOREAD}
+ */
+PDMBOTHCBDECL(int) ioapicMmioRead(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void *pv, unsigned cb)
+{
+    PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
+    STAM_COUNTER_INC(&pThis->CTX_SUFF_Z(StatMmioRead));
+    Assert(cb == 4); RT_NOREF_PV(cb); /* registered for dwords only */
+    RT_NOREF_PV(pvUser);
+
+    int       rc      = VINF_SUCCESS;
+    uint32_t *puValue = (uint32_t *)pv;
+    uint32_t  offReg  = GCPhysAddr & IOAPIC_MMIO_REG_MASK;
+    switch (offReg)
     {
-        Log(("ioapicMMIOWrite: Invalid access: offReg=%#x u32Value=%#x\n", offReg, u32Value));
-        rc = VINF_SUCCESS;
+        case IOAPIC_DIRECT_OFF_INDEX:
+            *puValue = ioapicGetIndex(pThis);
+            break;
+
+        case IOAPIC_DIRECT_OFF_DATA:
+            *puValue = ioapicGetData(pThis);
+            break;
+
+        default:
+            Log2(("IOAPIC: ioapicMmioRead: Invalid offset. GCPhysAddr=%#RGp offReg=%#x\n", GCPhysAddr, offReg));
+            rc = VINF_IOM_MMIO_UNUSED_FF;
+            break;
     }
-    Log3(("ioapicMMIOWrite: @%#x := %#x %Rrc\n", offReg, u32Value, rc));
 
-    IOAPIC_UNLOCK(pThis);
+    LogFlow(("IOAPIC: ioapicMmioRead: offReg=%#x, returns %#RX32\n", offReg, *puValue));
     return rc;
 }
 
-PDMBOTHCBDECL(void) ioapicSetIrq(PPDMDEVINS pDevIns, int iIrq, int iLevel, uint32_t uTagSrc)
-{
-    /* PDM lock is taken here; */ /** @todo add assertion */
-    PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
-    STAM_COUNTER_INC(&pThis->CTXSUFF(StatSetIrq));
-    LogFlow(("ioapicSetIrq: iIrq=%d iLevel=%d uTagSrc=%#x\n", iIrq, iLevel, uTagSrc));
-    ioapic_set_irq(pThis, iIrq, iLevel, uTagSrc);
-}
 
-PDMBOTHCBDECL(void) ioapicSendMsi(PPDMDEVINS pDevIns, RTGCPHYS GCAddr, uint32_t uValue, uint32_t uTagSrc)
+/**
+ * @callback_method_impl{FNIOMMMIOWRITE}
+ */
+PDMBOTHCBDECL(int) ioapicMmioWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void const *pv, unsigned cb)
 {
     PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
+    RT_NOREF_PV(pvUser);
 
-    LogFlow(("ioapicSendMsi: Address=%p uValue=%u\n", GCAddr, uValue));
+    STAM_COUNTER_INC(&pThis->CTX_SUFF_Z(StatMmioWrite));
 
-    uint8_t  dest = (GCAddr & VBOX_MSI_ADDR_DEST_ID_MASK) >> VBOX_MSI_ADDR_DEST_ID_SHIFT;
-    uint8_t  vector_num = (uValue & VBOX_MSI_DATA_VECTOR_MASK) >> VBOX_MSI_DATA_VECTOR_SHIFT;
-    uint8_t  dest_mode = (GCAddr >> VBOX_MSI_ADDR_DEST_MODE_SHIFT) & 0x1;
-    uint8_t  trigger_mode = (uValue >> VBOX_MSI_DATA_TRIGGER_SHIFT) & 0x1;
-    uint8_t  delivery_mode = (uValue >> VBOX_MSI_DATA_DELIVERY_MODE_SHIFT) & 0x7;
-#if 0
-    /*
-     * This bit indicates whether the message should be directed to the
-     * processor with the lowest interrupt priority among
-     * processors that can receive the interrupt, ignored ATM.
-     */
-    uint8_t  redir_hint = (GCAddr >> VBOX_MSI_ADDR_REDIRECTION_SHIFT) & 0x1;
+    Assert(!(GCPhysAddr & 3));
+    Assert(cb == 4); RT_NOREF_PV(cb); /* registered for dwords only */
+
+    uint32_t const uValue = *(uint32_t const *)pv;
+    uint32_t const offReg = GCPhysAddr & IOAPIC_MMIO_REG_MASK;
+
+    LogFlow(("IOAPIC: ioapicMmioWrite: pThis=%p GCPhysAddr=%#RGp cb=%u uValue=%#RX32\n", pThis, GCPhysAddr, cb, uValue));
+    int rc = VINF_SUCCESS;
+    switch (offReg)
+    {
+        case IOAPIC_DIRECT_OFF_INDEX:
+            ioapicSetIndex(pThis, uValue);
+            break;
+
+        case IOAPIC_DIRECT_OFF_DATA:
+            rc = ioapicSetData(pThis, uValue);
+            break;
+
+#if IOAPIC_HARDWARE_VERSION == IOAPIC_HARDWARE_VERSION_ICH9
+        case IOAPIC_DIRECT_OFF_EOI:
+            rc = ioapicSetEoi(pDevIns, uValue);
+            break;
 #endif
-    int rc = pThis->CTX_SUFF(pIoApicHlp)->pfnApicBusDeliver(pDevIns,
-                                                            dest,
-                                                            dest_mode,
-                                                            delivery_mode,
-                                                            vector_num,
-                                                            0 /* polarity, n/a */,
-                                                            trigger_mode,
-                                                            uTagSrc);
-    /* We must be sure that attempts to reschedule in R3
-       never get here */
-    Assert(rc == VINF_SUCCESS || rc == VERR_APIC_INTR_DISCARDED);
+
+        default:
+            Log2(("IOAPIC: ioapicMmioWrite: Invalid offset. GCPhysAddr=%#RGp offReg=%#x\n", GCPhysAddr, offReg));
+            break;
+    }
+
+    return rc;
 }
 
+
 #ifdef IN_RING3
 
 /** @interface_method_impl{DBGFREGDESC,pfnGet} */
-static DECLCALLBACK(int) ioapicDbgReg_IoRegSel_r(void *pvUser, PCDBGFREGDESC pDesc, PDBGFREGVAL pValue)
+static DECLCALLBACK(int) ioapicDbgReg_GetIndex(void *pvUser, PCDBGFREGDESC pDesc, PDBGFREGVAL pValue)
 {
-    return ioapic_IoRegSel_r(PDMINS_2_DATA((PPDMDEVINS)pvUser, PIOAPIC), &pValue->u32);
+    RT_NOREF(pDesc);
+    pValue->u32 = ioapicGetIndex(PDMINS_2_DATA((PPDMDEVINS)pvUser, PCIOAPIC));
+    return VINF_SUCCESS;
 }
 
+
 /** @interface_method_impl{DBGFREGDESC,pfnSet} */
-static DECLCALLBACK(int) ioapicDbgReg_IoRegSel_w(void *pvUser, PCDBGFREGDESC pDesc, PCDBGFREGVAL pValue, PCDBGFREGVAL pfMask)
+static DECLCALLBACK(int) ioapicDbgReg_SetIndex(void *pvUser, PCDBGFREGDESC pDesc, PCDBGFREGVAL pValue, PCDBGFREGVAL pfMask)
 {
-    return ioapic_IoRegSel_w(PDMINS_2_DATA((PPDMDEVINS)pvUser, PIOAPIC), pValue->u8);
+    RT_NOREF(pDesc, pfMask);
+    ioapicSetIndex(PDMINS_2_DATA((PPDMDEVINS)pvUser, PIOAPIC), pValue->u8);
+    return VINF_SUCCESS;
 }
 
+
 /** @interface_method_impl{DBGFREGDESC,pfnGet} */
-static DECLCALLBACK(int) ioapicDbgReg_IoWin_r(void *pvUser, PCDBGFREGDESC pDesc, PDBGFREGVAL pValue)
+static DECLCALLBACK(int) ioapicDbgReg_GetData(void *pvUser, PCDBGFREGDESC pDesc, PDBGFREGVAL pValue)
 {
-    return ioapic_IoWin_r(PDMINS_2_DATA((PPDMDEVINS)pvUser, PIOAPIC), &pValue->u32);
+    RT_NOREF(pDesc);
+    pValue->u32 = ioapicGetData((PDMINS_2_DATA((PPDMDEVINS)pvUser, PCIOAPIC)));
+    return VINF_SUCCESS;
 }
 
+
 /** @interface_method_impl{DBGFREGDESC,pfnSet} */
-static DECLCALLBACK(int) ioapicDbgReg_IoWin_w(void *pvUser, PCDBGFREGDESC pDesc, PCDBGFREGVAL pValue, PCDBGFREGVAL pfMask)
+static DECLCALLBACK(int) ioapicDbgReg_SetData(void *pvUser, PCDBGFREGDESC pDesc, PCDBGFREGVAL pValue, PCDBGFREGVAL pfMask)
 {
-    return ioapic_IoWin_w(PDMINS_2_DATA((PPDMDEVINS)pvUser, PIOAPIC), pValue->u32);
+    RT_NOREF(pDesc, pfMask);
+     return ioapicSetData(PDMINS_2_DATA((PPDMDEVINS)pvUser, PIOAPIC), pValue->u32);
 }
 
+
 /** @interface_method_impl{DBGFREGDESC,pfnGet} */
-static DECLCALLBACK(int) ioapicDbgReg_IoApicVer_r(void *pvUser, PCDBGFREGDESC pDesc, PDBGFREGVAL pValue)
+static DECLCALLBACK(int) ioapicDbgReg_GetVersion(void *pvUser, PCDBGFREGDESC pDesc, PDBGFREGVAL pValue)
 {
-    return ioapic_IoApicVer_r(PDMINS_2_DATA((PPDMDEVINS)pvUser, PIOAPIC), &pValue->u32);
+    RT_NOREF(pvUser, pDesc);
+    pValue->u32 = ioapicGetVersion();
+    return VINF_SUCCESS;
 }
 
-/** @interface_method_impl{DBGFREGDESC,pfnGet} */
-static DECLCALLBACK(int) ioapicDbgReg_IoApicArb_r(void *pvUser, PCDBGFREGDESC pDesc, PDBGFREGVAL pValue)
+
+# if IOAPIC_HARDWARE_VERSION == IOAPIC_HARDWARE_VERSION_82093AA
+/** @interface_method_impl{DBGFREGDESC,pfnGetArb} */
+static DECLCALLBACK(int) ioapicDbgReg_GetArb(void *pvUser, PCDBGFREGDESC pDesc, PDBGFREGVAL pValue)
 {
-    return ioapic_IoApicArb_r(PDMINS_2_DATA((PPDMDEVINS)pvUser, PIOAPIC), &pValue->u32);
+    RT_NOREF(pvUser, pDesc);
+    pValue->u32 = ioapicGetArb(PDMINS_2_DATA((PPDMDEVINS)pvUser, PCIOAPIC));
+    return VINF_SUCCESS;
 }
+#endif
+
 
 /** @interface_method_impl{DBGFREGDESC,pfnGet} */
-static DECLCALLBACK(int) ioapicDbgReg_IoRedRblN_r(void *pvUser, PCDBGFREGDESC pDesc, PDBGFREGVAL pValue)
+static DECLCALLBACK(int) ioapicDbgReg_GetRte(void *pvUser, PCDBGFREGDESC pDesc, PDBGFREGVAL pValue)
 {
-    PIOAPIC pThis = PDMINS_2_DATA((PPDMDEVINS)pvUser, PIOAPIC);
-    pValue->u64 = pThis->ioredtbl[pDesc->offRegister];
+    PCIOAPIC pThis = PDMINS_2_DATA((PPDMDEVINS)pvUser, PCIOAPIC);
+    Assert(pDesc->offRegister < RT_ELEMENTS(pThis->au64RedirTable));
+    pValue->u64 = pThis->au64RedirTable[pDesc->offRegister];
     return VINF_SUCCESS;
 }
 
+
 /** @interface_method_impl{DBGFREGDESC,pfnSet} */
-static DECLCALLBACK(int) ioapicDbgReg_IoRedRblN_w(void *pvUser, PCDBGFREGDESC pDesc, PCDBGFREGVAL pValue, PCDBGFREGVAL pfMask)
+static DECLCALLBACK(int) ioapicDbgReg_SetRte(void *pvUser, PCDBGFREGDESC pDesc, PCDBGFREGVAL pValue, PCDBGFREGVAL pfMask)
 {
+    RT_NOREF(pfMask);
     PIOAPIC pThis = PDMINS_2_DATA((PPDMDEVINS)pvUser, PIOAPIC);
-    pThis->ioredtbl[pDesc->offRegister] = pValue->u64 | (~pfMask->u64 &pThis->ioredtbl[pDesc->offRegister]);
+    /* No locks, no checks, just do it. */
+    Assert(pDesc->offRegister < RT_ELEMENTS(pThis->au64RedirTable));
+    pThis->au64RedirTable[pDesc->offRegister] = pValue->u64;
     return VINF_SUCCESS;
 }
 
+
 /** IOREDTBLn sub fields. */
-static DBGFREGSUBFIELD const g_aIoRedTblSubs[] =
-{
-    { "intvec",         0,  8,  0,  0, NULL, NULL },
-    { "delmode",        8,  3,  0,  0, NULL, NULL },
-    { "destmode",      11,  1,  0,  0, NULL, NULL },
-    { "delivs",        12,  1,  0,  DBGFREGSUBFIELD_FLAGS_READ_ONLY, NULL, NULL },
-    { "intpol",        13,  1,  0,  0, NULL, NULL },
-    { "remoteirr",     14,  1,  0,  DBGFREGSUBFIELD_FLAGS_READ_ONLY, NULL, NULL },
-    { "triggermode",   15,  1,  0,  0, NULL, NULL },
-    { "intmask",       16,  1,  0,  0, NULL, NULL },
-    { "dst",           56,  8,  0,  0, NULL, NULL },
+static DBGFREGSUBFIELD const g_aRteSubs[] =
+{
+    { "vector",       0,   8,  0,  0, NULL, NULL },
+    { "dlvr_mode",    8,   3,  0,  0, NULL, NULL },
+    { "dest_mode",    11,  1,  0,  0, NULL, NULL },
+    { "dlvr_status",  12,  1,  0,  DBGFREGSUBFIELD_FLAGS_READ_ONLY, NULL, NULL },
+    { "polarity",     13,  1,  0,  0, NULL, NULL },
+    { "remote_irr",   14,  1,  0,  DBGFREGSUBFIELD_FLAGS_READ_ONLY, NULL, NULL },
+    { "trigger_mode", 15,  1,  0,  0, NULL, NULL },
+    { "mask",         16,  1,  0,  0, NULL, NULL },
+# if IOAPIC_HARDWARE_VERSION == IOAPIC_HARDWARE_VERSION_ICH9
+    { "ext_dest_id",  48,  8,  0,  DBGFREGSUBFIELD_FLAGS_READ_ONLY, NULL, NULL },
+# endif
+    { "dest",         56,  8,  0,  0, NULL, NULL },
     DBGFREGSUBFIELD_TERMINATOR()
 };
 
+
 /** Register descriptors for DBGF. */
 static DBGFREGDESC const g_aRegDesc[] =
 {
-    { "ioregsel",   DBGFREG_END, DBGFREGVALTYPE_U8,  0,  0, ioapicDbgReg_IoRegSel_r,  ioapicDbgReg_IoRegSel_w, NULL, NULL },
-    { "iowin",      DBGFREG_END, DBGFREGVALTYPE_U32, 0,  0, ioapicDbgReg_IoWin_r,     ioapicDbgReg_IoWin_w,    NULL, NULL },
-    { "ioapicver",  DBGFREG_END, DBGFREGVALTYPE_U32, DBGFREG_FLAGS_READ_ONLY, 0, ioapicDbgReg_IoApicVer_r, NULL, NULL, NULL },
-    { "ioapicarb",  DBGFREG_END, DBGFREGVALTYPE_U32, DBGFREG_FLAGS_READ_ONLY, 0, ioapicDbgReg_IoApicArb_r, NULL, NULL, NULL },
-    { "ioredtbl0",  DBGFREG_END, DBGFREGVALTYPE_U64, 0,  0, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
-    { "ioredtbl1",  DBGFREG_END, DBGFREGVALTYPE_U64, 0,  1, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
-    { "ioredtbl2",  DBGFREG_END, DBGFREGVALTYPE_U64, 0,  2, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
-    { "ioredtbl3",  DBGFREG_END, DBGFREGVALTYPE_U64, 0,  3, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
-    { "ioredtbl4",  DBGFREG_END, DBGFREGVALTYPE_U64, 0,  4, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
-    { "ioredtbl5",  DBGFREG_END, DBGFREGVALTYPE_U64, 0,  5, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
-    { "ioredtbl6",  DBGFREG_END, DBGFREGVALTYPE_U64, 0,  6, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
-    { "ioredtbl7",  DBGFREG_END, DBGFREGVALTYPE_U64, 0,  7, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
-    { "ioredtbl8",  DBGFREG_END, DBGFREGVALTYPE_U64, 0,  8, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
-    { "ioredtbl9",  DBGFREG_END, DBGFREGVALTYPE_U64, 0,  9, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
-    { "ioredtbl10", DBGFREG_END, DBGFREGVALTYPE_U64, 0, 10, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
-    { "ioredtbl11", DBGFREG_END, DBGFREGVALTYPE_U64, 0, 11, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
-    { "ioredtbl12", DBGFREG_END, DBGFREGVALTYPE_U64, 0, 12, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
-    { "ioredtbl13", DBGFREG_END, DBGFREGVALTYPE_U64, 0, 13, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
-    { "ioredtbl14", DBGFREG_END, DBGFREGVALTYPE_U64, 0, 14, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
-    { "ioredtbl15", DBGFREG_END, DBGFREGVALTYPE_U64, 0, 15, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
-    { "ioredtbl16", DBGFREG_END, DBGFREGVALTYPE_U64, 0, 16, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
-    { "ioredtbl17", DBGFREG_END, DBGFREGVALTYPE_U64, 0, 17, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
-    { "ioredtbl18", DBGFREG_END, DBGFREGVALTYPE_U64, 0, 18, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
-    { "ioredtbl19", DBGFREG_END, DBGFREGVALTYPE_U64, 0, 19, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
-    { "ioredtbl20", DBGFREG_END, DBGFREGVALTYPE_U64, 0, 20, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
-    { "ioredtbl21", DBGFREG_END, DBGFREGVALTYPE_U64, 0, 21, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
-    { "ioredtbl22", DBGFREG_END, DBGFREGVALTYPE_U64, 0, 22, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
-    { "ioredtbl23", DBGFREG_END, DBGFREGVALTYPE_U64, 0, 23, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
+    { "index",      DBGFREG_END, DBGFREGVALTYPE_U8,  0,  0, ioapicDbgReg_GetIndex, ioapicDbgReg_SetIndex,    NULL, NULL },
+    { "data",       DBGFREG_END, DBGFREGVALTYPE_U32, 0,  0, ioapicDbgReg_GetData,  ioapicDbgReg_SetData,     NULL, NULL },
+    { "version",    DBGFREG_END, DBGFREGVALTYPE_U32, DBGFREG_FLAGS_READ_ONLY, 0, ioapicDbgReg_GetVersion, NULL, NULL, NULL },
+# if IOAPIC_HARDWARE_VERSION == IOAPIC_HARDWARE_VERSION_82093AA
+    { "arb",        DBGFREG_END, DBGFREGVALTYPE_U32, DBGFREG_FLAGS_READ_ONLY, 0, ioapicDbgReg_GetArb,     NULL, NULL, NULL },
+# endif
+    { "rte0",       DBGFREG_END, DBGFREGVALTYPE_U64, 0,  0, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
+    { "rte1",       DBGFREG_END, DBGFREGVALTYPE_U64, 0,  1, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
+    { "rte2",       DBGFREG_END, DBGFREGVALTYPE_U64, 0,  2, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
+    { "rte3",       DBGFREG_END, DBGFREGVALTYPE_U64, 0,  3, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
+    { "rte4",       DBGFREG_END, DBGFREGVALTYPE_U64, 0,  4, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
+    { "rte5",       DBGFREG_END, DBGFREGVALTYPE_U64, 0,  5, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
+    { "rte6",       DBGFREG_END, DBGFREGVALTYPE_U64, 0,  6, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
+    { "rte7",       DBGFREG_END, DBGFREGVALTYPE_U64, 0,  7, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
+    { "rte8",       DBGFREG_END, DBGFREGVALTYPE_U64, 0,  8, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
+    { "rte9",       DBGFREG_END, DBGFREGVALTYPE_U64, 0,  9, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
+    { "rte10",      DBGFREG_END, DBGFREGVALTYPE_U64, 0, 10, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
+    { "rte11",      DBGFREG_END, DBGFREGVALTYPE_U64, 0, 11, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
+    { "rte12",      DBGFREG_END, DBGFREGVALTYPE_U64, 0, 12, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
+    { "rte13",      DBGFREG_END, DBGFREGVALTYPE_U64, 0, 13, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
+    { "rte14",      DBGFREG_END, DBGFREGVALTYPE_U64, 0, 14, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
+    { "rte15",      DBGFREG_END, DBGFREGVALTYPE_U64, 0, 15, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
+    { "rte16",      DBGFREG_END, DBGFREGVALTYPE_U64, 0, 16, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
+    { "rte17",      DBGFREG_END, DBGFREGVALTYPE_U64, 0, 17, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
+    { "rte18",      DBGFREG_END, DBGFREGVALTYPE_U64, 0, 18, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
+    { "rte19",      DBGFREG_END, DBGFREGVALTYPE_U64, 0, 19, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
+    { "rte20",      DBGFREG_END, DBGFREGVALTYPE_U64, 0, 20, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
+    { "rte21",      DBGFREG_END, DBGFREGVALTYPE_U64, 0, 21, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
+    { "rte22",      DBGFREG_END, DBGFREGVALTYPE_U64, 0, 22, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
+    { "rte23",      DBGFREG_END, DBGFREGVALTYPE_U64, 0, 23, ioapicDbgReg_GetRte, ioapicDbgReg_SetRte, NULL, &g_aRteSubs[0] },
     DBGFREGDESC_TERMINATOR()
 };
 
 
 /**
- * Info handler, device version. Dumps I/O APIC state.
- *
- * @param   pDevIns     Device instance which registered the info.
- * @param   pHlp        Callback functions for doing output.
- * @param   pszArgs     Argument string. Optional and specific to the handler.
+ * @callback_method_impl{FNDBGFHANDLERDEV}
  */
-static DECLCALLBACK(void) ioapicInfo(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
+static DECLCALLBACK(void) ioapicR3DbgInfo(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
 {
-    PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
-    uint32_t     uVal;
-
-    pHlp->pfnPrintf(pHlp, "I/O APIC at %#010x:\n", 0xfec00000);
-
-    ioapic_IoApicId_r(pThis, &uVal);
-    pHlp->pfnPrintf(pHlp, "  IOAPICID  : %#010x\n", uVal);
-    pHlp->pfnPrintf(pHlp, "    APIC ID = %#04x\n", (uVal >> 24) & 0xff);
+    RT_NOREF(pszArgs);
+    PCIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
+    LogFlow(("IOAPIC: ioapicR3DbgInfo: pThis=%p pszArgs=%s\n", pThis, pszArgs));
+
+    pHlp->pfnPrintf(pHlp, "I/O APIC at %#010x:\n", IOAPIC_MMIO_BASE_PHYSADDR);
+
+    uint32_t const uId = ioapicGetId(pThis);
+    pHlp->pfnPrintf(pHlp, "  ID                      = %#RX32\n", uId);
+    pHlp->pfnPrintf(pHlp, "    ID                      = %#x\n",     IOAPIC_ID_GET_ID(uId));
+
+    uint32_t const uVer = ioapicGetVersion();
+    pHlp->pfnPrintf(pHlp, "  Version                 = %#RX32\n",  uVer);
+    pHlp->pfnPrintf(pHlp, "    Version                 = %#x\n",     IOAPIC_VER_GET_VER(uVer));
+    pHlp->pfnPrintf(pHlp, "    Pin Assert Reg. Support = %RTbool\n", IOAPIC_VER_HAS_PRQ(uVer));
+    pHlp->pfnPrintf(pHlp, "    Max. Redirection Entry  = %u\n",      IOAPIC_VER_GET_MRE(uVer));
+
+# if IOAPIC_HARDWARE_VERSION == IOAPIC_HARDWARE_VERSION_82093AA
+    uint32_t const uArb = ioapicGetArb();
+    pHlp->pfnPrintf(pHlp, "  Arbitration             = %#RX32\n", uArb);
+    pHlp->pfnPrintf(pHlp, "    Arbitration ID          = %#x\n",     IOAPIC_ARB_GET_ID(uArb));
+# endif
 
-    ioapic_IoApicVer_r(pThis, &uVal);
-    unsigned iLastRedir = RT_BYTE3(uVal);
-    pHlp->pfnPrintf(pHlp, "  IOAPICVER : %#010x\n", uVal);
-    pHlp->pfnPrintf(pHlp, "    version = %#04x\n", uVal & 0xff);
-    pHlp->pfnPrintf(pHlp, "    redirs  = %u\n", iLastRedir + 1);
+    pHlp->pfnPrintf(pHlp, "  Current index           = %#x\n",     ioapicGetIndex(pThis));
 
-    ioapic_IoApicArb_r(pThis, &uVal);
-    pHlp->pfnPrintf(pHlp, "    arb ID  = %#010x\n", RT_BYTE4(uVal));
-    pHlp->pfnPrintf(pHlp, "  IOAPICARB : %#08x\n", uVal);
+    pHlp->pfnPrintf(pHlp, "  I/O Redirection Table and IRR:\n");
+    pHlp->pfnPrintf(pHlp, "  idx dst_mode dst_addr mask irr trigger rirr polar dlvr_st dlvr_mode vector\n");
 
-    Assert(sizeof(pThis->ioredtbl) / sizeof(pThis->ioredtbl[0]) > iLastRedir);
-    pHlp->pfnPrintf(pHlp, "I/O redirection table\n");
-    pHlp->pfnPrintf(pHlp, " idx dst_mode dst_addr mask trigger rirr polarity dlvr_st dlvr_mode vector\n");
-    for (unsigned i = 0; i <= iLastRedir; ++i)
+    for (uint8_t idxRte = 0; idxRte < RT_ELEMENTS(pThis->au64RedirTable); idxRte++)
     {
-        static const char * const s_apszDModes[] =
+        static const char * const s_apszDeliveryModes[] =
         {
-            "Fixed ", "LowPri", "SMI   ", "Resrvd", "NMI   ", "INIT  ", "Resrvd", "ExtINT"
+            "Fixed ",
+            "LowPri",
+            "SMI   ",
+            "Rsvd  ",
+            "NMI   ",
+            "INIT  ",
+            "Rsvd  ",
+            "ExtINT"
         };
 
-        pHlp->pfnPrintf(pHlp, "  %02d   %s      %02x     %d    %s   %d   %s  %s     %s   %3d (%016llx)\n",
-                        i,
-                        pThis->ioredtbl[i] & RT_BIT(11) ? "log " : "phys",          /* dest mode */
-                        (int)(pThis->ioredtbl[i] >> 56),                            /* dest addr */
-                        (int)(pThis->ioredtbl[i] >> 16) & 1,                        /* mask */
-                        pThis->ioredtbl[i] & RT_BIT(15) ? "level" : "edge ",        /* trigger */
-                        (int)(pThis->ioredtbl[i] >> 14) & 1,                        /* remote IRR */
-                        pThis->ioredtbl[i] & RT_BIT(13) ? "activelo" : "activehi",  /* polarity */
-                        pThis->ioredtbl[i] & RT_BIT(12) ? "pend" : "idle",          /* delivery status */
-                        s_apszDModes[(pThis->ioredtbl[i] >> 8) & 0x07],             /* delivery mode */
-                        (int)pThis->ioredtbl[i] & 0xff,                             /* vector */
-                        pThis->ioredtbl[i]                                          /* entire register */
-                        );
+        const uint64_t u64Rte = pThis->au64RedirTable[idxRte];
+        const char    *pszDestMode       = IOAPIC_RTE_GET_DEST_MODE(u64Rte) == 0 ? "phys" : "log ";
+        const uint8_t  uDest             = IOAPIC_RTE_GET_DEST(u64Rte);
+        const uint8_t  uMask             = IOAPIC_RTE_GET_MASK(u64Rte);
+        const char    *pszTriggerMode    = IOAPIC_RTE_GET_TRIGGER_MODE(u64Rte) == 0 ? "edge " : "level";
+        const uint8_t  uRemoteIrr        = IOAPIC_RTE_GET_REMOTE_IRR(u64Rte);
+        const char    *pszPolarity       = IOAPIC_RTE_GET_POLARITY(u64Rte) == 0 ? "acthi" : "actlo";
+        const char    *pszDeliveryStatus = IOAPIC_RTE_GET_DELIVERY_STATUS(u64Rte) == 0 ? "idle" : "pend";
+        const uint8_t  uDeliveryMode     = IOAPIC_RTE_GET_DELIVERY_MODE(u64Rte);
+        Assert(uDeliveryMode < RT_ELEMENTS(s_apszDeliveryModes));
+        const char    *pszDeliveryMode   = s_apszDeliveryModes[uDeliveryMode];
+        const uint8_t  uVector           = IOAPIC_RTE_GET_VECTOR(u64Rte);
+
+        pHlp->pfnPrintf(pHlp, "   %02d   %s      %02x     %u    %u   %s   %u   %s  %s     %s   %3u (%016llx)\n",
+                        idxRte,
+                        pszDestMode,
+                        uDest,
+                        uMask,
+                        (pThis->uIrr >> idxRte) & 1,
+                        pszTriggerMode,
+                        uRemoteIrr,
+                        pszPolarity,
+                        pszDeliveryStatus,
+                        pszDeliveryMode,
+                        uVector,
+                        u64Rte);
     }
 }
 
+
 /**
  * @copydoc FNSSMDEVSAVEEXEC
  */
-static DECLCALLBACK(int) ioapicSaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
+static DECLCALLBACK(int) ioapicR3SaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
 {
-    PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
+    PCIOAPIC pThis = PDMINS_2_DATA(pDevIns, PCIOAPIC);
+    LogFlow(("IOAPIC: ioapicR3SaveExec\n"));
 
-    SSMR3PutU8(pSSM, pThis->id);
-    SSMR3PutU8(pSSM, pThis->ioregsel);
-    for (unsigned i = 0; i < IOAPIC_NUM_PINS; i++)
-        SSMR3PutU64(pSSM, pThis->ioredtbl[i]);
+    SSMR3PutU32(pSSM, pThis->uIrr);
+    SSMR3PutU8(pSSM,  pThis->u8Id);
+    SSMR3PutU8(pSSM,  pThis->u8Index);
+    for (uint8_t idxRte = 0; idxRte < RT_ELEMENTS(pThis->au64RedirTable); idxRte++)
+        SSMR3PutU64(pSSM, pThis->au64RedirTable[idxRte]);
 
     return VINF_SUCCESS;
 }
 
+
 /**
  * @copydoc FNSSMDEVLOADEXEC
  */
-static DECLCALLBACK(int) ioapicLoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass)
+static DECLCALLBACK(int) ioapicR3LoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass)
 {
     PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
-    if (   uVersion != IOAPIC_SAVED_STATE_VERSION_VBOX_50
-        && uVersion != IOAPIC_SAVED_STATE_VERSION_NEW_CODE)
+    LogFlow(("APIC: apicR3LoadExec: uVersion=%u uPass=%#x\n", uVersion, uPass));
+
+    Assert(uPass == SSM_PASS_FINAL);
+    NOREF(uPass);
+
+    /* Weed out invalid versions. */
+    if (   uVersion != IOAPIC_SAVED_STATE_VERSION
+        && uVersion != IOAPIC_SAVED_STATE_VERSION_VBOX_50)
+    {
+        LogRel(("IOAPIC: ioapicR3LoadExec: Invalid/unrecognized saved-state version %u (%#x)\n", uVersion, uVersion));
         return VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION;
+    }
 
-    uint32_t ignore;
-    if (uVersion == IOAPIC_SAVED_STATE_VERSION_NEW_CODE)
-        SSMR3GetU32(pSSM, &ignore);
+    if (uVersion == IOAPIC_SAVED_STATE_VERSION)
+        SSMR3GetU32(pSSM, (uint32_t *)&pThis->uIrr);
 
-    SSMR3GetU8(pSSM, &pThis->id);
-    SSMR3GetU8(pSSM, &pThis->ioregsel);
-    for (unsigned i = 0; i < IOAPIC_NUM_PINS; i++)
-        SSMR3GetU64(pSSM, &pThis->ioredtbl[i]);
+    SSMR3GetU8(pSSM, (uint8_t *)&pThis->u8Id);
+    SSMR3GetU8(pSSM, (uint8_t *)&pThis->u8Index);
+    for (uint8_t idxRte = 0; idxRte < RT_ELEMENTS(pThis->au64RedirTable); idxRte++)
+        SSMR3GetU64(pSSM, &pThis->au64RedirTable[idxRte]);
 
-    Assert(uPass == SSM_PASS_FINAL); NOREF(uPass);
     return VINF_SUCCESS;
 }
 
+
 /**
- * @copydoc FNPDMDEVRESET
+ * @interface_method_impl{PDMDEVREG,pfnReset}
  */
-static DECLCALLBACK(void) ioapicReset(PPDMDEVINS pDevIns)
+static DECLCALLBACK(void) ioapicR3Reset(PPDMDEVINS pDevIns)
 {
     PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
-    pThis->pIoApicHlpR3->pfnLock(pDevIns, VERR_INTERNAL_ERROR);
+    LogFlow(("IOAPIC: ioapicR3Reset: pThis=%p\n", pThis));
+
+    /* There might be devices threads calling ioapicSetIrq() in parallel, hence the lock. */
+    IOAPIC_LOCK(pThis, VERR_IGNORED);
+
+    pThis->uIrr    = 0;
+    pThis->u8Index = 0;
+    pThis->u8Id    = 0;
 
-    pThis->id       = pThis->cCpus;
-    pThis->ioregsel = 0;
-    pThis->irr      = 0;
-    for (unsigned i = 0; i < IOAPIC_NUM_PINS; i++)
+    for (uint8_t idxRte = 0; idxRte < RT_ELEMENTS(pThis->au64RedirTable); idxRte++)
     {
-        pThis->ioredtbl[i] = 1 << 16; /* mask LVT */
-        pThis->auTagSrc[i] = 0;
+        pThis->au64RedirTable[idxRte] = IOAPIC_RTE_MASK;
+        pThis->au32TagSrc[idxRte] = 0;
     }
 
     IOAPIC_UNLOCK(pThis);
 }
 
+
 /**
- * @copydoc FNPDMDEVRELOCATE
+ * @interface_method_impl{PDMDEVREG,pfnRelocate}
  */
-static DECLCALLBACK(void) ioapicRelocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta)
+static DECLCALLBACK(void) ioapicR3Relocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta)
 {
+    RT_NOREF(offDelta);
     PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
+    LogFlow(("IOAPIC: ioapicR3Relocate: pThis=%p offDelta=%RGi\n", pThis, offDelta));
+
     pThis->pDevInsRC    = PDMDEVINS_2_RCPTR(pDevIns);
     pThis->pIoApicHlpRC = pThis->pIoApicHlpR3->pfnGetRCHelpers(pDevIns);
 }
 
+
+/**
+ * @interface_method_impl{PDMDEVREG,pfnDestruct}
+ */
+static DECLCALLBACK(int) ioapicR3Destruct(PPDMDEVINS pDevIns)
+{
+    PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
+    LogFlow(("IOAPIC: ioapicR3Destruct: pThis=%p\n", pThis));
+    PDMDEV_CHECK_VERSIONS_RETURN_QUIET(pDevIns);
+
+# ifndef IOAPIC_WITH_PDM_CRITSECT
+    /*
+     * Destroy the RTE critical section.
+     */
+    if (PDMCritSectIsInitialized(&pThis->CritSect))
+        PDMR3CritSectDelete(&pThis->CritSect);
+# else
+    RT_NOREF_PV(pThis);
+# endif
+
+    return VINF_SUCCESS;
+}
+
+
 /**
- * @copydoc FNPDMDEVCONSTRUCT
+ * @interface_method_impl{PDMDEVREG,pfnConstruct}
  */
-static DECLCALLBACK(int) ioapicConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
+static DECLCALLBACK(int) ioapicR3Construct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
 {
+    RT_NOREF(iInstance);
     PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
+    LogFlow(("IOAPIC: ioapicR3Construct: pThis=%p iInstance=%d\n", pThis, iInstance));
     Assert(iInstance == 0);
 
     /*
@@ -766,25 +1183,18 @@ static DECLCALLBACK(int) ioapicConstruct(PPDMDEVINS pDevIns, int iInstance, PCFG
     pThis->pDevInsR3 = pDevIns;
     pThis->pDevInsR0 = PDMDEVINS_2_R0PTR(pDevIns);
     pThis->pDevInsRC = PDMDEVINS_2_RCPTR(pDevIns);
-    /* (the rest is done by the reset call at the end) */
-
-    /* PDM provides locking via the IOAPIC helpers. */
-    int rc = PDMDevHlpSetDeviceCritSect(pDevIns, PDMDevHlpCritSectGetNop(pDevIns));
-    AssertRCReturn(rc, rc);
 
     /*
      * Validate and read the configuration.
      */
     PDMDEV_VALIDATE_CONFIG_RETURN(pDevIns, "NumCPUs|RZEnabled", "");
 
+    /* The number of CPUs is currently unused, but left in CFGM and saved-state in case an ID of 0 is
+       upsets some guest which we haven't yet tested. */
     uint32_t cCpus;
-    rc = CFGMR3QueryU32Def(pCfg, "NumCPUs", &cCpus, 1);
+    int rc = CFGMR3QueryU32Def(pCfg, "NumCPUs", &cCpus, 1);
     if (RT_FAILURE(rc))
-        return PDMDEV_SET_ERROR(pDevIns, rc,
-                                N_("Configuration error: Failed to query integer value \"NumCPUs\""));
-    if (cCpus > UINT8_MAX - 2) /* ID 255 is broadcast and the IO-APIC needs one (ID=cCpus). */
-        return PDMDevHlpVMSetError(pDevIns, rc, RT_SRC_POS,
-                                   N_("Configuration error: Max %u CPUs, %u specified"), UINT8_MAX - 1, cCpus);
+        return PDMDEV_SET_ERROR(pDevIns, rc, N_("Configuration error: Failed to query integer value \"NumCPUs\""));
     pThis->cCpus = (uint8_t)cCpus;
 
     bool fRZEnabled;
@@ -793,84 +1203,134 @@ static DECLCALLBACK(int) ioapicConstruct(PPDMDEVINS pDevIns, int iInstance, PCFG
         return PDMDEV_SET_ERROR(pDevIns, rc,
                                 N_("Configuration error: Failed to query boolean value \"RZEnabled\""));
 
-    Log(("IOAPIC: cCpus=%u fRZEnabled=%RTbool\n", cCpus, fRZEnabled));
+    Log2(("IOAPIC: cCpus=%u fRZEnabled=%RTbool\n", cCpus, fRZEnabled));
+
+    /*
+     * We will use our own critical section for the IOAPIC device.
+     */
+    rc = PDMDevHlpSetDeviceCritSect(pDevIns, PDMDevHlpCritSectGetNop(pDevIns));
+    AssertRCReturn(rc, rc);
+
+# ifndef IOAPIC_WITH_PDM_CRITSECT
+    /*
+     * Setup the critical section to protect concurrent writes to the RTEs.
+     */
+    rc = PDMDevHlpCritSectInit(pDevIns, &pThis->CritSect, RT_SRC_POS, "IOAPIC");
+    if (RT_FAILURE(rc))
+        return PDMDevHlpVMSetError(pDevIns, rc, RT_SRC_POS, N_("IOAPIC: Failed to create critical section. rc=%Rrc"), rc);
+# endif
 
     /*
-     * Register the IOAPIC and get helpers.
+     * Register the IOAPIC.
      */
     PDMIOAPICREG IoApicReg;
+    RT_ZERO(IoApicReg);
     IoApicReg.u32Version   = PDM_IOAPICREG_VERSION;
     IoApicReg.pfnSetIrqR3  = ioapicSetIrq;
-    IoApicReg.pszSetIrqRC  = fRZEnabled ? "ioapicSetIrq"  : NULL;
-    IoApicReg.pszSetIrqR0  = fRZEnabled ? "ioapicSetIrq"  : NULL;
     IoApicReg.pfnSendMsiR3 = ioapicSendMsi;
-    IoApicReg.pszSendMsiRC = fRZEnabled ? "ioapicSendMsi" : NULL;
-    IoApicReg.pszSendMsiR0 = fRZEnabled ? "ioapicSendMsi" : NULL;
-    IoApicReg.pfnSetEoiR3  = NULL;
-    IoApicReg.pszSetEoiR0  = NULL;
-    IoApicReg.pszSetEoiRC  = NULL;
+    IoApicReg.pfnSetEoiR3  = ioapicSetEoi;
+    if (fRZEnabled)
+    {
+        IoApicReg.pszSetIrqRC  = "ioapicSetIrq";
+        IoApicReg.pszSetIrqR0  = "ioapicSetIrq";
+
+        IoApicReg.pszSendMsiRC = "ioapicSendMsi";
+        IoApicReg.pszSendMsiR0 = "ioapicSendMsi";
 
+        IoApicReg.pszSetEoiRC = "ioapicSetEoi";
+        IoApicReg.pszSetEoiR0 = "ioapicSetEoi";
+    }
     rc = PDMDevHlpIOAPICRegister(pDevIns, &IoApicReg, &pThis->pIoApicHlpR3);
     if (RT_FAILURE(rc))
     {
-        AssertMsgFailed(("IOAPICRegister -> %Rrc\n", rc));
+        AssertMsgFailed(("IOAPIC: PDMDevHlpIOAPICRegister failed! rc=%Rrc\n", rc));
         return rc;
     }
 
     /*
-     * Register MMIO callbacks and saved state.
-     * Note! The write ZEROing was observed on a real AMD system.
+     * Register MMIO callbacks.
      */
-    rc = PDMDevHlpMMIORegister(pDevIns, UINT32_C(0xfec00000), 0x1000, pThis,
-                               IOMMMIO_FLAGS_READ_DWORD | IOMMMIO_FLAGS_WRITE_DWORD_ZEROED,
-                               ioapicMMIOWrite, ioapicMMIORead, "I/O APIC Memory");
-    if (RT_FAILURE(rc))
-        return rc;
-
-    if (fRZEnabled)
+    rc = PDMDevHlpMMIORegister(pDevIns, IOAPIC_MMIO_BASE_PHYSADDR, IOAPIC_MMIO_SIZE, pThis,
+                               IOMMMIO_FLAGS_READ_DWORD | IOMMMIO_FLAGS_WRITE_DWORD_ZEROED, ioapicMmioWrite, ioapicMmioRead,
+                               "I/O APIC");
+    if (RT_SUCCESS(rc))
+    {
+        if (fRZEnabled)
+        {
+            pThis->pIoApicHlpRC = pThis->pIoApicHlpR3->pfnGetRCHelpers(pDevIns);
+            rc = PDMDevHlpMMIORegisterRC(pDevIns, IOAPIC_MMIO_BASE_PHYSADDR, IOAPIC_MMIO_SIZE, NIL_RTRCPTR /* pvUser */,
+                                         "ioapicMmioWrite", "ioapicMmioRead");
+            AssertRCReturn(rc, rc);
+
+            pThis->pIoApicHlpR0 = pThis->pIoApicHlpR3->pfnGetR0Helpers(pDevIns);
+            rc = PDMDevHlpMMIORegisterR0(pDevIns, IOAPIC_MMIO_BASE_PHYSADDR, IOAPIC_MMIO_SIZE, NIL_RTR0PTR /* pvUser */,
+                                         "ioapicMmioWrite", "ioapicMmioRead");
+            AssertRCReturn(rc, rc);
+        }
+    }
+    else
     {
-        pThis->pIoApicHlpRC = pThis->pIoApicHlpR3->pfnGetRCHelpers(pDevIns);
-        rc = PDMDevHlpMMIORegisterRC(pDevIns, UINT32_C(0xfec00000), 0x1000, NIL_RTRCPTR /*pvUser*/,
-                                     "ioapicMMIOWrite", "ioapicMMIORead");
-        AssertRCReturn(rc, rc);
-
-        pThis->pIoApicHlpR0 = pThis->pIoApicHlpR3->pfnGetR0Helpers(pDevIns);
-        rc = PDMDevHlpMMIORegisterR0(pDevIns, UINT32_C(0xfec00000), 0x1000, NIL_RTR0PTR /*pvUser*/,
-                                     "ioapicMMIOWrite", "ioapicMMIORead");
-        AssertRCReturn(rc, rc);
+        LogRel(("IOAPIC: PDMDevHlpMMIORegister failed! rc=%Rrc\n", rc));
+        return rc;
     }
 
-    rc = PDMDevHlpSSMRegister(pDevIns, IOAPIC_SAVED_STATE_VERSION_VBOX_50, sizeof(*pThis),
-                              ioapicSaveExec, ioapicLoadExec);
+    /*
+     * Register saved-state callbacks.
+     */
+    rc = PDMDevHlpSSMRegister(pDevIns, IOAPIC_SAVED_STATE_VERSION, sizeof(*pThis), ioapicR3SaveExec, ioapicR3LoadExec);
     if (RT_FAILURE(rc))
+    {
+        LogRel(("IOAPIC: PDMDevHlpSSMRegister failed! rc=%Rrc\n", rc));
         return rc;
+    }
 
     /*
      * Register debugger info callback.
      */
-    rc = PDMDevHlpDBGFInfoRegister(pDevIns, "ioapic", "Display I/O APIC state.", ioapicInfo); AssertRC(rc);
+    rc = PDMDevHlpDBGFInfoRegister(pDevIns, "ioapic", "Display IO APIC state.", ioapicR3DbgInfo);
+    AssertRCReturn(rc, rc);
+
+    /*
+     * Register debugger register access.
+     */
     rc = PDMDevHlpDBGFRegRegister(pDevIns, g_aRegDesc); AssertRC(rc);
+    AssertRCReturn(rc, rc);
 
-#ifdef VBOX_WITH_STATISTICS
+# ifdef VBOX_WITH_STATISTICS
     /*
      * Statistics.
      */
-    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMMIOReadGC,     STAMTYPE_COUNTER,  "/Devices/IOAPIC/MMIOReadGC",   STAMUNIT_OCCURENCES, "Number of IOAPIC MMIO reads in GC.");
-    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMMIOReadHC,     STAMTYPE_COUNTER,  "/Devices/IOAPIC/MMIOReadHC",   STAMUNIT_OCCURENCES, "Number of IOAPIC MMIO reads in HC.");
-    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMMIOWriteGC,    STAMTYPE_COUNTER,  "/Devices/IOAPIC/MMIOWriteGC",  STAMUNIT_OCCURENCES, "Number of IOAPIC MMIO writes in GC.");
-    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMMIOWriteHC,    STAMTYPE_COUNTER,  "/Devices/IOAPIC/MMIOWriteHC",  STAMUNIT_OCCURENCES, "Number of IOAPIC MMIO writes in HC.");
-    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatSetIrqGC,       STAMTYPE_COUNTER,  "/Devices/IOAPIC/SetIrqGC",     STAMUNIT_OCCURENCES, "Number of IOAPIC SetIrq calls in GC.");
-    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatSetIrqHC,       STAMTYPE_COUNTER,  "/Devices/IOAPIC/SetIrqHC",     STAMUNIT_OCCURENCES, "Number of IOAPIC SetIrq calls in HC.");
-#endif
+    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMmioReadRZ,  STAMTYPE_COUNTER, "/Devices/IOAPIC/RZ/MmioReadRZ",  STAMUNIT_OCCURENCES, "Number of IOAPIC MMIO reads in RZ.");
+    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMmioWriteRZ, STAMTYPE_COUNTER, "/Devices/IOAPIC/RZ/MmioWriteRZ", STAMUNIT_OCCURENCES, "Number of IOAPIC MMIO writes in RZ.");
+    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatSetIrqRZ,    STAMTYPE_COUNTER, "/Devices/IOAPIC/RZ/SetIrqRZ",    STAMUNIT_OCCURENCES, "Number of IOAPIC SetIrq calls in RZ.");
+    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatSetEoiRZ,    STAMTYPE_COUNTER, "/Devices/IOAPIC/RZ/SetEoiRZ",    STAMUNIT_OCCURENCES, "Number of IOAPIC SetEoi calls in RZ.");
+
+    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMmioReadR3,  STAMTYPE_COUNTER, "/Devices/IOAPIC/R3/MmioReadR3",  STAMUNIT_OCCURENCES, "Number of IOAPIC MMIO reads in R3");
+    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMmioWriteR3, STAMTYPE_COUNTER, "/Devices/IOAPIC/R3/MmioWriteR3", STAMUNIT_OCCURENCES, "Number of IOAPIC MMIO writes in R3.");
+    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatSetIrqR3,    STAMTYPE_COUNTER, "/Devices/IOAPIC/R3/SetIrqR3",    STAMUNIT_OCCURENCES, "Number of IOAPIC SetIrq calls in R3.");
+    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatSetEoiR3,    STAMTYPE_COUNTER, "/Devices/IOAPIC/R3/SetEoiR3",    STAMUNIT_OCCURENCES, "Number of IOAPIC SetEoi calls in R3.");
+
+    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatRedundantEdgeIntr,   STAMTYPE_COUNTER, "/Devices/IOAPIC/RedundantEdgeIntr",   STAMUNIT_OCCURENCES, "Number of redundant edge-triggered interrupts (no IRR change).");
+    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatRedundantLevelIntr,  STAMTYPE_COUNTER, "/Devices/IOAPIC/RedundantLevelIntr",  STAMUNIT_OCCURENCES, "Number of redundant level-triggered interrupts (no IRR change).");
+    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatSuppressedLevelIntr, STAMTYPE_COUNTER, "/Devices/IOAPIC/SuppressedLevelIntr", STAMUNIT_OCCURENCES, "Number of suppressed level-triggered interrupts by remote IRR.");
+
+    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatEoiContention,    STAMTYPE_COUNTER, "/Devices/IOAPIC/CritSect/ContentionSetEoi", STAMUNIT_OCCURENCES, "Number of times the critsect is busy during EOI writes causing trips to R3.");
+    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatSetRteContention, STAMTYPE_COUNTER, "/Devices/IOAPIC/CritSect/ContentionSetRte", STAMUNIT_OCCURENCES, "Number of times the critsect is busy during RTE writes causing trips to R3.");
+
+    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatLevelIrqSent, STAMTYPE_COUNTER, "/Devices/IOAPIC/LevelIntr/Sent", STAMUNIT_OCCURENCES, "Number of level-triggered interrupts sent to the local APIC(s).");
+    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatEoiReceived,  STAMTYPE_COUNTER, "/Devices/IOAPIC/LevelIntr/Recv", STAMUNIT_OCCURENCES, "Number of EOIs received for level-triggered interrupts from the local APIC(s).");
+# endif
 
     /*
-     * Reset the device state.
+     * Init. the device state.
      */
-    ioapicReset(pDevIns);
+    LogRel(("IOAPIC: Using implementation 2.0!\n"));
+    ioapicR3Reset(pDevIns);
 
     return VINF_SUCCESS;
 }
 
+
 /**
  * IO APIC device registration structure.
  */
@@ -881,13 +1341,14 @@ const PDMDEVREG g_DeviceIOAPIC =
     /* szName */
     "ioapic",
     /* szRCMod */
-    "VBoxDD2RC.rc",
+    "VBoxDDRC.rc",
     /* szR0Mod */
-    "VBoxDD2R0.r0",
+    "VBoxDDR0.r0",
     /* pszDescription */
     "I/O Advanced Programmable Interrupt Controller (IO-APIC) Device",
     /* fFlags */
-    PDM_DEVREG_FLAGS_HOST_BITS_DEFAULT | PDM_DEVREG_FLAGS_GUEST_BITS_32_64 | PDM_DEVREG_FLAGS_PAE36 | PDM_DEVREG_FLAGS_RC | PDM_DEVREG_FLAGS_R0,
+      PDM_DEVREG_FLAGS_HOST_BITS_DEFAULT | PDM_DEVREG_FLAGS_GUEST_BITS_32_64 | PDM_DEVREG_FLAGS_PAE36
+    | PDM_DEVREG_FLAGS_RC | PDM_DEVREG_FLAGS_R0,
     /* fClass */
     PDM_DEVREG_CLASS_PIC,
     /* cMaxInstances */
@@ -895,17 +1356,17 @@ const PDMDEVREG g_DeviceIOAPIC =
     /* cbInstance */
     sizeof(IOAPIC),
     /* pfnConstruct */
-    ioapicConstruct,
+    ioapicR3Construct,
     /* pfnDestruct */
-    NULL,
+    ioapicR3Destruct,
     /* pfnRelocate */
-    ioapicRelocate,
+    ioapicR3Relocate,
     /* pfnMemSetup */
     NULL,
     /* pfnPowerOn */
     NULL,
     /* pfnReset */
-    ioapicReset,
+    ioapicR3Reset,
     /* pfnSuspend */
     NULL,
     /* pfnResume */
@@ -927,4 +1388,6 @@ const PDMDEVREG g_DeviceIOAPIC =
 };
 
 #endif /* IN_RING3 */
+
 #endif /* !VBOX_DEVICE_STRUCT_TESTCASE */
+
diff --git a/src/VBox/Devices/PC/DevIoApic_Old.cpp b/src/VBox/Devices/PC/DevIoApic_Old.cpp
new file mode 100644
index 0000000..591a0c6
--- /dev/null
+++ b/src/VBox/Devices/PC/DevIoApic_Old.cpp
@@ -0,0 +1,930 @@
+/* $Id: DevIoApic_Old.cpp $ */
+/** @file
+ * I/O Advanced Programmable Interrupt Controller (IO-APIC) Device.
+ */
+
+/*
+ * Copyright (C) 2006-2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ * --------------------------------------------------------------------
+ *
+ * This code is based on:
+ *
+ * apic.c revision 1.5  @@OSETODO
+ *
+ *  APIC support
+ *
+ *  Copyright (c) 2004-2005 Fabrice Bellard
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#define LOG_GROUP LOG_GROUP_DEV_IOAPIC
+#include <VBox/vmm/pdmdev.h>
+
+#include <VBox/log.h>
+#include <VBox/vmm/stam.h>
+#include <iprt/assert.h>
+#include <iprt/asm.h>
+
+#include <VBox/msi.h>
+
+#include "VBoxDD2.h"
+#include "DevApic.h"
+
+
+/*********************************************************************************************************************************
+*   Defined Constants And Macros                                                                                                 *
+*********************************************************************************************************************************/
+/** @def IOAPIC_LOCK
+ * Acquires the PDM lock. */
+#define IOAPIC_LOCK(pThis, rc) \
+    do { \
+        int rc2 = (pThis)->CTX_SUFF(pIoApicHlp)->pfnLock((pThis)->CTX_SUFF(pDevIns), rc); \
+        if (rc2 != VINF_SUCCESS) \
+            return rc2; \
+    } while (0)
+
+/** @def IOAPIC_UNLOCK
+ * Releases the PDM lock. */
+#define IOAPIC_UNLOCK(pThis) (pThis)->CTX_SUFF(pIoApicHlp)->pfnUnlock((pThis)->CTX_SUFF(pDevIns))
+
+#define DEBUG_IOAPIC
+#define IOAPIC_NUM_PINS                 0x18
+
+/** The old code (this file) */
+#define IOAPIC_SAVED_STATE_VERSION_VBOX_50      1
+/** The new code (DevIOAPIC_New). We need to be able to load this SSM as well. */
+#define IOAPIC_SAVED_STATE_VERSION_NEW_CODE     2
+
+
+/*********************************************************************************************************************************
+*   Structures and Typedefs                                                                                                      *
+*********************************************************************************************************************************/
+typedef struct IOAPIC
+{
+    uint8_t                 id;
+    uint8_t                 ioregsel;
+    uint8_t                 cCpus;
+
+    uint32_t                irr;
+    uint64_t                ioredtbl[IOAPIC_NUM_PINS];
+    /** The IRQ tags and source IDs for each pin (tracing purposes). */
+    uint32_t                auTagSrc[IOAPIC_NUM_PINS];
+
+    /** The device instance - R3 Ptr. */
+    PPDMDEVINSR3            pDevInsR3;
+    /** The IOAPIC helpers - R3 Ptr. */
+    PCPDMIOAPICHLPR3        pIoApicHlpR3;
+
+    /** The device instance - R0 Ptr. */
+    PPDMDEVINSR0            pDevInsR0;
+    /** The IOAPIC helpers - R0 Ptr. */
+    PCPDMIOAPICHLPR0        pIoApicHlpR0;
+
+    /** The device instance - RC Ptr. */
+    PPDMDEVINSRC            pDevInsRC;
+    /** The IOAPIC helpers - RC Ptr. */
+    PCPDMIOAPICHLPRC        pIoApicHlpRC;
+
+# ifdef VBOX_WITH_STATISTICS
+    STAMCOUNTER             StatMMIOReadGC;
+    STAMCOUNTER             StatMMIOReadHC;
+    STAMCOUNTER             StatMMIOWriteGC;
+    STAMCOUNTER             StatMMIOWriteHC;
+    STAMCOUNTER             StatSetIrqGC;
+    STAMCOUNTER             StatSetIrqHC;
+# endif
+} IOAPIC;
+typedef IOAPIC *PIOAPIC;
+
+#ifndef VBOX_DEVICE_STRUCT_TESTCASE
+
+
+/*********************************************************************************************************************************
+*   Internal Functions                                                                                                           *
+*********************************************************************************************************************************/
+
+
+static void ioapic_service(PIOAPIC pThis)
+{
+    uint8_t i;
+    uint8_t trig_mode;
+    uint8_t vector;
+    uint8_t delivery_mode;
+    uint32_t mask;
+    uint64_t entry;
+    uint8_t dest;
+    uint8_t dest_mode;
+    uint8_t polarity;
+
+    for (i = 0; i < IOAPIC_NUM_PINS; i++)
+    {
+        mask = 1 << i;
+        if (pThis->irr & mask)
+        {
+            entry = pThis->ioredtbl[i];
+            if (!(entry & APIC_LVT_MASKED))
+            {
+                trig_mode = ((entry >> 15) & 1);
+                dest = entry >> 56;
+                dest_mode = (entry >> 11) & 1;
+                delivery_mode = (entry >> 8) & 7;
+                polarity = (entry >> 13) & 1;
+                uint32_t uTagSrc = pThis->auTagSrc[i];
+                if (trig_mode == APIC_TRIGGER_EDGE)
+                {
+                    pThis->auTagSrc[i] = 0;
+                    pThis->irr &= ~mask;
+                }
+                if (delivery_mode == APIC_DM_EXTINT)
+                    /* malc: i'm still not so sure about ExtINT delivery */
+                {
+                    AssertMsgFailed(("Delivery mode ExtINT"));
+                    vector = 0xff; /* incorrect but shuts up gcc. */
+                }
+                else
+                    vector = entry & 0xff;
+
+                int rc = pThis->CTX_SUFF(pIoApicHlp)->pfnApicBusDeliver(pThis->CTX_SUFF(pDevIns),
+                                                                        dest,
+                                                                        dest_mode,
+                                                                        delivery_mode,
+                                                                        vector,
+                                                                        polarity,
+                                                                        trig_mode,
+                                                                        uTagSrc);
+                /* We must be sure that attempts to reschedule in R3
+                   never get here */
+                Assert(rc == VINF_SUCCESS || rc == VERR_APIC_INTR_DISCARDED); NOREF(rc);
+            }
+        }
+    }
+}
+
+
+static void ioapic_set_irq(PIOAPIC pThis, int vector, int level, uint32_t uTagSrc)
+{
+    if (vector >= 0 && vector < IOAPIC_NUM_PINS)
+    {
+        uint32_t mask = 1 << vector;
+        uint64_t entry = pThis->ioredtbl[vector];
+
+        if ((entry >> 15) & 1)
+        {
+            /* level triggered */
+            if (level)
+            {
+                pThis->irr |= mask;
+                if (!pThis->auTagSrc[vector])
+                    pThis->auTagSrc[vector] = uTagSrc;
+                else
+                    pThis->auTagSrc[vector] = RT_BIT_32(31);
+
+                ioapic_service(pThis);
+
+                if ((level & PDM_IRQ_LEVEL_FLIP_FLOP) == PDM_IRQ_LEVEL_FLIP_FLOP)
+                {
+                    pThis->irr &= ~mask;
+                    pThis->auTagSrc[vector] = 0;
+                }
+            }
+            else
+            {
+                pThis->irr &= ~mask;
+                pThis->auTagSrc[vector] = 0;
+            }
+        }
+        else
+        {
+            /* edge triggered */
+            if (level)
+            {
+                pThis->irr |= mask;
+                if (!pThis->auTagSrc[vector])
+                    pThis->auTagSrc[vector] = uTagSrc;
+                else
+                    pThis->auTagSrc[vector] = RT_BIT_32(31);
+
+                ioapic_service(pThis);
+            }
+        }
+    }
+}
+
+
+/**
+ * Handles a read from the IOAPICID register.
+ */
+static int ioapic_IoApicId_r(PIOAPIC pThis, uint32_t *pu32Value)
+{
+    *pu32Value = (uint32_t)pThis->id << 24;
+    return VINF_SUCCESS;
+}
+
+
+/**
+ * Handles a write to the IOAPICID register.
+ */
+static int ioapic_IoApicId_w(PIOAPIC pThis, uint32_t u32Value)
+{
+    /* Note! Compared to the 82093AA spec, we've extended the IOAPIC
+             identification from bits 27:24 to bits 31:24. */
+    Log(("ioapic: IOAPICID %#x -> %#x\n", pThis->id, u32Value >> 24));
+    pThis->id = u32Value >> 24;
+    return VINF_SUCCESS;
+}
+
+
+/**
+ * Handles a read from the IOAPICVER register.
+ */
+static int ioapic_IoApicVer_r(PIOAPIC pThis, uint32_t *pu32Value)
+{
+    *pu32Value = RT_MAKE_U32(0x11, IOAPIC_NUM_PINS - 1); /* (0x11 is the version.) */
+    return VINF_SUCCESS;
+}
+
+
+/**
+ * Handles a read from the IOAPICARB register.
+ */
+static int ioapic_IoApicArb_r(PIOAPIC pThis, uint32_t *pu32Value)
+{
+    *pu32Value = 0; /* (arbitration winner) */
+    return VINF_SUCCESS;
+}
+
+
+/**
+ * Handles a read from the IOREGSEL register.
+ */
+static int ioapic_IoRegSel_r(PIOAPIC pThis, uint32_t *pu32Value)
+{
+    *pu32Value = pThis->ioregsel;
+    return VINF_SUCCESS;
+}
+
+/**
+ * Handles a write to the IOREGSEL register.
+ */
+static int ioapic_IoRegSel_w(PIOAPIC pThis, uint32_t u32Value)
+{
+    Log2(("ioapic: IOREGSEL %#04x -> %#04x\n", pThis->ioregsel, u32Value & 0xff));
+    /* Bits 7:0 are writable, the rest aren't. Confirmed on recent AMD box. */
+    pThis->ioregsel = u32Value & 0xff;
+    return VINF_SUCCESS;
+}
+
+
+/**
+ * Handles a write to the IOWIN register.
+ */
+static int ioapic_IoWin_r(PIOAPIC pThis, uint32_t *pu32Value)
+{
+    int             rc = VINF_SUCCESS;
+    uint32_t const  uIoRegSel = pThis->ioregsel;
+
+    if (uIoRegSel == 0)
+        rc = ioapic_IoApicId_r(pThis, pu32Value);
+    else if (uIoRegSel == 1)
+        rc = ioapic_IoApicVer_r(pThis, pu32Value);
+    else if (uIoRegSel == 2)
+        rc = ioapic_IoApicArb_r(pThis, pu32Value);
+    /*
+     * IOREDTBL0..IOREDTBL23.
+     */
+    else if (uIoRegSel - UINT32_C(0x10) < IOAPIC_NUM_PINS * 2)
+    {
+        uint32_t const  idxIoRedTbl = (uIoRegSel - UINT32_C(0x10)) >> 1;
+        if (!(uIoRegSel & 1))
+            /** @todo r=bird: Do we need to emulate DELIVS or/and Remote IRR? */
+            *pu32Value = RT_LODWORD(pThis->ioredtbl[idxIoRedTbl]);
+        else
+            *pu32Value = RT_HIDWORD(pThis->ioredtbl[idxIoRedTbl]);
+    }
+    else
+    {
+        Log(("ioapic: Attempt to read from register %#x.\n", uIoRegSel));
+        *pu32Value = UINT32_MAX;
+    }
+
+    Log(("ioapic: IOWIN rd -> %#010x (%Rrc)\n", *pu32Value, rc));
+    return rc;
+}
+
+
+/**
+ * Handles a write to the IOWIN register.
+ */
+static int ioapic_IoWin_w(PIOAPIC pThis, uint32_t u32Value)
+{
+    int             rc = VINF_SUCCESS;
+    uint32_t const  uIoRegSel = pThis->ioregsel;
+    Log2(("ioapic: IOWIN[%#04x] = %#x\n", uIoRegSel, u32Value));
+
+    /*
+     * IOAPICID.
+     */
+    if (uIoRegSel == 0)
+        rc = ioapic_IoApicId_w(pThis, u32Value);
+    /*
+     * IOREDTBL0..IOREDTBL23.
+     */
+    else if (uIoRegSel - UINT32_C(0x10) < IOAPIC_NUM_PINS * 2)
+    {
+        uint32_t const  idxIoRedTbl = (uIoRegSel - UINT32_C(0x10)) >> 1;
+        uint64_t        u64NewValue;
+        if (!(uIoRegSel & 1))
+        {
+            /*
+             * Low DWORD.
+             *
+             * Have to do some sanity checks here because Linux 2.6 kernels
+             * writes seemingly bogus value (u32Value = 0) in their
+             * unlock_ExtINT_logic() function. Not sure what it's good for, but
+             * we ran into trouble with INTVEC = 0.  Luckily the 82093AA specs
+             * limits the INTVEC range to 0x10 thru 0xfe, so we use this to
+             * ignore harmful values.
+             *
+             * Update: Looking at real hw (recent AMD), they don't reject
+             * invalid vector numbers, at least not at this point. Could be that
+             * some other code path needs to refuse something instead.  Results:
+             *  - Writing 0 to lo+hi -> 0.
+             *  - Writing ~0 to lo+hi -> 0xff0000000001afff.
+             *  - Writing ~0 w/ DELMOD set to 011b or 110b (both reserved)
+             *    results in DELMOD containing the reserved values.
+             *  - Ditto with same + DELMOD in [0..7], DELMOD is stored as written.
+             */
+            if (   (u32Value & APIC_LVT_MASKED)
+                || ((u32Value & UINT32_C(0xff)) - UINT32_C(0x10)) <= UINT32_C(0xee) /* (0xfe - 0x10 = 0xee) */ )
+                u64NewValue = (pThis->ioredtbl[idxIoRedTbl] & (UINT64_C(0xffffffff00000000) | RT_BIT(14) | RT_BIT(12)))
+                            | (u32Value & ~(RT_BIT(14) | RT_BIT(12)));
+            else
+            {
+                LogRel(("IOAPIC GUEST BUG: bad vector writing %x(sel=%x) to %u\n", u32Value, uIoRegSel, idxIoRedTbl));
+                u64NewValue = pThis->ioredtbl[idxIoRedTbl];
+            }
+        }
+        else
+        {
+            /*
+             * High DWORD.
+             */
+            u64NewValue = (pThis->ioredtbl[idxIoRedTbl] & UINT64_C(0x00000000ffffffff))
+                        | ((uint64_t)(u32Value & UINT32_C(0xff000000)) << 32);
+        }
+
+        Log(("ioapic: IOREDTBL%u %#018llx -> %#018llx\n", idxIoRedTbl, pThis->ioredtbl[idxIoRedTbl], u64NewValue));
+        pThis->ioredtbl[idxIoRedTbl] = u64NewValue;
+
+        ioapic_service(pThis);
+    }
+    /*
+     * Read-only or unknown registers. Log it.
+     */
+    else if (uIoRegSel == 1)
+        Log(("ioapic: Attempt to write (%#x) to IOAPICVER.\n", u32Value));
+    else if (uIoRegSel == 2)
+        Log(("ioapic: Attempt to write (%#x) to IOAPICARB.\n", u32Value));
+    else
+        Log(("ioapic: Attempt to write (%#x) to register %#x.\n", u32Value, uIoRegSel));
+
+    return rc;
+}
+
+
+PDMBOTHCBDECL(int) ioapicMMIORead(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void *pv, unsigned cb)
+{
+    PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
+    IOAPIC_LOCK(pThis, VINF_IOM_R3_MMIO_READ);
+
+    STAM_COUNTER_INC(&CTXSUFF(pThis->StatMMIORead));
+
+    /*
+     * Pass it on to the register read handlers.
+     * (See 0xff comments in ioapicMMIOWrite.)
+     */
+    int      rc;
+    uint32_t offReg = GCPhysAddr & 0xff;
+    if (offReg == 0)
+        rc = ioapic_IoRegSel_r(pThis, (uint32_t *)pv);
+    else if (offReg == 0x10)
+        rc = ioapic_IoWin_r(pThis, (uint32_t *)pv);
+    else
+    {
+        Log(("ioapicMMIORead: Invalid access: offReg=%#x\n", offReg));
+        rc = VINF_IOM_MMIO_UNUSED_FF;
+    }
+    Log3(("ioapicMMIORead: @%#x -> %#x %Rrc\n", offReg, *(uint32_t *)pv, rc));
+
+    IOAPIC_UNLOCK(pThis);
+    return rc;
+}
+
+PDMBOTHCBDECL(int) ioapicMMIOWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void const *pv, unsigned cb)
+{
+    PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
+
+    STAM_COUNTER_INC(&CTXSUFF(pThis->StatMMIOWrite));
+    IOAPIC_LOCK(pThis, VINF_IOM_R3_MMIO_WRITE);
+
+    /*
+     * Fetch the value.
+     *
+     * We've told IOM to only give us DWORD accesses.  Observations on AMD
+     * indicates that unaligned writes get their missing bytes written as zero.
+     */
+    Assert(!(GCPhysAddr & 3)); Assert(cb == 4);
+    uint32_t u32Value = *(uint32_t const *)pv;
+
+    /*
+     * The 0xff mask is because we don't really implement the APICBASE register
+     * in the PIIX3, so if the guest tries to relocate the IOAPIC via PIIX3 we
+     * won't know. The I/O APIC address is on the form FEC0xy00h, where xy is
+     * programmable. Masking 0xff means we cover the y. The x would require
+     * reregistering MMIO memory, which means the guest is out of luck there.
+     */
+    int      rc;
+    uint32_t offReg = GCPhysAddr & 0xff;
+    if (offReg == 0)
+        rc = ioapic_IoRegSel_w(pThis, u32Value);
+    else if (offReg == 0x10)
+        rc = ioapic_IoWin_w(pThis, u32Value);
+    else
+    {
+        Log(("ioapicMMIOWrite: Invalid access: offReg=%#x u32Value=%#x\n", offReg, u32Value));
+        rc = VINF_SUCCESS;
+    }
+    Log3(("ioapicMMIOWrite: @%#x := %#x %Rrc\n", offReg, u32Value, rc));
+
+    IOAPIC_UNLOCK(pThis);
+    return rc;
+}
+
+PDMBOTHCBDECL(void) ioapicSetIrq(PPDMDEVINS pDevIns, int iIrq, int iLevel, uint32_t uTagSrc)
+{
+    /* PDM lock is taken here; */ /** @todo add assertion */
+    PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
+    STAM_COUNTER_INC(&pThis->CTXSUFF(StatSetIrq));
+    LogFlow(("ioapicSetIrq: iIrq=%d iLevel=%d uTagSrc=%#x\n", iIrq, iLevel, uTagSrc));
+    ioapic_set_irq(pThis, iIrq, iLevel, uTagSrc);
+}
+
+PDMBOTHCBDECL(void) ioapicSendMsi(PPDMDEVINS pDevIns, RTGCPHYS GCAddr, uint32_t uValue, uint32_t uTagSrc)
+{
+    PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
+
+    LogFlow(("ioapicSendMsi: Address=%p uValue=%u\n", GCAddr, uValue));
+
+    uint8_t  dest = (GCAddr & VBOX_MSI_ADDR_DEST_ID_MASK) >> VBOX_MSI_ADDR_DEST_ID_SHIFT;
+    uint8_t  vector_num = (uValue & VBOX_MSI_DATA_VECTOR_MASK) >> VBOX_MSI_DATA_VECTOR_SHIFT;
+    uint8_t  dest_mode = (GCAddr >> VBOX_MSI_ADDR_DEST_MODE_SHIFT) & 0x1;
+    uint8_t  trigger_mode = (uValue >> VBOX_MSI_DATA_TRIGGER_SHIFT) & 0x1;
+    uint8_t  delivery_mode = (uValue >> VBOX_MSI_DATA_DELIVERY_MODE_SHIFT) & 0x7;
+#if 0
+    /*
+     * This bit indicates whether the message should be directed to the
+     * processor with the lowest interrupt priority among
+     * processors that can receive the interrupt, ignored ATM.
+     */
+    uint8_t  redir_hint = (GCAddr >> VBOX_MSI_ADDR_REDIRECTION_SHIFT) & 0x1;
+#endif
+    int rc = pThis->CTX_SUFF(pIoApicHlp)->pfnApicBusDeliver(pDevIns,
+                                                            dest,
+                                                            dest_mode,
+                                                            delivery_mode,
+                                                            vector_num,
+                                                            0 /* polarity, n/a */,
+                                                            trigger_mode,
+                                                            uTagSrc);
+    /* We must be sure that attempts to reschedule in R3
+       never get here */
+    Assert(rc == VINF_SUCCESS || rc == VERR_APIC_INTR_DISCARDED); NOREF(rc);
+}
+
+#ifdef IN_RING3
+
+/** @interface_method_impl{DBGFREGDESC,pfnGet} */
+static DECLCALLBACK(int) ioapicDbgReg_IoRegSel_r(void *pvUser, PCDBGFREGDESC pDesc, PDBGFREGVAL pValue)
+{
+    return ioapic_IoRegSel_r(PDMINS_2_DATA((PPDMDEVINS)pvUser, PIOAPIC), &pValue->u32);
+}
+
+/** @interface_method_impl{DBGFREGDESC,pfnSet} */
+static DECLCALLBACK(int) ioapicDbgReg_IoRegSel_w(void *pvUser, PCDBGFREGDESC pDesc, PCDBGFREGVAL pValue, PCDBGFREGVAL pfMask)
+{
+    return ioapic_IoRegSel_w(PDMINS_2_DATA((PPDMDEVINS)pvUser, PIOAPIC), pValue->u8);
+}
+
+/** @interface_method_impl{DBGFREGDESC,pfnGet} */
+static DECLCALLBACK(int) ioapicDbgReg_IoWin_r(void *pvUser, PCDBGFREGDESC pDesc, PDBGFREGVAL pValue)
+{
+    return ioapic_IoWin_r(PDMINS_2_DATA((PPDMDEVINS)pvUser, PIOAPIC), &pValue->u32);
+}
+
+/** @interface_method_impl{DBGFREGDESC,pfnSet} */
+static DECLCALLBACK(int) ioapicDbgReg_IoWin_w(void *pvUser, PCDBGFREGDESC pDesc, PCDBGFREGVAL pValue, PCDBGFREGVAL pfMask)
+{
+    return ioapic_IoWin_w(PDMINS_2_DATA((PPDMDEVINS)pvUser, PIOAPIC), pValue->u32);
+}
+
+/** @interface_method_impl{DBGFREGDESC,pfnGet} */
+static DECLCALLBACK(int) ioapicDbgReg_IoApicVer_r(void *pvUser, PCDBGFREGDESC pDesc, PDBGFREGVAL pValue)
+{
+    return ioapic_IoApicVer_r(PDMINS_2_DATA((PPDMDEVINS)pvUser, PIOAPIC), &pValue->u32);
+}
+
+/** @interface_method_impl{DBGFREGDESC,pfnGet} */
+static DECLCALLBACK(int) ioapicDbgReg_IoApicArb_r(void *pvUser, PCDBGFREGDESC pDesc, PDBGFREGVAL pValue)
+{
+    return ioapic_IoApicArb_r(PDMINS_2_DATA((PPDMDEVINS)pvUser, PIOAPIC), &pValue->u32);
+}
+
+/** @interface_method_impl{DBGFREGDESC,pfnGet} */
+static DECLCALLBACK(int) ioapicDbgReg_IoRedRblN_r(void *pvUser, PCDBGFREGDESC pDesc, PDBGFREGVAL pValue)
+{
+    PIOAPIC pThis = PDMINS_2_DATA((PPDMDEVINS)pvUser, PIOAPIC);
+    pValue->u64 = pThis->ioredtbl[pDesc->offRegister];
+    return VINF_SUCCESS;
+}
+
+/** @interface_method_impl{DBGFREGDESC,pfnSet} */
+static DECLCALLBACK(int) ioapicDbgReg_IoRedRblN_w(void *pvUser, PCDBGFREGDESC pDesc, PCDBGFREGVAL pValue, PCDBGFREGVAL pfMask)
+{
+    PIOAPIC pThis = PDMINS_2_DATA((PPDMDEVINS)pvUser, PIOAPIC);
+    pThis->ioredtbl[pDesc->offRegister] = pValue->u64 | (~pfMask->u64 &pThis->ioredtbl[pDesc->offRegister]);
+    return VINF_SUCCESS;
+}
+
+/** IOREDTBLn sub fields. */
+static DBGFREGSUBFIELD const g_aIoRedTblSubs[] =
+{
+    { "intvec",         0,  8,  0,  0, NULL, NULL },
+    { "delmode",        8,  3,  0,  0, NULL, NULL },
+    { "destmode",      11,  1,  0,  0, NULL, NULL },
+    { "delivs",        12,  1,  0,  DBGFREGSUBFIELD_FLAGS_READ_ONLY, NULL, NULL },
+    { "intpol",        13,  1,  0,  0, NULL, NULL },
+    { "remoteirr",     14,  1,  0,  DBGFREGSUBFIELD_FLAGS_READ_ONLY, NULL, NULL },
+    { "triggermode",   15,  1,  0,  0, NULL, NULL },
+    { "intmask",       16,  1,  0,  0, NULL, NULL },
+    { "dst",           56,  8,  0,  0, NULL, NULL },
+    DBGFREGSUBFIELD_TERMINATOR()
+};
+
+/** Register descriptors for DBGF. */
+static DBGFREGDESC const g_aRegDesc[] =
+{
+    { "ioregsel",   DBGFREG_END, DBGFREGVALTYPE_U8,  0,  0, ioapicDbgReg_IoRegSel_r,  ioapicDbgReg_IoRegSel_w, NULL, NULL },
+    { "iowin",      DBGFREG_END, DBGFREGVALTYPE_U32, 0,  0, ioapicDbgReg_IoWin_r,     ioapicDbgReg_IoWin_w,    NULL, NULL },
+    { "ioapicver",  DBGFREG_END, DBGFREGVALTYPE_U32, DBGFREG_FLAGS_READ_ONLY, 0, ioapicDbgReg_IoApicVer_r, NULL, NULL, NULL },
+    { "ioapicarb",  DBGFREG_END, DBGFREGVALTYPE_U32, DBGFREG_FLAGS_READ_ONLY, 0, ioapicDbgReg_IoApicArb_r, NULL, NULL, NULL },
+    { "ioredtbl0",  DBGFREG_END, DBGFREGVALTYPE_U64, 0,  0, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
+    { "ioredtbl1",  DBGFREG_END, DBGFREGVALTYPE_U64, 0,  1, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
+    { "ioredtbl2",  DBGFREG_END, DBGFREGVALTYPE_U64, 0,  2, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
+    { "ioredtbl3",  DBGFREG_END, DBGFREGVALTYPE_U64, 0,  3, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
+    { "ioredtbl4",  DBGFREG_END, DBGFREGVALTYPE_U64, 0,  4, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
+    { "ioredtbl5",  DBGFREG_END, DBGFREGVALTYPE_U64, 0,  5, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
+    { "ioredtbl6",  DBGFREG_END, DBGFREGVALTYPE_U64, 0,  6, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
+    { "ioredtbl7",  DBGFREG_END, DBGFREGVALTYPE_U64, 0,  7, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
+    { "ioredtbl8",  DBGFREG_END, DBGFREGVALTYPE_U64, 0,  8, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
+    { "ioredtbl9",  DBGFREG_END, DBGFREGVALTYPE_U64, 0,  9, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
+    { "ioredtbl10", DBGFREG_END, DBGFREGVALTYPE_U64, 0, 10, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
+    { "ioredtbl11", DBGFREG_END, DBGFREGVALTYPE_U64, 0, 11, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
+    { "ioredtbl12", DBGFREG_END, DBGFREGVALTYPE_U64, 0, 12, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
+    { "ioredtbl13", DBGFREG_END, DBGFREGVALTYPE_U64, 0, 13, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
+    { "ioredtbl14", DBGFREG_END, DBGFREGVALTYPE_U64, 0, 14, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
+    { "ioredtbl15", DBGFREG_END, DBGFREGVALTYPE_U64, 0, 15, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
+    { "ioredtbl16", DBGFREG_END, DBGFREGVALTYPE_U64, 0, 16, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
+    { "ioredtbl17", DBGFREG_END, DBGFREGVALTYPE_U64, 0, 17, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
+    { "ioredtbl18", DBGFREG_END, DBGFREGVALTYPE_U64, 0, 18, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
+    { "ioredtbl19", DBGFREG_END, DBGFREGVALTYPE_U64, 0, 19, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
+    { "ioredtbl20", DBGFREG_END, DBGFREGVALTYPE_U64, 0, 20, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
+    { "ioredtbl21", DBGFREG_END, DBGFREGVALTYPE_U64, 0, 21, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
+    { "ioredtbl22", DBGFREG_END, DBGFREGVALTYPE_U64, 0, 22, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
+    { "ioredtbl23", DBGFREG_END, DBGFREGVALTYPE_U64, 0, 23, ioapicDbgReg_IoRedRblN_r, ioapicDbgReg_IoRedRblN_w, NULL, &g_aIoRedTblSubs[0] },
+    DBGFREGDESC_TERMINATOR()
+};
+
+
+/**
+ * Info handler, device version. Dumps I/O APIC state.
+ *
+ * @param   pDevIns     Device instance which registered the info.
+ * @param   pHlp        Callback functions for doing output.
+ * @param   pszArgs     Argument string. Optional and specific to the handler.
+ */
+static DECLCALLBACK(void) ioapicInfo(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
+{
+    PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
+    uint32_t     uVal;
+
+    pHlp->pfnPrintf(pHlp, "I/O APIC at %#010x:\n", 0xfec00000);
+
+    ioapic_IoApicId_r(pThis, &uVal);
+    pHlp->pfnPrintf(pHlp, "  IOAPICID  : %#010x\n", uVal);
+    pHlp->pfnPrintf(pHlp, "    APIC ID = %#04x\n", (uVal >> 24) & 0xff);
+
+    ioapic_IoApicVer_r(pThis, &uVal);
+    unsigned iLastRedir = RT_BYTE3(uVal);
+    pHlp->pfnPrintf(pHlp, "  IOAPICVER : %#010x\n", uVal);
+    pHlp->pfnPrintf(pHlp, "    version = %#04x\n", uVal & 0xff);
+    pHlp->pfnPrintf(pHlp, "    redirs  = %u\n", iLastRedir + 1);
+
+    ioapic_IoApicArb_r(pThis, &uVal);
+    pHlp->pfnPrintf(pHlp, "    arb ID  = %#010x\n", RT_BYTE4(uVal));
+    pHlp->pfnPrintf(pHlp, "  IOAPICARB : %#08x\n", uVal);
+
+    Assert(sizeof(pThis->ioredtbl) / sizeof(pThis->ioredtbl[0]) > iLastRedir);
+    pHlp->pfnPrintf(pHlp, "I/O redirection table\n");
+    pHlp->pfnPrintf(pHlp, " idx dst_mode dst_addr mask trigger rirr polarity dlvr_st dlvr_mode vector\n");
+    for (unsigned i = 0; i <= iLastRedir; ++i)
+    {
+        static const char * const s_apszDModes[] =
+        {
+            "Fixed ", "LowPri", "SMI   ", "Resrvd", "NMI   ", "INIT  ", "Resrvd", "ExtINT"
+        };
+
+        pHlp->pfnPrintf(pHlp, "  %02d   %s      %02x     %d    %s   %d   %s  %s     %s   %3d (%016llx)\n",
+                        i,
+                        pThis->ioredtbl[i] & RT_BIT(11) ? "log " : "phys",          /* dest mode */
+                        (int)(pThis->ioredtbl[i] >> 56),                            /* dest addr */
+                        (int)(pThis->ioredtbl[i] >> 16) & 1,                        /* mask */
+                        pThis->ioredtbl[i] & RT_BIT(15) ? "level" : "edge ",        /* trigger */
+                        (int)(pThis->ioredtbl[i] >> 14) & 1,                        /* remote IRR */
+                        pThis->ioredtbl[i] & RT_BIT(13) ? "activelo" : "activehi",  /* polarity */
+                        pThis->ioredtbl[i] & RT_BIT(12) ? "pend" : "idle",          /* delivery status */
+                        s_apszDModes[(pThis->ioredtbl[i] >> 8) & 0x07],             /* delivery mode */
+                        (int)pThis->ioredtbl[i] & 0xff,                             /* vector */
+                        pThis->ioredtbl[i]                                          /* entire register */
+                        );
+    }
+}
+
+/**
+ * @copydoc FNSSMDEVSAVEEXEC
+ */
+static DECLCALLBACK(int) ioapicSaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
+{
+    PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
+
+    SSMR3PutU8(pSSM, pThis->id);
+    SSMR3PutU8(pSSM, pThis->ioregsel);
+    for (unsigned i = 0; i < IOAPIC_NUM_PINS; i++)
+        SSMR3PutU64(pSSM, pThis->ioredtbl[i]);
+
+    return VINF_SUCCESS;
+}
+
+/**
+ * @copydoc FNSSMDEVLOADEXEC
+ */
+static DECLCALLBACK(int) ioapicLoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass)
+{
+    PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
+    if (   uVersion != IOAPIC_SAVED_STATE_VERSION_VBOX_50
+        && uVersion != IOAPIC_SAVED_STATE_VERSION_NEW_CODE)
+        return VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION;
+
+    uint32_t ignore;
+    if (uVersion == IOAPIC_SAVED_STATE_VERSION_NEW_CODE)
+        SSMR3GetU32(pSSM, &ignore);
+
+    SSMR3GetU8(pSSM, &pThis->id);
+    SSMR3GetU8(pSSM, &pThis->ioregsel);
+    for (unsigned i = 0; i < IOAPIC_NUM_PINS; i++)
+        SSMR3GetU64(pSSM, &pThis->ioredtbl[i]);
+
+    Assert(uPass == SSM_PASS_FINAL); NOREF(uPass);
+    return VINF_SUCCESS;
+}
+
+/**
+ * @copydoc FNPDMDEVRESET
+ */
+static DECLCALLBACK(void) ioapicReset(PPDMDEVINS pDevIns)
+{
+    PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
+    pThis->pIoApicHlpR3->pfnLock(pDevIns, VERR_INTERNAL_ERROR);
+
+    pThis->id       = pThis->cCpus;
+    pThis->ioregsel = 0;
+    pThis->irr      = 0;
+    for (unsigned i = 0; i < IOAPIC_NUM_PINS; i++)
+    {
+        pThis->ioredtbl[i] = 1 << 16; /* mask LVT */
+        pThis->auTagSrc[i] = 0;
+    }
+
+    IOAPIC_UNLOCK(pThis);
+}
+
+/**
+ * @copydoc FNPDMDEVRELOCATE
+ */
+static DECLCALLBACK(void) ioapicRelocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta)
+{
+    PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
+    pThis->pDevInsRC    = PDMDEVINS_2_RCPTR(pDevIns);
+    pThis->pIoApicHlpRC = pThis->pIoApicHlpR3->pfnGetRCHelpers(pDevIns);
+}
+
+/**
+ * @copydoc FNPDMDEVCONSTRUCT
+ */
+static DECLCALLBACK(int) ioapicConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
+{
+    PIOAPIC pThis = PDMINS_2_DATA(pDevIns, PIOAPIC);
+    Assert(iInstance == 0);
+
+    /*
+     * Initialize the state data.
+     */
+    pThis->pDevInsR3 = pDevIns;
+    pThis->pDevInsR0 = PDMDEVINS_2_R0PTR(pDevIns);
+    pThis->pDevInsRC = PDMDEVINS_2_RCPTR(pDevIns);
+    /* (the rest is done by the reset call at the end) */
+
+    /* PDM provides locking via the IOAPIC helpers. */
+    int rc = PDMDevHlpSetDeviceCritSect(pDevIns, PDMDevHlpCritSectGetNop(pDevIns));
+    AssertRCReturn(rc, rc);
+
+    /*
+     * Validate and read the configuration.
+     */
+    PDMDEV_VALIDATE_CONFIG_RETURN(pDevIns, "NumCPUs|RZEnabled", "");
+
+    uint32_t cCpus;
+    rc = CFGMR3QueryU32Def(pCfg, "NumCPUs", &cCpus, 1);
+    if (RT_FAILURE(rc))
+        return PDMDEV_SET_ERROR(pDevIns, rc,
+                                N_("Configuration error: Failed to query integer value \"NumCPUs\""));
+    if (cCpus > UINT8_MAX - 2) /* ID 255 is broadcast and the IO-APIC needs one (ID=cCpus). */
+        return PDMDevHlpVMSetError(pDevIns, rc, RT_SRC_POS,
+                                   N_("Configuration error: Max %u CPUs, %u specified"), UINT8_MAX - 1, cCpus);
+    pThis->cCpus = (uint8_t)cCpus;
+
+    bool fRZEnabled;
+    rc = CFGMR3QueryBoolDef(pCfg, "RZEnabled", &fRZEnabled, true);
+    if (RT_FAILURE(rc))
+        return PDMDEV_SET_ERROR(pDevIns, rc,
+                                N_("Configuration error: Failed to query boolean value \"RZEnabled\""));
+
+    Log(("IOAPIC: cCpus=%u fRZEnabled=%RTbool\n", cCpus, fRZEnabled));
+
+    /*
+     * Register the IOAPIC and get helpers.
+     */
+    PDMIOAPICREG IoApicReg;
+    IoApicReg.u32Version   = PDM_IOAPICREG_VERSION;
+    IoApicReg.pfnSetIrqR3  = ioapicSetIrq;
+    IoApicReg.pszSetIrqRC  = fRZEnabled ? "ioapicSetIrq"  : NULL;
+    IoApicReg.pszSetIrqR0  = fRZEnabled ? "ioapicSetIrq"  : NULL;
+    IoApicReg.pfnSendMsiR3 = ioapicSendMsi;
+    IoApicReg.pszSendMsiRC = fRZEnabled ? "ioapicSendMsi" : NULL;
+    IoApicReg.pszSendMsiR0 = fRZEnabled ? "ioapicSendMsi" : NULL;
+    IoApicReg.pfnSetEoiR3  = NULL;
+    IoApicReg.pszSetEoiR0  = NULL;
+    IoApicReg.pszSetEoiRC  = NULL;
+
+    rc = PDMDevHlpIOAPICRegister(pDevIns, &IoApicReg, &pThis->pIoApicHlpR3);
+    if (RT_FAILURE(rc))
+    {
+        AssertMsgFailed(("IOAPICRegister -> %Rrc\n", rc));
+        return rc;
+    }
+
+    /*
+     * Register MMIO callbacks and saved state.
+     * Note! The write ZEROing was observed on a real AMD system.
+     */
+    rc = PDMDevHlpMMIORegister(pDevIns, UINT32_C(0xfec00000), 0x1000, pThis,
+                               IOMMMIO_FLAGS_READ_DWORD | IOMMMIO_FLAGS_WRITE_DWORD_ZEROED,
+                               ioapicMMIOWrite, ioapicMMIORead, "I/O APIC Memory");
+    if (RT_FAILURE(rc))
+        return rc;
+
+    if (fRZEnabled)
+    {
+        pThis->pIoApicHlpRC = pThis->pIoApicHlpR3->pfnGetRCHelpers(pDevIns);
+        rc = PDMDevHlpMMIORegisterRC(pDevIns, UINT32_C(0xfec00000), 0x1000, NIL_RTRCPTR /*pvUser*/,
+                                     "ioapicMMIOWrite", "ioapicMMIORead");
+        AssertRCReturn(rc, rc);
+
+        pThis->pIoApicHlpR0 = pThis->pIoApicHlpR3->pfnGetR0Helpers(pDevIns);
+        rc = PDMDevHlpMMIORegisterR0(pDevIns, UINT32_C(0xfec00000), 0x1000, NIL_RTR0PTR /*pvUser*/,
+                                     "ioapicMMIOWrite", "ioapicMMIORead");
+        AssertRCReturn(rc, rc);
+    }
+
+    rc = PDMDevHlpSSMRegister(pDevIns, IOAPIC_SAVED_STATE_VERSION_VBOX_50, sizeof(*pThis),
+                              ioapicSaveExec, ioapicLoadExec);
+    if (RT_FAILURE(rc))
+        return rc;
+
+    /*
+     * Register debugger info callback.
+     */
+    rc = PDMDevHlpDBGFInfoRegister(pDevIns, "ioapic", "Display I/O APIC state.", ioapicInfo); AssertRC(rc);
+    rc = PDMDevHlpDBGFRegRegister(pDevIns, g_aRegDesc); AssertRC(rc);
+
+#ifdef VBOX_WITH_STATISTICS
+    /*
+     * Statistics.
+     */
+    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMMIOReadGC,     STAMTYPE_COUNTER,  "/Devices/IOAPIC/MMIOReadGC",   STAMUNIT_OCCURENCES, "Number of IOAPIC MMIO reads in GC.");
+    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMMIOReadHC,     STAMTYPE_COUNTER,  "/Devices/IOAPIC/MMIOReadHC",   STAMUNIT_OCCURENCES, "Number of IOAPIC MMIO reads in HC.");
+    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMMIOWriteGC,    STAMTYPE_COUNTER,  "/Devices/IOAPIC/MMIOWriteGC",  STAMUNIT_OCCURENCES, "Number of IOAPIC MMIO writes in GC.");
+    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMMIOWriteHC,    STAMTYPE_COUNTER,  "/Devices/IOAPIC/MMIOWriteHC",  STAMUNIT_OCCURENCES, "Number of IOAPIC MMIO writes in HC.");
+    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatSetIrqGC,       STAMTYPE_COUNTER,  "/Devices/IOAPIC/SetIrqGC",     STAMUNIT_OCCURENCES, "Number of IOAPIC SetIrq calls in GC.");
+    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatSetIrqHC,       STAMTYPE_COUNTER,  "/Devices/IOAPIC/SetIrqHC",     STAMUNIT_OCCURENCES, "Number of IOAPIC SetIrq calls in HC.");
+#endif
+
+    /*
+     * Reset the device state.
+     */
+    ioapicReset(pDevIns);
+
+    return VINF_SUCCESS;
+}
+
+/**
+ * IO APIC device registration structure.
+ */
+const PDMDEVREG g_DeviceIOAPIC =
+{
+    /* u32Version */
+    PDM_DEVREG_VERSION,
+    /* szName */
+    "ioapic",
+    /* szRCMod */
+    "VBoxDD2RC.rc",
+    /* szR0Mod */
+    "VBoxDD2R0.r0",
+    /* pszDescription */
+    "I/O Advanced Programmable Interrupt Controller (IO-APIC) Device",
+    /* fFlags */
+    PDM_DEVREG_FLAGS_HOST_BITS_DEFAULT | PDM_DEVREG_FLAGS_GUEST_BITS_32_64 | PDM_DEVREG_FLAGS_PAE36 | PDM_DEVREG_FLAGS_RC | PDM_DEVREG_FLAGS_R0,
+    /* fClass */
+    PDM_DEVREG_CLASS_PIC,
+    /* cMaxInstances */
+    1,
+    /* cbInstance */
+    sizeof(IOAPIC),
+    /* pfnConstruct */
+    ioapicConstruct,
+    /* pfnDestruct */
+    NULL,
+    /* pfnRelocate */
+    ioapicRelocate,
+    /* pfnMemSetup */
+    NULL,
+    /* pfnPowerOn */
+    NULL,
+    /* pfnReset */
+    ioapicReset,
+    /* pfnSuspend */
+    NULL,
+    /* pfnResume */
+    NULL,
+    /* pfnAttach */
+    NULL,
+    /* pfnDetach */
+    NULL,
+    /* pfnQueryInterface. */
+    NULL,
+    /* pfnInitComplete */
+    NULL,
+    /* pfnPowerOff */
+    NULL,
+    /* pfnSoftReset */
+    NULL,
+    /* u32VersionEnd */
+    PDM_DEVREG_VERSION
+};
+
+#endif /* IN_RING3 */
+#endif /* !VBOX_DEVICE_STRUCT_TESTCASE */
diff --git a/src/VBox/Devices/PC/DevLPC.cpp b/src/VBox/Devices/PC/DevLPC.cpp
index 9d512c5..de7ec33 100644
--- a/src/VBox/Devices/PC/DevLPC.cpp
+++ b/src/VBox/Devices/PC/DevLPC.cpp
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -78,6 +78,7 @@ typedef struct
 
 static uint32_t rcba_ram_readl(LPCState* s, RTGCPHYS addr)
 {
+    RT_NOREF1(s);
     Log(("rcba_read at %llx\n", (uint64_t)addr));
     int32_t iIndex = (addr - RCBA_BASE);
     uint32_t value = 0;
@@ -104,6 +105,7 @@ static uint32_t rcba_ram_readl(LPCState* s, RTGCPHYS addr)
 
 static void rcba_ram_writel(LPCState* s, RTGCPHYS addr, uint32_t value)
 {
+    RT_NOREF2(s, value);
     Log(("rcba_write %llx = %#x\n", (uint64_t)addr, value));
     int32_t iIndex = (addr - RCBA_BASE);
 
@@ -132,6 +134,7 @@ static void rcba_ram_writel(LPCState* s, RTGCPHYS addr, uint32_t value)
  */
 PDMBOTHCBDECL(int)  lpcMMIORead(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void *pv, unsigned cb)
 {
+    RT_NOREF2(pvUser, cb);
     LPCState *s = PDMINS_2_DATA(pDevIns, LPCState*);
     Assert(cb == 4); Assert(!(GCPhysAddr & 3));
     *(uint32_t*)pv = rcba_ram_readl(s, GCPhysAddr);
@@ -152,6 +155,7 @@ PDMBOTHCBDECL(int)  lpcMMIORead(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhy
  */
 PDMBOTHCBDECL(int) lpcMMIOWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void const *pv, unsigned cb)
 {
+    RT_NOREF1(pvUser);
     LPCState *s = PDMINS_2_DATA(pDevIns, LPCState*);
 
     switch (cb)
@@ -181,6 +185,7 @@ PDMBOTHCBDECL(int) lpcMMIOWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhy
  */
 static DECLCALLBACK(void) lpcInfo(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
 {
+    RT_NOREF1(pszArgs);
     LPCState   *pThis = PDMINS_2_DATA(pDevIns, LPCState *);
     LogFlow(("lpcInfo: \n"));
 
@@ -209,6 +214,8 @@ static DECLCALLBACK(void) lpcInfo(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const
  */
 static DECLCALLBACK(int) lpcConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
 {
+    RT_NOREF2(iInstance, pCfg);
+    PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
     LPCState   *pThis = PDMINS_2_DATA(pDevIns, LPCState *);
     int         rc;
     Assert(iInstance == 0);
@@ -303,10 +310,10 @@ static DECLCALLBACK(int) lpcConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNO
     /* E4h-EBh   FDVCT     Feature Vector Description */
 
     /* F0h-F3h RCBA Root Complex Base Address */
-    pThis->dev.config[0xf0] = (uint8_t)(RCBA_BASE | 1); /* enabled */
-    pThis->dev.config[0xf1] = (uint8_t)(RCBA_BASE >> 8);
-    pThis->dev.config[0xf2] = (uint8_t)(RCBA_BASE >> 16);
-    pThis->dev.config[0xf3] = (uint8_t)(RCBA_BASE >> 24);
+    pThis->dev.config[0xf0] = RT_BYTE1(RCBA_BASE | 1); /* enabled */
+    pThis->dev.config[0xf1] = RT_BYTE2(RCBA_BASE);
+    pThis->dev.config[0xf2] = RT_BYTE3(RCBA_BASE);
+    pThis->dev.config[0xf3] = RT_BYTE4(RCBA_BASE);
 
     rc = PDMDevHlpPCIRegister (pDevIns, &pThis->dev);
     if (RT_FAILURE(rc))
diff --git a/src/VBox/Devices/PC/DevPIC.cpp b/src/VBox/Devices/PC/DevPIC.cpp
index 82f551f..f8cd1cf 100644
--- a/src/VBox/Devices/PC/DevPIC.cpp
+++ b/src/VBox/Devices/PC/DevPIC.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -882,6 +882,7 @@ static DECLCALLBACK(void)  picReset(PPDMDEVINS pDevIns)
  */
 static DECLCALLBACK(void) picRelocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta)
 {
+    RT_NOREF1(offDelta);
     PDEVPIC         pThis = PDMINS_2_DATA(pDevIns, PDEVPIC);
     unsigned        i;
 
@@ -897,6 +898,8 @@ static DECLCALLBACK(void) picRelocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta)
  */
 static DECLCALLBACK(int)  picConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
 {
+    PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
+    RT_NOREF1(iInstance);
     PDEVPIC         pThis = PDMINS_2_DATA(pDevIns, PDEVPIC);
     int             rc;
     bool            fGCEnabled;
diff --git a/src/VBox/Devices/PC/DevPcArch.cpp b/src/VBox/Devices/PC/DevPcArch.cpp
index ea1ddbe..763f7e6 100644
--- a/src/VBox/Devices/PC/DevPcArch.cpp
+++ b/src/VBox/Devices/PC/DevPcArch.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -145,6 +145,7 @@ SeeAlso: #P0416,#P0417,MSR 00001000h
 static DECLCALLBACK(int)
 pcarchIOPortPS2SysControlPortARead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb)
 {
+    RT_NOREF1(pvUser);
     if (cb == 1)
     {
         *pu32 = PDMDevHlpA20IsEnabled(pDevIns) << 1;
@@ -188,6 +189,8 @@ pcarchIOPortPS2SysControlPortAWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT P
  */
 static DECLCALLBACK(int)  pcarchConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
 {
+    RT_NOREF1(iInstance);
+    PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
     PDEVPCARCH  pThis = PDMINS_2_DATA(pDevIns, PDEVPCARCH);
     int         rc;
     Assert(iInstance == 0);
diff --git a/src/VBox/Devices/PC/DevPcBios.cpp b/src/VBox/Devices/PC/DevPcBios.cpp
index e29caeb..34acb48 100644
--- a/src/VBox/Devices/PC/DevPcBios.cpp
+++ b/src/VBox/Devices/PC/DevPcBios.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -226,6 +226,7 @@ typedef DEVPCBIOS *PDEVPCBIOS;
  */
 static DECLCALLBACK(int) pcbiosIOPortRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb)
 {
+    RT_NOREF5(pDevIns, pvUser, Port, pu32, cb);
     return VERR_IOM_IOPORT_UNUSED;
 }
 
@@ -235,6 +236,8 @@ static DECLCALLBACK(int) pcbiosIOPortRead(PPDMDEVINS pDevIns, void *pvUser, RTIO
  */
 static DECLCALLBACK(int) pcbiosIOPortWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb)
 {
+    RT_NOREF1(pvUser);
+
     /*
      * Bochs BIOS char printing.
      */
@@ -336,6 +339,7 @@ static uint8_t pcbiosCmosRead(PPDMDEVINS pDevIns, unsigned off)
  */
 static DECLCALLBACK(bool) pcbiosFw_IsHardReset(PPDMDEVINS pDevIns, uint32_t fFlags)
 {
+    RT_NOREF1(fFlags);
     PDEVPCBIOS pThis = PDMINS_2_DATA(pDevIns, PDEVPCBIOS);
     if (pThis->fCheckShutdownStatusForSoftReset)
     {
@@ -465,10 +469,10 @@ static void pcbiosCmosInitHardDisk(PPDMDEVINS pDevIns, int offType, int offInfo,
  */
 static int setLogicalDiskGeometry(PPDMIBASE pBase, PPDMIMEDIA pHardDisk, PPDMMEDIAGEOMETRY pLCHSGeometry)
 {
-    PDMMEDIAGEOMETRY LCHSGeometry;
-    int rc = VINF_SUCCESS;
+    RT_NOREF1(pBase);
 
-    rc = pHardDisk->pfnBiosGetLCHSGeometry(pHardDisk, &LCHSGeometry);
+    PDMMEDIAGEOMETRY LCHSGeometry;
+    int rc = pHardDisk->pfnBiosGetLCHSGeometry(pHardDisk, &LCHSGeometry);
     if (   rc == VERR_PDM_GEOMETRY_NOT_SET
         || LCHSGeometry.cCylinders == 0
         || LCHSGeometry.cHeads == 0
@@ -926,7 +930,8 @@ static DECLCALLBACK(int) pcbiosInitComplete(PPDMDEVINS pDevIns)
  */
 static DECLCALLBACK(void) pcbiosMemSetup(PPDMDEVINS pDevIns, PDMDEVMEMSETUPCTX enmCtx)
 {
-    PDEVPCBIOS  pThis = PDMINS_2_DATA(pDevIns, PDEVPCBIOS);
+    RT_NOREF1(enmCtx);
+    PDEVPCBIOS pThis = PDMINS_2_DATA(pDevIns, PDEVPCBIOS);
     LogFlow(("pcbiosMemSetup:\n"));
 
     if (pThis->u8IOAPIC)
@@ -1074,6 +1079,7 @@ static int pcbiosBootFromCfg(PPDMDEVINS pDevIns, PCFGMNODE pCfg, const char *psz
  */
 static DECLCALLBACK(int)  pcbiosConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
 {
+    RT_NOREF1(iInstance);
     PDEVPCBIOS  pThis = PDMINS_2_DATA(pDevIns, PDEVPCBIOS);
     int         rc;
     int         cb;
@@ -1563,7 +1569,7 @@ static DECLCALLBACK(int)  pcbiosConstruct(PPDMDEVINS pDevIns, int iInstance, PCF
     {
         const uint8_t  *pu8LanBootBinary = NULL;
         uint64_t        cbLanBootBinary;
-        uint64_t        cbFileLanBoot;
+        uint64_t        cbFileLanBoot = 0;
 
         /*
          * Open the LAN boot ROM and figure it size.
diff --git a/src/VBox/Devices/PC/DevPcBios.h b/src/VBox/Devices/PC/DevPcBios.h
index 81c51a5..37d181d 100644
--- a/src/VBox/Devices/PC/DevPcBios.h
+++ b/src/VBox/Devices/PC/DevPcBios.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/PC/DevPit-i8254.cpp b/src/VBox/Devices/PC/DevPit-i8254.cpp
index 0b1f96d..ca8a434 100644
--- a/src/VBox/Devices/PC/DevPit-i8254.cpp
+++ b/src/VBox/Devices/PC/DevPit-i8254.cpp
@@ -134,7 +134,7 @@
         } \
     } while (0)
 
-#if IN_RING3
+#ifdef IN_RING3
 /**
  * Acquires the TM lock and PIT lock, ignores failures.
  */
@@ -585,8 +585,7 @@ static void pit_irq_timer_update(PPITCHANNEL pChan, uint64_t current_time, uint6
 {
     int64_t expire_time;
     int irq_level;
-    PTMTIMER pTimer = pChan->CTX_SUFF(pPit)->channels[0].CTX_SUFF(pTimer);
-    Assert(TMTimerIsLockOwner(pTimer));
+    Assert(TMTimerIsLockOwner(pChan->CTX_SUFF(pPit)->channels[0].CTX_SUFF(pTimer)));
 
     if (!pChan->CTX_SUFF(pTimer))
         return;
@@ -821,7 +820,6 @@ PDMBOTHCBDECL(int) pitIOPortWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Por
          * Port 40-42h - Channel Data Ports.
          */
         PPITCHANNEL pChan = &pThis->channels[Port];
-        uint8_t const write_state = pChan->write_state;
         DEVPIT_LOCK_BOTH_RETURN(pThis, VINF_IOM_R3_IOPORT_WRITE);
         switch (pChan->write_state)
         {
@@ -853,7 +851,7 @@ PDMBOTHCBDECL(int) pitIOPortWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Por
  */
 PDMBOTHCBDECL(int) pitIOPortSpeakerRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb)
 {
-    NOREF(pvUser);
+    RT_NOREF2(pvUser, Port);
     if (cb == 1)
     {
         PPITSTATE pThis = PDMINS_2_DATA(pDevIns, PPITSTATE);
@@ -899,7 +897,7 @@ PDMBOTHCBDECL(int) pitIOPortSpeakerRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPO
  */
 PDMBOTHCBDECL(int) pitIOPortSpeakerWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb)
 {
-    NOREF(pvUser);
+    RT_NOREF2(pvUser, Port);
     if (cb == 1)
     {
         PPITSTATE pThis = PDMINS_2_DATA(pDevIns, PPITSTATE);
@@ -921,6 +919,7 @@ PDMBOTHCBDECL(int) pitIOPortSpeakerWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOP
                 switch (pThis->enmSpeakerEmu)
                 {
                     case PIT_SPEAKER_EMU_CONSOLE:
+                    {
                         int res;
                         res = ioctl(pThis->hHostSpeaker, KIOCSOUND, pChan->count);
                         if (res == -1)
@@ -929,16 +928,23 @@ PDMBOTHCBDECL(int) pitIOPortSpeakerWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOP
                             pThis->enmSpeakerEmu = PIT_SPEAKER_EMU_NONE;
                         }
                         break;
+                    }
                     case PIT_SPEAKER_EMU_EVDEV:
+                    {
                         struct input_event e;
                         e.type = EV_SND;
                         e.code = SND_TONE;
                         e.value = PIT_FREQ / pChan->count;
-                        write(pThis->hHostSpeaker, &e, sizeof(struct input_event));
+                        int res = write(pThis->hHostSpeaker, &e, sizeof(struct input_event));
+                        NOREF(res);
                         break;
+                    }
                     case PIT_SPEAKER_EMU_TTY:
-                        write(pThis->hHostSpeaker, "\a", 1);
+                    {
+                        int res = write(pThis->hHostSpeaker, "\a", 1);
+                        NOREF(res);
                         break;
+                    }
                     case PIT_SPEAKER_EMU_NONE:
                         break;
                     default:
@@ -962,12 +968,15 @@ PDMBOTHCBDECL(int) pitIOPortSpeakerWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOP
                         ioctl(pThis->hHostSpeaker, KIOCSOUND, 0);
                         break;
                     case PIT_SPEAKER_EMU_EVDEV:
+                    {
                         struct input_event e;
                         e.type = EV_SND;
                         e.code = SND_TONE;
                         e.value = 0;
-                        write(pThis->hHostSpeaker, &e, sizeof(struct input_event));
+                        int res = write(pThis->hHostSpeaker, &e, sizeof(struct input_event));
+                        NOREF(res);
                         break;
+                    }
                     case PIT_SPEAKER_EMU_TTY:
                         break;
                     case PIT_SPEAKER_EMU_NONE:
@@ -994,6 +1003,7 @@ PDMBOTHCBDECL(int) pitIOPortSpeakerWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOP
  */
 static DECLCALLBACK(int) pitLiveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uPass)
 {
+    RT_NOREF1(uPass);
     PPITSTATE pThis = PDMINS_2_DATA(pDevIns, PPITSTATE);
     SSMR3PutIOPort(pSSM, pThis->IOPortBaseCfg);
     SSMR3PutU8(    pSSM, pThis->channels[0].irq);
@@ -1143,6 +1153,7 @@ static DECLCALLBACK(int) pitLoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32
  */
 static DECLCALLBACK(void) pitTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
 {
+    RT_NOREF1(pDevIns);
     PPITCHANNEL pChan = (PPITCHANNEL)pvUser;
     STAM_PROFILE_ADV_START(&pChan->CTX_SUFF(pPit)->StatPITHandler, a);
 
@@ -1163,6 +1174,7 @@ static DECLCALLBACK(void) pitTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pv
  */
 static DECLCALLBACK(void) pitInfo(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
 {
+    RT_NOREF1(pszArgs);
     PPITSTATE   pThis = PDMINS_2_DATA(pDevIns, PPITSTATE);
     unsigned    i;
     for (i = 0; i < RT_ELEMENTS(pThis->channels); i++)
@@ -1235,6 +1247,7 @@ static DECLCALLBACK(void *) pitQueryInterface(PPDMIBASE pInterface, const char *
  */
 static DECLCALLBACK(void) pitRelocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta)
 {
+    RT_NOREF1(offDelta);
     PPITSTATE pThis = PDMINS_2_DATA(pDevIns, PPITSTATE);
     LogFlow(("pitRelocate: \n"));
 
diff --git a/src/VBox/Devices/PC/DevRTC.cpp b/src/VBox/Devices/PC/DevRTC.cpp
index 6e10cf6..8c32f33 100644
--- a/src/VBox/Devices/PC/DevRTC.cpp
+++ b/src/VBox/Devices/PC/DevRTC.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -263,12 +263,14 @@ static void rtc_raise_irq(PRTCSTATE pThis, uint32_t iLevel)
 }
 
 
+#ifdef IN_RING3
 DECLINLINE(int) to_bcd(PRTCSTATE pThis, int a)
 {
     if (pThis->cmos_data[RTC_REG_B] & 0x04)
         return a;
     return ((a / 10) << 4) | (a % 10);
 }
+#endif
 
 
 DECLINLINE(int) from_bcd(PRTCSTATE pThis, int a)
@@ -477,6 +479,7 @@ PDMBOTHCBDECL(int) rtcIOPortWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Por
  */
 static DECLCALLBACK(void) rtcCmosBankInfo(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
 {
+    RT_NOREF1(pszArgs);
     PRTCSTATE pThis = PDMINS_2_DATA(pDevIns, PRTCSTATE);
 
     pHlp->pfnPrintf(pHlp,
@@ -501,6 +504,7 @@ static DECLCALLBACK(void) rtcCmosBankInfo(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp
  */
 static DECLCALLBACK(void) rtcCmosBank2Info(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
 {
+    RT_NOREF1(pszArgs);
     PRTCSTATE pThis = PDMINS_2_DATA(pDevIns, PRTCSTATE);
 
     pHlp->pfnPrintf(pHlp, "Second CMOS bank, offsets 0x80 - 0xFF\n");
@@ -523,6 +527,7 @@ static DECLCALLBACK(void) rtcCmosBank2Info(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHl
  */
 static DECLCALLBACK(void) rtcCmosClockInfo(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
 {
+    RT_NOREF1(pszArgs);
     PRTCSTATE pThis = PDMINS_2_DATA(pDevIns, PRTCSTATE);
     uint8_t u8Sec   = from_bcd(pThis, pThis->cmos_data[RTC_SECONDS]);
     uint8_t u8Min   = from_bcd(pThis, pThis->cmos_data[RTC_MINUTES]);
@@ -550,6 +555,7 @@ static DECLCALLBACK(void) rtcCmosClockInfo(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHl
  */
 static DECLCALLBACK(void) rtcTimerPeriodic(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
 {
+    RT_NOREF2(pTimer, pvUser);
     PRTCSTATE pThis = PDMINS_2_DATA(pDevIns, PRTCSTATE);
     Assert(TMTimerIsLockOwner(pThis->CTX_SUFF(pPeriodicTimer)));
     Assert(PDMCritSectIsOwner(pThis->CTX_SUFF(pDevIns)->CTX_SUFF(pCritSectRo)));
@@ -631,6 +637,7 @@ static void rtc_next_second(struct my_tm *tm)
  */
 static DECLCALLBACK(void) rtcTimerSecond(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
 {
+    RT_NOREF2(pTimer, pvUser);
     PRTCSTATE pThis = PDMINS_2_DATA(pDevIns, PRTCSTATE);
     Assert(TMTimerIsLockOwner(pThis->CTX_SUFF(pPeriodicTimer)));
     Assert(PDMCritSectIsOwner(pThis->CTX_SUFF(pDevIns)->CTX_SUFF(pCritSectRo)));
@@ -691,6 +698,7 @@ static void rtc_copy_date(PRTCSTATE pThis)
  */
 static DECLCALLBACK(void) rtcTimerSecond2(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
 {
+    RT_NOREF2(pTimer, pvUser);
     PRTCSTATE pThis = PDMINS_2_DATA(pDevIns, PRTCSTATE);
     Assert(TMTimerIsLockOwner(pThis->CTX_SUFF(pPeriodicTimer)));
     Assert(PDMCritSectIsOwner(pThis->CTX_SUFF(pDevIns)->CTX_SUFF(pCritSectRo)));
@@ -738,6 +746,7 @@ static DECLCALLBACK(void) rtcTimerSecond2(PPDMDEVINS pDevIns, PTMTIMER pTimer, v
  */
 static DECLCALLBACK(int) rtcLiveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uPass)
 {
+    RT_NOREF1(uPass);
     PRTCSTATE pThis = PDMINS_2_DATA(pDevIns, PRTCSTATE);
 
     SSMR3PutU8(    pSSM, pThis->irq);
@@ -1037,6 +1046,7 @@ static DECLCALLBACK(int)  rtcInitComplete(PPDMDEVINS pDevIns)
  */
 static DECLCALLBACK(void) rtcRelocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta)
 {
+    RT_NOREF1(offDelta);
     PRTCSTATE pThis = PDMINS_2_DATA(pDevIns, PRTCSTATE);
 
     pThis->pDevInsRC        = PDMDEVINS_2_RCPTR(pDevIns);
@@ -1064,6 +1074,8 @@ static DECLCALLBACK(void) rtcReset(PPDMDEVINS pDevIns)
  */
 static DECLCALLBACK(int)  rtcConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
 {
+    RT_NOREF1(iInstance);
+    PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
     PRTCSTATE   pThis = PDMINS_2_DATA(pDevIns, PRTCSTATE);
     int         rc;
     Assert(iInstance == 0);
diff --git a/src/VBox/Devices/PC/DrvACPI.cpp b/src/VBox/Devices/PC/DrvACPI.cpp
index 4d82c34..1215978 100644
--- a/src/VBox/Devices/PC/DrvACPI.cpp
+++ b/src/VBox/Devices/PC/DrvACPI.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -22,7 +22,7 @@
 #define LOG_GROUP LOG_GROUP_DRV_ACPI
 
 #ifdef RT_OS_WINDOWS
-# include <windows.h>
+# include <iprt/win/windows.h>
 #endif
 
 #include <VBox/vmm/pdmdrv.h>
@@ -126,6 +126,7 @@ static DECLCALLBACK(int) drvACPIQueryPowerSource(PPDMIACPICONNECTOR pInterface,
                                                  PDMACPIPOWERSOURCE *pPowerSource)
 {
 #if defined(RT_OS_WINDOWS)
+    RT_NOREF(pInterface);
     SYSTEM_POWER_STATUS powerStatus;
     if (GetSystemPowerStatus(&powerStatus))
     {
@@ -162,6 +163,7 @@ static DECLCALLBACK(int) drvACPIQueryPowerSource(PPDMIACPICONNECTOR pInterface,
     RTCritSectLeave(&pThis->CritSect);
 
 #elif defined (RT_OS_DARWIN)
+    RT_NOREF(pInterface);
     *pPowerSource = PDM_ACPI_POWER_SOURCE_UNKNOWN;
 
     CFTypeRef pBlob = IOPSCopyPowerSourcesInfo();
@@ -203,6 +205,7 @@ static DECLCALLBACK(int) drvACPIQueryPowerSource(PPDMIACPICONNECTOR pInterface,
     CFRelease(pSources);
 
 #elif defined(RT_OS_FREEBSD)
+    RT_NOREF(pInterface);
     int fAcLine = 0;
     size_t cbParameter = sizeof(fAcLine);
 
@@ -223,6 +226,7 @@ static DECLCALLBACK(int) drvACPIQueryPowerSource(PPDMIACPICONNECTOR pInterface,
         *pPowerSource = PDM_ACPI_POWER_SOURCE_OUTLET;
     }
 #else /* !RT_OS_FREEBSD either - what could this be? */
+    RT_NOREF(pInterface);
     *pPowerSource = PDM_ACPI_POWER_SOURCE_OUTLET;
 
 #endif /* !RT_OS_FREEBSD */
@@ -230,7 +234,7 @@ static DECLCALLBACK(int) drvACPIQueryPowerSource(PPDMIACPICONNECTOR pInterface,
 }
 
 /**
- * @copydoc PDMIACPICONNECTOR::pfnQueryBatteryStatus
+ * @interface_method_impl{PDMIACPICONNECTOR,pfnQueryBatteryStatus}
  */
 static DECLCALLBACK(int) drvACPIQueryBatteryStatus(PPDMIACPICONNECTOR pInterface, bool *pfPresent,
                                                    PPDMACPIBATCAPACITY penmRemainingCapacity,
@@ -238,12 +242,13 @@ static DECLCALLBACK(int) drvACPIQueryBatteryStatus(PPDMIACPICONNECTOR pInterface
                                                    uint32_t *pu32PresentRate)
 {
     /* default return values for all architectures */
-    *pfPresent              = false;   /* no battery present */
+    *pfPresent              = false;        /* no battery present */
     *penmBatteryState       = PDM_ACPI_BAT_STATE_CHARGED;
     *penmRemainingCapacity  = PDM_ACPI_BAT_CAPACITY_UNKNOWN;
-    *pu32PresentRate        = ~0;      /* present rate is unknown */
+    *pu32PresentRate        = UINT32_MAX;   /* present rate is unknown */
 
 #if defined(RT_OS_WINDOWS)
+    RT_NOREF(pInterface);
     SYSTEM_POWER_STATUS powerStatus;
     if (GetSystemPowerStatus(&powerStatus))
     {
@@ -279,6 +284,7 @@ static DECLCALLBACK(int) drvACPIQueryBatteryStatus(PPDMIACPICONNECTOR pInterface
     RTCritSectLeave(&pThis->CritSect);
 
 #elif defined(RT_OS_DARWIN)
+    RT_NOREF(pInterface);
     CFTypeRef pBlob = IOPSCopyPowerSourcesInfo();
     CFArrayRef pSources = IOPSCopyPowerSourcesList(pBlob);
 
@@ -383,6 +389,7 @@ static DECLCALLBACK(int) drvACPIQueryBatteryStatus(PPDMIACPICONNECTOR pInterface
     CFRelease(pSources);
 
 #elif defined(RT_OS_FREEBSD)
+    RT_NOREF(pInterface);
     /* We try to use /dev/acpi first and if that fails use the sysctls. */
     bool fSuccess = true;
     int FileAcpi = 0;
@@ -946,12 +953,11 @@ static DECLCALLBACK(int) drvACPIPollerWakeup(PPDMDRVINS pDrvIns, PPDMTHREAD pThr
  */
 static DECLCALLBACK(void) drvACPIDestruct(PPDMDRVINS pDrvIns)
 {
-    PDRVACPI pThis = PDMINS_2_DATA(pDrvIns, PDRVACPI);
-
     LogFlow(("drvACPIDestruct\n"));
     PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns);
 
 #ifdef RT_OS_LINUX
+    PDRVACPI pThis = PDMINS_2_DATA(pDrvIns, PDRVACPI);
     if (pThis->hPollerSleepEvent != NIL_RTSEMEVENT)
     {
         RTSemEventDestroy(pThis->hPollerSleepEvent);
@@ -968,8 +974,9 @@ static DECLCALLBACK(void) drvACPIDestruct(PPDMDRVINS pDrvIns)
  */
 static DECLCALLBACK(int) drvACPIConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
-    PDRVACPI pThis = PDMINS_2_DATA(pDrvIns, PDRVACPI);
+    RT_NOREF(fFlags);
     PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
+    PDRVACPI pThis = PDMINS_2_DATA(pDrvIns, PDRVACPI);
     int rc = VINF_SUCCESS;
 
     /*
diff --git a/src/VBox/Devices/PC/DrvAcpiCpu.cpp b/src/VBox/Devices/PC/DrvAcpiCpu.cpp
index f7dac0b..defff38 100644
--- a/src/VBox/Devices/PC/DrvAcpiCpu.cpp
+++ b/src/VBox/Devices/PC/DrvAcpiCpu.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -47,6 +47,7 @@ static DECLCALLBACK(void *) drvACPICpuQueryInterface(PPDMIBASE pInterface, const
  */
 static DECLCALLBACK(int) drvACPICpuConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
     PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
 
     /*
diff --git a/src/VBox/Devices/PC/ipxe/Makefile.kmk b/src/VBox/Devices/PC/ipxe/Makefile.kmk
index 7d9e18f..f134f27 100644
--- a/src/VBox/Devices/PC/ipxe/Makefile.kmk
+++ b/src/VBox/Devices/PC/ipxe/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2012-2015 Oracle Corporation
+# Copyright (C) 2012-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -357,7 +357,7 @@ endif
  #
  BLDPROGS += ipxezbin
  ipxezbin_TEMPLATE = VBoxBldProg
- ipxezbin_CFLAGS   = -Wno-format
+ ipxezbin_CFLAGS   = -Wno-format -Wno-unused-function
  ipxezbin_SOURCES  = src/util/zbin.c
 
 endif
diff --git a/src/VBox/Devices/PC/ipxe/src/util/zbin.c b/src/VBox/Devices/PC/ipxe/src/util/zbin.c
index 841313d..ad7e5f6 100644
--- a/src/VBox/Devices/PC/ipxe/src/util/zbin.c
+++ b/src/VBox/Devices/PC/ipxe/src/util/zbin.c
@@ -73,7 +73,7 @@ static unsigned long align ( unsigned long value, unsigned long algn ) {
 
 static int read_file ( const char *filename, void **buf, size_t *len ) {
 	FILE *file;
-	struct stat stat;
+	struct stat sstat;
 
 	file = fopen ( filename, "r" );
 	if ( ! file ) {
@@ -82,13 +82,13 @@ static int read_file ( const char *filename, void **buf, size_t *len ) {
 		goto err;
 	}
 
-	if ( fstat ( fileno ( file ), &stat ) < 0 ) {
+	if ( fstat ( fileno ( file ), &sstat ) < 0 ) {
 		fprintf ( stderr, "Could not stat %s: %s\n", filename,
 			  strerror ( errno ) );
 		goto err;
 	}
 
-	*len = stat.st_size;
+	*len = sstat.st_size;
 	*buf = malloc ( *len );
 	if ( ! *buf ) {
 		fprintf ( stderr, "Could not malloc() %zd bytes for %s: %s\n",
diff --git a/src/VBox/Devices/Parallel/DevParallel.cpp b/src/VBox/Devices/Parallel/DevParallel.cpp
index 39b10c4..59cb673 100644
--- a/src/VBox/Devices/Parallel/DevParallel.cpp
+++ b/src/VBox/Devices/Parallel/DevParallel.cpp
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -322,6 +322,7 @@ PDMBOTHCBDECL(int) parallelIOPortWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPOR
 {
     PARALLELPORT *pThis = PDMINS_2_DATA(pDevIns, PPARALLELPORT);
     int           rc = VINF_SUCCESS;
+    RT_NOREF_PV(pvUser);
 
     if (cb == 1)
     {
@@ -428,6 +429,7 @@ PDMBOTHCBDECL(int) parallelIOPortRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT
 {
     PARALLELPORT *pThis = PDMINS_2_DATA(pDevIns, PARALLELPORT *);
     int           rc = VINF_SUCCESS;
+    RT_NOREF_PV(pvUser);
 
     if (cb == 1)
     {
@@ -569,11 +571,12 @@ PDMBOTHCBDECL(int) parallelIOPortReadECP(PPDMDEVINS pDevIns, void *pvUser, RTIOP
  */
 static DECLCALLBACK(int) parallelR3LiveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uPass)
 {
+    RT_NOREF(uPass);
     PARALLELPORT *pThis = PDMINS_2_DATA(pDevIns, PARALLELPORT *);
 
     SSMR3PutS32(pSSM, pThis->iIrq);
     SSMR3PutU32(pSSM, pThis->IOBase);
-    SSMR3PutU32(pSSM, ~0); /* sanity/terminator */
+    SSMR3PutU32(pSSM, UINT32_MAX); /* sanity/terminator */
     return VINF_SSM_DONT_CALL_AGAIN;
 }
 
@@ -619,7 +622,7 @@ static DECLCALLBACK(int) parallelR3LoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM,
     int rc = SSMR3GetU32(pSSM, &u32);
     if (RT_FAILURE(rc))
         return rc;
-    AssertMsgReturn(u32 == ~0U, ("%#x\n", u32), VERR_SSM_DATA_UNIT_FORMAT_CHANGED);
+    AssertMsgReturn(u32 == UINT32_MAX, ("%#x\n", u32), VERR_SSM_DATA_UNIT_FORMAT_CHANGED);
 
     if (pThis->iIrq != iIrq)
         return SSMR3SetCfgError(pSSM, RT_SRC_POS, N_("IRQ changed: config=%#x state=%#x"), pThis->iIrq, iIrq);
diff --git a/src/VBox/Devices/Parallel/DrvHostParallel.cpp b/src/VBox/Devices/Parallel/DrvHostParallel.cpp
index 5d57a8a..4ad437b 100644
--- a/src/VBox/Devices/Parallel/DrvHostParallel.cpp
+++ b/src/VBox/Devices/Parallel/DrvHostParallel.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -62,10 +62,12 @@
 #endif
 
 #if defined(VBOX_WITH_WIN_PARPORT_SUP) && defined(IN_RING3)
-# include <Windows.h>
-# include <setupapi.h>
+# include <iprt/win/windows.h>
+# include <iprt/win/setupapi.h>
 # include <cfgmgr32.h>
 # include <iprt/mem.h>
+# include <iprt/ctype.h>
+# include <iprt/path.h>
 # include <iprt/string.h>
 #endif
 
@@ -82,50 +84,44 @@
 typedef struct DRVHOSTPARALLEL
 {
     /** Pointer to the driver instance structure. */
-    PPDMDRVINS                    pDrvIns;
+    PPDMDRVINS                  pDrvIns;
     /** Pointer to the driver instance. */
-    PPDMDRVINSR3                  pDrvInsR3;
-    PPDMDRVINSR0                  pDrvInsR0;
+    PPDMDRVINSR3                pDrvInsR3;
+    PPDMDRVINSR0                pDrvInsR0;
     /** Pointer to the char port interface of the driver/device above us. */
-    PPDMIHOSTPARALLELPORT         pDrvHostParallelPort;
+    PPDMIHOSTPARALLELPORT       pDrvHostParallelPort;
     /** Our host device interface. */
-    PDMIHOSTPARALLELCONNECTOR     IHostParallelConnector;
+    PDMIHOSTPARALLELCONNECTOR   IHostParallelConnector;
     /** Our host device interface. */
-    PDMIHOSTPARALLELCONNECTOR     IHostParallelConnectorR3;
+    PDMIHOSTPARALLELCONNECTOR   IHostParallelConnectorR3;
     /** Device Path */
-    char                         *pszDevicePath;
+    char                       *pszDevicePath;
     /** Device Handle */
-    RTFILE                        hFileDevice;
+    RTFILE                      hFileDevice;
 #ifndef VBOX_WITH_WIN_PARPORT_SUP
     /** Thread waiting for interrupts. */
-    PPDMTHREAD                    pMonitorThread;
+    PPDMTHREAD                  pMonitorThread;
     /** Wakeup pipe read end. */
-    RTPIPE                        hWakeupPipeR;
+    RTPIPE                      hWakeupPipeR;
     /** Wakeup pipe write end. */
-    RTPIPE                        hWakeupPipeW;
+    RTPIPE                      hWakeupPipeW;
     /** Current mode the parallel port is in. */
-    PDMPARALLELPORTMODE           enmModeCur;
+    PDMPARALLELPORTMODE         enmModeCur;
 #endif
 
 #ifdef VBOX_WITH_WIN_PARPORT_SUP
     /** Data register. */
-    uint32_t                      u32LptAddr;
+    RTIOPORT                    PortDirectData;
     /** Status register. */
-    uint32_t                      u32LptAddrStatus;
+    RTIOPORT                    PortDirectStatus;
     /** Control register.  */
-    uint32_t                      u32LptAddrControl;
-    /** Data read buffer. */
-    uint8_t                       u8ReadIn;
-    /** Control read buffer. */
-    uint8_t                       u8ReadInControl;
-    /** Status read buffer. */
-    uint8_t                       u8ReadInStatus;
-    /** Parallel port name */
-    char                          szParportName[6];
-    /** Whether the parallel port is available or not. */
-    bool                          fParportAvail;
-    /** Device Handle */
-    RTFILE                        hWinFileDevice;
+    RTIOPORT                    PortDirectControl;
+    /** Control read result buffer. */
+    uint8_t                     bReadInControl;
+    /** Status read result buffer. */
+    uint8_t                     bReadInStatus;
+    /** Data buffer for reads and writes. */
+    uint8_t                     abDataBuf[32];
 #endif /* VBOX_WITH_WIN_PARPORT_SUP */
 } DRVHOSTPARALLEL, *PDRVHOSTPARALLEL;
 
@@ -139,13 +135,13 @@ typedef enum DRVHOSTPARALLELR0OP
     DRVHOSTPARALLELR0OP_INVALID = 0,
     /** Perform R0 initialization. */
     DRVHOSTPARALLELR0OP_INITR0STUFF,
-    /** Read data. */
+    /** Read data into the data buffer (abDataBuf). */
     DRVHOSTPARALLELR0OP_READ,
     /** Read status register. */
     DRVHOSTPARALLELR0OP_READSTATUS,
     /** Read control register. */
     DRVHOSTPARALLELR0OP_READCONTROL,
-    /** Write data. */
+    /** Write data from the data buffer (abDataBuf). */
     DRVHOSTPARALLELR0OP_WRITE,
     /** Write control register. */
     DRVHOSTPARALLELR0OP_WRITECONTROL,
@@ -171,110 +167,104 @@ typedef enum DRVHOSTPARALLELR0OP
 
 /**
  * R0 mode function to write byte value to data port.
- * @returns VBox status code.
- * @param   pDrvIns    Driver instance.
- * @param   u64Arg     Data to be written to data register.
  *
+ * @returns VBox status code.
+ * @param   pThis       Pointer to the instance data.
+ * @param   u64Arg      The number of bytes to write (from abDataBuf).
  */
-static int drvR0HostParallelReqWrite(PPDMDRVINS pDrvIns, uint64_t u64Arg)
+static int drvR0HostParallelReqWrite(PDRVHOSTPARALLEL pThis, uint64_t u64Arg)
 {
-    PDRVHOSTPARALLEL pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTPARALLEL);
-    LogFlowFunc(("write to data port=%#x val=%#x\n", pThis->u32LptAddr, u64Arg));
-    ASMOutU8(pThis->u32LptAddr, (uint8_t)(u64Arg));
+    LogFlowFunc(("write %#RX64 bytes to data (%#x)\n", u64Arg, pThis->PortDirectData));
+
+    AssertReturn(u64Arg > 0 && u64Arg <= sizeof(pThis->abDataBuf), VERR_OUT_OF_RANGE);
+    uint8_t const *pbSrc = pThis->abDataBuf;
+    while (u64Arg-- > 0)
+    {
+        ASMOutU8(pThis->PortDirectData, *pbSrc);
+        pbSrc++;
+    }
+
     return VINF_SUCCESS;
 }
 
 /**
- * R0 mode function to write byte value to parallel port control
- * register.
+ * R0 mode function to write byte value to parallel port control register.
+ *
  * @returns VBox status code.
- * @param   pDrvIns     Driver instance.
+ * @param   pThis       Pointer to the instance data.
  * @param   u64Arg      Data to be written to control register.
  */
-static int drvR0HostParallelReqWriteControl(PPDMDRVINS pDrvIns, uint64_t u64Arg)
+static int drvR0HostParallelReqWriteControl(PDRVHOSTPARALLEL pThis, uint64_t u64Arg)
 {
-    PDRVHOSTPARALLEL pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTPARALLEL);
-    LogFlowFunc(("write to ctrl port=%#x val=%#x\n", pThis->u32LptAddrControl, u64Arg));
-    ASMOutU8(pThis->u32LptAddrControl, (uint8_t)(u64Arg));
+    LogFlowFunc(("write to ctrl port=%#x val=%#x\n", pThis->PortDirectControl, u64Arg));
+    ASMOutU8(pThis->PortDirectControl, (uint8_t)(u64Arg));
     return VINF_SUCCESS;
 }
 
 /**
- * R0 mode function to ready byte value from the parallel port
- * data register
+ * R0 mode function to ready byte value from the parallel port data register.
+ *
  * @returns VBox status code.
- * @param   pDrvIns    Driver instance.
- * @param   u64Arg     Not used.
+ * @param   pThis       Pointer to the instance data.
+ * @param   u64Arg      The number of bytes to read into abDataBuf.
  */
-static int drvR0HostParallelReqRead(PPDMDRVINS pDrvIns, uint64_t u64Arg)
+static int drvR0HostParallelReqRead(PDRVHOSTPARALLEL pThis, uint64_t u64Arg)
 {
-    uint8_t u8Data;
-    PDRVHOSTPARALLEL pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTPARALLEL);
-    u8Data = ASMInU8(pThis->u32LptAddr);
-    LogFlowFunc(("read from data port=%#x val=%#x\n", pThis->u32LptAddr, u8Data));
-    pThis->u8ReadIn = u8Data;
+    LogFlowFunc(("read %#RX64 bytes to data (%#x)\n", u64Arg, pThis->PortDirectData));
+
+    AssertReturn(u64Arg > 0 && u64Arg <= sizeof(pThis->abDataBuf), VERR_OUT_OF_RANGE);
+    uint8_t *pbDst = pThis->abDataBuf;
+    while (u64Arg-- > 0)
+        *pbDst++ = ASMInU8(pThis->PortDirectData);
+
     return VINF_SUCCESS;
 }
 
 /**
- * R0 mode function to ready byte value from the parallel port
- * control register.
+ * R0 mode function to ready byte value from the parallel port control register.
+ *
  * @returns VBox status code.
- * @param   pDrvIns    Driver instance.
- * @param   u64Arg     Not used.
+ * @param   pThis       Pointer to the instance data.
  */
-static int drvR0HostParallelReqReadControl(PPDMDRVINS pDrvIns, uint64_t u64Arg)
+static int drvR0HostParallelReqReadControl(PDRVHOSTPARALLEL pThis)
 {
-    uint8_t u8Data;
-    PDRVHOSTPARALLEL pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTPARALLEL);
-    u8Data = ASMInU8(pThis->u32LptAddrControl);
-    LogFlowFunc(("read from ctrl port=%#x val=%#x\n", pThis->u32LptAddr, u8Data));
-    pThis->u8ReadInControl = u8Data;
+    uint8_t u8Data = ASMInU8(pThis->PortDirectControl);
+    LogFlowFunc(("read from ctrl port=%#x val=%#x\n", pThis->PortDirectControl, u8Data));
+    pThis->bReadInControl = u8Data;
     return VINF_SUCCESS;
 }
 
 /**
- * R0 mode function to ready byte value from the parallel port
- * status register.
+ * R0 mode function to ready byte value from the parallel port status register.
+ *
  * @returns VBox status code.
- * @param   pDrvIns    Driver instance.
- * @param   u64Arg     Not used.
+ * @param   pThis       Pointer to the instance data.
  */
-static int drvR0HostParallelReqReadStatus(PPDMDRVINS pDrvIns, uint64_t u64Arg)
+static int drvR0HostParallelReqReadStatus(PDRVHOSTPARALLEL pThis)
 {
-    uint8_t u8Data;
-    PDRVHOSTPARALLEL pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTPARALLEL);
-    u8Data = ASMInU8(pThis->u32LptAddrStatus);
-    LogFlowFunc(("read from status port=%#x val=%#x\n", pThis->u32LptAddr, u8Data));
-    pThis->u8ReadInStatus = u8Data;
+    uint8_t u8Data = ASMInU8(pThis->PortDirectStatus);
+    LogFlowFunc(("read from status port=%#x val=%#x\n", pThis->PortDirectStatus, u8Data));
+    pThis->bReadInStatus = u8Data;
     return VINF_SUCCESS;
 }
 
 /**
  * R0 mode function to set the direction of parallel port -
  * operate in bidirectional mode or single direction.
+ *
  * @returns VBox status code.
- * @param   pDrvIns    Driver instance.
- * @param   u64Arg     Mode.
+ * @param   pThis       Pointer to the instance data.
+ * @param   u64Arg      Mode.
  */
-static int drvR0HostParallelReqSetPortDir(PPDMDRVINS pDrvIns, uint64_t u64Arg)
+static int drvR0HostParallelReqSetPortDir(PDRVHOSTPARALLEL pThis, uint64_t u64Arg)
 {
-    PDRVHOSTPARALLEL pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTPARALLEL);
-    uint8_t u8ReadControlVal;
-    uint8_t u8WriteControlVal;
-
+    uint8_t bCtl = ASMInU8(pThis->PortDirectControl);
     if (u64Arg)
-    {
-       u8ReadControlVal = ASMInU8(pThis->u32LptAddrControl);
-       u8WriteControlVal = u8ReadControlVal | LPT_CONTROL_ENABLE_BIDIRECT; /* enable input direction */
-       ASMOutU8(pThis->u32LptAddrControl, u8WriteControlVal);
-    }
+        bCtl |= LPT_CONTROL_ENABLE_BIDIRECT;  /* enable input direction */
     else
-    {
-        u8ReadControlVal = ASMInU8(pThis->u32LptAddrControl);
-        u8WriteControlVal = u8ReadControlVal & ~LPT_CONTROL_ENABLE_BIDIRECT; /* disable input direction */
-        ASMOutU8(pThis->u32LptAddrControl, u8WriteControlVal);
-    }
+        bCtl &= ~LPT_CONTROL_ENABLE_BIDIRECT; /* disable input direction */
+    ASMOutU8(pThis->PortDirectControl, bCtl);
+
     return VINF_SUCCESS;
 }
 
@@ -283,34 +273,41 @@ static int drvR0HostParallelReqSetPortDir(PPDMDRVINS pDrvIns, uint64_t u64Arg)
  */
 PDMBOTHCBDECL(int) drvR0HostParallelReqHandler(PPDMDRVINS pDrvIns, uint32_t uOperation, uint64_t u64Arg)
 {
+    PDRVHOSTPARALLEL pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTPARALLEL);
     int rc;
-
     LogFlowFuncEnter();
-    /* I have included break after each case. Need to work on this. */
-    switch ((DRVHOSTPARALLELR0OP)uOperation)
+
+    if (pThis->PortDirectData != 0)
     {
-        case DRVHOSTPARALLELR0OP_READ:
-            rc = drvR0HostParallelReqRead(pDrvIns, u64Arg);
-            break;
-        case DRVHOSTPARALLELR0OP_READSTATUS:
-            rc = drvR0HostParallelReqReadStatus(pDrvIns, u64Arg);
-            break;
-        case DRVHOSTPARALLELR0OP_READCONTROL:
-            rc = drvR0HostParallelReqReadControl(pDrvIns, u64Arg);
-            break;
-        case DRVHOSTPARALLELR0OP_WRITE:
-            rc = drvR0HostParallelReqWrite(pDrvIns, u64Arg);
-            break;
-        case DRVHOSTPARALLELR0OP_WRITECONTROL:
-            rc = drvR0HostParallelReqWriteControl(pDrvIns, u64Arg);
-            break;
-        case DRVHOSTPARALLELR0OP_SETPORTDIRECTION:
-            rc = drvR0HostParallelReqSetPortDir(pDrvIns, u64Arg);
-            break;
-        default:        /* not supported */
-            rc = VERR_NOT_SUPPORTED;
+        switch ((DRVHOSTPARALLELR0OP)uOperation)
+        {
+            case DRVHOSTPARALLELR0OP_READ:
+                rc = drvR0HostParallelReqRead(pThis, u64Arg);
+                break;
+            case DRVHOSTPARALLELR0OP_READSTATUS:
+                rc = drvR0HostParallelReqReadStatus(pThis);
+                break;
+            case DRVHOSTPARALLELR0OP_READCONTROL:
+                rc = drvR0HostParallelReqReadControl(pThis);
+                break;
+            case DRVHOSTPARALLELR0OP_WRITE:
+                rc = drvR0HostParallelReqWrite(pThis, u64Arg);
+                break;
+            case DRVHOSTPARALLELR0OP_WRITECONTROL:
+                rc = drvR0HostParallelReqWriteControl(pThis, u64Arg);
+                break;
+            case DRVHOSTPARALLELR0OP_SETPORTDIRECTION:
+                rc = drvR0HostParallelReqSetPortDir(pThis, u64Arg);
+                break;
+            default:
+                rc = VERR_INVALID_FUNCTION;
+                break;
+        }
     }
-    LogFlowFuncLeave();
+    else
+        rc = VERR_WRONG_ORDER;
+
+    LogFlowFuncLeaveRC(rc);
     return rc;
 }
 
@@ -323,125 +320,150 @@ PDMBOTHCBDECL(int) drvR0HostParallelReqHandler(PPDMDRVINS pDrvIns, uint32_t uOpe
 /**
  * Find IO port range for the parallel port and return the lower address.
  *
- * @returns parallel port IO address.
- * @param   DevInst    Device Instance for parallel port.
+ * @returns Parallel base I/O port.
+ * @param   DevInst    Device instance (dword/handle) for the parallel port.
  */
-static uint32_t drvHostWinFindIORangeResource(const DEVINST DevInst)
+static RTIOPORT drvHostParallelGetWinHostIoPortsSub(const DEVINST DevInst)
 {
-    uint8_t  *pBuf  = NULL;
-    short     wHeaderSize;
-    uint32_t  u32Size;
-    CONFIGRET cmRet;
-    LOG_CONF  firstLogConf;
-    LOG_CONF  nextLogConf;
-    RES_DES   rdPrevResDes;
-    uint32_t  u32ParportAddr = 0;
-
-    wHeaderSize = sizeof(IO_DES);
-    cmRet = CM_Get_First_Log_Conf(&firstLogConf, DevInst, ALLOC_LOG_CONF);
-    if (cmRet != CR_SUCCESS)
+    RTIOPORT PortBase = 0;
+
+    /* Get handle of the first logical configuration. */
+    LOG_CONF  hFirstLogConf;
+    CONFIGRET rcCm = CM_Get_First_Log_Conf(&hFirstLogConf, DevInst, ALLOC_LOG_CONF);
+    if (rcCm != CR_SUCCESS)
+        rcCm = CM_Get_First_Log_Conf(&hFirstLogConf, DevInst, BOOT_LOG_CONF);
+    if (rcCm == CR_SUCCESS)
     {
-        cmRet = CM_Get_First_Log_Conf(&firstLogConf, DevInst, BOOT_LOG_CONF);
-        if (cmRet != CR_SUCCESS)
-            return 0;
-    }
-    cmRet = CM_Get_Next_Res_Des(&nextLogConf, firstLogConf, 2, 0L, 0L);
-    if (cmRet != CR_SUCCESS)
-    {
-        CM_Free_Res_Des_Handle(firstLogConf);
-        return 0;
-    }
-    /* This loop is based on the fact that only one resourece is assigned to
-     * the LPT port. If multiple resources (address range) are assigned to
-     * to LPT port, it will pick and return the last one
-     */
-    for (;;)
-    {
-        u32Size = 0;
-        cmRet = CM_Get_Res_Des_Data_Size((PULONG)(&u32Size), nextLogConf, 0L);
-        if (cmRet != CR_SUCCESS)
-        {
-            LogFlowFunc(("Failed to get Size \n"));
-            CM_Free_Res_Des_Handle(nextLogConf);
-            break;
-        }
-
-        pBuf = (uint8_t *)RTMemAlloc(u32Size + 1);
-        if (!pBuf)
-        {
-            LogFlowFunc(("Failed to get Buf %d\n", u32Size));
-            CM_Free_Res_Des_Handle(nextLogConf);
-            break;
-        }
-        cmRet = CM_Get_Res_Des_Data(nextLogConf, pBuf, u32Size, 0L);
-        if (cmRet != CR_SUCCESS)
+        /*
+         * This loop is based on the "fact" that only one I/O resource is assigned
+         * to the LPT port.  Should there ever be multiple resources, we'll pick
+         * the last one for some silly reason.
+         */
+
+        /* Get the first resource descriptor handle. */
+        LOG_CONF hCurLogConf = 0;
+        rcCm = CM_Get_Next_Res_Des(&hCurLogConf, hFirstLogConf, ResType_IO, 0, 0);
+        if (rcCm == CR_SUCCESS)
         {
-            LogFlowFunc(("Failed to get Des Data \n"));
-            CM_Free_Res_Des_Handle(nextLogConf);
-            if (pBuf)
-                RTMemFree(pBuf);
-            break;
+            for (;;)
+            {
+                ULONG cbData;
+                rcCm = CM_Get_Res_Des_Data_Size(&cbData, hCurLogConf, 0);
+                if (rcCm != CR_SUCCESS)
+                    cbData = 0;
+                cbData = RT_MAX(cbData, sizeof(IO_DES));
+                IO_DES *pIoDesc = (IO_DES *)RTMemAllocZ(cbData);
+                if (pIoDesc)
+                {
+                    rcCm = CM_Get_Res_Des_Data(hCurLogConf, pIoDesc, cbData, 0L);
+                    if (rcCm == CR_SUCCESS)
+                    {
+                        LogRel(("drvHostParallelGetWinHostIoPortsSub: Count=%#u Type=%#x Base=%#RX64 End=%#RX64 Flags=%#x\n",
+                                pIoDesc->IOD_Count, pIoDesc->IOD_Type, (uint64_t)pIoDesc->IOD_Alloc_Base,
+                                (uint64_t)pIoDesc->IOD_Alloc_End,  pIoDesc->IOD_DesFlags));
+                        PortBase = (RTIOPORT)pIoDesc->IOD_Alloc_Base;
+                    }
+                    else
+                        LogRel(("drvHostParallelGetWinHostIoPortsSub: CM_Get_Res_Des_Data(,,%u,0) failed: %u\n", cbData, rcCm));
+                    RTMemFree(pIoDesc);
+                }
+                else
+                    LogRel(("drvHostParallelGetWinHostIoPortsSub: failed to allocate %#x bytes\n", cbData));
+
+                /* Next */
+                RES_DES hFreeResDesc = hCurLogConf;
+                rcCm = CM_Get_Next_Res_Des(&hCurLogConf, hCurLogConf, ResType_IO, 0, 0);
+                CM_Free_Res_Des_Handle(hFreeResDesc);
+                if (rcCm != CR_SUCCESS)
+                {
+                    if (rcCm != CR_NO_MORE_RES_DES)
+                        LogRel(("drvHostParallelGetWinHostIoPortsSub: CM_Get_Next_Res_Des failed: %u\n", rcCm));
+                    break;
+                }
+            }
         }
-
-        LogFlowFunc(("call GetIOResource\n"));
-        if (pBuf)
-            u32ParportAddr = ((IO_DES *)pBuf)->IOD_Alloc_Base;
-        LogFlowFunc(("called GetIOResource, ret=%#x\n", u32ParportAddr));
-        rdPrevResDes = 0;
-        cmRet = CM_Get_Next_Res_Des(&rdPrevResDes,
-                                    nextLogConf,
-                                    2,
-                                    0L,
-                                    0L);
-        if (pBuf)
-            RTMemFree(pBuf);
-        if (cmRet != CR_SUCCESS)
-           break;
-
-        CM_Free_Res_Des_Handle(nextLogConf);
-        nextLogConf = rdPrevResDes;
+        else
+            LogRel(("drvHostParallelGetWinHostIoPortsSub: Initial CM_Get_Next_Res_Des failed: %u\n", rcCm));
+        CM_Free_Log_Conf_Handle(hFirstLogConf);
     }
-    CM_Free_Res_Des_Handle(nextLogConf);
-    LogFlowFunc(("return u32ParportAddr=%#x", u32ParportAddr));
-    return u32ParportAddr;
+    LogFlowFunc(("return PortBase=%#x", PortBase));
+    return PortBase;
 }
 
 /**
- * Get Parallel port address and update the shared data
- * structure.
+ * Get Parallel port address and update the shared data structure.
+ *
  * @returns VBox status code.
  * @param   pThis    The host parallel port instance data.
  */
-static int drvWinHostGetparportAddr(PDRVHOSTPARALLEL pThis)
+static int drvHostParallelGetWinHostIoPorts(PDRVHOSTPARALLEL pThis)
 {
-    HDEVINFO hDevInfo;
-    SP_DEVINFO_DATA DeviceInfoData;
-    uint32_t u32Idx;
-    uint32_t u32ParportAddr;
-    int rc = VINF_SUCCESS;
+    /*
+     * Assume the host device path is on the form "\\.\PIPE\LPT1", then get the "LPT1" part.
+     */
+    const char * const pszCfgPortName = RTPathFilename(pThis->pszDevicePath);
+    AssertReturn(pszCfgPortName, VERR_INTERNAL_ERROR_3);
+    size_t const       cchCfgPortName = strlen(pszCfgPortName);
+    if (   cchCfgPortName != 4
+        || RTStrNICmp(pszCfgPortName, "LPT", 3) != 0
+        || !RT_C_IS_DIGIT(pszCfgPortName[3]) )
+    {
+        LogRel(("drvHostParallelGetWinHostIoPorts: The configured device name '%s' is not on the expected 'LPTx' form!\n",
+                pszCfgPortName));
+        return VERR_INVALID_NAME;
+    }
 
-    hDevInfo = SetupDiGetClassDevs(NULL, 0, 0, DIGCF_PRESENT | DIGCF_ALLCLASSES);
+    /*
+     * Get a list of devices then enumerate it looking for the LPT port we're using.
+     */
+    HDEVINFO hDevInfo = SetupDiGetClassDevs(NULL, 0, 0, DIGCF_PRESENT | DIGCF_ALLCLASSES);
     if (hDevInfo == INVALID_HANDLE_VALUE)
-        return VERR_INVALID_HANDLE;
+    {
+        DWORD dwErr = GetLastError();
+        LogRel(("drvHostParallelGetWinHostIoPorts: SetupDiGetClassDevs failed: %u\n", dwErr));
+        return RTErrConvertFromWin32(dwErr);
+    }
 
-    /* Enumerate through all devices in Set. */
-    DeviceInfoData.cbSize = sizeof(SP_DEVINFO_DATA);
-    for (u32Idx = 0; SetupDiEnumDeviceInfo(hDevInfo, u32Idx, &DeviceInfoData); u32Idx++)
+    int   rc     = VINF_SUCCESS;
+    char *pszBuf = NULL;
+    DWORD cbBuf  = 0;
+    for (int32_t idxDevInfo = 0;; idxDevInfo++)
     {
-        DWORD dwDataType;
-        uint8_t *pBuf = NULL;
-        DWORD dwBufSize = 0;
+        /*
+         * Query the next device info.
+         */
+        SP_DEVINFO_DATA DeviceInfoData;
+        DeviceInfoData.cbSize = sizeof(SP_DEVINFO_DATA);
+        if (!SetupDiEnumDeviceInfo(hDevInfo, idxDevInfo, &DeviceInfoData))
+        {
+            DWORD dwErr = GetLastError();
+            if (dwErr != ERROR_NO_MORE_ITEMS && dwErr != NO_ERROR)
+            {
+                LogRel(("drvHostParallelGetWinHostIoPorts: SetupDiEnumDeviceInfo failed: %u\n", dwErr));
+                rc = RTErrConvertFromWin32(dwErr);
+            }
+            break;
+        }
 
-        while (!SetupDiGetDeviceRegistryProperty(hDevInfo, &DeviceInfoData, SPDRP_FRIENDLYNAME,
-                                                 (PDWORD)&dwDataType, (uint8_t *)pBuf,
-                                                 dwBufSize, (PDWORD)&dwBufSize))
+        /* Get the friendly name of the device. */
+        DWORD dwDataType;
+        DWORD cbBufActual;
+        BOOL  fOk;
+        while (!(fOk = SetupDiGetDeviceRegistryProperty(hDevInfo, &DeviceInfoData, SPDRP_FRIENDLYNAME,
+                                                       &dwDataType, (PBYTE)pszBuf, cbBuf, &cbBufActual)))
         {
-            if (GetLastError() == ERROR_INSUFFICIENT_BUFFER)
+            DWORD dwErr = GetLastError();
+            if (dwErr == ERROR_INSUFFICIENT_BUFFER)
             {
-                LogFlow(("ERROR_INSUFF_BUFF = %d. dwBufSz = %d\n", GetLastError(), dwBufSize));
-                if (pBuf)
-                    RTMemFree(pBuf);
-                pBuf = (uint8_t *)RTMemAlloc(dwBufSize * 2);
+                LogFlow(("ERROR_INSUFF_BUFF = %d. dwBufSz = %d\n", dwErr, cbBuf));
+                void *pvNew = RTMemRealloc(pszBuf, RT_MAX(RT_ALIGN_Z(cbBufActual + 16, 64), 256));
+                if (pvNew)
+                    pszBuf = (char *)pvNew;
+                else
+                {
+                    LogFlow(("GetDevProp Error = %d & cbBufActual = %d\n", dwErr, cbBufActual));
+                    break;
+                }
             }
             else
             {
@@ -449,74 +471,48 @@ static int drvWinHostGetparportAddr(PDRVHOSTPARALLEL pThis)
                  * INVALID_DATA . Just break from here and proceed to next device
                  * enumerated item
                  */
-                LogFlow(("GetDevProp Error = %d & dwBufSz = %d\n", GetLastError(), dwBufSize));
+                LogFlow(("GetDevProp Error = %d & cbBufActual = %d\n", dwErr, cbBufActual));
                 break;
             }
         }
-
-        if (RTStrStr((char*)pBuf, "LPT"))
+        if (   fOk
+            && pszBuf)
         {
-            u32ParportAddr = drvHostWinFindIORangeResource(DeviceInfoData.DevInst);
-            if (u32ParportAddr)
+            pszBuf[cbBuf - 1] = '\0';
+
+            /*
+             * Does this look like the port name we're looking for.
+             *
+             * We're expecting either "Parallel Port (LPT1)" or just "LPT1", though we'll make do
+             * with anything that includes the name we're looking for as a separate word.
+             */
+            char *pszMatch;
+            do
+                pszMatch = RTStrIStr(pszBuf, pszCfgPortName);
+            while (   pszMatch != NULL
+                   && !(  (   pszMatch     == pszBuf
+                           || pszMatch[-1] == '('
+                           || RT_C_IS_BLANK(pszMatch[-1]))
+                        && (   pszMatch[cchCfgPortName] == '\0'
+                            || pszMatch[cchCfgPortName] == ')'
+                            || RT_C_IS_BLANK(pszMatch[cchCfgPortName])) ) );
+            if (pszMatch != NULL)
             {
-                /* Find parallel port name and update the shared data struncture */
-                char *pCh = RTStrStr((char*)pBuf, "(");
-                char *pTmpCh = RTStrStr((char *)pBuf, ")");
-                /* check for the confirmation for the availability of parallel port */
-                if (!(pCh && pTmpCh))
-                {
-                    LogFlowFunc(("Parallel port Not Found. \n"));
-                    return VERR_NOT_FOUND;
-
-                }
-                if (((pTmpCh - (char *)pBuf) - (pCh - (char *)pBuf)) < 0) {
-                    LogFlowFunc(("Parallel port string not properly formatted.\n"));
-                    return VERR_NOT_FOUND;
-                }
-                /* check for the confirmation for the availability of parallel port */
-                if (RTStrCopyEx((char *)(pThis->szParportName), sizeof(pThis->szParportName),
-                    pCh+1, ((pTmpCh - (char *)pBuf) - (pCh - (char *)pBuf)) - 1))
+                RTIOPORT Port = drvHostParallelGetWinHostIoPortsSub(DeviceInfoData.DevInst);
+                if (Port != 0)
                 {
-                    LogFlowFunc(("Parallel Port Not Found.\n"));
-                    return VERR_NOT_FOUND;
+                    pThis->PortDirectData    = Port;
+                    pThis->PortDirectControl = Port + CTRL_REG_OFFSET;
+                    pThis->PortDirectStatus  = Port + STATUS_REG_OFFSET;
+                    break;
                 }
-                *((char *)pThis->szParportName + (pTmpCh - (char *)pBuf) - (pCh - (char *)pBuf) + 1 ) = '\0';
-
-                /* checking again to make sure that we have got a valid name and in valid format too. */
-                if (RTStrNCmp((char *)pThis->szParportName, "LPT", 3)) {
-                    LogFlowFunc(("Parallel Port name \"LPT\" Not Found.\n"));
-                    return VERR_NOT_FOUND;
-                }
-                if (!RTStrStr((char *)pThis->szParportName, "LPT")
-                    || !(pThis->szParportName[3] >= '0'
-                    && pThis->szParportName[3] <= '9'))
-                {
-                    RT_BZERO(pThis->szParportName, sizeof(pThis->szParportName));
-                    LogFlowFunc(("Printer Port Name Not Found.\n"));
-                    return VERR_NOT_FOUND;
-                }
-                pThis->fParportAvail     = true;
-                pThis->u32LptAddr        = u32ParportAddr;
-                pThis->u32LptAddrControl = pThis->u32LptAddr + CTRL_REG_OFFSET;
-                pThis->u32LptAddrStatus  = pThis->u32LptAddr + STATUS_REG_OFFSET;
+                LogRel(("drvHostParallelGetWinHostIoPorts: Addr not found for '%s'\n", pszBuf));
             }
-            else
-                LogFlowFunc(("u32Parport Addr No Available \n"));
-            if (pThis->fParportAvail)
-                break;
-        }
-        if (pBuf)
-            RTMemFree(pBuf);
-        if (pThis->fParportAvail)
-        {
-            /* Parallel port address has been found. No need to iterate further. */
-            break;
         }
     }
 
-    if (GetLastError() != NO_ERROR && GetLastError() != ERROR_NO_MORE_ITEMS)
-        rc =  VERR_GENERAL_FAILURE;
-
+    /* Cleanup. */
+    RTMemFree(pszBuf);
     SetupDiDestroyDeviceInfoList(hDevInfo);
     return rc;
 
@@ -532,11 +528,10 @@ static int drvWinHostGetparportAddr(PDRVHOSTPARALLEL pThis)
  */
 static int drvHostParallelSetMode(PDRVHOSTPARALLEL pThis, PDMPARALLELPORTMODE enmMode)
 {
-    int iMode = 0;
-    int rc = VINF_SUCCESS;
     LogFlowFunc(("mode=%d\n", enmMode));
-
 # ifndef VBOX_WITH_WIN_PARPORT_SUP
+    int rc = VINF_SUCCESS;
+    int iMode = 0;
     int rcLnx;
     if (pThis->enmModeCur != enmMode)
     {
@@ -566,6 +561,7 @@ static int drvHostParallelSetMode(PDRVHOSTPARALLEL pThis, PDMPARALLELPORTMODE en
 
     return rc;
 # else  /* VBOX_WITH_WIN_PARPORT_SUP */
+    RT_NOREF(pThis, enmMode);
     return VINF_SUCCESS;
 # endif /* VBOX_WITH_WIN_PARPORT_SUP */
 }
@@ -591,13 +587,11 @@ static DECLCALLBACK(void *) drvHostParallelQueryInterface(PPDMIBASE pInterface,
 /**
  * @interface_method_impl{PDMIHOSTPARALLELCONNECTOR,pfnWrite}
  */
-static DECLCALLBACK(int) drvHostParallelWrite(PPDMIHOSTPARALLELCONNECTOR pInterface, const void *pvBuf, size_t cbWrite, PDMPARALLELPORTMODE enmMode)
+static DECLCALLBACK(int)
+drvHostParallelWrite(PPDMIHOSTPARALLELCONNECTOR pInterface, const void *pvBuf, size_t cbWrite, PDMPARALLELPORTMODE enmMode)
 {
-    PPDMDRVINS          pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
-    //PDRVHOSTPARALLEL    pThis   = PDMINS_2_DATA(pDrvIns, PDRVHOSTPARALLEL);
-    PDRVHOSTPARALLEL    pThis   = RT_FROM_MEMBER(pInterface, DRVHOSTPARALLEL, CTX_SUFF(IHostParallelConnector));
+    PDRVHOSTPARALLEL pThis = RT_FROM_MEMBER(pInterface, DRVHOSTPARALLEL, CTX_SUFF(IHostParallelConnector));
     int rc = VINF_SUCCESS;
-    int rcLnx = 0;
 
     LogFlowFunc(("pvBuf=%#p cbWrite=%d\n", pvBuf, cbWrite));
 
@@ -605,6 +599,7 @@ static DECLCALLBACK(int) drvHostParallelWrite(PPDMIHOSTPARALLELCONNECTOR pInterf
     if (RT_FAILURE(rc))
         return rc;
 # ifndef VBOX_WITH_WIN_PARPORT_SUP
+    int rcLnx = 0;
     if (enmMode == PDM_PARALLEL_PORT_MODE_SPP)
     {
         /* Set the data lines directly. */
@@ -617,15 +612,19 @@ static DECLCALLBACK(int) drvHostParallelWrite(PPDMIHOSTPARALLELCONNECTOR pInterf
     }
     if (RT_UNLIKELY(rcLnx < 0))
         rc = RTErrConvertFromErrno(errno);
+
 # else /* VBOX_WITH_WIN_PARPORT_SUP */
-    if (pThis->fParportAvail)
+    if (pThis->PortDirectData != 0)
     {
-        for (size_t i = 0; i < cbWrite; i++)
+        while (cbWrite > 0)
         {
-            uint64_t u64Data = (uint8_t) *((uint8_t *)(pvBuf) + i);
-            LogFlowFunc(("calling R0 to write to parallel port, data=%#x\n", u64Data));
-            rc = PDMDrvHlpCallR0(pThis->CTX_SUFF(pDrvIns), DRVHOSTPARALLELR0OP_WRITE, u64Data);
+            size_t cbToWrite = RT_MIN(cbWrite, sizeof(pThis->abDataBuf));
+            LogFlowFunc(("Calling R0 to write %#zu bytes of data\n", cbToWrite));
+            memcpy(pThis->abDataBuf, pvBuf, cbToWrite);
+            rc = PDMDrvHlpCallR0(pThis->CTX_SUFF(pDrvIns), DRVHOSTPARALLELR0OP_WRITE, cbToWrite);
             AssertRC(rc);
+            pvBuf = (uint8_t const *)pvBuf + cbToWrite;
+            cbWrite -= cbToWrite;
         }
     }
 # endif /* VBOX_WITH_WIN_PARPORT_SUP */
@@ -635,9 +634,10 @@ static DECLCALLBACK(int) drvHostParallelWrite(PPDMIHOSTPARALLELCONNECTOR pInterf
 /**
  * @interface_method_impl{PDMIHOSTPARALLELCONNECTOR,pfnRead}
  */
-static DECLCALLBACK(int) drvHostParallelRead(PPDMIHOSTPARALLELCONNECTOR pInterface, void *pvBuf, size_t cbRead, PDMPARALLELPORTMODE enmMode)
+static DECLCALLBACK(int)
+drvHostParallelRead(PPDMIHOSTPARALLELCONNECTOR pInterface, void *pvBuf, size_t cbRead, PDMPARALLELPORTMODE enmMode)
 {
-    PDRVHOSTPARALLEL    pThis   = RT_FROM_MEMBER(pInterface, DRVHOSTPARALLEL, CTX_SUFF(IHostParallelConnector));
+    PDRVHOSTPARALLEL pThis = RT_FROM_MEMBER(pInterface, DRVHOSTPARALLEL, CTX_SUFF(IHostParallelConnector));
     int rc = VINF_SUCCESS;
 
 # ifndef VBOX_WITH_WIN_PARPORT_SUP
@@ -660,16 +660,21 @@ static DECLCALLBACK(int) drvHostParallelRead(PPDMIHOSTPARALLELCONNECTOR pInterfa
     }
     if (RT_UNLIKELY(rcLnx < 0))
         rc = RTErrConvertFromErrno(errno);
+
 # else  /* VBOX_WITH_WIN_PARPORT_SUP */
-    if (pThis->fParportAvail)
+    RT_NOREF(enmMode);
+    if (pThis->PortDirectData != 0)
     {
-        *((uint8_t*)(pvBuf)) = 0; /* Initialize the buffer. */
-        for (size_t i = 0; i < cbRead; i++)
+        while (cbRead > 0)
         {
-            LogFlowFunc(("calling R0 to read from parallel port\n"));
-            int rc = PDMDrvHlpCallR0(pThis->CTX_SUFF(pDrvIns), DRVHOSTPARALLELR0OP_READ, 0);
+            size_t cbToRead = RT_MIN(cbRead, sizeof(pThis->abDataBuf));
+            LogFlowFunc(("Calling R0 to read %#zu bytes of data\n", cbToRead));
+            memset(pThis->abDataBuf, 0, cbToRead);
+            rc = PDMDrvHlpCallR0(pThis->CTX_SUFF(pDrvIns), DRVHOSTPARALLELR0OP_READ, cbToRead);
             AssertRC(rc);
-            *((uint8_t *)pvBuf + i) = (uint8_t)pThis->u8ReadIn;
+            memcpy(pvBuf, pThis->abDataBuf, cbToRead);
+            pvBuf   = (uint8_t *)pvBuf + cbToRead;
+            cbRead -= cbToRead;
         }
     }
 # endif /* VBOX_WITH_WIN_PARPORT_SUP */
@@ -692,12 +697,10 @@ static DECLCALLBACK(int) drvHostParallelSetPortDirection(PPDMIHOSTPARALLELCONNEC
         rc = RTErrConvertFromErrno(errno);
 
 # else /* VBOX_WITH_WIN_PARPORT_SUP */
-    uint64_t u64Data;
-    u64Data = (uint8_t)iMode;
-    if (pThis->fParportAvail)
+    if (pThis->PortDirectData != 0)
     {
-        LogFlowFunc(("calling R0 to write CTRL, data=%#x\n", u64Data));
-        rc = PDMDrvHlpCallR0(pThis->CTX_SUFF(pDrvIns), DRVHOSTPARALLELR0OP_SETPORTDIRECTION, u64Data);
+        LogFlowFunc(("calling R0 to write CTRL, data=%#x\n", iMode));
+        rc = PDMDrvHlpCallR0(pThis->CTX_SUFF(pDrvIns), DRVHOSTPARALLELR0OP_SETPORTDIRECTION, iMode);
         AssertRC(rc);
     }
 # endif /* VBOX_WITH_WIN_PARPORT_SUP */
@@ -711,20 +714,17 @@ static DECLCALLBACK(int) drvHostParallelWriteControl(PPDMIHOSTPARALLELCONNECTOR
 {
     PDRVHOSTPARALLEL    pThis   = RT_FROM_MEMBER(pInterface, DRVHOSTPARALLEL, CTX_SUFF(IHostParallelConnector));
     int rc = VINF_SUCCESS;
-    int rcLnx = 0;
 
     LogFlowFunc(("fReg=%#x\n", fReg));
 # ifndef VBOX_WITH_WIN_PARPORT_SUP
-    rcLnx = ioctl(RTFileToNative(pThis->hFileDevice), PPWCONTROL, &fReg);
+    int rcLnx = ioctl(RTFileToNative(pThis->hFileDevice), PPWCONTROL, &fReg);
     if (RT_UNLIKELY(rcLnx < 0))
         rc = RTErrConvertFromErrno(errno);
 # else /* VBOX_WITH_WIN_PARPORT_SUP */
-    uint64_t u64Data;
-    u64Data = (uint8_t)fReg;
-    if (pThis->fParportAvail)
+    if (pThis->PortDirectData != 0)
     {
-        LogFlowFunc(("calling R0 to write CTRL, data=%#x\n", u64Data));
-        rc = PDMDrvHlpCallR0(pThis->CTX_SUFF(pDrvIns), DRVHOSTPARALLELR0OP_WRITECONTROL, u64Data);
+        LogFlowFunc(("calling R0 to write CTRL, data=%#x\n", fReg));
+        rc = PDMDrvHlpCallR0(pThis->CTX_SUFF(pDrvIns), DRVHOSTPARALLELR0OP_WRITECONTROL, fReg);
         AssertRC(rc);
     }
 # endif /* VBOX_WITH_WIN_PARPORT_SUP */
@@ -739,11 +739,10 @@ static DECLCALLBACK(int) drvHostParallelReadControl(PPDMIHOSTPARALLELCONNECTOR p
 {
     PDRVHOSTPARALLEL    pThis   = RT_FROM_MEMBER(pInterface, DRVHOSTPARALLEL, CTX_SUFF(IHostParallelConnector));
     int rc = VINF_SUCCESS;
-    int rcLnx = 0;
-    uint8_t fReg = 0;
 
 # ifndef VBOX_WITH_WIN_PARPORT_SUP
-    rcLnx = ioctl(RTFileToNative(pThis->hFileDevice), PPRCONTROL, &fReg);
+    uint8_t fReg = 0;
+    int rcLnx = ioctl(RTFileToNative(pThis->hFileDevice), PPRCONTROL, &fReg);
     if (RT_UNLIKELY(rcLnx < 0))
         rc = RTErrConvertFromErrno(errno);
     else
@@ -753,12 +752,12 @@ static DECLCALLBACK(int) drvHostParallelReadControl(PPDMIHOSTPARALLELCONNECTOR p
     }
 # else /* VBOX_WITH_WIN_PARPORT_SUP */
     *pfReg = 0; /* Initialize the buffer*/
-    if (pThis->fParportAvail)
+    if (pThis->PortDirectData != 0)
     {
         LogFlowFunc(("calling R0 to read control from parallel port\n"));
         rc = PDMDrvHlpCallR0(pThis-> CTX_SUFF(pDrvIns), DRVHOSTPARALLELR0OP_READCONTROL, 0);
         AssertRC(rc);
-        *pfReg = pThis->u8ReadInControl;
+        *pfReg = pThis->bReadInControl;
     }
 # endif /* VBOX_WITH_WIN_PARPORT_SUP */
     return rc;
@@ -771,10 +770,9 @@ static DECLCALLBACK(int) drvHostParallelReadStatus(PPDMIHOSTPARALLELCONNECTOR pI
 {
     PDRVHOSTPARALLEL    pThis   = RT_FROM_MEMBER(pInterface, DRVHOSTPARALLEL, CTX_SUFF(IHostParallelConnector));
     int rc = VINF_SUCCESS;
-    int rcLnx = 0;
-    uint8_t fReg = 0;
 # ifndef  VBOX_WITH_WIN_PARPORT_SUP
-    rcLnx = ioctl(RTFileToNative(pThis->hFileDevice), PPRSTATUS, &fReg);
+    uint8_t fReg = 0;
+    int rcLnx = ioctl(RTFileToNative(pThis->hFileDevice), PPRSTATUS, &fReg);
     if (RT_UNLIKELY(rcLnx < 0))
         rc = RTErrConvertFromErrno(errno);
     else
@@ -784,12 +782,12 @@ static DECLCALLBACK(int) drvHostParallelReadStatus(PPDMIHOSTPARALLELCONNECTOR pI
     }
 # else /* VBOX_WITH_WIN_PARPORT_SUP */
     *pfReg = 0; /* Intialize the buffer. */
-    if (pThis->fParportAvail)
+    if (pThis->PortDirectData != 0)
     {
         LogFlowFunc(("calling R0 to read status from parallel port\n"));
         rc = PDMDrvHlpCallR0(pThis->CTX_SUFF(pDrvIns), DRVHOSTPARALLELR0OP_READSTATUS, 0);
         AssertRC(rc);
-        *pfReg = pThis->u8ReadInStatus;
+        *pfReg = pThis->bReadInStatus;
     }
 # endif /* VBOX_WITH_WIN_PARPORT_SUP */
     return rc;
@@ -852,6 +850,7 @@ static DECLCALLBACK(int) drvHostParallelMonitorThread(PPDMDRVINS pDrvIns, PPDMTH
  */
 static DECLCALLBACK(int) drvHostParallelWakeupMonitorThread(PPDMDRVINS pDrvIns, PPDMTHREAD pThread)
 {
+    RT_NOREF(pThread);
     PDRVHOSTPARALLEL pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTPARALLEL);
     size_t cbIgnored;
     return RTPipeWrite(pThis->hWakeupPipeW, "", 1, &cbIgnored);
@@ -869,30 +868,29 @@ static DECLCALLBACK(int) drvHostParallelWakeupMonitorThread(PPDMDRVINS pDrvIns,
  */
 static DECLCALLBACK(void) drvHostParallelDestruct(PPDMDRVINS pDrvIns)
 {
-    int rc;
-    PDRVHOSTPARALLEL pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTPARALLEL);
-    LogFlowFunc(("iInstance=%d\n", pDrvIns->iInstance));
     PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns);
+    LogFlowFunc(("iInstance=%d\n", pDrvIns->iInstance));
 
 #ifndef VBOX_WITH_WIN_PARPORT_SUP
+    PDRVHOSTPARALLEL pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTPARALLEL);
     if (pThis->hFileDevice != NIL_RTFILE)
         ioctl(RTFileToNative(pThis->hFileDevice), PPRELEASE);
 
     if (pThis->hWakeupPipeW != NIL_RTPIPE)
     {
-        rc = RTPipeClose(pThis->hWakeupPipeW); AssertRC(rc);
+        int rc = RTPipeClose(pThis->hWakeupPipeW); AssertRC(rc);
         pThis->hWakeupPipeW = NIL_RTPIPE;
     }
 
     if (pThis->hWakeupPipeR != NIL_RTPIPE)
     {
-        rc = RTPipeClose(pThis->hWakeupPipeR); AssertRC(rc);
+        int rc = RTPipeClose(pThis->hWakeupPipeR); AssertRC(rc);
         pThis->hWakeupPipeR = NIL_RTPIPE;
     }
 
     if (pThis->hFileDevice != NIL_RTFILE)
     {
-        rc = RTFileClose(pThis->hFileDevice); AssertRC(rc);
+        int rc = RTFileClose(pThis->hFileDevice); AssertRC(rc);
         pThis->hFileDevice = NIL_RTFILE;
     }
 
@@ -901,13 +899,7 @@ static DECLCALLBACK(void) drvHostParallelDestruct(PPDMDRVINS pDrvIns)
         MMR3HeapFree(pThis->pszDevicePath);
         pThis->pszDevicePath = NULL;
     }
-#else  /* VBOX_WITH_WIN_PARPORT_SUP */
-    if (pThis->hWinFileDevice != NIL_RTFILE)
-    {
-        rc = RTFileClose(pThis->hWinFileDevice); AssertRC(rc);
-        pThis->hWinFileDevice = NIL_RTFILE;
-    }
-#endif /* VBOX_WITH_WIN_PARPORT_SUP */
+#endif /* !VBOX_WITH_WIN_PARPORT_SUP */
 }
 
 /**
@@ -917,31 +909,30 @@ static DECLCALLBACK(void) drvHostParallelDestruct(PPDMDRVINS pDrvIns)
  */
 static DECLCALLBACK(int) drvHostParallelConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
-    PDRVHOSTPARALLEL pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTPARALLEL);
+    RT_NOREF(fFlags);
+    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
     LogFlowFunc(("iInstance=%d\n", pDrvIns->iInstance));
+    PDRVHOSTPARALLEL pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTPARALLEL);
 
-    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
 
     /*
      * Init basic data members and interfaces.
      *
      * Must be done before returning any failure because we've got a destructor.
      */
-    pThis->hFileDevice  = NIL_RTFILE;
+    pThis->hFileDevice                                  = NIL_RTFILE;
 #ifndef VBOX_WITH_WIN_PARPORT_SUP
-    pThis->hWakeupPipeR = NIL_RTPIPE;
-    pThis->hWakeupPipeW = NIL_RTPIPE;
-#else
-    pThis->hWinFileDevice = NIL_RTFILE;
+    pThis->hWakeupPipeR                                 = NIL_RTPIPE;
+    pThis->hWakeupPipeW                                 = NIL_RTPIPE;
 #endif
 
-    pThis->pDrvInsR3                                = pDrvIns;
+    pThis->pDrvInsR3                                    = pDrvIns;
 #ifdef VBOX_WITH_DRVINTNET_IN_R0
-    pThis->pDrvInsR0                                = PDMDRVINS_2_R0PTR(pDrvIns);
+    pThis->pDrvInsR0                                    = PDMDRVINS_2_R0PTR(pDrvIns);
 #endif
 
     /* IBase. */
-    pDrvIns->IBase.pfnQueryInterface                  = drvHostParallelQueryInterface;
+    pDrvIns->IBase.pfnQueryInterface                    = drvHostParallelQueryInterface;
     /* IHostParallelConnector. */
     pThis->IHostParallelConnectorR3.pfnWrite            = drvHostParallelWrite;
     pThis->IHostParallelConnectorR3.pfnRead             = drvHostParallelRead;
@@ -971,6 +962,7 @@ static DECLCALLBACK(int) drvHostParallelConstruct(PPDMDRVINS pDrvIns, PCFGMNODE
     /*
      * Open the device
      */
+    /** @todo exclusive access on windows?   */
     rc = RTFileOpen(&pThis->hFileDevice, pThis->pszDevicePath, RTFILE_O_READWRITE | RTFILE_O_OPEN | RTFILE_O_DENY_NONE);
     if (RT_FAILURE(rc))
         return PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS, N_("Parallel#%d could not open '%s'"),
@@ -1027,22 +1019,18 @@ static DECLCALLBACK(int) drvHostParallelConstruct(PPDMDRVINS pDrvIns, PCFGMNODE
     if (RT_FAILURE(rc))
         return PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS, N_("HostParallel#%d cannot create monitor thread"), pDrvIns->iInstance);
 
-#else /* VBOX_WITH_WIN_PARPORT_SUP */
-    pThis->fParportAvail     = false;
-    pThis->u32LptAddr        = 0;
-    pThis->u32LptAddrControl = 0;
-    pThis->u32LptAddrStatus  = 0;
-    rc = drvWinHostGetparportAddr(pThis);
-
-    /* If we have the char port availabe use it , else I am not getting exclusive access to parallel port.
-       Read and write will be done only if addresses are available
-    */
-    if (pThis->szParportName)
-    {
-        rc = RTFileOpen(&pThis->hWinFileDevice, (char *)pThis->szParportName,
-                        RTFILE_O_READWRITE | RTFILE_O_OPEN | RTFILE_O_DENY_NONE);
-    }
-#endif
+#else  /* VBOX_WITH_WIN_PARPORT_SUP */
+
+    pThis->PortDirectData    = 0;
+    pThis->PortDirectControl = 0;
+    pThis->PortDirectStatus  = 0;
+    rc = drvHostParallelGetWinHostIoPorts(pThis);
+    if (RT_FAILURE(rc))
+        return PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS,
+                                   N_("HostParallel#%d: Could not get direct access to the host parallel port!! (rc=%Rrc)"),
+                                   pDrvIns->iInstance, rc);
+
+#endif /* VBOX_WITH_WIN_PARPORT_SUP */
     return VINF_SUCCESS;
 }
 
diff --git a/src/VBox/Devices/Samples/DrvStorageFilter.cpp b/src/VBox/Devices/Samples/DrvStorageFilter.cpp
index 2fb4272..b087426 100644
--- a/src/VBox/Devices/Samples/DrvStorageFilter.cpp
+++ b/src/VBox/Devices/Samples/DrvStorageFilter.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Samples/Makefile.kmk b/src/VBox/Devices/Samples/Makefile.kmk
index bbc2272..dd72976 100644
--- a/src/VBox/Devices/Samples/Makefile.kmk
+++ b/src/VBox/Devices/Samples/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2009-2015 Oracle Corporation
+# Copyright (C) 2009-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Samples/VBoxSampleDevice.cpp b/src/VBox/Devices/Samples/VBoxSampleDevice.cpp
index a4b31ae..059d1c2 100644
--- a/src/VBox/Devices/Samples/VBoxSampleDevice.cpp
+++ b/src/VBox/Devices/Samples/VBoxSampleDevice.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Serial/DevSerial.cpp b/src/VBox/Devices/Serial/DevSerial.cpp
index 804dde2..70564d8 100644
--- a/src/VBox/Devices/Serial/DevSerial.cpp
+++ b/src/VBox/Devices/Serial/DevSerial.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -442,12 +442,11 @@ static void serial_xmit(PDEVSERIAL pThis, bool bRetryXmit)
 
 static int serial_ioport_write(PDEVSERIAL pThis, uint32_t addr, uint32_t val)
 {
-    addr &= 7;
-
 #ifndef IN_RING3
-    NOREF(pThis);
+    NOREF(pThis); RT_NOREF_PV(addr); RT_NOREF_PV(val);
     return VINF_IOM_R3_IOPORT_WRITE;
 #else
+    addr &= 7;
     switch(addr) {
     default:
     case 0:
@@ -738,7 +737,7 @@ static DECLCALLBACK(int) serialNotifyRead(PPDMICHARPORT pInterface, const void *
              * or it will be dropped at fifo_put(). */
             pThis->fRecvWaiting = true;
             PDMCritSectLeave(&pThis->CritSect);
-            int rc = RTSemEventWait(pThis->ReceiveSem, 250);
+            RTSemEventWait(pThis->ReceiveSem, 250);
             PDMCritSectEnter(&pThis->CritSect, VERR_PERMISSION_DENIED);
         }
         serial_receive(pThis, &pu8Buf[0], 1);
@@ -794,6 +793,7 @@ static DECLCALLBACK(int) serialNotifyStatusLinesChanged(PPDMICHARPORT pInterface
  */
 static DECLCALLBACK(int) serialNotifyBufferFull(PPDMICHARPORT pInterface, bool fFull)
 {
+    RT_NOREF(pInterface, fFull);
     return VINF_SUCCESS;
 }
 
@@ -825,6 +825,7 @@ static DECLCALLBACK(int) serialNotifyBreak(PPDMICHARPORT pInterface)
  */
 static DECLCALLBACK(void) serialFifoTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
 {
+    RT_NOREF(pDevIns, pTimer);
     PDEVSERIAL pThis = (PDEVSERIAL)pvUser;
     Assert(PDMCritSectIsOwner(&pThis->CritSect));
     if (pThis->recv_fifo.count)
@@ -841,6 +842,7 @@ static DECLCALLBACK(void) serialFifoTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, v
  */
 static DECLCALLBACK(void) serialTransmitTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
 {
+    RT_NOREF(pDevIns, pTimer);
     PDEVSERIAL pThis = (PDEVSERIAL)pvUser;
     Assert(PDMCritSectIsOwner(&pThis->CritSect));
     serial_xmit(pThis, true);
@@ -858,6 +860,7 @@ PDMBOTHCBDECL(int) serialIOPortWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT
     PDEVSERIAL pThis = PDMINS_2_DATA(pDevIns, PDEVSERIAL);
     int          rc;
     Assert(PDMCritSectIsOwner(&pThis->CritSect));
+    RT_NOREF_PV(pvUser);
 
     if (cb == 1)
     {
@@ -882,6 +885,7 @@ PDMBOTHCBDECL(int) serialIOPortRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT P
     PDEVSERIAL pThis = PDMINS_2_DATA(pDevIns, PDEVSERIAL);
     int          rc;
     Assert(PDMCritSectIsOwner(&pThis->CritSect));
+    RT_NOREF_PV(pvUser);
 
     if (cb == 1)
     {
@@ -903,6 +907,7 @@ PDMBOTHCBDECL(int) serialIOPortRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT P
  */
 static DECLCALLBACK(int) serialLiveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uPass)
 {
+    RT_NOREF(uPass);
     PDEVSERIAL pThis = PDMINS_2_DATA(pDevIns, PDEVSERIAL);
     SSMR3PutS32(pSSM, pThis->irq);
     SSMR3PutU32(pSSM, pThis->base);
@@ -948,7 +953,7 @@ static DECLCALLBACK(int) serialSaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
      *  - tsr_retry
      */
 
-    return SSMR3PutU32(pSSM, ~0); /* sanity/terminator */
+    return SSMR3PutU32(pSSM, UINT32_MAX); /* sanity/terminator */
 }
 
 
@@ -1010,7 +1015,7 @@ static DECLCALLBACK(int) serialLoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uin
         int rc = SSMR3GetU32(pSSM, &u32);
         if (RT_FAILURE(rc))
             return rc;
-        AssertMsgReturn(u32 == ~0U, ("%#x\n", u32), VERR_SSM_DATA_UNIT_FORMAT_CHANGED);
+        AssertMsgReturn(u32 == UINT32_MAX, ("%#x\n", u32), VERR_SSM_DATA_UNIT_FORMAT_CHANGED);
 
         if (   (pThis->lsr & UART_LSR_DR)
             || pThis->fRecvWaiting)
@@ -1092,7 +1097,8 @@ static DECLCALLBACK(void *) serialQueryInterface(PPDMIBASE pInterface, const cha
  */
 static DECLCALLBACK(void) serialRelocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta)
 {
-    PDEVSERIAL pThis      = PDMINS_2_DATA(pDevIns, PDEVSERIAL);
+    RT_NOREF(offDelta);
+    PDEVSERIAL pThis = PDMINS_2_DATA(pDevIns, PDEVSERIAL);
     pThis->pDevInsRC        = PDMDEVINS_2_RCPTR(pDevIns);
     pThis->transmit_timerRC = TMTimerRCPtr(pThis->transmit_timerR3);
 }
diff --git a/src/VBox/Devices/Serial/DrvChar.cpp b/src/VBox/Devices/Serial/DrvChar.cpp
index 83fca95..5b835e2 100644
--- a/src/VBox/Devices/Serial/DrvChar.cpp
+++ b/src/VBox/Devices/Serial/DrvChar.cpp
@@ -10,7 +10,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -102,7 +102,9 @@ static DECLCALLBACK(void *) drvCharQueryInterface(PPDMIBASE pInterface, const ch
 
 /* -=-=-=-=- ICharConnector -=-=-=-=- */
 
-/** @copydoc PDMICHARCONNECTOR::pfnWrite */
+/**
+ * @interface_method_impl{PDMICHARCONNECTOR,pfnWrite}
+ */
 static DECLCALLBACK(int) drvCharWrite(PPDMICHARCONNECTOR pInterface, const void *pvBuf, size_t cbWrite)
 {
     PDRVCHAR pThis = PDMICHAR_2_DRVCHAR(pInterface);
@@ -122,9 +124,14 @@ static DECLCALLBACK(int) drvCharWrite(PPDMICHARCONNECTOR pInterface, const void
     return VINF_SUCCESS;
 }
 
-/** @copydoc PDMICHARCONNECTOR::pfnSetParameters */
-static DECLCALLBACK(int) drvCharSetParameters(PPDMICHARCONNECTOR pInterface, unsigned Bps, char chParity, unsigned cDataBits, unsigned cStopBits)
+
+/**
+ * @interface_method_impl{PDMICHARCONNECTOR,pfnSetParameters}
+ */
+static DECLCALLBACK(int) drvCharSetParameters(PPDMICHARCONNECTOR pInterface, unsigned Bps, char chParity,
+                                              unsigned cDataBits,  unsigned cStopBits)
 {
+    RT_NOREF(pInterface, Bps, chParity, cDataBits, cStopBits);
     /*PDRVCHAR pThis = PDMICHAR_2_DRVCHAR(pInterface); - unused*/
 
     LogFlow(("%s: Bps=%u chParity=%c cDataBits=%u cStopBits=%u\n", __FUNCTION__, Bps, chParity, cDataBits, cStopBits));
@@ -138,11 +145,12 @@ static DECLCALLBACK(int) drvCharSetParameters(PPDMICHARCONNECTOR pInterface, uns
  * Send thread loop - pushes data down thru the driver chain.
  *
  * @returns 0 on success.
- * @param   ThreadSelf  Thread handle to this thread.
+ * @param   hThreadSelf Thread handle to this thread.
  * @param   pvUser      User argument.
  */
-static DECLCALLBACK(int) drvCharSendLoop(RTTHREAD ThreadSelf, void *pvUser)
+static DECLCALLBACK(int) drvCharSendLoop(RTTHREAD hThreadSelf, void *pvUser)
 {
+    RT_NOREF(hThreadSelf);
     PDRVCHAR pThis = (PDRVCHAR)pvUser;
 
     int rc = VINF_SUCCESS;
@@ -188,17 +196,19 @@ static DECLCALLBACK(int) drvCharSendLoop(RTTHREAD ThreadSelf, void *pvUser)
     return VINF_SUCCESS;
 }
 
+
 /* -=-=-=-=- receive thread -=-=-=-=- */
 
 /**
  * Receive thread loop.
  *
  * @returns 0 on success.
- * @param   ThreadSelf  Thread handle to this thread.
+ * @param   hThreadSelf Thread handle to this thread.
  * @param   pvUser      User argument.
  */
-static DECLCALLBACK(int) drvCharReceiveLoop(RTTHREAD ThreadSelf, void *pvUser)
+static DECLCALLBACK(int) drvCharReceiveLoop(RTTHREAD hThreadSelf, void *pvUser)
 {
+    RT_NOREF(hThreadSelf);
     PDRVCHAR    pThis = (PDRVCHAR)pvUser;
     char        abBuffer[256];
     char       *pbRemaining = abBuffer;
@@ -253,34 +263,29 @@ static DECLCALLBACK(int) drvCharReceiveLoop(RTTHREAD ThreadSelf, void *pvUser)
     return VINF_SUCCESS;
 }
 
+
 /**
- * Set the modem lines.
- *
- * @returns VBox status code
- * @param pInterface        Pointer to the interface structure.
- * @param RequestToSend     Set to true if this control line should be made active.
- * @param DataTerminalReady Set to true if this control line should be made active.
+ * @callback_method_impl{PDMICHARCONNECTOR,pfnSetModemLines}
  */
-static DECLCALLBACK(int) drvCharSetModemLines(PPDMICHARCONNECTOR pInterface, bool RequestToSend, bool DataTerminalReady)
+static DECLCALLBACK(int) drvCharSetModemLines(PPDMICHARCONNECTOR pInterface, bool fRequestToSend, bool fDataTerminalReady)
 {
     /* Nothing to do here. */
+    RT_NOREF(pInterface, fRequestToSend, fDataTerminalReady);
     return VINF_SUCCESS;
 }
 
+
 /**
- * Sets the TD line into break condition.
- *
- * @returns VBox status code.
- * @param   pInterface  Pointer to the interface structure containing the called function pointer.
- * @param   fBreak      Set to true to let the device send a break false to put into normal operation.
- * @thread  Any thread.
+ * @callback_method_impl{PDMICHARCONNECTOR,pfnSetBreak}
  */
 static DECLCALLBACK(int) drvCharSetBreak(PPDMICHARCONNECTOR pInterface, bool fBreak)
 {
     /* Nothing to do here. */
+    RT_NOREF(pInterface, fBreak);
     return VINF_SUCCESS;
 }
 
+
 /* -=-=-=-=- driver interface -=-=-=-=- */
 
 /**
@@ -344,9 +349,10 @@ static DECLCALLBACK(void) drvCharDestruct(PPDMDRVINS pDrvIns)
  */
 static DECLCALLBACK(int) drvCharConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
+    RT_NOREF(pCfg);
+    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
     PDRVCHAR pThis = PDMINS_2_DATA(pDrvIns, PDRVCHAR);
     LogFlow(("%s: iInstance=%d\n", __FUNCTION__, pDrvIns->iInstance));
-    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
 
     /*
      * Init basic data members and interfaces.
diff --git a/src/VBox/Devices/Serial/DrvHostSerial.cpp b/src/VBox/Devices/Serial/DrvHostSerial.cpp
index e2265c6..a67ad98 100644
--- a/src/VBox/Devices/Serial/DrvHostSerial.cpp
+++ b/src/VBox/Devices/Serial/DrvHostSerial.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -66,7 +66,7 @@
 # endif /* linux */
 
 #elif defined(RT_OS_WINDOWS)
-# include <Windows.h>
+# include <iprt/win/windows.h>
 #endif
 
 #include "VBoxDD.h"
@@ -171,7 +171,7 @@ static DECLCALLBACK(void *) drvHostSerialQueryInterface(PPDMIBASE pInterface, co
 
 /* -=-=-=-=- ICharConnector -=-=-=-=- */
 
-/** @copydoc PDMICHARCONNECTOR::pfnWrite */
+/** @interface_method_impl{PDMICHARCONNECTOR,pfnWrite} */
 static DECLCALLBACK(int) drvHostSerialWrite(PPDMICHARCONNECTOR pInterface, const void *pvBuf, size_t cbWrite)
 {
     PDRVHOSTSERIAL pThis = PDMICHAR_2_DRVHOSTSERIAL(pInterface);
diff --git a/src/VBox/Devices/Serial/DrvNamedPipe.cpp b/src/VBox/Devices/Serial/DrvNamedPipe.cpp
index 54a1b28..e89efc0 100644
--- a/src/VBox/Devices/Serial/DrvNamedPipe.cpp
+++ b/src/VBox/Devices/Serial/DrvNamedPipe.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -32,7 +32,7 @@
 #include "VBoxDD.h"
 
 #ifdef RT_OS_WINDOWS
-# include <windows.h>
+# include <iprt/win/windows.h>
 #else /* !RT_OS_WINDOWS */
 # include <errno.h>
 # include <unistd.h>
@@ -97,7 +97,7 @@ typedef struct DRVNAMEDPIPE
 *********************************************************************************************************************************/
 
 
-/** @copydoc PDMISTREAM::pfnRead */
+/** @interface_method_impl{PDMISTREAM,pfnRead} */
 static DECLCALLBACK(int) drvNamedPipeRead(PPDMISTREAM pInterface, void *pvBuf, size_t *pcbRead)
 {
     int rc = VINF_SUCCESS;
@@ -193,7 +193,7 @@ static DECLCALLBACK(int) drvNamedPipeRead(PPDMISTREAM pInterface, void *pvBuf, s
 }
 
 
-/** @copydoc PDMISTREAM::pfnWrite */
+/** @interface_method_impl{PDMISTREAM,pfnWrite} */
 static DECLCALLBACK(int) drvNamedPipeWrite(PPDMISTREAM pInterface, const void *pvBuf, size_t *pcbWrite)
 {
     int rc = VINF_SUCCESS;
@@ -296,11 +296,12 @@ static DECLCALLBACK(void *) drvNamedPipeQueryInterface(PPDMIBASE pInterface, con
  * Receive thread loop.
  *
  * @returns 0 on success.
- * @param   ThreadSelf  Thread handle to this thread.
+ * @param   hThreadSelf Thread handle to this thread.
  * @param   pvUser      User argument.
  */
-static DECLCALLBACK(int) drvNamedPipeListenLoop(RTTHREAD ThreadSelf, void *pvUser)
+static DECLCALLBACK(int) drvNamedPipeListenLoop(RTTHREAD hThreadSelf, void *pvUser)
 {
+    RT_NOREF(hThreadSelf);
     PDRVNAMEDPIPE   pThis = (PDRVNAMEDPIPE)pvUser;
     int             rc = VINF_SUCCESS;
 #ifdef RT_OS_WINDOWS
@@ -522,8 +523,9 @@ static DECLCALLBACK(void) drvNamedPipeDestruct(PPDMDRVINS pDrvIns)
  */
 static DECLCALLBACK(int) drvNamedPipeConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
-    PDRVNAMEDPIPE pThis = PDMINS_2_DATA(pDrvIns, PDRVNAMEDPIPE);
+    RT_NOREF(fFlags);
     PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
+    PDRVNAMEDPIPE pThis = PDMINS_2_DATA(pDrvIns, PDRVNAMEDPIPE);
 
     /*
      * Init the static parts.
diff --git a/src/VBox/Devices/Serial/DrvRawFile.cpp b/src/VBox/Devices/Serial/DrvRawFile.cpp
index bb21c13..f697c95 100644
--- a/src/VBox/Devices/Serial/DrvRawFile.cpp
+++ b/src/VBox/Devices/Serial/DrvRawFile.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -63,7 +63,7 @@ typedef struct DRVRAWFILE
 
 /* -=-=-=-=- PDMISTREAM -=-=-=-=- */
 
-/** @copydoc PDMISTREAM::pfnWrite */
+/** @interface_method_impl{PDMISTREAM,pfnWrite} */
 static DECLCALLBACK(int) drvRawFileWrite(PPDMISTREAM pInterface, const void *pvBuf, size_t *pcbWrite)
 {
     int rc = VINF_SUCCESS;
@@ -154,8 +154,9 @@ static DECLCALLBACK(void) drvRawFileDestruct(PPDMDRVINS pDrvIns)
  */
 static DECLCALLBACK(int) drvRawFileConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
-    PDRVRAWFILE pThis = PDMINS_2_DATA(pDrvIns, PDRVRAWFILE);
+    RT_NOREF(fFlags);
     PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
+    PDRVRAWFILE pThis = PDMINS_2_DATA(pDrvIns, PDRVRAWFILE);
 
     /*
      * Init the static parts.
diff --git a/src/VBox/Devices/Serial/DrvTCP.cpp b/src/VBox/Devices/Serial/DrvTCP.cpp
index 21d4ddb..c151002 100644
--- a/src/VBox/Devices/Serial/DrvTCP.cpp
+++ b/src/VBox/Devices/Serial/DrvTCP.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation.
+ * Copyright (C) 2006-2016 Oracle Corporation.
  *
  * This file was contributed by Alexey Eromenko (derived from DrvNamedPipe)
  *
@@ -35,7 +35,7 @@
 #include "VBoxDD.h"
 
 #ifdef RT_OS_WINDOWS
-# include <ws2tcpip.h>
+# include <iprt/win/ws2tcpip.h>
 #else /* !RT_OS_WINDOWS */
 # include <errno.h>
 # include <unistd.h>
@@ -100,7 +100,7 @@ typedef struct DRVTCP
 *********************************************************************************************************************************/
 
 
-/** @copydoc PDMISTREAM::pfnRead */
+/** @interface_method_impl{PDMISTREAM,pfnRead} */
 static DECLCALLBACK(int) drvTCPRead(PPDMISTREAM pInterface, void *pvBuf, size_t *pcbRead)
 {
     int rc = VINF_SUCCESS;
@@ -142,7 +142,7 @@ static DECLCALLBACK(int) drvTCPRead(PPDMISTREAM pInterface, void *pvBuf, size_t
 }
 
 
-/** @copydoc PDMISTREAM::pfnWrite */
+/** @interface_method_impl{PDMISTREAM,pfnWrite} */
 static DECLCALLBACK(int) drvTCPWrite(PPDMISTREAM pInterface, const void *pvBuf, size_t *pcbWrite)
 {
     int rc = VINF_SUCCESS;
@@ -196,14 +196,15 @@ static DECLCALLBACK(void *) drvTCPQueryInterface(PPDMIBASE pInterface, const cha
 /**
  * Receive thread loop.
  *
- * @returns 0 on success.
- * @param   ThreadSelf  Thread handle to this thread.
+ * @returns VINF_SUCCESS
+ * @param   hThreadSelf Thread handle to this thread.
  * @param   pvUser      User argument.
  */
-static DECLCALLBACK(int) drvTCPListenLoop(RTTHREAD ThreadSelf, void *pvUser)
+static DECLCALLBACK(int) drvTCPListenLoop(RTTHREAD hThreadSelf, void *pvUser)
 {
+    RT_NOREF(hThreadSelf);
     PDRVTCP pThis = (PDRVTCP)pvUser;
-    int     rc = VINF_SUCCESS;
+    int     rc;
 
     while (RT_LIKELY(!pThis->fShutdown))
     {
@@ -346,8 +347,9 @@ static DECLCALLBACK(void) drvTCPDestruct(PPDMDRVINS pDrvIns)
  */
 static DECLCALLBACK(int) drvTCPConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
-    PDRVTCP pThis = PDMINS_2_DATA(pDrvIns, PDRVTCP);
+    RT_NOREF(fFlags);
     PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
+    PDRVTCP pThis = PDMINS_2_DATA(pDrvIns, PDRVTCP);
 
 #ifdef RT_OS_WINDOWS
     {
diff --git a/src/VBox/Devices/Storage/ATAPIPassthrough.cpp b/src/VBox/Devices/Storage/ATAPIPassthrough.cpp
index d81c3f7..d244b5b 100644
--- a/src/VBox/Devices/Storage/ATAPIPassthrough.cpp
+++ b/src/VBox/Devices/Storage/ATAPIPassthrough.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -297,6 +297,7 @@ static int atapiTrackListUpdateFromSendCueSheet(PTRACKLIST pTrackList, const uin
 
 static int atapiTrackListUpdateFromSendDvdStructure(PTRACKLIST pTrackList, const uint8_t *pbCDB, const void *pvBuf)
 {
+    RT_NOREF(pTrackList, pbCDB, pvBuf);
     return VERR_NOT_IMPLEMENTED;
 }
 
@@ -312,6 +313,7 @@ static int atapiTrackListUpdateFromSendDvdStructure(PTRACKLIST pTrackList, const
 static int atapiTrackListUpdateFromFormattedToc(PTRACKLIST pTrackList, uint8_t iTrack,
                                                 bool fMSF, const uint8_t *pbBuf, uint32_t cbBuffer)
 {
+    RT_NOREF(iTrack, cbBuffer); /** @todo unused parameters */
     int rc = VINF_SUCCESS;
     unsigned cbToc = atapiBE2H_U16(pbBuf);
     uint8_t iTrackFirst = pbBuf[2];
@@ -396,19 +398,24 @@ static int atapiTrackListUpdateFromReadTocPmaAtip(PTRACKLIST pTrackList, const u
 
 static int atapiTrackListUpdateFromReadTrackInformation(PTRACKLIST pTrackList, const uint8_t *pbCDB, const void *pvBuf)
 {
+    RT_NOREF(pTrackList, pbCDB, pvBuf);
     return VERR_NOT_IMPLEMENTED;
 }
 
 static int atapiTrackListUpdateFromReadDvdStructure(PTRACKLIST pTrackList, const uint8_t *pbCDB, const void *pvBuf)
 {
+    RT_NOREF(pTrackList, pbCDB, pvBuf);
     return VERR_NOT_IMPLEMENTED;
 }
 
 static int atapiTrackListUpdateFromReadDiscInformation(PTRACKLIST pTrackList, const uint8_t *pbCDB, const void *pvBuf)
 {
+    RT_NOREF(pTrackList, pbCDB, pvBuf);
     return VERR_NOT_IMPLEMENTED;
 }
 
+#ifdef LOG_ENABLED
+
 /**
  * Converts the given track data form to a string.
  *
@@ -489,6 +496,8 @@ static void atapiTrackListDump(PTRACKLIST pTrackList)
     }
 }
 
+#endif /* LOG_ENABLED */
+
 DECLHIDDEN(int) ATAPIPassthroughTrackListCreateEmpty(PTRACKLIST *ppTrackList)
 {
     int rc = VERR_NO_MEMORY;
diff --git a/src/VBox/Devices/Storage/ATAPIPassthrough.h b/src/VBox/Devices/Storage/ATAPIPassthrough.h
index 76ba2de..a25d59d 100644
--- a/src/VBox/Devices/Storage/ATAPIPassthrough.h
+++ b/src/VBox/Devices/Storage/ATAPIPassthrough.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Storage/Debug.cpp b/src/VBox/Devices/Storage/Debug.cpp
index aae8647..025dab3 100644
--- a/src/VBox/Devices/Storage/Debug.cpp
+++ b/src/VBox/Devices/Storage/Debug.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -957,9 +957,9 @@ const char * SCSISenseExtText(uint8_t uASC, uint8_t uASCQ)
 /**
  * Log the write parameters mode page into a given buffer.
  */
-static int scsiLogWriteParamsModePage(char *pszBuffer, size_t cchBuffer,
-                                      uint8_t *pbModePage, size_t cbModePage)
+static int scsiLogWriteParamsModePage(char *pszBuffer, size_t cchBuffer, uint8_t *pbModePage, size_t cbModePage)
 {
+    RT_NOREF(cbModePage);
     size_t cch = 0;
     const char *pcsz = NULL;
 
@@ -1119,16 +1119,15 @@ int SCSILogModePage(char *pszBuffer, size_t cchBuffer, uint8_t *pbModePage,
  * @param  pbCueSheet    The cue sheet buffer.
  * @param  cbCueSheet    Size of the cue sheet buffer in bytes.
  */
-int SCSILogCueSheet(char *pszBuffer, size_t cchBuffer, uint8_t *pbCueSheet,
-                    size_t cbCueSheet)
+int SCSILogCueSheet(char *pszBuffer, size_t cchBuffer, uint8_t *pbCueSheet, size_t cbCueSheet)
 {
     int rc = VINF_SUCCESS;
     size_t cch = 0;
-    unsigned cCueSheetEntries = cbCueSheet / 8;
+    size_t cCueSheetEntries = cbCueSheet / 8;
 
     AssertReturn(cbCueSheet % 8 == 0, VERR_INVALID_PARAMETER);
 
-    for (unsigned i = 0; i < cCueSheetEntries; i++)
+    for (size_t i = 0; i < cCueSheetEntries; i++)
     {
         cch = RTStrPrintf(pszBuffer, cchBuffer,
                           "CTL/ADR=%#x TNO=%#x INDEX=%#x DATA=%#x SCMS=%#x TIME=%u:%u:%u\n",
diff --git a/src/VBox/Devices/Storage/DevAHCI.cpp b/src/VBox/Devices/Storage/DevAHCI.cpp
index 701cb73..4e857d2 100644
--- a/src/VBox/Devices/Storage/DevAHCI.cpp
+++ b/src/VBox/Devices/Storage/DevAHCI.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -312,7 +312,7 @@ typedef struct AHCIREQ
     /** The ATAPI command data. */
     uint8_t                    aATAPICmd[ATAPI_PACKET_SIZE];
     /** Size of one sector for the ATAPI transfer. */
-    size_t                     cbATAPISector;
+    uint32_t                   cbATAPISector;
     /** Physical address of the command header. - GC */
     RTGCPHYS                   GCPhysCmdHdrAddr;
     /** Physical address if the PRDT */
@@ -937,8 +937,8 @@ AssertCompileSize(SGLEntry, 16);
 typedef struct ahci_opreg
 {
     const char *pszName;
-    int (*pfnRead )(PAHCI ahci, uint32_t iReg, uint32_t *pu32Value);
-    int (*pfnWrite)(PAHCI ahci, uint32_t iReg, uint32_t u32Value);
+    int (*pfnRead )(PAHCI pAhci, uint32_t iReg, uint32_t *pu32Value);
+    int (*pfnWrite)(PAHCI pAhci, uint32_t iReg, uint32_t u32Value);
 } AHCIOPREG;
 
 /**
@@ -947,20 +947,18 @@ typedef struct ahci_opreg
 typedef struct pAhciPort_opreg
 {
     const char *pszName;
-    int (*pfnRead )(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value);
-    int (*pfnWrite)(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t u32Value);
+    int (*pfnRead )(PAHCI pAhci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value);
+    int (*pfnWrite)(PAHCI pAhci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t u32Value);
 } AHCIPORTOPREG;
 
 #ifndef VBOX_DEVICE_STRUCT_TESTCASE
 RT_C_DECLS_BEGIN
-static void ahciHBAReset(PAHCI pThis);
 #ifdef IN_RING3
+static void ahciHBAReset(PAHCI pThis);
 static int  ahciPostFisIntoMemory(PAHCIPort pAhciPort, unsigned uFisType, uint8_t *cmdFis);
 static void ahciPostFirstD2HFisIntoMemory(PAHCIPort pAhciPort);
-static size_t ahciCopyToPrdtl(PPDMDEVINS pDevIns, PAHCIREQ pAhciReq,
-                              void *pvBuf, size_t cbBuf);
-static size_t ahciCopyFromPrdtl(PPDMDEVINS pDevIns, PAHCIREQ pAhciReq,
-                                void *pvBuf, size_t cbBuf);
+static uint32_t ahciCopyToPrdtl(PPDMDEVINS pDevIns, PAHCIREQ pAhciReq, const void *pvBuf, size_t cbBuf);
+static size_t ahciCopyFromPrdtl(PPDMDEVINS pDevIns, PAHCIREQ pAhciReq, void *pvBuf, size_t cbBuf);
 static bool ahciCancelActiveTasks(PAHCIPort pAhciPort, PAHCIREQ pAhciReqExcept);
 static void ahciReqMemFree(PAHCIPort pAhciPort, PAHCIREQ pAhciReq, bool fForceFree);
 static void ahciR3PortCachedReqsFree(PAHCIPort pAhciPort);
@@ -987,7 +985,7 @@ RT_C_DECLS_END
      do { Log(("R3 P%u: ", pAhciPort->iLUN)); Log(a); } while(0)
 # endif
 
-#elif IN_RING0
+#elif defined(IN_RING0)
 
 # ifdef LOG_USE_C99
 #  define ahciLog(a) \
@@ -997,7 +995,7 @@ RT_C_DECLS_END
      do { Log(("R0 P%u: ", pAhciPort->iLUN)); Log(a); } while(0)
 # endif
 
-#elif IN_RC
+#elif defined(IN_RC)
 
 # ifdef LOG_USE_C99
 #  define ahciLog(a) \
@@ -1069,11 +1067,13 @@ static int ahciHbaSetInterrupt(PAHCI pAhci, uint8_t iPort, int rcBusy)
 }
 
 #ifdef IN_RING3
+
 /*
  * Assert irq when an CCC timeout occurs
  */
 static DECLCALLBACK(void) ahciCccTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
 {
+    RT_NOREF(pDevIns, pTimer);
     PAHCI pAhci = (PAHCI)pvUser;
 
     int rc = ahciHbaSetInterrupt(pAhci, pAhci->uCccPortNr, VERR_IGNORED);
@@ -1090,7 +1090,7 @@ static void ahciPortResetFinish(PAHCIPort pAhciPort)
 {
     /* Cancel all tasks first. */
     bool fAllTasksCanceled = ahciCancelActiveTasks(pAhciPort, NULL);
-    Assert(fAllTasksCanceled);
+    Assert(fAllTasksCanceled); NOREF(fAllTasksCanceled);
 
     /* Signature for SATA device. */
     if (pAhciPort->fATAPI)
@@ -1136,7 +1136,8 @@ static void ahciPortResetFinish(PAHCIPort pAhciPort)
 
     ASMAtomicXchgBool(&pAhciPort->fPortReset, false);
 }
-#endif
+
+#endif /* IN_RING3 */
 
 /**
  * Kicks the I/O thread from RC or R0.
@@ -1163,14 +1164,13 @@ static void ahciIoThreadKick(PAHCI pAhci, PAHCIPort pAhciPort)
 #endif
 }
 
-static int PortCmdIssue_w(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t u32Value)
+static int PortCmdIssue_w(PAHCI pAhci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t u32Value)
 {
-    uint32_t uCIValue;
-
+    RT_NOREF1(iReg);
     ahciLog(("%s: write u32Value=%#010x\n", __FUNCTION__, u32Value));
 
     /* Update the CI register first. */
-    uCIValue = ASMAtomicXchgU32(&pAhciPort->u32TasksFinished, 0);
+    uint32_t uCIValue = ASMAtomicXchgU32(&pAhciPort->u32TasksFinished, 0);
     pAhciPort->regCI &= ~uCIValue;
 
     if (   (pAhciPort->regCMD & AHCI_PORT_CMD_CR)
@@ -1186,7 +1186,7 @@ static int PortCmdIssue_w(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32
 
         /* Send a notification to R3 if u32TasksNew was 0 before our write. */
         if (ASMAtomicReadBool(&pAhciPort->fWrkThreadSleeping))
-            ahciIoThreadKick(ahci, pAhciPort);
+            ahciIoThreadKick(pAhci, pAhciPort);
     }
 
     pAhciPort->regCI |= u32Value;
@@ -1194,23 +1194,22 @@ static int PortCmdIssue_w(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32
     return VINF_SUCCESS;
 }
 
-static int PortCmdIssue_r(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value)
+static int PortCmdIssue_r(PAHCI pAhci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value)
 {
-    uint32_t uCIValue = 0;
-
-    uCIValue = ASMAtomicXchgU32(&pAhciPort->u32TasksFinished, 0);
+    RT_NOREF2(pAhci, iReg);
 
+    uint32_t uCIValue = ASMAtomicXchgU32(&pAhciPort->u32TasksFinished, 0);
     ahciLog(("%s: read regCI=%#010x uCIValue=%#010x\n", __FUNCTION__, pAhciPort->regCI, uCIValue));
 
     pAhciPort->regCI &= ~uCIValue;
-
     *pu32Value = pAhciPort->regCI;
 
     return VINF_SUCCESS;
 }
 
-static int PortSActive_w(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t u32Value)
+static int PortSActive_w(PAHCI pAhci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t u32Value)
 {
+    RT_NOREF2(pAhci, iReg);
     ahciLog(("%s: write u32Value=%#010x\n", __FUNCTION__, u32Value));
 
     pAhciPort->regSACT |= u32Value;
@@ -1218,10 +1217,11 @@ static int PortSActive_w(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_
     return VINF_SUCCESS;
 }
 
-static int PortSActive_r(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value)
+static int PortSActive_r(PAHCI pAhci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value)
 {
-    uint32_t u32TasksFinished = ASMAtomicXchgU32(&pAhciPort->u32QueuedTasksFinished, 0);
+    RT_NOREF2(pAhci, iReg);
 
+    uint32_t u32TasksFinished = ASMAtomicXchgU32(&pAhciPort->u32QueuedTasksFinished, 0);
     pAhciPort->regSACT &= ~u32TasksFinished;
 
     ahciLog(("%s: read regSACT=%#010x regCI=%#010x u32TasksFinished=%#010x\n",
@@ -1232,8 +1232,9 @@ static int PortSActive_r(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_
     return VINF_SUCCESS;
 }
 
-static int PortSError_w(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t u32Value)
+static int PortSError_w(PAHCI pAhci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t u32Value)
 {
+    RT_NOREF2(pAhci, iReg);
     ahciLog(("%s: write u32Value=%#010x\n", __FUNCTION__, u32Value));
 
     if (   (u32Value & AHCI_PORT_SERR_X)
@@ -1253,30 +1254,33 @@ static int PortSError_w(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t
     return VINF_SUCCESS;
 }
 
-static int PortSError_r(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value)
+static int PortSError_r(PAHCI pAhci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value)
 {
+    RT_NOREF2(pAhci, iReg);
     ahciLog(("%s: read regSERR=%#010x\n", __FUNCTION__, pAhciPort->regSERR));
     *pu32Value = pAhciPort->regSERR;
     return VINF_SUCCESS;
 }
 
-static int PortSControl_w(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t u32Value)
+static int PortSControl_w(PAHCI pAhci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t u32Value)
 {
+    RT_NOREF2(pAhci, iReg);
     ahciLog(("%s: write u32Value=%#010x\n", __FUNCTION__, u32Value));
     ahciLog(("%s: IPM=%d SPD=%d DET=%d\n", __FUNCTION__,
              AHCI_PORT_SCTL_IPM_GET(u32Value), AHCI_PORT_SCTL_SPD_GET(u32Value), AHCI_PORT_SCTL_DET_GET(u32Value)));
 
 #ifndef IN_RING3
+    RT_NOREF2(pAhciPort, u32Value);
     return VINF_IOM_R3_MMIO_WRITE;
 #else
     if ((u32Value & AHCI_PORT_SCTL_DET) == AHCI_PORT_SCTL_DET_INIT)
     {
         if (!ASMAtomicXchgBool(&pAhciPort->fPortReset, true))
-            LogRel(("AHCI#%u: Port %d reset\n", ahci->CTX_SUFF(pDevIns)->iInstance,
+            LogRel(("AHCI#%u: Port %d reset\n", pAhci->CTX_SUFF(pDevIns)->iInstance,
                     pAhciPort->iLUN));
 
         pAhciPort->regSSTS = 0;
-        pAhciPort->regSIG  = ~0;
+        pAhciPort->regSIG  = UINT32_MAX;
         pAhciPort->regTFD  = 0x7f;
         pAhciPort->fFirstD2HFisSend = false;
         pAhciPort->regSCTL = u32Value;
@@ -1286,7 +1290,7 @@ static int PortSControl_w(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32
              && pAhciPort->pDrvBase)
     {
         /* Do the port reset here, so the guest sees the new status immediately. */
-        if (ahci->fLegacyPortResetMethod)
+        if (pAhci->fLegacyPortResetMethod)
         {
             ahciPortResetFinish(pAhciPort);
             pAhciPort->regSCTL = u32Value; /* Update after finishing the reset, so the I/O thread doesn't get a chance to do the reset. */
@@ -1297,7 +1301,7 @@ static int PortSControl_w(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32
             pAhciPort->regSCTL = u32Value;  /* Update before kicking the I/O thread. */
 
             /* Kick the thread to finish the reset. */
-            ahciIoThreadKick(ahci, pAhciPort);
+            ahciIoThreadKick(pAhci, pAhciPort);
         }
     }
     else /* Just update the value if there is no device attached. */
@@ -1307,8 +1311,9 @@ static int PortSControl_w(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32
 #endif
 }
 
-static int PortSControl_r(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value)
+static int PortSControl_r(PAHCI pAhci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value)
 {
+    RT_NOREF2(pAhci, iReg);
     ahciLog(("%s: read regSCTL=%#010x\n", __FUNCTION__, pAhciPort->regSCTL));
     ahciLog(("%s: IPM=%d SPD=%d DET=%d\n", __FUNCTION__,
              AHCI_PORT_SCTL_IPM_GET(pAhciPort->regSCTL), AHCI_PORT_SCTL_SPD_GET(pAhciPort->regSCTL),
@@ -1318,8 +1323,9 @@ static int PortSControl_r(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32
     return VINF_SUCCESS;
 }
 
-static int PortSStatus_r(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value)
+static int PortSStatus_r(PAHCI pAhci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value)
 {
+    RT_NOREF2(pAhci, iReg);
     ahciLog(("%s: read regSSTS=%#010x\n", __FUNCTION__, pAhciPort->regSSTS));
     ahciLog(("%s: IPM=%d SPD=%d DET=%d\n", __FUNCTION__,
              AHCI_PORT_SSTS_IPM_GET(pAhciPort->regSSTS), AHCI_PORT_SSTS_SPD_GET(pAhciPort->regSSTS),
@@ -1329,15 +1335,17 @@ static int PortSStatus_r(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_
     return VINF_SUCCESS;
 }
 
-static int PortSignature_r(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value)
+static int PortSignature_r(PAHCI pAhci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value)
 {
+    RT_NOREF2(pAhci, iReg);
     ahciLog(("%s: read regSIG=%#010x\n", __FUNCTION__, pAhciPort->regSIG));
     *pu32Value = pAhciPort->regSIG;
     return VINF_SUCCESS;
 }
 
-static int PortTaskFileData_r(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value)
+static int PortTaskFileData_r(PAHCI pAhci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value)
 {
+    RT_NOREF2(pAhci, iReg);
     ahciLog(("%s: read regTFD=%#010x\n", __FUNCTION__, pAhciPort->regTFD));
     ahciLog(("%s: ERR=%x BSY=%d DRQ=%d ERR=%d\n", __FUNCTION__,
              (pAhciPort->regTFD >> 8), (pAhciPort->regTFD & AHCI_PORT_TFD_BSY) >> 7,
@@ -1349,8 +1357,9 @@ static int PortTaskFileData_r(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, ui
 /**
  * Read from the port command register.
  */
-static int PortCmd_r(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value)
+static int PortCmd_r(PAHCI pAhci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value)
 {
+    RT_NOREF2(pAhci, iReg);
     ahciLog(("%s: read regCMD=%#010x\n", __FUNCTION__, pAhciPort->regCMD | AHCI_PORT_CMD_CCS_SHIFT(pAhciPort->u32CurrentCommandSlot)));
     ahciLog(("%s: ICC=%d ASP=%d ALPE=%d DLAE=%d ATAPI=%d CPD=%d ISP=%d HPCP=%d PMA=%d CPS=%d CR=%d FR=%d ISS=%d CCS=%d FRE=%d CLO=%d POD=%d SUD=%d ST=%d\n",
              __FUNCTION__, (pAhciPort->regCMD & AHCI_PORT_CMD_ICC) >> 28, (pAhciPort->regCMD & AHCI_PORT_CMD_ASP) >> 27,
@@ -1371,8 +1380,9 @@ static int PortCmd_r(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *p
  * Write to the port command register.
  * This is the register where all the data transfer is started
  */
-static int PortCmd_w(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t u32Value)
+static int PortCmd_w(PAHCI pAhci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t u32Value)
 {
+    RT_NOREF1(iReg);
     ahciLog(("%s: write u32Value=%#010x\n", __FUNCTION__, u32Value));
     ahciLog(("%s: ICC=%d ASP=%d ALPE=%d DLAE=%d ATAPI=%d CPD=%d ISP=%d HPCP=%d PMA=%d CPS=%d CR=%d FR=%d ISS=%d CCS=%d FRE=%d CLO=%d POD=%d SUD=%d ST=%d\n",
              __FUNCTION__, (u32Value & AHCI_PORT_CMD_ICC) >> 28, (u32Value & AHCI_PORT_CMD_ASP) >> 27,
@@ -1417,14 +1427,14 @@ static int PortCmd_w(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t u3
                 {
                     ASMAtomicOrU32(&pAhciPort->u32TasksNew, pAhciPort->regCI);
 #ifdef IN_RC
-                    PDEVPORTNOTIFIERQUEUEITEM pItem = (PDEVPORTNOTIFIERQUEUEITEM)PDMQueueAlloc(ahci->CTX_SUFF(pNotifierQueue));
+                    PDEVPORTNOTIFIERQUEUEITEM pItem = (PDEVPORTNOTIFIERQUEUEITEM)PDMQueueAlloc(pAhci->CTX_SUFF(pNotifierQueue));
                     AssertMsg(VALID_PTR(pItem), ("Allocating item for queue failed\n"));
 
                     pItem->iPort = pAhciPort->iLUN;
-                    PDMQueueInsert(ahci->CTX_SUFF(pNotifierQueue), (PPDMQUEUEITEMCORE)pItem);
+                    PDMQueueInsert(pAhci->CTX_SUFF(pNotifierQueue), (PPDMQUEUEITEMCORE)pItem);
 #else
                     LogFlowFunc(("Signal event semaphore\n"));
-                    int rc = SUPSemEventSignal(ahci->pSupDrvSession, pAhciPort->hEvtProcess);
+                    int rc = SUPSemEventSignal(pAhci->pSupDrvSession, pAhciPort->hEvtProcess);
                     AssertRC(rc);
 #endif
                 }
@@ -1517,8 +1527,9 @@ static int PortCmd_w(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t u3
 /**
  * Read from the port interrupt enable register.
  */
-static int PortIntrEnable_r(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value)
+static int PortIntrEnable_r(PAHCI pAhci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value)
 {
+    RT_NOREF2(pAhci, iReg);
     ahciLog(("%s: read regIE=%#010x\n", __FUNCTION__, pAhciPort->regIE));
     ahciLog(("%s: CPDE=%d TFEE=%d HBFE=%d HBDE=%d IFE=%d INFE=%d OFE=%d IPME=%d PRCE=%d DIE=%d PCE=%d DPE=%d UFE=%d SDBE=%d DSE=%d PSE=%d DHRE=%d\n",
              __FUNCTION__, (pAhciPort->regIE & AHCI_PORT_IE_CPDE) >> 31, (pAhciPort->regIE & AHCI_PORT_IE_TFEE) >> 30,
@@ -1537,9 +1548,9 @@ static int PortIntrEnable_r(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint
 /**
  * Write to the port interrupt enable register.
  */
-static int PortIntrEnable_w(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t u32Value)
+static int PortIntrEnable_w(PAHCI pAhci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t u32Value)
 {
-    int rc = VINF_SUCCESS;
+    RT_NOREF1(iReg);
     ahciLog(("%s: write u32Value=%#010x\n", __FUNCTION__, u32Value));
     ahciLog(("%s: CPDE=%d TFEE=%d HBFE=%d HBDE=%d IFE=%d INFE=%d OFE=%d IPME=%d PRCE=%d DIE=%d PCE=%d DPE=%d UFE=%d SDBE=%d DSE=%d PSE=%d DHRE=%d\n",
              __FUNCTION__, (u32Value & AHCI_PORT_IE_CPDE) >> 31, (u32Value & AHCI_PORT_IE_TFEE) >> 30,
@@ -1557,8 +1568,9 @@ static int PortIntrEnable_w(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint
     /* Check if some a interrupt status bit changed*/
     uint32_t u32IntrStatus = ASMAtomicReadU32(&pAhciPort->regIS);
 
+    int rc = VINF_SUCCESS;
     if (u32Value & u32IntrStatus)
-        rc = ahciHbaSetInterrupt(ahci, pAhciPort->iLUN, VINF_IOM_R3_MMIO_WRITE);
+        rc = ahciHbaSetInterrupt(pAhci, pAhciPort->iLUN, VINF_IOM_R3_MMIO_WRITE);
 
     if (rc == VINF_SUCCESS)
         pAhciPort->regIE = u32Value;
@@ -1569,8 +1581,9 @@ static int PortIntrEnable_w(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint
 /**
  * Read from the port interrupt status register.
  */
-static int PortIntrSts_r(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value)
+static int PortIntrSts_r(PAHCI pAhci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value)
 {
+    RT_NOREF2(pAhci, iReg);
     ahciLog(("%s: read regIS=%#010x\n", __FUNCTION__, pAhciPort->regIS));
     ahciLog(("%s: CPDS=%d TFES=%d HBFS=%d HBDS=%d IFS=%d INFS=%d OFS=%d IPMS=%d PRCS=%d DIS=%d PCS=%d DPS=%d UFS=%d SDBS=%d DSS=%d PSS=%d DHRS=%d\n",
              __FUNCTION__, (pAhciPort->regIS & AHCI_PORT_IS_CPDS) >> 31, (pAhciPort->regIS & AHCI_PORT_IS_TFES) >> 30,
@@ -1589,8 +1602,9 @@ static int PortIntrSts_r(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_
 /**
  * Write to the port interrupt status register.
  */
-static int PortIntrSts_w(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t u32Value)
+static int PortIntrSts_w(PAHCI pAhci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t u32Value)
 {
+    RT_NOREF2(pAhci, iReg);
     ahciLog(("%s: write u32Value=%#010x\n", __FUNCTION__, u32Value));
     ASMAtomicAndU32(&pAhciPort->regIS, ~(u32Value & AHCI_PORT_IS_READONLY));
 
@@ -1600,8 +1614,9 @@ static int PortIntrSts_w(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_
 /**
  * Read from the port FIS base address upper 32bit register.
  */
-static int PortFisAddrUp_r(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value)
+static int PortFisAddrUp_r(PAHCI pAhci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value)
 {
+    RT_NOREF2(pAhci, iReg);
     ahciLog(("%s: read regFBU=%#010x\n", __FUNCTION__, pAhciPort->regFBU));
     *pu32Value = pAhciPort->regFBU;
     return VINF_SUCCESS;
@@ -1610,8 +1625,9 @@ static int PortFisAddrUp_r(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint3
 /**
  * Write to the port FIS base address upper 32bit register.
  */
-static int PortFisAddrUp_w(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t u32Value)
+static int PortFisAddrUp_w(PAHCI pAhci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t u32Value)
 {
+    RT_NOREF2(pAhci, iReg);
     ahciLog(("%s: write u32Value=%#010x\n", __FUNCTION__, u32Value));
 
     pAhciPort->regFBU = u32Value;
@@ -1623,8 +1639,9 @@ static int PortFisAddrUp_w(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint3
 /**
  * Read from the port FIS base address register.
  */
-static int PortFisAddr_r(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value)
+static int PortFisAddr_r(PAHCI pAhci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value)
 {
+    RT_NOREF2(pAhci, iReg);
     ahciLog(("%s: read regFB=%#010x\n", __FUNCTION__, pAhciPort->regFB));
     *pu32Value = pAhciPort->regFB;
     return VINF_SUCCESS;
@@ -1633,8 +1650,9 @@ static int PortFisAddr_r(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_
 /**
  * Write to the port FIS base address register.
  */
-static int PortFisAddr_w(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t u32Value)
+static int PortFisAddr_w(PAHCI pAhci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t u32Value)
 {
+    RT_NOREF2(pAhci, iReg);
     ahciLog(("%s: write u32Value=%#010x\n", __FUNCTION__, u32Value));
 
     Assert(!(u32Value & ~AHCI_PORT_FB_RESERVED));
@@ -1648,8 +1666,9 @@ static int PortFisAddr_w(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_
 /**
  * Write to the port command list base address upper 32bit register.
  */
-static int PortCmdLstAddrUp_w(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t u32Value)
+static int PortCmdLstAddrUp_w(PAHCI pAhci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t u32Value)
 {
+    RT_NOREF2(pAhci, iReg);
     ahciLog(("%s: write u32Value=%#010x\n", __FUNCTION__, u32Value));
 
     pAhciPort->regCLBU = u32Value;
@@ -1661,8 +1680,9 @@ static int PortCmdLstAddrUp_w(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, ui
 /**
  * Read from the port command list base address upper 32bit register.
  */
-static int PortCmdLstAddrUp_r(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value)
+static int PortCmdLstAddrUp_r(PAHCI pAhci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value)
 {
+    RT_NOREF2(pAhci, iReg);
     ahciLog(("%s: read regCLBU=%#010x\n", __FUNCTION__, pAhciPort->regCLBU));
     *pu32Value = pAhciPort->regCLBU;
     return VINF_SUCCESS;
@@ -1671,8 +1691,9 @@ static int PortCmdLstAddrUp_r(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, ui
 /**
  * Read from the port command list base address register.
  */
-static int PortCmdLstAddr_r(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value)
+static int PortCmdLstAddr_r(PAHCI pAhci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value)
 {
+    RT_NOREF2(pAhci, iReg);
     ahciLog(("%s: read regCLB=%#010x\n", __FUNCTION__, pAhciPort->regCLB));
     *pu32Value = pAhciPort->regCLB;
     return VINF_SUCCESS;
@@ -1681,8 +1702,9 @@ static int PortCmdLstAddr_r(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint
 /**
  * Write to the port command list base address register.
  */
-static int PortCmdLstAddr_w(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t u32Value)
+static int PortCmdLstAddr_w(PAHCI pAhci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t u32Value)
 {
+    RT_NOREF2(pAhci, iReg);
     ahciLog(("%s: write u32Value=%#010x\n", __FUNCTION__, u32Value));
 
     Assert(!(u32Value & ~AHCI_PORT_CLB_RESERVED));
@@ -1696,44 +1718,46 @@ static int PortCmdLstAddr_w(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint
 /**
  * Read from the global Version register.
  */
-static int HbaVersion_r(PAHCI ahci, uint32_t iReg, uint32_t *pu32Value)
+static int HbaVersion_r(PAHCI pAhci, uint32_t iReg, uint32_t *pu32Value)
 {
-    Log(("%s: read regHbaVs=%#010x\n", __FUNCTION__, ahci->regHbaVs));
-    *pu32Value = ahci->regHbaVs;
+    RT_NOREF1(iReg);
+    Log(("%s: read regHbaVs=%#010x\n", __FUNCTION__, pAhci->regHbaVs));
+    *pu32Value = pAhci->regHbaVs;
     return VINF_SUCCESS;
 }
 
 /**
  * Read from the global Ports implemented register.
  */
-static int HbaPortsImplemented_r(PAHCI ahci, uint32_t iReg, uint32_t *pu32Value)
+static int HbaPortsImplemented_r(PAHCI pAhci, uint32_t iReg, uint32_t *pu32Value)
 {
-    Log(("%s: read regHbaPi=%#010x\n", __FUNCTION__, ahci->regHbaPi));
-    *pu32Value = ahci->regHbaPi;
+    RT_NOREF1(iReg);
+    Log(("%s: read regHbaPi=%#010x\n", __FUNCTION__, pAhci->regHbaPi));
+    *pu32Value = pAhci->regHbaPi;
     return VINF_SUCCESS;
 }
 
 /**
  * Write to the global interrupt status register.
  */
-static int HbaInterruptStatus_w(PAHCI ahci, uint32_t iReg, uint32_t u32Value)
+static int HbaInterruptStatus_w(PAHCI pAhci, uint32_t iReg, uint32_t u32Value)
 {
-    int rc;
+    RT_NOREF1(iReg);
     Log(("%s: write u32Value=%#010x\n", __FUNCTION__, u32Value));
 
-    rc = PDMCritSectEnter(&ahci->lock, VINF_IOM_R3_MMIO_WRITE);
+    int rc = PDMCritSectEnter(&pAhci->lock, VINF_IOM_R3_MMIO_WRITE);
     if (rc != VINF_SUCCESS)
         return rc;
 
-    ahci->regHbaIs &= ~(u32Value);
+    pAhci->regHbaIs &= ~(u32Value);
 
     /*
      * Update interrupt status register and check for ports who
      * set the interrupt inbetween.
      */
     bool fClear = true;
-    ahci->regHbaIs |= ASMAtomicXchgU32(&ahci->u32PortsInterrupted, 0);
-    if (!ahci->regHbaIs)
+    pAhci->regHbaIs |= ASMAtomicXchgU32(&pAhci->u32PortsInterrupted, 0);
+    if (!pAhci->regHbaIs)
     {
         unsigned i = 0;
 
@@ -1742,12 +1766,12 @@ static int HbaInterruptStatus_w(PAHCI ahci, uint32_t iReg, uint32_t u32Value)
         {
             if (u32Value & 0x01)
             {
-                PAHCIPort pAhciPort = &ahci->ahciPort[i];
+                PAHCIPort pAhciPort = &pAhci->ahciPort[i];
 
                 if (pAhciPort->regIE & pAhciPort->regIS)
                 {
                     Log(("%s: Interrupt status of port %u set -> Set interrupt again\n", __FUNCTION__, i));
-                    ASMAtomicOrU32(&ahci->u32PortsInterrupted, 1 << i);
+                    ASMAtomicOrU32(&pAhci->u32PortsInterrupted, 1 << i);
                     fClear = false;
                     break;
                 }
@@ -1760,54 +1784,53 @@ static int HbaInterruptStatus_w(PAHCI ahci, uint32_t iReg, uint32_t u32Value)
         fClear = false;
 
     if (fClear)
-        ahciHbaClearInterrupt(ahci);
+        ahciHbaClearInterrupt(pAhci);
     else
     {
-        Log(("%s: Not clearing interrupt: u32PortsInterrupted=%#010x\n", __FUNCTION__, ahci->u32PortsInterrupted));
+        Log(("%s: Not clearing interrupt: u32PortsInterrupted=%#010x\n", __FUNCTION__, pAhci->u32PortsInterrupted));
         /*
          * We need to set the interrupt again because the I/O APIC does not set it again even if the
          * line is still high.
          * We need to clear it first because the PCI bus only calls the interrupt controller if the state changes.
          */
-        PDMDevHlpPCISetIrq(ahci->CTX_SUFF(pDevIns), 0, 0);
-        PDMDevHlpPCISetIrq(ahci->CTX_SUFF(pDevIns), 0, 1);
+        PDMDevHlpPCISetIrq(pAhci->CTX_SUFF(pDevIns), 0, 0);
+        PDMDevHlpPCISetIrq(pAhci->CTX_SUFF(pDevIns), 0, 1);
     }
 
-    PDMCritSectLeave(&ahci->lock);
+    PDMCritSectLeave(&pAhci->lock);
     return VINF_SUCCESS;
 }
 
 /**
  * Read from the global interrupt status register.
  */
-static int HbaInterruptStatus_r(PAHCI ahci, uint32_t iReg, uint32_t *pu32Value)
+static int HbaInterruptStatus_r(PAHCI pAhci, uint32_t iReg, uint32_t *pu32Value)
 {
-    uint32_t u32PortsInterrupted;
-    int rc;
+    RT_NOREF1(iReg);
 
-    rc = PDMCritSectEnter(&ahci->lock, VINF_IOM_R3_MMIO_READ);
+    int rc = PDMCritSectEnter(&pAhci->lock, VINF_IOM_R3_MMIO_READ);
     if (rc != VINF_SUCCESS)
         return rc;
 
-    u32PortsInterrupted = ASMAtomicXchgU32(&ahci->u32PortsInterrupted, 0);
+    uint32_t u32PortsInterrupted = ASMAtomicXchgU32(&pAhci->u32PortsInterrupted, 0);
 
-    PDMCritSectLeave(&ahci->lock);
-    Log(("%s: read regHbaIs=%#010x u32PortsInterrupted=%#010x\n", __FUNCTION__, ahci->regHbaIs, u32PortsInterrupted));
+    PDMCritSectLeave(&pAhci->lock);
+    Log(("%s: read regHbaIs=%#010x u32PortsInterrupted=%#010x\n", __FUNCTION__, pAhci->regHbaIs, u32PortsInterrupted));
 
-    ahci->regHbaIs |= u32PortsInterrupted;
+    pAhci->regHbaIs |= u32PortsInterrupted;
 
 #ifdef LOG_ENABLED
     Log(("%s:", __FUNCTION__));
     unsigned i;
-    for (i = 0; i < ahci->cPortsImpl; i++)
+    for (i = 0; i < pAhci->cPortsImpl; i++)
     {
-        if ((ahci->regHbaIs >> i) & 0x01)
+        if ((pAhci->regHbaIs >> i) & 0x01)
             Log((" P%d", i));
     }
     Log(("\n"));
 #endif
 
-    *pu32Value = ahci->regHbaIs;
+    *pu32Value = pAhci->regHbaIs;
 
     return VINF_SUCCESS;
 }
@@ -1815,8 +1838,9 @@ static int HbaInterruptStatus_r(PAHCI ahci, uint32_t iReg, uint32_t *pu32Value)
 /**
  * Write to the global control register.
  */
-static int HbaControl_w(PAHCI ahci, uint32_t iReg, uint32_t u32Value)
+static int HbaControl_w(PAHCI pAhci, uint32_t iReg, uint32_t u32Value)
 {
+    RT_NOREF1(iReg);
     Log(("%s: write u32Value=%#010x\n"
          "%s: AE=%d IE=%d HR=%d\n",
          __FUNCTION__, u32Value,
@@ -1824,23 +1848,24 @@ static int HbaControl_w(PAHCI ahci, uint32_t iReg, uint32_t u32Value)
          (u32Value & AHCI_HBA_CTRL_HR)));
 
 #ifndef IN_RING3
+    RT_NOREF2(pAhci, u32Value);
     return VINF_IOM_R3_MMIO_WRITE;
 #else
     /*
      * Increase the active thread counter because we might set the host controller
      * reset bit.
      */
-    ASMAtomicIncU32(&ahci->cThreadsActive);
-    ASMAtomicWriteU32(&ahci->regHbaCtrl, (u32Value & AHCI_HBA_CTRL_RW_MASK) | AHCI_HBA_CTRL_AE);
+    ASMAtomicIncU32(&pAhci->cThreadsActive);
+    ASMAtomicWriteU32(&pAhci->regHbaCtrl, (u32Value & AHCI_HBA_CTRL_RW_MASK) | AHCI_HBA_CTRL_AE);
 
     /*
      * Do the HBA reset if requested and there is no other active thread at the moment,
      * the work is deferred to the last active thread otherwise.
      */
-    uint32_t cThreadsActive = ASMAtomicDecU32(&ahci->cThreadsActive);
+    uint32_t cThreadsActive = ASMAtomicDecU32(&pAhci->cThreadsActive);
     if (   (u32Value & AHCI_HBA_CTRL_HR)
         && !cThreadsActive)
-        ahciHBAReset(ahci);
+        ahciHBAReset(pAhci);
 
     return VINF_SUCCESS;
 #endif
@@ -1849,62 +1874,60 @@ static int HbaControl_w(PAHCI ahci, uint32_t iReg, uint32_t u32Value)
 /**
  * Read the global control register.
  */
-static int HbaControl_r(PAHCI ahci, uint32_t iReg, uint32_t *pu32Value)
+static int HbaControl_r(PAHCI pAhci, uint32_t iReg, uint32_t *pu32Value)
 {
+    RT_NOREF1(iReg);
     Log(("%s: read regHbaCtrl=%#010x\n"
          "%s: AE=%d IE=%d HR=%d\n",
-         __FUNCTION__, ahci->regHbaCtrl,
-         __FUNCTION__, (ahci->regHbaCtrl & AHCI_HBA_CTRL_AE) >> 31, (ahci->regHbaCtrl & AHCI_HBA_CTRL_IE) >> 1,
-         (ahci->regHbaCtrl & AHCI_HBA_CTRL_HR)));
-    *pu32Value = ahci->regHbaCtrl;
+         __FUNCTION__, pAhci->regHbaCtrl,
+         __FUNCTION__, (pAhci->regHbaCtrl & AHCI_HBA_CTRL_AE) >> 31, (pAhci->regHbaCtrl & AHCI_HBA_CTRL_IE) >> 1,
+         (pAhci->regHbaCtrl & AHCI_HBA_CTRL_HR)));
+    *pu32Value = pAhci->regHbaCtrl;
     return VINF_SUCCESS;
 }
 
 /**
  * Read the global capabilities register.
  */
-static int HbaCapabilities_r(PAHCI ahci, uint32_t iReg, uint32_t *pu32Value)
+static int HbaCapabilities_r(PAHCI pAhci, uint32_t iReg, uint32_t *pu32Value)
 {
+    RT_NOREF1(iReg);
     Log(("%s: read regHbaCap=%#010x\n"
          "%s: S64A=%d SNCQ=%d SIS=%d SSS=%d SALP=%d SAL=%d SCLO=%d ISS=%d SNZO=%d SAM=%d SPM=%d PMD=%d SSC=%d PSC=%d NCS=%d NP=%d\n",
-          __FUNCTION__, ahci->regHbaCap,
-          __FUNCTION__, (ahci->regHbaCap & AHCI_HBA_CAP_S64A) >> 31, (ahci->regHbaCap & AHCI_HBA_CAP_SNCQ) >> 30,
-          (ahci->regHbaCap & AHCI_HBA_CAP_SIS) >> 28, (ahci->regHbaCap & AHCI_HBA_CAP_SSS) >> 27,
-          (ahci->regHbaCap & AHCI_HBA_CAP_SALP) >> 26, (ahci->regHbaCap & AHCI_HBA_CAP_SAL) >> 25,
-          (ahci->regHbaCap & AHCI_HBA_CAP_SCLO) >> 24, (ahci->regHbaCap & AHCI_HBA_CAP_ISS) >> 20,
-          (ahci->regHbaCap & AHCI_HBA_CAP_SNZO) >> 19, (ahci->regHbaCap & AHCI_HBA_CAP_SAM) >> 18,
-          (ahci->regHbaCap & AHCI_HBA_CAP_SPM) >> 17, (ahci->regHbaCap & AHCI_HBA_CAP_PMD) >> 15,
-          (ahci->regHbaCap & AHCI_HBA_CAP_SSC) >> 14, (ahci->regHbaCap & AHCI_HBA_CAP_PSC) >> 13,
-          (ahci->regHbaCap & AHCI_HBA_CAP_NCS) >> 8, (ahci->regHbaCap & AHCI_HBA_CAP_NP)));
-    *pu32Value = ahci->regHbaCap;
+          __FUNCTION__, pAhci->regHbaCap,
+          __FUNCTION__, (pAhci->regHbaCap & AHCI_HBA_CAP_S64A) >> 31, (pAhci->regHbaCap & AHCI_HBA_CAP_SNCQ) >> 30,
+          (pAhci->regHbaCap & AHCI_HBA_CAP_SIS) >> 28, (pAhci->regHbaCap & AHCI_HBA_CAP_SSS) >> 27,
+          (pAhci->regHbaCap & AHCI_HBA_CAP_SALP) >> 26, (pAhci->regHbaCap & AHCI_HBA_CAP_SAL) >> 25,
+          (pAhci->regHbaCap & AHCI_HBA_CAP_SCLO) >> 24, (pAhci->regHbaCap & AHCI_HBA_CAP_ISS) >> 20,
+          (pAhci->regHbaCap & AHCI_HBA_CAP_SNZO) >> 19, (pAhci->regHbaCap & AHCI_HBA_CAP_SAM) >> 18,
+          (pAhci->regHbaCap & AHCI_HBA_CAP_SPM) >> 17, (pAhci->regHbaCap & AHCI_HBA_CAP_PMD) >> 15,
+          (pAhci->regHbaCap & AHCI_HBA_CAP_SSC) >> 14, (pAhci->regHbaCap & AHCI_HBA_CAP_PSC) >> 13,
+          (pAhci->regHbaCap & AHCI_HBA_CAP_NCS) >> 8, (pAhci->regHbaCap & AHCI_HBA_CAP_NP)));
+    *pu32Value = pAhci->regHbaCap;
     return VINF_SUCCESS;
 }
 
 /**
  * Write to the global command completion coalescing control register.
  */
-static int HbaCccCtl_w(PAHCI ahci, uint32_t iReg, uint32_t u32Value)
+static int HbaCccCtl_w(PAHCI pAhci, uint32_t iReg, uint32_t u32Value)
 {
+    RT_NOREF1(iReg);
     Log(("%s: write u32Value=%#010x\n"
          "%s: TV=%d CC=%d INT=%d EN=%d\n",
          __FUNCTION__, u32Value,
          __FUNCTION__, AHCI_HBA_CCC_CTL_TV_GET(u32Value), AHCI_HBA_CCC_CTL_CC_GET(u32Value),
          AHCI_HBA_CCC_CTL_INT_GET(u32Value), (u32Value & AHCI_HBA_CCC_CTL_EN)));
 
-    ahci->regHbaCccCtl = u32Value;
-    ahci->uCccTimeout  = AHCI_HBA_CCC_CTL_TV_GET(u32Value);
-    ahci->uCccPortNr   = AHCI_HBA_CCC_CTL_INT_GET(u32Value);
-    ahci->uCccNr       = AHCI_HBA_CCC_CTL_CC_GET(u32Value);
+    pAhci->regHbaCccCtl = u32Value;
+    pAhci->uCccTimeout  = AHCI_HBA_CCC_CTL_TV_GET(u32Value);
+    pAhci->uCccPortNr   = AHCI_HBA_CCC_CTL_INT_GET(u32Value);
+    pAhci->uCccNr       = AHCI_HBA_CCC_CTL_CC_GET(u32Value);
 
     if (u32Value & AHCI_HBA_CCC_CTL_EN)
-    {
-        /* Arm the timer */
-        TMTimerSetMillies(ahci->CTX_SUFF(pHbaCccTimer), ahci->uCccTimeout);
-    }
+        TMTimerSetMillies(pAhci->CTX_SUFF(pHbaCccTimer), pAhci->uCccTimeout); /* Arm the timer */
     else
-    {
-        TMTimerStop(ahci->CTX_SUFF(pHbaCccTimer));
-    }
+        TMTimerStop(pAhci->CTX_SUFF(pHbaCccTimer));
 
     return VINF_SUCCESS;
 }
@@ -1912,25 +1935,27 @@ static int HbaCccCtl_w(PAHCI ahci, uint32_t iReg, uint32_t u32Value)
 /**
  * Read the global command completion coalescing control register.
  */
-static int HbaCccCtl_r(PAHCI ahci, uint32_t iReg, uint32_t *pu32Value)
+static int HbaCccCtl_r(PAHCI pAhci, uint32_t iReg, uint32_t *pu32Value)
 {
+    RT_NOREF1(iReg);
     Log(("%s: read regHbaCccCtl=%#010x\n"
          "%s: TV=%d CC=%d INT=%d EN=%d\n",
-         __FUNCTION__, ahci->regHbaCccCtl,
-         __FUNCTION__, AHCI_HBA_CCC_CTL_TV_GET(ahci->regHbaCccCtl), AHCI_HBA_CCC_CTL_CC_GET(ahci->regHbaCccCtl),
-         AHCI_HBA_CCC_CTL_INT_GET(ahci->regHbaCccCtl), (ahci->regHbaCccCtl & AHCI_HBA_CCC_CTL_EN)));
-    *pu32Value = ahci->regHbaCccCtl;
+         __FUNCTION__, pAhci->regHbaCccCtl,
+         __FUNCTION__, AHCI_HBA_CCC_CTL_TV_GET(pAhci->regHbaCccCtl), AHCI_HBA_CCC_CTL_CC_GET(pAhci->regHbaCccCtl),
+         AHCI_HBA_CCC_CTL_INT_GET(pAhci->regHbaCccCtl), (pAhci->regHbaCccCtl & AHCI_HBA_CCC_CTL_EN)));
+    *pu32Value = pAhci->regHbaCccCtl;
     return VINF_SUCCESS;
 }
 
 /**
  * Write to the global command completion coalescing ports register.
  */
-static int HbaCccPorts_w(PAHCI ahci, uint32_t iReg, uint32_t u32Value)
+static int HbaCccPorts_w(PAHCI pAhci, uint32_t iReg, uint32_t u32Value)
 {
+    RT_NOREF1(iReg);
     Log(("%s: write u32Value=%#010x\n", __FUNCTION__, u32Value));
 
-    ahci->regHbaCccPorts = u32Value;
+    pAhci->regHbaCccPorts = u32Value;
 
     return VINF_SUCCESS;
 }
@@ -1938,30 +1963,32 @@ static int HbaCccPorts_w(PAHCI ahci, uint32_t iReg, uint32_t u32Value)
 /**
  * Read the global command completion coalescing ports register.
  */
-static int HbaCccPorts_r(PAHCI ahci, uint32_t iReg, uint32_t *pu32Value)
+static int HbaCccPorts_r(PAHCI pAhci, uint32_t iReg, uint32_t *pu32Value)
 {
-    Log(("%s: read regHbaCccPorts=%#010x\n", __FUNCTION__, ahci->regHbaCccPorts));
+    RT_NOREF1(iReg);
+    Log(("%s: read regHbaCccPorts=%#010x\n", __FUNCTION__, pAhci->regHbaCccPorts));
 
 #ifdef LOG_ENABLED
     Log(("%s:", __FUNCTION__));
     unsigned i;
-    for (i = 0; i < ahci->cPortsImpl; i++)
+    for (i = 0; i < pAhci->cPortsImpl; i++)
     {
-        if ((ahci->regHbaCccPorts >> i) & 0x01)
+        if ((pAhci->regHbaCccPorts >> i) & 0x01)
             Log((" P%d", i));
     }
     Log(("\n"));
 #endif
 
-    *pu32Value = ahci->regHbaCccPorts;
+    *pu32Value = pAhci->regHbaCccPorts;
     return VINF_SUCCESS;
 }
 
 /**
  * Invalid write to global register
  */
-static int HbaInvalid_w(PAHCI ahci, uint32_t iReg, uint32_t u32Value)
+static int HbaInvalid_w(PAHCI pAhci, uint32_t iReg, uint32_t u32Value)
 {
+    RT_NOREF3(pAhci, iReg, u32Value);
     Log(("%s: Write denied!!! iReg=%u u32Value=%#010x\n", __FUNCTION__, iReg, u32Value));
     return VINF_SUCCESS;
 }
@@ -1969,8 +1996,9 @@ static int HbaInvalid_w(PAHCI ahci, uint32_t iReg, uint32_t u32Value)
 /**
  * Invalid Port write.
  */
-static int PortInvalid_w(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t u32Value)
+static int PortInvalid_w(PAHCI pAhci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t u32Value)
 {
+    RT_NOREF4(pAhci, pAhciPort, iReg, u32Value);
     ahciLog(("%s: Write denied!!! iReg=%u u32Value=%#010x\n", __FUNCTION__, iReg, u32Value));
     return VINF_SUCCESS;
 }
@@ -1978,8 +2006,9 @@ static int PortInvalid_w(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_
 /**
  * Invalid Port read.
  */
-static int PortInvalid_r(PAHCI ahci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value)
+static int PortInvalid_r(PAHCI pAhci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value)
 {
+    RT_NOREF4(pAhci, pAhciPort, iReg, pu32Value);
     ahciLog(("%s: Read denied!!! iReg=%u\n", __FUNCTION__, iReg));
     return VINF_SUCCESS;
 }
@@ -2048,7 +2077,7 @@ static void ahciPortSwReset(PAHCIPort pAhciPort)
         pAhciPort->regCMD |= AHCI_PORT_CMD_HPCP;
 
     pAhciPort->regTFD  = (1 << 8) | ATA_STAT_SEEK | ATA_STAT_WRERR;
-    pAhciPort->regSIG  = ~0;
+    pAhciPort->regSIG  = UINT32_MAX;
     pAhciPort->regSSTS = 0;
     pAhciPort->regSCTL = 0;
     pAhciPort->regSERR = 0;
@@ -2346,8 +2375,8 @@ static int ahciRegisterWrite(PAHCI pAhci, uint32_t offReg, uint32_t u32Value)
 PDMBOTHCBDECL(int) ahciMMIORead(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void *pv, unsigned cb)
 {
     PAHCI pAhci = PDMINS_2_DATA(pDevIns, PAHCI);
-    Log2(("#%d ahciMMIORead: pvUser=%p:{%.*Rhxs} cb=%d GCPhysAddr=%RGp\n",
-          pDevIns->iInstance, pv, cb, pv, cb, GCPhysAddr));
+    Log2(("#%d ahciMMIORead: pvUser=%p:{%.*Rhxs} cb=%d GCPhysAddr=%RGp\n", pDevIns->iInstance, pv, cb, pv, cb, GCPhysAddr));
+    RT_NOREF1(pvUser);
 
     int rc = ahciRegisterRead(pAhci, GCPhysAddr - pAhci->MMIOBase, pv, cb);
 
@@ -2414,12 +2443,14 @@ PDMBOTHCBDECL(int) ahciMMIOWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPh
 
 PDMBOTHCBDECL(int) ahciLegacyFakeWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb)
 {
+    RT_NOREF5(pDevIns, pvUser, Port, u32, cb);
     AssertMsgFailed(("Should not happen\n"));
     return VINF_SUCCESS;
 }
 
 PDMBOTHCBDECL(int) ahciLegacyFakeRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb)
 {
+    RT_NOREF5(pDevIns, pvUser, Port, pu32, cb);
     AssertMsgFailed(("Should not happen\n"));
     return VINF_SUCCESS;
 }
@@ -2439,6 +2470,7 @@ PDMBOTHCBDECL(int) ahciIdxDataWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT P
 {
     PAHCI pAhci = PDMINS_2_DATA(pDevIns, PAHCI);
     int   rc = VINF_SUCCESS;
+    RT_NOREF2(pvUser, cb);
 
     if (Port - pAhci->IOPortBase >= 8)
     {
@@ -2482,6 +2514,7 @@ PDMBOTHCBDECL(int) ahciIdxDataRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Po
 {
     PAHCI pAhci = PDMINS_2_DATA(pDevIns, PAHCI);
     int   rc = VINF_SUCCESS;
+    RT_NOREF1(pvUser);
 
     if (Port - pAhci->IOPortBase >= 8)
     {
@@ -2515,8 +2548,10 @@ PDMBOTHCBDECL(int) ahciIdxDataRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Po
 
 #ifdef IN_RING3
 
-static DECLCALLBACK(int) ahciR3MMIOMap(PPCIDEVICE pPciDev, /*unsigned*/ int iRegion, RTGCPHYS GCPhysAddress, uint32_t cb, PCIADDRESSSPACE enmType)
+static DECLCALLBACK(int)
+ahciR3MMIOMap(PPCIDEVICE pPciDev, /*unsigned*/ int iRegion, RTGCPHYS GCPhysAddress, uint32_t cb, PCIADDRESSSPACE enmType)
 {
+    RT_NOREF(iRegion, enmType);
     PAHCI pThis = PCIDEV_2_PAHCI(pPciDev);
     PPDMDEVINS pDevIns = pPciDev->pDevIns;
     int   rc = VINF_SUCCESS;
@@ -2556,8 +2591,10 @@ static DECLCALLBACK(int) ahciR3MMIOMap(PPCIDEVICE pPciDev, /*unsigned*/ int iReg
 /**
  * Map the legacy I/O port ranges to make Solaris work with the controller.
  */
-static DECLCALLBACK(int) ahciR3LegacyFakeIORangeMap(PPCIDEVICE pPciDev, /*unsigned*/ int iRegion, RTGCPHYS GCPhysAddress, uint32_t cb, PCIADDRESSSPACE enmType)
+static DECLCALLBACK(int)
+ahciR3LegacyFakeIORangeMap(PPCIDEVICE pPciDev, /*unsigned*/ int iRegion, RTGCPHYS GCPhysAddress, uint32_t cb, PCIADDRESSSPACE enmType)
 {
+    RT_NOREF(iRegion, enmType);
     PAHCI pThis = PCIDEV_2_PAHCI(pPciDev);
     PPDMDEVINS pDevIns = pPciDev->pDevIns;
     int   rc = VINF_SUCCESS;
@@ -2594,8 +2631,10 @@ static DECLCALLBACK(int) ahciR3LegacyFakeIORangeMap(PPCIDEVICE pPciDev, /*unsign
 /**
  * Map the BMDMA I/O port range (used for the Index/Data pair register access)
  */
-static DECLCALLBACK(int) ahciR3IdxDataIORangeMap(PPCIDEVICE pPciDev, /*unsigned*/ int iRegion, RTGCPHYS GCPhysAddress, uint32_t cb, PCIADDRESSSPACE enmType)
+static DECLCALLBACK(int)
+ahciR3IdxDataIORangeMap(PPCIDEVICE pPciDev, /*unsigned*/ int iRegion, RTGCPHYS GCPhysAddress, uint32_t cb, PCIADDRESSSPACE enmType)
 {
+    RT_NOREF(iRegion, enmType);
     PAHCI pThis = PCIDEV_2_PAHCI(pPciDev);
     PPDMDEVINS pDevIns = pPciDev->pDevIns;
     int   rc = VINF_SUCCESS;
@@ -3049,10 +3088,7 @@ static uint32_t ataChecksum(void* ptr, size_t count)
 
 static int ahciIdentifySS(PAHCIPort pAhciPort, void *pvBuf)
 {
-    uint16_t *p;
-    int rc = VINF_SUCCESS;
-
-    p = (uint16_t *)pvBuf;
+    uint16_t *p = (uint16_t *)pvBuf;
     memset(p, 0, 512);
     p[0] = RT_H2LE_U16(0x0040);
     p[1] = RT_H2LE_U16(RT_MIN(pAhciPort->PCHSGeometry.cCylinders, 16383));
@@ -3144,7 +3180,7 @@ static int ahciIdentifySS(PAHCIPort pAhciPort, void *pvBuf)
 
     if (   pAhciPort->pDrvMedia->pfnDiscard
         || (   pAhciPort->fAsyncInterface
-            && pAhciPort->pDrvMediaAsync->pfnStartDiscard)) /** @todo: Set bit 14 in word 69 too? (Deterministic read after TRIM). */
+            && pAhciPort->pDrvMediaAsync->pfnStartDiscard)) /** @todo Set bit 14 in word 69 too? (Deterministic read after TRIM). */
         p[169] = RT_H2LE_U16(1); /* DATA SET MANAGEMENT command supported. */
 
     /* The following are SATA specific */
@@ -3267,8 +3303,7 @@ static int atapiIdentifySS(PAHCIREQ pAhciReq, PAHCIPort pAhciPort, size_t cbData
     p[76] = RT_H2LE_U16((1 << 8) | (1 << 2)); /* Native command queuing and Serial ATA Gen2 (3.0 Gbps) speed supported */
 
     /* Copy the buffer in to the scatter gather list. */
-    *pcbData =  ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, (void *)&p[0],
-                                RT_MIN(cbData, sizeof(p)));
+    *pcbData =  ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, (void *)&p[0], RT_MIN(cbData, sizeof(p)));
 
     atapiCmdOK(pAhciPort, pAhciReq);
     return VINF_SUCCESS;
@@ -3282,8 +3317,7 @@ static int atapiReadCapacitySS(PAHCIREQ pAhciReq, PAHCIPort pAhciPort, size_t cb
     ataH2BE_U32(aBuf + 4, 2048);
 
     /* Copy the buffer in to the scatter gather list. */
-    *pcbData = ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, (void *)&aBuf[0],
-                               RT_MIN(cbData, sizeof(aBuf)));
+    *pcbData = ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, (void *)&aBuf[0], RT_MIN(cbData, sizeof(aBuf)));
 
     atapiCmdOK(pAhciPort, pAhciReq);
     return VINF_SUCCESS;
@@ -3310,8 +3344,7 @@ static int atapiReadDiscInformationSS(PAHCIREQ pAhciReq, PAHCIPort pAhciPort, si
     ataH2BE_U32(aBuf + 20, 0x00ffffff); /* last possible start time for lead-out is not available */
 
     /* Copy the buffer in to the scatter gather list. */
-    *pcbData = ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, (void *)&aBuf[0],
-                               RT_MIN(cbData, sizeof(aBuf)));
+    *pcbData = ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, (void *)&aBuf[0], RT_MIN(cbData, sizeof(aBuf)));
 
     atapiCmdOK(pAhciPort, pAhciReq);
     return VINF_SUCCESS;
@@ -3341,14 +3374,13 @@ static int atapiReadTrackInformationSS(PAHCIREQ pAhciReq, PAHCIPort pAhciPort, s
     aBuf[33] = 0; /* session number (MSB) */
 
     /* Copy the buffer in to the scatter gather list. */
-    *pcbData = ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, (void *)&aBuf[0],
-                               RT_MIN(cbData, sizeof(aBuf)));
+    *pcbData = ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, (void *)&aBuf[0], RT_MIN(cbData, sizeof(aBuf)));
 
     atapiCmdOK(pAhciPort, pAhciReq);
     return VINF_SUCCESS;
 }
 
-static size_t atapiGetConfigurationFillFeatureListProfiles(PAHCIPort pAhciPort, uint8_t *pbBuf, size_t cbBuf)
+static size_t atapiGetConfigurationFillFeatureListProfiles(uint8_t *pbBuf, size_t cbBuf)
 {
     if (cbBuf < 3*4)
         return 0;
@@ -3366,7 +3398,7 @@ static size_t atapiGetConfigurationFillFeatureListProfiles(PAHCIPort pAhciPort,
     return 3*4; /* Header + 2 profiles entries */
 }
 
-static size_t atapiGetConfigurationFillFeatureCore(PAHCIPort pAhciPort, uint8_t *pbBuf, size_t cbBuf)
+static size_t atapiGetConfigurationFillFeatureCore(uint8_t *pbBuf, size_t cbBuf)
 {
     if (cbBuf < 12)
         return 0;
@@ -3381,7 +3413,7 @@ static size_t atapiGetConfigurationFillFeatureCore(PAHCIPort pAhciPort, uint8_t
     return 12;
 }
 
-static size_t atapiGetConfigurationFillFeatureMorphing(PAHCIPort pAhciPort, uint8_t *pbBuf, size_t cbBuf)
+static size_t atapiGetConfigurationFillFeatureMorphing(uint8_t *pbBuf, size_t cbBuf)
 {
     if (cbBuf < 8)
         return 0;
@@ -3395,7 +3427,7 @@ static size_t atapiGetConfigurationFillFeatureMorphing(PAHCIPort pAhciPort, uint
     return 8;
 }
 
-static size_t atapiGetConfigurationFillFeatureRemovableMedium(PAHCIPort pAhciPort, uint8_t *pbBuf, size_t cbBuf)
+static size_t atapiGetConfigurationFillFeatureRemovableMedium(uint8_t *pbBuf, size_t cbBuf)
 {
     if (cbBuf < 8)
         return 0;
@@ -3410,7 +3442,7 @@ static size_t atapiGetConfigurationFillFeatureRemovableMedium(PAHCIPort pAhciPor
     return 8;
 }
 
-static size_t atapiGetConfigurationFillFeatureRandomReadable(PAHCIPort pAhciPort, uint8_t *pbBuf, size_t cbBuf)
+static size_t atapiGetConfigurationFillFeatureRandomReadable(uint8_t *pbBuf, size_t cbBuf)
 {
     if (cbBuf < 12)
         return 0;
@@ -3426,7 +3458,7 @@ static size_t atapiGetConfigurationFillFeatureRandomReadable(PAHCIPort pAhciPort
     return 12;
 }
 
-static size_t atapiGetConfigurationFillFeatureCDRead(PAHCIPort pAhciPort, uint8_t *pbBuf, size_t cbBuf)
+static size_t atapiGetConfigurationFillFeatureCDRead(uint8_t *pbBuf, size_t cbBuf)
 {
     if (cbBuf < 8)
         return 0;
@@ -3440,7 +3472,7 @@ static size_t atapiGetConfigurationFillFeatureCDRead(PAHCIPort pAhciPort, uint8_
     return 8;
 }
 
-static size_t atapiGetConfigurationFillFeaturePowerManagement(PAHCIPort pAhciPort, uint8_t *pbBuf, size_t cbBuf)
+static size_t atapiGetConfigurationFillFeaturePowerManagement(uint8_t *pbBuf, size_t cbBuf)
 {
     if (cbBuf < 4)
         return 0;
@@ -3452,7 +3484,7 @@ static size_t atapiGetConfigurationFillFeaturePowerManagement(PAHCIPort pAhciPor
     return 4;
 }
 
-static size_t atapiGetConfigurationFillFeatureTimeout(PAHCIPort pAhciPort, uint8_t *pbBuf, size_t cbBuf)
+static size_t atapiGetConfigurationFillFeatureTimeout(uint8_t *pbBuf, size_t cbBuf)
 {
     if (cbBuf < 8)
         return 0;
@@ -3487,44 +3519,43 @@ static int atapiGetConfigurationSS(PAHCIREQ pAhciReq, PAHCIPort pAhciPort, size_
     cbBuf    -= 8;
     pbBuf    += 8;
 
-    cbCopied = atapiGetConfigurationFillFeatureListProfiles(pAhciPort, pbBuf, cbBuf);
+    cbCopied = atapiGetConfigurationFillFeatureListProfiles(pbBuf, cbBuf);
     cbBuf -= cbCopied;
     pbBuf += cbCopied;
 
-    cbCopied = atapiGetConfigurationFillFeatureCore(pAhciPort, pbBuf, cbBuf);
+    cbCopied = atapiGetConfigurationFillFeatureCore(pbBuf, cbBuf);
     cbBuf -= cbCopied;
     pbBuf += cbCopied;
 
-    cbCopied = atapiGetConfigurationFillFeatureMorphing(pAhciPort, pbBuf, cbBuf);
+    cbCopied = atapiGetConfigurationFillFeatureMorphing(pbBuf, cbBuf);
     cbBuf -= cbCopied;
     pbBuf += cbCopied;
 
-    cbCopied = atapiGetConfigurationFillFeatureRemovableMedium(pAhciPort, pbBuf, cbBuf);
+    cbCopied = atapiGetConfigurationFillFeatureRemovableMedium(pbBuf, cbBuf);
     cbBuf -= cbCopied;
     pbBuf += cbCopied;
 
-    cbCopied = atapiGetConfigurationFillFeatureRandomReadable(pAhciPort, pbBuf, cbBuf);
+    cbCopied = atapiGetConfigurationFillFeatureRandomReadable(pbBuf, cbBuf);
     cbBuf -= cbCopied;
     pbBuf += cbCopied;
 
-    cbCopied = atapiGetConfigurationFillFeatureCDRead(pAhciPort, pbBuf, cbBuf);
+    cbCopied = atapiGetConfigurationFillFeatureCDRead(pbBuf, cbBuf);
     cbBuf -= cbCopied;
     pbBuf += cbCopied;
 
-    cbCopied = atapiGetConfigurationFillFeaturePowerManagement(pAhciPort, pbBuf, cbBuf);
+    cbCopied = atapiGetConfigurationFillFeaturePowerManagement(pbBuf, cbBuf);
     cbBuf -= cbCopied;
     pbBuf += cbCopied;
 
-    cbCopied = atapiGetConfigurationFillFeatureTimeout(pAhciPort, pbBuf, cbBuf);
+    cbCopied = atapiGetConfigurationFillFeatureTimeout(pbBuf, cbBuf);
     cbBuf -= cbCopied;
     pbBuf += cbCopied;
 
     /* Set data length now. */
-    ataH2BE_U32(&aBuf[0], sizeof(aBuf) - cbBuf);
+    ataH2BE_U32(&aBuf[0], (uint32_t)(sizeof(aBuf) - cbBuf));
 
     /* Copy the buffer in to the scatter gather list. */
-    *pcbData = ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, (void *)&aBuf[0],
-                               RT_MIN(cbData, sizeof(aBuf)));
+    *pcbData = ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, (void *)&aBuf[0], RT_MIN(cbData, sizeof(aBuf)));
 
     atapiCmdOK(pAhciPort, pAhciReq);
     return VINF_SUCCESS;
@@ -3600,8 +3631,7 @@ static int atapiGetEventStatusNotificationSS(PAHCIREQ pAhciReq, PAHCIPort pAhciP
         }
     } while (!ASMAtomicCmpXchgU32(&pAhciPort->MediaEventStatus, NewStatus, OldStatus));
 
-    *pcbData = ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, (void *)&abBuf[0],
-                               RT_MIN(cbData, sizeof(abBuf)));
+    *pcbData = ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, (void *)&abBuf[0], RT_MIN(cbData, sizeof(abBuf)));
 
     atapiCmdOK(pAhciPort, pAhciReq);
     return VINF_SUCCESS;
@@ -3625,8 +3655,7 @@ static int atapiInquirySS(PAHCIREQ pAhciReq, PAHCIPort pAhciPort, size_t cbData,
     ataSCSIPadStr(aBuf + 32, pAhciPort->szInquiryRevision, 4);
 
     /* Copy the buffer in to the scatter gather list. */
-    *pcbData = ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, (void *)&aBuf[0],
-                               RT_MIN(cbData, sizeof(aBuf)));
+    *pcbData = ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, (void *)&aBuf[0], RT_MIN(cbData, sizeof(aBuf)));
 
     atapiCmdOK(pAhciPort, pAhciReq);
     return VINF_SUCCESS;
@@ -3655,8 +3684,7 @@ static int atapiModeSenseErrorRecoverySS(PAHCIREQ pAhciReq, PAHCIPort pAhciPort,
     aBuf[15] = 0x00;
 
     /* Copy the buffer in to the scatter gather list. */
-    *pcbData = ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, (void *)&aBuf[0],
-                               RT_MIN(cbData, sizeof(aBuf)));
+    *pcbData = ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, (void *)&aBuf[0], RT_MIN(cbData, sizeof(aBuf)));
 
     atapiCmdOK(pAhciPort, pAhciReq);
     return VINF_SUCCESS;
@@ -3706,8 +3734,7 @@ static int atapiModeSenseCDStatusSS(PAHCIREQ pAhciReq, PAHCIPort pAhciPort, size
     ataH2BE_U16(&aBuf[38], 0); /* number of write speed performance descriptors */
 
     /* Copy the buffer in to the scatter gather list. */
-    *pcbData = ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, (void *)&aBuf[0],
-                               RT_MIN(cbData, sizeof(aBuf)));
+    *pcbData = ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, (void *)&aBuf[0], RT_MIN(cbData, sizeof(aBuf)));
 
     atapiCmdOK(pAhciPort, pAhciReq);
     return VINF_SUCCESS;
@@ -3738,8 +3765,7 @@ static int atapiMechanismStatusSS(PAHCIREQ pAhciReq, PAHCIPort pAhciPort, size_t
     ataH2BE_U16(aBuf + 6, 0);
 
     /* Copy the buffer in to the scatter gather list. */
-    *pcbData = ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, (void *)&aBuf[0],
-                               RT_MIN(cbData, sizeof(aBuf)));
+    *pcbData = ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, (void *)&aBuf[0], RT_MIN(cbData, sizeof(aBuf)));
 
     atapiCmdOK(pAhciPort, pAhciReq);
     return VINF_SUCCESS;
@@ -3801,8 +3827,7 @@ static int atapiReadTOCNormalSS(PAHCIREQ pAhciReq, PAHCIPort pAhciPort, size_t c
     ataH2BE_U16(aBuf, cbSize - 2);
 
     /* Copy the buffer in to the scatter gather list. */
-    *pcbData = ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, (void *)&aBuf[0],
-                               RT_MIN(cbData, cbSize));
+    *pcbData = ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, (void *)&aBuf[0], RT_MIN(cbData, cbSize));
 
     atapiCmdOK(pAhciPort, pAhciReq);
     return VINF_SUCCESS;
@@ -3835,8 +3860,7 @@ static int atapiReadTOCMultiSS(PAHCIREQ pAhciReq, PAHCIPort pAhciPort, size_t cb
     }
 
     /* Copy the buffer in to the scatter gather list. */
-    *pcbData = ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, (void *)&aBuf[0],
-                               RT_MIN(cbData, sizeof(aBuf)));
+    *pcbData = ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, (void *)&aBuf[0], RT_MIN(cbData, sizeof(aBuf)));
 
     atapiCmdOK(pAhciPort, pAhciReq);
     return VINF_SUCCESS;
@@ -3924,8 +3948,7 @@ static int atapiReadTOCRawSS(PAHCIREQ pAhciReq, PAHCIPort pAhciPort, size_t cbDa
     ataH2BE_U16(aBuf, cbSize - 2);
 
     /* Copy the buffer in to the scatter gather list. */
-    *pcbData = ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, (void *)&aBuf[0],
-                               RT_MIN(cbData, cbSize));
+    *pcbData = ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, (void *)&aBuf[0], RT_MIN(cbData, cbSize));
 
     atapiCmdOK(pAhciPort, pAhciReq);
     return VINF_SUCCESS;
@@ -3941,6 +3964,7 @@ static uint32_t ahciMediumTypeSet(PAHCIPort pAhciPort, uint32_t MediaTrackType)
 
 static int atapiPassthroughSS(PAHCIREQ pAhciReq, PAHCIPort pAhciPort, size_t cbData, size_t *pcbData)
 {
+    RT_NOREF(cbData);
     int rc = VINF_SUCCESS;
     uint8_t abATAPISense[ATAPI_SENSE_SIZE];
     uint32_t cbTransfer;
@@ -3978,7 +4002,7 @@ static int atapiPassthroughSS(PAHCIREQ pAhciReq, PAHCIPort pAhciPort, size_t cbD
          * us to handle commands with up to 128KB of data. The usual
          * imbalance of powers. */
         uint8_t aATAPICmd[ATAPI_PACKET_SIZE];
-        uint32_t iATAPILBA, cSectors, cReqSectors, cbCurrTX;
+        uint32_t iATAPILBA, cSectors;
         uint8_t *pbBuf = (uint8_t *)pvBuf;
 
         switch (pAhciReq->aATAPICmd[0])
@@ -4011,14 +4035,14 @@ static int atapiPassthroughSS(PAHCIREQ pAhciReq, PAHCIPort pAhciPort, size_t cbD
                 return VINF_SUCCESS;
         }
         memcpy(aATAPICmd, pAhciReq->aATAPICmd, ATAPI_PACKET_SIZE);
-        cReqSectors = 0;
+        uint32_t cReqSectors = 0;
         for (uint32_t i = cSectors; i > 0; i -= cReqSectors)
         {
             if (i * pAhciReq->cbATAPISector > SCSI_MAX_BUFFER_SIZE)
                 cReqSectors = SCSI_MAX_BUFFER_SIZE / pAhciReq->cbATAPISector;
             else
                 cReqSectors = i;
-            cbCurrTX = pAhciReq->cbATAPISector * cReqSectors;
+            uint32_t cbCurrTX = pAhciReq->cbATAPISector * cReqSectors;
             switch (pAhciReq->aATAPICmd[0])
             {
                 case SCSI_READ_10:
@@ -4145,8 +4169,7 @@ static int atapiPassthroughSS(PAHCIREQ pAhciReq, PAHCIPort pAhciPort, size_t cbD
                 Log3(("ATAPI PT data read (%d): %.*Rhxs\n", cbTransfer, cbTransfer, (uint8_t *)pvBuf));
 
                 /* Reply with the same amount of data as the real drive. */
-                *pcbData = ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, pvBuf,
-                                           cbTransfer);
+                *pcbData = ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, pvBuf, cbTransfer);
             }
             else
                 *pcbData = 0;
@@ -4183,7 +4206,7 @@ static int atapiPassthroughSS(PAHCIREQ pAhciReq, PAHCIPort pAhciPort, size_t cbD
     return VINF_SUCCESS;
 }
 
-/** @todo: Revise ASAP. */
+/** @todo Revise ASAP. */
 /* Keep in sync with DevATA.cpp! */
 static int atapiReadDVDStructureSS(PAHCIREQ pAhciReq, PAHCIPort pAhciPort, size_t cbData, size_t *pcbData)
 {
@@ -4310,7 +4333,7 @@ static int atapiReadDVDStructureSS(PAHCIREQ pAhciReq, PAHCIPort pAhciPort, size_
                         /* data written + 4 byte header */
                         uASC = (16 + 4);
                         break;
-                    default: /* TODO: formats beyond DVD-ROM requires */
+                    default: /** @todo formats beyond DVD-ROM requires */
                         uASC = -SCSI_ASC_INV_FIELD_IN_CMD_PACKET;
                 }
 
@@ -4321,15 +4344,15 @@ static int atapiReadDVDStructureSS(PAHCIREQ pAhciReq, PAHCIPort pAhciPort, size_
                 }
                 break;
             }
-            /* TODO: BD support, fall through for now */
+            /** @todo BD support, fall through for now */
 
         /* Generic disk structures */
-        case 0x80: /* TODO: AACS volume identifier */
-        case 0x81: /* TODO: AACS media serial number */
-        case 0x82: /* TODO: AACS media identifier */
-        case 0x83: /* TODO: AACS media key block */
-        case 0x90: /* TODO: List of recognized format layers */
-        case 0xc0: /* TODO: Write protection status */
+        case 0x80: /** @todo AACS volume identifier */
+        case 0x81: /** @todo AACS media serial number */
+        case 0x82: /** @todo AACS media identifier */
+        case 0x83: /** @todo AACS media key block */
+        case 0x90: /** @todo List of recognized format layers */
+        case 0xc0: /** @todo Write protection status */
         default:
             atapiCmdErrorSimple(pAhciPort, pAhciReq, SCSI_SENSE_ILLEGAL_REQUEST,
                                 SCSI_ASC_INV_FIELD_IN_CMD_PACKET);
@@ -4337,8 +4360,7 @@ static int atapiReadDVDStructureSS(PAHCIREQ pAhciReq, PAHCIPort pAhciPort, size_
     }
 
     /* Copy the buffer into the scatter gather list. */
-    *pcbData = ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, (void *)&aBuf[0],
-                               RT_MIN(cbData, max_len));
+    *pcbData = ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, (void *)&aBuf[0], RT_MIN(cbData, max_len));
 
     atapiCmdOK(pAhciPort, pAhciReq);
     return false;
@@ -4347,13 +4369,11 @@ static int atapiReadDVDStructureSS(PAHCIREQ pAhciReq, PAHCIPort pAhciPort, size_
 static int atapiDoTransfer(PAHCIPort pAhciPort, PAHCIREQ pAhciReq, size_t cbMax, ATAPIFN iSourceSink)
 {
     size_t cbTransfered = 0;
-    int rcSourceSink;
-
-    rcSourceSink = g_apfnAtapiFuncs[iSourceSink](pAhciReq, pAhciPort, cbMax,
-                                                 &cbTransfered);
+    int rcSourceSink = g_apfnAtapiFuncs[iSourceSink](pAhciReq, pAhciPort, cbMax, &cbTransfered);
 
-    pAhciReq->cmdHdr.u32PRDBC = cbTransfered;
-    pAhciReq->cbTransfer = cbTransfered;
+    pAhciReq->cmdHdr.u32PRDBC = (uint32_t)cbTransfered;
+    pAhciReq->cbTransfer      = (uint32_t)cbTransfered;
+    Assert(pAhciReq->cbTransfer == cbTransfered);
 
     LogFlow(("cbTransfered=%d\n", cbTransfered));
 
@@ -4405,6 +4425,7 @@ static DECLCALLBACK(int) atapiReadSectors2352PostProcess(PAHCIREQ pAhciReq, void
 
 static int atapiReadSectors(PAHCIPort pAhciPort, PAHCIREQ pAhciReq, uint32_t iATAPILBA, uint32_t cSectors, uint32_t cbSector)
 {
+    RT_NOREF(pAhciPort);
     Log(("%s: %d sectors at LBA %d\n", __FUNCTION__, cSectors, iATAPILBA));
 
     switch (cbSector)
@@ -5454,10 +5475,12 @@ DECLINLINE(uint32_t) ahciGetNSectorsQueued(uint8_t *pCmdFis)
         return pCmdFis[AHCI_CMDFIS_FETEXP] << 8 | pCmdFis[AHCI_CMDFIS_FET];
 }
 
+#if 0 /* unused */
 DECLINLINE(uint8_t) ahciGetTagQueued(uint8_t *pCmdFis)
 {
     return pCmdFis[AHCI_CMDFIS_SECTC] >> 3;
 }
+#endif /* unused */
 
 /**
  * Allocates memory for the given request using already allocated memory if possible.
@@ -5523,14 +5546,13 @@ static void ahciReqMemFree(PAHCIPort pAhciPort, PAHCIREQ pAhciReq, bool fForceFr
  * @param   pvBuf          The buffer to copy from.
  * @param   cbBuf          The size of the buffer.
  */
-static size_t ahciCopyToPrdtl(PPDMDEVINS pDevIns, PAHCIREQ pAhciReq,
-                              void *pvBuf, size_t cbBuf)
+static uint32_t ahciCopyToPrdtl(PPDMDEVINS pDevIns, PAHCIREQ pAhciReq, void const *pvBuf, size_t cbBuf)
 {
-    uint8_t *pbBuf = (uint8_t *)pvBuf;
+    uint8_t const *pbBuf = (uint8_t const *)pvBuf;
     SGLEntry aPrdtlEntries[32];
     RTGCPHYS GCPhysPrdtl = pAhciReq->GCPhysPrdtl;
     unsigned cPrdtlEntries = pAhciReq->cPrdtlEntries;
-    size_t cbCopied = 0;
+    uint32_t cbCopied = 0;
 
     AssertMsgReturn(cPrdtlEntries > 0, ("Copying 0 bytes is not possible\n"), 0);
 
@@ -5547,7 +5569,7 @@ static size_t ahciCopyToPrdtl(PPDMDEVINS pDevIns, PAHCIREQ pAhciReq,
             RTGCPHYS GCPhysAddrDataBase = AHCI_RTGCPHYS_FROM_U32(aPrdtlEntries[i].u32DBAUp, aPrdtlEntries[i].u32DBA);
             uint32_t cbThisCopy = (aPrdtlEntries[i].u32DescInf & SGLENTRY_DESCINF_DBC) + 1;
 
-            cbThisCopy = RT_MIN(cbThisCopy, cbBuf);
+            cbThisCopy = (uint32_t)RT_MIN(cbThisCopy, cbBuf);
 
             /* Copy into SG entry. */
             PDMDevHlpPCIPhysWrite(pDevIns, GCPhysAddrDataBase, pbBuf, cbThisCopy);
@@ -5600,7 +5622,7 @@ static size_t ahciCopyFromPrdtl(PPDMDEVINS pDevIns, PAHCIREQ pAhciReq,
             RTGCPHYS GCPhysAddrDataBase = AHCI_RTGCPHYS_FROM_U32(aPrdtlEntries[i].u32DBAUp, aPrdtlEntries[i].u32DBA);
             uint32_t cbThisCopy = (aPrdtlEntries[i].u32DescInf & SGLENTRY_DESCINF_DBC) + 1;
 
-            cbThisCopy = RT_MIN(cbThisCopy, cbBuf);
+            cbThisCopy = (uint32_t)RT_MIN(cbThisCopy, cbBuf);
 
             /* Copy into buffer. */
             PDMDevHlpPhysRead(pDevIns, GCPhysAddrDataBase, pbBuf, cbThisCopy);
@@ -5680,9 +5702,7 @@ static void ahciIoBufFree(PAHCIPort pAhciPort, PAHCIREQ pAhciReq,
             }
         }
         else
-            ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq,
-                            pAhciReq->u.Io.DataSeg.pvSeg,
-                            pAhciReq->u.Io.DataSeg.cbSeg);
+            ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, pAhciReq->u.Io.DataSeg.pvSeg, pAhciReq->u.Io.DataSeg.cbSeg);
     }
 
     ahciReqMemFree(pAhciPort, pAhciReq, false /* fForceFree */);
@@ -5719,7 +5739,7 @@ static void ahciR3PortCachedReqsFree(PAHCIPort pAhciPort)
  * Cancels all active tasks on the port.
  *
  * @returns Whether all active tasks were canceled.
- * @param   pAhciPort        The ahci port.
+ * @param   pAhciPort        The AHCI port.
  * @param   pAhciReqExcept   The given request is excepted from the cancelling
  *                           (used for error page reading).
  */
@@ -6265,7 +6285,6 @@ static AHCITXDIR ahciProcessCmd(PAHCIPort pAhciPort, PAHCIREQ pAhciReq, uint8_t
 {
     AHCITXDIR enmTxDir = AHCITXDIR_NONE;
     bool fLBA48 = false;
-    CmdHdr   *pCmdHdr = &pAhciReq->cmdHdr;
 
     AssertMsg(pCmdFis[AHCI_CMDFIS_TYPE] == AHCI_CMDFIS_TYPE_H2D, ("FIS is not a host to device Fis!!\n"));
 
@@ -6278,14 +6297,12 @@ static AHCITXDIR ahciProcessCmd(PAHCIPort pAhciPort, PAHCIREQ pAhciReq, uint8_t
             if (pAhciPort->pDrvMedia && !pAhciPort->fATAPI)
             {
                 uint16_t u16Temp[256];
-                size_t cbCopied;
 
                 /* Fill the buffer. */
                 ahciIdentifySS(pAhciPort, u16Temp);
 
                 /* Copy the buffer. */
-                cbCopied = ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq,
-                                           &u16Temp[0], sizeof(u16Temp));
+                uint32_t cbCopied = ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, &u16Temp[0], sizeof(u16Temp));
 
                 pAhciReq->fFlags |= AHCI_REQ_PIO_DATA;
                 pAhciReq->cbTransfer = cbCopied;
@@ -6452,7 +6469,6 @@ static AHCITXDIR ahciProcessCmd(PAHCIPort pAhciPort, PAHCIREQ pAhciReq, uint8_t
             size_t cbLogRead = ((pCmdFis[AHCI_CMDFIS_SECTCEXP] << 8) | pCmdFis[AHCI_CMDFIS_SECTC]) * 512;
             unsigned offLogRead = ((pCmdFis[AHCI_CMDFIS_CYLLEXP] << 8) | pCmdFis[AHCI_CMDFIS_CYLL]) * 512;
             unsigned iPage = pCmdFis[AHCI_CMDFIS_SECTN];
-            size_t cbCopied;
 
             LogFlow(("Trying to read %zu bytes starting at offset %u from page %u\n", cbLogRead, offLogRead, iPage));
 
@@ -6506,7 +6522,7 @@ static AHCITXDIR ahciProcessCmd(PAHCIPort pAhciPort, PAHCIREQ pAhciReq, uint8_t
                          * See SATA2 1.2 spec chapter 4.2.3.4
                          */
                         bool fAbortedAll = ahciCancelActiveTasks(pAhciPort, pAhciReq);
-                        Assert(fAbortedAll);
+                        Assert(fAbortedAll); NOREF(fAbortedAll);
                         ahciSendSDBFis(pAhciPort, 0xffffffff, true);
 
                         break;
@@ -6514,8 +6530,7 @@ static AHCITXDIR ahciProcessCmd(PAHCIPort pAhciPort, PAHCIREQ pAhciReq, uint8_t
                 }
 
                 /* Copy the buffer. */
-                cbCopied = ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq,
-                                           &aBuf[offLogRead], cbLogRead);
+                uint32_t cbCopied = ahciCopyToPrdtl(pAhciPort->pDevInsR3, pAhciReq, &aBuf[offLogRead], cbLogRead);
 
                 pAhciReq->fFlags |= AHCI_REQ_PIO_DATA;
                 pAhciReq->cbTransfer = cbCopied;
@@ -6847,14 +6862,10 @@ static DECLCALLBACK(bool) ahciNotifyQueueConsumer(PPDMDEVINS pDevIns, PPDMQUEUEI
 /* The async IO thread for one port. */
 static DECLCALLBACK(int) ahciAsyncIOLoop(PPDMDEVINS pDevIns, PPDMTHREAD pThread)
 {
+    RT_NOREF(pDevIns);
     PAHCIPort pAhciPort = (PAHCIPort)pThread->pvUser;
     PAHCI     pAhci     = pAhciPort->CTX_SUFF(pAhci);
-    int rc = VINF_SUCCESS;
-    uint64_t u64StartTime = 0;
-    uint64_t u64StopTime  = 0;
-    uint32_t uIORequestsProcessed = 0;
-    uint32_t uIOsPerSec = 0;
-    uint32_t fTasksToProcess = 0;
+    int       rc        = VINF_SUCCESS;
 
     ahciLog(("%s: Port %d entering async IO loop.\n", __FUNCTION__, pAhciPort->iLUN));
 
@@ -7036,6 +7047,7 @@ static DECLCALLBACK(int) ahciAsyncIOLoopWakeUp(PPDMDEVINS pDevIns, PPDMTHREAD pT
  */
 static DECLCALLBACK(void) ahciR3Info(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
 {
+    RT_NOREF(pszArgs);
     PAHCI pThis = PDMINS_2_DATA(pDevIns, PAHCI);
 
     /*
@@ -7137,6 +7149,7 @@ static bool ahciR3AllAsyncIOIsFinished(PPDMDEVINS pDevIns)
  */
 static DECLCALLBACK(int) ahciR3SavePrep(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
 {
+    RT_NOREF(pDevIns, pSSM);
     Assert(ahciR3AllAsyncIOIsFinished(pDevIns));
     return VINF_SUCCESS;
 }
@@ -7146,6 +7159,7 @@ static DECLCALLBACK(int) ahciR3SavePrep(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
  */
 static DECLCALLBACK(int) ahciR3LoadPrep(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
 {
+    RT_NOREF(pDevIns, pSSM);
     Assert(ahciR3AllAsyncIOIsFinished(pDevIns));
     return VINF_SUCCESS;
 }
@@ -7155,6 +7169,7 @@ static DECLCALLBACK(int) ahciR3LoadPrep(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
  */
 static DECLCALLBACK(int) ahciR3LiveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uPass)
 {
+    RT_NOREF(uPass);
     PAHCI pThis = PDMINS_2_DATA(pDevIns, PAHCI);
 
     /* config. */
@@ -7169,7 +7184,7 @@ static DECLCALLBACK(int) ahciR3LiveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uin
     }
 
     static const char *s_apszIdeEmuPortNames[4] = { "PrimaryMaster", "PrimarySlave", "SecondaryMaster", "SecondarySlave" };
-    for (size_t i = 0; i < RT_ELEMENTS(s_apszIdeEmuPortNames); i++)
+    for (uint32_t i = 0; i < RT_ELEMENTS(s_apszIdeEmuPortNames); i++)
     {
         uint32_t iPort;
         int rc = CFGMR3QueryU32Def(pDevIns->pCfg, s_apszIdeEmuPortNames[i], &iPort, i);
@@ -7405,7 +7420,7 @@ static DECLCALLBACK(int) ahciR3LoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uin
         }
 
         static const char *s_apszIdeEmuPortNames[4] = { "PrimaryMaster", "PrimarySlave", "SecondaryMaster", "SecondarySlave" };
-        for (size_t i = 0; i < RT_ELEMENTS(s_apszIdeEmuPortNames); i++)
+        for (uint32_t i = 0; i < RT_ELEMENTS(s_apszIdeEmuPortNames); i++)
         {
             uint32_t iPort;
             rc = CFGMR3QueryU32Def(pDevIns->pCfg, s_apszIdeEmuPortNames[i], &iPort, i);
@@ -7864,13 +7879,12 @@ static DECLCALLBACK(void) ahciR3Resume(PPDMDEVINS pDevIns)
  */
 static int ahciR3VpdInit(PPDMDEVINS pDevIns, PAHCIPort pAhciPort, const char *pszName)
 {
-    int rc = VINF_SUCCESS;
-    PAHCI pAhci = PDMINS_2_DATA(pDevIns, PAHCI);
 
     /* Generate a default serial number. */
     char szSerial[AHCI_SERIAL_NUMBER_LENGTH+1];
     RTUUID Uuid;
 
+    int rc = VINF_SUCCESS;
     if (pAhciPort->pDrvMedia)
         rc = pAhciPort->pDrvMedia->pfnGetUuid(pAhciPort->pDrvMedia, &Uuid);
     else
@@ -8175,6 +8189,7 @@ static DECLCALLBACK(int)  ahciR3Attach(PPDMDEVINS pDevIns, unsigned iLUN, uint32
  */
 static int ahciR3ResetCommon(PPDMDEVINS pDevIns, bool fConstructor)
 {
+    RT_NOREF(fConstructor);
     PAHCI pAhci = PDMINS_2_DATA(pDevIns, PAHCI);
 
     ahciHBAReset(pAhci);
diff --git a/src/VBox/Devices/Storage/DevATA.cpp b/src/VBox/Devices/Storage/DevATA.cpp
index 9f0b39c..da09828 100644
--- a/src/VBox/Devices/Storage/DevATA.cpp
+++ b/src/VBox/Devices/Storage/DevATA.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -547,6 +547,7 @@ RT_C_DECLS_END
 
 
 
+#ifdef IN_RING3
 DECLINLINE(void) ataSetStatusValue(ATADevState *s, uint8_t stat)
 {
     PATACONTROLLER pCtl = ATADEVSTATE_2_CONTROLLER(s);
@@ -558,6 +559,7 @@ DECLINLINE(void) ataSetStatusValue(ATADevState *s, uint8_t stat)
         Log2(("%s: LUN#%d status %#04x\n", __FUNCTION__, s->iLUN, s->uATARegStatus));
     }
 }
+#endif /* IN_RING3 */
 
 
 DECLINLINE(void) ataSetStatus(ATADevState *s, uint8_t stat)
@@ -721,8 +723,10 @@ static const PSourceSinkFunc g_apfnSourceSinkFuncs[ATAFN_SS_MAX] =
 
 static const ATARequest g_ataDMARequest    = { ATA_AIO_DMA,            { { 0, 0, 0, 0, 0 } } };
 static const ATARequest g_ataPIORequest    = { ATA_AIO_PIO,            { { 0, 0, 0, 0, 0 } } };
+# ifdef IN_RING3
 static const ATARequest g_ataResetARequest = { ATA_AIO_RESET_ASSERTED, { { 0, 0, 0, 0, 0 } } };
 static const ATARequest g_ataResetCRequest = { ATA_AIO_RESET_CLEARED,  { { 0, 0, 0, 0, 0 } } };
+# endif
 
 # ifdef IN_RING3
 static void ataR3AsyncIOClearRequests(PATACONTROLLER pCtl)
@@ -1165,6 +1169,8 @@ DECLINLINE(uint32_t) ataMSF2LBA(const uint8_t *pbBuf)
     return (pbBuf[0] * 60 + pbBuf[1]) * 75 + pbBuf[2];
 }
 
+
+#if 0 /* unused */
 /**
  * Compares two MSF values.
  *
@@ -1192,6 +1198,7 @@ DECLINLINE(int) atapiCmpMSF(const uint8_t *pbMSF1, const uint8_t *pbMSF2)
 
     return iRes;
 }
+#endif /* unused */
 
 static void ataR3CmdOK(ATADevState *s, uint8_t status)
 {
@@ -1329,7 +1336,7 @@ static bool ataR3IdentifySS(ATADevState *s)
         p[118] = RT_H2LE_U16(cSectorSizeInWords >> 16);
     }
 
-    if (s->pDrvMedia->pfnDiscard) /** @todo: Set bit 14 in word 69 too? (Deterministic read after TRIM). */
+    if (s->pDrvMedia->pfnDiscard) /** @todo Set bit 14 in word 69 too? (Deterministic read after TRIM). */
         p[169] = RT_H2LE_U16(1); /* DATA SET MANAGEMENT command supported. */
     if (s->fNonRotational)
         p[217] = RT_H2LE_U16(1); /* Non-rotational medium */
@@ -2395,7 +2402,7 @@ static bool atapiR3ReadDVDStructureSS(ATADevState *s)
                         /* data written + 4 byte header */
                         uASC = (16 + 4);
                         break;
-                    default: /* TODO: formats beyond DVD-ROM requires */
+                    default: /** @todo formats beyond DVD-ROM requires */
                         uASC = -SCSI_ASC_INV_FIELD_IN_CMD_PACKET;
                 }
 
@@ -2407,15 +2414,15 @@ static bool atapiR3ReadDVDStructureSS(ATADevState *s)
                 }
                 break;
             }
-            /* TODO: BD support, fall through for now */
+            /** @todo BD support, fall through for now */
 
         /* Generic disk structures */
-        case 0x80: /* TODO: AACS volume identifier */
-        case 0x81: /* TODO: AACS media serial number */
-        case 0x82: /* TODO: AACS media identifier */
-        case 0x83: /* TODO: AACS media key block */
-        case 0x90: /* TODO: List of recognized format layers */
-        case 0xc0: /* TODO: Write protection status */
+        case 0x80: /** @todo AACS volume identifier */
+        case 0x81: /** @todo AACS media serial number */
+        case 0x82: /** @todo AACS media identifier */
+        case 0x83: /** @todo AACS media key block */
+        case 0x90: /** @todo List of recognized format layers */
+        case 0xc0: /** @todo Write protection status */
         default:
             s->iSourceSink = ATAFN_SS_NULL;
             atapiR3CmdErrorSimple(s, SCSI_SENSE_ILLEGAL_REQUEST,
@@ -2508,6 +2515,7 @@ static bool atapiR3ReadTrackInformationSS(ATADevState *s)
 
 static uint32_t atapiR3GetConfigurationFillFeatureListProfiles(ATADevState *s, uint8_t *pbBuf, size_t cbBuf)
 {
+    RT_NOREF1(s);
     if (cbBuf < 3*4)
         return 0;
 
@@ -2526,6 +2534,7 @@ static uint32_t atapiR3GetConfigurationFillFeatureListProfiles(ATADevState *s, u
 
 static uint32_t atapiR3GetConfigurationFillFeatureCore(ATADevState *s, uint8_t *pbBuf, size_t cbBuf)
 {
+    RT_NOREF1(s);
     if (cbBuf < 12)
         return 0;
 
@@ -2541,6 +2550,7 @@ static uint32_t atapiR3GetConfigurationFillFeatureCore(ATADevState *s, uint8_t *
 
 static uint32_t atapiR3GetConfigurationFillFeatureMorphing(ATADevState *s, uint8_t *pbBuf, size_t cbBuf)
 {
+    RT_NOREF1(s);
     if (cbBuf < 8)
         return 0;
 
@@ -2555,6 +2565,7 @@ static uint32_t atapiR3GetConfigurationFillFeatureMorphing(ATADevState *s, uint8
 
 static uint32_t atapiR3GetConfigurationFillFeatureRemovableMedium(ATADevState *s, uint8_t *pbBuf, size_t cbBuf)
 {
+    RT_NOREF1(s);
     if (cbBuf < 8)
         return 0;
 
@@ -2570,6 +2581,7 @@ static uint32_t atapiR3GetConfigurationFillFeatureRemovableMedium(ATADevState *s
 
 static uint32_t atapiR3GetConfigurationFillFeatureRandomReadable (ATADevState *s, uint8_t *pbBuf, size_t cbBuf)
 {
+    RT_NOREF1(s);
     if (cbBuf < 12)
         return 0;
 
@@ -2586,6 +2598,7 @@ static uint32_t atapiR3GetConfigurationFillFeatureRandomReadable (ATADevState *s
 
 static uint32_t atapiR3GetConfigurationFillFeatureCDRead(ATADevState *s, uint8_t *pbBuf, size_t cbBuf)
 {
+    RT_NOREF1(s);
     if (cbBuf < 8)
         return 0;
 
@@ -2600,6 +2613,7 @@ static uint32_t atapiR3GetConfigurationFillFeatureCDRead(ATADevState *s, uint8_t
 
 static uint32_t atapiR3GetConfigurationFillFeaturePowerManagement(ATADevState *s, uint8_t *pbBuf, size_t cbBuf)
 {
+    RT_NOREF1(s);
     if (cbBuf < 4)
         return 0;
 
@@ -2612,6 +2626,7 @@ static uint32_t atapiR3GetConfigurationFillFeaturePowerManagement(ATADevState *s
 
 static uint32_t atapiR3GetConfigurationFillFeatureTimeout(ATADevState *s, uint8_t *pbBuf, size_t cbBuf)
 {
+    RT_NOREF1(s);
     if (cbBuf < 8)
         return 0;
 
@@ -4566,8 +4581,9 @@ static uint32_t ataStatusRead(PATACONTROLLER pCtl, uint32_t addr)
 {
     ATADevState *s = &pCtl->aIfs[pCtl->iSelectedIf];
     uint32_t val;
+    RT_NOREF1(addr);
 
-    //@todo: The handler should not be even registered if there
+    /// @todo The handler should not be even registered if there
     // is no device on an IDE channel.
     if (!pCtl->aIfs[0].pDrvMedia && !pCtl->aIfs[1].pDrvMedia)
         val = 0xff;
@@ -4581,6 +4597,7 @@ static uint32_t ataStatusRead(PATACONTROLLER pCtl, uint32_t addr)
 
 static int ataControlWrite(PATACONTROLLER pCtl, uint32_t addr, uint32_t val)
 {
+    RT_NOREF1(addr);
 #ifndef IN_RING3
     if ((val ^ pCtl->aIfs[0].uATARegDevCtl) & ATA_DEVCTL_RESET)
         return VINF_IOM_R3_IOPORT_WRITE; /* The RESET stuff is too complicated for RC+R0. */
@@ -4886,6 +4903,7 @@ PDMBOTHCBDECL(int) ataIOPortWrite1Data(PPDMDEVINS pDevIns, void *pvUser, RTIOPOR
     uint32_t       i = (uint32_t)(uintptr_t)pvUser;
     PCIATAState   *pThis = PDMINS_2_DATA(pDevIns, PCIATAState *);
     PATACONTROLLER pCtl = &pThis->aCts[i];
+    RT_NOREF1(Port);
 
     Assert(i < 2);
     Assert(Port == pCtl->IOPortBase1);
@@ -4953,6 +4971,7 @@ PDMBOTHCBDECL(int) ataIOPortRead1Data(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT
     uint32_t       i = (uint32_t)(uintptr_t)pvUser;
     PCIATAState   *pThis = PDMINS_2_DATA(pDevIns, PCIATAState *);
     PATACONTROLLER pCtl = &pThis->aCts[i];
+    RT_NOREF1(Port);
 
     Assert(i < 2);
     Assert(Port == pCtl->IOPortBase1);
@@ -5038,6 +5057,7 @@ PDMBOTHCBDECL(int) ataIOPortReadStr1Data(PPDMDEVINS pDevIns, void *pvUser, RTIOP
     uint32_t       i     = (uint32_t)(uintptr_t)pvUser;
     PCIATAState   *pThis = PDMINS_2_DATA(pDevIns, PCIATAState *);
     PATACONTROLLER pCtl  = &pThis->aCts[i];
+    RT_NOREF1(Port);
 
     Assert(i < 2);
     Assert(Port == pCtl->IOPortBase1);
@@ -5126,6 +5146,7 @@ PDMBOTHCBDECL(int) ataIOPortWriteStr1Data(PPDMDEVINS pDevIns, void *pvUser, RTIO
     uint32_t       i     = (uint32_t)(uintptr_t)pvUser;
     PCIATAState   *pThis = PDMINS_2_DATA(pDevIns, PCIATAState *);
     PATACONTROLLER pCtl  = &pThis->aCts[i];
+    RT_NOREF1(Port);
 
     Assert(i < 2);
     Assert(Port == pCtl->IOPortBase1);
@@ -5261,6 +5282,7 @@ static void ataR3DMATransfer(PATACONTROLLER pCtl)
             pBuffer = pCtl->pRedoDMABuffer;
             cbBuffer = pCtl->cbRedoDMABuffer;
             fLastDesc = pCtl->fRedoDMALastDesc;
+            DMADesc.pBuffer = DMADesc.cbBuffer = 0; /* Shut up MSC. */
         }
         else
         {
@@ -5283,8 +5305,6 @@ static void ataR3DMATransfer(PATACONTROLLER pCtl)
                 Log2(("%s: DMA desc %#010x: addr=%#010x size=%#010x orig_size=%#010x\n", __FUNCTION__,
                        (int)pDesc, pBuffer, cbBuffer, RT_LE2H_U32(DMADesc.cbBuffer) & 0xfffe));
 
-                PCIATAState *pATAState = PDMINS_2_DATA(pDevIns, PCIATAState *);
-                AssertPtr(pATAState);
                 if (uTxDir == PDMMEDIATXDIR_FROM_DEVICE)
                     PDMDevHlpPCIPhysWrite(pDevIns, pBuffer, s->CTX_SUFF(pbIOBuffer) + iIOBufferCur, dmalen);
                 else
@@ -5425,8 +5445,9 @@ static void ataR3AsyncSignalIdle(PATACONTROLLER pCtl)
  * the middle of a PIO transfer" question.  The solution was to use an ASM,
  * which is what's there now.
  */
-static DECLCALLBACK(int) ataR3AsyncIOThread(RTTHREAD ThreadSelf, void *pvUser)
+static DECLCALLBACK(int) ataR3AsyncIOThread(RTTHREAD hThreadSelf, void *pvUser)
 {
+    RT_NOREF1(hThreadSelf);
     const ATARequest *pReq;
     uint64_t        u64TS = 0; /* shut up gcc */
     uint64_t        uWait;
@@ -5919,6 +5940,7 @@ static DECLCALLBACK(int) ataR3AsyncIOThread(RTTHREAD ThreadSelf, void *pvUser)
 static uint32_t ataBMDMACmdReadB(PATACONTROLLER pCtl, uint32_t addr)
 {
     uint32_t val = pCtl->BmDma.u8Cmd;
+    RT_NOREF1(addr);
     Log2(("%s: addr=%#06x val=%#04x\n", __FUNCTION__, addr, val));
     return val;
 }
@@ -5926,6 +5948,7 @@ static uint32_t ataBMDMACmdReadB(PATACONTROLLER pCtl, uint32_t addr)
 
 static void ataBMDMACmdWriteB(PATACONTROLLER pCtl, uint32_t addr, uint32_t val)
 {
+    RT_NOREF1(addr);
     Log2(("%s: addr=%#06x val=%#04x\n", __FUNCTION__, addr, val));
     if (!(val & BM_CMD_START))
     {
@@ -5969,12 +5992,14 @@ static void ataBMDMACmdWriteB(PATACONTROLLER pCtl, uint32_t addr, uint32_t val)
 static uint32_t ataBMDMAStatusReadB(PATACONTROLLER pCtl, uint32_t addr)
 {
     uint32_t val = pCtl->BmDma.u8Status;
+    RT_NOREF1(addr);
     Log2(("%s: addr=%#06x val=%#04x\n", __FUNCTION__, addr, val));
     return val;
 }
 
 static void ataBMDMAStatusWriteB(PATACONTROLLER pCtl, uint32_t addr, uint32_t val)
 {
+    RT_NOREF1(addr);
     Log2(("%s: addr=%#06x val=%#04x\n", __FUNCTION__, addr, val));
     pCtl->BmDma.u8Status =    (val & (BM_STATUS_D0DMA | BM_STATUS_D1DMA))
                            |  (pCtl->BmDma.u8Status & BM_STATUS_DMAING)
@@ -5984,18 +6009,21 @@ static void ataBMDMAStatusWriteB(PATACONTROLLER pCtl, uint32_t addr, uint32_t va
 static uint32_t ataBMDMAAddrReadL(PATACONTROLLER pCtl, uint32_t addr)
 {
     uint32_t val = (uint32_t)pCtl->BmDma.pvAddr;
+    RT_NOREF1(addr);
     Log2(("%s: addr=%#06x val=%#010x\n", __FUNCTION__, addr, val));
     return val;
 }
 
 static void ataBMDMAAddrWriteL(PATACONTROLLER pCtl, uint32_t addr, uint32_t val)
 {
+    RT_NOREF1(addr);
     Log2(("%s: addr=%#06x val=%#010x\n", __FUNCTION__, addr, val));
     pCtl->BmDma.pvAddr = val & ~3;
 }
 
 static void ataBMDMAAddrWriteLowWord(PATACONTROLLER pCtl, uint32_t addr, uint32_t val)
 {
+    RT_NOREF1(addr);
     Log2(("%s: addr=%#06x val=%#010x\n", __FUNCTION__, addr, val));
     pCtl->BmDma.pvAddr = (pCtl->BmDma.pvAddr & 0xFFFF0000) | RT_LOWORD(val & ~3);
 
@@ -6004,6 +6032,7 @@ static void ataBMDMAAddrWriteLowWord(PATACONTROLLER pCtl, uint32_t addr, uint32_
 static void ataBMDMAAddrWriteHighWord(PATACONTROLLER pCtl, uint32_t addr, uint32_t val)
 {
     Log2(("%s: addr=%#06x val=%#010x\n", __FUNCTION__, addr, val));
+    RT_NOREF1(addr);
     pCtl->BmDma.pvAddr = (RT_LOWORD(val) << 16) | RT_LOWORD(pCtl->BmDma.pvAddr);
 }
 
@@ -6095,6 +6124,7 @@ PDMBOTHCBDECL(int) ataBMDMAIOPortWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPOR
 static DECLCALLBACK(int) ataR3BMDMAIORangeMap(PPCIDEVICE pPciDev, /*unsigned*/ int iRegion,
                                               RTGCPHYS GCPhysAddress, uint32_t cb, PCIADDRESSSPACE enmType)
 {
+    RT_NOREF(iRegion, cb, enmType);
     PCIATAState *pThis = PCIDEV_2_PCIATASTATE(pPciDev);
     int         rc = VINF_SUCCESS;
     Assert(enmType == PCI_ADDRESS_SPACE_IO);
@@ -6365,23 +6395,18 @@ DECLINLINE(void) ataR3RelocBuffer(PPDMDEVINS pDevIns, ATADevState *s)
 static DECLCALLBACK(void) ataR3Detach(PPDMDEVINS pDevIns, unsigned iLUN, uint32_t fFlags)
 {
     PCIATAState    *pThis = PDMINS_2_DATA(pDevIns, PCIATAState *);
-    PATACONTROLLER  pCtl;
-    ATADevState    *pIf;
-    unsigned        iController;
-    unsigned        iInterface;
-
     AssertMsg(fFlags & PDM_TACH_FLAGS_NOT_HOT_PLUG,
-              ("PIIX3IDE: Device does not support hotplugging\n"));
+              ("PIIX3IDE: Device does not support hotplugging\n")); RT_NOREF(fFlags);
 
     /*
      * Locate the controller and stuff.
      */
-    iController = iLUN / RT_ELEMENTS(pThis->aCts[0].aIfs);
+    unsigned iController = iLUN / RT_ELEMENTS(pThis->aCts[0].aIfs);
     AssertReleaseMsg(iController < RT_ELEMENTS(pThis->aCts), ("iController=%d iLUN=%d\n", iController, iLUN));
-    pCtl = &pThis->aCts[iController];
+    PATACONTROLLER  pCtl = &pThis->aCts[iController];
 
-    iInterface  = iLUN % RT_ELEMENTS(pThis->aCts[0].aIfs);
-    pIf = &pCtl->aIfs[iInterface];
+    unsigned iInterface  = iLUN % RT_ELEMENTS(pThis->aCts[0].aIfs);
+    ATADevState *pIf = &pCtl->aIfs[iInterface];
 
     /*
      * Zero some important members.
@@ -6663,7 +6688,8 @@ static bool ataR3AllAsyncIOIsIdle(PPDMDEVINS pDevIns)
  */
 static DECLCALLBACK(int) ataR3SaveLoadPrep(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
 {
-    PCIATAState    *pThis = PDMINS_2_DATA(pDevIns, PCIATAState *);
+    RT_NOREF1(pSSM);
+    PCIATAState *pThis = PDMINS_2_DATA(pDevIns, PCIATAState *);
 
     /* sanity - the suspend notification will wait on the async stuff. */
     for (uint32_t i = 0; i < RT_ELEMENTS(pThis->aCts); i++)
@@ -6678,7 +6704,8 @@ static DECLCALLBACK(int) ataR3SaveLoadPrep(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
  */
 static DECLCALLBACK(int) ataR3LiveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uPass)
 {
-    PCIATAState    *pThis = PDMINS_2_DATA(pDevIns, PCIATAState *);
+    RT_NOREF1(uPass);
+    PCIATAState *pThis = PDMINS_2_DATA(pDevIns, PCIATAState *);
 
     SSMR3PutU8(pSSM, pThis->u8Type);
     for (uint32_t i = 0; i < RT_ELEMENTS(pThis->aCts); i++)
@@ -6774,7 +6801,7 @@ static DECLCALLBACK(int) ataR3SaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
         }
     }
 
-    return SSMR3PutU32(pSSM, ~0); /* sanity/terminator */
+    return SSMR3PutU32(pSSM, UINT32_MAX); /* sanity/terminator */
 }
 
 /**
@@ -7397,7 +7424,7 @@ static DECLCALLBACK(int) ataR3Construct(PPDMDEVINS pDevIns, int iInstance, PCFGM
     {
         case CHIPSET_ICH6:
             PCIDevSetDeviceId(&pThis->dev, 0x269e); /* ICH6 IDE */
-            /** @todo: do we need it? Do we need anything else? */
+            /** @todo do we need it? Do we need anything else? */
             pThis->dev.config[0x48] = 0x00; /* UDMACTL */
             pThis->dev.config[0x4A] = 0x00; /* UDMATIM */
             pThis->dev.config[0x4B] = 0x00;
diff --git a/src/VBox/Devices/Storage/DevBusLogic.cpp b/src/VBox/Devices/Storage/DevBusLogic.cpp
index 5248195..0b99aba 100644
--- a/src/VBox/Devices/Storage/DevBusLogic.cpp
+++ b/src/VBox/Devices/Storage/DevBusLogic.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -303,10 +303,12 @@ AssertCompileSize(Addr24, 3);
 #define MAX_ISA_BASE        (NUM_ISA_BASES - 1)
 #define ISA_BASE_DISABLED   6
 
+#ifdef IN_RING3
 static uint16_t const g_aISABases[NUM_ISA_BASES] =
 {
     0x330, 0x334, 0x230, 0x234, 0x130, 0x134, 0, 0
 };
+#endif
 /** @}  */
 
 /** Pointer to a task state structure. */
@@ -989,7 +991,9 @@ typedef struct BUSLOGICTASKSTATE
 /*********************************************************************************************************************************
 *   Internal Functions                                                                                                           *
 *********************************************************************************************************************************/
+#ifdef IN_RING3
 static int buslogicR3RegisterISARange(PBUSLOGIC pBusLogic, uint8_t uBaseCode);
+#endif
 
 
 /**
@@ -1075,13 +1079,13 @@ static void buslogicR3InitializeLocalRam(PBUSLOGIC pBusLogic)
     pBusLogic->LocalRam.structured.autoSCSIData.fLevelSensitiveInterrupt = true;
     pBusLogic->LocalRam.structured.autoSCSIData.fParityCheckingEnabled = true;
     pBusLogic->LocalRam.structured.autoSCSIData.fExtendedTranslation = true; /* Same as in geometry register. */
-    pBusLogic->LocalRam.structured.autoSCSIData.u16DeviceEnabledMask = ~0; /* All enabled. Maybe mask out non present devices? */
-    pBusLogic->LocalRam.structured.autoSCSIData.u16WidePermittedMask = ~0;
-    pBusLogic->LocalRam.structured.autoSCSIData.u16FastPermittedMask = ~0;
-    pBusLogic->LocalRam.structured.autoSCSIData.u16SynchronousPermittedMask = ~0;
-    pBusLogic->LocalRam.structured.autoSCSIData.u16DisconnectPermittedMask = ~0;
+    pBusLogic->LocalRam.structured.autoSCSIData.u16DeviceEnabledMask = UINT16_MAX; /* All enabled. Maybe mask out non present devices? */
+    pBusLogic->LocalRam.structured.autoSCSIData.u16WidePermittedMask = UINT16_MAX;
+    pBusLogic->LocalRam.structured.autoSCSIData.u16FastPermittedMask = UINT16_MAX;
+    pBusLogic->LocalRam.structured.autoSCSIData.u16SynchronousPermittedMask = UINT16_MAX;
+    pBusLogic->LocalRam.structured.autoSCSIData.u16DisconnectPermittedMask = UINT16_MAX;
     pBusLogic->LocalRam.structured.autoSCSIData.fStrictRoundRobinMode = pBusLogic->fStrictRoundRobinMode;
-    pBusLogic->LocalRam.structured.autoSCSIData.u16UltraPermittedMask = ~0;
+    pBusLogic->LocalRam.structured.autoSCSIData.u16UltraPermittedMask = UINT16_MAX;
     /** @todo calculate checksum? */
 }
 
@@ -1674,12 +1678,9 @@ static void buslogicR3SenseBufferFree(PBUSLOGICTASKSTATE pTaskState, bool fCopy)
  */
 static int buslogicR3SenseBufferAlloc(PBUSLOGICTASKSTATE pTaskState)
 {
-    PPDMDEVINS pDevIns = pTaskState->CTX_SUFF(pTargetDevice)->CTX_SUFF(pBusLogic)->CTX_SUFF(pDevIns);
-    uint32_t   cbSenseBuffer;
-
     pTaskState->pbSenseBuffer = NULL;
 
-    cbSenseBuffer = buslogicR3ConvertSenseBufferLength(pTaskState->CommandControlBlockGuest.c.cbSenseData);
+    uint32_t cbSenseBuffer = buslogicR3ConvertSenseBufferLength(pTaskState->CommandControlBlockGuest.c.cbSenseData);
     if (cbSenseBuffer)
     {
         pTaskState->pbSenseBuffer = (uint8_t *)RTMemAllocZ(cbSenseBuffer);
@@ -2407,6 +2408,8 @@ static int buslogicRegisterWrite(PBUSLOGIC pBusLogic, unsigned iRegister, uint8_
  */
 PDMBOTHCBDECL(int) buslogicMMIORead(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void *pv, unsigned cb)
 {
+    RT_NOREF_PV(pDevIns); RT_NOREF_PV(pvUser); RT_NOREF_PV(GCPhysAddr); RT_NOREF_PV(pv); RT_NOREF_PV(cb);
+
     /* the linux driver does not make use of the MMIO area. */
     AssertMsgFailed(("MMIO Read\n"));
     return VINF_SUCCESS;
@@ -2425,6 +2428,8 @@ PDMBOTHCBDECL(int) buslogicMMIORead(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS G
  */
 PDMBOTHCBDECL(int) buslogicMMIOWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void const *pv, unsigned cb)
 {
+    RT_NOREF_PV(pDevIns); RT_NOREF_PV(pvUser); RT_NOREF_PV(GCPhysAddr); RT_NOREF_PV(pv); RT_NOREF_PV(cb);
+
     /* the linux driver does not make use of the MMIO area. */
     AssertMsgFailed(("MMIO Write\n"));
     return VINF_SUCCESS;
@@ -2445,6 +2450,7 @@ PDMBOTHCBDECL(int) buslogicIOPortRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT
 {
     PBUSLOGIC pBusLogic = PDMINS_2_DATA(pDevIns, PBUSLOGIC);
     unsigned iRegister = Port % 4;
+    RT_NOREF_PV(pvUser); RT_NOREF_PV(cb);
 
     Assert(cb == 1);
 
@@ -2465,13 +2471,13 @@ PDMBOTHCBDECL(int) buslogicIOPortRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT
 PDMBOTHCBDECL(int) buslogicIOPortWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb)
 {
     PBUSLOGIC pBusLogic = PDMINS_2_DATA(pDevIns, PBUSLOGIC);
-    int rc = VINF_SUCCESS;
     unsigned iRegister = Port % 4;
     uint8_t uVal = (uint8_t)u32;
+    RT_NOREF2(pvUser, cb);
 
     Assert(cb == 1);
 
-    rc = buslogicRegisterWrite(pBusLogic, iRegister, (uint8_t)uVal);
+    int rc = buslogicRegisterWrite(pBusLogic, iRegister, (uint8_t)uVal);
 
     Log2(("#%d %s: pvUser=%#p cb=%d u32=%#x Port=%#x rc=%Rrc\n",
           pDevIns->iInstance, __FUNCTION__, pvUser, cb, u32, Port, rc));
@@ -2546,12 +2552,12 @@ static int buslogicR3PrepareBIOSSCSIRequest(PBUSLOGIC pBusLogic)
  */
 static DECLCALLBACK(int) buslogicR3BiosIoPortRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb)
 {
-    int rc;
+    RT_NOREF(pvUser, cb);
     PBUSLOGIC pBusLogic = PDMINS_2_DATA(pDevIns, PBUSLOGIC);
 
     Assert(cb == 1);
 
-    rc = vboxscsiReadRegister(&pBusLogic->VBoxSCSI, (Port - BUSLOGIC_BIOS_IO_PORT), pu32);
+    int rc = vboxscsiReadRegister(&pBusLogic->VBoxSCSI, (Port - BUSLOGIC_BIOS_IO_PORT), pu32);
 
     //Log2(("%s: pu32=%p:{%.*Rhxs} iRegister=%d rc=%Rrc\n",
     //      __FUNCTION__, pu32, 1, pu32, (Port - BUSLOGIC_BIOS_IO_PORT), rc));
@@ -2572,11 +2578,9 @@ static DECLCALLBACK(int) buslogicR3BiosIoPortRead(PPDMDEVINS pDevIns, void *pvUs
  */
 static DECLCALLBACK(int) buslogicR3BiosIoPortWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb)
 {
-    int rc;
+    RT_NOREF(pvUser, cb);
     PBUSLOGIC pThis = PDMINS_2_DATA(pDevIns, PBUSLOGIC);
-
-    Log2(("#%d %s: pvUser=%#p cb=%d u32=%#x Port=%#x\n",
-          pDevIns->iInstance, __FUNCTION__, pvUser, cb, u32, Port));
+    Log2(("#%d %s: pvUser=%#p cb=%d u32=%#x Port=%#x\n", pDevIns->iInstance, __FUNCTION__, pvUser, cb, u32, Port));
 
     /*
      * If there is already a request form the BIOS pending ignore this write
@@ -2587,7 +2591,7 @@ static DECLCALLBACK(int) buslogicR3BiosIoPortWrite(PPDMDEVINS pDevIns, void *pvU
 
     Assert(cb == 1);
 
-    rc = vboxscsiWriteRegister(&pThis->VBoxSCSI, (Port - BUSLOGIC_BIOS_IO_PORT), (uint8_t)u32);
+    int rc = vboxscsiWriteRegister(&pThis->VBoxSCSI, (Port - BUSLOGIC_BIOS_IO_PORT), (uint8_t)u32);
     if (rc == VERR_MORE_DATA)
     {
         ASMAtomicXchgBool(&pThis->fBiosReqPending, true);
@@ -2610,6 +2614,7 @@ static DECLCALLBACK(int) buslogicR3BiosIoPortWrite(PPDMDEVINS pDevIns, void *pvU
 static DECLCALLBACK(int) buslogicR3BiosIoPortWriteStr(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port,
                                                       uint8_t const *pbSrc, uint32_t *pcTransfers, unsigned cb)
 {
+    RT_NOREF(pvUser);
     PBUSLOGIC pThis = PDMINS_2_DATA(pDevIns, PBUSLOGIC);
     Log2(("#%d %s: pvUser=%#p cb=%d Port=%#x\n", pDevIns->iInstance, __FUNCTION__, pvUser, cb, Port));
 
@@ -2642,6 +2647,7 @@ static DECLCALLBACK(int) buslogicR3BiosIoPortWriteStr(PPDMDEVINS pDevIns, void *
 static DECLCALLBACK(int) buslogicR3BiosIoPortReadStr(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port,
                                                      uint8_t *pbDst, uint32_t *pcTransfers, unsigned cb)
 {
+    RT_NOREF(pvUser);
     PBUSLOGIC pBusLogic = PDMINS_2_DATA(pDevIns, PBUSLOGIC);
     LogFlowFunc(("#%d %s: pvUser=%#p cb=%d Port=%#x\n", pDevIns->iInstance, __FUNCTION__, pvUser, cb, Port));
 
@@ -2764,6 +2770,7 @@ static void buslogicR3RedoSetWarning(PBUSLOGIC pThis, int rc)
 static DECLCALLBACK(int) buslogicR3MmioMap(PPCIDEVICE pPciDev, /*unsigned*/ int iRegion,
                                            RTGCPHYS GCPhysAddress, uint32_t cb, PCIADDRESSSPACE enmType)
 {
+    RT_NOREF(iRegion);
     PPDMDEVINS pDevIns = pPciDev->pDevIns;
     PBUSLOGIC  pThis = PDMINS_2_DATA(pDevIns, PBUSLOGIC);
     int   rc = VINF_SUCCESS;
@@ -2833,6 +2840,7 @@ static DECLCALLBACK(int) buslogicR3MmioMap(PPCIDEVICE pPciDev, /*unsigned*/ int
 static DECLCALLBACK(int) buslogicR3DeviceSCSIRequestCompleted(PPDMISCSIPORT pInterface, PPDMSCSIREQUEST pSCSIRequest,
                                                               int rcCompletion, bool fRedo, int rcReq)
 {
+    RT_NOREF(pInterface);
     int rc;
     PBUSLOGICTASKSTATE pTaskState = (PBUSLOGICTASKSTATE)pSCSIRequest->pvUser;
     PBUSLOGICDEVICE pBusLogicDevice = pTaskState->CTX_SUFF(pTargetDevice);
@@ -2985,7 +2993,7 @@ static int buslogicR3DeviceSCSIRequestSetup(PBUSLOGIC pBusLogic, PBUSLOGICTASKST
             pTaskState->PDMScsiRequest.pbCDB                 = pTaskState->CommandControlBlockGuest.c.abCDB;
             if (pTaskState->DataSeg.cbSeg)
             {
-                pTaskState->PDMScsiRequest.cbScatterGather       = pTaskState->DataSeg.cbSeg;
+                pTaskState->PDMScsiRequest.cbScatterGather       = (uint32_t)pTaskState->DataSeg.cbSeg;
                 pTaskState->PDMScsiRequest.cScatterGatherEntries = 1;
                 pTaskState->PDMScsiRequest.paScatterGatherHead   = &pTaskState->DataSeg;
             }
@@ -3176,6 +3184,7 @@ static int buslogicR3ProcessMailboxNext(PBUSLOGIC pBusLogic)
  */
 static DECLCALLBACK(bool) buslogicR3NotifyQueueConsumer(PPDMDEVINS pDevIns, PPDMQUEUEITEMCORE pItem)
 {
+    RT_NOREF(pItem);
     PBUSLOGIC pThis = PDMINS_2_DATA(pDevIns, PBUSLOGIC);
 
     int rc = SUPSemEventSignal(pThis->pSupDrvSession, pThis->hEvtProcess);
@@ -3226,6 +3235,7 @@ static void buslogicR3Kick(PBUSLOGIC pThis)
 /** @callback_method_impl{FNSSMDEVLIVEEXEC}  */
 static DECLCALLBACK(int) buslogicR3LiveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uPass)
 {
+    RT_NOREF(uPass);
     PBUSLOGIC pThis = PDMINS_2_DATA(pDevIns, PBUSLOGIC);
 
     /* Save the device config. */
@@ -3305,12 +3315,13 @@ static DECLCALLBACK(int) buslogicR3SaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
         pTaskState = pTaskState->pRedoNext;
     }
 
-    return SSMR3PutU32(pSSM, ~0);
+    return SSMR3PutU32(pSSM, UINT32_MAX);
 }
 
 /** @callback_method_impl{FNSSMDEVLOADDONE}  */
 static DECLCALLBACK(int) buslogicR3LoadDone(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
 {
+    RT_NOREF(pSSM);
     PBUSLOGIC pThis = PDMINS_2_DATA(pDevIns, PBUSLOGIC);
 
     buslogicR3RegisterISARange(pThis, pThis->uISABaseCode);
@@ -3426,7 +3437,7 @@ static DECLCALLBACK(int) buslogicR3LoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM,
         uint32_t u32;
         rc = SSMR3GetU32(pSSM, &u32);
         if (RT_SUCCESS(rc))
-            AssertMsgReturn(u32 == ~0U, ("%#x\n", u32), VERR_SSM_DATA_UNIT_FORMAT_CHANGED);
+            AssertMsgReturn(u32 == UINT32_MAX, ("%#x\n", u32), VERR_SSM_DATA_UNIT_FORMAT_CHANGED);
     }
 
     return rc;
@@ -3505,6 +3516,7 @@ static DECLCALLBACK(void *) buslogicR3StatusQueryInterface(PPDMIBASE pInterface,
  */
 static DECLCALLBACK(int) buslogicR3Worker(PPDMDEVINS pDevIns, PPDMTHREAD pThread)
 {
+    RT_NOREF(pDevIns);
     PBUSLOGIC pThis = (PBUSLOGIC)pThread->pvUser;
     int rc = VINF_SUCCESS;
 
@@ -3561,6 +3573,7 @@ static DECLCALLBACK(int) buslogicR3Worker(PPDMDEVINS pDevIns, PPDMTHREAD pThread
  */
 static DECLCALLBACK(int) buslogicR3WorkerWakeUp(PPDMDEVINS pDevIns, PPDMTHREAD pThread)
 {
+    RT_NOREF(pThread);
     PBUSLOGIC pThis = PDMINS_2_DATA(pDevIns, PBUSLOGIC);
     return SUPSemEventSignal(pThis->pSupDrvSession, pThis->hEvtProcess);
 }
@@ -3803,6 +3816,7 @@ static DECLCALLBACK(void) buslogicR3Resume(PPDMDEVINS pDevIns)
  */
 static DECLCALLBACK(void) buslogicR3Detach(PPDMDEVINS pDevIns, unsigned iLUN, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
     PBUSLOGIC       pThis = PDMINS_2_DATA(pDevIns, PBUSLOGIC);
     PBUSLOGICDEVICE pDevice = &pThis->aDeviceStates[iLUN];
 
@@ -3904,6 +3918,7 @@ static DECLCALLBACK(void) buslogicR3Reset(PPDMDEVINS pDevIns)
 
 static DECLCALLBACK(void) buslogicR3Relocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta)
 {
+    RT_NOREF(offDelta);
     PBUSLOGIC pThis = PDMINS_2_DATA(pDevIns, PBUSLOGIC);
 
     pThis->pDevInsRC = PDMDEVINS_2_RCPTR(pDevIns);
diff --git a/src/VBox/Devices/Storage/DevFdc.cpp b/src/VBox/Devices/Storage/DevFdc.cpp
index 3762229..7972fd9 100644
--- a/src/VBox/Devices/Storage/DevFdc.cpp
+++ b/src/VBox/Devices/Storage/DevFdc.cpp
@@ -1,10 +1,10 @@
 /* $Id: DevFdc.cpp $ */
 /** @file
- * VBox storage devices: Floppy disk controller
+ * VBox storage devices - Floppy disk controller
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -70,19 +70,11 @@
         do { printf("FLOPPY: " fmt , ##args); } while (0)
     #endif
 #else /* !VBOX */
-    # ifdef LOG_ENABLED
-        static void FLOPPY_DPRINTF (const char *fmt, ...)
-        {
-            if (LogIsEnabled ()) {
-                va_list args;
-                va_start (args, fmt);
-                RTLogLogger (NULL, NULL, "floppy: %N", fmt, &args); /* %N - nested va_list * type formatting call. */
-                va_end (args);
-            }
-        }
-    # else
-      DECLINLINE(void) FLOPPY_DPRINTF(const char *pszFmt, ...) {}
-    # endif
+# ifdef LOG_ENABLED
+#  define FLOPPY_DPRINTF(...) Log(("floppy: " __VA_ARGS__))
+# else
+#  define FLOPPY_DPRINTF(...) do { } while (0)
+# endif
 #endif /* !VBOX */
 
 #ifndef VBOX
@@ -285,6 +277,8 @@ static int fd_seek(fdrive_t *drv, uint8_t head, uint8_t track, uint8_t sect,
                          head, track, sect, 1, drv->max_track, drv->last_sect);
             return 4;
         }
+#else
+        RT_NOREF(enable_seek);
 #endif
         drv->head = head;
         if (drv->track != track)
@@ -1159,6 +1153,7 @@ static void fdctrl_set_fifo(fdctrl_t *fdctrl, int fifo_len, int do_irq)
 /* Set an error: unimplemented/unknown command */
 static void fdctrl_unimplemented(fdctrl_t *fdctrl, int direction)
 {
+    RT_NOREF(direction);
     FLOPPY_ERROR("unimplemented command 0x%02x\n", fdctrl->fifo[0]);
     fdctrl->fifo[0] = FD_SR0_INVCMD;
     fdctrl_set_fifo(fdctrl, 1, 0);
@@ -1275,7 +1270,7 @@ static void fdctrl_start_transfer(fdctrl_t *fdctrl, int direction)
         return;
     case 5:
         /* No disk in drive */
-        ///@todo: This is wrong! Command should not complete.
+        /// @todo This is wrong! Command should not complete.
         fdctrl_stop_transfer(fdctrl, FD_SR0_ABNTERM | 0x08, /*FD_SR1_MA |*/ FD_SR1_ND, 0x00);
         fdctrl->fifo[3] = kt;
         fdctrl->fifo[4] = kh;
@@ -1482,6 +1477,7 @@ static void fdctrl_start_format(fdctrl_t *fdctrl)
 /* Prepare a transfer of deleted data */
 static void fdctrl_start_transfer_del(fdctrl_t *fdctrl, int direction)
 {
+    RT_NOREF(direction);
     FLOPPY_ERROR("fdctrl_start_transfer_del() unimplemented\n");
 
     /* We don't handle deleted data,
@@ -1540,6 +1536,7 @@ static int fdctrl_transfer_handler (void *opaque, int nchan,
                                     int dma_pos, int dma_len)
 #endif
 {
+    RT_NOREF(pDevIns, dma_pos);
     fdctrl_t *fdctrl;
     fdrive_t *cur_drv;
 #ifdef VBOX
@@ -1707,7 +1704,7 @@ static int fdctrl_transfer_handler (void *opaque, int nchan,
                 uint32_t read;
                 int rc2 = PDMDevHlpDMAReadMemory (fdctrl->pDevIns, nchan, tmpbuf,
                                                   fdctrl->data_pos, len, &read);
-                AssertMsg (RT_SUCCESS (rc2), ("DMAReadMemory -> %Rrc2\n", rc2));
+                AssertMsg(RT_SUCCESS(rc2), ("DMAReadMemory -> %Rrc2\n", rc2)); NOREF(rc2);
 #else
                 DMA_read_memory (nchan, tmpbuf, fdctrl->data_pos, len);
 #endif
@@ -1893,6 +1890,7 @@ static void fdctrl_format_sector(fdctrl_t *fdctrl)
 
 static void fdctrl_handle_lock(fdctrl_t *fdctrl, int direction)
 {
+    RT_NOREF(direction);
     fdctrl->lock = (fdctrl->fifo[0] & 0x80) ? 1 : 0;
     fdctrl->fifo[0] = fdctrl->lock << 4;
     fdctrl_set_fifo(fdctrl, 1, 0);
@@ -1900,6 +1898,7 @@ static void fdctrl_handle_lock(fdctrl_t *fdctrl, int direction)
 
 static void fdctrl_handle_dumpreg(fdctrl_t *fdctrl, int direction)
 {
+    RT_NOREF(direction);
     fdrive_t *cur_drv = get_cur_drv(fdctrl);
 
     /* Drives position */
@@ -1925,6 +1924,7 @@ static void fdctrl_handle_dumpreg(fdctrl_t *fdctrl, int direction)
 
 static void fdctrl_handle_version(fdctrl_t *fdctrl, int direction)
 {
+    RT_NOREF(direction);
     /* Controller's version */
     fdctrl->fifo[0] = fdctrl->version;
     fdctrl_set_fifo(fdctrl, 1, 0);
@@ -1932,12 +1932,14 @@ static void fdctrl_handle_version(fdctrl_t *fdctrl, int direction)
 
 static void fdctrl_handle_partid(fdctrl_t *fdctrl, int direction)
 {
+    RT_NOREF(direction);
     fdctrl->fifo[0] = 0x01; /* Stepping 1 */
     fdctrl_set_fifo(fdctrl, 1, 0);
 }
 
 static void fdctrl_handle_restore(fdctrl_t *fdctrl, int direction)
 {
+    RT_NOREF(direction);
     fdrive_t *cur_drv = get_cur_drv(fdctrl);
 
     /* Drives position */
@@ -1961,6 +1963,7 @@ static void fdctrl_handle_restore(fdctrl_t *fdctrl, int direction)
 
 static void fdctrl_handle_save(fdctrl_t *fdctrl, int direction)
 {
+    RT_NOREF(direction);
     fdrive_t *cur_drv = get_cur_drv(fdctrl);
 
     fdctrl->fifo[0] = 0;
@@ -1991,6 +1994,7 @@ static void fdctrl_handle_save(fdctrl_t *fdctrl, int direction)
 
 static void fdctrl_handle_readid(fdctrl_t *fdctrl, int direction)
 {
+    RT_NOREF(direction);
     fdrive_t *cur_drv = get_cur_drv(fdctrl);
 
     FLOPPY_DPRINTF("CMD:%02x SEL:%02x\n", fdctrl->fifo[0], fdctrl->fifo[1]);
@@ -2007,6 +2011,7 @@ static void fdctrl_handle_readid(fdctrl_t *fdctrl, int direction)
 
 static void fdctrl_handle_format_track(fdctrl_t *fdctrl, int direction)
 {
+    RT_NOREF(direction);
     fdrive_t *cur_drv;
     uint8_t ns, dp;
 
@@ -2039,6 +2044,7 @@ static void fdctrl_handle_format_track(fdctrl_t *fdctrl, int direction)
 
 static void fdctrl_handle_specify(fdctrl_t *fdctrl, int direction)
 {
+    RT_NOREF(direction);
     fdctrl->timer0 = (fdctrl->fifo[1] >> 4) & 0xF;
     fdctrl->timer1 = fdctrl->fifo[2] >> 1;
     if (fdctrl->fifo[2] & 1)
@@ -2051,6 +2057,7 @@ static void fdctrl_handle_specify(fdctrl_t *fdctrl, int direction)
 
 static void fdctrl_handle_sense_drive_status(fdctrl_t *fdctrl, int direction)
 {
+    RT_NOREF(direction);
     fdrive_t *cur_drv;
 
     SET_CUR_DRV(fdctrl, fdctrl->fifo[1] & FD_DOR_SELMASK);
@@ -2067,6 +2074,7 @@ static void fdctrl_handle_sense_drive_status(fdctrl_t *fdctrl, int direction)
 
 static void fdctrl_handle_recalibrate(fdctrl_t *fdctrl, int direction)
 {
+    RT_NOREF(direction);
     fdrive_t *cur_drv;
     uint8_t  st0;
 
@@ -2084,6 +2092,7 @@ static void fdctrl_handle_recalibrate(fdctrl_t *fdctrl, int direction)
 
 static void fdctrl_handle_sense_interrupt_status(fdctrl_t *fdctrl, int direction)
 {
+    RT_NOREF(direction);
     fdrive_t *cur_drv = get_cur_drv(fdctrl);
 
     FLOPPY_DPRINTF("CMD:%02x\n", fdctrl->fifo[0]);
@@ -2110,6 +2119,7 @@ static void fdctrl_handle_sense_interrupt_status(fdctrl_t *fdctrl, int direction
 
 static void fdctrl_handle_seek(fdctrl_t *fdctrl, int direction)
 {
+    RT_NOREF(direction);
     fdrive_t *cur_drv;
 
     FLOPPY_DPRINTF("CMD:%02x SEL:%02x NCN:%02x\n", fdctrl->fifo[0],
@@ -2140,6 +2150,7 @@ static void fdctrl_handle_seek(fdctrl_t *fdctrl, int direction)
 
 static void fdctrl_handle_perpendicular_mode(fdctrl_t *fdctrl, int direction)
 {
+    RT_NOREF(direction);
     fdrive_t *cur_drv = get_cur_drv(fdctrl);
 
     if (fdctrl->fifo[1] & 0x80)
@@ -2150,6 +2161,7 @@ static void fdctrl_handle_perpendicular_mode(fdctrl_t *fdctrl, int direction)
 
 static void fdctrl_handle_configure(fdctrl_t *fdctrl, int direction)
 {
+    RT_NOREF(direction);
     fdctrl->config = fdctrl->fifo[2];
     fdctrl->precomp_trk =  fdctrl->fifo[3];
     /* No result back */
@@ -2158,6 +2170,7 @@ static void fdctrl_handle_configure(fdctrl_t *fdctrl, int direction)
 
 static void fdctrl_handle_powerdown_mode(fdctrl_t *fdctrl, int direction)
 {
+    RT_NOREF(direction);
     fdctrl->pwrd = fdctrl->fifo[1];
     fdctrl->fifo[0] = fdctrl->fifo[1];
     fdctrl_set_fifo(fdctrl, 1, 0);
@@ -2165,13 +2178,15 @@ static void fdctrl_handle_powerdown_mode(fdctrl_t *fdctrl, int direction)
 
 static void fdctrl_handle_option(fdctrl_t *fdctrl, int direction)
 {
+    RT_NOREF(direction);
     /* No result back */
     fdctrl_reset_fifo(fdctrl);
 }
 
 static void fdctrl_handle_drive_specification_command(fdctrl_t *fdctrl, int direction)
 {
-    fdrive_t *cur_drv = get_cur_drv(fdctrl);
+    RT_NOREF(direction);
+    /* fdrive_t *cur_drv = get_cur_drv(fdctrl); - unused */
 
     /* This command takes a variable number of parameters. It can be terminated
      * at any time if the high bit of a parameter is set. Once there are 6 bytes
@@ -2196,6 +2211,7 @@ static void fdctrl_handle_drive_specification_command(fdctrl_t *fdctrl, int dire
 
 static void fdctrl_handle_relative_seek_out(fdctrl_t *fdctrl, int direction)
 {
+    RT_NOREF(direction);
     fdrive_t *cur_drv;
 
     SET_CUR_DRV(fdctrl, fdctrl->fifo[1] & FD_DOR_SELMASK);
@@ -2212,6 +2228,7 @@ static void fdctrl_handle_relative_seek_out(fdctrl_t *fdctrl, int direction)
 
 static void fdctrl_handle_relative_seek_in(fdctrl_t *fdctrl, int direction)
 {
+    RT_NOREF(direction);
     fdrive_t *cur_drv;
 
     SET_CUR_DRV(fdctrl, fdctrl->fifo[1] & FD_DOR_SELMASK);
@@ -2350,7 +2367,7 @@ static void fdctrl_result_timer(void *opaque)
 #ifdef VBOX
     if (!cur_drv->max_track) {
         FLOPPY_DPRINTF("read id when no disk in drive\n");
-        ///@todo: This is wrong! Command should not complete.
+        /// @todo This is wrong! Command should not complete.
         fdctrl_stop_transfer(fdctrl, FD_SR0_ABNTERM, FD_SR1_MA | FD_SR1_ND, FD_SR2_MD);
     } else if ((fdctrl->dsr & FD_DSR_DRATEMASK) != cur_drv->media_rate) {
         FLOPPY_DPRINTF("read id rate mismatch (fdc=%d, media=%d)\n",
@@ -2377,6 +2394,7 @@ static void fdctrl_result_timer(void *opaque)
  */
 static DECLCALLBACK(void) fdcTimerCallback(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
 {
+    RT_NOREF(pDevIns, pTimer);
     fdctrl_t *fdctrl = (fdctrl_t *)pvUser;
     fdctrl_result_timer(fdctrl);
 }
@@ -2389,6 +2407,7 @@ static DECLCALLBACK(void) fdcTimerCallback(PPDMDEVINS pDevIns, PTMTIMER pTimer,
  */
 static DECLCALLBACK(int) fdcIoPortWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb)
 {
+    RT_NOREF(pDevIns);
     if (cb == 1)
         fdctrl_write (pvUser, Port & 7, u32);
     else
@@ -2402,6 +2421,7 @@ static DECLCALLBACK(int) fdcIoPortWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPO
  */
 static DECLCALLBACK(int) fdcIoPortRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb)
 {
+    RT_NOREF(pDevIns);
     if (cb == 1)
     {
         *pu32 = fdctrl_read (pvUser, Port & 7);
@@ -2799,6 +2819,7 @@ static DECLCALLBACK(int)  fdcAttach(PPDMDEVINS pDevIns, unsigned iLUN, uint32_t
  */
 static DECLCALLBACK(void) fdcDetach(PPDMDEVINS pDevIns, unsigned iLUN, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
     fdctrl_t *pThis = PDMINS_2_DATA(pDevIns, fdctrl_t *);
     LogFlow (("ideDetach: iLUN=%u\n", iLUN));
 
@@ -2846,6 +2867,7 @@ static DECLCALLBACK(void) fdcReset(PPDMDEVINS pDevIns)
  */
 static DECLCALLBACK(int) fdcConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
 {
+    RT_NOREF(iInstance);
     fdctrl_t      *pThis = PDMINS_2_DATA(pDevIns, fdctrl_t *);
     int            rc;
     unsigned       i, j;
diff --git a/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp b/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp
index cf389d4..3d856b3 100644
--- a/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp
+++ b/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -495,6 +495,8 @@ DECLINLINE(void) lsilogicClearInterrupt(PLSILOGICSCSI pThis, uint32_t uStatus)
     lsilogicUpdateInterrupt(pThis);
 }
 
+
+#ifdef IN_RING3
 /**
  * Sets the I/O controller into fault state and sets the fault code.
  *
@@ -513,6 +515,8 @@ DECLINLINE(void) lsilogicSetIOCFaultCode(PLSILOGICSCSI pThis, uint16_t uIOCFault
     else
         LogFunc(("We are already in FAULT state\n"));
 }
+#endif /* IN_RING3 */
+
 
 /**
  * Returns the number of frames in the reply free queue.
@@ -532,6 +536,8 @@ DECLINLINE(uint32_t) lsilogicReplyFreeQueueGetFrameCount(PLSILOGICSCSI pThis)
     return cReplyFrames;
 }
 
+#ifdef IN_RING3
+
 /**
  * Returns the number of free entries in the reply post queue.
  *
@@ -550,7 +556,6 @@ DECLINLINE(uint32_t) lsilogicReplyPostQueueGetFrameCount(PLSILOGICSCSI pThis)
     return cReplyFrames;
 }
 
-#ifdef IN_RING3
 
 /**
  * Performs a hard reset on the controller.
@@ -586,7 +591,7 @@ static int lsilogicR3HardReset(PLSILOGICSCSI pThis)
     /* Set default values. */
     pThis->cMaxDevices    = pThis->cDeviceStates;
     pThis->cMaxBuses      = 1;
-    pThis->cbReplyFrame   = 128; /* @todo Figure out where it is needed. */
+    pThis->cbReplyFrame   = 128; /** @todo Figure out where it is needed. */
     pThis->u16NextHandle  = 1;
     pThis->u32DiagMemAddr = 0;
 
@@ -675,7 +680,6 @@ static void lsilogicR3FinishContextReply(PLSILOGICSCSI pThis, uint32_t u32Messag
     PDMCritSectLeave(&pThis->ReplyPostQueueCritSect);
 }
 
-#endif /* IN_RING3 */
 
 /**
  * Takes necessary steps to finish a reply frame.
@@ -707,7 +711,7 @@ static void lsilogicFinishAddressReply(PLSILOGICSCSI pThis, PMptReplyUnion pRepl
          * Requests from the request queue are always transferred to R3. So it is not possible
          * that this case happens in R0 or GC.
          */
-#ifdef IN_RING3
+# ifdef IN_RING3
         int rc;
         /* Grab a free reply message from the queue. */
         rc = PDMCritSectEnter(&pThis->ReplyFreeQueueCritSect, VINF_SUCCESS);
@@ -765,13 +769,12 @@ static void lsilogicFinishAddressReply(PLSILOGICSCSI pThis, PMptReplyUnion pRepl
         lsilogicSetInterrupt(pThis, LSILOGIC_REG_HOST_INTR_STATUS_REPLY_INTR);
 
         PDMCritSectLeave(&pThis->ReplyPostQueueCritSect);
-#else
+# else
         AssertMsgFailed(("This is not allowed to happen.\n"));
-#endif
+# endif
     }
 }
 
-#ifdef IN_RING3
 
 /**
  * Tries to find a memory region which covers the given address.
@@ -1092,7 +1095,7 @@ static int lsilogicR3ProcessMessageRequest(PLSILOGICSCSI pThis, PMptMessageHdr p
             pReply->IOCFacts.u8BlockSize          = 12;     /* Block size in 32bit dwords. This is the largest request we can get (SCSI I/O). */
             pReply->IOCFacts.u8Flags              = 0;      /* Bit 0 is set if the guest must upload the FW prior to using the controller. Obviously not needed here. */
             pReply->IOCFacts.u16ReplyQueueDepth   = pThis->cReplyQueueEntries - 1; /* One entry is always free. */
-            pReply->IOCFacts.u16RequestFrameSize  = 128;    /* @todo Figure out where it is needed. */
+            pReply->IOCFacts.u16RequestFrameSize  = 128;    /** @todo Figure out where it is needed. */
             pReply->IOCFacts.u32CurrentHostMFAHighAddr = pThis->u32HostMFAHighAddr;
             pReply->IOCFacts.u16GlobalCredits     = pThis->cRequestQueueEntries - 1; /* One entry is always free. */
 
@@ -1111,7 +1114,7 @@ static int lsilogicR3ProcessMessageRequest(PLSILOGICSCSI pThis, PMptMessageHdr p
                 PFwImageHdr pFwImgHdr = (PFwImageHdr)&pRegion->au32Data[offImgHdr];
 
                 /* Check for the signature. */
-                /** @todo: Checksum validation. */
+                /** @todo Checksum validation. */
                 if (   pFwImgHdr->u32Signature1 == LSILOGIC_FWIMGHDR_SIGNATURE1
                     && pFwImgHdr->u32Signature2 == LSILOGIC_FWIMGHDR_SIGNATURE2
                     && pFwImgHdr->u32Signature3 == LSILOGIC_FWIMGHDR_SIGNATURE3)
@@ -1687,6 +1690,7 @@ PDMBOTHCBDECL(int) lsilogicIOPortWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPOR
     PLSILOGICSCSI   pThis  = PDMINS_2_DATA(pDevIns, PLSILOGICSCSI);
     uint32_t        offReg = Port - pThis->IOPortBase;
     int             rc;
+    RT_NOREF2(pvUser, cb);
 
     if (!(offReg & 3))
     {
@@ -1710,6 +1714,8 @@ PDMBOTHCBDECL(int) lsilogicIOPortRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT
 {
     PLSILOGICSCSI   pThis   = PDMINS_2_DATA(pDevIns, PLSILOGICSCSI);
     uint32_t        offReg  = Port - pThis->IOPortBase;
+    RT_NOREF_PV(pvUser);
+    RT_NOREF_PV(cb);
 
     int rc = lsilogicRegisterRead(pThis, offReg & ~(uint32_t)3, pu32);
     if (rc == VINF_IOM_R3_MMIO_READ)
@@ -1727,6 +1733,7 @@ PDMBOTHCBDECL(int) lsilogicMMIOWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS
     uint32_t        offReg = GCPhysAddr - pThis->GCPhysMMIOBase;
     uint32_t        u32;
     int             rc;
+    RT_NOREF_PV(pvUser);
 
     /* See comments in lsilogicR3Map regarding size and alignment. */
     if (cb == 4)
@@ -1760,6 +1767,7 @@ PDMBOTHCBDECL(int) lsilogicMMIORead(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS G
     PLSILOGICSCSI   pThis  = PDMINS_2_DATA(pDevIns, PLSILOGICSCSI);
     uint32_t        offReg = GCPhysAddr - pThis->GCPhysMMIOBase;
     Assert(!(offReg & 3)); Assert(cb == 4);
+    RT_NOREF2(pvUser, cb);
 
     return lsilogicRegisterRead(pThis, offReg, (uint32_t *)pv);
 }
@@ -1767,20 +1775,24 @@ PDMBOTHCBDECL(int) lsilogicMMIORead(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS G
 PDMBOTHCBDECL(int) lsilogicDiagnosticWrite(PPDMDEVINS pDevIns, void *pvUser,
                                            RTGCPHYS GCPhysAddr, void const *pv, unsigned cb)
 {
+#ifdef LOG_ENABLED
     PLSILOGICSCSI  pThis = PDMINS_2_DATA(pDevIns, PLSILOGICSCSI);
-
     LogFlowFunc(("pThis=%#p GCPhysAddr=%RGp pv=%#p{%.*Rhxs} cb=%u\n", pThis, GCPhysAddr, pv, cb, pv, cb));
+#endif
 
+    RT_NOREF_PV(pDevIns); RT_NOREF_PV(pvUser); RT_NOREF_PV(GCPhysAddr); RT_NOREF_PV(pv); RT_NOREF_PV(cb);
     return VINF_SUCCESS;
 }
 
 PDMBOTHCBDECL(int) lsilogicDiagnosticRead(PPDMDEVINS pDevIns, void *pvUser,
                                           RTGCPHYS GCPhysAddr, void *pv, unsigned cb)
 {
+#ifdef LOG_ENABLED
     PLSILOGICSCSI  pThis = PDMINS_2_DATA(pDevIns, PLSILOGICSCSI);
-
     LogFlowFunc(("pThis=%#p GCPhysAddr=%RGp pv=%#p{%.*Rhxs} cb=%u\n", pThis, GCPhysAddr, pv, cb, pv, cb));
+#endif
 
+    RT_NOREF_PV(pDevIns); RT_NOREF_PV(pvUser); RT_NOREF_PV(GCPhysAddr); RT_NOREF_PV(pv); RT_NOREF_PV(cb);
     return VINF_SUCCESS;
 }
 
@@ -2190,7 +2202,7 @@ static int lsilogicR3ProcessSCSIIORequest(PLSILOGICSCSI pThis, PLSILOGICREQ pLsi
 
                 rc = lsilogicIoBufAllocate(pThis->CTX_SUFF(pDevIns), pLsiReq,
                                                            pLsiReq->GuestRequest.SCSIIO.u32DataLength);
-                AssertRC(rc); /** @todo: Insufficient resources error. */
+                AssertRC(rc); /** @todo Insufficient resources error. */
             }
 
             /* Setup the SCSI request. */
@@ -2286,9 +2298,10 @@ static int lsilogicR3ProcessSCSIIORequest(PLSILOGICSCSI pThis, PLSILOGICREQ pLsi
 static DECLCALLBACK(int) lsilogicR3DeviceSCSIRequestCompleted(PPDMISCSIPORT pInterface, PPDMSCSIREQUEST pSCSIRequest,
                                                               int rcCompletion, bool fRedo, int rcReq)
 {
-    PLSILOGICREQ pLsiReq      = (PLSILOGICREQ)pSCSIRequest->pvUser;
-    PLSILOGICDEVICE    pLsiLogicDevice = pLsiReq->pTargetDevice;
-    PLSILOGICSCSI      pThis       = pLsiLogicDevice->CTX_SUFF(pLsiLogic);
+    RT_NOREF(pInterface);
+    PLSILOGICREQ    pLsiReq         = (PLSILOGICREQ)pSCSIRequest->pvUser;
+    PLSILOGICDEVICE pLsiLogicDevice = pLsiReq->pTargetDevice;
+    PLSILOGICSCSI   pThis           = pLsiLogicDevice->CTX_SUFF(pLsiLogic);
 
     /* If the task failed but it is possible to redo it again after a suspend
      * add it to the list. */
@@ -2405,6 +2418,7 @@ static int lsilogicR3ConfigurationIOUnitPageGetFromNumber(PLSILOGICSCSI pThis,
                                                           PMptConfigurationPageHeader *ppPageHeader,
                                                           uint8_t **ppbPageData, size_t *pcbPage)
 {
+    RT_NOREF(pThis);
     int rc = VINF_SUCCESS;
 
     AssertPtr(ppPageHeader); Assert(ppbPageData);
@@ -2459,6 +2473,7 @@ static int lsilogicR3ConfigurationIOCPageGetFromNumber(PLSILOGICSCSI pThis,
                                                        PMptConfigurationPageHeader *ppPageHeader,
                                                        uint8_t **ppbPageData, size_t *pcbPage)
 {
+    RT_NOREF(pThis);
     int rc = VINF_SUCCESS;
 
     AssertPtr(ppPageHeader); Assert(ppbPageData);
@@ -2607,6 +2622,7 @@ static int lsilogicR3ConfigurationBiosPageGetFromNumber(PLSILOGICSCSI pThis,
                                                         PMptConfigurationPageHeader *ppPageHeader,
                                                         uint8_t **ppbPageData, size_t *pcbPage)
 {
+    RT_NOREF(pThis);
     int rc = VINF_SUCCESS;
 
     AssertPtr(ppPageHeader); Assert(ppbPageData);
@@ -2652,6 +2668,7 @@ static int lsilogicR3ConfigurationSCSISPIPortPageGetFromNumber(PLSILOGICSCSI pTh
                                                                PMptConfigurationPageHeader *ppPageHeader,
                                                                uint8_t **ppbPageData, size_t *pcbPage)
 {
+    RT_NOREF(pThis);
     int rc = VINF_SUCCESS;
     AssertPtr(ppPageHeader); Assert(ppbPageData);
 
@@ -2700,6 +2717,7 @@ static int lsilogicR3ConfigurationSCSISPIDevicePageGetFromNumber(PLSILOGICSCSI p
                                                                  PMptConfigurationPageHeader *ppPageHeader,
                                                                  uint8_t **ppbPageData, size_t *pcbPage)
 {
+    RT_NOREF(pThis);
     int rc = VINF_SUCCESS;
     AssertPtr(ppPageHeader); Assert(ppbPageData);
 
@@ -2744,6 +2762,7 @@ static int lsilogicR3ConfigurationSASIOUnitPageGetFromNumber(PLSILOGICSCSI pThis
                                                              PMptExtendedConfigurationPageHeader *ppPageHeader,
                                                              uint8_t **ppbPageData, size_t *pcbPage)
 {
+    RT_NOREF(pThis);
     int rc = VINF_SUCCESS;
 
     switch (u8PageNumber)
@@ -2782,6 +2801,7 @@ static int lsilogicR3ConfigurationSASPHYPageGetFromNumber(PLSILOGICSCSI pThis,
                                                           PMptExtendedConfigurationPageHeader *ppPageHeader,
                                                           uint8_t **ppbPageData, size_t *pcbPage)
 {
+    RT_NOREF(pThis);
     int rc = VINF_SUCCESS;
     uint8_t uAddressForm = MPT_CONFIGURATION_PAGE_ADDRESS_GET_SAS_FORM(PageAddress);
     PMptConfigurationPagesSas pPagesSas = &pPages->u.SasPages;
@@ -2845,6 +2865,7 @@ static int lsilogicR3ConfigurationSASDevicePageGetFromNumber(PLSILOGICSCSI pThis
                                                              PMptExtendedConfigurationPageHeader *ppPageHeader,
                                                              uint8_t **ppbPageData, size_t *pcbPage)
 {
+    RT_NOREF(pThis);
     int rc = VINF_SUCCESS;
     uint8_t uAddressForm = MPT_CONFIGURATION_PAGE_ADDRESS_GET_SAS_FORM(PageAddress);
     PMptConfigurationPagesSas pPagesSas = &pPages->u.SasPages;
@@ -3717,6 +3738,7 @@ static void lsilogicR3InitializeConfigurationPages(PLSILOGICSCSI pThis)
  */
 static DECLCALLBACK(bool) lsilogicR3NotifyQueueConsumer(PPDMDEVINS pDevIns, PPDMQUEUEITEMCORE pItem)
 {
+    RT_NOREF(pItem);
     PLSILOGICSCSI pThis = PDMINS_2_DATA(pDevIns, PLSILOGICSCSI);
     int rc = VINF_SUCCESS;
 
@@ -3759,6 +3781,7 @@ static int lsilogicR3GetCtrlTypeFromString(PLSILOGICSCSI pThis, const char *pcsz
  */
 static DECLCALLBACK(int) lsilogicR3IsaIOPortRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb)
 {
+    RT_NOREF(pvUser, cb);
     PLSILOGICSCSI pThis = PDMINS_2_DATA(pDevIns, PLSILOGICSCSI);
 
     Assert(cb == 1);
@@ -3835,6 +3858,7 @@ static int lsilogicR3PrepareBiosScsiRequest(PLSILOGICSCSI pThis)
  */
 static DECLCALLBACK(int) lsilogicR3IsaIOPortWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb)
 {
+    RT_NOREF(pvUser, cb);
     PLSILOGICSCSI pThis = PDMINS_2_DATA(pDevIns, PLSILOGICSCSI);
     Log2(("#%d %s: pvUser=%#p cb=%d u32=%#x Port=%#x\n", pDevIns->iInstance, __FUNCTION__, pvUser, cb, u32, Port));
 
@@ -3872,6 +3896,7 @@ static DECLCALLBACK(int) lsilogicR3IsaIOPortWrite(PPDMDEVINS pDevIns, void *pvUs
 static DECLCALLBACK(int) lsilogicR3IsaIOPortWriteStr(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port,
                                                      uint8_t const *pbSrc, uint32_t *pcTransfers, unsigned cb)
 {
+    RT_NOREF(pvUser);
     PLSILOGICSCSI pThis = PDMINS_2_DATA(pDevIns, PLSILOGICSCSI);
     Log2(("#%d %s: pvUser=%#p cb=%d Port=%#x\n", pDevIns->iInstance, __FUNCTION__, pvUser, cb, Port));
 
@@ -3900,6 +3925,7 @@ static DECLCALLBACK(int) lsilogicR3IsaIOPortWriteStr(PPDMDEVINS pDevIns, void *p
 static DECLCALLBACK(int) lsilogicR3IsaIOPortReadStr(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port,
                                                     uint8_t *pbDst, uint32_t *pcTransfers, unsigned cb)
 {
+    RT_NOREF(pvUser);
     PLSILOGICSCSI pThis = PDMINS_2_DATA(pDevIns, PLSILOGICSCSI);
     LogFlowFunc(("#%d %s: pvUser=%#p cb=%d Port=%#x\n", pDevIns->iInstance, __FUNCTION__, pvUser, cb, Port));
 
@@ -4313,6 +4339,7 @@ static DECLCALLBACK(int) lsilogicR3Worker(PPDMDEVINS pDevIns, PPDMTHREAD pThread
  */
 static DECLCALLBACK(int) lsilogicR3WorkerWakeUp(PPDMDEVINS pDevIns, PPDMTHREAD pThread)
 {
+    RT_NOREF(pThread);
     PLSILOGICSCSI pThis = PDMINS_2_DATA(pDevIns, PLSILOGICSCSI);
     return SUPSemEventSignal(pThis->pSupDrvSession, pThis->hEvtProcess);
 }
@@ -4350,6 +4377,7 @@ static void lsilogicR3Kick(PLSILOGICSCSI pThis)
  */
 static DECLCALLBACK(int) lsilogicR3LiveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uPass)
 {
+    RT_NOREF(uPass);
     PLSILOGICSCSI pThis = PDMINS_2_DATA(pDevIns, PLSILOGICSCSI);
 
     SSMR3PutU32(pSSM, pThis->enmCtrlType);
@@ -4517,7 +4545,7 @@ static DECLCALLBACK(int) lsilogicR3SaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
         AssertMsgFailed(("Invalid controller type %d\n", pThis->enmCtrlType));
 
     vboxscsiR3SaveExec(&pThis->VBoxSCSI, pSSM);
-    return SSMR3PutU32(pSSM, ~0);
+    return SSMR3PutU32(pSSM, UINT32_MAX);
 }
 
 /**
@@ -4525,6 +4553,7 @@ static DECLCALLBACK(int) lsilogicR3SaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
  */
 static DECLCALLBACK(int) lsilogicR3LoadDone(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
 {
+    RT_NOREF(pSSM);
     PLSILOGICSCSI pThis = PDMINS_2_DATA(pDevIns, PLSILOGICSCSI);
 
     lsilogicR3Kick(pThis);
@@ -4858,7 +4887,7 @@ static DECLCALLBACK(int) lsilogicR3LoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM,
     rc = SSMR3GetU32(pSSM, &u32);
     if (RT_FAILURE(rc))
         return rc;
-    AssertMsgReturn(u32 == ~0U, ("%#x\n", u32), VERR_SSM_DATA_UNIT_FORMAT_CHANGED);
+    AssertMsgReturn(u32 == UINT32_MAX, ("%#x\n", u32), VERR_SSM_DATA_UNIT_FORMAT_CHANGED);
 
     return VINF_SUCCESS;
 }
@@ -5067,6 +5096,7 @@ static DECLCALLBACK(void) lsilogicR3Resume(PPDMDEVINS pDevIns)
  */
 static DECLCALLBACK(void) lsilogicR3Detach(PPDMDEVINS pDevIns, unsigned iLUN, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
     PLSILOGICSCSI   pThis = PDMINS_2_DATA(pDevIns, PLSILOGICSCSI);
     PLSILOGICDEVICE pDevice = &pThis->paDeviceStates[iLUN];
 
diff --git a/src/VBox/Devices/Storage/DevLsiLogicSCSI.h b/src/VBox/Devices/Storage/DevLsiLogicSCSI.h
index 6cc2c6c..ca1cbdd 100644
--- a/src/VBox/Devices/Storage/DevLsiLogicSCSI.h
+++ b/src/VBox/Devices/Storage/DevLsiLogicSCSI.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Storage/DrvDiskIntegrity.cpp b/src/VBox/Devices/Storage/DrvDiskIntegrity.cpp
index a643a2e..d5251e8 100644
--- a/src/VBox/Devices/Storage/DrvDiskIntegrity.cpp
+++ b/src/VBox/Devices/Storage/DrvDiskIntegrity.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -737,7 +737,7 @@ static int drvdiskintReadAfterWriteVerify(PDRVDISKINTEGRITY pThis, PDRVDISKAIORE
 
     if (pThis->fCheckConsistency)
         rc = drvdiskintReadVerify(pThis, pIoReq->paSeg, pIoReq->cSeg, pIoReq->off, pIoReq->cbTransfer);
-    else /** @todo: Implement read after write verification without a memory based image of the disk. */
+    else /** @todo Implement read after write verification without a memory based image of the disk. */
         AssertMsgFailed(("TODO\n"));
 
     return rc;
@@ -755,7 +755,7 @@ static int drvdiskintReadAfterWriteVerify(PDRVDISKINTEGRITY pThis, PDRVDISKAIORE
 *   Media interface methods                                                                                                      *
 *********************************************************************************************************************************/
 
-/** @copydoc PDMIMEDIA::pfnRead */
+/** @interface_method_impl{PDMIMEDIA,pfnRead} */
 static DECLCALLBACK(int) drvdiskintRead(PPDMIMEDIA pInterface,
                                         uint64_t off, void *pvBuf, size_t cbRead)
 {
@@ -800,7 +800,7 @@ static DECLCALLBACK(int) drvdiskintRead(PPDMIMEDIA pInterface,
     return rc;
 }
 
-/** @copydoc PDMIMEDIA::pfnWrite */
+/** @interface_method_impl{PDMIMEDIA,pfnWrite} */
 static DECLCALLBACK(int) drvdiskintWrite(PPDMIMEDIA pInterface,
                                          uint64_t off, const void *pvBuf,
                                          size_t cbWrite)
@@ -970,7 +970,7 @@ static DECLCALLBACK(int) drvdiskintStartWrite(PPDMIMEDIAASYNC pInterface, uint64
     return rc;
 }
 
-/** @copydoc PDMIMEDIAASYNC::pfnStartFlush */
+/** @interface_method_impl{PDMIMEDIAASYNC,pfnStartFlush} */
 static DECLCALLBACK(int) drvdiskintStartFlush(PPDMIMEDIAASYNC pInterface, void *pvUser)
 {
     int rc = VINF_SUCCESS;
@@ -1007,7 +1007,7 @@ static DECLCALLBACK(int) drvdiskintStartFlush(PPDMIMEDIAASYNC pInterface, void *
     return rc;
 }
 
-/** @copydoc PDMIMEDIAASYNC::pfnStartDiscard */
+/** @interface_method_impl{PDMIMEDIAASYNC,pfnStartDiscard} */
 static DECLCALLBACK(int) drvdiskintStartDiscard(PPDMIMEDIAASYNC pInterface, PCRTRANGE paRanges, unsigned cRanges, void *pvUser)
 {
     int rc = VINF_SUCCESS;
@@ -1043,7 +1043,7 @@ static DECLCALLBACK(int) drvdiskintStartDiscard(PPDMIMEDIAASYNC pInterface, PCRT
     return rc;
 }
 
-/** @copydoc PDMIMEDIA::pfnFlush */
+/** @interface_method_impl{PDMIMEDIA,pfnFlush} */
 static DECLCALLBACK(int) drvdiskintFlush(PPDMIMEDIA pInterface)
 {
     int rc = VINF_SUCCESS;
@@ -1068,21 +1068,21 @@ static DECLCALLBACK(int) drvdiskintFlush(PPDMIMEDIA pInterface)
     return rc;
 }
 
-/** @copydoc PDMIMEDIA::pfnGetSize */
+/** @interface_method_impl{PDMIMEDIA,pfnGetSize} */
 static DECLCALLBACK(uint64_t) drvdiskintGetSize(PPDMIMEDIA pInterface)
 {
     PDRVDISKINTEGRITY pThis = PDMIMEDIA_2_DRVDISKINTEGRITY(pInterface);
     return pThis->pDrvMedia->pfnGetSize(pThis->pDrvMedia);
 }
 
-/** @copydoc PDMIMEDIA::pfnIsReadOnly */
+/** @interface_method_impl{PDMIMEDIA,pfnIsReadOnly} */
 static DECLCALLBACK(bool) drvdiskintIsReadOnly(PPDMIMEDIA pInterface)
 {
     PDRVDISKINTEGRITY pThis = PDMIMEDIA_2_DRVDISKINTEGRITY(pInterface);
     return pThis->pDrvMedia->pfnIsReadOnly(pThis->pDrvMedia);
 }
 
-/** @copydoc PDMIMEDIA::pfnBiosGetPCHSGeometry */
+/** @interface_method_impl{PDMIMEDIA,pfnBiosGetPCHSGeometry} */
 static DECLCALLBACK(int) drvdiskintBiosGetPCHSGeometry(PPDMIMEDIA pInterface,
                                                        PPDMMEDIAGEOMETRY pPCHSGeometry)
 {
@@ -1090,7 +1090,7 @@ static DECLCALLBACK(int) drvdiskintBiosGetPCHSGeometry(PPDMIMEDIA pInterface,
     return pThis->pDrvMedia->pfnBiosGetPCHSGeometry(pThis->pDrvMedia, pPCHSGeometry);
 }
 
-/** @copydoc PDMIMEDIA::pfnBiosSetPCHSGeometry */
+/** @interface_method_impl{PDMIMEDIA,pfnBiosSetPCHSGeometry} */
 static DECLCALLBACK(int) drvdiskintBiosSetPCHSGeometry(PPDMIMEDIA pInterface,
                                                        PCPDMMEDIAGEOMETRY pPCHSGeometry)
 {
@@ -1098,7 +1098,7 @@ static DECLCALLBACK(int) drvdiskintBiosSetPCHSGeometry(PPDMIMEDIA pInterface,
     return pThis->pDrvMedia->pfnBiosSetPCHSGeometry(pThis->pDrvMedia, pPCHSGeometry);
 }
 
-/** @copydoc PDMIMEDIA::pfnBiosGetLCHSGeometry */
+/** @interface_method_impl{PDMIMEDIA,pfnBiosGetLCHSGeometry} */
 static DECLCALLBACK(int) drvdiskintBiosGetLCHSGeometry(PPDMIMEDIA pInterface,
                                                        PPDMMEDIAGEOMETRY pLCHSGeometry)
 {
@@ -1106,7 +1106,7 @@ static DECLCALLBACK(int) drvdiskintBiosGetLCHSGeometry(PPDMIMEDIA pInterface,
     return pThis->pDrvMedia->pfnBiosGetLCHSGeometry(pThis->pDrvMedia, pLCHSGeometry);
 }
 
-/** @copydoc PDMIMEDIA::pfnBiosSetLCHSGeometry */
+/** @interface_method_impl{PDMIMEDIA,pfnBiosSetLCHSGeometry} */
 static DECLCALLBACK(int) drvdiskintBiosSetLCHSGeometry(PPDMIMEDIA pInterface,
                                                   PCPDMMEDIAGEOMETRY pLCHSGeometry)
 {
@@ -1114,21 +1114,21 @@ static DECLCALLBACK(int) drvdiskintBiosSetLCHSGeometry(PPDMIMEDIA pInterface,
     return pThis->pDrvMedia->pfnBiosSetLCHSGeometry(pThis->pDrvMedia, pLCHSGeometry);
 }
 
-/** @copydoc PDMIMEDIA::pfnGetUuid */
+/** @interface_method_impl{PDMIMEDIA,pfnGetUuid} */
 static DECLCALLBACK(int) drvdiskintGetUuid(PPDMIMEDIA pInterface, PRTUUID pUuid)
 {
     PDRVDISKINTEGRITY pThis = PDMIMEDIA_2_DRVDISKINTEGRITY(pInterface);
     return pThis->pDrvMedia->pfnGetUuid(pThis->pDrvMedia, pUuid);
 }
 
-/** @copydoc PDMIMEDIA::pfnGetSectorSize */
+/** @interface_method_impl{PDMIMEDIA,pfnGetSectorSize} */
 static DECLCALLBACK(uint32_t) drvdiskintGetSectorSize(PPDMIMEDIA pInterface)
 {
     PDRVDISKINTEGRITY pThis = PDMIMEDIA_2_DRVDISKINTEGRITY(pInterface);
     return pThis->pDrvMedia->pfnGetSectorSize(pThis->pDrvMedia);
 }
 
-/** @copydoc PDMIMEDIA::pfnDiscard */
+/** @interface_method_impl{PDMIMEDIA,pfnDiscard} */
 static DECLCALLBACK(int) drvdiskintDiscard(PPDMIMEDIA pInterface, PCRTRANGE paRanges, unsigned cRanges)
 {
     int rc = VINF_SUCCESS;
@@ -1155,7 +1155,7 @@ static DECLCALLBACK(int) drvdiskintDiscard(PPDMIMEDIA pInterface, PCRTRANGE paRa
     return rc;
 }
 
-/** @copydoc PDMIMEDIA::pfnIoBufAlloc */
+/** @interface_method_impl{PDMIMEDIA,pfnIoBufAlloc} */
 static DECLCALLBACK(int) drvdiskintIoBufAlloc(PPDMIMEDIA pInterface, size_t cb, void **ppvNew)
 {
     LogFlowFunc(("\n"));
@@ -1164,7 +1164,7 @@ static DECLCALLBACK(int) drvdiskintIoBufAlloc(PPDMIMEDIA pInterface, size_t cb,
     return pThis->pDrvMedia->pfnIoBufAlloc(pThis->pDrvMedia, cb, ppvNew);
 }
 
-/** @copydoc PDMIMEDIA::pfnIoBufFree */
+/** @interface_method_impl{PDMIMEDIA,pfnIoBufFree} */
 static DECLCALLBACK(int) drvdiskintIoBufFree(PPDMIMEDIA pInterface, void *pv, size_t cb)
 {
     LogFlowFunc(("\n"));
@@ -1173,7 +1173,7 @@ static DECLCALLBACK(int) drvdiskintIoBufFree(PPDMIMEDIA pInterface, void *pv, si
     return pThis->pDrvMedia->pfnIoBufFree(pThis->pDrvMedia, pv, cb);
 }
 
-/** @copydoc PDMIMEDIA::pfnReadPcBios */
+/** @interface_method_impl{PDMIMEDIA,pfnReadPcBios} */
 static DECLCALLBACK(int) drvdiskintReadPcBios(PPDMIMEDIA pInterface,
                                               uint64_t off, void *pvBuf, size_t cbRead)
 {
diff --git a/src/VBox/Devices/Storage/DrvHostBase.cpp b/src/VBox/Devices/Storage/DrvHostBase.cpp
index d4a56b9..335e735 100644
--- a/src/VBox/Devices/Storage/DrvHostBase.cpp
+++ b/src/VBox/Devices/Storage/DrvHostBase.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -50,7 +50,7 @@ extern "C" char *getfullblkname(char *);
 
 #elif defined(RT_OS_WINDOWS)
 # define WIN32_NO_STATUS
-# include <Windows.h>
+# include <iprt/win/windows.h>
 # include <dbt.h>
 # undef WIN32_NO_STATUS
 # include <ntstatus.h>
@@ -132,7 +132,7 @@ NTSTATUS __stdcall NtQueryVolumeInformationFile(
 
 /* -=-=-=-=- IBlock -=-=-=-=- */
 
-/** @copydoc PDMIBLOCK::pfnRead */
+/** @interface_method_impl{PDMIBLOCK,pfnRead} */
 static DECLCALLBACK(int) drvHostBaseRead(PPDMIMEDIA pInterface, uint64_t off, void *pvBuf, size_t cbRead)
 {
     PDRVHOSTBASE pThis = PDMIMEDIA_2_DRVHOSTBASE(pInterface);
@@ -148,7 +148,7 @@ static DECLCALLBACK(int) drvHostBaseRead(PPDMIMEDIA pInterface, uint64_t off, vo
     if (    pThis->fMediaPresent
         &&  pThis->ppScsiTaskDI
         &&  pThis->cbBlock)
-#elif RT_OS_FREEBSD
+#elif defined(RT_OS_FREEBSD)
     if (    pThis->fMediaPresent
         &&  pThis->cbBlock)
 #else
@@ -208,9 +208,10 @@ static DECLCALLBACK(int) drvHostBaseRead(PPDMIMEDIA pInterface, uint64_t off, vo
 }
 
 
-/** @copydoc PDMIBLOCK::pfnWrite */
+/** @interface_method_impl{PDMIBLOCK,pfnWrite} */
 static DECLCALLBACK(int) drvHostBaseWrite(PPDMIMEDIA pInterface, uint64_t off, const void *pvBuf, size_t cbWrite)
 {
+    RT_NOREF(off, pvBuf, cbWrite);
     PDRVHOSTBASE pThis = PDMIMEDIA_2_DRVHOSTBASE(pInterface);
     LogFlow(("%s-%d: drvHostBaseWrite: off=%#llx pvBuf=%p cbWrite=%#x (%s)\n",
              pThis->pDrvIns->pReg->szName, pThis->pDrvIns->iInstance, off, pvBuf, cbWrite, pThis->pszDevice));
@@ -254,7 +255,7 @@ static DECLCALLBACK(int) drvHostBaseWrite(PPDMIMEDIA pInterface, uint64_t off, c
 }
 
 
-/** @copydoc PDMIBLOCK::pfnFlush */
+/** @interface_method_impl{PDMIBLOCK,pfnFlush} */
 static DECLCALLBACK(int) drvHostBaseFlush(PPDMIMEDIA pInterface)
 {
     int rc;
@@ -281,7 +282,7 @@ static DECLCALLBACK(int) drvHostBaseFlush(PPDMIMEDIA pInterface)
 }
 
 
-/** @copydoc PDMIBLOCK::pfnIsReadOnly */
+/** @interface_method_impl{PDMIBLOCK,pfnIsReadOnly} */
 static DECLCALLBACK(bool) drvHostBaseIsReadOnly(PPDMIMEDIA pInterface)
 {
     PDRVHOSTBASE pThis = PDMIMEDIA_2_DRVHOSTBASE(pInterface);
@@ -289,7 +290,7 @@ static DECLCALLBACK(bool) drvHostBaseIsReadOnly(PPDMIMEDIA pInterface)
 }
 
 
-/** @copydoc PDMIBLOCK::pfnGetSize */
+/** @interface_method_impl{PDMIBLOCK,pfnGetSize} */
 static DECLCALLBACK(uint64_t) drvHostBaseGetSize(PPDMIMEDIA pInterface)
 {
     PDRVHOSTBASE pThis = PDMIMEDIA_2_DRVHOSTBASE(pInterface);
@@ -305,7 +306,7 @@ static DECLCALLBACK(uint64_t) drvHostBaseGetSize(PPDMIMEDIA pInterface)
 }
 
 
-/** @copydoc PDMIBLOCK::pfnGetType */
+/** @interface_method_impl{PDMIBLOCK,pfnGetType} */
 static DECLCALLBACK(PDMMEDIATYPE) drvHostBaseGetType(PPDMIMEDIA pInterface)
 {
     PDRVHOSTBASE pThis = PDMIMEDIA_2_DRVHOSTBASE(pInterface);
@@ -314,7 +315,7 @@ static DECLCALLBACK(PDMMEDIATYPE) drvHostBaseGetType(PPDMIMEDIA pInterface)
 }
 
 
-/** @copydoc PDMIBLOCK::pfnGetUuid */
+/** @interface_method_impl{PDMIBLOCK,pfnGetUuid} */
 static DECLCALLBACK(int) drvHostBaseGetUuid(PPDMIMEDIA pInterface, PRTUUID pUuid)
 {
     PDRVHOSTBASE pThis = PDMIMEDIA_2_DRVHOSTBASE(pInterface);
@@ -326,13 +327,13 @@ static DECLCALLBACK(int) drvHostBaseGetUuid(PPDMIMEDIA pInterface, PRTUUID pUuid
 }
 
 
-/** @copydoc PDMIBLOCK::pfnIoBufAlloc */
+/** @interface_method_impl{PDMIBLOCK,pfnIoBufAlloc} */
 static DECLCALLBACK(int) drvHostBaseIoBufAlloc(PPDMIMEDIA pInterface, size_t cb, void **ppvNew)
 {
+    RT_NOREF(pInterface);
     LogFlowFunc(("\n"));
-    int rc;
-    PDRVHOSTBASE pThis = PDMIMEDIA_2_DRVHOSTBASE(pInterface);
 
+    int rc;
     void *pvNew = RTMemAlloc(cb);
     if (RT_LIKELY(pvNew))
     {
@@ -346,22 +347,20 @@ static DECLCALLBACK(int) drvHostBaseIoBufAlloc(PPDMIMEDIA pInterface, size_t cb,
     return rc;
 }
 
-/** @copydoc PDMIBLOCK::pfnIoBufFree */
+/** @interface_method_impl{PDMIBLOCK,pfnIoBufFree} */
 static DECLCALLBACK(int) drvHostBaseIoBufFree(PPDMIMEDIA pInterface, void *pv, size_t cb)
 {
+    RT_NOREF(pInterface, cb);
     LogFlowFunc(("\n"));
-    int rc = VINF_SUCCESS;
-    PDRVHOSTBASE pThis = PDMIMEDIA_2_DRVHOSTBASE(pInterface);
 
-    NOREF(cb);
     RTMemFree(pv);
 
-    LogFlowFunc(("returns %Rrc\n", rc));
-    return rc;
+    LogFlowFunc(("returns %Rrc\n", VINF_SUCCESS));
+    return VINF_SUCCESS;
 }
 
 
-/** @copydoc PDMIBLOCKBIOS::pfnBiosGetPCHSGeometry */
+/** @interface_method_impl{PDMIBLOCKBIOS,pfnBiosGetPCHSGeometry} */
 static DECLCALLBACK(int) drvHostBaseGetPCHSGeometry(PPDMIMEDIA pInterface, PPDMMEDIAGEOMETRY pPCHSGeometry)
 {
     PDRVHOSTBASE pThis =  PDMIMEDIA_2_DRVHOSTBASE(pInterface);
@@ -389,7 +388,7 @@ static DECLCALLBACK(int) drvHostBaseGetPCHSGeometry(PPDMIMEDIA pInterface, PPDMM
 }
 
 
-/** @copydoc PDMIBLOCKBIOS::pfnBiosSetPCHSGeometry */
+/** @interface_method_impl{PDMIBLOCKBIOS,pfnBiosSetPCHSGeometry} */
 static DECLCALLBACK(int) drvHostBaseSetPCHSGeometry(PPDMIMEDIA pInterface, PCPDMMEDIAGEOMETRY pPCHSGeometry)
 {
     PDRVHOSTBASE pThis =  PDMIMEDIA_2_DRVHOSTBASE(pInterface);
@@ -413,7 +412,7 @@ static DECLCALLBACK(int) drvHostBaseSetPCHSGeometry(PPDMIMEDIA pInterface, PCPDM
 }
 
 
-/** @copydoc PDMIBLOCKBIOS::pfnGetLCHSGeometry */
+/** @interface_method_impl{PDMIBLOCKBIOS,pfnGetLCHSGeometry} */
 static DECLCALLBACK(int) drvHostBaseGetLCHSGeometry(PPDMIMEDIA pInterface, PPDMMEDIAGEOMETRY pLCHSGeometry)
 {
     PDRVHOSTBASE pThis =  PDMIMEDIA_2_DRVHOSTBASE(pInterface);
@@ -441,7 +440,7 @@ static DECLCALLBACK(int) drvHostBaseGetLCHSGeometry(PPDMIMEDIA pInterface, PPDMM
 }
 
 
-/** @copydoc PDMIBLOCKBIOS::pfnSetLCHSGeometry */
+/** @interface_method_impl{PDMIBLOCKBIOS,pfnSetLCHSGeometry} */
 static DECLCALLBACK(int) drvHostBaseSetLCHSGeometry(PPDMIMEDIA pInterface, PCPDMMEDIAGEOMETRY pLCHSGeometry)
 {
     PDRVHOSTBASE pThis =  PDMIMEDIA_2_DRVHOSTBASE(pInterface);
@@ -465,7 +464,7 @@ static DECLCALLBACK(int) drvHostBaseSetLCHSGeometry(PPDMIMEDIA pInterface, PCPDM
 }
 
 
-/** @copydoc PDMIBLOCKBIOS::pfnIsVisible */
+/** @interface_method_impl{PDMIBLOCKBIOS,pfnIsVisible} */
 static DECLCALLBACK(bool) drvHostBaseIsVisible(PPDMIMEDIA pInterface)
 {
     PDRVHOSTBASE pThis =  PDMIMEDIA_2_DRVHOSTBASE(pInterface);
@@ -476,9 +475,10 @@ static DECLCALLBACK(bool) drvHostBaseIsVisible(PPDMIMEDIA pInterface)
 
 /* -=-=-=-=- IMount -=-=-=-=- */
 
-/** @copydoc PDMIMOUNT::pfnUnmount */
+/** @interface_method_impl{PDMIMOUNT,pfnUnmount} */
 static DECLCALLBACK(int) drvHostBaseUnmount(PPDMIMOUNT pInterface, bool fForce, bool fEject)
 {
+    RT_NOREF(fEject);
     /* While we're not mountable (see drvHostBaseMount), we're unmountable. */
     PDRVHOSTBASE pThis = PDMIMOUNT_2_DRVHOSTBASE(pInterface);
     RTCritSectEnter(&pThis->CritSect);
@@ -515,7 +515,7 @@ static DECLCALLBACK(int) drvHostBaseUnmount(PPDMIMOUNT pInterface, bool fForce,
 }
 
 
-/** @copydoc PDMIMOUNT::pfnIsMounted */
+/** @interface_method_impl{PDMIMOUNT,pfnIsMounted} */
 static DECLCALLBACK(bool) drvHostBaseIsMounted(PPDMIMOUNT pInterface)
 {
     PDRVHOSTBASE pThis = PDMIMOUNT_2_DRVHOSTBASE(pInterface);
@@ -528,7 +528,7 @@ static DECLCALLBACK(bool) drvHostBaseIsMounted(PPDMIMOUNT pInterface)
 }
 
 
-/** @copydoc PDMIMOUNT::pfnIsLocked */
+/** @interface_method_impl{PDMIMOUNT,pfnIsLocked} */
 static DECLCALLBACK(int) drvHostBaseLock(PPDMIMOUNT pInterface)
 {
     PDRVHOSTBASE pThis = PDMIMOUNT_2_DRVHOSTBASE(pInterface);
@@ -551,7 +551,7 @@ static DECLCALLBACK(int) drvHostBaseLock(PPDMIMOUNT pInterface)
 }
 
 
-/** @copydoc PDMIMOUNT::pfnIsLocked */
+/** @interface_method_impl{PDMIMOUNT,pfnIsLocked} */
 static DECLCALLBACK(int) drvHostBaseUnlock(PPDMIMOUNT pInterface)
 {
     PDRVHOSTBASE pThis = PDMIMOUNT_2_DRVHOSTBASE(pInterface);
@@ -574,7 +574,7 @@ static DECLCALLBACK(int) drvHostBaseUnlock(PPDMIMOUNT pInterface)
 }
 
 
-/** @copydoc PDMIMOUNT::pfnIsLocked */
+/** @interface_method_impl{PDMIMOUNT,pfnIsLocked} */
 static DECLCALLBACK(bool) drvHostBaseIsLocked(PPDMIMOUNT pInterface)
 {
     PDRVHOSTBASE pThis = PDMIMOUNT_2_DRVHOSTBASE(pInterface);
@@ -664,6 +664,7 @@ static int drvHostBaseGetBSDName(io_registry_entry_t Entry, char *pszName, unsig
  */
 static void drvHostBaseDADoneCallback(DADiskRef DiskRef, DADissenterRef DissenterRef, void *pvContext)
 {
+    RT_NOREF(DiskRef);
     int *prc = (int *)pvContext;
     if (!DissenterRef)
         *prc = 0;
@@ -792,10 +793,12 @@ static int drvHostBaseObtainExclusiveAccess(PDRVHOSTBASE pThis, io_object_t DVDS
 static int drvHostBaseOpen(PDRVHOSTBASE pThis, PRTFILE pFileDevice, bool fReadOnly)
 {
 # ifdef RT_OS_DARWIN
+    RT_NOREF(fReadOnly);
+
     /* Darwin is kind of special... */
     Assert(!pFileDevice); NOREF(pFileDevice);
     Assert(!pThis->cbBlock);
-    Assert(!pThis->MasterPort);
+    Assert(pThis->MasterPort == IO_OBJECT_NULL);
     Assert(!pThis->ppMMCDI);
     Assert(!pThis->ppScsiTaskDI);
 
@@ -818,7 +821,7 @@ static int drvHostBaseOpen(PDRVHOSTBASE pThis, PRTFILE pFileDevice, bool fReadOn
     /*
      * do the search and get a collection of keyboards.
      */
-    io_iterator_t DVDServices = NULL;
+    io_iterator_t DVDServices = IO_OBJECT_NULL;
     IOReturn irc = IOServiceGetMatchingServices(pThis->MasterPort, RefMatchingDict, &DVDServices);
     AssertMsgReturn(irc == kIOReturnSuccess, ("irc=%d\n", irc), VERR_NOT_FOUND);
     RefMatchingDict = NULL; /* the reference is consumed by IOServiceGetMatchingServices. */
@@ -1138,7 +1141,9 @@ static int drvHostBaseReopen(PDRVHOSTBASE pThis)
     if (pThis->hFileDevice != NIL_RTFILE)
         RTFileClose(pThis->hFileDevice);
     pThis->hFileDevice = hFileDevice;
-#endif /* !RT_OS_DARWIN */
+#else  /* RT_OS_DARWIN */
+    RT_NOREF(pThis);
+#endif /* RT_OS_DARWIN */
     return VINF_SUCCESS;
 }
 
@@ -1587,7 +1592,7 @@ static DECLCALLBACK(int) drvHostBaseMediaThread(RTTHREAD ThreadSelf, void *pvUse
     /*
      * Signal the waiting EMT thread that everything went fine.
      */
-    ASMAtomicXchgSize(&pThis->hwndDeviceChange, hwnd);
+    ASMAtomicXchgPtr((void * volatile *)&pThis->hwndDeviceChange, hwnd);
     RTThreadUserSignal(ThreadSelf);
     if (!hwnd)
     {
@@ -1675,6 +1680,7 @@ static DECLCALLBACK(int) drvHostBaseMediaThread(RTTHREAD ThreadSelf, void *pvUse
  */
 static DECLCALLBACK(int) drvHostBaseLoadDone(PPDMDRVINS pDrvIns, PSSMHANDLE pSSM)
 {
+    RT_NOREF(pSSM);
     PDRVHOSTBASE pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTBASE);
     LogFlow(("%s-%d: drvHostBaseMediaThread:\n", pThis->pDrvIns->pReg->szName, pThis->pDrvIns->iInstance));
     RTCritSectEnter(&pThis->CritSect);
@@ -1791,10 +1797,10 @@ DECLCALLBACK(void) DRVHostBaseDestruct(PPDMDRVINS pDrvIns)
         (*pThis->ppMMCDI)->Release(pThis->ppMMCDI);
         pThis->ppMMCDI = NULL;
     }
-    if (pThis->MasterPort)
+    if (pThis->MasterPort != IO_OBJECT_NULL)
     {
         mach_port_deallocate(mach_task_self(), pThis->MasterPort);
-        pThis->MasterPort = 0;
+        pThis->MasterPort = IO_OBJECT_NULL;
     }
     if (pThis->pDASession)
     {
@@ -1874,7 +1880,7 @@ int DRVHostBaseInitData(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, PDMMEDIATYPE enmType
     pThis->fKeepInstance                    = false;
     pThis->ThreadPoller                     = NIL_RTTHREAD;
 #ifdef RT_OS_DARWIN
-    pThis->MasterPort                       = NULL;
+    pThis->MasterPort                       = IO_OBJECT_NULL;
     pThis->ppMMCDI                          = NULL;
     pThis->ppScsiTaskDI                     = NULL;
     pThis->cbBlock                          = 0;
diff --git a/src/VBox/Devices/Storage/DrvHostBase.h b/src/VBox/Devices/Storage/DrvHostBase.h
index ae7085d..283d35d 100644
--- a/src/VBox/Devices/Storage/DrvHostBase.h
+++ b/src/VBox/Devices/Storage/DrvHostBase.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Storage/DrvHostDVD.cpp b/src/VBox/Devices/Storage/DrvHostDVD.cpp
index 462c7ba..76cc92d 100644
--- a/src/VBox/Devices/Storage/DrvHostDVD.cpp
+++ b/src/VBox/Devices/Storage/DrvHostDVD.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -76,7 +76,7 @@
 # define _interlockedbittestandreset    they_messed_it_up_in_winnt_h_this_time_sigh__interlockedbittestandreset
 # define _interlockedbittestandset64    they_messed_it_up_in_winnt_h_this_time_sigh__interlockedbittestandset64
 # define _interlockedbittestandreset64  they_messed_it_up_in_winnt_h_this_time_sigh__interlockedbittestandreset64
-# include <Windows.h>
+# include <iprt/win/windows.h>
 # include <winioctl.h>
 # include <ntddscsi.h>
 # pragma warning(default : 4163)
@@ -124,7 +124,7 @@ static int solarisExitRootMode(uid_t *pEffUserID);
 #endif
 
 
-/** @copydoc PDMIMOUNT::pfnUnmount */
+/** @interface_method_impl{PDMIMOUNT,pfnUnmount} */
 static DECLCALLBACK(int) drvHostDvdUnmount(PPDMIMOUNT pInterface, bool fForce, bool fEject)
 {
     PDRVHOSTBASE pThis = PDMIMOUNT_2_DRVHOSTBASE(pInterface);
@@ -414,11 +414,12 @@ static DECLCALLBACK(int) drvHostDvdPoll(PDRVHOSTBASE pThis)
 #endif /* USE_MEDIA_POLLING */
 
 
-/** @copydoc PDMIMEDIA::pfnSendCmd */
+/** @interface_method_impl{PDMIMEDIA,pfnSendCmd} */
 static DECLCALLBACK(int) drvHostDvdSendCmd(PPDMIMEDIA pInterface, const uint8_t *pbCmd,
                                            PDMMEDIATXDIR enmTxDir, void *pvBuf, uint32_t *pcbBuf,
                                            uint8_t *pabSense, size_t cbSense, uint32_t cTimeoutMillies)
 {
+    RT_NOREF(cbSense);
     PDRVHOSTBASE pThis = PDMIMEDIA_2_DRVHOSTBASE(pInterface);
     int rc;
     LogFlow(("%s: cmd[0]=%#04x txdir=%d pcbBuf=%d timeout=%d\n", __FUNCTION__, pbCmd[0], enmTxDir, *pcbBuf, cTimeoutMillies));
@@ -748,6 +749,7 @@ static DECLCALLBACK(void) drvHostDvdDestruct(PPDMDRVINS pDrvIns)
  */
 static DECLCALLBACK(int) drvHostDvdConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
     PDRVHOSTBASE pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTBASE);
     LogFlow(("drvHostDvdConstruct: iInstance=%d\n", pDrvIns->iInstance));
 
diff --git a/src/VBox/Devices/Storage/DrvHostFloppy.cpp b/src/VBox/Devices/Storage/DrvHostFloppy.cpp
index d7c33bf..693965d 100644
--- a/src/VBox/Devices/Storage/DrvHostFloppy.cpp
+++ b/src/VBox/Devices/Storage/DrvHostFloppy.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@
 # include <errno.h>
 
 # elif defined(RT_OS_WINDOWS)
-# include <windows.h>
+# include <iprt/win/windows.h>
 # include <dbt.h>
 
 #elif defined(RT_OS_L4)
@@ -182,6 +182,7 @@ static DECLCALLBACK(int) drvHostFloppyPoll(PDRVHOSTBASE pThis)
  */
 static DECLCALLBACK(int) drvHostFloppyConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
     PDRVHOSTFLOPPY pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTFLOPPY);
     LogFlow(("drvHostFloppyConstruct: iInstance=%d\n", pDrvIns->iInstance));
 
diff --git a/src/VBox/Devices/Storage/DrvSCSI.cpp b/src/VBox/Devices/Storage/DrvSCSI.cpp
index 11ce1e5..43e9475 100644
--- a/src/VBox/Devices/Storage/DrvSCSI.cpp
+++ b/src/VBox/Devices/Storage/DrvSCSI.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -239,6 +239,7 @@ static int drvscsiProcessRequestOne(PDRVSCSI pThis, VSCSIIOREQ hVScsiIoReq)
 
 static DECLCALLBACK(int) drvscsiGetSize(VSCSILUN hVScsiLun, void *pvScsiLunUser, uint64_t *pcbSize)
 {
+    RT_NOREF(hVScsiLun);
     PDRVSCSI pThis = (PDRVSCSI)pvScsiLunUser;
 
     *pcbSize = pThis->pDrvMedia->pfnGetSize(pThis->pDrvMedia);
@@ -249,6 +250,7 @@ static DECLCALLBACK(int) drvscsiGetSize(VSCSILUN hVScsiLun, void *pvScsiLunUser,
 
 static DECLCALLBACK(int) drvscsiGetSectorSize(VSCSILUN hVScsiLun, void *pvScsiLunUser, uint32_t *pcbSectorSize)
 {
+    RT_NOREF(hVScsiLun);
     PDRVSCSI pThis = (PDRVSCSI)pvScsiLunUser;
 
     *pcbSectorSize = pThis->pDrvMedia->pfnGetSectorSize(pThis->pDrvMedia);
@@ -257,6 +259,7 @@ static DECLCALLBACK(int) drvscsiGetSectorSize(VSCSILUN hVScsiLun, void *pvScsiLu
 }
 static DECLCALLBACK(int) drvscsiSetLock(VSCSILUN hVScsiLun, void *pvScsiLunUser, bool fLocked)
 {
+    RT_NOREF(hVScsiLun);
     PDRVSCSI pThis = (PDRVSCSI)pvScsiLunUser;
 
     if (fLocked)
@@ -323,10 +326,9 @@ static DECLCALLBACK(int) drvscsiTransferCompleteNotify(PPDMIMEDIAASYNCPORT pInte
     return VINF_SUCCESS;
 }
 
-static DECLCALLBACK(int) drvscsiReqTransferEnqueue(VSCSILUN hVScsiLun,
-                                                   void *pvScsiLunUser,
-                                                   VSCSIIOREQ hVScsiIoReq)
+static DECLCALLBACK(int) drvscsiReqTransferEnqueue(VSCSILUN hVScsiLun, void *pvScsiLunUser, VSCSIIOREQ hVScsiIoReq)
 {
+    RT_NOREF(hVScsiLun);
     int rc = VINF_SUCCESS;
     PDRVSCSI pThis = (PDRVSCSI)pvScsiLunUser;
 
@@ -453,11 +455,9 @@ static DECLCALLBACK(int) drvscsiReqTransferEnqueue(VSCSILUN hVScsiLun,
     return rc;
 }
 
-static DECLCALLBACK(int) drvscsiGetFeatureFlags(VSCSILUN hVScsiLun,
-                                                void *pvScsiLunUser,
-                                                uint64_t *pfFeatures)
+static DECLCALLBACK(int) drvscsiGetFeatureFlags(VSCSILUN hVScsiLun, void *pvScsiLunUser, uint64_t *pfFeatures)
 {
-    int rc = VINF_SUCCESS;
+    RT_NOREF(hVScsiLun);
     PDRVSCSI pThis = (PDRVSCSI)pvScsiLunUser;
 
     *pfFeatures = 0;
@@ -477,9 +477,9 @@ static DECLCALLBACK(int) drvscsiGetFeatureFlags(VSCSILUN hVScsiLun,
 }
 
 static DECLCALLBACK(void) drvscsiVScsiReqCompleted(VSCSIDEVICE hVScsiDevice, void *pVScsiDeviceUser,
-                                                   void *pVScsiReqUser, int rcScsiCode, bool fRedoPossible,
-                                                   int rcReq)
+                                                   void *pVScsiReqUser, int rcScsiCode, bool fRedoPossible, int rcReq)
 {
+    RT_NOREF(hVScsiDevice);
     PDRVSCSI pThis = (PDRVSCSI)pVScsiDeviceUser;
 
     ASMAtomicDecU32(&pThis->StatIoDepth);
@@ -566,6 +566,7 @@ static bool drvscsiAsyncIOLoopNoPendingDummy(PDRVSCSI pThis, uint32_t cMillies)
 
 static DECLCALLBACK(int) drvscsiAsyncIOLoopWakeup(PPDMDRVINS pDrvIns, PPDMTHREAD pThread)
 {
+    RT_NOREF(pThread);
     PDRVSCSI pThis = PDMINS_2_DATA(pDrvIns, PDRVSCSI);
     PRTREQ pReq;
     int rc;
@@ -1020,7 +1021,7 @@ static DECLCALLBACK(int) drvscsiConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, ui
     rc = VSCSIDeviceLunAttach(pThis->hVScsiDevice, pThis->hVScsiLun, 0);
     AssertMsgReturn(RT_SUCCESS(rc), ("Failed to attached the LUN to the SCSI device\n"), rc);
 
-    //@todo: This is a very hacky way of telling the LUN whether a medium was mounted.
+    /// @todo This is a very hacky way of telling the LUN whether a medium was mounted.
     // The mount/unmount interface doesn't work in a very sensible manner!
     if (pThis->pDrvMount)
     {
diff --git a/src/VBox/Devices/Storage/DrvSCSIHost.cpp b/src/VBox/Devices/Storage/DrvSCSIHost.cpp
index c38c30d..7ae64d3 100644
--- a/src/VBox/Devices/Storage/DrvSCSIHost.cpp
+++ b/src/VBox/Devices/Storage/DrvSCSIHost.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -361,13 +361,13 @@ static DECLCALLBACK(int) drvscsihostAsyncIOLoop(PPDMDRVINS pDrvIns, PPDMTHREAD p
 
 static DECLCALLBACK(int) drvscsihostAsyncIOLoopWakeup(PPDMDRVINS pDrvIns, PPDMTHREAD pThread)
 {
-    int rc;
+    RT_NOREF(pThread);
     PDRVSCSIHOST pThis = PDMINS_2_DATA(pDrvIns, PDRVSCSIHOST);
     PRTREQ pReq;
 
     AssertReturn(pThis->hQueueRequests != NIL_RTREQQUEUE, VERR_INVALID_STATE);
 
-    rc = RTReqQueueCall(pThis->hQueueRequests, &pReq, 10000 /* 10 sec. */, (PFNRT)drvscsihostAsyncIOLoopWakeupFunc, 0);
+    int rc = RTReqQueueCall(pThis->hQueueRequests, &pReq, 10000 /* 10 sec. */, (PFNRT)drvscsihostAsyncIOLoopWakeupFunc, 0);
     AssertMsgRC(rc, ("Inserting request into queue failed rc=%Rrc\n", rc));
 
     return rc;
@@ -375,7 +375,7 @@ static DECLCALLBACK(int) drvscsihostAsyncIOLoopWakeup(PPDMDRVINS pDrvIns, PPDMTH
 
 /* -=-=-=-=- ISCSIConnector -=-=-=-=- */
 
-/** @copydoc PDMISCSICONNECTOR::pfnSCSIRequestSend. */
+/** @interface_method_impl{PDMISCSICONNECTOR,pfnSCSIRequestSend}. */
 static DECLCALLBACK(int) drvscsihostRequestSend(PPDMISCSICONNECTOR pInterface, PPDMSCSIREQUEST pSCSIRequest)
 {
     int rc;
@@ -445,9 +445,10 @@ static DECLCALLBACK(void) drvscsihostDestruct(PPDMDRVINS pDrvIns)
  */
 static DECLCALLBACK(int) drvscsihostConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
+    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
     PDRVSCSIHOST pThis = PDMINS_2_DATA(pDrvIns, PDRVSCSIHOST);
     LogFlowFunc(("pDrvIns=%#p pCfg=%#p\n", pDrvIns, pCfg));
-    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
 
     /*
      * Initialize the instance data first because of the destructor.
diff --git a/src/VBox/Devices/Storage/DrvVD.cpp b/src/VBox/Devices/Storage/DrvVD.cpp
index 07a2e1f..5039c96 100644
--- a/src/VBox/Devices/Storage/DrvVD.cpp
+++ b/src/VBox/Devices/Storage/DrvVD.cpp
@@ -88,6 +88,7 @@ extern bool DevINIPConfigured(void);
  * is to ignore flushes, i.e. true. */
 #define VBOX_IGNORE_FLUSH
 
+
 /*********************************************************************************************************************************
 *   Defined types, constants and macros                                                                                          *
 *********************************************************************************************************************************/
@@ -521,7 +522,7 @@ static DECLCALLBACK(void) drvvdErrorCallback(void *pvUser, int rc, RT_SRC_POS_DE
 
 static DECLCALLBACK(void) drvvdAsyncTaskCompleted(PPDMDRVINS pDrvIns, void *pvTemplateUser, void *pvUser, int rcReq)
 {
-    PVBOXDISK pThis = PDMINS_2_DATA(pDrvIns, PVBOXDISK);
+    RT_NOREF(pDrvIns);
     PDRVVDSTORAGEBACKEND pStorageBackend = (PDRVVDSTORAGEBACKEND)pvTemplateUser;
 
     LogFlowFunc(("pDrvIns=%#p pvTemplateUser=%#p pvUser=%#p rcReq=%d\n",
@@ -634,7 +635,7 @@ static DECLCALLBACK(int) drvvdAsyncIOOpen(void *pvUser, const char *pszLocation,
 
 static DECLCALLBACK(int) drvvdAsyncIOClose(void *pvUser, void *pStorage)
 {
-    PVBOXDISK pThis = (PVBOXDISK)pvUser;
+    RT_NOREF(pvUser);
     PDRVVDSTORAGEBACKEND pStorageBackend = (PDRVVDSTORAGEBACKEND)pStorage;
 
     /*
@@ -654,13 +655,13 @@ static DECLCALLBACK(int) drvvdAsyncIOClose(void *pvUser, void *pStorage)
 static DECLCALLBACK(int) drvvdAsyncIOReadSync(void *pvUser, void *pStorage, uint64_t uOffset,
                                               void *pvBuf, size_t cbRead, size_t *pcbRead)
 {
-    PVBOXDISK pThis = (PVBOXDISK)pvUser;
+    RT_NOREF(pvUser);
     PDRVVDSTORAGEBACKEND pStorageBackend = (PDRVVDSTORAGEBACKEND)pStorage;
     RTSGSEG DataSeg;
     PPDMASYNCCOMPLETIONTASK pTask;
 
     bool fOld = ASMAtomicXchgBool(&pStorageBackend->fSyncIoPending, true);
-    Assert(!fOld);
+    Assert(!fOld); NOREF(fOld);
     DataSeg.cbSeg = cbRead;
     DataSeg.pvSeg = pvBuf;
 
@@ -686,13 +687,13 @@ static DECLCALLBACK(int) drvvdAsyncIOReadSync(void *pvUser, void *pStorage, uint
 static DECLCALLBACK(int) drvvdAsyncIOWriteSync(void *pvUser, void *pStorage, uint64_t uOffset,
                                                const void *pvBuf, size_t cbWrite, size_t *pcbWritten)
 {
-    PVBOXDISK pThis = (PVBOXDISK)pvUser;
+    RT_NOREF(pvUser);
     PDRVVDSTORAGEBACKEND pStorageBackend = (PDRVVDSTORAGEBACKEND)pStorage;
     RTSGSEG DataSeg;
     PPDMASYNCCOMPLETIONTASK pTask;
 
     bool fOld = ASMAtomicXchgBool(&pStorageBackend->fSyncIoPending, true);
-    Assert(!fOld);
+    Assert(!fOld); NOREF(fOld);
     DataSeg.cbSeg = cbWrite;
     DataSeg.pvSeg = (void *)pvBuf;
 
@@ -717,14 +718,14 @@ static DECLCALLBACK(int) drvvdAsyncIOWriteSync(void *pvUser, void *pStorage, uin
 
 static DECLCALLBACK(int) drvvdAsyncIOFlushSync(void *pvUser, void *pStorage)
 {
-    PVBOXDISK pThis = (PVBOXDISK)pvUser;
+    RT_NOREF(pvUser);
     PDRVVDSTORAGEBACKEND pStorageBackend = (PDRVVDSTORAGEBACKEND)pStorage;
     PPDMASYNCCOMPLETIONTASK pTask;
 
     LogFlowFunc(("pvUser=%#p pStorage=%#p\n", pvUser, pStorage));
 
     bool fOld = ASMAtomicXchgBool(&pStorageBackend->fSyncIoPending, true);
-    Assert(!fOld);
+    Assert(!fOld); NOREF(fOld);
 
     int rc = PDMR3AsyncCompletionEpFlush(pStorageBackend->pEndpoint, NULL, &pTask);
     if (RT_FAILURE(rc))
@@ -748,7 +749,7 @@ static DECLCALLBACK(int) drvvdAsyncIOReadAsync(void *pvUser, void *pStorage, uin
                                                size_t cbRead, void *pvCompletion,
                                                void **ppTask)
 {
-    PVBOXDISK pThis = (PVBOXDISK)pvUser;
+    RT_NOREF(pvUser);
     PDRVVDSTORAGEBACKEND pStorageBackend = (PDRVVDSTORAGEBACKEND)pStorage;
 
     int rc = PDMR3AsyncCompletionEpRead(pStorageBackend->pEndpoint, uOffset, paSegments, (unsigned)cSegments, cbRead,
@@ -764,7 +765,7 @@ static DECLCALLBACK(int) drvvdAsyncIOWriteAsync(void *pvUser, void *pStorage, ui
                                                 size_t cbWrite, void *pvCompletion,
                                                 void **ppTask)
 {
-    PVBOXDISK pThis = (PVBOXDISK)pvUser;
+    RT_NOREF(pvUser);
     PDRVVDSTORAGEBACKEND pStorageBackend = (PDRVVDSTORAGEBACKEND)pStorage;
 
     int rc = PDMR3AsyncCompletionEpWrite(pStorageBackend->pEndpoint, uOffset, paSegments, (unsigned)cSegments, cbWrite,
@@ -778,7 +779,7 @@ static DECLCALLBACK(int) drvvdAsyncIOWriteAsync(void *pvUser, void *pStorage, ui
 static DECLCALLBACK(int) drvvdAsyncIOFlushAsync(void *pvUser, void *pStorage,
                                                 void *pvCompletion, void **ppTask)
 {
-    PVBOXDISK pThis = (PVBOXDISK)pvUser;
+    RT_NOREF(pvUser);
     PDRVVDSTORAGEBACKEND pStorageBackend = (PDRVVDSTORAGEBACKEND)pStorage;
 
     int rc = PDMR3AsyncCompletionEpFlush(pStorageBackend->pEndpoint, pvCompletion,
@@ -791,7 +792,7 @@ static DECLCALLBACK(int) drvvdAsyncIOFlushAsync(void *pvUser, void *pStorage,
 
 static DECLCALLBACK(int) drvvdAsyncIOGetSize(void *pvUser, void *pStorage, uint64_t *pcbSize)
 {
-    PVBOXDISK pDrvVD = (PVBOXDISK)pvUser;
+    RT_NOREF(pvUser);
     PDRVVDSTORAGEBACKEND pStorageBackend = (PDRVVDSTORAGEBACKEND)pStorage;
 
     return PDMR3AsyncCompletionEpGetSize(pStorageBackend->pEndpoint, pcbSize);
@@ -799,16 +800,15 @@ static DECLCALLBACK(int) drvvdAsyncIOGetSize(void *pvUser, void *pStorage, uint6
 
 static DECLCALLBACK(int) drvvdAsyncIOSetSize(void *pvUser, void *pStorage, uint64_t cbSize)
 {
-    PVBOXDISK pDrvVD = (PVBOXDISK)pvUser;
+    RT_NOREF(pvUser);
     PDRVVDSTORAGEBACKEND pStorageBackend = (PDRVVDSTORAGEBACKEND)pStorage;
 
     return PDMR3AsyncCompletionEpSetSize(pStorageBackend->pEndpoint, cbSize);
 }
 
-static DECLCALLBACK(int) drvvdAsyncIOSetAllocationSize(void *pvUser, void *pStorage, uint64_t cbSize,
-                                                       uint32_t fFlags)
+static DECLCALLBACK(int) drvvdAsyncIOSetAllocationSize(void *pvUser, void *pvStorage, uint64_t cbSize, uint32_t fFlags)
 {
-    PVBOXDISK pDrvVD = (PVBOXDISK)pvUser;
+    RT_NOREF(pvUser, pvStorage, cbSize, fFlags);
     return VERR_NOT_SUPPORTED;
 }
 
@@ -1002,9 +1002,11 @@ static DECLCALLBACK(int) drvvdINIPClientConnect(VDSOCKET Sock, const char *pszAd
     struct in_addr ip;
 #if LWIP_IPV6
     ip6_addr_t ip6;
+    RT_ZERO(ip6);
 #endif
 
-    NOREF(cMillies); /** LwIP doesn't support connect timeout. */
+    NOREF(cMillies); /* LwIP doesn't support connect timeout. */
+    RT_ZERO(ip); /* Shut up MSC. */
 
     /* Check whether lwIP is set up in this VM instance. */
     if (!DevINIPConfigured())
@@ -1057,11 +1059,11 @@ static DECLCALLBACK(int) drvvdINIPClientConnect(VDSOCKET Sock, const char *pszAd
             pSocketInt->hSock = iSock;
             return VINF_SUCCESS;
         }
-        rc = VERR_NET_CONNECTION_REFUSED; /* @todo real solution needed */
+        rc = VERR_NET_CONNECTION_REFUSED; /** @todo real solution needed */
         lwip_close(iSock);
     }
     else
-        rc = VERR_NET_CONNECTION_REFUSED; /* @todo real solution needed */
+        rc = VERR_NET_CONNECTION_REFUSED; /** @todo real solution needed */
     return rc;
 }
 
@@ -1303,6 +1305,7 @@ static DECLCALLBACK(int) drvvdINIPGetPeerAddress(VDSOCKET Sock, PRTNETADDR pAddr
 /** @interface_method_impl{VDINTERFACETCPNET,pfnSelectOneEx} */
 static DECLCALLBACK(int) drvvdINIPSelectOneEx(VDSOCKET Sock, uint32_t fEvents, uint32_t *pfEvents, RTMSINTERVAL cMillies)
 {
+    RT_NOREF(Sock, fEvents, pfEvents, cMillies);
     AssertMsgFailed(("Not supported!\n"));
     return VERR_NOT_SUPPORTED;
 }
@@ -1310,6 +1313,7 @@ static DECLCALLBACK(int) drvvdINIPSelectOneEx(VDSOCKET Sock, uint32_t fEvents, u
 /** @interface_method_impl{VDINTERFACETCPNET,pfnPoke} */
 static DECLCALLBACK(int) drvvdINIPPoke(VDSOCKET Sock)
 {
+    RT_NOREF(Sock);
     AssertMsgFailed(("Not supported!\n"));
     return VERR_NOT_SUPPORTED;
 }
@@ -1653,9 +1657,9 @@ static DECLCALLBACK(int) drvvdTcpSelectOneExPoll(VDSOCKET Sock, uint32_t fEvents
 }
 
 /** @interface_method_impl{VDINTERFACETCPNET,pfnSelectOneEx} */
-static DECLCALLBACK(int) drvvdTcpSelectOneExNoPoll(VDSOCKET Sock, uint32_t fEvents,
-                                                   uint32_t *pfEvents, RTMSINTERVAL cMillies)
+static DECLCALLBACK(int) drvvdTcpSelectOneExNoPoll(VDSOCKET Sock, uint32_t fEvents, uint32_t *pfEvents, RTMSINTERVAL cMillies)
 {
+    RT_NOREF(cMillies); /** @todo timeouts */
     int rc = VINF_SUCCESS;
     PVDSOCKETINT pSockInt = (PVDSOCKETINT)Sock;
 
@@ -2421,9 +2425,10 @@ static DECLCALLBACK(int) drvvdIoBufFree(PPDMIMEDIA pInterface, void *pv, size_t
 
 /* -=-=-=-=- IMount -=-=-=-=- */
 
-/** @copydoc PDMIMOUNT::pfnUnmount */
+/** @interface_method_impl{PDMIMOUNT,pfnUnmount} */
 static DECLCALLBACK(int) drvvdUnmount(PPDMIMOUNT pInterface, bool fForce, bool fEject)
 {
+    RT_NOREF(fEject);
     PVBOXDISK pThis = RT_FROM_MEMBER(pInterface, VBOXDISK, IMount);
 
     /*
@@ -2454,14 +2459,14 @@ static DECLCALLBACK(int) drvvdUnmount(PPDMIMOUNT pInterface, bool fForce, bool f
 }
 
 
-/** @copydoc PDMIMOUNT::pfnIsMounted */
+/** @interface_method_impl{PDMIMOUNT,pfnIsMounted} */
 static DECLCALLBACK(bool) drvvdIsMounted(PPDMIMOUNT pInterface)
 {
     PVBOXDISK pThis = RT_FROM_MEMBER(pInterface, VBOXDISK, IMount);
     return pThis->pDisk != NULL;
 }
 
-/** @copydoc PDMIMOUNT::pfnLock */
+/** @interface_method_impl{PDMIMOUNT,pfnLock} */
 static DECLCALLBACK(int) drvvdLock(PPDMIMOUNT pInterface)
 {
     PVBOXDISK pThis = RT_FROM_MEMBER(pInterface, VBOXDISK, IMount);
@@ -2470,7 +2475,7 @@ static DECLCALLBACK(int) drvvdLock(PPDMIMOUNT pInterface)
     return VINF_SUCCESS;
 }
 
-/** @copydoc PDMIMOUNT::pfnUnlock */
+/** @interface_method_impl{PDMIMOUNT,pfnUnlock} */
 static DECLCALLBACK(int) drvvdUnlock(PPDMIMOUNT pInterface)
 {
     PVBOXDISK pThis = RT_FROM_MEMBER(pInterface, VBOXDISK, IMount);
@@ -2479,13 +2484,14 @@ static DECLCALLBACK(int) drvvdUnlock(PPDMIMOUNT pInterface)
     return VINF_SUCCESS;
 }
 
-/** @copydoc PDMIMOUNT::pfnIsLocked */
+/** @interface_method_impl{PDMIMOUNT,pfnIsLocked} */
 static DECLCALLBACK(bool) drvvdIsLocked(PPDMIMOUNT pInterface)
 {
     PVBOXDISK pThis = RT_FROM_MEMBER(pInterface, VBOXDISK, IMount);
     return pThis->fLocked;
 }
 
+
 /*********************************************************************************************************************************
 *   Async Media interface methods                                                                                                *
 *********************************************************************************************************************************/
@@ -2721,6 +2727,7 @@ static DECLCALLBACK(int) drvvdBlkCacheXferEnqueueDiscard(PPDMDRVINS pDrvIns, PCR
     return VINF_SUCCESS;
 }
 
+
 /*********************************************************************************************************************************
 *   Extended media interface methods                                                                                             *
 *********************************************************************************************************************************/
@@ -2812,16 +2819,16 @@ DECLINLINE(int) drvvdMediaExIoReqBufSync(PVBOXDISK pThis, PPDMMEDIAEXIOREQINT pI
     /* Make sure the buffer is reset. */
     RTSgBufReset(&pIoReq->ReadWrite.IoBuf.SgBuf);
 
+    size_t const offSrc = pIoReq->ReadWrite.cbReq - pIoReq->ReadWrite.cbReqLeft;
+    Assert((uint32_t)offSrc == offSrc);
     if (fToIoBuf)
-        rc = pThis->pDrvMediaExPort->pfnIoReqCopyToBuf(pThis->pDrvMediaExPort, pIoReq, &pIoReq->abAlloc[0],
-                                                       pIoReq->ReadWrite.cbReq - pIoReq->ReadWrite.cbReqLeft,
+        rc = pThis->pDrvMediaExPort->pfnIoReqCopyToBuf(pThis->pDrvMediaExPort, pIoReq, &pIoReq->abAlloc[0], (uint32_t)offSrc,
                                                        &pIoReq->ReadWrite.IoBuf.SgBuf,
                                                        RT_MIN(pIoReq->ReadWrite.cbIoBuf, pIoReq->ReadWrite.cbReqLeft));
     else
-        rc = pThis->pDrvMediaExPort->pfnIoReqCopyFromBuf(pThis->pDrvMediaExPort, pIoReq, &pIoReq->abAlloc[0],
-                                                         pIoReq->ReadWrite.cbReq - pIoReq->ReadWrite.cbReqLeft,
+        rc = pThis->pDrvMediaExPort->pfnIoReqCopyFromBuf(pThis->pDrvMediaExPort, pIoReq, &pIoReq->abAlloc[0], (uint32_t)offSrc,
                                                          &pIoReq->ReadWrite.IoBuf.SgBuf,
-                                                         RT_MIN(pIoReq->ReadWrite.cbIoBuf, pIoReq->ReadWrite.cbReqLeft));
+                                                         (uint32_t)RT_MIN(pIoReq->ReadWrite.cbIoBuf, pIoReq->ReadWrite.cbReqLeft));
 
     RTSgBufReset(&pIoReq->ReadWrite.IoBuf.SgBuf);
     return rc;
@@ -2832,7 +2839,7 @@ DECLINLINE(int) drvvdMediaExIoReqBufSync(PVBOXDISK pThis, PPDMMEDIAEXIOREQINT pI
  */
 DECLINLINE(unsigned) drvvdMediaExIoReqIdHash(PDMMEDIAEXIOREQID uIoReqId)
 {
-    return uIoReqId % DRVVD_VDIOREQ_ALLOC_BINS; /** @todo: Find something better? */
+    return uIoReqId % DRVVD_VDIOREQ_ALLOC_BINS; /** @todo Find something better? */
 }
 
 /**
@@ -3174,7 +3181,6 @@ static DECLCALLBACK(void) drvvdMediaExIoReqComplete(void *pvUser1, void *pvUser2
         && (pIoReq->fFlags & PDMIMEDIAEX_F_SUSPEND_ON_RECOVERABLE_ERR)
         && drvvdMediaExIoReqIsRedoSetWarning(pThis, rcReq))
     {
-        int rc;
         bool fXchg = ASMAtomicCmpXchgU32((volatile uint32_t *)&pIoReq->enmState, VDIOREQSTATE_SUSPENDED, VDIOREQSTATE_ACTIVE);
         if (fXchg)
         {
@@ -3216,8 +3222,6 @@ static DECLCALLBACK(void) drvvdMediaExIoReqComplete(void *pvUser1, void *pvUser2
 static DECLCALLBACK(int) drvvdIoReqAllocSizeSet(PPDMIMEDIAEX pInterface, size_t cbIoReqAlloc)
 {
     PVBOXDISK pThis = RT_FROM_MEMBER(pInterface, VBOXDISK, IMediaEx);
-    int rc = VINF_SUCCESS;
-
     if (RT_UNLIKELY(pThis->hIoReqCache != NIL_RTMEMCACHE))
         return VERR_INVALID_STATE;
 
@@ -3712,10 +3716,9 @@ static DECLCALLBACK(int) drvvdIoReqSuspendedLoad(PPDMIMEDIAEX pInterface, PSSMHA
  * Loads all configured plugins.
  *
  * @returns VBox status code.
- * @param   pThis    The disk instance.
  * @param   pCfg     CFGM node holding plugin list.
  */
-static int drvvdLoadPlugins(PVBOXDISK pThis, PCFGMNODE pCfg)
+static int drvvdLoadPlugins(PCFGMNODE pCfg)
 {
     int rc = VINF_SUCCESS;
     PCFGMNODE pCfgPlugins = CFGMR3GetChild(pCfg, "Plugins");
@@ -3857,6 +3860,7 @@ static VDTYPE drvvdGetVDFromMediaType(PDMMEDIATYPE enmType)
     return VDTYPE_HDD;
 }
 
+
 /*********************************************************************************************************************************
 *   Base interface methods                                                                                                       *
 *********************************************************************************************************************************/
@@ -3964,14 +3968,14 @@ static DECLCALLBACK(void) drvvdPowerOff(PPDMDRVINS pDrvIns)
 }
 
 /**
+ * @callback_method_impl{FNPDMDRVRESUME}
+ *
  * VM resume notification that we use to undo what the temporary read-only image
  * mode set by drvvdSuspend.
  *
  * Also switch to runtime error mode if we're resuming after a state load
  * without having been powered on first.
  *
- * @param   pDrvIns     The driver instance data.
- *
  * @todo    The VMSetError vs VMSetRuntimeError mess must be fixed elsewhere,
  *          we're making assumptions about Main behavior here!
  */
@@ -4052,7 +4056,9 @@ static DECLCALLBACK(void) drvvdResume(PPDMDRVINS pDrvIns)
 }
 
 /**
- * The VM is being suspended, temporarily change to read-only image mode.
+ * @callback_method_impl{FNPDMDRVSUSPEND}
+ *
+ * When the VM is being suspended, temporarily change to read-only image mode.
  *
  * This is important for several reasons:
  *   -# It makes sure that there are no pending writes to the image.  Most
@@ -4063,8 +4069,6 @@ static DECLCALLBACK(void) drvvdResume(PPDMDRVINS pDrvIns)
  *   -# This is essential for making teleportation targets sharing images work
  *      right.  Both with regards to caching and with regards to file sharing
  *      locks (RTFILE_O_DENY_*).  (See also drvvdLoadDone.)
- *
- * @param   pDrvIns     The driver instance data.
  */
 static DECLCALLBACK(void) drvvdSuspend(PPDMDRVINS pDrvIns)
 {
@@ -4081,13 +4085,7 @@ static DECLCALLBACK(void) drvvdSuspend(PPDMDRVINS pDrvIns)
 }
 
 /**
- * VM PowerOn notification for undoing the TempReadOnly config option and
- * changing to runtime error mode.
- *
- * @param   pDrvIns     The driver instance data.
- *
- * @todo    The VMSetError vs VMSetRuntimeError mess must be fixed elsewhere,
- *          we're making assumptions about Main behavior here!
+ * @callback_method_impl{FNPDMDRVPOWERON}
  */
 static DECLCALLBACK(void) drvvdPowerOn(PPDMDRVINS pDrvIns)
 {
@@ -4098,7 +4096,7 @@ static DECLCALLBACK(void) drvvdPowerOn(PPDMDRVINS pDrvIns)
 }
 
 /**
- * @copydoc FNPDMDRVRESET
+ * @callback_method_impl{FNPDMDRVRESET}
  */
 static DECLCALLBACK(void) drvvdReset(PPDMDRVINS pDrvIns)
 {
@@ -4120,7 +4118,7 @@ static DECLCALLBACK(void) drvvdReset(PPDMDRVINS pDrvIns)
 }
 
 /**
- * @copydoc FNPDMDRVDESTRUCT
+ * @callback_method_impl{FNPDMDRVDESTRUCT}
  */
 static DECLCALLBACK(void) drvvdDestruct(PPDMDRVINS pDrvIns)
 {
@@ -4161,30 +4159,28 @@ static DECLCALLBACK(void) drvvdDestruct(PPDMDRVINS pDrvIns)
     if (RTCritSectIsInitialized(&pThis->CritSectIoReqRedo))
         RTCritSectDelete(&pThis->CritSectIoReqRedo);
     for (unsigned i = 0; i < RT_ELEMENTS(pThis->aIoReqAllocBins); i++)
-    {
         if (pThis->aIoReqAllocBins[i].hMtxLstIoReqAlloc != NIL_RTSEMFASTMUTEX)
             RTSemFastMutexDestroy(pThis->aIoReqAllocBins[i].hMtxLstIoReqAlloc);
-    }
 }
 
 /**
- * Construct a VBox disk media driver instance.
- *
- * @copydoc FNPDMDRVCONSTRUCT
+ * @callback_method_impl{FNPDMDRVCONSTRUCT,
+ *      Construct a VBox disk media driver instance.}
  */
 static DECLCALLBACK(int) drvvdConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
     LogFlowFunc(("\n"));
     PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
     PVBOXDISK pThis = PDMINS_2_DATA(pDrvIns, PVBOXDISK);
     int rc = VINF_SUCCESS;
-    char *pszName = NULL;        /**< The path of the disk image file. */
-    char *pszFormat = NULL;      /**< The format backed to use for this image. */
-    char *pszCachePath = NULL;   /**< The path to the cache image. */
-    char *pszCacheFormat = NULL; /**< The format backend to use for the cache image. */
-    bool fReadOnly;              /**< True if the media is read-only. */
-    bool fMaybeReadOnly;         /**< True if the media may or may not be read-only. */
-    bool fHonorZeroWrites;       /**< True if zero blocks should be written. */
+    char *pszName = NULL;        /* The path of the disk image file. */
+    char *pszFormat = NULL;      /* The format backed to use for this image. */
+    char *pszCachePath = NULL;   /* The path to the cache image. */
+    char *pszCacheFormat = NULL; /* The format backend to use for the cache image. */
+    bool fReadOnly = false;      /* True if the media is read-only. */
+    bool fMaybeReadOnly = false; /* True if the media may or may not be read-only. */
+    bool fHonorZeroWrites = false; /* True if zero blocks should be written. */
 
     /*
      * Init the static parts.
@@ -4309,7 +4305,7 @@ static DECLCALLBACK(int) drvvdConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint
     }
 
     /* Before we access any VD API load all given plugins. */
-    rc = drvvdLoadPlugins(pThis, pCfg);
+    rc = drvvdLoadPlugins(pCfg);
     if (RT_FAILURE(rc))
         return PDMDRV_SET_ERROR(pDrvIns, rc, N_("Loading VD plugins failed"));
 
diff --git a/src/VBox/Devices/Storage/HBDMgmt-darwin.cpp b/src/VBox/Devices/Storage/HBDMgmt-darwin.cpp
index b1abbe6..dc8ad27 100644
--- a/src/VBox/Devices/Storage/HBDMgmt-darwin.cpp
+++ b/src/VBox/Devices/Storage/HBDMgmt-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -200,14 +200,18 @@ static int hbdMgrDAReturn2VBoxStatus(DAReturn hReturn)
 }
 
 /**
- * Callback notifying us that the async DADiskClaim()/DADiskUnmount call has completed.
+ * Implements the OS X callback DADiskClaimCallback.
+ *
+ * This notifies us that the async DADiskClaim()/DADiskUnmount call has
+ * completed.
  *
  * @param   hDiskRef         The disk that was attempted claimed / unmounted.
  * @param   hDissenterRef    NULL on success, contains details on failure.
  * @param   pvContext        Pointer to the return code variable.
  */
-static DECLCALLBACK(void) hbdMgrDACallbackComplete(DADiskRef hDiskRef, DADissenterRef hDissenterRef, void *pvContext)
+static void hbdMgrDACallbackComplete(DADiskRef hDiskRef, DADissenterRef hDissenterRef, void *pvContext)
 {
+    RT_NOREF(hDiskRef);
     PHBDMGRDACLBKARGS pArgs = (PHBDMGRDACLBKARGS)pvContext;
     pArgs->pszErrDetail = NULL;
 
@@ -230,14 +234,16 @@ static DECLCALLBACK(void) hbdMgrDACallbackComplete(DADiskRef hDiskRef, DADissent
 }
 
 /**
- * Callback notifying us about any attempt to mount a volume. If we claimed the volume
- * or the complete disk containing the volume we will deny the attempt.
+ * Implements the OS X callback DADiskMountApprovalCallback.
+ *
+ * This notifies us about any attempt to mount a volume.  If we claimed the
+ * volume or the complete disk containing the volume we will deny the attempt.
  *
  * @returns Reference to a DADissenter object which contains the result.
  * @param   hDiskRef         The disk that is about to be mounted.
  * @param   pvCOntext        Pointer to the block device manager.
  */
-static DECLCALLBACK(DADissenterRef) hbdMgrDAMountApprovalCallback(DADiskRef hDiskRef, void *pvContext)
+static DADissenterRef hbdMgrDAMountApprovalCallback(DADiskRef hDiskRef, void *pvContext)
 {
     PHBDMGRINT pThis = (PHBDMGRINT)pvContext;
     DADiskRef hDiskParentRef = DADiskCopyWholeDisk(hDiskRef);
@@ -274,14 +280,16 @@ static DECLCALLBACK(DADissenterRef) hbdMgrDAMountApprovalCallback(DADiskRef hDis
 
 
 /**
+ * Implements OS X callback CFRunLoopSourceContext::perform.
+ *
  * Dummy handler for the wakeup source to kick the worker thread.
  *
  * @returns nothing.
  * @param   pInfo            Opaque user data given during source creation, unused.
  */
-static DECLCALLBACK(void) hbdMgrDAPerformWakeup(void *pInfo)
+static void hbdMgrDAPerformWakeup(void *pInfo)
 {
-    return;
+    RT_NOREF(pInfo);
 }
 
 
diff --git a/src/VBox/Devices/Storage/HBDMgmt-generic.cpp b/src/VBox/Devices/Storage/HBDMgmt-generic.cpp
index 206eb76..63199c9 100644
--- a/src/VBox/Devices/Storage/HBDMgmt-generic.cpp
+++ b/src/VBox/Devices/Storage/HBDMgmt-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Storage/HBDMgmt-win.cpp b/src/VBox/Devices/Storage/HBDMgmt-win.cpp
index 4d32757..3b82fd6 100644
--- a/src/VBox/Devices/Storage/HBDMgmt-win.cpp
+++ b/src/VBox/Devices/Storage/HBDMgmt-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -25,7 +25,7 @@
 #include <iprt/list.h>
 
 #include <iprt/nt/nt-and-windows.h>
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 #include "HBDMgmt.h"
 
diff --git a/src/VBox/Devices/Storage/HBDMgmt.h b/src/VBox/Devices/Storage/HBDMgmt.h
index c774c91..3f335fb 100644
--- a/src/VBox/Devices/Storage/HBDMgmt.h
+++ b/src/VBox/Devices/Storage/HBDMgmt.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Storage/IOBufMgmt.cpp b/src/VBox/Devices/Storage/IOBufMgmt.cpp
index 115f7ae..94a5920 100644
--- a/src/VBox/Devices/Storage/IOBufMgmt.cpp
+++ b/src/VBox/Devices/Storage/IOBufMgmt.cpp
@@ -45,7 +45,7 @@ typedef struct IOBUFDESCINT
 } IOBUFDESCINT;
 
 /**
- * A 
+ * A
  */
 typedef struct IOBUFMGRBIN
 {
@@ -96,18 +96,19 @@ DECLINLINE(unsigned) iobufMgrGetBinCount(size_t cbMin, size_t cbMax)
     return u32Max - u32Min + 1;
 }
 
-DECLINLINE(uint32_t) iobufMgrGetObjCount(size_t cbMem, unsigned cBins, size_t cbMin)
+DECLINLINE(uint32_t) iobufMgrGetObjCount(size_t cbMem, unsigned cBins, size_t cbMinBin)
 {
-    uint32_t cObjCnt = 0;
-    uint32_t cbBin = cbMin;
+    size_t cObjs = 0;
+    size_t cbBin = cbMinBin;
 
     while (cBins-- > 0)
     {
-        cObjCnt += cbMem / cbBin;
+        cObjs += cbMem / cbBin;
         cbBin <<= 1; /* The size doubles for every bin. */
     }
 
-    return cObjCnt;
+    Assert((uint32_t)cObjs == cObjs);
+    return (uint32_t)cObjs;
 }
 
 DECLHIDDEN(int) IOBUFMgrCreate(PIOBUFMGR phIoBufMgr, size_t cbMax, uint32_t fFlags)
@@ -144,7 +145,7 @@ DECLHIDDEN(int) IOBUFMgrCreate(PIOBUFMGR phIoBufMgr, size_t cbMax, uint32_t fFla
                 && RT_SUCCESS(rc))
             {
                 /* Init the bins. */
-                uint32_t iObj = 0;
+                size_t   iObj  = 0;
                 uint32_t cbBin = IOBUFMGR_BIN_SIZE_MIN;
                 for (unsigned i = 0; i < cBins; i++)
                 {
@@ -165,7 +166,7 @@ DECLHIDDEN(int) IOBUFMgrCreate(PIOBUFMGR phIoBufMgr, size_t cbMax, uint32_t fFla
                             pbMem += cbBin;
                             pBin->iFree++;
 
-                            if (cbMax < cbBin) /** @todo: Populate smaller bins and don't waste memory. */
+                            if (cbMax < cbBin) /** @todo Populate smaller bins and don't waste memory. */
                                 break;
                         }
 
@@ -261,7 +262,7 @@ static size_t iobufMgrAllocSegment(PIOBUFMGRINT pThis, PRTSGSEG pSeg, size_t cb)
                 {
                     iBinCur--;
                     pBinCur = &pThis->paBins[iBinCur];
-                    pBinCur->papvFree[pBinCur->iFree] = pbMem + (RT_BIT(iBinCur + pThis->u32OrderMin));
+                    pBinCur->papvFree[pBinCur->iFree] = pbMem + (size_t)RT_BIT(iBinCur + pThis->u32OrderMin); /* (RT_BIT causes weird MSC warning without cast) */
                     pBinCur->iFree++;
                 }
 
@@ -279,8 +280,8 @@ static size_t iobufMgrAllocSegment(PIOBUFMGRINT pThis, PRTSGSEG pSeg, size_t cb)
 
     /*
      * If we didn't find something in the higher bins try to accumulate as much as possible from the smaller bins.
-     * @todo: Defragment in case there is enough memory free but we can't find something in our bin.
      */
+    /** @todo Defragment in case there is enough memory free but we can't find something in our bin. */
     if (   pBin->iFree == 0
         && iBin > 0)
     {
@@ -293,7 +294,7 @@ static size_t iobufMgrAllocSegment(PIOBUFMGRINT pThis, PRTSGSEG pSeg, size_t cb)
             {
                 pBin->iFree--;
                 pSeg->pvSeg = pBin->papvFree[pBin->iFree];
-                pSeg->cbSeg = RT_BIT_32(iBin + pThis->u32OrderMin);
+                pSeg->cbSeg = (size_t)RT_BIT_32(iBin + pThis->u32OrderMin);
                 AssertPtr(pSeg->pvSeg);
                 cbAlloc = pSeg->cbSeg;
                 break;
@@ -305,7 +306,7 @@ static size_t iobufMgrAllocSegment(PIOBUFMGRINT pThis, PRTSGSEG pSeg, size_t cb)
     {
         pBin->iFree--;
         pSeg->pvSeg = pBin->papvFree[pBin->iFree];
-        pSeg->cbSeg = RT_BIT_32(u32Order);
+        pSeg->cbSeg = (size_t)RT_BIT_32(u32Order);
         cbAlloc = pSeg->cbSeg;
         AssertPtr(pSeg->pvSeg);
     }
@@ -327,7 +328,7 @@ DECLHIDDEN(int) IOBUFMgrAllocBuf(IOBUFMGR hIoBufMgr, PIOBUFDESC pIoBufDesc, size
     if (RT_SUCCESS(rc))
     {
         unsigned iSeg = 0;
-        unsigned cbLeft = cbIoBuf;
+        size_t   cbLeft = cbIoBuf;
         PRTSGSEG pSeg = &pIoBufDesc->Int.aSegs[0];
 
         while (   iSeg < RT_ELEMENTS(pIoBufDesc->Int.aSegs)
@@ -381,7 +382,7 @@ DECLHIDDEN(void) IOBUFMgrFreeBuf(PIOBUFDESC pIoBufDesc)
             PIOBUFMGRBIN pBin = &pThis->paBins[iBin];
             pBin->papvFree[pBin->iFree] = pSeg->pvSeg;
             pBin->iFree++;
-            pThis->cbFree += RT_BIT_32(u32Order);
+            pThis->cbFree += (size_t)RT_BIT_32(u32Order);
         }
         RTCritSectLeave(&pThis->CritSectAlloc);
     }
diff --git a/src/VBox/Devices/Storage/PIIX3ATABmDma.h b/src/VBox/Devices/Storage/PIIX3ATABmDma.h
index d51ecb5..64d783c 100644
--- a/src/VBox/Devices/Storage/PIIX3ATABmDma.h
+++ b/src/VBox/Devices/Storage/PIIX3ATABmDma.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Storage/UsbMsd.cpp b/src/VBox/Devices/Storage/UsbMsd.cpp
index 845e050..b07d097 100644
--- a/src/VBox/Devices/Storage/UsbMsd.cpp
+++ b/src/VBox/Devices/Storage/UsbMsd.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -779,6 +779,7 @@ DECLINLINE(bool) usbMsdQueueRemove(PUSBMSDURBQUEUE pQueue, PVUSBURB pUrb)
 }
 
 
+#ifdef VBOX_STRICT
 /**
  * Checks if the queue is empty or not.
  *
@@ -789,6 +790,7 @@ DECLINLINE(bool) usbMsdQueueIsEmpty(PCUSBMSDURBQUEUE pQueue)
 {
     return pQueue->pHead == NULL;
 }
+#endif /* VBOX_STRICT */
 
 
 /**
@@ -939,6 +941,7 @@ static int usbMsdReqEnsureBuffer(PUSBMSDREQ pReq, uint32_t cbBuf)
  */
 static int usbMsdCompleteStall(PUSBMSD pThis, PUSBMSDEP pEp, PVUSBURB pUrb, const char *pszWhy)
 {
+    RT_NOREF(pszWhy);
     Log(("usbMsdCompleteStall/#%u: pUrb=%p:%s: %s\n", pThis->pUsbIns->iInstance, pUrb, pUrb->pszDesc, pszWhy));
 
     pUrb->enmStatus = VUSBSTATUS_STALL;
@@ -1078,6 +1081,7 @@ static int usbMsdResetWorker(PUSBMSD pThis, PVUSBURB pUrb, bool fSetConfig)
 static DECLCALLBACK(int) usbMsdLun0ScsiRequestCompleted(PPDMISCSIPORT pInterface, PPDMSCSIREQUEST pSCSIRequest,
                                                         int rcCompletion, bool fRedo, int rcReq)
 {
+    RT_NOREF(fRedo, rcReq);
     PUSBMSD     pThis = RT_FROM_MEMBER(pInterface, USBMSD, Lun0.IScsiPort);
     PUSBMSDREQ  pReq  = RT_FROM_MEMBER(pSCSIRequest, USBMSDREQ, ScsiReq);
 
@@ -1226,11 +1230,15 @@ static void usbMsdSuspendOrPowerOff(PPDMUSBINS pUsbIns)
  */
 static DECLCALLBACK(int) usbMsdSavePrep(PPDMUSBINS pUsbIns, PSSMHANDLE pSSM)
 {
+    RT_NOREF(pSSM);
+#ifdef VBOX_STRICT
     PUSBMSD pThis = PDMINS_2_DATA(pUsbIns, PUSBMSD);
-
     Assert(usbMsdAllAsyncIOIsFinished(pUsbIns));
     Assert(usbMsdQueueIsEmpty(&pThis->ToHostQueue));
     Assert(usbMsdQueueIsEmpty(&pThis->DoneQueue));
+#else
+    RT_NOREF(pUsbIns);
+#endif
     return VINF_SUCCESS;
 }
 
@@ -1239,11 +1247,15 @@ static DECLCALLBACK(int) usbMsdSavePrep(PPDMUSBINS pUsbIns, PSSMHANDLE pSSM)
  */
 static DECLCALLBACK(int) usbMsdLoadPrep(PPDMUSBINS pUsbIns, PSSMHANDLE pSSM)
 {
+    RT_NOREF(pSSM);
+#ifdef VBOX_STRICT
     PUSBMSD pThis = PDMINS_2_DATA(pUsbIns, PUSBMSD);
-
     Assert(usbMsdAllAsyncIOIsFinished(pUsbIns));
     Assert(usbMsdQueueIsEmpty(&pThis->ToHostQueue));
     Assert(usbMsdQueueIsEmpty(&pThis->DoneQueue));
+#else
+    RT_NOREF(pUsbIns);
+#endif
     return VINF_SUCCESS;
 }
 
@@ -1252,6 +1264,7 @@ static DECLCALLBACK(int) usbMsdLoadPrep(PPDMUSBINS pUsbIns, PSSMHANDLE pSSM)
  */
 static DECLCALLBACK(int) usbMsdLiveExec(PPDMUSBINS pUsbIns, PSSMHANDLE pSSM, uint32_t uPass)
 {
+    RT_NOREF(uPass);
     PUSBMSD pThis = PDMINS_2_DATA(pUsbIns, PUSBMSD);
 
     /* config. */
@@ -1326,72 +1339,61 @@ static DECLCALLBACK(int) usbMsdLoadExec(PPDMUSBINS pUsbIns, PSSMHANDLE pSSM, uin
     if (uPass == SSM_PASS_FINAL)
     {
         /* Restore data. */
-        bool fReqAlloc = false;
-
         Assert(!pThis->pReq);
 
         SSMR3GetU8(pSSM, &pThis->bConfigurationValue);
         SSMR3GetBool(pSSM, &pThis->aEps[0].fHalted);
         SSMR3GetBool(pSSM, &pThis->aEps[1].fHalted);
         SSMR3GetBool(pSSM, &pThis->aEps[2].fHalted);
-        SSMR3GetBool(pSSM, &fReqAlloc);
-
+        bool fReqAlloc = false;
+        rc = SSMR3GetBool(pSSM, &fReqAlloc);
+        AssertRCReturn(rc, rc);
         if (fReqAlloc)
         {
             PUSBMSDREQ pReq = usbMsdReqAlloc(pUsbIns);
-
-            if (pReq)
+            AssertReturn(pReq, VERR_NO_MEMORY);
+            pThis->pReq = pReq;
+
+            SSMR3GetU32(pSSM, (uint32_t *)&pReq->enmState);
+            uint32_t cbBuf = 0;
+            rc = SSMR3GetU32(pSSM, &cbBuf);
+            AssertRCReturn(rc, rc);
+            if (cbBuf)
             {
-                uint32_t cbBuf = 0;
-
-                pThis->pReq = pReq;
-
-                SSMR3GetU32(pSSM, (uint32_t *)&pReq->enmState);
-                SSMR3GetU32(pSSM, &cbBuf);
-                if (cbBuf)
-                {
-                    if (usbMsdReqEnsureBuffer(pReq, cbBuf))
-                    {
-                        AssertPtr(pReq->pbBuf);
-                        Assert(cbBuf == pReq->cbBuf);
-                        SSMR3GetMem(pSSM, pReq->pbBuf, pReq->cbBuf);
-                    }
-                    else
-                        rc = VERR_NO_MEMORY;
-                }
-
-                if (RT_SUCCESS(rc))
+                if (usbMsdReqEnsureBuffer(pReq, cbBuf))
                 {
-                    SSMR3GetU32(pSSM, &pReq->offBuf);
-                    SSMR3GetMem(pSSM, &pReq->Cbw, sizeof(pReq->Cbw));
-                    SSMR3GetU32(pSSM, &pReq->ScsiReq.uLogicalUnit);
-                    SSMR3GetU32(pSSM, (uint32_t *)&pReq->ScsiReq.uDataDirection);
-                    SSMR3GetU32(pSSM, &pReq->ScsiReq.cbCDB);
-                    SSMR3GetU32(pSSM, &pReq->ScsiReq.cbScatterGather);
-                    SSMR3GetMem(pSSM, &pReq->ScsiReqSense[0], sizeof(pReq->ScsiReqSense));
-                    SSMR3GetS32(pSSM, &pReq->iScsiReqStatus);
-
-                    /* Setup the rest of the SCSI request. */
-                    pReq->ScsiReq.cbCDB             = pReq->Cbw.bCBWCBLength;
-                    pReq->ScsiReq.pbCDB             = &pReq->Cbw.CBWCB[0];
-                    pReq->ScsiReqSeg.pvSeg          = pReq->pbBuf;
-                    pReq->ScsiReqSeg.cbSeg          = pReq->ScsiReq.cbScatterGather;
-                    pReq->ScsiReq.cScatterGatherEntries = 1;
-                    pReq->ScsiReq.paScatterGatherHead = &pReq->ScsiReqSeg;
-                    pReq->ScsiReq.cbSenseBuffer     = sizeof(pReq->ScsiReqSense);
-                    pReq->ScsiReq.pbSenseBuffer     = &pReq->ScsiReqSense[0];
-                    pReq->ScsiReq.pvUser            = NULL;
+                    AssertPtr(pReq->pbBuf);
+                    Assert(cbBuf == pReq->cbBuf);
+                    SSMR3GetMem(pSSM, pReq->pbBuf, pReq->cbBuf);
                 }
+                else
+                    return VERR_NO_MEMORY;
             }
-            else
-                rc = VERR_NO_MEMORY;
-        }
 
-        if (RT_SUCCESS(rc))
-            rc = SSMR3GetU32(pSSM, &u32);
+            SSMR3GetU32(pSSM, &pReq->offBuf);
+            SSMR3GetMem(pSSM, &pReq->Cbw, sizeof(pReq->Cbw));
+            SSMR3GetU32(pSSM, &pReq->ScsiReq.uLogicalUnit);
+            SSMR3GetU32(pSSM, (uint32_t *)&pReq->ScsiReq.uDataDirection);
+            SSMR3GetU32(pSSM, &pReq->ScsiReq.cbCDB);
+            SSMR3GetU32(pSSM, &pReq->ScsiReq.cbScatterGather);
+            SSMR3GetMem(pSSM, &pReq->ScsiReqSense[0], sizeof(pReq->ScsiReqSense));
+            rc = SSMR3GetS32(pSSM, &pReq->iScsiReqStatus);
+            AssertRCReturn(rc, rc);
+
+            /* Setup the rest of the SCSI request. */
+            pReq->ScsiReq.cbCDB             = pReq->Cbw.bCBWCBLength;
+            pReq->ScsiReq.pbCDB             = &pReq->Cbw.CBWCB[0];
+            pReq->ScsiReqSeg.pvSeg          = pReq->pbBuf;
+            pReq->ScsiReqSeg.cbSeg          = pReq->ScsiReq.cbScatterGather;
+            pReq->ScsiReq.cScatterGatherEntries = 1;
+            pReq->ScsiReq.paScatterGatherHead = &pReq->ScsiReqSeg;
+            pReq->ScsiReq.cbSenseBuffer     = sizeof(pReq->ScsiReqSense);
+            pReq->ScsiReq.pbSenseBuffer     = &pReq->ScsiReqSense[0];
+            pReq->ScsiReq.pvUser            = NULL;
+        }
 
-        if (RT_FAILURE(rc))
-            return rc;
+        rc = SSMR3GetU32(pSSM, &u32);
+        AssertRCReturn(rc, rc);
         AssertMsgReturn(u32 == UINT32_MAX, ("%#x\n", u32), VERR_SSM_DATA_UNIT_FORMAT_CHANGED);
     }
 
@@ -1476,6 +1478,7 @@ static DECLCALLBACK(int) usbMsdUrbCancel(PPDMUSBINS pUsbIns, PVUSBURB pUrb)
  */
 static int usbMsdScsiIllegalRequest(PUSBMSD pThis, PUSBMSDREQ pReq, uint8_t bAsc, uint8_t bAscq, const char *pszWhy)
 {
+    RT_NOREF(bAsc, bAscq, pszWhy);
     Log(("usbMsdScsiIllegalRequest: bAsc=%#x bAscq=%#x %s\n", bAsc, bAscq, pszWhy));
 
     RT_ZERO(pReq->ScsiReqSense);
@@ -1553,6 +1556,7 @@ static int usbMsdHandleScsiReqestSense(PUSBMSD pThis, PUSBMSDREQ pReq, PCUSBCBW
  */
 static int usbMsdSubmitScsiCommand(PUSBMSD pThis, PUSBMSDREQ pReq, const char *pszCaller)
 {
+    RT_NOREF(pszCaller);
     Log(("%s: Entering EXECUTING (dCBWTag=%#x).\n", pszCaller, pReq->Cbw.dCBWTag));
     Assert(pReq == pThis->pReq);
     pReq->enmState = USBMSDREQSTATE_EXECUTING;
@@ -1578,6 +1582,7 @@ static int usbMsdSubmitScsiCommand(PUSBMSD pThis, PUSBMSDREQ pReq, const char *p
  */
 static bool usbMsdIsValidCommand(PUSBMSD pThis, PCUSBCBW pCbw, PVUSBURB pUrb)
 {
+    RT_NOREF(pThis, pUrb);
     switch (pCbw->CBWCB[0])
     {
         case SCSI_REQUEST_SENSE:
@@ -2056,6 +2061,7 @@ static DECLCALLBACK(int) usbMsdUsbClearHaltedEndpoint(PPDMUSBINS pUsbIns, unsign
  */
 static DECLCALLBACK(int) usbMsdUsbSetInterface(PPDMUSBINS pUsbIns, uint8_t bInterfaceNumber, uint8_t bAlternateSetting)
 {
+    RT_NOREF(pUsbIns, bInterfaceNumber, bAlternateSetting);
     LogFlow(("usbMsdUsbSetInterface/#%u: bInterfaceNumber=%u bAlternateSetting=%u\n", pUsbIns->iInstance, bInterfaceNumber, bAlternateSetting));
     Assert(bAlternateSetting == 0);
     return VINF_SUCCESS;
@@ -2068,6 +2074,7 @@ static DECLCALLBACK(int) usbMsdUsbSetInterface(PPDMUSBINS pUsbIns, uint8_t bInte
 static DECLCALLBACK(int) usbMsdUsbSetConfiguration(PPDMUSBINS pUsbIns, uint8_t bConfigurationValue,
                                                    const void *pvOldCfgDesc, const void *pvOldIfState, const void *pvNewCfgDesc)
 {
+    RT_NOREF(pvOldCfgDesc, pvOldIfState,  pvNewCfgDesc);
     PUSBMSD pThis = PDMINS_2_DATA(pUsbIns, PUSBMSD);
     LogFlow(("usbMsdUsbSetConfiguration/#%u: bConfigurationValue=%u\n", pUsbIns->iInstance, bConfigurationValue));
     Assert(bConfigurationValue == 1);
@@ -2106,6 +2113,7 @@ static DECLCALLBACK(PCPDMUSBDESCCACHE) usbMsdUsbGetDescriptorCache(PPDMUSBINS pU
  */
 static DECLCALLBACK(int) usbMsdUsbReset(PPDMUSBINS pUsbIns, bool fResetOnLinux)
 {
+    RT_NOREF(fResetOnLinux);
     PUSBMSD pThis = PDMINS_2_DATA(pUsbIns, PUSBMSD);
     LogFlow(("usbMsdUsbReset/#%u:\n", pUsbIns->iInstance));
     RTCritSectEnter(&pThis->CritSect);
@@ -2142,8 +2150,8 @@ static DECLCALLBACK(void) usbMsdVMPowerOff(PPDMUSBINS pUsbIns)
  */
 static DECLCALLBACK(int) usbMsdDriverAttach(PPDMUSBINS pUsbIns, unsigned iLUN, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
     PUSBMSD pThis = PDMINS_2_DATA(pUsbIns, PUSBMSD);
-    int rc;
 
     LogFlow(("usbMsdDetach/#%u:\n", pUsbIns->iInstance));
 
@@ -2159,7 +2167,7 @@ static DECLCALLBACK(int) usbMsdDriverAttach(PPDMUSBINS pUsbIns, unsigned iLUN, u
      * Try attach the block device and get the interfaces,
      * required as well as optional.
      */
-    rc = PDMUsbHlpDriverAttach(pUsbIns, iLUN, &pThis->Lun0.IBase, &pThis->Lun0.pIBase, NULL);
+    int rc = PDMUsbHlpDriverAttach(pUsbIns, iLUN, &pThis->Lun0.IBase, &pThis->Lun0.pIBase, NULL);
     if (RT_SUCCESS(rc))
     {
         /* Get SCSI connector interface. */
@@ -2197,6 +2205,7 @@ static DECLCALLBACK(int) usbMsdDriverAttach(PPDMUSBINS pUsbIns, unsigned iLUN, u
  */
 static DECLCALLBACK(void) usbMsdDriverDetach(PPDMUSBINS pUsbIns, unsigned iLUN, uint32_t fFlags)
 {
+    RT_NOREF(iLUN, fFlags);
     PUSBMSD pThis = PDMINS_2_DATA(pUsbIns, PUSBMSD);
 
     LogFlow(("usbMsdDetach/#%u:\n", pUsbIns->iInstance));
@@ -2254,6 +2263,7 @@ static DECLCALLBACK(void) usbMsdVMReset(PPDMUSBINS pUsbIns)
  */
 static DECLCALLBACK(void) usbMsdDestruct(PPDMUSBINS pUsbIns)
 {
+    PDMUSB_CHECK_VERSIONS_RETURN_VOID(pUsbIns);
     PUSBMSD pThis = PDMINS_2_DATA(pUsbIns, PUSBMSD);
     LogFlow(("usbMsdDestruct/#%u:\n", pUsbIns->iInstance));
 
@@ -2289,6 +2299,8 @@ static DECLCALLBACK(void) usbMsdDestruct(PPDMUSBINS pUsbIns)
  */
 static DECLCALLBACK(int) usbMsdConstruct(PPDMUSBINS pUsbIns, int iInstance, PCFGMNODE pCfg, PCFGMNODE pCfgGlobal)
 {
+    RT_NOREF(pCfgGlobal);
+    PDMUSB_CHECK_VERSIONS_RETURN(pUsbIns);
     PUSBMSD pThis = PDMINS_2_DATA(pUsbIns, PUSBMSD);
     Log(("usbMsdConstruct/#%u:\n", iInstance));
 
diff --git a/src/VBox/Devices/Storage/VBoxSCSI.cpp b/src/VBox/Devices/Storage/VBoxSCSI.cpp
index 388be3c..f795aec 100644
--- a/src/VBox/Devices/Storage/VBoxSCSI.cpp
+++ b/src/VBox/Devices/Storage/VBoxSCSI.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -349,6 +349,7 @@ int vboxscsiRequestFinished(PVBOXSCSI pVBoxSCSI, PPDMSCSIREQUEST pScsiRequest, i
 int vboxscsiReadString(PPDMDEVINS pDevIns, PVBOXSCSI pVBoxSCSI, uint8_t iRegister,
                        uint8_t *pbDst, uint32_t *pcTransfers, unsigned cb)
 {
+    RT_NOREF(pDevIns);
     LogFlowFunc(("pDevIns=%#p pVBoxSCSI=%#p iRegister=%d cTransfers=%u cb=%u\n",
                  pDevIns, pVBoxSCSI, iRegister, *pcTransfers, cb));
 
@@ -406,6 +407,8 @@ int vboxscsiReadString(PPDMDEVINS pDevIns, PVBOXSCSI pVBoxSCSI, uint8_t iRegiste
 int vboxscsiWriteString(PPDMDEVINS pDevIns, PVBOXSCSI pVBoxSCSI, uint8_t iRegister,
                         uint8_t const *pbSrc, uint32_t *pcTransfers, unsigned cb)
 {
+    RT_NOREF(pDevIns);
+
     /*
      * Check preconditions, fall back to non-string I/O handler.
      */
diff --git a/src/VBox/Devices/Storage/VBoxSCSI.h b/src/VBox/Devices/Storage/VBoxSCSI.h
index 1c6c98e..1865186 100644
--- a/src/VBox/Devices/Storage/VBoxSCSI.h
+++ b/src/VBox/Devices/Storage/VBoxSCSI.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Storage/VSCSI/VSCSIDevice.cpp b/src/VBox/Devices/Storage/VSCSI/VSCSIDevice.cpp
index 2e676cb..4302ff2 100644
--- a/src/VBox/Devices/Storage/VSCSI/VSCSIDevice.cpp
+++ b/src/VBox/Devices/Storage/VSCSI/VSCSIDevice.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -324,6 +324,7 @@ VBOXDDU_DECL(int) VSCSIDeviceReqCreate(VSCSIDEVICE hVScsiDevice, PVSCSIREQ phVSc
                                        PCRTSGSEG paSGList, uint8_t *pbSense,
                                        size_t cbSense, void *pvVScsiReqUser)
 {
+    RT_NOREF1(cbSGList);
     PVSCSIDEVICEINT pVScsiDevice = (PVSCSIDEVICEINT)hVScsiDevice;
     PVSCSIREQINT    pVScsiReq    = NULL;
 
diff --git a/src/VBox/Devices/Storage/VSCSI/VSCSIInline.h b/src/VBox/Devices/Storage/VSCSI/VSCSIInline.h
index ceed024..d180bdf 100644
--- a/src/VBox/Devices/Storage/VSCSI/VSCSIInline.h
+++ b/src/VBox/Devices/Storage/VSCSI/VSCSIInline.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Storage/VSCSI/VSCSIInternal.h b/src/VBox/Devices/Storage/VSCSI/VSCSIInternal.h
index 4f247e2..1abd7d2 100644
--- a/src/VBox/Devices/Storage/VSCSI/VSCSIInternal.h
+++ b/src/VBox/Devices/Storage/VSCSI/VSCSIInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Storage/VSCSI/VSCSIIoReq.cpp b/src/VBox/Devices/Storage/VSCSI/VSCSIIoReq.cpp
index b127f60..ba62d86 100644
--- a/src/VBox/Devices/Storage/VSCSI/VSCSIIoReq.cpp
+++ b/src/VBox/Devices/Storage/VSCSI/VSCSIIoReq.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Storage/VSCSI/VSCSILun.cpp b/src/VBox/Devices/Storage/VSCSI/VSCSILun.cpp
index 1f63119..453b53c 100644
--- a/src/VBox/Devices/Storage/VSCSI/VSCSILun.cpp
+++ b/src/VBox/Devices/Storage/VSCSI/VSCSILun.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Storage/VSCSI/VSCSILunMmc.cpp b/src/VBox/Devices/Storage/VSCSI/VSCSILunMmc.cpp
index 613d100..521c237 100644
--- a/src/VBox/Devices/Storage/VSCSI/VSCSILunMmc.cpp
+++ b/src/VBox/Devices/Storage/VSCSI/VSCSILunMmc.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -54,10 +54,12 @@ DECLINLINE(void) mmcLBA2MSF(uint8_t *pbBuf, uint32_t iLBA)
     pbBuf[2] = iLBA % 75;
 }
 
+#if 0 /* unused */
 DECLINLINE(uint32_t) mmcMSF2LBA(const uint8_t *pbBuf)
 {
     return (pbBuf[0] * 60 + pbBuf[1]) * 75 + pbBuf[2];
 }
+#endif
 
 
 /* Fabricate normal TOC information. */
@@ -127,7 +129,7 @@ static int mmcReadTOCNormal(PVSCSILUNINT pVScsiLun, PVSCSIREQINT pVScsiReq, uint
 /* Fabricate session information. */
 static int mmcReadTOCMulti(PVSCSILUNINT pVScsiLun, PVSCSIREQINT pVScsiReq, uint16_t cbMaxTransfer, bool fMSF)
 {
-    PVSCSILUNMMC    pVScsiLunMmc = (PVSCSILUNMMC)pVScsiLun;
+    RT_NOREF1(cbMaxTransfer);
     uint8_t         aReply[32];
     uint8_t         *pbBuf = aReply;
 
@@ -171,8 +173,7 @@ static DECLCALLBACK(int) vscsiLunMmcInit(PVSCSILUNINT pVScsiLun)
 
 static DECLCALLBACK(int) vscsiLunMmcDestroy(PVSCSILUNINT pVScsiLun)
 {
-    PVSCSILUNMMC    pVScsiLunMmc = (PVSCSILUNMMC)pVScsiLun;
-
+    RT_NOREF1(pVScsiLun);
     return VINF_SUCCESS;
 }
 
@@ -294,7 +295,7 @@ static DECLCALLBACK(int) vscsiLunMmcReqProcess(PVSCSILUNINT pVScsiLun, PVSCSIREQ
         }
         case SCSI_MODE_SELECT_6:
         {
-            /* @todo: implement!! */
+            /** @todo implement!! */
             rcReq = vscsiLunReqSenseOkSet(pVScsiLun, pVScsiReq);
             break;
         }
@@ -367,7 +368,6 @@ static DECLCALLBACK(int) vscsiLunMmcReqProcess(PVSCSILUNINT pVScsiLun, PVSCSIREQ
         }
         case SCSI_LOG_SENSE:
         {
-            uint16_t cbMax = vscsiBE2HU16(&pVScsiReq->pbCDB[7]);
             uint8_t uPageCode = pVScsiReq->pbCDB[2] & 0x3f;
             uint8_t uSubPageCode = pVScsiReq->pbCDB[3];
 
diff --git a/src/VBox/Devices/Storage/VSCSI/VSCSILunSbc.cpp b/src/VBox/Devices/Storage/VSCSI/VSCSILunSbc.cpp
index 47311d8..b642be7 100644
--- a/src/VBox/Devices/Storage/VSCSI/VSCSILunSbc.cpp
+++ b/src/VBox/Devices/Storage/VSCSI/VSCSILunSbc.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -79,7 +79,7 @@ static DECLCALLBACK(int) vscsiLunSbcInit(PVSCSILUNINT pVScsiLun)
                                           VSCSI_VPD_DEVID_SIZE, (uint8_t **)&pDevIdPage);
         if (RT_SUCCESS(rc))
         {
-            /** @todo: Not conforming to the SPC spec but Solaris needs at least a stub to work. */
+            /** @todo Not conforming to the SPC spec but Solaris needs at least a stub to work. */
             pDevIdPage->u5PeripheralDeviceType = SCSI_INQUIRY_DATA_PERIPHERAL_DEVICE_TYPE_DIRECT_ACCESS;
             pDevIdPage->u3PeripheralQualifier  = SCSI_INQUIRY_DATA_PERIPHERAL_QUALIFIER_CONNECTED;
             pDevIdPage->u16PageLength          = RT_H2BE_U16(0x0);
@@ -427,7 +427,6 @@ static DECLCALLBACK(int) vscsiLunSbcReqProcess(PVSCSILUNINT pVScsiLun, PVSCSIREQ
         }
         case SCSI_LOG_SENSE:
         {
-            uint16_t cbMax = vscsiBE2HU16(&pVScsiReq->pbCDB[7]);
             uint8_t uPageCode = pVScsiReq->pbCDB[2] & 0x3f;
             uint8_t uSubPageCode = pVScsiReq->pbCDB[3];
 
diff --git a/src/VBox/Devices/Storage/VSCSI/VSCSISense.cpp b/src/VBox/Devices/Storage/VSCSI/VSCSISense.cpp
index adc910e..ad2a7be 100644
--- a/src/VBox/Devices/Storage/VSCSI/VSCSISense.cpp
+++ b/src/VBox/Devices/Storage/VSCSI/VSCSISense.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Storage/VSCSI/VSCSIVpdPagePool.cpp b/src/VBox/Devices/Storage/VSCSI/VSCSIVpdPagePool.cpp
index a8ed5ea..ca37a95 100644
--- a/src/VBox/Devices/Storage/VSCSI/VSCSIVpdPagePool.cpp
+++ b/src/VBox/Devices/Storage/VSCSI/VSCSIVpdPagePool.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Storage/VSCSI/VSCSIVpdPages.h b/src/VBox/Devices/Storage/VSCSI/VSCSIVpdPages.h
index 69eb49a..cef321f 100644
--- a/src/VBox/Devices/Storage/VSCSI/VSCSIVpdPages.h
+++ b/src/VBox/Devices/Storage/VSCSI/VSCSIVpdPages.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Storage/ide.h b/src/VBox/Devices/Storage/ide.h
index ff6284e..e255160 100644
--- a/src/VBox/Devices/Storage/ide.h
+++ b/src/VBox/Devices/Storage/ide.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Storage/swab.h b/src/VBox/Devices/Storage/swab.h
index f0769e0..9e4e2a6 100644
--- a/src/VBox/Devices/Storage/swab.h
+++ b/src/VBox/Devices/Storage/swab.h
@@ -15,7 +15,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/USB/DevOHCI.cpp b/src/VBox/Devices/USB/DevOHCI.cpp
index 149f120..b513cbe 100644
--- a/src/VBox/Devices/USB/DevOHCI.cpp
+++ b/src/VBox/Devices/USB/DevOHCI.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -106,6 +106,7 @@
 #define VBOX_WITH_OHCI_PHYS_READ_CACHE
 //#define VBOX_WITH_OHCI_PHYS_READ_STATS
 
+
 /*********************************************************************************************************************************
 *   Structures and Typedefs                                                                                                      *
 *********************************************************************************************************************************/
@@ -770,10 +771,44 @@ typedef struct ohci_opreg
 
 #ifndef VBOX_DEVICE_STRUCT_TESTCASE
 
+#ifdef VBOX_WITH_OHCI_PHYS_READ_STATS
+/*
+ * Explain
+ */
+typedef struct OHCIDESCREADSTATS
+{
+    uint32_t cReads;
+    uint32_t cPageChange;
+    uint32_t cMinReadsPerPage;
+    uint32_t cMaxReadsPerPage;
+
+    uint32_t cReadsLastPage;
+    uint32_t u32LastPageAddr;
+} OHCIDESCREADSTATS;
+typedef OHCIDESCREADSTATS *POHCIDESCREADSTATS;
+
+typedef struct OHCIPHYSREADSTATS
+{
+    OHCIDESCREADSTATS ed;
+    OHCIDESCREADSTATS td;
+    OHCIDESCREADSTATS all;
+
+    uint32_t cCrossReads;
+    uint32_t cCacheReads;
+    uint32_t cPageReads;
+} OHCIPHYSREADSTATS;
+typedef OHCIPHYSREADSTATS *POHCIPHYSREADSTATS;
+typedef OHCIPHYSREADSTATS const *PCOHCIPHYSREADSTATS;
+#endif /* VBOX_WITH_OHCI_PHYS_READ_STATS */
+
 
 /*********************************************************************************************************************************
 *   Global Variables                                                                                                             *
 *********************************************************************************************************************************/
+#if defined(VBOX_WITH_OHCI_PHYS_READ_STATS) && defined(IN_RING3)
+static OHCIPHYSREADSTATS g_PhysReadState;
+#endif
+
 #if defined(LOG_ENABLED) && defined(IN_RING3)
 static bool g_fLogBulkEPs = false;
 static bool g_fLogControlEPs = false;
@@ -871,6 +906,8 @@ static void ohciUpdateInterruptLocked(POHCI ohci, const char *msg)
     }
 }
 
+#ifdef IN_RING3
+
 /**
  * Set an interrupt, use the wrapper ohciSetInterrupt.
  */
@@ -893,10 +930,8 @@ DECLINLINE(int) ohciSetInterruptInt(POHCI ohci, int rcBusy, uint32_t intr, const
 /**
  * Set an interrupt wrapper macro for logging purposes.
  */
-#define ohciSetInterrupt(ohci, a_rcBusy, intr) ohciSetInterruptInt(ohci, a_rcBusy, intr, #intr)
-#define ohciR3SetInterrupt(ohci, intr) ohciSetInterruptInt(ohci, VERR_IGNORED, intr, #intr)
+# define ohciR3SetInterrupt(ohci, intr) ohciSetInterruptInt(ohci, VERR_IGNORED, intr, #intr)
 
-#ifdef IN_RING3
 
 /* Carry out a hardware remote wakeup */
 static void ohci_remote_wakeup(POHCI pThis)
@@ -983,6 +1018,7 @@ static DECLCALLBACK(unsigned) ohciRhGetAvailablePorts(PVUSBIROOTHUBPORT pInterfa
  */
 static DECLCALLBACK(uint32_t) ohciRhGetUSBVersions(PVUSBIROOTHUBPORT pInterface)
 {
+    RT_NOREF(pInterface);
     return VUSB_STDVER_11;
 }
 
@@ -1033,6 +1069,7 @@ static DECLCALLBACK(int) ohciRhAttach(PVUSBIROOTHUBPORT pInterface, PVUSBIDEVICE
  */
 static DECLCALLBACK(void) ohciRhDetach(PVUSBIROOTHUBPORT pInterface, PVUSBIDEVICE pDev, unsigned uPort)
 {
+    RT_NOREF(pDev);
     POHCI pThis = VUSBIROOTHUBPORT_2_OHCI(pInterface);
     LogFlow(("ohciRhDetach: pDev=%p uPort=%u\n", pDev, uPort));
     PDMCritSectEnter(pThis->pDevInsR3->pCritSectRoR3, VERR_IGNORED);
@@ -1213,7 +1250,6 @@ static void ohciDoReset(POHCI pThis, uint32_t fNewMode, bool fResetOnLinux)
     if (fNewMode == OHCI_USB_RESET)
         VUSBIDevReset(pThis->RootHub.pIDev, fResetOnLinux, NULL, NULL, NULL);
 }
-#endif /* IN_RING3 */
 
 /**
  * Reads physical memory.
@@ -1239,10 +1275,10 @@ DECLINLINE(void) ohciPhysWrite(POHCI pThis, uint32_t Addr, const void *pvBuf, si
 DECLINLINE(void) ohciGetDWords(POHCI pThis, uint32_t Addr, uint32_t *pau32s, int c32s)
 {
     ohciPhysRead(pThis, Addr, pau32s, c32s * sizeof(uint32_t));
-#if BYTE_ORDER != LITTLE_ENDIAN
+# ifndef RT_LITTLE_ENDIAN
     for(int i = 0; i < c32s; i++)
         pau32s[i] = RT_H2LE_U32(pau32s[i]);
-#endif
+# endif
 }
 
 /**
@@ -1250,46 +1286,22 @@ DECLINLINE(void) ohciGetDWords(POHCI pThis, uint32_t Addr, uint32_t *pau32s, int
  */
 DECLINLINE(void) ohciPutDWords(POHCI pThis, uint32_t Addr, const uint32_t *pau32s, int cu32s)
 {
-#if BYTE_ORDER == LITTLE_ENDIAN
+# ifdef RT_LITTLE_ENDIAN
     ohciPhysWrite(pThis, Addr, pau32s, cu32s << 2);
-#else
+# else
     for (int i = 0; i < c32s; i++, pau32s++, Addr += sizeof(*pau32s))
     {
         uint32_t u32Tmp = RT_H2LE_U32(*pau32s);
         ohciPhysWrite(pThis, Addr, (uint8_t *)&u32Tmp, sizeof(u32Tmp));
     }
-#endif
+# endif
 }
 
 
-#ifdef IN_RING3
 
-#ifdef VBOX_WITH_OHCI_PHYS_READ_STATS
-struct DescReadStats
-{
-    uint32_t cReads;
-    uint32_t cPageChange;
-    uint32_t cMinReadsPerPage;
-    uint32_t cMaxReadsPerPage;
+# ifdef VBOX_WITH_OHCI_PHYS_READ_STATS
 
-    uint32_t cReadsLastPage;
-    uint32_t u32LastPageAddr;
-};
-
-struct PhysReadStats
-{
-    struct DescReadStats ed;
-    struct DescReadStats td;
-    struct DescReadStats all;
-
-    uint32_t cCrossReads;
-    uint32_t cCacheReads;
-    uint32_t cPageReads;
-};
-
-static struct PhysReadStats physReadStats;
-
-static void descReadStatsReset(struct DescReadStats *p)
+static void descReadStatsReset(POHCIDESCREADSTATS p)
 {
     p->cReads = 0;
     p->cPageChange = 0;
@@ -1300,7 +1312,7 @@ static void descReadStatsReset(struct DescReadStats *p)
     p->u32LastPageAddr = 0;
 }
 
-static void physReadStatsReset(struct PhysReadStats *p)
+static void physReadStatsReset(POHCIPHYSREADSTATS p)
 {
     descReadStatsReset(&p->ed);
     descReadStatsReset(&p->td);
@@ -1311,7 +1323,7 @@ static void physReadStatsReset(struct PhysReadStats *p)
     p->cPageReads = 0;
 }
 
-static void physReadStatsUpdateDesc(struct DescReadStats *p, uint32_t u32Addr)
+static void physReadStatsUpdateDesc(POHCIDESCREADSTATS p, uint32_t u32Addr)
 {
     const uint32_t u32PageAddr = u32Addr & ~UINT32_C(0xFFF);
 
@@ -1341,14 +1353,14 @@ static void physReadStatsUpdateDesc(struct DescReadStats *p, uint32_t u32Addr)
     }
 }
 
-static void physReadStatsPrint(struct PhysReadStats *p)
+static void physReadStatsPrint(PCOHCIPHYSREADSTATS p)
 {
     p->ed.cMinReadsPerPage = RT_MIN(p->ed.cMinReadsPerPage, p->ed.cReadsLastPage);
     p->ed.cMaxReadsPerPage = RT_MAX(p->ed.cMaxReadsPerPage, p->ed.cReadsLastPage);;
-    
+
     p->td.cMinReadsPerPage = RT_MIN(p->td.cMinReadsPerPage, p->td.cReadsLastPage);
     p->td.cMaxReadsPerPage = RT_MAX(p->td.cMaxReadsPerPage, p->td.cReadsLastPage);;
-    
+
     p->all.cMinReadsPerPage = RT_MIN(p->all.cMinReadsPerPage, p->all.cReadsLastPage);
     p->all.cMaxReadsPerPage = RT_MAX(p->all.cMaxReadsPerPage, p->all.cReadsLastPage);;
 
@@ -1366,9 +1378,10 @@ static void physReadStatsPrint(struct PhysReadStats *p)
 
     physReadStatsReset(p);
 }
-#endif /* VBOX_WITH_OHCI_PHYS_READ_STATS */
 
-#ifdef VBOX_WITH_OHCI_PHYS_READ_CACHE
+# endif /* VBOX_WITH_OHCI_PHYS_READ_STATS */
+# ifdef VBOX_WITH_OHCI_PHYS_READ_CACHE
+
 static POHCIPAGECACHE ohciPhysReadCacheAlloc(void)
 {
     return (POHCIPAGECACHE)RTMemAlloc(sizeof(OHCIPAGECACHE));
@@ -1395,22 +1408,22 @@ static void ohciPhysReadCacheRead(POHCI pThis, POHCIPAGECACHE pPageCache, RTGCPH
             PDMDevHlpPhysRead(pThis->pDevInsR3, PageAddr,
                               pPageCache->au8PhysReadCache, sizeof(pPageCache->au8PhysReadCache));
             pPageCache->GCPhysReadCacheAddr = PageAddr;
-#ifdef VBOX_WITH_OHCI_PHYS_READ_STATS
-            ++physReadStats.cPageReads;
-#endif
+#  ifdef VBOX_WITH_OHCI_PHYS_READ_STATS
+            ++g_PhysReadState.cPageReads;
+#  endif
         }
 
         memcpy(pvBuf, &pPageCache->au8PhysReadCache[GCPhys & PAGE_OFFSET_MASK], cbBuf);
-#ifdef VBOX_WITH_OHCI_PHYS_READ_STATS
-        ++physReadStats.cCacheReads;
-#endif
+#  ifdef VBOX_WITH_OHCI_PHYS_READ_STATS
+        ++g_PhysReadState.cCacheReads;
+#  endif
     }
     else
     {
         PDMDevHlpPhysRead(pThis->pDevInsR3, GCPhys, pvBuf, cbBuf);
-#ifdef VBOX_WITH_OHCI_PHYS_READ_STATS
-        ++physReadStats.cCrossReads;
-#endif
+#  ifdef VBOX_WITH_OHCI_PHYS_READ_STATS
+        ++g_PhysReadState.cCrossReads;
+#  endif
     }
 }
 
@@ -1423,17 +1436,18 @@ static void ohciReadTdCached(POHCI pThis, uint32_t TdAddr, POHCITD pTd)
 {
     ohciPhysReadCacheRead(pThis, pThis->pCacheTD, TdAddr, pTd, sizeof(*pTd));
 }
-#endif /* VBOX_WITH_OHCI_PHYS_READ_CACHE */
+
+# endif /* VBOX_WITH_OHCI_PHYS_READ_CACHE */
 
 /**
  * Reads an OHCIED.
  */
 DECLINLINE(void) ohciReadEd(POHCI pThis, uint32_t EdAddr, POHCIED pEd)
 {
-#ifdef VBOX_WITH_OHCI_PHYS_READ_STATS
-    physReadStatsUpdateDesc(&physReadStats.ed, EdAddr);
-    physReadStatsUpdateDesc(&physReadStats.all, EdAddr);
-#endif
+# ifdef VBOX_WITH_OHCI_PHYS_READ_STATS
+    physReadStatsUpdateDesc(&g_PhysReadState.ed, EdAddr);
+    physReadStatsUpdateDesc(&g_PhysReadState.all, EdAddr);
+# endif
     ohciGetDWords(pThis, EdAddr, (uint32_t *)pEd, sizeof(*pEd) >> 2);
 }
 
@@ -1442,12 +1456,12 @@ DECLINLINE(void) ohciReadEd(POHCI pThis, uint32_t EdAddr, POHCIED pEd)
  */
 DECLINLINE(void) ohciReadTd(POHCI pThis, uint32_t TdAddr, POHCITD pTd)
 {
-#ifdef VBOX_WITH_OHCI_PHYS_READ_STATS
-    physReadStatsUpdateDesc(&physReadStats.td, TdAddr);
-    physReadStatsUpdateDesc(&physReadStats.all, TdAddr);
-#endif
+# ifdef VBOX_WITH_OHCI_PHYS_READ_STATS
+    physReadStatsUpdateDesc(&g_PhysReadState.td, TdAddr);
+    physReadStatsUpdateDesc(&g_PhysReadState.all, TdAddr);
+# endif
     ohciGetDWords(pThis, TdAddr, (uint32_t *)pTd, sizeof(*pTd) >> 2);
-#ifdef LOG_ENABLED
+# ifdef LOG_ENABLED
     if (LogIs3Enabled())
     {
         uint32_t hichg;
@@ -1464,7 +1478,7 @@ DECLINLINE(void) ohciReadTd(POHCI pThis, uint32_t TdAddr, POHCITD pTd)
               pTd->NextTD,
               pTd->be,
               pTd->hwinfo & TD_HWINFO_UNKNOWN_MASK));
-#if 0
+#  if 0
         if (LogIs3Enabled())
         {
             /*
@@ -1489,9 +1503,9 @@ DECLINLINE(void) ohciReadTd(POHCI pThis, uint32_t TdAddr, POHCITD pTd)
                   *((uint32_t *)&abXpTd[0x40]),
                   sizeof(abXpTd), &abXpTd[0]));
         }
-#endif
+#  endif
     }
-#endif
+# endif
 }
 
 /**
@@ -1500,7 +1514,7 @@ DECLINLINE(void) ohciReadTd(POHCI pThis, uint32_t TdAddr, POHCITD pTd)
 DECLINLINE(void) ohciReadITd(POHCI pThis, uint32_t ITdAddr, POHCIITD pITd)
 {
     ohciGetDWords(pThis, ITdAddr, (uint32_t *)pITd, sizeof(*pITd) / sizeof(uint32_t));
-#ifdef LOG_ENABLED
+# ifdef LOG_ENABLED
     if (LogIs3Enabled())
     {
         Log3(("ohciReadITd(,%#010x,): SF=%#06x (%#RX32) DI=%#x FC=%d CC=%#x BP0=%#010x NextTD=%#010x BE=%#010x\n",
@@ -1522,7 +1536,7 @@ DECLINLINE(void) ohciReadITd(POHCI pThis, uint32_t ITdAddr, POHCIITD pITd)
               pITd->aPSW[6] >> 12, pITd->aPSW[6] & 0xfff,
               pITd->aPSW[7] >> 12, pITd->aPSW[7] & 0xfff));
     }
-#endif
+# endif
 }
 
 
@@ -1531,7 +1545,7 @@ DECLINLINE(void) ohciReadITd(POHCI pThis, uint32_t ITdAddr, POHCIITD pITd)
  */
 DECLINLINE(void) ohciWriteEd(POHCI pThis, uint32_t EdAddr, PCOHCIED pEd)
 {
-#ifdef LOG_ENABLED
+# ifdef LOG_ENABLED
     if (LogIs3Enabled())
     {
         OHCIED      EdOld;
@@ -1554,7 +1568,7 @@ DECLINLINE(void) ohciWriteEd(POHCI pThis, uint32_t EdAddr, PCOHCIED pEd)
               (EdOld.HeadP ^ pEd->HeadP) & 2 ? "*" : "", (pEd->HeadP >> 1) & 1,
               EdOld.NextED != pEd->NextED ? "*" : "", pEd->NextED));
     }
-#endif
+# endif
 
     ohciPutDWords(pThis, EdAddr, (uint32_t *)pEd, sizeof(*pEd) >> 2);
 }
@@ -1565,7 +1579,7 @@ DECLINLINE(void) ohciWriteEd(POHCI pThis, uint32_t EdAddr, PCOHCIED pEd)
  */
 DECLINLINE(void) ohciWriteTd(POHCI pThis, uint32_t TdAddr, PCOHCITD pTd, const char *pszLogMsg)
 {
-#ifdef LOG_ENABLED
+# ifdef LOG_ENABLED
     if (LogIs3Enabled())
     {
         OHCITD TdOld;
@@ -1584,7 +1598,9 @@ DECLINLINE(void) ohciWriteTd(POHCI pThis, uint32_t TdAddr, PCOHCITD pTd, const c
               TdOld.be   != pTd->be   ? "*" : "", pTd->be,
               pszLogMsg));
     }
-#endif
+# else
+    RT_NOREF(pszLogMsg);
+# endif
     ohciPutDWords(pThis, TdAddr, (uint32_t *)pTd, sizeof(*pTd) >> 2);
 }
 
@@ -1593,7 +1609,7 @@ DECLINLINE(void) ohciWriteTd(POHCI pThis, uint32_t TdAddr, PCOHCITD pTd, const c
  */
 DECLINLINE(void) ohciWriteITd(POHCI pThis, uint32_t ITdAddr, PCOHCIITD pITd, const char *pszLogMsg)
 {
-#ifdef LOG_ENABLED
+# ifdef LOG_ENABLED
     if (LogIs3Enabled())
     {
         OHCIITD ITdOld;
@@ -1619,12 +1635,14 @@ DECLINLINE(void) ohciWriteITd(POHCI pThis, uint32_t ITdAddr, PCOHCIITD pITd, con
               (ITdOld.aPSW[6] >> 12) != (pITd->aPSW[6] >> 12) ? "*" : "", pITd->aPSW[6] >> 12,  (ITdOld.aPSW[6] & 0xfff) != (pITd->aPSW[6] & 0xfff) ? "*" : "", pITd->aPSW[6] & 0xfff,
               (ITdOld.aPSW[7] >> 12) != (pITd->aPSW[7] >> 12) ? "*" : "", pITd->aPSW[7] >> 12,  (ITdOld.aPSW[7] & 0xfff) != (pITd->aPSW[7] & 0xfff) ? "*" : "", pITd->aPSW[7] & 0xfff));
     }
-#endif
+# else
+    RT_NOREF(pszLogMsg);
+# endif
     ohciPutDWords(pThis, ITdAddr, (uint32_t *)pITd, sizeof(*pITd) / sizeof(uint32_t));
 }
 
 
-#ifdef LOG_ENABLED
+# ifdef LOG_ENABLED
 
 /**
  * Core TD queue dumper. LOG_ENABLED builds only.
@@ -1679,6 +1697,7 @@ DECLINLINE(void) ohciDumpTdQueue(POHCI pThis, uint32_t GCPhysHead, const char *p
  */
 DECLINLINE(void) ohciDumpITdQueueCore(POHCI pThis, uint32_t GCPhysHead, uint32_t GCPhysTail, bool fFull)
 {
+    RT_NOREF(fFull);
     uint32_t GCPhys = GCPhysHead;
     int cMax = 100;
     for (;;)
@@ -1716,6 +1735,7 @@ DECLINLINE(void) ohciDumpITdQueueCore(POHCI pThis, uint32_t GCPhysHead, uint32_t
  */
 DECLINLINE(void) ohciDumpEdList(POHCI pThis, uint32_t GCPhysHead, const char *pszMsg, bool fTDs)
 {
+    RT_NOREF(fTDs);
     uint32_t GCPhys = GCPhysHead;
     if (pszMsg)
         Log4(("%s:", pszMsg));
@@ -1757,10 +1777,10 @@ DECLINLINE(void) ohciDumpEdList(POHCI pThis, uint32_t GCPhysHead, const char *ps
         GCPhys = Ed.NextED & ED_PTR_MASK;
         Assert(GCPhys != GCPhysHead);
     }
-    Log4(("\n"));
+    /* not reached */
 }
 
-#endif /* LOG_ENABLED */
+# endif /* LOG_ENABLED */
 
 
 DECLINLINE(int) ohci_in_flight_find_free(POHCI pThis, const int iStart)
@@ -1794,9 +1814,9 @@ static void ohci_in_flight_add(POHCI pThis, uint32_t GCPhysTD, PVUSBURB pUrb)
     int i = ohci_in_flight_find_free(pThis, (GCPhysTD >> 4) % RT_ELEMENTS(pThis->aInFlight));
     if (i >= 0)
     {
-#ifdef LOG_ENABLED
+# ifdef LOG_ENABLED
         pUrb->pHci->u32FrameNo = pThis->HcFmNumber;
-#endif
+# endif
         pThis->aInFlight[i].GCPhysTD = GCPhysTD;
         pThis->aInFlight[i].pUrb = pUrb;
         pThis->cInFlight++;
@@ -1898,11 +1918,11 @@ static int ohci_in_flight_remove(POHCI pThis, uint32_t GCPhysTD)
     int i = ohci_in_flight_find(pThis, GCPhysTD);
     if (i >= 0)
     {
-#ifdef LOG_ENABLED
+# ifdef LOG_ENABLED
         const int cFramesInFlight = pThis->HcFmNumber - pThis->aInFlight[i].pUrb->pHci->u32FrameNo;
-#else
+# else
         const int cFramesInFlight = 0;
-#endif
+# endif
         Log2(("ohci_in_flight_remove: reaping TD=%#010x %d frames (%#010x-%#010x)\n",
               GCPhysTD, cFramesInFlight, pThis->aInFlight[i].pUrb->pHci->u32FrameNo, pThis->HcFmNumber));
         pThis->aInFlight[i].GCPhysTD = 0;
@@ -1936,7 +1956,7 @@ static int ohci_in_flight_remove_urb(POHCI pThis, PVUSBURB pUrb)
 }
 
 
-#if defined(VBOX_STRICT) || defined(LOG_ENABLED)
+# if defined(VBOX_STRICT) || defined(LOG_ENABLED)
 
 /**
  * Empties the in-done-queue.
@@ -1971,7 +1991,7 @@ static int ohci_in_done_queue_find(POHCI pThis, uint32_t GCPhysTD)
 static bool ohci_in_done_queue_check(POHCI pThis, uint32_t GCPhysTD)
 {
     int i = ohci_in_done_queue_find(pThis, GCPhysTD);
-#if 0
+#  if 0
     /* This condition has been observed with the USB tablet emulation or with
      * a real USB mouse and an SMP XP guest.  I am also not sure if this is
      * really a problem for us.  The assertion checks that the guest doesn't
@@ -1983,12 +2003,12 @@ static bool ohci_in_done_queue_check(POHCI pThis, uint32_t GCPhysTD)
      * re-submitted (can't see anything like that either).
      */
     AssertMsg(i < 0, ("TD %#010x (i=%d)\n", GCPhysTD, i));
-#endif
+#  endif
     return i < 0;
 }
 
 
-# ifdef VBOX_STRICT
+#  ifdef VBOX_STRICT
 /**
  * Adds a TD to the in-done-queue tracking, checking that it's not there already.
  * @param   pThis       OHCI instance data.
@@ -2000,8 +2020,8 @@ static void ohci_in_done_queue_add(POHCI pThis, uint32_t GCPhysTD)
     if (ohci_in_done_queue_check(pThis, GCPhysTD))
         pThis->aInDoneQueue[pThis->cInDoneQueue++].GCPhysTD = GCPhysTD;
 }
-# endif /* VBOX_STRICT */
-#endif /* defined(VBOX_STRICT) || defined(LOG_ENABLED) */
+#  endif /* VBOX_STRICT */
+# endif /* defined(VBOX_STRICT) || defined(LOG_ENABLED) */
 
 
 /**
@@ -2396,7 +2416,7 @@ static uint32_t ohciVUsbStatus2OhciStatus(VUSBSTATUS enmStatus)
  *
  * In general, all URBs should have status OK.
  */
-static void ohciRhXferCompleteIsochronousURB(POHCI pThis, PVUSBURB pUrb, POHCIED pEd, int cFmAge)
+static void ohciRhXferCompleteIsochronousURB(POHCI pThis, PVUSBURB pUrb /*, POHCIED pEd , int cFmAge*/)
 {
     /*
      * Copy the data back (if IN operation) and update the TDs.
@@ -2514,13 +2534,13 @@ static void ohciRhXferCompleteIsochronousURB(POHCI pThis, PVUSBURB pUrb, POHCIED
         /*
          * Move on to the done list and write back the modified TD.
          */
-#ifdef LOG_ENABLED
+# ifdef LOG_ENABLED
         if (!pThis->done)
             pThis->u32FmDoneQueueTail = pThis->HcFmNumber;
-# ifdef VBOX_STRICT
+#  ifdef VBOX_STRICT
         ohci_in_done_queue_add(pThis, ITdAddr);
+#  endif
 # endif
-#endif
         pITd->NextTD = pThis->done;
         pThis->done = ITdAddr;
 
@@ -2551,6 +2571,8 @@ static void ohciRhXferCompleteIsochronousURB(POHCI pThis, PVUSBURB pUrb, POHCIED
  */
 static void ohciRhXferCompleteGeneralURB(POHCI pThis, PVUSBURB pUrb, POHCIED pEd, int cFmAge)
 {
+    RT_NOREF(cFmAge);
+
     /*
      * Copy the data back (if IN operation) and update the TDs.
      */
@@ -2651,13 +2673,13 @@ static void ohciRhXferCompleteGeneralURB(POHCI pThis, PVUSBURB pUrb, POHCIED pEd
         /*
          * Move on to the done list and write back the modified TD.
          */
-#ifdef LOG_ENABLED
+# ifdef LOG_ENABLED
         if (!pThis->done)
             pThis->u32FmDoneQueueTail = pThis->HcFmNumber;
-# ifdef VBOX_STRICT
+#  ifdef VBOX_STRICT
         ohci_in_done_queue_add(pThis, TdAddr);
+#  endif
 # endif
-#endif
         pTd->NextTD = pThis->done;
         pThis->done = TdAddr;
 
@@ -2746,7 +2768,7 @@ static DECLCALLBACK(void) ohciRhXferCompletion(PVUSBIROOTHUBPORT pInterface, PVU
      * When appropriate also copy data back to the guest memory.
      */
     if (pUrb->enmType == VUSBXFERTYPE_ISOC)
-        ohciRhXferCompleteIsochronousURB(pThis, pUrb, &Ed, cFmAge);
+        ohciRhXferCompleteIsochronousURB(pThis, pUrb /*, &Ed , cFmAge*/);
     else
         ohciRhXferCompleteGeneralURB(pThis, pUrb, &Ed, cFmAge);
 
@@ -2830,8 +2852,11 @@ static DECLCALLBACK(bool) ohciRhXferError(PVUSBIROOTHUBPORT pInterface, PVUSBURB
 /**
  * Service a general transport descriptor.
  */
-static bool ohciServiceTd(POHCI pThis, VUSBXFERTYPE enmType, PCOHCIED pEd, uint32_t EdAddr, uint32_t TdAddr, uint32_t *pNextTdAddr, const char *pszListName)
+static bool ohciServiceTd(POHCI pThis, VUSBXFERTYPE enmType, PCOHCIED pEd, uint32_t EdAddr, uint32_t TdAddr,
+                          uint32_t *pNextTdAddr, const char *pszListName)
 {
+    RT_NOREF(pszListName);
+
     /*
      * Read the TD and setup the buffer data.
      */
@@ -2858,7 +2883,7 @@ static bool ohciServiceTd(POHCI pThis, VUSBXFERTYPE enmType, PCOHCIED pEd, uint3
                 case 0:             enmDir = VUSBDIRECTION_SETUP; break;
                 default:
                     Log(("ohciServiceTd: Invalid direction!!!! Td.hwinfo=%#x Ed.hwdinfo=%#x\n", Td.hwinfo, pEd->hwinfo));
-                    /* TODO: Do the correct thing here */
+                    /** @todo Do the correct thing here */
                     return false;
             }
             break;
@@ -2928,9 +2953,9 @@ static bool ohciServiceHeadTd(POHCI pThis, VUSBXFERTYPE enmType, PCOHCIED pEd, u
     uint32_t TdAddr = pEd->HeadP & ED_PTR_MASK;
     if (ohciIsTdInFlight(pThis, TdAddr))
         return false;
-#if defined(VBOX_STRICT) || defined(LOG_ENABLED)
+# if defined(VBOX_STRICT) || defined(LOG_ENABLED)
     ohci_in_done_queue_check(pThis, TdAddr);
-#endif
+# endif
     return ohciServiceTd(pThis, enmType, pEd, EdAddr, TdAddr, &TdAddr, pszListName);
 }
 
@@ -2941,6 +2966,8 @@ static bool ohciServiceHeadTd(POHCI pThis, VUSBXFERTYPE enmType, PCOHCIED pEd, u
 static bool ohciServiceTdMultiple(POHCI pThis, VUSBXFERTYPE enmType, PCOHCIED pEd, uint32_t EdAddr,
                                   uint32_t TdAddr, uint32_t *pNextTdAddr, const char *pszListName)
 {
+    RT_NOREF(pszListName);
+
     /*
      * Read the TDs involved in this URB.
      */
@@ -2956,16 +2983,16 @@ static bool ohciServiceTdMultiple(POHCI pThis, VUSBXFERTYPE enmType, PCOHCIED pE
         struct OHCITDENTRY *pNext;
     }   Head;
 
-#ifdef VBOX_WITH_OHCI_PHYS_READ_CACHE
+# ifdef VBOX_WITH_OHCI_PHYS_READ_CACHE
     ohciPhysReadCacheClear(pThis->pCacheTD);
-#endif
+# endif
 
     /* read the head */
-#ifdef VBOX_WITH_OHCI_PHYS_READ_CACHE
+# ifdef VBOX_WITH_OHCI_PHYS_READ_CACHE
     ohciReadTdCached(pThis, TdAddr, &Head.Td);
-#else
+# else
     ohciReadTd(pThis, TdAddr, &Head.Td);
-#endif
+# endif
     ohciBufInit(&Head.Buf, Head.Td.cbp, Head.Td.be);
     Head.TdAddr = TdAddr;
     Head.pNext = NULL;
@@ -2983,11 +3010,11 @@ static bool ohciServiceTdMultiple(POHCI pThis, VUSBXFERTYPE enmType, PCOHCIED pE
 
         pCur->pNext = NULL;
         pCur->TdAddr = pTail->Td.NextTD & ED_PTR_MASK;
-#ifdef VBOX_WITH_OHCI_PHYS_READ_CACHE
+# ifdef VBOX_WITH_OHCI_PHYS_READ_CACHE
         ohciReadTdCached(pThis, pCur->TdAddr, &pCur->Td);
-#else
+# else
         ohciReadTd(pThis, pCur->TdAddr, &pCur->Td);
-#endif
+# endif
         ohciBufInit(&pCur->Buf, pCur->Td.cbp, pCur->Td.be);
 
         /* Don't combine if the direction doesn't match up. There can't actually be
@@ -3022,7 +3049,7 @@ static bool ohciServiceTdMultiple(POHCI pThis, VUSBXFERTYPE enmType, PCOHCIED pE
                 case TD_HWINFO_IN:  enmDir = VUSBDIRECTION_IN; break;
                 default:
                     Log(("ohciServiceTdMultiple: Invalid direction!!!! Head.Td.hwinfo=%#x Ed.hwdinfo=%#x\n", Head.Td.hwinfo, pEd->hwinfo));
-                    /* TODO: Do the correct thing here */
+                    /** @todo Do the correct thing here */
                     return false;
             }
             break;
@@ -3104,9 +3131,9 @@ static bool ohciServiceHeadTdMultiple(POHCI pThis, VUSBXFERTYPE enmType, PCOHCIE
     uint32_t TdAddr = pEd->HeadP & ED_PTR_MASK;
     if (ohciIsTdInFlight(pThis, TdAddr))
         return false;
-#if defined(VBOX_STRICT) || defined(LOG_ENABLED)
+# if defined(VBOX_STRICT) || defined(LOG_ENABLED)
     ohci_in_done_queue_check(pThis, TdAddr);
-#endif
+# endif
     return ohciServiceTdMultiple(pThis, enmType, pEd, EdAddr, TdAddr, &TdAddr, pszListName);
 }
 
@@ -3257,9 +3284,9 @@ static bool ohciServiceIsochronousTd(POHCI pThis, POHCIITD pITd, uint32_t ITdAdd
     pUrb->paTds[0].TdAddr = ITdAddr;
     AssertCompile(sizeof(pUrb->paTds[0].TdCopy) >= sizeof(*pITd));
     memcpy(pUrb->paTds[0].TdCopy, pITd, sizeof(*pITd));
-#if 0 /* color the data */
+# if 0 /* color the data */
     memset(pUrb->abData, 0xfe, cbTotal);
-#endif
+# endif
 
     /* copy the data */
     if (    cbTotal
@@ -3382,7 +3409,7 @@ static void ohciServiceIsochronousEndpoint(POHCI pThis, POHCIED pEd, uint32_t Ed
         }
         else
         {
-#if 1
+# if 1
             /*
              * Ok, the launch window for this TD has passed.
              * If it's not in flight it should be retired with a DataOverrun status (TD).
@@ -3405,7 +3432,7 @@ static void ohciServiceIsochronousEndpoint(POHCI pThis, POHCIED pEd, uint32_t Ed
                 Log(("ohciServiceIsochronousEndpoint: Failed unlinking old ITD.\n"));
                 break;
             }
-#else /* BAD IDEA: */
+# else /* BAD IDEA: */
             /*
              * Ok, the launch window for this TD has passed.
              * If it's not in flight it should be retired with a DataOverrun status (TD).
@@ -3422,7 +3449,7 @@ static void ohciServiceIsochronousEndpoint(POHCI pThis, POHCIED pEd, uint32_t Ed
                 Log(("ohciServiceIsochronousEndpoint: Failed unlinking old ITD.\n"));
                 break;
             }
-#endif
+# endif
         }
 
         /* advance to the next ITD */
@@ -3467,12 +3494,12 @@ DECLINLINE(bool) ohciIsEdPresent(PCOHCIED pEd)
  */
 static void ohciServiceBulkList(POHCI pThis)
 {
-#ifdef LOG_ENABLED
+# ifdef LOG_ENABLED
     if (g_fLogBulkEPs)
         ohciDumpEdList(pThis, pThis->bulk_head, "Bulk before", true);
     if (pThis->bulk_cur)
         Log(("ohciServiceBulkList: bulk_cur=%#010x before listprocessing!!! HCD have positioned us!!!\n", pThis->bulk_cur));
-#endif
+# endif
 
     /*
      * ", HC will start processing the Bulk list and will set BF [BulkListFilled] to 0"
@@ -3487,18 +3514,18 @@ static void ohciServiceBulkList(POHCI pThis)
     while (EdAddr)
     {
         OHCIED Ed;
-#ifdef VBOX_WITH_OHCI_PHYS_READ_CACHE
+# ifdef VBOX_WITH_OHCI_PHYS_READ_CACHE
         ohciReadEdCached(pThis, EdAddr, &Ed);
-#else
+# else
         ohciReadEd(pThis, EdAddr, &Ed);
-#endif
+# endif
         Assert(!(Ed.hwinfo & ED_HWINFO_ISO)); /* the guest is screwing us */
         if (ohciIsEdReady(&Ed))
         {
             pThis->status |= OHCI_STATUS_BLF;
             pThis->fBulkNeedsCleaning = true;
 
-#if 1
+# if 1
             /*
 
              * After we figured out that all the TDs submitted for dealing with MSD
@@ -3508,7 +3535,7 @@ static void ohciServiceBulkList(POHCI pThis)
              * on a bulk endpoint.
              */
             ohciServiceHeadTdMultiple(pThis, VUSBXFERTYPE_BULK, &Ed, EdAddr, "Bulk");
-#else
+# else
             /*
              * This alternative code was used before we started reassembling URBs from
              * multiple TDs. We keep it handy for debugging.
@@ -3533,7 +3560,7 @@ static void ohciServiceBulkList(POHCI pThis)
                     ohciReadEd(pThis, EdAddr, &Ed); /* It might have been updated on URB completion. */
                 } while (ohciIsEdReady(&Ed));
             }
-#endif
+# endif
         }
         else
         {
@@ -3555,10 +3582,10 @@ static void ohciServiceBulkList(POHCI pThis)
 
     }
 
-#ifdef LOG_ENABLED
+# ifdef LOG_ENABLED
     if (g_fLogBulkEPs)
         ohciDumpEdList(pThis, pThis->bulk_head, "Bulk after ", true);
-#endif
+# endif
 }
 
 /**
@@ -3571,12 +3598,12 @@ static void ohciServiceBulkList(POHCI pThis)
  */
 static void ohciUndoBulkList(POHCI pThis)
 {
-#ifdef LOG_ENABLED
+# ifdef LOG_ENABLED
     if (g_fLogBulkEPs)
         ohciDumpEdList(pThis, pThis->bulk_head, "Bulk before", true);
     if (pThis->bulk_cur)
         Log(("ohciUndoBulkList: bulk_cur=%#010x before list processing!!! HCD has positioned us!!!\n", pThis->bulk_cur));
-#endif
+# endif
 
     /* This flag follows OHCI_STATUS_BLF, but BLF doesn't change when list processing is disabled. */
     pThis->fBulkNeedsCleaning = false;
@@ -3585,11 +3612,11 @@ static void ohciUndoBulkList(POHCI pThis)
     while (EdAddr)
     {
         OHCIED Ed;
-#ifdef VBOX_WITH_OHCI_PHYS_READ_CACHE
+# ifdef VBOX_WITH_OHCI_PHYS_READ_CACHE
         ohciReadEdCached(pThis, EdAddr, &Ed);
-#else
+# else
         ohciReadEd(pThis, EdAddr, &Ed);
-#endif
+# endif
         Assert(!(Ed.hwinfo & ED_HWINFO_ISO)); /* the guest is screwing us */
         if (ohciIsEdPresent(&Ed))
         {
@@ -3616,12 +3643,12 @@ static void ohciUndoBulkList(POHCI pThis)
  */
 static void ohciServiceCtrlList(POHCI pThis)
 {
-#ifdef LOG_ENABLED
+# ifdef LOG_ENABLED
     if (g_fLogControlEPs)
         ohciDumpEdList(pThis, pThis->ctrl_head, "Ctrl before", true);
     if (pThis->ctrl_cur)
         Log(("ohciServiceCtrlList: ctrl_cur=%010x before list processing!!! HCD have positioned us!!!\n", pThis->ctrl_cur));
-#endif
+# endif
 
     /*
      * ", HC will start processing the list and will set ControlListFilled to 0"
@@ -3639,7 +3666,7 @@ static void ohciServiceCtrlList(POHCI pThis)
         Assert(!(Ed.hwinfo & ED_HWINFO_ISO)); /* the guest is screwing us */
         if (ohciIsEdReady(&Ed))
         {
-#if 1
+# if 1
             /*
              * Control TDs depends on order and stage. Only one can be in-flight
              * at any given time. OTOH, some stages are completed immediately,
@@ -3656,21 +3683,21 @@ static void ohciServiceCtrlList(POHCI pThis)
                 }
                 ohciReadEd(pThis, EdAddr, &Ed); /* It might have been updated on URB completion. */
             } while (ohciIsEdReady(&Ed));
-#else
+# else
             /* Simplistic, for debugging. */
             ohciServiceHeadTd(pThis, VUSBXFERTYPE_CTRL, &Ed, EdAddr, "Control");
             pThis->status |= OHCI_STATUS_CLF;
-#endif
+# endif
         }
 
         /* next end point */
         EdAddr = Ed.NextED & ED_PTR_MASK;
     }
 
-#ifdef LOG_ENABLED
+# ifdef LOG_ENABLED
     if (g_fLogControlEPs)
         ohciDumpEdList(pThis, pThis->ctrl_head, "Ctrl after ", true);
-#endif
+# endif
 }
 
 
@@ -3690,7 +3717,7 @@ static void ohciServicePeriodicList(POHCI pThis)
     uint32_t        EdAddr;
     ohciGetDWords(pThis, pThis->hcca + iList * sizeof(EdAddr), &EdAddr, 1);
 
-#ifdef LOG_ENABLED
+# ifdef LOG_ENABLED
     const uint32_t EdAddrHead = EdAddr;
     if (g_fLogInterruptEPs)
     {
@@ -3698,7 +3725,7 @@ static void ohciServicePeriodicList(POHCI pThis)
         RTStrPrintf(sz, sizeof(sz), "Int%02x before", iList);
         ohciDumpEdList(pThis, EdAddrHead, sz, true);
     }
-#endif
+# endif
 
     /*
      * Iterate the endpoint list.
@@ -3706,11 +3733,11 @@ static void ohciServicePeriodicList(POHCI pThis)
     while (EdAddr)
     {
         OHCIED Ed;
-#ifdef VBOX_WITH_OHCI_PHYS_READ_CACHE
+# ifdef VBOX_WITH_OHCI_PHYS_READ_CACHE
         ohciReadEdCached(pThis, EdAddr, &Ed);
-#else
+# else
         ohciReadEd(pThis, EdAddr, &Ed);
-#endif
+# endif
 
         if (ohciIsEdReady(&Ed))
         {
@@ -3754,14 +3781,14 @@ static void ohciServicePeriodicList(POHCI pThis)
         EdAddr = Ed.NextED & ED_PTR_MASK;
     }
 
-#ifdef LOG_ENABLED
+# ifdef LOG_ENABLED
     if (g_fLogInterruptEPs)
     {
         char sz[48];
         RTStrPrintf(sz, sizeof(sz), "Int%02x after ", iList);
         ohciDumpEdList(pThis, EdAddrHead, sz, true);
     }
-#endif
+# endif
 }
 
 
@@ -3794,13 +3821,13 @@ static void ohciUpdateHCCA(POHCI pThis)
 
         Log(("ohci: Writeback Done (%#010x) on frame %#x (age %#x)\n", hcca.done,
              pThis->HcFmNumber, pThis->HcFmNumber - pThis->u32FmDoneQueueTail));
-#ifdef LOG_ENABLED
+# ifdef LOG_ENABLED
         ohciDumpTdQueue(pThis, hcca.done & ED_PTR_MASK, "DoneQueue");
-#endif
+# endif
         Assert(RT_OFFSETOF(struct ohci_hcca, done) == 4);
-#if defined(VBOX_STRICT) || defined(LOG_ENABLED)
+# if defined(VBOX_STRICT) || defined(LOG_ENABLED)
         ohci_in_done_queue_zap(pThis);
-#endif
+# endif
         fWriteDoneHeadInterrupt = true;
     }
 
@@ -3842,11 +3869,11 @@ static void ohciCancelOrphanedURBs(POHCI pThis)
     }
     Assert(cLeft == 0);
 
-#ifdef VBOX_WITH_OHCI_PHYS_READ_CACHE
+# ifdef VBOX_WITH_OHCI_PHYS_READ_CACHE
     /* Get hcca data to minimize calls to ohciGetDWords/PDMDevHlpPhysRead. */
     uint32_t au32HCCA[OHCI_HCCA_NUM_INTR];
     ohciGetDWords(pThis, pThis->hcca, au32HCCA, OHCI_HCCA_NUM_INTR);
-#endif
+# endif
 
     /* Go over all bulk/control/interrupt endpoint lists; any URB found in these lists
      * is marked as active again.
@@ -3862,38 +3889,38 @@ static void ohciCancelOrphanedURBs(POHCI pThis)
             EdAddr = pThis->ctrl_head;
             break;
         default:
-#ifdef VBOX_WITH_OHCI_PHYS_READ_CACHE
+# ifdef VBOX_WITH_OHCI_PHYS_READ_CACHE
             EdAddr = au32HCCA[i];
-#else
+# else
             ohciGetDWords(pThis, pThis->hcca + i * sizeof(EdAddr), &EdAddr, 1);
-#endif
+# endif
             break;
         }
         while (EdAddr)
         {
             OHCIED Ed;
             OHCITD Td;
-#ifdef VBOX_WITH_OHCI_PHYS_READ_CACHE
+# ifdef VBOX_WITH_OHCI_PHYS_READ_CACHE
             ohciReadEdCached(pThis, EdAddr, &Ed);
-#else
+# else
             ohciReadEd(pThis, EdAddr, &Ed);
-#endif
+# endif
             uint32_t TdAddr = Ed.HeadP & ED_PTR_MASK;
             uint32_t TailP  = Ed.TailP & ED_PTR_MASK;
             unsigned k = 0;
             if (  !(Ed.hwinfo & ED_HWINFO_SKIP)
                 && (TdAddr != TailP))
             {
-#ifdef VBOX_WITH_OHCI_PHYS_READ_CACHE
+# ifdef VBOX_WITH_OHCI_PHYS_READ_CACHE
                 ohciPhysReadCacheClear(pThis->pCacheTD);
-#endif
+# endif
                 do
                 {
-#ifdef VBOX_WITH_OHCI_PHYS_READ_CACHE
+# ifdef VBOX_WITH_OHCI_PHYS_READ_CACHE
                     ohciReadTdCached(pThis, TdAddr, &Td);
-#else
+# else
                     ohciReadTd(pThis, TdAddr, &Td);
-#endif
+# endif
                     j = ohci_in_flight_find(pThis, TdAddr);
                     if (j > -1)
                         pThis->aInFlight[j].fInactive = false;
@@ -3939,9 +3966,9 @@ static void ohciCancelOrphanedURBs(POHCI pThis)
  */
 static void ohciStartOfFrame(POHCI pThis)
 {
-#ifdef LOG_ENABLED
+# ifdef LOG_ENABLED
     const uint32_t status_old = pThis->status;
-#endif
+# endif
 
     /*
      * Update HcFmRemaining.FRT and update start of frame time.
@@ -3956,14 +3983,14 @@ static void ohciStartOfFrame(POHCI pThis)
     bool fValidHCCA = !(    pThis->hcca >= OHCI_HCCA_MASK
                         ||  pThis->hcca < ~OHCI_HCCA_MASK);
 
-#if 1
+# if 1
     /*
      * Update the HCCA.
      * Should be done after SOF but before HC read first ED in this frame.
      */
     if (fValidHCCA)
         ohciUpdateHCCA(pThis);
-#endif
+# endif
 
     /* "After writing to HCCA, HC will set SF in HcInterruptStatus" - guest isn't executing, so ignore the order! */
     ohciR3SetInterrupt(pThis, OHCI_INTR_START_OF_FRAME);
@@ -4005,7 +4032,7 @@ static void ohciStartOfFrame(POHCI pThis)
         &&    pThis->fBulkNeedsCleaning)
         ohciUndoBulkList(pThis);    /* If list disabled but not empty, abort endpoints. */
 
-#if 0
+# if 0
     /*
      * Update the HCCA after processing the lists and everything. A bit experimental.
      *
@@ -4020,9 +4047,9 @@ static void ohciStartOfFrame(POHCI pThis)
      * as it was submitted.
      */
     ohciUpdateHCCA(pThis);
-#endif
+# endif
 
-#ifdef LOG_ENABLED
+# ifdef LOG_ENABLED
     if (pThis->status ^ status_old)
     {
         uint32_t val = pThis->status;
@@ -4035,7 +4062,7 @@ static void ohciStartOfFrame(POHCI pThis)
               chg & RT_BIT(3) ? "*" : "", (val >> 3) & 1,
               chg & (3<<16)? "*" : "", (val >> 16) & 3));
     }
-#endif
+# endif
 }
 
 /**
@@ -4053,6 +4080,7 @@ static void bump_frame_number(POHCI pThis)
  */
 static DECLCALLBACK(bool) ohciR3StartFrame(PVUSBIROOTHUBPORT pInterface, uint32_t u32FrameNo)
 {
+    RT_NOREF(u32FrameNo);
     POHCI pThis = VUSBIROOTHUBPORT_2_OHCI(pInterface);
 
     RTCritSectEnter(&pThis->CritSect);
@@ -4060,14 +4088,14 @@ static DECLCALLBACK(bool) ohciR3StartFrame(PVUSBIROOTHUBPORT pInterface, uint32_
     /* Reset idle detection flag */
     pThis->fIdle = true;
 
-#ifdef VBOX_WITH_OHCI_PHYS_READ_STATS
-    physReadStatsReset(&physReadStats);
-#endif
+# ifdef VBOX_WITH_OHCI_PHYS_READ_STATS
+    physReadStatsReset(&g_PhysReadState);
+# endif
 
-#ifdef VBOX_WITH_OHCI_PHYS_READ_CACHE
+# ifdef VBOX_WITH_OHCI_PHYS_READ_CACHE
     ohciPhysReadCacheClear(pThis->pCacheED);
     ohciPhysReadCacheClear(pThis->pCacheTD);
-#endif
+# endif
 
     /* Frame boundary, so do EOF stuff here. */
     bump_frame_number(pThis);
@@ -4080,9 +4108,9 @@ static DECLCALLBACK(bool) ohciR3StartFrame(PVUSBIROOTHUBPORT pInterface, uint32_
     /* Start the next frame. */
     ohciStartOfFrame(pThis);
 
-#ifdef VBOX_WITH_OHCI_PHYS_READ_STATS
-    physReadStatsPrint(&physReadStats);
-#endif
+# ifdef VBOX_WITH_OHCI_PHYS_READ_STATS
+    physReadStatsPrint(&g_PhysReadState);
+# endif
 
     RTCritSectLeave(&pThis->CritSect);
 
@@ -4090,7 +4118,7 @@ static DECLCALLBACK(bool) ohciR3StartFrame(PVUSBIROOTHUBPORT pInterface, uint32_
 }
 
 /**
- * @copydoc VUSBIROOTHUBPORT::pfnFramerateChanged.
+ * @interface_method_impl{VUSBIROOTHUBPORT,pfnFramerateChanged}.
  */
 static DECLCALLBACK(void) ohciR3FrameRateChanged(PVUSBIROOTHUBPORT pInterface, uint32_t u32FrameRate)
 {
@@ -4109,6 +4137,7 @@ static DECLCALLBACK(void) ohciR3FrameRateChanged(PVUSBIROOTHUBPORT pInterface, u
  */
 static DECLCALLBACK(void) ohciFrameBoundaryTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
 {
+    RT_NOREF(pDevIns, pTimer, pvUser);
 }
 
 /**
@@ -4189,6 +4218,7 @@ static void rhport_power(POHCIROOTHUB pRh, unsigned iPort, bool fPowerUp)
  */
 static int HcRevision_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value)
 {
+    RT_NOREF2(pThis, iReg);
     Log2(("HcRevision_r() -> 0x10\n"));
     *pu32Value = 0x10; /* OHCI revision 1.0, no emulation. */
     return VINF_SUCCESS;
@@ -4199,6 +4229,7 @@ static int HcRevision_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value)
  */
 static int HcRevision_w(POHCI pThis, uint32_t iReg, uint32_t u32Value)
 {
+    RT_NOREF3(pThis, iReg, u32Value);
     Log2(("HcRevision_w(%#010x) - denied\n", u32Value));
     AssertMsgFailed(("Invalid operation!!! u32Value=%#010x\n", u32Value));
     return VINF_SUCCESS;
@@ -4209,6 +4240,7 @@ static int HcRevision_w(POHCI pThis, uint32_t iReg, uint32_t u32Value)
  */
 static int HcControl_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value)
 {
+    RT_NOREF1(iReg);
     uint32_t ctl = pThis->ctl;
     Log2(("HcControl_r -> %#010x - CBSR=%d PLE=%d IE=%d CLE=%d BLE=%d HCFS=%#x IR=%d RWC=%d RWE=%d\n",
           ctl, ctl & 3, (ctl >> 2) & 1, (ctl >> 3) & 1, (ctl >> 4) & 1, (ctl >> 5) & 1, (ctl >> 6) & 3, (ctl >> 8) & 1,
@@ -4222,6 +4254,8 @@ static int HcControl_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value)
  */
 static int HcControl_w(POHCI pThis, uint32_t iReg, uint32_t val)
 {
+    RT_NOREF1(iReg);
+
     /* log it. */
     uint32_t chg = pThis->ctl ^ val; NOREF(chg);
     Log2(("HcControl_w(%#010x) => %sCBSR=%d %sPLE=%d %sIE=%d %sCLE=%d %sBLE=%d %sHCFS=%#x %sIR=%d %sRWC=%d %sRWE=%d\n",
@@ -4293,6 +4327,7 @@ static int HcCommandStatus_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value)
     Log2(("HcCommandStatus_r() -> %#010x - HCR=%d CLF=%d BLF=%d OCR=%d SOC=%d\n",
           status, status & 1, (status >> 1) & 1, (status >> 2) & 1, (status >> 3) & 1, (status >> 16) & 3));
     *pu32Value = status;
+    RT_NOREF1(iReg);
     return VINF_SUCCESS;
 }
 
@@ -4301,6 +4336,8 @@ static int HcCommandStatus_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value)
  */
 static int HcCommandStatus_w(POHCI pThis, uint32_t iReg, uint32_t val)
 {
+    RT_NOREF1(iReg);
+
     /* log */
     uint32_t chg = pThis->status ^ val; NOREF(chg);
     Log2(("HcCommandStatus_w(%#010x) => %sHCR=%d %sCLF=%d %sBLF=%d %sOCR=%d %sSOC=%d\n",
@@ -4345,6 +4382,7 @@ static int HcInterruptStatus_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value)
           val, val & 1, (val >> 1) & 1, (val >> 2) & 1, (val >> 3) & 1, (val >> 4) & 1, (val >> 5) & 1,
           (val >> 6) & 1, (val >> 30) & 1));
     *pu32Value = val;
+    RT_NOREF1(iReg);
     return VINF_SUCCESS;
 }
 
@@ -4353,6 +4391,8 @@ static int HcInterruptStatus_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value)
  */
 static int HcInterruptStatus_w(POHCI pThis, uint32_t iReg, uint32_t val)
 {
+    RT_NOREF1(iReg);
+
     uint32_t res = pThis->intr_status & ~val;
     uint32_t chg = pThis->intr_status ^ res; NOREF(chg);
 
@@ -4393,6 +4433,7 @@ static int HcInterruptEnable_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value)
           val, val & 1, (val >> 1) & 1, (val >> 2) & 1, (val >> 3) & 1, (val >> 4) & 1, (val >> 5) & 1,
           (val >> 6) & 1, (val >> 30) & 1, (val >> 31) & 1));
     *pu32Value = val;
+    RT_NOREF1(iReg);
     return VINF_SUCCESS;
 }
 
@@ -4401,6 +4442,7 @@ static int HcInterruptEnable_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value)
  */
 static int HcInterruptEnable_w(POHCI pThis, uint32_t iReg, uint32_t val)
 {
+    RT_NOREF1(iReg);
     uint32_t res = pThis->intr | val;
     uint32_t chg = pThis->intr ^ res; NOREF(chg);
 
@@ -4443,6 +4485,7 @@ static int HcInterruptDisable_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value
           (val >> 6) & 1, (val >> 30) & 1, (val >> 31) & 1));
 
     *pu32Value = val;
+    RT_NOREF1(iReg);
     return VINF_SUCCESS;
 }
 
@@ -4451,6 +4494,7 @@ static int HcInterruptDisable_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value
  */
 static int HcInterruptDisable_w(POHCI pThis, uint32_t iReg, uint32_t val)
 {
+    RT_NOREF1(iReg);
     uint32_t res = pThis->intr & ~val;
     uint32_t chg = pThis->intr ^ res; NOREF(chg);
 
@@ -4485,6 +4529,7 @@ static int HcHCCA_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value)
 {
     Log2(("HcHCCA_r() -> %#010x\n", pThis->hcca));
     *pu32Value = pThis->hcca;
+    RT_NOREF1(iReg);
     return VINF_SUCCESS;
 }
 
@@ -4495,6 +4540,7 @@ static int HcHCCA_w(POHCI pThis, uint32_t iReg, uint32_t Value)
 {
     Log2(("HcHCCA_w(%#010x) - old=%#010x new=%#010x\n", Value, pThis->hcca, Value & OHCI_HCCA_MASK));
     pThis->hcca = Value & OHCI_HCCA_MASK;
+    RT_NOREF1(iReg);
     return VINF_SUCCESS;
 }
 
@@ -4505,6 +4551,7 @@ static int HcPeriodCurrentED_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value)
 {
     Log2(("HcPeriodCurrentED_r() -> %#010x\n", pThis->per_cur));
     *pu32Value = pThis->per_cur;
+    RT_NOREF1(iReg);
     return VINF_SUCCESS;
 }
 
@@ -4518,6 +4565,7 @@ static int HcPeriodCurrentED_w(POHCI pThis, uint32_t iReg, uint32_t val)
     //AssertMsgFailed(("HCD (Host Controller Driver) should not write to HcPeriodCurrentED! val=%#010x (old=%#010x)\n", val, pThis->per_cur));
     AssertMsg(!(val & 7), ("Invalid alignment, val=%#010x\n", val));
     pThis->per_cur = val & ~7;
+    RT_NOREF1(iReg);
     return VINF_SUCCESS;
 }
 
@@ -4528,6 +4576,7 @@ static int HcControlHeadED_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value)
 {
     Log2(("HcControlHeadED_r() -> %#010x\n", pThis->ctrl_head));
     *pu32Value = pThis->ctrl_head;
+    RT_NOREF1(iReg);
     return VINF_SUCCESS;
 }
 
@@ -4539,6 +4588,7 @@ static int HcControlHeadED_w(POHCI pThis, uint32_t iReg, uint32_t val)
     Log2(("HcControlHeadED_w(%#010x) - old=%#010x new=%#010x\n", val, pThis->ctrl_head, val & ~7));
     AssertMsg(!(val & 7), ("Invalid alignment, val=%#010x\n", val));
     pThis->ctrl_head = val & ~7;
+    RT_NOREF1(iReg);
     return VINF_SUCCESS;
 }
 
@@ -4549,6 +4599,7 @@ static int HcControlCurrentED_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value
 {
     Log2(("HcControlCurrentED_r() -> %#010x\n", pThis->ctrl_cur));
     *pu32Value = pThis->ctrl_cur;
+    RT_NOREF1(iReg);
     return VINF_SUCCESS;
 }
 
@@ -4561,6 +4612,7 @@ static int HcControlCurrentED_w(POHCI pThis, uint32_t iReg, uint32_t val)
     AssertMsg(!(pThis->ctl & OHCI_CTL_CLE), ("Illegal write! HcControl.ControlListEnabled is set! val=%#010x\n", val));
     AssertMsg(!(val & 7), ("Invalid alignment, val=%#010x\n", val));
     pThis->ctrl_cur = val & ~7;
+    RT_NOREF1(iReg);
     return VINF_SUCCESS;
 }
 
@@ -4571,6 +4623,7 @@ static int HcBulkHeadED_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value)
 {
     Log2(("HcBulkHeadED_r() -> %#010x\n", pThis->bulk_head));
     *pu32Value = pThis->bulk_head;
+    RT_NOREF1(iReg);
     return VINF_SUCCESS;
 }
 
@@ -4582,6 +4635,7 @@ static int HcBulkHeadED_w(POHCI pThis, uint32_t iReg, uint32_t val)
     Log2(("HcBulkHeadED_w(%#010x) - old=%#010x new=%#010x\n", val, pThis->bulk_head, val & ~7));
     AssertMsg(!(val & 7), ("Invalid alignment, val=%#010x\n", val));
     pThis->bulk_head = val & ~7; /** @todo The ATI OHCI controller on my machine enforces 16-byte address alignment. */
+    RT_NOREF1(iReg);
     return VINF_SUCCESS;
 }
 
@@ -4592,6 +4646,7 @@ static int HcBulkCurrentED_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value)
 {
     Log2(("HcBulkCurrentED_r() -> %#010x\n", pThis->bulk_cur));
     *pu32Value = pThis->bulk_cur;
+    RT_NOREF1(iReg);
     return VINF_SUCCESS;
 }
 
@@ -4604,6 +4659,7 @@ static int HcBulkCurrentED_w(POHCI pThis, uint32_t iReg, uint32_t val)
     AssertMsg(!(pThis->ctl & OHCI_CTL_BLE), ("Illegal write! HcControl.BulkListEnabled is set! val=%#010x\n", val));
     AssertMsg(!(val & 7), ("Invalid alignment, val=%#010x\n", val));
     pThis->bulk_cur = val & ~7;
+    RT_NOREF1(iReg);
     return VINF_SUCCESS;
 }
 
@@ -4615,6 +4671,7 @@ static int HcDoneHead_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value)
 {
     Log2(("HcDoneHead_r() -> 0x%#08x\n", pThis->done));
     *pu32Value = pThis->done;
+    RT_NOREF1(iReg);
     return VINF_SUCCESS;
 }
 
@@ -4623,6 +4680,7 @@ static int HcDoneHead_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value)
  */
 static int HcDoneHead_w(POHCI pThis, uint32_t iReg, uint32_t val)
 {
+    RT_NOREF3(pThis, iReg, val);
     Log2(("HcDoneHead_w(0x%#08x) - denied!!!\n", val));
     /*AssertMsgFailed(("Illegal operation!!! val=%#010x\n", val)); - OS/2 does this */
     return VINF_SUCCESS;
@@ -4638,6 +4696,7 @@ static int HcFmInterval_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value)
     Log2(("HcFmInterval_r() -> 0x%#08x - FI=%d FSMPS=%d FIT=%d\n",
           val, val & 0x3fff, (val >> 16) & 0x7fff, val >> 31));
     *pu32Value = val;
+    RT_NOREF1(iReg);
     return VINF_SUCCESS;
 }
 
@@ -4646,6 +4705,8 @@ static int HcFmInterval_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value)
  */
 static int HcFmInterval_w(POHCI pThis, uint32_t iReg, uint32_t val)
 {
+    RT_NOREF1(iReg);
+
     /* log */
     uint32_t chg = val ^ ((pThis->fit << 31) | (pThis->fsmps << 16) | pThis->fi); NOREF(chg);
     Log2(("HcFmInterval_w(%#010x) => %sFI=%d %sFSMPS=%d %sFIT=%d\n",
@@ -4671,6 +4732,7 @@ static int HcFmInterval_w(POHCI pThis, uint32_t iReg, uint32_t val)
  */
 static int HcFmRemaining_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value)
 {
+    RT_NOREF1(iReg);
     uint32_t Value = pThis->frt << 31;
     if ((pThis->ctl & OHCI_CTL_HCFS) == OHCI_USB_OPERATIONAL)
     {
@@ -4697,6 +4759,7 @@ static int HcFmRemaining_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value)
  */
 static int HcFmRemaining_w(POHCI pThis, uint32_t iReg, uint32_t val)
 {
+    RT_NOREF3(pThis, iReg, val);
     Log2(("HcFmRemaining_w(%#010x) - denied\n", val));
     AssertMsgFailed(("Invalid operation!!! val=%#010x\n", val));
     return VINF_SUCCESS;
@@ -4707,6 +4770,7 @@ static int HcFmRemaining_w(POHCI pThis, uint32_t iReg, uint32_t val)
  */
 static int HcFmNumber_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value)
 {
+    RT_NOREF1(iReg);
     uint32_t val = (uint16_t)pThis->HcFmNumber;
     Log2(("HcFmNumber_r() -> %#010x - FN=%#x(%d) (32-bit=%#x(%d))\n", val, val, val, pThis->HcFmNumber, pThis->HcFmNumber));
     *pu32Value = val;
@@ -4718,6 +4782,7 @@ static int HcFmNumber_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value)
  */
 static int HcFmNumber_w(POHCI pThis, uint32_t iReg, uint32_t val)
 {
+    RT_NOREF3(pThis, iReg, val);
     Log2(("HcFmNumber_w(%#010x) - denied\n", val));
     AssertMsgFailed(("Invalid operation!!! val=%#010x\n", val));
     return VINF_SUCCESS;
@@ -4729,6 +4794,7 @@ static int HcFmNumber_w(POHCI pThis, uint32_t iReg, uint32_t val)
  */
 static int HcPeriodicStart_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value)
 {
+    RT_NOREF1(iReg);
     Log2(("HcPeriodicStart_r() -> %#010x - PS=%d\n", pThis->pstart, pThis->pstart & 0x3fff));
     *pu32Value = pThis->pstart;
     return VINF_SUCCESS;
@@ -4740,6 +4806,7 @@ static int HcPeriodicStart_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value)
  */
 static int HcPeriodicStart_w(POHCI pThis, uint32_t iReg, uint32_t val)
 {
+    RT_NOREF1(iReg);
     Log2(("HcPeriodicStart_w(%#010x) => PS=%d\n", val, val & 0x3fff));
     if (val & ~0x3fff)
         Log2(("Unknown bits %#x are set!!!\n", val & ~0x3fff));
@@ -4752,6 +4819,7 @@ static int HcPeriodicStart_w(POHCI pThis, uint32_t iReg, uint32_t val)
  */
 static int HcLSThreshold_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value)
 {
+    RT_NOREF2(pThis, iReg);
     Log2(("HcLSThreshold_r() -> %#010x\n", OHCI_LS_THRESH));
     *pu32Value = OHCI_LS_THRESH;
     return VINF_SUCCESS;
@@ -4771,6 +4839,7 @@ static int HcLSThreshold_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value)
  */
 static int HcLSThreshold_w(POHCI pThis, uint32_t iReg, uint32_t val)
 {
+    RT_NOREF3(pThis, iReg, val);
     Log2(("HcLSThreshold_w(%#010x) => LST=0x%03x(%d)\n", val, val & 0x0fff, val & 0x0fff));
     AssertMsg(val == OHCI_LS_THRESH,
               ("HCD tried to write bad LS threshold: 0x%x (see function header)\n", val));
@@ -4783,6 +4852,7 @@ static int HcLSThreshold_w(POHCI pThis, uint32_t iReg, uint32_t val)
  */
 static int HcRhDescriptorA_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value)
 {
+    RT_NOREF1(iReg);
     uint32_t val = pThis->RootHub.desc_a;
 #if 0 /* annoying */
     Log2(("HcRhDescriptorA_r() -> %#010x - NDP=%d PSM=%d NPS=%d DT=%d OCPM=%d NOCP=%d POTGT=%#x\n",
@@ -4798,6 +4868,7 @@ static int HcRhDescriptorA_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value)
  */
 static int HcRhDescriptorA_w(POHCI pThis, uint32_t iReg, uint32_t val)
 {
+    RT_NOREF1(iReg);
     uint32_t chg = val ^ pThis->RootHub.desc_a; NOREF(chg);
     Log2(("HcRhDescriptorA_w(%#010x) => %sNDP=%d %sPSM=%d %sNPS=%d %sDT=%d %sOCPM=%d %sNOCP=%d %sPOTGT=%#x - %sPowerSwitching Set%sPower\n",
           val,
@@ -4835,6 +4906,7 @@ static int HcRhDescriptorB_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value)
     Log2(("HcRhDescriptorB_r() -> %#010x - DR=0x%04x PPCM=0x%04x\n",
           val, val & 0xffff, val >> 16));
     *pu32Value = val;
+    RT_NOREF1(iReg);
     return VINF_SUCCESS;
 }
 
@@ -4843,6 +4915,7 @@ static int HcRhDescriptorB_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value)
  */
 static int HcRhDescriptorB_w(POHCI pThis, uint32_t iReg, uint32_t val)
 {
+    RT_NOREF1(iReg);
     uint32_t chg = pThis->RootHub.desc_b ^ val; NOREF(chg);
     Log2(("HcRhDescriptorB_w(%#010x) => %sDR=0x%04x %sPPCM=0x%04x\n",
           val,
@@ -4867,6 +4940,7 @@ static int HcRhStatus_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value)
         Log2(("HcRhStatus_r() -> %#010x - LPS=%d OCI=%d DRWE=%d LPSC=%d OCIC=%d CRWE=%d\n",
               val, val & 1, (val >> 1) & 1, (val >> 15) & 1, (val >> 16) & 1, (val >> 17) & 1, (val >> 31) & 1));
     *pu32Value = val;
+    RT_NOREF1(iReg);
     return VINF_SUCCESS;
 }
 
@@ -4924,8 +4998,10 @@ static int HcRhStatus_w(POHCI pThis, uint32_t iReg, uint32_t val)
           (chg >> 16) & 1 ? "*" : "", (val >> 16) & 1,
           (chg >> 17) & 1 ? "*" : "", (val >> 17) & 1,
           (chg >> 31) & 1 ? "*" : "", (val >> 31) & 1));
+    RT_NOREF1(iReg);
     return VINF_SUCCESS;
 #else  /* !IN_RING3 */
+    RT_NOREF3(pThis, iReg, val);
     return VINF_IOM_R3_MMIO_WRITE;
 #endif /* !IN_RING3 */
 }
@@ -5061,7 +5137,7 @@ static int HcRhPortStatus_w(POHCI pThis, uint32_t iReg, uint32_t val)
     POHCIHUBPORT    p = &pThis->RootHub.aPorts[i];
     uint32_t        old_state = p->fReg;
 
-#ifdef LOG_ENABLED
+# ifdef LOG_ENABLED
     /*
      * Log it.
      */
@@ -5081,7 +5157,7 @@ static int HcRhPortStatus_w(POHCI pThis, uint32_t iReg, uint32_t val)
         if (val & (1 << j))
             Log2((" %s", apszCmdNames[j]));
     Log2(("\n"));
-#endif
+# endif
 
     /* Write to clear any of the change bits: CSC, PESC, PSSC, OCIC and PRSC */
     if (val & OHCI_PORT_W_CLEAR_CHANGE_MASK)
@@ -5157,6 +5233,7 @@ static int HcRhPortStatus_w(POHCI pThis, uint32_t iReg, uint32_t val)
     }
     return VINF_SUCCESS;
 #else /* !IN_RING3 */
+    RT_NOREF3(pThis, iReg, val);
     return VINF_IOM_R3_MMIO_WRITE;
 #endif /* !IN_RING3 */
 }
@@ -5222,6 +5299,7 @@ AssertCompile(RT_ELEMENTS(g_aOpRegs) <= 36);
 PDMBOTHCBDECL(int) ohciMmioRead(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void *pv, unsigned cb)
 {
     POHCI pThis = PDMINS_2_DATA(pDevIns, POHCI);
+    RT_NOREF1(pvUser);
 
     /* Paranoia: Assert that IOMMMIO_FLAGS_READ_DWORD works. */
     AssertReturn(cb == sizeof(uint32_t), VERR_INTERNAL_ERROR_3);
@@ -5252,6 +5330,7 @@ PDMBOTHCBDECL(int) ohciMmioRead(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhy
 PDMBOTHCBDECL(int) ohciMmioWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void const *pv, unsigned cb)
 {
     POHCI pThis = PDMINS_2_DATA(pDevIns, POHCI);
+    RT_NOREF1(pvUser);
 
     /* Paranoia: Assert that IOMMMIO_FLAGS_WRITE_DWORD_ZEROED works. */
     AssertReturn(cb == sizeof(uint32_t), VERR_INTERNAL_ERROR_3);
@@ -5282,6 +5361,7 @@ PDMBOTHCBDECL(int) ohciMmioWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPh
  */
 static DECLCALLBACK(int) ohciR3Map(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, uint32_t cb, PCIADDRESSSPACE enmType)
 {
+    RT_NOREF(iRegion, enmType);
     POHCI pThis = (POHCI)pPciDev;
     int rc = PDMDevHlpMMIORegister(pThis->CTX_SUFF(pDevIns), GCPhysAddress, cb, NULL /*pvUser*/,
                                    IOMMMIO_FLAGS_READ_DWORD | IOMMMIO_FLAGS_WRITE_DWORD_ZEROED
@@ -5318,6 +5398,7 @@ static DECLCALLBACK(int) ohciR3Map(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCP
  */
 static DECLCALLBACK(int) ohciR3SavePrep(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
 {
+    RT_NOREF(pSSM);
     POHCI pThis = PDMINS_2_DATA(pDevIns, POHCI);
     POHCIROOTHUB pRh = &pThis->RootHub;
     LogFlow(("ohciR3SavePrep: \n"));
@@ -5349,7 +5430,7 @@ static DECLCALLBACK(int) ohciR3SavePrep(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
      * If the bus was started set the timer. This is ugly but avoids changing the
      * saved state version for now so we can backport the changes to other branches.
      */
-    /** @todo: Do it properly for 4.4 by changing the saved state. */
+    /** @todo Do it properly for 4.4 by changing the saved state. */
     if (VUSBIRhGetPeriodicFrameRate(pRh->pIRhConn) != 0)
     {
         /* Calculate a new timer expiration so this saved state works with older releases. */
@@ -5403,17 +5484,16 @@ static DECLCALLBACK(int) ohciR3SaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
  */
 static DECLCALLBACK(int) ohciR3SaveDone(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
 {
+    RT_NOREF(pSSM);
     POHCI pThis = PDMINS_2_DATA(pDevIns, POHCI);
-    POHCIROOTHUB pRh = &pThis->RootHub;
-    OHCIROOTHUB Rh;
-    unsigned i;
     LogFlow(("ohciR3SaveDone: \n"));
 
     /*
      * NULL the dev pointers.
      */
-    Rh = *pRh;
-    for (i = 0; i < RT_ELEMENTS(pRh->aPorts); i++)
+    POHCIROOTHUB pRh = &pThis->RootHub;
+    OHCIROOTHUB Rh = *pRh;
+    for (unsigned i = 0; i < RT_ELEMENTS(pRh->aPorts); i++)
     {
         if (   pRh->aPorts[i].pDev
             && !VUSBIDevIsSavedStateSupported(pRh->aPorts[i].pDev))
@@ -5423,7 +5503,7 @@ static DECLCALLBACK(int) ohciR3SaveDone(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
     /*
      * Attach the devices.
      */
-    for (i = 0; i < RT_ELEMENTS(pRh->aPorts); i++)
+    for (unsigned i = 0; i < RT_ELEMENTS(pRh->aPorts); i++)
     {
         PVUSBIDEVICE pDev = Rh.aPorts[i].pDev;
         if (   pDev
@@ -5447,22 +5527,20 @@ static DECLCALLBACK(int) ohciR3SaveDone(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
  */
 static DECLCALLBACK(int) ohciR3LoadPrep(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
 {
-    int rc = VINF_SUCCESS;
+    RT_NOREF(pSSM);
     POHCI pThis = PDMINS_2_DATA(pDevIns, POHCI);
     LogFlow(("ohciR3LoadPrep:\n"));
     if (!pThis->pLoad)
     {
-        POHCIROOTHUB pRh = &pThis->RootHub;
-        OHCILOAD Load;
-        unsigned i;
-
         /*
          * Detach all devices which are present in this session. Save them in the load
          * structure so we can reattach them after restoring the guest.
          */
+        POHCIROOTHUB pRh = &pThis->RootHub;
+        OHCILOAD Load;
         Load.pTimer = NULL;
         Load.cDevs = 0;
-        for (i = 0; i < RT_ELEMENTS(pRh->aPorts); i++)
+        for (unsigned i = 0; i < RT_ELEMENTS(pRh->aPorts); i++)
         {
             PVUSBIDEVICE pDev = pRh->aPorts[i].pDev;
             if (   pDev
@@ -5487,7 +5565,7 @@ static DECLCALLBACK(int) ohciR3LoadPrep(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
     }
     /* else: we ASSUME no device can be attached or detach in the period
      *       between a state load and the pLoad stuff is processed. */
-    return rc;
+    return VINF_SUCCESS;
 }
 
 
@@ -5677,6 +5755,7 @@ static DECLCALLBACK(int) ohciR3LoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uin
  */
 static DECLCALLBACK(int) ohciR3LoadDone(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
 {
+    RT_NOREF(pSSM);
     POHCI pThis = PDMINS_2_DATA(pDevIns, POHCI);
     LogFlow(("ohciR3LoadDone:\n"));
 
@@ -5702,6 +5781,7 @@ static DECLCALLBACK(int) ohciR3LoadDone(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
  */
 static DECLCALLBACK(void) ohciR3LoadReattachDevices(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
 {
+    RT_NOREF(pDevIns);
     POHCI pThis = (POHCI)pvUser;
     POHCILOAD pLoad = pThis->pLoad;
     POHCIROOTHUB pRh = &pThis->RootHub;
@@ -5778,6 +5858,7 @@ static DECLCALLBACK(void) ohciR3Resume(PPDMDEVINS pDevIns)
  */
 static DECLCALLBACK(void) ohciR3InfoRegs(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
 {
+    RT_NOREF(pszArgs);
     POHCI pThis = PDMINS_2_DATA(pDevIns, POHCI);
     uint32_t val, ctl, status;
 
@@ -5834,6 +5915,7 @@ static DECLCALLBACK(void) ohciR3InfoRegs(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp,
  */
 static DECLCALLBACK(void) ohciR3Relocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta)
 {
+    RT_NOREF(offDelta);
     POHCI pThis = PDMINS_2_DATA(pDevIns, POHCI);
     pThis->pDevInsRC = PDMDEVINS_2_RCPTR(pDevIns);
     pThis->pEndOfFrameTimerRC = TMTimerRCPtr(pThis->pEndOfFrameTimerR3);
diff --git a/src/VBox/Devices/USB/DrvVUSBRootHub.cpp b/src/VBox/Devices/USB/DrvVUSBRootHub.cpp
index 83bf109..6ef2812 100644
--- a/src/VBox/Devices/USB/DrvVUSBRootHub.cpp
+++ b/src/VBox/Devices/USB/DrvVUSBRootHub.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2005-2015 Oracle Corporation
+ * Copyright (C) 2005-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -254,7 +254,7 @@ static int vusbHubAttach(PVUSBHUB pHub, PVUSBDEV pDev)
 
 /* -=-=-=-=-=- PDMUSBHUBREG methods -=-=-=-=-=- */
 
-/** @copydoc PDMUSBHUBREG::pfnAttachDevice */
+/** @interface_method_impl{PDMUSBHUBREG,pfnAttachDevice} */
 static DECLCALLBACK(int) vusbPDMHubAttachDevice(PPDMDRVINS pDrvIns, PPDMUSBINS pUsbIns, const char *pszCaptureFilename, uint32_t *piPort)
 {
     PVUSBROOTHUB pThis = PDMINS_2_DATA(pDrvIns, PVUSBROOTHUB);
@@ -271,7 +271,7 @@ static DECLCALLBACK(int) vusbPDMHubAttachDevice(PPDMDRVINS pDrvIns, PPDMUSBINS p
         rc = vusbHubAttach(&pThis->Hub, pDev);
         if (RT_SUCCESS(rc))
         {
-            *piPort = UINT32_MAX; ///@todo implement piPort
+            *piPort = UINT32_MAX; /// @todo implement piPort
             return rc;
         }
 
@@ -283,9 +283,10 @@ static DECLCALLBACK(int) vusbPDMHubAttachDevice(PPDMDRVINS pDrvIns, PPDMUSBINS p
 }
 
 
-/** @copydoc PDMUSBHUBREG::pfnDetachDevice */
+/** @interface_method_impl{PDMUSBHUBREG,pfnDetachDevice} */
 static DECLCALLBACK(int) vusbPDMHubDetachDevice(PPDMDRVINS pDrvIns, PPDMUSBINS pUsbIns, uint32_t iPort)
 {
+    RT_NOREF(pDrvIns, iPort);
     PVUSBDEV pDev = (PVUSBDEV)pUsbIns->pvVUsbDev2;
     Assert(pDev);
 
@@ -391,6 +392,7 @@ static DECLCALLBACK(void) vusbRhFreeUrb(PVUSBURB pUrb)
 static PVUSBURB vusbRhNewUrb(PVUSBROOTHUB pRh, uint8_t DstAddress, PVUSBDEV pDev, VUSBXFERTYPE enmType,
                              VUSBDIRECTION enmDir, uint32_t cbData, uint32_t cTds, const char *pszTag)
 {
+    RT_NOREF(pszTag);
     PVUSBURBPOOL pUrbPool = &pRh->Hub.Dev.UrbPool;
 
     if (!pDev)
@@ -563,6 +565,7 @@ DECLHIDDEN(uint64_t) vusbRhR3ProcessFrame(PVUSBROOTHUB pThis, bool fCallback)
  */
 static DECLCALLBACK(int) vusbRhR3PeriodFrameWorker(PPDMDRVINS pDrvIns, PPDMTHREAD pThread)
 {
+    RT_NOREF(pDrvIns);
     int rc = VINF_SUCCESS;
     PVUSBROOTHUB pThis = (PVUSBROOTHUB)pThread->pvUser;
 
@@ -618,12 +621,13 @@ static DECLCALLBACK(int) vusbRhR3PeriodFrameWorker(PPDMDRVINS pDrvIns, PPDMTHREA
  */
 static DECLCALLBACK(int) vusbRhR3PeriodFrameWorkerWakeup(PPDMDRVINS pDrvIns, PPDMTHREAD pThread)
 {
+    RT_NOREF(pThread);
     PVUSBROOTHUB pThis = PDMINS_2_DATA(pDrvIns, PVUSBROOTHUB);
     return RTSemEventMultiSignal(pThis->hSemEventPeriodFrame);
 }
 
 
-/** @copydoc VUSBIROOTHUBCONNECTOR::pfnSetUrbParams */
+/** @interface_method_impl{VUSBIROOTHUBCONNECTOR,pfnSetUrbParams} */
 static DECLCALLBACK(int) vusbRhSetUrbParams(PVUSBIROOTHUBCONNECTOR pInterface, size_t cbHci, size_t cbHciTd)
 {
     PVUSBROOTHUB pRh = VUSBIROOTHUBCONNECTOR_2_VUSBROOTHUB(pInterface);
@@ -635,7 +639,7 @@ static DECLCALLBACK(int) vusbRhSetUrbParams(PVUSBIROOTHUBCONNECTOR pInterface, s
 }
 
 
-/** @copydoc VUSBIROOTHUBCONNECTOR::pfnNewUrb */
+/** @interface_method_impl{VUSBIROOTHUBCONNECTOR,pfnNewUrb} */
 static DECLCALLBACK(PVUSBURB) vusbRhConnNewUrb(PVUSBIROOTHUBCONNECTOR pInterface, uint8_t DstAddress, PVUSBIDEVICE pDev, VUSBXFERTYPE enmType,
                                                VUSBDIRECTION enmDir, uint32_t cbData, uint32_t cTds, const char *pszTag)
 {
@@ -644,17 +648,16 @@ static DECLCALLBACK(PVUSBURB) vusbRhConnNewUrb(PVUSBIROOTHUBCONNECTOR pInterface
 }
 
 
-/** @copydoc VUSBIROOTHUBCONNECTOR::pfnFreeUrb */
+/** @interface_method_impl{VUSBIROOTHUBCONNECTOR,pfnFreeUrb} */
 static DECLCALLBACK(int) vusbRhConnFreeUrb(PVUSBIROOTHUBCONNECTOR pInterface, PVUSBURB pUrb)
 {
-    PVUSBROOTHUB pRh = VUSBIROOTHUBCONNECTOR_2_VUSBROOTHUB(pInterface);
-
+    RT_NOREF(pInterface);
     pUrb->pVUsb->pfnFree(pUrb);
     return VINF_SUCCESS;
 }
 
 
-/** @copydoc VUSBIROOTHUBCONNECTOR::pfnSubmitUrb */
+/** @interface_method_impl{VUSBIROOTHUBCONNECTOR,pfnSubmitUrb} */
 static DECLCALLBACK(int) vusbRhSubmitUrb(PVUSBIROOTHUBCONNECTOR pInterface, PVUSBURB pUrb, PPDMLED pLed)
 {
     PVUSBROOTHUB pRh = VUSBIROOTHUBCONNECTOR_2_VUSBROOTHUB(pInterface);
@@ -764,10 +767,10 @@ static DECLCALLBACK(int) vusbRhReapAsyncUrbsWorker(PVUSBDEV pDev, RTMSINTERVAL c
     return VINF_SUCCESS;
 }
 
-/** @copydoc VUSBIROOTHUBCONNECTOR::pfnReapAsyncUrbs */
+/** @interface_method_impl{VUSBIROOTHUBCONNECTOR,pfnReapAsyncUrbs} */
 static DECLCALLBACK(void) vusbRhReapAsyncUrbs(PVUSBIROOTHUBCONNECTOR pInterface, PVUSBIDEVICE pDevice, RTMSINTERVAL cMillies)
 {
-    PVUSBROOTHUB pRh = VUSBIROOTHUBCONNECTOR_2_VUSBROOTHUB(pInterface);
+    PVUSBROOTHUB pRh = VUSBIROOTHUBCONNECTOR_2_VUSBROOTHUB(pInterface); NOREF(pRh);
     PVUSBDEV pDev = (PVUSBDEV)pDevice;
 
     if (RTListIsEmpty(&pDev->LstAsyncUrbs))
@@ -780,14 +783,14 @@ static DECLCALLBACK(void) vusbRhReapAsyncUrbs(PVUSBIROOTHUBCONNECTOR pInterface,
 }
 
 
-/** @copydoc VUSBIROOTHUBCONNECTOR::pfnCancelUrbsEp */
+/** @interface_method_impl{VUSBIROOTHUBCONNECTOR,pfnCancelUrbsEp} */
 static DECLCALLBACK(int) vusbRhCancelUrbsEp(PVUSBIROOTHUBCONNECTOR pInterface, PVUSBURB pUrb)
 {
     PVUSBROOTHUB pRh = VUSBIROOTHUBCONNECTOR_2_VUSBROOTHUB(pInterface);
     AssertReturn(pRh, VERR_INVALID_PARAMETER);
     AssertReturn(pUrb, VERR_INVALID_PARAMETER);
 
-    //@todo: This method of URB canceling may not work on non-Linux hosts.
+    /// @todo This method of URB canceling may not work on non-Linux hosts.
     /*
      * Cancel and reap the URB(s) on an endpoint.
      */
@@ -827,7 +830,7 @@ static DECLCALLBACK(int) vusbRhCancelAllUrbsWorker(PVUSBDEV pDev)
     return VINF_SUCCESS;
 }
 
-/** @copydoc VUSBIROOTHUBCONNECTOR::pfnCancelAllUrbs */
+/** @interface_method_impl{VUSBIROOTHUBCONNECTOR,pfnCancelAllUrbs} */
 static DECLCALLBACK(void) vusbRhCancelAllUrbs(PVUSBIROOTHUBCONNECTOR pInterface)
 {
     PVUSBROOTHUB pRh = VUSBIROOTHUBCONNECTOR_2_VUSBROOTHUB(pInterface);
@@ -877,7 +880,7 @@ static DECLCALLBACK(int) vusbRhAbortEpWorker(PVUSBDEV pDev, int EndPt, VUSBDIREC
 }
 
 
-/** @copydoc VUSBIROOTHUBCONNECTOR::pfnAbortEp */
+/** @interface_method_impl{VUSBIROOTHUBCONNECTOR,pfnAbortEp} */
 static DECLCALLBACK(int) vusbRhAbortEp(PVUSBIROOTHUBCONNECTOR pInterface, PVUSBIDEVICE pDevice, int EndPt, VUSBDIRECTION enmDir)
 {
     PVUSBROOTHUB pRh = VUSBIROOTHUBCONNECTOR_2_VUSBROOTHUB(pInterface);
@@ -895,7 +898,7 @@ static DECLCALLBACK(int) vusbRhAbortEp(PVUSBIROOTHUBCONNECTOR pInterface, PVUSBI
 }
 
 
-/** @copydoc VUSBIROOTHUBCONNECTOR::pfnAttachDevice */
+/** @interface_method_impl{VUSBIROOTHUBCONNECTOR,pfnAttachDevice} */
 static DECLCALLBACK(int) vusbRhAttachDevice(PVUSBIROOTHUBCONNECTOR pInterface, PVUSBIDEVICE pDevice)
 {
     PVUSBROOTHUB pRh = VUSBIROOTHUBCONNECTOR_2_VUSBROOTHUB(pInterface);
@@ -903,7 +906,7 @@ static DECLCALLBACK(int) vusbRhAttachDevice(PVUSBIROOTHUBCONNECTOR pInterface, P
 }
 
 
-/** @copydoc VUSBIROOTHUBCONNECTOR::pfnDetachDevice */
+/** @interface_method_impl{VUSBIROOTHUBCONNECTOR,pfnDetachDevice} */
 static DECLCALLBACK(int) vusbRhDetachDevice(PVUSBIROOTHUBCONNECTOR pInterface, PVUSBIDEVICE pDevice)
 {
     PVUSBROOTHUB pRh = VUSBIROOTHUBCONNECTOR_2_VUSBROOTHUB(pInterface);
@@ -913,7 +916,7 @@ static DECLCALLBACK(int) vusbRhDetachDevice(PVUSBIROOTHUBCONNECTOR pInterface, P
 }
 
 
-/** @copydoc VUSBIROOTHUBCONNECTOR::pfnSetFrameProcessing */
+/** @interface_method_impl{VUSBIROOTHUBCONNECTOR,pfnSetFrameProcessing} */
 static DECLCALLBACK(int) vusbRhSetFrameProcessing(PVUSBIROOTHUBCONNECTOR pInterface, uint32_t uFrameRate)
 {
     int rc = VINF_SUCCESS;
@@ -979,7 +982,7 @@ static DECLCALLBACK(int) vusbRhSetFrameProcessing(PVUSBIROOTHUBCONNECTOR pInterf
 }
 
 
-/** @copydoc VUSBIROOTHUBCONNECTOR::pfnGetPeriodicFrameRate */
+/** @interface_method_impl{VUSBIROOTHUBCONNECTOR,pfnGetPeriodicFrameRate} */
 static DECLCALLBACK(uint32_t) vusbRhGetPriodicFrameRate(PVUSBIROOTHUBCONNECTOR pInterface)
 {
     PVUSBROOTHUB pThis = VUSBIROOTHUBCONNECTOR_2_VUSBROOTHUB(pInterface);
@@ -991,10 +994,12 @@ static DECLCALLBACK(uint32_t) vusbRhGetPriodicFrameRate(PVUSBIROOTHUBCONNECTOR p
 
 
 /**
- * @copydoc VUSBIDEVICE::pfnReset
+ * @interface_method_impl{VUSBIDEVICE,pfnReset}
  */
-static DECLCALLBACK(int) vusbRhDevReset(PVUSBIDEVICE pInterface, bool fResetOnLinux, PFNVUSBRESETDONE pfnDone, void *pvUser, PVM pVM)
+static DECLCALLBACK(int) vusbRhDevReset(PVUSBIDEVICE pInterface, bool fResetOnLinux,
+                                        PFNVUSBRESETDONE pfnDone, void *pvUser, PVM pVM)
 {
+    RT_NOREF(pfnDone, pvUser, pVM);
     PVUSBROOTHUB pRh = RT_FROM_MEMBER(pInterface, VUSBROOTHUB, Hub.Dev.IDevice);
     Assert(!pfnDone);
     return pRh->pIRhPort->pfnReset(pRh->pIRhPort, fResetOnLinux); /** @todo change rc from bool to vbox status everywhere! */
@@ -1002,7 +1007,7 @@ static DECLCALLBACK(int) vusbRhDevReset(PVUSBIDEVICE pInterface, bool fResetOnLi
 
 
 /**
- * @copydoc VUSBIDEVICE::pfnPowerOn
+ * @interface_method_impl{VUSBIDEVICE,pfnPowerOn}
  */
 static DECLCALLBACK(int) vusbRhDevPowerOn(PVUSBIDEVICE pInterface)
 {
@@ -1020,7 +1025,7 @@ static DECLCALLBACK(int) vusbRhDevPowerOn(PVUSBIDEVICE pInterface)
 
 
 /**
- * @copydoc VUSBIDEVICE::pfnPowerOff
+ * @interface_method_impl{VUSBIDEVICE,pfnPowerOff}
  */
 static DECLCALLBACK(int) vusbRhDevPowerOff(PVUSBIDEVICE pInterface)
 {
@@ -1048,7 +1053,7 @@ static DECLCALLBACK(int) vusbRhDevPowerOff(PVUSBIDEVICE pInterface)
 }
 
 /**
- * @copydoc VUSBIDEVICE::pfnGetState
+ * @interface_method_impl{VUSBIDEVICE,pfnGetState}
  */
 static DECLCALLBACK(VUSBDEVICESTATE) vusbRhDevGetState(PVUSBIDEVICE pInterface)
 {
@@ -1222,9 +1227,10 @@ static DECLCALLBACK(void) vusbRhDestruct(PPDMDRVINS pDrvIns)
  */
 static DECLCALLBACK(int) vusbRhConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
+    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
     LogFlow(("vusbRhConstruct: Instance %d\n", pDrvIns->iInstance));
     PVUSBROOTHUB pThis = PDMINS_2_DATA(pDrvIns, PVUSBROOTHUB);
-    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
 
     /*
      * Validate configuration.
diff --git a/src/VBox/Devices/USB/USBProxyDevice-stub.cpp b/src/VBox/Devices/USB/USBProxyDevice-stub.cpp
index efe770c..72dd8e0 100644
--- a/src/VBox/Devices/USB/USBProxyDevice-stub.cpp
+++ b/src/VBox/Devices/USB/USBProxyDevice-stub.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/USB/USBProxyDevice.cpp b/src/VBox/Devices/USB/USBProxyDevice.cpp
index af254f6..706f58c 100644
--- a/src/VBox/Devices/USB/USBProxyDevice.cpp
+++ b/src/VBox/Devices/USB/USBProxyDevice.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -111,7 +111,7 @@ static void *GetStdDescSync(PUSBPROXYDEV pProxyDev, uint8_t iDescType, uint8_t i
         {
             rc = pProxyDev->pOps->pfnUrbCancel(pProxyDev, &Urb);
             AssertRC(rc);
-            /** @todo: This breaks the comment above... */
+            /** @todo This breaks the comment above... */
             pUrbReaped = pProxyDev->pOps->pfnUrbReap(pProxyDev, RT_INDEFINITE_WAIT);
         }
         if (pUrbReaped != &Urb)
@@ -162,14 +162,15 @@ static void *GetStdDescSync(PUSBPROXYDEV pProxyDev, uint8_t iDescType, uint8_t i
             goto err;
         }
 
-        if ((cbDesc > (Urb.cbData - sizeof(VUSBSETUP))))
+        if (cbDesc > Urb.cbData - sizeof(VUSBSETUP))
         {
             Log(("GetStdDescSync: Descriptor length too short, cbDesc=%u, Urb.cbData=%u\n", cbDesc, Urb.cbData));
             goto err;
         }
 
-        if ((cbInitialHint != cbHint) &&
-        	((cbDesc != cbHint) || (Urb.cbData < cbInitialHint)))
+        if (   cbInitialHint != cbHint
+            && (   cbDesc != cbHint
+                || Urb.cbData < cbInitialHint) )
         {
             Log(("GetStdDescSync: Descriptor length incorrect, cbDesc=%u, Urb.cbData=%u, cbHint=%u\n", cbDesc, Urb.cbData, cbHint));
             goto err;
@@ -355,7 +356,6 @@ static int copy_interface(PVUSBINTERFACE pIf, uint8_t ifnum,
     PVUSBDESCINTERFACEEX cur_if = NULL;
     uint32_t altmap[4] = {0,};
     uint8_t *tmp, *end = buf + len;
-    uint8_t *orig_desc = buf;
     uint8_t alt;
     int state;
     size_t num_ep = 0;
@@ -566,7 +566,7 @@ static void usbProxyDevEditOutMaskedIfs(PUSBPROXYDEV pProxyDev)
 
 
 /**
- * @copydoc PDMUSBREG::pfnUsbReset
+ * @interface_method_impl{PDMUSBREG,pfnUsbReset}
  *
  * USB Device Proxy: Call OS specific code to reset the device.
  */
@@ -585,7 +585,7 @@ static DECLCALLBACK(int) usbProxyDevReset(PPDMUSBINS pUsbIns, bool fResetOnLinux
 
 
 /**
- * @copydoc PDMUSBREG::pfnUsbGetDescriptorCache
+ * @interface_method_impl{PDMUSBREG,pfnUsbGetDescriptorCache}
  */
 static DECLCALLBACK(PCPDMUSBDESCCACHE) usbProxyDevGetDescriptorCache(PPDMUSBINS pUsbIns)
 {
@@ -595,7 +595,7 @@ static DECLCALLBACK(PCPDMUSBDESCCACHE) usbProxyDevGetDescriptorCache(PPDMUSBINS
 
 
 /**
- * @copydoc PDMUSBREG::pfnUsbSetConfiguration
+ * @interface_method_impl{PDMUSBREG,pfnUsbSetConfiguration}
  *
  * USB Device Proxy: Release claimed interfaces, tell the OS+device about the config change, claim the new interfaces.
  */
@@ -668,7 +668,7 @@ static DECLCALLBACK(int) usbProxyDevSetConfiguration(PPDMUSBINS pUsbIns, uint8_t
 
 
 /**
- * @copydoc PDMUSBREG::pfnUsbSetInterface
+ * @interface_method_impl{PDMUSBREG,pfnUsbSetInterface}
  *
  * USB Device Proxy: Call OS specific code to select alternate interface settings.
  */
@@ -683,7 +683,7 @@ static DECLCALLBACK(int) usbProxyDevSetInterface(PPDMUSBINS pUsbIns, uint8_t bIn
 
 
 /**
- * @copydoc PDMUSBREG::pfnUsbClearHaltedEndpoint
+ * @interface_method_impl{PDMUSBREG,pfnUsbClearHaltedEndpoint}
  *
  * USB Device Proxy: Call OS specific code to clear the endpoint.
  */
@@ -698,7 +698,7 @@ static DECLCALLBACK(int) usbProxyDevClearHaltedEndpoint(PPDMUSBINS pUsbIns, unsi
 
 
 /**
- * @copydoc PDMUSBREG::pfnUrbQueue
+ * @interface_method_impl{PDMUSBREG,pfnUrbQueue}
  *
  * USB Device Proxy: Call OS specific code.
  */
@@ -716,7 +716,7 @@ static DECLCALLBACK(int) usbProxyDevUrbQueue(PPDMUSBINS pUsbIns, PVUSBURB pUrb)
 
 
 /**
- * @copydoc PDMUSBREG::pfnUrbCancel
+ * @interface_method_impl{PDMUSBREG,pfnUrbCancel}
  *
  * USB Device Proxy: Call OS specific code.
  */
@@ -728,7 +728,7 @@ static DECLCALLBACK(int) usbProxyDevUrbCancel(PPDMUSBINS pUsbIns, PVUSBURB pUrb)
 
 
 /**
- * @copydoc PDMUSBREG::pfnUrbReap
+ * @interface_method_impl{PDMUSBREG,pfnUrbReap}
  *
  * USB Device Proxy: Call OS specific code.
  */
@@ -745,7 +745,7 @@ static DECLCALLBACK(PVUSBURB) usbProxyDevUrbReap(PPDMUSBINS pUsbIns, RTMSINTERVA
 
 
 /**
- * @copydoc PDMUSBREG::pfnWakeup
+ * @interface_method_impl{PDMUSBREG,pfnWakeup}
  *
  * USB Device Proxy: Call OS specific code.
  */
@@ -757,9 +757,10 @@ static DECLCALLBACK(int) usbProxyDevWakeup(PPDMUSBINS pUsbIns)
 }
 
 
-/** @copydoc PDMUSBREG::pfnDestruct */
+/** @interface_method_impl{PDMUSBREG,pfnDestruct} */
 static DECLCALLBACK(void) usbProxyDestruct(PPDMUSBINS pUsbIns)
 {
+    PDMUSB_CHECK_VERSIONS_RETURN_VOID(pUsbIns);
     PUSBPROXYDEV pThis = PDMINS_2_DATA(pUsbIns, PUSBPROXYDEV);
     Log(("usbProxyDestruct: destroying pProxyDev=%s\n", pUsbIns->pszName));
 
@@ -854,9 +855,11 @@ static int usbProxyQueryNum(PUSBFILTER pFilter, USBFILTERIDX enmFieldIdx, PCFGMN
 }
 
 
-/** @copydoc PDMUSBREG::pfnConstruct */
+/** @interface_method_impl{PDMUSBREG,pfnConstruct} */
 static DECLCALLBACK(int) usbProxyConstruct(PPDMUSBINS pUsbIns, int iInstance, PCFGMNODE pCfg, PCFGMNODE pCfgGlobal)
 {
+    PDMUSB_CHECK_VERSIONS_RETURN(pUsbIns);
+    RT_NOREF(iInstance);
     PUSBPROXYDEV pThis = PDMINS_2_DATA(pUsbIns, PUSBPROXYDEV);
     LogFlow(("usbProxyConstruct: pUsbIns=%p iInstance=%d\n", pUsbIns, iInstance));
 
diff --git a/src/VBox/Devices/USB/USBProxyDevice.h b/src/VBox/Devices/USB/USBProxyDevice.h
index 4b521fe..3c84ea4 100644
--- a/src/VBox/Devices/USB/USBProxyDevice.h
+++ b/src/VBox/Devices/USB/USBProxyDevice.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/USB/VUSBBufferedPipe.cpp b/src/VBox/Devices/USB/VUSBBufferedPipe.cpp
index f8b6ec0..7d295cb 100644
--- a/src/VBox/Devices/USB/VUSBBufferedPipe.cpp
+++ b/src/VBox/Devices/USB/VUSBBufferedPipe.cpp
@@ -283,8 +283,9 @@ static int vusbBufferedPipeStream(PVUSBBUFFEREDPIPEINT pThis)
  */
 static int vusbBufferedPipeSetParamsFromDescriptor(PVUSBBUFFEREDPIPEINT pThis, PCVUSBDESCENDPOINT pDesc)
 {
-    int rc = VINF_SUCCESS;
-    unsigned cbPktMax, uInterval, uMult;
+    unsigned cbPktMax;
+    unsigned uInterval;
+    unsigned uMult;
 
     if (pThis->enmSpeed == VUSB_SPEED_HIGH)
     {
@@ -305,24 +306,21 @@ static int vusbBufferedPipeSetParamsFromDescriptor(PVUSBBUFFEREDPIPEINT pThis, P
     }
     else
     {
-        /** @todo: Implement for super speed and up if it turns out to be required, at the moment it looks
+        /** @todo Implement for super speed and up if it turns out to be required, at the moment it looks
          * like we don't need it. */
-        rc = VERR_NOT_SUPPORTED;
+        return VERR_NOT_SUPPORTED;
     }
 
-    if (RT_SUCCESS(rc))
-    {
-        pThis->uInterval = uInterval;
-        pThis->cbPktSize = cbPktMax * uMult;
-        pThis->uEndPt    = pDesc->bEndpointAddress & 0xf;
-
-        unsigned cPackets = pThis->cLatencyMs / pThis->uInterval;
-        cPackets = RT_MAX(cPackets, 1); /* At least one packet. */
-        pThis->cbRingBufData = pThis->cbPktSize * cPackets;
-        pThis->cIsocDesc     = cPackets / 8 + ((cPackets % 8) ? 1 : 0);
-    }
+    pThis->uInterval = uInterval;
+    pThis->cbPktSize = cbPktMax * uMult;
+    pThis->uEndPt    = pDesc->bEndpointAddress & 0xf;
 
-    return rc;
+    unsigned cPackets = pThis->cLatencyMs / pThis->uInterval;
+    cPackets = RT_MAX(cPackets, 1); /* At least one packet. */
+    pThis->cbRingBufData = pThis->cbPktSize * cPackets;
+    pThis->cIsocDesc     = cPackets / 8 + ((cPackets % 8) ? 1 : 0);
+
+    return VINF_SUCCESS;
 }
 
 
@@ -409,7 +407,8 @@ DECLHIDDEN(int) vusbBufferedPipeSubmitUrb(VUSBBUFFEREDPIPE hBuffer, PVUSBURB pUr
             for (unsigned i = idxIsocPkt; i < pUrb->cIsocPkts && pIsocDesc->cIsocPkts < RT_ELEMENTS(pIsocDesc->aIsocPkts); i++)
             {
                 pIsocDesc->aIsocPkts[pIsocDesc->cIsocPkts].enmStatus = VUSBSTATUS_NOT_ACCESSED;
-                pIsocDesc->aIsocPkts[pIsocDesc->cIsocPkts].off = pIsocDesc->cbTotal;
+                pIsocDesc->aIsocPkts[pIsocDesc->cIsocPkts].off = (uint16_t)pIsocDesc->cbTotal;
+                Assert(pIsocDesc->aIsocPkts[pIsocDesc->cIsocPkts].off == pIsocDesc->cbTotal);
                 pIsocDesc->aIsocPkts[pIsocDesc->cIsocPkts].cb  = pUrb->aIsocPkts[i].cb;
                 pIsocDesc->cbTotal += pUrb->aIsocPkts[i].cb;
                 pIsocDesc->cIsocPkts++;
@@ -510,7 +509,7 @@ DECLHIDDEN(int) vusbBufferedPipeCreate(PVUSBDEV pDev, PVUSBPIPE pPipe, VUSBDIREC
                         /*
                          * Create a ring buffer which can hold twice the amount of data
                          * for the required latency so we can fill the buffer with new data
-                         * while the old one is still being used 
+                         * while the old one is still being used
                          */
                         rc = RTCircBufCreate(&pThis->pRingBufData, 2 * pThis->cbRingBufData);
                         if (RT_SUCCESS(rc))
@@ -581,4 +580,3 @@ DECLHIDDEN(void) vusbBufferedPipeDestroy(VUSBBUFFEREDPIPE hBuffer)
     RTMemFree(pThis);
 }
 
-
diff --git a/src/VBox/Devices/USB/VUSBDevice.cpp b/src/VBox/Devices/USB/VUSBDevice.cpp
index 1bc73e6..26a6fd0 100644
--- a/src/VBox/Devices/USB/VUSBDevice.cpp
+++ b/src/VBox/Devices/USB/VUSBDevice.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -110,7 +110,7 @@ static PVUSBINTERFACESTATE vusbDevFindIfState(PVUSBDEV pDev, int iIf)
     return NULL;
 }
 
-static PCVUSBDESCINTERFACEEX vusbDevFindAltIfDesc(PVUSBDEV pDev, PCVUSBINTERFACESTATE pIfState, int iAlt)
+static PCVUSBDESCINTERFACEEX vusbDevFindAltIfDesc(PCVUSBINTERFACESTATE pIfState, int iAlt)
 {
     for (uint32_t i = 0; i < pIfState->pIf->cSettings; i++)
         if (pIfState->pIf->paSettings[i].Core.bAlternateSetting == iAlt)
@@ -307,6 +307,7 @@ bool vusbDevDoSelectConfig(PVUSBDEV pDev, PCVUSBDESCCONFIGEX pCfgDesc)
  */
 static bool vusbDevStdReqSetConfig(PVUSBDEV pDev, int EndPt, PVUSBSETUP pSetup, uint8_t *pbBuf, uint32_t *pcbBuf)
 {
+    RT_NOREF(EndPt, pbBuf, pcbBuf);
     unsigned iCfg = pSetup->wValue & 0xff;
 
     if ((pSetup->bmRequestType & VUSB_RECIP_MASK) != VUSB_TO_DEVICE)
@@ -359,6 +360,7 @@ static bool vusbDevStdReqSetConfig(PVUSBDEV pDev, int EndPt, PVUSBSETUP pSetup,
  */
 static bool vusbDevStdReqGetConfig(PVUSBDEV pDev, int EndPt, PVUSBSETUP pSetup, uint8_t *pbBuf, uint32_t *pcbBuf)
 {
+    RT_NOREF(EndPt);
     if ((pSetup->bmRequestType & VUSB_RECIP_MASK) != VUSB_TO_DEVICE)
     {
         Log(("vusb: error: %s: GET_CONFIGURATION - invalid request (dir) !!!\n", pDev->pUsbIns->pszName));
@@ -401,6 +403,7 @@ static bool vusbDevStdReqGetConfig(PVUSBDEV pDev, int EndPt, PVUSBSETUP pSetup,
  */
 static bool vusbDevStdReqGetInterface(PVUSBDEV pDev, int EndPt, PVUSBSETUP pSetup, uint8_t *pbBuf, uint32_t *pcbBuf)
 {
+    RT_NOREF(EndPt);
     if ((pSetup->bmRequestType & VUSB_RECIP_MASK) != VUSB_TO_INTERFACE)
     {
         Log(("vusb: error: %s: GET_INTERFACE - invalid request (dir) !!!\n", pDev->pUsbIns->pszName));
@@ -447,6 +450,7 @@ static bool vusbDevStdReqGetInterface(PVUSBDEV pDev, int EndPt, PVUSBSETUP pSetu
  */
 static bool vusbDevStdReqSetInterface(PVUSBDEV pDev, int EndPt, PVUSBSETUP pSetup, uint8_t *pbBuf, uint32_t *pcbBuf)
 {
+    RT_NOREF(EndPt, pbBuf, pcbBuf);
     if ((pSetup->bmRequestType & VUSB_RECIP_MASK) != VUSB_TO_INTERFACE)
     {
         Log(("vusb: error: %s: SET_INTERFACE - invalid request (dir) !!!\n", pDev->pUsbIns->pszName));
@@ -475,7 +479,7 @@ static bool vusbDevStdReqSetInterface(PVUSBDEV pDev, int EndPt, PVUSBSETUP pSetu
         return false;
     }
     uint8_t iAlt = pSetup->wValue;
-    PCVUSBDESCINTERFACEEX pIfDesc = vusbDevFindAltIfDesc(pDev, pIfState, iAlt);
+    PCVUSBDESCINTERFACEEX pIfDesc = vusbDevFindAltIfDesc(pIfState, iAlt);
     if (!pIfDesc)
     {
         LogFlow(("vusbDevStdReqSetInterface: error: %s: couldn't find alt interface %u.%u !!!\n", pDev->pUsbIns->pszName, iIf, iAlt));
@@ -509,6 +513,7 @@ static bool vusbDevStdReqSetInterface(PVUSBDEV pDev, int EndPt, PVUSBSETUP pSetu
  */
 static bool vusbDevStdReqSetAddress(PVUSBDEV pDev, int EndPt, PVUSBSETUP pSetup, uint8_t *pbBuf, uint32_t *pcbBuf)
 {
+    RT_NOREF(EndPt, pbBuf, pcbBuf);
     if ((pSetup->bmRequestType & VUSB_RECIP_MASK) != VUSB_TO_DEVICE)
     {
         Log(("vusb: error: %s: SET_ADDRESS - invalid request (dir) !!!\n", pDev->pUsbIns->pszName));
@@ -540,6 +545,7 @@ static bool vusbDevStdReqSetAddress(PVUSBDEV pDev, int EndPt, PVUSBSETUP pSetup,
  */
 static bool vusbDevStdReqClearFeature(PVUSBDEV pDev, int EndPt, PVUSBSETUP pSetup, uint8_t *pbBuf, uint32_t *pcbBuf)
 {
+    RT_NOREF(pbBuf, pcbBuf);
     switch (pSetup->bmRequestType & VUSB_RECIP_MASK)
     {
         case VUSB_TO_DEVICE:
@@ -574,6 +580,7 @@ static bool vusbDevStdReqClearFeature(PVUSBDEV pDev, int EndPt, PVUSBSETUP pSetu
  */
 static bool vusbDevStdReqSetFeature(PVUSBDEV pDev, int EndPt, PVUSBSETUP pSetup, uint8_t *pbBuf, uint32_t *pcbBuf)
 {
+    RT_NOREF(pDev, EndPt, pbBuf, pcbBuf);
     switch (pSetup->bmRequestType & VUSB_RECIP_MASK)
     {
         case VUSB_TO_DEVICE:
@@ -598,6 +605,7 @@ static bool vusbDevStdReqSetFeature(PVUSBDEV pDev, int EndPt, PVUSBSETUP pSetup,
 
 static bool vusbDevStdReqGetStatus(PVUSBDEV pDev, int EndPt, PVUSBSETUP pSetup, uint8_t *pbBuf, uint32_t *pcbBuf)
 {
+    RT_NOREF(EndPt);
     if (*pcbBuf != 2)
     {
         LogFlow(("vusbDevStdReqGetStatus: %s: buffer is too small! (%d)\n", pDev->pUsbIns->pszName, *pcbBuf));
@@ -831,6 +839,7 @@ static void ReadCachedDeviceDesc(PCVUSBDESCDEVICE pDevDesc, uint8_t *pbBuf, uint
  */
 static bool vusbDevStdReqGetDescriptor(PVUSBDEV pDev, int EndPt, PVUSBSETUP pSetup, uint8_t *pbBuf, uint32_t *pcbBuf)
 {
+    RT_NOREF(EndPt);
     if ((pSetup->bmRequestType & VUSB_RECIP_MASK) == VUSB_TO_DEVICE)
     {
         switch (pSetup->wValue >> 8)
@@ -1167,7 +1176,7 @@ static DECLCALLBACK(int) vusbDevUrbIoThread(RTTHREAD hThread, void *pvUser)
 
         /* Process any URBs waiting to be cancelled first. */
         int rc = RTReqQueueProcess(pDev->hReqQueueSync, 0); /* Don't wait if there is nothing to do. */
-        Assert(RT_SUCCESS(rc) || rc == VERR_TIMEOUT);
+        Assert(RT_SUCCESS(rc) || rc == VERR_TIMEOUT); NOREF(rc);
     }
 
     return VINF_SUCCESS;
@@ -1356,6 +1365,7 @@ static void vusbDevResetDone(PVUSBDEV pDev, int rc, PFNVUSBRESETDONE pfnDone, vo
  */
 static DECLCALLBACK(void) vusbDevResetDoneTimer(PPDMUSBINS pUsbIns, PTMTIMER pTimer, void *pvUser)
 {
+    RT_NOREF(pUsbIns, pTimer);
     PVUSBDEV        pDev  = (PVUSBDEV)pvUser;
     PVUSBRESETARGS  pArgs = (PVUSBRESETARGS)pDev->pvArgs;
     Assert(pDev->pUsbIns == pUsbIns);
@@ -1431,8 +1441,10 @@ static int vusbDevResetWorker(PVUSBDEV pDev, bool fResetOnLinux, bool fUseTimer,
  *                          on the EMT thread.
  * @thread  EMT
  */
-static DECLCALLBACK(int) vusbIDeviceReset(PVUSBIDEVICE pDevice, bool fResetOnLinux, PFNVUSBRESETDONE pfnDone, void *pvUser, PVM pVM)
+static DECLCALLBACK(int) vusbIDeviceReset(PVUSBIDEVICE pDevice, bool fResetOnLinux,
+                                          PFNVUSBRESETDONE pfnDone, void *pvUser, PVM pVM)
 {
+    RT_NOREF(pVM);
     PVUSBDEV pDev = (PVUSBDEV)pDevice;
     Assert(!pfnDone || pVM);
     LogFlow(("vusb: reset: [%s]/%i\n", pDev->pUsbIns->pszName, pDev->i16Port));
@@ -1655,7 +1667,7 @@ DECLHIDDEN(int) vusbDevIoThreadExecV(PVUSBDEV pDev, uint32_t fFlags, PFNRT pfnFu
             && (fFlags & VUSB_DEV_IO_THREAD_EXEC_FLAGS_SYNC))
         {
             int rc2 = RTReqQueueProcess(pDev->hReqQueueSync, 0);
-            Assert(RT_SUCCESS(rc2) || rc2 == VERR_TIMEOUT);
+            Assert(RT_SUCCESS(rc2) || rc2 == VERR_TIMEOUT); NOREF(rc2);
         }
         else
             vusbDevUrbIoThreadWakeup(pDev);
diff --git a/src/VBox/Devices/USB/VUSBInternal.h b/src/VBox/Devices/USB/VUSBInternal.h
index c399019..9b76377 100644
--- a/src/VBox/Devices/USB/VUSBInternal.h
+++ b/src/VBox/Devices/USB/VUSBInternal.h
@@ -9,7 +9,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/USB/VUSBSniffer.cpp b/src/VBox/Devices/USB/VUSBSniffer.cpp
index 184ab13..54db633 100644
--- a/src/VBox/Devices/USB/VUSBSniffer.cpp
+++ b/src/VBox/Devices/USB/VUSBSniffer.cpp
@@ -35,6 +35,7 @@
 *   Defined Constants And Macros                                                                                                 *
 *********************************************************************************************************************************/
 
+
 /*********************************************************************************************************************************
 *   Structures and Typedefs                                                                                                      *
 *********************************************************************************************************************************/
@@ -75,7 +76,7 @@ static PCVUSBSNIFFERFMT s_aVUsbSnifferFmts[] =
 *   Internal Functions                                                                                                           *
 *********************************************************************************************************************************/
 
-/** @copydoc VUSBSNIFFERSTRM::pfnWrite. */
+/** @interface_method_impl{VUSBSNIFFERSTRM,pfnWrite}. */
 static DECLCALLBACK(int) vusbSnifferStrmWrite(PVUSBSNIFFERSTRM pStrm, const void *pvBuf, size_t cbBuf)
 {
     PVUSBSNIFFERINT pThis = RT_FROM_MEMBER(pStrm, VUSBSNIFFERINT, Strm);
@@ -135,6 +136,7 @@ DECLHIDDEN(int) VUSBSnifferCreate(PVUSBSNIFFER phSniffer, uint32_t fFlags,
                                   const char *pszCaptureFilename, const char *pszFmt,
                                   const char *pszDesc)
 {
+    RT_NOREF(pszDesc);
     int rc = VINF_SUCCESS;
     PVUSBSNIFFERINT pThis = NULL;
     PCVUSBSNIFFERFMT pFmt = NULL;
diff --git a/src/VBox/Devices/USB/VUSBSnifferPcapNg.cpp b/src/VBox/Devices/USB/VUSBSnifferPcapNg.cpp
index c1d89a4..f57ff0b 100644
--- a/src/VBox/Devices/USB/VUSBSnifferPcapNg.cpp
+++ b/src/VBox/Devices/USB/VUSBSnifferPcapNg.cpp
@@ -428,19 +428,18 @@ static int vusbSnifferBlockNew(PVUSBSNIFFERFMTINT pThis, PDumpFileBlockHdr pBloc
  * @param   pvOption        Raw data for the option.
  * @param   cbOption        Size of the optiob data.
  */
-static int vusbSnifferAddOption(PVUSBSNIFFERFMTINT pThis, uint16_t u16OptionCode, const void *pvOption, uint16_t cbOption)
+static int vusbSnifferAddOption(PVUSBSNIFFERFMTINT pThis, uint16_t u16OptionCode, const void *pvOption, size_t cbOption)
 {
-    int rc = VINF_SUCCESS;
+    AssertStmt((uint16_t)cbOption == cbOption, cbOption = UINT16_MAX);
     DumpFileOptionHdr OptHdr;
-
     OptHdr.u16OptionCode   = u16OptionCode;
-    OptHdr.u16OptionLength = cbOption;
-    rc = vusbSnifferBlockAddData(pThis, &OptHdr, sizeof(OptHdr));
+    OptHdr.u16OptionLength = (uint16_t)cbOption;
+    int rc = vusbSnifferBlockAddData(pThis, &OptHdr, sizeof(OptHdr));
     if (   RT_SUCCESS(rc)
         && u16OptionCode != DUMPFILE_OPTION_CODE_END
         && cbOption != 0)
     {
-        rc = vusbSnifferBlockAddData(pThis, pvOption, cbOption);
+        rc = vusbSnifferBlockAddData(pThis, pvOption, (uint16_t)cbOption);
         if (RT_SUCCESS(rc))
             rc = vusbSnifferBlockAlign(pThis);
     }
@@ -449,11 +448,9 @@ static int vusbSnifferAddOption(PVUSBSNIFFERFMTINT pThis, uint16_t u16OptionCode
 }
 
 
-/** @copydoc VUSBSNIFFERFMT::pfnInit */
+/** @interface_method_impl{VUSBSNIFFERFMT,pfnInit} */
 static DECLCALLBACK(int) vusbSnifferFmtPcanNgInit(PVUSBSNIFFERFMTINT pThis, PVUSBSNIFFERSTRM pStrm)
 {
-    int rc = VINF_SUCCESS;
-
     pThis->pStrm       = pStrm;
     pThis->cbBlockCur  = 0;
     pThis->cbBlockMax  = 0;
@@ -470,7 +467,7 @@ static DECLCALLBACK(int) vusbSnifferFmtPcanNgInit(PVUSBSNIFFERFMTINT pThis, PVUS
     Shb.u64SectionLength        = UINT64_C(0xffffffffffffffff); /* -1 */
 
     /* Write the blocks. */
-    rc = vusbSnifferBlockNew(pThis, &Shb.Hdr, sizeof(Shb));
+    int rc = vusbSnifferBlockNew(pThis, &Shb.Hdr, sizeof(Shb));
     if (RT_SUCCESS(rc))
     {
         const char *pszOpt = RTBldCfgTargetDotArch();
@@ -508,7 +505,7 @@ static DECLCALLBACK(int) vusbSnifferFmtPcanNgInit(PVUSBSNIFFERFMTINT pThis, PVUS
 
     if (RT_SUCCESS(rc))
     {
-        /** @todo: Add product info. */
+        /** @todo Add product info. */
     }
 
     if (RT_SUCCESS(rc))
@@ -549,7 +546,7 @@ static DECLCALLBACK(int) vusbSnifferFmtPcanNgInit(PVUSBSNIFFERFMTINT pThis, PVUS
 }
 
 
-/** @copydoc VUSBSNIFFERFMT::pfnDestroy */
+/** @interface_method_impl{VUSBSNIFFERFMT,pfnDestroy} */
 static DECLCALLBACK(void) vusbSnifferFmtPcanNgDestroy(PVUSBSNIFFERFMTINT pThis)
 {
     if (pThis->pbBlockData)
@@ -557,23 +554,17 @@ static DECLCALLBACK(void) vusbSnifferFmtPcanNgDestroy(PVUSBSNIFFERFMTINT pThis)
 }
 
 
-/** @copydoc VUSBSNIFFERFMT::pfnRecordEvent */
+/** @interface_method_impl{VUSBSNIFFERFMT,pfnRecordEvent} */
 static DECLCALLBACK(int) vusbSnifferFmtPcanNgRecordEvent(PVUSBSNIFFERFMTINT pThis, PVUSBURB pUrb, VUSBSNIFFEREVENT enmEvent)
 {
-    int rc = VINF_SUCCESS;
     DumpFileEpb Epb;
     DumpFileUsbHeaderLnxMmapped UsbHdr;
-    DumpFileUsbSetup UsbSetup;
-    RTTIMESPEC TimeNow;
-    uint64_t u64TimestampEvent;
-    size_t cbUrbLength = 0;
-    uint32_t cbDataLength = 0;
     uint32_t cbCapturedLength = sizeof(UsbHdr);
-    uint32_t cIsocPkts = 0;
     uint8_t *pbData = NULL;
 
+    RTTIMESPEC TimeNow;
     RTTimeNow(&TimeNow);
-    u64TimestampEvent = RTTimeSpecGetNano(&TimeNow);
+    uint64_t u64TimestampEvent = RTTimeSpecGetNano(&TimeNow);
 
     /* Start with the enhanced packet block. */
     Epb.Hdr.u32BlockType        = DUMPFILE_EPB_BLOCK_TYPE;
@@ -582,7 +573,8 @@ static DECLCALLBACK(int) vusbSnifferFmtPcanNgRecordEvent(PVUSBSNIFFERFMTINT pThi
     Epb.u32TimestampHigh        = (u64TimestampEvent >> 32) & UINT32_C(0xffffffff);
     Epb.u32TimestampLow         = u64TimestampEvent & UINT32_C(0xffffffff);
 
-    UsbHdr.u64Id = (uint64_t)pUrb; /** @todo: check whether the pointer is a good ID. */
+    UsbHdr.u64Id = (uintptr_t)pUrb; /** @todo check whether the pointer is a good ID. */
+    uint32_t cbUrbLength;
     switch (enmEvent)
     {
         case VUSBSNIFFEREVENT_SUBMIT:
@@ -596,41 +588,44 @@ static DECLCALLBACK(int) vusbSnifferFmtPcanNgRecordEvent(PVUSBSNIFFERFMTINT pThi
         case VUSBSNIFFEREVENT_ERROR_SUBMIT:
         case VUSBSNIFFEREVENT_ERROR_COMPLETE:
             UsbHdr.u8EventType = DUMPFILE_USB_EVENT_TYPE_ERROR;
+            cbUrbLength = 0;
             break;
         default:
             AssertMsgFailed(("Invalid event type %d\n", enmEvent));
+            cbUrbLength = 0;
     }
-    cbDataLength = cbUrbLength;
+    uint32_t cbDataLength = cbUrbLength;
     pbData = &pUrb->abData[0];
 
+    uint32_t cIsocPkts = 0;
     switch (pUrb->enmType)
     {
         case VUSBXFERTYPE_ISOC:
         {
-            int32_t i32ErrorCount = 0;
+            int32_t cErrors = 0;
 
             UsbHdr.u8TransferType = 0;
             cIsocPkts = pUrb->cIsocPkts;
             for (unsigned i = 0; i < cIsocPkts; i++)
                 if (   pUrb->aIsocPkts[i].enmStatus != VUSBSTATUS_OK
                     && pUrb->aIsocPkts[i].enmStatus != VUSBSTATUS_NOT_ACCESSED)
-                    i32ErrorCount++;
+                    cErrors++;
 
-            UsbHdr.u.IsoRec.i32ErrorCount = i32ErrorCount;
+            UsbHdr.u.IsoRec.i32ErrorCount = cErrors;
             UsbHdr.u.IsoRec.i32NumDesc    = pUrb->cIsocPkts;
             cbCapturedLength += cIsocPkts * sizeof(DumpFileUsbIsoDesc);
             break;
         }
         case VUSBXFERTYPE_BULK:
-                UsbHdr.u8TransferType = 3;
-                break;
+            UsbHdr.u8TransferType = 3;
+            break;
         case VUSBXFERTYPE_INTR:
-                UsbHdr.u8TransferType = 1;
-                break;
+            UsbHdr.u8TransferType = 1;
+            break;
         case VUSBXFERTYPE_CTRL:
         case VUSBXFERTYPE_MSG:
-                UsbHdr.u8TransferType = 2;
-                break;
+            UsbHdr.u8TransferType = 2;
+            break;
         default:
             AssertMsgFailed(("invalid transfer type %d\n", pUrb->enmType));
     }
@@ -683,7 +678,7 @@ static DECLCALLBACK(int) vusbSnifferFmtPcanNgRecordEvent(PVUSBSNIFFERFMTINT pThi
         UsbHdr.u8SetupFlag  = '-'; /* Follow usbmon source here. */
 
     /* Write the packet to the capture file. */
-    rc = vusbSnifferBlockNew(pThis, &Epb.Hdr, sizeof(Epb));
+    int rc = vusbSnifferBlockNew(pThis, &Epb.Hdr, sizeof(Epb));
     if (RT_SUCCESS(rc))
         rc = vusbSnifferBlockAddData(pThis, &UsbHdr, sizeof(UsbHdr));
 
diff --git a/src/VBox/Devices/USB/VUSBSnifferUsbMon.cpp b/src/VBox/Devices/USB/VUSBSnifferUsbMon.cpp
index 24c3204..92f32ba 100644
--- a/src/VBox/Devices/USB/VUSBSnifferUsbMon.cpp
+++ b/src/VBox/Devices/USB/VUSBSnifferUsbMon.cpp
@@ -34,6 +34,7 @@
 *   Defined Constants And Macros                                                                                                 *
 *********************************************************************************************************************************/
 
+
 /*********************************************************************************************************************************
 *   Structures and Typedefs                                                                                                      *
 *********************************************************************************************************************************/
@@ -68,7 +69,7 @@ static const char *s_apszFileExts[] =
 *********************************************************************************************************************************/
 
 
-/** @copydoc VUSBSNIFFERFMT::pfnInit */
+/** @interface_method_impl{VUSBSNIFFERFMT,pfnInit} */
 static DECLCALLBACK(int) vusbSnifferFmtUsbMonInit(PVUSBSNIFFERFMTINT pThis, PVUSBSNIFFERSTRM pStrm)
 {
     pThis->pStrm = pStrm;
@@ -76,14 +77,14 @@ static DECLCALLBACK(int) vusbSnifferFmtUsbMonInit(PVUSBSNIFFERFMTINT pThis, PVUS
 }
 
 
-/** @copydoc VUSBSNIFFERFMT::pfnDestroy */
+/** @interface_method_impl{VUSBSNIFFERFMT,pfnDestroy} */
 static DECLCALLBACK(void) vusbSnifferFmtUsbMonDestroy(PVUSBSNIFFERFMTINT pThis)
 {
-
+    RT_NOREF(pThis);
 }
 
 
-/** @copydoc VUSBSNIFFERFMT::pfnRecordEvent */
+/** @interface_method_impl{VUSBSNIFFERFMT,pfnRecordEvent} */
 static DECLCALLBACK(int) vusbSnifferFmtUsbMonRecordEvent(PVUSBSNIFFERFMTINT pThis, PVUSBURB pUrb, VUSBSNIFFEREVENT enmEvent)
 {
     char aszLineBuf[512];
@@ -209,7 +210,7 @@ static DECLCALLBACK(int) vusbSnifferFmtUsbMonRecordEvent(PVUSBSNIFFERFMTINT pThi
             rc = pThis->pStrm->pfnWrite(pThis->pStrm, &aszLineBuf[0], cch);
         }
 
-        /** @todo: Dump the data */
+        /** @todo Dump the data */
     }
 
     return rc;
diff --git a/src/VBox/Devices/USB/VUSBSnifferVmx.cpp b/src/VBox/Devices/USB/VUSBSnifferVmx.cpp
index 45ccca3..fc1e7da 100644
--- a/src/VBox/Devices/USB/VUSBSnifferVmx.cpp
+++ b/src/VBox/Devices/USB/VUSBSnifferVmx.cpp
@@ -34,6 +34,7 @@
 *   Defined Constants And Macros                                                                                                 *
 *********************************************************************************************************************************/
 
+
 /*********************************************************************************************************************************
 *   Structures and Typedefs                                                                                                      *
 *********************************************************************************************************************************/
@@ -83,6 +84,7 @@ static const char *s_apszMonths[] =
     "Dec"
 };
 
+
 /*********************************************************************************************************************************
 *   Internal Functions                                                                                                           *
 *********************************************************************************************************************************/
@@ -90,17 +92,18 @@ static const char *s_apszMonths[] =
 
 static int vusbSnifferFmtVmxLogData(PVUSBSNIFFERFMTINT pThis, PRTTIME pTime, uint8_t *pbBuf, size_t cbBuf)
 {
-    int rc = VINF_SUCCESS;
-    char aszLineBuf[256];
-    uint16_t off = 0;
+    int rc;
+    char szLineBuf[256];
+    size_t off = 0;
 
     do
     {
-        size_t cch = RTStrPrintf(&aszLineBuf[0], sizeof(aszLineBuf),
-                                 "%s %02u %02u:%02u:%02u.%3.*u: vmx| USBIO:  %03x: %16.*Rhxs\n",
-                                 s_apszMonths[pTime->u8Month - 1], pTime->u8MonthDay, pTime->u8Hour, pTime->u8Minute, pTime->u8Second, 3, pTime->u32Nanosecond,
+        size_t cch = RTStrPrintf(&szLineBuf[0], sizeof(szLineBuf),
+                                 "%s %02u %02u:%02u:%02u.%3.*u: vmx| USBIO:  %03zx: %16.*Rhxs\n",
+                                 s_apszMonths[pTime->u8Month - 1], pTime->u8MonthDay,
+                                 pTime->u8Hour, pTime->u8Minute, pTime->u8Second, 3, pTime->u32Nanosecond,
                                  off, RT_MIN(cbBuf - off, 16), pbBuf);
-        rc = pThis->pStrm->pfnWrite(pThis->pStrm, &aszLineBuf[0], cch);
+        rc = pThis->pStrm->pfnWrite(pThis->pStrm, &szLineBuf[0], cch);
         off   += RT_MIN(cbBuf, 16);
         pbBuf += RT_MIN(cbBuf, 16);
     } while (RT_SUCCESS(rc) && off < cbBuf);
@@ -108,7 +111,7 @@ static int vusbSnifferFmtVmxLogData(PVUSBSNIFFERFMTINT pThis, PRTTIME pTime, uin
     return rc;
 }
 
-/** @copydoc VUSBSNIFFERFMT::pfnInit */
+/** @interface_method_impl{VUSBSNIFFERFMT,pfnInit} */
 static DECLCALLBACK(int) vusbSnifferFmtVmxInit(PVUSBSNIFFERFMTINT pThis, PVUSBSNIFFERSTRM pStrm)
 {
     pThis->pStrm = pStrm;
@@ -116,36 +119,36 @@ static DECLCALLBACK(int) vusbSnifferFmtVmxInit(PVUSBSNIFFERFMTINT pThis, PVUSBSN
 }
 
 
-/** @copydoc VUSBSNIFFERFMT::pfnDestroy */
+/** @interface_method_impl{VUSBSNIFFERFMT,pfnDestroy} */
 static DECLCALLBACK(void) vusbSnifferFmtVmxDestroy(PVUSBSNIFFERFMTINT pThis)
 {
     NOREF(pThis);
 }
 
 
-/** @copydoc VUSBSNIFFERFMT::pfnRecordEvent */
+/** @interface_method_impl{VUSBSNIFFERFMT,pfnRecordEvent} */
 static DECLCALLBACK(int) vusbSnifferFmtVmxRecordEvent(PVUSBSNIFFERFMTINT pThis, PVUSBURB pUrb, VUSBSNIFFEREVENT enmEvent)
 {
     RTTIMESPEC TimeNow;
     RTTIME Time;
-    char aszLineBuf[256];
+    char szLineBuf[256];
     const char *pszEvt = enmEvent == VUSBSNIFFEREVENT_SUBMIT ? "Down" : "Up";
     uint8_t cIsocPkts = pUrb->enmType == VUSBXFERTYPE_ISOC ? pUrb->cIsocPkts : 0;
 
     if (pUrb->enmType == VUSBXFERTYPE_MSG)
         return VINF_SUCCESS;
 
-    RT_ZERO(aszLineBuf);
+    RT_ZERO(szLineBuf);
 
     RTTimeNow(&TimeNow);
     RTTimeExplode(&Time, &TimeNow);
 
-    size_t cch = RTStrPrintf(&aszLineBuf[0], sizeof(aszLineBuf),
+    size_t cch = RTStrPrintf(&szLineBuf[0], sizeof(szLineBuf),
                              "%s %02u %02u:%02u:%02u.%3.*u: vmx| USBIO: %s dev=%u endpt=%x datalen=%u numPackets=%u status=%u 0\n",
                              s_apszMonths[Time.u8Month - 1], Time.u8MonthDay, Time.u8Hour, Time.u8Minute, Time.u8Second, 3, Time.u32Nanosecond,
                              pszEvt, pUrb->DstAddress, pUrb->EndPt | (pUrb->enmDir == VUSBDIRECTION_IN ? 0x80 : 0x00),
                              pUrb->cbData, cIsocPkts, pUrb->enmStatus);
-    int rc = pThis->pStrm->pfnWrite(pThis->pStrm, &aszLineBuf[0], cch);
+    int rc = pThis->pStrm->pfnWrite(pThis->pStrm, &szLineBuf[0], cch);
     if (RT_SUCCESS(rc))
     {
         /* Log the data in the appropriate stage. */
diff --git a/src/VBox/Devices/USB/VUSBUrb.cpp b/src/VBox/Devices/USB/VUSBUrb.cpp
index 35d7e59..0d57e35 100644
--- a/src/VBox/Devices/USB/VUSBUrb.cpp
+++ b/src/VBox/Devices/USB/VUSBUrb.cpp
@@ -745,8 +745,10 @@ static bool vusbMsgSetup(PVUSBPIPE pPipe, const void *pvBuf, uint32_t cbBuf)
  *
  * @param   pUrb        The URB to submit.
  */
-static void vusbMsgDoTransfer(PVUSBURB pUrb, PVUSBSETUP pSetup, PVUSBCTRLEXTRA pExtra, PVUSBPIPE pPipe, PVUSBDEV pDev)
+static void vusbMsgDoTransfer(PVUSBURB pUrb, PVUSBSETUP pSetup, PVUSBCTRLEXTRA pExtra, PVUSBPIPE pPipe)
 {
+    RT_NOREF(pPipe);
+
     /*
      * Mark this transfer as sent (cleared at setup time).
      */
@@ -903,7 +905,7 @@ static int vusbUrbSubmitCtrl(PVUSBURB pUrb)
 
             /* pre-buffer our output if it's device-to-host */
             if (pSetup->bmRequestType & VUSB_DIR_TO_HOST)
-                vusbMsgDoTransfer(pUrb, pSetup, pExtra, pPipe, pDev);
+                vusbMsgDoTransfer(pUrb, pSetup, pExtra, pPipe);
             else if (pSetup->wLength)
             {
                 LogFlow(("%s: vusbUrbSubmitCtrl: stage=SETUP - to dev: need data\n", pUrb->pszDesc));
@@ -918,7 +920,7 @@ static int vusbUrbSubmitCtrl(PVUSBURB pUrb)
             else
             {
                 LogFlow(("%s: vusbUrbSubmitCtrl: stage=SETUP - to dev: sending\n", pUrb->pszDesc));
-                vusbMsgDoTransfer(pUrb, pSetup, pExtra, pPipe, pDev);
+                vusbMsgDoTransfer(pUrb, pSetup, pExtra, pPipe);
             }
             break;
 
@@ -991,7 +993,7 @@ static int vusbUrbSubmitCtrl(PVUSBURB pUrb)
                     &&  pExtra->pbCur - pbData >= pSetup->wLength)
                 {
                     LogFlow(("%s: vusbUrbSubmitCtrl: stage=DATA - to dev: sending\n", pUrb->pszDesc));
-                    vusbMsgDoTransfer(pUrb, pSetup, pExtra, pPipe, pDev);
+                    vusbMsgDoTransfer(pUrb, pSetup, pExtra, pPipe);
                     break;
                 }
             }
@@ -1014,7 +1016,7 @@ static int vusbUrbSubmitCtrl(PVUSBURB pUrb)
             else
             {
                 LogFlow(("%s: vusbUrbSubmitCtrl: stage=STATUS - to dev: sending\n", pUrb->pszDesc));
-                vusbMsgDoTransfer(pUrb, pSetup, pExtra, pPipe, pDev);
+                vusbMsgDoTransfer(pUrb, pSetup, pExtra, pPipe);
             }
             break;
     }
@@ -1248,9 +1250,7 @@ void vusbUrbDoReapAsync(PRTLISTANCHOR pUrbLst, RTMSINTERVAL cMillies)
     PVUSBURBVUSB pVUsbUrb = RTListGetFirst(pUrbLst, VUSBURBVUSBINT, NdLst);
     while (pVUsbUrb)
     {
-        PVUSBURB pUrb = pVUsbUrb->pUrb;
-
-        vusbUrbAssert(pUrb);
+        vusbUrbAssert(pVUsbUrb->pUrb);
         PVUSBURBVUSB pVUsbUrbNext = RTListGetNext(pUrbLst, pVUsbUrb, VUSBURBVUSBINT, NdLst);
         PVUSBDEV pDev = pVUsbUrb->pDev;
 
diff --git a/src/VBox/Devices/USB/VUSBUrbPool.cpp b/src/VBox/Devices/USB/VUSBUrbPool.cpp
index 802fe4f..555f8fe 100644
--- a/src/VBox/Devices/USB/VUSBUrbPool.cpp
+++ b/src/VBox/Devices/USB/VUSBUrbPool.cpp
@@ -27,6 +27,7 @@
 
 #include "VUSBInternal.h"
 
+
 /*********************************************************************************************************************************
 *   Defined Constants And Macros                                                                                                 *
 *********************************************************************************************************************************/
@@ -37,6 +38,7 @@
 /** Convert from an URB to the URB header. */
 #define VUSBURBPOOL_URB_2_URBHDR(a_pUrb) RT_FROM_MEMBER(a_pUrb, VUSBURBHDR, Urb);
 
+
 /*********************************************************************************************************************************
 *   Structures and Typedefs                                                                                                      *
 *********************************************************************************************************************************/
@@ -66,10 +68,12 @@ typedef VUSBURBHDR *PVUSBURBHDR;
 
 AssertCompileSizeAlignment(VUSBURBHDR, 8);
 
+
 /*********************************************************************************************************************************
 *   Static Variables                                                                                                             *
 *********************************************************************************************************************************/
 
+
 /*********************************************************************************************************************************
 *   Internal Functions                                                                                                           *
 *********************************************************************************************************************************/
@@ -113,6 +117,9 @@ DECLHIDDEN(PVUSBURB) vusbUrbPoolAlloc(PVUSBURBPOOL pUrbPool, VUSBXFERTYPE enmTyp
                                       VUSBDIRECTION enmDir, size_t cbData, size_t cbHci,
                                       size_t cbHciTd, unsigned cTds)
 {
+    Assert((uint32_t)cbData == cbData);
+    Assert((uint32_t)cbHci == cbHci);
+
     /*
      * Reuse or allocate a new URB.
      */
@@ -183,7 +190,7 @@ DECLHIDDEN(PVUSBURB) vusbUrbPoolAlloc(PVUSBURBPOOL pUrbPool, VUSBXFERTYPE enmTyp
     /*
      * (Re)init the URB
      */
-    uint32_t offAlloc = cbData;
+    uint32_t offAlloc = (uint32_t)cbData;
     PVUSBURB pUrb = &pHdr->Urb;
     pUrb->u32Magic               = VUSBURB_MAGIC;
     pUrb->enmState               = VUSBURBSTATE_ALLOCATED;
@@ -199,14 +206,14 @@ DECLHIDDEN(PVUSBURB) vusbUrbPoolAlloc(PVUSBURBPOOL pUrbPool, VUSBXFERTYPE enmTyp
     pUrb->pVUsb->pvBuffered      = NULL;
     pUrb->Dev.pvPrivate          = NULL;
     pUrb->Dev.pNext              = NULL;
-    pUrb->EndPt                  = ~0;
+    pUrb->EndPt                  = UINT8_MAX;
     pUrb->enmType                = enmType;
     pUrb->enmDir                 = enmDir;
     pUrb->fShortNotOk            = false;
     pUrb->enmStatus              = VUSBSTATUS_INVALID;
-    pUrb->cbData                 = cbData;
+    pUrb->cbData                 = (uint32_t)cbData;
     pUrb->pHci                   = cbHci ? (PVUSBURBHCI)&pUrb->abData[offAlloc] : NULL;
-    offAlloc += cbHci;
+    offAlloc += (uint32_t)cbHci;
     pUrb->paTds                  = (cbHciTd && cTds) ? (PVUSBURBHCITD)&pUrb->abData[offAlloc] : NULL;
 
     return pUrb;
diff --git a/src/VBox/Devices/USB/VUSBUrbTrace.cpp b/src/VBox/Devices/USB/VUSBUrbTrace.cpp
index 622b52c..68dfe3a 100644
--- a/src/VBox/Devices/USB/VUSBUrbTrace.cpp
+++ b/src/VBox/Devices/USB/VUSBUrbTrace.cpp
@@ -36,16 +36,6 @@
 
 
 
-/*********************************************************************************************************************************
-*   Global Variables                                                                                                             *
-*********************************************************************************************************************************/
-
-/*********************************************************************************************************************************
-*   Internal Functions                                                                                                           *
-*********************************************************************************************************************************/
-static PVUSBCTRLEXTRA vusbMsgAllocExtraData(PVUSBURB pUrb);
-
-
 #ifdef LOG_ENABLED
 DECLINLINE(const char *) GetScsiErrCd(uint8_t ScsiErr)
 {
diff --git a/src/VBox/Devices/USB/darwin/USBProxyDevice-darwin.cpp b/src/VBox/Devices/USB/darwin/USBProxyDevice-darwin.cpp
index 63d6bfb..1b337e2 100644
--- a/src/VBox/Devices/USB/darwin/USBProxyDevice-darwin.cpp
+++ b/src/VBox/Devices/USB/darwin/USBProxyDevice-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -263,7 +263,7 @@ static RTONCE       g_usbProxyDarwinOnce = RTONCE_INITIALIZER;
 static CFStringRef g_pRunLoopMode = NULL;
 /** The IO Master Port.
  * Not worth cleaning up.  */
-static mach_port_t  g_MasterPort = NULL;
+static mach_port_t  g_MasterPort = MACH_PORT_NULL;
 
 
 /**
@@ -272,10 +272,11 @@ static mach_port_t  g_MasterPort = NULL;
  * @returns IPRT status code.
  *
  * @param   pvUser1     NULL, ignored.
- * @param   pvUser2     NULL, ignored.
  */
 static DECLCALLBACK(int32_t) usbProxyDarwinInitOnce(void *pvUser1)
 {
+    RT_NOREF(pvUser1);
+
     int rc;
     kern_return_t krc = IOMasterPort(MACH_PORT_NULL, &g_MasterPort);
     if (krc == KERN_SUCCESS)
@@ -817,7 +818,7 @@ static int usbProxyDarwinSeizeAllInterfaces(PUSBPROXYDEVOSX pDevOsX, bool fMakeT
     /*
      * Create a interface enumerator for all the interface (current config).
      */
-    io_iterator_t Interfaces = NULL;
+    io_iterator_t Interfaces = IO_OBJECT_NULL;
     IOUSBFindInterfaceRequest Req;
     Req.bInterfaceClass    = kIOUSBFindInterfaceDontCare;
     Req.bInterfaceSubClass = kIOUSBFindInterfaceDontCare;
@@ -843,7 +844,7 @@ static int usbProxyDarwinSeizeAllInterfaces(PUSBPROXYDEVOSX pDevOsX, bool fMakeT
             krc = IOCreatePlugInInterfaceForService(Interface, kIOUSBInterfaceUserClientTypeID,
                                                     kIOCFPlugInInterfaceID, &ppPlugInInterface, &Score);
             IOObjectRelease(Interface);
-            Interface = NULL;
+            Interface = IO_OBJECT_NULL;
             if (krc == KERN_SUCCESS)
             {
                 IOUSBInterfaceInterface245 **ppIfI;
@@ -1079,6 +1080,7 @@ static bool usbProxyDarwinDictGetU64(CFMutableDictionaryRef DictRef, CFStringRef
 
 static DECLCALLBACK(void) usbProxyDarwinPerformWakeup(void *pInfo)
 {
+    RT_NOREF(pInfo);
     return;
 }
 
@@ -1098,13 +1100,13 @@ static DECLCALLBACK(void) usbProxyDarwinPerformWakeup(void *pInfo)
  */
 static DECLCALLBACK(int) usbProxyDarwinOpen(PUSBPROXYDEV pProxyDev, const char *pszAddress, void *pvBackend)
 {
-    int vrc;
+    RT_NOREF(pvBackend);
     LogFlow(("usbProxyDarwinOpen: pProxyDev=%p pszAddress=%s\n", pProxyDev, pszAddress));
 
     /*
      * Init globals once.
      */
-    vrc = RTOnce(&g_usbProxyDarwinOnce, usbProxyDarwinInitOnce, NULL);
+    int vrc = RTOnce(&g_usbProxyDarwinOnce, usbProxyDarwinInitOnce, NULL);
     AssertRCReturn(vrc, vrc);
 
     PUSBPROXYDEVOSX pDevOsX = USBPROXYDEV_2_DATA(pProxyDev, PUSBPROXYDEVOSX);
@@ -1121,7 +1123,7 @@ static DECLCALLBACK(int) usbProxyDarwinOpen(PUSBPROXYDEV pProxyDev, const char *
      * this subject further right now. Maybe check this later.
      */
     CFMutableDictionaryRef RefMatchingDict = IOServiceMatching(kIOUSBDeviceClassName);
-    AssertReturn(RefMatchingDict, NULL);
+    AssertReturn(RefMatchingDict != IO_OBJECT_NULL, VERR_OPEN_FAILED);
 
     uint64_t u64SessionId = 0;
     uint32_t u32LocationId = 0;
@@ -1161,9 +1163,9 @@ static DECLCALLBACK(int) usbProxyDarwinOpen(PUSBPROXYDEV pProxyDev, const char *
             psz++;
     } while (*psz);
 
-    io_iterator_t USBDevices = NULL;
+    io_iterator_t USBDevices = IO_OBJECT_NULL;
     IOReturn irc = IOServiceGetMatchingServices(g_MasterPort, RefMatchingDict, &USBDevices);
-    AssertMsgReturn(irc == kIOReturnSuccess, ("irc=%#x\n", irc), NULL);
+    AssertMsgReturn(irc == kIOReturnSuccess, ("irc=%#x\n", irc), RTErrConvertFromDarwinIO(irc));
     RefMatchingDict = NULL; /* the reference is consumed by IOServiceGetMatchingServices. */
 
     unsigned cMatches = 0;
@@ -1193,7 +1195,7 @@ static DECLCALLBACK(int) usbProxyDarwinOpen(PUSBPROXYDEV pProxyDev, const char *
         IOObjectRelease(USBDevice);
     }
     IOObjectRelease(USBDevices);
-    USBDevices = NULL;
+    USBDevices = IO_OBJECT_NULL;
     if (!USBDevice)
     {
         LogRel(("USB: Device '%s' not found (%d pid+vid matches)\n", pszAddress, cMatches));
@@ -1403,7 +1405,7 @@ static DECLCALLBACK(void) usbProxyDarwinClose(PUSBPROXYDEV pProxyDev)
     (*pDevOsX->ppDevI)->Release(pDevOsX->ppDevI);
     pDevOsX->ppDevI = NULL;
     kern_return_t krc = IOObjectRelease(pDevOsX->USBDevice); Assert(krc == KERN_SUCCESS); NOREF(krc);
-    pDevOsX->USBDevice = NULL;
+    pDevOsX->USBDevice = IO_OBJECT_NULL;
     pDevOsX->pProxyDev = NULL;
 
     /*
@@ -1431,6 +1433,7 @@ static DECLCALLBACK(void) usbProxyDarwinClose(PUSBPROXYDEV pProxyDev)
  */
 static DECLCALLBACK(int) usbProxyDarwinReset(PUSBPROXYDEV pProxyDev, bool fResetOnLinux)
 {
+    RT_NOREF(fResetOnLinux);
     PUSBPROXYDEVOSX pDevOsX = USBPROXYDEV_2_DATA(pProxyDev, PUSBPROXYDEVOSX);
     LogFlow(("usbProxyDarwinReset: pProxyDev=%s\n", pProxyDev->pUsbIns->pszName));
 
@@ -1496,6 +1499,7 @@ static DECLCALLBACK(int) usbProxyDarwinSetConfig(PUSBPROXYDEV pProxyDev, int iCf
  */
 static DECLCALLBACK(int) usbProxyDarwinClaimInterface(PUSBPROXYDEV pProxyDev, int iIf)
 {
+    RT_NOREF(pProxyDev, iIf);
     return VINF_SUCCESS;
 }
 
@@ -1510,6 +1514,7 @@ static DECLCALLBACK(int) usbProxyDarwinClaimInterface(PUSBPROXYDEV pProxyDev, in
  */
 static DECLCALLBACK(int) usbProxyDarwinReleaseInterface(PUSBPROXYDEV pProxyDev, int iIf)
 {
+    RT_NOREF(pProxyDev, iIf);
     return VINF_SUCCESS;
 }
 
@@ -1601,7 +1606,7 @@ static DECLCALLBACK(int) usbProxyDarwinClearHaltedEp(PUSBPROXYDEV pProxyDev, uns
 
 
 /**
- * @copydoc USBPROXYBACK::pfnUrbQueue
+ * @interface_method_impl{USBPROXYBACK,pfnUrbQueue}
  */
 static DECLCALLBACK(int) usbProxyDarwinUrbQueue(PUSBPROXYDEV pProxyDev, PVUSBURB pUrb)
 {
diff --git a/src/VBox/Devices/USB/freebsd/USBProxyDevice-freebsd.cpp b/src/VBox/Devices/USB/freebsd/USBProxyDevice-freebsd.cpp
index e639d34..729adc7 100644
--- a/src/VBox/Devices/USB/freebsd/USBProxyDevice-freebsd.cpp
+++ b/src/VBox/Devices/USB/freebsd/USBProxyDevice-freebsd.cpp
@@ -6,7 +6,7 @@
 /*
  * Includes contributions from Hans Petter Selasky
  *
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -685,7 +685,7 @@ static DECLCALLBACK(int) usbProxyFreeBSDClearHaltedEp(PUSBPROXYDEV pProxyDev, un
 }
 
 /**
- * @copydoc USBPROXYBACK::pfnUrbQueue
+ * @interface_method_impl{USBPROXYBACK,pfnUrbQueue}
  */
 static DECLCALLBACK(int) usbProxyFreeBSDUrbQueue(PUSBPROXYDEV pProxyDev, PVUSBURB pUrb)
 {
diff --git a/src/VBox/Devices/USB/linux/USBProxyDevice-linux.cpp b/src/VBox/Devices/USB/linux/USBProxyDevice-linux.cpp
index e171844..cefa376 100644
--- a/src/VBox/Devices/USB/linux/USBProxyDevice-linux.cpp
+++ b/src/VBox/Devices/USB/linux/USBProxyDevice-linux.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -415,6 +415,8 @@ static void usbProxyLinuxUrbFreeSplitList(PUSBPROXYDEV pProxyDev, PUSBPROXYURBLN
  */
 static int usbProxyLinuxFindActiveConfigUsbfs(PUSBPROXYDEV pProxyDev, const char *pszDevNode, int *piFirstCfg)
 {
+    RT_NOREF(pProxyDev);
+
     /*
      * Set return defaults.
      */
@@ -1277,7 +1279,7 @@ static void usbProxyLinuxCleanupFailedSubmit(PUSBPROXYDEV pProxyDev, PUSBPROXYUR
  */
 static int usbProxyLinuxSubmitURB(PUSBPROXYDEV pProxyDev, PUSBPROXYURBLNX pCur, PVUSBURB pUrb, bool *pfUnplugged)
 {
-    int rc = VINF_SUCCESS;
+    RT_NOREF(pUrb);
     PUSBPROXYDEVLNX pDevLnx = USBPROXYDEV_2_DATA(pProxyDev, PUSBPROXYDEVLNX);
     unsigned        cTries = 0;
 
@@ -1376,7 +1378,7 @@ static int usbProxyLinuxUrbQueueSplit(PUSBPROXYDEV pProxyDev, PUSBPROXYURBLNX pU
         case VUSBXFERTYPE_ISOC:
             AssertMsgFailed(("We can't split isochronous URBs!\n"));
             usbProxyLinuxUrbFree(pProxyDev, pUrbLnx);
-            return VERR_INVALID_PARAMETER; /** @todo: Better status code. */
+            return VERR_INVALID_PARAMETER; /** @todo Better status code. */
     }
     pUrbLnx->KUrb.endpoint          = pUrb->EndPt;
     if (pUrb->enmDir == VUSBDIRECTION_IN)
@@ -1448,7 +1450,7 @@ static int usbProxyLinuxUrbQueueSplit(PUSBPROXYDEV pProxyDev, PUSBPROXYURBLNX pU
 
 
 /**
- * @copydoc USBPROXYBACK::pfnUrbQueue
+ * @interface_method_impl{USBPROXYBACK,pfnUrbQueue}
  */
 static DECLCALLBACK(int) usbProxyLinuxUrbQueue(PUSBPROXYDEV pProxyDev, PVUSBURB pUrb)
 {
@@ -1501,16 +1503,23 @@ static DECLCALLBACK(int) usbProxyLinuxUrbQueue(PUSBPROXYDEV pProxyDev, PVUSBURB
             unsigned i;
             for (i = 0; i < pUrb->cIsocPkts; i++)
             {
+#if RT_GNUC_PREREQ(4, 6)
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Warray-bounds"
+#endif
                 pUrbLnx->KUrb.iso_frame_desc[i].length = pUrb->aIsocPkts[i].cb;
                 pUrbLnx->KUrb.iso_frame_desc[i].actual_length = 0;
                 pUrbLnx->KUrb.iso_frame_desc[i].status = 0x7fff;
+#if RT_GNUC_PREREQ(4, 6)
+# pragma GCC diagnostic pop
+#endif
             }
             break;
         case VUSBXFERTYPE_INTR:
             pUrbLnx->KUrb.type = USBDEVFS_URB_TYPE_INTERRUPT;
             break;
         default:
-            rc = VERR_INVALID_PARAMETER; /** @todo: better status code. */
+            rc = VERR_INVALID_PARAMETER; /** @todo better status code. */
     }
 
     /*
@@ -1820,10 +1829,17 @@ static DECLCALLBACK(PVUSBURB) usbProxyLinuxUrbReap(PUSBPROXYDEV pProxyDev, RTMSI
                 unsigned i, off;
                 for (i = 0, off = 0; i < pUrb->cIsocPkts; i++)
                 {
+#if RT_GNUC_PREREQ(4, 6)
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Warray-bounds"
+#endif
                     pUrb->aIsocPkts[i].enmStatus = vusbProxyLinuxStatusToVUsbStatus(pUrbLnx->KUrb.iso_frame_desc[i].status);
                     Assert(pUrb->aIsocPkts[i].off == off);
                     pUrb->aIsocPkts[i].cb = pUrbLnx->KUrb.iso_frame_desc[i].actual_length;
                     off += pUrbLnx->KUrb.iso_frame_desc[i].length;
+#if RT_GNUC_PREREQ(4, 6)
+# pragma GCC diagnostic pop
+#endif
                 }
             }
             usbProxyLinuxUrbUnlinkInFlight(pDevLnx, pUrbLnx);
@@ -1872,7 +1888,7 @@ static DECLCALLBACK(int) usbProxyLinuxUrbCancel(PUSBPROXYDEV pProxyDev, PVUSBURB
                 continue;
             if (errno == ENODEV)
                 break;
-            /** @todo: Think about how to handle errors wrt. to the status code. */
+            /** @todo Think about how to handle errors wrt. to the status code. */
             Log(("usb-linux: Discard URB %p failed, errno=%d. pProxyDev=%s!!! (split)\n",
                  pUrb, errno, usbProxyGetName(pProxyDev)));
         }
diff --git a/src/VBox/Devices/USB/os2/USBProxyDevice-os2.cpp b/src/VBox/Devices/USB/os2/USBProxyDevice-os2.cpp
index 898a9a5..ad7a9e2 100644
--- a/src/VBox/Devices/USB/os2/USBProxyDevice-os2.cpp
+++ b/src/VBox/Devices/USB/os2/USBProxyDevice-os2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -700,7 +700,7 @@ static bool usbProxyOs2ClearHaltedEp(PUSBPROXYDEV pProxyDev, unsigned int EndPt)
 
 
 /**
- * @copydoc USBPROXYBACK::pfnUrbQueue
+ * @interface_method_impl{USBPROXYBACK,pfnUrbQueue}
  */
 static int usbProxyOs2UrbQueue(PVUSBURB pUrb)
 {
@@ -728,7 +728,7 @@ static int usbProxyOs2UrbQueue(PVUSBURB pUrb)
             break;
         case VUSBXFERTYPE_BULK:
             break;
-///@todo        case VUSBXFERTYPE_INTR:
+/// @todo        case VUSBXFERTYPE_INTR:
 //            break;
 //        case VUSBXFERTYPE_ISOC:
 //            break;
diff --git a/src/VBox/Devices/USB/solaris/USBProxyDevice-solaris.cpp b/src/VBox/Devices/USB/solaris/USBProxyDevice-solaris.cpp
index b4a79aa..abbf473 100644
--- a/src/VBox/Devices/USB/solaris/USBProxyDevice-solaris.cpp
+++ b/src/VBox/Devices/USB/solaris/USBProxyDevice-solaris.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -574,7 +574,7 @@ static DECLCALLBACK(int) usbProxySolarisClearHaltedEp(PUSBPROXYDEV pProxyDev, un
 
 
 /**
- * @copydoc USBPROXYBACK::pfnUrbQueue
+ * @interface_method_impl{USBPROXYBACK,pfnUrbQueue}
  */
 static DECLCALLBACK(int) usbProxySolarisUrbQueue(PUSBPROXYDEV pProxyDev, PVUSBURB pUrb)
 {
diff --git a/src/VBox/Devices/USB/testcase/tstOhciRegisterAccess.cpp b/src/VBox/Devices/USB/testcase/tstOhciRegisterAccess.cpp
index f345d1e..0be3a09 100644
--- a/src/VBox/Devices/USB/testcase/tstOhciRegisterAccess.cpp
+++ b/src/VBox/Devices/USB/testcase/tstOhciRegisterAccess.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/USB/testcase/tstPalmOne.c b/src/VBox/Devices/USB/testcase/tstPalmOne.c
index cac2931..3a40bb2 100644
--- a/src/VBox/Devices/USB/testcase/tstPalmOne.c
+++ b/src/VBox/Devices/USB/testcase/tstPalmOne.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/USB/testcase/tstTrekStorGo.c b/src/VBox/Devices/USB/testcase/tstTrekStorGo.c
index 2ea27f2..db28bf9 100644
--- a/src/VBox/Devices/USB/testcase/tstTrekStorGo.c
+++ b/src/VBox/Devices/USB/testcase/tstTrekStorGo.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/USB/usbip/USBProxyDevice-usbip.cpp b/src/VBox/Devices/USB/usbip/USBProxyDevice-usbip.cpp
index fd794e3..619ed03 100644
--- a/src/VBox/Devices/USB/usbip/USBProxyDevice-usbip.cpp
+++ b/src/VBox/Devices/USB/usbip/USBProxyDevice-usbip.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -589,9 +589,7 @@ DECLINLINE(int) usbProxyUsbIpStatusConvertFromStatus(int32_t i32Status)
             LogFlowFunc(("i32Status=%d\n", i32Status));
             return VERR_INVALID_STATE;
     }
-
-    LogFlowFunc(("i32Status=%d\n", i32Status));
-    return VERR_INVALID_STATE;
+    /* not reached */
 }
 
 /**
@@ -613,8 +611,7 @@ DECLINLINE(VUSBSTATUS) usbProxyUsbIpVUsbStatusConvertFromStatus(int32_t i32Statu
         default:
             return VUSBSTATUS_DNR;
     }
-
-    return VUSBSTATUS_DNR;
+    /* not reached */
 }
 
 /**
@@ -887,7 +884,7 @@ static int usbProxyUsbIpCtrlUrbExchangeSync(PUSBPROXYDEVUSBIP pProxyDevUsbIp, PV
         if (RT_SUCCESS(rc))
         {
             /* Wait for the response. */
-            /** @todo: Don't wait indefinitely long. */
+            /** @todo Don't wait indefinitely long. */
             UsbIpRetSubmit RetSubmit;
             rc = RTTcpRead(pProxyDevUsbIp->hSocket, &RetSubmit, sizeof(RetSubmit), NULL);
             if (RT_SUCCESS(rc))
@@ -1031,7 +1028,7 @@ static int usbProxyUsbIpRecvPdu(PUSBPROXYDEVUSBIP pProxyDevUsbIp, PUSBPROXYURBUS
                 }
                 case USBPROXYUSBIPRECVSTATE_HDR_RESIDUAL:
                 {
-                    /** @todo: Verify that the directions match, verify that the length doesn't exceed the buffer. */
+                    /** @todo Verify that the directions match, verify that the length doesn't exceed the buffer. */
 
                     switch (RT_N2H_U32(pProxyDevUsbIp->BufRet.Hdr.u32ReqRet))
                     {
@@ -1130,7 +1127,7 @@ static int usbProxyUsbIpRecvPdu(PUSBPROXYDEVUSBIP pProxyDevUsbIp, PUSBPROXYURBUS
     }
     else
     {
-        /** @todo: Complete all URBs with DNR error and mark device as unplugged. */
+        /** @todo Complete all URBs with DNR error and mark device as unplugged. */
 #if 0
         pUrbUsbIp = pProxyDevUsbIp->pUrbUsbIp;
         pUrbUsbIp->pVUsbUrb->enmStatus = VUSBSTATUS_DNR;
@@ -1234,7 +1231,7 @@ static int usbProxyUsbIpUrbQueueWorker(PUSBPROXYDEVUSBIP pProxyDevUsbIp, PUSBPRO
             break;
         default:
             usbProxyUsbIpUrbFree(pProxyDevUsbIp, pUrbUsbIp);
-            return VERR_INVALID_PARAMETER; /** @todo: better status code. */
+            return VERR_INVALID_PARAMETER; /** @todo better status code. */
     }
 
     usbProxyUsbIpReqSubmitH2N(&ReqSubmit);
@@ -1279,7 +1276,7 @@ static int usbProxyUsbIpUrbsQueuePending(PUSBPROXYDEVUSBIP pProxyDevUsbIp)
         rc = usbProxyUsbIpUrbQueueWorker(pProxyDevUsbIp, pIter);
         if (RT_FAILURE(rc))
         {
-            /** @todo:  Complete the URB with an error. */
+            /** @todo  Complete the URB with an error. */
             usbProxyUsbIpUrbFree(pProxyDevUsbIp, pIter);
         }
     }
@@ -1315,9 +1312,8 @@ static char usbProxyUsbIpWakeupPipeDrain(PUSBPROXYDEVUSBIP pProxyDevUsbIp)
 {
     char bRead = 0;
     size_t cbRead = 0;
-
     int rc = RTPipeRead(pProxyDevUsbIp->hPipeR, &bRead, 1, &cbRead);
-    Assert(RT_SUCCESS(rc) && cbRead == 1);
+    Assert(RT_SUCCESS(rc) && cbRead == 1); NOREF(rc);
 
     return bRead;
 }
@@ -1326,8 +1322,12 @@ static char usbProxyUsbIpWakeupPipeDrain(PUSBPROXYDEVUSBIP pProxyDevUsbIp)
  * The USB proxy device functions.
  */
 
+/**
+ * @interface_method_impl{USBPROXYBACK,pfnOpen}
+ */
 static DECLCALLBACK(int) usbProxyUsbIpOpen(PUSBPROXYDEV pProxyDev, const char *pszAddress, void *pvBackend)
 {
+    RT_NOREF(pvBackend);
     LogFlowFunc(("pProxyDev=%p pszAddress=%s, pvBackend=%p\n", pProxyDev, pszAddress, pvBackend));
 
     PUSBPROXYDEVUSBIP pDevUsbIp = USBPROXYDEV_2_DATA(pProxyDev, PUSBPROXYDEVUSBIP);
@@ -1386,6 +1386,10 @@ static DECLCALLBACK(int) usbProxyUsbIpOpen(PUSBPROXYDEV pProxyDev, const char *p
     return rc;
 }
 
+
+/**
+ * @interface_method_impl{USBPROXYBACK,pfnClose}
+ */
 static DECLCALLBACK(void) usbProxyUsbIpClose(PUSBPROXYDEV pProxyDev)
 {
     int rc = VINF_SUCCESS;
@@ -1437,6 +1441,10 @@ static DECLCALLBACK(void) usbProxyUsbIpClose(PUSBPROXYDEV pProxyDev)
     RTSemFastMutexDestroy(pDevUsbIp->hMtxLists);
 }
 
+
+/**
+ * @interface_method_impl{USBPROXYBACK,pfnReset}
+ */
 static DECLCALLBACK(int) usbProxyUsbIpReset(PUSBPROXYDEV pProxyDev, bool fResetOnLinux)
 {
     LogFlowFunc(("pProxyDev = %p\n", pProxyDev));
@@ -1463,6 +1471,10 @@ static DECLCALLBACK(int) usbProxyUsbIpReset(PUSBPROXYDEV pProxyDev, bool fResetO
     return rc;
 }
 
+
+/**
+ * @interface_method_impl{USBPROXYBACK,pfnSetConfig}
+ */
 static DECLCALLBACK(int) usbProxyUsbIpSetConfig(PUSBPROXYDEV pProxyDev, int iCfg)
 {
     LogFlowFunc(("pProxyDev=%s cfg=%#x\n", pProxyDev->pUsbIns->pszName, iCfg));
@@ -1478,21 +1490,35 @@ static DECLCALLBACK(int) usbProxyUsbIpSetConfig(PUSBPROXYDEV pProxyDev, int iCfg
     return usbProxyUsbIpCtrlUrbExchangeSync(pProxyDevUsbIp, &Setup);
 }
 
-static DECLCALLBACK(int) usbProxyUsbIpClaimInterface(PUSBPROXYDEV pProxyDev, int ifnum)
+
+/**
+ * @interface_method_impl{USBPROXYBACK,pfnClaimInterface}
+ */
+static DECLCALLBACK(int) usbProxyUsbIpClaimInterface(PUSBPROXYDEV pProxyDev, int iIf)
 {
-    LogFlowFunc(("pProxyDev=%s ifnum=%#x\n", pProxyDev->pUsbIns->pszName, ifnum));
+    RT_NOREF(pProxyDev, iIf);
+    LogFlowFunc(("pProxyDev=%s iIf=%#x\n", pProxyDev->pUsbIns->pszName, iIf));
     return VINF_SUCCESS;
 }
 
-static DECLCALLBACK(int) usbProxyUsbIpReleaseInterface(PUSBPROXYDEV pProxyDev, int ifnum)
+
+/**
+ * @interface_method_impl{USBPROXYBACK,pfnReleaseInterface}
+ */
+static DECLCALLBACK(int) usbProxyUsbIpReleaseInterface(PUSBPROXYDEV pProxyDev, int iIf)
 {
-    LogFlowFunc(("pProxyDev=%s ifnum=%#x\n", pProxyDev->pUsbIns->pszName, ifnum));
+    RT_NOREF(pProxyDev, iIf);
+    LogFlowFunc(("pProxyDev=%s iIf=%#x\n", pProxyDev->pUsbIns->pszName, iIf));
     return VINF_SUCCESS;
 }
 
-static DECLCALLBACK(int) usbProxyUsbIpSetInterface(PUSBPROXYDEV pProxyDev, int ifnum, int setting)
+
+/**
+ * @interface_method_impl{USBPROXYBACK,pfnSetInterface}
+ */
+static DECLCALLBACK(int) usbProxyUsbIpSetInterface(PUSBPROXYDEV pProxyDev, int iIf, int setting)
 {
-    LogFlowFunc(("pProxyDev=%p ifnum=%#x setting=%#x\n", pProxyDev, ifnum, setting));
+    LogFlowFunc(("pProxyDev=%p iIf=%#x setting=%#x\n", pProxyDev, iIf, setting));
 
     PUSBPROXYDEVUSBIP pProxyDevUsbIp = USBPROXYDEV_2_DATA(pProxyDev, PUSBPROXYDEVUSBIP);
     VUSBSETUP Setup;
@@ -1500,11 +1526,15 @@ static DECLCALLBACK(int) usbProxyUsbIpSetInterface(PUSBPROXYDEV pProxyDev, int i
     Setup.bmRequestType = 0x1;
     Setup.bRequest      = 0x0b; /* SET_INTERFACE */
     Setup.wValue        = setting;
-    Setup.wIndex        = ifnum;
+    Setup.wIndex        = iIf;
     Setup.wLength       = 0;
     return usbProxyUsbIpCtrlUrbExchangeSync(pProxyDevUsbIp, &Setup);
 }
 
+
+/**
+ * @interface_method_impl{USBPROXYBACK,pfnClearHaltedEndpoint}
+ */
 static DECLCALLBACK(int) usbProxyUsbIpClearHaltedEp(PUSBPROXYDEV pProxyDev, unsigned int iEp)
 {
     LogFlowFunc(("pProxyDev=%s ep=%u\n", pProxyDev->pUsbIns->pszName, iEp));
@@ -1520,6 +1550,10 @@ static DECLCALLBACK(int) usbProxyUsbIpClearHaltedEp(PUSBPROXYDEV pProxyDev, unsi
     return usbProxyUsbIpCtrlUrbExchangeSync(pProxyDevUsbIp, &Setup);
 }
 
+
+/**
+ * @interface_method_impl{USBPROXYBACK,pfnUrbQueue}
+ */
 static DECLCALLBACK(int) usbProxyUsbIpUrbQueue(PUSBPROXYDEV pProxyDev, PVUSBURB pUrb)
 {
     LogFlowFunc(("pUrb=%p\n", pUrb));
@@ -1543,6 +1577,10 @@ static DECLCALLBACK(int) usbProxyUsbIpUrbQueue(PUSBPROXYDEV pProxyDev, PVUSBURB
     return usbProxyReaperKick(pProxyDevUsbIp, USBIP_REAPER_WAKEUP_REASON_QUEUE);
 }
 
+
+/**
+ * @interface_method_impl{USBPROXYBACK,pfnUrbReap}
+ */
 static DECLCALLBACK(PVUSBURB) usbProxyUsbIpUrbReap(PUSBPROXYDEV pProxyDev, RTMSINTERVAL cMillies)
 {
     LogFlowFunc(("pProxyDev=%s\n", pProxyDev->pUsbIns->pszName));
@@ -1604,6 +1642,10 @@ static DECLCALLBACK(PVUSBURB) usbProxyUsbIpUrbReap(PUSBPROXYDEV pProxyDev, RTMSI
     return pUrb;
 }
 
+
+/**
+ * @interface_method_impl{USBPROXYBACK,pfnUrbCancel}
+ */
 static DECLCALLBACK(int) usbProxyUsbIpUrbCancel(PUSBPROXYDEV pProxyDev, PVUSBURB pUrb)
 {
     LogFlowFunc(("pUrb=%p\n", pUrb));
@@ -1633,6 +1675,10 @@ static DECLCALLBACK(int) usbProxyUsbIpUrbCancel(PUSBPROXYDEV pProxyDev, PVUSBURB
     return rc;
 }
 
+
+/**
+ * @interface_method_impl{USBPROXYBACK,pfnWakeup}
+ */
 static DECLCALLBACK(int) usbProxyUsbIpWakeup(PUSBPROXYDEV pProxyDev)
 {
     LogFlowFunc(("pProxyDev=%s\n", pProxyDev->pUsbIns->pszName));
@@ -1641,6 +1687,7 @@ static DECLCALLBACK(int) usbProxyUsbIpWakeup(PUSBPROXYDEV pProxyDev)
     return usbProxyReaperKick(pProxyDevUsbIp, USBIP_REAPER_WAKEUP_REASON_EXTERNAL);
 }
 
+
 /**
  * The USB/IP USB Proxy Backend operations.
  */
diff --git a/src/VBox/Devices/USB/vrdp/USBProxyDevice-vrdp.cpp b/src/VBox/Devices/USB/vrdp/USBProxyDevice-vrdp.cpp
index f3d255e..62e23a1 100644
--- a/src/VBox/Devices/USB/vrdp/USBProxyDevice-vrdp.cpp
+++ b/src/VBox/Devices/USB/vrdp/USBProxyDevice-vrdp.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -85,6 +85,7 @@ static DECLCALLBACK(void) usbProxyVrdpClose(PUSBPROXYDEV pProxyDev)
 
 static DECLCALLBACK(int) usbProxyVrdpReset(PUSBPROXYDEV pProxyDev, bool fResetOnLinux)
 {
+    RT_NOREF(fResetOnLinux);
     LogFlow(("usbProxyVrdpReset: pProxyDev = %p\n", pProxyDev));
 
     PUSBPROXYDEVVRDP pDevVrdp = USBPROXYDEV_2_DATA(pProxyDev, PUSBPROXYDEVVRDP);
@@ -248,7 +249,7 @@ static DECLCALLBACK(int) usbProxyVrdpUrbCancel(PUSBPROXYDEV pProxyDev, PVUSBURB
 
     PUSBPROXYDEVVRDP pDevVrdp = USBPROXYDEV_2_DATA(pProxyDev, PUSBPROXYDEVVRDP);
     pDevVrdp->pCallback->pfnCancelURB (pDevVrdp->pDevice, (PREMOTEUSBQURB)pUrb->Dev.pvPrivate);
-    return VINF_SUCCESS; /** @todo: Enhance remote interface to pass a status code. */
+    return VINF_SUCCESS; /** @todo Enhance remote interface to pass a status code. */
 }
 
 static DECLCALLBACK(int) usbProxyVrdpWakeup(PUSBPROXYDEV pProxyDev)
diff --git a/src/VBox/Devices/USB/win/USBProxyDevice-win.cpp b/src/VBox/Devices/USB/win/USBProxyDevice-win.cpp
index f62636d..c4ea895 100644
--- a/src/VBox/Devices/USB/win/USBProxyDevice-win.cpp
+++ b/src/VBox/Devices/USB/win/USBProxyDevice-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -20,7 +20,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #define LOG_GROUP LOG_GROUP_DRV_USBPROXY
-#include <windows.h>
+#include <iprt/win/windows.h>
 
 #include <VBox/vmm/pdm.h>
 #include <VBox/err.h>
@@ -78,7 +78,7 @@ typedef struct
 /*********************************************************************************************************************************
 *   Internal Functions                                                                                                           *
 *********************************************************************************************************************************/
-static int usbProxyWinSetInterface(PUSBPROXYDEV p, int ifnum, int setting);
+static int usbProxyWinSetInterface(PUSBPROXYDEV p, int iIf, int setting);
 
 /**
  * Converts the given Windows error code to VBox handling unplugged devices.
@@ -89,7 +89,9 @@ static int usbProxyWinSetInterface(PUSBPROXYDEV p, int ifnum, int setting);
  */
 static int usbProxyWinHandleUnpluggedDevice(PUSBPROXYDEV pProxyDev, DWORD dwErr)
 {
+#ifdef LOG_ENABLED
     PPRIV_USBW32 pPriv = USBPROXYDEV_2_DATA(pProxyDev, PPRIV_USBW32);
+#endif
 
     if (   dwErr == ERROR_INVALID_HANDLE_STATE
         || dwErr == ERROR_BAD_COMMAND)
@@ -109,6 +111,7 @@ static int usbProxyWinHandleUnpluggedDevice(PUSBPROXYDEV pProxyDev, DWORD dwErr)
  */
 static DECLCALLBACK(int) usbProxyWinOpen(PUSBPROXYDEV pProxyDev, const char *pszAddress, void *pvBackend)
 {
+    RT_NOREF(pvBackend);
     PPRIV_USBW32 pPriv = USBPROXYDEV_2_DATA(pProxyDev, PPRIV_USBW32);
 
     int rc = VINF_SUCCESS;
@@ -139,8 +142,11 @@ static DECLCALLBACK(int) usbProxyWinOpen(PUSBPROXYDEV pProxyDev, const char *psz
             DWORD           cbReturned = 0;
             if (DeviceIoControl(pPriv->hDev, SUPUSB_IOCTL_GET_VERSION, NULL, 0, &version, sizeof(version), &cbReturned, NULL))
             {
-                if (!(    version.u32Major != USBDRV_MAJOR_VERSION
-                      ||  version.u32Minor <  USBDRV_MINOR_VERSION))
+                if (    version.u32Major == USBDRV_MAJOR_VERSION
+#if USBDRV_MINOR_VERSION != 0
+                    &&  version.u32Minor >=  USBDRV_MINOR_VERSION
+#endif
+                   )
                 {
                     USBSUP_CLAIMDEV in;
                     in.bInterfaceNumber = 0;
@@ -244,6 +250,7 @@ static DECLCALLBACK(void) usbProxyWinClose(PUSBPROXYDEV pProxyDev)
 
 static DECLCALLBACK(int) usbProxyWinReset(PUSBPROXYDEV pProxyDev, bool fResetOnLinux)
 {
+    RT_NOREF(fResetOnLinux);
     PPRIV_USBW32 pPriv = USBPROXYDEV_2_DATA(pProxyDev, PPRIV_USBW32);
     DWORD cbReturned;
     int  rc;
@@ -301,7 +308,7 @@ static DECLCALLBACK(int) usbProxyWinSetConfig(PUSBPROXYDEV pProxyDev, int cfg)
     return usbProxyWinHandleUnpluggedDevice(pProxyDev, GetLastError());
 }
 
-static DECLCALLBACK(int) usbProxyWinClaimInterface(PUSBPROXYDEV pProxyDev, int ifnum)
+static DECLCALLBACK(int) usbProxyWinClaimInterface(PUSBPROXYDEV pProxyDev, int iIf)
 {
     /* Called just before we use an interface. Needed on Linux to claim
      * the interface from the OS, since even when proxying the host OS
@@ -310,22 +317,20 @@ static DECLCALLBACK(int) usbProxyWinClaimInterface(PUSBPROXYDEV pProxyDev, int i
      */
     PPRIV_USBW32 pPriv = USBPROXYDEV_2_DATA(pProxyDev, PPRIV_USBW32);
 
-    pPriv->bInterfaceNumber = ifnum;
+    pPriv->bInterfaceNumber = iIf;
 
     Assert(pPriv);
     return VINF_SUCCESS;
 }
 
-static DECLCALLBACK(int) usbProxyWinReleaseInterface(PUSBPROXYDEV pProxyDev, int ifnum)
+static DECLCALLBACK(int) usbProxyWinReleaseInterface(PUSBPROXYDEV pProxyDev, int iIf)
 {
+    RT_NOREF(pProxyDev, iIf);
     /* The opposite of claim_interface. */
-    PPRIV_USBW32 pPriv = USBPROXYDEV_2_DATA(pProxyDev, PPRIV_USBW32);
-
-    Assert(pPriv);
     return VINF_SUCCESS;
 }
 
-static DECLCALLBACK(int) usbProxyWinSetInterface(PUSBPROXYDEV pProxyDev, int ifnum, int setting)
+static DECLCALLBACK(int) usbProxyWinSetInterface(PUSBPROXYDEV pProxyDev, int iIf, int setting)
 {
     /* Select an alternate setting for an interface, the same applies
      * here as for set_config, you may convert this in to a control
@@ -337,8 +342,8 @@ static DECLCALLBACK(int) usbProxyWinSetInterface(PUSBPROXYDEV pProxyDev, int ifn
 
     Assert(pPriv);
 
-    Log(("usbproxy: Select interface of %x to %d/%d\n", pPriv->hDev, ifnum, setting));
-    in.bInterfaceNumber  = ifnum;
+    Log(("usbproxy: Select interface of %x to %d/%d\n", pPriv->hDev, iIf, setting));
+    in.bInterfaceNumber  = iIf;
     in.bAlternateSetting = setting;
 
     /* Here we just need to assert reset signalling on the USB device */
@@ -392,7 +397,7 @@ static int usbProxyWinAbortEndPt(PUSBPROXYDEV pProxyDev, unsigned int ep)
 }
 
 /**
- * @copydoc USBPROXYBACK::pfnUrbQueue
+ * @interface_method_impl{USBPROXYBACK,pfnUrbQueue}
  */
 static DECLCALLBACK(int) usbProxyWinUrbQueue(PUSBPROXYDEV pProxyDev, PVUSBURB pUrb)
 {
@@ -558,7 +563,8 @@ static DECLCALLBACK(PVUSBURB) usbProxyWinUrbReap(PUSBPROXYDEV pProxyDev, RTMSINT
         {
             /* Wait for the wakeup call. */
             DWORD cMilliesWait = cMillies == RT_INDEFINITE_WAIT ? INFINITE : cMillies;
-            DWORD rc = WaitForMultipleObjects(1, &pPriv->hEventWakeup, FALSE, cMilliesWait);
+            DWORD dwRc = WaitForMultipleObjects(1, &pPriv->hEventWakeup, FALSE, cMilliesWait);
+            NOREF(dwRc);
         }
 
         return NULL;
@@ -629,7 +635,8 @@ again:
         return NULL;
     }
 
-    if (rc >= WAIT_OBJECT_0 && rc < WAIT_OBJECT_0 + cQueuedUrbs)
+    AssertCompile(WAIT_OBJECT_0 == 0);
+    if (/*rc >= WAIT_OBJECT_0 && */ rc < WAIT_OBJECT_0 + cQueuedUrbs)
     {
         RTCritSectEnter(&pPriv->CritSect);
         unsigned iUrb = rc - WAIT_OBJECT_0;
diff --git a/src/VBox/Devices/VMMDev/VMMDev.cpp b/src/VBox/Devices/VMMDev/VMMDev.cpp
index ed453d9..16868d0 100644
--- a/src/VBox/Devices/VMMDev/VMMDev.cpp
+++ b/src/VBox/Devices/VMMDev/VMMDev.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -492,6 +492,7 @@ static int vmmDevReqHandler_GuestHeartbeat(PVMMDEV pThis)
  */
 static DECLCALLBACK(void) vmmDevHeartbeatFlatlinedTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
 {
+    RT_NOREF1(pDevIns);
     PVMMDEV pThis = (PVMMDEV)pvUser;
     if (pThis->fHeartbeatActive)
     {
@@ -2199,13 +2200,12 @@ static int vmmdevReqHandler_ReportCredentialsJudgement(PVMMDEV pThis, VMMDevRequ
  * Handles VMMDevReq_GetHostVersion.
  *
  * @returns VBox status code that the guest should see.
- * @param   pThis           The VMMDev instance data.
  * @param   pReqHdr         The header of the request to handle.
  * @since   3.1.0
  * @note    The ring-0 VBoxGuestLib uses this to check whether
  *          VMMDevHGCMParmType_PageList is supported.
  */
-static int vmmdevReqHandler_GetHostVersion(PVMMDEV pThis, VMMDevRequestHeader *pReqHdr)
+static int vmmdevReqHandler_GetHostVersion(VMMDevRequestHeader *pReqHdr)
 {
     VMMDevReqHostVersion *pReq = (VMMDevReqHostVersion *)pReqHdr;
     AssertMsgReturn(pReq->header.size == sizeof(*pReq), ("%u\n", pReq->header.size), VERR_INVALID_PARAMETER);
@@ -2271,10 +2271,9 @@ static int vmmdevReqHandler_SetCpuHotPlugStatus(PVMMDEV pThis, VMMDevRequestHead
  * Handles VMMDevReq_LogString.
  *
  * @returns VBox status code that the guest should see.
- * @param   pThis           The VMMDev instance data.
  * @param   pReqHdr         The header of the request to handle.
  */
-static int vmmdevReqHandler_LogString(PVMMDEV pThis, VMMDevRequestHeader *pReqHdr)
+static int vmmdevReqHandler_LogString(VMMDevRequestHeader *pReqHdr)
 {
     VMMDevReqLogString *pReq = (VMMDevReqLogString *)pReqHdr;
     AssertMsgReturn(pReq->header.size >= sizeof(*pReq), ("%u\n", pReq->header.size), VERR_INVALID_PARAMETER);
@@ -2423,6 +2422,7 @@ static int vmmdevReqHandler_DebugIsPageShared(PVMMDEV pThis, VMMDevRequestHeader
 # ifdef DEBUG
     return PGMR3SharedModuleGetPageState(PDMDevHlpGetVM(pThis->pDevIns), pReq->GCPtrPage, &pReq->fShared, &pReq->uPageFlags);
 # else
+    RT_NOREF1(pThis);
     return VERR_NOT_IMPLEMENTED;
 # endif
 }
@@ -2681,7 +2681,7 @@ static int vmmdevReqDispatcher(PVMMDEV pThis, VMMDevRequestHeader *pReqHdr, RTGC
             break;
 
         case VMMDevReq_GetHostVersion:
-            pReqHdr->rc = vmmdevReqHandler_GetHostVersion(pThis, pReqHdr);
+            pReqHdr->rc = vmmdevReqHandler_GetHostVersion(pReqHdr);
             break;
 
         case VMMDevReq_GetCpuHotPlugRequest:
@@ -2717,7 +2717,7 @@ static int vmmdevReqDispatcher(PVMMDEV pThis, VMMDevRequestHeader *pReqHdr, RTGC
 
 #ifdef DEBUG
         case VMMDevReq_LogString:
-            pReqHdr->rc = vmmdevReqHandler_LogString(pThis, pReqHdr);
+            pReqHdr->rc = vmmdevReqHandler_LogString(pReqHdr);
             break;
 #endif
 
@@ -2762,6 +2762,7 @@ static int vmmdevReqDispatcher(PVMMDEV pThis, VMMDevRequestHeader *pReqHdr, RTGC
  */
 static DECLCALLBACK(int) vmmdevRequestHandler(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb)
 {
+    RT_NOREF2(Port, cb);
     PVMMDEV pThis = (VMMDevState*)pvUser;
 
     /*
@@ -2879,6 +2880,7 @@ static DECLCALLBACK(int) vmmdevRequestHandler(PPDMDEVINS pDevIns, void *pvUser,
 static DECLCALLBACK(int)
 vmmdevIORAMRegionMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, uint32_t cb, PCIADDRESSSPACE enmType)
 {
+    RT_NOREF1(cb);
     LogFlow(("vmmdevR3IORAMRegionMap: iRegion=%d GCPhysAddress=%RGp cb=%#x enmType=%d\n", iRegion, GCPhysAddress, cb, enmType));
     PVMMDEV pThis = RT_FROM_MEMBER(pPciDev, VMMDEV, PciDev);
     int rc;
@@ -2946,6 +2948,7 @@ vmmdevIORAMRegionMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, ui
 static DECLCALLBACK(int)
 vmmdevIOPortRegionMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, uint32_t cb, PCIADDRESSSPACE enmType)
 {
+    RT_NOREF3(iRegion, cb, enmType);
     PVMMDEV pThis = RT_FROM_MEMBER(pPciDev, VMMDEV, PciDev);
 
     Assert(enmType == PCI_ADDRESS_SPACE_IO);
@@ -2970,6 +2973,7 @@ vmmdevIOPortRegionMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, u
  */
 static DECLCALLBACK(int) vmmdevBackdoorLog(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb)
 {
+    RT_NOREF1(pvUser);
     PVMMDEV pThis = PDMINS_2_DATA(pDevIns, VMMDevState *);
 
     if (!pThis->fBackdoorLogDisabled && cb == 1 && Port == RTLOG_DEBUG_PORT)
@@ -3014,6 +3018,7 @@ static DECLCALLBACK(int) vmmdevBackdoorLog(PPDMDEVINS pDevIns, void *pvUser, RTI
  */
 static DECLCALLBACK(int) vmmdevAltTimeSyncWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb)
 {
+    RT_NOREF2(pvUser, Port);
     PVMMDEV pThis = PDMINS_2_DATA(pDevIns, VMMDevState *);
     if (cb == 4)
     {
@@ -3041,6 +3046,7 @@ static DECLCALLBACK(int) vmmdevAltTimeSyncWrite(PPDMDEVINS pDevIns, void *pvUser
  */
 static DECLCALLBACK(int) vmmdevAltTimeSyncRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb)
 {
+    RT_NOREF2(pvUser, Port);
     PVMMDEV pThis = PDMINS_2_DATA(pDevIns, VMMDevState *);
     int     rc;
     if (cb == 4)
@@ -3465,6 +3471,7 @@ static DECLCALLBACK(int) vmmdevIPort_CpuHotPlug(PPDMIVMMDEVPORT pInterface, uint
  */
 static DECLCALLBACK(int) vmmdevLiveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uPass)
 {
+    RT_NOREF1(uPass);
     PVMMDEV pThis = PDMINS_2_DATA(pDevIns, PVMMDEV);
 
     SSMR3PutBool(pSSM, pThis->fGetHostTimeDisabled);
@@ -3722,10 +3729,11 @@ static DECLCALLBACK(int) vmmdevLoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uin
  */
 static DECLCALLBACK(int) vmmdevLoadStateDone(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
 {
+    RT_NOREF1(pSSM);
     PVMMDEV pThis = PDMINS_2_DATA(pDevIns, PVMMDEV);
 
 #ifdef VBOX_WITH_HGCM
-    int rc = vmmdevHGCMLoadStateDone(pThis, pSSM);
+    int rc = vmmdevHGCMLoadStateDone(pThis);
     AssertLogRelRCReturn(rc, rc);
 #endif /* VBOX_WITH_HGCM */
 
diff --git a/src/VBox/Devices/VMMDev/VMMDevHGCM.cpp b/src/VBox/Devices/VMMDev/VMMDevHGCM.cpp
index 7a1c4ec..535bc9d 100644
--- a/src/VBox/Devices/VMMDev/VMMDevHGCM.cpp
+++ b/src/VBox/Devices/VMMDev/VMMDevHGCM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -2672,7 +2672,7 @@ int vmmdevHGCMLoadState(PVMMDEV pThis, PSSMHANDLE pSSM, uint32_t uVersion)
 }
 
 /** @thread EMT */
-int vmmdevHGCMLoadStateDone(PVMMDEV pThis, PSSMHANDLE pSSM)
+int vmmdevHGCMLoadStateDone(PVMMDEV pThis)
 {
     LogFlowFunc(("\n"));
 
diff --git a/src/VBox/Devices/VMMDev/VMMDevHGCM.h b/src/VBox/Devices/VMMDev/VMMDevHGCM.h
index 1d6bea1..53d5975 100644
--- a/src/VBox/Devices/VMMDev/VMMDevHGCM.h
+++ b/src/VBox/Devices/VMMDev/VMMDevHGCM.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -31,7 +31,7 @@ DECLCALLBACK(void) hgcmCompleted(PPDMIHGCMPORT pInterface, int32_t result, PVBOX
 
 int vmmdevHGCMSaveState(VMMDevState *pVMMDevState, PSSMHANDLE pSSM);
 int vmmdevHGCMLoadState(VMMDevState *pVMMDevState, PSSMHANDLE pSSM, uint32_t u32Version);
-int vmmdevHGCMLoadStateDone(VMMDevState *pVMMDevState, PSSMHANDLE pSSM);
+int vmmdevHGCMLoadStateDone(VMMDevState *pVMMDevState);
 
 void vmmdevHGCMDestroy(PVMMDEV pThis);
 RT_C_DECLS_END
diff --git a/src/VBox/Devices/VMMDev/VMMDevState.h b/src/VBox/Devices/VMMDev/VMMDevState.h
index 6ae8371..ab1bc91 100644
--- a/src/VBox/Devices/VMMDev/VMMDevState.h
+++ b/src/VBox/Devices/VMMDev/VMMDevState.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/VMMDev/VMMDevTesting.cpp b/src/VBox/Devices/VMMDev/VMMDevTesting.cpp
index c6db1ce..d609cb1 100644
--- a/src/VBox/Devices/VMMDev/VMMDevTesting.cpp
+++ b/src/VBox/Devices/VMMDev/VMMDevTesting.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -51,6 +51,8 @@
  */
 PDMBOTHCBDECL(int) vmmdevTestingMmioWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void const *pv, unsigned cb)
 {
+    RT_NOREF_PV(pvUser);
+
     switch (GCPhysAddr)
     {
         case VMMDEV_TESTING_MMIO_NOP_R3:
@@ -126,6 +128,8 @@ PDMBOTHCBDECL(int) vmmdevTestingMmioWrite(PPDMDEVINS pDevIns, void *pvUser, RTGC
  */
 PDMBOTHCBDECL(int) vmmdevTestingMmioRead(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void *pv, unsigned cb)
 {
+    RT_NOREF_PV(pvUser);
+
     switch (GCPhysAddr)
     {
         case VMMDEV_TESTING_MMIO_NOP_R3:
@@ -143,10 +147,10 @@ PDMBOTHCBDECL(int) vmmdevTestingMmioRead(PPDMDEVINS pDevIns, void *pvUser, RTGCP
                     *(uint32_t *)pv = VMMDEV_TESTING_NOP_RET;
                     break;
                 case 2:
-                    *(uint16_t *)pv = (uint16_t)VMMDEV_TESTING_NOP_RET;
+                    *(uint16_t *)pv = RT_LO_U16(VMMDEV_TESTING_NOP_RET);
                     break;
                 case 1:
-                    *(uint8_t *)pv  = (uint8_t)VMMDEV_TESTING_NOP_RET;
+                    *(uint8_t *)pv  = (uint8_t)(VMMDEV_TESTING_NOP_RET & UINT8_MAX);
                     break;
                 default:
                     AssertFailed();
@@ -291,6 +295,7 @@ static void vmmdevTestingCmdExec_ValueReg(PPDMDEVINS pDevIns, VMMDevState *pThis
 PDMBOTHCBDECL(int) vmmdevTestingIoWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb)
 {
     VMMDevState *pThis = PDMINS_2_DATA(pDevIns, VMMDevState *);
+    RT_NOREF_PV(pvUser);
 
     switch (Port)
     {
@@ -590,6 +595,7 @@ PDMBOTHCBDECL(int) vmmdevTestingIoWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPO
 PDMBOTHCBDECL(int) vmmdevTestingIoRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb)
 {
     VMMDevState *pThis = PDMINS_2_DATA(pDevIns, VMMDevState *);
+    RT_NOREF_PV(pvUser);
 
     switch (Port)
     {
diff --git a/src/VBox/Devices/VMMDev/VMMDevTesting.h b/src/VBox/Devices/VMMDev/VMMDevTesting.h
index 5be6bf8..53de523 100644
--- a/src/VBox/Devices/VMMDev/VMMDevTesting.h
+++ b/src/VBox/Devices/VMMDev/VMMDevTesting.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/VirtIO/Virtio.cpp b/src/VBox/Devices/VirtIO/Virtio.cpp
index a95f32e..7c2e43d 100644
--- a/src/VBox/Devices/VirtIO/Virtio.cpp
+++ b/src/VBox/Devices/VirtIO/Virtio.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -271,6 +271,7 @@ void vpciReset(PVPCISTATE pState)
  */
 int vpciRaiseInterrupt(VPCISTATE *pState, int rcBusy, uint8_t u8IntCause)
 {
+    RT_NOREF_PV(rcBusy);
     // int rc = vpciCsEnter(pState, rcBusy);
     // if (RT_UNLIKELY(rc != VINF_SUCCESS))
     //     return rc;
@@ -326,6 +327,7 @@ int vpciIOPortIn(PPDMDEVINS         pDevIns,
     VPCISTATE  *pState = PDMINS_2_DATA(pDevIns, VPCISTATE *);
     int         rc     = VINF_SUCCESS;
     STAM_PROFILE_ADV_START(&pState->CTXSUFF(StatIORead), a);
+    RT_NOREF_PV(pvUser);
 
     /*
      * We probably do not need to enter critical section when reading registers
@@ -424,6 +426,7 @@ int vpciIOPortOut(PPDMDEVINS                pDevIns,
     int         rc     = VINF_SUCCESS;
     bool        fHasBecomeReady;
     STAM_PROFILE_ADV_START(&pState->CTXSUFF(StatIOWrite), a);
+    RT_NOREF_PV(pvUser);
 
     Port -= pState->IOPortBase;
     Log3(("%s virtioIOPortOut: At %RTiop out          %0*x\n", INSTANCE(pState), Port, cb*2, u32));
@@ -619,6 +622,7 @@ DECLINLINE(void) vpciCfgSetU16(PCIDEVICE& refPciDev, uint32_t uOffset, uint16_t
     *(uint16_t*)&refPciDev.config[uOffset] = u16Value;
 }
 
+#if 0 /* unused */
 /**
  * Sets 32-bit register in PCI configuration space.
  * @param   refPciDev   The PCI device.
@@ -631,6 +635,7 @@ DECLINLINE(void) vpciCfgSetU32(PCIDEVICE& refPciDev, uint32_t uOffset, uint32_t
     Assert(uOffset+sizeof(u32Value) <= sizeof(refPciDev.config));
     *(uint32_t*)&refPciDev.config[uOffset] = u32Value;
 }
+#endif /* unused */
 
 
 #ifdef DEBUG
@@ -796,19 +801,21 @@ static DECLCALLBACK(void) vpciConfigure(PCIDEVICE& pci,
 #endif
 }
 
+#ifdef VBOX_WITH_STATISTICS
 /* WARNING! This function must never be used in multithreaded context! */
 static const char *vpciCounter(const char *pszDevFmt,
                                const char *pszCounter)
 {
-    static char g_szCounterName[80];
+    static char s_szCounterName[80];
 
-    RTStrPrintf(g_szCounterName, sizeof(g_szCounterName),
+    RTStrPrintf(s_szCounterName, sizeof(s_szCounterName),
                 "/Devices/%s/%s", pszDevFmt, pszCounter);
 
-    return g_szCounterName;
+    return s_szCounterName;
 }
+#endif
 
-// TODO: header
+/// @todo header
 int vpciConstruct(PPDMDEVINS pDevIns, VPCISTATE *pState,
                   int iInstance, const char *pcszNameFmt,
                   uint16_t uDeviceId, uint16_t uClass,
@@ -913,8 +920,9 @@ int vpciDestruct(VPCISTATE* pState)
  */
 void vpciRelocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta)
 {
-    VPCISTATE* pState = PDMINS_2_DATA(pDevIns, VPCISTATE*);
-    pState->pDevInsRC     = PDMDEVINS_2_RCPTR(pDevIns);
+    RT_NOREF(offDelta);
+    VPCISTATE *pState = PDMINS_2_DATA(pDevIns, VPCISTATE*);
+    pState->pDevInsRC = PDMDEVINS_2_RCPTR(pDevIns);
     // TBD
 }
 
diff --git a/src/VBox/Devices/VirtIO/Virtio.h b/src/VBox/Devices/VirtIO/Virtio.h
index 455c35b..c16ecd9 100644
--- a/src/VBox/Devices/VirtIO/Virtio.h
+++ b/src/VBox/Devices/VirtIO/Virtio.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/build/VBoxDD.cpp b/src/VBox/Devices/build/VBoxDD.cpp
index 79de225..728a6f6 100644
--- a/src/VBox/Devices/build/VBoxDD.cpp
+++ b/src/VBox/Devices/build/VBoxDD.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -274,6 +274,11 @@ extern "C" DECLEXPORT(int) VBoxDriversRegister(PCPDMDRVREGCB pCallbacks, uint32_
     rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvAUDIO);
     if (RT_FAILURE(rc))
         return rc;
+#ifdef VBOX_WITH_AUDIO_DEBUG
+    rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostDebugAudio);
+    if (RT_FAILURE(rc))
+        return rc;
+#endif
     rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostNullAudio);
     if (RT_FAILURE(rc))
         return rc;
@@ -282,41 +287,25 @@ extern "C" DECLEXPORT(int) VBoxDriversRegister(PCPDMDRVREGCB pCallbacks, uint32_
     if (RT_FAILURE(rc))
         return rc;
 #endif
-#if defined(RT_OS_LINUX)
-# ifdef VBOX_WITH_PULSE
-    rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostPulseAudio);
+#if defined(RT_OS_DARWIN)
+    rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostCoreAudio);
     if (RT_FAILURE(rc))
         return rc;
-# endif
-# ifdef VBOX_WITH_ALSA
+#endif
+#ifdef VBOX_WITH_AUDIO_ALSA
     rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostALSAAudio);
     if (RT_FAILURE(rc))
         return rc;
-# endif
-# ifdef VBOX_WITH_OSS
-    rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostOSSAudio);
-    if (RT_FAILURE(rc))
-        return rc;
-# endif
-#endif /* RT_OS_LINUX */
-#if defined(RT_OS_FREEBSD)
-# ifdef VBOX_WITH_OSS
-    rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostOSSAudio);
-    if (RT_FAILURE(rc))
-        return rc;
-# endif
 #endif
-#if defined(RT_OS_DARWIN)
-    rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostCoreAudio);
+#ifdef VBOX_WITH_AUDIO_OSS
+    rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostOSSAudio);
     if (RT_FAILURE(rc))
         return rc;
 #endif
-#if defined(RT_OS_SOLARIS)
-# ifdef VBOX_WITH_OSS
-    rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostOSSAudio);
+#ifdef VBOX_WITH_AUDIO_PULSE
+    rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostPulseAudio);
     if (RT_FAILURE(rc))
         return rc;
-# endif
 #endif
     rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvACPI);
     if (RT_FAILURE(rc))
@@ -394,6 +383,7 @@ extern "C" DECLEXPORT(int) VBoxDriversRegister(PCPDMDRVREGCB pCallbacks, uint32_
 extern "C" DECLEXPORT(int) VBoxUsbRegister(PCPDMUSBREGCB pCallbacks, uint32_t u32Version)
 {
     int rc = VINF_SUCCESS;
+    RT_NOREF1(u32Version);
 
 #ifdef VBOX_WITH_USB
     rc = pCallbacks->pfnRegister(pCallbacks, &g_UsbDevProxy);
diff --git a/src/VBox/Devices/build/VBoxDD.h b/src/VBox/Devices/build/VBoxDD.h
index 30e1e66..85be782 100644
--- a/src/VBox/Devices/build/VBoxDD.h
+++ b/src/VBox/Devices/build/VBoxDD.h
@@ -117,22 +117,25 @@ extern const PDMDRVREG g_DrvNetShaper;
 #endif /* VBOX_WITH_NETSHAPER */
 extern const PDMDRVREG g_DrvNetSniffer;
 extern const PDMDRVREG g_DrvAUDIO;
+#ifdef VBOX_WITH_AUDIO_DEBUG
+extern const PDMDRVREG g_DrvHostDebugAudio;
+#endif
 extern const PDMDRVREG g_DrvHostNullAudio;
 #if defined(RT_OS_WINDOWS)
 extern const PDMDRVREG g_DrvHostDSound;
 #endif
-#ifdef VBOX_WITH_OSS
+#if defined(RT_OS_DARWIN)
+extern const PDMDRVREG g_DrvHostCoreAudio;
+#endif
+#ifdef VBOX_WITH_AUDIO_OSS
 extern const PDMDRVREG g_DrvHostOSSAudio;
 #endif
-#ifdef VBOX_WITH_ALSA
+#ifdef VBOX_WITH_AUDIO_ALSA
 extern const PDMDRVREG g_DrvHostALSAAudio;
 #endif
-#ifdef VBOX_WITH_PULSE
+#ifdef VBOX_WITH_AUDIO_PULSE
 extern const PDMDRVREG g_DrvHostPulseAudio;
 #endif
-#if defined(RT_OS_DARWIN)
-extern const PDMDRVREG g_DrvHostCoreAudio;
-#endif
 extern const PDMDRVREG g_DrvACPI;
 extern const PDMDRVREG g_DrvAcpiCpu;
 extern const PDMDRVREG g_DrvVUSBRootHub;
diff --git a/src/VBox/Devices/build/VBoxDD2.cpp b/src/VBox/Devices/build/VBoxDD2.cpp
index a00dd88..c47bfe2 100644
--- a/src/VBox/Devices/build/VBoxDD2.cpp
+++ b/src/VBox/Devices/build/VBoxDD2.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/build/VBoxDD2.h b/src/VBox/Devices/build/VBoxDD2.h
index 12ce193..d3e3e38 100644
--- a/src/VBox/Devices/build/VBoxDD2.h
+++ b/src/VBox/Devices/build/VBoxDD2.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/build/VBoxDD2R0.cpp b/src/VBox/Devices/build/VBoxDD2R0.cpp
index 4b47fbb..f0c1741 100644
--- a/src/VBox/Devices/build/VBoxDD2R0.cpp
+++ b/src/VBox/Devices/build/VBoxDD2R0.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/build/VBoxDDR0.cpp b/src/VBox/Devices/build/VBoxDDR0.cpp
index e175a2f..3be3df5 100644
--- a/src/VBox/Devices/build/VBoxDDR0.cpp
+++ b/src/VBox/Devices/build/VBoxDDR0.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/build/VBoxDDUDeps.cpp b/src/VBox/Devices/build/VBoxDDUDeps.cpp
index 5b1f540..052e43f 100644
--- a/src/VBox/Devices/build/VBoxDDUDeps.cpp
+++ b/src/VBox/Devices/build/VBoxDDUDeps.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/testcase/Makefile.kmk b/src/VBox/Devices/testcase/Makefile.kmk
index 45f99b2..ec8ddb2 100644
--- a/src/VBox/Devices/testcase/Makefile.kmk
+++ b/src/VBox/Devices/testcase/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -36,9 +36,7 @@ VBOX_DEVICES_TESTS_FEATURES = \
 	$(if $(VBOX_WITH_LSILOGIC),VBOX_WITH_LSILOGIC,) \
 	$(if $(VBOX_WITH_NEW_APIC),VBOX_WITH_NEW_APIC,) \
 	$(if $(VBOX_WITH_NEW_IOAPIC),VBOX_WITH_NEW_IOAPIC,) \
-	$(if $(VBOX_WITH_NEW_PS2M),VBOX_WITH_NEW_PS2M,) \
 	$(if $(VBOX_WITH_NVME_IMPL),VBOX_WITH_NVME_IMPL,) \
-	$(if $(VBOX_WITH_AUDIO_50),VBOX_WITH_AUDIO_50,) \
 	$(if $(VBOX_WITH_PCI_PASSTHROUGH_IMPL),VBOX_WITH_PCI_PASSTHROUGH_IMPL,) \
 	$(if $(VBOX_WITH_RAW_MODE),VBOX_WITH_RAW_MODE,) \
 	$(if $(VBOX_WITH_SCSI),VBOX_WITH_SCSI,) \
diff --git a/src/VBox/Devices/testcase/tstDeviceStructSize.cpp b/src/VBox/Devices/testcase/tstDeviceStructSize.cpp
index e44e1fc..8fbd39e 100644
--- a/src/VBox/Devices/testcase/tstDeviceStructSize.cpp
+++ b/src/VBox/Devices/testcase/tstDeviceStructSize.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -65,9 +65,9 @@
 #endif
 #undef LOG_GROUP
 #ifdef VBOX_WITH_NEW_IOAPIC
-# include "../PC/DevIOAPIC_New.cpp"
-#else
 # include "../PC/DevIoApic.cpp"
+#else
+# include "../PC/DevIoApic_Old.cpp"
 #endif
 #undef LOG_GROUP
 #include "../PC/DevHPET.cpp"
@@ -119,17 +119,10 @@
 
 #include <VBox/vmm/pdmaudioifs.h>
 
-#ifdef VBOX_WITH_AUDIO_50
-# undef LOG_GROUP
-# include "../Audio_old/DevIchAc97.cpp"
-# undef LOG_GROUP
-# include "../Audio_old/DevIchHda.cpp"
-#else
 # undef LOG_GROUP
 # include "../Audio/DevIchAc97.cpp"
 # undef LOG_GROUP
 # include "../Audio/DevIchHda.cpp"
-#endif
 
 #include <stdio.h>
 
diff --git a/src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp b/src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp
index 32b86b2..9d3534f 100644
--- a/src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp
+++ b/src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp
@@ -67,9 +67,9 @@
 #endif
 #undef LOG_GROUP
 #ifdef VBOX_WITH_NEW_IOAPIC
-# include "../PC/DevIOAPIC_New.cpp"
-#else
 # include "../PC/DevIoApic.cpp"
+#else
+# include "../PC/DevIoApic_Old.cpp"
 #endif
 #undef LOG_GROUP
 #include "../Storage/DevATA.cpp"
@@ -113,17 +113,10 @@
 #endif
 #undef LOG_GROUP
 #include "../PC/DevHPET.cpp"
-#ifdef VBOX_WITH_AUDIO_50
-# undef LOG_GROUP
-# include "../Audio_old/DevIchAc97.cpp"
-# undef LOG_GROUP
-# include "../Audio_old/DevIchHda.cpp"
-#else
 # undef LOG_GROUP
 # include "../Audio/DevIchAc97.cpp"
 # undef LOG_GROUP
 # include "../Audio/DevIchHda.cpp"
-#endif
 #ifdef VBOX_WITH_NVME_IMPL
 # undef LOG_GROUP
 # include "../Storage/DevNVMe.cpp"
@@ -424,38 +417,10 @@ int main()
 #endif
 
     /* Input/pckbd.c */
-#ifndef VBOX_WITH_NEW_PS2M
-    GEN_CHECK_SIZE(MouseCmdQueue);
-    GEN_CHECK_OFF(MouseCmdQueue, data);
-    GEN_CHECK_OFF(MouseCmdQueue, rptr);
-    GEN_CHECK_OFF(MouseCmdQueue, wptr);
-    GEN_CHECK_OFF(MouseCmdQueue, count);
-    GEN_CHECK_SIZE(MouseEventQueue);
-    GEN_CHECK_OFF(MouseEventQueue, data);
-    GEN_CHECK_OFF(MouseEventQueue, rptr);
-    GEN_CHECK_OFF(MouseEventQueue, wptr);
-    GEN_CHECK_OFF(MouseEventQueue, count);
-#endif
     GEN_CHECK_SIZE(KBDState);
     GEN_CHECK_OFF(KBDState, write_cmd);
     GEN_CHECK_OFF(KBDState, status);
     GEN_CHECK_OFF(KBDState, mode);
-#ifndef VBOX_WITH_NEW_PS2M
-    GEN_CHECK_OFF(KBDState, mouse_command_queue);
-    GEN_CHECK_OFF(KBDState, mouse_event_queue);
-    GEN_CHECK_OFF(KBDState, mouse_write_cmd);
-    GEN_CHECK_OFF(KBDState, mouse_status);
-    GEN_CHECK_OFF(KBDState, mouse_resolution);
-    GEN_CHECK_OFF(KBDState, mouse_sample_rate);
-    GEN_CHECK_OFF(KBDState, mouse_wrap);
-    GEN_CHECK_OFF(KBDState, mouse_type);
-    GEN_CHECK_OFF(KBDState, mouse_detect_state);
-    GEN_CHECK_OFF(KBDState, mouse_dx);
-    GEN_CHECK_OFF(KBDState, mouse_dy);
-    GEN_CHECK_OFF(KBDState, mouse_dz);
-    GEN_CHECK_OFF(KBDState, mouse_dw);
-    GEN_CHECK_OFF(KBDState, mouse_buttons);
-#endif
     GEN_CHECK_OFF(KBDState, pDevInsR3);
     GEN_CHECK_OFF(KBDState, pDevInsR0);
     GEN_CHECK_OFF(KBDState, pDevInsRC);
@@ -487,7 +452,6 @@ int main()
     GEN_CHECK_OFF(PS2K, Keyboard.IPort);
     GEN_CHECK_OFF(PS2K, Keyboard.pDrvBase);
     GEN_CHECK_OFF(PS2K, Keyboard.pDrv);
-#ifdef VBOX_WITH_NEW_PS2M
     /* Input/PS2M.c */
     GEN_CHECK_SIZE(PS2M);
     GEN_CHECK_OFF(PS2M, u8State);
@@ -516,12 +480,6 @@ int main()
     GEN_CHECK_OFF(PS2M, Mouse.IPort);
     GEN_CHECK_OFF(PS2M, Mouse.pDrvBase);
     GEN_CHECK_OFF(PS2M, Mouse.pDrv);
-#else
-    GEN_CHECK_OFF(KBDState, Mouse.IBase);
-    GEN_CHECK_OFF(KBDState, Mouse.IPort);
-    GEN_CHECK_OFF(KBDState, Mouse.pDrvBase);
-    GEN_CHECK_OFF(KBDState, Mouse.pDrv);
-#endif
 
     /* Network/DevPCNet.cpp */
     GEN_CHECK_SIZE(PCNETSTATE);
@@ -635,12 +593,16 @@ int main()
     GEN_CHECK_OFF(ACPIState, u32CpuEventType);
     GEN_CHECK_OFF(ACPIState, u32CpuEvent);
     GEN_CHECK_OFF(ACPIState, fCpuHotPlug);
+    GEN_CHECK_OFF(ACPIState, u32NicPciAddress);
+    GEN_CHECK_OFF(ACPIState, u32HbcPciAddress);
+    GEN_CHECK_OFF(ACPIState, u64PciConfigMMioAddress);
     GEN_CHECK_OFF(ACPIState, IBase);
     GEN_CHECK_OFF(ACPIState, IACPIPort);
     GEN_CHECK_OFF(ACPIState, pDevInsR3);
     GEN_CHECK_OFF(ACPIState, pDevInsR0);
     GEN_CHECK_OFF(ACPIState, pDrvBase);
     GEN_CHECK_OFF(ACPIState, pDrv);
+    GEN_CHECK_OFF(ACPIState, u16SMBusSlvDat);
 
     /* PC/DevPIC.cpp */
     GEN_CHECK_SIZE(PICSTATE);
@@ -873,7 +835,7 @@ int main()
 #endif  /* VBOX_WITH_NEW_APIC */
 
 #ifdef VBOX_WITH_NEW_IOAPIC
-    /* PC/DevIOAPIC_New.cpp */
+    /* PC/DevIoApic.cpp */
     GEN_CHECK_SIZE(IOAPIC);
     GEN_CHECK_OFF(IOAPIC, pDevInsR3);
     GEN_CHECK_OFF(IOAPIC, pIoApicHlpR3);
@@ -897,7 +859,7 @@ int main()
     GEN_CHECK_OFF(IOAPIC, StatSetEoiR3);
 # endif
 #else
-    /* PC/DevIoApic.cpp */
+    /* PC/DevIoApic_Old.cpp */
     GEN_CHECK_SIZE(IOAPIC);
     GEN_CHECK_OFF(IOAPIC, id);
     GEN_CHECK_OFF(IOAPIC, ioregsel);
@@ -1957,11 +1919,9 @@ int main()
     GEN_CHECK_OFF(AC97DRIVER, MicIn);
     GEN_CHECK_OFF(AC97DRIVER, Out);
 
-#ifndef VBOX_WITH_AUDIO_50
     GEN_CHECK_SIZE(HDAMIXERSTREAM);
     GEN_CHECK_OFF(HDAMIXERSTREAM, DestSource);
     GEN_CHECK_OFF(HDAMIXERSTREAM, pMixStrm);
-#endif
 
     GEN_CHECK_SIZE(HDADRIVER);
     GEN_CHECK_OFF(HDADRIVER, Node);
@@ -1974,9 +1934,7 @@ int main()
 #ifdef VBOX_WITH_HDA_MIC_IN
     GEN_CHECK_OFF(HDADRIVER, MicIn);
 #endif
-#ifndef VBOX_WITH_AUDIO_50
     GEN_CHECK_OFF(HDADRIVER, Front);
-#endif
 #ifdef VBOX_WITH_HDA_51_SURROUND
     GEN_CHECK_OFF(HDADRIVER, CenterLFE);
     GEN_CHECK_OFF(HDADRIVER, Rear);
@@ -1999,9 +1957,7 @@ int main()
     GEN_CHECK_OFF(HDASTREAMSTATE, BDLE);
 
     GEN_CHECK_SIZE(HDASTREAM);
-#ifndef VBOX_WITH_AUDIO_50
     GEN_CHECK_OFF(HDASTREAM, u8SD);
-#endif
     GEN_CHECK_OFF(HDASTREAM, u64BDLBase);
     GEN_CHECK_OFF(HDASTREAM, u16FMT);
     GEN_CHECK_OFF(HDASTREAM, u16FIFOS);
@@ -2016,13 +1972,9 @@ int main()
     GEN_CHECK_OFF(HDASTATE, IBase);
     GEN_CHECK_OFF(HDASTATE, MMIOBaseAddr);
     GEN_CHECK_OFF(HDASTATE, au32Regs[0]);
-#ifdef VBOX_WITH_AUDIO_50
-    GEN_CHECK_OFF(HDASTATE, au32Regs[HDA_NREGS]);
-#else
     GEN_CHECK_OFF(HDASTATE, au32Regs[HDA_NUM_REGS]);
     GEN_CHECK_OFF(HDASTATE, aStreams);
     GEN_CHECK_OFF(HDASTATE, aTags);
-#endif
     GEN_CHECK_OFF(HDASTATE, u64CORBBase);
     GEN_CHECK_OFF(HDASTATE, u64RIRBBase);
     GEN_CHECK_OFF(HDASTATE, u64DPBase);
@@ -2048,16 +2000,12 @@ int main()
     GEN_CHECK_OFF(HDASTATE, pCodec);
     GEN_CHECK_OFF(HDASTATE, lstDrv);
     GEN_CHECK_OFF(HDASTATE, pMixer);
-#ifndef VBOX_WITH_AUDIO_50
     GEN_CHECK_OFF(HDASTATE, SinkFront);
-#endif
 #ifdef VBOX_WITH_HDA_51_SURROUND
     GEN_CHECK_OFF(HDASTATE, SinkCenterLFE);
     GEN_CHECK_OFF(HDASTATE, SinkRear);
 #endif
-#ifndef VBOX_WITH_AUDIO_50
     GEN_CHECK_OFF(HDASTATE, SinkLineIn);
-#endif
 #ifdef VBOX_WITH_HDA_MIC_IN
     GEN_CHECK_OFF(HDASTATE, SinkMicIn);
 #endif
@@ -2112,14 +2060,13 @@ int main()
     GEN_CHECK_OFF(NVME, cWrkThrdsMax);
     GEN_CHECK_OFF(NVME, cCompQueuesWaitersMax);
     GEN_CHECK_OFF(NVME, cNamespaces);
-    GEN_CHECK_OFF(NVME, aszSerialNumber);
-    GEN_CHECK_OFF(NVME, aszModelNumber);
-    GEN_CHECK_OFF(NVME, aszFirmwareRevision);
+    GEN_CHECK_OFF(NVME, szSerialNumber);
+    GEN_CHECK_OFF(NVME, szModelNumber);
+    GEN_CHECK_OFF(NVME, szFirmwareRevision);
     GEN_CHECK_OFF(NVME, fRCEnabled);
     GEN_CHECK_OFF(NVME, fR0Enabled);
     GEN_CHECK_OFF(NVME, enmState);
     GEN_CHECK_OFF(NVME, u32IntrMask);
-    GEN_CHECK_OFF(NVME, u32IntrSts);
     GEN_CHECK_OFF(NVME, aIntrVecs);
     GEN_CHECK_OFF(NVME, u32IoCompletionQueueEntrySize);
     GEN_CHECK_OFF(NVME, u32IoSubmissionQueueEntrySize);
diff --git a/src/VBox/Disassembler/Disasm.cpp b/src/VBox/Disassembler/Disasm.cpp
index 7556541..42ca09b 100644
--- a/src/VBox/Disassembler/Disasm.cpp
+++ b/src/VBox/Disassembler/Disasm.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Disassembler/DisasmCore.cpp b/src/VBox/Disassembler/DisasmCore.cpp
index 94e1d17..37f4be9 100644
--- a/src/VBox/Disassembler/DisasmCore.cpp
+++ b/src/VBox/Disassembler/DisasmCore.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -235,7 +235,7 @@ static PFNDISPARSE const g_apfnCalcSize[IDX_ParseMax] =
 static DECLCALLBACK(int) disReadBytesDefault(PDISSTATE pDis, uint8_t offInstr, uint8_t cbMinRead, uint8_t cbMaxRead)
 {
 #ifdef IN_RING0
-    NOREF(cbMinRead);
+    RT_NOREF_PV(cbMinRead);
     AssertMsgFailed(("disReadWord with no read callback in ring 0!!\n"));
     RT_BZERO(&pDis->abInstr[offInstr], cbMaxRead);
     pDis->cbCachedInstr = offInstr + cbMaxRead;
@@ -638,7 +638,7 @@ static size_t disParseInstruction(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pD
 static size_t ParseEscFP(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
     PCDISOPCODE fpop;
-    NOREF(pOp);
+    RT_NOREF_PV(pOp);
 
     uint8_t    ModRM = disReadByte(pDis, offInstr);
     uint8_t    index = pDis->bOpCode - 0xD8;
@@ -759,7 +759,7 @@ static void UseSIB(PDISSTATE pDis, PDISOPPARAM pParam)
 
 static size_t ParseSIB(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pOp); NOREF(pParam);
+    RT_NOREF_PV(pOp); RT_NOREF_PV(pParam);
 
     uint8_t SIB = disReadByte(pDis, offInstr);
     offInstr++;
@@ -790,7 +790,7 @@ static size_t ParseSIB(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPP
 
 static size_t ParseSIB_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pOp); NOREF(pParam);
+    RT_NOREF_PV(pOp); RT_NOREF_PV(pParam);
 
     uint8_t SIB = disReadByte(pDis, offInstr);
     offInstr++;
@@ -829,9 +829,11 @@ static size_t ParseSIB_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis
  ********************************************************************************************************************************/
 static void disasmModRMReg(unsigned idx, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam, int fRegAddr)
 {
-    NOREF(pOp); NOREF(pDis);
+    RT_NOREF_PV(pOp); RT_NOREF_PV(pDis);
 
+#ifdef LOG_ENABLED
     unsigned type    = OP_PARM_VTYPE(pParam->fParam);
+#endif
     unsigned subtype = OP_PARM_VSUBTYPE(pParam->fParam);
     if (fRegAddr)
         subtype = (pDis->uAddrMode == DISCPUMODE_64BIT) ? OP_PARM_q : OP_PARM_d;
@@ -906,7 +908,7 @@ static void disasmModRMReg16(unsigned idx, PCDISOPCODE pOp, PDISSTATE pDis, PDIS
     static const uint8_t s_auBaseModRMReg16[8]  =
     { DISGREG_BX, DISGREG_BX, DISGREG_BP, DISGREG_BP, DISGREG_SI, DISGREG_DI, DISGREG_BP, DISGREG_BX };
 
-    NOREF(pDis); NOREF(pOp);
+    RT_NOREF_PV(pDis); RT_NOREF_PV(pOp);
     pParam->fUse |= DISUSE_REG_GEN16;
     pParam->Base.idxGenReg = s_auBaseModRMReg16[idx];
     if (idx < 4)
@@ -920,7 +922,7 @@ static void disasmModRMReg16(unsigned idx, PCDISOPCODE pOp, PDISSTATE pDis, PDIS
 
 static void disasmModRMSReg(unsigned idx, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pOp);
+    RT_NOREF_PV(pOp);
     if (idx >= DISSELREG_END)
     {
         Log(("disasmModRMSReg %d failed!!\n", idx));
@@ -1264,7 +1266,7 @@ static size_t QueryModRM_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pD
 //*****************************************************************************
 static size_t ParseIllegal(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pOp); NOREF(pParam); NOREF(pDis);
+    RT_NOREF_PV(pOp); RT_NOREF_PV(pParam); RT_NOREF_PV(pDis);
     AssertFailed();
     return offInstr;
 }
@@ -1356,7 +1358,7 @@ static size_t ParseModRM_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pD
 //*****************************************************************************
 static size_t ParseModFence(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pOp); NOREF(pParam); NOREF(pDis);
+    RT_NOREF_PV(pOp); RT_NOREF_PV(pParam); RT_NOREF_PV(pDis);
     /* Note! Only used in group 15, so we must account for the mod/rm byte. */
     return offInstr + 1;
 }
@@ -1364,7 +1366,7 @@ static size_t ParseModFence(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PD
 //*****************************************************************************
 static size_t ParseImmByte(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pOp);
+    RT_NOREF_PV(pOp);
     uint8_t byte = disReadByte(pDis, offInstr);
     if (pParam->fParam == OP_PARM_Lx)
     {
@@ -1388,14 +1390,14 @@ static size_t ParseImmByte(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDI
 //*****************************************************************************
 static size_t ParseImmByte_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pOp); NOREF(pParam); NOREF(pDis);
+    RT_NOREF_PV(pOp); RT_NOREF_PV(pParam); RT_NOREF_PV(pDis);
     return offInstr + 1;
 }
 //*****************************************************************************
 //*****************************************************************************
 static size_t ParseImmByteSX(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pOp);
+    RT_NOREF_PV(pOp);
     if (pDis->uOpMode == DISCPUMODE_32BIT)
     {
         pParam->uValue = (uint32_t)(int8_t)disReadByte(pDis, offInstr);
@@ -1421,14 +1423,14 @@ static size_t ParseImmByteSX(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, P
 //*****************************************************************************
 static size_t ParseImmByteSX_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pOp); NOREF(pParam); NOREF(pDis);
+    RT_NOREF_PV(pOp); RT_NOREF_PV(pParam); RT_NOREF_PV(pDis);
     return offInstr + 1;
 }
 //*****************************************************************************
 //*****************************************************************************
 static size_t ParseImmUshort(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pOp);
+    RT_NOREF_PV(pOp);
     pParam->uValue = disReadWord(pDis, offInstr);
     pParam->fUse  |= DISUSE_IMMEDIATE16;
     pParam->cb     = sizeof(uint16_t);
@@ -1438,14 +1440,14 @@ static size_t ParseImmUshort(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, P
 //*****************************************************************************
 static size_t ParseImmUshort_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pOp); NOREF(pParam); NOREF(pDis);
+    RT_NOREF_PV(pOp); RT_NOREF_PV(pParam); RT_NOREF_PV(pDis);
     return offInstr + 2;
 }
 //*****************************************************************************
 //*****************************************************************************
 static size_t ParseImmUlong(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pOp);
+    RT_NOREF_PV(pOp);
     pParam->uValue = disReadDWord(pDis, offInstr);
     pParam->fUse  |= DISUSE_IMMEDIATE32;
     pParam->cb     = sizeof(uint32_t);
@@ -1455,14 +1457,14 @@ static size_t ParseImmUlong(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PD
 //*****************************************************************************
 static size_t ParseImmUlong_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pOp); NOREF(pParam); NOREF(pDis);
+    RT_NOREF_PV(pOp); RT_NOREF_PV(pParam); RT_NOREF_PV(pDis);
     return offInstr + 4;
 }
 //*****************************************************************************
 //*****************************************************************************
 static size_t ParseImmQword(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pOp);
+    RT_NOREF_PV(pOp);
     pParam->uValue = disReadQWord(pDis, offInstr);
     pParam->fUse  |= DISUSE_IMMEDIATE64;
     pParam->cb     = sizeof(uint64_t);
@@ -1472,14 +1474,14 @@ static size_t ParseImmQword(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PD
 //*****************************************************************************
 static size_t ParseImmQword_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(offInstr); NOREF(pOp); NOREF(pParam); NOREF(pDis);
+    RT_NOREF_PV(offInstr); RT_NOREF_PV(pOp); RT_NOREF_PV(pParam); RT_NOREF_PV(pDis);
     return offInstr + 8;
 }
 //*****************************************************************************
 //*****************************************************************************
 static size_t ParseImmV(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pOp);
+    RT_NOREF_PV(pOp);
     if (pDis->uOpMode == DISCPUMODE_32BIT)
     {
         pParam->uValue = disReadDWord(pDis, offInstr);
@@ -1505,7 +1507,7 @@ static size_t ParseImmV(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOP
 //*****************************************************************************
 static size_t ParseImmV_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(offInstr); NOREF(pOp); NOREF(pParam);
+    RT_NOREF_PV(offInstr); RT_NOREF_PV(pOp); RT_NOREF_PV(pParam);
     if (pDis->uOpMode == DISCPUMODE_32BIT)
         return offInstr + 4;
     if (pDis->uOpMode == DISCPUMODE_64BIT)
@@ -1516,7 +1518,7 @@ static size_t ParseImmV_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDi
 //*****************************************************************************
 static size_t ParseImmZ(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pOp);
+    RT_NOREF_PV(pOp);
     /* Word for 16-bit operand-size or doubleword for 32 or 64-bit operand-size. */
     if (pDis->uOpMode == DISCPUMODE_16BIT)
     {
@@ -1545,7 +1547,7 @@ static size_t ParseImmZ(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOP
 //*****************************************************************************
 static size_t ParseImmZ_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(offInstr); NOREF(pOp); NOREF(pParam);
+    RT_NOREF_PV(offInstr); RT_NOREF_PV(pOp); RT_NOREF_PV(pParam);
     /* Word for 16-bit operand-size or doubleword for 32 or 64-bit operand-size. */
     if (pDis->uOpMode == DISCPUMODE_16BIT)
         return offInstr + 2;
@@ -1557,7 +1559,7 @@ static size_t ParseImmZ_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDi
 //*****************************************************************************
 static size_t ParseImmBRel(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pOp);
+    RT_NOREF_PV(pOp);
     pParam->uValue = disReadByte(pDis, offInstr);
     pParam->fUse  |= DISUSE_IMMEDIATE8_REL;
     pParam->cb     = sizeof(uint8_t);
@@ -1568,7 +1570,7 @@ static size_t ParseImmBRel(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDI
 //*****************************************************************************
 static size_t ParseImmBRel_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(offInstr); NOREF(pOp); NOREF(pParam); NOREF(pDis);
+    RT_NOREF_PV(offInstr); RT_NOREF_PV(pOp); RT_NOREF_PV(pParam); RT_NOREF_PV(pDis);
     return offInstr + 1;
 }
 //*****************************************************************************
@@ -1576,7 +1578,7 @@ static size_t ParseImmBRel_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE
 //*****************************************************************************
 static size_t ParseImmVRel(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pOp);
+    RT_NOREF_PV(pOp);
     if (pDis->uOpMode == DISCPUMODE_32BIT)
     {
         pParam->uValue = disReadDWord(pDis, offInstr);
@@ -1604,7 +1606,7 @@ static size_t ParseImmVRel(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDI
 //*****************************************************************************
 static size_t ParseImmVRel_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(offInstr); NOREF(pOp); NOREF(pParam);
+    RT_NOREF_PV(offInstr); RT_NOREF_PV(pOp); RT_NOREF_PV(pParam);
     if (pDis->uOpMode == DISCPUMODE_16BIT)
         return offInstr + 2;
     /* Both 32 & 64 bits mode use 32 bits relative immediates. */
@@ -1614,7 +1616,7 @@ static size_t ParseImmVRel_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE
 //*****************************************************************************
 static size_t ParseImmAddr(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pOp);
+    RT_NOREF_PV(pOp);
     if (pDis->uAddrMode == DISCPUMODE_32BIT)
     {
         if (OP_PARM_VSUBTYPE(pParam->fParam) == OP_PARM_p)
@@ -1677,7 +1679,7 @@ static size_t ParseImmAddr(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDI
 //*****************************************************************************
 static size_t ParseImmAddr_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(offInstr); NOREF(pOp);
+    RT_NOREF_PV(offInstr); RT_NOREF_PV(pOp);
     if (pDis->uAddrMode == DISCPUMODE_32BIT)
     {
         if (OP_PARM_VSUBTYPE(pParam->fParam) == OP_PARM_p)
@@ -1697,7 +1699,7 @@ static size_t ParseImmAddr_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE
 //*****************************************************************************
 static size_t ParseImmAddrF(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pOp);
+    RT_NOREF_PV(pOp);
     // immediate far pointers - only 16:16 or 16:32; determined by operand, *not* address size!
     Assert(pDis->uOpMode == DISCPUMODE_16BIT || pDis->uOpMode == DISCPUMODE_32BIT);
     Assert(OP_PARM_VSUBTYPE(pParam->fParam) == OP_PARM_p);
@@ -1721,10 +1723,10 @@ static size_t ParseImmAddrF(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PD
 //*****************************************************************************
 static size_t ParseImmAddrF_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(offInstr); NOREF(pOp);
+    RT_NOREF_PV(offInstr); RT_NOREF_PV(pOp);
     // immediate far pointers - only 16:16 or 16:32
     Assert(pDis->uOpMode == DISCPUMODE_16BIT || pDis->uOpMode == DISCPUMODE_32BIT);
-    Assert(OP_PARM_VSUBTYPE(pParam->fParam) == OP_PARM_p);
+    Assert(OP_PARM_VSUBTYPE(pParam->fParam) == OP_PARM_p); RT_NOREF_PV(pParam);
     if (pDis->uOpMode == DISCPUMODE_32BIT)
         return offInstr + 4 + 2;    /* far 16:32 pointer */
     return offInstr + 2 + 2;        /* far 16:16 pointer */
@@ -1733,7 +1735,7 @@ static size_t ParseImmAddrF_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE
 //*****************************************************************************
 static size_t ParseFixedReg(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(offInstr);
+    RT_NOREF_PV(offInstr);
 
     /*
      * Sets up flags for stored in OPC fixed registers.
@@ -1835,7 +1837,7 @@ static size_t ParseFixedReg(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PD
 //*****************************************************************************
 static size_t ParseXv(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pOp);
+    RT_NOREF_PV(pOp);
 
     pParam->fUse |= DISUSE_POINTER_DS_BASED;
     if (pDis->uAddrMode == DISCPUMODE_32BIT)
@@ -1860,7 +1862,7 @@ static size_t ParseXv(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPA
 //*****************************************************************************
 static size_t ParseXb(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pOp);
+    RT_NOREF_PV(pOp);
 
     pParam->fUse |= DISUSE_POINTER_DS_BASED;
     if (pDis->uAddrMode == DISCPUMODE_32BIT)
@@ -1885,7 +1887,7 @@ static size_t ParseXb(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPA
 //*****************************************************************************
 static size_t ParseYv(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pOp);
+    RT_NOREF_PV(pOp);
 
     pParam->fUse |= DISUSE_POINTER_ES_BASED;
     if (pDis->uAddrMode == DISCPUMODE_32BIT)
@@ -1910,7 +1912,7 @@ static size_t ParseYv(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPA
 //*****************************************************************************
 static size_t ParseYb(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pOp);
+    RT_NOREF_PV(pOp);
 
     pParam->fUse |= DISUSE_POINTER_ES_BASED;
     if (pDis->uAddrMode == DISCPUMODE_32BIT)
@@ -1935,7 +1937,7 @@ static size_t ParseYb(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPA
 //*****************************************************************************
 static size_t ParseInvOpModRm(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pOp); NOREF(pDis); NOREF(pParam);
+    RT_NOREF_PV(pOp); RT_NOREF_PV(pDis); RT_NOREF_PV(pParam);
     /* This is used to avoid a bunch of special hacks to get the ModRM byte
        included when encountering invalid opcodes in groups. */
     return offInstr + 1;
@@ -1944,7 +1946,7 @@ static size_t ParseInvOpModRm(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis,
 //*****************************************************************************
 static size_t ParseVexDest(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pOp);
+    RT_NOREF_PV(pOp);
 
     unsigned type = OP_PARM_VTYPE(pParam->fParam);
 
@@ -1967,7 +1969,7 @@ static size_t ParseVexDest(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDI
                 pParam->fUse |= DISUSE_REG_GEN64;
             else
                 pParam->fUse |= DISUSE_REG_GEN32;
-            // TODO: Check if the register number is correct
+            /// @todo Check if the register number is correct
             pParam->Base.idxGenReg = (pDis->bVexDestReg >> 1) ^ 0xf;
         break;
     }
@@ -1978,7 +1980,7 @@ static size_t ParseVexDest(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDI
 //*****************************************************************************
 static size_t ParseTwoByteEsc(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pOp); NOREF(pParam);
+    RT_NOREF_PV(pOp); RT_NOREF_PV(pParam);
 
     /* 2nd byte */
     pDis->bOpCode = disReadByte(pDis, offInstr);
@@ -2041,7 +2043,7 @@ static size_t ParseTwoByteEsc(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis,
 //*****************************************************************************
 static size_t ParseThreeByteEsc4(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pOp); NOREF(pParam);
+    RT_NOREF_PV(pOp); RT_NOREF_PV(pParam);
 
     /* 3rd byte */
     pDis->bOpCode = disReadByte(pDis, offInstr);
@@ -2143,7 +2145,7 @@ static size_t ParseThreeByteEsc4(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDi
 //*****************************************************************************
 static size_t ParseThreeByteEsc5(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pOp); NOREF(pParam);
+    RT_NOREF_PV(pOp); RT_NOREF_PV(pParam);
 
     /* 3rd byte */
     pDis->bOpCode = disReadByte(pDis, offInstr);
@@ -2187,7 +2189,7 @@ static size_t ParseThreeByteEsc5(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDi
 //*****************************************************************************
 static size_t ParseNopPause(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pParam);
+    RT_NOREF_PV(pParam);
 
     if (pDis->fPrefix & DISPREFIX_REP)
     {
@@ -2203,7 +2205,7 @@ static size_t ParseNopPause(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PD
 //*****************************************************************************
 static size_t ParseImmGrpl(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pParam);
+    RT_NOREF_PV(pParam);
 
     uint8_t  modrm = disReadByte(pDis, offInstr);
     uint8_t  reg   = MODRM_REG(modrm);
@@ -2217,7 +2219,7 @@ static size_t ParseImmGrpl(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDI
 //*****************************************************************************
 static size_t ParseShiftGrp2(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pParam);
+    RT_NOREF_PV(pParam);
 
     unsigned idx;
     switch (pDis->bOpCode)
@@ -2252,7 +2254,7 @@ static size_t ParseShiftGrp2(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, P
 static size_t ParseGrp3(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
     unsigned idx = (pDis->bOpCode - 0xF6) * 8;
-    NOREF(pParam);
+    RT_NOREF_PV(pParam);
 
     uint8_t modrm = disReadByte(pDis, offInstr);
     uint8_t reg   = MODRM_REG(modrm);
@@ -2265,7 +2267,7 @@ static size_t ParseGrp3(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOP
 //*****************************************************************************
 static size_t ParseGrp4(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pParam);
+    RT_NOREF_PV(pParam);
 
     uint8_t modrm = disReadByte(pDis, offInstr);
     uint8_t reg   = MODRM_REG(modrm);
@@ -2278,7 +2280,7 @@ static size_t ParseGrp4(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOP
 //*****************************************************************************
 static size_t ParseGrp5(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pParam);
+    RT_NOREF_PV(pParam);
 
     uint8_t modrm = disReadByte(pDis, offInstr);
     uint8_t reg   = MODRM_REG(modrm);
@@ -2312,7 +2314,7 @@ static size_t Parse3DNow(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISO
 
     AssertMsg(offStrict == offRet - 1  /* the imm8_opcode */ || pOp->uOpcode == OP_INVALID,
               ("offStrict=%#x offRet=%#x uOpCode=%u\n", offStrict, offRet, pOp->uOpcode));
-    NOREF(offStrict);
+    RT_NOREF_PV(offStrict);
 
     return offRet;
 }
@@ -2320,7 +2322,7 @@ static size_t Parse3DNow(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISO
 //*****************************************************************************
 static size_t ParseGrp6(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pParam);
+    RT_NOREF_PV(pParam);
 
     uint8_t modrm = disReadByte(pDis, offInstr);
     uint8_t reg   = MODRM_REG(modrm);
@@ -2333,7 +2335,7 @@ static size_t ParseGrp6(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOP
 //*****************************************************************************
 static size_t ParseGrp7(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pParam);
+    RT_NOREF_PV(pParam);
 
     uint8_t modrm = disReadByte(pDis, offInstr);
     uint8_t mod   = MODRM_MOD(modrm);
@@ -2359,7 +2361,7 @@ static size_t ParseGrp7(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOP
 //*****************************************************************************
 static size_t ParseGrp8(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pParam);
+    RT_NOREF_PV(pParam);
 
     uint8_t modrm = disReadByte(pDis, offInstr);
     uint8_t reg   = MODRM_REG(modrm);
@@ -2372,7 +2374,7 @@ static size_t ParseGrp8(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOP
 //*****************************************************************************
 static size_t ParseGrp9(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pParam);
+    RT_NOREF_PV(pParam);
 
     uint8_t modrm = disReadByte(pDis, offInstr);
     uint8_t reg   = MODRM_REG(modrm);
@@ -2385,7 +2387,7 @@ static size_t ParseGrp9(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOP
 //*****************************************************************************
 static size_t ParseGrp10(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pParam);
+    RT_NOREF_PV(pParam);
 
     uint8_t modrm = disReadByte(pDis, offInstr);
     uint8_t reg   = MODRM_REG(modrm);
@@ -2398,7 +2400,7 @@ static size_t ParseGrp10(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISO
 //*****************************************************************************
 static size_t ParseGrp12(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pParam);
+    RT_NOREF_PV(pParam);
 
     uint8_t modrm = disReadByte(pDis, offInstr);
     uint8_t reg   = MODRM_REG(modrm);
@@ -2414,7 +2416,7 @@ static size_t ParseGrp12(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISO
 //*****************************************************************************
 static size_t ParseGrp13(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pParam);
+    RT_NOREF_PV(pParam);
 
     uint8_t modrm = disReadByte(pDis, offInstr);
     uint8_t reg   = MODRM_REG(modrm);
@@ -2429,7 +2431,7 @@ static size_t ParseGrp13(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISO
 //*****************************************************************************
 static size_t ParseGrp14(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pParam);
+    RT_NOREF_PV(pParam);
 
     uint8_t modrm = disReadByte(pDis, offInstr);
     uint8_t reg   = MODRM_REG(modrm);
@@ -2444,7 +2446,7 @@ static size_t ParseGrp14(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISO
 //*****************************************************************************
 static size_t ParseGrp15(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pParam);
+    RT_NOREF_PV(pParam);
 
     uint8_t modrm = disReadByte(pDis, offInstr);
     uint8_t mod   = MODRM_MOD(modrm);
@@ -2462,7 +2464,7 @@ static size_t ParseGrp15(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISO
 //*****************************************************************************
 static size_t ParseGrp16(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pParam);
+    RT_NOREF_PV(pParam);
 
     uint8_t modrm = disReadByte(pDis, offInstr);
     pOp = &g_aMapX86_Group16[MODRM_REG(modrm)];
@@ -2473,7 +2475,7 @@ static size_t ParseGrp16(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISO
 //*****************************************************************************
 static size_t ParseVex2b(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pOp); NOREF(pParam);
+    RT_NOREF_PV(pOp); RT_NOREF_PV(pParam);
 
     PCDISOPCODE pOpCode = &g_InvalidOpcode[0];
 
@@ -2520,7 +2522,7 @@ static size_t ParseVex2b(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISO
 //*****************************************************************************
 static size_t ParseVex3b(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
 {
-    NOREF(pOp); NOREF(pParam);
+    RT_NOREF_PV(pOp); RT_NOREF_PV(pParam);
 
     PCDISOPCODE pOpCode = NULL;
 
diff --git a/src/VBox/Disassembler/DisasmFormatBytes.cpp b/src/VBox/Disassembler/DisasmFormatBytes.cpp
index 5febdb3..64e03e8 100644
--- a/src/VBox/Disassembler/DisasmFormatBytes.cpp
+++ b/src/VBox/Disassembler/DisasmFormatBytes.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Disassembler/DisasmFormatYasm.cpp b/src/VBox/Disassembler/DisasmFormatYasm.cpp
index 5681480..818498a 100644
--- a/src/VBox/Disassembler/DisasmFormatYasm.cpp
+++ b/src/VBox/Disassembler/DisasmFormatYasm.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -39,10 +39,12 @@ static const char g_aszYasmRegGen16[16][5] =
 {
     "ax\0\0", "cx\0\0", "dx\0\0", "bx\0\0", "sp\0\0", "bp\0\0", "si\0\0", "di\0\0", "r8w\0",  "r9w\0",  "r10w",  "r11w",  "r12w",  "r13w",  "r14w",  "r15w"
 };
+#if 0 /* unused */
 static const char g_aszYasmRegGen1616[8][6] =
 {
     "bx+si", "bx+di", "bp+si", "bp+di", "si\0\0\0", "di\0\0\0", "bp\0\0\0", "bx\0\0\0"
 };
+#endif
 static const char g_aszYasmRegGen32[16][5] =
 {
     "eax\0",  "ecx\0",  "edx\0",  "ebx\0",  "esp\0",  "ebp\0",  "esi\0",  "edi\0",  "r8d\0",  "r9d\0",  "r10d",  "r11d",  "r12d",  "r13d",  "r14d",  "r15d"
@@ -96,6 +98,8 @@ static const char g_aszYasmRegTRx[16][5] =
  */
 static const char *disasmFormatYasmBaseReg(PCDISSTATE pDis, PCDISOPPARAM pParam, size_t *pcchReg)
 {
+    RT_NOREF_PV(pDis);
+
     switch (pParam->fUse & (  DISUSE_REG_GEN8 | DISUSE_REG_GEN16 | DISUSE_REG_GEN32 | DISUSE_REG_GEN64
                             | DISUSE_REG_FP   | DISUSE_REG_MMX   | DISUSE_REG_XMM   | DISUSE_REG_YMM
                             | DISUSE_REG_CR   | DISUSE_REG_DBG   | DISUSE_REG_SEG   | DISUSE_REG_TEST))
@@ -584,7 +588,7 @@ DISDECL(size_t) DISFormatYasmEx(PCDISSTATE pDis, char *pszBuf, size_t cchBuf, ui
                     for (unsigned i = 3; i < pDis->cbInstr; i++)
                     {
                         PUT_C(',');
-                        PUT_NUM_8(0x90); ///@todo fixme.
+                        PUT_NUM_8(0x90); /// @todo fixme.
                     }
                     pszFmt = "";
                 }
@@ -1129,6 +1133,7 @@ DISDECL(size_t) DISFormatYasmEx(PCDISSTATE pDis, char *pszBuf, size_t cchBuf, ui
                         PUT_FAR();
                         PUT_SIZE_OVERRIDE();
                         PUT_SEGMENT_OVERRIDE();
+                        off = 0;
                         int rc = VERR_SYMBOL_NOT_FOUND;
                         switch (pParam->fUse & (DISUSE_IMMEDIATE_ADDR_16_16 | DISUSE_IMMEDIATE_ADDR_16_32 | DISUSE_DISPLACEMENT64 | DISUSE_DISPLACEMENT32 | DISUSE_DISPLACEMENT16))
                         {
@@ -1177,6 +1182,7 @@ DISDECL(size_t) DISFormatYasmEx(PCDISSTATE pDis, char *pszBuf, size_t cchBuf, ui
                         PUT_SIZE_OVERRIDE();
                         PUT_C('[');
                         PUT_SEGMENT_OVERRIDE();
+                        off = 0;
                         int rc = VERR_SYMBOL_NOT_FOUND;
                         switch (pParam->fUse & (DISUSE_IMMEDIATE_ADDR_16_16 | DISUSE_IMMEDIATE_ADDR_16_32 | DISUSE_DISPLACEMENT64 | DISUSE_DISPLACEMENT32 | DISUSE_DISPLACEMENT16))
                         {
@@ -1364,7 +1370,7 @@ DISDECL(bool) DISFormatYasmIsOddEncoding(PDISSTATE pDis)
     /*
      * Mod rm + SIB: Check for duplicate EBP encodings that yasm won't use for very good reasons.
      */
-    if (    pDis->uAddrMode != DISCPUMODE_16BIT ///@todo correct?
+    if (    pDis->uAddrMode != DISCPUMODE_16BIT /// @todo correct?
         &&  pDis->ModRM.Bits.Rm == 4
         &&  pDis->ModRM.Bits.Mod != 3)
     {
diff --git a/src/VBox/Disassembler/DisasmInternal.h b/src/VBox/Disassembler/DisasmInternal.h
index c640d63..85a8382 100644
--- a/src/VBox/Disassembler/DisasmInternal.h
+++ b/src/VBox/Disassembler/DisasmInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Disassembler/DisasmReg.cpp b/src/VBox/Disassembler/DisasmReg.cpp
index 6e5cba9..04c028f 100644
--- a/src/VBox/Disassembler/DisasmReg.cpp
+++ b/src/VBox/Disassembler/DisasmReg.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Disassembler/DisasmTables.cpp b/src/VBox/Disassembler/DisasmTables.cpp
index 7472c6a..2c871b4 100644
--- a/src/VBox/Disassembler/DisasmTables.cpp
+++ b/src/VBox/Disassembler/DisasmTables.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -26,8 +26,8 @@
 
 
 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-//TODO: Verify tables for correctness
-//TODO: opcode type (harmless, potentially dangerous, dangerous)
+/// @todo Verify tables for correctness
+/// @todo opcode type (harmless, potentially dangerous, dangerous)
 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
 #ifndef DIS_CORE_ONLY
@@ -312,7 +312,7 @@ const DISOPCODE g_aOneByteMapX86[256] =
     OP("retn",               0,                  0,                 0,          OP_RETN,        OP_PARM_NONE,    OP_PARM_NONE,   OP_PARM_NONE,   DISOPTYPE_CONTROLFLOW | DISOPTYPE_UNCOND_CONTROLFLOW | DISOPTYPE_FORCED_64_OP_SIZE),
     OP("les %Gv,%Mp",        IDX_ParseModRM,     IDX_UseModRM,      0,          OP_LES,         OP_PARM_Gv,      OP_PARM_Mp,     OP_PARM_NONE,   DISOPTYPE_HARMLESS | DISOPTYPE_INVALID_64),
     OP("lds %Gv,%Mp",        IDX_ParseModRM,     IDX_UseModRM,      0,          OP_LDS,         OP_PARM_Gv,      OP_PARM_Mp,     OP_PARM_NONE,   DISOPTYPE_HARMLESS | DISOPTYPE_RRM_DANGEROUS | DISOPTYPE_INVALID_64),
-    /* @todo these two are actually group11 */
+    /** @todo these two are actually group11 */
     OP("mov %Eb,%Ib",        IDX_ParseModRM,     IDX_ParseImmByte,  0,          OP_MOV,         OP_PARM_Eb,      OP_PARM_Ib,     OP_PARM_NONE,   DISOPTYPE_HARMLESS),
     OP("mov %Ev,%Iz",        IDX_ParseModRM,     IDX_ParseImmZ,     0,          OP_MOV,         OP_PARM_Ev,      OP_PARM_Iz,     OP_PARM_NONE,   DISOPTYPE_HARMLESS),
     OP("enter %Iw,%Ib",      IDX_ParseImmUshort, IDX_ParseImmByte,  0,          OP_ENTER,       OP_PARM_Iw,      OP_PARM_Ib,     OP_PARM_NONE,   DISOPTYPE_HARMLESS),
@@ -2216,10 +2216,10 @@ const DISOPCODE g_aMapX86_EscF1_Low[8] =
     INVALID_OPCODE,
     OP("fst %Md",            IDX_ParseModRM,     0,          0,          OP_FST,     OP_PARM_Md,         OP_PARM_NONE,   OP_PARM_NONE,   DISOPTYPE_HARMLESS),
     OP("fstp %Md",           IDX_ParseModRM,     0,          0,          OP_FSTP,    OP_PARM_Md,         OP_PARM_NONE,   OP_PARM_NONE,   DISOPTYPE_HARMLESS),
-    //TODO:??
+    /// @todo ??
     OP("fldenv %M",          IDX_ParseModRM,     0,          0,          OP_FLDENV,  OP_PARM_M,          OP_PARM_NONE,   OP_PARM_NONE,   DISOPTYPE_HARMLESS),
     OP("fldcw %Ew",          IDX_ParseModRM,     0,          0,          OP_FSUBR,   OP_PARM_Ew,         OP_PARM_NONE,   OP_PARM_NONE,   DISOPTYPE_HARMLESS),
-    //TODO:??
+    /// @todo ??
     OP("fstenv %M",          IDX_ParseModRM,     0,          0,          OP_FSTENV,  OP_PARM_M,          OP_PARM_NONE,   OP_PARM_NONE,   DISOPTYPE_HARMLESS),
     OP("fstcw %Ew",          IDX_ParseModRM,     0,          0,          OP_FSTCW,   OP_PARM_Ew,         OP_PARM_NONE,   OP_PARM_NONE,   DISOPTYPE_HARMLESS),
 };
diff --git a/src/VBox/Disassembler/DisasmTablesX64.cpp b/src/VBox/Disassembler/DisasmTablesX64.cpp
index 66cb244..20f7af1 100644
--- a/src/VBox/Disassembler/DisasmTablesX64.cpp
+++ b/src/VBox/Disassembler/DisasmTablesX64.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -25,8 +25,8 @@
 
 
 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-//TODO: Verify tables for correctness
-//TODO: opcode type (harmless, potentially dangerous, dangerous)
+/// @todo Verify tables for correctness
+/// @todo opcode type (harmless, potentially dangerous, dangerous)
 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
 #ifndef DIS_CORE_ONLY
@@ -286,7 +286,7 @@ const DISOPCODE g_aOneByteMapX64[256] =
     OP("retn",               0,                  0,                 0,          OP_RETN,        OP_PARM_NONE,    OP_PARM_NONE,   OP_PARM_NONE,   DISOPTYPE_CONTROLFLOW | DISOPTYPE_UNCOND_CONTROLFLOW | DISOPTYPE_FORCED_64_OP_SIZE),
     OP("VEX 3-byte",         IDX_ParseVex3b,     0,                 0,          OP_VEX3B,       OP_PARM_NONE,    OP_PARM_NONE,   OP_PARM_NONE,   DISOPTYPE_HARMLESS),
     OP("VEX 2-byte",         IDX_ParseVex2b,     0,                 0,          OP_VEX2B,       OP_PARM_NONE,    OP_PARM_NONE,   OP_PARM_NONE,   DISOPTYPE_HARMLESS),
-    /* @todo these two are actually group11 */
+    /** @todo these two are actually group11 */
     OP("mov %Eb,%Ib",        IDX_ParseModRM,     IDX_ParseImmByte,  0,          OP_MOV,         OP_PARM_Eb,      OP_PARM_Ib,     OP_PARM_NONE,   DISOPTYPE_HARMLESS),
     OP("mov %Ev,%Iz",        IDX_ParseModRM,     IDX_ParseImmZ,     0,          OP_MOV,         OP_PARM_Ev,      OP_PARM_Iz,     OP_PARM_NONE,   DISOPTYPE_HARMLESS),
     OP("enter %Iw,%Ib",      IDX_ParseImmUshort, IDX_ParseImmByte,  0,          OP_ENTER,       OP_PARM_Iw,      OP_PARM_Ib,     OP_PARM_NONE,   DISOPTYPE_HARMLESS),
diff --git a/src/VBox/Disassembler/Makefile.kmk b/src/VBox/Disassembler/Makefile.kmk
index c118ed6..7fd857f 100644
--- a/src/VBox/Disassembler/Makefile.kmk
+++ b/src/VBox/Disassembler/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Disassembler/testcase/Makefile.kmk b/src/VBox/Disassembler/testcase/Makefile.kmk
index 82782d9..25d4361 100644
--- a/src/VBox/Disassembler/testcase/Makefile.kmk
+++ b/src/VBox/Disassembler/testcase/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Disassembler/testcase/tstAsm.mac b/src/VBox/Disassembler/testcase/tstAsm.mac
index d4d8a72..9258fad 100644
--- a/src/VBox/Disassembler/testcase/tstAsm.mac
+++ b/src/VBox/Disassembler/testcase/tstAsm.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2008-2015 Oracle Corporation
+; Copyright (C) 2008-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Disassembler/testcase/tstAsm3DNow-1.asm b/src/VBox/Disassembler/testcase/tstAsm3DNow-1.asm
index f4c6813..b7060b7 100644
--- a/src/VBox/Disassembler/testcase/tstAsm3DNow-1.asm
+++ b/src/VBox/Disassembler/testcase/tstAsm3DNow-1.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2008-2015 Oracle Corporation
+; Copyright (C) 2008-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Disassembler/testcase/tstAsmFnstsw-1.asm b/src/VBox/Disassembler/testcase/tstAsmFnstsw-1.asm
index cf13ad4..baaafe1 100644
--- a/src/VBox/Disassembler/testcase/tstAsmFnstsw-1.asm
+++ b/src/VBox/Disassembler/testcase/tstAsmFnstsw-1.asm
@@ -8,7 +8,7 @@
 ;
 
 ;
-; Copyright (C) 2008-2015 Oracle Corporation
+; Copyright (C) 2008-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Disassembler/testcase/tstAsmLock-1.asm b/src/VBox/Disassembler/testcase/tstAsmLock-1.asm
index bf9b831..efa04e7 100644
--- a/src/VBox/Disassembler/testcase/tstAsmLock-1.asm
+++ b/src/VBox/Disassembler/testcase/tstAsmLock-1.asm
@@ -8,7 +8,7 @@
 ;
 
 ;
-; Copyright (C) 2008-2015 Oracle Corporation
+; Copyright (C) 2008-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Disassembler/testcase/tstAsmLock-2.asm b/src/VBox/Disassembler/testcase/tstAsmLock-2.asm
index 6ac1754..24cce3d 100644
--- a/src/VBox/Disassembler/testcase/tstAsmLock-2.asm
+++ b/src/VBox/Disassembler/testcase/tstAsmLock-2.asm
@@ -11,7 +11,7 @@
 ;
 
 ;
-; Copyright (C) 2008-2015 Oracle Corporation
+; Copyright (C) 2008-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Disassembler/testcase/tstAsmLock-3.asm b/src/VBox/Disassembler/testcase/tstAsmLock-3.asm
index bb25c44..1f278ea 100644
--- a/src/VBox/Disassembler/testcase/tstAsmLock-3.asm
+++ b/src/VBox/Disassembler/testcase/tstAsmLock-3.asm
@@ -7,7 +7,7 @@
 ;
 
 ;
-; Copyright (C) 2008-2015 Oracle Corporation
+; Copyright (C) 2008-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Disassembler/testcase/tstAsmMovFixedReg-1.asm b/src/VBox/Disassembler/testcase/tstAsmMovFixedReg-1.asm
index 615c74c..1c5beea 100644
--- a/src/VBox/Disassembler/testcase/tstAsmMovFixedReg-1.asm
+++ b/src/VBox/Disassembler/testcase/tstAsmMovFixedReg-1.asm
@@ -8,7 +8,7 @@
 ;
 
 ;
-; Copyright (C) 2013-2015 Oracle Corporation
+; Copyright (C) 2013-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Disassembler/testcase/tstAsmMovSeg-1.asm b/src/VBox/Disassembler/testcase/tstAsmMovSeg-1.asm
index 4fdc42c..0623855 100644
--- a/src/VBox/Disassembler/testcase/tstAsmMovSeg-1.asm
+++ b/src/VBox/Disassembler/testcase/tstAsmMovSeg-1.asm
@@ -8,7 +8,7 @@
 ;
 
 ;
-; Copyright (C) 2008-2015 Oracle Corporation
+; Copyright (C) 2008-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Disassembler/testcase/tstAsmMovzx-1.asm b/src/VBox/Disassembler/testcase/tstAsmMovzx-1.asm
index 6e42e77..a5d87a6 100644
--- a/src/VBox/Disassembler/testcase/tstAsmMovzx-1.asm
+++ b/src/VBox/Disassembler/testcase/tstAsmMovzx-1.asm
@@ -8,7 +8,7 @@
 ;
 
 ;
-; Copyright (C) 2008-2015 Oracle Corporation
+; Copyright (C) 2008-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Disassembler/testcase/tstAsmPop-1.asm b/src/VBox/Disassembler/testcase/tstAsmPop-1.asm
index be65487..0724743 100644
--- a/src/VBox/Disassembler/testcase/tstAsmPop-1.asm
+++ b/src/VBox/Disassembler/testcase/tstAsmPop-1.asm
@@ -8,7 +8,7 @@
 ;
 
 ;
-; Copyright (C) 2008-2015 Oracle Corporation
+; Copyright (C) 2008-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Disassembler/testcase/tstAsmPush-1.asm b/src/VBox/Disassembler/testcase/tstAsmPush-1.asm
index 727d135..8af9d94 100644
--- a/src/VBox/Disassembler/testcase/tstAsmPush-1.asm
+++ b/src/VBox/Disassembler/testcase/tstAsmPush-1.asm
@@ -8,7 +8,7 @@
 ;
 
 ;
-; Copyright (C) 2008-2015 Oracle Corporation
+; Copyright (C) 2008-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Disassembler/testcase/tstAsmRegs-1.asm b/src/VBox/Disassembler/testcase/tstAsmRegs-1.asm
index 6df0522..d680261 100644
--- a/src/VBox/Disassembler/testcase/tstAsmRegs-1.asm
+++ b/src/VBox/Disassembler/testcase/tstAsmRegs-1.asm
@@ -8,7 +8,7 @@
 ;
 
 ;
-; Copyright (C) 2008-2015 Oracle Corporation
+; Copyright (C) 2008-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Disassembler/testcase/tstAsmSignExtend-1.asm b/src/VBox/Disassembler/testcase/tstAsmSignExtend-1.asm
index 5f3f94c..af0ee2d 100644
--- a/src/VBox/Disassembler/testcase/tstAsmSignExtend-1.asm
+++ b/src/VBox/Disassembler/testcase/tstAsmSignExtend-1.asm
@@ -8,7 +8,7 @@
 ;
 
 ;
-; Copyright (C) 2008-2015 Oracle Corporation
+; Copyright (C) 2008-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Disassembler/testcase/tstDisasm-1.cpp b/src/VBox/Disassembler/testcase/tstDisasm-1.cpp
index efd0bf7..f275bf6 100644
--- a/src/VBox/Disassembler/testcase/tstDisasm-1.cpp
+++ b/src/VBox/Disassembler/testcase/tstDisasm-1.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -90,6 +90,7 @@ static void testDisas(const char *pszSub, uint8_t const *pabInstrs, uintptr_t uE
 
 static DECLCALLBACK(int) testReadBytes(PDISSTATE pDis, uint8_t offInstr, uint8_t cbMinRead, uint8_t cbMaxRead)
 {
+    RT_NOREF1(cbMinRead);
     memcpy(&pDis->abInstr[offInstr], (void *)((uintptr_t)pDis->uInstrAddr + offInstr), cbMaxRead);
     pDis->cbCachedInstr = offInstr + cbMaxRead;
     return VINF_SUCCESS;
@@ -154,6 +155,7 @@ void testTwo(void)
 
 int main(int argc, char **argv)
 {
+    RT_NOREF2(argc, argv);
     RTTEST hTest;
     RTEXITCODE rcExit = RTTestInitAndCreate("tstDisasm", &hTest);
     if (rcExit)
diff --git a/src/VBox/Disassembler/testcase/tstDisasm-1A.asm b/src/VBox/Disassembler/testcase/tstDisasm-1A.asm
index 7cbe5b8..db59c8f 100644
--- a/src/VBox/Disassembler/testcase/tstDisasm-1A.asm
+++ b/src/VBox/Disassembler/testcase/tstDisasm-1A.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Disassembler/testcase/tstDisasm-2.cpp b/src/VBox/Disassembler/testcase/tstDisasm-2.cpp
index e480e66..a411505 100644
--- a/src/VBox/Disassembler/testcase/tstDisasm-2.cpp
+++ b/src/VBox/Disassembler/testcase/tstDisasm-2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -170,6 +170,7 @@ static bool MyDisasIsValidInstruction(DISSTATE const *pDis)
  */
 static DECLCALLBACK(int) MyDisasInstrRead(PDISSTATE pDis, uint8_t offInstr, uint8_t cbMinRead, uint8_t cbMaxRead)
 {
+    RT_NOREF1(cbMaxRead);
     PMYDISSTATE pState   = (PMYDISSTATE)pDis;
     RTUINTPTR   uSrcAddr = pState->Dis.uInstrAddr + offInstr;
     if (RT_LIKELY(   pState->uNextAddr == uSrcAddr
@@ -181,7 +182,7 @@ static DECLCALLBACK(int) MyDisasInstrRead(PDISSTATE pDis, uint8_t offInstr, uint
         //size_t cbToRead    = cbMaxRead;
         size_t cbToRead    = cbMinRead;
         memcpy(&pState->Dis.abInstr[offInstr], pState->pbNext, cbToRead);
-        pState->Dis.cbCachedInstr = offInstr + cbToRead;
+        pState->Dis.cbCachedInstr = offInstr + (uint8_t)cbToRead;
         pState->pbNext    += cbToRead;
         pState->cbLeft    -= cbToRead;
         pState->uNextAddr += cbToRead;
@@ -238,6 +239,8 @@ static int MyDisasmBlock(const char *argv0, DISCPUMODE enmCpuMode, uint64_t uAdd
                          uint64_t uHighlightAddr, uint8_t *pbFile, size_t cbFile,
                          ASMSTYLE enmStyle, bool fListing, UNDEFOPHANDLING enmUndefOp)
 {
+    RT_NOREF1(fListing);
+
     /*
      * Initialize the CPU context.
      */
@@ -571,7 +574,7 @@ int main(int argc, char **argv)
                 break;
 
             case 'V':
-                RTPrintf("$Revision: 102121 $\n");
+                RTPrintf("$Revision: 109302 $\n");
                 return 0;
 
             default:
diff --git a/src/VBox/ExtPacks/BusMouseSample/BusMouse.cpp b/src/VBox/ExtPacks/BusMouseSample/BusMouse.cpp
index 686b6e7..eca9c84 100644
--- a/src/VBox/ExtPacks/BusMouseSample/BusMouse.cpp
+++ b/src/VBox/ExtPacks/BusMouseSample/BusMouse.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * Permission is hereby granted, free of charge, to any person
  * obtaining a copy of this software and associated documentation
@@ -243,6 +243,7 @@ static void bms_mouse_event(MouState *pThis, int dx, int dy, int dz, int dw,
 
 static DECLCALLBACK(void) bmsTimerCallback(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
 {
+    RT_NOREF(pvUser);
     MouState   *pThis = PDMINS_2_DATA(pDevIns, MouState *);
     uint8_t     irq_bit;
 
@@ -419,6 +420,7 @@ static uint32_t bms_read_port(MouState *pThis, uint32_t offPort)
             break;
         default:
             AssertMsgFailed(("invalid port %#x\n", offPort));
+            uValue = 0xff;
             break;
     }
     LogRel3(("%s: read port %d: 0x%02x\n", __PRETTY_FUNCTION__, offPort, uValue));
@@ -601,10 +603,10 @@ static DECLCALLBACK(int) mouPutEvent(PPDMIMOUSEPORT pInterface, int32_t dx,
 /**
  * @interface_method_impl{PDMIMOUSEPORT, pfnPutEventAbs}
  */
-static DECLCALLBACK(int) mouPutEventAbs(PPDMIMOUSEPORT pInterface, uint32_t x,
-                                        uint32_t y, int32_t dz, int32_t dw,
-                                        uint32_t fButtons)
+static DECLCALLBACK(int) mouPutEventAbs(PPDMIMOUSEPORT pInterface, uint32_t x, uint32_t y,
+                                        int32_t dz, int32_t dw, uint32_t fButtons)
 {
+    RT_NOREF(pInterface, x, y, dz, dw, fButtons);
     AssertFailedReturn(VERR_NOT_SUPPORTED);
 }
 
@@ -614,6 +616,7 @@ static DECLCALLBACK(int) mouPutEventAbs(PPDMIMOUSEPORT pInterface, uint32_t x,
 static DECLCALLBACK(int) mouPutEventMultiTouch(PPDMIMOUSEPORT pInterface, uint8_t cContacts,
                                                const uint64_t *pau64Contacts, uint32_t u32ScanTime)
 {
+    RT_NOREF(pInterface, cContacts, pau64Contacts, u32ScanTime);
     AssertFailedReturn(VERR_NOT_SUPPORTED);
 }
 
@@ -711,6 +714,8 @@ static DECLCALLBACK(void) mouDetach(PPDMDEVINS pDevIns, unsigned iLUN, uint32_t
             AssertMsgFailed(("Invalid LUN #%d\n", iLUN));
             break;
     }
+#else
+    RT_NOREF(pDevIns, iLUN, fFlags);
 #endif
 }
 
@@ -720,7 +725,8 @@ static DECLCALLBACK(void) mouDetach(PPDMDEVINS pDevIns, unsigned iLUN, uint32_t
  */
 static DECLCALLBACK(void) mouRelocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta)
 {
-    MouState    *pThis = PDMINS_2_DATA(pDevIns, MouState *);
+    RT_NOREF(offDelta);
+    MouState *pThis = PDMINS_2_DATA(pDevIns, MouState *);
     pThis->pDevInsRC = PDMDEVINS_2_RCPTR(pDevIns);
 }
 
@@ -730,6 +736,8 @@ static DECLCALLBACK(void) mouRelocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta)
  */
 static DECLCALLBACK(int) mouConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
 {
+    RT_NOREF(iInstance);
+    PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
     MouState   *pThis = PDMINS_2_DATA(pDevIns, MouState *);
     int         rc;
     bool        fGCEnabled;
@@ -737,7 +745,6 @@ static DECLCALLBACK(int) mouConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNO
     uint8_t     irq_lvl;
     Assert(iInstance == 0);
 
-    PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
 
     /*
      * Validate and read the configuration.
@@ -757,7 +764,7 @@ static DECLCALLBACK(int) mouConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNO
         return PDMDEV_SET_ERROR(pDevIns, rc, N_("Invalid \"IRQ\" config setting"));
 
     pThis->irq = irq_lvl;
-    ///@todo: remove after properly enabling RC/GC support
+    /// @todo remove after properly enabling RC/GC support
     fGCEnabled = fR0Enabled = false;
     Log(("busmouse: IRQ=%d fGCEnabled=%RTbool fR0Enabled=%RTbool\n", irq_lvl, fGCEnabled, fR0Enabled));
 
diff --git a/src/VBox/ExtPacks/BusMouseSample/Makefile.kmk b/src/VBox/ExtPacks/BusMouseSample/Makefile.kmk
index 468008a..a48380b 100644
--- a/src/VBox/ExtPacks/BusMouseSample/Makefile.kmk
+++ b/src/VBox/ExtPacks/BusMouseSample/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2010-2015 Oracle Corporation
+# Copyright (C) 2010-2016 Oracle Corporation
 #
 # Permission is hereby granted, free of charge, to any person
 # obtaining a copy of this software and associated documentation
diff --git a/src/VBox/ExtPacks/BusMouseSample/VBoxBusMouseMain.cpp b/src/VBox/ExtPacks/BusMouseSample/VBoxBusMouseMain.cpp
index 6b2b24e..5283a5e 100644
--- a/src/VBox/ExtPacks/BusMouseSample/VBoxBusMouseMain.cpp
+++ b/src/VBox/ExtPacks/BusMouseSample/VBoxBusMouseMain.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * Permission is hereby granted, free of charge, to any person
  * obtaining a copy of this software and associated documentation
@@ -78,6 +78,8 @@ static PCVBOXEXTPACKHLP g_pHlp;
  */
 static DECLCALLBACK(int)  vboxBusMouseExtPack_VMConfigureVMM(PCVBOXEXTPACKREG pThis, IConsole *pConsole, PVM pVM)
 {
+    RT_NOREF(pThis, pConsole);
+
     /*
      * Find the bus mouse module and tell PDM to load it.
      * ASSUME /PDM/Devices exists.
diff --git a/src/VBox/ExtPacks/Makefile.kmk b/src/VBox/ExtPacks/Makefile.kmk
index 1907f0e..ab5b797 100644
--- a/src/VBox/ExtPacks/Makefile.kmk
+++ b/src/VBox/ExtPacks/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2010-2015 Oracle Corporation
+# Copyright (C) 2010-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ExtPacks/Skeleton/Makefile.kmk b/src/VBox/ExtPacks/Skeleton/Makefile.kmk
index 184076a..6f555f9 100644
--- a/src/VBox/ExtPacks/Skeleton/Makefile.kmk
+++ b/src/VBox/ExtPacks/Skeleton/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2010-2015 Oracle Corporation
+# Copyright (C) 2010-2016 Oracle Corporation
 #
 # Permission is hereby granted, free of charge, to any person
 # obtaining a copy of this software and associated documentation
diff --git a/src/VBox/ExtPacks/Skeleton/VBoxSkeletonMain.cpp b/src/VBox/ExtPacks/Skeleton/VBoxSkeletonMain.cpp
index 6cd8675..2b75003 100644
--- a/src/VBox/ExtPacks/Skeleton/VBoxSkeletonMain.cpp
+++ b/src/VBox/ExtPacks/Skeleton/VBoxSkeletonMain.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * Permission is hereby granted, free of charge, to any person
  * obtaining a copy of this software and associated documentation
diff --git a/src/VBox/ExtPacks/VBoxDTrace/Makefile.kmk b/src/VBox/ExtPacks/VBoxDTrace/Makefile.kmk
index 7f73823..3514dd1 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/Makefile.kmk
+++ b/src/VBox/ExtPacks/VBoxDTrace/Makefile.kmk
@@ -6,7 +6,7 @@
 #
 
 #
-# Copyright (C) 2012-2015 Oracle Corporation
+# Copyright (C) 2012-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -104,6 +104,7 @@ if defined(VBOX_WITH_EXTPACK_VBOXDTRACE) && defined(VBOX_WITH_EXTPACK)
  VBoxDTraceCmd_DEFS = RTMEM_WRAP_TO_EF_APIS VBOX_EXTPACK_VBOXDTRACE_MANGLED_NAME=\"$(VBOX_EXTPACK_VBOXDTRACE_MANGLED_NAME)\"
  #VBoxDTraceCmd_DEFS += YYDEBUG
  VBoxDTraceCmd_DEFS.linux = _XOPEN_SOURCE=700
+ VBoxDTraceCmd_DEFS.win = YY_USE_PROTOS=1 YYENABLE_NLS=0 YYLTYPE_IS_TRIVIAL=0
  VBoxDTraceCmd_SDKS = VBOX_ZLIB
  ifn1of ($(KBUILD_TARGET), win)
   VBoxDTraceCmd_CFLAGS = -Wno-format $(VBOX_GCC_Wno-overlength-strings) -Wno-sign-compare -Wno-strict-prototypes -Wno-missing-prototypes -Wno-missing-declarations -Wno-shadow
diff --git a/src/VBox/ExtPacks/VBoxDTrace/VBoxDTraceMain.cpp b/src/VBox/ExtPacks/VBoxDTrace/VBoxDTraceMain.cpp
index bab509d..df0c383 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/VBoxDTraceMain.cpp
+++ b/src/VBox/ExtPacks/VBoxDTrace/VBoxDTraceMain.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * Permission is hereby granted, free of charge, to any person
  * obtaining a copy of this software and associated documentation
diff --git a/src/VBox/ExtPacks/VBoxDTrace/VBoxDTraceR0.cpp b/src/VBox/ExtPacks/VBoxDTrace/VBoxDTraceR0.cpp
index a14856d..56a455a 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/VBoxDTraceR0.cpp
+++ b/src/VBox/ExtPacks/VBoxDTrace/VBoxDTraceR0.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -205,6 +205,7 @@ static PVBDTSTACKDATA vboxDtGetStackData(void)
 void dtrace_toxic_ranges(void (*pfnAddOne)(uintptr_t uBase, uintptr_t cbRange))
 {
     /** @todo ? */
+    RT_NOREF_PV(pfnAddOne);
 }
 
 
@@ -435,6 +436,7 @@ uintptr_t dtrace_caller(int cCallFrames)
     PVBDTSTACKDATA pData = vboxDtGetStackData();
     if (pData->enmCaller == kVBoxDtCaller_ProbeFireKernel)
         return pData->u.ProbeFireKernel.uCaller;
+    RT_NOREF_PV(cCallFrames);
     return ~(uintptr_t)0;
 }
 
@@ -453,6 +455,7 @@ uint64_t dtrace_getarg(int iArg, int cCallFrames)
 
     if (pData->enmCaller == kVBoxDtCaller_ProbeFireKernel)
         return pData->u.ProbeFireKernel.pauStackArgs[iArg - 5];
+    RT_NOREF_PV(cCallFrames);
     return UINT64_MAX;
 }
 
@@ -474,6 +477,8 @@ void dtrace_getpcstack(pc_t *paPcStack, int cMaxFrames, int cSkipFrames, uint32_
         paPcStack[iFrame] = NULL;
         iFrame++;
     }
+    RT_NOREF_PV(pIntr);
+    RT_NOREF_PV(cSkipFrames);
 }
 
 
@@ -486,6 +491,7 @@ void dtrace_getpcstack(pc_t *paPcStack, int cMaxFrames, int cSkipFrames, uint32_
  */
 int dtrace_getstackdepth(int cSkipFrames)
 {
+    RT_NOREF_PV(cSkipFrames);
     return 1;
 }
 
@@ -607,7 +613,7 @@ void VBoxDtPanic(const char *pszFormat, ...)
     va_list va;
     va_start(va, pszFormat);
     dtrace_vpanic(pszFormat, va);
-    va_end(va);
+    /*va_end(va); - unreachable */
 }
 
 
@@ -623,6 +629,7 @@ void VBoxDtCmnErr(int iLevel, const char *pszFormat, ...)
     va_start(va, pszFormat);
     SUPR0Printf("%N", pszFormat, va);
     va_end(va);
+    RT_NOREF_PV(iLevel);
 }
 
 
@@ -676,7 +683,7 @@ cred_t *VBoxDtGetCurrentCreds(void)
 void VBoxDtCredHold(struct VBoxDtCred *pCred)
 {
     int32_t cRefs = ASMAtomicIncS32(&pCred->cr_refs);
-    Assert(cRefs > 1);
+    Assert(cRefs > 1); NOREF(cRefs);
 }
 
 
@@ -928,6 +935,7 @@ struct VBoxDtVMem *VBoxDtVMemCreate(const char *pszName, void *pvBase, size_t cb
     AssertReturn(!cbQCacheMax, NULL);
     AssertReturn(fFlags & VM_SLEEP, NULL);
     AssertReturn(fFlags & VMC_IDENTIFIER, NULL);
+    RT_NOREF_PV(pszName);
 
     /*
      * Allocate the instance.
@@ -1139,6 +1147,7 @@ void *VBoxDtKMemAlloc(size_t cbMem, uint32_t fFlags)
     uint32_t fMemAllocFlags = fFlags & KM_NOSLEEP ? RTMEMALLOCEX_FLAGS_ANY_CTX : 0;
 #else
     uint32_t fMemAllocFlags = 0;
+    RT_NOREF_PV(fFlags);
 #endif
     int rc = RTMemAllocEx(cbMem, 0, fMemAllocFlags, &pvMem);
     AssertRCReturn(rc, NULL);
@@ -1155,6 +1164,7 @@ void *VBoxDtKMemAllocZ(size_t cbMem, uint32_t fFlags)
     uint32_t fMemAllocFlags = (fFlags & KM_NOSLEEP ? RTMEMALLOCEX_FLAGS_ANY_CTX : 0) | RTMEMALLOCEX_FLAGS_ZEROED;
 #else
     uint32_t fMemAllocFlags = RTMEMALLOCEX_FLAGS_ZEROED;
+    RT_NOREF_PV(fFlags);
 #endif
     int rc = RTMemAllocEx(cbMem, 0, fMemAllocFlags, &pvMem);
     AssertRCReturn(rc, NULL);
@@ -1198,6 +1208,7 @@ struct VBoxDtMemCache *VBoxDtKMemCacheCreate(const char *pszName, size_t cbBuf,
     AssertReturn(!pvUser, NULL);
     AssertReturn(!pvVM, NULL);
     AssertReturn(!fFlags, NULL);
+    RT_NOREF_PV(pszName);
 
     /*
      * Create a parameter container. Don't bother with anything fancy here yet,
@@ -1228,6 +1239,7 @@ void *VBoxDtKMemCacheAlloc(struct VBoxDtMemCache *pThis, uint32_t fFlags)
     uint32_t fMemAllocFlags = (fFlags & KM_NOSLEEP ? RTMEMALLOCEX_FLAGS_ANY_CTX : 0) | RTMEMALLOCEX_FLAGS_ZEROED;
 #else
     uint32_t fMemAllocFlags = RTMEMALLOCEX_FLAGS_ZEROED;
+    RT_NOREF_PV(fFlags);
 #endif
     int rc = RTMemAllocEx(pThis->cbBuf, /*pThis->cbAlign*/0, fMemAllocFlags, &pvMem);
     AssertRCReturn(rc, NULL);
@@ -1496,6 +1508,7 @@ static int      vboxDtPOps_Enable(void *pvProv, dtrace_id_t idProbe, void *pvPro
     PSUPDRVVDTPROVIDERCORE  pProv   = (PSUPDRVVDTPROVIDERCORE)pvProv;
     LOG_DTRACE(("%s: %p / %p - %#x / %p\n", __FUNCTION__, pProv, pProv->TracerData.DTrace.idProvider, idProbe, pvProbe));
     AssertPtrReturn(pProv->TracerData.DTrace.idProvider, EINVAL);
+    RT_NOREF_PV(idProbe);
 
     if (!pProv->TracerData.DTrace.fZombie)
     {
@@ -1545,6 +1558,7 @@ static void     vboxDtPOps_Disable(void *pvProv, dtrace_id_t idProbe, void *pvPr
     AssertPtrReturnVoid(pProv);
     LOG_DTRACE(("%s: %p / %p - %#x / %p\n", __FUNCTION__, pProv, pProv->TracerData.DTrace.idProvider, idProbe, pvProbe));
     AssertPtrReturnVoid(pProv->TracerData.DTrace.idProvider);
+    RT_NOREF_PV(idProbe);
 
     if (!pProv->TracerData.DTrace.fZombie)
     {
@@ -1591,6 +1605,7 @@ static void     vboxDtPOps_GetArgDesc(void *pvProv, dtrace_id_t idProbe, void *p
 {
     PSUPDRVVDTPROVIDERCORE  pProv  = (PSUPDRVVDTPROVIDERCORE)pvProv;
     unsigned                uArg   = pArgDesc->dtargd_ndx;
+    RT_NOREF_PV(idProbe);
 
     pArgDesc->dtargd_ndx = DTRACE_ARGNONE;
     AssertPtrReturnVoid(pProv);
@@ -1634,6 +1649,8 @@ static uint64_t vboxDtPOps_GetArgVal(void *pvProv, dtrace_id_t idProbe, void *pv
     AssertPtrReturn(pProv, UINT64_MAX);
     LOG_DTRACE(("%s: %p / %p - %#x / %p iArg=%d cFrames=%u\n", __FUNCTION__, pProv, pProv->TracerData.DTrace.idProvider, idProbe, pvProbe, iArg, cFrames));
     AssertReturn(iArg >= 5, UINT64_MAX);
+    RT_NOREF_PV(idProbe); RT_NOREF_PV(cFrames);
+
     if (pProv->TracerData.DTrace.fZombie)
         return UINT64_MAX;
 
@@ -1855,7 +1872,8 @@ static DECLCALLBACK(void) vboxDtTOps_ProbeFireUser(PCSUPDRVTRACERREG pThis, PSUP
     LOG_DTRACE(("%s: %p / %p\n", __FUNCTION__, pCtx, pCtx->idProbe));
     AssertPtrReturnVoid(pProbeLocRO);
     AssertPtrReturnVoid(pVtgHdr);
-
+    RT_NOREF_PV(pThis);
+    RT_NOREF_PV(pSession);
     VBDT_SETUP_STACK_DATA(kVBoxDtCaller_ProbeFireUser);
 
     if (pCtx->cBits == 32)
@@ -1939,7 +1957,7 @@ static DECLCALLBACK(int) vboxDtTOps_TracerOpen(PCSUPDRVTRACERREG pThis, PSUPDRVS
         return VERR_INVALID_MAGIC;
     if (uArg)
         return VERR_INVALID_PARAMETER;
-
+    RT_NOREF_PV(pThis); RT_NOREF_PV(pSession);
     VBDT_SETUP_STACK_DATA(kVBoxDtCaller_Generic);
 
     int rc = dtrace_open((dtrace_state_t **)puSessionData, VBoxDtGetCurrentCreds());
@@ -1956,6 +1974,7 @@ static DECLCALLBACK(int) vboxDtTOps_TracerIoCtl(PCSUPDRVTRACERREG pThis, PSUPDRV
                                                 uintptr_t uCmd, uintptr_t uArg, int32_t *piRetVal)
 {
     AssertPtrReturn(uSessionData, VERR_INVALID_POINTER);
+    RT_NOREF_PV(pThis); RT_NOREF_PV(pSession);
     VBDT_SETUP_STACK_DATA(kVBoxDtCaller_Generic);
 
     int rc = dtrace_ioctl((dtrace_state_t *)uSessionData, (intptr_t)uCmd, (intptr_t)uArg, piRetVal);
@@ -1971,6 +1990,7 @@ static DECLCALLBACK(int) vboxDtTOps_TracerIoCtl(PCSUPDRVTRACERREG pThis, PSUPDRV
 static DECLCALLBACK(void) vboxDtTOps_TracerClose(PCSUPDRVTRACERREG pThis, PSUPDRVSESSION pSession, uintptr_t uSessionData)
 {
     AssertPtrReturnVoid(uSessionData);
+    RT_NOREF_PV(pThis); RT_NOREF_PV(pSession);
     VBDT_SETUP_STACK_DATA(kVBoxDtCaller_Generic);
 
     dtrace_close((dtrace_state_t *)uSessionData);
@@ -1986,6 +2006,7 @@ static DECLCALLBACK(int) vboxDtTOps_ProviderRegister(PCSUPDRVTRACERREG pThis, PS
 {
     LOG_DTRACE(("%s: %p %s/%s\n", __FUNCTION__, pThis, pCore->pszModName, pCore->pszName));
     AssertReturn(pCore->TracerData.DTrace.idProvider == 0, VERR_INTERNAL_ERROR_3);
+    RT_NOREF_PV(pThis);
     VBDT_SETUP_STACK_DATA(kVBoxDtCaller_Generic);
 
     PVTGDESCPROVIDER    pDesc = pCore->pDesc;
@@ -2032,6 +2053,7 @@ static DECLCALLBACK(int) vboxDtTOps_ProviderDeregister(PCSUPDRVTRACERREG pThis,
     uintptr_t idProvider = pCore->TracerData.DTrace.idProvider;
     LOG_DTRACE(("%s: %p / %p\n", __FUNCTION__, pThis, idProvider));
     AssertPtrReturn(idProvider, VERR_INTERNAL_ERROR_3);
+    RT_NOREF_PV(pThis);
     VBDT_SETUP_STACK_DATA(kVBoxDtCaller_Generic);
 
     dtrace_invalidate(idProvider);
@@ -2063,6 +2085,7 @@ static DECLCALLBACK(int) vboxDtTOps_ProviderDeregisterZombie(PCSUPDRVTRACERREG p
     LOG_DTRACE(("%s: %p / %p\n", __FUNCTION__, pThis, idProvider));
     AssertPtrReturn(idProvider, VERR_INTERNAL_ERROR_3);
     Assert(pCore->TracerData.DTrace.fZombie);
+    RT_NOREF_PV(pThis);
     VBDT_SETUP_STACK_DATA(kVBoxDtCaller_Generic);
 
     int rc = dtrace_unregister(idProvider);
@@ -2113,6 +2136,7 @@ DECLEXPORT(void) ModuleTerm(void *hMod)
 {
     SUPR0TracerDeregisterImpl(hMod, NULL);
     dtrace_detach();
+    vboxDtTermThreadDb();
 }
 
 
@@ -2123,20 +2147,27 @@ DECLEXPORT(void) ModuleTerm(void *hMod)
  */
 DECLEXPORT(int)  ModuleInit(void *hMod)
 {
-    int rc = dtrace_attach();
-    if (rc == DDI_SUCCESS)
+    int rc = vboxDtInitThreadDb();
+    if (RT_SUCCESS(rc))
     {
-        rc = SUPR0TracerRegisterImpl(hMod, NULL, &g_VBoxDTraceReg, &g_pVBoxDTraceHlp);
-        if (RT_SUCCESS(rc))
-            return rc;
+        rc = dtrace_attach();
+        if (rc == DDI_SUCCESS)
+        {
+            rc = SUPR0TracerRegisterImpl(hMod, NULL, &g_VBoxDTraceReg, &g_pVBoxDTraceHlp);
+            if (RT_SUCCESS(rc))
+                return rc;
 
-        dtrace_detach();
+            dtrace_detach();
+        }
+        else
+        {
+            SUPR0Printf("dtrace_attach -> %d\n", rc);
+            rc = VERR_INTERNAL_ERROR_5;
+        }
+        vboxDtTermThreadDb();
     }
     else
-    {
-        SUPR0Printf("dtrace_attach -> %d\n", rc);
-        rc = VERR_INTERNAL_ERROR_5;
-    }
+        SUPR0Printf("vboxDtInitThreadDb -> %d\n", rc);
 
     return rc;
 }
diff --git a/src/VBox/ExtPacks/VBoxDTrace/VBoxDTraceR0A.asm b/src/VBox/ExtPacks/VBoxDTrace/VBoxDTraceR0A.asm
index 2505ef8..9af5d07 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/VBoxDTraceR0A.asm
+++ b/src/VBox/ExtPacks/VBoxDTrace/VBoxDTraceR0A.asm
@@ -6,7 +6,7 @@
 ;
 
 ;
-; Copyright (C) 2012-2015 Oracle Corporation
+; Copyright (C) 2012-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ExtPacks/VBoxDTrace/VBoxDTraceWrapper.cpp b/src/VBox/ExtPacks/VBoxDTrace/VBoxDTraceWrapper.cpp
index 7f1a1bc..dbf921d 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/VBoxDTraceWrapper.cpp
+++ b/src/VBox/ExtPacks/VBoxDTrace/VBoxDTraceWrapper.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2016-2015 Oracle Corporation
+ * Copyright (C) 2016-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ExtPacks/VBoxDTrace/generated/dt_grammar.c b/src/VBox/ExtPacks/VBoxDTrace/generated/dt_grammar.c
index e8102ef..7ba1a4b 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/generated/dt_grammar.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/generated/dt_grammar.c
@@ -1,24 +1,23 @@
-/* A Bison parser, made by GNU Bison 2.3.  */
 
-/* Skeleton implementation for Bison's Yacc-like parsers in C
+/* A Bison parser, made by GNU Bison 2.4.1.  */
 
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+   
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
    Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
+   
+   This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+   
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-
+   
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* As a special exception, you may create a larger work that contains
    part or all of the Bison parser skeleton and distribute that work
@@ -29,7 +28,7 @@
    special exception, which will cause the skeleton and the resulting
    Bison output files to be licensed under the GNU General Public
    License without this special exception.
-
+   
    This special exception was added by the Free Software Foundation in
    version 2.2 of Bison.  */
 
@@ -47,7 +46,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.3"
+#define YYBISON_VERSION "2.4.1"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -55,11 +54,93 @@
 /* Pure parsers.  */
 #define YYPURE 0
 
+/* Push parsers.  */
+#define YYPUSH 0
+
+/* Pull parsers.  */
+#define YYPULL 1
+
 /* Using locations.  */
 #define YYLSP_NEEDED 0
 
 
 
+/* Copy the first part of user declarations.  */
+
+/* Line 189 of yacc.c  */
+#line 1 "dt_grammar.y"
+
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License").  You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef VBOX
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+#else
+# ifdef _MSC_VER
+#  pragma warning(disable:4255 4702)
+# endif
+#endif
+
+#include <dt_impl.h>
+
+#define	OP1(op, c)	dt_node_op1(op, c)
+#define	OP2(op, l, r)	dt_node_op2(op, l, r)
+#define	OP3(x, y, z)	dt_node_op3(x, y, z)
+#define	LINK(l, r)	dt_node_link(l, r)
+#define	DUP(s)		strdup(s)
+
+#ifdef VBOX
+# define YYMALLOC RTMemAlloc
+# define YYFREE   RTMemFree
+#endif
+
+
+
+
+/* Line 189 of yacc.c  */
+#line 124 "dt_grammar.c"
+
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages.  */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* Enabling the token table.  */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+
 /* Tokens.  */
 #ifndef YYTOKENTYPE
 # define YYTOKENTYPE
@@ -289,97 +370,35 @@
 
 
 
-/* Copy the first part of user declarations.  */
-#line 1 "dt_grammar.y"
-
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef VBOX
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-#endif
-
-#include <dt_impl.h>
-
-#define	OP1(op, c)	dt_node_op1(op, c)
-#define	OP2(op, l, r)	dt_node_op2(op, l, r)
-#define	OP3(x, y, z)	dt_node_op3(x, y, z)
-#define	LINK(l, r)	dt_node_link(l, r)
-#define	DUP(s)		strdup(s)
-
-#ifdef VBOX
-# define YYMALLOC RTMemAlloc
-# define YYFREE   RTMemFree
-#endif
-
-
-
-
-/* Enabling traces.  */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-
-/* Enabling verbose error messages.  */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 0
-#endif
-
-/* Enabling the token table.  */
-#ifndef YYTOKEN_TABLE
-# define YYTOKEN_TABLE 0
-#endif
-
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union YYSTYPE
-#line 47 "dt_grammar.y"
 {
+
+/* Line 214 of yacc.c  */
+#line 51 "dt_grammar.y"
+
 	dt_node_t *l_node;
 	dt_decl_t *l_decl;
 	char *l_str;
 	uintmax_t l_int;
 	int l_tok;
-}
-/* Line 193 of yacc.c.  */
-#line 370 "dt_grammar.c"
-	YYSTYPE;
+
+
+
+/* Line 214 of yacc.c  */
+#line 390 "dt_grammar.c"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
 #endif
 
 
-
 /* Copy the second part of user declarations.  */
 
 
-/* Line 216 of yacc.c.  */
-#line 383 "dt_grammar.c"
+/* Line 264 of yacc.c  */
+#line 402 "dt_grammar.c"
 
 #ifdef short
 # undef short
@@ -429,7 +448,7 @@ typedef short int yytype_int16;
 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
 
 #ifndef YY_
-# if defined YYENABLE_NLS && YYENABLE_NLS
+# if YYENABLE_NLS
 #  if ENABLE_NLS
 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -454,14 +473,14 @@ typedef short int yytype_int16;
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static int
-YYID (int i)
+YYID (int yyi)
 #else
 static int
-YYID (i)
-    int i;
+YYID (yyi)
+    int yyi;
 #endif
 {
-  return i;
+  return yyi;
 }
 #endif
 
@@ -542,9 +561,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
 /* A type that is properly aligned for any stack member.  */
 union yyalloc
 {
-  yytype_int16 yyss;
-  YYSTYPE yyvs;
-  };
+  yytype_int16 yyss_alloc;
+  YYSTYPE yyvs_alloc;
+};
 
 /* The size of the maximum gap between one aligned stack and the next.  */
 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
@@ -578,12 +597,12 @@ union yyalloc
    elements in the stack, and YYPTR gives the new location of the
    stack.  Advance YYPTR to a properly aligned location for the next
    stack.  */
-# define YYSTACK_RELOCATE(Stack)					\
+# define YYSTACK_RELOCATE(Stack_alloc, Stack)				\
     do									\
       {									\
 	YYSIZE_T yynewbytes;						\
-	YYCOPY (&yyptr->Stack, Stack, yysize);				\
-	Stack = &yyptr->Stack;						\
+	YYCOPY (&yyptr->Stack_alloc, Stack, yysize);			\
+	Stack = &yyptr->Stack_alloc;					\
 	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
 	yyptr += yynewbytes / sizeof (*yyptr);				\
       }									\
@@ -764,30 +783,30 @@ static const yytype_int16 yyrhs[] =
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   217,   217,   218,   219,   222,   223,   226,   227,   230,
-     231,   235,   236,   240,   241,   242,   243,   244,   249,   248,
-     264,   268,   275,   276,   280,   286,   289,   295,   296,   300,
-     303,   310,   326,   329,   333,   340,   344,   345,   351,   352,
-     355,   356,   359,   360,   364,   365,   371,   372,   373,   374,
-     375,   376,   377,   381,   382,   386,   389,   393,   396,   399,
-     402,   405,   408,   411,   415,   419,   426,   427,   428,   429,
-     430,   431,   434,   439,   440,   441,   442,   443,   444,   448,
-     449,   455,   456,   459,   462,   468,   469,   472,   478,   479,
-     482,   488,   489,   492,   495,   498,   504,   505,   508,   514,
-     515,   521,   522,   528,   529,   535,   536,   542,   543,   549,
-     550,   555,   559,   560,   565,   566,   572,   573,   574,   575,
-     576,   577,   578,   579,   580,   581,   582,   585,   586,   591,
-     596,   604,   605,   606,   607,   608,   609,   613,   614,   615,
-     616,   617,   618,   622,   623,   624,   625,   626,   630,   631,
-     632,   635,   636,   637,   638,   639,   640,   641,   642,   643,
-     644,   647,   648,   649,   652,   653,   654,   658,   661,   662,
-     666,   667,   668,   672,   673,   677,   678,   682,   683,   689,
-     696,   702,   703,   704,   705,   709,   710,   714,   715,   716,
-     722,   723,   724,   728,   729,   730,   734,   735,   738,   739,
-     744,   745,   749,   750,   751,   752,   755,   758,   759,   760,
-     761,   765,   766,   770,   771,   772,   777,   778,   784,   787,
-     790,   795,   798,   804,   805,   806,   810,   811,   812,   813,
-     814,   817,   817,   825,   826,   827,   830,   830,   838,   839
+       0,   221,   221,   222,   223,   226,   227,   230,   231,   234,
+     235,   239,   240,   244,   245,   246,   247,   248,   253,   252,
+     268,   272,   279,   280,   284,   290,   293,   299,   300,   304,
+     307,   314,   330,   333,   337,   344,   348,   349,   355,   356,
+     359,   360,   363,   364,   368,   369,   375,   376,   377,   378,
+     379,   380,   381,   385,   386,   390,   393,   397,   400,   403,
+     406,   409,   412,   415,   419,   423,   430,   431,   432,   433,
+     434,   435,   438,   443,   444,   445,   446,   447,   448,   452,
+     453,   459,   460,   463,   466,   472,   473,   476,   482,   483,
+     486,   492,   493,   496,   499,   502,   508,   509,   512,   518,
+     519,   525,   526,   532,   533,   539,   540,   546,   547,   553,
+     554,   559,   563,   564,   569,   570,   576,   577,   578,   579,
+     580,   581,   582,   583,   584,   585,   586,   589,   590,   595,
+     600,   608,   609,   610,   611,   612,   613,   617,   618,   619,
+     620,   621,   622,   626,   627,   628,   629,   630,   634,   635,
+     636,   639,   640,   641,   642,   643,   644,   645,   646,   647,
+     648,   651,   652,   653,   656,   657,   658,   662,   665,   666,
+     670,   671,   672,   676,   677,   681,   682,   686,   687,   693,
+     700,   706,   707,   708,   709,   713,   714,   718,   719,   720,
+     726,   727,   728,   732,   733,   734,   738,   739,   742,   743,
+     748,   749,   753,   754,   755,   756,   759,   762,   763,   764,
+     765,   769,   770,   774,   775,   776,   781,   782,   788,   791,
+     794,   799,   802,   808,   809,   810,   814,   815,   816,   817,
+     818,   821,   821,   829,   830,   831,   834,   834,   842,   843
 };
 #endif
 
@@ -824,7 +843,7 @@ static const char *const yytname[] =
   "DT_KEY_XLATOR", "DT_TOK_EPRED", "DT_CTX_DEXPR", "DT_CTX_DPROG",
   "DT_CTX_DTYPE", "';'", "'{'", "'}'", "$accept", "dtrace_program",
   "d_expression", "d_program", "d_type", "translation_unit",
-  "external_declaration", "inline_definition", "@1",
+  "external_declaration", "inline_definition", "$@1",
   "translator_definition", "translator_member_list", "translator_member",
   "provider_definition", "provider_probe_list", "provider_probe",
   "probe_definition", "probe_specifiers", "probe_specifier_list",
@@ -848,7 +867,7 @@ static const char *const yytname[] =
   "direct_declarator", "lparen", "pointer", "type_qualifier_list",
   "parameter_type_list", "parameter_list", "parameter_declaration",
   "type_name", "abstract_declarator", "direct_abstract_declarator",
-  "array", "@2", "array_parameters", "function", "@3",
+  "array", "$@2", "array_parameters", "function", "$@3",
   "function_parameters", 0
 };
 #endif
@@ -1342,7 +1361,7 @@ while (YYID (0))
    we won't break user code: when these are the locations we know.  */
 
 #ifndef YY_LOCATION_PRINT
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+# if YYLTYPE_IS_TRIVIAL
 #  define YY_LOCATION_PRINT(File, Loc)			\
      fprintf (File, "%d.%d-%d.%d",			\
 	      (Loc).first_line, (Loc).first_column,	\
@@ -1453,17 +1472,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static void
-yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
 #else
 static void
-yy_stack_print (bottom, top)
-    yytype_int16 *bottom;
-    yytype_int16 *top;
+yy_stack_print (yybottom, yytop)
+    yytype_int16 *yybottom;
+    yytype_int16 *yytop;
 #endif
 {
   YYFPRINTF (stderr, "Stack now");
-  for (; bottom <= top; ++bottom)
-    YYFPRINTF (stderr, " %d", *bottom);
+  for (; yybottom <= yytop; yybottom++)
+    {
+      int yybot = *yybottom;
+      YYFPRINTF (stderr, " %d", yybot);
+    }
   YYFPRINTF (stderr, "\n");
 }
 
@@ -1497,11 +1519,11 @@ yy_reduce_print (yyvsp, yyrule)
   /* The symbols being reduced.  */
   for (yyi = 0; yyi < yynrhs; yyi++)
     {
-      fprintf (stderr, "   $%d = ", yyi + 1);
+      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
 		       &(yyvsp[(yyi + 1) - (yynrhs)])
 		       		       );
-      fprintf (stderr, "\n");
+      YYFPRINTF (stderr, "\n");
     }
 }
 
@@ -1781,10 +1803,8 @@ yydestruct (yymsg, yytype, yyvaluep)
 	break;
     }
 }
-

 
 /* Prevent warnings from -Wmissing-prototypes.  */
-
 #ifdef YYPARSE_PARAM
 #if defined __STDC__ || defined __cplusplus
 int yyparse (void *YYPARSE_PARAM);
@@ -1800,11 +1820,10 @@ int yyparse ();
 #endif /* ! YYPARSE_PARAM */
 
 
-
-/* The look-ahead symbol.  */
+/* The lookahead symbol.  */
 int yychar;
 
-/* The semantic value of the look-ahead symbol.  */
+/* The semantic value of the lookahead symbol.  */
 YYSTYPE yylval;
 
 /* Number of syntax errors so far.  */
@@ -1812,9 +1831,9 @@ int yynerrs;
 
 
 
-/*----------.
-| yyparse.  |
-`----------*/
+/*-------------------------.
+| yyparse or yypush_parse.  |
+`-------------------------*/
 
 #ifdef YYPARSE_PARAM
 #if (defined __STDC__ || defined __C99__FUNC__ \
@@ -1838,66 +1857,68 @@ yyparse ()
 #endif
 #endif
 {
-  
-  int yystate;
-  int yyn;
-  int yyresult;
-  /* Number of tokens to shift before error messages enabled.  */
-  int yyerrstatus;
-  /* Look-ahead token as an internal (translated) token number.  */
-  int yytoken = 0;
-#if YYERROR_VERBOSE
-  /* Buffer for error messages, and its allocated size.  */
-  char yymsgbuf[128];
-  char *yymsg = yymsgbuf;
-  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
 
-  /* Three stacks and their tools:
-     `yyss': related to states,
-     `yyvs': related to semantic values,
-     `yyls': related to locations.
 
-     Refer to the stacks thru separate pointers, to allow yyoverflow
-     to reallocate them elsewhere.  */
+    int yystate;
+    /* Number of tokens to shift before error messages enabled.  */
+    int yyerrstatus;
 
-  /* The state stack.  */
-  yytype_int16 yyssa[YYINITDEPTH];
-  yytype_int16 *yyss = yyssa;
-  yytype_int16 *yyssp;
+    /* The stacks and their tools:
+       `yyss': related to states.
+       `yyvs': related to semantic values.
 
-  /* The semantic value stack.  */
-  YYSTYPE yyvsa[YYINITDEPTH];
-  YYSTYPE *yyvs = yyvsa;
-  YYSTYPE *yyvsp;
+       Refer to the stacks thru separate pointers, to allow yyoverflow
+       to reallocate them elsewhere.  */
 
+    /* The state stack.  */
+    yytype_int16 yyssa[YYINITDEPTH];
+    yytype_int16 *yyss;
+    yytype_int16 *yyssp;
 
+    /* The semantic value stack.  */
+    YYSTYPE yyvsa[YYINITDEPTH];
+    YYSTYPE *yyvs;
+    YYSTYPE *yyvsp;
 
-#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
-
-  YYSIZE_T yystacksize = YYINITDEPTH;
+    YYSIZE_T yystacksize;
 
+  int yyn;
+  int yyresult;
+  /* Lookahead token as an internal (translated) token number.  */
+  int yytoken;
   /* The variables used to return semantic value and location from the
      action routines.  */
   YYSTYPE yyval;
 
+#if YYERROR_VERBOSE
+  /* Buffer for error messages, and its allocated size.  */
+  char yymsgbuf[128];
+  char *yymsg = yymsgbuf;
+  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
 
   /* The number of symbols on the RHS of the reduced rule.
      Keep to zero when no symbol should be popped.  */
   int yylen = 0;
 
+  yytoken = 0;
+  yyss = yyssa;
+  yyvs = yyvsa;
+  yystacksize = YYINITDEPTH;
+
   YYDPRINTF ((stderr, "Starting parse\n"));
 
   yystate = 0;
   yyerrstatus = 0;
   yynerrs = 0;
-  yychar = YYEMPTY;		/* Cause a token to be read.  */
+  yychar = YYEMPTY; /* Cause a token to be read.  */
 
   /* Initialize stack pointers.
      Waste one element of value and location stack
      so that they stay on the same level as the state stack.
      The wasted elements are never initialized.  */
-
   yyssp = yyss;
   yyvsp = yyvs;
 
@@ -1927,7 +1948,6 @@ yyparse ()
 	YYSTYPE *yyvs1 = yyvs;
 	yytype_int16 *yyss1 = yyss;
 
-
 	/* Each stack pointer address is followed by the size of the
 	   data in use in that stack, in bytes.  This used to be a
 	   conditional around just the two extra args, but that might
@@ -1935,7 +1955,6 @@ yyparse ()
 	yyoverflow (YY_("memory exhausted"),
 		    &yyss1, yysize * sizeof (*yyssp),
 		    &yyvs1, yysize * sizeof (*yyvsp),
-
 		    &yystacksize);
 
 	yyss = yyss1;
@@ -1958,9 +1977,8 @@ yyparse ()
 	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
 	if (! yyptr)
 	  goto yyexhaustedlab;
-	YYSTACK_RELOCATE (yyss);
-	YYSTACK_RELOCATE (yyvs);
-
+	YYSTACK_RELOCATE (yyss_alloc, yyss);
+	YYSTACK_RELOCATE (yyvs_alloc, yyvs);
 #  undef YYSTACK_RELOCATE
 	if (yyss1 != yyssa)
 	  YYSTACK_FREE (yyss1);
@@ -1971,7 +1989,6 @@ yyparse ()
       yyssp = yyss + yysize - 1;
       yyvsp = yyvs + yysize - 1;
 
-
       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
 		  (unsigned long int) yystacksize));
 
@@ -1981,6 +1998,9 @@ yyparse ()
 
   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
 
+  if (yystate == YYFINAL)
+    YYACCEPT;
+
   goto yybackup;
 
 /*-----------.
@@ -1989,16 +2009,16 @@ yyparse ()
 yybackup:
 
   /* Do appropriate processing given the current state.  Read a
-     look-ahead token if we need one and don't already have one.  */
+     lookahead token if we need one and don't already have one.  */
 
-  /* First try to decide what to do without reference to look-ahead token.  */
+  /* First try to decide what to do without reference to lookahead token.  */
   yyn = yypact[yystate];
   if (yyn == YYPACT_NINF)
     goto yydefault;
 
-  /* Not known => get a look-ahead token if don't already have one.  */
+  /* Not known => get a lookahead token if don't already have one.  */
 
-  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
+  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
   if (yychar == YYEMPTY)
     {
       YYDPRINTF ((stderr, "Reading a token: "));
@@ -2030,20 +2050,16 @@ yybackup:
       goto yyreduce;
     }
 
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
   /* Count tokens shifted since error; after three, turn off error
      status.  */
   if (yyerrstatus)
     yyerrstatus--;
 
-  /* Shift the look-ahead token.  */
+  /* Shift the lookahead token.  */
   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
 
-  /* Discard the shifted token unless it is eof.  */
-  if (yychar != YYEOF)
-    yychar = YYEMPTY;
+  /* Discard the shifted token.  */
+  yychar = YYEMPTY;
 
   yystate = yyn;
   *++yyvsp = yylval;
@@ -2083,62 +2099,86 @@ yyreduce:
   switch (yyn)
     {
         case 2:
-#line 217 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 221 "dt_grammar.y"
     { return (dt_node_root((yyvsp[(1) - (2)].l_node))); }
     break;
 
   case 3:
-#line 218 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 222 "dt_grammar.y"
     { return (dt_node_root((yyvsp[(1) - (2)].l_node))); }
     break;
 
   case 4:
-#line 219 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 223 "dt_grammar.y"
     { return (dt_node_root((yyvsp[(1) - (2)].l_node))); }
     break;
 
   case 5:
-#line 222 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 226 "dt_grammar.y"
     { (yyval.l_node) = NULL; }
     break;
 
   case 6:
-#line 223 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 227 "dt_grammar.y"
     { (yyval.l_node) = (yyvsp[(2) - (2)].l_node); }
     break;
 
   case 7:
-#line 226 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 230 "dt_grammar.y"
     { (yyval.l_node) = dt_node_program(NULL); }
     break;
 
   case 8:
-#line 227 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 231 "dt_grammar.y"
     { (yyval.l_node) = dt_node_program((yyvsp[(2) - (2)].l_node)); }
     break;
 
   case 9:
-#line 230 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 234 "dt_grammar.y"
     { (yyval.l_node) = NULL; }
     break;
 
   case 10:
-#line 231 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 235 "dt_grammar.y"
     { (yyval.l_node) = (dt_node_t *)(yyvsp[(2) - (2)].l_decl); }
     break;
 
   case 12:
-#line 236 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 240 "dt_grammar.y"
     { (yyval.l_node) = LINK((yyvsp[(1) - (2)].l_node), (yyvsp[(2) - (2)].l_node)); }
     break;
 
   case 18:
-#line 249 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 253 "dt_grammar.y"
     { dt_scope_push(NULL, CTF_ERR); }
     break;
 
   case 19:
-#line 250 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 254 "dt_grammar.y"
     {
 			/*
 			 * We push a new declaration scope before shifting the
@@ -2153,66 +2193,86 @@ yyreduce:
     break;
 
   case 20:
-#line 265 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 269 "dt_grammar.y"
     {
 			(yyval.l_node) = dt_node_xlator((yyvsp[(2) - (10)].l_decl), (yyvsp[(4) - (10)].l_decl), (yyvsp[(5) - (10)].l_str), (yyvsp[(8) - (10)].l_node));
 		}
     break;
 
   case 21:
-#line 269 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 273 "dt_grammar.y"
     {
 			(yyval.l_node) = dt_node_xlator((yyvsp[(2) - (9)].l_decl), (yyvsp[(4) - (9)].l_decl), (yyvsp[(5) - (9)].l_str), NULL);
 		}
     break;
 
   case 23:
-#line 276 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 280 "dt_grammar.y"
     { (yyval.l_node) = LINK((yyvsp[(1) - (2)].l_node),(yyvsp[(2) - (2)].l_node)); }
     break;
 
   case 24:
-#line 280 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 284 "dt_grammar.y"
     {
 			(yyval.l_node) = dt_node_member(NULL, (yyvsp[(1) - (4)].l_str), (yyvsp[(3) - (4)].l_node));
 		}
     break;
 
   case 25:
-#line 286 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 290 "dt_grammar.y"
     {
 			(yyval.l_node) = dt_node_provider((yyvsp[(2) - (6)].l_str), (yyvsp[(4) - (6)].l_node));
 		}
     break;
 
   case 26:
-#line 289 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 293 "dt_grammar.y"
     {
 			(yyval.l_node) = dt_node_provider((yyvsp[(2) - (5)].l_str), NULL);
 		}
     break;
 
   case 28:
-#line 296 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 300 "dt_grammar.y"
     { (yyval.l_node) = LINK((yyvsp[(1) - (2)].l_node), (yyvsp[(2) - (2)].l_node)); }
     break;
 
   case 29:
-#line 300 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 304 "dt_grammar.y"
     {
 			(yyval.l_node) = dt_node_probe((yyvsp[(2) - (6)].l_str), 2, (yyvsp[(3) - (6)].l_node), (yyvsp[(5) - (6)].l_node));
 		}
     break;
 
   case 30:
-#line 303 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 307 "dt_grammar.y"
     {
 			(yyval.l_node) = dt_node_probe((yyvsp[(2) - (4)].l_str), 1, (yyvsp[(3) - (4)].l_node), NULL);
 		}
     break;
 
   case 31:
-#line 310 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 314 "dt_grammar.y"
     {
 			/*
 			 * If the input stream is a file, do not permit a probe
@@ -2232,14 +2292,18 @@ yyreduce:
     break;
 
   case 32:
-#line 326 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 330 "dt_grammar.y"
     {
 			(yyval.l_node) = dt_node_clause((yyvsp[(1) - (4)].l_node), NULL, (yyvsp[(3) - (4)].l_node));
 		}
     break;
 
   case 33:
-#line 329 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 333 "dt_grammar.y"
     {
 			dnerror((yyvsp[(3) - (4)].l_node), D_SYNTAX, "expected actions { } following "
 			    "probe description and predicate\n");
@@ -2247,460 +2311,612 @@ yyreduce:
     break;
 
   case 34:
-#line 334 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 338 "dt_grammar.y"
     {
 			(yyval.l_node) = dt_node_clause((yyvsp[(1) - (7)].l_node), (yyvsp[(3) - (7)].l_node), (yyvsp[(6) - (7)].l_node));
 		}
     break;
 
   case 35:
-#line 340 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 344 "dt_grammar.y"
     { yybegin(YYS_EXPR); (yyval.l_node) = (yyvsp[(1) - (1)].l_node); }
     break;
 
   case 37:
-#line 345 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 349 "dt_grammar.y"
     {
 			(yyval.l_node) = LINK((yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node));
 		}
     break;
 
   case 38:
-#line 351 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 355 "dt_grammar.y"
     { (yyval.l_node) = dt_node_pdesc_by_name((yyvsp[(1) - (1)].l_str)); }
     break;
 
   case 39:
-#line 352 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 356 "dt_grammar.y"
     { (yyval.l_node) = dt_node_pdesc_by_id((yyvsp[(1) - (1)].l_int)); }
     break;
 
   case 40:
-#line 355 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 359 "dt_grammar.y"
     { (yyval.l_node) = (yyvsp[(1) - (1)].l_node); }
     break;
 
   case 41:
-#line 356 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 360 "dt_grammar.y"
     { (yyval.l_node) = LINK((yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); }
     break;
 
   case 42:
-#line 359 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 363 "dt_grammar.y"
     { (yyval.l_node) = NULL; }
     break;
 
   case 43:
-#line 360 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 364 "dt_grammar.y"
     { (yyval.l_node) = dt_node_statement((yyvsp[(1) - (1)].l_node)); }
     break;
 
   case 45:
-#line 365 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 369 "dt_grammar.y"
     {
 			(yyval.l_node) = LINK((yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node));
 		}
     break;
 
   case 46:
-#line 371 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 375 "dt_grammar.y"
     { (yyval.l_node) = dt_node_ident((yyvsp[(1) - (1)].l_str)); }
     break;
 
   case 47:
-#line 372 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 376 "dt_grammar.y"
     { (yyval.l_node) = dt_node_ident((yyvsp[(1) - (1)].l_str)); }
     break;
 
   case 48:
-#line 373 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 377 "dt_grammar.y"
     { (yyval.l_node) = dt_node_int((yyvsp[(1) - (1)].l_int)); }
     break;
 
   case 49:
-#line 374 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 378 "dt_grammar.y"
     { (yyval.l_node) = dt_node_string((yyvsp[(1) - (1)].l_str)); }
     break;
 
   case 50:
-#line 375 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 379 "dt_grammar.y"
     { (yyval.l_node) = dt_node_ident(DUP("self")); }
     break;
 
   case 51:
-#line 376 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 380 "dt_grammar.y"
     { (yyval.l_node) = dt_node_ident(DUP("this")); }
     break;
 
   case 52:
-#line 377 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 381 "dt_grammar.y"
     { (yyval.l_node) = (yyvsp[(2) - (3)].l_node); }
     break;
 
   case 54:
-#line 383 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 387 "dt_grammar.y"
     {
 			(yyval.l_node) = OP2(DT_TOK_LBRAC, (yyvsp[(1) - (4)].l_node), (yyvsp[(3) - (4)].l_node));
 		}
     break;
 
   case 55:
-#line 386 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 390 "dt_grammar.y"
     {
 			(yyval.l_node) = dt_node_func((yyvsp[(1) - (3)].l_node), NULL);
 		}
     break;
 
   case 56:
-#line 390 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 394 "dt_grammar.y"
     {
 			(yyval.l_node) = dt_node_func((yyvsp[(1) - (4)].l_node), (yyvsp[(3) - (4)].l_node));
 		}
     break;
 
   case 57:
-#line 393 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 397 "dt_grammar.y"
     {
 			(yyval.l_node) = OP2(DT_TOK_DOT, (yyvsp[(1) - (3)].l_node), dt_node_ident((yyvsp[(3) - (3)].l_str)));
 		}
     break;
 
   case 58:
-#line 396 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 400 "dt_grammar.y"
     {
 			(yyval.l_node) = OP2(DT_TOK_DOT, (yyvsp[(1) - (3)].l_node), dt_node_ident((yyvsp[(3) - (3)].l_str)));
 		}
     break;
 
   case 59:
-#line 399 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 403 "dt_grammar.y"
     {
 			(yyval.l_node) = OP2(DT_TOK_PTR, (yyvsp[(1) - (3)].l_node), dt_node_ident((yyvsp[(3) - (3)].l_str)));
 		}
     break;
 
   case 60:
-#line 402 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 406 "dt_grammar.y"
     {
 			(yyval.l_node) = OP2(DT_TOK_PTR, (yyvsp[(1) - (3)].l_node), dt_node_ident((yyvsp[(3) - (3)].l_str)));
 		}
     break;
 
   case 61:
-#line 405 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 409 "dt_grammar.y"
     {
 			(yyval.l_node) = OP1(DT_TOK_POSTINC, (yyvsp[(1) - (2)].l_node));
 		}
     break;
 
   case 62:
-#line 408 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 412 "dt_grammar.y"
     {
 			(yyval.l_node) = OP1(DT_TOK_POSTDEC, (yyvsp[(1) - (2)].l_node));
 		}
     break;
 
   case 63:
-#line 412 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 416 "dt_grammar.y"
     {
 			(yyval.l_node) = dt_node_offsetof((yyvsp[(3) - (6)].l_decl), (yyvsp[(5) - (6)].l_str));
 		}
     break;
 
   case 64:
-#line 416 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 420 "dt_grammar.y"
     {
 			(yyval.l_node) = dt_node_offsetof((yyvsp[(3) - (6)].l_decl), (yyvsp[(5) - (6)].l_str));
 		}
     break;
 
   case 65:
-#line 420 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 424 "dt_grammar.y"
     {
 			(yyval.l_node) = OP2(DT_TOK_XLATE, dt_node_type((yyvsp[(3) - (7)].l_decl)), (yyvsp[(6) - (7)].l_node));
 		}
     break;
 
   case 67:
-#line 427 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 431 "dt_grammar.y"
     { (yyval.l_node) = OP1(DT_TOK_PREINC, (yyvsp[(2) - (2)].l_node)); }
     break;
 
   case 68:
-#line 428 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 432 "dt_grammar.y"
     { (yyval.l_node) = OP1(DT_TOK_PREDEC, (yyvsp[(2) - (2)].l_node)); }
     break;
 
   case 69:
-#line 429 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 433 "dt_grammar.y"
     { (yyval.l_node) = OP1((yyvsp[(1) - (2)].l_tok), (yyvsp[(2) - (2)].l_node)); }
     break;
 
   case 70:
-#line 430 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 434 "dt_grammar.y"
     { (yyval.l_node) = OP1(DT_TOK_SIZEOF, (yyvsp[(2) - (2)].l_node)); }
     break;
 
   case 71:
-#line 431 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 435 "dt_grammar.y"
     {
 			(yyval.l_node) = OP1(DT_TOK_SIZEOF, dt_node_type((yyvsp[(3) - (4)].l_decl)));
 		}
     break;
 
   case 72:
-#line 434 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 438 "dt_grammar.y"
     {
 			(yyval.l_node) = OP1(DT_TOK_STRINGOF, (yyvsp[(2) - (2)].l_node));
 		}
     break;
 
   case 73:
-#line 439 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 443 "dt_grammar.y"
     { (yyval.l_tok) = DT_TOK_ADDROF; }
     break;
 
   case 74:
-#line 440 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 444 "dt_grammar.y"
     { (yyval.l_tok) = DT_TOK_DEREF; }
     break;
 
   case 75:
-#line 441 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 445 "dt_grammar.y"
     { (yyval.l_tok) = DT_TOK_IPOS; }
     break;
 
   case 76:
-#line 442 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 446 "dt_grammar.y"
     { (yyval.l_tok) = DT_TOK_INEG; }
     break;
 
   case 77:
-#line 443 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 447 "dt_grammar.y"
     { (yyval.l_tok) = DT_TOK_BNEG; }
     break;
 
   case 78:
-#line 444 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 448 "dt_grammar.y"
     { (yyval.l_tok) = DT_TOK_LNEG; }
     break;
 
   case 80:
-#line 449 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 453 "dt_grammar.y"
     {
 			(yyval.l_node) = OP2(DT_TOK_LPAR, dt_node_type((yyvsp[(2) - (4)].l_decl)), (yyvsp[(4) - (4)].l_node));
 		}
     break;
 
   case 82:
-#line 456 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 460 "dt_grammar.y"
     {
 			(yyval.l_node) = OP2(DT_TOK_MUL, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node));
 		}
     break;
 
   case 83:
-#line 459 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 463 "dt_grammar.y"
     {
 			(yyval.l_node) = OP2(DT_TOK_DIV, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node));
 		}
     break;
 
   case 84:
-#line 462 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 466 "dt_grammar.y"
     {
 			(yyval.l_node) = OP2(DT_TOK_MOD, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node));
 		}
     break;
 
   case 86:
-#line 469 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 473 "dt_grammar.y"
     {
 			(yyval.l_node) = OP2(DT_TOK_ADD, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node));
 		}
     break;
 
   case 87:
-#line 472 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 476 "dt_grammar.y"
     {
 			(yyval.l_node) = OP2(DT_TOK_SUB, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node));
 		}
     break;
 
   case 89:
-#line 479 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 483 "dt_grammar.y"
     {
 			(yyval.l_node) = OP2(DT_TOK_LSH, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node));
 		}
     break;
 
   case 90:
-#line 482 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 486 "dt_grammar.y"
     {
 			(yyval.l_node) = OP2(DT_TOK_RSH, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node));
 		}
     break;
 
   case 92:
-#line 489 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 493 "dt_grammar.y"
     {
 			(yyval.l_node) = OP2(DT_TOK_LT, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node));
 		}
     break;
 
   case 93:
-#line 492 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 496 "dt_grammar.y"
     {
 			(yyval.l_node) = OP2(DT_TOK_GT, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node));
 		}
     break;
 
   case 94:
-#line 495 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 499 "dt_grammar.y"
     {
 			(yyval.l_node) = OP2(DT_TOK_LE, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node));
 		}
     break;
 
   case 95:
-#line 498 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 502 "dt_grammar.y"
     {
 			(yyval.l_node) = OP2(DT_TOK_GE, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node));
 		}
     break;
 
   case 97:
-#line 505 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 509 "dt_grammar.y"
     {
 			(yyval.l_node) = OP2(DT_TOK_EQU, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node));
 		}
     break;
 
   case 98:
-#line 508 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 512 "dt_grammar.y"
     {
 			(yyval.l_node) = OP2(DT_TOK_NEQ, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node));
 		}
     break;
 
   case 100:
-#line 515 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 519 "dt_grammar.y"
     {
 			(yyval.l_node) = OP2(DT_TOK_BAND, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node));
 		}
     break;
 
   case 102:
-#line 522 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 526 "dt_grammar.y"
     {
 			(yyval.l_node) = OP2(DT_TOK_XOR, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node));
 		}
     break;
 
   case 104:
-#line 529 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 533 "dt_grammar.y"
     {
 			(yyval.l_node) = OP2(DT_TOK_BOR, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node));
 		}
     break;
 
   case 106:
-#line 536 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 540 "dt_grammar.y"
     {
 			(yyval.l_node) = OP2(DT_TOK_LAND, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node));
 		}
     break;
 
   case 108:
-#line 543 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 547 "dt_grammar.y"
     {
 			(yyval.l_node) = OP2(DT_TOK_LXOR, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node));
 		}
     break;
 
   case 110:
-#line 550 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 554 "dt_grammar.y"
     {
 			(yyval.l_node) = OP2(DT_TOK_LOR, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node));
 		}
     break;
 
   case 113:
-#line 561 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 565 "dt_grammar.y"
     { (yyval.l_node) = OP3((yyvsp[(1) - (5)].l_node), (yyvsp[(3) - (5)].l_node), (yyvsp[(5) - (5)].l_node)); }
     break;
 
   case 115:
-#line 566 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 570 "dt_grammar.y"
     {
 			(yyval.l_node) = OP2((yyvsp[(2) - (3)].l_tok), (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node));
 		}
     break;
 
   case 116:
-#line 572 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 576 "dt_grammar.y"
     { (yyval.l_tok) = DT_TOK_ASGN; }
     break;
 
   case 117:
-#line 573 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 577 "dt_grammar.y"
     { (yyval.l_tok) = DT_TOK_MUL_EQ; }
     break;
 
   case 118:
-#line 574 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 578 "dt_grammar.y"
     { (yyval.l_tok) = DT_TOK_DIV_EQ; }
     break;
 
   case 119:
-#line 575 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 579 "dt_grammar.y"
     { (yyval.l_tok) = DT_TOK_MOD_EQ; }
     break;
 
   case 120:
-#line 576 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 580 "dt_grammar.y"
     { (yyval.l_tok) = DT_TOK_ADD_EQ; }
     break;
 
   case 121:
-#line 577 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 581 "dt_grammar.y"
     { (yyval.l_tok) = DT_TOK_SUB_EQ; }
     break;
 
   case 122:
-#line 578 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 582 "dt_grammar.y"
     { (yyval.l_tok) = DT_TOK_LSH_EQ; }
     break;
 
   case 123:
-#line 579 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 583 "dt_grammar.y"
     { (yyval.l_tok) = DT_TOK_RSH_EQ; }
     break;
 
   case 124:
-#line 580 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 584 "dt_grammar.y"
     { (yyval.l_tok) = DT_TOK_AND_EQ; }
     break;
 
   case 125:
-#line 581 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 585 "dt_grammar.y"
     { (yyval.l_tok) = DT_TOK_XOR_EQ; }
     break;
 
   case 126:
-#line 582 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 586 "dt_grammar.y"
     { (yyval.l_tok) = DT_TOK_OR_EQ; }
     break;
 
   case 128:
-#line 586 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 590 "dt_grammar.y"
     {
 			(yyval.l_node) = OP2(DT_TOK_COMMA, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node));
 		}
     break;
 
   case 129:
-#line 591 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 595 "dt_grammar.y"
     {
 			(yyval.l_node) = dt_node_decl();
 			dt_decl_free(dt_decl_pop());
@@ -2709,7 +2925,9 @@ yyreduce:
     break;
 
   case 130:
-#line 596 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 600 "dt_grammar.y"
     {
 			(yyval.l_node) = (yyvsp[(2) - (3)].l_node);
 			dt_decl_free(dt_decl_pop());
@@ -2718,163 +2936,225 @@ yyreduce:
     break;
 
   case 143:
-#line 622 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 626 "dt_grammar.y"
     { dt_decl_class(DT_DC_AUTO); }
     break;
 
   case 144:
-#line 623 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 627 "dt_grammar.y"
     { dt_decl_class(DT_DC_REGISTER); }
     break;
 
   case 145:
-#line 624 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 628 "dt_grammar.y"
     { dt_decl_class(DT_DC_STATIC); }
     break;
 
   case 146:
-#line 625 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 629 "dt_grammar.y"
     { dt_decl_class(DT_DC_EXTERN); }
     break;
 
   case 147:
-#line 626 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 630 "dt_grammar.y"
     { dt_decl_class(DT_DC_TYPEDEF); }
     break;
 
   case 149:
-#line 631 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 635 "dt_grammar.y"
     { dt_decl_class(DT_DC_SELF); }
     break;
 
   case 150:
-#line 632 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 636 "dt_grammar.y"
     { dt_decl_class(DT_DC_THIS); }
     break;
 
   case 151:
-#line 635 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 639 "dt_grammar.y"
     { (yyval.l_decl) = dt_decl_spec(CTF_K_INTEGER, DUP("void")); }
     break;
 
   case 152:
-#line 636 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 640 "dt_grammar.y"
     { (yyval.l_decl) = dt_decl_spec(CTF_K_INTEGER, DUP("char")); }
     break;
 
   case 153:
-#line 637 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 641 "dt_grammar.y"
     { (yyval.l_decl) = dt_decl_attr(DT_DA_SHORT); }
     break;
 
   case 154:
-#line 638 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 642 "dt_grammar.y"
     { (yyval.l_decl) = dt_decl_spec(CTF_K_INTEGER, DUP("int")); }
     break;
 
   case 155:
-#line 639 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 643 "dt_grammar.y"
     { (yyval.l_decl) = dt_decl_attr(DT_DA_LONG); }
     break;
 
   case 156:
-#line 640 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 644 "dt_grammar.y"
     { (yyval.l_decl) = dt_decl_spec(CTF_K_FLOAT, DUP("float")); }
     break;
 
   case 157:
-#line 641 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 645 "dt_grammar.y"
     { (yyval.l_decl) = dt_decl_spec(CTF_K_FLOAT, DUP("double")); }
     break;
 
   case 158:
-#line 642 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 646 "dt_grammar.y"
     { (yyval.l_decl) = dt_decl_attr(DT_DA_SIGNED); }
     break;
 
   case 159:
-#line 643 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 647 "dt_grammar.y"
     { (yyval.l_decl) = dt_decl_attr(DT_DA_UNSIGNED); }
     break;
 
   case 160:
-#line 644 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 648 "dt_grammar.y"
     {
 			(yyval.l_decl) = dt_decl_spec(CTF_K_TYPEDEF, DUP("string"));
 		}
     break;
 
   case 161:
-#line 647 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 651 "dt_grammar.y"
     { (yyval.l_decl) = dt_decl_spec(CTF_K_TYPEDEF, (yyvsp[(1) - (1)].l_str)); }
     break;
 
   case 164:
-#line 652 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 656 "dt_grammar.y"
     { (yyval.l_decl) = dt_decl_attr(DT_DA_CONST); }
     break;
 
   case 165:
-#line 653 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 657 "dt_grammar.y"
     { (yyval.l_decl) = dt_decl_attr(DT_DA_RESTRICT); }
     break;
 
   case 166:
-#line 654 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 658 "dt_grammar.y"
     { (yyval.l_decl) = dt_decl_attr(DT_DA_VOLATILE); }
     break;
 
   case 167:
-#line 658 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 662 "dt_grammar.y"
     {
 			(yyval.l_decl) = dt_scope_pop();
 		}
     break;
 
   case 168:
-#line 661 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 665 "dt_grammar.y"
     { (yyval.l_decl) = dt_decl_spec((yyvsp[(1) - (2)].l_tok), (yyvsp[(2) - (2)].l_str)); }
     break;
 
   case 169:
-#line 662 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 666 "dt_grammar.y"
     { (yyval.l_decl) = dt_decl_spec((yyvsp[(1) - (2)].l_tok), (yyvsp[(2) - (2)].l_str)); }
     break;
 
   case 170:
-#line 666 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 670 "dt_grammar.y"
     { dt_decl_sou((yyvsp[(1) - (2)].l_tok), NULL); }
     break;
 
   case 171:
-#line 667 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 671 "dt_grammar.y"
     { dt_decl_sou((yyvsp[(1) - (3)].l_tok), (yyvsp[(2) - (3)].l_str)); }
     break;
 
   case 172:
-#line 668 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 672 "dt_grammar.y"
     { dt_decl_sou((yyvsp[(1) - (3)].l_tok), (yyvsp[(2) - (3)].l_str)); }
     break;
 
   case 173:
-#line 672 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 676 "dt_grammar.y"
     { (yyval.l_tok) = CTF_K_STRUCT; }
     break;
 
   case 174:
-#line 673 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 677 "dt_grammar.y"
     { (yyval.l_tok) = CTF_K_UNION; }
     break;
 
   case 178:
-#line 683 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 687 "dt_grammar.y"
     {
 			(yyval.l_node) = LINK((yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node));
 		}
     break;
 
   case 179:
-#line 689 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 693 "dt_grammar.y"
     {
 			(yyval.l_node) = dt_node_decl();
 			dt_decl_reset();
@@ -2882,217 +3162,295 @@ yyreduce:
     break;
 
   case 180:
-#line 696 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 700 "dt_grammar.y"
     {
 			dt_decl_free(dt_decl_pop());
 		}
     break;
 
   case 182:
-#line 703 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 707 "dt_grammar.y"
     { (yyval.l_decl) = (yyvsp[(2) - (2)].l_decl); }
     break;
 
   case 184:
-#line 705 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 709 "dt_grammar.y"
     { (yyval.l_decl) = (yyvsp[(2) - (2)].l_decl); }
     break;
 
   case 187:
-#line 714 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 718 "dt_grammar.y"
     { dt_decl_member(NULL); }
     break;
 
   case 188:
-#line 715 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 719 "dt_grammar.y"
     { dt_decl_member((yyvsp[(2) - (2)].l_node)); }
     break;
 
   case 189:
-#line 716 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 720 "dt_grammar.y"
     {
 			dt_decl_member((yyvsp[(3) - (3)].l_node));
 		}
     break;
 
   case 190:
-#line 722 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 726 "dt_grammar.y"
     { (yyval.l_decl) = dt_scope_pop(); }
     break;
 
   case 191:
-#line 723 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 727 "dt_grammar.y"
     { (yyval.l_decl) = dt_decl_spec(CTF_K_ENUM, (yyvsp[(2) - (2)].l_str)); }
     break;
 
   case 192:
-#line 724 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 728 "dt_grammar.y"
     { (yyval.l_decl) = dt_decl_spec(CTF_K_ENUM, (yyvsp[(2) - (2)].l_str)); }
     break;
 
   case 193:
-#line 728 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 732 "dt_grammar.y"
     { dt_decl_enum(NULL); }
     break;
 
   case 194:
-#line 729 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 733 "dt_grammar.y"
     { dt_decl_enum((yyvsp[(2) - (3)].l_str)); }
     break;
 
   case 195:
-#line 730 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 734 "dt_grammar.y"
     { dt_decl_enum((yyvsp[(2) - (3)].l_str)); }
     break;
 
   case 198:
-#line 738 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 742 "dt_grammar.y"
     { dt_decl_enumerator((yyvsp[(1) - (1)].l_str), NULL); }
     break;
 
   case 199:
-#line 739 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 743 "dt_grammar.y"
     {
 			dt_decl_enumerator((yyvsp[(1) - (3)].l_str), (yyvsp[(3) - (3)].l_node));
 		}
     break;
 
   case 202:
-#line 749 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 753 "dt_grammar.y"
     { (yyval.l_decl) = dt_decl_ident((yyvsp[(1) - (1)].l_str)); }
     break;
 
   case 203:
-#line 750 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 754 "dt_grammar.y"
     { (yyval.l_decl) = (yyvsp[(2) - (3)].l_decl); }
     break;
 
   case 204:
-#line 751 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 755 "dt_grammar.y"
     { dt_decl_array((yyvsp[(2) - (2)].l_node)); }
     break;
 
   case 205:
-#line 752 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 756 "dt_grammar.y"
     { dt_decl_func((yyvsp[(1) - (2)].l_decl), (yyvsp[(2) - (2)].l_node)); }
     break;
 
   case 206:
-#line 755 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 759 "dt_grammar.y"
     { dt_decl_top()->dd_attr |= DT_DA_PAREN; }
     break;
 
   case 207:
-#line 758 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 762 "dt_grammar.y"
     { (yyval.l_decl) = dt_decl_ptr(); }
     break;
 
   case 208:
-#line 759 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 763 "dt_grammar.y"
     { (yyval.l_decl) = dt_decl_ptr(); }
     break;
 
   case 209:
-#line 760 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 764 "dt_grammar.y"
     { (yyval.l_decl) = dt_decl_ptr(); }
     break;
 
   case 210:
-#line 761 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 765 "dt_grammar.y"
     { (yyval.l_decl) = dt_decl_ptr(); }
     break;
 
   case 212:
-#line 766 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 770 "dt_grammar.y"
     { (yyval.l_decl) = (yyvsp[(2) - (2)].l_decl); }
     break;
 
   case 214:
-#line 771 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 775 "dt_grammar.y"
     { (yyval.l_node) = dt_node_vatype(); }
     break;
 
   case 215:
-#line 772 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 776 "dt_grammar.y"
     {
 			(yyval.l_node) = LINK((yyvsp[(1) - (3)].l_node), dt_node_vatype());
 		}
     break;
 
   case 217:
-#line 778 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 782 "dt_grammar.y"
     {
 			(yyval.l_node) = LINK((yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node));
 		}
     break;
 
   case 218:
-#line 784 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 788 "dt_grammar.y"
     {
 			(yyval.l_node) = dt_node_type(NULL);
 		}
     break;
 
   case 219:
-#line 787 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 791 "dt_grammar.y"
     {
 			(yyval.l_node) = dt_node_type(NULL);
 		}
     break;
 
   case 220:
-#line 790 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 794 "dt_grammar.y"
     {
 			(yyval.l_node) = dt_node_type(NULL);
 		}
     break;
 
   case 221:
-#line 795 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 799 "dt_grammar.y"
     {
 			(yyval.l_decl) = dt_decl_pop();
 		}
     break;
 
   case 222:
-#line 798 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 802 "dt_grammar.y"
     {
 			(yyval.l_decl) = dt_decl_pop();
 		}
     break;
 
   case 226:
-#line 810 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 814 "dt_grammar.y"
     { (yyval.l_decl) = (yyvsp[(2) - (3)].l_decl); }
     break;
 
   case 227:
-#line 811 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 815 "dt_grammar.y"
     { dt_decl_array((yyvsp[(2) - (2)].l_node)); }
     break;
 
   case 228:
-#line 812 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 816 "dt_grammar.y"
     { dt_decl_array((yyvsp[(1) - (1)].l_node)); (yyval.l_decl) = NULL; }
     break;
 
   case 229:
-#line 813 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 817 "dt_grammar.y"
     { dt_decl_func((yyvsp[(1) - (2)].l_decl), (yyvsp[(2) - (2)].l_node)); }
     break;
 
   case 230:
-#line 814 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 818 "dt_grammar.y"
     { dt_decl_func(NULL, (yyvsp[(1) - (1)].l_node)); }
     break;
 
   case 231:
-#line 817 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 821 "dt_grammar.y"
     { dt_scope_push(NULL, CTF_ERR); }
     break;
 
   case 232:
-#line 818 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 822 "dt_grammar.y"
     {
 			dt_scope_pop();
 			(yyval.l_node) = (yyvsp[(3) - (4)].l_node);
@@ -3100,27 +3458,37 @@ yyreduce:
     break;
 
   case 233:
-#line 825 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 829 "dt_grammar.y"
     { (yyval.l_node) = NULL; }
     break;
 
   case 234:
-#line 826 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 830 "dt_grammar.y"
     { (yyval.l_node) = (yyvsp[(1) - (1)].l_node); }
     break;
 
   case 235:
-#line 827 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 831 "dt_grammar.y"
     { (yyval.l_node) = (yyvsp[(1) - (1)].l_node); }
     break;
 
   case 236:
-#line 830 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 834 "dt_grammar.y"
     { dt_scope_push(NULL, CTF_ERR); }
     break;
 
   case 237:
-#line 831 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 835 "dt_grammar.y"
     {
 			dt_scope_pop();
 			(yyval.l_node) = (yyvsp[(3) - (4)].l_node);
@@ -3128,18 +3496,23 @@ yyreduce:
     break;
 
   case 238:
-#line 838 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 842 "dt_grammar.y"
     { (yyval.l_node) = NULL; }
     break;
 
   case 239:
-#line 839 "dt_grammar.y"
+
+/* Line 1455 of yacc.c  */
+#line 843 "dt_grammar.y"
     { (yyval.l_node) = (yyvsp[(1) - (1)].l_node); }
     break;
 
 
-/* Line 1267 of yacc.c.  */
-#line 3143 "dt_grammar.c"
+
+/* Line 1455 of yacc.c  */
+#line 3516 "dt_grammar.c"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -3150,7 +3523,6 @@ yyreduce:
 
   *++yyvsp = yyval;
 
-
   /* Now `shift' the result of the reduction.  Determine what state
      that goes to, based on the state we popped back to and the rule
      number reduced by.  */
@@ -3215,7 +3587,7 @@ yyerrlab:
 
   if (yyerrstatus == 3)
     {
-      /* If just tried and failed to reuse look-ahead token after an
+      /* If just tried and failed to reuse lookahead token after an
 	 error, discard it.  */
 
       if (yychar <= YYEOF)
@@ -3232,7 +3604,7 @@ yyerrlab:
 	}
     }
 
-  /* Else will try to reuse look-ahead token after shifting the error
+  /* Else will try to reuse lookahead token after shifting the error
      token.  */
   goto yyerrlab1;
 
@@ -3289,9 +3661,6 @@ yyerrlab1:
       YY_STACK_PRINT (yyss, yyssp);
     }
 
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
   *++yyvsp = yylval;
 
 
@@ -3316,7 +3685,7 @@ yyabortlab:
   yyresult = 1;
   goto yyreturn;
 
-#ifndef yyoverflow
+#if !defined(yyoverflow) || YYERROR_VERBOSE
 /*-------------------------------------------------.
 | yyexhaustedlab -- memory exhaustion comes here.  |
 `-------------------------------------------------*/
@@ -3327,7 +3696,7 @@ yyexhaustedlab:
 #endif
 
 yyreturn:
-  if (yychar != YYEOF && yychar != YYEMPTY)
+  if (yychar != YYEMPTY)
      yydestruct ("Cleanup: discarding lookahead",
 		 yytoken, &yylval);
   /* Do not reclaim the symbols of the rule which action triggered
@@ -3353,6 +3722,8 @@ yyreturn:
 }
 
 
-#line 842 "dt_grammar.y"
+
+/* Line 1675 of yacc.c  */
+#line 846 "dt_grammar.y"
 
 
diff --git a/src/VBox/ExtPacks/VBoxDTrace/generated/dt_grammar.h b/src/VBox/ExtPacks/VBoxDTrace/generated/dt_grammar.h
index 5d7538f..cf62453 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/generated/dt_grammar.h
+++ b/src/VBox/ExtPacks/VBoxDTrace/generated/dt_grammar.h
@@ -1,24 +1,23 @@
-/* A Bison parser, made by GNU Bison 2.3.  */
 
-/* Skeleton interface for Bison's Yacc-like parsers in C
+/* A Bison parser, made by GNU Bison 2.4.1.  */
 
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+/* Skeleton interface for Bison's Yacc-like parsers in C
+   
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
    Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
+   
+   This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+   
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-
+   
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* As a special exception, you may create a larger work that contains
    part or all of the Bison parser skeleton and distribute that work
@@ -29,10 +28,11 @@
    special exception, which will cause the skeleton and the resulting
    Bison output files to be licensed under the GNU General Public
    License without this special exception.
-
+   
    This special exception was added by the Free Software Foundation in
    version 2.2 of Bison.  */
 
+
 /* Tokens.  */
 #ifndef YYTOKENTYPE
 # define YYTOKENTYPE
@@ -264,21 +264,27 @@
 
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union YYSTYPE
-#line 47 "dt_grammar.y"
 {
+
+/* Line 1676 of yacc.c  */
+#line 51 "dt_grammar.y"
+
 	dt_node_t *l_node;
 	dt_decl_t *l_decl;
 	char *l_str;
 	uintmax_t l_int;
 	int l_tok;
-}
-/* Line 1529 of yacc.c.  */
-#line 277 "dt_grammar.h"
-	YYSTYPE;
+
+
+
+/* Line 1676 of yacc.c  */
+#line 282 "dt_grammar.h"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
 #endif
 
 extern YYSTYPE yylval;
 
+
diff --git a/src/VBox/ExtPacks/VBoxDTrace/generated/dt_lex.c b/src/VBox/ExtPacks/VBoxDTrace/generated/dt_lex.c
index 8026f40..f6c75d6 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/generated/dt_lex.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/generated/dt_lex.c
@@ -1,113 +1,68 @@
 #line 2 "dt_lex.c"
-
-#line 4 "dt_lex.c"
-
-#define  YY_INT_ALIGNED short int
-
 /* A lexical scanner generated by flex */
 
+/* Scanner skeleton version:
+ * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
+ */
+
 #define FLEX_SCANNER
 #define YY_FLEX_MAJOR_VERSION 2
 #define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
-#if YY_FLEX_SUBMINOR_VERSION > 0
-#define FLEX_BETA
-#endif
 
-/* First, we deal with  platform-specific or compiler-specific issues. */
-
-/* begin standard C headers. */
 #include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <stdlib.h>
-
-/* end standard C headers. */
-
-/* flex integer type definitions */
-
-#ifndef FLEXINT_H
-#define FLEXINT_H
-
-/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
-
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
-
-/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types. 
- */
-#ifndef __STDC_LIMIT_MACROS
-#define __STDC_LIMIT_MACROS 1
-#endif
 
-#include <inttypes.h>
-typedef int8_t flex_int8_t;
-typedef uint8_t flex_uint8_t;
-typedef int16_t flex_int16_t;
-typedef uint16_t flex_uint16_t;
-typedef int32_t flex_int32_t;
-typedef uint32_t flex_uint32_t;
-#else
-typedef signed char flex_int8_t;
-typedef short int flex_int16_t;
-typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t; 
-typedef unsigned short int flex_uint16_t;
-typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
 
-/* Limits of integral types. */
-#ifndef INT8_MIN
-#define INT8_MIN               (-128)
-#endif
-#ifndef INT16_MIN
-#define INT16_MIN              (-32767-1)
-#endif
-#ifndef INT32_MIN
-#define INT32_MIN              (-2147483647-1)
-#endif
-#ifndef INT8_MAX
-#define INT8_MAX               (127)
-#endif
-#ifndef INT16_MAX
-#define INT16_MAX              (32767)
-#endif
-#ifndef INT32_MAX
-#define INT32_MAX              (2147483647)
-#endif
-#ifndef UINT8_MAX
-#define UINT8_MAX              (255U)
-#endif
-#ifndef UINT16_MAX
-#define UINT16_MAX             (65535U)
+/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
+#ifdef c_plusplus
+#ifndef __cplusplus
+#define __cplusplus
 #endif
-#ifndef UINT32_MAX
-#define UINT32_MAX             (4294967295U)
 #endif
 
-#endif /* ! FLEXINT_H */
 
 #ifdef __cplusplus
 
+#include <stdlib.h>
+#include <unistd.h>
+
+/* Use prototypes in function declarations. */
+#define YY_USE_PROTOS
+
 /* The "const" storage-class-modifier is valid. */
 #define YY_USE_CONST
 
 #else	/* ! __cplusplus */
 
-/* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
+#if __STDC__
 
+#define YY_USE_PROTOS
 #define YY_USE_CONST
 
-#endif	/* defined (__STDC__) */
+#endif	/* __STDC__ */
 #endif	/* ! __cplusplus */
 
+#ifdef __TURBOC__
+ #pragma warn -rch
+ #pragma warn -use
+#include <io.h>
+#include <stdlib.h>
+#define YY_USE_CONST
+#define YY_USE_PROTOS
+#endif
+
 #ifdef YY_USE_CONST
 #define yyconst const
 #else
 #define yyconst
 #endif
 
+
+#ifdef YY_USE_PROTOS
+#define YY_PROTO(proto) proto
+#else
+#define YY_PROTO(proto) ()
+#endif
+
 /* Returned upon end-of-file. */
 #define YY_NULL 0
 
@@ -122,83 +77,71 @@ typedef unsigned int flex_uint32_t;
  * but we do it the disgusting crufty way forced on us by the ()-less
  * definition of BEGIN.
  */
-#define BEGIN (yy_start) = 1 + 2 *
+#define BEGIN yy_start = 1 + 2 *
 
 /* Translate the current start state into a value that can be later handed
  * to BEGIN to return to the state.  The YYSTATE alias is for lex
  * compatibility.
  */
-#define YY_START (((yy_start) - 1) / 2)
+#define YY_START ((yy_start - 1) / 2)
 #define YYSTATE YY_START
 
 /* Action number for EOF rule of a given start state. */
 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
 
 /* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart(yyin  )
+#define YY_NEW_FILE yyrestart( yyin )
 
 #define YY_END_OF_BUFFER_CHAR 0
 
 /* Size of default input buffer. */
-#ifndef YY_BUF_SIZE
 #define YY_BUF_SIZE 16384
-#endif
 
-/* The state buf must be large enough to hold one state per character in the main buffer.
- */
-#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
-
-#ifndef YY_TYPEDEF_YY_BUFFER_STATE
-#define YY_TYPEDEF_YY_BUFFER_STATE
 typedef struct yy_buffer_state *YY_BUFFER_STATE;
-#endif
-
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
-extern yy_size_t yyleng;
 
+extern int yyleng;
 extern FILE *yyin, *yyout;
 
 #define EOB_ACT_CONTINUE_SCAN 0
 #define EOB_ACT_END_OF_FILE 1
 #define EOB_ACT_LAST_MATCH 2
 
-    /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
-     *       access to the local variable yy_act. Since yyless() is a macro, it would break
-     *       existing scanners that call yyless() from OUTSIDE yylex. 
-     *       One obvious solution it to make yy_act a global. I tried that, and saw
-     *       a 5% performance hit in a non-yylineno scanner, because yy_act is
-     *       normally declared as a register variable-- so it is not worth it.
-     */
-    #define  YY_LESS_LINENO(n) \
-            do { \
-                yy_size_t yyl;\
-                for ( yyl = n; yyl < yyleng; ++yyl )\
-                    if ( yytext[yyl] == '\n' )\
-                        --yylineno;\
-            }while(0)
-    
-/* Return all but the first "n" matched characters back to the input stream. */
+/* The funky do-while in the following #define is used to turn the definition
+ * int a single C statement (which needs a semi-colon terminator).  This
+ * avoids problems with code like:
+ *
+ * 	if ( condition_holds )
+ *		yyless( 5 );
+ *	else
+ *		do_something_else();
+ *
+ * Prior to using the do-while the compiler would get upset at the
+ * "else" because it interpreted the "if" statement as being all
+ * done when it reached the ';' after the yyless() call.
+ */
+
+/* Return all but the first 'n' matched characters back to the input stream. */
+
 #define yyless(n) \
 	do \
 		{ \
 		/* Undo effects of setting up yytext. */ \
-        int yyless_macro_arg = (n); \
-        YY_LESS_LINENO(yyless_macro_arg);\
-		*yy_cp = (yy_hold_char); \
+		*yy_cp = yy_hold_char; \
 		YY_RESTORE_YY_MORE_OFFSET \
-		(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
+		yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
 		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
 		} \
 	while ( 0 )
 
-#define unput(c) yyunput( c, (yytext_ptr)  )
+#define unput(c) yyunput( c, yytext_ptr )
+
+/* The following is because we cannot portably get our hands on size_t
+ * (without autoconf's help, which isn't available because we want
+ * flex-generated scanners to compile on their own).
+ */
+typedef unsigned int yy_size_t;
+
 
-#ifndef YY_STRUCT_YY_BUFFER_STATE
-#define YY_STRUCT_YY_BUFFER_STATE
 struct yy_buffer_state
 	{
 	FILE *yy_input_file;
@@ -214,7 +157,7 @@ struct yy_buffer_state
 	/* Number of characters read into yy_ch_buf, not including EOB
 	 * characters.
 	 */
-	yy_size_t yy_n_chars;
+	int yy_n_chars;
 
 	/* Whether we "own" the buffer - i.e., we know we created it,
 	 * and can realloc() it to grow it, and should free() it to
@@ -235,16 +178,12 @@ struct yy_buffer_state
 	 */
 	int yy_at_bol;
 
-    int yy_bs_lineno; /**< The line count. */
-    int yy_bs_column; /**< The column count. */
-    
 	/* Whether to try to fill the input buffer when we reach the
 	 * end of it.
 	 */
 	int yy_fill_buffer;
 
 	int yy_buffer_status;
-
 #define YY_BUFFER_NEW 0
 #define YY_BUFFER_NORMAL 1
 	/* When an EOF's been seen but there's still some text to process
@@ -258,38 +197,28 @@ struct yy_buffer_state
 	 * just pointing yyin at a new input file.
 	 */
 #define YY_BUFFER_EOF_PENDING 2
-
 	};
-#endif /* !YY_STRUCT_YY_BUFFER_STATE */
 
-/* Stack of input buffers. */
-static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
-static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
-static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
+static YY_BUFFER_STATE yy_current_buffer = 0;
 
 /* We provide macros for accessing buffer states in case in the
  * future we want to put the buffer states in a more general
  * "scanner state".
- *
- * Returns the top of the stack, or NULL.
  */
-#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
-                          ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
-                          : NULL)
+#define YY_CURRENT_BUFFER yy_current_buffer
 
-/* Same as previous macro, but useful when we know that the buffer stack is not
- * NULL or when we need an lvalue. For internal use only.
- */
-#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
 
 /* yy_hold_char holds the character lost when yytext is formed. */
 static char yy_hold_char;
-static yy_size_t yy_n_chars;		/* number of characters read into yy_ch_buf */
-yy_size_t yyleng;
+
+static int yy_n_chars;		/* number of characters read into yy_ch_buf */
+
+
+int yyleng;
 
 /* Points to current character in buffer. */
 static char *yy_c_buf_p = (char *) 0;
-static int yy_init = 0;		/* whether we need to initialize */
+static int yy_init = 1;		/* whether we need to initialize */
 static int yy_start = 0;	/* start state number */
 
 /* Flag which is used to allow yywrap()'s to do buffer switches
@@ -297,98 +226,77 @@ static int yy_start = 0;	/* start state number */
  */
 static int yy_did_buffer_switch_on_eof;
 
-void yyrestart (FILE *input_file  );
-void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
-YY_BUFFER_STATE yy_create_buffer (FILE *file,int size  );
-void yy_delete_buffer (YY_BUFFER_STATE b  );
-void yy_flush_buffer (YY_BUFFER_STATE b  );
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer  );
-void yypop_buffer_state (void );
-
-static void yyensure_buffer_stack (void );
-static void yy_load_buffer_state (void );
-static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file  );
+void yyrestart YY_PROTO(( FILE *input_file ));
 
-#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
+void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
+void yy_load_buffer_state YY_PROTO(( void ));
+YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
+void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
+void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
 
-YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size  );
-YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str  );
-YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len  );
+YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
+YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
+YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
 
-void *yyalloc (yy_size_t  );
-void *yyrealloc (void *,yy_size_t  );
-void yyfree (void *  );
+static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
+static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
+static void yy_flex_free YY_PROTO(( void * ));
 
 #define yy_new_buffer yy_create_buffer
 
 #define yy_set_interactive(is_interactive) \
 	{ \
-	if ( ! YY_CURRENT_BUFFER ){ \
-        yyensure_buffer_stack (); \
-		YY_CURRENT_BUFFER_LVALUE =    \
-            yy_create_buffer(yyin,YY_BUF_SIZE ); \
-	} \
-	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
+	if ( ! yy_current_buffer ) \
+		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+	yy_current_buffer->yy_is_interactive = is_interactive; \
 	}
 
 #define yy_set_bol(at_bol) \
 	{ \
-	if ( ! YY_CURRENT_BUFFER ){\
-        yyensure_buffer_stack (); \
-		YY_CURRENT_BUFFER_LVALUE =    \
-            yy_create_buffer(yyin,YY_BUF_SIZE ); \
-	} \
-	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
+	if ( ! yy_current_buffer ) \
+		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+	yy_current_buffer->yy_at_bol = at_bol; \
 	}
 
-#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
+#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
 
-/* Begin user sect3 */
 
+#define YY_USES_REJECT
 typedef unsigned char YY_CHAR;
-
 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
-
 typedef int yy_state_type;
-
 #define YY_FLEX_LEX_COMPAT
 extern int yylineno;
-
 int yylineno = 1;
-
 extern char yytext[];
 
-static yy_state_type yy_get_previous_state (void );
-static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
-static int yy_get_next_buffer (void );
-static void yy_fatal_error (yyconst char msg[]  );
+
+static yy_state_type yy_get_previous_state YY_PROTO(( void ));
+static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
+static int yy_get_next_buffer YY_PROTO(( void ));
+static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
 
 /* Done after the current pattern has been matched and before the
  * corresponding action - sets up yytext.
  */
 #define YY_DO_BEFORE_ACTION \
-	(yytext_ptr) = yy_bp; \
-	yyleng = (size_t) (yy_cp - yy_bp); \
-	(yy_hold_char) = *yy_cp; \
+	yytext_ptr = yy_bp; \
+	yyleng = (int) (yy_cp - yy_bp); \
+	yy_hold_char = *yy_cp; \
 	*yy_cp = '\0'; \
-	if ( yyleng + (yy_more_offset) >= YYLMAX ) \
+	if ( yyleng + yy_more_offset >= YYLMAX ) \
 		YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \
-	yy_flex_strncpy( &yytext[(yy_more_offset)], (yytext_ptr), yyleng + 1 ); \
-	yyleng += (yy_more_offset); \
-	(yy_prev_more_offset) = (yy_more_offset); \
-	(yy_more_offset) = 0; \
-	(yy_c_buf_p) = yy_cp;
+	yy_flex_strncpy( &yytext[yy_more_offset], yytext_ptr, yyleng + 1 ); \
+	yyleng += yy_more_offset; \
+	yy_prev_more_offset = yy_more_offset; \
+	yy_more_offset = 0; \
+	yy_c_buf_p = yy_cp;
 
 #define YY_NUM_RULES 162
 #define YY_END_OF_BUFFER 163
-/* This struct is not used in this scanner,
-   but its presence is necessary. */
-struct yy_trans_info
-	{
-	flex_int32_t yy_verify;
-	flex_int32_t yy_nxt;
-	};
-static yyconst flex_int16_t yy_acclist[740] =
+static yyconst short int yy_acclist[740] =
     {   0,
       163,  162,  149,  162,  147,  149,  162,  147,  162,  126,
       149,  162,  149,  162,16469,  149,  162,  124,  149,  162,
@@ -473,7 +381,7 @@ static yyconst flex_int16_t yy_acclist[740] =
       153,   73,  153,   78,  153,   38,   78,   68,  153
     } ;
 
-static yyconst flex_int16_t yy_accept[511] =
+static yyconst short int yy_accept[511] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    2,    3,    5,    8,   10,   13,   16,
@@ -533,7 +441,7 @@ static yyconst flex_int16_t yy_accept[511] =
       727,  729,  730,  732,  734,  735,  736,  738,  740,  740
     } ;
 
-static yyconst flex_int32_t yy_ec[256] =
+static yyconst int yy_ec[256] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
         2,    2,    4,    1,    1,    1,    1,    1,    1,    1,
@@ -565,7 +473,7 @@ static yyconst flex_int32_t yy_ec[256] =
         1,    1,    1,    1,    1
     } ;
 
-static yyconst flex_int32_t yy_meta[69] =
+static yyconst int yy_meta[69] =
     {   0,
         1,    2,    3,    1,    4,    2,    1,    5,    1,    1,
         1,    1,    1,    4,    1,    1,    4,    4,    1,    6,
@@ -576,7 +484,7 @@ static yyconst flex_int32_t yy_meta[69] =
         8,    8,    8,    8,    1,    1,    1,    1
     } ;
 
-static yyconst flex_int16_t yy_base[530] =
+static yyconst short int yy_base[530] =
     {   0,
         0,    0,    0,   67,   56,   57,   76,  143,  145,  150,
       811,  152,  813,  815,  815,  815,  815,  787,  143,  152,
@@ -638,7 +546,7 @@ static yyconst flex_int16_t yy_base[530] =
       551,  555,  559,  563,  565,  573,  577,  584,  588
     } ;
 
-static yyconst flex_int16_t yy_def[530] =
+static yyconst short int yy_def[530] =
     {   0,
       510,  510,  509,    3,  511,  511,  509,    7,  512,  512,
       513,  513,  509,  509,  509,  509,  509,  509,  514,  515,
@@ -700,7 +608,7 @@ static yyconst flex_int16_t yy_def[530] =
       509,  509,  509,  509,  509,  509,  509,  509,  509
     } ;
 
-static yyconst flex_int16_t yy_nxt[884] =
+static yyconst short int yy_nxt[884] =
     {   0,
        15,   16,   17,   16,   18,   19,   15,   20,   21,   22,
        23,   24,   25,   26,   27,   28,   29,   30,   31,   32,
@@ -801,7 +709,7 @@ static yyconst flex_int16_t yy_nxt[884] =
       509,  509,  509
     } ;
 
-static yyconst flex_int16_t yy_chk[884] =
+static yyconst short int yy_chk[884] =
     {   0,
         3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
         3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
@@ -902,23 +810,7 @@ static yyconst flex_int16_t yy_chk[884] =
       509,  509,  509
     } ;
 
-/* Table of booleans, true if rule could match eol. */
-static yyconst flex_int32_t yy_rule_can_match_eol[163] =
-    {   0,
-0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-    0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 
-    0, 0, 0,     };
-
-extern int yy_flex_debug;
-int yy_flex_debug = 0;
-
-static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
+static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
 static char *yy_full_match;
 static int yy_lp;
 static int yy_looking_for_trail_begin = 0;
@@ -928,24 +820,23 @@ static int *yy_full_state;
 #define YY_TRAILING_HEAD_MASK 0x4000
 #define REJECT \
 { \
-*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ \
-yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
-(yy_lp) = (yy_full_lp); /* restore orig. accepting pos. */ \
-(yy_state_ptr) = (yy_full_state); /* restore orig. state */ \
-yy_current_state = *(yy_state_ptr); /* restore curr. state */ \
-++(yy_lp); \
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
+yy_cp = yy_full_match; /* restore poss. backed-over text */ \
+yy_lp = yy_full_lp; /* restore orig. accepting pos. */ \
+yy_state_ptr = yy_full_state; /* restore orig. state */ \
+yy_current_state = *yy_state_ptr; /* restore curr. state */ \
+++yy_lp; \
 goto find_rule; \
 }
-
 static int yy_more_offset = 0;
 static int yy_prev_more_offset = 0;
-#define yymore() ((yy_more_offset) = yy_flex_strlen( yytext ))
+#define yymore() (yy_more_offset = yy_flex_strlen( yytext ))
 #define YY_NEED_STRLEN
 #define YY_MORE_ADJ 0
 #define YY_RESTORE_YY_MORE_OFFSET \
 	{ \
-	(yy_more_offset) = (yy_prev_more_offset); \
-	yyleng -= (yy_more_offset); \
+	yy_more_offset = yy_prev_more_offset; \
+	yyleng -= yy_more_offset; \
 	}
 #ifndef YYLMAX
 #define YYLMAX 8192
@@ -954,6 +845,7 @@ static int yy_prev_more_offset = 0;
 char yytext[YYLMAX];
 char *yytext_ptr;
 #line 1 "dt_lex.l"
+#define INITIAL 0
 #line 2 "dt_lex.l"
 /*
  * CDDL HEADER START
@@ -999,6 +891,14 @@ char *yytext_ptr;
 #  undef UINT32_MAX
 #  undef UINT64_MAX
 # endif
+# ifdef _MSC_VER
+#  pragma warning(disable:4668 4131 4255)
+# endif
+# ifdef __GNUC__
+#  if ((__GNUC__ << 16) + __GNUC_MINOR__) >= 0x4002
+#   pragma GCC diagnostic ignored "-Wunused-function"
+#  endif
+# endif
 # include <iprt/ctype.h>
 # define isdigit(a_ch) RT_C_IS_DIGIT(a_ch)
 #endif /* VBOX */
@@ -1058,58 +958,13 @@ static void unput(int);
  * S3 - D control line parsing (i.e. after ^# is seen but before \n)
  * S4 - D control line scan (locate control directives only and invoke S3)
  */
-
-#line 1063 "dt_lex.c"
-
-#define INITIAL 0
 #define S0 1
 #define S1 2
 #define S2 3
 #define S3 4
 #define S4 5
 
-#ifndef YY_NO_UNISTD_H
-/* Special case for "unistd.h", since it is non-ANSI. We include it way
- * down here because we want the user's section 1 to have been scanned first.
- * The user has a chance to override it with an option.
- */
-#include <unistd.h>
-#endif
-
-#ifndef YY_EXTRA_TYPE
-#define YY_EXTRA_TYPE void *
-#endif
-
-static int yy_init_globals (void );
-
-/* Accessor methods to globals.
-   These are made visible to non-reentrant scanners for convenience. */
-
-int yylex_destroy (void );
-
-int yyget_debug (void );
-
-void yyset_debug (int debug_flag  );
-
-YY_EXTRA_TYPE yyget_extra (void );
-
-void yyset_extra (YY_EXTRA_TYPE user_defined  );
-
-FILE *yyget_in (void );
-
-void yyset_in  (FILE * in_str  );
-
-FILE *yyget_out (void );
-
-void yyset_out  (FILE * out_str  );
-
-yy_size_t yyget_leng (void );
-
-char *yyget_text (void );
-
-int yyget_lineno (void );
-
-void yyset_lineno (int line_number  );
+#line 968 "dt_lex.c"
 
 /* Macros after this point can all be overridden by user definitions in
  * section 1.
@@ -1117,30 +972,65 @@ void yyset_lineno (int line_number  );
 
 #ifndef YY_SKIP_YYWRAP
 #ifdef __cplusplus
-extern "C" int yywrap (void );
+extern "C" int yywrap YY_PROTO(( void ));
 #else
-extern int yywrap (void );
+extern int yywrap YY_PROTO(( void ));
 #endif
 #endif
 
-    static void yyunput (int c,char *buf_ptr  );
-    
+#ifndef YY_NO_UNPUT
+static void yyunput YY_PROTO(( int c, char *buf_ptr ));
+#endif
+
 #ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int );
+static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
 #endif
 
 #ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * );
+static int yy_flex_strlen YY_PROTO(( yyconst char * ));
 #endif
 
 #ifndef YY_NO_INPUT
-
 #ifdef __cplusplus
-static int yyinput (void );
+static int yyinput YY_PROTO(( void ));
+#else
+static int input YY_PROTO(( void ));
+#endif
+#endif
+
+#if YY_STACK_USED
+static int yy_start_stack_ptr = 0;
+static int yy_start_stack_depth = 0;
+static int *yy_start_stack = 0;
+#ifndef YY_NO_PUSH_STATE
+static void yy_push_state YY_PROTO(( int new_state ));
+#endif
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state YY_PROTO(( void ));
+#endif
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state YY_PROTO(( void ));
+#endif
+
 #else
-static int input (void );
+#define YY_NO_PUSH_STATE 1
+#define YY_NO_POP_STATE 1
+#define YY_NO_TOP_STATE 1
 #endif
 
+#ifdef YY_MALLOC_DECL
+YY_MALLOC_DECL
+#else
+#if __STDC__
+#ifndef __cplusplus
+#include <stdlib.h>
+#endif
+#else
+/* Just try to get by without declaring the routines.  This will fail
+ * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
+ * or sizeof(void*) != sizeof(int).
+ */
+#endif
 #endif
 
 /* Amount of stuff to slurp up with each read. */
@@ -1149,11 +1039,12 @@ static int input (void );
 #endif
 
 /* Copy whatever the last rule matched to the standard output. */
+
 #ifndef ECHO
 /* This used to be an fputs(), but since the string might contain NUL's,
  * we now use fwrite().
  */
-#define ECHO fwrite( yytext, yyleng, 1, yyout )
+#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
 #endif
 
 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
@@ -1161,10 +1052,9 @@ static int input (void );
  */
 #ifndef YY_INPUT
 #define YY_INPUT(buf,result,max_size) \
-	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
+	if ( yy_current_buffer->yy_is_interactive ) \
 		{ \
-		int c = '*'; \
-		yy_size_t n; \
+		int c = '*', n; \
 		for ( n = 0; n < max_size && \
 			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
 			buf[n] = (char) c; \
@@ -1174,22 +1064,9 @@ static int input (void );
 			YY_FATAL_ERROR( "input in flex scanner failed" ); \
 		result = n; \
 		} \
-	else \
-		{ \
-		errno=0; \
-		while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
-			{ \
-			if( errno != EINTR) \
-				{ \
-				YY_FATAL_ERROR( "input in flex scanner failed" ); \
-				break; \
-				} \
-			errno=0; \
-			clearerr(yyin); \
-			} \
-		}\
-\
-
+	else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
+		  && ferror( yyin ) ) \
+		YY_FATAL_ERROR( "input in flex scanner failed" );
 #endif
 
 /* No semi-colon after return; correct usage is to write "yyterminate();" -
@@ -1210,18 +1087,12 @@ static int input (void );
 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
 #endif
 
-/* end tables serialization structures and prototypes */
-
 /* Default declaration of generated scanner - a define so the user can
  * easily add parameters.
  */
 #ifndef YY_DECL
-#define YY_DECL_IS_OURS 1
-
-extern int yylex (void);
-
-#define YY_DECL int yylex (void)
-#endif /* !YY_DECL */
+#define YY_DECL int yylex YY_PROTO(( void ))
+#endif
 
 /* Code executed at the beginning of each rule, after yytext and yyleng
  * have been set up.
@@ -1237,19 +1108,17 @@ extern int yylex (void);
 
 #define YY_RULE_SETUP \
 	if ( yyleng > 0 ) \
-		YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
+		yy_current_buffer->yy_at_bol = \
 				(yytext[yyleng - 1] == '\n'); \
 	YY_USER_ACTION
 
-/** The main scanner function which does all the work.
- */
 YY_DECL
-{
+	{
 	register yy_state_type yy_current_state;
 	register char *yy_cp, *yy_bp;
 	register int yy_act;
-    
-#line 124 "dt_lex.l"
+
+#line 132 "dt_lex.l"
 
 
 
@@ -1269,24 +1138,18 @@ if (yypcb->pcb_token != 0) {
 
 
 
-#line 1273 "dt_lex.c"
+#line 1142 "dt_lex.c"
 
-	if ( !(yy_init) )
+	if ( yy_init )
 		{
-		(yy_init) = 1;
+		yy_init = 0;
 
 #ifdef YY_USER_INIT
 		YY_USER_INIT;
 #endif
 
-        /* Create the reject buffer large enough to save one state per allowed character. */
-        if ( ! (yy_state_buf) )
-            (yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE  );
-            if ( ! (yy_state_buf) )
-                YY_FATAL_ERROR( "out of dynamic memory in yylex()" );
-
-		if ( ! (yy_start) )
-			(yy_start) = 1;	/* first start state */
+		if ( ! yy_start )
+			yy_start = 1;	/* first start state */
 
 		if ( ! yyin )
 			yyin = stdin;
@@ -1294,33 +1157,29 @@ if (yypcb->pcb_token != 0) {
 		if ( ! yyout )
 			yyout = stdout;
 
-		if ( ! YY_CURRENT_BUFFER ) {
-			yyensure_buffer_stack ();
-			YY_CURRENT_BUFFER_LVALUE =
-				yy_create_buffer(yyin,YY_BUF_SIZE );
-		}
+		if ( ! yy_current_buffer )
+			yy_current_buffer =
+				yy_create_buffer( yyin, YY_BUF_SIZE );
 
-		yy_load_buffer_state( );
+		yy_load_buffer_state();
 		}
 
 	while ( 1 )		/* loops until end-of-file is reached */
 		{
-		yy_cp = (yy_c_buf_p);
+		yy_cp = yy_c_buf_p;
 
 		/* Support of yytext. */
-		*yy_cp = (yy_hold_char);
+		*yy_cp = yy_hold_char;
 
 		/* yy_bp points to the position in yy_ch_buf of the start of
 		 * the current run.
 		 */
 		yy_bp = yy_cp;
 
-		yy_current_state = (yy_start);
+		yy_current_state = yy_start;
 		yy_current_state += YY_AT_BOL();
-
-		(yy_state_ptr) = (yy_state_buf);
-		*(yy_state_ptr)++ = yy_current_state;
-
+		yy_state_ptr = yy_state_buf;
+		*yy_state_ptr++ = yy_current_state;
 yy_match:
 		do
 			{
@@ -1332,438 +1191,436 @@ yy_match:
 					yy_c = yy_meta[(unsigned int) yy_c];
 				}
 			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-			*(yy_state_ptr)++ = yy_current_state;
+			*yy_state_ptr++ = yy_current_state;
 			++yy_cp;
 			}
 		while ( yy_current_state != 509 );
 
 yy_find_action:
-		yy_current_state = *--(yy_state_ptr);
-		(yy_lp) = yy_accept[yy_current_state];
-goto find_rule; /* Shut up GCC warning -Wall */
+		yy_current_state = *--yy_state_ptr;
+		yy_lp = yy_accept[yy_current_state];
 find_rule: /* we branch to this label when backing up */
 		for ( ; ; ) /* until we find what rule we matched */
 			{
-			if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
+			if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
 				{
-				yy_act = yy_acclist[(yy_lp)];
+				yy_act = yy_acclist[yy_lp];
 				if ( yy_act & YY_TRAILING_HEAD_MASK ||
-				     (yy_looking_for_trail_begin) )
+				     yy_looking_for_trail_begin )
 					{
-					if ( yy_act == (yy_looking_for_trail_begin) )
+					if ( yy_act == yy_looking_for_trail_begin )
 						{
-						(yy_looking_for_trail_begin) = 0;
+						yy_looking_for_trail_begin = 0;
 						yy_act &= ~YY_TRAILING_HEAD_MASK;
 						break;
 						}
 					}
 				else if ( yy_act & YY_TRAILING_MASK )
 					{
-					(yy_looking_for_trail_begin) = yy_act & ~YY_TRAILING_MASK;
-					(yy_looking_for_trail_begin) |= YY_TRAILING_HEAD_MASK;
-					(yy_full_match) = yy_cp;
-					(yy_full_state) = (yy_state_ptr);
-					(yy_full_lp) = (yy_lp);
+					yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK;
+					yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK;
+					yy_full_match = yy_cp;
+					yy_full_state = yy_state_ptr;
+					yy_full_lp = yy_lp;
 					}
 				else
 					{
-					(yy_full_match) = yy_cp;
-					(yy_full_state) = (yy_state_ptr);
-					(yy_full_lp) = (yy_lp);
+					yy_full_match = yy_cp;
+					yy_full_state = yy_state_ptr;
+					yy_full_lp = yy_lp;
 					break;
 					}
-				++(yy_lp);
+				++yy_lp;
 				goto find_rule;
 				}
 			--yy_cp;
-			yy_current_state = *--(yy_state_ptr);
-			(yy_lp) = yy_accept[yy_current_state];
+			yy_current_state = *--yy_state_ptr;
+			yy_lp = yy_accept[yy_current_state];
 			}
 
 		YY_DO_BEFORE_ACTION;
 
-		if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
+		if ( yy_act != YY_END_OF_BUFFER )
 			{
-			yy_size_t yyl;
-			for ( yyl = (yy_prev_more_offset); yyl < yyleng; ++yyl )
+			int yyl;
+			for ( yyl = 0; yyl < yyleng; ++yyl )
 				if ( yytext[yyl] == '\n' )
-					   
-    yylineno++;
-;
+					++yylineno;
 			}
 
 do_action:	/* This label is used only to access EOF actions. */
 
+
 		switch ( yy_act )
 	{ /* beginning of action switch */
 case 1:
 YY_RULE_SETUP
-#line 143 "dt_lex.l"
+#line 151 "dt_lex.l"
 return (DT_KEY_AUTO);
 	YY_BREAK
 case 2:
 YY_RULE_SETUP
-#line 144 "dt_lex.l"
+#line 152 "dt_lex.l"
 return (DT_KEY_BREAK);
 	YY_BREAK
 case 3:
 YY_RULE_SETUP
-#line 145 "dt_lex.l"
+#line 153 "dt_lex.l"
 return (DT_KEY_CASE);
 	YY_BREAK
 case 4:
 YY_RULE_SETUP
-#line 146 "dt_lex.l"
+#line 154 "dt_lex.l"
 return (DT_KEY_CHAR);
 	YY_BREAK
 case 5:
 YY_RULE_SETUP
-#line 147 "dt_lex.l"
+#line 155 "dt_lex.l"
 return (DT_KEY_CONST);
 	YY_BREAK
 case 6:
 YY_RULE_SETUP
-#line 148 "dt_lex.l"
+#line 156 "dt_lex.l"
 return (DT_KEY_CONTINUE);
 	YY_BREAK
 case 7:
 YY_RULE_SETUP
-#line 149 "dt_lex.l"
+#line 157 "dt_lex.l"
 return (DT_KEY_COUNTER);
 	YY_BREAK
 case 8:
 YY_RULE_SETUP
-#line 150 "dt_lex.l"
+#line 158 "dt_lex.l"
 return (DT_KEY_DEFAULT);
 	YY_BREAK
 case 9:
 YY_RULE_SETUP
-#line 151 "dt_lex.l"
+#line 159 "dt_lex.l"
 return (DT_KEY_DO);
 	YY_BREAK
 case 10:
 YY_RULE_SETUP
-#line 152 "dt_lex.l"
+#line 160 "dt_lex.l"
 return (DT_KEY_DOUBLE);
 	YY_BREAK
 case 11:
 YY_RULE_SETUP
-#line 153 "dt_lex.l"
+#line 161 "dt_lex.l"
 return (DT_KEY_ELSE);
 	YY_BREAK
 case 12:
 YY_RULE_SETUP
-#line 154 "dt_lex.l"
+#line 162 "dt_lex.l"
 return (DT_KEY_ENUM);
 	YY_BREAK
 case 13:
 YY_RULE_SETUP
-#line 155 "dt_lex.l"
+#line 163 "dt_lex.l"
 return (DT_KEY_EXTERN);
 	YY_BREAK
 case 14:
 YY_RULE_SETUP
-#line 156 "dt_lex.l"
+#line 164 "dt_lex.l"
 return (DT_KEY_FLOAT);
 	YY_BREAK
 case 15:
 YY_RULE_SETUP
-#line 157 "dt_lex.l"
+#line 165 "dt_lex.l"
 return (DT_KEY_FOR);
 	YY_BREAK
 case 16:
 YY_RULE_SETUP
-#line 158 "dt_lex.l"
+#line 166 "dt_lex.l"
 return (DT_KEY_GOTO);
 	YY_BREAK
 case 17:
 YY_RULE_SETUP
-#line 159 "dt_lex.l"
+#line 167 "dt_lex.l"
 return (DT_KEY_IF);
 	YY_BREAK
 case 18:
 YY_RULE_SETUP
-#line 160 "dt_lex.l"
+#line 168 "dt_lex.l"
 return (DT_KEY_IMPORT);
 	YY_BREAK
 case 19:
 YY_RULE_SETUP
-#line 161 "dt_lex.l"
+#line 169 "dt_lex.l"
 return (DT_KEY_INLINE);
 	YY_BREAK
 case 20:
 YY_RULE_SETUP
-#line 162 "dt_lex.l"
+#line 170 "dt_lex.l"
 return (DT_KEY_INT);
 	YY_BREAK
 case 21:
 YY_RULE_SETUP
-#line 163 "dt_lex.l"
+#line 171 "dt_lex.l"
 return (DT_KEY_LONG);
 	YY_BREAK
 case 22:
 YY_RULE_SETUP
-#line 164 "dt_lex.l"
+#line 172 "dt_lex.l"
 return (DT_TOK_OFFSETOF);
 	YY_BREAK
 case 23:
 YY_RULE_SETUP
-#line 165 "dt_lex.l"
+#line 173 "dt_lex.l"
 return (DT_KEY_PROBE);
 	YY_BREAK
 case 24:
 YY_RULE_SETUP
-#line 166 "dt_lex.l"
+#line 174 "dt_lex.l"
 return (DT_KEY_PROVIDER);
 	YY_BREAK
 case 25:
 YY_RULE_SETUP
-#line 167 "dt_lex.l"
+#line 175 "dt_lex.l"
 return (DT_KEY_REGISTER);
 	YY_BREAK
 case 26:
 YY_RULE_SETUP
-#line 168 "dt_lex.l"
+#line 176 "dt_lex.l"
 return (DT_KEY_RESTRICT);
 	YY_BREAK
 case 27:
 YY_RULE_SETUP
-#line 169 "dt_lex.l"
+#line 177 "dt_lex.l"
 return (DT_KEY_RETURN);
 	YY_BREAK
 case 28:
 YY_RULE_SETUP
-#line 170 "dt_lex.l"
+#line 178 "dt_lex.l"
 return (DT_KEY_SELF);
 	YY_BREAK
 case 29:
 YY_RULE_SETUP
-#line 171 "dt_lex.l"
+#line 179 "dt_lex.l"
 return (DT_KEY_SHORT);
 	YY_BREAK
 case 30:
 YY_RULE_SETUP
-#line 172 "dt_lex.l"
+#line 180 "dt_lex.l"
 return (DT_KEY_SIGNED);
 	YY_BREAK
 case 31:
 YY_RULE_SETUP
-#line 173 "dt_lex.l"
+#line 181 "dt_lex.l"
 return (DT_TOK_SIZEOF);
 	YY_BREAK
 case 32:
 YY_RULE_SETUP
-#line 174 "dt_lex.l"
+#line 182 "dt_lex.l"
 return (DT_KEY_STATIC);
 	YY_BREAK
 case 33:
 YY_RULE_SETUP
-#line 175 "dt_lex.l"
+#line 183 "dt_lex.l"
 return (DT_KEY_STRING);
 	YY_BREAK
 case 34:
 YY_RULE_SETUP
-#line 176 "dt_lex.l"
+#line 184 "dt_lex.l"
 return (DT_TOK_STRINGOF);
 	YY_BREAK
 case 35:
 YY_RULE_SETUP
-#line 177 "dt_lex.l"
+#line 185 "dt_lex.l"
 return (DT_KEY_STRUCT);
 	YY_BREAK
 case 36:
 YY_RULE_SETUP
-#line 178 "dt_lex.l"
+#line 186 "dt_lex.l"
 return (DT_KEY_SWITCH);
 	YY_BREAK
 case 37:
 YY_RULE_SETUP
-#line 179 "dt_lex.l"
+#line 187 "dt_lex.l"
 return (DT_KEY_THIS);
 	YY_BREAK
 case 38:
 YY_RULE_SETUP
-#line 180 "dt_lex.l"
+#line 188 "dt_lex.l"
 return (DT_KEY_XLATOR);
 	YY_BREAK
 case 39:
 YY_RULE_SETUP
-#line 181 "dt_lex.l"
+#line 189 "dt_lex.l"
 return (DT_KEY_TYPEDEF);
 	YY_BREAK
 case 40:
 YY_RULE_SETUP
-#line 182 "dt_lex.l"
+#line 190 "dt_lex.l"
 return (DT_KEY_UNION);
 	YY_BREAK
 case 41:
 YY_RULE_SETUP
-#line 183 "dt_lex.l"
+#line 191 "dt_lex.l"
 return (DT_KEY_UNSIGNED);
 	YY_BREAK
 case 42:
 YY_RULE_SETUP
-#line 184 "dt_lex.l"
+#line 192 "dt_lex.l"
 return (DT_KEY_VOID);
 	YY_BREAK
 case 43:
 YY_RULE_SETUP
-#line 185 "dt_lex.l"
+#line 193 "dt_lex.l"
 return (DT_KEY_VOLATILE);
 	YY_BREAK
 case 44:
 YY_RULE_SETUP
-#line 186 "dt_lex.l"
+#line 194 "dt_lex.l"
 return (DT_KEY_WHILE);
 	YY_BREAK
 case 45:
 YY_RULE_SETUP
-#line 187 "dt_lex.l"
+#line 195 "dt_lex.l"
 return (DT_TOK_XLATE);
 	YY_BREAK
 case 46:
 YY_RULE_SETUP
-#line 189 "dt_lex.l"
+#line 197 "dt_lex.l"
 { yybegin(YYS_EXPR);	return (DT_KEY_AUTO); }
 	YY_BREAK
 case 47:
 YY_RULE_SETUP
-#line 190 "dt_lex.l"
+#line 198 "dt_lex.l"
 { yybegin(YYS_EXPR);	return (DT_KEY_CHAR); }
 	YY_BREAK
 case 48:
 YY_RULE_SETUP
-#line 191 "dt_lex.l"
+#line 199 "dt_lex.l"
 { yybegin(YYS_EXPR);	return (DT_KEY_CONST); }
 	YY_BREAK
 case 49:
 YY_RULE_SETUP
-#line 192 "dt_lex.l"
+#line 200 "dt_lex.l"
 { yybegin(YYS_DEFINE);	return (DT_KEY_COUNTER); }
 	YY_BREAK
 case 50:
 YY_RULE_SETUP
-#line 193 "dt_lex.l"
+#line 201 "dt_lex.l"
 { yybegin(YYS_EXPR);	return (DT_KEY_DOUBLE); }
 	YY_BREAK
 case 51:
 YY_RULE_SETUP
-#line 194 "dt_lex.l"
+#line 202 "dt_lex.l"
 { yybegin(YYS_EXPR);	return (DT_KEY_ENUM); }
 	YY_BREAK
 case 52:
 YY_RULE_SETUP
-#line 195 "dt_lex.l"
+#line 203 "dt_lex.l"
 { yybegin(YYS_EXPR);	return (DT_KEY_EXTERN); }
 	YY_BREAK
 case 53:
 YY_RULE_SETUP
-#line 196 "dt_lex.l"
+#line 204 "dt_lex.l"
 { yybegin(YYS_EXPR);	return (DT_KEY_FLOAT); }
 	YY_BREAK
 case 54:
 YY_RULE_SETUP
-#line 197 "dt_lex.l"
+#line 205 "dt_lex.l"
 { yybegin(YYS_EXPR);	return (DT_KEY_IMPORT); }
 	YY_BREAK
 case 55:
 YY_RULE_SETUP
-#line 198 "dt_lex.l"
+#line 206 "dt_lex.l"
 { yybegin(YYS_DEFINE);	return (DT_KEY_INLINE); }
 	YY_BREAK
 case 56:
 YY_RULE_SETUP
-#line 199 "dt_lex.l"
+#line 207 "dt_lex.l"
 { yybegin(YYS_EXPR);	return (DT_KEY_INT); }
 	YY_BREAK
 case 57:
 YY_RULE_SETUP
-#line 200 "dt_lex.l"
+#line 208 "dt_lex.l"
 { yybegin(YYS_EXPR);	return (DT_KEY_LONG); }
 	YY_BREAK
 case 58:
 YY_RULE_SETUP
-#line 201 "dt_lex.l"
+#line 209 "dt_lex.l"
 { yybegin(YYS_DEFINE);	return (DT_KEY_PROVIDER); }
 	YY_BREAK
 case 59:
 YY_RULE_SETUP
-#line 202 "dt_lex.l"
+#line 210 "dt_lex.l"
 { yybegin(YYS_EXPR);	return (DT_KEY_REGISTER); }
 	YY_BREAK
 case 60:
 YY_RULE_SETUP
-#line 203 "dt_lex.l"
+#line 211 "dt_lex.l"
 { yybegin(YYS_EXPR);	return (DT_KEY_RESTRICT); }
 	YY_BREAK
 case 61:
 YY_RULE_SETUP
-#line 204 "dt_lex.l"
+#line 212 "dt_lex.l"
 { yybegin(YYS_EXPR);	return (DT_KEY_SELF); }
 	YY_BREAK
 case 62:
 YY_RULE_SETUP
-#line 205 "dt_lex.l"
+#line 213 "dt_lex.l"
 { yybegin(YYS_EXPR);	return (DT_KEY_SHORT); }
 	YY_BREAK
 case 63:
 YY_RULE_SETUP
-#line 206 "dt_lex.l"
+#line 214 "dt_lex.l"
 { yybegin(YYS_EXPR);	return (DT_KEY_SIGNED); }
 	YY_BREAK
 case 64:
 YY_RULE_SETUP
-#line 207 "dt_lex.l"
+#line 215 "dt_lex.l"
 { yybegin(YYS_EXPR);	return (DT_KEY_STATIC); }
 	YY_BREAK
 case 65:
 YY_RULE_SETUP
-#line 208 "dt_lex.l"
+#line 216 "dt_lex.l"
 { yybegin(YYS_EXPR);	return (DT_KEY_STRING); }
 	YY_BREAK
 case 66:
 YY_RULE_SETUP
-#line 209 "dt_lex.l"
+#line 217 "dt_lex.l"
 { yybegin(YYS_EXPR);	return (DT_KEY_STRUCT); }
 	YY_BREAK
 case 67:
 YY_RULE_SETUP
-#line 210 "dt_lex.l"
+#line 218 "dt_lex.l"
 { yybegin(YYS_EXPR);	return (DT_KEY_THIS); }
 	YY_BREAK
 case 68:
 YY_RULE_SETUP
-#line 211 "dt_lex.l"
+#line 219 "dt_lex.l"
 { yybegin(YYS_DEFINE);	return (DT_KEY_XLATOR); }
 	YY_BREAK
 case 69:
 YY_RULE_SETUP
-#line 212 "dt_lex.l"
+#line 220 "dt_lex.l"
 { yybegin(YYS_EXPR);	return (DT_KEY_TYPEDEF); }
 	YY_BREAK
 case 70:
 YY_RULE_SETUP
-#line 213 "dt_lex.l"
+#line 221 "dt_lex.l"
 { yybegin(YYS_EXPR);	return (DT_KEY_UNION); }
 	YY_BREAK
 case 71:
 YY_RULE_SETUP
-#line 214 "dt_lex.l"
+#line 222 "dt_lex.l"
 { yybegin(YYS_EXPR);	return (DT_KEY_UNSIGNED); }
 	YY_BREAK
 case 72:
 YY_RULE_SETUP
-#line 215 "dt_lex.l"
+#line 223 "dt_lex.l"
 { yybegin(YYS_EXPR);	return (DT_KEY_VOID); }
 	YY_BREAK
 case 73:
 YY_RULE_SETUP
-#line 216 "dt_lex.l"
+#line 224 "dt_lex.l"
 { yybegin(YYS_EXPR);	return (DT_KEY_VOLATILE); }
 	YY_BREAK
 case 74:
 YY_RULE_SETUP
-#line 218 "dt_lex.l"
+#line 226 "dt_lex.l"
 {
 			int i = atoi(yytext + 2);
 			char *v = "";
@@ -1796,7 +1653,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 75:
 YY_RULE_SETUP
-#line 248 "dt_lex.l"
+#line 256 "dt_lex.l"
 {
 			int i = atoi(yytext + 1);
 			char *p, *v = "0";
@@ -1880,7 +1737,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 76:
 YY_RULE_SETUP
-#line 329 "dt_lex.l"
+#line 337 "dt_lex.l"
 {
 			dt_ident_t *idp = dt_idhash_lookup(
 			    yypcb->pcb_hdl->dt_macros, yytext + 2);
@@ -1905,7 +1762,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 77:
 YY_RULE_SETUP
-#line 351 "dt_lex.l"
+#line 359 "dt_lex.l"
 {
 			dt_ident_t *idp = dt_idhash_lookup(
 			    yypcb->pcb_hdl->dt_macros, yytext + 1);
@@ -1929,14 +1786,14 @@ YY_RULE_SETUP
 	YY_BREAK
 case 78:
 YY_RULE_SETUP
-#line 372 "dt_lex.l"
+#line 380 "dt_lex.l"
 {
 			return (id_or_type(yytext));
 		}
 	YY_BREAK
 case 79:
 YY_RULE_SETUP
-#line 376 "dt_lex.l"
+#line 384 "dt_lex.l"
 {
 			if ((yylval.l_str = strdup(yytext)) == NULL)
 				longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM);
@@ -1945,7 +1802,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 80:
 YY_RULE_SETUP
-#line 382 "dt_lex.l"
+#line 390 "dt_lex.l"
 {
 			if ((yylval.l_str = strdup("@_")) == NULL)
 				longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM);
@@ -1953,12 +1810,12 @@ YY_RULE_SETUP
 		}
 	YY_BREAK
 case 81:
-#line 389 "dt_lex.l"
+#line 397 "dt_lex.l"
 case 82:
-#line 390 "dt_lex.l"
+#line 398 "dt_lex.l"
 case 83:
 YY_RULE_SETUP
-#line 390 "dt_lex.l"
+#line 398 "dt_lex.l"
 {
 			char *p;
 
@@ -1994,7 +1851,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 84:
 YY_RULE_SETUP
-#line 423 "dt_lex.l"
+#line 431 "dt_lex.l"
 yyerror("floating-point constants are not permitted\n");
 	YY_BREAK
 /* VBOX changed:
@@ -2003,14 +1860,14 @@ yyerror("floating-point constants are not permitted\n");
  input: */
 case 85:
 YY_RULE_SETUP
-#line 429 "dt_lex.l"
+#line 437 "dt_lex.l"
 xyerror(D_STR_NL, "newline encountered in string literal");
 	YY_BREAK
 case 86:
-#line 432 "dt_lex.l"
+#line 440 "dt_lex.l"
 case 87:
 YY_RULE_SETUP
-#line 432 "dt_lex.l"
+#line 440 "dt_lex.l"
 {
 			/*
 			 * Quoted string -- convert C escape sequences and
@@ -2031,12 +1888,12 @@ YY_RULE_SETUP
 	YY_BREAK
 case 88:
 YY_RULE_SETUP
-#line 450 "dt_lex.l"
+#line 458 "dt_lex.l"
 xyerror(D_CHR_NL, "newline encountered in character constant");
 	YY_BREAK
 case 89:
 YY_RULE_SETUP
-#line 452 "dt_lex.l"
+#line 460 "dt_lex.l"
 {
 			char *s, *p, *q;
 			size_t nbytes;
@@ -2072,29 +1929,29 @@ YY_RULE_SETUP
 		}
 	YY_BREAK
 case 90:
-#line 487 "dt_lex.l"
+#line 495 "dt_lex.l"
 case 91:
 YY_RULE_SETUP
-#line 487 "dt_lex.l"
+#line 495 "dt_lex.l"
 {
 			yypcb->pcb_cstate = (YYSTATE);
 			BEGIN(S1);
 		}
 	YY_BREAK
 case 92:
-#line 493 "dt_lex.l"
+#line 501 "dt_lex.l"
 case 93:
 YY_RULE_SETUP
-#line 493 "dt_lex.l"
+#line 501 "dt_lex.l"
 ;	/* discard any #! lines */
 	YY_BREAK
 case 94:
-#line 496 "dt_lex.l"
+#line 504 "dt_lex.l"
 case 95:
-#line 497 "dt_lex.l"
+#line 505 "dt_lex.l"
 case 96:
 YY_RULE_SETUP
-#line 497 "dt_lex.l"
+#line 505 "dt_lex.l"
 {
 			assert(yypragma == NULL);
 			yypcb->pcb_cstate = (YYSTATE);
@@ -2103,18 +1960,17 @@ YY_RULE_SETUP
 	YY_BREAK
 case 97:
 YY_RULE_SETUP
-#line 503 "dt_lex.l"
+#line 511 "dt_lex.l"
 ;	/* discard */
 	YY_BREAK
 case 98:
-/* rule 98 can match eol */
 YY_RULE_SETUP
-#line 504 "dt_lex.l"
+#line 512 "dt_lex.l"
 ;	/* discard */
 	YY_BREAK
 case 99:
 YY_RULE_SETUP
-#line 506 "dt_lex.l"
+#line 514 "dt_lex.l"
 {
 			int c, tok;
 
@@ -2151,7 +2007,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 100:
 YY_RULE_SETUP
-#line 540 "dt_lex.l"
+#line 548 "dt_lex.l"
 {
 			yypcb->pcb_parens++;
 			return (DT_TOK_LPAR);
@@ -2159,7 +2015,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 101:
 YY_RULE_SETUP
-#line 545 "dt_lex.l"
+#line 553 "dt_lex.l"
 {
 			if (--yypcb->pcb_parens < 0)
 				yyerror("extra ) in input stream\n");
@@ -2168,7 +2024,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 102:
 YY_RULE_SETUP
-#line 551 "dt_lex.l"
+#line 559 "dt_lex.l"
 {
 			yypcb->pcb_brackets++;
 			return (DT_TOK_LBRAC);
@@ -2176,7 +2032,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 103:
 YY_RULE_SETUP
-#line 556 "dt_lex.l"
+#line 564 "dt_lex.l"
 {
 			if (--yypcb->pcb_brackets < 0)
 				yyerror("extra ] in input stream\n");
@@ -2184,10 +2040,10 @@ YY_RULE_SETUP
 		}
 	YY_BREAK
 case 104:
-#line 563 "dt_lex.l"
+#line 571 "dt_lex.l"
 case 105:
 YY_RULE_SETUP
-#line 563 "dt_lex.l"
+#line 571 "dt_lex.l"
 {
 			yypcb->pcb_braces++;
 			return ('{');
@@ -2195,7 +2051,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 106:
 YY_RULE_SETUP
-#line 568 "dt_lex.l"
+#line 576 "dt_lex.l"
 {
 			if (--yypcb->pcb_braces < 0)
 				yyerror("extra } in input stream\n");
@@ -2204,246 +2060,243 @@ YY_RULE_SETUP
 	YY_BREAK
 case 107:
 YY_RULE_SETUP
-#line 574 "dt_lex.l"
+#line 582 "dt_lex.l"
 return (DT_TOK_BOR);
 	YY_BREAK
 case 108:
 YY_RULE_SETUP
-#line 575 "dt_lex.l"
+#line 583 "dt_lex.l"
 return (DT_TOK_XOR);
 	YY_BREAK
 case 109:
 YY_RULE_SETUP
-#line 576 "dt_lex.l"
+#line 584 "dt_lex.l"
 return (DT_TOK_BAND);
 	YY_BREAK
 case 110:
 YY_RULE_SETUP
-#line 577 "dt_lex.l"
+#line 585 "dt_lex.l"
 return (DT_TOK_LAND);
 	YY_BREAK
 case 111:
 YY_RULE_SETUP
-#line 578 "dt_lex.l"
+#line 586 "dt_lex.l"
 return (DT_TOK_LXOR);
 	YY_BREAK
 case 112:
 YY_RULE_SETUP
-#line 579 "dt_lex.l"
+#line 587 "dt_lex.l"
 return (DT_TOK_LOR);
 	YY_BREAK
 case 113:
 YY_RULE_SETUP
-#line 580 "dt_lex.l"
+#line 588 "dt_lex.l"
 return (DT_TOK_EQU);
 	YY_BREAK
 case 114:
 YY_RULE_SETUP
-#line 581 "dt_lex.l"
+#line 589 "dt_lex.l"
 return (DT_TOK_NEQ);
 	YY_BREAK
 case 115:
 YY_RULE_SETUP
-#line 582 "dt_lex.l"
+#line 590 "dt_lex.l"
 return (DT_TOK_LT);
 	YY_BREAK
 case 116:
 YY_RULE_SETUP
-#line 583 "dt_lex.l"
+#line 591 "dt_lex.l"
 return (DT_TOK_LE);
 	YY_BREAK
 case 117:
 YY_RULE_SETUP
-#line 584 "dt_lex.l"
+#line 592 "dt_lex.l"
 return (DT_TOK_GT);
 	YY_BREAK
 case 118:
 YY_RULE_SETUP
-#line 585 "dt_lex.l"
+#line 593 "dt_lex.l"
 return (DT_TOK_GE);
 	YY_BREAK
 case 119:
 YY_RULE_SETUP
-#line 586 "dt_lex.l"
+#line 594 "dt_lex.l"
 return (DT_TOK_LSH);
 	YY_BREAK
 case 120:
 YY_RULE_SETUP
-#line 587 "dt_lex.l"
+#line 595 "dt_lex.l"
 return (DT_TOK_RSH);
 	YY_BREAK
 case 121:
 YY_RULE_SETUP
-#line 588 "dt_lex.l"
+#line 596 "dt_lex.l"
 return (DT_TOK_ADD);
 	YY_BREAK
 case 122:
 YY_RULE_SETUP
-#line 589 "dt_lex.l"
+#line 597 "dt_lex.l"
 return (DT_TOK_SUB);
 	YY_BREAK
 case 123:
 YY_RULE_SETUP
-#line 590 "dt_lex.l"
+#line 598 "dt_lex.l"
 return (DT_TOK_MUL);
 	YY_BREAK
 case 124:
 YY_RULE_SETUP
-#line 591 "dt_lex.l"
+#line 599 "dt_lex.l"
 return (DT_TOK_MOD);
 	YY_BREAK
 case 125:
 YY_RULE_SETUP
-#line 592 "dt_lex.l"
+#line 600 "dt_lex.l"
 return (DT_TOK_BNEG);
 	YY_BREAK
 case 126:
 YY_RULE_SETUP
-#line 593 "dt_lex.l"
+#line 601 "dt_lex.l"
 return (DT_TOK_LNEG);
 	YY_BREAK
 case 127:
 YY_RULE_SETUP
-#line 594 "dt_lex.l"
+#line 602 "dt_lex.l"
 return (DT_TOK_QUESTION);
 	YY_BREAK
 case 128:
 YY_RULE_SETUP
-#line 595 "dt_lex.l"
+#line 603 "dt_lex.l"
 return (DT_TOK_COLON);
 	YY_BREAK
 case 129:
 YY_RULE_SETUP
-#line 596 "dt_lex.l"
+#line 604 "dt_lex.l"
 return (DT_TOK_DOT);
 	YY_BREAK
 case 130:
 YY_RULE_SETUP
-#line 597 "dt_lex.l"
+#line 605 "dt_lex.l"
 return (DT_TOK_PTR);
 	YY_BREAK
 case 131:
 YY_RULE_SETUP
-#line 598 "dt_lex.l"
+#line 606 "dt_lex.l"
 return (DT_TOK_ASGN);
 	YY_BREAK
 case 132:
 YY_RULE_SETUP
-#line 599 "dt_lex.l"
+#line 607 "dt_lex.l"
 return (DT_TOK_ADD_EQ);
 	YY_BREAK
 case 133:
 YY_RULE_SETUP
-#line 600 "dt_lex.l"
+#line 608 "dt_lex.l"
 return (DT_TOK_SUB_EQ);
 	YY_BREAK
 case 134:
 YY_RULE_SETUP
-#line 601 "dt_lex.l"
+#line 609 "dt_lex.l"
 return (DT_TOK_MUL_EQ);
 	YY_BREAK
 case 135:
 YY_RULE_SETUP
-#line 602 "dt_lex.l"
+#line 610 "dt_lex.l"
 return (DT_TOK_DIV_EQ);
 	YY_BREAK
 case 136:
 YY_RULE_SETUP
-#line 603 "dt_lex.l"
+#line 611 "dt_lex.l"
 return (DT_TOK_MOD_EQ);
 	YY_BREAK
 case 137:
 YY_RULE_SETUP
-#line 604 "dt_lex.l"
+#line 612 "dt_lex.l"
 return (DT_TOK_AND_EQ);
 	YY_BREAK
 case 138:
 YY_RULE_SETUP
-#line 605 "dt_lex.l"
+#line 613 "dt_lex.l"
 return (DT_TOK_XOR_EQ);
 	YY_BREAK
 case 139:
 YY_RULE_SETUP
-#line 606 "dt_lex.l"
+#line 614 "dt_lex.l"
 return (DT_TOK_OR_EQ);
 	YY_BREAK
 case 140:
 YY_RULE_SETUP
-#line 607 "dt_lex.l"
+#line 615 "dt_lex.l"
 return (DT_TOK_LSH_EQ);
 	YY_BREAK
 case 141:
 YY_RULE_SETUP
-#line 608 "dt_lex.l"
+#line 616 "dt_lex.l"
 return (DT_TOK_RSH_EQ);
 	YY_BREAK
 case 142:
 YY_RULE_SETUP
-#line 609 "dt_lex.l"
+#line 617 "dt_lex.l"
 return (DT_TOK_ADDADD);
 	YY_BREAK
 case 143:
 YY_RULE_SETUP
-#line 610 "dt_lex.l"
+#line 618 "dt_lex.l"
 return (DT_TOK_SUBSUB);
 	YY_BREAK
 case 144:
 YY_RULE_SETUP
-#line 611 "dt_lex.l"
+#line 619 "dt_lex.l"
 return (DT_TOK_ELLIPSIS);
 	YY_BREAK
 case 145:
 YY_RULE_SETUP
-#line 612 "dt_lex.l"
+#line 620 "dt_lex.l"
 return (DT_TOK_COMMA);
 	YY_BREAK
 case 146:
 YY_RULE_SETUP
-#line 613 "dt_lex.l"
+#line 621 "dt_lex.l"
 return (';');
 	YY_BREAK
 case 147:
-/* rule 147 can match eol */
 YY_RULE_SETUP
-#line 614 "dt_lex.l"
+#line 622 "dt_lex.l"
 ; /* discard */
 	YY_BREAK
 case 148:
-/* rule 148 can match eol */
 YY_RULE_SETUP
-#line 615 "dt_lex.l"
+#line 623 "dt_lex.l"
 ; /* discard */
 	YY_BREAK
 case 149:
 YY_RULE_SETUP
-#line 616 "dt_lex.l"
+#line 624 "dt_lex.l"
 yyerror("syntax error near \"%c\"\n", yytext[0]);
 	YY_BREAK
 case 150:
 YY_RULE_SETUP
-#line 618 "dt_lex.l"
+#line 626 "dt_lex.l"
 yyerror("/* encountered inside a comment\n");
 	YY_BREAK
 case 151:
 YY_RULE_SETUP
-#line 619 "dt_lex.l"
+#line 627 "dt_lex.l"
 BEGIN(yypcb->pcb_cstate);
 	YY_BREAK
 /* VBOX - START */
 case YY_STATE_EOF(S1):
-#line 621 "dt_lex.l"
+#line 629 "dt_lex.l"
 yyerror("end-of-file encountered before matching */\n");
 	YY_BREAK
 /* VBOX - END */
 case 152:
-/* rule 152 can match eol */
 YY_RULE_SETUP
-#line 623 "dt_lex.l"
+#line 631 "dt_lex.l"
 ; /* discard */
 	YY_BREAK
 case 153:
 YY_RULE_SETUP
-#line 625 "dt_lex.l"
+#line 633 "dt_lex.l"
 {
 			/*
 			 * S2 has an ambiguity because RGX_PSPEC includes '*'
@@ -2499,29 +2352,27 @@ YY_RULE_SETUP
 	YY_BREAK
 case 154:
 YY_RULE_SETUP
-#line 678 "dt_lex.l"
+#line 686 "dt_lex.l"
 return (DT_TOK_DIV);
 	YY_BREAK
 case 155:
 YY_RULE_SETUP
-#line 679 "dt_lex.l"
+#line 687 "dt_lex.l"
 return (DT_TOK_COMMA);
 	YY_BREAK
 case 156:
-/* rule 156 can match eol */
 YY_RULE_SETUP
-#line 681 "dt_lex.l"
+#line 689 "dt_lex.l"
 ; /* discard */
 	YY_BREAK
 case 157:
 YY_RULE_SETUP
-#line 682 "dt_lex.l"
+#line 690 "dt_lex.l"
 yyerror("syntax error near \"%c\"\n", yytext[0]);
 	YY_BREAK
 case 158:
-/* rule 158 can match eol */
 YY_RULE_SETUP
-#line 684 "dt_lex.l"
+#line 692 "dt_lex.l"
 {
 			dt_pragma(yypragma);
 			yypragma = NULL;
@@ -2530,12 +2381,12 @@ YY_RULE_SETUP
 	YY_BREAK
 case 159:
 YY_RULE_SETUP
-#line 690 "dt_lex.l"
+#line 698 "dt_lex.l"
 ; /* discard */
 	YY_BREAK
 case 160:
 YY_RULE_SETUP
-#line 692 "dt_lex.l"
+#line 700 "dt_lex.l"
 {
 			dt_node_t *dnp;
 
@@ -2557,21 +2408,21 @@ YY_RULE_SETUP
 	YY_BREAK
 /* VBOX - BEGIN */
 case YY_STATE_EOF(S3):
-#line 712 "dt_lex.l"
+#line 720 "dt_lex.l"
 yyerror("end-of-file encountered before end of control line\n");
 	YY_BREAK
 /* VBOX - END */
 case 161:
 YY_RULE_SETUP
-#line 714 "dt_lex.l"
+#line 722 "dt_lex.l"
 yyerror("syntax error near \"%c\"\n", yytext[0]);
 	YY_BREAK
 case 162:
 YY_RULE_SETUP
-#line 716 "dt_lex.l"
+#line 724 "dt_lex.l"
 ECHO;
 	YY_BREAK
-#line 2575 "dt_lex.c"
+#line 2426 "dt_lex.c"
 			case YY_STATE_EOF(INITIAL):
 			case YY_STATE_EOF(S0):
 			case YY_STATE_EOF(S2):
@@ -2581,26 +2432,26 @@ ECHO;
 	case YY_END_OF_BUFFER:
 		{
 		/* Amount of text matched not including the EOB char. */
-		int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
+		int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
 
 		/* Undo the effects of YY_DO_BEFORE_ACTION. */
-		*yy_cp = (yy_hold_char);
+		*yy_cp = yy_hold_char;
 		YY_RESTORE_YY_MORE_OFFSET
 
-		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
+		if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
 			{
 			/* We're scanning a new file or input source.  It's
 			 * possible that this happened because the user
 			 * just pointed yyin at a new source and called
 			 * yylex().  If so, then we have to assure
-			 * consistency between YY_CURRENT_BUFFER and our
+			 * consistency between yy_current_buffer and our
 			 * globals.  Here is the right place to do so, because
 			 * this is the first action (other than possibly a
 			 * back-up) that will match for the new input source.
 			 */
-			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
-			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
-			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
+			yy_n_chars = yy_current_buffer->yy_n_chars;
+			yy_current_buffer->yy_input_file = yyin;
+			yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
 			}
 
 		/* Note that here we test for yy_c_buf_p "<=" to the position
@@ -2610,13 +2461,13 @@ ECHO;
 		 * end-of-buffer state).  Contrast this with the test
 		 * in input().
 		 */
-		if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+		if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
 			{ /* This was really a NUL. */
 			yy_state_type yy_next_state;
 
-			(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
+			yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
 
-			yy_current_state = yy_get_previous_state(  );
+			yy_current_state = yy_get_previous_state();
 
 			/* Okay, we're now positioned to make the NUL
 			 * transition.  We couldn't have
@@ -2629,30 +2480,30 @@ ECHO;
 
 			yy_next_state = yy_try_NUL_trans( yy_current_state );
 
-			yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+			yy_bp = yytext_ptr + YY_MORE_ADJ;
 
 			if ( yy_next_state )
 				{
 				/* Consume the NUL. */
-				yy_cp = ++(yy_c_buf_p);
+				yy_cp = ++yy_c_buf_p;
 				yy_current_state = yy_next_state;
 				goto yy_match;
 				}
 
 			else
 				{
-				yy_cp = (yy_c_buf_p);
+				yy_cp = yy_c_buf_p;
 				goto yy_find_action;
 				}
 			}
 
-		else switch ( yy_get_next_buffer(  ) )
+		else switch ( yy_get_next_buffer() )
 			{
 			case EOB_ACT_END_OF_FILE:
 				{
-				(yy_did_buffer_switch_on_eof) = 0;
+				yy_did_buffer_switch_on_eof = 0;
 
-				if ( yywrap( ) )
+				if ( yywrap() )
 					{
 					/* Note: because we've taken care in
 					 * yy_get_next_buffer() to have set up
@@ -2663,7 +2514,7 @@ ECHO;
 					 * YY_NULL, it'll still work - another
 					 * YY_NULL will get returned.
 					 */
-					(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
+					yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
 
 					yy_act = YY_STATE_EOF(YY_START);
 					goto do_action;
@@ -2671,30 +2522,30 @@ ECHO;
 
 				else
 					{
-					if ( ! (yy_did_buffer_switch_on_eof) )
+					if ( ! yy_did_buffer_switch_on_eof )
 						YY_NEW_FILE;
 					}
 				break;
 				}
 
 			case EOB_ACT_CONTINUE_SCAN:
-				(yy_c_buf_p) =
-					(yytext_ptr) + yy_amount_of_matched_text;
+				yy_c_buf_p =
+					yytext_ptr + yy_amount_of_matched_text;
 
-				yy_current_state = yy_get_previous_state(  );
+				yy_current_state = yy_get_previous_state();
 
-				yy_cp = (yy_c_buf_p);
-				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+				yy_cp = yy_c_buf_p;
+				yy_bp = yytext_ptr + YY_MORE_ADJ;
 				goto yy_match;
 
 			case EOB_ACT_LAST_MATCH:
-				(yy_c_buf_p) =
-				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
+				yy_c_buf_p =
+				&yy_current_buffer->yy_ch_buf[yy_n_chars];
 
-				yy_current_state = yy_get_previous_state(  );
+				yy_current_state = yy_get_previous_state();
 
-				yy_cp = (yy_c_buf_p);
-				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+				yy_cp = yy_c_buf_p;
+				yy_bp = yytext_ptr + YY_MORE_ADJ;
 				goto yy_find_action;
 			}
 		break;
@@ -2705,7 +2556,8 @@ ECHO;
 			"fatal flex scanner internal error--no action found" );
 	} /* end of action switch */
 		} /* end of scanning one token */
-} /* end of yylex */
+	} /* end of yylex */
+
 
 /* yy_get_next_buffer - try to read in a new buffer
  *
@@ -2714,20 +2566,21 @@ ECHO;
  *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
  *	EOB_ACT_END_OF_FILE - end of file
  */
-static int yy_get_next_buffer (void)
-{
-    	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
-	register char *source = (yytext_ptr);
+
+static int yy_get_next_buffer()
+	{
+	register char *dest = yy_current_buffer->yy_ch_buf;
+	register char *source = yytext_ptr;
 	register int number_to_move, i;
 	int ret_val;
 
-	if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
+	if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
 		YY_FATAL_ERROR(
 		"fatal flex scanner internal error--end of buffer missed" );
 
-	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
+	if ( yy_current_buffer->yy_fill_buffer == 0 )
 		{ /* Don't try to fill the buffer, so this is an EOF. */
-		if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
+		if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
 			{
 			/* We matched a single character, the EOB, so
 			 * treat this as a final EOF.
@@ -2747,52 +2600,86 @@ static int yy_get_next_buffer (void)
 	/* Try to read more data. */
 
 	/* First move last chars to start of buffer. */
-	number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
+	number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
 
 	for ( i = 0; i < number_to_move; ++i )
 		*(dest++) = *(source++);
 
-	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+	if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
 		/* don't do the read, it's not guaranteed to return an EOF,
 		 * just force an EOF
 		 */
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
+		yy_current_buffer->yy_n_chars = yy_n_chars = 0;
 
 	else
 		{
-			yy_size_t num_to_read =
-			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+		int num_to_read =
+			yy_current_buffer->yy_buf_size - number_to_move - 1;
 
 		while ( num_to_read <= 0 )
 			{ /* Not enough room in the buffer - grow it. */
-
+#ifdef YY_USES_REJECT
 			YY_FATAL_ERROR(
 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+#else
+
+			/* just a shorter name for the current buffer */
+			YY_BUFFER_STATE b = yy_current_buffer;
+
+			int yy_c_buf_p_offset =
+				(int) (yy_c_buf_p - b->yy_ch_buf);
+
+			if ( b->yy_is_our_buffer )
+				{
+				int new_size = b->yy_buf_size * 2;
+
+				if ( new_size <= 0 )
+					b->yy_buf_size += b->yy_buf_size / 8;
+				else
+					b->yy_buf_size *= 2;
+
+				b->yy_ch_buf = (char *)
+					/* Include room in for 2 EOB chars. */
+					yy_flex_realloc( (void *) b->yy_ch_buf,
+							 b->yy_buf_size + 2 );
+				}
+			else
+				/* Can't grow it, we don't own it. */
+				b->yy_ch_buf = 0;
+
+			if ( ! b->yy_ch_buf )
+				YY_FATAL_ERROR(
+				"fatal error - scanner input buffer overflow" );
 
+			yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+			num_to_read = yy_current_buffer->yy_buf_size -
+						number_to_move - 1;
+#endif
 			}
 
 		if ( num_to_read > YY_READ_BUF_SIZE )
 			num_to_read = YY_READ_BUF_SIZE;
 
 		/* Read in more data. */
-		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
-			(yy_n_chars), num_to_read );
+		YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
+			yy_n_chars, num_to_read );
 
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+		yy_current_buffer->yy_n_chars = yy_n_chars;
 		}
 
-	if ( (yy_n_chars) == 0 )
+	if ( yy_n_chars == 0 )
 		{
 		if ( number_to_move == YY_MORE_ADJ )
 			{
 			ret_val = EOB_ACT_END_OF_FILE;
-			yyrestart(yyin  );
+			yyrestart( yyin );
 			}
 
 		else
 			{
 			ret_val = EOB_ACT_LAST_MATCH;
-			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
+			yy_current_buffer->yy_buffer_status =
 				YY_BUFFER_EOF_PENDING;
 			}
 		}
@@ -2800,37 +2687,29 @@ static int yy_get_next_buffer (void)
 	else
 		ret_val = EOB_ACT_CONTINUE_SCAN;
 
-	if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
-		/* Extend the array by 50%, plus the number we really need. */
-		yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
-		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
-		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
-			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
-	}
-
-	(yy_n_chars) += number_to_move;
-	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
-	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
+	yy_n_chars += number_to_move;
+	yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
+	yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
 
-	(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
+	yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
 
 	return ret_val;
-}
+	}
+
 
 /* yy_get_previous_state - get the state just before the EOB char was reached */
 
-    static yy_state_type yy_get_previous_state (void)
-{
+static yy_state_type yy_get_previous_state()
+	{
 	register yy_state_type yy_current_state;
 	register char *yy_cp;
-    
-	yy_current_state = (yy_start);
-	yy_current_state += YY_AT_BOL();
 
-	(yy_state_ptr) = (yy_state_buf);
-	*(yy_state_ptr)++ = yy_current_state;
+	yy_current_state = yy_start;
+	yy_current_state += YY_AT_BOL();
+	yy_state_ptr = yy_state_buf;
+	*yy_state_ptr++ = yy_current_state;
 
-	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
+	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
 		{
 		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
 		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
@@ -2840,21 +2719,28 @@ static int yy_get_next_buffer (void)
 				yy_c = yy_meta[(unsigned int) yy_c];
 			}
 		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-		*(yy_state_ptr)++ = yy_current_state;
+		*yy_state_ptr++ = yy_current_state;
 		}
 
 	return yy_current_state;
-}
+	}
+
 
 /* yy_try_NUL_trans - try to make a transition on the NUL character
  *
  * synopsis
  *	next_state = yy_try_NUL_trans( current_state );
  */
-    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
-{
+
+#ifdef YY_USE_PROTOS
+static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
+#else
+static yy_state_type yy_try_NUL_trans( yy_current_state )
+yy_state_type yy_current_state;
+#endif
+	{
 	register int yy_is_jam;
-    
+
 	register YY_CHAR yy_c = 1;
 	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 		{
@@ -2865,80 +2751,85 @@ static int yy_get_next_buffer (void)
 	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
 	yy_is_jam = (yy_current_state == 509);
 	if ( ! yy_is_jam )
-		*(yy_state_ptr)++ = yy_current_state;
+		*yy_state_ptr++ = yy_current_state;
 
 	return yy_is_jam ? 0 : yy_current_state;
-}
+	}
 
-    static void yyunput (int c, register char * yy_bp )
-{
-	register char *yy_cp;
-    
-    yy_cp = (yy_c_buf_p);
+
+#ifndef YY_NO_UNPUT
+#ifdef YY_USE_PROTOS
+static void yyunput( int c, register char *yy_bp )
+#else
+static void yyunput( c, yy_bp )
+int c;
+register char *yy_bp;
+#endif
+	{
+	register char *yy_cp = yy_c_buf_p;
 
 	/* undo effects of setting up yytext */
-	*yy_cp = (yy_hold_char);
+	*yy_cp = yy_hold_char;
 
-	if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+	if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
 		{ /* need to shift things up to make room */
 		/* +2 for EOB chars. */
-		register yy_size_t number_to_move = (yy_n_chars) + 2;
-		register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
-					YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
+		register int number_to_move = yy_n_chars + 2;
+		register char *dest = &yy_current_buffer->yy_ch_buf[
+					yy_current_buffer->yy_buf_size + 2];
 		register char *source =
-				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
+				&yy_current_buffer->yy_ch_buf[number_to_move];
 
-		while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+		while ( source > yy_current_buffer->yy_ch_buf )
 			*--dest = *--source;
 
 		yy_cp += (int) (dest - source);
 		yy_bp += (int) (dest - source);
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
-			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
+		yy_current_buffer->yy_n_chars =
+			yy_n_chars = yy_current_buffer->yy_buf_size;
 
-		if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+		if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
 			YY_FATAL_ERROR( "flex scanner push-back overflow" );
 		}
 
 	*--yy_cp = (char) c;
 
-    if ( c == '\n' ){
-        --yylineno;
-    }
+	if ( c == '\n' )
+		--yylineno;
+
+	yytext_ptr = yy_bp;
+	yy_hold_char = *yy_cp;
+	yy_c_buf_p = yy_cp;
+	}
+#endif	/* ifndef YY_NO_UNPUT */
 
-	(yytext_ptr) = yy_bp;
-	(yy_hold_char) = *yy_cp;
-	(yy_c_buf_p) = yy_cp;
-}
 
-#ifndef YY_NO_INPUT
 #ifdef __cplusplus
-    static int yyinput (void)
+static int yyinput()
 #else
-    static int input  (void)
+static int input()
 #endif
-
-{
+	{
 	int c;
-    
-	*(yy_c_buf_p) = (yy_hold_char);
 
-	if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
+	*yy_c_buf_p = yy_hold_char;
+
+	if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
 		{
 		/* yy_c_buf_p now points to the character we want to return.
 		 * If this occurs *before* the EOB characters, then it's a
 		 * valid NUL; if not, then we've hit the end of the buffer.
 		 */
-		if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+		if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
 			/* This was really a NUL. */
-			*(yy_c_buf_p) = '\0';
+			*yy_c_buf_p = '\0';
 
 		else
 			{ /* need more input */
-			yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
-			++(yy_c_buf_p);
+			int offset = yy_c_buf_p - yytext_ptr;
+			++yy_c_buf_p;
 
-			switch ( yy_get_next_buffer(  ) )
+			switch ( yy_get_next_buffer() )
 				{
 				case EOB_ACT_LAST_MATCH:
 					/* This happens because yy_g_n_b()
@@ -2952,16 +2843,16 @@ static int yy_get_next_buffer (void)
 					 */
 
 					/* Reset buffer status. */
-					yyrestart(yyin );
+					yyrestart( yyin );
 
-					/*FALLTHROUGH*/
+					/* fall through */
 
 				case EOB_ACT_END_OF_FILE:
 					{
-					if ( yywrap( ) )
-						return 0;
+					if ( yywrap() )
+						return EOF;
 
-					if ( ! (yy_did_buffer_switch_on_eof) )
+					if ( ! yy_did_buffer_switch_on_eof )
 						YY_NEW_FILE;
 #ifdef __cplusplus
 					return yyinput();
@@ -2971,98 +2862,93 @@ static int yy_get_next_buffer (void)
 					}
 
 				case EOB_ACT_CONTINUE_SCAN:
-					(yy_c_buf_p) = (yytext_ptr) + offset;
+					yy_c_buf_p = yytext_ptr + offset;
 					break;
 				}
 			}
 		}
 
-	c = *(unsigned char *) (yy_c_buf_p);	/* cast for 8-bit char's */
-	*(yy_c_buf_p) = '\0';	/* preserve yytext */
-	(yy_hold_char) = *++(yy_c_buf_p);
+	c = *(unsigned char *) yy_c_buf_p;	/* cast for 8-bit char's */
+	*yy_c_buf_p = '\0';	/* preserve yytext */
+	yy_hold_char = *++yy_c_buf_p;
 
-	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
-	if ( YY_CURRENT_BUFFER_LVALUE->yy_at_bol )
-		   
-    yylineno++;
-;
+	yy_current_buffer->yy_at_bol = (c == '\n');
+	if ( yy_current_buffer->yy_at_bol )
+		++yylineno;
 
 	return c;
-}
-#endif	/* ifndef YY_NO_INPUT */
+	}
 
-/** Immediately switch to a different input stream.
- * @param input_file A readable stream.
- * 
- * @note This function does not reset the start condition to @c INITIAL .
- */
-    void yyrestart  (FILE * input_file )
-{
-    
-	if ( ! YY_CURRENT_BUFFER ){
-        yyensure_buffer_stack ();
-		YY_CURRENT_BUFFER_LVALUE =
-            yy_create_buffer(yyin,YY_BUF_SIZE );
+
+#ifdef YY_USE_PROTOS
+void yyrestart( FILE *input_file )
+#else
+void yyrestart( input_file )
+FILE *input_file;
+#endif
+	{
+	if ( ! yy_current_buffer )
+		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
+
+	yy_init_buffer( yy_current_buffer, input_file );
+	yy_load_buffer_state();
 	}
 
-	yy_init_buffer(YY_CURRENT_BUFFER,input_file );
-	yy_load_buffer_state( );
-}
 
-/** Switch to a different input buffer.
- * @param new_buffer The new input buffer.
- * 
- */
-    void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
-{
-    
-	/* TODO. We should be able to replace this entire function body
-	 * with
-	 *		yypop_buffer_state();
-	 *		yypush_buffer_state(new_buffer);
-     */
-	yyensure_buffer_stack ();
-	if ( YY_CURRENT_BUFFER == new_buffer )
+#ifdef YY_USE_PROTOS
+void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
+#else
+void yy_switch_to_buffer( new_buffer )
+YY_BUFFER_STATE new_buffer;
+#endif
+	{
+	if ( yy_current_buffer == new_buffer )
 		return;
 
-	if ( YY_CURRENT_BUFFER )
+	if ( yy_current_buffer )
 		{
 		/* Flush out information for old buffer. */
-		*(yy_c_buf_p) = (yy_hold_char);
-		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+		*yy_c_buf_p = yy_hold_char;
+		yy_current_buffer->yy_buf_pos = yy_c_buf_p;
+		yy_current_buffer->yy_n_chars = yy_n_chars;
 		}
 
-	YY_CURRENT_BUFFER_LVALUE = new_buffer;
-	yy_load_buffer_state( );
+	yy_current_buffer = new_buffer;
+	yy_load_buffer_state();
 
 	/* We don't actually know whether we did this switch during
 	 * EOF (yywrap()) processing, but the only time this flag
 	 * is looked at is after yywrap() is called, so it's safe
 	 * to go ahead and always set it.
 	 */
-	(yy_did_buffer_switch_on_eof) = 1;
-}
+	yy_did_buffer_switch_on_eof = 1;
+	}
 
-static void yy_load_buffer_state  (void)
-{
-    	(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
-	(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
-	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
-	(yy_hold_char) = *(yy_c_buf_p);
-}
 
-/** Allocate and initialize an input buffer state.
- * @param file A readable stream.
- * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
- * 
- * @return the allocated buffer state.
- */
-    YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
-{
+#ifdef YY_USE_PROTOS
+void yy_load_buffer_state( void )
+#else
+void yy_load_buffer_state()
+#endif
+	{
+	yy_n_chars = yy_current_buffer->yy_n_chars;
+	yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
+	yyin = yy_current_buffer->yy_input_file;
+	yy_hold_char = *yy_c_buf_p;
+	}
+
+
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
+#else
+YY_BUFFER_STATE yy_create_buffer( file, size )
+FILE *file;
+int size;
+#endif
+	{
 	YY_BUFFER_STATE b;
-    
-	b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
+
+	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
 	if ( ! b )
 		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
 
@@ -3071,75 +2957,80 @@ static void yy_load_buffer_state  (void)
 	/* yy_ch_buf has to be 2 characters longer than the size given because
 	 * we need to put in 2 end-of-buffer characters.
 	 */
-	b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2  );
+	b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
 	if ( ! b->yy_ch_buf )
 		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
 
 	b->yy_is_our_buffer = 1;
 
-	yy_init_buffer(b,file );
+	yy_init_buffer( b, file );
 
 	return b;
-}
+	}
 
-/** Destroy the buffer.
- * @param b a buffer created with yy_create_buffer()
- * 
- */
-    void yy_delete_buffer (YY_BUFFER_STATE  b )
-{
-    
+
+#ifdef YY_USE_PROTOS
+void yy_delete_buffer( YY_BUFFER_STATE b )
+#else
+void yy_delete_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+	{
 	if ( ! b )
 		return;
 
-	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
-		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
+	if ( b == yy_current_buffer )
+		yy_current_buffer = (YY_BUFFER_STATE) 0;
 
 	if ( b->yy_is_our_buffer )
-		yyfree((void *) b->yy_ch_buf  );
+		yy_flex_free( (void *) b->yy_ch_buf );
 
-	yyfree((void *) b  );
-}
+	yy_flex_free( (void *) b );
+	}
 
-#ifndef __cplusplus
-extern int isatty (int );
-#endif /* __cplusplus */
-    
-/* Initializes or reinitializes a buffer.
- * This function is sometimes called more than once on the same buffer,
- * such as during a yyrestart() or at EOF.
- */
-    static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
 
-{
-	int oerrno = errno;
-    
-	yy_flush_buffer(b );
+#ifndef YY_ALWAYS_INTERACTIVE
+#ifndef YY_NEVER_INTERACTIVE
+extern int isatty YY_PROTO(( int ));
+#endif
+#endif
+
+#ifdef YY_USE_PROTOS
+void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
+#else
+void yy_init_buffer( b, file )
+YY_BUFFER_STATE b;
+FILE *file;
+#endif
+
+
+	{
+	yy_flush_buffer( b );
 
 	b->yy_input_file = file;
 	b->yy_fill_buffer = 1;
 
-    /* If b is the current buffer, then yy_init_buffer was _probably_
-     * called from yyrestart() or through yy_get_next_buffer.
-     * In that case, we don't want to reset the lineno or column.
-     */
-    if (b != YY_CURRENT_BUFFER){
-        b->yy_bs_lineno = 1;
-        b->yy_bs_column = 0;
-    }
-
-        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-    
-	errno = oerrno;
-}
+#if YY_ALWAYS_INTERACTIVE
+	b->yy_is_interactive = 1;
+#else
+#if YY_NEVER_INTERACTIVE
+	b->yy_is_interactive = 0;
+#else
+	b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+#endif
+#endif
+	}
 
-/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
- * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
- * 
- */
-    void yy_flush_buffer (YY_BUFFER_STATE  b )
-{
-    	if ( ! b )
+
+#ifdef YY_USE_PROTOS
+void yy_flush_buffer( YY_BUFFER_STATE b )
+#else
+void yy_flush_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+
+	{
+	if ( ! b )
 		return;
 
 	b->yy_n_chars = 0;
@@ -3156,125 +3047,29 @@ extern int isatty (int );
 	b->yy_at_bol = 1;
 	b->yy_buffer_status = YY_BUFFER_NEW;
 
-	if ( b == YY_CURRENT_BUFFER )
-		yy_load_buffer_state( );
-}
-
-/** Pushes the new state onto the stack. The new state becomes
- *  the current state. This function will allocate the stack
- *  if necessary.
- *  @param new_buffer The new state.
- *  
- */
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
-{
-    	if (new_buffer == NULL)
-		return;
-
-	yyensure_buffer_stack();
-
-	/* This block is copied from yy_switch_to_buffer. */
-	if ( YY_CURRENT_BUFFER )
-		{
-		/* Flush out information for old buffer. */
-		*(yy_c_buf_p) = (yy_hold_char);
-		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
-		}
-
-	/* Only push if top exists. Otherwise, replace top. */
-	if (YY_CURRENT_BUFFER)
-		(yy_buffer_stack_top)++;
-	YY_CURRENT_BUFFER_LVALUE = new_buffer;
-
-	/* copied from yy_switch_to_buffer. */
-	yy_load_buffer_state( );
-	(yy_did_buffer_switch_on_eof) = 1;
-}
-
-/** Removes and deletes the top of the stack, if present.
- *  The next element becomes the new top.
- *  
- */
-void yypop_buffer_state (void)
-{
-    	if (!YY_CURRENT_BUFFER)
-		return;
-
-	yy_delete_buffer(YY_CURRENT_BUFFER );
-	YY_CURRENT_BUFFER_LVALUE = NULL;
-	if ((yy_buffer_stack_top) > 0)
-		--(yy_buffer_stack_top);
-
-	if (YY_CURRENT_BUFFER) {
-		yy_load_buffer_state( );
-		(yy_did_buffer_switch_on_eof) = 1;
-	}
-}
-
-/* Allocates the stack if it does not exist.
- *  Guarantees space for at least one push.
- */
-static void yyensure_buffer_stack (void)
-{
-	yy_size_t num_to_alloc;
-    
-	if (!(yy_buffer_stack)) {
-
-		/* First allocation is just for 2 elements, since we don't know if this
-		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
-		 * immediate realloc on the next call.
-         */
-		num_to_alloc = 1;
-		(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
-								(num_to_alloc * sizeof(struct yy_buffer_state*)
-								);
-		if ( ! (yy_buffer_stack) )
-			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
-								  
-		memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-				
-		(yy_buffer_stack_max) = num_to_alloc;
-		(yy_buffer_stack_top) = 0;
-		return;
+	if ( b == yy_current_buffer )
+		yy_load_buffer_state();
 	}
 
-	if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
-
-		/* Increase the buffer to prepare for a possible push. */
-		int grow_size = 8 /* arbitrary grow size */;
-
-		num_to_alloc = (yy_buffer_stack_max) + grow_size;
-		(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
-								((yy_buffer_stack),
-								num_to_alloc * sizeof(struct yy_buffer_state*)
-								);
-		if ( ! (yy_buffer_stack) )
-			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
-
-		/* zero only the new slots.*/
-		memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
-		(yy_buffer_stack_max) = num_to_alloc;
-	}
-}
 
-/** Setup the input buffer state to scan directly from a user-specified character buffer.
- * @param base the character buffer
- * @param size the size in bytes of the character buffer
- * 
- * @return the newly allocated buffer state object. 
- */
-YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
-{
+#ifndef YY_NO_SCAN_BUFFER
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
+#else
+YY_BUFFER_STATE yy_scan_buffer( base, size )
+char *base;
+yy_size_t size;
+#endif
+	{
 	YY_BUFFER_STATE b;
-    
+
 	if ( size < 2 ||
 	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
 	     base[size-1] != YY_END_OF_BUFFER_CHAR )
 		/* They forgot to leave room for the EOB's. */
 		return 0;
 
-	b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
+	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
 	if ( ! b )
 		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
 
@@ -3288,50 +3083,56 @@ YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
 	b->yy_fill_buffer = 0;
 	b->yy_buffer_status = YY_BUFFER_NEW;
 
-	yy_switch_to_buffer(b  );
+	yy_switch_to_buffer( b );
 
 	return b;
-}
+	}
+#endif
 
-/** Setup the input buffer state to scan a string. The next call to yylex() will
- * scan from a @e copy of @a str.
- * @param yystr a NUL-terminated string to scan
- * 
- * @return the newly allocated buffer state object.
- * @note If you want to scan bytes that may contain NUL values, then use
- *       yy_scan_bytes() instead.
- */
-YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
-{
-    
-	return yy_scan_bytes(yystr,strlen(yystr) );
-}
 
-/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
- * scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
- * 
- * @return the newly allocated buffer state object.
- */
-YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len )
-{
+#ifndef YY_NO_SCAN_STRING
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
+#else
+YY_BUFFER_STATE yy_scan_string( yy_str )
+yyconst char *yy_str;
+#endif
+	{
+	int len;
+	for ( len = 0; yy_str[len]; ++len )
+		;
+
+	return yy_scan_bytes( yy_str, len );
+	}
+#endif
+
+
+#ifndef YY_NO_SCAN_BYTES
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
+#else
+YY_BUFFER_STATE yy_scan_bytes( bytes, len )
+yyconst char *bytes;
+int len;
+#endif
+	{
 	YY_BUFFER_STATE b;
 	char *buf;
-	yy_size_t n, i;
-    
+	yy_size_t n;
+	int i;
+
 	/* Get memory for full buffer, including space for trailing EOB's. */
-	n = _yybytes_len + 2;
-	buf = (char *) yyalloc(n  );
+	n = len + 2;
+	buf = (char *) yy_flex_alloc( n );
 	if ( ! buf )
 		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
 
-	for ( i = 0; i < _yybytes_len; ++i )
-		buf[i] = yybytes[i];
+	for ( i = 0; i < len; ++i )
+		buf[i] = bytes[i];
 
-	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
+	buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
 
-	b = yy_scan_buffer(buf,n );
+	b = yy_scan_buffer( buf, n );
 	if ( ! b )
 		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
 
@@ -3341,207 +3142,148 @@ YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len
 	b->yy_is_our_buffer = 1;
 
 	return b;
-}
-
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
+	}
 #endif
 
-static void yy_fatal_error (yyconst char* msg )
-{
-    	(void) fprintf( stderr, "%s\n", msg );
-	exit( YY_EXIT_FAILURE );
-}
-
-/* Redefine yyless() so it works in section 3 code. */
 
-#undef yyless
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up yytext. */ \
-        int yyless_macro_arg = (n); \
-        YY_LESS_LINENO(yyless_macro_arg);\
-		yytext[yyleng] = (yy_hold_char); \
-		(yy_c_buf_p) = yytext + yyless_macro_arg; \
-		(yy_hold_char) = *(yy_c_buf_p); \
-		*(yy_c_buf_p) = '\0'; \
-		yyleng = yyless_macro_arg; \
-		} \
-	while ( 0 )
+#ifndef YY_NO_PUSH_STATE
+#ifdef YY_USE_PROTOS
+static void yy_push_state( int new_state )
+#else
+static void yy_push_state( new_state )
+int new_state;
+#endif
+	{
+	if ( yy_start_stack_ptr >= yy_start_stack_depth )
+		{
+		yy_size_t new_size;
 
-/* Accessor  methods (get/set functions) to struct members. */
+		yy_start_stack_depth += YY_START_STACK_INCR;
+		new_size = yy_start_stack_depth * sizeof( int );
 
-/** Get the current line number.
- * 
- */
-int yyget_lineno  (void)
-{
-        
-    return yylineno;
-}
+		if ( ! yy_start_stack )
+			yy_start_stack = (int *) yy_flex_alloc( new_size );
 
-/** Get the input stream.
- * 
- */
-FILE *yyget_in  (void)
-{
-        return yyin;
-}
+		else
+			yy_start_stack = (int *) yy_flex_realloc(
+					(void *) yy_start_stack, new_size );
 
-/** Get the output stream.
- * 
- */
-FILE *yyget_out  (void)
-{
-        return yyout;
-}
+		if ( ! yy_start_stack )
+			YY_FATAL_ERROR(
+			"out of memory expanding start-condition stack" );
+		}
 
-/** Get the length of the current token.
- * 
- */
-yy_size_t yyget_leng  (void)
-{
-        return yyleng;
-}
+	yy_start_stack[yy_start_stack_ptr++] = YY_START;
 
-/** Get the current token.
- * 
- */
+	BEGIN(new_state);
+	}
+#endif
 
-char *yyget_text  (void)
-{
-        return yytext;
-}
 
-/** Set the current line number.
- * @param line_number
- * 
- */
-void yyset_lineno (int  line_number )
-{
-    
-    yylineno = line_number;
-}
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state()
+	{
+	if ( --yy_start_stack_ptr < 0 )
+		YY_FATAL_ERROR( "start-condition stack underflow" );
 
-/** Set the input stream. This does not discard the current
- * input buffer.
- * @param in_str A readable stream.
- * 
- * @see yy_switch_to_buffer
- */
-void yyset_in (FILE *  in_str )
-{
-        yyin = in_str ;
-}
+	BEGIN(yy_start_stack[yy_start_stack_ptr]);
+	}
+#endif
 
-void yyset_out (FILE *  out_str )
-{
-        yyout = out_str ;
-}
 
-int yyget_debug  (void)
-{
-        return yy_flex_debug;
-}
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state()
+	{
+	return yy_start_stack[yy_start_stack_ptr - 1];
+	}
+#endif
 
-void yyset_debug (int  bdebug )
-{
-        yy_flex_debug = bdebug ;
-}
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
 
-static int yy_init_globals (void)
-{
-        /* Initialization is the same as for the non-reentrant scanner.
-     * This function is called from yylex_destroy(), so don't allocate here.
-     */
-
-    /* We do not touch yylineno unless the option is enabled. */
-    yylineno =  1;
-    
-    (yy_buffer_stack) = 0;
-    (yy_buffer_stack_top) = 0;
-    (yy_buffer_stack_max) = 0;
-    (yy_c_buf_p) = (char *) 0;
-    (yy_init) = 0;
-    (yy_start) = 0;
-
-    (yy_state_buf) = 0;
-    (yy_state_ptr) = 0;
-    (yy_full_match) = 0;
-    (yy_lp) = 0;
-
-/* Defined in main.c */
-#ifdef YY_STDINIT
-    yyin = stdin;
-    yyout = stdout;
+#ifdef YY_USE_PROTOS
+static void yy_fatal_error( yyconst char msg[] )
 #else
-    yyin = (FILE *) 0;
-    yyout = (FILE *) 0;
+static void yy_fatal_error( msg )
+char msg[];
 #endif
-
-    /* For future reference: Set errno on error, since we are called by
-     * yylex_init()
-     */
-    return 0;
-}
-
-/* yylex_destroy is for both reentrant and non-reentrant scanners. */
-int yylex_destroy  (void)
-{
-    
-    /* Pop the buffer stack, destroying each element. */
-	while(YY_CURRENT_BUFFER){
-		yy_delete_buffer(YY_CURRENT_BUFFER  );
-		YY_CURRENT_BUFFER_LVALUE = NULL;
-		yypop_buffer_state();
+	{
+	(void) fprintf( stderr, "%s\n", msg );
+	exit( YY_EXIT_FAILURE );
 	}
 
-	/* Destroy the stack itself. */
-	yyfree((yy_buffer_stack) );
-	(yy_buffer_stack) = NULL;
 
-    yyfree ( (yy_state_buf) );
-    (yy_state_buf)  = NULL;
 
-    /* Reset the globals. This is important in a non-reentrant scanner so the next time
-     * yylex() is called, initialization will occur. */
-    yy_init_globals( );
+/* Redefine yyless() so it works in section 3 code. */
 
-    return 0;
-}
+#undef yyless
+#define yyless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up yytext. */ \
+		yytext[yyleng] = yy_hold_char; \
+		yy_c_buf_p = yytext + n; \
+		yy_hold_char = *yy_c_buf_p; \
+		*yy_c_buf_p = '\0'; \
+		yyleng = n; \
+		} \
+	while ( 0 )
 
-/*
- * Internal utility routines.
- */
+
+/* Internal utility routines. */
 
 #ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
-{
+#ifdef YY_USE_PROTOS
+static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
+#else
+static void yy_flex_strncpy( s1, s2, n )
+char *s1;
+yyconst char *s2;
+int n;
+#endif
+	{
 	register int i;
 	for ( i = 0; i < n; ++i )
 		s1[i] = s2[i];
-}
+	}
 #endif
 
 #ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s )
-{
+#ifdef YY_USE_PROTOS
+static int yy_flex_strlen( yyconst char *s )
+#else
+static int yy_flex_strlen( s )
+yyconst char *s;
+#endif
+	{
 	register int n;
 	for ( n = 0; s[n]; ++n )
 		;
 
 	return n;
-}
+	}
 #endif
 
-void *yyalloc (yy_size_t  size )
-{
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_alloc( yy_size_t size )
+#else
+static void *yy_flex_alloc( size )
+yy_size_t size;
+#endif
+	{
 	return (void *) malloc( size );
-}
+	}
 
-void *yyrealloc  (void * ptr, yy_size_t  size )
-{
+#ifdef YY_USE_PROTOS
+static void *yy_flex_realloc( void *ptr, yy_size_t size )
+#else
+static void *yy_flex_realloc( ptr, size )
+void *ptr;
+yy_size_t size;
+#endif
+	{
 	/* The cast to (char *) in the following accommodates both
 	 * implementations that use char* generic pointers, and those
 	 * that use void* generic pointers.  It works with the latter
@@ -3550,17 +3292,26 @@ void *yyrealloc  (void * ptr, yy_size_t  size )
 	 * as though doing an assignment.
 	 */
 	return (void *) realloc( (char *) ptr, size );
-}
-
-void yyfree (void * ptr )
-{
-	free( (char *) ptr );	/* see yyrealloc() for (char *) cast */
-}
-
-#define YYTABLES_NAME "yytables"
+	}
 
-#line 716 "dt_lex.l"
+#ifdef YY_USE_PROTOS
+static void yy_flex_free( void *ptr )
+#else
+static void yy_flex_free( ptr )
+void *ptr;
+#endif
+	{
+	free( ptr );
+	}
 
+#if YY_MAIN
+int main()
+	{
+	yylex();
+	return 0;
+	}
+#endif
+#line 724 "dt_lex.l"
 
 
 /*
@@ -3618,7 +3369,7 @@ yyinit(dt_pcb_t *pcb)
 #ifndef USING_FLEX
 	yysptr = yysbuf;
 #else
-   yy_switch_to_buffer(yy_create_buffer(yyin,YY_BUF_SIZE));
+   yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE));
 #endif
 }
 
@@ -3760,4 +3511,3 @@ unput(int c)
 }
 
 #endif /* USING_FLEX */
-
diff --git a/src/VBox/ExtPacks/VBoxDTrace/include/VBoxDTraceLibCWrappers.h b/src/VBox/ExtPacks/VBoxDTrace/include/VBoxDTraceLibCWrappers.h
index b89d53f..60ebe14 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/include/VBoxDTraceLibCWrappers.h
+++ b/src/VBox/ExtPacks/VBoxDTrace/include/VBoxDTraceLibCWrappers.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ExtPacks/VBoxDTrace/include/VBoxDTraceTypes.h b/src/VBox/ExtPacks/VBoxDTrace/include/VBoxDTraceTypes.h
index 3e8845a..9032e6d 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/include/VBoxDTraceTypes.h
+++ b/src/VBox/ExtPacks/VBoxDTrace/include/VBoxDTraceTypes.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -143,6 +143,7 @@ typedef char                       *caddr_t;
 #define VBDTSTATIC              static
 #define VBDTUNASS(a_Value)      = a_Value
 #define VBDTGCC(a_Value)        = a_Value
+#define VBDTMSC(a_Value)        = a_Value
 
 /*
  * string
@@ -156,8 +157,8 @@ typedef char                       *caddr_t;
 # define bcmp(a_p1, a_p2, a_cb)     (memcmp(a_p1, a_p2, a_cb))
 #endif
 #if defined(_MSC_VER) || defined(IN_RING0)
-# define snprintf                   RTStrPrintf
-# define vsnprintf                  RTStrPrintfV
+# define snprintf                   (int)RTStrPrintf    /** @todo wrong return value */
+# define vsnprintf                  (int)RTStrPrintfV   /** @todo wrong return value */
 #endif
 
 /*
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/dtrace.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/dtrace.c
index 69f17f3..fa0a6fc 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/dtrace.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/dtrace.c
@@ -355,6 +355,7 @@ oprintf(const char *fmt, ...)
 	}
 }
 
+#ifndef VBOX
 static char **
 make_argv(char *s)
 {
@@ -375,6 +376,7 @@ make_argv(char *s)
 	argv[argc] = NULL;
 	return (argv);
 }
+#endif /* !VBOX */
 
 static void
 dof_prune(const char *fname)
@@ -399,7 +401,7 @@ dof_prune(const char *fname)
 	if ((buf = malloc((sz = sbuf.st_size) + 1)) == NULL)
 		fatal("failed to allocate memory for %s", fname);
 
-	if (read(fd, buf, sz) != sz)
+	if ((size_t/*vbox*/)read(fd, buf, sz) != sz)
 		fatal("failed to read %s", fname);
 
 	buf[sz] = '\0';
@@ -429,7 +431,7 @@ dof_prune(const char *fname)
 		 * We have a match.  First write out our data up until now.
 		 */
 		if (i != mark) {
-			if (write(fd, &buf[mark], i - mark) != i - mark)
+			if ((size_t/*vbox*/)write(fd, &buf[mark], i - mark) != i - mark)
 				fatal("failed to write to %s", fname);
 		}
 
@@ -449,7 +451,7 @@ dof_prune(const char *fname)
 	}
 
 	if (mark < sz) {
-		if (write(fd, &buf[mark], sz - mark) != sz - mark)
+		if ((size_t/*vbox*/)write(fd, &buf[mark], sz - mark) != sz - mark)
 			fatal("failed to write to %s", fname);
 	}
 
@@ -475,7 +477,7 @@ etcsystem_prune(void)
 	if ((buf = malloc((sz = sbuf.st_size) + 1)) == NULL)
 		fatal("failed to allocate memory for %s", fname);
 
-	if (read(fd, buf, sz) != sz)
+	if ((size_t/*vbox*/)read(fd, buf, sz) != sz)
 		fatal("failed to read %s", fname);
 
 	buf[sz] = '\0';
@@ -617,6 +619,7 @@ info_stmt(dtrace_hdl_t *dtp, dtrace_prog_t *pgp,
 	dtrace_ecbdesc_t *edp = stp->dtsd_ecbdesc;
 	dtrace_probedesc_t *pdp = &edp->dted_probe;
 	dtrace_probeinfo_t p;
+	RT_NOREF1(pgp);
 
 	if (edp == *last)
 		return (0);
@@ -743,6 +746,7 @@ static int
 list_probe(dtrace_hdl_t *dtp, const dtrace_probedesc_t *pdp, void *arg)
 {
 	dtrace_probeinfo_t p;
+	RT_NOREF1(arg);
 
 	oprintf("%5d %10s %17s %33s %s\n", pdp->dtpd_id,
 	    pdp->dtpd_provider, pdp->dtpd_mod, pdp->dtpd_func, pdp->dtpd_name);
@@ -759,6 +763,7 @@ list_stmt(dtrace_hdl_t *dtp, dtrace_prog_t *pgp,
     dtrace_stmtdesc_t *stp, dtrace_ecbdesc_t **last)
 {
 	dtrace_ecbdesc_t *edp = stp->dtsd_ecbdesc;
+	RT_NOREF1(pgp);
 
 	if (edp == *last)
 		return (0);
@@ -868,13 +873,16 @@ prochandler(struct ps_prochandle *P, const char *msg, void *arg)
 		g_pslive--;
 		break;
 	}
-#endif /* !VBOX */
+#else
+	RT_NOREF3(P, msg, arg);
+#endif /* VBOX */
 }
 
 /*ARGSUSED*/
 static int
 errhandler(const dtrace_errdata_t *data, void *arg)
 {
+	RT_NOREF1(arg);
 	error(data->dteda_msg);
 	return (DTRACE_HANDLE_OK);
 }
@@ -883,6 +891,7 @@ errhandler(const dtrace_errdata_t *data, void *arg)
 static int
 drophandler(const dtrace_dropdata_t *data, void *arg)
 {
+	RT_NOREF1(arg);
 	error(data->dtdda_msg);
 	return (DTRACE_HANDLE_OK);
 }
@@ -891,6 +900,7 @@ drophandler(const dtrace_dropdata_t *data, void *arg)
 static int
 setopthandler(const dtrace_setoptdata_t *data, void *arg)
 {
+	RT_NOREF1(arg);
 	if (strcmp(data->dtsda_option, "quiet") == 0)
 		g_quiet = data->dtsda_newval != DTRACEOPT_UNSET;
 
@@ -954,6 +964,7 @@ bufhandler(const dtrace_bufdata_t *bufdata, void *arg)
 	    { "???",		UINT32_MAX },
 	    { NULL }
 	};
+	RT_NOREF1(arg);
 
 	if (bufdata->dtbda_probe != NULL) {
 		pd = bufdata->dtbda_probe->dtpda_pdesc;
@@ -1053,6 +1064,7 @@ chewrec(const dtrace_probedata_t *data, const dtrace_recdesc_t *rec, void *arg)
 {
 	dtrace_actkind_t act;
 	uintptr_t addr;
+	RT_NOREF1(arg);
 
 	if (rec == NULL) {
 		/*
@@ -1083,6 +1095,7 @@ chew(const dtrace_probedata_t *data, void *arg)
 	dtrace_probedesc_t *pd = data->dtpda_pdesc;
 	processorid_t cpu = data->dtpda_cpu;
 	static int heading;
+	RT_NOREF1(arg);
 
 	if (g_impatient) {
 		g_newline = 0;
@@ -1242,6 +1255,8 @@ intr(int signo)
 #ifdef _MSC_VER
 	/* Reinstall signal handler. Seems MSVCRT is System V style. */
 	signal(signo, intr);
+#else
+	RT_NOREF(signo);
 #endif
 }
 
@@ -1310,7 +1325,7 @@ main(int argc, char *argv[])
 	RTGetOptInit(&GetState, argc, argv, g_aOptions, RT_ELEMENTS(g_aOptions), 1, 0);
 	while ((c = RTGetOpt(&GetState, &ValueUnion))) {
 		{
-			const char *optarg = ValueUnion.psz;
+			/* const char *optarg = ValueUnion.psz; - unused */
 #endif
 			switch (c) {
 #ifndef VBOX
@@ -1703,15 +1718,15 @@ main(int argc, char *argv[])
 	 * grabbing or creating victim processes.  The behavior of these calls
 	 * may been affected by any library options set by the second pass.
 	 */
-#ifndef VBOX
+# ifndef VBOX
 	for (optind = 1; optind < argc; optind++) {
 		while ((c = getopt(argc, argv, DTRACE_OPTSTR)) != EOF) {
-#else
+# else
 	RTGetOptInit(&GetState, argc, argv, g_aOptions, RT_ELEMENTS(g_aOptions), 1, 0);
 	while ((c = RTGetOpt(&GetState, &ValueUnion))) {
 		{
 			char *optarg = (char *)ValueUnion.psz;
-#endif
+# endif
 			switch (c) {
 			case 'c':
 				if ((v = make_argv(optarg)) == NULL)
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/common/ctf/ctf_create.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/common/ctf/ctf_create.c
index ac8420c..4518f59 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/common/ctf/ctf_create.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/common/ctf/ctf_create.c
@@ -503,7 +503,7 @@ ctf_dtd_lookup(ctf_file_t *fp, ctf_id_t type)
 int
 ctf_discard(ctf_file_t *fp)
 {
-	ctf_dtdef_t *dtd, *ntd;
+	ctf_dtdef_t *dtd, *ntd VBDTMSC(NULL);
 
 	if (!(fp->ctf_flags & LCTF_RDWR))
 		return (ctf_set_errno(fp, ECTF_RDONLY));
@@ -512,7 +512,7 @@ ctf_discard(ctf_file_t *fp)
 		return (0); /* no update required */
 
 	for (dtd = ctf_list_next(&fp->ctf_dtdefs); dtd != NULL; dtd = ntd) {
-		if (dtd->dtd_type <= fp->ctf_dtoldid)
+		if (dtd->dtd_type <= (intptr_t /*vbox*/)fp->ctf_dtoldid)
 			continue; /* skip types that have been committed */
 
 		ntd = ctf_list_next(dtd);
@@ -1040,6 +1040,7 @@ membcmp(const char *name, ctf_id_t type, ulong_t offset, void *arg)
 {
 	ctf_bundle_t *ctb = arg;
 	ctf_membinfo_t ctm;
+	RT_NOREF1(type);
 
 	return (ctf_member_info(ctb->ctb_file, ctb->ctb_type,
 	    name, &ctm) == CTF_ERR || ctm.ctm_offset != offset);
@@ -1163,9 +1164,9 @@ ctf_add_type(ctf_file_t *dst_fp, ctf_file_t *src_fp, ctf_id_t src_type)
 	 */
 	if (dst_type == CTF_ERR && name[0] != '\0') {
 		for (dtd = ctf_list_prev(&dst_fp->ctf_dtdefs); dtd != NULL &&
-		    dtd->dtd_type > dst_fp->ctf_dtoldid;
+		    dtd->dtd_type > (intptr_t /*vbox*/)dst_fp->ctf_dtoldid;
 		    dtd = ctf_list_prev(dtd)) {
-			if (CTF_INFO_KIND(dtd->dtd_data.ctt_info) == kind &&
+			if ((uint_t)CTF_INFO_KIND(dtd->dtd_data.ctt_info) == kind &&
 			    dtd->dtd_name != NULL &&
 			    strcmp(dtd->dtd_name, name) == 0)
 				return (dtd->dtd_type);
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/common/ctf/ctf_labels.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/common/ctf/ctf_labels.c
index 14ef2e5..798353d 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/common/ctf/ctf_labels.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/common/ctf/ctf_labels.c
@@ -38,8 +38,11 @@ extract_label_info(ctf_file_t *fp, const ctf_lblent_t **ctl, uint_t *num_labels)
 	/*
 	 * Labels are only supported in V2 or later
 	 */
-	if (fp->ctf_version < CTF_VERSION_2)
+	if (fp->ctf_version < CTF_VERSION_2) {
+		*ctl = NULL; /* Shup up, GCC! */
+		*num_labels = 0;
 		return (ctf_set_errno(fp, ECTF_NOTSUP));
+	}
 
 	h = (const ctf_header_t *)fp->ctf_data.cts_data;
 
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/common/ctf/ctf_lookup.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/common/ctf/ctf_lookup.c
index b706759..c49d616 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/common/ctf/ctf_lookup.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/common/ctf/ctf_lookup.c
@@ -233,7 +233,7 @@ ctf_lookup_by_id(ctf_file_t **fpp, ctf_id_t type)
 	}
 
 	type = CTF_TYPE_TO_INDEX(type);
-	if (type > 0 && type <= fp->ctf_typemax) {
+	if (type > 0 && type <= (intptr_t/*vbox*/)fp->ctf_typemax) {
 		*fpp = fp; /* function returns ending CTF container */
 		return (LCTF_INDEX_TO_TYPEPTR(fp, type));
 	}
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/common/ctf/ctf_open.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/common/ctf/ctf_open.c
index 125f6bc..fccd66c 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/common/ctf/ctf_open.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/common/ctf/ctf_open.c
@@ -490,7 +490,7 @@ init_types(ctf_file_t *fp, const ctf_header_t *cth)
 			 * in fp->ctf_ptrtab[ index of referenced type ].
 			 */
 			if (CTF_TYPE_ISCHILD(tp->ctt_type) == child &&
-			    CTF_TYPE_TO_INDEX(tp->ctt_type) <= fp->ctf_typemax)
+			    CTF_TYPE_TO_INDEX(tp->ctt_type) <= (intptr_t/*vbox*/)fp->ctf_typemax)
 				fp->ctf_ptrtab[
 				    CTF_TYPE_TO_INDEX(tp->ctt_type)] = id;
 			/*FALLTHRU*/
@@ -535,7 +535,7 @@ init_types(ctf_file_t *fp, const ctf_header_t *cth)
 			if (LCTF_INFO_KIND(fp, tp->ctt_info) == CTF_K_TYPEDEF &&
 			    strcmp(ctf_strptr(fp, tp->ctt_name), "") == 0 &&
 			    CTF_TYPE_ISCHILD(tp->ctt_type) == child &&
-			    CTF_TYPE_TO_INDEX(tp->ctt_type) <= fp->ctf_typemax)
+			    CTF_TYPE_TO_INDEX(tp->ctt_type) <= (intptr_t /*vbox*/)fp->ctf_typemax)
 				fp->ctf_ptrtab[
 				    CTF_TYPE_TO_INDEX(tp->ctt_type)] = dst;
 		}
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libctf/common/ctf_lib.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libctf/common/ctf_lib.c
index d50f5fc..4590d20 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libctf/common/ctf_lib.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libctf/common/ctf_lib.c
@@ -114,8 +114,9 @@ void libctf_init(void)
 static void *VBoxCtfMap64Fake(void *pvAddr, size_t cb, int fProt, int fFlags, int fd, int64_t offFile)
 {
 	off_t const offSaved = lseek(fd, 0, SEEK_CUR);
-	void *pvRet;
+	void *pvRet = NULL;
 	int err;
+	RT_NOREF2(fProt, fFlags);
 
 	Assert(pvAddr == NULL); NOREF(pvAddr);
 	Assert(fProt == PROT_READ);
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libctf/common/ctf_subr.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libctf/common/ctf_subr.c
index c6a6967..7de8069 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libctf/common/ctf_subr.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libctf/common/ctf_subr.c
@@ -89,6 +89,7 @@ ctf_free(void *buf, size_t size)
 #ifndef VBOX
 	free(buf);
 #else
+    RT_NOREF1(size);
     RTMemFree(buf);
 #endif
 }
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_aggregate.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_aggregate.c
index 21b2b42..d34a324 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_aggregate.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_aggregate.c
@@ -91,6 +91,7 @@ dt_aggregate_countcmp(int64_t *lhs, int64_t *rhs)
 static void
 dt_aggregate_min(int64_t *existing, int64_t *new, size_t size)
 {
+	RT_NOREF1(size);
 	if (*new < *existing)
 		*existing = *new;
 }
@@ -99,6 +100,7 @@ dt_aggregate_min(int64_t *existing, int64_t *new, size_t size)
 static void
 dt_aggregate_max(int64_t *existing, int64_t *new, size_t size)
 {
+	RT_NOREF1(size);
 	if (*new > *existing)
 		*existing = *new;
 }
@@ -140,6 +142,7 @@ dt_aggregate_lquantize(int64_t *existing, int64_t *new, size_t size)
 	int64_t arg = *existing++;
 	uint16_t levels = DTRACE_LQUANTIZE_LEVELS(arg);
 	int i;
+	RT_NOREF1(size);
 
 	for (i = 0; i <= levels + 1; i++)
 		existing[i] = existing[i] + new[i + 1];
@@ -221,7 +224,7 @@ dt_aggregate_quantizedcmp(int64_t *lhs, int64_t *rhs)
 {
 	int nbuckets = DTRACE_QUANTIZE_NBUCKETS, i;
 	long double ltotal = 0, rtotal = 0;
-	int64_t lzero, rzero;
+	int64_t lzero VBDTMSC(0), rzero VBDTMSC(0);
 
 	for (i = 0; i < nbuckets; i++) {
 		int64_t bucketval = DTRACE_QUANTIZE_BUCKETVAL(i);
@@ -277,6 +280,8 @@ dt_aggregate_usym(dtrace_hdl_t *dtp, uint64_t *data)
 
 	dt_proc_unlock(dtp, P);
 	dt_proc_release(dtp, P);
+#else
+	RT_NOREF2(dtp, data);
 #endif
 }
 
@@ -302,6 +307,8 @@ dt_aggregate_umod(dtrace_hdl_t *dtp, uint64_t *data)
 
 	dt_proc_unlock(dtp, P);
 	dt_proc_release(dtp, P);
+#else
+	RT_NOREF2(dtp, data);
 #endif
 }
 
@@ -574,7 +581,7 @@ hashnext:
 					return (dt_set_errno(dtp, EDT_NOMEM));
 				}
 
-				if (j == cpu) {
+				if ((unsigned)j == cpu) {
 					bcopy(&addr[rec->dtrd_offset],
 					    percpu[j], rec->dtrd_size);
 				} else {
@@ -815,7 +822,7 @@ dt_aggregate_valcmp(const void *lhs, const void *rhs)
 	dtrace_aggdesc_t *ragg = rh->dtahe_data.dtada_desc;
 	caddr_t ldata = lh->dtahe_data.dtada_data;
 	caddr_t rdata = rh->dtahe_data.dtada_data;
-	dtrace_recdesc_t *lrec, *rrec;
+	dtrace_recdesc_t *lrec VBDTMSC(NULL), *rrec VBDTMSC(NULL);
 	int64_t *laddr, *raddr;
 	int rval, i;
 
@@ -1376,7 +1383,7 @@ dtrace_aggregate_walk_joined(dtrace_hdl_t *dtp, dtrace_aggvarid_t *aggvars,
     int naggvars, dtrace_aggregate_walk_joined_f *func, void *arg)
 {
 	dt_aggregate_t *agp = &dtp->dt_aggregate;
-	dt_ahashent_t *h, **sorted = NULL, ***bundle, **nbundle;
+	dt_ahashent_t *h, **sorted = NULL, ***bundle VBDTMSC(NULL), **nbundle;
 	const dtrace_aggdata_t **data;
 	dt_ahashent_t *zaggdata = NULL;
 	dt_ahash_t *hash = &agp->dtat_hash;
@@ -1672,7 +1679,7 @@ dtrace_aggregate_walk_joined(dtrace_hdl_t *dtp, dtrace_aggvarid_t *aggvars,
 		sorted[i++] = h;
 	}
 
-	assert(i == nentries);
+	assert((size_t/*vbox*/)i == nentries);
 
 	/*
 	 * We've loaded our array; now we need to sort by value to allow us
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_as.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_as.c
index a90e0f7..728457c 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_as.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_as.c
@@ -82,6 +82,7 @@ static int
 dt_countvar(dt_idhash_t *dhp, dt_ident_t *idp, void *data)
 {
 	size_t *np = data;
+	RT_NOREF1(dhp);
 
 	if (idp->di_flags & (DT_IDFLG_DIFR | DT_IDFLG_DIFW))
 		(*np)++; /* include variable in vartab */
@@ -97,6 +98,7 @@ dt_copyvar(dt_idhash_t *dhp, dt_ident_t *idp, void *data)
 	dtrace_difv_t *dvp;
 	ssize_t stroff;
 	dt_node_t dn;
+	RT_NOREF1(dhp);
 
 	if (!(idp->di_flags & (DT_IDFLG_DIFR | DT_IDFLG_DIFW)))
 		return (0); /* omit variable from vartab */
@@ -220,7 +222,7 @@ dt_as(dt_pcb_t *pcb)
 	size_t n = 0;
 	uint_t i;
 
-	uint_t kmask, kbits, umask, ubits;
+	uint_t kmask VBDTMSC(0), kbits VBDTMSC(0), umask VBDTMSC(0), ubits VBDTMSC(0);
 	uint_t krel = 0, urel = 0, xlrefs = 0;
 
 	/*
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_cc.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_cc.c
index 33dd0a3..1448570 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_cc.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_cc.c
@@ -138,6 +138,7 @@ static void *dt_compile(dtrace_hdl_t *, int, dtrace_probespec_t, void *,
 static int
 dt_idreset(dt_idhash_t *dhp, dt_ident_t *idp, void *ignored)
 {
+	RT_NOREF2(dhp, ignored);
 	idp->di_flags &= ~(DT_IDFLG_REF | DT_IDFLG_MOD |
 	    DT_IDFLG_DIFR | DT_IDFLG_DIFW);
 	return (0);
@@ -147,9 +148,12 @@ dt_idreset(dt_idhash_t *dhp, dt_ident_t *idp, void *ignored)
 static int
 dt_idpragma(dt_idhash_t *dhp, dt_ident_t *idp, void *ignored)
 {
+	RT_NOREF2(dhp, ignored);
 	yylineno = idp->di_lineno;
 	xyerror(D_PRAGMA_UNUSED, "unused #pragma %s\n", (char *)idp->di_iarg);
+#ifndef _MSC_VER /* unreachable */
 	return (0);
+#endif
 }
 
 static dtrace_stmtdesc_t *
@@ -857,6 +861,7 @@ static void
 dt_action_symmod_args(dtrace_hdl_t *dtp, dtrace_actdesc_t *ap,
     dt_node_t *dnp, dtrace_actkind_t kind)
 {
+	RT_NOREF1(dtp);
 	assert(kind == DTRACEACT_SYM || kind == DTRACEACT_MOD ||
 	    kind == DTRACEACT_USYM || kind == DTRACEACT_UMOD ||
 	    kind == DTRACEACT_UADDR);
@@ -880,6 +885,7 @@ static void
 dt_action_ftruncate(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp)
 {
 	dtrace_actdesc_t *ap = dt_stmt_action(dtp, sdp);
+	RT_NOREF1(dnp);
 
 	/*
 	 * Library actions need a DIFO that serves as an argument.  As
@@ -896,6 +902,7 @@ static void
 dt_action_stop(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp)
 {
 	dtrace_actdesc_t *ap = dt_stmt_action(dtp, sdp);
+	RT_NOREF1(dnp);
 
 	ap->dtad_kind = DTRACEACT_STOP;
 	ap->dtad_arg = 0;
@@ -906,6 +913,7 @@ static void
 dt_action_breakpoint(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp)
 {
 	dtrace_actdesc_t *ap = dt_stmt_action(dtp, sdp);
+	RT_NOREF1(dnp);
 
 	ap->dtad_kind = DTRACEACT_BREAKPOINT;
 	ap->dtad_arg = 0;
@@ -916,6 +924,7 @@ static void
 dt_action_panic(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp)
 {
 	dtrace_actdesc_t *ap = dt_stmt_action(dtp, sdp);
+	RT_NOREF1(dnp);
 
 	ap->dtad_kind = DTRACEACT_PANIC;
 	ap->dtad_arg = 0;
@@ -1094,7 +1103,7 @@ dt_compile_agg(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp)
 	dt_ident_t *aid, *fid;
 	dt_node_t *anp, *incr = NULL;
 	dtrace_actdesc_t *ap;
-	uint_t n = 1, argmax;
+	uint_t n = 1, argmax VBDTMSC(0);
 	uint64_t arg = 0;
 
 	/*
@@ -1729,7 +1738,9 @@ err:
 	free(argv);
 	(void) fclose(ofp);
 	return (NULL);
+
 #else  /* VBOX */
+	RT_NOREF1(ifp);
 	(void) dt_set_errno(dtp, EDT_CPPERR);
 	return (NULL);
 #endif /* VBOX */
@@ -1990,7 +2001,8 @@ dt_load_libs_dir(dtrace_hdl_t *dtp, const char *path)
 	while (RT_SUCCESS(RTDirRead(pDir, &DirEntry, 0))) {
 		struct FakeDirEntry {
 			const char *d_name;
-		} FakeDirEntry = { DirEntry.szName }, *dp = &FakeDirEntry;
+		} FakeDirEntry, *dp = &FakeDirEntry;
+		FakeDirEntry.d_name = DirEntry.szName;
 #endif
 		if ((p = strrchr(dp->d_name, '.')) == NULL || strcmp(p, ".d"))
 			continue; /* skip any filename not ending in .d */
@@ -2154,6 +2166,7 @@ dt_compile(dtrace_hdl_t *dtp, int context, dtrace_probespec_t pspec, void *arg,
 	else
 		yybegin(YYS_CLAUSE);
 
+	rv = NULL;
 	if ((err = setjmp(yypcb->pcb_jmpbuf)) != 0)
 		goto out;
 
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_cg.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_cg.c
index d56bf44..0ce6fea 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_cg.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_cg.c
@@ -410,7 +410,7 @@ static void
 dt_cg_store(dt_node_t *src, dt_irlist_t *dlp, dt_regset_t *drp, dt_node_t *dst)
 {
 	ctf_encoding_t e;
-	dif_instr_t instr;
+	dif_instr_t instr VBDTMSC(0);
 	size_t size;
 	int reg;
 
@@ -1916,7 +1916,7 @@ void
 dt_cg(dt_pcb_t *pcb, dt_node_t *dnp)
 {
 	dif_instr_t instr;
-	dt_xlator_t *dxp;
+	dt_xlator_t *dxp VBDTMSC(NULL);
 
 	if (pcb->pcb_regs == NULL && (pcb->pcb_regs =
 	    dt_regset_create(pcb->pcb_hdl->dt_conf.dtc_difintregs)) == NULL)
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_consume.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_consume.c
index 4392330..04134aa 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_consume.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_consume.c
@@ -487,13 +487,13 @@ out:
 }
 
 static int
-dt_nullprobe()
+dt_nullprobe(void)
 {
 	return (DTRACE_CONSUME_THIS);
 }
 
 static int
-dt_nullrec()
+dt_nullrec(void)
 {
 	return (DTRACE_CONSUME_NEXT);
 }
@@ -701,6 +701,7 @@ dt_print_average(dtrace_hdl_t *dtp, FILE *fp, caddr_t addr,
 {
 	/* LINTED - alignment */
 	int64_t *data = (int64_t *)addr;
+	RT_NOREF1(size);
 
 	return (dt_printf(dtp, fp, " %16lld", data[0] ?
 	    (long long)(data[1] / (int64_t)normal / data[0]) : 0));
@@ -713,6 +714,7 @@ dt_print_stddev(dtrace_hdl_t *dtp, FILE *fp, caddr_t addr,
 {
 	/* LINTED - alignment */
 	uint64_t *data = (uint64_t *)addr;
+	RT_NOREF1(size);
 
 	return (dt_printf(dtp, fp, " %16llu", data[0] ?
 	    (unsigned long long) dt_stddev(data, normal) : 0));
@@ -728,7 +730,12 @@ dt_print_bytes(dtrace_hdl_t *dtp, FILE *fp, caddr_t addr,
 	 * a terminating byte, we print it out as a string.  Otherwise, we
 	 * assume that it's something else and just print the bytes.
 	 */
+#ifdef VBOX
+	size_t i, j;
+	int margin = 5;
+#else
 	int i, j, margin = 5;
+#endif
 	char *c = (char *)addr;
 
 	if (nbytes == 0)
@@ -1042,7 +1049,7 @@ dt_print_ustack(dtrace_hdl_t *dtp, FILE *fp, const char *format,
 
 		if (str != NULL) {
 			str += strlen(str) + 1;
-			if (str - strbase >= strsize)
+			if ((uintptr_t/*vbox*/)(str - strbase) >= strsize)
 				str = NULL;
 		}
 	}
@@ -1085,6 +1092,8 @@ dt_print_usym(dtrace_hdl_t *dtp, FILE *fp, caddr_t addr, dtrace_actkind_t act)
 			dt_proc_release(dtp, P);
 		}
 	}
+#else
+	RT_NOREF1(act);
 #endif
 
 	do {
@@ -1140,6 +1149,7 @@ dt_print_umod(dtrace_hdl_t *dtp, FILE *fp, const char *format, caddr_t addr)
 		dt_proc_release(dtp, P);
 	}
 #else  /* VBOX */
+	RT_NOREF_PV(pid);
 	snprintf(c, sizeof (c), "0x%llx", (u_longlong_t)pc);
 	err = dt_printf(dtp, fp, format, c);
 #endif /* VBOX */
@@ -1716,14 +1726,17 @@ again:
 					continue;
 
 				case DT_ACT_FTRUNCATE:
+				{
+					int res;
 					if (fp == NULL)
 						continue;
 
 					(void) fflush(fp);
-					(void) ftruncate(fileno(fp), 0);
+					res = ftruncate(fileno(fp), 0);
+					NOREF(res);
 					(void) fseeko(fp, 0, SEEK_SET);
 					continue;
-
+				}
 				case DT_ACT_NORMALIZE:
 					if (i == epd->dtepd_nrecs - 1)
 						return (dt_set_errno(dtp,
@@ -1851,7 +1864,7 @@ again:
 				int (*func)(dtrace_hdl_t *, FILE *, void *,
 				    const dtrace_probedata_t *,
 				    const dtrace_recdesc_t *, uint_t,
-				    const void *buf, size_t);
+				    const void *buf, size_t) VBDTMSC(NULL);
 
 				if ((fmtdata = dt_format_lookup(dtp,
 				    rec->dtrd_format)) == NULL)
@@ -2109,7 +2122,7 @@ dt_consume_begin(dtrace_hdl_t *dtp, FILE *fp, dtrace_bufdesc_t *buf,
 	static int max_ncpus;
 	dtrace_optval_t size;
 
-	dtp->dt_beganon = -1;
+	dtp->dt_beganon = (processorid_t)-1;
 
 	if (dt_ioctl(dtp, DTRACEIOC_BUFSNAP, buf) == -1) {
 		/*
@@ -2174,7 +2187,7 @@ dt_consume_begin(dtrace_hdl_t *dtp, FILE *fp, dtrace_bufdesc_t *buf,
 	for (i = 0; i < max_ncpus; i++) {
 		nbuf.dtbd_cpu = i;
 
-		if (i == cpu)
+		if ((unsigned)i == cpu)
 			continue;
 
 		if (dt_ioctl(dtp, DTRACEIOC_BUFSNAP, &nbuf) == -1) {
@@ -2285,7 +2298,7 @@ dtrace_consume(dtrace_hdl_t *dtp, FILE *fp,
 		 * END probe was processed only _after_ we have processed
 		 * everything else.
 		 */
-		if (dtp->dt_stopped && (i == dtp->dt_endedon))
+		if (dtp->dt_stopped && ((unsigned)i == dtp->dt_endedon))
 			continue;
 
 		if (dt_ioctl(dtp, DTRACEIOC_BUFSNAP, buf) == -1) {
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_decl.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_decl.c
index 9e8491a..5d79ab8 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_decl.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_decl.c
@@ -513,7 +513,7 @@ dt_decl_member(dt_node_t *dnp)
 	char n[DT_TYPE_NAMELEN];
 
 	dtrace_typeinfo_t dtt;
-	ctf_encoding_t cte;
+	ctf_encoding_t cte VBDTMSC({0});
 	ctf_id_t base;
 	uint_t kind;
 	ssize_t size;
@@ -652,6 +652,7 @@ done:
 static int
 dt_decl_hasmembers(const char *name, int value, void *private)
 {
+	RT_NOREF3(name, value, private);
 	return (1); /* abort search and return true if a member exists */
 }
 
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_dis.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_dis.c
index 712d123..4452393 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_dis.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_dis.c
@@ -38,6 +38,7 @@
 static void
 dt_dis_log(const dtrace_difo_t *dp, const char *name, dif_instr_t in, FILE *fp)
 {
+	RT_NOREF1(dp);
 	(void) fprintf(fp, "%-4s %%r%u, %%r%u, %%r%u", name,
 	    DIF_INSTR_R1(in), DIF_INSTR_R2(in), DIF_INSTR_RD(in));
 }
@@ -47,6 +48,7 @@ static void
 dt_dis_branch(const dtrace_difo_t *dp, const char *name,
 	dif_instr_t in, FILE *fp)
 {
+	RT_NOREF1(dp);
 	(void) fprintf(fp, "%-4s %u", name, DIF_INSTR_LABEL(in));
 }
 
@@ -54,6 +56,7 @@ dt_dis_branch(const dtrace_difo_t *dp, const char *name,
 static void
 dt_dis_load(const dtrace_difo_t *dp, const char *name, dif_instr_t in, FILE *fp)
 {
+	RT_NOREF1(dp);
 	(void) fprintf(fp, "%-4s [%%r%u], %%r%u", name,
 	    DIF_INSTR_R1(in), DIF_INSTR_RD(in));
 }
@@ -63,6 +66,7 @@ static void
 dt_dis_store(const dtrace_difo_t *dp, const char *name,
 	dif_instr_t in, FILE *fp)
 {
+	RT_NOREF1(dp);
 	(void) fprintf(fp, "%-4s %%r%u, [%%r%u]", name,
 	    DIF_INSTR_R1(in), DIF_INSTR_RD(in));
 }
@@ -71,6 +75,7 @@ dt_dis_store(const dtrace_difo_t *dp, const char *name,
 static void
 dt_dis_str(const dtrace_difo_t *dp, const char *name, dif_instr_t in, FILE *fp)
 {
+	RT_NOREF2(dp, in);
 	(void) fprintf(fp, "%s", name);
 }
 
@@ -78,6 +83,7 @@ dt_dis_str(const dtrace_difo_t *dp, const char *name, dif_instr_t in, FILE *fp)
 static void
 dt_dis_r1rd(const dtrace_difo_t *dp, const char *name, dif_instr_t in, FILE *fp)
 {
+	RT_NOREF1(dp);
 	(void) fprintf(fp, "%-4s %%r%u, %%r%u", name,
 	    DIF_INSTR_R1(in), DIF_INSTR_RD(in));
 }
@@ -86,6 +92,7 @@ dt_dis_r1rd(const dtrace_difo_t *dp, const char *name, dif_instr_t in, FILE *fp)
 static void
 dt_dis_cmp(const dtrace_difo_t *dp, const char *name, dif_instr_t in, FILE *fp)
 {
+	RT_NOREF1(dp);
 	(void) fprintf(fp, "%-4s %%r%u, %%r%u", name,
 	    DIF_INSTR_R1(in), DIF_INSTR_R2(in));
 }
@@ -94,6 +101,7 @@ dt_dis_cmp(const dtrace_difo_t *dp, const char *name, dif_instr_t in, FILE *fp)
 static void
 dt_dis_tst(const dtrace_difo_t *dp, const char *name, dif_instr_t in, FILE *fp)
 {
+	RT_NOREF1(dp);
 	(void) fprintf(fp, "%-4s %%r%u", name, DIF_INSTR_R1(in));
 }
 
@@ -194,6 +202,7 @@ dt_dis_sets(const dtrace_difo_t *dp, const char *name, dif_instr_t in, FILE *fp)
 static void
 dt_dis_ret(const dtrace_difo_t *dp, const char *name, dif_instr_t in, FILE *fp)
 {
+	RT_NOREF1(dp);
 	(void) fprintf(fp, "%-4s %%r%u", name, DIF_INSTR_RD(in));
 }
 
@@ -202,6 +211,7 @@ static void
 dt_dis_call(const dtrace_difo_t *dp, const char *name, dif_instr_t in, FILE *fp)
 {
 	uint_t subr = DIF_INSTR_SUBR(in);
+	RT_NOREF1(dp);
 
 	(void) fprintf(fp, "%-4s DIF_SUBR(%u), %%r%u\t\t! %s",
 	    name, subr, DIF_INSTR_RD(in), dtrace_subrstr(NULL, subr));
@@ -214,6 +224,7 @@ dt_dis_pushts(const dtrace_difo_t *dp,
 {
 	static const char *const tnames[] = { "D type", "string" };
 	uint_t type = DIF_INSTR_TYPE(in);
+	RT_NOREF1(dp);
 
 	(void) fprintf(fp, "%-4s DT_TYPE(%u), %%r%u, %%r%u",
 	    name, type, DIF_INSTR_R2(in), DIF_INSTR_RS(in));
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_dof.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_dof.c
index 8356f44..bca5508 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_dof.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_dof.c
@@ -406,6 +406,7 @@ dof_add_probe(dt_idhash_t *dhp, dt_ident_t *idp, void *data)
 
 	char buf[DT_TYPE_NAMELEN];
 	uint_t i;
+	RT_NOREF1(dhp);
 
 	dofpr.dofpr_addr = 0;
 	dofpr.dofpr_name = dof_add_string(ddo, prp->pr_name);
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_error.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_error.c
index 9dd2ba7..ffcf4fc 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_error.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_error.c
@@ -208,6 +208,7 @@ dtrace_faultstr(dtrace_hdl_t *dtp, int fault)
 		{ DTRACEFLT_LIBRARY,	"library-level fault" },
 		{ 0,			NULL }
 	};
+	RT_NOREF1(dtp);
 
 	for (i = 0; faults[i].str != NULL; i++) {
 		if (faults[i].code == fault)
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_grammar.y b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_grammar.y
index dc3ace3..e83bb53 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_grammar.y
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_grammar.y
@@ -26,6 +26,10 @@
 
 #ifndef VBOX
 #pragma ident	"%Z%%M%	%I%	%E% SMI"
+#else
+# ifdef _MSC_VER
+#  pragma warning(disable:4255 4702)
+# endif
 #endif
 
 #include <dt_impl.h>
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_ident.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_ident.c
index dfb873e..143043a 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_ident.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_ident.c
@@ -470,6 +470,7 @@ dt_idcook_regs(dt_node_t *dnp, dt_ident_t *idp, int argc, dt_node_t *ap)
 static void
 dt_idcook_type(dt_node_t *dnp, dt_ident_t *idp, int argc, dt_node_t *args)
 {
+	RT_NOREF2(argc, args);
 	if (idp->di_type == CTF_ERR) {
 		dtrace_hdl_t *dtp = yypcb->pcb_hdl;
 		dtrace_typeinfo_t dtt;
@@ -492,6 +493,7 @@ dt_idcook_type(dt_node_t *dnp, dt_ident_t *idp, int argc, dt_node_t *args)
 static void
 dt_idcook_thaw(dt_node_t *dnp, dt_ident_t *idp, int argc, dt_node_t *args)
 {
+	RT_NOREF2(argc, args);
 	if (idp->di_ctfp != NULL && idp->di_type != CTF_ERR)
 		dt_node_type_assign(dnp, idp->di_ctfp, idp->di_type);
 }
@@ -544,6 +546,7 @@ dt_iddtor_inline(dt_ident_t *idp)
 static void
 dt_iddtor_none(dt_ident_t *idp)
 {
+	RT_NOREF1(idp);
 	/* do nothing */
 }
 
@@ -564,6 +567,7 @@ dt_idsize_type(dt_ident_t *idp)
 static size_t
 dt_idsize_none(dt_ident_t *idp)
 {
+	RT_NOREF1(idp);
 	return (0);
 }
 
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_lex.l b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_lex.l
index 2b42a9a..dab95da 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_lex.l
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_lex.l
@@ -43,6 +43,14 @@
 #  undef UINT32_MAX
 #  undef UINT64_MAX
 # endif
+# ifdef _MSC_VER
+#  pragma warning(disable:4668 4131 4255)
+# endif
+# ifdef __GNUC__
+#  if ((__GNUC__ << 16) + __GNUC_MINOR__) >= 0x4002
+#   pragma GCC diagnostic ignored "-Wunused-function"
+#  endif
+# endif
 # include <iprt/ctype.h>
 # define isdigit(a_ch) RT_C_IS_DIGIT(a_ch)
 #endif /* VBOX */
@@ -305,7 +313,11 @@ if (yypcb->pcb_token != 0) {
 				errno = 0;
 				yylval.l_int = strtoull(v, &p, 0);
 #else
-				rc = RTStrToUInt64Ex(v, &p, 0, &yylval.l_int);
+ 				{
+                                   uint64_t uTmp = 0;
+				    rc = RTStrToUInt64Ex(v, &p, 0, &uTmp);
+				    yylval.l_int = uTmp;
+ 				}
 #endif
 				(void) strncpy(yyintsuffix, p,
 				    sizeof (yyintsuffix));
@@ -394,7 +406,9 @@ if (yypcb->pcb_token != 0) {
 			errno = 0;
 			yylval.l_int = strtoull(yytext, &p, 0);
 #else
-			int rc = RTStrToUInt64Ex(yytext, &p, 0, &yylval.l_int);
+			uint64_t uTmp = 0;
+			int rc = RTStrToUInt64Ex(yytext, &p, 0, &uTmp);
+			yylval.l_int = uTmp;
 #endif
 			yyintprefix = 0;
 			(void) strncpy(yyintsuffix, p, sizeof (yyintsuffix));
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_module.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_module.c
index 7ff5a51..88da272 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_module.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_module.c
@@ -484,6 +484,7 @@ dt_module_lookup_by_name(dtrace_hdl_t *dtp, const char *name)
 dt_module_t *
 dt_module_lookup_by_ctf(dtrace_hdl_t *dtp, ctf_file_t *ctfp)
 {
+	RT_NOREF1(dtp);
 	return (ctfp ? ctf_getspecific(ctfp) : NULL);
 }
 
@@ -524,7 +525,9 @@ dt_module_load_sect(dtrace_hdl_t *dtp, dt_module_t *dmp, ctf_sect_t *ctsp)
 	dt_dprintf("loaded %s [%s] (%lu bytes)\n",
 	    dmp->dm_name, ctsp->cts_name, (ulong_t)ctsp->cts_size);
 
-#endif /* !VBOX */
+#else  /* VBOX */
+	RT_NOREF3(dtp, dmp, ctsp);
+#endif /* VBOX */
 	return (0);
 }
 
@@ -641,7 +644,7 @@ dt_module_getctf(dtrace_hdl_t *dtp, dt_module_t *dmp)
 	 * returned to the compiler.  If we support mixed data models in the
 	 * future for combined kernel/user tracing, this can be removed.
 	 */
-	if (dtp->dt_conf.dtc_ctfmodel != model) {
+	if (dtp->dt_conf.dtc_ctfmodel != (uint_t)model) {
 		(void) dt_set_errno(dtp, EDT_DATAMODEL);
 		return (NULL);
 	}
@@ -692,6 +695,7 @@ err:
 void
 dt_module_unload(dtrace_hdl_t *dtp, dt_module_t *dmp)
 {
+	RT_NOREF1(dtp);
 	ctf_close(dmp->dm_ctfp);
 	dmp->dm_ctfp = NULL;
 
@@ -825,6 +829,7 @@ dt_module_modelname(dt_module_t *dmp)
 		return ("32-bit");
 }
 
+#ifndef VBOX
 /*
  * Update our module cache by adding an entry for the specified module 'name'.
  * We create the dt_module_t and populate it using /system/object/<name>/.
@@ -832,7 +837,6 @@ dt_module_modelname(dt_module_t *dmp)
 static void
 dt_module_update(dtrace_hdl_t *dtp, const char *name)
 {
-#ifndef VBOX
 	char fname[MAXPATHLEN];
 	struct stat64 st;
 	int fd, err, bits;
@@ -924,8 +928,8 @@ dt_module_update(dtrace_hdl_t *dtp, const char *name)
 
 	dt_dprintf("opened %d-bit module %s (%s) [%d]\n",
 	    bits, dmp->dm_name, dmp->dm_file, dmp->dm_modid);
-#endif /* !VBOX */
 }
+#endif /* !VBOX */
 
 /*
  * Unload all the loaded modules and then refresh the module cache with the
@@ -1006,17 +1010,17 @@ dt_module_from_object(dtrace_hdl_t *dtp, const char *object)
 	int err = EDT_NOMOD;
 	dt_module_t *dmp;
 
-	switch ((uintptr_t)object) {
-	case (uintptr_t)DTRACE_OBJ_EXEC:
+	switch ((intptr_t)object) {
+	case DTRACE_OBJ_INT_EXEC:
 		dmp = dtp->dt_exec;
 		break;
-	case (uintptr_t)DTRACE_OBJ_RTLD:
+	case DTRACE_OBJ_INT_RTLD:
 		dmp = dtp->dt_rtld;
 		break;
-	case (uintptr_t)DTRACE_OBJ_CDEFS:
+	case DTRACE_OBJ_INT_CDEFS:
 		dmp = dtp->dt_cdefs;
 		break;
-	case (uintptr_t)DTRACE_OBJ_DDEFS:
+	case DTRACE_OBJ_INT_DDEFS:
 		dmp = dtp->dt_ddefs;
 		break;
 	default:
@@ -1121,7 +1125,7 @@ dtrace_lookup_by_addr(dtrace_hdl_t *dtp, GElf_Addr addr,
     GElf_Sym *symp, dtrace_syminfo_t *sip)
 {
 	dt_module_t *dmp;
-	uint_t id;
+	uint_t id VBDTMSC(0);
 	const dtrace_vector_t *v = dtp->dt_vector;
 
 	if (v != NULL)
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_open.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_open.c
index 1063326..88db7a9 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_open.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_open.c
@@ -795,10 +795,10 @@ dt_provmod_destroy(dt_provmod_t **provmod)
 	*provmod = NULL;
 }
 
+#ifndef VBOX
 static const char *
 dt_get_sysinfo(int cmd, char *buf, size_t len)
 {
-#ifndef VBOX
 	ssize_t rv = sysinfo(cmd, buf, len);
 	char *p = buf;
 
@@ -807,11 +807,9 @@ dt_get_sysinfo(int cmd, char *buf, size_t len)
 
 	while ((p = strchr(p, '.')) != NULL)
 		*p++ = '_';
-#else
-	snprintf(buf, len, "%s", "Unknown");
-#endif
 	return (buf);
 }
+#endif /* !VBOX */
 
 static dtrace_hdl_t *
 dt_vopen(int version, int flags, int *errp,
@@ -1046,7 +1044,7 @@ alloc:
 		return (set_open_errno(dtp, errp, EDT_NOMEM));
 
 	for (i = 0; i < DTRACEOPT_MAX; i++)
-		dtp->dt_options[i] = DTRACEOPT_UNSET;
+		dtp->dt_options[i] = (uint64_t)DTRACEOPT_UNSET;
 
 	dtp->dt_cpp_argv[0] = (char *)strbasename(dtp->dt_cpp_path);
 
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_options.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_options.c
index 46ac208..7531e92 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_options.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_options.c
@@ -79,6 +79,7 @@ dt_opt_amin(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 {
 	char str[DTRACE_ATTR2STR_MAX];
 	dtrace_attribute_t attr;
+	RT_NOREF1(option);
 
 	if (arg == NULL || dtrace_str2attr(arg, &attr) == -1)
 		return (dt_set_errno(dtp, EDT_BADOPTVAL));
@@ -107,7 +108,8 @@ dt_coredump(void)
 	struct rlimit lim;
 #endif
 
-	(void) write(STDERR_FILENO, msg, sizeof (msg) - 1);
+	int res = write(STDERR_FILENO, msg, sizeof (msg) - 1);
+	NOREF(res);
 
 #ifndef _MSC_VER
 	act.sa_handler = SIG_DFL;
@@ -129,6 +131,7 @@ static int
 dt_opt_core(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 {
 	static int enabled = 0;
+	RT_NOREF1(option);
 
 	if (arg != NULL)
 		return (dt_set_errno(dtp, EDT_BADOPTVAL));
@@ -143,6 +146,8 @@ dt_opt_core(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 static int
 dt_opt_cpp_hdrs(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 {
+	RT_NOREF1(option);
+
 	if (arg != NULL)
 		return (dt_set_errno(dtp, EDT_BADOPTVAL));
 
@@ -160,6 +165,7 @@ static int
 dt_opt_cpp_path(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 {
 	char *cpp;
+	RT_NOREF1(option);
 
 	if (arg == NULL)
 		return (dt_set_errno(dtp, EDT_BADOPTVAL));
@@ -207,6 +213,7 @@ static int
 dt_opt_ctypes(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 {
 	int fd;
+	RT_NOREF1(option);
 
 	if (arg == NULL)
 		return (dt_set_errno(dtp, EDT_BADOPTVAL));
@@ -223,6 +230,8 @@ dt_opt_ctypes(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 static int
 dt_opt_droptags(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 {
+	RT_NOREF2(option, arg);
+
 	dtp->dt_droptags = 1;
 	return (0);
 }
@@ -232,6 +241,7 @@ static int
 dt_opt_dtypes(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 {
 	int fd;
+	RT_NOREF1(option);
 
 	if (arg == NULL)
 		return (dt_set_errno(dtp, EDT_BADOPTVAL));
@@ -248,6 +258,8 @@ dt_opt_dtypes(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 static int
 dt_opt_debug(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 {
+	RT_NOREF1(option);
+
 	if (arg != NULL)
 		return (dt_set_errno(dtp, EDT_BADOPTVAL));
 
@@ -260,6 +272,7 @@ static int
 dt_opt_iregs(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 {
 	int n;
+	RT_NOREF2(arg, option);
 
 	if (arg == NULL || (n = atoi(arg)) <= 0)
 		return (dt_set_errno(dtp, EDT_BADOPTVAL));
@@ -272,6 +285,7 @@ dt_opt_iregs(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 static int
 dt_opt_lazyload(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 {
+	RT_NOREF2(arg, option);
 	dtp->dt_lazyload = 1;
 
 	return (0);
@@ -282,6 +296,7 @@ static int
 dt_opt_ld_path(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 {
 	char *ld;
+	RT_NOREF1(option);
 
 	if (arg == NULL)
 		return (dt_set_errno(dtp, EDT_BADOPTVAL));
@@ -303,6 +318,7 @@ static int
 dt_opt_libdir(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 {
 	dt_dirpath_t *dp;
+	RT_NOREF1(option);
 
 	if (arg == NULL)
 		return (dt_set_errno(dtp, EDT_BADOPTVAL));
@@ -321,6 +337,8 @@ dt_opt_libdir(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 static int
 dt_opt_linkmode(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 {
+	RT_NOREF1(option);
+
 	if (arg == NULL)
 		return (dt_set_errno(dtp, EDT_BADOPTVAL));
 
@@ -342,6 +360,8 @@ dt_opt_linkmode(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 static int
 dt_opt_linktype(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 {
+	RT_NOREF1(option);
+
 	if (arg == NULL)
 		return (dt_set_errno(dtp, EDT_BADOPTVAL));
 
@@ -359,6 +379,8 @@ dt_opt_linktype(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 static int
 dt_opt_evaltime(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 {
+	RT_NOREF1(option);
+
 	if (arg == NULL)
 		return (dt_set_errno(dtp, EDT_BADOPTVAL));
 
@@ -381,6 +403,7 @@ static int
 dt_opt_pgmax(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 {
 	int n;
+	RT_NOREF1(option);
 
 	if (arg == NULL || (n = atoi(arg)) < 0)
 		return (dt_set_errno(dtp, EDT_BADOPTVAL));
@@ -393,6 +416,8 @@ dt_opt_pgmax(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 static int
 dt_opt_stdc(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 {
+	RT_NOREF1(option);
+
 	if (arg == NULL)
 		return (dt_set_errno(dtp, EDT_BADOPTVAL));
 
@@ -419,6 +444,7 @@ dt_opt_syslibdir(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 {
 	dt_dirpath_t *dp = dt_list_next(&dtp->dt_lib_path);
 	char *path;
+	RT_NOREF1(option);
 
 	if (arg == NULL)
 		return (dt_set_errno(dtp, EDT_BADOPTVAL));
@@ -438,6 +464,7 @@ static int
 dt_opt_tree(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 {
 	int m;
+	RT_NOREF1(option);
 
 	if (arg == NULL || (m = atoi(arg)) <= 0)
 		return (dt_set_errno(dtp, EDT_BADOPTVAL));
@@ -451,6 +478,7 @@ static int
 dt_opt_tregs(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 {
 	int n;
+	RT_NOREF1(option);
 
 	if (arg == NULL || (n = atoi(arg)) <= 0)
 		return (dt_set_errno(dtp, EDT_BADOPTVAL));
@@ -463,6 +491,8 @@ dt_opt_tregs(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 static int
 dt_opt_xlate(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 {
+	RT_NOREF1(option);
+
 	if (arg == NULL)
 		return (dt_set_errno(dtp, EDT_BADOPTVAL));
 
@@ -520,6 +550,7 @@ static int
 dt_opt_version(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 {
 	dt_version_t v;
+	RT_NOREF1(option);
 
 	if (arg == NULL)
 		return (dt_set_errno(dtp, EDT_BADOPTVAL));
@@ -713,7 +744,7 @@ dt_opt_rate(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 			}
 		}
 
-		if (suffix[i].name == NULL && *end != '\0' || val < 0)
+		if ((suffix[i].name == NULL && *end != '\0') || val < 0)
 			return (dt_set_errno(dtp, EDT_BADOPTVAL));
 
 		if (mul == 0) {
@@ -787,6 +818,7 @@ dt_opt_bufpolicy(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 {
 	dtrace_optval_t policy = DTRACEOPT_UNSET;
 	int i;
+	RT_NOREF1(option);
 
 	if (arg == NULL)
 		return (dt_set_errno(dtp, EDT_BADOPTVAL));
@@ -821,6 +853,7 @@ dt_opt_bufresize(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 {
 	dtrace_optval_t policy = DTRACEOPT_UNSET;
 	int i;
+	RT_NOREF1(option);
 
 	if (arg == NULL)
 		return (dt_set_errno(dtp, EDT_BADOPTVAL));
@@ -844,7 +877,7 @@ int
 dt_options_load(dtrace_hdl_t *dtp)
 {
 	dof_hdr_t hdr, *dof;
-	dof_sec_t *sec;
+	dof_sec_t *sec VBDTMSC(NULL);
 	size_t offs;
 	VBDTTYPE(uint32_t,int) i;
 
@@ -866,7 +899,7 @@ dt_options_load(dtrace_hdl_t *dtp)
 	dof->dofh_loadsz = hdr.dofh_loadsz;
 
 	for (i = 0; i < DTRACEOPT_MAX; i++)
-		dtp->dt_options[i] = DTRACEOPT_UNSET;
+		dtp->dt_options[i] = (uint64_t)DTRACEOPT_UNSET;
 
 	if (dt_ioctl(dtp, DTRACEIOC_DOFGET, dof) == -1)
 		return (dt_set_errno(dtp, errno));
@@ -903,6 +936,7 @@ dt_opt_preallocate(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 {
 	dtrace_optval_t size;
 	void *p;
+	RT_NOREF1(option);
 
 	if (arg == NULL || dt_optval_parse(arg, &size) != 0)
 		return (dt_set_errno(dtp, EDT_BADOPTVAL));
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_parser.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_parser.c
index fe857b4..efb48b2 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_parser.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_parser.c
@@ -1010,7 +1010,7 @@ dt_node_is_ptrcompat(const dt_node_t *lp, const dt_node_t *rp,
 	ctf_id_t lref = CTF_ERR, rref = CTF_ERR;
 
 	int lp_is_void, rp_is_void, lp_is_int, rp_is_int, compat;
-	uint_t lkind, rkind;
+	uint_t lkind VBDTMSC(0), rkind VBDTMSC(0);
 	ctf_encoding_t e;
 	ctf_arinfo_t r;
 
@@ -1239,7 +1239,9 @@ dt_node_int(uintmax_t value)
 	xyerror(D_INT_OFLOW, "integer constant 0x%llx cannot be represented "
 	    "in any built-in integral type\n", (u_longlong_t)value);
 	/*NOTREACHED*/
+#ifndef _MSC_VER
 	return (NULL);		/* keep gcc happy */
+#endif
 }
 
 dt_node_t *
@@ -2359,7 +2361,7 @@ dt_node_inline(dt_node_t *expr)
 dt_node_t *
 dt_node_member(dt_decl_t *ddp, char *name, dt_node_t *expr)
 {
-	dtrace_typeinfo_t dtt;
+	dtrace_typeinfo_t dtt VBDTMSC({NULL});
 	dt_node_t *dnp;
 	int err;
 
@@ -2841,6 +2843,8 @@ dt_cook_var(dt_node_t *dnp, uint_t idflags)
 static dt_node_t *
 dt_cook_func(dt_node_t *dnp, uint_t idflags)
 {
+	RT_NOREF1(idflags);
+
 	dt_node_attr_assign(dnp,
 	    dt_ident_cook(dnp, dnp->dn_ident, &dnp->dn_args));
 
@@ -3939,6 +3943,7 @@ dt_cook_op3(dt_node_t *dnp, uint_t idflags)
 	dt_node_t *lp, *rp;
 	ctf_file_t *ctfp;
 	ctf_id_t type;
+	RT_NOREF1(idflags);
 
 	dnp->dn_expr = dt_node_cook(dnp->dn_expr, DT_IDFLG_REF);
 	lp = dnp->dn_left = dt_node_cook(dnp->dn_left, DT_IDFLG_REF);
@@ -4006,6 +4011,7 @@ static dt_node_t *
 dt_cook_aggregation(dt_node_t *dnp, uint_t idflags)
 {
 	dtrace_hdl_t *dtp = yypcb->pcb_hdl;
+	RT_NOREF1(idflags);
 
 	if (dnp->dn_aggfun != NULL) {
 		dnp->dn_aggfun = dt_node_cook(dnp->dn_aggfun, DT_IDFLG_REF);
@@ -4132,6 +4138,7 @@ dt_cook_inline(dt_node_t *dnp, uint_t idflags)
 
 	char n1[DT_TYPE_NAMELEN];
 	char n2[DT_TYPE_NAMELEN];
+	RT_NOREF1(idflags);
 
 	assert(dnp->dn_ident->di_flags & DT_IDFLG_INLINE);
 	assert(inp->din_root->dn_flags & DT_NF_COOKED);
@@ -4196,6 +4203,7 @@ dt_cook_xlator(dt_node_t *dnp, uint_t idflags)
 
 	dtrace_attribute_t attr = _dtrace_maxattr;
 	ctf_membinfo_t ctm;
+	RT_NOREF1(idflags);
 
 	/*
 	 * Before cooking each translator member, we push a reference to the
@@ -4353,6 +4361,7 @@ dt_cook_provider(dt_node_t *dnp, uint_t idflags)
 {
 	dt_provider_t *pvp = dnp->dn_provider;
 	dt_node_t *pnp;
+	RT_NOREF1(idflags);
 
 	/*
 	 * If we're declaring a provider for the first time and it is unknown
@@ -4391,6 +4400,7 @@ dt_cook_provider(dt_node_t *dnp, uint_t idflags)
 static dt_node_t *
 dt_cook_none(dt_node_t *dnp, uint_t idflags)
 {
+	RT_NOREF1(idflags);
 	return (dnp);
 }
 
@@ -4766,7 +4776,7 @@ dt_node_root(dt_node_t *dnp)
 }
 
 /*PRINTFLIKE3*/
-void
+DECL_NO_RETURN(void)
 dnerror(const dt_node_t *dnp, dt_errtag_t tag, const char *format, ...)
 {
 	int oldlineno = yylineno;
@@ -4799,7 +4809,7 @@ dnwarn(const dt_node_t *dnp, dt_errtag_t tag, const char *format, ...)
 }
 
 /*PRINTFLIKE2*/
-void
+DECL_NO_RETURN(void)
 xyerror(dt_errtag_t tag, const char *format, ...)
 {
 	va_list ap;
@@ -4833,7 +4843,7 @@ xyvwarn(dt_errtag_t tag, const char *format, va_list ap)
 }
 
 /*PRINTFLIKE1*/
-void
+DECL_NO_RETURN(void)
 yyerror(const char *format, ...)
 {
 	va_list ap;
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_parser.h b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_parser.h
index 54659de..cad26da 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_parser.h
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_parser.h
@@ -265,14 +265,14 @@ typedef enum {
 	YYS_CONTROL	/* lex/yacc state for parsing control lines */
 } yystate_t;
 
-extern void dnerror(const dt_node_t *, dt_errtag_t, const char *, ...);
+extern DECL_NO_RETURN(void) dnerror(const dt_node_t *, dt_errtag_t, const char *, ...);
 extern void dnwarn(const dt_node_t *, dt_errtag_t, const char *, ...);
 
-extern void xyerror(dt_errtag_t, const char *, ...);
+extern DECL_NO_RETURN(void) xyerror(dt_errtag_t, const char *, ...);
 extern void xywarn(dt_errtag_t, const char *, ...);
 extern void xyvwarn(dt_errtag_t, const char *, va_list);
 
-extern void yyerror(const char *, ...);
+extern DECL_NO_RETURN(void) yyerror(const char *, ...);
 extern void yywarn(const char *, ...);
 extern void yyvwarn(const char *, va_list);
 
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_pragma.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_pragma.c
index 5fa396a..b84165a 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_pragma.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_pragma.c
@@ -47,6 +47,7 @@ dt_pragma_apply(dt_idhash_t *dhp, dt_ident_t *idp)
 {
 	dt_idhash_t *php;
 	dt_ident_t *pdp;
+	RT_NOREF1(dhp);
 
 	if ((php = yypcb->pcb_pragmas) == NULL)
 		return; /* no pragmas pending for current compilation pass */
@@ -74,7 +75,7 @@ static void
 dt_pragma_attributes(const char *prname, dt_node_t *dnp)
 {
 	dtrace_hdl_t *dtp = yypcb->pcb_hdl;
-	dtrace_attribute_t attr, *a;
+	dtrace_attribute_t attr, *a VBDTMSC(NULL);
 	dt_provider_t *pvp;
 	const char *name, *part;
 	dt_ident_t *idp;
@@ -208,7 +209,7 @@ dt_pragma_depends(const char *prname, dt_node_t *cnp)
 {
 	dtrace_hdl_t *dtp = yypcb->pcb_hdl;
 	dt_node_t *nnp = cnp ? cnp->dn_list : NULL;
-	int found;
+	int found VBDTMSC(B_FALSE);
 	dt_lib_depend_t *dld;
 	char lib[MAXPATHLEN];
 
@@ -318,6 +319,7 @@ static void
 dt_pragma_ident(const char *prname, dt_node_t *dnp)
 {
 	/* ignore any #ident or #pragma ident lines */
+	RT_NOREF2(prname, dnp);
 }
 
 static void
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_printf.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_printf.c
index 3a8ec1f..906ec9b 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_printf.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_printf.c
@@ -57,6 +57,7 @@ static const char g_aszDay[7][4] =
 static int
 pfcheck_addr(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp)
 {
+	RT_NOREF2(pfv, pfd);
 	return (dt_node_is_pointer(dnp) || dt_node_is_integer(dnp));
 }
 
@@ -64,6 +65,7 @@ pfcheck_addr(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp)
 static int
 pfcheck_kaddr(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp)
 {
+	RT_NOREF2(pfv, pfd);
 	return (dt_node_is_pointer(dnp) || dt_node_is_integer(dnp) ||
 	    dt_node_is_symaddr(dnp));
 }
@@ -74,6 +76,7 @@ pfcheck_uaddr(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp)
 {
 	dtrace_hdl_t *dtp = pfv->pfv_dtp;
 	dt_ident_t *idp = dt_idhash_lookup(dtp->dt_macros, "target");
+	RT_NOREF1(pfd);
 
 	if (dt_node_is_usymaddr(dnp))
 		return (1);
@@ -88,6 +91,7 @@ pfcheck_uaddr(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp)
 static int
 pfcheck_stack(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp)
 {
+	RT_NOREF2(pfv, pfd);
 	return (dt_node_is_stack(dnp));
 }
 
@@ -95,6 +99,7 @@ pfcheck_stack(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp)
 static int
 pfcheck_time(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp)
 {
+	RT_NOREF2(pfv, pfd);
 	return (dt_node_is_integer(dnp) &&
 	    dt_node_type_size(dnp) == sizeof (uint64_t));
 }
@@ -108,6 +113,7 @@ pfcheck_str(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp)
 	ctf_arinfo_t r;
 	ctf_id_t base;
 	uint_t kind;
+	RT_NOREF2(pfv, pfd);
 
 	if (dt_node_is_string(dnp))
 		return (1);
@@ -131,6 +137,7 @@ pfcheck_wstr(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp)
 
 	ctf_encoding_t e;
 	ctf_arinfo_t r;
+	RT_NOREF2(pfv, pfd);
 
 	return (kind == CTF_K_ARRAY && ctf_array_info(ctfp, base, &r) == 0 &&
 	    (base = ctf_type_resolve(ctfp, r.ctr_contents)) != CTF_ERR &&
@@ -142,6 +149,7 @@ pfcheck_wstr(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp)
 static int
 pfcheck_csi(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp)
 {
+	RT_NOREF2(pfv, pfd);
 	return (dt_node_is_integer(dnp) &&
 	    dt_node_type_size(dnp) <= sizeof (int));
 }
@@ -150,6 +158,7 @@ pfcheck_csi(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp)
 static int
 pfcheck_fp(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp)
 {
+	RT_NOREF2(pfv, pfd);
 	return (dt_node_is_float(dnp));
 }
 
@@ -157,6 +166,7 @@ pfcheck_fp(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp)
 static int
 pfcheck_xint(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp)
 {
+	RT_NOREF2(pfv, pfd);
 	return (dt_node_is_integer(dnp));
 }
 
@@ -164,6 +174,7 @@ pfcheck_xint(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp)
 static int
 pfcheck_dint(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp)
 {
+	RT_NOREF2(pfv, pfd);
 	if (dnp->dn_flags & DT_NF_SIGNED)
 		pfd->pfd_flags |= DT_PFCONV_SIGNED;
 	else
@@ -179,6 +190,7 @@ pfcheck_xshort(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp)
 	ctf_file_t *ctfp = dnp->dn_ctfp;
 	ctf_id_t type = ctf_type_resolve(ctfp, dnp->dn_type);
 	char n[DT_TYPE_NAMELEN];
+	RT_NOREF2(pfv, pfd);
 
 	return (ctf_type_name(ctfp, type, n, sizeof (n)) != NULL && (
 	    strcmp(n, "short") == 0 || strcmp(n, "signed short") == 0 ||
@@ -192,6 +204,7 @@ pfcheck_xlong(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp)
 	ctf_file_t *ctfp = dnp->dn_ctfp;
 	ctf_id_t type = ctf_type_resolve(ctfp, dnp->dn_type);
 	char n[DT_TYPE_NAMELEN];
+	RT_NOREF2(pfv, pfd);
 
 	return (ctf_type_name(ctfp, type, n, sizeof (n)) != NULL && (
 	    strcmp(n, "long") == 0 || strcmp(n, "signed long") == 0 ||
@@ -205,6 +218,7 @@ pfcheck_xlonglong(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp)
 	ctf_file_t *ctfp = dnp->dn_ctfp;
 	ctf_id_t type = dnp->dn_type;
 	char n[DT_TYPE_NAMELEN];
+	RT_NOREF2(pfv, pfd);
 
 	if (ctf_type_name(ctfp, ctf_type_resolve(ctfp, type), n,
 	    sizeof (n)) != NULL && (strcmp(n, "long long") == 0 ||
@@ -233,6 +247,7 @@ pfcheck_xlonglong(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp)
 static int
 pfcheck_type(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp)
 {
+	RT_NOREF1(pfv);
 	return (ctf_type_compat(dnp->dn_ctfp, ctf_type_resolve(dnp->dn_ctfp,
 	    dnp->dn_type), pfd->pfd_conv->pfc_dctfp, pfd->pfd_conv->pfc_dtype));
 }
@@ -244,6 +259,7 @@ pfprint_sint(dtrace_hdl_t *dtp, FILE *fp, const char *format,
 {
 	int64_t normal = (int64_t)unormal;
 	int32_t n = (int32_t)normal;
+	RT_NOREF1(pfd);
 
 	switch (size) {
 	case sizeof (int8_t):
@@ -269,6 +285,7 @@ pfprint_uint(dtrace_hdl_t *dtp, FILE *fp, const char *format,
     const dt_pfargd_t *pfd, const void *addr, size_t size, uint64_t normal)
 {
 	uint32_t n = (uint32_t)normal;
+	RT_NOREF1(pfd);
 
 	switch (size) {
 	case sizeof (uint8_t):
@@ -304,7 +321,10 @@ pfprint_fp(dtrace_hdl_t *dtp, FILE *fp, const char *format,
     const dt_pfargd_t *pfd, const void *addr, size_t size, uint64_t normal)
 {
 	double n = (double)normal;
+#ifndef _MSC_VER
 	long double ldn = (long double)normal;
+#endif
+	RT_NOREF1(pfd);
 
 	switch (size) {
 	case sizeof (float):
@@ -331,6 +351,7 @@ pfprint_addr(dtrace_hdl_t *dtp, FILE *fp, const char *format,
 	char *s;
 	int n, len = 256;
 	uint64_t val;
+	RT_NOREF2(pfd, normal);
 
 	switch (size) {
 	case sizeof (uint32_t):
@@ -356,6 +377,7 @@ static int
 pfprint_mod(dtrace_hdl_t *dtp, FILE *fp, const char *format,
     const dt_pfargd_t *pfd, const void *addr, size_t size, uint64_t normal)
 {
+	RT_NOREF3(pfd, size, normal);
 	return (dt_print_mod(dtp, fp, format, (caddr_t)addr));
 }
 
@@ -364,6 +386,7 @@ static int
 pfprint_umod(dtrace_hdl_t *dtp, FILE *fp, const char *format,
     const dt_pfargd_t *pfd, const void *addr, size_t size, uint64_t normal)
 {
+	RT_NOREF3(pfd, size, normal);
 	return (dt_print_umod(dtp, fp, format, (caddr_t)addr));
 }
 
@@ -377,6 +400,7 @@ pfprint_uaddr(dtrace_hdl_t *dtp, FILE *fp, const char *format,
 	uint64_t val, pid = 0;
 
 	dt_ident_t *idp = dt_idhash_lookup(dtp->dt_macros, "target");
+	RT_NOREF2(pfd, normal);
 
 	switch (size) {
 	case sizeof (uint32_t):
@@ -414,6 +438,7 @@ pfprint_stack(dtrace_hdl_t *dtp, FILE *fp, const char *format,
 	const dtrace_recdesc_t *rec = pfd->pfd_rec;
 	caddr_t addr = (caddr_t)vaddr;
 	int err = 0;
+	RT_NOREF2(size, normal);
 
 	/*
 	 * We have stashed the value of the STACKINDENT option, and we will
@@ -490,6 +515,7 @@ pfprint_time(dtrace_hdl_t *dtp, FILE *fp, const char *format,
 	RTTIMESPEC 	TimeSpec;
 	RTTIME 		Time;
 	char 		buf[32];
+	RT_NOREF3(pfd, size, normal);
 
 	RTTimeLocalExplode(&Time, RTTimeSpecSetNano(&TimeSpec, *(uint64_t *)addr));
 	RTStrPrintf(buf, sizeof(buf), "%u %s %2u %02u:%02u:%02u",
@@ -521,6 +547,7 @@ pfprint_time822(dtrace_hdl_t *dtp, FILE *fp, const char *format,
 	RTTIMESPEC 	TimeSpec;
 	RTTIME 		Time;
 	char 		buf[64];
+	RT_NOREF3(pfd, size, normal);
 
 	RTTimeLocalExplode(&Time, RTTimeSpecSetNano(&TimeSpec, *(uint64_t *)addr));
 	RTStrPrintf(buf, sizeof(buf), "%s, %u %s %02u:%02u:%02u %s%u%s",
@@ -549,6 +576,7 @@ pfprint_port(dtrace_hdl_t *dtp, FILE *fp, const char *format,
 #else
 	uint16_t uPortNet = *(uint16_t *)addr;
 	char buf[32];
+	RT_NOREF3(pfd, size, normal);
 
 	RTStrPrintf(buf, sizeof(buf), "%d", RT_N2H_U16(uPortNet));
 #endif
@@ -567,6 +595,7 @@ pfprint_inetaddr(dtrace_hdl_t *dtp, FILE *fp, const char *format,
 	char buf[1024];
 	int e;
 #endif
+	RT_NOREF2(pfd, normal);
 
 	bcopy(addr, s, size);
 	s[size] = '\0';
@@ -592,6 +621,7 @@ pfprint_cstr(dtrace_hdl_t *dtp, FILE *fp, const char *format,
     const dt_pfargd_t *pfd, const void *addr, size_t size, uint64_t normal)
 {
 	char *s = alloca(size + 1);
+	RT_NOREF2(pfd, normal);
 
 	bcopy(addr, s, size);
 	s[size] = '\0';
@@ -604,6 +634,7 @@ pfprint_wstr(dtrace_hdl_t *dtp, FILE *fp, const char *format,
     const dt_pfargd_t *pfd, const void *addr, size_t size, uint64_t normal)
 {
 	wchar_t *ws = alloca(size + sizeof (wchar_t));
+	RT_NOREF2(pfd, normal);
 
 	bcopy(addr, ws, size);
 	ws[size / sizeof (wchar_t)] = L'\0';
@@ -617,6 +648,7 @@ pfprint_estr(dtrace_hdl_t *dtp, FILE *fp, const char *format,
 {
 	char *s;
 	int n;
+	RT_NOREF2(pfd, normal);
 
 	if ((s = strchr2esc(addr, size)) == NULL)
 		return (dt_set_errno(dtp, EDT_NOMEM));
@@ -654,6 +686,7 @@ static int
 pfprint_pct(dtrace_hdl_t *dtp, FILE *fp, const char *format,
     const dt_pfargd_t *pfd, const void *addr, size_t size, uint64_t normal)
 {
+	RT_NOREF5(format, pfd, addr, size, normal);
 	return (dt_printf(dtp, fp, "%%"));
 }
 
@@ -1103,7 +1136,7 @@ dt_printf_validate(dt_pfargv_t *pfv, uint_t flags,
 		int dync = 0;
 
 		char vname[64];
-		dt_node_t *vnp;
+		dt_node_t *vnp VBDTMSC(NULL);
 
 		if (pfc == NULL)
 			continue; /* no checking if argd is just a prefix */
@@ -1311,6 +1344,7 @@ pfprint_average(dtrace_hdl_t *dtp, FILE *fp, const char *format,
     const dt_pfargd_t *pfd, const void *addr, size_t size, uint64_t normal)
 {
 	const uint64_t *data = addr;
+	RT_NOREF1(pfd);
 
 	if (size != sizeof (uint64_t) * 2)
 		return (dt_set_errno(dtp, EDT_DMISMATCH));
@@ -1325,6 +1359,7 @@ pfprint_stddev(dtrace_hdl_t *dtp, FILE *fp, const char *format,
     const dt_pfargd_t *pfd, const void *addr, size_t size, uint64_t normal)
 {
 	const uint64_t *data = addr;
+	RT_NOREF1(pfd);
 
 	if (size != sizeof (uint64_t) * 4)
 		return (dt_set_errno(dtp, EDT_DMISMATCH));
@@ -1338,6 +1373,7 @@ static int
 pfprint_quantize(dtrace_hdl_t *dtp, FILE *fp, const char *format,
     const dt_pfargd_t *pfd, const void *addr, size_t size, uint64_t normal)
 {
+	RT_NOREF2(pfd, format);
 	return (dt_print_quantize(dtp, fp, addr, size, normal));
 }
 
@@ -1346,6 +1382,7 @@ static int
 pfprint_lquantize(dtrace_hdl_t *dtp, FILE *fp, const char *format,
     const dt_pfargd_t *pfd, const void *addr, size_t size, uint64_t normal)
 {
+	RT_NOREF2(pfd, format);
 	return (dt_print_lquantize(dtp, fp, addr, size, normal));
 }
 
@@ -1356,11 +1393,11 @@ dt_printf_format(dtrace_hdl_t *dtp, FILE *fp, const dt_pfargv_t *pfv,
 {
 	dt_pfargd_t *pfd = pfv->pfv_argv;
 	const dtrace_recdesc_t *recp = recs;
-	const dtrace_aggdata_t *aggdata;
+	const dtrace_aggdata_t *aggdata VBDTMSC(NULL);
 	dtrace_aggdesc_t *agg;
 	caddr_t lim = (caddr_t)buf + len, limit;
 	char format[64] = "%";
-	int i, aggrec, curagg = -1;
+	int i, aggrec VBDTMSC(0), curagg = -1;
 	uint64_t normal;
 
 	/*
@@ -1396,7 +1433,7 @@ dt_printf_format(dtrace_hdl_t *dtp, FILE *fp, const dt_pfargv_t *pfv,
 		dt_pfprint_f *func;
 		caddr_t addr;
 		size_t size;
-		uint32_t flags;
+		uint32_t flags VBDTUNASS(0);
 
 		if (pfd->pfd_preflen != 0) {
 			char *tmp = alloca(pfd->pfd_preflen + 1);
@@ -1415,7 +1452,7 @@ dt_printf_format(dtrace_hdl_t *dtp, FILE *fp, const dt_pfargv_t *pfv,
 				 */
 				flags = DTRACE_BUFDATA_AGGFORMAT;
 
-				if (pfc == NULL && i == pfv->pfv_argc - 1)
+				if (pfc == NULL && VBDTCAST(uint_t)i == pfv->pfv_argc - 1)
 					flags |= DTRACE_BUFDATA_AGGLAST;
 
 				if (dt_buffered_flush(dtp, NULL, NULL,
@@ -1568,10 +1605,10 @@ dt_printf_format(dtrace_hdl_t *dtp, FILE *fp, const dt_pfargv_t *pfv,
 			width = 0;
 
 		if (width != 0)
-			f += snprintf(f, sizeof (format), "%d", ABS(width));
+			f += snprintf(f, sizeof (format) - (f - format), "%d", ABS(width));
 
 		if (prec > 0)
-			f += snprintf(f, sizeof (format), ".%d", prec);
+			f += snprintf(f, sizeof (format) - (f - format), ".%d", prec);
 
 		(void) strcpy(f, pfd->pfd_fmt);
 		pfd->pfd_rec = rec;
@@ -1585,7 +1622,7 @@ dt_printf_format(dtrace_hdl_t *dtp, FILE *fp, const dt_pfargv_t *pfv,
 			 * element, inidicating that this is the last record
 			 * as appropriate.
 			 */
-			if (i == pfv->pfv_argc - 1)
+			if (VBDTCAST(uint_t)i == pfv->pfv_argc - 1)
 				flags |= DTRACE_BUFDATA_AGGLAST;
 
 			if (dt_buffered_flush(dtp, NULL,
@@ -1633,6 +1670,7 @@ dtrace_system(dtrace_hdl_t *dtp, FILE *fp, void *fmtdata,
     uint_t nrecs, const void *buf, size_t len)
 {
 	int rval = dtrace_sprintf(dtp, fp, fmtdata, recp, nrecs, buf, len);
+	RT_NOREF1(data);
 
 	if (rval == -1)
 		return (rval);
@@ -1766,6 +1804,7 @@ dtrace_fprintf(dtrace_hdl_t *dtp, FILE *fp, void *fmtdata,
     const dtrace_probedata_t *data, const dtrace_recdesc_t *recp,
     uint_t nrecs, const void *buf, size_t len)
 {
+	RT_NOREF1(data);
 	return (dt_printf_format(dtp, fp, fmtdata,
 	    recp, nrecs, buf, len, NULL, 0));
 }
@@ -1840,6 +1879,7 @@ dtrace_printf_format(dtrace_hdl_t *dtp, void *fmtdata, char *s, size_t len)
 	uint_t i;
 	size_t j;
 #endif
+	RT_NOREF1(dtp);
 
 	for (i = 0; i < pfv->pfv_argc; i++, pfd = pfd->pfd_next) {
 		const dt_pfconv_t *pfc = pfd->pfd_conv;
@@ -1919,7 +1959,7 @@ dt_fprinta(const dtrace_aggdata_t *adp, void *arg)
 	int id;
 
 	if (dt_printf_getint(dtp, recp++, nrecs--,
-	    adp->dtada_data, adp->dtada_size, &id) != 0 || pfw->pfw_aid != id)
+	    adp->dtada_data, adp->dtada_size, &id) != 0 || pfw->pfw_aid != VBDTCAST(uint_t)id)
 		return (0); /* no aggregation id or id does not match */
 
 	if (dt_printf_format(dtp, pfw->pfw_fp, pfw->pfw_argv,
@@ -1971,6 +2011,7 @@ dtrace_fprinta(dtrace_hdl_t *dtp, FILE *fp, void *fmtdata,
 	dt_pfwalk_t pfw;
 	int i, naggvars = 0;
 	dtrace_aggvarid_t *aggvars;
+	RT_NOREF2(data, len);
 
 	aggvars = alloca(nrecs * sizeof (dtrace_aggvarid_t));
 
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_program.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_program.c
index 1f7b0ca..33e5a8e 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_program.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_program.c
@@ -90,6 +90,7 @@ dtrace_program_info(dtrace_hdl_t *dtp, dtrace_prog_t *pgp,
 	dt_stmt_t *stp;
 	dtrace_actdesc_t *ap;
 	dtrace_ecbdesc_t *last = NULL;
+	RT_NOREF1(dtp);
 
 	if (pip == NULL)
 		return;
@@ -408,6 +409,7 @@ dt_header_decl(dt_idhash_t *dhp, dt_ident_t *idp, void *data)
 	char *fname;
 	const char *p;
 	int i;
+	RT_NOREF1(dhp);
 
 	p = prp->pr_name;
 	for (i = 0; (p = strchr(p, '-')) != NULL; i++)
@@ -426,7 +428,7 @@ dt_header_decl(dt_idhash_t *dhp, dt_ident_t *idp, void *data)
 		    buf, sizeof (buf))) < 0)
 			return (dt_set_errno(dtp, errno));
 
-		if (i + 1 != prp->pr_nargc &&
+		if ((uint_t)i + 1 != prp->pr_nargc &&
 		    fprintf(infop->dthi_out, ", ") < 0)
 			return (dt_set_errno(dtp, errno));
 	}
@@ -459,6 +461,7 @@ dt_header_probe(dt_idhash_t *dhp, dt_ident_t *idp, void *data)
 	char *mname, *fname;
 	const char *p;
 	VBDTTYPE(uint_t,int) i;
+	RT_NOREF1(dhp);
 
 	p = prp->pr_name;
 	for (i = 0; (p = strchr(p, '-')) != NULL; i++)
@@ -584,7 +587,7 @@ int
 dtrace_program_header(dtrace_hdl_t *dtp, FILE *out, const char *fname)
 {
 	dt_provider_t *pvp;
-	char *mfname, *p;
+	char *mfname VBDTMSC(NULL), *p;
 
 	if (fname != NULL) {
 		if ((p = strrchr(fname, '/')) != NULL)
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_provider.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_provider.c
index 3a47ef5..a0c6bc0 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_provider.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_provider.c
@@ -154,7 +154,11 @@ dt_provider_xref(dtrace_hdl_t *dtp, dt_provider_t *pvp, id_t id)
 	size_t oldsize = BT_SIZEOFMAP(pvp->pv_xrmax);
 	size_t newsize = BT_SIZEOFMAP(dtp->dt_xlatorid);
 
+#ifdef VBOX /* range */
+	assert(id < dtp->dt_xlatorid);
+#else
 	assert(id >= 0 && id < dtp->dt_xlatorid);
+#endif
 
 	if (newsize > oldsize) {
 		ulong_t *xrefs = dt_zalloc(dtp, newsize);
@@ -648,6 +652,8 @@ dt_probe_tag(dt_probe_t *prp, uint_t argn, dt_node_t *dnp)
 static int
 dt_probe_desc(dtrace_hdl_t *dtp, const dtrace_probedesc_t *pdp, void *arg)
 {
+	RT_NOREF1(dtp);
+
 	if (((dtrace_probedesc_t *)arg)->dtpd_id == DTRACE_IDNONE) {
 		bcopy(pdp, arg, sizeof (dtrace_probedesc_t));
 		return (0);
@@ -806,6 +812,7 @@ static int
 dt_probe_iter(dt_idhash_t *ihp, dt_ident_t *idp, dt_probe_iter_t *pit)
 {
 	const dt_probe_t *prp = idp->di_data;
+	RT_NOREF1(ihp);
 
 	if (!dt_gmatch(prp->pr_name, pit->pit_pat))
 		return (0); /* continue on and examine next probe in hash */
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_regset.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_regset.c
index 35032d9..9ae66f9 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_regset.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_regset.c
@@ -106,7 +106,7 @@ dt_regset_alloc(dt_regset_t *drp)
 void
 dt_regset_free(dt_regset_t *drp, int reg)
 {
-	assert(reg > 0 && reg < drp->dr_size);
+	assert(reg > 0 && (unsigned /*vbox*/)reg < drp->dr_size);
 	assert(BT_TEST(drp->dr_bitmap, reg) != 0);
 	BT_CLEAR(drp->dr_bitmap, reg);
 }
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_subr.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_subr.c
index 2e29e09..830b9f8 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_subr.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_subr.c
@@ -495,6 +495,9 @@ dt_ioctl(dtrace_hdl_t *dtp, int val, void *arg)
 #ifndef VBOX
 	if (dtp->dt_fd >= 0)
 		return (ioctl(dtp->dt_fd, val, arg));
+
+	errno = EBADF;
+	return (-1);
 #else
 # if 1
 	rc = SUPR3TracerIoCtl(val, (uintptr_t)arg, &iRetVal);
@@ -548,11 +551,11 @@ dt_ioctl(dtrace_hdl_t *dtp, int val, void *arg)
 		}
 
 	}
-# endif
-#endif
 
 	errno = EBADF;
 	return (-1);
+# endif
+#endif
 }
 
 int
@@ -604,7 +607,7 @@ dt_write(dtrace_hdl_t *dtp, int fd, const void *buf, size_t n)
 		buf = (char *)buf + len;
 	}
 
-	if (resid == n && n != 0)
+	if ((size_t)resid == n && n != 0)
 		return (dt_set_errno(dtp, errno));
 
 	return (n - resid);
@@ -699,7 +702,7 @@ dt_printf(dtrace_hdl_t *dtp, FILE *fp, const char *format, ...)
 			assert(dtp->dt_buffered_offs < dtp->dt_buffered_size);
 			avail = dtp->dt_buffered_size - dtp->dt_buffered_offs;
 
-			if (needed + 1 < avail)
+			if ((size_t/*vbox*/)needed + 1 < avail)
 				break;
 
 			if ((newbuf = realloc(dtp->dt_buffered_buf,
@@ -796,6 +799,7 @@ dt_alloc(dtrace_hdl_t *dtp, size_t size)
 void
 dt_free(dtrace_hdl_t *dtp, void *data)
 {
+	RT_NOREF1(dtp);
 	assert(dtp != NULL); /* ensure sane use of this interface */
 	free(data);
 }
@@ -849,6 +853,26 @@ dt_basename(char *str)
 ulong_t
 dt_popc(ulong_t x)
 {
+#ifdef VBOX
+# if ARCH_BITS == 32
+    x = x - ((x >> 1) & UINT32_C(0x55555555));
+    x = (x & UINT32_C(0x33333333)) + ((x >> 2) & UINT32_C(0x33333333));
+    x = (x + (x >> 4)) & UINT32_C(0x0F0F0F0F);
+    x = x + (x >> 8);
+    x = x + (x >> 16);
+    return (x & 0x3F);
+# elif ARCH_BITS == 64
+    x = x - ((x >> 1) & UINT64_C(0x5555555555555555));
+    x = (x & UINT64_C(0x3333333333333333)) + ((x >> 2) & UINT64_C(0x3333333333333333));
+    x = (x + (x >> 4)) & UINT64_C(0x0F0F0F0F0F0F0F0F);
+    x = x + (x >> 8);
+    x = x + (x >> 16);
+    x = x + (x >> 32);
+    return (x & 0x7F);
+# else
+#  error "ARCH_BITS"
+# endif
+#else  /* !VBOX */
 #ifdef _ILP32
 	x = x - ((x >> 1) & 0x55555555UL);
 	x = (x & 0x33333333UL) + ((x >> 2) & 0x33333333UL);
@@ -866,6 +890,7 @@ dt_popc(ulong_t x)
 	x = x + (x >> 32);
 	return (x & 0x7F);
 #endif
+#endif /* !VBOX */
 }
 
 /*
@@ -995,6 +1020,7 @@ dtrace_uaddr2str(dtrace_hdl_t *dtp, pid_t pid,
 	dt_proc_release(dtp, P);
 #else
 	char c[32];
+	RT_NOREF2(dtp, pid);
 	RTStrPrintf(c, sizeof (c), "0x%llx", addr);
 #endif
 
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_work.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_work.c
index 3cbd60a..02a240a 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_work.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_work.c
@@ -35,8 +35,8 @@
 #include <time.h>
 #else  /* VBOX */
 # include <dt_impl.h>
-//# include <stddef.h>
-//# include <time.h>
+/*# include <stddef.h>
+# include <time.h> */
 # include <iprt/semaphore.h>
 #endif /* VBOX */
 
@@ -275,7 +275,7 @@ dtrace_work(dtrace_hdl_t *dtp, FILE *fp,
 {
 	int status = dtrace_status(dtp);
 	dtrace_optval_t policy = dtp->dt_options[DTRACEOPT_BUFPOLICY];
-	dtrace_workstatus_t rval;
+	dtrace_workstatus_t rval VBDTMSC(DTRACE_WORKSTATUS_ERROR);
 
 	switch (status) {
 	case DTRACE_STATUS_EXITED:
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_xlator.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_xlator.c
index 6533eb8..dcd846f 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_xlator.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_xlator.c
@@ -50,6 +50,7 @@ dt_xlator_create_member(const char *name, ctf_id_t type, ulong_t off, void *arg)
 	dt_xlator_t *dxp = arg;
 	dtrace_hdl_t *dtp = dxp->dx_hdl;
 	dt_node_t *enp, *mnp;
+	RT_NOREF1(off);
 
 	if ((enp = dt_node_xalloc(dtp, DT_NODE_XLATOR)) == NULL)
 		return (dt_set_errno(dtp, EDT_NOMEM));
@@ -352,7 +353,11 @@ out:
 dt_xlator_t *
 dt_xlator_lookup_id(dtrace_hdl_t *dtp, id_t id)
 {
+#ifdef VBOX /* range */
+	assert(id < dtp->dt_xlatorid);
+#else
 	assert(id >= 0 && id < dtp->dt_xlatorid);
+#endif
 	return (dtp->dt_xlatormap[id]);
 }
 
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dtrace.h b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dtrace.h
index 7a419c2..373b672 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dtrace.h
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dtrace.h
@@ -153,7 +153,7 @@ typedef struct dtrace_stmtdesc {
 	dtrace_actdesc_t *dtsd_action_last;	/* last action in action list */
 	void *dtsd_aggdata;			/* aggregation data */
 	void *dtsd_fmtdata;			/* type-specific output data */
-	void (*dtsd_callback)();		/* callback function for EPID */
+	void (*dtsd_callback)(void);		/* callback function for EPID */
 	void *dtsd_data;			/* callback data pointer */
 	dtrace_attribute_t dtsd_descattr;	/* probedesc attributes */
 	dtrace_attribute_t dtsd_stmtattr;	/* statement attributes */
@@ -442,13 +442,21 @@ extern void dtrace_proc_continue(dtrace_hdl_t *, struct ps_prochandle *);
  * be flushed and not used subsequently by the client program.
  */
 
-#define	DTRACE_OBJ_EXEC	 ((const char *)0L)	/* primary executable file */
-#define	DTRACE_OBJ_RTLD	 ((const char *)1L)	/* run-time link-editor */
-#define	DTRACE_OBJ_CDEFS ((const char *)2L)	/* C include definitions */
-#define	DTRACE_OBJ_DDEFS ((const char *)3L)	/* D program definitions */
-#define	DTRACE_OBJ_EVERY ((const char *)-1L)	/* all known objects */
-#define	DTRACE_OBJ_KMODS ((const char *)-2L)	/* all kernel objects */
-#define	DTRACE_OBJ_UMODS ((const char *)-3L)	/* all user objects */
+#define	DTRACE_OBJ_INT_EXEC  (0L)	/* primary executable file */
+#define	DTRACE_OBJ_INT_RTLD  (1L)	/* run-time link-editor */
+#define	DTRACE_OBJ_INT_CDEFS (2L)	/* C include definitions */
+#define	DTRACE_OBJ_INT_DDEFS (3L)	/* D program definitions */
+#define	DTRACE_OBJ_INT_EVERY (-1L)	/* all known objects */
+#define	DTRACE_OBJ_INT_KMODS (-2L)	/* all kernel objects */
+#define	DTRACE_OBJ_INT_UMODS (-3L)	/* all user objects */
+
+#define	DTRACE_OBJ_EXEC	 ((const char *)(intptr_t)DTRACE_OBJ_INT_EXEC )	/* primary executable file */
+#define	DTRACE_OBJ_RTLD	 ((const char *)(intptr_t)DTRACE_OBJ_INT_RTLD )	/* run-time link-editor */
+#define	DTRACE_OBJ_CDEFS ((const char *)(intptr_t)DTRACE_OBJ_INT_CDEFS)	/* C include definitions */
+#define	DTRACE_OBJ_DDEFS ((const char *)(intptr_t)DTRACE_OBJ_INT_DDEFS)	/* D program definitions */
+#define	DTRACE_OBJ_EVERY ((const char *)(intptr_t)DTRACE_OBJ_INT_EVERY)	/* all known objects */
+#define	DTRACE_OBJ_KMODS ((const char *)(intptr_t)DTRACE_OBJ_INT_KMODS)	/* all kernel objects */
+#define	DTRACE_OBJ_UMODS ((const char *)(intptr_t)DTRACE_OBJ_INT_UMODS)	/* all user objects */
 
 typedef struct dtrace_objinfo {
 	const char *dto_name;			/* object file scope name */
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/mknames.sed b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/mknames.sed
index 9c9efc4..275b4fb 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/mknames.sed
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/mknames.sed
@@ -19,6 +19,7 @@ i\ */
 i\#include <dtrace.h>
 i\const char *dtrace_subrstr(dtrace_hdl_t *dtp, int subr)
 i\{
+i\    (void)dtp;
 i\    switch (subr)
 i\    {
 b end
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/uts/common/dtrace/dtrace.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/uts/common/dtrace/dtrace.c
index 7f76c86..c62daac 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/uts/common/dtrace/dtrace.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/uts/common/dtrace/dtrace.c
@@ -593,7 +593,9 @@ static intptr_t dtrace_buffer_reserve(dtrace_buffer_t *, size_t, size_t,
 static int dtrace_state_option(dtrace_state_t *, dtrace_optid_t,
     dtrace_optval_t);
 static int dtrace_ecb_create_enable(dtrace_probe_t *, void *);
+#ifndef VBOX
 static void dtrace_helper_provider_destroy(dtrace_helper_provider_t *);
+#endif
 
 /*
  * DTrace Probe Context Functions
@@ -1233,6 +1235,7 @@ dtrace_priv_proc_common_nocd(VBDTVOID)
 #endif
 }
 
+#ifndef VBOX
 static int
 dtrace_priv_proc_destructive(dtrace_state_t *state)
 {
@@ -1257,6 +1260,7 @@ bad:
 
 	return (0);
 }
+#endif /* !VBOX */
 
 static int
 dtrace_priv_proc_control(dtrace_state_t *state)
@@ -1916,6 +1920,7 @@ retry:
 static void
 dtrace_aggregate_min(uint64_t *oval, uint64_t nval, uint64_t arg)
 {
+	RT_NOREF_PV(arg);
 	if ((int64_t)nval < (int64_t)*oval)
 		*oval = nval;
 }
@@ -1924,6 +1929,7 @@ dtrace_aggregate_min(uint64_t *oval, uint64_t nval, uint64_t arg)
 static void
 dtrace_aggregate_max(uint64_t *oval, uint64_t nval, uint64_t arg)
 {
+	RT_NOREF_PV(arg);
 	if ((int64_t)nval > (int64_t)*oval)
 		*oval = nval;
 }
@@ -1997,6 +2003,7 @@ dtrace_aggregate_lquantize(uint64_t *lquanta, uint64_t nval, uint64_t incr)
 static void
 dtrace_aggregate_avg(uint64_t *data, uint64_t nval, uint64_t arg)
 {
+	RT_NOREF_PV(arg);
 	data[0]++;
 	data[1] += nval;
 }
@@ -2007,6 +2014,7 @@ dtrace_aggregate_stddev(uint64_t *data, uint64_t nval, uint64_t arg)
 {
 	int64_t snval = (int64_t)nval;
 	uint64_t tmp[2];
+	RT_NOREF_PV(arg);
 
 	data[0]++;
 	data[1] += nval;
@@ -2030,6 +2038,8 @@ dtrace_aggregate_stddev(uint64_t *data, uint64_t nval, uint64_t arg)
 static void
 dtrace_aggregate_count(uint64_t *oval, uint64_t nval, uint64_t arg)
 {
+	RT_NOREF_PV(arg); RT_NOREF_PV(nval);
+
 	*oval = *oval + 1;
 }
 
@@ -2037,6 +2047,7 @@ dtrace_aggregate_count(uint64_t *oval, uint64_t nval, uint64_t arg)
 static void
 dtrace_aggregate_sum(uint64_t *oval, uint64_t nval, uint64_t arg)
 {
+	RT_NOREF_PV(arg);
 	*oval += nval;
 }
 
@@ -2324,8 +2335,8 @@ dtrace_speculation(dtrace_state_t *state)
 			continue;
 		}
 
-		if (dtrace_cas32((uint32_t *)&spec->dtsp_state,
-		    current, DTRACESPEC_ACTIVE) == current)
+		if (   (dtrace_speculation_state_t)dtrace_cas32((uint32_t *)&spec->dtsp_state, current, DTRACESPEC_ACTIVE)
+		    == current)
 			return (i + 1);
 	}
 
@@ -2420,8 +2431,7 @@ dtrace_speculation_commit(dtrace_state_t *state, processorid_t cpu,
 			AssertFatalMsgFailed(("%d\n",  current));
 #endif
 		}
-	} while (dtrace_cas32((uint32_t *)&spec->dtsp_state,
-	    current, new) != current);
+	} while ((dtrace_speculation_state_t)dtrace_cas32((uint32_t *)&spec->dtsp_state, current, new) != current);
 
 	/*
 	 * We have set the state to indicate that we are committing this
@@ -2475,7 +2485,7 @@ out:
 		uint32_t rval = dtrace_cas32((uint32_t *)&spec->dtsp_state,
 		    DTRACESPEC_COMMITTING, DTRACESPEC_INACTIVE);
 
-		ASSERT(rval == DTRACESPEC_COMMITTING);
+		ASSERT(rval == DTRACESPEC_COMMITTING); NOREF(rval);
 	}
 
 	src->dtb_offset = 0;
@@ -2538,8 +2548,7 @@ dtrace_speculation_discard(dtrace_state_t *state, processorid_t cpu,
 			AssertFatalMsgFailed(("%d\n", current));
 #endif
 		}
-	} while (dtrace_cas32((uint32_t *)&spec->dtsp_state,
-	    current, new) != current);
+	} while ((dtrace_speculation_state_t)dtrace_cas32((uint32_t *)&spec->dtsp_state, current, new) != current);
 
 	buf->dtb_offset = 0;
 	buf->dtb_drops = 0;
@@ -2729,8 +2738,7 @@ dtrace_speculation_buffer(dtrace_state_t *state, processorid_t cpuid,
 			AssertFatalMsgFailed(("%d\n", current));
 #endif
 		}
-	} while (dtrace_cas32((uint32_t *)&spec->dtsp_state,
-	    current, new) != current);
+	} while ((dtrace_speculation_state_t)dtrace_cas32((uint32_t *)&spec->dtsp_state, current, new) != current);
 
 	ASSERT(new == DTRACESPEC_ACTIVEONE || new == DTRACESPEC_ACTIVEMANY);
 	return (buf);
@@ -5712,6 +5720,7 @@ dtrace_action_chill(dtrace_mstate_t *mstate, hrtime_t val)
 
 #endif /* !VBOX */
 
+#ifndef VBOX
 static void
 dtrace_action_ustack(dtrace_mstate_t *mstate, dtrace_state_t *state,
     uint64_t *buf, uint64_t arg)
@@ -5832,6 +5841,7 @@ dtrace_action_ustack(dtrace_mstate_t *mstate, dtrace_state_t *state,
 out:
 	mstate->dtms_scratch_ptr = old;
 }
+#endif /* !VBOX */
 
 #ifdef VBOX
 extern void dtrace_probe6(dtrace_id_t, uintptr_t arg0, uintptr_t arg1,
@@ -6063,8 +6073,8 @@ dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintptr_t arg1,
 
 				do {
 					current = state->dts_activity;
-				} while (dtrace_cas32(activity, current,
-				    DTRACE_ACTIVITY_KILLED) != current);
+				} while (   (dtrace_activity_t)dtrace_cas32(activity, current, DTRACE_ACTIVITY_KILLED)
+					 != current);
 
 				continue;
 			}
@@ -6358,8 +6368,8 @@ dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintptr_t arg1,
 				if (current != DTRACE_ACTIVITY_WARMUP)
 					current = DTRACE_ACTIVITY_ACTIVE;
 
-				if (dtrace_cas32(activity, current,
-				    DTRACE_ACTIVITY_DRAINING) != current) {
+				if (   (dtrace_activity_t)dtrace_cas32(activity, current, DTRACE_ACTIVITY_DRAINING)
+				    != current) {
 					*flags |= CPU_DTRACE_DROP;
 					continue;
 				}
@@ -6779,7 +6789,7 @@ dtrace_cred2priv(cred_t *cr, uint32_t *privp, uid_t *uidp, zoneid_t *zoneidp)
 		 */
 		priv = DTRACE_PRIV_ALL;
 #ifdef VBOX
-		*uidp = ~0;
+		*uidp = UINT32_MAX;
 		*zoneidp = 0;
 #endif
 	} else {
@@ -7038,6 +7048,7 @@ top:
 static int
 dtrace_match_string(const char *s, const char *p, int depth)
 {
+	RT_NOREF_PV(depth);
 	return (s != NULL && strcmp(s, p) == 0);
 }
 
@@ -7045,6 +7056,7 @@ dtrace_match_string(const char *s, const char *p, int depth)
 static int
 dtrace_match_nul(const char *s, const char *p, int depth)
 {
+	RT_NOREF_PV(s); RT_NOREF_PV(p); RT_NOREF_PV(depth);
 	return (1); /* always match the empty pattern */
 }
 
@@ -7052,6 +7064,7 @@ dtrace_match_nul(const char *s, const char *p, int depth)
 static int
 dtrace_match_nonzero(const char *s, const char *p, int depth)
 {
+	RT_NOREF_PV(p); RT_NOREF_PV(depth);
 	return (s != NULL && s[0] != '\0');
 }
 
@@ -7834,6 +7847,7 @@ dtrace_probe_provide(dtrace_probedesc_t *desc, dtrace_provider_t *prv)
 	} while (all && (prv = prv->dtpv_next) != NULL);
 }
 
+#ifndef VBOX
 /*
  * Iterate over each probe, and call the Framework-to-Provider API function
  * denoted by offs.
@@ -7874,6 +7888,7 @@ dtrace_probe_foreach(uintptr_t offs)
 
 	dtrace_interrupt_enable(cookie);
 }
+#endif /* !VBOX */
 
 static int
 dtrace_probe_enable(const dtrace_probedesc_t *desc, dtrace_enabling_t *enab)
@@ -8045,6 +8060,8 @@ dtrace_helper_provide(dof_helper_t *dhp, pid_t pid)
 	dtrace_enabling_matchall();
 }
 
+#ifndef VBOX
+
 static void
 dtrace_helper_provider_remove_one(dof_helper_t *dhp, dof_sec_t *sec, pid_t pid)
 {
@@ -8093,6 +8110,8 @@ dtrace_helper_provider_remove(dof_helper_t *dhp, pid_t pid)
 	}
 }
 
+#endif /* !VBOX */
+
 /*
  * DTrace Meta Provider-to-Framework API Functions
  *
@@ -8639,6 +8658,7 @@ dtrace_difo_validate(dtrace_difo_t *dp, dtrace_vstate_t *vstate, uint_t nregs,
 	return (err);
 }
 
+#ifndef VBOX
 /*
  * Validate a DTrace DIF object that it is to be used as a helper.  Helpers
  * are much more constrained than normal DIFOs.  Specifically, they may
@@ -8793,6 +8813,7 @@ dtrace_difo_validate_helper(dtrace_difo_t *dp)
 
 	return (err);
 }
+#endif /* !VBOX */
 
 /*
  * Returns 1 if the expression in the DIF object can be cached on a per-thread
@@ -9136,6 +9157,7 @@ dtrace_difo_init(dtrace_difo_t *dp, dtrace_vstate_t *vstate)
 	dtrace_difo_hold(dp);
 }
 
+#ifndef VBOX
 static dtrace_difo_t *
 dtrace_difo_duplicate(dtrace_difo_t *dp, dtrace_vstate_t *vstate)
 {
@@ -9179,6 +9201,7 @@ dtrace_difo_duplicate(dtrace_difo_t *dp, dtrace_vstate_t *vstate)
 	dtrace_difo_init(new, vstate);
 	return (new);
 }
+#endif
 
 static void
 dtrace_difo_destroy(dtrace_difo_t *dp, dtrace_vstate_t *vstate)
@@ -9409,7 +9432,9 @@ dtrace_predicate_hold(dtrace_predicate_t *pred)
 static void
 dtrace_predicate_release(dtrace_predicate_t *pred, dtrace_vstate_t *vstate)
 {
+#ifdef VBOX_STRICT
 	dtrace_difo_t *dp = pred->dtp_difo;
+#endif
 
 	ASSERT(MUTEX_HELD(&dtrace_lock));
 	ASSERT(dp != NULL && dp->dtdo_refcnt != 0);
@@ -9736,7 +9761,7 @@ dtrace_ecb_aggregation_create(dtrace_ecb_t *ecb, dtrace_actdesc_t *desc)
 		break;
 
 	case DTRACEAGG_MAX:
-		agg->dtag_initial = INT64_MIN;
+		agg->dtag_initial = (uint64_t)INT64_MIN;
 		agg->dtag_aggregate = dtrace_aggregate_max;
 		break;
 
@@ -11013,6 +11038,7 @@ dtrace_enabling_addlike(dtrace_enabling_t *enab, dtrace_ecbdesc_t *ecb,
 	dtrace_enabling_add(enab, new);
 }
 
+#ifndef VBOX
 static void
 dtrace_enabling_dump(dtrace_enabling_t *enab)
 {
@@ -11026,6 +11052,7 @@ dtrace_enabling_dump(dtrace_enabling_t *enab)
 		    desc->dtpd_func, desc->dtpd_name);
 	}
 }
+#endif /* !VBOX */
 
 static void
 dtrace_enabling_destroy(dtrace_enabling_t *enab)
@@ -11293,9 +11320,9 @@ dtrace_enabling_matchall(void)
 	 * block pending our completion.
 	 */
 	for (enab = dtrace_retained; enab != NULL; enab = enab->dten_next) {
+#ifndef VBOX
 		cred_t *cr = enab->dten_vstate->dtvs_state->dts_cred.dcr_cred;
 
-#ifndef VBOX
 		if (INGLOBALZONE(curproc) ||
 		    cr != NULL && getzoneid() == crgetzoneid(cr))
 #endif
@@ -11404,6 +11431,8 @@ retry:
 static void
 dtrace_dof_error(dof_hdr_t *dof, const char *str)
 {
+	RT_NOREF_PV(dof);
+
 	if (dtrace_err_verbose)
 		cmn_err(CE_WARN, "failed to process DOF: %s", str);
 
@@ -11519,6 +11548,7 @@ dtrace_dof_copyin(uintptr_t uarg, int *errp)
 	return (dof);
 }
 
+#ifndef VBOX
 static dof_hdr_t *
 dtrace_dof_property(const char *name)
 {
@@ -11564,9 +11594,11 @@ dtrace_dof_property(const char *name)
 
 	return (dof);
 #else  /* VBOX */
+	RT_NOREF_PV(name);
 	return (NULL);
 #endif /* VBOX */
 }
+#endif /* !VBOX */
 
 static void
 dtrace_dof_destroy(dof_hdr_t *dof)
@@ -12614,7 +12646,7 @@ dtrace_state_create(dev_t *devp, cred_t *cr)
 	state->dts_aggid_arena = vmem_create(c, (void *)1, UINT32_MAX, 1,
 	    NULL, NULL, NULL, 0, VM_SLEEP | VMC_IDENTIFIER);
 #else
-        state->dts_aggid_arena = vmem_create(c, (void *)1, _1G, 1,
+        state->dts_aggid_arena = vmem_create(c, (void *)(uintptr_t)1, _1G, 1,
             NULL, NULL, NULL, 0, VM_SLEEP | VMC_IDENTIFIER);
 #endif
 
@@ -12800,7 +12832,7 @@ static int
 dtrace_state_buffer(dtrace_state_t *state, dtrace_buffer_t *buf, int which)
 {
 	dtrace_optval_t *opt = state->dts_options, size;
-	processorid_t cpu VBDTUNASS(DTRACE_CPUALL);
+	processorid_t cpu VBDTUNASS((processorid_t)DTRACE_CPUALL);
 	int flags = 0, rval;
 
 	ASSERT(MUTEX_HELD(&dtrace_lock));
@@ -14726,8 +14758,6 @@ dtrace_module_unloaded(struct modctl *ctl)
 	mutex_exit(&dtrace_provider_lock);
 }
 
-#endif /* !VBOX */
-
 VBDTSTATIC void
 dtrace_suspend(void)
 {
@@ -14740,6 +14770,8 @@ dtrace_resume(void)
 	dtrace_probe_foreach(offsetof(dtrace_pops_t, dtps_resume));
 }
 
+#endif /* !VBOX */
+
 #ifdef VBOX
 typedef enum {
     CPU_INVALID,
@@ -14748,6 +14780,7 @@ typedef enum {
 } cpu_setup_t;
 #endif
 
+#ifndef VBOX
 
 static int
 dtrace_cpu_setup(cpu_setup_t what, processorid_t cpu)
@@ -14808,12 +14841,12 @@ dtrace_cpu_setup(cpu_setup_t what, processorid_t cpu)
 	return (0);
 }
 
-#ifndef VBOX
 static void
 dtrace_cpu_setup_initial(processorid_t cpu)
 {
 	(void) dtrace_cpu_setup(CPU_CONFIG, cpu);
 }
+
 #endif /* !VBOX */
 
 static void
@@ -14930,7 +14963,7 @@ dtrace_attach(dev_info_t *devi, ddi_attach_cmd_t cmd)
 	dtrace_arena = vmem_create("dtrace", (void *)1, UINT32_MAX, 1,
 	    NULL, NULL, NULL, 0, VM_SLEEP | VMC_IDENTIFIER);
 #else
-        dtrace_arena = vmem_create("dtrace", (void *)1, UINT32_MAX - 16, 1,
+        dtrace_arena = vmem_create("dtrace", (void *)(uintptr_t)1, UINT32_MAX - 16, 1,
             NULL, NULL, NULL, 0, VM_SLEEP | VMC_IDENTIFIER);
 #endif
 #ifndef VBOX
@@ -15837,7 +15870,7 @@ dtrace_ioctl(dev_t dev, int cmd, intptr_t arg, int md, cred_t *cr, int *rv)
 		dtrace_xcall(desc.dtbd_cpu,
 		    (dtrace_xcall_t)dtrace_buffer_switch, buf);
 #else
-		if ((int32_t)desc.dtbd_cpu == DTRACE_CPUALL)
+		if (desc.dtbd_cpu == DTRACE_CPUALL)
 		    RTMpOnAll(dtrace_buffer_switch_wrapper, buf, NULL);
 		else
 		    RTMpOnSpecific(desc.dtbd_cpu, dtrace_buffer_switch_wrapper, buf, NULL);
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/uts/common/sys/dtrace.h b/src/VBox/ExtPacks/VBoxDTrace/onnv/uts/common/sys/dtrace.h
index 9da7051..868a94b 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/uts/common/sys/dtrace.h
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/uts/common/sys/dtrace.h
@@ -59,7 +59,11 @@ extern "C" {
 /*
  * DTrace Universal Constants and Typedefs
  */
+#ifdef VBOX
+#define	DTRACE_CPUALL		((processorid_t)-1)	/* all CPUs */
+#else
 #define	DTRACE_CPUALL		-1	/* all CPUs */
+#endif
 #define	DTRACE_IDNONE		0	/* invalid probe identifier */
 #define	DTRACE_EPIDNONE		0	/* invalid enabled probe identifier */
 #define	DTRACE_AGGIDNONE	0	/* invalid aggregation identifier */
diff --git a/src/VBox/ExtPacks/VNC/Makefile.kmk b/src/VBox/ExtPacks/VNC/Makefile.kmk
index 40030b3..4ca152a 100644
--- a/src/VBox/ExtPacks/VNC/Makefile.kmk
+++ b/src/VBox/ExtPacks/VNC/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2010-2015 Oracle Corporation
+# Copyright (C) 2010-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ExtPacks/VNC/VBoxVNC.cpp b/src/VBox/ExtPacks/VNC/VBoxVNC.cpp
index e042cef..664b79e 100644
--- a/src/VBox/ExtPacks/VNC/VBoxVNC.cpp
+++ b/src/VBox/ExtPacks/VNC/VBoxVNC.cpp
@@ -7,7 +7,7 @@
  * Contributed by Ivo Smits <Ivo at UFO-Net.nl>, Howard Su and
  * Christophe Devriese <christophe.devriese at gmail.com>
  *
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -253,6 +253,7 @@ int VNCServerImpl::queryVrdeFeature(const char *pszName, char *pszValue, size_t
  */
 DECLCALLBACK(int) VNCServerImpl::VRDEEnableConnections(HVRDESERVER hServer, bool fEnable)
 {
+    RT_NOREF(fEnable);
     VNCServerImpl *instance = (VNCServerImpl *)hServer;
 
 #ifdef LOG_ENABLED
@@ -694,9 +695,9 @@ DECLCALLBACK(int) VNCServerImpl::VRDEEnableConnections(HVRDESERVER hServer, bool
  *
  * @return IPRT status code.
  */
-DECLCALLBACK(void) VNCServerImpl::VRDEDisconnect(HVRDESERVER hServer, uint32_t u32ClientId,
-                                                 bool fReconnect)
+DECLCALLBACK(void) VNCServerImpl::VRDEDisconnect(HVRDESERVER hServer, uint32_t u32ClientId, bool fReconnect)
 {
+    RT_NOREF(hServer, u32ClientId, fReconnect);
 }
 
 static inline void convert15To32bpp(uint8_t msb, uint8_t lsb, uint8_t &r, uint8_t &g, uint8_t &b)
@@ -782,9 +783,9 @@ DECLCALLBACK(void) VNCServerImpl::VRDEResize(HVRDESERVER hServer)
  * @param pvUpdate  Pointer to VBoxGuest.h::VRDEORDERHDR structure with extra data.
  * @param cbUpdate  Size of the update data.
  */
-DECLCALLBACK(void) VNCServerImpl::VRDEUpdate(HVRDESERVER hServer, unsigned uScreenId,
-                                             void *pvUpdate,uint32_t cbUpdate)
+DECLCALLBACK(void) VNCServerImpl::VRDEUpdate(HVRDESERVER hServer, unsigned uScreenId, void *pvUpdate,uint32_t cbUpdate)
 {
+    RT_NOREF(uScreenId);
     char *ptr = (char *)pvUpdate;
     VNCServerImpl *instance = (VNCServerImpl *)hServer;
     VRDEORDERHDR *order = (VRDEORDERHDR *)ptr;
@@ -815,7 +816,7 @@ DECLCALLBACK(void) VNCServerImpl::VRDEUpdate(HVRDESERVER hServer, unsigned uScre
                         solidrect->x + solidrect->w, solidrect->y + solidrect->h, RGB2BGR(solidrect->rgb));
                     return;
                 }
-            ///@todo: more orders
+            /// @todo more orders
             }
         }
 
@@ -925,10 +926,11 @@ DECLCALLBACK(void) VNCServerImpl::VRDEColorPointer(HVRDESERVER hServer,
  */
 DECLCALLBACK(void) VNCServerImpl::VRDEHidePointer(HVRDESERVER hServer)
 {
-    VNCServerImpl *instance = (VNCServerImpl *)hServer;
+    VNCServerImpl *pInstance = (VNCServerImpl *)hServer;
+    RT_NOREF(pInstance);
 
-    ///@todo: what's behavior for this. hide doesn't seems right
-    //rfbSetCursor(instance->mVNCServer, NULL);
+    /// @todo what's behavior for this. hide doesn't seems right
+    //rfbSetCursor(pInstance->mVNCServer, NULL);
 }
 
 /**
@@ -946,6 +948,7 @@ DECLCALLBACK(void) VNCServerImpl::VRDEAudioSamples(HVRDESERVER hServer,
                                                    uint32_t cSamples,
                                                    VRDEAUDIOFORMAT format)
 {
+    RT_NOREF(hServer, pvSamples, cSamples, format);
 }
 
 /**
@@ -961,6 +964,7 @@ DECLCALLBACK(void) VNCServerImpl::VRDEAudioVolume(HVRDESERVER hServer,
                                                   uint16_t u16Left,
                                                   uint16_t u16Right)
 {
+    RT_NOREF(hServer, u16Left, u16Right);
 }
 
 /**
@@ -981,6 +985,7 @@ DECLCALLBACK(void) VNCServerImpl::VRDEUSBRequest(HVRDESERVER hServer,
                                                  void *pvParm,
                                                  uint32_t cbParm)
 {
+    RT_NOREF(hServer, u32ClientId, pvParm, cbParm);
 }
 
 /**
@@ -1006,6 +1011,7 @@ DECLCALLBACK(void) VNCServerImpl::VRDEClipboard(HVRDESERVER hServer,
                                                 uint32_t cbData,
                                                 uint32_t *pcbActualRead)
 {
+    RT_NOREF(hServer, u32Function, u32Format, pvData, cbData, pcbActualRead);
 }
 
 /**
@@ -1043,7 +1049,7 @@ DECLCALLBACK(void) VNCServerImpl::VRDEQueryInfo(HVRDESERVER hServer,
             }
             break;
         }
-        ///@todo lots more queries to implement
+        /// @todo lots more queries to implement
         default:
             break;
     }
@@ -1073,6 +1079,7 @@ DECLCALLBACK(void) VNCServerImpl::VRDERedirect(HVRDESERVER hServer,
                                                uint32_t u32SessionId,
                                                const char *pszCookie)
 {
+    RT_NOREF(hServer, u32ClientId, pszServer, pszUser, pszDomain, pszPassword, u32SessionId, pszCookie);
 }
 
 /**
@@ -1092,6 +1099,7 @@ DECLCALLBACK(void) VNCServerImpl::VRDEAudioInOpen(HVRDESERVER hServer,
                                                   VRDEAUDIOFORMAT audioFormat,
                                                   uint32_t u32SamplesPerBlock)
 {
+    RT_NOREF(hServer, pvCtx, u32ClientId, audioFormat, u32SamplesPerBlock);
 }
 
 /**
@@ -1102,9 +1110,9 @@ DECLCALLBACK(void) VNCServerImpl::VRDEAudioInOpen(HVRDESERVER hServer,
  *
  * @note Initialized to NULL when the VRDECallbackAudioIn callback is NULL.
  */
-DECLCALLBACK(void) VNCServerImpl::VRDEAudioInClose(HVRDESERVER hServer,
-                                                   uint32_t u32ClientId)
+DECLCALLBACK(void) VNCServerImpl::VRDEAudioInClose(HVRDESERVER hServer, uint32_t u32ClientId)
 {
+    RT_NOREF(hServer, u32ClientId);
 }
 
 
@@ -1119,7 +1127,7 @@ int VNCServerImpl::Init(const VRDEINTERFACEHDR *pCallbacks,
     }
     else if (pCallbacks->u64Version == VRDE_INTERFACE_VERSION_1)
     {
-        ///@todo: this is incorrect and it will cause crash if client call unsupport func.
+        /// @todo this is incorrect and it will cause crash if client call unsupport func.
         mCallbacks = (VRDECALLBACKS_4 *)pCallbacks;
         mCallback = pvCallback;
 
@@ -1290,7 +1298,7 @@ enum rfbNewClientAction VNCServerImpl::rfbNewClientEvent(rfbClientPtr cl)
 {
     VNCServerImpl *instance = static_cast<VNCServerImpl *>(cl->screen->screenData);
 
-    ///@todo: we need auth user here
+    /// @todo we need auth user here
 
     instance->mCallbacks->VRDECallbackClientConnect(instance->mCallback, (int)cl->sock);
     instance->uClients++;
diff --git a/src/VBox/ExtPacks/VNC/VBoxVNCMain.cpp b/src/VBox/ExtPacks/VNC/VBoxVNCMain.cpp
index e43a692..b16a96d 100644
--- a/src/VBox/ExtPacks/VNC/VBoxVNCMain.cpp
+++ b/src/VBox/ExtPacks/VNC/VBoxVNCMain.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/Common/Makefile.kmk b/src/VBox/Frontends/Common/Makefile.kmk
index f866980..42b82b7 100644
--- a/src/VBox/Frontends/Common/Makefile.kmk
+++ b/src/VBox/Frontends/Common/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2010-2015 Oracle Corporation
+# Copyright (C) 2010-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/Common/VBoxKeyboard/Makefile.kmk b/src/VBox/Frontends/Common/VBoxKeyboard/Makefile.kmk
index dd188c3..ee19851 100644
--- a/src/VBox/Frontends/Common/VBoxKeyboard/Makefile.kmk
+++ b/src/VBox/Frontends/Common/VBoxKeyboard/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/Makefile.kmk b/src/VBox/Frontends/Makefile.kmk
index 763bf54..fbc1e1a 100644
--- a/src/VBox/Frontends/Makefile.kmk
+++ b/src/VBox/Frontends/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VBoxAutostart/Makefile.kmk b/src/VBox/Frontends/VBoxAutostart/Makefile.kmk
index 77c4e72..39970f0 100644
--- a/src/VBox/Frontends/VBoxAutostart/Makefile.kmk
+++ b/src/VBox/Frontends/VBoxAutostart/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2012-2015 Oracle Corporation
+# Copyright (C) 2012-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VBoxAutostart/VBoxAutostart-posix.cpp b/src/VBox/Frontends/VBoxAutostart/VBoxAutostart-posix.cpp
index 1f8c380..1d0db23 100644
--- a/src/VBox/Frontends/VBoxAutostart/VBoxAutostart-posix.cpp
+++ b/src/VBox/Frontends/VBoxAutostart/VBoxAutostart-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2013 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -130,9 +130,6 @@ DECLHIDDEN(HRESULT) showProgress(ComPtr<IProgress> progress)
     ULONG ulCurrentPercent = 0;
     ULONG ulLastPercent = 0;
 
-    ULONG ulLastOperationPercent = (ULONG)-1;
-
-    ULONG ulLastOperation = (ULONG)-1;
     Bstr bstrOperationDescription;
 
     NativeEventQueue::getMainEventQueue()->processEventQueue(0);
@@ -244,8 +241,6 @@ DECLHIDDEN(HRESULT) showProgress(ComPtr<IProgress> progress)
 
 DECLHIDDEN(void) autostartSvcOsLogStr(const char *pszMsg, AUTOSTARTLOGTYPE enmLogType)
 {
-    va_list args;
-
     if (   enmLogType == AUTOSTARTLOGTYPE_VERBOSE
         && !g_fVerbose)
         return;
diff --git a/src/VBox/Frontends/VBoxAutostart/VBoxAutostart-win.cpp b/src/VBox/Frontends/VBoxAutostart/VBoxAutostart-win.cpp
index 218f88e..7373f8b 100644
--- a/src/VBox/Frontends/VBoxAutostart/VBoxAutostart-win.cpp
+++ b/src/VBox/Frontends/VBoxAutostart/VBoxAutostart-win.cpp
@@ -19,7 +19,7 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
-#include <Windows.h>
+#include <iprt/win/windows.h>
 #include <tchar.h>
 
 #include <VBox/com/com.h>
@@ -88,12 +88,7 @@ DECLHIDDEN(HRESULT) showProgress(ComPtr<IProgress> progress)
     using namespace com;
 
     BOOL fCompleted = FALSE;
-    ULONG ulCurrentPercent = 0;
-    ULONG ulLastPercent = 0;
-
-    ULONG ulLastOperationPercent = (ULONG)-1;
-
-    ULONG ulLastOperation = (ULONG)-1;
+    ULONG uCurrentPercent = 0;
     Bstr bstrOperationDescription;
 
     NativeEventQueue::getMainEventQueue()->processEventQueue(0);
@@ -113,7 +108,7 @@ DECLHIDDEN(HRESULT) showProgress(ComPtr<IProgress> progress)
     hrc = progress->COMGETTER(Completed(&fCompleted));
     while (SUCCEEDED(hrc))
     {
-        progress->COMGETTER(Percent(&ulCurrentPercent));
+        progress->COMGETTER(Percent(&uCurrentPercent));
 
         if (fCompleted)
             break;
@@ -182,7 +177,7 @@ DECLHIDDEN(void) autostartSvcOsLogStr(const char *pszMsg, AUTOSTARTLOGTYPE enmLo
                             0,                       /* dwDataSize */
                             apsz,                    /* lpStrings */
                             NULL);                   /* lpRawData */
-    AssertMsg(fRc, ("%d\n", GetLastError()));
+    AssertMsg(fRc, ("%u\n", GetLastError())); NOREF(fRc);
     DeregisterEventSource(hEventLog);
 }
 
@@ -232,7 +227,7 @@ static SC_HANDLE autostartSvcWinOpenSCManager(const char *pszAction, DWORD dwAcc
  * @param   ...                 Errors codes that should not cause a message to be displayed.
  */
 static SC_HANDLE autostartSvcWinOpenService(const char *pszAction, DWORD dwSCMAccess, DWORD dwSVCAccess,
-                                      unsigned cIgnoredErrors, ...)
+                                            unsigned cIgnoredErrors, ...)
 {
     SC_HANDLE hSCM = autostartSvcWinOpenSCManager(pszAction, dwSCMAccess);
     if (!hSCM)
@@ -251,7 +246,7 @@ static SC_HANDLE autostartSvcWinOpenService(const char *pszAction, DWORD dwSCMAc
         va_list va;
         va_start(va, cIgnoredErrors);
         while (!fIgnored && cIgnoredErrors-- > 0)
-            fIgnored = va_arg(va, long) == err;
+            fIgnored = (DWORD)va_arg(va, int) == err;
         va_end(va);
         if (!fIgnored)
         {
@@ -277,6 +272,7 @@ static SC_HANDLE autostartSvcWinOpenService(const char *pszAction, DWORD dwSCMAc
 
 static RTEXITCODE autostartSvcWinInterrogate(int argc, char **argv)
 {
+    RT_NOREF(argc, argv);
     RTPrintf("VBoxAutostartSvc: The \"interrogate\" action is not implemented.\n");
     return RTEXITCODE_FAILURE;
 }
@@ -284,6 +280,7 @@ static RTEXITCODE autostartSvcWinInterrogate(int argc, char **argv)
 
 static RTEXITCODE autostartSvcWinStop(int argc, char **argv)
 {
+    RT_NOREF(argc, argv);
     RTPrintf("VBoxAutostartSvc: The \"stop\" action is not implemented.\n");
     return RTEXITCODE_FAILURE;
 }
@@ -291,6 +288,7 @@ static RTEXITCODE autostartSvcWinStop(int argc, char **argv)
 
 static RTEXITCODE autostartSvcWinContinue(int argc, char **argv)
 {
+    RT_NOREF(argc, argv);
     RTPrintf("VBoxAutostartSvc: The \"continue\" action is not implemented.\n");
     return RTEXITCODE_FAILURE;
 }
@@ -298,6 +296,7 @@ static RTEXITCODE autostartSvcWinContinue(int argc, char **argv)
 
 static RTEXITCODE autostartSvcWinPause(int argc, char **argv)
 {
+    RT_NOREF(argc, argv);
     RTPrintf("VBoxAutostartSvc: The \"pause\" action is not implemented.\n");
     return RTEXITCODE_FAILURE;
 }
@@ -305,6 +304,7 @@ static RTEXITCODE autostartSvcWinPause(int argc, char **argv)
 
 static RTEXITCODE autostartSvcWinStart(int argc, char **argv)
 {
+    RT_NOREF(argc, argv);
     RTPrintf("VBoxAutostartSvc: The \"start\" action is not implemented.\n");
     return RTEXITCODE_SUCCESS;
 }
@@ -312,6 +312,7 @@ static RTEXITCODE autostartSvcWinStart(int argc, char **argv)
 
 static RTEXITCODE autostartSvcWinQueryDescription(int argc, char **argv)
 {
+    RT_NOREF(argc, argv);
     RTPrintf("VBoxAutostartSvc: The \"qdescription\" action is not implemented.\n");
     return RTEXITCODE_FAILURE;
 }
@@ -319,6 +320,7 @@ static RTEXITCODE autostartSvcWinQueryDescription(int argc, char **argv)
 
 static RTEXITCODE autostartSvcWinQueryConfig(int argc, char **argv)
 {
+    RT_NOREF(argc, argv);
     RTPrintf("VBoxAutostartSvc: The \"qconfig\" action is not implemented.\n");
     return RTEXITCODE_FAILURE;
 }
@@ -326,12 +328,14 @@ static RTEXITCODE autostartSvcWinQueryConfig(int argc, char **argv)
 
 static RTEXITCODE autostartSvcWinDisable(int argc, char **argv)
 {
+    RT_NOREF(argc, argv);
     RTPrintf("VBoxAutostartSvc: The \"disable\" action is not implemented.\n");
     return RTEXITCODE_FAILURE;
 }
 
 static RTEXITCODE autostartSvcWinEnable(int argc, char **argv)
 {
+    RT_NOREF(argc, argv);
     RTPrintf("VBoxAutostartSvc: The \"enable\" action is not implemented.\n");
     return RTEXITCODE_FAILURE;
 }
@@ -622,17 +626,18 @@ static DWORD WINAPI autostartSvcWinServiceCtrlHandlerEx(DWORD dwControl, DWORD d
     NOREF(dwEventType);
     NOREF(pvEventData);
     NOREF(pvContext);
-    return NO_ERROR;
+    /* not reached */
 }
 
-static int autostartWorker(RTTHREAD ThreadSelf, void *pvUser)
+static DECLCALLBACK(int) autostartWorkerThread(RTTHREAD hThreadSelf, void *pvUser)
 {
-                        int rc = autostartSetup();
+    RT_NOREF(hThreadSelf, pvUser);
+    int rc = autostartSetup();
 
-                        /** @todo: Implement config options. */
-                        rc = autostartStartMain(NULL);
-                        if (RT_FAILURE(rc))
-                            autostartSvcLogError("Starting VMs failed, rc=%Rrc", rc);
+    /** @todo Implement config options. */
+    rc = autostartStartMain(NULL);
+    if (RT_FAILURE(rc))
+        autostartSvcLogError("Starting VMs failed, rc=%Rrc", rc);
 
     return rc;
 }
@@ -648,6 +653,7 @@ static int autostartWorker(RTTHREAD ThreadSelf, void *pvUser)
  */
 static VOID WINAPI autostartSvcWinServiceMain(DWORD cArgs, LPTSTR *papszArgs)
 {
+    RT_NOREF(papszArgs);
     LogFlowFuncEnter();
 
     /*
@@ -676,7 +682,7 @@ static VOID WINAPI autostartSvcWinServiceMain(DWORD cArgs, LPTSTR *papszArgs)
                     {
                         LogFlow(("autostartSvcWinServiceMain: calling RTSemEventMultiWait\n"));
                         RTTHREAD hWorker;
-                        RTThreadCreate(&hWorker, autostartWorker, NULL, 0, RTTHREADTYPE_DEFAULT, 0, "WorkerThread");
+                        RTThreadCreate(&hWorker, autostartWorkerThread, NULL, 0, RTTHREADTYPE_DEFAULT, 0, "WorkerThread");
 
                         LogFlow(("autostartSvcWinServiceMain: woke up\n"));
                         err = NO_ERROR;
@@ -684,7 +690,7 @@ static VOID WINAPI autostartSvcWinServiceMain(DWORD cArgs, LPTSTR *papszArgs)
                         if (RT_SUCCESS(rc))
                         {
                             LogFlow(("autostartSvcWinServiceMain: woke up\n"));
-                            /** @todo: Autostop part. */
+                            /** @todo Autostop part. */
                             err = NO_ERROR;
                         }
                         else
diff --git a/src/VBox/Frontends/VBoxAutostart/VBoxAutostart.h b/src/VBox/Frontends/VBoxAutostart/VBoxAutostart.h
index 0902640..a404805 100644
--- a/src/VBox/Frontends/VBoxAutostart/VBoxAutostart.h
+++ b/src/VBox/Frontends/VBoxAutostart/VBoxAutostart.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VBoxAutostart/VBoxAutostartCfg.cpp b/src/VBox/Frontends/VBoxAutostart/VBoxAutostartCfg.cpp
index 00bcb00..665bf12 100644
--- a/src/VBox/Frontends/VBoxAutostart/VBoxAutostartCfg.cpp
+++ b/src/VBox/Frontends/VBoxAutostart/VBoxAutostartCfg.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -71,7 +71,7 @@ typedef struct CFGTOKEN
     /** Line number of the token. */
     unsigned        iLine;
     /** Starting character of the token in the stream. */
-    unsigned        cchStart;
+    size_t          cchStart;
     /** Type dependen token data. */
     union
     {
@@ -106,7 +106,7 @@ typedef struct CFGTOKENIZER
     /** Current line in the config file. */
     unsigned   iLine;
     /** Current character of the line. */
-    unsigned   cchCurr;
+    size_t     cchCurr;
     /** Flag whether the end of the config stream is reached. */
     bool       fEof;
     /** Pointer to the next token in the stream (used to peek). */
@@ -409,9 +409,7 @@ static const char *autostartConfigTokenTypeToStr(CFGTOKENTYPE enmType)
             AssertFailed();
             return "<Invalid>";
     }
-
-    AssertFailed();
-    return NULL;
+    /* not reached */
 }
 
 /**
@@ -451,9 +449,7 @@ static size_t autostartConfigTokenGetLength(PCFGTOKEN pToken)
             AssertFailed();
             return 0;
     }
-
-    AssertFailed();
-    return 0;
+    /* not reached */
 }
 
 /**
@@ -595,12 +591,8 @@ static int autostartConfigParseValue(PCFGTOKENIZER pCfgTokenizer, const char *ps
 static int autostartConfigParseCompoundNode(PCFGTOKENIZER pCfgTokenizer, const char *pszScopeId,
                                             PCFGAST *ppCfgAst)
 {
-    int rc = VINF_SUCCESS;
     unsigned cAstNodesMax = 10;
-    unsigned idxAstNodeCur = 0;
-    PCFGAST pCfgAst = NULL;
-
-    pCfgAst = (PCFGAST)RTMemAllocZ(RT_OFFSETOF(CFGAST, u.Compound.apAstNodes[cAstNodesMax]));
+    PCFGAST pCfgAst = (PCFGAST)RTMemAllocZ(RT_OFFSETOF(CFGAST, u.Compound.apAstNodes[cAstNodesMax]));
     if (!pCfgAst)
         return VERR_NO_MEMORY;
 
@@ -613,6 +605,7 @@ static int autostartConfigParseCompoundNode(PCFGTOKENIZER pCfgTokenizer, const c
         return VERR_NO_MEMORY;
     }
 
+    int rc = VINF_SUCCESS;
     do
     {
         PCFGTOKEN pToken = NULL;
diff --git a/src/VBox/Frontends/VBoxAutostart/VBoxAutostartStart.cpp b/src/VBox/Frontends/VBoxAutostart/VBoxAutostartStart.cpp
index 2b05e4c..b19cb4b 100644
--- a/src/VBox/Frontends/VBoxAutostart/VBoxAutostartStart.cpp
+++ b/src/VBox/Frontends/VBoxAutostart/VBoxAutostartStart.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VBoxAutostart/VBoxAutostartStop.cpp b/src/VBox/Frontends/VBoxAutostart/VBoxAutostartStop.cpp
index 42871d3..5ba4a6d 100644
--- a/src/VBox/Frontends/VBoxAutostart/VBoxAutostartStop.cpp
+++ b/src/VBox/Frontends/VBoxAutostart/VBoxAutostartStop.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -106,8 +106,8 @@ static HRESULT autostartSaveVMState(ComPtr<IConsole> &console)
 
 DECLHIDDEN(RTEXITCODE) autostartStopMain(PCFGAST pCfgAst)
 {
+    RT_NOREF(pCfgAst);
     RTEXITCODE rcExit = RTEXITCODE_SUCCESS;
-    int vrc = VINF_SUCCESS;
     std::list<AUTOSTOPVM> listVM;
 
     /*
diff --git a/src/VBox/Frontends/VBoxAutostart/VBoxAutostartUtils.cpp b/src/VBox/Frontends/VBoxAutostart/VBoxAutostartUtils.cpp
index 01f73e5..e63e6f5 100644
--- a/src/VBox/Frontends/VBoxAutostart/VBoxAutostartUtils.cpp
+++ b/src/VBox/Frontends/VBoxAutostart/VBoxAutostartUtils.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -217,8 +217,10 @@ DECLHIDDEN(void) autostartSvcDisplayError(const char *pszFormat, ...)
     va_end(va);
 }
 
-DECLHIDDEN(RTEXITCODE) autostartSvcDisplayGetOptError(const char *pszAction, int rc, int argc, char **argv, int iArg, PCRTGETOPTUNION pValue)
+DECLHIDDEN(RTEXITCODE) autostartSvcDisplayGetOptError(const char *pszAction, int rc, int argc, char **argv, int iArg,
+                                                      PCRTGETOPTUNION pValue)
 {
+    RT_NOREF(pValue);
     autostartSvcDisplayError("%s - RTGetOpt failure, %Rrc (%d): %s\n",
                        pszAction, rc, rc, iArg < argc ? argv[iArg] : "<null>");
     return RTEXITCODE_FAILURE;
@@ -226,6 +228,7 @@ DECLHIDDEN(RTEXITCODE) autostartSvcDisplayGetOptError(const char *pszAction, int
 
 DECLHIDDEN(RTEXITCODE) autostartSvcDisplayTooManyArgsError(const char *pszAction, int argc, char **argv, int iArg)
 {
+    RT_NOREF(argc);
     Assert(iArg < argc);
     autostartSvcDisplayError("%s - Too many arguments: %s\n", pszAction, argv[iArg]);
     return RTEXITCODE_FAILURE;
diff --git a/src/VBox/Frontends/VBoxBalloonCtrl/Makefile.kmk b/src/VBox/Frontends/VBoxBalloonCtrl/Makefile.kmk
index 4467bad..f4e61ae 100644
--- a/src/VBox/Frontends/VBoxBalloonCtrl/Makefile.kmk
+++ b/src/VBox/Frontends/VBoxBalloonCtrl/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2011-2015 Oracle Corporation
+# Copyright (C) 2011-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VBoxBalloonCtrl/VBoxBalloonCtrl.rc b/src/VBox/Frontends/VBoxBalloonCtrl/VBoxBalloonCtrl.rc
index ea308a2..c991764 100644
--- a/src/VBox/Frontends/VBoxBalloonCtrl/VBoxBalloonCtrl.rc
+++ b/src/VBox/Frontends/VBoxBalloonCtrl/VBoxBalloonCtrl.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VBoxBalloonCtrl/VBoxModAPIMonitor.cpp b/src/VBox/Frontends/VBoxBalloonCtrl/VBoxModAPIMonitor.cpp
index f140cce..add76e3 100644
--- a/src/VBox/Frontends/VBoxBalloonCtrl/VBoxModAPIMonitor.cpp
+++ b/src/VBox/Frontends/VBoxBalloonCtrl/VBoxModAPIMonitor.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -68,10 +68,10 @@ enum APIMON_RESPONSE
 
 /** The VM group(s) the API monitor handles. If none, all VMs get handled. */
 static mapGroups                    g_vecAPIMonGroups; /** @todo Move this into module payload! */
-static APIMON_RESPONSE              g_enmAPIMonIslnResp     = APIMON_RESPONSE_NONE;
-static unsigned long                g_ulAPIMonIslnTimeoutMS = 0;
+static APIMON_RESPONSE              g_enmAPIMonIslnResp = APIMON_RESPONSE_NONE;
+static uint32_t                     g_cMsAPIMonIslnTimeout = 0;
 static Bstr                         g_strAPIMonIslnLastBeat;
-static unsigned long                g_ulAPIMonResponseTimeoutMS = 0;
+static uint32_t                     g_cMsAPIMonResponseTimeout = 0;
 static uint64_t                     g_uAPIMonIslnLastBeatMS = 0;
 
 static int apimonResponseToEnum(const char *pszResponse, APIMON_RESPONSE *pResp)
@@ -179,13 +179,13 @@ static const char *apimonMachineStateToName(MachineState_T machineState, bool fS
 }
 
 static int apimonMachineControl(const Bstr &strUuid, PVBOXWATCHDOG_MACHINE pMachine,
-                                APIMON_RESPONSE enmResp, unsigned long ulTimeout)
+                                APIMON_RESPONSE enmResp, uint32_t cMsTimeout)
 {
     /** @todo Add other commands (with enmResp) here. */
     AssertPtrReturn(pMachine, VERR_INVALID_POINTER);
 
     serviceLogVerbose(("apimon: Triggering \"%s\" (%RU32ms timeout) for machine \"%ls\"\n",
-                      apimonResponseToStr(enmResp), ulTimeout, strUuid.raw()));
+                      apimonResponseToStr(enmResp), cMsTimeout, strUuid.raw()));
 
     if (   enmResp == APIMON_RESPONSE_NONE
         || g_fDryrun)
@@ -233,7 +233,7 @@ static int apimonMachineControl(const Bstr &strUuid, PVBOXWATCHDOG_MACHINE pMach
                         serviceLogVerbose(("apimon: Powering off machine \"%ls\" ...\n",
                                            strUuid.raw()));
                         CHECK_ERROR_BREAK(console, PowerDown(progress.asOutParam()));
-                        progress->WaitForCompletion(ulTimeout);
+                        progress->WaitForCompletion(cMsTimeout);
                         CHECK_PROGRESS_ERROR(progress, ("Failed to power off machine \"%ls\"",
                                              strUuid.raw()));
                         break;
@@ -273,7 +273,7 @@ static int apimonMachineControl(const Bstr &strUuid, PVBOXWATCHDOG_MACHINE pMach
                         CHECK_ERROR(sessionMachine, SaveState(progress.asOutParam()));
                         if (SUCCEEDED(rc))
                         {
-                            progress->WaitForCompletion(ulTimeout);
+                            progress->WaitForCompletion(cMsTimeout);
                             CHECK_PROGRESS_ERROR(progress, ("Failed to save machine state of machine \"%ls\"",
                                                  strUuid.raw()));
                         }
@@ -363,7 +363,7 @@ static int apimonTrigger(APIMON_RESPONSE enmResp)
             if (fHandleVM)
             {
                 int rc2 = apimonMachineControl(it->first /* Uuid */,
-                                               &it->second /* Machine */, enmResp, g_ulAPIMonResponseTimeoutMS);
+                                               &it->second /* Machine */, enmResp, g_cMsAPIMonResponseTimeout);
                 if (RT_FAILURE(rc2))
                     serviceLog("apimon: Controlling machine \"%ls\" (response \"%s\") failed with rc=%Rrc",
                                it->first.raw(), apimonResponseToStr(enmResp), rc);
@@ -428,15 +428,15 @@ static DECLCALLBACK(int) VBoxModAPIMonitorOption(int argc, char *argv[], int *pi
                 break;
 
             case GETOPTDEF_APIMON_ISLN_TIMEOUT:
-                g_ulAPIMonIslnTimeoutMS = ValueUnion.u32;
-                if (g_ulAPIMonIslnTimeoutMS < 1000) /* Don't allow timeouts < 1s. */
-                    g_ulAPIMonIslnTimeoutMS = 1000;
+                g_cMsAPIMonIslnTimeout = ValueUnion.u32;
+                if (g_cMsAPIMonIslnTimeout < 1000) /* Don't allow timeouts < 1s. */
+                    g_cMsAPIMonIslnTimeout = 1000;
                 break;
 
             case GETOPTDEF_APIMON_RESP_TIMEOUT:
-                g_ulAPIMonResponseTimeoutMS = ValueUnion.u32;
-                if (g_ulAPIMonResponseTimeoutMS < 5000) /* Don't allow timeouts < 5s. */
-                    g_ulAPIMonResponseTimeoutMS = 5000;
+                g_cMsAPIMonResponseTimeout = ValueUnion.u32;
+                if (g_cMsAPIMonResponseTimeout < 5000) /* Don't allow timeouts < 5s. */
+                    g_cMsAPIMonResponseTimeout = 5000;
                 break;
 
             default:
@@ -474,11 +474,11 @@ static DECLCALLBACK(int) VBoxModAPIMonitorInit(void)
             }
         }
 
-        if (!g_ulAPIMonIslnTimeoutMS)
-            cfgGetValueULong(g_pVirtualBox, NULL /* Machine */,
-                             "VBoxInternal2/Watchdog/APIMonitor/IsolationTimeoutMS", NULL /* Per-machine */,
-                             &g_ulAPIMonIslnTimeoutMS, 30 * 1000 /* Default is 30 seconds timeout. */);
-        g_ulAPIMonIslnTimeoutMS = RT_MIN(1000, g_ulAPIMonIslnTimeoutMS);
+        if (!g_cMsAPIMonIslnTimeout)
+            cfgGetValueU32(g_pVirtualBox, NULL /* Machine */,
+                           "VBoxInternal2/Watchdog/APIMonitor/IsolationTimeoutMS", NULL /* Per-machine */,
+                           &g_cMsAPIMonIslnTimeout, 30 * 1000 /* Default is 30 seconds timeout. */);
+        g_cMsAPIMonIslnTimeout = RT_MIN(1000, g_cMsAPIMonIslnTimeout);
 
         if (g_enmAPIMonIslnResp == APIMON_RESPONSE_NONE) /* Not set by command line? */
         {
@@ -495,11 +495,11 @@ static DECLCALLBACK(int) VBoxModAPIMonitorInit(void)
             }
         }
 
-        if (!g_ulAPIMonResponseTimeoutMS)
-            cfgGetValueULong(g_pVirtualBox, NULL /* Machine */,
-                             "VBoxInternal2/Watchdog/APIMonitor/ResponseTimeoutMS", NULL /* Per-machine */,
-                             &g_ulAPIMonResponseTimeoutMS, 30 * 1000 /* Default is 30 seconds timeout. */);
-        g_ulAPIMonResponseTimeoutMS = RT_MIN(5000, g_ulAPIMonResponseTimeoutMS);
+        if (!g_cMsAPIMonResponseTimeout)
+            cfgGetValueU32(g_pVirtualBox, NULL /* Machine */,
+                           "VBoxInternal2/Watchdog/APIMonitor/ResponseTimeoutMS", NULL /* Per-machine */,
+                           &g_cMsAPIMonResponseTimeout, 30 * 1000 /* Default is 30 seconds timeout. */);
+        g_cMsAPIMonResponseTimeout = RT_MIN(5000, g_cMsAPIMonResponseTimeout);
 
 #ifdef DEBUG
         /* Groups. */
@@ -520,7 +520,7 @@ static DECLCALLBACK(int) VBoxModAPIMonitorInit(void)
         g_uAPIMonIslnLastBeatMS = 0;
     }
 
-    return SUCCEEDED(rc) ? VINF_SUCCESS : VERR_COM_IPRT_ERROR; /* @todo Find a better rc! */
+    return SUCCEEDED(rc) ? VINF_SUCCESS : VERR_COM_IPRT_ERROR; /** @todo Find a better rc! */
 }
 
 static DECLCALLBACK(int) VBoxModAPIMonitorMain(void)
@@ -537,7 +537,7 @@ static DECLCALLBACK(int) VBoxModAPIMonitorMain(void)
 
 #ifdef DEBUG
     serviceLogVerbose(("apimon: Checking for API heartbeat (%RU64ms) ...\n",
-                       g_ulAPIMonIslnTimeoutMS));
+                       g_cMsAPIMonIslnTimeout));
 #endif
 
     do
@@ -557,10 +557,10 @@ static DECLCALLBACK(int) VBoxModAPIMonitorMain(void)
         else
         {
             g_uAPIMonIslnLastBeatMS += uDelta;
-            if (g_uAPIMonIslnLastBeatMS > g_ulAPIMonIslnTimeoutMS)
+            if (g_uAPIMonIslnLastBeatMS > g_cMsAPIMonIslnTimeout)
             {
                 serviceLogVerbose(("apimon: No API heartbeat within time received (%RU64ms)\n",
-                                   g_ulAPIMonIslnTimeoutMS));
+                                   g_cMsAPIMonIslnTimeout));
 
                 vrc = apimonTrigger(g_enmAPIMonIslnResp);
                 g_uAPIMonIslnLastBeatMS = 0;
@@ -585,17 +585,19 @@ static DECLCALLBACK(void) VBoxModAPIMonitorTerm(void)
 
 static DECLCALLBACK(int) VBoxModAPIMonitorOnMachineRegistered(const Bstr &strUuid)
 {
+    RT_NOREF(strUuid);
     return VINF_SUCCESS;
 }
 
 static DECLCALLBACK(int) VBoxModAPIMonitorOnMachineUnregistered(const Bstr &strUuid)
 {
+    RT_NOREF(strUuid);
     return VINF_SUCCESS;
 }
 
-static DECLCALLBACK(int) VBoxModAPIMonitorOnMachineStateChanged(const Bstr &strUuid,
-                                                                MachineState_T enmState)
+static DECLCALLBACK(int) VBoxModAPIMonitorOnMachineStateChanged(const Bstr &strUuid, MachineState_T enmState)
 {
+    RT_NOREF(strUuid, enmState);
     return VINF_SUCCESS;
 }
 
diff --git a/src/VBox/Frontends/VBoxBalloonCtrl/VBoxModBallooning.cpp b/src/VBox/Frontends/VBoxBalloonCtrl/VBoxModBallooning.cpp
index cd62f15..d75ecc8 100644
--- a/src/VBox/Frontends/VBoxBalloonCtrl/VBoxModBallooning.cpp
+++ b/src/VBox/Frontends/VBoxBalloonCtrl/VBoxModBallooning.cpp
@@ -30,6 +30,7 @@ using namespace com;
 
 #define VBOX_MOD_BALLOONING_NAME "balloon"
 
+
 /*********************************************************************************************************************************
 *   Local Structures                                                                                                             *
 *********************************************************************************************************************************/
@@ -65,117 +66,115 @@ static const RTGETOPTDEF g_aBalloonOpts[] = {
 typedef struct VBOXWATCHDOG_BALLOONCTRL_PAYLOAD
 {
     /** Last (most recent) ballooning size reported by the guest. */
-    unsigned long ulBalloonCurLast;
+    uint32_t cMbBalloonCurLast;
     /** Last (most recent) ballooning request received. */
-    unsigned long ulBalloonReqLast;
+    uint32_t cMbBalloonReqLast;
 } VBOXWATCHDOG_BALLOONCTRL_PAYLOAD, *PVBOXWATCHDOG_BALLOONCTRL_PAYLOAD;
 
+
 /*********************************************************************************************************************************
 *   Globals                                                                                                                      *
 *********************************************************************************************************************************/
 
-static unsigned long g_ulMemoryBalloonTimeoutMS    = 30 * 1000;
-static unsigned long g_ulMemoryBalloonIncrementMB  = 256;
-static unsigned long g_ulMemoryBalloonDecrementMB  = 128;
+static uint32_t g_cMsMemoryBalloonTimeout    = 30 * 1000;
+static uint32_t g_cMbMemoryBalloonIncrement  = 256;
+static uint32_t g_cMbMemoryBalloonDecrement  = 128;
 /** Command line: Global balloon limit (in MB) for all VMs. Default is 0, which means
  *  no global limit is set. See balloonGetMaxSize() for more information. */
-static unsigned long g_ulMemoryBalloonMaxMB        = 0;
-static unsigned long g_ulMemoryBalloonLowerLimitMB = 128;
-static unsigned long g_ulMemoryBalloonSafetyMB     = 1024;
+static uint32_t g_cMbMemoryBalloonMax        = 0;
+static uint32_t g_cMbMemoryBalloonLowerLimit = 128;
+static uint32_t g_cbMemoryBalloonSafety     = 1024;
+
 
 /*********************************************************************************************************************************
 *   Local Function Prototypes                                                                                                    *
 *********************************************************************************************************************************/
-static int balloonSetSize(PVBOXWATCHDOG_MACHINE pMachine, unsigned long ulBalloonCur);
+static int balloonSetSize(PVBOXWATCHDOG_MACHINE pMachine, uint32_t cMbBalloonCur);
 
 /**
  * Retrieves the current delta value
  *
- * @return  long                Delta (MB) of the balloon to be deflated (<0) or inflated (>0).
+ * @return  Delta (MB) of the balloon to be deflated (<0) or inflated (>0).
  * @param   pMachine            Pointer to the machine's internal structure.
- * @param   ulGuestMemFree      The guest's current free memory (MB).
- * @param   ulBalloonOld        The balloon's current (old) size (MB).
- * @param   ulBalloonNew        The balloon's new size (MB).
- * @param   ulBalloonMax        The maximum ballooning size (MB) it can inflate to.
+ * @param   uGuestMemFree       The guest's current free memory (MB).
+ * @param   cMbBalloonOld         The balloon's current (old) size (MB).
+ * @param   uBalloonNew         The balloon's new size (MB).
+ * @param   uBalloonMax         The maximum ballooning size (MB) it can inflate to.
  */
-static long balloonGetDelta(PVBOXWATCHDOG_MACHINE pMachine,
-                            unsigned long ulGuestMemFree,
-                            unsigned long ulBalloonOld, unsigned long ulBalloonNew, unsigned long ulBalloonMax)
+static int32_t balloonGetDelta(PVBOXWATCHDOG_MACHINE pMachine, uint32_t cMbGuestMemFree,
+                               uint32_t cMbBalloonOld, uint32_t cMbBalloonNew, uint32_t cMbBalloonMax)
 {
-    serviceLogVerbose(("[%ls] ulGuestMemFree=%RU32, ulBalloonOld=%RU32, ulBalloonNew=%RU32, ulBalloonMax=%RU32\n",
-                       pMachine->strName.raw(), ulGuestMemFree, ulBalloonOld, ulBalloonNew, ulBalloonMax));
+    serviceLogVerbose(("[%ls] cMbGuestMemFree=%RU32, cMbBalloonOld=%RU32, cMbBalloonNew=%RU32, cMbBalloonMax=%RU32\n",
+                       pMachine->strName.raw(), cMbGuestMemFree, cMbBalloonOld, cMbBalloonNew, cMbBalloonMax));
 
     /* Make sure that the requested new ballooning size does not
      * exceed the maximum ballooning size (if set). */
-    if (   ulBalloonMax
-        && (ulBalloonNew > ulBalloonMax))
-    {
-        ulBalloonNew = ulBalloonMax;
-    }
+    if (   cMbBalloonMax
+        && cMbBalloonNew > cMbBalloonMax)
+        cMbBalloonNew = cMbBalloonMax;
 
-    long lBalloonDelta = 0;
-    if (ulGuestMemFree < g_ulMemoryBalloonLowerLimitMB)
+    int32_t cMbBalloonDelta = 0;
+    if (cMbGuestMemFree < g_cMbMemoryBalloonLowerLimit)
     {
         /* Guest is running low on memory, we need to
          * deflate the balloon. */
-        lBalloonDelta = (g_ulMemoryBalloonDecrementMB * -1);
+        cMbBalloonDelta = g_cMbMemoryBalloonDecrement * -1;
 
         /* Ensure that the delta will not return a negative
          * balloon size. */
-        if ((long)ulBalloonOld + lBalloonDelta < 0)
-            lBalloonDelta = 0;
+        if ((int32_t)cMbBalloonOld + cMbBalloonDelta < 0)
+            cMbBalloonDelta = 0;
     }
-    else if (ulBalloonNew > ulBalloonOld) /* Inflate. */
+    else if (cMbBalloonNew > cMbBalloonOld) /* Inflate. */
     {
         /* We want to inflate the balloon if we have room. */
-        unsigned long ulIncrement = g_ulMemoryBalloonIncrementMB;
-        while (ulIncrement >= 16 && (ulGuestMemFree - ulIncrement) < g_ulMemoryBalloonLowerLimitMB)
-            ulIncrement = (ulIncrement / 2);
+        uint32_t cMbIncrement = g_cMbMemoryBalloonIncrement;
+        while (   cMbIncrement >= 16
+               && cMbGuestMemFree - cMbIncrement < g_cMbMemoryBalloonLowerLimit)
+            cMbIncrement /= 2;
 
-        if ((ulGuestMemFree - ulIncrement) > g_ulMemoryBalloonLowerLimitMB)
-            lBalloonDelta = (long)ulIncrement;
+        if ((cMbGuestMemFree - cMbIncrement) > g_cMbMemoryBalloonLowerLimit)
+            cMbBalloonDelta = (int32_t)cMbIncrement;
 
         /* Make sure we're still within bounds. */
-        Assert(lBalloonDelta >= 0);
-        if (ulBalloonOld + lBalloonDelta > ulBalloonNew)
-            lBalloonDelta = RT_MIN(g_ulMemoryBalloonIncrementMB, ulBalloonNew - ulBalloonOld);
+        Assert(cMbBalloonDelta >= 0);
+        if (cMbBalloonOld + cMbBalloonDelta > cMbBalloonNew)
+            cMbBalloonDelta = RT_MIN(g_cMbMemoryBalloonIncrement, cMbBalloonNew - cMbBalloonOld);
     }
-    else if (ulBalloonNew < ulBalloonOld) /* Deflate. */
+    else if (cMbBalloonNew < cMbBalloonOld) /* Deflate. */
     {
-        lBalloonDelta = RT_MIN(g_ulMemoryBalloonDecrementMB, ulBalloonOld - ulBalloonNew) * -1;
+        cMbBalloonDelta = RT_MIN(g_cMbMemoryBalloonDecrement, cMbBalloonOld - cMbBalloonNew) * -1;
     }
 
     /* Limit the ballooning to the available host memory, leaving some free.
      * If anything fails clamp the delta to 0. */
-    if (lBalloonDelta < 0)
+    if (cMbBalloonDelta < 0)
     {
-        uint64_t cbSafety = (uint64_t)g_ulMemoryBalloonSafetyMB * _1M;
+        uint64_t cbSafety = (uint64_t)g_cbMemoryBalloonSafety * _1M;
         uint64_t cbHostRamAvail = 0;
         int vrc = RTSystemQueryAvailableRam(&cbHostRamAvail);
         if (RT_SUCCESS(vrc))
         {
             if (cbHostRamAvail < cbSafety)
-                lBalloonDelta = 0;
-            else if ((uint64_t)(-lBalloonDelta) > (cbHostRamAvail - cbSafety) / _1M)
-                lBalloonDelta = -(long)((cbHostRamAvail - cbSafety) / _1M);
+                cMbBalloonDelta = 0;
+            else if ((uint64_t)(-cMbBalloonDelta) > (cbHostRamAvail - cbSafety) / _1M)
+                cMbBalloonDelta = -(int32_t)((cbHostRamAvail - cbSafety) / _1M);
         }
         else
-            lBalloonDelta = 0;
+            cMbBalloonDelta = 0;
     }
 
-    return lBalloonDelta;
+    return cMbBalloonDelta;
 }
 
 /**
  * Determines the maximum balloon size to set for the specified machine.
  *
- * @return  unsigned long           Maximum ballooning size (in MB), 0 if no maximum set.
+ * @return  Maximum ballooning size (in MB), 0 if no maximum set.
  * @param   pMachine                Machine to determine maximum ballooning size for.
  */
-static unsigned long balloonGetMaxSize(PVBOXWATCHDOG_MACHINE pMachine)
+static uint32_t balloonGetMaxSize(PVBOXWATCHDOG_MACHINE pMachine)
 {
-    const ComPtr<IMachine> &rptrMachine = pMachine->machine;
-
     /*
      * Is a maximum ballooning size set? Make sure we're within bounds.
      *
@@ -185,7 +184,7 @@ static unsigned long balloonGetMaxSize(PVBOXWATCHDOG_MACHINE pMachine)
      *
      * Precedence from top to bottom.
      */
-    unsigned long ulBalloonMax = 0;
+    uint32_t cMbBalloonMax = 0;
     char szSource[64];
 
     Bstr strValue;
@@ -194,22 +193,22 @@ static unsigned long balloonGetMaxSize(PVBOXWATCHDOG_MACHINE pMachine)
     if (   SUCCEEDED(hr)
         && strValue.isNotEmpty())
     {
-        ulBalloonMax = Utf8Str(strValue).toUInt32();
+        cMbBalloonMax = Utf8Str(strValue).toUInt32();
         if (g_fVerbose)
             RTStrPrintf(szSource, sizeof(szSource), "global extra-data");
     }
 
     if (strValue.isEmpty())
     {
-        Assert(ulBalloonMax == 0);
+        Assert(cMbBalloonMax == 0);
 
-        ulBalloonMax = g_ulMemoryBalloonMaxMB;
+        cMbBalloonMax = g_cMbMemoryBalloonMax;
         if (g_fVerbose)
             RTStrPrintf(szSource, sizeof(szSource), "command line");
     }
 
-    serviceLogVerbose(("[%ls] Maximum balloning size is (%s): %RU32MB\n", pMachine->strName.raw(), szSource, ulBalloonMax));
-    return ulBalloonMax;
+    serviceLogVerbose(("[%ls] Maximum balloning size is (%s): %RU32MB\n", pMachine->strName.raw(), szSource, cMbBalloonMax));
+    return cMbBalloonMax;
 }
 
 /**
@@ -217,17 +216,17 @@ static unsigned long balloonGetMaxSize(PVBOXWATCHDOG_MACHINE pMachine)
  *
  * @return  IPRT status code.
  * @param   pMachine                Machine to determine maximum ballooning size for.
- * @param   pulBalloonCur           Where to store the current (set) balloon size (in MB) on success.
+ * @param   pcMbBalloonCur          Where to store the current (set) balloon
+ *                                  size (in MB) on success.
  */
-static int balloonGetCurrentSize(PVBOXWATCHDOG_MACHINE pMachine, unsigned long *pulBalloonCur)
+static int balloonGetCurrentSize(PVBOXWATCHDOG_MACHINE pMachine, uint32_t *pcMbBalloonCur)
 {
-    LONG lBalloonCur;
-    int vrc = getMetric(pMachine, L"Guest/RAM/Usage/Balloon", &lBalloonCur);
+    LONG cKbBalloonCur;
+    int vrc = getMetric(pMachine, L"Guest/RAM/Usage/Balloon", &cKbBalloonCur);
     if (RT_SUCCESS(vrc))
     {
-        lBalloonCur /= 1024; /* Convert to MB. */
-        if (pulBalloonCur)
-            *pulBalloonCur = (unsigned long)lBalloonCur;
+        if (pcMbBalloonCur)
+            *pcMbBalloonCur = (uint32_t)(cKbBalloonCur / 1024);
     }
 
     return vrc;
@@ -236,10 +235,10 @@ static int balloonGetCurrentSize(PVBOXWATCHDOG_MACHINE pMachine, unsigned long *
 /**
  * Determines the requested balloon size to set for the specified machine.
  *
- * @return  unsigned long           Requested ballooning size (in MB), 0 if ballooning should be disabled.
+ * @return  Requested ballooning size (in MB), 0 if ballooning should be disabled.
  * @param   pMachine                Machine to determine maximum ballooning size for.
  */
-static unsigned long balloonGetRequestedSize(PVBOXWATCHDOG_MACHINE pMachine)
+static uint32_t balloonGetRequestedSize(PVBOXWATCHDOG_MACHINE pMachine)
 {
     const ComPtr<IMachine> &rptrMachine = pMachine->machine;
 
@@ -250,7 +249,7 @@ static unsigned long balloonGetRequestedSize(PVBOXWATCHDOG_MACHINE pMachine)
      *
      * Precedence from top to bottom.
      */
-    unsigned long ulBalloonReq = 0;
+    uint32_t cMbBalloonReq = 0;
     char szSource[64];
 
     Bstr strValue;
@@ -259,7 +258,7 @@ static unsigned long balloonGetRequestedSize(PVBOXWATCHDOG_MACHINE pMachine)
     if (   SUCCEEDED(hr)
         && strValue.isNotEmpty())
     {
-        ulBalloonReq = Utf8Str(strValue).toUInt32();
+        cMbBalloonReq = Utf8Str(strValue).toUInt32();
         if (g_fVerbose)
             RTStrPrintf(szSource, sizeof(szSource), "per-VM extra-data");
     }
@@ -270,7 +269,7 @@ static unsigned long balloonGetRequestedSize(PVBOXWATCHDOG_MACHINE pMachine)
         if (   SUCCEEDED(hr)
             && strValue.isNotEmpty())
         {
-            ulBalloonReq = Utf8Str(strValue).toUInt32();
+            cMbBalloonReq = Utf8Str(strValue).toUInt32();
             if (g_fVerbose)
                 RTStrPrintf(szSource, sizeof(szSource), "per-VM extra-data (legacy)");
         }
@@ -279,13 +278,13 @@ static unsigned long balloonGetRequestedSize(PVBOXWATCHDOG_MACHINE pMachine)
     if (   FAILED(hr)
         || strValue.isEmpty())
     {
-        ulBalloonReq = 0;
+        cMbBalloonReq = 0;
         if (g_fVerbose)
             RTStrPrintf(szSource, sizeof(szSource), "none (disabled)");
     }
 
-    serviceLogVerbose(("[%ls] Requested balloning size is (%s): %RU32MB\n", pMachine->strName.raw(), szSource, ulBalloonReq));
-    return ulBalloonReq;
+    serviceLogVerbose(("[%ls] Requested balloning size is (%s): %RU32MB\n", pMachine->strName.raw(), szSource, cMbBalloonReq));
+    return cMbBalloonReq;
 }
 
 /**
@@ -398,7 +397,7 @@ int balloonMachineSetup(const Bstr& strUuid)
                                              ComSafeArrayAsOutParam(metricAffected)));
 #endif
         if (FAILED(rc))
-            vrc = VERR_COM_IPRT_ERROR; /* @todo Find better rc! */
+            vrc = VERR_COM_IPRT_ERROR; /** @todo Find better rc! */
 
     } while (0);
 
@@ -419,17 +418,17 @@ static int balloonMachineUpdate(PVBOXWATCHDOG_MACHINE pMachine)
     /*
      * Get metrics collected at this point.
      */
-    LONG lGuestMemFree;
-    unsigned long ulBalloonCur;
+    LONG cKbGuestMemFree;
+    uint32_t cMbBalloonCur = 0;
 
-    int vrc = getMetric(pMachine, L"Guest/RAM/Usage/Free", &lGuestMemFree);
+    int vrc = getMetric(pMachine, L"Guest/RAM/Usage/Free", &cKbGuestMemFree);
     if (RT_SUCCESS(vrc))
-        vrc = balloonGetCurrentSize(pMachine, &ulBalloonCur);
+        vrc = balloonGetCurrentSize(pMachine, &cMbBalloonCur);
 
     if (RT_SUCCESS(vrc))
     {
         /* If guest statistics are not up and running yet, skip this iteration and try next time. */
-        if (lGuestMemFree <= 0)
+        if (cKbGuestMemFree <= 0)
         {
 #ifdef DEBUG
             serviceLogVerbose(("[%ls] No metrics available yet!\n", pMachine->strName.raw()));
@@ -437,55 +436,54 @@ static int balloonMachineUpdate(PVBOXWATCHDOG_MACHINE pMachine)
             return VINF_SUCCESS;
         }
 
-        lGuestMemFree /= 1024;
+        uint32_t cMbGuestMemFree = (ULONG)cKbGuestMemFree / 1024;
 
-        PVBOXWATCHDOG_BALLOONCTRL_PAYLOAD pData = (PVBOXWATCHDOG_BALLOONCTRL_PAYLOAD)
-                                                  payloadFrom(pMachine, VBOX_MOD_BALLOONING_NAME);
+        PVBOXWATCHDOG_BALLOONCTRL_PAYLOAD pData;
+        pData = (PVBOXWATCHDOG_BALLOONCTRL_PAYLOAD)payloadFrom(pMachine, VBOX_MOD_BALLOONING_NAME);
         AssertPtr(pData);
 
         /* Determine if ballooning is enabled or disabled. */
         bool fEnabled = balloonIsEnabled(pMachine);
 
         /* Determine the current set maximum balloon size. */
-        unsigned long ulBalloonMax = balloonGetMaxSize(pMachine);
+        uint32_t cMbBalloonMax = balloonGetMaxSize(pMachine);
 
         /* Determine the requested balloon size. */
-        unsigned long ulBalloonReq = balloonGetRequestedSize(pMachine);
+        uint32_t cMbBalloonReq = balloonGetRequestedSize(pMachine);
 
         serviceLogVerbose(("[%ls] Free RAM (MB): %RI32, Ballooning: Current=%RU32MB, Requested=%RU32MB, Maximum=%RU32MB\n",
-                           pMachine->strName.raw(), lGuestMemFree, ulBalloonCur, ulBalloonReq, ulBalloonMax));
+                           pMachine->strName.raw(), cMbGuestMemFree, cMbBalloonCur, cMbBalloonReq, cMbBalloonMax));
 
-        if (   ulBalloonMax
-            && (ulBalloonReq > ulBalloonMax))
+        if (   cMbBalloonMax
+            && cMbBalloonReq > cMbBalloonMax)
         {
-            if (pData->ulBalloonReqLast != ulBalloonReq)
+            if (pData->cMbBalloonReqLast != cMbBalloonReq)
                 serviceLog("[%ls] Warning: Requested ballooning size (%RU32MB) exceeds set maximum ballooning size (%RU32MB), limiting ...\n",
-                           pMachine->strName.raw(), ulBalloonReq, ulBalloonMax);
+                           pMachine->strName.raw(), cMbBalloonReq, cMbBalloonMax);
         }
 
         /* Calculate current balloon delta. */
-        long lBalloonDelta = balloonGetDelta(pMachine,
-                                             (unsigned long)lGuestMemFree, ulBalloonCur, ulBalloonReq, ulBalloonMax);
+        int32_t cMbBalloonDelta = balloonGetDelta(pMachine, cMbGuestMemFree, cMbBalloonCur, cMbBalloonReq, cMbBalloonMax);
 #ifdef DEBUG
-        serviceLogVerbose(("[%ls] lBalloonDelta=%RI32\n", pMachine->strName.raw(), lBalloonDelta));
+        serviceLogVerbose(("[%ls] cMbBalloonDelta=%RI32\n", pMachine->strName.raw(), cMbBalloonDelta));
 #endif
-        if (lBalloonDelta) /* Only do ballooning if there's really smth. to change ... */
+        if (cMbBalloonDelta) /* Only do ballooning if there's really smth. to change ... */
         {
-            ulBalloonCur = ulBalloonCur + lBalloonDelta;
+            cMbBalloonCur = cMbBalloonCur + cMbBalloonDelta;
 
             if (fEnabled)
             {
                 serviceLog("[%ls] %s balloon by %RU32MB to %RU32MB ...\n",
-                           pMachine->strName.raw(), lBalloonDelta > 0 ? "Inflating" : "Deflating", RT_ABS(lBalloonDelta), ulBalloonCur);
-                vrc = balloonSetSize(pMachine, ulBalloonCur);
+                           pMachine->strName.raw(), cMbBalloonDelta > 0 ? "Inflating" : "Deflating", RT_ABS(cMbBalloonDelta), cMbBalloonCur);
+                vrc = balloonSetSize(pMachine, cMbBalloonCur);
             }
             else
                 serviceLogVerbose(("[%ls] Requested %s balloon by %RU32MB to %RU32MB, but ballooning is disabled\n",
-                                   pMachine->strName.raw(), lBalloonDelta > 0 ? "inflating" : "deflating",
-                                   RT_ABS(lBalloonDelta), ulBalloonCur));
+                                   pMachine->strName.raw(), cMbBalloonDelta > 0 ? "inflating" : "deflating",
+                                   RT_ABS(cMbBalloonDelta), cMbBalloonCur));
         }
 
-        if (ulBalloonCur != pData->ulBalloonCurLast)
+        if (cMbBalloonCur != pData->cMbBalloonCurLast)
         {
             /* If ballooning is disabled, always bolt down the ballooning size to 0. */
             if (!fEnabled)
@@ -497,8 +495,8 @@ static int balloonMachineUpdate(PVBOXWATCHDOG_MACHINE pMachine)
             }
         }
 
-        pData->ulBalloonCurLast = ulBalloonCur;
-        pData->ulBalloonReqLast = ulBalloonReq;
+        pData->cMbBalloonCurLast = cMbBalloonCur;
+        pData->cMbBalloonReqLast = cMbBalloonReq;
     }
     else
         serviceLog("[%ls] Error retrieving metrics, rc=%Rrc\n", pMachine->strName.raw(), vrc);
@@ -506,11 +504,11 @@ static int balloonMachineUpdate(PVBOXWATCHDOG_MACHINE pMachine)
     return vrc;
 }
 
-static int balloonSetSize(PVBOXWATCHDOG_MACHINE pMachine, unsigned long ulBalloonCur)
+static int balloonSetSize(PVBOXWATCHDOG_MACHINE pMachine, uint32_t cMbBalloonCur)
 {
     int vrc = VINF_SUCCESS;
 
-    serviceLogVerbose(("[%ls] Setting balloon size to %RU32MB ...\n", pMachine->strName.raw(), ulBalloonCur));
+    serviceLogVerbose(("[%ls] Setting balloon size to %RU32MB ...\n", pMachine->strName.raw(), cMbBalloonCur));
 
     if (g_fDryrun)
         return VINF_SUCCESS;
@@ -528,10 +526,10 @@ static int balloonSetSize(PVBOXWATCHDOG_MACHINE pMachine, unsigned long ulBalloo
         ComPtr <IGuest> guest;
         rc = console->COMGETTER(Guest)(guest.asOutParam());
         if (SUCCEEDED(rc))
-            CHECK_ERROR_BREAK(guest, COMSETTER(MemoryBalloonSize)((LONG)ulBalloonCur));
+            CHECK_ERROR_BREAK(guest, COMSETTER(MemoryBalloonSize)((LONG)cMbBalloonCur));
         else
             serviceLog("Error: Unable to set new balloon size %RU32 for machine '%ls', rc=%Rhrc\n",
-                       ulBalloonCur, pMachine->strName.raw(), rc);
+                       cMbBalloonCur, pMachine->strName.raw(), rc);
         if (FAILED(rc))
             vrc = VERR_COM_IPRT_ERROR;
 
@@ -574,11 +572,11 @@ static DECLCALLBACK(int) VBoxModBallooningOption(int argc, char *argv[], int *pi
         switch (c)
         {
             case GETOPTDEF_BALLOONCTRL_BALLOONDEC:
-                g_ulMemoryBalloonDecrementMB = ValueUnion.u32;
+                g_cMbMemoryBalloonDecrement = ValueUnion.u32;
                 break;
 
             case GETOPTDEF_BALLOONCTRL_BALLOONINC:
-                g_ulMemoryBalloonIncrementMB = ValueUnion.u32;
+                g_cMbMemoryBalloonIncrement = ValueUnion.u32;
                 break;
 
             case GETOPTDEF_BALLOONCTRL_GROUPS:
@@ -586,23 +584,23 @@ static DECLCALLBACK(int) VBoxModBallooningOption(int argc, char *argv[], int *pi
                 break;
 
             case GETOPTDEF_BALLOONCTRL_BALLOONLOWERLIMIT:
-                g_ulMemoryBalloonLowerLimitMB = ValueUnion.u32;
+                g_cMbMemoryBalloonLowerLimit = ValueUnion.u32;
                 break;
 
             case GETOPTDEF_BALLOONCTRL_BALLOONMAX:
-                g_ulMemoryBalloonMaxMB = ValueUnion.u32;
+                g_cMbMemoryBalloonMax = ValueUnion.u32;
                 break;
 
             case GETOPTDEF_BALLOONCTRL_BALLOONSAFETY:
-                g_ulMemoryBalloonSafetyMB = ValueUnion.u32;
+                g_cbMemoryBalloonSafety = ValueUnion.u32;
                 break;
 
             /** @todo This option is a common module option! Put
              *        this into a utility function! */
             case GETOPTDEF_BALLOONCTRL_TIMEOUTMS:
-                g_ulMemoryBalloonTimeoutMS = ValueUnion.u32;
-                if (g_ulMemoryBalloonTimeoutMS < 500)
-                    g_ulMemoryBalloonTimeoutMS = 500;
+                g_cMsMemoryBalloonTimeout = ValueUnion.u32;
+                if (g_cMsMemoryBalloonTimeout < 500)
+                    g_cMsMemoryBalloonTimeout = 500;
                 break;
 
             default:
@@ -621,35 +619,40 @@ static DECLCALLBACK(int) VBoxModBallooningOption(int argc, char *argv[], int *pi
 
 static DECLCALLBACK(int) VBoxModBallooningInit(void)
 {
-    if (!g_ulMemoryBalloonTimeoutMS)
-        cfgGetValueULong(g_pVirtualBox, NULL /* Machine */,
-                         "VBoxInternal2/Watchdog/BalloonCtrl/TimeoutMS", NULL /* Per-machine */,
-                         &g_ulMemoryBalloonTimeoutMS, 30 * 1000 /* Default is 30 seconds timeout. */);
-
-    if (!g_ulMemoryBalloonIncrementMB)
-        cfgGetValueULong(g_pVirtualBox, NULL /* Machine */,
-                         "VBoxInternal2/Watchdog/BalloonCtrl/BalloonIncrementMB", NULL /* Per-machine */,
-                         &g_ulMemoryBalloonIncrementMB, 256);
-
-    if (!g_ulMemoryBalloonDecrementMB)
-        cfgGetValueULong(g_pVirtualBox, NULL /* Machine */,
-                         "VBoxInternal2/Watchdog/BalloonCtrl/BalloonDecrementMB", NULL /* Per-machine */,
-                         &g_ulMemoryBalloonDecrementMB, 128);
-
-    if (!g_ulMemoryBalloonLowerLimitMB)
-        cfgGetValueULong(g_pVirtualBox, NULL /* Machine */,
-                         "VBoxInternal2/Watchdog/BalloonCtrl/BalloonLowerLimitMB", NULL /* Per-machine */,
-                         &g_ulMemoryBalloonLowerLimitMB, 128);
+    if (!g_cMsMemoryBalloonTimeout)
+        cfgGetValueU32(g_pVirtualBox, NULL /* Machine */,
+                       "VBoxInternal2/Watchdog/BalloonCtrl/TimeoutMS", NULL /* Per-machine */,
+                       &g_cMsMemoryBalloonTimeout, 30 * 1000 /* Default is 30 seconds timeout. */);
+
+    if (!g_cMbMemoryBalloonIncrement)
+        cfgGetValueU32(g_pVirtualBox, NULL /* Machine */,
+                       "VBoxInternal2/Watchdog/BalloonCtrl/BalloonIncrementMB", NULL /* Per-machine */,
+                       &g_cMbMemoryBalloonIncrement, 256);
+
+    if (!g_cMbMemoryBalloonDecrement)
+        cfgGetValueU32(g_pVirtualBox, NULL /* Machine */,
+                       "VBoxInternal2/Watchdog/BalloonCtrl/BalloonDecrementMB", NULL /* Per-machine */,
+                       &g_cMbMemoryBalloonDecrement, 128);
+
+    if (!g_cMbMemoryBalloonLowerLimit)
+        cfgGetValueU32(g_pVirtualBox, NULL /* Machine */,
+                       "VBoxInternal2/Watchdog/BalloonCtrl/BalloonLowerLimitMB", NULL /* Per-machine */,
+                       &g_cMbMemoryBalloonLowerLimit, 128);
 
     return VINF_SUCCESS;
 }
 
 static DECLCALLBACK(int) VBoxModBallooningMain(void)
 {
-    static uint64_t s_msLast = RTTimeMilliTS();
-    uint64_t msDelta = RTTimeMilliTS() - s_msLast;
-    if (msDelta <= g_ulMemoryBalloonTimeoutMS)
-        return VINF_SUCCESS;
+    static uint64_t s_msLast = UINT64_MAX;
+    if (s_msLast == UINT64_MAX)
+        s_msLast = RTTimeMilliTS();
+    else
+    {
+        uint64_t msDelta = RTTimeMilliTS() - s_msLast;
+        if (msDelta <= g_cMsMemoryBalloonTimeout)
+            return VINF_SUCCESS;
+    }
 
     int rc = VINF_SUCCESS;
 
@@ -711,6 +714,8 @@ static DECLCALLBACK(int) VBoxModBallooningOnMachineUnregistered(const Bstr &strU
 static DECLCALLBACK(int) VBoxModBallooningOnMachineStateChanged(const Bstr &strUuid,
                                                                 MachineState_T enmState)
 {
+    RT_NOREF(enmState);
+
     PVBOXWATCHDOG_MACHINE pMachine = getMachine(strUuid);
     /* Note: The machine state will change to "setting up" when machine gets deleted,
      *       so pMachine might be NULL here. */
@@ -722,6 +727,7 @@ static DECLCALLBACK(int) VBoxModBallooningOnMachineStateChanged(const Bstr &strU
 
 static DECLCALLBACK(int) VBoxModBallooningOnServiceStateChanged(bool fAvailable)
 {
+    RT_NOREF(fAvailable);
     return VINF_SUCCESS;
 }
 
diff --git a/src/VBox/Frontends/VBoxBalloonCtrl/VBoxWatchdog.cpp b/src/VBox/Frontends/VBoxBalloonCtrl/VBoxWatchdog.cpp
index 3310464..981e9d3 100644
--- a/src/VBox/Frontends/VBoxBalloonCtrl/VBoxWatchdog.cpp
+++ b/src/VBox/Frontends/VBoxBalloonCtrl/VBoxWatchdog.cpp
@@ -304,6 +304,7 @@ static void signalHandler(int iSignal)
     }
 }
 
+#if 0 /** @todo signal handler installer / uninstallers are unused. */
 /**
  * Installs a custom signal handler to get notified
  * whenever the user wants to intercept the program.
@@ -326,6 +327,7 @@ static void signalHandlerUninstall()
     signal(SIGBREAK, SIG_DFL);
 #endif
 }
+#endif /* unused */
 
 /**
  * Adds a specified machine to the list (map) of handled machines.
@@ -369,8 +371,7 @@ static int machineAdd(const Bstr &strUuid)
         int rc2 = groupAdd(m.groups, strGroups.c_str(), 0 /* Flags */);
         AssertRC(rc2);
 
-        mapVMIter it = g_mapVM.find(strUuid);
-        Assert(it == g_mapVM.end());
+        Assert(g_mapVM.find(strUuid) == g_mapVM.end());
         g_mapVM.insert(std::make_pair(strUuid, m));
         serviceLogVerbose(("Added machine \"%ls\"\n", strUuid.raw()));
 
@@ -419,7 +420,7 @@ static int machineAdd(const Bstr &strUuid)
 
     /** @todo Add std exception handling! */
 
-    return SUCCEEDED(rc) ? VINF_SUCCESS : VERR_COM_IPRT_ERROR; /* @todo Find a better error! */
+    return SUCCEEDED(rc) ? VINF_SUCCESS : VERR_COM_IPRT_ERROR; /** @todo Find a better error! */
 }
 
 static int machineDestroy(const Bstr &strUuid)
@@ -682,7 +683,7 @@ static int watchdogShutdownModules()
     return rc;
 }
 
-static RTEXITCODE watchdogMain(HandlerArg *a)
+static RTEXITCODE watchdogMain(/*HandlerArg *a */)
 {
     HRESULT rc = S_OK;
 
@@ -1179,8 +1180,8 @@ int main(int argc, char *argv[])
     if (RT_FAILURE(rc))
         return RTEXITCODE_FAILURE;
 
-    HandlerArg handlerArg = { argc, argv };
-    RTEXITCODE rcExit = watchdogMain(&handlerArg);
+    //HandlerArg handlerArg = { argc, argv };
+    RTEXITCODE rcExit = watchdogMain(/*&handlerArg*/);
 
     NativeEventQueue::getMainEventQueue()->processEventQueue(0);
 
diff --git a/src/VBox/Frontends/VBoxBalloonCtrl/VBoxWatchdogInternal.h b/src/VBox/Frontends/VBoxBalloonCtrl/VBoxWatchdogInternal.h
index 932e394..ce45b7a 100644
--- a/src/VBox/Frontends/VBoxBalloonCtrl/VBoxWatchdogInternal.h
+++ b/src/VBox/Frontends/VBoxBalloonCtrl/VBoxWatchdogInternal.h
@@ -239,8 +239,8 @@ MachineState_T getMachineState(const PVBOXWATCHDOG_MACHINE pMachine);
 
 int cfgGetValueStr(const ComPtr<IVirtualBox> &rptrVBox, const ComPtr<IMachine> &rptrMachine,
                    const char *pszGlobal, const char *pszVM, Utf8Str &strValue, Utf8Str strDefault);
-int cfgGetValueULong(const ComPtr<IVirtualBox> &rptrVBox, const ComPtr<IMachine> &rptrMachine,
-                     const char *pszGlobal, const char *pszVM, unsigned long *pulValue, unsigned long ulDefault);
+int cfgGetValueU32(const ComPtr<IVirtualBox> &rptrVBox, const ComPtr<IMachine> &rptrMachine,
+                   const char *pszGlobal, const char *pszVM, uint32_t *puValue, uint32_t uDefault);
 RT_C_DECLS_END
 
 #endif /* !___H_VBOXWATCHDOG */
diff --git a/src/VBox/Frontends/VBoxBalloonCtrl/VBoxWatchdogUtils.cpp b/src/VBox/Frontends/VBoxBalloonCtrl/VBoxWatchdogUtils.cpp
index 2d3f032..8a1e9f3 100644
--- a/src/VBox/Frontends/VBoxBalloonCtrl/VBoxWatchdogUtils.cpp
+++ b/src/VBox/Frontends/VBoxBalloonCtrl/VBoxWatchdogUtils.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2012 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -251,18 +251,15 @@ int cfgGetValueStr(const ComPtr<IVirtualBox> &rptrVBox, const ComPtr<IMachine> &
     return VINF_SUCCESS;
 }
 
-int cfgGetValueULong(const ComPtr<IVirtualBox> &rptrVBox, const ComPtr<IMachine> &rptrMachine,
-                     const char *pszGlobal, const char *pszVM, unsigned long *pulValue, unsigned long ulDefault)
+int cfgGetValueU32(const ComPtr<IVirtualBox> &rptrVBox, const ComPtr<IMachine> &rptrMachine,
+                   const char *pszGlobal, const char *pszVM, uint32_t *puValue, uint32_t uDefault)
 {
     Utf8Str strValue;
     int rc = cfgGetValueStr(rptrVBox, rptrMachine, pszGlobal, pszVM, strValue, "" /* Default */);
     if (RT_SUCCESS(rc))
-    {
-        *pulValue = strValue.toUInt32();
-    }
+        *puValue = strValue.toUInt32();
     else
-        *pulValue = ulDefault;
-
+        *puValue = uDefault;
     return rc;
 }
 
diff --git a/src/VBox/Frontends/VBoxBugReport/VBoxBugReport.cpp b/src/VBox/Frontends/VBoxBugReport/VBoxBugReport.cpp
index d3dbdf8..55d053a 100644
--- a/src/VBox/Frontends/VBoxBugReport/VBoxBugReport.cpp
+++ b/src/VBox/Frontends/VBoxBugReport/VBoxBugReport.cpp
@@ -43,9 +43,10 @@
 /* Implementation - Base */
 
 #ifndef RT_OS_WINDOWS
-/* @todo Replace with platform-specific implementations. */
-void createBugReportOsSpecific(BugReport* report, const char *pszHome)
+/** @todo Replace with platform-specific implementations. */
+void createBugReportOsSpecific(BugReport *pReport, const char *pszHome)
 {
+    RT_NOREF(pReport, pszHome);
 }
 #endif /* !RT_OS_WINDOWS */
 
diff --git a/src/VBox/Frontends/VBoxBugReport/VBoxBugReportWin.cpp b/src/VBox/Frontends/VBoxBugReport/VBoxBugReportWin.cpp
index 97a7623..814863b 100644
--- a/src/VBox/Frontends/VBoxBugReport/VBoxBugReportWin.cpp
+++ b/src/VBox/Frontends/VBoxBugReport/VBoxBugReportWin.cpp
@@ -1,7 +1,6 @@
 /* $Id: VBoxBugReportWin.cpp $ */
 /** @file
- * VBoxBugReportWin - VirtualBox command-line diagnostics tool,
- * Windows-specific part.
+ * VBoxBugReportWin - VirtualBox command-line diagnostics tool, Windows-specific part.
  */
 
 /*
@@ -24,7 +23,7 @@
 #include "VBoxBugReport.h"
 
 #include <netcfgx.h>
-#include <setupapi.h>
+#include <iprt/win/setupapi.h>
 #include <initguid.h>
 #include <devguid.h>
 #include <usbiodef.h>
@@ -60,20 +59,20 @@ void BugReportNetworkAdaptersWin::printCharteristics(DWORD dwChars)
     static CharacteristicsName cMap[] =
     {
         { NCF_VIRTUAL, "virtual" },
-	{ NCF_SOFTWARE_ENUMERATED, "software_enumerated" },
-	{ NCF_PHYSICAL, "physical" },
+        { NCF_SOFTWARE_ENUMERATED, "software_enumerated" },
+        { NCF_PHYSICAL, "physical" },
         { NCF_HIDDEN, "hidden" },
-	{ NCF_NO_SERVICE, "no_service" },
-	{ NCF_NOT_USER_REMOVABLE, "not_user_removable" },
-	{ NCF_MULTIPORT_INSTANCED_ADAPTER, "multiport_instanced_adapter" },
-	{ NCF_HAS_UI, "has_ui" },
-	{ NCF_SINGLE_INSTANCE, "single_instance" },
-	{ NCF_FILTER, "filter" },
-	{ NCF_DONTEXPOSELOWER, "dontexposelower" },
-	{ NCF_HIDE_BINDING, "hide_binding" },
-	{ NCF_NDIS_PROTOCOL, "ndis_protocol" },
-	{ NCF_FIXED_BINDING, "fixed_binding" },
-	{ NCF_LW_FILTER, "lw_filter" }
+        { NCF_NO_SERVICE, "no_service" },
+        { NCF_NOT_USER_REMOVABLE, "not_user_removable" },
+        { NCF_MULTIPORT_INSTANCED_ADAPTER, "multiport_instanced_adapter" },
+        { NCF_HAS_UI, "has_ui" },
+        { NCF_SINGLE_INSTANCE, "single_instance" },
+        { NCF_FILTER, "filter" },
+        { NCF_DONTEXPOSELOWER, "dontexposelower" },
+        { NCF_HIDE_BINDING, "hide_binding" },
+        { NCF_NDIS_PROTOCOL, "ndis_protocol" },
+        { NCF_FIXED_BINDING, "fixed_binding" },
+        { NCF_LW_FILTER, "lw_filter" }
     };
     bool fPrintDelim = false;
 
@@ -216,7 +215,7 @@ void BugReportNetworkAdaptersWin::collect(void)
         RTPrintf("ERROR in osCollect: %s\n", e.what());
         throw;
     }
-            
+
 }
 
 
@@ -224,23 +223,27 @@ class ErrorHandler
 {
 public:
     ErrorHandler(const char *pszFunction, int iLine)
-        : m_function(pszFunction), m_line(iLine) {};
+        : m_function(pszFunction), m_line(iLine)
+    { }
+
     void handleWinError(DWORD uError, const char *pszMsgFmt, ...)
+    {
+        if (uError != ERROR_SUCCESS)
         {
-            if (uError != ERROR_SUCCESS)
-            {
-                va_list va;
-                va_start(va, pszMsgFmt);
-                RTCString msgArgs(pszMsgFmt, va);
-                va_end(va);
-                LPSTR pBuf = NULL;
-                DWORD cb = FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
-                                          NULL, uError, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)&pBuf, 0, NULL);
-                RTCStringFmt msg("%s at %s(%d): err=%u %s", msgArgs.c_str(), m_function, m_line, uError, pBuf);
-                LocalFree(pBuf);
-                throw RTCError(msg.c_str());
-            }
-        };
+            va_list va;
+            va_start(va, pszMsgFmt);
+            RTCString msgArgs(pszMsgFmt, va);
+            va_end(va);
+
+            LPSTR pBuf = NULL;
+            FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
+                           NULL, uError, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)&pBuf, 0, NULL);
+            RTCStringFmt msg("%s at %s(%d): err=%u %s", msgArgs.c_str(), m_function, m_line, uError, pBuf);
+            LocalFree(pBuf);
+            throw RTCError(msg.c_str());
+        }
+    }
+
 private:
     const char *m_function;
     int m_line;
@@ -253,15 +256,15 @@ class BugReportUsbTreeWin : public BugReportStream
 public:
     BugReportUsbTreeWin();
     virtual ~BugReportUsbTreeWin();
-    virtual PRTSTREAM getStream(void) { enumerate(); return BugReportStream::getStream(); };
+    virtual PRTSTREAM getStream(void) { enumerate(); return BugReportStream::getStream(); }
 private:
     class AutoHandle {
     public:
-        AutoHandle(HANDLE h) { m_h = h; };
-        ~AutoHandle() { close(); };
-        bool isValid() { return m_h != INVALID_HANDLE_VALUE; };
-        operator HANDLE() { return m_h; };
-        void close(void) { if (isValid()) { CloseHandle(m_h); m_h = INVALID_HANDLE_VALUE; } };
+        AutoHandle(HANDLE h) { m_h = h; }
+        ~AutoHandle() { close(); }
+        bool isValid() { return m_h != INVALID_HANDLE_VALUE; }
+        operator HANDLE() { return m_h; }
+        void close(void)  {   if (isValid()) { CloseHandle(m_h); m_h = INVALID_HANDLE_VALUE; }    }
     private:
         HANDLE m_h;
     };
@@ -318,7 +321,7 @@ PBYTE BugReportUsbTreeWin::getDeviceRegistryProperty(HDEVINFO hDev,
     }
     if (uExpectedType != REG_NONE && uActualType != uExpectedType)
         throw RTCError(RTCStringFmt("SetupDiGetDeviceRegistryProperty(0x%x) returned type %d instead of %d",
-                                    uActualType, uExpectedType).c_str());    
+                                    uActualType, uExpectedType).c_str());
     PBYTE pBuffer = (PBYTE)RTMemAlloc(cbNeeded);
     if (!pBuffer)
         throw RTCError(RTCStringFmt("Failed to allocate %u bytes", cbNeeded).c_str());
@@ -338,7 +341,6 @@ PBYTE BugReportUsbTreeWin::getDeviceRegistryProperty(HDEVINFO hDev,
 
 RTCString BugReportUsbTreeWin::getDeviceRegistryPropertyString(HDEVINFO hDev, PSP_DEVINFO_DATA pInfoData, DWORD uProperty)
 {
-    DWORD cbString = 0;
     PWSTR pUnicodeString = (PWSTR)getDeviceRegistryProperty(hDev, pInfoData, uProperty, REG_SZ, NULL);
 
     if (!pUnicodeString)
@@ -407,7 +409,7 @@ RTCString BugReportUsbTreeWin::getDriverKeyName(HANDLE hHub, int iPort)
     RTMemFree(pName);
     return strName;
 }
-    
+
 
 RTCString BugReportUsbTreeWin::getExternalHubName(HANDLE hHub, int iPort)
 {
@@ -488,6 +490,7 @@ void BugReportUsbTreeWin::enumerateHub(RTCString strFullName, RTCString strPrefi
 
 void BugReportUsbTreeWin::enumerateController(PSP_DEVINFO_DATA pInfoData, PSP_DEVICE_INTERFACE_DATA pInterfaceData)
 {
+    RT_NOREF(pInterfaceData);
     RTCString strCtrlDesc = getDeviceRegistryPropertyString(m_hDevInfo, pInfoData, SPDRP_DEVICEDESC);
     printf("%s\n", strCtrlDesc.c_str());
 
@@ -560,6 +563,7 @@ void BugReportUsbTreeWin::enumerate()
 
 void createBugReportOsSpecific(BugReport* report, const char *pszHome)
 {
+    RT_NOREF(pszHome);
     WCHAR szWinDir[MAX_PATH];
 
     int cbNeeded = GetWindowsDirectory(szWinDir, RT_ELEMENTS(szWinDir));
diff --git a/src/VBox/Frontends/VBoxFB/Framebuffer.cpp b/src/VBox/Frontends/VBoxFB/Framebuffer.cpp
index bac3d94..9f24ed0 100644
--- a/src/VBox/Frontends/VBoxFB/Framebuffer.cpp
+++ b/src/VBox/Frontends/VBoxFB/Framebuffer.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VBoxFB/Framebuffer.h b/src/VBox/Frontends/VBoxFB/Framebuffer.h
index 959d4c0..5a4a716 100644
--- a/src/VBox/Frontends/VBoxFB/Framebuffer.h
+++ b/src/VBox/Frontends/VBoxFB/Framebuffer.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VBoxFB/Helper.cpp b/src/VBox/Frontends/VBoxFB/Helper.cpp
index dd552ff..00b161c 100644
--- a/src/VBox/Frontends/VBoxFB/Helper.cpp
+++ b/src/VBox/Frontends/VBoxFB/Helper.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VBoxFB/Helper.h b/src/VBox/Frontends/VBoxFB/Helper.h
index ffad3f9..2000794 100644
--- a/src/VBox/Frontends/VBoxFB/Helper.h
+++ b/src/VBox/Frontends/VBoxFB/Helper.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VBoxFB/Makefile.kmk b/src/VBox/Frontends/VBoxFB/Makefile.kmk
index 4f523b2..a5f7b8b 100644
--- a/src/VBox/Frontends/VBoxFB/Makefile.kmk
+++ b/src/VBox/Frontends/VBoxFB/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VBoxFB/VBoxFB.cpp b/src/VBox/Frontends/VBoxFB/VBoxFB.cpp
index cfb30b1..e326935 100644
--- a/src/VBox/Frontends/VBoxFB/VBoxFB.cpp
+++ b/src/VBox/Frontends/VBoxFB/VBoxFB.cpp
@@ -8,7 +8,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VBoxFB/VBoxFB.h b/src/VBox/Frontends/VBoxFB/VBoxFB.h
index 553f5a0..26b03b7 100644
--- a/src/VBox/Frontends/VBoxFB/VBoxFB.h
+++ b/src/VBox/Frontends/VBoxFB/VBoxFB.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VBoxHeadless/Makefile.kmk b/src/VBox/Frontends/VBoxHeadless/Makefile.kmk
index 2a73793..9114ea3 100644
--- a/src/VBox/Frontends/VBoxHeadless/Makefile.kmk
+++ b/src/VBox/Frontends/VBoxHeadless/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp b/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp
index 8bf71aa..025f752 100644
--- a/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp
+++ b/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp
@@ -613,6 +613,7 @@ static void hideSetUidRootFromAppKit()
  */
 extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
 {
+    RT_NOREF(envp);
     const char *vrdePort = NULL;
     const char *vrdeAddress = NULL;
     const char *vrdeEnabled = NULL;
diff --git a/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.rc b/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.rc
index e11eb9c..3501601 100644
--- a/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.rc
+++ b/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VBoxHeadless/VBoxHeadlessHardened.cpp b/src/VBox/Frontends/VBoxHeadless/VBoxHeadlessHardened.cpp
index 2d05ed7..6196daa 100644
--- a/src/VBox/Frontends/VBoxHeadless/VBoxHeadlessHardened.cpp
+++ b/src/VBox/Frontends/VBoxHeadless/VBoxHeadlessHardened.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2010 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VBoxHeadless/testcase/Makefile.kmk b/src/VBox/Frontends/VBoxHeadless/testcase/Makefile.kmk
index 253dc92..a0ece61 100644
--- a/src/VBox/Frontends/VBoxHeadless/testcase/Makefile.kmk
+++ b/src/VBox/Frontends/VBoxHeadless/testcase/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VBoxManage/Makefile.kmk b/src/VBox/Frontends/VBoxManage/Makefile.kmk
index 6500af6..076678a 100644
--- a/src/VBox/Frontends/VBoxManage/Makefile.kmk
+++ b/src/VBox/Frontends/VBoxManage/Makefile.kmk
@@ -28,9 +28,9 @@ VBOX_COMMON_VBOXMANAGE_DEFS = \
  	$(if $(VBOX_WITH_HGCM), VBOX_WITH_HGCM) \
  	$(if $(VBOX_WITH_HOSTNETIF_API), VBOX_WITH_HOSTNETIF_API) \
  	$(if $(VBOX_WITH_NETFLT), VBOX_WITH_NETFLT) \
-	$(if $(VBOX_WITH_OSS), VBOX_WITH_OSS) \
-	$(if $(VBOX_WITH_ALSA), VBOX_WITH_ALSA) \
- 	$(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE) \
+	$(if $(VBOX_WITH_AUDIO_OSS), VBOX_WITH_AUDIO_OSS) \
+	$(if $(VBOX_WITH_AUDIO_ALSA), VBOX_WITH_AUDIO_ALSA) \
+ 	$(if $(VBOX_WITH_AUDIO_PULSE),VBOX_WITH_AUDIO_PULSE) \
  	$(if $(VBOX_WITH_SCSI), VBOX_WITH_SCSI) \
  	$(if $(VBOX_WITH_VBOXSDL), VBOX_WITH_VBOXSDL) \
  	$(if $(VBOX_WITH_VIDEOHWACCEL), VBOX_WITH_VIDEOHWACCEL) \
diff --git a/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp b/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp
index d4cd202..d53f5de 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp
+++ b/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp
@@ -8,7 +8,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -49,7 +49,7 @@
 
 /* Includes for the raw disk stuff. */
 #ifdef RT_OS_WINDOWS
-# include <windows.h>
+# include <iprt/win/windows.h>
 # include <winioctl.h>
 #elif defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) \
     || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD)
@@ -452,6 +452,7 @@ static HRESULT SetInt64(ComPtr<IMachine> pMachine, const char *pszKeyBase, const
  */
 static RTEXITCODE CmdLoadSyms(int argc, char **argv, ComPtr<IVirtualBox> aVirtualBox, ComPtr<ISession> aSession)
 {
+    RT_NOREF(aSession);
     HRESULT rc;
 
     /*
@@ -467,7 +468,7 @@ static RTEXITCODE CmdLoadSyms(int argc, char **argv, ComPtr<IVirtualBox> aVirtua
     const char *pszFilename;
     int64_t     offDelta = 0;
     const char *pszModule = NULL;
-    uint64_t    ModuleAddress = ~0;
+    uint64_t    ModuleAddress = UINT64_MAX;
     uint64_t    ModuleSize = 0;
 
     /* filename */
@@ -528,6 +529,7 @@ static RTEXITCODE CmdLoadSyms(int argc, char **argv, ComPtr<IVirtualBox> aVirtua
  */
 static RTEXITCODE CmdLoadMap(int argc, char **argv, ComPtr<IVirtualBox> aVirtualBox, ComPtr<ISession> aSession)
 {
+    RT_NOREF(aSession);
     HRESULT rc;
 
     /*
@@ -600,6 +602,7 @@ static RTEXITCODE CmdLoadMap(int argc, char **argv, ComPtr<IVirtualBox> aVirtual
 
 static DECLCALLBACK(void) handleVDError(void *pvUser, int rc, RT_SRC_POS_DECL, const char *pszFormat, va_list va)
 {
+    RT_NOREF(pvUser);
     RTMsgErrorV(pszFormat, va);
     RTMsgError("Error code %Rrc at %s(%u) in function %s", rc, RT_SRC_POS_ARGS);
 }
@@ -612,6 +615,7 @@ static DECLCALLBACK(int) handleVDMessage(void *pvUser, const char *pszFormat, va
 
 static RTEXITCODE CmdSetHDUUID(int argc, char **argv, ComPtr<IVirtualBox> aVirtualBox, ComPtr<ISession> aSession)
 {
+    RT_NOREF(aVirtualBox, aSession);
     Guid uuid;
     RTUUID rtuuid;
     enum eUuidType {
@@ -690,6 +694,8 @@ static RTEXITCODE CmdSetHDUUID(int argc, char **argv, ComPtr<IVirtualBox> aVirtu
 
 static RTEXITCODE CmdDumpHDInfo(int argc, char **argv, ComPtr<IVirtualBox> aVirtualBox, ComPtr<ISession> aSession)
 {
+    RT_NOREF(aVirtualBox, aSession);
+
     /* we need exactly one parameter: the image file */
     if (argc != 1)
     {
@@ -768,6 +774,7 @@ static int partRead(RTFILE File, PHOSTPARTITIONS pPart)
 
             /** @todo r=bird: C have this handy concept called structures which
              *        greatly simplify data access...  (Someone is really lazy here!) */
+#if 0 /* unused */
             uint64_t firstUsableLBA     = RT_MAKE_U64_FROM_U8(partitionTableHeader[40],
                                                               partitionTableHeader[41],
                                                               partitionTableHeader[42],
@@ -777,6 +784,7 @@ static int partRead(RTFILE File, PHOSTPARTITIONS pPart)
                                                               partitionTableHeader[46],
                                                               partitionTableHeader[47]
                                                               );
+#endif
             lastUsableLBA               = RT_MAKE_U64_FROM_U8(partitionTableHeader[48],
                                                               partitionTableHeader[49],
                                                               partitionTableHeader[50],
@@ -1068,6 +1076,7 @@ static int partRead(RTFILE File, PHOSTPARTITIONS pPart)
 
 static RTEXITCODE CmdListPartitions(int argc, char **argv, ComPtr<IVirtualBox> aVirtualBox, ComPtr<ISession> aSession)
 {
+    RT_NOREF(aVirtualBox, aSession);
     Utf8Str rawdisk;
 
     /* let's have a closer look at the arguments */
@@ -1142,6 +1151,7 @@ static PVBOXHDDRAWPARTDESC appendPartDesc(uint32_t *pcPartDescs, PVBOXHDDRAWPART
 
 static RTEXITCODE CmdCreateRawVMDK(int argc, char **argv, ComPtr<IVirtualBox> aVirtualBox, ComPtr<ISession> aSession)
 {
+    RT_NOREF(aVirtualBox, aSession);
     HRESULT rc = S_OK;
     Utf8Str filename;
     const char *pszMBRFilename = NULL;
@@ -1861,6 +1871,7 @@ out:
 
 static RTEXITCODE CmdRenameVMDK(int argc, char **argv, ComPtr<IVirtualBox> aVirtualBox, ComPtr<ISession> aSession)
 {
+    RT_NOREF(aVirtualBox, aSession);
     Utf8Str src;
     Utf8Str dst;
     /* Parse the arguments. */
@@ -1927,6 +1938,7 @@ static RTEXITCODE CmdRenameVMDK(int argc, char **argv, ComPtr<IVirtualBox> aVirt
 
 static RTEXITCODE CmdConvertToRaw(int argc, char **argv, ComPtr<IVirtualBox> aVirtualBox, ComPtr<ISession> aSession)
 {
+    RT_NOREF(aVirtualBox, aSession);
     Utf8Str srcformat;
     Utf8Str src;
     Utf8Str dst;
@@ -1978,7 +1990,7 @@ static RTEXITCODE CmdConvertToRaw(int argc, char **argv, ComPtr<IVirtualBox> aVi
                              NULL, sizeof(VDINTERFACEERROR), &pVDIfs);
     AssertRC(vrc);
 
-    /** @todo: Support convert to raw for floppy and DVD images too. */
+    /** @todo Support convert to raw for floppy and DVD images too. */
     vrc = VDCreate(pVDIfs, VDTYPE_HDD, &pDisk);
     if (RT_FAILURE(vrc))
         return RTMsgErrorExit(RTEXITCODE_FAILURE, "Cannot create the virtual disk container: %Rrc", vrc);
@@ -2082,6 +2094,7 @@ static RTEXITCODE CmdConvertToRaw(int argc, char **argv, ComPtr<IVirtualBox> aVi
 
 static RTEXITCODE CmdConvertHardDisk(int argc, char **argv, ComPtr<IVirtualBox> aVirtualBox, ComPtr<ISession> aSession)
 {
+    RT_NOREF(aVirtualBox, aSession);
     Utf8Str srcformat;
     Utf8Str dstformat;
     Utf8Str src;
@@ -2213,11 +2226,11 @@ static RTEXITCODE CmdConvertHardDisk(int argc, char **argv, ComPtr<IVirtualBox>
  */
 static RTEXITCODE CmdRepairHardDisk(int argc, char **argv, ComPtr<IVirtualBox> aVirtualBox, ComPtr<ISession> aSession)
 {
+    RT_NOREF(aVirtualBox, aSession);
     Utf8Str image;
     Utf8Str format;
     int vrc;
     bool fDryRun = false;
-    PVBOXHDD pDisk = NULL;
 
     /* Parse the arguments. */
     for (int i = 0; i < argc; i++)
@@ -2432,6 +2445,8 @@ static RTEXITCODE CmdDebugLog(int argc, char **argv, ComPtr<IVirtualBox> aVirtua
  */
 static RTEXITCODE CmdGeneratePasswordHash(int argc, char **argv, ComPtr<IVirtualBox> aVirtualBox, ComPtr<ISession> aSession)
 {
+    RT_NOREF(aVirtualBox, aSession);
+
     /* one parameter, the password to hash */
     if (argc != 1)
         return errorSyntax(USAGE_PASSWORDHASH, "password to hash required");
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManage.h b/src/VBox/Frontends/VBoxManage/VBoxManage.h
index 16b65de..bfebd8a 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxManage.h
+++ b/src/VBox/Frontends/VBoxManage/VBoxManage.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManage.rc b/src/VBox/Frontends/VBoxManage/VBoxManage.rc
index 910473a..305d4e7 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxManage.rc
+++ b/src/VBox/Frontends/VBoxManage/VBoxManage.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageAppliance.cpp b/src/VBox/Frontends/VBoxManage/VBoxManageAppliance.cpp
index 7bc77bf..512fe40 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxManageAppliance.cpp
+++ b/src/VBox/Frontends/VBoxManage/VBoxManageAppliance.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2014 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -423,7 +423,7 @@ RTEXITCODE handleImportAppliance(HandlerArg *arg)
                                 RTPrintf("%2u: Suggested OS type: \"%ls\""
                                         "\n    (change with \"--vsys %u --ostype <type>\"; use \"list ostypes\" to list all possible values)\n",
                                         a, bstrFinalValue.raw(), i);
-                        break;
+                            break;
 
                         case VirtualSystemDescriptionType_Name:
                             if (findArgValue(strOverride, pmapArgs, "vmname"))
@@ -436,32 +436,32 @@ RTEXITCODE handleImportAppliance(HandlerArg *arg)
                                 RTPrintf("%2u: Suggested VM name \"%ls\""
                                         "\n    (change with \"--vsys %u --vmname <name>\")\n",
                                         a, bstrFinalValue.raw(), i);
-                        break;
+                            break;
 
                         case VirtualSystemDescriptionType_Product:
                             RTPrintf("%2u: Product (ignored): %ls\n",
                                      a, aVBoxValues[a]);
-                        break;
+                            break;
 
                         case VirtualSystemDescriptionType_ProductUrl:
                             RTPrintf("%2u: ProductUrl (ignored): %ls\n",
                                      a, aVBoxValues[a]);
-                        break;
+                            break;
 
                         case VirtualSystemDescriptionType_Vendor:
                             RTPrintf("%2u: Vendor (ignored): %ls\n",
                                      a, aVBoxValues[a]);
-                        break;
+                            break;
 
                         case VirtualSystemDescriptionType_VendorUrl:
                             RTPrintf("%2u: VendorUrl (ignored): %ls\n",
                                      a, aVBoxValues[a]);
-                        break;
+                            break;
 
                         case VirtualSystemDescriptionType_Version:
                             RTPrintf("%2u: Version (ignored): %ls\n",
                                      a, aVBoxValues[a]);
-                        break;
+                            break;
 
                         case VirtualSystemDescriptionType_Description:
                             if (findArgValue(strOverride, pmapArgs, "description"))
@@ -474,7 +474,7 @@ RTEXITCODE handleImportAppliance(HandlerArg *arg)
                                 RTPrintf("%2u: Description \"%ls\""
                                         "\n    (change with \"--vsys %u --description <desc>\")\n",
                                         a, bstrFinalValue.raw(), i);
-                        break;
+                            break;
 
                         case VirtualSystemDescriptionType_License:
                             ++cLicensesInTheWay;
@@ -502,7 +502,7 @@ RTEXITCODE handleImportAppliance(HandlerArg *arg)
                                         "\n    (display with \"--vsys %u --eula show\";"
                                         "\n    accept with \"--vsys %u --eula accept\")\n",
                                         a, i, i);
-                        break;
+                            break;
 
                         case VirtualSystemDescriptionType_CPU:
                             if (findArgValue(strOverride, pmapArgs, "cpus"))
@@ -525,7 +525,7 @@ RTEXITCODE handleImportAppliance(HandlerArg *arg)
                             else
                                 RTPrintf("%2u: Number of CPUs: %ls\n    (change with \"--vsys %u --cpus <n>\")\n",
                                          a, bstrFinalValue.raw(), i);
-                        break;
+                            break;
 
                         case VirtualSystemDescriptionType_Memory:
                         {
@@ -545,8 +545,8 @@ RTEXITCODE handleImportAppliance(HandlerArg *arg)
                             else
                                 RTPrintf("%2u: Guest memory: %ls MB\n    (change with \"--vsys %u --memory <MB>\")\n",
                                          a, bstrFinalValue.raw(), i);
+                            break;
                         }
-                        break;
 
                         case VirtualSystemDescriptionType_HardDiskControllerIDE:
                             if (fIgnoreThis)
@@ -562,7 +562,7 @@ RTEXITCODE handleImportAppliance(HandlerArg *arg)
                                          a,
                                          aVBoxValues[a],
                                          i, a);
-                        break;
+                            break;
 
                         case VirtualSystemDescriptionType_HardDiskControllerSATA:
                             if (fIgnoreThis)
@@ -578,7 +578,7 @@ RTEXITCODE handleImportAppliance(HandlerArg *arg)
                                         a,
                                         aVBoxValues[a],
                                         i, a);
-                        break;
+                            break;
 
                         case VirtualSystemDescriptionType_HardDiskControllerSAS:
                             if (fIgnoreThis)
@@ -594,7 +594,7 @@ RTEXITCODE handleImportAppliance(HandlerArg *arg)
                                         a,
                                         aVBoxValues[a],
                                         i, a);
-                        break;
+                            break;
 
                         case VirtualSystemDescriptionType_HardDiskControllerSCSI:
                             if (fIgnoreThis)
@@ -623,7 +623,7 @@ RTEXITCODE handleImportAppliance(HandlerArg *arg)
                                             aVBoxValues[a],
                                             i, a, i, a);
                             }
-                        break;
+                            break;
 
                         case VirtualSystemDescriptionType_HardDiskImage:
                             if (fIgnoreThis)
@@ -783,7 +783,7 @@ RTEXITCODE handleImportAppliance(HandlerArg *arg)
                                             i, a, i, a);
                                 }
                             }
-                        break;
+                            break;
 
                         case VirtualSystemDescriptionType_CDROM:
                             if (fIgnoreThis)
@@ -796,7 +796,7 @@ RTEXITCODE handleImportAppliance(HandlerArg *arg)
                                 RTPrintf("%2u: CD-ROM"
                                         "\n    (disable with \"--vsys %u --unit %u --ignore\")\n",
                                         a, i, a);
-                        break;
+                            break;
 
                         case VirtualSystemDescriptionType_Floppy:
                             if (fIgnoreThis)
@@ -809,15 +809,15 @@ RTEXITCODE handleImportAppliance(HandlerArg *arg)
                                 RTPrintf("%2u: Floppy"
                                         "\n    (disable with \"--vsys %u --unit %u --ignore\")\n",
                                         a, i, a);
-                        break;
+                            break;
 
                         case VirtualSystemDescriptionType_NetworkAdapter:
-                            RTPrintf("%2u: Network adapter: orig %ls, config %ls, extra %ls\n",   // @todo implement once we have a plan for the back-end
+                            RTPrintf("%2u: Network adapter: orig %ls, config %ls, extra %ls\n",   /// @todo implement once we have a plan for the back-end
                                      a,
                                      aOvfValues[a],
                                      aVBoxValues[a],
                                      aExtraConfigValues[a]);
-                        break;
+                            break;
 
                         case VirtualSystemDescriptionType_USBController:
                             if (fIgnoreThis)
@@ -830,7 +830,7 @@ RTEXITCODE handleImportAppliance(HandlerArg *arg)
                                 RTPrintf("%2u: USB controller"
                                         "\n    (disable with \"--vsys %u --unit %u --ignore\")\n",
                                         a, i, a);
-                        break;
+                            break;
 
                         case VirtualSystemDescriptionType_SoundCard:
                             if (fIgnoreThis)
@@ -847,7 +847,16 @@ RTEXITCODE handleImportAppliance(HandlerArg *arg)
                                         aOvfValues[a],
                                         i,
                                         a);
-                        break;
+                            break;
+
+                        case VirtualSystemDescriptionType_SettingsFile:
+                            /** @todo  VirtualSystemDescriptionType_SettingsFile? */
+                            break;
+                        case VirtualSystemDescriptionType_Miscellaneous:
+                            /** @todo  VirtualSystemDescriptionType_Miscellaneous? */
+                            break;
+                        case VirtualSystemDescriptionType_Ignore:
+                            break;
                     }
 
                     bstrFinalValue.detachTo(&aFinalValues[a]);
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageBandwidthControl.cpp b/src/VBox/Frontends/VBoxManage/VBoxManageBandwidthControl.cpp
index 5b8ee6a..d7eaefc 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxManageBandwidthControl.cpp
+++ b/src/VBox/Frontends/VBoxManage/VBoxManageBandwidthControl.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -305,7 +305,6 @@ static RTEXITCODE handleBandwidthControlList(HandlerArg *pArgs, ComPtr<IBandwidt
  */
 RTEXITCODE handleBandwidthControl(HandlerArg *a)
 {
-    int c = VERR_INTERNAL_ERROR;        /* initialized to shut up gcc */
     HRESULT rc = S_OK;
     ComPtr<IMachine> machine;
     ComPtr<IBandwidthControl> bwCtrl;
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp b/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp
index df1d845..68750f7 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp
+++ b/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -174,7 +174,7 @@ RTEXITCODE handleControlVM(HandlerArg *a)
                 break;
             }
 
-            ClipboardMode_T mode;
+            ClipboardMode_T mode = ClipboardMode_Disabled; /* Shut up MSC */
             if (!strcmp(a->argv[2], "disabled"))
                 mode = ClipboardMode_Disabled;
             else if (!strcmp(a->argv[2], "hosttoguest"))
@@ -204,7 +204,7 @@ RTEXITCODE handleControlVM(HandlerArg *a)
                 break;
             }
 
-            DnDMode_T mode;
+            DnDMode_T mode = DnDMode_Disabled; /* Shup up MSC. */
             if (!strcmp(a->argv[2], "disabled"))
                 mode = DnDMode_Disabled;
             else if (!strcmp(a->argv[2], "hosttoguest"))
@@ -1120,7 +1120,7 @@ RTEXITCODE handleControlVM(HandlerArg *a)
                                                      Bstr(domain).raw(),
                                                      fAllowLocalLogon));
         }
-#if 0 /* TODO: review & remove */
+#if 0 /** @todo review & remove */
         else if (!strcmp(a->argv[1], "dvdattach"))
         {
             Bstr uuid;
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageDHCPServer.cpp b/src/VBox/Frontends/VBoxManage/VBoxManageDHCPServer.cpp
index f6fa526..2a22022 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxManageDHCPServer.cpp
+++ b/src/VBox/Frontends/VBoxManage/VBoxManageDHCPServer.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -63,9 +63,10 @@ struct VmNameSlotKey
     const std::string VmName;
     uint8_t u8Slot;
 
-    VmNameSlotKey(const std::string &aVmName, uint8_t aSlot) :
-      VmName(aVmName),
-      u8Slot(aSlot) {}
+    VmNameSlotKey(const std::string &aVmName, uint8_t aSlot)
+      : VmName(aVmName)
+      , u8Slot(aSlot)
+    {}
 
     bool operator< (const VmNameSlotKey& that) const
     {
@@ -82,38 +83,37 @@ typedef VmSlot2OptionsM::value_type VmSlot2OptionsPair;
 
 typedef std::vector<VmNameSlotKey> VmConfigs;
 
-static const RTGETOPTDEF g_aDHCPIPOptions[]
-    = {
-        { "--netname",          't', RTGETOPT_REQ_STRING },  /* we use 't' instead of 'n' to avoid
-                                                              * 1. the misspelled "-enable" long option to be treated as 'e' (for -enable) + 'n' (for -netname) + "<the_rest_opt>" (for net name)
-                                                              * 2. the misspelled "-netmask" to be treated as 'n' (for -netname) + "<the_rest_opt>" (for net name)
-                                                              */
-        { "-netname",           't', RTGETOPT_REQ_STRING },     // deprecated (if removed check below)
-        { "--ifname",           'f', RTGETOPT_REQ_STRING },  /* we use 'f' instead of 'i' to avoid
-                                                              * 1. the misspelled "-disable" long option to be treated as 'd' (for -disable) + 'i' (for -ifname) + "<the_rest_opt>" (for if name)
-                                                              */
-        { "-ifname",            'f', RTGETOPT_REQ_STRING },     // deprecated
-        { "--ip",               'a', RTGETOPT_REQ_STRING },
-        { "-ip",                'a', RTGETOPT_REQ_STRING },     // deprecated
-        { "--netmask",          'm', RTGETOPT_REQ_STRING },
-        { "-netmask",           'm', RTGETOPT_REQ_STRING },     // deprecated
-        { "--lowerip",          'l', RTGETOPT_REQ_STRING },
-        { "-lowerip",           'l', RTGETOPT_REQ_STRING },     // deprecated
-        { "--upperip",          'u', RTGETOPT_REQ_STRING },
-        { "-upperip",           'u', RTGETOPT_REQ_STRING },     // deprecated
-        { "--enable",           'e', RTGETOPT_REQ_NOTHING },
-        { "-enable",            'e', RTGETOPT_REQ_NOTHING },    // deprecated
-        { "--disable",          'd', RTGETOPT_REQ_NOTHING },
-        { "-disable",           'd', RTGETOPT_REQ_NOTHING },     // deprecated
-        { "--options",          'o', RTGETOPT_REQ_NOTHING },
-        {"--vm",                'n', RTGETOPT_REQ_STRING}, /* only with -o */
-        {"--slot",              's', RTGETOPT_REQ_UINT8}, /* only with -o and -n */
-        {"--id",                'i', RTGETOPT_REQ_UINT8}, /* only with -o */
-        {"--value",             'p', RTGETOPT_REQ_STRING} /* only with -i */
-
-      };
-
-static RTEXITCODE handleOp(HandlerArg *a, OPCODE enmCode, int iStart, int *pcProcessed)
+static const RTGETOPTDEF g_aDHCPIPOptions[] =
+{
+    { "--netname",          't', RTGETOPT_REQ_STRING },  /* we use 't' instead of 'n' to avoid
+                                                          * 1. the misspelled "-enable" long option to be treated as 'e' (for -enable) + 'n' (for -netname) + "<the_rest_opt>" (for net name)
+                                                          * 2. the misspelled "-netmask" to be treated as 'n' (for -netname) + "<the_rest_opt>" (for net name)
+                                                          */
+    { "-netname",           't', RTGETOPT_REQ_STRING },     // deprecated (if removed check below)
+    { "--ifname",           'f', RTGETOPT_REQ_STRING },  /* we use 'f' instead of 'i' to avoid
+                                                          * 1. the misspelled "-disable" long option to be treated as 'd' (for -disable) + 'i' (for -ifname) + "<the_rest_opt>" (for if name)
+                                                          */
+    { "-ifname",            'f', RTGETOPT_REQ_STRING },     // deprecated
+    { "--ip",               'a', RTGETOPT_REQ_STRING },
+    { "-ip",                'a', RTGETOPT_REQ_STRING },     // deprecated
+    { "--netmask",          'm', RTGETOPT_REQ_STRING },
+    { "-netmask",           'm', RTGETOPT_REQ_STRING },     // deprecated
+    { "--lowerip",          'l', RTGETOPT_REQ_STRING },
+    { "-lowerip",           'l', RTGETOPT_REQ_STRING },     // deprecated
+    { "--upperip",          'u', RTGETOPT_REQ_STRING },
+    { "-upperip",           'u', RTGETOPT_REQ_STRING },     // deprecated
+    { "--enable",           'e', RTGETOPT_REQ_NOTHING },
+    { "-enable",            'e', RTGETOPT_REQ_NOTHING },    // deprecated
+    { "--disable",          'd', RTGETOPT_REQ_NOTHING },
+    { "-disable",           'd', RTGETOPT_REQ_NOTHING },     // deprecated
+    { "--options",          'o', RTGETOPT_REQ_NOTHING },
+    { "--vm",               'n', RTGETOPT_REQ_STRING}, /* only with -o */
+    { "--slot",             's', RTGETOPT_REQ_UINT8}, /* only with -o and -n */
+    { "--id",               'i', RTGETOPT_REQ_UINT8}, /* only with -o */
+    { "--value",            'p', RTGETOPT_REQ_STRING} /* only with -i */
+};
+
+static RTEXITCODE handleOp(HandlerArg *a, OPCODE enmCode, int iStart)
 {
     if (a->argc - iStart < 2)
         return errorSyntax(USAGE_DHCPSERVER, "Not enough parameters");
@@ -441,13 +441,12 @@ RTEXITCODE handleDHCPServer(HandlerArg *a)
         return errorSyntax(USAGE_DHCPSERVER, "Not enough parameters");
 
     RTEXITCODE rcExit;
-    int cProcessed;
     if (strcmp(a->argv[0], "modify") == 0)
-        rcExit = handleOp(a, OP_MODIFY, 1, &cProcessed);
+        rcExit = handleOp(a, OP_MODIFY, 1);
     else if (strcmp(a->argv[0], "add") == 0)
-        rcExit = handleOp(a, OP_ADD, 1, &cProcessed);
+        rcExit = handleOp(a, OP_ADD, 1);
     else if (strcmp(a->argv[0], "remove") == 0)
-        rcExit = handleOp(a, OP_REMOVE, 1, &cProcessed);
+        rcExit = handleOp(a, OP_REMOVE, 1);
     else
         rcExit = errorSyntax(USAGE_DHCPSERVER, "Invalid parameter '%s'", Utf8Str(a->argv[0]).c_str());
 
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageDebugVM.cpp b/src/VBox/Frontends/VBoxManage/VBoxManageDebugVM.cpp
index 9aa16ad..ce2552f 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxManageDebugVM.cpp
+++ b/src/VBox/Frontends/VBoxManage/VBoxManageDebugVM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp b/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp
index e6dc510..b6f9356 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp
+++ b/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -48,6 +48,7 @@ using namespace com;
 
 static DECLCALLBACK(void) handleVDError(void *pvUser, int rc, RT_SRC_POS_DECL, const char *pszFormat, va_list va)
 {
+    RT_NOREF(pvUser);
     RTMsgErrorV(pszFormat, va);
     RTMsgError("Error code %Rrc at %s(%u) in function %s", rc, RT_SRC_POS_ARGS);
 }
@@ -492,7 +493,7 @@ RTEXITCODE handleModifyMedium(HandlerArg *a)
         CMD_FLOPPY
     } cmd = CMD_NONE;
     ComPtr<IMedium> pMedium;
-    MediumType_T enmMediumType;
+    MediumType_T enmMediumType = MediumType_Normal; /* Shut up MSC */
     bool AutoReset = false;
     SafeArray<BSTR> mediumPropNames;
     SafeArray<BSTR> mediumPropValues;
@@ -1675,7 +1676,6 @@ RTEXITCODE handleMediumProperty(HandlerArg *a)
         }
         else if (!RTStrICmp(pszAction, "delete"))
         {
-            const char *pszValue = a->argv[3];
             CHECK_ERROR(pMedium, SetProperty(Bstr(pszProperty).raw(), Bstr().raw()));
             /** @todo */
         }
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp b/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp
index 49d4ced..e0f5005 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp
+++ b/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp
@@ -250,7 +250,7 @@ class SOURCEFILEENTRY
                 }
             }
 
-            return VINF_SUCCESS; /* @todo */
+            return VINF_SUCCESS; /** @todo */
         }
 
     private:
@@ -928,7 +928,7 @@ static RTEXITCODE gctlCtxInitGuestSession(PGCTLCMDCTX pCtx)
          */
         if (pCtx->cVerbose)
             RTPrintf("Waiting for guest session to start...\n");
-        GuestSessionWaitResult_T enmWaitResult;
+        GuestSessionWaitResult_T enmWaitResult = GuestSessionWaitResult_None; /* Shut up MSC */
         try
         {
             com::SafeArray<GuestSessionWaitForFlag_T> aSessionWaitFlags;
@@ -1158,7 +1158,6 @@ static void gctlCtxTerm(PGCTLCMDCTX pCtx)
  */
 static RTEXITCODE gctlRunCalculateExitCode(ProcessStatus_T enmStatus, ULONG uExitCode, bool fReturnExitCodes)
 {
-    int vrc = RTEXITCODE_SUCCESS;
     switch (enmStatus)
     {
         case ProcessStatus_TerminatedNormally:
@@ -1304,6 +1303,7 @@ static RTMSINTERVAL gctlRunGetRemainingTime(uint64_t u64StartMs, RTMSINTERVAL cM
  */
 static RTEXITCODE gctlHandleRunCommon(PGCTLCMDCTX pCtx, int argc, char **argv, bool fRunCmd, uint32_t fHelp)
 {
+    RT_NOREF(fHelp);
     AssertPtrReturn(pCtx, RTEXITCODE_FAILURE);
 
     /*
@@ -1345,9 +1345,9 @@ static RTEXITCODE gctlHandleRunCommon(PGCTLCMDCTX pCtx, int argc, char **argv, b
     int                     ch;
     RTGETOPTUNION           ValueUnion;
     RTGETOPTSTATE           GetState;
-    size_t                  cOptions =
-    RTGetOptInit(&GetState, argc, argv, s_aOptions, RT_ELEMENTS(s_aOptions) - (fRunCmd ? 0 : 6),
-                 1, RTGETOPTINIT_FLAGS_OPTS_FIRST);
+    int vrc = RTGetOptInit(&GetState, argc, argv, s_aOptions, RT_ELEMENTS(s_aOptions) - (fRunCmd ? 0 : 6),
+                           1, RTGETOPTINIT_FLAGS_OPTS_FIRST);
+    AssertRC(vrc);
 
     com::SafeArray<ProcessCreateFlag_T>     aCreateFlags;
     com::SafeArray<ProcessWaitForFlag_T>    aWaitFlags;
@@ -1547,8 +1547,8 @@ static RTEXITCODE gctlHandleRunCommon(PGCTLCMDCTX pCtx, int argc, char **argv, b
             bool            fReadStdErr = false;
             bool            fCompleted  = false;
             bool            fCompletedStartCmd = false;
-            int             vrc         = VINF_SUCCESS;
 
+            vrc = VINF_SUCCESS;
             while (   !fCompleted
                    && cMsTimeLeft > 0)
             {
@@ -1764,6 +1764,7 @@ static int gctlCopyContextCreate(PGCTLCMDCTX pCtx, bool fDryRun, bool fHostToGue
                                  const Utf8Str &strSessionName,
                                  PCOPYCONTEXT *ppContext)
 {
+    RT_NOREF(strSessionName);
     AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
 
     int vrc = VINF_SUCCESS;
@@ -1867,7 +1868,7 @@ static int gctlCopyTranslatePath(const char *pszSourceRoot, const char *pszSourc
     return vrc;
 }
 
-#ifdef DEBUG_andy
+#ifdef DEBUG_andy_disabled
 static int tstTranslatePath()
 {
     RTAssertSetMayPanic(false /* Do not freak out, please. */);
@@ -1925,7 +1926,7 @@ static int tstTranslatePath()
         }
     }
 
-    return VINF_SUCCESS; /* @todo */
+    return VINF_SUCCESS; /** @todo */
 }
 #endif
 
@@ -2014,6 +2015,7 @@ static int gctlCopyDirExists(PCOPYCONTEXT pContext, bool fOnGuest,
     return vrc;
 }
 
+#if 0 /* unused */
 /**
  * Checks whether a specific directory exists on the destination, based
  * on the current copy context.
@@ -2030,6 +2032,7 @@ static int gctlCopyDirExistsOnDest(PCOPYCONTEXT pContext, const char *pszDir,
     return gctlCopyDirExists(pContext, pContext->fHostToGuest,
                              pszDir, fExists);
 }
+#endif /* unused */
 
 /**
  * Checks whether a specific directory exists on the source, based
@@ -2081,6 +2084,7 @@ static int gctlCopyFileExists(PCOPYCONTEXT pContext, bool bOnGuest,
     return vrc;
 }
 
+#if 0 /* unused */
 /**
  * Checks whether a specific file exists on the destination, based on the
  * current copy context.
@@ -2097,6 +2101,7 @@ static int gctlCopyFileExistsOnDest(PCOPYCONTEXT pContext, const char *pszFile,
     return gctlCopyFileExists(pContext, pContext->fHostToGuest,
                               pszFile, fExists);
 }
+#endif /* unused */
 
 /**
  * Checks whether a specific file exists on the source, based on the
@@ -2669,7 +2674,7 @@ static RTEXITCODE gctlHandleCopy(PGCTLCMDCTX pCtx, int argc, char **argv, bool f
     Utf8Str strSource;
     const char *pszDst = NULL;
     enum gctlCopyFlags enmFlags = kGctlCopyFlags_None;
-    bool fCopyRecursive = false;
+    /*bool fCopyRecursive = false; - unused */
     bool fDryRun = false;
     uint32_t uUsage = fHostToGuest ? USAGE_GSTCTRL_COPYTO : USAGE_GSTCTRL_COPYFROM;
 
@@ -3280,7 +3285,7 @@ static DECLCALLBACK(RTEXITCODE) gctlHandleMv(PGCTLCMDCTX pCtx, int argc, char **
         Utf8Str strCurSource = (*it);
 
         ComPtr<IGuestFsObjInfo> pFsObjInfo;
-        FsObjType_T enmObjType;
+        FsObjType_T enmObjType = FsObjType_Unknown; /* Shut up MSC */
         rc = pCtx->pGuestSession->FsObjQueryInfo(Bstr(strCurSource).raw(), FALSE /*followSymlinks*/, pFsObjInfo.asOutParam());
         if (SUCCEEDED(rc))
             rc = pFsObjInfo->COMGETTER(Type)(&enmObjType);
@@ -3548,7 +3553,7 @@ static DECLCALLBACK(RTEXITCODE) gctlHandleStat(PGCTLCMDCTX pCtx, int argc, char
                     break;
             }
 
-            /** @todo: Show more information about this element. */
+            /** @todo Show more information about this element. */
         }
 
         ++it;
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.h b/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.h
index e40722a..53474d8 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.h
+++ b/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrlListener.cpp b/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrlListener.cpp
index b220efe..4d46ee2 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrlListener.cpp
+++ b/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrlListener.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageGuestProp.cpp b/src/VBox/Frontends/VBoxManage/VBoxManageGuestProp.cpp
index 979a313..a9f64a6 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxManageGuestProp.cpp
+++ b/src/VBox/Frontends/VBoxManage/VBoxManageGuestProp.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp b/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
index 57ff152..31c22eb 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
+++ b/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
@@ -140,7 +140,6 @@ static uint32_t printString(PRTSTREAM pStrm, const char *psz, uint32_t cchMaxWid
     else
     {
         /* Figure the paragraph indent level first. */
-        const char * const pszIndent = psz;
         uint32_t cchIndent = 0;
         while (*psz == ' ')
             cchIndent++, psz++;
@@ -801,20 +800,20 @@ void printUsage(USAGECATEGORY fCategory, uint32_t fSubCategory, PRTSTREAM pStrm)
         if (fLinux || fSolaris)
         {
             RTStrmPrintf(pStrm, ""
-#ifdef VBOX_WITH_OSS
+#ifdef VBOX_WITH_AUDIO_OSS
                                 "|oss"
 #endif
-#ifdef VBOX_WITH_ALSA
+#ifdef VBOX_WITH_AUDIO_ALSA
                                 "|alsa"
 #endif
-#ifdef VBOX_WITH_PULSE
+#ifdef VBOX_WITH_AUDIO_PULSE
                                 "|pulse"
 #endif
                         );
         }
         if (fFreeBSD)
         {
-#ifdef VBOX_WITH_OSS
+#ifdef VBOX_WITH_AUDIO_OSS
             /* Get the line break sorted when dumping all option variants. */
             if (fDumpOpts)
             {
@@ -824,7 +823,7 @@ void printUsage(USAGECATEGORY fCategory, uint32_t fSubCategory, PRTSTREAM pStrm)
             else
                 RTStrmPrintf(pStrm, "|oss");
 #endif
-#ifdef VBOX_WITH_PULSE
+#ifdef VBOX_WITH_AUDIO_PULSE
             RTStrmPrintf(pStrm, "|pulse");
 #endif
         }
@@ -1401,7 +1400,9 @@ RTEXITCODE errorSyntax(USAGECATEGORY fCategory, const char *pszFormat, ...)
         printUsageInternal(fCategory, g_pStdErr);
     else
         printUsage(fCategory, ~0U, g_pStdErr);
-#endif /* !VBOX_ONLY_DOCS */
+#else
+    RT_NOREF_PV(fCategory);
+#endif
     va_start(args, pszFormat);
     RTStrmPrintf(g_pStdErr, "\nSyntax error: %N\n", pszFormat, &args);
     va_end(args);
@@ -1421,7 +1422,9 @@ RTEXITCODE errorSyntaxEx(USAGECATEGORY fCategory, uint32_t fSubCategory, const c
         printUsageInternal(fCategory, g_pStdErr);
     else
         printUsage(fCategory, fSubCategory, g_pStdErr);
-#endif /* !VBOX_ONLY_DOCS */
+#else
+    RT_NOREF2(fCategory, fSubCategory);
+#endif
     va_start(args, pszFormat);
     RTStrmPrintf(g_pStdErr, "\nSyntax error: %N\n", pszFormat, &args);
     va_end(args);
@@ -1472,7 +1475,9 @@ RTEXITCODE errorGetOptEx(USAGECATEGORY fCategory, uint32_t fSubCategory, int rc,
         printUsageInternal(fCategory, g_pStdErr);
     else
         printUsage(fCategory, fSubCategory, g_pStdErr);
-#endif /* !VBOX_ONLY_DOCS */
+#else
+    RT_NOREF2(fCategory, fSubCategory);
+#endif
 
     if (rc == VINF_GETOPT_NOT_OPTION)
         return RTMsgErrorExit(RTEXITCODE_SYNTAX, "Invalid parameter '%s'", pValueUnion->psz);
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageHostonly.cpp b/src/VBox/Frontends/VBoxManage/VBoxManageHostonly.cpp
index 084f541..4952200 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxManageHostonly.cpp
+++ b/src/VBox/Frontends/VBoxManage/VBoxManageHostonly.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -67,7 +67,7 @@ static RTEXITCODE handleCreate(HandlerArg *a)
 
     CHECK_ERROR2I_RET(host, CreateHostOnlyNetworkInterface(hif.asOutParam(), progress.asOutParam()), RTEXITCODE_FAILURE);
 
-    HRESULT hrc = showProgress(progress);
+    /*HRESULT hrc =*/ showProgress(progress);
     CHECK_PROGRESS_ERROR_RET(progress, ("Failed to create the host-only adapter"), RTEXITCODE_FAILURE);
 
     Bstr bstrName;
@@ -118,7 +118,7 @@ static RTEXITCODE  handleRemove(HandlerArg *a)
     ComPtr<IProgress> progress;
     CHECK_ERROR2I_RET(host, RemoveHostOnlyNetworkInterface(guid.raw(), progress.asOutParam()), RTEXITCODE_FAILURE);
 
-    HRESULT hrc = showProgress(progress);
+    /*HRESULT hrc =*/ showProgress(progress);
     CHECK_PROGRESS_ERROR_RET(progress, ("Failed to remove the host-only adapter"), RTEXITCODE_FAILURE);
 
     return RTEXITCODE_SUCCESS;
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp b/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
index 392c6d7..4ded051 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
+++ b/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
@@ -260,6 +260,7 @@ inline const char * bwGroupTypeToString(BandwidthGroupType_T enmType)
 {
     switch (enmType)
     {
+        case BandwidthGroupType_Null:    return "Null";
         case BandwidthGroupType_Disk:    return "Disk";
         case BandwidthGroupType_Network: return "Network";
     }
@@ -397,6 +398,8 @@ static const char *paravirtProviderToString(ParavirtProvider_T provider, VMINFO_
    critical and probably won't gain much from the extra optimizing in real life. */
 #if defined(_MSC_VER)
 # pragma optimize("g", off)
+# pragma warning(push)
+# pragma warning(disable: 4748)
 #endif
 
 HRESULT showVMInfo(ComPtr<IVirtualBox> pVirtualBox,
@@ -1077,7 +1080,6 @@ HRESULT showVMInfo(ComPtr<IVirtualBox> pVirtualBox,
                         for (size_t i = 0; i < forwardings.size(); ++i)
                         {
                             bool fSkip = false;
-                            uint16_t port = 0;
                             BSTR r = forwardings[i];
                             Utf8Str utf = Utf8Str(r);
                             Utf8Str strName;
@@ -1643,6 +1645,7 @@ HRESULT showVMInfo(ComPtr<IVirtualBox> pVirtualBox,
                 case AudioCodecType_STAC9221:
                     pszCodec = "STAC9221";
                     break;
+                case AudioCodecType_Null: break; /* Shut up MSC. */
             }
         }
         else
@@ -2711,6 +2714,7 @@ HRESULT showVMInfo(ComPtr<IVirtualBox> pVirtualBox,
 
 #if defined(_MSC_VER)
 # pragma optimize("", on)
+# pragma warning(pop)
 #endif
 
 static const RTGETOPTDEF g_aShowVMInfoOptions[] =
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp b/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp
index f32aaa1..1cd1909 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp
+++ b/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp
@@ -48,8 +48,9 @@ static const char *getHostIfMediumTypeText(HostNetworkInterfaceMediumType_T enmT
         case HostNetworkInterfaceMediumType_Ethernet: return "Ethernet";
         case HostNetworkInterfaceMediumType_PPP: return "PPP";
         case HostNetworkInterfaceMediumType_SLIP: return "SLIP";
+        case HostNetworkInterfaceMediumType_Unknown: return "Unknown";
     }
-    return "Unknown";
+    return "unknown";
 }
 
 static const char *getHostIfStatusText(HostNetworkInterfaceStatus_T enmStatus)
@@ -58,8 +59,9 @@ static const char *getHostIfStatusText(HostNetworkInterfaceStatus_T enmStatus)
     {
         case HostNetworkInterfaceStatus_Up: return "Up";
         case HostNetworkInterfaceStatus_Down: return "Down";
+        case HostNetworkInterfaceStatus_Unknown: return "Unknown";
     }
-    return "Unknown";
+    return "unknown";
 }
 #endif /* VBOX_WITH_HOSTNETIF_API */
 
@@ -70,6 +72,12 @@ static const char*getDeviceTypeText(DeviceType_T enmType)
         case DeviceType_HardDisk: return "HardDisk";
         case DeviceType_DVD: return "DVD";
         case DeviceType_Floppy: return "Floppy";
+        /* Make MSC happy */
+        case DeviceType_Null: return "Null";
+        case DeviceType_Network:        return "Network";
+        case DeviceType_USB:            return "USB";
+        case DeviceType_SharedFolder:   return "SharedFolder";
+        case DeviceType_Graphics3D:     return "Graphics3D";
     }
     return "Unknown";
 }
@@ -117,6 +125,7 @@ static HRESULT listNetworkInterfaces(const ComPtr<IVirtualBox> pVirtualBox,
         CHECK_ERROR(host, FindHostNetworkInterfacesOfType(HostNetworkInterfaceType_HostOnly,
                                                           ComSafeArrayAsOutParam(hostNetworkInterfaces)));
 #else
+    RT_NOREF(fIsBridged);
     CHECK_ERROR(host, COMGETTER(NetworkInterfaces)(ComSafeArrayAsOutParam(hostNetworkInterfaces)));
 #endif
     for (size_t i = 0; i < hostNetworkInterfaces.size(); ++i)
@@ -966,6 +975,7 @@ static HRESULT produceList(enum enmListType enmCommand, bool fOptLong, const Com
                             case MachineState_TeleportingPausedVM:
                                 rc = showVMInfo(pVirtualBox, machines[i], NULL, fOptLong ? VMINFO_STANDARD : VMINFO_COMPACT);
                                 break;
+                            default: break; /* Shut up MSC */
                         }
                     }
                 }
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageMetrics.cpp b/src/VBox/Frontends/VBoxManage/VBoxManageMetrics.cpp
index a6dc29a..22dab2b 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxManageMetrics.cpp
+++ b/src/VBox/Frontends/VBoxManage/VBoxManageMetrics.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -120,8 +120,7 @@ static Bstr toBaseName(Utf8Str& aFullName)
     return Bstr(aFullName);
 }
 
-static Bstr getObjectName(ComPtr<IVirtualBox> aVirtualBox,
-                                  ComPtr<IUnknown> aObject)
+static Bstr getObjectName(ComPtr<IUnknown> aObject)
 {
     HRESULT rc;
 
@@ -140,8 +139,7 @@ static Bstr getObjectName(ComPtr<IVirtualBox> aVirtualBox,
     return Bstr("unknown");
 }
 
-static void listAffectedMetrics(ComPtr<IVirtualBox> aVirtualBox,
-                                ComSafeArrayIn(IPerformanceMetric*, aMetrics))
+static void listAffectedMetrics(ComSafeArrayIn(IPerformanceMetric*, aMetrics))
 {
     HRESULT rc;
     com::SafeIfaceArray<IPerformanceMetric> metrics(ComSafeArrayInArg(aMetrics));
@@ -157,7 +155,7 @@ static void listAffectedMetrics(ComPtr<IVirtualBox> aVirtualBox,
             CHECK_ERROR(metrics[i], COMGETTER(Object)(object.asOutParam()));
             CHECK_ERROR(metrics[i], COMGETTER(MetricName)(metricName.asOutParam()));
             RTPrintf("%-10ls %-20ls\n",
-                getObjectName(aVirtualBox, object).raw(), metricName.raw());
+                getObjectName(object).raw(), metricName.raw());
         }
         RTPrintf("\n");
     }
@@ -209,7 +207,7 @@ static RTEXITCODE handleMetricsList(int argc, char *argv[],
         CHECK_ERROR(metricInfo[i], COMGETTER(Unit)(unit.asOutParam()));
         CHECK_ERROR(metricInfo[i], COMGETTER(Description)(description.asOutParam()));
         RTPrintf("%-15ls %-40ls %-4ls %10d %10d %10u %10u %ls\n",
-            getObjectName(aVirtualBox, object).raw(), metricName.raw(), unit.raw(),
+            getObjectName(object).raw(), metricName.raw(), unit.raw(),
             minimum, maximum, period, count, description.raw());
     }
 
@@ -272,8 +270,7 @@ static RTEXITCODE handleMetricsSetup(int argc, char *argv[],
         return RTEXITCODE_SYNTAX; /** @todo figure out why we must return 2 here. */
 
     if (listMatches)
-        listAffectedMetrics(aVirtualBox,
-                            ComSafeArrayAsInParam(affectedMetrics));
+        listAffectedMetrics(ComSafeArrayAsInParam(affectedMetrics));
 
     return RTEXITCODE_SUCCESS;
 }
@@ -320,7 +317,7 @@ static RTEXITCODE handleMetricsQuery(int argc, char *argv[],
     {
         Bstr metricUnit(retUnits[i]);
         Bstr metricName(retNames[i]);
-        RTPrintf("%-15ls %-40ls ", getObjectName(aVirtualBox, retObjects[i]).raw(), metricName.raw());
+        RTPrintf("%-15ls %-40ls ", getObjectName(retObjects[i]).raw(), metricName.raw());
         const char *separator = "";
         for (unsigned j = 0; j < retLengths[i]; j++)
         {
@@ -468,8 +465,7 @@ static RTEXITCODE handleMetricsCollect(int argc, char *argv[],
         return RTEXITCODE_SYNTAX; /** @todo figure out why we must return 2 here. */
 
     if (listMatches)
-        listAffectedMetrics(aVirtualBox,
-                            ComSafeArrayAsInParam(affectedMetrics));
+        listAffectedMetrics(ComSafeArrayAsInParam(affectedMetrics));
     if (!affectedMetrics.size())
         return RTEXITCODE_FAILURE;
 
@@ -515,7 +511,7 @@ static RTEXITCODE handleMetricsCollect(int argc, char *argv[],
         {
             Bstr metricUnit(retUnits[j]);
             Bstr metricName(retNames[j]);
-            RTPrintf("%-12s %-10ls %-20ls ", ts, getObjectName(aVirtualBox, retObjects[j]).raw(), metricName.raw());
+            RTPrintf("%-12s %-10ls %-20ls ", ts, getObjectName(retObjects[j]).raw(), metricName.raw());
             const char *separator = "";
             for (unsigned k = 0; k < retLengths[j]; k++)
             {
@@ -575,8 +571,7 @@ static RTEXITCODE handleMetricsEnable(int argc, char *argv[],
         return RTEXITCODE_SYNTAX; /** @todo figure out why we must return 2 here. */
 
     if (listMatches)
-        listAffectedMetrics(aVirtualBox,
-                            ComSafeArrayAsInParam(affectedMetrics));
+        listAffectedMetrics(ComSafeArrayAsInParam(affectedMetrics));
 
     return RTEXITCODE_SUCCESS;
 }
@@ -618,8 +613,7 @@ static RTEXITCODE handleMetricsDisable(int argc, char *argv[],
         return RTEXITCODE_SYNTAX; /** @todo figure out why we must return 2 here. */
 
     if (listMatches)
-        listAffectedMetrics(aVirtualBox,
-                            ComSafeArrayAsInParam(affectedMetrics));
+        listAffectedMetrics(ComSafeArrayAsInParam(affectedMetrics));
 
     return RTEXITCODE_SUCCESS;
 }
@@ -653,5 +647,5 @@ RTEXITCODE handleMetrics(HandlerArg *a)
     return rcExit;
 }
 
-#endif /* VBOX_ONLY_DOCS */
+#endif /* !VBOX_ONLY_DOCS */
 
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp b/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp
index 22fd1e8..49b3a16 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp
+++ b/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp b/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
index 75e7ce6..b4d8459 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
+++ b/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
@@ -43,6 +43,7 @@ using namespace com;
 /** @todo refine this after HDD changes; MSC 8.0/64 has trouble with handleModifyVM.  */
 #if defined(_MSC_VER)
 # pragma optimize("g", off)
+# pragma warning(disable:4748)
 #endif
 
 enum
@@ -2071,7 +2072,6 @@ RTEXITCODE handleModifyVM(HandlerArg *a)
             case MODIFYVM_UARTMODE:
             {
                 ComPtr<ISerialPort> uart;
-                char *pszIRQ = NULL;
 
                 CHECK_ERROR_BREAK(sessionMachine, GetSerialPort(GetOptState.uIndex - 1, uart.asOutParam()));
                 ASSERT(uart);
@@ -2165,7 +2165,6 @@ RTEXITCODE handleModifyVM(HandlerArg *a)
             case MODIFYVM_LPTMODE:
             {
                 ComPtr<IParallelPort> lpt;
-                char *pszIRQ = NULL;
 
                 CHECK_ERROR_BREAK(sessionMachine, GetParallelPort(GetOptState.uIndex - 1, lpt.asOutParam()));
                 ASSERT(lpt);
@@ -2285,21 +2284,21 @@ RTEXITCODE handleModifyVM(HandlerArg *a)
                     CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
                 }
 #endif /* RT_OS_WINDOWS */
-#ifdef VBOX_WITH_OSS
+#ifdef VBOX_WITH_AUDIO_OSS
                 else if (!RTStrICmp(ValueUnion.psz, "oss"))
                 {
                     CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_OSS));
                     CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
                 }
 #endif
-#ifdef VBOX_WITH_ALSA
+#ifdef VBOX_WITH_AUDIO_ALSA
                 else if (!RTStrICmp(ValueUnion.psz, "alsa"))
                 {
                     CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_ALSA));
                     CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
                 }
 #endif
-#ifdef VBOX_WITH_PULSE
+#ifdef VBOX_WITH_AUDIO_PULSE
                 else if (!RTStrICmp(ValueUnion.psz, "pulse"))
                 {
                     CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_Pulse));
@@ -2323,7 +2322,7 @@ RTEXITCODE handleModifyVM(HandlerArg *a)
 
             case MODIFYVM_CLIPBOARD:
             {
-                ClipboardMode_T mode;
+                ClipboardMode_T mode = ClipboardMode_Disabled; /* Shut up MSC */
                 if (!RTStrICmp(ValueUnion.psz, "disabled"))
                     mode = ClipboardMode_Disabled;
                 else if (!RTStrICmp(ValueUnion.psz, "hosttoguest"))
@@ -2346,7 +2345,7 @@ RTEXITCODE handleModifyVM(HandlerArg *a)
 
             case MODIFYVM_DRAGANDDROP:
             {
-                DnDMode_T mode;
+                DnDMode_T mode = DnDMode_Disabled; /* Shut up MSC */
                 if (!RTStrICmp(ValueUnion.psz, "disabled"))
                     mode = DnDMode_Disabled;
                 else if (!RTStrICmp(ValueUnion.psz, "hosttoguest"))
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageSnapshot.cpp b/src/VBox/Frontends/VBoxManage/VBoxManageSnapshot.cpp
index c5dd751..83e0025 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxManageSnapshot.cpp
+++ b/src/VBox/Frontends/VBoxManage/VBoxManageSnapshot.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -419,6 +419,7 @@ RTEXITCODE handleSnapshot(HandlerArg *a)
                             count = 1;
                         else
                             count = 2;
+                        RTTimeSpecSetNano(&now, 0); /* Shut up MSC */
                     }
                     else
                         RTTimeNow(&now);
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp b/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp
index 6082430..238bbb9 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp
+++ b/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -689,9 +689,17 @@ RTEXITCODE handleStorageAttach(HandlerArg *a)
             // set medium type, if so desired
             if (pMedium2Mount && fSetMediumType)
             {
-                CHECK_ERROR(pMedium2Mount, COMSETTER(Type)(enmMediumType));
-                if (FAILED(rc))
-                    throw  Utf8Str("Failed to set the medium type");
+                MediumType_T enmMediumTypeOld;
+                CHECK_ERROR(pMedium2Mount, COMGETTER(Type)(&enmMediumTypeOld));
+                if (SUCCEEDED(rc))
+                {
+                    if (enmMediumTypeOld != enmMediumType)
+                    {
+                        CHECK_ERROR(pMedium2Mount, COMSETTER(Type)(enmMediumType));
+                        if (FAILED(rc))
+                            throw  Utf8Str("Failed to set the medium type");
+                    }
+                }
             }
 
             if (pMedium2Mount && !bstrComment.isEmpty())
@@ -744,8 +752,8 @@ RTEXITCODE handleStorageAttach(HandlerArg *a)
                                                              pMedium2Mount,
                                                              fForceUnmount));
                         }
+                        break;
                     } // end DeviceType_DVD or DeviceType_Floppy:
-                    break;
 
                     case DeviceType_HardDisk:
                     {
@@ -756,8 +764,10 @@ RTEXITCODE handleStorageAttach(HandlerArg *a)
                                                           device,
                                                           DeviceType_HardDisk,
                                                           pMedium2Mount));
+                        break;
                     }
-                    break;
+
+                    default: break; /* Shut up MSC */
                 }
             }
         }
@@ -961,8 +971,6 @@ RTEXITCODE handleStorageController(HandlerArg *a)
     const char       *pszHostIOCache = NULL;
     const char       *pszBootable    = NULL;
     const char       *pszCtlNewName  = NULL;
-    ULONG             satabootdev    = ~0U;
-    ULONG             sataidedev     = ~0U;
     ULONG             portcount      = ~0U;
     bool              fRemoveCtl     = false;
     ComPtr<IMachine>  machine;
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageUSB.cpp b/src/VBox/Frontends/VBoxManage/VBoxManageUSB.cpp
index 872772d..693dad8 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxManageUSB.cpp
+++ b/src/VBox/Frontends/VBoxManage/VBoxManageUSB.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -74,15 +74,15 @@ public:
         return S_OK;
     }
 
-    STDMETHOD(COMGETTER(Id))(OUT_GUID a_pId)                    { return E_NOTIMPL; }
+    STDMETHOD(COMGETTER(Id))(OUT_GUID a_pId)                    { NOREF(a_pId); return E_NOTIMPL; }
     STDMETHOD(COMGETTER(VendorId))(USHORT *a_pusVendorId)       { *a_pusVendorId    = m_usVendorId;     return S_OK; }
     STDMETHOD(COMGETTER(ProductId))(USHORT *a_pusProductId)     { *a_pusProductId   = m_usProductId;    return S_OK; }
     STDMETHOD(COMGETTER(Revision))(USHORT *a_pusRevision)       { *a_pusRevision    = m_bcdRevision;    return S_OK; }
     STDMETHOD(COMGETTER(SerialHash))(ULONG64 *a_pullSerialHash) { *a_pullSerialHash = m_u64SerialHash;  return S_OK; }
-    STDMETHOD(COMGETTER(Manufacturer))(BSTR *a_pManufacturer)   { return E_NOTIMPL; }
-    STDMETHOD(COMGETTER(Product))(BSTR *a_pProduct)             { return E_NOTIMPL; }
-    STDMETHOD(COMGETTER(SerialNumber))(BSTR *a_pSerialNumber)   { return E_NOTIMPL; }
-    STDMETHOD(COMGETTER(Address))(BSTR *a_pAddress)             { return E_NOTIMPL; }
+    STDMETHOD(COMGETTER(Manufacturer))(BSTR *a_pManufacturer)   { NOREF(a_pManufacturer);   return E_NOTIMPL; }
+    STDMETHOD(COMGETTER(Product))(BSTR *a_pProduct)             { NOREF(a_pProduct);        return E_NOTIMPL; }
+    STDMETHOD(COMGETTER(SerialNumber))(BSTR *a_pSerialNumber)   { NOREF(a_pSerialNumber);   return E_NOTIMPL; }
+    STDMETHOD(COMGETTER(Address))(BSTR *a_pAddress)             { NOREF(a_pAddress);        return E_NOTIMPL; }
 
 private:
     /** The vendor id of this USB device. */
diff --git a/src/VBox/Frontends/VBoxSDL/Framebuffer.cpp b/src/VBox/Frontends/VBoxSDL/Framebuffer.cpp
index 140fb32..2a93f2e 100644
--- a/src/VBox/Frontends/VBoxSDL/Framebuffer.cpp
+++ b/src/VBox/Frontends/VBoxSDL/Framebuffer.cpp
@@ -1,8 +1,6 @@
 /* $Id: Framebuffer.cpp $ */
 /** @file
- *
- * VBox frontends: VBoxSDL (simple frontend based on SDL):
- * Implementation of VBoxSDLFB (SDL framebuffer) class
+ * VBoxSDL - Implementation of VBoxSDLFB (SDL framebuffer) class
  */
 
 /*
@@ -44,7 +42,14 @@ using namespace com;
 #include "Ico64x01.h"
 
 #if defined(RT_OS_WINDOWS) || defined(RT_OS_LINUX)
-#include <SDL_syswm.h>           /* for SDL_GetWMInfo() */
+# ifdef _MSC_VER
+#  pragma warning(push)
+#  pragma warning(disable: 4121) /* warning C4121: 'SDL_SysWMmsg' : alignment of a member was sensitive to packing*/
+# endif
+# include <SDL_syswm.h>           /* for SDL_GetWMInfo() */
+# ifdef _MSC_VER
+#  pragma warning(pop)
+# endif
 #endif
 
 #if defined(VBOX_WITH_XPCOM)
@@ -152,7 +157,7 @@ HRESULT VBoxSDLFB::init(uint32_t uScreenId,
     mfInitialized = true;
 #ifdef RT_OS_WINDOWS
     HRESULT hr = CoCreateFreeThreadedMarshaler(this, m_pUnkMarshaler.asOutParam());
-    Log(("CoCreateFreeThreadedMarshaler hr %08X\n", hr));
+    Log(("CoCreateFreeThreadedMarshaler hr %08X\n", hr)); NOREF(hr);
 #endif
 
     return 0;
@@ -560,6 +565,8 @@ STDMETHODIMP VBoxSDLFB::NotifyChange(ULONG aScreenId,
  */
 STDMETHODIMP VBoxSDLFB::VideoModeSupported(ULONG width, ULONG height, ULONG bpp, BOOL *supported)
 {
+    RT_NOREF(bpp);
+
     if (!supported)
         return E_POINTER;
 
@@ -615,11 +622,13 @@ STDMETHODIMP VBoxSDLFB::SetVisibleRegion(BYTE *aRectangles, ULONG aCount)
 
 STDMETHODIMP VBoxSDLFB::ProcessVHWACommand(BYTE *pCommand)
 {
+    RT_NOREF(pCommand);
     return E_NOTIMPL;
 }
 
 STDMETHODIMP VBoxSDLFB::Notify3DEvent(ULONG uType, ComSafeArrayIn(BYTE, aData))
 {
+    RT_NOREF(uType); ComSafeArrayNoRef(aData);
     return E_NOTIMPL;
 }
 
@@ -916,7 +925,7 @@ void VBoxSDLFB::resizeSDL(void)
     SDL_SysWMinfo info;
     SDL_VERSION(&info.version);
     if (SDL_GetWMInfo(&info))
-        mWinId = (LONG64) info.window;
+        mWinId = (intptr_t) info.window;
 # elif defined (RT_OS_LINUX)
     SDL_SysWMinfo info;
     SDL_VERSION(&info.version);
@@ -1150,6 +1159,7 @@ void VBoxSDLFB::getFullscreenGeometry(uint32_t *width, uint32_t *height)
 }
 
 #ifdef VBOX_SECURELABEL
+
 /**
  * Setup the secure labeling parameters
  *
@@ -1212,9 +1222,10 @@ void VBoxSDLFB::setSecureLabelColor(uint32_t colorFG, uint32_t colorBG)
  */
 void VBoxSDLFB::paintSecureLabel(int x, int y, int w, int h, bool fForce)
 {
-#ifdef VBOXSDL_WITH_X11
+    RT_NOREF(x, w, h);
+# ifdef VBOXSDL_WITH_X11
     AssertMsg(gSdlNativeThread == RTThreadNativeSelf(), ("Wrong thread! SDL is not threadsafe!\n"));
-#endif
+# endif
     /* only when the function is present */
     if (!pTTF_RenderUTF8_Solid)
         return;
@@ -1249,6 +1260,7 @@ void VBoxSDLFB::paintSecureLabel(int x, int y, int w, int h, bool fForce)
     /* make sure to update the screen */
     SDL_UpdateRect(mScreen, 0, 0, mScreen->w, mLabelHeight);
 }
+
 #endif /* VBOX_SECURELABEL */
 
 // IFramebufferOverlay
@@ -1410,6 +1422,7 @@ STDMETHODIMP VBoxSDLFBOverlay::COMSETTER(Visible)(BOOL visible)
  */
 STDMETHODIMP VBoxSDLFBOverlay::COMGETTER(Alpha)(ULONG *alpha)
 {
+    RT_NOREF(alpha);
     LogFlow(("VBoxSDLFBOverlay::GetAlpha\n"));
     return E_NOTIMPL;
 }
@@ -1422,6 +1435,7 @@ STDMETHODIMP VBoxSDLFBOverlay::COMGETTER(Alpha)(ULONG *alpha)
  */
 STDMETHODIMP VBoxSDLFBOverlay::COMSETTER(Alpha)(ULONG alpha)
 {
+    RT_NOREF(alpha);
     LogFlow(("VBoxSDLFBOverlay::SetAlpha\n"));
     return E_NOTIMPL;
 }
@@ -1593,6 +1607,7 @@ STDMETHODIMP VBoxSDLFBOverlay::RequestResize(ULONG aScreenId, ULONG pixelFormat,
                                              ULONG bitsPerPixel, ULONG bytesPerLine,
                                              ULONG w, ULONG h, BOOL *finished)
 {
+    RT_NOREF(aScreenId, bytesPerLine, finished);
     AssertReturn(pixelFormat == BitmapFormat_BGR, E_INVALIDARG);
     AssertReturn(vram == 0, E_INVALIDARG);
     AssertReturn(bitsPerPixel == 32, E_INVALIDARG);
@@ -1622,9 +1637,9 @@ STDMETHODIMP VBoxSDLFBOverlay::RequestResize(ULONG aScreenId, ULONG pixelFormat,
  *
  * Basically, we support anything with 32bpp.
  */
-STDMETHODIMP VBoxSDLFBOverlay::VideoModeSupported(ULONG width, ULONG height, ULONG bpp,
-                                               BOOL *supported)
+STDMETHODIMP VBoxSDLFBOverlay::VideoModeSupported(ULONG width, ULONG height, ULONG bpp, BOOL *supported)
 {
+    RT_NOREF(width, height);
     if (!supported)
         return E_POINTER;
     if (bpp == 32)
diff --git a/src/VBox/Frontends/VBoxSDL/Helper.cpp b/src/VBox/Frontends/VBoxSDL/Helper.cpp
index 9500129..1cfe33b 100644
--- a/src/VBox/Frontends/VBoxSDL/Helper.cpp
+++ b/src/VBox/Frontends/VBoxSDL/Helper.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -53,8 +53,9 @@ RTSEMEVENT    g_EventSemXPCOMQueueThread = NULL;
  * @param   pvUser  User specific parameter, the file descriptor
  *                  of the event queue socket
  */
-DECLCALLBACK(int) xpcomEventThread(RTTHREAD thread, void *pvUser)
+DECLCALLBACK(int) xpcomEventThread(RTTHREAD hThreadSelf, void *pvUser)
 {
+    RT_NOREF(hThreadSelf);
     int eqFD = (intptr_t)pvUser;
     unsigned cErrors = 0;
     int rc;
diff --git a/src/VBox/Frontends/VBoxSDL/Helper.h b/src/VBox/Frontends/VBoxSDL/Helper.h
index 94475ae..9edaa9c 100644
--- a/src/VBox/Frontends/VBoxSDL/Helper.h
+++ b/src/VBox/Frontends/VBoxSDL/Helper.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VBoxSDL/Makefile.kmk b/src/VBox/Frontends/VBoxSDL/Makefile.kmk
index 78342a3..0d75521 100644
--- a/src/VBox/Frontends/VBoxSDL/Makefile.kmk
+++ b/src/VBox/Frontends/VBoxSDL/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp b/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
index e72b888..e972c74 100644
--- a/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
+++ b/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
@@ -45,8 +45,15 @@ using namespace com;
 # include <unistd.h>
 #endif
 
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable: 4121) /* warning C4121: 'SDL_SysWMmsg' : alignment of a member was sensitive to packing*/
+#endif
 #ifndef RT_OS_DARWIN
-#include <SDL_syswm.h>           /* for SDL_GetWMInfo() */
+# include <SDL_syswm.h>          /* for SDL_GetWMInfo() */
+#endif
+#ifdef _MSC_VER
+# pragma warning(pop)
 #endif
 
 #include "VBoxSDL.h"
@@ -320,6 +327,7 @@ public:
 
     STDMETHOD(HandleEvent)(VBoxEventType_T aType, IEvent * aEvent)
     {
+        RT_NOREF(aEvent);
         switch (aType)
         {
             case VBoxEventType_OnExtraDataChanged:
@@ -390,7 +398,7 @@ public:
     STDMETHOD(HandleEvent)(VBoxEventType_T aType, IEvent * aEvent)
     {
         // likely all this double copy is now excessive, and we can just use existing event object
-        // @todo: eliminate it
+        /// @todo eliminate it
         switch (aType)
         {
             case VBoxEventType_OnMousePointerShapeChanged:
@@ -551,13 +559,13 @@ public:
                 SDL_VERSION(&info.version);
                 if (SDL_GetWMInfo(&info))
                 {
-#if defined(VBOXSDL_WITH_X11)
+# if defined(VBOXSDL_WITH_X11)
                     pSWEv->COMSETTER(WinId)((LONG64)info.info.x11.wmwindow);
-#elif defined(RT_OS_WINDOWS)
-                    pSWEv->COMSETTER(WinId)((LONG64)info.window);
-#else
+# elif defined(RT_OS_WINDOWS)
+                    pSWEv->COMSETTER(WinId)((intptr_t)info.window);
+# else
                     AssertFailed();
-#endif
+# endif
                 }
 #endif /* !RT_OS_DARWIN */
                 break;
@@ -713,6 +721,8 @@ static void PrintError(const char *pszName, CBSTR pwszDescr, CBSTR pwszComponent
  */
 void signal_handler_SIGUSR1(int sig, siginfo_t *info, void *secret)
 {
+    RT_NOREF(info, secret);
+
     /* only SIGUSR1 is interesting */
     if (sig == SIGUSR1)
     {
@@ -740,6 +750,7 @@ void signal_handler_SIGINT(int sig)
 extern "C"
 DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
 {
+    RT_NOREF(envp);
 #ifdef RT_OS_WINDOWS
     ATL::CComModule _Module; /* Required internally by ATL (constructor records instance in global variable). */
 #endif
@@ -3668,17 +3679,17 @@ static uint16_t Keyevent2Keycode(const SDL_KeyboardEvent *ev)
             keycode = 0;
         if (!keycode)
         {
-#ifdef DEBUG_bird
+# ifdef DEBUG_bird
             RTPrintf("Untranslated: keycode=%#x (%d)\n", keycode, keycode);
-#endif
+# endif
             keycode = Keyevent2KeycodeFallback(ev);
         }
     }
-#ifdef DEBUG_bird
+# ifdef DEBUG_bird
     RTPrintf("scancode=%#x -> %#x\n", ev->keysym.scancode, keycode);
-#endif
+# endif
 
-#elif RT_OS_OS2
+#elif defined(RT_OS_OS2)
     keycode = Keyevent2KeycodeFallback(ev);
 #endif /* RT_OS_DARWIN */
     return keycode;
@@ -5038,6 +5049,8 @@ static int HandleHostKey(const SDL_KeyboardEvent *pEv)
  */
 static Uint32 StartupTimer(Uint32 interval, void *param)
 {
+    RT_NOREF(param);
+
     /* post message so we can do something in the startup loop */
     SDL_Event event = {0};
     event.type      = SDL_USEREVENT;
@@ -5052,6 +5065,8 @@ static Uint32 StartupTimer(Uint32 interval, void *param)
  */
 static Uint32 ResizeTimer(Uint32 interval, void *param)
 {
+    RT_NOREF(interval, param);
+
     /* post message so the window is actually resized */
     SDL_Event event = {0};
     event.type      = SDL_USEREVENT;
@@ -5066,6 +5081,8 @@ static Uint32 ResizeTimer(Uint32 interval, void *param)
  */
 static Uint32 QuitTimer(Uint32 interval, void *param)
 {
+    RT_NOREF(interval, param);
+
     BOOL fHandled = FALSE;
 
     gSdlQuitTimer = NULL;
diff --git a/src/VBox/Frontends/VBoxSDL/VBoxSDL.h b/src/VBox/Frontends/VBoxSDL/VBoxSDL.h
index 8b1ad01..a1bcf1a 100644
--- a/src/VBox/Frontends/VBoxSDL/VBoxSDL.h
+++ b/src/VBox/Frontends/VBoxSDL/VBoxSDL.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -23,10 +23,18 @@
 #include <iprt/cdefs.h>
 #ifdef RT_OS_WINDOWS /** @todo check why we need to do this on windows. */
 /* convince SDL to not overload main() */
-#define _SDL_main_h
+# define _SDL_main_h
 #endif
+
 /* include this first so Windows.h get's in before our stuff. */
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable: 4121) /* warning C4121: 'SDL_SysWMmsg' : alignment of a member was sensitive to packing*/
+#endif
 #include <SDL.h>
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
 
 /** custom SDL event for display update handling */
 #define SDL_USER_EVENT_UPDATERECT         (SDL_USEREVENT + 4)
diff --git a/src/VBox/Frontends/VBoxSDL/VBoxSDLHardened.cpp b/src/VBox/Frontends/VBoxSDL/VBoxSDLHardened.cpp
index 40dd494..793afca 100644
--- a/src/VBox/Frontends/VBoxSDL/VBoxSDLHardened.cpp
+++ b/src/VBox/Frontends/VBoxSDL/VBoxSDLHardened.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2010 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VBoxSDL/VBoxSDLTest.cpp b/src/VBox/Frontends/VBoxSDL/VBoxSDLTest.cpp
index 69ee2a6..1a921bf 100644
--- a/src/VBox/Frontends/VBoxSDL/VBoxSDLTest.cpp
+++ b/src/VBox/Frontends/VBoxSDL/VBoxSDLTest.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -17,10 +17,17 @@
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
 
-#if defined(RT_OS_WINDOWS) ///@todo someone please explain why we don't follow the book!
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable:4121)
+#endif
+#if defined(RT_OS_WINDOWS) /// @todo someone please explain why we don't follow the book!
 # define _SDL_main_h
 #endif
 #include <SDL.h>
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
 
 #include <iprt/assert.h>
 #include <iprt/env.h>
@@ -243,8 +250,8 @@ static void bench(unsigned long w, unsigned long h, unsigned long bpp)
     else
     {
         /* no restriction */
-        guMaxScreenWidth  = ~0;
-        guMaxScreenHeight = ~0;
+        guMaxScreenWidth  = ~0U;
+        guMaxScreenHeight = ~0U;
     }
 
     newWidth  = RT_MIN(guMaxScreenWidth,  guGuestXRes);
diff --git a/src/VBox/Frontends/VBoxShell/Makefile.kmk b/src/VBox/Frontends/VBoxShell/Makefile.kmk
index 2fa8141..d89bc01 100644
--- a/src/VBox/Frontends/VBoxShell/Makefile.kmk
+++ b/src/VBox/Frontends/VBoxShell/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2009-2015 Oracle Corporation
+# Copyright (C) 2009-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VBoxShell/vboxshell.py b/src/VBox/Frontends/VBoxShell/vboxshell.py
index 60b1ca3..161b18d 100755
--- a/src/VBox/Frontends/VBoxShell/vboxshell.py
+++ b/src/VBox/Frontends/VBoxShell/vboxshell.py
@@ -33,9 +33,10 @@ Foundation, in version 2 as it comes in the "COPYING" file of the
 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 """
-__version__ = "$Revision: 105679 $"
+__version__ = "$Revision: 109861 $"
 
 
+import gc
 import os
 import sys
 import traceback
@@ -3567,6 +3568,7 @@ def main(argv):
                     sPath = sCurLoc
                     break
         if sPath:
+            sCurLoc = sPath
             sTmp = os.path.join(sCurLoc, 'bindings', 'xpcom', 'python')
             if os.path.isdir(sTmp):
                 sys.path.append(sTmp)
@@ -3575,7 +3577,7 @@ def main(argv):
 
 
     #
-    # Set up the shell interpreter context and
+    # Set up the shell interpreter context and start working.
     #
     from vboxapi import VirtualBoxManager
     oVBoxMgr = VirtualBoxManager(style, params)
@@ -3597,6 +3599,15 @@ def main(argv):
         'interrupt':    False,
     }
     interpret(ctx)
+
+    #
+    # Release the interfaces references in ctx before cleaning up.
+    #
+    for sKey in list(ctx.keys()):
+        del ctx[sKey];
+    ctx = None;
+    gc.collect();
+
     oVBoxMgr.deinit()
     del oVBoxMgr
 
diff --git a/src/VBox/Frontends/VirtualBox/Makefile.kmk b/src/VBox/Frontends/VirtualBox/Makefile.kmk
index 31e8eec..38db6b0 100644
--- a/src/VBox/Frontends/VirtualBox/Makefile.kmk
+++ b/src/VBox/Frontends/VirtualBox/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -122,9 +122,9 @@ VirtualBox_DEFS.win       += VBOX_WS_WIN
 VirtualBox_DEFS           += \
 	$(if $(VBOX_WITH_ADDITIONS_AUTOUPDATE_UI),VBOX_WITH_ADDITIONS_AUTOUPDATE_UI) \
 	$(if $(VBOX_WITH_UPDATE_REQUEST),VBOX_WITH_UPDATE_REQUEST) \
-	$(if $(VBOX_WITH_OSS),VBOX_WITH_OSS) \
-	$(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA) \
-	$(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE) \
+	$(if $(VBOX_WITH_AUDIO_OSS),VBOX_WITH_AUDIO_OSS) \
+	$(if $(VBOX_WITH_AUDIO_ALSA),VBOX_WITH_AUDIO_ALSA) \
+	$(if $(VBOX_WITH_AUDIO_PULSE),VBOX_WITH_AUDIO_PULSE) \
 	$(if $(VBOX_WITH_E1000),VBOX_WITH_E1000) \
 	$(if $(VBOX_WITH_NETFLT)$(eq $(KBUILD_TARGET),freebsd),VBOX_WITH_NETFLT) \
 	$(if $(VBOX_WITH_VDE),VBOX_WITH_VDE) \
@@ -244,6 +244,17 @@ ifneq ($(KBUILD_TARGET),win)
 VirtualBox_CXXFLAGS += -Wno-switch
 endif
 
+## @todo we're using a number of deprecated APIs, please fix and remove these!
+ifdef VBOX_WITH_NEW_XCODE
+ VirtualBox_CXXFLAGS.darwin    += -Wno-error=deprecated-declarations
+ VirtualBox_OBJCFLAGS.darwin   += -Wno-error=deprecated-declarations
+ VirtualBox_OBJCXXFLAGS.darwin += -Wno-error=deprecated-declarations
+else
+ VirtualBox_CXXFLAGS.darwin    += -Wno-deprecated-declarations
+ VirtualBox_OBJCFLAGS.darwin   += -Wno-deprecated-declarations
+ VirtualBox_OBJCXXFLAGS.darwin += -Wno-deprecated-declarations
+endif
+
 ifeq ($(KBUILD_TYPE),release)
  VirtualBox_LDFLAGS.win   += /SUBSYSTEM:windows
 else
@@ -307,6 +318,7 @@ VirtualBox_QT_MOCHDRS = \
 	src/extensions/QILabelSeparator.h \
 	src/extensions/QIListView.h \
 	src/extensions/QIMainDialog.h \
+	src/extensions/QIMainWindow.h \
 	src/extensions/QIMenu.h \
 	src/extensions/QIMessageBox.h \
 	src/extensions/QIProcess.h \
@@ -539,7 +551,6 @@ VirtualBox_QT_MOCSRCS = \
 	src/extensions/QITableView.cpp \
 	src/extradata/UIExtraDataManager.cpp \
 	src/globals/UIActionPool.cpp \
-	src/globals/UIDesktopWidgetWatchdog.cpp \
 	src/globals/UIMainEventListener.cpp \
 	src/globals/UIThreadPool.cpp \
 	src/medium/UIMediumEnumerator.cpp \
@@ -567,9 +578,15 @@ ifdef VBOX_GUI_WITH_NETWORK_MANAGER
 endif
 
 VirtualBox_QT_MOCSRCS.darwin += \
-    src/platform/darwin/UIWindowMenuManager.cpp
+	src/platform/darwin/UIWindowMenuManager.cpp
 VirtualBox_QT_MOCSRCS.win += \
 	src/extensions/QIFileDialog.cpp
+VirtualBox_QT_MOCSRCS.linux += \
+	src/globals/UIDesktopWidgetWatchdog.cpp
+VirtualBox_QT_MOCSRCS.solaris += \
+	src/globals/UIDesktopWidgetWatchdog.cpp
+VirtualBox_QT_MOCSRCS.freebsd += \
+	src/globals/UIDesktopWidgetWatchdog.cpp
 
 ifdef VBOX_WITH_XPCOM
  VirtualBox_QT_MOCSRCS += \
@@ -601,6 +618,7 @@ VirtualBox_SOURCES = \
 	src/extensions/QILineEdit.cpp \
 	src/extensions/QIListView.cpp \
 	src/extensions/QIMainDialog.cpp \
+	src/extensions/QIMainWindow.cpp \
 	src/extensions/QIMenu.cpp \
 	src/extensions/QIMessageBox.cpp \
 	src/extensions/QIProcess.cpp \
@@ -1116,7 +1134,7 @@ VirtualBox.app_SOURCES = \
  	$(VirtualBox.app_0_OUTDIR)/qt.conf=>Resources/qt.conf
  endif # VBOX_WITH_QTGUI_V5
 
-$$(VirtualBox.app_0_OUTDIR)/Info.plist: $(PATH_SUB_CURRENT)/src/platform/darwin/Info.plist $(VBOX_VERSION_MK) | $$(@D)/
+ $$(VirtualBox.app_0_OUTDIR)/Info.plist: $(PATH_SUB_CURRENT)/src/platform/darwin/Info.plist $(VBOX_VERSION_MK) | $$(@D)/
 	$(call MSG_GENERATE,VirtualBox.app,$<,$@)
 	$(QUIET)$(RM) -f $@
 	$(QUIET)$(SED) \
@@ -1129,22 +1147,22 @@ $$(VirtualBox.app_0_OUTDIR)/Info.plist: $(PATH_SUB_CURRENT)/src/platform/darwin/
 		-e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
 		$< > $@
 
-$$(VirtualBox.app_0_OUTDIR)/qt.conf: $(PATH_SUB_CURRENT)/Makefile.kmk $(VBOX_VERSION_MK) | $$(@D)/
+ $$(VirtualBox.app_0_OUTDIR)/qt.conf: $(PATH_SUB_CURRENT)/Makefile.kmk $(VBOX_VERSION_MK) | $$(@D)/
 	$(QUIET)$(RM) -f $@
 	$(QUIET)$(APPEND) $@ "[Paths]"
 	$(QUIET)$(APPEND) $@ "Prefix =" $(PATH_OUT)/$(VirtualBox.app_INST)
 
-INSTALLS += VirtualBoxVM.app
-VirtualBoxVM.app_INST = $(VirtualBox.app_INST)Resources/VirtualBoxVM.app/Contents/
-VirtualBoxVM.app_MODE = 644
-VirtualBoxVM.app_SOURCES = \
-	src/platform/darwin/VM-PkgInfo=>PkgInfo \
-	$(VirtualBoxVM.app_0_OUTDIR)/VM-Info.plist=>Info.plist \
-       $(foreach mysrc,$(VirtualBox.app_SOURCES),$(if-expr $(pos =>Resources/,$(mysrc)) > 0,$(mysrc),))
-VirtualBoxVM.app_SYMLINKS = \
-	MacOS=>../../../MacOS/
-
-$$(VirtualBoxVM.app_0_OUTDIR)/VM-Info.plist: $(PATH_SUB_CURRENT)/src/platform/darwin/VM-Info.plist $(VBOX_VERSION_MK) | $$(@D)/
+ INSTALLS += VirtualBoxVM.app
+ VirtualBoxVM.app_INST = $(VirtualBox.app_INST)Resources/VirtualBoxVM.app/Contents/
+ VirtualBoxVM.app_MODE = 644
+ VirtualBoxVM.app_SOURCES = \
+ 	src/platform/darwin/VM-PkgInfo=>PkgInfo \
+ 	$(VirtualBoxVM.app_0_OUTDIR)/VM-Info.plist=>Info.plist \
+        $(foreach mysrc,$(VirtualBox.app_SOURCES),$(if-expr $(pos =>Resources/,$(mysrc)) > 0,$(mysrc),))
+ VirtualBoxVM.app_SYMLINKS = \
+ 	MacOS=>../../../MacOS/
+
+ $$(VirtualBoxVM.app_0_OUTDIR)/VM-Info.plist: $(PATH_SUB_CURRENT)/src/platform/darwin/VM-Info.plist $(VBOX_VERSION_MK) | $$(@D)/
 	$(call MSG_GENERATE,VirtualBoxVM.app,$<,$@)
 	$(QUIET)$(RM) -f $@
 	$(QUIET)$(SED) \
@@ -1157,23 +1175,28 @@ $$(VirtualBoxVM.app_0_OUTDIR)/VM-Info.plist: $(PATH_SUB_CURRENT)/src/platform/da
 		-e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
 		--output $@ $<
 
-PROGRAMS += vmstarter
-vmstarter_TEMPLATE = VBOXR3EXE
-vmstarter_SOURCES = src/platform/darwin/vmstarter.mm
-vmstarter_LDFLAGS += -framework AppKit
-vmstarter_INST = $(INST_BIN)vmstarter
-
-INSTALLS += vmstarter.app
-vmstarter.app_INST = $(VirtualBox.app_INST)Resources/vmstarter.app/Contents/
-vmstarter.app_MODE = 644
-vmstarter.app_SOURCES = \
-	src/platform/darwin/vmstarter-PkgInfo=>PkgInfo \
-	$(vmstarter.app_0_OUTDIR)/vmstarter-Info.plist=>Info.plist \
-       $(foreach mysrc,$(VirtualBox.app_SOURCES),$(if-expr $(pos =>Resources/,$(mysrc)) > 0,$(mysrc),))
-vmstarter.app_SYMLINKS = \
-	MacOS=>../../../MacOS \
-
-$$(vmstarter.app_0_OUTDIR)/vmstarter-Info.plist: $(PATH_SUB_CURRENT)/src/platform/darwin/vmstarter-Info.plist $(VBOX_VERSION_MK) | $$(@D)/
+ PROGRAMS += vmstarter
+ vmstarter_TEMPLATE = VBOXR3EXE
+ ifdef VBOX_WITH_NEW_XCODE
+  vmstarter_OBJCXXFLAGS += -Wno-error=deprecated-declarations ## @todo fix deprecate API use!
+ else
+  vmstarter_OBJCXXFLAGS += -Wno-deprecated-declarations
+ endif
+ vmstarter_LDFLAGS += -framework AppKit
+ vmstarter_SOURCES = src/platform/darwin/vmstarter.mm
+ vmstarter_INST = $(INST_BIN)vmstarter
+
+ INSTALLS += vmstarter.app
+ vmstarter.app_INST = $(VirtualBox.app_INST)Resources/vmstarter.app/Contents/
+ vmstarter.app_MODE = 644
+ vmstarter.app_SOURCES = \
+ 	src/platform/darwin/vmstarter-PkgInfo=>PkgInfo \
+ 	$(vmstarter.app_0_OUTDIR)/vmstarter-Info.plist=>Info.plist \
+ 	$(foreach mysrc,$(VirtualBox.app_SOURCES),$(if-expr $(pos =>Resources/,$(mysrc)) > 0,$(mysrc),))
+ vmstarter.app_SYMLINKS = \
+ 	MacOS=>../../../MacOS \
+
+ $$(vmstarter.app_0_OUTDIR)/vmstarter-Info.plist: $(PATH_SUB_CURRENT)/src/platform/darwin/vmstarter-Info.plist $(VBOX_VERSION_MK) | $$(@D)/
 	$(call MSG_GENERATE,vmstarter.app,$<,$@)
 	$(QUIET)$(RM) -f $@
 	$(QUIET)$(SED) \
diff --git a/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk b/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk
index 3bc3db9..7fc2ba2 100644
--- a/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk
+++ b/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2007-2015 Oracle Corporation
+# Copyright (C) 2007-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -22,6 +22,7 @@ VBOX_APPROVED_GUI_LANGUAGES := \
 	cs    \
 	da    \
 	de    \
+	el    \
 	en    \
 	es    \
 	eu    \
@@ -33,6 +34,7 @@ VBOX_APPROVED_GUI_LANGUAGES := \
 	ja    \
 	ko    \
 	nl    \
+	pl    \
 	pt_BR \
 	ru    \
 	sl    \
diff --git a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_bg.ts b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_bg.ts
index 7b02c7d..95d3d63 100644
--- a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_bg.ts
+++ b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_bg.ts
@@ -112,22 +112,22 @@
     </message>
     <message>
         <source>The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing<br/><br/>  <font color=blue>'/sbin/vboxconfig'</font><br/><br/>as root.</source>
-        <translation type="unfinished"></translation>
+        <translation>Драйверът на VirtualBox за Linux ядрото (vboxdrv) или не е зареден, или има проблем с правата на /dev/vboxdrv. Моля, преинсталирайте модула на ядрото, като изпълните<br/><br/>  <font color=blue>'/sbin/vboxconfig'</font><br/><br/>като root.</translation>
     </message>
     <message>
         <source>The VirtualBox kernel modules do not match this version of VirtualBox. The installation of VirtualBox was apparently not successful. Executing<br/><br/>  <font color=blue>'/sbin/vboxconfig'</font><br/><br/>may correct this. Make sure that you do not mix the OSE version and the PUEL version of VirtualBox.</source>
-        <translation type="unfinished"></translation>
+        <translation>Модулите за ядрото на VirtualBox са несъвместими с тази версия на VirtualBox. Изглежда, че инсталацията на VirtualBox е неуспешна. Изпълнението на<br/><br/>  <font color=blue>'/sbin/vboxconfig'</font><br/><br/>може да реши проблема. Уверете се, че не смесвате OSE версията с PUEL версията на VirtualBox.</translation>
     </message>
 </context>
 <context>
     <name>QIArrowButtonPress</name>
     <message>
         <source>&Back</source>
-        <translation type="unfinished">&Назад</translation>
+        <translation>На&зад</translation>
     </message>
     <message>
         <source>&Next</source>
-        <translation type="unfinished"></translation>
+        <translation>&Напред</translation>
     </message>
 </context>
 <context>
@@ -142,11 +142,11 @@
     </message>
     <message>
         <source>&Details</source>
-        <translation type="unfinished">&Детайли</translation>
+        <translation>&Детайли</translation>
     </message>
     <message>
         <source>&Details (%1 of %2)</source>
-        <translation type="unfinished">&Детайли (%1 от %2)</translation>
+        <translation>&Детайли (%1 от %2)</translation>
     </message>
 </context>
 <context>
@@ -584,7 +584,7 @@
     </message>
     <message>
         <source>Open the browser and go to the VirtualBox product web site</source>
-        <translation>Отворете браузъра и отидете до продуктовия уеб сайт на VirtualBox</translation>
+        <translation>Отваря браузъра и отива в сайта на VirtualBox</translation>
     </message>
     <message>
         <source>Go back to showing all suppressed warnings and messages</source>
@@ -1486,39 +1486,39 @@
     </message>
     <message>
         <source>&VirtualBox Bug Tracker...</source>
-        <translation type="unfinished"></translation>
+        <translation>&VirtualBox Докладчик за бъгове...</translation>
     </message>
     <message>
         <source>Open the browser and go to the VirtualBox product bug tracker</source>
-        <translation type="unfinished"></translation>
+        <translation>Отваря браузъра и отива в докладчика за бъгове на VirtualBox</translation>
     </message>
     <message>
         <source>&VirtualBox Forums...</source>
-        <translation type="unfinished"></translation>
+        <translation>&VirtualBox Форуми...</translation>
     </message>
     <message>
         <source>Open the browser and go to the VirtualBox product forums</source>
-        <translation type="unfinished"></translation>
+        <translation>Отваря браузъра и отива във форумите на VirtualBox</translation>
     </message>
     <message>
         <source>&Oracle Web Site...</source>
-        <translation type="unfinished"></translation>
+        <translation>&Oracle уеб сайт...</translation>
     </message>
     <message>
         <source>Open the browser and go to the Oracle web site</source>
-        <translation type="unfinished"></translation>
+        <translation>Отваря браузъра и отива в сайта на Oracle</translation>
     </message>
     <message>
         <source>&Detach GUI</source>
-        <translation type="unfinished"></translation>
+        <translation>&Разкачване на ГПИ</translation>
     </message>
     <message>
         <source>Detach the GUI from headless VM</source>
-        <translation type="unfinished"></translation>
+        <translation>Разкачва потребителския екран от виртуална машина</translation>
     </message>
     <message>
         <source>Disable Dock Icon Overlay</source>
-        <translation type="unfinished"></translation>
+        <translation>Забраняване покриването на док иконата</translation>
     </message>
 </context>
 <context>
@@ -1737,73 +1737,73 @@
     <name>UIApplianceUnverifiedCertificateViewer</name>
     <message>
         <source>Unverifiable Certificate! Continue?</source>
-        <translation type="unfinished"></translation>
+        <translation>Непроверим сертификат! Продължаване?</translation>
     </message>
     <message>
         <source><b>The appliance is signed by an unverified self signed certificate issued by '%1'. We recommend to only proceed with the importing if you are sure you should trust this entity.</b></source>
-        <translation type="unfinished"></translation>
+        <translation><b>Това приспособление е подписано с непроверим самоподписан сертификат, издаден от '%1'. Препоръчваме ви да продължите с внасянето, само ако сте сигурни, че можете да се доверите на източника.</b></translation>
     </message>
     <message>
         <source><b>The appliance is signed by an unverified certificate issued to '%1'. We recommend to only proceed with the importing if you are sure you should trust this entity.</b></source>
-        <translation type="unfinished"></translation>
+        <translation><b>Това приспособление е подписано с непроверим сертификат, издаден от '%1'. Препоръчваме ви да продължите с внасянето, само ако сте сигурни, че можете да се доверите на източника.</b></translation>
     </message>
     <message>
         <source>True</source>
-        <translation type="unfinished"></translation>
+        <translation>Вярно</translation>
     </message>
     <message>
         <source>False</source>
-        <translation type="unfinished"></translation>
+        <translation>Невярно</translation>
     </message>
     <message>
         <source><tr><td>%1:</td><td>%2</td></tr></source>
         <comment>key: value</comment>
-        <translation type="unfinished"></translation>
+        <translation><tr><td>%1:</td><td>%2</td></tr></translation>
     </message>
     <message>
         <source>Issuer</source>
-        <translation type="unfinished"></translation>
+        <translation>Издател</translation>
     </message>
     <message>
         <source>Subject</source>
-        <translation type="unfinished"></translation>
+        <translation>Субект</translation>
     </message>
     <message>
         <source>Not Valid Before</source>
-        <translation type="unfinished"></translation>
+        <translation>Невалиден преди</translation>
     </message>
     <message>
         <source>Not Valid After</source>
-        <translation type="unfinished"></translation>
+        <translation>Невалиден след</translation>
     </message>
     <message>
         <source>Serial Number</source>
-        <translation type="unfinished"></translation>
+        <translation>Сериен номер</translation>
     </message>
     <message>
         <source>Self-Signed</source>
-        <translation type="unfinished"></translation>
+        <translation>Самоподписан</translation>
     </message>
     <message>
         <source>Authority (CA)</source>
-        <translation type="unfinished"></translation>
+        <translation>Източник (CA)</translation>
     </message>
     <message>
         <source>Public Algorithm</source>
-        <translation type="unfinished"></translation>
+        <translation>Публичен алгоритъм</translation>
     </message>
     <message>
         <source>%1 (%2)</source>
         <comment>value (clarification)</comment>
-        <translation type="unfinished"></translation>
+        <translation>%1 (%2)</translation>
     </message>
     <message>
         <source>Signature Algorithm</source>
-        <translation type="unfinished"></translation>
+        <translation>Алгоритъм за подпис</translation>
     </message>
     <message>
         <source>X.509 Version Number</source>
-        <translation type="unfinished"></translation>
+        <translation>X.509 номер на версия</translation>
     </message>
 </context>
 <context>
@@ -2578,7 +2578,7 @@
     <name>UIEmptyFilePathSelector</name>
     <message>
         <source>Choose...</source>
-        <translation type="unfinished">Избор...</translation>
+        <translation>Избор...</translation>
     </message>
 </context>
 <context>
@@ -2948,55 +2948,55 @@ p, li { white-space: pre-wrap; }
     <name>UIFilePathSelector</name>
     <message>
         <source>&Copy</source>
-        <translation type="unfinished">&Копиране</translation>
+        <translation>&Копиране</translation>
     </message>
     <message>
         <source>Other...</source>
-        <translation type="unfinished">Други...</translation>
+        <translation>Други...</translation>
     </message>
     <message>
         <source>Reset</source>
-        <translation type="unfinished"></translation>
+        <translation>Нулиране</translation>
     </message>
     <message>
         <source>Displays a window to select a different folder.</source>
-        <translation type="unfinished">Отваря прозорец за избор на друга папка.</translation>
+        <translation>Отваря прозорец за избор на друга папка.</translation>
     </message>
     <message>
         <source>Resets the folder path to the default value.</source>
-        <translation type="unfinished">Възстановява пътя до папката до стойността по подразбиране.</translation>
+        <translation>Възстановява пътя до папката до стойността по подразбиране.</translation>
     </message>
     <message>
         <source>Displays a window to select a different file.</source>
-        <translation type="unfinished">Отваря прозорец за избор на друг файл.</translation>
+        <translation>Отваря прозорец за избор на друг файл.</translation>
     </message>
     <message>
         <source>Resets the file path to the default value.</source>
-        <translation type="unfinished">Възстановява пътя до файла до стойността по подразбиране.</translation>
+        <translation>Възстановява пътя до файла до стойността по подразбиране.</translation>
     </message>
     <message>
         <source><reset to default></source>
-        <translation type="unfinished"><по подразбиране></translation>
+        <translation><по подразбиране></translation>
     </message>
     <message>
         <source>The actual default path value will be displayed after accepting the changes and opening this window again.</source>
-        <translation type="unfinished">Настоящо избраният път по подразбиране ще бъде показан, след като приемете промените и отворите този диалог отново.</translation>
+        <translation>Настоящо избраният път по подразбиране ще бъде показан, след като приемете промените и отворите този диалог отново.</translation>
     </message>
     <message>
         <source><not selected></source>
-        <translation type="unfinished"><не е избрано></translation>
+        <translation><не е избрано></translation>
     </message>
     <message>
         <source>Please use the <b>Other...</b> item from the drop-down list to select a path.</source>
-        <translation type="unfinished">Моля, използвайте елемента <b>Други...</b> от падащия списък, за да изберете желания път.</translation>
+        <translation>Моля, използвайте елемента <b>Други...</b> от падащия списък, за да изберете желания път.</translation>
     </message>
     <message>
         <source>Holds the folder path.</source>
-        <translation type="unfinished">Указва пътя до папката.</translation>
+        <translation>Указва пътя до папката.</translation>
     </message>
     <message>
         <source>Holds the file path.</source>
-        <translation type="unfinished">Указва пътя до файла.</translation>
+        <translation>Указва пътя до файла.</translation>
     </message>
 </context>
 <context>
@@ -4545,7 +4545,7 @@ p, li { white-space: pre-wrap; </style></head><body style="
     </message>
     <message>
         <source>Host interface <b>%1</b> does not currently have a valid IPv6 network mask prefix length.</source>
-        <translation type="unfinished"></translation>
+        <translation>Реалният интерфейс <b>%1</b> текущо няма валидна дължина на префикса на IPv6 мрежова маска.</translation>
     </message>
 </context>
 <context>
@@ -4916,27 +4916,27 @@ p, li { white-space: pre-wrap; </style></head><body style="
     </message>
     <message>
         <source>When chosen, VirtualBox will try to auto-detect host proxy settings for tasks like downloading Guest Additions from the network or checking for updates.</source>
-        <translation type="unfinished"></translation>
+        <translation>Когато е избрано, VirtualBox ще опита да засече настройките на реалната машина за прокси за задачи като изтегляне на Виртуални Добавки от мрежата или проверка за обновления.</translation>
     </message>
     <message>
         <source>&Auto-detect Host Proxy Settings</source>
-        <translation type="unfinished"></translation>
+        <translation>Авто-&засичане на настройките за прокси</translation>
     </message>
     <message>
         <source>When chosen, VirtualBox will use direct Internet connection for tasks like downloading Guest Additions from the network or checking for updates.</source>
-        <translation type="unfinished"></translation>
+        <translation>Когато е избрано, VirtualBox ще използва директна Интернет връзка за задачи като изтегляне на Виртуални Добавки от мрежата или проверка за обновления.</translation>
     </message>
     <message>
         <source>&Direct Connection to the Internet</source>
-        <translation type="unfinished"></translation>
+        <translation>&Директна връзка с Интернет</translation>
     </message>
     <message>
         <source>When chosen, VirtualBox will use the proxy settings supplied for tasks like downloading Guest Additions from the network or checking for updates.</source>
-        <translation type="unfinished"></translation>
+        <translation>Когато е избрано, VirtualBox ще използва въведените настройки за прокси за задачи като изтегляне на Виртуални Добавки от мрежата или проверка за обновления.</translation>
     </message>
     <message>
         <source>&Manual Proxy Configuration</source>
-        <translation type="unfinished"></translation>
+        <translation>&Ръчна конфигурация на прокси</translation>
     </message>
 </context>
 <context>
@@ -5552,12 +5552,12 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Host Driver</source>
         <comment>details report (audio)</comment>
-        <translation type="unfinished">Реален драйвер</translation>
+        <translation>Реален драйвер</translation>
     </message>
     <message>
         <source>Controller</source>
         <comment>details report (audio)</comment>
-        <translation type="unfinished">Контролер</translation>
+        <translation>Контролер</translation>
     </message>
 </context>
 <context>
@@ -5565,57 +5565,57 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Video Memory</source>
         <comment>details report</comment>
-        <translation type="unfinished">Видео памет</translation>
+        <translation>Видео памет</translation>
     </message>
     <message>
         <source>Screens</source>
         <comment>details report</comment>
-        <translation type="unfinished">Екрани</translation>
+        <translation>Екрани</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details report (3D Acceleration)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Позволено</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (3D Acceleration)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Забранено</translation>
     </message>
     <message>
         <source>3D Acceleration</source>
         <comment>details report</comment>
-        <translation type="unfinished">3D ускорение</translation>
+        <translation>3D ускорение</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details report (2D Video Acceleration)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Позволено</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (2D Video Acceleration)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Забранено</translation>
     </message>
     <message>
         <source>2D Video Acceleration</source>
         <comment>details report</comment>
-        <translation type="unfinished">2D видео ускорение</translation>
+        <translation>2D видео ускорение</translation>
     </message>
     <message>
         <source>Remote Desktop Server Port</source>
         <comment>details report (VRDE Server)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Порт за Отдалечен работен плот</translation>
     </message>
     <message>
         <source>Remote Desktop Server</source>
         <comment>details report (VRDE Server)</comment>
-        <translation type="unfinished">Отдалечен работен плот</translation>
+        <translation>Отдалечен работен плот</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (VRDE Server)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Забранен</translation>
     </message>
 </context>
 <context>
@@ -5628,12 +5628,12 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Name</source>
         <comment>details report</comment>
-        <translation type="unfinished">Име</translation>
+        <translation>Име</translation>
     </message>
     <message>
         <source>OS Type</source>
         <comment>details report</comment>
-        <translation type="unfinished">Вид ОС</translation>
+        <translation>Вид ОС</translation>
     </message>
 </context>
 <context>
@@ -5645,43 +5645,43 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Bridged adapter, %1</source>
         <comment>details report (network)</comment>
-        <translation type="unfinished">Мостов адаптер, %1</translation>
+        <translation>Мостов адаптер, %1</translation>
     </message>
     <message>
         <source>Internal network, '%1'</source>
         <comment>details report (network)</comment>
-        <translation type="unfinished">Вътрешна мрежа, '%1'</translation>
+        <translation>Вътрешна мрежа, '%1'</translation>
     </message>
     <message>
         <source>Host-only adapter, '%1'</source>
         <comment>details report (network)</comment>
-        <translation type="unfinished">Адаптер само-хост, '%1'</translation>
+        <translation>Адаптер само-хост, '%1'</translation>
     </message>
     <message>
         <source>Generic, '%1'</source>
         <comment>details report (network)</comment>
-        <translation type="unfinished">Основен, '%1'</translation>
+        <translation>Основен, '%1'</translation>
     </message>
     <message>
         <source>NAT network, '%1'</source>
         <comment>details report (network)</comment>
-        <translation type="unfinished">NAT мрежа, '%1'</translation>
+        <translation>NAT мрежа, '%1'</translation>
     </message>
     <message>
         <source>Adapter %1</source>
         <comment>details report (network)</comment>
-        <translation type="unfinished">Адаптер %1</translation>
+        <translation>Адаптер %1</translation>
     </message>
 </context>
 <context>
     <name>UIInformationDataNetworkStatistics</name>
     <message>
         <source>Data Transmitted</source>
-        <translation type="unfinished">Предадени данни</translation>
+        <translation>Предадени данни</translation>
     </message>
     <message>
         <source>Data Received</source>
-        <translation type="unfinished">Получени данни</translation>
+        <translation>Получени данни</translation>
     </message>
     <message>
         <source>Network Statistics</source>
@@ -5699,12 +5699,12 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Port %1</source>
         <comment>details report (parallel ports)</comment>
-        <translation type="unfinished">Порт %1</translation>
+        <translation>Порт %1</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (parallel ports)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Забранени</translation>
     </message>
 </context>
 <context>
@@ -5717,67 +5717,67 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Not Detected</source>
         <comment>guest additions</comment>
-        <translation type="unfinished"></translation>
+        <translation>Не са засечени</translation>
     </message>
     <message>
         <source>Not Detected</source>
         <comment>guest os type</comment>
-        <translation type="unfinished"></translation>
+        <translation>Не е засечен</translation>
     </message>
     <message>
         <source>Not Available</source>
         <comment>details report (VRDE server port)</comment>
-        <translation type="unfinished">Не е достъпен</translation>
+        <translation>Не е достъпен</translation>
     </message>
     <message>
         <source>Screen Resolution</source>
-        <translation type="unfinished">Разделителна способност на екрана</translation>
+        <translation>Разделителна способност на екрана</translation>
     </message>
     <message>
         <source>VM Uptime</source>
-        <translation type="unfinished">Включена от</translation>
+        <translation>Включена от</translation>
     </message>
     <message>
         <source>Clipboard Mode</source>
-        <translation type="unfinished">Режим клипборд</translation>
+        <translation>Режим клипборд</translation>
     </message>
     <message>
         <source>Drag and Drop Mode</source>
-        <translation type="unfinished">Режим влачене и пускане</translation>
+        <translation>Режим влачене и пускане</translation>
     </message>
     <message>
         <source>VT-x/AMD-V</source>
         <comment>details report</comment>
-        <translation type="unfinished">VT-x/AMD-V</translation>
+        <translation>VT-x/AMD-V</translation>
     </message>
     <message>
         <source>Nested Paging</source>
         <comment>details report</comment>
-        <translation type="unfinished">Вместено страниране</translation>
+        <translation>Вместено страниране</translation>
     </message>
     <message>
         <source>Unrestricted Execution</source>
         <comment>details report</comment>
-        <translation type="unfinished">Неограничено изпълнение</translation>
+        <translation>Неограничено изпълнение</translation>
     </message>
     <message>
         <source>Paravirtualization Interface</source>
         <comment>details report</comment>
-        <translation type="unfinished">Паравиртуализационен интерфейс</translation>
+        <translation>Паравиртуализационен интерфейс</translation>
     </message>
     <message>
         <source>Guest Additions</source>
-        <translation type="unfinished">Виртуални Добавки</translation>
+        <translation>Виртуални Добавки</translation>
     </message>
     <message>
         <source>Guest OS Type</source>
         <comment>details report</comment>
-        <translation type="unfinished"></translation>
+        <translation>Виртуална ОС</translation>
     </message>
     <message>
         <source>Remote Desktop Server Port</source>
         <comment>details report (VRDE Server)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Порт за Отдалечен работен плот</translation>
     </message>
 </context>
 <context>
@@ -5789,7 +5789,7 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Port %1</source>
         <comment>details report (serial ports)</comment>
-        <translation type="unfinished">Порт %1</translation>
+        <translation>Порт %1</translation>
     </message>
 </context>
 <context>
@@ -5802,7 +5802,7 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Shared Folders</source>
         <comment>details report (shared folders)</comment>
-        <translation type="unfinished">Споделени папки</translation>
+        <translation>Споделени папки</translation>
     </message>
 </context>
 <context>
@@ -5813,26 +5813,26 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>(Optical Drive)</source>
-        <translation type="unfinished">(Оптично устройство)</translation>
+        <translation>(Оптично устройство)</translation>
     </message>
 </context>
 <context>
     <name>UIInformationDataStorageStatistics</name>
     <message>
         <source>DMA Transfers</source>
-        <translation type="unfinished">DMA трансфери</translation>
+        <translation>DMA трансфери</translation>
     </message>
     <message>
         <source>PIO Transfers</source>
-        <translation type="unfinished">PIO трансфери</translation>
+        <translation>PIO трансфери</translation>
     </message>
     <message>
         <source>Data Read</source>
-        <translation type="unfinished">Прочетени данни</translation>
+        <translation>Прочетени данни</translation>
     </message>
     <message>
         <source>Data Written</source>
-        <translation type="unfinished">Записани данни</translation>
+        <translation>Записани данни</translation>
     </message>
     <message>
         <source>Storage Statistics</source>
@@ -5850,102 +5850,102 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Enabled</source>
         <comment>details report (ACPI)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Позволено</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (ACPI)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Забранено</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details report (I/O APIC)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Позволено</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (I/O APIC)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Забранено</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details report (PAE/NX)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Позволено</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (PAE/NX)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Забранено</translation>
     </message>
     <message>
         <source>Base Memory</source>
         <comment>details report</comment>
-        <translation type="unfinished"></translation>
+        <translation>Основна памет</translation>
     </message>
     <message>
         <source>Processor(s)</source>
         <comment>details report</comment>
-        <translation type="unfinished">Процесор(и)</translation>
+        <translation>Процесор(и)</translation>
     </message>
     <message>
         <source>Execution Cap</source>
         <comment>details report</comment>
-        <translation type="unfinished">Лимит за изпълнение</translation>
+        <translation>Лимит за изпълнение</translation>
     </message>
     <message>
         <source>Boot Order</source>
         <comment>details report</comment>
-        <translation type="unfinished">Ред на зареждане</translation>
+        <translation>Ред на зареждане</translation>
     </message>
     <message>
         <source>ACPI</source>
         <comment>details report</comment>
-        <translation type="unfinished">ACPI</translation>
+        <translation>ACPI</translation>
     </message>
     <message>
         <source>I/O APIC</source>
         <comment>details report</comment>
-        <translation type="unfinished">I/O APIC</translation>
+        <translation>I/O APIC</translation>
     </message>
     <message>
         <source>PAE/NX</source>
         <comment>details report</comment>
-        <translation type="unfinished">PAE/NX</translation>
+        <translation>PAE/NX</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details report (VT-x/AMD-V)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Позволено</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (VT-x/AMD-V)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Забранено</translation>
     </message>
     <message>
         <source>VT-x/AMD-V</source>
         <comment>details report</comment>
-        <translation type="unfinished">VT-x/AMD-V</translation>
+        <translation>VT-x/AMD-V</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details report (Nested Paging)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Позволено</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (Nested Paging)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Забранено</translation>
     </message>
     <message>
         <source>Nested Paging</source>
         <comment>details report</comment>
-        <translation type="unfinished">Вместено страниране</translation>
+        <translation>Вместено страниране</translation>
     </message>
     <message>
         <source>Paravirtualization Interface</source>
         <comment>details report</comment>
-        <translation type="unfinished">Паравиртуализационен интерфейс</translation>
+        <translation>Паравиртуализационен интерфейс</translation>
     </message>
 </context>
 <context>
@@ -5958,17 +5958,17 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Disabled</source>
         <comment>details report (USB)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Забранено</translation>
     </message>
     <message>
         <source>Device Filters</source>
         <comment>details report (USB)</comment>
-        <translation type="unfinished">Филтри на устройствата</translation>
+        <translation>Филтри на устройствата</translation>
     </message>
     <message>
         <source>%1 (%2 active)</source>
         <comment>details report (USB)</comment>
-        <translation type="unfinished">%1 (%2 активен)</translation>
+        <translation>%1 (%2 активни)</translation>
     </message>
 </context>
 <context>
@@ -8135,7 +8135,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Add NVMe Controller</source>
-        <translation type="unfinished"></translation>
+        <translation>Добавяне на NVMe контролер</translation>
     </message>
 </context>
 <context>
@@ -8855,27 +8855,27 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>This type of medium is attached directly or indirectly, preserved when taking snapshots.</source>
-        <translation type="unfinished"></translation>
+        <translation>Този тип съхранение е закачен директно или индиректно, запазва се при правене на снимки.</translation>
     </message>
     <message>
         <source>This type of medium is attached indirectly, changes are wiped out the next time the virtual machine is started.</source>
-        <translation type="unfinished"></translation>
+        <translation>Този тип съхранение е закачен индиректно, промените се заличават при следващото зареждане на виртуалната машина.</translation>
     </message>
     <message>
         <source>This type of medium is attached directly, ignored when taking snapshots.</source>
-        <translation type="unfinished"></translation>
+        <translation>Този тип съхранение е закачен директно, игнорира се при правене на снимки.</translation>
     </message>
     <message>
         <source>This type of medium is attached directly, allowed to be used concurrently by several machines.</source>
-        <translation type="unfinished"></translation>
+        <translation>Този тип съхранение е закачен директно, позволено е едновременното му използване от няколко машини.</translation>
     </message>
     <message>
         <source>This type of medium is attached directly, and can be used by several machines.</source>
-        <translation type="unfinished"></translation>
+        <translation>Този тип съхранение е закачен директно и може да се използва от няколко машини.</translation>
     </message>
     <message>
         <source>This type of medium is attached indirectly, so that one base medium can be used for several VMs which have their own differencing medium to store their modifications.</source>
-        <translation type="unfinished"></translation>
+        <translation>Този тип съхранение е закачен индиректно, така че едно основно съхранение може да се използва от няколко ВМ, които имат свое различаващо съхранение, на което да запазват собствените си модификации.</translation>
     </message>
 </context>
 <context>
@@ -10715,7 +10715,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source><p>Failed to acquire the VirtualBox COM object.</p><p>The application will now terminate.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Неуспешно създаване на VirtualBoxClient COM обект.</p><p>Програмата ще бъде изключена.</p></translation>
     </message>
 </context>
 <context>
@@ -10832,7 +10832,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Holds the location of the virtual machine.</source>
-        <translation type="unfinished"></translation>
+        <translation>Показва местоположението на виртуалната машина.</translation>
     </message>
 </context>
 <context>
@@ -10943,7 +10943,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Url not found on the server</source>
-        <translation type="unfinished"></translation>
+        <translation>URL адресът не е намерен на сървъра</translation>
     </message>
 </context>
 <context>
@@ -12393,15 +12393,15 @@ p, li { white-space: pre-wrap; }
     <name>UIVMInformationDialog</name>
     <message>
         <source>%1 - Session Information</source>
-        <translation type="unfinished">%1 - Информация за сесията</translation>
+        <translation>%1 - Информация за сесията</translation>
     </message>
     <message>
         <source>Configuration &Details</source>
-        <translation type="unfinished">&Детайли на конфигурацията</translation>
+        <translation>&Детайли на конфигурацията</translation>
     </message>
     <message>
         <source>&Runtime Information</source>
-        <translation type="unfinished">Ин&формация за сесията</translation>
+        <translation>Ин&формация за сесията</translation>
     </message>
 </context>
 <context>
@@ -12521,15 +12521,15 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Filter</source>
-        <translation type="unfinished"></translation>
+        <translation>Филтър</translation>
     </message>
     <message>
         <source>Enter filtering string here</source>
-        <translation type="unfinished"></translation>
+        <translation>Въведете текст за филтър тук</translation>
     </message>
     <message>
         <source>Fil&ter</source>
-        <translation type="unfinished"></translation>
+        <translation>&Филтър</translation>
     </message>
 </context>
 <context>
@@ -13133,31 +13133,31 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Appliance is not signed</source>
-        <translation type="unfinished"></translation>
+        <translation>Неподписано приспособление</translation>
     </message>
     <message>
         <source>Appliance signed by %1 (trusted)</source>
-        <translation type="unfinished"></translation>
+        <translation>Подписано приспособление от %1 (доверен)</translation>
     </message>
     <message>
         <source>Appliance signed by %1 (expired!)</source>
-        <translation type="unfinished"></translation>
+        <translation>Подписано приспособление от %1 (изтекъл!)</translation>
     </message>
     <message>
         <source>Unverified signature by %1!</source>
-        <translation type="unfinished"></translation>
+        <translation>Непроверен ключ от %1!</translation>
     </message>
     <message>
         <source>Self signed by %1 (trusted)</source>
-        <translation type="unfinished"></translation>
+        <translation>Самоподписан от %1 (доверен)</translation>
     </message>
     <message>
         <source>Self signed by %1 (expired!)</source>
-        <translation type="unfinished"></translation>
+        <translation>Самоподписан от %1 (изтекъл!)</translation>
     </message>
     <message>
         <source>Unverified self signed signature by %1!</source>
-        <translation type="unfinished"></translation>
+        <translation>Непроверен самоподписан ключ от %1!</translation>
     </message>
 </context>
 <context>
@@ -13391,11 +13391,11 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source><p><nobr>Holds the name or full path to the virtual machine folder you are about to create.</nobr></p></source>
-        <translation type="unfinished"></translation>
+        <translation><p><nobr>Указва името или пълния път до папката на виртуалната машина, която предстои да създадете.</nobr></p></translation>
     </message>
     <message>
         <source><p><nobr>You are about to create the virtual machine in the following folder:</nobr><br><nobr><b>%1</b></nobr></p></source>
-        <translation type="unfinished"></translation>
+        <translation><p><nobr>Предстои да създадете виртуална машина в следната папка:</nobr><br><nobr><b>%1</b></nobr></p></translation>
     </message>
 </context>
 <context>
@@ -16059,102 +16059,102 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>USB</source>
         <comment>StorageBus</comment>
-        <translation type="unfinished">USB</translation>
+        <translation>USB</translation>
     </message>
     <message>
         <source>PCIe</source>
         <comment>StorageBus</comment>
-        <translation type="unfinished"></translation>
+        <translation>PCIe</translation>
     </message>
     <message>
         <source>NVMe</source>
         <comment>StorageControllerType</comment>
-        <translation type="unfinished"></translation>
+        <translation>NVMe</translation>
     </message>
     <message>
         <source>NVMe Port %1</source>
         <comment>StorageSlot</comment>
-        <translation type="unfinished"></translation>
+        <translation>NVMe порт %1</translation>
     </message>
     <message>
         <source>General</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Основни</translation>
+        <translation>Основни</translation>
     </message>
     <message>
         <source>Preview</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Преглед</translation>
+        <translation>Преглед</translation>
     </message>
     <message>
         <source>System</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Система</translation>
+        <translation>Система</translation>
     </message>
     <message>
         <source>Display</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Екран</translation>
     </message>
     <message>
         <source>Storage</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Съхранение</translation>
+        <translation>Съхранение</translation>
     </message>
     <message>
         <source>Audio</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Аудио</translation>
     </message>
     <message>
         <source>Network</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Мрежа</translation>
+        <translation>Мрежа</translation>
     </message>
     <message>
         <source>Serial ports</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Серийни портове</translation>
+        <translation>Серийни портове</translation>
     </message>
     <message>
         <source>Parallel ports</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Паралелни портове</translation>
+        <translation>Паралелни портове</translation>
     </message>
     <message>
         <source>USB</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">USB</translation>
+        <translation>USB</translation>
     </message>
     <message>
         <source>Shared folders</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Споделени папки</translation>
+        <translation>Споделени папки</translation>
     </message>
     <message>
         <source>User interface</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Потребителски интерфейс</translation>
+        <translation>Потребителски интерфейс</translation>
     </message>
     <message>
         <source>Description</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Описание</translation>
+        <translation>Описание</translation>
     </message>
     <message>
         <source>Runtime attributes</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Атрибути на изпълнението</translation>
     </message>
     <message>
         <source>Storage statistics</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Статистики на съхранението</translation>
     </message>
     <message>
         <source>Network statistics</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Мрежови статистики</translation>
     </message>
 </context>
 <context>
diff --git a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_de.ts b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_de.ts
index b5c0319..15f0914 100644
--- a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_de.ts
+++ b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_de.ts
@@ -4757,7 +4757,7 @@
     </message>
     <message>
         <source>Holds the revision number filter. The <i>exact match</i> string format is <tt>IIFF</tt> where <tt>I</tt> is a decimal digit of the integer part and <tt>F</tt> is a decimal digit of the fractional part. An empty string will match any value.</source>
-        <translation>Legt die Revisions-Nr für den Filter fest. Das Format für den <i>genauen</i> Vergleich ist <tt>XXXX</tt>, wobei <tt>X</tt> eine hexadezimale Zahl darstellt. Eine leere Zeichenfolge passt auf beliebige IDs.</translation>
+        <translation>Legt die Revisions-Nr für den Filter fest. Das Format für den <i>genauen</i> Vergleich ist <tt>IIFF</tt>, wobei <tt>I</tt> dezimale Ziffern für den ganzzahligen Anteil und <tt>F</tt> dezimale Ziffern für den Bruchteil darstellen. Eine leere Zeichenfolge passt auf beliebige Revisionsnummern.</translation>
     </message>
     <message>
         <source>Holds the manufacturer filter as an <i>exact match</i> string. An empty string will match any value.</source>
diff --git a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_el.ts b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_el.ts
index 6b039a6..356eabe 100644
--- a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_el.ts
+++ b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_el.ts
@@ -26,7 +26,7 @@
     <message>
         <source>Oracle Corporation</source>
         <comment>Comma-separated list of translators</comment>
-        <translation>Socratis Kalogrianitis, Anastasios Kazakis, Andreas Mastichis</translation>
+        <translation>Socratis Kalogrianitis, Anastasios Kazakis</translation>
     </message>
 </context>
 <context>
@@ -1132,61 +1132,61 @@
     </message>
     <message>
         <source>True</source>
-        <translation>Εκδότης:               %1</translation>
+        <translation>Αληθινό</translation>
     </message>
     <message>
         <source>False</source>
-        <translation>Θέμα:              %1</translation>
+        <translation>Λάθος</translation>
     </message>
     <message>
         <source><tr><td>%1:</td><td>%2</td></tr></source>
         <comment>key: value</comment>
-        <translation>Μη Έγκυρο Πριν:     %1</translation>
+        <translation><tr><td>%1:</td><td>%2</td></tr></translation>
     </message>
     <message>
         <source>Issuer</source>
-        <translation>Μη Έγκυρο Μετά:      %1</translation>
+        <translation>Εκδότης</translation>
     </message>
     <message>
         <source>Subject</source>
-        <translation>Σειριακός Αριθμός:        %1</translation>
+        <translation>Θέμα</translation>
     </message>
     <message>
         <source>Not Valid Before</source>
-        <translation>Αυτο-Υπογεγραμμένο:          %1</translation>
+        <translation>Μη Έγκυρο Πριν</translation>
     </message>
     <message>
         <source>Not Valid After</source>
-        <translation>Αληθινό</translation>
+        <translation>Μη Έγκυρο Μετά</translation>
     </message>
     <message>
         <source>Serial Number</source>
-        <translation>Λάθος</translation>
+        <translation>Σειριακός Αριθμός</translation>
     </message>
     <message>
         <source>Self-Signed</source>
-        <translation>Αρχή (CA):       %1</translation>
+        <translation>Αυτο-Υπογεγραμμένο</translation>
     </message>
     <message>
         <source>Authority (CA)</source>
-        <translation>Δημόσιος Αλγόριθμος:     %1 (%2)</translation>
+        <translation>Αρχή (CA)</translation>
     </message>
     <message>
         <source>Public Algorithm</source>
-        <translation>Αλγόριθμος Υπογραφής:     %1 (%2)</translation>
+        <translation>Δημόσιος Αλγόριθμος</translation>
     </message>
     <message>
         <source>%1 (%2)</source>
         <comment>value (clarification)</comment>
-        <translation>Αριθμός έκδοσης X.509: %1</translation>
+        <translation>%1 (%2)</translation>
     </message>
     <message>
         <source>Signature Algorithm</source>
-        <translation type="unfinished"></translation>
+        <translation>Αλγόριθμος Υπογραφής</translation>
     </message>
     <message>
         <source>X.509 Version Number</source>
-        <translation type="unfinished"></translation>
+        <translation>Αριθμός έκδοσης X.509</translation>
     </message>
 </context>
 <context>
@@ -8952,82 +8952,82 @@
     <message>
         <source>General</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Γενικά</translation>
+        <translation>Γενικά</translation>
     </message>
     <message>
         <source>Preview</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Προεπισκόπηση</translation>
+        <translation>Προεπισκόπηση</translation>
     </message>
     <message>
         <source>System</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Σύστημα</translation>
+        <translation>Σύστημα</translation>
     </message>
     <message>
         <source>Display</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Οθόνη</translation>
+        <translation>Οθόνη</translation>
     </message>
     <message>
         <source>Storage</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Αποθήκευση</translation>
+        <translation>Αποθήκευση</translation>
     </message>
     <message>
         <source>Audio</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Ήχος</translation>
+        <translation>Ήχος</translation>
     </message>
     <message>
         <source>Network</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Δίκτυο</translation>
+        <translation>Δίκτυο</translation>
     </message>
     <message>
         <source>Serial ports</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Σειριακές Θύρες</translation>
+        <translation>Σειριακές Θύρες</translation>
     </message>
     <message>
         <source>Parallel ports</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Παράλληλες Θύρες</translation>
+        <translation>Παράλληλες Θύρες</translation>
     </message>
     <message>
         <source>USB</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">USB</translation>
+        <translation>USB</translation>
     </message>
     <message>
         <source>Shared folders</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Κοινοί φάκελοι</translation>
+        <translation>Κοινοί φάκελοι</translation>
     </message>
     <message>
         <source>User interface</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Περιβάλλον χρήστη</translation>
+        <translation>Περιβάλλον χρήστη</translation>
     </message>
     <message>
         <source>Description</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Περιγραφή</translation>
+        <translation>Περιγραφή</translation>
     </message>
     <message>
         <source>Runtime attributes</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Ιδιότητες Εκτέλεσης</translation>
     </message>
     <message>
         <source>Storage statistics</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Στατιστικά αποθήκευσης</translation>
     </message>
     <message>
         <source>Network statistics</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Στατιστικά δικτύου</translation>
     </message>
 </context>
 <context>
diff --git a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_eu.ts b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_eu.ts
index 6eaeecd..9a82646 100644
--- a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_eu.ts
+++ b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_eu.ts
@@ -4142,7 +4142,7 @@
 <context>
     <name>UIHostComboEditor</name>
     <message>
-        <location filename="../src/widgets/UIHostComboEditor.cpp" line="+204"/>
+        <location filename="../src/widgets/UIHostComboEditor.cpp" line="+209"/>
         <location line="+14"/>
         <source><key_%1></source>
         <translation><key_%1></translation>
@@ -4158,7 +4158,7 @@
         <translation>Eskuin </translation>
     </message>
     <message>
-        <location line="+173"/>
+        <location line="+231"/>
         <source>Left Shift</source>
         <translation>Ezkerreko Aldatu</translation>
     </message>
@@ -4224,7 +4224,7 @@
     </message>
     <message>
         <location line="+15"/>
-        <location line="+627"/>
+        <location line="+638"/>
         <source>None</source>
         <translation>Ezer ez</translation>
     </message>
@@ -9526,7 +9526,7 @@
 <context>
     <name>UINetworkReplyPrivate</name>
     <message>
-        <location filename="../src/net/UINetworkReply.cpp" line="+954"/>
+        <location filename="../src/net/UINetworkReply.cpp" line="+955"/>
         <source>Host not found</source>
         <translation>Hostalaria ez da aurkitu</translation>
     </message>
@@ -9590,7 +9590,7 @@
 <context>
     <name>UINetworkReplyPrivateThread</name>
     <message>
-        <location line="-577"/>
+        <location line="-578"/>
         <source>During proxy configuration</source>
         <translation>Proxy itxurapenean zehar</translation>
     </message>
diff --git a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_id.ts b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_id.ts
index 6a84493..1419b05 100644
--- a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_id.ts
+++ b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_id.ts
@@ -145,22 +145,22 @@
     </message>
     <message>
         <source>The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing<br/><br/>  <font color=blue>'/sbin/vboxconfig'</font><br/><br/>as root.</source>
-        <translation type="unfinished"></translation>
+        <translation>Driver VirtualBox untuk kernel Linux (vboxdrv) mungkin tidak dimuat atau ada masalah ijin dengan /dev/vboxdrv. Silakan pasang ulang modul kernel dengan menjalankan<br/><br/>  <font color=blue>'/sbin/rcvboxdrv'</font><br/><br/>sebagai root.</translation>
     </message>
     <message>
         <source>The VirtualBox kernel modules do not match this version of VirtualBox. The installation of VirtualBox was apparently not successful. Executing<br/><br/>  <font color=blue>'/sbin/vboxconfig'</font><br/><br/>may correct this. Make sure that you do not mix the OSE version and the PUEL version of VirtualBox.</source>
-        <translation type="unfinished"></translation>
+        <translation>Modul kernel VirtualBox tidak cocok dengan versi VirtualBox ini. Instalasi VirtualBox sepertinya tak sukses. Menjalankan <br/><br/>  <font color=blue>'/sbin/rcvboxdrv'</font><br/><br/>mungkin memperbaiki hal ini. Pastikan bahwa Anda tak mencampur VirtualBox versi OSE dan versi PUEL.</translation>
     </message>
 </context>
 <context>
     <name>QIArrowButtonPress</name>
     <message>
         <source>&Back</source>
-        <translation type="unfinished">Kem&bali</translation>
+        <translation>Kem&bali</translation>
     </message>
     <message>
         <source>&Next</source>
-        <translation type="unfinished"></translation>
+        <translation>La&njut</translation>
     </message>
 </context>
 <context>
@@ -175,11 +175,11 @@
     </message>
     <message>
         <source>&Details</source>
-        <translation type="unfinished"></translation>
+        <translation>&Rincian</translation>
     </message>
     <message>
         <source>&Details (%1 of %2)</source>
-        <translation type="unfinished">&Rincian (%1 dari %2)</translation>
+        <translation>&Rincian (%1 dari %2)</translation>
     </message>
 </context>
 <context>
@@ -308,7 +308,7 @@
     </message>
     <message>
         <source>Seam&less Mode</source>
-        <translation type="unfinished">Mode Seam&less</translation>
+        <translation>Mode Seam&less</translation>
     </message>
     <message>
         <source>Switch to seamless desktop integration mode</source>
@@ -887,7 +887,7 @@
     </message>
     <message>
         <source>Gro&up</source>
-        <translation>Gr*up</translation>
+        <translation>Gr&up</translation>
     </message>
     <message>
         <source>Sort the group of the first selected machine alphabetically</source>
@@ -957,482 +957,482 @@
     </message>
     <message>
         <source>&VirtualBox</source>
-        <translation type="unfinished"></translation>
+        <translation>&VirtualBox</translation>
     </message>
     <message>
         <source>&File</source>
-        <translation type="unfinished"></translation>
+        <translation>&Berkas</translation>
     </message>
     <message>
         <source>&Window</source>
-        <translation type="unfinished"></translation>
+        <translation>&Jendela</translation>
     </message>
     <message>
         <source>&Minimize</source>
-        <translation type="unfinished"></translation>
+        <translation>&Minimalkan</translation>
     </message>
     <message>
         <source>Minimize active window</source>
-        <translation type="unfinished"></translation>
+        <translation>Minimalkan jendela yang aktif</translation>
     </message>
     <message>
         <source>Display the Network Operations Manager window</source>
-        <translation type="unfinished"></translation>
+        <translation>Tampilkan jendela Manajer Operasi Jaringan</translation>
     </message>
     <message>
         <source>Display a window with product information</source>
-        <translation type="unfinished"></translation>
+        <translation>Tampilkan jendela dengan informasi produk</translation>
     </message>
     <message>
         <source>&Preferences...</source>
         <comment>global preferences window</comment>
-        <translation type="unfinished">&Preferensi...</translation>
+        <translation>&Preferensi...</translation>
     </message>
     <message>
         <source>Display the global preferences window</source>
-        <translation type="unfinished"></translation>
+        <translation>Tampilkan jendela pengaturan global</translation>
     </message>
     <message>
         <source>Display the virtual machine settings window</source>
-        <translation type="unfinished"></translation>
+        <translation>Tampilkan jendela pengaturan mesin virtual</translation>
     </message>
     <message>
         <source>Display the virtual machine session information window</source>
-        <translation type="unfinished"></translation>
+        <translation>Tampilkan jendela informasi sesi mesin virtual</translation>
     </message>
     <message>
         <source>&Save State</source>
-        <translation type="unfinished"></translation>
+        <translation>&Simpan Keadaan</translation>
     </message>
     <message>
         <source>Save the state of the virtual machine</source>
-        <translation type="unfinished"></translation>
+        <translation>Simpan keadaan dari mesin virtual</translation>
     </message>
     <message>
         <source>Send the ACPI Shutdown signal to the virtual machine</source>
-        <translation type="unfinished"></translation>
+        <translation>Kirim sinyal Shutdown ACPI ke mesin virtual</translation>
     </message>
     <message>
         <source>&Full-screen Mode</source>
-        <translation type="unfinished"></translation>
+        <translation>Mode Layar-&Penuh</translation>
     </message>
     <message>
         <source>Switch between normal and full-screen mode</source>
-        <translation type="unfinished"></translation>
+        <translation>Bertukar antara mode normal dan layar penuh</translation>
     </message>
     <message>
         <source>S&caled Mode</source>
-        <translation type="unfinished"></translation>
+        <translation>Mode &Skala</translation>
     </message>
     <message>
         <source>&Minimize Window</source>
-        <translation type="unfinished"></translation>
+        <translation>&Minimalkan Jendela</translation>
     </message>
     <message>
         <source>Automatically resize the guest display when the window is resized</source>
-        <translation type="unfinished"></translation>
+        <translation>Ubah ukuran tampilan guest secara otomatis saat jendela diubah ukurannya</translation>
     </message>
     <message>
         <source>Take guest display screenshot</source>
-        <translation type="unfinished"></translation>
+        <translation>Ambil cuplikan layar tampilan guest</translation>
     </message>
     <message>
         <source>Display virtual machine settings window to configure video capture</source>
-        <translation type="unfinished"></translation>
+        <translation>Tampilkan jendela pengaturan mesin virtual untuk menata perekaman video</translation>
     </message>
     <message>
         <source>Enable guest display video capture</source>
-        <translation type="unfinished"></translation>
+        <translation>Fungsikan perekaman video tampilan guest</translation>
     </message>
     <message>
         <source>Allow remote desktop (RDP) connections to this machine</source>
-        <translation type="unfinished"></translation>
+        <translation>Ijinkan koneksi remote desktop (RDP) ke mesin ini</translation>
     </message>
     <message>
         <source>&Menu Bar</source>
-        <translation type="unfinished"></translation>
+        <translation>Bilah &Menu</translation>
     </message>
     <message>
         <source>&Menu Bar Settings...</source>
-        <translation type="unfinished"></translation>
+        <translation>Pengaturan Bilah &Menu...</translation>
     </message>
     <message>
         <source>Display window to configure menu-bar</source>
-        <translation type="unfinished"></translation>
+        <translation>Tampilkan jendela untuk mengatur bilah menu</translation>
     </message>
     <message>
         <source>Show Menu &Bar</source>
-        <translation type="unfinished"></translation>
+        <translation>Tampilkan &Bilah Menu</translation>
     </message>
     <message>
         <source>Enable menu-bar</source>
-        <translation type="unfinished"></translation>
+        <translation>Fungsikan bilah menu</translation>
     </message>
     <message>
         <source>&Status Bar</source>
-        <translation type="unfinished"></translation>
+        <translation>Bilah &Status</translation>
     </message>
     <message>
         <source>&Status Bar Settings...</source>
-        <translation type="unfinished"></translation>
+        <translation>Pengaturan Bilah &Status...</translation>
     </message>
     <message>
         <source>Display window to configure status-bar</source>
-        <translation type="unfinished"></translation>
+        <translation>Tampilkan jendela untuk mengatur bilah status</translation>
     </message>
     <message>
         <source>Show Status &Bar</source>
-        <translation type="unfinished"></translation>
+        <translation>Tampilkan &Bilah Status</translation>
     </message>
     <message>
         <source>Enable status-bar</source>
-        <translation type="unfinished"></translation>
+        <translation>Fungsikan bilah status</translation>
     </message>
     <message>
         <source>S&cale Factor</source>
-        <translation type="unfinished"></translation>
+        <translation>Faktor S&kala</translation>
     </message>
     <message>
         <source>&Input</source>
-        <translation type="unfinished"></translation>
+        <translation>Mas&ukan</translation>
     </message>
     <message>
         <source>&Keyboard</source>
-        <translation type="unfinished">&Keyboard</translation>
+        <translation>Papan &Ketik</translation>
     </message>
     <message>
         <source>&Keyboard Settings...</source>
-        <translation type="unfinished"></translation>
+        <translation>Pengaturan Papan &Ketik...</translation>
     </message>
     <message>
         <source>Display global preferences window to configure keyboard shortcuts</source>
-        <translation type="unfinished"></translation>
+        <translation>Tampilkan jendela preferensi global untuk menata pintasan papan ketik</translation>
     </message>
     <message>
         <source>&Insert %1</source>
         <comment>that means send the %1 key sequence to the virtual machine</comment>
-        <translation type="unfinished"></translation>
+        <translation>K&irim %1</translation>
     </message>
     <message>
         <source>Send the %1 sequence to the virtual machine</source>
-        <translation type="unfinished"></translation>
+        <translation>Kirim urutan %1 ke mesin virtual</translation>
     </message>
     <message>
         <source>&Mouse</source>
-        <translation type="unfinished"></translation>
+        <translation>&Mouse</translation>
     </message>
     <message>
         <source>&Mouse Integration</source>
-        <translation type="unfinished"></translation>
+        <translation>Integrasi &Mouse</translation>
     </message>
     <message>
         <source>Enable host mouse pointer integration</source>
-        <translation type="unfinished"></translation>
+        <translation>Memfungsikan integrasi pointer mouse pada host</translation>
     </message>
     <message>
         <source>&Hard Disks</source>
-        <translation type="unfinished">&Hard Disk</translation>
+        <translation>&Hard Disk</translation>
     </message>
     <message>
         <source>&Hard Disk Settings...</source>
-        <translation type="unfinished"></translation>
+        <translation>Pengaturan &Hard Disk...</translation>
     </message>
     <message>
         <source>Display virtual machine settings window to configure hard disks</source>
-        <translation type="unfinished"></translation>
+        <translation>Tampilkan jendela pengaturan mesin virtual untuk menata hard disk</translation>
     </message>
     <message>
         <source>&Optical Drives</source>
-        <translation type="unfinished"></translation>
+        <translation>Drive &Optik</translation>
     </message>
     <message>
         <source>&Floppy Drives</source>
-        <translation type="unfinished"></translation>
+        <translation>&Drive Floppy</translation>
     </message>
     <message>
         <source>&Network</source>
-        <translation type="unfinished"></translation>
+        <translation>Jari&ngan</translation>
     </message>
     <message>
         <source>Display virtual machine settings window to configure network adapters</source>
-        <translation type="unfinished"></translation>
+        <translation>Tampilkan jendela pengaturan mesin virtual untuk menata adaptor jaringan</translation>
     </message>
     <message>
         <source>&USB</source>
-        <translation type="unfinished"></translation>
+        <translation>&USB</translation>
     </message>
     <message>
         <source>&USB Settings...</source>
-        <translation type="unfinished"></translation>
+        <translation>Pengaturan &USB...</translation>
     </message>
     <message>
         <source>Display virtual machine settings window to configure USB devices</source>
-        <translation type="unfinished"></translation>
+        <translation>Menampilkan jendela pengaturan mesin virtual untuk menata perangkat USB</translation>
     </message>
     <message>
         <source>&Drag and Drop</source>
-        <translation type="unfinished"></translation>
+        <translation>Seret &dan Jatuhkan</translation>
     </message>
     <message>
         <source>&Shared Folders</source>
-        <translation type="unfinished"></translation>
+        <translation>Folder Ber&sama</translation>
     </message>
     <message>
         <source>Display virtual machine settings window to configure shared folders</source>
-        <translation type="unfinished"></translation>
+        <translation>Menampilkan jendela pengaturan mesin virtual untuk menata folder bersama</translation>
     </message>
     <message>
         <source>Insert the Guest Additions disk file into the virtual optical drive</source>
-        <translation type="unfinished"></translation>
+        <translation>Masukkan berkas disk Guest Addition ke dalam drive optik virtual</translation>
     </message>
     <message>
         <source>&Logging</source>
         <comment>debug action</comment>
-        <translation type="unfinished"></translation>
+        <translation>Pencatatan &Log</translation>
     </message>
     <message>
         <source>Show &Log...</source>
         <comment>debug action</comment>
-        <translation type="unfinished">Tampilkan &Log...</translation>
+        <translation>Tampilkan &Log...</translation>
     </message>
     <message>
         <source>%1%</source>
         <comment>scale-factor</comment>
-        <translation type="unfinished">%1%</translation>
+        <translation>%1%</translation>
     </message>
     <message>
         <source>Enable</source>
         <comment>Virtual Screen</comment>
-        <translation type="unfinished">Nyalakan</translation>
+        <translation>Fungsikan</translation>
     </message>
     <message>
         <source>Resize to %1x%2</source>
         <comment>Virtual Screen</comment>
-        <translation type="unfinished"></translation>
+        <translation>Ubah ukuran ke %1x%2</translation>
     </message>
     <message>
         <source>Preview Monitor %1</source>
-        <translation type="unfinished">Pemantauan Pratinjau %1</translation>
+        <translation>Pratinjau Monitor %1</translation>
     </message>
     <message>
         <source>&Connect Network Adapter</source>
-        <translation type="unfinished"></translation>
+        <translation>&Sambungkan Adaptor Jaringan</translation>
     </message>
     <message>
         <source>Connect Network Adapter &%1</source>
-        <translation type="unfinished"></translation>
+        <translation>Sambungkan Adaptor Jaringan &%1</translation>
     </message>
     <message>
         <source>No USB Devices Connected</source>
-        <translation type="unfinished">Tidak Ada Perangkat USB Tersambung</translation>
+        <translation>Tidak Ada Perangkat USB Tersambung</translation>
     </message>
     <message>
         <source>No supported devices connected to the host PC</source>
-        <translation type="unfinished"></translation>
+        <translation>Tidak ada perangkat yang didukung yang terhubung ke PC host</translation>
     </message>
     <message>
         <source>No Webcams Connected</source>
-        <translation type="unfinished">Tidak Ada Webcam Yang Tersambung</translation>
+        <translation>Tidak Ada Webcam Yang Tersambung</translation>
     </message>
     <message>
         <source>No supported webcams connected to the host PC</source>
-        <translation type="unfinished">Tidak ada webcam yang didukung yang terhubung ke PC host</translation>
+        <translation>Tidak ada webcam yang didukung yang terhubung ke PC host</translation>
     </message>
     <message>
         <source>E&xtra Data Manager...</source>
-        <translation type="unfinished"></translation>
+        <translation>Manajer Data E&kstra...</translation>
     </message>
     <message>
         <source>Display the Extra Data Manager window</source>
-        <translation type="unfinished"></translation>
+        <translation>Menampilkan jendela Manajer Data Ekstra</translation>
     </message>
     <message>
         <source>Create new virtual machine</source>
-        <translation type="unfinished"></translation>
+        <translation>Buat mesin virtual baru</translation>
     </message>
     <message>
         <source>Add existing virtual machine</source>
-        <translation type="unfinished"></translation>
+        <translation>Tambahkan mesin virtual yang telah ada</translation>
     </message>
     <message>
         <source>Rename selected virtual machine group</source>
-        <translation type="unfinished"></translation>
+        <translation>Ubah nama grup mesin virtual yang dipilih</translation>
     </message>
     <message>
         <source>&Ungroup</source>
-        <translation type="unfinished"></translation>
+        <translation>Lepas Gr&up</translation>
     </message>
     <message>
         <source>Ungroup items of selected virtual machine group</source>
-        <translation type="unfinished"></translation>
+        <translation>Bongkar grup dari mesin virtual yang dipilih</translation>
     </message>
     <message>
         <source>&Sort</source>
-        <translation type="unfinished"></translation>
+        <translation>&Urut</translation>
     </message>
     <message>
         <source>Sort items of selected virtual machine group alphabetically</source>
-        <translation type="unfinished"></translation>
+        <translation>Urutkan grup dari mesin virtual yang dipilih pertama secara alfabet</translation>
     </message>
     <message>
         <source>Add new group based on selected virtual machines</source>
-        <translation type="unfinished"></translation>
+        <translation>Tambahkan grup baru berdasarkan mesin virtual yang dipilih</translation>
     </message>
     <message>
         <source>Clone selected virtual machine</source>
-        <translation type="unfinished"></translation>
+        <translation>Buat klon dari mesin virtual yang dipilih</translation>
     </message>
     <message>
         <source>Remove selected virtual machines</source>
-        <translation type="unfinished"></translation>
+        <translation>Hapus mesin virtual yang dipilih</translation>
     </message>
     <message>
         <source>Start selected virtual machines</source>
-        <translation type="unfinished"></translation>
+        <translation>Mulai jalankan mesin virtual yang dipilih</translation>
     </message>
     <message>
         <source>Switch to the windows of selected virtual machines</source>
-        <translation type="unfinished"></translation>
+        <translation>Berpindah ke jendela mesin virtual yang dipilih</translation>
     </message>
     <message>
         <source>&Normal Start</source>
-        <translation type="unfinished"></translation>
+        <translation>Awal &Normal</translation>
     </message>
     <message>
         <source>&Headless Start</source>
-        <translation type="unfinished"></translation>
+        <translation>Awal &Headless</translation>
     </message>
     <message>
         <source>Start selected virtual machines in the background</source>
-        <translation type="unfinished"></translation>
+        <translation>Jalankan mesin virtual yang dipilih di latar belakang</translation>
     </message>
     <message>
         <source>&Detachable Start</source>
-        <translation type="unfinished"></translation>
+        <translation>Awal &Dapat-Lepas</translation>
     </message>
     <message>
         <source>Start selected virtual machines with option of continuing in background</source>
-        <translation type="unfinished"></translation>
+        <translation>Jalankan mesin virtual yang dipilih dengan opsi meneruskan di latar belakang</translation>
     </message>
     <message>
         <source>Suspend execution of selected virtual machines</source>
-        <translation type="unfinished"></translation>
+        <translation>Tahan eksekusi mesin virtual yang dipilih</translation>
     </message>
     <message>
         <source>Reset selected virtual machines</source>
-        <translation type="unfinished"></translation>
+        <translation>Reset mesin virtual yang dipilih</translation>
     </message>
     <message>
         <source>D&iscard Saved State...</source>
-        <translation type="unfinished"></translation>
+        <translation>Buang Keadaan Ters&impan...</translation>
     </message>
     <message>
         <source>Discard saved state of selected virtual machines</source>
-        <translation type="unfinished"></translation>
+        <translation>Buang keadaan tersimpan pada mesin virtual terpilih</translation>
     </message>
     <message>
         <source>Show log files of selected virtual machines</source>
-        <translation type="unfinished"></translation>
+        <translation>Tampilkan berkas log mesin virtual yang dipilih</translation>
     </message>
     <message>
         <source>Re&fresh</source>
-        <translation type="unfinished"></translation>
+        <translation>Sega&rkan</translation>
     </message>
     <message>
         <source>Refresh accessibility state of selected virtual machines</source>
-        <translation type="unfinished"></translation>
+        <translation>Menyegarkan keadaan akesibilitas pada mesin virtual yang dipilih</translation>
     </message>
     <message>
         <source>S&how in Finder</source>
-        <translation type="unfinished"></translation>
+        <translation>Tampilkan d&i Finder</translation>
     </message>
     <message>
         <source>Show the VirtualBox Machine Definition files in Finder</source>
-        <translation type="unfinished"></translation>
+        <translation>Tampilkan berkas Definisi Mesin VirtualBox di dalam Finder</translation>
     </message>
     <message>
         <source>S&how in Explorer</source>
-        <translation type="unfinished"></translation>
+        <translation>Tampilkan d&i Explorer</translation>
     </message>
     <message>
         <source>Show the VirtualBox Machine Definition files in Explorer</source>
-        <translation type="unfinished"></translation>
+        <translation>Tampilkan berkas Definisi Mesin VirtualBox di dalam Explorer</translation>
     </message>
     <message>
         <source>S&how in File Manager</source>
-        <translation type="unfinished"></translation>
+        <translation>Tampilkan d&i Manajer Berkas</translation>
     </message>
     <message>
         <source>Show the VirtualBox Machine Definition files in the File Manager</source>
-        <translation type="unfinished"></translation>
+        <translation>Tampilkan berkas Definisi Mesin VirtualBox di dalam Manajer Berkas</translation>
     </message>
     <message>
         <source>Cr&eate Alias on Desktop</source>
-        <translation type="unfinished"></translation>
+        <translation>Buat Alias pada D&esktop</translation>
     </message>
     <message>
         <source>Create alias files to the VirtualBox Machine Definition files on your desktop</source>
-        <translation type="unfinished"></translation>
+        <translation>Membuat berkas alias ke berkas Definisi Mesin VirtualBox pada desktop Anda</translation>
     </message>
     <message>
         <source>Cr&eate Shortcut on Desktop</source>
-        <translation type="unfinished"></translation>
+        <translation>Buat Pintasan pada D&esktop</translation>
     </message>
     <message>
         <source>Create shortcut files to the VirtualBox Machine Definition files on your desktop</source>
-        <translation type="unfinished"></translation>
+        <translation>Membuat suatu berkas pintasan ke berkas Definisi Mesin VirtualBox pada desktop Anda</translation>
     </message>
     <message>
         <source>Sort group of first selected virtual machine alphabetically</source>
-        <translation type="unfinished"></translation>
+        <translation>Urutkan grup dari mesin virtual yang dipilih pertama secara alfabet</translation>
     </message>
     <message>
         <source>Save state of selected virtual machines</source>
-        <translation type="unfinished"></translation>
+        <translation>Simpan keadaan dari mesin virtual yang dipilih</translation>
     </message>
     <message>
         <source>Send ACPI Shutdown signal to selected virtual machines</source>
-        <translation type="unfinished"></translation>
+        <translation>Kirim sinyal Shutdown ACPI ke mesin virtual yang dipilih</translation>
     </message>
     <message>
         <source>Power off selected virtual machines</source>
-        <translation type="unfinished"></translation>
+        <translation>Matikan mesin virtual yang dipilih</translation>
     </message>
     <message>
         <source>&VirtualBox Bug Tracker...</source>
-        <translation type="unfinished"></translation>
+        <translation>Pelacak Bug &VirtualBox...</translation>
     </message>
     <message>
         <source>Open the browser and go to the VirtualBox product bug tracker</source>
-        <translation type="unfinished"></translation>
+        <translation>Membuka peramban dan pergi ke pelacak bug produk VirtualBox</translation>
     </message>
     <message>
         <source>&VirtualBox Forums...</source>
-        <translation type="unfinished"></translation>
+        <translation>Forum &VirtualBox...</translation>
     </message>
     <message>
         <source>Open the browser and go to the VirtualBox product forums</source>
-        <translation type="unfinished"></translation>
+        <translation>Membuka peramban dan pergi ke forum produk VirtualBox</translation>
     </message>
     <message>
         <source>&Oracle Web Site...</source>
-        <translation type="unfinished"></translation>
+        <translation>Situs Web &Oracle...</translation>
     </message>
     <message>
         <source>Open the browser and go to the Oracle web site</source>
-        <translation type="unfinished"></translation>
+        <translation>Membuka peramban dan pergi ke situs web Oracle</translation>
     </message>
     <message>
         <source>&Detach GUI</source>
-        <translation type="unfinished"></translation>
+        <translation>&Lepas GUI</translation>
     </message>
     <message>
         <source>Detach the GUI from headless VM</source>
-        <translation type="unfinished"></translation>
+        <translation>Lepaskan GUI dari VM headless</translation>
     </message>
     <message>
         <source>Disable Dock Icon Overlay</source>
-        <translation type="unfinished"></translation>
+        <translation>Nonaktifkan Overlay Ikon Dok</translation>
     </message>
 </context>
 <context>
@@ -1440,29 +1440,29 @@
     <message>
         <source>ID</source>
         <comment>password table field</comment>
-        <translation type="unfinished"></translation>
+        <translation>ID</translation>
     </message>
     <message>
         <source>Password</source>
         <comment>password table field</comment>
-        <translation type="unfinished"></translation>
+        <translation>Password</translation>
     </message>
     <message numerus="yes">
         <source><nobr>Used by the following %n hard disk(s):</nobr><br>%1</source>
         <comment>This text is never used with n == 0. Feel free to drop the %n where possible, we only included it because of problems with Qt Linguist (but the user can see how many hard drives are in the tool-tip and doesn't need to be told).</comment>
-        <translation type="unfinished">
-            <numerusform></numerusform>
+        <translation>
+            <numerusform><nobr>Dipakai oleh hard disk %n berikut:</nobr><br>%1</numerusform>
         </translation>
     </message>
     <message>
         <source>%1 - Disk Encryption</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 - Enkripsi Disk</translation>
     </message>
     <message numerus="yes">
         <source>This virtual machine is password protected. Please enter the %n encryption password(s) below.</source>
         <comment>This text is never used with n == 0. Feel free to drop the %n where possible, we only included it because of problems with Qt Linguist (but the user can see how many passwords are in the list and doesn't need to be told).</comment>
-        <translation type="unfinished">
-            <numerusform></numerusform>
+        <translation>
+            <numerusform>Mesin virtual ini dilindungi sandi. Harap masukkan sandi enkripsi %n di bawah.</numerusform>
         </translation>
     </message>
 </context>
@@ -1596,19 +1596,19 @@
     </message>
     <message>
         <source>Storage Controller (IDE)</source>
-        <translation type="unfinished"></translation>
+        <translation>Pengendali Penyimpanan (IDE)</translation>
     </message>
     <message>
         <source>Storage Controller (SATA)</source>
-        <translation type="unfinished"></translation>
+        <translation>Pengendali Penyimpanan (SATA)</translation>
     </message>
     <message>
         <source>Storage Controller (SCSI)</source>
-        <translation type="unfinished"></translation>
+        <translation>Pengendali Penyimpanan (SCSI)</translation>
     </message>
     <message>
         <source>Storage Controller (SAS)</source>
-        <translation type="unfinished"></translation>
+        <translation>Pengendali Penyimpanan (SAS)</translation>
     </message>
 </context>
 <context>
@@ -1626,73 +1626,73 @@
     <name>UIApplianceUnverifiedCertificateViewer</name>
     <message>
         <source>Unverifiable Certificate! Continue?</source>
-        <translation type="unfinished"></translation>
+        <translation>Sertifikat Tak Dapat Diverifikasi! Lanjutkan?</translation>
     </message>
     <message>
         <source><b>The appliance is signed by an unverified self signed certificate issued by '%1'. We recommend to only proceed with the importing if you are sure you should trust this entity.</b></source>
-        <translation type="unfinished"></translation>
+        <translation><b>Appliance ditandatangani oleh suatu sertifikat yang ditandatangani sendiri yang tidak terverifikasi, diterbitkan oleh '%1'. Kami menyarankan untuk melanjutkan mengimpor hanya bila Anda yakin bahwa Anda mempercayai entitas ini.</b></translation>
     </message>
     <message>
         <source><b>The appliance is signed by an unverified certificate issued to '%1'. We recommend to only proceed with the importing if you are sure you should trust this entity.</b></source>
-        <translation type="unfinished"></translation>
+        <translation><b>Appliance ditandatangani oleh suatu sertifikat yang tidak terverifikasi, diterbitkan oleh '%1'. Kami menyarankan untuk melanjutkan mengimpor hanya bila Anda yakin bahwa Anda mempercayai entitas ini.</b></translation>
     </message>
     <message>
         <source>True</source>
-        <translation type="unfinished"></translation>
+        <translation>True</translation>
     </message>
     <message>
         <source>False</source>
-        <translation type="unfinished"></translation>
+        <translation>False</translation>
     </message>
     <message>
         <source><tr><td>%1:</td><td>%2</td></tr></source>
         <comment>key: value</comment>
-        <translation type="unfinished"></translation>
+        <translation><tr><td>%1:</td><td>%2</td></tr></translation>
     </message>
     <message>
         <source>Issuer</source>
-        <translation type="unfinished"></translation>
+        <translation>Penerbit</translation>
     </message>
     <message>
         <source>Subject</source>
-        <translation type="unfinished"></translation>
+        <translation>Subjek</translation>
     </message>
     <message>
         <source>Not Valid Before</source>
-        <translation type="unfinished"></translation>
+        <translation>Tidak Sah Sebelum</translation>
     </message>
     <message>
         <source>Not Valid After</source>
-        <translation type="unfinished"></translation>
+        <translation>Tidak Sah Setelah</translation>
     </message>
     <message>
         <source>Serial Number</source>
-        <translation type="unfinished"></translation>
+        <translation>Nomor Seri</translation>
     </message>
     <message>
         <source>Self-Signed</source>
-        <translation type="unfinished"></translation>
+        <translation>Ditandatangani Sendiri</translation>
     </message>
     <message>
         <source>Authority (CA)</source>
-        <translation type="unfinished"></translation>
+        <translation>Otoritas (CA)</translation>
     </message>
     <message>
         <source>Public Algorithm</source>
-        <translation type="unfinished"></translation>
+        <translation>Algoritma Publik</translation>
     </message>
     <message>
         <source>%1 (%2)</source>
         <comment>value (clarification)</comment>
-        <translation type="unfinished"></translation>
+        <translation>%1 (%2)</translation>
     </message>
     <message>
         <source>Signature Algorithm</source>
-        <translation type="unfinished"></translation>
+        <translation>Algoritma Tanda Tangan</translation>
     </message>
     <message>
         <source>X.509 Version Number</source>
-        <translation type="unfinished"></translation>
+        <translation>Nomor Versi X.509</translation>
     </message>
 </context>
 <context>
@@ -2287,7 +2287,7 @@
     </message>
     <message>
         <source>Retrieving data ...</source>
-        <translation type="unfinished"></translation>
+        <translation>Mengambil data ...</translation>
     </message>
 </context>
 <context>
@@ -2393,7 +2393,7 @@
     <name>UIEmptyFilePathSelector</name>
     <message>
         <source>Choose...</source>
-        <translation type="unfinished">Pilih...</translation>
+        <translation>Pilih...</translation>
     </message>
 </context>
 <context>
@@ -2547,55 +2547,55 @@
     <name>UIFilePathSelector</name>
     <message>
         <source>&Copy</source>
-        <translation type="unfinished">&Salin</translation>
+        <translation>&Salin</translation>
     </message>
     <message>
         <source>Other...</source>
-        <translation type="unfinished">Lainnya...</translation>
+        <translation>Lainnya...</translation>
     </message>
     <message>
         <source>Reset</source>
-        <translation type="unfinished">Reset</translation>
+        <translation>Reset</translation>
     </message>
     <message>
         <source>Displays a window to select a different folder.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menampilkan jendela untuk memilih folder lain.</translation>
     </message>
     <message>
         <source>Resets the folder path to the default value.</source>
-        <translation type="unfinished">Reset path folder ke nilai baku.</translation>
+        <translation>Mereset path folder ke nilai baku.</translation>
     </message>
     <message>
         <source>Displays a window to select a different file.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menampilkan jendela untuk memilih berkas lain.</translation>
     </message>
     <message>
         <source>Resets the file path to the default value.</source>
-        <translation type="unfinished">Reset path berkas ke nilai baku.</translation>
+        <translation>Mereset path berkas ke nilai baku.</translation>
     </message>
     <message>
         <source><reset to default></source>
-        <translation type="unfinished"><reset ke baku></translation>
+        <translation><reset ke baku></translation>
     </message>
     <message>
         <source>The actual default path value will be displayed after accepting the changes and opening this window again.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nila path baku sebenarnya akan ditampilkan setelah menerima perubahan dan membuka dialog ini lagi.</translation>
     </message>
     <message>
         <source><not selected></source>
-        <translation type="unfinished"></translation>
+        <translation><tidak dipilih></translation>
     </message>
     <message>
         <source>Please use the <b>Other...</b> item from the drop-down list to select a path.</source>
-        <translation type="unfinished">Silakan pakai butir <b>Lainnya...</b> dari daftar drop-down untuk memilih suatu path.</translation>
+        <translation>Silakan pakai butir <b>Lainnya...</b> dari daftar drop-down untuk memilih suatu path.</translation>
     </message>
     <message>
         <source>Holds the folder path.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menyimpan path folder.</translation>
     </message>
     <message>
         <source>Holds the file path.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menyimpan path berkas.</translation>
     </message>
 </context>
 <context>
@@ -3136,102 +3136,102 @@
     <message>
         <source>Minimal Paravirtualization</source>
         <comment>details (system)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Paravirtualisasi Minimum</translation>
     </message>
     <message>
         <source>Hyper-V Paravirtualization</source>
         <comment>details (system)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Paravirtualisasi Hyper-V</translation>
     </message>
     <message>
         <source>KVM Paravirtualization</source>
         <comment>details (system)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Paravirtualisasi KVM</translation>
     </message>
     <message>
         <source>Scale-factor</source>
         <comment>details (display)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Faktor skala</translation>
     </message>
     <message>
         <source>Unscaled HiDPI Video Output</source>
         <comment>details (display)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Keluaran Video HiDPI Tanpa Skala</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details (display/Unscaled HiDPI Video Output)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Difungsikan</translation>
     </message>
     <message>
         <source>[Optical Drive]</source>
         <comment>details (storage)</comment>
-        <translation type="unfinished"></translation>
+        <translation>[Drive Optik]</translation>
     </message>
     <message>
         <source>Generic Driver, '%1' { %2 }</source>
         <comment>details (network)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Driver Generik, '%1" { %2 }</translation>
     </message>
     <message>
         <source>USB Controller</source>
         <comment>details (usb)</comment>
-        <translation type="unfinished">Pengendali USB</translation>
+        <translation>Pengendali USB</translation>
     </message>
     <message>
         <source>Menu-bar</source>
         <comment>details (user interface)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Bilah menu</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details (user interface/menu-bar)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Difungsikan</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details (user interface/menu-bar)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Dinonaktifkan</translation>
     </message>
     <message>
         <source>Status-bar</source>
         <comment>details (user interface)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Bilah status</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details (user interface/status-bar)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Difungsikan</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details (user interface/status-bar)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Dinonaktifkan</translation>
     </message>
     <message>
         <source>Mini-toolbar Position</source>
         <comment>details (user interface)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Posisi Bilah Alat Mini</translation>
     </message>
     <message>
         <source>Top</source>
         <comment>details (user interface/mini-toolbar position)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Puncak</translation>
     </message>
     <message>
         <source>Bottom</source>
         <comment>details (user interface/mini-toolbar position)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Dasar</translation>
     </message>
     <message>
         <source>Mini-toolbar</source>
         <comment>details (user interface)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Bilah Alat Mini</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details (user interface/mini-toolbar)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Dinonaktifkan</translation>
     </message>
 </context>
 <context>
@@ -3502,23 +3502,23 @@
     </message>
     <message>
         <source>Machine Windows:</source>
-        <translation type="unfinished"></translation>
+        <translation>Jendela Mesin:</translation>
     </message>
     <message>
         <source>&Raise Window Under Mouse</source>
-        <translation type="unfinished"></translation>
+        <translation>&Apungkan Jendela Di Bawah Mouse</translation>
     </message>
     <message>
         <source>Holds the maximum width which we would like the guest to use.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menyimpan lebar maksimum yang kita inginkan untuk dipakai oleh guest.</translation>
     </message>
     <message>
         <source>Holds the maximum height which we would like the guest to use.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menyimpan tinggi maksimum yang kita inginkan untuk dipakai oleh guest.</translation>
     </message>
     <message>
         <source>When checked, machine windows will be raised when the mouse pointer moves over them.</source>
-        <translation type="unfinished"></translation>
+        <translation>Saat dicontreng, jendela mesin akan diapungkan ketika penunjuk mouse bergerak di atas mereka.</translation>
     </message>
 </context>
 <context>
@@ -3569,19 +3569,19 @@
     </message>
     <message>
         <source>Add Package</source>
-        <translation type="unfinished"></translation>
+        <translation>Tambah Paket</translation>
     </message>
     <message>
         <source>Remove Package</source>
-        <translation type="unfinished"></translation>
+        <translation>Hapus Paket</translation>
     </message>
     <message>
         <source>Adds new package.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menambah paket baru.</translation>
     </message>
     <message>
         <source>Removes selected package.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menghapus paket yang dipilih.</translation>
     </message>
 </context>
 <context>
@@ -3596,7 +3596,7 @@
     </message>
     <message>
         <source>Holds the path to the library that provides authentication for Remote Display (VRDP) clients.</source>
-        <translation type="unfinished">Menyimpan path ke pustaka yang menyediakan otentikasi untuk klien Tampilan Jarak Jauh (VRDP).</translation>
+        <translation>Menyimpan path ke pustaka yang menyediakan otentikasi untuk klien Tampilan Jarak Jauh (VRDP).</translation>
     </message>
     <message>
         <source>Default &Machine Folder:</source>
@@ -3652,11 +3652,11 @@
     </message>
     <message>
         <source>Host Screensaver:</source>
-        <translation type="unfinished"></translation>
+        <translation>Screensaver Host:</translation>
     </message>
     <message>
         <source>&Disable When Running Virtual Machines</source>
-        <translation type="unfinished"></translation>
+        <translation>&Nonaktifkan Ketika Menjalankan Mesin Virtual</translation>
     </message>
 </context>
 <context>
@@ -3711,11 +3711,11 @@
     </message>
     <message>
         <source>Lists all available shortcuts which can be configured.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menampilkan daftar semua pintasan yang tersedia, yang dapat ditata.</translation>
     </message>
     <message>
         <source>Holds a sequence to filter the shortcut list.</source>
-        <translation type="unfinished"></translation>
+        <translation>Masukkan suatu urutan untuk menyaring daftar pintasan.</translation>
     </message>
 </context>
 <context>
@@ -4042,55 +4042,55 @@
     </message>
     <message>
         <source>Add NAT Network</source>
-        <translation type="unfinished"></translation>
+        <translation>Tambah Jaringan NAT</translation>
     </message>
     <message>
         <source>Remove NAT Network</source>
-        <translation type="unfinished"></translation>
+        <translation>Hapus Jaringan NAT</translation>
     </message>
     <message>
         <source>Edit NAT Network</source>
-        <translation type="unfinished"></translation>
+        <translation>Sunting Jaringan NAT</translation>
     </message>
     <message>
         <source>Adds new NAT network.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menambah jaringan NAT baru.</translation>
     </message>
     <message>
         <source>Removes selected NAT network.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menghapus jaringan NAT yang dipilih.</translation>
     </message>
     <message>
         <source>Edits selected NAT network.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menyunting jaringan NAT yang dipilih.</translation>
     </message>
     <message>
         <source>Add Host-only Network</source>
-        <translation type="unfinished"></translation>
+        <translation>Tambah Jaringan Hanya-host</translation>
     </message>
     <message>
         <source>Remove Host-only Network</source>
-        <translation type="unfinished"></translation>
+        <translation>Hapus Jaringan Hanya-host</translation>
     </message>
     <message>
         <source>Edit Host-only Network</source>
-        <translation type="unfinished"></translation>
+        <translation>Sunting Jaringan Hanya-host</translation>
     </message>
     <message>
         <source>Adds new host-only network.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menambahkan jaringan hanya-host yang baru.</translation>
     </message>
     <message>
         <source>Removes selected host-only network.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menghapus jaringan hanya-host yang dipilih.</translation>
     </message>
     <message>
         <source>Edits selected host-only network.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menyunting jaringan hanya-host yang dipilih.</translation>
     </message>
     <message>
         <source>Host interface <b>%1</b> does not currently have a valid IPv6 network mask prefix length.</source>
-        <translation type="unfinished"></translation>
+        <translation>Antar muka host <b>%1</b> saat ini tidak memiliki panjang prefiks mask jaringan IPv6 yang valid.</translation>
     </message>
 </context>
 <context>
@@ -4284,11 +4284,11 @@
     </message>
     <message>
         <source>When checked, manual configuration will be used for this network adapter.</source>
-        <translation type="unfinished"></translation>
+        <translation>Bila dicontreng, konfigurasi manual akan dipakai untuk adaptor jaringan ini.</translation>
     </message>
     <message>
         <source>When checked, the DHCP Server will be enabled for this network on machine start-up.</source>
-        <translation type="unfinished"></translation>
+        <translation>Saat dicontreng, Server DHCP akan difungsikan bagi jaringan ini saat startup mesin.</translation>
     </message>
 </context>
 <context>
@@ -4359,23 +4359,23 @@
     </message>
     <message>
         <source>When checked, this network will be enabled.</source>
-        <translation type="unfinished"></translation>
+        <translation>Bila dicontreng, jaringan ini akan difungsikan.</translation>
     </message>
     <message>
         <source>When checked, this network will support DHCP.</source>
-        <translation type="unfinished"></translation>
+        <translation>Bila dicontreng, jaringan ini akan mendukung DHCP.</translation>
     </message>
     <message>
         <source>When checked, this network will support IPv6.</source>
-        <translation type="unfinished"></translation>
+        <translation>Bila dicontreng, jaringan ini akan mendukung IPv6.</translation>
     </message>
     <message>
         <source>When checked, this network will be advertised as the default IPv6 route.</source>
-        <translation type="unfinished"></translation>
+        <translation>Bila dicontreng, jaringan ini akan diumumkan sebagai rute baku IPv6.</translation>
     </message>
     <message>
         <source>Displays a window to configure port forwarding rules.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menampilkan sebuah jendela untuk mengelola aturan penerusan port.</translation>
     </message>
 </context>
 <context>
@@ -4453,35 +4453,35 @@
     </message>
     <message>
         <source>Holds the proxy host.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menyimpan host proksi.</translation>
     </message>
     <message>
         <source>Holds the proxy port.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menyimpan port proksi.</translation>
     </message>
     <message>
         <source>When chosen, VirtualBox will try to auto-detect host proxy settings for tasks like downloading Guest Additions from the network or checking for updates.</source>
-        <translation type="unfinished"></translation>
+        <translation>Ketika dipilih, VirtualBox akan mencoba mendeteksi otomatis pengaturan proksi untuk tugas seperti mengunduh Guest Addition dari jaringan atau memeriksa pemutakhiran.</translation>
     </message>
     <message>
         <source>&Auto-detect Host Proxy Settings</source>
-        <translation type="unfinished"></translation>
+        <translation>Deteksi Otom&atis Pengaturan Proksi Host</translation>
     </message>
     <message>
         <source>When chosen, VirtualBox will use direct Internet connection for tasks like downloading Guest Additions from the network or checking for updates.</source>
-        <translation type="unfinished"></translation>
+        <translation>Ketika dipilih, VirtualBox akan memakai koneksi Internet langsung untuk tugas seperti mengunduh Guest Addition dari jaringan atau memeriksa pemutakhiran.</translation>
     </message>
     <message>
         <source>&Direct Connection to the Internet</source>
-        <translation type="unfinished"></translation>
+        <translation>Koneksi &Langsung ke Internet</translation>
     </message>
     <message>
         <source>When chosen, VirtualBox will use the proxy settings supplied for tasks like downloading Guest Additions from the network or checking for updates.</source>
-        <translation type="unfinished"></translation>
+        <translation>Ketika dipilih, VirtualBox akan memakai pengaturan proksi yang diberikan untuk tugas seperti mengunduh Guest Addition dari jaringan atau memeriksa pemutakhiran.</translation>
     </message>
     <message>
         <source>&Manual Proxy Configuration</source>
-        <translation type="unfinished"></translation>
+        <translation>Konfigurasi Proksi &Manual</translation>
     </message>
 </context>
 <context>
@@ -4536,7 +4536,7 @@
     </message>
     <message>
         <source>Selects how often the new version check should be performed. Note that if you want to completely disable this check, just clear the above check box.</source>
-        <translation type="unfinished"></translation>
+        <translation>Memilih seberapa sering pemeriksaan versi baru mesti dilakukan. Perhatikan bahwa bila Anda ingin mematikan pemeriksaan ini sepenuhnya, kosongkan saja kotak contreng di atas.</translation>
     </message>
 </context>
 <context>
@@ -5020,25 +5020,25 @@
     <message>
         <source><p style='white-space:pre'><nobr>Indicates the activity of the hard disks:</nobr>%1</p></source>
         <comment>HDD tooltip</comment>
-        <translation type="unfinished"></translation>
+        <translation><p style='white-space:pre'><nobr>Mengindikasikan aktivitas hard disk:</nobr>%1</p></translation>
     </message>
     <message>
         <source><p style='white-space:pre'><nobr>Indicates the activity of the optical drives:</nobr>%1</p></source>
         <comment>CD tooltip</comment>
-        <translation type="unfinished"></translation>
+        <translation><p style='white-space:pre'><nobr>Mengindikasikan aktivitas drive optik:</nobr>%1</p></translation>
     </message>
     <message>
         <source><p style='white-space:pre'><nobr>Indicates the activity of the floppy drives:</nobr>%1</p></source>
         <comment>FD tooltip</comment>
-        <translation type="unfinished"></translation>
+        <translation><p style='white-space:pre'><nobr>Mengindikasikan aktivitas drive floppy:</nobr>%1</p></translation>
     </message>
     <message>
         <source><p style='white-space:pre'><nobr>Indicates the activity of the display:</nobr>%1</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p style='white-space:pre'><nobr>Mengindikasikan aktivitas tampilan:</nobr>%1</p></translation>
     </message>
     <message>
         <source>Indicates whether the host keyboard is captured by the guest OS:<br><nobr><img src=:/hostkey_16px.png/>&nbsp;&nbsp;keyboard is not captured</nobr><br><nobr><img src=:/hostkey_captured_16px.png/>&nbsp;&nbsp;keyboard is captured</nobr></source>
-        <translation type="unfinished"></translation>
+        <translation>Mengindikasikan apakah papan ketik host ditangkap oleh OS guest:<br><nobr><img src=:/hostkey_16px.png/>&nbsp;&nbsp;papan ketik tidak ditangkap</nobr><br><nobr><img src=:/hostkey_captured_16px.png/>&nbsp;&nbsp;papan ketik ditangkap</nobr></translation>
     </message>
 </context>
 <context>
@@ -5050,12 +5050,12 @@
     <message>
         <source>Host Driver</source>
         <comment>details report (audio)</comment>
-        <translation type="unfinished">Driver Host</translation>
+        <translation>Driver Host</translation>
     </message>
     <message>
         <source>Controller</source>
         <comment>details report (audio)</comment>
-        <translation type="unfinished">Pengendali</translation>
+        <translation>Pengendali</translation>
     </message>
 </context>
 <context>
@@ -5068,57 +5068,57 @@
     <message>
         <source>Video Memory</source>
         <comment>details report</comment>
-        <translation type="unfinished">Memori Video</translation>
+        <translation>Memori Video</translation>
     </message>
     <message>
         <source>Screens</source>
         <comment>details report</comment>
-        <translation type="unfinished">Layar</translation>
+        <translation>Layar</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details report (3D Acceleration)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Difungsikan</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (3D Acceleration)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Dinonaktifkan</translation>
     </message>
     <message>
         <source>3D Acceleration</source>
         <comment>details report</comment>
-        <translation type="unfinished">Akselerasi 3D</translation>
+        <translation>Akselerasi 3D</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details report (2D Video Acceleration)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Difungsikan</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (2D Video Acceleration)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Dinonaktifkan</translation>
     </message>
     <message>
         <source>2D Video Acceleration</source>
         <comment>details report</comment>
-        <translation type="unfinished">Akselerasi Video 2D</translation>
+        <translation>Akselerasi Video 2D</translation>
     </message>
     <message>
         <source>Remote Desktop Server Port</source>
         <comment>details report (VRDE Server)</comment>
-        <translation type="unfinished">Port Server Remote Desktop</translation>
+        <translation>Port Server Remote Desktop</translation>
     </message>
     <message>
         <source>Remote Desktop Server</source>
         <comment>details report (VRDE Server)</comment>
-        <translation type="unfinished">Server Remote Desktop</translation>
+        <translation>Server Remote Desktop</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (VRDE Server)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Dinonaktifkan</translation>
     </message>
 </context>
 <context>
@@ -5126,12 +5126,12 @@
     <message>
         <source>Name</source>
         <comment>details report</comment>
-        <translation type="unfinished">Nama</translation>
+        <translation>Nama</translation>
     </message>
     <message>
         <source>OS Type</source>
         <comment>details report</comment>
-        <translation type="unfinished"></translation>
+        <translation>Tipe OS</translation>
     </message>
 </context>
 <context>
@@ -5143,43 +5143,43 @@
     <message>
         <source>Bridged adapter, %1</source>
         <comment>details report (network)</comment>
-        <translation type="unfinished">Adaptor ter-bridge, %1</translation>
+        <translation>Adaptor ter-bridge, %1</translation>
     </message>
     <message>
         <source>Internal network, '%1'</source>
         <comment>details report (network)</comment>
-        <translation type="unfinished">Jaringan internal, '%1'</translation>
+        <translation>Jaringan internal, '%1'</translation>
     </message>
     <message>
         <source>Host-only adapter, '%1'</source>
         <comment>details report (network)</comment>
-        <translation type="unfinished">Adaptor hanya-host, '%1'</translation>
+        <translation>Adaptor hanya-host, '%1'</translation>
     </message>
     <message>
         <source>Generic, '%1'</source>
         <comment>details report (network)</comment>
-        <translation type="unfinished">Generik, '%1'</translation>
+        <translation>Generik, '%1'</translation>
     </message>
     <message>
         <source>NAT network, '%1'</source>
         <comment>details report (network)</comment>
-        <translation type="unfinished">Jaringan NAT, '%1'</translation>
+        <translation>Jaringan NAT, '%1'</translation>
     </message>
     <message>
         <source>Adapter %1</source>
         <comment>details report (network)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Adaptor %1</translation>
     </message>
 </context>
 <context>
     <name>UIInformationDataNetworkStatistics</name>
     <message>
         <source>Data Transmitted</source>
-        <translation type="unfinished">Data Terkirim</translation>
+        <translation>Data Terkirim</translation>
     </message>
     <message>
         <source>Data Received</source>
-        <translation type="unfinished">Data Diterima</translation>
+        <translation>Data Diterima</translation>
     </message>
     <message>
         <source>Network Statistics</source>
@@ -5197,12 +5197,12 @@
     <message>
         <source>Port %1</source>
         <comment>details report (parallel ports)</comment>
-        <translation type="unfinished">Port %1</translation>
+        <translation>Port %1</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (parallel ports)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Dinonaktifkan</translation>
     </message>
 </context>
 <context>
@@ -5215,67 +5215,67 @@
     <message>
         <source>Not Detected</source>
         <comment>guest additions</comment>
-        <translation type="unfinished">Tidak Terdeteksi</translation>
+        <translation>Tidak Terdeteksi</translation>
     </message>
     <message>
         <source>Not Detected</source>
         <comment>guest os type</comment>
-        <translation type="unfinished">Tidak Terdeteksi</translation>
+        <translation>Tidak Terdeteksi</translation>
     </message>
     <message>
         <source>Not Available</source>
         <comment>details report (VRDE server port)</comment>
-        <translation type="unfinished">Tidak Tersedia</translation>
+        <translation>Tidak Tersedia</translation>
     </message>
     <message>
         <source>Screen Resolution</source>
-        <translation type="unfinished">Resolusi Layar</translation>
+        <translation>Resolusi Layar</translation>
     </message>
     <message>
         <source>VM Uptime</source>
-        <translation type="unfinished"></translation>
+        <translation>Uptime VM</translation>
     </message>
     <message>
         <source>Clipboard Mode</source>
-        <translation type="unfinished">Mode Papan Klip</translation>
+        <translation>Mode Papan Klip</translation>
     </message>
     <message>
         <source>Drag and Drop Mode</source>
-        <translation type="unfinished"></translation>
+        <translation>Mode Seret dan Jatuhkan</translation>
     </message>
     <message>
         <source>VT-x/AMD-V</source>
         <comment>details report</comment>
-        <translation type="unfinished">VT-x/AMD-V</translation>
+        <translation>VT-x/AMD-V</translation>
     </message>
     <message>
         <source>Nested Paging</source>
         <comment>details report</comment>
-        <translation type="unfinished">Paging Bertingkat</translation>
+        <translation>Paging Bertingkat</translation>
     </message>
     <message>
         <source>Unrestricted Execution</source>
         <comment>details report</comment>
-        <translation type="unfinished">Eksekusi Tanpa Batas</translation>
+        <translation>Eksekusi Tanpa Batas</translation>
     </message>
     <message>
         <source>Paravirtualization Interface</source>
         <comment>details report</comment>
-        <translation type="unfinished"></translation>
+        <translation>Antarmuka Paravirtualisasi</translation>
     </message>
     <message>
         <source>Guest Additions</source>
-        <translation type="unfinished">Guest Additions</translation>
+        <translation>Guest Additions</translation>
     </message>
     <message>
         <source>Guest OS Type</source>
         <comment>details report</comment>
-        <translation type="unfinished">Tipe OS Guest</translation>
+        <translation>Tipe OS Guest</translation>
     </message>
     <message>
         <source>Remote Desktop Server Port</source>
         <comment>details report (VRDE Server)</comment>
-        <translation type="unfinished">Port Server Remote Desktop</translation>
+        <translation>Port Server Remote Desktop</translation>
     </message>
 </context>
 <context>
@@ -5287,7 +5287,7 @@
     <message>
         <source>Port %1</source>
         <comment>details report (serial ports)</comment>
-        <translation type="unfinished">Port %1</translation>
+        <translation>Port %1</translation>
     </message>
 </context>
 <context>
@@ -5295,7 +5295,7 @@
     <message>
         <source>Shared Folders</source>
         <comment>details report (shared folders)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Folder Bersama</translation>
     </message>
 </context>
 <context>
@@ -5306,26 +5306,26 @@
     </message>
     <message>
         <source>(Optical Drive)</source>
-        <translation type="unfinished"></translation>
+        <translation>(Drive Optik)</translation>
     </message>
 </context>
 <context>
     <name>UIInformationDataStorageStatistics</name>
     <message>
         <source>DMA Transfers</source>
-        <translation type="unfinished">Transfer DMA</translation>
+        <translation>Transfer DMA</translation>
     </message>
     <message>
         <source>PIO Transfers</source>
-        <translation type="unfinished">Transfer PIO</translation>
+        <translation>Transfer PIO</translation>
     </message>
     <message>
         <source>Data Read</source>
-        <translation type="unfinished">Data Terbaca</translation>
+        <translation>Data Terbaca</translation>
     </message>
     <message>
         <source>Data Written</source>
-        <translation type="unfinished">Data Tertulis</translation>
+        <translation>Data Ditulis</translation>
     </message>
     <message>
         <source>Storage Statistics</source>
@@ -5343,102 +5343,102 @@
     <message>
         <source>Enabled</source>
         <comment>details report (ACPI)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Difungsikan</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (ACPI)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Dinonaktifkan</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details report (I/O APIC)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Difungsikan</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (I/O APIC)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Dinonaktifkan</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details report (PAE/NX)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Difungsikan</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (PAE/NX)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Dinonaktifkan</translation>
     </message>
     <message>
         <source>Base Memory</source>
         <comment>details report</comment>
-        <translation type="unfinished">Memori Dasar</translation>
+        <translation>Memori Dasar</translation>
     </message>
     <message>
         <source>Processor(s)</source>
         <comment>details report</comment>
-        <translation type="unfinished">Prosesor</translation>
+        <translation>Prosesor</translation>
     </message>
     <message>
         <source>Execution Cap</source>
         <comment>details report</comment>
-        <translation type="unfinished"></translation>
+        <translation>Batas Eksekusi</translation>
     </message>
     <message>
         <source>Boot Order</source>
         <comment>details report</comment>
-        <translation type="unfinished">Urutan Boot</translation>
+        <translation>Urutan Boot</translation>
     </message>
     <message>
         <source>ACPI</source>
         <comment>details report</comment>
-        <translation type="unfinished">ACPI</translation>
+        <translation>ACPI</translation>
     </message>
     <message>
         <source>I/O APIC</source>
         <comment>details report</comment>
-        <translation type="unfinished">I/O APIC</translation>
+        <translation>I/O APIC</translation>
     </message>
     <message>
         <source>PAE/NX</source>
         <comment>details report</comment>
-        <translation type="unfinished">PAE/NX</translation>
+        <translation>PAE/NX</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details report (VT-x/AMD-V)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Difungsikan</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (VT-x/AMD-V)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Dinonaktifkan</translation>
     </message>
     <message>
         <source>VT-x/AMD-V</source>
         <comment>details report</comment>
-        <translation type="unfinished">VT-x/AMD-V</translation>
+        <translation>VT-x/AMD-V</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details report (Nested Paging)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Difungsikan</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (Nested Paging)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Dinonaktifkan</translation>
     </message>
     <message>
         <source>Nested Paging</source>
         <comment>details report</comment>
-        <translation type="unfinished">Paging Bertingkat</translation>
+        <translation>Paging Bertingkat</translation>
     </message>
     <message>
         <source>Paravirtualization Interface</source>
         <comment>details report</comment>
-        <translation type="unfinished"></translation>
+        <translation>Antarmuka Paravirtualisasi</translation>
     </message>
 </context>
 <context>
@@ -5451,17 +5451,17 @@
     <message>
         <source>Disabled</source>
         <comment>details report (USB)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Dinonaktifkan</translation>
     </message>
     <message>
         <source>Device Filters</source>
         <comment>details report (USB)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Penyaring Perangkat</translation>
     </message>
     <message>
         <source>%1 (%2 active)</source>
         <comment>details report (USB)</comment>
-        <translation type="unfinished">%1 (%2 aktif)</translation>
+        <translation>%1 (%2 aktif)</translation>
     </message>
 </context>
 <context>
@@ -5554,7 +5554,7 @@
     </message>
     <message>
         <source>Selects the audio output driver. The <b>Null Audio Driver</b> makes the guest see an audio card, however every access to it will be ignored.</source>
-        <translation type="unfinished"></translation>
+        <translation>Pilih driver keluaran audio. <b>Driver Audio Null</b> membuat guest melihat sebuah kartu audio, namun semua akses ke sana akan diabaikan.</translation>
     </message>
 </context>
 <context>
@@ -5804,107 +5804,107 @@
     </message>
     <message>
         <source>&Screen</source>
-        <translation type="unfinished"></translation>
+        <translation>&Layar</translation>
     </message>
     <message>
         <source>Scale Factor:</source>
-        <translation type="unfinished"></translation>
+        <translation>Faktor Skala:</translation>
     </message>
     <message>
         <source>Controls the guest screen scale factor.</source>
-        <translation type="unfinished"></translation>
+        <translation>Mengendalikan faktor skala layar guest.</translation>
     </message>
     <message>
         <source>%</source>
-        <translation type="unfinished"></translation>
+        <translation>%</translation>
     </message>
     <message>
         <source>HiDPI Support:</source>
-        <translation type="unfinished"></translation>
+        <translation>Dukungan HiDPI:</translation>
     </message>
     <message>
         <source>When checked, guest screen contents will not be scaled up to compensate for high host screen resolutions.</source>
-        <translation type="unfinished"></translation>
+        <translation>Bila dicontreng, isi layar guest tidak akan diskalakan untuk mengkompensasi resolusi layar host yang tinggi.</translation>
     </message>
     <message>
         <source>Use &Unscaled HiDPI Output</source>
-        <translation type="unfinished"></translation>
+        <translation>Pakai Kel&uaran HiDPI Tanpa Skala</translation>
     </message>
     <message>
         <source>Acceleration:</source>
-        <translation type="unfinished"></translation>
+        <translation>Akselerasi:</translation>
     </message>
     <message>
         <source>Holds the VRDP Server port number. You may specify <tt>0</tt> (zero), to select port 3389, the standard port for RDP.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menyimpan nomor port Server VRDP. Anda boleh menyatakan <tt>0</tt> (nol), untuk memilih port 3389, port standar bagi RDP.</translation>
     </message>
     <message>
         <source>Selects the VRDP authentication method.</source>
-        <translation type="unfinished"></translation>
+        <translation>Memilih metode otentikasi VRDP.</translation>
     </message>
     <message>
         <source>Holds the timeout for guest authentication, in milliseconds.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menyimpan tenggat waktu untuk otentikasi guest, dalam milidetik.</translation>
     </message>
     <message>
         <source>When checked, multiple simultaneous connections to the VM are permitted.</source>
-        <translation type="unfinished"></translation>
+        <translation>Bila dicontreng, beberapa koneksi simultan ke VM diijinkan.</translation>
     </message>
     <message>
         <source>Holds the filename VirtualBox uses to save the recorded content.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menyimpan nama berkas yang dipakai oleh VirtualBox untuk menyimpan isi rekaman.</translation>
     </message>
     <message>
         <source>Selects the resolution (frame size) of the recorded video.</source>
-        <translation type="unfinished"></translation>
+        <translation>Memilih resolusi (ukuran frame) dari video rekaman.</translation>
     </message>
     <message>
         <source>Holds the <b>horizontal</b> resolution (frame width) of the recorded video.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menyimpan resolusi <b>horisontal</b> (lebar frame) dari video rekaman.</translation>
     </message>
     <message>
         <source>Holds the <b>vertical</b> resolution (frame height) of the recorded video.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menyimpan resolusi <b>vertikal</b> (tinggi frame) dari video rekaman.</translation>
     </message>
     <message>
         <source>Controls the maximum number of <b>frames per second</b>. Additional frames will be skipped. Reducing this value will increase the number of skipped frames and reduce the file size.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menentukan cacah maksimum <b>frame per detik</b>. Frame tambahan akan dilewati. Mengurangi nilai ini akan menaikkan banyaknya frame yang dilewati dan mengurangi ukuran berkas.</translation>
     </message>
     <message>
         <source>Controls the <b>quality</b>. Increasing this value will make the video look better at the cost of an increased file size.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menentukan <b>kualitas</b>. Menaikkan nilai ini akan membuat video nampak lebih baik tapi ukuran berkas meningkat.</translation>
     </message>
     <message>
         <source>Holds the bitrate in <b>kilobits per second</b>. Increasing this value will make the video look better at the cost of an increased file size.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menyimpan laju bit dalam <b>kilobit per detik</b>. Menaikkan nilai ini akan membuat video nampak lebih baik tapi ukuran berkas meningkat.</translation>
     </message>
     <message>
         <source>The virtual machine is currently assigned less than <b>%1</b> of video memory which is the minimum amount required to switch to full-screen or seamless mode.</source>
-        <translation type="unfinished"></translation>
+        <translation>Mesin virtual saat ini diberi memori video kurang dari <b>%1</b> yang merupakan besaran minimum yang diperlukan untuk bertukar ke mode layar penuh atau seamless.</translation>
     </message>
     <message>
         <source>The virtual machine is set up to use hardware graphics acceleration and the operating system hint is set to Windows Vista or later. For best performance you should set the machine's video memory to at least <b>%1</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Mesin virtual disiapkan untuk memakai akselerasi grafis perangkat keras dan arahan sistem operasi ditata ke Windows Vista atau setelahnya. Untuk kinerja terbaik Anda mesti menata memori video mesin paling tidak <b>%1</b>.</translation>
     </message>
     <message>
         <source>Remote Display is currently enabled for this virtual machine. However, this requires the <i>%1</i> to be installed. Please install the Extension Pack from the VirtualBox download site as otherwise your VM will be started with Remote Display disabled.</source>
-        <translation type="unfinished"></translation>
+        <translation>Tampilan Jarak Jauh saat ini difungsikan bagi mesin virtual ini. Namun ini memerlukan dipasangnya <i>%1</i>.  Harap pasang Extension Pack dari situs unduh VirtualBox karena bila tidak VM Anda akan mulai dijalankan dengan Tampilan Jarak Jauh dinonaktifkan.</translation>
     </message>
     <message>
         <source>%1 MB</source>
-        <translation type="unfinished">%1 MB</translation>
+        <translation>%1 MB</translation>
     </message>
     <message>
         <source>%1%</source>
-        <translation type="unfinished">%1%</translation>
+        <translation>%1%</translation>
     </message>
     <message>
         <source><i>About %1MB per 5 minute video</i></source>
-        <translation type="unfinished"></translation>
+        <translation><i>Sekitar %1MB per 5 menit video</i></translation>
     </message>
     <message>
         <source>When checked, enables video recording for screen %1.</source>
-        <translation type="unfinished"></translation>
+        <translation>Bila dicontreng, memfungsikan perekaman video bagi layar %1.</translation>
     </message>
 </context>
 <context>
@@ -6075,111 +6075,111 @@
     </message>
     <message>
         <source>Basi&c</source>
-        <translation type="unfinished"></translation>
+        <translation>&Dasar</translation>
     </message>
     <message>
         <source>A&dvanced</source>
-        <translation type="unfinished">Tingkat L&anjut</translation>
+        <translation>Tingkat L&anjut</translation>
     </message>
     <message>
         <source>D&rag'n'Drop:</source>
-        <translation type="unfinished"></translation>
+        <translation>Se&ret-Jatuhkan:</translation>
     </message>
     <message>
         <source>D&escription</source>
-        <translation type="unfinished">D&eskripsi</translation>
+        <translation>D&eskripsi</translation>
     </message>
     <message>
         <source>Enc&ryption</source>
-        <translation type="unfinished"></translation>
+        <translation>Enk&ripsi</translation>
     </message>
     <message>
         <source>When checked, enables encryption for this virtual machine.</source>
-        <translation type="unfinished"></translation>
+        <translation>Ketika dicontreng, memfungsikan enkripsi bagi mesin virtual ini.</translation>
     </message>
     <message>
         <source>En&able Encryption</source>
-        <translation type="unfinished"></translation>
+        <translation>Fungsik&an Enkripsi</translation>
     </message>
     <message>
         <source>Encryption C&ipher:</source>
-        <translation type="unfinished"></translation>
+        <translation>C&ipher Enkripsi:</translation>
     </message>
     <message>
         <source>Selects the cipher to be used for encrypting the virtual machine disks.</source>
-        <translation type="unfinished"></translation>
+        <translation>Pilih cipher yang akan dipakai untuk mengenkripsi disk mesin virtual.</translation>
     </message>
     <message>
         <source>E&nter New Password:</source>
-        <translation type="unfinished"></translation>
+        <translation>Masukka&n Password Baru:</translation>
     </message>
     <message>
         <source>Holds the password to be assigned to the virtual machine.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menyimpan password yang akan dipakai ke mesin virtual.</translation>
     </message>
     <message>
         <source>C&onfirm New Password:</source>
-        <translation type="unfinished"></translation>
+        <translation>K&onfirmasi Password Baru:</translation>
     </message>
     <message>
         <source>Confirms the password to be assigned to the virtual machine.</source>
-        <translation type="unfinished"></translation>
+        <translation>Konfirmasikan password yang akan dipakai pada mesin virtual.</translation>
     </message>
     <message>
         <source>You are trying to encrypt this virtual machine. However, this requires the <i>%1</i> to be installed. Please install the Extension Pack from the VirtualBox download site.</source>
-        <translation type="unfinished"></translation>
+        <translation>Anda mencoba mengenkripsi mesin virtual ini. Namun ini memerlukan terpasangnya <i>%1</i>. Harap pasang Extension Pack dari situs unduh VirtualBox.</translation>
     </message>
     <message>
         <source>Encryption cipher type not specified.</source>
-        <translation type="unfinished"></translation>
+        <translation>Tipe cipher enkripsi tidak dinyatakan.</translation>
     </message>
     <message>
         <source>Encryption password empty.</source>
-        <translation type="unfinished"></translation>
+        <translation>Password enkripsi kosong.</translation>
     </message>
     <message>
         <source>Encryption passwords do not match.</source>
-        <translation type="unfinished"></translation>
+        <translation>Password enkripsi tidak cocok.</translation>
     </message>
     <message>
         <source>Holds the path where snapshots of this virtual machine will be stored. Be aware that snapshots can take quite a lot of storage space.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menyimpan path dimana snapshot dari mesin virtual ini akan disimpan. Sadarilah bahwa snapshot itu bisa menghabiskan cukup banyak ruang penyimpanan.</translation>
     </message>
     <message>
         <source>Leave Unchanged</source>
         <comment>cipher type</comment>
-        <translation type="unfinished"></translation>
+        <translation>Biarkan Tak Berubah</translation>
     </message>
 </context>
 <context>
     <name>UIMachineSettingsInterface</name>
     <message>
         <source>Allows to modify VM menu-bar contents.</source>
-        <translation type="unfinished"></translation>
+        <translation>Mengijinkan mengubah isi bilah menu VM.</translation>
     </message>
     <message>
         <source>Mini ToolBar:</source>
-        <translation type="unfinished">Bilah Alat Mini:</translation>
+        <translation>Bilah Alat Mini:</translation>
     </message>
     <message>
         <source>When checked, show the Mini ToolBar in full-screen and seamless modes.</source>
-        <translation type="unfinished"></translation>
+        <translation>Bila dicontreng, menampilkan Bilah Alat Mini dalam mode layar penuh dan seamless.</translation>
     </message>
     <message>
         <source>Show in &Full-screen/Seamless</source>
-        <translation type="unfinished"></translation>
+        <translation>Tampilkan Dalam Layar &Penuh/Seamless</translation>
     </message>
     <message>
         <source>When checked, show the Mini ToolBar at the top of the screen, rather than in its default position at the bottom of the screen.</source>
-        <translation type="unfinished"></translation>
+        <translation>Bila dicontreng, menampilkan Bilah Alat Mini di puncak layar, bukan pada posisi baku di dasar layar.</translation>
     </message>
     <message>
         <source>Show at &Top of Screen</source>
-        <translation type="unfinished">&Tampilkan Di Puncak Layar</translation>
+        <translation>&Tampilkan Di Puncak Layar</translation>
     </message>
     <message>
         <source>Allows to modify VM status-bar contents.</source>
-        <translation type="unfinished"></translation>
+        <translation>Mengijinkan mengubah isi bilah status VM.</translation>
     </message>
 </context>
 <context>
@@ -6393,23 +6393,23 @@
     </message>
     <message>
         <source>Selects how this virtual adapter is attached to the real network of the Host OS.</source>
-        <translation type="unfinished"></translation>
+        <translation>Memilih bagaimana adaptor virtual ini dipasangkan pada jaringan OS Host yang sesungguhnya.</translation>
     </message>
     <message>
         <source>Shows additional network adapter options.</source>
-        <translation type="unfinished"></translation>
+        <translation>Tampilkan opsi adaptor jaringan tambahan.</translation>
     </message>
     <message>
         <source>Holds the configuration settings for the network attachment driver. The settings should be of the form <b>name=value</b> and will depend on the driver. Use <b>shift-enter</b> to add a new entry.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menyimpan pengaturan konfigurasi bagi driver pencantolan jaringan. Pengaturan mesti dalam bentuk <b>nama=nilai</b> dan akan bergantung kepada driver. Gunakan <b>shift-enter</b> untuk menambah entri baru.</translation>
     </message>
     <message>
         <source>When checked, the virtual network cable is plugged in.</source>
-        <translation type="unfinished"></translation>
+        <translation>Bila dicontreng, kabel jaringan virtual akan ditancapkan.</translation>
     </message>
     <message>
         <source>Displays a window to configure port forwarding rules.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menampilkan sebuah jendela untuk menata aturan penerusan port.</translation>
     </message>
 </context>
 <context>
@@ -6495,23 +6495,23 @@
     </message>
     <message>
         <source>No IRQ is currently specified.</source>
-        <translation type="unfinished">IRQ saat ini tidak dinyatakan.</translation>
+        <translation>Saat ini tidak ada IRQ yang dinyatakan.</translation>
     </message>
     <message>
         <source>No I/O port is currently specified.</source>
-        <translation type="unfinished">Port I/O saat ini tidak dinyatakan.</translation>
+        <translation>Saat ini tidak ada port I/O yang dinyatakan.</translation>
     </message>
     <message>
         <source>Two or more ports have the same settings.</source>
-        <translation type="unfinished">Dua port atau lebih memiliki pengaturan yang sama.</translation>
+        <translation>Dua port atau lebih memiliki pengaturan yang sama.</translation>
     </message>
     <message>
         <source>No port path is currently specified.</source>
-        <translation type="unfinished">Path port saat ini tidak dinyatakan.</translation>
+        <translation>Saat ini tidak ada path port yang dinyatakan.</translation>
     </message>
     <message>
         <source>There are currently duplicate port paths specified.</source>
-        <translation type="unfinished">Saat ini ada path port yang duplikat.</translation>
+        <translation>Saat ini ada path port yang duplikat.</translation>
     </message>
 </context>
 <context>
@@ -6652,27 +6652,27 @@
     </message>
     <message>
         <source>Add Shared Folder</source>
-        <translation type="unfinished"></translation>
+        <translation>Tambah Folder Bersama</translation>
     </message>
     <message>
         <source>Edit Shared Folder</source>
-        <translation type="unfinished"></translation>
+        <translation>Sunting Folder Bersama</translation>
     </message>
     <message>
         <source>Remove Shared Folder</source>
-        <translation type="unfinished"></translation>
+        <translation>Hapus Folder Bersama</translation>
     </message>
     <message>
         <source>Adds new shared folder.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menambah folder bersama yang baru.</translation>
     </message>
     <message>
         <source>Edits selected shared folder.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menyunting folder bersama yang dipilih.</translation>
     </message>
     <message>
         <source>Removes selected shared folder.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menghapus folder bersama yang dipilih.</translation>
     </message>
 </context>
 <context>
@@ -6731,7 +6731,7 @@
     </message>
     <message>
         <source>When checked, this shared folder will be permanent.</source>
-        <translation type="unfinished"></translation>
+        <translation>Bila ditandai, folder bersama ini akan permanen.</translation>
     </message>
 </context>
 <context>
@@ -6807,43 +6807,43 @@
     </message>
     <message>
         <source>Selects the working mode of this serial port. If you select <b>Disconnected</b>, the guest OS will detect the serial port but will not be able to operate it.</source>
-        <translation type="unfinished"></translation>
+        <translation>Memilih mode kerja dari port serial ini. Bila Anda memilih <b>Terputus</b>, OS guest akan mendeteksi port serial tapi tidak akan dapat mengoperasikannya.</translation>
     </message>
     <message>
         <source>When checked, the virtual machine will assume that the pipe or socket specified in the <b>Path/Address</b> field exists and try to use it. Otherwise, the pipe or socket will be created by the virtual machine when it starts.</source>
-        <translation type="unfinished"></translation>
+        <translation>Bila dicontreng, mesin virtual akan mengasumsikan bahwa pipa atau soket yang dinyatakan dalam ruas <b>Path/Alamat</b> ada dan mencoba memakainya. Bila tidak, pipa atau soket akan dibuat oleh mesin virtual ketika itu dimulai.</translation>
     </message>
     <message>
         <source>&Connect to existing pipe/socket</source>
-        <translation type="unfinished"></translation>
+        <translation>&Menyambung ke pipa/soket yang ada</translation>
     </message>
     <message>
         <source>&Path/Address:</source>
-        <translation type="unfinished"></translation>
+        <translation>&Path/Alamat:</translation>
     </message>
     <message>
         <source><p>In <b>Host Pipe</b> mode: Holds the path to the serial port's pipe on the host. Examples: "\\.\pipe\myvbox" or "/tmp/myvbox", for Windows and UNIX-like systems respectively.</p><p>In <b>Host Device</b> mode: Holds the host serial device name. Examples: "COM1" or "/dev/ttyS0".</p><p>In <b>Raw File</b> mode: Holds the file-path on the host system, where the seri [...]
-        <translation type="unfinished"></translation>
+        <translation><p>Dalam mode <b>Pipa Host</b>: Menyimpan path ke pipa port serial pada host. Contoh: "\\.\pipe\myvbox" atau "/tmp/myvbox", masing-masing untuk sistem Windows dan keluarga UNIX.</p><p>Dalam mode <b>Perangkat Host</b>: Menyimpan nama perangkat serial host. Contoh: "COM1" atau "/dev/ttyS0".</p><p>Dalam mode <b>Berkas Mentah</b>: Menyimpan path berkas pada sistem ho [...]
     </message>
     <message>
         <source>No IRQ is currently specified.</source>
-        <translation type="unfinished">IRQ saat ini tidak dinyatakan.</translation>
+        <translation>Saat ini tidak ada IRQ yang dinyatakan.</translation>
     </message>
     <message>
         <source>No I/O port is currently specified.</source>
-        <translation type="unfinished">Port I/O saat ini tidak dinyatakan.</translation>
+        <translation>Saat ini tidak ada port I/O yang dinyatakan.</translation>
     </message>
     <message>
         <source>Two or more ports have the same settings.</source>
-        <translation type="unfinished">Dua port atau lebih memiliki pengaturan yang sama.</translation>
+        <translation>Dua port atau lebih memiliki pengaturan yang sama.</translation>
     </message>
     <message>
         <source>No port path is currently specified.</source>
-        <translation type="unfinished">Path port saat ini tidak dinyatakan.</translation>
+        <translation>Saat ini tidak ada path port yang dinyatakan.</translation>
     </message>
     <message>
         <source>There are currently duplicate port paths specified.</source>
-        <translation type="unfinished">Saat ini ada path port yang duplikat.</translation>
+        <translation>Saat ini ada path port yang duplikat.</translation>
     </message>
 </context>
 <context>
@@ -7247,121 +7247,121 @@
     </message>
     <message>
         <source>Lists all storage controllers for this machine and the virtual images and host drives attached to them.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menampilkan daftar semua pengendali penyimpanan bagi mesin ini dan image virtual serta drive host yang ditancapkan ke mereka.</translation>
     </message>
     <message>
         <source>Holds the name of the storage controller currently selected in the Storage Tree.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menyimpan nama pengendali penyimpanan yang kini dipilih pada Pohon Penyimpanan.</translation>
     </message>
     <message>
         <source>When checked, allows to use host I/O caching capabilities.</source>
-        <translation type="unfinished"></translation>
+        <translation>Bila dicontreng, mengijinkan pemakaian kapabilitas caching I/O host.</translation>
     </message>
     <message>
         <source>When checked, the virtual disk will not be removed when the guest system ejects it.</source>
-        <translation type="unfinished"></translation>
+        <translation>Saat dicontreng, disk virtual tidak akan dihapus ketika sistem guest mengeluarkannya.</translation>
     </message>
     <message>
         <source>When checked, the guest system will see the virtual disk as a solid-state device.</source>
-        <translation type="unfinished"></translation>
+        <translation>Saat dicontreng, sistem guest akan melihat disk virtual sebagai perangkat solid state.</translation>
     </message>
     <message>
         <source>When checked, the guest system will see the virtual disk as a hot-pluggable device.</source>
-        <translation type="unfinished"></translation>
+        <translation>Saat dicontreng, sistem guest akan melihat disk virtual sebagai perangkat yang bisa di-hot-plug.</translation>
     </message>
     <message>
         <source>&Hot-pluggable</source>
-        <translation type="unfinished"></translation>
+        <translation>Dapat di&hot-plug</translation>
     </message>
     <message>
         <source>Encrypted with key:</source>
-        <translation type="unfinished"></translation>
+        <translation>Terenkripsi dengan kunci:</translation>
     </message>
     <message>
         <source>Choose disk image...</source>
         <comment>This is used for hard disks, optical media and floppies</comment>
-        <translation type="unfinished"></translation>
+        <translation>Pilih image disk...</translation>
     </message>
     <message>
         <source>Image</source>
         <comment>storage image</comment>
-        <translation type="unfinished">Image</translation>
+        <translation>Image</translation>
     </message>
     <message>
         <source><nobr>Expands/Collapses&nbsp;item.</nobr></source>
-        <translation type="unfinished"></translation>
+        <translation><nobr>Kembangkan/ringkaskan&nbsp;butir.</nobr></translation>
     </message>
     <message>
         <source><nobr>Adds&nbsp;hard&nbsp;disk.</nobr></source>
-        <translation type="unfinished"></translation>
+        <translation><nobr>Tambah&nbsp;hard&nbsp;disk.</nobr></translation>
     </message>
     <message>
         <source><nobr>Adds&nbsp;optical&nbsp;drive.</nobr></source>
-        <translation type="unfinished"></translation>
+        <translation><nobr>Tambah&nbsp;drive&nbsp;optik.</nobr></translation>
     </message>
     <message>
         <source><nobr>Adds&nbsp;floppy&nbsp;drive.</nobr></source>
-        <translation type="unfinished"></translation>
+        <translation><nobr>Tambah&nbsp;drive&nbsp;floppy.</nobr></translation>
     </message>
     <message>
         <source>Add USB Controller</source>
-        <translation type="unfinished"></translation>
+        <translation>Tambah Pengendali USB</translation>
     </message>
     <message>
         <source>Add Optical Drive</source>
-        <translation type="unfinished"></translation>
+        <translation>Tambah Drive Optik</translation>
     </message>
     <message>
         <source>Add Floppy Drive</source>
-        <translation type="unfinished"></translation>
+        <translation>Tambah Drive Floppy</translation>
     </message>
     <message>
         <source>Adds new storage controller.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menambah pengendali penyimpanan baru.</translation>
     </message>
     <message>
         <source>Removes selected storage controller.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menghapus pengendali penyimpanan yang dipilih.</translation>
     </message>
     <message>
         <source>Adds new storage attachment.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menambah cantolan penyimpanan baru.</translation>
     </message>
     <message>
         <source>Removes selected storage attachment.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menghapus cantolan penyimpanan yang dipilih.</translation>
     </message>
     <message>
         <source>Optical &Drive:</source>
-        <translation type="unfinished"></translation>
+        <translation>&Drive Optik:</translation>
     </message>
     <message>
         <source>Choose a virtual optical disk or a physical drive to use with the virtual drive. The virtual machine will see a disk inserted into the drive with the data in the file or on the disk in the physical drive as its contents.</source>
-        <translation type="unfinished"></translation>
+        <translation>Pilih disk optik virtual atau drive fisik untuk dipakai dengan drive virtual. Mesin virtual akan melihat suatu disk disisipkan ke dalam drive dengan data dalam berkas atau pada disk dalam drive fisik sebagai isinya.</translation>
     </message>
     <message>
         <source>Create New Hard Disk...</source>
-        <translation type="unfinished"></translation>
+        <translation>Buat Hard Disk Baru...</translation>
     </message>
     <message>
         <source>Choose Virtual Hard Disk File...</source>
-        <translation type="unfinished"></translation>
+        <translation>Pilih Berkas Hard Disk Virtual...</translation>
     </message>
     <message>
         <source>Choose Virtual Optical Disk File...</source>
-        <translation type="unfinished"></translation>
+        <translation>Pilih Berkas Disk Optik Virtual...</translation>
     </message>
     <message>
         <source>Remove Disk from Virtual Drive</source>
-        <translation type="unfinished"></translation>
+        <translation>Singkirkan Disk dari Drive Virtual</translation>
     </message>
     <message>
         <source>Choose Virtual Floppy Disk File...</source>
-        <translation type="unfinished"></translation>
+        <translation>Pilih Berkas Disk Floppy Virtual...</translation>
     </message>
     <message>
         <source>Add NVMe Controller</source>
-        <translation type="unfinished"></translation>
+        <translation>Tambah Pengendali NVMe</translation>
     </message>
 </context>
 <context>
@@ -7608,53 +7608,53 @@
     </message>
     <message>
         <source>When checked, the RTC device will report the time in UTC, otherwise in local (host) time. Unix usually expects the hardware clock to be set to UTC.</source>
-        <translation type="unfinished"></translation>
+        <translation>Bila dicontreng, perangkat RTC akan melaporkan waktu dalam UTC, bila tidak, dalam waktu lokal (host). Unix biasanya mengharapkan jam perangkat keras ditata ke UTC.</translation>
     </message>
     <message>
         <source>%</source>
-        <translation type="unfinished"></translation>
+        <translation>%</translation>
     </message>
     <message>
         <source>&Paravirtualization Interface:</source>
-        <translation type="unfinished"></translation>
+        <translation>Antarmuka &Paravirtualisasi:</translation>
     </message>
     <message>
         <source>Selects the paravirtualization guest interface provider to be used by this virtual machine.</source>
-        <translation type="unfinished"></translation>
+        <translation>Memilih paravirtualisasi penyedia antar muka guest yang akan dipakai oleh mesin virtual ini.</translation>
     </message>
     <message>
         <source>The I/O APIC feature is not currently enabled in the Motherboard section of the System page. This is needed in order to support a chip set of type ICH9 you have enabled for this VM. It will be done automatically if you confirm your changes.</source>
-        <translation type="unfinished"></translation>
+        <translation>Fitur I/O APIC saat ini tidak difungsikan dalam seksi Motherboard dari halaman Sistem. Ini diperlukan agar mendukung chip set bertipe ICH9 yang telah Anda fungsikan bagi VM ini. Ini akan dilakukan secara otomatis bila Anda mengkonfirmasikan perubahan.</translation>
     </message>
     <message>
         <source>USB controller emulation is not currently enabled on the USB page. This is needed to support an emulated USB input device you have enabled for this VM. It will be done automatically if you confirm your changes.</source>
-        <translation type="unfinished"></translation>
+        <translation>Emulasi pengendali USB saat ini tidak difungsikan pada halaman USB. Ini diperlukan untuk mendukung perangkat masukan USB teremulasi yang telah Anda fungsikan bagi VM ini. Ini akan dilakukan secara otomatis bila Anda mengkonfirmasi perubahan Anda.</translation>
     </message>
     <message>
         <source>The I/O APIC feature is not currently enabled in the Motherboard section of the System page. This is needed in order to support more than one virtual processor you have chosen for this VM. It will be done automatically if you confirm your changes.</source>
-        <translation type="unfinished"></translation>
+        <translation>Fitur I/O APIC saat ini tidak difungsikan dalam seksi  Motherboard dari halaman SIstem. Ini diperlukan untuk mendukung lebih dari satu prosesor virtual. Ini akan dilakukan secara otomatis bila Anda mengkonfirmasi perubahan Anda.</translation>
     </message>
     <message>
         <source>Hardware virtualization is not currently enabled in the Acceleration section of the System page. This is needed in order to support more than one virtual processor you have chosen for this VM. It will be done automatically if you confirm your changes.</source>
-        <translation type="unfinished"></translation>
+        <translation>Virtualisasi perangkat keras saat ini tidak difungsikan dalam bagian Akselerasi dari halaman Sistem. Ini diperlukan untuk mendukung lebih dari satu prosesor virtual. Ini akan dilakukan secara otomatis bila Anda mengkonfirmasi perubahan Anda.</translation>
     </message>
     <message>
         <source>%1 MB</source>
-        <translation type="unfinished">%1 MB</translation>
+        <translation>%1 MB</translation>
     </message>
     <message>
         <source>%1 CPU</source>
         <comment>%1 is 1 for now</comment>
-        <translation type="unfinished"></translation>
+        <translation>%1 CPU</translation>
     </message>
     <message>
         <source>%1 CPUs</source>
         <comment>%1 is host cpu count * 2 for now</comment>
-        <translation type="unfinished"></translation>
+        <translation>%1 CPU</translation>
     </message>
     <message>
         <source>%1%</source>
-        <translation type="unfinished">%1%</translation>
+        <translation>%1%</translation>
     </message>
 </context>
 <context>
@@ -7710,7 +7710,7 @@
     <message>
         <source>New Filter %1</source>
         <comment>usb</comment>
-        <translation>Filter Baru %1</translation>
+        <translation>Penyaring Baru %1</translation>
     </message>
     <message>
         <source>When checked, enables the virtual USB controller of this machine.</source>
@@ -7730,15 +7730,15 @@
     </message>
     <message>
         <source>USB Device &Filters</source>
-        <translation>&Filter Perangkat USB</translation>
+        <translation>&Penyaring Perangkat USB</translation>
     </message>
     <message>
         <source>Lists all USB filters of this machine. The checkbox to the left defines whether the particular filter is enabled or not. Use the context menu or buttons to the right to add or remove USB filters.</source>
-        <translation>Menampilkan semua filter USB dari mesin ini. Kotak contreng di kiri menentukan apakah filter tertentu difungsikan atau tidak. Gunakan menu konteks atau tombol di kanan untuk menambah atau menghapus filter USB.</translation>
+        <translation>Menampilkan semua penyaring USB dari mesin ini. Kotak contreng di kiri menentukan apakah penyaring tertentu difungsikan atau tidak. Gunakan menu konteks atau tombol di kanan untuk menambah atau menghapus penyaring USB.</translation>
     </message>
     <message>
         <source>[filter]</source>
-        <translation>[filter]</translation>
+        <translation>[penyaring]</translation>
     </message>
     <message>
         <source><nobr>Vendor ID: %1</nobr></source>
@@ -7790,79 +7790,79 @@
     </message>
     <message>
         <source>When chosen, enables the virtual USB OHCI controller of this machine. The USB OHCI controller provides USB 1.0 support.</source>
-        <translation type="unfinished"></translation>
+        <translation>Saat dipilih, memfungsikan pengendali OHCI USB virtual pada mesin ini. Pengendali OHCI USB menyediakan dukungan USB 1.0.</translation>
     </message>
     <message>
         <source>USB &1.1 (OHCI) Controller</source>
-        <translation type="unfinished"></translation>
+        <translation>Pengendali USB &1.1 (OHCI)</translation>
     </message>
     <message>
         <source>When chosen, enables the virtual USB EHCI controller of this machine. The USB EHCI controller provides USB 2.0 support.</source>
-        <translation type="unfinished"></translation>
+        <translation>Saat dipilih, memfungsikan pengendali EHCI USB virtual pada mesin ini. Pengendali EHCI USB menyediakan dukungan USB 2.0.</translation>
     </message>
     <message>
         <source>USB &2.0 (EHCI) Controller</source>
-        <translation type="unfinished"></translation>
+        <translation>Pengendali USB &2.0 (EHCI)</translation>
     </message>
     <message>
         <source>When chosen, enables the virtual USB xHCI controller of this machine. The USB xHCI controller provides USB 3.0 support.</source>
-        <translation type="unfinished"></translation>
+        <translation>Saat dipilih, memfungsikan pengendali xHCI USB virtual pada mesin ini. Pengendali xHCI USB menyediakan dukungan USB 3.0.</translation>
     </message>
     <message>
         <source>USB &3.0 (xHCI) Controller</source>
-        <translation type="unfinished"></translation>
+        <translation>Pengendali USB &3.0 (xHCI)</translation>
     </message>
     <message>
         <source>USB 2.0/3.0 is currently enabled for this virtual machine. However, this requires the <i>%1</i> to be installed. Please install the Extension Pack from the VirtualBox download site or disable USB 2.0/3.0 to be able to start the machine.</source>
-        <translation type="unfinished"></translation>
+        <translation>USB 2.0/3.0 saat ini difungsikan bagi mesin virtual ini. Namun, ini memerlukan dipasangnya <b>%1</b>. Harap pasang Extension Pack dari situs unduh VirtualBox atau nonaktifkan USB 2.0/3.0 agar bisa memulai mesin.</translation>
     </message>
     <message>
         <source>Add Empty Filter</source>
-        <translation type="unfinished">Tambahkan Filter Kosong</translation>
+        <translation>Tambahkan Penyaring Kosong</translation>
     </message>
     <message>
         <source>Add Filter From Device</source>
-        <translation type="unfinished">Tambahkan Filter dari Device</translation>
+        <translation>Tambahkan Penyaring dari Perangkat</translation>
     </message>
     <message>
         <source>Edit Filter</source>
-        <translation type="unfinished"></translation>
+        <translation>Sunting Penyaring</translation>
     </message>
     <message>
         <source>Remove Filter</source>
-        <translation type="unfinished">Hapus Filter</translation>
+        <translation>Hapus Penyaring</translation>
     </message>
     <message>
         <source>Move Filter Up</source>
-        <translation type="unfinished">Naikkan Filter</translation>
+        <translation>Naikkan Penyaring</translation>
     </message>
     <message>
         <source>Move Filter Down</source>
-        <translation type="unfinished">Turunkan Filter</translation>
+        <translation>Turunkan Penyaring</translation>
     </message>
     <message>
         <source>Adds new USB filter with all fields initially set to empty strings. Note that such a filter will match any attached USB device.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menambahkan sebuah penyaring USB baru dengan semua field awal ditata sebagai string kosong. Perhatikan bahwa penyaring seperti itu akan cocok dengan perangkat USB apapun yang terpasang.</translation>
     </message>
     <message>
         <source>Adds new USB filter with all fields set to the values of the selected USB device attached to the host PC.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menambahkan sebuah penyaring USB baru dengan semua field ditata sebagai nilai dari perangkat USB terpilih terpasang pada PC host.</translation>
     </message>
     <message>
         <source>Edits selected USB filter.</source>
-        <translation type="unfinished"></translation>
+        <translation>Sunting penyaring USB yang dipilih.</translation>
     </message>
     <message>
         <source>Removes selected USB filter.</source>
-        <translation type="unfinished"></translation>
+        <translation>Hapus penyaring USB yang dipilih.</translation>
     </message>
     <message>
         <source>Moves selected USB filter up.</source>
-        <translation type="unfinished"></translation>
+        <translation>Pindahkan penyaring USB yang dipilih ke atas.</translation>
     </message>
     <message>
         <source>Moves selected USB filter down.</source>
-        <translation type="unfinished"></translation>
+        <translation>Pindahkan penyaring USB yang dipilih ke bawah.</translation>
     </message>
 </context>
 <context>
@@ -7888,7 +7888,7 @@
     </message>
     <message>
         <source>Holds the filter name.</source>
-        <translation>Menyimpan nama filter.</translation>
+        <translation>Menyimpan nama penyaring.</translation>
     </message>
     <message>
         <source>&Vendor ID:</source>
@@ -7968,35 +7968,35 @@
     </message>
     <message>
         <source>Holds the vendor ID filter. The <i>exact match</i> string format is <tt>XXXX</tt> where <tt>X</tt> is a hexadecimal digit. An empty string will match any value.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menyimpan penyaring ID vendor. Format string <i>cocok eksak</i> adalah <tt>XXXX</tt> dimana <tt>X</tt> adalah suatu digit heksadesimal. Suatu string kosong akan cocok dengan sebarang nilai.</translation>
     </message>
     <message>
         <source>Holds the product ID filter. The <i>exact match</i> string format is <tt>XXXX</tt> where <tt>X</tt> is a hexadecimal digit. An empty string will match any value.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menyimpan penyaring ID produk. Format string <i>cocok eksak</i> adalah <tt>XXXX</tt> dimana <tt>X</tt> adalah suatu digit heksadesimal. Suatu string kosong akan cocok dengan sebarang nilai.</translation>
     </message>
     <message>
         <source>Holds the revision number filter. The <i>exact match</i> string format is <tt>IIFF</tt> where <tt>I</tt> is a decimal digit of the integer part and <tt>F</tt> is a decimal digit of the fractional part. An empty string will match any value.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menyimpan penyaring nomor revisi. Format string <i>cocok eksak</i> adalah <tt>IIFF</tt> dimana <tt>I</tt> adalah suatu digit desimal dari bagian bilangan bulat dan <tt>F</tt> adalah suatu digit desimal dari bagian pecahan. Suatu string kosong akan cocok dengan sebarang nilai.</translation>
     </message>
     <message>
         <source>Holds the manufacturer filter as an <i>exact match</i> string. An empty string will match any value.</source>
-        <translation type="unfinished"></translation>
+        <translation>Memuat penyaring pabrikan sebagai suatu string <i>cocok eksak</i>. Suatu string kosong akan cocok dengan sebarang nilai.</translation>
     </message>
     <message>
         <source>Holds the product name filter as an <i>exact match</i> string. An empty string will match any value.</source>
-        <translation type="unfinished"></translation>
+        <translation>Memuat penyaring nama produk sebagai suatu string <i>cocok eksak</i>. Suatu string kosong akan cocok dengan sebarang nilai.</translation>
     </message>
     <message>
         <source>Holds the serial number filter as an <i>exact match</i> string. An empty string will match any value.</source>
-        <translation type="unfinished"></translation>
+        <translation>Memuat penyaring nomor seri sebagai suatu string <i>cocok eksak</i>. Suatu string kosong akan cocok dengan sebarang nilai.</translation>
     </message>
     <message>
         <source>Holds the host USB port filter as an <i>exact match</i> string. An empty string will match any value.</source>
-        <translation type="unfinished"></translation>
+        <translation>Memuat penyaring port USB sebagai suatu string <i>cocok eksak</i>. String kosong akan cocok dengan sebarang nilai.</translation>
     </message>
     <message>
         <source>Holds whether this filter applies to USB devices attached locally to the host computer (<i>No</i>), to a VRDP client's computer (<i>Yes</i>), or both (<i>Any</i>).</source>
-        <translation type="unfinished"></translation>
+        <translation>Menentukan apakah penyaring ini diterapkan ke perangkat USB yang tersambung secara lokal ke komputer host (<i>Tidak</i>), ke klien VRDP komputer (<i>Ya</i>), atau keduanya (<i>Apa saja</a>).</translation>
     </message>
 </context>
 <context>
@@ -8037,11 +8037,11 @@
     </message>
     <message>
         <source>Removing medium...</source>
-        <translation type="unfinished"></translation>
+        <translation>Mencabut medium...</translation>
     </message>
     <message>
         <source>&Hard disks</source>
-        <translation type="unfinished"></translation>
+        <translation>&Hard disk</translation>
     </message>
 </context>
 <context>
@@ -8060,50 +8060,50 @@
     </message>
     <message>
         <source>This type of medium is attached directly or indirectly, preserved when taking snapshots.</source>
-        <translation type="unfinished"></translation>
+        <translation>Tipe medium ini dicantol secara langsung atau tak langsung, dilestarikan ketika mengambil snapshot.</translation>
     </message>
     <message>
         <source>This type of medium is attached indirectly, changes are wiped out the next time the virtual machine is started.</source>
-        <translation type="unfinished"></translation>
+        <translation>Tipe medium ini dicantol secara tak langsung, perubahan disapu habis saat mesin virtual dijalankan berikutnya.</translation>
     </message>
     <message>
         <source>This type of medium is attached directly, ignored when taking snapshots.</source>
-        <translation type="unfinished"></translation>
+        <translation>Tipe medium ini dicantol secara langsung, diabaikan ketika mengambil snapshot.</translation>
     </message>
     <message>
         <source>This type of medium is attached directly, allowed to be used concurrently by several machines.</source>
-        <translation type="unfinished"></translation>
+        <translation>Tipe medium ini dicantol secara langsung, diijinkan untuk dipakai bersamaan oleh beberapa mesin.</translation>
     </message>
     <message>
         <source>This type of medium is attached directly, and can be used by several machines.</source>
-        <translation type="unfinished"></translation>
+        <translation>Tipe medium ini dicantol secara langsung, dan dapat dipakai oleh beberapa mesin.</translation>
     </message>
     <message>
         <source>This type of medium is attached indirectly, so that one base medium can be used for several VMs which have their own differencing medium to store their modifications.</source>
-        <translation type="unfinished"></translation>
+        <translation>Tipe medium ini dicantol secara tak langsung, sehingga satu medium basis dapat dipakai bagi beberapa VM yang memiliki medium pembeda masing-masing untuk menyimpan perubahan mereka.</translation>
     </message>
 </context>
 <context>
     <name>UIMenuBarEditorWidget</name>
     <message>
         <source>Virtual Screen Resize</source>
-        <translation type="unfinished"></translation>
+        <translation>Ubah Ukuran Layar Virtual</translation>
     </message>
     <message>
         <source>Virtual Screen Mapping</source>
-        <translation type="unfinished"></translation>
+        <translation>Pemetaan Layar Virtual</translation>
     </message>
     <message>
         <source>Switch</source>
-        <translation type="unfinished">Beralih</translation>
+        <translation>Beralih</translation>
     </message>
     <message>
         <source>Close</source>
-        <translation type="unfinished">Tutup</translation>
+        <translation>Tutup</translation>
     </message>
     <message>
         <source>Enable Menu Bar</source>
-        <translation type="unfinished"></translation>
+        <translation>Fungsikan Bilah Menu</translation>
     </message>
 </context>
 <context>
@@ -9765,143 +9765,143 @@
     </message>
     <message>
         <source><p>Failed to create the VirtualBoxClient COM object.</p><p>The application will now terminate.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Gagal menciptakan objek COM VirtualBoxClient.</p><p>Aplikasi sekarang akan diakhiri.</p></translation>
     </message>
     <message>
         <source>Failed to set the global VirtualBox extra data for key <i>%1</i> to value <i>{%2}</i>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Gagal menata data ekstra VirtualBox global untuk kunci <i>%1</i> ke nilai <i>{%2}</i>.</translation>
     </message>
     <message>
         <source>Failed to set the extra data for key <i>%1</i> of machine <i>%2</i> to value <i>{%3}</i>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Gagal menata data ekstra untuk kunci <i>%1</i> dari mesin <i>%2</i> ke nilai <i>{%3}</i>.</translation>
     </message>
     <message>
         <source><p>One or more disk image files are not currently accessible. As a result, you will not be able to operate virtual machines that use these files until they become accessible later.</p><p>Press <b>Check</b> to open the Virtual Media Manager window and see which files are inaccessible, or press <b>Ignore</b> to ignore this message.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Satu atau lebih berkas image disk kini tak dapat diakses. Akibatnya, Anda tak akan bisa mengoperasikan mesin virtual yang memakai berkas tersebut sampai mereka menjadi bisa diakses nanti.</p><p>Tekan <b>Periksa</b> untuk membuka jendela Manajer Media Virtual dan melihat berkas mana yang tak dapat diakses, atau tekan <b>Abaikan</b> untuk mengabaikan pesan ini.</p></translation>
     </message>
     <message>
         <source><p>Deleting the snapshot will cause the state information saved in it to be lost, and storage data spread over several image files that VirtualBox has created together with the snapshot will be merged into one file. This can be a lengthy process, and the information in the snapshot cannot be recovered.</p></p>Are you sure you want to delete the selected snapshot <b>%1</b>?</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Menghapus snapshot akan menyebabkan informasi keadaan yang disimpan di dalamnya hilang, dan data disk yang disebar ke beberapa berkas image yang telah dibuat oleh VirtualBox, bersama dengan snapshot akan digabung ke dalam satu berkas. Proses ini bisa makan waktu lama, dan informasi di dalam snapshot tidak dapat diambil kembali.</p><p>Apakah Anda yakin hendak menghapus snapshot <b>%1</b>yang dipilih?</p></translation>
     </message>
     <message>
         <source><p>Deleting the snapshot %1 will temporarily need more storage space. In the worst case the size of image %2 will grow by %3, however on this filesystem there is only %4 free.</p><p>Running out of storage space during the merge operation can result in corruption of the image and the VM configuration, i.e. loss of the VM and its data.</p><p>You may continue with deleting the snapshot at your own risk.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Menghapus snapshot %1 akan memerlukan lebih banyak ruang penyimpanan untuk sementara. Pada kasus terburuk ukurang image %2 akan bertambah %3, namun pada sistem berkas ini hanya ada ruang bebas %4.</p><p>Kehabisan ruang disk selama operasi penggabungan akan menghasilkan kerusakan image dan konfigurasi VM, yaitu hilangnya VM dan datanya.</p><p>Anda dapat melanjutkan penghapusan snapshot dengan risiko yang Anda tanggung sendiri.</p&gt [...]
     </message>
     <message>
         <source>Failed to save the settings.</source>
-        <translation type="unfinished"></translation>
+        <translation>Gagal menyimpan pengaturan.</translation>
     </message>
     <message>
         <source><p>You are about to add a new optical drive to controller <b>%1</b>.</p><p>Would you like to choose a virtual optical disk to put in the drive or to leave it empty for now?</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Anda akan menambahkan sebuah drive optik baru ke pengendali <b>%1</b>.</p><p>Apakah Anda ingin memilih suatu disk optik virtual untuk diletakkan di dalam drive atau membiarkannya kosong untuk saat ini?</p></translation>
     </message>
     <message>
         <source><p>Are you sure you want to delete the optical drive?</p><p>You will not be able to insert any optical disks or ISO images or install the Guest Additions without it!</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Apakah Anda yakin hendak menghapus drive optik?</p><p>Anda tak akan bisa memasukkan disk optik, image ISO, atau memasang Guest Addition tanpanya!</p></translation>
     </message>
     <message>
         <source>Failed to attach the optical drive (<nobr><b>%1</b></nobr>) to the slot <i>%2</i> of the machine <b>%3</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Gagal mencantol drive optik (<nobr><b>%1</b></nobr>) ke slot <i>%2</i> mesin <b>%3</b>.</translation>
     </message>
     <message>
         <source>Failed to attach the floppy drive (<nobr><b>%1</b></nobr>) to the slot <i>%2</i> of the machine <b>%3</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Gagal mencantol drive floppy (<nobr><b>%1</b></nobr>) ke slot <i>%2</i> mesin <b>%3</b>.</translation>
     </message>
     <message>
         <source>The current port forwarding rules are not valid. Rule names should be unique.</source>
-        <translation type="unfinished"></translation>
+        <translation>Aturan penerusan port saat ini tidak valid. Nama aturan mesti unik.</translation>
     </message>
     <message>
         <source>The current port forwarding rules are not valid. Few rules have same host ports and conflicting IP addresses.</source>
-        <translation type="unfinished"></translation>
+        <translation>Aturan penerusan port saat ini tidak valid. Beberapa aturan punya port host yang sama dan alamat IP yang konflik.</translation>
     </message>
     <message>
         <source><p>Are you sure you want to release the disk image file <nobr><b>%1</b></nobr>?</p><p>This will detach it from the following virtual machine(s): <b>%2</b>.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Apakah Anda yakin hendak merilis berkas image disk <nobr><b>%1</b></nobr>?</p><p>Ini akan melepaskannya dari mesin virtual berikut: <b>%2</b>.</p></translation>
     </message>
     <message>
         <source><p>Do you want to delete the storage unit of the virtual hard disk <nobr><b>%1</b></nobr>?</p><p>If you select <b>Delete</b> then the specified storage unit will be permanently deleted. This operation <b>cannot be undone</b>.</p><p>If you select <b>Keep</b> then the hard disk will be only removed from the list of known hard disks, but the storage unit will be left untouched which mak [...]
-        <translation type="unfinished"></translation>
+        <translation><p>Apakah Anda ingin menghapus unit penyimpanan hard disk virtual <nobr><b>%1</b> ini?</nobr></p><p>Bila Anda memilih <b>Hapus</b> maka unit penyimpanan yang dinyatakan akan dihapus secara permanen. Tindakan ini <b>tidak dapat dibatalkan</b>.</p><p>Bila Anda memilih <b>Pertahankan</b> maka hard disk hanya akan dihapus dari daftar hard disk yang dikenal, tapi unit penyimpanan aka [...]
     </message>
     <message>
         <source>Failed to detach the optical drive (<nobr><b>%1</b></nobr>) from the slot <i>%2</i> of the machine <b>%3</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Gagal mencopot drive optik (<nobr><b>%1</b></nobr>) dari slot <i>%2</i> mesin <b>%3</b>.</translation>
     </message>
     <message>
         <source>Failed to detach the floppy drive (<nobr><b>%1</b></nobr>) from the slot <i>%2</i> of the machine <b>%3</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Gagal mencopot drive floppy (<nobr><b>%1</b></nobr>) dari slot <i>%2</i> mesin <b>%3</b>.</translation>
     </message>
     <message>
         <source>Failed to open the disk image file <nobr><b>%1</b></nobr>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Gagal membuka berkas image disk <nobr><b>%1</b></nobr>.</translation>
     </message>
     <message>
         <source>Failed to close the disk image file <nobr><b>%1</b></nobr>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Gagal menutup berkas hard disk <nobr><b>%1</b></nobr>.</translation>
     </message>
     <message>
         <source>You are about to create a new virtual machine without a hard disk. You will not be able to install an operating system on the machine until you add one. In the mean time you will only be able to start the machine using a virtual optical disk or from the network.</source>
-        <translation type="unfinished"></translation>
+        <translation>Anda hendak membuat suatu mesin virtual baru tanpa hard disk. Anda tidak akan bisa memasang sistem operasi pada mesin sampai Anda menambahkannya. Sementara waktu Anda hanya akan bisa memulai mesin memakai disk optik virtual atau dari jaringan.</translation>
     </message>
     <message>
         <source>Bad password or authentication failure.</source>
-        <translation type="unfinished"></translation>
+        <translation>Password salah atau kegagalan otentikasi.</translation>
     </message>
     <message>
         <source><p>A critical error has occurred while running the virtual machine and the machine execution should be stopped.</p><p>For help, please see the Community section on <a href=https://www.virtualbox.org>https://www.virtualbox.org</a> or your support contract. Please provide the contents of the log file <tt>VBox.log</tt>, which you can find in the virtual machine log directory, as well as a description of what you were doing when this  [...]
-        <translation type="unfinished"></translation>
+        <translation><p>Telah terjadi suatu kesalahan kritis ketika menjalankan mesin virtual dan eksekusi mesin mesti dihentikan.</p><p>Untuk bantuan, harap lihat seksi Komunitas pada <a href=https://www.virtualbox.org>https://www.virtualbox.org</a> atau kontrak dukungan Anda. Harap berikan isi berkas log <tt>VBox.log</tt>, yang dapat Anda temukan dalam direktori log mesin virtual, maupun deskripsi tentang apa yang Anda lakukan ketika kesalahan  [...]
     </message>
     <message>
         <source><p>The virtual machine window will be now switched to <b>full-screen</b> mode. You can go back to windowed mode at any time by pressing <b>%1</b>.</p><p>Note that the <i>Host</i> key is currently defined as <b>%2</b>.</p><p>Note that the main menu bar is hidden in full-screen mode. You can access it by pressing <b>Host+Home</b>.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Jendela mesin virtual akan berpindah ke mode <b>layar penuh</b>. Anda dapat kembali ke mode berjendela kapanpun dengan menekan <b>%1</b>.</p><p>Perhatikan bahwa tombol <i>Host</i> kini didefinisikan sebagai <b>%2</b>.</p><p>Perhatikan bahwa bilah menu utama tersembunyi dalam mode layar penuh. Anda dapat mengaksesnya dengan menekan <b>Host+Home</b>.</p></translation>
     </message>
     <message>
         <source><p>Could not switch the guest display to full-screen mode due to insufficient guest video memory.</p><p>You should configure the virtual machine to have at least <b>%1</b> of video memory.</p><p>Press <b>Ignore</b> to switch to full-screen mode anyway or press <b>Cancel</b> to cancel the operation.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Tidak dapat menukar tampilan guest menjadi mode layar-penuh karena memori video guest tidak cukup.</p><p>Anda harus mengkonfigurasi mesin virtual agar memiliki setidaknya memori video sebesar<b>%1</b>.</p><p>Tekan <b>Abaikan</b> untuk tetap beralih ke mode layar penuh atau tekan <b>Batal</b> untuk membatalkan tindakan.</p></translation>
     </message>
     <message>
         <source>Failed to connect the network adapter cable of the virtual machine <b>%1</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Gagal menyambungkan kabel adaptor jaringan dari mesin virtual <b>%1</b>.</translation>
     </message>
     <message>
         <source>Failed to disconnect the network adapter cable of the virtual machine <b>%1</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Gagal memutus kabel adaptor jaringan dari mesin virtual <b>%1</b>.</translation>
     </message>
     <message>
         <source><p>Could not insert the <b>VirtualBox Guest Additions</b> disk image file into the virtual machine <b>%1</b>, as the machine has no optical drives. Please add a drive using the storage page of the virtual machine settings window.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><b>Tak bisa menyisipkan berkas image disk <b>VirtualBox Guest Additions</b> ke dalam mesin virtual <b>%1</b>, karena mesin tak memiliki drive optik. Silakan tambahkan sebuah drive memakai halaman penyimpanan dari jendela pengaturan mesin virtual.</p></translation>
     </message>
     <message>
         <source><p>The <b>VirtualBox Guest Additions</b> disk image file has been successfully downloaded from <nobr><a href="%1">%1</a></nobr> and saved locally as <nobr><b>%2</b>.</nobr></p><p>Do you wish to register this disk image file and insert it into the virtual optical drive?</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Berkas image disk <b>VirtualBox Guest Additions</b> telah sukses diunduh dari <nobr><a href="%1">%1</a></nobr> dan disimpan secara lokal sebagai <nobr><b>%2</b>.</nobr></p><p>Apakah Anda ingin mendaftarkan berkas image disk ini dan memasangnya pada drive optik virtual?</p></translation>
     </message>
     <message>
         <source>Drag and drop operation from host to guest failed.</source>
-        <translation type="unfinished"></translation>
+        <translation>Operasi seret dan jatuhkan dari host ke guest gagal.</translation>
     </message>
     <message>
         <source>Unable to cancel host to guest drag and drop operation.</source>
-        <translation type="unfinished"></translation>
+        <translation>Tidak bisa membatalkan operasi seret dan jatuhkan dari host ke guest.</translation>
     </message>
     <message>
         <source>Drag and drop operation from guest to host failed.</source>
-        <translation type="unfinished"></translation>
+        <translation>Operasi seret dan jatuhkan dari guest ke host gagal.</translation>
     </message>
     <message>
         <source>Encryption password for <nobr>ID = '%1'</nobr> is invalid.</source>
-        <translation type="unfinished"></translation>
+        <translation>Password enkripsi bagi <nobr>ID = '%1'</nobr> tidak valid.</translation>
     </message>
     <message>
         <source>The current port forwarding rules are not valid. All of the host or guest address values should be correct or empty.</source>
-        <translation type="unfinished"></translation>
+        <translation>Aturan penerusan port saat ini tidak valid. Semua nilai alamat host atau guest mesti benar atau kosong.</translation>
     </message>
     <message>
         <source>The current port forwarding rules are not valid. None of the guest address values may be empty.</source>
-        <translation type="unfinished"></translation>
+        <translation>Aturan penerusan port saat ini tidak valid. Nilai alamat guest tak boleh kosong.</translation>
     </message>
     <message>
         <source><p>Failed to acquire the VirtualBox COM object.</p><p>The application will now terminate.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Gagal memperoleh objek COM VirtualBox.</p><p>Aplikasi sekarang akan diakhiri.</p></translation>
     </message>
 </context>
 <context>
@@ -10018,11 +10018,11 @@
     </message>
     <message>
         <source>N&ame:</source>
-        <translation type="unfinished"></translation>
+        <translation>N&ama:</translation>
     </message>
     <message>
         <source>Holds the location of the virtual machine.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menyimpan lokasi dari mesin virtual.</translation>
     </message>
 </context>
 <context>
@@ -10109,42 +10109,42 @@
     <message>
         <source>%1: %2</source>
         <comment>Context description: Error description</comment>
-        <translation type="unfinished"></translation>
+        <translation>%1: %2</translation>
     </message>
     <message>
         <source>Unable to initialize HTTP library</source>
-        <translation type="unfinished"></translation>
+        <translation>Tidak bisa menginisialisasi pustaka HTTP</translation>
     </message>
     <message>
         <source>Connection refused</source>
-        <translation type="unfinished"></translation>
+        <translation>Koneksi ditolak</translation>
     </message>
     <message>
         <source>Content moved</source>
-        <translation type="unfinished"></translation>
+        <translation>Isi pindah</translation>
     </message>
     <message>
         <source>Proxy not found</source>
-        <translation type="unfinished"></translation>
+        <translation>Proksi tak ditemukan</translation>
     </message>
     <message>
         <source>Url not found on the server</source>
-        <translation type="unfinished"></translation>
+        <translation>Url tak ditemukan pada server</translation>
     </message>
 </context>
 <context>
     <name>UINetworkReplyPrivateThread</name>
     <message>
         <source>During proxy configuration</source>
-        <translation type="unfinished"></translation>
+        <translation>Selama mengkonfigurasi proksi</translation>
     </message>
     <message>
         <source>During certificate downloading</source>
-        <translation type="unfinished"></translation>
+        <translation>Selama pengunduhan sertifikat</translation>
     </message>
     <message>
         <source>During network request</source>
-        <translation type="unfinished"></translation>
+        <translation>Selama pemintaan jaringan</translation>
     </message>
 </context>
 <context>
@@ -10880,55 +10880,55 @@ langkah ini dan memasang hard disk pada waktu lain menggunakan dialog Setting Me
     <name>UIPortForwardingTable</name>
     <message>
         <source>Name</source>
-        <translation type="unfinished">Nama</translation>
+        <translation>Nama</translation>
     </message>
     <message>
         <source>Protocol</source>
-        <translation type="unfinished">Protokol</translation>
+        <translation>Protokol</translation>
     </message>
     <message>
         <source>Host IP</source>
-        <translation type="unfinished">IP Host</translation>
+        <translation>IP Host</translation>
     </message>
     <message>
         <source>Host Port</source>
-        <translation type="unfinished">Port Host</translation>
+        <translation>Port Host</translation>
     </message>
     <message>
         <source>Guest IP</source>
-        <translation type="unfinished">IP Guest</translation>
+        <translation>IP Guest</translation>
     </message>
     <message>
         <source>Guest Port</source>
-        <translation type="unfinished">Port Guest</translation>
+        <translation>Port Guest</translation>
     </message>
     <message>
         <source>Contains a list of port forwarding rules.</source>
-        <translation type="unfinished"></translation>
+        <translation>Memuat daftar aturan penerusan port.</translation>
     </message>
     <message>
         <source>Add New Rule</source>
-        <translation type="unfinished"></translation>
+        <translation>Tambah Aturan Baru</translation>
     </message>
     <message>
         <source>Copy Selected Rule</source>
-        <translation type="unfinished"></translation>
+        <translation>Salin Aturan Yang Dipilih</translation>
     </message>
     <message>
         <source>Remove Selected Rule</source>
-        <translation type="unfinished"></translation>
+        <translation>Hapus Aturan Yang Dipilih</translation>
     </message>
     <message>
         <source>Adds new port forwarding rule.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menambah aturan baru penerusan port.</translation>
     </message>
     <message>
         <source>Copies selected port forwarding rule.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menyalin aturan penerusan port yang dipilih.</translation>
     </message>
     <message>
         <source>Removes selected port forwarding rule.</source>
-        <translation type="unfinished"></translation>
+        <translation>Menghapus aturan penerusan port yang dipilih.</translation>
     </message>
 </context>
 <context>
@@ -11074,7 +11074,7 @@ langkah ini dan memasang hard disk pada waktu lain menggunakan dialog Setting Me
     </message>
     <message>
         <source>Preferences</source>
-        <translation type="unfinished"></translation>
+        <translation>Preferensi</translation>
     </message>
 </context>
 <context>
@@ -11129,37 +11129,37 @@ langkah ini dan memasang hard disk pada waktu lain menggunakan dialog Setting Me
     </message>
     <message>
         <source>User Interface</source>
-        <translation type="unfinished"></translation>
+        <translation>Antarmuka Pengguna</translation>
     </message>
     <message>
         <source>Settings</source>
-        <translation type="unfinished"></translation>
+        <translation>Pengaturan</translation>
     </message>
 </context>
 <context>
     <name>UISettingsSerializerProgress</name>
     <message>
         <source>Loading Settings...</source>
-        <translation type="unfinished"></translation>
+        <translation>Memuat Pengaturan...</translation>
     </message>
     <message>
         <source>Saving Settings...</source>
-        <translation type="unfinished"></translation>
+        <translation>Menyimpan Pengaturan...</translation>
     </message>
 </context>
 <context>
     <name>UIStatusBarEditorWidget</name>
     <message>
         <source><nobr><b>Click</b> to toggle indicator presence.</nobr><br><nobr><b>Drag&Drop</b> to change indicator position.</nobr></source>
-        <translation type="unfinished"></translation>
+        <translation><nobr><b>Klik</b> untuk menjungkitkan keberadaan indikator.</nobr><br><nobr><b>Seret&Jatuhkan</b> untuk mengubah posisi indikator.</nobr></translation>
     </message>
     <message>
         <source>Close</source>
-        <translation type="unfinished">Tutup</translation>
+        <translation>Tutup</translation>
     </message>
     <message>
         <source>Enable Status Bar</source>
-        <translation type="unfinished"></translation>
+        <translation>Fungsikan Bilah Status</translation>
     </message>
 </context>
 <context>
@@ -11303,11 +11303,11 @@ langkah ini dan memasang hard disk pada waktu lain menggunakan dialog Setting Me
     </message>
     <message>
         <source>&Continue running in the background</source>
-        <translation type="unfinished"></translation>
+        <translation>Teruskan &berjalan di latar belakang</translation>
     </message>
     <message>
         <source><p>Close the virtual machine windows but keep the virtual machine running.</p><p>You can use the VirtualBox Manager to return to running the virtual machine in a window.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Tutup jendela mesin virtual tapi tetap jaga mesin virtual berjalan.</p><p>Anda dapat memakai Manajer VirtualBox untuk kembali ke menjalankan mesin virtual dalam suatu jendela.</p></translation>
     </message>
 </context>
 <context>
@@ -11325,113 +11325,113 @@ langkah ini dan memasang hard disk pada waktu lain menggunakan dialog Setting Me
     <name>UIVMInfoDialog</name>
     <message>
         <source>%1 - Session Information</source>
-        <translation type="unfinished">%1 - Informasi Sesi</translation>
+        <translation>%1 - Informasi Sesi</translation>
     </message>
     <message>
         <source>Configuration &Details</source>
-        <translation type="unfinished">&Rincian Konfigurasi</translation>
+        <translation>&Rincian Konfigurasi</translation>
     </message>
     <message>
         <source>&Runtime Information</source>
-        <translation type="unfinished">Informasi &Runtime</translation>
+        <translation>Informasi &Runtime</translation>
     </message>
     <message>
         <source>DMA Transfers</source>
-        <translation type="unfinished">Transfer DMA</translation>
+        <translation>Transfer DMA</translation>
     </message>
     <message>
         <source>PIO Transfers</source>
-        <translation type="unfinished">Transfer PIO</translation>
+        <translation>Transfer PIO</translation>
     </message>
     <message>
         <source>Data Read</source>
-        <translation type="unfinished">Data Terbaca</translation>
+        <translation>Data Dibaca</translation>
     </message>
     <message>
         <source>Data Written</source>
-        <translation type="unfinished">Data Tertulis</translation>
+        <translation>Data Ditulis</translation>
     </message>
     <message>
         <source>Data Transmitted</source>
-        <translation type="unfinished">Data Terkirim</translation>
+        <translation>Data Dikirim</translation>
     </message>
     <message>
         <source>Data Received</source>
-        <translation type="unfinished">Data Diterima</translation>
+        <translation>Data Diterima</translation>
     </message>
     <message>
         <source>Not Detected</source>
         <comment>guest additions</comment>
-        <translation type="unfinished">Tidak Terdeteksi</translation>
+        <translation>Tidak Terdeteksi</translation>
     </message>
     <message>
         <source>Not Detected</source>
         <comment>guest os type</comment>
-        <translation type="unfinished">Tidak Terdeteksi</translation>
+        <translation>Tidak Terdeteksi</translation>
     </message>
     <message>
         <source>Not Available</source>
         <comment>details report (VRDE server port)</comment>
-        <translation type="unfinished">Tidak Tersedia</translation>
+        <translation>Tidak Tersedia</translation>
     </message>
     <message>
         <source>Runtime Attributes</source>
-        <translation type="unfinished">Atribut Runtime</translation>
+        <translation>Atribut Runtime</translation>
     </message>
     <message>
         <source>Screen Resolution</source>
-        <translation type="unfinished">Resolusi Layar</translation>
+        <translation>Resolusi Layar</translation>
     </message>
     <message>
         <source>VM Uptime</source>
-        <translation type="unfinished"></translation>
+        <translation>Uptime VM</translation>
     </message>
     <message>
         <source>Clipboard Mode</source>
-        <translation type="unfinished">Mode Papan Klip</translation>
+        <translation>Mode Papan Klip</translation>
     </message>
     <message>
         <source>Drag and Drop Mode</source>
-        <translation type="unfinished"></translation>
+        <translation>Mode Seret dan Jatuhkan</translation>
     </message>
     <message>
         <source>Guest Additions</source>
-        <translation type="unfinished">Guest Additions</translation>
+        <translation>Guest Additions</translation>
     </message>
     <message>
         <source>Guest OS Type</source>
-        <translation type="unfinished">Tipe OS Guest</translation>
+        <translation>Tipe OS Guest</translation>
     </message>
     <message>
         <source>Storage Statistics</source>
-        <translation type="unfinished">Statistik Penyimpanan</translation>
+        <translation>Statistik Penyimpanan</translation>
     </message>
     <message>
         <source>No Storage Devices</source>
-        <translation type="unfinished">Tidak Ada Perangkat Penyimpanan</translation>
+        <translation>Tidak Ada Perangkat Penyimpanan</translation>
     </message>
     <message>
         <source>Network Statistics</source>
-        <translation type="unfinished">Statistik Jaringan</translation>
+        <translation>Statistik Jaringan</translation>
     </message>
     <message>
         <source>No Network Adapters</source>
-        <translation type="unfinished">Tidak Ada Adaptor Jaringan</translation>
+        <translation>Tidak Ada Adaptor Jaringan</translation>
     </message>
 </context>
 <context>
     <name>UIVMInformationDialog</name>
     <message>
         <source>%1 - Session Information</source>
-        <translation type="unfinished">%1 - Informasi Sesi</translation>
+        <translation>%1 - Informasi Sesi</translation>
     </message>
     <message>
         <source>Configuration &Details</source>
-        <translation type="unfinished">&Rincian Konfigurasi</translation>
+        <translation>&Rincian Konfigurasi</translation>
     </message>
     <message>
         <source>&Runtime Information</source>
-        <translation type="unfinished">Informasi &Runtime</translation>
+        <translation>Informasi &Runtime</translation>
     </message>
 </context>
 <context>
@@ -11551,15 +11551,15 @@ langkah ini dan memasang hard disk pada waktu lain menggunakan dialog Setting Me
     </message>
     <message>
         <source>Filter</source>
-        <translation type="unfinished"></translation>
+        <translation>Penyaring</translation>
     </message>
     <message>
         <source>Enter filtering string here</source>
-        <translation type="unfinished"></translation>
+        <translation>Masukkan string penyaring di sini</translation>
     </message>
     <message>
         <source>Fil&ter</source>
-        <translation type="unfinished"></translation>
+        <translation>Penya&ring</translation>
     </message>
 </context>
 <context>
@@ -11605,19 +11605,19 @@ langkah ini dan memasang hard disk pada waktu lain menggunakan dialog Setting Me
     </message>
     <message>
         <source>&Expert Mode</source>
-        <translation type="unfinished"></translation>
+        <translation>Mode &Pakar</translation>
     </message>
     <message>
         <source>Switch to <nobr><b>Expert Mode</b></nobr>, a one-page dialog for experienced users.</source>
-        <translation type="unfinished"></translation>
+        <translation>Tukar ke <nobr><b>Mode Pakar</b></nobr>, suatu dialog satu halaman untuk pengguna yang berpengalaman.</translation>
     </message>
     <message>
         <source>&Guided Mode</source>
-        <translation type="unfinished"></translation>
+        <translation>Mode &Terpandu</translation>
     </message>
     <message>
         <source>Switch to <nobr><b>Guided Mode</b></nobr>, a step-by-step dialog with detailed explanations.</source>
-        <translation type="unfinished"></translation>
+        <translation>Tukar ke <nobr><b>Mode Terpandu</b></nobr>, suatu dialog langkah demi langkah dengan penjelasan terrinci.</translation>
     </message>
 </context>
 <context>
@@ -11717,82 +11717,82 @@ langkah ini dan memasang hard disk pada waktu lain menggunakan dialog Setting Me
     </message>
     <message>
         <source>Copy Virtual Hard Disk</source>
-        <translation type="unfinished"></translation>
+        <translation>Salin Hard Disk Virtual</translation>
     </message>
     <message>
         <source>Hard disk to copy</source>
-        <translation type="unfinished"></translation>
+        <translation>Hard disk yang akan disalin</translation>
     </message>
     <message>
         <source><p>Please select the virtual hard disk file that you would like to copy if it is not already selected. You can either choose one from the list or use the folder icon beside the list to select one.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Silakan pilih berkas hard disk virtual yang ingin Anda salin bila belum dipilih. Anda dapat memilih dari daftar atau memakai ikon folder di samping daftar untuk memilih salah satu.</p></translation>
     </message>
     <message>
         <source>Choose a virtual hard disk file to copy...</source>
-        <translation type="unfinished"></translation>
+        <translation>Pilih berkas hard disk virtual yang akan disalin...</translation>
     </message>
     <message>
         <source>Hard disk file type</source>
-        <translation type="unfinished"></translation>
+        <translation>Tipe berkas hard disk</translation>
     </message>
     <message>
         <source>Please choose the type of file that you would like to use for the new virtual hard disk. If you do not need to use it with other virtualization software you can leave this setting unchanged.</source>
-        <translation type="unfinished"></translation>
+        <translation>Silakan pilih tipe berkas yang ingin Anda pakai untuk hard disk virtual baru. Bila Anda tak perlu memakainya dengan perangkat lunak virtualisasi lain Anda dapat membiarkan pengaturan ini tak diubah.</translation>
     </message>
     <message>
         <source>Storage on physical hard disk</source>
-        <translation type="unfinished"></translation>
+        <translation>Penyimpanan pada hard disk fisik</translation>
     </message>
     <message>
         <source>Please choose whether the new virtual hard disk file should grow as it is used (dynamically allocated) or if it should be created at its maximum size (fixed size).</source>
-        <translation type="unfinished"></translation>
+        <translation>Silakan pilih apakah berkas hard disk virtual baru mesti tumbuh ketika dipakai (dialokasikan secara dinamik) atau mesti diciptakan pada ukuran maksimumnya (ukuran tetap).</translation>
     </message>
     <message>
         <source><p>A <b>dynamically allocated</b> hard disk file will only use space on your physical hard disk as it fills up (up to a maximum <b>fixed size</b>), although it will not shrink again automatically when space on it is freed.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Berkas hard disk virtual <b>yang dialokasikan secara dinamik</b> hanya akan memakai ruang pada hard disk fisik Anda ketika terisi (sampai dengan suatu <b>ukuran tetap</b> maksimum), walaupun mereka tak akan mengecil lagi secara otomatis ketika ruang di dalamnya dibebaskan.</p></translation>
     </message>
     <message>
         <source><p>A <b>fixed size</b> hard disk file may take longer to create on some systems but is often faster to use.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Berkas hard disk virtual <b>ukuran tetap</b> mungkin makan waktu lebih lama untuk diciptakan pada beberapa sistem tapi seringkali lebih cepat dipakainya.</p></translation>
     </message>
     <message>
         <source><p>You can also choose to <b>split</b> the hard disk file into several files of up to two gigabytes each. This is mainly useful if you wish to store the virtual machine on removable USB devices or old systems, some of which cannot handle very large files.</source>
-        <translation type="unfinished"></translation>
+        <translation><p>Anda juga dapat memilih untuk <b>memecah</b> disk virtual ke dalam beberapa berkas yang masing-masing berukuran sampai dengan dua giga byte. Ini terutama berguna bila Anda hendak menyimpan mesin virtual pada perangkat USB lepas pasang atau sistem lama, yang mungkin tak bisa menangani berkas sangat besar.</translation>
     </message>
     <message>
         <source>Please choose a location for new virtual hard disk file</source>
-        <translation type="unfinished"></translation>
+        <translation>Harap pilih lokasi untuk berkas hard disk virtual baru</translation>
     </message>
     <message>
         <source>New hard disk to create</source>
-        <translation type="unfinished"></translation>
+        <translation>Hard disk baru yang akan dibuat</translation>
     </message>
     <message>
         <source>Please type the name of the new virtual hard disk file into the box below or click on the folder icon to select a different folder to create the file in.</source>
-        <translation type="unfinished"></translation>
+        <translation>Silakan ketik nama berkas hard disk virtual baru ke kotak di bawah atau klik pada ikon folder untuk memilih folder lain tempat mencipta berkas.</translation>
     </message>
     <message>
         <source>Choose a location for new virtual hard disk file...</source>
-        <translation type="unfinished"></translation>
+        <translation>Pilih lokasi untuk berkas hard disk virtual baru...</translation>
     </message>
     <message>
         <source>Hard disk to &copy</source>
-        <translation type="unfinished"></translation>
+        <translation>Hard disk yang akan di&salin</translation>
     </message>
     <message>
         <source>&New hard disk to create</source>
-        <translation type="unfinished"></translation>
+        <translation>Hard disk baru yang aka&n dibuat</translation>
     </message>
     <message>
         <source>Hard disk file &type</source>
-        <translation type="unfinished"></translation>
+        <translation>&Tipe berkas hard disk</translation>
     </message>
 </context>
 <context>
     <name>UIWizardCloneVM</name>
     <message>
         <source>Linked Base for %1 and %2</source>
-        <translation>Basis Tertaut bagi %1 dan %2</translation>
+        <translation>Basis Tertaut untuk %1 dan %2</translation>
     </message>
     <message>
         <source>Clone Virtual Machine</source>
@@ -11836,7 +11836,7 @@ langkah ini dan memasang hard disk pada waktu lain menggunakan dialog Setting Me
     </message>
     <message>
         <source>&Full clone</source>
-        <translation>Klon penuh</translation>
+        <translation>Klon &penuh</translation>
     </message>
     <message>
         <source>&Linked clone</source>
@@ -11888,7 +11888,7 @@ langkah ini dan memasang hard disk pada waktu lain menggunakan dialog Setting Me
     </message>
     <message>
         <source><p>Please choose the type of clone you wish to create.</p><p>If you choose <b>Full clone</b>, an exact copy (including all virtual hard disk files) of the original virtual machine will be created.</p><p>If you choose <b>Linked clone</b>, a new machine will be created, but the virtual hard disk files will be tied to the virtual hard disk files of original machine and you will not be able to move the new virtual machine  [...]
-        <translation type="unfinished"></translation>
+        <translation><p>Harap pilih tipe klon yang hendak Anda buat.</p><p>Bila Anda memilih <b>Klon penuh</b>, suatu salinan eksak (termasuk semua berkas hard disk virtual) dari mesin virtual asli akan dibuat.</p><p>Bila Anda memilih <b>Klon tertaut</b>, suatu mesin baru akan dibuat, tapi berkas hard disk virtual akan terikat ke berkas hard disk virtual mesin yang asli, dan Anda tidak akan bisa memindah mesin virtual baru ke komputer [...]
     </message>
 </context>
 <context>
@@ -12151,31 +12151,31 @@ langkah ini dan memasang hard disk pada waktu lain menggunakan dialog Setting Me
     </message>
     <message>
         <source>Appliance is not signed</source>
-        <translation type="unfinished"></translation>
+        <translation>Appliance tidak ditandatangani</translation>
     </message>
     <message>
         <source>Appliance signed by %1 (trusted)</source>
-        <translation type="unfinished"></translation>
+        <translation>Appliance ditandatangani oleh %1 (terpercaya)</translation>
     </message>
     <message>
         <source>Appliance signed by %1 (expired!)</source>
-        <translation type="unfinished"></translation>
+        <translation>Appliance ditandatangani oleh %1 (kedaluarsa!)</translation>
     </message>
     <message>
         <source>Unverified signature by %1!</source>
-        <translation type="unfinished"></translation>
+        <translation>Tanda tangan tak terverifikasi oleh %1!</translation>
     </message>
     <message>
         <source>Self signed by %1 (trusted)</source>
-        <translation type="unfinished"></translation>
+        <translation>Tanda tangan sendiri oleh %1 (terpercaya)</translation>
     </message>
     <message>
         <source>Self signed by %1 (expired!)</source>
-        <translation type="unfinished"></translation>
+        <translation>Tanda tangan sendiri oleh %1 (kedaluarsa!)</translation>
     </message>
     <message>
         <source>Unverified self signed signature by %1!</source>
-        <translation type="unfinished"></translation>
+        <translation>Tanda tangan sendiri yang tak terverifikasi oleh %1!</translation>
     </message>
 </context>
 <context>
@@ -12262,51 +12262,51 @@ langkah ini dan memasang hard disk pada waktu lain menggunakan dialog Setting Me
     </message>
     <message>
         <source>Create Virtual Hard Disk</source>
-        <translation type="unfinished"></translation>
+        <translation>Buat Hard Disk Virtual</translation>
     </message>
     <message>
         <source>Hard disk file type</source>
-        <translation type="unfinished"></translation>
+        <translation>Tipe berkas hard disk</translation>
     </message>
     <message>
         <source>Please choose the type of file that you would like to use for the new virtual hard disk. If you do not need to use it with other virtualization software you can leave this setting unchanged.</source>
-        <translation type="unfinished"></translation>
+        <translation>Silakan pilih tipe berkas yang ingin Anda pakai untuk hard disk virtual baru. Bila Anda tak perlu memakainya dengan perangkat lunak virtualisasi lain Anda dapat membiarkan pengaturan ini tak diubah.</translation>
     </message>
     <message>
         <source>Storage on physical hard disk</source>
-        <translation type="unfinished"></translation>
+        <translation>Penyimpanan pada hard disk fisik</translation>
     </message>
     <message>
         <source>Please choose whether the new virtual hard disk file should grow as it is used (dynamically allocated) or if it should be created at its maximum size (fixed size).</source>
-        <translation type="unfinished"></translation>
+        <translation>Silakan pilih apakah berkas hard disk virtual baru mesti tumbuh ketika dipakai (dialokasikan secara dinamik) atau mesti diciptakan pada ukuran maksimumnya (ukuran tetap).</translation>
     </message>
     <message>
         <source><p>A <b>dynamically allocated</b> hard disk file will only use space on your physical hard disk as it fills up (up to a maximum <b>fixed size</b>), although it will not shrink again automatically when space on it is freed.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Berkas hard disk virtual <b>yang dialokasikan secara dinamik</b> hanya akan memakai ruang pada hard disk fisik Anda ketika terisi (sampai dengan suatu <b>ukuran tetap</b> maksimum), walaupun mereka tak akan mengecil lagi secara otomatis ketika ruang di dalamnya dibebaskan.</p></translation>
     </message>
     <message>
         <source><p>A <b>fixed size</b> hard disk file may take longer to create on some systems but is often faster to use.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Berkas hard disk virtual <b>ukuran tetap</b> mungkin makan waktu lebih lama untuk diciptakan pada beberapa sistem tapi seringkali lebih cepat dipakainya.</p></translation>
     </message>
     <message>
         <source><p>You can also choose to <b>split</b> the hard disk file into several files of up to two gigabytes each. This is mainly useful if you wish to store the virtual machine on removable USB devices or old systems, some of which cannot handle very large files.</source>
-        <translation type="unfinished"></translation>
+        <translation><p>Anda juga dapat memilih untuk <b>memecah</b> disk virtual ke dalam beberapa berkas yang masing-masing berukuran sampai dengan dua giga byte. Ini terutama berguna bila Anda hendak menyimpan mesin virtual pada perangkat USB lepas pasang atau sistem lama, yang mungkin tak bisa menangani berkas sangat besar.</translation>
     </message>
     <message>
         <source>Please type the name of the new virtual hard disk file into the box below or click on the folder icon to select a different folder to create the file in.</source>
-        <translation type="unfinished"></translation>
+        <translation>Silakan ketik nama berkas hard disk virtual baru ke kotak di bawah atau klik pada ikon folder untuk memilih folder lain tempat mencipta berkas.</translation>
     </message>
     <message>
         <source>Choose a location for new virtual hard disk file...</source>
-        <translation type="unfinished"></translation>
+        <translation>Pilih lokasi untuk berkas hard disk virtual baru...</translation>
     </message>
     <message>
         <source>Select the size of the virtual hard disk in megabytes. This size is the limit on the amount of file data that a virtual machine will be able to store on the hard disk.</source>
-        <translation type="unfinished"></translation>
+        <translation>Pilih ukuran image hard disk virtual dalam megabyte. Ukuran ini adalah batas banyaknya data berkas yang dapat disimpan oleh mesin virtual pada hard disk.</translation>
     </message>
     <message>
         <source>Hard disk file &type</source>
-        <translation type="unfinished"></translation>
+        <translation>&Tipe berkas hard disk</translation>
     </message>
 </context>
 <context>
@@ -12385,35 +12385,35 @@ langkah ini dan memasang hard disk pada waktu lain menggunakan dialog Setting Me
     </message>
     <message>
         <source>Hard disk</source>
-        <translation type="unfinished"></translation>
+        <translation>Hard disk</translation>
     </message>
     <message>
         <source><p>If you wish you can add a virtual hard disk to the new machine. You can either create a new hard disk file or select one from the list or from another location using the folder icon.</p><p>If you need a more complex storage set-up you can skip this step and make the changes to the machine settings once the machine is created.</p><p>The recommended size of the hard disk is <b>%1</b>.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Bila Anda mau Anda dapat menambahkan suatu hard disk virtual ke mesin baru. Anda dapat membuat suatu berkas hard disk baru atau memilih satu dari daftar atau dari lokasi lain memakai ikon folder.</p><p>Bila Anda perlu penyiapan penyimpanan yang lebih rumit Anda dapat melewati langkah ini dan membuat perubahan ke pengaturan mesin setelah mesin dibuat.</p><p>Ukuran hard disk yang disarankan adalah <b>%1</b>.</p></translation>
     </message>
     <message>
         <source>&Do not add a virtual hard disk</source>
-        <translation type="unfinished"></translation>
+        <translation>Jangan tambahkan hard &disk virtual</translation>
     </message>
     <message>
         <source>&Create a virtual hard disk now</source>
-        <translation type="unfinished"></translation>
+        <translation>&Buat hard disk virtual sekarang</translation>
     </message>
     <message>
         <source>&Use an existing virtual hard disk file</source>
-        <translation type="unfinished"></translation>
+        <translation>G&unakan berkas hard disk virtual yang ada</translation>
     </message>
     <message>
         <source>Choose a virtual hard disk file...</source>
-        <translation type="unfinished"></translation>
+        <translation>Pilih berkas hard disk virtual...</translation>
     </message>
     <message>
         <source><p><nobr>Holds the name or full path to the virtual machine folder you are about to create.</nobr></p></source>
-        <translation type="unfinished"></translation>
+        <translation><p><nobr>Menyimpan nama atau path lengkap ke folder mesin virtual yang akan Anda buat.</nobr></p></translation>
     </message>
     <message>
         <source><p><nobr>You are about to create the virtual machine in the following folder:</nobr><br><nobr><b>%1</b></nobr></p></source>
-        <translation type="unfinished"></translation>
+        <translation><p><nobr>Anda akan membuat mesin virtual dalam folder berikut:</nobr><br><nobr><b>%1</b></nobr></p></translation>
     </message>
 </context>
 <context>
@@ -15185,253 +15185,253 @@ Versi %1</translation>
     <message>
         <source>USB</source>
         <comment>StorageControllerType</comment>
-        <translation type="unfinished">USB</translation>
+        <translation>USB</translation>
     </message>
     <message>
         <source>off</source>
         <comment>guest monitor status</comment>
-        <translation type="unfinished"></translation>
+        <translation>mati</translation>
     </message>
     <message>
         <source>Active</source>
         <comment>details report (VT-x/AMD-V)</comment>
-        <translation type="unfinished">Aktif</translation>
+        <translation>Aktif</translation>
     </message>
     <message>
         <source>Inactive</source>
         <comment>details report (VT-x/AMD-V)</comment>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <source>Active</source>
         <comment>details report (Nested Paging)</comment>
-        <translation type="unfinished">Aktif</translation>
+        <translation>Aktif</translation>
     </message>
     <message>
         <source>Inactive</source>
         <comment>details report (Nested Paging)</comment>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <source>Active</source>
         <comment>details report (Unrestricted Execution)</comment>
-        <translation type="unfinished">Aktif</translation>
+        <translation>Aktif</translation>
     </message>
     <message>
         <source>Inactive</source>
         <comment>details report (Unrestricted Execution)</comment>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <source>Paravirtualization Interface</source>
         <comment>details report</comment>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <source>Taking Snapshot</source>
         <comment>MachineState</comment>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <source>Taking Online Snapshot</source>
         <comment>MachineState</comment>
-        <translation type="unfinished"></translation>
+        <translation></translation>
     </message>
     <message>
         <source>None</source>
         <comment>ParavirtProvider</comment>
-        <translation type="unfinished">Tidak Ada</translation>
+        <translation>Tidak Ada</translation>
     </message>
     <message>
         <source>Default</source>
         <comment>ParavirtProvider</comment>
-        <translation type="unfinished"></translation>
+        <translation>Baku</translation>
     </message>
     <message>
         <source>Legacy</source>
         <comment>ParavirtProvider</comment>
-        <translation type="unfinished"></translation>
+        <translation>Warisan</translation>
     </message>
     <message>
         <source>Minimal</source>
         <comment>ParavirtProvider</comment>
-        <translation type="unfinished"></translation>
+        <translation>Minimal</translation>
     </message>
     <message>
         <source>Hyper-V</source>
         <comment>ParavirtProvider</comment>
-        <translation type="unfinished"></translation>
+        <translation>Hyper-V</translation>
     </message>
     <message>
         <source>KVM</source>
         <comment>ParavirtProvider</comment>
-        <translation type="unfinished"></translation>
+        <translation>KVM</translation>
     </message>
     <message>
         <source>Optical</source>
         <comment>DeviceType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Optik</translation>
     </message>
     <message>
         <source>New dynamically allocated storage</source>
         <comment>MediumVariant</comment>
-        <translation type="unfinished"></translation>
+        <translation>Penyimpanan yang dialokasikan secara dinamis</translation>
     </message>
     <message>
         <source>TCP</source>
         <comment>PortMode</comment>
-        <translation type="unfinished">TCP</translation>
+        <translation>TCP</translation>
     </message>
     <message>
         <source>OHCI</source>
         <comment>USBControllerType</comment>
-        <translation type="unfinished"></translation>
+        <translation>OHCI</translation>
     </message>
     <message>
         <source>EHCI</source>
         <comment>USBControllerType</comment>
-        <translation type="unfinished"></translation>
+        <translation>EHCI</translation>
     </message>
     <message>
         <source>xHCI</source>
         <comment>USBControllerType</comment>
-        <translation type="unfinished"></translation>
+        <translation>xHCI</translation>
     </message>
     <message>
         <source>USB Port %1</source>
         <comment>StorageSlot</comment>
-        <translation type="unfinished"></translation>
+        <translation>USB Port %1</translation>
     </message>
     <message>
         <source>User interface</source>
         <comment>DetailsElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Antarmuka pengguna</translation>
     </message>
     <message>
         <source>(Optical Drive)</source>
-        <translation type="unfinished"></translation>
+        <translation>(Drive Optik)</translation>
     </message>
     <message>
         <source>Please choose a virtual hard disk file</source>
-        <translation type="unfinished"></translation>
+        <translation>Harap pilih berkas hard disk virtual</translation>
     </message>
     <message>
         <source>All virtual hard disk files (%1)</source>
-        <translation type="unfinished"></translation>
+        <translation>Semua berkas hard disk virtual (%1)</translation>
     </message>
     <message>
         <source>Encrypted</source>
         <comment>medium</comment>
-        <translation type="unfinished"></translation>
+        <translation>Terenkripsi</translation>
     </message>
     <message>
         <source>Some of the files in this hard disk chain are inaccessible. Please use the Virtual Medium Manager to inspect these files.</source>
         <comment>medium</comment>
-        <translation type="unfinished"></translation>
+        <translation>Beberapa berkas dalam rangkaian hard disk ini tak dapat diakses. Silakan pakai Manajer Media Virtual untuk memeriksa berkas-berkas ini.</translation>
     </message>
     <message>
         <source>Please choose a location for new virtual hard disk file</source>
-        <translation type="unfinished"></translation>
+        <translation>Harap pilih lokasi untuk berkas hard disk virtual baru</translation>
     </message>
     <message>
         <source>USB</source>
         <comment>StorageBus</comment>
-        <translation type="unfinished">USB</translation>
+        <translation>USB</translation>
     </message>
     <message>
         <source>PCIe</source>
         <comment>StorageBus</comment>
-        <translation type="unfinished"></translation>
+        <translation>PCIe</translation>
     </message>
     <message>
         <source>NVMe</source>
         <comment>StorageControllerType</comment>
-        <translation type="unfinished"></translation>
+        <translation>NVMe</translation>
     </message>
     <message>
         <source>NVMe Port %1</source>
         <comment>StorageSlot</comment>
-        <translation type="unfinished"></translation>
+        <translation>NVMe Port %1</translation>
     </message>
     <message>
         <source>General</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Umum</translation>
     </message>
     <message>
         <source>Preview</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Pratinjau</translation>
+        <translation>Pratinjau</translation>
     </message>
     <message>
         <source>System</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Sistem</translation>
+        <translation>Sistem</translation>
     </message>
     <message>
         <source>Display</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Tampilan</translation>
+        <translation>Tampilan</translation>
     </message>
     <message>
         <source>Storage</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Penyimpanan</translation>
+        <translation>Penyimpanan</translation>
     </message>
     <message>
         <source>Audio</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Suara</translation>
+        <translation>Suara</translation>
     </message>
     <message>
         <source>Network</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Jaringan</translation>
+        <translation>Jaringan</translation>
     </message>
     <message>
         <source>Serial ports</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Port serial</translation>
+        <translation>Port serial</translation>
     </message>
     <message>
         <source>Parallel ports</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Port paralel</translation>
+        <translation>Port paralel</translation>
     </message>
     <message>
         <source>USB</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">USB</translation>
+        <translation>USB</translation>
     </message>
     <message>
         <source>Shared folders</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Folder bersama</translation>
+        <translation>Folder bersama</translation>
     </message>
     <message>
         <source>User interface</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Antarmuka pengguna</translation>
     </message>
     <message>
         <source>Description</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Deskripsi</translation>
+        <translation>Deskripsi</translation>
     </message>
     <message>
         <source>Runtime attributes</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Atribut runtime</translation>
     </message>
     <message>
         <source>Storage statistics</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Statistik penyimpanan</translation>
     </message>
     <message>
         <source>Network statistics</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Statistik jaringan</translation>
     </message>
 </context>
 <context>
@@ -16286,15 +16286,15 @@ ke nilai awal bahasa sistem.</qt>
     </message>
     <message>
         <source><i>Not&nbsp;Encrypted</i></source>
-        <translation type="unfinished"></translation>
+        <translation><i>Tidak&nbsp;Terenkripsi</i></translation>
     </message>
     <message>
         <source>Encrypted with key:</source>
-        <translation type="unfinished"></translation>
+        <translation>Terenkripsi dengan kunci:</translation>
     </message>
     <message>
         <source>UUID:</source>
-        <translation type="unfinished"></translation>
+        <translation>UUID:</translation>
     </message>
 </context>
 <context>
@@ -17223,19 +17223,19 @@ untuk mengaksesnya dari sebuah SIstem Operasi Linux. Fitur ini membutuhkan Guest
     </message>
     <message>
         <source>Restore selected snapshot of the virtual machine</source>
-        <translation type="unfinished"></translation>
+        <translation>Pulihkan snapshot yang dipilih dari mesin virtual</translation>
     </message>
     <message>
         <source>Delete selected snapshot of the virtual machine</source>
-        <translation type="unfinished"></translation>
+        <translation>Hapus snapshot yang dipilih dari mesin virtual</translation>
     </message>
     <message>
         <source>Display a window with selected snapshot details</source>
-        <translation type="unfinished"></translation>
+        <translation>Tampilkan jendela dengan rincian dari snapshot yang dipilih</translation>
     </message>
     <message>
         <source>Clone selected virtual machine</source>
-        <translation type="unfinished"></translation>
+        <translation>Buat klon dari mesin virtual yang dipilih</translation>
     </message>
 </context>
 <context>
@@ -17291,7 +17291,7 @@ untuk mengaksesnya dari sebuah SIstem Operasi Linux. Fitur ini membutuhkan Guest
     </message>
     <message>
         <source>Snapshot %1</source>
-        <translation type="unfinished">Snapshot %1</translation>
+        <translation>Snapshot %1</translation>
     </message>
 </context>
 <context>
diff --git a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_it.ts b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_it.ts
index f6939f0..c3d29f7 100644
--- a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_it.ts
+++ b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_it.ts
@@ -1963,52 +1963,52 @@
     <message>
         <source><tr><td>%1:</td><td>%2</td></tr></source>
         <comment>key: value</comment>
-        <translation type="unfinished"></translation>
+        <translation><tr><td>%1:</td><td>%2</td></tr></translation>
     </message>
     <message>
         <source>Issuer</source>
-        <translation type="unfinished"></translation>
+        <translation>Emittente</translation>
     </message>
     <message>
         <source>Subject</source>
-        <translation type="unfinished"></translation>
+        <translation>Oggetto</translation>
     </message>
     <message>
         <source>Not Valid Before</source>
-        <translation type="unfinished"></translation>
+        <translation>Non valido prima</translation>
     </message>
     <message>
         <source>Not Valid After</source>
-        <translation type="unfinished"></translation>
+        <translation>Non valido dopo</translation>
     </message>
     <message>
         <source>Serial Number</source>
-        <translation type="unfinished"></translation>
+        <translation>Numero di serie</translation>
     </message>
     <message>
         <source>Self-Signed</source>
-        <translation type="unfinished"></translation>
+        <translation>Auto-firmato</translation>
     </message>
     <message>
         <source>Authority (CA)</source>
-        <translation type="unfinished"></translation>
+        <translation>Autorità (CA)</translation>
     </message>
     <message>
         <source>Public Algorithm</source>
-        <translation type="unfinished"></translation>
+        <translation>Algoritmo pubblico</translation>
     </message>
     <message>
         <source>%1 (%2)</source>
         <comment>value (clarification)</comment>
-        <translation type="unfinished"></translation>
+        <translation>%1 - %2</translation>
     </message>
     <message>
         <source>Signature Algorithm</source>
-        <translation type="unfinished"></translation>
+        <translation>Algoritmo di firma</translation>
     </message>
     <message>
         <source>X.509 Version Number</source>
-        <translation type="unfinished"></translation>
+        <translation>Numero versione X.509</translation>
     </message>
 </context>
 <context>
@@ -17873,82 +17873,82 @@ Versione %1</translation>
     <message>
         <source>General</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Generale</translation>
+        <translation>Generale</translation>
     </message>
     <message>
         <source>Preview</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Anteprima</translation>
+        <translation>Anteprima</translation>
     </message>
     <message>
         <source>System</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Sistema</translation>
+        <translation>Sistema</translation>
     </message>
     <message>
         <source>Display</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Schermo</translation>
+        <translation>Schermo</translation>
     </message>
     <message>
         <source>Storage</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Archiviazione</translation>
+        <translation>Archiviazione</translation>
     </message>
     <message>
         <source>Audio</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Audio</translation>
+        <translation>Audio</translation>
     </message>
     <message>
         <source>Network</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Rete</translation>
+        <translation>Rete</translation>
     </message>
     <message>
         <source>Serial ports</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Porte seriali</translation>
+        <translation>Porte seriali</translation>
     </message>
     <message>
         <source>Parallel ports</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Porte parallele</translation>
+        <translation>Porte parallele</translation>
     </message>
     <message>
         <source>USB</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">USB</translation>
+        <translation>USB</translation>
     </message>
     <message>
         <source>Shared folders</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Cartelle condivise</translation>
+        <translation>Cartelle condivise</translation>
     </message>
     <message>
         <source>User interface</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Interfaccia utente</translation>
+        <translation>Interfaccia utente</translation>
     </message>
     <message>
         <source>Description</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Descrizione</translation>
+        <translation>Descrizione</translation>
     </message>
     <message>
         <source>Runtime attributes</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Attributi di esecuzione</translation>
     </message>
     <message>
         <source>Storage statistics</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Statistiche di archiviazione</translation>
     </message>
     <message>
         <source>Network statistics</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Statistiche di rete</translation>
     </message>
 </context>
 <context>
diff --git a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_ja.ts b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_ja.ts
index caf1744..614bb18 100644
--- a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_ja.ts
+++ b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_ja.ts
@@ -157,22 +157,22 @@
     </message>
     <message>
         <source>The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing<br/><br/>  <font color=blue>'/sbin/vboxconfig'</font><br/><br/>as root.</source>
-        <translation type="unfinished"></translation>
+        <translation>VirtualBox Linux カーネルドライバー (vboxdrv) は読み込まれていないか、 /dev/vboxdrv のパーミッションに関する問題があります。 <br/><br/>  <font color=blue>'/sbin/vboxconfig'</font><br/><br/> をroot権限で実行し、カーネルモジュールを再インストールしてください。</translation>
     </message>
     <message>
         <source>The VirtualBox kernel modules do not match this version of VirtualBox. The installation of VirtualBox was apparently not successful. Executing<br/><br/>  <font color=blue>'/sbin/vboxconfig'</font><br/><br/>may correct this. Make sure that you do not mix the OSE version and the PUEL version of VirtualBox.</source>
-        <translation type="unfinished"></translation>
+        <translation>VirtualBox の現在のカーネルモジュールがこのバージョンの VirtualBox と適合していません。VirtualBoxのインストールに失敗しています。 <br/><br/>  <font color=blue>'/sbin/vboxconfig'</font><br/><br/> を実行すれば修正できるでしょう。OSE バージョンと PUEL バージョンのVirtualBoxを同じ環境にインストールしないでください。</translation>
     </message>
 </context>
 <context>
     <name>QIArrowButtonPress</name>
     <message>
         <source>&Back</source>
-        <translation type="unfinished">戻る(&B)</translation>
+        <translation>戻る(&B)</translation>
     </message>
     <message>
         <source>&Next</source>
-        <translation type="unfinished">次へ(&N)</translation>
+        <translation>次へ(&N)</translation>
     </message>
 </context>
 <context>
@@ -187,11 +187,11 @@
     </message>
     <message>
         <source>&Details</source>
-        <translation type="unfinished">詳細(&D)</translation>
+        <translation>詳細(&D)</translation>
     </message>
     <message>
         <source>&Details (%1 of %2)</source>
-        <translation type="unfinished">詳細(%2の%1)(&D)</translation>
+        <translation>詳細(%2の%1)(&D)</translation>
     </message>
 </context>
 <context>
@@ -1546,39 +1546,39 @@
     </message>
     <message>
         <source>&VirtualBox Bug Tracker...</source>
-        <translation type="unfinished"></translation>
+        <translation>&VirtualBox バグトラッカー...</translation>
     </message>
     <message>
         <source>Open the browser and go to the VirtualBox product bug tracker</source>
-        <translation type="unfinished"></translation>
+        <translation>WebブラウザーでVirtualBoxのバグトラッカーを開く</translation>
     </message>
     <message>
         <source>&VirtualBox Forums...</source>
-        <translation type="unfinished"></translation>
+        <translation>&VirtualBox フォーラム...</translation>
     </message>
     <message>
         <source>Open the browser and go to the VirtualBox product forums</source>
-        <translation type="unfinished"></translation>
+        <translation>WebブラウザーでVirtualBox製品のフォーラムを開く</translation>
     </message>
     <message>
         <source>&Oracle Web Site...</source>
-        <translation type="unfinished"></translation>
+        <translation>&Oracle Webサイト...</translation>
     </message>
     <message>
         <source>Open the browser and go to the Oracle web site</source>
-        <translation type="unfinished"></translation>
+        <translation>WebブラウザーでOracleのWebサイトを開く</translation>
     </message>
     <message>
         <source>&Detach GUI</source>
-        <translation type="unfinished"></translation>
+        <translation>GUIをデタッチ(&D)</translation>
     </message>
     <message>
         <source>Detach the GUI from headless VM</source>
-        <translation type="unfinished"></translation>
+        <translation>GUIをヘッドレスVMからデタッチします</translation>
     </message>
     <message>
         <source>Disable Dock Icon Overlay</source>
-        <translation type="unfinished"></translation>
+        <translation>ドックアイコンのオーバーレイを無効にする</translation>
     </message>
 </context>
 <context>
@@ -1802,73 +1802,73 @@
     <name>UIApplianceUnverifiedCertificateViewer</name>
     <message>
         <source>Unverifiable Certificate! Continue?</source>
-        <translation type="unfinished"></translation>
+        <translation>検証できない証明書です。継続しますか?</translation>
     </message>
     <message>
         <source><b>The appliance is signed by an unverified self signed certificate issued by '%1'. We recommend to only proceed with the importing if you are sure you should trust this entity.</b></source>
-        <translation type="unfinished"></translation>
+        <translation><b>この仮想アプライアンスは検証できない '%1' によって自己署名された証明書が使われています。完全に信用できる場合のみインポートを継続することをオススメします。</b></translation>
     </message>
     <message>
         <source><b>The appliance is signed by an unverified certificate issued to '%1'. We recommend to only proceed with the importing if you are sure you should trust this entity.</b></source>
-        <translation type="unfinished"></translation>
+        <translation><b>この仮想アプライアンスは検証できない '%1' によって署名された証明書が使われています。完全に信用できる場合のみインポートを継続することをオススメします。</b></translation>
     </message>
     <message>
         <source>True</source>
-        <translation type="unfinished"></translation>
+        <translation>あり</translation>
     </message>
     <message>
         <source>False</source>
-        <translation type="unfinished"></translation>
+        <translation>なし</translation>
     </message>
     <message>
         <source><tr><td>%1:</td><td>%2</td></tr></source>
         <comment>key: value</comment>
-        <translation type="unfinished"></translation>
+        <translation><tr><td>%1:</td><td>%2</td></tr></translation>
     </message>
     <message>
         <source>Issuer</source>
-        <translation type="unfinished"></translation>
+        <translation>発行者</translation>
     </message>
     <message>
         <source>Subject</source>
-        <translation type="unfinished"></translation>
+        <translation>発行先</translation>
     </message>
     <message>
         <source>Not Valid Before</source>
-        <translation type="unfinished"></translation>
+        <translation>発行日</translation>
     </message>
     <message>
         <source>Not Valid After</source>
-        <translation type="unfinished"></translation>
+        <translation>失効日</translation>
     </message>
     <message>
         <source>Serial Number</source>
-        <translation type="unfinished"></translation>
+        <translation>証明書</translation>
     </message>
     <message>
         <source>Self-Signed</source>
-        <translation type="unfinished"></translation>
+        <translation>自己署名</translation>
     </message>
     <message>
         <source>Authority (CA)</source>
-        <translation type="unfinished"></translation>
+        <translation>認証局 (CA)</translation>
     </message>
     <message>
         <source>Public Algorithm</source>
-        <translation type="unfinished"></translation>
+        <translation>公開鍵暗号方式</translation>
     </message>
     <message>
         <source>%1 (%2)</source>
         <comment>value (clarification)</comment>
-        <translation type="unfinished"></translation>
+        <translation>%1 (%2)</translation>
     </message>
     <message>
         <source>Signature Algorithm</source>
-        <translation type="unfinished"></translation>
+        <translation>署名アルゴリズム</translation>
     </message>
     <message>
         <source>X.509 Version Number</source>
-        <translation type="unfinished"></translation>
+        <translation>X.509 バージョン番号</translation>
     </message>
 </context>
 <context>
@@ -2519,7 +2519,7 @@
     <name>UIEmptyFilePathSelector</name>
     <message>
         <source>Choose...</source>
-        <translation type="unfinished">選択...</translation>
+        <translation>選択...</translation>
     </message>
 </context>
 <context>
@@ -2884,55 +2884,55 @@ p, li { white-space: pre-wrap; }
     <name>UIFilePathSelector</name>
     <message>
         <source>&Copy</source>
-        <translation type="unfinished">コピー(&C)</translation>
+        <translation>コピー(&C)</translation>
     </message>
     <message>
         <source>Other...</source>
-        <translation type="unfinished">その他...</translation>
+        <translation>その他...</translation>
     </message>
     <message>
         <source>Reset</source>
-        <translation type="unfinished">リセット</translation>
+        <translation>リセット</translation>
     </message>
     <message>
         <source>Displays a window to select a different folder.</source>
-        <translation type="unfinished">他のフォルダーを選択するウィンドウを表示します。</translation>
+        <translation>他のフォルダーを選択するウィンドウを表示します。</translation>
     </message>
     <message>
         <source>Resets the folder path to the default value.</source>
-        <translation type="unfinished">フォルダーパスの値をデフォルトに戻します。</translation>
+        <translation>フォルダーパスの値をデフォルトに戻します。</translation>
     </message>
     <message>
         <source>Displays a window to select a different file.</source>
-        <translation type="unfinished">他のファイルを選択するウィンドウを表示します。</translation>
+        <translation>他のファイルを選択するウィンドウを表示します。</translation>
     </message>
     <message>
         <source>Resets the file path to the default value.</source>
-        <translation type="unfinished">ファイルパスの値をデフォルトに戻します。</translation>
+        <translation>ファイルパスの値をデフォルトに戻します。</translation>
     </message>
     <message>
         <source><reset to default></source>
-        <translation type="unfinished"><デフォルトに戻す></translation>
+        <translation><デフォルトに戻す></translation>
     </message>
     <message>
         <source>The actual default path value will be displayed after accepting the changes and opening this window again.</source>
-        <translation type="unfinished">変更後、再度このウィンドウを開くとデフォルトパスが表示されます。</translation>
+        <translation>変更後、再度このウィンドウを開くとデフォルトパスが表示されます。</translation>
     </message>
     <message>
         <source><not selected></source>
-        <translation type="unfinished"><選択されていません></translation>
+        <translation><選択されていません></translation>
     </message>
     <message>
         <source>Please use the <b>Other...</b> item from the drop-down list to select a path.</source>
-        <translation type="unfinished">ドロップダウンリストから<b>[その他...]</b>を実行して、使用するパスを選択してください。</translation>
+        <translation>ドロップダウンリストから<b>[その他...]</b>を実行して、使用するパスを選択してください。</translation>
     </message>
     <message>
         <source>Holds the folder path.</source>
-        <translation type="unfinished">フォルダーのパスを指定します。</translation>
+        <translation>フォルダーのパスを指定します。</translation>
     </message>
     <message>
         <source>Holds the file path.</source>
-        <translation type="unfinished">ファイルのパスを指定します。</translation>
+        <translation>ファイルのパスを指定します。</translation>
     </message>
 </context>
 <context>
@@ -4521,7 +4521,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Host interface <b>%1</b> does not currently have a valid IPv6 network mask prefix length.</source>
-        <translation type="unfinished"></translation>
+        <translation>ホストインターフェース <b>%1</b> は正しいIPv6ネットワークマスクプレフィックス長ではありません。</translation>
     </message>
 </context>
 <context>
@@ -4892,27 +4892,27 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>When chosen, VirtualBox will try to auto-detect host proxy settings for tasks like downloading Guest Additions from the network or checking for updates.</source>
-        <translation type="unfinished"></translation>
+        <translation>VirtualBoxがネットワーク経由でのGuest Additionsのダウンロードやアップデートの確認にホストのプロキシー設定を自動的に検出するようになります。</translation>
     </message>
     <message>
         <source>&Auto-detect Host Proxy Settings</source>
-        <translation type="unfinished"></translation>
+        <translation>ホストのプロキシー設定を自動検出(&A)</translation>
     </message>
     <message>
         <source>When chosen, VirtualBox will use direct Internet connection for tasks like downloading Guest Additions from the network or checking for updates.</source>
-        <translation type="unfinished"></translation>
+        <translation>VirtualBoxはGuest Additionsのネットワークからのダウンロードやアップデートの確認に直接インターネットに接続します。</translation>
     </message>
     <message>
         <source>&Direct Connection to the Internet</source>
-        <translation type="unfinished"></translation>
+        <translation>インターネットに直接接続(&D)</translation>
     </message>
     <message>
         <source>When chosen, VirtualBox will use the proxy settings supplied for tasks like downloading Guest Additions from the network or checking for updates.</source>
-        <translation type="unfinished"></translation>
+        <translation>VirtualBoxはGuest Additionsのネットワークからのダウンロードやアップデートの確認にプロキシー設定を使用します。</translation>
     </message>
     <message>
         <source>&Manual Proxy Configuration</source>
-        <translation type="unfinished"></translation>
+        <translation>手動プロキシー設定(&M)</translation>
     </message>
 </context>
 <context>
@@ -5524,12 +5524,12 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Host Driver</source>
         <comment>details report (audio)</comment>
-        <translation type="unfinished">ホストドライバー</translation>
+        <translation>ホストドライバー</translation>
     </message>
     <message>
         <source>Controller</source>
         <comment>details report (audio)</comment>
-        <translation type="unfinished">コントローラー</translation>
+        <translation>コントローラー</translation>
     </message>
 </context>
 <context>
@@ -5542,57 +5542,57 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Video Memory</source>
         <comment>details report</comment>
-        <translation type="unfinished">ビデオメモリー</translation>
+        <translation>ビデオメモリー</translation>
     </message>
     <message>
         <source>Screens</source>
         <comment>details report</comment>
-        <translation type="unfinished">スクリーン</translation>
+        <translation>スクリーン</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details report (3D Acceleration)</comment>
-        <translation type="unfinished">有効</translation>
+        <translation>有効</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (3D Acceleration)</comment>
-        <translation type="unfinished">無効</translation>
+        <translation>無効</translation>
     </message>
     <message>
         <source>3D Acceleration</source>
         <comment>details report</comment>
-        <translation type="unfinished">3D アクセラレーション</translation>
+        <translation>3D アクセラレーション</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details report (2D Video Acceleration)</comment>
-        <translation type="unfinished">有効</translation>
+        <translation>有効</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (2D Video Acceleration)</comment>
-        <translation type="unfinished">無効</translation>
+        <translation>無効</translation>
     </message>
     <message>
         <source>2D Video Acceleration</source>
         <comment>details report</comment>
-        <translation type="unfinished">2D ビデオアクセラレーション</translation>
+        <translation>2D ビデオアクセラレーション</translation>
     </message>
     <message>
         <source>Remote Desktop Server Port</source>
         <comment>details report (VRDE Server)</comment>
-        <translation type="unfinished">リモートデスクトップサーバーポート</translation>
+        <translation>リモートデスクトップサーバーポート</translation>
     </message>
     <message>
         <source>Remote Desktop Server</source>
         <comment>details report (VRDE Server)</comment>
-        <translation type="unfinished">リモートデスクトップサーバー</translation>
+        <translation>リモートデスクトップサーバー</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (VRDE Server)</comment>
-        <translation type="unfinished">無効</translation>
+        <translation>無効</translation>
     </message>
 </context>
 <context>
@@ -5605,12 +5605,12 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Name</source>
         <comment>details report</comment>
-        <translation type="unfinished">名前</translation>
+        <translation>名前</translation>
     </message>
     <message>
         <source>OS Type</source>
         <comment>details report</comment>
-        <translation type="unfinished">OSタイプ</translation>
+        <translation>OSタイプ</translation>
     </message>
 </context>
 <context>
@@ -5622,43 +5622,43 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Bridged adapter, %1</source>
         <comment>details report (network)</comment>
-        <translation type="unfinished">ブリッジアダプター, '%1'</translation>
+        <translation>ブリッジアダプター, '%1'</translation>
     </message>
     <message>
         <source>Internal network, '%1'</source>
         <comment>details report (network)</comment>
-        <translation type="unfinished">内部ネットワーク, '%1'</translation>
+        <translation>内部ネットワーク, '%1'</translation>
     </message>
     <message>
         <source>Host-only adapter, '%1'</source>
         <comment>details report (network)</comment>
-        <translation type="unfinished">ホストオンリーアダプター, '%1'</translation>
+        <translation>ホストオンリーアダプター, '%1'</translation>
     </message>
     <message>
         <source>Generic, '%1'</source>
         <comment>details report (network)</comment>
-        <translation type="unfinished">一般, '%1'</translation>
+        <translation>一般, '%1'</translation>
     </message>
     <message>
         <source>NAT network, '%1'</source>
         <comment>details report (network)</comment>
-        <translation type="unfinished">NATネットワーク, '%1'</translation>
+        <translation>NATネットワーク, '%1'</translation>
     </message>
     <message>
         <source>Adapter %1</source>
         <comment>details report (network)</comment>
-        <translation type="unfinished">アダプター %1</translation>
+        <translation>アダプター %1</translation>
     </message>
 </context>
 <context>
     <name>UIInformationDataNetworkStatistics</name>
     <message>
         <source>Data Transmitted</source>
-        <translation type="unfinished">データ送信</translation>
+        <translation>データ送信</translation>
     </message>
     <message>
         <source>Data Received</source>
-        <translation type="unfinished">データ受信</translation>
+        <translation>データ受信</translation>
     </message>
     <message>
         <source>Network Statistics</source>
@@ -5676,12 +5676,12 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Port %1</source>
         <comment>details report (parallel ports)</comment>
-        <translation type="unfinished">ポート %1</translation>
+        <translation>ポート %1</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (parallel ports)</comment>
-        <translation type="unfinished">無効</translation>
+        <translation>無効</translation>
     </message>
 </context>
 <context>
@@ -5694,67 +5694,67 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Not Detected</source>
         <comment>guest additions</comment>
-        <translation type="unfinished">未検出</translation>
+        <translation>未検出</translation>
     </message>
     <message>
         <source>Not Detected</source>
         <comment>guest os type</comment>
-        <translation type="unfinished">未検出</translation>
+        <translation>未検出</translation>
     </message>
     <message>
         <source>Not Available</source>
         <comment>details report (VRDE server port)</comment>
-        <translation type="unfinished">利用不可</translation>
+        <translation>利用不可</translation>
     </message>
     <message>
         <source>Screen Resolution</source>
-        <translation type="unfinished">画面解像度</translation>
+        <translation>画面解像度</translation>
     </message>
     <message>
         <source>VM Uptime</source>
-        <translation type="unfinished">VM アップデート</translation>
+        <translation>VM 起動時間</translation>
     </message>
     <message>
         <source>Clipboard Mode</source>
-        <translation type="unfinished">クリップボードモード</translation>
+        <translation>クリップボードモード</translation>
     </message>
     <message>
         <source>Drag and Drop Mode</source>
-        <translation type="unfinished">ドラッグ&ドロップモード</translation>
+        <translation>ドラッグ&ドロップモード</translation>
     </message>
     <message>
         <source>VT-x/AMD-V</source>
         <comment>details report</comment>
-        <translation type="unfinished">VT-x/AMD-V</translation>
+        <translation>VT-x/AMD-V</translation>
     </message>
     <message>
         <source>Nested Paging</source>
         <comment>details report</comment>
-        <translation type="unfinished">ネステッドページング</translation>
+        <translation>ネステッドページング</translation>
     </message>
     <message>
         <source>Unrestricted Execution</source>
         <comment>details report</comment>
-        <translation type="unfinished">Unrestricted Execution</translation>
+        <translation>Unrestricted Execution</translation>
     </message>
     <message>
         <source>Paravirtualization Interface</source>
         <comment>details report</comment>
-        <translation type="unfinished">準仮想化インターフェース</translation>
+        <translation>準仮想化インターフェース</translation>
     </message>
     <message>
         <source>Guest Additions</source>
-        <translation type="unfinished">Guest Additions</translation>
+        <translation>Guest Additions</translation>
     </message>
     <message>
         <source>Guest OS Type</source>
         <comment>details report</comment>
-        <translation type="unfinished">ゲストOSのタイプ</translation>
+        <translation>ゲストOSのタイプ</translation>
     </message>
     <message>
         <source>Remote Desktop Server Port</source>
         <comment>details report (VRDE Server)</comment>
-        <translation type="unfinished">リモートデスクトップサーバーポート</translation>
+        <translation>リモートデスクトップサーバーポート</translation>
     </message>
 </context>
 <context>
@@ -5766,7 +5766,7 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Port %1</source>
         <comment>details report (serial ports)</comment>
-        <translation type="unfinished">ポート %1</translation>
+        <translation>ポート %1</translation>
     </message>
 </context>
 <context>
@@ -5779,7 +5779,7 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Shared Folders</source>
         <comment>details report (shared folders)</comment>
-        <translation type="unfinished">共有フォルダー</translation>
+        <translation>共有フォルダー</translation>
     </message>
 </context>
 <context>
@@ -5790,26 +5790,26 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>(Optical Drive)</source>
-        <translation type="unfinished">(光学ドライブ)</translation>
+        <translation>(光学ドライブ)</translation>
     </message>
 </context>
 <context>
     <name>UIInformationDataStorageStatistics</name>
     <message>
         <source>DMA Transfers</source>
-        <translation type="unfinished">DMA 転送</translation>
+        <translation>DMA 転送</translation>
     </message>
     <message>
         <source>PIO Transfers</source>
-        <translation type="unfinished">PIO 転送</translation>
+        <translation>PIO 転送</translation>
     </message>
     <message>
         <source>Data Read</source>
-        <translation type="unfinished">データ読み込み</translation>
+        <translation>データ読み込み</translation>
     </message>
     <message>
         <source>Data Written</source>
-        <translation type="unfinished">データ書き込み</translation>
+        <translation>データ書き込み</translation>
     </message>
     <message>
         <source>Storage Statistics</source>
@@ -5827,102 +5827,102 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Enabled</source>
         <comment>details report (ACPI)</comment>
-        <translation type="unfinished">有効</translation>
+        <translation>有効</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (ACPI)</comment>
-        <translation type="unfinished">無効</translation>
+        <translation>無効</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details report (I/O APIC)</comment>
-        <translation type="unfinished">有効</translation>
+        <translation>有効</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (I/O APIC)</comment>
-        <translation type="unfinished">無効</translation>
+        <translation>無効</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details report (PAE/NX)</comment>
-        <translation type="unfinished">有効</translation>
+        <translation>有効</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (PAE/NX)</comment>
-        <translation type="unfinished">無効</translation>
+        <translation>無効</translation>
     </message>
     <message>
         <source>Base Memory</source>
         <comment>details report</comment>
-        <translation type="unfinished">メインメモリー</translation>
+        <translation>メインメモリー</translation>
     </message>
     <message>
         <source>Processor(s)</source>
         <comment>details report</comment>
-        <translation type="unfinished">プロセッサー数</translation>
+        <translation>プロセッサー数</translation>
     </message>
     <message>
         <source>Execution Cap</source>
         <comment>details report</comment>
-        <translation type="unfinished">使用率制限</translation>
+        <translation>使用率制限</translation>
     </message>
     <message>
         <source>Boot Order</source>
         <comment>details report</comment>
-        <translation type="unfinished">起動順序</translation>
+        <translation>起動順序</translation>
     </message>
     <message>
         <source>ACPI</source>
         <comment>details report</comment>
-        <translation type="unfinished">ACPI</translation>
+        <translation>ACPI</translation>
     </message>
     <message>
         <source>I/O APIC</source>
         <comment>details report</comment>
-        <translation type="unfinished">I/O APIC</translation>
+        <translation>I/O APIC</translation>
     </message>
     <message>
         <source>PAE/NX</source>
         <comment>details report</comment>
-        <translation type="unfinished">PAE/NX</translation>
+        <translation>PAE/NX</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details report (VT-x/AMD-V)</comment>
-        <translation type="unfinished">有効</translation>
+        <translation>有効</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (VT-x/AMD-V)</comment>
-        <translation type="unfinished">無効</translation>
+        <translation>無効</translation>
     </message>
     <message>
         <source>VT-x/AMD-V</source>
         <comment>details report</comment>
-        <translation type="unfinished">VT-x/AMD-V</translation>
+        <translation>VT-x/AMD-V</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details report (Nested Paging)</comment>
-        <translation type="unfinished">有効</translation>
+        <translation>有効</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (Nested Paging)</comment>
-        <translation type="unfinished">無効</translation>
+        <translation>無効</translation>
     </message>
     <message>
         <source>Nested Paging</source>
         <comment>details report</comment>
-        <translation type="unfinished">ネステッドページング</translation>
+        <translation>ネステッドページング</translation>
     </message>
     <message>
         <source>Paravirtualization Interface</source>
         <comment>details report</comment>
-        <translation type="unfinished">準仮想化インターフェース</translation>
+        <translation>準仮想化インターフェース</translation>
     </message>
 </context>
 <context>
@@ -5935,17 +5935,17 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Disabled</source>
         <comment>details report (USB)</comment>
-        <translation type="unfinished">無効</translation>
+        <translation>無効</translation>
     </message>
     <message>
         <source>Device Filters</source>
         <comment>details report (USB)</comment>
-        <translation type="unfinished">デバイスフィルター</translation>
+        <translation>デバイスフィルター</translation>
     </message>
     <message>
         <source>%1 (%2 active)</source>
         <comment>details report (USB)</comment>
-        <translation type="unfinished">%1 (%2 アクティブ)</translation>
+        <translation>%1 (%2 アクティブ)</translation>
     </message>
 </context>
 <context>
@@ -8314,7 +8314,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Add NVMe Controller</source>
-        <translation type="unfinished"></translation>
+        <translation>NVMe コントローラーを追加</translation>
     </message>
 </context>
 <context>
@@ -9046,27 +9046,27 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>This type of medium is attached directly or indirectly, preserved when taking snapshots.</source>
-        <translation type="unfinished"></translation>
+        <translation>このタイプのメディアは直接あるいは間接的に割り当てられます。スナップショットでは保持されます。</translation>
     </message>
     <message>
         <source>This type of medium is attached indirectly, changes are wiped out the next time the virtual machine is started.</source>
-        <translation type="unfinished"></translation>
+        <translation>このタイプのメディアは間接的に割り当てられます。変更は次に仮想マシンが起動するときには消去しています。</translation>
     </message>
     <message>
         <source>This type of medium is attached directly, ignored when taking snapshots.</source>
-        <translation type="unfinished"></translation>
+        <translation>このタイプのメディアは直接割り当てられます。スナップショットでは無視されます。</translation>
     </message>
     <message>
         <source>This type of medium is attached directly, allowed to be used concurrently by several machines.</source>
-        <translation type="unfinished"></translation>
+        <translation>このタイプのメディアは直接割り当てられます。いくつかのマシンから同時利用できます。</translation>
     </message>
     <message>
         <source>This type of medium is attached directly, and can be used by several machines.</source>
-        <translation type="unfinished"></translation>
+        <translation>このタイプのメディアは直接割り当てられます。いくつかのマシンから使用されることもあります。</translation>
     </message>
     <message>
         <source>This type of medium is attached indirectly, so that one base medium can be used for several VMs which have their own differencing medium to store their modifications.</source>
-        <translation type="unfinished"></translation>
+        <translation>このタイプのメディアは間接的に割り当てられます。一つのベースとなるメディアを元に独自の変更を加えた上で、いくつかのVMから使用されています。</translation>
     </message>
 </context>
 <context>
@@ -11003,19 +11003,19 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Encryption password for <nobr>ID = '%1'</nobr> is invalid.</source>
-        <translation type="unfinished"></translation>
+        <translation><nobr>ID = '%1'</nobr> の暗号化パスワードは無効です。</translation>
     </message>
     <message>
         <source>The current port forwarding rules are not valid. All of the host or guest address values should be correct or empty.</source>
-        <translation type="unfinished"></translation>
+        <translation>現在のポートフォワーディングルールは無効です。 すべてのホストまたはゲストのアドレス値は正確か、あるいは空でなくてはなりません。</translation>
     </message>
     <message>
         <source>The current port forwarding rules are not valid. None of the guest address values may be empty.</source>
-        <translation type="unfinished"></translation>
+        <translation>現在のポートフォワーディングルールは無効です。 ゲストアドレス値は空であってはなりません。</translation>
     </message>
     <message>
         <source><p>Failed to acquire the VirtualBox COM object.</p><p>The application will now terminate.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>VirtualBox COMオブジェクトの作成に失敗しました。</p><p>アプリケーションを終了します。</p></translation>
     </message>
 </context>
 <context>
@@ -11121,7 +11121,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Holds the location of the virtual machine.</source>
-        <translation type="unfinished"></translation>
+        <translation>仮想マシンの場所を指定します。</translation>
     </message>
 </context>
 <context>
@@ -11212,42 +11212,42 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>%1: %2</source>
         <comment>Context description: Error description</comment>
-        <translation type="unfinished"></translation>
+        <translation>%1: %2</translation>
     </message>
     <message>
         <source>Unable to initialize HTTP library</source>
-        <translation type="unfinished"></translation>
+        <translation>HTTPライブラリーを初期化できません</translation>
     </message>
     <message>
         <source>Connection refused</source>
-        <translation type="unfinished"></translation>
+        <translation>接続が拒否されました</translation>
     </message>
     <message>
         <source>Content moved</source>
-        <translation type="unfinished"></translation>
+        <translation>内容が移動しました</translation>
     </message>
     <message>
         <source>Proxy not found</source>
-        <translation type="unfinished"></translation>
+        <translation>プロキシが見つかりません</translation>
     </message>
     <message>
         <source>Url not found on the server</source>
-        <translation type="unfinished"></translation>
+        <translation>サーバーでURLが見つかりません</translation>
     </message>
 </context>
 <context>
     <name>UINetworkReplyPrivateThread</name>
     <message>
         <source>During proxy configuration</source>
-        <translation type="unfinished"></translation>
+        <translation>プロキシの設定中</translation>
     </message>
     <message>
         <source>During certificate downloading</source>
-        <translation type="unfinished"></translation>
+        <translation>認証のダウンロード中</translation>
     </message>
     <message>
         <source>During network request</source>
-        <translation type="unfinished"></translation>
+        <translation>ネットワークリクエスト中</translation>
     </message>
 </context>
 <context>
@@ -12719,7 +12719,7 @@ step and attach hard disks later using the VM Settings dialog.</p></source
     </message>
     <message>
         <source>VM Uptime</source>
-        <translation>VM アップデート</translation>
+        <translation>VM 起動時間</translation>
     </message>
     <message>
         <source>Drag and Drop Mode</source>
@@ -12730,15 +12730,15 @@ step and attach hard disks later using the VM Settings dialog.</p></source
     <name>UIVMInformationDialog</name>
     <message>
         <source>%1 - Session Information</source>
-        <translation type="unfinished">%1 - セッション情報</translation>
+        <translation>%1 - セッション情報</translation>
     </message>
     <message>
         <source>Configuration &Details</source>
-        <translation type="unfinished">設定の詳細(&D)</translation>
+        <translation>設定の詳細(&D)</translation>
     </message>
     <message>
         <source>&Runtime Information</source>
-        <translation type="unfinished">ランタイム情報(&R)</translation>
+        <translation>ランタイム情報(&R)</translation>
     </message>
 </context>
 <context>
@@ -12858,15 +12858,15 @@ step and attach hard disks later using the VM Settings dialog.</p></source
     </message>
     <message>
         <source>Filter</source>
-        <translation type="unfinished"></translation>
+        <translation>フィルター</translation>
     </message>
     <message>
         <source>Enter filtering string here</source>
-        <translation type="unfinished"></translation>
+        <translation>フィルタリングする文字列をここに入力</translation>
     </message>
     <message>
         <source>Fil&ter</source>
-        <translation type="unfinished"></translation>
+        <translation>フィルター(&T)</translation>
     </message>
 </context>
 <context>
@@ -13230,11 +13230,11 @@ step and attach hard disks later using the VM Settings dialog.</p></source
     </message>
     <message>
         <source><p>Please select the virtual machines that should be added to the appliance. You can select more than one. Please note that these machines have to be turned off before they can be exported.</p></source>
-        <translation><p>アプライアンスに追加する仮想マシンを選択してください。複数の仮想マシンを選択できます。それらのマシンはエクスポートする前に電源オフにしている必要があります。</p></translation>
+        <translation><p>仮想アプライアンスに追加する仮想マシンを選択してください。複数の仮想マシンを選択できます。それらのマシンはエクスポートする前に電源オフにしている必要があります。</p></translation>
     </message>
     <message>
         <source>Appliance settings</source>
-        <translation>アプライアンスの設定</translation>
+        <translation>仮想アプライアンスの設定</translation>
     </message>
     <message>
         <source>Please choose where to create the virtual appliance. You can create it on your own computer, on the Sun Cloud service or on an S3 storage server.</source>
@@ -13350,7 +13350,7 @@ step and attach hard disks later using the VM Settings dialog.</p></source
     </message>
     <message>
         <source>Appliance &settings</source>
-        <translation>アプライアンスの設定(&S)</translation>
+        <translation>仮想アプライアンスの設定(&S)</translation>
     </message>
     <message>
         <source>&Destination</source>
@@ -13434,7 +13434,7 @@ step and attach hard disks later using the VM Settings dialog.</p></source
     </message>
     <message>
         <source>Appliance to import</source>
-        <translation>インポートしたいアプライアンス</translation>
+        <translation>インポートしたい仮想アプライアンス</translation>
     </message>
     <message>
         <source><p>VirtualBox currently supports importing appliances saved in the Open Virtualization Format (OVF). To continue, select the file to import below.</p></source>
@@ -13462,7 +13462,7 @@ step and attach hard disks later using the VM Settings dialog.</p></source
     </message>
     <message>
         <source>Appliance settings</source>
-        <translation>アプライアンスの設定</translation>
+        <translation>仮想アプライアンスの設定</translation>
     </message>
     <message>
         <source>These are the virtual machines contained in the appliance and the suggested settings of the imported VirtualBox machines. You can change many of the properties shown by double-clicking on the items and disable others using the check boxes below.</source>
@@ -13470,31 +13470,31 @@ step and attach hard disks later using the VM Settings dialog.</p></source
     </message>
     <message>
         <source>Appliance is not signed</source>
-        <translation type="unfinished"></translation>
+        <translation>仮想アプライアンスは署名されていません</translation>
     </message>
     <message>
         <source>Appliance signed by %1 (trusted)</source>
-        <translation type="unfinished"></translation>
+        <translation>仮想アプライアンスは %1 によって署名されています (信頼できる)</translation>
     </message>
     <message>
         <source>Appliance signed by %1 (expired!)</source>
-        <translation type="unfinished"></translation>
+        <translation>仮想アプライアンスは %1 によって署名されています (失効済!)</translation>
     </message>
     <message>
         <source>Unverified signature by %1!</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 による検証できない署名です!</translation>
     </message>
     <message>
         <source>Self signed by %1 (trusted)</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 による自己署名 (信頼できる)</translation>
     </message>
     <message>
         <source>Self signed by %1 (expired!)</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 による自己署名 (失効済!)</translation>
     </message>
     <message>
         <source>Unverified self signed signature by %1!</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 による検証できない自己署名された証明書です!</translation>
     </message>
 </context>
 <context>
@@ -13740,11 +13740,11 @@ step and attach hard disks later using the VM Settings dialog.</p></source
     </message>
     <message>
         <source><p><nobr>Holds the name or full path to the virtual machine folder you are about to create.</nobr></p></source>
-        <translation type="unfinished"></translation>
+        <translation><p><nobr>作成しようとしている名前もしくは仮想マシンのフォルダーのフルパスを指定してください。</nobr></p></translation>
     </message>
     <message>
         <source><p><nobr>You are about to create the virtual machine in the following folder:</nobr><br><nobr><b>%1</b></nobr></p></source>
-        <translation type="unfinished"></translation>
+        <translation><p><nobr>次のフォルダーに仮想マシンを作成しようとしています:</nobr><br><nobr><b>%1</b></nobr></p></translation>
     </message>
 </context>
 <context>
@@ -16938,102 +16938,102 @@ Version %1</source>
     <message>
         <source>USB</source>
         <comment>StorageBus</comment>
-        <translation type="unfinished">USB</translation>
+        <translation>USB</translation>
     </message>
     <message>
         <source>PCIe</source>
         <comment>StorageBus</comment>
-        <translation type="unfinished"></translation>
+        <translation>PCIe</translation>
     </message>
     <message>
         <source>NVMe</source>
         <comment>StorageControllerType</comment>
-        <translation type="unfinished"></translation>
+        <translation>NVMe</translation>
     </message>
     <message>
         <source>NVMe Port %1</source>
         <comment>StorageSlot</comment>
-        <translation type="unfinished"></translation>
+        <translation>NVMe ポート %1</translation>
     </message>
     <message>
         <source>General</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">一般</translation>
+        <translation>一般</translation>
     </message>
     <message>
         <source>Preview</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">プレビュー</translation>
+        <translation>プレビュー</translation>
     </message>
     <message>
         <source>System</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">システム</translation>
+        <translation>システム</translation>
     </message>
     <message>
         <source>Display</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">ディスプレイ</translation>
+        <translation>ディスプレイ</translation>
     </message>
     <message>
         <source>Storage</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">ストレージ</translation>
+        <translation>ストレージ</translation>
     </message>
     <message>
         <source>Audio</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">オーディオ</translation>
+        <translation>オーディオ</translation>
     </message>
     <message>
         <source>Network</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">ネットワーク</translation>
+        <translation>ネットワーク</translation>
     </message>
     <message>
         <source>Serial ports</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">シリアルポート</translation>
+        <translation>シリアルポート</translation>
     </message>
     <message>
         <source>Parallel ports</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">パラレルポート</translation>
+        <translation>パラレルポート</translation>
     </message>
     <message>
         <source>USB</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">USB</translation>
+        <translation>USB</translation>
     </message>
     <message>
         <source>Shared folders</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">共有フォルダー</translation>
+        <translation>共有フォルダー</translation>
     </message>
     <message>
         <source>User interface</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">ユーザーインターフェース</translation>
+        <translation>ユーザーインターフェース</translation>
     </message>
     <message>
         <source>Description</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">説明</translation>
+        <translation>説明</translation>
     </message>
     <message>
         <source>Runtime attributes</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>ランタイム属性</translation>
     </message>
     <message>
         <source>Storage statistics</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>ストレージ統計</translation>
     </message>
     <message>
         <source>Network statistics</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>ネットワーク 統計</translation>
     </message>
 </context>
 <context>
@@ -19595,7 +19595,7 @@ value.</qt></source>
     </message>
     <message>
         <source>&Description</source>
-        <translation type="obsolete">コメント(&D)</translation>
+        <translation type="obsolete">説明(&D)</translation>
     </message>
     <message>
         <source>&Mount Floppy Drive</source>
diff --git a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_ko.ts b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_ko.ts
index fba4bd8..cb8dc62 100644
--- a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_ko.ts
+++ b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_ko.ts
@@ -116,22 +116,22 @@
     </message>
     <message>
         <source>The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing<br/><br/>  <font color=blue>'/sbin/vboxconfig'</font><br/><br/>as root.</source>
-        <translation type="unfinished"></translation>
+        <translation>VirtualBox 리눅스 커널 드라이버(vboxdrv)를 불러오지 않았거나 /dev/vboxdrv에 권한 문제가 있습니다. 다음 명령을 루트로 실행하여 커널 모듈을 다시 설치하십시오:<br/><br/><font color=blue>'/sbin/vboxconfig'</font></translation>
     </message>
     <message>
         <source>The VirtualBox kernel modules do not match this version of VirtualBox. The installation of VirtualBox was apparently not successful. Executing<br/><br/>  <font color=blue>'/sbin/vboxconfig'</font><br/><br/>may correct this. Make sure that you do not mix the OSE version and the PUEL version of VirtualBox.</source>
-        <translation type="unfinished"></translation>
+        <translation>VirtualBox 커널 모듈이 현재 VirtualBox 버전과 호환되지 않습니다. VirtualBox 설치에 문제가 있는 것 같습니다. <br/><br/><font color=blue>'/sbin/vboxconfig'</font><br/><br/>명령을 다시 실행하여 다시 설정하십시오. VirtualBox OSE 버전과 PUEL 버전을 동시에 설치하지 마십시오.</translation>
     </message>
 </context>
 <context>
     <name>QIArrowButtonPress</name>
     <message>
         <source>&Back</source>
-        <translation type="unfinished">이전(&B)</translation>
+        <translation>이전(&B)</translation>
     </message>
     <message>
         <source>&Next</source>
-        <translation type="unfinished">다음(&N)</translation>
+        <translation>다음(&N)</translation>
     </message>
 </context>
 <context>
@@ -146,11 +146,11 @@
     </message>
     <message>
         <source>&Details</source>
-        <translation type="unfinished">자세한 정보(&D)</translation>
+        <translation>자세한 정보(&D)</translation>
     </message>
     <message>
         <source>&Details (%1 of %2)</source>
-        <translation type="unfinished">자세한 정보 (%2 중 %1)(&D)</translation>
+        <translation>자세한 정보 (%2 중 %1)(&D)</translation>
     </message>
 </context>
 <context>
@@ -1477,39 +1477,39 @@
     </message>
     <message>
         <source>&VirtualBox Bug Tracker...</source>
-        <translation type="unfinished"></translation>
+        <translation>VirtualBox 버그 트래커(&V)...</translation>
     </message>
     <message>
         <source>Open the browser and go to the VirtualBox product bug tracker</source>
-        <translation type="unfinished"></translation>
+        <translation>VirtualBox 제품 버그 트래커 웹 사이트를 엽니다</translation>
     </message>
     <message>
         <source>&VirtualBox Forums...</source>
-        <translation type="unfinished"></translation>
+        <translation>VirtualBox 포럼(&V)...</translation>
     </message>
     <message>
         <source>Open the browser and go to the VirtualBox product forums</source>
-        <translation type="unfinished"></translation>
+        <translation>VirtualBox 포럼 웹 사이트를 엽니다</translation>
     </message>
     <message>
         <source>&Oracle Web Site...</source>
-        <translation type="unfinished"></translation>
+        <translation>Oracle 웹 사이트(&O)...</translation>
     </message>
     <message>
         <source>Open the browser and go to the Oracle web site</source>
-        <translation type="unfinished"></translation>
+        <translation>Oracle 웹 사이트를 엽니다</translation>
     </message>
     <message>
         <source>&Detach GUI</source>
-        <translation type="unfinished"></translation>
+        <translation>GUI 떼내기(&D)</translation>
     </message>
     <message>
         <source>Detach the GUI from headless VM</source>
-        <translation type="unfinished"></translation>
+        <translation>헤드리스 VM의 GUI를 떼냅니다</translation>
     </message>
     <message>
         <source>Disable Dock Icon Overlay</source>
-        <translation type="unfinished"></translation>
+        <translation>독 아이콘 오버레이 비활성화</translation>
     </message>
 </context>
 <context>
@@ -1733,73 +1733,73 @@
     <name>UIApplianceUnverifiedCertificateViewer</name>
     <message>
         <source>Unverifiable Certificate! Continue?</source>
-        <translation type="unfinished"></translation>
+        <translation>인증서를 확인할 수 없습니다! 계속 진행하시겠습니까?</translation>
     </message>
     <message>
         <source><b>The appliance is signed by an unverified self signed certificate issued by '%1'. We recommend to only proceed with the importing if you are sure you should trust this entity.</b></source>
-        <translation type="unfinished"></translation>
+        <translation><b>이 가상 시스템은 '%1'에서 발급한 검증할 수 없는 자가 서명된 인증서로 서명되어 있습니다. 서명한 사람을 신뢰할 수 있을 때에만 가상 머신을 가져오는 것을 추천합니다.</b></translation>
     </message>
     <message>
         <source><b>The appliance is signed by an unverified certificate issued to '%1'. We recommend to only proceed with the importing if you are sure you should trust this entity.</b></source>
-        <translation type="unfinished"></translation>
+        <translation><b>이 가상 시스템은 '%1'에게 발급된 검증할 수 없는 인증서로 서명되어 있습니다. 서명한 사람을 신뢰할 수 있을 때에만 가상 머신을 가져오는 것을 추천합니다.</b></translation>
     </message>
     <message>
         <source>True</source>
-        <translation type="unfinished"></translation>
+        <translation>참</translation>
     </message>
     <message>
         <source>False</source>
-        <translation type="unfinished"></translation>
+        <translation>거짓</translation>
     </message>
     <message>
         <source><tr><td>%1:</td><td>%2</td></tr></source>
         <comment>key: value</comment>
-        <translation type="unfinished"></translation>
+        <translation><tr><td>%1:</td><td>%2</td></tr></translation>
     </message>
     <message>
         <source>Issuer</source>
-        <translation type="unfinished"></translation>
+        <translation>발급자</translation>
     </message>
     <message>
         <source>Subject</source>
-        <translation type="unfinished"></translation>
+        <translation>발급 대상</translation>
     </message>
     <message>
         <source>Not Valid Before</source>
-        <translation type="unfinished"></translation>
+        <translation>유효 기간 시작</translation>
     </message>
     <message>
         <source>Not Valid After</source>
-        <translation type="unfinished"></translation>
+        <translation>유효 기간 끝</translation>
     </message>
     <message>
         <source>Serial Number</source>
-        <translation type="unfinished"></translation>
+        <translation>일련 번호</translation>
     </message>
     <message>
         <source>Self-Signed</source>
-        <translation type="unfinished"></translation>
+        <translation>자가 서명됨</translation>
     </message>
     <message>
         <source>Authority (CA)</source>
-        <translation type="unfinished"></translation>
+        <translation>인증 기관(CA)</translation>
     </message>
     <message>
         <source>Public Algorithm</source>
-        <translation type="unfinished"></translation>
+        <translation>공개 키 알고리즘</translation>
     </message>
     <message>
         <source>%1 (%2)</source>
         <comment>value (clarification)</comment>
-        <translation type="unfinished"></translation>
+        <translation>%1(%2)</translation>
     </message>
     <message>
         <source>Signature Algorithm</source>
-        <translation type="unfinished"></translation>
+        <translation>서명 알고리즘</translation>
     </message>
     <message>
         <source>X.509 Version Number</source>
-        <translation type="unfinished"></translation>
+        <translation>X.509 버전 번호</translation>
     </message>
 </context>
 <context>
@@ -2545,7 +2545,7 @@
     <name>UIEmptyFilePathSelector</name>
     <message>
         <source>Choose...</source>
-        <translation type="unfinished">선택...</translation>
+        <translation>선택...</translation>
     </message>
 </context>
 <context>
@@ -2920,55 +2920,55 @@ p, li { white-space: pre-wrap; }
     <name>UIFilePathSelector</name>
     <message>
         <source>&Copy</source>
-        <translation type="unfinished">복사(&C)</translation>
+        <translation>복사(&C)</translation>
     </message>
     <message>
         <source>Other...</source>
-        <translation type="unfinished">기타...</translation>
+        <translation>기타...</translation>
     </message>
     <message>
         <source>Reset</source>
-        <translation type="unfinished">초기화</translation>
+        <translation>초기화</translation>
     </message>
     <message>
         <source>Displays a window to select a different folder.</source>
-        <translation type="unfinished">다른 폴더를 선택하기 위한 대화 상자를 엽니다.</translation>
+        <translation>다른 폴더를 선택하기 위한 대화 상자를 엽니다.</translation>
     </message>
     <message>
         <source>Resets the folder path to the default value.</source>
-        <translation type="unfinished">폴더 경로를 기본값으로 초기화합니다.</translation>
+        <translation>폴더 경로를 기본값으로 초기화합니다.</translation>
     </message>
     <message>
         <source>Displays a window to select a different file.</source>
-        <translation type="unfinished">다른 파일을 선택하기 위한 대화 상자를 엽니다.</translation>
+        <translation>다른 파일을 선택하기 위한 대화 상자를 엽니다.</translation>
     </message>
     <message>
         <source>Resets the file path to the default value.</source>
-        <translation type="unfinished">파일 경로를 기본값으로 초기화합니다.</translation>
+        <translation>파일 경로를 기본값으로 초기화합니다.</translation>
     </message>
     <message>
         <source><reset to default></source>
-        <translation type="unfinished"><기본값으로 초기화></translation>
+        <translation><기본값으로 초기화></translation>
     </message>
     <message>
         <source>The actual default path value will be displayed after accepting the changes and opening this window again.</source>
-        <translation type="unfinished">실제 기본 경로는 이 대화 상자의 변경 사항을 저장하고 다시 시작했을 때 표시됩니다.</translation>
+        <translation>실제 기본 경로는 이 대화 상자의 변경 사항을 저장하고 다시 시작했을 때 표시됩니다.</translation>
     </message>
     <message>
         <source><not selected></source>
-        <translation type="unfinished"><선택하지 않음></translation>
+        <translation><선택하지 않음></translation>
     </message>
     <message>
         <source>Please use the <b>Other...</b> item from the drop-down list to select a path.</source>
-        <translation type="unfinished">원하시는 경로를 선택하려면 드롭다운 목록에서 <b>기타...</b> 항목을 선택하십시오.</translation>
+        <translation>원하시는 경로를 선택하려면 드롭다운 목록에서 <b>기타...</b> 항목을 선택하십시오.</translation>
     </message>
     <message>
         <source>Holds the folder path.</source>
-        <translation type="unfinished">폴더 경로를 표시합니다.</translation>
+        <translation>폴더 경로를 표시합니다.</translation>
     </message>
     <message>
         <source>Holds the file path.</source>
-        <translation type="unfinished">파일 경로를 표시합니다.</translation>
+        <translation>파일 경로를 표시합니다.</translation>
     </message>
 </context>
 <context>
@@ -4565,7 +4565,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Host interface <b>%1</b> does not currently have a valid IPv6 network mask prefix length.</source>
-        <translation type="unfinished"></translation>
+        <translation>호스트 인터페이스 <b>%1</b>에 올바른 IPv6 네트워크 마스크 접두사 길이가 없습니다.</translation>
     </message>
 </context>
 <context>
@@ -4936,27 +4936,27 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>When chosen, VirtualBox will try to auto-detect host proxy settings for tasks like downloading Guest Additions from the network or checking for updates.</source>
-        <translation type="unfinished"></translation>
+        <translation>선택하면 VirtualBox에서 게스트 확장을 다운로드하거나 업데이트를 확인할 때 호스트 프록시 설정을 자동으로 확인합니다.</translation>
     </message>
     <message>
         <source>&Auto-detect Host Proxy Settings</source>
-        <translation type="unfinished"></translation>
+        <translation>프록시 설정 자동 감지(&A)</translation>
     </message>
     <message>
         <source>When chosen, VirtualBox will use direct Internet connection for tasks like downloading Guest Additions from the network or checking for updates.</source>
-        <translation type="unfinished"></translation>
+        <translation>선택하면 VirtualBox 게스트 확장 다운로드 및 업데이트 확인 등 네트워크를 사용하는 작업 시 인터넷에 직접 연결합니다.</translation>
     </message>
     <message>
         <source>&Direct Connection to the Internet</source>
-        <translation type="unfinished"></translation>
+        <translation>인터넷에 직접 연결(&D)</translation>
     </message>
     <message>
         <source>When chosen, VirtualBox will use the proxy settings supplied for tasks like downloading Guest Additions from the network or checking for updates.</source>
-        <translation type="unfinished"></translation>
+        <translation>선택하면 VirtualBox 게스트 확장 다운로드 및 업데이트 확인 등 네트워크를 사용하는 작업에 아래 프록시를 사용합니다.</translation>
     </message>
     <message>
         <source>&Manual Proxy Configuration</source>
-        <translation type="unfinished"></translation>
+        <translation>수동 프록시 설정(&M)</translation>
     </message>
 </context>
 <context>
@@ -5582,12 +5582,12 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Host Driver</source>
         <comment>details report (audio)</comment>
-        <translation type="unfinished">호스트 드라이버</translation>
+        <translation>호스트 드라이버</translation>
     </message>
     <message>
         <source>Controller</source>
         <comment>details report (audio)</comment>
-        <translation type="unfinished">컨트롤러</translation>
+        <translation>컨트롤러</translation>
     </message>
 </context>
 <context>
@@ -5600,57 +5600,57 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Video Memory</source>
         <comment>details report</comment>
-        <translation type="unfinished">비디오 메모리</translation>
+        <translation>비디오 메모리</translation>
     </message>
     <message>
         <source>Screens</source>
         <comment>details report</comment>
-        <translation type="unfinished">화면</translation>
+        <translation>화면</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details report (3D Acceleration)</comment>
-        <translation type="unfinished">사용함</translation>
+        <translation>사용함</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (3D Acceleration)</comment>
-        <translation type="unfinished">사용 안함</translation>
+        <translation>사용 안함</translation>
     </message>
     <message>
         <source>3D Acceleration</source>
         <comment>details report</comment>
-        <translation type="unfinished">3차원 가속</translation>
+        <translation>3차원 가속</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details report (2D Video Acceleration)</comment>
-        <translation type="unfinished">사용함</translation>
+        <translation>사용함</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (2D Video Acceleration)</comment>
-        <translation type="unfinished">사용 안함</translation>
+        <translation>사용 안함</translation>
     </message>
     <message>
         <source>2D Video Acceleration</source>
         <comment>details report</comment>
-        <translation type="unfinished">2차원 가속</translation>
+        <translation>2차원 가속</translation>
     </message>
     <message>
         <source>Remote Desktop Server Port</source>
         <comment>details report (VRDE Server)</comment>
-        <translation type="unfinished">원격 데스크톱 서버 포트</translation>
+        <translation>원격 데스크톱 서버 포트</translation>
     </message>
     <message>
         <source>Remote Desktop Server</source>
         <comment>details report (VRDE Server)</comment>
-        <translation type="unfinished">원격 데스크톱 서버</translation>
+        <translation>원격 데스크톱 서버</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (VRDE Server)</comment>
-        <translation type="unfinished">사용 안함</translation>
+        <translation>사용 안함</translation>
     </message>
 </context>
 <context>
@@ -5663,12 +5663,12 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Name</source>
         <comment>details report</comment>
-        <translation type="unfinished">이름</translation>
+        <translation>이름</translation>
     </message>
     <message>
         <source>OS Type</source>
         <comment>details report</comment>
-        <translation type="unfinished">운영 체제 종류</translation>
+        <translation>운영 체제 종류</translation>
     </message>
 </context>
 <context>
@@ -5680,43 +5680,43 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Bridged adapter, %1</source>
         <comment>details report (network)</comment>
-        <translation type="unfinished">브리지 어댑터, %1</translation>
+        <translation>브리지 어댑터, %1</translation>
     </message>
     <message>
         <source>Internal network, '%1'</source>
         <comment>details report (network)</comment>
-        <translation type="unfinished">내부 네트워크, '%1'</translation>
+        <translation>내부 네트워크, '%1'</translation>
     </message>
     <message>
         <source>Host-only adapter, '%1'</source>
         <comment>details report (network)</comment>
-        <translation type="unfinished">호스트 전용 어댑터, '%1'</translation>
+        <translation>호스트 전용 어댑터, '%1'</translation>
     </message>
     <message>
         <source>Generic, '%1'</source>
         <comment>details report (network)</comment>
-        <translation type="unfinished">일반, '%1'</translation>
+        <translation>일반, '%1'</translation>
     </message>
     <message>
         <source>NAT network, '%1'</source>
         <comment>details report (network)</comment>
-        <translation type="unfinished">NAT 네트워크, '%1'</translation>
+        <translation>NAT 네트워크, '%1'</translation>
     </message>
     <message>
         <source>Adapter %1</source>
         <comment>details report (network)</comment>
-        <translation type="unfinished">어댑터 %1</translation>
+        <translation>어댑터 %1</translation>
     </message>
 </context>
 <context>
     <name>UIInformationDataNetworkStatistics</name>
     <message>
         <source>Data Transmitted</source>
-        <translation type="unfinished">보낸 데이터</translation>
+        <translation>보낸 데이터</translation>
     </message>
     <message>
         <source>Data Received</source>
-        <translation type="unfinished">받은 데이터</translation>
+        <translation>받은 데이터</translation>
     </message>
     <message>
         <source>Network Statistics</source>
@@ -5734,12 +5734,12 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Port %1</source>
         <comment>details report (parallel ports)</comment>
-        <translation type="unfinished">포트 %1</translation>
+        <translation>포트 %1</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (parallel ports)</comment>
-        <translation type="unfinished">사용 안함</translation>
+        <translation>사용 안함</translation>
     </message>
 </context>
 <context>
@@ -5752,67 +5752,67 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Not Detected</source>
         <comment>guest additions</comment>
-        <translation type="unfinished">알 수 없음</translation>
+        <translation>알 수 없음</translation>
     </message>
     <message>
         <source>Not Detected</source>
         <comment>guest os type</comment>
-        <translation type="unfinished">알 수 없음</translation>
+        <translation>알 수 없음</translation>
     </message>
     <message>
         <source>Not Available</source>
         <comment>details report (VRDE server port)</comment>
-        <translation type="unfinished">사용할 수 없음</translation>
+        <translation>사용할 수 없음</translation>
     </message>
     <message>
         <source>Screen Resolution</source>
-        <translation type="unfinished">화면 해상도</translation>
+        <translation>화면 해상도</translation>
     </message>
     <message>
         <source>VM Uptime</source>
-        <translation type="unfinished">VM 실행 시간</translation>
+        <translation>VM 실행 시간</translation>
     </message>
     <message>
         <source>Clipboard Mode</source>
-        <translation type="unfinished">클립보드 모드</translation>
+        <translation>클립보드 모드</translation>
     </message>
     <message>
         <source>Drag and Drop Mode</source>
-        <translation type="unfinished">드래그 앤 드롭 모드</translation>
+        <translation>드래그 앤 드롭 모드</translation>
     </message>
     <message>
         <source>VT-x/AMD-V</source>
         <comment>details report</comment>
-        <translation type="unfinished">VT-X/AMD-V</translation>
+        <translation>VT-X/AMD-V</translation>
     </message>
     <message>
         <source>Nested Paging</source>
         <comment>details report</comment>
-        <translation type="unfinished">네스티드 페이징</translation>
+        <translation>네스티드 페이징</translation>
     </message>
     <message>
         <source>Unrestricted Execution</source>
         <comment>details report</comment>
-        <translation type="unfinished">무제한 실행</translation>
+        <translation>무제한 실행</translation>
     </message>
     <message>
         <source>Paravirtualization Interface</source>
         <comment>details report</comment>
-        <translation type="unfinished">반가상화 인터페이스</translation>
+        <translation>반가상화 인터페이스</translation>
     </message>
     <message>
         <source>Guest Additions</source>
-        <translation type="unfinished">게스트 확장</translation>
+        <translation>게스트 확장</translation>
     </message>
     <message>
         <source>Guest OS Type</source>
         <comment>details report</comment>
-        <translation type="unfinished">게스트 운영 체제 종류</translation>
+        <translation>게스트 운영 체제 종류</translation>
     </message>
     <message>
         <source>Remote Desktop Server Port</source>
         <comment>details report (VRDE Server)</comment>
-        <translation type="unfinished">원격 데스크톱 서버 포트</translation>
+        <translation>원격 데스크톱 서버 포트</translation>
     </message>
 </context>
 <context>
@@ -5824,7 +5824,7 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Port %1</source>
         <comment>details report (serial ports)</comment>
-        <translation type="unfinished">포트 %1</translation>
+        <translation>포트 %1</translation>
     </message>
 </context>
 <context>
@@ -5837,7 +5837,7 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Shared Folders</source>
         <comment>details report (shared folders)</comment>
-        <translation type="unfinished">공유 폴더</translation>
+        <translation>공유 폴더</translation>
     </message>
 </context>
 <context>
@@ -5848,26 +5848,26 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>(Optical Drive)</source>
-        <translation type="unfinished">(광학 드라이브)</translation>
+        <translation>(광학 드라이브)</translation>
     </message>
 </context>
 <context>
     <name>UIInformationDataStorageStatistics</name>
     <message>
         <source>DMA Transfers</source>
-        <translation type="unfinished">DMA 전송</translation>
+        <translation>DMA 전송</translation>
     </message>
     <message>
         <source>PIO Transfers</source>
-        <translation type="unfinished">PIO 전송</translation>
+        <translation>PIO 전송</translation>
     </message>
     <message>
         <source>Data Read</source>
-        <translation type="unfinished">읽은 데이터</translation>
+        <translation>읽은 데이터</translation>
     </message>
     <message>
         <source>Data Written</source>
-        <translation type="unfinished">쓴 데이터</translation>
+        <translation>쓴 데이터</translation>
     </message>
     <message>
         <source>Storage Statistics</source>
@@ -5885,102 +5885,102 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Enabled</source>
         <comment>details report (ACPI)</comment>
-        <translation type="unfinished">사용함</translation>
+        <translation>사용함</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (ACPI)</comment>
-        <translation type="unfinished">사용 안함</translation>
+        <translation>사용 안함</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details report (I/O APIC)</comment>
-        <translation type="unfinished">사용함</translation>
+        <translation>사용함</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (I/O APIC)</comment>
-        <translation type="unfinished">사용 안함</translation>
+        <translation>사용 안함</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details report (PAE/NX)</comment>
-        <translation type="unfinished">사용함</translation>
+        <translation>사용함</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (PAE/NX)</comment>
-        <translation type="unfinished">사용 안함</translation>
+        <translation>사용 안함</translation>
     </message>
     <message>
         <source>Base Memory</source>
         <comment>details report</comment>
-        <translation type="unfinished">기본 메모리</translation>
+        <translation>기본 메모리</translation>
     </message>
     <message>
         <source>Processor(s)</source>
         <comment>details report</comment>
-        <translation type="unfinished">프로세서</translation>
+        <translation>프로세서</translation>
     </message>
     <message>
         <source>Execution Cap</source>
         <comment>details report</comment>
-        <translation type="unfinished">실행 제한</translation>
+        <translation>실행 제한</translation>
     </message>
     <message>
         <source>Boot Order</source>
         <comment>details report</comment>
-        <translation type="unfinished">부팅 순서</translation>
+        <translation>부팅 순서</translation>
     </message>
     <message>
         <source>ACPI</source>
         <comment>details report</comment>
-        <translation type="unfinished">ACPI</translation>
+        <translation>ACPI</translation>
     </message>
     <message>
         <source>I/O APIC</source>
         <comment>details report</comment>
-        <translation type="unfinished">I/O APIC</translation>
+        <translation>I/O APIC</translation>
     </message>
     <message>
         <source>PAE/NX</source>
         <comment>details report</comment>
-        <translation type="unfinished">PAE/NX</translation>
+        <translation>PAE/NX</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details report (VT-x/AMD-V)</comment>
-        <translation type="unfinished">사용함</translation>
+        <translation>사용함</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (VT-x/AMD-V)</comment>
-        <translation type="unfinished">사용 안함</translation>
+        <translation>사용 안함</translation>
     </message>
     <message>
         <source>VT-x/AMD-V</source>
         <comment>details report</comment>
-        <translation type="unfinished">VT-X/AMD-V</translation>
+        <translation>VT-X/AMD-V</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details report (Nested Paging)</comment>
-        <translation type="unfinished">사용함</translation>
+        <translation>사용함</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (Nested Paging)</comment>
-        <translation type="unfinished">사용 안함</translation>
+        <translation>사용 안함</translation>
     </message>
     <message>
         <source>Nested Paging</source>
         <comment>details report</comment>
-        <translation type="unfinished">네스티드 페이징</translation>
+        <translation>네스티드 페이징</translation>
     </message>
     <message>
         <source>Paravirtualization Interface</source>
         <comment>details report</comment>
-        <translation type="unfinished">반가상화 인터페이스</translation>
+        <translation>반가상화 인터페이스</translation>
     </message>
 </context>
 <context>
@@ -5993,17 +5993,17 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Disabled</source>
         <comment>details report (USB)</comment>
-        <translation type="unfinished">사용 안함</translation>
+        <translation>사용 안함</translation>
     </message>
     <message>
         <source>Device Filters</source>
         <comment>details report (USB)</comment>
-        <translation type="unfinished">장치 필터</translation>
+        <translation>장치 필터</translation>
     </message>
     <message>
         <source>%1 (%2 active)</source>
         <comment>details report (USB)</comment>
-        <translation type="unfinished">%1 (%2개 활성화됨)</translation>
+        <translation>%1 (%2개 활성화됨)</translation>
     </message>
 </context>
 <context>
@@ -6410,7 +6410,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Scale Factor:</source>
-        <translation>크기 조정 비율(&C):</translation>
+        <translation>크기 조정 비율:</translation>
     </message>
     <message>
         <source>Controls the guest screen scale factor.</source>
@@ -8163,7 +8163,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Choose a virtual optical disk or a physical drive to use with the virtual drive. The virtual machine will see a disk inserted into the drive with the data in the file or on the disk in the physical drive as its contents.</source>
-        <translation>가상 광학 디스크나 가상 드라이브처럼 사용할 실제 드라이브를 선택하십시오. 가상 머신은 드라이브 안에 있는 디스크나 파일에 있는 데이터를 가상 디스크에 있는 데이터처럼 처리합니다.</translation>
+        <translation>가상 광 디스크나 가상 드라이브처럼 사용할 실제 드라이브를 선택하십시오. 가상 머신은 드라이브 안에 있는 디스크나 파일에 있는 데이터를 가상 디스크에 있는 데이터처럼 처리합니다.</translation>
     </message>
     <message>
         <source>Set up the virtual optical drive</source>
@@ -8244,7 +8244,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Choose Virtual Optical Disk File...</source>
-        <translation>가상 광학 디스크 파일 선택...</translation>
+        <translation>가상 광 디스크 파일 선택...</translation>
     </message>
     <message>
         <source>Remove Disk from Virtual Drive</source>
@@ -8261,7 +8261,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Add NVMe Controller</source>
-        <translation type="unfinished"></translation>
+        <translation>NVMe 컨트롤러 추가하기</translation>
     </message>
 </context>
 <context>
@@ -8958,7 +8958,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>&Optical disks</source>
-        <translation>광학 디스크(&O)</translation>
+        <translation>광 디스크(&O)</translation>
     </message>
     <message>
         <source>&Floppy disks</source>
@@ -8997,27 +8997,27 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>This type of medium is attached directly or indirectly, preserved when taking snapshots.</source>
-        <translation type="unfinished"></translation>
+        <translation>이 형식의 미디어는 직접 및 간접적으로 연결되며 스냅샷을 찍을 때 보존됩니다.</translation>
     </message>
     <message>
         <source>This type of medium is attached indirectly, changes are wiped out the next time the virtual machine is started.</source>
-        <translation type="unfinished"></translation>
+        <translation>이 형식의 미디어는 간접적으로 연결되며 가상 머신을 다음에 다시 시작할 때 변경 사항이 삭제됩니다.</translation>
     </message>
     <message>
         <source>This type of medium is attached directly, ignored when taking snapshots.</source>
-        <translation type="unfinished"></translation>
+        <translation>이 형식의 미디어는 직접적으로 연결되며 스냅샷을 찍을 때 무시합니다.</translation>
     </message>
     <message>
         <source>This type of medium is attached directly, allowed to be used concurrently by several machines.</source>
-        <translation type="unfinished"></translation>
+        <translation>이 형식의 미디어는 직접적으로 연결되며 여러 가상 머신에서 동시에 사용할 수 있습니다.</translation>
     </message>
     <message>
         <source>This type of medium is attached directly, and can be used by several machines.</source>
-        <translation type="unfinished"></translation>
+        <translation>이 형식의 미디어는 직접적으로 연결되며 여러 가상 머신에서 사용할 수 있습니다.</translation>
     </message>
     <message>
         <source>This type of medium is attached indirectly, so that one base medium can be used for several VMs which have their own differencing medium to store their modifications.</source>
-        <translation type="unfinished"></translation>
+        <translation>이 형식의 미디어는 간접적으로 연결되며 한 기반 미디어를 여러 VM에서 사용할 때 가상 머신별 차이를 별도의 미디어에 기록합니다.</translation>
     </message>
 </context>
 <context>
@@ -10518,7 +10518,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source><p>Are you sure you want to remove the virtual optical disk <nobr><b>%1</b></nobr> from the list of known disk image files?</p></source>
-        <translation><p>알려진 광학 이미지 목록에서 가상 광학 디스크 <nobr><b>%1</b>을(를)</nobr> 삭제하시겠습니까?</p></translation>
+        <translation><p>알려진 광 이미지 목록에서 가상 광 디스크 <nobr><b>%1</b>을(를)</nobr> 삭제하시겠습니까?</p></translation>
     </message>
     <message>
         <source><p>Are you sure you want to remove the virtual floppy disk <nobr><b>%1</b></nobr> from the list of known disk image files?</p></source>
@@ -10526,7 +10526,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source><p>Unable to insert the virtual optical disk <nobr><b>%1</b></nobr> into the machine <b>%2</b>.</p></source>
-        <translation><p>가상 광학 디스크 <nobr><b>%1</b></nobr>을(를) 가상 머신 <b>%2</b>에 삽입할 수 없습니다.</p></translation>
+        <translation><p>가상 광 디스크 <nobr><b>%1</b></nobr>을(를) 가상 머신 <b>%2</b>에 삽입할 수 없습니다.</p></translation>
     </message>
     <message>
         <source><p>Would you like to try to force insertion of this disk?</p></source>
@@ -10534,7 +10534,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source><p>Unable to eject the virtual optical disk <nobr><b>%1</b></nobr> from the machine <b>%2</b>.</p></source>
-        <translation><p>가상 광학 디스크 <nobr><b>%1</b></nobr>을(를) 가상 머신 <b>%2</b>에서 꺼낼 수 없습니다.</p></translation>
+        <translation><p>가상 광 디스크 <nobr><b>%1</b></nobr>을(를) 가상 머신 <b>%2</b>에서 꺼낼 수 없습니다.</p></translation>
     </message>
     <message>
         <source><p>Would you like to try to force ejection of this disk?</p></source>
@@ -10706,11 +10706,11 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source><p>You are about to add a new optical drive to controller <b>%1</b>.</p><p>Would you like to choose a virtual optical disk to put in the drive or to leave it empty for now?</p></source>
-        <translation><p>새 광학 드라이브를 <b>%1</b> 컨트롤러에 추가하려고 하고 있습니다.</p><p>드라이브에 삽입할 가상 광학 디스크를 선택하거나, 나중에 추가하기 위해서 비워 두시겠습니까?</p></translation>
+        <translation><p>새 광학 드라이브를 <b>%1</b> 컨트롤러에 추가하려고 하고 있습니다.</p><p>드라이브에 삽입할 가상 광 디스크를 선택하거나, 나중에 추가하기 위해서 비워 두시겠습니까?</p></translation>
     </message>
     <message>
         <source><p>Are you sure you want to delete the optical drive?</p><p>You will not be able to insert any optical disks or ISO images or install the Guest Additions without it!</p></source>
-        <translation><p>이 광학 드라이브를 삭제하시겠습니까?</p><p>광학 디스크나 ISO 이미지를 마운트할 수도, 게스트 확장을 설치할 수도 없습니다!</p></translation>
+        <translation><p>이 광학 드라이브를 삭제하시겠습니까?</p><p>광 디스크나 ISO 이미지를 마운트할 수도, 게스트 확장을 설치할 수도 없습니다!</p></translation>
     </message>
     <message>
         <source>Failed to attach the optical drive (<nobr><b>%1</b></nobr>) to the slot <i>%2</i> of the machine <b>%3</b>.</source>
@@ -10822,7 +10822,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>You are about to create a new virtual machine without a hard disk. You will not be able to install an operating system on the machine until you add one. In the mean time you will only be able to start the machine using a virtual optical disk or from the network.</source>
-        <translation>하드 디스크 없이 가상 머신을 생성하려고 하고 있습니다. 하드 디스크를 추가하기 전까지 가상 머신에 운영 체제를 설치할 수 없습니다. 그 동안 가상 머신을 광학 디스크나 네트워크를 통해서만 시작할 수 있습니다.</translation>
+        <translation>하드 디스크 없이 가상 머신을 생성하려고 하고 있습니다. 하드 디스크를 추가하기 전까지 가상 머신에 운영 체제를 설치할 수 없습니다. 그 동안 가상 머신을 광 디스크나 네트워크를 통해서만 시작할 수 있습니다.</translation>
     </message>
     <message>
         <source><p>The virtual machine window will be now switched to <b>full-screen</b> mode. You can go back to windowed mode at any time by pressing <b>%1</b>.</p><p>Note that the <i>Host</i> key is currently defined as <b>%2</b>.</p><p>Note that the main menu bar is hidden in full-screen mode. You can access it by pressing <b>Host+Home</b>.</p></source>
@@ -10838,15 +10838,15 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>The current port forwarding rules are not valid. All of the host or guest address values should be correct or empty.</source>
-        <translation type="unfinished"></translation>
+        <translation>현재 포트 포워딩 규칙이 올바르지 않습니다. 호스트나 게스트의 정확한 주소를 지정하거나 비워 두어야 합니다.</translation>
     </message>
     <message>
         <source>The current port forwarding rules are not valid. None of the guest address values may be empty.</source>
-        <translation type="unfinished"></translation>
+        <translation>현재 포트 포워딩 규칙이 올바르지 않습니다. 게스트 주소를 비워 둘 수 없습니다.</translation>
     </message>
     <message>
         <source><p>Failed to acquire the VirtualBox COM object.</p><p>The application will now terminate.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>VirtualBox COM 개체를 얻을 수 없습니다.</p><p>프로그램을 종료합니다.</p></translation>
     </message>
 </context>
 <context>
@@ -10952,7 +10952,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Holds the location of the virtual machine.</source>
-        <translation type="unfinished"></translation>
+        <translation>가상 머신의 위치를 표시합니다.</translation>
     </message>
 </context>
 <context>
@@ -11043,42 +11043,42 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>%1: %2</source>
         <comment>Context description: Error description</comment>
-        <translation type="unfinished"></translation>
+        <translation>%1: %2</translation>
     </message>
     <message>
         <source>Unable to initialize HTTP library</source>
-        <translation type="unfinished"></translation>
+        <translation>HTTP 라이브러리를 초기화할 수 없음</translation>
     </message>
     <message>
         <source>Connection refused</source>
-        <translation type="unfinished"></translation>
+        <translation>연결이 거부됨</translation>
     </message>
     <message>
         <source>Content moved</source>
-        <translation type="unfinished"></translation>
+        <translation>내용이 이동됨</translation>
     </message>
     <message>
         <source>Proxy not found</source>
-        <translation type="unfinished"></translation>
+        <translation>프록시를 찾을 수 없음</translation>
     </message>
     <message>
         <source>Url not found on the server</source>
-        <translation type="unfinished"></translation>
+        <translation>서버에서 URL을 찾을 수 없음</translation>
     </message>
 </context>
 <context>
     <name>UINetworkReplyPrivateThread</name>
     <message>
         <source>During proxy configuration</source>
-        <translation type="unfinished"></translation>
+        <translation>프록시 설정 중</translation>
     </message>
     <message>
         <source>During certificate downloading</source>
-        <translation type="unfinished"></translation>
+        <translation>인증서 다운로드 중</translation>
     </message>
     <message>
         <source>During network request</source>
-        <translation type="unfinished"></translation>
+        <translation>네트워크 요청 중</translation>
     </message>
 </context>
 <context>
@@ -12449,15 +12449,15 @@ p, li { white-space: pre-wrap; }
     <name>UIVMInformationDialog</name>
     <message>
         <source>%1 - Session Information</source>
-        <translation type="unfinished">%1 - 세션 정보</translation>
+        <translation>%1 - 세션 정보</translation>
     </message>
     <message>
         <source>Configuration &Details</source>
-        <translation type="unfinished">설정 정보(&D)</translation>
+        <translation>설정 정보(&D)</translation>
     </message>
     <message>
         <source>&Runtime Information</source>
-        <translation type="unfinished">런타임 정보(&R)</translation>
+        <translation>런타임 정보(&R)</translation>
     </message>
 </context>
 <context>
@@ -12577,15 +12577,15 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Filter</source>
-        <translation type="unfinished"></translation>
+        <translation>필터</translation>
     </message>
     <message>
         <source>Enter filtering string here</source>
-        <translation type="unfinished"></translation>
+        <translation>필터 문자열을 입력하십시오</translation>
     </message>
     <message>
         <source>Fil&ter</source>
-        <translation type="unfinished"></translation>
+        <translation>필터(&T)</translation>
     </message>
 </context>
 <context>
@@ -13122,15 +13122,15 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source><p>Please select a virtual optical disk file or a physical optical drive containing a disk to start your new virtual machine from.</p><p>The disk should be suitable for starting a computer from and should contain the operating system you wish to install on the virtual machine if you want to do that now. The disk will be ejected from the virtual drive automatically next time you switch the virtual machine off, but you can also do this yourself if needed u [...]
-        <translation><p>새 가상 머신을 시작할 때 사용할 가상 광학 디스크 파일이나 물리적 광학 드라이브를 선택하십시오.</p><p>디스크는 부팅 가능해야 하며, 필요한 경우 가상 머신에 운영 체제를 설치할 수 있는 상태여야 합니다. 가상 머신을 끌 때 자동으로 드라이브에서 꺼내지지지만, 필요한 경우 장치 메뉴에서 직접 꺼낼 수 있습니다.</p></translation>
+        <translation><p>새 가상 머신을 시작할 때 사용할 가상 광 디스크 파일이나 물리적 광학 드라이브를 선택하십시오.</p><p>디스크는 부팅 가능해야 하며, 필요한 경우 가상 머신에 운영 체제를 설치할 수 있는 상태여야 합니다. 가상 머신을 끌 때 자동으로 드라이브에서 꺼내지지지만, 필요한 경우 장치 메뉴에서 직접 꺼낼 수 있습니다.</p></translation>
     </message>
     <message>
         <source><p>Please select a virtual optical disk file or a physical optical drive containing a disk to start your new virtual machine from.</p><p>The disk should be suitable for starting a computer from. As this virtual machine has no hard drive you will not be able to install an operating system on it at the moment.</p></source>
-        <translation><p>새 가상 머신을 시작할 때 사용할 가상 광학 디스크 파일이나 물리적 광학 드라이브를 선택하십시오.</p><p>디스크는 부팅 가능해야 합니다. 현재 가상 머신에 연결된 하드 드라이브가 없으므로 지금 당장 운영 체제를 설치할 수 없습니다.</p></translation>
+        <translation><p>새 가상 머신을 시작할 때 사용할 가상 광 디스크 파일이나 물리적 광학 드라이브를 선택하십시오.</p><p>디스크는 부팅 가능해야 합니다. 현재 가상 머신에 연결된 하드 드라이브가 없으므로 지금 당장 운영 체제를 설치할 수 없습니다.</p></translation>
     </message>
     <message>
         <source>Choose a virtual optical disk file...</source>
-        <translation>가상 광학 디스크 파일 선택...</translation>
+        <translation>가상 광 디스크 파일 선택...</translation>
     </message>
 </context>
 <context>
@@ -13189,31 +13189,31 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Appliance is not signed</source>
-        <translation type="unfinished"></translation>
+        <translation>가상 시스템이 서명되지 않았음</translation>
     </message>
     <message>
         <source>Appliance signed by %1 (trusted)</source>
-        <translation type="unfinished"></translation>
+        <translation>%1이(가) 가상 시스템에 서명함(신뢰할 수 있음)</translation>
     </message>
     <message>
         <source>Appliance signed by %1 (expired!)</source>
-        <translation type="unfinished"></translation>
+        <translation>%1이(가) 가상 시스템에 서명함(만료됨!)</translation>
     </message>
     <message>
         <source>Unverified signature by %1!</source>
-        <translation type="unfinished"></translation>
+        <translation>%1의 서명을 검증할 수 없음!</translation>
     </message>
     <message>
         <source>Self signed by %1 (trusted)</source>
-        <translation type="unfinished"></translation>
+        <translation>%1이(가) 자가 서명함(신뢰할 수 있음)</translation>
     </message>
     <message>
         <source>Self signed by %1 (expired!)</source>
-        <translation type="unfinished"></translation>
+        <translation>%1이(가) 자가 서명함(만료됨!)</translation>
     </message>
     <message>
         <source>Unverified self signed signature by %1!</source>
-        <translation type="unfinished"></translation>
+        <translation>%1의 자가 서명을 검증할 수 없음!</translation>
     </message>
 </context>
 <context>
@@ -13459,11 +13459,11 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source><p><nobr>Holds the name or full path to the virtual machine folder you are about to create.</nobr></p></source>
-        <translation type="unfinished"></translation>
+        <translation><p><nobr>생성할 가상 머신 폴더의 이름이나 전체 경로입니다.</nobr></p></translation>
     </message>
     <message>
         <source><p><nobr>You are about to create the virtual machine in the following folder:</nobr><br><nobr><b>%1</b></nobr></p></source>
-        <translation type="unfinished"></translation>
+        <translation><p><nobr>다음 폴더에 가상 머신을 생성하려고 합니다:</nobr><br><nobr><b>%1</b></nobr></p></translation>
     </message>
 </context>
 <context>
@@ -15891,11 +15891,11 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Please choose a virtual optical disk file</source>
-        <translation>가상 광학 디스크 파일 선택</translation>
+        <translation>가상 광 디스크 파일 선택</translation>
     </message>
     <message>
         <source>All virtual optical disk files (%1)</source>
-        <translation>모든 가상 광학 디스크 파일 (%1)</translation>
+        <translation>모든 가상 광 디스크 파일 (%1)</translation>
     </message>
     <message>
         <source>Please choose a virtual floppy disk file</source>
@@ -16099,7 +16099,7 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Optical</source>
         <comment>DeviceType</comment>
-        <translation>광학</translation>
+        <translation>광 디스크</translation>
     </message>
     <message>
         <source>TCP</source>
@@ -16170,102 +16170,102 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>USB</source>
         <comment>StorageBus</comment>
-        <translation type="unfinished">USB</translation>
+        <translation>USB</translation>
     </message>
     <message>
         <source>PCIe</source>
         <comment>StorageBus</comment>
-        <translation type="unfinished"></translation>
+        <translation>PCIe</translation>
     </message>
     <message>
         <source>NVMe</source>
         <comment>StorageControllerType</comment>
-        <translation type="unfinished"></translation>
+        <translation>NVMe</translation>
     </message>
     <message>
         <source>NVMe Port %1</source>
         <comment>StorageSlot</comment>
-        <translation type="unfinished"></translation>
+        <translation>NVMe 포트 %1</translation>
     </message>
     <message>
         <source>General</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">일반</translation>
+        <translation>일반</translation>
     </message>
     <message>
         <source>Preview</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">미리 보기</translation>
+        <translation>미리 보기</translation>
     </message>
     <message>
         <source>System</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">시스템</translation>
+        <translation>시스템</translation>
     </message>
     <message>
         <source>Display</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">디스플레이</translation>
+        <translation>디스플레이</translation>
     </message>
     <message>
         <source>Storage</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">저장소</translation>
+        <translation>저장소</translation>
     </message>
     <message>
         <source>Audio</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">오디오</translation>
+        <translation>오디오</translation>
     </message>
     <message>
         <source>Network</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">네트워크</translation>
+        <translation>네트워크</translation>
     </message>
     <message>
         <source>Serial ports</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">직렬 포트</translation>
+        <translation>직렬 포트</translation>
     </message>
     <message>
         <source>Parallel ports</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">병렬 포트</translation>
+        <translation>병렬 포트</translation>
     </message>
     <message>
         <source>USB</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">USB</translation>
+        <translation>USB</translation>
     </message>
     <message>
         <source>Shared folders</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">공유 폴더</translation>
+        <translation>공유 폴더</translation>
     </message>
     <message>
         <source>User interface</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">사용자 인터페이스</translation>
+        <translation>사용자 인터페이스</translation>
     </message>
     <message>
         <source>Description</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">설명</translation>
+        <translation>설명</translation>
     </message>
     <message>
         <source>Runtime attributes</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>런타임 속성</translation>
     </message>
     <message>
         <source>Storage statistics</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>저장소 통계</translation>
     </message>
     <message>
         <source>Network statistics</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>네트워크 통계</translation>
     </message>
 </context>
 <context>
diff --git a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_pl.ts b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_pl.ts
index 96791de..1a9e977 100644
--- a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_pl.ts
+++ b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_pl.ts
@@ -26,7 +26,7 @@
     <message>
         <source>Oracle Corporation</source>
         <comment>Comma-separated list of translators</comment>
-        <translation>Dawid Wrobel, Adrian Lubik, Wiktor Wandachowicz</translation>
+        <translation>Dawid Wrobel, Adrian Lubik, Wiktor Wandachowicz, hawkeye116477</translation>
     </message>
 </context>
 <context>
@@ -149,22 +149,22 @@
     </message>
     <message>
         <source>The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing<br/><br/>  <font color=blue>'/sbin/vboxconfig'</font><br/><br/>as root.</source>
-        <translation type="unfinished"></translation>
+        <translation>Sterownik Linuksowego jądra VirtualBox (vboxdrv) jest prawdopodobnie niezaładowany lub jest problem z uprawnieniami z /dev/vboxdrv. Proszę przeinstalować moduł jądra wykonując polecenie <br/><br/>  <font color=blue>'/sbin/vboxconfig'</font><br/><br/>jako root.</translation>
     </message>
     <message>
         <source>The VirtualBox kernel modules do not match this version of VirtualBox. The installation of VirtualBox was apparently not successful. Executing<br/><br/>  <font color=blue>'/sbin/vboxconfig'</font><br/><br/>may correct this. Make sure that you do not mix the OSE version and the PUEL version of VirtualBox.</source>
-        <translation type="unfinished"></translation>
+        <translation>Moduły jądra systemu nie odpowiadają tej wersji VirtualBox. Prawdopodobnie nie powiodła się instalacja programu VirtualBox. Wywołanie<br/><br/>  <font color=blue>'/sbin/rcvboxdrv setup'</font><br/><br/>może pomóc rozwiązać ten problem. Proszę także pamiętać, aby nie mieszać ze sobą wersji OSE oraz PUEL programu VirtualBox.</translation>
     </message>
 </context>
 <context>
     <name>QIArrowButtonPress</name>
     <message>
         <source>&Back</source>
-        <translation type="unfinished">&Wstecz</translation>
+        <translation>&Wstecz</translation>
     </message>
     <message>
         <source>&Next</source>
-        <translation type="unfinished"></translation>
+        <translation>&Dalej</translation>
     </message>
 </context>
 <context>
@@ -179,18 +179,18 @@
     </message>
     <message>
         <source>&Details</source>
-        <translation type="unfinished">&Szczegóły</translation>
+        <translation>&Szczegóły</translation>
     </message>
     <message>
         <source>&Details (%1 of %2)</source>
-        <translation type="unfinished">&Szczegóły (%1 z %2)</translation>
+        <translation>&Szczegóły (%1 z %2)</translation>
     </message>
 </context>
 <context>
     <name>QIFileDialog</name>
     <message>
         <source>Select a directory</source>
-        <translation>Wybierz katalog</translation>
+        <translation>Wybierz folder</translation>
     </message>
     <message>
         <source>Select a file</source>
@@ -261,11 +261,11 @@
     </message>
     <message>
         <source>Copy all errors to the clipboard</source>
-        <translation type="unfinished"></translation>
+        <translation>Skopiuj wszystkie błędy do schowka</translation>
     </message>
     <message>
         <source>Copy</source>
-        <translation type="unfinished"></translation>
+        <translation>Kopiuj</translation>
     </message>
 </context>
 <context>
@@ -319,7 +319,7 @@
     </message>
     <message>
         <source>Seam&less Mode</source>
-        <translation type="unfinished">T&ryb zintegrowany</translation>
+        <translation>T&ryb Seamless</translation>
     </message>
     <message>
         <source>Switch to seamless desktop integration mode</source>
@@ -327,7 +327,7 @@
     </message>
     <message>
         <source>Auto-resize &Guest Display</source>
-        <translation type="unfinished">Automatyczne skalowanie ekranu &gościa</translation>
+        <translation>Automatyczne skalowanie ekranu &gościa</translation>
     </message>
     <message>
         <source>Automatically resize the guest display when the window is resized (requires Guest Additions)</source>
@@ -463,11 +463,11 @@
     </message>
     <message>
         <source>&Shared Folders...</source>
-        <translation type="obsolete">W&spółdzielone katalogi...</translation>
+        <translation type="obsolete">W&spółdzielone folderi...</translation>
     </message>
     <message>
         <source>Create or modify shared folders</source>
-        <translation type="obsolete">Otwiera okno ustawień współdzielonych katalogów</translation>
+        <translation type="obsolete">Otwiera okno ustawień współdzielonych folderów</translation>
     </message>
     <message>
         <source>&Remote Display</source>
@@ -479,7 +479,7 @@
     </message>
     <message>
         <source>&Insert Guest Additions CD image...</source>
-        <translation type="unfinished">Za&instaluj Dodatki (Guest Additions)...</translation>
+        <translation>&Zamontuj obraz płyty z dodatkami gościa...</translation>
     </message>
     <message>
         <source>Insert the Guest Additions disk file into the virtual drive</source>
@@ -580,19 +580,19 @@
     </message>
     <message>
         <source>Switch between normal and seamless desktop integration mode</source>
-        <translation type="unfinished"></translation>
+        <translation>Przełącza pomiędzy zwykłym a zintegrowanym trybem Seamless pulpitu</translation>
     </message>
     <message>
         <source>Switch between normal and scaled mode</source>
-        <translation type="unfinished"></translation>
+        <translation>Przełącza pomiędzy zwykłym a zeskalowanym trybem</translation>
     </message>
     <message>
         <source>&Settings...</source>
-        <translation type="unfinished">U&stawienia...</translation>
+        <translation>&Ustawienia...</translation>
     </message>
     <message>
         <source>Session I&nformation...</source>
-        <translation type="unfinished"></translation>
+        <translation>I&nformacje o sesji</translation>
     </message>
     <message>
         <source>Show the log files of the selected virtual machine</source>
@@ -600,73 +600,73 @@
     </message>
     <message>
         <source>&Contents...</source>
-        <translation type="unfinished">&Zawartość...</translation>
+        <translation>&Pomoc programu VirtualBox...</translation>
     </message>
     <message>
         <source>Show help contents</source>
-        <translation type="unfinished"></translation>
+        <translation>Pokazuje zawartość pomocy</translation>
     </message>
     <message>
         <source>Open the browser and go to the VirtualBox product web site</source>
-        <translation type="unfinished">Otwiera przeglądarkę i przechodzi do strony domowej VirtualBox</translation>
+        <translation>Otwiera przeglądarkę i przechodzi do strony internetowej programu VirtualBox</translation>
     </message>
     <message>
         <source>Go back to showing all suppressed warnings and messages</source>
-        <translation type="unfinished">Powoduje, że wszystkie wyłączone typy ostrzeżeń i wiadomości będą pokazywane ponownie</translation>
+        <translation>Powoduje, że wszystkie wyłączone typy ostrzeżeń i wiadomości będą pokazywane ponownie</translation>
     </message>
     <message>
         <source>&Network Operations Manager...</source>
-        <translation type="unfinished"></translation>
+        <translation>&Menedźer operacji sieciowych...</translation>
     </message>
     <message>
         <source>Check for a new VirtualBox version</source>
-        <translation type="unfinished">Sprawdza czy dostępna jest nowa wersja VirtualBox</translation>
+        <translation>Sprawdza czy dostępna jest nowa wersja VirtualBox</translation>
     </message>
     <message>
         <source>&About VirtualBox...</source>
-        <translation type="unfinished">&O programie VirtualBox...</translation>
+        <translation>&O programie VirtualBox...</translation>
     </message>
     <message>
         <source>Take Sn&apshot...</source>
-        <translation type="unfinished"></translation>
+        <translation>Zrób mig&awkę...</translation>
     </message>
     <message>
         <source>Take Screensh&ot...</source>
-        <translation type="unfinished"></translation>
+        <translation>Zrób zrzut ekra&nu...</translation>
     </message>
     <message>
         <source>&File</source>
         <comment>Mac OS X version</comment>
-        <translation type="unfinished">&Plik</translation>
+        <translation>&Plik</translation>
     </message>
     <message>
         <source>&File</source>
         <comment>Non Mac OS X version</comment>
-        <translation type="unfinished">&Plik</translation>
+        <translation>&Plik</translation>
     </message>
     <message>
         <source>&Virtual Media Manager...</source>
-        <translation type="unfinished">&Menedżer nośników wirtualnych...</translation>
+        <translation>&Menedżer nośników wirtualnych...</translation>
     </message>
     <message>
         <source>Display the Virtual Media Manager window</source>
-        <translation type="unfinished">Wyświetla okno Menedżera nośników wirtualnych</translation>
+        <translation>Wyświetla okno Menedżera nośników wirtualnych</translation>
     </message>
     <message>
         <source>&Import Appliance...</source>
-        <translation type="unfinished">&Importuj urządzenie programowe...</translation>
+        <translation>&Importuj urządzenie wirtualne...</translation>
     </message>
     <message>
         <source>Import an appliance into VirtualBox</source>
-        <translation type="unfinished">Importuje urządzenie programowe (appliance) do VirtualBox</translation>
+        <translation>Importuje urządzenie wirtualne (VA) do VirtualBox</translation>
     </message>
     <message>
         <source>&Export Appliance...</source>
-        <translation type="unfinished">&Eksportuj urządzenie programowe...</translation>
+        <translation>&Eksportuj jako urządzenie wirtualne ...</translation>
     </message>
     <message>
         <source>Export one or more VirtualBox virtual machines as an appliance</source>
-        <translation type="unfinished">Eksportuje urządzenie programowe (appliance) składające się z maszyn VirtualBox</translation>
+        <translation>Eksportuje maszynę/y wirtualną/e VirtualBox jako urządzenie wirtualne (VA)</translation>
     </message>
     <message>
         <source>&Preferences...</source>
@@ -679,15 +679,15 @@
     </message>
     <message>
         <source>E&xit</source>
-        <translation type="unfinished"></translation>
+        <translation>Wy&jdź</translation>
     </message>
     <message>
         <source>Close application</source>
-        <translation type="unfinished">Zamyka aplikację</translation>
+        <translation>Zamyka aplikację</translation>
     </message>
     <message>
         <source>&Group</source>
-        <translation type="unfinished"></translation>
+        <translation>&Grupa</translation>
     </message>
     <message>
         <source>Create a new virtual machine</source>
@@ -695,7 +695,7 @@
     </message>
     <message>
         <source>S&tart</source>
-        <translation type="unfinished">Uru&chom</translation>
+        <translation>Uru&chom</translation>
     </message>
     <message>
         <source>Start the selected virtual machine</source>
@@ -703,7 +703,7 @@
     </message>
     <message>
         <source>S&how</source>
-        <translation type="unfinished">Po&każ</translation>
+        <translation>Po&każ</translation>
     </message>
     <message>
         <source>Switch to the window of the selected virtual machine</source>
@@ -715,23 +715,23 @@
     </message>
     <message>
         <source>&New...</source>
-        <translation type="unfinished"></translation>
+        <translation>&Nowa...</translation>
     </message>
     <message>
         <source>&Add...</source>
-        <translation type="unfinished">&Dodaj...</translation>
+        <translation>&Dodaj...</translation>
     </message>
     <message>
         <source>Cl&one...</source>
-        <translation type="unfinished"></translation>
+        <translation>Skl&onuj...</translation>
     </message>
     <message>
         <source>&Remove...</source>
-        <translation type="unfinished"></translation>
+        <translation>&Usuń...</translation>
     </message>
     <message>
         <source>Discard</source>
-        <translation type="unfinished">Odrzuć</translation>
+        <translation>Odrzuć</translation>
     </message>
     <message>
         <source>Discard the saved state of the selected virtual machine</source>
@@ -739,75 +739,76 @@
     </message>
     <message>
         <source>&Close</source>
-        <translation type="unfinished">Z&amknij</translation>
+        <translation>Z&amknij</translation>
     </message>
     <message>
         <source>Show &Log...</source>
-        <translation type="unfinished">Pokaż &log...</translation>
+        <translation>Pokaż &log...</translation>
     </message>
     <message>
         <source>&VirtualBox Web Site...</source>
-        <translation type="unfinished">Strona domowa &VirtualBox...</translation>
+        <translation>Strona internetowa programu &VirtualBox...</translation>
     </message>
     <message>
         <source>&Reset All Warnings</source>
-        <translation type="unfinished">Z&resetuj wszystkie ostrzeżenia</translation>
+        <translation>Z&resetuj wszystkie ostrzeżenia</translation>
     </message>
     <message>
         <source>C&heck for Updates...</source>
-        <translation type="unfinished">Spr&awdź dostępność aktualizacji...</translation>
+        <translation>Spr&awdź dostępność aktualizacji...</translation>
     </message>
     <message>
         <source>Rena&me Group...</source>
-        <translation type="unfinished"></translation>
+        <translation>Zmie&ń nazwę grupy...</translation>
     </message>
     <message>
         <source>Po&wer Off</source>
-        <translation type="unfinished"></translation>
+        <translation>Wy&łącz</translation>
     </message>
     <message>
         <source>&New Machine...</source>
-        <translation type="unfinished"></translation>
+        <translation>&Nowa maszyna...</translation>
     </message>
     <message>
         <source>&Add Machine...</source>
-        <translation type="unfinished"></translation>
+        <translatorcomment>&Dodaj maszynę...</translatorcomment>
+        <translation>Dodaj maszynę...</translation>
     </message>
     <message>
         <source>Gro&up</source>
-        <translation type="unfinished"></translation>
+        <translation>Gru&pa</translation>
     </message>
     <message>
         <source>Shared &Clipboard</source>
-        <translation type="unfinished"></translation>
+        <translation>Wspólny &schowek</translation>
     </message>
     <message>
         <source>Power off the virtual machine</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyłącza maszynę wirtualną</translation>
     </message>
     <message>
         <source>&Network Settings...</source>
-        <translation type="unfinished"></translation>
+        <translation>&Ustawienia sieciowe...</translation>
     </message>
     <message>
         <source>&Shared Folders Settings...</source>
-        <translation type="unfinished"></translation>
+        <translation>&Ustawienia udostępnianych folderów...</translation>
     </message>
     <message>
         <source>R&emote Display</source>
-        <translation type="unfinished"></translation>
+        <translation>Z&dalny pulpit</translation>
     </message>
     <message>
         <source>&Video Capture</source>
-        <translation type="unfinished"></translation>
+        <translation>&Przechwytywanie obrazu</translation>
     </message>
     <message>
         <source>&Video Capture Settings...</source>
-        <translation type="unfinished"></translation>
+        <translation>&Ustawienia przechwytywania obrazu...</translation>
     </message>
     <message>
         <source>Popup Menu</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyskakujące menu</translation>
     </message>
     <message>
         <source>&Insert Guest Additions CD image...</source>
@@ -821,7 +822,7 @@
     </message>
     <message>
         <source>&Webcams</source>
-        <translation type="unfinished"></translation>
+        <translation>&Kamerki internetowe</translation>
     </message>
     <message>
         <source>Network</source>
@@ -829,482 +830,482 @@
     </message>
     <message>
         <source>&VirtualBox</source>
-        <translation type="unfinished"></translation>
+        <translation>&VirtualBox</translation>
     </message>
     <message>
         <source>&File</source>
-        <translation type="unfinished">&Plik</translation>
+        <translation>&Plik</translation>
     </message>
     <message>
         <source>&Window</source>
-        <translation type="unfinished"></translation>
+        <translation>&Okno</translation>
     </message>
     <message>
         <source>&Minimize</source>
-        <translation type="unfinished"></translation>
+        <translation>&Minimalizuj</translation>
     </message>
     <message>
         <source>Minimize active window</source>
-        <translation type="unfinished"></translation>
+        <translation>Minimalizuje aktywne okno</translation>
     </message>
     <message>
         <source>Display the Network Operations Manager window</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyświetla okno menedżera operacji sieciowych</translation>
     </message>
     <message>
         <source>Display a window with product information</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyświetla okno z informacjami o programie</translation>
     </message>
     <message>
         <source>&Preferences...</source>
         <comment>global preferences window</comment>
-        <translation type="unfinished">&Globalne ustawienia...</translation>
+        <translation>&Globalne ustawienia...</translation>
     </message>
     <message>
         <source>Display the global preferences window</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyświetla okno globalnych ustawień</translation>
     </message>
     <message>
         <source>Display the virtual machine settings window</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyświetla okno ustawień wirtualnej maszyny</translation>
     </message>
     <message>
         <source>Display the virtual machine session information window</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyświetla okno z informacjami o sesji wirtualnej maszyny</translation>
     </message>
     <message>
         <source>&Save State</source>
-        <translation type="unfinished"></translation>
+        <translation>&Zapisz stan</translation>
     </message>
     <message>
         <source>Save the state of the virtual machine</source>
-        <translation type="unfinished"></translation>
+        <translation>Zapisuje aktualny stan wirtualnej maszyny</translation>
     </message>
     <message>
         <source>Send the ACPI Shutdown signal to the virtual machine</source>
-        <translation type="unfinished"></translation>
+        <translation>Wysyła sygnał wyłączania (ACPI) do wirtualnej maszyny</translation>
     </message>
     <message>
         <source>&Full-screen Mode</source>
-        <translation type="unfinished"></translation>
+        <translation>&Tryb pełnoekranowy</translation>
     </message>
     <message>
         <source>Switch between normal and full-screen mode</source>
-        <translation type="unfinished"></translation>
+        <translation>Przełącza pomiędzy zwykłym a pełnoekranowym trybem</translation>
     </message>
     <message>
         <source>S&caled Mode</source>
-        <translation type="unfinished"></translation>
+        <translation>T&ryb przeskalowany</translation>
     </message>
     <message>
         <source>&Minimize Window</source>
-        <translation type="unfinished"></translation>
+        <translation>&Minimalizuj okno</translation>
     </message>
     <message>
         <source>Automatically resize the guest display when the window is resized</source>
-        <translation type="unfinished"></translation>
+        <translation>Automatycznie skaluje ekran gościa przy zmianie rozmiaru okna</translation>
     </message>
     <message>
         <source>Take guest display screenshot</source>
-        <translation type="unfinished"></translation>
+        <translation>Robi zrzut ekranu gościa</translation>
     </message>
     <message>
         <source>Display virtual machine settings window to configure video capture</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyświetla ustawienia wirtualnej maszyny, by skonfigurować przechwytywanie obrazu</translation>
     </message>
     <message>
         <source>Enable guest display video capture</source>
-        <translation type="unfinished"></translation>
+        <translation>Włącz przechwytywanie obrazu z ekranu gościa</translation>
     </message>
     <message>
         <source>Allow remote desktop (RDP) connections to this machine</source>
-        <translation type="unfinished"></translation>
+        <translation>Pozwól na połączenia zdalnego pulpitu (RDP) do tej maszyny</translation>
     </message>
     <message>
         <source>&Menu Bar</source>
-        <translation type="unfinished"></translation>
+        <translation>&Pasek menu</translation>
     </message>
     <message>
         <source>&Menu Bar Settings...</source>
-        <translation type="unfinished"></translation>
+        <translation>&Ustawienia paska menu...</translation>
     </message>
     <message>
         <source>Display window to configure menu-bar</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyświetla okno, by skonfigurować pasek menu</translation>
     </message>
     <message>
         <source>Show Menu &Bar</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyświetl pasek menu</translation>
     </message>
     <message>
         <source>Enable menu-bar</source>
-        <translation type="unfinished"></translation>
+        <translation>Włącza wyświetlanie paska menu</translation>
     </message>
     <message>
         <source>&Status Bar</source>
-        <translation type="unfinished"></translation>
+        <translation>&Pasek stanu</translation>
     </message>
     <message>
         <source>&Status Bar Settings...</source>
-        <translation type="unfinished"></translation>
+        <translation>&Ustawienia paska stanu...</translation>
     </message>
     <message>
         <source>Display window to configure status-bar</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyświetla okno, by skonfigurować pasek stanu</translation>
     </message>
     <message>
         <source>Show Status &Bar</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyświetl pasek stanu</translation>
     </message>
     <message>
         <source>Enable status-bar</source>
-        <translation type="unfinished"></translation>
+        <translation>Włącza wyświetlanie paska stanu</translation>
     </message>
     <message>
         <source>S&cale Factor</source>
-        <translation type="unfinished"></translation>
+        <translation>Wsp&ółczynnik skali</translation>
     </message>
     <message>
         <source>&Input</source>
-        <translation type="unfinished"></translation>
+        <translation>&Wejście</translation>
     </message>
     <message>
         <source>&Keyboard</source>
-        <translation type="unfinished">&Klawiatura</translation>
+        <translation>&Klawiatura</translation>
     </message>
     <message>
         <source>&Keyboard Settings...</source>
-        <translation type="unfinished"></translation>
+        <translation>&Ustawienia klawiatury...</translation>
     </message>
     <message>
         <source>Display global preferences window to configure keyboard shortcuts</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyświetla okno globalnych ustawień, by skonfigurować skróty klawiszowe</translation>
     </message>
     <message>
         <source>&Insert %1</source>
         <comment>that means send the %1 key sequence to the virtual machine</comment>
-        <translation type="unfinished"></translation>
+        <translation>&Naciśnij %1</translation>
     </message>
     <message>
         <source>Send the %1 sequence to the virtual machine</source>
-        <translation type="unfinished"></translation>
+        <translation>Wysyła sekwencję %1 do wirtualnej maszyny</translation>
     </message>
     <message>
         <source>&Mouse</source>
-        <translation type="unfinished"></translation>
+        <translation>&Mysz</translation>
     </message>
     <message>
         <source>&Mouse Integration</source>
-        <translation type="unfinished"></translation>
+        <translation>&Integracja myszy</translation>
     </message>
     <message>
         <source>Enable host mouse pointer integration</source>
-        <translation type="unfinished"></translation>
+        <translation>Włącz integrację kursora myszy gospodarza</translation>
     </message>
     <message>
         <source>&Hard Disks</source>
-        <translation type="unfinished">&Dyski twarde</translation>
+        <translation>&Dyski twarde</translation>
     </message>
     <message>
         <source>&Hard Disk Settings...</source>
-        <translation type="unfinished"></translation>
+        <translation>&ustawienia dysków twardych...</translation>
     </message>
     <message>
         <source>Display virtual machine settings window to configure hard disks</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyświetla okno ustawień wirtualnej maszyny, by skonfigurować dyski twarde</translation>
     </message>
     <message>
         <source>&Optical Drives</source>
-        <translation type="unfinished"></translation>
+        <translation>&Napędy optyczne</translation>
     </message>
     <message>
         <source>&Floppy Drives</source>
-        <translation type="unfinished"></translation>
+        <translation>&Stacje dyskietek</translation>
     </message>
     <message>
         <source>&Network</source>
-        <translation type="unfinished"></translation>
+        <translation>&Sieć</translation>
     </message>
     <message>
         <source>Display virtual machine settings window to configure network adapters</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyświetla okno ustawień wirtualnej maszyny, by skonfigurować karty sieciowe</translation>
     </message>
     <message>
         <source>&USB</source>
-        <translation type="unfinished"></translation>
+        <translation>&USB</translation>
     </message>
     <message>
         <source>&USB Settings...</source>
-        <translation type="unfinished"></translation>
+        <translation>&Ustawienia USB...</translation>
     </message>
     <message>
         <source>Display virtual machine settings window to configure USB devices</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyświetla okno ustawień wirtualnej maszyny, by skonfigurować urządzenia USB</translation>
     </message>
     <message>
         <source>&Drag and Drop</source>
-        <translation type="unfinished"></translation>
+        <translation>&Przeciąganie i upuszczanie</translation>
     </message>
     <message>
         <source>&Shared Folders</source>
-        <translation type="unfinished"></translation>
+        <translation>&Udostępniane foldery</translation>
     </message>
     <message>
         <source>Display virtual machine settings window to configure shared folders</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyświetla okno wirtualnej maszyny, by skonfigurować udostępniane foldery</translation>
     </message>
     <message>
         <source>Insert the Guest Additions disk file into the virtual optical drive</source>
-        <translation type="unfinished"></translation>
+        <translation>Zamontuj plik dysku z dodatkami gościa do wirtualnego dysku optycznego</translation>
     </message>
     <message>
         <source>&Logging</source>
         <comment>debug action</comment>
-        <translation type="unfinished"></translation>
+        <translation>&Logowanie</translation>
     </message>
     <message>
         <source>Show &Log...</source>
         <comment>debug action</comment>
-        <translation type="unfinished">Pokaż &log...</translation>
+        <translation>Pokaż &log...</translation>
     </message>
     <message>
         <source>%1%</source>
         <comment>scale-factor</comment>
-        <translation type="unfinished">%1%</translation>
+        <translation>%1%</translation>
     </message>
     <message>
         <source>Enable</source>
         <comment>Virtual Screen</comment>
-        <translation type="unfinished">Włącz</translation>
+        <translation>Włącz</translation>
     </message>
     <message>
         <source>Resize to %1x%2</source>
         <comment>Virtual Screen</comment>
-        <translation type="unfinished"></translation>
+        <translation>Przeskaluj o %1x%2</translation>
     </message>
     <message>
         <source>Preview Monitor %1</source>
-        <translation type="unfinished">Pogląd monitora %1</translation>
+        <translation>Pogląd monitora %1</translation>
     </message>
     <message>
         <source>&Connect Network Adapter</source>
-        <translation type="unfinished"></translation>
+        <translation>&Podłącz kartę sieciową</translation>
     </message>
     <message>
         <source>Connect Network Adapter &%1</source>
-        <translation type="unfinished"></translation>
+        <translation>Podłącza kartę sieciową &%1</translation>
     </message>
     <message>
         <source>No USB Devices Connected</source>
-        <translation type="unfinished">Brak podłączonych urządzeń USB do tej maszyny wirtualnej</translation>
+        <translation>Brak podłączonych urządzeń USB</translation>
     </message>
     <message>
         <source>No supported devices connected to the host PC</source>
-        <translation type="unfinished"></translation>
+        <translation>Żadne wspierane urządzenie nie jest podłączone do komputera gospodarza</translation>
     </message>
     <message>
         <source>No Webcams Connected</source>
-        <translation type="unfinished"></translation>
+        <translation>Brak podłączonych kamerek internetowych</translation>
     </message>
     <message>
         <source>No supported webcams connected to the host PC</source>
-        <translation type="unfinished"></translation>
+        <translation>Żadna wspierana kamerka internetowa nie jest podłączona do komputera gospodarza</translation>
     </message>
     <message>
         <source>E&xtra Data Manager...</source>
-        <translation type="unfinished"></translation>
+        <translation>Men&edżer extra danych...</translation>
     </message>
     <message>
         <source>Display the Extra Data Manager window</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyświetla okno menedżera extra danych</translation>
     </message>
     <message>
         <source>Create new virtual machine</source>
-        <translation type="unfinished"></translation>
+        <translation>Tworzy nową maszynę wirtualną</translation>
     </message>
     <message>
         <source>Add existing virtual machine</source>
-        <translation type="unfinished"></translation>
+        <translation>Dodaje istniejacą maszynę wirtualną</translation>
     </message>
     <message>
         <source>Rename selected virtual machine group</source>
-        <translation type="unfinished"></translation>
+        <translation>Zmienia nazwę wybranej grupy wirtualnych maszyn</translation>
     </message>
     <message>
         <source>&Ungroup</source>
-        <translation type="unfinished"></translation>
+        <translation>&Odgrupuj</translation>
     </message>
     <message>
         <source>Ungroup items of selected virtual machine group</source>
-        <translation type="unfinished"></translation>
+        <translation>Odgrupowuje elementy wybranej grupy wirtualnych maszyn</translation>
     </message>
     <message>
         <source>&Sort</source>
-        <translation type="unfinished"></translation>
+        <translation>&Sortuj</translation>
     </message>
     <message>
         <source>Sort items of selected virtual machine group alphabetically</source>
-        <translation type="unfinished"></translation>
+        <translation>Sortuje alfabetycznie elementy wybranej grupy wirtualnych maszyn</translation>
     </message>
     <message>
         <source>Add new group based on selected virtual machines</source>
-        <translation type="unfinished"></translation>
+        <translation>Dodaje nową grupę na podstawie wybranych wirtualnych maszyn</translation>
     </message>
     <message>
         <source>Clone selected virtual machine</source>
-        <translation type="unfinished"></translation>
+        <translation>Powiela wybraną wirtualną maszynę</translation>
     </message>
     <message>
         <source>Remove selected virtual machines</source>
-        <translation type="unfinished"></translation>
+        <translation>Usuwa wybrane wirtualne maszyny</translation>
     </message>
     <message>
         <source>Start selected virtual machines</source>
-        <translation type="unfinished"></translation>
+        <translation>Uruchomia wybrane wirtualne maszyny</translation>
     </message>
     <message>
         <source>Switch to the windows of selected virtual machines</source>
-        <translation type="unfinished"></translation>
+        <translation>Przełącza do okna wybranych wirtualnych maszyn</translation>
     </message>
     <message>
         <source>&Normal Start</source>
-        <translation type="unfinished"></translation>
+        <translation>&Zwykły start</translation>
     </message>
     <message>
         <source>&Headless Start</source>
-        <translation type="unfinished"></translation>
+        <translation>&Bezgłowy start</translation>
     </message>
     <message>
         <source>Start selected virtual machines in the background</source>
-        <translation type="unfinished"></translation>
+        <translation>Uruchamia wybrane wirtualne maszyny w tle</translation>
     </message>
     <message>
         <source>&Detachable Start</source>
-        <translation type="unfinished"></translation>
+        <translation>&Oddzielny start</translation>
     </message>
     <message>
         <source>Start selected virtual machines with option of continuing in background</source>
-        <translation type="unfinished"></translation>
+        <translation>Uruchamia wybrane wirtualne maszyny z opcją kontynuowania w tle</translation>
     </message>
     <message>
         <source>Suspend execution of selected virtual machines</source>
-        <translation type="unfinished"></translation>
+        <translation>Wsztrzymuje wykonywanie wybranych maszyn wirtualnych</translation>
     </message>
     <message>
         <source>Reset selected virtual machines</source>
-        <translation type="unfinished"></translation>
+        <translation>Resetuje wybrane wirtualne maszyny</translation>
     </message>
     <message>
         <source>D&iscard Saved State...</source>
-        <translation type="unfinished"></translation>
+        <translation>Odrzu&ć zapisany stan...</translation>
     </message>
     <message>
         <source>Discard saved state of selected virtual machines</source>
-        <translation type="unfinished"></translation>
+        <translation>Odrzuca zapisany aktualny stan wybranych maszyn wirtualnych</translation>
     </message>
     <message>
         <source>Show log files of selected virtual machines</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyświetla log wybranych wirtualnych maszyn</translation>
     </message>
     <message>
         <source>Re&fresh</source>
-        <translation type="unfinished">&Odśwież</translation>
+        <translation>&Odśwież</translation>
     </message>
     <message>
         <source>Refresh accessibility state of selected virtual machines</source>
-        <translation type="unfinished"></translation>
+        <translation>Odświeża stan dostępności wybranych wirtualnych maszyn</translation>
     </message>
     <message>
         <source>S&how in Finder</source>
-        <translation type="unfinished"></translation>
+        <translation>&Pokaż w Finderze</translation>
     </message>
     <message>
         <source>Show the VirtualBox Machine Definition files in Finder</source>
-        <translation type="unfinished"></translation>
+        <translation>Pokazuje pliki maszyny VirtualBox w Finderze</translation>
     </message>
     <message>
         <source>S&how in Explorer</source>
-        <translation type="unfinished"></translation>
+        <translation>P&okaż w Eksploratorze</translation>
     </message>
     <message>
         <source>Show the VirtualBox Machine Definition files in Explorer</source>
-        <translation type="unfinished"></translation>
+        <translation>Pokazuje pliki maszyny VirtualBox w Eksploratorze</translation>
     </message>
     <message>
         <source>S&how in File Manager</source>
-        <translation type="unfinished"></translation>
+        <translation>Po&każ w menedżerze plików</translation>
     </message>
     <message>
         <source>Show the VirtualBox Machine Definition files in the File Manager</source>
-        <translation type="unfinished"></translation>
+        <translation>Poakzuje pliki maszyny VirtualBox w menedżerze plików</translation>
     </message>
     <message>
         <source>Cr&eate Alias on Desktop</source>
-        <translation type="unfinished"></translation>
+        <translation>St&wórz alias na pulpicie</translation>
     </message>
     <message>
         <source>Create alias files to the VirtualBox Machine Definition files on your desktop</source>
-        <translation type="unfinished"></translation>
+        <translation>Tworzy na pulpicie pliki aliasu do plików maszyny VirtualBox</translation>
     </message>
     <message>
         <source>Cr&eate Shortcut on Desktop</source>
-        <translation type="unfinished"></translation>
+        <translation>Utwó&rz skrót na pulpicie</translation>
     </message>
     <message>
         <source>Create shortcut files to the VirtualBox Machine Definition files on your desktop</source>
-        <translation type="unfinished"></translation>
+        <translation>Tworzy na pulpicie skrót do plików maszyny VirtualBox</translation>
     </message>
     <message>
         <source>Sort group of first selected virtual machine alphabetically</source>
-        <translation type="unfinished"></translation>
+        <translation>Sortuje alfabetycznie grupę pierwszej wybranej maszyny wirtualnej</translation>
     </message>
     <message>
         <source>Save state of selected virtual machines</source>
-        <translation type="unfinished"></translation>
+        <translation>Zapisuje stan wybranej maszyny wirtualnej</translation>
     </message>
     <message>
         <source>Send ACPI Shutdown signal to selected virtual machines</source>
-        <translation type="unfinished"></translation>
+        <translation>Wysyła sygnał wyłączania (ACPI) do wybranej maszyny wirtualnej</translation>
     </message>
     <message>
         <source>Power off selected virtual machines</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyłącza wybrane maszyny wirtualne</translation>
     </message>
     <message>
         <source>&VirtualBox Bug Tracker...</source>
-        <translation type="unfinished"></translation>
+        <translation>&Łapacz błędów programu VirtualBox...</translation>
     </message>
     <message>
         <source>Open the browser and go to the VirtualBox product bug tracker</source>
-        <translation type="unfinished"></translation>
+        <translation>Otwiera przeglądarkę i przechodzi do strony internetowej łapacza błędów VirtualBoxa</translation>
     </message>
     <message>
         <source>&VirtualBox Forums...</source>
-        <translation type="unfinished"></translation>
+        <translation>&Forum programu VirtualBox...</translation>
     </message>
     <message>
         <source>Open the browser and go to the VirtualBox product forums</source>
-        <translation type="unfinished"></translation>
+        <translation>Otwiera przeglądarkę i przechodzi do strony internetowej forum VirtualBoxa</translation>
     </message>
     <message>
         <source>&Oracle Web Site...</source>
-        <translation type="unfinished"></translation>
+        <translation>&Strona internetowa firmy Oracle...</translation>
     </message>
     <message>
         <source>Open the browser and go to the Oracle web site</source>
-        <translation type="unfinished"></translation>
+        <translation>Otwiera przeglądarkę i przechodzi do strony internetowej firmy Oracle</translation>
     </message>
     <message>
         <source>&Detach GUI</source>
-        <translation type="unfinished"></translation>
+        <translation>&Odłącz interfejs graficzny</translation>
     </message>
     <message>
         <source>Detach the GUI from headless VM</source>
-        <translation type="unfinished"></translation>
+        <translation>Odłącza interfejs graficzny od bezgłowego VM</translation>
     </message>
     <message>
         <source>Disable Dock Icon Overlay</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyłącz nakładkę ikon doku</translation>
     </message>
 </context>
 <context>
@@ -1312,32 +1313,32 @@
     <message>
         <source>ID</source>
         <comment>password table field</comment>
-        <translation type="unfinished"></translation>
+        <translation>Identyfikator</translation>
     </message>
     <message>
         <source>Password</source>
         <comment>password table field</comment>
-        <translation type="unfinished"></translation>
+        <translation>Hasło</translation>
     </message>
     <message numerus="yes">
         <source><nobr>Used by the following %n hard disk(s):</nobr><br>%1</source>
         <comment>This text is never used with n == 0. Feel free to drop the %n where possible, we only included it because of problems with Qt Linguist (but the user can see how many hard drives are in the tool-tip and doesn't need to be told).</comment>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
+        <translation>
+            <numerusform><nobr>Używany przez następujący %n twardy dysk:</nobr><br>%1</numerusform>
+            <numerusform><nobr>Używany przez następujące %n twarde dyski:</nobr><br>%1</numerusform>
             <numerusform></numerusform>
         </translation>
     </message>
     <message>
         <source>%1 - Disk Encryption</source>
-        <translation type="unfinished"></translation>
+        <translation>Szyfrowanie dysku %1 - </translation>
     </message>
     <message numerus="yes">
         <source>This virtual machine is password protected. Please enter the %n encryption password(s) below.</source>
         <comment>This text is never used with n == 0. Feel free to drop the %n where possible, we only included it because of problems with Qt Linguist (but the user can see how many passwords are in the list and doesn't need to be told).</comment>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
+        <translation>
+            <numerusform>Ta wirtualna maszyna jest chroniona hasłem. Proszę wprowadzić hasło szyfrowania poniżej.</numerusform>
+            <numerusform>Ta wirtualna maszyna jest chroniona hasłem. Proszę wprowadzić hasła szyfrowania poniżej.</numerusform>
             <numerusform></numerusform>
         </translation>
     </message>
@@ -1382,7 +1383,7 @@
     </message>
     <message>
         <source>Guest OS Type</source>
-        <translation>Typ systemu operacyjnego gościa</translation>
+        <translation>Typ goszczonego systemu operacyjnego</translation>
     </message>
     <message>
         <source>CPU</source>
@@ -1464,27 +1465,27 @@
     </message>
     <message>
         <source>When checked a new unique MAC address will assigned to all configured network cards.</source>
-        <translation type="unfinished"></translation>
+        <translation>Po zaznaczeniu tej opcji, zostanie przydzielony nowy unikalny adres MAC do skonfigurowanych kart sieciowych</translation>
     </message>
     <message>
         <source>&Reinitialize the MAC address of all network cards</source>
-        <translation type="unfinished"></translation>
+        <translation>&Zainicjuj ponownie adres MAC do wszystkich kart sieciowych</translation>
     </message>
     <message>
         <source>Storage Controller (IDE)</source>
-        <translation type="unfinished"></translation>
+        <translation>Kontroler pamięci masowej (IDE)</translation>
     </message>
     <message>
         <source>Storage Controller (SATA)</source>
-        <translation type="unfinished"></translation>
+        <translation>Kontroler pamięci masowej (SATA)</translation>
     </message>
     <message>
         <source>Storage Controller (SCSI)</source>
-        <translation type="unfinished"></translation>
+        <translation>Kontroler pamięci masowej (SCSI)</translation>
     </message>
     <message>
         <source>Storage Controller (SAS)</source>
-        <translation type="unfinished"></translation>
+        <translation>Kontroler pamięci masowej (SAS)</translation>
     </message>
 </context>
 <context>
@@ -1502,73 +1503,113 @@
     <name>UIApplianceUnverifiedCertificateViewer</name>
     <message>
         <source>Unverifiable Certificate! Continue?</source>
-        <translation type="unfinished"></translation>
+        <translation>Niezweryfikowany certyfikat! Kontynuować?</translation>
     </message>
     <message>
         <source><b>The appliance is signed by an unverified self signed certificate issued by '%1'. We recommend to only proceed with the importing if you are sure you should trust this entity.</b></source>
-        <translation type="unfinished"></translation>
+        <translation><b>Urządzenie zostało samodzielnie podpisane przez niezweryfikowany certyfikat wydany przez '%1'. Zalecamy, by kontynuować tylko jeśli ma się pewność, że ufa się tej organizacji.</b></translation>
     </message>
     <message>
         <source><b>The appliance is signed by an unverified certificate issued to '%1'. We recommend to only proceed with the importing if you are sure you should trust this entity.</b></source>
-        <translation type="unfinished"></translation>
+        <translation><b>Urządzenie zostało podpisane przez niezweryfikowany certyfikat wydany przez '%1'. Zalecamy, by kontynuować tylko jeśli ma się pewność, że ufa się tej organizacji.</b></translation>
+    </message>
+    <message>
+        <source>Issuer:               %1</source>
+        <translation type="vanished">Emitent:               %1</translation>
+    </message>
+    <message>
+        <source>Subject:              %1</source>
+        <translation type="vanished">Podmiot:              %1</translation>
+    </message>
+    <message>
+        <source>Not Valid Before:     %1</source>
+        <translation type="vanished">Ważny od dnia:     %1</translation>
+    </message>
+    <message>
+        <source>Not Valid After:      %1</source>
+        <translation type="vanished">Wygasa dnia:      %1</translation>
+    </message>
+    <message>
+        <source>Serial Number:        %1</source>
+        <translation type="vanished">Numer seryjny:        %1</translation>
+    </message>
+    <message>
+        <source>Self-Signed:          %1</source>
+        <translation type="vanished">Samopodpisany:          %1</translation>
     </message>
     <message>
         <source>True</source>
-        <translation type="unfinished"></translation>
+        <translation>Prawda</translation>
     </message>
     <message>
         <source>False</source>
-        <translation type="unfinished"></translation>
+        <translation>Fałsz</translation>
+    </message>
+    <message>
+        <source>Authority (CA):       %1</source>
+        <translation type="vanished">Urząd certyfikacji:       %1</translation>
+    </message>
+    <message>
+        <source>Public Algorithm:     %1 (%2)</source>
+        <translation type="vanished">Klucz publiczny:     %1 (%2)</translation>
+    </message>
+    <message>
+        <source>Signature Algorithm:  %1 (%2)</source>
+        <translation type="vanished">Algorytm podpisu:  %1 (%2)</translation>
+    </message>
+    <message>
+        <source>X.509 Version Number: %1</source>
+        <translation type="vanished">Wersja X.509: %1</translation>
     </message>
     <message>
         <source><tr><td>%1:</td><td>%2</td></tr></source>
         <comment>key: value</comment>
-        <translation type="unfinished"></translation>
+        <translation><tr><td>%1:</td><td>%2</td></tr></translation>
     </message>
     <message>
         <source>Issuer</source>
-        <translation type="unfinished"></translation>
+        <translation>Emitent</translation>
     </message>
     <message>
         <source>Subject</source>
-        <translation type="unfinished"></translation>
+        <translation>Podmiot</translation>
     </message>
     <message>
         <source>Not Valid Before</source>
-        <translation type="unfinished"></translation>
+        <translation>Ważny od dnia</translation>
     </message>
     <message>
         <source>Not Valid After</source>
-        <translation type="unfinished"></translation>
+        <translation>Wygasa dnia</translation>
     </message>
     <message>
         <source>Serial Number</source>
-        <translation type="unfinished"></translation>
+        <translation>Numer seryjny</translation>
     </message>
     <message>
         <source>Self-Signed</source>
-        <translation type="unfinished"></translation>
+        <translation>Samopodpisany</translation>
     </message>
     <message>
         <source>Authority (CA)</source>
-        <translation type="unfinished"></translation>
+        <translation>Urząd certyfikacji (CA)</translation>
     </message>
     <message>
         <source>Public Algorithm</source>
-        <translation type="unfinished"></translation>
+        <translation>Klucz publiczny</translation>
     </message>
     <message>
         <source>%1 (%2)</source>
         <comment>value (clarification)</comment>
-        <translation type="unfinished"></translation>
+        <translation>%1 (%2)</translation>
     </message>
     <message>
         <source>Signature Algorithm</source>
-        <translation type="unfinished"></translation>
+        <translation>Algorytm podpisu</translation>
     </message>
     <message>
         <source>X.509 Version Number</source>
-        <translation type="unfinished"></translation>
+        <translation>Numer wersji X.509</translation>
     </message>
 </context>
 <context>
@@ -1601,7 +1642,7 @@
     <message>
         <source>Base Memory</source>
         <comment>details report</comment>
-        <translation type="obsolete">Pamięć podstawowa</translation>
+        <translation type="obsolete">RAM</translation>
     </message>
     <message>
         <source><nobr>%1 MB</nobr></source>
@@ -1720,7 +1761,7 @@
     <message>
         <source>Shared Folders</source>
         <comment>details report (shared folders)</comment>
-        <translation type="obsolete">Współdzielone katalogi</translation>
+        <translation type="obsolete">Współdzielone folderi</translation>
     </message>
     <message>
         <source>None</source>
@@ -1748,7 +1789,7 @@
     <message>
         <source>Base Memory</source>
         <comment>details report</comment>
-        <translation type="obsolete">Pamięć podstawowa</translation>
+        <translation type="obsolete">RAM</translation>
     </message>
     <message>
         <source><nobr>%1 MB</nobr></source>
@@ -1872,7 +1913,7 @@
     <message>
         <source>Shared Folders</source>
         <comment>details report (shared folders)</comment>
-        <translation type="obsolete">Współdzielone katalogi</translation>
+        <translation type="obsolete">Współdzielone folderi</translation>
     </message>
     <message>
         <source>None</source>
@@ -1886,7 +1927,7 @@
     </message>
     <message>
         <source>The selected virtual machine is <i>inaccessible</i>. Please inspect the error message shown below and press the <b>Refresh</b> button if you want to repeat the accessibility check:</source>
-        <translation type="unfinished">Wybrana maszyna wirtualna jest <i>niedostępna</i>. Proszę prześledzić poniższą wiadomość błędu i wcisnąć przycisk <b>Odśwież</b> w celu powtórzenia sprawdzenia dostępności:</translation>
+        <translation>Wybrana maszyna wirtualna jest <i>niedostępna</i>. Proszę prześledzić poniższą wiadomość błędu i wcisnąć przycisk <b>Odśwież</b> w celu powtórzenia sprawdzenia dostępności:</translation>
     </message>
     <message>
         <source>General</source>
@@ -1906,7 +1947,7 @@
     <message>
         <source>Storage</source>
         <comment>details report</comment>
-        <translation type="obsolete">Nośniki</translation>
+        <translation type="obsolete">Pamięć</translation>
     </message>
     <message>
         <source>Audio</source>
@@ -1936,7 +1977,7 @@
     <message>
         <source>Shared Folders</source>
         <comment>details report</comment>
-        <translation type="obsolete">Współdzielone katalogi</translation>
+        <translation type="obsolete">Współdzielone folderi</translation>
     </message>
     <message>
         <source>Description</source>
@@ -1948,11 +1989,11 @@
     <name>UIDnDHandler</name>
     <message>
         <source>Dropping data ...</source>
-        <translation type="unfinished"></translation>
+        <translation>Zrzucanie danych ...</translation>
     </message>
     <message>
         <source>Retrieving data ...</source>
-        <translation type="unfinished"></translation>
+        <translation>Odzyskiwanie danych ...</translation>
     </message>
 </context>
 <context>
@@ -1991,7 +2032,7 @@
     </message>
     <message>
         <source>Select folder to save Guest Additions image to</source>
-        <translation type="obsolete">Wybierz katalog, w którym zostanie zapisany plik obrazu z Dodatkami (VirtualBox Guest Additions)</translation>
+        <translation type="obsolete">Wybierz folder, w którym zostanie zapisany plik obrazu z Dodatkami (VirtualBox Guest Additions)</translation>
     </message>
     <message>
         <source>Connection timed out.</source>
@@ -2007,11 +2048,11 @@
     </message>
     <message>
         <source>Looking for %1...</source>
-        <translation type="unfinished"></translation>
+        <translation>Szukanie %1...</translation>
     </message>
     <message>
         <source>Downloading %1...</source>
-        <translation type="unfinished"></translation>
+        <translation>Pobieranie %1...</translation>
     </message>
 </context>
 <context>
@@ -2034,40 +2075,40 @@
     </message>
     <message>
         <source>Select folder to save Guest Additions image to</source>
-        <translation>Wybierz katalog, w którym zostanie zapisany plik obrazu z Dodatkami (VirtualBox Guest Additions)</translation>
+        <translation>Wybierz folder, w którym zostanie zapisany plik obrazu z Dodatkami (VirtualBox Guest Additions)</translation>
     </message>
     <message>
         <source>VirtualBox Guest Additions</source>
-        <translation type="unfinished"></translation>
+        <translation>Dodatki gościa VirtualBox</translation>
     </message>
 </context>
 <context>
     <name>UIDownloaderExtensionPack</name>
     <message>
         <source>Select folder to save %1 to</source>
-        <translation type="unfinished"></translation>
+        <translation>Wybierz folder, by zapisać %1 do</translation>
     </message>
     <message>
         <source>VirtualBox Extension Pack</source>
-        <translation type="unfinished"></translation>
+        <translation>Paczka rozszerzeń VirtualBox</translation>
     </message>
 </context>
 <context>
     <name>UIDownloaderUserManual</name>
     <message>
         <source>Select folder to save User Manual to</source>
-        <translation>Wybierz katalog, w którym zostanie zapisana Instrukcja Użytkownika</translation>
+        <translation>Wybierz folder, w którym zostanie zapisana Instrukcja Użytkownika</translation>
     </message>
     <message>
         <source>VirtualBox User Manual</source>
-        <translation type="unfinished"></translation>
+        <translation>Instrukcja obsługi VirtualBox</translation>
     </message>
 </context>
 <context>
     <name>UIEmptyFilePathSelector</name>
     <message>
         <source>Choose...</source>
-        <translation type="unfinished"></translation>
+        <translation>Wybierz...</translation>
     </message>
 </context>
 <context>
@@ -2393,55 +2434,55 @@ p, li { white-space: pre-wrap; }
     <name>UIFilePathSelector</name>
     <message>
         <source>&Copy</source>
-        <translation type="unfinished">S&kopiuj</translation>
+        <translation>&Kopiuj</translation>
     </message>
     <message>
         <source>Other...</source>
-        <translation type="unfinished">Inny...</translation>
+        <translation>Inny...</translation>
     </message>
     <message>
         <source>Reset</source>
-        <translation type="unfinished">Zresetuj</translation>
+        <translation>Zresetuj</translation>
     </message>
     <message>
         <source>Displays a window to select a different folder.</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyświetla okno, by wybrać inny folder.</translation>
     </message>
     <message>
         <source>Resets the folder path to the default value.</source>
-        <translation type="unfinished">Przywraca domyślną ścieżkę do katalogu.</translation>
+        <translation>Przywraca domyślną ścieżkę do folderu.</translation>
     </message>
     <message>
         <source>Displays a window to select a different file.</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyświetla okno, by wybrać inny plik</translation>
     </message>
     <message>
         <source>Resets the file path to the default value.</source>
-        <translation type="unfinished">Przywraca domyślną ścieżkę do pliku.</translation>
+        <translation>Przywraca domyślną ścieżkę do pliku.</translation>
     </message>
     <message>
         <source><reset to default></source>
-        <translation type="unfinished"><przywróć domyślny></translation>
+        <translation><przywróć domyślną></translation>
     </message>
     <message>
         <source>The actual default path value will be displayed after accepting the changes and opening this window again.</source>
-        <translation type="unfinished">Aktualna domyślna ścieżka będzie widoczna po zatwierdzeniu zmian i ponownym otwarciu tego okna.</translation>
+        <translation>Aktualna domyślna ścieżka będzie widoczna po zatwierdzeniu zmian i ponownym otwarciu tego okna.</translation>
     </message>
     <message>
         <source><not selected></source>
-        <translation type="unfinished"></translation>
+        <translation><nie wybrano></translation>
     </message>
     <message>
         <source>Please use the <b>Other...</b> item from the drop-down list to select a path.</source>
-        <translation type="unfinished">Proszę użyć opcji <b>Inny...</b> z listy rozwijanej aby wybrać żądaną ścieżkę.</translation>
+        <translation>Proszę użyć opcji <b>Inny...</b> z listy rozwijanej aby wybrać żądaną ścieżkę.</translation>
     </message>
     <message>
         <source>Holds the folder path.</source>
-        <translation type="unfinished"></translation>
+        <translation>Przechowuje ścieżkę do folderu</translation>
     </message>
     <message>
         <source>Holds the file path.</source>
-        <translation type="unfinished"></translation>
+        <translation>Przechowuje ścieżkę do pliku</translation>
     </message>
 </context>
 <context>
@@ -2484,7 +2525,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source><p>Select the media which contains the setup program of the operating system you want to install. This media must be bootable, otherwise the setup program will not be able to start.</p></source>
-        <translation type="obsolete"><p>Proszę wskazać nośnik zawierający program instalacyjny instalowanego systemu operacyjnego. Nośnik musi być uruchamialny, w przeciwnym razie program instalacyjny nie wystartuje.</p></translation>
+        <translation type="obsolete"><p>Proszę wskazać nośnik Przechowujejący program instalacyjny instalowanego systemu operacyjnego. Nośnik musi być uruchamialny, w przeciwnym razie program instalacyjny nie wystartuje.</p></translation>
     </message>
     <message>
         <source>Media Source</source>
@@ -2552,7 +2593,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source><p>Select the media that contains the operating system you want to work with. This media must be bootable, otherwise the operating system will not be able to start.</p></source>
-        <translation type="obsolete"><p>Proszę wskazać nośnik zawierający system operacyjny, który ma zostać uruchomiony. Nośnik musi być uruchamialny, w przeciwnym razie system operacyjny nie wystartuje.</p></translation>
+        <translation type="obsolete"><p>Proszę wskazać nośnik Przechowujejący system operacyjny, który ma zostać uruchomiony. Nośnik musi być uruchamialny, w przeciwnym razie system operacyjny nie wystartuje.</p></translation>
     </message>
     <message>
         <source><p>You have selected the following media to boot an operating system from:</p></source>
@@ -2623,11 +2664,11 @@ p, li { white-space: pre-wrap; }
     <name>UIFirstRunWzdPage2</name>
     <message>
         <source><p>Select the media which contains the setup program of the operating system you want to install. This media must be bootable, otherwise the setup program will not be able to start.</p></source>
-        <translation type="obsolete"><p>Proszę wskazać nośnik zawierający program instalacyjny instalowanego systemu operacyjnego. Nośnik musi być uruchamialny, w przeciwnym razie program instalacyjny nie wystartuje.</p></translation>
+        <translation type="obsolete"><p>Proszę wskazać nośnik Przechowujejący program instalacyjny instalowanego systemu operacyjnego. Nośnik musi być uruchamialny, w przeciwnym razie program instalacyjny nie wystartuje.</p></translation>
     </message>
     <message>
         <source><p>Select the media that contains the operating system you want to work with. This media must be bootable, otherwise the operating system will not be able to start.</p></source>
-        <translation type="obsolete"><p>Proszę wskazać nośnik zawierający system operacyjny, który ma zostać uruchomiony. Nośnik musi być uruchamialny, w przeciwnym razie system operacyjny nie wystartuje.</p></translation>
+        <translation type="obsolete"><p>Proszę wskazać nośnik Przechowujejący system operacyjny, który ma zostać uruchomiony. Nośnik musi być uruchamialny, w przeciwnym razie system operacyjny nie wystartuje.</p></translation>
     </message>
     <message>
         <source>Media Source</source>
@@ -2680,72 +2721,72 @@ p, li { white-space: pre-wrap; }
     <message>
         <source><b>%1</b></source>
         <comment>Group item tool-tip / Group name</comment>
-        <translation type="unfinished"></translation>
+        <translation><b>%1</b></translation>
     </message>
     <message numerus="yes">
         <source>%n group(s)</source>
         <comment>Group item tool-tip / Group info</comment>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-            <numerusform></numerusform>
+        <translation>
+            <numerusform>%n grupa</numerusform>
+            <numerusform>%n grup</numerusform>
+            <numerusform>%n grupy</numerusform>
         </translation>
     </message>
     <message>
         <source><nobr>%1</nobr></source>
         <comment>Group item tool-tip / Group info wrapper</comment>
-        <translation type="unfinished"><nobr>%1</nobr></translation>
+        <translation><nobr>%1</nobr></translation>
     </message>
     <message numerus="yes">
         <source>%n machine(s)</source>
         <comment>Group item tool-tip / Machine info</comment>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-            <numerusform></numerusform>
+        <translation>
+            <numerusform>%n maszyna</numerusform>
+            <numerusform>%n maszyn</numerusform>
+            <numerusform>%n maszyny</numerusform>
         </translation>
     </message>
     <message numerus="yes">
         <source>(%n running)</source>
         <comment>Group item tool-tip / Running machine info</comment>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-            <numerusform></numerusform>
+        <translation>
+            <numerusform>(%n uruchomiona)</numerusform>
+            <numerusform>(%n uruchomione)</numerusform>
+            <numerusform>(%n uruchomionych)</numerusform>
         </translation>
     </message>
     <message>
         <source><nobr>%1</nobr></source>
         <comment>Group item tool-tip / Machine info wrapper</comment>
-        <translation type="unfinished"><nobr>%1</nobr></translation>
+        <translation><nobr>%1</nobr></translation>
     </message>
     <message>
         <source><nobr>%1 %2</nobr></source>
         <comment>Group item tool-tip / Machine info wrapper, including running</comment>
-        <translation type="unfinished"><nobr>%1</nobr> {1 %2<?}</translation>
+        <translation><nobr>%1</nobr> {1 %2<?}</translation>
     </message>
     <message>
         <source>Collapse group</source>
-        <translation type="unfinished"></translation>
+        <translation>Zwiń grupę</translation>
     </message>
     <message>
         <source>Expand group</source>
-        <translation type="unfinished"></translation>
+        <translation>Rozwiń grupę</translation>
     </message>
     <message>
         <source>Enter group</source>
-        <translation type="unfinished"></translation>
+        <translation>Wejdź do grupy</translation>
     </message>
     <message>
         <source>Exit group</source>
-        <translation type="unfinished"></translation>
+        <translation>Zamknij grupę</translation>
     </message>
 </context>
 <context>
     <name>UIGChooserModel</name>
     <message>
         <source>New group</source>
-        <translation type="unfinished"></translation>
+        <translation>Nowa grupa</translation>
     </message>
 </context>
 <context>
@@ -2753,62 +2794,62 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Name</source>
         <comment>details (general)</comment>
-        <translation type="unfinished">Nazwa</translation>
+        <translation>Nazwa</translation>
     </message>
     <message>
         <source>Groups</source>
         <comment>details (general)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Grupy</translation>
     </message>
     <message>
         <source>%1 MB</source>
         <comment>details</comment>
-        <translation type="unfinished"></translation>
+        <translation>%1 MB</translation>
     </message>
     <message>
         <source>Processors</source>
         <comment>details (system)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Procesory</translation>
     </message>
     <message>
         <source>%1%</source>
         <comment>details</comment>
-        <translation type="unfinished">%1%</translation>
+        <translation>%1%</translation>
     </message>
     <message>
         <source>VT-x/AMD-V</source>
         <comment>details (system)</comment>
-        <translation type="unfinished">VT-x/AMD-V</translation>
+        <translation>VT-x/AMD-V</translation>
     </message>
     <message>
         <source>PAE/NX</source>
         <comment>details (system)</comment>
-        <translation type="unfinished">PAE/NX</translation>
+        <translation>PAE/NX</translation>
     </message>
     <message>
         <source>Acceleration</source>
         <comment>details (system)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Akceleracja</translation>
     </message>
     <message>
         <source>Screens</source>
         <comment>details (display)</comment>
-        <translation type="unfinished">Ekrany</translation>
+        <translation>Ekrany</translation>
     </message>
     <message>
         <source>3D</source>
         <comment>details (display)</comment>
-        <translation type="unfinished">3D</translation>
+        <translation>3D</translation>
     </message>
     <message>
         <source>Acceleration</source>
         <comment>details (display)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Akceleracja</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details (display/vrde/VRDE server)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Wyłączony</translation>
     </message>
     <message>
         <source>Not attached</source>
@@ -2818,12 +2859,12 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Controller</source>
         <comment>details (audio)</comment>
-        <translation type="unfinished">Kontroler</translation>
+        <translation>Karta dźwiękowa</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details (audio)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Wyłączony</translation>
     </message>
     <message>
         <source>Bridged adapter, %1</source>
@@ -2843,276 +2884,276 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Adapter %1</source>
         <comment>details (network)</comment>
-        <translation type="unfinished">Karta %1</translation>
+        <translation>Karta %1</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details (network/adapter)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Wyłączona</translation>
     </message>
     <message>
         <source>Port %1</source>
         <comment>details (serial)</comment>
-        <translation type="unfinished">Port %1</translation>
+        <translation>Port %1</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details (serial)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Wyłączony</translation>
     </message>
     <message>
         <source>Port %1</source>
         <comment>details (parallel)</comment>
-        <translation type="unfinished">Port %1</translation>
+        <translation>Port %1</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details (parallel)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Wyłączony</translation>
     </message>
     <message>
         <source>%1 (%2 active)</source>
         <comment>details (usb)</comment>
-        <translation type="unfinished">%1 (aktywne: %2)</translation>
+        <translation>%1 (aktywne: %2)</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details (usb)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Wyłączony</translation>
     </message>
     <message>
         <source>None</source>
         <comment>details (shared folders)</comment>
-        <translation type="unfinished">Brak</translation>
+        <translation>Brak</translation>
     </message>
     <message>
         <source>None</source>
         <comment>details (description)</comment>
-        <translation type="unfinished">Brak</translation>
+        <translation>Brak</translation>
     </message>
     <message>
         <source>Operating System</source>
         <comment>details (general)</comment>
-        <translation type="unfinished"></translation>
+        <translation>System operacyjny</translation>
     </message>
     <message>
         <source>Information Inaccessible</source>
         <comment>details</comment>
-        <translation type="unfinished"></translation>
+        <translation>Informacje niedostępne</translation>
     </message>
     <message>
         <source>Base Memory</source>
         <comment>details (system)</comment>
-        <translation type="unfinished">Pamięć podstawowa</translation>
+        <translation>RAM</translation>
     </message>
     <message>
         <source>Execution Cap</source>
         <comment>details (system)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Wykorzystanie procesora</translation>
     </message>
     <message>
         <source>Boot Order</source>
         <comment>details (system)</comment>
-        <translation type="unfinished">Kolejność startowania</translation>
+        <translation>Kolejność bootowania</translation>
     </message>
     <message>
         <source>Nested Paging</source>
         <comment>details (system)</comment>
-        <translation type="unfinished">Zagnieżdżone stronicowanie</translation>
+        <translation>Zagnieżdżone stronicowanie</translation>
     </message>
     <message>
         <source>Video Memory</source>
         <comment>details (display)</comment>
-        <translation type="unfinished">Pamięć wideo</translation>
+        <translation>Pamięć wideo</translation>
     </message>
     <message>
         <source>2D Video</source>
         <comment>details (display)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Obraz 2D</translation>
     </message>
     <message>
         <source>Remote Desktop Server Port</source>
         <comment>details (display/vrde)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Port serwera pulpitu zdalnego</translation>
     </message>
     <message>
         <source>Remote Desktop Server</source>
         <comment>details (display/vrde)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Serwer pulpitu zdalnego</translation>
     </message>
     <message>
         <source>Not Attached</source>
         <comment>details (storage)</comment>
-        <translation type="unfinished">Niepodłączone</translation>
+        <translation>Niepodłączone</translation>
     </message>
     <message>
         <source>Host Driver</source>
         <comment>details (audio)</comment>
-        <translation type="unfinished">Sterownik gospodarza</translation>
+        <translation>Sterownik gospodarza</translation>
     </message>
     <message>
         <source>Bridged Adapter, %1</source>
         <comment>details (network)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Mostkowana karta sieciowa</translation>
     </message>
     <message>
         <source>Internal Network, '%1'</source>
         <comment>details (network)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Sieć wewnętrzna</translation>
     </message>
     <message>
         <source>Host-only Adapter, '%1'</source>
         <comment>details (network)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Karta sieci izolowanej</translation>
     </message>
     <message>
         <source>Generic Driver, '%1'</source>
         <comment>details (network)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Rodzajowy sterownik, '%1'</translation>
     </message>
     <message>
         <source>Device Filters</source>
         <comment>details (usb)</comment>
-        <translation type="unfinished">Filtry urządzeń</translation>
+        <translation>Filtry urządzeń</translation>
     </message>
     <message>
         <source>USB Controller Inaccessible</source>
         <comment>details (usb)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Kontroler USB niedostępny</translation>
     </message>
     <message>
         <source>Shared Folders</source>
         <comment>details (shared folders)</comment>
-        <translation type="unfinished">Współdzielone katalogi</translation>
+        <translation>Udostępniane foldery</translation>
     </message>
     <message>
         <source>Video Capture File</source>
         <comment>details (display/video capture)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Plik przechwytywanego obrazu</translation>
     </message>
     <message>
         <source>Video Capture Attributes</source>
         <comment>details (display/video capture)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Parametry przechwytywanego obrazu</translation>
     </message>
     <message>
         <source>Video Capture</source>
         <comment>details (display/video capture)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Przechwytywanie obrazu</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details (display/video capture)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Wyłączone</translation>
     </message>
     <message>
         <source>NAT Network, '%1'</source>
         <comment>details (network)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Sieć NAT, '%1'</translation>
     </message>
     <message>
         <source>Frame Size: %1x%2, Frame Rate: %3fps, Bit Rate: %4kbps</source>
-        <translation type="unfinished"></translation>
+        <translation>Wymiary klatki: %1x%2, Częstotliwość wyświetlania klatek: %3fps, Bit Rate: %4kbps</translation>
     </message>
     <message>
         <source>Minimal Paravirtualization</source>
         <comment>details (system)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Minimalna parawirtualizacja</translation>
     </message>
     <message>
         <source>Hyper-V Paravirtualization</source>
         <comment>details (system)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Parawirtualizacja Hyper-V</translation>
     </message>
     <message>
         <source>KVM Paravirtualization</source>
         <comment>details (system)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Parawirtualizacja KVM</translation>
     </message>
     <message>
         <source>Scale-factor</source>
         <comment>details (display)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Współczynnik skali</translation>
     </message>
     <message>
         <source>Unscaled HiDPI Video Output</source>
         <comment>details (display)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Nieskalowane wyjście Video HiDPI</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details (display/Unscaled HiDPI Video Output)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Włączone</translation>
     </message>
     <message>
         <source>[Optical Drive]</source>
         <comment>details (storage)</comment>
-        <translation type="unfinished"></translation>
+        <translation>[Napęd optyczny]</translation>
     </message>
     <message>
         <source>Generic Driver, '%1' { %2 }</source>
         <comment>details (network)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Rodzajowy sterownik, '%1' { %2 }</translation>
     </message>
     <message>
         <source>USB Controller</source>
         <comment>details (usb)</comment>
-        <translation type="unfinished">Kontroler USB</translation>
+        <translation>Kontroler USB</translation>
     </message>
     <message>
         <source>Menu-bar</source>
         <comment>details (user interface)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Pasek menu</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details (user interface/menu-bar)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Widoczny</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details (user interface/menu-bar)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Niewidoczny</translation>
     </message>
     <message>
         <source>Status-bar</source>
         <comment>details (user interface)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Pasek stanu</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details (user interface/status-bar)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Widoczny</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details (user interface/status-bar)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Niewidoczny</translation>
     </message>
     <message>
         <source>Mini-toolbar Position</source>
         <comment>details (user interface)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Pozycja mini paska narzędziowego</translation>
     </message>
     <message>
         <source>Top</source>
         <comment>details (user interface/mini-toolbar position)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Góra</translation>
     </message>
     <message>
         <source>Bottom</source>
         <comment>details (user interface/mini-toolbar position)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Dół</translation>
     </message>
     <message>
         <source>Mini-toolbar</source>
         <comment>details (user interface)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Mini pasek narzędziowy</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details (user interface/mini-toolbar)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Niewidoczny</translation>
     </message>
 </context>
 <context>
@@ -3217,7 +3258,7 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Base Memory</source>
         <comment>details</comment>
-        <translation type="obsolete">Pamięć podstawowa</translation>
+        <translation type="obsolete">RAM</translation>
     </message>
     <message>
         <source>%1%</source>
@@ -3257,167 +3298,167 @@ p, li { white-space: pre-wrap; }
     <name>UIGMachinePreview</name>
     <message>
         <source>Every 0.5 s</source>
-        <translation type="unfinished"></translation>
+        <translation>Co 0,5 s</translation>
     </message>
     <message>
         <source>Every 1 s</source>
-        <translation type="unfinished"></translation>
+        <translation>Co 1 s</translation>
     </message>
     <message>
         <source>Every 2 s</source>
-        <translation type="unfinished"></translation>
+        <translation>Co 2 s</translation>
     </message>
     <message>
         <source>Every 5 s</source>
-        <translation type="unfinished"></translation>
+        <translation>Co 5 s</translation>
     </message>
     <message>
         <source>Every 10 s</source>
-        <translation type="unfinished"></translation>
+        <translation>Co 10 s</translation>
     </message>
     <message>
         <source>Update disabled</source>
-        <translation type="unfinished"></translation>
+        <translation>Aktualizacje wyłączone</translation>
     </message>
     <message>
         <source>No preview</source>
-        <translation type="unfinished"></translation>
+        <translation>Brak podglądu</translation>
     </message>
 </context>
 <context>
     <name>UIGlobalSettingsDisplay</name>
     <message>
         <source>Maximum Guest Screen &Size:</source>
-        <translation type="unfinished"></translation>
+        <translation>Maksymalne &wymiary ekranu gościa:</translation>
     </message>
     <message>
         <source>&Width:</source>
-        <translation type="unfinished"></translation>
+        <translation>&Szerokość:</translation>
     </message>
     <message>
         <source>&Height:</source>
-        <translation type="unfinished"></translation>
+        <translation>&Wysokość:</translation>
     </message>
     <message>
         <source>Automatic</source>
         <comment>Maximum Guest Screen Size</comment>
-        <translation type="unfinished"></translation>
+        <translation>Automatyczne</translation>
     </message>
     <message>
         <source>Suggest a reasonable maximum screen size to the guest. The guest will only see this suggestion when guest additions are installed.</source>
-        <translation type="unfinished"></translation>
+        <translation>Proponuje rozsądne maksymalne wymiary ekranu gościa. Gość zobaczy tę sugestię, jedynie gdy ma zainstalowane dodatki gościa.</translation>
     </message>
     <message>
         <source>None</source>
         <comment>Maximum Guest Screen Size</comment>
-        <translation type="unfinished">Brak</translation>
+        <translation>Brak</translation>
     </message>
     <message>
         <source>Do not attempt to limit the size of the guest screen.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie próbuje ograniczać wymiarów ekranu gościa</translation>
     </message>
     <message>
         <source>Hint</source>
         <comment>Maximum Guest Screen Size</comment>
-        <translation type="unfinished"></translation>
+        <translation>Wskazówka</translation>
     </message>
     <message>
         <source>Suggest a maximum screen size to the guest. The guest will only see this suggestion when guest additions are installed.</source>
-        <translation type="unfinished"></translation>
+        <translation>Proponuje maksymalne wymiary ekranu gościa. Gość zobaczy tę sugestię, jedynie gdy ma zainstalowane dodatki gościa.</translation>
     </message>
     <message>
         <source>Machine Windows:</source>
-        <translation type="unfinished"></translation>
+        <translation>Okna maszyny:</translation>
     </message>
     <message>
         <source>&Raise Window Under Mouse</source>
-        <translation type="unfinished"></translation>
+        <translation>&Podnieś okno pod mysz</translation>
     </message>
     <message>
         <source>Holds the maximum width which we would like the guest to use.</source>
-        <translation type="unfinished"></translation>
+        <translation>Przechowuje maksymalną szerokość, którą chcielibyśmy, by używał gość.</translation>
     </message>
     <message>
         <source>Holds the maximum height which we would like the guest to use.</source>
-        <translation type="unfinished"></translation>
+        <translation>Przechowuje maksymalną wysokość, którą chcielibyśmy, by używał gość.</translation>
     </message>
     <message>
         <source>When checked, machine windows will be raised when the mouse pointer moves over them.</source>
-        <translation type="unfinished"></translation>
+        <translation>Po zaznaczeniu tej opcji, okna maszyny uniosą się wyżej, gdy wskaźnik myszy się przesunie.</translation>
     </message>
 </context>
 <context>
     <name>UIGlobalSettingsExtension</name>
     <message>
         <source>Lists all installed packages.</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyświetla listę zainstalowanych paczek.</translation>
     </message>
     <message>
         <source>Active</source>
-        <translation type="unfinished"></translation>
+        <translation>Aktywne</translation>
     </message>
     <message>
         <source>Name</source>
-        <translation type="unfinished">Nazwa</translation>
+        <translation>Nazwa</translation>
     </message>
     <message>
         <source>Version</source>
-        <translation type="unfinished">Wersja</translation>
+        <translation>Wersja</translation>
     </message>
     <message>
         <source>Select an extension package file</source>
-        <translation type="unfinished"></translation>
+        <translation>Wybierz plik z rozszerzeniem</translation>
     </message>
     <message>
         <source>Extension package files (%1)</source>
-        <translation type="unfinished"></translation>
+        <translation>Pliki pakietów  rozszerzeń (%1)</translation>
     </message>
     <message>
         <source>Extensions</source>
-        <translation type="unfinished"></translation>
+        <translation>Rozszerzenia</translation>
     </message>
     <message>
         <source>&Extension Packages</source>
-        <translation type="unfinished"></translation>
+        <translation>&Pakiety rozszerzeń</translation>
     </message>
     <message>
         <source>Add Package</source>
-        <translation type="unfinished"></translation>
+        <translation>Dodaj pakiet</translation>
     </message>
     <message>
         <source>Remove Package</source>
-        <translation type="unfinished"></translation>
+        <translation>Usuń pakiet</translation>
     </message>
     <message>
         <source>Adds new package.</source>
-        <translation type="unfinished"></translation>
+        <translation>Dodaje nową paczkę</translation>
     </message>
     <message>
         <source>Removes selected package.</source>
-        <translation type="unfinished"></translation>
+        <translation>Usuwa wybraną paczkę</translation>
     </message>
 </context>
 <context>
     <name>UIGlobalSettingsGeneral</name>
     <message>
         <source>Holds the path to the default VDI folder. This folder is used, if not explicitly specified otherwise, when adding existing or creating new virtual hard disks.</source>
-        <translation type="obsolete">Zawiera ścieżkę do domyślnego katalogu z obrazami dysków VDI. Katalog ten będzie użyty w przypadku, gdy nie zostanie wybrany inny podczas dodawania istniejących bądź tworzenia nowych wirtualnych dysków twardych.</translation>
+        <translation type="obsolete">Przechowuje ścieżkę do domyślnego folderu z obrazami dysków VDI. Folder ten będzie użyty w przypadku, gdy nie zostanie wybrany inny podczas dodawania istniejących bądź tworzenia nowych wirtualnych dysków twardych.</translation>
     </message>
     <message>
         <source>Holds the path to the default virtual machine folder. This folder is used, if not explicitly specified otherwise, when creating new virtual machines.</source>
-        <translation>Zawiera ścieżkę do domyślnego katalogu z maszynami wirtualnymi. Katalog ten będzie użyty w przypadku, gdy nie zostanie wybrany inny podczas tworzenia nowych maszyn wirtualnych.</translation>
+        <translation>Przechowuje ścieżkę do domyślnego folderu z maszynami wirtualnymi. Folder ten będzie użyty w przypadku, gdy nie zostanie wybrany inny podczas tworzenia nowych maszyn wirtualnych.</translation>
     </message>
     <message>
         <source>Holds the path to the library that provides authentication for Remote Display (VRDP) clients.</source>
-        <translation>Zawiera ścieżkę do biblioteki obsługującej uwierzytelnianie dla klientów zdalnego pulpitu (VRDP).</translation>
+        <translation>Przechowuje ścieżkę do biblioteki obsługującej uwierzytelnianie dla klientów zdalnego pulpitu (VRDP).</translation>
     </message>
     <message>
         <source>Default &Hard Disk Folder:</source>
-        <translation type="obsolete">Domyślny katalog &dysków twardych:</translation>
+        <translation type="obsolete">Domyślny folder &dysków twardych:</translation>
     </message>
     <message>
         <source>Default &Machine Folder:</source>
-        <translation>Domyślny katalog &maszyn wirtualnych:</translation>
+        <translation>Domyślny folder &maszyn wirtualnych:</translation>
     </message>
     <message>
         <source>V&RDP Authentication Library:</source>
@@ -3425,11 +3466,11 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Holds the path to the default hard disk folder. This folder is used, if not explicitly specified otherwise, when adding existing or creating new virtual hard disks.</source>
-        <translation type="obsolete">Zawiera ścieżkę do domyślnego katalogu dysków twardych. Katalog ten będzie użyty w przypadku, gdy nie zostanie wybrany inny podczas dodawania istniejących bądź tworzenia nowych wirtualnych dysków twardych.</translation>
+        <translation type="obsolete">Przechowuje ścieżkę do domyślnego folderu dysków twardych. Folder ten będzie użyty w przypadku, gdy nie zostanie wybrany inny podczas dodawania istniejących bądź tworzenia nowych wirtualnych dysków twardych.</translation>
     </message>
     <message>
         <source>When checked, the application will provide an icon with the context menu in the system tray.</source>
-        <translation type="obsolete">Po zaznaczeniu tej opcji aplikacja będzie wyświetlać w zasobniku systemowym ikonę z obsługą menu kontekstowego.</translation>
+        <translation type="obsolete">Po zaznaczeniu tej opcji, aplikacja będzie wyświetlać w zasobniku systemowym ikonę z obsługą menu kontekstowego.</translation>
     </message>
     <message>
         <source>&Show System Tray Icon</source>
@@ -3437,7 +3478,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>When checked, the Dock Icon will reflect the VM window content in realtime.</source>
-        <translation type="obsolete">Po zaznaczeniu tej opcji ikona w obszarze Dock będzie odwzorowywać zawartość okna maszyny wirtualnej w czasie rzeczywistym.</translation>
+        <translation type="obsolete">Po zaznaczeniu tej opcji, ikona w obszarze Dock będzie odwzorowywać zawartość okna maszyny wirtualnej w czasie rzeczywistym.</translation>
     </message>
     <message>
         <source>&Dock Icon Realtime Preview</source>
@@ -3449,15 +3490,15 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>When checked, the host screensaver will be disabled whenever a virtual machine is running.</source>
-        <translation type="unfinished"></translation>
+        <translation>Gdy zaznaczono, wygaszacz ekranu gospodarza zostanie wyłączony, gdy maszyna wirtualna jest uruchomiona.</translation>
     </message>
     <message>
         <source>Host Screensaver:</source>
-        <translation type="unfinished"></translation>
+        <translation>Wygaszacz ekranu gospodarza:</translation>
     </message>
     <message>
         <source>&Disable When Running Virtual Machines</source>
-        <translation type="unfinished"></translation>
+        <translation>&Wyłącz podczas uruchamiania wirtualnych maszyn</translation>
     </message>
 </context>
 <context>
@@ -3476,35 +3517,35 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>When checked, the keyboard is automatically captured every time the VM window is activated. When the keyboard is captured, all keystrokes (including system ones like Alt-Tab) are directed to the VM.</source>
-        <translation type="unfinished">Po zaznaczeniu tej opcji klawiatura będzie automatycznie przechwytywana za każdym razem, gdy okno maszyny wirtualnej zostanie aktywowane. Po przechwyceniu klawiatury wszystkie kombinacje klawiszowe (włącznie z systemowymi, jak np. Alt-Tab) bedą przekierowywane do maszyny wirtualnej.</translation>
+        <translation>Po zaznaczeniu tej opcji, klawiatura będzie automatycznie przechwytywana za każdym razem, gdy okno maszyny wirtualnej zostanie aktywowane. Po przechwyceniu klawiatury wszystkie kombinacje klawiszowe (włącznie z systemowymi, jak np. Alt-Tab) bedą przekierowywane do maszyny wirtualnej.</translation>
     </message>
     <message>
         <source>&Auto Capture Keyboard</source>
-        <translation type="unfinished">&Automatyczne przechwytywanie klawiatury</translation>
+        <translation>&Automatyczne przechwytywanie klawiatury</translation>
     </message>
     <message>
         <source>Host Key Combination</source>
-        <translation type="unfinished"></translation>
+        <translation>Kombinacja klawiszy gospodarza</translation>
     </message>
     <message>
         <source>Some items have the same shortcuts assigned.</source>
-        <translation type="unfinished"></translation>
+        <translation>Niektóre elementy mają przydzielone te same skróty.</translation>
     </message>
     <message>
         <source>&VirtualBox Manager</source>
-        <translation type="unfinished"></translation>
+        <translation>&Menedźer VirtualBox</translation>
     </message>
     <message>
         <source>Virtual &Machine</source>
-        <translation type="unfinished"></translation>
+        <translation>Maszyna &wirtualna</translation>
     </message>
     <message>
         <source>Lists all available shortcuts which can be configured.</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyświetla wszystkie dostępne konfigurowalne skróty</translation>
     </message>
     <message>
         <source>Holds a sequence to filter the shortcut list.</source>
-        <translation type="unfinished"></translation>
+        <translation>Utrzymuje sekwencję do filtrowania listy skrótów</translation>
     </message>
 </context>
 <context>
@@ -3539,7 +3580,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Lists all available user interface languages. The effective language is written in <b>bold</b>. Select <i>Default</i> to reset to the system default language.</source>
-        <translation>Zawiera listę języków dostępnych dla interfejsu programu. Aktualnie używany język jest zaznaczony <b>pogrubieniem</b>. Wybranie opcji <i>Domyślny</i> przywraca język ustawiony jako domyślny dla systemu.</translation>
+        <translation>Przechowuje listę języków dostępnych dla interfejsu programu. Aktualnie używany język jest zaznaczony <b>pogrubieniem</b>. Wybranie opcji <i>Domyślny</i> przywraca język ustawiony jako domyślny dla systemu.</translation>
     </message>
     <message>
         <source>Name</source>
@@ -3563,7 +3604,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>&Interface Languages</source>
-        <translation type="unfinished"></translation>
+        <translation>&Języki interfejsu</translation>
     </message>
 </context>
 <context>
@@ -3704,7 +3745,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Lists all available host-only networks.</source>
-        <translation>Zawiera listę wszystkich dostępnych sieci izolowanych (host-only).</translation>
+        <translation>Przechowuje listę wszystkich dostępnych sieci izolowanych (host-only).</translation>
     </message>
     <message>
         <source>Name</source>
@@ -3712,172 +3753,172 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Networking</source>
-        <translation type="unfinished"></translation>
+        <translation>Networking</translation>
     </message>
     <message>
         <source>&NAT Networks</source>
-        <translation type="unfinished"></translation>
+        <translation>&Sieci NAT</translation>
     </message>
     <message>
         <source>Lists all available NAT networks.</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyświetla wszystkie dostępne sieci NAT</translation>
     </message>
     <message>
         <source>&Host-only Networks</source>
-        <translation type="unfinished"></translation>
+        <translation>&Sieci izolowane</translation>
     </message>
     <message>
         <source>No new name specified for the NAT network previously called <b>%1</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Brak określonej nowej nazwy dla wcześniej przywołanej sieci NAT</translation>
     </message>
     <message>
         <source>No CIDR specified for the NAT network <b>%1</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Brak określonej metody CIDR dla sieci NAT <b>%1</b>.</translation>
     </message>
     <message>
         <source>No CIDR specified for the NAT network previously called <b>%1</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Brak określonej metody CIDR dla sieci NAT przywołanej poprzednio <b>%1</b>.</translation>
     </message>
     <message>
         <source>Invalid CIDR specified (<i>%1</i>) for the NAT network <b>%2</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Określono nieprawidłową metodę CIDR (<i>%1</i>) dla sieci NAT <b>%2</b>.</translation>
     </message>
     <message>
         <source>Invalid CIDR specified (<i>%1</i>) for the NAT network previously called <b>%2</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Określono nieprawidłową metodę CIDR (<i>%1</i>) dla sieci NAT przywołanej poprzednio <b>%2</b>.</translation>
     </message>
     <message>
         <source>Network Name</source>
-        <translation type="unfinished"></translation>
+        <translation>Nazwa sieci</translation>
     </message>
     <message>
         <source>[empty]</source>
-        <translation type="unfinished"></translation>
+        <translation>[pusta]</translation>
     </message>
     <message>
         <source>%1 (renamed from %2)</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 (zmieniono nazwę z %2)</translation>
     </message>
     <message>
         <source>Old Network Name</source>
-        <translation type="unfinished"></translation>
+        <translation>Stara nazwa sieci</translation>
     </message>
     <message>
         <source>New Network Name</source>
-        <translation type="unfinished"></translation>
+        <translation>Nowa nazwa sieci</translation>
     </message>
     <message>
         <source>Network CIDR</source>
-        <translation type="unfinished"></translation>
+        <translation>Adres CIDR sieci</translation>
     </message>
     <message>
         <source>Supports DHCP</source>
-        <translation type="unfinished"></translation>
+        <translation>Obsługuje DHCP</translation>
     </message>
     <message>
         <source>yes</source>
-        <translation type="unfinished"></translation>
+        <translation>tak</translation>
     </message>
     <message>
         <source>no</source>
-        <translation type="unfinished"></translation>
+        <translation>nie</translation>
     </message>
     <message>
         <source>Supports IPv6</source>
-        <translation type="unfinished"></translation>
+        <translation>Obsługuje IPv6</translation>
     </message>
     <message>
         <source>Default IPv6 route</source>
-        <translation type="unfinished"></translation>
+        <translation>Domyślna trasa IPv6</translation>
     </message>
     <message>
         <source>Host interface <b>%1</b> does not currently have a valid IPv4 address.</source>
-        <translation type="unfinished"></translation>
+        <translation>Interfejs gospodarza <b>%1</b> nie posiada obecnie ważnego adresu IPv4.</translation>
     </message>
     <message>
         <source>Host interface <b>%1</b> does not currently have a valid IPv4 network mask.</source>
-        <translation type="unfinished"></translation>
+        <translation>Interfejs gospodarza <b>%1</b> nie posiada obecnie ważnej maski sieci IPv4.</translation>
     </message>
     <message>
         <source>Host interface <b>%1</b> does not currently have a valid IPv6 address.</source>
-        <translation type="unfinished"></translation>
+        <translation>Interfejs gospodarza <b>%1</b> nie posiada obecnie ważnego adresu IPv6.</translation>
     </message>
     <message>
         <source>Host interface <b>%1</b> does not currently have a valid DHCP server address.</source>
-        <translation type="unfinished"></translation>
+        <translation>Interfejs gospodarza <b>%1</b> nie posiada obecnie ważnego adresu serwera DHCP.</translation>
     </message>
     <message>
         <source>Host interface <b>%1</b> does not currently have a valid DHCP server mask.</source>
-        <translation type="unfinished"></translation>
+        <translation>Interfejs gospodarza <b>%1</b> nie posiada obecnie ważnej maski serwera DHCP.</translation>
     </message>
     <message>
         <source>Host interface <b>%1</b> does not currently have a valid DHCP server lower address bound.</source>
-        <translation type="unfinished"></translation>
+        <translation>Interfejs gospodarza <b>%1</b> nie posiada obecnie ważnego adresu serwera DHCP z dolnej granicy.</translation>
     </message>
     <message>
         <source>Host interface <b>%1</b> does not currently have a valid DHCP server upper address bound.</source>
-        <translation type="unfinished"></translation>
+        <translation>Interfejs gospodarza <b>%1</b> nie posiada obecnie ważnego adresu serwera DHCP z górnej granicy.</translation>
     </message>
     <message>
         <source>The name <b>%1</b> is being used for several NAT networks.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nazwa <b>%1</b> jest już w użyciu przez kilka sieci NAT.</translation>
     </message>
     <message>
         <source>Active</source>
         <comment>NAT network</comment>
-        <translation type="unfinished"></translation>
+        <translation>Aktywna</translation>
     </message>
     <message>
         <source>Add NAT Network</source>
-        <translation type="unfinished"></translation>
+        <translation>Dodaj sieć NAT</translation>
     </message>
     <message>
         <source>Remove NAT Network</source>
-        <translation type="unfinished"></translation>
+        <translation>Usuń sieć NAT</translation>
     </message>
     <message>
         <source>Edit NAT Network</source>
-        <translation type="unfinished"></translation>
+        <translation>Edytuj sieć NAT</translation>
     </message>
     <message>
         <source>Adds new NAT network.</source>
-        <translation type="unfinished"></translation>
+        <translation>Dodaje nową sieć NAT.</translation>
     </message>
     <message>
         <source>Removes selected NAT network.</source>
-        <translation type="unfinished"></translation>
+        <translation>Usuwa wybraną sieć NAT.</translation>
     </message>
     <message>
         <source>Edits selected NAT network.</source>
-        <translation type="unfinished"></translation>
+        <translation>Edytuje wybraną sieć NAT.</translation>
     </message>
     <message>
         <source>Add Host-only Network</source>
-        <translation type="unfinished"></translation>
+        <translation>Dodaj sieć izolowaną.</translation>
     </message>
     <message>
         <source>Remove Host-only Network</source>
-        <translation type="unfinished"></translation>
+        <translation>Usuń sieć izolowaną</translation>
     </message>
     <message>
         <source>Edit Host-only Network</source>
-        <translation type="unfinished"></translation>
+        <translation>Edytuj sieć izolowaną</translation>
     </message>
     <message>
         <source>Adds new host-only network.</source>
-        <translation type="unfinished"></translation>
+        <translation>Dodaje nową sieć izolowaną.</translation>
     </message>
     <message>
         <source>Removes selected host-only network.</source>
-        <translation type="unfinished"></translation>
+        <translation>Usuwa wybraną sieć izolowaną.</translation>
     </message>
     <message>
         <source>Edits selected host-only network.</source>
-        <translation type="unfinished"></translation>
+        <translation>Edytuje wybraną sieć izolowaną.</translation>
     </message>
     <message>
         <source>Host interface <b>%1</b> does not currently have a valid IPv6 network mask prefix length.</source>
-        <translation type="unfinished"></translation>
+        <translation>Interfejs gospodarza <b>%1</b> nie posiada obecnie ważnego prefiksu maski sieci IPv6.</translation>
     </message>
 </context>
 <context>
@@ -3904,7 +3945,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Holds the host IPv4 address for this adapter.</source>
-        <translation type="obsolete">Zawiera adres IPv4 gospodarza dla tej karty.</translation>
+        <translation type="obsolete">Przechowuje adres IPv4 gospodarza dla tej karty.</translation>
     </message>
     <message>
         <source>IPv4 Network &Mask:</source>
@@ -3912,7 +3953,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Holds the host IPv4 network mask for this adapter.</source>
-        <translation type="obsolete">Zawiera maskę sieci IPv4 gospodarza dla tej karty.</translation>
+        <translation type="obsolete">Przechowuje maskę sieci IPv4 gospodarza dla tej karty.</translation>
     </message>
     <message>
         <source>I&Pv6 Address:</source>
@@ -3920,7 +3961,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Holds the host IPv6 address for this adapter if IPv6 is supported.</source>
-        <translation type="obsolete">Zawiera adres IPv6 gospodarza dla tej karty, jeśli IPv6 jest dostępne.</translation>
+        <translation type="obsolete">Przechowuje adres IPv6 gospodarza dla tej karty, jeśli IPv6 jest dostępne.</translation>
     </message>
     <message>
         <source>IPv6 Network Mask &Length:</source>
@@ -3928,7 +3969,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Holds the host IPv6 network mask prefix length for this adapter if IPv6 is supported.</source>
-        <translation type="obsolete">Zawiera długość prefiksu maski sieci IPv6 gospodarza dla tej karty, jeśli IPv6 jest dostępne.</translation>
+        <translation type="obsolete">Przechowuje długość prefiksu maski sieci IPv6 gospodarza dla tej karty, jeśli IPv6 jest dostępne.</translation>
     </message>
     <message>
         <source>&DHCP Server</source>
@@ -3948,7 +3989,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Holds the address of the DHCP server servicing the network associated with this host-only adapter.</source>
-        <translation type="obsolete">Zawiera adres serwera DHCP obsługującego sieć powiązaną z tą kartą sieci izolowanej.</translation>
+        <translation type="obsolete">Przechowuje adres serwera DHCP obsługującego sieć powiązaną z tą kartą sieci izolowanej.</translation>
     </message>
     <message>
         <source>Server &Mask:</source>
@@ -3956,7 +3997,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Holds the network mask of the DHCP server servicing the network associated with this host-only adapter.</source>
-        <translation type="obsolete">Zawiera maskę sieci serwera DHCP obsługującego sieć powiązaną z tą kartą sieci izolowanej.</translation>
+        <translation type="obsolete">Przechowuje maskę sieci serwera DHCP obsługującego sieć powiązaną z tą kartą sieci izolowanej.</translation>
     </message>
     <message>
         <source>&Lower Address Bound:</source>
@@ -3979,15 +4020,15 @@ p, li { white-space: pre-wrap; }
     <name>UIGlobalSettingsNetworkDetailsHost</name>
     <message>
         <source>Host-only Network Details</source>
-        <translation type="unfinished">Szczegóły sieci izolowanej (host-only)</translation>
+        <translation>Szczegóły sieci izolowanej</translation>
     </message>
     <message>
         <source>&Adapter</source>
-        <translation type="unfinished">&Karta</translation>
+        <translation>&Karta</translation>
     </message>
     <message>
         <source>Manual &Configuration</source>
-        <translation type="unfinished">Konfiguracja &ręczna</translation>
+        <translation>Konfiguracja &ręczna</translation>
     </message>
     <message>
         <source>Use manual configuration for this host-only network adapter.</source>
@@ -3995,43 +4036,43 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>&IPv4 Address:</source>
-        <translation type="unfinished">Adres &IPv4:</translation>
+        <translation>Adres &IPv4:</translation>
     </message>
     <message>
         <source>Holds the host IPv4 address for this adapter.</source>
-        <translation type="unfinished">Zawiera adres IPv4 gospodarza dla tej karty.</translation>
+        <translation>Przechowuje adres IPv4 gospodarza dla tej karty.</translation>
     </message>
     <message>
         <source>IPv4 Network &Mask:</source>
-        <translation type="unfinished">&Maska sieci IPv4:</translation>
+        <translation>&Maska sieci IPv4:</translation>
     </message>
     <message>
         <source>Holds the host IPv4 network mask for this adapter.</source>
-        <translation type="unfinished">Zawiera maskę sieci IPv4 gospodarza dla tej karty.</translation>
+        <translation>Przechowuje maskę sieci IPv4 gospodarza dla tej karty.</translation>
     </message>
     <message>
         <source>I&Pv6 Address:</source>
-        <translation type="unfinished">Adres I&Pv6:</translation>
+        <translation>Adres I&Pv6:</translation>
     </message>
     <message>
         <source>Holds the host IPv6 address for this adapter if IPv6 is supported.</source>
-        <translation type="unfinished">Zawiera adres IPv6 gospodarza dla tej karty, jeśli IPv6 jest dostępne.</translation>
+        <translation>Przechowuje adres IPv6 gospodarza dla tej karty, jeśli IPv6 jest dostępne.</translation>
     </message>
     <message>
         <source>IPv6 Network Mask &Length:</source>
-        <translation type="unfinished">Dł&ugość maski sieci IPv6:</translation>
+        <translation>Dł&ugość maski sieci IPv6:</translation>
     </message>
     <message>
         <source>Holds the host IPv6 network mask prefix length for this adapter if IPv6 is supported.</source>
-        <translation type="unfinished">Zawiera długość prefiksu maski sieci IPv6 gospodarza dla tej karty, jeśli IPv6 jest dostępne.</translation>
+        <translation>Przechowuje długość prefiksu maski sieci IPv6 gospodarza dla tej karty, jeśli IPv6 jest obsługiwane.</translation>
     </message>
     <message>
         <source>&DHCP Server</source>
-        <translation type="unfinished">Serwer &DHCP</translation>
+        <translation>Serwer &DHCP</translation>
     </message>
     <message>
         <source>&Enable Server</source>
-        <translation type="unfinished">&Włącz serwer</translation>
+        <translation>&Włącz serwer</translation>
     </message>
     <message>
         <source>Indicates whether the DHCP Server is enabled on machine startup or not.</source>
@@ -4039,183 +4080,183 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Server Add&ress:</source>
-        <translation type="unfinished">Ad&res serwera:</translation>
+        <translation>Ad&res serwera:</translation>
     </message>
     <message>
         <source>Holds the address of the DHCP server servicing the network associated with this host-only adapter.</source>
-        <translation type="unfinished">Zawiera adres serwera DHCP obsługującego sieć powiązaną z tą kartą sieci izolowanej.</translation>
+        <translation>Przechowuje adres serwera DHCP obsługującego sieć powiązaną z tą kartą sieci izolowanej.</translation>
     </message>
     <message>
         <source>Server &Mask:</source>
-        <translation type="unfinished">&Maska serwera:</translation>
+        <translation>&Maska serwera:</translation>
     </message>
     <message>
         <source>Holds the network mask of the DHCP server servicing the network associated with this host-only adapter.</source>
-        <translation type="unfinished">Zawiera maskę sieci serwera DHCP obsługującego sieć powiązaną z tą kartą sieci izolowanej.</translation>
+        <translation>Przechowuje maskę sieci serwera DHCP obsługującego sieć powiązaną z tą kartą sieci izolowanej.</translation>
     </message>
     <message>
         <source>&Lower Address Bound:</source>
-        <translation type="unfinished">D&olna granica adresów:</translation>
+        <translation>D&olna granica adresów:</translation>
     </message>
     <message>
         <source>Holds the lower address bound offered by the DHCP server servicing the network associated with this host-only adapter.</source>
-        <translation type="unfinished">Określa dolną granicę zakresu adresów oferowanych przez sewer DHCP obsługujący sieć powiązaną z tą kartą sieci izolowanej.</translation>
+        <translation>Określa dolną granicę zakresu adresów oferowanych przez serwer DHCP obsługujący sieć powiązaną z tą kartą sieci izolowanej.</translation>
     </message>
     <message>
         <source>&Upper Address Bound:</source>
-        <translation type="unfinished">&Górna granica adresów:</translation>
+        <translation>&Górna granica adresów:</translation>
     </message>
     <message>
         <source>Holds the upper address bound offered by the DHCP server servicing the network associated with this host-only adapter.</source>
-        <translation type="unfinished">Określa górną granicę zakresu adresów oferowanych przez sewer DHCP obsługujący sieć powiązaną z tą kartą sieci izolowanej.</translation>
+        <translation>Określa górną granicę zakresu adresów oferowanych przez sewer DHCP obsługujący sieć powiązaną z tą kartą sieci izolowanej.</translation>
     </message>
     <message>
         <source>When checked, manual configuration will be used for this network adapter.</source>
-        <translation type="unfinished"></translation>
+        <translation>Po zaznaczeniu tej opcji, zostanie użyta ręczna konfiguracja dla tej karty sieciowej.</translation>
     </message>
     <message>
         <source>When checked, the DHCP Server will be enabled for this network on machine start-up.</source>
-        <translation type="unfinished"></translation>
+        <translation>Po zaznaczeniu tej opcji, serwer DHCP zostanie aktywowany dla tej sieci  przy starcie maszyny.</translation>
     </message>
 </context>
 <context>
     <name>UIGlobalSettingsNetworkDetailsNAT</name>
     <message>
         <source>NAT Network Details</source>
-        <translation type="unfinished"></translation>
+        <translation>Szczegóły sieci NAT</translation>
     </message>
     <message>
         <source>&Enable Network</source>
-        <translation type="unfinished"></translation>
+        <translation>&Włącz sieć</translation>
     </message>
     <message>
         <source>Network &Name:</source>
-        <translation type="unfinished"></translation>
+        <translation>Nazwa &sieci:</translation>
     </message>
     <message>
         <source>Holds the name for this network.</source>
-        <translation type="unfinished"></translation>
+        <translation>Przechowuje nazwę dla tej sieci</translation>
     </message>
     <message>
         <source>Network &CIDR:</source>
-        <translation type="unfinished"></translation>
+        <translation>Adres sieci &CIDR:</translation>
     </message>
     <message>
         <source>Holds the CIDR for this network.</source>
-        <translation type="unfinished"></translation>
+        <translation>Przechowuje adres CIDR dla tej sieci.</translation>
     </message>
     <message>
         <source>Network Options:</source>
-        <translation type="unfinished"></translation>
+        <translation>Opcje sieci:</translation>
     </message>
     <message>
         <source>Supports &DHCP</source>
-        <translation type="unfinished"></translation>
+        <translation>Obsługuje &DHCP</translation>
     </message>
     <message>
         <source>Supports &IPv6</source>
-        <translation type="unfinished"></translation>
+        <translation>Obsługuje &IPv6</translation>
     </message>
     <message>
         <source>Advertise Default IPv6 &Route</source>
-        <translation type="unfinished"></translation>
+        <translation>Rozgłasza domyślną &trasę adresu IPv6</translation>
     </message>
     <message>
         <source>&Port Forwarding</source>
-        <translation type="unfinished"></translation>
+        <translation>&Przekierowanie portów</translation>
     </message>
     <message>
         <source>When checked, this network will be enabled.</source>
-        <translation type="unfinished"></translation>
+        <translation>Po zaznaczeniu tej opcji, ta sieć zostanie włączona.</translation>
     </message>
     <message>
         <source>When checked, this network will support DHCP.</source>
-        <translation type="unfinished"></translation>
+        <translation>Po zaznaczeniu tej opcji, ta sieć obsługuje DHCP.</translation>
     </message>
     <message>
         <source>When checked, this network will support IPv6.</source>
-        <translation type="unfinished"></translation>
+        <translation>Po zaznaczeniu tej opcji, ta sieć obsługuje IPv6.</translation>
     </message>
     <message>
         <source>When checked, this network will be advertised as the default IPv6 route.</source>
-        <translation type="unfinished"></translation>
+        <translation>Po zaznaczeniu tej opcji, ta sieć będzie rozgłaszana jako domyślna trasa adresu IPv6.</translation>
     </message>
     <message>
         <source>Displays a window to configure port forwarding rules.</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyświetla okno w celu skonfigurowania reguł przekierowania portów.</translation>
     </message>
 </context>
 <context>
     <name>UIGlobalSettingsPortForwardingDlg</name>
     <message>
         <source>Port Forwarding Rules</source>
-        <translation type="unfinished"></translation>
+        <translation>Reguły przekierowania portów</translation>
     </message>
     <message>
         <source>IPv4</source>
-        <translation type="unfinished"></translation>
+        <translation>IPv4</translation>
     </message>
     <message>
         <source>IPv6</source>
-        <translation type="unfinished"></translation>
+        <translation>IPv6</translation>
     </message>
 </context>
 <context>
     <name>UIGlobalSettingsProxy</name>
     <message>
         <source>Ho&st:</source>
-        <translation type="unfinished"></translation>
+        <translation>Ho&st:</translation>
     </message>
     <message>
         <source>&Port:</source>
-        <translation type="unfinished"></translation>
+        <translation>&Port:</translation>
     </message>
     <message>
         <source>No proxy host is currently specified.</source>
-        <translation type="unfinished"></translation>
+        <translation>Brak aktualnie określonego hosta proxy.</translation>
     </message>
     <message>
         <source>No proxy port is currently specified.</source>
-        <translation type="unfinished"></translation>
+        <translation>Brak aktualnie określonego portu proxy.</translation>
     </message>
     <message>
         <source>Holds the proxy host.</source>
-        <translation type="unfinished"></translation>
+        <translation>Przechowuje host proxy.</translation>
     </message>
     <message>
         <source>Holds the proxy port.</source>
-        <translation type="unfinished"></translation>
+        <translation>Przechowuje port proxy.</translation>
     </message>
     <message>
         <source>When chosen, VirtualBox will try to auto-detect host proxy settings for tasks like downloading Guest Additions from the network or checking for updates.</source>
-        <translation type="unfinished"></translation>
+        <translation>Po zaznaczeniu tej opcji, VirtualBox będzie próbował automatycznie wykryć ustawienia hosta proxy dla zadań takich jak pobieranie dodatków gościa z sieci lub sprawdzanie aktualizacji.</translation>
     </message>
     <message>
         <source>&Auto-detect Host Proxy Settings</source>
-        <translation type="unfinished"></translation>
+        <translation>&Ustawienia automatycznego wykrywania hosta proxy</translation>
     </message>
     <message>
         <source>When chosen, VirtualBox will use direct Internet connection for tasks like downloading Guest Additions from the network or checking for updates.</source>
-        <translation type="unfinished"></translation>
+        <translation>Po zaznaczeniu tej opcji, VirtualBox będzie korzystał z bezpośredniego połączenia internetowego do zadań takich jak pobieranie dodatków gościa z sieci lub sprawdzanie aktualizacji.</translation>
     </message>
     <message>
         <source>&Direct Connection to the Internet</source>
-        <translation type="unfinished"></translation>
+        <translation>&Bezpośrednie połączenie internetowe</translation>
     </message>
     <message>
         <source>When chosen, VirtualBox will use the proxy settings supplied for tasks like downloading Guest Additions from the network or checking for updates.</source>
-        <translation type="unfinished"></translation>
+        <translation>Po zaznaczeniu tej opcji, VirtualBox będzie korzystał z dostarczonych ustawień proxy do zadań takich jak pobieranie dodatków gościa z sieci lub sprawdzanie aktualizacji.</translation>
     </message>
     <message>
         <source>&Manual Proxy Configuration</source>
-        <translation type="unfinished"></translation>
+        <translation>&Ręczna konfiguracja proxy</translation>
     </message>
 </context>
 <context>
     <name>UIGlobalSettingsUpdate</name>
     <message>
         <source>When checked, the application will periodically connect to the VirtualBox website and check whether a new VirtualBox version is available.</source>
-        <translation>Po zaznaczeniu tej opcji aplikacja będzie okresowo łączyć się ze stroną internetową VirtualBox i sprawdzać, czy jest dostępna nowa wersja VirtualBox.</translation>
+        <translation>Po zaznaczeniu tej opcji, aplikacja będzie okresowo łączyć się ze stroną internetową VirtualBox i sprawdzać, czy jest dostępna nowa wersja VirtualBox.</translation>
     </message>
     <message>
         <source>&Check for Updates</source>
@@ -4231,11 +4272,11 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Next Check:</source>
-        <translation>Następne sprawdzenie:</translation>
+        <translation>Następne sprawdzanie:</translation>
     </message>
     <message>
         <source>Check for:</source>
-        <translation>Srawdzaj:</translation>
+        <translation>Sprawdzaj:</translation>
     </message>
     <message>
         <source><p>Choose this if you only wish to be notified about stable updates to VirtualBox.</p></source>
@@ -4263,85 +4304,85 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Selects how often the new version check should be performed. Note that if you want to completely disable this check, just clear the above check box.</source>
-        <translation type="unfinished"></translation>
+        <translation>Umożliwia wybranie, jak często powinno być wykonywane sprawdzanie dostępności nowych wersji. Uwaga: w celu całkowitego wyłączenia sprawdzania, wystarczy usunąć zaznaczenie pola wyboru powyżej.</translation>
     </message>
 </context>
 <context>
     <name>UIHelpButton</name>
     <message>
         <source>&Help</source>
-        <translation type="unfinished">Pomo&c</translation>
+        <translation>&Pomoc</translation>
     </message>
 </context>
 <context>
     <name>UIHostComboEditor</name>
     <message>
         <source><key_%1></source>
-        <translation type="unfinished"><klawisz_%1></translation>
+        <translation><klawisz_%1></translation>
     </message>
     <message>
         <source>Left </source>
-        <translation type="unfinished">W lewo</translation>
+        <translation>Lewy</translation>
     </message>
     <message>
         <source>Right </source>
-        <translation type="unfinished">W prawo</translation>
+        <translation>Prawy</translation>
     </message>
     <message>
         <source>Left Shift</source>
-        <translation type="unfinished">Lewy Shift</translation>
+        <translation>Lewy Shift</translation>
     </message>
     <message>
         <source>Right Shift</source>
-        <translation type="unfinished">Prawy Shift</translation>
+        <translation>Prawy Shift</translation>
     </message>
     <message>
         <source>Left Ctrl</source>
-        <translation type="unfinished">Lewy Ctrl</translation>
+        <translation>Lewy Ctrl</translation>
     </message>
     <message>
         <source>Right Ctrl</source>
-        <translation type="unfinished">Prawy Ctrl</translation>
+        <translation>Prawy Ctrl</translation>
     </message>
     <message>
         <source>Left Alt</source>
-        <translation type="unfinished">Lewy Alt</translation>
+        <translation>Lewy Alt</translation>
     </message>
     <message>
         <source>Right Alt</source>
-        <translation type="unfinished">Prawy Alt</translation>
+        <translation>Prawy Alt</translation>
     </message>
     <message>
         <source>Left WinKey</source>
-        <translation type="unfinished">Lewy WinKey</translation>
+        <translation>Lewy klawisz Windows</translation>
     </message>
     <message>
         <source>Right WinKey</source>
-        <translation type="unfinished">Prawy WinKey</translation>
+        <translation>Prawy klawisz Windows</translation>
     </message>
     <message>
         <source>Menu key</source>
-        <translation type="unfinished">Klawisz WinMenu</translation>
+        <translation>Klawisz Menu</translation>
     </message>
     <message>
         <source>Alt Gr</source>
-        <translation type="unfinished">Alt Gr</translation>
+        <translation>AltGr</translation>
     </message>
     <message>
         <source>Caps Lock</source>
-        <translation type="unfinished">Caps Lock</translation>
+        <translation>Caps Lock</translation>
     </message>
     <message>
         <source>Scroll Lock</source>
-        <translation type="unfinished">Scroll Lock</translation>
+        <translation>Scroll Lock</translation>
     </message>
     <message>
         <source>Host+</source>
-        <translation type="unfinished"></translation>
+        <translation>Host+</translation>
     </message>
     <message>
         <source>None</source>
-        <translation type="unfinished">Brak</translation>
+        <translation>Brak</translation>
     </message>
 </context>
 <context>
@@ -4528,22 +4569,22 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Reset shortcut to default</source>
-        <translation type="unfinished"></translation>
+        <translation>Przywróć domyślny skrót</translation>
     </message>
     <message>
         <source>Unset shortcut</source>
-        <translation type="unfinished"></translation>
+        <translation>Usuń skrót</translation>
     </message>
 </context>
 <context>
     <name>UIHotKeyTableModel</name>
     <message>
         <source>Name</source>
-        <translation type="unfinished">Nazwa</translation>
+        <translation>Nazwa</translation>
     </message>
     <message>
         <source>Shortcut</source>
-        <translation type="unfinished"></translation>
+        <translation>Skrót</translation>
     </message>
 </context>
 <context>
@@ -4734,12 +4775,12 @@ p, li { white-space: pre-wrap; }
     <message>
         <source><p style='white-space:pre'><nobr>Indicates the activity of the machine's shared folders:</nobr>%1</p></source>
         <comment>Shared folders tooltip</comment>
-        <translation><p style='white-space:pre'><nobr>Wskaźnik aktywności współdzielonych katalogów maszyny:</nobr>%1</p></translation>
+        <translation><p style='white-space:pre'><nobr>Wskaźnik aktywności udostępnianych folderów maszyny:</nobr>%1</p></translation>
     </message>
     <message>
         <source><br><nobr><b>No shared folders</b></nobr></source>
         <comment>Shared folders tooltip</comment>
-        <translation><br><nobr><b>Brak współdzielonych katalogów</b></nobr></translation>
+        <translation><br><nobr><b>Brak udostępnianych folderów</b></nobr></translation>
     </message>
     <message>
         <source>Indicates whether the Remote Display (VRDP Server) is enabled (<img src=:/vrdp_16px.png/>) or not (<img src=:/vrdp_disabled_16px.png/>).</source>
@@ -4761,7 +4802,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Indicates whether the host mouse pointer is captured by the guest OS:<br><nobr><img src=:/mouse_disabled_16px.png/>&nbsp;&nbsp;pointer is not captured</nobr><br><nobr><img src=:/mouse_16px.png/>&nbsp;&nbsp;pointer is captured</nobr><br><nobr><img src=:/mouse_seamless_16px.png/>&nbsp;&nbsp;mouse integration (MI) is On</nobr><br><nobr><img src=:/mouse_can_seamless_ [...]
-        <translation>Wskazuje, czy kursor myszy gospodarza jest przechwycony przez goszczony system operacyjny:<br><nobr><img src=:/mouse_disabled_16px.png/>&nbsp;&nbsp;kursor nie jest przechwycony</nobr><br><nobr><img src=:/mouse_16px.png/>&nbsp;&nbsp;kursor jest przechwycony</nobr><br><nobr><img src=:/mouse_seamless_16px.png/>&nbsp;&nbsp;integracja myszy (IM) jest włączona</nobr><br>&l [...]
+        <translation>Wskazuje, czy kursor myszy gospodarza jest przechwycony przez goszczony system operacyjny:<br><nobr><img src=:/mouse_disabled_16px.png/>&nbsp;&nbsp;kursor nie jest przechwycony</nobr><br><nobr><img src=:/mouse_16px.png/>&nbsp;&nbsp;kursor jest przechwycony</nobr><br><nobr><img src=:/mouse_seamless_16px.png/>&nbsp;&nbsp;integracja myszy (IM) jest włączona</nobr><br>&l [...]
     </message>
     <message>
         <source>Indicates whether the keyboard is captured by the guest OS (<img src=:/hostkey_captured_16px.png/>) or not (<img src=:/hostkey_16px.png/>).</source>
@@ -4769,60 +4810,60 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source><nobr>Indicates video capturing activity:</nobr><br>%1</source>
-        <translation type="unfinished"></translation>
+        <translation><nobr>Wskazuje aktywność przechwytywania obrazu:</nobr><br>%1</translation>
     </message>
     <message>
         <source><nobr><b>Video capture disabled</b></nobr></source>
-        <translation type="unfinished"></translation>
+        <translation><nobr><b>Przechwytywanie obrazu wyłączone</b></nobr></translation>
     </message>
     <message>
         <source><nobr><b>Video capture file:</b> %1</nobr></source>
-        <translation type="unfinished"></translation>
+        <translation><nobr><b>Plik przechwytywanego obrazu:</b> %1</nobr></translation>
     </message>
     <message>
         <source>Additional feature status:<br><nobr><b>%1:</b>&nbsp;%2</nobr><br><nobr><b>%3:</b>&nbsp;%4</nobr><br><nobr><b>%5:</b>&nbsp;%6</nobr><br><nobr><b>%7:</b>&nbsp;%8%</nobr></source>
         <comment>Virtualization Stuff LED</comment>
-        <translation type="unfinished"></translation>
+        <translation>Stan dodatkowej funkcji:<br><nobr><b>%1:</b>&nbsp;%2</nobr><br><nobr><b>%3:</b>&nbsp;%4</nobr><br><nobr><b>%5:</b>&nbsp;%6</nobr><br><nobr><b>%7:</b>&nbsp;%8%</nobr></translation>
     </message>
     <message>
         <source><p style='white-space:pre'><nobr>Indicates the activity of the hard disks:</nobr>%1</p></source>
         <comment>HDD tooltip</comment>
-        <translation type="unfinished"></translation>
+        <translation><p style='white-space:pre'><nobr>Wskazuje aktywność dysków twardych:</nobr>%1</p></translation>
     </message>
     <message>
         <source><p style='white-space:pre'><nobr>Indicates the activity of the optical drives:</nobr>%1</p></source>
         <comment>CD tooltip</comment>
-        <translation type="unfinished"></translation>
+        <translation><p style='white-space:pre'><nobr>Wskazuje aktywność dysków optycznych:</nobr>%1</p></translation>
     </message>
     <message>
         <source><p style='white-space:pre'><nobr>Indicates the activity of the floppy drives:</nobr>%1</p></source>
         <comment>FD tooltip</comment>
-        <translation type="unfinished"></translation>
+        <translation><p style='white-space:pre'><nobr>Wskazuje aktywność dyskietek:</nobr>%1</p></translation>
     </message>
     <message>
         <source><p style='white-space:pre'><nobr>Indicates the activity of the display:</nobr>%1</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p style='white-space:pre'><nobr>Wskazuje aktywność ekranu:</nobr>%1</p></translation>
     </message>
     <message>
         <source>Indicates whether the host keyboard is captured by the guest OS:<br><nobr><img src=:/hostkey_16px.png/>&nbsp;&nbsp;keyboard is not captured</nobr><br><nobr><img src=:/hostkey_captured_16px.png/>&nbsp;&nbsp;keyboard is captured</nobr></source>
-        <translation type="unfinished"></translation>
+        <translation>Wskazuje czy klawiatura gospodarza jest przechwytywana przez goszczony system operacyjny:<br><nobr><img src=:/hostkey_16px.png/>&nbsp;&nbsp;klawiatura nie jest przechwytywana</nobr><br><nobr><img src=:/hostkey_captured_16px.png/>&nbsp;&nbsp;klawiatura jest przechwytywana</nobr></translation>
     </message>
 </context>
 <context>
     <name>UIInformationDataAudio</name>
     <message>
         <source>Audio</source>
-        <translation type="obsolete">Dźwięk</translation>
+        <translation type="vanished">Dźwięk</translation>
     </message>
     <message>
         <source>Host Driver</source>
         <comment>details report (audio)</comment>
-        <translation type="unfinished">Sterownik gospodarza</translation>
+        <translation>Sterownik gospodarza</translation>
     </message>
     <message>
         <source>Controller</source>
         <comment>details report (audio)</comment>
-        <translation type="unfinished">Kontroler</translation>
+        <translation>Karta dźwiękowa</translation>
     </message>
 </context>
 <context>
@@ -4830,62 +4871,62 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Display</source>
         <comment>details report</comment>
-        <translation type="obsolete">Ekran</translation>
+        <translation type="vanished">Ekran</translation>
     </message>
     <message>
         <source>Video Memory</source>
         <comment>details report</comment>
-        <translation type="unfinished">Pamięć wideo</translation>
+        <translation>Pamięć wideo</translation>
     </message>
     <message>
         <source>Screens</source>
         <comment>details report</comment>
-        <translation type="unfinished">Ekrany</translation>
+        <translation>Ekrany</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details report (3D Acceleration)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Włączona</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (3D Acceleration)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Wyłączona</translation>
     </message>
     <message>
         <source>3D Acceleration</source>
         <comment>details report</comment>
-        <translation type="unfinished">Akceleracja 3D</translation>
+        <translation>Akceleracja 3D</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details report (2D Video Acceleration)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Włączona</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (2D Video Acceleration)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Wyłączona</translation>
     </message>
     <message>
         <source>2D Video Acceleration</source>
         <comment>details report</comment>
-        <translation type="unfinished">Akceleracja wideo 2D</translation>
+        <translation>Akceleracja obrazu 2D</translation>
     </message>
     <message>
         <source>Remote Desktop Server Port</source>
         <comment>details report (VRDE Server)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Port serwera pulpitu zdalnego</translation>
     </message>
     <message>
         <source>Remote Desktop Server</source>
         <comment>details report (VRDE Server)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Serwer pulpitu zdalnego</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (VRDE Server)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Wyłączony</translation>
     </message>
 </context>
 <context>
@@ -4893,70 +4934,70 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>General</source>
         <comment>details report</comment>
-        <translation type="obsolete">Ogólne</translation>
+        <translation type="vanished">Ogólne</translation>
     </message>
     <message>
         <source>Name</source>
         <comment>details report</comment>
-        <translation type="unfinished">Nazwa</translation>
+        <translation>Nazwa</translation>
     </message>
     <message>
         <source>OS Type</source>
         <comment>details report</comment>
-        <translation type="unfinished">Typ systemu</translation>
+        <translation>Typ systemu operacyjnego</translation>
     </message>
 </context>
 <context>
     <name>UIInformationDataNetwork</name>
     <message>
         <source>Network</source>
-        <translation type="obsolete">Sieć</translation>
+        <translation type="vanished">Sieć</translation>
     </message>
     <message>
         <source>Bridged adapter, %1</source>
         <comment>details report (network)</comment>
-        <translation type="unfinished">Mostkowana karta sieciowa, %1</translation>
+        <translation>Mostkowana karta sieciowa, %1</translation>
     </message>
     <message>
         <source>Internal network, '%1'</source>
         <comment>details report (network)</comment>
-        <translation type="unfinished">Sieć wewnętrzna (internal), '%1'</translation>
+        <translation>Sieć wewnętrzna, '%1'</translation>
     </message>
     <message>
         <source>Host-only adapter, '%1'</source>
         <comment>details report (network)</comment>
-        <translation type="unfinished">Karta sieci izolowanej, '%1'</translation>
+        <translation>Karta sieci izolowanej, '%1'</translation>
     </message>
     <message>
         <source>Generic, '%1'</source>
         <comment>details report (network)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Nieznana, '%1'</translation>
     </message>
     <message>
         <source>NAT network, '%1'</source>
         <comment>details report (network)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Sieć NAT, '%1'</translation>
     </message>
     <message>
         <source>Adapter %1</source>
         <comment>details report (network)</comment>
-        <translation type="unfinished">Karta %1</translation>
+        <translation>Karta %1</translation>
     </message>
 </context>
 <context>
     <name>UIInformationDataNetworkStatistics</name>
     <message>
         <source>Data Transmitted</source>
-        <translation type="unfinished">Dane wysłane</translation>
+        <translation>Dane wysłane</translation>
     </message>
     <message>
         <source>Data Received</source>
-        <translation type="unfinished">Dane odebrane</translation>
+        <translation>Dane odebrane</translation>
     </message>
     <message>
         <source>Network Statistics</source>
         <comment>details report</comment>
-        <translation type="obsolete">Statystyka sieci</translation>
+        <translation type="vanished">Statystyki sieci</translation>
     </message>
 </context>
 <context>
@@ -4964,17 +5005,17 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Parallel Ports</source>
         <comment>details report</comment>
-        <translation type="obsolete">Porty równoległe</translation>
+        <translation type="vanished">Porty równoległe</translation>
     </message>
     <message>
         <source>Port %1</source>
         <comment>details report (parallel ports)</comment>
-        <translation type="unfinished">Port %1</translation>
+        <translation>Port %1</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (parallel ports)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Wyłączone</translation>
     </message>
 </context>
 <context>
@@ -4982,84 +5023,84 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Runtime Attributes</source>
         <comment>details report</comment>
-        <translation type="obsolete">Parametry maszyny</translation>
+        <translation type="vanished">Parametry maszyny</translation>
     </message>
     <message>
         <source>Not Detected</source>
         <comment>guest additions</comment>
-        <translation type="unfinished">Nie wykryto</translation>
+        <translation>Nie wykryto</translation>
     </message>
     <message>
         <source>Not Detected</source>
         <comment>guest os type</comment>
-        <translation type="unfinished">Nie wykryto</translation>
+        <translation>Nie wykryty</translation>
     </message>
     <message>
         <source>Not Available</source>
         <comment>details report (VRDE server port)</comment>
-        <translation type="unfinished">Niedostępne</translation>
+        <translation>Niedostępny</translation>
     </message>
     <message>
         <source>Screen Resolution</source>
-        <translation type="unfinished">Rozdzielczość ekranu</translation>
+        <translation>Rozdzielczość ekranu</translation>
     </message>
     <message>
         <source>VM Uptime</source>
-        <translation type="unfinished"></translation>
+        <translation>Czas pracy wirtualnej maszyny</translation>
     </message>
     <message>
         <source>Clipboard Mode</source>
-        <translation type="unfinished"></translation>
+        <translation>Tryb schowka</translation>
     </message>
     <message>
         <source>Drag and Drop Mode</source>
-        <translation type="unfinished"></translation>
+        <translation>Tryb przeciągnij i upuść</translation>
     </message>
     <message>
         <source>VT-x/AMD-V</source>
         <comment>details report</comment>
-        <translation type="unfinished">VT-x/AMD-V</translation>
+        <translation>VT-x/AMD-V</translation>
     </message>
     <message>
         <source>Nested Paging</source>
         <comment>details report</comment>
-        <translation type="unfinished">Zagnieżdżone stronicowanie</translation>
+        <translation>Zagnieżdżone stronicowanie</translation>
     </message>
     <message>
         <source>Unrestricted Execution</source>
         <comment>details report</comment>
-        <translation type="unfinished"></translation>
+        <translation>Nieograniczone wykorzystanie</translation>
     </message>
     <message>
         <source>Paravirtualization Interface</source>
         <comment>details report</comment>
-        <translation type="unfinished"></translation>
+        <translation>Interfejs parawirtualizacji</translation>
     </message>
     <message>
         <source>Guest Additions</source>
-        <translation type="unfinished">Dodatki (Guest Additions)</translation>
+        <translation>Dodatki gościa</translation>
     </message>
     <message>
         <source>Guest OS Type</source>
         <comment>details report</comment>
-        <translation type="unfinished">Typ systemu operacyjnego gościa</translation>
+        <translation>Typ goszczonego systemu operacyjnego</translation>
     </message>
     <message>
         <source>Remote Desktop Server Port</source>
         <comment>details report (VRDE Server)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Port serwera zdalnego pulpitu</translation>
     </message>
 </context>
 <context>
     <name>UIInformationDataSerialPorts</name>
     <message>
         <source>Serial Ports</source>
-        <translation type="obsolete">Porty szeregowe</translation>
+        <translation type="vanished">Porty szeregowe</translation>
     </message>
     <message>
         <source>Port %1</source>
         <comment>details report (serial ports)</comment>
-        <translation type="unfinished">Port %1</translation>
+        <translation>Port %1</translation>
     </message>
 </context>
 <context>
@@ -5067,47 +5108,47 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Shared Folders</source>
         <comment>details report</comment>
-        <translation type="obsolete">Współdzielone katalogi</translation>
+        <translation type="vanished">Udostępniane foldery</translation>
     </message>
     <message>
         <source>Shared Folders</source>
         <comment>details report (shared folders)</comment>
-        <translation type="unfinished">Współdzielone katalogi</translation>
+        <translation>Udostępniane foldery</translation>
     </message>
 </context>
 <context>
     <name>UIInformationDataStorage</name>
     <message>
         <source>Storage</source>
-        <translation type="obsolete">Nośniki</translation>
+        <translation type="vanished">Pamięć</translation>
     </message>
     <message>
         <source>(Optical Drive)</source>
-        <translation type="unfinished"></translation>
+        <translation>(Napęd optyczny)</translation>
     </message>
 </context>
 <context>
     <name>UIInformationDataStorageStatistics</name>
     <message>
         <source>DMA Transfers</source>
-        <translation type="unfinished">Transfer DMA</translation>
+        <translation>Transfer DMA</translation>
     </message>
     <message>
         <source>PIO Transfers</source>
-        <translation type="unfinished">Transfer PIO</translation>
+        <translation>Transfer PIO</translation>
     </message>
     <message>
         <source>Data Read</source>
-        <translation type="unfinished">Dane odczytane</translation>
+        <translation>Dane odczytane</translation>
     </message>
     <message>
         <source>Data Written</source>
-        <translation type="unfinished">Dane zapisane</translation>
+        <translation>Dane zapisane</translation>
     </message>
     <message>
         <source>Storage Statistics</source>
         <comment>details report</comment>
-        <translation type="obsolete">Statystyka nośników</translation>
+        <translation type="vanished">Statystyka pamięci</translation>
     </message>
 </context>
 <context>
@@ -5115,107 +5156,107 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>System</source>
         <comment>details report</comment>
-        <translation type="obsolete">System</translation>
+        <translation type="vanished">System</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details report (ACPI)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Włączony</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (ACPI)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Wyłączony</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details report (I/O APIC)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Włączony</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (I/O APIC)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Wyłączony</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details report (PAE/NX)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Włączone</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (PAE/NX)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Wyłączone</translation>
     </message>
     <message>
         <source>Base Memory</source>
         <comment>details report</comment>
-        <translation type="unfinished">Pamięć podstawowa</translation>
+        <translation>RAM</translation>
     </message>
     <message>
         <source>Processor(s)</source>
         <comment>details report</comment>
-        <translation type="unfinished">Procesor(y)</translation>
+        <translation>Procesor(y)</translation>
     </message>
     <message>
         <source>Execution Cap</source>
         <comment>details report</comment>
-        <translation type="unfinished"></translation>
+        <translation>Wykorzystanie procesora</translation>
     </message>
     <message>
         <source>Boot Order</source>
         <comment>details report</comment>
-        <translation type="unfinished">Kolejność startowania</translation>
+        <translation>Kolejność bootowania</translation>
     </message>
     <message>
         <source>ACPI</source>
         <comment>details report</comment>
-        <translation type="unfinished">ACPI</translation>
+        <translation>ACPI</translation>
     </message>
     <message>
         <source>I/O APIC</source>
         <comment>details report</comment>
-        <translation type="unfinished">I/O APIC</translation>
+        <translation>I/O APIC</translation>
     </message>
     <message>
         <source>PAE/NX</source>
         <comment>details report</comment>
-        <translation type="unfinished">PAE/NX</translation>
+        <translation>PAE/NX</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details report (VT-x/AMD-V)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Włączone</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (VT-x/AMD-V)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Wyłączone</translation>
     </message>
     <message>
         <source>VT-x/AMD-V</source>
         <comment>details report</comment>
-        <translation type="unfinished">VT-x/AMD-V</translation>
+        <translation>VT-x/AMD-V</translation>
     </message>
     <message>
         <source>Enabled</source>
         <comment>details report (Nested Paging)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Włączone</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (Nested Paging)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Wyłączone</translation>
     </message>
     <message>
         <source>Nested Paging</source>
         <comment>details report</comment>
-        <translation type="unfinished">Zagnieżdżone stronicowanie</translation>
+        <translation>Zagnieżdżone stronicowanie</translation>
     </message>
     <message>
         <source>Paravirtualization Interface</source>
         <comment>details report</comment>
-        <translation type="unfinished"></translation>
+        <translation>Interfejs parawirtualizacji</translation>
     </message>
 </context>
 <context>
@@ -5223,22 +5264,22 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>USB</source>
         <comment>details report</comment>
-        <translation type="obsolete">USB</translation>
+        <translation type="vanished">USB</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (USB)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Wyłączone</translation>
     </message>
     <message>
         <source>Device Filters</source>
         <comment>details report (USB)</comment>
-        <translation type="unfinished">Filtry urządzeń</translation>
+        <translation>Filtry urządzeń</translation>
     </message>
     <message>
         <source>%1 (%2 active)</source>
         <comment>details report (USB)</comment>
-        <translation type="unfinished">%1 (aktywne: %2)</translation>
+        <translation>%1 (aktywne: %2)</translation>
     </message>
 </context>
 <context>
@@ -5304,7 +5345,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Select a filename for the screenshot ...</source>
-        <translation type="unfinished"></translation>
+        <translation>Wybierz nazwę dla zrzutu ekranu ...</translation>
     </message>
 </context>
 <context>
@@ -5335,7 +5376,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Selects the audio output driver. The <b>Null Audio Driver</b> makes the guest see an audio card, however every access to it will be ignored.</source>
-        <translation type="unfinished"></translation>
+        <translation>Pozwala wybrać sterownik wyjścia audio. <b>Zerowy sterownik audio</b> sprawia, że gość widzi kartę dzwiękową, jednakże każdy dostęp do niej będzie ignorowany.</translation>
     </message>
 </context>
 <context>
@@ -5382,7 +5423,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>When checked, the VM will act as a Remote Desktop Protocol (RDP) server, allowing remote clients to connect and operate the VM (when it is running) using a standard RDP client.</source>
-        <translation>Po zaznaczeniu tej opcji maszyna wirtualna będzie funkcjonować jako serwer Remote Desktop Protocol (RDP), zezwalając zdalnym klientom na podłączenie się i pracę z tą maszyną (gdy jest włączona), przy użyciu standardowego klienta RDP.</translation>
+        <translation>Po zaznaczeniu tej opcji, maszyna wirtualna będzie funkcjonować jako serwer Remote Desktop Protocol (RDP), zezwalając zdalnym klientom na podłączenie się i pracę z tą maszyną (gdy jest włączona), przy użyciu standardowego klienta RDP.</translation>
     </message>
     <message>
         <source>&Enable Server</source>
@@ -5394,7 +5435,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Holds the VRDP Server port number. You may specify <tt>0</tt> (zero) to reset the port to the default value.</source>
-        <translation type="obsolete">Zawiera numer portu serwera VRDP. Aby ustawić port na wartość domyślną, należy wpisać <tt>0</tt> (zero).</translation>
+        <translation type="obsolete">Przechowuje numer portu serwera VRDP. Aby ustawić port na wartość domyślną, należy wpisać <tt>0</tt> (zero).</translation>
     </message>
     <message>
         <source>Authentication &Method:</source>
@@ -5442,7 +5483,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>&Allow Multiple Connections</source>
-        <translation type="unfinished"></translation>
+        <translation>&Pozwól na wielokrotne połączenia</translation>
     </message>
     <message>
         <source>you have 2D Video Acceleration enabled. As 2D Video Acceleration is supported for Windows guests only, this feature will be disabled.</source>
@@ -5450,194 +5491,194 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Video &Capture</source>
-        <translation type="unfinished"></translation>
+        <translation>Przechwytywanie &obrazu</translation>
     </message>
     <message>
         <source>When checked, VirtualBox will record the virtual machine session as a video file.</source>
-        <translation type="unfinished"></translation>
+        <translation>Po zaznaczeniu tej opcji, VirtualBox będzie nagrywał sesję wirtualnej maszyny jako plik video.</translation>
     </message>
     <message>
         <source>&Enable Video Capture</source>
-        <translation type="unfinished"></translation>
+        <translation>&Włącz przechwytywanie obrazu</translation>
     </message>
     <message>
         <source>File &Path:</source>
-        <translation type="unfinished"></translation>
+        <translation>Ścieżka do &pliku:</translation>
     </message>
     <message>
         <source>Frame &Size:</source>
-        <translation type="unfinished"></translation>
+        <translation>Wymiary &klatki:</translation>
     </message>
     <message>
         <source>&Frame Rate:</source>
-        <translation type="unfinished"></translation>
+        <translation>&Częstotliwość wyświetlania klatek</translation>
     </message>
     <message>
         <source>&Quality:</source>
-        <translation type="unfinished"></translation>
+        <translation>&Jakość:</translation>
     </message>
     <message>
         <source>&Screens:</source>
-        <translation type="unfinished"></translation>
+        <translation>&Ekrany:</translation>
     </message>
     <message>
         <source>The virtual machine is set up to use hardware graphics acceleration. However the host system does not currently provide this, so you will not be able to start the machine.</source>
-        <translation type="unfinished"></translation>
+        <translation>Wirtualna maszyna jest ustawiona tak, by używać graficznej akceleracji sprzętowej. Jednakże system gospodarza aktualnie tego nie zapewnia, więc nie możesz uruchomić maszyny.</translation>
     </message>
     <message>
         <source>The virtual machine is currently assigned less than <b>%1</b> of video memory which is the minimum amount required for High Definition Video to be played efficiently.</source>
-        <translation type="unfinished"></translation>
+        <translation>Aktualnie do wirtualnej maszyny jest przydzielone mniej niż <b>%1</b> pamięci video, z której minimalna wartość jest wymagana do obrazu HD, by efektywnie odtwarzać.</translation>
     </message>
     <message>
         <source>The virtual machine is set up to use Video Stream Acceleration. As this feature only works with Windows guest systems it will be disabled.</source>
-        <translation type="unfinished"></translation>
+        <translation>Wirtualna maszyna jest ustawiona tak, by korzystać ze sprzętowej akceleracji video. Ponieważ ta funkcja działa jedynie z goszczonymi systemami Windows, zostanie ona wyłączona.</translation>
     </message>
     <message>
         <source>The VRDE server port value is not currently specified.</source>
-        <translation type="unfinished"></translation>
+        <translation>Port serwera VRDE jest aktualnie nieokreślony.</translation>
     </message>
     <message>
         <source>The VRDE authentication timeout value is not currently specified.</source>
-        <translation type="unfinished"></translation>
+        <translation>Wartość limitu czasu uwierzytelniania VRDE jest aktualnie nieokreślona.</translation>
     </message>
     <message>
         <source>User Defined</source>
-        <translation type="unfinished"></translation>
+        <translation>Zdefiniowane przez użytkownika</translation>
     </message>
     <message>
         <source>%1 fps</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 fps</translation>
     </message>
     <message>
         <source>fps</source>
-        <translation type="unfinished"></translation>
+        <translation>fps</translation>
     </message>
     <message>
         <source>low</source>
         <comment>quality</comment>
-        <translation type="unfinished"></translation>
+        <translation>niska</translation>
     </message>
     <message>
         <source>medium</source>
         <comment>quality</comment>
-        <translation type="unfinished"></translation>
+        <translation>średnia</translation>
     </message>
     <message>
         <source>high</source>
         <comment>quality</comment>
-        <translation type="unfinished"></translation>
+        <translation>wysoka</translation>
     </message>
     <message>
         <source>kbps</source>
-        <translation type="unfinished"></translation>
+        <translation>kbps</translation>
     </message>
     <message>
         <source>Screen %1</source>
-        <translation type="unfinished"></translation>
+        <translation>Ekran %1</translation>
     </message>
     <message>
         <source>&Screen</source>
-        <translation type="unfinished"></translation>
+        <translation>&Ekran</translation>
     </message>
     <message>
         <source>Scale Factor:</source>
-        <translation type="unfinished"></translation>
+        <translation>Współczynnik skali:</translation>
     </message>
     <message>
         <source>Controls the guest screen scale factor.</source>
-        <translation type="unfinished"></translation>
+        <translation>Kontroluje współczynnik skali ekranu gościa</translation>
     </message>
     <message>
         <source>%</source>
-        <translation type="unfinished"></translation>
+        <translation>%</translation>
     </message>
     <message>
         <source>HiDPI Support:</source>
-        <translation type="unfinished"></translation>
+        <translation>Obsługuje HiDPI:</translation>
     </message>
     <message>
         <source>When checked, guest screen contents will not be scaled up to compensate for high host screen resolutions.</source>
-        <translation type="unfinished"></translation>
+        <translation>Po zaznaczeniu tej opcji, zawartość ekranu gościa nie zostanie przeskalowana w górę, by utrzymać wysoką rozdzielczość ekranu gospodarza.</translation>
     </message>
     <message>
         <source>Use &Unscaled HiDPI Output</source>
-        <translation type="unfinished"></translation>
+        <translation>Używaj &nieprzeskalowanego wyjścia HiDPI</translation>
     </message>
     <message>
         <source>Acceleration:</source>
-        <translation type="unfinished"></translation>
+        <translation>Akceleracja:</translation>
     </message>
     <message>
         <source>Holds the VRDP Server port number. You may specify <tt>0</tt> (zero), to select port 3389, the standard port for RDP.</source>
-        <translation type="unfinished"></translation>
+        <translation>Przechowuje numer portu serwera VRDP. Możesz wprowadzić <tt>0</tt> (zero), by wybrać port 3389, czyli standardowy port RDP.</translation>
     </message>
     <message>
         <source>Selects the VRDP authentication method.</source>
-        <translation type="unfinished"></translation>
+        <translation>Pozwala wybrać metodę uwierzytelniania VRDP.</translation>
     </message>
     <message>
         <source>Holds the timeout for guest authentication, in milliseconds.</source>
-        <translation type="unfinished"></translation>
+        <translation>Przechowuje limit czasu uwierzytelniania gościa, w milisekundach.</translation>
     </message>
     <message>
         <source>When checked, multiple simultaneous connections to the VM are permitted.</source>
-        <translation type="unfinished"></translation>
+        <translation>Po zaznaczeniu tej opcji, zostanie dozwolonych wiele jednoczesnych połączeń do maszyny wirtualnej.</translation>
     </message>
     <message>
         <source>Holds the filename VirtualBox uses to save the recorded content.</source>
-        <translation type="unfinished"></translation>
+        <translation>Przechowuje nazwę pliku, którego VirtualBox używa by zapisać zarejestrowaną zawartość.</translation>
     </message>
     <message>
         <source>Selects the resolution (frame size) of the recorded video.</source>
-        <translation type="unfinished"></translation>
+        <translation>Pozwala wybrać rozdzielczość (rozmiar klatki) zarejestrowanego obrazu.</translation>
     </message>
     <message>
         <source>Holds the <b>horizontal</b> resolution (frame width) of the recorded video.</source>
-        <translation type="unfinished"></translation>
+        <translation>Przechowuje <b>poziomą</b> rozdzielczość (szerokość klatki) zarejestrowanego obrazu.</translation>
     </message>
     <message>
         <source>Holds the <b>vertical</b> resolution (frame height) of the recorded video.</source>
-        <translation type="unfinished"></translation>
+        <translation>Przechowuje <b>pionową</b> rozdzielczość (wysokość klatki) zarejestrowanego obrazu.</translation>
     </message>
     <message>
         <source>Controls the maximum number of <b>frames per second</b>. Additional frames will be skipped. Reducing this value will increase the number of skipped frames and reduce the file size.</source>
-        <translation type="unfinished"></translation>
+        <translation>Kontroluje maksymalną liczbę <b>klatek na sekundę</b>. Dodatkowe klatki zostaną pominięte. Obniżenie tej wartości, zwiększy liczbę pomijanych klatek i zmniejszy rozmiar pliku.</translation>
     </message>
     <message>
         <source>Controls the <b>quality</b>. Increasing this value will make the video look better at the cost of an increased file size.</source>
-        <translation type="unfinished"></translation>
+        <translation>Kontroluje <b>jakość</b>. Zwiększenie tej wartości sprawi, że obraz będzie wyglądał lepiej kosztem większego rozmiaru pliku.</translation>
     </message>
     <message>
         <source>Holds the bitrate in <b>kilobits per second</b>. Increasing this value will make the video look better at the cost of an increased file size.</source>
-        <translation type="unfinished"></translation>
+        <translation>Przechowuje bitrate w <b>kilobitach na sekundę</b>.  Zwiększenie tej wartości sprawi, że obraz będzie wyglądał lepiej kosztem większego rozmiaru pliku.</translation>
     </message>
     <message>
         <source>The virtual machine is currently assigned less than <b>%1</b> of video memory which is the minimum amount required to switch to full-screen or seamless mode.</source>
-        <translation type="unfinished"></translation>
+        <translation>Aktualnie do wirtualnej maszyny jest przydzielone mniej niż <b>%1</b> pamięci video, z której minimalna wartość jest wymagana, by przełączyć do trybu Seamless lub pełnego ekranu.</translation>
     </message>
     <message>
         <source>The virtual machine is set up to use hardware graphics acceleration and the operating system hint is set to Windows Vista or later. For best performance you should set the machine's video memory to at least <b>%1</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Wirtualna maszyna jest ustawiona tak, by korzystać z graficznej sprzętowej akceleracji i system operacyjny to Windows Vista lub nowszy. By mieć najlepszą wydajność zalecane jest ustawienie pamięci video na min. <b>%1</b>.</translation>
     </message>
     <message>
         <source>Remote Display is currently enabled for this virtual machine. However, this requires the <i>%1</i> to be installed. Please install the Extension Pack from the VirtualBox download site as otherwise your VM will be started with Remote Display disabled.</source>
-        <translation type="unfinished"></translation>
+        <translation>Pulpit zdalny jest aktualnie włączony dla tej maszyny wirtualnej. Jednakże, wymagane jest zainstalowanie <i>%1</i>. Zainstaluj ponownie pakiet rozszerzeń ze strony pobierania VirtualBox, w przeciwnym wypadku maszyna wirtualna wystartuje z wyłączonym pulpitem zdalnym.</translation>
     </message>
     <message>
         <source>%1 MB</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 MB</translation>
     </message>
     <message>
         <source>%1%</source>
-        <translation type="unfinished">%1%</translation>
+        <translation>%1%</translation>
     </message>
     <message>
         <source><i>About %1MB per 5 minute video</i></source>
-        <translation type="unfinished"></translation>
+        <translation><i>Ok %1MB na 5 minut obrazu</i></translation>
     </message>
     <message>
         <source>When checked, enables video recording for screen %1.</source>
-        <translation type="unfinished"></translation>
+        <translation>Po zaznaczeniu tej opcji, rejestrowanie orazu jest włączone dla ekranu %1.</translation>
     </message>
 </context>
 <context>
@@ -5648,7 +5689,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Holds the path where snapshots of this virtual machine will be stored. Be aware that snapshots can take quite a lot of disk space.</source>
-        <translation type="obsolete">Zawiera ścieżkę do katalogu, w którym będą zapisywane migawki maszyny wirtualnej. Uwaga: migawki mogą zająć sporo miejsca na dysku.</translation>
+        <translation type="obsolete">Przechowuje ścieżkę do folderu, w którym będą zapisywane migawki maszyny wirtualnej. Uwaga: migawki mogą zająć sporo miejsca na dysku.</translation>
     </message>
     <message>
         <source>&Basic</source>
@@ -5664,11 +5705,11 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Holds the name of the virtual machine.</source>
-        <translation type="obsolete">Zawiera nazwę maszyny wirtualnej.</translation>
+        <translation type="obsolete">Przechowuje nazwę maszyny wirtualnej.</translation>
     </message>
     <message>
         <source>Selects the operating system type that you plan to install into this virtual machine (called a guest operating system).</source>
-        <translation type="obsolete">Zawiera typ systemu operacyjnego, którego instalacja jest planowana na tej maszynie (nazywanego goszczonym systemem operacyjnym).</translation>
+        <translation type="obsolete">Przechowuje typ systemu operacyjnego, którego instalacja jest planowana na tej maszynie (nazywanego goszczonym systemem operacyjnym).</translation>
     </message>
     <message>
         <source>Base &Memory Size</source>
@@ -5772,7 +5813,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Selects which clipboard data will be copied between the guest and the host OS. This feature requires Guest Additions to be installed in the guest OS.</source>
-        <translation>Definiuje tryb współdzielenia schowka pomiędzy systemami operacyjnymi gospodarza i goszczonym. Uwaga: opcja ta wymaga zainstalowania Dodatków (Guest Additions) w goszczonym systemie operacyjnym.</translation>
+        <translation>Definiuje tryb współdzielenia schowka pomiędzy systemami operacyjnymi gospodarza i goszczonym. Uwaga: opcja ta wymaga zainstalowania Dodatków gościa w goszczonym systemie operacyjnym.</translation>
     </message>
     <message>
         <source>Defines the type of the virtual IDE controller. Depending on this value, VirtualBox will provide different virtual IDE hardware devices to the guest OS.</source>
@@ -5784,7 +5825,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>S&napshot Folder:</source>
-        <translation>&Katalog migawek:</translation>
+        <translation>&Folder migawek:</translation>
     </message>
     <message>
         <source>&Description</source>
@@ -5792,7 +5833,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Holds the description of the virtual machine. The description field is useful for commenting on configuration details of the installed guest OS.</source>
-        <translation>Zawiera opis maszyny wirtualnej. Można tu umieścić szczegóły dotyczące konfiguracji zainstalowanego jako gościa systemu operacyjnego.</translation>
+        <translation>Przechowuje opis maszyny wirtualnej. Można tu umieścić szczegóły dotyczące konfiguracji zainstalowanego jako gościa systemu operacyjnego.</translation>
     </message>
     <message>
         <source>&Other</source>
@@ -5876,123 +5917,123 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Selects which data will be copied between the guest and the host OS by drag'n'drop. This feature requires Guest Additions to be installed in the guest OS.</source>
-        <translation type="unfinished"></translation>
+        <translation>Określa, które dane zostaną skopiowane pomiędzy systemem operacyjnym gościa, a gospodarza przy użyciu funkcji przeciągnij i upuść. Ta metoda wymaga zainstalowania dodatków gościa w systemie operacyjnym gościa.</translation>
     </message>
     <message>
         <source>No name specified for the virtual machine.</source>
-        <translation type="unfinished"></translation>
+        <translation>Brak określonej nazwy dla wirtualnej maszyny.</translation>
     </message>
     <message>
         <source>The virtual machine operating system hint is set to a 64-bit type. 64-bit guest systems require hardware virtualization, so this will be enabled automatically if you confirm the changes.</source>
-        <translation type="unfinished"></translation>
+        <translation>Typ wirtualnej maszyny jest ustawiony jako 64-bitowy. Goszczone 64-bitowe systemy wymagają wirtualizacji sprzętowej, więc zostanie to włączone automatycznie, jeśli zatwierdzisz zmiany.</translation>
     </message>
     <message>
         <source>Basi&c</source>
-        <translation type="unfinished"></translation>
+        <translation>Podstawo&we</translation>
     </message>
     <message>
         <source>A&dvanced</source>
-        <translation type="unfinished">&Zaawansowane</translation>
+        <translation>&Zaawansowane</translation>
     </message>
     <message>
         <source>D&rag'n'Drop:</source>
-        <translation type="unfinished"></translation>
+        <translation>Przeciąganie i upuszczanie</translation>
     </message>
     <message>
         <source>D&escription</source>
-        <translation type="unfinished">O&pis</translation>
+        <translation>O&pis</translation>
     </message>
     <message>
         <source>Enc&ryption</source>
-        <translation type="unfinished"></translation>
+        <translation>Szy&frowanie</translation>
     </message>
     <message>
         <source>When checked, enables encryption for this virtual machine.</source>
-        <translation type="unfinished"></translation>
+        <translation>Po zaznaczeniu tej opcji, włącza szyfrowanie dla tej wirtualnej maszyny.</translation>
     </message>
     <message>
         <source>En&able Encryption</source>
-        <translation type="unfinished"></translation>
+        <translation>Wł&ącz szyfrowanie</translation>
     </message>
     <message>
         <source>Encryption C&ipher:</source>
-        <translation type="unfinished"></translation>
+        <translation>Szyfr szyfrow&ania:</translation>
     </message>
     <message>
         <source>Selects the cipher to be used for encrypting the virtual machine disks.</source>
-        <translation type="unfinished"></translation>
+        <translation>Pozwala wybrać szyfr, który zostanie użyty do zaszyfrowania dysków wirtualnej maszyny.</translation>
     </message>
     <message>
         <source>E&nter New Password:</source>
-        <translation type="unfinished"></translation>
+        <translation>Wp&rowadź nowe hasło:</translation>
     </message>
     <message>
         <source>Holds the password to be assigned to the virtual machine.</source>
-        <translation type="unfinished"></translation>
+        <translation>Przechowuje hasło, które zostanie przydzielony do wirtualnej maszyny.</translation>
     </message>
     <message>
         <source>C&onfirm New Password:</source>
-        <translation type="unfinished"></translation>
+        <translation>Po&twierdź nowe hasło:</translation>
     </message>
     <message>
         <source>Confirms the password to be assigned to the virtual machine.</source>
-        <translation type="unfinished"></translation>
+        <translation>Umożliwia potwierdzienie nowego hasła, które zostanie przydzielono do wirtualnej maszyny.</translation>
     </message>
     <message>
         <source>You are trying to encrypt this virtual machine. However, this requires the <i>%1</i> to be installed. Please install the Extension Pack from the VirtualBox download site.</source>
-        <translation type="unfinished"></translation>
+        <translation>Próbujesz zaszyfrować tę wirtualną maszynę. Jednakże, to wymaga zainstalowania <i>%1</i> . Zainstaluj pakiet rozszerzeń ze strony pobierania VirtualBox.</translation>
     </message>
     <message>
         <source>Encryption cipher type not specified.</source>
-        <translation type="unfinished"></translation>
+        <translation>Brak określonego typu szyfru.</translation>
     </message>
     <message>
         <source>Encryption password empty.</source>
-        <translation type="unfinished"></translation>
+        <translation>Hasło szyfrowania jest puste.</translation>
     </message>
     <message>
         <source>Encryption passwords do not match.</source>
-        <translation type="unfinished"></translation>
+        <translation>Hasła szyfrowania nie zgadzają się.</translation>
     </message>
     <message>
         <source>Holds the path where snapshots of this virtual machine will be stored. Be aware that snapshots can take quite a lot of storage space.</source>
-        <translation type="unfinished"></translation>
+        <translation>Przechowuje ścieżkę do folderu, w którym będą zapisywane migawki maszyny wirtualnej. Uwaga: migawki mogą zająć sporo miejsca na dysku.</translation>
     </message>
     <message>
         <source>Leave Unchanged</source>
         <comment>cipher type</comment>
-        <translation type="unfinished"></translation>
+        <translation>Pozostaw niezmieniony</translation>
     </message>
 </context>
 <context>
     <name>UIMachineSettingsInterface</name>
     <message>
         <source>Allows to modify VM menu-bar contents.</source>
-        <translation type="unfinished"></translation>
+        <translation>Pozwala zmodyfikować zawartość paska menu VM.</translation>
     </message>
     <message>
         <source>Mini ToolBar:</source>
-        <translation type="unfinished">Miniaturowy pasek narzędzi:</translation>
+        <translation>Mini pasek narzędziowy</translation>
     </message>
     <message>
         <source>When checked, show the Mini ToolBar in full-screen and seamless modes.</source>
-        <translation type="unfinished"></translation>
+        <translation>Po zaznaczeniu wyświetla mini pasek narzędziowy w trybie Seamless i pełnego ekranu.</translation>
     </message>
     <message>
         <source>Show in &Full-screen/Seamless</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyświetl w trybie pełnego ekranu/Seamless</translation>
     </message>
     <message>
         <source>When checked, show the Mini ToolBar at the top of the screen, rather than in its default position at the bottom of the screen.</source>
-        <translation type="unfinished"></translation>
+        <translation>Po zaznaczeniu tej opcji, pokazuje mini pasek narzędziowy u góry ekranu, a nie w jego domyślnej pozycji, czyli w dolnej części ekranu.</translation>
     </message>
     <message>
         <source>Show at &Top of Screen</source>
-        <translation type="unfinished">Pokaż u &góry ekranu</translation>
+        <translation>Pokaż u &góry ekranu</translation>
     </message>
     <message>
         <source>Allows to modify VM status-bar contents.</source>
-        <translation type="unfinished"></translation>
+        <translation>Pozwala zmodyfikować zawartość paska stanu VM.</translation>
     </message>
 </context>
 <context>
@@ -6027,11 +6068,11 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Holds the name of the internal network selected for this adapter.</source>
-        <translation type="obsolete">Zawiera nazwę wewnętrznej sieci wybranej dla tej karty sieciowej.</translation>
+        <translation type="obsolete">Przechowuje nazwę wewnętrznej sieci wybranej dla tej karty sieciowej.</translation>
     </message>
     <message>
         <source>Holds the MAC address of this adapter. It contains exactly 12 characters chosen from {0-9,A-F}. Note that the second character must be an even digit.</source>
-        <translation>Zawiera adres MAC konfigurowanej karty sieciowej. Składa się on z dokładnie 12 znaków z zakresu {0-9,A-F}. Uwaga: drugi znak musi być cyfrą parzystą.</translation>
+        <translation>Przechowuje adres MAC konfigurowanej karty sieciowej. Składa się on dokładnie z 12 znaków z zakresu {0-9,A-F}. Uwaga: drugi znak musi być cyfrą parzystą.</translation>
     </message>
     <message>
         <source>Generates a new random MAC address.</source>
@@ -6051,23 +6092,23 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Holds the TAP interface name.</source>
-        <translation type="obsolete">Zawiera nazwę interfejsu sieciowego TAP.</translation>
+        <translation type="obsolete">Przechowuje nazwę interfejsu sieciowego TAP.</translation>
     </message>
     <message>
         <source>Holds the command executed to set up the TAP interface.</source>
-        <translation type="obsolete">Zawiera polecenie, które będzie wywoływane w celu konfiguracji interfejsu sieciowego TAP.</translation>
+        <translation type="obsolete">Przechowuje polecenie, które będzie wywoływane w celu konfiguracji interfejsu sieciowego TAP.</translation>
     </message>
     <message>
         <source>Selects the setup application.</source>
-        <translation type="obsolete">Wybiera aplikację (skrypt) konfigurującą.</translation>
+        <translation type="obsolete">Pozwala wybrać aplikację (skrypt) konfigurującą.</translation>
     </message>
     <message>
         <source>Holds the command executed to terminate the TAP interface.</source>
-        <translation type="obsolete">Zawiera polecenie, które będzie wywoływane w celu dekonfiguracji interfejsu sieciowego TAP.</translation>
+        <translation type="obsolete">Przechowuje polecenie, które będzie wywoływane w celu dekonfiguracji interfejsu sieciowego TAP.</translation>
     </message>
     <message>
         <source>Selects the terminate application.</source>
-        <translation type="obsolete">Wybiera aplikację (skrypt) dekonfigurującą.</translation>
+        <translation type="obsolete">Pozwala wybrać aplikację (skrypt) dekonfigurującą.</translation>
     </message>
     <message>
         <source>Host Interface Settings</source>
@@ -6167,91 +6208,91 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>&Port Forwarding</source>
-        <translation type="unfinished"></translation>
+        <translation>&Przekierowanie portów</translation>
     </message>
     <message>
         <source>&Promiscuous Mode:</source>
-        <translation type="unfinished"></translation>
+        <translation>&Tryb nasłuchiwania:</translation>
     </message>
     <message>
         <source>Selects the promiscuous mode policy of the network adapter when attached to an internal network, host only network or a bridge.</source>
-        <translation type="unfinished"></translation>
+        <translation>Pozwala wybrać politykę trybu nasłuchiwania karty sieciowej po podłączeniu do sieci wewnętrznej, izolowanej lub mostkowanej.</translation>
     </message>
     <message>
         <source>Generic Properties:</source>
-        <translation type="unfinished"></translation>
+        <translation>Rozdzajowe właściwości:</translation>
     </message>
     <message>
         <source>Selects the network adapter on the host system that traffic to and from this network card will go through.</source>
-        <translation type="unfinished"></translation>
+        <translation>Pozwala wybrać kartę sieciową systemu gospodarza, która przekierowuje ruch.</translation>
     </message>
     <message>
         <source>Holds the name of the internal network that this network card will be connected to. You can create a new internal network by choosing a name which is not used by any other network cards in this virtual machine or others.</source>
-        <translation type="unfinished"></translation>
+        <translation>Przechowuje nazwę wewnętrznej sieci, do której zostanie karta podłączona. Możesz utworzyć nową wewnętrzną sieć, wybierając nazwę, która nie jest używana przez inną kartę sieciową w tej lub innej wirtualnej maszynie.</translation>
     </message>
     <message>
         <source>Selects the virtual network adapter on the host system that traffic to and from this network card will go through. You can create and remove adapters using the global network settings in the virtual machine manager window.</source>
-        <translation type="unfinished"></translation>
+        <translation>Pozwala wybrać kartę sieciową systemu gospodarza, która przekierowuje ruch. Możesz utworzyć lub usunąć kartę, używając globalnych ustawień sieci w oknie menedźera wirtualnej maszyny.</translation>
     </message>
     <message>
         <source>Selects the driver to be used with this network card.</source>
-        <translation type="unfinished"></translation>
+        <translation>Pozwala wybrać sterownik karty sieciowej.</translation>
     </message>
     <message>
         <source>&MAC Address:</source>
-        <translation type="unfinished"></translation>
+        <translation>&Adres MAC:</translation>
     </message>
     <message>
         <source>No bridged network adapter is currently selected.</source>
-        <translation type="unfinished"></translation>
+        <translation>Brak wybranej karty sieci mostkowanej.</translation>
     </message>
     <message>
         <source>No internal network name is currently specified.</source>
-        <translation type="unfinished"></translation>
+        <translation>Brak wybranej sieci wewnętrznej.</translation>
     </message>
     <message>
         <source>No host-only network adapter is currently selected.</source>
-        <translation type="unfinished"></translation>
+        <translation>Brak wybranej karty sieci izolowanej.</translation>
     </message>
     <message>
         <source>No generic driver is currently selected.</source>
-        <translation type="unfinished"></translation>
+        <translation>Brak wybranego rodzajowego sterownika.</translation>
     </message>
     <message>
         <source>The MAC address must be 12 hexadecimal digits long.</source>
-        <translation type="unfinished"></translation>
+        <translation>Adres MAC musi mieć długość 12 cyfr szesnastkowych.</translation>
     </message>
     <message>
         <source>The second digit in the MAC address may not be odd as only unicast addresses are allowed.</source>
-        <translation type="unfinished"></translation>
+        <translation>Druga cyfra w adresie MAC nie może być nieparzysta, gdyż tylko adresy unicast są dozwolone.</translation>
     </message>
     <message>
         <source>No NAT network name is currently specified.</source>
-        <translation type="unfinished"></translation>
+        <translation>Brak aktualnie określonej nazwy sieci NAT.</translation>
     </message>
     <message>
         <source>Holds the name of the NAT network that this network card will be connected to. You can create and remove networks using the global network settings in the virtual machine manager window.</source>
-        <translation type="unfinished"></translation>
+        <translation>Przechowuje nazwę sieci NAT, do której karta jest podłączona. Możesz utworzyć i usunąć sieci, używając globalnych ustawień sieci w okno menedżera wirtualnej maszyny.</translation>
     </message>
     <message>
         <source>Selects how this virtual adapter is attached to the real network of the Host OS.</source>
-        <translation type="unfinished"></translation>
+        <translation>Pozwala wybrać jaka wirtualna karta sieciowa jest przydzielona do prawdziwej sieci systemu operacyjnego gospodarza.</translation>
     </message>
     <message>
         <source>Shows additional network adapter options.</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyświetla opcje dodatkowych ustawień karty sieciowej.</translation>
     </message>
     <message>
         <source>Holds the configuration settings for the network attachment driver. The settings should be of the form <b>name=value</b> and will depend on the driver. Use <b>shift-enter</b> to add a new entry.</source>
-        <translation type="unfinished"></translation>
+        <translation>Przechowuje ustawienia konfiguracyjne dla załączonego sterownika sieci. Ustawienia powinny być w formie <b>nazwa=wartość</b> i będą zależne od sterownika. Wciśnij <b>shift-enter</b>, by dodać nowy wpis.</translation>
     </message>
     <message>
         <source>When checked, the virtual network cable is plugged in.</source>
-        <translation type="unfinished"></translation>
+        <translation>Po zaznaczeniu tej opcji, wirtualny kabel sieciowy jest podłączony.</translation>
     </message>
     <message>
         <source>Displays a window to configure port forwarding rules.</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyświetla okno w celu skonfigurowania reguł przekierowania portów.</translation>
     </message>
 </context>
 <context>
@@ -6298,7 +6339,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Holds the name of the host network adapter selected for bridged networking.</source>
-        <translation type="obsolete">Zawiera nazwę karty sieciowej gospodarza wybranej dla połączenia mostkowanego (bridged).</translation>
+        <translation type="obsolete">Przechowuje nazwę karty sieciowej gospodarza wybranej dla połączenia mostkowanego (bridged).</translation>
     </message>
     <message>
         <source>Internal &Network:</source>
@@ -6306,7 +6347,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Holds the name of the internal network selected for this adapter.</source>
-        <translation type="obsolete">Zawiera nazwę wewnętrznej sieci wybranej dla tej karty sieciowej.</translation>
+        <translation type="obsolete">Przechowuje nazwę wewnętrznej sieci wybranej dla tej karty sieciowej.</translation>
     </message>
     <message>
         <source>Host-only &Network Adapter:</source>
@@ -6314,7 +6355,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Holds the name of the VirtualBox network adapter selected for host-only networking.</source>
-        <translation type="obsolete">Zawiera nazwę karty sieciowej VirtualBox wybranej dla połączenia izolowanego (host-only).</translation>
+        <translation type="obsolete">Przechowuje nazwę karty sieciowej VirtualBox wybranej dla połączenia izolowanego (host-only).</translation>
     </message>
     <message>
         <source>Guest Settings</source>
@@ -6326,7 +6367,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Holds the MAC address of this adapter. It contains exactly 12 characters chosen from {0-9,A-F}. Note that the second character must be an even digit.</source>
-        <translation type="obsolete">Zawiera adres MAC konfigurowanej karty sieciowej. Składa się on z dokładnie 12 znaków z zakresu {0-9,A-F}. Uwaga: drugi znak musi być cyfrą.</translation>
+        <translation type="obsolete">Przechowuje adres MAC konfigurowanej karty sieciowej. Składa się on z dokładnie 12 znaków z zakresu {0-9,A-F}. Uwaga: drugi znak musi być cyfrą.</translation>
     </message>
     <message>
         <source>Generates a new random MAC address.</source>
@@ -6369,7 +6410,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Holds the parallel port number. You can choose one of the standard parallel ports or select <b>User-defined</b> and specify port parameters manually.</source>
-        <translation>Zawiera numer portu równoległego. Można wybrać jeden ze standardowych portów równoległych lub zaznaczyć opcję <b>Użytkownika</b> i podać parametry portu ręcznie.</translation>
+        <translation>Przechowuje numer portu równoległego. Można wybrać jeden ze standardowych portów równoległych lub zaznaczyć opcję <b>Użytkownika</b> i podać parametry portu ręcznie.</translation>
     </message>
     <message>
         <source>&IRQ:</source>
@@ -6377,7 +6418,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Holds the IRQ number of this parallel port. Valid values are integer numbers in range from <tt>0</tt> to <tt>255</tt>. Values greater than <tt>15</tt> may only be used if the <b>I/O APIC</b> is enabled for this virtual machine.</source>
-        <translation type="obsolete">Zawiera numer przerwania IRQ danego portu równoległego. Poprawne wartości to liczby całkowite od <tt>0</tt> do <tt>255</tt>. Wartości większe od <tt>15</tt> mogą być używane tylko, jeśli opcja <b>I/O APIC</b> zostanie włączona w ustawieniach maszyny wirtualnej.</translation>
+        <translation type="obsolete">Przechowuje numer przerwania IRQ danego portu równoległego. Poprawne wartości to liczby całkowite od <tt>0</tt> do <tt>255</tt>. Wartości większe od <tt>15</tt> mogą być używane tylko, jeśli opcja <b>I/O APIC</b> zostanie włączona w ustawieniach maszyny wirtualnej.</translation>
     </message>
     <message>
         <source>I/O Po&rt:</source>
@@ -6385,7 +6426,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Holds the base I/O port address of this parallel port. This should be a whole number between <tt>0</tt> and <tt>0xFFFF</tt>.</source>
-        <translation type="obsolete">Zawiera adres I/O danego portu równoległego. Poprawne wartości to liczby szesnastkowe od <tt>0</tt> do <tt>0xFFFF</tt>.</translation>
+        <translation type="obsolete">Przechowuje adres I/O danego portu równoległego. Poprawne wartości to liczby szesnastkowe od <tt>0</tt> do <tt>0xFFFF</tt>.</translation>
     </message>
     <message>
         <source>Port &Path:</source>
@@ -6393,35 +6434,35 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Holds the host parallel device name.</source>
-        <translation>Zawiera nazwę urządzenia równoległego w systemie gospodarza.</translation>
+        <translation>Przechowuje nazwę urządzenia równoległego w systemie gospodarza.</translation>
     </message>
     <message>
         <source>Holds the IRQ number of this parallel port. This should be a whole number between <tt>0</tt> and <tt>255</tt>. Values greater than <tt>15</tt> may only be used if the <b>I/O APIC</b> setting is enabled for this virtual machine.</source>
-        <translation>Zawiera numer przerwania IRQ danego portu równoległego. Poprawne wartości to liczby całkowite od <tt>0</tt> do <tt>255</tt>. Wartości większe od <tt>15</tt> mogą być używane tylko, jeśli opcja <b>I/O APIC</b> jest włączona w ustawieniach maszyny wirtualnej.</translation>
+        <translation>Przechowuje numer przerwania IRQ danego portu równoległego. Poprawne wartości to liczby całkowite od <tt>0</tt> do <tt>255</tt>. Wartości większe od <tt>15</tt> mogą być używane tylko, jeśli opcja <b>I/O APIC</b> jest włączona w ustawieniach maszyny wirtualnej.</translation>
     </message>
     <message>
         <source>Holds the base I/O port address of this parallel port. Valid values are integer numbers in range from <tt>0</tt> to <tt>0xFFFF</tt>.</source>
-        <translation>Zawiera bazowy adres I/O danego portu równoległego. Poprawne wartości to liczby szesnastkowe od <tt>0</tt> do <tt>0xFFFF</tt>.</translation>
+        <translation>Przechowuje bazowy adres wejścia/wyjścia danego portu równoległego. Poprawne wartości to liczby szesnastkowe od <tt>0</tt> do <tt>0xFFFF</tt>.</translation>
     </message>
     <message>
         <source>No IRQ is currently specified.</source>
-        <translation type="unfinished"></translation>
+        <translation>Brak określonego IRQ.</translation>
     </message>
     <message>
         <source>No I/O port is currently specified.</source>
-        <translation type="unfinished"></translation>
+        <translation>Brak określonego portu wejścia/wyjścia.</translation>
     </message>
     <message>
         <source>Two or more ports have the same settings.</source>
-        <translation type="unfinished"></translation>
+        <translation>Dwa lub więcej portów ma te same ustawienia.</translation>
     </message>
     <message>
         <source>No port path is currently specified.</source>
-        <translation type="unfinished"></translation>
+        <translation>Brak określonej ścieżki portu.</translation>
     </message>
     <message>
         <source>There are currently duplicate port paths specified.</source>
-        <translation type="unfinished"></translation>
+        <translation>Aktualnie są powielone ścieżki portu.</translation>
     </message>
 </context>
 <context>
@@ -6443,42 +6484,42 @@ p, li { white-space: pre-wrap; }
     <name>UIMachineSettingsPortForwardingDlg</name>
     <message>
         <source>Port Forwarding Rules</source>
-        <translation type="unfinished"></translation>
+        <translation>Reguły przekierowania portów</translation>
     </message>
 </context>
 <context>
     <name>UIMachineSettingsSF</name>
     <message>
         <source>&Add New Shared Folder</source>
-        <translation type="obsolete">&Dodaj nowy współdzielony katalog</translation>
+        <translation type="obsolete">&Dodaj nowy współdzielony folder</translation>
     </message>
     <message>
         <source>&Edit Selected Shared Folder</source>
-        <translation type="obsolete">&Edytuj wybrany współdzielony katalog</translation>
+        <translation type="obsolete">&Edytuj wybrany współdzielony folder</translation>
     </message>
     <message>
         <source>&Remove Selected Shared Folder</source>
-        <translation type="obsolete">&Usuń wybrany współdzielony katalog</translation>
+        <translation type="obsolete">&Usuń wybrany współdzielony folder</translation>
     </message>
     <message>
         <source>Adds a new shared folder definition.</source>
-        <translation type="obsolete">Dodaje nową definicję współdzielonego katalogu.</translation>
+        <translation type="obsolete">Dodaje nową definicję współdzielonego folderu.</translation>
     </message>
     <message>
         <source>Edits the selected shared folder definition.</source>
-        <translation type="obsolete">Edycja wybranej definicji współdzielonego katalogu.</translation>
+        <translation type="obsolete">Edycja wybranej definicji współdzielonego folderu.</translation>
     </message>
     <message>
         <source>Removes the selected shared folder definition.</source>
-        <translation type="obsolete">Usuwa wybraną definicję współdzielonego katalogu.</translation>
+        <translation type="obsolete">Usuwa wybraną definicję współdzielonego folderu.</translation>
     </message>
     <message>
         <source> Machine Folders</source>
-        <translation> Katalogi maszyny</translation>
+        <translation>Foldery maszyny</translation>
     </message>
     <message>
         <source> Transient Folders</source>
-        <translation> Katalogi tymczasowe</translation>
+        <translation> folderi tymczasowe</translation>
     </message>
     <message>
         <source>Full</source>
@@ -6490,7 +6531,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Lists all shared folders accessible to this machine. Use 'net use x: \\vboxsvr\share' to access a shared folder named <i>share</i> from a DOS-like OS, or 'mount -t vboxsf share mount_point' to access it from a Linux OS. This feature requires Guest Additions.</source>
-        <translation><qt>Zawiera listę współdzielonych katalogów dostępnych dla tej maszyny. Użycie 'net use x: \\vboxsvr\udział' pozwala uzyskać dostęp do współdzielonego katalogu o nazwie <i>udział</i> z systemu typu DOS, podobnie 'mount -t vboxsf udział punkt_montowania' pozwala uzyskać dostęp do niego z poziomu systemu Linux. Uwaga: funkcja ta wymaga zainstalowania Dodatków (Guest Additions).</translation>
+        <translation><qt>Przechowuje listę udostępnianych folderów dostępnych dla tej maszyny. Użycie 'net use x: \\vboxsvr\udział' pozwala uzyskać dostęp do współdzielonego folderu o nazwie <i>udział</i> z systemu typu DOS, podobnie 'mount -t vboxsf udział punkt_montowania' pozwala uzyskać dostęp do niego z poziomu systemu Linux. Uwaga: funkcja ta wymaga zainstalowania Dodatków gościa.</translation>
     </message>
     <message>
         <source>Name</source>
@@ -6506,66 +6547,66 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source> Global Folders</source>
-        <translation type="obsolete">Katalogi globalne</translation>
+        <translation type="obsolete">folderi globalne</translation>
     </message>
     <message>
         <source>&Add Shared Folder</source>
-        <translation type="obsolete">&Dodaj współdzielony katalog</translation>
+        <translation type="obsolete">&Dodaj współdzielony folder</translation>
     </message>
     <message>
         <source>&Edit Shared Folder</source>
-        <translation type="obsolete">&Edytuj współdzielony katalog</translation>
+        <translation type="obsolete">&Edytuj współdzielony folder</translation>
     </message>
     <message>
         <source>&Remove Shared Folder</source>
-        <translation type="obsolete">&Usuń współdzielony katalog</translation>
+        <translation type="obsolete">&Usuń współdzielony folder</translation>
     </message>
     <message>
         <source>&Folders List</source>
-        <translation>&Lista katalogów</translation>
+        <translation>&Lista folderów</translation>
     </message>
     <message>
         <source>Auto-mount</source>
-        <translation type="unfinished"></translation>
+        <translation>Automatyczne montowanie</translation>
     </message>
     <message>
         <source>Yes</source>
-        <translation type="unfinished">Tak</translation>
+        <translation>Tak</translation>
     </message>
     <message>
         <source>Add Shared Folder</source>
-        <translation type="unfinished"></translation>
+        <translation>Dodaj udostępniany folder</translation>
     </message>
     <message>
         <source>Edit Shared Folder</source>
-        <translation type="unfinished"></translation>
+        <translation>Edytuj udostępniany folder</translation>
     </message>
     <message>
         <source>Remove Shared Folder</source>
-        <translation type="unfinished"></translation>
+        <translation>Usuń udostępniany folder</translation>
     </message>
     <message>
         <source>Adds new shared folder.</source>
-        <translation type="unfinished"></translation>
+        <translation>Dodaje nowy udostępniany folder.</translation>
     </message>
     <message>
         <source>Edits selected shared folder.</source>
-        <translation type="unfinished"></translation>
+        <translation>Edytuje wybrany udostępniany folder.</translation>
     </message>
     <message>
         <source>Removes selected shared folder.</source>
-        <translation type="unfinished"></translation>
+        <translation>Kasuje wybrany udostępniany folder.</translation>
     </message>
 </context>
 <context>
     <name>UIMachineSettingsSFDetails</name>
     <message>
         <source>Add Share</source>
-        <translation>Dodaje współdzielony katalog</translation>
+        <translation>Dodaj udostępniany folder</translation>
     </message>
     <message>
         <source>Edit Share</source>
-        <translation>Umożliwia edycję współdzielonego katalogu</translation>
+        <translation>Edytuj udostępniany folder</translation>
     </message>
     <message>
         <source>Dialog</source>
@@ -6573,19 +6614,19 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Folder Path:</source>
-        <translation>Ścieżka do katalogu:</translation>
+        <translation>Ścieżka do folderu:</translation>
     </message>
     <message>
         <source>Folder Name:</source>
-        <translation>Nazwa katalogu:</translation>
+        <translation>Nazwa folderu:</translation>
     </message>
     <message>
         <source>Holds the name of the shared folder (as it will be seen by the guest OS).</source>
-        <translation>Zawiera nazwę współdzielonego katalogu (widzianą przez goszczony system operacyjny).</translation>
+        <translation>Przechowuje nazwę współdzielonego folderu (widzianą przez goszczony system operacyjny).</translation>
     </message>
     <message>
         <source>When checked, the guest OS will not be able to write to the specified shared folder.</source>
-        <translation>Uniemożliwia zapis do współdzielonego katalogu przez goszczony system operacyjny.</translation>
+        <translation>Uniemożliwia zapis do udostępnianego folderu przez goszczony system operacyjny.</translation>
     </message>
     <message>
         <source>&Read-only</source>
@@ -6597,15 +6638,15 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>When checked, the guest OS will try to automatically mount the shared folder on startup.</source>
-        <translation type="unfinished"></translation>
+        <translation>Po zaznaczeniu tej opcji, goszczony system operacyjny będzie próbował automatycznie zamontować udostępniany folder przy starcie.</translation>
     </message>
     <message>
         <source>&Auto-mount</source>
-        <translation type="unfinished"></translation>
+        <translation>&Automatyczne montowanie</translation>
     </message>
     <message>
         <source>When checked, this shared folder will be permanent.</source>
-        <translation type="unfinished"></translation>
+        <translation>Po zaznaczeniu tej opcji, ten folder będzie udostępniany trwale.</translation>
     </message>
 </context>
 <context>
@@ -6629,7 +6670,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Selects the serial port number. You can choose one of the standard serial ports or select <b>User-defined</b> and specify port parameters manually.</source>
-        <translation>Zawiera numer portu szeregowego. Można wybrać jeden ze standardowych portów szeregowych lub zaznaczyć opcję <b>Użytkownika</b> i podać parametry portu ręcznie.</translation>
+        <translation>Pozwala wybrać numer portu szeregowego. Można wybrać jeden ze standardowych portów szeregowych lub zaznaczyć opcję <b>Użytkownika</b> i podać parametry portu ręcznie.</translation>
     </message>
     <message>
         <source>&IRQ:</source>
@@ -6637,15 +6678,15 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Holds the IRQ number of this serial port. Valid values are integer numbers in range from <tt>0</tt> to <tt>255</tt>. Values greater than <tt>15</tt> may only be used if the <b>I/O APIC</b> is enabled for this virtual machine.</source>
-        <translation type="obsolete">Zawiera numer przerwania IRQ danego portu szeregowego. Poprawne wartości to liczby całkowite od <tt>0</tt> do <tt>255</tt>. Wartości większe od <tt>15</tt> mogą być używane tylko, jeśli opcja <b>I/O APIC</b> zostanie włączona w ustawieniach maszyny wirtualnej.</translation>
+        <translation type="obsolete">Przechowuje numer przerwania IRQ danego portu szeregowego. Poprawne wartości to liczby całkowite od <tt>0</tt> do <tt>255</tt>. Wartości większe od <tt>15</tt> mogą być używane tylko, jeśli opcja <b>I/O APIC</b> zostanie włączona w ustawieniach maszyny wirtualnej.</translation>
     </message>
     <message>
         <source>I/O Po&rt:</source>
-        <translation>&Adres I/O portu:</translation>
+        <translation>&Adres portu wejścia/wyjścia:</translation>
     </message>
     <message>
         <source>Holds the base I/O port address of this serial port. This should be a whole number between <tt>0</tt> and <tt>0xFFFF</tt>.</source>
-        <translation type="obsolete">Zawiera adres I/O danego portu szeregowego. Poprawne wartości to liczby szesnastkowe od <tt>0</tt> do <tt>0xFFFF</tt>.</translation>
+        <translation type="obsolete">Przechowuje adres I/O danego portu szeregowego. Poprawne wartości to liczby szesnastkowe od <tt>0</tt> do <tt>0xFFFF</tt>.</translation>
     </message>
     <message>
         <source>Port &Mode:</source>
@@ -6669,7 +6710,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Holds the path to the serial port's pipe on the host when the port is working in <b>Host Pipe</b> mode, or the host serial device name when the port is working in <b>Host Device</b> mode.</source>
-        <translation type="obsolete">Zawiera ścieżkę do łącza nazwanego dla portu szeregowego w systemie gospodarza, jeśli port pracuje w trybie <b>Nazwane łącze w systemie gospodarza</b> lub nazwę sprzętowego portu szeregowego, jeśli port pracuje w trybie <b>Sprzętowy port gospodarza</b>.</translation>
+        <translation type="obsolete">Przechowuje ścieżkę do łącza nazwanego dla portu szeregowego w systemie gospodarza, jeśli port pracuje w trybie <b>Nazwane łącze w systemie gospodarza</b> lub nazwę sprzętowego portu szeregowego, jeśli port pracuje w trybie <b>Sprzętowy port gospodarza</b>.</translation>
     </message>
     <message>
         <source>Port/File &Path:</source>
@@ -6677,51 +6718,51 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Holds the IRQ number of this serial port. This should be a whole number between <tt>0</tt> and <tt>255</tt>. Values greater than <tt>15</tt> may only be used if the <b>I/O APIC</b> setting is enabled for this virtual machine.</source>
-        <translation>Zawiera numer przerwania IRQ danego portu szeregowego. Poprawne wartości to liczby całkowite od <tt>0</tt> do <tt>255</tt>. Wartości większe od <tt>15</tt> mogą być używane tylko, jeśli opcja <b>I/O APIC</b> jest włączona w ustawieniach maszyny wirtualnej.</translation>
+        <translation>Przechowuje numer IRQ danego portu szeregowego. Poprawne wartości to liczby całkowite od <tt>0</tt> do <tt>255</tt>. Wartości większe od <tt>15</tt> mogą być używane tylko, jeśli opcja <b>I/O APIC</b> jest włączona w ustawieniach maszyny wirtualnej.</translation>
     </message>
     <message>
         <source>Holds the base I/O port address of this serial port. Valid values are integer numbers in range from <tt>0</tt> to <tt>0xFFFF</tt>.</source>
-        <translation>Zawiera bazowy adres I/O danego portu szeregowego. Poprawne wartości to liczby szesnastkowe od <tt>0</tt> do <tt>0xFFFF</tt>.</translation>
+        <translation>Przechowuje bazowy adres wejścia/wyjścia danego portu szeregowego. Poprawne wartości to liczby szesnastkowe od <tt>0</tt> do <tt>0xFFFF</tt>.</translation>
     </message>
     <message>
         <source>Selects the working mode of this serial port. If you select <b>Disconnected</b>, the guest OS will detect the serial port but will not be able to operate it.</source>
-        <translation type="unfinished"></translation>
+        <translation>Pozwala wybrać tryb pracy portu szeregowego. Jeśli wybierzesz<b> Odłączony</b>, goszczony system operacyjny wykryje port  szeregowy, ale nie będzie w stanie go używać.</translation>
     </message>
     <message>
         <source>When checked, the virtual machine will assume that the pipe or socket specified in the <b>Path/Address</b> field exists and try to use it. Otherwise, the pipe or socket will be created by the virtual machine when it starts.</source>
-        <translation type="unfinished"></translation>
+        <translation>Po zaznaczeniu tej opcji, maszyna wirtualna będzie zakładać, że rura lub gniazdo określone w  <b>Ścieżka/Adres</b> istnieje i spróbuje je użyć. W przeciwnym wypadku, rura lub gniazdo zostanie utworzone przez wirtualną maszynę, gdy wystartuje.</translation>
     </message>
     <message>
         <source>&Connect to existing pipe/socket</source>
-        <translation type="unfinished"></translation>
+        <translation>&Podłącz do istniejącej rury/gniazda</translation>
     </message>
     <message>
         <source>&Path/Address:</source>
-        <translation type="unfinished"></translation>
+        <translation>&Scieżka/adres:</translation>
     </message>
     <message>
         <source><p>In <b>Host Pipe</b> mode: Holds the path to the serial port's pipe on the host. Examples: "\\.\pipe\myvbox" or "/tmp/myvbox", for Windows and UNIX-like systems respectively.</p><p>In <b>Host Device</b> mode: Holds the host serial device name. Examples: "COM1" or "/dev/ttyS0".</p><p>In <b>Raw File</b> mode: Holds the file-path on the host system, where the seri [...]
-        <translation type="unfinished"></translation>
+        <translation><p>W <b>trybie Host Pipe</b>: przechowuje ścieżkę do portu szeregowego rury na hoście. Przykładowo: "\\.\pipe\myvbox" lub "/tmp/myvbox", odpowiednio dla systemów Windows i UNIX.</p><p>W <b>trybie urządzenia gospodarza</b>: przechowuje seryjną nazwę gospodarza. Przykładowo: "COM1" lub "/dev/ttyS0".</p><p>W <b>trybie plików RAW</b>: przechowuje ścieżkę do pliku w s [...]
     </message>
     <message>
         <source>No IRQ is currently specified.</source>
-        <translation type="unfinished"></translation>
+        <translation>Brak określonego IRQ.</translation>
     </message>
     <message>
         <source>No I/O port is currently specified.</source>
-        <translation type="unfinished"></translation>
+        <translation>Brak określonego portu wejścia/wyjścia.</translation>
     </message>
     <message>
         <source>Two or more ports have the same settings.</source>
-        <translation type="unfinished"></translation>
+        <translation>Dwa lub więcej portów ma te same ustawienia.</translation>
     </message>
     <message>
         <source>No port path is currently specified.</source>
-        <translation type="unfinished"></translation>
+        <translation>Brak określonej ścieżki portu.</translation>
     </message>
     <message>
         <source>There are currently duplicate port paths specified.</source>
-        <translation type="unfinished"></translation>
+        <translation>Aktualnie są powielone ścieżki portu.</translation>
     </message>
 </context>
 <context>
@@ -6779,7 +6820,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Lists all hard disks attached to this machine. Use a mouse click or the <tt>Space</tt> key on the highlighted item to activate the drop-down list and choose the desired value. Use the context menu or buttons to the right to add or remove hard disk attachments.</source>
-        <translation type="obsolete">Zawiera listę wszystkich dysków twardych podłączonych do tej maszyny. Aby rozwinąć listę wyboru, należy kliknąć przyciskiem myszy lub wcisnąć przycisk <tt>Spacja</tt> na wybranej pozycji. W celu podłączenia lub odłączenia dysków, proszę użyć menu kontekstowego lub przycisków po prawej.</translation>
+        <translation type="obsolete">Przechowuje listę wszystkich dysków twardych podłączonych do tej maszyny. Aby rozwinąć listę wyboru, należy kliknąć przyciskiem myszy lub wcisnąć przycisk <tt>Spacja</tt> na wybranej pozycji. W celu podłączenia lub odłączenia dysków, proszę użyć menu kontekstowego lub przycisków po prawej.</translation>
     </message>
     <message>
         <source>Invokes the Virtual Media Manager to select a hard disk to attach to the currently highlighted slot.</source>
@@ -6787,7 +6828,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>If checked, shows the differencing hard disks that are attached to slots rather than their base hard disks (shown for indirect attachments) and allows explicit attaching of differencing hard disks. Check this only if you need a complex hard disk setup.</source>
-        <translation type="obsolete">Po zaznaczeniu tej opcji pokazywane będą różnicowe dyski twarde podłączone do slotów, zamiast ich bazowych dysków twardych (pokazywanych w przypadku podłączeń pośrednich). Pozwoli to również na jawne podłączenie innych dysków różnicowych. Należy zaznaczyć tę opcję tylko, jeśli potrzebna jest złożona konfiguracja dysków twardych.</translation>
+        <translation type="obsolete">Po zaznaczeniu tej opcji, pokazywane będą różnicowe dyski twarde podłączone do slotów, zamiast ich bazowych dysków twardych (pokazywanych w przypadku podłączeń pośrednich). Pozwoli to również na jawne podłączenie innych dysków różnicowych. Należy zaznaczyć tę opcję tylko, jeśli potrzebna jest złożona konfiguracja dysków twardych.</translation>
     </message>
     <message>
         <source>&Show Differencing Hard Disks</source>
@@ -6827,7 +6868,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>No hard disk is selected for <i>%1</i>.</source>
-        <translation type="unfinished">Nie wybrano dysku twardego dla <i>%1</i>.</translation>
+        <translation>Nie wybrano dysku twardego dla <i>%1</i>.</translation>
     </message>
     <message>
         <source><i>%1</i> uses a medium that is already attached to <i>%2</i>.</source>
@@ -6923,11 +6964,11 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>&Storage Tree</source>
-        <translation>&Drzewo nośników</translation>
+        <translation>&Drzewo pamięci</translation>
     </message>
     <message>
         <source>Contains all storage controllers for this machine and the virtual images and host drives attached to them.</source>
-        <translation type="obsolete">Zawiera kontrolery maszyny wirtualnej, oraz dołączone do nich obrazy wirtualne i napędy gospodarza.</translation>
+        <translation type="obsolete">Przechowuje kontrolery maszyny wirtualnej, oraz dołączone do nich obrazy wirtualne i napędy gospodarza.</translation>
     </message>
     <message>
         <source>Information</source>
@@ -6935,11 +6976,11 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>The Storage Tree can contain several controllers of different types. This machine currently has no controllers.</source>
-        <translation>Drzewo nośników może zawierać wiele kontrolerów różnych typów. Ta maszyna wirtualna nie ma teraz żadnych kontrolerów.</translation>
+        <translation>Drzewo pamięci może zawierać wiele kontrolerów różnych typów. Ta maszyna wirtualna nie ma teraz żadnych kontrolerów.</translation>
     </message>
     <message>
         <source>Attributes</source>
-        <translation>Atrybuty</translation>
+        <translation>Parametry</translation>
     </message>
     <message>
         <source>&Name:</source>
@@ -7019,7 +7060,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Use Host I/O Cache</source>
-        <translation>Użyj buforowania I/O gospodarza</translation>
+        <translation>Użyj buforowania wejścia/wyjścia gospodarza</translation>
     </message>
     <message>
         <source>Add SAS Controller</source>
@@ -7039,195 +7080,195 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Type:</source>
-        <translation type="unfinished"></translation>
+        <translation>Typ:</translation>
     </message>
     <message>
         <source>Host Drive</source>
-        <translation type="unfinished">Napęd gospodarza</translation>
+        <translation>Napęd gospodarza</translation>
     </message>
     <message>
         <source>Choose or create a virtual hard disk file. The virtual machine will see the data in the file as the contents of the virtual hard disk.</source>
-        <translation type="unfinished"></translation>
+        <translation>Umożliwia wybranie lub stworzenie pliku wirtualnego dysku twardego. Maszyna wirtualna zobaczy dane w pliku jako zawartość wirtualnego dysku twardego.</translation>
     </message>
     <message>
         <source>Floppy &Drive:</source>
-        <translation type="unfinished"></translation>
+        <translation>Stacja &dyskietek:</translation>
     </message>
     <message>
         <source>Choose a virtual floppy disk or a physical drive to use with the virtual drive. The virtual machine will see a disk inserted into the drive with the data in the file or on the disk in the physical drive as its contents.</source>
-        <translation type="unfinished"></translation>
+        <translation>Pozwala wybrać wirtualną dyskietkę lub fizyczny napęd do użycia z wirtualnym. Wirtualna maszyna zobaczy dysk włożony do napędu z danymi w pliku lub dysk w fizycznym napędzie jako zawartość.</translation>
     </message>
     <message>
         <source>Remove disk from virtual drive</source>
-        <translation type="unfinished"></translation>
+        <translation>Usuń dysk z wirtualnego napędu</translation>
     </message>
     <message>
         <source>&Live CD/DVD</source>
-        <translation type="unfinished"></translation>
+        <translation>&Live CD/DVD</translation>
     </message>
     <message>
         <source>&Solid-state Drive</source>
-        <translation type="unfinished"></translation>
+        <translation>&Dysk SSD</translation>
     </message>
     <message>
         <source>Details:</source>
-        <translation type="unfinished"></translation>
+        <translation>Szczegóły:</translation>
     </message>
     <message>
         <source>at most one supported</source>
         <comment>controller</comment>
-        <translation type="unfinished"></translation>
+        <translation>co najwyżej jeden obsługiwany</translation>
     </message>
     <message>
         <source>up to %1 supported</source>
         <comment>controllers</comment>
-        <translation type="unfinished"></translation>
+        <translation>max %1 obsługiwane</translation>
     </message>
     <message>
         <source>&Port Count:</source>
-        <translation type="unfinished"></translation>
+        <translation>&Ilość portów:</translation>
     </message>
     <message>
         <source>Selects the port count of the SATA storage controller currently selected in the Storage Tree. This must be at least one more than the highest port number you need to use.</source>
-        <translation type="unfinished"></translation>
+        <translation>Pozwala wybrać ilość portów SATA określonych w drzewie pamięci. Musi być co najmniej jeden więcej niż najwyższy numer portu, którego potrzebujesz użyć.</translation>
     </message>
     <message>
         <source>Controller: %1</source>
-        <translation type="unfinished"></translation>
+        <translation>Kontroler: %1</translation>
     </message>
     <message>
         <source>No name is currently specified for the controller at position <b>%1</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Brak określonej nazwy dla kontrolera w pozycji <b>%1</b>.</translation>
     </message>
     <message>
         <source>The controller at position <b>%1</b> has the same name as the controller at position <b>%2</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Kontroler w pozycji <b>%1</b> ma taką samą nazwę jak kontroler w pozycji <b>%2</b>.</translation>
     </message>
     <message>
         <source><i>%1</i> is using a disk that is already attached to <i>%2</i>.</source>
-        <translation type="unfinished"></translation>
+        <translation><i>%1</i> używa dysku, który jest załączony do <i>%2</i>.</translation>
     </message>
     <message>
         <source>The machine currently has more storage controllers assigned than a %1 chipset supports. Please change the chipset type on the System settings page or reduce the number of the following storage controllers on the Storage settings page: %2</source>
-        <translation type="unfinished"></translation>
+        <translation>Aktualnie maszyna ma przydzielone więcej kontrolerów pamięci masowej niż chipset %1  obsługuje. Zmień typ chipsetu na stronie ustawień systemowych lub zmniejsz liczbę następujących kontrolerów na stronie ustawień pamięci: %2</translation>
     </message>
     <message>
         <source>Lists all storage controllers for this machine and the virtual images and host drives attached to them.</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyświetla listę wszystkich kontrolerów pamięci dla tej maszyny, wirtualnych obrazów i napędów gospodarza przyłączonych do niej.</translation>
     </message>
     <message>
         <source>Holds the name of the storage controller currently selected in the Storage Tree.</source>
-        <translation type="unfinished"></translation>
+        <translation>Przechowuje nazwę kontrolerów pamięci określonych w drzewie pamięci.</translation>
     </message>
     <message>
         <source>When checked, allows to use host I/O caching capabilities.</source>
-        <translation type="unfinished"></translation>
+        <translation>Po zaznaczeniu tej opcji, pozwala na wykorzystanie możliwości buforowania wejścia/wyjścia gospodarza.</translation>
     </message>
     <message>
         <source>When checked, the virtual disk will not be removed when the guest system ejects it.</source>
-        <translation type="unfinished"></translation>
+        <translation>Po zaznaczeniu tej opcji, wirtualny dysk nie zostanie usunięty, gdy goszczony system wysuwa go.</translation>
     </message>
     <message>
         <source>When checked, the guest system will see the virtual disk as a solid-state device.</source>
-        <translation type="unfinished"></translation>
+        <translation>Po zaznaczeniu tej opcji, goszczony system zobaczy wirtualny dysk jako SSD.</translation>
     </message>
     <message>
         <source>When checked, the guest system will see the virtual disk as a hot-pluggable device.</source>
-        <translation type="unfinished"></translation>
+        <translation>Po zaznaczeniu tej opcji, goszczony system zobaczy wirtualny dysk jako urządzenie "podłączane na gorąco".</translation>
     </message>
     <message>
         <source>&Hot-pluggable</source>
-        <translation type="unfinished"></translation>
+        <translation>&Hot-pluggable</translation>
     </message>
     <message>
         <source>Encrypted with key:</source>
-        <translation type="unfinished"></translation>
+        <translation>Zaszyfrowano kluczem:</translation>
     </message>
     <message>
         <source>Choose disk image...</source>
         <comment>This is used for hard disks, optical media and floppies</comment>
-        <translation type="unfinished"></translation>
+        <translation>Wybierz obraz dysku...</translation>
     </message>
     <message>
         <source>Image</source>
         <comment>storage image</comment>
-        <translation type="unfinished"></translation>
+        <translation>Obraz</translation>
     </message>
     <message>
         <source><nobr>Expands/Collapses&nbsp;item.</nobr></source>
-        <translation type="unfinished"></translation>
+        <translation><nobr>Rozwija/zwija&nbsp;element</nobr></translation>
     </message>
     <message>
         <source><nobr>Adds&nbsp;hard&nbsp;disk.</nobr></source>
-        <translation type="unfinished"></translation>
+        <translation><nobr>Dodaje&nbsp;dysk&nbsp;twardy</nobr></translation>
     </message>
     <message>
         <source><nobr>Adds&nbsp;optical&nbsp;drive.</nobr></source>
-        <translation type="unfinished"></translation>
+        <translation><nobr>Dodaje&nbsp;napęd&nbsp;optyczny</nobr></translation>
     </message>
     <message>
         <source><nobr>Adds&nbsp;floppy&nbsp;drive.</nobr></source>
-        <translation type="unfinished"></translation>
+        <translation><nobr>Dodaje&nbsp;stację&nbsp;dyskietek</nobr></translation>
     </message>
     <message>
         <source>Add USB Controller</source>
-        <translation type="unfinished"></translation>
+        <translation>Dodaj kontroler USB</translation>
     </message>
     <message>
         <source>Add Optical Drive</source>
-        <translation type="unfinished"></translation>
+        <translation>Dodaj napęd optyczny</translation>
     </message>
     <message>
         <source>Add Floppy Drive</source>
-        <translation type="unfinished"></translation>
+        <translation>Dodaj stację dyskietek</translation>
     </message>
     <message>
         <source>Adds new storage controller.</source>
-        <translation type="unfinished"></translation>
+        <translation>Dodaje nowy kontroler pamięci.</translation>
     </message>
     <message>
         <source>Removes selected storage controller.</source>
-        <translation type="unfinished"></translation>
+        <translation>Usuwa wybrany kontroler pamięci.</translation>
     </message>
     <message>
         <source>Adds new storage attachment.</source>
-        <translation type="unfinished"></translation>
+        <translation>Podłącza nową pamięć.</translation>
     </message>
     <message>
         <source>Removes selected storage attachment.</source>
-        <translation type="unfinished"></translation>
+        <translation>Odłącza wybraną pamięć.</translation>
     </message>
     <message>
         <source>Optical &Drive:</source>
-        <translation type="unfinished"></translation>
+        <translation>Napęd &optyczny:</translation>
     </message>
     <message>
         <source>Choose a virtual optical disk or a physical drive to use with the virtual drive. The virtual machine will see a disk inserted into the drive with the data in the file or on the disk in the physical drive as its contents.</source>
-        <translation type="unfinished"></translation>
+        <translation>Pozwala wybrać wirtualny dysk lub fizyczny napęd do użycia z wirtualnym. Wirtualna maszyna zobaczy dysk włożony do napędu z danymi w pliku lub dysk w fizycznym napędzie jako zawartość.</translation>
     </message>
     <message>
         <source>Create New Hard Disk...</source>
-        <translation type="unfinished"></translation>
+        <translation>Stwórz nowy twardy dysk...</translation>
     </message>
     <message>
         <source>Choose Virtual Hard Disk File...</source>
-        <translation type="unfinished"></translation>
+        <translation>Wybierz plik wirtualnego dysku twardego...</translation>
     </message>
     <message>
         <source>Choose Virtual Optical Disk File...</source>
-        <translation type="unfinished"></translation>
+        <translation>Wybierz plik wirtualnego dysku optycznego...</translation>
     </message>
     <message>
         <source>Remove Disk from Virtual Drive</source>
-        <translation type="unfinished"></translation>
+        <translation>Usuń dysk z wirtualnego napędu</translation>
     </message>
     <message>
         <source>Choose Virtual Floppy Disk File...</source>
-        <translation type="unfinished"></translation>
+        <translation>Wybierz plik wirtualnej dyskietki</translation>
     </message>
     <message>
         <source>Add NVMe Controller</source>
-        <translation type="unfinished"></translation>
+        <translation>Dodaj kontroler NVMe</translation>
     </message>
 </context>
 <context>
@@ -7242,11 +7283,11 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>for performance reasons, the number of virtual CPUs attached to the virtual machine may not be more than twice the number of physical CPUs on the host (<b>%1</b>). Please reduce the number of virtual CPUs.</source>
-        <translation type="obsolete">z powodów wydajności ilość wirtualnych CPU dołączonych do tej maszyny wirtualnej nie może być większa niż dwukrotna ilość fizycznych CPU komputera gospodarza (<b>%1</b>). Proszę zmniejszyć ilość wirtualnych CPU.</translation>
+        <translation type="obsolete">z powodów wydajności ilość wirtualnych procesorów dołączonych do tej maszyny wirtualnej nie może być większa niż dwukrotna ilość fizycznych CPU komputera gospodarza (<b>%1</b>). Proszę zmniejszyć ilość wirtualnych procesorów.</translation>
     </message>
     <message>
         <source>you have assigned more virtual CPUs to the virtual machine than the number of physical CPUs on your host system (<b>%1</b>). This is likely to degrade the performance of your virtual machine. Please consider reducing the number of virtual CPUs.</source>
-        <translation type="obsolete">maszynie wirtualnej przydzielono więcej wirtualnych CPU niż wynosi ilość fizycznych CPU komputera gospodarza (<b>%1</b>). To najpewniej obniży wydajność tej maszyny wirtualnej. Należy rozważyć zmniejszenie ilości wirtualnych CPU.</translation>
+        <translation type="obsolete">maszynie wirtualnej przydzielono więcej wirtualnych procesorów niż wynosi ilość fizycznych CPU komputera gospodarza (<b>%1</b>). To najpewniej obniży wydajność tej maszyny wirtualnej. Należy rozważyć zmniejszenie ilości wirtualnych procesorów.</translation>
     </message>
     <message>
         <source>you have assigned more than one virtual CPU to this VM. This will not work unless the IO-APIC feature is also enabled. This will be done automatically when you accept the VM Settings by pressing the OK button.</source>
@@ -7283,11 +7324,11 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>&Boot Order:</source>
-        <translation>&Kolejność startowania:</translation>
+        <translation>&Kolejność bootowania:</translation>
     </message>
     <message>
         <source>Defines the boot device order. Use the checkboxes on the left to enable or disable individual boot devices. Move items up and down to change the device order.</source>
-        <translation>Definiuje porządek urządzeń startowych. Używając przełączników po lewej stronie można odblokować lub zablokować wybrane urządzenia, natomiast przesuwając pozycje w górę i w dół można zmieniać kolejność urządzeń.</translation>
+        <translation>Definiuje kolejność bootowania urządzeń. Używając przełączników po lewej stronie można odblokować lub zablokować wybrane urządzenia, natomiast przesuwając pozycje w górę i w dół można zmieniać kolejność urządzeń.</translation>
     </message>
     <message>
         <source>Move Down (Ctrl-Down)</source>
@@ -7331,7 +7372,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Controls the number of virtual CPUs in the virtual machine.</source>
-        <translation type="obsolete">Kontroluje ilość wirtualnych CPU dla maszyny wirtualnej.</translation>
+        <translation type="obsolete">Kontroluje ilość wirtualnych procesorów dla maszyny wirtualnej.</translation>
     </message>
     <message>
         <source>When checked, the Physical Address Extension (PAE) feature of the host CPU will be exposed to the virtual machine.</source>
@@ -7388,7 +7429,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Controls the number of virtual CPUs in the virtual machine. You need hardware virtualization support on your host system to use more than one virtual CPU.</source>
-        <translation>Kontroluje ilość wirtualnych CPU dla maszyny wirtualnej. Wymagane jest sprzętowe wsparcie wirtualizacji w systemie gospodarza, aby móc używać więcej niż jednego wirtualnego CPU.</translation>
+        <translation>Kontroluje ilość wirtualnych procesorów dla maszyny wirtualnej. Wymagane jest sprzętowe wsparcie wirtualizacji w systemie gospodarza, aby móc używać więcej niż jednego wirtualnego procesora.</translation>
     </message>
     <message>
         <source>If checked, an absolute pointing device (a USB tablet) will be supported. Otherwise, only a standard PS/2 mouse will be emulated.</source>
@@ -7400,19 +7441,19 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>&Chipset:</source>
-        <translation type="unfinished"></translation>
+        <translation>&Chipset:</translation>
     </message>
     <message>
         <source>Selects the chipset to be emulated in this virtual machine. Note that the ICH9 chipset emulation is experimental and not recommended except for guest systems (such as Mac OS X) which require it.</source>
-        <translation type="unfinished"></translation>
+        <translation>Wybiera chipset, by emulować go w tej wirtualnej maszynie. Zauważ, że emulacja chipsetu ICH9 jest eksperymentalna i nie jest zalecana z wyjątkiem goszczonych systemów (takich jak Mac OS X), które tego wymagają.</translation>
     </message>
     <message>
         <source>&Execution Cap:</source>
-        <translation type="unfinished"></translation>
+        <translation>&Wykorzystanie procesora:</translation>
     </message>
     <message>
         <source>Limits the amount of time that each virtual CPU is allowed to run for. Each virtual CPU will be allowed to use up to this percentage of the processing time available on one physical CPU. The execution cap can be disabled by setting it to 100%. Setting the cap too low can make the machine feel slow to respond.</source>
-        <translation type="unfinished"></translation>
+        <translation>Ogranicza to ilość czasu, w którym każdy wirtualny procesor może pracować. Każdy wirtualny procesor będzie mógł używać procent czasu przetwarzania dostępnego na jednym procesorze fizycznym. Wykorzystanie procesora może zostać wyłączone poprzez ustawienie go na 100%. Ustawienie wykorzystania na zbyt nisko, moze sprawić, że maszyna będzie wolno reagowała.</translation>
     </message>
     <message>
         <source>you have enabled a USB HID (Human Interface Device). This will not work unless USB emulation is also enabled. This will be done automatically when you accept the VM Settings by pressing the OK button.</source>
@@ -7420,81 +7461,81 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>&Pointing Device:</source>
-        <translation type="unfinished"></translation>
+        <translation>&Urządzenie wskazujące:</translation>
     </message>
     <message>
         <source>Determines whether the emulated pointing device is a standard PS/2 mouse, a USB tablet or a USB multi-touch tablet.</source>
-        <translation type="unfinished"></translation>
+        <translation>Określa, czy emulowane urządzenie wskazujące jest standardową myszą PS/2, tabletem USB czy wielodotykowym tabletem USB.</translation>
     </message>
     <message>
         <source>More than <b>%1%</b> of the host computer's memory (<b>%2</b>) is assigned to the virtual machine. Not enough memory is left for the host operating system. Please select a smaller amount.</source>
-        <translation type="unfinished"></translation>
+        <translation>Więcej niż <b>%1%</b> pamięci komputera gospodarza (<b>%2</b>) jest przydzielonej do wirtualnej maszyny. Została niewystarczająca ilość pamięci dla systemu operacyjnego gospodarza. Wybierz mniejszą ilość.</translation>
     </message>
     <message>
         <source>More than <b>%1%</b> of the host computer's memory (<b>%2</b>) is assigned to the virtual machine. There might not be enough memory left for the host operating system. Please consider selecting a smaller amount.</source>
-        <translation type="unfinished"></translation>
+        <translation>Więcej niż <b>%1%</b> pamięci komputera gospodarza (<b>%2</b>) jest przydzielonej do wirtualnej maszyny. Może być niewystarczająca ilość pamięci dla systemu operacyjnego gospodarza. Rozważ wybranie mniejszej ilości.</translation>
     </message>
     <message>
         <source>For performance reasons, the number of virtual CPUs attached to the virtual machine may not be more than twice the number of physical CPUs on the host (<b>%1</b>). Please reduce the number of virtual CPUs.</source>
-        <translation type="unfinished"></translation>
+        <translation>Ze względu na wydajność, liczba procesorów wirtualnych podłączonych do maszyny wirtualnej nie może być większa niż dwukrotność liczby procesorów fizycznych na systemie gospodarza (<b>% 1 </ b>). Należy zmniejszyć liczbę wirtualnych procesorów.</translation>
     </message>
     <message>
         <source>More virtual CPUs are assigned to the virtual machine than the number of physical CPUs on the host system (<b>%1</b>). This is likely to degrade the performance of your virtual machine. Please consider reducing the number of virtual CPUs.</source>
-        <translation type="unfinished"></translation>
+        <translation>Więcej wirtualnych procesorów jest przydzielonych do maszyny wirtualnej niż liczba procesorów fizycznych w systemie gospodarza (<b>% 1 </ b>). To prawdopodobnie obniży wydajność maszyny wirtualnej. Proszę rozważyć zmniejszenie liczby wirtualnych procesorów.</translation>
     </message>
     <message>
         <source>The processor execution cap is set to a low value. This may make the machine feel slow to respond.</source>
-        <translation type="unfinished"></translation>
+        <translation>Wykorzystanie procesora jest ustawione na niskie wartości. Może to sprawić, że maszyna zacznie wolniej reagować.</translation>
     </message>
     <message>
         <source>When checked, the RTC device will report the time in UTC, otherwise in local (host) time. Unix usually expects the hardware clock to be set to UTC.</source>
-        <translation type="unfinished"></translation>
+        <translation>Po zaznaczeniu tej opcji, urządzenie RTC zgłosi czas w strefie UTC, w przeciwnym wypadku w lokalnym czasie (gospodarza). Unix zazwyczaj oczekuje, że zegar sprzętowy powinien być ustawiony na UTC.</translation>
     </message>
     <message>
         <source>%</source>
-        <translation type="unfinished"></translation>
+        <translation>%</translation>
     </message>
     <message>
         <source>&Paravirtualization Interface:</source>
-        <translation type="unfinished"></translation>
+        <translation>&Interfejs parawirtualizacji:</translation>
     </message>
     <message>
         <source>Selects the paravirtualization guest interface provider to be used by this virtual machine.</source>
-        <translation type="unfinished"></translation>
+        <translation>Pozwala wybrać dostawcę interfejsu parawirtualizacji gościa do użycia przez wirtualną maszynę.</translation>
     </message>
     <message>
         <source>The I/O APIC feature is not currently enabled in the Motherboard section of the System page. This is needed in order to support a chip set of type ICH9 you have enabled for this VM. It will be done automatically if you confirm your changes.</source>
-        <translation type="unfinished"></translation>
+        <translation>Tryb wejścia/wyjścia APIC nie jest obecnie włączony w sekcji płyty głównej strony system. Jest to konieczne w celu wspierania chipsetów typu ICH9, które włączyłeś dla tej maszyny. To będzie odbywać się automatycznie, jeśli potwierdzisz zmiany.</translation>
     </message>
     <message>
         <source>USB controller emulation is not currently enabled on the USB page. This is needed to support an emulated USB input device you have enabled for this VM. It will be done automatically if you confirm your changes.</source>
-        <translation type="unfinished"></translation>
+        <translation>Emulacja knotrola USB jest aktualnie wyłączona na stronie USB. To jest konieczne, by wspierać urządzenie wejściowe USB, które włączyłeś dla tej maszyny. To będzie odbywać się automatycznie, jeśli potwierdzisz zmiany.</translation>
     </message>
     <message>
         <source>The I/O APIC feature is not currently enabled in the Motherboard section of the System page. This is needed in order to support more than one virtual processor you have chosen for this VM. It will be done automatically if you confirm your changes.</source>
-        <translation type="unfinished"></translation>
+        <translation>Tryb wejścia/wyjścia APIC nie jest obecnie włączony w sekcji płyty głównej strony system. Jest to konieczne w celu wspierania więcej niż jednego procesora wirtualnego, którego wybrałeś dla tej maszyny. To będzie odbywać się automatycznie, jeśli potwierdzisz zmiany.</translation>
     </message>
     <message>
         <source>Hardware virtualization is not currently enabled in the Acceleration section of the System page. This is needed in order to support more than one virtual processor you have chosen for this VM. It will be done automatically if you confirm your changes.</source>
-        <translation type="unfinished"></translation>
+        <translation>Wirtualizacja sprzętowa nie jest obecnie włączoną w sekcji akceleracji strony system. Jest to konieczne w celu wspierania więcej niż jednego procesora wirtualnego, którego wybrałeś dla tej maszyny. To będzie odbywać się automatycznie, jeśli potwierdzisz zmiany.</translation>
     </message>
     <message>
         <source>%1 MB</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 MB</translation>
     </message>
     <message>
         <source>%1 CPU</source>
         <comment>%1 is 1 for now</comment>
-        <translation type="unfinished"></translation>
+        <translation>%1 CPU</translation>
     </message>
     <message>
         <source>%1 CPUs</source>
         <comment>%1 is host cpu count * 2 for now</comment>
-        <translation type="unfinished"></translation>
+        <translation>%1 CPUs</translation>
     </message>
     <message>
         <source>%1%</source>
-        <translation type="unfinished">%1%</translation>
+        <translation>%1%</translation>
     </message>
 </context>
 <context>
@@ -7574,7 +7615,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Lists all USB filters of this machine. The checkbox to the left defines whether the particular filter is enabled or not. Use the context menu or buttons to the right to add or remove USB filters.</source>
-        <translation>Zawiera listę wszystkich filtrów USB zdefiniowanych dla tej maszyny. Przełącznik po lewej stronie każdego z filtrów włącza lub wyłącza filtr. W celu dodania lub usunięcia filtru należy użyć menu kontekstowego lub przycisków po prawej.</translation>
+        <translation>Przechowuje listę wszystkich filtrów USB zdefiniowanych dla tej maszyny. Przełącznik po lewej stronie każdego z filtrów włącza lub wyłącza filtr. W celu dodania lub usunięcia filtru należy użyć menu kontekstowego lub przycisków po prawej.</translation>
     </message>
     <message>
         <source>[filter]</source>
@@ -7583,118 +7624,118 @@ p, li { white-space: pre-wrap; }
     <message>
         <source><nobr>Vendor ID: %1</nobr></source>
         <comment>USB filter tooltip</comment>
-        <translation type="unfinished"><nobr>ID dostawcy (Vendor ID): %1</nobr></translation>
+        <translation><nobr>ID dostawcy: %1</nobr></translation>
     </message>
     <message>
         <source><nobr>Product ID: %2</nobr></source>
         <comment>USB filter tooltip</comment>
-        <translation type="unfinished"><nobr>ID produktu (Product ID): %2</nobr></translation>
+        <translation><nobr>ID produktu: %2</nobr></translation>
     </message>
     <message>
         <source><nobr>Revision: %3</nobr></source>
         <comment>USB filter tooltip</comment>
-        <translation type="unfinished"><nobr>Wersja (Revision): %3</nobr></translation>
+        <translation><nobr>Wersja: %3</nobr></translation>
     </message>
     <message>
         <source><nobr>Product: %4</nobr></source>
         <comment>USB filter tooltip</comment>
-        <translation type="unfinished"><nobr>Produkt: %4</nobr></translation>
+        <translation><nobr>Produkt: %4</nobr></translation>
     </message>
     <message>
         <source><nobr>Manufacturer: %5</nobr></source>
         <comment>USB filter tooltip</comment>
-        <translation type="unfinished"><nobr>Wytwórca: %5</nobr></translation>
+        <translation><nobr>Producent: %5</nobr></translation>
     </message>
     <message>
         <source><nobr>Serial No.: %1</nobr></source>
         <comment>USB filter tooltip</comment>
-        <translation type="unfinished"><nobr>Nr seryjny: %1</nobr></translation>
+        <translation><nobr>Nr seryjny: %1</nobr></translation>
     </message>
     <message>
         <source><nobr>Port: %1</nobr></source>
         <comment>USB filter tooltip</comment>
-        <translation type="unfinished"><nobr>Port: %1</nobr></translation>
+        <translation><nobr>Port: %1</nobr></translation>
     </message>
     <message>
         <source><nobr>State: %1</nobr></source>
         <comment>USB filter tooltip</comment>
-        <translation type="unfinished"><nobr>Stan: %1</nobr></translation>
+        <translation><nobr>Stan: %1</nobr></translation>
     </message>
     <message>
         <source>When chosen, enables the virtual USB OHCI controller of this machine. The USB OHCI controller provides USB 1.0 support.</source>
-        <translation type="unfinished"></translation>
+        <translation>Po wybraniu tej opcji, wirtualny kontroler USB OHCI tej maszyny będzie włączony. Kontroler USB OHCI oferuje wsparcie USB 1.0.</translation>
     </message>
     <message>
         <source>USB &1.1 (OHCI) Controller</source>
-        <translation type="unfinished"></translation>
+        <translation>Kontroler USB &1.1 (OHCI)</translation>
     </message>
     <message>
         <source>When chosen, enables the virtual USB EHCI controller of this machine. The USB EHCI controller provides USB 2.0 support.</source>
-        <translation type="unfinished"></translation>
+        <translation>Po wybraniu tej opcji, wirtualny kontroler USB EHCI tej maszyny będzie włączony. Kontroler USB EHCI oferuje wsparcie USB 2.0.</translation>
     </message>
     <message>
         <source>USB &2.0 (EHCI) Controller</source>
-        <translation type="unfinished"></translation>
+        <translation>Kontroler USB &2.0 (EHCI)</translation>
     </message>
     <message>
         <source>When chosen, enables the virtual USB xHCI controller of this machine. The USB xHCI controller provides USB 3.0 support.</source>
-        <translation type="unfinished"></translation>
+        <translation>Po wybraniu tej opcji, wirtualny kontroler USB xHCI tej maszyny będzie włączony. Kontroler USB xHCI oferuje wsparcie USB 3.0.</translation>
     </message>
     <message>
         <source>USB &3.0 (xHCI) Controller</source>
-        <translation type="unfinished"></translation>
+        <translation>Kontroler USB &3.0 (xHCI)</translation>
     </message>
     <message>
         <source>USB 2.0/3.0 is currently enabled for this virtual machine. However, this requires the <i>%1</i> to be installed. Please install the Extension Pack from the VirtualBox download site or disable USB 2.0/3.0 to be able to start the machine.</source>
-        <translation type="unfinished"></translation>
+        <translation>USB 2.0/3.0 jest włączone dla tej maszyny wirtualnej. Jednakże wymaga zainstalowania <i>%1</i>. Zainstaluj pakiet rozszerzeń ze strony pobierania VirtualBox lub wyłącz USB 2.0/3.0, by maszyna mogła wystartować.</translation>
     </message>
     <message>
         <source>Add Empty Filter</source>
-        <translation type="unfinished">Dodaj pusty filtr</translation>
+        <translation>Dodaj pusty filtr</translation>
     </message>
     <message>
         <source>Add Filter From Device</source>
-        <translation type="unfinished">Dodaj filtr na podstawie urządzenia</translation>
+        <translation>Dodaj filtr z urządzenia</translation>
     </message>
     <message>
         <source>Edit Filter</source>
-        <translation type="unfinished"></translation>
+        <translation>Edytuj filtr</translation>
     </message>
     <message>
         <source>Remove Filter</source>
-        <translation type="unfinished">Usuń filtr</translation>
+        <translation>Usuń filtr</translation>
     </message>
     <message>
         <source>Move Filter Up</source>
-        <translation type="unfinished">Przenieś filtr w górę</translation>
+        <translation>Przesuń filtr w górę</translation>
     </message>
     <message>
         <source>Move Filter Down</source>
-        <translation type="unfinished">Przenieś filtr w dół</translation>
+        <translation>Przesuń filtr w dół</translation>
     </message>
     <message>
         <source>Adds new USB filter with all fields initially set to empty strings. Note that such a filter will match any attached USB device.</source>
-        <translation type="unfinished"></translation>
+        <translation>Dodaje nowy filtr USB ze wszystkimi polami wstępnie ustawionymi jako puste. Uwaga: taki filtr zadziała dla każdego podłączonego urządzenia USB.</translation>
     </message>
     <message>
         <source>Adds new USB filter with all fields set to the values of the selected USB device attached to the host PC.</source>
-        <translation type="unfinished"></translation>
+        <translation>Dodaje nowy filtr USB ze wszystkimi polami wypełnionymi wartościami odpowiadającymi urządzeniu USB podłączonemu do tego komputera.</translation>
     </message>
     <message>
         <source>Edits selected USB filter.</source>
-        <translation type="unfinished"></translation>
+        <translation>Edytuje wybrany filtr USB.</translation>
     </message>
     <message>
         <source>Removes selected USB filter.</source>
-        <translation type="unfinished"></translation>
+        <translation>Usuwa wybrany filtr USB.</translation>
     </message>
     <message>
         <source>Moves selected USB filter up.</source>
-        <translation type="unfinished"></translation>
+        <translation>Przesuwa wybrany filtr USB w górę.</translation>
     </message>
     <message>
         <source>Moves selected USB filter down.</source>
-        <translation type="unfinished"></translation>
+        <translation>Przesuwa wybrany filtr USB w dół.</translation>
     </message>
 </context>
 <context>
@@ -7720,7 +7761,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Holds the filter name.</source>
-        <translation>Zawiera nazwę filtru.</translation>
+        <translation>Przechowuje nazwę filtru.</translation>
     </message>
     <message>
         <source>&Vendor ID:</source>
@@ -7792,7 +7833,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Defines an action performed by the host computer when a matching device is attached: give it up to the host OS (<i>Ignore</i>) or grab it for later usage by virtual machines (<i>Hold</i>).</source>
-        <translation type="obsolete">Decyduje o tym co zostanie zrobione, jeśli podłączone zostanie urządzenie USB pasujące do filtra: pozostawienie jego obsługi systemowi operacyjnemu gospodarza (<i>Ignoruj</i>), czy przechwycenie go do użytku przez maszyny wirtualne użytkownika (<i>Przytrzymaj</i>).</translation>
+        <translation type="obsolete">Decyduje o tym co zostanie zrobione, jeśli podłączone zostanie urządzenie USB pasujące do filtra: pozostawienie jego obsługi systemowi operacyjnemu gospodarza (<i>Ignoruj</i>), czy przechwycenie go do użytku przez maszyny wirtualne użytkownika (<i>PrzyPrzechowujej</i>).</translation>
     </message>
     <message>
         <source>USB Filter Details</source>
@@ -7800,42 +7841,42 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Holds the vendor ID filter. The <i>exact match</i> string format is <tt>XXXX</tt> where <tt>X</tt> is a hexadecimal digit. An empty string will match any value.</source>
-        <translation type="unfinished"></translation>
+        <translation>Przechowuje filtr ID dostawcy. <i>Dokładny</i> format ciągu jest<tt>XXXX</tt>, gdzie <tt>X</tt> jest cyfrą szesznastkową. Pusty ciąg nie będzie pasował do żadnej wartości.</translation>
     </message>
     <message>
         <source>Holds the product ID filter. The <i>exact match</i> string format is <tt>XXXX</tt> where <tt>X</tt> is a hexadecimal digit. An empty string will match any value.</source>
-        <translation type="unfinished"></translation>
+        <translation>Przechowuje filtr ID produktu. <i>Dokładny</i> format ciągu jest<tt>XXXX</tt>, gdzie <tt>X</tt> jest cyfrą szesznastkową. Pusty ciąg nie będzie pasował do żadnej wartości.</translation>
     </message>
     <message>
         <source>Holds the revision number filter. The <i>exact match</i> string format is <tt>IIFF</tt> where <tt>I</tt> is a decimal digit of the integer part and <tt>F</tt> is a decimal digit of the fractional part. An empty string will match any value.</source>
-        <translation type="unfinished"></translation>
+        <translation>Przechowuje filtr numeru wersji. <i>Dokładny</i> format ciągu jest<tt>IIFF</tt>, gdzie <tt>I</tt> jest cyfrą dziesiętną części całkowitej i <tt>F</tt> jest dziesiętną częścią części ułamkowej. Pusty ciąg nie będzie pasował do żadnej wartości.</translation>
     </message>
     <message>
         <source>Holds the manufacturer filter as an <i>exact match</i> string. An empty string will match any value.</source>
-        <translation type="unfinished"></translation>
+        <translation>Przechowuje filtr producenta jako <i>dokładny</i> format ciągu. Pusty ciąg nie będzie pasował do żadnej wartości.</translation>
     </message>
     <message>
         <source>Holds the product name filter as an <i>exact match</i> string. An empty string will match any value.</source>
-        <translation type="unfinished"></translation>
+        <translation>Przechowuje filtr nazwy produktu jako <i>dokładny</i> format ciągu. Pusty ciąg nie będzie pasował do żadnej wartości.</translation>
     </message>
     <message>
         <source>Holds the serial number filter as an <i>exact match</i> string. An empty string will match any value.</source>
-        <translation type="unfinished"></translation>
+        <translation>Przechowuje filtr numeru seryjnego jako <i>dokładny</i> format ciągu. Pusty ciąg nie będzie pasował do żadnej wartości.</translation>
     </message>
     <message>
         <source>Holds the host USB port filter as an <i>exact match</i> string. An empty string will match any value.</source>
-        <translation type="unfinished"></translation>
+        <translation>Przechowuje filtr portu USB gospodarza jako <i>dokładny</i> format ciągu. Pusty ciąg nie będzie pasował do żadnej wartości.</translation>
     </message>
     <message>
         <source>Holds whether this filter applies to USB devices attached locally to the host computer (<i>No</i>), to a VRDP client's computer (<i>Yes</i>), or both (<i>Any</i>).</source>
-        <translation type="unfinished"></translation>
+        <translation>Stwierdza, czy filtr ten dotyczy urządzeń USB podłączonych lokalnie do komputera (<i> Nie </ i>), do komputera klienckiego VRDP (<i> Tak </ i>) lub obu (<i> Każdy </ i>).</translation>
     </message>
 </context>
 <context>
     <name>UIMachineWindow</name>
     <message>
         <source> EXPERIMENTAL build %1r%2 - %3</source>
-        <translation type="unfinished"> EXPERIMENTAL build %1r%2 - %3</translation>
+        <translation>Build eksperymentalny %1r%2 - %3</translation>
     </message>
 </context>
 <context>
@@ -7849,11 +7890,11 @@ p, li { white-space: pre-wrap; }
     <name>UIMediumManager</name>
     <message>
         <source>&Optical disks</source>
-        <translation type="unfinished"></translation>
+        <translation>&Napędy optyczne</translation>
     </message>
     <message>
         <source>&Floppy disks</source>
-        <translation type="unfinished"></translation>
+        <translation>&Dyskietki</translation>
     </message>
     <message>
         <source>&Select</source>
@@ -7861,73 +7902,73 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Removing medium...</source>
-        <translation type="unfinished"></translation>
+        <translation>Usuwanie nośników...</translation>
     </message>
     <message>
         <source>&Hard disks</source>
-        <translation type="unfinished"></translation>
+        <translation>&Dyski twarde</translation>
     </message>
 </context>
 <context>
     <name>UIMediumTypeChangeDialog</name>
     <message>
         <source>Modify medium attributes</source>
-        <translation type="unfinished"></translation>
+        <translation>Modyfikuj parametry nośnika</translation>
     </message>
     <message>
         <source><p>You are about to change the settings of the disk image file <b>%1</b>.</p><p>Please choose one of the following modes and press <b>%2</b> to proceed or <b>%3</b> otherwise.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Zamierzasz zmienić ustawienia pliku z obrazem dysku <b>%1</b>.</p><p>Wybierz jeden z następujących trybów i wciśnij <b>%2</b> by kontynuować lub <b>%3</b> w przeciwnym razie.</p></translation>
     </message>
     <message>
         <source>Choose mode:</source>
-        <translation type="unfinished"></translation>
+        <translation>Wybierz tryb:</translation>
     </message>
     <message>
         <source>This type of medium is attached directly or indirectly, preserved when taking snapshots.</source>
-        <translation type="unfinished"></translation>
+        <translation>Ten typ nośnika jest podłączony bezpośrednio lub pośrednio, używany podczas robienia migawek.</translation>
     </message>
     <message>
         <source>This type of medium is attached indirectly, changes are wiped out the next time the virtual machine is started.</source>
-        <translation type="unfinished"></translation>
+        <translation>Ten typ nośnika jest podłączony pośrednio, zmiany są kasowane kiedy wirtualna maszyna startuje kolejnym razem.</translation>
     </message>
     <message>
         <source>This type of medium is attached directly, ignored when taking snapshots.</source>
-        <translation type="unfinished"></translation>
+        <translation>Ten typ nośnika jest podłączony bezpośrednio, ignorowany podczas robienia migawek.</translation>
     </message>
     <message>
         <source>This type of medium is attached directly, allowed to be used concurrently by several machines.</source>
-        <translation type="unfinished"></translation>
+        <translation>Ten typ nośnika jest podłączony bezpośrednio, może być używany równocześnie przez kilka maszyn.</translation>
     </message>
     <message>
         <source>This type of medium is attached directly, and can be used by several machines.</source>
-        <translation type="unfinished"></translation>
+        <translation>Ten typ nośnika jest podłączony bezpośrednio i może być używany przez kilka maszyn.</translation>
     </message>
     <message>
         <source>This type of medium is attached indirectly, so that one base medium can be used for several VMs which have their own differencing medium to store their modifications.</source>
-        <translation type="unfinished"></translation>
+        <translation>Ten typ nośnika jest podłączony pośrednio, więc jeden nośnik może być używany przez kilka maszyn, które posiadają swoje własne zróżnicowane nośniki, by przechowywać swoje modyfikacje.</translation>
     </message>
 </context>
 <context>
     <name>UIMenuBarEditorWidget</name>
     <message>
         <source>Virtual Screen Resize</source>
-        <translation type="unfinished"></translation>
+        <translation>Skalowanie wirtualnego ekranu</translation>
     </message>
     <message>
         <source>Virtual Screen Mapping</source>
-        <translation type="unfinished"></translation>
+        <translation>Mapowanie wirtualnego ekranu</translation>
     </message>
     <message>
         <source>Switch</source>
-        <translation type="unfinished">Przełącz</translation>
+        <translation>Przełącz</translation>
     </message>
     <message>
         <source>Close</source>
-        <translation type="unfinished">Zamknij</translation>
+        <translation>Zamknij</translation>
     </message>
     <message>
         <source>Enable Menu Bar</source>
-        <translation type="unfinished"></translation>
+        <translation>Włącz pasek menu</translation>
     </message>
 </context>
 <context>
@@ -7964,11 +8005,11 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Failed to open <tt>%1</tt>. Make sure your desktop environment can properly handle URLs of this type.</source>
-        <translation>Nie udało się otworzyć <tt>%1</tt>. Proszę upewnić się, że używane środowisko graficzne potrafi obsługiwać odnośniki URL tego typu.</translation>
+        <translation>Nie powiodło się otworzenie <tt>%1</tt>. Proszę upewnić się, że używane środowisko graficzne potrafi obsługiwać odnośniki URL tego typu.</translation>
     </message>
     <message>
         <source><p>Failed to initialize COM or to find the VirtualBox COM server. Most likely, the VirtualBox server is not running or failed to start.</p><p>The application will now terminate.</p></source>
-        <translation><p>Nie udało się zainicjalizować bibliotek COM lub odnaleźć serwera COM VirtualBox. Najprawdopodobniej serwer VirtualBox nie jest włączony lub nie udało się go uruchomić.</p><p>Aplikacja zostanie zamknięta.</p></translation>
+        <translation><p>Nie powiodła się inicjalizacja bibliotek COM lub odnaleźć serwera COM VirtualBox. Najprawdopodobniej serwer VirtualBox nie jest włączony lub nie udało się go uruchomić.</p><p>Aplikacja zostanie zamknięta.</p></translation>
     </message>
     <message>
         <source><p>Failed to create the VirtualBox COM object.</p><p>The application will now terminate.</p></source>
@@ -8016,7 +8057,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Failed to pause the execution of the virtual machine <b>%1</b>.</source>
-        <translation>Nie udało się wstrzymać pracy maszyny wirtualnej <b>%1</b>.</translation>
+        <translation>Nie udało się wsPrzechowujeć pracy maszyny wirtualnej <b>%1</b>.</translation>
     </message>
     <message>
         <source>Failed to resume the execution of the virtual machine <b>%1</b>.</source>
@@ -8156,11 +8197,11 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Failed to create the shared folder <b>%1</b> (pointing to <nobr><b>%2</b></nobr>) for the virtual machine <b>%3</b>.</source>
-        <translation>Nie udało się utworzyć współdzielonego katalogu <b>%1</b> (wskazującego na <nobr><b>%2</b></nobr>) dla maszyny wirtualnej <b>%3</b>.</translation>
+        <translation>Nie udało się utworzyć współdzielonego folderu <b>%1</b> (wskazującego na <nobr><b>%2</b></nobr>) dla maszyny wirtualnej <b>%3</b>.</translation>
     </message>
     <message>
         <source>Failed to remove the shared folder <b>%1</b> (pointing to <nobr><b>%2</b></nobr>) from the virtual machine <b>%3</b>.</source>
-        <translation type="obsolete">Nie udało się usunąć współdzielonego katalogu <b>%1</b> (wskazującego na <nobr><b>%2</b></nobr>) z maszyny wirtualnej <b>%3</b>.</translation>
+        <translation type="obsolete">Nie udało się usunąć współdzielonego folderu <b>%1</b> (wskazującego na <nobr><b>%2</b></nobr>) z maszyny wirtualnej <b>%3</b>.</translation>
     </message>
     <message>
         <source><p>The Virtual Machine reports that the guest OS does not support <b>mouse pointer integration</b> in the current video mode. You need to capture the mouse (by clicking over the VM display or pressing the host key) in order to use the mouse inside the guest OS.</p></source>
@@ -8168,7 +8209,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source><p>The Virtual Machine is currently in the <b>Paused</b> state and not able to see any keyboard or mouse input. If you want to continue to work inside the VM, you need to resume it by selecting the corresponding action from the menu bar.</p></source>
-        <translation><p>Maszyna Wirtualna jest aktualnie w stanie <b>Wstrzymania</b> i tym samym nie obsłuży żadnych danych wejściowych pochodzących od klawiatury lub myszy. Aby kontynuować pracę w maszynie wirtualnej, należy ją najpierw wznowić poprzez wybranie odpowiedniej opcji z menu <i>Maszyna</i> w oknie maszyny.</p></translation>
+        <translation><p>Maszyna Wirtualna jest aktualnie w stanie <b>WsPrzechowujenia</b> i tym samym nie obsłuży żadnych danych wejściowych pochodzących od klawiatury lub myszy. Aby kontynuować pracę w maszynie wirtualnej, należy ją najpierw wznowić poprzez wybranie odpowiedniej opcji z menu <i>Maszyna</i> w oknie maszyny.</p></translation>
     </message>
     <message>
         <source><p>One or more of the registered virtual hard disks, CD/DVD or floppy disk image files are not currently accessible. As a result, you will not be able to operate virtual machines that use these files until they become accessible later.</p><p>Press <b>OK</b> to open the Virtual Disk Manager window and see which files are inaccessible, or press <b>Ignore</b> to ignore this message.</p></source>
@@ -8233,7 +8274,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source><p>Could not find a language file for the language <b>%1</b> in the directory <b><nobr>%2</nobr></b>.</p><p>The language will be temporarily reset to the system default language. Please go to the <b>Preferences</b> window which you can open from the <b>File</b> menu of the main VirtualBox window, and select one of the existing languages on the <b>Language</b> page.</p></source>
-        <translation type="obsolete"><p>Nie udało się odnaleźć pliku językowego dla języka <b>%1</b> w katalogu <b><nobr>%2</nobr></b>.</p><p>Język programu zostanie tymczasowo przełączony na  ustawiony jako domyślny dla systemu. Aby zmienić język programu na inny, należy otworzyć okno <b>Ustawienia globalne</b> z menu <b>Plik</b> w oknie głównym programu VirtualBox i wybrać jeden z języków dostępnych na karcie [...]
+        <translation type="obsolete"><p>Nie udało się odnaleźć pliku językowego dla języka <b>%1</b> w folderu <b><nobr>%2</nobr></b>.</p><p>Język programu zostanie tymczasowo przełączony na  ustawiony jako domyślny dla systemu. Aby zmienić język programu na inny, należy otworzyć okno <b>Ustawienia globalne</b> z menu <b>Plik</b> w oknie głównym programu VirtualBox i wybrać jeden z języków dostępnych na karcie  [...]
     </message>
     <message>
         <source><p>Could not load the language file <b><nobr>%1</nobr></b>. <p>The language will be temporarily reset to English (built-in). Please go to the <b>Preferences</b> window which you can open from the <b>File</b> menu of the main VirtualBox window, and select one of the existing languages on the <b>Language</b> page.</p></source>
@@ -8266,7 +8307,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Failed to change the snapshot folder path of the virtual machine <b>%1<b> to <nobr><b>%2</b></nobr>.</source>
-        <translation type="obsolete">Nie udało się zmienić ścieżki do katalogu migawek dla maszyny wirtualnej <b>%1<b> na <nobr><b>%2</b></nobr>.</translation>
+        <translation type="obsolete">Nie udało się zmienić ścieżki do folderu migawek dla maszyny wirtualnej <b>%1<b> na <nobr><b>%2</b></nobr>.</translation>
     </message>
     <message>
         <source><p>Could not enter seamless mode due to insufficient guest video memory.</p><p>You should configure the VM to have at least <b>%1</b> of video memory.</p></source>
@@ -8274,7 +8315,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source><p>Failed to remove the shared folder <b>%1</b> (pointing to <nobr><b>%2</b></nobr>) from the virtual machine <b>%3</b>.</p><p>Please close all programs in the guest OS that may be using this shared folder and try again.</p></source>
-        <translation>Nie udało się usunąć współdzielonego katalogu <b>%1</b> (wskazującego na <nobr><b>%2</b></nobr>) z maszyny wirtualnej <b>%3</b>.</p><p>Proszę zamknąć wszystkie programy uruchomione w systemie operacyjnym gościa, które mogą korzystać z tego katalogu i spróbować ponownie.</p></translation>
+        <translation>Nie udało się usunąć współdzielonego folderu <b>%1</b> (wskazującego na <nobr><b>%2</b></nobr>) z maszyny wirtualnej <b>%3</b>.</p><p>Proszę zamknąć wszystkie programy uruchomione w systemie operacyjnym gościa, które mogą korzystać z tego folderu i spróbować ponownie.</p></translation>
     </message>
     <message>
         <source><p>Could not find the VirtualBox Guest Additions disk image file file <nobr><b>%1</b></nobr> or <nobr><b>%2</b>.</nobr></p><p>Do you wish to download this disk image file from the Internet?</p></source>
@@ -8306,7 +8347,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source><p>A critical error has occurred while running the virtual machine and the machine execution has been stopped.</p><p>For help, please see the Community section on <a href=https://www.virtualbox.org>https://www.virtualbox.org</a> or your support contract. Please provide the contents of the log file <tt>VBox.log</tt> and the image file <tt>VBox.png</tt>, which you can find in the <nobr><b>%1</b></nob [...]
-        <translation type="obsolete"><p>Wystąpił błąd krytyczny podczas pracy maszyny wirtualnej i została ona zatrzymana.</p><p>Pomoc można uzyskać korzystając z forum na stronie <a href=https://www.virtualbox.org>https://www.virtualbox.org</a> (sekcja Community) lub kontaktując się bezpośrednio z nami. Proszę pamiętać, aby do opisu problemu dołączyć zawartość pliku z logiem <tt>VBox.log</tt> oraz plik obrazu <tt>VBox.png</tt>, które [...]
+        <translation type="obsolete"><p>Wystąpił błąd krytyczny podczas pracy maszyny wirtualnej i została ona zaPrzechowujena.</p><p>Pomoc można uzyskać korzystając z forum na stronie <a href=https://www.virtualbox.org>https://www.virtualbox.org</a> (sekcja Community) lub kontaktując się bezpośrednio z nami. Proszę pamiętać, aby do opisu problemu dołączyć zawartość pliku z logiem <tt>VBox.log</tt> oraz plik obrazu <tt>VBox.png</tt>,  [...]
     </message>
     <message>
         <source><p>You didn't attach a hard disk to the new virtual machine. The machine will not be able to boot unless you attach a hard disk with a guest operating system or some other bootable media to it later using the machine settings window or the First Run Wizard.</p><p>Do you wish to continue?</p></source>
@@ -8415,7 +8456,7 @@ p, li { white-space: pre-wrap; }
     <message>
         <source>Insert</source>
         <comment>additions</comment>
-        <translation type="unfinished">Zamontuj</translation>
+        <translation>Zamontuj</translation>
     </message>
     <message>
         <source><p>The host key is currently defined as <b>%1</b>.</p></source>
@@ -8438,7 +8479,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source><p>The following VirtualBox settings files have been automatically converted to the new settings file format version <b>%1</b>.</p><p>However, the results of the conversion were not saved back to disk yet. Please press:</p><ul><li><b>Save</b> to save all auto-converted files now (it will not be possible to use these settings files with an older version of VirtualBox in the future);</li><li><b>Ba [...]
-        <translation type="obsolete"><p>Następujące pliki konfiguracyjne programu VirtualBox zostały automatycznie skonwertowane do nowej wersji <b>%1</b>.</p><p>Wyniki konwersji nie zostały jednak jeszcze zapisane na dysk. Proszę wcisnąć: </p><ul><li><b>Zapisz</b>, aby teraz zapisać wszystkie skonwertowane pliki (nie będzie możliwe używanie tych plików ze starszą wersją programu VirtualBox);</li><li><b>Utwórz  [...]
+        <translation type="obsolete"><p>Następujące pliki konfiguracyjne programu VirtualBox zostały automatycznie skonwertowane do nowej wersji <b>%1</b>.</p><p>Wyniki konwersji nie zostały jednak jeszcze zapisane na dysk. Proszę wcisnąć: </p><ul><li><b>Zapisz</b>, aby teraz zapisać wszystkie skonwertowane pliki (nie będzie możliwe używanie tych plików ze starszą wersją programu VirtualBox);</li><li><b>Utwórz  [...]
     </message>
     <message>
         <source>&Save</source>
@@ -8516,7 +8557,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source><p>You have <b>clicked the mouse</b> inside the Virtual Machine display or pressed the <b>host key</b>. This will cause the Virtual Machine to <b>capture</b> the host mouse pointer (only if the mouse pointer integration is not currently supported by the guest OS) and the keyboard, which will make them unavailable to other applications running on your host machine.</p><p>You can press the <b>host key</b> at  [...]
-        <translation><p>Został wciśnięty <b>przycisk myszy</b> wewnątrz okna maszyny wirtualnej lub wciśnięto <b>klawisz gospodarza</b>. W wyniku maszyna wirtualna <b>przechwyci</b> kursor myszy gospodarza (jednak tylko, jeśli funkcja integracji kursora myszy nie jest obsługiwana przez goszczony system operacyjny) oraz klawiaturę, co z kolei sprawi, że będą one niedostępne dla innych aplikacji uruchomionych na komputerze.</p><p>W każd [...]
+        <translation><p>Został wciśnięty <b>przycisk myszy</b> wewnątrz okna maszyny wirtualnej lub wciśnięto <b>klawisz gospodarza</b>. W wyniku czego, maszyna wirtualna <b>przechwyci</b> kursor myszy gospodarza (jednak tylko, jeśli funkcja integracji kursora myszy nie jest obsługiwana przez goszczony system operacyjny) oraz klawiaturę, co z kolei sprawi, że będą one niedostępne dla innych aplikacji uruchomionych na komputerze.</p><p&gt [...]
     </message>
     <message>
         <source><p>You have the <b>Auto capture keyboard</b> option turned on. This will cause the Virtual Machine to automatically <b>capture</b> the keyboard every time the VM window is activated and make it unavailable to other applications running on your host machine: when the keyboard is captured, all keystrokes (including system ones like Alt-Tab) will be directed to the VM.</p><p>You can press the <b>host key</b> at any time t [...]
@@ -8702,7 +8743,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source><p>The following VirtualBox settings files have been automatically converted to the new settings file format version <b>%1</b>.</p><p>However, the results of the conversion were not saved back to disk yet. Please press:</p><ul><li><b>Backup</b> to create backup copies of the settings files in the old format before saving them in the new format;</li><li><b>Overwrite</b> to save all auto-con [...]
-        <translation type="obsolete"><p>Następujące pliki konfiguracyjne programu VirtualBox zostały automatycznie skonwertowane do nowej wersji <b>%1</b>.</p><p>Wyniki konwersji nie zostały jednak jeszcze zapisane na dysk. Proszę wcisnąć:</p><ul><li><b>Utwórz kopię zapasową</b>, aby stworzyć kopie zapasowe starych wersji plików ustawień przed zastąpieniem ich nowszą wersją;</li><li><b>Nadpisz</b>, aby za [...]
+        <translation type="obsolete"><p>Następujące pliki konfiguracyjne programu VirtualBox zostały automatycznie skonwertowane do nowej wersji <b>%1</b>.</p><p>Wyniki konwersji nie zostały jednak jeszcze zapisane na dysk. Proszę wcisnąć:</p><ul><li><b>Utwórz kopię zapasową</b>, aby stworzyć kopie zapasowe starych wersji plików ustawień przed zastąpieniem ich nowszą wersją;</li><li><b>Nadpisz</b>, aby za [...]
     </message>
     <message>
         <source><li><b>Exit</b> to terminate VirtualBox without saving the results of the conversion to disk.</li></source>
@@ -8715,7 +8756,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source><p>A critical error has occurred while running the virtual machine and the machine execution has been stopped.</p><p>For help, please see the Community section on <a href=https://www.virtualbox.org>https://www.virtualbox.org</a> or your support contract. Please provide the contents of the log file <tt>VBox.log</tt> and the image file <tt>VBox.png</tt>, which you can find in the <nobr><b>%1</b></nob [...]
-        <translation><p>Wystąpił błąd krytyczny podczas pracy maszyny wirtualnej i została ona zatrzymana.</p><p>Pomoc można uzyskać korzystając z forum na stronie <a href=https://www.virtualbox.org>https://www.virtualbox.org</a> (sekcja Community) lub kontaktując się bezpośrednio z nami. Proszę pamiętać, aby do opisu problemu dołączyć zawartość pliku z logiem <tt>VBox.log</tt> oraz plik obrazu <tt>VBox.png</tt>, które można znaleźć w [...]
+        <translation><p>Wystąpił błąd krytyczny podczas pracy maszyny wirtualnej i została ona zaPrzechowujena.</p><p>Pomoc można uzyskać korzystając z forum na stronie <a href=https://www.virtualbox.org>https://www.virtualbox.org</a> (sekcja Community) lub kontaktując się bezpośrednio z nami. Proszę pamiętać, aby do opisu problemu dołączyć zawartość pliku z logiem <tt>VBox.log</tt> oraz plik obrazu <tt>VBox.png</tt>, które można znal [...]
     </message>
     <message>
         <source>hard disk</source>
@@ -8945,7 +8986,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source><p>Could not insert the VirtualBox Guest Additions installer disk image file into the virtual machine <b>%1</b>, as the machine has no CD/DVD drives. Please add a drive using the storage page of the virtual machine settings window.</p></source>
-        <translation type="obsolete"><p>Nie udało się podłączyć obrazu CD instalatora Dodatków dla goszczonych systemów (Guest Additions) do maszyny wirtualnej <b>%1</b>, ponieważ nie posiada ona żadnych napędów CD/DVD. Proszę dodać napęd w ustawieniach maszyny wirtualnej, na stronie "Nośniki".</p></translation>
+        <translation type="obsolete"><p>Nie udało się podłączyć obrazu CD instalatora Dodatków dla goszczonych systemów (Guest Additions) do maszyny wirtualnej <b>%1</b>, ponieważ nie posiada ona żadnych napędów CD/DVD. Proszę dodać napęd w ustawieniach maszyny wirtualnej, na stronie "Pamięć".</p></translation>
     </message>
     <message>
         <source>E&xit</source>
@@ -8998,7 +9039,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source><p>Are you sure you want to delete the CD/DVD device?</p><p>You will not be able to insert any CDs or ISO images or install the Guest Additions without it!</p></source>
-        <translation type="obsolete"><p>Usunąć napęd CD/DVD?</p><p>Po jego usunięciu nie będzie możliwe montowanie płyt CD, obrazów ISO oraz instalacja Dodatków (Guest Additions)!</p></translation>
+        <translation type="obsolete"><p>Usunąć napęd CD/DVD?</p><p>Po jego usunięciu nie będzie możliwe montowanie płyt CD, obrazów ISO oraz instalacja Dodatków gościa!</p></translation>
     </message>
     <message>
         <source>&Remove</source>
@@ -9055,75 +9096,75 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Failed to open virtual machine located in %1.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie udało się wystartować maszyny wirtualnej zlokalizowanej w<b>%1</b>.</translation>
     </message>
     <message>
         <source>Failed to add virtual machine <b>%1</b> located in <i>%2</i> because its already present.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie udało się dodać maszyny wirtualnej zlokalizowanej w<b>%1</b>, ponieważ już istnieje.</translation>
     </message>
     <message>
         <source>Delete all files</source>
-        <translation type="unfinished"></translation>
+        <translation>Usuń wszystkie pliki</translation>
     </message>
     <message>
         <source>Remove only</source>
-        <translation type="unfinished"></translation>
+        <translation>Usuń tylko</translation>
     </message>
     <message>
         <source>Remove</source>
-        <translation type="unfinished">Usuń</translation>
+        <translation>Usuń</translation>
     </message>
     <message>
         <source><p>You are about to add a virtual hard disk to controller <b>%1</b>.</p><p>Would you like to create a new, empty file to hold the disk contents or select an existing one?</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Zamierzasz dodać wirtualny dysk twardy do kontrolera <b>%1</b>.</p><p>Czy chciałbyś utworzyć nowy, pusty plik, by trzymać w nim zawartość dysku lub wybrać istniejący?</p></translation>
     </message>
     <message>
         <source><p>You are about to add a new floppy drive to controller <b>%1</b>.</p><p>Would you like to choose a virtual floppy disk to put in the drive or to leave it empty for now?</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Zamierzasz dodać nową stację dyskietek do kontrolera <b>%1</b>.</p><p>Czy chciałbyś włożyć wirtualną dyskietkę do stacji czy pozostawić ją pustą?</p></translation>
     </message>
     <message>
         <source>Failed to detach the hard disk (<nobr><b>%1</b></nobr>) from the slot <i>%2</i> of the machine <b>%3</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie udało się odłączyć dysku twardego (<nobr><b>%1</b></nobr>) z gniazda <i>%2</i> maszyny <b>%3</b>.</translation>
     </message>
     <message>
         <source>Failed to update Guest Additions. The Guest Additions disk image file will be inserted for user installation.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie udało się zaktualizować dodatków gościa. Plik obrazu dysku z dodatkami gościa zostanie zamontowany, by rozpocząć instalację.</translation>
     </message>
     <message>
         <source>Failed to install the Extension Pack <b>%1</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie udało się zainstalować pakietu rozszerzeń <b>%1</b>.</translation>
     </message>
     <message>
         <source>Failed to uninstall the Extension Pack <b>%1</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie udało się odinstalować pakietu rozszerzeń <b>%1</b>.</translation>
     </message>
     <message>
         <source>&Remove</source>
-        <translation type="unfinished">&Usuń</translation>
+        <translation>&Usuń</translation>
     </message>
     <message>
         <source>The current port forwarding rules are not valid. None of the host or guest port values may be set to zero.</source>
-        <translation type="unfinished"></translation>
+        <translation>Obecne reguły przekierowania portów nie są poprawne. Porty gościa i gospodarza nie mogą być ustawione na 0.</translation>
     </message>
     <message>
         <source><p>There are unsaved changes in the port forwarding configuration.</p><p>If you proceed your changes will be discarded.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Istnieją niezapisane zmiany w konfiguracji przekierowania portów.</p><p>Jeśli kontynuujesz, zmiany zostaną odrzucone.</p></translation>
     </message>
     <message>
         <source>Failed to attach the hard disk (<nobr><b>%1</b></nobr>) to the slot <i>%2</i> of the machine <b>%3</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie udało się podłączyć dysku twardego (<nobr><b>%1</b></nobr>) do gniazda <i>%2</i> maszyny <b>%3</b>.</translation>
     </message>
     <message>
         <source><p>Note that the storage unit of this medium will not be deleted and that it will be possible to use it later again.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Uwaga! Jednostka pamięci nośnika nie zostanie usunięta i będzie możliwe jej ponowne użycie.</p></translation>
     </message>
     <message>
         <source><p>The virtual machine window will be now switched to <b>Seamless</b> mode. You can go back to windowed mode at any time by pressing <b>%1</b>.</p><p>Note that the <i>Host</i> key is currently defined as <b>%2</b>.</p><p>Note that the main menu bar is hidden in seamless mode. You can access it by pressing <b>Host+Home</b>.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Okno wirtualnej maszyny zostanie teraz przełączone w tryb <b>Seamless</b>. Możesz wrócić do trybu okienkowego w dowolnym momencie naciskając <b>%1</b>.</p><p>Klawisz<i>gospodarza</i> jest aktualnie zdefiniowany jako <b>%2</b>.</p><p>Główny pasek menu jest ukryty w trybie Seamless. Możesz uzyskać do niego dostęp naciskając <b>Host+Home</b>.</p></translation>
     </message>
     <message>
         <source><p>The virtual machine window will be now switched to <b>Scale</b> mode. You can go back to windowed mode at any time by pressing <b>%1</b>.</p><p>Note that the <i>Host</i> key is currently defined as <b>%2</b>.</p><p>Note that the main menu bar is hidden in scaled mode. You can access it by pressing <b>Host+Home</b>.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Okno wirtualnej maszyny zostanie teraz przełączone w tryb <b>przeskalowany</b>. Możesz wrócić do trybu okienkowego w dowolnym momencie naciskając <b>%1</b>.</p><p>Klawisz<i>gospodarza</i> jest aktualnie zdefiniowany jako <b>%2</b>.</p><p>Główny pasek menu jest ukryty w trybie przeskalowanym. Możesz uzyskać do niego dostęp naciskając <b>Host+Home</b>.</p></translation>
     </message>
     <message>
         <source>Switch</source>
@@ -9132,107 +9173,107 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Failed to open the Extension Pack <b>%1</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie udało się otworzyć pakiet rozszerzeń <b>%1</b>.</translation>
     </message>
     <message>
         <source><p>You are about to install a VirtualBox extension pack. Extension packs complement the functionality of VirtualBox and can contain system level software that could be potentially harmful to your system. Please review the description below and only proceed if you have obtained the extension pack from a trusted source.</p><p><table cellpadding=0 cellspacing=0><tr><td><b>Name:&nbsp;&nbsp;</b></td><td>%1< [...]
-        <translation type="unfinished"></translation>
+        <translation><p>Zamierzasz zainstalować pakiet rozszerzeń VirtualBox. Pakiety rozszerzeń uzupełniają funkcjonalność VirtualBoxa, ale mogą zawierać oprogramowanie, które może być potencjalnie szkodliwe dla twojego systemu.Prosimy o zapoznanie się z opisem poniżej i kontynuować, tylko jeśli otrzymało się pakiet z zaufanego źródła. </p><p><table cellpadding=0 cellspacing=0><tr><td><b>Nazwa:&nbsp;&nbsp;</b></td><td>% [...]
     </message>
     <message>
         <source>Extension packs complement the functionality of VirtualBox and can contain system level software that could be potentially harmful to your system. Please review the description below and only proceed if you have obtained the extension pack from a trusted source.</source>
-        <translation type="unfinished"></translation>
+        <translation>Pakiety rozszerzeń uzupełniają funkcjonalność VirtualBoxa, ale mogą zawierać oprogramowanie, które może być potencjalnie szkodliwe dla twojego systemu.Prosimy o zapoznanie się z opisem poniżej i kontynuować, tylko jeśli otrzymało się pakiet z zaufanego źródła.</translation>
     </message>
     <message>
         <source><p>An older version of the extension pack is already installed, would you like to upgrade? <p>%1</p><p><table cellpadding=0 cellspacing=0><tr><td><b>Name:&nbsp;&nbsp;</b></td><td>%2</td></tr><tr><td><b>New Version:&nbsp;&nbsp;</b></td><td>%3</td></tr><tr><td><b>Current Version:&nbsp;&nbsp;</b></td& [...]
-        <translation type="unfinished"></translation>
+        <translation><p>Starsza wersja pakietu rozszerzeń jest już zainstalowana, czy chcesz zaktualizować? <p>%1</p><p><table cellpadding=0 cellspacing=0><tr><td><b>Nazwa:&nbsp;&nbsp;</b></td><td>%2</td></tr><tr><td><b>Nowa wersja:&nbsp;&nbsp;</b></td><td>%3</td></tr><tr><td><b>Aktualna wersja:&nbsp;&nbsp;</b></t [...]
     </message>
     <message>
         <source>&Upgrade</source>
-        <translation type="unfinished"></translation>
+        <translation>&Aktualizuj</translation>
     </message>
     <message>
         <source><p>An newer version of the extension pack is already installed, would you like to downgrade? <p>%1</p><p><table cellpadding=0 cellspacing=0><tr><td><b>Name:&nbsp;&nbsp;</b></td><td>%2</td></tr><tr><td><b>New Version:&nbsp;&nbsp;</b></td><td>%3</td></tr><tr><td><b>Current Version:&nbsp;&nbsp;</b></t [...]
-        <translation type="unfinished"></translation>
+        <translation><p>Nowsza wersja pakietu rozszerzeń jest już zainstalowana, czy chcesz zdezaktualizować? <p>%1</p><p><table cellpadding=0 cellspacing=0><tr><td><b>Nazwa:&nbsp;&nbsp;</b></td><td>%2</td></tr><tr><td><b>Nowa wersja:&nbsp;&nbsp;</b></td><td>%3</td></tr><tr><td><b>Aktualna wersja:&nbsp;&nbsp;</b>< [...]
     </message>
     <message>
         <source>&Downgrade</source>
-        <translation type="unfinished"></translation>
+        <translation>&Zdezaktualizuj</translation>
     </message>
     <message>
         <source><p>The extension pack is already installed with the same version, would you like reinstall it? <p>%1</p><p><table cellpadding=0 cellspacing=0><tr><td><b>Name:&nbsp;&nbsp;</b></td><td>%2</td></tr><tr><td><b>Version:&nbsp;&nbsp;</b></td><td>%3</td></tr><tr><td><b>Description:&nbsp;&nbsp;</b></td>& [...]
-        <translation type="unfinished"></translation>
+        <translation><p>Pakiet rozszerzeń jest już zainstalowany w tej samej wersji, czy chcesz go przeinstalować? <p>%1</p><p><table cellpadding=0 cellspacing=0><tr><td><b>Nazwa:&nbsp;&nbsp;</b></td><td>%2</td></tr><tr><td><b>Wersja:&nbsp;&nbsp;</b></td><td>%3</td></tr><tr><td><b>Opis:&nbsp;&nbsp;</b></td>< [...]
     </message>
     <message>
         <source>&Reinstall</source>
-        <translation type="unfinished"></translation>
+        <translation>&Reinstaluj</translation>
     </message>
     <message>
         <source><p>You are about to remove the VirtualBox extension pack <b>%1</b>.</p><p>Are you sure you want to proceed?</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Zamierzasz usunąć pakiet rozszerzeń VirtualBox <b>%1</b>.</p><p>Czy na pewno chcesz kontynuować?</p></translation>
     </message>
     <message>
         <source>The extension pack <br><nobr><b>%1</b><nobr><br> was installed successfully.</source>
-        <translation type="unfinished"></translation>
+        <translation>Pakiet rozszerzeń <br><nobr><b>%1</b><nobr><br> został pomyślnie zainstalowany.</translation>
     </message>
     <message>
         <source><p>Cannot create the machine folder <b>%1</b> in the parent folder <nobr><b>%2</b>.</nobr></p><p>Please check that the parent really exists and that you have permissions to create the machine folder.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Nie można utworzyć folderu maszyny <b>%1</b> w folderze nadrzędnym <nobr><b>%2</b>.</nobr></p><p>Sprawdź, czy folder nadrzędny faktycznie istnieje i czy masz uprawnienia, by utworzyć folder maszyny.</p></translation>
     </message>
     <message>
         <source>Failed to register the virtual machine <b>%1</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie udało się zarejestrować maszynę <b>%1</b>.</translation>
     </message>
     <message>
         <source><p>The machine settings were changed while you were editing them. You currently have unsaved setting changes.</p><p>Would you like to reload the changed settings or to keep your own changes?</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Ustawienia maszyny zostały zmienione w trakcie ich edycji. Aktualnie posiadasz niezapisane zmiany ustawień.</p><p>Czy chciałbyś przeładować zmienione ustawienia czy zachować zmiany?</p></translation>
     </message>
     <message>
         <source>Reload settings</source>
-        <translation type="unfinished"></translation>
+        <translation>Przeładuj ustawienia</translation>
     </message>
     <message>
         <source>Keep changes</source>
-        <translation type="unfinished"></translation>
+        <translation>Zachowaj zmiany</translation>
     </message>
     <message>
         <source>The virtual machine that you are changing has been started. Only certain settings can be changed while a machine is running. All other changes will be lost if you close this window now.</source>
-        <translation type="unfinished"></translation>
+        <translation>Maszyna wirtualna, którą edytujesz, właśnie wystartowała. Prawdopodobnie tylko niektóre ustawienia mogą być zmienione, podczas gdy maszyna jest uruchomiona. Wszystkie inne zmiany zostaną utracone, jeśli teraz zamkniesz okno.</translation>
     </message>
     <message>
         <source>Failed to clone the virtual machine <b>%1</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Niepowiodło się klonowanie maszyny wirtualnej <b>%1</b>.</translation>
     </message>
     <message>
         <source>Create a snapshot of the current machine state</source>
-        <translation type="unfinished"></translation>
+        <translation>Stwórz migawkę obecnego stanu maszyny</translation>
     </message>
     <message>
         <source><p>Error changing disk image mode from <b>%1</b> to <b>%2</b>.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Wystąpił błąd podczas zmieniania trybu obrazu dysku z <b>%1</b> na <b>%2</b>.</p></translation>
     </message>
     <message>
         <source>Could not load the Host USB Proxy Service (VERR_FILE_NOT_FOUND). The service might not be installed on the host computer</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie można załadować usługi Host USB Proxy (VERR_FILE_NOT_FOUND). Usługa ta być może nie została zainstalowana na komputerze gospodarza.</translation>
     </message>
     <message>
         <source>VirtualBox is not currently allowed to access USB devices.  You can change this by adding your user to the 'vboxusers' group.  Please see the user manual for a more detailed explanation</source>
-        <translation type="unfinished"></translation>
+        <translation>VirtualBox aktualnie nie ma dostępu do urządzeń USB. Można to zmienić, dodając użytkownika do grupy vboxusers'. Proszę zapoznać się z instrukcją obsługi w celu bardziej szczegółowego wyjaśnienia.</translation>
     </message>
     <message>
         <source>VirtualBox is not currently allowed to access USB devices.  You can change this by allowing your user to access the 'usbfs' folder and files.  Please see the user manual for a more detailed explanation</source>
-        <translation type="unfinished"></translation>
+        <translation>VirtualBox aktualnie nie ma dostępu do urządzeń USB. Można to zmienić, zezwalając na dostęp użytkownika do folderu 'usbfs' i plików. Proszę zapoznać się z instrukcją obsługi w celu bardziej szczegółowego wyjaśnienia.</translation>
     </message>
     <message>
         <source>The USB Proxy Service has not yet been ported to this host</source>
-        <translation type="unfinished"></translation>
+        <translation>Usługa USB Proxy nie została jeszcze przeniesiona do tego hosta.</translation>
     </message>
     <message>
         <source>Could not load the Host USB Proxy service</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie można załadować usługi Host USB Proxy.</translation>
     </message>
     <message>
         <source>Can't find snapshot named <b>%1</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie można znaleźć migawki nazwanej <b>%1</b>.</translation>
     </message>
     <message>
         <source><p>Failed to save the downloaded file as <nobr><b>%1</b>.</nobr></p></source>
@@ -9240,7 +9281,7 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source><p>You have an old version (%1) of the <b><nobr>%2</nobr></b> installed.</p><p>Do you wish to download latest one from the Internet?</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Masz zainstalowaną starą wersję (%1)  <b><nobr>%2</nobr></b>.</p><p>Czy chcesz pobrać najnowszą z internetu?</p></translation>
     </message>
     <message>
         <source>Download</source>
@@ -9249,114 +9290,114 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source><p>Are you sure you want to download the <b><nobr>%1</nobr></b> from <nobr><a href="%2">%2</a></nobr> (size %3 bytes)?</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Czy jesteś pewny/pewna, że chcesz pobrać <b><nobr>%1</nobr></b> z <nobr><a href="%2">%2</a></nobr> (rozmiar %3 bajtów)?</p></translation>
     </message>
     <message>
         <source><p>The <b><nobr>%1</nobr></b> has been successfully downloaded from <nobr><a href="%2">%2</a></nobr> and saved locally as <nobr><b>%3</b>.</nobr></p><p>Do you wish to install this extension pack?</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p><b><nobr>%1</nobr></b> został pomyślnie pobrany z <nobr><a href="%2">%2</a></nobr>i zapisany lokalnie jako <nobr><b>%3</b>.</nobr></p><p>Czy chcesz zainstalować ten pakiet rozszerzeń?</p></translation>
     </message>
     <message>
         <source>Install</source>
         <comment>extension pack</comment>
-        <translation type="unfinished"></translation>
+        <translation>Zainstaluj</translation>
     </message>
     <message>
         <source><p>The <b><nobr>%1</nobr></b> has been successfully downloaded from <nobr><a href="%2">%2</a></nobr> but can't be saved locally as <nobr><b>%3</b>.</nobr></p><p>Please choose another location for that file.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p><b><nobr>%1</nobr></b> został pomyślnie pobrany z <nobr><a href="%2">%2</a></nobr> ,ale nie udało się go zapisac lokalnie jako <nobr><b>%3</b>.</nobr></p><p>Proszę wybrać inną lokalizację dla tego pliku.</p></translation>
     </message>
     <message>
         <source><p>You have version %1 of the <b><nobr>%2</nobr></b> installed.</p><p>You should download and install version %3 of this extension pack from Oracle!</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Masz wersję %1 of the <b><nobr>%2</nobr></b>zainstalowaną.</p><p>Powienieneś/powinnaś pobrać i zainstalować wersję %3 tego pakietu rozszerzeń od Oracle!</p></translation>
     </message>
     <message>
         <source><p>Failed to initialize COM because the VirtualBox global configuration directory <b><nobr>%1</nobr></b> is not accessible. Please check the permissions of this directory and of its parent directory.</p><p>The application will now terminate.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Nie udało się zainicjować portu COM z powodu tego, że globalny folder konfiguracyjny  <b><nobr>%1</nobr></b> jest niedostępny. Proszę sprawdzić uprawnienia tego folderu i jego folderu nadrzędnego.</p><p>Aplikacja zostanie teraz zakończona.</p></translation>
     </message>
     <message>
         <source><p>You are about to remove following virtual machine items from the machine list:</p><p><b>%1</b></p><p>Do you wish to proceed?</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Zamierzasz usunąć następujące elementy wirtualnej maszyny z listy maszyn:</p><p><b>%1</b></p><p>Czy chcesz kontynuować?</p></translation>
     </message>
     <message>
         <source><p>You are about to remove following inaccessible virtual machines from the machine list:</p><p>%1</p><p>Do you wish to proceed?</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Zamierzasz usunąć następujące niedostępne elementy wirtualnej maszyny z listy maszyn:</p><p><b>%1</b></p><p>Czy chcesz kontynuować?</p></translation>
     </message>
     <message>
         <source><p>You are about to remove following virtual machines from the machine list:</p><p>%1</p><p>Would you like to delete the files containing the virtual machine from your hard disk as well? Doing this will also remove the files containing the machine's virtual hard disks if they are not in use by another machine.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Zamierzasz usunąć następujące elementy wirtualnej maszyny z listy maszyn:</p><p>%1</p><p>Czy chciałbyś również usunąć pliki zawierające maszynę wirtualną z twojego dysku twardego? Spowoduje to także usunięcie plików zawierających wirtualne dyski twarde maszyny, jeśli nie są używane przez inną maszynę.</p></translation>
     </message>
     <message>
         <source><p>You are about to remove following virtual machines from the machine list:</p><p>%1</p><p>Would you like to delete the files containing the virtual machine from your hard disk as well?</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Zamierzasz usunąć następujące elementy wirtualnej maszyny z listy maszyn:</p><p>%1</p><p>Czy chciałbyś również usunąć pliki zawierające maszynę wirtualną z twojego dysku twardego?</p></translation>
     </message>
     <message>
         <source>Do you wish to cancel all current network operations?</source>
-        <translation type="unfinished"></translation>
+        <translation>Czy chcesz anulować wszystkie aktualne operacje sieciowe?</translation>
     </message>
     <message>
         <source>ACPI Shutdown</source>
         <comment>machine</comment>
-        <translation type="unfinished"></translation>
+        <translation>Wyłącz maszynę (ACPI)</translation>
     </message>
     <message>
         <source>Power Off</source>
         <comment>machine</comment>
-        <translation type="unfinished"></translation>
+        <translation>Wyłącz maszynę</translation>
     </message>
     <message>
         <source><p>Cannot remove the machine folder <nobr><b>%1</b>.</nobr></p><p>Please check that this folder really exists and that you have permissions to remove it.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Nie można usunąć folderu maszyny <nobr><b>%1</b>.</nobr></p><p> Sprawdź czy folder istnieje i czy masz uprawnienia, by go usunąć.</p></translation>
     </message>
     <message>
         <source><p>Cannot create the machine folder <b>%1</b> in the parent folder <nobr><b>%2</b>.</nobr></p><p>This folder already exists and possibly belongs to another machine.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Nie można utworzyć folderu <b>%1</b> w folderze nadrzędnym <nobr><b>%2</b>.</nobr></p><p>Ten folder już istnieje i prawdopodobnie należy do innej maszyny.</p></translation>
     </message>
     <message>
         <source><p>Are you sure you want to discard the saved state of the following virtual machines?</p><p><b>%1</b></p><p>This operation is equivalent to resetting or powering off the machine without doing a proper shutdown of the guest OS.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Czy jesteś pewny, że chcesz odrzucić zapisany stan następujących maszyn wirtualnych?</p><p><b>%1</b></p><p>Ta operacja ta jest równoważna zresetowaniu lub wyłączeniu maszyny bez właściwego zamknięcia goszczonego systemu.</p></translation>
     </message>
     <message>
         <source><p>Do you really want to reset the following virtual machines?</p><p><b>%1</b></p><p>This will cause any unsaved data in applications running inside it to be lost.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Czy na pewno chcesz zresetować następujące maszyny wirtualne?</p><p><b>%1</b></p><p>To spowoduje, że wszystkie niezapisane dane w aplikacjach działających wewnątrz nich zostaną utracone.</p></translation>
     </message>
     <message>
         <source><p>Do you really want to send an ACPI shutdown signal to the following virtual machines?</p><p><b>%1</b></p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Czy na pewno chcesz wysłać sygnał wyłączania ACPI do następujących maszyn wirtualnych?</p><p><b>%1</b></p></translation>
     </message>
     <message>
         <source><p>Do you really want to power off the following virtual machines?</p><p><b>%1</b></p><p>This will cause any unsaved data in applications running inside it to be lost.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Czy na pewno chcesz wyłączyć następujące maszyny wirtualne?</p><p><b>%1</b></p><p>To spowoduje, że wszystkie niezapisane dane w aplikacjach działających wewnątrz nich zostaną utracone.</p></translation>
     </message>
     <message>
         <source><p>You are trying to move machine <nobr><b>%1</b></nobr> to group <nobr><b>%2</b></nobr> which already have sub-group <nobr><b>%1</b></nobr>.</p><p>Please resolve this name-conflict and try again.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Próbujesz przenieść maszynę <nobr><b>%1</b></nobr> do grupy <nobr><b>%2</b></nobr> , która ma już podgrupę <nobr><b>%1</b></nobr>.</p><p>Rozwiąż ten konflikt nazw i spróbuj ponownie.</p></translation>
     </message>
     <message>
         <source><p>You are trying to move group <nobr><b>%1</b></nobr> to group <nobr><b>%2</b></nobr> which already have another item with the same name.</p><p>Would you like to automatically rename it?</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Próbujesz przesunąć grupę <nobr><b>%1</b></nobr> do grupy <nobr><b>%2</b></nobr> , która ma już inny element z tą sama nazwą.</p><p>Czy chcesz automatycznie zmienić nazwę?</p></translation>
     </message>
     <message>
         <source>Rename</source>
-        <translation type="unfinished"></translation>
+        <translation>Zmień nazwę</translation>
     </message>
     <message>
         <source><p>You are about to restore snapshot <nobr><b>%1</b></nobr>.</p><p>You can create a snapshot of the current state of the virtual machine first by checking the box below; if you do not do this the current state will be permanently lost. Do you wish to proceed?</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Zamierzasz przywrócić migawkę <nobr><b>%1</b></nobr>.</p><p>Możesz utworzyć migawkę aktualnego stanu maszyny wirtualnej, najpierw zaznaczając poniższe pole, jeśli tego nie zrobisz, to aktualny stan maszyny zostanie trwale utracony. Czy chcesz kontynuować?</p></translation>
     </message>
     <message>
         <source><p>Are you sure you want to restore snapshot <nobr><b>%1</b></nobr>?</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Czy jesteś pewny, że chcesz przywrócić migawkę <nobr><b>%1</b></nobr>?</p></translation>
     </message>
     <message>
         <source>Failed to set groups of the virtual machine <b>%1</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie udało się ustawić grup wirtualnej maszyny <b>%1</b>.</translation>
     </message>
     <message>
         <source><p>Could not start the machine <b>%1</b> because the following physical network interfaces were not found:</p><p><b>%2</b></p><p>You can either change the machine's network settings or stop the machine.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Nie udało się wystartować maszyny, <b>%1</b> ponieważ nie znaleziono następujących interfejsów fizycznych sieci:</p><p><b>%2</b></p><p>Można zmienić ustawienia sieciowe maszyny lub ją zatrzymać.</p></translation>
     </message>
     <message>
         <source>Change Network Settings</source>
-        <translation type="unfinished"></translation>
+        <translation>Zmień ustawienia sieciowe</translation>
     </message>
     <message>
         <source>Close Virtual Machine</source>
@@ -9364,176 +9405,176 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source><p>Cannot start the VirtualBox Manager due to local restrictions.</p><p>The application will now terminate.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Nie można uruchomić Menedżera VirtualBox z powodu lokalnych ograniczeń.</p><p>Aplikacja zostanie teraz zakończona.</p></translation>
     </message>
     <message>
         <source><p>Could not find a language file for the language <b>%1</b> in the directory <b><nobr>%2</nobr></b>.</p><p>The language will be temporarily reset to the system default language. Please go to the <b>Preferences</b> window which you can open from the <b>File</b> menu of the VirtualBox Manager window, and select one of the existing languages on the <b>Language</b> page.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Nie udało się odnaleźć pliku językowego dla języka <b>%1</b>w ścieżce <b><nobr>%2</nobr></b>.</p><p>Język zostanie tymczasowo zresetowany do domyślnego języku systemowego. Proszę przejść do okna <b>ustawień</b>, które można otworzyć z menu <b>Plik</b>okna Menedżera VirtualBox, i wybrać jeden z istniejących języków na stronie <b>Język</b>.</p></translation>
     </message>
     <message>
         <source><p>Could not load the language file <b><nobr>%1</nobr></b>. <p>The language will be temporarily reset to English (built-in). Please go to the <b>Preferences</b> window which you can open from the <b>File</b> menu of the VirtualBox Manager window, and select one of the existing languages on the <b>Language</b> page.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Nie udało się załadować pliku językowego <b><nobr>%1</nobr></b>. <p>Język zostanie tymczasowo zresetowany do języka angielskiego (wbudowanego). Proszę przejść do okna <b>ustawień</b>, które można otworzyć z menu <b>Plik</b>okna Menedżera VirtualBox, i wybrać jeden z istniejących języków na stronie <b>Język</b>.</p></translation>
     </message>
     <message>
         <source>There is no virtual machine with the identifier <b>%1</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie ma maszyny wirtualnej z identyfikatorem <b>%1</b>.</translation>
     </message>
     <message>
         <source>Ignore</source>
-        <translation type="unfinished">Ignoruj</translation>
+        <translation>Ignoruj</translation>
     </message>
     <message>
         <source>Failed to create NAT network.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie udało się utworzyć sieci NAT.</translation>
     </message>
     <message>
         <source>Failed to remove NAT network <b>%1</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie powiodło się usunięcie sieci NAT <b>%1</b>.</translation>
     </message>
     <message>
         <source>Failed to create DHCP server.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie powiodło się utworzenie serwera DHCP.</translation>
     </message>
     <message>
         <source>Failed to remove DHCP server for network interface <b>%1</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie powiodło się usunięcie serwera DHCP z interfejsu sieciowego <b>%1</b>.</translation>
     </message>
     <message>
         <source>Failed to create the host network interface.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie powiodło się utworzenie interfejsu sieci gospodarza.</translation>
     </message>
     <message>
         <source>Create &new disk</source>
-        <translation type="unfinished"></translation>
+        <translation>Stwórz &nowy dysk</translation>
     </message>
     <message>
         <source>&Choose existing disk</source>
-        <translation type="unfinished"></translation>
+        <translation>&Wybierz istniejący dysk</translation>
     </message>
     <message>
         <source>Leave &empty</source>
-        <translation type="unfinished"></translation>
+        <translation>Pozostaw &pusty</translation>
     </message>
     <message>
         <source>&Choose disk</source>
-        <translation type="unfinished"></translation>
+        <translation>&Wybierz dysk</translation>
     </message>
     <message>
         <source><p>Are you sure you want to remove the virtual hard disk <nobr><b>%1</b></nobr> from the list of known disk image files?</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Czy jesteś pewny, że chcesz usunąć wirtualny dysk twardy <nobr><b>%1</b></nobr> z listy znanych plików obrazu dysku?</p></translation>
     </message>
     <message>
         <source><p>As this hard disk is inaccessible its image file can not be deleted.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Z powodu tego, że ten dysk twardy jest niedostępny, nie można go usunąć.</p></translation>
     </message>
     <message>
         <source><p>Are you sure you want to remove the virtual optical disk <nobr><b>%1</b></nobr> from the list of known disk image files?</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Czy jesteś pewny, że chcesz usunąć wirtualny dysk optyczny <nobr><b>%1</b></nobr> z listy znanych plików obrazu dysku?</p></translation>
     </message>
     <message>
         <source><p>Are you sure you want to remove the virtual floppy disk <nobr><b>%1</b></nobr> from the list of known disk image files?</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Czy jesteś pewny, że chcesz usunąć wirtualną dyskietkę <nobr><b>%1</b></nobr> z listy znanych plików obrazu dysku?</p></translation>
     </message>
     <message>
         <source><p>Unable to insert the virtual optical disk <nobr><b>%1</b></nobr> into the machine <b>%2</b>.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Nie można włożyć wirtualnego dysku optycznego <nobr><b>%1</b></nobr> do maszyny <b>%2</b>.</p></translation>
     </message>
     <message>
         <source><p>Would you like to try to force insertion of this disk?</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Czy chcesz spróbować wymusić włożenie dysku?</p></translation>
     </message>
     <message>
         <source><p>Unable to eject the virtual optical disk <nobr><b>%1</b></nobr> from the machine <b>%2</b>.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Nie można wysunąć wirtualnego dysku optycznego <nobr><b>%1</b></nobr> z maszyny <b>%2</b>.</p></translation>
     </message>
     <message>
         <source><p>Would you like to try to force ejection of this disk?</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Czy chcesz spróbować wymusić wysunięcie dysku?</p></translation>
     </message>
     <message>
         <source><p>Unable to insert the virtual floppy disk <nobr><b>%1</b></nobr> into the machine <b>%2</b>.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Nie można włożyć wirtualnej dyskietki <nobr><b>%1</b></nobr> do maszyny <b>%2</b>.</p></translation>
     </message>
     <message>
         <source><p>Unable to eject the virtual floppy disk <nobr><b>%1</b></nobr> from the machine <b>%2</b>.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Nie można wysunąć wirtualnej dyskietki <nobr><b>%1</b></nobr> z maszyny <b>%2</b>.</p></translation>
     </message>
     <message numerus="yes">
         <source><p>The %n following virtual machine(s) are currently in a saved state: <b>%1</b></p><p>If you continue the runtime state of the exported machine(s) will be discarded. The other machine(s) will not be changed.</p></source>
         <comment>This text is never used with n == 0. Feel free to drop the %n where possible, we only included it because of problems with Qt Linguist (but the user can see how many machines are in the list and doesn't need to be told).</comment>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-            <numerusform></numerusform>
+        <translation>
+            <numerusform><p>%n następująca maszyna wirtualna jest obecnie w zapisanym stanie: <b>%1</b></p><p>Jeśli kontynuujesz, to stan czasu pracy wyeksportowanej maszyny wirtualnej zostanie odrzucony.Inna maszyna nie zostanie zmieniona.</p></numerusform>
+            <numerusform><p>%n następujących maszyn wirtualnych jest obecnie w zapisanym stanie: <b>%1</b></p><p>Jeśli kontynuujesz, to stan czasu pracy wyeksportowanych maszyn wirtualnych zostanie odrzucony.Inne maszyny nie zostaną zmienione.</p></numerusform>
+            <numerusform><p>%n następujące maszyny wirtualne są obecnie w zapisanym stanie: <b>%1</b></p><p>Jeśli kontynuujesz, to stan czasu pracy wyeksportowanych maszyn wirtualnych zostanie odrzucony.Inne maszyny nie zostaną zmienione.</p></numerusform>
         </translation>
     </message>
     <message>
         <source>Switch</source>
-        <translation type="unfinished">Przełącz</translation>
+        <translation>Przełącz</translation>
     </message>
     <message>
         <source>Failed to enable the remote desktop server for the virtual machine <b>%1</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie powiodło się włączenie serwera pulpitu zdalnego dla maszyny wirtualnej <b>%1</b>.</translation>
     </message>
     <message>
         <source>Failed to disable the remote desktop server for the virtual machine <b>%1</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie powiodło się wyłączenie serwera pulpitu zdalnego dla maszyny wirtualnej <b>%1</b>.</translation>
     </message>
     <message>
         <source>Failed to enable video capturing for the virtual machine <b>%1</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie powiodło się włączenie przechwytywania obrazu dla maszyny wirtualnej <b>%1</b>.</translation>
     </message>
     <message>
         <source>Failed to disable video capturing for the virtual machine <b>%1</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie powiodło się wyłączenie przechwytywania obrazu dla maszyny wirtualnej <b>%1</b>.</translation>
     </message>
     <message>
         <source><p>Could not find the <b>VirtualBox Guest Additions</b> disk image file.</p><p>Do you wish to download this disk image file from the Internet?</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Nie mogę znaleźć pliku obrazu dysku<b>Dodatki gościa VirtualBox</b> .</p><p>Czy chcesz pobrać ten plik dysku z Internetu?</p></translation>
     </message>
     <message>
         <source>Download</source>
-        <translation type="unfinished">Pobierz</translation>
+        <translation>Pobierz</translation>
     </message>
     <message>
         <source><p>Are you sure you want to download the <b>VirtualBox Guest Additions</b> disk image file from <nobr><a href="%1">%1</a></nobr> (size %2 bytes)?</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Czy jesteś pewny(a), że chcesz pobrać plik obrazu dysku <b>Dodatki gościa VirtualBox</b> z <nobr><a href="%1">%1</a></nobr> (rozmiar %2 bajtów)?</p></translation>
     </message>
     <message>
         <source><p>The <b>VirtualBox Guest Additions</b> disk image file has been successfully downloaded from <nobr><a href="%1">%1</a></nobr> but can't be saved locally as <nobr><b>%2</b>.</nobr></p><p>Please choose another location for that file.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Plik obrazu dysku<b>Dodatki gościa VirtualBox</b> został pomyślnie pobrany z <nobr><a href="%1">%1</a></nobr> , ale nie mógł zostać zapisany lokalnie jako <nobr><b>%2</b>.</nobr></p><p>Proszę wybrać inną lokalizację dla tego pliku.</p></translation>
     </message>
     <message>
         <source><p>Could not find the <b>VirtualBox User Manual</b> <nobr><b>%1</b>.</nobr></p><p>Do you wish to download this file from the Internet?</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Nie mogę znaleźć <b>instrukcji obsługi VirtualBox</b> <nobr><b>%1</b>.</nobr></p><p>Czy chcesz pobrać ten plik z Internetu?</p></translation>
     </message>
     <message>
         <source><p>Are you sure you want to download the <b>VirtualBox User Manual</b> from <nobr><a href="%1">%1</a></nobr> (size %2 bytes)?</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Czy jesteś pewny, że chcesz pobrać <b>instrukcję obsługi VirtualBox</b> z <nobr><a href="%1">%1</a></nobr> (rozmiar %2 bajtów)?</p></translation>
     </message>
     <message>
         <source><p>The VirtualBox User Manual has been successfully downloaded from <nobr><a href="%1">%1</a></nobr> but can't be saved locally as <nobr><b>%2</b>.</nobr></p><p>Please choose another location for that file.</p></source>
-        <translation type="unfinished"><p>Intrukcja Użytkownika VirtualBox została pobrana z <nobr><a href="%1">%2</a></nobr> ale nie może zostać zapisana lokalnie jako <nobr><b>%3</b>.</nobr></p><p>Proszę wskazać inną lokalizację dla tego pliku.</p> {1"?} {1<?} {2<?}</translation>
+        <translation><p>Instrukcja VirtualBox została pomyślnie pobrana z <nobr><a href="%1">%1</a></nobr> ale nie może zostać zapisana lokalnie jako <nobr><b>%2</b>.</nobr></p><p>Proszę wskazać inną lokalizację dla tego pliku.</p></translation>
     </message>
     <message>
         <source><p>The VirtualBox User Manual has been successfully downloaded from <nobr><a href="%1">%1</a></nobr> and saved locally as <nobr><b>%2</b>.</nobr></p></source>
-        <translation type="unfinished"><p>Intrukcja Użytkownika VirtualBox została pobrana z <nobr><a href="%1">%2</a></nobr> i zapisana lokalnie jako <nobr><b>%3</b>.</nobr></p> {1"?} {1<?} {2<?}</translation>
+        <translation><p>Instrukcja VirtualBox została pomyślnie pobrana z <nobr><a href="%1">%1</a></nobr> i zapisana lokalnie jako <nobr><b>%2</b>.</nobr></p></translation>
     </message>
     <message>
         <source>Close</source>
-        <translation type="unfinished">Zamknij</translation>
+        <translation>Zamknij</translation>
     </message>
     <message>
         <source>Ok</source>
-        <translation type="unfinished"></translation>
+        <translation>Ok</translation>
     </message>
     <message>
         <source>Do not show this message again</source>
-        <translation type="unfinished">Nie pokazuj więcej tej wiadomości</translation>
+        <translation>Nie pokazuj więcej tej wiadomości</translation>
     </message>
     <message>
         <source><p>Do you want to remove the NAT network <nobr><b>%1</b>?</nobr></p><p>If this network is in use by one or more virtual machine network adapters these adapters will no longer be usable until you correct their settings by either choosing a different network name or a different adapter attachment type.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Czy chcesz usunąć sieć NAT <nobr><b>%1</b>?</nobr></p><p>Jeśli ta sieć jest w użyciu przez jedną lub więcej kart sieciowych wirtualnych maszyn, to te karty nie będą dłużej używalne, dopóki nie poprawisz ich ustawień poprzez wybranie innej nazwy sieci lub innego typu podłączenia karty.</p></translation>
     </message>
     <message>
         <source>Insert</source>
@@ -9542,159 +9583,159 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source><p>The VirtualBox Guest Additions do not appear to be available on this virtual machine, and shared folders cannot be used without them. To use shared folders inside the virtual machine, please install the Guest Additions if they are not installed, or re-install them if they are not working correctly, by selecting <b>Insert Guest Additions CD image</b> from the <b>Devices</b> menu. If they are installed but the machine is not yet fully starte [...]
-        <translation type="unfinished"></translation>
+        <translation><p>Dodatki gościa VirtualBox nie są dostępne dla tej maszyny wirtualnej, a z udostepnianych folderów nie można korzystać bez nich. By używać udostępniane foldery w maszynie wirtualnej, zainstaluj dodatki gościa jeśli nie są zainstalowane lub przeinstaluj je, jeśli nie działają prawidłowo, wybierając <b>Zamontuj obraz płyty z dodatkami gościa</b> z menu <b>Urządzenia</b> . Jeśli są zainstalowane, ale maszyna jeszcze nie wystartowała w peł [...]
     </message>
     <message>
         <source>Failed to attach the webcam <b>%1</b> to the virtual machine <b>%2</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie udało się podłączyć kamerkę internetową<b>%1</b> do maszyny wirtualnej <b>%2</b>.</translation>
     </message>
     <message>
         <source>Failed to detach the webcam <b>%1</b> from the virtual machine <b>%2</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Niepowiodło się odłączenie kamerki internetowej <b>%1</b> z maszyny wirtualnej <b>%2</b>.</translation>
     </message>
     <message>
         <source><p>The virtual screen is currently set to a <b>%1&nbsp;bit</b> color mode. For better performance please change this to <b>%2&nbsp;bit</b>. This can usually be done from the <b>Display</b> section of the guest operating system's Control Panel or System Settings.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Wirtualny ekran ma akutalnie ustawiony <b>%1&nbsp;bit</b> tryb koloru.Dla lepszej wydajności należy zmienić na <b>%2&nbsp;bit</b>. Można to zwykle zrobić w sekcji <b>Ekran</b>panelu sterowania lub ustawień systemowych goszczonego systemu.</p></translation>
     </message>
     <message>
         <source><p>Failed to create the VirtualBoxClient COM object.</p><p>The application will now terminate.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Niepowiodło się utworzenie obiektu VirtualBoxClient COM.</p><p>Aplikacja zostanie teraz zakończona.</p></translation>
     </message>
     <message>
         <source>Failed to set the global VirtualBox extra data for key <i>%1</i> to value <i>{%2}</i>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie udało się ustawić dodatkowych danych dla klawisza <i>%1</i> do wartości <i>{%2}</i>.</translation>
     </message>
     <message>
         <source>Failed to set the extra data for key <i>%1</i> of machine <i>%2</i> to value <i>{%3}</i>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie udało się ustawić dodatkowych danych dla klawisza <i>%1</i>  maszyny<i>%2</i> do wartości <i>{%3}</i>.</translation>
     </message>
     <message>
         <source><p>One or more disk image files are not currently accessible. As a result, you will not be able to operate virtual machines that use these files until they become accessible later.</p><p>Press <b>Check</b> to open the Virtual Media Manager window and see which files are inaccessible, or press <b>Ignore</b> to ignore this message.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Jeden lub więcej plików obrazu dysku jest aktualnie niedostępnych. W efekcie czego nie będziesz mógł obsługiwać maszyn wirtualnych, które korzystają z tych plików, dopóki nie staną się później dostępne.</p><p>Wciśnij <b>Sprawdź</b> , by otworzyć okno Menedżera nośników wirtualnych i zobaczyć które pliki są niedostępne, lub naciśnij <b>Ignoruj</b>, by zignorować tę wiadomość.</p></translation>
     </message>
     <message>
         <source><p>Deleting the snapshot will cause the state information saved in it to be lost, and storage data spread over several image files that VirtualBox has created together with the snapshot will be merged into one file. This can be a lengthy process, and the information in the snapshot cannot be recovered.</p></p>Are you sure you want to delete the selected snapshot <b>%1</b>?</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Usunięcie migawki spowoduje, że zapisane informacje o stanie zostaną utracone, a rozprzestrzenione przechowywane dane w plikach obrazów, które stworzył VirtualBox wraz z migawkami, zostaną połączone w jeden plik. To może być długotrwały proces, a informacje zawarte w migawce mogą nie zostać przywrócone.</p></p>Czy jesteś pewny(a), że chcesz usunąć wybraną migawkę <b>%1</b>?</p></translation>
     </message>
     <message>
         <source><p>Deleting the snapshot %1 will temporarily need more storage space. In the worst case the size of image %2 will grow by %3, however on this filesystem there is only %4 free.</p><p>Running out of storage space during the merge operation can result in corruption of the image and the VM configuration, i.e. loss of the VM and its data.</p><p>You may continue with deleting the snapshot at your own risk.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Usunięcie migawki %1 tymczasowo potrzebuje więcej miejsca. W najgorszym przypadku, rozmiar obrazu %2 wzrośnie o %3, jednak w tym systemie plików jest jedynie %4 wolnego.</p><p>Jeśli zabraknie miejsca w trakcie operacji łączenia, to może to spowodować uszkodzenie obrazu i konfiguracji maszyny wirtualnej, czyli utraty maszyny i jej danych.</p><p>Możesz kontynuować usuwanie migawki na własne ryzyko.</p></translation>
     </message>
     <message>
         <source>Failed to save the settings.</source>
-        <translation type="unfinished"></translation>
+        <translation>Niepowiodło się zapisanie ustawień.</translation>
     </message>
     <message>
         <source><p>You are about to add a new optical drive to controller <b>%1</b>.</p><p>Would you like to choose a virtual optical disk to put in the drive or to leave it empty for now?</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Zamierzasz dodać nowy dysk optyczny do kontrolera <b>%1</b>.</p><p>Czy chcesz wybrać wirtualny dysk optyczny, by włożyć go do napędu czy pozostawić na razie pusty?</p></translation>
     </message>
     <message>
         <source><p>Are you sure you want to delete the optical drive?</p><p>You will not be able to insert any optical disks or ISO images or install the Guest Additions without it!</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Czy jesteś pewny(a), że chcesz usunąć dysk optyczny?</p><p>Nie będziesz mógł/mogła włożyć żadnego dysku optycznego ani zamontować obrazu ISO ani zainstalować dodatków gościa bez nich!</p></translation>
     </message>
     <message>
         <source>Failed to attach the optical drive (<nobr><b>%1</b></nobr>) to the slot <i>%2</i> of the machine <b>%3</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie udało się podłączyć dysku optycznego <nobr><b>%1</b></nobr> do gniazda <i>%2</i> maszyny <b>%3</b>.</translation>
     </message>
     <message>
         <source>Failed to attach the floppy drive (<nobr><b>%1</b></nobr>) to the slot <i>%2</i> of the machine <b>%3</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie udało się podłączyć stacji dyskietek <nobr><b>%1</b></nobr> do gniazda <i>%2</i> maszyny <b>%3</b>.</translation>
     </message>
     <message>
         <source>The current port forwarding rules are not valid. Rule names should be unique.</source>
-        <translation type="unfinished"></translation>
+        <translation>Obecne reguły przekierowania portów nie są poprawne. Nazwy reguł powinny być unikalne.</translation>
     </message>
     <message>
         <source>The current port forwarding rules are not valid. Few rules have same host ports and conflicting IP addresses.</source>
-        <translation type="unfinished"></translation>
+        <translation>Obecne reguły przekierowania portów nie są poprawne. Kilka reguł ma te same porty hosta i adresy IP.</translation>
     </message>
     <message>
         <source><p>Are you sure you want to release the disk image file <nobr><b>%1</b></nobr>?</p><p>This will detach it from the following virtual machine(s): <b>%2</b>.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Czy jesteś pewny(a), że chcesz odmontować plik obrazu dysku <nobr><b>%1</b></nobr>?</p><p>Spowoduje to odłączenie go od następującej/następujących maszyn(y) wirtualnej/wirtualnych: <b>%2</b>.</p></translation>
     </message>
     <message>
         <source><p>Do you want to delete the storage unit of the virtual hard disk <nobr><b>%1</b></nobr>?</p><p>If you select <b>Delete</b> then the specified storage unit will be permanently deleted. This operation <b>cannot be undone</b>.</p><p>If you select <b>Keep</b> then the hard disk will be only removed from the list of known hard disks, but the storage unit will be left untouched which mak [...]
-        <translation type="unfinished"></translation>
+        <translation><p>Czy chcesz usunąć jednostkę pamięci wirtualnego dysku twardego <nobr><b>%1</b></nobr>?</p><p>Jesli wybierzesz <b>Usuń</b> , wówczas określona jednostka pamięci zostanie trwale usunięta. Tej operacji <b>nie można cofnąć</b>.</p><p>Jeśli wybierzesz <b>Zachowaj</b> to dysk twardy zostanie jedynie usunięty z listy znanych dysków twardych, ale jednostka pamięci pozostanie niezmien [...]
     </message>
     <message>
         <source>Failed to detach the optical drive (<nobr><b>%1</b></nobr>) from the slot <i>%2</i> of the machine <b>%3</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie udało się odłączyć dysku optycznego (<nobr><b>%1</b></nobr>) z gniazda <i>%2</i> maszyny <b>%3</b>.</translation>
     </message>
     <message>
         <source>Failed to detach the floppy drive (<nobr><b>%1</b></nobr>) from the slot <i>%2</i> of the machine <b>%3</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie udało się odłączyć stacji dyskietek (<nobr><b>%1</b></nobr>) z gniazda <i>%2</i> maszyny <b>%3</b>.</translation>
     </message>
     <message>
         <source>Failed to open the disk image file <nobr><b>%1</b></nobr>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie udało się otworzyć plik obrazu dysku <nobr><b>%1</b></nobr>.</translation>
     </message>
     <message>
         <source>Failed to close the disk image file <nobr><b>%1</b></nobr>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie udało się zamknąć plik obrazu dysku <nobr><b>%1</b></nobr>.</translation>
     </message>
     <message>
         <source>You are about to create a new virtual machine without a hard disk. You will not be able to install an operating system on the machine until you add one. In the mean time you will only be able to start the machine using a virtual optical disk or from the network.</source>
-        <translation type="unfinished"></translation>
+        <translation>Zamierzasz utworzyć nową maszynę wirtualną bez dysku. Nie będziesz mógł/mogła zainstalować systemu operacyjnego na maszynie, dopóki go nie dodasz. W międzyczasie będziesz mógł/mogła jedynie wystartować maszynę, używając wirtualnego optycznego dysku lub z sieci.</translation>
     </message>
     <message>
         <source>Bad password or authentication failure.</source>
-        <translation type="unfinished"></translation>
+        <translation>Złe hasło lub błąd uwierzytelnienia.</translation>
     </message>
     <message>
         <source><p>A critical error has occurred while running the virtual machine and the machine execution should be stopped.</p><p>For help, please see the Community section on <a href=https://www.virtualbox.org>https://www.virtualbox.org</a> or your support contract. Please provide the contents of the log file <tt>VBox.log</tt>, which you can find in the virtual machine log directory, as well as a description of what you were doing when this  [...]
-        <translation type="unfinished"></translation>
+        <translation><p>Wystąpił krytyczny błąd podczas uruchamiania maszyny wirtualnej i wykonywanie maszyny powinno zostać zatrzymane</p><p>W celu uzyskania pomocy, proszę sprawdzić dział Community na <a href=https://www.virtualbox.org>https://www.virtualbox.org</a> lub twojej umowie wsparcia. Prosze dostarczyć zawartośc pliku log<tt>VBox.log</tt>, który można znaleźć w ścieżce log wirtualnej maszyny, jak również opis tego, co robiiłeś(aś), gdy [...]
     </message>
     <message>
         <source><p>The virtual machine window will be now switched to <b>full-screen</b> mode. You can go back to windowed mode at any time by pressing <b>%1</b>.</p><p>Note that the <i>Host</i> key is currently defined as <b>%2</b>.</p><p>Note that the main menu bar is hidden in full-screen mode. You can access it by pressing <b>Host+Home</b>.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Okno wirtualnej maszyny zostanie teraz przełączone w tryb <b>pełnego ekranu</b>. Możesz potem w dowolnym czasie powrócić do trybu okienkowego, naciskając <b>%1</b>.</p><p>Należy mieć na uwadze to, że klawisz <i>Host</i> jest aktualnie zdefiniowany jako <b>%2</b>.</p><p>Należy też pamiętać o tym, że pasek głównego menu jest ukryty w trybie pełnoekranowym. Możesz uzyskać do niego dostęp, n [...]
     </message>
     <message>
         <source><p>Could not switch the guest display to full-screen mode due to insufficient guest video memory.</p><p>You should configure the virtual machine to have at least <b>%1</b> of video memory.</p><p>Press <b>Ignore</b> to switch to full-screen mode anyway or press <b>Cancel</b> to cancel the operation.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Nie udało się przełączyć ekranu gościa do trybu pełnokranowego z powodu niewystarczającej ilości pamięci wideo.</p><p>Należy skonfigurować maszynę wirtualną tak, aby miała przynajmniej <b>%1</b> pamięci wideo.</p><p>Proszę wcisnąć <b>Ignoruj</b>, aby mimo to przełączyć do trybu pełnoekranowego lub <b>Anuluj</b>, aby anulować tę operację.</p></translation>
     </message>
     <message>
         <source>Failed to connect the network adapter cable of the virtual machine <b>%1</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Niepowiodło się podłączenie kabla karty sieciowej maszyny wirtualnej <b>%1</b>.</translation>
     </message>
     <message>
         <source>Failed to disconnect the network adapter cable of the virtual machine <b>%1</b>.</source>
-        <translation type="unfinished"></translation>
+        <translation>Niepowiodło się odłączenie kabla karty sieciowej maszyny wirtualnej <b>%1</b>.</translation>
     </message>
     <message>
         <source><p>Could not insert the <b>VirtualBox Guest Additions</b> disk image file into the virtual machine <b>%1</b>, as the machine has no optical drives. Please add a drive using the storage page of the virtual machine settings window.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Nie można zamontować pliku obrazu dysku <b>Dodatków gościa VirtualBox</b>w maszynie wirtualnej  <b>%1</b>, z powodu tego, że maszyna nie posiada optycznych napędów. Dodaj napęd, używając karty pamięć okna ustawień wirtualnej maszyny.</p></translation>
     </message>
     <message>
         <source><p>The <b>VirtualBox Guest Additions</b> disk image file has been successfully downloaded from <nobr><a href="%1">%1</a></nobr> and saved locally as <nobr><b>%2</b>.</nobr></p><p>Do you wish to register this disk image file and insert it into the virtual optical drive?</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Plik obrazu dysku<b>Dodatki gościa VirtualBox</b> został pomyślnie pobrany z <nobr><a href="%1">%1</a></nobr> i zapisany lokalnie jako <nobr><b>%2</b>.</nobr></p><p>Czy chcesz zarejestrować ten plik dysku i zamontować go w wirtualnym dysku optycznym?</p></translation>
     </message>
     <message>
         <source>Drag and drop operation from host to guest failed.</source>
-        <translation type="unfinished"></translation>
+        <translation>Operacja przeciągnij i upuść z gospodarza do gościa nie powiodła się.</translation>
     </message>
     <message>
         <source>Unable to cancel host to guest drag and drop operation.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie można anulować operacji przeciągnij i upuść z gospodarza do gościa.</translation>
     </message>
     <message>
         <source>Drag and drop operation from guest to host failed.</source>
-        <translation type="unfinished"></translation>
+        <translation>Operacja przeciągnij i upuść z gościa do gospodarza nie powiodła się.</translation>
     </message>
     <message>
         <source>Encryption password for <nobr>ID = '%1'</nobr> is invalid.</source>
-        <translation type="unfinished"></translation>
+        <translation>Hasło szyfrowania dla <nobr>ID = '%1'</nobr> jest nieprawidłowe.</translation>
     </message>
     <message>
         <source>The current port forwarding rules are not valid. All of the host or guest address values should be correct or empty.</source>
-        <translation type="unfinished"></translation>
+        <translation>Obecne reguły przekierowania portów nie są poprawne. Wszystkie wartości adresów gospodarza lub gościa  powinny być poprawne lub puste.</translation>
     </message>
     <message>
         <source>The current port forwarding rules are not valid. None of the guest address values may be empty.</source>
-        <translation type="unfinished"></translation>
+        <translation>Obecne reguły przekierowania portów nie są poprawne. Żadne z wartości adresów gościa nie mogą być puste.</translation>
     </message>
     <message>
         <source><p>Failed to acquire the VirtualBox COM object.</p><p>The application will now terminate.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Nie powiodło się otrzymanie obiektu VirtualBox COM.</p><p>Aplikacja zostanie teraz zakończona.</p></translation>
     </message>
 </context>
 <context>
@@ -9746,19 +9787,19 @@ p, li { white-space: pre-wrap; }
     <name>UIMiniToolBar</name>
     <message>
         <source>Always show the toolbar</source>
-        <translation type="unfinished">Zawsze pokazuj pasek narzędzi</translation>
+        <translation>Zawsze pokazuj pasek narzędzi</translation>
     </message>
     <message>
         <source>Minimize Window</source>
-        <translation type="unfinished"></translation>
+        <translation>Minimalizuj okno</translation>
     </message>
     <message>
         <source>Exit Full Screen or Seamless Mode</source>
-        <translation type="unfinished">Zakończ tryb pełnoekranowy lub zintegrowany</translation>
+        <translation>Zakończ tryb pełnoekranowy lub Seamless</translation>
     </message>
     <message>
         <source>Close VM</source>
-        <translation type="unfinished">Zamknij maszynę wirtualną</translation>
+        <translation>Zamknij maszynę wirtualną</translation>
     </message>
 </context>
 <context>
@@ -9780,153 +9821,153 @@ p, li { white-space: pre-wrap; }
     </message>
     <message>
         <source>Holds the name of the virtual machine.</source>
-        <translation type="unfinished">Zawiera nazwę maszyny wirtualnej.</translation>
+        <translation>Przechowuje nazwę maszyny wirtualnej.</translation>
     </message>
     <message>
         <source>&Type:</source>
-        <translation type="unfinished">&Typ:</translation>
+        <translation>&Typ:</translation>
     </message>
     <message>
         <source>Selects the operating system family that you plan to install into this virtual machine.</source>
-        <translation type="unfinished">Zawiera rodzinę systemu operacyjnego, którego instalacja jest planowana na tej maszynie.</translation>
+        <translation>Przechowuje rodzinę systemu operacyjnego, którego instalacja jest planowana na tej maszynie.</translation>
     </message>
     <message>
         <source>&Version:</source>
-        <translation type="unfinished">&Wersja:</translation>
+        <translation>&Wersja:</translation>
     </message>
     <message>
         <source>Selects the operating system type that you plan to install into this virtual machine (called a guest operating system).</source>
-        <translation type="unfinished"></translation>
+        <translation>Przechowuje typ systemu operacyjnego, którego instalacja jest planowana na tej maszynie (nazywanego goszczonym systemem operacyjnym).</translation>
     </message>
     <message>
         <source>N&ame:</source>
-        <translation type="unfinished"></translation>
+        <translation>&Nazwa</translation>
     </message>
     <message>
         <source>Holds the location of the virtual machine.</source>
-        <translation type="unfinished"></translation>
+        <translation>Przechowuje lokalizację maszyny wirtualnej.</translation>
     </message>
 </context>
 <context>
     <name>UINetworkManagerDialog</name>
     <message>
         <source>Network Operations Manager</source>
-        <translation type="unfinished"></translation>
+        <translation>Menedźer operacji sieciowych</translation>
     </message>
     <message>
         <source>There are no active network operations.</source>
-        <translation type="unfinished"></translation>
+        <translation>Brak aktywnych operacji sieciowych.</translation>
     </message>
     <message>
         <source>&Cancel All</source>
-        <translation type="unfinished"></translation>
+        <translation>&Anuluj wszystko</translation>
     </message>
     <message>
         <source>Cancel all active network operations</source>
-        <translation type="unfinished"></translation>
+        <translation>Anuluj wszystkie operacje sieciowe</translation>
     </message>
     <message>
         <source>Network Operation</source>
-        <translation type="unfinished"></translation>
+        <translation>Operacja sieciowa</translation>
     </message>
     <message>
         <source>Restart network operation</source>
-        <translation type="unfinished"></translation>
+        <translation>Restartuj operację sieciową</translation>
     </message>
     <message>
         <source>Cancel network operation</source>
-        <translation type="unfinished"></translation>
+        <translation>Anuluj operację sieciową</translation>
     </message>
     <message>
         <source>The network operation failed with the following error: %1.</source>
-        <translation type="unfinished"></translation>
+        <translation>Operacja sieciowa nie powiodła się z powodu następującego błędu: %1.</translation>
     </message>
 </context>
 <context>
     <name>UINetworkManagerIndicator</name>
     <message>
         <source>Current network operations:</source>
-        <translation type="unfinished"></translation>
+        <translation>Aktualne operacje sieciowe:</translation>
     </message>
     <message>
         <source>failed</source>
         <comment>network operation</comment>
-        <translation type="unfinished"></translation>
+        <translation>niepowodzenie</translation>
     </message>
     <message>
         <source>(%1 of %2)</source>
-        <translation type="unfinished"></translation>
+        <translation>(%1 z %2)</translation>
     </message>
     <message>
         <source>Double-click for more information.</source>
-        <translation type="unfinished"></translation>
+        <translation>Kliknij dwukrotnie, by uzyskać więcej informacji.</translation>
     </message>
 </context>
 <context>
     <name>UINetworkReplyPrivate</name>
     <message>
         <source>Host not found</source>
-        <translation type="unfinished"></translation>
+        <translation>Host nieznaleziony</translation>
     </message>
     <message>
         <source>Content access denied</source>
-        <translation type="unfinished"></translation>
+        <translation>Odmowa dostępu do treści</translation>
     </message>
     <message>
         <source>Protocol failure</source>
-        <translation type="unfinished"></translation>
+        <translation>Niepowodzenie protokołu</translation>
     </message>
     <message>
         <source>Wrong SSL certificate format</source>
-        <translation type="unfinished"></translation>
+        <translation>Niewłaściwy format certyfikatu SSL</translation>
     </message>
     <message>
         <source>SSL authentication failed</source>
-        <translation type="unfinished"></translation>
+        <translation>Uwierzytelnianie SSL nie powiodło się</translation>
     </message>
     <message>
         <source>Unknown reason</source>
-        <translation type="unfinished"></translation>
+        <translation>Nieznana przyczyna</translation>
     </message>
     <message>
         <source>%1: %2</source>
         <comment>Context description: Error description</comment>
-        <translation type="unfinished"></translation>
+        <translation>%1: %2</translation>
     </message>
     <message>
         <source>Unable to initialize HTTP library</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie można zainicjować biblioteki HTTP</translation>
     </message>
     <message>
         <source>Connection refused</source>
-        <translation type="unfinished"></translation>
+        <translation>Połączenie odrzucone</translation>
     </message>
     <message>
         <source>Content moved</source>
-        <translation type="unfinished"></translation>
+        <translation>Zawartość przeniesiona</translation>
     </message>
     <message>
         <source>Proxy not found</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie znaleziono proxy</translation>
     </message>
     <message>
         <source>Url not found on the server</source>
-        <translation type="unfinished"></translation>
+        <translation>Nie znaleziono adresu URL na serwerze</translation>
     </message>
 </context>
 <context>
     <name>UINetworkReplyPrivateThread</name>
     <message>
         <source>During proxy configuration</source>
-        <translation type="unfinished"></translation>
+        <translation>Podczas konfiguracji proxy</translation>
     </message>
     <message>
         <source>During certificate downloading</source>
-        <translation type="unfinished"></translation>
+        <translation>Podczas pobierania certyfikatu</translation>
     </message>
     <message>
         <source>During network request</source>
-        <translation type="unfinished"></translation>
+        <translation>Podczas żądań sieci</translation>
     </message>
 </context>
 <context>
@@ -10419,7 +10460,7 @@ pominąć ten krok i podłączyć dyski później, korzystając z okna Ustawień
     </message>
     <message>
         <source><tr><td>Name:</td><td>%1</td></tr><tr><td>OS Type:</td><td>%2</td></tr><tr><td>Base Memory:</td><td>%3&nbsp;MB</td></tr></source>
-        <translation type="obsolete"><tr><td>Nazwa:</td><td>%1</td></tr><tr><td>Typ systemu:</td><td>%2</td></tr><tr><td>Pamięć podstawowa:</td><td>%3&nbsp;MB</td></tr></translation>
+        <translation type="obsolete"><tr><td>Nazwa:</td><td>%1</td></tr><tr><td>Typ systemu:</td><td>%2</td></tr><tr><td>RAM:</td><td>%3&nbsp;MB</td></tr></translation>
     </message>
     <message>
         <source><tr><td>Start-up Disk:</td><td>%4</td></tr></source>
@@ -10489,7 +10530,7 @@ Będzie ona używana przez wszystkie moduły VirtualBox, aby móc rozróżnić t
     <message>
         <source>Base Memory</source>
         <comment>summary</comment>
-        <translation type="obsolete">Pamięć podstawowa</translation>
+        <translation type="obsolete">RAM</translation>
     </message>
     <message>
         <source>Start-up Disk</source>
@@ -10629,7 +10670,7 @@ Będzie ona używana przez wszystkie moduły VirtualBox, aby móc rozróżnić t
     <message>
         <source>Base Memory</source>
         <comment>summary</comment>
-        <translation type="obsolete">Pamięć podstawowa</translation>
+        <translation type="obsolete">RAM</translation>
     </message>
     <message>
         <source>MB</source>
@@ -10650,7 +10691,7 @@ Będzie ona używana przez wszystkie moduły VirtualBox, aby móc rozróżnić t
     <name>UIPopupCenter</name>
     <message>
         <source>Click for full details</source>
-        <translation type="unfinished"></translation>
+        <translation>Kliknij, by zobaczyć więcej szczegółów</translation>
     </message>
 </context>
 <context>
@@ -10664,55 +10705,55 @@ Będzie ona używana przez wszystkie moduły VirtualBox, aby móc rozróżnić t
     <name>UIPortForwardingTable</name>
     <message>
         <source>Name</source>
-        <translation type="unfinished">Nazwa</translation>
+        <translation>Nazwa</translation>
     </message>
     <message>
         <source>Protocol</source>
-        <translation type="unfinished"></translation>
+        <translation>Protokół</translation>
     </message>
     <message>
         <source>Host IP</source>
-        <translation type="unfinished"></translation>
+        <translation>IP hosta</translation>
     </message>
     <message>
         <source>Host Port</source>
-        <translation type="unfinished"></translation>
+        <translation>Port hosta</translation>
     </message>
     <message>
         <source>Guest IP</source>
-        <translation type="unfinished"></translation>
+        <translation>IP gościa</translation>
     </message>
     <message>
         <source>Guest Port</source>
-        <translation type="unfinished"></translation>
+        <translation>Port gościa</translation>
     </message>
     <message>
         <source>Contains a list of port forwarding rules.</source>
-        <translation type="unfinished"></translation>
+        <translation>Zawiera listę reguł przekierowania portu.</translation>
     </message>
     <message>
         <source>Add New Rule</source>
-        <translation type="unfinished"></translation>
+        <translation>Dodaj nową regułę</translation>
     </message>
     <message>
         <source>Copy Selected Rule</source>
-        <translation type="unfinished"></translation>
+        <translation>Skopiuj wybraną regułę</translation>
     </message>
     <message>
         <source>Remove Selected Rule</source>
-        <translation type="unfinished"></translation>
+        <translation>Zmień nazwę wybranej reguły</translation>
     </message>
     <message>
         <source>Adds new port forwarding rule.</source>
-        <translation type="unfinished"></translation>
+        <translation>Dodaje nową regułę przekierowania portu</translation>
     </message>
     <message>
         <source>Copies selected port forwarding rule.</source>
-        <translation type="unfinished"></translation>
+        <translation>Kopiuje wybraną regułę przekierowania portu</translation>
     </message>
     <message>
         <source>Removes selected port forwarding rule.</source>
-        <translation type="unfinished"></translation>
+        <translation>Usuwa wybraną regułę przekierowania portu.</translation>
     </message>
 </context>
 <context>
@@ -10748,42 +10789,42 @@ Będzie ona używana przez wszystkie moduły VirtualBox, aby móc rozróżnić t
     <name>UISelectorWindow</name>
     <message>
         <source>Show Toolbar</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyświetl pasek narzędzi</translation>
     </message>
     <message>
         <source>Show Statusbar</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyświetl pasek stanu</translation>
     </message>
     <message>
         <source>Select a virtual machine file</source>
-        <translation type="unfinished"></translation>
+        <translation>Wybierz plik wirtualnej maszyny</translation>
     </message>
     <message>
         <source>Virtual machine files (%1)</source>
-        <translation type="unfinished"></translation>
+        <translation>Pliki z wirtualną maszyną (%1)</translation>
     </message>
     <message>
         <source><h3>Welcome to VirtualBox!</h3><p>The left part of this window is  a list of all virtual machines on your computer. The list is empty now because you haven't created any virtual machines yet.<img src=:/welcome.png align=right/></p><p>In order to create a new virtual machine, press the <b>New</b> button in the main tool bar located at the top of the window.</p><p>You can press the <b>%1</b> key to [...]
-        <translation type="unfinished"><h3>Witamy w VirtualBox!</h3><p>Lewa część tego okna przeznaczona jest do wyświetlania listy maszyn wirtualnych dostępnych na tym komputerze. Lista jest teraz pusta, ponieważ nie utworzono jeszcze żadnej maszyny.<img src=:/welcome.png align=right/></p><p>Aby utworzyć nową wirtualną maszynę, proszę wcisnąć przycisk <b>Nowa</b> na głównym pasku narzędziowym, umieszczonym na górze okna.</p><p> [...]
+        <translation><h3>Witamy w VirtualBox!</h3><p>Lewa część tego okna przeznaczona jest do wyświetlania listy maszyn wirtualnych dostępnych na twoim komputerze. Lista jest teraz pusta, ponieważ nie utworzyłeś jeszcze żadnej maszyny.<img src=:/welcome.png align=right/></p><p>Aby utworzyć nową wirtualną maszynę, proszę wcisnąć przycisk <b>Nowa</b> na głównym pasku narzędziowym, umieszczonym na górze okna.</p><p>Można także wci [...]
     </message>
     <message>
         <source>Manager</source>
         <comment>Note: main window title which is pretended by the product name.</comment>
-        <translation type="unfinished"></translation>
+        <translation>Menedżer</translation>
     </message>
 </context>
 <context>
     <name>UISession</name>
     <message>
         <source>Updating Guest Additions</source>
-        <translation type="unfinished"></translation>
+        <translation>Aktualizowanie dodatków gościa</translation>
     </message>
 </context>
 <context>
     <name>UISettingsDialog</name>
     <message>
         <source><i>Select a settings category from the list on the left-hand side and move the mouse over a settings item to get more information.</i></source>
-        <translation type="unfinished"></translation>
+        <translation><i>Proszę wybrać kategorię ustawień z listy po lewej i przesunąć kursor myszy nad wybraną pozycję, aby uzyskać więcej informacji<i>.</translation>
     </message>
     <message>
         <source>On the <b>%1</b> page, %2</source>
@@ -10791,7 +10832,7 @@ Będzie ona używana przez wszystkie moduły VirtualBox, aby móc rozróżnić t
     </message>
     <message>
         <source>Invalid settings detected</source>
-        <translation type="unfinished"></translation>
+        <translation>Wykryto nieprawidłowe ustawienia</translation>
     </message>
     <message>
         <source>Non-optimal settings detected</source>
@@ -10803,30 +10844,30 @@ Będzie ona używana przez wszystkie moduły VirtualBox, aby móc rozróżnić t
     </message>
     <message>
         <source><b>%1</b> page:</source>
-        <translation type="unfinished"></translation>
+        <translation><b>%1</b> strona:</translation>
     </message>
     <message>
         <source><b>%1: %2</b> page:</source>
-        <translation type="unfinished"></translation>
+        <translation><b>%1: %2</b> strona:</translation>
     </message>
 </context>
 <context>
     <name>UISettingsDialogGlobal</name>
     <message>
         <source>General</source>
-        <translation type="unfinished">Ogólne</translation>
+        <translation>Ogólne</translation>
     </message>
     <message>
         <source>Input</source>
-        <translation type="unfinished">Wejście</translation>
+        <translation>Wejście</translation>
     </message>
     <message>
         <source>Update</source>
-        <translation type="unfinished">Aktualizacje</translation>
+        <translation>Aktualizacja</translation>
     </message>
     <message>
         <source>Language</source>
-        <translation type="unfinished">Język</translation>
+        <translation>Język</translation>
     </message>
     <message>
         <source>USB</source>
@@ -10834,78 +10875,78 @@ Będzie ona używana przez wszystkie moduły VirtualBox, aby móc rozróżnić t
     </message>
     <message>
         <source>Network</source>
-        <translation type="unfinished">Sieć</translation>
+        <translation>Sieć</translation>
     </message>
     <message>
         <source>Extensions</source>
-        <translation type="unfinished"></translation>
+        <translation>Rozszerzenia</translation>
     </message>
     <message>
         <source>VirtualBox - %1</source>
-        <translation type="unfinished">VirtualBox - %1</translation>
+        <translation>VirtualBox - %1</translation>
     </message>
     <message>
         <source>Proxy</source>
-        <translation type="unfinished"></translation>
+        <translation>Proxy</translation>
     </message>
     <message>
         <source>Display</source>
-        <translation type="unfinished">Ekran</translation>
+        <translation>Ekran</translation>
     </message>
     <message>
         <source>Preferences</source>
-        <translation type="unfinished"></translation>
+        <translation>Ustawienia</translation>
     </message>
 </context>
 <context>
     <name>UISettingsDialogMachine</name>
     <message>
         <source>General</source>
-        <translation type="unfinished">Ogólne</translation>
+        <translation>Ogólne</translation>
     </message>
     <message>
         <source>System</source>
-        <translation type="unfinished">System</translation>
+        <translation>System</translation>
     </message>
     <message>
         <source>Display</source>
-        <translation type="unfinished">Ekran</translation>
+        <translation>Ekran</translation>
     </message>
     <message>
         <source>Storage</source>
-        <translation type="unfinished">Nośniki</translation>
+        <translation>Pamięć</translation>
     </message>
     <message>
         <source>Audio</source>
-        <translation type="unfinished">Dźwięk</translation>
+        <translation>Dźwięk</translation>
     </message>
     <message>
         <source>Network</source>
-        <translation type="unfinished">Sieć</translation>
+        <translation>Sieć</translation>
     </message>
     <message>
         <source>Ports</source>
-        <translation type="unfinished">Porty</translation>
+        <translation>Porty</translation>
     </message>
     <message>
         <source>Serial Ports</source>
-        <translation type="unfinished">Porty szeregowe</translation>
+        <translation>Porty szeregowe</translation>
     </message>
     <message>
         <source>Parallel Ports</source>
-        <translation type="unfinished">Porty równoległe</translation>
+        <translation>Porty równoległe</translation>
     </message>
     <message>
         <source>USB</source>
-        <translation type="unfinished">USB</translation>
+        <translation>USB</translation>
     </message>
     <message>
         <source>Shared Folders</source>
-        <translation type="unfinished">Współdzielone katalogi</translation>
+        <translation>Udostępniane foldery</translation>
     </message>
     <message>
         <source>%1 - %2</source>
-        <translation type="unfinished">%1 - %2</translation>
+        <translation>%1 - %2</translation>
     </message>
     <message>
         <source>you have selected a 64-bit guest OS type for this VM. As such guests require hardware virtualization (VT-x/AMD-V), this feature will be enabled automatically.</source>
@@ -10921,37 +10962,37 @@ Będzie ona używana przez wszystkie moduły VirtualBox, aby móc rozróżnić t
     </message>
     <message>
         <source>User Interface</source>
-        <translation type="unfinished"></translation>
+        <translation>Interfejs użytkownika</translation>
     </message>
     <message>
         <source>Settings</source>
-        <translation type="unfinished">Ustawienia</translation>
+        <translation>Ustawienia</translation>
     </message>
 </context>
 <context>
     <name>UISettingsSerializerProgress</name>
     <message>
         <source>Loading Settings...</source>
-        <translation type="unfinished"></translation>
+        <translation>Ładowanie ustawień...</translation>
     </message>
     <message>
         <source>Saving Settings...</source>
-        <translation type="unfinished"></translation>
+        <translation>Zapisywanie ustawień...</translation>
     </message>
 </context>
 <context>
     <name>UIStatusBarEditorWidget</name>
     <message>
         <source><nobr><b>Click</b> to toggle indicator presence.</nobr><br><nobr><b>Drag&Drop</b> to change indicator position.</nobr></source>
-        <translation type="unfinished"></translation>
+        <translation><nobr><b>Kliknij</b>, by przełączyć obecność wskaźnika.</nobr><br><nobr><b>Przeciągnij i upuść</b> , by zmienić pozycję wskaźnika.</nobr></translation>
     </message>
     <message>
         <source>Close</source>
-        <translation type="unfinished">Zamknij</translation>
+        <translation>Zamknij</translation>
     </message>
     <message>
         <source>Enable Status Bar</source>
-        <translation type="unfinished"></translation>
+        <translation>Włącz wyświetlanie paska stanu</translation>
     </message>
 </context>
 <context>
@@ -11072,186 +11113,186 @@ Będzie ona używana przez wszystkie moduły VirtualBox, aby móc rozróżnić t
     <name>UIUpdateStepVirtualBox</name>
     <message>
         <source>Checking for a new VirtualBox version...</source>
-        <translation type="unfinished"></translation>
+        <translation>Szukanie nowej wersji VirtualBoxa...</translation>
     </message>
 </context>
 <context>
     <name>UIVMCloseDialog</name>
     <message>
         <source>Close Virtual Machine</source>
-        <translation type="unfinished">Zamykanie maszyny wirtualnej</translation>
+        <translation>Zamknij maszynę wirtualną</translation>
     </message>
     <message>
         <source>You want to:</source>
-        <translation type="unfinished">Sposób zamknięcia:</translation>
+        <translation>Sposób zamknięcia:</translation>
     </message>
     <message>
         <source><p>Saves the current execution state of the virtual machine to the physical hard disk of the host PC.</p><p>Next time this machine is started, it will be restored from the saved state and continue execution from the same place you saved it at, which will let you continue your work immediately.</p><p>Note that saving the machine state may take a long time, depending on the guest operating system type and the amount of memory you assigned to th [...]
-        <translation type="unfinished"><p>Zapisuje bieżący stan maszyny wirtualnej na fizycznym dysku gospodarza.</p><p>Przy następnym uruchomieniu maszyny jej stan zostanie odtworzony z poprzednio zapisanego stanu. Maszyna będzie wznowiona od tego samego miejsca, w którym został zapisany jej stan, dzięki czemu można natychmiast kontynuować pracę.</p><p>Uwaga: zapisywanie stanu maszyny może trwać dośc długo, w zależności od typu goszczonego systemu operacyjn [...]
+        <translation><p>Zapisuje bieżący stan maszyny wirtualnej na fizycznym dysku komputera gospodarza.</p><p>Przy następnym uruchomieniu maszyny jej stan zostanie odtworzony z poprzednio zapisanego stanu. Maszyna będzie wznowiona od tego samego miejsca, w którym został zapisany jej stan, dzięki czemu można natychmiast kontynuować pracę.</p><p>Uwaga: zapisywanie stanu maszyny może trwać dość długo, w zależności od typu goszczonego systemu operacyjnego i il [...]
     </message>
     <message>
         <source>&Save the machine state</source>
-        <translation type="unfinished">&Zapisanie stanu maszyny</translation>
+        <translation>&Zapisz stan maszyny</translation>
     </message>
     <message>
         <source><p>Sends the ACPI Power Button press event to the virtual machine.</p><p>Normally, the guest operating system running inside the virtual machine will detect this event and perform a clean shutdown procedure. This is a recommended way to turn off the virtual machine because all applications running inside it will get a chance to save their data and state.</p><p>If the machine doesn't respond to this action then the guest operating system  [...]
-        <translation type="unfinished"><p>Wysyła sygnał przycisku zasilania ACPI do maszyny wirtualnej.</p><p>Goszczony system operacyjny uruchomiony wewnątrz maszyny wirtualnej zazwyczaj powinien rozpoznać ten sygnał i automatycznie przeprowadzić bezpieczną procedurę zamknięcia. Jest to rekomendowany sposób wyłączenia maszyny, ponieważ wszystkie aplikacje uruchomione w maszynie będą mogły przed zamknięciem systemu zapisać swój stan i dane użytkownika.</p><p&gt [...]
+        <translation><p>Wysyła sygnał przycisku zasilania ACPI do maszyny wirtualnej.</p><p>Goszczony system operacyjny uruchomiony wewnątrz maszyny wirtualnej zazwyczaj powinien rozpoznać ten sygnał i automatycznie przeprowadzić bezpieczną procedurę zamknięcia. Jest to rekomendowany sposób wyłączenia maszyny, ponieważ wszystkie aplikacje uruchomione w maszynie będą mogły przed zamknięciem systemu zapisać swój stan i dane.</p><p>Jeśli maszyna nie odpowiada n [...]
     </message>
     <message>
         <source>S&end the shutdown signal</source>
-        <translation type="unfinished">Wysłanie &sygnału wyłączenia</translation>
+        <translation>Wysłanie &sygnału wyłączenia</translation>
     </message>
     <message>
         <source><p>Turns off the virtual machine.</p><p>Note that this action will stop machine execution immediately so that the guest operating system running inside it will not be able to perform a clean shutdown procedure which may result in <i>data loss</i> inside the virtual machine. Selecting this action is recommended only if the virtual machine does not respond to the <b>Send the shutdown signal</b> action.</p></source>
-        <translation type="unfinished"><p>Wyłącza maszynę wirtualną.</p><p>Uwaga: spowoduje to natychmiastowe zakończenie pracy maszyny wirtualnej w taki sposób, że uruchomiony w niej goszczony system operacyjny nie będzie mógł przeprowadzić procedury bezpiecznego zamknięcia, co może doprowadzić do <i>utraty danych</i> w maszynie. Zamykanie w ten sposób jest zalecane tylko jeśli maszyna wirtualna nie odpowiada na <b>Wysłanie sygnału wyłączenia</b&gt [...]
+        <translation><p>Wyłącza maszynę wirtualną.</p><p>Uwaga: spowoduje to natychmiastowe zakończenie pracy maszyny wirtualnej natychmiastowo, więc uruchomiony w niej goszczony system operacyjny nie będzie mógł przeprowadzić procedury bezpiecznego zamknięcia, co może doprowadzić do <i>utraty danych</i> w maszynie. Zamykanie w ten sposób jest zalecane tylko jeśli maszyna wirtualna nie odpowiada na <b>Wysłanie sygnału wyłączenia</b>.</p></t [...]
     </message>
     <message>
         <source>&Power off the machine</source>
-        <translation type="unfinished">&Wyłączenie maszyny</translation>
+        <translation>&Wyłączenie maszyny</translation>
     </message>
     <message>
         <source>Restore the machine state stored in the current snapshot</source>
-        <translation type="unfinished">Przywraca stan maszyny do stanu zapisanego w aktualnej migawce</translation>
+        <translation>Przywraca stan maszyny do stanu przechowywanego w aktualnej migawce</translation>
     </message>
     <message>
         <source><p>When checked, the machine will be returned to the state stored in the current snapshot after it is turned off. This is useful if you are sure that you want to discard the results of your last sessions and start again at that snapshot.</p></source>
-        <translation type="unfinished"><p>Zaznaczenie tej opcji powoduje, że zaraz po wyłączeniu maszyny jej stan zostanie przywrócony do stanu zapisanego w aktualnej migawce. Jest to przydatne, jeśli na pewno chce się porzucić efekty swojej pracy lub zmian i powrócić do aktualnej migawki.</p></translation>
+        <translation><p>Zaznaczenie tej opcji powoduje, że zaraz po wyłączeniu maszyny, jej stan zostanie przywrócony do stanu zapisanego w aktualnej migawce. Jest to przydatne, jeśli na pewno chce się porzucić efekty swojej ostatniej sesji i zacząć ponownie w migawce.</p></translation>
     </message>
     <message>
         <source>&Restore current snapshot '%1'</source>
-        <translation type="unfinished">&Przywróć aktualną migawkę '%1'</translation>
+        <translation>&Przywróć aktualną migawkę '%1'</translation>
     </message>
     <message>
         <source>&Continue running in the background</source>
-        <translation type="unfinished"></translation>
+        <translation>&Kontynuuj uruchamianie w tle</translation>
     </message>
     <message>
         <source><p>Close the virtual machine windows but keep the virtual machine running.</p><p>You can use the VirtualBox Manager to return to running the virtual machine in a window.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Zamyka okno wirtualnej maszyny, ale próbuje utrzymać wirtualną maszynę uruchomioną.</p><p>Możesz skorzystać z Menedżera VirtualBox, by uruchomić maszynę wirtualną w oknie.</p></translation>
     </message>
 </context>
 <context>
     <name>UIVMDesktop</name>
     <message>
         <source>&Details</source>
-        <translation type="unfinished">&Szczegóły</translation>
+        <translation>&Szczegóły</translation>
     </message>
     <message>
         <source>&Snapshots</source>
-        <translation type="unfinished">M&igawki</translation>
+        <translation>&Migawki</translation>
     </message>
 </context>
 <context>
     <name>UIVMInfoDialog</name>
     <message>
         <source>%1 - Session Information</source>
-        <translation type="unfinished">%1 - Informacje o sesji</translation>
+        <translation>%1 - Informacje o sesji</translation>
     </message>
     <message>
         <source>Configuration &Details</source>
-        <translation type="unfinished"></translation>
+        <translation>Szczegóły &konfiguracji</translation>
     </message>
     <message>
         <source>&Runtime Information</source>
-        <translation type="unfinished"></translation>
+        <translation>&Informacje o czasie pracy</translation>
     </message>
     <message>
         <source>DMA Transfers</source>
-        <translation type="unfinished">Transfer DMA</translation>
+        <translation>Transfer DMA</translation>
     </message>
     <message>
         <source>PIO Transfers</source>
-        <translation type="unfinished">Transfer PIO</translation>
+        <translation>Transfer PIO</translation>
     </message>
     <message>
         <source>Data Read</source>
-        <translation type="unfinished">Dane odczytane</translation>
+        <translation>Dane odczytane</translation>
     </message>
     <message>
         <source>Data Written</source>
-        <translation type="unfinished">Dane zapisane</translation>
+        <translation>Dane zapisane</translation>
     </message>
     <message>
         <source>Data Transmitted</source>
-        <translation type="unfinished">Dane wysłane</translation>
+        <translation>Dane wysłane</translation>
     </message>
     <message>
         <source>Data Received</source>
-        <translation type="unfinished">Dane odebrane</translation>
+        <translation>Dane odebrane</translation>
     </message>
     <message>
         <source>Not Detected</source>
         <comment>guest additions</comment>
-        <translation type="unfinished">Nie wykryto</translation>
+        <translation>Nie wykryto</translation>
     </message>
     <message>
         <source>Not Detected</source>
         <comment>guest os type</comment>
-        <translation type="unfinished">Nie wykryto</translation>
+        <translation>Nie wykryto</translation>
     </message>
     <message>
         <source>Not Available</source>
         <comment>details report (VRDE server port)</comment>
-        <translation type="unfinished">Niedostępne</translation>
+        <translation>Niedostępny</translation>
     </message>
     <message>
         <source>Runtime Attributes</source>
-        <translation type="unfinished">Parametry maszyny</translation>
+        <translation>Parametry maszyny</translation>
     </message>
     <message>
         <source>Screen Resolution</source>
-        <translation type="unfinished">Rozdzielczość ekranu</translation>
+        <translation>Rozdzielczość ekranu</translation>
     </message>
     <message>
         <source>VM Uptime</source>
-        <translation type="unfinished"></translation>
+        <translation>Czas pracy wirtualnej maszyny</translation>
     </message>
     <message>
         <source>Clipboard Mode</source>
-        <translation type="unfinished"></translation>
+        <translation>Tryb schowka</translation>
     </message>
     <message>
         <source>Drag and Drop Mode</source>
-        <translation type="unfinished"></translation>
+        <translation>Tryb przeciągnij i upuść</translation>
     </message>
     <message>
         <source>Guest Additions</source>
-        <translation type="unfinished">Dodatki (Guest Additions)</translation>
+        <translation>Dodatki gościa</translation>
     </message>
     <message>
         <source>Guest OS Type</source>
-        <translation type="unfinished">Typ systemu operacyjnego gościa</translation>
+        <translation>Typ goszczonego systemu operacyjnego</translation>
     </message>
     <message>
         <source>Storage Statistics</source>
-        <translation type="unfinished">Statystyka nośników</translation>
+        <translation>Statystyka pamięci</translation>
     </message>
     <message>
         <source>No Storage Devices</source>
-        <translation type="unfinished">Brak urządzeń</translation>
+        <translation>Brak urządzeń</translation>
     </message>
     <message>
         <source>Network Statistics</source>
-        <translation type="unfinished">Statystyka sieci</translation>
+        <translation>Statystyki sieci</translation>
     </message>
     <message>
         <source>No Network Adapters</source>
-        <translation type="unfinished">Brak kart sieciowych</translation>
+        <translation>Brak kart sieciowych</translation>
     </message>
 </context>
 <context>
     <name>UIVMInformationDialog</name>
     <message>
         <source>%1 - Session Information</source>
-        <translation type="unfinished">%1 - Informacje o sesji</translation>
+        <translation>%1 - Informacje o sesji</translation>
     </message>
     <message>
         <source>Configuration &Details</source>
-        <translation type="unfinished"></translation>
+        <translation>Szczegóły &konfiguracji</translation>
     </message>
     <message>
         <source>&Runtime Information</source>
-        <translation type="unfinished"></translation>
+        <translation>&Informacje o czasie pracy</translation>
     </message>
 </context>
 <context>
@@ -11307,388 +11348,388 @@ Będzie ona używana przez wszystkie moduły VirtualBox, aby móc rozróżnić t
     <name>UIVMLogViewer</name>
     <message>
         <source>Close the search panel</source>
-        <translation type="unfinished">Zamyka panel wyszukiwania</translation>
+        <translation>Zamyka panel wyszukiwania</translation>
     </message>
     <message>
         <source>&Find</source>
-        <translation type="unfinished">&Szukaj</translation>
+        <translation>&Szukaj</translation>
     </message>
     <message>
         <source>Enter a search string here</source>
-        <translation type="unfinished">Tekst do znalezienia</translation>
+        <translation>Wprowadź tutaj szukany ciąg</translation>
     </message>
     <message>
         <source>&Previous</source>
-        <translation type="unfinished">&Poprzednie</translation>
+        <translation>&Poprzedni</translation>
     </message>
     <message>
         <source>Search for the previous occurrence of the string</source>
-        <translation type="unfinished">Szuka poprzedniego wystąpienia danego tekstu</translation>
+        <translation>Szuka poprzedniego wystąpienia danego tekstu</translation>
     </message>
     <message>
         <source>&Next</source>
-        <translation type="unfinished"></translation>
+        <translation>&Następny</translation>
     </message>
     <message>
         <source>Search for the next occurrence of the string</source>
-        <translation type="unfinished">Szuka następnego wystąpienia danego tekstu</translation>
+        <translation>Szuka następnego wystąpienia danego tekstu</translation>
     </message>
     <message>
         <source>C&ase Sensitive</source>
-        <translation type="unfinished">&Rozróżniaj wielkość liter</translation>
+        <translation>&Uwzględniaj wielkość liter</translation>
     </message>
     <message>
         <source>Perform case sensitive search (when checked)</source>
-        <translation type="unfinished">Szuka z uwzględnieniem wielkości liter (jeśli zaznaczone)</translation>
+        <translation>Szuka z uwzględnieniem wielkości liter (jeśli zaznaczone)</translation>
     </message>
     <message>
         <source>String not found</source>
-        <translation type="unfinished">Nie znaleziono</translation>
+        <translation>Nie znaleziono</translation>
     </message>
     <message>
         <source><p>No log files found. Press the <b>Refresh</b> button to rescan the log folder <nobr><b>%1</b></nobr>.</p></source>
-        <translation type="unfinished"><p>Nie znaleziono plików z logami. Proszę wcisnąć przycisk <b>Odśwież</b> aby ponownie przeszukać katalog z logami <nobr><b>%1</b></nobr>.</p></translation>
+        <translation><p>Nie znaleziono plików z logami. Proszę wcisnąć przycisk <b>Odśwież</b> aby ponownie przeszukać folder z logami <nobr><b>%1</b></nobr>.</p></translation>
     </message>
     <message>
         <source>Save VirtualBox Log As</source>
-        <translation type="unfinished">Zapisz log VirtualBox jako</translation>
+        <translation>Zapisz log VirtualBox jako</translation>
     </message>
     <message>
         <source>%1 - VirtualBox Log Viewer</source>
-        <translation type="unfinished">%1 - Przeglądarka logów VirtualBox</translation>
+        <translation>%1 - Przeglądarka logów VirtualBox</translation>
     </message>
     <message>
         <source>&Refresh</source>
-        <translation type="unfinished">&Odśwież</translation>
+        <translation>&Odśwież</translation>
     </message>
     <message>
         <source>&Save</source>
-        <translation type="unfinished">&Zapisz</translation>
+        <translation>&Zapisz</translation>
     </message>
     <message>
         <source>Close</source>
-        <translation type="unfinished">Zamknij</translation>
+        <translation>Zamknij</translation>
     </message>
     <message>
         <source>Filter</source>
-        <translation type="unfinished"></translation>
+        <translation>Filtr</translation>
     </message>
     <message>
         <source>Enter filtering string here</source>
-        <translation type="unfinished"></translation>
+        <translation>Wprowadź ciąg filtrowania tutaj</translation>
     </message>
     <message>
         <source>Fil&ter</source>
-        <translation type="unfinished"></translation>
+        <translation>Fil&tr</translation>
     </message>
 </context>
 <context>
     <name>UIWizard</name>
     <message>
         <source>&Expert Mode</source>
-        <translation type="unfinished"></translation>
+        <translation>&Tryb eksperta</translation>
     </message>
     <message>
         <source>Switch to <nobr><b>Expert Mode</b></nobr>, a one-page dialog for experienced users.</source>
-        <translation type="unfinished"></translation>
+        <translation>Przełącza do <nobr><b>trybu eksperta</b></nobr>, jednostronnego okna dialogowego dla doświadczonych użytkowników.</translation>
     </message>
     <message>
         <source>&Guided Mode</source>
-        <translation type="unfinished"></translation>
+        <translation>&Tryb przewodnika</translation>
     </message>
     <message>
         <source>Switch to <nobr><b>Guided Mode</b></nobr>, a step-by-step dialog with detailed explanations.</source>
-        <translation type="unfinished"></translation>
+        <translation>Przełącza do <nobr><b>trybu przewodnika</b></nobr>, okna dialogowego ze szczegółowymi wyjaśnieniami krok po kroku.</translation>
     </message>
 </context>
 <context>
     <name>UIWizardCloneVD</name>
     <message>
         <source>Copy</source>
-        <translation type="unfinished"></translation>
+        <translation>Kopiuj</translation>
     </message>
     <message>
         <source>&Dynamically allocated</source>
-        <translation type="unfinished"></translation>
+        <translation>&Dynamicznie przydzielany</translation>
     </message>
     <message>
         <source>&Fixed size</source>
-        <translation type="unfinished"></translation>
+        <translation>&Stały rozmiar</translation>
     </message>
     <message>
         <source>&Split into files of less than 2GB</source>
-        <translation type="unfinished"></translation>
+        <translation>&Podziel na pliki ważące mniej niż 2 GB</translation>
     </message>
     <message>
         <source>%1_copy</source>
         <comment>copied virtual hard drive name</comment>
-        <translation type="unfinished"></translation>
+        <translation>%1_kopia</translation>
     </message>
     <message>
         <source>Copy Virtual Hard Disk</source>
-        <translation type="unfinished"></translation>
+        <translation>Skopiuj wirtualny twardy dysk</translation>
     </message>
     <message>
         <source>Hard disk to copy</source>
-        <translation type="unfinished"></translation>
+        <translation>Dysk twardy do skopiowania</translation>
     </message>
     <message>
         <source><p>Please select the virtual hard disk file that you would like to copy if it is not already selected. You can either choose one from the list or use the folder icon beside the list to select one.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Wybierz plik wirtualnego dysku twardego, który chcesz skopiować jeśli nie jest już wybrany. Możesz też wybrać jeden z listy lub użyć ikonę folderu obok listy, aby wybrać jeden.</p></translation>
     </message>
     <message>
         <source>Choose a virtual hard disk file to copy...</source>
-        <translation type="unfinished"></translation>
+        <translation>Wybierz plik dysku wirtualnego, który chcesz skopiować</translation>
     </message>
     <message>
         <source>Hard disk file type</source>
-        <translation type="unfinished"></translation>
+        <translation>Typ pliku z wirtualnym dyskiem</translation>
     </message>
     <message>
         <source>Please choose the type of file that you would like to use for the new virtual hard disk. If you do not need to use it with other virtualization software you can leave this setting unchanged.</source>
-        <translation type="unfinished"></translation>
+        <translation>Wybierz typ pliku, którego chciałbyś użyć z nowym wirtualnym dyskiem twardym. Jeśli nie potrzebujesz użyć go z innym oprogramowaniem wirtualizacyjnym, możesz pozostawić te ustawienie niezmienione.</translation>
     </message>
     <message>
         <source>Storage on physical hard disk</source>
-        <translation type="unfinished"></translation>
+        <translation>Pamięć na fizycznym dysku twardym</translation>
     </message>
     <message>
         <source>Please choose whether the new virtual hard disk file should grow as it is used (dynamically allocated) or if it should be created at its maximum size (fixed size).</source>
-        <translation type="unfinished"></translation>
+        <translation>Wybierz czy plik nowego wirtualnego dysku powinien rosnąć wraz z użyciem (dynamicznie przydzielany) czy powinien zostać utworzony z maksymalnym rozmiarem (stały rozmiar).</translation>
     </message>
     <message>
         <source><p>A <b>dynamically allocated</b> hard disk file will only use space on your physical hard disk as it fills up (up to a maximum <b>fixed size</b>), although it will not shrink again automatically when space on it is freed.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p> <b>Dynamicznie przydzielany</b> plik twardego dysku będzie używał  jedynie miejsca na twoim fizycznym twardym dysku, jeśli się zapełni (do maksymalnego <b>stałego rozmiaru</b>), chociaż nie skurczy się automatycznie, gdy zostanie zwolnione miejsce.</p></translation>
     </message>
     <message>
         <source><p>A <b>fixed size</b> hard disk file may take longer to create on some systems but is often faster to use.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Tworzenie stałego rozmiaru pliku może trwać dłużej na niektórych systemach, ale często jest szybszy w użyciu.</p></translation>
     </message>
     <message>
         <source><p>You can also choose to <b>split</b> the hard disk file into several files of up to two gigabytes each. This is mainly useful if you wish to store the virtual machine on removable USB devices or old systems, some of which cannot handle very large files.</source>
-        <translation type="unfinished"></translation>
+        <translation><p>Mozesz również <b>podzielić</b> plik dysku twardego na kilka plików do 2 GB każdy.Jest to przede wszystkim przydatne, jeśli chcesz przechowywać maszynę wirtualną na wymiennych urządzeniach USB lub starych systemach, z których niektóre nie obsługują bardzo dużych plików.</translation>
     </message>
     <message>
         <source>Please choose a location for new virtual hard disk file</source>
-        <translation type="unfinished"></translation>
+        <translation>Wybierz lokalizację dla pliku nowego wirtualnego dysku twardego.</translation>
     </message>
     <message>
         <source>New hard disk to create</source>
-        <translation type="unfinished"></translation>
+        <translation>Nowe dyski twarde do utworzenia</translation>
     </message>
     <message>
         <source>Please type the name of the new virtual hard disk file into the box below or click on the folder icon to select a different folder to create the file in.</source>
-        <translation type="unfinished"></translation>
+        <translation>Wpisz nazwę dla pliku nowego wirtualnego dysku twardego w polu poniżej lub kliknij na ikonę folderu, by wybrać inny, aby utworzyć w nim plik.</translation>
     </message>
     <message>
         <source>Choose a location for new virtual hard disk file...</source>
-        <translation type="unfinished"></translation>
+        <translation>Wybierz lokalizację dla pliku nowego twardego dysku...</translation>
     </message>
     <message>
         <source>Hard disk to &copy</source>
-        <translation type="unfinished"></translation>
+        <translation>Dysk twardy do &skopiowania</translation>
     </message>
     <message>
         <source>&New hard disk to create</source>
-        <translation type="unfinished"></translation>
+        <translation>&Nowe dyski twarde do utworzenia</translation>
     </message>
     <message>
         <source>Hard disk file &type</source>
-        <translation type="unfinished"></translation>
+        <translation>Typ pliku z &wirtualnym dyskiem</translation>
     </message>
 </context>
 <context>
     <name>UIWizardCloneVM</name>
     <message>
         <source>Linked Base for %1 and %2</source>
-        <translation type="unfinished"></translation>
+        <translation>Powiązana baza dla %1 i %2</translation>
     </message>
     <message>
         <source>Clone Virtual Machine</source>
-        <translation type="unfinished"></translation>
+        <translation>Sklonuj maszynę wirtualną</translation>
     </message>
     <message>
         <source>Clone</source>
-        <translation type="unfinished"></translation>
+        <translation>Sklonuj</translation>
     </message>
     <message>
         <source>%1 Clone</source>
-        <translation type="unfinished"></translation>
+        <translation>Sklonuj %1</translation>
     </message>
     <message>
         <source>New machine name</source>
-        <translation type="unfinished"></translation>
+        <translation>Nowa nazwa maszyny</translation>
     </message>
     <message>
         <source><p>Please choose a name for the new virtual machine. The new machine will be a clone of the machine <b>%1</b>.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Wybierz nazwę dla nowej wirtualnej maszyny. Nowa maszyna będzie klonem maszyny <b>%1</b>.</p></translation>
     </message>
     <message>
         <source>When checked a new unique MAC address will be assigned to all configured network cards.</source>
-        <translation type="unfinished"></translation>
+        <translation>Po zaznaczeniu tej opcji, zostanie przydzielony nowy adres MAC dla wszystkich skonfigurowanych kart sieciowych.</translation>
     </message>
     <message>
         <source>&Reinitialize the MAC address of all network cards</source>
-        <translation type="unfinished"></translation>
+        <translation>&Zainicjuj ponownie adresy MAC wszystkich kart sieciowych</translation>
     </message>
     <message>
         <source>Clone type</source>
-        <translation type="unfinished"></translation>
+        <translation>Typ klona</translation>
     </message>
     <message>
         <source><p>If you create a <b>Linked clone</b> then a new snapshot will be created in the original virtual machine as part of the cloning process.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Jeśli utworzysz <b>powiązany klon</b>, to nowa migawka zostanie utworzona w oryginalnej maszynie wirtualnej jako część procesu klonowania. </p></translation>
     </message>
     <message>
         <source>&Full clone</source>
-        <translation type="unfinished"></translation>
+        <translation>&Pełny klon</translation>
     </message>
     <message>
         <source>&Linked clone</source>
-        <translation type="unfinished"></translation>
+        <translation>&Powiązany klon</translation>
     </message>
     <message>
         <source>Snapshots</source>
-        <translation type="unfinished"></translation>
+        <translation>Migawki</translation>
     </message>
     <message>
         <source><p>Please choose which parts of the snapshot tree should be cloned with the machine.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Wybierz która część drzewa migawki powinna być sklonowana z maszyną.</p></translation>
     </message>
     <message>
         <source><p>If you choose <b>Current machine state</b>, the new machine will reflect the current state of the original machine and will have no snapshots.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Jeśli wybierzesz <b>Aktualny stan maszyny</b>, to nowa maszyna będzie odzwierciedlać aktualny stan oryginalnej maszynie i nie będzie miała żadnych migawek.</p></translation>
     </message>
     <message>
         <source><p>If you choose <b>Current snapshot tree branch</b>, the new machine will reflect the current state of the original machine and will have matching snapshots for all snapshots in the tree branch starting at the current state in the original machine.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Jeśli wybierzesz <b>Aktualną gałąź drzewa migawki</b>,to nowa maszyna  będzie odzwierciedlać aktualny stan oryginalnej maszyny i będzie miała dopasowane migawki w gałęzi drzewa, począwszy od bieżącego stanu w oryginalnej maszynie.</p></translation>
     </message>
     <message>
         <source><p>If you choose <b>Everything</b>, the new machine will reflect the current state of the original machine and will have matching snapshots for all snapshots in the original machine.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Jesli wybierzesz <b>Wszystko</b>, to nowa maszyna będzie odzwierciedlać aktualny stan oryginalnej maszyny i będzie miała pasujące migawki do wszystkich w oryginalnej maszynie. </p></translation>
     </message>
     <message>
         <source>Current &machine state</source>
-        <translation type="unfinished"></translation>
+        <translation>Aktualny &stan maszyny</translation>
     </message>
     <message>
         <source>Current &snapshot tree branch</source>
-        <translation type="unfinished"></translation>
+        <translation>Aktualna &gałąź drzewa migawki</translation>
     </message>
     <message>
         <source>&Everything</source>
-        <translation type="unfinished"></translation>
+        <translation>&Wszystko</translation>
     </message>
     <message>
         <source>New machine &name</source>
-        <translation type="unfinished"></translation>
+        <translation>Nowa nazwa &maszyny</translation>
     </message>
     <message>
         <source>&Full Clone</source>
-        <translation type="unfinished"></translation>
+        <translation>&Pełny klon</translation>
     </message>
     <message>
         <source>&Linked Clone</source>
-        <translation type="unfinished"></translation>
+        <translation>&Powiązany klon</translation>
     </message>
     <message>
         <source><p>Please choose the type of clone you wish to create.</p><p>If you choose <b>Full clone</b>, an exact copy (including all virtual hard disk files) of the original virtual machine will be created.</p><p>If you choose <b>Linked clone</b>, a new machine will be created, but the virtual hard disk files will be tied to the virtual hard disk files of original machine and you will not be able to move the new virtual machine  [...]
-        <translation type="unfinished"></translation>
+        <translation><p>Wybierz typ klona, który chcesz utworzyć.</p><p>Jeśli wybierzesz <b>Pełny klon</b>, to dokładna kopia (włączając w to wszystkie pliki wirtualnego dysku twardego) oryginalnej wirtualnej maszyny zostanie utworzona. </p><p>Jesli wybierzesz <b>Powiązany klon</b>, to nowa maszyna zostanie utworzona, ale pliki wirtualnego dysku twardego zostaną dowiązane do plików wirtualnego dysku twardego oryginalnej maszyny i nie  [...]
     </message>
 </context>
 <context>
     <name>UIWizardExportApp</name>
     <message>
         <source>Checking files ...</source>
-        <translation type="unfinished">Sprawdzanie plików ...</translation>
+        <translation>Sprawdzanie plików ...</translation>
     </message>
     <message>
         <source>Removing files ...</source>
-        <translation type="unfinished">Usuwanie plików ...</translation>
+        <translation>Usuwanie plików ...</translation>
     </message>
     <message>
         <source>Exporting Appliance ...</source>
-        <translation type="unfinished">Eksport urządzenia programowego ...</translation>
+        <translation>Eksportowanie urządzenia ...</translation>
     </message>
     <message>
         <source>Export Virtual Appliance</source>
-        <translation type="unfinished"></translation>
+        <translation>Eksportuj wirtualne urządzenie</translation>
     </message>
     <message>
         <source>Restore Defaults</source>
-        <translation type="unfinished">Przywróć wartości domyślne</translation>
+        <translation>Przywróć wartości domyślne</translation>
     </message>
     <message>
         <source>Export</source>
-        <translation type="unfinished"></translation>
+        <translation>Eksportuj</translation>
     </message>
     <message>
         <source>Virtual machines to export</source>
-        <translation type="unfinished"></translation>
+        <translation>Wirtualne maszyny do eksportu</translation>
     </message>
     <message>
         <source><p>Please select the virtual machines that should be added to the appliance. You can select more than one. Please note that these machines have to be turned off before they can be exported.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Wybeirz wirtualną maszynę, która powinna zostać dodana do urządzenia. Możesz wybrać więcej niż jedną. Jednakże maszyny te należy wyłączyć, by móc je wyeksportować. </p></translation>
     </message>
     <message>
         <source>Appliance settings</source>
-        <translation type="unfinished"></translation>
+        <translation>Ustawienia urządzenia</translation>
     </message>
     <message>
         <source>Please choose where to create the virtual appliance. You can create it on your own computer, on the Sun Cloud service or on an S3 storage server.</source>
-        <translation type="unfinished"></translation>
+        <translation>Wybierz gdzie chcesz utworzyć wirtualne urządzenie. Możesz je utworzyć na swoim komputerze, w serwisie Sun Cloud lub na serwerze S3 storage.</translation>
     </message>
     <message>
         <source>Create on</source>
-        <translation type="unfinished"></translation>
+        <translation>Utwórz na</translation>
     </message>
     <message>
         <source>&This computer</source>
-        <translation type="unfinished"></translation>
+        <translation>&Tym komputerze</translation>
     </message>
     <message>
         <source>Sun &Cloud</source>
-        <translation type="unfinished">Sun &Cloud</translation>
+        <translation>Sun &Cloud</translation>
     </message>
     <message>
         <source>&Simple Storage System (S3)</source>
-        <translation type="unfinished">&Simple Storage System (S3)</translation>
+        <translation>&Simple Storage System (S3)</translation>
     </message>
     <message>
         <source>Appliance</source>
-        <translation type="unfinished">Urządzenie programowe</translation>
+        <translation>Urządzenie</translation>
     </message>
     <message>
         <source>&Username:</source>
-        <translation type="unfinished">Nazwa &użytkownika:</translation>
+        <translation>Nazwa &użytkownika:</translation>
     </message>
     <message>
         <source>&Password:</source>
-        <translation type="unfinished">&Hasło:</translation>
+        <translation>&Hasło:</translation>
     </message>
     <message>
         <source>&Hostname:</source>
-        <translation type="unfinished">Nazwa h&osta:</translation>
+        <translation>&Nazwa hosta:</translation>
     </message>
     <message>
         <source>&Bucket:</source>
-        <translation type="unfinished">&Bucket:</translation>
+        <translation>&Bucket:</translation>
     </message>
     <message>
         <source>&File:</source>
-        <translation type="unfinished">&Plik:</translation>
+        <translation>&Plik:</translation>
     </message>
     <message>
         <source>Open Virtualization Format Archive (%1)</source>
-        <translation type="unfinished"></translation>
+        <translation>Archiwum Open Virtualization Format (%1)</translation>
     </message>
     <message>
         <source>Open Virtualization Format (%1)</source>
-        <translation type="unfinished">Open Virtualization Format (%1)</translation>
+        <translation>Open Virtualization Format (%1)</translation>
     </message>
     <message>
         <source>Write in legacy OVF 0.9 format for compatibility with other virtualization products.</source>
-        <translation type="unfinished">Zapis w starszym formacie OVF 0.9 w celu zapewniwnia zgodności z innymi produktami wirtualizacyjnymi.</translation>
+        <translation>Zapis w starszym formacie OVF 0.9 w celu zapewnienia zgodności z innymi produktami wirtualizacyjnymi.</translation>
     </message>
     <message>
         <source>&Write legacy OVF 0.9</source>
@@ -11696,135 +11737,135 @@ Będzie ona używana przez wszystkie moduły VirtualBox, aby móc rozróżnić t
     </message>
     <message>
         <source>Create a Manifest file for automatic data integrity checks on import.</source>
-        <translation type="unfinished"></translation>
+        <translation>Tworzy plik manifest dla automatycznej kontroli integralności danych dotyczących importu.</translation>
     </message>
     <message>
         <source>Write &Manifest file</source>
-        <translation type="unfinished"></translation>
+        <translation>Stwórz plik &Manifest</translation>
     </message>
     <message>
         <source>This is the descriptive information which will be added to the virtual appliance.  You can change it by double clicking on individual lines.</source>
-        <translation type="unfinished"></translation>
+        <translation>To jest informacja opisowa, która zostanie dodana do wirtualnego urządzenia. Możesz ją zmienić, klikając dwukrotnie na poszczególnych liniach.</translation>
     </message>
     <message>
         <source>Virtual &machines to export</source>
-        <translation type="unfinished"></translation>
+        <translation>Wirtualne maszyny do wyeksportowania</translation>
     </message>
     <message>
         <source>Appliance &settings</source>
-        <translation type="unfinished"></translation>
+        <translation>Ustawienia &urządzenia</translation>
     </message>
     <message>
         <source>&Destination</source>
-        <translation type="unfinished"></translation>
+        <translation>&Lokalizacja</translation>
     </message>
     <message>
         <source>&Local Filesystem </source>
-        <translation type="unfinished">&Lokalny system plików </translation>
+        <translation>&Lokalny system plików </translation>
     </message>
     <message>
         <source>Storage settings</source>
-        <translation type="unfinished"></translation>
+        <translation>Ustawienia pamięci</translation>
     </message>
     <message>
         <source>Please choose a file to export the virtual appliance to</source>
-        <translation type="unfinished"></translation>
+        <translation>Wybierz plik do wyeksportowania wirtualnego urządzenia</translation>
     </message>
     <message>
         <source>F&ormat:</source>
-        <translation type="unfinished"></translation>
+        <translation>F&ormat:</translation>
     </message>
     <message>
         <source>OVF 0.9</source>
-        <translation type="unfinished"></translation>
+        <translation>OVF 0.9</translation>
     </message>
     <message>
         <source>OVF 1.0</source>
-        <translation type="unfinished"></translation>
+        <translation>OVF 1.0</translation>
     </message>
     <message>
         <source>OVF 2.0</source>
-        <translation type="unfinished"></translation>
+        <translation>OVF 2.0</translation>
     </message>
     <message>
         <source>Write in standard OVF 1.0 format.</source>
-        <translation type="unfinished"></translation>
+        <translation>Utwórz w standarowym formacie OVF 1.0.</translation>
     </message>
     <message>
         <source>Write in new experimental OVF 2.0 format.</source>
-        <translation type="unfinished"></translation>
+        <translation>Utwórz w nowym eksperymentalnym formacie OVF 2.0.</translation>
     </message>
     <message>
         <source>&Storage settings</source>
-        <translation type="unfinished"></translation>
+        <translation>&Ustawienia pamięci</translation>
     </message>
 </context>
 <context>
     <name>UIWizardExportAppPageBasic3</name>
     <message>
         <source><p>Please choose a filename to export the OVF/OVA to.</p><p>If you use an <i>ova</i> extension, then all the files will be combined into one Open Virtualization Format Archive.</p><p>If you use an <i>ovf</i> extension, several files will be written separately.</p><p>Other extensions are not allowed.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Wybierz nazwę do eksportu pliku OVF/OVA.</p><p>Jeśli wykorzystasz rozszerzenie <i>ova</i> ,to wszystkie pliki zostaną spakowane do archwium OVF.</p><p>Jeśli użyjesz rozszerzenia <i>ovf</i> , to kilka plików zostanie zapisanych osobno.</p><p>Inne rozszerzenia nie są dozwolone.</p></translation>
     </message>
     <message>
         <source>Please complete the additional fields like the username, password and the bucket, and provide a filename for the OVF target.</source>
-        <translation type="unfinished">Proszę wypełnić dodatkowe pola takie jak nazwa użytkownika, hasło i bucket, oraz podać nazwę pliku docelowego dla OVF.</translation>
+        <translation>Proszę wypełnić dodatkowe pola takie jak nazwa użytkownika, hasło i bucket, oraz podać nazwę pliku docelowego dla OVF.</translation>
     </message>
     <message>
         <source>Please complete the additional fields like the username, password, hostname and the bucket, and provide a filename for the OVF target.</source>
-        <translation type="unfinished">Proszę wypełnić dodatkowe pola takie jak nazwa użytkownika, hasło, nazwa hosta i bucket, oraz podać nazwę pliku docelowego dla OVF.</translation>
+        <translation>Proszę wypełnić dodatkowe pola takie jak nazwa użytkownika, hasło, nazwa hosta i bucket, oraz podać nazwę pliku docelowego dla OVF.</translation>
     </message>
     <message>
         <source>Choose a file to export the virtual appliance to...</source>
-        <translation type="unfinished"></translation>
+        <translation>Wybierz plik do wyeksportowania wirtualnego urządzenia...</translation>
     </message>
 </context>
 <context>
     <name>UIWizardExportAppPageExpert</name>
     <message>
         <source>Choose a file to export the virtual appliance to...</source>
-        <translation type="unfinished"></translation>
+        <translation>Wybierz plik, by wyeksportować wirtualne urządzenie...</translation>
     </message>
 </context>
 <context>
     <name>UIWizardFirstRun</name>
     <message>
         <source>Select start-up disk</source>
-        <translation type="unfinished"></translation>
+        <translation>Wybierz dysk startowy</translation>
     </message>
     <message>
         <source>Start</source>
-        <translation type="unfinished">Uruchom</translation>
+        <translation>Uruchom</translation>
     </message>
     <message>
         <source><p>Please select a virtual optical disk file or a physical optical drive containing a disk to start your new virtual machine from.</p><p>The disk should be suitable for starting a computer from and should contain the operating system you wish to install on the virtual machine if you want to do that now. The disk will be ejected from the virtual drive automatically next time you switch the virtual machine off, but you can also do this yourself if needed u [...]
-        <translation type="unfinished"></translation>
+        <translation><p>Proszę wybrać plik wirtualnego optycznego dysku lub fizyczny optyczny dysk zawierajacy dysk potrzebny do wystartowania maszyny wirtualnej.</p><p>Dysk powinien być odpowiedni do uruchomienia z niego komputera i powinien zawierać system operacyjny, który chcesz zainstalować na maszynie wirtualnej, jeśli chcesz to zrobić teraz. Dysk zostanie automatycznie wyjęty jak następnym razem wyłączysz maszynę wirtualną, ale możesz zrobić to równiez zrobić sam [...]
     </message>
     <message>
         <source><p>Please select a virtual optical disk file or a physical optical drive containing a disk to start your new virtual machine from.</p><p>The disk should be suitable for starting a computer from. As this virtual machine has no hard drive you will not be able to install an operating system on it at the moment.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Proszę wybrać plik wirtualnego optycznego dysku lub fizyczny optyczny dysk zawierajacy dysk potrzebny do wystartowania maszyny wirtualnej.</p><p>Dysk powinien być odpowiedni do uruchomienia z niego komputera. Ponieważ ta maszyna wirtualna nie posiada dysku twardego, nie będziesz mógł teraz zainstalować systemu operacyjnego.</p></translation>
     </message>
     <message>
         <source>Choose a virtual optical disk file...</source>
-        <translation type="unfinished"></translation>
+        <translation>Wybierz plik wirtualnego dysku optycznego...</translation>
     </message>
 </context>
 <context>
     <name>UIWizardImportApp</name>
     <message>
         <source>Restore Defaults</source>
-        <translation type="unfinished">Przywróć wartości domyślne</translation>
+        <translation>Przywróć wartości domyślne</translation>
     </message>
     <message>
         <source>Import</source>
-        <translation type="unfinished"></translation>
+        <translation>Importuj</translation>
     </message>
     <message>
         <source>Appliance to import</source>
-        <translation type="unfinished"></translation>
+        <translation>Urządzenie do zaimportowania</translation>
     </message>
     <message>
         <source><p>VirtualBox currently supports importing appliances saved in the Open Virtualization Format (OVF). To continue, select the file to import below.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>VirtualBox aktualnie obsługuje importowanie urządzeń zapisanych w Open Virtualization Format (OVF). Aby kontynuować, wybierz plik do zaimportowania poniżej.</p></translation>
     </message>
     <message>
         <source>Select an appliance to import</source>
@@ -11832,149 +11873,149 @@ Będzie ona używana przez wszystkie moduły VirtualBox, aby móc rozróżnić t
     </message>
     <message>
         <source>Open Virtualization Format (%1)</source>
-        <translation type="unfinished">Open Virtualization Format (%1)</translation>
+        <translation>Open Virtualization Format (%1)</translation>
     </message>
     <message>
         <source>Appliance settings</source>
-        <translation type="unfinished"></translation>
+        <translation>Ustawienia urządzenia</translation>
     </message>
     <message>
         <source>These are the virtual machines contained in the appliance and the suggested settings of the imported VirtualBox machines. You can change many of the properties shown by double-clicking on the items and disable others using the check boxes below.</source>
-        <translation type="unfinished"></translation>
+        <translation>To są maszyny wirtualne zawarte w urządzeniu, wraz z sugerowanymi ustawieniami zaimportowanych maszyn do VirtualBox. Możesz zmienić wiele przedstawionych właściwości, klikając dwukrotnie na elementach, jak również wyłączać inne za pomocą pól wyboru poniżej.</translation>
     </message>
     <message>
         <source>Import Virtual Appliance</source>
-        <translation type="unfinished"></translation>
+        <translation>Importuj wirtualne urządzenie</translation>
     </message>
     <message>
         <source>Choose a virtual appliance file to import...</source>
-        <translation type="unfinished"></translation>
+        <translation>Wybierz plik wirtualnego urządzenia do zaimportowania...</translation>
     </message>
     <message>
         <source>Please choose a virtual appliance file to import</source>
-        <translation type="unfinished"></translation>
+        <translation>Proszę wybrać plik wirtualnego urządzenia do zaimportowania</translation>
     </message>
     <message>
         <source>Appliance is not signed</source>
-        <translation type="unfinished"></translation>
+        <translation>Urządzenie nie jest podpisane</translation>
     </message>
     <message>
         <source>Appliance signed by %1 (trusted)</source>
-        <translation type="unfinished"></translation>
+        <translation>Urządzenie zostało podpisane przez %1 (zaufany)</translation>
     </message>
     <message>
         <source>Appliance signed by %1 (expired!)</source>
-        <translation type="unfinished"></translation>
+        <translation>Urządzenie zostało podpisane przez %1 (wygasł!)</translation>
     </message>
     <message>
         <source>Unverified signature by %1!</source>
-        <translation type="unfinished"></translation>
+        <translation>Niezweryfikowany podpis przez %1!</translation>
     </message>
     <message>
         <source>Self signed by %1 (trusted)</source>
-        <translation type="unfinished"></translation>
+        <translation>Własnoręcznie podpisany przez %1 (zaufany)</translation>
     </message>
     <message>
         <source>Self signed by %1 (expired!)</source>
-        <translation type="unfinished"></translation>
+        <translation>Własnoręcznie podpisany przez %1 (wygasł)</translation>
     </message>
     <message>
         <source>Unverified self signed signature by %1!</source>
-        <translation type="unfinished"></translation>
+        <translation>Niezweryfikowany własnoręczny podpis przez %1!</translation>
     </message>
 </context>
 <context>
     <name>UIWizardNewVD</name>
     <message>
         <source>Create</source>
-        <translation type="unfinished"></translation>
+        <translation>Utwórz</translation>
     </message>
     <message>
         <source>&Dynamically allocated</source>
-        <translation type="unfinished"></translation>
+        <translation>&Dynamicznie przydzielany</translation>
     </message>
     <message>
         <source>&Fixed size</source>
-        <translation type="unfinished"></translation>
+        <translation>&Stały rozmiar</translation>
     </message>
     <message>
         <source>&Split into files of less than 2GB</source>
-        <translation type="unfinished"></translation>
+        <translation>&Podziel na pliki ważące mniej niż 2 GB</translation>
     </message>
     <message>
         <source><nobr>%1 (%2 B)</nobr></source>
-        <translation type="unfinished"><nobr>%1 (%2 B)</nobr></translation>
+        <translation><nobr>%1 (%2 B)</nobr></translation>
     </message>
     <message>
         <source>File location and size</source>
-        <translation type="unfinished"></translation>
+        <translation>Lokalizacja pliku i rozmiar</translation>
     </message>
     <message>
         <source>File &location</source>
-        <translation type="unfinished"></translation>
+        <translation>Ścieżka do &pliku</translation>
     </message>
     <message>
         <source>File &size</source>
-        <translation type="unfinished"></translation>
+        <translation>Rozmiar &pliku</translation>
     </message>
     <message>
         <source>Create Virtual Hard Disk</source>
-        <translation type="unfinished"></translation>
+        <translation>Stwórz wirtualny dysk twardy</translation>
     </message>
     <message>
         <source>Hard disk file type</source>
-        <translation type="unfinished"></translation>
+        <translation>Typ pliku z wirtualnym dyskiem</translation>
     </message>
     <message>
         <source>Please choose the type of file that you would like to use for the new virtual hard disk. If you do not need to use it with other virtualization software you can leave this setting unchanged.</source>
-        <translation type="unfinished"></translation>
+        <translation>Wybierz typ pliku, którego chciałbyś użyć z nowym wirtualnym dyskiem twardym. Jeśli nie potrzebujesz użyć go z innym oprogramowaniem wirtualizacyjnym,to możesz pozostawić to ustawienie niezmienione.</translation>
     </message>
     <message>
         <source>Storage on physical hard disk</source>
-        <translation type="unfinished"></translation>
+        <translation>Pamięć na fizycznym dysku twardym</translation>
     </message>
     <message>
         <source>Please choose whether the new virtual hard disk file should grow as it is used (dynamically allocated) or if it should be created at its maximum size (fixed size).</source>
-        <translation type="unfinished"></translation>
+        <translation>Wybierz czy plik nowego wirtualnego dysku powinien rosnąć wraz z użyciem (dynamicznie przydzielany) czy powinien zostać utworzony z maksymalnym rozmiarem (stały rozmiar).</translation>
     </message>
     <message>
         <source><p>A <b>dynamically allocated</b> hard disk file will only use space on your physical hard disk as it fills up (up to a maximum <b>fixed size</b>), although it will not shrink again automatically when space on it is freed.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p> <b>Dynamicznie przydzielany</b> plik twardego dysku będzie używał  jedynie miejsca na twoim fizycznym twardym dysku, jeśli się zapełni (do maksymalnego <b>stałego rozmiaru</b>), chociaż nie skurczy się automatycznie, gdy zostanie zwolnione miejsce.</p></translation>
     </message>
     <message>
         <source><p>A <b>fixed size</b> hard disk file may take longer to create on some systems but is often faster to use.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Tworzenie stałego rozmiaru pliku może trwać dłużej na niektórych systemach, ale często jest szybszy w użyciu.</p></translation>
     </message>
     <message>
         <source><p>You can also choose to <b>split</b> the hard disk file into several files of up to two gigabytes each. This is mainly useful if you wish to store the virtual machine on removable USB devices or old systems, some of which cannot handle very large files.</source>
-        <translation type="unfinished"></translation>
+        <translation><p>Mozesz również <b>podzielić</b> plik dysku twardego na kilka plików do 2 GB każdy.Jest to przede wszystkim przydatne, jeśli chcesz przechowywać maszynę wirtualną na wymiennych urządzeniach USB lub starych systemach, z których niektóre nie obsługują bardzo dużych plików.</translation>
     </message>
     <message>
         <source>Please type the name of the new virtual hard disk file into the box below or click on the folder icon to select a different folder to create the file in.</source>
-        <translation type="unfinished"></translation>
+        <translation>Wpisz nazwę dla pliku nowego wirtualnego dysku twardego w polu poniżej lub kliknij na ikonę folderu, by wybrać inny, aby utworzyć w nim plik.</translation>
     </message>
     <message>
         <source>Choose a location for new virtual hard disk file...</source>
-        <translation type="unfinished"></translation>
+        <translation>Wybierz lokalizację dla pliku nowego wirtualnego twardego dysku...</translation>
     </message>
     <message>
         <source>Select the size of the virtual hard disk in megabytes. This size is the limit on the amount of file data that a virtual machine will be able to store on the hard disk.</source>
-        <translation type="unfinished"></translation>
+        <translation>Proszę wybrać rozmiar obrazu wirtualnego dysku twardego w megabajtach. Ten rozmiar jest limitem ilości danych, które wirtualna maszyna może pomieścić na twardym dysku.</translation>
     </message>
     <message>
         <source>Hard disk file &type</source>
-        <translation type="unfinished"></translation>
+        <translation>Typ pliku z &wirtualnym dyskiem twardym</translation>
     </message>
 </context>
 <context>
     <name>UIWizardNewVM</name>
     <message>
         <source>Create Virtual Machine</source>
-        <translation type="unfinished"></translation>
+        <translation>Utwórz wirtualną maszynę</translation>
     </message>
     <message>
         <source>Create</source>
-        <translation type="unfinished"></translation>
+        <translation>Utwórz</translation>
     </message>
     <message>
         <source>IDE Controller</source>
@@ -11998,55 +12039,55 @@ Będzie ona używana przez wszystkie moduły VirtualBox, aby móc rozróżnić t
     </message>
     <message>
         <source>Name and operating system</source>
-        <translation type="unfinished"></translation>
+        <translation>Nazwa i system operacyjny</translation>
     </message>
     <message>
         <source>Please choose a descriptive name for the new virtual machine and select the type of operating system you intend to install on it. The name you choose will be used throughout VirtualBox to identify this machine.</source>
-        <translation type="unfinished"></translation>
+        <translation>Wybierz opisową nazwę dla nowej maszyny wirtualnej oraz wybierz typ systemu operacyjnego, który zamierzasz zainstalować na niej. Nazwa, którą wybierzesz zostanie wykorzystana przez VirtualBox, by zidentyfikować maszynę.</translation>
     </message>
     <message>
         <source>Memory size</source>
-        <translation type="unfinished"></translation>
+        <translation>Rozmiar pamięci</translation>
     </message>
     <message>
         <source><p>Select the amount of memory (RAM) in megabytes to be allocated to the virtual machine.</p><p>The recommended memory size is <b>%1</b> MB.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Wybierz ilość pamięci (RAM) w megabajtach, która zostanie przydzielona dla wirtualnej maszyny.</p><p>Zalecany rozmiar pamięci to: <b>%1</b> MB.</p></translation>
     </message>
     <message>
         <source>&Memory size</source>
-        <translation type="unfinished"></translation>
+        <translation>&Rozmiar pamięci</translation>
     </message>
     <message>
         <source>Hard disk</source>
-        <translation type="unfinished"></translation>
+        <translation>Dysk twardy</translation>
     </message>
     <message>
         <source><p>If you wish you can add a virtual hard disk to the new machine. You can either create a new hard disk file or select one from the list or from another location using the folder icon.</p><p>If you need a more complex storage set-up you can skip this step and make the changes to the machine settings once the machine is created.</p><p>The recommended size of the hard disk is <b>%1</b>.</p></source>
-        <translation type="unfinished"></translation>
+        <translation><p>Jeśli chcesz, to możesz dodać wirtualny dysk twardy do nowej maszyny.Możesz zarówno utworzyć nowy plik twardego dysku jak i wybrać jeden z listy lub z innej lokalizacji, używając ikony folderu.</p><p>Jeśli potrzebujesz bardziej złożonej konfiguracji pamięci, to możesz pominąć ten krok i dokonać zmiany ustawień po utworzeniu maszyny.</p><p>Zalecana wielkość pliku dysku twardego to: <b>%1</b>.</p></translation>
     </message>
     <message>
         <source>&Do not add a virtual hard disk</source>
-        <translation type="unfinished"></translation>
+        <translation>&Nie dodawaj wirtualnego dysku twardego</translation>
     </message>
     <message>
         <source>&Create a virtual hard disk now</source>
-        <translation type="unfinished"></translation>
+        <translation>&Stwórz wirtualny dysk twardy</translation>
     </message>
     <message>
         <source>&Use an existing virtual hard disk file</source>
-        <translation type="unfinished"></translation>
+        <translation>&Użyj istniejącego pliku wirtualnego dysku twardego</translation>
     </message>
     <message>
         <source>Choose a virtual hard disk file...</source>
-        <translation type="unfinished"></translation>
+        <translation>Wybierz plik wirtualnego dysku twardego...</translation>
     </message>
     <message>
         <source><p><nobr>Holds the name or full path to the virtual machine folder you are about to create.</nobr></p></source>
-        <translation type="unfinished"></translation>
+        <translation><p><nobr>Przechowuje nazwę lub pełną ścieżkę do folderu wirtualnej maszyny, który zamierzasz stworzyć.</nobr></p></translation>
     </message>
     <message>
         <source><p><nobr>You are about to create the virtual machine in the following folder:</nobr><br><nobr><b>%1</b></nobr></p></source>
-        <translation type="unfinished"></translation>
+        <translation><p><nobr>Zamierzasz stworzyć wirtualną maszynę w następującym folderze:</nobr><br><nobr><b>%1</b></nobr></p></translation>
     </message>
 </context>
 <context>
@@ -12110,35 +12151,35 @@ Wersja %1</translation>
     <name>VBoxAddSFDialog</name>
     <message>
         <source>Add Share</source>
-        <translation type="obsolete">Dodaj współdzielony katalog</translation>
+        <translation type="obsolete">Dodaj współdzielony folder</translation>
     </message>
     <message>
         <source>Edit Share</source>
-        <translation type="obsolete">Edytuj współdzielony katalog</translation>
+        <translation type="obsolete">Edytuj współdzielony folder</translation>
     </message>
     <message>
         <source>Select a folder to share</source>
-        <translation type="obsolete">Wybierz współdzielony katalog</translation>
+        <translation type="obsolete">Wybierz współdzielony folder</translation>
     </message>
     <message>
         <source>Folder Path</source>
-        <translation type="obsolete">Ścieżka katalogu</translation>
+        <translation type="obsolete">Ścieżka folderu</translation>
     </message>
     <message>
         <source>Folder Name</source>
-        <translation type="obsolete">Nazwa katalogu</translation>
+        <translation type="obsolete">Nazwa folderu</translation>
     </message>
     <message>
         <source>Holds the path to an existing folder on the host PC.</source>
-        <translation type="obsolete">Zawiera ścieżkę do katalogu istniejącego w systemie operacyjnym gospodarza.</translation>
+        <translation type="obsolete">Przechowuje ścieżkę do folderu istniejącego w systemie operacyjnym gospodarza.</translation>
     </message>
     <message>
         <source>Holds the name of the shared folder (as it will be seen by the guest OS).</source>
-        <translation type="obsolete">Zawiera nazwę współdzielonego katalogu (widzianą przez goszczony system operacyjny).</translation>
+        <translation type="obsolete">Przechowuje nazwę współdzielonego folderu (widzianą przez goszczony system operacyjny).</translation>
     </message>
     <message>
         <source>Opens the dialog to select a folder.</source>
-        <translation type="obsolete">Otwiera okno umożliwiające wybór katalogu.</translation>
+        <translation type="obsolete">Otwiera okno umożliwiające wybór folderu.</translation>
     </message>
     <message>
         <source>OK</source>
@@ -12162,7 +12203,7 @@ Wersja %1</translation>
     </message>
     <message>
         <source>When checked, the guest OS will not be able to write to the specified shared folder.</source>
-        <translation type="obsolete">Uniemożliwia zapis do współdzielonego katalogu przez goszczony system operacyjny.</translation>
+        <translation type="obsolete">Uniemożliwia zapis do współdzielonego folderu przez goszczony system operacyjny.</translation>
     </message>
 </context>
 <context>
@@ -12241,7 +12282,7 @@ Wersja %1</translation>
 <p>If the machine doesn't respond to this action then the guest operating system may be misconfigured or doesn't understand ACPI Power Button events at all. In this case you should select the <b>Power off the machine</b> action to stop virtual machine execution.</p></source>
         <translation type="obsolete"><p>Wysyła sygnał przycisku zasilania ACPI do maszyny wirtualnej.</p>
 <p>Goszczony system operacyjny uruchomiony wewnątrz maszyny wirtualnej zazwyczaj powinien rozpoznać ten sygnał i automatycznie przeprowadzić bezpieczną procedurę zamknięcia. Jest to rekomendowany sposób wyłączenia maszyny, ponieważ wszystkie aplikacje uruchomione w maszynie będą mogły przed zamknięciem systemu zapisać swój stan i dane użytkownika.</p>
-<p>Jeśli maszyna nie odpowiada na ten sygnał, goszczony system operacyjny może nie być poprawnie skonfigurowany lub w ogóle nie rozpoznawać sygnału przycisku zasilania ACPI. W takim przypadku należy ręcznie zapisać dane, zamknąć goszczony system operacyjny w odpowiedni dla niego sposób, a następnie zatrzymać pracę maszyny wirtualnej poprzez wybranie opcji <b>Wyłączenie maszyny<b>.</p></translation>
+<p>Jeśli maszyna nie odpowiada na ten sygnał, goszczony system operacyjny może nie być poprawnie skonfigurowany lub w ogóle nie rozpoznawać sygnału przycisku zasilania ACPI. W takim przypadku należy ręcznie zapisać dane, zamknąć goszczony system operacyjny w odpowiedni dla niego sposób, a następnie zaPrzechowujeć pracę maszyny wirtualnej poprzez wybranie opcji <b>Wyłączenie maszyny<b>.</p></translation>
     </message>
     <message>
         <source><p>Turns off the virtual machine.</p>
@@ -12259,7 +12300,7 @@ Wersja %1</translation>
     </message>
     <message>
         <source><p>Sends the ACPI Power Button press event to the virtual machine.</p><p>Normally, the guest operating system running inside the virtual machine will detect this event and perform a clean shutdown procedure. This is a recommended way to turn off the virtual machine because all applications running inside it will get a chance to save their data and state.</p><p>If the machine doesn't respond to this action then the guest operating system  [...]
-        <translation type="obsolete"><p>Wysyła sygnał przycisku zasilania ACPI do maszyny wirtualnej.</p><p>Goszczony system operacyjny uruchomiony wewnątrz maszyny wirtualnej zazwyczaj powinien rozpoznać ten sygnał i automatycznie przeprowadzić bezpieczną procedurę zamknięcia. Jest to rekomendowany sposób wyłączenia maszyny, ponieważ wszystkie aplikacje uruchomione w maszynie będą mogły przed zamknięciem systemu zapisać swój stan i dane użytkownika.</p><p>J [...]
+        <translation type="obsolete"><p>Wysyła sygnał przycisku zasilania ACPI do maszyny wirtualnej.</p><p>Goszczony system operacyjny uruchomiony wewnątrz maszyny wirtualnej zazwyczaj powinien rozpoznać ten sygnał i automatycznie przeprowadzić bezpieczną procedurę zamknięcia. Jest to rekomendowany sposób wyłączenia maszyny, ponieważ wszystkie aplikacje uruchomione w maszynie będą mogły przed zamknięciem systemu zapisać swój stan i dane użytkownika.</p><p>J [...]
     </message>
     <message>
         <source><p>Turns off the virtual machine.</p><p>Note that this action will stop machine execution immediately so that the guest operating system running inside it will not be able to perform a clean shutdown procedure which may result in <i>data loss</i> inside the virtual machine. Selecting this action is recommended only if the virtual machine does not respond to the <b>Send the shutdown signal</b> action.</p></source>
@@ -12432,11 +12473,11 @@ Wersja %1</translation>
     </message>
     <message>
         <source>&Shared Folders...</source>
-        <translation type="obsolete">W&spółdzielone katalogi...</translation>
+        <translation type="obsolete">W&spółdzielone folderi...</translation>
     </message>
     <message>
         <source>Create or modify shared folders</source>
-        <translation type="obsolete">Otwiera okno ustawień współdzielonych katalogów</translation>
+        <translation type="obsolete">Otwiera okno ustawień współdzielonych folderów</translation>
     </message>
     <message>
         <source>&Insert Guest Additions CD image...</source>
@@ -12508,7 +12549,7 @@ Wersja %1</translation>
     </message>
     <message>
         <source>Provides quick access to shared folders (by a right mouse button click).<br>Note that the shared folders feature requires Guest Additions to be installed in the guest OS.</source>
-        <translation type="obsolete">Pozwala na szybki dostęp do współdzielonych katalogów (poprzez kliknięcie prawego przycisku myszy).<br> Uwaga: funkcja współdzielenia katalogów wymaga zainstalowania Dodatków (Guest Additions) w goszczonym systemie operacyjnym.</translation>
+        <translation type="obsolete">Pozwala na szybki dostęp do współdzielonych folderów (poprzez kliknięcie prawego przycisku myszy).<br> Uwaga: funkcja współdzielenia folderów wymaga zainstalowania Dodatków gościa w goszczonym systemie operacyjnym.</translation>
     </message>
     <message>
         <source><qt>Indicates&nbsp;the&nbsp;activity&nbsp;of&nbsp;the&nbsp;floppy&nbsp;media<br>[<b>%1</b>]</qt></source>
@@ -12760,12 +12801,12 @@ Wersja %1</translation>
     <message>
         <source><qt><nobr>Indicates the activity of the machineof the machine'sapos;s shared folders: shared folders:</nobr>%1</qt></source>
         <comment>Shared folders tooltip</comment>
-        <translation type="obsolete"><qt><nobr>Wskaźnik aktywności współdzielonych katalogów:</nobr>%1</qt></translation>
+        <translation type="obsolete"><qt><nobr>Wskaźnik aktywności współdzielonych folderów:</nobr>%1</qt></translation>
     </message>
     <message>
         <source><br><nobr><b>No shared folders</b></nobr></source>
         <comment>Shared folders tooltip</comment>
-        <translation type="obsolete"><br><nobr><b>Brak współdzielonych katalogów</b></nobr></translation>
+        <translation type="obsolete"><br><nobr><b>Brak współdzielonych folderów</b></nobr></translation>
     </message>
     <message>
         <source>&Contents...</source>
@@ -12803,7 +12844,7 @@ Wersja %1</translation>
     </message>
     <message>
         <source>Indicates whether the host mouse pointer is captured by the guest OS:<br><nobr><img src=:/mouse_disabled_16px.png/>&nbsp;&nbsp;pointer is not captured</nobr><br><nobr><img src=:/mouse_16px.png/>&nbsp;&nbsp;pointer is captured</nobr><br><nobr><img src=:/mouse_seamless_16px.png/>&nbsp;&nbsp;mouse integration (MI) is On</nobr><br><nobr><img src=:/mouse_can_seamless_ [...]
-        <translation type="obsolete">Wskazuje, czy kursor myszy gospodarza jest przechwycony przez goszczony system operacyjny:<br><nobr><img src=:/mouse_disabled_16px.png/>&nbsp;&nbsp;kursor nie jest przechwycony</nobr><br><nobr><img src=:/mouse_16px.png/>&nbsp;&nbsp;kursor jest przechwycony</nobr><br><nobr><img src=:/mouse_seamless_16px.png/>&nbsp;&nbsp;integracja myszy (IM) jest włączona</nobr [...]
+        <translation type="obsolete">Wskazuje, czy kursor myszy gospodarza jest przechwycony przez goszczony system operacyjny:<br><nobr><img src=:/mouse_disabled_16px.png/>&nbsp;&nbsp;kursor nie jest przechwycony</nobr><br><nobr><img src=:/mouse_16px.png/>&nbsp;&nbsp;kursor jest przechwycony</nobr><br><nobr><img src=:/mouse_seamless_16px.png/>&nbsp;&nbsp;integracja myszy (IM) jest włączona</nobr [...]
     </message>
     <message>
         <source>Indicates whether the Remote Display (VRDP Server) is enabled (<img src=:/vrdp_16px.png/>) or not (<img src=:/vrdp_disabled_16px.png/>).</source>
@@ -12918,7 +12959,7 @@ Wersja %1</translation>
     <message>
         <source><p style='white-space:pre'><nobr>Indicates the activity of the machine's shared folders:</nobr>%1</p></source>
         <comment>Shared folders tooltip</comment>
-        <translation type="obsolete"><p style='white-space:pre'><nobr>Wskaźnik aktywności współdzielonych katalogów maszyny:</nobr>%1</p></translation>
+        <translation type="obsolete"><p style='white-space:pre'><nobr>Wskaźnik aktywności współdzielonych folderów maszyny:</nobr>%1</p></translation>
     </message>
     <message>
         <source>Dock Icon</source>
@@ -13255,11 +13296,11 @@ Wersja %1</translation>
     </message>
     <message>
         <source>Opens a window to select a different folder.</source>
-        <translation type="obsolete">Otwiera okno umożliwiające wybór innego katalogu.</translation>
+        <translation type="obsolete">Otwiera okno umożliwiające wybór innego folderu.</translation>
     </message>
     <message>
         <source>Resets the folder path to the default value.</source>
-        <translation type="vanished">Przywraca domyślną ścieżkę do katalogu.</translation>
+        <translation type="vanished">Przywraca domyślną ścieżkę do folderu.</translation>
     </message>
     <message>
         <source>Opens a window to select a different file.</source>
@@ -13275,7 +13316,7 @@ Wersja %1</translation>
     </message>
     <message>
         <source>Please type the folder path here.</source>
-        <translation type="obsolete">Proszę podać żądaną ścieżkę do katalogu.</translation>
+        <translation type="obsolete">Proszę podać żądaną ścieżkę do folderu.</translation>
     </message>
     <message>
         <source>Please type the file path here.</source>
@@ -13330,7 +13371,7 @@ Wersja %1</translation>
     </message>
     <message>
         <source>When checked, the keyboard is automatically captured every time the VM window is activated. When the keyboard is captured, all keystrokes (including system ones like Alt-Tab) are directed to the VM.</source>
-        <translation type="obsolete">Po zaznaczeniu tej opcji klawiatura będzie automatycznie przechwytywana za każdym razem, gdy okno maszyny wirtualnej zostanie aktywowane. Po przechwyceniu klawiatury wszystkie kombinacje klawiszowe (włącznie z systemowymi, jak np. Alt-Tab) bedą przekierowywane do maszyny wirtualnej.</translation>
+        <translation type="obsolete">Po zaznaczeniu tej opcji, klawiatura będzie automatycznie przechwytywana za każdym razem, gdy okno maszyny wirtualnej zostanie aktywowane. Po przechwyceniu klawiatury wszystkie kombinacje klawiszowe (włącznie z systemowymi, jak np. Alt-Tab) bedą przekierowywane do maszyny wirtualnej.</translation>
     </message>
     <message>
         <source>&Auto Capture Keyboard</source>
@@ -13385,7 +13426,7 @@ Wersja %1</translation>
     <message>
         <source>Base Memory</source>
         <comment>details report</comment>
-        <translation>Pamięć podstawowa</translation>
+        <translation>RAM</translation>
     </message>
     <message>
         <source><nobr>%3 MB</nobr></source>
@@ -13589,7 +13630,7 @@ Wersja %1</translation>
     <message>
         <source>Paused</source>
         <comment>MachineState</comment>
-        <translation>Wstrzymana</translation>
+        <translation>WsPrzechowujena</translation>
     </message>
     <message>
         <source>Starting</source>
@@ -13644,7 +13685,7 @@ Wersja %1</translation>
     <message>
         <source>Floppy</source>
         <comment>DeviceType</comment>
-        <translation>Dyskietka</translation>
+        <translation>Stacja dyskietek</translation>
     </message>
     <message>
         <source>CD/DVD</source>
@@ -13659,7 +13700,7 @@ Wersja %1</translation>
     <message>
         <source>Network</source>
         <comment>DeviceType</comment>
-        <translation>Sieć</translation>
+        <translation>Karta sieciowa</translation>
     </message>
     <message>
         <source>Primary</source>
@@ -13724,7 +13765,7 @@ Wersja %1</translation>
     <message>
         <source>Hold</source>
         <comment>USBFilterActionType</comment>
-        <translation type="obsolete">Przytrzymaj</translation>
+        <translation type="obsolete">PrzyPrzechowujej</translation>
     </message>
     <message>
         <source>Master</source>
@@ -13744,7 +13785,7 @@ Wersja %1</translation>
     <message>
         <source>Null Audio Driver</source>
         <comment>AudioDriverType</comment>
-        <translation>Sterownik dźwięku NULL</translation>
+        <translation>Zerowy sterownik dźwięku</translation>
     </message>
     <message>
         <source>Windows Multimedia</source>
@@ -13814,7 +13855,7 @@ Wersja %1</translation>
     <message>
         <source>Held</source>
         <comment>USBDeviceState</comment>
-        <translation>Przytrzymane</translation>
+        <translation>PrzyPrzechowujene</translation>
     </message>
     <message>
         <source>Captured</source>
@@ -13853,7 +13894,7 @@ Wersja %1</translation>
     </message>
     <message>
         <source>Select a directory</source>
-        <translation type="obsolete">Wybierz katalog</translation>
+        <translation type="obsolete">Wybierz folder</translation>
     </message>
     <message>
         <source>Select a file</source>
@@ -13882,11 +13923,11 @@ Wersja %1</translation>
     <message>
         <source>Shared Folders</source>
         <comment>details report (shared folders)</comment>
-        <translation>Współdzielone katalogi</translation>
+        <translation>Udostępniane foldery</translation>
     </message>
     <message>
         <source>%1</source>
-        <comment>details report (shadef folders)</comment>
+        <comment>details report (shared folders)</comment>
         <translation type="obsolete">%1</translation>
     </message>
     <message>
@@ -13897,7 +13938,7 @@ Wersja %1</translation>
     <message>
         <source>Shared Folders</source>
         <comment>details report</comment>
-        <translation>Współdzielone katalogi</translation>
+        <translation>Udostępniane foldery</translation>
     </message>
     <message>
         <source>Stuck</source>
@@ -13912,12 +13953,12 @@ Wersja %1</translation>
     <message>
         <source>Host Pipe</source>
         <comment>PortMode</comment>
-        <translation>Nazwane łącze w systemie gospodarza</translation>
+        <translation>Host Pipe</translation>
     </message>
     <message>
         <source>Host Device</source>
         <comment>PortMode</comment>
-        <translation>Sprzętowy port gospodarza</translation>
+        <translation>Urządzenie gospodarza</translation>
     </message>
     <message>
         <source>User-defined</source>
@@ -13992,7 +14033,7 @@ Wersja %1</translation>
     <message>
         <source>Shared Folder</source>
         <comment>DeviceType</comment>
-        <translation>Współdzielony katalog</translation>
+        <translation>Udostępniany folder</translation>
     </message>
     <message>
         <source>IDE</source>
@@ -14171,7 +14212,7 @@ Wersja %1</translation>
     </message>
     <message>
         <source><hr>Some of the files in this hard disk chain are inaccessible. Please use the Virtual Media Manager in <b>Show Differencing Hard Disks</b> mode to inspect these files.</source>
-        <translation type="obsolete"><hr>Niektóre nośniki w tym łańcuchu dysków twardych są niedostępne. Proszę użyć Menedżera nośników wirtualnych w trybie <b>Pokaż różnicowe dyski twarde</b>, aby sprawdzić te nośniki.</translation>
+        <translation type="obsolete"><hr>Niektóre pliki w tym łańcuchu dysków twardych są niedostępne. Proszę użyć Menedżera nośników wirtualnych w trybie <b>Pokaż różnicowe dyski twarde</b>, aby sprawdzić te pliki.</translation>
     </message>
     <message>
         <source>%1<hr>This base hard disk is indirectly attached using the following differencing hard disk:<br>%2%3</source>
@@ -14345,7 +14386,7 @@ Wersja %1</translation>
     <message>
         <source>Raw File</source>
         <comment>PortMode</comment>
-        <translation>Surowy plik</translation>
+        <translation>Plik Raw</translation>
     </message>
     <message>
         <source>Enabled</source>
@@ -14370,7 +14411,7 @@ Wersja %1</translation>
     <message>
         <source>Storage</source>
         <comment>details report</comment>
-        <translation>Nośniki</translation>
+        <translation>Pamięć</translation>
     </message>
     <message>
         <source>Teleported</source>
@@ -14395,7 +14436,7 @@ Wersja %1</translation>
     <message>
         <source>Teleporting Paused VM</source>
         <comment>MachineState</comment>
-        <translation>Teleportacja wstrzymanej maszyny</translation>
+        <translation>Teleportacja wsPrzechowujenej maszyny</translation>
     </message>
     <message>
         <source>Restoring Snapshot</source>
@@ -14528,7 +14569,7 @@ Wersja %1</translation>
     <message>
         <source>Some of the files in this hard disk chain are inaccessible. Please use the Virtual Media Manager in <b>Show Differencing Hard Disks</b> mode to inspect these files.</source>
         <comment>medium</comment>
-        <translation type="obsolete">Niektóre nośniki w tym łańcuchu dysków twardych są niedostępne. Proszę użyć Menedżera nośników wirtualnych w trybie <b>Pokaż różnicowe dyski twarde</b>, aby sprawdzić te nośniki.</translation>
+        <translation type="obsolete">Niektóre pliki w tym łańcuchu dysków twardych są niedostępne. Proszę użyć Menedżera nośników wirtualnych w trybie <b>Pokaż różnicowe dyski twarde</b>, aby sprawdzić te pliki.</translation>
     </message>
     <message>
         <source>This base hard disk is indirectly attached using the following differencing hard disk:</source>
@@ -14679,71 +14720,71 @@ Wersja %1</translation>
     <message>
         <source>Remote Desktop Server Port</source>
         <comment>details report (VRDE Server)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Port serwera pulpitu zdalnego</translation>
     </message>
     <message>
         <source>Remote Desktop Server</source>
         <comment>details report (VRDE Server)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Serwer pulpitu zdalnego</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>details report (VRDE Server)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Wyłączony</translation>
     </message>
     <message>
         <source>All files (*)</source>
-        <translation type="unfinished">Wszystkie pliki (*)</translation>
+        <translation>Wszystkie pliki (*)</translation>
     </message>
     <message>
         <source>Fault Tolerant Syncing</source>
         <comment>MachineState</comment>
-        <translation type="unfinished"></translation>
+        <translation>Odporna na uszkodzenia synchronizowania</translation>
     </message>
     <message>
         <source>Unlocked</source>
         <comment>SessionState</comment>
-        <translation type="unfinished"></translation>
+        <translation>Odblokowana</translation>
     </message>
     <message>
         <source>Locked</source>
         <comment>SessionState</comment>
-        <translation type="unfinished"></translation>
+        <translation>Zablokowana</translation>
     </message>
     <message>
         <source>Unlocking</source>
         <comment>SessionState</comment>
-        <translation type="unfinished"></translation>
+        <translation>Odblokowywanie</translation>
     </message>
     <message>
         <source>Null</source>
         <comment>AuthType</comment>
-        <translation type="unfinished">Brak</translation>
+        <translation>Brak</translation>
     </message>
     <message>
         <source>External</source>
         <comment>AuthType</comment>
-        <translation type="unfinished">Zewnętrzna</translation>
+        <translation>Zewnętrzna</translation>
     </message>
     <message>
         <source>Guest</source>
         <comment>AuthType</comment>
-        <translation type="unfinished">Gość</translation>
+        <translation>Gość</translation>
     </message>
     <message>
         <source>Intel HD Audio</source>
         <comment>AudioControllerType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Intel HD Audio</translation>
     </message>
     <message>
         <source>PIIX3</source>
         <comment>ChipsetType</comment>
-        <translation type="unfinished">PIIX3</translation>
+        <translation>PIIX3</translation>
     </message>
     <message>
         <source>ICH9</source>
         <comment>ChipsetType</comment>
-        <translation type="unfinished">ICH9</translation>
+        <translation>ICH9</translation>
     </message>
     <message>
         <source>MB</source>
@@ -14753,600 +14794,605 @@ Wersja %1</translation>
     <message>
         <source>Execution Cap</source>
         <comment>details report</comment>
-        <translation type="unfinished"></translation>
+        <translation>Wykorzystanie procesora</translation>
     </message>
     <message>
         <source><nobr>%1%</nobr></source>
         <comment>details report</comment>
-        <translation type="unfinished"></translation>
+        <translation><nobr>%1%</nobr></translation>
     </message>
     <message>
         <source>Generic, '%1'</source>
         <comment>details report (network)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Rodzajowa, '%1'</translation>
     </message>
     <message>
         <source>Generic Driver</source>
         <comment>NetworkAttachmentType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Rodzajowy sterownik</translation>
     </message>
     <message>
         <source>Adapter %1</source>
-        <translation type="unfinished">Karta %1</translation>
+        <translation>Karta %1</translation>
     </message>
     <message>
         <source>Disabled</source>
         <comment>DragAndDropType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Wyłączone</translation>
     </message>
     <message>
         <source>Host To Guest</source>
         <comment>DragAndDropType</comment>
-        <translation type="unfinished">Gospodarz do gościa</translation>
+        <translation>Gospodarz do gościa</translation>
     </message>
     <message>
         <source>Guest To Host</source>
         <comment>DragAndDropType</comment>
-        <translation type="unfinished">Gość do gospodarza</translation>
+        <translation>Gość do gospodarza</translation>
     </message>
     <message>
         <source>Bidirectional</source>
         <comment>DragAndDropType</comment>
-        <translation type="unfinished">Dwukierunkowy</translation>
+        <translation>Dwukierunkowe</translation>
     </message>
     <message>
         <source>Normal</source>
         <comment>MediumType</comment>
-        <translation type="unfinished">Normalny</translation>
+        <translation>Normalny</translation>
     </message>
     <message>
         <source>Immutable</source>
         <comment>MediumType</comment>
-        <translation type="unfinished">Niemodyfikowalny</translation>
+        <translation>Stały</translation>
     </message>
     <message>
         <source>Writethrough</source>
         <comment>MediumType</comment>
-        <translation type="unfinished">Bezpośredniego zapisu</translation>
+        <translation>Bezpośredniego zapisu</translation>
     </message>
     <message>
         <source>Shareable</source>
         <comment>MediumType</comment>
-        <translation type="unfinished">Dostępne współdzielenie</translation>
+        <translation>Z funkcją 'udostępnianie'</translation>
     </message>
     <message>
         <source>Readonly</source>
         <comment>MediumType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Tylko do odczytu</translation>
     </message>
     <message>
         <source>Multi-attach</source>
         <comment>MediumType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Wielo-podłączalny</translation>
     </message>
     <message>
         <source>Dynamically allocated storage</source>
         <comment>MediumVariant</comment>
-        <translation type="unfinished"></translation>
+        <translation>Pamięć dynamicznie przydzielana</translation>
     </message>
     <message>
         <source>Dynamically allocated differencing storage</source>
         <comment>MediumVariant</comment>
-        <translation type="unfinished"></translation>
+        <translation>Różnicowa pamięć dynamicznie przydzielana</translation>
     </message>
     <message>
         <source>Fixed size storage</source>
         <comment>MediumVariant</comment>
-        <translation type="unfinished"></translation>
+        <translation>Pamięć o stałym rozmiarze</translation>
     </message>
     <message>
         <source>Dynamically allocated storage split into files of less than 2GB</source>
         <comment>MediumVariant</comment>
-        <translation type="unfinished"></translation>
+        <translation>Dynamicznie przydzielana pamięć podzielona na pliki mniejsze niż 2 GB</translation>
     </message>
     <message>
         <source>Dynamically allocated differencing storage split into files of less than 2GB</source>
         <comment>MediumVariant</comment>
-        <translation type="unfinished"></translation>
+        <translation>Różnicowa pamięć dynamicznie przydzielana podzielona na pliki mniejsze niż 2 GB</translation>
     </message>
     <message>
         <source>Fixed size storage split into files of less than 2GB</source>
         <comment>MediumVariant</comment>
-        <translation type="unfinished"></translation>
+        <translation>Pamięć o stałym rozmiarze podzielona na pliki mniejsze niż 2 GB</translation>
     </message>
     <message>
         <source>Dynamically allocated compressed storage</source>
         <comment>MediumVariant</comment>
-        <translation type="unfinished"></translation>
+        <translation>Skompresowana pamięć dynamicznie przydzielana</translation>
     </message>
     <message>
         <source>Dynamically allocated differencing compressed storage</source>
         <comment>MediumVariant</comment>
-        <translation type="unfinished"></translation>
+        <translation>Skompresowana różnicowa pamięć dynamicznie przydzielana</translation>
     </message>
     <message>
         <source>Fixed size ESX storage</source>
         <comment>MediumVariant</comment>
-        <translation type="unfinished"></translation>
+        <translation>Pamięć ESX o stałym rozmiarze</translation>
     </message>
     <message>
         <source>Fixed size storage on raw disk</source>
         <comment>MediumVariant</comment>
-        <translation type="unfinished"></translation>
+        <translation>Pamięć o stałym rozmiarze na dysku raw</translation>
     </message>
     <message>
         <source>Deny</source>
         <comment>NetworkAdapterPromiscModePolicy</comment>
-        <translation type="unfinished"></translation>
+        <translation>Odmawiaj</translation>
     </message>
     <message>
         <source>Allow VMs</source>
         <comment>NetworkAdapterPromiscModePolicy</comment>
-        <translation type="unfinished"></translation>
+        <translation>Pozwalaj maszynom wirtualnym</translation>
     </message>
     <message>
         <source>Allow All</source>
         <comment>NetworkAdapterPromiscModePolicy</comment>
-        <translation type="unfinished"></translation>
+        <translation>Pozwalaj wszystkim</translation>
     </message>
     <message>
         <source>Ignore</source>
         <comment>USBDeviceFilterAction</comment>
-        <translation type="unfinished">Ignoruj</translation>
+        <translation>Ignoruj</translation>
     </message>
     <message>
         <source>Hold</source>
         <comment>USBDeviceFilterAction</comment>
-        <translation type="unfinished">Przytrzymaj</translation>
+        <translation>Przechowuj</translation>
     </message>
     <message>
         <source>UDP</source>
         <comment>NATProtocol</comment>
-        <translation type="unfinished"></translation>
+        <translation>UDP</translation>
     </message>
     <message>
         <source>TCP</source>
         <comment>NATProtocol</comment>
-        <translation type="unfinished"></translation>
+        <translation>TCP</translation>
     </message>
     <message>
         <source>IDE Primary Master</source>
         <comment>StorageSlot</comment>
-        <translation type="unfinished">IDE Pierwszy Master</translation>
+        <translation>IDE Primary Master</translation>
     </message>
     <message>
         <source>IDE Primary Slave</source>
         <comment>StorageSlot</comment>
-        <translation type="unfinished">IDE Pierwszy Slave</translation>
+        <translation>IDE Primary Slave</translation>
     </message>
     <message>
         <source>IDE Secondary Master</source>
         <comment>StorageSlot</comment>
-        <translation type="unfinished">IDE Drugi Master</translation>
+        <translation>IDE Secondary Master</translation>
     </message>
     <message>
         <source>IDE Secondary Slave</source>
         <comment>StorageSlot</comment>
-        <translation type="unfinished">IDE Drugi Slave</translation>
+        <translation>IDE Secondary Slave</translation>
     </message>
     <message>
         <source>SATA Port %1</source>
         <comment>StorageSlot</comment>
-        <translation type="unfinished">Port SATA %1</translation>
+        <translation>Port SATA %1</translation>
     </message>
     <message>
         <source>SCSI Port %1</source>
         <comment>StorageSlot</comment>
-        <translation type="unfinished">Port SCSI %1</translation>
+        <translation>Port SCSI %1</translation>
     </message>
     <message>
         <source>SAS Port %1</source>
         <comment>StorageSlot</comment>
-        <translation type="unfinished">Port SAS %1</translation>
+        <translation>Port SAS %1</translation>
     </message>
     <message>
         <source>Floppy Device %1</source>
         <comment>StorageSlot</comment>
-        <translation type="unfinished">Dyskietka %1</translation>
+        <translation>Dyskietka %1</translation>
     </message>
     <message>
         <source>General</source>
         <comment>DetailsElementType</comment>
-        <translation type="unfinished">Ogólne</translation>
+        <translation>Ogólne</translation>
     </message>
     <message>
         <source>Preview</source>
         <comment>DetailsElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Podgląd</translation>
     </message>
     <message>
         <source>System</source>
         <comment>DetailsElementType</comment>
-        <translation type="unfinished">System</translation>
+        <translation>System</translation>
     </message>
     <message>
         <source>Display</source>
         <comment>DetailsElementType</comment>
-        <translation type="unfinished">Ekran</translation>
+        <translation>Ekran</translation>
     </message>
     <message>
         <source>Storage</source>
         <comment>DetailsElementType</comment>
-        <translation type="unfinished">Nośniki</translation>
+        <translation>Pamięć</translation>
     </message>
     <message>
         <source>Audio</source>
         <comment>DetailsElementType</comment>
-        <translation type="unfinished">Dźwięk</translation>
+        <translation>Dźwięk</translation>
     </message>
     <message>
         <source>Network</source>
         <comment>DetailsElementType</comment>
-        <translation type="unfinished">Sieć</translation>
+        <translation>Sieć</translation>
     </message>
     <message>
         <source>Serial ports</source>
         <comment>DetailsElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation> Porty szeregowe </translation>
     </message>
     <message>
         <source>Parallel ports</source>
         <comment>DetailsElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Porty równoległe </translation>
     </message>
     <message>
         <source>USB</source>
         <comment>DetailsElementType</comment>
-        <translation type="unfinished">USB</translation>
+        <translation>USB</translation>
     </message>
     <message>
         <source>Shared folders</source>
         <comment>DetailsElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Udostępniane foldery</translation>
     </message>
     <message>
         <source>Description</source>
         <comment>DetailsElementType</comment>
-        <translation type="unfinished">Opis</translation>
+        <translation>Opis</translation>
     </message>
     <message>
         <source>Please choose a virtual optical disk file</source>
-        <translation type="unfinished"></translation>
+        <translation>Proszę wybrać plik wirtualnego dysku optycznego</translation>
     </message>
     <message>
         <source>All virtual optical disk files (%1)</source>
-        <translation type="unfinished"></translation>
+        <translation>Wszystkie pliki wirtualnego dysku optycznego (%1)</translation>
     </message>
     <message>
         <source>Please choose a virtual floppy disk file</source>
-        <translation type="unfinished"></translation>
+        <translation>Proszę wybrać plik wirtualnej dyskietki</translation>
     </message>
     <message>
         <source>All virtual floppy disk files (%1)</source>
-        <translation type="unfinished"></translation>
+        <translation>Wszystkie pliki wirtualnej dyskietki (%1)</translation>
     </message>
     <message>
         <source>VDI (VirtualBox Disk Image)</source>
-        <translation type="unfinished"></translation>
+        <translation>VDI (VirtualBox Disk Image)</translation>
     </message>
     <message>
         <source>VMDK (Virtual Machine Disk)</source>
-        <translation type="unfinished"></translation>
+        <translation>VMDK (Virtual Machine Disk)</translation>
     </message>
     <message>
         <source>VHD (Virtual Hard Disk)</source>
-        <translation type="unfinished"></translation>
+        <translation>VHD (Virtual Hard Disk)</translation>
     </message>
     <message>
         <source>HDD (Parallels Hard Disk)</source>
-        <translation type="unfinished"></translation>
+        <translation>HDD (równoległy dysk twardy)</translation>
     </message>
     <message>
         <source>QED (QEMU enhanced disk)</source>
-        <translation type="unfinished"></translation>
+        <translation>QED (QEMU enhanced disk)</translation>
     </message>
     <message>
         <source>QCOW (QEMU Copy-On-Write)</source>
-        <translation type="unfinished"></translation>
+        <translation>QCOW (QEMU Copy-On-Write)</translation>
     </message>
     <message>
         <source>Unrestricted Execution</source>
         <comment>details report</comment>
-        <translation type="unfinished"></translation>
+        <translation>Nieograniczone wykorzystanie</translation>
     </message>
     <message>
         <source>PS/2 Mouse</source>
         <comment>PointingHIDType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Mysz PS/2</translation>
     </message>
     <message>
         <source>USB Mouse</source>
         <comment>PointingHIDType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Mysz USB</translation>
     </message>
     <message>
         <source>PS/2 and USB Mouse</source>
         <comment>PointingHIDType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Mysz PS/2 i USB</translation>
     </message>
     <message>
         <source>Unrestricted Execution</source>
-        <translation type="unfinished"></translation>
+        <translation>Nieograniczone wykorzystanie</translation>
     </message>
     <message>
         <source>USB Tablet</source>
         <comment>PointingHIDType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Tablet USB</translation>
     </message>
     <message>
         <source>USB Multi-Touch Tablet</source>
         <comment>PointingHIDType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Wielodotykowy tablet USB</translation>
     </message>
     <message>
         <source>NAT Network</source>
         <comment>NetworkAttachmentType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Sieć NAT</translation>
     </message>
     <message>
         <source>NAT network, '%1'</source>
         <comment>details report (network)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Sieć NAT, '%1'</translation>
     </message>
     <message>
         <source>You can create or add disk image files in the virtual machine settings.</source>
-        <translation type="unfinished"></translation>
+        <translation>Możesz utworzyć lub dodać pliki obrazu dysku w ustawieniach wirtualnej maszyny.</translation>
     </message>
     <message>
         <source>USB</source>
         <comment>StorageControllerType</comment>
-        <translation type="unfinished">USB</translation>
+        <translation>USB</translation>
     </message>
     <message>
         <source>off</source>
         <comment>guest monitor status</comment>
-        <translation type="unfinished"></translation>
+        <translation>wyłączony</translation>
     </message>
     <message>
         <source>Active</source>
         <comment>details report (VT-x/AMD-V)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Aktywne</translation>
     </message>
     <message>
         <source>Inactive</source>
         <comment>details report (VT-x/AMD-V)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Nieaktywne</translation>
     </message>
     <message>
         <source>Active</source>
         <comment>details report (Nested Paging)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Aktywne</translation>
     </message>
     <message>
         <source>Inactive</source>
         <comment>details report (Nested Paging)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Nieaktywne</translation>
     </message>
     <message>
         <source>Active</source>
         <comment>details report (Unrestricted Execution)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Aktywne</translation>
     </message>
     <message>
         <source>Inactive</source>
         <comment>details report (Unrestricted Execution)</comment>
-        <translation type="unfinished"></translation>
+        <translation>Nieaktywne</translation>
     </message>
     <message>
         <source>Paravirtualization Interface</source>
         <comment>details report</comment>
-        <translation type="unfinished"></translation>
+        <translation>Interfejs parawirtualizacji</translation>
     </message>
     <message>
         <source>Taking Snapshot</source>
         <comment>MachineState</comment>
-        <translation type="unfinished"></translation>
+        <translation>Robienie migawek</translation>
     </message>
     <message>
         <source>Taking Online Snapshot</source>
         <comment>MachineState</comment>
-        <translation type="unfinished"></translation>
+        <translation>Robienie migawek online</translation>
     </message>
     <message>
         <source>None</source>
         <comment>ParavirtProvider</comment>
-        <translation type="unfinished">Brak</translation>
+        <translation>Brak</translation>
     </message>
     <message>
         <source>Default</source>
         <comment>ParavirtProvider</comment>
-        <translation type="unfinished">Domyślny</translation>
+        <translation>Domyślny</translation>
     </message>
     <message>
         <source>Legacy</source>
         <comment>ParavirtProvider</comment>
-        <translation type="unfinished"></translation>
+        <translation>Stary</translation>
     </message>
     <message>
         <source>Minimal</source>
         <comment>ParavirtProvider</comment>
-        <translation type="unfinished"></translation>
+        <translation>Minimalny</translation>
     </message>
     <message>
         <source>Hyper-V</source>
         <comment>ParavirtProvider</comment>
-        <translation type="unfinished"></translation>
+        <translation>Hyper-V</translation>
     </message>
     <message>
         <source>KVM</source>
         <comment>ParavirtProvider</comment>
-        <translation type="unfinished"></translation>
+        <translation>KVM</translation>
     </message>
     <message>
         <source>Optical</source>
         <comment>DeviceType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Napęd optyczny</translation>
     </message>
     <message>
         <source>New dynamically allocated storage</source>
         <comment>MediumVariant</comment>
-        <translation type="unfinished"></translation>
+        <translation>Nowa pamięć dynamicznie przydzielana</translation>
     </message>
     <message>
         <source>TCP</source>
         <comment>PortMode</comment>
-        <translation type="unfinished"></translation>
+        <translation>TCP</translation>
     </message>
     <message>
         <source>OHCI</source>
         <comment>USBControllerType</comment>
-        <translation type="unfinished"></translation>
+        <translation>OHCI</translation>
     </message>
     <message>
         <source>EHCI</source>
         <comment>USBControllerType</comment>
-        <translation type="unfinished"></translation>
+        <translation>EHCI</translation>
     </message>
     <message>
         <source>xHCI</source>
         <comment>USBControllerType</comment>
-        <translation type="unfinished"></translation>
+        <translation>xHCI</translation>
     </message>
     <message>
         <source>USB Port %1</source>
         <comment>StorageSlot</comment>
-        <translation type="unfinished"></translation>
+        <translation>Port USB %1</translation>
     </message>
     <message>
         <source>User interface</source>
         <comment>DetailsElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Interfejs użytkownika</translation>
     </message>
     <message>
         <source>(Optical Drive)</source>
-        <translation type="unfinished"></translation>
+        <translation>(Napęd optyczny)</translation>
     </message>
     <message>
         <source>Please choose a virtual hard disk file</source>
-        <translation type="unfinished"></translation>
+        <translation>Wybierz plik wirtualnego dysku twardego</translation>
     </message>
     <message>
         <source>All virtual hard disk files (%1)</source>
-        <translation type="unfinished"></translation>
+        <translation>Wszystkie pliki wirtualnego dysku twardego (%1)</translation>
     </message>
     <message>
         <source>Encrypted</source>
         <comment>medium</comment>
-        <translation type="unfinished"></translation>
+        <translation>Zaszyfrowany</translation>
     </message>
     <message>
         <source>Some of the files in this hard disk chain are inaccessible. Please use the Virtual Medium Manager to inspect these files.</source>
         <comment>medium</comment>
-        <translation type="unfinished"></translation>
+        <translation>Niektóre pliki na łańcuchu dysku twardego są niedostępne. Proszę skorzystać z menedżera nośników wirtualnych, by przejrzeć pliki.</translation>
     </message>
     <message>
         <source>Please choose a location for new virtual hard disk file</source>
-        <translation type="unfinished"></translation>
+        <translation>Proszę wybrać lokalizację dla nowego pliku wirtualnego dysku twardego</translation>
     </message>
     <message>
         <source>USB</source>
         <comment>StorageBus</comment>
-        <translation type="unfinished">USB</translation>
+        <translation>USB</translation>
     </message>
     <message>
         <source>PCIe</source>
         <comment>StorageBus</comment>
-        <translation type="unfinished"></translation>
+        <translation>PCIe</translation>
     </message>
     <message>
         <source>NVMe</source>
         <comment>StorageControllerType</comment>
-        <translation type="unfinished"></translation>
+        <translation>NVMe</translation>
     </message>
     <message>
         <source>NVMe Port %1</source>
         <comment>StorageSlot</comment>
-        <translation type="unfinished"></translation>
+        <translation>Port NVMe %1</translation>
+    </message>
+    <message>
+        <source>RuntimeAttributes</source>
+        <comment>DetailsElementType</comment>
+        <translation type="vanished">Parametry maszyny</translation>
     </message>
     <message>
         <source>General</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Ogólne</translation>
+        <translation>Ogólne</translation>
     </message>
     <message>
         <source>Preview</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Podgląd</translation>
     </message>
     <message>
         <source>System</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">System</translation>
+        <translation>System</translation>
     </message>
     <message>
         <source>Display</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Ekran</translation>
+        <translation>Ekran</translation>
     </message>
     <message>
         <source>Storage</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Nośniki</translation>
+        <translation>Pamięć</translation>
     </message>
     <message>
         <source>Audio</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Dźwięk</translation>
+        <translation>Dźwięk</translation>
     </message>
     <message>
         <source>Network</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Sieć</translation>
+        <translation>Sieć</translation>
     </message>
     <message>
         <source>Serial ports</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation> Porty szeregowe </translation>
     </message>
     <message>
         <source>Parallel ports</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Porty równoległe </translation>
     </message>
     <message>
         <source>USB</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">USB</translation>
+        <translation>USB</translation>
     </message>
     <message>
         <source>Shared folders</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Udostępniane foldery</translation>
     </message>
     <message>
         <source>User interface</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Interfejs użytkownika</translation>
     </message>
     <message>
         <source>Description</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Opis</translation>
+        <translation>Opis</translation>
     </message>
     <message>
         <source>Runtime attributes</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Parametry maszyny</translation>
     </message>
     <message>
         <source>Storage statistics</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Statystyki pamięci</translation>
     </message>
     <message>
         <source>Network statistics</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Statystyki sieci</translation>
     </message>
 </context>
 <context>
@@ -15365,7 +15411,7 @@ Wersja %1</translation>
     </message>
     <message>
         <source>'%1' is an invalid host-combination code-sequence.</source>
-        <translation type="unfinished"></translation>
+        <translation>'%1 jest nieprawidłową kombinacją kodu sekwencji gospodarza.</translation>
     </message>
 </context>
 <context>
@@ -15392,7 +15438,7 @@ Wersja %1</translation>
     </message>
     <message>
         <source>Default &Folders</source>
-        <translation type="obsolete">&Katalogi domyślne</translation>
+        <translation type="obsolete">&folderi domyślne</translation>
     </message>
     <message>
         <source>Machines</source>
@@ -15545,7 +15591,7 @@ written in <b>bold</b>. Select <i>Default</i> to reset
 to the system default language.</qt>
                                     </source>
         <translation type="obsolete">
-<qt>Zawiera listę języków dostępnych dla interfejsu programu. Aktualnie używany język
+<qt>Przechowuje listę języków dostępnych dla interfejsu programu. Aktualnie używany język
 jest zaznaczony <b>pogrubieniem</b>. Wybranie opcji <i>Domyślny</i> przywraca
 języka ustawiony jako domyślny dla systemu.</qt>
                                               </translation>
@@ -15557,35 +15603,35 @@ języka ustawiony jako domyślny dla systemu.</qt>
     </message>
     <message>
         <source>Holds the path to the default VDI folder. This folder is used, if not explicitly specified otherwise, when adding existing or creating new virtual hard disks.</source>
-        <translation type="obsolete">Zawiera ścieżkę do domyślnego katalogu z obrazami dysków VDI. Katalog ten będzie użyty w przypadku, gdy nie zostanie wybrany inny podczas dodawania istniejących bądź tworzenia nowych wirtualnych dysków twardych.</translation>
+        <translation type="obsolete">Przechowuje ścieżkę do domyślnego folderu z obrazami dysków VDI. Folder ten będzie użyty w przypadku, gdy nie zostanie wybrany inny podczas dodawania istniejących bądź tworzenia nowych wirtualnych dysków twardych.</translation>
     </message>
     <message>
         <source>Resets the virtual machine folder path to the default value. The actual default path will be displayed after accepting the changes and opening this window again.</source>
-        <translation type="obsolete">Przywraca domyślną ścieżkę do katalogu maszyn wirtualnych. Nowa ścieżka będzie widoczna po zatwierdzeniu zmian i ponownym otwarciu tego okna.</translation>
+        <translation type="obsolete">Przywraca domyślną ścieżkę do folderu maszyn wirtualnych. Nowa ścieżka będzie widoczna po zatwierdzeniu zmian i ponownym otwarciu tego okna.</translation>
     </message>
     <message>
         <source>Resets the VDI folder path to the default value. The actual default path will be displayed after accepting the changes and opening this window again.</source>
-        <translation type="obsolete">Przywraca domyślną ścieżkę do katalogu z obrazami dysków VDI. Nowa ścieżka będzie widoczna po zatwierdzeniu zmian i ponownym otwarciu tego okna.</translation>
+        <translation type="obsolete">Przywraca domyślną ścieżkę do folderu z obrazami dysków VDI. Nowa ścieżka będzie widoczna po zatwierdzeniu zmian i ponownym otwarciu tego okna.</translation>
     </message>
     <message>
         <source>Holds the path to the default virtual machine folder. This folder is used, if not explicitly specified otherwise, when creating new virtual machines.</source>
-        <translation type="obsolete">Zawiera ścieżkę do domyślnego katalogu maszyn wirtualnych. Katalog ten będzie użyty w przypadku, gdy nie zostanie wybrany inny podczas tworzenia nowych maszyn wirtualnych.</translation>
+        <translation type="obsolete">Przechowuje ścieżkę do domyślnego folderu maszyn wirtualnych. Folder ten będzie użyty w przypadku, gdy nie zostanie wybrany inny podczas tworzenia nowych maszyn wirtualnych.</translation>
     </message>
     <message>
         <source>Opens a window to select the default VDI folder.</source>
-        <translation type="obsolete">Otwiera okno wyboru domyślnego katalogu z obrazami dysków VDI.</translation>
+        <translation type="obsolete">Otwiera okno wyboru domyślnego folderu z obrazami dysków VDI.</translation>
     </message>
     <message>
         <source>Opens a window to select the default virtual machine folder.</source>
-        <translation type="obsolete">Otwiera okno wyboru domyślnego katalogu maszyn wirtualnych.</translation>
+        <translation type="obsolete">Otwiera okno wyboru domyślnego folderu maszyn wirtualnych.</translation>
     </message>
     <message>
         <source>When checked, the keyboard is automatically captured every time the VM window is activated. When the keyboard is captured, all keystrokes (including system ones like Alt-Tab) are directed to the VM.</source>
-        <translation type="obsolete">Po zaznaczeniu tej opcji klawiatura będzie automatycznie przechwytywana za każdym razem, gdy okno maszyny wirtualnej zostanie aktywowane. Po przechwyceniu klawiatury wszystkie kombinacje klawiszowe (włącznie z systemowymi, jak np. Alt-Tab) bedą przekierowywane do maszyny wirtualnej.</translation>
+        <translation type="obsolete">Po zaznaczeniu tej opcji, klawiatura będzie automatycznie przechwytywana za każdym razem, gdy okno maszyny wirtualnej zostanie aktywowane. Po przechwyceniu klawiatury wszystkie kombinacje klawiszowe (włącznie z systemowymi, jak np. Alt-Tab) bedą przekierowywane do maszyny wirtualnej.</translation>
     </message>
     <message>
         <source>Lists all global USB filters. The checkbox to the left defines whether the particular filter is enabled or not.</source>
-        <translation type="obsolete">Zawiera listę wszystkich globalnych filtrów USB. Przełącznik po lewej stronie każdego z filtrów włącza lub wyłącza filtr.</translation>
+        <translation type="obsolete">Przechowuje listę wszystkich globalnych filtrów USB. Przełącznik po lewej stronie każdego z filtrów włącza lub wyłącza filtr.</translation>
     </message>
     <message>
         <source>Adds a new USB filter with all fields initially set to empty strings. Note that such a filter will match any attached USB device.</source>
@@ -15606,7 +15652,7 @@ języka ustawiony jako domyślny dla systemu.</qt>
     </message>
     <message>
         <source>Holds the path to the library that provides authentication for Remote Display (VRDP) clients.</source>
-        <translation type="obsolete">Zawiera ścieżkę do biblioteki obsługującej uwierzytelnianie dla klientów zdalnego pulpitu (VRDP).</translation>
+        <translation type="obsolete">Przechowuje ścieżkę do biblioteki obsługującej uwierzytelnianie dla klientów zdalnego pulpitu (VRDP).</translation>
     </message>
     <message>
         <source>Opens a window to select the VRDP authentication library file.</source>
@@ -15639,7 +15685,7 @@ języka ustawiony jako domyślny dla systemu.</qt>
                                               filters.</qt>
                                             </source>
         <translation type="obsolete">
-                                              <qt>Zawiera listę wszystkich filtrów
+                                              <qt>Przechowuje listę wszystkich filtrów
                                               USB zdefiniowanych dla tej maszyny.
                                               Przełącznik po lewej stronie każdego
                                               z filtrów włącza lub wyłącza filtr.
@@ -15779,7 +15825,7 @@ języka ustawiony jako domyślny dla systemu.</qt>
                                   attachments.</qt>
                                 </source>
         <translation type="obsolete">
-                                  <qt>Zawiera listę wszystkich dysków twardych
+                                  <qt>Przechowuje listę wszystkich dysków twardych
                                   podłączonych do tej maszyny. Aby rozwinąć listę
                                   wyboru, należy kliknąć dwukrotnie lub wcisnąć
                                   <tt>F2</tt>/<tt>Spacja</tt>
@@ -16107,51 +16153,51 @@ języka ustawiony jako domyślny dla systemu.</qt>
     </message>
     <message>
         <source>Type:</source>
-        <translation type="unfinished"></translation>
+        <translation>Typ:</translation>
     </message>
     <message>
         <source>Location:</source>
-        <translation type="unfinished">Ścieżka:</translation>
+        <translation>Położenie:</translation>
     </message>
     <message>
         <source>Format:</source>
-        <translation type="unfinished"></translation>
+        <translation>Format:</translation>
     </message>
     <message>
         <source>Storage details:</source>
-        <translation type="unfinished"></translation>
+        <translation>Szczegóły pamięci:</translation>
     </message>
     <message>
         <source>Attached to:</source>
-        <translation type="unfinished">Podłączone do:</translation>
+        <translation>Podłączony do:</translation>
     </message>
     <message>
         <source>&Copy...</source>
-        <translation type="unfinished"></translation>
+        <translation>&Kopiuj...</translation>
     </message>
     <message>
         <source>&Modify...</source>
-        <translation type="unfinished"></translation>
+        <translation>&Modyfikuj...</translation>
     </message>
     <message>
         <source>Copy an existing disk image file</source>
-        <translation type="unfinished"></translation>
+        <translation>Kopiuje istniejący plik obrazu dysku</translation>
     </message>
     <message>
         <source>Modify the attributes of the selected disk image file</source>
-        <translation type="unfinished"></translation>
+        <translation>Modyfikuje parametry wybranego pliku z obrazem dysku</translation>
     </message>
     <message>
         <source><i>Not&nbsp;Encrypted</i></source>
-        <translation type="unfinished"></translation>
+        <translation><i>Nie&nbsp;zaszyfrowane</i></translation>
     </message>
     <message>
         <source>Encrypted with key:</source>
-        <translation type="unfinished"></translation>
+        <translation>Zaszyfrowane kluczem:</translation>
     </message>
     <message>
         <source>UUID:</source>
-        <translation type="unfinished"></translation>
+        <translation>UUID:</translation>
     </message>
 </context>
 <context>
@@ -16185,7 +16231,7 @@ języka ustawiony jako domyślny dla systemu.</qt>
     </message>
     <message>
         <source>Lists all available host interfaces.</source>
-        <translation type="obsolete">Zawiera listę wszystkich dostępnych interfejsów gospodarza.</translation>
+        <translation type="obsolete">Przechowuje listę wszystkich dostępnych interfejsów gospodarza.</translation>
     </message>
     <message>
         <source>Adds a new host interface.</source>
@@ -16207,7 +16253,7 @@ języka ustawiony jako domyślny dla systemu.</qt>
     </message>
     <message>
         <source>Selects the operating system family that you plan to install into this virtual machine.</source>
-        <translation type="obsolete">Zawiera rodzinę systemu operacyjnego, którego instalacja jest planowana na tej maszynie.</translation>
+        <translation type="obsolete">Przechowuje rodzinę systemu operacyjnego, którego instalacja jest planowana na tej maszynie.</translation>
     </message>
     <message>
         <source>V&ersion:</source>
@@ -16215,7 +16261,7 @@ języka ustawiony jako domyślny dla systemu.</qt>
     </message>
     <message>
         <source>Selects the operating system type that you plan to install into this virtual machine (called a guest operating system).</source>
-        <translation type="obsolete">Zawiera typ systemu operacyjnego, którego instalacja jest planowana na tej maszynie (nazywanego goszczonym systemem operacyjnym).</translation>
+        <translation type="obsolete">Przechowuje typ systemu operacyjnego, którego instalacja jest planowana na tej maszynie (nazywanego goszczonym systemem operacyjnym).</translation>
     </message>
     <message>
         <source>&Version:</source>
@@ -16353,7 +16399,7 @@ języka ustawiony jako domyślny dla systemu.</qt>
     <name>VBoxSFDialog</name>
     <message>
         <source>Shared Folders</source>
-        <translation type="obsolete">Współdzielone katalogi</translation>
+        <translation type="obsolete">Współdzielone folderi</translation>
     </message>
     <message>
         <source>Cancel</source>
@@ -16616,7 +16662,7 @@ języka ustawiony jako domyślny dla systemu.</qt>
     </message>
     <message>
         <source>Display the Virtual Media Manager window</source>
-        <translation type="obsolete">Wyświetla okno Menedżera nośników wirtualnych</translation>
+        <translation type="obsolete">Wyświetla okno menedżera nośników wirtualnych</translation>
     </message>
     <message>
         <source>Log</source>
@@ -16701,7 +16747,7 @@ języka ustawiony jako domyślny dla systemu.</qt>
     </message>
     <message>
         <source>Shared &Folders</source>
-        <translation type="obsolete">W&spółdzielone katalogi</translation>
+        <translation type="obsolete">W&spółdzielone folderi</translation>
     </message>
     <message>
         <source><qt>Lists all shared folders accessible to this machine.
@@ -16710,14 +16756,14 @@ Use
 to access a shared folder named <i>share</i> from a DOS-like OS, or
 <tt>mount -t vboxsf share mount_point</tt>
 to access it from a Linux OS. This feature requires Guest Additions.</qt></source>
-        <translation type="obsolete"><qt>Zawiera listę współdzielonych katalogów dostępnych dla tej maszyny.
+        <translation type="obsolete"><qt>Przechowuje listę współdzielonych folderów dostępnych dla tej maszyny.
 Użycie
 <tt>net use x: \\vboxsvr\udział</tt>
-pozwala uzyskać dostęp do współdzielonego katalogu o nazwie <i>udział</i>
+pozwala uzyskać dostęp do współdzielonego folderu o nazwie <i>udział</i>
 z systemu typu DOS, podobnie
 <tt>mount -t vboxsf udział punkt_montowania</tt>
 pozwala uzyskać dostęp do niego z poziomu systemu Linux.
-Uwaga: funkcja ta wymaga zainstalowania Dodatków (Guest Additions).</qt></translation>
+Uwaga: funkcja ta wymaga zainstalowania Dodatków gościa.</qt></translation>
     </message>
     <message>
         <source>Add</source>
@@ -16725,7 +16771,7 @@ Uwaga: funkcja ta wymaga zainstalowania Dodatków (Guest Additions).</qt><
     </message>
     <message>
         <source>Adds a new shared folder definition.</source>
-        <translation type="obsolete">Dodaje nową definicję współdzielonego katalogu.</translation>
+        <translation type="obsolete">Dodaje nową definicję współdzielonego folderu.</translation>
     </message>
     <message>
         <source>Edit</source>
@@ -16737,27 +16783,27 @@ Uwaga: funkcja ta wymaga zainstalowania Dodatków (Guest Additions).</qt><
     </message>
     <message>
         <source>Removes the selected shared folder definition.</source>
-        <translation type="obsolete">Usuwa wybraną definicję współdzielonego katalogu.</translation>
+        <translation type="obsolete">Usuwa wybraną definicję współdzielonego folderu.</translation>
     </message>
     <message>
         <source>Add a new shared folder</source>
-        <translation type="obsolete">Dodaje nowy współdzielony katalog</translation>
+        <translation type="obsolete">Dodaje nowy współdzielony folder</translation>
     </message>
     <message>
         <source>Edit the selected shared folder</source>
-        <translation type="obsolete">Edycja wybranego współdzielonego katalogu</translation>
+        <translation type="obsolete">Edycja wybranego współdzielonego folderu</translation>
     </message>
     <message>
         <source>Remove the selected shared folder</source>
-        <translation type="obsolete">Usuwa wybrany współdzielony katalog</translation>
+        <translation type="obsolete">Usuwa wybrany współdzielony folder</translation>
     </message>
     <message>
         <source> Machine Folders</source>
-        <translation type="obsolete"> Katalogi maszyny</translation>
+        <translation type="obsolete"> folderi maszyny</translation>
     </message>
     <message>
         <source> Transient Folders</source>
-        <translation type="obsolete"> Katalogi tymczasowe</translation>
+        <translation type="obsolete"> folderi tymczasowe</translation>
     </message>
     <message>
         <source><nobr>Name:&nbsp;&nbsp;%1</nobr><br><nobr>Path:&nbsp;&nbsp;%2</nobr></source>
@@ -16765,11 +16811,11 @@ Uwaga: funkcja ta wymaga zainstalowania Dodatków (Guest Additions).</qt><
     </message>
     <message>
         <source>Edits the selected shared folder definition.</source>
-        <translation type="obsolete">Edycja wybranej definicji współdzielonego katalogu.</translation>
+        <translation type="obsolete">Edycja wybranej definicji współdzielonego folderu.</translation>
     </message>
     <message>
         <source>Add a new shared folder (Ins)</source>
-        <translation type="obsolete">Dodaje nowy współdzielony katalog (Ins)</translation>
+        <translation type="obsolete">Dodaje nowy współdzielony folder (Ins)</translation>
     </message>
     <message>
         <source>Space</source>
@@ -16777,11 +16823,11 @@ Uwaga: funkcja ta wymaga zainstalowania Dodatków (Guest Additions).</qt><
     </message>
     <message>
         <source>Edit the selected shared folder (Space)</source>
-        <translation type="obsolete">Edycja wybranego współdzielonego katalogu (Spacja)</translation>
+        <translation type="obsolete">Edycja wybranego współdzielonego folderu (Spacja)</translation>
     </message>
     <message>
         <source>Remove the selected shared folder (Del)</source>
-        <translation type="obsolete">Usuwa wybrany współdzielony katalog (Del)</translation>
+        <translation type="obsolete">Usuwa wybrany współdzielony folder (Del)</translation>
     </message>
     <message>
         <source>Access</source>
@@ -16793,7 +16839,7 @@ Uwaga: funkcja ta wymaga zainstalowania Dodatków (Guest Additions).</qt><
     </message>
     <message>
         <source>Edit the selected shared folder (Ctrl+Space)</source>
-        <translation type="obsolete">Edycja wybranego współdzielonego katalogu (Ctrl+Spacja)</translation>
+        <translation type="obsolete">Edycja wybranego współdzielonego folderu (Ctrl+Spacja)</translation>
     </message>
     <message>
         <source>Full</source>
@@ -16979,7 +17025,7 @@ Uwaga: funkcja ta wymaga zainstalowania Dodatków (Guest Additions).</qt><
     </message>
     <message>
         <source>Take a snapshot of the current virtual machine state</source>
-        <translation>Wykonuje migawkę aktualnego stanu maszyny wirtualnej</translation>
+        <translation>Zrób migawkę aktualnego stanu maszyny wirtualnej</translation>
     </message>
     <message>
         <source>Revert to Current Snapshot</source>
@@ -17031,23 +17077,23 @@ Uwaga: funkcja ta wymaga zainstalowania Dodatków (Guest Additions).</qt><
     </message>
     <message>
         <source>&Clone...</source>
-        <translation type="unfinished"></translation>
+        <translation>&Sklonuj...</translation>
     </message>
     <message>
         <source>Restore selected snapshot of the virtual machine</source>
-        <translation type="unfinished"></translation>
+        <translation>Przywróć wybraną migawkę maszyny wirtualnej</translation>
     </message>
     <message>
         <source>Delete selected snapshot of the virtual machine</source>
-        <translation type="unfinished"></translation>
+        <translation>Usuń wybraną migawkę maszyny wirtualnej</translation>
     </message>
     <message>
         <source>Display a window with selected snapshot details</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyświetl okno z wybranymi szczegółami migawki</translation>
     </message>
     <message>
         <source>Clone selected virtual machine</source>
-        <translation type="unfinished"></translation>
+        <translation>Sklonuj wybraną maszynę wirtualną</translation>
     </message>
 </context>
 <context>
@@ -17097,7 +17143,7 @@ Uwaga: funkcja ta wymaga zainstalowania Dodatków (Guest Additions).</qt><
     </message>
     <message>
         <source>Snapshot %1</source>
-        <translation type="unfinished">Migawka %1</translation>
+        <translation>Migawka %1</translation>
     </message>
 </context>
 <context>
@@ -17132,7 +17178,7 @@ Uwaga: funkcja ta wymaga zainstalowania Dodatków (Guest Additions).</qt><
     </message>
     <message>
         <source>Holds the filter name.</source>
-        <translation type="obsolete">Zawiera nazwę filtru.</translation>
+        <translation type="obsolete">Przechowuje nazwę filtru.</translation>
     </message>
     <message>
         <source>&Manufacturer</source>
@@ -17203,7 +17249,7 @@ computer when a matching device is attached: give it up to the host OS
         <translation type="obsolete"><qt>Decyduje o tym co zostanie zrobione, jeśli podłączone zostanie
 urządzenie USB pasujące do filtra: pozostawienie jego obsługi systemowi
 operacyjnemu gospodarza (<i>Ignoruj</i>), czy przechwycenie go do
-użytku przez maszyny wirtualne użytkownika (<i>Przytrzymaj</i>).</qt></translation>
+użytku przez maszyny wirtualne użytkownika (<i>PrzyPrzechowujej</i>).</qt></translation>
     </message>
     <message>
         <source><qt>Defines the manufacturer filter as an
@@ -17444,7 +17490,7 @@ Puste pole sprawi, że filtr zadziała dla jakiejkolwiek wartości.</qt></
     </message>
     <message>
         <source>Guest OS Type</source>
-        <translation type="obsolete">Typ systemu operacyjnego gościa</translation>
+        <translation type="obsolete">Typ goszczonego systemu operacyjnego</translation>
     </message>
     <message>
         <source>Hard Disk Statistics</source>
@@ -17557,7 +17603,7 @@ Puste pole sprawi, że filtr zadziała dla jakiejkolwiek wartości.</qt></
     </message>
     <message>
         <source><p>No log files found. Press the <b>Refresh</b> button to rescan the log folder <nobr><b>%1</b></nobr>.</p></source>
-        <translation type="obsolete"><p>Nie znaleziono plików z logami. Proszę wcisnąć przycisk <b>Odśwież</b> aby ponownie przeszukać katalog z logami <nobr><b>%1</b></nobr>.</p></translation>
+        <translation type="obsolete"><p>Nie znaleziono plików z logami. Proszę wcisnąć przycisk <b>Odśwież</b> aby ponownie przeszukać folder z logami <nobr><b>%1</b></nobr>.</p></translation>
     </message>
     <message>
         <source>Save VirtualBox Log As</source>
@@ -17664,7 +17710,7 @@ Puste pole sprawi, że filtr zadziała dla jakiejkolwiek wartości.</qt></
     </message>
     <message>
         <source>Holds the MAC address of this adapter. It contains exactly 12 characters chosen from {0-9,A-F}.</source>
-        <translation type="obsolete">Zawiera adres sieciowy MAC konfigurowanej karty. Adres składa się z 12 znaków z zakresu {0-9,A-F}.</translation>
+        <translation type="obsolete">Przechowuje adres sieciowy MAC konfigurowanej karty. Adres składa się z 12 znaków z zakresu {0-9,A-F}.</translation>
     </message>
     <message>
         <source>Indicates whether the virtual network cable is plugged in on machine startup or not.</source>
@@ -17672,11 +17718,11 @@ Puste pole sprawi, że filtr zadziała dla jakiejkolwiek wartości.</qt></
     </message>
     <message>
         <source>Holds the name of the host interface selected for this adapter.</source>
-        <translation type="obsolete">Zawiera nazwę interfejsu sieciowowego gospodarza wybraną dla tego adaptera.</translation>
+        <translation type="obsolete">Przechowuje nazwę interfejsu sieciowowego gospodarza wybraną dla tego adaptera.</translation>
     </message>
     <message>
         <source>Lists all available host interfaces.</source>
-        <translation type="obsolete">Zawiera listę wszystkich dostępnych interfejsów gospodarza.</translation>
+        <translation type="obsolete">Przechowuje listę wszystkich dostępnych interfejsów gospodarza.</translation>
     </message>
     <message>
         <source>Removes the selected host interface.</source>
@@ -17684,27 +17730,27 @@ Puste pole sprawi, że filtr zadziała dla jakiejkolwiek wartości.</qt></
     </message>
     <message>
         <source>Holds the TAP interface name.</source>
-        <translation type="obsolete">Zawiera nazwę interfejsu sieciowego TAP.</translation>
+        <translation type="obsolete">Przechowuje nazwę interfejsu sieciowego TAP.</translation>
     </message>
     <message>
         <source>Holds the command executed to set up the TAP interface.</source>
-        <translation type="obsolete">Zawiera polecenie, które będzie wywoływane w celu konfiguracji interfejsu sieciowego TAP.</translation>
+        <translation type="obsolete">Przechowuje polecenie, które będzie wywoływane w celu konfiguracji interfejsu sieciowego TAP.</translation>
     </message>
     <message>
         <source>Selects the setup application.</source>
-        <translation type="obsolete">Wybiera aplikację (skrypt) konfigurującą.</translation>
+        <translation type="obsolete">Pozwala wybrać aplikację (skrypt) konfigurującą.</translation>
     </message>
     <message>
         <source>Holds the command executed to terminate the TAP interface.</source>
-        <translation type="obsolete">Zawiera polecenie, które będzie wywoływane w celu dekonfiguracji interfejsu sieciowego TAP.</translation>
+        <translation type="obsolete">Przechowuje polecenie, które będzie wywoływane w celu dekonfiguracji interfejsu sieciowego TAP.</translation>
     </message>
     <message>
         <source>Selects the terminate application.</source>
-        <translation type="obsolete">Wybiera aplikację (skrypt) dekonfigurującą.</translation>
+        <translation type="obsolete">Pozwala wybrać aplikację (skrypt) dekonfigurującą.</translation>
     </message>
     <message>
         <source>Holds the MAC address of this adapter. It contains exactly 12 characters chosen from {0-9,A-F}. Note that the second character must be an even digit.</source>
-        <translation type="obsolete">Zawiera adres MAC konfigurowanej karty sieciowej. Składa się on z dokładnie 12 znaków z zakresu {0-9,A-F}. Uwaga: drugi znak musi być cyfrą parzystą.</translation>
+        <translation type="obsolete">Przechowuje adres MAC konfigurowanej karty sieciowej. Składa się on z dokładnie 12 znaków z zakresu {0-9,A-F}. Uwaga: drugi znak musi być cyfrą parzystą.</translation>
     </message>
     <message>
         <source>&Network Name</source>
@@ -17720,7 +17766,7 @@ Puste pole sprawi, że filtr zadziała dla jakiejkolwiek wartości.</qt></
     </message>
     <message>
         <source>Holds the name of the internal network selected for this adapter.</source>
-        <translation type="obsolete">Zawiera nazwę wewnętrznej sieci wybranej dla tej karty sieciowej.</translation>
+        <translation type="obsolete">Przechowuje nazwę wewnętrznej sieci wybranej dla tej karty sieciowej.</translation>
     </message>
 </context>
 <context>
@@ -17743,7 +17789,7 @@ Puste pole sprawi, że filtr zadziała dla jakiejkolwiek wartości.</qt></
     </message>
     <message>
         <source>Holds the parallel port number. You can choose one of the standard parallel ports or select <b>User-defined</b> and specify port parameters manually.</source>
-        <translation type="obsolete">Zawiera numer portu równoległego. Można wybrać jeden ze standardowych portów równoległych lub zaznaczyć opcję <b>Użytkownika</b> i podać parametry portu ręcznie.</translation>
+        <translation type="obsolete">Przechowuje numer portu równoległego. Można wybrać jeden ze standardowych portów równoległych lub zaznaczyć opcję <b>Użytkownika</b> i podać parametry portu ręcznie.</translation>
     </message>
     <message>
         <source>&IRQ</source>
@@ -17751,7 +17797,7 @@ Puste pole sprawi, że filtr zadziała dla jakiejkolwiek wartości.</qt></
     </message>
     <message>
         <source>Holds the IRQ number of this parallel port. Valid values are integer numbers in range from <tt>0</tt> to <tt>255</tt>. Values greater than <tt>15</tt> may only be used if the <b>I/O APIC</b> is enabled for this virtual machine.</source>
-        <translation type="obsolete">Zawiera numer przerwania IRQ danego portu równoległego. Poprawne wartości to liczby całkowite od <tt>0</tt> do <tt>255</tt>. Wartości większe od <tt>15</tt> mogą być używane tylko, jeśli opcja <b>I/O APIC</b> zostanie włączona w ustawieniach maszyny wirtualnej.</translation>
+        <translation type="obsolete">Przechowuje numer przerwania IRQ danego portu równoległego. Poprawne wartości to liczby całkowite od <tt>0</tt> do <tt>255</tt>. Wartości większe od <tt>15</tt> mogą być używane tylko, jeśli opcja <b>I/O APIC</b> zostanie włączona w ustawieniach maszyny wirtualnej.</translation>
     </message>
     <message>
         <source>I/O Po&rt</source>
@@ -17759,7 +17805,7 @@ Puste pole sprawi, że filtr zadziała dla jakiejkolwiek wartości.</qt></
     </message>
     <message>
         <source>Holds the base I/O port address of this parallel port. This should be a whole number between <tt>0</tt> and <tt>0xFFFF</tt>.</source>
-        <translation type="obsolete">Zawiera adres I/O danego portu równoległego. Poprawne wartości to liczby szesnastkowe od <tt>0</tt> do <tt>0xFFFF</tt>.</translation>
+        <translation type="obsolete">Przechowuje adres I/O danego portu równoległego. Poprawne wartości to liczby szesnastkowe od <tt>0</tt> do <tt>0xFFFF</tt>.</translation>
     </message>
     <message>
         <source>Port &Path</source>
@@ -17767,7 +17813,7 @@ Puste pole sprawi, że filtr zadziała dla jakiejkolwiek wartości.</qt></
     </message>
     <message>
         <source>Holds the host parallel device name.</source>
-        <translation type="obsolete">Zawiera nazwę urządzenia równoległego w systemie gospodarza.</translation>
+        <translation type="obsolete">Przechowuje nazwę urządzenia równoległego w systemie gospodarza.</translation>
     </message>
 </context>
 <context>
@@ -17786,7 +17832,7 @@ Puste pole sprawi, że filtr zadziała dla jakiejkolwiek wartości.</qt></
     </message>
     <message>
         <source>Selects the serial port number. You can choose one of the standard serial ports or select <b>User-defined</b> and specify port parameters manually.</source>
-        <translation type="obsolete">Zawiera numer portu szeregowego. Można wybrać jeden ze standardowych portów szeregowych lub zaznaczyć opcję <b>Użytkownika</b> i podać parametry portu ręcznie.</translation>
+        <translation type="obsolete">Przechowuje numer portu szeregowego. Można wybrać jeden ze standardowych portów szeregowych lub zaznaczyć opcję <b>Użytkownika</b> i podać parametry portu ręcznie.</translation>
     </message>
     <message>
         <source>&IRQ</source>
@@ -17794,7 +17840,7 @@ Puste pole sprawi, że filtr zadziała dla jakiejkolwiek wartości.</qt></
     </message>
     <message>
         <source>Holds the IRQ number of this serial port. Valid values are integer numbers in range from <tt>0</tt> to <tt>255</tt>. Values greater than <tt>15</tt> may only be used if the <b>I/O APIC</b> is enabled for this virtual machine.</source>
-        <translation type="obsolete">Zawiera numer przerwania IRQ danego portu szeregowego. Poprawne wartości to liczby całkowite od <tt>0</tt> do <tt>255</tt>. Wartości większe od <tt>15</tt> mogą być używane tylko, jeśli opcja <b>I/O APIC</b> zostanie włączona w ustawieniach maszyny wirtualnej.</translation>
+        <translation type="obsolete">Przechowuje numer przerwania IRQ danego portu szeregowego. Poprawne wartości to liczby całkowite od <tt>0</tt> do <tt>255</tt>. Wartości większe od <tt>15</tt> mogą być używane tylko, jeśli opcja <b>I/O APIC</b> zostanie włączona w ustawieniach maszyny wirtualnej.</translation>
     </message>
     <message>
         <source>I/O Po&rt</source>
@@ -17802,7 +17848,7 @@ Puste pole sprawi, że filtr zadziała dla jakiejkolwiek wartości.</qt></
     </message>
     <message>
         <source>Holds the base I/O port address of this serial port. This should be a whole number between <tt>0</tt> and <tt>0xFFFF</tt>.</source>
-        <translation type="obsolete">Zawiera adres I/O danego portu szeregowego. Poprawne wartości to liczby szesnastkowe od <tt>0</tt> do <tt>0xFFFF</tt>.</translation>
+        <translation type="obsolete">Przechowuje adres I/O danego portu szeregowego. Poprawne wartości to liczby szesnastkowe od <tt>0</tt> do <tt>0xFFFF</tt>.</translation>
     </message>
     <message>
         <source>Port &Mode</source>
@@ -17830,7 +17876,7 @@ Puste pole sprawi, że filtr zadziała dla jakiejkolwiek wartości.</qt></
     </message>
     <message>
         <source>Holds the path to the serial port's pipe on the host when the port is working in <b>Host Pipe</b> mode, or the host serial device name when the port is working in <b>Host Device</b> mode.</source>
-        <translation type="obsolete">Zawiera ścieżkę do łącza nazwanego portu szeregowego w systemie gospodarza, jeśli port pracuje w trybie <b>Nazwane łącze w systemie gospodarza</b> lub do sprzętowego portu szeregowego, jeśli port pracuje w trybie <b>Sprzętowy port gospodarza</b>.</translation>
+        <translation type="obsolete">Przechowuje ścieżkę do łącza nazwanego portu szeregowego w systemie gospodarza, jeśli port pracuje w trybie <b>Nazwane łącze w systemie gospodarza</b> lub do sprzętowego portu szeregowego, jeśli port pracuje w trybie <b>Sprzętowy port gospodarza</b>.</translation>
     </message>
 </context>
 <context>
@@ -17861,7 +17907,7 @@ Puste pole sprawi, że filtr zadziała dla jakiejkolwiek wartości.</qt></
     </message>
     <message>
         <source>Lists host CD/DVD drives available to insert to the virtual machine.</source>
-        <translation type="obsolete">Zawiera listę napędów CD/DVD systemu gospodarza, dostępnych do zamontowania w maszynie wirtualnej.</translation>
+        <translation type="obsolete">Przechowuje listę napędów CD/DVD systemu gospodarza, dostępnych do zamontowania w maszynie wirtualnej.</translation>
     </message>
     <message>
         <source>When checked, allows the guest to send ATAPI commands directly to the host drive which makes it possible to use CD/DVD writers connected to the host inside the VM. Note that writing audio CD inside the VM is not yet supported.</source>
@@ -17936,7 +17982,7 @@ Puste pole sprawi, że filtr zadziała dla jakiejkolwiek wartości.</qt></
     </message>
     <message>
         <source> Shared Folders </source>
-        <translation type="obsolete"> Współdzielone katalogi </translation>
+        <translation type="obsolete"> Współdzielone folderi </translation>
     </message>
     <message>
         <source>&Identification</source>
@@ -17948,7 +17994,7 @@ Puste pole sprawi, że filtr zadziała dla jakiejkolwiek wartości.</qt></
     </message>
     <message>
         <source>Holds the name of the virtual machine.</source>
-        <translation type="obsolete">Zawiera nazwę maszyny wirtualnej.</translation>
+        <translation type="obsolete">Przechowuje nazwę maszyny wirtualnej.</translation>
     </message>
     <message>
         <source>OS &Type</source>
@@ -17980,7 +18026,7 @@ Puste pole sprawi, że filtr zadziała dla jakiejkolwiek wartości.</qt></
     </message>
     <message>
         <source>Selects the snapshot folder path.</source>
-        <translation type="obsolete">Wybiera ścieżkę do katalogu migawek.</translation>
+        <translation type="obsolete">Pozwala wybrać ścieżkę do folderu migawek.</translation>
     </message>
     <message>
         <source>Reset</source>
@@ -18160,7 +18206,7 @@ Puste pole sprawi, że filtr zadziała dla jakiejkolwiek wartości.</qt></
     </message>
     <message>
         <source>Holds the VRDP Server port.</source>
-        <translation type="obsolete">Zawiera port serwera VRDP.</translation>
+        <translation type="obsolete">Przechowuje port serwera VRDP.</translation>
     </message>
     <message>
         <source>Defines the VRDP authentication method.</source>
@@ -18236,7 +18282,7 @@ Puste pole sprawi, że filtr zadziała dla jakiejkolwiek wartości.</qt></
     </message>
     <message>
         <source>When checked, the VM will act as a Remote Desktop Protocol (RDP) server, allowing remote clients to connect and operate the VM (when it is running) using a standard RDP client.</source>
-        <translation type="obsolete">Po zaznaczeniu tej opcji maszyna wirtualna będzie funkcjonować jako serwer Remote Desktop Protocol (RDP), zezwalając zdalnym klientom na podłączenie się i pracę z tą maszyną (gdy jest włączona), przy użyciu standardowego klienta RDP.</translation>
+        <translation type="obsolete">Po zaznaczeniu tej opcji, maszyna wirtualna będzie funkcjonować jako serwer Remote Desktop Protocol (RDP), zezwalając zdalnym klientom na podłączenie się i pracę z tą maszyną (gdy jest włączona), przy użyciu standardowego klienta RDP.</translation>
     </message>
     <message>
         <source><qt>%1&nbsp;MB</qt></source>
@@ -18302,11 +18348,11 @@ Puste pole sprawi, że filtr zadziała dla jakiejkolwiek wartości.</qt></
     </message>
     <message>
         <source>S&napshot Folder</source>
-        <translation type="obsolete">&Katalog migawek</translation>
+        <translation type="obsolete">&Folder migawek</translation>
     </message>
     <message>
         <source>Selects the operating system type that you plan to install into this virtual machine (called a guest operating system).</source>
-        <translation type="obsolete">Zawiera typ systemu operacyjnego, którego instalacja jest planowana na tej maszynie wirtualnej (zwanego goszczonym systemem operacyjnym).</translation>
+        <translation type="obsolete">Przechowuje typ systemu operacyjnego, którego instalacja jest planowana na tej maszynie wirtualnej (zwanego goszczonym systemem operacyjnym).</translation>
     </message>
     <message>
         <source><qt>When checked, the virtual machine will support
@@ -18326,19 +18372,19 @@ tej opcji po zainstalowaniu na tej maszynie systemu Windows!</qt></transla
     </message>
     <message>
         <source>Selects which clipboard data will be copied between the guest and the host OS. This feature requires Guest Additions to be installed in the guest OS.</source>
-        <translation type="obsolete">Definiuje tryb współdzielenia schowka pomiędzy systemami operacyjnymi gospodarza i goszczonym. Uwaga: opcja ta wymaga zainstalowania Dodatków (Guest Additions) w goszczonym systemie operacyjnym.</translation>
+        <translation type="obsolete">Definiuje tryb współdzielenia schowka pomiędzy systemami operacyjnymi gospodarza i goszczonym. Uwaga: opcja ta wymaga zainstalowania Dodatków gościa w goszczonym systemie operacyjnym.</translation>
     </message>
     <message>
         <source>Holds the path where snapshots of this virtual machine will be stored. Be aware that snapshots can take quite a lot of disk space.</source>
-        <translation type="obsolete">Zawiera ścieżkę, do której będą zapisywane migawki maszyny wirtualnej. Uwaga: migawki mogą zająć sporo miejsca na dysku.</translation>
+        <translation type="obsolete">Przechowuje ścieżkę, do której będą zapisywane migawki maszyny wirtualnej. Uwaga: migawki mogą zająć sporo miejsca na dysku.</translation>
     </message>
     <message>
         <source>Resets the snapshot folder path to the default value. The actual default path will be displayed after accepting the changes and opening this window again.</source>
-        <translation type="obsolete">Przywraca domyślną ścieżkę do katalogu z migawkami. Nowa ścieżka będzie widoczna po zatwierdzeniu zmian i ponownym otwarciu tego okna.</translation>
+        <translation type="obsolete">Przywraca domyślną ścieżkę do folderu z migawkami. Nowa ścieżka będzie widoczna po zatwierdzeniu zmian i ponownym otwarciu tego okna.</translation>
     </message>
     <message>
         <source>Holds the description of the virtual machine. The description field is useful for commenting on configuration details of the installed guest OS.</source>
-        <translation type="obsolete">Zawiera opis maszyny wirtualnej. Można tu umieścić szczegóły dotyczące konfiguracji zainstalowanego jako gościa systemu operacyjnego.</translation>
+        <translation type="obsolete">Przechowuje opis maszyny wirtualnej. Można tu umieścić szczegóły dotyczące konfiguracji zainstalowanego jako gościa systemu operacyjnego.</translation>
     </message>
     <message>
         <source>Invokes the Virtual Disk Manager to create a new or select an existing virtual hard disk to attach.</source>
@@ -18346,7 +18392,7 @@ tej opcji po zainstalowaniu na tej maszynie systemu Windows!</qt></transla
     </message>
     <message>
         <source>Lists host Floppy drives available to insert to the virtual machine.</source>
-        <translation type="obsolete">Zawiera listę napędów dyskietek systemu gospodarza, dostępnych do zamontowania w maszynie wirtualnej.</translation>
+        <translation type="obsolete">Przechowuje listę napędów dyskietek systemu gospodarza, dostępnych do zamontowania w maszynie wirtualnej.</translation>
     </message>
     <message>
         <source>Invokes the Virtual Disk Manager to select a Floppy image to mount.</source>
@@ -18354,7 +18400,7 @@ tej opcji po zainstalowaniu na tej maszynie systemu Windows!</qt></transla
     </message>
     <message>
         <source>Lists host CD/DVD drives available to insert to the virtual machine.</source>
-        <translation type="obsolete">Zawiera listę napędów CD/DVD systemu gospodarza, dostępnych do zamontowania w maszynie wirtualnej.</translation>
+        <translation type="obsolete">Przechowuje listę napędów CD/DVD systemu gospodarza, dostępnych do zamontowania w maszynie wirtualnej.</translation>
     </message>
     <message>
         <source>Invokes the Virtual Disk Manager to select a CD/DVD image to mount.</source>
@@ -18371,7 +18417,7 @@ makes the guest see an audio card, however every access to it will be ignored.&l
     </message>
     <message>
         <source>Lists all USB filters of this machine. The checkbox to the left defines whether the particular filter is enabled or not.</source>
-        <translation type="obsolete">Zawiera listę wszystkich filtrów USB tej maszyny. Przełącznik po lewej stronie każdego z filtrów włącza lub wyłącza filtr.</translation>
+        <translation type="obsolete">Przechowuje listę wszystkich filtrów USB tej maszyny. Przełącznik po lewej stronie każdego z filtrów włącza lub wyłącza filtr.</translation>
     </message>
     <message>
         <source>Adds a new USB filter with all fields initially set to empty strings. Note that such a filter will match any attached USB device.</source>
@@ -18392,7 +18438,7 @@ makes the guest see an audio card, however every access to it will be ignored.&l
     </message>
     <message>
         <source>Lists all available host interfaces.</source>
-        <translation type="obsolete">Zawiera listę wszystkich dostępnych interfejsów gospodarza.</translation>
+        <translation type="obsolete">Przechowuje listę wszystkich dostępnych interfejsów gospodarza.</translation>
     </message>
     <message>
         <source>Adds a new host interface.</source>
@@ -18480,7 +18526,7 @@ makes the guest see an audio card, however every access to it will be ignored.&l
     </message>
     <message>
         <source><qt>Holds the VRDP Server port number. You may specify <tt>0</tt> (zero) to reset the port to the default value.</qt></source>
-        <translation type="obsolete"><qt>Zawiera numer portu serwera VRDP. Aby ustawić port na wartość domyślną, należy wpisać <tt>0</tt> (zero).</qt></translation>
+        <translation type="obsolete"><qt>Przechowuje numer portu serwera VRDP. Aby ustawić port na wartość domyślną, należy wpisać <tt>0</tt> (zero).</qt></translation>
     </message>
     <message>
         <source>Primary Master hard disk is not selected</source>
@@ -18610,7 +18656,7 @@ makes the guest see an audio card, however every access to it will be ignored.&l
     </message>
     <message>
         <source>Audio &Controller</source>
-        <translation type="obsolete">Kontroler &audio</translation>
+        <translation type="obsolete">Karta &dźwiękowa</translation>
     </message>
     <message>
         <source>Selects the type of the virtual sound card. Depending on this value, VirtualBox will provide different audio hardware to the virtual machine.</source>
@@ -18635,7 +18681,7 @@ makes the guest see an audio card, however every access to it will be ignored.&l
                                               remove USB filters.</qt>
                                             </source>
         <translation type="obsolete">
-                                              <qt>Zawiera listę wszystkich filtrów
+                                              <qt>Przechowuje listę wszystkich filtrów
                                               USB zdefiniowanych dla tej maszyny.
                                               Przełącznik po lewej stronie każdego
                                               z filtrów włącza lub wyłącza filtr.
@@ -18750,7 +18796,7 @@ makes the guest see an audio card, however every access to it will be ignored.&l
     </message>
     <message>
         <source>Storage</source>
-        <translation type="obsolete">Nośniki</translation>
+        <translation type="obsolete">Pamięć</translation>
     </message>
     <message>
         <source>Hard Disks</source>
@@ -18790,7 +18836,7 @@ makes the guest see an audio card, however every access to it will be ignored.&l
     </message>
     <message>
         <source>Shared Folders</source>
-        <translation type="obsolete">Współdzielone katalogi</translation>
+        <translation type="obsolete">Współdzielone folderi</translation>
     </message>
     <message>
         <source>Remote Display</source>
@@ -18814,7 +18860,7 @@ makes the guest see an audio card, however every access to it will be ignored.&l
     </message>
     <message>
         <source>you have selected a 64-bit guest OS type for this VM. VirtualBox does not currently support more than one virtual CPU for 64-bit guests executed on 32-bit hosts.</source>
-        <translation type="obsolete">wybrano 64-bitowy system operacyjny dla tej maszyny wirtualnej. VirtualBox aktualnie nie posiada wsparcia dla więcej niż jednego wirtualnego CPU dla 64-bitowych goszczonych systemów uruchamianych na 32-bitowym systemie gospodarza.</translation>
+        <translation type="obsolete">wybrano 64-bitowy system operacyjny dla tej maszyny wirtualnej. VirtualBox aktualnie nie posiada wsparcia dla więcej niż jednego wirtualnego procesora dla 64-bitowych goszczonych systemów uruchamianych na 32-bitowym systemie gospodarza.</translation>
     </message>
     <message>
         <source>you have 2D Video Acceleration enabled. As 2D Video Acceleration is supported for Windows guests only, this feature will be disabled.</source>
@@ -18853,7 +18899,7 @@ makes the guest see an audio card, however every access to it will be ignored.&l
     </message>
     <message>
         <source>Lists host Floppy drives available to insert to the virtual machine.</source>
-        <translation type="obsolete">Zawiera listę napędów dyskietek systemu gospodarza, dostępnych do zamontowania w maszynie wirtualnej.</translation>
+        <translation type="obsolete">Przechowuje listę napędów dyskietek systemu gospodarza, dostępnych do zamontowania w maszynie wirtualnej.</translation>
     </message>
     <message>
         <source>Mounts the specified Floppy image to the virtual Floppy drive.</source>
@@ -18880,7 +18926,7 @@ makes the guest see an audio card, however every access to it will be ignored.&l
     <name>VBoxVMSettingsVRDP</name>
     <message>
         <source>When checked, the VM will act as a Remote Desktop Protocol (RDP) server, allowing remote clients to connect and operate the VM (when it is running) using a standard RDP client.</source>
-        <translation type="obsolete">Po zaznaczeniu tej opcji maszyna wirtualna będzie funkcjonować jako serwer Remote Desktop Protocol (RDP), zezwalając zdalnym klientom na podłączenie się i pracę z tą maszyną (gdy jest włączona), przy użyciu standardowego klienta RDP.</translation>
+        <translation type="obsolete">Po zaznaczeniu tej opcji, maszyna wirtualna będzie funkcjonować jako serwer Remote Desktop Protocol (RDP), zezwalając zdalnym klientom na podłączenie się i pracę z tą maszyną (gdy jest włączona), przy użyciu standardowego klienta RDP.</translation>
     </message>
     <message>
         <source>&Enable VRDP Server</source>
@@ -18892,7 +18938,7 @@ makes the guest see an audio card, however every access to it will be ignored.&l
     </message>
     <message>
         <source>Holds the VRDP Server port number. You may specify <tt>0</tt> (zero) to reset the port to the default value.</source>
-        <translation type="obsolete">Zawiera numer portu serwera VRDP. Aby ustawić port na wartość domyślną, należy wpisać <tt>0</tt> (zero).</translation>
+        <translation type="obsolete">Przechowuje numer portu serwera VRDP. Aby ustawić port na wartość domyślną, należy wpisać <tt>0</tt> (zero).</translation>
     </message>
     <message>
         <source>Authentication &Method:</source>
diff --git a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_tr.ts b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_tr.ts
index 5cb38aa..57cdd5c 100644
--- a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_tr.ts
+++ b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_tr.ts
@@ -1771,52 +1771,52 @@
     <message>
         <source><tr><td>%1:</td><td>%2</td></tr></source>
         <comment>key: value</comment>
-        <translation type="unfinished"></translation>
+        <translation><tr><td>%1:</td><td>%2</td></tr></translation>
     </message>
     <message>
         <source>Issuer</source>
-        <translation type="unfinished"></translation>
+        <translation>Veren</translation>
     </message>
     <message>
         <source>Subject</source>
-        <translation type="unfinished"></translation>
+        <translation>Konu</translation>
     </message>
     <message>
         <source>Not Valid Before</source>
-        <translation type="unfinished"></translation>
+        <translation>Geçerlilik Başlangıcı</translation>
     </message>
     <message>
         <source>Not Valid After</source>
-        <translation type="unfinished"></translation>
+        <translation>Geçerlilik Sonu</translation>
     </message>
     <message>
         <source>Serial Number</source>
-        <translation type="unfinished"></translation>
+        <translation>Seri Numarası</translation>
     </message>
     <message>
         <source>Self-Signed</source>
-        <translation type="unfinished"></translation>
+        <translation>Kendinden İmzalı</translation>
     </message>
     <message>
         <source>Authority (CA)</source>
-        <translation type="unfinished"></translation>
+        <translation>Yetkili (CA)</translation>
     </message>
     <message>
         <source>Public Algorithm</source>
-        <translation type="unfinished"></translation>
+        <translation>Ortak Algoritma</translation>
     </message>
     <message>
         <source>%1 (%2)</source>
         <comment>value (clarification)</comment>
-        <translation type="unfinished"></translation>
+        <translation>%1 (%2)</translation>
     </message>
     <message>
         <source>Signature Algorithm</source>
-        <translation type="unfinished"></translation>
+        <translation>İmza Algoritması</translation>
     </message>
     <message>
         <source>X.509 Version Number</source>
-        <translation type="unfinished"></translation>
+        <translation>X.509 Sürüm Numarası</translation>
     </message>
 </context>
 <context>
@@ -7465,7 +7465,7 @@
     </message>
     <message>
         <source>&Processor(s):</source>
-        <translation>İşl&emci(ler):</translation>
+        <translation>İşl&emci:</translation>
     </message>
     <message>
         <source>When checked, the Physical Address Extension (PAE) feature of the host CPU will be exposed to the virtual machine.</source>
@@ -9612,7 +9612,7 @@
         <source><p>The %n following virtual machine(s) are currently in a saved state: <b>%1</b></p><p>If you continue the runtime state of the exported machine(s) will be discarded. The other machine(s) will not be changed.</p></source>
         <comment>This text is never used with n == 0. Feel free to drop the %n where possible, we only included it because of problems with Qt Linguist (but the user can see how many machines are in the list and doesn't need to be told).</comment>
         <translation>
-            <numerusform><p>Şurada belirtilen %n sanal makine şu anda kaydedildi durumunda: <b>%1</b></p><p>Eğer devam ederseniz, dışa aktarılmış makine(lerin)nin çalışma zamanı durumundan vazgeçilecektir. Diğer makine(ler) değiştirilmeyecektir.</p></numerusform>
+            <numerusform><p>Aşağıdaki %n sanal makine şu anda kaydedildi durumunda: <b>%1</b></p><p>Eğer devam ederseniz, dışa aktarılmış makine(lerin)nin çalışma zamanı durumundan vazgeçilecektir. Diğer makine(ler) değiştirilmeyecektir.</p></numerusform>
         </translation>
     </message>
     <message>
@@ -10012,7 +10012,7 @@
     </message>
     <message>
         <source>The network operation failed with the following error: %1.</source>
-        <translation>Ağ işlemi şurada belirtilen hatadan dolayı başarısız oldu: %1.</translation>
+        <translation>Ağ işlemi aşağıdaki hatadan dolayı başarısız oldu: %1.</translation>
     </message>
 </context>
 <context>
@@ -15301,82 +15301,82 @@ Version %1</source>
     <message>
         <source>General</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Genel</translation>
+        <translation>Genel</translation>
     </message>
     <message>
         <source>Preview</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Önizleme</translation>
+        <translation>Önizleme</translation>
     </message>
     <message>
         <source>System</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Sistem</translation>
+        <translation>Sistem</translation>
     </message>
     <message>
         <source>Display</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Ekran</translation>
+        <translation>Ekran</translation>
     </message>
     <message>
         <source>Storage</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Depolama</translation>
+        <translation>Depolama</translation>
     </message>
     <message>
         <source>Audio</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Ses</translation>
+        <translation>Ses</translation>
     </message>
     <message>
         <source>Network</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Ağ</translation>
+        <translation>Ağ</translation>
     </message>
     <message>
         <source>Serial ports</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Seri b.noktaları</translation>
+        <translation>Seri b.noktaları</translation>
     </message>
     <message>
         <source>Parallel ports</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Paralel b.noktaları</translation>
+        <translation>Paralel b.noktaları</translation>
     </message>
     <message>
         <source>USB</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>USB</translation>
     </message>
     <message>
         <source>Shared folders</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Paylaşılan klasörler</translation>
+        <translation>Paylaşılan klasörler</translation>
     </message>
     <message>
         <source>User interface</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Kullanıcı arayüzü</translation>
+        <translation>Kullanıcı arayüzü</translation>
     </message>
     <message>
         <source>Description</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">Açıklama</translation>
+        <translation>Açıklama</translation>
     </message>
     <message>
         <source>Runtime attributes</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Çalışma zamanı öznitelikleri</translation>
     </message>
     <message>
         <source>Storage statistics</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Depolama istatistikleri</translation>
     </message>
     <message>
         <source>Network statistics</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>Ağ istatistikleri</translation>
     </message>
 </context>
 <context>
diff --git a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_zh_TW.ts b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_zh_TW.ts
index c4ad723..9f8bd38 100644
--- a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_zh_TW.ts
+++ b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_zh_TW.ts
@@ -1105,30 +1105,6 @@
         <translation><b>應用程式由無法驗證的憑證所簽署,發行給「%1」。 我們建議只在匯入時繼續,如果您確認這個項目是受信任的。</b></translation>
     </message>
     <message>
-        <source>Issuer:               %1</source>
-        <translation type="vanished">發行者:               %1</translation>
-    </message>
-    <message>
-        <source>Subject:              %1</source>
-        <translation type="vanished">主旨:              %1</translation>
-    </message>
-    <message>
-        <source>Not Valid Before:     %1</source>
-        <translation type="vanished">在此之前無效:     %1</translation>
-    </message>
-    <message>
-        <source>Not Valid After:      %1</source>
-        <translation type="vanished">在此之後無效:      %1</translation>
-    </message>
-    <message>
-        <source>Serial Number:        %1</source>
-        <translation type="vanished">序號:        %1</translation>
-    </message>
-    <message>
-        <source>Self-Signed:          %1</source>
-        <translation type="vanished">自我簽章:          %1</translation>
-    </message>
-    <message>
         <source>True</source>
         <translation>True</translation>
     </message>
@@ -1137,70 +1113,54 @@
         <translation>False</translation>
     </message>
     <message>
-        <source>Authority (CA):       %1</source>
-        <translation type="vanished">機構 (CA):       %1</translation>
-    </message>
-    <message>
-        <source>Public Algorithm:     %1 (%2)</source>
-        <translation type="vanished">公開演算法:     %1 (%2)</translation>
-    </message>
-    <message>
-        <source>Signature Algorithm:  %1 (%2)</source>
-        <translation type="vanished">簽章演算法:  %1 (%2)</translation>
-    </message>
-    <message>
-        <source>X.509 Version Number: %1</source>
-        <translation type="vanished">X.509 版號: %1</translation>
-    </message>
-    <message>
         <source><tr><td>%1:</td><td>%2</td></tr></source>
         <comment>key: value</comment>
-        <translation type="unfinished"></translation>
+        <translation><tr><td>%1:</td><td>%2</td></tr></translation>
     </message>
     <message>
         <source>Issuer</source>
-        <translation type="unfinished"></translation>
+        <translation>發行者</translation>
     </message>
     <message>
         <source>Subject</source>
-        <translation type="unfinished"></translation>
+        <translation>主旨</translation>
     </message>
     <message>
         <source>Not Valid Before</source>
-        <translation type="unfinished"></translation>
+        <translation>在此之前無效</translation>
     </message>
     <message>
         <source>Not Valid After</source>
-        <translation type="unfinished"></translation>
+        <translation>在此之後無效</translation>
     </message>
     <message>
         <source>Serial Number</source>
-        <translation type="unfinished"></translation>
+        <translation>序號</translation>
     </message>
     <message>
         <source>Self-Signed</source>
-        <translation type="unfinished"></translation>
+        <translation>自我簽章</translation>
     </message>
     <message>
         <source>Authority (CA)</source>
-        <translation type="unfinished"></translation>
+        <translation>機構 (CA)</translation>
     </message>
     <message>
         <source>Public Algorithm</source>
-        <translation type="unfinished"></translation>
+        <translation>公用演算法</translation>
     </message>
     <message>
         <source>%1 (%2)</source>
         <comment>value (clarification)</comment>
-        <translation type="unfinished"></translation>
+        <translation>%1 (%2)</translation>
     </message>
     <message>
         <source>Signature Algorithm</source>
-        <translation type="unfinished"></translation>
+        <translation>簽章演算法</translation>
     </message>
     <message>
         <source>X.509 Version Number</source>
-        <translation type="unfinished"></translation>
+        <translation>X.509 版號</translation>
     </message>
 </context>
 <context>
@@ -2780,10 +2740,6 @@
 <context>
     <name>UIInformationDataAudio</name>
     <message>
-        <source>Audio</source>
-        <translation type="vanished">音訊</translation>
-    </message>
-    <message>
         <source>Host Driver</source>
         <comment>details report (audio)</comment>
         <translation>主機驅動程式</translation>
@@ -2797,11 +2753,6 @@
 <context>
     <name>UIInformationDataDisplay</name>
     <message>
-        <source>Display</source>
-        <comment>details report</comment>
-        <translation type="vanished">顯示</translation>
-    </message>
-    <message>
         <source>Video Memory</source>
         <comment>details report</comment>
         <translation>視訊記憶體</translation>
@@ -2860,11 +2811,6 @@
 <context>
     <name>UIInformationDataGeneral</name>
     <message>
-        <source>General</source>
-        <comment>details report</comment>
-        <translation type="vanished">一般</translation>
-    </message>
-    <message>
         <source>Name</source>
         <comment>details report</comment>
         <translation>名稱</translation>
@@ -2878,10 +2824,6 @@
 <context>
     <name>UIInformationDataNetwork</name>
     <message>
-        <source>Network</source>
-        <translation type="vanished">網路</translation>
-    </message>
-    <message>
         <source>Bridged adapter, %1</source>
         <comment>details report (network)</comment>
         <translation>橋接的介面卡,%1</translation>
@@ -2922,20 +2864,10 @@
         <source>Data Received</source>
         <translation>接收的資料</translation>
     </message>
-    <message>
-        <source>Network Statistics</source>
-        <comment>details report</comment>
-        <translation type="vanished">網路統計</translation>
-    </message>
 </context>
 <context>
     <name>UIInformationDataParallelPorts</name>
     <message>
-        <source>Parallel Ports</source>
-        <comment>details report</comment>
-        <translation type="vanished">並列埠</translation>
-    </message>
-    <message>
         <source>Port %1</source>
         <comment>details report (parallel ports)</comment>
         <translation>連接埠 %1</translation>
@@ -2949,11 +2881,6 @@
 <context>
     <name>UIInformationDataRuntimeAttributes</name>
     <message>
-        <source>Runtime Attributes</source>
-        <comment>details report</comment>
-        <translation type="vanished">執行階段屬性</translation>
-    </message>
-    <message>
         <source>Not Detected</source>
         <comment>guest additions</comment>
         <translation>未偵測到</translation>
@@ -2974,7 +2901,7 @@
     </message>
     <message>
         <source>VM Uptime</source>
-        <translation>VM 正常運行時間</translation>
+        <translation>虛擬機器正常運行時間</translation>
     </message>
     <message>
         <source>Clipboard Mode</source>
@@ -3022,10 +2949,6 @@
 <context>
     <name>UIInformationDataSerialPorts</name>
     <message>
-        <source>Serial Ports</source>
-        <translation type="vanished">串列埠</translation>
-    </message>
-    <message>
         <source>Port %1</source>
         <comment>details report (serial ports)</comment>
         <translation>連接埠 %1</translation>
@@ -3035,11 +2958,6 @@
     <name>UIInformationDataSharedFolders</name>
     <message>
         <source>Shared Folders</source>
-        <comment>details report</comment>
-        <translation type="vanished">共用的資料夾</translation>
-    </message>
-    <message>
-        <source>Shared Folders</source>
         <comment>details report (shared folders)</comment>
         <translation>共用的資料夾</translation>
     </message>
@@ -3047,10 +2965,6 @@
 <context>
     <name>UIInformationDataStorage</name>
     <message>
-        <source>Storage</source>
-        <translation type="vanished">存放裝置</translation>
-    </message>
-    <message>
         <source>(Optical Drive)</source>
         <translation>(光碟機)</translation>
     </message>
@@ -3073,20 +2987,10 @@
         <source>Data Written</source>
         <translation>資料寫入</translation>
     </message>
-    <message>
-        <source>Storage Statistics</source>
-        <comment>details report</comment>
-        <translation type="vanished">存放裝置統計</translation>
-    </message>
 </context>
 <context>
     <name>UIInformationDataSystem</name>
     <message>
-        <source>System</source>
-        <comment>details report</comment>
-        <translation type="vanished">系統</translation>
-    </message>
-    <message>
         <source>Enabled</source>
         <comment>details report (ACPI)</comment>
         <translation>啟用</translation>
@@ -3190,11 +3094,6 @@
 <context>
     <name>UIInformationDataUSB</name>
     <message>
-        <source>USB</source>
-        <comment>details report</comment>
-        <translation type="vanished">USB</translation>
-    </message>
-    <message>
         <source>Disabled</source>
         <comment>details report (USB)</comment>
         <translation>停用</translation>
@@ -3244,7 +3143,7 @@
     </message>
     <message>
         <source>Selects the type of the virtual sound card. Depending on this value, VirtualBox will provide different audio hardware to the virtual machine.</source>
-        <translation>選擇虛擬音效卡的類型。 VirtualBox 將在虛擬機器提供不同的音效硬體,取決於這個值。</translation>
+        <translation>選擇虛擬音效卡的類型。 VirtualBox 將根據這個值在虛擬機器提供不同的音效硬體。</translation>
     </message>
     <message>
         <source>Selects the audio output driver. The <b>Null Audio Driver</b> makes the guest see an audio card, however every access to it will be ignored.</source>
@@ -3438,7 +3337,7 @@
     </message>
     <message>
         <source>When checked, guest screen contents will not be scaled up to compensate for high host screen resolutions.</source>
-        <translation>選取時,將不會放大客體畫面內容以補償高的主機螢幕解析度。</translation>
+        <translation>選取時,將不會放大客體畫面內容來補償高的主機螢幕解析度。</translation>
     </message>
     <message>
         <source>Use &Unscaled HiDPI Output</source>
@@ -3466,7 +3365,7 @@
     </message>
     <message>
         <source>When checked, multiple simultaneous connections to the VM are permitted.</source>
-        <translation>選取時,允許多重同時連線到 VM。</translation>
+        <translation>選取時,允許多重同時連線到虛擬機器。</translation>
     </message>
     <message>
         <source>Holds the filename VirtualBox uses to save the recorded content.</source>
@@ -3717,15 +3616,15 @@
     </message>
     <message>
         <source>Selects the network adapter on the host system that traffic to and from this network card will go through.</source>
-        <translation>選取主機系統中網路卡,流量將透過此網路卡傳入傳出。</translation>
+        <translation>選取主機系統中網路卡,流量將透過此網路卡進出。</translation>
     </message>
     <message>
         <source>Holds the name of the internal network that this network card will be connected to. You can create a new internal network by choosing a name which is not used by any other network cards in this virtual machine or others.</source>
-        <translation>保留這個網路卡將連接的內部網路名稱。 可以選擇名稱以建立新的內部網路,其名稱未在此或其它虛擬機器中由其他任何網路卡所使用。</translation>
+        <translation>保留這個網路卡將連接的內部網路名稱。 可以選擇名稱以建立新的內部網路,其名稱未在此或其它虛擬機器中由其它任何網路卡所使用。</translation>
     </message>
     <message>
         <source>Selects the virtual network adapter on the host system that traffic to and from this network card will go through. You can create and remove adapters using the global network settings in the virtual machine manager window.</source>
-        <translation>選取主機系統中虛擬網路卡,流量將透過此網路卡傳入傳出。 您可以在虛擬機器管裡視窗使用全域網路設定,建立和移除介面卡。</translation>
+        <translation>選取主機系統中虛擬網路卡,流量將透過此網路卡進出。可以使用 [虛擬機器管理員] 視窗中的 [全域網路] 設定建立或移除介面卡。</translation>
     </message>
     <message>
         <source>Selects the driver to be used with this network card.</source>
@@ -3765,7 +3664,7 @@
     </message>
     <message>
         <source>Holds the name of the NAT network that this network card will be connected to. You can create and remove networks using the global network settings in the virtual machine manager window.</source>
-        <translation>保留這個網路卡將連接的 NAT 網路的名稱。 可以使用 [虛擬機器管理員] 視窗中的 [全域網路] 設定建立或移除網路。</translation>
+        <translation>保留這個網路卡將連接的 NAT 網路名稱。 可以使用 [虛擬機器管理員] 視窗中的 [全域網路] 設定建立或移除網路。</translation>
     </message>
     <message>
         <source>Selects how this virtual adapter is attached to the real network of the Host OS.</source>
@@ -4201,7 +4100,7 @@
     </message>
     <message>
         <source>Choose a virtual floppy disk or a physical drive to use with the virtual drive. The virtual machine will see a disk inserted into the drive with the data in the file or on the disk in the physical drive as its contents.</source>
-        <translation>選擇與虛擬磁碟機使用的軟碟或實體磁碟機。 虛擬機器將看到插入軟碟機的磁碟,以檔案中資料或實體軟碟機中磁碟為內容。</translation>
+        <translation>選擇與虛擬磁碟機使用的軟碟或實體磁碟機。 虛擬機器將看到插入軟碟機的磁碟,以檔案中資料或實體軟碟機中磁碟為其內容。</translation>
     </message>
     <message>
         <source>Remove disk from virtual drive</source>
@@ -4392,7 +4291,7 @@
     </message>
     <message>
         <source>Controls the amount of memory provided to the virtual machine. If you assign too much, the machine might not start.</source>
-        <translation>控制要提供給虛擬機器的記憶體數量。如果您指派太多,機器可能無法啟動。</translation>
+        <translation>控制要提供給虛擬機器的記憶體數量。如果您分配太多,機器可能無法啟動。</translation>
     </message>
     <message>
         <source>MB</source>
@@ -4404,7 +4303,7 @@
     </message>
     <message>
         <source>Defines the boot device order. Use the checkboxes on the left to enable or disable individual boot devices. Move items up and down to change the device order.</source>
-        <translation>定義開機裝置順序。 使用左方的核取方塊來啟用或停用個別開機裝置。 上移與下移項目來變更順序。</translation>
+        <translation>定義開機裝置順序。 使用左方的核取方塊來啟用或停用個別開機裝置。 上移與下移項目來變更裝置順序。</translation>
     </message>
     <message>
         <source>Moves the selected boot device down.</source>
@@ -4420,7 +4319,7 @@
     </message>
     <message>
         <source>When checked, the virtual machine will support the Input Output APIC (I/O APIC), which may slightly decrease performance. <b>Note:</b> don't disable this feature after having installed a Windows guest operating system!</source>
-        <translation>勾選時,虛擬機器將支援 Input Output APIC (I/O APIC),這可能略微降低性能。 <b>注意:</b> 安裝 Windows 客體作業系統後不要停用這個功能!</translation>
+        <translation>勾選時,虛擬機器將支援 Input Output APIC (I/O APIC),這可能略微降低效能。 <b>注意:</b> 安裝 Windows 客體作業系統後不要停用這個功能!</translation>
     </message>
     <message>
         <source>Enable &I/O APIC</source>
@@ -4452,7 +4351,7 @@
     </message>
     <message>
         <source>When checked, the virtual machine will try to make use of the host CPU's hardware virtualization extensions such as Intel VT-x and AMD-V.</source>
-        <translation>勾選時,虛擬機器將嘗試使用主機 CPU 的硬體虛擬化擴充比如 Intel VT-x 和 AMD-V。</translation>
+        <translation>勾選時,虛擬機器將嘗試使用主機 CPU 的硬體虛擬化擴充功能比如 Intel VT-x 和 AMD-V。</translation>
     </message>
     <message>
         <source>Enable &VT-x/AMD-V</source>
@@ -4460,7 +4359,7 @@
     </message>
     <message>
         <source>When checked, the virtual machine will try to make use of the nested paging extension of Intel VT-x and AMD-V.</source>
-        <translation>勾選時,虛擬機器將嘗試使用 Intel VT-x 和 AMD-V 的 Nested Paging 擴充。</translation>
+        <translation>勾選時,虛擬機器將嘗試使用 Intel VT-x 和 AMD-V 的 Nested Paging 擴充功能。</translation>
     </message>
     <message>
         <source>Enable Nested Pa&ging</source>
@@ -4468,7 +4367,7 @@
     </message>
     <message>
         <source>When checked, the guest will support the Extended Firmware Interface (EFI), which is required to boot certain guest OSes. Non-EFI aware OSes will not be able to boot if this option is activated.</source>
-        <translation>勾選時,客體將支援Extended Firmware Interface (EFI),某種客體作業系統開機是需要的。 非 EFI 感知的作業系統如果啟用這個選項將無法開機。</translation>
+        <translation>勾選時,客體將支援 Extended Firmware Interface (EFI),特定客體作業系統開機是需要的。 非 EFI 感知的作業系統如果啟用這個選項將無法開機。</translation>
     </message>
     <message>
         <source>Enable &EFI (special OSes only)</source>
@@ -4488,7 +4387,7 @@
     </message>
     <message>
         <source>Selects the chipset to be emulated in this virtual machine. Note that the ICH9 chipset emulation is experimental and not recommended except for guest systems (such as Mac OS X) which require it.</source>
-        <translation>選取要在此虛擬機器模擬的晶片組。 請注意,ICH9 晶片組模擬是實驗性且不建議,除了是需要它的客體系統 (比如 Mac OS X)。</translation>
+        <translation>選取要在此虛擬機器模擬的晶片組。 請注意,ICH9 晶片組模擬是實驗性且不建議,除非是需要它的客體系統 (比如 Mac OS X)。</translation>
     </message>
     <message>
         <source>&Execution Cap:</source>
@@ -4520,7 +4419,7 @@
     </message>
     <message>
         <source>More virtual CPUs are assigned to the virtual machine than the number of physical CPUs on the host system (<b>%1</b>). This is likely to degrade the performance of your virtual machine. Please consider reducing the number of virtual CPUs.</source>
-        <translation>指派超過主機系統實體 CPU (<b>%1</b> 顆) 的虛擬 CPU 到虛擬機器。 這可能會降低虛擬機器的效能。 請考慮降低除虛擬 CPU 數。</translation>
+        <translation>指派超過主機系統實體 CPU (<b>%1</b> 顆) 的虛擬 CPU 到虛擬機器。 這可能會降低虛擬機器的效能。 請考慮降低虛擬 CPU 數。</translation>
     </message>
     <message>
         <source>The processor execution cap is set to a low value. This may make the machine feel slow to respond.</source>
@@ -4536,19 +4435,19 @@
     </message>
     <message>
         <source>The I/O APIC feature is not currently enabled in the Motherboard section of the System page. This is needed in order to support a chip set of type ICH9 you have enabled for this VM. It will be done automatically if you confirm your changes.</source>
-        <translation>目前未在 [系統] 頁的 [主機板] 區啟用 /IO APIC 功能。 這是需要的以便在您啟用的這個 VM 支援 ICH9 類型的晶片組。 如果您確認變更將會自動完成。</translation>
+        <translation>目前未在 [系統] 頁的 [主機板] 區啟用 /IO APIC 功能。 這是需要的以便在您啟用的這個虛擬機器支援 ICH9 類型的晶片組。 如果您確認變更將會自動完成。</translation>
     </message>
     <message>
         <source>USB controller emulation is not currently enabled on the USB page. This is needed to support an emulated USB input device you have enabled for this VM. It will be done automatically if you confirm your changes.</source>
-        <translation>目前沒有在 USB 頁面啟用 USB 控制器模擬。 這是需要的以便在您啟用的這個 VM 支援模擬的 USB 輸入裝置。 如果您確認變更將會自動完成。</translation>
+        <translation>目前沒有在 USB 頁面啟用 USB 控制器模擬。 這是需要的以便在您啟用的這個虛擬機器支援模擬的 USB 輸入裝置。 如果您確認變更將會自動完成。</translation>
     </message>
     <message>
         <source>The I/O APIC feature is not currently enabled in the Motherboard section of the System page. This is needed in order to support more than one virtual processor you have chosen for this VM. It will be done automatically if you confirm your changes.</source>
-        <translation>目前未在 [系統] 頁的 [主機板] 區啟用 /IO APIC 功能。 這是需要的以便在您選擇的這個 VM 支援一個以上的虛擬處理器。 如果您確認變更將會自動完成。</translation>
+        <translation>目前未在 [系統] 頁的 [主機板] 區啟用 /IO APIC 功能。 這是需要的以便在您選擇的這個虛擬機器支援一個以上的虛擬處理器。 如果您確認變更將會自動完成。</translation>
     </message>
     <message>
         <source>Hardware virtualization is not currently enabled in the Acceleration section of the System page. This is needed in order to support more than one virtual processor you have chosen for this VM. It will be done automatically if you confirm your changes.</source>
-        <translation>硬體虛擬化目前未在 [系統] 頁的 [加速] 區啟用。 這是需要的以便在您選擇的這個 VM 支援一個以上的虛擬處理器。 如果您確認變更將會自動完成。</translation>
+        <translation>硬體虛擬化目前未在 [系統] 頁的 [加速] 區啟用。 這是需要的以便在您選擇的這個虛擬機器支援一個以上的虛擬處理器。 如果您確認變更將會自動完成。</translation>
     </message>
     <message>
         <source>When checked, the RTC device will report the time in UTC, otherwise in local (host) time. Unix usually expects the hardware clock to be set to UTC.</source>
@@ -4784,27 +4683,27 @@
     </message>
     <message>
         <source>Holds the vendor ID filter. The <i>exact match</i> string format is <tt>XXXX</tt> where <tt>X</tt> is a hexadecimal digit. An empty string will match any value.</source>
-        <translation>保留供應商 ID 篩選器。 <i>完全相符</i> 字串格式為 <tt>XXXX</tt> 其中 <tt>X</tt> 是十六進位數字。 空字串將符合任何值。</translation>
+        <translation>保留供應商 ID 篩選器。 <i>完全相符</i> 字串格式為 <tt>XXXX</tt> 其中 <tt>X</tt> 是十六進位數字。 空字串將符合任意值。</translation>
     </message>
     <message>
         <source>Holds the product ID filter. The <i>exact match</i> string format is <tt>XXXX</tt> where <tt>X</tt> is a hexadecimal digit. An empty string will match any value.</source>
-        <translation>保留產品 ID 篩選器。 <i>完全相符</i> 字串格式為 <tt>XXXX</tt> 其中 <tt>X</tt> 是十六進位數字。 空字串將符合任何值。</translation>
+        <translation>保留產品 ID 篩選器。 <i>完全相符</i> 字串格式為 <tt>XXXX</tt> 其中 <tt>X</tt> 是十六進位數字。 空字串將符合任意值。</translation>
     </message>
     <message>
         <source>Holds the revision number filter. The <i>exact match</i> string format is <tt>IIFF</tt> where <tt>I</tt> is a decimal digit of the integer part and <tt>F</tt> is a decimal digit of the fractional part. An empty string will match any value.</source>
-        <translation>保留修訂號篩選器。<i>完全相符</i> 字串格式為 <tt>IIFF</tt> 其中 <tt>I</tt> 是十進位數字的整數部分 <tt>F</tt> 是十進位數字的小數部分。 空字串將符合任何值。</translation>
+        <translation>保留修訂號篩選器。<i>完全相符</i> 字串格式為 <tt>IIFF</tt> 其中 <tt>I</tt> 是十進位數字的整數部分 <tt>F</tt> 是十進位數字的小數部分。 空字串將符合任意值。</translation>
     </message>
     <message>
         <source>Holds the manufacturer filter as an <i>exact match</i> string. An empty string will match any value.</source>
-        <translation>保留製造商篩選器為 <i>完全相符</i> 字串。 空字串將符合任何值。</translation>
+        <translation>保留製造商篩選器為 <i>完全相符</i> 字串。 空字串將符合任意值。</translation>
     </message>
     <message>
         <source>Holds the product name filter as an <i>exact match</i> string. An empty string will match any value.</source>
-        <translation>保留產品名稱篩選器為 <i>完全相符</i> 字串。 空字串將符合任何值。</translation>
+        <translation>保留產品名稱篩選器為 <i>完全相符</i> 字串。 空字串將符合任意值。</translation>
     </message>
     <message>
         <source>Holds the serial number filter as an <i>exact match</i> string. An empty string will match any value.</source>
-        <translation>保留序號篩選器為 <i>完全相符</i> 字串。 空字串將符合任何值。</translation>
+        <translation>保留序號篩選器為 <i>完全相符</i> 字串。 空字串將符合任意值。</translation>
     </message>
     <message>
         <source>Holds the host USB port filter as an <i>exact match</i> string. An empty string will match any value.</source>
@@ -4876,22 +4775,22 @@
     </message>
     <message>
         <source>This type of medium is attached directly, allowed to be used concurrently by several machines.</source>
-        <translation>這個媒體類型是直接附加,允許由數部電腦同時使用。</translation>
+        <translation>這個媒體類型是直接附加,允許由數部機器同時使用。</translation>
     </message>
     <message>
         <source>This type of medium is attached directly, and can be used by several machines.</source>
-        <translation>這個媒體類型是直接附加,能由數部電腦使用。</translation>
+        <translation>這個媒體類型是直接附加,能由數部機器使用。</translation>
     </message>
     <message>
         <source>This type of medium is attached indirectly, so that one base medium can be used for several VMs which have their own differencing medium to store their modifications.</source>
-        <translation>這個媒體類型是間接附加,因此數部虛擬電腦能使用一個基礎媒體,虛擬電腦有自己的差異媒體來存放自己的修改。</translation>
+        <translation>這個媒體類型是間接附加,因此數部虛擬機器能使用一個基礎媒體,虛擬機器有自己的差異媒體來存放自己的修改。</translation>
     </message>
 </context>
 <context>
     <name>UIMenuBarEditorWidget</name>
     <message>
         <source>Virtual Screen Resize</source>
-        <translation>虛擬畫面調整大小</translation>
+        <translation>調整虛擬畫面大小</translation>
     </message>
     <message>
         <source>Virtual Screen Mapping</source>
@@ -5728,11 +5627,11 @@
     </message>
     <message>
         <source>Failed to enable video capturing for the virtual machine <b>%1</b>.</source>
-        <translation>啟用虛擬機器 <b>%1</b> 的遠視訊擷取失敗。</translation>
+        <translation>啟用虛擬機器 <b>%1</b> 的視訊擷取失敗。</translation>
     </message>
     <message>
         <source>Failed to disable video capturing for the virtual machine <b>%1</b>.</source>
-        <translation>停用虛擬機器 <b>%1</b> 的遠視訊擷取失敗。</translation>
+        <translation>停用虛擬機器 <b>%1</b> 的視訊擷取失敗。</translation>
     </message>
     <message>
         <source><p>Could not find the <b>VirtualBox Guest Additions</b> disk image file.</p><p>Do you wish to download this disk image file from the Internet?</p></source>
@@ -5968,7 +5867,7 @@
     </message>
     <message>
         <source>Close VM</source>
-        <translation>關閉 VM</translation>
+        <translation>關閉虛擬機器</translation>
     </message>
 </context>
 <context>
@@ -8596,7 +8495,7 @@
     <message>
         <source>Shared folders</source>
         <comment>DetailsElementType</comment>
-        <translation>共用的資料夾</translation>
+        <translation>共用資料夾</translation>
     </message>
     <message>
         <source>Description</source>
@@ -8873,89 +8772,84 @@
         <translation>NVMe 連接埠 %1</translation>
     </message>
     <message>
-        <source>RuntimeAttributes</source>
-        <comment>DetailsElementType</comment>
-        <translation type="vanished">執行階段屬性</translation>
-    </message>
-    <message>
         <source>General</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">一般</translation>
+        <translation>一般</translation>
     </message>
     <message>
         <source>Preview</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">預覽</translation>
+        <translation>預覽</translation>
     </message>
     <message>
         <source>System</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">系統</translation>
+        <translation>系統</translation>
     </message>
     <message>
         <source>Display</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">顯示</translation>
+        <translation>顯示</translation>
     </message>
     <message>
         <source>Storage</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">存放裝置</translation>
+        <translation>存放裝置</translation>
     </message>
     <message>
         <source>Audio</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>音訊</translation>
     </message>
     <message>
         <source>Network</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">網路</translation>
+        <translation>網路</translation>
     </message>
     <message>
         <source>Serial ports</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">串列埠</translation>
+        <translation>串列埠</translation>
     </message>
     <message>
         <source>Parallel ports</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">並列埠</translation>
+        <translation>並列埠</translation>
     </message>
     <message>
         <source>USB</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">USB</translation>
+        <translation>USB</translation>
     </message>
     <message>
         <source>Shared folders</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">共用的資料夾</translation>
+        <translation>共用資料夾</translation>
     </message>
     <message>
         <source>User interface</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">使用者介面</translation>
+        <translation>使用者介面</translation>
     </message>
     <message>
         <source>Description</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished">描述</translation>
+        <translation>描述</translation>
     </message>
     <message>
         <source>Runtime attributes</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>執行階段屬性</translation>
     </message>
     <message>
         <source>Storage statistics</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>存放裝置統計</translation>
     </message>
     <message>
         <source>Network statistics</source>
         <comment>InformationElementType</comment>
-        <translation type="unfinished"></translation>
+        <translation>網路統計</translation>
     </message>
 </context>
 <context>
diff --git a/src/VBox/Frontends/VirtualBox/nls/qt_it.ts b/src/VBox/Frontends/VirtualBox/nls/qt_it.ts
index 92b11ed..c790fe5 100644
--- a/src/VBox/Frontends/VirtualBox/nls/qt_it.ts
+++ b/src/VBox/Frontends/VirtualBox/nls/qt_it.ts
@@ -4753,7 +4753,7 @@ Scegli un nome diverso.</translation>
     </message>
     <message>
         <source>When casting to %1 from %2, the source value cannot be %3.</source>
-        <translation type="unfinished"></translation>
+        <translation>Quando si esegue il cast da %1 a %2, il valore di origine non può essere %3.</translation>
     </message>
     <message>
         <source>Integer division (%1) by zero (%2) is undefined.</source>
@@ -4813,7 +4813,7 @@ Scegli un nome diverso.</translation>
     </message>
     <message>
         <source>The namespace URI in the name for a computed attribute cannot be %1.</source>
-        <translation type="unfinished"></translation>
+        <translation>L'URI dello spazio dei nomi nel nome per un attributo calcolato non può essere %1.</translation>
     </message>
     <message>
         <source>The name for a computed attribute cannot have the namespace URI %1 with the local name %2.</source>
@@ -4821,7 +4821,7 @@ Scegli un nome diverso.</translation>
     </message>
     <message>
         <source>Type error in cast, expected %1, received %2.</source>
-        <translation type="unfinished"></translation>
+        <translation>Errore di tipo nel cast, atteso %1, ricevuto %2.</translation>
     </message>
     <message>
         <source>When casting to %1 or types derived from it, the source value must be of the same type, or it must be a string literal. Type %2 is not allowed.</source>
@@ -4829,7 +4829,7 @@ Scegli un nome diverso.</translation>
     </message>
     <message>
         <source>No casting is possible with %1 as the target type.</source>
-        <translation type="unfinished"></translation>
+        <translation>Non è possibile alcun cast con %1 come tipo di destinazione.</translation>
     </message>
     <message>
         <source>It is not possible to cast from %1 to %2.</source>
@@ -4909,8 +4909,9 @@ Scegli un nome diverso.</translation>
     </message>
     <message numerus="yes">
         <source>%1 takes at most %n argument(s). %2 is therefore invalid.</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
+        <translation>
+            <numerusform>%1 richiede almeno un argomento. %2 non è perciò valido.</numerusform>
+            <numerusform>%1 richiede almeno %n argomenti. %2 non è perciò valido.</numerusform>
         </translation>
     </message>
     <message numerus="yes">
@@ -5094,7 +5095,7 @@ Scegli un nome diverso.</translation>
     </message>
     <message>
         <source>The module import feature is not supported</source>
-        <translation type="unfinished"></translation>
+        <translation>La funzione di importazione dei moduli non è supportata</translation>
     </message>
     <message>
         <source>A variable by name %1 has already been declared in the prolog.</source>
@@ -5102,7 +5103,7 @@ Scegli un nome diverso.</translation>
     </message>
     <message>
         <source>No value is available for the external variable by name %1.</source>
-        <translation type="unfinished"></translation>
+        <translation>Non è disponibile alcun valore per la variabile esterna con nome %1.</translation>
     </message>
     <message>
         <source>The namespace for a user defined function cannot be empty (try the predefined prefix %1 which exists for cases like this)</source>
@@ -5142,7 +5143,7 @@ Scegli un nome diverso.</translation>
     </message>
     <message>
         <source>The %1-axis is unsupported in XQuery</source>
-        <translation type="unfinished"></translation>
+        <translation>L'asse %1 non è supportato in XQuery</translation>
     </message>
     <message>
         <source>%1 is not a valid numeric literal.</source>
diff --git a/src/VBox/Frontends/VirtualBox/nls/qt_ja.ts b/src/VBox/Frontends/VirtualBox/nls/qt_ja.ts
index 1a2a495..9cb0c1a 100644
--- a/src/VBox/Frontends/VirtualBox/nls/qt_ja.ts
+++ b/src/VBox/Frontends/VirtualBox/nls/qt_ja.ts
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS><TS version="1.1" language="ja">
-<defaultcodec></defaultcodec>
+<!DOCTYPE TS>
+<TS version="2.1" language="ja">
 <context>
     <name>MAC_APPLICATION_MENU</name>
     <message>
@@ -35,17 +35,14 @@
 <context>
     <name>AudioOutput</name>
     <message>
-        <location filename="" line="326436454"/>
         <source><html>The audio playback device <b>%1</b> does not work.<br/>Falling back to <b>%2</b>.</html></source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source><html>Switching to the audio playback device <b>%1</b><br/>which just became available and has higher preference.</html></source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Revert back to device '%1'</source>
         <translation type="unfinished"></translation>
     </message>
@@ -53,32 +50,26 @@
 <context>
     <name>Phonon::</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Notifications</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Music</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Video</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Communication</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Games</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Accessibility</source>
         <translation type="unfinished"></translation>
     </message>
@@ -86,13 +77,11 @@
 <context>
     <name>Phonon::Gstreamer::Backend</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Warning: You do not seem to have the package gstreamer0.10-plugins-good installed.
           Some video features have been disabled.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Warning: You do not seem to have the base GStreamer plugins installed.
           All audio and video support has been disabled</source>
         <translation type="unfinished"></translation>
@@ -101,7 +90,6 @@
 <context>
     <name>Phonon::Gstreamer::MediaObject</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Cannot start playback. 
 
 Check your Gstreamer installation and make sure you 
@@ -109,34 +97,28 @@ have libgstreamer-plugins-base installed.</source>
         <translation type="unfinished"></translation>
     </message>
     <message numerus="yes">
-        <location filename="" line="326436454"/>
         <source>A required codec is missing. You need to install the following codec(s) to play this content: %0</source>
         <translation type="unfinished">
             <numerusform></numerusform>
         </translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Could not open media source.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Invalid source type.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Could not locate media source.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Could not open audio device. The device is already in use.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Could not decode media source.</source>
         <translation type="unfinished"></translation>
     </message>
@@ -144,12 +126,10 @@ have libgstreamer-plugins-base installed.</source>
 <context>
     <name>Phonon::VolumeSlider</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Volume: %1%</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Use this slider to adjust the volume. The leftmost position is 0%, the rightmost is %1%</source>
         <translation type="unfinished"></translation>
     </message>
@@ -157,12 +137,10 @@ have libgstreamer-plugins-base installed.</source>
 <context>
     <name>Q3Accel</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1, %2 not defined</source>
         <translation>%1, %2 は定義されていません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Ambiguous %1 not handled</source>
         <translation>曖昧な %1 は扱えません</translation>
     </message>
@@ -170,27 +148,22 @@ have libgstreamer-plugins-base installed.</source>
 <context>
     <name>Q3DataTable</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>True</source>
         <translation>True</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>False</source>
         <translation>False</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Insert</source>
         <translation>挿入</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Update</source>
         <translation>アップデート</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Delete</source>
         <translation>削除</translation>
     </message>
@@ -198,297 +171,238 @@ have libgstreamer-plugins-base installed.</source>
 <context>
     <name>Q3FileDialog</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Copy or Move a File</source>
         <translation>ファイルをコピーまたは移動</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Read: %1</source>
         <translation>読み込み: %1</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Write: %1</source>
         <translation>書き込み: %1</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Cancel</source>
         <translation>キャンセル</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>All Files (*)</source>
         <translation>すべてのファイル(*)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Name</source>
         <translation>名前</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Size</source>
         <translation>サイズ</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Type</source>
         <translation>タイプ</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Date</source>
         <translation>日付</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Attributes</source>
         <translation>属性</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&OK</source>
         <translation>OK(&O)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Look &in:</source>
         <translation>検索する場所(&I):</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>File &name:</source>
         <translation>ファイル名(&N):</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>File &type:</source>
         <translation>ファイルタイプ(&T):</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Back</source>
         <translation>戻る</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>One directory up</source>
         <translation>1つ上のディレクトリへ移動</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Create New Folder</source>
         <translation>新しいフォルダの作成</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>List View</source>
         <translation>一覧表示</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Detail View</source>
         <translation>詳細表示</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Preview File Info</source>
         <translation>ファイル情報のプレビュー</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Preview File Contents</source>
         <translation>ファイルの内容のプレビュー</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Read-write</source>
         <translation>読み込み/書き込み</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Read-only</source>
         <translation>読み込み専用</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Write-only</source>
         <translation>書き込み専用</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Inaccessible</source>
         <translation>アクセス不可</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Symlink to File</source>
         <translation>ファイルへのSymlink</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Symlink to Directory</source>
         <translation>ディレクトリへのSymlink</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Symlink to Special</source>
         <translation>スペシャルへのSymlink</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>File</source>
         <translation>ファイル</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Dir</source>
         <translation>ディレクトリ</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Special</source>
         <translation>スペシャル</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Open</source>
-        <translation>オープン</translation>
+        <translation>開く</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Save As</source>
         <translation>名前を付けて保存</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Open</source>
-        <translation>オープン(&O)</translation>
+        <translation>開く(&O)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Save</source>
         <translation>保存(&S)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Rename</source>
         <translation>名前の変更(&R)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Delete</source>
         <translation>削除(&D)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>R&eload</source>
         <translation>リロード(&E)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Sort by &Name</source>
         <translation>名前順にソート(&N)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Sort by &Size</source>
         <translation>サイズ順にソート(&S)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Sort by &Date</source>
         <translation>日付順にソート(&D)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Unsorted</source>
         <translation>ソート解除(&U)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Sort</source>
         <translation>ソート</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Show &hidden files</source>
         <translation>隠しファイルの表示(&H)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>the file</source>
         <translation>ファイル</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>the directory</source>
         <translation>ディレクトリ</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>the symlink</source>
         <translation>Symlink</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Delete %1</source>
         <translation>%1 の削除</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source><qt>Are you sure you wish to delete %1 "%2"?</qt></source>
         <translation><qt>%1「%2」を削除しますか?</qt></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Yes</source>
         <translation>はい(&Y)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&No</source>
         <translation>いいえ(&N)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>New Folder 1</source>
         <translation>新しいフォルダ1</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>New Folder</source>
         <translation>新しいフォルダ</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>New Folder %1</source>
         <translation>新しいフォルダ %1</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Find Directory</source>
         <translation>ディレクトリの検索</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Directories</source>
         <translation>ディレクトリ</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Directory:</source>
         <translation>ディレクトリ:</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Error</source>
         <translation>エラー</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1
 File not found.
 Check path and filename.</source>
@@ -500,28 +414,24 @@ Check path and filename.</source>
 <context>
     <name>Q3LocalFs</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Could not read directory
 %1</source>
         <translation>ディレクトリを読み込めませんでした
 %1</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Could not create directory
 %1</source>
         <translation>ディレクトリを作成できませんでした
 %1</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Could not remove file or directory
 %1</source>
         <translation>ファイルまたはディレクトリを削除できませんでした
 %1</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Could not rename
 %1
 to
@@ -532,14 +442,12 @@ to
 %2</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Could not open
 %1</source>
         <translation>開けませんでした
 %1</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Could not write
 %1</source>
         <translation>書き込めませんでした
@@ -549,12 +457,10 @@ to
 <context>
     <name>Q3MainWindow</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Line up</source>
         <translation>整列</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Customize...</source>
         <translation>カスタマイズ...</translation>
     </message>
@@ -562,7 +468,6 @@ to
 <context>
     <name>Q3NetworkProtocol</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Operation stopped by the user</source>
         <translation>操作がユーザによって停止されました</translation>
     </message>
@@ -570,7 +475,6 @@ to
 <context>
     <name>Q3ProgressDialog</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Cancel</source>
         <translation>キャンセル</translation>
     </message>
@@ -578,27 +482,22 @@ to
 <context>
     <name>Q3TabDialog</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>OK</source>
         <translation>OK</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Apply</source>
         <translation>適用</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Help</source>
         <translation>ヘルプ</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Defaults</source>
         <translation>デフォルト</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Cancel</source>
         <translation>キャンセル</translation>
     </message>
@@ -606,37 +505,30 @@ to
 <context>
     <name>Q3TextEdit</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Undo</source>
         <translation>元に戻す(&U)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Redo</source>
         <translation>やり直す(&R)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Cu&t</source>
         <translation>切り取り(&T)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Copy</source>
         <translation>コピー(&C)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Paste</source>
         <translation>貼り付け(&P)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Clear</source>
         <translation>消去</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Select All</source>
         <translation>すべてを選択</translation>
     </message>
@@ -644,67 +536,54 @@ to
 <context>
     <name>Q3TitleBar</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>System</source>
         <translation>システム</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Restore up</source>
         <translation>元に戻す</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Minimize</source>
         <translation>最小化</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Restore down</source>
         <translation>元に戻す</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Maximize</source>
         <translation>最大化</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Close</source>
         <translation>閉じる</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Contains commands to manipulate the window</source>
         <translation>ウィンドウを操作するコマンドを含みます</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Puts a minimized back to normal</source>
         <translation>最小化されたウィンドウを元のサイズに戻します</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Moves the window out of the way</source>
         <translation>ウィンドウを隠します</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Puts a maximized window back to normal</source>
         <translation>最大化されたウィンドウを元のサイズに戻します</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Makes the window full screen</source>
         <translation>ウィンドウをフルスクリーンにします</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Closes the window</source>
         <translation>ウィンドウを閉じます</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Holds the name of the window and contains controls to manipulate it</source>
         <translation>ウィンドウの名前を表示し、ウィンドウを操作するコントロールを含みます</translation>
     </message>
@@ -712,7 +591,6 @@ to
 <context>
     <name>Q3ToolBar</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>More...</source>
         <translation>その他...</translation>
     </message>
@@ -720,47 +598,38 @@ to
 <context>
     <name>Q3UrlOperator</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>The protocol `%1' is not supported</source>
         <translation>プロトコル「%1」はサポートされていません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The protocol `%1' does not support listing directories</source>
         <translation>プロトコル「%1」ではディレクトリのリストをサポートしていません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The protocol `%1' does not support creating new directories</source>
         <translation>プロトコル「%1」では新しいディレクトリの作成をサポートしていません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The protocol `%1' does not support removing files or directories</source>
         <translation>プロトコル「%1」ではファイルまたはディレクトリの削除をサポートしていません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The protocol `%1' does not support renaming files or directories</source>
         <translation>プロトコル「%1」ではファイルまたはディレクトリの名前の変更をサポートしていません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The protocol `%1' does not support getting files</source>
         <translation>プロトコル「%1」ではファイルの取得をサポートしていません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The protocol `%1' does not support putting files</source>
         <translation>プロトコル「%1」ではファイルの送信をサポートしていません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The protocol `%1' does not support copying or moving files or directories</source>
         <translation>プロトコル「%1」ではファイルまたはディレクトリのコピーまたは移動をサポートしていません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>(unknown)</source>
         <translation>(不明)</translation>
     </message>
@@ -768,27 +637,22 @@ to
 <context>
     <name>Q3Wizard</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Cancel</source>
         <translation>キャンセル(&C)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>< &Back</source>
         <translation>< 戻る(&B)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Next ></source>
         <translation>次へ(&N) ></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Finish</source>
         <translation>完了(&F)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Help</source>
         <translation>ヘルプ(&H)</translation>
     </message>
@@ -796,22 +660,18 @@ to
 <context>
     <name>QAbstractSocket</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Host not found</source>
         <translation>ホストが見つかりませんでした</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Connection refused</source>
         <translation>接続が拒否されました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Socket operation timed out</source>
         <translation>ソケット操作がタイムアウトしました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Socket is not connected</source>
         <translation>ソケットが接続されていません</translation>
     </message>
@@ -819,17 +679,14 @@ to
 <context>
     <name>QAbstractSpinBox</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Step up</source>
         <translation>上(&S)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Step &down</source>
         <translation>下(&D)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Select All</source>
         <translation type="unfinished"></translation>
     </message>
@@ -837,27 +694,22 @@ to
 <context>
     <name>QApplication</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Activate</source>
         <translation>アクティブに</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Activates the program's main window</source>
         <translation>メインウィンドウをアクティブにする</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Executable '%1' requires Qt %2, found Qt %3.</source>
         <translation>実行可能ファイル '%1' には Qt %2 が必要です。Qt %3 が見つかりました。</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Incompatible Qt Library Error</source>
         <translation>互換性のないQtライブラリエラー</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>QT_LAYOUT_DIRECTION</source>
         <comment>Translate this string to the string 'LTR' in left-to-right languages or to 'RTL' in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout.</comment>
         <translation>LTR</translation>
@@ -866,17 +718,14 @@ to
 <context>
     <name>QCheckBox</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Uncheck</source>
         <translation>選択解除</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Check</source>
         <translation>選択</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Toggle</source>
         <translation>反転</translation>
     </message>
@@ -884,57 +733,46 @@ to
 <context>
     <name>QColorDialog</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Hu&e:</source>
         <translation>色相(&E):</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Sat:</source>
         <translation>彩度(&S):</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Val:</source>
         <translation>明度(&V):</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Red:</source>
         <translation>赤(&R):</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Green:</source>
         <translation>緑(&G):</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Bl&ue:</source>
         <translation>青(&U):</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>A&lpha channel:</source>
         <translation>アルファチャネル(&L):</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Basic colors</source>
         <translation>基本的なカラー(&B)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Custom colors</source>
         <translation>カスタムカラー(&C)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Add to Custom Colors</source>
         <translation>カスタムカラーに追加(&A)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Select color</source>
         <translation>カラーの選択</translation>
     </message>
@@ -942,22 +780,18 @@ to
 <context>
     <name>QComboBox</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Open</source>
-        <translation>オープン</translation>
+        <translation>開く</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>False</source>
         <translation>False</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>True</source>
         <translation>True</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Close</source>
         <translation>閉じる</translation>
     </message>
@@ -965,49 +799,41 @@ to
 <context>
     <name>QCoreApplication</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: permission denied</source>
         <comment>QSystemSemaphore</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: already exists</source>
         <comment>QSystemSemaphore</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: doesn't exists</source>
         <comment>QSystemSemaphore</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: out of resources</source>
         <comment>QSystemSemaphore</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: unknown error %2</source>
         <comment>QSystemSemaphore</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: key is empty</source>
         <comment>QSystemSemaphore</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: unable to make key</source>
         <comment>QSystemSemaphore</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: ftok failed</source>
         <comment>QSystemSemaphore</comment>
         <translation type="unfinished"></translation>
@@ -1016,22 +842,18 @@ to
 <context>
     <name>QDB2Driver</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to connect</source>
         <translation>接続できません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to commit transaction</source>
         <translation>トランザクションをコミットできません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to rollback transaction</source>
         <translation>トランザクションをロールバックできません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to set autocommit</source>
         <translation>オートコミットを設定できません</translation>
     </message>
@@ -1039,32 +861,26 @@ to
 <context>
     <name>QDB2Result</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to execute statement</source>
         <translation>ステートメントを実行できません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to prepare statement</source>
         <translation>プリペアステートメントを使えません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to bind variable</source>
         <translation>変数をバインドできません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to fetch record %1</source>
         <translation>レコード %1 をフェッチできません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to fetch next</source>
         <translation>次のレコードをフェッチできません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to fetch first</source>
         <translation>最初のレコードをフェッチできません</translation>
     </message>
@@ -1072,22 +888,18 @@ to
 <context>
     <name>QDateTimeEdit</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>AM</source>
         <translation>AM</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>am</source>
         <translation>am</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>PM</source>
         <translation>PM</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>pm</source>
         <translation>pm</translation>
     </message>
@@ -1095,17 +907,14 @@ to
 <context>
     <name>QDial</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>QDial</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>SpeedoMeter</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>SliderHandle</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1113,12 +922,10 @@ to
 <context>
     <name>QDialog</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>What's This?</source>
         <translation>ヒント</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Done</source>
         <translation>終了</translation>
     </message>
@@ -1126,107 +933,86 @@ to
 <context>
     <name>QDialogButtonBox</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>OK</source>
         <translation>OK</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Cancel</source>
         <translation>キャンセル</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Apply</source>
         <translation>適用</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Ignore</source>
         <translation>無視</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Retry</source>
         <translation>再試行</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Abort</source>
         <translation>中止</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Help</source>
         <translation>ヘルプ</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Save</source>
         <translation>保存</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Open</source>
-        <translation>オープン</translation>
+        <translation>開く</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Close</source>
         <translation>閉じる</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Reset</source>
         <translation>リセット</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Don't Save</source>
         <translation>保存しない</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Close without Saving</source>
         <translation>保存せずに閉じる</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Discard</source>
         <translation>変更を破棄</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Yes</source>
         <translation>はい(&Y)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Yes to &All</source>
         <translation>全てにはい(&A)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&No</source>
         <translation>いいえ(&N)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>N&o to All</source>
         <translation>全てにいいえ(&O)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Save All</source>
         <translation>すべて保存</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Restore Defaults</source>
         <translation>デフォルトに戻す</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&OK</source>
         <translation>OK(&O)</translation>
     </message>
@@ -1234,28 +1020,23 @@ to
 <context>
     <name>QDirModel</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Name</source>
         <translation>名前</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Size</source>
         <translation>サイズ</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Date Modified</source>
         <translation>更新日</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Kind</source>
         <comment>Match OS X Finder</comment>
         <translation>種類</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Type</source>
         <comment>All other platforms</comment>
         <translation>タイプ</translation>
@@ -1264,17 +1045,14 @@ to
 <context>
     <name>QDockWidget</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Close</source>
         <translation>閉じる</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Dock</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Float</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1282,12 +1060,10 @@ to
 <context>
     <name>QDoubleSpinBox</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>More</source>
         <translation>増やす</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Less</source>
         <translation>減らす</translation>
     </message>
@@ -1295,27 +1071,22 @@ to
 <context>
     <name>QErrorMessage</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Debug Message:</source>
         <translation>デバッグメッセージ:</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Warning:</source>
         <translation>警告:</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Fatal Error:</source>
         <translation>致命的エラー:</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Show this message again</source>
         <translation>次回もこのメッセージを表示する(&S)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&OK</source>
         <translation>OK(&O)</translation>
     </message>
@@ -1323,49 +1094,40 @@ to
 <context>
     <name>QFileDialog</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>All Files (*)</source>
         <translation>すべてのファイル(*)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Directories</source>
         <translation>ディレクトリ</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Directory:</source>
         <translation>ディレクトリ:</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>File &name:</source>
         <translation>ファイル名(&N):</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Open</source>
-        <translation>オープン(&O)</translation>
+        <translation>開く(&O)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Save</source>
         <translation>保存(&S)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Open</source>
-        <translation>オープン</translation>
+        <translation>開く</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 already exists.
 Do you want to replace it?</source>
         <translation>%1はすでに存在します。
 置き換えますか?</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1
 File not found.
 Please verify the correct file name was given.</source>
@@ -1374,12 +1136,10 @@ Please verify the correct file name was given.</source>
 正しいファイル名が入力されたかどうか確認してください。</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>My Computer</source>
         <translation>マイ コンピュータ</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1
 Directory not found.
 Please verify the correct directory name was given.</source>
@@ -1388,124 +1148,100 @@ Please verify the correct directory name was given.</source>
 正しいディレクトリ名が入力されたかどうか確認してください。</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Rename</source>
         <translation>名前の変更(&R)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Delete</source>
         <translation>削除(&D)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Show &hidden files</source>
         <translation>隠しファイルの表示(&H)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Back</source>
         <translation>戻る</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Parent Directory</source>
         <translation>親ディレクトリ</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Create New Folder</source>
         <translation>新しいフォルダの作成</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>List View</source>
         <translation>一覧表示</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Detail View</source>
         <translation>詳細表示</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Look in:</source>
         <translation>検索する場所:</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Files of type:</source>
         <translation>ファイルの種類:</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Drive</source>
         <translation>ドライブ</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>File</source>
         <translation>ファイル</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unknown</source>
         <translation>不明</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Save As</source>
         <translation>名前を付けて保存</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>'%1' is write protected.
 Do you want to delete it anyway?</source>
         <translation>'%1' は書き込みが禁止されています。
 本当に削除しますか?</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Are sure you want to delete '%1'?</source>
         <translation>'%1' を本当に削除しますか?</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Could not delete directory.</source>
         <translation>ディレクトリを削除できませんでした。</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Find Directory</source>
         <translation>ディレクトリの検索</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Show </source>
         <translation>表示</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&New Folder</source>
         <translation>新しいフォルダ(&N)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Choose</source>
         <translation>選択(&C)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>New Folder</source>
         <translation>新しいフォルダ</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Forward</source>
         <translation>進む</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Remove</source>
         <translation>除去</translation>
     </message>
@@ -1513,74 +1249,60 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QFileSystemModel</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Name</source>
         <translation>名前</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Size</source>
         <translation>サイズ</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Date Modified</source>
         <translation>更新日</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Kind</source>
         <comment>Match OS X Finder</comment>
         <translation>種類</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Type</source>
         <comment>All other platforms</comment>
         <translation>タイプ</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 TB</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 GB</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 MB</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 KB</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 bytes</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Invalid filename</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source><b>The name "%1" can not be used.</b><p>Try using another name, with fewer characters or no punctuations marks.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>My Computer</source>
         <translation type="unfinished">マイ コンピュータ</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Computer</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1588,207 +1310,166 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QFontDatabase</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Normal</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Bold</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Demi Bold</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Black</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Demi</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Light</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Italic</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Oblique</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Any</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Latin</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Greek</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Cyrillic</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Armenian</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Hebrew</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Arabic</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Syriac</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Thaana</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Devanagari</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Bengali</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Gurmukhi</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Gujarati</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Oriya</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Tamil</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Telugu</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Kannada</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Malayalam</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Sinhala</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Thai</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Lao</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Tibetan</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Myanmar</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Georgian</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Khmer</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Simplified Chinese</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Traditional Chinese</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Japanese</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Korean</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Vietnamese</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Symbol</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Ogham</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Runic</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1796,47 +1477,38 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QFontDialog</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Font</source>
         <translation>フォント(&F)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Font st&yle</source>
         <translation>フォントスタイル(&Y)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Size</source>
         <translation>サイズ(&S)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Effects</source>
         <translation>文字飾り</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Stri&keout</source>
         <translation>取り消し線(&K)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Underline</source>
         <translation>下線(&U)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Sample</source>
         <translation>サンプル</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Wr&iting System</source>
         <translation>言語(&I)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Select Font</source>
         <translation>フォントの選択</translation>
     </message>
@@ -1844,120 +1516,100 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QFtp</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Not connected</source>
         <translation>未接続です</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Host %1 not found</source>
         <translation>ホスト %1 が見つかりませんでした</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Connection refused to host %1</source>
         <translation>ホスト %1 への接続が拒否されました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Connected to host %1</source>
         <translation>ホスト %1 に接続しました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Connection refused for data connection</source>
         <translation>データ接続のための接続が拒否されました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unknown error</source>
         <translation>不明なエラー</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Connecting to host failed:
 %1</source>
         <translation>ホストへの接続に失敗しました:
 %1</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Login failed:
 %1</source>
         <translation>ログインに失敗しました:
 %1</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Listing directory failed:
 %1</source>
         <translation>ディレクトリのリストに失敗しました:
 %1</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Changing directory failed:
 %1</source>
         <translation>ディレクトリの変更に失敗しました:
 %1</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Downloading file failed:
 %1</source>
         <translation>ファイルのダウンロードに失敗しました:
 %1</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Uploading file failed:
 %1</source>
         <translation>ファイルのアップロードに失敗しました:
 %1</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Removing file failed:
 %1</source>
         <translation>ファイルの削除に失敗しました:
 %1</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Creating directory failed:
 %1</source>
         <translation>ディレクトリの作成に失敗しました:
 %1</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Removing directory failed:
 %1</source>
         <translation>ディレクトリの削除に失敗しました:
 %1</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Connection closed</source>
         <translation>接続が閉じられました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Host %1 found</source>
         <translation>ホスト %1 が見つかりました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Connection to %1 closed</source>
         <translation>%1 への接続が閉じられました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Host found</source>
         <translation>ホストが見つかりました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Connected to host</source>
         <translation>ホストに接続しました</translation>
     </message>
@@ -1965,7 +1617,6 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QHostInfo</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unknown error</source>
         <translation>不明なエラー</translation>
     </message>
@@ -1973,17 +1624,14 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QHostInfoAgent</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Host not found</source>
         <translation>ホストが見つかりません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unknown address type</source>
         <translation>不明なアドレス型です</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unknown error</source>
         <translation>不明なエラー</translation>
     </message>
@@ -1991,127 +1639,102 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QHttp</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unknown error</source>
         <translation>不明なエラー</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Request aborted</source>
         <translation>要求が中止されました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>No server set to connect to</source>
         <translation>接続が設定されているサーバがありません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Wrong content length</source>
         <translation>コンテンツの長さが正しくありません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Server closed connection unexpectedly</source>
         <translation>サーバの接続が予期せず閉じられました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Connection refused</source>
         <translation>接続が拒否されました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Host %1 not found</source>
         <translation>ホスト %1 が見つかりませんでした</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>HTTP request failed</source>
         <translation>HTTP要求に失敗しました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Invalid HTTP response header</source>
         <translation>無効なHTTP応答ヘッダです</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Invalid HTTP chunked body</source>
         <translation>無効なHTTPチャンクドボディです</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Host %1 found</source>
         <translation>ホスト %1 が見つかりました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Connected to host %1</source>
         <translation>ホスト %1 に接続しました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Connection to %1 closed</source>
         <translation>%1 への接続が閉じられました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Host found</source>
         <translation>ホストが見つかりました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Connected to host</source>
         <translation>ホストに接続しました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Connection closed</source>
         <translation>接続が閉じられました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Proxy authentication required</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Authentication required</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>HTTPS connection requested but SSL support not compiled in</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Connection refused (or timed out)</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Proxy requires authentication</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Host requires authentication</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Data corrupted</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unknown protocol specified</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>SSL handshake failed</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2119,7 +1742,6 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QHttpSocketEngine</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Authentication required</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2127,22 +1749,18 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QIBaseDriver</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Error opening database</source>
-        <translation>データベースのオープンでエラーが発生しました</translation>
+        <translation type="unfinished">データベースを開く際にエラーが発生しました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Could not start transaction</source>
         <translation>トランザクションを開始できませんでした</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to commit transaction</source>
         <translation>トランザクションをコミットできません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to rollback transaction</source>
         <translation>トランザクションをロールバックできません</translation>
     </message>
@@ -2150,87 +1768,70 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QIBaseResult</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to create BLOB</source>
         <translation>バイナリラージオブジェクトを作成できません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to write BLOB</source>
         <translation>バイナリラージオブジェクトを書き込めません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to open BLOB</source>
-        <translation>バイナリラージオブジェクトをオープンできません</translation>
+        <translation>バイナリラージオブジェクトを開けません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to read BLOB</source>
         <translation>バイナリラージオブジェクトを読み込めません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Could not find array</source>
         <translation>配列が見つかりませんでした</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Could not get array data</source>
         <translation>配列データを取得できませんでした</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Could not get query info</source>
         <translation>クエリー情報を取得できませんでした</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Could not start transaction</source>
         <translation>トランザクションを開始できませんでした</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to commit transaction</source>
         <translation>トランザクションをコミットできません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Could not allocate statement</source>
         <translation>ステートメントの領域を確保できませんでした</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Could not prepare statement</source>
         <translation>プリペアステートメントを使えませんでした</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Could not describe input statement</source>
         <translation>INPUT ステートメントの情報を取得できませんでした</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Could not describe statement</source>
         <translation>ステートメントの情報を取得できませんでした</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to close statement</source>
         <translation>ステートメントをクローズできません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to execute query</source>
         <translation>クエリーを実行できません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Could not fetch next item</source>
         <translation>次のレコードをフェッチできませんでした</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Could not get statement info</source>
         <translation>ステートメントの情報を取得できませんでした</translation>
     </message>
@@ -2238,27 +1839,22 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QIODevice</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Permission denied</source>
         <translation>許可されていません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Too many open files</source>
         <translation>開かれたファイルが多すぎます</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>No such file or directory</source>
         <translation>そのようなファイルやディレクトリはありません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>No space left on device</source>
         <translation>デバイスの残り容量がありません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unknown error</source>
         <translation>不明なエラー</translation>
     </message>
@@ -2266,22 +1862,18 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QInputContext</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>XIM</source>
         <translation>XIM</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>XIM input method</source>
         <translation>XIM 入力メソッド</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Windows input method</source>
         <translation>Windows 入力メソッド</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Mac OS X input method</source>
         <translation>Mac OS X 入力メソッド</translation>
     </message>
@@ -2289,62 +1881,50 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QLibrary</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Could not mmap '%1': %2</source>
         <translation>'%1' をメモリにマッピングできませんでした: %2</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Plugin verification data mismatch in '%1'</source>
         <translation>'%1' でプラグイン検証データが一致しません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Could not unmap '%1': %2</source>
         <translation>'%1' のマッピングを解除できませんでした: %2</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The plugin '%1' uses incompatible Qt library. (%2.%3.%4) [%5]</source>
         <translation>プラグイン '%1' は、互換性のない Qt ライブラリを使用しています。(%2.%3.%4) [%5]</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The plugin '%1' uses incompatible Qt library. Expected build key "%2", got "%3"</source>
         <translation>プラグイン '%1' は、互換性のない Qt ライブラリを使用しています。ビルドキー "%2" が必要ですが、"%3" しかありません </translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unknown error</source>
         <translation>不明なエラー</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>QLibrary::load_sys: Cannot load %1 (%2)</source>
         <translation>QLibrary::load_sys: %1 をロードできません (%2)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>QLibrary::unload_sys: Cannot unload %1 (%2)</source>
         <translation>QLibrary::unload_sys: %1 をアンロードできません (%2)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>QLibrary::resolve_sys: Symbol "%1" undefined in %2 (%3)</source>
         <translation>QLibrary::resolve_sys: シンボル "%1" は %2 で定義されていません (%3)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The shared library was not found.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The file '%1' is not a valid Qt plugin.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The plugin '%1' uses incompatible Qt library. (Cannot mix debug and release libraries.)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2352,37 +1932,30 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QLineEdit</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Undo</source>
         <translation>元に戻す(&U)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Redo</source>
         <translation>やり直す(&R)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Cu&t</source>
         <translation>切り取り(&T)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Copy</source>
         <translation>コピー(&C)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Paste</source>
         <translation>貼り付け(&P)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Delete</source>
         <translation>削除</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Select All</source>
         <translation>すべてを選択</translation>
     </message>
@@ -2390,22 +1963,18 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QLocalServer</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: Name error</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: Permission denied</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: Address in use</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: Unknown error %2</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2413,52 +1982,42 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QLocalSocket</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: Connection refused</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: Remote closed</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: Invalid name</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: Socket access error</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: Socket resource error</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: Socket operation timed out</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: Datagram too large</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: Connection error</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: The socket operation is not supported</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: Unknown error %2</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2466,27 +2025,22 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QMYSQLDriver</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to open database '</source>
-        <translation>データベースをオープンできません '</translation>
+        <translation>データベースを開くことができません '</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to connect</source>
         <translation>接続できません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to begin transaction</source>
         <translation>トランザクションを開始できません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to commit transaction</source>
         <translation>トランザクションをコミットできません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to rollback transaction</source>
         <translation>トランザクションをロールバックできません</translation>
     </message>
@@ -2494,57 +2048,46 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QMYSQLResult</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to fetch data</source>
         <translation>データをフェッチできません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to execute query</source>
         <translation>クエリーを実行できません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to store result</source>
         <translation>実行結果を記録できません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to prepare statement</source>
         <translation>プリペアステートメントを使えません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to reset statement</source>
         <translation>ステートメントをリセットできません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to bind value</source>
         <translation>値をバインドできません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to execute statement</source>
         <translation>ステートメントを実行できません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to bind outvalues</source>
         <translation>出力値をバインドできません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to store statement results</source>
         <translation>ステートメントの実行結果を記録できません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to execute next query</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to store next result</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2552,7 +2095,6 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QMdiArea</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>(Untitled)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2560,92 +2102,74 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QMdiSubWindow</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 - [%2]</source>
         <translation type="unfinished">%1 - [%2]</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Close</source>
-        <translation type="unfinished">閉じる</translation>
+        <translation>閉じる</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Minimize</source>
         <translation type="unfinished">最小化</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Restore Down</source>
         <translation type="unfinished">元に戻す</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Restore</source>
         <translation type="unfinished">元に戻す(&R)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Move</source>
         <translation type="unfinished">移動(&M)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Size</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Mi&nimize</source>
         <translation type="unfinished">最小化(&N)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Ma&ximize</source>
         <translation type="unfinished">最大化(&X)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Stay on &Top</source>
         <translation type="unfinished">常に手前に表示(&T)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Close</source>
-        <translation type="unfinished">閉じる(&C)</translation>
+        <translation>閉じる(&C)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>- [%1]</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Maximize</source>
         <translation type="unfinished">最大化</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unshade</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Shade</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Restore</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Help</source>
         <translation type="unfinished">ヘルプ</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Menu</source>
         <translation type="unfinished">メニュー</translation>
     </message>
@@ -2653,17 +2177,14 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QMenu</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Close</source>
         <translation>閉じる</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Open</source>
-        <translation>オープン</translation>
+        <translation>開く</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Execute</source>
         <translation>実行</translation>
     </message>
@@ -2671,43 +2192,35 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QMessageBox</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Help</source>
         <translation>ヘルプ</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>OK</source>
         <translation>OK</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source><p>This program uses Qt version %1.</p></source>
         <translation><p>このプログラムは Qt バージョン %1 を使用しています。</p></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source><p>This program uses Qt Open Source Edition version %1.</p><p>Qt Open Source Edition is intended for the development of Open Source applications. You need a commercial Qt license for development of proprietary (closed source) applications.</p><p>Please see <a href="http://www.trolltech.com/company/model/">www.trolltech.com/company/model/</a> for an overview of Qt licensing.</p></source>
         <translation><p>このプログラムは Qt オープンソース版バージョン %1 を使用しています。</p>
 <p>Qt オープンソース版はオープンソースのアプリケーションの開発用です。ソースコードを公開しない商用アプリケーションを開発するには商用版のライセンスが必要です。</p><p>Qtのライセンスについては<tt>http://www.trolltech.com/company/model.html</tt>を参照してください。</p></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>About Qt</source>
         <translation>Qt について</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Show Details...</source>
         <translation>詳細を表示...</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Hide Details...</source>
         <translation>詳細を隠す...</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source><h3>About Qt</h3>%1<p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is a Nokia product. See <a href="http://www.trolltech.com/qt/">www.trolltech.com/qt/&l [...]
         <translation type="unfinished"></translation>
     </message>
@@ -2715,7 +2228,6 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QMultiInputContext</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Select IM</source>
         <translation>入力メソッドを選択</translation>
     </message>
@@ -2723,12 +2235,10 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QMultiInputContextPlugin</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Multiple input method switcher</source>
         <translation>複数の入力メソッドを切り替え</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Multiple input method switcher that uses the context menu of the text widgets</source>
         <translation>テキストウィジェットのコンテキストメニューを使った複数の入力メソッドの切り替えです</translation>
     </message>
@@ -2736,132 +2246,106 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QNativeSocketEngine</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to initialize non-blocking socket</source>
         <translation>ノンブロッキングソケットを初期化できません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to initialize broadcast socket</source>
         <translation>ブロードキャストソケットを初期化できません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Attempt to use IPv6 socket on a platform with no IPv6 support</source>
         <translation>IPv6 がサポートされていないプラットフォームで IPv6 ソケットを使用しようとしています</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The remote host closed the connection</source>
         <translation>リモートホストは接続を閉じました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Network operation timed out</source>
         <translation>ネットワーク操作がタイムアウトしました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Out of resources</source>
         <translation>リソースが足りません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unsupported socket operation</source>
         <translation>サポートされていないソケット操作です</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Protocol type not supported</source>
         <translation>プロトコル型がサポートされていません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Invalid socket descriptor</source>
         <translation>無効なソケット記述子です</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Host unreachable</source>
         <translation>ホストへ到達できません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Network unreachable</source>
         <translation>ネットワークへ到達できません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Permission denied</source>
         <translation>許可されていません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Connection timed out</source>
         <translation>接続がタイムアウトしました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Connection refused</source>
         <translation>接続を拒否されました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The bound address is already in use</source>
         <translation>バインドアドレスは既に使われています</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The address is not available</source>
         <translation>そのアドレスは使用できません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The address is protected</source>
         <translation>そのアドレスへのアクセス権がありません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Datagram was too large to send</source>
         <translation>データグラムが大き過ぎて送信できませんでした</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to send a message</source>
         <translation>メッセージを送信できません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to receive a message</source>
         <translation>メッセージを受信できません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to write</source>
         <translation>書き込みができません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Network error</source>
         <translation>ネットワークエラー</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Another socket is already listening on the same port</source>
         <translation>別のソケットが同じポートで既に待ち受けています</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Operation on non-socket</source>
         <translation>非ソケットに対する操作です</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unknown error</source>
         <translation>不明なエラー</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The proxy type is invalid for this operation</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2869,27 +2353,22 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QNetworkAccessFileBackend</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Request for opening non-local file %1</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Error opening %1: %2</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Write error writing to %1: %2</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Cannot open %1: Path is a directory</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Read error reading from %1: %2</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2897,22 +2376,18 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QNetworkAccessFtpBackend</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Cannot open %1: is a directory</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Logging in to %1 failed: authentication required</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Error while downloading %1: %2</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Error while uploading %1: %2</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2920,12 +2395,10 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QNetworkReply</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Error downloading %1 - server replied: %2</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Protocol "%1" is unknown</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2933,7 +2406,6 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QNetworkReplyImpl</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Operation canceled</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2941,28 +2413,23 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QOCIDriver</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to initialize</source>
         <comment>QOCIDriver</comment>
         <translation>初期化できません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to logon</source>
         <translation>ログオンできません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to begin transaction</source>
         <translation type="unfinished">トランザクションを開始できません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to commit transaction</source>
         <translation type="unfinished">トランザクションをコミットできません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to rollback transaction</source>
         <translation type="unfinished">トランザクションをロールバックできません</translation>
     </message>
@@ -2970,42 +2437,34 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QOCIResult</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to bind column for batch execute</source>
         <translation>バッチ処理用にフィールドをバインドできません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to execute batch statement</source>
         <translation>バッチステートメントを実行できません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to goto next</source>
         <translation>次のレコードへ進めません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to alloc statement</source>
         <translation>ステートメントの領域を確保できません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to prepare statement</source>
         <translation>プリペアステートメントを使えません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to bind value</source>
         <translation>値をバインドできません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to execute select statement</source>
         <translation>SELECT ステートメントを実行できません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to execute statement</source>
         <translation>ステートメントを実行できません</translation>
     </message>
@@ -3013,32 +2472,26 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QODBCDriver</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to connect</source>
         <translation>接続できません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to connect - Driver doesn't support all needed functionality</source>
         <translation>接続できません - ドライバは全ての必要な機能をサポートしていません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to disable autocommit</source>
         <translation>オートコミットを無効にできません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to commit transaction</source>
         <translation>トランザクションをコミットできません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to rollback transaction</source>
         <translation>トランザクションをロールバックできません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to enable autocommit</source>
         <translation>オートコミットを有効にできません</translation>
     </message>
@@ -3046,47 +2499,38 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QODBCResult</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to execute statement</source>
         <translation>ステートメントを実行できません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to fetch next</source>
         <translation>次のレコードをフェッチできません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to prepare statement</source>
         <translation>プリペアステートメントを使えません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to bind variable</source>
         <translation>変数をバインドできません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>QODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration</source>
         <translation>QODBCResult::reset: ステートメントの属性として 'SQL_CURSOR_STATUS' を設定できません。ODBC ドライバの構成をチェックしてください。</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to fetch last</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to fetch</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to fetch first</source>
         <translation type="unfinished">最初のレコードをフェッチできません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to fetch previous</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3094,37 +2538,30 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QObject</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Operation not supported on %1</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Invalid URI: %1</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Write error writing to %1: %2</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Read error reading from %1: %2</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Socket error on %1: %2</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Remote host closed the connection prematurely on %1</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Protocol error: packet of size 0 received</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3132,12 +2569,10 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QPPDOptionsModel</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Name</source>
         <translation>名前</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Value</source>
         <translation>値</translation>
     </message>
@@ -3145,32 +2580,26 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QPSQLDriver</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to connect</source>
         <translation>接続できません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Could not begin transaction</source>
         <translation>トランザクションを開始できませんでした</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Could not commit transaction</source>
         <translation>トランザクションをコミットできませんでした</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Could not rollback transaction</source>
         <translation>トランザクションをロールバックできませんでした</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to subscribe</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to unsubscribe</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3178,12 +2607,10 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QPSQLResult</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to create query</source>
         <translation>クエリーを作成できません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to prepare statement</source>
         <translation>プリペアステートメントを使えません</translation>
     </message>
@@ -3191,102 +2618,82 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QPageSetupWidget</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Centimeters (cm)</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Millimeters (mm)</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Inches (in)</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Points (pt)</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Form</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Paper</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Page size:</source>
         <translation type="unfinished">ページサイズ:</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Width:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Height:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Paper source:</source>
         <translation type="unfinished">給紙装置:</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Orientation</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Portrait</source>
         <translation type="unfinished">縦</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Landscape</source>
         <translation type="unfinished">横</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Reverse landscape</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Reverse portrait</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Margins</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>top margin</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>left margin</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>right margin</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>bottom margin</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3294,12 +2701,10 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QPluginLoader</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unknown error</source>
         <translation>不明なエラー</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The plugin was not loaded.</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3307,232 +2712,187 @@ Do you want to delete it anyway?</source>
 <context>
     <name>QPrintDialog</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>locally connected</source>
         <translation>ローカルに接続しています</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Aliases: %1</source>
         <translation>エイリアス: %1</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>unknown</source>
         <translation>不明</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Print To File ...</source>
         <translation>ファイルへ出力...</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>File %1 is not writable.
 Please choose a different file name.</source>
         <translation>ファイル %1 は書き込み可能ではありません。
 別のファイル名を選んでください。</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 already exists.
 Do you want to overwrite it?</source>
         <translation>%1 はすでに存在します。
 上書きしますか?</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 is a directory.
 Please choose a different file name.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>A0</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>A1</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>A2</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>A3</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>A4</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>A5</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>A6</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>A7</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>A8</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>A9</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>B0</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>B1</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>B2</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>B3</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>B4</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>B5</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>B6</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>B7</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>B8</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>B9</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>B10</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>C5E</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>DLE</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Executive</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Folio</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Ledger</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Legal</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Letter</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Tabloid</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>US Common #10 Envelope</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Custom</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Options >></source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Print</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Options <<</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Print to File (PDF)</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Print to File (Postscript)</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Local file</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Write %1 file</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3540,110 +2900,89 @@ Please choose a different file name.</source>
 <context>
     <name>QPrintPreviewDialog</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Page Setup</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Print Preview</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Next page</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Previous page</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>First page</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Last page</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Fit width</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Fit page</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Zoom in</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Zoom out</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Portrait</source>
         <translation type="unfinished">縦</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Landscape</source>
         <translation type="unfinished">横</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Show single page</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Show facing pages</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Show overview of all pages</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Print</source>
         <translation type="unfinished">Print</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Page setup</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Close</source>
-        <translation type="unfinished">閉じる</translation>
+        <translation>閉じる</translation>
     </message>
 </context>
 <context>
     <name>QPrintPropertiesWidget</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Form</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Page</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Advanced</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3651,97 +2990,78 @@ Please choose a different file name.</source>
 <context>
     <name>QPrintSettingsOutput</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Form</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Copies</source>
         <translation type="unfinished">印刷部数</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Print range</source>
         <translation type="unfinished">印刷範囲</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Print all</source>
         <translation type="unfinished">すべて印刷</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Pages from</source>
         <translation type="unfinished">先頭のページ:</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>to</source>
         <translation type="unfinished">末尾のページ:</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Selection</source>
         <translation type="unfinished">選択した部分を印刷</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Output Settings</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Copies:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Collate</source>
         <translation type="unfinished">丁合い</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Reverse</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Options</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Color Mode</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Color</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Grayscale</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Duplex Printing</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>None</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Long side</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Short side</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3749,47 +3069,38 @@ Please choose a different file name.</source>
 <context>
     <name>QPrintWidget</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Form</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Printer</source>
         <translation type="unfinished">プリンタ</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Name:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>P&roperties</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Location:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Preview</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Type:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Output &file:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>...</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3797,7 +3108,6 @@ Please choose a different file name.</source>
 <context>
     <name>QProgressDialog</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Cancel</source>
         <translation>キャンセル</translation>
     </message>
@@ -3805,15 +3115,13 @@ Please choose a different file name.</source>
 <context>
     <name>QPushButton</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Open</source>
-        <translation>オープン</translation>
+        <translation>開く</translation>
     </message>
 </context>
 <context>
     <name>QRadioButton</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Check</source>
         <translation>選択</translation>
     </message>
@@ -3821,47 +3129,38 @@ Please choose a different file name.</source>
 <context>
     <name>QRegExp</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>no error occurred</source>
         <translation>エラーは発生しませんでした</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>disabled feature used</source>
         <translation>無効な機能が使用されました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>bad char class syntax</source>
         <translation>不正なcharクラス構文</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>bad lookahead syntax</source>
         <translation>不正なlookahead構文</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>bad repetition syntax</source>
         <translation>不正なrepetition構文</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>invalid octal value</source>
         <translation>無効な8進値</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>missing left delim</source>
         <translation>左の区切り文字がありません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>unexpected end</source>
         <translation>予期しない末尾です</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>met internal limit</source>
         <translation>内部制限を満たしました</translation>
     </message>
@@ -3869,22 +3168,18 @@ Please choose a different file name.</source>
 <context>
     <name>QSQLite2Driver</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Error to open database</source>
-        <translation>データベースのオープンでエラーが発生しました</translation>
+        <translation type="unfinished">データベースを開く際にエラーが発生しました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to begin transaction</source>
         <translation>トランザクションを開始できません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to commit transaction</source>
         <translation>トランザクションをコミットできません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to rollback Transaction</source>
         <translation>トランザクションをロールバックできません</translation>
     </message>
@@ -3892,12 +3187,10 @@ Please choose a different file name.</source>
 <context>
     <name>QSQLite2Result</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to fetch results</source>
         <translation>実行結果をフェッチできません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to execute statement</source>
         <translation>ステートメントを実行できません</translation>
     </message>
@@ -3905,27 +3198,22 @@ Please choose a different file name.</source>
 <context>
     <name>QSQLiteDriver</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Error opening database</source>
-        <translation>データベースのオープンでエラーが発生しました</translation>
+        <translation type="unfinished">データベースを開く際にエラーが発生しました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Error closing database</source>
         <translation>データベースのクローズでエラーが発生しました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to begin transaction</source>
         <translation>トランザクションを開始できません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to commit transaction</source>
         <translation>トランザクションをコミットできません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to rollback transaction</source>
         <translation type="unfinished">トランザクションをロールバックできません</translation>
     </message>
@@ -3933,32 +3221,26 @@ Please choose a different file name.</source>
 <context>
     <name>QSQLiteResult</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to fetch row</source>
         <translation>レコードをフェッチできません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to execute statement</source>
         <translation>ステートメントを実行できません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to reset statement</source>
         <translation>ステートメントをリセットできません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to bind parameters</source>
         <translation>パラメータをバインドできません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Parameter count mismatch</source>
         <translation>パラメータの数が合っていません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>No query</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3966,82 +3248,66 @@ Please choose a different file name.</source>
 <context>
     <name>QScrollBar</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Scroll here</source>
         <translation>ここにスクロール</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Left edge</source>
         <translation>左端</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Top</source>
         <translation>上端</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Right edge</source>
         <translation>右端</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Bottom</source>
         <translation>下端</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Page left</source>
         <translation>1ページ左へスクロール</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Page up</source>
         <translation>1ページ戻る</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Page right</source>
         <translation>1ページ右へスクロール</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Page down</source>
         <translation>1ページ進む</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Scroll left</source>
         <translation>左へスクロール</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Scroll up</source>
         <translation>上へスクロール</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Scroll right</source>
         <translation>右へスクロール</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Scroll down</source>
         <translation>下へスクロール</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Line up</source>
         <translation>1行上へ</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Position</source>
         <translation>位置</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Line down</source>
         <translation>1行下へ</translation>
     </message>
@@ -4049,77 +3315,62 @@ Please choose a different file name.</source>
 <context>
     <name>QSharedMemory</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: unable to set key on lock</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: create size is less then 0</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: unable to lock</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: unable to unlock</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: permission denied</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: already exists</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: doesn't exists</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: out of resources</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: unknown error %2</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: key is empty</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: unix key file doesn't exists</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: ftok failed</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: unable to make key</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: system-imposed size restrictions</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1: not attached</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4127,462 +3378,370 @@ Please choose a different file name.</source>
 <context>
     <name>QShortcut</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Space</source>
         <translation>Space</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Esc</source>
         <translation>Esc</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Tab</source>
         <translation>Tab</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Backtab</source>
         <translation>Backtab</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Backspace</source>
         <translation>Backspace</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Return</source>
         <translation>Return</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Enter</source>
         <translation>Enter</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Ins</source>
         <translation>Ins</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Del</source>
         <translation>Del</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Pause</source>
         <translation>Pause</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Print</source>
         <translation>Print</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>SysReq</source>
         <translation>SysReq</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Home</source>
         <translation>Home</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>End</source>
         <translation>End</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Left</source>
         <translation>→</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Up</source>
         <translation>↑</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Right</source>
         <translation>←</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Down</source>
         <translation>↓</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>PgUp</source>
         <translation>PgUp</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>PgDown</source>
         <translation>PgDown</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>CapsLock</source>
         <translation>CapsLock</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>NumLock</source>
         <translation>NumLock</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>ScrollLock</source>
         <translation>ScrollLock</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Menu</source>
         <translation>メニュー</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Help</source>
         <translation>ヘルプ</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Back</source>
         <translation>戻る</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Forward</source>
         <translation>進む</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Stop</source>
         <translation>停止</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Refresh</source>
         <translation>更新間隔</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Volume Down</source>
         <translation>音量を下げる</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Volume Mute</source>
         <translation>消音</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Volume Up</source>
         <translation>音量を上げる</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Bass Boost</source>
         <translation>低音ブースト</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Bass Up</source>
         <translation>低音を上げる</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Bass Down</source>
         <translation>低音を下げる</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Treble Up</source>
         <translation>高音を上げる</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Treble Down</source>
         <translation>高音を下げる</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Media Play</source>
         <translation>メディアの再生</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Media Stop</source>
         <translation>メディアの停止</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Media Previous</source>
         <translation>前のメディア</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Media Next</source>
         <translation>次のメディア</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Media Record</source>
         <translation>メディアの録音</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Home Page</source>
         <translation>ホームページ</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Favorites</source>
         <translation>お気に入り</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Search</source>
         <translation>検索</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Standby</source>
         <translation>スタンバイ</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Open URL</source>
         <translation>URLを開く</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Launch Mail</source>
         <translation>メールの起動</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Launch Media</source>
         <translation>メディアの起動</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Launch (0)</source>
         <translation>(0)の起動</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Launch (1)</source>
         <translation>(1)の起動</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Launch (2)</source>
         <translation>(2)の起動</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Launch (3)</source>
         <translation>(3)の起動</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Launch (4)</source>
         <translation>(4)の起動</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Launch (5)</source>
         <translation>(5)の起動</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Launch (6)</source>
         <translation>(6)の起動</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Launch (7)</source>
         <translation>(7)の起動</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Launch (8)</source>
         <translation>(8)の起動</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Launch (9)</source>
         <translation>(9)の起動</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Launch (A)</source>
         <translation>(A)の起動</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Launch (B)</source>
         <translation>(B)の起動</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Launch (C)</source>
         <translation>(C)の起動</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Launch (D)</source>
         <translation>(D)の起動</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Launch (E)</source>
         <translation>(E)の起動</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Launch (F)</source>
         <translation>(F)の起動</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Print Screen</source>
         <translation>Print Screen</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Page Up</source>
         <translation>Page Up</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Page Down</source>
         <translation>Page Down</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Caps Lock</source>
         <translation>Caps Lock</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Num Lock</source>
         <translation>Num Lock</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Number Lock</source>
         <translation>Number Lock</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Scroll Lock</source>
         <translation>Scroll Lock</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Insert</source>
         <translation>Insert</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Delete</source>
         <translation>Delete</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Escape</source>
         <translation>Escape</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>System Request</source>
         <translation>System Request</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Select</source>
         <translation>Select</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Yes</source>
         <translation>はい</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>No</source>
         <translation>いいえ</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Context1</source>
         <translation>Context1</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Context2</source>
         <translation>Context2</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Context3</source>
         <translation>Context3</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Context4</source>
         <translation>Context4</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Call</source>
         <translation>Call</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Hangup</source>
         <translation>Hangup</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Flip</source>
         <translation>Flip</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Ctrl</source>
         <translation>Ctrl</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Shift</source>
         <translation>Shift</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Alt</source>
         <translation>Alt</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Meta</source>
         <translation>Meta</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>+</source>
         <translation>+</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>F%1</source>
         <translation>F%1</translation>
     </message>
@@ -4590,28 +3749,23 @@ Please choose a different file name.</source>
 <context>
     <name>QSlider</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Page left</source>
         <translation>1ページ左へスクロール</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Page up</source>
         <translation>1ページ戻る</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Position</source>
         <translation>位置</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Page right</source>
         <translation>1ページ右へスクロール
 </translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Page down</source>
         <translation>1ページ進む</translation>
     </message>
@@ -4619,12 +3773,10 @@ Please choose a different file name.</source>
 <context>
     <name>QSocks5SocketEngine</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Socks5 timeout error connecting to socks server</source>
         <translation>Socks5 はソックスサーバ接続しようとしてタイムアウトになりました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Network operation timed out</source>
         <translation type="unfinished">ネットワーク操作がタイムアウトしました</translation>
     </message>
@@ -4632,12 +3784,10 @@ Please choose a different file name.</source>
 <context>
     <name>QSpinBox</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>More</source>
         <translation>増やす</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Less</source>
         <translation>減らす</translation>
     </message>
@@ -4645,52 +3795,42 @@ Please choose a different file name.</source>
 <context>
     <name>QSql</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Delete</source>
         <translation>削除</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Delete this record?</source>
         <translation>このレコードを削除しますか?</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Yes</source>
         <translation>はい</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>No</source>
         <translation>いいえ</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Insert</source>
         <translation>挿入</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Update</source>
         <translation>アップデート</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Save edits?</source>
         <translation>編集内容を保存しますか?</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Cancel</source>
         <translation>キャンセル</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Confirm</source>
         <translation>確認</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Cancel your edits?</source>
         <translation>編集をキャンセルしますか?</translation>
     </message>
@@ -4698,57 +3838,46 @@ Please choose a different file name.</source>
 <context>
     <name>QSslSocket</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Error creating SSL context (%1)</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Invalid or empty cipher list (%1)</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Cannot provide a certificate with no key, %1</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Error loading local certificate, %1</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Error loading private key, %1</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Private key does not certificate public key, %1</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Error creating SSL session, %1</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Error creating SSL session: %1</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to write data: %1</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Error while reading: %1</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Error during SSL handshake: %1</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4756,12 +3885,10 @@ Please choose a different file name.</source>
 <context>
     <name>QTDSDriver</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to open connection</source>
-        <translation>接続をオープンできません</translation>
+        <translation>接続できません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unable to use database</source>
         <translation>データベースを使用できません</translation>
     </message>
@@ -4769,12 +3896,10 @@ Please choose a different file name.</source>
 <context>
     <name>QTabBar</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Scroll Left</source>
         <translation>左へスクロール</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Scroll Right</source>
         <translation>右へスクロール</translation>
     </message>
@@ -4782,42 +3907,34 @@ Please choose a different file name.</source>
 <context>
     <name>QTextControl</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Undo</source>
         <translation>元に戻す(&U)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Redo</source>
         <translation>やり直す(&R)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Cu&t</source>
         <translation>切り取り(&T)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Copy</source>
         <translation>コピー(&C)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Copy &Link Location</source>
         <translation>リンクの場所をコピー(&L)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Paste</source>
         <translation>貼り付け(&P)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Delete</source>
         <translation>削除</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Select All</source>
         <translation>すべてを選択</translation>
     </message>
@@ -4825,20 +3942,17 @@ Please choose a different file name.</source>
 <context>
     <name>QToolButton</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Press</source>
         <translation>押す</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Open</source>
-        <translation>オープン</translation>
+        <translation>開く</translation>
     </message>
 </context>
 <context>
     <name>QUdpSocket</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>This platform does not support IPv6</source>
         <translation>このプラットフォームは IPv6 をサポートしていません</translation>
     </message>
@@ -4846,12 +3960,10 @@ Please choose a different file name.</source>
 <context>
     <name>QUndoGroup</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Undo</source>
         <translation>元に戻す</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Redo</source>
         <translation>やり直す</translation>
     </message>
@@ -4859,7 +3971,6 @@ Please choose a different file name.</source>
 <context>
     <name>QUndoModel</name>
     <message>
-        <location filename="" line="326436454"/>
         <source><empty></source>
         <translation><空></translation>
     </message>
@@ -4867,12 +3978,10 @@ Please choose a different file name.</source>
 <context>
     <name>QUndoStack</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Undo</source>
         <translation>元に戻す</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Redo</source>
         <translation>やり直す</translation>
     </message>
@@ -4880,57 +3989,46 @@ Please choose a different file name.</source>
 <context>
     <name>QUnicodeControlCharacterMenu</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>LRM Left-to-right mark</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>RLM Right-to-left mark</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>ZWJ Zero width joiner</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>ZWNJ Zero width non-joiner</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>ZWSP Zero width space</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>LRE Start of left-to-right embedding</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>RLE Start of right-to-left embedding</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>LRO Start of left-to-right override</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>RLO Start of right-to-left override</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>PDF Pop directional formatting</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Insert Unicode control character</source>
         <translation>Unicode制御文字を挿入</translation>
     </message>
@@ -4938,32 +4036,26 @@ Please choose a different file name.</source>
 <context>
     <name>QWebFrame</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Request cancelled</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Request blocked</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Cannot show URL</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Frame load interruped by policy change</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Cannot show mimetype</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>File does not exist</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4971,300 +4063,250 @@ Please choose a different file name.</source>
 <context>
     <name>QWebPage</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Bad HTTP request</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Submit</source>
         <comment>default label for Submit buttons in forms on web pages</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Submit</source>
         <comment>Submit (input element) alt text for <input> elements with no alt, title, or value</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Reset</source>
         <comment>default label for Reset buttons in forms on web pages</comment>
         <translation type="unfinished">リセット</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>This is a searchable index. Enter search keywords: </source>
         <comment>text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index'</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Choose File</source>
         <comment>title for file button used in HTML forms</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>No file selected</source>
         <comment>text to display in file button used in HTML forms when no file is selected</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Open in New Window</source>
         <comment>Open in New Window context menu item</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Save Link...</source>
         <comment>Download Linked File context menu item</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Copy Link</source>
         <comment>Copy Link context menu item</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Open Image</source>
         <comment>Open Image in New Window context menu item</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Save Image</source>
         <comment>Download Image context menu item</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Copy Image</source>
         <comment>Copy Link context menu item</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Open Frame</source>
         <comment>Open Frame in New Window context menu item</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Copy</source>
         <comment>Copy context menu item</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Go Back</source>
         <comment>Back context menu item</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Go Forward</source>
         <comment>Forward context menu item</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Stop</source>
         <comment>Stop context menu item</comment>
         <translation type="unfinished">停止</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Reload</source>
         <comment>Reload context menu item</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Cut</source>
         <comment>Cut context menu item</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Paste</source>
         <comment>Paste context menu item</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>No Guesses Found</source>
         <comment>No Guesses Found context menu item</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Ignore</source>
         <comment>Ignore Spelling context menu item</comment>
         <translation type="unfinished">無視</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Add To Dictionary</source>
         <comment>Learn Spelling context menu item</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Search The Web</source>
         <comment>Search The Web context menu item</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Look Up In Dictionary</source>
         <comment>Look Up in Dictionary context menu item</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Open Link</source>
         <comment>Open Link context menu item</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Ignore</source>
         <comment>Ignore Grammar context menu item</comment>
         <translation type="unfinished">無視</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Spelling</source>
         <comment>Spelling and Grammar context sub-menu item</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Show Spelling and Grammar</source>
         <comment>menu item title</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Hide Spelling and Grammar</source>
         <comment>menu item title</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Check Spelling</source>
         <comment>Check spelling context menu item</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Check Spelling While Typing</source>
         <comment>Check spelling while typing context menu item</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Check Grammar With Spelling</source>
         <comment>Check grammar with spelling context menu item</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Fonts</source>
         <comment>Font context sub-menu item</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Bold</source>
         <comment>Bold context menu item</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Italic</source>
         <comment>Italic context menu item</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Underline</source>
         <comment>Underline context menu item</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Outline</source>
         <comment>Outline context menu item</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Direction</source>
         <comment>Writing direction context sub-menu item</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Default</source>
         <comment>Default writing direction context menu item</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>LTR</source>
         <comment>Left to Right context menu item</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>RTL</source>
         <comment>Right to Left context menu item</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Inspect</source>
         <comment>Inspect Element context menu item</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>No recent searches</source>
         <comment>Label for only item in menu that appears when clicking on the search field image, when no searches have been performed</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Recent searches</source>
         <comment>label for first item in the menu that appears when clicking on the search field image, used as embedded menu title</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Clear recent searches</source>
         <comment>menu item in Recent Searches menu that empties menu's contents</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unknown</source>
         <comment>Unknown filesize FTP directory listing item</comment>
         <translation type="unfinished">不明</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 (%2x%3 pixels)</source>
         <comment>Title string for images</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Web Inspector - %2</source>
         <translation type="unfinished"></translation>
     </message>
@@ -5272,7 +4314,6 @@ Please choose a different file name.</source>
 <context>
     <name>QWhatsThisAction</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>What's This?</source>
         <translation>ヒント</translation>
     </message>
@@ -5280,7 +4321,6 @@ Please choose a different file name.</source>
 <context>
     <name>QWidget</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>*</source>
         <translation>*</translation>
     </message>
@@ -5288,62 +4328,50 @@ Please choose a different file name.</source>
 <context>
     <name>QWizard</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Go Back</source>
         <translation>戻る</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Continue</source>
         <translation>続ける</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Commit</source>
         <translation>コミット</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Done</source>
         <translation>終了</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Quit</source>
         <translation>終了</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Help</source>
         <translation>ヘルプ</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>< &Back</source>
         <translation>< 戻る(&B)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Finish</source>
         <translation>完了(&F)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Cancel</source>
         <translation>キャンセル</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Help</source>
         <translation>ヘルプ(&H)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Next</source>
         <translation>次へ(&N)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Next ></source>
         <translation>次へ(&N) ></translation>
     </message>
@@ -5351,67 +4379,54 @@ Please choose a different file name.</source>
 <context>
     <name>QWorkspace</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Restore</source>
         <translation>元に戻す(&R)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Move</source>
         <translation>移動(&M)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Size</source>
         <translation>サイズを変更(&S)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Mi&nimize</source>
         <translation>最小化(&N)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Ma&ximize</source>
         <translation>最大化(&X)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Close</source>
         <translation>閉じる(&C)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Stay on &Top</source>
         <translation>常に手前に表示(&T)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Sh&ade</source>
         <translation>シェード(&A)</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 - [%2]</source>
         <translation>%1 - [%2]</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Minimize</source>
         <translation>最小化</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Restore Down</source>
         <translation>元に戻す</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Close</source>
         <translation>閉じる</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>&Unshade</source>
         <translation>シェードを解除(&U)</translation>
     </message>
@@ -5419,117 +4434,94 @@ Please choose a different file name.</source>
 <context>
     <name>QXml</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>no error occurred</source>
         <translation>エラーは発生しませんでした</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>error triggered by consumer</source>
         <translation>消費者によってエラーが誘発されました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>unexpected end of file</source>
         <translation>予期せぬファイルの終りです</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>more than one document type definition</source>
         <translation>ドキュメントタイプの定義が複数あります</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>error occurred while parsing element</source>
         <translation>要素の解析中にエラーが発生しました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>tag mismatch</source>
         <translation>タグが一致しません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>error occurred while parsing content</source>
         <translation>コンテンツの解析中にエラーが発生しました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>unexpected character</source>
         <translation>予期しない文字です</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>invalid name for processing instruction</source>
         <translation>処理の指示に無効な名前です</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>version expected while reading the XML declaration</source>
         <translation>XML宣言を読み込むにはバージョンが必要です</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>wrong value for standalone declaration</source>
         <translation>スタンドアロン宣言として正しくない値です</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>encoding declaration or standalone declaration expected while reading the XML declaration</source>
         <translation>XML宣言を読み込むにはエンコーディング宣言かスタンドアローン宣言が必要です</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>standalone declaration expected while reading the XML declaration</source>
         <translation>XML宣言を読み込むにはスタンドアローン宣言が必要です</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>error occurred while parsing document type definition</source>
         <translation>ドキュメントタイプの定義を解析中にエラーが発生しました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>letter is expected</source>
         <translation>文字が必要です</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>error occurred while parsing comment</source>
         <translation>コメントの解析中にエラーが発生しました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>error occurred while parsing reference</source>
         <translation>参照の解析中にエラーが発生しました</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>internal general entity reference not allowed in DTD</source>
         <translation>内部一般エンティティ参照はDTDで許されていません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>external parsed general entity reference not allowed in attribute value</source>
         <translation>解析された外部一般エンティティ参照は属性値で許されていません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>external parsed general entity reference not allowed in DTD</source>
         <translation>解析された外部一般エンティティ参照はDTDで許されていません</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>unparsed entity reference in wrong context</source>
         <translation>不正な文脈で解析されないエンティティ参照です</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>recursive entities</source>
         <translation>再帰的エンティティ</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>error in the text declaration of an external entity</source>
         <translation>外部エンティティのテキスト宣言にエラーがあります</translation>
     </message>
@@ -5537,177 +4529,142 @@ Please choose a different file name.</source>
 <context>
     <name>QXmlStream</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Extra content at end of document.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Invalid entity value.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Invalid XML character.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Sequence ']]>' not allowed in content.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Encountered incorrectly encoded content.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Namespace prefix '%1' not declared</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Attribute redefined.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unexpected character '%1' in public id literal.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Invalid XML version string.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unsupported XML version.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The standalone pseudo attribute must appear after the encoding.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 is an invalid encoding name.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Encoding %1 is unsupported</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Standalone accepts only yes or no.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Invalid attribute in XML declaration.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Premature end of document.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Invalid document.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Expected </source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>, but got '</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Unexpected '</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Expected character data.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Recursive entity detected.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Start tag expected.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>NDATA in parameter entity declaration.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>XML declaration not at start of document.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 is an invalid processing instruction name.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Invalid processing instruction name.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 is an invalid PUBLIC identifier.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Illegal namespace declaration.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Invalid XML name.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Opening and ending tag mismatch.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Reference to unparsed entity '%1'.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Entity '%1' not declared.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Reference to external entity '%1' in attribute value.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Invalid character reference.</source>
         <translation type="unfinished"></translation>
     </message>
@@ -5715,726 +4672,582 @@ Please choose a different file name.</source>
 <context>
     <name>QtXmlPatterns</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>An %1-attribute with value %2 has already been declared.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>An %1-attribute must have a valid %2 as value, which %3 isn't.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Network timeout.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Element %1 can't be serialized because it appears outside the document element.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Attribute %1 can't be serialized because it appears at the top level.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Year %1 is invalid because it begins with %2.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Day %1 is outside the range %2..%3.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Month %1 is outside the range %2..%3.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Overflow: Can't represent date %1.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Day %1 is invalid for month %2.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Time 24:%1:%2.%3 is invalid. Hour is 24, but minutes, seconds, and milliseconds are not all 0; </source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Time %1:%2:%3.%4 is invalid.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Overflow: Date can't be represented.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>At least one component must be present.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>At least one time component must appear after the %1-delimiter.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>No operand in an integer division, %1, can be %2.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The first operand in an integer division, %1, cannot be infinity (%2).</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The second operand in a division, %1, cannot be zero (%2).</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 is not a valid value of type %2.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>When casting to %1 from %2, the source value cannot be %3.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Integer division (%1) by zero (%2) is undefined.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Division (%1) by zero (%2) is undefined.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Modulus division (%1) by zero (%2) is undefined.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Dividing a value of type %1 by %2 (not-a-number) is not allowed.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Dividing a value of type %1 by %2 or %3 (plus or minus zero) is not allowed.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Multiplication of a value of type %1 by %2 or %3 (plus or minus infinity) is not allowed.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>A value of type %1 cannot have an Effective Boolean Value.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Effective Boolean Value cannot be calculated for a sequence containing two or more atomic values.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Value %1 of type %2 exceeds maximum (%3).</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Value %1 of type %2 is below minimum (%3).</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>A value of type %1 must contain an even number of digits. The value %2 does not.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 is not valid as a value of type %2.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Operator %1 cannot be used on type %2.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Operator %1 cannot be used on atomic values of type %2 and %3.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The namespace URI in the name for a computed attribute cannot be %1.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The name for a computed attribute cannot have the namespace URI %1 with the local name %2.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Type error in cast, expected %1, received %2.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>When casting to %1 or types derived from it, the source value must be of the same type, or it must be a string literal. Type %2 is not allowed.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>No casting is possible with %1 as the target type.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>It is not possible to cast from %1 to %2.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Casting to %1 is not possible because it is an abstract type, and can therefore never be instantiated.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>It's not possible to cast the value %1 of type %2 to %3</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Failure when casting from %1 to %2: %3</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>A comment cannot contain %1</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>A comment cannot end with a %1.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>No comparisons can be done involving the type %1.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Operator %1 is not available between atomic values of type %2 and %3.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>An attribute node cannot be a child of a document node. Therefore, the attribute %1 is out of place.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>A library module cannot be evaluated directly. It must be imported from a main module.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>A value of type %1 cannot be a predicate. A predicate must have either a numeric type or an Effective Boolean Value type.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>A positional predicate must evaluate to a single numeric value.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The target name in a processing instruction cannot be %1 in any combination of upper and lower case. Therefore, is %2 invalid.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 is not a valid target name in a processing instruction. It must be a %2 value, e.g. %3.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The last step in a path must contain either nodes or atomic values. It cannot be a mixture between the two.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The data of a processing instruction cannot contain the string %1</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>No namespace binding exists for the prefix %1</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>No namespace binding exists for the prefix %1 in %2</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 is an invalid %2</source>
         <translation type="unfinished"></translation>
     </message>
     <message numerus="yes">
-        <location filename="" line="326436454"/>
         <source>%1 takes at most %n argument(s). %2 is therefore invalid.</source>
         <translation type="unfinished">
             <numerusform></numerusform>
         </translation>
     </message>
     <message numerus="yes">
-        <location filename="" line="326436454"/>
         <source>%1 requires at least %n argument(s). %2 is therefore invalid.</source>
         <translation type="unfinished">
             <numerusform></numerusform>
         </translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The first argument to %1 cannot be of type %2. It must be a numeric type, xs:yearMonthDuration or xs:dayTimeDuration.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The first argument to %1 cannot be of type %2. It must be of type %3, %4, or %5.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The second argument to %1 cannot be of type %2. It must be of type %3, %4, or %5.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 is not a valid XML 1.0 character.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The first argument to %1 cannot be of type %2.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>If both values have zone offsets, they must have the same zone offset. %1 and %2 are not the same.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 was called.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 must be followed by %2 or %3, not at the end of the replacement string.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>In the replacement string, %1 must be followed by at least one digit when not escaped.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>In the replacement string, %1 can only be used to escape itself or %2, not %3</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 matches newline characters</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 and %2 match the start and end of a line.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Matches are case insensitive</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Whitespace characters are removed, except when they appear in character classes</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 is an invalid regular expression pattern: %2</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 is an invalid flag for regular expressions. Valid flags are:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>If the first argument is the empty sequence or a zero-length string (no namespace), a prefix cannot be specified. Prefix %1 was specified.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>It will not be possible to retrieve %1.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The root node of the second argument to function %1 must be a document node. %2 is not a document node.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The default collection is undefined</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 cannot be retrieved</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The normalization form %1 is unsupported. The supported forms are %2, %3, %4, and %5, and none, i.e. the empty string (no normalization).</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>A zone offset must be in the range %1..%2 inclusive. %3 is out of range.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 is not a whole number of minutes.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Required cardinality is %1; got cardinality %2.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The item %1 did not match the required type %2.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 is an unknown schema type.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Only one %1 declaration can occur in the query prolog.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The initialization of variable %1 depends on itself</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>No variable by name %1 exists</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The variable %1 is unused</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Version %1 is not supported. The supported XQuery version is 1.0.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The encoding %1 is invalid. It must contain Latin characters only, must not contain whitespace, and must match the regular expression %2.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>No function with signature %1 is available</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>A default namespace declaration must occur before function, variable, and option declarations.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Namespace declarations must occur before function, variable, and option declarations.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Module imports must occur before function, variable, and option declarations.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>It is not possible to redeclare prefix %1.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Only the prefix %1 can be declared to bind the namespace %2. By default, it is already bound to the prefix %1.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Prefix %1 is already declared in the prolog.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The name of an option must have a prefix. There is no default namespace for options.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The Schema Import feature is not supported, and therefore %1 declarations cannot occur.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The target namespace of a %1 cannot be empty.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The module import feature is not supported</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>A variable by name %1 has already been declared in the prolog.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>No value is available for the external variable by name %1.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The namespace for a user defined function cannot be empty (try the predefined prefix %1 which exists for cases like this)</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The namespace %1 is reserved; therefore user defined functions may not use it. Try the predefined prefix %2, which exists for these cases.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The namespace of a user defined function in a library module must be equivalent to the module namespace. In other words, it should be %1 instead of %2</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>A function already exists with the signature %1.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>No external functions are supported. All supported functions can be used directly, without first declaring them as external</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>An argument by name %1 has already been declared. Every argument name must be unique.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The name of a variable bound in a for-expression must be different from the positional variable. Hence, the two variables named %1 collide.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The Schema Validation Feature is not supported. Hence, %1-expressions may not be used.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>None of the pragma expressions are supported. Therefore, a fallback expression must be present</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The %1-axis is unsupported in XQuery</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 is not a valid numeric literal.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>No function by name %1 is available.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The namespace URI cannot be the empty string when binding to a prefix, %1.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 is an invalid namespace URI.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>It is not possible to bind to the prefix %1</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Namespace %1 can only be bound to %2 (and it is, in either case, pre-declared).</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Prefix %1 can only be bound to %2 (and it is, in either case, pre-declared).</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Two namespace declaration attributes have the same name: %1.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The namespace URI must be a constant and cannot use enclosed expressions.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>An attribute by name %1 has already appeared on this element.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>A direct element constructor is not well-formed. %1 is ended with %2.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The name %1 does not refer to any schema type.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 is an complex type. Casting to complex types is not possible. However, casting to atomic types such as %2 works.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 is not an atomic type. Casting is only possible to atomic types.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 is not a valid name for a processing-instruction. Therefore this name test will never match.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>%1 is not in the in-scope attribute declarations. Note that the schema import feature is not supported.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The name of an extension expression must be in a namespace.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>empty</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>zero or one</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>exactly one</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>one or more</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>zero or more</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Required type is %1, but %2 was found.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Promoting %1 to %2 may cause loss of precision.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>The focus is undefined.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>It's not possible to add attributes after any other kind of node.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>An attribute by name %1 has already been created.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Only the Unicode Codepoint Collation is supported(%1). %2 is unsupported.</source>
         <translation type="unfinished"></translation>
     </message>
@@ -6442,12 +5255,10 @@ Please choose a different file name.</source>
 <context>
     <name>VolumeSlider</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Muted</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Volume: %1%</source>
         <translation type="unfinished"></translation>
     </message>
@@ -6455,67 +5266,54 @@ Please choose a different file name.</source>
 <context>
     <name>WebCore::PlatformScrollbar</name>
     <message>
-        <location filename="" line="326436454"/>
         <source>Scroll here</source>
         <translation>ここにスクロール</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Left edge</source>
         <translation>左端</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Top</source>
         <translation>上端</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Right edge</source>
         <translation>右端</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Bottom</source>
         <translation>下端</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Page left</source>
         <translation>1ページ左へスクロール</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Page up</source>
         <translation>1ページ戻る</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Page right</source>
         <translation>1ページ右へスクロール</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Page down</source>
         <translation>1ページ進む</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Scroll left</source>
         <translation>左へスクロール</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Scroll up</source>
         <translation>上へスクロール</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Scroll right</source>
         <translation>右へスクロール</translation>
     </message>
     <message>
-        <location filename="" line="326436454"/>
         <source>Scroll down</source>
         <translation>下へスクロール</translation>
     </message>
diff --git a/src/VBox/Frontends/VirtualBox/nls/qt_pl.ts b/src/VBox/Frontends/VirtualBox/nls/qt_pl.ts
index 939f389..d679bdf 100644
--- a/src/VBox/Frontends/VirtualBox/nls/qt_pl.ts
+++ b/src/VBox/Frontends/VirtualBox/nls/qt_pl.ts
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE TS>
-<TS version="2.0" language="pl">
+<TS version="2.1" language="pl">
 <context>
     <name>MAC_APPLICATION_MENU</name>
     <message>
@@ -29,7 +29,7 @@
     </message>
     <message>
         <source>About %1</source>
-        <translation>%1…</translation>
+        <translation>O programie %1…</translation>
     </message>
 </context>
 <context>
diff --git a/src/VBox/Frontends/VirtualBox/src/UIMediumTypeChangeDialog.cpp b/src/VBox/Frontends/VirtualBox/src/UIMediumTypeChangeDialog.cpp
index 0e5d4bd..17cd877 100644
--- a/src/VBox/Frontends/VirtualBox/src/UIMediumTypeChangeDialog.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/UIMediumTypeChangeDialog.cpp
@@ -121,7 +121,7 @@ void UIMediumTypeChangeDialog::sltValidate()
 void UIMediumTypeChangeDialog::prepare()
 {
 #ifdef VBOX_WS_MAC
-    // TODO: Is that necessary?
+    /// @todo Is that necessary?
     setWindowFlags(Qt::Sheet);
 #else /* !VBOX_WS_MAC */
     /* Enable size-grip: */
diff --git a/src/VBox/Frontends/VirtualBox/src/UIVMInfoDialog.cpp b/src/VBox/Frontends/VirtualBox/src/UIVMInfoDialog.cpp
index 4c7c6c6..a41b631 100644
--- a/src/VBox/Frontends/VirtualBox/src/UIVMInfoDialog.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/UIVMInfoDialog.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -81,7 +81,7 @@ void UIVMInfoDialog::invoke(UIMachineWindow *pMachineWindow)
 }
 
 UIVMInfoDialog::UIVMInfoDialog(UIMachineWindow *pMachineWindow)
-    : QIWithRetranslateUI<QMainWindow>(0)
+    : QIWithRetranslateUI<QIMainWindow>(0)
     , m_pMachineWindow(pMachineWindow)
     , m_pTabWidget(0)
     , m_session(pMachineWindow->session())
@@ -103,6 +103,11 @@ UIVMInfoDialog::~UIVMInfoDialog()
     m_spInstance = 0;
 }
 
+bool UIVMInfoDialog::shouldBeMaximized() const
+{
+    return gEDataManager->informationWindowShouldBeMaximized(vboxGlobal().managedVMUuid());
+}
+
 void UIVMInfoDialog::retranslateUi()
 {
     sltUpdateDetails();
@@ -321,7 +326,7 @@ void UIVMInfoDialog::retranslateUi()
 bool UIVMInfoDialog::event(QEvent *pEvent)
 {
     /* Pre-process through base-class: */
-    bool fResult = QMainWindow::event(pEvent);
+    bool fResult = QIMainWindow::event(pEvent);
 
     /* Process required events: */
     switch (pEvent->type())
@@ -520,18 +525,11 @@ void UIVMInfoDialog::loadSettings()
     {
         /* Load geometry: */
         m_geometry = gEDataManager->informationWindowGeometry(this, m_pMachineWindow, vboxGlobal().managedVMUuid());
-#ifdef VBOX_WS_MAC
-        move(m_geometry.topLeft());
-        resize(m_geometry.size());
-#else /* VBOX_WS_MAC */
-        setGeometry(m_geometry);
-#endif /* !VBOX_WS_MAC */
-        LogRel2(("GUI: UIVMInfoDialog: Geometry loaded to: Origin=%dx%d, Size=%dx%d\n",
-                 m_geometry.x(), m_geometry.y(), m_geometry.width(), m_geometry.height()));
 
-        /* Maximize (if necessary): */
-        if (gEDataManager->informationWindowShouldBeMaximized(vboxGlobal().managedVMUuid()))
-            showMaximized();
+        /* Restore geometry: */
+        LogRel2(("GUI: UIVMInfoDialog: Restoring geometry to: Origin=%dx%d, Size=%dx%d\n",
+                 m_geometry.x(), m_geometry.y(), m_geometry.width(), m_geometry.height()));
+        restoreGeometry();
     }
 }
 
diff --git a/src/VBox/Frontends/VirtualBox/src/UIVMInfoDialog.h b/src/VBox/Frontends/VirtualBox/src/UIVMInfoDialog.h
index 8d3228a..368e0df 100644
--- a/src/VBox/Frontends/VirtualBox/src/UIVMInfoDialog.h
+++ b/src/VBox/Frontends/VirtualBox/src/UIVMInfoDialog.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -19,9 +19,9 @@
 #define ___UIVMInfoDialog_h___
 
 /* Qt includes: */
-#include <QMainWindow>
 
 /* GUI includes: */
+#include "QIMainWindow.h"
 #include "QIWithRetranslateUI.h"
 
 /* COM includes: */
@@ -35,8 +35,8 @@ class QRichTextEdit;
 class UIMachineWindow;
 class QTimer;
 
-/** QMainWindow based dialog providing user with VM details and statistics. */
-class UIVMInfoDialog : public QIWithRetranslateUI<QMainWindow>
+/** QIMainWindow based dialog providing user with VM details and statistics. */
+class UIVMInfoDialog : public QIWithRetranslateUI<QIMainWindow>
 {
     Q_OBJECT;
 
@@ -60,6 +60,9 @@ protected:
     /** Information dialog destructor. */
     ~UIVMInfoDialog();
 
+    /** Returns whether the dialog should be maximized when geometry being restored. */
+    virtual bool shouldBeMaximized() const /* override */;
+
     /** Translation handler. */
     void retranslateUi();
 
@@ -123,8 +126,6 @@ private:
     static UIVMInfoDialog *m_spInstance;
     /** Machine-window to center dialog according. */
     UIMachineWindow       *m_pMachineWindow;
-    /** Current dialog geometry. */
-    QRect                  m_geometry;
     /** @} */
 
     /** @name Widget variables.
@@ -157,3 +158,4 @@ private:
 };
 
 #endif /* !___UIVMInfoDialog_h___ */
+
diff --git a/src/VBox/Frontends/VirtualBox/src/UIVMLogViewer.cpp b/src/VBox/Frontends/VirtualBox/src/UIVMLogViewer.cpp
index 814911a..4201af0 100644
--- a/src/VBox/Frontends/VirtualBox/src/UIVMLogViewer.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/UIVMLogViewer.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -41,6 +41,7 @@
 # include "UIMessageCenter.h"
 # include "UISpecialControls.h"
 # include "UIVMLogViewer.h"
+# include "UIDesktopWidgetWatchdog.h"
 # include "VBoxGlobal.h"
 # include "VBoxUtils.h"
 
@@ -769,7 +770,7 @@ void UIVMLogViewer::showLogViewerFor(QWidget *pCenterWidget, const CMachine &mac
 }
 
 UIVMLogViewer::UIVMLogViewer(QWidget *pParent, Qt::WindowFlags flags, const CMachine &machine)
-    : QIWithRetranslateUI2<QMainWindow>(pParent, flags)
+    : QIWithRetranslateUI2<QIMainWindow>(pParent, flags)
     , m_fIsPolished(false)
     , m_machine(machine)
 {
@@ -783,6 +784,11 @@ UIVMLogViewer::~UIVMLogViewer()
     cleanup();
 }
 
+bool UIVMLogViewer::shouldBeMaximized() const
+{
+    return gEDataManager->logWindowShouldBeMaximized();
+}
+
 void UIVMLogViewer::search()
 {
     /* Show/hide search-panel: */
@@ -883,7 +889,7 @@ bool UIVMLogViewer::close()
     /* Close filter-panel: */
     m_pFilterPanel->hide();
     /* Call to base-class: */
-    return QMainWindow::close();
+    return QIMainWindow::close();
 }
 
 void UIVMLogViewer::save()
@@ -1012,7 +1018,7 @@ void UIVMLogViewer::loadSettings()
     /* Restore window geometry: */
     {
         /* Getting available geometry to calculate default geometry: */
-        const QRect desktopRect = vboxGlobal().availableGeometry(this);
+        const QRect desktopRect = gpDesktop->availableGeometry(this);
         int iDefaultWidth = desktopRect.width() / 2;
         int iDefaultHeight = desktopRect.height() * 3 / 4;
 
@@ -1031,18 +1037,11 @@ void UIVMLogViewer::loadSettings()
 
         /* Load geometry: */
         m_geometry = gEDataManager->logWindowGeometry(this, defaultGeometry);
-#ifdef VBOX_WS_MAC
-        move(m_geometry.topLeft());
-        resize(m_geometry.size());
-#else /* !VBOX_WS_MAC */
-        setGeometry(m_geometry);
-#endif /* !VBOX_WS_MAC */
-        LogRel2(("GUI: UIVMLogViewer: Geometry loaded to: Origin=%dx%d, Size=%dx%d\n",
-                 m_geometry.x(), m_geometry.y(), m_geometry.width(), m_geometry.height()));
 
-        /* Maximize (if necessary): */
-        if (gEDataManager->logWindowShouldBeMaximized())
-            showMaximized();
+        /* Restore geometry: */
+        LogRel2(("GUI: UIVMLogViewer: Restoring geometry to: Origin=%dx%d, Size=%dx%d\n",
+                 m_geometry.x(), m_geometry.y(), m_geometry.width(), m_geometry.height()));
+        restoreGeometry();
     }
 }
 
@@ -1091,7 +1090,7 @@ void UIVMLogViewer::retranslateUi()
 
 void UIVMLogViewer::showEvent(QShowEvent *pEvent)
 {
-    QMainWindow::showEvent(pEvent);
+    QIMainWindow::showEvent(pEvent);
 
     /* One may think that QWidget::polish() is the right place to do things
      * below, but apparently, by the time when QWidget::polish() is called,
@@ -1107,7 +1106,7 @@ void UIVMLogViewer::showEvent(QShowEvent *pEvent)
     /* Make sure the log view widget has the focus: */
     QWidget *pCurrentLogPage = currentLogPage();
     if (pCurrentLogPage)
-        pCurrentLogPage->setFocus(); 
+        pCurrentLogPage->setFocus();
 }
 
 void UIVMLogViewer::keyPressEvent(QKeyEvent *pEvent)
@@ -1144,7 +1143,7 @@ void UIVMLogViewer::keyPressEvent(QKeyEvent *pEvent)
         default:
             break;
     }
-    QMainWindow::keyReleaseEvent(pEvent);
+    QIMainWindow::keyReleaseEvent(pEvent);
 }
 
 QTextEdit* UIVMLogViewer::currentLogPage()
diff --git a/src/VBox/Frontends/VirtualBox/src/UIVMLogViewer.h b/src/VBox/Frontends/VirtualBox/src/UIVMLogViewer.h
index 62a5a0a..bd18322 100644
--- a/src/VBox/Frontends/VirtualBox/src/UIVMLogViewer.h
+++ b/src/VBox/Frontends/VirtualBox/src/UIVMLogViewer.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -19,11 +19,11 @@
 #define ___UIVMLogViewer_h___
 
 /* Qt includes: */
-#include <QMainWindow>
 #include <QMap>
 #include <QPair>
 
 /* GUI includes: */
+#include "QIMainWindow.h"
 #include "QIWithRetranslateUI.h"
 #include "UIVMLogViewer.gen.h"
 
@@ -46,9 +46,9 @@ typedef QPair<QString, QTextEdit*> LogPage;
 typedef QList<LogPage> LogBook;
 typedef QMap<QTextEdit*, QString> VMLogMap;
 
-/** QMainWindow extension
+/** QIMainWindow extension
   * providing GUI with VirtualBox LogViewer. */
-class UIVMLogViewer : public QIWithRetranslateUI2<QMainWindow>,
+class UIVMLogViewer : public QIWithRetranslateUI2<QIMainWindow>,
                       public Ui::UIVMLogViewer
 {
     Q_OBJECT;
@@ -68,6 +68,9 @@ protected:
     /** Destructs the VM Log-Viewer. */
     ~UIVMLogViewer();
 
+    /** Returns whether the window should be maximized when geometry being restored. */
+    virtual bool shouldBeMaximized() const /* override */;
+
 private slots:
 
     /** Handles search action triggering. */
@@ -142,9 +145,6 @@ private:
     /** Holds the list of log-content. */
     VMLogMap m_logMap;
 
-    /** Holds the current dialog geometry. */
-    QRect m_geometry;
-
     /** Holds the help button instance. */
     QPushButton *m_pButtonHelp;
     /** Holds the find button instance. */
diff --git a/src/VBox/Frontends/VirtualBox/src/UIVMLogViewer.ui b/src/VBox/Frontends/VirtualBox/src/UIVMLogViewer.ui
index 36d010a..3d34138 100644
--- a/src/VBox/Frontends/VirtualBox/src/UIVMLogViewer.ui
+++ b/src/VBox/Frontends/VirtualBox/src/UIVMLogViewer.ui
@@ -2,7 +2,7 @@
  <comment>
  VBox frontends: Qt4 GUI ("VirtualBox"):
 
- Copyright (C) 2008-2012 Oracle Corporation
+ Copyright (C) 2008-2016 Oracle Corporation
 
  This file is part of VirtualBox Open Source Edition (OSE), as
  available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/VBoxAboutDlg.cpp b/src/VBox/Frontends/VirtualBox/src/VBoxAboutDlg.cpp
index 50c1606..986ef0b 100644
--- a/src/VBox/Frontends/VirtualBox/src/VBoxAboutDlg.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/VBoxAboutDlg.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -58,7 +58,7 @@ bool VBoxAboutDlg::event(QEvent *pEvent)
     return QIDialog::event(pEvent);
 }
 
-void VBoxAboutDlg::paintEvent(QPaintEvent* /* pEvent */)
+void VBoxAboutDlg::paintEvent(QPaintEvent * /* pEvent */)
 {
     QPainter painter(this);
     /* Draw About-VirtualBox background image: */
@@ -71,18 +71,16 @@ void VBoxAboutDlg::retranslateUi()
     const QString strAboutText = tr("VirtualBox Graphical User Interface");
 #ifdef VBOX_BLEEDING_EDGE
     const QString strVersionText = "EXPERIMENTAL build %1 - " + QString(VBOX_BLEEDING_EDGE);
-#else /* !VBOX_BLEEDING_EDGE */
+#else
     const QString strVersionText = tr("Version %1");
-#endif /* !VBOX_BLEEDING_EDGE */
-#if VBOX_OSE
-    m_strAboutText = strAboutText + " " + strVersionText.arg(m_strVersion) + "\n" +
-                     QString("%1 2004-" VBOX_C_YEAR " " VBOX_VENDOR).arg(QChar(0xa9));
-#else /* !VBOX_OSE */
+#endif
+#ifdef VBOX_OSE
+    m_strAboutText = strAboutText + " " + strVersionText.arg(m_strVersion) + "\n"
+                   + QString("%1 2004-" VBOX_C_YEAR " " VBOX_VENDOR).arg(QChar(0xa9));
+#else
     m_strAboutText = strAboutText + "\n" + strVersionText.arg(m_strVersion);
-#endif /* !VBOX_OSE */
-#ifdef DEBUG
+#endif
     m_strAboutText = m_strAboutText + QString(" (Qt%1)").arg(qVersion());
-#endif /* DEBUG */
     m_strAboutText = m_strAboutText + "\n" + QString("Copyright %1 %2 %3 and/or its affiliates. All rights reserved.")
                                                      .arg(QChar(0xa9)).arg(VBOX_C_YEAR).arg(VBOX_VENDOR);
     AssertPtrReturnVoid(m_pLabel);
diff --git a/src/VBox/Frontends/VirtualBox/src/VBoxAboutDlg.h b/src/VBox/Frontends/VirtualBox/src/VBoxAboutDlg.h
index 52fc8e5..92b830c 100644
--- a/src/VBox/Frontends/VirtualBox/src/VBoxAboutDlg.h
+++ b/src/VBox/Frontends/VirtualBox/src/VBoxAboutDlg.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp b/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp
index e7e65ab..719290d 100644
--- a/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2013 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -23,6 +23,10 @@
 # define LOG_GROUP LOG_GROUP_GUI
 
 /* Qt includes: */
+# ifdef RT_OS_WINDOWS
+#  include <iprt/win/windows.h> /* QGLWidget drags in Windows.h; -Wall forces us to use wrapper. */
+#  include <iprt/stdint.h>      /* QGLWidget drags in stdint.h; -Wall forces us to use wrapper. */
+# endif
 # include <QGLWidget>
 # include <QFile>
 # include <QTextStream>
@@ -318,7 +322,7 @@ uint32_t VBoxVHWAHandleTable::put(void * data)
 
     if(mcUsage == mcSize)
     {
-        /* @todo: resize */
+        /** @todo resize */
         AssertFailed();
     }
 
@@ -471,7 +475,7 @@ public:
         mRcName(aRcName),
         mType(aType),
         mInitialized(false)
-    {}
+    { NOREF(mType); }
 
 
     int init();
@@ -629,7 +633,7 @@ class VBoxVHWAGlProgram
 public:
     VBoxVHWAGlProgram(VBoxVHWAGlShader ** apShaders, int acShaders);
 
-    ~VBoxVHWAGlProgram();
+    virtual ~VBoxVHWAGlProgram();
 
     virtual int init();
     virtual void uninit();
@@ -2528,7 +2532,7 @@ int VBoxVHWAImage::vhwaSurfaceCreate (struct VBOXVHWACMD_SURF_CREATE *pCmd)
         Assert(bSuccess);
         if(!bSuccess)
         {
-            /* @todo: this is very bad, should not be here */
+            /** @todo this is very bad, should not be here */
             return VERR_GENERAL_FAILURE;
         }
     }
@@ -3009,16 +3013,16 @@ int VBoxVHWAImage::vhwaQueryInfo1(struct VBOXVHWACMD_QUERYINFO1 *pCmd)
                                  // | VBOXVHWA_CAPS_OVERLAYFOURCC set below if shader support is available
                                  ;
 
-        /* @todo: check if we could use DDSCAPS_ALPHA instead of colorkeying */
+        /** @todo check if we could use DDSCAPS_ALPHA instead of colorkeying */
 
         pCmd->u.out.caps2 = VBOXVHWA_CAPS2_CANRENDERWINDOWED
                                     | VBOXVHWA_CAPS2_WIDESURFACES;
 
-        //TODO: setup stretchCaps
+        /// @todo setup stretchCaps
         pCmd->u.out.stretchCaps = 0;
 
         pCmd->u.out.numOverlays = 1;
-        /* TODO: set curOverlays properly */
+        /** @todo set curOverlays properly */
         pCmd->u.out.curOverlays = 0;
 
         pCmd->u.out.surfaceCaps =
@@ -3585,7 +3589,7 @@ int VBoxVHWAImage::vhwaLoadExec(VHWACommandList * pCmdList, struct SSMHANDLE * p
 int VBoxVHWAImage::vhwaConstruct(struct VBOXVHWACMD_HH_CONSTRUCT *pCmd)
 {
 //    PVM pVM = (PVM)pCmd->pVM;
-//    uint32_t intsId = 0; /* @todo: set the proper id */
+//    uint32_t intsId = 0; /** @todo set the proper id */
 //
 //    char nameFuf[sizeof(VBOXQGL_STATE_NAMEBASE) + 8];
 //
@@ -3616,7 +3620,7 @@ int VBoxVHWAImage::vhwaConstruct(struct VBOXVHWACMD_HH_CONSTRUCT *pCmd)
 
 uchar * VBoxVHWAImage::vboxVRAMAddressFromOffset(uint64_t offset)
 {
-    /* @todo: check vramSize() */
+    /** @todo check vramSize() */
     return (offset != VBOXVHWA_OFFSET64_VOID) ? ((uint8_t*)vramBase()) + offset : NULL;
 }
 
@@ -3779,16 +3783,18 @@ void VBoxVHWAImage::resize(const VBoxFBSizeInfo & size)
     bool fallback = false;
 
     VBOXQGLLOG(("resizing: fmt=%d, vram=%p, bpp=%d, bpl=%d, width=%d, height=%d\n",
-                      size.pixelFormat(), size.VRAM(),
-                      size.bitsPerPixel(), size.bytesPerLine(),
-                      size.width(), size.height()));
+                size.pixelFormat(), size.VRAM(),
+                size.bitsPerPixel(), size.bytesPerLine(),
+                size.width(), size.height()));
 
     /* clean the old values first */
 
-    ulong bytesPerLine;
-    uint32_t bitsPerPixel;
-    uint32_t b = 0xff, g = 0xff00, r = 0xff0000;
-    bool bUsesGuestVram;
+    ulong    bytesPerLine = 0; /* Shut up MSC. */
+    uint32_t bitsPerPixel = 0; /* Shut up MSC. */
+    uint32_t b =     0xff;
+    uint32_t g =   0xff00;
+    uint32_t r = 0xff0000;
+    bool fUsesGuestVram = false; /* Shut up MSC. */
 
     /* check if we support the pixel format and can use the guest VRAM directly */
     if (size.pixelFormat() == KBitmapFormat_BGR)
@@ -3848,7 +3854,7 @@ void VBoxVHWAImage::resize(const VBoxFBSizeInfo & size)
         if (!fallback)
         {
             // ulong virtWdt = bitsPerLine / size.bitsPerPixel();
-            bUsesGuestVram = true;
+            fUsesGuestVram = true;
         }
     }
     else
@@ -3867,8 +3873,8 @@ void VBoxVHWAImage::resize(const VBoxFBSizeInfo & size)
         b = 0xff;
         g = 0xff00;
         r = 0xff0000;
-        bytesPerLine = size.width()*bitsPerPixel/8;
-        bUsesGuestVram = false;
+        bytesPerLine = size.width() * bitsPerPixel / 8;
+        fUsesGuestVram = false;
     }
 
     ulong bytesPerPixel = bitsPerPixel/8;
@@ -3908,7 +3914,7 @@ void VBoxVHWAImage::resize(const VBoxFBSizeInfo & size)
             0,
 #endif
             0 /* VBOXVHWAIMG_TYPE fFlags */);
-    pDisplay->init(NULL, bUsesGuestVram ? size.VRAM() : NULL);
+    pDisplay->init(NULL, fUsesGuestVram ? size.VRAM() : NULL);
     mDisplay.setVGA(pDisplay);
 //    VBOXQGLLOG(("\n\n*******\n\n     viewport size is: (%d):(%d)\n\n*******\n\n", size().width(), size().height()));
     mViewport = QRect(0,0,displayWidth, displayHeight);
@@ -5053,7 +5059,7 @@ void VBoxVHWACommandElementProcessor::postCmd(VBOXVHWA_PIPECMD_TYPE aType, void
         RTCritSectLeave(&mCritSect);
         return;
 #else
-    //TODO:
+    /// @todo
 #endif
     }
     pCmd->setData(aType, pvData);
diff --git a/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.h b/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.h
index 21053d0..6d87df3 100644
--- a/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.h
+++ b/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.h
@@ -1,10 +1,10 @@
-/* $Id:  $ */
+/* $Id: VBoxFBOverlay.h $ */
 /** @file
  * VBox Qt GUI - VBoxFrameBuffer Overly classes declarations.
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -16,7 +16,8 @@
  */
 #ifndef __VBoxFBOverlay_h__
 #define __VBoxFBOverlay_h__
-#if defined (VBOX_GUI_USE_QGL) || defined(VBOX_WITH_VIDEOHWACCEL)
+
+#if defined(VBOX_GUI_USE_QGL) || defined(VBOX_WITH_VIDEOHWACCEL)
 
 /* Defines: */
 //#define VBOXQGL_PROF_BASE 1
@@ -25,6 +26,10 @@
 #define VBOXVHWA_ALLOW_PRIMARY_AND_OVERLAY_ONLY 1
 
 /* Qt includes: */
+#ifdef RT_OS_WINDOWS
+# include <iprt/win/windows.h> /* QGLWidget drags in Windows.h; -Wall forces us to use wrapper. */
+# include <iprt/stdint.h>      /* QGLWidget drags in stdint.h; -Wall forces us to use wrapper. */
+#endif
 #include <QGLWidget>
 
 /* GUI includes: */
@@ -1839,6 +1844,6 @@ private:
     uint32_t m_id;
 };
 
-#endif
+#endif /* defined(VBOX_GUI_USE_QGL) || defined(VBOX_WITH_VIDEOHWACCEL) */
 
 #endif /* #ifndef __VBoxFBOverlay_h__ */
diff --git a/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlayCommon.h b/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlayCommon.h
index 6361428..a826280 100644
--- a/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlayCommon.h
+++ b/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlayCommon.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/VBoxGLSupportInfo.cpp b/src/VBox/Frontends/VirtualBox/src/VBoxGLSupportInfo.cpp
index 56a05c9..0a87d8f 100644
--- a/src/VBox/Frontends/VirtualBox/src/VBoxGLSupportInfo.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/VBoxGLSupportInfo.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2011 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -19,6 +19,10 @@
 # include <precomp.h>
 #else  /* !VBOX_WITH_PRECOMPILED_HEADERS */
 
+# ifdef RT_OS_WINDOWS
+#  include <iprt/win/windows.h> /* QGLWidget drags in Windows.h; -Wall forces us to use wrapper. */
+#  include <iprt/stdint.h>      /* QGLWidget drags in stdint.h; -Wall forces us to use wrapper. */
+# endif
 # include <QGLWidget>
 
 # include <iprt/assert.h>
@@ -462,9 +466,9 @@ void VBoxGLInfo::initExtSupport(const QGLContext & context)
             VBOXVHWA_PFNINIT_OBJECT_ARB(context, PFNVBOXVHWA_USE_PROGRAM, UseProgram, rc);
             VBOXVHWA_PFNINIT(context, PFNVBOXVHWA_DELETE_PROGRAM, DeleteProgram, DeleteObjectARB, rc);
 
-        //TODO:    VBOXVHWA_PFNINIT(PFNVBOXVHWA_IS_SHADER, IsShader, rc);
+        /// @todo    VBOXVHWA_PFNINIT(PFNVBOXVHWA_IS_SHADER, IsShader, rc);
             VBOXVHWA_PFNINIT(context, PFNVBOXVHWA_GET_SHADERIV, GetShaderiv, GetObjectParameterivARB, rc);
-        //TODO:    VBOXVHWA_PFNINIT(PFNVBOXVHWA_IS_PROGRAM, IsProgram, rc);
+        /// @todo    VBOXVHWA_PFNINIT(PFNVBOXVHWA_IS_PROGRAM, IsProgram, rc);
             VBOXVHWA_PFNINIT(context, PFNVBOXVHWA_GET_PROGRAMIV, GetProgramiv, GetObjectParameterivARB, rc);
             VBOXVHWA_PFNINIT(context, PFNVBOXVHWA_GET_ATTACHED_SHADERS, GetAttachedShaders, GetAttachedObjectsARB, rc);
             VBOXVHWA_PFNINIT(context, PFNVBOXVHWA_GET_SHADER_INFO_LOG, GetShaderInfoLog, GetInfoLogARB, rc);
@@ -661,7 +665,7 @@ bool VBoxVHWAInfo::checkVHWASupport()
 
     return false;
 #else
-    /* @todo: test & enable external app approach*/
+    /** @todo test & enable external app approach*/
     VBoxGLTmpContext ctx;
     const QGLContext *pContext = ctx.makeCurrent();
     Assert(pContext);
diff --git a/src/VBox/Frontends/VirtualBox/src/VBoxGlobalSettings.cpp b/src/VBox/Frontends/VirtualBox/src/VBoxGlobalSettings.cpp
index 5bfdd70..d1efe01 100644
--- a/src/VBox/Frontends/VirtualBox/src/VBoxGlobalSettings.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/VBoxGlobalSettings.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/VBoxGlobalSettings.h b/src/VBox/Frontends/VirtualBox/src/VBoxGlobalSettings.h
index 53c6838..9dc5a8a 100644
--- a/src/VBox/Frontends/VirtualBox/src/VBoxGlobalSettings.h
+++ b/src/VBox/Frontends/VirtualBox/src/VBoxGlobalSettings.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/VBoxLicenseViewer.cpp b/src/VBox/Frontends/VirtualBox/src/VBoxLicenseViewer.cpp
index 9195935..c8bbb7e 100644
--- a/src/VBox/Frontends/VirtualBox/src/VBoxLicenseViewer.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/VBoxLicenseViewer.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/VBoxLicenseViewer.h b/src/VBox/Frontends/VirtualBox/src/VBoxLicenseViewer.h
index 0d596c4..471a76a 100644
--- a/src/VBox/Frontends/VirtualBox/src/VBoxLicenseViewer.h
+++ b/src/VBox/Frontends/VirtualBox/src/VBoxLicenseViewer.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/VBoxSnapshotDetailsDlg.cpp b/src/VBox/Frontends/VirtualBox/src/VBoxSnapshotDetailsDlg.cpp
index 727269c..9497f98 100644
--- a/src/VBox/Frontends/VirtualBox/src/VBoxSnapshotDetailsDlg.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/VBoxSnapshotDetailsDlg.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2012 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/VBoxSnapshotDetailsDlg.h b/src/VBox/Frontends/VirtualBox/src/VBoxSnapshotDetailsDlg.h
index 2eeb078..08bacbf 100644
--- a/src/VBox/Frontends/VirtualBox/src/VBoxSnapshotDetailsDlg.h
+++ b/src/VBox/Frontends/VirtualBox/src/VBoxSnapshotDetailsDlg.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2012 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/VBoxSnapshotDetailsDlg.ui b/src/VBox/Frontends/VirtualBox/src/VBoxSnapshotDetailsDlg.ui
index 6b6dcc4..9ea5e13 100644
--- a/src/VBox/Frontends/VirtualBox/src/VBoxSnapshotDetailsDlg.ui
+++ b/src/VBox/Frontends/VirtualBox/src/VBoxSnapshotDetailsDlg.ui
@@ -2,7 +2,7 @@
  <comment>
  VBox frontends: Qt4 GUI ("VirtualBox"):
 
- Copyright (C) 2008-2012 Oracle Corporation
+ Copyright (C) 2008-2016 Oracle Corporation
 
  This file is part of VirtualBox Open Source Edition (OSE), as
  available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/VBoxTakeSnapshotDlg.cpp b/src/VBox/Frontends/VirtualBox/src/VBoxTakeSnapshotDlg.cpp
index 80102d5..59d63ef 100644
--- a/src/VBox/Frontends/VirtualBox/src/VBoxTakeSnapshotDlg.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/VBoxTakeSnapshotDlg.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/VBoxTakeSnapshotDlg.h b/src/VBox/Frontends/VirtualBox/src/VBoxTakeSnapshotDlg.h
index f4e2722..23634c3 100644
--- a/src/VBox/Frontends/VirtualBox/src/VBoxTakeSnapshotDlg.h
+++ b/src/VBox/Frontends/VirtualBox/src/VBoxTakeSnapshotDlg.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/VBoxTakeSnapshotDlg.ui b/src/VBox/Frontends/VirtualBox/src/VBoxTakeSnapshotDlg.ui
index 4d3e30b..e3454f1 100644
--- a/src/VBox/Frontends/VirtualBox/src/VBoxTakeSnapshotDlg.ui
+++ b/src/VBox/Frontends/VirtualBox/src/VBoxTakeSnapshotDlg.ui
@@ -2,7 +2,7 @@
  <comment>
  VBox frontends: Qt4 GUI ("VirtualBox"):
 
- Copyright (C) 2008-2012 Oracle Corporation
+ Copyright (C) 2008-2016 Oracle Corporation
 
  This file is part of VirtualBox Open Source Edition (OSE), as
  available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/VBoxUpdateDlg.ui b/src/VBox/Frontends/VirtualBox/src/VBoxUpdateDlg.ui
index 3dd1d87..f1475ef 100644
--- a/src/VBox/Frontends/VirtualBox/src/VBoxUpdateDlg.ui
+++ b/src/VBox/Frontends/VirtualBox/src/VBoxUpdateDlg.ui
@@ -2,7 +2,7 @@
  <comment>
  VBox frontends: Qt4 GUI ("VirtualBox"):
 
- Copyright (C) 2008-2012 Oracle Corporation
+ Copyright (C) 2008-2016 Oracle Corporation
 
  This file is part of VirtualBox Open Source Edition (OSE), as
  available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/converter/UIConverter.cpp b/src/VBox/Frontends/VirtualBox/src/converter/UIConverter.cpp
index 5e1933e..b72d939 100644
--- a/src/VBox/Frontends/VirtualBox/src/converter/UIConverter.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/converter/UIConverter.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/converter/UIConverter.h b/src/VBox/Frontends/VirtualBox/src/converter/UIConverter.h
index 9f40ccb..ad243fd 100644
--- a/src/VBox/Frontends/VirtualBox/src/converter/UIConverter.h
+++ b/src/VBox/Frontends/VirtualBox/src/converter/UIConverter.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackend.h b/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackend.h
index 5abd323..a81ec2c 100644
--- a/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackend.h
+++ b/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackend.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2014 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendCOM.cpp b/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendCOM.cpp
index b375b79..5bed8fd 100644
--- a/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendCOM.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendCOM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -123,7 +123,7 @@ template<> QIcon toIcon(const KMachineState &state)
         case KMachineState_DeletingSnapshotPaused: return UIIconPool::iconSet(":/state_discarding_16px.png");
         case KMachineState_RestoringSnapshot:      return UIIconPool::iconSet(":/state_discarding_16px.png");
         case KMachineState_DeletingSnapshot:       return UIIconPool::iconSet(":/state_discarding_16px.png");
-        case KMachineState_SettingUp:              return UIIconPool::iconSet(":/vm_settings_16px.png"); // TODO: Change icon!
+        case KMachineState_SettingUp:              return UIIconPool::iconSet(":/vm_settings_16px.png"); /// @todo Change icon!
         // case KMachineState_FirstOnline:
         // case KMachineState_LastOnline:
         // case KMachineState_FirstTransient:
@@ -279,6 +279,10 @@ template<> QString toString(const KMediumType &type)
 /* QString <= KMediumVariant: */
 template<> QString toString(const KMediumVariant &variant)
 {
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable:4063) /* warning C4063: case '65537' is not a valid value for switch of enum 'KMediumVariant' */
+#endif
     /* Note: KMediumVariant_Diff and KMediumVariant_Fixed are so far mutually exclusive: */
     switch (variant)
     {
@@ -307,6 +311,9 @@ template<> QString toString(const KMediumVariant &variant)
         default:
             AssertMsgFailed(("No text for %d", variant)); break;
     }
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
     return QString();
 }
 
diff --git a/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp b/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp
index 4a346a6..83a1816 100644
--- a/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIAdvancedSlider.cpp b/src/VBox/Frontends/VirtualBox/src/extensions/QIAdvancedSlider.cpp
index f1e8487..3a1f906 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIAdvancedSlider.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIAdvancedSlider.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2010 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIAdvancedSlider.h b/src/VBox/Frontends/VirtualBox/src/extensions/QIAdvancedSlider.h
index 0cee68d..e2c81d9 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIAdvancedSlider.h
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIAdvancedSlider.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2010 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIAdvancedToolBar.cpp b/src/VBox/Frontends/VirtualBox/src/extensions/QIAdvancedToolBar.cpp
index 43d4977..a5ef29b 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIAdvancedToolBar.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIAdvancedToolBar.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIAdvancedToolBar.h b/src/VBox/Frontends/VirtualBox/src/extensions/QIAdvancedToolBar.h
index b1adcae..13dda97 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIAdvancedToolBar.h
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIAdvancedToolBar.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIArrowButtonPress.cpp b/src/VBox/Frontends/VirtualBox/src/extensions/QIArrowButtonPress.cpp
index 073765e..f3a8b0a 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIArrowButtonPress.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIArrowButtonPress.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIArrowButtonPress.h b/src/VBox/Frontends/VirtualBox/src/extensions/QIArrowButtonPress.h
index b9d07a8..73267b0 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIArrowButtonPress.h
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIArrowButtonPress.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIArrowSplitter.cpp b/src/VBox/Frontends/VirtualBox/src/extensions/QIArrowSplitter.cpp
index 676d9b4..6bd980b 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIArrowSplitter.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIArrowSplitter.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,8 +29,8 @@
 # include "QIArrowSplitter.h"
 # include "QIArrowButtonSwitch.h"
 # include "QIArrowButtonPress.h"
+# include "UIDesktopWidgetWatchdog.h"
 # include "UIIconPool.h"
-# include "VBoxGlobal.h"
 
 /* Other VBox includes: */
 # include "iprt/assert.h"
@@ -82,7 +82,7 @@ QSize QIDetailsBrowser::minimumSizeHint() const
     documentSize.setHeight(documentSize.height() + iDocumentMargin);
 
     /* Get 40% of the screen-area to limit the resulting hint: */
-    const QSize screenGeometryDot4 = vboxGlobal().screenGeometry(this).size() * .4;
+    const QSize screenGeometryDot4 = gpDesktop->screenGeometry(this).size() * .4;
 
     /* Calculate minimum size-hint which is document-size limited by screen-area: */
     QSize mSizeHint = documentSize.boundedTo(screenGeometryDot4);
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIArrowSplitter.h b/src/VBox/Frontends/VirtualBox/src/extensions/QIArrowSplitter.h
index c9de57c..c8f9e58 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIArrowSplitter.h
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIArrowSplitter.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIDialogButtonBox.cpp b/src/VBox/Frontends/VirtualBox/src/extensions/QIDialogButtonBox.cpp
index f22b20d..e4302c5 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIDialogButtonBox.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIDialogButtonBox.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2010 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIDialogButtonBox.h b/src/VBox/Frontends/VirtualBox/src/extensions/QIDialogButtonBox.h
index e6cdccc..3b79a07 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIDialogButtonBox.h
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIDialogButtonBox.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2010 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIFileDialog.cpp b/src/VBox/Frontends/VirtualBox/src/extensions/QIFileDialog.cpp
index da4cd59..a06e6ad 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIFileDialog.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIFileDialog.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -32,7 +32,7 @@
 #  include <QThread>
 
 /* WinAPI includes */
-#  include "shlobj.h"
+#  include <iprt/win/shlobj.h>
 # endif /* !VBOX_WS_WIN */
 
 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
@@ -94,6 +94,7 @@ static QString winFilter (const QString &aFilter)
  */
 UINT_PTR CALLBACK OFNHookProc (HWND aHdlg, UINT aUiMsg, WPARAM aWParam, LPARAM aLParam)
 {
+    RT_NOREF(aWParam);
     if (aUiMsg == WM_NOTIFY)
     {
         OFNOTIFY *notif = (OFNOTIFY*) aLParam;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIFileDialog.h b/src/VBox/Frontends/VirtualBox/src/extensions/QIFileDialog.h
index 5842d7e..346eb33 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIFileDialog.h
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIFileDialog.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2011 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QILabel.cpp b/src/VBox/Frontends/VirtualBox/src/extensions/QILabel.cpp
index 9b1cc90..bdd7d58 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QILabel.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QILabel.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QILabel.h b/src/VBox/Frontends/VirtualBox/src/extensions/QILabel.h
index d7eb4aa..d546873 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QILabel.h
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QILabel.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QILabelSeparator.cpp b/src/VBox/Frontends/VirtualBox/src/extensions/QILabelSeparator.cpp
index 1d1c5d1..1983275 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QILabelSeparator.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QILabelSeparator.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2010 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QILabelSeparator.h b/src/VBox/Frontends/VirtualBox/src/extensions/QILabelSeparator.h
index d23e8bf..5925d0c 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QILabelSeparator.h
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QILabelSeparator.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2010 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QILineEdit.cpp b/src/VBox/Frontends/VirtualBox/src/extensions/QILineEdit.cpp
index 0735623..0b35f6a 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QILineEdit.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QILineEdit.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2013 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -20,11 +20,12 @@
 #else  /* !VBOX_WITH_PRECOMPILED_HEADERS */
 
 /* Qt includes: */
+# include <QtGlobal>                    /* for QT_VERSION */
 # if QT_VERSION < 0x050000
 #  ifdef VBOX_WS_WIN
 #   include <QLibrary>
-#  endif /* VBOX_WS_WIN */
-# endif /* QT_VERSION < 0x050000 */
+#  endif
+# endif
 
 /* GUI includes: */
 # include "QILineEdit.h"
@@ -33,15 +34,15 @@
 # if QT_VERSION < 0x050000
 #  ifdef VBOX_WS_WIN
 #   include "iprt/ldr.h"
-#  endif /* VBOX_WS_WIN */
-# endif /* QT_VERSION < 0x050000 */
+#  endif
+# endif
 
 /* External includes: */
 # if QT_VERSION < 0x050000
 #  ifdef VBOX_WS_WIN
-#   include <Windows.h>
-#  endif /* VBOX_WS_WIN */
-# endif /* QT_VERSION < 0x050000 */
+#   include <iprt/win/windows.h>
+#  endif
+# endif
 
 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
 
@@ -50,8 +51,8 @@
 #if QT_VERSION < 0x050000
 # ifdef VBOX_WS_WIN
 #  include <QWindowsVistaStyle>
-# endif /* VBOX_WS_WIN */
-#endif /* QT_VERSION < 0x050000 */
+# endif
+#endif
 
 
 void QILineEdit::setMinimumWidthByText (const QString &aText)
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QILineEdit.h b/src/VBox/Frontends/VirtualBox/src/extensions/QILineEdit.h
index ecdef0e..5450e0f 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QILineEdit.h
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QILineEdit.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2010 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIListView.cpp b/src/VBox/Frontends/VirtualBox/src/extensions/QIListView.cpp
index 790253c..c965c4f 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIListView.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIListView.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIListView.h b/src/VBox/Frontends/VirtualBox/src/extensions/QIListView.h
index 29ea554..b286d55 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIListView.h
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIListView.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIMainDialog.cpp b/src/VBox/Frontends/VirtualBox/src/extensions/QIMainDialog.cpp
index 6417560..d8ec0ad 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIMainDialog.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIMainDialog.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIMainDialog.h b/src/VBox/Frontends/VirtualBox/src/extensions/QIMainDialog.h
index c98a4ea..0030da4 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIMainDialog.h
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIMainDialog.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIMainWindow.cpp b/src/VBox/Frontends/VirtualBox/src/extensions/QIMainWindow.cpp
new file mode 100644
index 0000000..8e96bf1
--- /dev/null
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIMainWindow.cpp
@@ -0,0 +1,48 @@
+/* $Id: QIMainWindow.cpp $ */
+/** @file
+ * VBox Qt GUI - QIMainWindow class implementation.
+ */
+
+/*
+ * Copyright (C) 2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+#ifdef VBOX_WITH_PRECOMPILED_HEADERS
+# include <precomp.h>
+#else  /* !VBOX_WITH_PRECOMPILED_HEADERS */
+
+/* GUI includes: */
+# include "QIMainWindow.h"
+
+#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
+
+
+QIMainWindow::QIMainWindow(QWidget *pParent /* = 0 */, Qt::WindowFlags enmFlags /* = 0 */)
+    : QMainWindow(pParent, enmFlags)
+{
+}
+
+void QIMainWindow::restoreGeometry()
+{
+#ifdef VBOX_WS_MAC
+    /* Use the old approach for OSX: */
+    move(m_geometry.topLeft());
+    resize(m_geometry.size());
+#else /* VBOX_WS_MAC */
+    /* Use the new approach for Windows/X11: */
+    setGeometry(m_geometry);
+#endif /* !VBOX_WS_MAC */
+
+    /* Maximize (if necessary): */
+    if (shouldBeMaximized())
+        showMaximized();
+}
+
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIMainWindow.h b/src/VBox/Frontends/VirtualBox/src/extensions/QIMainWindow.h
new file mode 100644
index 0000000..da7d1fb
--- /dev/null
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIMainWindow.h
@@ -0,0 +1,48 @@
+/* $Id: QIMainWindow.h $ */
+/** @file
+ * VBox Qt GUI - QIMainWindow class declaration.
+ */
+
+/*
+ * Copyright (C) 2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+#ifndef ___QIMainWindow_h___
+#define ___QIMainWindow_h___
+
+/* Qt includes: */
+#include <QMainWindow>
+
+/** QMainWindow extension providing GUI
+  * with the extended geometry management support. */
+class QIMainWindow : public QMainWindow
+{
+    Q_OBJECT;
+
+public:
+
+    /** Constructs main window passing @a pParent and @a enmFlags to base-class. */
+    QIMainWindow(QWidget *pParent = 0, Qt::WindowFlags enmFlags = 0);
+
+protected:
+
+    /** Returns whether the window should be maximized when geometry being restored. */
+    virtual bool shouldBeMaximized() const { return false; }
+
+    /** Restores the cached window geometry. */
+    void restoreGeometry();
+
+    /** Holds the cached window geometry. */
+    QRect m_geometry;
+};
+
+#endif /* ___QIMainWindow_h___ */
+
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIMenu.cpp b/src/VBox/Frontends/VirtualBox/src/extensions/QIMenu.cpp
index 5a7a1ae..d600945 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIMenu.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIMenu.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2014 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIMenu.h b/src/VBox/Frontends/VirtualBox/src/extensions/QIMenu.h
index 9232313..31cdb31 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIMenu.h
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIMenu.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2014 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.cpp b/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.cpp
index c8c21e3..6df66b8 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.h b/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.h
index 71210d7..58a5a2f 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.h
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIProcess.cpp b/src/VBox/Frontends/VirtualBox/src/extensions/QIProcess.cpp
index 708ba71..1f756d5 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIProcess.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIProcess.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIProcess.h b/src/VBox/Frontends/VirtualBox/src/extensions/QIProcess.h
index 5d8db0c..35c8bfb 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIProcess.h
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIProcess.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIRichTextLabel.cpp b/src/VBox/Frontends/VirtualBox/src/extensions/QIRichTextLabel.cpp
index b67caaf..0d92fcc 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIRichTextLabel.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIRichTextLabel.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIRichTextLabel.h b/src/VBox/Frontends/VirtualBox/src/extensions/QIRichTextLabel.h
index 01754cb..7cb0314 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIRichTextLabel.h
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIRichTextLabel.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIRichToolButton.cpp b/src/VBox/Frontends/VirtualBox/src/extensions/QIRichToolButton.cpp
index c648430..7d742e0 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIRichToolButton.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIRichToolButton.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIRichToolButton.h b/src/VBox/Frontends/VirtualBox/src/extensions/QIRichToolButton.h
index ecb9c89..2a0ba4c 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIRichToolButton.h
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIRichToolButton.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QISplitter.cpp b/src/VBox/Frontends/VirtualBox/src/extensions/QISplitter.cpp
index 5f6f5b4..09b88b6 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QISplitter.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QISplitter.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QISplitter.h b/src/VBox/Frontends/VirtualBox/src/extensions/QISplitter.h
index 8b98aa7..d61bf83 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QISplitter.h
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QISplitter.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIStatusBar.cpp b/src/VBox/Frontends/VirtualBox/src/extensions/QIStatusBar.cpp
index d6e284a..6901ccc 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIStatusBar.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIStatusBar.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIStatusBar.h b/src/VBox/Frontends/VirtualBox/src/extensions/QIStatusBar.h
index 95b0eb8..79ccf48 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIStatusBar.h
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIStatusBar.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIStatusBarIndicator.cpp b/src/VBox/Frontends/VirtualBox/src/extensions/QIStatusBarIndicator.cpp
index f1aaa38..0b3628b 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIStatusBarIndicator.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIStatusBarIndicator.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIStatusBarIndicator.h b/src/VBox/Frontends/VirtualBox/src/extensions/QIStatusBarIndicator.h
index 242119f..4208f34 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIStatusBarIndicator.h
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIStatusBarIndicator.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -86,7 +86,7 @@ public slots:
     /** Defines int @a state. */
     virtual void setState(int iState) { m_iState = iState; repaint(); }
     /** Defines bool @a state. */
-    virtual void setState(bool fState) { setState((int)fState); }
+    void setState(bool fState) { setState((int)fState); }
 
 protected:
 
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIStyledItemDelegate.h b/src/VBox/Frontends/VirtualBox/src/extensions/QIStyledItemDelegate.h
index cf45774..43935be 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIStyledItemDelegate.h
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIStyledItemDelegate.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QITabWidget.h b/src/VBox/Frontends/VirtualBox/src/extensions/QITabWidget.h
index e9254d6..e76747e 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QITabWidget.h
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QITabWidget.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2013 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIToolButton.h b/src/VBox/Frontends/VirtualBox/src/extensions/QIToolButton.h
index 040fc91..34aacda 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIToolButton.h
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIToolButton.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QITreeView.cpp b/src/VBox/Frontends/VirtualBox/src/extensions/QITreeView.cpp
index 96cfa18..4cf709d 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QITreeView.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QITreeView.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2010 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QITreeView.h b/src/VBox/Frontends/VirtualBox/src/extensions/QITreeView.h
index d6ca889..8ad96f1 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QITreeView.h
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QITreeView.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2010 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QITreeWidget.cpp b/src/VBox/Frontends/VirtualBox/src/extensions/QITreeWidget.cpp
index 58559ae..f747057 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QITreeWidget.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QITreeWidget.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2011 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QITreeWidget.h b/src/VBox/Frontends/VirtualBox/src/extensions/QITreeWidget.h
index 6e0b878..f3e7838 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QITreeWidget.h
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QITreeWidget.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2011 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIWidgetValidator.cpp b/src/VBox/Frontends/VirtualBox/src/extensions/QIWidgetValidator.cpp
index a8d9a07..ff57075 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIWidgetValidator.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIWidgetValidator.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/QIWidgetValidator.h b/src/VBox/Frontends/VirtualBox/src/extensions/QIWidgetValidator.h
index 51a6f18..b41f2f1 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/QIWidgetValidator.h
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/QIWidgetValidator.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/graphics/QIGraphicsView.cpp b/src/VBox/Frontends/VirtualBox/src/extensions/graphics/QIGraphicsView.cpp
index d8426f4..0c286bd 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/graphics/QIGraphicsView.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/graphics/QIGraphicsView.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/graphics/QIGraphicsView.h b/src/VBox/Frontends/VirtualBox/src/extensions/graphics/QIGraphicsView.h
index 039ebcb..dfae7b7 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/graphics/QIGraphicsView.h
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/graphics/QIGraphicsView.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/graphics/QIGraphicsWidget.cpp b/src/VBox/Frontends/VirtualBox/src/extensions/graphics/QIGraphicsWidget.cpp
index b678a3e..eb86063 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/graphics/QIGraphicsWidget.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/graphics/QIGraphicsWidget.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extensions/graphics/QIGraphicsWidget.h b/src/VBox/Frontends/VirtualBox/src/extensions/graphics/QIGraphicsWidget.h
index 63c1563..77d29bf 100644
--- a/src/VBox/Frontends/VirtualBox/src/extensions/graphics/QIGraphicsWidget.h
+++ b/src/VBox/Frontends/VirtualBox/src/extensions/graphics/QIGraphicsWidget.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.cpp b/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.cpp
index 1ee1888..0abba9c 100644
--- a/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h b/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h
index a75d3f6..3bee354 100644
--- a/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h
+++ b/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp b/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
index 138dc7b..4802987 100644
--- a/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2014 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -23,7 +23,6 @@
 # include <QMutex>
 # include <QMetaEnum>
 # ifdef VBOX_GUI_WITH_EXTRADATA_MANAGER_UI
-#  include <QMainWindow>
 #  include <QMenuBar>
 #  include <QListView>
 #  include <QTableView>
@@ -38,6 +37,7 @@
 # endif /* VBOX_GUI_WITH_EXTRADATA_MANAGER_UI */
 
 /* GUI includes: */
+# include "UIDesktopWidgetWatchdog.h"
 # include "UIExtraDataManager.h"
 # include "UIMainEventListener.h"
 # include "VBoxGlobalSettings.h"
@@ -51,6 +51,7 @@
 #  include "UIVirtualBoxEventHandler.h"
 #  include "UIIconPool.h"
 #  include "UIToolBar.h"
+#  include "QIMainWindow.h"
 #  include "QIWidgetValidator.h"
 #  include "QIDialogButtonBox.h"
 #  include "QIFileDialog.h"
@@ -457,9 +458,9 @@ protected:
 };
 
 
-/** QMainWindow extension
+/** QIMainWindow extension
   * providing Extra Data Manager with UI features. */
-class UIExtraDataManagerWindow : public QMainWindow
+class UIExtraDataManagerWindow : public QIMainWindow
 {
     Q_OBJECT;
 
@@ -529,6 +530,12 @@ private slots:
 
 private:
 
+    /** @name General
+      * @{ */
+        /** Returns whether the window should be maximized when geometry being restored. */
+        virtual bool shouldBeMaximized() const /* override */;
+    /** @} */
+
     /** @name Prepare/Cleanup
       * @{ */
         /** Prepare instance. */
@@ -639,8 +646,6 @@ private:
 
     /** @name General
       * @{ */
-        /** Current geometry. */
-        QRect m_geometry;
         QVBoxLayout *m_pMainLayout;
         /** Data pane: Tool-bar. */
         UIToolBar *m_pToolBar;
@@ -1323,6 +1328,11 @@ void UIExtraDataManagerWindow::sltLoad()
     }
 }
 
+bool UIExtraDataManagerWindow::shouldBeMaximized() const
+{
+    return gEDataManager->extraDataManagerShouldBeMaximized();
+}
+
 void UIExtraDataManagerWindow::prepare()
 {
     /* Prepare this: */
@@ -1673,18 +1683,11 @@ void UIExtraDataManagerWindow::loadSettings()
     {
         /* Load geometry: */
         m_geometry = gEDataManager->extraDataManagerGeometry(this);
-#ifdef VBOX_WS_MAC
-        move(m_geometry.topLeft());
-        resize(m_geometry.size());
-#else /* VBOX_WS_MAC */
-        setGeometry(m_geometry);
-#endif /* !VBOX_WS_MAC */
-        LogRel2(("GUI: UIExtraDataManagerWindow: Geometry loaded to: Origin=%dx%d, Size=%dx%d\n",
-                 m_geometry.x(), m_geometry.y(), m_geometry.width(), m_geometry.height()));
 
-        /* Maximize (if necessary): */
-        if (gEDataManager->extraDataManagerShouldBeMaximized())
-            showMaximized();
+        /* Restore geometry: */
+        LogRel2(("GUI: UIExtraDataManagerWindow: Restoring geometry to: Origin=%dx%d, Size=%dx%d\n",
+                 m_geometry.x(), m_geometry.y(), m_geometry.width(), m_geometry.height()));
+        restoreGeometry();
     }
 
     /* Load splitter hints: */
@@ -1722,7 +1725,7 @@ void UIExtraDataManagerWindow::cleanup()
 bool UIExtraDataManagerWindow::event(QEvent *pEvent)
 {
     /* Pre-process through base-class: */
-    bool fResult = QMainWindow::event(pEvent);
+    bool fResult = QIMainWindow::event(pEvent);
 
     /* Process required events: */
     switch (pEvent->type())
@@ -2427,8 +2430,8 @@ QRect UIExtraDataManager::selectorWindowGeometry(QWidget *pWidget)
         geometry.setSize(geometry.size().expandedTo(pWidget->minimumSizeHint()));
 
     /* Get available-geometry [of screen with point (iX, iY) if possible]: */
-    const QRect availableGeometry = fOk ? vboxGlobal().availableGeometry(QPoint(iX, iY)) :
-                                          vboxGlobal().availableGeometry();
+    const QRect availableGeometry = fOk ? gpDesktop->availableGeometry(QPoint(iX, iY)) :
+                                          gpDesktop->availableGeometry();
 
     /* In Windows Qt fails to reposition out of screen window properly, so doing it ourselves: */
 #ifdef VBOX_WS_WIN
@@ -3639,8 +3642,8 @@ QRect UIExtraDataManager::informationWindowGeometry(QWidget *pWidget, QWidget *p
         geometry.setSize(geometry.size().expandedTo(pWidget->minimumSizeHint()));
 
     /* Get available-geometry [of screen with point (iX, iY) if possible]: */
-    const QRect availableGeometry = fOk ? vboxGlobal().availableGeometry(QPoint(iX, iY)) :
-                                          vboxGlobal().availableGeometry();
+    const QRect availableGeometry = fOk ? gpDesktop->availableGeometry(QPoint(iX, iY)) :
+                                          gpDesktop->availableGeometry();
 
     /* In Windows Qt fails to reposition out of screen window properly, so doing it ourselves: */
 #ifdef VBOX_WS_WIN
@@ -3798,8 +3801,8 @@ QRect UIExtraDataManager::extraDataManagerGeometry(QWidget *pWidget)
         geometry.setSize(geometry.size().expandedTo(pWidget->minimumSizeHint()));
 
     /* Get available-geometry [of screen with point (iX, iY) if possible]: */
-    const QRect availableGeometry = fOk ? vboxGlobal().availableGeometry(QPoint(iX, iY)) :
-                                          vboxGlobal().availableGeometry();
+    const QRect availableGeometry = fOk ? gpDesktop->availableGeometry(QPoint(iX, iY)) :
+                                          gpDesktop->availableGeometry();
 
     /* In Windows Qt fails to reposition out of screen window properly, so doing it ourselves: */
 #ifdef VBOX_WS_WIN
@@ -3917,8 +3920,8 @@ QRect UIExtraDataManager::logWindowGeometry(QWidget *pWidget, const QRect &defau
     /* In Windows Qt fails to reposition out of screen window properly, so doing it ourselves: */
 #ifdef VBOX_WS_WIN
     /* Get available-geometry [of screen with point (iX, iY) if possible]: */
-    const QRect availableGeometry = fOk ? vboxGlobal().availableGeometry(QPoint(iX, iY)) :
-                                          vboxGlobal().availableGeometry();
+    const QRect availableGeometry = fOk ? gpDesktop->availableGeometry(QPoint(iX, iY)) :
+                                          gpDesktop->availableGeometry();
 
     /* Make sure resulting geometry is within current bounds: */
     if (!availableGeometry.contains(geometry))
diff --git a/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h b/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h
index 6ff9bdf..8cca037 100644
--- a/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h
+++ b/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2014 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/CIShared.h b/src/VBox/Frontends/VirtualBox/src/globals/CIShared.h
index e20f06f..77bfcf4 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/CIShared.h
+++ b/src/VBox/Frontends/VirtualBox/src/globals/CIShared.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/COMDefs.cpp b/src/VBox/Frontends/VirtualBox/src/globals/COMDefs.cpp
index 6648d8b..fb27d2a 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/COMDefs.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/globals/COMDefs.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -226,7 +226,15 @@ void COMBase::FromSafeArray (const com::SafeGUIDArray &aArr,
     AssertCompileSize (GUID, sizeof (QUuid));
     aVec.resize (static_cast <int> (aArr.size()));
     for (int i = 0; i < aVec.size(); ++ i)
+    {
+#ifdef VBOX_WITH_XPCOM
         aVec [i] = *(QUuid*) &aArr [i];
+#else
+        /* No by-reference accessor, only by-value. So spell it out to avoid warnings. */
+        GUID Tmp = aArr[i];
+        aVec[i] = *(QUuid *)&Tmp;
+#endif
+    }
 }
 
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/COMDefs.h b/src/VBox/Frontends/VirtualBox/src/globals/COMDefs.h
index 96ed9fc..5ee307c 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/COMDefs.h
+++ b/src/VBox/Frontends/VirtualBox/src/globals/COMDefs.h
@@ -8,7 +8,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/QIWithRetranslateUI.h b/src/VBox/Frontends/VirtualBox/src/globals/QIWithRetranslateUI.h
index d98cfee..7f4fb30 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/QIWithRetranslateUI.h
+++ b/src/VBox/Frontends/VirtualBox/src/globals/QIWithRetranslateUI.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2012 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp b/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp
index 2b4e37e..31a1d15 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2014 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1391,7 +1391,7 @@ void UIActionPool::retranslateUi()
 bool UIActionPool::event(QEvent *pEvent)
 {
     /* Depending on event-type: */
-    switch (pEvent->type())
+    switch ((UIEventType)pEvent->type())
     {
         case ActivateActionEventType:
         {
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h b/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h
index 78ee757..c83d62b 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h
+++ b/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2014 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/UIAnimationFramework.cpp b/src/VBox/Frontends/VirtualBox/src/globals/UIAnimationFramework.cpp
index d330bde..f022063 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/UIAnimationFramework.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/globals/UIAnimationFramework.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/UIAnimationFramework.h b/src/VBox/Frontends/VirtualBox/src/globals/UIAnimationFramework.h
index 3026455..dc4ce2a 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/UIAnimationFramework.h
+++ b/src/VBox/Frontends/VirtualBox/src/globals/UIAnimationFramework.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.cpp b/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.cpp
index 5567015..ba10c0e 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.h b/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.h
index f353c06..985c212 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.h
+++ b/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp b/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp
index aab7229..eb7a869 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -15,18 +15,31 @@
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
 
+#ifdef VBOX_WITH_PRECOMPILED_HEADERS
+# include <precomp.h>
+#else  /* !VBOX_WITH_PRECOMPILED_HEADERS */
+
 /* Qt includes: */
-#include <QApplication>
-#include <QDesktopWidget>
+# include <QApplication>
+# include <QDesktopWidget>
+# if QT_VERSION >= 0x050000
+#  include <QScreen>
+# endif /* QT_VERSION >= 0x050000 */
 
 /* GUI includes: */
-#include "VBoxGlobal.h"
-#include "UIDesktopWidgetWatchdog.h"
+# include "UIDesktopWidgetWatchdog.h"
+# ifdef VBOX_WS_X11
+#  include "VBoxGlobal.h"
+# endif /* VBOX_WS_X11 */
 
 /* Other VBox includes: */
-#include <iprt/assert.h>
+# include <iprt/assert.h>
+
+#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
 
 
+#ifdef VBOX_WS_X11
+
 /** QWidget extension used as
   * an invisible window on the basis of which we
   * can calculate available host-screen geometry. */
@@ -55,6 +68,11 @@ private:
     int m_iHostScreenIndex;
 };
 
+
+/*********************************************************************************************************************************
+*   Class UIInvisibleWindow implementation.                                                                                      *
+*********************************************************************************************************************************/
+
 UIInvisibleWindow::UIInvisibleWindow(int iHostScreenIndex)
     : QWidget(0, Qt::Window | Qt::FramelessWindowHint)
     , m_iHostScreenIndex(iHostScreenIndex)
@@ -63,14 +81,9 @@ UIInvisibleWindow::UIInvisibleWindow(int iHostScreenIndex)
     resize(1, 1);
     /* Apply visual and mouse-event mask for that 1 pixel: */
     setMask(QRect(0, 0, 1, 1));
-#ifdef VBOX_WS_X11
     /* For composite WMs make this 1 pixel transparent: */
     if (vboxGlobal().isCompositingManagerRunning())
         setAttribute(Qt::WA_TranslucentBackground);
-#else /* !VBOX_WS_X11 */
-    /* Make this 1 pixel transparent: */
-    setAttribute(Qt::WA_TranslucentBackground);
-#endif /* !VBOX_WS_X11 */
 }
 
 void UIInvisibleWindow::resizeEvent(QResizeEvent *pEvent)
@@ -86,136 +99,370 @@ void UIInvisibleWindow::resizeEvent(QResizeEvent *pEvent)
     emit sigHostScreenAvailableGeometryCalculated(m_iHostScreenIndex, QRect(x(), y(), width(), height()));
 }
 
-UIDesktopWidgetWatchdog::UIDesktopWidgetWatchdog(QObject *pParent)
-    : QObject(pParent)
-    , m_pDesktopWidget(QApplication::desktop())
-    , m_cHostScreenCount(-1)
+#endif /* VBOX_WS_X11 */
+
+
+/*********************************************************************************************************************************
+*   Class UIDesktopWidgetWatchdog implementation.                                                                                *
+*********************************************************************************************************************************/
+
+/* static */
+UIDesktopWidgetWatchdog *UIDesktopWidgetWatchdog::m_spInstance = 0;
+
+/* static */
+void UIDesktopWidgetWatchdog::create()
+{
+    /* Make sure instance isn't created: */
+    AssertReturnVoid(!m_spInstance);
+
+    /* Create/prepare instance: */
+    new UIDesktopWidgetWatchdog;
+    AssertReturnVoid(m_spInstance);
+    m_spInstance->prepare();
+}
+
+/* static */
+void UIDesktopWidgetWatchdog::destroy()
 {
-    /* Prepare: */
-    prepare();
+    /* Make sure instance is created: */
+    AssertReturnVoid(m_spInstance);
+
+    /* Cleanup/destroy instance: */
+    m_spInstance->cleanup();
+    delete m_spInstance;
+    AssertReturnVoid(!m_spInstance);
+}
+
+UIDesktopWidgetWatchdog::UIDesktopWidgetWatchdog()
+{
+    /* Initialize instance: */
+    m_spInstance = this;
 }
 
 UIDesktopWidgetWatchdog::~UIDesktopWidgetWatchdog()
 {
-    /* Cleanup: */
-    cleanup();
+    /* Deinitialize instance: */
+    m_spInstance = 0;
 }
 
-const QRect	UIDesktopWidgetWatchdog::screenGeometry(int iHostScreenIndex /* = -1 */) const
+int UIDesktopWidgetWatchdog::overallDesktopWidth() const
 {
-    /* Make sure index is valid: */
-    if (iHostScreenIndex < 0 || iHostScreenIndex >= m_cHostScreenCount)
-        iHostScreenIndex = m_pDesktopWidget->primaryScreen();
-    AssertReturn(iHostScreenIndex >= 0 && iHostScreenIndex < m_cHostScreenCount, QRect());
+    /* Redirect call to desktop-widget: */
+    return QApplication::desktop()->width();
+}
+
+int UIDesktopWidgetWatchdog::overallDesktopHeight() const
+{
+    /* Redirect call to desktop-widget: */
+    return QApplication::desktop()->height();
+}
 
+int UIDesktopWidgetWatchdog::screenCount() const
+{
     /* Redirect call to desktop-widget: */
-    return m_pDesktopWidget->screenGeometry(iHostScreenIndex);
+    return QApplication::desktop()->screenCount();
 }
 
-const QRect UIDesktopWidgetWatchdog::availableGeometry(int iHostScreenIndex /* = -1 */) const
+int UIDesktopWidgetWatchdog::screenNumber(const QWidget *pWidget) const
+{
+    /* Redirect call to desktop-widget: */
+    return QApplication::desktop()->screenNumber(pWidget);
+}
+
+int UIDesktopWidgetWatchdog::screenNumber(const QPoint &point) const
+{
+    /* Redirect call to desktop-widget: */
+    return QApplication::desktop()->screenNumber(point);
+}
+
+const QRect UIDesktopWidgetWatchdog::screenGeometry(int iHostScreenIndex /* = -1 */) const
 {
     /* Make sure index is valid: */
-    if (iHostScreenIndex < 0 || iHostScreenIndex >= m_cHostScreenCount)
-        iHostScreenIndex = m_pDesktopWidget->primaryScreen();
-    AssertReturn(iHostScreenIndex >= 0 && iHostScreenIndex < m_cHostScreenCount, QRect());
+    if (iHostScreenIndex < 0 || iHostScreenIndex >= screenCount())
+        iHostScreenIndex = QApplication::desktop()->primaryScreen();
+    AssertReturn(iHostScreenIndex >= 0 && iHostScreenIndex < screenCount(), QRect());
 
-    /* Return cached available-geometry: */
-    return m_availableGeometryData.value(iHostScreenIndex);
+    /* Redirect call to desktop-widget: */
+    return QApplication::desktop()->screenGeometry(iHostScreenIndex);
 }
 
-void UIDesktopWidgetWatchdog::sltUpdateHostScreenConfiguration(int cHostScreenCount /* = -1 */)
+const QRect UIDesktopWidgetWatchdog::screenGeometry(const QWidget *pWidget) const
 {
-//    printf("UIDesktopWidgetWatchdog::sltUpdateHostScreenConfiguration(%d)\n", cHostScreenCount);
+    /* Redirect call to wrapper above: */
+    return screenGeometry(screenNumber(pWidget));
+}
 
-    /* Acquire new host-screen count: */
-    m_cHostScreenCount = cHostScreenCount != -1 ? cHostScreenCount : m_pDesktopWidget->screenCount();
+const QRect UIDesktopWidgetWatchdog::screenGeometry(const QPoint &point) const
+{
+    /* Redirect call to wrapper above: */
+    return screenGeometry(screenNumber(point));
+}
 
-    /* Cleanup existing workers first: */
-    foreach (QWidget *pWorker, m_availableGeometryWorkers)
-        if (pWorker)
-            pWorker->disconnect();
-    qDeleteAll(m_availableGeometryWorkers);
-    m_availableGeometryWorkers.clear();
-    m_availableGeometryData.clear();
+const QRect UIDesktopWidgetWatchdog::availableGeometry(int iHostScreenIndex /* = -1 */) const
+{
+    /* Make sure index is valid: */
+    if (iHostScreenIndex < 0 || iHostScreenIndex >= screenCount())
+        iHostScreenIndex = QApplication::desktop()->primaryScreen();
+    AssertReturn(iHostScreenIndex >= 0 && iHostScreenIndex < screenCount(), QRect());
 
-    /* Resize workers vectors to new host-screen count: */
-    m_availableGeometryWorkers.resize(m_cHostScreenCount);
-    m_availableGeometryData.resize(m_cHostScreenCount);
+#ifdef VBOX_WS_X11
+    /* Get cached available-geometry: */
+    const QRect availableGeometry = m_availableGeometryData.value(iHostScreenIndex);
+    /* Return cached available-geometry if it's valid or screen-geometry otherwise: */
+    return availableGeometry.isValid() ? availableGeometry :
+           QApplication::desktop()->screenGeometry(iHostScreenIndex);
+#else /* !VBOX_WS_X11 */
+    /* Redirect call to desktop-widget: */
+    return QApplication::desktop()->availableGeometry(iHostScreenIndex);
+#endif /* !VBOX_WS_X11 */
+}
 
-    /* Calculate host-screen available-geometry for each particular host-screen: */
-    for (int iHostScreenIndex = 0; iHostScreenIndex < m_cHostScreenCount; ++iHostScreenIndex)
-        sltRecalculateHostScreenAvailableGeometry(iHostScreenIndex);
+const QRect UIDesktopWidgetWatchdog::availableGeometry(const QWidget *pWidget) const
+{
+    /* Redirect call to wrapper above: */
+    return availableGeometry(screenNumber(pWidget));
 }
 
-void UIDesktopWidgetWatchdog::sltRecalculateHostScreenAvailableGeometry(int iHostScreenIndex)
+const QRect UIDesktopWidgetWatchdog::availableGeometry(const QPoint &point) const
 {
-//    printf("UIDesktopWidgetWatchdog::sltRecalculateHostScreenAvailableGeometry(%d)\n", iHostScreenIndex);
+    /* Redirect call to wrapper above: */
+    return availableGeometry(screenNumber(point));
+}
 
-    /* Make sure index is valid: */
-    if (iHostScreenIndex < 0 || iHostScreenIndex >= m_cHostScreenCount)
-        iHostScreenIndex = m_pDesktopWidget->primaryScreen();
-    AssertReturnVoid(iHostScreenIndex >= 0 && iHostScreenIndex < m_cHostScreenCount);
+const QRegion UIDesktopWidgetWatchdog::overallScreenRegion() const
+{
+    /* Calculate region: */
+    QRegion region;
+    for (int iScreenIndex = 0; iScreenIndex < gpDesktop->screenCount(); ++iScreenIndex)
+    {
+        /* Get enumerated screen's available area: */
+        QRect rect = gpDesktop->screenGeometry(iScreenIndex);
+#ifdef VBOX_WS_WIN
+        /* On Windows host window can exceed the available
+         * area in maximized/sticky-borders state: */
+        rect.adjust(-10, -10, 10, 10);
+#endif /* VBOX_WS_WIN */
+        /* Append rectangle: */
+        region += rect;
+    }
+    /* Return region: */
+    return region;
+}
 
-    /* Create invisible frame-less window worker: */
-    UIInvisibleWindow *pWorker = new UIInvisibleWindow(iHostScreenIndex);
-    AssertPtrReturnVoid(pWorker);
+const QRegion UIDesktopWidgetWatchdog::overallAvailableRegion() const
+{
+    /* Calculate region: */
+    QRegion region;
+    for (int iScreenIndex = 0; iScreenIndex < gpDesktop->screenCount(); ++iScreenIndex)
     {
-        /* Remember created worker: */
-        if (m_availableGeometryWorkers.value(iHostScreenIndex))
-            delete m_availableGeometryWorkers.value(iHostScreenIndex);
-        m_availableGeometryWorkers[iHostScreenIndex] = pWorker;
-        /* Get the screen-geometry: */
-        const QRect hostScreenGeometry = screenGeometry(iHostScreenIndex);
-        /* Use the screen-geometry as the temporary value for available-geometry: */
-        m_availableGeometryData[iHostScreenIndex] = hostScreenGeometry;
-        /* Connect worker listener: */
-        connect(pWorker, SIGNAL(sigHostScreenAvailableGeometryCalculated(int, QRect)),
-                this, SLOT(sltHandleHostScreenAvailableGeometryCalculated(int, QRect)));
-        /* Place worker to corresponding host-screen: */
-        pWorker->move(hostScreenGeometry.topLeft());
-        /* And finally, maximize it: */
-        pWorker->showMaximized();
+        /* Get enumerated screen's available area: */
+        QRect rect = gpDesktop->availableGeometry(iScreenIndex);
+#ifdef VBOX_WS_WIN
+        /* On Windows host window can exceed the available
+         * area in maximized/sticky-borders state: */
+        rect.adjust(-10, -10, 10, 10);
+#endif /* VBOX_WS_WIN */
+        /* Append rectangle: */
+        region += rect;
     }
+    /* Return region: */
+    return region;
+}
+
+#if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000
+bool UIDesktopWidgetWatchdog::isFakeScreenDetected() const
+{
+    // WORKAROUND:
+    // In 5.6.1 Qt devs taught the XCB plugin to silently swap last detached screen
+    // with a fake one, and there is no API-way to distinguish fake from real one
+    // because all they do is erasing output for the last real screen, keeping
+    // all other screen attributes stale. Gladly output influencing screen name
+    // so we can use that horrible workaround to detect a fake XCB screen.
+    return    qApp->screens().size() == 0 /* zero-screen case is impossible after 5.6.1 */
+           || (qApp->screens().size() == 1 && qApp->screens().first()->name() == ":0.0");
+}
+#endif /* VBOX_WS_X11 && QT_VERSION >= 0x050000 */
+
+void UIDesktopWidgetWatchdog::sltHandleHostScreenCountChanged(int cHostScreenCount)
+{
+    Q_UNUSED(cHostScreenCount);
+
+#if QT_VERSION < 0x050000
+//    printf("UIDesktopWidgetWatchdog::sltHandleHostScreenCountChanged(%d)\n", cHostScreenCount);
+
+# ifdef VBOX_WS_X11
+    /* Update host-screen configuration: */
+    updateHostScreenConfiguration(cHostScreenCount);
+# endif /* VBOX_WS_X11 */
+
+    /* Notify listeners: */
+    emit sigHostScreenCountChanged(cHostScreenCount);
+#endif /* QT_VERSION < 0x050000 */
+}
+
+void UIDesktopWidgetWatchdog::sltHostScreenAdded(QScreen *pHostScreen)
+{
+    Q_UNUSED(pHostScreen);
+
+#if QT_VERSION >= 0x050000
+//    printf("UIDesktopWidgetWatchdog::sltHostScreenAdded(%d)\n", screenCount());
+
+# ifdef VBOX_WS_X11
+    /* Update host-screen configuration: */
+    updateHostScreenConfiguration();
+# endif /* VBOX_WS_X11 */
+
+    /* Notify listeners: */
+    emit sigHostScreenCountChanged(screenCount());
+#endif /* QT_VERSION >= 0x050000 */
 }
 
+void UIDesktopWidgetWatchdog::sltHostScreenRemoved(QScreen *pHostScreen)
+{
+    Q_UNUSED(pHostScreen);
+
+#if QT_VERSION >= 0x050000
+//    printf("UIDesktopWidgetWatchdog::sltHostScreenRemoved(%d)\n", screenCount());
+
+# ifdef VBOX_WS_X11
+    /* Update host-screen configuration: */
+    updateHostScreenConfiguration();
+# endif /* VBOX_WS_X11 */
+
+    /* Notify listeners: */
+    emit sigHostScreenCountChanged(screenCount());
+#endif /* QT_VERSION >= 0x050000 */
+}
+
+void UIDesktopWidgetWatchdog::sltHandleHostScreenResized(int iHostScreenIndex)
+{
+//    printf("UIDesktopWidgetWatchdog::sltHandleHostScreenResized(%d)\n", iHostScreenIndex);
+
+#ifdef VBOX_WS_X11
+    /* Update host-screen available-geometry: */
+    updateHostScreenAvailableGeometry(iHostScreenIndex);
+#endif /* VBOX_WS_X11 */
+
+    /* Notify listeners: */
+    emit sigHostScreenResized(iHostScreenIndex);
+}
+
+void UIDesktopWidgetWatchdog::sltHandleHostScreenWorkAreaResized(int iHostScreenIndex)
+{
+//    printf("UIDesktopWidgetWatchdog::sltHandleHostScreenWorkAreaResized(%d)\n", iHostScreenIndex);
+
+    /* Notify listeners: */
+    emit sigHostScreenWorkAreaResized(iHostScreenIndex);
+}
+
+#ifdef VBOX_WS_X11
 void UIDesktopWidgetWatchdog::sltHandleHostScreenAvailableGeometryCalculated(int iHostScreenIndex, QRect availableGeometry)
 {
 //    printf("UIDesktopWidgetWatchdog::sltHandleHostScreenAvailableGeometryCalculated(%d): %dx%d x %dx%d\n",
 //           iHostScreenIndex, availableGeometry.x(), availableGeometry.y(), availableGeometry.width(), availableGeometry.height());
 
     /* Apply received data: */
+    const bool fSendSignal = m_availableGeometryData.value(iHostScreenIndex).isValid();
     m_availableGeometryData[iHostScreenIndex] = availableGeometry;
     /* Forget finished worker: */
     AssertPtrReturnVoid(m_availableGeometryWorkers.value(iHostScreenIndex));
     m_availableGeometryWorkers.value(iHostScreenIndex)->disconnect();
     m_availableGeometryWorkers.value(iHostScreenIndex)->deleteLater();
     m_availableGeometryWorkers[iHostScreenIndex] = 0;
+
+    /* Notify listeners: */
+    if (fSendSignal)
+        emit sigHostScreenWorkAreaRecalculated(iHostScreenIndex);
 }
+#endif /* VBOX_WS_X11 */
 
 void UIDesktopWidgetWatchdog::prepare()
 {
     /* Prepare connections: */
-    connect(m_pDesktopWidget, SIGNAL(screenCountChanged(int)), this, SLOT(sltUpdateHostScreenConfiguration(int)));
-    connect(m_pDesktopWidget, SIGNAL(resized(int)), this, SLOT(sltRecalculateHostScreenAvailableGeometry(int)));
+    connect(QApplication::desktop(), SIGNAL(screenCountChanged(int)), this, SLOT(sltHandleHostScreenCountChanged(int)));
+    connect(qApp, SIGNAL(screenAdded(QScreen *)), this, SLOT(sltHostScreenAdded(QScreen *)));
+    connect(qApp, SIGNAL(screenRemoved(QScreen *)), this, SLOT(sltHostScreenRemoved(QScreen *)));
+    connect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(sltHandleHostScreenResized(int)));
+    connect(QApplication::desktop(), SIGNAL(workAreaResized(int)), this, SLOT(sltHandleHostScreenWorkAreaResized(int)));
 
+#ifdef VBOX_WS_X11
     /* Update host-screen configuration: */
-    sltUpdateHostScreenConfiguration();
+    updateHostScreenConfiguration();
+#endif /* VBOX_WS_X11 */
 }
 
 void UIDesktopWidgetWatchdog::cleanup()
 {
     /* Cleanup connections: */
-    disconnect(m_pDesktopWidget, SIGNAL(screenCountChanged(int)), this, SLOT(sltUpdateHostScreenConfiguration(int)));
-    disconnect(m_pDesktopWidget, SIGNAL(resized(int)), this, SLOT(sltRecalculateHostScreenAvailableGeometry(int)));
+    disconnect(QApplication::desktop(), SIGNAL(screenCountChanged(int)), this, SLOT(sltHandleHostScreenCountChanged(int)));
+    disconnect(qApp, SIGNAL(screenAdded(QScreen *)), this, SLOT(sltHostScreenAdded(QScreen *)));
+    disconnect(qApp, SIGNAL(screenRemoved(QScreen *)), this, SLOT(sltHostScreenRemoved(QScreen *)));
+    disconnect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(sltHandleHostScreenResized(int)));
+    disconnect(QApplication::desktop(), SIGNAL(workAreaResized(int)), this, SLOT(sltHandleHostScreenWorkAreaResized(int)));
 
+#ifdef VBOX_WS_X11
     /* Cleanup existing workers finally: */
-    foreach (QWidget *pWorker, m_availableGeometryWorkers)
-        if (pWorker)
-            pWorker->disconnect();
+    cleanupExistingWorkers();
+#endif /* VBOX_WS_X11 */
+}
+
+#ifdef VBOX_WS_X11
+void UIDesktopWidgetWatchdog::updateHostScreenConfiguration(int cHostScreenCount /* = -1 */)
+{
+    /* Acquire new host-screen count: */
+    if (cHostScreenCount == -1)
+        cHostScreenCount = screenCount();
+
+    /* Cleanup existing workers first: */
+    cleanupExistingWorkers();
+
+    /* Resize workers vectors to new host-screen count: */
+    m_availableGeometryWorkers.resize(cHostScreenCount);
+    m_availableGeometryData.resize(cHostScreenCount);
+
+    /* Update host-screen available-geometry for each particular host-screen: */
+    for (int iHostScreenIndex = 0; iHostScreenIndex < cHostScreenCount; ++iHostScreenIndex)
+        updateHostScreenAvailableGeometry(iHostScreenIndex);
+}
+
+void UIDesktopWidgetWatchdog::updateHostScreenAvailableGeometry(int iHostScreenIndex)
+{
+    /* Make sure index is valid: */
+    if (iHostScreenIndex < 0 || iHostScreenIndex >= screenCount())
+        iHostScreenIndex = QApplication::desktop()->primaryScreen();
+    AssertReturnVoid(iHostScreenIndex >= 0 && iHostScreenIndex < screenCount());
+
+    /* Create invisible frame-less window worker: */
+    UIInvisibleWindow *pWorker = new UIInvisibleWindow(iHostScreenIndex);
+    AssertPtrReturnVoid(pWorker);
+    {
+        /* Remember created worker (replace if necessary): */
+        if (m_availableGeometryWorkers.value(iHostScreenIndex))
+            delete m_availableGeometryWorkers.value(iHostScreenIndex);
+        m_availableGeometryWorkers[iHostScreenIndex] = pWorker;
+
+        /* Get the screen-geometry: */
+        const QRect hostScreenGeometry = screenGeometry(iHostScreenIndex);
+
+        /* Connect worker listener: */
+        connect(pWorker, SIGNAL(sigHostScreenAvailableGeometryCalculated(int, QRect)),
+                this, SLOT(sltHandleHostScreenAvailableGeometryCalculated(int, QRect)));
+
+        /* Place worker to corresponding host-screen: */
+        pWorker->move(hostScreenGeometry.topLeft());
+        /* And finally, maximize it: */
+        pWorker->showMaximized();
+    }
+}
+
+void UIDesktopWidgetWatchdog::cleanupExistingWorkers()
+{
+    /* Destroy existing workers: */
     qDeleteAll(m_availableGeometryWorkers);
+    /* And clear their vector: */
     m_availableGeometryWorkers.clear();
-    m_availableGeometryData.clear();
 }
 
-#include "UIDesktopWidgetWatchdog.moc"
+# include "UIDesktopWidgetWatchdog.moc"
+#endif /* VBOX_WS_X11 */
 
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.h b/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.h
index 2e53ce6..9013b79 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.h
+++ b/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -20,44 +20,110 @@
 
 /* Qt includes: */
 #include <QObject>
-#include <QVector>
-#include <QRect>
+#ifdef VBOX_WS_X11
+# include <QVector>
+# include <QRect>
+#endif /* VBOX_WS_X11 */
 
 /* Forward declarations: */
-class QDesktopWidget;
+class QScreen;
 
-/** QObject extension used as
+/** Singleton QObject extension used as
   * a desktop-widget watchdog aware
   * of the host-screen geometry changes. */
 class UIDesktopWidgetWatchdog : public QObject
 {
     Q_OBJECT;
 
+    /** Constructs desktop-widget watchdog. */
+    UIDesktopWidgetWatchdog();
+    /** Destructs desktop-widget watchdog. */
+    ~UIDesktopWidgetWatchdog();
+
+signals:
+
+    /** Notifies about host-screen count change to @a cHostScreenCount. */
+    void sigHostScreenCountChanged(int cHostScreenCount);
+
+    /** Notifies about resize for the host-screen with @a iHostScreenIndex. */
+    void sigHostScreenResized(int iHostScreenIndex);
+
+    /** Notifies about work-area resize for the host-screen with @a iHostScreenIndex. */
+    void sigHostScreenWorkAreaResized(int iHostScreenIndex);
+
+#ifdef VBOX_WS_X11
+    /** Notifies about work-area recalculated for the host-screen with @a iHostScreenIndex. */
+    void sigHostScreenWorkAreaRecalculated(int iHostScreenIndex);
+#endif /* VBOX_WS_X11 */
+
 public:
 
-    /** Constructs watchdog for the @a pParent being passed into the base-class. */
-    UIDesktopWidgetWatchdog(QObject *pParent);
-    /** Destructs watchdog. */
-    ~UIDesktopWidgetWatchdog();
+    /** Returns the static instance of the desktop-widget watchdog. */
+    static UIDesktopWidgetWatchdog *instance() { return m_spInstance; }
+
+    /** Creates the static instance of the desktop-widget watchdog. */
+    static void create();
+    /** Destroys the static instance of the desktop-widget watchdog. */
+    static void destroy();
+
+    /** Returns overall desktop width. */
+    int overallDesktopWidth() const;
+    /** Returns overall desktop height. */
+    int overallDesktopHeight() const;
+
+    /** Returns the number of host-screens currently available on the system. */
+    int screenCount() const;
+
+    /** Returns the index of the screen which contains contains @a pWidget. */
+    int screenNumber(const QWidget *pWidget) const;
+    /** Returns the index of the screen which contains contains @a point. */
+    int screenNumber(const QPoint &point) const;
 
     /** Returns the geometry of the host-screen with @a iHostScreenIndex.
       * @note The default screen is used if @a iHostScreenIndex is -1. */
-    const QRect	screenGeometry(int iHostScreenIndex = -1) const;
+    const QRect screenGeometry(int iHostScreenIndex = -1) const;
+    /** Returns the geometry of the host-screen which contains @a pWidget. */
+    const QRect screenGeometry(const QWidget *pWidget) const;
+    /** Returns the geometry of the host-screen which contains @a point. */
+    const QRect screenGeometry(const QPoint &point) const;
+
     /** Returns the available-geometry of the host-screen with @a iHostScreenIndex.
       * @note The default screen is used if @a iHostScreenIndex is -1. */
     const QRect availableGeometry(int iHostScreenIndex = -1) const;
+    /** Returns the available-geometry of the host-screen which contains @a pWidget. */
+    const QRect availableGeometry(const QWidget *pWidget) const;
+    /** Returns the available-geometry of the host-screen which contains @a point. */
+    const QRect availableGeometry(const QPoint &point) const;
+
+    /** Returns overall region unifying all the host-screen geometries. */
+    const QRegion overallScreenRegion() const;
+    /** Returns overall region unifying all the host-screen available-geometries. */
+    const QRegion overallAvailableRegion() const;
+
+#if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000
+    /** Qt5: X11: Returns whether no or fake screen detected. */
+    bool isFakeScreenDetected() const;
+#endif /* VBOX_WS_X11 && QT_VERSION >= 0x050000 */
 
 private slots:
 
-    /** Updates host-screen configuration according to new @a cHostScreenCount.
-      * @note cHostScreenCount can be equal to -1 which means we have to acquire it ourselves. */
-    void sltUpdateHostScreenConfiguration(int cHostScreenCount = -1);
+    /** Handles host-screen count change to @a cHostScreenCount. */
+    void sltHandleHostScreenCountChanged(int cHostScreenCount);
+    /** Handles @a pHostScreen adding. */
+    void sltHostScreenAdded(QScreen *pHostScreen);
+    /** Handles @a pHostScreen removing. */
+    void sltHostScreenRemoved(QScreen *pHostScreen);
+
+    /** Handles resize for the host-screen with @a iHostScreenIndex. */
+    void sltHandleHostScreenResized(int iHostScreenIndex);
 
-    /** Recalculates available-geometry for the host-screen with @a iHostScreenIndex. */
-    void sltRecalculateHostScreenAvailableGeometry(int iHostScreenIndex);
+    /** Handles work-area resize for the host-screen with @a iHostScreenIndex. */
+    void sltHandleHostScreenWorkAreaResized(int iHostScreenIndex);
 
+#ifdef VBOX_WS_X11
     /** Handles @a availableGeometry calculation result for the host-screen with @a iHostScreenIndex. */
     void sltHandleHostScreenAvailableGeometryCalculated(int iHostScreenIndex, QRect availableGeometry);
+#endif /* VBOX_WS_X11 */
 
 private:
 
@@ -66,16 +132,29 @@ private:
     /** Cleanup routine. */
     void cleanup();
 
-    /** Holds the desktop-widget reference pointer. */
-    QDesktopWidget *m_pDesktopWidget;
+    /** Holds the static instance of the desktop-widget watchdog. */
+    static UIDesktopWidgetWatchdog *m_spInstance;
+
+#ifdef VBOX_WS_X11
+    /** Updates host-screen configuration according to new @a cHostScreenCount.
+      * @note If cHostScreenCount is equal to -1 we have to acquire it ourselves. */
+    void updateHostScreenConfiguration(int cHostScreenCount = -1);
+
+    /** Update available-geometry for the host-screen with @a iHostScreenIndex. */
+    void updateHostScreenAvailableGeometry(int iHostScreenIndex);
+
+    /** Cleanups existing workers. */
+    void cleanupExistingWorkers();
 
-    /** Holds current host-screen count. */
-    int m_cHostScreenCount;
     /** Holds current host-screen available-geometries. */
     QVector<QRect> m_availableGeometryData;
     /** Holds current workers determining host-screen available-geometries. */
     QVector<QWidget*> m_availableGeometryWorkers;
+#endif /* VBOX_WS_X11 */
 };
 
+/** 'Official' name for the desktop-widget watchdog singleton. */
+#define gpDesktop UIDesktopWidgetWatchdog::instance()
+
 #endif /* !___UIDesktopWidgetWatchdog_h___ */
 
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/UIIconPool.cpp b/src/VBox/Frontends/VirtualBox/src/globals/UIIconPool.cpp
index c3dcc75..d291a8a 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/UIIconPool.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/globals/UIIconPool.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2014 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/UIIconPool.h b/src/VBox/Frontends/VirtualBox/src/globals/UIIconPool.h
index 9767bcc..a140905 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/UIIconPool.h
+++ b/src/VBox/Frontends/VirtualBox/src/globals/UIIconPool.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2014 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/UIImageTools.cpp b/src/VBox/Frontends/VirtualBox/src/globals/UIImageTools.cpp
index 60e673e..219fa5d 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/UIImageTools.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/globals/UIImageTools.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2012 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -31,7 +31,7 @@
 #include <math.h>
 
 
-/* Todo: Think about the naming convention and if the images should be
+/** @todo Think about the naming convention and if the images should be
  * processed in place or return changed copies. Make it more uniform. Add
  * asserts if the bit depth of the given image could not processed. */
 
@@ -52,7 +52,7 @@ QImage toGray(const QImage& image)
 
 void dimImage(QImage& image)
 {
-    /* Todo: factor out the < 32bit case, cause this can be done a lot faster
+    /** @todo factor out the < 32bit case, cause this can be done a lot faster
      * by just processing every second line. */
     for (int y = 0; y < image.height(); ++y)
     {
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/UIImageTools.h b/src/VBox/Frontends/VirtualBox/src/globals/UIImageTools.h
index e0a99f7..2d91bfd 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/UIImageTools.h
+++ b/src/VBox/Frontends/VirtualBox/src/globals/UIImageTools.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2011 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp b/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
index 2f8ac3e..43ba025 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1689,7 +1689,7 @@ void UIMessageCenter::showRuntimeError(const CConsole &console, bool fFatal, con
     MessageType type;
     QString severity;
 
-    // TODO: Move to Runtime UI!
+    /// @todo Move to Runtime UI!
     /* Preprocessing: */
     if (fFatal)
     {
@@ -1761,7 +1761,7 @@ void UIMessageCenter::showRuntimeError(const CConsole &console, bool fFatal, con
               formatted, autoConfimId.data());
     }
 
-    // TODO: Move to Runtime UI!
+    /// @todo Move to Runtime UI!
     /* Postprocessing: */
     if (fFatal)
     {
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h b/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
index 6ec6b45..6074bd4 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
+++ b/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/UIModalWindowManager.cpp b/src/VBox/Frontends/VirtualBox/src/globals/UIModalWindowManager.cpp
index 7154418..68b9902 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/UIModalWindowManager.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/globals/UIModalWindowManager.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/UIModalWindowManager.h b/src/VBox/Frontends/VirtualBox/src/globals/UIModalWindowManager.h
index 298d705..2f34f7b 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/UIModalWindowManager.h
+++ b/src/VBox/Frontends/VirtualBox/src/globals/UIModalWindowManager.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.cpp b/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.cpp
index f3678a6..cbea8dc 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.h b/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.h
index 7b53a1a..299b332 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.h
+++ b/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/UIShortcutPool.cpp b/src/VBox/Frontends/VirtualBox/src/globals/UIShortcutPool.cpp
index 75d3161..9c68d11 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/UIShortcutPool.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/globals/UIShortcutPool.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2013 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/UIShortcutPool.h b/src/VBox/Frontends/VirtualBox/src/globals/UIShortcutPool.h
index 61016b4..e000972 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/UIShortcutPool.h
+++ b/src/VBox/Frontends/VirtualBox/src/globals/UIShortcutPool.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2013 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/UIThreadPool.cpp b/src/VBox/Frontends/VirtualBox/src/globals/UIThreadPool.cpp
index 5cde361..a1bd9de 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/UIThreadPool.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/globals/UIThreadPool.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/UIThreadPool.h b/src/VBox/Frontends/VirtualBox/src/globals/UIThreadPool.h
index 7bb217d..a3eb13d 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/UIThreadPool.h
+++ b/src/VBox/Frontends/VirtualBox/src/globals/UIThreadPool.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp b/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
index 829607c..ab69bdb 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -23,7 +23,6 @@
 # include <QFileDialog>
 # include <QToolTip>
 # include <QTranslator>
-# include <QDesktopWidget>
 # if QT_VERSION >= 0x050000
 #  include <QStandardPaths>
 # endif /* QT_VERSION >= 0x050000 */
@@ -48,6 +47,9 @@
 # ifdef VBOX_GUI_WITH_PIDFILE
 #  include <QTextStream>
 # endif /* VBOX_GUI_WITH_PIDFILE */
+# if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000
+#  include <QScreen>
+# endif /* VBOX_WS_X11 && QT_VERSION >= 0x050000 */
 
 /* GUI includes: */
 # include "VBoxGlobal.h"
@@ -73,9 +75,9 @@
 # include "UIModalWindowManager.h"
 # include "UIIconPool.h"
 # include "UIVirtualBoxEventHandler.h"
+# include "UIDesktopWidgetWatchdog.h"
 # ifdef VBOX_WS_X11
 #  include "UIHostComboEditor.h"
-#  include "UIDesktopWidgetWatchdog.h"
 #  ifndef VBOX_OSE
 #   include "VBoxLicenseViewer.h"
 #  endif /* VBOX_OSE */
@@ -127,7 +129,7 @@
 
 /* External includes: */
 # ifdef VBOX_WS_WIN
-#  include "shlobj.h"
+#  include <iprt/win/shlobj.h>
 # endif /* VBOX_WS_WIN */
 
 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
@@ -233,7 +235,6 @@ VBoxGlobal::VBoxGlobal()
 #ifdef VBOX_WS_X11
     , m_fCompositingManagerRunning(false)
     , m_enmWindowManagerType(X11WMType_Unknown)
-    , m_pDesktopWidgetWatchdog(0)
 #endif /* VBOX_WS_X11 */
 #if defined(DEBUG_bird)
     , mAgressiveCaching(false)
@@ -336,74 +337,6 @@ MacOSXRelease VBoxGlobal::determineOsRelease()
 }
 #endif /* VBOX_WS_MAC */
 
-int VBoxGlobal::screenCount() const
-{
-    /* Redirect call to QDesktopWidget: */
-    return QApplication::desktop()->screenCount();
-}
-
-int VBoxGlobal::screenNumber(const QWidget *pWidget) const
-{
-    /* Redirect call to QDesktopWidget: */
-    return QApplication::desktop()->screenNumber(pWidget);
-}
-
-int VBoxGlobal::screenNumber(const QPoint &point) const
-{
-    /* Redirect call to QDesktopWidget: */
-    return QApplication::desktop()->screenNumber(point);
-}
-
-const QRect VBoxGlobal::screenGeometry(int iHostScreenIndex /* = -1 */) const
-{
-#ifdef VBOX_WS_X11
-    /* Make sure desktop-widget watchdog already created: */
-    AssertPtrReturn(m_pDesktopWidgetWatchdog, QApplication::desktop()->screenGeometry(iHostScreenIndex));
-    /* Redirect call to UIDesktopWidgetWatchdog: */
-    return m_pDesktopWidgetWatchdog->screenGeometry(iHostScreenIndex);
-#endif /* VBOX_WS_X11 */
-
-    /* Redirect call to QDesktopWidget: */
-    return QApplication::desktop()->screenGeometry(iHostScreenIndex);
-}
-
-const QRect VBoxGlobal::availableGeometry(int iHostScreenIndex /* = -1 */) const
-{
-#ifdef VBOX_WS_X11
-    /* Make sure desktop-widget watchdog already created: */
-    AssertPtrReturn(m_pDesktopWidgetWatchdog, QApplication::desktop()->availableGeometry(iHostScreenIndex));
-    /* Redirect call to UIDesktopWidgetWatchdog: */
-    return m_pDesktopWidgetWatchdog->availableGeometry(iHostScreenIndex);
-#endif /* VBOX_WS_X11 */
-
-    /* Redirect call to QDesktopWidget: */
-    return QApplication::desktop()->availableGeometry(iHostScreenIndex);
-}
-
-const QRect VBoxGlobal::screenGeometry(const QWidget *pWidget) const
-{
-    /* Redirect call to existing wrapper: */
-    return screenGeometry(screenNumber(pWidget));
-}
-
-const QRect VBoxGlobal::availableGeometry(const QWidget *pWidget) const
-{
-    /* Redirect call to existing wrapper: */
-    return availableGeometry(screenNumber(pWidget));
-}
-
-const QRect VBoxGlobal::screenGeometry(const QPoint &point) const
-{
-    /* Redirect call to existing wrapper: */
-    return screenGeometry(screenNumber(point));
-}
-
-const QRect VBoxGlobal::availableGeometry(const QPoint &point) const
-{
-    /* Redirect call to existing wrapper: */
-    return availableGeometry(screenNumber(point));
-}
-
 /**
  *  Sets the new global settings and saves them to the VirtualBox server.
  */
@@ -2665,7 +2598,7 @@ void VBoxGlobal::centerWidget (QWidget *aWidget, QWidget *aRelative,
     if (w)
     {
         w = w->window();
-        deskGeo = QApplication::desktop()->availableGeometry (w);
+        deskGeo = gpDesktop->availableGeometry (w);
         parentGeo = w->frameGeometry();
         /* On X11/Gnome, geo/frameGeo.x() and y() are always 0 for top level
          * widgets with parents, what a shame. Use mapToGlobal() to workaround. */
@@ -2676,7 +2609,7 @@ void VBoxGlobal::centerWidget (QWidget *aWidget, QWidget *aRelative,
     }
     else
     {
-        deskGeo = QApplication::desktop()->availableGeometry();
+        deskGeo = gpDesktop->availableGeometry();
         parentGeo = deskGeo;
     }
 
@@ -2944,18 +2877,17 @@ QString VBoxGlobal::formatSize (quint64 aSize, uint aDecimal /* = 2 */,
 /* static */
 quint64 VBoxGlobal::requiredVideoMemory(const QString &strGuestOSTypeId, int cMonitors /* = 1 */)
 {
-    QDesktopWidget *pDW = QApplication::desktop();
     /* We create a list of the size of all available host monitors. This list
      * is sorted by value and by starting with the biggest one, we calculate
      * the memory requirements for every guest screen. This is of course not
      * correct, but as we can't predict on which host screens the user will
      * open the guest windows, this is the best assumption we can do, cause it
      * is the worst case. */
-    const int cHostScreens = pDW->screenCount();
+    const int cHostScreens = gpDesktop->screenCount();
     QVector<int> screenSize(qMax(cMonitors, cHostScreens), 0);
     for (int i = 0; i < cHostScreens; ++i)
     {
-        QRect r = pDW->screenGeometry(i);
+        QRect r = gpDesktop->screenGeometry(i);
         screenSize[i] = r.width() * r.height();
     }
     /* Now sort the vector */
@@ -3240,6 +3172,7 @@ static Bool XXSendClientMessage (Display *aDpy, Window aWnd, const char *aMsg,
 /* static */
 bool VBoxGlobal::activateWindow (WId aWId, bool aSwitchDesktop /* = true */)
 {
+    RT_NOREF(aSwitchDesktop);
     bool result = true;
 
 #if defined (VBOX_WS_WIN)
@@ -3971,10 +3904,8 @@ void VBoxGlobal::prepare()
     m_osRelease = determineOsRelease();
 #endif /* VBOX_WS_MAC */
 
-#ifdef VBOX_WS_X11
-    /* Create desktop-widget watchdog instance: */
-    m_pDesktopWidgetWatchdog = new UIDesktopWidgetWatchdog(this);
-#endif /* VBOX_WS_X11 */
+    /* Create desktop-widget watchdog: */
+    UIDesktopWidgetWatchdog::create();
 
     /* Create message-center: */
     UIMessageCenter::create();
@@ -4326,6 +4257,8 @@ void VBoxGlobal::prepare()
                               sizeof(szError));
     }
 
+    LogRel(("Qt version: %s\n", qtRTVersionString().toUtf8().constData()));
+
     if (mSettingsPwSet)
         m_vbox.SetSettingsSecret(mSettingsPw);
 
@@ -4390,7 +4323,7 @@ void VBoxGlobal::prepare()
 
 void VBoxGlobal::cleanup()
 {
-    // TODO: Shouldn't that be protected with a mutex or something?
+    /// @todo Shouldn't that be protected with a mutex or something?
     /* Remember that the cleanup is in progress preventing any unwanted
      * stuff which could be called from the other threads: */
     m_sfCleanupInProgress = true;
@@ -4473,6 +4406,9 @@ void VBoxGlobal::cleanup()
     /* Destroy message-center: */
     UIMessageCenter::destroy();
 
+    /* Destroy desktop-widget watchdog: */
+    UIDesktopWidgetWatchdog::destroy();
+
     mValid = false;
 }
 
@@ -4738,11 +4674,11 @@ bool VBoxGlobal::switchToMachine(CMachine &machine)
     if (id == 0)
         return true;
 
-#if defined (VBOX_WS_WIN) || defined (VBOX_WS_X11)
+#if defined(VBOX_WS_WIN) || defined(VBOX_WS_X11)
 
     return vboxGlobal().activateWindow(id, true);
 
-#elif defined (VBOX_WS_MAC)
+#elif defined(VBOX_WS_MAC)
     /*
      * This is just for the case were the other process cannot steal
      * the focus from us. It will send us a PSN so we can try.
@@ -4750,17 +4686,27 @@ bool VBoxGlobal::switchToMachine(CMachine &machine)
     ProcessSerialNumber psn;
     psn.highLongOfPSN = id >> 32;
     psn.lowLongOfPSN = (UInt32)id;
+# ifdef __clang__
+#  pragma GCC diagnostic push
+#  pragma GCC diagnostic ignored "-Wdeprecated-declarations"
     OSErr rc = ::SetFrontProcess(&psn);
+#  pragma GCC diagnostic pop
+# else
+    OSErr rc = ::SetFrontProcess(&psn);
+# endif
     if (!rc)
         Log(("GUI: %#RX64 couldn't do SetFrontProcess on itself, the selector (we) had to do it...\n", id));
     else
         Log(("GUI: Failed to bring %#RX64 to front. rc=%#x\n", id, rc));
     return !rc;
 
-#endif
+#else
 
     return false;
 
+#endif
+
+
     /// @todo Below is the old method of switching to the console window
     //  based on the process ID of the console process. It should go away
     //  after the new (callback-based) method is fully tested.
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h b/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h
index 8fc25fc..5deb432 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h
+++ b/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -65,9 +65,6 @@ class UIMediumEnumerator;
 class UIMedium;
 class UIIconPoolGeneral;
 class UIThreadPool;
-#ifdef VBOX_WS_X11
-class UIDesktopWidgetWatchdog;
-#endif /* VBOX_WS_X11 */
 
 // VBoxGlobal class
 ////////////////////////////////////////////////////////////////////////////////
@@ -145,34 +142,6 @@ public:
     /** Returns the thread-pool instance. */
     UIThreadPool* threadPool() const { return m_pThreadPool; }
 
-    /** @name Host-screen geometry stuff
-      * @{ */
-        /** Returns the number of host-screens currently available on the system. */
-        int screenCount() const;
-
-        /** Returns the index of the screen which contains contains @a pWidget. */
-        int screenNumber(const QWidget *pWidget) const;
-        /** Returns the index of the screen which contains contains @a point. */
-        int screenNumber(const QPoint &point) const;
-
-        /** Returns the geometry of the host-screen with @a iHostScreenIndex.
-          * @note The default screen is used if @a iHostScreenIndex is -1. */
-        const QRect screenGeometry(int iHostScreenIndex = -1) const;
-        /** Returns the available-geometry of the host-screen with @a iHostScreenIndex.
-          * @note The default screen is used if @a iHostScreenIndex is -1. */
-        const QRect availableGeometry(int iHostScreenIndex = -1) const;
-
-        /** Returns the geometry of the host-screen which contains @a pWidget. */
-        const QRect screenGeometry(const QWidget *pWidget) const;
-        /** Returns the available-geometry of the host-screen which contains @a pWidget. */
-        const QRect availableGeometry(const QWidget *pWidget) const;
-
-        /** Returns the geometry of the host-screen which contains @a point. */
-        const QRect screenGeometry(const QPoint &point) const;
-        /** Returns the available-geometry of the host-screen which contains @a point. */
-        const QRect availableGeometry(const QPoint &point) const;
-    /** @} */
-
     VBoxGlobalSettings &settings() { return gset; }
     bool setSettings (VBoxGlobalSettings &gs);
 
@@ -572,12 +541,6 @@ private:
     bool m_fCompositingManagerRunning;
     /** X11: Holds the type of the Window Manager we are running under. */
     X11WMType m_enmWindowManagerType;
-
-    /** @name Host-screen geometry stuff
-      * @{ */
-        /** X11: Holds the desktop-widget watchdog instance aware of host-screen geometry changes. */
-        UIDesktopWidgetWatchdog *m_pDesktopWidgetWatchdog;
-    /** @} */
 #endif /* VBOX_WS_X11 */
 
     /** The --aggressive-caching / --no-aggressive-caching option. */
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/VBoxUtils.h b/src/VBox/Frontends/VirtualBox/src/globals/VBoxUtils.h
index 95d8cf9..efbc656 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/VBoxUtils.h
+++ b/src/VBox/Frontends/VirtualBox/src/globals/VBoxUtils.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/VBoxVersion.h b/src/VBox/Frontends/VirtualBox/src/globals/VBoxVersion.h
index 332b8e5..d76ccd6 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/VBoxVersion.h
+++ b/src/VBox/Frontends/VirtualBox/src/globals/VBoxVersion.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/hardenedmain.cpp b/src/VBox/Frontends/VirtualBox/src/hardenedmain.cpp
index 3818e8d..09d79b2 100644
--- a/src/VBox/Frontends/VirtualBox/src/hardenedmain.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/hardenedmain.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2014 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/main.cpp b/src/VBox/Frontends/VirtualBox/src/main.cpp
index b4c8f19..acbe36f 100644
--- a/src/VBox/Frontends/VirtualBox/src/main.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/main.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -238,7 +238,7 @@ static void QtMessageOutput(QtMsgType type, const QMessageLogContext &context, c
     NOREF(context);
 # ifndef VBOX_WS_X11
     NOREF(strMessage);
-# endif /* !VBOX_WS_X11 */
+# endif
     switch (type)
     {
         case QtDebugMsg:
@@ -249,21 +249,26 @@ static void QtMessageOutput(QtMsgType type, const QMessageLogContext &context, c
 # ifdef VBOX_WS_X11
             /* Needed for instance for the message ``cannot connect to X server'': */
             RTStrmPrintf(g_pStdErr, "Qt WARNING: %s\n", strMessage.toUtf8().constData());
-# endif /* VBOX_WS_X11 */
+# endif
             break;
         case QtCriticalMsg:
             Log(("Qt CRITICAL: %s\n", strMessage.toUtf8().constData()));
 # ifdef VBOX_WS_X11
             /* Needed for instance for the message ``cannot connect to X server'': */
             RTStrmPrintf(g_pStdErr, "Qt CRITICAL: %s\n", strMessage.toUtf8().constData());
-# endif /* VBOX_WS_X11 */
+# endif
             break;
         case QtFatalMsg:
             Log(("Qt FATAL: %s\n", strMessage.toUtf8().constData()));
 # ifdef VBOX_WS_X11
             /* Needed for instance for the message ``cannot connect to X server'': */
             RTStrmPrintf(g_pStdErr, "Qt FATAL: %s\n", strMessage.toUtf8().constData());
-# endif /* VBOX_WS_X11 */
+# endif
+# if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
+        case QtInfoMsg:
+            /** @todo ignore? */
+            break;
+# endif
     }
 }
 #else /* QT_VERSION < 0x050000 */
@@ -478,7 +483,7 @@ extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char ** /*envp*/)
         /* Use plastique look&feel for Solaris instead of the default motif (Qt 4.7.x): */
         QApplication::setStyle(new QPlastiqueStyle);
 #  else /* QT_VERSION >= 0x050000 */
-	a.setStyle("fusion");
+        a.setStyle("fusion");
 #  endif /* QT_VERSION >= 0x050000 */
 # endif /* Q_OS_SOLARIS */
 
@@ -608,7 +613,7 @@ int main(int argc, char **argv, char **envp)
         /* Use plastique look&feel for Solaris instead of the default motif (Qt 4.7.x): */
         QApplication::setStyle(new QPlastiqueStyle);
 #else /* QT_VERSION >= 0x050000 */
-	a.setStyle("fusion");
+        a.setStyle("fusion");
 # endif /* QT_VERSION >= 0x050000 */
 #endif /* Q_OS_SOLARIS */
 
@@ -737,19 +742,16 @@ extern "C" DECLEXPORT(void) TrustedError(const char *pszWhere, SUPINITOP enmWhat
             strText += g_QStrHintOtherNoDriver;
 # endif /* !RT_OS_LINUX */
             break;
-# ifdef RT_OS_LINUX
         case kSupInitOp_IPRT:
         case kSupInitOp_Misc:
-            if (rc == VERR_NO_MEMORY)
-                strText += g_QStrHintLinuxNoMemory;
-            else
-# endif /* RT_OS_LINUX */
             if (rc == VERR_VM_DRIVER_VERSION_MISMATCH)
-# ifdef RT_OS_LINUX
-                strText += g_QStrHintLinuxWrongDriverVersion;
-# else /* RT_OS_LINUX */
+# ifndef RT_OS_LINUX
                 strText += g_QStrHintOtherWrongDriverVersion;
-# endif /* !RT_OS_LINUX */
+# else
+                strText += g_QStrHintLinuxWrongDriverVersion;
+            else if (rc == VERR_NO_MEMORY)
+                strText += g_QStrHintLinuxNoMemory;
+# endif
             else
                 strText += g_QStrHintReinstall;
             break;
@@ -783,4 +785,3 @@ extern "C" DECLEXPORT(void) TrustedError(const char *pszWhere, SUPINITOP enmWhat
 
 #endif /* VBOX_WITH_HARDENING */
 
-
diff --git a/src/VBox/Frontends/VirtualBox/src/medium/UIMedium.cpp b/src/VBox/Frontends/VirtualBox/src/medium/UIMedium.cpp
index 1e5116d..0677c33 100644
--- a/src/VBox/Frontends/VirtualBox/src/medium/UIMedium.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/medium/UIMedium.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -445,7 +445,7 @@ QString UIMedium::details(bool fNoDiffs /* = false */,
                           bool fPredictDiff /* = false */,
                           bool fUseHTML /* = false */) const
 {
-    // @todo the below check is rough; if m_medium becomes uninitialized, any
+    /// @todo the below check is rough; if m_medium becomes uninitialized, any
     // of getters called afterwards will also fail. The same relates to the
     // root hard drive object (that will be the hard drive itself in case of
     // non-differencing disks). However, this check was added to fix a
@@ -497,7 +497,7 @@ QString UIMedium::details(bool fNoDiffs /* = false */,
             strDetails += QString("%1, ").arg(VBoxGlobal::tr("Encrypted", "medium"));
     }
 
-    // @todo prepend the details with the warning/error icon when not accessible
+    /// @todo prepend the details with the warning/error icon when not accessible
 
     switch (eState)
     {
diff --git a/src/VBox/Frontends/VirtualBox/src/medium/UIMedium.h b/src/VBox/Frontends/VirtualBox/src/medium/UIMedium.h
index 3647b5f..c460485 100644
--- a/src/VBox/Frontends/VirtualBox/src/medium/UIMedium.h
+++ b/src/VBox/Frontends/VirtualBox/src/medium/UIMedium.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/medium/UIMediumDefs.cpp b/src/VBox/Frontends/VirtualBox/src/medium/UIMediumDefs.cpp
index bf66a3b..37d47ed 100644
--- a/src/VBox/Frontends/VirtualBox/src/medium/UIMediumDefs.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/medium/UIMediumDefs.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/medium/UIMediumDefs.h b/src/VBox/Frontends/VirtualBox/src/medium/UIMediumDefs.h
index 8c2a7ca..26bd6c1 100644
--- a/src/VBox/Frontends/VirtualBox/src/medium/UIMediumDefs.h
+++ b/src/VBox/Frontends/VirtualBox/src/medium/UIMediumDefs.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/medium/UIMediumEnumerator.cpp b/src/VBox/Frontends/VirtualBox/src/medium/UIMediumEnumerator.cpp
index 82b05b7..259b365 100644
--- a/src/VBox/Frontends/VirtualBox/src/medium/UIMediumEnumerator.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/medium/UIMediumEnumerator.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/medium/UIMediumEnumerator.h b/src/VBox/Frontends/VirtualBox/src/medium/UIMediumEnumerator.h
index eb03df7..a601865 100644
--- a/src/VBox/Frontends/VirtualBox/src/medium/UIMediumEnumerator.h
+++ b/src/VBox/Frontends/VirtualBox/src/medium/UIMediumEnumerator.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp b/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp
index 0e72a72..d490a3e 100644
--- a/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1577,6 +1577,8 @@ void UIMediumManager::updateTabIcons(UIMediumItem *pMediumItem, Action action)
 
             break;
         }
+
+        case Action_Copy: case Action_Modify: case Action_Release: break; /* Shut up MSC */
     }
 }
 
@@ -1730,7 +1732,7 @@ void UIMediumManager::cleanup()
 
 void UIMediumManager::retranslateUi()
 {
-    // TODO: Rename translation context in .nls files!
+    /// @todo Rename translation context in .nls files!
     /* Most of these translations were moved from VBoxMediaManagerDlg.ui file
      * to keep old translation context.. */
 
@@ -2322,6 +2324,8 @@ bool UIMediumManager::checkMediumFor(UIMediumItem *pItem, Action action)
             /* Releasable if attached but not in snapshots: */
             return pItem->isUsed() && !pItem->isUsedInSnapshots();
         }
+
+        case Action_Add: break; /* Shut up MSC */
     }
 
     AssertFailedReturn(false);
diff --git a/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.h b/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.h
index ae34e43..93e252a 100644
--- a/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.h
+++ b/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -42,6 +42,8 @@ class QIDialogButtonBox;
 class CheckIfSuitableBy
 {
 public:
+    virtual ~CheckIfSuitableBy() { /* Makes MSC happy. */ }
+
     /** Determines whether passed @a pItem is suitable. */
     virtual bool isItSuitable(UIMediumItem *pItem) const = 0;
 };
diff --git a/src/VBox/Frontends/VirtualBox/src/net/UIDownloader.cpp b/src/VBox/Frontends/VirtualBox/src/net/UIDownloader.cpp
index fe60652..43a1f60 100644
--- a/src/VBox/Frontends/VirtualBox/src/net/UIDownloader.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/net/UIDownloader.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/net/UIDownloader.h b/src/VBox/Frontends/VirtualBox/src/net/UIDownloader.h
index 004c0f4..d036c69 100644
--- a/src/VBox/Frontends/VirtualBox/src/net/UIDownloader.h
+++ b/src/VBox/Frontends/VirtualBox/src/net/UIDownloader.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderAdditions.cpp b/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderAdditions.cpp
index 02c5b1f..1e72736 100644
--- a/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderAdditions.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderAdditions.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderAdditions.h b/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderAdditions.h
index 96a3ad6..d5e362b 100644
--- a/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderAdditions.h
+++ b/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderAdditions.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderExtensionPack.cpp b/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderExtensionPack.cpp
index 7cca8b4..96e929d 100644
--- a/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderExtensionPack.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderExtensionPack.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2012 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderExtensionPack.h b/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderExtensionPack.h
index 5c492c3..1334194 100644
--- a/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderExtensionPack.h
+++ b/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderExtensionPack.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2012 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderUserManual.cpp b/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderUserManual.cpp
index 1abf508..3e04519 100644
--- a/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderUserManual.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderUserManual.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderUserManual.h b/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderUserManual.h
index 4673357..334c17e 100644
--- a/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderUserManual.h
+++ b/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderUserManual.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2012 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/net/UINetworkCustomer.cpp b/src/VBox/Frontends/VirtualBox/src/net/UINetworkCustomer.cpp
index 47ea963..af397dc 100644
--- a/src/VBox/Frontends/VirtualBox/src/net/UINetworkCustomer.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/net/UINetworkCustomer.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/net/UINetworkCustomer.h b/src/VBox/Frontends/VirtualBox/src/net/UINetworkCustomer.h
index c4c60df..fe2ac0f 100644
--- a/src/VBox/Frontends/VirtualBox/src/net/UINetworkCustomer.h
+++ b/src/VBox/Frontends/VirtualBox/src/net/UINetworkCustomer.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/net/UINetworkDefs.h b/src/VBox/Frontends/VirtualBox/src/net/UINetworkDefs.h
index e4cf5de..cfa94a6 100644
--- a/src/VBox/Frontends/VirtualBox/src/net/UINetworkDefs.h
+++ b/src/VBox/Frontends/VirtualBox/src/net/UINetworkDefs.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/net/UINetworkManager.cpp b/src/VBox/Frontends/VirtualBox/src/net/UINetworkManager.cpp
index ac46928..412a3ce 100644
--- a/src/VBox/Frontends/VirtualBox/src/net/UINetworkManager.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/net/UINetworkManager.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2012 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/net/UINetworkManager.h b/src/VBox/Frontends/VirtualBox/src/net/UINetworkManager.h
index db85ef3..8778817 100644
--- a/src/VBox/Frontends/VirtualBox/src/net/UINetworkManager.h
+++ b/src/VBox/Frontends/VirtualBox/src/net/UINetworkManager.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2012 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/net/UINetworkManagerDialog.cpp b/src/VBox/Frontends/VirtualBox/src/net/UINetworkManagerDialog.cpp
index d2b1704..8550fcf 100644
--- a/src/VBox/Frontends/VirtualBox/src/net/UINetworkManagerDialog.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/net/UINetworkManagerDialog.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2012 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/net/UINetworkManagerDialog.h b/src/VBox/Frontends/VirtualBox/src/net/UINetworkManagerDialog.h
index 683473b..4da2065 100644
--- a/src/VBox/Frontends/VirtualBox/src/net/UINetworkManagerDialog.h
+++ b/src/VBox/Frontends/VirtualBox/src/net/UINetworkManagerDialog.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2012 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/net/UINetworkManagerIndicator.cpp b/src/VBox/Frontends/VirtualBox/src/net/UINetworkManagerIndicator.cpp
index ff43e78..6cf2035 100644
--- a/src/VBox/Frontends/VirtualBox/src/net/UINetworkManagerIndicator.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/net/UINetworkManagerIndicator.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/net/UINetworkManagerIndicator.h b/src/VBox/Frontends/VirtualBox/src/net/UINetworkManagerIndicator.h
index f6546b5..6b322a9 100644
--- a/src/VBox/Frontends/VirtualBox/src/net/UINetworkManagerIndicator.h
+++ b/src/VBox/Frontends/VirtualBox/src/net/UINetworkManagerIndicator.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/net/UINetworkReply.cpp b/src/VBox/Frontends/VirtualBox/src/net/UINetworkReply.cpp
index 251c1fd..10c89d8 100644
--- a/src/VBox/Frontends/VirtualBox/src/net/UINetworkReply.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/net/UINetworkReply.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -915,6 +915,7 @@ DECLCALLBACK(void) UINetworkReplyPrivateThread::handleProgressChange(RTHTTP hHtt
 
 #ifndef VBOX_GUI_IN_TST_SSL_CERT_DOWNLOADS
 
+
 /*********************************************************************************************************************************
 *   Class UINetworkReplyPrivate implementation.                                                                                  *
 *********************************************************************************************************************************/
diff --git a/src/VBox/Frontends/VirtualBox/src/net/UINetworkReply.h b/src/VBox/Frontends/VirtualBox/src/net/UINetworkReply.h
index a306aa1..353d1d6 100644
--- a/src/VBox/Frontends/VirtualBox/src/net/UINetworkReply.h
+++ b/src/VBox/Frontends/VirtualBox/src/net/UINetworkReply.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/net/UINetworkRequest.cpp b/src/VBox/Frontends/VirtualBox/src/net/UINetworkRequest.cpp
index 38cfe60..1a0ae8b 100644
--- a/src/VBox/Frontends/VirtualBox/src/net/UINetworkRequest.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/net/UINetworkRequest.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/net/UINetworkRequest.h b/src/VBox/Frontends/VirtualBox/src/net/UINetworkRequest.h
index fbc1290..4e3034b 100644
--- a/src/VBox/Frontends/VirtualBox/src/net/UINetworkRequest.h
+++ b/src/VBox/Frontends/VirtualBox/src/net/UINetworkRequest.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/net/UINetworkRequestWidget.cpp b/src/VBox/Frontends/VirtualBox/src/net/UINetworkRequestWidget.cpp
index f59df89..138bb97 100644
--- a/src/VBox/Frontends/VirtualBox/src/net/UINetworkRequestWidget.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/net/UINetworkRequestWidget.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2012 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -218,7 +218,7 @@ const QString UINetworkRequestWidget::composeErrorText(QString strErrorText)
         for (int i = 0; i < links.size(); ++i)
             strErrorText = strErrorText.arg(QString("<b>%1</b>").arg(links[i]));
 
-    // @todo: NLS: Embed <br> directly into error header text.
+    /// @todo NLS: Embed <br> directly into error header text.
     /* Prepend the error-message with <br> symbol: */
     strErrorText.prepend("<br>");
 
diff --git a/src/VBox/Frontends/VirtualBox/src/net/UINetworkRequestWidget.h b/src/VBox/Frontends/VirtualBox/src/net/UINetworkRequestWidget.h
index 7c24f37..e6cc77b 100644
--- a/src/VBox/Frontends/VirtualBox/src/net/UINetworkRequestWidget.h
+++ b/src/VBox/Frontends/VirtualBox/src/net/UINetworkRequestWidget.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2012 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/net/UIUpdateDefs.cpp b/src/VBox/Frontends/VirtualBox/src/net/UIUpdateDefs.cpp
index b9a2b91..d352b84 100644
--- a/src/VBox/Frontends/VirtualBox/src/net/UIUpdateDefs.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/net/UIUpdateDefs.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/net/UIUpdateDefs.h b/src/VBox/Frontends/VirtualBox/src/net/UIUpdateDefs.h
index 5bf8a91..d8dbb74 100644
--- a/src/VBox/Frontends/VirtualBox/src/net/UIUpdateDefs.h
+++ b/src/VBox/Frontends/VirtualBox/src/net/UIUpdateDefs.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/net/UIUpdateManager.cpp b/src/VBox/Frontends/VirtualBox/src/net/UIUpdateManager.cpp
index e8e72a7..d099281 100644
--- a/src/VBox/Frontends/VirtualBox/src/net/UIUpdateManager.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/net/UIUpdateManager.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/net/UIUpdateManager.h b/src/VBox/Frontends/VirtualBox/src/net/UIUpdateManager.h
index cd031b4..bc03cb8 100644
--- a/src/VBox/Frontends/VirtualBox/src/net/UIUpdateManager.h
+++ b/src/VBox/Frontends/VirtualBox/src/net/UIUpdateManager.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/net/tstSSLCertDownloads.cpp b/src/VBox/Frontends/VirtualBox/src/net/tstSSLCertDownloads.cpp
index fb02807..66e435a 100644
--- a/src/VBox/Frontends/VirtualBox/src/net/tstSSLCertDownloads.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/net/tstSSLCertDownloads.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Audio_old/Makefile.kup b/src/VBox/Frontends/VirtualBox/src/objects/Makefile.kup
similarity index 100%
copy from src/VBox/Devices/Audio_old/Makefile.kup
copy to src/VBox/Frontends/VirtualBox/src/objects/Makefile.kup
diff --git a/src/VBox/Frontends/VirtualBox/src/objects/UIRichTextString.cpp b/src/VBox/Frontends/VirtualBox/src/objects/UIRichTextString.cpp
index 5b00660..91d9e6a 100644
--- a/src/VBox/Frontends/VirtualBox/src/objects/UIRichTextString.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/objects/UIRichTextString.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -227,6 +227,8 @@ QTextCharFormat UIRichTextString::textCharFormat(Type type)
             format.setFont(font);
             break;
         }
+
+        case Type_None: break; /* Shut up MSC */
     }
     return format;
 }
diff --git a/src/VBox/Frontends/VirtualBox/src/objects/UIRichTextString.h b/src/VBox/Frontends/VirtualBox/src/objects/UIRichTextString.h
index 4b6ebae..59bb30f 100644
--- a/src/VBox/Frontends/VirtualBox/src/objects/UIRichTextString.h
+++ b/src/VBox/Frontends/VirtualBox/src/objects/UIRichTextString.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/UIDesktopServices.h b/src/VBox/Frontends/VirtualBox/src/platform/UIDesktopServices.h
index d12b6a6..e8ccb0a 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/UIDesktopServices.h
+++ b/src/VBox/Frontends/VirtualBox/src/platform/UIDesktopServices.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/darwin/CocoaEventHelper.h b/src/VBox/Frontends/VirtualBox/src/platform/darwin/CocoaEventHelper.h
index 6c8574a..bdf425f 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/darwin/CocoaEventHelper.h
+++ b/src/VBox/Frontends/VirtualBox/src/platform/darwin/CocoaEventHelper.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2010 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/darwin/DarwinKeyboard.cpp b/src/VBox/Frontends/VirtualBox/src/platform/darwin/DarwinKeyboard.cpp
index 03d8694..9ecaf9c 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/darwin/DarwinKeyboard.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/platform/darwin/DarwinKeyboard.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/darwin/DarwinKeyboard.h b/src/VBox/Frontends/VirtualBox/src/platform/darwin/DarwinKeyboard.h
index 06cb979..5d45cd0 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/darwin/DarwinKeyboard.h
+++ b/src/VBox/Frontends/VirtualBox/src/platform/darwin/DarwinKeyboard.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/darwin/DockIconPreview.h b/src/VBox/Frontends/VirtualBox/src/platform/darwin/DockIconPreview.h
index cee5f6c..a6fe371 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/darwin/DockIconPreview.h
+++ b/src/VBox/Frontends/VirtualBox/src/platform/darwin/DockIconPreview.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIAbstractDockIconPreview.cpp b/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIAbstractDockIconPreview.cpp
index e60fdcc..0f55852 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIAbstractDockIconPreview.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIAbstractDockIconPreview.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIAbstractDockIconPreview.h b/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIAbstractDockIconPreview.h
index 37d3b1b..dfdf17e 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIAbstractDockIconPreview.h
+++ b/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIAbstractDockIconPreview.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2010 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaApplication.h b/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaApplication.h
index 292cb2d..45ae2ec 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaApplication.h
+++ b/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaApplication.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2014 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaDockIconPreview.h b/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaDockIconPreview.h
index 205a8e6..1aa28f4 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaDockIconPreview.h
+++ b/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaDockIconPreview.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2010 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaDockIconPreview.mm b/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaDockIconPreview.mm
index 6401c90..6beb2bd 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaDockIconPreview.mm
+++ b/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaDockIconPreview.mm
@@ -211,6 +211,7 @@ void UICocoaDockIconPreview::setOriginalSize(int width, int height)
 
 - (void)drawRect:(NSRect)aRect
 {
+    RT_NOREF(aRect);
     NSGraphicsContext *nsContext = [NSGraphicsContext currentContext];
     CGContextRef pCGContext = (CGContextRef)[nsContext graphicsPort];
     p->drawOverlayIcons (pCGContext);
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaSpecialControls.h b/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaSpecialControls.h
index 30ce95d..7512a35 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaSpecialControls.h
+++ b/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaSpecialControls.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2010 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaSpecialControls.mm b/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaSpecialControls.mm
index 3acf398..b4dc58b 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaSpecialControls.mm
+++ b/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaSpecialControls.mm
@@ -42,11 +42,13 @@
 #include <QKeyEvent>
 #include <QMacCocoaViewContainer>
 
+#if 0 /* This is a built-in according to clang. Not sure how it relates to QT_VERSION... */
 /* Interface Builder Constant,
  * hmm, where is it declared with Qt4? */
 #if QT_VERSION >= 0x050000
 # define IBAction void
 #endif /* QT_VERSION >= 0x050000 */
+#endif
 
 /*
  * Private interfaces
@@ -106,6 +108,7 @@
 
 -(IBAction)clicked:(id)sender
 {
+    RT_NOREF(sender);
     mRealTarget->onClicked();
 }
 @end
@@ -224,6 +227,7 @@
 @implementation UISearchFieldDelegatePrivate
 -(BOOL)control:(NSControl*)control textView:(NSTextView*)textView doCommandBySelector:(SEL)commandSelector
 {
+    RT_NOREF(control, textView);
 //    NSLog(NSStringFromSelector(commandSelector));
     /* Don't execute the selector for Enter & Escape. */
     if (   commandSelector == @selector(insertNewline:)
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIDesktopServices_darwin.cpp b/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIDesktopServices_darwin.cpp
index 2662a2f..cfb48cf 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIDesktopServices_darwin.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIDesktopServices_darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIDesktopServices_darwin_cocoa.mm b/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIDesktopServices_darwin_cocoa.mm
index 805a4aa..ea7dd66 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIDesktopServices_darwin_cocoa.mm
+++ b/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIDesktopServices_darwin_cocoa.mm
@@ -25,6 +25,7 @@
 /* Create desktop alias using a bookmark stuff. */
 bool darwinCreateMachineShortcut(NativeNSStringRef pstrSrcFile, NativeNSStringRef pstrDstPath, NativeNSStringRef pstrName, NativeNSStringRef /* pstrUuid */)
 {
+    RT_NOREF(pstrName);
     if (!pstrSrcFile || !pstrDstPath)
         return false;
 
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIDesktopServices_darwin_p.h b/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIDesktopServices_darwin_p.h
index 9c5263a..371daf3 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIDesktopServices_darwin_p.h
+++ b/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIDesktopServices_darwin_p.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIWindowMenuManager.cpp b/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIWindowMenuManager.cpp
index ef74dc1..093e06d 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIWindowMenuManager.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIWindowMenuManager.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -187,6 +187,7 @@ private:
     QHash<QWidget*, QAction*> m_windows;
 };
 
+
 /*********************************************************************************************************************************
 *   Class UIWindowMenuManager implementation.                                                                                    *
 *********************************************************************************************************************************/
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIWindowMenuManager.h b/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIWindowMenuManager.h
index 3b90ee3..1755cbd 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIWindowMenuManager.h
+++ b/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIWindowMenuManager.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxCocoaHelper.h b/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxCocoaHelper.h
index 170a76b..b95d8f1 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxCocoaHelper.h
+++ b/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxCocoaHelper.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2010 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxIChatTheaterWrapper.h b/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxIChatTheaterWrapper.h
index a595061..5e6ef35 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxIChatTheaterWrapper.h
+++ b/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxIChatTheaterWrapper.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2010 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxIChatTheaterWrapper.m b/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxIChatTheaterWrapper.m
index b11c74b..eabc0b3 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxIChatTheaterWrapper.m
+++ b/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxIChatTheaterWrapper.m
@@ -139,7 +139,7 @@
         [avManager setVideoDataSource:self];
         /* Possible values: IMVideoOptimizationDefault, IMVideoOptimizationStills, IMVideoOptimizationReplacement */
         [avManager setVideoOptimizationOptions:IMVideoOptimizationDefault];
-        /* ToDo: Audio support */
+        /** @todo Audio support */
         [avManager setNumberOfAudioChannels:0];
         /* Start the streaming of the video */
         [avManager start];
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin-cocoa.mm b/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin-cocoa.mm
index c3a048f..ba7494d 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin-cocoa.mm
+++ b/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin-cocoa.mm
@@ -214,6 +214,7 @@ void darwinSetWindowHasShadow(NativeNSWindowRef pWindow, bool fEnabled)
 
 void darwinMinaturizeWindow(NativeNSWindowRef pWindow)
 {
+    RT_NOREF(pWindow);
 //    [[NSApplication sharedApplication] miniaturizeAll];
 //    printf("bla\n");
 //    [pWindow miniaturize:pWindow];
@@ -312,6 +313,8 @@ void darwinSetMouseCoalescingEnabled(bool fEnabled)
 
 void darwinWindowAnimateResizeImpl(NativeNSWindowRef pWindow, int x, int y, int width, int height)
 {
+    RT_NOREF(x, y, width);
+
     /* It seems that Qt doesn't return the height of the window with the
      * toolbar height included. So add this size manually. Could easily be that
      * the Trolls fix this in the final release. */
@@ -513,6 +516,8 @@ bool darwinMouseGrabEvents(const void *pvCocoaEvent, const void *pvCarbonEvent,
    toolbar or the title area. */
 bool darwinUnifiedToolbarEvents(const void *pvCocoaEvent, const void *pvCarbonEvent, void *pvUser)
 {
+    RT_NOREF(pvCarbonEvent);
+
     NSEvent *pEvent = (NSEvent*)pvCocoaEvent;
     NSEventType EvtType = [pEvent type];
     NSWindow *pWin = ::darwinToNativeWindow((QWidget*)pvUser);
@@ -662,6 +667,7 @@ static UIResizeProxy *gSharedResizeProxy = nil;
 }
 - (NSSize)qtWindowWillResize:(NSWindow *)pWindow toSize:(NSSize)newFrameSize
 {
+    RT_NOREF(pWindow);
     /* This is a fake implementation. It will be replaced by the original Qt
        method. */
     return newFrameSize;
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin.cpp b/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin.cpp
index 4db10f8..db75bda 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin.h b/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin.h
index bf90e89..4b96e85 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin.h
+++ b/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2011 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/darwin/tstDarwinKeyboard.cpp b/src/VBox/Frontends/VirtualBox/src/platform/darwin/tstDarwinKeyboard.cpp
index 21da3d0..5a90cc4 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/darwin/tstDarwinKeyboard.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/platform/darwin/tstDarwinKeyboard.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/darwin/vmstarter.mm b/src/VBox/Frontends/VirtualBox/src/platform/darwin/vmstarter.mm
index e1c22d7..4d8f219 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/darwin/vmstarter.mm
+++ b/src/VBox/Frontends/VirtualBox/src/platform/darwin/vmstarter.mm
@@ -16,6 +16,7 @@
  */
 
 #import <Cocoa/Cocoa.h>
+#include <iprt/cdefs.h>
 
 @interface AppDelegate: NSObject
 {
@@ -46,11 +47,13 @@ NSString *m_strVBoxPath;
 
 - (void)application:(NSApplication *)sender openFiles:(NSArray *)filenames
 {
+    RT_NOREF(sender);
+
     BOOL fResult = FALSE;
     NSWorkspace *pWS = [NSWorkspace sharedWorkspace];
     /* We need to check if vbox is running already. If so we sent an open
        event. If not we start a new process with the file as parameter. */
-    NSArray *pApps = [pWS launchedApplications];
+    NSArray *pApps = [pWS runningApplications];
     bool fVBoxRuns = false;
     for (NSDictionary *pDict in pApps)
     {
@@ -72,6 +75,10 @@ NSString *m_strVBoxPath;
         /* Fire up a new instance of VBox. We prefer LSOpenApplication over
            NSTask, cause it makes sure that VBox will become the front most
            process after starting up. */
+/** @todo should replace all this with -[NSWorkspace
+ *  launchApplicationAtURL:options:configuration:error:] because LSOpenApplication is deprecated in
+ * 10.10 while, FSPathMakeRef is deprecated since 10.8. */
+        /* The state horror show starts right here: */
         OSStatus err = noErr;
         Boolean fDir;
         void *asyncLaunchRefCon = NULL;
@@ -84,16 +91,19 @@ NSString *m_strVBoxPath;
         do
         {
             NSString *strVBoxExe = [m_strVBoxPath stringByAppendingPathComponent:@"Contents/MacOS/VirtualBox"];
-            if ((err = FSPathMakeRef((const UInt8*)[strVBoxExe UTF8String], &fileRef, &fDir)) != noErr)
+            err = FSPathMakeRef((const UInt8*)[strVBoxExe UTF8String], &fileRef, &fDir);
+            if (err != noErr)
                 break;
-            if ((args = CFArrayCreate(NULL, (const void**)list, [filenames count], &kCFTypeArrayCallBacks)) == NULL)
+            args = CFArrayCreate(NULL, (const void **)list, [filenames count], &kCFTypeArrayCallBacks);
+            if (args == NULL)
                 break;
             LSApplicationParameters par = { 0, 0, &fileRef, asyncLaunchRefCon, 0, args, 0 };
-            if ((err = LSOpenApplication(&par, NULL)) != noErr)
+            err = LSOpenApplication(&par, NULL);
+            if (err != noErr)
                 break;
             fResult = TRUE;
         }while(0);
-        if (list)
+        if (list)  /* Why bother checking, because you've crashed already if it's NULL! */
             free(list);
         if (file)
             CFRelease(file);
@@ -103,12 +113,14 @@ NSString *m_strVBoxPath;
 }
 @end
 
-int main(int argc, char *argv[])
+int main()
 {
     /* Global auto release pool. */
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
     /* Create our own delegate for the application. */
-    [[NSApplication sharedApplication] setDelegate: [[AppDelegate alloc] init]];
+    AppDelegate *pAppDelegate = [[AppDelegate alloc] init];
+    [[NSApplication sharedApplication] setDelegate: (id<NSApplicationDelegate>)pAppDelegate]; /** @todo check out ugly cast */
+    pAppDelegate = nil;
     /* Start the event loop. */
     [NSApp run];
     /* Cleanup */
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/os2/VBoxHlp.asm b/src/VBox/Frontends/VirtualBox/src/platform/os2/VBoxHlp.asm
index 08eac2f..d12db0a 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/os2/VBoxHlp.asm
+++ b/src/VBox/Frontends/VirtualBox/src/platform/os2/VBoxHlp.asm
@@ -6,7 +6,7 @@
 ;
 
 ;
-; Copyright (C) 2008-2010 Oracle Corporation
+; Copyright (C) 2008-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/os2/VBoxHlp.cpp b/src/VBox/Frontends/VirtualBox/src/platform/os2/VBoxHlp.cpp
index 2a343fe..2f288dd 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/os2/VBoxHlp.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/platform/os2/VBoxHlp.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2010 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/os2/VBoxHlp.h b/src/VBox/Frontends/VirtualBox/src/platform/os2/VBoxHlp.h
index 4237951..4a1b899 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/os2/VBoxHlp.h
+++ b/src/VBox/Frontends/VirtualBox/src/platform/os2/VBoxHlp.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2010 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/win/UIDesktopServices_win.cpp b/src/VBox/Frontends/VirtualBox/src/platform/win/UIDesktopServices_win.cpp
index 41d1da1..3ea8c4d 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/win/UIDesktopServices_win.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/platform/win/UIDesktopServices_win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@
 # include <QCoreApplication>
 
 /* System includes */
-# include <shlobj.h>
+# include <iprt/win/shlobj.h>
 
 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
 
@@ -76,7 +76,7 @@ bool UIDesktopServices::openInFileManager(const QString &strFile)
     QFileInfo fi(strFile);
     QString strTmp = QDir::toNativeSeparators(fi.absolutePath());
 
-    int rc = (int)ShellExecute(NULL, L"explore", strTmp.utf16(), NULL, NULL, SW_SHOWNORMAL);
+    intptr_t rc = (intptr_t)ShellExecute(NULL, L"explore", strTmp.utf16(), NULL, NULL, SW_SHOWNORMAL);
 
     return rc > 32 ? true : false;
 }
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/win/VBoxUtils-win.cpp b/src/VBox/Frontends/VirtualBox/src/platform/win/VBoxUtils-win.cpp
index bf53f12..85c52f4 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/win/VBoxUtils-win.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/platform/win/VBoxUtils-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2011 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/win/VBoxUtils-win.h b/src/VBox/Frontends/VirtualBox/src/platform/win/VBoxUtils-win.h
index 7738211..f674c3f 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/win/VBoxUtils-win.h
+++ b/src/VBox/Frontends/VirtualBox/src/platform/win/VBoxUtils-win.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -15,14 +15,14 @@
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
 
-#ifndef __VBoxUtils_WIN_h__
-#define __VBoxUtils_WIN_h__
+#ifndef ___VBoxUtils_WIN_h___
+#define ___VBoxUtils_WIN_h___
 
 /* Qt includes: */
 #include <QRegion>
 
 /* Platform includes: */
-#include "Windows.h"
+#include <iprt/win/windows.h>
 
 /* Namespace for native window sub-system functions: */
 namespace NativeWindowSubsystem
@@ -31,5 +31,5 @@ namespace NativeWindowSubsystem
     const QRegion areaCoveredByTopMostWindows();
 }
 
-#endif /* __VBoxUtils_WIN_h__ */
+#endif
 
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/win/VirtualBox.rc b/src/VBox/Frontends/VirtualBox/src/platform/win/VirtualBox.rc
index 37da93a..0d6ac8c 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/win/VirtualBox.rc
+++ b/src/VBox/Frontends/VirtualBox/src/platform/win/VirtualBox.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/win/VirtualBoxHardened.rc b/src/VBox/Frontends/VirtualBox/src/platform/win/VirtualBoxHardened.rc
index b3829bb..5564b23 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/win/VirtualBoxHardened.rc
+++ b/src/VBox/Frontends/VirtualBox/src/platform/win/VirtualBoxHardened.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/win/WinKeyboard.cpp b/src/VBox/Frontends/VirtualBox/src/platform/win/WinKeyboard.cpp
index b6e8de3..cb6d3db 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/win/WinKeyboard.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/platform/win/WinKeyboard.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -191,15 +191,15 @@ void WinHidDevicesBroadcastLeds(bool fNumLockOn, bool fCapsLockOn, bool fScrollL
   * added complexity is worth the price. */
 static bool doesCurrentLayoutHaveAltGr()
 {
-    /** Keyboard state array with VK_CONTROL and VK_MENU depressed. */
-    const BYTE auKeyStates[256] =
-        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x80, 0x80 };
+    /* Keyboard state array with VK_CONTROL and VK_MENU depressed. */
+    static const BYTE s_auKeyStates[256] =
+    { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x80, 0x80 };
     WORD ach;
     unsigned i;
 
     for (i = '0'; i <= VK_OEM_102; ++i)
     {
-        if (ToAscii(i, 0, auKeyStates, &ach, 0))
+        if (ToAscii(i, 0, s_auKeyStates, &ach, 0))
             break;
         /* Skip ranges of virtual keys which are undefined or not relevant. */
         if (i == '9')
@@ -268,23 +268,25 @@ bool WinAltGrMonitor::isCurrentEventDefinitelyFake(unsigned iDownScanCode,
                                                    bool fKeyDown,
                                                    bool fExtendedKey) const
 {
-    MSG peekMsg;
-    LONG messageTime = GetMessageTime();
-
-    if (   iDownScanCode != 0x1d /* scan code: Control */ || fExtendedKey)
+    if (iDownScanCode != 0x1d /* scan code: Control */ || fExtendedKey)
         return false;
+
+    LONG messageTime = GetMessageTime();
+    MSG peekMsg;
     if (!PeekMessage(&peekMsg, NULL, WM_KEYFIRST, WM_KEYLAST, PM_NOREMOVE))
         return false;
+    if (messageTime != (LONG)peekMsg.time)
+        return false;
 
-        if (messageTime != peekMsg.time)
-            return false;
-        if (   fKeyDown
-        && (peekMsg.message != WM_KEYDOWN && peekMsg.message != WM_SYSKEYDOWN))
+    if (   fKeyDown
+        && peekMsg.message != WM_KEYDOWN
+        && peekMsg.message != WM_SYSKEYDOWN)
         return false;
     if (   !fKeyDown
-        && (peekMsg.message != WM_KEYUP && peekMsg.message != WM_SYSKEYUP))
+        && peekMsg.message != WM_KEYUP
+        && peekMsg.message != WM_SYSKEYUP)
         return false;
-    if (   ((RT_HIWORD(peekMsg.lParam) & 0xFF) != 0x38 /* scan code: Alt */)
+    if (   (RT_HIWORD(peekMsg.lParam) & 0xFF) != 0x38 /* scan code: Alt */
         || !(RT_HIWORD(peekMsg.lParam) & KF_EXTENDED))
         return false;
     if (!doesCurrentLayoutHaveAltGr())
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/win/WinKeyboard.h b/src/VBox/Frontends/VirtualBox/src/platform/win/WinKeyboard.h
index 87c6f04..4e54cd4 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/win/WinKeyboard.h
+++ b/src/VBox/Frontends/VirtualBox/src/platform/win/WinKeyboard.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -15,11 +15,11 @@
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
 
-#ifndef __WinKeyboard_h__
-#define __WinKeyboard_h__
+#ifndef ___WinKeyboard_h___
+#define ___WinKeyboard_h___
 
 /* Platform includes: */
-#include "Windows.h"
+#include <iprt/win/windows.h>
 
 void * WinHidDevicesKeepLedsState(void);
 void   WinHidDevicesApplyAndReleaseLedsState(void *pData);
@@ -79,7 +79,8 @@ private:
         /** A fake control down event and no up was passed to the guest. */
         FAKE_CONTROL_DOWN
     } m_enmFakeControlDetectionState;
-    DWORD m_timeOfLastKeyEvent;
+    LONG m_timeOfLastKeyEvent;
 };
-#endif /* __WinKeyboard_h__ */
+
+#endif
 
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/x11/UIDesktopServices_x11.cpp b/src/VBox/Frontends/VirtualBox/src/platform/x11/UIDesktopServices_x11.cpp
index 768bc64..26d402d 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/x11/UIDesktopServices_x11.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/platform/x11/UIDesktopServices_x11.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxX11Helper.cpp b/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxX11Helper.cpp
index 99e2ea3..e8a9eeb 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxX11Helper.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxX11Helper.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxX11Helper.h b/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxX11Helper.h
index 937daec..b2749b0 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxX11Helper.h
+++ b/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxX11Helper.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/x11/XKeyboard-new.cpp b/src/VBox/Frontends/VirtualBox/src/platform/x11/XKeyboard-new.cpp
index fdf50b2..890138f 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/x11/XKeyboard-new.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/platform/x11/XKeyboard-new.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -238,6 +238,9 @@ void doXKeyboardLogging(Display *dpy)
             LogRel((",%d=%d",i,keyc2scan[i]));
         LogRel(("\n"));
     }
+    LogRel(("X Server details: vendor: %s, release: %d, protocol version: %d.%d, display string: %s\n",
+            ServerVendor(dpy), VendorRelease(dpy), ProtocolVersion(dpy),
+            ProtocolRevision(dpy), DisplayString(dpy)));
     LogRel(("Using %s for keycode to scan code conversion\n",
               gfByXkbOK ? "XKB"
             : gfByTypeOK ? "known keycode mapping"
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/x11/XKeyboard.h b/src/VBox/Frontends/VirtualBox/src/platform/x11/XKeyboard.h
index d41d977..2f3b091 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/x11/XKeyboard.h
+++ b/src/VBox/Frontends/VirtualBox/src/platform/x11/XKeyboard.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/precomp.h b/src/VBox/Frontends/VirtualBox/src/precomp.h
index 98decb1..4de64c2 100644
--- a/src/VBox/Frontends/VirtualBox/src/precomp.h
+++ b/src/VBox/Frontends/VirtualBox/src/precomp.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2014 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -53,7 +53,7 @@
 #include <QDate>
 #include <QDateTime>
 #include <QDesktopServices>
-#include <QDesktopWidget>
+//#include <QDesktopWidget> -  only used once
 #include <QDialog>
 #include <QDialogButtonBox>
 #include <QDir>
@@ -216,8 +216,8 @@
  * System specific headers.
  */
 #ifdef VBOX_WS_WIN
-# include <shlobj.h>
-# include <Windows.h>
+# include <iprt/win/shlobj.h>
+# include <iprt/win/windows.h>
 #endif
 
 
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.cpp
index c0c4ab9..096a81d 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2014 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.h b/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.h
index b627dc9..db33eeb 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2014 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIAddDiskEncryptionPasswordDialog.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/UIAddDiskEncryptionPasswordDialog.cpp
index 3d7197e..ec8a702 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIAddDiskEncryptionPasswordDialog.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIAddDiskEncryptionPasswordDialog.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIAddDiskEncryptionPasswordDialog.h b/src/VBox/Frontends/VirtualBox/src/runtime/UIAddDiskEncryptionPasswordDialog.h
index 10b89ae..2465d47 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIAddDiskEncryptionPasswordDialog.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIAddDiskEncryptionPasswordDialog.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDDataObject_win.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDDataObject_win.cpp
index 0fef52d..4c40248 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDDataObject_win.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDDataObject_win.cpp
@@ -1,11 +1,10 @@
 /* $Id: UIDnDDataObject_win.cpp $ */
 /** @file
- * VBox Qt GUI - UIDnDDrag class implementation. This class implements the
- * IDataObject interface.
+ * VBox Qt GUI - UIDnDDrag class implementation (implements IDataObject).
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -22,9 +21,9 @@
 #define LOG_GROUP LOG_GROUP_GUEST_DND
 #include <VBox/log.h>
 
-#include <windows.h>
+#include <iprt/win/windows.h>
 #include <new> /* For bad_alloc. */
-#include <shlobj.h>
+#include <iprt/win/shlobj.h>
 
 #include <iprt/path.h>
 #include <iprt/semaphore.h>
@@ -53,7 +52,7 @@ UIDnDDataObject::UIDnDDataObject(UIDnDHandler *pDnDHandler, const QStringList &l
 {
     HRESULT hr;
 
-    ULONG cMaxFormats        = 16; /* Maximum number of registered formats. */
+    int   cMaxFormats        = 16; /* Maximum number of registered formats. */
     ULONG cRegisteredFormats = 0;
 
     try
@@ -63,9 +62,7 @@ UIDnDDataObject::UIDnDDataObject(UIDnDHandler *pDnDHandler, const QStringList &l
         m_pStgMedium = new STGMEDIUM[cMaxFormats];
         RT_BZERO(m_pStgMedium, sizeof(STGMEDIUM) * cMaxFormats);
 
-        for (int i = 0;
-             (   i < lstFormats.size()
-              && i < cMaxFormats); i++)
+        for (int i = 0; i < lstFormats.size() && i < cMaxFormats; i++)
         {
             const QString &strFormat = lstFormats.at(i);
             if (m_lstFormats.contains(strFormat))
@@ -246,10 +243,10 @@ STDMETHODIMP UIDnDDataObject::GetData(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMediu
                 LogRel3(("DnD: Got strFormat=%s, pvData=%p, cbData=%RU32\n",
                          m_strFormat.toUtf8().constData(), m_pvData, m_cbData));
 
-                QVariant::Type vaType;
+                QVariant::Type vaType = QVariant::Invalid; /* MSC: Might be used uninitialized otherwise! */
                 QString strMIMEType;
                 if (    (pFormatEtc->tymed & TYMED_HGLOBAL)
-                     && (pFormatEtc->dwAspect == DVASPECT_CONTENT)
+                     && pFormatEtc->dwAspect == DVASPECT_CONTENT
                      && (   pFormatEtc->cfFormat == CF_TEXT
                          || pFormatEtc->cfFormat == CF_UNICODETEXT)
                    )
@@ -259,8 +256,8 @@ STDMETHODIMP UIDnDDataObject::GetData(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMediu
                     vaType      = QVariant::String;
                 }
                 else if (   (pFormatEtc->tymed & TYMED_HGLOBAL)
-                         && (pFormatEtc->dwAspect == DVASPECT_CONTENT)
-                         && (pFormatEtc->cfFormat == CF_HDROP))
+                         && pFormatEtc->dwAspect == DVASPECT_CONTENT
+                         && pFormatEtc->cfFormat == CF_HDROP)
                 {
                     strMIMEType = "text/uri-list";
                     vaType = QVariant::StringList;
@@ -298,10 +295,7 @@ STDMETHODIMP UIDnDDataObject::GetData(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMediu
                 if (!m_fDataRetrieved)
                 {
                     if (m_pDnDHandler)
-                    {
-                        rc = m_pDnDHandler->retrieveData(Qt::CopyAction,
-                                                         strMIMEType, vaType, m_vaData);
-                    }
+                        rc = m_pDnDHandler->retrieveData(Qt::CopyAction, strMIMEType, vaType, m_vaData);
                     else
                         rc = VERR_NOT_FOUND;
 
@@ -323,7 +317,7 @@ STDMETHODIMP UIDnDDataObject::GetData(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMediu
                     {
                         QStringList lstFilesURI = m_vaData.toStringList();
                         QStringList lstFiles;
-                        for (size_t i = 0; i < lstFilesURI.size(); i++)
+                        for (int i = 0; i < lstFilesURI.size(); i++)
                         {
                             char *pszFilePath = RTUriFilePath(lstFilesURI.at(i).toUtf8().constData());
                             if (pszFilePath)
@@ -339,13 +333,13 @@ STDMETHODIMP UIDnDDataObject::GetData(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMediu
                             }
                         }
 
-                        size_t cFiles = lstFiles.size();
+                        int cFiles = lstFiles.size();
                         LogFlowThisFunc(("Files (%zu)\n", cFiles));
                         if (   RT_SUCCESS(rc)
                             && cFiles)
                         {
                             size_t cchFiles = 0; /* Number of characters. */
-                            for (size_t i = 0; i < cFiles; i++)
+                            for (int i = 0; i < cFiles; i++)
                             {
                                 const char *pszFile = lstFiles.at(i).toUtf8().constData();
                                 cchFiles += strlen(pszFile);
@@ -368,7 +362,7 @@ STDMETHODIMP UIDnDDataObject::GetData(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMediu
                                 AssertPtr(pCurFile);
 
                                 LogFlowThisFunc(("Encoded:\n"));
-                                for (size_t i = 0; i < cFiles; i++)
+                                for (int i = 0; i < cFiles; i++)
                                 {
                                     const char *pszFile = lstFiles.at(i).toUtf8().constData();
                                     Assert(strlen(pszFile));
@@ -528,6 +522,7 @@ STDMETHODIMP UIDnDDataObject::GetData(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMediu
  */
 STDMETHODIMP UIDnDDataObject::GetDataHere(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMedium)
 {
+    RT_NOREF(pFormatEtc, pMedium);
     LogFlowFunc(("\n"));
     return DATA_E_FORMATETC;
 }
@@ -541,11 +536,12 @@ STDMETHODIMP UIDnDDataObject::GetDataHere(LPFORMATETC pFormatEtc, LPSTGMEDIUM pM
  */
 STDMETHODIMP UIDnDDataObject::QueryGetData(LPFORMATETC pFormatEtc)
 {
-    return (LookupFormatEtc(pFormatEtc, NULL /* puIndex */)) ? S_OK : DV_E_FORMATETC;
+    return LookupFormatEtc(pFormatEtc, NULL /* puIndex */) ? S_OK : DV_E_FORMATETC;
 }
 
-STDMETHODIMP UIDnDDataObject::GetCanonicalFormatEtc(LPFORMATETC pFormatEct, LPFORMATETC pFormatEtcOut)
+STDMETHODIMP UIDnDDataObject::GetCanonicalFormatEtc(LPFORMATETC pFormatEtc, LPFORMATETC pFormatEtcOut)
 {
+    RT_NOREF(pFormatEtc);
     LogFlowFunc(("\n"));
 
     /* Set this to NULL in any case. */
@@ -555,6 +551,7 @@ STDMETHODIMP UIDnDDataObject::GetCanonicalFormatEtc(LPFORMATETC pFormatEct, LPFO
 
 STDMETHODIMP UIDnDDataObject::SetData(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMedium, BOOL fRelease)
 {
+    RT_NOREF(pFormatEtc, pMedium, fRelease);
     return E_NOTIMPL;
 }
 
@@ -575,18 +572,21 @@ STDMETHODIMP UIDnDDataObject::EnumFormatEtc(DWORD dwDirection, IEnumFORMATETC **
     return hr;
 }
 
-STDMETHODIMP UIDnDDataObject::DAdvise(LPFORMATETC pFormatEtc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection)
+STDMETHODIMP UIDnDDataObject::DAdvise(LPFORMATETC pFormatEtc, DWORD fAdvise, IAdviseSink *pAdvSink, DWORD *pdwConnection)
 {
+    RT_NOREF(pFormatEtc, fAdvise, pAdvSink, pdwConnection);
     return OLE_E_ADVISENOTSUPPORTED;
 }
 
 STDMETHODIMP UIDnDDataObject::DUnadvise(DWORD dwConnection)
 {
+    RT_NOREF(dwConnection);
     return OLE_E_ADVISENOTSUPPORTED;
 }
 
 STDMETHODIMP UIDnDDataObject::EnumDAdvise(IEnumSTATDATA **ppEnumAdvise)
 {
+    RT_NOREF(ppEnumAdvise);
     return OLE_E_ADVISENOTSUPPORTED;
 }
 
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDDataObject_win.h b/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDDataObject_win.h
index d7d9c4b..42c161d 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDDataObject_win.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDDataObject_win.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -62,10 +62,10 @@ public: /* IDataObject methods. */
     STDMETHOD(GetData)(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMedium);
     STDMETHOD(GetDataHere)(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMedium);
     STDMETHOD(QueryGetData)(LPFORMATETC pFormatEtc);
-    STDMETHOD(GetCanonicalFormatEtc)(LPFORMATETC pFormatEct,  LPFORMATETC pFormatEtcOut);
+    STDMETHOD(GetCanonicalFormatEtc)(LPFORMATETC pFormatEtc,  LPFORMATETC pFormatEtcOut);
     STDMETHOD(SetData)(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMedium, BOOL fRelease);
     STDMETHOD(EnumFormatEtc)(DWORD dwDirection, IEnumFORMATETC **ppEnumFormatEtc);
-    STDMETHOD(DAdvise)(LPFORMATETC pFormatEtc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection);
+    STDMETHOD(DAdvise)(LPFORMATETC pFormatEtc, DWORD fAdvise, IAdviseSink *pAdvSink, DWORD *pdwConnection);
     STDMETHOD(DUnadvise)(DWORD dwConnection);
     STDMETHOD(EnumDAdvise)(IEnumSTATDATA **ppEnumAdvise);
 
@@ -109,5 +109,5 @@ protected:
     uint32_t                m_cbData;
 };
 
-#endif /* ___UIDnDDataObject_win_h___ */
+#endif /* !___UIDnDDataObject_win_h___ */
 
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDDropSource_win.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDDropSource_win.cpp
index f39b95c..3932ae6 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDDropSource_win.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDDropSource_win.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -28,7 +28,7 @@
 
 /* Windows includes: */
 #include <QApplication>
-#include <windows.h>
+#include <iprt/win/windows.h>
 #include <new> /* For bad_alloc. */
 
 #include "UIDnDDropSource_win.h"
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDDropSource_win.h b/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDDropSource_win.h
index 0e40fbd..9ba8fa8 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDDropSource_win.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDDropSource_win.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDEnumFormat_win.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDEnumFormat_win.cpp
index cd38e0b..e294a15 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDEnumFormat_win.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDEnumFormat_win.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -19,7 +19,7 @@
 #define LOG_GROUP LOG_GROUP_GUEST_DND
 #include <VBox/log.h>
 
-#include <Windows.h>
+#include <iprt/win/windows.h>
 #include <new> /* For bad_alloc. */
 
 #include "UIDnDEnumFormat_win.h"
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDEnumFormat_win.h b/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDEnumFormat_win.h
index 446a2ea..7c5aaf7 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDEnumFormat_win.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDEnumFormat_win.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDHandler.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDHandler.cpp
index c1c4b32..ae416f3 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDHandler.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDHandler.cpp
@@ -30,9 +30,9 @@
 /* VirtualBox interface declarations: */
 #ifndef VBOX_WITH_XPCOM
 # include "VirtualBox.h"
-#else /* !VBOX_WITH_XPCOM */
+#else
 # include "VirtualBox_XPCOM.h"
-#endif /* VBOX_WITH_XPCOM */
+#endif
 
 /* GUI includes: */
 # include "UIDnDHandler.h"
@@ -348,6 +348,7 @@ void UIDnDHandler::debugOutputQt(QtMsgType type, const char *pszMsg)
 int UIDnDHandler::dragStartInternal(const QStringList &lstFormats,
                                     Qt::DropAction defAction, Qt::DropActions actions)
 {
+    RT_NOREF(defAction);
     int rc = VINF_SUCCESS;
 
 #ifdef VBOX_WITH_DRAG_AND_DROP_GH
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDHandler.h b/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDHandler.h
index d2823b7..7c3c142 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDHandler.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDHandler.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDMIMEData.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDMIMEData.cpp
index f074eba..63620a5 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDMIMEData.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDMIMEData.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -64,6 +64,8 @@ QStringList UIDnDMIMEData::formats(void) const
 
 bool UIDnDMIMEData::hasFormat(const QString &strMIMEType) const
 {
+    RT_NOREF(strMIMEType);
+
     bool fRc;
 #ifdef RT_OS_DARWIN
     fRc = m_lstFormats.contains(strMIMEType);
@@ -204,9 +206,10 @@ QVariant::Type UIDnDMIMEData::getVariantType(const QString &strMIMEType)
 /* static */
 int UIDnDMIMEData::getDataAsVariant(const QVector<uint8_t> &vecData,
                                     const QString          &strMIMEType,
-                                         QVariant::Type    vaType,
-                                         QVariant         &vaData)
+                                          QVariant::Type    vaType,
+                                          QVariant         &vaData)
 {
+    RT_NOREF(strMIMEType);
     LogFlowFunc(("vecDataSize=%d, strMIMEType=%s vaType=%s\n",
                  vecData.size(), qPrintable(strMIMEType), QVariant::typeToName(vaType)));
 
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDMIMEData.h b/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDMIMEData.h
index 37484b1..b11239b 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDMIMEData.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDMIMEData.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp
index d6d1d0e..6b191b8 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h b/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h
index f38e503..a516264 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp
index af93935..d970a30 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2014 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -863,7 +863,7 @@ private:
                     .arg(VBoxGlobal::tr("Unrestricted Execution"), strUnrestrictExec)
                     .arg(VBoxGlobal::tr("Execution Cap", "details report"), strCPUExecCap));
 
-        // TODO: We had to use that large NLS above for now.
+        /// @todo We had to use that large NLS above for now.
         //       Later it should be reworked to be well-maintainable..
         /* Separately add information about paravirtualization interface feature: */
         tip += QApplication::translate("UIIndicatorsPool", "<br><nobr><b>%1:</b> %2</nobr>", "Virtualization Stuff LED")
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.h b/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.h
index d565b5e..48ee326 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2014 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp
index d449493..b736a9c 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2012 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -54,7 +54,7 @@
 #  if QT_VERSION >= 0x050000
 #   include "iprt/cpp/utils.h"
 #  endif /* QT_VERSION >= 0x050000 */
-# endif /* VBOX_WS_MAC */ 
+# endif /* VBOX_WS_MAC */
 
 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
 
@@ -314,7 +314,7 @@ void UIKeyboardHandler::captureKeyboard(ulong uScreenId)
          * use the Qt method to grab the keyboard,
          * disable global hot keys and
          * enable watching modifiers (for right/left separation). */
-        // TODO: Is that really needed?
+        /// @todo Is that really needed?
         ::DarwinDisableGlobalHotKeys(true);
         m_views[uScreenId]->grabKeyboard();
 
@@ -442,7 +442,7 @@ void UIKeyboardHandler::releaseKeyboard()
          * use the Qt method to release the keyboard,
          * enable global hot keys and
          * disable watching modifiers (for right/left separation). */
-        // TODO: Is that really needed?
+        /// @todo Is that really needed?
         ::DarwinDisableGlobalHotKeys(false);
         m_views[m_iKeyboardCaptureViewIndex]->releaseKeyboard();
 
@@ -1730,7 +1730,7 @@ bool UIKeyboardHandler::eventFilter(QObject *pWatchedObject, QEvent *pEvent)
                     {
                         /* Disable mouse and keyboard event compression/delaying
                          * to make sure we *really* get all of the events: */
-                        ::CGSetLocalEventsSuppressionInterval(0.0);
+                        ::CGSetLocalEventsSuppressionInterval(0.0); /** @todo replace with CGEventSourceSetLocalEventsSuppressionInterval ? */
                         ::darwinSetMouseCoalescingEnabled(false);
 
                         /* Bring the caps lock state up to date,
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.h b/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.h
index 9f103aa..b56e0dd 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2012 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
index 9220c19..e1bc57f 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2014 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h b/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h
index d4dcc88..d963ddf 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2014 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineDefs.h b/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineDefs.h
index d672512..bf24fff 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineDefs.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineDefs.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2012 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
index aa529f1..a0128bb 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -159,6 +159,8 @@ UIMachineLogic* UIMachineLogic::create(QObject *pParent,
         case UIVisualStateType_Scale:
             pLogic = new UIMachineLogicScale(pParent, pSession);
             break;
+
+        case UIVisualStateType_Invalid: case UIVisualStateType_All: break; /* Shut up, MSC! */
     }
     return pLogic;
 }
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h b/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
index 08eae0b..2f6472f 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2013 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
index 0c25bab..b0f8210 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -20,7 +20,6 @@
 #else  /* !VBOX_WITH_PRECOMPILED_HEADERS */
 
 /* Qt includes: */
-# include <QDesktopWidget>
 # include <QMainWindow>
 # include <QPainter>
 # include <QScrollBar>
@@ -28,6 +27,7 @@
 
 /* GUI includes: */
 # include "VBoxGlobal.h"
+# include "UIDesktopWidgetWatchdog.h"
 # include "UIExtraDataManager.h"
 # include "UIMessageCenter.h"
 # include "UISession.h"
@@ -802,7 +802,7 @@ void UIMachineView::prepareFilters()
 void UIMachineView::prepareConnections()
 {
     /* Desktop resolution change (e.g. monitor hotplug): */
-    connect(QApplication::desktop(), SIGNAL(resized(int)), this,
+    connect(gpDesktop, SIGNAL(sigHostScreenResized(int)), this,
             SLOT(sltDesktopResized()));
     /* Scale-factor change: */
     connect(gEDataManager, SIGNAL(sigScaleFactorChange(const QString&)),
@@ -915,7 +915,7 @@ QSize UIMachineView::sizeHint() const
     size = scaledForward(size);
 
 #ifdef VBOX_WITH_DEBUGGER_GUI
-    // TODO: Fix all DEBUGGER stuff!
+    /// @todo Fix all DEBUGGER stuff!
     /* HACK ALERT! Really ugly workaround for the resizing to 9x1 done by DevVGA if provoked before power on. */
     if (size.width() < 16 || size.height() < 16)
         if (vboxGlobal().shouldStartPaused() || vboxGlobal().isDebuggerAutoShowEnabled())
@@ -1343,7 +1343,7 @@ bool UIMachineView::isFullscreenOrSeamless() const
 
 bool UIMachineView::event(QEvent *pEvent)
 {
-    switch (pEvent->type())
+    switch ((UIEventType)pEvent->type())
     {
 #ifdef VBOX_WS_MAC
         /* Event posted OnShowWindow: */
@@ -1436,7 +1436,7 @@ bool UIMachineView::eventFilter(QObject *pWatched, QEvent *pEvent)
             case QEvent::Move:
             {
                 /* Get current host-screen number: */
-                const int iCurrentHostScreenNumber = vboxGlobal().screenNumber(this);
+                const int iCurrentHostScreenNumber = gpDesktop->screenNumber(this);
                 if (m_iHostScreenNumber != iCurrentHostScreenNumber)
                 {
                     /* Recache current host screen: */
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h b/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h
index 4677c72..7bd8c6a 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2012 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
index 8d62b35..af67fc0 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2013 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -264,7 +264,7 @@ void UIMachineWindow::retranslateUi()
 # if QT_VERSION < 0x050000
 bool UIMachineWindow::x11Event(XEvent *pEvent)
 {
-    // TODO: Is that really needed?
+    /// @todo Is that really needed?
     /* Qt bug: when the machine-view grabs the keyboard,
      * FocusIn, FocusOut, WindowActivate and WindowDeactivate Qt events are
      * not properly sent on top level window deactivation.
@@ -585,6 +585,7 @@ Qt::Alignment UIMachineWindow::viewAlignment(UIVisualStateType visualStateType)
         case UIVisualStateType_Fullscreen: return Qt::AlignVCenter | Qt::AlignHCenter;
         case UIVisualStateType_Seamless: return 0;
         case UIVisualStateType_Scale: return 0;
+        case UIVisualStateType_Invalid: case UIVisualStateType_All: break; /* Shut up, MSC! */
     }
     AssertMsgFailed(("Incorrect visual state!"));
     return 0;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h b/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h
index 8df33cc..a92e0ac 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2013 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -85,6 +85,10 @@ public:
     /** Returns the machine name. */
     const QString& machineName() const;
 
+    /** Restores cached window geometry.
+      * @note Reimplemented in sub-classes. Base implementation does nothing. */
+    virtual void restoreCachedGeometry() {}
+
     /** Adjusts machine-window size to correspond current machine-view size.
       * @param fAdjustPosition determines whether is it necessary to adjust position too.
       * @note  Reimplemented in sub-classes. Base implementation does nothing. */
@@ -103,6 +107,11 @@ public:
 
 protected slots:
 
+#ifdef VBOX_WS_X11
+    /** X11: Performs machine-window geometry normalization. */
+    void sltNormalizeGeometry() { normalizeGeometry(true /* adjust position */); }
+#endif /* VBOX_WS_X11 */
+
     /** Performs machine-window activation. */
     void sltActivateWindow() { activateWindow(); }
 
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIMenuBarEditorWindow.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/UIMenuBarEditorWindow.cpp
index 21370fe..79ac476 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIMenuBarEditorWindow.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIMenuBarEditorWindow.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIMenuBarEditorWindow.h b/src/VBox/Frontends/VirtualBox/src/runtime/UIMenuBarEditorWindow.h
index b157e2f..a7b62ae 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIMenuBarEditorWindow.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIMenuBarEditorWindow.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp
index 066dda9..dca316c 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2014 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -20,12 +20,12 @@
 #else  /* !VBOX_WITH_PRECOMPILED_HEADERS */
 
 /* Qt includes: */
-# include <QDesktopWidget>
 # include <QMouseEvent>
 # include <QTimer>
 
 /* GUI includes: */
 # include "VBoxGlobal.h"
+# include "UIDesktopWidgetWatchdog.h"
 # include "UIExtraDataManager.h"
 # include "UIMessageCenter.h"
 # include "UIPopupCenter.h"
@@ -183,7 +183,7 @@ void UIMouseHandler::captureMouse(ulong uScreenId)
         QRect visibleRectangle = m_viewports[m_iMouseCaptureViewIndex]->visibleRegion().boundingRect();
         QPoint visibleRectanglePos = m_views[m_iMouseCaptureViewIndex]->mapToGlobal(m_viewports[m_iMouseCaptureViewIndex]->pos());
         visibleRectangle.translate(visibleRectanglePos);
-        visibleRectangle = visibleRectangle.intersected(vboxGlobal().availableGeometry(machineLogic()->machineWindows()[m_iMouseCaptureViewIndex]));
+        visibleRectangle = visibleRectangle.intersected(gpDesktop->availableGeometry(machineLogic()->machineWindows()[m_iMouseCaptureViewIndex]));
 
 #ifdef VBOX_WS_WIN
         /* Move the mouse to the center of the visible area: */
@@ -880,8 +880,8 @@ bool UIMouseHandler::mouseEvent(int iEventType, ulong uScreenId,
         else
             m_lastMousePos = globalPos;
 #else /* VBOX_WS_WIN */
-        int iWe = QApplication::desktop()->width() - 1;
-        int iHe = QApplication::desktop()->height() - 1;
+        int iWe = gpDesktop->overallDesktopWidth() - 1;
+        int iHe = gpDesktop->overallDesktopHeight() - 1;
         QPoint p = globalPos;
         if (globalPos.x() == 0)
             p.setX(iWe - 1);
@@ -1118,7 +1118,7 @@ void UIMouseHandler::updateMouseCursorClipping()
         /* Get full-viewport-rectangle in global coordinates: */
         viewportRectangle.translate(viewportRectangleGlobalPos);
         /* Trim full-viewport-rectangle by available geometry: */
-        viewportRectangle = viewportRectangle.intersected(vboxGlobal().availableGeometry(machineLogic()->machineWindows()[m_iMouseCaptureViewIndex]));
+        viewportRectangle = viewportRectangle.intersected(gpDesktop->availableGeometry(machineLogic()->machineWindows()[m_iMouseCaptureViewIndex]));
         /* Trim partial-viewport-rectangle by top-most windows: */
         QRegion viewportRegion(viewportRectangle);
         QRegion topMostRegion(NativeWindowSubsystem::areaCoveredByTopMostWindows());
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.h b/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.h
index 283f997..12c44ac 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2012 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp
index 5dd72e4..94587d0 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2013 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -32,6 +32,7 @@
 # include "UISession.h"
 # include "UIMessageCenter.h"
 # include "UIExtraDataManager.h"
+# include "UIDesktopWidgetWatchdog.h"
 # include "VBoxGlobal.h"
 
 /* COM includes: */
@@ -98,7 +99,7 @@ void UIMultiScreenLayout::update()
                 /* Get top-left corner position: */
                 QPoint topLeftPosition(geo.topLeft());
                 /* Check which host-screen the position belongs to: */
-                iHostScreen = vboxGlobal().screenNumber(topLeftPosition);
+                iHostScreen = gpDesktop->screenNumber(topLeftPosition);
                 /* Revalidate: */
                 fValid =    iHostScreen >= 0 && iHostScreen < m_cHostScreens /* In the host screen bounds? */
                          && m_screenMap.key(iHostScreen, -1) == -1; /* Not taken already? */
@@ -256,7 +257,7 @@ void UIMultiScreenLayout::sltHandleScreenLayoutChange(int iRequestedGuestScreen,
 
 void UIMultiScreenLayout::calculateHostMonitorCount()
 {
-    m_cHostScreens = vboxGlobal().screenCount();
+    m_cHostScreens = gpDesktop->screenCount();
 }
 
 void UIMultiScreenLayout::calculateGuestScreenCount()
@@ -295,9 +296,9 @@ quint64 UIMultiScreenLayout::memoryRequirements(const QMap<int, int> &screenLayo
     {
         QRect screen;
         if (m_pMachineLogic->visualStateType() == UIVisualStateType_Seamless)
-            screen = vboxGlobal().availableGeometry(screenLayout.value(iGuestScreen, 0));
+            screen = gpDesktop->availableGeometry(screenLayout.value(iGuestScreen, 0));
         else
-            screen = vboxGlobal().screenGeometry(screenLayout.value(iGuestScreen, 0));
+            screen = gpDesktop->screenGeometry(screenLayout.value(iGuestScreen, 0));
         KGuestMonitorStatus monitorStatus = KGuestMonitorStatus_Enabled;
         display.GetScreenResolution(iGuestScreen, width, height, guestBpp, xOrigin, yOrigin, monitorStatus);
         usedBits += screen.width() * /* display width */
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.h b/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.h
index 719c399..0c28fe7 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2013 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
index 2450800..433775b 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -22,7 +22,6 @@
 /* Qt includes: */
 # include <QApplication>
 # include <QBitmap>
-# include <QDesktopWidget>
 # include <QWidget>
 # ifdef VBOX_WS_MAC
 #  include <QTimer>
@@ -30,6 +29,7 @@
 
 /* GUI includes: */
 # include "VBoxGlobal.h"
+# include "UIDesktopWidgetWatchdog.h"
 # include "UIExtraDataManager.h"
 # include "UISession.h"
 # include "UIMachine.h"
@@ -840,7 +840,7 @@ void UISession::sltCheckIfHostDisplayChanged()
     LogRelFlow(("GUI: UISession::sltCheckIfHostDisplayChanged()\n"));
 
     /* Check if display count changed: */
-    if (vboxGlobal().screenCount() != m_hostScreens.size())
+    if (gpDesktop->screenCount() != m_hostScreens.size())
     {
         /* Reset watchdog: */
         m_pWatchdogDisplayChange->setProperty("tryNumber", 0);
@@ -850,9 +850,9 @@ void UISession::sltCheckIfHostDisplayChanged()
     else
     {
         /* Check if at least one display geometry changed: */
-        for (int iScreenIndex = 0; iScreenIndex < vboxGlobal().screenCount(); ++iScreenIndex)
+        for (int iScreenIndex = 0; iScreenIndex < gpDesktop->screenCount(); ++iScreenIndex)
         {
-            if (vboxGlobal().screenGeometry(iScreenIndex) != m_hostScreens.at(iScreenIndex))
+            if (gpDesktop->screenGeometry(iScreenIndex) != m_hostScreens.at(iScreenIndex))
             {
                 /* Reset watchdog: */
                 m_pWatchdogDisplayChange->setProperty("tryNumber", 0);
@@ -1124,12 +1124,16 @@ void UISession::prepareConnections()
     CGDisplayRegisterReconfigurationCallback(cgDisplayReconfigurationCallback, this);
 #else /* !VBOX_WS_MAC */
     /* Install Qt display reconfiguration callbacks: */
-    connect(QApplication::desktop(), SIGNAL(screenCountChanged(int)),
+    connect(gpDesktop, SIGNAL(sigHostScreenCountChanged(int)),
             this, SLOT(sltHandleHostScreenCountChange()));
-    connect(QApplication::desktop(), SIGNAL(resized(int)),
+    connect(gpDesktop, SIGNAL(sigHostScreenResized(int)),
             this, SLOT(sltHandleHostScreenGeometryChange()));
-    connect(QApplication::desktop(), SIGNAL(workAreaResized(int)),
+    connect(gpDesktop, SIGNAL(sigHostScreenWorkAreaResized(int)),
             this, SLOT(sltHandleHostScreenAvailableAreaChange()));
+# ifdef VBOX_WS_X11
+    connect(gpDesktop, SIGNAL(sigHostScreenWorkAreaRecalculated(int)),
+            this, SLOT(sltHandleHostScreenAvailableAreaChange()));
+# endif /* VBOX_WS_X11 */
 #endif /* !VBOX_WS_MAC */
 }
 
@@ -1752,78 +1756,141 @@ void UISession::setPointerShape(const uchar *pShapeData, bool fHasAlpha,
         DeleteObject(hBitmap);
 # else /* QT_VERSION >= 0x050000 */
     /* Create a ARGB image out of the shape data: */
-    QImage image(uWidth, uHeight, QImage::Format_ARGB32);
-    memcpy(image.bits(), srcShapePtr, uHeight * uWidth * 4);
+
+    /*
+     * Qt5 QCursor recommends 32 x 32 cursor, therefore the original data is copied to
+     * a larger QImage if necessary. Cursors like 10x16 did not work correctly (Solaris 10 guest).
+     */
+    uint uCursorWidth = uWidth >= 32? uWidth: 32;
+    uint uCursorHeight = uHeight >= 32? uHeight: 32;
+    uint x, y;
 
     if (fHasAlpha)
+    {
+        QImage image(uCursorWidth, uCursorHeight, QImage::Format_ARGB32);
+        memset(image.bits(), 0, image.byteCount());
+
+        const uint32_t *pu32SrcShapeScanline = (uint32_t *)srcShapePtr;
+        for (y = 0; y < uHeight; ++y, pu32SrcShapeScanline += uWidth)
+            memcpy(image.scanLine(y), pu32SrcShapeScanline, uWidth * sizeof(uint32_t));
+
         m_cursor = QCursor(QPixmap::fromImage(image), uXHot, uYHot);
+    }
     else
     {
         if (isPointer1bpp(srcShapePtr, uWidth, uHeight))
         {
             /* Incoming data consist of 32 bit BGR XOR mask and 1 bit AND mask.
              * XOR pixels contain either 0x00000000 or 0x00FFFFFF.
-             * image.convertToFormat(QImage::Format_Mono) converts them:
-             * 0x00000000 -> 1, 0x00FFFFFF -> 0.
              *
-             * XOR AND originally intended result (F denotes 0x00FFFFFF):
+             * Originally intended result (F denotes 0x00FFFFFF):
+             * XOR AND
              *   0   0 black
              *   F   0 white
              *   0   1 transparent
              *   F   1 xor'd
              *
-             * XOR AND converted bitmap intended result:
-             *   1   0 black
-             *   0   0 white
-             *   1   1 transparent
-             *   0   1 xor'd
-             *
-             * Bitmap Mask actual Qt5 result (tested on Windows 7 64 bit host):
-             *   1   0 black
-             *   0   0 white
-             *   0   1 transparent
-             *   1   1 xor'd
+             * Actual Qt5 result for color table 0:0xFF000000, 1:0xFFFFFFFF
+             * (tested on Windows 7 and 10 64 bit hosts):
+             * Bitmap Mask
+             *  0   0 black
+             *  1   0 white
+             *  0   1 xor
+             *  1   1 transparent
              *
-             * Converted bitmap to the Qt5 mask and bitmap:
-             * Mask = AND;
-             * Bitmap = ConvBitmap ^ Mask;
              */
-            QImage bitmap = image.convertToFormat(QImage::Format_Mono);
-            QImage mask(uWidth, uHeight, QImage::Format_Mono);
-            memcpy(mask.bits(), srcAndMaskPtr, uHeight * ((uWidth + 7) / 8));
 
-            const uint8_t *pu8Mask = mask.bits();
-            uint8_t *pu8Bitmap = bitmap.bits();
-            uint i;
-            for (i = 0; i < uHeight * ((uWidth + 7) / 8); ++i)
-                pu8Bitmap[i] ^= pu8Mask[i];
+            QVector<QRgb> colors(2);
+            colors[0] = UINT32_C(0xFF000000);
+            colors[1] = UINT32_C(0xFFFFFFFF);
+
+            QImage bitmap(uCursorWidth, uCursorHeight, QImage::Format_Mono);
+            bitmap.setColorTable(colors);
+            memset(bitmap.bits(), 0xFF, bitmap.byteCount());
+
+            QImage mask(uCursorWidth, uCursorHeight, QImage::Format_Mono);
+            mask.setColorTable(colors);
+            memset(mask.bits(), 0xFF, mask.byteCount());
+
+            const uint8_t *pu8SrcAndScanline = srcAndMaskPtr;
+            const uint32_t *pu32SrcShapeScanline = (uint32_t *)srcShapePtr;
+            for (y = 0; y < uHeight; ++y)
+            {
+                for (x = 0; x < uWidth; ++x)
+                {
+                    const uint8_t u8Bit = (uint8_t)(1 << (7 - x % 8));
+
+                    const uint8_t u8SrcMaskByte = pu8SrcAndScanline[x / 8];
+                    const uint8_t u8SrcMaskBit = u8SrcMaskByte & u8Bit;
+                    const uint32_t u32SrcPixel = pu32SrcShapeScanline[x] & UINT32_C(0xFFFFFF);
+
+                    uint8_t *pu8DstMaskByte = &mask.scanLine(y)[x / 8];
+                    uint8_t *pu8DstBitmapByte = &bitmap.scanLine(y)[x / 8];
+
+                    if (u8SrcMaskBit == 0)
+                    {
+                        if (u32SrcPixel == 0)
+                        {
+                            /* Black: Qt Bitmap = 0, Mask = 0 */
+                            *pu8DstMaskByte &= ~u8Bit;
+                            *pu8DstBitmapByte &= ~u8Bit;
+                        }
+                        else
+                        {
+                            /* White: Qt Bitmap = 1, Mask = 0 */
+                            *pu8DstMaskByte &= ~u8Bit;
+                            *pu8DstBitmapByte |= u8Bit;
+                        }
+                    }
+                    else
+                    {
+                        if (u32SrcPixel == 0)
+                        {
+                            /* Transparent: Qt Bitmap = 1, Mask = 1 */
+                            *pu8DstMaskByte |= u8Bit;
+                            *pu8DstBitmapByte |= u8Bit;
+                        }
+                        else
+                        {
+                            /* Xor'ed: Qt Bitmap = 0, Mask = 1 */
+                            *pu8DstMaskByte |= u8Bit;
+                            *pu8DstBitmapByte &= ~u8Bit;
+                        }
+                    }
+                }
+
+                pu8SrcAndScanline += (uWidth + 7) / 8;
+                pu32SrcShapeScanline += uWidth;
+            }
 
             m_cursor = QCursor(QBitmap::fromImage(bitmap), QBitmap::fromImage(mask), uXHot, uYHot);
         }
         else
         {
             /* Assign alpha channel values according to the AND mask: 1 -> 0x00, 0 -> 0xFF: */
-            const uint8_t *pu8And = srcAndMaskPtr;
-            uint32_t *pu32Pixel = (uint32_t *)image.bits();
-            uint y;
+            QImage image(uCursorWidth, uCursorHeight, QImage::Format_ARGB32);
+            memset(image.bits(), 0, image.byteCount());
+
+            const uint8_t *pu8SrcAndScanline = srcAndMaskPtr;
+            const uint32_t *pu32SrcShapeScanline = (uint32_t *)srcShapePtr;
+
             for (y = 0; y < uHeight; ++y)
             {
-                uint x;
-                for (x = 0; x < (uWidth + 7) / 8; ++x)
+                uint32_t *pu32DstPixel = (uint32_t *)image.scanLine(y);
+
+                for (x = 0; x < uWidth; ++x)
                 {
-                    const uint8_t b = *pu8And;
-                    uint k;
-                    for (k = 0; k < 8; ++k)
-                    {
-                        if (b & (1 << (7 - k)))
-                            *pu32Pixel &= UINT32_C(0x00FFFFFF);
-                        else
-                            *pu32Pixel |= UINT32_C(0xFF000000);
-                        ++pu32Pixel;
-                    }
+                    const uint8_t u8Bit = (uint8_t)(1 << (7 - x % 8));
+                    const uint8_t u8SrcMaskByte = pu8SrcAndScanline[x / 8];
 
-                    ++pu8And;
+                    if (u8SrcMaskByte & u8Bit)
+                        *pu32DstPixel++ = pu32SrcShapeScanline[x] & UINT32_C(0x00FFFFFF);
+                    else
+                        *pu32DstPixel++ = pu32SrcShapeScanline[x] | UINT32_C(0xFF000000);
                 }
+
+                pu32SrcShapeScanline += uWidth;
+                pu8SrcAndScanline += (uWidth + 7) / 8;
             }
 
             m_cursor = QCursor(QPixmap::fromImage(image), uXHot, uYHot);
@@ -1831,6 +1898,7 @@ void UISession::setPointerShape(const uchar *pShapeData, bool fHasAlpha,
     }
 
     m_fIsValidPointerShapePresent = true;
+    NOREF(srcShapePtrScan);
 # endif /* QT_VERSION >= 0x050000 */
 
 #elif defined(VBOX_WS_X11) || defined(VBOX_WS_MAC)
@@ -1854,7 +1922,7 @@ void UISession::setPointerShape(const uchar *pShapeData, bool fHasAlpha,
 # ifdef VBOX_WS_MAC
 #  ifdef VBOX_GUI_WITH_HIDPI
     /* Adjust backing-scale-factor: */
-    // TODO: In case of multi-monitor setup check whether backing-scale factor and cursor are screen specific.
+    /// @todo In case of multi-monitor setup check whether backing-scale factor and cursor are screen specific.
     /* Get screen-id of main-window: */
     const ulong uScreenID = machineLogic()->activeMachineWindow()->screenId();
     /* Get backing-scale-factor: */
@@ -1918,6 +1986,7 @@ bool UISession::preprocessInitialization()
                 case KNetworkAttachmentType_HostOnly:
                     strIfName = na.GetHostOnlyInterface();
                     break;
+                default: break; /* Shut up, MSC! */
             }
 
             if (!strIfName.isEmpty() &&
@@ -2133,8 +2202,8 @@ void UISession::setFrameBuffer(ulong uScreenId, UIFrameBuffer* pFrameBuffer)
 void UISession::updateHostScreenData()
 {
     m_hostScreens.clear();
-    for (int iScreenIndex = 0; iScreenIndex < vboxGlobal().screenCount(); ++iScreenIndex)
-        m_hostScreens << vboxGlobal().screenGeometry(iScreenIndex);
+    for (int iScreenIndex = 0; iScreenIndex < gpDesktop->screenCount(); ++iScreenIndex)
+        m_hostScreens << gpDesktop->screenGeometry(iScreenIndex);
 }
 
 void UISession::updateActionRestrictions()
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h b/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
index eaaeea4..4c27525 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2013 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UISlidingToolBar.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/UISlidingToolBar.cpp
index 99e7b18..b0f2405 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UISlidingToolBar.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UISlidingToolBar.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UISlidingToolBar.h b/src/VBox/Frontends/VirtualBox/src/runtime/UISlidingToolBar.h
index ae1add2..7ea7dcb 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UISlidingToolBar.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UISlidingToolBar.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIStatusBarEditorWindow.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/UIStatusBarEditorWindow.cpp
index 71e1ed8..44a75c5 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIStatusBarEditorWindow.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIStatusBarEditorWindow.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIStatusBarEditorWindow.h b/src/VBox/Frontends/VirtualBox/src/runtime/UIStatusBarEditorWindow.h
index b97b288..34777b2 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIStatusBarEditorWindow.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIStatusBarEditorWindow.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.cpp
index 2365064..ca0d088 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.h b/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.h
index 61a5a4e..d454862 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIKeyboardHandlerFullscreen.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIKeyboardHandlerFullscreen.cpp
index 4bdb4b3..e5d783b 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIKeyboardHandlerFullscreen.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIKeyboardHandlerFullscreen.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2014 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIKeyboardHandlerFullscreen.h b/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIKeyboardHandlerFullscreen.h
index 714bc54..2c141d7 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIKeyboardHandlerFullscreen.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIKeyboardHandlerFullscreen.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2014 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp
index 886e194..d8f7b91 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2013 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -24,6 +24,7 @@
 
 /* GUI includes: */
 # include "VBoxGlobal.h"
+# include "UIDesktopWidgetWatchdog.h"
 # include "UIMessageCenter.h"
 # include "UISession.h"
 # include "UIActionPoolRuntime.h"
@@ -765,9 +766,9 @@ void UIMachineLogicFullscreen::revalidateNativeFullScreen(UIMachineWindow *pMach
         {
             /* Variables to compare: */
             const int iWantedHostScreenIndex = hostScreenForGuestScreen((int)uScreenID);
-            const int iCurrentHostScreenIndex = vboxGlobal().screenNumber(pMachineWindow);
+            const int iCurrentHostScreenIndex = gpDesktop->screenNumber(pMachineWindow);
             const QSize frameBufferSize((int)uisession()->frameBuffer(uScreenID)->width(), (int)uisession()->frameBuffer(uScreenID)->height());
-            const QSize screenSize = vboxGlobal().screenGeometry(iWantedHostScreenIndex).size();
+            const QSize screenSize = gpDesktop->screenGeometry(iWantedHostScreenIndex).size();
 
             /* If that window
              * 1. shouldn't really be shown or
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.h b/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.h
index 1853430..c44899c 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2013 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp
index 9c50dc7..ee756b2 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2012 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -28,7 +28,6 @@
 # endif /* VBOX_WS_MAC */
 
 /* GUI includes: */
-# include "VBoxGlobal.h"
 # include "UISession.h"
 # include "UIActionPoolRuntime.h"
 # include "UIMachineLogicFullscreen.h"
@@ -36,6 +35,10 @@
 # include "UIMachineViewFullscreen.h"
 # include "UIFrameBuffer.h"
 # include "UIExtraDataManager.h"
+# include "UIDesktopWidgetWatchdog.h"
+
+/* Other VBox includes: */
+# include "VBox/log.h"
 
 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
 
@@ -211,7 +214,7 @@ QRect UIMachineViewFullscreen::workingArea() const
     /* Get corresponding screen: */
     int iScreen = static_cast<UIMachineLogicFullscreen*>(machineLogic())->hostScreenForGuestScreen(screenId());
     /* Return available geometry for that screen: */
-    return vboxGlobal().screenGeometry(iScreen);
+    return gpDesktop->screenGeometry(iScreen);
 }
 
 QSize UIMachineViewFullscreen::calculateMaxGuestSize() const
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.h b/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.h
index 49b8c18..e99c0d3 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2012 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
index d8d1834..06c50aa 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -30,6 +30,7 @@
 
 /* GUI includes: */
 # include "VBoxGlobal.h"
+# include "UIDesktopWidgetWatchdog.h"
 # include "UIExtraDataManager.h"
 # include "UISession.h"
 # include "UIActionPoolRuntime.h"
@@ -320,7 +321,7 @@ void UIMachineWindowFullscreen::placeOnScreen()
     /* Get corresponding host-screen: */
     const int iHostScreen = pFullscreenLogic->hostScreenForGuestScreen(m_uScreenId);
     /* And corresponding working area: */
-    const QRect workingArea = vboxGlobal().screenGeometry(iHostScreen);
+    const QRect workingArea = gpDesktop->screenGeometry(iHostScreen);
     Q_UNUSED(workingArea);
 
 #if defined(VBOX_WS_MAC)
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.h b/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.h
index 44666b2..6d6010a 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Audio_old/Makefile.kup b/src/VBox/Frontends/VirtualBox/src/runtime/information/Makefile.kup
similarity index 100%
copy from src/VBox/Devices/Audio_old/Makefile.kup
copy to src/VBox/Frontends/VirtualBox/src/runtime/information/Makefile.kup
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationDataItem.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationDataItem.cpp
index 338415c..8e77d0b 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationDataItem.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationDataItem.cpp
@@ -58,6 +58,7 @@
 
 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
 
+
 UIInformationDataItem::UIInformationDataItem(InformationElementType type, const CMachine &machine, const CConsole &console, UIInformationModel *pModel)
     : m_type(type)
     , m_machine(machine)
@@ -72,6 +73,7 @@ UIInformationDataItem::~UIInformationDataItem()
 
 QVariant UIInformationDataItem::data(const QModelIndex &index, int role) const
 {
+    RT_NOREF(index);
     switch (role)
     {
         case Qt::DisplayRole:
@@ -669,8 +671,9 @@ QVariant UIInformationDataRuntimeAttributes::data(const QModelIndex &index, int
                 aResolutions[iScreen] = strResolution;
             }
 
-            /* Calculate uptime: */
-            uint32_t uUpSecs = (RTTimeProgramSecTS() / 5) * 5;
+            /* Determine uptime: */
+            CMachineDebugger debugger = m_console.GetDebugger();
+            uint32_t uUpSecs = (debugger.GetUptime() / 5000) * 5;
             char szUptime[32];
             uint32_t uUpDays = uUpSecs / (60 * 60 * 24);
             uUpSecs -= uUpDays * 60 * 60 * 24;
@@ -687,8 +690,7 @@ QVariant UIInformationDataRuntimeAttributes::data(const QModelIndex &index, int
             /* Determine Drag&Drop mode: */
             QString strDnDMode = gpConverter->toString(m_machine.GetDnDMode());
 
-            /* Deterine virtualization attributes: */
-            CMachineDebugger debugger = m_console.GetDebugger();
+            /* Determine virtualization attributes: */
             QString strVirtualization = debugger.GetHWVirtExEnabled() ?
                                         VBoxGlobal::tr("Active", "details report (VT-x/AMD-V)") :
                                         VBoxGlobal::tr("Inactive", "details report (VT-x/AMD-V)");
@@ -1179,8 +1181,8 @@ QVariant UIInformationDataStorageStatistics::data(const QModelIndex &index, int
                     case KStorageBus_SAS:  ++iSASCount; break;
                     default: break;
                 }
-                return QVariant::fromValue(p_text);
             }
+            return QVariant::fromValue(p_text);
         }
         break;
 
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationItem.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationItem.cpp
index ccd1ebb..a10654d 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationItem.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationItem.cpp
@@ -24,8 +24,10 @@
 # include <QApplication>
 # include <QAbstractTextDocumentLayout>
 # include <QTextDocument>
+# include <QUrl>
 
 /* GUI includes: */
+# include "UIIconPool.h"
 # include "UIInformationItem.h"
 # include "VBoxGlobal.h"
 
@@ -37,6 +39,9 @@ UIInformationItem::UIInformationItem(QObject *pParent)
     /* Create text-document: */
     m_pTextDocument = new QTextDocument(this);
     AssertPtrReturnVoid(m_pTextDocument);
+
+    /* Dummy initialization of icon-string (to avoid assertion in icon-pool when model is empty): */
+    m_strIcon = ":/machine_16px.png";
 }
 
 void UIInformationItem::setIcon(const QString &strIcon) const
@@ -117,6 +122,8 @@ void UIInformationItem::paint(QPainter *pPainter, const QStyleOptionViewItem &op
 
 QSize UIInformationItem::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
 {
+    RT_NOREF(option);
+
     /* Update data: */
     updateData(index);
     if (m_text.count() == 0)
@@ -149,13 +156,16 @@ void UIInformationItem::updateTextLayout() const
 {
     /* Details templates: */
     static const char *sSectionBoldTpl =
-        "<tr><td width=22 rowspan=%1 align=left><img width=16 height=16 src='%2'></td>"
+        "<tr><td width=22 rowspan=%1 align=left><img src=\"image://%2\" /></td>"
             "<td><b><nobr>%3</nobr></b></td></tr>"
             "%4";
     static const char *sSectionItemTpl2 =
         "<tr><td width=200><nobr>%1</nobr></td><td/><td>%2</td></tr>";
     const QString &sectionTpl = sSectionBoldTpl;
 
+    /* Initialize icon tag: */
+    const QString strIconTag = QString("image://%1").arg(m_strIcon);
+
     /* Compose details report: */
     QString report;
     {
@@ -171,6 +181,9 @@ void UIInformationItem::updateTextLayout() const
                                 item); /* items */
     }
 
+    /* Add pixmap to text-document as image resource: */
+    m_pTextDocument->addResource(QTextDocument::ImageResource, QUrl(strIconTag), UIIconPool::pixmap(m_strIcon));
+
     /* Set html-data: */
     m_pTextDocument->setHtml(report);
 }
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationView.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationView.cpp
index 8a4b74a..756f5a8 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationView.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationView.cpp
@@ -38,6 +38,8 @@ UIInformationView::UIInformationView(QWidget *pParent)
     m_pTextEdit->setVisible(false);
     /* Set selection mode: */
     setSelectionMode(QAbstractItemView::ExtendedSelection);
+    /* Set scrolling mode to per pixel: */
+    setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
 }
 
 void UIInformationView::updateData(const QModelIndex &topLeft, const QModelIndex &bottomRight)
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/information/UIVMInformationDialog.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/information/UIVMInformationDialog.cpp
index 272717f..948a318 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/information/UIVMInformationDialog.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/information/UIVMInformationDialog.cpp
@@ -83,10 +83,10 @@ void UIVMInformationDialog::invoke(UIMachineWindow *pMachineWindow)
 }
 
 UIVMInformationDialog::UIVMInformationDialog(UIMachineWindow *pMachineWindow)
-    : QIWithRetranslateUI<QMainWindow>(0)
+    : QIWithRetranslateUI<QIMainWindow>(0)
     , m_pTabWidget(0)
     , m_pMachineWindow(pMachineWindow)
-{    
+{
     /* Initialize instance: */
     m_spInstance = this;
 
@@ -103,6 +103,11 @@ UIVMInformationDialog::~UIVMInformationDialog()
     m_spInstance = 0;
 }
 
+bool UIVMInformationDialog::shouldBeMaximized() const
+{
+    return gEDataManager->informationWindowShouldBeMaximized(vboxGlobal().managedVMUuid());
+}
+
 void UIVMInformationDialog::retranslateUi()
 {
     CMachine machine = gpMachine->uisession()->machine();
@@ -119,7 +124,7 @@ void UIVMInformationDialog::retranslateUi()
 bool UIVMInformationDialog::event(QEvent *pEvent)
 {
     /* Pre-process through base-class: */
-    bool fResult = QMainWindow::event(pEvent);
+    bool fResult = QIMainWindow::event(pEvent);
 
     /* Process required events: */
     switch (pEvent->type())
@@ -188,13 +193,7 @@ void UIVMInformationDialog::prepareThis()
     prepareCentralWidget();
 
     /* Configure handlers: */
-    //connect(m_pMachineWindow->uisession(), SIGNAL(sigMediumChange(const CMediumAttachment&)), this, SLOT(sltUpdateDetails()));
-    //connect(m_pMachineWindow->uisession(), SIGNAL(sigSharedFolderChange()), this, SLOT(sltUpdateDetails()));
-    /* TODO_NEW_CORE: this is ofc not really right in the mm sense. There are more than one screens. */
-    //connect(m_pMachineWindow->machineView(), SIGNAL(sigFrameBufferResize()), this, SLOT(sltProcessStatistics()));
     connect(m_pTabWidget, SIGNAL(currentChanged(int)), this, SLOT(sltHandlePageChanged(int)));
-    //connect(&vboxGlobal(), SIGNAL(sigMediumEnumerationFinished()), this, SLOT(sltUpdateDetails()));
-    //connect(m_pTimer, SIGNAL(timeout()), this, SLOT(sltProcessStatistics()));
 
     /* Retranslate: */
     retranslateUi();
@@ -278,18 +277,11 @@ void UIVMInformationDialog::loadSettings()
     {
         /* Load geometry: */
         m_geometry = gEDataManager->informationWindowGeometry(this, m_pMachineWindow, vboxGlobal().managedVMUuid());
-#ifdef VBOX_WS_MAC
-        move(m_geometry.topLeft());
-        resize(m_geometry.size());
-#else /* VBOX_WS_MAC */
-        setGeometry(m_geometry);
-#endif /* !VBOX_WS_MAC */
-        LogRel2(("GUI: UIVMInformationDialog: Geometry loaded to: Origin=%dx%d, Size=%dx%d\n",
-                 m_geometry.x(), m_geometry.y(), m_geometry.width(), m_geometry.height()));
 
-        /* Maximize (if necessary): */
-        if (gEDataManager->informationWindowShouldBeMaximized(vboxGlobal().managedVMUuid()))
-            showMaximized();
+        /* Restore geometry: */
+        LogRel2(("GUI: UIVMInformationDialog: Restoring geometry to: Origin=%dx%d, Size=%dx%d\n",
+                 m_geometry.x(), m_geometry.y(), m_geometry.width(), m_geometry.height()));
+        restoreGeometry();
     }
 }
 
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/information/UIVMInformationDialog.h b/src/VBox/Frontends/VirtualBox/src/runtime/information/UIVMInformationDialog.h
index 8456de1..6eec50d 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/information/UIVMInformationDialog.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/information/UIVMInformationDialog.h
@@ -19,9 +19,9 @@
 #define ___UIVMInformationDialog_h___
 
 /* Qt includes: */
-#include <QMainWindow>
 
 /* GUI includes: */
+#include "QIMainWindow.h"
 #include "QIWithRetranslateUI.h"
 
 /* COM includes: */
@@ -33,8 +33,8 @@ class QITabWidget;
 class UIMachineWindow;
 class QIDialogButtonBox;
 
-/** QMainWindow based dialog providing user with VM details and statistics. */
-class UIVMInformationDialog : public QIWithRetranslateUI<QMainWindow>
+/** QIMainWindow based dialog providing user with VM details and statistics. */
+class UIVMInformationDialog : public QIWithRetranslateUI<QIMainWindow>
 {
     Q_OBJECT;
 
@@ -51,6 +51,9 @@ protected:
     /** Information dialog destructor. */
     ~UIVMInformationDialog();
 
+    /** Returns whether the dialog should be maximized when geometry being restored. */
+    virtual bool shouldBeMaximized() const /* override */;
+
     /** Translation handler. */
     void retranslateUi();
 
@@ -90,8 +93,6 @@ private:
      * @{ */
     /** Dialog instance pointer. */
     static UIVMInformationDialog *m_spInstance;
-    /** Current dialog geometry. */
-    QRect                  m_geometry;
     /** @} */
 
     /** @name Widget variables.
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIKeyboardHandlerNormal.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIKeyboardHandlerNormal.cpp
index 71a0de1..3a75ce6 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIKeyboardHandlerNormal.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIKeyboardHandlerNormal.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2014 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIKeyboardHandlerNormal.h b/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIKeyboardHandlerNormal.h
index dce3b1a..6aec848 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIKeyboardHandlerNormal.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIKeyboardHandlerNormal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2014 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp
index bfa1da4..cf32bed 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2013 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -26,6 +26,7 @@
 
 /* GUI includes: */
 # include "VBoxGlobal.h"
+# include "UIDesktopWidgetWatchdog.h"
 # include "UIMessageCenter.h"
 # include "UISession.h"
 # include "UIActionPoolRuntime.h"
@@ -250,6 +251,22 @@ void UIMachineLogicNormal::sltHandleActionTriggerViewScreenResize(int iIndex, co
                              false, 0, 0, size.width(), size.height(), 0);
 }
 
+void UIMachineLogicNormal::sltHostScreenAvailableAreaChange()
+{
+#if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000
+    /* Prevent handling if fake screen detected: */
+    if (gpDesktop->isFakeScreenDetected())
+        return;
+
+    /* Make sure all machine-window(s) have previous but normalized geometry: */
+    foreach (UIMachineWindow *pMachineWindow, machineWindows())
+        pMachineWindow->restoreCachedGeometry();
+#endif /* VBOX_WS_X11 && QT_VERSION >= 0x050000 */
+
+    /* Call to base-class: */
+    UIMachineLogic::sltHostScreenAvailableAreaChange();
+}
+
 void UIMachineLogicNormal::prepareActionConnections()
 {
     /* Call to base-class: */
@@ -284,7 +301,7 @@ void UIMachineLogicNormal::prepareMachineWindows()
     if (isMachineWindowsCreated())
         return;
 
-#ifdef VBOX_WS_MAC // TODO: Is that really need here?
+#ifdef VBOX_WS_MAC /// @todo Is that really need here?
     /* We have to make sure that we are getting the front most process.
      * This is necessary for Qt versions > 4.3.3: */
     ::darwinSetFrontMostProcess();
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.h b/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.h
index b53f5ae..8e4b435 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2013 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -68,6 +68,9 @@ private slots:
     /** Handles guest-screen resize requests. */
     void sltHandleActionTriggerViewScreenResize(int iIndex, const QSize &size);
 
+    /** Handles host-screen available-area change. */
+    virtual void sltHostScreenAvailableAreaChange() /* override */;
+
 private:
 
     /* Prepare helpers: */
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp
index ab9603b..5f5a15a 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2012 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -27,14 +27,17 @@
 # include <QTimer>
 
 /* GUI includes: */
-# include "VBoxGlobal.h"
 # include "UISession.h"
 # include "UIActionPoolRuntime.h"
 # include "UIMachineLogic.h"
 # include "UIMachineWindow.h"
 # include "UIMachineViewNormal.h"
-# include "UIExtraDataManager.h"
 # include "UIFrameBuffer.h"
+# include "UIExtraDataManager.h"
+# include "UIDesktopWidgetWatchdog.h"
+
+/* Other VBox includes: */
+# include "VBox/log.h"
 
 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
 
@@ -254,7 +257,7 @@ QSize UIMachineViewNormal::sizeHint() const
 
 QRect UIMachineViewNormal::workingArea() const
 {
-    return vboxGlobal().availableGeometry(this);
+    return gpDesktop->availableGeometry(this);
 }
 
 QSize UIMachineViewNormal::calculateMaxGuestSize() const
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h b/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h
index 9a374ce..0b40073 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2011 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
index 2cd1eb2..d696ec6 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2012 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -28,6 +28,7 @@
 
 /* GUI includes: */
 # include "VBoxGlobal.h"
+# include "UIDesktopWidgetWatchdog.h"
 # include "UIMachineWindowNormal.h"
 # include "UIActionPoolRuntime.h"
 # include "UIExtraDataManager.h"
@@ -391,8 +392,8 @@ void UIMachineWindowNormal::loadSettings()
         else
         {
             /* Get available geometry, for screen with (x,y) coords if possible: */
-            QRect availableGeo = !geo.isNull() ? vboxGlobal().availableGeometry(QPoint(geo.x(), geo.y())) :
-                                                 vboxGlobal().availableGeometry(this);
+            QRect availableGeo = !geo.isNull() ? gpDesktop->availableGeometry(QPoint(geo.x(), geo.y())) :
+                                                 gpDesktop->availableGeometry(this);
 
             /* Normalize to the optimal size: */
             normalizeGeometry(true /* adjust position */);
@@ -461,6 +462,12 @@ bool UIMachineWindowNormal::event(QEvent *pEvent)
     {
         case QEvent::Resize:
         {
+#if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000
+            /* Prevent handling if fake screen detected: */
+            if (gpDesktop->isFakeScreenDetected())
+                break;
+#endif /* VBOX_WS_X11 && QT_VERSION >= 0x050000 */
+
             QResizeEvent *pResizeEvent = static_cast<QResizeEvent*>(pEvent);
             if (!isMaximizedChecked())
             {
@@ -475,6 +482,12 @@ bool UIMachineWindowNormal::event(QEvent *pEvent)
         }
         case QEvent::Move:
         {
+#if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000
+            /* Prevent handling if fake screen detected: */
+            if (gpDesktop->isFakeScreenDetected())
+                break;
+#endif /* VBOX_WS_X11 && QT_VERSION >= 0x050000 */
+
             if (!isMaximizedChecked())
             {
                 m_normalGeometry.moveTo(geometry().x(), geometry().y());
@@ -512,6 +525,16 @@ void UIMachineWindowNormal::showInNecessaryMode()
     m_pMachineView->setFocus();
 }
 
+void UIMachineWindowNormal::restoreCachedGeometry()
+{
+    /* Restore the geometry cached by the window: */
+    resize(m_normalGeometry.size());
+    move(m_normalGeometry.topLeft());
+
+    /* Adjust machine-view accordingly: */
+    adjustMachineViewSize();
+}
+
 void UIMachineWindowNormal::normalizeGeometry(bool fAdjustPosition)
 {
 #ifndef VBOX_GUI_WITH_CUSTOMIZATIONS1
@@ -546,31 +569,16 @@ void UIMachineWindowNormal::normalizeGeometry(bool fAdjustPosition)
     frGeo.setRight(frGeo.right() + sh.width());
     frGeo.setBottom(frGeo.bottom() + sh.height());
 
-    /* Calculate common bound region: */
-    QRegion region;
-    for (int iScreenIndex = 0; iScreenIndex < vboxGlobal().screenCount(); ++iScreenIndex)
-    {
-        /* Get enumerated screen's available area: */
-        QRect rect = vboxGlobal().availableGeometry(iScreenIndex);
-#ifdef VBOX_WS_WIN
-        /* On Windows host window can exceed the available
-         * area in maximized/sticky-borders state: */
-        rect.adjust(-10, -10, 10, 10);
-#endif /* VBOX_WS_WIN */
-        /* Append rectangle: */
-        region += rect;
-    }
-
     /* Adjust position if necessary: */
     if (fAdjustPosition)
-        frGeo = VBoxGlobal::normalizeGeometry(frGeo, region);
+        frGeo = VBoxGlobal::normalizeGeometry(frGeo, gpDesktop->overallAvailableRegion());
 
     /* Finally, set the frame geometry: */
     setGeometry(frGeo.left() + dl, frGeo.top() + dt,
                 frGeo.width() - dl - dr, frGeo.height() - dt - db);
 #else /* VBOX_GUI_WITH_CUSTOMIZATIONS1 */
     /* Customer request: There should no be
-     * machine-window resize on machine-view resize: */
+     * machine-window resize/move on machine-view resize: */
     Q_UNUSED(fAdjustPosition);
 #endif /* VBOX_GUI_WITH_CUSTOMIZATIONS1 */
 }
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.h b/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.h
index 463a7c2..1d9273b 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -44,11 +44,6 @@ protected:
 
 private slots:
 
-#ifdef VBOX_WS_X11
-    /** X11: Performs machine-window async geometry normalization. */
-    void sltNormalizeGeometry() { normalizeGeometry(true /* adjust position */); }
-#endif /* VBOX_WS_X11 */
-
     /** Handles machine state change event. */
     void sltMachineStateChanged();
     /** Handles medium change event. */
@@ -112,9 +107,12 @@ private:
     /** Updates visibility according to visual-state. */
     void showInNecessaryMode();
 
+    /** Restores cached window geometry. */
+    virtual void restoreCachedGeometry() /* override */;
+
     /** Performs window geometry normalization according to guest-size and host's available geometry.
       * @param  fAdjustPosition  Determines whether is it necessary to adjust position as well. */
-    void normalizeGeometry(bool fAdjustPosition);
+    virtual void normalizeGeometry(bool fAdjustPosition) /* override */;
 
     /** Common update routine. */
     void updateAppearanceOf(int aElement);
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIKeyboardHandlerScale.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIKeyboardHandlerScale.cpp
index aa6ad91..4503e85 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIKeyboardHandlerScale.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIKeyboardHandlerScale.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2014 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIKeyboardHandlerScale.h b/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIKeyboardHandlerScale.h
index 37f56fe..8010f1f 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIKeyboardHandlerScale.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIKeyboardHandlerScale.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2014 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineLogicScale.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineLogicScale.cpp
index 01092df..de5673d 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineLogicScale.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineLogicScale.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2013 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -26,6 +26,7 @@
 
 /* GUI includes: */
 # include "VBoxGlobal.h"
+# include "UIDesktopWidgetWatchdog.h"
 # include "UIMessageCenter.h"
 # include "UISession.h"
 # include "UIActionPoolRuntime.h"
@@ -74,6 +75,22 @@ void UIMachineLogicScale::sltInvokePopupMenu()
 }
 #endif /* !VBOX_WS_MAC */
 
+void UIMachineLogicScale::sltHostScreenAvailableAreaChange()
+{
+#if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000
+    /* Prevent handling if fake screen detected: */
+    if (gpDesktop->isFakeScreenDetected())
+        return;
+
+    /* Make sure all machine-window(s) have previous but normalized geometry: */
+    foreach (UIMachineWindow *pMachineWindow, machineWindows())
+        pMachineWindow->restoreCachedGeometry();
+#endif /* VBOX_WS_X11 && QT_VERSION >= 0x050000 */
+
+    /* Call to base-class: */
+    UIMachineLogic::sltHostScreenAvailableAreaChange();
+}
+
 void UIMachineLogicScale::prepareActionGroups()
 {
     /* Call to base-class: */
@@ -119,7 +136,7 @@ void UIMachineLogicScale::prepareMachineWindows()
     if (isMachineWindowsCreated())
         return;
 
-#ifdef VBOX_WS_MAC // TODO: Is that really need here?
+#ifdef VBOX_WS_MAC /// @todo Is that really need here?
     /* We have to make sure that we are getting the front most process.
      * This is necessary for Qt versions > 4.3.3: */
     ::darwinSetFrontMostProcess();
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineLogicScale.h b/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineLogicScale.h
index c1ccdea..5668f1c 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineLogicScale.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineLogicScale.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2013 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -37,13 +37,16 @@ protected:
     /** Returns machine-window flags for 'Scale' machine-logic and passed @a uScreenId. */
     virtual Qt::WindowFlags windowFlags(ulong uScreenId) const { Q_UNUSED(uScreenId); return Qt::Window; }
 
-#ifndef RT_OS_DARWIN
 private slots:
 
+#ifndef RT_OS_DARWIN
     /** Invokes popup-menu. */
     void sltInvokePopupMenu();
 #endif /* !RT_OS_DARWIN */
 
+    /** Handles host-screen available-area change. */
+    virtual void sltHostScreenAvailableAreaChange() /* override */;
+
 private:
 
     /* Prepare helpers: */
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.cpp
index 2761447..c1a9479 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2012 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,15 +29,17 @@
 # include "UIMachineLogic.h"
 # include "UIMachineWindow.h"
 # include "UIMachineViewScale.h"
-# include "UIExtraDataManager.h"
 # include "UIFrameBuffer.h"
+# include "UIExtraDataManager.h"
+# include "UIDesktopWidgetWatchdog.h"
 
 /* COM includes: */
 # include "CConsole.h"
 # include "CDisplay.h"
 
 /* Other VBox includes: */
-#include <VBox/VBoxOGL.h>
+# include "VBox/log.h"
+# include <VBox/VBoxOGL.h>
 
 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
 
@@ -167,7 +169,7 @@ QSize UIMachineViewScale::sizeHint() const
 
 QRect UIMachineViewScale::workingArea() const
 {
-    return vboxGlobal().availableGeometry(this);
+    return gpDesktop->availableGeometry(this);
 }
 
 QSize UIMachineViewScale::calculateMaxGuestSize() const
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.h b/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.h
index 1ad5f5f..47e997f 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2011 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.cpp
index 9e8a782..5c63d70 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2012 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -27,6 +27,7 @@
 
 /* GUI includes: */
 # include "VBoxGlobal.h"
+# include "UIDesktopWidgetWatchdog.h"
 # include "UIExtraDataManager.h"
 # include "UISession.h"
 # include "UIMachineLogic.h"
@@ -111,8 +112,8 @@ void UIMachineWindowScale::loadSettings()
         else
         {
             /* Get available geometry, for screen with (x,y) coords if possible: */
-            QRect availableGeo = !geo.isNull() ? vboxGlobal().availableGeometry(QPoint(geo.x(), geo.y())) :
-                                                 vboxGlobal().availableGeometry(this);
+            QRect availableGeo = !geo.isNull() ? gpDesktop->availableGeometry(QPoint(geo.x(), geo.y())) :
+                                                 gpDesktop->availableGeometry(this);
 
             /* Resize to default size: */
             resize(640, 480);
@@ -121,6 +122,13 @@ void UIMachineWindowScale::loadSettings()
             m_normalGeometry.moveCenter(availableGeo.center());
             setGeometry(m_normalGeometry);
         }
+
+        /* Normalize to the optimal size: */
+#ifdef VBOX_WS_X11
+        QTimer::singleShot(0, this, SLOT(sltNormalizeGeometry()));
+#else /* !VBOX_WS_X11 */
+        normalizeGeometry(true /* adjust position */);
+#endif /* !VBOX_WS_X11 */
     }
 }
 
@@ -163,12 +171,57 @@ void UIMachineWindowScale::showInNecessaryMode()
     m_pMachineView->setFocus();
 }
 
+void UIMachineWindowScale::restoreCachedGeometry()
+{
+    /* Restore the geometry cached by the window: */
+    resize(m_normalGeometry.size());
+    move(m_normalGeometry.topLeft());
+
+    /* Adjust machine-view accordingly: */
+    adjustMachineViewSize();
+}
+
+void UIMachineWindowScale::normalizeGeometry(bool fAdjustPosition)
+{
+#ifndef VBOX_GUI_WITH_CUSTOMIZATIONS1
+    /* Skip if maximized: */
+    if (isMaximized())
+        return;
+
+    /* Calculate client window offsets: */
+    QRect frGeo = frameGeometry();
+    const QRect geo = geometry();
+    const int dl = geo.left() - frGeo.left();
+    const int dt = geo.top() - frGeo.top();
+    const int dr = frGeo.right() - geo.right();
+    const int db = frGeo.bottom() - geo.bottom();
+
+    /* Adjust position if necessary: */
+    if (fAdjustPosition)
+        frGeo = VBoxGlobal::normalizeGeometry(frGeo, gpDesktop->overallAvailableRegion());
+
+    /* Finally, set the frame geometry: */
+    setGeometry(frGeo.left() + dl, frGeo.top() + dt,
+                frGeo.width() - dl - dr, frGeo.height() - dt - db);
+#else /* VBOX_GUI_WITH_CUSTOMIZATIONS1 */
+    /* Customer request: There should no be
+     * machine-window resize/move on machine-view resize: */
+    Q_UNUSED(fAdjustPosition);
+#endif /* VBOX_GUI_WITH_CUSTOMIZATIONS1 */
+}
+
 bool UIMachineWindowScale::event(QEvent *pEvent)
 {
     switch (pEvent->type())
     {
         case QEvent::Resize:
         {
+#if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000
+            /* Prevent handling if fake screen detected: */
+            if (gpDesktop->isFakeScreenDetected())
+                break;
+#endif /* VBOX_WS_X11 && QT_VERSION >= 0x050000 */
+
             QResizeEvent *pResizeEvent = static_cast<QResizeEvent*>(pEvent);
             if (!isMaximizedChecked())
             {
@@ -182,6 +235,12 @@ bool UIMachineWindowScale::event(QEvent *pEvent)
         }
         case QEvent::Move:
         {
+#if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000
+            /* Prevent handling if fake screen detected: */
+            if (gpDesktop->isFakeScreenDetected())
+                break;
+#endif /* VBOX_WS_X11 && QT_VERSION >= 0x050000 */
+
             if (!isMaximizedChecked())
             {
                 m_normalGeometry.moveTo(geometry().x(), geometry().y());
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.h b/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.h
index cf26a56..dc35393 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -53,6 +53,13 @@ private:
     /** Updates visibility according to visual-state. */
     void showInNecessaryMode();
 
+    /** Restores cached window geometry. */
+    virtual void restoreCachedGeometry() /* override */;
+
+    /** Performs window geometry normalization according to guest-size and host's available geometry.
+      * @param  fAdjustPosition  Determines whether is it necessary to adjust position as well. */
+    virtual void normalizeGeometry(bool fAdjustPosition) /* override */;
+
     /** Common @a pEvent handler. */
     bool event(QEvent *pEvent);
 #ifdef VBOX_WS_WIN
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIKeyboardHandlerSeamless.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIKeyboardHandlerSeamless.cpp
index d71e012..edf08fe 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIKeyboardHandlerSeamless.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIKeyboardHandlerSeamless.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2014 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIKeyboardHandlerSeamless.h b/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIKeyboardHandlerSeamless.h
index 533473e..5f78c5a 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIKeyboardHandlerSeamless.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIKeyboardHandlerSeamless.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2014 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp
index 212c8a3..9624db4 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2013 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.h b/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.h
index 3b0856b..4504f4f 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2013 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp
index 775fb43..b71cbe0 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2012 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -28,18 +28,21 @@
 # endif /* VBOX_WS_MAC */
 
 /* GUI includes: */
-# include "VBoxGlobal.h"
 # include "UISession.h"
 # include "UIMachineLogicSeamless.h"
 # include "UIMachineWindow.h"
 # include "UIMachineViewSeamless.h"
 # include "UIFrameBuffer.h"
 # include "UIExtraDataManager.h"
+# include "UIDesktopWidgetWatchdog.h"
 
 /* COM includes: */
 # include "CConsole.h"
 # include "CDisplay.h"
 
+/* Other VBox includes: */
+# include "VBox/log.h"
+
 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
 
 /* External includes: */
@@ -216,7 +219,7 @@ QRect UIMachineViewSeamless::workingArea() const
     /* Get corresponding screen: */
     int iScreen = static_cast<UIMachineLogicSeamless*>(machineLogic())->hostScreenForGuestScreen(screenId());
     /* Return available geometry for that screen: */
-    return vboxGlobal().availableGeometry(iScreen);
+    return gpDesktop->availableGeometry(iScreen);
 }
 
 QSize UIMachineViewSeamless::calculateMaxGuestSize() const
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.h b/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.h
index 10e65ee..a8969fc 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2013 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp
index 601df3e..2cf80bb 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -25,6 +25,7 @@
 
 /* GUI includes: */
 # include "VBoxGlobal.h"
+# include "UIDesktopWidgetWatchdog.h"
 # include "UIExtraDataManager.h"
 # include "UISession.h"
 # include "UIActionPoolRuntime.h"
@@ -173,7 +174,7 @@ void UIMachineWindowSeamless::placeOnScreen()
     /* Get corresponding host-screen: */
     const int iHostScreen = qobject_cast<UIMachineLogicSeamless*>(machineLogic())->hostScreenForGuestScreen(m_uScreenId);
     /* And corresponding working area: */
-    const QRect workingArea = vboxGlobal().availableGeometry(iHostScreen);
+    const QRect workingArea = gpDesktop->availableGeometry(iHostScreen);
 
     /* Set appropriate geometry for window: */
     resize(workingArea.size());
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.h b/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.h
index 024925f..0f89942 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.cpp b/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.cpp
index c61847b..eea41bf 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2014 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.h b/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.h
index afd9af5..4d1d9f1 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.h
+++ b/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2014 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp b/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp
index f331940..2bd0537 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -63,6 +63,7 @@
 # include "UIGDetails.h"
 # include "UIVMItem.h"
 # include "UIExtraDataManager.h"
+# include "UIDesktopWidgetWatchdog.h"
 # include "VBoxGlobal.h"
 # ifdef VBOX_WS_MAC
 #  include "VBoxUtils.h"
@@ -134,6 +135,24 @@ UISelectorWindow::~UISelectorWindow()
     m_spInstance = 0;
 }
 
+bool UISelectorWindow::shouldBeMaximized() const
+{
+    return gEDataManager->selectorWindowShouldBeMaximized();
+}
+
+#if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000
+void UISelectorWindow::sltHandleHostScreenAvailableAreaChange()
+{
+    /* Prevent handling if fake screen detected: */
+    if (gpDesktop->isFakeScreenDetected())
+        return;
+
+    /* Restore the geometry cached by the window: */
+    resize(m_geometry.size());
+    move(m_geometry.topLeft());
+}
+#endif /* VBOX_WS_X11 && QT_VERSION >= 0x050000 */
+
 void UISelectorWindow::sltShowSelectorWindowContextMenu(const QPoint &position)
 {
     /* Populate toolbar/statusbar acctions: */
@@ -313,7 +332,7 @@ void UISelectorWindow::sltHandleMediumEnumerationFinish()
 void UISelectorWindow::sltOpenUrls(QList<QUrl> list /* = QList<QUrl>() */)
 {
     /* Make sure any pending D&D events are consumed. */
-    // TODO: What? So dangerous method for so cheap purpose?
+    /// @todo What? So dangerous method for so cheap purpose?
     qApp->processEvents();
 
     if (list.isEmpty())
@@ -803,7 +822,7 @@ void UISelectorWindow::sltPerformDetachMachineUI()
         if (!isActionEnabled(UIActionIndexST_M_Machine_M_Close_S_Detach, QList<UIVMItem*>() << pItem))
             continue;
 
-        // TODO: Detach separate UI process..
+        /// @todo Detach separate UI process..
         AssertFailed();
     }
 }
@@ -1065,6 +1084,12 @@ bool UISelectorWindow::event(QEvent *pEvent)
         /* Handle every Resize and Move we keep track of the geometry. */
         case QEvent::Resize:
         {
+#if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000
+            /* Prevent handling if fake screen detected: */
+            if (gpDesktop->isFakeScreenDetected())
+                break;
+#endif /* VBOX_WS_X11 && QT_VERSION >= 0x050000 */
+
             if (isVisible() && (windowState() & (Qt::WindowMaximized | Qt::WindowMinimized | Qt::WindowFullScreen)) == 0)
             {
                 QResizeEvent *pResizeEvent = static_cast<QResizeEvent*>(pEvent);
@@ -1074,6 +1099,12 @@ bool UISelectorWindow::event(QEvent *pEvent)
         }
         case QEvent::Move:
         {
+#if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000
+            /* Prevent handling if fake screen detected: */
+            if (gpDesktop->isFakeScreenDetected())
+                break;
+#endif /* VBOX_WS_X11 && QT_VERSION >= 0x050000 */
+
             if (isVisible() && (windowState() & (Qt::WindowMaximized | Qt::WindowMinimized | Qt::WindowFullScreen)) == 0)
             {
 #ifdef VBOX_WS_MAC
@@ -1107,13 +1138,13 @@ bool UISelectorWindow::event(QEvent *pEvent)
             break;
     }
     /* Call to base-class: */
-    return QMainWindow::event(pEvent);
+    return QIMainWindow::event(pEvent);
 }
 
 void UISelectorWindow::showEvent(QShowEvent *pEvent)
 {
     /* Call to base-class: */
-    QMainWindow::showEvent(pEvent);
+    QIMainWindow::showEvent(pEvent);
 
     /* Is polishing required? */
     if (!m_fPolished)
@@ -1137,12 +1168,12 @@ bool UISelectorWindow::eventFilter(QObject *pObject, QEvent *pEvent)
 {
     /* Ignore for non-active window except for FileOpen event which should be always processed: */
     if (!isActiveWindow() && pEvent->type() != QEvent::FileOpen)
-        return QIWithRetranslateUI<QMainWindow>::eventFilter(pObject, pEvent);
+        return QIWithRetranslateUI<QIMainWindow>::eventFilter(pObject, pEvent);
 
     /* Ignore for other objects: */
     if (qobject_cast<QWidget*>(pObject) &&
         qobject_cast<QWidget*>(pObject)->window() != this)
-        return QIWithRetranslateUI<QMainWindow>::eventFilter(pObject, pEvent);
+        return QIWithRetranslateUI<QIMainWindow>::eventFilter(pObject, pEvent);
 
     /* Which event do we have? */
     switch (pEvent->type())
@@ -1158,7 +1189,7 @@ bool UISelectorWindow::eventFilter(QObject *pObject, QEvent *pEvent)
             break;
     }
     /* Call to base-class: */
-    return QIWithRetranslateUI<QMainWindow>::eventFilter(pObject, pEvent);
+    return QIWithRetranslateUI<QIMainWindow>::eventFilter(pObject, pEvent);
 }
 #endif /* VBOX_WS_MAC */
 
@@ -1338,7 +1369,8 @@ void UISelectorWindow::prepareMenuFile(QMenu *pMenu)
     /* 'Network Access Manager' action goes to 'File' menu: */
     pMenu->addAction(actionPool()->action(UIActionIndex_M_Application_S_NetworkAccessManager));
     /* 'Check for Updates' action goes to 'File' menu: */
-    pMenu->addAction(actionPool()->action(UIActionIndex_M_Application_S_CheckForUpdates));
+    if (gEDataManager->applicationUpdateEnabled())
+        pMenu->addAction(actionPool()->action(UIActionIndex_M_Application_S_CheckForUpdates));
 # endif /* VBOX_GUI_WITH_NETWORK_MANAGER */
     /* 'Reset Warnings' action goes 'File' menu: */
     pMenu->addAction(actionPool()->action(UIActionIndex_M_Application_S_ResetWarnings));
@@ -1693,6 +1725,11 @@ void UISelectorWindow::prepareWidgets()
 
 void UISelectorWindow::prepareConnections()
 {
+#if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000
+    /* Desktop event handlers: */
+    connect(gpDesktop, SIGNAL(sigHostScreenWorkAreaResized(int)), this, SLOT(sltHandleHostScreenAvailableAreaChange()));
+#endif /* VBOX_WS_X11 && QT_VERSION >= 0x050000 */
+
     /* Medium enumeration connections: */
     connect(&vboxGlobal(), SIGNAL(sigMediumEnumerationFinished()), this, SLOT(sltHandleMediumEnumerationFinish()));
 
@@ -1794,18 +1831,11 @@ void UISelectorWindow::loadSettings()
     {
         /* Load geometry: */
         m_geometry = gEDataManager->selectorWindowGeometry(this);
-#ifdef VBOX_WS_MAC
-        move(m_geometry.topLeft());
-        resize(m_geometry.size());
-#else /* VBOX_WS_MAC */
-        setGeometry(m_geometry);
-#endif /* !VBOX_WS_MAC */
-        LogRel2(("GUI: UISelectorWindow: Geometry loaded to: Origin=%dx%d, Size=%dx%d\n",
-                 m_geometry.x(), m_geometry.y(), m_geometry.width(), m_geometry.height()));
 
-        /* Maximize (if necessary): */
-        if (gEDataManager->selectorWindowShouldBeMaximized())
-            showMaximized();
+        /* Restore geometry: */
+        LogRel2(("GUI: UISelectorWindow: Restoring geometry to: Origin=%dx%d, Size=%dx%d\n",
+                 m_geometry.x(), m_geometry.y(), m_geometry.width(), m_geometry.height()));
+        restoreGeometry();
     }
 
     /* Restore splitter handle position: */
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.h b/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.h
index e8dda8f..6c142f0 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.h
+++ b/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -19,10 +19,10 @@
 #define ___UISelectorWindow_h___
 
 /* Qt includes: */
-#include <QMainWindow>
 #include <QUrl>
 
 /* GUI includes: */
+#include "QIMainWindow.h"
 #include "QIWithRetranslateUI.h"
 
 /* Forward declarations: */
@@ -39,9 +39,9 @@ class QISplitter;
 class QMenu;
 class QStackedWidget;
 
-/** Singleton QMainWindow extension
+/** Singleton QIMainWindow extension
   * used as VirtualBox Manager (selector-window) instance. */
-class UISelectorWindow : public QIWithRetranslateUI<QMainWindow>
+class UISelectorWindow : public QIWithRetranslateUI<QIMainWindow>
 {
     Q_OBJECT;
 
@@ -64,8 +64,16 @@ protected:
     /** Destructs selector-window. */
     ~UISelectorWindow();
 
+    /** Returns whether the window should be maximized when geometry being restored. */
+    virtual bool shouldBeMaximized() const /* override */;
+
 private slots:
 
+#if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000
+    /** Handles host-screen available-area change. */
+    void sltHandleHostScreenAvailableAreaChange();
+#endif /* VBOX_WS_X11 && QT_VERSION >= 0x050000 */
+
     /** Handles selector-window context-menu call for passed @a position. */
     void sltShowSelectorWindowContextMenu(const QPoint &position);
 
@@ -303,9 +311,6 @@ private:
     QList<UIAction*> m_machineActions;
     /** Holds the Machine menu parent action. */
     QAction *m_pMachineMenuAction;
-
-    /** Holds the dialog geometry. */
-    QRect m_geometry;
 };
 
 #define gpSelectorWindow UISelectorWindow::instance()
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/UIVMDesktop.cpp b/src/VBox/Frontends/VirtualBox/src/selector/UIVMDesktop.cpp
index 4b3996b..7523a13 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/UIVMDesktop.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/selector/UIVMDesktop.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2013 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/UIVMDesktop.h b/src/VBox/Frontends/VirtualBox/src/selector/UIVMDesktop.h
index 3b3924b..c289843 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/UIVMDesktop.h
+++ b/src/VBox/Frontends/VirtualBox/src/selector/UIVMDesktop.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2010-2013 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/UIVMItem.cpp b/src/VBox/Frontends/VirtualBox/src/selector/UIVMItem.cpp
index 5e3ba2e..a07ab0a 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/UIVMItem.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/selector/UIVMItem.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -353,9 +353,9 @@ bool UIVMItem::switchTo()
         Log(("GUI: Failed to bring %#RX64 to front. rc=%#x\n", id, rc));
     return !rc;
 
-#endif
-
+#else
     return false;
+#endif
 
     /// @todo Below is the old method of switching to the console window
     //  based on the process ID of the console process. It should go away
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/UIVMItem.h b/src/VBox/Frontends/VirtualBox/src/selector/UIVMItem.h
index 28920c9..83ac4af 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/UIVMItem.h
+++ b/src/VBox/Frontends/VirtualBox/src/selector/UIVMItem.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/VBoxSnapshotsWgt.cpp b/src/VBox/Frontends/VirtualBox/src/selector/VBoxSnapshotsWgt.cpp
index f501e73..cb8d42f 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/VBoxSnapshotsWgt.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/selector/VBoxSnapshotsWgt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/VBoxSnapshotsWgt.h b/src/VBox/Frontends/VirtualBox/src/selector/VBoxSnapshotsWgt.h
index 3b303b9..cdcf772 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/VBoxSnapshotsWgt.h
+++ b/src/VBox/Frontends/VirtualBox/src/selector/VBoxSnapshotsWgt.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/VBoxSnapshotsWgt.ui b/src/VBox/Frontends/VirtualBox/src/selector/VBoxSnapshotsWgt.ui
index de1d3ef..8ebf6ca 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/VBoxSnapshotsWgt.ui
+++ b/src/VBox/Frontends/VirtualBox/src/selector/VBoxSnapshotsWgt.ui
@@ -3,7 +3,7 @@
  <comment>
  VBox frontends: Qt4 GUI ("VirtualBox"):
 
- Copyright (C) 2008-2012 Oracle Corporation
+ Copyright (C) 2008-2016 Oracle Corporation
 
  This file is part of VirtualBox Open Source Edition (OSE), as
  available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Audio_old/Makefile.kup b/src/VBox/Frontends/VirtualBox/src/selector/graphics/Makefile.kup
similarity index 100%
copy from src/VBox/Devices/Audio_old/Makefile.kup
copy to src/VBox/Frontends/VirtualBox/src/selector/graphics/Makefile.kup
diff --git a/src/VBox/Devices/Audio_old/Makefile.kup b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/Makefile.kup
similarity index 100%
copy from src/VBox/Devices/Audio_old/Makefile.kup
copy to src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/Makefile.kup
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooser.cpp b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooser.cpp
index 5caa68b..b0e8168 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooser.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooser.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooser.h b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooser.h
index 49bec9d..23be599 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooser.h
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooser.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserHandlerKeyboard.cpp b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserHandlerKeyboard.cpp
index 5b7f52a..4831c3c 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserHandlerKeyboard.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserHandlerKeyboard.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserHandlerKeyboard.h b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserHandlerKeyboard.h
index f6e0469..10f0e0e 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserHandlerKeyboard.h
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserHandlerKeyboard.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserHandlerMouse.cpp b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserHandlerMouse.cpp
index 8cd5d70..abc4e8e 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserHandlerMouse.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserHandlerMouse.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserHandlerMouse.h b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserHandlerMouse.h
index 74bf2a0..72d5704 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserHandlerMouse.h
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserHandlerMouse.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItem.cpp b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItem.cpp
index a16e622..7528c7c 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItem.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItem.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItem.h b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItem.h
index b8f6c4b..cc454a2 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItem.h
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItem.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.cpp b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.cpp
index 64e02e8..f69ed48 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2013 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1337,6 +1337,7 @@ bool UIGChooserItemGroup::isDropAllowed(QGraphicsSceneDragDropEvent *pEvent, Dra
                 /* Make sure there is no other item with such id: */
                 return !isContainsMachine(pItem->toMachineItem()->id());
             }
+            default: break; /* Shut up, MSC! */
         }
     }
     /* That was invalid mime: */
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.h b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.h
index ccc3f7a..b899b50 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.h
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp
index 1007b39..f42cf57 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2013 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1130,6 +1130,7 @@ void UIGChooserItemMachine::prepare()
     /* Other things disabled for now: */
     return;
 
+#if 0 /* disabled for now */
     /* Create tool-bar: */
     m_pToolBar = new UIGraphicsToolBar(this, 2, 2);
 
@@ -1170,6 +1171,7 @@ void UIGChooserItemMachine::prepare()
     connect(m_pCloseButton, SIGNAL(sigButtonClicked()),
             actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_PowerOff), SLOT(trigger()),
             Qt::QueuedConnection);
+#endif /* disabled for now */
 }
 
 /* static */
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.h b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.h
index d7b39b9..dbfab72 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.h
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2013 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp
index 89d8b49..f7f1586 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1386,6 +1386,7 @@ bool UIGChooserModel::eventFilter(QObject *pWatched, QEvent *pEvent)
         /* Drag&drop scroll-event (drag-leave) handler: */
         case QEvent::GraphicsSceneDragLeave:
             return processDragLeaveEvent(static_cast<QGraphicsSceneDragDropEvent*>(pEvent));
+        default: break; /* Shut up MSC */
     }
 
     /* Call to base-class: */
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.h b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.h
index 501f49f..7675f60 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.h
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserView.cpp b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserView.cpp
index b9b9335..2c0d855 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserView.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserView.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2013 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserView.h b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserView.h
index f5a14ad..66f100a 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserView.h
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserView.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Audio_old/Makefile.kup b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/Makefile.kup
similarity index 100%
copy from src/VBox/Devices/Audio_old/Makefile.kup
copy to src/VBox/Frontends/VirtualBox/src/selector/graphics/details/Makefile.kup
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetails.cpp b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetails.cpp
index d41a925..80ae0b7 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetails.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetails.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetails.h b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetails.h
index 3cb2f93..46e5aeb 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetails.h
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetails.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElement.cpp b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElement.cpp
index 5d01348..e1a8d30 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElement.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElement.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElement.h b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElement.h
index 091f927..fb54c9d 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElement.h
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElement.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElements.cpp b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElements.cpp
index 5cf03c5..624a711 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElements.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElements.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElements.h b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElements.h
index 9f989f0..7eb0102 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElements.h
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElements.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsGroup.cpp b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsGroup.cpp
index ce12b1c..9999e06 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsGroup.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsGroup.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsGroup.h b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsGroup.h
index c1bf8d6..3ab0542 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsGroup.h
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsGroup.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsItem.cpp b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsItem.cpp
index 4f0e22c..b4155e7 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsItem.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsItem.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2013 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsItem.h b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsItem.h
index 9422d39..51d6ff9 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsItem.h
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsItem.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2013 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsModel.cpp b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsModel.cpp
index 7f7f101..be39de2 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsModel.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsModel.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsModel.h b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsModel.h
index a615e1c..380d3f0 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsModel.h
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsModel.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsSet.cpp b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsSet.cpp
index da7ef57..ae8b40d 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsSet.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsSet.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -381,7 +381,7 @@ int UIGDetailsSet::minimumWidthHint() const
             case DetailsElementType_Serial:
 #ifdef VBOX_WITH_PARALLEL_PORTS
             case DetailsElementType_Parallel:
-#endif /* VBOX_WITH_PARALLEL_PORTS */
+#endif
             case DetailsElementType_USB:
             case DetailsElementType_SF:
             case DetailsElementType_UI:
@@ -400,6 +400,7 @@ int UIGDetailsSet::minimumWidthHint() const
                 iMinimumWidthHint = qMax(iMinimumWidthHint, iFirstColumnWidth + iSpacing + pItem->minimumWidthHint());
                 break;
             }
+            case DetailsElementType_Invalid: AssertFailed(); break; /* Shut up, MSC! */
         }
     }
 
@@ -441,7 +442,7 @@ int UIGDetailsSet::minimumHeightHint() const
             case DetailsElementType_Serial:
 #ifdef VBOX_WITH_PARALLEL_PORTS
             case DetailsElementType_Parallel:
-#endif /* VBOX_WITH_PARALLEL_PORTS */
+#endif
             case DetailsElementType_USB:
             case DetailsElementType_SF:
             case DetailsElementType_UI:
@@ -455,6 +456,7 @@ int UIGDetailsSet::minimumHeightHint() const
                 iMinimumHeightHint = qMax(iMinimumHeightHint, pItem->minimumHeightHint() + iSpacing);
                 break;
             }
+            case DetailsElementType_Invalid: AssertFailed(); break; /* Shut up, MSC! */
         }
     }
 
@@ -496,7 +498,7 @@ void UIGDetailsSet::updateLayout()
             case DetailsElementType_Serial:
 #ifdef VBOX_WITH_PARALLEL_PORTS
             case DetailsElementType_Parallel:
-#endif /* VBOX_WITH_PARALLEL_PORTS */
+#endif
             case DetailsElementType_USB:
             case DetailsElementType_SF:
             case DetailsElementType_UI:
@@ -546,6 +548,7 @@ void UIGDetailsSet::updateLayout()
                 iVerticalIndent = qMax(iVerticalIndent, iHeight + iSpacing);
                 break;
             }
+            case DetailsElementType_Invalid: AssertFailed(); break; /* Shut up, MSC! */
         }
     }
 }
@@ -585,11 +588,12 @@ UIGDetailsElement* UIGDetailsSet::createElement(DetailsElementType elementType,
         case DetailsElementType_Serial:      return new UIGDetailsElementSerial(this, fOpen);
 #ifdef VBOX_WITH_PARALLEL_PORTS
         case DetailsElementType_Parallel:    return new UIGDetailsElementParallel(this, fOpen);
-#endif /* VBOX_WITH_PARALLEL_PORTS */
+#endif
         case DetailsElementType_USB:         return new UIGDetailsElementUSB(this, fOpen);
         case DetailsElementType_SF:          return new UIGDetailsElementSF(this, fOpen);
         case DetailsElementType_UI:          return new UIGDetailsElementUI(this, fOpen);
         case DetailsElementType_Description: return new UIGDetailsElementDescription(this, fOpen);
+        case DetailsElementType_Invalid:     AssertFailed(); break; /* Shut up, MSC! */
     }
     return 0;
 }
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsSet.h b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsSet.h
index 35e5562..1839e8a 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsSet.h
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsSet.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsView.cpp b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsView.cpp
index 5b111ad..7ca3bd4 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsView.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsView.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2013 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsView.h b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsView.h
index bc9cd2a..a6ace6f 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsView.h
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsView.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGMachinePreview.cpp b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGMachinePreview.cpp
index 90ae4a1..55b736b 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGMachinePreview.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGMachinePreview.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2013 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGMachinePreview.h b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGMachinePreview.h
index ee66346..19c9e76 100644
--- a/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGMachinePreview.h
+++ b/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGMachinePreview.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2013 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDefs.cpp b/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDefs.cpp
index 6ea778b..4861844 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDefs.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDefs.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2014 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDefs.h b/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDefs.h
index 57b0798..8aea44b 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDefs.h
+++ b/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDefs.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2014 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -56,6 +56,8 @@ public:
     /* Creates empty cache item: */
     UISettingsCache() { m_value = qMakePair(CacheData(), CacheData()); }
 
+    virtual ~UISettingsCache() { /* Makes MSC happy */ }
+
     /* Returns the NON-modifiable REFERENCE to the initial cached data: */
     const CacheData& base() const { return m_value.first; }
     /* Returns the NON-modifiable REFERENCE to the current cached data: */
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.cpp b/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.cpp
index 27ad9b2..2bed6c5 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -705,7 +705,7 @@ void UISettingsDialog::assignValidator(UISettingsPage *pPage)
     pPage->setValidator(pValidator);
     m_pWarningPane->registerValidator(pValidator);
 
-    // TODO: Why here?
+    /// @todo Why here?
     /* Configure navigation (tab-order): */
     pPage->setOrderAfter(m_pSelector->widget());
 }
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.h b/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.h
index 6d256e1..92090df 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.h
+++ b/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.ui b/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.ui
index d2fe3b3..ccb867d 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.ui
+++ b/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.ui
@@ -2,7 +2,7 @@
  <comment>
  VBox frontends: Qt4 GUI ("VirtualBox"):
 
- Copyright (C) 2008-2012 Oracle Corporation
+ Copyright (C) 2008-2016 Oracle Corporation
 
  This file is part of VirtualBox Open Source Edition (OSE), as
  available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp b/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp
index 2b816a0..105a0fe 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.h b/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.h
index d86b6a8..9ecf29a 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.h
+++ b/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/UISettingsPage.cpp b/src/VBox/Frontends/VirtualBox/src/settings/UISettingsPage.cpp
index 91873c5..2b75321 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/UISettingsPage.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/settings/UISettingsPage.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/UISettingsPage.h b/src/VBox/Frontends/VirtualBox/src/settings/UISettingsPage.h
index 9e27b91..3d50c82 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/UISettingsPage.h
+++ b/src/VBox/Frontends/VirtualBox/src/settings/UISettingsPage.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/UISettingsSerializer.cpp b/src/VBox/Frontends/VirtualBox/src/settings/UISettingsSerializer.cpp
index e846685..cdbc4d8 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/UISettingsSerializer.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/settings/UISettingsSerializer.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/UISettingsSerializer.h b/src/VBox/Frontends/VirtualBox/src/settings/UISettingsSerializer.h
index a120cd1..2877d2d 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/UISettingsSerializer.h
+++ b/src/VBox/Frontends/VirtualBox/src/settings/UISettingsSerializer.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/VBoxSettingsSelector.cpp b/src/VBox/Frontends/VirtualBox/src/settings/VBoxSettingsSelector.cpp
index 2f23588..5f435f3 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/VBoxSettingsSelector.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/settings/VBoxSettingsSelector.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2012 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/VBoxSettingsSelector.h b/src/VBox/Frontends/VirtualBox/src/settings/VBoxSettingsSelector.h
index bddf24b..69b17b4 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/VBoxSettingsSelector.h
+++ b/src/VBox/Frontends/VirtualBox/src/settings/VBoxSettingsSelector.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2010 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsDisplay.cpp b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsDisplay.cpp
index c5e03d3..34a8320 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsDisplay.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsDisplay.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2013 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsDisplay.h b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsDisplay.h
index 5f7e1f6..c96e972 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsDisplay.h
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsDisplay.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2013 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsDisplay.ui b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsDisplay.ui
index b126094..0f09dc6 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsDisplay.ui
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsDisplay.ui
@@ -2,7 +2,7 @@
  <comment>
  VBox frontends: Qt4 GUI ("VirtualBox"):
 
- Copyright (C) 2012-2013 Oracle Corporation
+ Copyright (C) 2012-2016 Oracle Corporation
 
  This file is part of VirtualBox Open Source Edition (OSE), as
  available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.cpp b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.cpp
index d010f8a..4aa9007 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2012 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.h b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.h
index 7ca13c4..243fd2d 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.h
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2012 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.ui b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.ui
index f1756df..f9fdd2d 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.ui
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.ui
@@ -2,7 +2,7 @@
  <comment>
  VBox frontends: Qt4 GUI ("VirtualBox"):
 
- Copyright (C) 2010-2013 Oracle Corporation
+ Copyright (C) 2010-2016 Oracle Corporation
 
  This file is part of VirtualBox Open Source Edition (OSE), as
  available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.cpp b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.cpp
index 9d77b80..b07c653 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.h b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.h
index bf00550..90ba9a6 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.h
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.ui b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.ui
index 210a129..832f883 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.ui
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.ui
@@ -2,7 +2,7 @@
  <comment>
  VBox frontends: Qt4 GUI ("VirtualBox"):
 
- Copyright (C) 2008-2012 Oracle Corporation
+ Copyright (C) 2008-2016 Oracle Corporation
 
  This file is part of VirtualBox Open Source Edition (OSE), as
  available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.cpp b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.cpp
index d37a321..0a5661d 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.h b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.h
index 6c2a84f..dc4a447 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.h
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.ui b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.ui
index 5deb837..dfbcb6a 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.ui
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.ui
@@ -2,7 +2,7 @@
  <comment>
  VBox frontends: Qt4 GUI ("VirtualBox"):
 
- Copyright (C) 2008-2013 Oracle Corporation
+ Copyright (C) 2008-2016 Oracle Corporation
 
  This file is part of VirtualBox Open Source Edition (OSE), as
  available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsLanguage.cpp b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsLanguage.cpp
index ea8824c..3b9dcde 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsLanguage.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsLanguage.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsLanguage.h b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsLanguage.h
index 0f44d55..385683a 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsLanguage.h
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsLanguage.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsLanguage.ui b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsLanguage.ui
index bd7a8f0..108c9fb 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsLanguage.ui
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsLanguage.ui
@@ -2,7 +2,7 @@
  <comment>
  VBox frontends: Qt4 GUI ("VirtualBox"):
 
- Copyright (C) 2008-2012 Oracle Corporation
+ Copyright (C) 2008-2016 Oracle Corporation
 
  This file is part of VirtualBox Open Source Edition (OSE), as
  available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetwork.cpp b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetwork.cpp
index ef27122..2183816 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetwork.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetwork.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2013 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetwork.h b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetwork.h
index 8a8c8c0..32f8472 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetwork.h
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetwork.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2013 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetwork.ui b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetwork.ui
index 9435234..1c538da 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetwork.ui
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetwork.ui
@@ -2,7 +2,7 @@
  <comment>
  VBox frontends: Qt4 GUI ("VirtualBox"):
 
- Copyright (C) 2009-2013 Oracle Corporation
+ Copyright (C) 2009-2016 Oracle Corporation
 
  This file is part of VirtualBox Open Source Edition (OSE), as
  available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetworkDetailsHost.cpp b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetworkDetailsHost.cpp
index 946241f..0840670 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetworkDetailsHost.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetworkDetailsHost.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2013 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetworkDetailsHost.h b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetworkDetailsHost.h
index 351485e..2c633cf 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetworkDetailsHost.h
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetworkDetailsHost.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2013 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetworkDetailsHost.ui b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetworkDetailsHost.ui
index dc5236b..4e97b3a 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetworkDetailsHost.ui
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetworkDetailsHost.ui
@@ -2,7 +2,7 @@
  <comment>
  VBox frontends: Qt4 GUI ("VirtualBox"):
 
- Copyright (C) 2009-2012 Oracle Corporation
+ Copyright (C) 2009-2016 Oracle Corporation
 
  This file is part of VirtualBox Open Source Edition (OSE), as
  available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetworkDetailsNAT.cpp b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetworkDetailsNAT.cpp
index f532813..ffffeae 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetworkDetailsNAT.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetworkDetailsNAT.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2013 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetworkDetailsNAT.h b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetworkDetailsNAT.h
index 85a1524..5e68e82 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetworkDetailsNAT.h
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetworkDetailsNAT.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2013 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetworkDetailsNAT.ui b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetworkDetailsNAT.ui
index e8abec1..2d1b356 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetworkDetailsNAT.ui
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetworkDetailsNAT.ui
@@ -2,7 +2,7 @@
  <comment>
  VBox frontends: Qt4 GUI ("VirtualBox"):
 
- Copyright (C) 2009-2013 Oracle Corporation
+ Copyright (C) 2009-2016 Oracle Corporation
 
  This file is part of VirtualBox Open Source Edition (OSE), as
  available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsPortForwardingDlg.cpp b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsPortForwardingDlg.cpp
index 81e396a..9c4ccea 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsPortForwardingDlg.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsPortForwardingDlg.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2013 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsPortForwardingDlg.h b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsPortForwardingDlg.h
index ebc9a23..17ed629 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsPortForwardingDlg.h
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsPortForwardingDlg.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2013 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.cpp b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.cpp
index 6306986..80d4109 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2012 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.h b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.h
index 5912726..7088982 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.h
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2012 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.ui b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.ui
index f923309..51ea7c2 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.ui
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.ui
@@ -2,7 +2,7 @@
  <comment>
  VBox frontends: Qt4 GUI ("VirtualBox"):
 
- Copyright (C) 2011-2013 Oracle Corporation
+ Copyright (C) 2011-2016 Oracle Corporation
 
  This file is part of VirtualBox Open Source Edition (OSE), as
  available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsUpdate.cpp b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsUpdate.cpp
index d2a1b5b..a0a7ce1 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsUpdate.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsUpdate.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsUpdate.h b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsUpdate.h
index 137e100..b756c7f 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsUpdate.h
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsUpdate.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsUpdate.ui b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsUpdate.ui
index a0e776a..2838f7a 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsUpdate.ui
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsUpdate.ui
@@ -2,7 +2,7 @@
  <comment>
  VBox frontends: Qt4 GUI ("VirtualBox"):
 
- Copyright (C) 2008-2013 Oracle Corporation
+ Copyright (C) 2008-2016 Oracle Corporation
 
  This file is part of VirtualBox Open Source Edition (OSE), as
  available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.cpp b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.cpp
index 4849fd8..58579bc 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.cpp
@@ -152,15 +152,15 @@ void UIMachineSettingsAudio::retranslateUi()
 # endif /* VBOX_WITH_WINMM */
 #endif /* Q_OS_WIN */
 
-#ifdef VBOX_WITH_OSS
+#ifdef VBOX_WITH_AUDIO_OSS
     m_pComboAudioDriver->setItemText(++iIndex, gpConverter->toString(KAudioDriverType_OSS));
 #endif
 
-#ifdef VBOX_WITH_ALSA
+#ifdef VBOX_WITH_AUDIO_ALSA
     m_pComboAudioDriver->setItemText(++iIndex, gpConverter->toString(KAudioDriverType_ALSA));
 #endif
 
-#ifdef VBOX_WITH_PULSE
+#ifdef VBOX_WITH_AUDIO_PULSE
     m_pComboAudioDriver->setItemText(++iIndex, gpConverter->toString(KAudioDriverType_Pulse));
 #endif
 
@@ -211,15 +211,15 @@ void UIMachineSettingsAudio::prepareComboboxes()
     m_pComboAudioDriver->insertItem(++iIndex, "", KAudioDriverType_WinMM);
 # endif /* VBOX_WITH_WINMM */
 #endif /* Q_OS_WIN */
-#ifdef VBOX_WITH_OSS
+#ifdef VBOX_WITH_AUDIO_OSS
     m_pComboAudioDriver->insertItem(++iIndex, "", KAudioDriverType_OSS);
 #endif
-#ifdef VBOX_WITH_ALSA
+#ifdef VBOX_WITH_AUDIO_ALSA
     m_pComboAudioDriver->insertItem(++iIndex, "", KAudioDriverType_ALSA);
-#endif /* VBOX_WITH_ALSA */
-#ifdef VBOX_WITH_PULSE
+#endif /* VBOX_WITH_AUDIO_ALSA */
+#ifdef VBOX_WITH_AUDIO_PULSE
     m_pComboAudioDriver->insertItem(++iIndex, "", KAudioDriverType_Pulse);
-#endif /* VBOX_WITH_PULSE */
+#endif /* VBOX_WITH_AUDIO_PULSE */
 #ifdef Q_OS_MACX
     m_pComboAudioDriver->insertItem(++iIndex, "", KAudioDriverType_CoreAudio);
 #endif /* Q_OS_MACX */
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.h b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.h
index 1c199cd..a12b595 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.h
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.ui b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.ui
index 70a4d0c..95f149a 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.ui
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.ui
@@ -2,7 +2,7 @@
  <comment>
  VBox frontends: Qt4 GUI ("VirtualBox"):
 
- Copyright (C) 2008-2013 Oracle Corporation
+ Copyright (C) 2008-2016 Oracle Corporation
 
  This file is part of VirtualBox Open Source Edition (OSE), as
  available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp
index aa7b990..54bea0e 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -22,6 +22,7 @@
 /* GUI includes: */
 # include "QIWidgetValidator.h"
 # include "UIMachineSettingsDisplay.h"
+# include "UIDesktopWidgetWatchdog.h"
 # include "UIExtraDataManager.h"
 # include "UIConverter.h"
 # include "VBoxGlobal.h"
@@ -762,7 +763,7 @@ void UIMachineSettingsDisplay::prepareScreenTab()
     m_iMinVRAM = sys.GetMinGuestVRAM();
     m_iMaxVRAM = sys.GetMaxGuestVRAM();
     m_iMaxVRAMVisible = m_iMaxVRAM;
-    const uint cHostScreens = vboxGlobal().screenCount();
+    const uint cHostScreens = gpDesktop->screenCount();
     m_pSliderVideoMemorySize->setMinimum(m_iMinVRAM);
     m_pSliderVideoMemorySize->setMaximum(m_iMaxVRAMVisible);
     m_pSliderVideoMemorySize->setPageStep(calcPageStep(m_iMaxVRAMVisible));
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.h b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.h
index 65b5e83..7b0e89e 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.h
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2014 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.ui b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.ui
index 5e1a40f..1f6ed9b 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.ui
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.ui
@@ -2,7 +2,7 @@
  <comment>
  VBox frontends: Qt4 GUI ("VirtualBox"):
 
- Copyright (C) 2008-2014 Oracle Corporation
+ Copyright (C) 2008-2016 Oracle Corporation
 
  This file is part of VirtualBox Open Source Edition (OSE), as
  available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.cpp b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.cpp
index 041d48f..37fd216 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.h b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.h
index 5bbe53f..683570a 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.h
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.ui b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.ui
index 346c9a0..b212fdc 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.ui
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.ui
@@ -2,7 +2,7 @@
  <comment>
  VBox frontends: Qt4 GUI ("VirtualBox"):
 
- Copyright (C) 2008-2012 Oracle Corporation
+ Copyright (C) 2008-2016 Oracle Corporation
 
  This file is part of VirtualBox Open Source Edition (OSE), as
  available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsInterface.cpp b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsInterface.cpp
index eed03d5..e07fa46 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsInterface.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsInterface.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsInterface.h b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsInterface.h
index b4f4611..b56e4a2 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsInterface.h
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsInterface.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsInterface.ui b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsInterface.ui
index ce20d61..85cb342 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsInterface.ui
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsInterface.ui
@@ -2,7 +2,7 @@
  <comment>
  VBox frontends: Qt4 GUI ("VirtualBox"):
 
- Copyright (C) 2008-2015 Oracle Corporation
+ Copyright (C) 2008-2016 Oracle Corporation
 
  This file is part of VirtualBox Open Source Edition (OSE), as
  available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp
index 7dc7f43..a63a075 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2013 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.h b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.h
index ad9bc22..54a7ac4 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.h
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2013 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.ui b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.ui
index e6169e6..6dac113 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.ui
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.ui
@@ -2,7 +2,7 @@
  <comment>
  VBox frontends: Qt4 GUI ("VirtualBox"):
 
- Copyright (C) 2008-2012 Oracle Corporation
+ Copyright (C) 2008-2016 Oracle Corporation
 
  This file is part of VirtualBox Open Source Edition (OSE), as
  available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsParallel.cpp b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsParallel.cpp
index fa145b4..e20f219 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsParallel.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsParallel.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsParallel.h b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsParallel.h
index e1b2045..d704179 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsParallel.h
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsParallel.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsParallel.ui b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsParallel.ui
index a9e3920..194a289 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsParallel.ui
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsParallel.ui
@@ -2,7 +2,7 @@
  <comment>
  VBox frontends: Qt4 GUI ("VirtualBox"):
 
- Copyright (C) 2008-2012 Oracle Corporation
+ Copyright (C) 2008-2016 Oracle Corporation
 
  This file is part of VirtualBox Open Source Edition (OSE), as
  available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsPortForwardingDlg.cpp b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsPortForwardingDlg.cpp
index 3c0a4d7..1466c0f 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsPortForwardingDlg.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsPortForwardingDlg.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2013 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsPortForwardingDlg.h b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsPortForwardingDlg.h
index eb5ee0f..8d3d7fe 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsPortForwardingDlg.h
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsPortForwardingDlg.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2013 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.cpp b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.cpp
index b980886..686b0fb 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2012 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.h b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.h
index 439117a..c515917 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.h
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2012 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.ui b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.ui
index 4911610..172b756 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.ui
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.ui
@@ -2,7 +2,7 @@
  <comment>
  VBox frontends: Qt4 GUI ("VirtualBox"):
 
- Copyright (C) 2008-2012 Oracle Corporation
+ Copyright (C) 2008-2016 Oracle Corporation
 
  This file is part of VirtualBox Open Source Edition (OSE), as
  available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSFDetails.cpp b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSFDetails.cpp
index 8e298da..e30b465 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSFDetails.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSFDetails.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2011 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSFDetails.h b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSFDetails.h
index 80c1ef0..e1755eb 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSFDetails.h
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSFDetails.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2011 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSFDetails.ui b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSFDetails.ui
index e895fbc..f3c9ffb 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSFDetails.ui
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSFDetails.ui
@@ -2,7 +2,7 @@
  <comment>
  VBox frontends: Qt4 GUI ("VirtualBox"):
 
- Copyright (C) 2008-2012 Oracle Corporation
+ Copyright (C) 2008-2016 Oracle Corporation
 
  This file is part of VirtualBox Open Source Edition (OSE), as
  available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.cpp b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.cpp
index e934d4f..65ef327 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.h b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.h
index 51c7ee9..b34379e 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.h
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.ui b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.ui
index d48b95b..e6c8131 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.ui
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.ui
@@ -2,7 +2,7 @@
  <comment>
  VBox frontends: Qt4 GUI ("VirtualBox"):
 
- Copyright (C) 2008-2015 Oracle Corporation
+ Copyright (C) 2008-2016 Oracle Corporation
 
  This file is part of VirtualBox Open Source Edition (OSE), as
  available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp
index 5951f0e..6970823 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp
@@ -3414,6 +3414,7 @@ void UIMachineSettingsStorage::addAttachmentWrapper(KDeviceType deviceType)
                 strMediumId = vboxGlobal().openMediumWithFileOpenDialog(UIMediumType_Floppy, this, strMachineFolder);
             break;
         }
+        default: break; /* Shut up, MSC! */
     }
 
     if (!strMediumId.isEmpty())
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.ui b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.ui
index 1111782..b20d8ce 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.ui
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.ui
@@ -2,7 +2,7 @@
  <comment>
  VBox frontends: Qt4 GUI ("VirtualBox"):
 
- Copyright (C) 2009-2012 Oracle Corporation
+ Copyright (C) 2009-2016 Oracle Corporation
 
  This file is part of VirtualBox Open Source Edition (OSE), as
  available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.cpp b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.cpp
index 77051a3..dc09342 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2013 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -623,7 +623,7 @@ void UIMachineSettingsSystem::prepareTabMotherboard()
 #endif /* VBOX_WS_MAC */
     /* Install global event filter
      * to handle boot-table focus in/out events: */
-    // TODO: Get rid of that *crap*!
+    /// @todo Get rid of that *crap*!
     qApp->installEventFilter(this);
 
     /* Populate possible boot items list.
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.h b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.h
index 9598893..2f3b5ac 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.h
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2013 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.ui b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.ui
index 7ca0fbc..93be3ff 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.ui
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.ui
@@ -2,7 +2,7 @@
  <comment>
  VBox frontends: Qt4 GUI ("VirtualBox"):
 
- Copyright (C) 2008-2013 Oracle Corporation
+ Copyright (C) 2008-2016 Oracle Corporation
 
  This file is part of VirtualBox Open Source Edition (OSE), as
  available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.cpp b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.cpp
index 1dcbc9e..b22768c 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.h b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.h
index b8c7c9c..dd4e365 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.h
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.ui b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.ui
index a933209..319cf1a 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.ui
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.ui
@@ -2,7 +2,7 @@
  <comment>
  VBox frontends: Qt4 GUI ("VirtualBox"):
 
- Copyright (C) 2008-2012 Oracle Corporation
+ Copyright (C) 2008-2016 Oracle Corporation
 
  This file is part of VirtualBox Open Source Edition (OSE), as
  available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSBFilterDetails.cpp b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSBFilterDetails.cpp
index c4cb2db..bcc59d2 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSBFilterDetails.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSBFilterDetails.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2012 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSBFilterDetails.h b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSBFilterDetails.h
index 0e7743e..1a1b40b 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSBFilterDetails.h
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSBFilterDetails.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2010 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSBFilterDetails.ui b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSBFilterDetails.ui
index 23a259b..59121c5 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSBFilterDetails.ui
+++ b/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSBFilterDetails.ui
@@ -2,7 +2,7 @@
  <comment>
  VBox frontends: Qt4 GUI ("VirtualBox"):
 
- Copyright (C) 2008-2012 Oracle Corporation
+ Copyright (C) 2008-2016 Oracle Corporation
 
  This file is part of VirtualBox Open Source Edition (OSE), as
  available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.cpp
index 5376609..6edf74d 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -736,7 +736,7 @@ VirtualSystemModel::VirtualSystemModel(QVector<CVirtualSystemDescription>& aVSDs
         VirtualSystemItem *vi = new VirtualSystemItem(a, vs, m_pRootItem);
         m_pRootItem->appendChild(vi);
 
-        /* @todo: ask Dmitry about include/COMDefs.h:232 */
+        /** @todo ask Dmitry about include/COMDefs.h:232 */
         QVector<KVirtualSystemDescriptionType> types;
         QVector<QString> refs;
         QVector<QString> origValues;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.h b/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.h
index 6773ba5..2d232d1 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.ui b/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.ui
index e6d724c..a308788 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.ui
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.ui
@@ -2,7 +2,7 @@
  <comment>
  VBox frontends: Qt4 GUI ("VirtualBox"):
 
- Copyright (C) 2009-2013 Oracle Corporation
+ Copyright (C) 2009-2016 Oracle Corporation
 
  This file is part of VirtualBox Open Source Edition (OSE), as
  available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceExportEditorWidget.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceExportEditorWidget.cpp
index 74044b9..4b36e21 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceExportEditorWidget.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceExportEditorWidget.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceExportEditorWidget.h b/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceExportEditorWidget.h
index 2ac0173..410815c 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceExportEditorWidget.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceExportEditorWidget.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceImportEditorWidget.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceImportEditorWidget.cpp
index 76b46fe..320fe68 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceImportEditorWidget.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceImportEditorWidget.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceImportEditorWidget.h b/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceImportEditorWidget.h
index 5c5070e..391b140 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceImportEditorWidget.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceImportEditorWidget.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIBar.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/UIBar.cpp
index c2c61fe..248cad9 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIBar.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIBar.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2011 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIBar.h b/src/VBox/Frontends/VirtualBox/src/widgets/UIBar.h
index 769e9b4..8db514e 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIBar.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIBar.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2011 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIBootTable.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/UIBootTable.cpp
index d7c7f36..f2c96c1 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIBootTable.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIBootTable.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -40,6 +40,7 @@ UIBootTableItem::UIBootTableItem(KDeviceType type)
         case KDeviceType_DVD:      setIcon(UIIconPool::iconSet(":/cd_16px.png")); break;
         case KDeviceType_HardDisk: setIcon(UIIconPool::iconSet(":/hd_16px.png")); break;
         case KDeviceType_Network:  setIcon(UIIconPool::iconSet(":/nw_16px.png")); break;
+        default: break; /* Shut up, MSC! */
     }
     retranslateUi();
 }
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIBootTable.h b/src/VBox/Frontends/VirtualBox/src/widgets/UIBootTable.h
index 0a113ab..e13e316 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIBootTable.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIBootTable.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIEmptyFilePathSelector.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/UIEmptyFilePathSelector.cpp
index ecda72b..e7a0889 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIEmptyFilePathSelector.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIEmptyFilePathSelector.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2013 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIEmptyFilePathSelector.h b/src/VBox/Frontends/VirtualBox/src/widgets/UIEmptyFilePathSelector.h
index f009742..6b621cb 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIEmptyFilePathSelector.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIEmptyFilePathSelector.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2013 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIFilmContainer.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/UIFilmContainer.cpp
index 3dc7aca..52837dc 100755
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIFilmContainer.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIFilmContainer.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIFilmContainer.h b/src/VBox/Frontends/VirtualBox/src/widgets/UIFilmContainer.h
index ecbb623..d060464 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIFilmContainer.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIFilmContainer.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIHostComboEditor.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/UIHostComboEditor.cpp
index baafe71..4ec030b 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIHostComboEditor.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIHostComboEditor.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -254,13 +254,15 @@ bool UINativeHotKey::isValidKey(int iKeyCode)
 
 #elif defined(VBOX_WS_WIN)
 
-    return ((iKeyCode >= VK_SHIFT && iKeyCode <= VK_CAPITAL) ||
-            (iKeyCode >= VK_LSHIFT && iKeyCode <= VK_RMENU) ||
-            (iKeyCode >= VK_F1 && iKeyCode <= VK_F24) ||
-            iKeyCode == VK_NUMLOCK || iKeyCode == VK_SCROLL ||
-            iKeyCode == VK_LWIN || iKeyCode == VK_RWIN ||
-            iKeyCode == VK_APPS ||
-            iKeyCode == VK_PRINT);
+    return (iKeyCode >= VK_SHIFT  && iKeyCode <= VK_CAPITAL)
+        || (iKeyCode >= VK_LSHIFT && iKeyCode <= VK_RMENU)
+        || (iKeyCode >= VK_F1     && iKeyCode <= VK_F24)
+        || iKeyCode == VK_NUMLOCK
+        || iKeyCode == VK_SCROLL
+        || iKeyCode == VK_LWIN
+        || iKeyCode == VK_RWIN
+        || iKeyCode == VK_APPS
+        || iKeyCode == VK_PRINT;
 
 #elif defined(VBOX_WS_X11)
 
@@ -275,9 +277,8 @@ bool UINativeHotKey::isValidKey(int iKeyCode)
 
 # warning "port me!"
 
-#endif
-
     return false;
+#endif
 }
 
 unsigned UINativeHotKey::modifierToSet1ScanCode(int iKeyCode)
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIHostComboEditor.h b/src/VBox/Frontends/VirtualBox/src/widgets/UIHostComboEditor.h
index 4dda364..871ce07 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIHostComboEditor.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIHostComboEditor.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIHotKeyEditor.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/UIHotKeyEditor.cpp
index f4e96a7..13e10a2 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIHotKeyEditor.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIHotKeyEditor.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIHotKeyEditor.h b/src/VBox/Frontends/VirtualBox/src/widgets/UIHotKeyEditor.h
index d16230e..dae3ad3 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIHotKeyEditor.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIHotKeyEditor.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UILineTextEdit.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/UILineTextEdit.cpp
index 35df22a..45499df 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UILineTextEdit.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UILineTextEdit.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2011 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UILineTextEdit.h b/src/VBox/Frontends/VirtualBox/src/widgets/UILineTextEdit.h
index cfe2c36..2ecdfe0 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UILineTextEdit.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UILineTextEdit.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2011 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIMenuBar.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/UIMenuBar.cpp
index ae313dc..82894de 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIMenuBar.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIMenuBar.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2014 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIMenuBar.h b/src/VBox/Frontends/VirtualBox/src/widgets/UIMenuBar.h
index f2ab95b..c4ee6c0 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIMenuBar.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIMenuBar.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2014 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp
index ee5016b..6c73467 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,6 @@
 # include <QToolButton>
 # include <QStateMachine>
 # include <QPainter>
-# include <QDesktopWidget>
 # ifdef VBOX_WS_WIN
 #  include <QWindow>
 # endif /* VBOX_WS_WIN */
@@ -41,6 +40,7 @@
 # include "UIMiniToolBar.h"
 # include "UIAnimationFramework.h"
 # include "UIIconPool.h"
+# include "UIDesktopWidgetWatchdog.h"
 # include "VBoxGlobal.h"
 # ifdef VBOX_WS_X11
 #  include "UIExtraDataManager.h"
@@ -635,14 +635,14 @@ void UIMiniToolBar::sltAdjust()
     LogRel2(("GUI: UIMiniToolBar::sltAdjust\n"));
 
     /* Get corresponding host-screen: */
-    const int iHostScreen = QApplication::desktop()->screenNumber(parentWidget());
+    const int iHostScreen = gpDesktop->screenNumber(parentWidget());
     Q_UNUSED(iHostScreen);
     /* And corresponding working area: */
     QRect workingArea;
     switch (m_geometryType)
     {
-        case GeometryType_Available: workingArea = vboxGlobal().availableGeometry(iHostScreen); break;
-        case GeometryType_Full:      workingArea = vboxGlobal().screenGeometry(iHostScreen); break;
+        case GeometryType_Available: workingArea = gpDesktop->availableGeometry(iHostScreen); break;
+        case GeometryType_Full:      workingArea = gpDesktop->screenGeometry(iHostScreen); break;
     }
     Q_UNUSED(workingArea);
 
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.h b/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.h
index b7c8cfb..8f60e50 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupBox.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupBox.cpp
index 4228f36..0e9e6a0 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupBox.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupBox.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2012 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupBox.h b/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupBox.h
index 00285d4..91035a8 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupBox.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupBox.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2012 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPane.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPane.cpp
index 32fcacc..38a90f4 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPane.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPane.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPane.h b/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPane.h
index a431f7e..0eb382d 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPane.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPane.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPaneButtonPane.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPaneButtonPane.cpp
index ba375e6..13b1577 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPaneButtonPane.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPaneButtonPane.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPaneButtonPane.h b/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPaneButtonPane.h
index 2ca5859..2067e11 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPaneButtonPane.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPaneButtonPane.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPaneTextPane.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPaneTextPane.cpp
index 6d40565..59c8b62 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPaneTextPane.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPaneTextPane.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPaneTextPane.h b/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPaneTextPane.h
index 61810c9..5617904 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPaneTextPane.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPaneTextPane.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupStack.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupStack.cpp
index 614dfb2..b4eb60a 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupStack.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupStack.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -270,6 +270,7 @@ bool UIPopupStack::eventFilter(QObject *pWatched, QEvent *pEvent)
             sltAdjustGeometry();
             break;
         }
+        default: break; /* Shuts up MSC.  */
     }
 
     /* Call to base-class: */
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupStack.h b/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupStack.h
index 49e985f..e217761 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupStack.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupStack.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupStackViewport.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupStackViewport.cpp
index 9cc23a1..aa3b67b 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupStackViewport.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupStackViewport.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupStackViewport.h b/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupStackViewport.h
index c5d0ba4..9656b36 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupStackViewport.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupStackViewport.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIPortForwardingTable.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/UIPortForwardingTable.cpp
index b9e066a..52eb13c 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIPortForwardingTable.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIPortForwardingTable.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2013 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -493,8 +493,7 @@ bool UIPortForwardingModel::setData(const QModelIndex &index, const QVariant &va
             return true;
         default: return false;
     }
-    /* Return false value: */
-    return false;
+    /* not reached! */
 }
 
 
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIPortForwardingTable.h b/src/VBox/Frontends/VirtualBox/src/widgets/UIPortForwardingTable.h
index 4a207cd..9f4faf9 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIPortForwardingTable.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIPortForwardingTable.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2013 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIProgressDialog.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/UIProgressDialog.cpp
index 88285a6..46550d8 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIProgressDialog.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIProgressDialog.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIProgressDialog.h b/src/VBox/Frontends/VirtualBox/src/widgets/UIProgressDialog.h
index 5183851..9aa1cd7 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIProgressDialog.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIProgressDialog.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2013 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UISpacerWidgets.h b/src/VBox/Frontends/VirtualBox/src/widgets/UISpacerWidgets.h
index 93783d5..89a2817 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UISpacerWidgets.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UISpacerWidgets.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UISpecialControls.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/UISpecialControls.cpp
index 8944096..83a463f 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UISpecialControls.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UISpecialControls.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UISpecialControls.h b/src/VBox/Frontends/VirtualBox/src/widgets/UISpecialControls.h
index be0c3d2..987be1b 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UISpecialControls.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UISpecialControls.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIToolBar.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/UIToolBar.cpp
index b2348b1..89236a4 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIToolBar.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIToolBar.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIToolBar.h b/src/VBox/Frontends/VirtualBox/src/widgets/UIToolBar.h
index 8d058d3..bf6cfd8 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIToolBar.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIToolBar.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIWarningPane.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/UIWarningPane.cpp
index dc46e49..8b9fc40 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIWarningPane.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIWarningPane.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2013 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIWarningPane.h b/src/VBox/Frontends/VirtualBox/src/widgets/UIWarningPane.h
index eb4370d..ec03372 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIWarningPane.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIWarningPane.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2013 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/VBoxGuestRAMSlider.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/VBoxGuestRAMSlider.cpp
index 6e1f6b2..2c98ac3 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/VBoxGuestRAMSlider.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/VBoxGuestRAMSlider.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/VBoxGuestRAMSlider.h b/src/VBox/Frontends/VirtualBox/src/widgets/VBoxGuestRAMSlider.h
index 8b8a3c0..3ed023b 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/VBoxGuestRAMSlider.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/VBoxGuestRAMSlider.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2010 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/VBoxMediaComboBox.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/VBoxMediaComboBox.cpp
index cd2633b..d6402e5 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/VBoxMediaComboBox.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/VBoxMediaComboBox.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/VBoxMediaComboBox.h b/src/VBox/Frontends/VirtualBox/src/widgets/VBoxMediaComboBox.h
index 5ab973e..a2bd5e3 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/VBoxMediaComboBox.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/VBoxMediaComboBox.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/VBoxOSTypeSelectorButton.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/VBoxOSTypeSelectorButton.cpp
index fa00b0f..49678da 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/VBoxOSTypeSelectorButton.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/VBoxOSTypeSelectorButton.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2010 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/VBoxOSTypeSelectorButton.h b/src/VBox/Frontends/VirtualBox/src/widgets/VBoxOSTypeSelectorButton.h
index 9a6e4db..22a07c0 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/VBoxOSTypeSelectorButton.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/VBoxOSTypeSelectorButton.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2010 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsButton.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsButton.cpp
index dc39223..12a1add 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsButton.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsButton.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsButton.h b/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsButton.h
index c689a80..87a0197 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsButton.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsButton.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsRotatorButton.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsRotatorButton.cpp
index 9f0c650..1306f49 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsRotatorButton.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsRotatorButton.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsRotatorButton.h b/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsRotatorButton.h
index 38f6ec0..e9a9198 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsRotatorButton.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsRotatorButton.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsTextPane.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsTextPane.cpp
index 3e77ee1..bb98349 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsTextPane.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsTextPane.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsTextPane.h b/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsTextPane.h
index 8c0b526..05978a3 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsTextPane.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsTextPane.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsToolBar.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsToolBar.cpp
index f6b3b7a..1c4ac0e 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsToolBar.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsToolBar.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsToolBar.h b/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsToolBar.h
index a86f148..5cbc53f 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsToolBar.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsToolBar.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsZoomButton.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsZoomButton.cpp
index 0beea85..aa13766 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsZoomButton.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsZoomButton.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsZoomButton.h b/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsZoomButton.h
index 416651b..73635c4 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsZoomButton.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsZoomButton.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/UIWizard.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/UIWizard.cpp
index e2e5d76..4300581 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/UIWizard.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/UIWizard.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/UIWizard.h b/src/VBox/Frontends/VirtualBox/src/wizards/UIWizard.h
index 5187e50..b394ce7 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/UIWizard.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/UIWizard.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/UIWizardPage.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/UIWizardPage.cpp
index 48acf21..65849f5 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/UIWizardPage.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/UIWizardPage.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/UIWizardPage.h b/src/VBox/Frontends/VirtualBox/src/wizards/UIWizardPage.h
index 73653ac..85bba79 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/UIWizardPage.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/UIWizardPage.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -15,8 +15,8 @@
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
 
-#ifndef __UIWizardPage_h__
-#define __UIWizardPage_h__
+#ifndef ___UIWizardPage_h___
+#define ___UIWizardPage_h___
 
 /* Global includes: */
 #include <QVariant>
@@ -33,6 +33,9 @@ class UIWizardPage;
  * providing API for basic/expert pages. */
 class UIWizardPageBase
 {
+public:
+    virtual ~UIWizardPageBase() { /* Makes MSC happy. */ }
+
 protected:
 
     /* Helpers: */
@@ -73,5 +76,5 @@ protected:
     QString m_strTitle;
 };
 
-#endif // __UIWizardPage_h__
+#endif
 
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVD.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVD.cpp
index 2376f50..d14b44c 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVD.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVD.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVD.h b/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVD.h
index 5646500..4ff8a18 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVD.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVD.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic1.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic1.cpp
index 67d6789..6227374 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic1.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic1.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic1.h b/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic1.h
index fae44c6..f10e9c3 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic1.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic1.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic2.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic2.cpp
index 9b1bbee..29614de 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic2.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic2.h b/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic2.h
index a393e91..30bb80e 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic2.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic2.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic3.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic3.cpp
index 12a66af..7880513 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic3.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic3.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic3.h b/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic3.h
index 7e06b74..97dd79a 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic3.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic3.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic4.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic4.cpp
index 6791eeb..691e470 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic4.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic4.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic4.h b/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic4.h
index 778629d..3428529 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic4.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic4.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageExpert.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageExpert.cpp
index aa4fa9c..3718738 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageExpert.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageExpert.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageExpert.h b/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageExpert.h
index bd9f9e9..607fbca 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageExpert.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageExpert.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVM.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVM.cpp
index c28bbdd..0cd81bd 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVM.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVM.h b/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVM.h
index 6e7f367..82a4bc8 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVM.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVM.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2012 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic1.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic1.cpp
index 57fae62..a1b47ab 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic1.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic1.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2012 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic1.h b/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic1.h
index 9c81aa6..070980c 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic1.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic1.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2012 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic2.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic2.cpp
index 83b87c5..2fbe596 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic2.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2012 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic2.h b/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic2.h
index 8fb0e92..b23774d 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic2.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic2.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2012 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic3.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic3.cpp
index 9f458ca..d6479e4 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic3.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic3.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2012 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -52,6 +52,7 @@ void UIWizardCloneVMPage3::setCloneMode(KCloneMode cloneMode)
         case KCloneMode_MachineState: m_pMachineRadio->setChecked(true); break;
         case KCloneMode_MachineAndChildStates: m_pMachineAndChildsRadio->setChecked(true); break;
         case KCloneMode_AllStates: m_pAllRadio->setChecked(true); break;
+        case KCloneMode_Max: break; /* Shut up, MSC! */
     }
 }
 
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic3.h b/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic3.h
index 3ff3296..aa33ba3 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic3.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic3.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2012 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageExpert.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageExpert.cpp
index 5e10e8f..1f2e7f4 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageExpert.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageExpert.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2013 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageExpert.h b/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageExpert.h
index f13c122..be01efb 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageExpert.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageExpert.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2012 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportApp.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportApp.cpp
index fe2a054..86afffb 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportApp.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportApp.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2013 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportApp.h b/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportApp.h
index eb3e677..4453ceb 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportApp.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportApp.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppDefs.h b/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppDefs.h
index 42b6996..b24eb9e 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppDefs.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppDefs.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic1.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic1.cpp
index 0fea7ba..350d488 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic1.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic1.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic1.h b/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic1.h
index 6fc362c..f42f073 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic1.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic1.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic2.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic2.cpp
index 156c860..f5efab9 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic2.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic2.h b/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic2.h
index 29d9d04..a7d6090 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic2.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic2.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic3.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic3.cpp
index 44e7a29..9196f25 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic3.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic3.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2013 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic3.h b/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic3.h
index 9e809c5..84b7a65 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic3.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic3.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic4.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic4.cpp
index 316c242..bcbc43f 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic4.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic4.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2013 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic4.h b/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic4.h
index eada62f..f113753 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic4.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic4.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.cpp
index e8eaf3f..3b0c85d 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2013 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.h b/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.h
index 96a9437..ad811a4 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2013 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIWizardFirstRun.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIWizardFirstRun.cpp
index c7765e1..3b93f30 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIWizardFirstRun.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIWizardFirstRun.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2012 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -80,7 +80,7 @@ bool UIWizardFirstRun::insertMedium()
     /* Get chosen 'dvd' medium to mount: */
     QString mediumId = field("id").toString();
     UIMedium vmedium = vboxGlobal().medium(mediumId);
-    CMedium medium = vmedium.medium(); // @todo r=dj can this be cached somewhere?
+    CMedium medium = vmedium.medium(); /// @todo r=dj can this be cached somewhere?
     /* Mount medium to the predefined port/device: */
     m_machine.MountMedium(cda.GetController(), cda.GetPort(), cda.GetDevice(), medium, false /* force */);
     if (m_machine.isOk())
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIWizardFirstRun.h b/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIWizardFirstRun.h
index d3d8896..75cbc7b 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIWizardFirstRun.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIWizardFirstRun.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2012 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIWizardFirstRunPageBasic.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIWizardFirstRunPageBasic.cpp
index 866054d..0bd838a 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIWizardFirstRunPageBasic.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIWizardFirstRunPageBasic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2013 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIWizardFirstRunPageBasic.h b/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIWizardFirstRunPageBasic.h
index dd62cdd..eebe336 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIWizardFirstRunPageBasic.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIWizardFirstRunPageBasic.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2012 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportApp.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportApp.cpp
index bc6e2d8..ed325bd 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportApp.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportApp.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportApp.h b/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportApp.h
index 17ad76c..56e325d 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportApp.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportApp.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppDefs.h b/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppDefs.h
index 023cb01..c1cae86 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppDefs.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppDefs.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic1.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic1.cpp
index 597bbbf..0224e0f 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic1.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic1.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2013 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic1.h b/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic1.h
index f6a9e4b..8eaa26e 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic1.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic1.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageExpert.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageExpert.cpp
index 714084e..0493dd2 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageExpert.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageExpert.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2013 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageExpert.h b/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageExpert.h
index d5e34c0..7e8b521 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageExpert.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageExpert.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2013 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVD.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVD.cpp
index 19b4566..9cdb6b9 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVD.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVD.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVD.h b/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVD.h
index 85c5ec8..e2ccbb9 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVD.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVD.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic1.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic1.cpp
index 33baff9..acaf8b4 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic1.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic1.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic1.h b/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic1.h
index 3b7d77e..a6d35c3 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic1.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic1.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic2.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic2.cpp
index 2332922..f62cd28 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic2.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic2.h b/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic2.h
index 2c74bfc..1bd56c7 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic2.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic2.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic3.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic3.cpp
index b10ff8a..c08a34e 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic3.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic3.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic3.h b/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic3.h
index 78c3342..3b40aa0 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic3.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic3.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageExpert.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageExpert.cpp
index 8141fce..d661ad2 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageExpert.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageExpert.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageExpert.h b/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageExpert.h
index 94b7642..f6f6289 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageExpert.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageExpert.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp
index ed5e08a..cdf87cf 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -275,7 +275,7 @@ bool UIWizardNewVM::createVM()
             if (!strId.isNull())
             {
                 UIMedium vmedium = vboxGlobal().medium(strId);
-                CMedium medium = vmedium.medium();              // @todo r=dj can this be cached somewhere?
+                CMedium medium = vmedium.medium();              /// @todo r=dj can this be cached somewhere?
                 machine.AttachDevice(strHDName, 0, 0, KDeviceType_HardDisk, medium);
                 if (!machine.isOk())
                     msgCenter().cannotAttachDevice(machine, UIMediumType_HardDisk, field("virtualDiskLocation").toString(),
@@ -310,11 +310,11 @@ bool UIWizardNewVM::createVM()
         if (!success)
         {
             /* Unregister on failure */
-            QVector<CMedium> aMedia = m_machine.Unregister(KCleanupMode_UnregisterOnly);   //  @todo replace with DetachAllReturnHardDisksOnly once a progress dialog is in place below
+            QVector<CMedium> aMedia = m_machine.Unregister(KCleanupMode_UnregisterOnly);   /// @todo replace with DetachAllReturnHardDisksOnly once a progress dialog is in place below
             if (vbox.isOk())
             {
                 CProgress progress = m_machine.DeleteConfig(aMedia);
-                progress.WaitForCompletion(-1);         // @todo do this nicely with a progress dialog, this can delete lots of files
+                progress.WaitForCompletion(-1);         /// @todo do this nicely with a progress dialog, this can delete lots of files
             }
             return false;
         }
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h b/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h
index 537826f..b985ac7 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp
index 58fab04..807521f 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.h b/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.h
index 1928c66..a2dcae7 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic2.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic2.cpp
index 5ead69d..4564093 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic2.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic2.h b/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic2.h
index 650319c..f81389d 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic2.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic2.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic3.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic3.cpp
index 9993976..2755747 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic3.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic3.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic3.h b/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic3.h
index 9e882d0..799d227 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic3.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic3.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp
index 171db9c..f13dcd4 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.h b/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.h
index 7bcb1c6..43760ff 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.h
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/GuestHost/DragAndDrop/DnDDroppedFiles.cpp b/src/VBox/GuestHost/DragAndDrop/DnDDroppedFiles.cpp
index de19b36..b64cfd3 100644
--- a/src/VBox/GuestHost/DragAndDrop/DnDDroppedFiles.cpp
+++ b/src/VBox/GuestHost/DragAndDrop/DnDDroppedFiles.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -110,7 +110,7 @@ int DnDDroppedFiles::OpenEx(const char *pszPath, uint32_t fFlags)
     do
     {
         char pszDropDir[RTPATH_MAX];
-        size_t cchDropDir = RTStrPrintf(pszDropDir, sizeof(pszDropDir), "%s", pszPath);
+        RTStrPrintf(pszDropDir, sizeof(pszDropDir), "%s", pszPath);
 
         /** @todo On Windows we also could use the registry to override
          *        this path, on Posix a dotfile and/or a guest property
@@ -228,8 +228,7 @@ int DnDDroppedFiles::Rollback(void)
         rc2 = RTFileDelete(this->m_lstFiles.at(i).c_str());
         if (RT_SUCCESS(rc2))
             this->m_lstFiles.removeAt(i);
-
-        if (RT_SUCCESS(rc))
+        else if (RT_SUCCESS(rc))
            rc = rc2;
         /* Keep going. */
     }
@@ -239,8 +238,7 @@ int DnDDroppedFiles::Rollback(void)
         rc2 = RTDirRemove(this->m_lstDirs.at(i).c_str());
         if (RT_SUCCESS(rc2))
             this->m_lstDirs.removeAt(i);
-
-        if (RT_SUCCESS(rc))
+        else if (RT_SUCCESS(rc))
             rc = rc2;
         /* Keep going. */
     }
@@ -257,11 +255,10 @@ int DnDDroppedFiles::Rollback(void)
              * Might return VERR_DIR_NOT_EMPTY or similar. */
             rc2 = RTDirRemove(this->m_strPathAbs.c_str());
         }
+        if (RT_SUCCESS(rc))
+            rc = rc2;
     }
 
-    if (RT_SUCCESS(rc))
-        rc = rc2;
-
     LogFlowFuncLeaveRC(rc);
     return rc;
 }
diff --git a/src/VBox/GuestHost/DragAndDrop/DnDMIME.cpp b/src/VBox/GuestHost/DragAndDrop/DnDMIME.cpp
index 329f4b7..68194ef 100644
--- a/src/VBox/GuestHost/DragAndDrop/DnDMIME.cpp
+++ b/src/VBox/GuestHost/DragAndDrop/DnDMIME.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/GuestHost/DragAndDrop/DnDPath.cpp b/src/VBox/GuestHost/DragAndDrop/DnDPath.cpp
index 6589ce8..ea7759e 100644
--- a/src/VBox/GuestHost/DragAndDrop/DnDPath.cpp
+++ b/src/VBox/GuestHost/DragAndDrop/DnDPath.cpp
@@ -1,10 +1,10 @@
 /* $Id: DnDPath.cpp $ */
 /** @file
- * DnD: Path handling.
+ * DnD - Path handling.
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -37,15 +37,26 @@ int DnDPathSanitizeFilename(char *pszPath, size_t cbPath)
 {
     int rc = VINF_SUCCESS;
 #ifdef RT_OS_WINDOWS
-    /* Filter out characters not allowed on Windows platforms, put in by
-       RTTimeSpecToString(). */
-    /** @todo Use something like RTPathSanitize() when available. Later. */
-    RTUNICP aCpSet[] =
-        { ' ', ' ', '(', ')', '-', '.', '0', '9', 'A', 'Z', 'a', 'z', '_', '_',
-          0xa0, 0xd7af, '\0' };
-    ssize_t cReplaced = RTStrPurgeComplementSet(pszPath, aCpSet, '_' /* Replacement */);
+    RT_NOREF1(cbPath);
+    /* Replace out characters not allowed on Windows platforms, put in by RTTimeSpecToString(). */
+    /** @todo Use something like RTPathSanitize() if available later some time. */
+    static const RTUNICP s_uszValidRangePairs[] =
+    {
+        ' ', ' ',
+        '(', ')',
+        '-', '.',
+        '0', '9',
+        'A', 'Z',
+        'a', 'z',
+        '_', '_',
+        0xa0, 0xd7af,
+        '\0'
+    };
+    ssize_t cReplaced = RTStrPurgeComplementSet(pszPath, s_uszValidRangePairs, '_' /* chReplacement */);
     if (cReplaced < 0)
         rc = VERR_INVALID_UTF8_ENCODING;
+#else
+    RT_NOREF2(pszPath, cbPath);
 #endif
     return rc;
 }
@@ -53,6 +64,7 @@ int DnDPathSanitizeFilename(char *pszPath, size_t cbPath)
 int DnDPathSanitize(char *pszPath, size_t cbPath)
 {
     /** @todo */
+    RT_NOREF2(pszPath, cbPath);
     return VINF_SUCCESS;
 }
 
diff --git a/src/VBox/GuestHost/DragAndDrop/DnDURIList.cpp b/src/VBox/GuestHost/DragAndDrop/DnDURIList.cpp
index 06dec29..5fe630f 100644
--- a/src/VBox/GuestHost/DragAndDrop/DnDURIList.cpp
+++ b/src/VBox/GuestHost/DragAndDrop/DnDURIList.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -128,108 +128,110 @@ int DnDURIList::appendPathRecursive(const char *pcszSrcPath,
         {
             rc = addEntry(pcszSrcPath, &pcszDstPath[cchDstBase], fFlags);
 
-            PRTDIR hDir;
-            if (RT_SUCCESS(rc))
-                rc = RTDirOpen(&hDir, pcszSrcPath);
             if (RT_SUCCESS(rc))
             {
-                do
+                PRTDIR hDir;
+                rc = RTDirOpen(&hDir, pcszSrcPath);
+                if (RT_SUCCESS(rc))
                 {
-                    RTDIRENTRY DirEntry;
-                    rc = RTDirRead(hDir, &DirEntry, NULL);
-                    if (RT_FAILURE(rc))
-                    {
-                        if (rc == VERR_NO_MORE_FILES)
-                            rc = VINF_SUCCESS;
-                        break;
-                    }
-
-                    switch (DirEntry.enmType)
+                    do
                     {
-                        case RTDIRENTRYTYPE_DIRECTORY:
+                        RTDIRENTRY DirEntry;
+                        rc = RTDirRead(hDir, &DirEntry, NULL);
+                        if (RT_FAILURE(rc))
                         {
-                            /* Skip "." and ".." entries. */
-                            if (   RTStrCmp(DirEntry.szName, ".")  == 0
-                                || RTStrCmp(DirEntry.szName, "..") == 0)
-                                break;
+                            if (rc == VERR_NO_MORE_FILES)
+                                rc = VINF_SUCCESS;
+                            break;
+                        }
 
-                            char *pszSrc = RTPathJoinA(pcszSrcPath, DirEntry.szName);
-                            if (pszSrc)
+                        switch (DirEntry.enmType)
+                        {
+                            case RTDIRENTRYTYPE_DIRECTORY:
                             {
-                                char *pszDst = RTPathJoinA(pcszDstPath, DirEntry.szName);
-                                if (pszDst)
+                                /* Skip "." and ".." entries. */
+                                if (   RTStrCmp(DirEntry.szName, ".")  == 0
+                                    || RTStrCmp(DirEntry.szName, "..") == 0)
+                                    break;
+
+                                char *pszSrc = RTPathJoinA(pcszSrcPath, DirEntry.szName);
+                                if (pszSrc)
                                 {
-                                    rc = appendPathRecursive(pszSrc, pszDst, pcszDstBase, cchDstBase, fFlags);
-                                    RTStrFree(pszDst);
+                                    char *pszDst = RTPathJoinA(pcszDstPath, DirEntry.szName);
+                                    if (pszDst)
+                                    {
+                                        rc = appendPathRecursive(pszSrc, pszDst, pcszDstBase, cchDstBase, fFlags);
+                                        RTStrFree(pszDst);
+                                    }
+                                    else
+                                        rc = VERR_NO_MEMORY;
+
+                                    RTStrFree(pszSrc);
                                 }
                                 else
                                     rc = VERR_NO_MEMORY;
-
-                                RTStrFree(pszSrc);
+                                break;
                             }
-                            else
-                                rc = VERR_NO_MEMORY;
-                            break;
-                        }
 
-                        case RTDIRENTRYTYPE_FILE:
-                        {
-                            char *pszSrc = RTPathJoinA(pcszSrcPath, DirEntry.szName);
-                            if (pszSrc)
+                            case RTDIRENTRYTYPE_FILE:
                             {
-                                char *pszDst = RTPathJoinA(pcszDstPath, DirEntry.szName);
-                                if (pszDst)
+                                char *pszSrc = RTPathJoinA(pcszSrcPath, DirEntry.szName);
+                                if (pszSrc)
                                 {
-                                    rc = addEntry(pszSrc, &pszDst[cchDstBase], fFlags);
-                                    RTStrFree(pszDst);
+                                    char *pszDst = RTPathJoinA(pcszDstPath, DirEntry.szName);
+                                    if (pszDst)
+                                    {
+                                        rc = addEntry(pszSrc, &pszDst[cchDstBase], fFlags);
+                                        RTStrFree(pszDst);
+                                    }
+                                    else
+                                        rc = VERR_NO_MEMORY;
+                                    RTStrFree(pszSrc);
                                 }
                                 else
                                     rc = VERR_NO_MEMORY;
-                                RTStrFree(pszSrc);
+                                break;
                             }
-                            else
-                                rc = VERR_NO_MEMORY;
-                            break;
-                        }
-                        case RTDIRENTRYTYPE_SYMLINK:
-                        {
-                            if (fFlags & DNDURILIST_FLAGS_RESOLVE_SYMLINKS)
+                            case RTDIRENTRYTYPE_SYMLINK:
                             {
-                                char *pszSrc = RTPathRealDup(pcszDstBase);
-                                if (pszSrc)
+                                if (fFlags & DNDURILIST_FLAGS_RESOLVE_SYMLINKS)
                                 {
-                                    rc = RTPathQueryInfo(pszSrc, &objInfo, RTFSOBJATTRADD_NOTHING);
-                                    if (RT_SUCCESS(rc))
+                                    char *pszSrc = RTPathRealDup(pcszDstBase);
+                                    if (pszSrc)
                                     {
-                                        if (RTFS_IS_DIRECTORY(objInfo.Attr.fMode))
-                                        {
-                                            LogFlowFunc(("Directory entry is symlink to directory\n"));
-                                            rc = appendPathRecursive(pszSrc, pcszDstPath, pcszDstBase, cchDstBase, fFlags);
-                                        }
-                                        else if (RTFS_IS_FILE(objInfo.Attr.fMode))
+                                        rc = RTPathQueryInfo(pszSrc, &objInfo, RTFSOBJATTRADD_NOTHING);
+                                        if (RT_SUCCESS(rc))
                                         {
-                                            LogFlowFunc(("Directory entry is symlink to file\n"));
-                                            rc = addEntry(pszSrc, &pcszDstPath[cchDstBase], fFlags);
+                                            if (RTFS_IS_DIRECTORY(objInfo.Attr.fMode))
+                                            {
+                                                LogFlowFunc(("Directory entry is symlink to directory\n"));
+                                                rc = appendPathRecursive(pszSrc, pcszDstPath, pcszDstBase, cchDstBase, fFlags);
+                                            }
+                                            else if (RTFS_IS_FILE(objInfo.Attr.fMode))
+                                            {
+                                                LogFlowFunc(("Directory entry is symlink to file\n"));
+                                                rc = addEntry(pszSrc, &pcszDstPath[cchDstBase], fFlags);
+                                            }
+                                            else
+                                                rc = VERR_NOT_SUPPORTED;
                                         }
-                                        else
-                                            rc = VERR_NOT_SUPPORTED;
-                                    }
 
-                                    RTStrFree(pszSrc);
+                                        RTStrFree(pszSrc);
+                                    }
+                                    else
+                                        rc = VERR_NO_MEMORY;
                                 }
-                                else
-                                    rc = VERR_NO_MEMORY;
+                                break;
                             }
-                            break;
-                        }
 
-                        default:
-                            break;
-                    }
+                            default:
+                                break;
+                        }
 
-                } while (RT_SUCCESS(rc));
+                    } while (RT_SUCCESS(rc));
 
-                RTDirClose(hDir);
+                    RTDirClose(hDir);
+                }
             }
         }
         else if (RTFS_IS_FILE(objInfo.Attr.fMode))
@@ -445,6 +447,7 @@ void DnDURIList::RemoveFirst(void)
 
 int DnDURIList::RootFromURIData(const void *pvData, size_t cbData, uint32_t fFlags)
 {
+    Assert(fFlags == 0); RT_NOREF1(fFlags);
     AssertPtrReturn(pvData, VERR_INVALID_POINTER);
     AssertReturn(cbData, VERR_INVALID_PARAMETER);
 
diff --git a/src/VBox/GuestHost/DragAndDrop/DnDURIObject.cpp b/src/VBox/GuestHost/DragAndDrop/DnDURIObject.cpp
index c8000ea..1feedac 100644
--- a/src/VBox/GuestHost/DragAndDrop/DnDURIObject.cpp
+++ b/src/VBox/GuestHost/DragAndDrop/DnDURIObject.cpp
@@ -133,6 +133,7 @@ int DnDURIObject::Open(Dest enmDest, uint64_t fOpen /* = 0 */, uint32_t fMode /*
 int DnDURIObject::OpenEx(const RTCString &strPath, Type enmType, Dest enmDest,
                          uint64_t fOpen /* = 0 */, uint32_t fMode /* = 0 */, uint32_t fFlags /* = 0 */)
 {
+    Assert(fFlags == 0); RT_NOREF1(fFlags);
     int rc = VINF_SUCCESS;
 
     switch (enmDest)
diff --git a/src/VBox/GuestHost/DragAndDrop/Makefile.kmk b/src/VBox/GuestHost/DragAndDrop/Makefile.kmk
index 9d09e82..be6fd8c 100644
--- a/src/VBox/GuestHost/DragAndDrop/Makefile.kmk
+++ b/src/VBox/GuestHost/DragAndDrop/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2014-2015 Oracle Corporation
+# Copyright (C) 2014-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/GuestHost/HGSMI/HGSMICommon.cpp b/src/VBox/GuestHost/HGSMI/HGSMICommon.cpp
index 36d66d7..5d4b06c 100644
--- a/src/VBox/GuestHost/HGSMI/HGSMICommon.cpp
+++ b/src/VBox/GuestHost/HGSMI/HGSMICommon.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -367,7 +367,7 @@ int HGSMIBufferProcess(const HGSMIAREA *pArea,
     AssertPtrReturn(pChannelInfo, VERR_INVALID_PARAMETER);
 
     /* Guest has prepared a command description at 'offBuffer'. */
-    HGSMIBUFFERCONTEXT bufferContext;
+    HGSMIBUFFERCONTEXT bufferContext = { NULL, NULL, 0 }; /* Makes old GCC happier. */
     int rc = hgsmiVerifyBuffer(pArea, offBuffer, &bufferContext);
     if (RT_SUCCESS(rc))
     {
diff --git a/src/VBox/GuestHost/HGSMI/HGSMIMemAlloc.cpp b/src/VBox/GuestHost/HGSMI/HGSMIMemAlloc.cpp
index 3878c02..8997f76 100644
--- a/src/VBox/GuestHost/HGSMI/HGSMIMemAlloc.cpp
+++ b/src/VBox/GuestHost/HGSMI/HGSMIMemAlloc.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/GuestHost/HGSMI/Makefile.kmk b/src/VBox/GuestHost/HGSMI/Makefile.kmk
index 723a777..13cfd57 100644
--- a/src/VBox/GuestHost/HGSMI/Makefile.kmk
+++ b/src/VBox/GuestHost/HGSMI/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/GuestHost/Makefile.kmk b/src/VBox/GuestHost/Makefile.kmk
index 8fb8a48..2f81991 100644
--- a/src/VBox/GuestHost/Makefile.kmk
+++ b/src/VBox/GuestHost/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2008-2015 Oracle Corporation
+# Copyright (C) 2008-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/GuestHost/OpenGL/Makefile.kmk b/src/VBox/GuestHost/OpenGL/Makefile.kmk
index fb00c6e..d97b9b1 100644
--- a/src/VBox/GuestHost/OpenGL/Makefile.kmk
+++ b/src/VBox/GuestHost/OpenGL/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2008-2015 Oracle Corporation
+# Copyright (C) 2008-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/GuestHost/OpenGL/error/VBoxOGLerrorspu.rc b/src/VBox/GuestHost/OpenGL/error/VBoxOGLerrorspu.rc
index bbb146a..2424a90 100644
--- a/src/VBox/GuestHost/OpenGL/error/VBoxOGLerrorspu.rc
+++ b/src/VBox/GuestHost/OpenGL/error/VBoxOGLerrorspu.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/GuestHost/OpenGL/error/errorspu.rc b/src/VBox/GuestHost/OpenGL/error/errorspu.rc
index 7ed52b2..b0af5df 100644
--- a/src/VBox/GuestHost/OpenGL/error/errorspu.rc
+++ b/src/VBox/GuestHost/OpenGL/error/errorspu.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/GuestHost/OpenGL/include/GL/glext.h b/src/VBox/GuestHost/OpenGL/include/GL/glext.h
index 7f75454..9c50739 100644
--- a/src/VBox/GuestHost/OpenGL/include/GL/glext.h
+++ b/src/VBox/GuestHost/OpenGL/include/GL/glext.h
@@ -30,7 +30,11 @@ extern "C" {
 
 #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
 #define WIN32_LEAN_AND_MEAN 1
+# ifdef VBOX
+#  include <iprt/win/windows.h>
+# else
 #include <windows.h>
+# endif
 #endif
 
 #ifndef APIENTRY
diff --git a/src/VBox/GuestHost/OpenGL/include/chromium.h b/src/VBox/GuestHost/OpenGL/include/chromium.h
index b436ff2..d495467 100644
--- a/src/VBox/GuestHost/OpenGL/include/chromium.h
+++ b/src/VBox/GuestHost/OpenGL/include/chromium.h
@@ -21,9 +21,18 @@
 #include "cr_compiler.h"
 
 #ifdef IN_RING0
+
+# ifndef VBOXVIDEOLOG_H
+#  undef WARN     /* VBoxMpUtils.h includes common/VBoxVideoLog.h which */
+#  undef LOG      /* uncondtionally redefines these three macros. */
+#  undef LOGREL
+# endif
 # include <common/VBoxMPUtils.h>
-# define WINGDIAPI
+
+# define WINGDIAPI /* gl/gl.h is using this (wingdi.h defines it a __declspec(dllimport) normaly).  */
+
 #endif
+
 /*
  * We effectively wrap gl.h, glu.h, etc, just like GLUT
  */
@@ -34,11 +43,15 @@
 
 #if defined(WINDOWS)
 # ifdef IN_RING0
-#  error "should not happen!"
+#  error "should not happen!" /* bird: This is certifiably insane, in my opinion. */
 # endif
 # define WIN32_LEAN_AND_MEAN
 # define WGL_APIENTRY __stdcall
-# include <windows.h>
+# ifdef VBOX
+#  include <iprt/win/windows.h>
+# else
+#  include <windows.h>
+# endif
 #elif defined(DARWIN)
 /* nothing */
 #else
@@ -50,7 +63,21 @@
 #include <GL/gl.h>
 
 #ifndef WINDOWS
-#include <GL/glu.h>
+# ifndef RT_OS_WINDOWS /* If we don't need it in ring-3, we probably not need it in ring-0 either (triggers warnings). */
+#  include <iprt/cdefs.h>
+#  if RT_GNUC_PREREQ(4, 6)
+#   pragma GCC diagnostic push
+#  endif
+#  if RT_GNUC_PREREQ(4, 2)
+#   ifndef __cplusplus
+#    pragma GCC diagnostic ignored "-Wstrict-prototypes"
+#   endif
+#  endif
+#  include <GL/glu.h>
+#  if RT_GNUC_PREREQ(4, 6)
+#   pragma GCC diagnostic pop
+#  endif
+# endif /* !RT_OS_WINDOWS */
 #endif
 
 
@@ -73,6 +100,10 @@
 
 #include "cr_glext.h"
 
+#ifdef IN_RING0
+# undef WINGDIAPI /* don't want it clashing with wingdi.h should it be included. */
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -85,7 +116,7 @@ struct VBOXVR_SCR_COMPOSITOR_ENTRY;
 #define CR_RENDER_DEFAULT_CONTEXT_ID (INT32_MAX-1)
 #define CR_RENDER_DEFAULT_WINDOW_ID (INT32_MAX-1)
 
-#if defined(IN_GUEST) && (WINDOWS) && defined(VBOX_WITH_WDDM)
+#if defined(IN_GUEST) && defined(RT_OS_WINDOWS) && defined(VBOX_WITH_WDDM)
 # ifdef VBOX_WDDM_WOW64
 #  define VBOX_MODNAME_DISPD3D "VBoxDispD3D-x86"
 # else
@@ -433,7 +464,7 @@ struct VBOXVR_SCR_COMPOSITOR_ENTRY;
 #define GL_FOG_COORDINATE_ARRAY_POINTER_EXT     0x8456
 #endif
 
-typedef void (*CR_GLXFuncPtr)();
+typedef void (*CR_GLXFuncPtr)(void);
 #ifndef GLX_ARB_get_proc_address
 #define GLX_ARB_get_proc_address 1
 CR_GLXFuncPtr glXGetProcAddressARB( const GLubyte *name );
@@ -795,7 +826,7 @@ extern void APIENTRY crWindowVisibleRegion( GLint window, GLint cRects, const vo
 extern void APIENTRY crWindowShow( GLint window, GLint flag );
 extern void APIENTRY crVBoxTexPresent(GLuint texture, GLuint cfg, GLint xPos, GLint yPos, GLint cRects, const GLint *pRects);
 
-typedef int (CR_APIENTRY *CR_PROC)();
+typedef int (CR_APIENTRY *CR_PROC)(void);
 CR_PROC APIENTRY crGetProcAddress( const char *name );
 
 
diff --git a/src/VBox/GuestHost/OpenGL/include/cr_blitter.h b/src/VBox/GuestHost/OpenGL/include/cr_blitter.h
index e7dd02e..ffc4513 100644
--- a/src/VBox/GuestHost/OpenGL/include/cr_blitter.h
+++ b/src/VBox/GuestHost/OpenGL/include/cr_blitter.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2014 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/GuestHost/OpenGL/include/cr_compositor.h b/src/VBox/GuestHost/OpenGL/include/cr_compositor.h
index 74496d6..d2a8fc1 100644
--- a/src/VBox/GuestHost/OpenGL/include/cr_compositor.h
+++ b/src/VBox/GuestHost/OpenGL/include/cr_compositor.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2014 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/GuestHost/OpenGL/include/cr_dll.h b/src/VBox/GuestHost/OpenGL/include/cr_dll.h
index 4258b57..81c1b68 100644
--- a/src/VBox/GuestHost/OpenGL/include/cr_dll.h
+++ b/src/VBox/GuestHost/OpenGL/include/cr_dll.h
@@ -9,7 +9,11 @@
 
 #if defined(WINDOWS)
 #define WIN32_LEAN_AND_MEAN
+# ifdef VBOX
+#  include <iprt/win/windows.h>
+# else
 #include <windows.h>
+# endif
 #endif
 
 #include <iprt/cdefs.h>
diff --git a/src/VBox/GuestHost/OpenGL/include/cr_dump.h b/src/VBox/GuestHost/OpenGL/include/cr_dump.h
index cda1ae9..e08e043 100644
--- a/src/VBox/GuestHost/OpenGL/include/cr_dump.h
+++ b/src/VBox/GuestHost/OpenGL/include/cr_dump.h
@@ -4,7 +4,7 @@
  * Debugging: Dump API
  */
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/GuestHost/OpenGL/include/cr_error.h b/src/VBox/GuestHost/OpenGL/include/cr_error.h
index 8541b10..64570aa 100644
--- a/src/VBox/GuestHost/OpenGL/include/cr_error.h
+++ b/src/VBox/GuestHost/OpenGL/include/cr_error.h
@@ -51,14 +51,14 @@ DECLEXPORT(void) crWarning(const char *format, ... ) PRINTF;
 #endif
 DECLEXPORT(void) crInfo(const char *format, ... ) PRINTF;
 
-DECLEXPORT(void) crError(const char *format, ... ) NORETURN_PRINTF;
+DECLEXPORT(void) crError(const char *format, ... ) PRINTF /*NORETURN_PRINTF - it returns*/;
 
 /* Throw more info while opengl is not stable */
 #if defined(DEBUG) || 1
 # ifdef DEBUG_misha
 #  include <iprt/assert.h>
 #  define CRASSERT Assert
-//extern int g_VBoxFbgFBreakDdi;
+/*extern int g_VBoxFbgFBreakDdi;*/
 #  define CR_DDI_PROLOGUE() do { /*if (g_VBoxFbgFBreakDdi) {Assert(0);}*/ } while (0)
 # else
 #  define CRASSERT( PRED ) ((PRED)?(void)0:crWarning( "Assertion failed: %s=%d, file %s, line %d", #PRED, (int)(intptr_t)(PRED), __FILE__, __LINE__))
diff --git a/src/VBox/GuestHost/OpenGL/include/cr_glext.h b/src/VBox/GuestHost/OpenGL/include/cr_glext.h
index 429e218..2a14f45 100644
--- a/src/VBox/GuestHost/OpenGL/include/cr_glext.h
+++ b/src/VBox/GuestHost/OpenGL/include/cr_glext.h
@@ -4,7 +4,7 @@
  * GL chromium platform specifics
  */
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/GuestHost/OpenGL/include/cr_glstate.h b/src/VBox/GuestHost/OpenGL/include/cr_glstate.h
index 265283c..442e4d8 100644
--- a/src/VBox/GuestHost/OpenGL/include/cr_glstate.h
+++ b/src/VBox/GuestHost/OpenGL/include/cr_glstate.h
@@ -207,13 +207,13 @@ struct CRContext {
 
 DECLEXPORT(void) crStateInit(void);
 DECLEXPORT(void) crStateDestroy(void);
-DECLEXPORT(void) crStateVBoxDetachThread();
-DECLEXPORT(void) crStateVBoxAttachThread();
+DECLEXPORT(void) crStateVBoxDetachThread(void);
+DECLEXPORT(void) crStateVBoxAttachThread(void);
 DECLEXPORT(CRContext *) crStateCreateContext(const CRLimitsState *limits, GLint visBits, CRContext *share);
 DECLEXPORT(CRContext *) crStateCreateContextEx(const CRLimitsState *limits, GLint visBits, CRContext *share, GLint presetID);
 DECLEXPORT(void) crStateMakeCurrent(CRContext *ctx);
 DECLEXPORT(void) crStateSetCurrent(CRContext *ctx);
-DECLEXPORT(void) crStateCleanupCurrent();
+DECLEXPORT(void) crStateCleanupCurrent(void);
 DECLEXPORT(CRContext *) crStateGetCurrent(void);
 DECLEXPORT(void) crStateDestroyContext(CRContext *ctx);
 DECLEXPORT(GLboolean) crStateEnableDiffOnMakeCurrent(GLboolean fEnable);
@@ -222,7 +222,7 @@ void crStateSwitchPrepare(CRContext *toCtx, CRContext *fromCtx, GLuint idDrawFBO
 void crStateSwitchPostprocess(CRContext *toCtx, CRContext *fromCtx, GLuint idDrawFBO, GLuint idReadFBO);
 
 void crStateSyncHWErrorState(CRContext *ctx);
-GLenum crStateCleanHWErrorState();
+GLenum crStateCleanHWErrorState(void);
 
 #define CR_STATE_CLEAN_HW_ERR_WARN(_s) do {\
             GLenum _err = crStateCleanHWErrorState(); \
@@ -295,8 +295,8 @@ DECLEXPORT(void) crStateFreeShared(CRContext *pContext, CRSharedState *s);
 DECLEXPORT(int32_t) crStateLoadGlobals(PSSMHANDLE pSSM, uint32_t u32Version);
 DECLEXPORT(int32_t) crStateSaveGlobals(PSSMHANDLE pSSM);
 
-DECLEXPORT(CRSharedState *) crStateGlobalSharedAcquire();
-DECLEXPORT(void) crStateGlobalSharedRelease();
+DECLEXPORT(CRSharedState *) crStateGlobalSharedAcquire(void);
+DECLEXPORT(void) crStateGlobalSharedRelease(void);
 #endif
 
 DECLEXPORT(void) crStateSetTextureUsed(GLuint texture, GLboolean used);
diff --git a/src/VBox/GuestHost/OpenGL/include/cr_htable.h b/src/VBox/GuestHost/OpenGL/include/cr_htable.h
index 26c8bff..1f9d72d 100644
--- a/src/VBox/GuestHost/OpenGL/include/cr_htable.h
+++ b/src/VBox/GuestHost/OpenGL/include/cr_htable.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/GuestHost/OpenGL/include/cr_net.h b/src/VBox/GuestHost/OpenGL/include/cr_net.h
index 9ab6a8e..a35ded3 100644
--- a/src/VBox/GuestHost/OpenGL/include/cr_net.h
+++ b/src/VBox/GuestHost/OpenGL/include/cr_net.h
@@ -265,7 +265,7 @@ struct CRConnection {
 extern DECLEXPORT(int) crGetHostname( char *buf, unsigned int len );
 
 extern DECLEXPORT(void) crNetInit( CRNetReceiveFunc recvFunc, CRNetCloseFunc closeFunc );
-extern DECLEXPORT(void) crNetTearDown();
+extern DECLEXPORT(void) crNetTearDown(void);
 
 extern DECLEXPORT(void) *crNetAlloc( CRConnection *conn );
 extern DECLEXPORT(void) crNetFree( CRConnection *conn, void *buf );
@@ -287,6 +287,8 @@ extern DECLEXPORT(void) crNetReadline( CRConnection *conn, void *buf );
 extern DECLEXPORT(int) crNetRecv(
 #if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
                 CRConnection *conn
+#else
+                void
 #endif
         );
 #if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
@@ -306,7 +308,7 @@ extern DECLEXPORT(int) crNetRecv(
 
 #endif
 #ifdef IN_GUEST
-extern DECLEXPORT(uint32_t) crNetHostCapsGet();
+extern DECLEXPORT(uint32_t) crNetHostCapsGet(void);
 #endif
 extern DECLEXPORT(void) crNetDefaultRecv( CRConnection *conn, CRMessage *msg, unsigned int len );
 extern DECLEXPORT(void) crNetDispatchMessage( CRNetReceiveFuncList *rfl, CRConnection *conn, CRMessage *msg, unsigned int len );
diff --git a/src/VBox/GuestHost/OpenGL/include/cr_pack.h b/src/VBox/GuestHost/OpenGL/include/cr_pack.h
index 2651fa2..ad2c606 100644
--- a/src/VBox/GuestHost/OpenGL/include/cr_pack.h
+++ b/src/VBox/GuestHost/OpenGL/include/cr_pack.h
@@ -93,9 +93,10 @@ struct CRPackContext_t
 };
 
 #if !defined(IN_RING0)
-# define CR_PACKER_CONTEXT_ARGSINGLEDECL
+# define CR_PACKER_CONTEXT_ARGSINGLEDECL void
 # define CR_PACKER_CONTEXT_ARGDECL
 # define CR_PACKER_CONTEXT_ARG
+# define CR_PACKER_CONTEXT_ARG_NOREF()  do {} while (0)
 # define CR_PACKER_CONTEXT_ARGCTX(C)
 # ifdef CHROMIUM_THREADSAFE
 extern CRtsd _PackerTSD;
@@ -113,6 +114,7 @@ extern uint32_t cr_packer_cmd_blocks_enabled;
 # define CR_PACKER_CONTEXT_ARGSINGLEDECL CRPackContext *_pCtx
 # define CR_PACKER_CONTEXT_ARGDECL CR_PACKER_CONTEXT_ARGSINGLEDECL,
 # define CR_PACKER_CONTEXT_ARG _pCtx,
+# define CR_PACKER_CONTEXT_ARG_NOREF() RT_NOREF_PV(_pCtx)
 # define CR_PACKER_CONTEXT_ARGCTX(C) C,
 # define CR_GET_PACKER_CONTEXT(C) CRPackContext *C = _pCtx
 # define CR_LOCK_PACKER_CONTEXT(PC)
diff --git a/src/VBox/GuestHost/OpenGL/include/cr_process.h b/src/VBox/GuestHost/OpenGL/include/cr_process.h
index 0ccc483..5fd981e 100644
--- a/src/VBox/GuestHost/OpenGL/include/cr_process.h
+++ b/src/VBox/GuestHost/OpenGL/include/cr_process.h
@@ -9,7 +9,11 @@
 
 #ifdef WINDOWS
 #define WIN32_LEAN_AND_MEAN
+# ifdef VBOX
+#  include <iprt/win/windows.h>
+# else
 #include <windows.h>
+# endif
 #endif
 
 #include <iprt/cdefs.h>
diff --git a/src/VBox/GuestHost/OpenGL/include/cr_protocol.h b/src/VBox/GuestHost/OpenGL/include/cr_protocol.h
index 2192f9b..c4c7dd5 100644
--- a/src/VBox/GuestHost/OpenGL/include/cr_protocol.h
+++ b/src/VBox/GuestHost/OpenGL/include/cr_protocol.h
@@ -99,7 +99,7 @@ typedef union {
     /* unsigned int  junk[512]; */
 } CRNetworkPointer;
 
-#if 0 //def DEBUG_misha
+#if 0 /*def DEBUG_misha*/
 #define CRDBGPTR_SETZ(_p) crMemset((_p), 0, sizeof (CRNetworkPointer))
 #define CRDBGPTR_CHECKZ(_p) do { \
         CRNetworkPointer _ptr = {0}; \
diff --git a/src/VBox/GuestHost/OpenGL/include/cr_server.h b/src/VBox/GuestHost/OpenGL/include/cr_server.h
index d44fc74..97dd4da 100644
--- a/src/VBox/GuestHost/OpenGL/include/cr_server.h
+++ b/src/VBox/GuestHost/OpenGL/include/cr_server.h
@@ -43,7 +43,7 @@ extern "C" {
 #define CR_MAX_WINDOWS 100
 #define CR_MAX_CLIENTS 64
 
-/*@todo must match MaxGuestMonitors from SchemaDefs.h*/
+/** @todo must match MaxGuestMonitors from SchemaDefs.h*/
 #define CR_MAX_GUEST_MONITORS VBOX_VIDEO_MAX_SCREENS
 
 typedef DECLCALLBACKPTR(void, PFNCRSERVERPRESENTFBO) (void *data, int32_t screenId, int32_t x, int32_t y, uint32_t w, uint32_t h);
@@ -559,7 +559,7 @@ extern DECLEXPORT(int32_t) crVBoxServerSetScreenViewport(int sIndex, int32_t x,
 extern DECLEXPORT(void) crServerVBoxSetNotifyEventCB(PFNCRSERVERNOTIFYEVENT pfnCb);
 
 extern DECLEXPORT(void) crVBoxServerCalloutEnable(VBOXCRCMDCTL *pCtl);
-extern DECLEXPORT(void) crVBoxServerCalloutDisable();
+extern DECLEXPORT(void) crVBoxServerCalloutDisable(void);
 extern DECLEXPORT(void) crServerSetUnscaledHiDPI(bool fEnable);
 
 #ifdef VBOX_WITH_CRHGSMI
diff --git a/src/VBox/GuestHost/OpenGL/include/cr_sortarray.h b/src/VBox/GuestHost/OpenGL/include/cr_sortarray.h
index f555ab9..201d610 100644
--- a/src/VBox/GuestHost/OpenGL/include/cr_sortarray.h
+++ b/src/VBox/GuestHost/OpenGL/include/cr_sortarray.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/GuestHost/OpenGL/include/cr_threads.h b/src/VBox/GuestHost/OpenGL/include/cr_threads.h
index 01a9eec..97da576 100644
--- a/src/VBox/GuestHost/OpenGL/include/cr_threads.h
+++ b/src/VBox/GuestHost/OpenGL/include/cr_threads.h
@@ -18,7 +18,11 @@ extern "C" {
 
 #ifdef WINDOWS
 #define WIN32_LEAN_AND_MEAN
+# ifdef VBOX
+#  include <iprt/win/windows.h>
+# else
 #include <windows.h>
+# endif
 #else
 #include <pthread.h>
 #include <semaphore.h>
diff --git a/src/VBox/GuestHost/OpenGL/include/cr_timer.h b/src/VBox/GuestHost/OpenGL/include/cr_timer.h
index 316ba34..9385a76 100644
--- a/src/VBox/GuestHost/OpenGL/include/cr_timer.h
+++ b/src/VBox/GuestHost/OpenGL/include/cr_timer.h
@@ -9,7 +9,11 @@ typedef unsigned long long iotimer64_t;
 typedef unsigned int iotimer32_t;
 #endif
 #else
+# ifdef VBOX
+#  include <iprt/win/windows.h>
+# else
 #include <windows.h>
+# endif
 #endif
 
 #ifdef __cplusplus
diff --git a/src/VBox/GuestHost/OpenGL/include/cr_vreg.h b/src/VBox/GuestHost/OpenGL/include/cr_vreg.h
index aaf74ae..16556e9 100644
--- a/src/VBox/GuestHost/OpenGL/include/cr_vreg.h
+++ b/src/VBox/GuestHost/OpenGL/include/cr_vreg.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2014 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/GuestHost/OpenGL/include/state/cr_framebuffer.h b/src/VBox/GuestHost/OpenGL/include/state/cr_framebuffer.h
index f8da8a7..1b5e430 100644
--- a/src/VBox/GuestHost/OpenGL/include/state/cr_framebuffer.h
+++ b/src/VBox/GuestHost/OpenGL/include/state/cr_framebuffer.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/GuestHost/OpenGL/include/state/cr_glsl.h b/src/VBox/GuestHost/OpenGL/include/state/cr_glsl.h
index d2d3ada..4f18629 100644
--- a/src/VBox/GuestHost/OpenGL/include/state/cr_glsl.h
+++ b/src/VBox/GuestHost/OpenGL/include/state/cr_glsl.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/GuestHost/OpenGL/packer/pack_buffer.c b/src/VBox/GuestHost/OpenGL/packer/pack_buffer.c
index d4ddaf5..003b76c 100644
--- a/src/VBox/GuestHost/OpenGL/packer/pack_buffer.c
+++ b/src/VBox/GuestHost/OpenGL/packer/pack_buffer.c
@@ -75,8 +75,7 @@ void crPackSetBuffer( CRPackContext *pc, CRPackBuffer *buffer )
 
 #ifndef IN_RING0
 /* This is useful for debugging packer problems */
-void crPackSetBufferDEBUG( const char *file, int line,
-													 CRPackContext *pc, CRPackBuffer *buffer)
+void crPackSetBufferDEBUG( const char *file, int line, CRPackContext *pc, CRPackBuffer *buffer)
 						   
 {
 	crPackSetBuffer( pc, buffer );
diff --git a/src/VBox/GuestHost/OpenGL/packer/pack_client.c b/src/VBox/GuestHost/OpenGL/packer/pack_client.c
index 7f06921..b994a4e 100644
--- a/src/VBox/GuestHost/OpenGL/packer/pack_client.c
+++ b/src/VBox/GuestHost/OpenGL/packer/pack_client.c
@@ -35,7 +35,7 @@ static void crPackVertexAttrib(const CRVertexArrays *array, unsigned int attr, G
     if (array->a[attr].buffer && array->a[attr].buffer->data)
     {
         Assert(((uintptr_t)p) < array->a[attr].buffer->size);
-        p = (unsigned char *)(array->a[attr].buffer->data) + (unsigned long)p;
+        p = (unsigned char *)(array->a[attr].buffer->data) + (uintptr_t)p;
     }
 #endif
 
@@ -318,7 +318,7 @@ crPackExpandArrayElement(GLint index, CRClientState *c, const GLfloat *pZva)
 #ifdef CR_ARB_vertex_buffer_object
         if (array->n.buffer && array->n.buffer->data)
         {
-            p = (unsigned char *)(array->n.buffer->data) + (unsigned long)p;
+            p = (unsigned char *)(array->n.buffer->data) + (uintptr_t)p;
         }
 #endif
 
@@ -341,7 +341,7 @@ crPackExpandArrayElement(GLint index, CRClientState *c, const GLfloat *pZva)
 #ifdef CR_ARB_vertex_buffer_object
         if (array->c.buffer && array->c.buffer->data)
         {
-            p = (unsigned char *)(array->c.buffer->data) + (unsigned long)p;
+            p = (unsigned char *)(array->c.buffer->data) + (uintptr_t)p;
         }
 #endif
 
@@ -416,7 +416,7 @@ crPackExpandArrayElement(GLint index, CRClientState *c, const GLfloat *pZva)
 #ifdef CR_ARB_vertex_buffer_object
         if (array->s.buffer && array->s.buffer->data)
         {
-            p = (unsigned char *)(array->s.buffer->data) + (unsigned long)p;
+            p = (unsigned char *)(array->s.buffer->data) + (uintptr_t)p;
         }
 #endif
 
@@ -442,7 +442,7 @@ crPackExpandArrayElement(GLint index, CRClientState *c, const GLfloat *pZva)
                 crWarning("Unhandled: crPackExpandArrayElement, array->s.type 0x%x", array->s.type);
         }
     }
-#endif // CR_EXT_secondary_color
+#endif /* CR_EXT_secondary_color */
 
 
 #ifdef CR_EXT_fog_coord
@@ -453,12 +453,12 @@ crPackExpandArrayElement(GLint index, CRClientState *c, const GLfloat *pZva)
 #ifdef CR_ARB_vertex_buffer_object
         if (array->f.buffer && array->f.buffer->data)
         {
-            p = (unsigned char *)(array->f.buffer->data) + (unsigned long)p;
+            p = (unsigned char *)(array->f.buffer->data) + (uintptr_t)p;
         }
 #endif
         crPackFogCoordfEXT( *((GLfloat *) p) );
     }
-#endif // CR_EXT_fog_coord
+#endif /* CR_EXT_fog_coord */
 
     for (unit = 0 ; unit < CR_MAX_TEXTURE_UNITS ; unit++)
     {
@@ -469,7 +469,7 @@ crPackExpandArrayElement(GLint index, CRClientState *c, const GLfloat *pZva)
 #ifdef CR_ARB_vertex_buffer_object
             if (array->t[unit].buffer && array->t[unit].buffer->data)
             {
-                p = (unsigned char *)(array->t[unit].buffer->data) + (unsigned long)p;
+                p = (unsigned char *)(array->t[unit].buffer->data) + (uintptr_t)p;
             }
 #endif
 
@@ -524,7 +524,7 @@ crPackExpandArrayElement(GLint index, CRClientState *c, const GLfloat *pZva)
 #ifdef CR_ARB_vertex_buffer_object
         if (array->i.buffer && array->i.buffer->data)
         {
-            p = (unsigned char *)(array->i.buffer->data) + (unsigned long)p;
+            p = (unsigned char *)(array->i.buffer->data) + (uintptr_t)p;
         }
 #endif
 
@@ -546,7 +546,7 @@ crPackExpandArrayElement(GLint index, CRClientState *c, const GLfloat *pZva)
 #ifdef CR_ARB_vertex_buffer_object
         if (array->e.buffer && array->e.buffer->data)
         {
-            p = (unsigned char *)(array->e.buffer->data) + (unsigned long)p;
+            p = (unsigned char *)(array->e.buffer->data) + (uintptr_t)p;
         }
 #endif
 
@@ -576,7 +576,7 @@ crPackExpandArrayElement(GLint index, CRClientState *c, const GLfloat *pZva)
 #ifdef CR_ARB_vertex_buffer_object
         if (array->v.buffer && array->v.buffer->data)
         {
-            p = (unsigned char *)(array->v.buffer->data) + (unsigned long)p;
+            p = (unsigned char *)(array->v.buffer->data) + (uintptr_t)p;
         }
 #endif
         switch (array->v.type)
@@ -795,14 +795,14 @@ crPackExpandDrawElements(GLenum mode, GLsizei count, GLenum type,
 #ifdef CR_ARB_vertex_buffer_object
     if (elementsBuffer && elementsBuffer->data)
     {
-        p = (unsigned char *)(elementsBuffer->data) + (unsigned long)p;
+        p = (unsigned char *)(elementsBuffer->data) + (uintptr_t)p;
     }
 #endif
 
     if (mode != 999)
         crPackBegin(mode);
 
-    //crDebug("crPackExpandDrawElements mode:0x%x, count:%d, type:0x%x", mode, count, type);
+    /*crDebug("crPackExpandDrawElements mode:0x%x, count:%d, type:0x%x", mode, count, type);*/
 
     switch (type)
     {
diff --git a/src/VBox/GuestHost/OpenGL/packer/pack_framebuffer.c b/src/VBox/GuestHost/OpenGL/packer/pack_framebuffer.c
index bc1ab54..40f2a76 100644
--- a/src/VBox/GuestHost/OpenGL/packer/pack_framebuffer.c
+++ b/src/VBox/GuestHost/OpenGL/packer/pack_framebuffer.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/GuestHost/OpenGL/packer/pack_pixels.c b/src/VBox/GuestHost/OpenGL/packer/pack_pixels.c
index c4239cd..4c09006 100644
--- a/src/VBox/GuestHost/OpenGL/packer/pack_pixels.c
+++ b/src/VBox/GuestHost/OpenGL/packer/pack_pixels.c
@@ -117,7 +117,7 @@ void PACK_APIENTRY crPackBitmap(GLsizei width, GLsizei height,
     const int noimagedata = (bitmap == NULL) || crStateIsBufferBound(GL_PIXEL_UNPACK_BUFFER_ARB);
     unsigned char *data_ptr;
     int data_length = 0;
-    GLubyte *destBitmap = NULL;
+    /*GLubyte *destBitmap = NULL; - unused */
     int packet_length = 
         sizeof( width ) + 
         sizeof( height ) +
@@ -209,7 +209,7 @@ crPackGetTexImage( GLenum target, GLint level, GLenum format, GLenum type,
 {
     CR_GET_PACKER_CONTEXT(pc);
     unsigned char *data_ptr;
-    (void) pc;
+    (void) pc; (void) packstate;
     CR_GET_BUFFERED_POINTER( pc, 40 );
     WRITE_DATA( 0, GLint, 40 );
     WRITE_DATA( 4, GLenum, CR_GETTEXIMAGE_EXTEND_OPCODE );
diff --git a/src/VBox/GuestHost/OpenGL/packer/pack_shaders.c b/src/VBox/GuestHost/OpenGL/packer/pack_shaders.c
index 8078adf..d34bd32 100644
--- a/src/VBox/GuestHost/OpenGL/packer/pack_shaders.c
+++ b/src/VBox/GuestHost/OpenGL/packer/pack_shaders.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -475,7 +475,7 @@ void PACK_APIENTRY crPackGetAttachedObjectsARB(VBoxGLhandleARB containerObj, GLs
 {
 	CR_GET_PACKER_CONTEXT(pc);
 	unsigned char *data_ptr;
-	(void) pc;
+	(void) pc; (void) obj;
 	CR_GET_BUFFERED_POINTER(pc, 32);
 	WRITE_DATA(0, GLint, 32);
 	WRITE_DATA(4, GLenum, CR_GETATTACHEDOBJECTSARB_EXTEND_OPCODE);
@@ -492,7 +492,7 @@ void PACK_APIENTRY crPackGetInfoLogARB(VBoxGLhandleARB obj, GLsizei maxLength, G
 {
 	CR_GET_PACKER_CONTEXT(pc);
 	unsigned char *data_ptr;
-	(void) pc;
+	(void) pc; (void) infoLog;
 	CR_GET_BUFFERED_POINTER(pc, 32);
 	WRITE_DATA(0, GLint, 32);
 	WRITE_DATA(4, GLenum, CR_GETINFOLOGARB_EXTEND_OPCODE);
diff --git a/src/VBox/GuestHost/OpenGL/packer/pack_texture.c b/src/VBox/GuestHost/OpenGL/packer/pack_texture.c
index 648a76d..6b33b1c 100644
--- a/src/VBox/GuestHost/OpenGL/packer/pack_texture.c
+++ b/src/VBox/GuestHost/OpenGL/packer/pack_texture.c
@@ -798,7 +798,7 @@ void PACK_APIENTRY crPackCompressedTexImage2DARB( GLenum target, GLint level, GL
         packet_length += imagesize;
     }
 
-    //crDebug( "Compressing that shit: %d", level );
+    /*crDebug( "Compressing that shit: %d", level );*/
 
     data_ptr = (unsigned char *) crPackAlloc( packet_length );
     WRITE_DATA( 0, GLenum, CR_COMPRESSEDTEXIMAGE2DARB_EXTEND_OPCODE );
diff --git a/src/VBox/GuestHost/OpenGL/packer/pack_visibleregion.c b/src/VBox/GuestHost/OpenGL/packer/pack_visibleregion.c
index e0155fc..566d3fe 100644
--- a/src/VBox/GuestHost/OpenGL/packer/pack_visibleregion.c
+++ b/src/VBox/GuestHost/OpenGL/packer/pack_visibleregion.c
@@ -1,9 +1,10 @@
+/* $Id: pack_visibleregion.c $ */
 /** @file
  * VBox Packing VisibleRegion information
  */
 
 /*
- * Copyright (C) 2008-2012 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -19,7 +20,7 @@
 #include "cr_error.h"
 
 #ifdef WINDOWS
-#include <windows.h>
+# include <iprt/win/windows.h>
 #endif
 
 void PACK_APIENTRY crPackWindowVisibleRegion( CR_PACKER_CONTEXT_ARGDECL GLint window, GLint cRects, const GLint * pRects )
@@ -51,5 +52,7 @@ void PACK_APIENTRY crPackWindowVisibleRegion( CR_PACKER_CONTEXT_ARGDECL GLint wi
 
 void PACK_APIENTRY crPackWindowVisibleRegionSWAP( CR_PACKER_CONTEXT_ARGDECL  GLint window, GLint cRects, const GLint * pRects )
 {
+    RT_NOREF3(window, cRects, pRects); CR_PACKER_CONTEXT_ARG_NOREF();
     crError( "crPackWindowVisibleRegionSWAP unimplemented and shouldn't be called" );
 }
+
diff --git a/src/VBox/GuestHost/OpenGL/spu_loader/dispatch.py b/src/VBox/GuestHost/OpenGL/spu_loader/dispatch.py
index 944be00..df9f514 100644
--- a/src/VBox/GuestHost/OpenGL/spu_loader/dispatch.py
+++ b/src/VBox/GuestHost/OpenGL/spu_loader/dispatch.py
@@ -118,7 +118,7 @@ void crSPUInitDispatchNops(SPUDispatchTable *table)
 	for (i = 0; i < numEntries; i++) {
 		if (ptr[i] == NULL) {
 			/*printf("!!!!!!!Warning entry[%d] = NULL\n", i);*/
-			ptr[i] = (void *)NopFunction;
+			ptr[i] = (void *)(uintptr_t)NopFunction;
 		}
 	}
 }
diff --git a/src/VBox/GuestHost/OpenGL/spu_loader/glloader.py b/src/VBox/GuestHost/OpenGL/spu_loader/glloader.py
index a84f729..4b0d9ef 100644
--- a/src/VBox/GuestHost/OpenGL/spu_loader/glloader.py
+++ b/src/VBox/GuestHost/OpenGL/spu_loader/glloader.py
@@ -23,7 +23,11 @@ print """
 
 #include <stdio.h>
 #if defined(WINDOWS)
+# ifdef VBOX
+#  include <iprt/win/windows.h>
+# else
 #include <windows.h>
+# endif
 #include <process.h>
 #include <direct.h>
 #define SYSTEM_GL "opengl32.dll"
@@ -41,7 +45,7 @@ print """
 #else
 #define SYSTEM_GL "libGL.so.1"
 #endif
-typedef void (*glxfuncptr)();
+typedef void (*glxfuncptr)(void);
 extern glxfuncptr glxGetProcAddressARB( const GLubyte *name );
 #else
 #error I don't know where your system's GL lives.  Too bad.
@@ -80,7 +84,7 @@ fillin( SPUNamedFunctionTable *entry, const char *funcName, SPUGenericFunction f
 }
 
 #ifndef WINDOWS
-static int FileExists(char *directory, char *filename)
+/*static int FileExists(char *directory, char *filename)
 {
 	FILE *f;
 	char fullFilename[8096];
@@ -97,7 +101,7 @@ static int FileExists(char *directory, char *filename)
 	else {
 	    return 0;
 	}
-}
+}*/
 #endif
 
 
diff --git a/src/VBox/GuestHost/OpenGL/spu_loader/spuchange.py b/src/VBox/GuestHost/OpenGL/spu_loader/spuchange.py
index 0f763f8..0dc592f 100644
--- a/src/VBox/GuestHost/OpenGL/spu_loader/spuchange.py
+++ b/src/VBox/GuestHost/OpenGL/spu_loader/spuchange.py
@@ -32,9 +32,9 @@ void crSPUChangeInterface( SPUDispatchTable *table, void *orig_func, void *new_f
 
 keys = apiutil.GetDispatchedFunctions(sys.argv[1]+"/APIspec.txt")
 for func_name in keys:
-	print '\tif ((void *)table->%s == orig_func)' % func_name
+	print '\tif ((uintptr_t)table->%s == (uintptr_t)orig_func)' % func_name
 	print '\t{'
-	print '\t\ttable->%s = (%sFunc_t)new_func;' % (func_name, func_name)
+	print '\t\ttable->%s = (%sFunc_t)(uintptr_t)new_func;' % (func_name, func_name)
 	print '\t\tfor (temp = table->copyList ; temp ; temp = temp->next)'
 	print '\t\t{'
 	print '\t\t\tcrSPUChangeInterface( temp->copy, orig_func, new_func );'
@@ -64,8 +64,8 @@ for func_name in keys:
     print '\tfunc = crSPUFindFunction(newtable, "%s");' % func_name
     print '\tif (func && ((SPUGenericFunction)dispatch->%s!=func))' % func_name
     print '\t{'
-    print '\t\tcrDebug("%%s changed from %%p to %%p", "gl%s", dispatch->%s, func);' % (func_name, func_name)
-    print '\t\tcrSPUChangeInterface(dispatch, dispatch->%s, func);' % func_name
+    print '\t\tcrDebug("%%s changed from %%p to %%p", "gl%s", (void *)(uintptr_t)dispatch->%s, (void *)(uintptr_t)func);' % (func_name, func_name)
+    print '\t\tcrSPUChangeInterface(dispatch, (void *)(uintptr_t)dispatch->%s, (void *)(uintptr_t)func);' % func_name
     print '\t}\n'
 print """
 }
diff --git a/src/VBox/GuestHost/OpenGL/spu_loader/spuinit.c b/src/VBox/GuestHost/OpenGL/spu_loader/spuinit.c
index 959e65b..5591df9 100644
--- a/src/VBox/GuestHost/OpenGL/spu_loader/spuinit.c
+++ b/src/VBox/GuestHost/OpenGL/spu_loader/spuinit.c
@@ -27,6 +27,8 @@ void crSPUInitDispatchTable( SPUDispatchTable *table )
     table->server = NULL;
 }
 
+#if 0 /* unused */
+
 static int validate_int( const char *response, 
              const char *min,
              const char *max )
@@ -161,6 +163,8 @@ static int validate_option( const SPUOptions *opt, const char *response )
     return retval;
 }
 
+#endif /* unused */
+
 /** Use the default values for all the options:
  */
 void crSPUSetDefaultParams( void *spu, SPUOptions *options )
diff --git a/src/VBox/GuestHost/OpenGL/state_tracker/dump.cpp b/src/VBox/GuestHost/OpenGL/state_tracker/dump.cpp
index 8132d9f..e5c4c41 100644
--- a/src/VBox/GuestHost/OpenGL/state_tracker/dump.cpp
+++ b/src/VBox/GuestHost/OpenGL/state_tracker/dump.cpp
@@ -4,7 +4,7 @@
  * Blitter API implementation
  */
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/GuestHost/OpenGL/state_tracker/state_bits_globalop.h b/src/VBox/GuestHost/OpenGL/state_tracker/state_bits_globalop.h
index 351a85a..5406129 100644
--- a/src/VBox/GuestHost/OpenGL/state_tracker/state_bits_globalop.h
+++ b/src/VBox/GuestHost/OpenGL/state_tracker/state_bits_globalop.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/GuestHost/OpenGL/state_tracker/state_bufferobject.c b/src/VBox/GuestHost/OpenGL/state_tracker/state_bufferobject.c
index bd6a1e2..a659d64 100644
--- a/src/VBox/GuestHost/OpenGL/state_tracker/state_bufferobject.c
+++ b/src/VBox/GuestHost/OpenGL/state_tracker/state_bufferobject.c
@@ -973,8 +973,8 @@ static void crStateBufferObjectIntCmp(CRBufferObjectBits *bb, CRbitvalue *bitID,
 void crStateBufferObjectDiff(CRBufferObjectBits *bb, CRbitvalue *bitID,
                              CRContext *fromCtx, CRContext *toCtx)
 {
-    CRBufferObjectState *from = &(fromCtx->bufferobject);
-    const CRBufferObjectState *to = &(toCtx->bufferobject);
+    /*CRBufferObjectState *from = &(fromCtx->bufferobject); - unused
+    const CRBufferObjectState *to = &(toCtx->bufferobject); - unused */
 
     if (!HaveBufferObjectExtension())
         return;
@@ -986,6 +986,7 @@ static void crStateBufferObjectSyncCB(unsigned long key, void *data1, void *data
 {
     CRBufferObject *pBufferObj = (CRBufferObject *) data1;
     CRBufferObjectState *pState = (CRBufferObjectState *) data2;
+    (void)key;
 
     if (pBufferObj->id && !pBufferObj->hwid)
     {
@@ -1019,7 +1020,7 @@ static void crStateBufferObjectSyncCB(unsigned long key, void *data1, void *data
 void crStateBufferObjectSwitch(CRBufferObjectBits *bb, CRbitvalue *bitID, 
                                CRContext *fromCtx, CRContext *toCtx)
 {
-    const CRBufferObjectState *from = &(fromCtx->bufferobject);
+    /*const CRBufferObjectState *from = &(fromCtx->bufferobject); - unused */
     CRBufferObjectState *to = &(toCtx->bufferobject);
     int i;
 
diff --git a/src/VBox/GuestHost/OpenGL/state_tracker/state_client.c b/src/VBox/GuestHost/OpenGL/state_tracker/state_client.c
index a9cb734..5b4cb4d 100644
--- a/src/VBox/GuestHost/OpenGL/state_tracker/state_client.c
+++ b/src/VBox/GuestHost/OpenGL/state_tracker/state_client.c
@@ -1534,6 +1534,7 @@ void STATE_APIENTRY crStateVertexArrayRangeNV(GLsizei length, const GLvoid *poin
 {
   /* XXX todo */
     crWarning("crStateVertexArrayRangeNV not implemented");
+    (void)length; (void)pointer;
 }
 
 
@@ -1546,25 +1547,27 @@ void STATE_APIENTRY crStateFlushVertexArrayRangeNV(void)
 /*Returns if the given clientpointer could be used on server side directly*/
 #define CRSTATE_IS_SERVER_CP(cp) (!(cp).enabled || !(cp).p || ((cp).buffer && (cp).buffer->id) || ((cp).locked))
 
+#if defined(DEBUG) && 0
 static void crStateDumpClientPointer(CRClientPointer *cp, const char *name, int i)
 {
   if (i<0 && cp->enabled)
   {
     crDebug("CP(%s): enabled:%d ptr:%p buffer:%p buffer.name:%i locked: %i %s",
-            name, cp->enabled, cp->p, cp->buffer, cp->buffer? cp->buffer->id:-1, (int)cp->locked,
+            name, cp->enabled, cp->p, cp->buffer, cp->buffer ? cp->buffer->id : ~(GLuint)0, (int)cp->locked,
             CRSTATE_IS_SERVER_CP(*cp) ? "":"!FAIL!");
   }
   else if (0==i || cp->enabled)
   {
     crDebug("CP(%s%i): enabled:%d ptr:%p buffer:%p buffer.name:%i locked: %i %s",
-            name, i, cp->enabled, cp->p, cp->buffer, cp->buffer? cp->buffer->id:-1, (int)cp->locked,
+            name, i, cp->enabled, cp->p, cp->buffer, cp->buffer ? cp->buffer->id : ~(GLuint)0, (int)cp->locked,
             CRSTATE_IS_SERVER_CP(*cp) ? "":"!FAIL!");
   }
 }
+#endif
 
 #ifdef DEBUG_misha
 /* debugging */
-//# define CR_NO_SERVER_ARRAYS
+/*# define CR_NO_SERVER_ARRAYS*/
 #endif
 
 /*
diff --git a/src/VBox/GuestHost/OpenGL/state_tracker/state_current.c b/src/VBox/GuestHost/OpenGL/state_tracker/state_current.c
index a128ae6..511f997 100644
--- a/src/VBox/GuestHost/OpenGL/state_tracker/state_current.c
+++ b/src/VBox/GuestHost/OpenGL/state_tracker/state_current.c
@@ -365,7 +365,6 @@ crStateCurrentDiff( CRCurrentBits *c, CRbitvalue *bitID,
             (toCtx->extensions.ARB_vertex_program ||
              (toCtx->extensions.NV_vertex_program))) {
         const unsigned attribsUsedMask = toCtx->current.attribsUsedMask;
-        int i;
         for (i = 1; i < CR_MAX_VERTEX_ATTRIBS; i++) {  /* skip zero */
             if ((attribsUsedMask & (1 << i))
                     && CHECKDIRTY(c->vertexAttrib[i], bitID)) {
diff --git a/src/VBox/GuestHost/OpenGL/state_tracker/state_diff.c b/src/VBox/GuestHost/OpenGL/state_tracker/state_diff.c
index c987ebb..a2c39e7 100644
--- a/src/VBox/GuestHost/OpenGL/state_tracker/state_diff.c
+++ b/src/VBox/GuestHost/OpenGL/state_tracker/state_diff.c
@@ -142,7 +142,7 @@ void crStateFreeFBImageLegacy(CRContext *to)
 
 int crStateAcquireFBImage(CRContext *to, CRFBData *data)
 {
-    CRBufferState *pBuf = &to->buffer;
+    /*CRBufferState *pBuf = &to->buffer; - unused */
     CRPixelPackState packing = to->client.pack;
     uint32_t i;
 
@@ -279,7 +279,7 @@ int crStateAcquireFBImage(CRContext *to, CRFBData *data)
 void crStateApplyFBImage(CRContext *to, CRFBData *data)
 {
     {
-        CRBufferState *pBuf = &to->buffer;
+        /*CRBufferState *pBuf = &to->buffer; - unused */
         CRPixelPackState unpack = to->client.unpack;
         uint32_t i;
 
@@ -596,7 +596,7 @@ void crStateSyncHWErrorState(CRContext *ctx)
     }
 }
 
-GLenum crStateCleanHWErrorState()
+GLenum crStateCleanHWErrorState(void)
 {
     GLenum err;
     while ((err = diff_api.GetError()) != GL_NO_ERROR)
diff --git a/src/VBox/GuestHost/OpenGL/state_tracker/state_enable.c b/src/VBox/GuestHost/OpenGL/state_tracker/state_enable.c
index 185de9e..dca7d98 100644
--- a/src/VBox/GuestHost/OpenGL/state_tracker/state_enable.c
+++ b/src/VBox/GuestHost/OpenGL/state_tracker/state_enable.c
@@ -388,9 +388,9 @@ static void __enableSet (CRContext *g, CRStateBits *sb, CRbitvalue *neg_bitid,
 		case GL_MAP1_VERTEX_ATTRIB14_4_NV:
 		case GL_MAP1_VERTEX_ATTRIB15_4_NV:
 			{
-				const GLint i = cap - GL_MAP1_VERTEX_ATTRIB0_4_NV;
-				g->eval.enableAttrib1D[i] = val;
-				DIRTY(sb->program.map1AttribArrayEnable[i], neg_bitid);
+				const GLint idx = cap - GL_MAP1_VERTEX_ATTRIB0_4_NV;
+				g->eval.enableAttrib1D[idx] = val;
+				DIRTY(sb->program.map1AttribArrayEnable[idx], neg_bitid);
 				DIRTY(sb->program.dirty, neg_bitid);
 			}
 			break;
@@ -411,9 +411,9 @@ static void __enableSet (CRContext *g, CRStateBits *sb, CRbitvalue *neg_bitid,
 		case GL_MAP2_VERTEX_ATTRIB14_4_NV:
 		case GL_MAP2_VERTEX_ATTRIB15_4_NV:
 			{
-				const GLint i = cap - GL_MAP2_VERTEX_ATTRIB0_4_NV;
-				g->eval.enableAttrib2D[i] = val;
-				DIRTY(sb->program.map2AttribArrayEnable[i], neg_bitid);
+				const GLint idx = cap - GL_MAP2_VERTEX_ATTRIB0_4_NV;
+				g->eval.enableAttrib2D[idx] = val;
+				DIRTY(sb->program.map2AttribArrayEnable[idx], neg_bitid);
 				DIRTY(sb->program.dirty, neg_bitid);
 			}
 			break;
diff --git a/src/VBox/GuestHost/OpenGL/state_tracker/state_fence.c b/src/VBox/GuestHost/OpenGL/state_tracker/state_fence.c
index 9dce5e9..038839b 100644
--- a/src/VBox/GuestHost/OpenGL/state_tracker/state_fence.c
+++ b/src/VBox/GuestHost/OpenGL/state_tracker/state_fence.c
@@ -12,33 +12,40 @@
 
 void APIENTRY crStateGenFencesNV(GLsizei n, GLuint *fences)
 {
+    (void)n; (void)fences;
 }
 
 
 void APIENTRY crStateDeleteFencesNV(GLsizei n, const GLuint *fences)
 {
+    (void)n; (void)fences;
 }
 
 void APIENTRY crStateSetFenceNV(GLuint fence, GLenum condition)
 {
+    (void)fence; (void)condition;
 }
 
 GLboolean APIENTRY crStateTestFenceNV(GLuint fence)
 {
-   return GL_FALSE;
+    (void)fence;
+    return GL_FALSE;
 }
 
 void APIENTRY crStateFinishFenceNV(GLuint fence)
 {
+    (void)fence;
 }
 
 GLboolean APIENTRY crStateIsFenceNV(GLuint fence)
 {
-   return GL_FALSE;
+    (void)fence;
+    return GL_FALSE;
 }
 
 void APIENTRY crStateGetFenceivNV(GLuint fence, GLenum pname, GLint *params)
 {
+    (void)fence; (void)pname; (void)params;
 }
 
 
diff --git a/src/VBox/GuestHost/OpenGL/state_tracker/state_framebuffer.c b/src/VBox/GuestHost/OpenGL/state_tracker/state_framebuffer.c
index cf27ac8..0b570eb 100644
--- a/src/VBox/GuestHost/OpenGL/state_tracker/state_framebuffer.c
+++ b/src/VBox/GuestHost/OpenGL/state_tracker/state_framebuffer.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2009-2013 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -227,7 +227,7 @@ DECLEXPORT(void) STATE_APIENTRY
 crStateDeleteRenderbuffersEXT(GLsizei n, const GLuint *renderbuffers)
 {
     CRContext *g = GetCurrentContext();
-    CRFramebufferObjectState *fbo = &g->framebufferobject;
+    /*CRFramebufferObjectState *fbo = &g->framebufferobject; - unused */
     int i;
 
     CRSTATE_CHECKERR(g->current.inBeginEnd, GL_INVALID_OPERATION, "called in begin/end");
@@ -480,7 +480,7 @@ crStateDeleteFramebuffersEXT(GLsizei n, const GLuint *framebuffers)
 
 /*@todo: move this function somewhere else*/
 /*return floor of base 2 log of x. log(0)==0*/
-unsigned int crLog2Floor(unsigned int x)
+static unsigned int crLog2Floor(unsigned int x)
 {
     x |= (x >> 1);
     x |= (x >> 2);
@@ -591,7 +591,7 @@ static GLuint crStateFramebufferTextureCheck(GLenum target, GLenum attachment, G
     }
 
     CRSTATE_CHECKERR_RET(level<0, GL_INVALID_VALUE, "level<0", 0);
-    CRSTATE_CHECKERR_RET(level>maxtexsizelog2, GL_INVALID_VALUE, "level too big", 0);
+    CRSTATE_CHECKERR_RET((GLuint)level>maxtexsizelog2, GL_INVALID_VALUE, "level too big", 0);
 
 #ifdef IN_GUEST
     for (i = 0; i < cFBOs; ++i)
@@ -613,7 +613,7 @@ DECLEXPORT(void) STATE_APIENTRY
 crStateFramebufferTexture1DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
 {
     CRContext *g = GetCurrentContext();
-    CRFramebufferObjectState *fbo = &g->framebufferobject;
+    /*CRFramebufferObjectState *fbo = &g->framebufferobject; - unused */
     CRFBOAttachmentPoint *aap[2];
     GLuint cap, i;
     CRTextureObj *tobj;
@@ -647,7 +647,7 @@ DECLEXPORT(void) STATE_APIENTRY
 crStateFramebufferTexture2DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
 {
     CRContext *g = GetCurrentContext();
-    CRFramebufferObjectState *fbo = &g->framebufferobject;
+    /* CRFramebufferObjectState *fbo = &g->framebufferobject; - unused */
     CRFBOAttachmentPoint *aap[2];
     GLuint cap, i;
     CRTextureObj *tobj;
@@ -685,7 +685,7 @@ DECLEXPORT(void) STATE_APIENTRY
 crStateFramebufferTexture3DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)
 {
     CRContext *g = GetCurrentContext();
-    CRFramebufferObjectState *fbo = &g->framebufferobject;
+    /* CRFramebufferObjectState *fbo = &g->framebufferobject; - unused */
     CRFBOAttachmentPoint *aap[2];
     GLuint cap, i;
     CRTextureObj *tobj;
@@ -702,7 +702,7 @@ crStateFramebufferTexture3DEXT(GLenum target, GLenum attachment, GLenum textarge
         return;
     }
 
-    CRSTATE_CHECKERR(zoffset>(g->limits.max3DTextureSize-1), GL_INVALID_VALUE, "zoffset too big");
+    CRSTATE_CHECKERR(zoffset>((GLint)g->limits.max3DTextureSize-1), GL_INVALID_VALUE, "zoffset too big");
     CRSTATE_CHECKERR(textarget!=GL_TEXTURE_3D, GL_INVALID_OPERATION, "textarget");
 
     CR_STATE_SHAREDOBJ_USAGE_SET(tobj, g);
@@ -726,6 +726,7 @@ crStateFramebufferRenderbufferEXT(GLenum target, GLenum attachment, GLenum rende
     GLuint cFBOs, i;
     CRFBOAttachmentPoint *aap[2];
     CRRenderbufferObject *rb;
+    (void)renderbuffertarget;
 
     CRSTATE_CHECKERR(g->current.inBeginEnd, GL_INVALID_OPERATION, "called in begin/end");
     CRSTATE_CHECKERR(((target!=GL_FRAMEBUFFER_EXT) && (target!=GL_READ_FRAMEBUFFER) && (target!=GL_DRAW_FRAMEBUFFER)),
@@ -871,12 +872,14 @@ DECLEXPORT(GLboolean)  STATE_APIENTRY crStateIsRenderbufferEXT( GLuint renderbuf
 DECLEXPORT(void) STATE_APIENTRY
 crStateGenerateMipmapEXT(GLenum target)
 {
+    (void)target;
     /*@todo*/
 }
 
 static void crStateSyncRenderbuffersCB(unsigned long key, void *data1, void *data2)
 {
     CRRenderbufferObject *pRBO = (CRRenderbufferObject*) data1;
+    (void)key; (void)data2;
 
     diff_api.GenRenderbuffersEXT(1, &pRBO->hwid);
 
@@ -942,6 +945,7 @@ static void crStateSyncFramebuffersCB(unsigned long key, void *data1, void *data
     CRFramebufferObject *pFBO = (CRFramebufferObject*) data1;
     CRContext *ctx = (CRContext*) data2;
     GLint i;
+    (void)key;
 
     diff_api.GenFramebuffersEXT(1, &pFBO->hwid);
 
@@ -1088,7 +1092,7 @@ DECLEXPORT(GLuint) STATE_APIENTRY crStateGetFramebufferHWID(GLuint id)
 {
     CRContext *g = GetCurrentContext();
     CRFramebufferObject *pFBO = (CRFramebufferObject*) crHashtableSearch(g->shared->fbTable, id);
-#if 0 //def DEBUG_misha
+#if 0 /*def DEBUG_misha*/
     crDebug("FB id(%d) hw(%d)", id, pFBO ? pFBO->hwid : 0);
 #endif
     return pFBO ? pFBO->hwid : 0;
diff --git a/src/VBox/GuestHost/OpenGL/state_tracker/state_glsl.c b/src/VBox/GuestHost/OpenGL/state_tracker/state_glsl.c
index 8ea88b1..830b020 100644
--- a/src/VBox/GuestHost/OpenGL/state_tracker/state_glsl.c
+++ b/src/VBox/GuestHost/OpenGL/state_tracker/state_glsl.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -135,7 +135,7 @@ static void crStateFakeDecRefCountCB(unsigned long key, void *data1, void *data2
     CRGLSLShader *pShader = (CRGLSLShader *) data1;
     CRContext *ctx = (CRContext*) data2;
     CRGLSLShader *pRealShader;
-    (void) key;
+    (void) key; (void)ctx;
 
     pRealShader = crStateGetShaderObj(pShader->id);
     
@@ -405,6 +405,7 @@ DECLEXPORT(void) STATE_APIENTRY crStateCompileShader(GLuint shader)
 
 static void crStateDbgCheckNoProgramOfId(void *data)
 {
+    (void)data;
     crError("Unexpected Program id");
 }
 
@@ -848,7 +849,7 @@ crStateGLSLProgramCacheUniforms(GLuint program, GLsizei cbData, GLvoid *pData)
         crStateFreeProgramUniforms(pProgram);
     }
 
-    if (cbData<sizeof(GLsizei))
+    if (cbData<(GLsizei)sizeof(GLsizei))
     {
         crWarning("crStateGLSLProgramCacheUniforms: data too short");
         return;
@@ -858,7 +859,7 @@ crStateGLSLProgramCacheUniforms(GLuint program, GLsizei cbData, GLvoid *pData)
     pCurrent += sizeof(GLsizei);
     cbRead = sizeof(GLsizei);
 
-    //crDebug("crStateGLSLProgramCacheUniforms: %i active uniforms", pProgram->cUniforms);
+    /*crDebug("crStateGLSLProgramCacheUniforms: %i active uniforms", pProgram->cUniforms);*/
 
     if (pProgram->cUniforms)
     {
@@ -895,7 +896,7 @@ crStateGLSLProgramCacheUniforms(GLuint program, GLsizei cbData, GLvoid *pData)
         pProgram->pUniforms[i].name = crStrndup(pCurrent, cbName);
         pCurrent += cbName;
 
-        //crDebug("crStateGLSLProgramCacheUniforms: uniform[%i]=%d, %s", i, pProgram->pUniforms[i].location, pProgram->pUniforms[i].name);
+        /*crDebug("crStateGLSLProgramCacheUniforms: uniform[%i]=%d, %s", i, pProgram->pUniforms[i].location, pProgram->pUniforms[i].name);*/
     }
 
     pProgram->bUniformsSynced = GL_TRUE;
@@ -924,7 +925,7 @@ crStateGLSLProgramCacheAttribs(GLuint program, GLsizei cbData, GLvoid *pData)
         crStateFreeProgramAttribsLocationCache(pProgram);
     }
 
-    if (cbData<sizeof(GLsizei))
+    if (cbData<(GLsizei)sizeof(GLsizei))
     {
         WARN(("crStateGLSLProgramCacheAttribs: data too short"));
         return;
@@ -990,7 +991,7 @@ static GLboolean crStateGLSLProgramCacheOneUniform(GLuint location, GLsizei cbNa
         return GL_FALSE;
     }
 
-    //crDebug("crStateGLSLProgramCacheUniforms: uniform[%i]=%s.", location, pName);
+    /*crDebug("crStateGLSLProgramCacheUniforms: uniform[%i]=%s.", location, pName);*/
 
     ((GLint*)*pCurrent)[0] = location;
     *pCurrent += sizeof(GLint);
@@ -1321,6 +1322,7 @@ static void crStateGLSLCreateShadersCB(unsigned long key, void *data1, void *dat
 {
     CRGLSLShader *pShader = (CRGLSLShader*) data1;
     CRContext *ctx = (CRContext *) data2;
+    (void)ctx; (void)key;
 
     pShader->hwid = diff_api.CreateShader(pShader->type);
 }
@@ -1386,6 +1388,7 @@ static void crStateGLSLCreateProgramCB(unsigned long key, void *data1, void *dat
     CRGLSLProgram *pProgram = (CRGLSLProgram*) data1;
     CRContext *ctx = (CRContext *) data2;
     GLuint i;
+    (void)key;
 
     pProgram->hwid = diff_api.CreateProgram();
 
diff --git a/src/VBox/GuestHost/OpenGL/state_tracker/state_init.c b/src/VBox/GuestHost/OpenGL/state_tracker/state_init.c
index c2e4116..db000b2 100644
--- a/src/VBox/GuestHost/OpenGL/state_tracker/state_init.c
+++ b/src/VBox/GuestHost/OpenGL/state_tracker/state_init.c
@@ -75,7 +75,7 @@ void crStateOnTextureUsageRelease(CRSharedState *pS, CRTextureObj *pObj)
         Assert(crHashtableSearch(pS->textureTable, pObj->id));
 }
 
-void crStateReleaseTextureInternal(CRSharedState *pS, CRContext *pCtx, CRTextureObj *pObj)
+static void crStateReleaseTextureInternal(CRSharedState *pS, CRContext *pCtx, CRTextureObj *pObj)
 {
     Assert(CR_STATE_SHAREDOBJ_USAGE_IS_USED(pObj) || pObj->pinned);
     CR_STATE_SHAREDOBJ_USAGE_CLEAR(pObj, pCtx);
@@ -101,7 +101,7 @@ DECLEXPORT(void) crStateReleaseTexture(CRContext *pCtx, CRTextureObj *pObj)
     crStateOnTextureUsageRelease(gSharedState, pObj);
 }
 
-void crStateReleaseBufferObjectInternal(CRSharedState *pS, CRContext *pCtx, CRBufferObject *pObj)
+static void crStateReleaseBufferObjectInternal(CRSharedState *pS, CRContext *pCtx, CRBufferObject *pObj)
 {
     Assert(CR_STATE_SHAREDOBJ_USAGE_IS_USED(pObj));
     CR_STATE_SHAREDOBJ_USAGE_CLEAR(pObj, pCtx);
@@ -109,7 +109,7 @@ void crStateReleaseBufferObjectInternal(CRSharedState *pS, CRContext *pCtx, CRBu
         crHashtableDelete(pS->buffersTable, pObj->id, crStateFreeBufferObject);
 }
 
-void crStateReleaseFBOInternal(CRSharedState *pS, CRContext *pCtx, CRFramebufferObject *pObj)
+static void crStateReleaseFBOInternal(CRSharedState *pS, CRContext *pCtx, CRFramebufferObject *pObj)
 {
     Assert(CR_STATE_SHAREDOBJ_USAGE_IS_USED(pObj));
     CR_STATE_SHAREDOBJ_USAGE_CLEAR(pObj, pCtx);
@@ -117,7 +117,7 @@ void crStateReleaseFBOInternal(CRSharedState *pS, CRContext *pCtx, CRFramebuffer
         crHashtableDelete(pS->fbTable, pObj->id, crStateFreeFBO);
 }
 
-void crStateReleaseRBOInternal(CRSharedState *pS, CRContext *pCtx, CRRenderbufferObject *pObj)
+static void crStateReleaseRBOInternal(CRSharedState *pS, CRContext *pCtx, CRRenderbufferObject *pObj)
 {
     Assert(CR_STATE_SHAREDOBJ_USAGE_IS_USED(pObj));
     CR_STATE_SHAREDOBJ_USAGE_CLEAR(pObj, pCtx);
@@ -129,6 +129,7 @@ static void ReleaseTextureCallback(unsigned long key, void *data1, void *data2)
 {
     PCR_STATE_RELEASEOBJ pData = (PCR_STATE_RELEASEOBJ)data2;
     CRTextureObj *pObj = (CRTextureObj *)data1;
+    (void)key;
     crStateReleaseTextureInternal(pData->s, pData->pCtx, pObj);
 }
 
@@ -136,6 +137,7 @@ static void ReleaseBufferObjectCallback(unsigned long key, void *data1, void *da
 {
     PCR_STATE_RELEASEOBJ pData = (PCR_STATE_RELEASEOBJ)data2;
     CRBufferObject *pObj = (CRBufferObject *)data1;
+    (void)key;
     crStateReleaseBufferObjectInternal(pData->s, pData->pCtx, pObj);
 }
 
@@ -143,6 +145,7 @@ static void ReleaseFBOCallback(unsigned long key, void *data1, void *data2)
 {
     PCR_STATE_RELEASEOBJ pData = (PCR_STATE_RELEASEOBJ)data2;
     CRFramebufferObject *pObj = (CRFramebufferObject *)data1;
+    (void)key;
     crStateReleaseFBOInternal(pData->s, pData->pCtx, pObj);
 }
 
@@ -150,14 +153,19 @@ static void ReleaseRBOCallback(unsigned long key, void *data1, void *data2)
 {
     PCR_STATE_RELEASEOBJ pData = (PCR_STATE_RELEASEOBJ)data2;
     CRRenderbufferObject *pObj = (CRRenderbufferObject *)data1;
+    (void)key;
     crStateReleaseRBOInternal(pData->s, pData->pCtx, pObj);
 }
 
+
 /**
  * Decrement shared state's refcount and delete when it hits zero.
  */
-DECLEXPORT(void)
-crStateFreeShared(CRContext *pContext, CRSharedState *s)
+#ifndef IN_GUEST
+DECLEXPORT(void) crStateFreeShared(CRContext *pContext, CRSharedState *s)
+#else
+static void crStateFreeShared(CRContext *pContext, CRSharedState *s)
+#endif
 {
     int32_t refCount = ASMAtomicDecS32(&s->refCount);
 
@@ -187,7 +195,9 @@ crStateFreeShared(CRContext *pContext, CRSharedState *s)
     }
 }
 
-DECLEXPORT(CRSharedState *) crStateGlobalSharedAcquire()
+#ifndef IN_GUEST
+
+DECLEXPORT(CRSharedState *) crStateGlobalSharedAcquire(void)
 {
     if (!gSharedState)
     {
@@ -198,11 +208,13 @@ DECLEXPORT(CRSharedState *) crStateGlobalSharedAcquire()
     return gSharedState;
 }
 
-DECLEXPORT(void) crStateGlobalSharedRelease()
+DECLEXPORT(void) crStateGlobalSharedRelease(void)
 {
     crStateFreeShared(NULL, gSharedState);
 }
 
+#endif /* IN_GUEST */
+
 DECLEXPORT(void) STATE_APIENTRY
 crStateShareContext(GLboolean value)
 {
@@ -297,13 +309,13 @@ static DECLCALLBACK(void) crStateContextDtor(void *pvCtx)
  * Helper for crStateCreateContext, below.
  */
 static CRContext *
-crStateCreateContextId(int i, const CRLimitsState *limits,
-                                             GLint visBits, CRContext *shareCtx)
+crStateCreateContextId(int i, const CRLimitsState *limits, GLint visBits, CRContext *shareCtx)
 {
     CRContext *ctx;
     int j;
     int node32 = i >> 5;
     int node = i & 0x1f;
+    (void)limits;
 
     if (g_pAvailableContexts[i] != NULL)
     {
@@ -799,24 +811,28 @@ void STATE_APIENTRY
 crStateChromiumParameteriCR( GLenum target, GLint value )
 {
     /* This no-op function helps smooth code-gen */
+    (void)target; (void)value;
 }
 
 void STATE_APIENTRY
 crStateChromiumParameterfCR( GLenum target, GLfloat value )
 {
     /* This no-op function helps smooth code-gen */
+    (void)target; (void)value;
 }
 
 void STATE_APIENTRY
 crStateChromiumParametervCR( GLenum target, GLenum type, GLsizei count, const GLvoid *values )
 {
     /* This no-op function helps smooth code-gen */
+    (void)target; (void)type; (void)count; (void)values;
 }
 
 void STATE_APIENTRY
 crStateGetChromiumParametervCR( GLenum target, GLuint index, GLenum type, GLsizei count, GLvoid *values )
 {
     /* This no-op function helps smooth code-gen */
+    (void)target; (void)index; (void)type; (void)count; (void)values;
 }
 
 void STATE_APIENTRY
@@ -824,42 +840,53 @@ crStateReadPixels( GLint x, GLint y, GLsizei width, GLsizei height,
                                      GLenum format, GLenum type, GLvoid *pixels )
 {
     /* This no-op function helps smooth code-gen */
+    (void)x; (void)y; (void)width; (void)height; (void)format; (void)type; (void)pixels;
 }
 
-void crStateVBoxDetachThread()
+void crStateVBoxDetachThread(void)
 {
     /* release the context ref so that it can be freed */
     SetCurrentContext(NULL);
 }
 
 
-void crStateVBoxAttachThread()
+void crStateVBoxAttachThread(void)
 {
 }
 
+#if 0 /* who's refering to these? */
+
 GLint crStateVBoxCreateContext( GLint con, const char * dpyName, GLint visual, GLint shareCtx )
 {
+    (void)con; (void)dpyName; (void)visual; (void)shareCtx;
     return 0;
 }
 
 GLint crStateVBoxWindowCreate( GLint con, const char *dpyName, GLint visBits  )
 {
+    (void)con; (void)dpyName; (void)visBits;
     return 0;
 }
 
 void crStateVBoxWindowDestroy( GLint con, GLint window )
 {
+    (void)con; (void)window;
 }
 
 GLint crStateVBoxConCreate(struct VBOXUHGSMI *pHgsmi)
 {
+    (void)pHgsmi;
     return 0;
 }
 
 void crStateVBoxConDestroy(GLint con)
 {
+    (void)con;
 }
 
 void crStateVBoxConFlush(GLint con)
 {
+    (void)con;
 }
+
+#endif /* unused? */
diff --git a/src/VBox/GuestHost/OpenGL/state_tracker/state_lists.c b/src/VBox/GuestHost/OpenGL/state_tracker/state_lists.c
index 47eaab6..7351139 100644
--- a/src/VBox/GuestHost/OpenGL/state_tracker/state_lists.c
+++ b/src/VBox/GuestHost/OpenGL/state_tracker/state_lists.c
@@ -13,6 +13,7 @@
 void crStateListsDestroy(CRContext *ctx)
 {
     /* nothing - dlists are in shared state */
+    (void)ctx;
 }
 
 void crStateListsInit(CRContext *ctx)
@@ -30,7 +31,7 @@ void crStateListsInit(CRContext *ctx)
     RESET(lb->dirty, ctx->bitid);
 }
 
-//#define CRSTATE_DEBUG_QUERY_HW_STATE
+/*#define CRSTATE_DEBUG_QUERY_HW_STATE*/
 
 #ifndef CRSTATE_DEBUG_QUERY_HW_STATE
 # define CRSTATE_SET_CAP(state, value, format) g->state=value
@@ -172,7 +173,7 @@ void STATE_APIENTRY crStateQueryHWState(GLuint fbFbo, GLuint bbFbo)
 {
     CRContext *g = GetCurrentContext();
     CRStateBits *sb = GetCurrentBits();
-    CRbitvalue *bitID=g->bitid, *negbitID=g->neg_bitid;
+    CRbitvalue /* *bitID=g->bitid, */ *negbitID=g->neg_bitid;
 
     CRASSERT(g_bVBoxEnableDiffOnMakeCurrent);
 
@@ -818,7 +819,7 @@ void STATE_APIENTRY crStateQueryHWState(GLuint fbFbo, GLuint bbFbo)
     if (CHECKDIRTY(sb->eval.dirty, negbitID))
     {
         int i;
-        const int gleval_sizes[] = {4, 1, 3, 1, 2, 3, 4, 3, 4};
+        const int gleval_sizes_dup[] = {4, 1, 3, 1, 2, 3, 4, 3, 4};
 
         if (CHECKDIRTY(sb->eval.enable, negbitID))
         {
@@ -849,7 +850,7 @@ void STATE_APIENTRY crStateQueryHWState(GLuint fbFbo, GLuint bbFbo)
                 diff_api.GetMapfv(i + GL_MAP1_COLOR_4, GL_DOMAIN, &uval[0]);
                 if (order>0)
                 {
-                    coeffs = crAlloc(order * gleval_sizes[i] * sizeof(GLfloat));
+                    coeffs = crAlloc(order * gleval_sizes_dup[i] * sizeof(GLfloat));
                     if (!coeffs)
                     {
                         crWarning("crStateQueryHWState: out of memory, at eval1D[%i]", i);
@@ -888,7 +889,7 @@ void STATE_APIENTRY crStateQueryHWState(GLuint fbFbo, GLuint bbFbo)
                 diff_api.GetMapfv(i + GL_MAP2_COLOR_4, GL_DOMAIN, &uval[0]);
                 if (order[0]>0 && order[1]>0)
                 {
-                    coeffs = crAlloc(order[0] * order[1] * gleval_sizes[i] * sizeof(GLfloat));
+                    coeffs = crAlloc(order[0] * order[1] * gleval_sizes_dup[i] * sizeof(GLfloat));
                     if (!coeffs)
                     {
                         crWarning("crStateQueryHWState: out of memory, at eval2D[%i]", i);
diff --git a/src/VBox/GuestHost/OpenGL/state_tracker/state_occlude.c b/src/VBox/GuestHost/OpenGL/state_tracker/state_occlude.c
index 61e2508..7a91a52 100644
--- a/src/VBox/GuestHost/OpenGL/state_tracker/state_occlude.c
+++ b/src/VBox/GuestHost/OpenGL/state_tracker/state_occlude.c
@@ -137,6 +137,7 @@ crStateGetQueryivARB(GLenum target, GLenum pname, GLint *params)
 {
 	CRContext *g = GetCurrentContext();
 	CROcclusionState *o = &(g->occlusion);
+	(void)target;
 
 	FLUSH();
 
@@ -322,6 +323,7 @@ void crStateOcclusionDiff(CROcclusionBits *bb, CRbitvalue *bitID,
 													CRContext *fromCtx, CRContext *toCtx)
 {
 	/* Apparently, no occlusion state differencing needed */
+	(void)bb; (void)bitID; (void)fromCtx; (void)toCtx;
 }
 
 
@@ -335,5 +337,6 @@ void crStateOcclusionSwitch(CROcclusionBits *bb, CRbitvalue *bitID,
 	/* Note: we better not do a switch while we're inside a glBeginQuery/
 	 * glEndQuery sequence.
 	 */
+	(void)bb; (void)bitID; (void)fromCtx; (void)toCtx;
 	CRASSERT(!fromCtx->occlusion.currentQueryObject);
 }
diff --git a/src/VBox/GuestHost/OpenGL/state_tracker/state_polygon.txt b/src/VBox/GuestHost/OpenGL/state_tracker/state_polygon.txt
index 2c81285..8867dfb 100644
--- a/src/VBox/GuestHost/OpenGL/state_tracker/state_polygon.txt
+++ b/src/VBox/GuestHost/OpenGL/state_tracker/state_polygon.txt
@@ -14,9 +14,9 @@
 :mode:backMode:PolygonMode,GL_BACK
 :mode:frontMode:PolygonMode,GL_FRONT
 -:stipple:stipple:*diff_api.PolygonStipple ((GLubyte *) to->stipple);
-+:stipple:*int j;
++:stipple:*int iStripple;
 +:stipple:*diff_api.PolygonStipple ((GLubyte *) to->stipple);
-+:stipple:*for (j=0; j<32; j++)
++:stipple:*for (iStripple=0; iStripple<32; iStripple++)
 +:stipple:*{
-+:stipple:*	from->stipple[j] = to->stipple[j];
++:stipple:*	from->stipple[iStripple] = to->stipple[iStripple];
 +:stipple:*}
diff --git a/src/VBox/GuestHost/OpenGL/state_tracker/state_program.c b/src/VBox/GuestHost/OpenGL/state_tracker/state_program.c
index e8dd597..e3bd4f0 100644
--- a/src/VBox/GuestHost/OpenGL/state_tracker/state_program.c
+++ b/src/VBox/GuestHost/OpenGL/state_tracker/state_program.c
@@ -1284,7 +1284,11 @@ void STATE_APIENTRY crStateGetProgramLocalParameterfvARB(GLenum target, GLuint i
             return;
         }
     }
-    else if (target == GL_VERTEX_PROGRAM_ARB || target == GL_VERTEX_PROGRAM_NV) {
+    else if (   target == GL_VERTEX_PROGRAM_ARB
+#if GL_VERTEX_PROGRAM_ARB != GL_VERTEX_PROGRAM_NV
+             || target == GL_VERTEX_PROGRAM_NV
+#endif
+            ) {
         prog = p->currentVertexProgram;
         if (index >= g->limits.maxVertexProgramLocalParams) {
             crStateError(__LINE__, __FILE__, GL_INVALID_VALUE,
@@ -1638,7 +1642,11 @@ void STATE_APIENTRY crStateGetProgramEnvParameterfvARB(GLenum target, GLuint ind
         params[2] = p->fragmentParameters[index][2];
         params[3] = p->fragmentParameters[index][3];
     }
-    else if (target == GL_VERTEX_PROGRAM_ARB || target == GL_VERTEX_PROGRAM_NV) {
+    else if (   target == GL_VERTEX_PROGRAM_ARB
+#if GL_VERTEX_PROGRAM_ARB != GL_VERTEX_PROGRAM_NV
+             || target == GL_VERTEX_PROGRAM_NV
+#endif
+             ) {
         if (index >= g->limits.maxVertexProgramEnvParams) {
             crStateError(__LINE__, __FILE__, GL_INVALID_VALUE,
                                      "glGetProgramEnvParameterARB(index)");
@@ -1693,7 +1701,11 @@ void STATE_APIENTRY crStateProgramEnvParameter4fARB(GLenum target, GLuint index,
         DIRTY(pb->fragmentEnvParameter[index], g->neg_bitid);
         DIRTY(pb->fragmentEnvParameters, g->neg_bitid);
     }
-    else if (target == GL_VERTEX_PROGRAM_ARB || target == GL_VERTEX_PROGRAM_NV) {
+    else if (   target == GL_VERTEX_PROGRAM_ARB
+#if GL_VERTEX_PROGRAM_ARB != GL_VERTEX_PROGRAM_NV
+             || target == GL_VERTEX_PROGRAM_NV
+#endif
+             ) {
         if (index >= g->limits.maxVertexProgramEnvParams) {
             crStateError(__LINE__, __FILE__, GL_INVALID_VALUE,
                                      "glProgramEnvParameterARB(index)");
@@ -2300,6 +2312,7 @@ DiffProgramCallback(unsigned long key, void *pProg, void *pCtx)
     CRContext *pContext = (CRContext *) pCtx;
     CRProgram *pProgram = (CRProgram *) pProg;
     uint32_t i;
+    (void)key;
 
     if (pProgram->isARBprogram)
     {
@@ -2347,7 +2360,7 @@ void crStateDiffAllPrograms(CRContext *g, CRbitvalue *bitID, GLboolean bForceUpd
 {
     CRProgram *pOrigVP, *pOrigFP;
 
-    (void) bForceUpdate;
+    (void) bForceUpdate; (void)bitID;
 
     /* save original bindings */
     pOrigVP = g->program.currentVertexProgram;
diff --git a/src/VBox/GuestHost/OpenGL/state_tracker/state_snapshot.c b/src/VBox/GuestHost/OpenGL/state_tracker/state_snapshot.c
index f4bcce8..11bb30f 100644
--- a/src/VBox/GuestHost/OpenGL/state_tracker/state_snapshot.c
+++ b/src/VBox/GuestHost/OpenGL/state_tracker/state_snapshot.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2008-2013 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -54,7 +54,7 @@ static int32_t crStateAllocAndSSMR3GetMem(PSSMHANDLE pSSM, void **pBuffer, size_
 {
     CRASSERT(pSSM && pBuffer && cbBuffer>0);
 
-    *pBuffer = crAlloc(cbBuffer);
+    *pBuffer = crAlloc((unsigned int /* this case is just so stupid */)cbBuffer);
     if (!*pBuffer)
         return VERR_NO_MEMORY;
 
@@ -778,7 +778,7 @@ static int32_t crSateLoadEvalCoeffs1D(CREvaluator1D *pEval, GLboolean bReallocMe
             size = pEval[i].order * gleval_sizes[i] * sizeof(GLfloat);
             if (bReallocMem)
             {
-                pEval[i].coeff = (GLfloat*) crAlloc(size);
+                pEval[i].coeff = (GLfloat*) crAlloc((unsigned int /* this case is just so stupid */)size);
                 if (!pEval[i].coeff) return VERR_NO_MEMORY;
             }
             rc = SSMR3GetMem(pSSM, pEval[i].coeff, size);
@@ -801,7 +801,7 @@ static int32_t crSateLoadEvalCoeffs2D(CREvaluator2D *pEval, GLboolean bReallocMe
             size = pEval[i].uorder * pEval[i].vorder * gleval_sizes[i] * sizeof(GLfloat);
             if (bReallocMem)
             {
-                pEval[i].coeff = (GLfloat*) crAlloc(size);
+                pEval[i].coeff = (GLfloat*) crAlloc((unsigned int /* this case is just so stupid */)size);
                 if (!pEval[i].coeff) return VERR_NO_MEMORY;
             }
             rc = SSMR3GetMem(pSSM, pEval[i].coeff, size);
@@ -1454,8 +1454,7 @@ static int32_t crStateLoadKeys(CRHashTable *pHash, PSSMHANDLE pSSM, uint32_t u32
             }
         }
     }
-
-    return rc;
+    /* not reached*/
 }
 
 
@@ -2649,7 +2648,7 @@ int32_t crStateLoadContext(CRContext *pContext, CRHashTable * pCtxTable, PFNCRST
                 } else itemsize = sizeof(GLfloat);
 
                 datasize = crStateGetUniformSize(pProgram->pUniforms[k].type)*itemsize;
-                pProgram->pUniforms[k].data = crAlloc(datasize);
+                pProgram->pUniforms[k].data = crAlloc((unsigned int /* this case is just so stupid */)datasize);
                 if (!pProgram->pUniforms[k].data) return VERR_NO_MEMORY;
 
                 rc = SSMR3GetMem(pSSM, pProgram->pUniforms[k].data, datasize);
diff --git a/src/VBox/GuestHost/OpenGL/state_tracker/state_stencil.c b/src/VBox/GuestHost/OpenGL/state_tracker/state_stencil.c
index d543e30..2fc438c 100644
--- a/src/VBox/GuestHost/OpenGL/state_tracker/state_stencil.c
+++ b/src/VBox/GuestHost/OpenGL/state_tracker/state_stencil.c
@@ -41,8 +41,10 @@ static GLint crStateStencilBufferGetIdxAndCount(CRStencilState *s, GLenum face,
             crStateError(__LINE__,__FILE__,GL_INVALID_ENUM, "crStateStencilBufferGetIdxAndCount");
             return 0;
     }
+#ifndef VBOX /* unreachable */
     crError("should never be here!");
     return 0;
+#endif
 }
 
 void crStateStencilBufferInit(CRStencilBufferState *s)
@@ -99,6 +101,7 @@ void crStateStencilInit(CRContext *ctx)
 
 static void crStateStencilBufferFunc(CRContext *g, CRStencilBufferState *s, GLenum func, GLint ref, GLuint mask)
 {
+    (void)g;
     s->func = func;
     s->ref = ref;
     s->mask = mask;
@@ -168,6 +171,7 @@ void STATE_APIENTRY crStateStencilFunc(GLenum func, GLint ref, GLuint mask)
 
 static void STATE_APIENTRY crStateStencilBufferOp (CRContext *g, CRStencilBufferState *s, GLenum fail, GLenum zfail, GLenum zpass)
 {
+    (void)g;
     s->fail = fail;
     s->passDepthFail = zfail;
     s->passDepthPass = zpass;
diff --git a/src/VBox/GuestHost/OpenGL/state_tracker/state_texdiff.c b/src/VBox/GuestHost/OpenGL/state_tracker/state_texdiff.c
index 5ac9028..6854334 100644
--- a/src/VBox/GuestHost/OpenGL/state_tracker/state_texdiff.c
+++ b/src/VBox/GuestHost/OpenGL/state_tracker/state_texdiff.c
@@ -1378,6 +1378,8 @@ DiffTextureObjectCallback( unsigned long key, void *texObj , void *cbData)
 {
     struct callback_info *info = (struct callback_info *) cbData;
     CRTextureObj *tobj = (CRTextureObj *) texObj;
+    (void)key;
+
     /*
     printf("  Checking %d 0x%x  bitid=0x%x\n",tobj->name, tobj->dirty[0], info->bitID[0]);
     */
diff --git a/src/VBox/GuestHost/OpenGL/state_tracker/state_teximage.c b/src/VBox/GuestHost/OpenGL/state_tracker/state_teximage.c
index 41d9612..3ea1820 100644
--- a/src/VBox/GuestHost/OpenGL/state_tracker/state_teximage.c
+++ b/src/VBox/GuestHost/OpenGL/state_tracker/state_teximage.c
@@ -574,11 +574,16 @@ crStateTexImage1D(GLenum target, GLint level, GLint internalFormat,
 {
     CRContext *g = GetCurrentContext();
     CRTextureState *t = &(g->texture);
+#ifndef CR_STATE_NO_TEXTURE_IMAGE_STORE
     CRClientState *c = &(g->client);
+#endif
     CRTextureObj *tobj;
     CRTextureLevel *tl;
     CRStateBits *sb = GetCurrentBits();
     CRTextureBits *tb = &(sb->texture);
+#ifdef CR_STATE_NO_TEXTURE_IMAGE_STORE
+    (void)pixels;
+#endif
 
     FLUSH();
 
@@ -684,6 +689,7 @@ crStateCopyTexImage2D(GLenum target, GLint level, GLenum internalFormat, GLint x
     CRContext *g = GetCurrentContext();
     CRTextureObj *tobj = NULL;
     CRTextureLevel *tl = NULL;
+    (void)x; (void)y;
     
     crStateGetTextureObjectAndImage(g, target, level, &tobj, &tl);
     CRASSERT(tobj);
@@ -726,7 +732,9 @@ crStateTexImage2D(GLenum target, GLint level, GLint internalFormat,
 {
     CRContext *g = GetCurrentContext();
     CRTextureState *t = &(g->texture);
+#ifndef CR_STATE_NO_TEXTURE_IMAGE_STORE
     CRClientState *c = &(g->client);
+#endif
     CRTextureObj *tobj = NULL;
     CRTextureLevel *tl = NULL;
     CRStateBits *sb = GetCurrentBits();
@@ -863,11 +871,14 @@ crStateTexImage3D(GLenum target, GLint level,
 {
     CRContext *g = GetCurrentContext();
     CRTextureState *t = &(g->texture);
+#ifndef CR_STATE_NO_TEXTURE_IMAGE_STORE
     CRClientState *c = &(g->client);
+#endif
     CRTextureObj *tobj = NULL;
     CRTextureLevel *tl = NULL;
     CRStateBits *sb = GetCurrentBits();
     CRTextureBits *tb = &(sb->texture);
+    (void)pixels;
 
     FLUSH();
 
@@ -958,12 +969,15 @@ crStateTexSubImage1D(GLenum target, GLint level, GLint xoffset,
 {
     CRContext *g = GetCurrentContext();
     CRTextureState *t = &(g->texture);
+#ifndef CR_STATE_NO_TEXTURE_IMAGE_STORE
     CRClientState *c = &(g->client);
+#endif
     CRStateBits *sb = GetCurrentBits();
     CRTextureBits *tb = &(sb->texture);
     CRTextureUnit *unit = t->unit + t->curTextureUnit;
     CRTextureObj *tobj = unit->currentTexture1D;
     CRTextureLevel *tl = tobj->level[0] + level;
+    (void)format; (void)type; (void)pixels;
 
     FLUSH();
 
@@ -1009,17 +1023,18 @@ crStateTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
                      GLenum format, GLenum type, const GLvoid * pixels)
 {
     CRContext *g = GetCurrentContext();
-    CRClientState *c = &(g->client);
     CRStateBits *sb = GetCurrentBits();
     CRTextureBits *tb = &(sb->texture);
     CRTextureObj *tobj;
     CRTextureLevel *tl;
+#ifndef CR_STATE_NO_TEXTURE_IMAGE_STORE
+    CRClientState *c = &(g->client);
     GLubyte *subimg = NULL;
     GLubyte *img = NULL;
-#ifndef CR_STATE_NO_TEXTURE_IMAGE_STORE
     GLubyte *src;
     int i;
 #endif
+    (void)format; (void)type; (void)pixels;
 
     FLUSH();
 
@@ -1104,18 +1119,19 @@ crStateTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
 {
     CRContext *g = GetCurrentContext();
     CRTextureState *t = &(g->texture);
-    CRClientState *c = &(g->client);
     CRStateBits *sb = GetCurrentBits();
     CRTextureBits *tb = &(sb->texture);
     CRTextureUnit *unit = t->unit + t->curTextureUnit;
     CRTextureObj *tobj = unit->currentTexture3D;
     CRTextureLevel *tl = tobj->level[0] + level;
+#ifndef CR_STATE_NO_TEXTURE_IMAGE_STORE
+    CRClientState *c = &(g->client);
     GLubyte *subimg = NULL;
     GLubyte *img = NULL;
-#ifndef CR_STATE_NO_TEXTURE_IMAGE_STORE
     GLubyte *src;
     int i;
 #endif
+    (void)format; (void)type; (void)pixels;
 
     FLUSH();
 
@@ -1190,6 +1206,7 @@ crStateCompressedTexImage1DARB(GLenum target, GLint level,
     CRTextureLevel *tl;
     CRStateBits *sb = GetCurrentBits();
     CRTextureBits *tb = &(sb->texture);
+    (void)data;
 
     FLUSH();
 
@@ -1270,6 +1287,7 @@ crStateCompressedTexImage2DARB(GLenum target, GLint level,
     CRTextureLevel *tl = NULL;
     CRStateBits *sb = GetCurrentBits();
     CRTextureBits *tb = &(sb->texture);
+    (void)data;
 
     FLUSH();
 
@@ -1351,6 +1369,7 @@ crStateCompressedTexImage3DARB(GLenum target, GLint level,
     CRTextureLevel *tl = NULL;
     CRStateBits *sb = GetCurrentBits();
     CRTextureBits *tb = &(sb->texture);
+    (void)data;
 
     FLUSH();
 
@@ -1432,6 +1451,7 @@ crStateCompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset,
     CRTextureUnit *unit = t->unit + t->curTextureUnit;
     CRTextureObj *tobj = unit->currentTexture1D;
     CRTextureLevel *tl = tobj->level[0] + level;
+    (void)format; (void)imageSize; (void)data;
 
     FLUSH();
 
@@ -1489,6 +1509,7 @@ crStateCompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset,
     CRTextureUnit *unit = t->unit + t->curTextureUnit;
     CRTextureObj *tobj = unit->currentTexture2D;
     CRTextureLevel *tl = tobj->level[0] + level;
+    (void)format; (void)imageSize; (void)data;
 
     FLUSH();
 
@@ -1551,6 +1572,7 @@ crStateCompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset,
     CRTextureUnit *unit = t->unit + t->curTextureUnit;
     CRTextureObj *tobj = unit->currentTexture3D;
     CRTextureLevel *tl = tobj->level[0] + level;
+    (void)format; (void)imageSize; (void)data;
 
     FLUSH();
 
@@ -1647,7 +1669,9 @@ crStateGetTexImage(GLenum target, GLint level, GLenum format,
                    GLenum type, GLvoid * pixels)
 {
     CRContext *g = GetCurrentContext();
+#ifndef CR_STATE_NO_TEXTURE_IMAGE_STORE
     CRClientState *c = &(g->client);
+#endif
     CRTextureObj *tobj;
     CRTextureLevel *tl;
 
diff --git a/src/VBox/GuestHost/OpenGL/state_tracker/state_texture.c b/src/VBox/GuestHost/OpenGL/state_tracker/state_texture.c
index b3842b7..8c25772 100644
--- a/src/VBox/GuestHost/OpenGL/state_tracker/state_texture.c
+++ b/src/VBox/GuestHost/OpenGL/state_tracker/state_texture.c
@@ -621,6 +621,7 @@ crStateDeleteTextureObject(CRTextureObj *tobj)
 void crStateRegNames(CRContext *g, CRHashTable *table, GLsizei n, GLuint *names)
 {
     GLint i;
+    (void)g;
     for (i = 0; i < n; i++)
     {
         if (names[i])
@@ -3389,7 +3390,7 @@ DECLEXPORT(GLuint) STATE_APIENTRY crStateGetTextureHWID(GLuint id)
     }
     if (tobj)
     {
-//        crDebug("tex id(%d), hwid(%d)", tobj->id, tobj->hwid);
+/*        crDebug("tex id(%d), hwid(%d)", tobj->id, tobj->hwid);*/
     }
 #endif
 
@@ -3406,7 +3407,7 @@ DECLEXPORT(GLuint) STATE_APIENTRY crStateGetTextureObjHWID(CRTextureObj *tobj)
     {
         CRASSERT(diff_api.GenTextures);
         diff_api.GenTextures(1, &tobj->hwid);
-#if 0 //def DEBUG_misha
+#if 0 /*def DEBUG_misha*/
         crDebug("tex id(%d), hwid(%d)", tobj->id, tobj->hwid);
 #endif
         CRASSERT(tobj->hwid);
diff --git a/src/VBox/GuestHost/OpenGL/util/VBoxOGLcrutil.rc b/src/VBox/GuestHost/OpenGL/util/VBoxOGLcrutil.rc
index 6003b6b..b69e742 100644
--- a/src/VBox/GuestHost/OpenGL/util/VBoxOGLcrutil.rc
+++ b/src/VBox/GuestHost/OpenGL/util/VBoxOGLcrutil.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/GuestHost/OpenGL/util/blitter.cpp b/src/VBox/GuestHost/OpenGL/util/blitter.cpp
index adec102..1f9ff47 100644
--- a/src/VBox/GuestHost/OpenGL/util/blitter.cpp
+++ b/src/VBox/GuestHost/OpenGL/util/blitter.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -81,7 +81,7 @@ void CrMClrFillImg(CR_BLITTER_IMG *pImg, uint32_t cRects, const RTRECT *pRects,
 
 
     RTRECT Intersection;
-    const RTPOINT ZeroPoint = {0, 0};
+    /*const RTPOINT ZeroPoint = {0, 0}; - unused */
 
     for (uint32_t i = 0; i < cRects; ++i)
     {
@@ -192,13 +192,13 @@ void CrMBltImgRectScaled(const CR_BLITTER_IMG *pSrc, const RTPOINT *pPos, bool f
         srcY = 0;
     }
 
-    if (srcX >= pSrc->width)
+    if ((GLuint)srcX >= pSrc->width)
     {
         WARN(("ups"));
         return;
     }
 
-    if (srcY >= pSrc->height)
+    if ((GLuint)srcY >= pSrc->height)
     {
         WARN(("ups"));
         return;
@@ -217,10 +217,10 @@ void CrMBltImgRectScaled(const CR_BLITTER_IMG *pSrc, const RTPOINT *pPos, bool f
     int32_t UnscaledSrcWidth = UnscaledCopyRect.xRight - UnscaledCopyRect.xLeft;
     int32_t UnscaledSrcHeight = UnscaledCopyRect.yBottom - UnscaledCopyRect.yTop;
 
-    if (UnscaledSrcWidth + srcX > pSrc->width)
+    if (UnscaledSrcWidth + srcX > (GLint)pSrc->width)
         UnscaledSrcWidth = pSrc->width - srcX;
 
-    if (UnscaledSrcHeight + srcY > pSrc->height)
+    if (UnscaledSrcHeight + srcY > (GLint)pSrc->height)
         UnscaledSrcHeight = pSrc->height - srcY;
 
     uint8_t *pu8Src = ((uint8_t*)pSrc->pvData) + pSrc->pitch * (!fSrcInvert ? srcY : pSrc->height - srcY - 1) + srcX * 4;
@@ -243,8 +243,7 @@ void CrMBltImgScaled(const CR_BLITTER_IMG *pSrc, const RTRECTSIZE *pSrcRectSize,
 
     float strX = ((float)dstWidth) / srcWidth;
     float strY = ((float)dstHeight) / srcHeight;
-    bool fScale = (dstWidth != srcWidth || dstHeight != srcHeight);
-    Assert(fScale);
+    Assert(dstWidth != srcWidth || dstHeight != srcHeight);
 
     RTRECT Intersection;
     RTRECT ScaledRestrictSrcRect;
@@ -572,6 +571,8 @@ DECLINLINE(GLfloat*) crBltVtRectsTFNormalized(const RTRECT *paRects, uint32_t cR
 
 DECLINLINE(GLint*) crBltVtRectTF(const RTRECT *pRect, uint32_t normalX, uint32_t normalY, GLint* pBuff, uint32_t height)
 {
+    (void)normalX; (void)normalY;
+
     /* xLeft yTop */
     pBuff[0] = pRect->xLeft;
     pBuff[1] = height ? height - pRect->yTop : pRect->yTop;
@@ -1114,6 +1115,7 @@ VBOXBLITTERDECL(int) CrBltImgGetTex(PCR_BLITTER pBlitter, const VBOXVR_TEXTURE *
 
 VBOXBLITTERDECL(int) CrBltImgGetMural(PCR_BLITTER pBlitter, bool fBb, CR_BLITTER_IMG *pDst)
 {
+    (void)fBb; (void)pDst;
     if (!CrBltIsEntered(pBlitter))
     {
         WARN(("CrBltImgGetMural: blitter not entered"));
@@ -2029,8 +2031,8 @@ static int ctTdBltSdGetUpdated(PCR_TEXDATA pTex, uint32_t width, uint32_t height
         return rc;
     }
 
-    Assert(width == pScaledCache->Tex.width);
-    Assert(height == pScaledCache->Tex.height);
+    Assert(width == (uint32_t)pScaledCache->Tex.width);
+    Assert(height == (uint32_t)pScaledCache->Tex.height);
 
     if (!pScaledCache->Flags.DataValid)
     {
@@ -2056,7 +2058,7 @@ static int ctTdBltSdGetUpdated(PCR_TEXDATA pTex, uint32_t width, uint32_t height
 
 VBOXBLITTERDECL(int) CrTdBltDataAcquireScaled(PCR_TEXDATA pTex, GLenum enmFormat, bool fInverted, uint32_t width, uint32_t height, const CR_BLITTER_IMG**ppImg)
 {
-    if (pTex->Tex.width == width && pTex->Tex.height == height)
+    if ((uint32_t)pTex->Tex.width == width && (uint32_t)pTex->Tex.height == height)
         return CrTdBltDataAcquire(pTex, enmFormat, fInverted, ppImg);
 
     if (!pTex->Flags.Entered)
diff --git a/src/VBox/GuestHost/OpenGL/util/bmpscale.cpp b/src/VBox/GuestHost/OpenGL/util/bmpscale.cpp
index 1b32487..6c8d8a8 100644
--- a/src/VBox/GuestHost/OpenGL/util/bmpscale.cpp
+++ b/src/VBox/GuestHost/OpenGL/util/bmpscale.cpp
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2009-2011 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/GuestHost/OpenGL/util/bufpool.c b/src/VBox/GuestHost/OpenGL/util/bufpool.c
index defd6b4..ed8dcde 100644
--- a/src/VBox/GuestHost/OpenGL/util/bufpool.c
+++ b/src/VBox/GuestHost/OpenGL/util/bufpool.c
@@ -114,9 +114,9 @@ crBufferPoolPush( CRBufferPool *pool, void *buf, unsigned int bytes )
 #ifdef DEBUG
         /* check that the buffer to push isn't already in the pool! */
         {
-            const Buffer *b;
-            for (b = pool->head; b; b = b->next) {
-                CRASSERT(b->address != buf);
+            const Buffer *bd;
+            for (bd = pool->head; bd; bd = bd->next) {
+                CRASSERT(bd->address != buf);
             }
         }
 #endif
diff --git a/src/VBox/GuestHost/OpenGL/util/compositor.cpp b/src/VBox/GuestHost/OpenGL/util/compositor.cpp
index ed57558..0ed308b 100644
--- a/src/VBox/GuestHost/OpenGL/util/compositor.cpp
+++ b/src/VBox/GuestHost/OpenGL/util/compositor.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2014 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -104,6 +104,8 @@ static DECLCALLBACK(bool) crVrScrCompositorRectsCounterCb(PVBOXVR_COMPOSITOR pCo
                                                           void *pvVisitor)
 {
     uint32_t* pCounter = (uint32_t*)pvVisitor;
+    (void)pCompositor; (void)pEntry;
+
     Assert(VBoxVrListRectsCount(&pEntry->Vr));
     *pCounter += VBoxVrListRectsCount(&pEntry->Vr);
     return true;
@@ -494,6 +496,8 @@ VBOXVREGDECL(int) CrVrScrCompositorEntryRectSet(PVBOXVR_SCR_COMPOSITOR pComposit
 VBOXVREGDECL(int) CrVrScrCompositorEntryTexAssign(PVBOXVR_SCR_COMPOSITOR pCompositor, PVBOXVR_SCR_COMPOSITOR_ENTRY pEntry,
                                                   CR_TEXDATA *pTex)
 {
+    (void)pCompositor;
+
     if (pEntry->pTex == pTex)
         return VINF_SUCCESS;
 
diff --git a/src/VBox/GuestHost/OpenGL/util/devnull.c b/src/VBox/GuestHost/OpenGL/util/devnull.c
index 2b35d46..9e7d961 100644
--- a/src/VBox/GuestHost/OpenGL/util/devnull.c
+++ b/src/VBox/GuestHost/OpenGL/util/devnull.c
@@ -81,6 +81,7 @@ crDevnullAccept( CRConnection *conn, const char *hostname, unsigned short port )
 	crError( "Well, you *could* accept a devnull client, but you'd be disappointed. ");
 	(void) conn;
 	(void) port;
+        (void) hostname;
 }
 
 static int
diff --git a/src/VBox/GuestHost/OpenGL/util/dll.c b/src/VBox/GuestHost/OpenGL/util/dll.c
index dbc6175..bda10da 100644
--- a/src/VBox/GuestHost/OpenGL/util/dll.c
+++ b/src/VBox/GuestHost/OpenGL/util/dll.c
@@ -19,7 +19,11 @@
 #endif
 
 #ifdef WINDOWS
+# ifdef VBOX
+#  include <iprt/win/shlwapi.h>
+# else
 #include <Shlwapi.h>
+# endif
 #endif
 
 #ifdef DARWIN
@@ -223,7 +227,7 @@ CRDLL *crDLLOpen( const char *dllname, int resolveGlobal )
         SetLastError(winEr);
         return NULL;
     }
-# endif // CR_NO_GL_SYSTEM_PATH
+# endif /* CR_NO_GL_SYSTEM_PATH */
 #endif
 
 	dll = (CRDLL *) crAlloc( sizeof( CRDLL ) );
@@ -323,7 +327,7 @@ CRDLLFunc crDLLGetNoError( CRDLL *dll, const char *symname )
 	return (CRDLLFunc) NSAddressOfSymbol( nssym );
 
 #elif defined(IRIX) || defined(IRIX64) || defined(Linux) || defined(FreeBSD) || defined(AIX) || defined(SunOS) || defined(OSF1)
-	return (CRDLLFunc) dlsym( dll->hinstLib, symname );
+	return (CRDLLFunc)(uintptr_t)dlsym( dll->hinstLib, symname );
 #else
 #error CR DLL ARCHITETECTURE
 #endif
diff --git a/src/VBox/GuestHost/OpenGL/util/error.c b/src/VBox/GuestHost/OpenGL/util/error.c
index fe0070a..8371695 100644
--- a/src/VBox/GuestHost/OpenGL/util/error.c
+++ b/src/VBox/GuestHost/OpenGL/util/error.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -27,11 +27,13 @@
 #include <VBox/log.h>
 
 #ifdef RT_OS_WINDOWS
-# include <windows.h>
+# include <iprt/win/windows.h>
 # include "cr_environment.h"
 # include "cr_error.h"
 # include "VBox/VBoxGuestLib.h"
 # include "iprt/initterm.h"
+#else
+# include "cr_error.h"
 #endif
 
 #include <signal.h>
@@ -42,6 +44,10 @@
  * Stuff that needs to be dragged into the link because other DLLs needs it.
  * See also VBoxDeps.cpp in iprt and xpcom.
  */
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable:4232) /* nonstandard extension used: 'g_VBoxRTDeps' : address of dllimport 'RTBldCfgRevision' is not static, identiy not guaranteed */
+#endif
 PFNRT g_VBoxRTDeps[] =
 {
     (PFNRT)RTAssertShouldPanic,
@@ -50,6 +56,9 @@ PFNRT g_VBoxRTDeps[] =
     (PFNRT)ASMBitFirstSet,
     (PFNRT)RTBldCfgRevision,
 };
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
 
 
 static void logMessageV(const char *pszPrefix, const char *pszFormat, va_list va)
@@ -69,6 +78,7 @@ static void logMessageV(const char *pszPrefix, const char *pszFormat, va_list va
 #endif
 }
 
+#ifdef WINDOWS
 static void logMessage(const char *pszPrefix, const char *pszFormat, ...)
 {
     va_list va;
@@ -77,6 +87,7 @@ static void logMessage(const char *pszPrefix, const char *pszFormat, ...)
     logMessageV(pszPrefix, pszFormat, va);
     va_end(va);
 }
+#endif
 
 DECLEXPORT(void) crError(const char *pszFormat, ...)
 {
@@ -170,7 +181,7 @@ DECLEXPORT(void) crDebug(const char *pszFormat, ...)
 #if defined(RT_OS_WINDOWS)
 BOOL WINAPI DllMain(HINSTANCE hDLLInst, DWORD fdwReason, LPVOID lpvReserved)
 {
-    (void) lpvReserved;
+    (void) lpvReserved; (void) hDLLInst;
 
     switch (fdwReason)
     {
diff --git a/src/VBox/GuestHost/OpenGL/util/filenet.c b/src/VBox/GuestHost/OpenGL/util/filenet.c
index 25f47e6..178c015 100644
--- a/src/VBox/GuestHost/OpenGL/util/filenet.c
+++ b/src/VBox/GuestHost/OpenGL/util/filenet.c
@@ -91,6 +91,7 @@ crFileWriteExact( CRConnection *conn, const void *buf, unsigned int len )
 static void
 crFileAccept( CRConnection *conn, const char *hostname, unsigned short port )
 {
+	(void)hostname;
 	conn->file_direction = CR_FILE_READ;
 	conn->fd = open( conn->filename, O_RDONLY | O_BINARY );
 	if (conn->fd < 0)
diff --git a/src/VBox/GuestHost/OpenGL/util/hash.c b/src/VBox/GuestHost/OpenGL/util/hash.c
index b247360..2c3f9db 100644
--- a/src/VBox/GuestHost/OpenGL/util/hash.c
+++ b/src/VBox/GuestHost/OpenGL/util/hash.c
@@ -273,7 +273,7 @@ GLboolean crHashIdPoolAllocId( CRHashIdPool *pool, GLuint id )
         return GL_FALSE;
     }
 
-//    Assert(id != 2);
+/*    Assert(id != 2);*/
 
     RTListForEachSafe(&pool->freeList, f, next, FreeElem, Node)
     {
@@ -571,18 +571,20 @@ void crHashtableWalkKeys( CRHashTable *h, CRHashIdWalkKeys walkFunc , void *data
 GLuint crHashtableAllocKeys( CRHashTable *h,  GLsizei range)
 {
     GLuint res;
-    int i;
 
 #ifdef CHROMIUM_THREADSAFE
     crLockMutex(&h->mutex);
 #endif
     res = crHashIdPoolAllocBlock (h->idPool, range);
 #ifdef DEBUG_misha
-    Assert(res);
-    for (i = 0; i < range; ++i)
     {
-        void *search = crHashtableSearch( h, res+i );
-        Assert(!search);
+        int i;
+        Assert(res);
+        for (i = 0; i < range; ++i)
+        {
+            void *search = crHashtableSearch( h, res+i );
+            Assert(!search);
+        }
     }
 #endif
 #ifdef CHROMIUM_THREADSAFE
diff --git a/src/VBox/GuestHost/OpenGL/util/htable.cpp b/src/VBox/GuestHost/OpenGL/util/htable.cpp
index bb9434c..09052ca 100644
--- a/src/VBox/GuestHost/OpenGL/util/htable.cpp
+++ b/src/VBox/GuestHost/OpenGL/util/htable.cpp
@@ -1,11 +1,12 @@
 /* $Id: htable.cpp $ */
-
 /** @file
  * uint32_t handle to void simple table impl
+ *
+ * @todo Why couldn't you simply use iprt/handletable.h?
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -15,6 +16,7 @@
  * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
+
 #include <iprt/cdefs.h>
 #include <iprt/asm.h>
 #include "cr_spu.h"
@@ -155,14 +157,13 @@ VBOXHTABLEDECL(CRHTABLE_HANDLE) CrHTablePut(PCRHTABLE pTbl, void* pvData)
         if (!pTbl->paData[i])
         {
             void *pvOld = crHTablePutToSlot(pTbl, i, pvData);
-            Assert(!pvOld);
+            Assert(!pvOld); NOREF(pvOld);
             pTbl->iNext2Search = i+1;
             pTbl->iNext2Search %= pTbl->cSize;
             return crHTableIndex2Handle(i);
         }
     }
-    WARN(("should not be here"));
-    return CRHTABLE_HANDLE_INVALID;
+    /* not reached */
 }
 
 VBOXHTABLEDECL(void*) CrHTableRemove(PCRHTABLE pTbl, CRHTABLE_HANDLE hHandle)
diff --git a/src/VBox/GuestHost/OpenGL/util/list.c b/src/VBox/GuestHost/OpenGL/util/list.c
index 0709fb2..83dcfab 100644
--- a/src/VBox/GuestHost/OpenGL/util/list.c
+++ b/src/VBox/GuestHost/OpenGL/util/list.c
@@ -2,6 +2,9 @@
 #include "cr_error.h"
 #include "cr_mem.h"
 
+#ifndef CR_TESTING_LIST			/* vbox */
+# define CR_TESTING_LIST 0      	/* vbox */
+#endif  				/* vbox */
 #if CR_TESTING_LIST
 #include <stdio.h>
 #include <stdlib.h>
@@ -308,4 +311,4 @@ int main( void )
 	return 0;
 }
 
-#endif // CR_TESTING_LIST
+#endif /* CR_TESTING_LIST */
diff --git a/src/VBox/GuestHost/OpenGL/util/mem.c b/src/VBox/GuestHost/OpenGL/util/mem.c
index da84188..c28c4f5 100644
--- a/src/VBox/GuestHost/OpenGL/util/mem.c
+++ b/src/VBox/GuestHost/OpenGL/util/mem.c
@@ -63,6 +63,7 @@ void *crAllocDebug( unsigned int nbytes, const char *file, int line )
 		fprintf(stderr, "crAllocDebug(%d bytes) in %s at %d\n", nbytes, file, line);
 	return _crAlloc(nbytes);
 #else
+	RT_NOREF2(file, line);
 	return crAlloc(nbytes);
 #endif
 }
@@ -93,6 +94,7 @@ void *crCallocDebug( unsigned int nbytes, const char *file, int line )
 		fprintf(stderr, "crCallocDebug(%d bytes) in %s at %d\n", nbytes, file, line);
 	return _crCalloc(nbytes);
 #else
+	RT_NOREF2(file, line);
 	return crCalloc(nbytes);
 #endif
 }
diff --git a/src/VBox/GuestHost/OpenGL/util/net.c b/src/VBox/GuestHost/OpenGL/util/net.c
index 63b5cae..e36be1d 100644
--- a/src/VBox/GuestHost/OpenGL/util/net.c
+++ b/src/VBox/GuestHost/OpenGL/util/net.c
@@ -387,12 +387,12 @@ crNetAcceptClient( const char *protocol, const char *hostname,
         }
         conn->hostname = crStrdup( filename );
 
-    /* call the protocol-specific init routines */  // ktd (add)
+    /* call the protocol-specific init routines */  /* ktd (add) */
     InitConnection(conn, protocol_only, mtu
 #if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
                 , NULL
 #endif
-            );       // ktd (add)
+            );       /* ktd (add) */
     }
     else {
     /* call the protocol-specific init routines */
@@ -512,7 +512,7 @@ void crNetInit( CRNetReceiveFunc recvFunc, CRNetCloseFunc closeFunc )
 }
 
 /* Free up stuff */
-void crNetTearDown()
+void crNetTearDown(void)
 {
     CRNetReceiveFuncList *rfl;
     CRNetCloseFuncList *cfl;
@@ -1273,7 +1273,7 @@ void crNetReadline( CRConnection *conn, void *buf )
 }
 
 #ifdef IN_GUEST
-uint32_t crNetHostCapsGet()
+uint32_t crNetHostCapsGet(void)
 {
 #ifdef VBOX_WITH_HGCM
     if ( cr_net.use_hgcm )
@@ -1293,6 +1293,8 @@ uint32_t crNetHostCapsGet()
 int crNetRecv(
 #if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
         CRConnection *conn
+#else
+        void
 #endif
         )
 {
@@ -1362,6 +1364,9 @@ crNetSetRank( int my_rank )
 void
 crNetSetContextRange( int low_context, int high_context )
 {
+#if !defined(TEAC_SUPPORT) && !defined(TCSCOMM_SUPPORT)
+    (void)low_context; (void)high_context;
+#endif
 #ifdef TEAC_SUPPORT
     crTeacSetContextRange( low_context, high_context );
 #endif
@@ -1376,6 +1381,9 @@ crNetSetContextRange( int low_context, int high_context )
 void
 crNetSetNodeRange( const char *low_node, const char *high_node )
 {
+#if !defined(TEAC_SUPPORT) && !defined(TCSCOMM_SUPPORT)
+    (void)low_node; (void)high_node;
+#endif
 #ifdef TEAC_SUPPORT
     crTeacSetNodeRange( low_node, high_node );
 #endif
@@ -1392,5 +1400,7 @@ crNetSetKey( const unsigned char* key, const int keyLength )
 {
 #ifdef TEAC_SUPPORT
     crTeacSetKey( key, keyLength );
+#else
+    (void)key; (void)keyLength;
 #endif
 }
diff --git a/src/VBox/GuestHost/OpenGL/util/net_internals.h b/src/VBox/GuestHost/OpenGL/util/net_internals.h
index 2ad26af..7cac01c 100644
--- a/src/VBox/GuestHost/OpenGL/util/net_internals.h
+++ b/src/VBox/GuestHost/OpenGL/util/net_internals.h
@@ -99,10 +99,12 @@ extern void crVBoxHGCMConnection( CRConnection *conn
 extern int crVBoxHGCMRecv(
 #if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
         CRConnection *conn
+#else
+        void
 #endif
         );
 #ifdef IN_GUEST
-extern uint32_t crVBoxHGCMHostCapsGet();
+extern uint32_t crVBoxHGCMHostCapsGet(void);
 #endif
 extern CRConnection** crVBoxHGCMDump( int *num );
 extern void crVBoxHGCMTearDown(void);
diff --git a/src/VBox/GuestHost/OpenGL/util/pixel.c b/src/VBox/GuestHost/OpenGL/util/pixel.c
index 5bea3e1..6e3f4db 100644
--- a/src/VBox/GuestHost/OpenGL/util/pixel.c
+++ b/src/VBox/GuestHost/OpenGL/util/pixel.c
@@ -1554,7 +1554,7 @@ void crPixelCopy2D( GLsizei width, GLsizei height,
 
         /* handle the alignment */
         if (srcPacking->alignment != 1) {
-            i = ((long) src) % srcPacking->alignment;
+            i = ((intptr_t) src) % srcPacking->alignment;
             if (i)
                 src += srcPacking->alignment - i;
             i = (long) srcRowStrideBytes % srcPacking->alignment;
@@ -1563,7 +1563,7 @@ void crPixelCopy2D( GLsizei width, GLsizei height,
         }
 
         if (dstPacking->alignment != 1) {
-            i = ((long) dst) % dstPacking->alignment;
+            i = ((intptr_t) dst) % dstPacking->alignment;
             if (i)
                 dst += dstPacking->alignment - i;
             i = (long) dstRowStrideBytes % dstPacking->alignment;
@@ -1595,7 +1595,7 @@ void crPixelCopy2D( GLsizei width, GLsizei height,
                 crMemcpy( (void *) dst, (const void *) src, height * srcBytesPerRow );
             }
             else
-                //crDebug("Sending texture, BytesPerRow!=RowStrideBytes");
+                /*crDebug("Sending texture, BytesPerRow!=RowStrideBytes");*/
                 for (i = 0; i < height; i++)
                 {
                     crMemcpy( (void *) dst, (const void *) src, srcBytesPerRow );
@@ -1856,7 +1856,6 @@ void crDumpNamedTGAV(GLint w, GLint h, GLvoid *data, const char* fname, va_list
 void crDumpNamedTGAF(GLint w, GLint h, GLvoid *data, const char* fname, ...)
 {
     va_list va;
-    int rc;
     va_start(va, fname);
     crDumpNamedTGAV(w, h, data, fname, va);
     va_end(va);
diff --git a/src/VBox/GuestHost/OpenGL/util/process.c b/src/VBox/GuestHost/OpenGL/util/process.c
index e941848..af16689 100644
--- a/src/VBox/GuestHost/OpenGL/util/process.c
+++ b/src/VBox/GuestHost/OpenGL/util/process.c
@@ -228,7 +228,7 @@ void crGetCurrentDir( char *dir, int maxLen )
 CRpid crGetPID(void)
 {
 #ifdef WINDOWS 
-  //return _getpid();
+  /*return _getpid();*/
   return GetCurrentProcess();
 #else
   return getpid();
diff --git a/src/VBox/GuestHost/OpenGL/util/rand.c b/src/VBox/GuestHost/OpenGL/util/rand.c
index f4e1f3e..519871d 100644
--- a/src/VBox/GuestHost/OpenGL/util/rand.c
+++ b/src/VBox/GuestHost/OpenGL/util/rand.c
@@ -8,7 +8,11 @@
 
 #ifdef WINDOWS
 #define WIN32_LEAN_AND_MEAN
+# ifdef VBOX
+#  include <iprt/win/windows.h>
+# else
 #include <windows.h>
+# endif
 #else
 #include <sys/time.h>
 #endif
diff --git a/src/VBox/GuestHost/OpenGL/util/sortarray.cpp b/src/VBox/GuestHost/OpenGL/util/sortarray.cpp
index b2e7218..794bca3 100644
--- a/src/VBox/GuestHost/OpenGL/util/sortarray.cpp
+++ b/src/VBox/GuestHost/OpenGL/util/sortarray.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -150,6 +150,7 @@ static int crSaAdd(CR_SORTARRAY *pArray, uint64_t element)
     if (!iMax)
         return crSaInsAt(pArray, 0, element);
 
+    el = element; /* Shup up MSC. */
     while (iMin < iMax)
     {
         i = (iMax + iMin) / 2;
@@ -335,7 +336,6 @@ VBOXSADECL(int) CrSaUnited(const CR_SORTARRAY *pArray1, const CR_SORTARRAY *pArr
 
 static int crSaClone(const CR_SORTARRAY *pArray1, CR_SORTARRAY *pResult)
 {
-    int rc = 0;
     CrSaClear(pResult);
 
     if (pArray1->cSize > pResult->cBufferSize)
diff --git a/src/VBox/GuestHost/OpenGL/util/tcpip.c b/src/VBox/GuestHost/OpenGL/util/tcpip.c
index 30b17c3..ce3e8f8 100644
--- a/src/VBox/GuestHost/OpenGL/util/tcpip.c
+++ b/src/VBox/GuestHost/OpenGL/util/tcpip.c
@@ -6,14 +6,16 @@
 
 #ifdef WINDOWS
 #define WIN32_LEAN_AND_MEAN
+# ifdef VBOX
+#  include <iprt/win/winsock2.h>
+# else /* !VBOX */
 #pragma warning( push, 3 )
 #include <winsock2.h>
 #pragma warning( pop )
 #pragma warning( disable : 4514 )
 #pragma warning( disable : 4127 )
-# ifndef VBOX
 typedef int ssize_t;
-# endif
+# endif /* !VBOX */
 #else
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -59,7 +61,9 @@ typedef int socklen_t;
 #endif
 
 #ifdef WINDOWS
+# undef EADDRINUSE
 #define EADDRINUSE   WSAEADDRINUSE
+# undef ECONNREFUSED
 #define ECONNREFUSED WSAECONNREFUSED
 #endif
 
@@ -514,6 +518,7 @@ crTCPIPAccept( CRConnection *conn, const char *hostname, unsigned short port )
     struct sockaddr_storage addr;
     char            host[NI_MAXHOST];
 #endif
+    (void)hostname;
 
     cr_tcpip.server_sock = CreateListeningSocket(port);
 
@@ -1273,9 +1278,9 @@ crTCPIPDoConnect( CRConnection *conn )
         conn->tcp_socket = socket( cur->ai_family, cur->ai_socktype, cur->ai_protocol );
         if ( conn->tcp_socket < 0 )
         {
-            int err = crTCPIPErrno( );
-            if (err != EAFNOSUPPORT)
-                crWarning( "socket error: %s, trying another way", crTCPIPErrorString( err ) );
+            int err2 = crTCPIPErrno( );
+            if (err2 != EAFNOSUPPORT)
+                crWarning( "socket error: %s, trying another way", crTCPIPErrorString( err2 ) );
             cur=cur->ai_next;
             continue;
         }
diff --git a/src/VBox/GuestHost/OpenGL/util/threads.c b/src/VBox/GuestHost/OpenGL/util/threads.c
index 10916a0..5502fd7 100644
--- a/src/VBox/GuestHost/OpenGL/util/threads.c
+++ b/src/VBox/GuestHost/OpenGL/util/threads.c
@@ -249,6 +249,7 @@ void crInitBarrier(CRbarrier *b, unsigned int count)
 void crFreeBarrier(CRbarrier *b)
 {
     /* XXX anything to do? */
+    (void)b;
 }
 
 
@@ -257,6 +258,7 @@ void crWaitBarrier(CRbarrier *b)
 #ifdef WINDOWS
     DWORD dwEvent
         = WaitForMultipleObjects( b->count, b->hEvents, FALSE, INFINITE );
+    (void)dwEvent;
 #else
     pthread_mutex_lock( &(b->mutex) );
     b->waiting++;
@@ -275,6 +277,7 @@ void crWaitBarrier(CRbarrier *b)
 void crInitSemaphore(CRsemaphore *s, unsigned int count)
 {
 #ifdef WINDOWS
+    (void) s; (void) count;
     crWarning("CRsemaphore functions not implemented on Windows");
 #else
     sem_init(s, 0, count);
@@ -286,6 +289,7 @@ void crWaitSemaphore(CRsemaphore *s)
 {
 #ifdef WINDOWS
     /* to do */
+    (void) s;
 #else
     sem_wait(s);
 #endif
@@ -296,6 +300,7 @@ void crSignalSemaphore(CRsemaphore *s)
 {
 #ifdef WINDOWS
     /* to do */
+    (void) s;
 #else
     sem_post(s);
 #endif
diff --git a/src/VBox/GuestHost/OpenGL/util/timer.c b/src/VBox/GuestHost/OpenGL/util/timer.c
index cad0d95..9ac8433 100644
--- a/src/VBox/GuestHost/OpenGL/util/timer.c
+++ b/src/VBox/GuestHost/OpenGL/util/timer.c
@@ -12,7 +12,11 @@
 #include <unistd.h>
 #else
 #define WIN32_LEAN_AND_MEAN
+# ifdef VBOX
+#  include <iprt/win/windows.h>
+# else
 #include <windows.h>
+# endif
 #endif
 
 #include "cr_timer.h"
diff --git a/src/VBox/GuestHost/OpenGL/util/udptcpip.c b/src/VBox/GuestHost/OpenGL/util/udptcpip.c
index 47fd159..6d883e8 100644
--- a/src/VBox/GuestHost/OpenGL/util/udptcpip.c
+++ b/src/VBox/GuestHost/OpenGL/util/udptcpip.c
@@ -520,9 +520,9 @@ crUDPTCPIPRecv( void )
 		}
 		else if ( FD_ISSET(conn->udp_socket, &read_fds ) )
 		{
-			CRTCPIPBuffer *buf = ((CRTCPIPBuffer *) crTCPIPAlloc( conn )) - 1;
-			unsigned int *seq = ((unsigned int *) (buf + 1)) - 1;
-			int len;
+			unsigned int *seq;
+			buf = ((CRTCPIPBuffer *) crTCPIPAlloc( conn )) - 1;
+			seq = ((unsigned int *) (buf + 1)) - 1;
 
 			len = recv( conn->udp_socket, (void *)seq,
 				buf->allocated + sizeof(*seq), MSG_TRUNC );
diff --git a/src/VBox/GuestHost/OpenGL/util/util.rc b/src/VBox/GuestHost/OpenGL/util/util.rc
index 6658730..4fe0eee 100644
--- a/src/VBox/GuestHost/OpenGL/util/util.rc
+++ b/src/VBox/GuestHost/OpenGL/util/util.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/GuestHost/OpenGL/util/vboxhgcm.c b/src/VBox/GuestHost/OpenGL/util/vboxhgcm.c
index 031dec0..a6dc566 100644
--- a/src/VBox/GuestHost/OpenGL/util/vboxhgcm.c
+++ b/src/VBox/GuestHost/OpenGL/util/vboxhgcm.c
@@ -1,11 +1,10 @@
 /* $Id: vboxhgcm.c $ */
-
 /** @file
  * VBox HGCM connection
  */
 
 /*
- * Copyright (C) 2008-2012 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -15,15 +14,16 @@
  * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
+
 #ifdef RT_OS_WINDOWS
-    #include <windows.h>
-    #include <ddraw.h>
+# include <iprt/win/windows.h>
+# include <ddraw.h>
 #else
-    #include <sys/ioctl.h>
-    #include <errno.h>
-    #include <fcntl.h>
-    #include <string.h>
-    #include <unistd.h>
+# include <sys/ioctl.h>
+# include <errno.h>
+# include <fcntl.h>
+# include <string.h>
+# include <unistd.h>
 #endif
 
 #include "cr_error.h"
@@ -63,10 +63,10 @@
 #endif
 #define CRASSERT Assert
 #endif
-//#define IN_GUEST
-//#if defined(IN_GUEST)
-//#define VBOX_WITH_CRHGSMIPROFILE
-//#endif
+/*#define IN_GUEST
+#if defined(IN_GUEST)
+#define VBOX_WITH_CRHGSMIPROFILE
+#endif */
 #ifdef VBOX_WITH_CRHGSMIPROFILE
 #include <iprt/time.h>
 #include <stdio.h>
@@ -100,7 +100,7 @@ DECLINLINE(void) vboxCrHgsmiProfileStep(PVBOXCRHGSMIPROFILE pProfile, uint64_t c
 typedef struct VBOXCRHGSMIPROFILE_SCOPE
 {
     uint64_t cStartTime;
-//    bool bDisable;
+/*    bool bDisable;*/
 } VBOXCRHGSMIPROFILE_SCOPE, *PVBOXCRHGSMIPROFILE_SCOPE;
 
 static VBOXCRHGSMIPROFILE g_VBoxProfile;
@@ -130,13 +130,13 @@ DECLINLINE(void) vboxCrHgsmiProfileLog(PVBOXCRHGSMIPROFILE pProfile, uint64_t cT
 
 DECLINLINE(void) vboxCrHgsmiProfileScopeEnter(PVBOXCRHGSMIPROFILE_SCOPE pScope)
 {
-//    pScope->bDisable = false;
+/*    pScope->bDisable = false; */
     pScope->cStartTime = VBOXCRHGSMIPROFILE_GET_TIME_NANO();
 }
 
 DECLINLINE(void) vboxCrHgsmiProfileScopeExit(PVBOXCRHGSMIPROFILE_SCOPE pScope)
 {
-//    if (!pScope->bDisable)
+/*    if (!pScope->bDisable) */
     {
         uint64_t cTime = VBOXCRHGSMIPROFILE_GET_TIME_NANO();
         vboxCrHgsmiProfileStep(&g_VBoxProfile, cTime - pScope->cStartTime);
@@ -521,10 +521,12 @@ DECLINLINE(void) _crVBoxHGSMIFillCmd(VBOXUHGSMI_BUFFER_SUBMIT *pSubm, PCRVBOXHGS
     pSubm->cbData = cbData;
     pSubm->fFlags.Value = 0;
     pSubm->fFlags.bDoNotRetire = 1;
-//    pSubm->fFlags.bDoNotSignalCompletion = 1; /* <- we do not need that actually since
-//                                                       * in case we want completion,
-//                                                       * we will block in _crVBoxHGSMICmdBufferGetRc (when locking the buffer)
-//                                                       * which is needed for getting the result */
+# if 0
+    pSubm->fFlags.bDoNotSignalCompletion = 1; /* <- we do not need that actually since
+                                               * in case we want completion,
+                                               * we will block in _crVBoxHGSMICmdBufferGetRc (when locking the buffer)
+                                               * which is needed for getting the result */
+# endif
 }
 #endif
 
@@ -548,6 +550,7 @@ static bool _crVBoxHGCMReadBytes(CRConnection *conn, void *buf, uint32_t len)
 }
 #endif
 
+#ifndef IN_GUEST
 /*@todo get rid of it*/
 static bool _crVBoxHGCMWriteBytes(CRConnection *conn, const void *buf, uint32_t len)
 {
@@ -575,6 +578,7 @@ static bool _crVBoxHGCMWriteBytes(CRConnection *conn, const void *buf, uint32_t
 
     return TRUE;
 }
+#endif
 
 /**
  * Send an HGCM request
@@ -587,7 +591,9 @@ static bool _crVBoxHGCMWriteBytes(CRConnection *conn, const void *buf, uint32_t
 static int crVBoxHGCMCall(CRConnection *conn, void *pvData, unsigned cbData)
 {
 #ifdef IN_GUEST
-# if defined(VBOX_WITH_CRHGSMI)
+# ifndef VBOX_WITH_CRHGSMI
+    RT_NOREF(conn);
+# else
     PCRVBOXHGSMI_CLIENT pClient = g_crvboxhgcm.bHgsmiOn ? _crVBoxHGSMIClientGet(conn) : NULL;
     if (pClient)
     {
@@ -680,11 +686,13 @@ static int crVBoxHGCMCall(CRConnection *conn, void *pvData, unsigned cbData)
     return VERR_NOT_SUPPORTED;
 # endif /*#ifdef RT_OS_WINDOWS*/
     }
-#else /*#ifdef IN_GUEST*/
+
+#else  /* IN_GUEST */
+    RT_NOREF(conn, pvData, cbData);
     crError("crVBoxHGCMCall called on host side!");
     CRASSERT(FALSE);
     return VERR_NOT_SUPPORTED;
-#endif
+#endif /* IN_GUEST */
 }
 
 static void *_crVBoxHGCMAlloc(CRConnection *conn)
@@ -804,13 +812,14 @@ static void crVBoxHGCMReadExact( CRConnection *conn, const void *buf, unsigned i
 {
     CRVBOXHGCMREAD parms;
     int rc;
+    RT_NOREF(buf, len);
 
     parms.hdr.result      = VERR_WRONG_ORDER;
     parms.hdr.u32ClientID = conn->u32ClientID;
     parms.hdr.u32Function = SHCRGL_GUEST_FN_READ;
     parms.hdr.cParms      = SHCRGL_CPARMS_READ;
 
-    CRASSERT(!conn->pBuffer); //make sure there's no data to process
+    CRASSERT(!conn->pBuffer); /* make sure there's no data to process */
     parms.pBuffer.type                   = VMMDevHGCMParmType_LinAddr_Out;
     parms.pBuffer.u.Pointer.size         = conn->cbHostBufferAllocated;
     parms.pBuffer.u.Pointer.u.linearAddr = (uintptr_t) conn->pHostBuffer;
@@ -828,7 +837,7 @@ static void crVBoxHGCMReadExact( CRConnection *conn, const void *buf, unsigned i
 
     if (parms.cbBuffer.u.value32)
     {
-        //conn->pBuffer  = (uint8_t*) parms.pBuffer.u.Pointer.u.linearAddr;
+        /*conn->pBuffer  = (uint8_t*) parms.pBuffer.u.Pointer.u.linearAddr; */
         conn->pBuffer  = conn->pHostBuffer;
         conn->cbBuffer = parms.cbBuffer.u.value32;
     }
@@ -857,7 +866,7 @@ crVBoxHGCMWriteReadExact(CRConnection *conn, const void *buf, unsigned int len,
     parms.pBuffer.u.Pointer.size         = len;
     parms.pBuffer.u.Pointer.u.linearAddr = (uintptr_t) buf;
 
-    CRASSERT(!conn->pBuffer); //make sure there's no data to process
+    CRASSERT(!conn->pBuffer); /*make sure there's no data to process*/
     parms.pWriteback.type                   = VMMDevHGCMParmType_LinAddr_Out;
     parms.pWriteback.u.Pointer.size         = conn->cbHostBufferAllocated;
     parms.pWriteback.u.Pointer.u.linearAddr = (uintptr_t) conn->pHostBuffer;
@@ -964,7 +973,7 @@ crVBoxHGCMWriteReadExact(CRConnection *conn, const void *buf, unsigned int len,
 
     if (parms.cbWriteback.u.value32)
     {
-        //conn->pBuffer  = (uint8_t*) parms.pWriteback.u.Pointer.u.linearAddr;
+        /*conn->pBuffer  = (uint8_t*) parms.pWriteback.u.Pointer.u.linearAddr;*/
         conn->pBuffer  = conn->pHostBuffer;
         conn->cbBuffer = parms.cbWriteback.u.value32;
     }
@@ -986,7 +995,7 @@ static void crVBoxHGCMSend(CRConnection *conn, void **bufp,
     if (!bufp) /* We're sending a user-allocated buffer. */
     {
 #ifndef IN_GUEST
-            //@todo remove temp buffer allocation in unpacker
+            /**@todo remove temp buffer allocation in unpacker*/
             /* we're at the host side, so just store data until guest polls us */
             _crVBoxHGCMWriteBytes(conn, start, len);
 #else
@@ -1106,7 +1115,7 @@ static void _crVBoxHGCMFree(CRConnection *conn, void *buf)
             crLockMutex(&g_crvboxhgcm.mutex);
 #endif
             if (g_crvboxhgcm.bufpool) {
-                //@todo o'rly?
+                /**@todo o'rly? */
                 /* pool may have been deallocated just a bit earlier in response
                  * to a SIGPIPE (Broken Pipe) signal.
                  */
@@ -1153,7 +1162,7 @@ static void _crVBoxHGCMReceiveMessage(CRConnection *conn)
 #ifndef IN_GUEST
     if (conn->allow_redir_ptr)
     {
-#endif //IN_GUEST
+#endif
         CRASSERT(conn->buffer_size >= sizeof(CRMessageRedirPtr));
 
         hgcm_buffer = (CRVBOXHGCMBUFFER *) _crVBoxHGCMAlloc( conn ) - 1;
@@ -1203,7 +1212,7 @@ static void _crVBoxHGCMReceiveMessage(CRConnection *conn)
         msg = (CRMessage *) (hgcm_buffer + 1);
         cached_type = msg->header.type;
     }
-#endif //IN_GUEST
+#endif /* !IN_GUEST*/
 
     conn->recv_credits     -= len;
     conn->total_bytes_recv += len;
@@ -1241,6 +1250,7 @@ static void crVBoxHGCMReceiveMessage(CRConnection *conn)
  */
 static void crVBoxHGCMAccept( CRConnection *conn, const char *hostname, unsigned short port )
 {
+    RT_NOREF(hostname, port);
     VBOXCRHGSMIPROFILE_FUNC_PROLOGUE();
     CRASSERT(conn && conn->pHostBuffer);
 #ifdef IN_GUEST
@@ -1253,6 +1263,7 @@ static int crVBoxHGCMSetVersion(CRConnection *conn, unsigned int vMajor, unsigne
 {
     CRVBOXHGCMSETVERSION parms;
     int rc;
+    RT_NOREF(vMajor, vMinor);
 
     parms.hdr.result      = VERR_WRONG_ORDER;
     parms.hdr.u32ClientID = conn->u32ClientID;
@@ -1465,26 +1476,19 @@ static int crVBoxHGCMDoConnect( CRConnection *conn )
             VBOXCRHGSMIPROFILE_FUNC_EPILOGUE();
             return RT_SUCCESS(rc);
         }
-        else
-        {
-            crDebug("HGCM connect failed with rc=0x%x\n", info.result);
+        crDebug("HGCM connect failed with rc=0x%x\n", info.result);
 
-            VBOXCRHGSMIPROFILE_FUNC_EPILOGUE();
-            return FALSE;
-        }
+        VBOXCRHGSMIPROFILE_FUNC_EPILOGUE();
+        return FALSE;
     }
-    else
-    {
 #ifdef RT_OS_WINDOWS
+    {
         DWORD winEr = GetLastError();
         crDebug("IOCTL for HGCM connect failed with rc=0x%x\n", winEr);
+    }
 #else
-        crDebug("IOCTL for HGCM connect failed with rc=0x%x\n", errno);
+    crDebug("IOCTL for HGCM connect failed with rc=0x%x\n", errno);
 #endif
-        VBOXCRHGSMIPROFILE_FUNC_EPILOGUE();
-        return FALSE;
-    }
-
     VBOXCRHGSMIPROFILE_FUNC_EPILOGUE();
     return FALSE;
 
@@ -1622,6 +1626,7 @@ static void crVBoxHGCMInstantReclaim(CRConnection *conn, CRMessage *mess)
 
 static void crVBoxHGCMHandleNewMessage( CRConnection *conn, CRMessage *msg, unsigned int len )
 {
+    RT_NOREF(conn, msg, len);
     VBOXCRHGSMIPROFILE_FUNC_PROLOGUE();
     CRASSERT(FALSE);
     VBOXCRHGSMIPROFILE_FUNC_EPILOGUE();
@@ -1639,14 +1644,7 @@ bool _crVBoxHGSMIInit()
     if (bHasHGSMI < 0)
     {
         int rc;
-#ifndef VBOX_CRHGSMI_WITH_D3DDEV
-        rc = VBoxCrHgsmiInit(CR_PROTOCOL_VERSION_MAJOR, CR_PROTOCOL_VERSION_MINOR);
-#else
-        VBOXCRHGSMI_CALLBACKS Callbacks;
-        Callbacks.pfnClientCreate = _crVBoxHGSMIClientCreate;
-        Callbacks.pfnClientDestroy = _crVBoxHGSMIClientDestroy;
-        rc = VBoxCrHgsmiInit(&Callbacks);
-#endif
+        rc = VBoxCrHgsmiInit();
         if (RT_SUCCESS(rc))
             bHasHGSMI = 1;
         else
@@ -1776,9 +1774,9 @@ static void _crVBoxHGSMIPollHost(CRConnection *conn, PCRVBOXHGSMI_CLIENT pClient
     parms->hdr.result      = VERR_WRONG_ORDER;
     parms->hdr.u32ClientID = conn->u32ClientID;
     parms->hdr.u32Function = SHCRGL_GUEST_FN_READ;
-//    parms->hdr.u32Reserved = 0;
+/*    parms->hdr.u32Reserved = 0;*/
 
-    CRASSERT(!conn->pBuffer); //make sure there's no data to process
+    CRASSERT(!conn->pBuffer); /* make sure there's no data to process */
     parms->iBuffer = 1;
     parms->cbBuffer = 0;
 
@@ -1851,16 +1849,16 @@ _crVBoxHGSMIWriteReadExact(CRConnection *conn, PCRVBOXHGSMI_CLIENT pClient, void
     VBOXUHGSMI_BUFFER_SUBMIT aSubmit[3];
     PVBOXUHGSMI_BUFFER pBuf = NULL;
     VBOXUHGSMI_BUFFER_LOCK_FLAGS fFlags;
-//    uint32_t cbBuffer;
+/*    uint32_t cbBuffer;*/
 
     parms->hdr.result      = VERR_WRONG_ORDER;
     parms->hdr.u32ClientID = conn->u32ClientID;
     parms->hdr.u32Function = SHCRGL_GUEST_FN_WRITE_READ;
-//    parms->hdr.u32Reserved = 0;
+/*    parms->hdr.u32Reserved = 0;*/
 
     parms->iBuffer = 1;
 
-    CRASSERT(!conn->pBuffer); //make sure there's no data to process
+    CRASSERT(!conn->pBuffer); /* make sure there's no data to process */
     parms->iWriteback = 2;
     parms->cbWriteback = 0;
 
@@ -2013,7 +2011,7 @@ _crVBoxHGSMIWriteReadExact(CRConnection *conn, PCRVBOXHGSMI_CLIENT pClient, void
 static void _crVBoxHGSMIWriteExact(CRConnection *conn, PCRVBOXHGSMI_CLIENT pClient, PVBOXUHGSMI_BUFFER pBuf, uint32_t offStart, unsigned int len)
 {
     int rc;
-    int32_t callRes;
+    int32_t callRes = VINF_SUCCESS; /* Shut up MSC. */
     VBOXUHGSMI_BUFFER_SUBMIT aSubmit[2];
 
 #ifdef IN_GUEST
@@ -2029,7 +2027,7 @@ static void _crVBoxHGSMIWriteExact(CRConnection *conn, PCRVBOXHGSMI_CLIENT pClie
         parms->hdr.result      = VERR_WRONG_ORDER;
         parms->hdr.u32ClientID = conn->u32ClientID;
         parms->hdr.u32Function = SHCRGL_GUEST_FN_INJECT;
-//        parms->hdr.u32Reserved = 0;
+/*        parms->hdr.u32Reserved = 0;*/
 
         parms->u32ClientID = conn->u32InjectClientID;
 
@@ -2063,7 +2061,7 @@ static void _crVBoxHGSMIWriteExact(CRConnection *conn, PCRVBOXHGSMI_CLIENT pClie
         parms->hdr.result      = VERR_WRONG_ORDER;
         parms->hdr.u32ClientID = conn->u32ClientID;
         parms->hdr.u32Function = SHCRGL_GUEST_FN_WRITE;
-//        parms->hdr.u32Reserved = 0;
+/*        parms->hdr.u32Reserved = 0; */
 
         parms->iBuffer = 1;
         _crVBoxHGSMICmdBufferUnlock(pClient);
@@ -2113,7 +2111,7 @@ static void crVBoxHGSMISend(CRConnection *conn, void **bufp,
         if (pClient)
         {
 #ifndef IN_GUEST
-                //@todo remove temp buffer allocation in unpacker
+                /** @todo remove temp buffer allocation in unpacker */
                 /* we're at the host side, so just store data until guest polls us */
                 _crVBoxHGCMWriteBytes(conn, start, len);
 #else
@@ -2412,7 +2410,7 @@ void crVBoxHGCMInit(CRNetReceiveFuncList *rfl, CRNetCloseFuncList *cfl, unsigned
 }
 
 /* Callback function used to free buffer pool entries */
-void crVBoxHGCMBufferFree(void *data)
+static void crVBoxHGCMBufferFree(void *data)
 {
     CRVBOXHGCMBUFFER *hgcm_buffer = (CRVBOXHGCMBUFFER *) data;
 
@@ -2541,7 +2539,7 @@ void crVBoxHGCMConnection(CRConnection *conn
     conn->cbBuffer = 0;
     conn->allow_redir_ptr = 1;
 
-    //@todo remove this crap at all later
+    /** @todo remove this crap at all later */
     conn->cbHostBufferAllocated = 2*1024;
     conn->pHostBuffer = (uint8_t*) crAlloc(conn->cbHostBufferAllocated);
     CRASSERT(conn->pHostBuffer);
@@ -2577,7 +2575,7 @@ void crVBoxHGCMConnection(CRConnection *conn
 }
 
 #if defined(IN_GUEST)
-void _crVBoxHGCMPerformPollHost(CRConnection *conn)
+static void _crVBoxHGCMPerformPollHost(CRConnection *conn)
 {
     if (conn->type == CR_NO_CONNECTION )
         return;
@@ -2599,7 +2597,7 @@ void _crVBoxHGCMPerformPollHost(CRConnection *conn)
 }
 #endif
 
-void _crVBoxHGCMPerformReceiveMessage(CRConnection *conn)
+static void _crVBoxHGCMPerformReceiveMessage(CRConnection *conn)
 {
     if ( conn->type == CR_NO_CONNECTION )
         return;
@@ -2611,7 +2609,7 @@ void _crVBoxHGCMPerformReceiveMessage(CRConnection *conn)
 }
 
 #ifdef IN_GUEST
-uint32_t crVBoxHGCMHostCapsGet()
+uint32_t crVBoxHGCMHostCapsGet(void)
 {
     Assert(g_crvboxhgcm.fHostCapsInitialized);
     return g_crvboxhgcm.u32HostCaps;
@@ -2621,6 +2619,8 @@ uint32_t crVBoxHGCMHostCapsGet()
 int crVBoxHGCMRecv(
 #if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
         CRConnection *conn
+#else
+        void
 #endif
         )
 {
diff --git a/src/VBox/GuestHost/OpenGL/util/vboxhgsmi.c b/src/VBox/GuestHost/OpenGL/util/vboxhgsmi.c
index 1c53f6f..d096604 100644
--- a/src/VBox/GuestHost/OpenGL/util/vboxhgsmi.c
+++ b/src/VBox/GuestHost/OpenGL/util/vboxhgsmi.c
@@ -1,11 +1,10 @@
 /* $Id: vboxhgsmi.c $ */
-
 /** @file
  * VBox HGCM connection
  */
 
 /*
- * Copyright (C) 2008-2010 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -15,17 +14,19 @@
  * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
+
 //#define IN_GUEST
-#ifdef IN_GUEST
+#ifdef IN_GUEST /* entire file */
+
 #ifdef RT_OS_WINDOWS
-    #include <windows.h>
-    #include <ddraw.h>
+# include <iprt/win/windows.h>
+# include <ddraw.h>
 #else
-    #include <sys/ioctl.h>
-    #include <errno.h>
-    #include <fcntl.h>
-    #include <string.h>
-    #include <unistd.h>
+# include <sys/ioctl.h>
+# include <errno.h>
+# include <fcntl.h>
+# include <string.h>
+# include <unistd.h>
 #endif
 
 #include "cr_error.h"
diff --git a/src/VBox/GuestHost/OpenGL/util/vreg.cpp b/src/VBox/GuestHost/OpenGL/util/vreg.cpp
index 0095ac5..5df7fc6 100644
--- a/src/VBox/GuestHost/OpenGL/util/vreg.cpp
+++ b/src/VBox/GuestHost/OpenGL/util/vreg.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2014 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -65,37 +65,7 @@ DECLINLINE(int) vboxVrLaCreate(PRTMEMCACHE phCache, size_t cbElement)
 # ifdef RT_OS_WINDOWS
 #  undef PAGE_SIZE
 #  undef PAGE_SHIFT
-#  define VBOX_WITH_WORKAROUND_MISSING_PACK
-#  if (_MSC_VER >= 1400) && !defined(VBOX_WITH_PATCHED_DDK)
-#    define _InterlockedExchange           _InterlockedExchange_StupidDDKVsCompilerCrap
-#    define _InterlockedExchangeAdd        _InterlockedExchangeAdd_StupidDDKVsCompilerCrap
-#    define _InterlockedCompareExchange    _InterlockedCompareExchange_StupidDDKVsCompilerCrap
-#    define _InterlockedAddLargeStatistic  _InterlockedAddLargeStatistic_StupidDDKVsCompilerCrap
-#    define _interlockedbittestandset      _interlockedbittestandset_StupidDDKVsCompilerCrap
-#    define _interlockedbittestandreset    _interlockedbittestandreset_StupidDDKVsCompilerCrap
-#    define _interlockedbittestandset64    _interlockedbittestandset64_StupidDDKVsCompilerCrap
-#    define _interlockedbittestandreset64  _interlockedbittestandreset64_StupidDDKVsCompilerCrap
-#    pragma warning(disable : 4163)
-#    ifdef VBOX_WITH_WORKAROUND_MISSING_PACK
-#     pragma warning(disable : 4103)
-#    endif
-#    include <ntddk.h>
-#    pragma warning(default : 4163)
-#    ifdef VBOX_WITH_WORKAROUND_MISSING_PACK
-#     pragma pack()
-#     pragma warning(default : 4103)
-#    endif
-#    undef  _InterlockedExchange
-#    undef  _InterlockedExchangeAdd
-#    undef  _InterlockedCompareExchange
-#    undef  _InterlockedAddLargeStatistic
-#    undef  _interlockedbittestandset
-#    undef  _interlockedbittestandreset
-#    undef  _interlockedbittestandset64
-#    undef  _interlockedbittestandreset64
-#  else
-#    include <ntddk.h>
-#  endif
+#  include <iprt/nt/ntddk.h>
 #  ifndef VBOXVDBG_VR_LAL_DISABLE
 static LOOKASIDE_LIST_EX g_VBoxVrLookasideList;
 #   define vboxVrRegLaAlloc(_c) ExAllocateFromLookasideListEx(&(_c))
@@ -430,6 +400,7 @@ static void vboxVrListVisitIntersected(PVBOXVR_LIST pList1, uint32_t cRects, PCR
     }
 }
 
+#if 0 /* unused */
 /**
  * @returns Entry to be iterated next. ListHead is returned to break the
  *          iteration
@@ -464,6 +435,7 @@ static void vboxVrListVisitNonintersected(PVBOXVR_LIST pList1, uint32_t cRects,
             pNext1 = pEntry1->pNext;
     }
 }
+#endif /* unused */
 
 static void vboxVrListJoinRectsHV(PVBOXVR_LIST pList, bool fHorizontal)
 {
@@ -741,6 +713,8 @@ VBOXVREGDECL(void) VBoxVrListTranslate(PVBOXVR_LIST pList, int32_t x, int32_t y)
     }
 }
 
+#if 0 /* unused */
+
 static DECLCALLBACK(PRTLISTNODE) vboxVrListIntersectNoJoinNonintersectedCb(PVBOXVR_LIST pList1, PVBOXVR_REG pReg1, void *pvContext)
 {
     VBOXVR_CBDATA_SUBST *pData = (VBOXVR_CBDATA_SUBST*)pvContext;
@@ -762,6 +736,7 @@ static DECLCALLBACK(PRTLISTNODE) vboxVrListIntersectNoJoinNonintersectedCb(PVBOX
 static DECLCALLBACK(PRTLISTNODE) vboxVrListIntersectNoJoinIntersectedCb(PVBOXVR_LIST pList1, PVBOXVR_REG pReg1, PCRTRECT pRect2,
                                                                         void *pvContext, PPRTLISTNODE ppNext)
 {
+    RT_NOREF1(ppNext);
     PVBOXVR_CBDATA_SUBST pData = (PVBOXVR_CBDATA_SUBST)pvContext;
     pData->fChanged = true;
 
@@ -783,6 +758,8 @@ static DECLCALLBACK(PRTLISTNODE) vboxVrListIntersectNoJoinIntersectedCb(PVBOXVR_
     return &pReg1->ListEntry;
 }
 
+#endif /* unused */
+
 static int vboxVrListIntersectNoJoin(PVBOXVR_LIST pList, PCVBOXVR_LIST pList2, bool *pfChanged)
 {
     bool fChanged = false;
diff --git a/src/VBox/GuestHost/SharedClipboard/Makefile.kmk b/src/VBox/GuestHost/SharedClipboard/Makefile.kmk
index 3e239d7..778ffcd 100644
--- a/src/VBox/GuestHost/SharedClipboard/Makefile.kmk
+++ b/src/VBox/GuestHost/SharedClipboard/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/GuestHost/SharedClipboard/clipboard-helper.cpp b/src/VBox/GuestHost/SharedClipboard/clipboard-helper.cpp
index ad96ece..fbf9121 100644
--- a/src/VBox/GuestHost/SharedClipboard/clipboard-helper.cpp
+++ b/src/VBox/GuestHost/SharedClipboard/clipboard-helper.cpp
@@ -6,7 +6,7 @@
 /*
  * Includes contributions from François Revol
  *
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/GuestHost/SharedClipboard/x11-clipboard.cpp b/src/VBox/GuestHost/SharedClipboard/x11-clipboard.cpp
index 2392df8..fa65881 100644
--- a/src/VBox/GuestHost/SharedClipboard/x11-clipboard.cpp
+++ b/src/VBox/GuestHost/SharedClipboard/x11-clipboard.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -64,7 +64,7 @@ enum CLIPFORMAT
     TEXT,  /* Treat this as Utf8, but it may really be ascii */
     UTF8,
     BMP,
-	HTML
+        HTML
 };
 
 /** The table mapping X11 names to data formats and to the corresponding
@@ -95,9 +95,9 @@ static struct _CLIPFORMATTABLE
     { "image/bmp", BMP, VBOX_SHARED_CLIPBOARD_FMT_BITMAP },
     { "image/x-bmp", BMP, VBOX_SHARED_CLIPBOARD_FMT_BITMAP },
     { "image/x-MS-bmp", BMP, VBOX_SHARED_CLIPBOARD_FMT_BITMAP }
-   
-	
-    /* TODO: Inkscape exports image/png but not bmp... */
+
+
+    /** @todo Inkscape exports image/png but not bmp... */
 };
 
 typedef unsigned CLIPX11FORMAT;
@@ -140,6 +140,7 @@ static CLIPX11FORMAT clipFindX11FormatByAtom(CLIPBACKEND *pCtx, Atom atomFormat)
     return NIL_CLIPX11FORMAT;
 }
 
+#ifdef TESTCASE
 /** Lookup the X11 format matching a given X11 atom text.
  * @returns the format on success, NIL_CLIPX11FORMAT on failure
  * @param   widget a valid Xt widget
@@ -151,6 +152,7 @@ static CLIPX11FORMAT clipFindX11FormatByAtomText(const char *pcsz)
             return i;
     return NIL_CLIPX11FORMAT;
 }
+#endif
 
 /**
  * Enumerates supported X11 clipboard formats corresponding to a given VBox
@@ -325,6 +327,7 @@ void clipQueueToEventThread(CLIPBACKEND *pCtx,
     ssize_t cbWritten = write(pCtx->wakeupPipeWrite, WAKE_UP_STRING, WAKE_UP_STRING_LEN);
     NOREF(cbWritten);
 #else
+    RT_NOREF1(pCtx);
     testQueueToEventThread(proc, client_data);
 #endif
 }
@@ -338,8 +341,8 @@ static void clipReportFormatsToVBox(CLIPBACKEND *pCtx)
     u32VBoxFormats |= clipVBoxFormatForX11Format(pCtx->X11BitmapFormat);
     u32VBoxFormats |= clipVBoxFormatForX11Format(pCtx->X11HTMLFormat);
     LogRelFlowFunc(("clipReportFormatsToVBox format: %d\n", u32VBoxFormats));
-    LogRelFlowFunc(("clipReportFormatsToVBox txt: %d, bitm: %d, html:%d, u32VBoxFormats: %d\n", 
-                    pCtx->X11TextFormat, pCtx->X11BitmapFormat, pCtx->X11HTMLFormat, 
+    LogRelFlowFunc(("clipReportFormatsToVBox txt: %d, bitm: %d, html:%d, u32VBoxFormats: %d\n",
+                    pCtx->X11TextFormat, pCtx->X11BitmapFormat, pCtx->X11HTMLFormat,
                     u32VBoxFormats ));
     ClipReportX11Formats(pCtx->pFrontend, u32VBoxFormats);
 }
@@ -449,7 +452,7 @@ static CLIPX11FORMAT clipGetBitmapFormatFromTargets(CLIPBACKEND *pCtx,
 
 /**
  * Go through an array of X11 clipboard targets to see if they contain a HTML
- * format we can support, and if so choose the ones we prefer 
+ * format we can support, and if so choose the ones we prefer
  * @param  pCtx      the clipboard backend context structure
  * @param  pTargets  the list of targets
  * @param  cTargets  the size of the list in @a pTargets
@@ -555,8 +558,8 @@ static void clipConvertX11Targets(Widget widget, XtPointer pClientData,
                                   XtPointer pValue, long unsigned int *pcLen,
                                   int *piFormat)
 {
-    CLIPBACKEND *pCtx =
-            reinterpret_cast<CLIPBACKEND *>(pClientData);
+    RT_NOREF1(piFormat);
+    CLIPBACKEND *pCtx = reinterpret_cast<CLIPBACKEND *>(pClientData);
     Atom *pAtoms = (Atom *)pValue;
     unsigned i, j;
     LogRel2(("%s: pValue=%p, *pcLen=%u, *atomType=%d%s\n", __FUNCTION__,
@@ -674,8 +677,9 @@ void clipPeekEventAndDoXFixesHandling(CLIPBACKEND *pCtx)
  * The main loop of our clipboard reader.
  * @note  X11 backend code.
  */
-static DECLCALLBACK(int) clipEventThread(RTTHREAD self, void *pvUser)
+static DECLCALLBACK(int) clipEventThread(RTTHREAD hThreadSelf, void *pvUser)
 {
+    RT_NOREF1(hThreadSelf);
     LogRel(("Shared clipboard: Starting shared clipboard thread\n"));
 
     CLIPBACKEND *pCtx = (CLIPBACKEND *)pvUser;
@@ -745,6 +749,8 @@ static int clipLoadXFixes(Display *pDisplay, CLIPBACKEND *pCtx)
         hFixesLib = dlopen("libXfixes.so.2", RTLD_LAZY);
     if (!hFixesLib)
         hFixesLib = dlopen("libXfixes.so.3", RTLD_LAZY);
+    if (!hFixesLib)
+        hFixesLib = dlopen("libXfixes.so.4", RTLD_LAZY);
     if (hFixesLib)
         pCtx->fixesSelectInput =
             (void (*)(Display *, Window, Atom, long unsigned int))
@@ -821,8 +827,6 @@ static int clipInit(CLIPBACKEND *pCtx)
     }
     if (RT_SUCCESS(rc))
     {
-        EventMask mask = 0;
-
         XtSetMappedWhenManaged(pCtx->widget, false);
         XtRealizeWidget(pCtx->widget);
 #ifndef TESTCASE
@@ -863,10 +867,7 @@ static int clipInit(CLIPBACKEND *pCtx)
  */
 CLIPBACKEND *ClipConstructX11(VBOXCLIPBOARDCONTEXT *pFrontend, bool fHeadless)
 {
-    int rc;
-
-    CLIPBACKEND *pCtx = (CLIPBACKEND *)
-                    RTMemAllocZ(sizeof(CLIPBACKEND));
+    CLIPBACKEND *pCtx = (CLIPBACKEND *)RTMemAllocZ(sizeof(CLIPBACKEND));
     if (pCtx && fHeadless)
     {
         /*
@@ -972,6 +973,7 @@ int ClipStopX11(CLIPBACKEND *pCtx)
 #else
     rc = VINF_SUCCESS;
     rcThread = VINF_SUCCESS;
+    RT_NOREF_PV(count);
 #endif
     if (RT_SUCCESS(rc))
         AssertRC(rcThread);
@@ -979,6 +981,7 @@ int ClipStopX11(CLIPBACKEND *pCtx)
         LogRelFunc(("rc=%Rrc\n", rc));
     clipUninit(pCtx);
     LogRelFlowFunc(("returning %Rrc.\n", rc));
+    RT_NOREF_PV(rcThread);
     return rc;
 }
 
@@ -1151,6 +1154,8 @@ static int clipWinTxtToUtf8ForX11CB(Display *pDisplay, PRTUTF16 pwszSrc,
                                     unsigned long *pcLenReturn,
                                     int *piFormatReturn)
 {
+    RT_NOREF2(pDisplay, pcLenReturn);
+
     /* This may slightly overestimate the space needed. */
     size_t cbDest = 0;
     int rc = clipWinTxtBufSizeForUtf8(pwszSrc, cbSrc / 2, &cbDest);
@@ -1199,20 +1204,22 @@ static int clipWinHTMLToUtf8ForX11CB(Display *pDisplay, const char *pszSrc,
                                     unsigned long *pcLenReturn,
                                     int *piFormatReturn)
 {
+    RT_NOREF2(pDisplay, pValReturn);
+
     /* This may slightly overestimate the space needed. */
     LogRelFlowFunc(("source: %s", pszSrc));
 
     char *pszDest = (char *)XtMalloc(cbSrc);
     if(pszDest == NULL)
         return VERR_NO_MEMORY;
-        
+
     memcpy(pszDest, pszSrc, cbSrc);
 
     *atomTypeReturn = *atomTarget;
     *pValReturn = (XtPointer)pszDest;
     *pcLenReturn = cbSrc;
     *piFormatReturn = 8;
-    
+
     return VINF_SUCCESS;
 }
 
@@ -1299,7 +1306,7 @@ static int clipConvertVBoxCBForX11(CLIPBACKEND *pCtx, Atom *atomTarget,
         }
         RTMemFree(pv);
     }
-    else if ( (format == HTML) 
+    else if ( (format == HTML)
             && (pCtx->vboxFormats & VBOX_SHARED_CLIPBOARD_FMT_HTML))
     {
         void *pv = NULL;
@@ -1311,10 +1318,10 @@ static int clipConvertVBoxCBForX11(CLIPBACKEND *pCtx, Atom *atomTarget,
             rc = VERR_NO_DATA;
         if (RT_SUCCESS(rc))
         {
-            /* 
-            * The common VBox HTML encoding will be - Utf8 
+            /*
+            * The common VBox HTML encoding will be - Utf8
             * becuase it more general for HTML formats then UTF16
-            * X11 clipboard returns UTF16, so before sending it we should 
+            * X11 clipboard returns UTF16, so before sending it we should
             * convert it to UTF8
             * It's very strange but here we get utf16 from x11 clipboard
             * in same time we send utf8 to x11 clipboard and it's work
@@ -1776,16 +1783,16 @@ static void clipConvertX11CB(void *pClientData, void *pvSrc, unsigned cbSrc)
         {
             case HTML:
             {
-                /* The common VBox HTML encoding will be - Utf8 
+                /* The common VBox HTML encoding will be - Utf8
                 * becuase it more general for HTML formats then UTF16
-                * X11 clipboard returns UTF16, so before sending it we should 
-                * convert it to UTF8 
+                * X11 clipboard returns UTF16, so before sending it we should
+                * convert it to UTF8
                 */
                 pvDest = NULL;
                 cbDest = 0;
-                /* Some applications sends data in utf16, some in itf8, 
+                /* Some applications sends data in utf16, some in itf8,
                  * without indication it in MIME.
-                 * But in case of utf16, at least an OpenOffice adds Byte Order Mark - 0xfeff 
+                 * But in case of utf16, at least an OpenOffice adds Byte Order Mark - 0xfeff
                  * at start of clipboard data
                  */
                 if( cbSrc >= sizeof(RTUTF16) && *(PRTUTF16)pvSrc == 0xfeff )
@@ -1808,8 +1815,8 @@ static void clipConvertX11CB(void *pClientData, void *pvSrc, unsigned cbSrc)
                         break;
                    }
                 }
-                                      
-                LogRelFlowFunc(("Source unicode %ls, cbSrc = %d\n, Byte Order Mark = %hx", 
+
+                LogRelFlowFunc(("Source unicode %ls, cbSrc = %d\n, Byte Order Mark = %hx",
                                 pvSrc, cbSrc, ((PRTUTF16)pvSrc)[0]));
                 LogRelFlowFunc(("converted to win unicode %s, cbDest = %d, rc = %Rrc\n", pvDest, cbDest, rc));
                 rc = VINF_SUCCESS;
@@ -1830,6 +1837,7 @@ static void clipConvertX11CB(void *pClientData, void *pvSrc, unsigned cbSrc)
     LogRelFlowFunc(("rc=%Rrc\n", rc));
 }
 
+#ifndef TESTCASE
 /**
  * Convert the data obtained from the X11 clipboard to the required format,
  * place it in the buffer supplied and signal that data has arrived.
@@ -1843,6 +1851,7 @@ static void cbConvertX11CB(Widget widget, XtPointer pClientData,
                            XtPointer pvSrc, long unsigned int *pcLen,
                            int *piFormat)
 {
+    RT_NOREF1(widget);
     if (*atomType == XT_CONVERT_FAIL) /* Xt timeout */
         clipConvertX11CB(pClientData, NULL, 0);
     else
@@ -1850,6 +1859,7 @@ static void cbConvertX11CB(Widget widget, XtPointer pClientData,
 
     XtFree((char *)pvSrc);
 }
+#endif
 
 #ifdef TESTCASE
 static void testRequestData(CLIPBACKEND* pCtx, CLIPX11FORMAT target,
@@ -1923,7 +1933,7 @@ static void vboxClipboardReadX11Worker(void *pUserData,
              * owner */
             getSelectionValue(pCtx, pCtx->X11HTMLFormat, pReq);
     }
-    else   
+    else
         rc = VERR_NOT_IMPLEMENTED;
     if (RT_FAILURE(rc))
     {
@@ -2037,10 +2047,9 @@ static int clipSetVBoxUtf16(CLIPBACKEND *pCtx, int retval,
 }
 
 /* Return the data in the simulated VBox clipboard. */
-int ClipRequestDataForX11(VBOXCLIPBOARDCONTEXT *pCtx,
-                                 uint32_t u32Format, void **ppv,
-                                 uint32_t *pcb)
+int ClipRequestDataForX11(VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb)
 {
+    RT_NOREF2(pCtx, u32Format);
     *pcb = g_vboxDatacb;
     if (g_vboxDatapv != NULL)
     {
@@ -2053,15 +2062,15 @@ int ClipRequestDataForX11(VBOXCLIPBOARDCONTEXT *pCtx,
 }
 
 Display *XtDisplay(Widget w)
-{ return (Display *) 0xffff; }
+{ NOREF(w); return (Display *) 0xffff; }
 
-void XtAppSetExitFlag(XtAppContext app_context) {}
+void XtAppSetExitFlag(XtAppContext app_context) { NOREF(app_context); }
 
-void XtDestroyWidget(Widget w) {}
+void XtDestroyWidget(Widget w) { NOREF(w); }
 
 XtAppContext XtCreateApplicationContext(void) { return (XtAppContext)0xffff; }
 
-void XtDestroyApplicationContext(XtAppContext app_context) {}
+void XtDestroyApplicationContext(XtAppContext app_context) { NOREF(app_context); }
 
 void XtToolkitInitialize(void) {}
 
@@ -2073,21 +2082,27 @@ Display *XtOpenDisplay(XtAppContext app_context,
                        _Xconst _XtString application_class,
                        XrmOptionDescRec *options, Cardinal num_options,
                        int *argc, char **argv)
-{ return (Display *)0xffff; }
+{
+    RT_NOREF8(app_context, display_string, application_name, application_class, options, num_options, argc, argv);
+    return (Display *)0xffff;
+}
 
-Widget XtVaAppCreateShell(_Xconst _XtString application_name,
-                          _Xconst _XtString application_class,
+Widget XtVaAppCreateShell(_Xconst _XtString application_name,  _Xconst _XtString application_class,
                           WidgetClass widget_class, Display *display, ...)
-{ return TEST_WIDGET; }
+{
+    RT_NOREF4(application_name, application_class, widget_class, display);
+    return TEST_WIDGET;
+}
 
-void XtSetMappedWhenManaged(Widget widget, _XtBoolean mapped_when_managed) {}
+void XtSetMappedWhenManaged(Widget widget, _XtBoolean mapped_when_managed) { RT_NOREF2(widget, mapped_when_managed); }
 
-void XtRealizeWidget(Widget widget) {}
+void XtRealizeWidget(Widget widget) { NOREF(widget); }
 
-XtInputId XtAppAddInput(XtAppContext app_context, int source,
-                        XtPointer condition, XtInputCallbackProc proc,
-                        XtPointer closure)
-{ return 0xffff; }
+XtInputId XtAppAddInput(XtAppContext app_context, int source, XtPointer condition, XtInputCallbackProc proc, XtPointer closure)
+{
+    RT_NOREF5(app_context, source, condition, proc, closure);
+    return 0xffff;
+}
 
 /* Atoms we need other than the formats we support. */
 static const char *g_apszSupAtoms[] =
@@ -2126,8 +2141,9 @@ static const void *g_pSelData = NULL;
 static unsigned long g_cSelData = 0;
 static int g_selFormat = 0;
 
-void testRequestData(CLIPBACKEND* pCtx, CLIPX11FORMAT target, void *closure)
+void testRequestData(CLIPBACKEND *pCtx, CLIPX11FORMAT target, void *closure)
 {
+    RT_NOREF1(pCtx);
     unsigned long count = 0;
     int format = 0;
     if (target != g_selTargets[0])
@@ -2150,9 +2166,9 @@ void testRequestData(CLIPBACKEND* pCtx, CLIPX11FORMAT target, void *closure)
 /* The formats currently on offer from X11 via the shared clipboard */
 static uint32_t g_fX11Formats = 0;
 
-void ClipReportX11Formats(VBOXCLIPBOARDCONTEXT* pCtx,
-                                      uint32_t u32Formats)
+void ClipReportX11Formats(VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Formats)
 {
+    RT_NOREF1(pCtx);
     g_fX11Formats = u32Formats;
 }
 
@@ -2181,6 +2197,7 @@ Boolean XtOwnSelection(Widget widget, Atom selection, Time time,
                        XtLoseSelectionProc lose,
                        XtSelectionDoneProc done)
 {
+    RT_NOREF2(widget, time);
     if (selection != XInternAtom(NULL, "CLIPBOARD", 0))
         return True;  /* We don't really care about this. */
     g_ownsSel = true;  /* Always succeed. */
@@ -2192,6 +2209,7 @@ Boolean XtOwnSelection(Widget widget, Atom selection, Time time,
 
 void XtDisownSelection(Widget widget, Atom selection, Time time)
 {
+    RT_NOREF3(widget, time, selection);
     g_ownsSel = false;
     g_pfnSelConvert = NULL;
     g_pfnSelLose = NULL;
@@ -2256,11 +2274,12 @@ char *XtMalloc(Cardinal size) { return (char *) RTMemAlloc(size); }
 
 char *XGetAtomName(Display *display, Atom atom)
 {
+    RT_NOREF1(display);
     AssertReturn((unsigned)atom < RT_ELEMENTS(g_aFormats) + 1, NULL);
     const char *pcszName = NULL;
     if (atom < 0x1000)
         return NULL;
-    else if (0x1000 <= atom && atom < 0x2000)
+    if (0x1000 <= atom && atom < 0x2000)
     {
         unsigned index = atom - 0x1000;
         AssertReturn(index < RT_ELEMENTS(g_aFormats), NULL);
@@ -2295,10 +2314,9 @@ static int g_completedCB = 0;
 static CLIPREADCBREQ *g_completedReq = NULL;
 static char g_completedBuf[MAX_BUF_SIZE];
 
-void ClipCompleteDataRequestFromX11(VBOXCLIPBOARDCONTEXT *pCtx, int rc,
-                                    CLIPREADCBREQ *pReq, void *pv,
-                                    uint32_t cb)
+void ClipCompleteDataRequestFromX11(VBOXCLIPBOARDCONTEXT *pCtx, int rc, CLIPREADCBREQ *pReq, void *pv, uint32_t cb)
 {
+    RT_NOREF1(pCtx);
     if (cb <= MAX_BUF_SIZE)
     {
         g_completedRC = rc;
@@ -2310,8 +2328,7 @@ void ClipCompleteDataRequestFromX11(VBOXCLIPBOARDCONTEXT *pCtx, int rc,
     g_completedReq = pReq;
 }
 
-static void clipGetCompletedRequest(int *prc, char ** ppc, uint32_t *pcb,
-                                    CLIPREADCBREQ **ppReq)
+static void clipGetCompletedRequest(int *prc, char ** ppc, uint32_t *pcb, CLIPREADCBREQ **ppReq)
 {
     *prc = g_completedRC;
     *ppc = g_completedBuf;
@@ -2423,7 +2440,7 @@ static void testLatin1FromX11(RTTEST hTest, CLIPBACKEND *pCtx,
         else
         {
             RTUTF16 wcExp[MAX_BUF_SIZE / 2];
-            RTUTF16 *pwcExp = wcExp;
+            //RTUTF16 *pwcExp = wcExp; - unused
             size_t cwc;
             for (cwc = 0; cwc == 0 || pcszExp[cwc - 1] != '\0'; ++cwc)
                 wcExp[cwc] = pcszExp[cwc];
@@ -2449,10 +2466,9 @@ static void testLatin1FromX11(RTTEST hTest, CLIPBACKEND *pCtx,
                              pcszExp, rcExp);
 }
 
-static void testStringFromVBox(RTTEST hTest, CLIPBACKEND *pCtx,
-                               const char *pcszTarget, Atom typeExp,
-                               const char *valueExp)
+static void testStringFromVBox(RTTEST hTest, CLIPBACKEND *pCtx, const char *pcszTarget, Atom typeExp,  const char *valueExp)
 {
+    RT_NOREF1(pCtx);
     bool retval = false;
     Atom type;
     XtPointer value = NULL;
@@ -2484,17 +2500,16 @@ static void testStringFromVBox(RTTEST hTest, CLIPBACKEND *pCtx,
 
 static void testNoX11(CLIPBACKEND *pCtx, const char *pcszTestCtx)
 {
-    CLIPREADCBREQ *pReq = (CLIPREADCBREQ *)&pReq, *pReqRet = NULL;
+    CLIPREADCBREQ *pReq = (CLIPREADCBREQ *)&pReq;
     int rc = ClipRequestDataFromX11(pCtx,
                                     VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT,
                                     pReq);
     RTTESTI_CHECK_MSG(rc == VERR_NO_DATA, ("context: %s\n", pcszTestCtx));
 }
 
-static void testStringFromVBoxFailed(RTTEST hTest, CLIPBACKEND *pCtx,
-                                     const char *pcszTarget)
+static void testStringFromVBoxFailed(RTTEST hTest, CLIPBACKEND *pCtx, const char *pcszTarget)
 {
-    bool retval = false;
+    RT_NOREF1(pCtx);
     Atom type;
     XtPointer value = NULL;
     unsigned long length;
@@ -2507,9 +2522,9 @@ static void testStringFromVBoxFailed(RTTEST hTest, CLIPBACKEND *pCtx,
     XtFree((char *)value);
 }
 
-static void testNoSelectionOwnership(CLIPBACKEND *pCtx,
-                                     const char *pcszTestCtx)
+static void testNoSelectionOwnership(CLIPBACKEND *pCtx, const char *pcszTestCtx)
 {
+    RT_NOREF1(pCtx);
     RTTESTI_CHECK_MSG(!g_ownsSel, ("context: %s\n", pcszTestCtx));
 }
 
@@ -2760,24 +2775,24 @@ int main()
  * interactive mode in which the user can read and copy to the clipboard from
  * the command line. */
 
-#include <iprt/env.h>
-#include <iprt/test.h>
+# include <iprt/env.h>
+# include <iprt/test.h>
 
-int ClipRequestDataForX11(VBOXCLIPBOARDCONTEXT *pCtx,
-                                 uint32_t u32Format, void **ppv,
-                                 uint32_t *pcb)
+int ClipRequestDataForX11(VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb)
 {
+    RT_NOREF4(pCtx, u32Format, ppv, pcb);
     return VERR_NO_DATA;
 }
 
-void ClipReportX11Formats(VBOXCLIPBOARDCONTEXT *pCtx,
-                                      uint32_t u32Formats)
-{}
+void ClipReportX11Formats(VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Formats)
+{
+    RT_NOREF2(pCtx, u32Formats);
+}
 
-void ClipCompleteDataRequestFromX11(VBOXCLIPBOARDCONTEXT *pCtx, int rc,
-                                    CLIPREADCBREQ *pReq, void *pv,
-                                    uint32_t cb)
-{}
+void ClipCompleteDataRequestFromX11(VBOXCLIPBOARDCONTEXT *pCtx, int rc, CLIPREADCBREQ *pReq, void *pv, uint32_t cb)
+{
+    RT_NOREF5(pCtx, rc, pReq, pv, cb);
+}
 
 int main()
 {
@@ -2816,4 +2831,3 @@ int main()
 
 #endif /* SMOKETEST defined */
 
-                    
diff --git a/src/VBox/HostDrivers/Makefile.kmk b/src/VBox/HostDrivers/Makefile.kmk
index ed97a78..197ae6c 100644
--- a/src/VBox/HostDrivers/Makefile.kmk
+++ b/src/VBox/HostDrivers/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -38,9 +38,11 @@ if  !defined(VBOX_ONLY_DOCS) \
  if1of ($(KBUILD_TARGET), darwin solaris win linux freebsd)
   ifdef VBOX_WITH_NETADP
    include $(PATH_SUB_CURRENT)/VBoxNetAdp/Makefile.kmk
-  else
   endif
  endif
+ if1of ($(KBUILD_TARGET), darwin freebsd linux solaris)
+  include $(PATH_SUB_CURRENT)/adpctl/Makefile.kmk
+ endif
  if1of ($(KBUILD_TARGET), darwin freebsd linux)
   include $(PATH_SUB_CURRENT)/$(KBUILD_TARGET)/Makefile.kmk
  endif
diff --git a/src/VBox/HostDrivers/Support/Makefile.kmk b/src/VBox/HostDrivers/Support/Makefile.kmk
index b704b1f..5ffd78d 100644
--- a/src/VBox/HostDrivers/Support/Makefile.kmk
+++ b/src/VBox/HostDrivers/Support/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -115,7 +115,7 @@ $$(VBOX_SUP_WIN_CERTS_FILE): $(MAKEFILE_CURRENT) \
        	'' \
        	'#include <VBox/sup.h>' \
                ''
-	$(foreach cert,$(VBOX_SUP_WIN_CERTS), $(NLTAB)$(VBOX_BIN2C) -ascii --append \
+	$(foreach cert,$(VBOX_SUP_WIN_CERTS), $(NLTAB)$(VBOX_BIN2C) -ascii --append --static --no-size \
 		"SUP$(firstword $(subst =,$(SP) ,$(cert)))" \
 		"$(VBOX_PATH_SUPR3_CERTIFICATES)/$(lastword $(subst =,$(SP) ,$(cert)))" \
 		"$@")
diff --git a/src/VBox/HostDrivers/Support/SUPDrv-dtrace.cpp b/src/VBox/HostDrivers/Support/SUPDrv-dtrace.cpp
index 901fad9..7c9d70a 100644
--- a/src/VBox/HostDrivers/Support/SUPDrv-dtrace.cpp
+++ b/src/VBox/HostDrivers/Support/SUPDrv-dtrace.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -433,6 +433,7 @@ static void     vboxDtPOps_Provide(void *pvProv, const dtrace_probedesc_t *pDtPr
 static int      vboxDtPOps_Enable(void *pvProv, dtrace_id_t idProbe, void *pvProbe)
 {
     PSUPDRVVDTPROVIDERCORE  pProv   = (PSUPDRVVDTPROVIDERCORE)pvProv;
+    RT_NOREF(idProbe);
     LOG_DTRACE(("%s: %p / %p - %#x / %p\n", __FUNCTION__, pProv, pProv->TracerData.DTrace.idProvider, idProbe, pvProbe));
     AssertPtrReturn(pProv->TracerData.DTrace.idProvider, EINVAL);
 
@@ -482,6 +483,7 @@ static void     vboxDtPOps_Disable(void *pvProv, dtrace_id_t idProbe, void *pvPr
 {
     PSUPDRVVDTPROVIDERCORE  pProv  = (PSUPDRVVDTPROVIDERCORE)pvProv;
     AssertPtrReturnVoid(pProv);
+    RT_NOREF(idProbe);
     LOG_DTRACE(("%s: %p / %p - %#x / %p\n", __FUNCTION__, pProv, pProv->TracerData.DTrace.idProvider, idProbe, pvProbe));
     AssertPtrReturnVoid(pProv->TracerData.DTrace.idProvider);
 
@@ -530,6 +532,7 @@ static void     vboxDtPOps_GetArgDesc(void *pvProv, dtrace_id_t idProbe, void *p
 {
     PSUPDRVVDTPROVIDERCORE  pProv  = (PSUPDRVVDTPROVIDERCORE)pvProv;
     unsigned                uArg   = pArgDesc->dtargd_ndx;
+    RT_NOREF(idProbe);
 
     pArgDesc->dtargd_ndx = DTRACE_ARGNONE;
     AssertPtrReturnVoid(pProv);
@@ -600,6 +603,7 @@ static uint64_t vboxDtPOps_GetArgVal(void *pvProv, dtrace_id_t idProbe, void *pv
 {
     PSUPDRVVDTPROVIDERCORE  pProv = (PSUPDRVVDTPROVIDERCORE)pvProv;
     AssertPtrReturn(pProv, UINT64_MAX);
+    RT_NOREF(idProbe, cFrames);
     LOG_DTRACE(("%s: %p / %p - %#x / %p iArg=%d cFrames=%u\n", __FUNCTION__, pProv, pProv->TracerData.DTrace.idProvider, idProbe, pvProbe, iArg, cFrames));
     AssertReturn(iArg >= 5, UINT64_MAX);
     if (pProv->TracerData.DTrace.fZombie)
@@ -821,6 +825,7 @@ static DECLCALLBACK(void) vboxDtTOps_ProbeFireKernel(struct VTGPROBELOC *pVtgPro
 static DECLCALLBACK(void) vboxDtTOps_ProbeFireUser(PCSUPDRVTRACERREG pThis, PSUPDRVSESSION pSession, PCSUPDRVTRACERUSRCTX pCtx,
                                                    PCVTGOBJHDR pVtgHdr, PCVTGPROBELOC pProbeLocRO)
 {
+    RT_NOREF(pThis, pSession);
     LOG_DTRACE(("%s: %p / %p\n", __FUNCTION__, pCtx, pCtx->idProbe));
     AssertPtrReturnVoid(pProbeLocRO);
     AssertPtrReturnVoid(pVtgHdr);
@@ -937,6 +942,7 @@ static DECLCALLBACK(void) vboxDtTOps_TracerClose(PCSUPDRVTRACERREG pThis, PSUPDR
  */
 static DECLCALLBACK(int) vboxDtTOps_ProviderRegister(PCSUPDRVTRACERREG pThis, PSUPDRVVDTPROVIDERCORE pCore)
 {
+    RT_NOREF(pThis);
     LOG_DTRACE(("%s: %p %s/%s\n", __FUNCTION__, pThis, pCore->pszModName, pCore->pszName));
     AssertReturn(pCore->TracerData.DTrace.idProvider == 0, VERR_INTERNAL_ERROR_3);
 
@@ -981,6 +987,7 @@ static DECLCALLBACK(int) vboxDtTOps_ProviderRegister(PCSUPDRVTRACERREG pThis, PS
 static DECLCALLBACK(int) vboxDtTOps_ProviderDeregister(PCSUPDRVTRACERREG pThis, PSUPDRVVDTPROVIDERCORE pCore)
 {
     uintptr_t idProvider = pCore->TracerData.DTrace.idProvider;
+    RT_NOREF(pThis);
     LOG_DTRACE(("%s: %p / %p\n", __FUNCTION__, pThis, idProvider));
     AssertPtrReturn(idProvider, VERR_INTERNAL_ERROR_3);
 
@@ -1009,6 +1016,7 @@ static DECLCALLBACK(int) vboxDtTOps_ProviderDeregister(PCSUPDRVTRACERREG pThis,
 static DECLCALLBACK(int) vboxDtTOps_ProviderDeregisterZombie(PCSUPDRVTRACERREG pThis, PSUPDRVVDTPROVIDERCORE pCore)
 {
     uintptr_t idProvider = pCore->TracerData.DTrace.idProvider;
+    RT_NOREF(pThis);
     LOG_DTRACE(("%s: %p / %p\n", __FUNCTION__, pThis, idProvider));
     AssertPtrReturn(idProvider, VERR_INTERNAL_ERROR_3);
     Assert(pCore->TracerData.DTrace.fZombie);
diff --git a/src/VBox/HostDrivers/Support/SUPDrv.cpp b/src/VBox/HostDrivers/Support/SUPDrv.cpp
index b97d0b0..39c41c3 100644
--- a/src/VBox/HostDrivers/Support/SUPDrv.cpp
+++ b/src/VBox/HostDrivers/Support/SUPDrv.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -147,7 +147,7 @@ static void                 supdrvLdrFree(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE
 DECLINLINE(int)             supdrvLdrLock(PSUPDRVDEVEXT pDevExt);
 DECLINLINE(int)             supdrvLdrUnlock(PSUPDRVDEVEXT pDevExt);
 static int                  supdrvIOCtl_CallServiceModule(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPCALLSERVICE pReq);
-static int                  supdrvIOCtl_LoggerSettings(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPLOGGERSETTINGS pReq);
+static int                  supdrvIOCtl_LoggerSettings(PSUPLOGGERSETTINGS pReq);
 static int                  supdrvIOCtl_MsrProber(PSUPDRVDEVEXT pDevExt, PSUPMSRPROBER pReq);
 static int                  supdrvIOCtl_ResumeSuspendedKbds(void);
 
@@ -183,276 +183,276 @@ static SUPFUNC g_aFunctions[] =
     { "SUPR0AbsKernelGS",                       (void *)0 },
         /* Normal function pointers: */
     { "g_pSUPGlobalInfoPage",                   (void *)&g_pSUPGlobalInfoPage },            /* SED: DATA */
-    { "SUPGetGIP",                              (void *)SUPGetGIP },
-    { "SUPReadTscWithDelta",                    (void *)SUPReadTscWithDelta },
-    { "SUPGetTscDeltaSlow",                     (void *)SUPGetTscDeltaSlow },
-    { "SUPGetCpuHzFromGipForAsyncMode",         (void *)SUPGetCpuHzFromGipForAsyncMode },
-    { "SUPIsTscFreqCompatible",                 (void *)SUPIsTscFreqCompatible },
-    { "SUPIsTscFreqCompatibleEx",               (void *)SUPIsTscFreqCompatibleEx },
-    { "SUPR0BadContext",                        (void *)SUPR0BadContext },
-    { "SUPR0ComponentDeregisterFactory",        (void *)SUPR0ComponentDeregisterFactory },
-    { "SUPR0ComponentQueryFactory",             (void *)SUPR0ComponentQueryFactory },
-    { "SUPR0ComponentRegisterFactory",          (void *)SUPR0ComponentRegisterFactory },
-    { "SUPR0ContAlloc",                         (void *)SUPR0ContAlloc },
-    { "SUPR0ContFree",                          (void *)SUPR0ContFree },
-    { "SUPR0ChangeCR4",                         (void *)SUPR0ChangeCR4 },
-    { "SUPR0EnableVTx",                         (void *)SUPR0EnableVTx },
-    { "SUPR0SuspendVTxOnCpu",                   (void *)SUPR0SuspendVTxOnCpu },
-    { "SUPR0ResumeVTxOnCpu",                    (void *)SUPR0ResumeVTxOnCpu },
-    { "SUPR0GetKernelFeatures",                 (void *)SUPR0GetKernelFeatures },
-    { "SUPR0GetPagingMode",                     (void *)SUPR0GetPagingMode },
-    { "SUPR0GetSvmUsability",                   (void *)SUPR0GetSvmUsability },
-    { "SUPR0GetVmxUsability",                   (void *)SUPR0GetVmxUsability },
-    { "SUPR0LockMem",                           (void *)SUPR0LockMem },
-    { "SUPR0LowAlloc",                          (void *)SUPR0LowAlloc },
-    { "SUPR0LowFree",                           (void *)SUPR0LowFree },
-    { "SUPR0MemAlloc",                          (void *)SUPR0MemAlloc },
-    { "SUPR0MemFree",                           (void *)SUPR0MemFree },
-    { "SUPR0MemGetPhys",                        (void *)SUPR0MemGetPhys },
-    { "SUPR0ObjAddRef",                         (void *)SUPR0ObjAddRef },
-    { "SUPR0ObjAddRefEx",                       (void *)SUPR0ObjAddRefEx },
-    { "SUPR0ObjRegister",                       (void *)SUPR0ObjRegister },
-    { "SUPR0ObjRelease",                        (void *)SUPR0ObjRelease },
-    { "SUPR0ObjVerifyAccess",                   (void *)SUPR0ObjVerifyAccess },
-    { "SUPR0PageAllocEx",                       (void *)SUPR0PageAllocEx },
-    { "SUPR0PageFree",                          (void *)SUPR0PageFree },
-    { "SUPR0Printf",                            (void *)SUPR0Printf },
-    { "SUPR0TscDeltaMeasureBySetIndex",         (void *)SUPR0TscDeltaMeasureBySetIndex },
-    { "SUPR0TracerDeregisterDrv",               (void *)SUPR0TracerDeregisterDrv },
-    { "SUPR0TracerDeregisterImpl",              (void *)SUPR0TracerDeregisterImpl },
-    { "SUPR0TracerFireProbe",                   (void *)SUPR0TracerFireProbe },
-    { "SUPR0TracerRegisterDrv",                 (void *)SUPR0TracerRegisterDrv },
-    { "SUPR0TracerRegisterImpl",                (void *)SUPR0TracerRegisterImpl },
-    { "SUPR0TracerRegisterModule",              (void *)SUPR0TracerRegisterModule },
-    { "SUPR0TracerUmodProbeFire",               (void *)SUPR0TracerUmodProbeFire },
-    { "SUPR0UnlockMem",                         (void *)SUPR0UnlockMem },
-    { "SUPSemEventClose",                       (void *)SUPSemEventClose },
-    { "SUPSemEventCreate",                      (void *)SUPSemEventCreate },
-    { "SUPSemEventGetResolution",               (void *)SUPSemEventGetResolution },
-    { "SUPSemEventMultiClose",                  (void *)SUPSemEventMultiClose },
-    { "SUPSemEventMultiCreate",                 (void *)SUPSemEventMultiCreate },
-    { "SUPSemEventMultiGetResolution",          (void *)SUPSemEventMultiGetResolution },
-    { "SUPSemEventMultiReset",                  (void *)SUPSemEventMultiReset },
-    { "SUPSemEventMultiSignal",                 (void *)SUPSemEventMultiSignal },
-    { "SUPSemEventMultiWait",                   (void *)SUPSemEventMultiWait },
-    { "SUPSemEventMultiWaitNoResume",           (void *)SUPSemEventMultiWaitNoResume },
-    { "SUPSemEventMultiWaitNsAbsIntr",          (void *)SUPSemEventMultiWaitNsAbsIntr },
-    { "SUPSemEventMultiWaitNsRelIntr",          (void *)SUPSemEventMultiWaitNsRelIntr },
-    { "SUPSemEventSignal",                      (void *)SUPSemEventSignal },
-    { "SUPSemEventWait",                        (void *)SUPSemEventWait },
-    { "SUPSemEventWaitNoResume",                (void *)SUPSemEventWaitNoResume },
-    { "SUPSemEventWaitNsAbsIntr",               (void *)SUPSemEventWaitNsAbsIntr },
-    { "SUPSemEventWaitNsRelIntr",               (void *)SUPSemEventWaitNsRelIntr },
-
-    { "RTAssertAreQuiet",                       (void *)RTAssertAreQuiet },
-    { "RTAssertMayPanic",                       (void *)RTAssertMayPanic },
-    { "RTAssertMsg1",                           (void *)RTAssertMsg1 },
-    { "RTAssertMsg2AddV",                       (void *)RTAssertMsg2AddV },
-    { "RTAssertMsg2V",                          (void *)RTAssertMsg2V },
-    { "RTAssertSetMayPanic",                    (void *)RTAssertSetMayPanic },
-    { "RTAssertSetQuiet",                       (void *)RTAssertSetQuiet },
-    { "RTCrc32",                                (void *)RTCrc32 },
-    { "RTCrc32Finish",                          (void *)RTCrc32Finish },
-    { "RTCrc32Process",                         (void *)RTCrc32Process },
-    { "RTCrc32Start",                           (void *)RTCrc32Start },
-    { "RTErrConvertFromErrno",                  (void *)RTErrConvertFromErrno },
-    { "RTErrConvertToErrno",                    (void *)RTErrConvertToErrno },
-    { "RTHandleTableAllocWithCtx",              (void *)RTHandleTableAllocWithCtx },
-    { "RTHandleTableCreate",                    (void *)RTHandleTableCreate },
-    { "RTHandleTableCreateEx",                  (void *)RTHandleTableCreateEx },
-    { "RTHandleTableDestroy",                   (void *)RTHandleTableDestroy },
-    { "RTHandleTableFreeWithCtx",               (void *)RTHandleTableFreeWithCtx },
-    { "RTHandleTableLookupWithCtx",             (void *)RTHandleTableLookupWithCtx },
-    { "RTLogDefaultInstance",                   (void *)RTLogDefaultInstance },
-    { "RTLogDefaultInstanceEx",                 (void *)RTLogDefaultInstanceEx },
-    { "RTLogGetDefaultInstance",                (void *)RTLogGetDefaultInstance },
-    { "RTLogGetDefaultInstanceEx",              (void *)RTLogGetDefaultInstanceEx },
-    { "RTLogLoggerExV",                         (void *)RTLogLoggerExV },
-    { "RTLogPrintfV",                           (void *)RTLogPrintfV },
-    { "RTLogRelGetDefaultInstance",             (void *)RTLogRelGetDefaultInstance },
-    { "RTLogRelGetDefaultInstanceEx",           (void *)RTLogRelGetDefaultInstanceEx },
-    { "RTLogSetDefaultInstanceThread",          (void *)RTLogSetDefaultInstanceThread },
-    { "RTMemAllocExTag",                        (void *)RTMemAllocExTag },
-    { "RTMemAllocTag",                          (void *)RTMemAllocTag },
-    { "RTMemAllocVarTag",                       (void *)RTMemAllocVarTag },
-    { "RTMemAllocZTag",                         (void *)RTMemAllocZTag },
-    { "RTMemAllocZVarTag",                      (void *)RTMemAllocZVarTag },
-    { "RTMemDupExTag",                          (void *)RTMemDupExTag },
-    { "RTMemDupTag",                            (void *)RTMemDupTag },
-    { "RTMemFree",                              (void *)RTMemFree },
-    { "RTMemFreeEx",                            (void *)RTMemFreeEx },
-    { "RTMemReallocTag",                        (void *)RTMemReallocTag },
-    { "RTMpCpuId",                              (void *)RTMpCpuId },
-    { "RTMpCpuIdFromSetIndex",                  (void *)RTMpCpuIdFromSetIndex },
-    { "RTMpCpuIdToSetIndex",                    (void *)RTMpCpuIdToSetIndex },
-    { "RTMpCurSetIndex",                        (void *)RTMpCurSetIndex },
-    { "RTMpCurSetIndexAndId",                   (void *)RTMpCurSetIndexAndId },
-    { "RTMpGetArraySize",                       (void *)RTMpGetArraySize },
-    { "RTMpGetCount",                           (void *)RTMpGetCount },
-    { "RTMpGetMaxCpuId",                        (void *)RTMpGetMaxCpuId },
-    { "RTMpGetOnlineCount",                     (void *)RTMpGetOnlineCount },
-    { "RTMpGetOnlineSet",                       (void *)RTMpGetOnlineSet },
-    { "RTMpGetSet",                             (void *)RTMpGetSet },
-    { "RTMpIsCpuOnline",                        (void *)RTMpIsCpuOnline },
-    { "RTMpIsCpuPossible",                      (void *)RTMpIsCpuPossible },
-    { "RTMpIsCpuWorkPending",                   (void *)RTMpIsCpuWorkPending },
-    { "RTMpNotificationDeregister",             (void *)RTMpNotificationDeregister },
-    { "RTMpNotificationRegister",               (void *)RTMpNotificationRegister },
-    { "RTMpOnAll",                              (void *)RTMpOnAll },
-    { "RTMpOnOthers",                           (void *)RTMpOnOthers },
-    { "RTMpOnSpecific",                         (void *)RTMpOnSpecific },
-    { "RTMpPokeCpu",                            (void *)RTMpPokeCpu },
-    { "RTNetIPv4AddDataChecksum",               (void *)RTNetIPv4AddDataChecksum },
-    { "RTNetIPv4AddTCPChecksum",                (void *)RTNetIPv4AddTCPChecksum },
-    { "RTNetIPv4AddUDPChecksum",                (void *)RTNetIPv4AddUDPChecksum },
-    { "RTNetIPv4FinalizeChecksum",              (void *)RTNetIPv4FinalizeChecksum },
-    { "RTNetIPv4HdrChecksum",                   (void *)RTNetIPv4HdrChecksum },
-    { "RTNetIPv4IsDHCPValid",                   (void *)RTNetIPv4IsDHCPValid },
-    { "RTNetIPv4IsHdrValid",                    (void *)RTNetIPv4IsHdrValid },
-    { "RTNetIPv4IsTCPSizeValid",                (void *)RTNetIPv4IsTCPSizeValid },
-    { "RTNetIPv4IsTCPValid",                    (void *)RTNetIPv4IsTCPValid },
-    { "RTNetIPv4IsUDPSizeValid",                (void *)RTNetIPv4IsUDPSizeValid },
-    { "RTNetIPv4IsUDPValid",                    (void *)RTNetIPv4IsUDPValid },
-    { "RTNetIPv4PseudoChecksum",                (void *)RTNetIPv4PseudoChecksum },
-    { "RTNetIPv4PseudoChecksumBits",            (void *)RTNetIPv4PseudoChecksumBits },
-    { "RTNetIPv4TCPChecksum",                   (void *)RTNetIPv4TCPChecksum },
-    { "RTNetIPv4UDPChecksum",                   (void *)RTNetIPv4UDPChecksum },
-    { "RTNetIPv6PseudoChecksum",                (void *)RTNetIPv6PseudoChecksum },
-    { "RTNetIPv6PseudoChecksumBits",            (void *)RTNetIPv6PseudoChecksumBits },
-    { "RTNetIPv6PseudoChecksumEx",              (void *)RTNetIPv6PseudoChecksumEx },
-    { "RTNetTCPChecksum",                       (void *)RTNetTCPChecksum },
-    { "RTNetUDPChecksum",                       (void *)RTNetUDPChecksum },
-    { "RTPowerNotificationDeregister",          (void *)RTPowerNotificationDeregister },
-    { "RTPowerNotificationRegister",            (void *)RTPowerNotificationRegister },
-    { "RTProcSelf",                             (void *)RTProcSelf },
-    { "RTR0AssertPanicSystem",                  (void *)RTR0AssertPanicSystem },
+    { "SUPGetGIP",                              (void *)(uintptr_t)SUPGetGIP },
+    { "SUPReadTscWithDelta",                    (void *)(uintptr_t)SUPReadTscWithDelta },
+    { "SUPGetTscDeltaSlow",                     (void *)(uintptr_t)SUPGetTscDeltaSlow },
+    { "SUPGetCpuHzFromGipForAsyncMode",         (void *)(uintptr_t)SUPGetCpuHzFromGipForAsyncMode },
+    { "SUPIsTscFreqCompatible",                 (void *)(uintptr_t)SUPIsTscFreqCompatible },
+    { "SUPIsTscFreqCompatibleEx",               (void *)(uintptr_t)SUPIsTscFreqCompatibleEx },
+    { "SUPR0BadContext",                        (void *)(uintptr_t)SUPR0BadContext },
+    { "SUPR0ComponentDeregisterFactory",        (void *)(uintptr_t)SUPR0ComponentDeregisterFactory },
+    { "SUPR0ComponentQueryFactory",             (void *)(uintptr_t)SUPR0ComponentQueryFactory },
+    { "SUPR0ComponentRegisterFactory",          (void *)(uintptr_t)SUPR0ComponentRegisterFactory },
+    { "SUPR0ContAlloc",                         (void *)(uintptr_t)SUPR0ContAlloc },
+    { "SUPR0ContFree",                          (void *)(uintptr_t)SUPR0ContFree },
+    { "SUPR0ChangeCR4",                         (void *)(uintptr_t)SUPR0ChangeCR4 },
+    { "SUPR0EnableVTx",                         (void *)(uintptr_t)SUPR0EnableVTx },
+    { "SUPR0SuspendVTxOnCpu",                   (void *)(uintptr_t)SUPR0SuspendVTxOnCpu },
+    { "SUPR0ResumeVTxOnCpu",                    (void *)(uintptr_t)SUPR0ResumeVTxOnCpu },
+    { "SUPR0GetKernelFeatures",                 (void *)(uintptr_t)SUPR0GetKernelFeatures },
+    { "SUPR0GetPagingMode",                     (void *)(uintptr_t)SUPR0GetPagingMode },
+    { "SUPR0GetSvmUsability",                   (void *)(uintptr_t)SUPR0GetSvmUsability },
+    { "SUPR0GetVmxUsability",                   (void *)(uintptr_t)SUPR0GetVmxUsability },
+    { "SUPR0LockMem",                           (void *)(uintptr_t)SUPR0LockMem },
+    { "SUPR0LowAlloc",                          (void *)(uintptr_t)SUPR0LowAlloc },
+    { "SUPR0LowFree",                           (void *)(uintptr_t)SUPR0LowFree },
+    { "SUPR0MemAlloc",                          (void *)(uintptr_t)SUPR0MemAlloc },
+    { "SUPR0MemFree",                           (void *)(uintptr_t)SUPR0MemFree },
+    { "SUPR0MemGetPhys",                        (void *)(uintptr_t)SUPR0MemGetPhys },
+    { "SUPR0ObjAddRef",                         (void *)(uintptr_t)SUPR0ObjAddRef },
+    { "SUPR0ObjAddRefEx",                       (void *)(uintptr_t)SUPR0ObjAddRefEx },
+    { "SUPR0ObjRegister",                       (void *)(uintptr_t)SUPR0ObjRegister },
+    { "SUPR0ObjRelease",                        (void *)(uintptr_t)SUPR0ObjRelease },
+    { "SUPR0ObjVerifyAccess",                   (void *)(uintptr_t)SUPR0ObjVerifyAccess },
+    { "SUPR0PageAllocEx",                       (void *)(uintptr_t)SUPR0PageAllocEx },
+    { "SUPR0PageFree",                          (void *)(uintptr_t)SUPR0PageFree },
+    { "SUPR0Printf",                            (void *)(uintptr_t)SUPR0Printf },
+    { "SUPR0TscDeltaMeasureBySetIndex",         (void *)(uintptr_t)SUPR0TscDeltaMeasureBySetIndex },
+    { "SUPR0TracerDeregisterDrv",               (void *)(uintptr_t)SUPR0TracerDeregisterDrv },
+    { "SUPR0TracerDeregisterImpl",              (void *)(uintptr_t)SUPR0TracerDeregisterImpl },
+    { "SUPR0TracerFireProbe",                   (void *)(uintptr_t)SUPR0TracerFireProbe },
+    { "SUPR0TracerRegisterDrv",                 (void *)(uintptr_t)SUPR0TracerRegisterDrv },
+    { "SUPR0TracerRegisterImpl",                (void *)(uintptr_t)SUPR0TracerRegisterImpl },
+    { "SUPR0TracerRegisterModule",              (void *)(uintptr_t)SUPR0TracerRegisterModule },
+    { "SUPR0TracerUmodProbeFire",               (void *)(uintptr_t)SUPR0TracerUmodProbeFire },
+    { "SUPR0UnlockMem",                         (void *)(uintptr_t)SUPR0UnlockMem },
+    { "SUPSemEventClose",                       (void *)(uintptr_t)SUPSemEventClose },
+    { "SUPSemEventCreate",                      (void *)(uintptr_t)SUPSemEventCreate },
+    { "SUPSemEventGetResolution",               (void *)(uintptr_t)SUPSemEventGetResolution },
+    { "SUPSemEventMultiClose",                  (void *)(uintptr_t)SUPSemEventMultiClose },
+    { "SUPSemEventMultiCreate",                 (void *)(uintptr_t)SUPSemEventMultiCreate },
+    { "SUPSemEventMultiGetResolution",          (void *)(uintptr_t)SUPSemEventMultiGetResolution },
+    { "SUPSemEventMultiReset",                  (void *)(uintptr_t)SUPSemEventMultiReset },
+    { "SUPSemEventMultiSignal",                 (void *)(uintptr_t)SUPSemEventMultiSignal },
+    { "SUPSemEventMultiWait",                   (void *)(uintptr_t)SUPSemEventMultiWait },
+    { "SUPSemEventMultiWaitNoResume",           (void *)(uintptr_t)SUPSemEventMultiWaitNoResume },
+    { "SUPSemEventMultiWaitNsAbsIntr",          (void *)(uintptr_t)SUPSemEventMultiWaitNsAbsIntr },
+    { "SUPSemEventMultiWaitNsRelIntr",          (void *)(uintptr_t)SUPSemEventMultiWaitNsRelIntr },
+    { "SUPSemEventSignal",                      (void *)(uintptr_t)SUPSemEventSignal },
+    { "SUPSemEventWait",                        (void *)(uintptr_t)SUPSemEventWait },
+    { "SUPSemEventWaitNoResume",                (void *)(uintptr_t)SUPSemEventWaitNoResume },
+    { "SUPSemEventWaitNsAbsIntr",               (void *)(uintptr_t)SUPSemEventWaitNsAbsIntr },
+    { "SUPSemEventWaitNsRelIntr",               (void *)(uintptr_t)SUPSemEventWaitNsRelIntr },
+
+    { "RTAssertAreQuiet",                       (void *)(uintptr_t)RTAssertAreQuiet },
+    { "RTAssertMayPanic",                       (void *)(uintptr_t)RTAssertMayPanic },
+    { "RTAssertMsg1",                           (void *)(uintptr_t)RTAssertMsg1 },
+    { "RTAssertMsg2AddV",                       (void *)(uintptr_t)RTAssertMsg2AddV },
+    { "RTAssertMsg2V",                          (void *)(uintptr_t)RTAssertMsg2V },
+    { "RTAssertSetMayPanic",                    (void *)(uintptr_t)RTAssertSetMayPanic },
+    { "RTAssertSetQuiet",                       (void *)(uintptr_t)RTAssertSetQuiet },
+    { "RTCrc32",                                (void *)(uintptr_t)RTCrc32 },
+    { "RTCrc32Finish",                          (void *)(uintptr_t)RTCrc32Finish },
+    { "RTCrc32Process",                         (void *)(uintptr_t)RTCrc32Process },
+    { "RTCrc32Start",                           (void *)(uintptr_t)RTCrc32Start },
+    { "RTErrConvertFromErrno",                  (void *)(uintptr_t)RTErrConvertFromErrno },
+    { "RTErrConvertToErrno",                    (void *)(uintptr_t)RTErrConvertToErrno },
+    { "RTHandleTableAllocWithCtx",              (void *)(uintptr_t)RTHandleTableAllocWithCtx },
+    { "RTHandleTableCreate",                    (void *)(uintptr_t)RTHandleTableCreate },
+    { "RTHandleTableCreateEx",                  (void *)(uintptr_t)RTHandleTableCreateEx },
+    { "RTHandleTableDestroy",                   (void *)(uintptr_t)RTHandleTableDestroy },
+    { "RTHandleTableFreeWithCtx",               (void *)(uintptr_t)RTHandleTableFreeWithCtx },
+    { "RTHandleTableLookupWithCtx",             (void *)(uintptr_t)RTHandleTableLookupWithCtx },
+    { "RTLogDefaultInstance",                   (void *)(uintptr_t)RTLogDefaultInstance },
+    { "RTLogDefaultInstanceEx",                 (void *)(uintptr_t)RTLogDefaultInstanceEx },
+    { "RTLogGetDefaultInstance",                (void *)(uintptr_t)RTLogGetDefaultInstance },
+    { "RTLogGetDefaultInstanceEx",              (void *)(uintptr_t)RTLogGetDefaultInstanceEx },
+    { "RTLogLoggerExV",                         (void *)(uintptr_t)RTLogLoggerExV },
+    { "RTLogPrintfV",                           (void *)(uintptr_t)RTLogPrintfV },
+    { "RTLogRelGetDefaultInstance",             (void *)(uintptr_t)RTLogRelGetDefaultInstance },
+    { "RTLogRelGetDefaultInstanceEx",           (void *)(uintptr_t)RTLogRelGetDefaultInstanceEx },
+    { "RTLogSetDefaultInstanceThread",          (void *)(uintptr_t)RTLogSetDefaultInstanceThread },
+    { "RTMemAllocExTag",                        (void *)(uintptr_t)RTMemAllocExTag },
+    { "RTMemAllocTag",                          (void *)(uintptr_t)RTMemAllocTag },
+    { "RTMemAllocVarTag",                       (void *)(uintptr_t)RTMemAllocVarTag },
+    { "RTMemAllocZTag",                         (void *)(uintptr_t)RTMemAllocZTag },
+    { "RTMemAllocZVarTag",                      (void *)(uintptr_t)RTMemAllocZVarTag },
+    { "RTMemDupExTag",                          (void *)(uintptr_t)RTMemDupExTag },
+    { "RTMemDupTag",                            (void *)(uintptr_t)RTMemDupTag },
+    { "RTMemFree",                              (void *)(uintptr_t)RTMemFree },
+    { "RTMemFreeEx",                            (void *)(uintptr_t)RTMemFreeEx },
+    { "RTMemReallocTag",                        (void *)(uintptr_t)RTMemReallocTag },
+    { "RTMpCpuId",                              (void *)(uintptr_t)RTMpCpuId },
+    { "RTMpCpuIdFromSetIndex",                  (void *)(uintptr_t)RTMpCpuIdFromSetIndex },
+    { "RTMpCpuIdToSetIndex",                    (void *)(uintptr_t)RTMpCpuIdToSetIndex },
+    { "RTMpCurSetIndex",                        (void *)(uintptr_t)RTMpCurSetIndex },
+    { "RTMpCurSetIndexAndId",                   (void *)(uintptr_t)RTMpCurSetIndexAndId },
+    { "RTMpGetArraySize",                       (void *)(uintptr_t)RTMpGetArraySize },
+    { "RTMpGetCount",                           (void *)(uintptr_t)RTMpGetCount },
+    { "RTMpGetMaxCpuId",                        (void *)(uintptr_t)RTMpGetMaxCpuId },
+    { "RTMpGetOnlineCount",                     (void *)(uintptr_t)RTMpGetOnlineCount },
+    { "RTMpGetOnlineSet",                       (void *)(uintptr_t)RTMpGetOnlineSet },
+    { "RTMpGetSet",                             (void *)(uintptr_t)RTMpGetSet },
+    { "RTMpIsCpuOnline",                        (void *)(uintptr_t)RTMpIsCpuOnline },
+    { "RTMpIsCpuPossible",                      (void *)(uintptr_t)RTMpIsCpuPossible },
+    { "RTMpIsCpuWorkPending",                   (void *)(uintptr_t)RTMpIsCpuWorkPending },
+    { "RTMpNotificationDeregister",             (void *)(uintptr_t)RTMpNotificationDeregister },
+    { "RTMpNotificationRegister",               (void *)(uintptr_t)RTMpNotificationRegister },
+    { "RTMpOnAll",                              (void *)(uintptr_t)RTMpOnAll },
+    { "RTMpOnOthers",                           (void *)(uintptr_t)RTMpOnOthers },
+    { "RTMpOnSpecific",                         (void *)(uintptr_t)RTMpOnSpecific },
+    { "RTMpPokeCpu",                            (void *)(uintptr_t)RTMpPokeCpu },
+    { "RTNetIPv4AddDataChecksum",               (void *)(uintptr_t)RTNetIPv4AddDataChecksum },
+    { "RTNetIPv4AddTCPChecksum",                (void *)(uintptr_t)RTNetIPv4AddTCPChecksum },
+    { "RTNetIPv4AddUDPChecksum",                (void *)(uintptr_t)RTNetIPv4AddUDPChecksum },
+    { "RTNetIPv4FinalizeChecksum",              (void *)(uintptr_t)RTNetIPv4FinalizeChecksum },
+    { "RTNetIPv4HdrChecksum",                   (void *)(uintptr_t)RTNetIPv4HdrChecksum },
+    { "RTNetIPv4IsDHCPValid",                   (void *)(uintptr_t)RTNetIPv4IsDHCPValid },
+    { "RTNetIPv4IsHdrValid",                    (void *)(uintptr_t)RTNetIPv4IsHdrValid },
+    { "RTNetIPv4IsTCPSizeValid",                (void *)(uintptr_t)RTNetIPv4IsTCPSizeValid },
+    { "RTNetIPv4IsTCPValid",                    (void *)(uintptr_t)RTNetIPv4IsTCPValid },
+    { "RTNetIPv4IsUDPSizeValid",                (void *)(uintptr_t)RTNetIPv4IsUDPSizeValid },
+    { "RTNetIPv4IsUDPValid",                    (void *)(uintptr_t)RTNetIPv4IsUDPValid },
+    { "RTNetIPv4PseudoChecksum",                (void *)(uintptr_t)RTNetIPv4PseudoChecksum },
+    { "RTNetIPv4PseudoChecksumBits",            (void *)(uintptr_t)RTNetIPv4PseudoChecksumBits },
+    { "RTNetIPv4TCPChecksum",                   (void *)(uintptr_t)RTNetIPv4TCPChecksum },
+    { "RTNetIPv4UDPChecksum",                   (void *)(uintptr_t)RTNetIPv4UDPChecksum },
+    { "RTNetIPv6PseudoChecksum",                (void *)(uintptr_t)RTNetIPv6PseudoChecksum },
+    { "RTNetIPv6PseudoChecksumBits",            (void *)(uintptr_t)RTNetIPv6PseudoChecksumBits },
+    { "RTNetIPv6PseudoChecksumEx",              (void *)(uintptr_t)RTNetIPv6PseudoChecksumEx },
+    { "RTNetTCPChecksum",                       (void *)(uintptr_t)RTNetTCPChecksum },
+    { "RTNetUDPChecksum",                       (void *)(uintptr_t)RTNetUDPChecksum },
+    { "RTPowerNotificationDeregister",          (void *)(uintptr_t)RTPowerNotificationDeregister },
+    { "RTPowerNotificationRegister",            (void *)(uintptr_t)RTPowerNotificationRegister },
+    { "RTProcSelf",                             (void *)(uintptr_t)RTProcSelf },
+    { "RTR0AssertPanicSystem",                  (void *)(uintptr_t)RTR0AssertPanicSystem },
 #if defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS)
-    { "RTR0DbgKrnlInfoOpen",                    (void *)RTR0DbgKrnlInfoOpen },          /* only-darwin, only-solaris */
-    { "RTR0DbgKrnlInfoQueryMember",             (void *)RTR0DbgKrnlInfoQueryMember },   /* only-darwin, only-solaris */
+    { "RTR0DbgKrnlInfoOpen",                    (void *)(uintptr_t)RTR0DbgKrnlInfoOpen },          /* only-darwin, only-solaris */
+    { "RTR0DbgKrnlInfoQueryMember",             (void *)(uintptr_t)RTR0DbgKrnlInfoQueryMember },   /* only-darwin, only-solaris */
 # if defined(RT_OS_SOLARIS)
-    { "RTR0DbgKrnlInfoQuerySize",               (void *)RTR0DbgKrnlInfoQuerySize },     /* only-solaris */
+    { "RTR0DbgKrnlInfoQuerySize",               (void *)(uintptr_t)RTR0DbgKrnlInfoQuerySize },     /* only-solaris */
 # endif
-    { "RTR0DbgKrnlInfoQuerySymbol",             (void *)RTR0DbgKrnlInfoQuerySymbol },   /* only-darwin, only-solaris */
-    { "RTR0DbgKrnlInfoRelease",                 (void *)RTR0DbgKrnlInfoRelease },       /* only-darwin, only-solaris */
-    { "RTR0DbgKrnlInfoRetain",                  (void *)RTR0DbgKrnlInfoRetain },        /* only-darwin, only-solaris */
+    { "RTR0DbgKrnlInfoQuerySymbol",             (void *)(uintptr_t)RTR0DbgKrnlInfoQuerySymbol },   /* only-darwin, only-solaris */
+    { "RTR0DbgKrnlInfoRelease",                 (void *)(uintptr_t)RTR0DbgKrnlInfoRelease },       /* only-darwin, only-solaris */
+    { "RTR0DbgKrnlInfoRetain",                  (void *)(uintptr_t)RTR0DbgKrnlInfoRetain },        /* only-darwin, only-solaris */
 #endif
-    { "RTR0MemAreKrnlAndUsrDifferent",          (void *)RTR0MemAreKrnlAndUsrDifferent },
-    { "RTR0MemKernelIsValidAddr",               (void *)RTR0MemKernelIsValidAddr },
-    { "RTR0MemKernelCopyFrom",                  (void *)RTR0MemKernelCopyFrom },
-    { "RTR0MemKernelCopyTo",                    (void *)RTR0MemKernelCopyTo },
-    { "RTR0MemObjAddress",                      (void *)RTR0MemObjAddress },
-    { "RTR0MemObjAddressR3",                    (void *)RTR0MemObjAddressR3 },
-    { "RTR0MemObjAllocContTag",                 (void *)RTR0MemObjAllocContTag },
-    { "RTR0MemObjAllocLowTag",                  (void *)RTR0MemObjAllocLowTag },
-    { "RTR0MemObjAllocPageTag",                 (void *)RTR0MemObjAllocPageTag },
-    { "RTR0MemObjAllocPhysExTag",               (void *)RTR0MemObjAllocPhysExTag },
-    { "RTR0MemObjAllocPhysNCTag",               (void *)RTR0MemObjAllocPhysNCTag },
-    { "RTR0MemObjAllocPhysTag",                 (void *)RTR0MemObjAllocPhysTag },
-    { "RTR0MemObjEnterPhysTag",                 (void *)RTR0MemObjEnterPhysTag },
-    { "RTR0MemObjFree",                         (void *)RTR0MemObjFree },
-    { "RTR0MemObjGetPagePhysAddr",              (void *)RTR0MemObjGetPagePhysAddr },
-    { "RTR0MemObjIsMapping",                    (void *)RTR0MemObjIsMapping },
-    { "RTR0MemObjLockUserTag",                  (void *)RTR0MemObjLockUserTag },
-    { "RTR0MemObjMapKernelExTag",               (void *)RTR0MemObjMapKernelExTag },
-    { "RTR0MemObjMapKernelTag",                 (void *)RTR0MemObjMapKernelTag },
-    { "RTR0MemObjMapUserTag",                   (void *)RTR0MemObjMapUserTag },
-    { "RTR0MemObjProtect",                      (void *)RTR0MemObjProtect },
-    { "RTR0MemObjSize",                         (void *)RTR0MemObjSize },
-    { "RTR0MemUserCopyFrom",                    (void *)RTR0MemUserCopyFrom },
-    { "RTR0MemUserCopyTo",                      (void *)RTR0MemUserCopyTo },
-    { "RTR0MemUserIsValidAddr",                 (void *)RTR0MemUserIsValidAddr },
-    { "RTR0ProcHandleSelf",                     (void *)RTR0ProcHandleSelf },
-    { "RTSemEventCreate",                       (void *)RTSemEventCreate },
-    { "RTSemEventDestroy",                      (void *)RTSemEventDestroy },
-    { "RTSemEventGetResolution",                (void *)RTSemEventGetResolution },
-    { "RTSemEventMultiCreate",                  (void *)RTSemEventMultiCreate },
-    { "RTSemEventMultiDestroy",                 (void *)RTSemEventMultiDestroy },
-    { "RTSemEventMultiGetResolution",           (void *)RTSemEventMultiGetResolution },
-    { "RTSemEventMultiReset",                   (void *)RTSemEventMultiReset },
-    { "RTSemEventMultiSignal",                  (void *)RTSemEventMultiSignal },
-    { "RTSemEventMultiWait",                    (void *)RTSemEventMultiWait },
-    { "RTSemEventMultiWaitEx",                  (void *)RTSemEventMultiWaitEx },
-    { "RTSemEventMultiWaitExDebug",             (void *)RTSemEventMultiWaitExDebug },
-    { "RTSemEventMultiWaitNoResume",            (void *)RTSemEventMultiWaitNoResume },
-    { "RTSemEventSignal",                       (void *)RTSemEventSignal },
-    { "RTSemEventWait",                         (void *)RTSemEventWait },
-    { "RTSemEventWaitEx",                       (void *)RTSemEventWaitEx },
-    { "RTSemEventWaitExDebug",                  (void *)RTSemEventWaitExDebug },
-    { "RTSemEventWaitNoResume",                 (void *)RTSemEventWaitNoResume },
-    { "RTSemFastMutexCreate",                   (void *)RTSemFastMutexCreate },
-    { "RTSemFastMutexDestroy",                  (void *)RTSemFastMutexDestroy },
-    { "RTSemFastMutexRelease",                  (void *)RTSemFastMutexRelease },
-    { "RTSemFastMutexRequest",                  (void *)RTSemFastMutexRequest },
-    { "RTSemMutexCreate",                       (void *)RTSemMutexCreate },
-    { "RTSemMutexDestroy",                      (void *)RTSemMutexDestroy },
-    { "RTSemMutexRelease",                      (void *)RTSemMutexRelease },
-    { "RTSemMutexRequest",                      (void *)RTSemMutexRequest },
-    { "RTSemMutexRequestDebug",                 (void *)RTSemMutexRequestDebug },
-    { "RTSemMutexRequestNoResume",              (void *)RTSemMutexRequestNoResume },
-    { "RTSemMutexRequestNoResumeDebug",         (void *)RTSemMutexRequestNoResumeDebug },
-    { "RTSpinlockAcquire",                      (void *)RTSpinlockAcquire },
-    { "RTSpinlockCreate",                       (void *)RTSpinlockCreate },
-    { "RTSpinlockDestroy",                      (void *)RTSpinlockDestroy },
-    { "RTSpinlockRelease",                      (void *)RTSpinlockRelease },
-    { "RTStrCopy",                              (void *)RTStrCopy },
-    { "RTStrDupTag",                            (void *)RTStrDupTag },
-    { "RTStrFormat",                            (void *)RTStrFormat },
-    { "RTStrFormatNumber",                      (void *)RTStrFormatNumber },
-    { "RTStrFormatTypeDeregister",              (void *)RTStrFormatTypeDeregister },
-    { "RTStrFormatTypeRegister",                (void *)RTStrFormatTypeRegister },
-    { "RTStrFormatTypeSetUser",                 (void *)RTStrFormatTypeSetUser },
-    { "RTStrFormatV",                           (void *)RTStrFormatV },
-    { "RTStrFree",                              (void *)RTStrFree },
-    { "RTStrNCmp",                              (void *)RTStrNCmp },
-    { "RTStrPrintf",                            (void *)RTStrPrintf },
-    { "RTStrPrintfEx",                          (void *)RTStrPrintfEx },
-    { "RTStrPrintfExV",                         (void *)RTStrPrintfExV },
-    { "RTStrPrintfV",                           (void *)RTStrPrintfV },
-    { "RTThreadCreate",                         (void *)RTThreadCreate },
-    { "RTThreadCtxHookIsEnabled",               (void *)RTThreadCtxHookIsEnabled },
-    { "RTThreadCtxHookCreate",                  (void *)RTThreadCtxHookCreate },
-    { "RTThreadCtxHookDestroy",                 (void *)RTThreadCtxHookDestroy },
-    { "RTThreadCtxHookDisable",                 (void *)RTThreadCtxHookDisable },
-    { "RTThreadCtxHookEnable",                  (void *)RTThreadCtxHookEnable },
-    { "RTThreadGetName",                        (void *)RTThreadGetName },
-    { "RTThreadGetNative",                      (void *)RTThreadGetNative },
-    { "RTThreadGetType",                        (void *)RTThreadGetType },
-    { "RTThreadIsInInterrupt",                  (void *)RTThreadIsInInterrupt },
-    { "RTThreadNativeSelf",                     (void *)RTThreadNativeSelf },
-    { "RTThreadPreemptDisable",                 (void *)RTThreadPreemptDisable },
-    { "RTThreadPreemptIsEnabled",               (void *)RTThreadPreemptIsEnabled },
-    { "RTThreadPreemptIsPending",               (void *)RTThreadPreemptIsPending },
-    { "RTThreadPreemptIsPendingTrusty",         (void *)RTThreadPreemptIsPendingTrusty },
-    { "RTThreadPreemptIsPossible",              (void *)RTThreadPreemptIsPossible },
-    { "RTThreadPreemptRestore",                 (void *)RTThreadPreemptRestore },
-    { "RTThreadSelf",                           (void *)RTThreadSelf },
-    { "RTThreadSelfName",                       (void *)RTThreadSelfName },
-    { "RTThreadSleep",                          (void *)RTThreadSleep },
-    { "RTThreadUserReset",                      (void *)RTThreadUserReset },
-    { "RTThreadUserSignal",                     (void *)RTThreadUserSignal },
-    { "RTThreadUserWait",                       (void *)RTThreadUserWait },
-    { "RTThreadUserWaitNoResume",               (void *)RTThreadUserWaitNoResume },
-    { "RTThreadWait",                           (void *)RTThreadWait },
-    { "RTThreadWaitNoResume",                   (void *)RTThreadWaitNoResume },
-    { "RTThreadYield",                          (void *)RTThreadYield },
-    { "RTTimeMilliTS",                          (void *)RTTimeMilliTS },
-    { "RTTimeNanoTS",                           (void *)RTTimeNanoTS },
-    { "RTTimeNow",                              (void *)RTTimeNow },
-    { "RTTimerCanDoHighResolution",             (void *)RTTimerCanDoHighResolution },
-    { "RTTimerChangeInterval",                  (void *)RTTimerChangeInterval },
-    { "RTTimerCreate",                          (void *)RTTimerCreate },
-    { "RTTimerCreateEx",                        (void *)RTTimerCreateEx },
-    { "RTTimerDestroy",                         (void *)RTTimerDestroy },
-    { "RTTimerGetSystemGranularity",            (void *)RTTimerGetSystemGranularity },
-    { "RTTimerReleaseSystemGranularity",        (void *)RTTimerReleaseSystemGranularity },
-    { "RTTimerRequestSystemGranularity",        (void *)RTTimerRequestSystemGranularity },
-    { "RTTimerStart",                           (void *)RTTimerStart },
-    { "RTTimerStop",                            (void *)RTTimerStop },
-    { "RTTimeSystemMilliTS",                    (void *)RTTimeSystemMilliTS },
-    { "RTTimeSystemNanoTS",                     (void *)RTTimeSystemNanoTS },
-    { "RTUuidCompare",                          (void *)RTUuidCompare },
-    { "RTUuidCompareStr",                       (void *)RTUuidCompareStr },
-    { "RTUuidFromStr",                          (void *)RTUuidFromStr },
+    { "RTR0MemAreKrnlAndUsrDifferent",          (void *)(uintptr_t)RTR0MemAreKrnlAndUsrDifferent },
+    { "RTR0MemKernelIsValidAddr",               (void *)(uintptr_t)RTR0MemKernelIsValidAddr },
+    { "RTR0MemKernelCopyFrom",                  (void *)(uintptr_t)RTR0MemKernelCopyFrom },
+    { "RTR0MemKernelCopyTo",                    (void *)(uintptr_t)RTR0MemKernelCopyTo },
+    { "RTR0MemObjAddress",                      (void *)(uintptr_t)RTR0MemObjAddress },
+    { "RTR0MemObjAddressR3",                    (void *)(uintptr_t)RTR0MemObjAddressR3 },
+    { "RTR0MemObjAllocContTag",                 (void *)(uintptr_t)RTR0MemObjAllocContTag },
+    { "RTR0MemObjAllocLowTag",                  (void *)(uintptr_t)RTR0MemObjAllocLowTag },
+    { "RTR0MemObjAllocPageTag",                 (void *)(uintptr_t)RTR0MemObjAllocPageTag },
+    { "RTR0MemObjAllocPhysExTag",               (void *)(uintptr_t)RTR0MemObjAllocPhysExTag },
+    { "RTR0MemObjAllocPhysNCTag",               (void *)(uintptr_t)RTR0MemObjAllocPhysNCTag },
+    { "RTR0MemObjAllocPhysTag",                 (void *)(uintptr_t)RTR0MemObjAllocPhysTag },
+    { "RTR0MemObjEnterPhysTag",                 (void *)(uintptr_t)RTR0MemObjEnterPhysTag },
+    { "RTR0MemObjFree",                         (void *)(uintptr_t)RTR0MemObjFree },
+    { "RTR0MemObjGetPagePhysAddr",              (void *)(uintptr_t)RTR0MemObjGetPagePhysAddr },
+    { "RTR0MemObjIsMapping",                    (void *)(uintptr_t)RTR0MemObjIsMapping },
+    { "RTR0MemObjLockUserTag",                  (void *)(uintptr_t)RTR0MemObjLockUserTag },
+    { "RTR0MemObjMapKernelExTag",               (void *)(uintptr_t)RTR0MemObjMapKernelExTag },
+    { "RTR0MemObjMapKernelTag",                 (void *)(uintptr_t)RTR0MemObjMapKernelTag },
+    { "RTR0MemObjMapUserTag",                   (void *)(uintptr_t)RTR0MemObjMapUserTag },
+    { "RTR0MemObjProtect",                      (void *)(uintptr_t)RTR0MemObjProtect },
+    { "RTR0MemObjSize",                         (void *)(uintptr_t)RTR0MemObjSize },
+    { "RTR0MemUserCopyFrom",                    (void *)(uintptr_t)RTR0MemUserCopyFrom },
+    { "RTR0MemUserCopyTo",                      (void *)(uintptr_t)RTR0MemUserCopyTo },
+    { "RTR0MemUserIsValidAddr",                 (void *)(uintptr_t)RTR0MemUserIsValidAddr },
+    { "RTR0ProcHandleSelf",                     (void *)(uintptr_t)RTR0ProcHandleSelf },
+    { "RTSemEventCreate",                       (void *)(uintptr_t)RTSemEventCreate },
+    { "RTSemEventDestroy",                      (void *)(uintptr_t)RTSemEventDestroy },
+    { "RTSemEventGetResolution",                (void *)(uintptr_t)RTSemEventGetResolution },
+    { "RTSemEventMultiCreate",                  (void *)(uintptr_t)RTSemEventMultiCreate },
+    { "RTSemEventMultiDestroy",                 (void *)(uintptr_t)RTSemEventMultiDestroy },
+    { "RTSemEventMultiGetResolution",           (void *)(uintptr_t)RTSemEventMultiGetResolution },
+    { "RTSemEventMultiReset",                   (void *)(uintptr_t)RTSemEventMultiReset },
+    { "RTSemEventMultiSignal",                  (void *)(uintptr_t)RTSemEventMultiSignal },
+    { "RTSemEventMultiWait",                    (void *)(uintptr_t)RTSemEventMultiWait },
+    { "RTSemEventMultiWaitEx",                  (void *)(uintptr_t)RTSemEventMultiWaitEx },
+    { "RTSemEventMultiWaitExDebug",             (void *)(uintptr_t)RTSemEventMultiWaitExDebug },
+    { "RTSemEventMultiWaitNoResume",            (void *)(uintptr_t)RTSemEventMultiWaitNoResume },
+    { "RTSemEventSignal",                       (void *)(uintptr_t)RTSemEventSignal },
+    { "RTSemEventWait",                         (void *)(uintptr_t)RTSemEventWait },
+    { "RTSemEventWaitEx",                       (void *)(uintptr_t)RTSemEventWaitEx },
+    { "RTSemEventWaitExDebug",                  (void *)(uintptr_t)RTSemEventWaitExDebug },
+    { "RTSemEventWaitNoResume",                 (void *)(uintptr_t)RTSemEventWaitNoResume },
+    { "RTSemFastMutexCreate",                   (void *)(uintptr_t)RTSemFastMutexCreate },
+    { "RTSemFastMutexDestroy",                  (void *)(uintptr_t)RTSemFastMutexDestroy },
+    { "RTSemFastMutexRelease",                  (void *)(uintptr_t)RTSemFastMutexRelease },
+    { "RTSemFastMutexRequest",                  (void *)(uintptr_t)RTSemFastMutexRequest },
+    { "RTSemMutexCreate",                       (void *)(uintptr_t)RTSemMutexCreate },
+    { "RTSemMutexDestroy",                      (void *)(uintptr_t)RTSemMutexDestroy },
+    { "RTSemMutexRelease",                      (void *)(uintptr_t)RTSemMutexRelease },
+    { "RTSemMutexRequest",                      (void *)(uintptr_t)RTSemMutexRequest },
+    { "RTSemMutexRequestDebug",                 (void *)(uintptr_t)RTSemMutexRequestDebug },
+    { "RTSemMutexRequestNoResume",              (void *)(uintptr_t)RTSemMutexRequestNoResume },
+    { "RTSemMutexRequestNoResumeDebug",         (void *)(uintptr_t)RTSemMutexRequestNoResumeDebug },
+    { "RTSpinlockAcquire",                      (void *)(uintptr_t)RTSpinlockAcquire },
+    { "RTSpinlockCreate",                       (void *)(uintptr_t)RTSpinlockCreate },
+    { "RTSpinlockDestroy",                      (void *)(uintptr_t)RTSpinlockDestroy },
+    { "RTSpinlockRelease",                      (void *)(uintptr_t)RTSpinlockRelease },
+    { "RTStrCopy",                              (void *)(uintptr_t)RTStrCopy },
+    { "RTStrDupTag",                            (void *)(uintptr_t)RTStrDupTag },
+    { "RTStrFormat",                            (void *)(uintptr_t)RTStrFormat },
+    { "RTStrFormatNumber",                      (void *)(uintptr_t)RTStrFormatNumber },
+    { "RTStrFormatTypeDeregister",              (void *)(uintptr_t)RTStrFormatTypeDeregister },
+    { "RTStrFormatTypeRegister",                (void *)(uintptr_t)RTStrFormatTypeRegister },
+    { "RTStrFormatTypeSetUser",                 (void *)(uintptr_t)RTStrFormatTypeSetUser },
+    { "RTStrFormatV",                           (void *)(uintptr_t)RTStrFormatV },
+    { "RTStrFree",                              (void *)(uintptr_t)RTStrFree },
+    { "RTStrNCmp",                              (void *)(uintptr_t)RTStrNCmp },
+    { "RTStrPrintf",                            (void *)(uintptr_t)RTStrPrintf },
+    { "RTStrPrintfEx",                          (void *)(uintptr_t)RTStrPrintfEx },
+    { "RTStrPrintfExV",                         (void *)(uintptr_t)RTStrPrintfExV },
+    { "RTStrPrintfV",                           (void *)(uintptr_t)RTStrPrintfV },
+    { "RTThreadCreate",                         (void *)(uintptr_t)RTThreadCreate },
+    { "RTThreadCtxHookIsEnabled",               (void *)(uintptr_t)RTThreadCtxHookIsEnabled },
+    { "RTThreadCtxHookCreate",                  (void *)(uintptr_t)RTThreadCtxHookCreate },
+    { "RTThreadCtxHookDestroy",                 (void *)(uintptr_t)RTThreadCtxHookDestroy },
+    { "RTThreadCtxHookDisable",                 (void *)(uintptr_t)RTThreadCtxHookDisable },
+    { "RTThreadCtxHookEnable",                  (void *)(uintptr_t)RTThreadCtxHookEnable },
+    { "RTThreadGetName",                        (void *)(uintptr_t)RTThreadGetName },
+    { "RTThreadGetNative",                      (void *)(uintptr_t)RTThreadGetNative },
+    { "RTThreadGetType",                        (void *)(uintptr_t)RTThreadGetType },
+    { "RTThreadIsInInterrupt",                  (void *)(uintptr_t)RTThreadIsInInterrupt },
+    { "RTThreadNativeSelf",                     (void *)(uintptr_t)RTThreadNativeSelf },
+    { "RTThreadPreemptDisable",                 (void *)(uintptr_t)RTThreadPreemptDisable },
+    { "RTThreadPreemptIsEnabled",               (void *)(uintptr_t)RTThreadPreemptIsEnabled },
+    { "RTThreadPreemptIsPending",               (void *)(uintptr_t)RTThreadPreemptIsPending },
+    { "RTThreadPreemptIsPendingTrusty",         (void *)(uintptr_t)RTThreadPreemptIsPendingTrusty },
+    { "RTThreadPreemptIsPossible",              (void *)(uintptr_t)RTThreadPreemptIsPossible },
+    { "RTThreadPreemptRestore",                 (void *)(uintptr_t)RTThreadPreemptRestore },
+    { "RTThreadSelf",                           (void *)(uintptr_t)RTThreadSelf },
+    { "RTThreadSelfName",                       (void *)(uintptr_t)RTThreadSelfName },
+    { "RTThreadSleep",                          (void *)(uintptr_t)RTThreadSleep },
+    { "RTThreadUserReset",                      (void *)(uintptr_t)RTThreadUserReset },
+    { "RTThreadUserSignal",                     (void *)(uintptr_t)RTThreadUserSignal },
+    { "RTThreadUserWait",                       (void *)(uintptr_t)RTThreadUserWait },
+    { "RTThreadUserWaitNoResume",               (void *)(uintptr_t)RTThreadUserWaitNoResume },
+    { "RTThreadWait",                           (void *)(uintptr_t)RTThreadWait },
+    { "RTThreadWaitNoResume",                   (void *)(uintptr_t)RTThreadWaitNoResume },
+    { "RTThreadYield",                          (void *)(uintptr_t)RTThreadYield },
+    { "RTTimeMilliTS",                          (void *)(uintptr_t)RTTimeMilliTS },
+    { "RTTimeNanoTS",                           (void *)(uintptr_t)RTTimeNanoTS },
+    { "RTTimeNow",                              (void *)(uintptr_t)RTTimeNow },
+    { "RTTimerCanDoHighResolution",             (void *)(uintptr_t)RTTimerCanDoHighResolution },
+    { "RTTimerChangeInterval",                  (void *)(uintptr_t)RTTimerChangeInterval },
+    { "RTTimerCreate",                          (void *)(uintptr_t)RTTimerCreate },
+    { "RTTimerCreateEx",                        (void *)(uintptr_t)RTTimerCreateEx },
+    { "RTTimerDestroy",                         (void *)(uintptr_t)RTTimerDestroy },
+    { "RTTimerGetSystemGranularity",            (void *)(uintptr_t)RTTimerGetSystemGranularity },
+    { "RTTimerReleaseSystemGranularity",        (void *)(uintptr_t)RTTimerReleaseSystemGranularity },
+    { "RTTimerRequestSystemGranularity",        (void *)(uintptr_t)RTTimerRequestSystemGranularity },
+    { "RTTimerStart",                           (void *)(uintptr_t)RTTimerStart },
+    { "RTTimerStop",                            (void *)(uintptr_t)RTTimerStop },
+    { "RTTimeSystemMilliTS",                    (void *)(uintptr_t)RTTimeSystemMilliTS },
+    { "RTTimeSystemNanoTS",                     (void *)(uintptr_t)RTTimeSystemNanoTS },
+    { "RTUuidCompare",                          (void *)(uintptr_t)RTUuidCompare },
+    { "RTUuidCompareStr",                       (void *)(uintptr_t)RTUuidCompareStr },
+    { "RTUuidFromStr",                          (void *)(uintptr_t)RTUuidFromStr },
 /* SED: END */
 };
 
@@ -2026,7 +2026,7 @@ static int supdrvIOCtlInnerUnrestricted(uintptr_t uIOCtl, PSUPDRVDEVEXT pDevExt,
             REQ_CHECK_EXPR(SUP_IOCTL_LOGGER_SETTINGS, pReq->u.In.fWhat  <= SUPLOGGERSETTINGS_WHAT_DESTROY);
 
             /* execute */
-            pReq->Hdr.rc = supdrvIOCtl_LoggerSettings(pDevExt, pSession, pReq);
+            pReq->Hdr.rc = supdrvIOCtl_LoggerSettings(pReq);
             return 0;
         }
 
@@ -3835,6 +3835,7 @@ SUPR0DECL(int) SUPR0EnableVTx(bool fEnable)
 #ifdef RT_OS_DARWIN
     return supdrvOSEnableVTx(fEnable);
 #else
+    RT_NOREF1(fEnable);
     return VERR_NOT_SUPPORTED;
 #endif
 }
@@ -3869,6 +3870,7 @@ SUPR0DECL(void) SUPR0ResumeVTxOnCpu(bool fSuspended)
 #ifdef RT_OS_DARWIN
     supdrvOSResumeVTxOnCpu(fSuspended);
 #else
+    RT_NOREF1(fSuspended);
     Assert(!fSuspended);
 #endif
 }
@@ -4692,7 +4694,7 @@ static int supdrvLdrValidatePointer(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImag
             if (RT_FAILURE(rc))
             {
                 supdrvLdrUnlock(pDevExt);
-                Log(("Bad entry point address: %s=%p (rc=%Rrc)\n", pszWhat, pv, rc));
+                Log(("Bad entry point address: %s=%p (rc=%Rrc)\n", pszWhat, pv, rc)); NOREF(pszWhat);
                 return rc;
             }
         }
@@ -4864,8 +4866,8 @@ static int supdrvIOCtl_LdrLoad(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, P
     if (RT_SUCCESS(rc))
     {
         pImage->uState = SUP_IOCTL_LDR_LOAD;
-        pImage->pfnModuleInit = (PFNR0MODULEINIT)pReq->u.In.pfnModuleInit;
-        pImage->pfnModuleTerm = (PFNR0MODULETERM)pReq->u.In.pfnModuleTerm;
+        pImage->pfnModuleInit = (PFNR0MODULEINIT)(uintptr_t)pReq->u.In.pfnModuleInit;
+        pImage->pfnModuleTerm = (PFNR0MODULETERM)(uintptr_t)pReq->u.In.pfnModuleTerm;
 
         if (pImage->fNative)
             rc = supdrvOSLdrLoad(pDevExt, pImage, pReq->u.In.abImage, pReq);
@@ -4893,7 +4895,7 @@ static int supdrvIOCtl_LdrLoad(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, P
                                           pReq->u.In.EP.VMMR0.pvVMMR0EntryFast, pReq->u.In.EP.VMMR0.pvVMMR0EntryEx);
                 break;
             case SUPLDRLOADEP_SERVICE:
-                pImage->pfnServiceReqHandler = (PFNSUPR0SERVICEREQHANDLER)pReq->u.In.EP.Service.pfnServiceReq;
+                pImage->pfnServiceReqHandler = (PFNSUPR0SERVICEREQHANDLER)(uintptr_t)pReq->u.In.EP.Service.pfnServiceReq;
                 rc = VINF_SUCCESS;
                 break;
         }
@@ -5190,7 +5192,7 @@ static int supdrvIDC_LdrGetSymbol(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession
         for (i = 0; i < RT_ELEMENTS(g_aFunctions); i++)
             if (!strcmp(g_aFunctions[i].szName, pszSymbol))
             {
-                pReq->u.Out.pfnSymbol = (PFNRT)g_aFunctions[i].pfn;
+                pReq->u.Out.pfnSymbol = (PFNRT)(uintptr_t)g_aFunctions[i].pfn;
                 break;
             }
     }
@@ -5221,7 +5223,7 @@ static int supdrvIDC_LdrGetSymbol(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession
                     /*
                      * Found it! Calc the symbol address and add a reference to the module.
                      */
-                    pReq->u.Out.pfnSymbol = (PFNRT)((uint8_t *)pImage->pvImage + (int32_t)paSyms[i].offSymbol);
+                    pReq->u.Out.pfnSymbol = (PFNRT)((uintptr_t)pImage->pvImage + (int32_t)paSyms[i].offSymbol);
                     rc = supdrvLdrAddUsage(pSession, pImage);
                     break;
                 }
@@ -5268,8 +5270,8 @@ static int supdrvLdrSetVMMR0EPs(PSUPDRVDEVEXT pDevExt, void *pvVMMR0, void *pvVM
          * Return failure or success depending on whether the values match or not.
          */
         if (    pDevExt->pvVMMR0 != pvVMMR0
-            ||  (void *)pDevExt->pfnVMMR0EntryFast  != pvVMMR0EntryFast
-            ||  (void *)pDevExt->pfnVMMR0EntryEx    != pvVMMR0EntryEx)
+            ||  (uintptr_t)pDevExt->pfnVMMR0EntryFast  != (uintptr_t)pvVMMR0EntryFast
+            ||  (uintptr_t)pDevExt->pfnVMMR0EntryEx    != (uintptr_t)pvVMMR0EntryEx)
         {
             AssertMsgFailed(("SUP_IOCTL_LDR_SETR0EP: Already set pointing to a different module!\n"));
             rc = VERR_INVALID_PARAMETER;
@@ -5513,6 +5515,7 @@ static int supdrvIOCtl_CallServiceModule(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION p
               rc, pReq->u.In.uOperation, pReq->Hdr.cbOut, pReq->u.In.u64Arg, RTProcSelf(), RTThreadNativeSelf()));
     return rc;
 #else  /* RT_OS_WINDOWS && !RT_ARCH_AMD64 && !DEBUG */
+    RT_NOREF3(pDevExt, pSession, pReq);
     return VERR_NOT_IMPLEMENTED;
 #endif /* RT_OS_WINDOWS && !RT_ARCH_AMD64 && !DEBUG */
 }
@@ -5522,11 +5525,9 @@ static int supdrvIOCtl_CallServiceModule(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION p
  * Implements the logger settings request.
  *
  * @returns VBox status code.
- * @param   pDevExt     The device extension.
- * @param   pSession    The caller's session.
  * @param   pReq        The request.
  */
-static int supdrvIOCtl_LoggerSettings(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPLOGGERSETTINGS pReq)
+static int supdrvIOCtl_LoggerSettings(PSUPLOGGERSETTINGS pReq)
 {
     const char *pszGroup = &pReq->u.In.szStrings[pReq->u.In.offGroups];
     const char *pszFlags = &pReq->u.In.szStrings[pReq->u.In.offFlags];
@@ -5704,8 +5705,10 @@ static int supdrvIOCtl_MsrProber(PSUPDRVDEVEXT pDevExt, PSUPMSRPROBER pReq)
         default:
             return VERR_INVALID_FUNCTION;
     }
+    RT_NOREF1(pDevExt);
     return rc;
 #else
+    RT_NOREF2(pDevExt, pReq);
     return VERR_NOT_IMPLEMENTED;
 #endif
 }
diff --git a/src/VBox/HostDrivers/Support/SUPDrvGip.cpp b/src/VBox/HostDrivers/Support/SUPDrvGip.cpp
index e13dcaf..e826a35 100644
--- a/src/VBox/HostDrivers/Support/SUPDrvGip.cpp
+++ b/src/VBox/HostDrivers/Support/SUPDrvGip.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -187,11 +187,10 @@ static uint32_t supdrvGipFindCpuIndexForCpuId(PSUPGLOBALINFOPAGE pGip, RTCPUID i
  * (Re-)initializes the per-cpu structure prior to starting or resuming the GIP
  * updating.
  *
- * @param   pGip             Pointer to the GIP.
  * @param   pGipCpu          The per CPU structure for this CPU.
  * @param   u64NanoTS        The current time.
  */
-static void supdrvGipReInitCpu(PSUPGLOBALINFOPAGE pGip, PSUPGIPCPU pGipCpu, uint64_t u64NanoTS)
+static void supdrvGipReInitCpu(PSUPGIPCPU pGipCpu, uint64_t u64NanoTS)
 {
     /*
      * Here we don't really care about applying the TSC delta. The re-initialization of this
@@ -216,7 +215,7 @@ static DECLCALLBACK(void) supdrvGipReInitCpuCallback(RTCPUID idCpu, void *pvUser
     unsigned            iCpu = pGip->aiCpuFromApicId[ASMGetApicId()];
 
     if (RT_LIKELY(iCpu < pGip->cCpus && pGip->aCPUs[iCpu].idCpu == idCpu))
-        supdrvGipReInitCpu(pGip, &pGip->aCPUs[iCpu], *(uint64_t *)pvUser2);
+        supdrvGipReInitCpu(&pGip->aCPUs[iCpu], *(uint64_t *)pvUser2);
 
     NOREF(pvUser2);
     NOREF(idCpu);
@@ -259,6 +258,7 @@ static DECLCALLBACK(void) supdrvGipDetectGetGipCpuCallback(RTCPUID idCpu, void *
     uint32_t                fSupported = 0;
     uint16_t                idApic;
     int                     iCpuSet;
+    NOREF(pGip);
 
     AssertMsg(idCpu == RTMpCpuId(), ("idCpu=%#x RTMpCpuId()=%#x\n", idCpu, RTMpCpuId())); /* paranoia^3 */
 
@@ -504,7 +504,7 @@ SUPR0DECL(int) SUPR0GipMap(PSUPDRVSESSION pSession, PRTR3PTR ppGipR3, PRTHCPHYS
                 if (   pGipR0->u32Mode == SUPGIPMODE_INVARIANT_TSC
                     || pGipR0->u32Mode == SUPGIPMODE_SYNC_TSC
                     || RTMpGetOnlineCount() == 1)
-                    supdrvGipReInitCpu(pGipR0, &pGipR0->aCPUs[0], u64NanoTS);
+                    supdrvGipReInitCpu(&pGipR0->aCPUs[0], u64NanoTS);
                 else
                     RTMpOnAll(supdrvGipReInitCpuCallback, pGipR0, &u64NanoTS);
 
@@ -914,9 +914,8 @@ static DECLCALLBACK(void) supdrvGipPowerNotificationCallback(RTPOWEREVENT enmEve
  * (supdrvInitAsyncRefineTscTimer).
  *
  * @param   pDevExt         Pointer to the device instance data.
- * @param   pGip            Pointer to the GIP.
  */
-static void supdrvGipInitStartTimerForRefiningInvariantTscFreq(PSUPDRVDEVEXT pDevExt, PSUPGLOBALINFOPAGE pGip)
+static void supdrvGipInitStartTimerForRefiningInvariantTscFreq(PSUPDRVDEVEXT pDevExt)
 {
     uint64_t    u64NanoTS;
     RTCCUINTREG fEFlags;
@@ -1003,6 +1002,7 @@ DECLCALLBACK(void) supdrvGipInitReadTscAndNanoTsOnCpu(RTCPUID idCpu, void *pvUse
     RTCCUINTREG fEFlags   = ASMIntDisableFlags();
     uint64_t   *puTscStop = (uint64_t *)pvUser1;
     uint64_t   *pnsStop   = (uint64_t *)pvUser2;
+    RT_NOREF1(idCpu);
 
     *puTscStop = ASMReadTSC();
     *pnsStop   = RTTimeSystemNanoTS();
@@ -1019,7 +1019,6 @@ DECLCALLBACK(void) supdrvGipInitReadTscAndNanoTsOnCpu(RTCPUID idCpu, void *pvUse
  * maximum TSC frequency under 'normal' CPU operation.
  *
  * @returns VBox status code.
- * @param   pDevExt         Pointer to the device instance.
  * @param   pGip            Pointer to the GIP.
  * @param   fRough          Set if we're doing the rough calculation that the
  *                          TSC measuring code needs, where accuracy isn't all
@@ -1027,7 +1026,7 @@ DECLCALLBACK(void) supdrvGipInitReadTscAndNanoTsOnCpu(RTCPUID idCpu, void *pvUse
  *                          When clear we try for best accuracy that we can
  *                          achieve in reasonably short time.
  */
-static int supdrvGipInitMeasureTscFreq(PSUPDRVDEVEXT pDevExt, PSUPGLOBALINFOPAGE pGip, bool fRough)
+static int supdrvGipInitMeasureTscFreq(PSUPGLOBALINFOPAGE pGip, bool fRough)
 {
     uint32_t nsTimerIncr = RTTimerGetSystemGranularity();
     int      cTriesLeft = fRough ? 4 : 2;
@@ -1484,6 +1483,7 @@ static DECLCALLBACK(void) supdrvGipInitOnCpu(RTCPUID idCpu, void *pvUser1, void
     /* This is good enough, even though it will update some of the globals a
        bit to much. */
     supdrvGipMpEventOnlineOrInitOnCpu((PSUPDRVDEVEXT)pvUser1, idCpu);
+    NOREF(pvUser2);
 }
 
 
@@ -1498,6 +1498,7 @@ static DECLCALLBACK(void) supdrvGipInitDetermineAsyncTscWorker(RTCPUID idCpu, vo
 {
     Assert(RTMpCpuIdToSetIndex(idCpu) == (intptr_t)pvUser2);
     ASMAtomicWriteU64((uint64_t volatile *)pvUser1, ASMReadTSC());
+    RT_NOREF2(idCpu, pvUser2);
 }
 
 
@@ -1682,7 +1683,7 @@ static void supdrvGipInitCpu(PSUPGLOBALINFOPAGE pGip, PSUPGIPCPU pCpu, uint64_t
     pCpu->i64TSCDelta        = pGip->enmUseTscDelta > SUPGIPUSETSCDELTA_ZERO_CLAIMED ? INT64_MAX : 0;
 
     ASMAtomicWriteSize(&pCpu->enmState, SUPGIPCPUSTATE_INVALID);
-    ASMAtomicWriteSize(&pCpu->idCpu,    NIL_RTCPUID);
+    ASMAtomicWriteU32(&pCpu->idCpu,     NIL_RTCPUID);
     ASMAtomicWriteS16(&pCpu->iCpuSet,   -1);
     ASMAtomicWriteU16(&pCpu->idApic,    UINT16_MAX);
 
@@ -1817,7 +1818,10 @@ int VBOXCALL supdrvGipCreate(PSUPDRVDEVEXT pDevExt)
      */
     cCpus = RTMpGetArraySize();
     if (   cCpus > RTCPUSET_MAX_CPUS
-        || cCpus > 256 /* ApicId is used for the mappings */)
+#if RTCPUSET_MAX_CPUS != 256
+        || cCpus > 256 /* ApicId is used for the mappings */
+#endif
+        )
     {
         SUPR0Printf("VBoxDrv: Too many CPUs (%u) for the GIP (max %u)\n", cCpus, RT_MIN(RTCPUSET_MAX_CPUS, 256));
         return VERR_TOO_MANY_CPUS;
@@ -1878,11 +1882,11 @@ int VBOXCALL supdrvGipCreate(PSUPDRVDEVEXT pDevExt)
      */
     if (pGip->u32Mode == SUPGIPMODE_INVARIANT_TSC)
     {
-        rc = supdrvGipInitMeasureTscFreq(pDevExt, pGip, true /*fRough*/); /* cannot fail */
-        supdrvGipInitStartTimerForRefiningInvariantTscFreq(pDevExt, pGip);
+        rc = supdrvGipInitMeasureTscFreq(pGip, true /*fRough*/); /* cannot fail */
+        supdrvGipInitStartTimerForRefiningInvariantTscFreq(pDevExt);
     }
     else
-        rc = supdrvGipInitMeasureTscFreq(pDevExt, pGip, false /*fRough*/);
+        rc = supdrvGipInitMeasureTscFreq(pGip, false /*fRough*/);
     if (RT_SUCCESS(rc))
     {
         /*
@@ -2441,6 +2445,7 @@ static DECLCALLBACK(void) supdrvGipSyncAndInvariantTimer(PRTTIMER pTimer, void *
     RTCCUINTREG        fEFlags   = ASMIntDisableFlags(); /* No interruptions please (real problem on S10). */
     uint64_t           u64TSC    = ASMReadTSC();
     uint64_t           u64NanoTS = RTTimeSystemNanoTS();
+    RT_NOREF1(pTimer);
 
     if (pGip->enmUseTscDelta > SUPGIPUSETSCDELTA_PRACTICALLY_ZERO)
     {
@@ -2489,6 +2494,7 @@ static DECLCALLBACK(void) supdrvGipAsyncTimer(PRTTIMER pTimer, void *pvUser, uin
     RTCPUID         idCpu     = RTMpCpuId();
     uint64_t        u64TSC    = ASMReadTSC();
     uint64_t        NanoTS    = RTTimeSystemNanoTS();
+    RT_NOREF1(pTimer);
 
     /** @todo reset the transaction number and whatnot when iTick == 1. */
     if (pDevExt->idGipMaster == idCpu)
@@ -2939,6 +2945,7 @@ static bool supdrvTscDeltaSync2_After(PSUPTSCDELTASYNC2 pMySync, PSUPTSCDELTASYN
                                       bool fIsMaster, RTCCUINTREG fEFlags)
 {
     TSCDELTA_DBG_VARS();
+    RT_NOREF1(pOtherSync);
 
     /*
      * Wait for the 'ready' signal.  In the master's case, this means the
@@ -3164,7 +3171,7 @@ static void supdrvTscDeltaMethod1Loop(PSUPDRVGIPTSCDELTARGS pArgs, PSUPTSCDELTAS
 # define GIP_TSC_DELTA_M2_PRIMER_LOOPS      0
 
 
-static void supdrvTscDeltaMethod2ProcessDataOnMaster(PSUPDRVGIPTSCDELTARGS pArgs, uint32_t iLoop)
+static void supdrvTscDeltaMethod2ProcessDataOnMaster(PSUPDRVGIPTSCDELTARGS pArgs)
 {
     int64_t     iMasterTscDelta  = pArgs->pMaster->i64TSCDelta;
     int64_t     iBestDelta       = pArgs->pWorker->i64TSCDelta;
@@ -3263,6 +3270,7 @@ static void supdrvTscDeltaMethod2Loop(PSUPDRVGIPTSCDELTARGS pArgs, PSUPTSCDELTAS
                                       bool fIsMaster, uint32_t iTry)
 {
     unsigned iLoop;
+    RT_NOREF1(iTry);
 
     for (iLoop = 0; iLoop < GIP_TSC_DELTA_M2_LOOPS; iLoop++)
     {
@@ -3313,7 +3321,7 @@ static void supdrvTscDeltaMethod2Loop(PSUPDRVGIPTSCDELTARGS pArgs, PSUPTSCDELTAS
 # if GIP_TSC_DELTA_M2_PRIMER_LOOPS > 0
             if (iLoop >= GIP_TSC_DELTA_M2_PRIMER_LOOPS)
 # endif
-                supdrvTscDeltaMethod2ProcessDataOnMaster(pArgs, iLoop);
+                supdrvTscDeltaMethod2ProcessDataOnMaster(pArgs);
 
             TSCDELTA_MASTER_KICK_OTHER_OUT_OF_AFTER(pMySync, pOtherSync);
         }
@@ -3506,6 +3514,7 @@ supdrvMeasureTscDeltaCallbackAbortSyncSetup(PSUPDRVGIPTSCDELTARGS pArgs, PSUPTSC
     PSUPTSCDELTASYNC2 volatile *ppMySync    = fIsMaster ? &pArgs->pSyncMaster : &pArgs->pSyncWorker;
     PSUPTSCDELTASYNC2 volatile *ppOtherSync = fIsMaster ? &pArgs->pSyncWorker : &pArgs->pSyncMaster;
     TSCDELTA_DBG_VARS();
+    RT_NOREF1(pMySync);
 
     /*
      * Clear our sync pointer and make sure the abort flag is set.
@@ -3751,6 +3760,7 @@ static int supdrvMeasureTscDeltaCallbackUnwrapped(RTCPUID idCpu, PSUPDRVGIPTSCDE
 static DECLCALLBACK(void) supdrvMeasureTscDeltaCallback(RTCPUID idCpu, void *pvUser1, void *pvUser2)
 {
     supdrvMeasureTscDeltaCallbackUnwrapped(idCpu, (PSUPDRVGIPTSCDELTARGS)pvUser1);
+    RT_NOREF1(pvUser2);
 }
 
 
@@ -4233,8 +4243,7 @@ static DECLCALLBACK(int) supdrvTscDeltaThread(RTTHREAD hThread, void *pvUser)
                 return supdrvTscDeltaThreadButchered(pDevExt, true /* fSpinlockHeld */, "Invalid state", VERR_INVALID_STATE);
         }
     }
-
-    return rc;
+    /* not reached */
 }
 
 
@@ -4638,6 +4647,7 @@ int VBOXCALL supdrvIOCtl_TscDeltaMeasure(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION p
     uint32_t        iCpuSet;
     uint32_t        fFlags;
     RTMSINTERVAL    cMsWaitRetry;
+    RT_NOREF1(pDevExt);
 
     /*
      * Validate and adjust/resolve the input so they can be passed onto SUPR0TscDeltaMeasureBySetIndex.
diff --git a/src/VBox/HostDrivers/Support/SUPDrvIDC.h b/src/VBox/HostDrivers/Support/SUPDrvIDC.h
index 6e0ee73..8015f8d 100644
--- a/src/VBox/HostDrivers/Support/SUPDrvIDC.h
+++ b/src/VBox/HostDrivers/Support/SUPDrvIDC.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/SUPDrvIOC.h b/src/VBox/HostDrivers/Support/SUPDrvIOC.h
index de12241..a0b352e 100644
--- a/src/VBox/HostDrivers/Support/SUPDrvIOC.h
+++ b/src/VBox/HostDrivers/Support/SUPDrvIOC.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -49,7 +49,7 @@
 
 #ifdef RT_OS_WINDOWS
 # ifndef CTL_CODE
-#  include <Windows.h>
+#  include <iprt/win/windows.h>
 # endif
   /* Automatic buffering, size not encoded. */
 # define SUP_CTL_CODE_SIZE(Function, Size)      CTL_CODE(FILE_DEVICE_UNKNOWN, (Function) | SUP_IOCTL_FLAG, METHOD_BUFFERED, FILE_WRITE_ACCESS)
diff --git a/src/VBox/HostDrivers/Support/SUPDrvInternal.h b/src/VBox/HostDrivers/Support/SUPDrvInternal.h
index fefed7e..c6e6611 100644
--- a/src/VBox/HostDrivers/Support/SUPDrvInternal.h
+++ b/src/VBox/HostDrivers/Support/SUPDrvInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -47,32 +47,8 @@
 /* do nothing */
 
 #elif defined(RT_OS_WINDOWS)
-    RT_C_DECLS_BEGIN
-#   if (_MSC_VER >= 1400) && !defined(VBOX_WITH_PATCHED_DDK)
-#       define _InterlockedExchange           _InterlockedExchange_StupidDDKVsCompilerCrap
-#       define _InterlockedExchangeAdd        _InterlockedExchangeAdd_StupidDDKVsCompilerCrap
-#       define _InterlockedCompareExchange    _InterlockedCompareExchange_StupidDDKVsCompilerCrap
-#       define _InterlockedAddLargeStatistic  _InterlockedAddLargeStatistic_StupidDDKVsCompilerCrap
-#       define _interlockedbittestandset      _interlockedbittestandset_StupidDDKVsCompilerCrap
-#       define _interlockedbittestandreset    _interlockedbittestandreset_StupidDDKVsCompilerCrap
-#       define _interlockedbittestandset64    _interlockedbittestandset64_StupidDDKVsCompilerCrap
-#       define _interlockedbittestandreset64  _interlockedbittestandreset64_StupidDDKVsCompilerCrap
-#       pragma warning(disable : 4163)
-#       include <iprt/nt/nt.h>
-#       pragma warning(default : 4163)
-#       undef  _InterlockedExchange
-#       undef  _InterlockedExchangeAdd
-#       undef  _InterlockedCompareExchange
-#       undef  _InterlockedAddLargeStatistic
-#       undef  _interlockedbittestandset
-#       undef  _interlockedbittestandreset
-#       undef  _interlockedbittestandset64
-#       undef  _interlockedbittestandreset64
-#   else
-#       include <iprt/nt/nt.h>
-#   endif
+#   include <iprt/nt/nt.h>
 #   include <memory.h>
-    RT_C_DECLS_END
 
 #elif defined(RT_OS_LINUX)
 #   include <linux/version.h>
diff --git a/src/VBox/HostDrivers/Support/SUPDrvSem.cpp b/src/VBox/HostDrivers/Support/SUPDrvSem.cpp
index 80d3d9a..ff705c3 100644
--- a/src/VBox/HostDrivers/Support/SUPDrvSem.cpp
+++ b/src/VBox/HostDrivers/Support/SUPDrvSem.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -60,7 +60,7 @@
 static DECLCALLBACK(void) supR0SemEventDestructor(void *pvObj, void *pvUser1, void *pvUser2)
 {
     Assert(pvUser2 == NULL);
-    NOREF(pvObj);
+    RT_NOREF2(pvObj, pvUser2);
     RTSemEventDestroy((RTSEMEVENT)pvUser1);
 }
 
@@ -217,6 +217,7 @@ SUPDECL(int) SUPSemEventWaitNsRelIntr(PSUPDRVSESSION pSession, SUPSEMEVENT hEven
 
 SUPDECL(uint32_t) SUPSemEventGetResolution(PSUPDRVSESSION pSession)
 {
+    RT_NOREF1(pSession);
     Assert(SUP_IS_SESSION_VALID(pSession));
     return RTSemEventGetResolution();
 }
@@ -232,7 +233,7 @@ SUPDECL(uint32_t) SUPSemEventGetResolution(PSUPDRVSESSION pSession)
 static DECLCALLBACK(void) supR0SemEventMultiDestructor(void *pvObj, void *pvUser1, void *pvUser2)
 {
     Assert(pvUser2 == NULL);
-    NOREF(pvObj);
+    RT_NOREF2(pvObj, pvUser2);
     RTSemEventMultiDestroy((RTSEMEVENTMULTI)pvUser1);
 }
 
@@ -416,6 +417,7 @@ SUPDECL(int) SUPSemEventMultiWaitNsRelIntr(PSUPDRVSESSION pSession, SUPSEMEVENTM
 
 SUPDECL(uint32_t) SUPSemEventMultiGetResolution(PSUPDRVSESSION pSession)
 {
+    RT_NOREF1(pSession);
     Assert(SUP_IS_SESSION_VALID(pSession));
     return RTSemEventMultiGetResolution();
 }
diff --git a/src/VBox/HostDrivers/Support/SUPDrvTracer.cpp b/src/VBox/HostDrivers/Support/SUPDrvTracer.cpp
index 31cc148..3a86579 100644
--- a/src/VBox/HostDrivers/Support/SUPDrvTracer.cpp
+++ b/src/VBox/HostDrivers/Support/SUPDrvTracer.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1722,9 +1722,9 @@ static int supdrvVtgCreateObjectCopy(PSUPDRVDEVEXT pDevExt, PCVTGOBJHDR pVtgHdr,
      * Calculate the space required, allocate and copy in the data.
      */
     int             rc;
-    size_t const    cProbeLocs   = pVtgHdr->cbProbeLocs / (pVtgHdr->cBits == 32 ? sizeof(VTGPROBELOC32) : sizeof(VTGPROBELOC64));
-    size_t const    cbProbeLocs  = cProbeLocs * sizeof(VTGPROBELOC);
-    size_t const    offProbeLocs = RT_ALIGN(pVtgHdr->cbObj, 8);
+    uint32_t const  cProbeLocs   = pVtgHdr->cbProbeLocs / (pVtgHdr->cBits == 32 ? sizeof(VTGPROBELOC32) : sizeof(VTGPROBELOC64));
+    uint32_t const  cbProbeLocs  = cProbeLocs * sizeof(VTGPROBELOC);
+    uint32_t const  offProbeLocs = RT_ALIGN(pVtgHdr->cbObj, 8);
     size_t const    cb           = offProbeLocs + cbProbeLocs + cbStrTab + 1;
     PSUPDRVVTGCOPY  pThis = (PSUPDRVVTGCOPY)RTMemAlloc(RT_OFFSETOF(SUPDRVVTGCOPY, Hdr) + cb);
     if (!pThis)
diff --git a/src/VBox/HostDrivers/Support/SUPDrvTracerA.asm b/src/VBox/HostDrivers/Support/SUPDrvTracerA.asm
index 89606b9..ed0b029 100644
--- a/src/VBox/HostDrivers/Support/SUPDrvTracerA.asm
+++ b/src/VBox/HostDrivers/Support/SUPDrvTracerA.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2012-2015 Oracle Corporation
+; Copyright (C) 2012-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/SUPLib.cpp b/src/VBox/HostDrivers/Support/SUPLib.cpp
index 1aa717e..1ad88ad 100644
--- a/src/VBox/HostDrivers/Support/SUPLib.cpp
+++ b/src/VBox/HostDrivers/Support/SUPLib.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -130,20 +130,16 @@ PSUPDRVSESSION                  g_pSession;
 /** R0 SUP Functions used for resolving referenced to the SUPR0 module. */
 PSUPQUERYFUNCS                  g_pSupFunctions;
 
-/** VMMR0 Load Address. */
-static RTR0PTR                  g_pvVMMR0 = NIL_RTR0PTR;
 /** PAGE_ALLOC_EX sans kernel mapping support indicator. */
 static bool                     g_fSupportsPageAllocNoKernel = true;
 /** Fake mode indicator. (~0 at first, 0 or 1 after first test) */
-uint32_t                        g_uSupFakeMode = ~0;
+uint32_t                        g_uSupFakeMode = UINT32_MAX;
 
 
 /*********************************************************************************************************************************
 *   Internal Functions                                                                                                           *
 *********************************************************************************************************************************/
 static int supInitFake(PSUPDRVSESSION *ppSession);
-static int supLoadModule(const char *pszFilename, const char *pszModule, const char *pszSrvReqHandler, void **ppvImageBase);
-static DECLCALLBACK(int) supLoadModuleResolveImport(RTLDRMOD hLdrMod, const char *pszModule, const char *pszSymbol, unsigned uSymbol, RTUINTPTR *pValue, void *pvUser);
 
 
 /** Touch a range of pages. */
@@ -548,7 +544,7 @@ SUPR3DECL(int) SUPR3Term(bool fForced)
         {
             ASMAtomicWriteNullPtr((void * volatile *)&g_pSUPGlobalInfoPage);
             ASMAtomicWriteNullPtr((void * volatile *)&g_pSUPGlobalInfoPageR0);
-            ASMAtomicWriteSize(&g_HCPhysSUPGlobalInfoPage, NIL_RTHCPHYS);
+            ASMAtomicWriteU64(&g_HCPhysSUPGlobalInfoPage, NIL_RTHCPHYS);
             /* just a little safe guard against threads using the page. */
             RTThreadSleep(50);
         }
@@ -1521,6 +1517,7 @@ SUPR3DECL(int) SUPR3HardenedVerifyFile(const char *pszFilename, const char *pszM
     AssertPtr(pszMsg);
     AssertReturn(!phFile, VERR_NOT_IMPLEMENTED); /** @todo Implement this. The deal is that we make sure the
                                                      file is the same we verified after opening it. */
+    RT_NOREF2(pszFilename, pszMsg);
 
     /*
      * Only do the actual check in hardened builds.
@@ -1636,6 +1633,7 @@ SUPR3DECL(int) SUPR3HardenedVerifyPlugIn(const char *pszFilename, PRTERRINFO pEr
         LogRel(("supR3HardenedVerifyFile: Verification of \"%s\" failed, rc=%Rrc\n", pszFilename, rc));
     return rc;
 #else
+    RT_NOREF1(pszFilename);
     return VINF_SUCCESS;
 #endif
 }
@@ -1985,7 +1983,7 @@ SUPR3DECL(int) SUPR3TracerRegisterModule(uintptr_t hModNative, const char *pszMo
      * Create a string table for the function names in the location array.
      * It's somewhat easier to do that here than from ring-0.
      */
-    size_t const        cProbeLocs  = pVtgHdr->cbProbeLocs
+    uint32_t const      cProbeLocs  = pVtgHdr->cbProbeLocs
                                     / (pVtgHdr->cBits == 32 ? sizeof(VTGPROBELOC32) : sizeof(VTGPROBELOC64));
     PVTGPROBELOC        paProbeLocs = (PVTGPROBELOC)((uintptr_t)pVtgHdr + pVtgHdr->offProbeLocs);
     PSUPDRVTRACERSTRTAB pStrTab     = supr3TracerCreateStrTab((PVTGPROBELOC32)paProbeLocs,
@@ -2086,6 +2084,8 @@ SUPR3DECL(int) SUPR3TracerDeregisterModule(struct VTGOBJHDR *pVtgHdr)
 
 DECLASM(void) suplibTracerFireProbe(PVTGPROBELOC pProbeLoc, PSUPTRACERUMODFIREPROBE pReq)
 {
+    RT_NOREF1(pProbeLoc);
+
     pReq->Hdr.u32Cookie         = g_u32Cookie;
     pReq->Hdr.u32SessionCookie  = g_u32SessionCookie;
     Assert(pReq->Hdr.cbIn  == SUP_IOCTL_TRACER_UMOD_FIRE_PROBE_SIZE_IN);
diff --git a/src/VBox/HostDrivers/Support/SUPLibAll.cpp b/src/VBox/HostDrivers/Support/SUPLibAll.cpp
index 8b986f4..5db323a 100644
--- a/src/VBox/HostDrivers/Support/SUPLibAll.cpp
+++ b/src/VBox/HostDrivers/Support/SUPLibAll.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/SUPLibInternal.h b/src/VBox/HostDrivers/Support/SUPLibInternal.h
index 7df0ad9..916c900 100644
--- a/src/VBox/HostDrivers/Support/SUPLibInternal.h
+++ b/src/VBox/HostDrivers/Support/SUPLibInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -392,22 +392,24 @@ DECLHIDDEN(char *) supR3HardenedPathFilename(const char *pszPath);
 /**
  * Display a fatal error and try call TrustedError or quit.
  */
-DECLHIDDEN(void)   supR3HardenedFatalMsgV(const char *pszWhere, SUPINITOP enmWhat, int rc, const char *pszMsgFmt, va_list va);
+DECL_NO_RETURN(DECLHIDDEN(void)) supR3HardenedFatalMsgV(const char *pszWhere, SUPINITOP enmWhat, int rc,
+                                                        const char *pszMsgFmt, va_list va);
 
 /**
  * Display a fatal error and try call TrustedError or quit.
  */
-DECLHIDDEN(void)   supR3HardenedFatalMsg(const char *pszWhere, SUPINITOP enmWhat, int rc, const char *pszMsgFmt, ...);
+DECL_NO_RETURN(DECLHIDDEN(void)) supR3HardenedFatalMsg(const char *pszWhere, SUPINITOP enmWhat, int rc,
+                                                       const char *pszMsgFmt, ...);
 
 /**
  * Display a fatal error and quit.
  */
-DECLHIDDEN(void)   supR3HardenedFatalV(const char *pszFormat, va_list va);
+DECL_NO_RETURN(DECLHIDDEN(void)) supR3HardenedFatalV(const char *pszFormat, va_list va);
 
 /**
  * Display a fatal error and quit.
  */
-DECLHIDDEN(void)   supR3HardenedFatal(const char *pszFormat, ...);
+DECL_NO_RETURN(DECLHIDDEN(void)) supR3HardenedFatal(const char *pszFormat, ...);
 
 /**
  * Display an error which may or may not be fatal.
diff --git a/src/VBox/HostDrivers/Support/SUPLibLdr.cpp b/src/VBox/HostDrivers/Support/SUPLibLdr.cpp
index 440727c..6a57c22 100644
--- a/src/VBox/HostDrivers/Support/SUPLibLdr.cpp
+++ b/src/VBox/HostDrivers/Support/SUPLibLdr.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/SUPLibSem.cpp b/src/VBox/HostDrivers/Support/SUPLibSem.cpp
index 3b22d46..8cb1a39 100644
--- a/src/VBox/HostDrivers/Support/SUPLibSem.cpp
+++ b/src/VBox/HostDrivers/Support/SUPLibSem.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/SUPLibTracerA.asm b/src/VBox/HostDrivers/Support/SUPLibTracerA.asm
index 58b1e04..2ebb3cd 100644
--- a/src/VBox/HostDrivers/Support/SUPLibTracerA.asm
+++ b/src/VBox/HostDrivers/Support/SUPLibTracerA.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2012-2015 Oracle Corporation
+; Copyright (C) 2012-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/SUPR0IdcClient.c b/src/VBox/HostDrivers/Support/SUPR0IdcClient.c
index d80dcf2..644ded9 100644
--- a/src/VBox/HostDrivers/Support/SUPR0IdcClient.c
+++ b/src/VBox/HostDrivers/Support/SUPR0IdcClient.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/SUPR0IdcClientComponent.c b/src/VBox/HostDrivers/Support/SUPR0IdcClientComponent.c
index 9fec82a..7790b5c 100644
--- a/src/VBox/HostDrivers/Support/SUPR0IdcClientComponent.c
+++ b/src/VBox/HostDrivers/Support/SUPR0IdcClientComponent.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/SUPR0IdcClientInternal.h b/src/VBox/HostDrivers/Support/SUPR0IdcClientInternal.h
index f48c817..73a66eb 100644
--- a/src/VBox/HostDrivers/Support/SUPR0IdcClientInternal.h
+++ b/src/VBox/HostDrivers/Support/SUPR0IdcClientInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -31,27 +31,8 @@
 #include <iprt/assert.h>
 
 #ifdef RT_OS_WINDOWS
-# if (_MSC_VER >= 1400) && !defined(VBOX_WITH_PATCHED_DDK)
-#  include <iprt/asm.h>
-#  define _InterlockedExchange           _InterlockedExchange_StupidDDKVsCompilerCrap
-#  define _InterlockedExchangeAdd        _InterlockedExchangeAdd_StupidDDKVsCompilerCrap
-#  define _InterlockedCompareExchange    _InterlockedCompareExchange_StupidDDKVsCompilerCrap
-#  define _InterlockedAddLargeStatistic  _InterlockedAddLargeStatistic_StupidDDKVsCompilerCrap
-#  pragma warning(disable : 4163)
-RT_C_DECLS_BEGIN
-#  include <ntddk.h>
-RT_C_DECLS_END
-#  pragma warning(default : 4163)
-#  undef  _InterlockedExchange
-#  undef  _InterlockedExchangeAdd
-#  undef  _InterlockedCompareExchange
-#  undef  _InterlockedAddLargeStatistic
-# else
-RT_C_DECLS_BEGIN
-#  include <ntddk.h>
-RT_C_DECLS_END
-# endif
-#endif /* RT_OS_WINDOWS */
+# include <iprt/nt/ntddk.h>
+#endif
 
 
 /**
diff --git a/src/VBox/HostDrivers/Support/SUPR0IdcClientStubs.c b/src/VBox/HostDrivers/Support/SUPR0IdcClientStubs.c
index 097dfc1..ded4528 100644
--- a/src/VBox/HostDrivers/Support/SUPR0IdcClientStubs.c
+++ b/src/VBox/HostDrivers/Support/SUPR0IdcClientStubs.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -57,7 +57,7 @@ static void supR0IdcGetSymbol(PSUPDRVIDCHANDLE pHandle, PFNRT *ppfn, const char
     Req.u.In.pszModule = NULL;
     rc = supR0IdcNativeCall(pHandle, SUPDRV_IDC_REQ_GET_SYMBOL, &Req.Hdr);
     if (RT_SUCCESS(rc))
-        ASMAtomicWritePtr((void * volatile *)ppfn, Req.u.Out.pfnSymbol);
+        ASMAtomicWritePtr((void * volatile *)ppfn, (void *)(uintptr_t)Req.u.Out.pfnSymbol);
 }
 
 
diff --git a/src/VBox/HostDrivers/Support/SUPR3HardenedIPRT.cpp b/src/VBox/HostDrivers/Support/SUPR3HardenedIPRT.cpp
index a126c64..1598788 100644
--- a/src/VBox/HostDrivers/Support/SUPR3HardenedIPRT.cpp
+++ b/src/VBox/HostDrivers/Support/SUPR3HardenedIPRT.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -95,40 +95,42 @@ DECLHIDDEN(int) supR3HardenedPathAppBin(char *pszPath, size_t cchPath)
 }
 
 
-DECLHIDDEN(void)   supR3HardenedFatalMsgV(const char *pszWhere, SUPINITOP enmWhat, int rc, const char *pszMsgFmt, va_list va)
+DECL_NO_RETURN(DECLHIDDEN(void)) supR3HardenedFatalMsgV(const char *pszWhere, SUPINITOP enmWhat, int rc,
+                                                        const char *pszMsgFmt, va_list va)
 {
     va_list vaCopy;
     va_copy(vaCopy, va);
     AssertFatalMsgFailed(("%s (rc=%Rrc): %N", pszWhere, rc, pszMsgFmt, &vaCopy));
-    va_end(vaCopy);
     NOREF(enmWhat);
+    /* not reached */
 }
 
 
-DECLHIDDEN(void)   supR3HardenedFatalMsg(const char *pszWhere, SUPINITOP enmWhat, int rc, const char *pszMsgFmt, ...)
+DECL_NO_RETURN(DECLHIDDEN(void)) supR3HardenedFatalMsg(const char *pszWhere, SUPINITOP enmWhat, int rc,
+                                                       const char *pszMsgFmt, ...)
 {
     va_list va;
     va_start(va, pszMsgFmt);
     supR3HardenedFatalMsgV(pszWhere, enmWhat, rc, pszMsgFmt, va);
-    va_end(va);
+    /* not reached */
 }
 
 
-DECLHIDDEN(void) supR3HardenedFatalV(const char *pszFormat, va_list va)
+DECL_NO_RETURN(DECLHIDDEN(void)) supR3HardenedFatalV(const char *pszFormat, va_list va)
 {
     va_list vaCopy;
     va_copy(vaCopy, va);
     AssertFatalMsgFailed(("%N", pszFormat, &vaCopy));
-    va_end(vaCopy);
+    /* not reached */
 }
 
 
-DECLHIDDEN(void) supR3HardenedFatal(const char *pszFormat, ...)
+DECL_NO_RETURN(DECLHIDDEN(void)) supR3HardenedFatal(const char *pszFormat, ...)
 {
     va_list va;
     va_start(va, pszFormat);
     supR3HardenedFatalV(pszFormat, va);
-    va_end(va);
+    /* not reached */
 }
 
 
diff --git a/src/VBox/HostDrivers/Support/SUPR3HardenedMain.cpp b/src/VBox/HostDrivers/Support/SUPR3HardenedMain.cpp
index 0257133..7219545 100644
--- a/src/VBox/HostDrivers/Support/SUPR3HardenedMain.cpp
+++ b/src/VBox/HostDrivers/Support/SUPR3HardenedMain.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -642,7 +642,8 @@ static void suplibHardenedPrintStrN(const char *pch, size_t cch)
         }
     }
 #else
-    (void)write(2, pch, cch);
+    int res = write(2, pch, cch);
+    NOREF(res);
 #endif
 }
 
@@ -668,6 +669,7 @@ static void suplibHardenedPrintChr(char ch)
     suplibHardenedPrintStrN(&ch, 1);
 }
 
+#ifndef IPRT_NO_CRT
 
 /**
  * Writes a decimal number to stdard error.
@@ -754,7 +756,7 @@ static void suplibHardenedPrintWideStr(PCRTUTF16 pwsz)
     }
 }
 
-#ifdef IPRT_NO_CRT
+#else /* IPRT_NO_CRT */
 
 /** Buffer structure used by suplibHardenedOutput. */
 struct SUPLIBHARDENEDOUTPUTBUF
@@ -1125,7 +1127,6 @@ DECLHIDDEN(char *) supR3HardenedPathFilename(const char *pszPath)
     }
 
     /* will never get here */
-    return NULL;
 }
 
 
@@ -1333,7 +1334,7 @@ DECLHIDDEN(int) supR3HardenedPathAppBin(char *pszPath, size_t cchPath)
     }
 
     supR3HardenedFatal("supR3HardenedPathAppBin: Buffer too small (%u < %u)\n", cchPath, cch);
-    return VERR_BUFFER_OVERFLOW;
+    /* not reached */
 }
 
 
@@ -1352,7 +1353,9 @@ DECLHIDDEN(void) supR3HardenedOpenLog(int *pcArgs, char **papszArgs)
     for (int iArg = 1; iArg < cArgs; iArg++)
         if (strncmp(papszArgs[iArg], s_szLogOption, sizeof(s_szLogOption) - 1) == 0)
         {
+#ifdef RT_OS_WINDOWS
             const char *pszLogFile = &papszArgs[iArg][sizeof(s_szLogOption) - 1];
+#endif
 
             /*
              * Drop the argument from the vector (has trailing NULL entry).
@@ -1398,6 +1401,7 @@ DECLHIDDEN(void) supR3HardenedOpenLog(int *pcArgs, char **papszArgs)
                     g_hStartupLog = NULL;
             }
 #else
+            RT_NOREF(g_hStartupLog, g_cbStartupLog);
             //g_hStartupLog = open()
 #endif
         }
@@ -1430,6 +1434,7 @@ DECLHIDDEN(void) supR3HardenedLogV(const char *pszFormat, va_list va)
                     &Ios, szBuf, (ULONG)cch, &Offset, NULL /*Key*/);
     }
 #else
+    RT_NOREF(pszFormat, va);
     /* later */
 #endif
 }
@@ -1523,7 +1528,8 @@ static void suplibHardenedPrintPrefix(void)
 }
 
 
-DECLHIDDEN(void)   supR3HardenedFatalMsgV(const char *pszWhere, SUPINITOP enmWhat, int rc, const char *pszMsgFmt, va_list va)
+DECL_NO_RETURN(DECLHIDDEN(void)) supR3HardenedFatalMsgV(const char *pszWhere, SUPINITOP enmWhat, int rc,
+                                                        const char *pszMsgFmt, va_list va)
 {
     /*
      * First to the log.
@@ -1634,16 +1640,17 @@ DECLHIDDEN(void)   supR3HardenedFatalMsgV(const char *pszWhere, SUPINITOP enmWha
 }
 
 
-DECLHIDDEN(void)   supR3HardenedFatalMsg(const char *pszWhere, SUPINITOP enmWhat, int rc, const char *pszMsgFmt, ...)
+DECL_NO_RETURN(DECLHIDDEN(void)) supR3HardenedFatalMsg(const char *pszWhere, SUPINITOP enmWhat, int rc,
+                                                       const char *pszMsgFmt, ...)
 {
     va_list va;
     va_start(va, pszMsgFmt);
     supR3HardenedFatalMsgV(pszWhere, enmWhat, rc, pszMsgFmt, va);
-    va_end(va);
+    /* not reached */
 }
 
 
-DECLHIDDEN(void) supR3HardenedFatalV(const char *pszFormat, va_list va)
+DECL_NO_RETURN(DECLHIDDEN(void)) supR3HardenedFatalV(const char *pszFormat, va_list va)
 {
     supR3HardenedLog("Fatal error:\n");
     va_list vaCopy;
@@ -1678,12 +1685,12 @@ DECLHIDDEN(void) supR3HardenedFatalV(const char *pszFormat, va_list va)
 }
 
 
-DECLHIDDEN(void) supR3HardenedFatal(const char *pszFormat, ...)
+DECL_NO_RETURN(DECLHIDDEN(void)) supR3HardenedFatal(const char *pszFormat, ...)
 {
     va_list va;
     va_start(va, pszFormat);
     supR3HardenedFatalV(pszFormat, va);
-    va_end(va);
+    /* not reached */
 }
 
 
@@ -1861,8 +1868,6 @@ static void supR3HardenedMainGrabCapabilites(void)
  */
 static void supR3GrabOptions(void)
 {
-    const char *pszOpt;
-
 # ifdef RT_OS_LINUX
     g_uCaps = 0;
 
@@ -1878,7 +1883,7 @@ static void supR3GrabOptions(void)
          * Default: enabled.
          * Can be disabled with 'export VBOX_HARD_CAP_NET_RAW=0'.
          */
-        pszOpt = getenv("VBOX_HARD_CAP_NET_RAW");
+        const char *pszOpt = getenv("VBOX_HARD_CAP_NET_RAW");
         if (   !pszOpt
             || memcmp(pszOpt, "0", sizeof("0")) != 0)
             g_uCaps = CAP_TO_MASK(CAP_NET_RAW);
@@ -1934,8 +1939,10 @@ static void supR3HardenedMainDropPrivileges(void)
 # else
     /* This is the preferred one, full control no questions about semantics.
        PORTME: If this isn't work, try join one of two other gangs above. */
-    setresgid(g_gid, g_gid, g_gid);
-    setresuid(g_uid, g_uid, g_uid);
+    int res = setresgid(g_gid, g_gid, g_gid);
+    NOREF(res);
+    res = setresuid(g_uid, g_uid, g_uid);
+    NOREF(res);
     if (getresuid(&ruid, &euid, &suid) != 0)
     {
         euid = geteuid();
@@ -2108,6 +2115,8 @@ static int supR3HardenedMainGetTrustedLib(const char *pszProgName, uint32_t fMai
 #ifdef RT_OS_DARWIN
     if (fMainFlags & SUPSECMAIN_FLAGS_OSX_VM_APP)
         pszProgName = "VirtualBox";
+#else
+    RT_NOREF1(fMainFlags);
 #endif
     size_t cch = suplibHardenedStrLen(pszPath);
     return suplibHardenedStrCopyEx(&pszPath[cch], cbPath - cch, pszSubDirSlash, pszProgName, SUPLIB_DLL_SUFF, NULL);
diff --git a/src/VBox/HostDrivers/Support/SUPR3HardenedMainTemplate.cpp b/src/VBox/HostDrivers/Support/SUPR3HardenedMainTemplate.cpp
index 03cce10..15b6aa5 100644
--- a/src/VBox/HostDrivers/Support/SUPR3HardenedMainTemplate.cpp
+++ b/src/VBox/HostDrivers/Support/SUPR3HardenedMainTemplate.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/SUPR3HardenedMainTemplateTestcase.cpp b/src/VBox/HostDrivers/Support/SUPR3HardenedMainTemplateTestcase.cpp
index 3a33727..4064401 100644
--- a/src/VBox/HostDrivers/Support/SUPR3HardenedMainTemplateTestcase.cpp
+++ b/src/VBox/HostDrivers/Support/SUPR3HardenedMainTemplateTestcase.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/SUPR3HardenedNoCrt.cpp b/src/VBox/HostDrivers/Support/SUPR3HardenedNoCrt.cpp
index 594e6e7..035de44 100644
--- a/src/VBox/HostDrivers/Support/SUPR3HardenedNoCrt.cpp
+++ b/src/VBox/HostDrivers/Support/SUPR3HardenedNoCrt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #if RT_OS_WINDOWS
-# include <Windows.h>
+# include <iprt/win/windows.h>
 #endif
 
 #include <VBox/sup.h>
diff --git a/src/VBox/HostDrivers/Support/SUPR3HardenedVerify.cpp b/src/VBox/HostDrivers/Support/SUPR3HardenedVerify.cpp
index 87f9163..0c5e7ef 100644
--- a/src/VBox/HostDrivers/Support/SUPR3HardenedVerify.cpp
+++ b/src/VBox/HostDrivers/Support/SUPR3HardenedVerify.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -619,6 +619,7 @@ static int supR3HardenedVerifyFileSignature(PCSUPINSTFILE pFile, PSUPVERIFIEDFIL
     return rc;
 
 # else  /* Not checking signatures. */
+    RT_NOREF4(pFile, pVerified, fFatal, fLeaveFileOpen);
     return VINF_SUCCESS;
 # endif /* Not checking signatures. */
 }
@@ -640,6 +641,9 @@ static int supR3HardenedVerifyFileSignature(PCSUPINSTFILE pFile, PSUPVERIFIEDFIL
  */
 static int supR3HardenedVerifyFileInternal(int iFile, bool fFatal, bool fLeaveFileOpen, bool fVerifyAll)
 {
+#ifndef RT_OS_WINDOWS
+    RT_NOREF1(fVerifyAll);
+#endif
     PCSUPINSTFILE pFile = &g_aSupInstallFiles[iFile];
     PSUPVERIFIEDFILE pVerified = &g_aSupVerifiedFiles[iFile];
 
@@ -881,6 +885,7 @@ static int supR3HardenedVerifyProgram(const char *pszProgName, const char *pszEx
     size_t const    cchProgNameExe = suplibHardenedStrLen(pszProgName);
 #ifndef RT_OS_DARWIN
     size_t const    cchProgNameDll = cchProgNameExe;
+    NOREF(fMainFlags);
 #else
     size_t const    cchProgNameDll = fMainFlags & SUPSECMAIN_FLAGS_OSX_VM_APP
                                    ? sizeof("VirtualBox") - 1
@@ -1246,6 +1251,7 @@ static int supR3HardenedQueryFsObjectByPath(char const *pszPath, PSUPR3HARDENEDF
 #if defined(RT_OS_WINDOWS)
     /** @todo Windows hardening. */
     pFsObjState->chTodo = 0;
+    RT_NOREF2(pszPath, pErrInfo);
     return VINF_SUCCESS;
 
 #else
@@ -1288,6 +1294,7 @@ static int supR3HardenedQueryFsObjectByHandle(RTHCUINTPTR hNative, PSUPR3HARDENE
 #if defined(RT_OS_WINDOWS)
     /** @todo Windows hardening. */
     pFsObjState->chTodo = 0;
+    RT_NOREF3(hNative, pszPath, pErrInfo);
     return VINF_SUCCESS;
 
 #else
@@ -1324,9 +1331,11 @@ static int supR3HardenedIsSameFsObject(PCSUPR3HARDENEDFSOBJSTATE pFsObjState1, P
 {
 #if defined(RT_OS_WINDOWS)
     /** @todo Windows hardening. */
+    RT_NOREF4(pFsObjState1, pFsObjState2, pszPath, pErrInfo);
     return VINF_SUCCESS;
 
 #elif defined(RT_OS_OS2)
+    RT_NOREF4(pFsObjState1, pFsObjState2, pszPath, pErrInfo);
     return VINF_SUCCESS;
 
 #else
@@ -1509,10 +1518,12 @@ static int supR3HardenedVerifyDirRecursive(char *pszDirPath, size_t cchDirPath,
 {
 #if defined(RT_OS_WINDOWS)
     /** @todo Windows hardening. */
+    RT_NOREF5(pszDirPath, cchDirPath, pFsObjState, fRecursive, pErrInfo);
     return VINF_SUCCESS;
 
 #elif defined(RT_OS_OS2)
     /* No hardening here - it's a single user system. */
+    RT_NOREF5(pszDirPath, cchDirPath, pFsObjState, fRecursive, pErrInfo);
     return VINF_SUCCESS;
 
 #else
@@ -1733,7 +1744,10 @@ DECLHIDDEN(int) supR3HardenedVerifyFile(const char *pszFilename, RTHCUINTPTR hNa
             RTUtf16Free(pwszPath);
         }
         else
+        {
             rc = RTErrInfoSetF(pErrInfo, rc, "Error converting '%s' to UTF-16: %Rrc", pszFilename, rc);
+            hVerify = INVALID_HANDLE_VALUE;
+        }
     }
     else
     {
@@ -1759,6 +1773,8 @@ DECLHIDDEN(int) supR3HardenedVerifyFile(const char *pszFilename, RTHCUINTPTR hNa
 #  ifndef IN_SUP_R3_STATIC /* Not in VBoxCpuReport and friends. */
         rc = supHardenedWinVerifyImageByHandleNoName(hVerify, fFlags, pErrInfo);
 #  endif
+# else
+        RT_NOREF1(fMaybe3rdParty);
 # endif
         NtClose(hVerify);
     }
@@ -1767,6 +1783,8 @@ DECLHIDDEN(int) supR3HardenedVerifyFile(const char *pszFilename, RTHCUINTPTR hNa
                            "Error %u trying to open (or duplicate handle for) '%s'", RtlGetLastWin32Error(), pszFilename);
     if (RT_FAILURE(rc))
         return rc;
+#else
+    RT_NOREF1(fMaybe3rdParty);
 #endif
 
     return VINF_SUCCESS;
diff --git a/src/VBox/HostDrivers/Support/SUPSvc.cpp b/src/VBox/HostDrivers/Support/SUPSvc.cpp
index bbffe32..c50288b 100644
--- a/src/VBox/HostDrivers/Support/SUPSvc.cpp
+++ b/src/VBox/HostDrivers/Support/SUPSvc.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/SUPSvcGlobal.cpp b/src/VBox/HostDrivers/Support/SUPSvcGlobal.cpp
index e58a4d0..624ad5a 100644
--- a/src/VBox/HostDrivers/Support/SUPSvcGlobal.cpp
+++ b/src/VBox/HostDrivers/Support/SUPSvcGlobal.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/SUPSvcGrant.cpp b/src/VBox/HostDrivers/Support/SUPSvcGrant.cpp
index 4ec94f2..1b487e1 100644
--- a/src/VBox/HostDrivers/Support/SUPSvcGrant.cpp
+++ b/src/VBox/HostDrivers/Support/SUPSvcGrant.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/SUPSvcInternal.h b/src/VBox/HostDrivers/Support/SUPSvcInternal.h
index 3fbb394..51e7ee9 100644
--- a/src/VBox/HostDrivers/Support/SUPSvcInternal.h
+++ b/src/VBox/HostDrivers/Support/SUPSvcInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp b/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp
index 1d8ff02..1b8960f 100644
--- a/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp
+++ b/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -211,8 +211,8 @@ static struct cdevsw    g_DevCW =
     /*.d_select= */eno_select,
     /*.d_mmap  = */eno_mmap,
     /*.d_strategy = */eno_strat,
-    /*.d_getc  = */eno_getc,
-    /*.d_putc  = */eno_putc,
+    /*.d_getc  = */(void *)(uintptr_t)&enodev, //eno_getc,
+    /*.d_putc  = */(void *)(uintptr_t)&enodev, //eno_putc,
     /*.d_type  = */0
 };
 
@@ -256,6 +256,7 @@ static int             (*g_pfnWrMsr64Carefully)(uint32_t uMsr, uint64_t uValue)
  */
 static kern_return_t    VBoxDrvDarwinStart(struct kmod_info *pKModInfo, void *pvData)
 {
+    RT_NOREF(pKModInfo, pvData);
     int rc;
 #ifdef DEBUG
     printf("VBoxDrvDarwinStart\n");
@@ -393,7 +394,7 @@ static int vboxdrvDarwinResolveSymbols(void)
             /*
              * MSR prober stuff - optional!
              */
-            int rc2 = RTR0DbgKrnlInfoQuerySymbol(hKrnlInfo, NULL, "rdmsr_carefully", (void **)&g_pfnRdMsrCarefully);
+            rc2 = RTR0DbgKrnlInfoQuerySymbol(hKrnlInfo, NULL, "rdmsr_carefully", (void **)&g_pfnRdMsrCarefully);
             if (RT_FAILURE(rc2))
                 g_pfnRdMsrCarefully = NULL;
             rc2 = RTR0DbgKrnlInfoQuerySymbol(hKrnlInfo, NULL, "rdmsr64_carefully", (void **)&g_pfnRdMsr64Carefully);
@@ -424,6 +425,7 @@ static int vboxdrvDarwinResolveSymbols(void)
  */
 static kern_return_t    VBoxDrvDarwinStop(struct kmod_info *pKModInfo, void *pvData)
 {
+    RT_NOREF(pKModInfo, pvData);
     int rc;
     LogFlow(("VBoxDrvDarwinStop\n"));
 
@@ -475,6 +477,7 @@ static kern_return_t    VBoxDrvDarwinStop(struct kmod_info *pKModInfo, void *pvD
  */
 static int VBoxDrvDarwinOpen(dev_t Dev, int fFlags, int fDevType, struct proc *pProcess)
 {
+    RT_NOREF(fFlags, fDevType);
 #ifdef DEBUG_DARWIN_GIP
     char szName[128];
     szName[0] = '\0';
@@ -560,6 +563,7 @@ static int VBoxDrvDarwinOpen(dev_t Dev, int fFlags, int fDevType, struct proc *p
  */
 static int VBoxDrvDarwinClose(dev_t Dev, int fFlags, int fDevType, struct proc *pProcess)
 {
+    RT_NOREF(Dev, fFlags, fDevType, pProcess);
     Log(("VBoxDrvDarwinClose: pid=%d\n", (int)RTProcSelf()));
     Assert(proc_pid(pProcess) == (int)RTProcSelf());
 
@@ -583,6 +587,7 @@ static int VBoxDrvDarwinClose(dev_t Dev, int fFlags, int fDevType, struct proc *
  */
 static int VBoxDrvDarwinIOCtl(dev_t Dev, u_long iCmd, caddr_t pData, int fFlags, struct proc *pProcess)
 {
+    RT_NOREF(fFlags);
     const bool          fUnrestricted = minor(Dev) == 0;
     const RTPROCESS     Process = proc_pid(pProcess);
     const unsigned      iHash = SESSION_HASH(Process);
@@ -691,6 +696,7 @@ static int VBoxDrvDarwinIOCtlSMAP(dev_t Dev, u_long iCmd, caddr_t pData, int fFl
  */
 static int VBoxDrvDarwinIOCtlSlow(PSUPDRVSESSION pSession, u_long iCmd, caddr_t pData, struct proc *pProcess)
 {
+    RT_NOREF(pProcess);
     LogFlow(("VBoxDrvDarwinIOCtlSlow: pSession=%p iCmd=%p pData=%p pProcess=%p\n", pSession, iCmd, pData, pProcess));
 
 
@@ -740,7 +746,7 @@ static int VBoxDrvDarwinIOCtlSlow(PSUPDRVSESSION pSession, u_long iCmd, caddr_t
         if (RT_UNLIKELY((Hdr.fFlags & SUPREQHDR_FLAGS_MAGIC_MASK) != SUPREQHDR_FLAGS_MAGIC))
         {
             OSDBGPRINT(("VBoxDrvDarwinIOCtlSlow: bad magic fFlags=%#x; iCmd=%#lx\n", Hdr.fFlags, iCmd));
-            IPRT_DARWIN_SAVE_EFL_AC();
+            IPRT_DARWIN_RESTORE_EFL_AC();
             return EINVAL;
         }
         cbReq = RT_MAX(Hdr.cbIn, Hdr.cbOut);
@@ -749,7 +755,7 @@ static int VBoxDrvDarwinIOCtlSlow(PSUPDRVSESSION pSession, u_long iCmd, caddr_t
                         ||  cbReq > _1M*16))
         {
             OSDBGPRINT(("VBoxDrvDarwinIOCtlSlow: max(%#x,%#x); iCmd=%#lx\n", Hdr.cbIn, Hdr.cbOut, iCmd));
-            IPRT_DARWIN_SAVE_EFL_AC();
+            IPRT_DARWIN_RESTORE_EFL_AC();
             return EINVAL;
         }
 
@@ -958,6 +964,7 @@ IOReturn VBoxDrvDarwinSleepHandler(void * /* pvTarget */, void *pvRefCon, UInt32
  */
 static DECLCALLBACK(void) vboxdrvDarwinVmxEnableFix(RTCPUID idCpu, void *pvUser1, void *pvUser2)
 {
+    RT_NOREF(idCpu, pvUser1, pvUser2);
     RTCCUINTREG uCr4 = ASMGetCR4();
     if (!(uCr4 & X86_CR4_VMXE))
     {
@@ -999,7 +1006,7 @@ int VBOXCALL supdrvOSEnableVTx(bool fEnable)
                 if (version_major == 14 /* 14 = 10.10 = yosemite */)
                 {
                     uint32_t fCaps;
-                    int rc = supdrvQueryVTCapsInternal(&fCaps);
+                    rc = supdrvQueryVTCapsInternal(&fCaps);
                     if (RT_SUCCESS(rc))
                     {
                         if (fCaps & SUPVTCAPS_VT_X)
@@ -1313,6 +1320,7 @@ int VBOXCALL    supdrvOSMsrProberWrite(uint32_t uMsr, RTCPUID idCpu, uint64_t uV
  */
 static DECLCALLBACK(void) supdrvDarwinMsrProberModifyOnCpu(RTCPUID idCpu, void *pvUser1, void *pvUser2)
 {
+    RT_NOREF(idCpu, pvUser2);
     PSUPMSRPROBER               pReq    = (PSUPMSRPROBER)pvUser1;
     register uint32_t           uMsr    = pReq->u.In.uMsr;
     bool const                  fFaster = pReq->u.In.enmOp == SUPMSRPROBEROP_MODIFY_FASTER;
diff --git a/src/VBox/HostDrivers/Support/darwin/SUPLib-darwin.cpp b/src/VBox/HostDrivers/Support/darwin/SUPLib-darwin.cpp
index 75977f3..3680217 100644
--- a/src/VBox/HostDrivers/Support/darwin/SUPLib-darwin.cpp
+++ b/src/VBox/HostDrivers/Support/darwin/SUPLib-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -186,6 +186,8 @@ static int suplibDarwinOpenService(PSUPLIBDATA pThis)
 
 int suplibOsInit(PSUPLIBDATA pThis, bool fPreInited, bool fUnrestricted, SUPINITOP *penmWhat, PRTERRINFO pErrInfo)
 {
+    RT_NOREF(penmWhat, pErrInfo);
+
     /*
      * Nothing to do if pre-inited.
      */
@@ -263,6 +265,7 @@ int suplibOsUninstall(void)
 
 int suplibOsIOCtl(PSUPLIBDATA pThis, uintptr_t uFunction, void *pvReq, size_t cbReq)
 {
+    RT_NOREF(cbReq);
     if (RT_LIKELY(ioctl(pThis->hDevice, uFunction, pvReq) >= 0))
         return VINF_SUCCESS;
     return RTErrConvertFromErrno(errno);
diff --git a/src/VBox/HostDrivers/Support/darwin/SUPR0IdcClient-darwin.c b/src/VBox/HostDrivers/Support/darwin/SUPR0IdcClient-darwin.c
index 0c1b638..53299c8 100644
--- a/src/VBox/HostDrivers/Support/darwin/SUPR0IdcClient-darwin.c
+++ b/src/VBox/HostDrivers/Support/darwin/SUPR0IdcClient-darwin.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/freebsd/SUPLib-freebsd.cpp b/src/VBox/HostDrivers/Support/freebsd/SUPLib-freebsd.cpp
index 3972ac2..551236d 100644
--- a/src/VBox/HostDrivers/Support/freebsd/SUPLib-freebsd.cpp
+++ b/src/VBox/HostDrivers/Support/freebsd/SUPLib-freebsd.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/freebsd/SUPR0IdcClient-freebsd.c b/src/VBox/HostDrivers/Support/freebsd/SUPR0IdcClient-freebsd.c
index d11ae58..e9ee2bc 100644
--- a/src/VBox/HostDrivers/Support/freebsd/SUPR0IdcClient-freebsd.c
+++ b/src/VBox/HostDrivers/Support/freebsd/SUPR0IdcClient-freebsd.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c b/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
index e3fd0d2..0beb736 100644
--- a/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
+++ b/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
@@ -1,10 +1,10 @@
-/* $Rev: 108519 $ */
+/* $Rev: 109268 $ */
 /** @file
  * VBoxDrv - The VirtualBox Support Driver - Linux specifics.
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -52,12 +52,7 @@
 #endif
 
 #include <linux/sched.h>
-#ifdef CONFIG_DEVFS_FS
-# include <linux/devfs_fs_kernel.h>
-#endif
-#ifdef CONFIG_VBOXDRV_AS_MISC
-# include <linux/miscdevice.h>
-#endif
+#include <linux/miscdevice.h>
 #ifdef VBOX_WITH_SUSPEND_NOTIFICATION
 # include <linux/platform_device.h>
 #endif
@@ -79,15 +74,6 @@
 #  endif
 # endif
 
-/* devfs defines */
-#if defined(CONFIG_DEVFS_FS) && !defined(CONFIG_VBOXDRV_AS_MISC)
-# ifdef VBOX_WITH_HARDENING
-#  define VBOX_DEV_FMASK     (S_IWUSR | S_IRUSR)
-# else
-#  define VBOX_DEV_FMASK     (S_IRUGO | S_IWUGO)
-# endif
-#endif /* CONFIG_DEV_FS && !CONFIG_VBOXDEV_AS_MISC */
-
 #ifdef CONFIG_X86_HIGH_ENTRY
 # error "CONFIG_X86_HIGH_ENTRY is not supported by VBoxDrv at this time."
 #endif
@@ -142,17 +128,6 @@ static void VBoxDevRelease(struct device *pDev);
  */
 static SUPDRVDEVEXT         g_DevExt;
 
-#ifndef CONFIG_VBOXDRV_AS_MISC
-/** Module major number for vboxdrv. */
-#define DEVICE_MAJOR_SYS    234
-/** Saved major device number for vboxdrv. */
-static int                  g_iModuleMajorSys;
-/** Module major number for vboxdrvu. */
-#define DEVICE_MAJOR_USR    235
-/** Saved major device number for vboxdrvu. */
-static int                  g_iModuleMajorUsr;
-#endif /* !CONFIG_VBOXDRV_AS_MISC */
-
 /** Module parameter.
  * Not prefixed because the name is used by macros and the end of this file. */
 static int force_async_tsc = 0;
@@ -219,7 +194,6 @@ static struct file_operations gFileOpsVBoxDrvUsr =
 #endif
 };
 
-#ifdef CONFIG_VBOXDRV_AS_MISC
 /** The miscdevice structure for vboxdrv. */
 static struct miscdevice gMiscDeviceSys =
 {
@@ -240,7 +214,6 @@ static struct miscdevice gMiscDeviceUsr =
     devfs_name: DEVICE_NAME_USR,
 # endif
 };
-#endif
 
 
 #ifdef VBOX_WITH_SUSPEND_NOTIFICATION
@@ -334,7 +307,6 @@ static int __init VBoxDrvLinuxInit(void)
      * Check for synchronous/asynchronous TSC mode.
      */
     printk(KERN_DEBUG "vboxdrv: Found %u processor cores\n", (unsigned)RTMpGetOnlineCount());
-#ifdef CONFIG_VBOXDRV_AS_MISC
     rc = misc_register(&gMiscDeviceSys);
     if (rc)
     {
@@ -348,51 +320,6 @@ static int __init VBoxDrvLinuxInit(void)
         misc_deregister(&gMiscDeviceSys);
         return rc;
     }
-#else  /* !CONFIG_VBOXDRV_AS_MISC */
-    /*
-     * Register character devices and save the returned major numbers.
-     */
-    /* /dev/vboxdrv */
-    g_iModuleMajorSys = DEVICE_MAJOR_SYS;
-    rc = register_chrdev((dev_t)g_iModuleMajorSys, DEVICE_NAME_SYS, &gFileOpsVBoxDrvSys);
-    if (rc < 0)
-    {
-        Log(("register_chrdev() failed with rc=%#x for vboxdrv!\n", rc));
-        return rc;
-    }
-    if (DEVICE_MAJOR_SYS != 0)
-        g_iModuleMajorSys = DEVICE_MAJOR_SYS;
-    else
-        g_iModuleMajorSys = rc;
-
-    /* /dev/vboxdrvu */
-    /** @todo Use a minor number of this bugger (not sure if this code is used
-     *        though, so not bothering right now.) */
-    g_iModuleMajorUsr = DEVICE_MAJOR_USR;
-    rc = register_chrdev((dev_t)g_iModuleMajorUsr, DEVICE_NAME_USR, &gFileOpsVBoxDrvUsr);
-    if (rc < 0)
-    {
-        Log(("register_chrdev() failed with rc=%#x for vboxdrv!\n", rc));
-        return rc;
-    }
-    if (DEVICE_MAJOR_USR != 0)
-        g_iModuleMajorUsr = DEVICE_MAJOR_USR;
-    else
-        g_iModuleMajorUsr = rc;
-    rc = 0;
-
-# ifdef CONFIG_DEVFS_FS
-    /*
-     * Register a device entry
-     */
-    if (   devfs_mk_cdev(MKDEV(DEVICE_MAJOR_SYS, 0), S_IFCHR | VBOX_DEV_FMASK, DEVICE_NAME_SYS) != 0
-        || devfs_mk_cdev(MKDEV(DEVICE_MAJOR_USR, 0), S_IFCHR | VBOX_DEV_FMASK, DEVICE_NAME_USR) != 0)
-    {
-        Log(("devfs_register failed!\n"));
-        rc = -EINVAL;
-    }
-# endif
-#endif /* !CONFIG_VBOXDRV_AS_MISC */
     if (!rc)
     {
         /*
@@ -450,20 +377,10 @@ static int __init VBoxDrvLinuxInit(void)
         /*
          * Failed, cleanup and return the error code.
          */
-#if defined(CONFIG_DEVFS_FS) && !defined(CONFIG_VBOXDRV_AS_MISC)
-        devfs_remove(DEVICE_NAME_SYS);
-        devfs_remove(DEVICE_NAME_USR);
-#endif
     }
-#ifdef CONFIG_VBOXDRV_AS_MISC
     misc_deregister(&gMiscDeviceSys);
     misc_deregister(&gMiscDeviceUsr);
     Log(("VBoxDrv::ModuleInit returning %#x (minor:%d & %d)\n", rc, gMiscDeviceSys.minor, gMiscDeviceUsr.minor));
-#else
-    unregister_chrdev(g_iModuleMajorUsr, DEVICE_NAME_USR);
-    unregister_chrdev(g_iModuleMajorSys, DEVICE_NAME_SYS);
-    Log(("VBoxDrv::ModuleInit returning %#x (major:%d & %d)\n", rc, g_iModuleMajorSys, g_iModuleMajorUsr));
-#endif
     return rc;
 }
 
@@ -484,20 +401,8 @@ static void __exit VBoxDrvLinuxUnload(void)
      * I Don't think it's possible to unload a driver which processes have
      * opened, at least we'll blindly assume that here.
      */
-#ifdef CONFIG_VBOXDRV_AS_MISC
     misc_deregister(&gMiscDeviceUsr);
     misc_deregister(&gMiscDeviceSys);
-#else  /* !CONFIG_VBOXDRV_AS_MISC */
-# ifdef CONFIG_DEVFS_FS
-    /*
-     * Unregister a device entry
-     */
-    devfs_remove(DEVICE_NAME_USR);
-    devfs_remove(DEVICE_NAME_SYS);
-# endif /* devfs */
-    unregister_chrdev(g_iModuleMajorUsr, DEVICE_NAME_USR);
-    unregister_chrdev(g_iModuleMajorSys, DEVICE_NAME_SYS);
-#endif /* !CONFIG_VBOXDRV_AS_MISC */
 
     /*
      * Destroy GIP, delete the device extension and terminate IPRT.
diff --git a/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.mod.c b/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.mod.c
index f3fa21d..43e53aa 100644
--- a/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.mod.c
+++ b/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.mod.c
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -48,7 +48,6 @@ __attribute__((section("__versions"))) = {
 	{        0, "cleanup_module" },
 	{        0, "init_module" },
 	{        0, "struct_module" },
-	{        0, "devfs_remove" },
 	{        0, "strpbrk" },
 	{        0, "__kmalloc" },
 	{        0, "mem_map" },
@@ -63,7 +62,6 @@ __attribute__((section("__versions"))) = {
 	{        0, "__PAGE_KERNEL" },
 	{        0, "rwsem_wake" },
 	{        0, "copy_to_user" },
-	{        0, "devfs_mk_cdev" },
 	{        0, "preempt_schedule" },
 	{        0, "contig_page_data" },
 	{        0, "do_mmap_pgoff" },
@@ -72,11 +70,9 @@ __attribute__((section("__versions"))) = {
 	{        0, "__free_pages" },
 	{        0, "do_munmap" },
 	{        0, "get_user_pages" },
-	{        0, "register_chrdev" },
 	{        0, "vsnprintf" },
 	{        0, "kfree" },
 	{        0, "memcpy" },
-	{        0, "unregister_chrdev" },
 	{        0, "put_page" },
 	{        0, "__up_wakeup" },
 	{        0, "__down_failed" },
diff --git a/src/VBox/HostDrivers/Support/linux/SUPLib-linux.cpp b/src/VBox/HostDrivers/Support/linux/SUPLib-linux.cpp
index 4612185..07422e4 100644
--- a/src/VBox/HostDrivers/Support/linux/SUPLib-linux.cpp
+++ b/src/VBox/HostDrivers/Support/linux/SUPLib-linux.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -75,6 +75,8 @@
 
 int suplibOsInit(PSUPLIBDATA pThis, bool fPreInited, bool fUnrestricted, SUPINITOP *penmWhat, PRTERRINFO pErrInfo)
 {
+    RT_NOREF2(penmWhat, pErrInfo);
+
     /*
      * Nothing to do if pre-inited.
      */
diff --git a/src/VBox/HostDrivers/Support/linux/SUPR0IdcClient-linux.c b/src/VBox/HostDrivers/Support/linux/SUPR0IdcClient-linux.c
index ec9d54c..e35c553 100644
--- a/src/VBox/HostDrivers/Support/linux/SUPR0IdcClient-linux.c
+++ b/src/VBox/HostDrivers/Support/linux/SUPR0IdcClient-linux.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/os2/SUPDrv-os2.cpp b/src/VBox/HostDrivers/Support/os2/SUPDrv-os2.cpp
index e3039bd..159df34 100644
--- a/src/VBox/HostDrivers/Support/os2/SUPDrv-os2.cpp
+++ b/src/VBox/HostDrivers/Support/os2/SUPDrv-os2.cpp
@@ -125,7 +125,7 @@ DECLASM(int) VBoxDrvInit(const char *pszArgs)
                            "\r\n"
                            "VirtualBox.org Support Driver for OS/2 version " VBOX_VERSION_STRING "\r\n"
                            "Copyright (C) 2007 Knut St. Osmundsen\r\n"
-                           "Copyright (C) 2007-2015 Oracle Corporation\r\n");
+                           "Copyright (C) 2007-2016 Oracle Corporation\r\n");
                     g_cchInitText = strlen(&g_szInitText[0]);
                 }
                 return VINF_SUCCESS;
diff --git a/src/VBox/HostDrivers/Support/os2/SUPDrv-os2.def b/src/VBox/HostDrivers/Support/os2/SUPDrv-os2.def
index 417508b..e454e67 100644
--- a/src/VBox/HostDrivers/Support/os2/SUPDrv-os2.def
+++ b/src/VBox/HostDrivers/Support/os2/SUPDrv-os2.def
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/os2/SUPLib-os2.cpp b/src/VBox/HostDrivers/Support/os2/SUPLib-os2.cpp
index 8ff5a47..2aa4ad8 100644
--- a/src/VBox/HostDrivers/Support/os2/SUPLib-os2.cpp
+++ b/src/VBox/HostDrivers/Support/os2/SUPLib-os2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/os2/SUPR0IdcClient-os2.c b/src/VBox/HostDrivers/Support/os2/SUPR0IdcClient-os2.c
index c9e7bda..e7b913a 100644
--- a/src/VBox/HostDrivers/Support/os2/SUPR0IdcClient-os2.c
+++ b/src/VBox/HostDrivers/Support/os2/SUPR0IdcClient-os2.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/solaris/SUPDrv-solaris.c b/src/VBox/HostDrivers/Support/solaris/SUPDrv-solaris.c
index 882ad94..3c04f56 100644
--- a/src/VBox/HostDrivers/Support/solaris/SUPDrv-solaris.c
+++ b/src/VBox/HostDrivers/Support/solaris/SUPDrv-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/solaris/SUPLib-solaris.cpp b/src/VBox/HostDrivers/Support/solaris/SUPLib-solaris.cpp
index c711317..ef3bd51 100644
--- a/src/VBox/HostDrivers/Support/solaris/SUPLib-solaris.cpp
+++ b/src/VBox/HostDrivers/Support/solaris/SUPLib-solaris.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/solaris/SUPR0IdcClient-solaris.c b/src/VBox/HostDrivers/Support/solaris/SUPR0IdcClient-solaris.c
index 3a50c69..a17b1ad 100644
--- a/src/VBox/HostDrivers/Support/solaris/SUPR0IdcClient-solaris.c
+++ b/src/VBox/HostDrivers/Support/solaris/SUPR0IdcClient-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/testcase/Makefile.kmk b/src/VBox/HostDrivers/Support/testcase/Makefile.kmk
index ab2e8c2..06f761c 100644
--- a/src/VBox/HostDrivers/Support/testcase/Makefile.kmk
+++ b/src/VBox/HostDrivers/Support/testcase/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/testcase/SUPInstall.cpp b/src/VBox/HostDrivers/Support/testcase/SUPInstall.cpp
index cb6eab5..688246f 100644
--- a/src/VBox/HostDrivers/Support/testcase/SUPInstall.cpp
+++ b/src/VBox/HostDrivers/Support/testcase/SUPInstall.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/testcase/SUPLoggerCtl.cpp b/src/VBox/HostDrivers/Support/testcase/SUPLoggerCtl.cpp
index 29bd511..08dd4ce 100644
--- a/src/VBox/HostDrivers/Support/testcase/SUPLoggerCtl.cpp
+++ b/src/VBox/HostDrivers/Support/testcase/SUPLoggerCtl.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -88,7 +88,6 @@ int main(int argc, char **argv)
     }           enmWhat   = kSupLoggerCtl_Set;
 
     int ch;
-    int i = 1;
     RTGETOPTUNION Val;
     RTGETOPTSTATE GetState;
     RTGetOptInit(&GetState, argc, argv, s_aOptions, RT_ELEMENTS(s_aOptions), 1, 0);
diff --git a/src/VBox/HostDrivers/Support/testcase/SUPUninstall.cpp b/src/VBox/HostDrivers/Support/testcase/SUPUninstall.cpp
index a415132..7f78735 100644
--- a/src/VBox/HostDrivers/Support/testcase/SUPUninstall.cpp
+++ b/src/VBox/HostDrivers/Support/testcase/SUPUninstall.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/testcase/tstContiguous.cpp b/src/VBox/HostDrivers/Support/testcase/tstContiguous.cpp
index 613011e..54794ca 100644
--- a/src/VBox/HostDrivers/Support/testcase/tstContiguous.cpp
+++ b/src/VBox/HostDrivers/Support/testcase/tstContiguous.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/testcase/tstGIP-2.cpp b/src/VBox/HostDrivers/Support/testcase/tstGIP-2.cpp
index 18fc69c..7374821 100644
--- a/src/VBox/HostDrivers/Support/testcase/tstGIP-2.cpp
+++ b/src/VBox/HostDrivers/Support/testcase/tstGIP-2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/testcase/tstGetPagingMode.cpp b/src/VBox/HostDrivers/Support/testcase/tstGetPagingMode.cpp
index 8d18892..f94b120 100644
--- a/src/VBox/HostDrivers/Support/testcase/tstGetPagingMode.cpp
+++ b/src/VBox/HostDrivers/Support/testcase/tstGetPagingMode.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/testcase/tstInit.cpp b/src/VBox/HostDrivers/Support/testcase/tstInit.cpp
index 5176de3..5567636 100644
--- a/src/VBox/HostDrivers/Support/testcase/tstInit.cpp
+++ b/src/VBox/HostDrivers/Support/testcase/tstInit.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/testcase/tstInt.cpp b/src/VBox/HostDrivers/Support/testcase/tstInt.cpp
index c942345..562ad08 100644
--- a/src/VBox/HostDrivers/Support/testcase/tstInt.cpp
+++ b/src/VBox/HostDrivers/Support/testcase/tstInt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/testcase/tstLow.cpp b/src/VBox/HostDrivers/Support/testcase/tstLow.cpp
index 350fbf4..38bbe7a 100644
--- a/src/VBox/HostDrivers/Support/testcase/tstLow.cpp
+++ b/src/VBox/HostDrivers/Support/testcase/tstLow.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/testcase/tstNtQueryStuff.cpp b/src/VBox/HostDrivers/Support/testcase/tstNtQueryStuff.cpp
index fc34d8c..53a45e5 100644
--- a/src/VBox/HostDrivers/Support/testcase/tstNtQueryStuff.cpp
+++ b/src/VBox/HostDrivers/Support/testcase/tstNtQueryStuff.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/testcase/tstPage.cpp b/src/VBox/HostDrivers/Support/testcase/tstPage.cpp
index 183cb36..43f9864 100644
--- a/src/VBox/HostDrivers/Support/testcase/tstPage.cpp
+++ b/src/VBox/HostDrivers/Support/testcase/tstPage.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/testcase/tstPin.cpp b/src/VBox/HostDrivers/Support/testcase/tstPin.cpp
index 28935d7..e44b51f 100644
--- a/src/VBox/HostDrivers/Support/testcase/tstPin.cpp
+++ b/src/VBox/HostDrivers/Support/testcase/tstPin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/testcase/tstSupLoadModule.cpp b/src/VBox/HostDrivers/Support/testcase/tstSupLoadModule.cpp
index 047c1f3..e6b77dd 100644
--- a/src/VBox/HostDrivers/Support/testcase/tstSupLoadModule.cpp
+++ b/src/VBox/HostDrivers/Support/testcase/tstSupLoadModule.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -105,7 +105,7 @@ int main(int argc, char **argv)
                 return 1;
 
             case 'V':
-                RTPrintf("$Revision: 102121 $\n");
+                RTPrintf("$Revision: 109048 $\n");
                 return 0;
 
             default:
diff --git a/src/VBox/HostDrivers/Support/testcase/tstSupSem-Zombie.cpp b/src/VBox/HostDrivers/Support/testcase/tstSupSem-Zombie.cpp
index e155f85..8f15192 100644
--- a/src/VBox/HostDrivers/Support/testcase/tstSupSem-Zombie.cpp
+++ b/src/VBox/HostDrivers/Support/testcase/tstSupSem-Zombie.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/testcase/tstSupSem.cpp b/src/VBox/HostDrivers/Support/testcase/tstSupSem.cpp
index 7ecbafb..202cd51 100644
--- a/src/VBox/HostDrivers/Support/testcase/tstSupSem.cpp
+++ b/src/VBox/HostDrivers/Support/testcase/tstSupSem.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/testcase/tstSupTscDelta.cpp b/src/VBox/HostDrivers/Support/testcase/tstSupTscDelta.cpp
index 0a0e341..524844d 100644
--- a/src/VBox/HostDrivers/Support/testcase/tstSupTscDelta.cpp
+++ b/src/VBox/HostDrivers/Support/testcase/tstSupTscDelta.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/testcase/tstSupVerify.cpp b/src/VBox/HostDrivers/Support/testcase/tstSupVerify.cpp
index f70a3e3..17cfcb8 100644
--- a/src/VBox/HostDrivers/Support/testcase/tstSupVerify.cpp
+++ b/src/VBox/HostDrivers/Support/testcase/tstSupVerify.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -59,7 +59,7 @@ int main(int argc, char **argv)
         { "--dummy",            'd', RTGETOPT_REQ_NOTHING },
     };
 
-    bool fKeepLoaded = false;
+    //bool fKeepLoaded = false;
 
     int ch;
     RTGETOPTUNION ValueUnion;
@@ -87,7 +87,7 @@ int main(int argc, char **argv)
                 return 1;
 
             case 'V':
-                RTPrintf("$Revision: 104166 $\n");
+                RTPrintf("$Revision: 109250 $\n");
                 return 0;
 
             default:
diff --git a/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp b/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp
index 563f979..8f1e23e 100644
--- a/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp
+++ b/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -312,7 +312,7 @@ static void                 supdrvNtErrorInfoCleanupProcess(HANDLE hProcessId);
 *   Exported Functions                                                                                                           *
 *********************************************************************************************************************************/
 RT_C_DECLS_BEGIN
-ULONG _stdcall DriverEntry(PDRIVER_OBJECT pDrvObj, PUNICODE_STRING pRegPath);
+NTSTATUS _stdcall DriverEntry(PDRIVER_OBJECT pDrvObj, PUNICODE_STRING pRegPath);
 RT_C_DECLS_END
 
 
@@ -483,9 +483,9 @@ static NTSTATUS vboxdrvNtCreateDevices(PDRIVER_OBJECT pDrvObj)
                 IoDeleteDevice(g_pDevObjStub);
                 g_pDevObjUsr = NULL;
             }
-#endif
             IoDeleteDevice(g_pDevObjUsr);
             g_pDevObjUsr = NULL;
+#endif
         }
         IoDeleteDevice(g_pDevObjSys);
         g_pDevObjSys = NULL;
@@ -536,8 +536,10 @@ static void vboxdrvNtDestroyDevices(void)
  * @param   pDrvObj     Pointer to driver object.
  * @param   pRegPath    Registry base path.
  */
-ULONG _stdcall DriverEntry(PDRIVER_OBJECT pDrvObj, PUNICODE_STRING pRegPath)
+NTSTATUS _stdcall DriverEntry(PDRIVER_OBJECT pDrvObj, PUNICODE_STRING pRegPath)
 {
+    RT_NOREF1(pRegPath);
+
     /*
      * Sanity checks.
      */
@@ -1012,6 +1014,8 @@ static BOOLEAN _stdcall VBoxDrvNtFastIoDeviceControl(PFILE_OBJECT pFileObj, BOOL
                                                      PVOID pvOutput, ULONG cbOutput, ULONG uCmd,
                                                      PIO_STATUS_BLOCK pIoStatus, PDEVICE_OBJECT pDevObj)
 {
+    RT_NOREF1(fWait);
+
     /*
      * Only the normal devices, not the stub or error info ones.
      */
@@ -1096,10 +1100,14 @@ static BOOLEAN _stdcall VBoxDrvNtFastIoDeviceControl(PFILE_OBJECT pFileObj, BOOL
                 __except(EXCEPTION_EXECUTE_HANDLER)
                 {
                     rcNt = GetExceptionCode();
+                    Hdr.cbIn = Hdr.cbOut = 0; /* shut up MSC */
                 }
             }
             else
+            {
+                Hdr.cbIn = Hdr.cbOut = 0; /* shut up MSC */
                 rcNt = STATUS_INVALID_PARAMETER;
+            }
             if (NT_SUCCESS(rcNt))
             {
                 /* Verify that the sizes in the request header are correct. */
@@ -1449,6 +1457,7 @@ NTSTATUS _stdcall VBoxDrvNtInternalDeviceControl(PDEVICE_OBJECT pDevObj, PIRP pI
 NTSTATUS _stdcall VBoxDrvNtRead(PDEVICE_OBJECT pDevObj, PIRP pIrp)
 {
     Log(("VBoxDrvNtRead\n"));
+    RT_NOREF1(pDevObj);
 
     NTSTATUS rcNt;
     pIrp->IoStatus.Information = 0;
@@ -1578,25 +1587,24 @@ NTSTATUS _stdcall VBoxDrvNtNotSupportedStub(PDEVICE_OBJECT pDevObj, PIRP pIrp)
  * ExRegisterCallback handler for power events
  *
  * @param   pCallbackContext    User supplied parameter (pDevObj)
- * @param   pArgument1          First argument
- * @param   pArgument2          Second argument
+ * @param   pvArgument1         First argument
+ * @param   pvArgument2         Second argument
  */
-VOID _stdcall VBoxPowerDispatchCallback(PVOID pCallbackContext, PVOID pArgument1, PVOID pArgument2)
+VOID _stdcall VBoxPowerDispatchCallback(PVOID pCallbackContext, PVOID pvArgument1, PVOID pvArgument2)
 {
-    PDEVICE_OBJECT pDevObj = (PDEVICE_OBJECT)pCallbackContext;
-
-    Log(("VBoxPowerDispatchCallback: %x %x\n", pArgument1, pArgument2));
+    /*PDEVICE_OBJECT pDevObj = (PDEVICE_OBJECT)pCallbackContext;*/ RT_NOREF1(pCallbackContext);
+    Log(("VBoxPowerDispatchCallback: %x %x\n", pvArgument1, pvArgument2));
 
     /* Power change imminent? */
-    if ((unsigned)pArgument1 == PO_CB_SYSTEM_STATE_LOCK)
+    if ((uintptr_t)pvArgument1 == PO_CB_SYSTEM_STATE_LOCK)
     {
-        if ((unsigned)pArgument2 == 0)
+        if (pvArgument2 == NULL)
             Log(("VBoxPowerDispatchCallback: about to go into suspend mode!\n"));
         else
             Log(("VBoxPowerDispatchCallback: resumed!\n"));
 
         /* Inform any clients that have registered themselves with IPRT. */
-        RTPowerSignalEvent(((unsigned)pArgument2 == 0) ? RTPOWEREVENT_SUSPEND : RTPOWEREVENT_RESUME);
+        RTPowerSignalEvent(pvArgument2 == NULL ? RTPOWEREVENT_SUSPEND : RTPOWEREVENT_RESUME);
     }
 }
 
@@ -1615,6 +1623,9 @@ void VBOXCALL supdrvOSCleanupSession(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSess
         supdrvNtProtectRelease(pSession->pNtProtect);
         pSession->pNtProtect = NULL;
     }
+    RT_NOREF1(pDevExt);
+#else
+    RT_NOREF2(pDevExt, pSession);
 #endif
 }
 
@@ -1667,6 +1678,7 @@ bool VBOXCALL   supdrvOSObjCanAccess(PSUPDRVOBJ pObj, PSUPDRVSESSION pSession, c
  */
 bool VBOXCALL  supdrvOSGetForcedAsyncTscMode(PSUPDRVDEVEXT pDevExt)
 {
+    RT_NOREF1(pDevExt);
     return false;
 }
 
@@ -2130,10 +2142,10 @@ int VBOXCALL    supdrvOSMsrProberWrite(uint32_t uMsr, RTCPUID idCpu, uint64_t uV
     Args.fGp    = true;
 
     if (idCpu == NIL_RTCPUID)
-        supdrvNtMsProberReadOnCpu(idCpu, &Args, NULL);
+        supdrvNtMsProberWriteOnCpu(idCpu, &Args, NULL);
     else
     {
-        int rc = RTMpOnSpecific(idCpu, supdrvNtMsProberReadOnCpu, &Args, NULL);
+        int rc = RTMpOnSpecific(idCpu, supdrvNtMsProberWriteOnCpu, &Args, NULL);
         if (RT_FAILURE(rc))
             return rc;
     }
@@ -2157,6 +2169,7 @@ static DECLCALLBACK(void) supdrvNtMsProberModifyOnCpu(RTCPUID idCpu, void *pvUse
     bool                fAfterGp    = true;
     bool                fRestoreGp  = true;
     RTCCUINTREG         fOldFlags;
+    RT_NOREF2(idCpu, pvUser2);
 
     /*
      * Do the job.
@@ -2826,6 +2839,8 @@ static bool supdrvNtProtectIsAssociatedCsrss(PSUPDRVNTPROTECT pNtProtect, PEPROC
  */
 static bool supdrvNtProtectIsFrigginThemesService(PSUPDRVNTPROTECT pNtProtect, PEPROCESS pAnnoyingProcess)
 {
+    RT_NOREF1(pNtProtect);
+
     /*
      * Check the process name.
      */
@@ -3171,6 +3186,8 @@ supdrvNtProtectCallback_ProcessCreateNotify(HANDLE hParentPid, HANDLE hNewPid, B
 static VOID __stdcall
 supdrvNtProtectCallback_ProcessCreateNotifyEx(PEPROCESS pNewProcess, HANDLE hNewPid, PPS_CREATE_NOTIFY_INFO pInfo)
 {
+    RT_NOREF1(pNewProcess);
+
     /*
      * Is it a new process that needs protection?
      */
@@ -3252,7 +3269,7 @@ AssertCompile((SUPDRV_NT_ALLOW_PROCESS_RIGHTS & SUPDRV_NT_EVIL_PROCESS_RIGHTS) =
 static OB_PREOP_CALLBACK_STATUS __stdcall
 supdrvNtProtectCallback_ProcessHandlePre(PVOID pvUser, POB_PRE_OPERATION_INFORMATION pOpInfo)
 {
-    Assert(pvUser == NULL);
+    Assert(pvUser == NULL); RT_NOREF1(pvUser);
     Assert(pOpInfo->Operation == OB_OPERATION_HANDLE_CREATE || pOpInfo->Operation == OB_OPERATION_HANDLE_DUPLICATE);
     Assert(pOpInfo->ObjectType == *PsProcessType);
 
@@ -3504,7 +3521,7 @@ supdrvNtProtectCallback_ProcessHandlePre(PVOID pvUser, POB_PRE_OPERATION_INFORMA
 static VOID __stdcall
 supdrvNtProtectCallback_ProcessHandlePost(PVOID pvUser, POB_POST_OPERATION_INFORMATION pOpInfo)
 {
-    Assert(pvUser == NULL);
+    Assert(pvUser == NULL); RT_NOREF1(pvUser);
     Assert(pOpInfo->Operation == OB_OPERATION_HANDLE_CREATE || pOpInfo->Operation == OB_OPERATION_HANDLE_DUPLICATE);
     Assert(pOpInfo->ObjectType == *PsProcessType);
 
@@ -3566,7 +3583,7 @@ AssertCompile((SUPDRV_NT_EVIL_THREAD_RIGHTS & SUPDRV_NT_ALLOWED_THREAD_RIGHTS) =
 static OB_PREOP_CALLBACK_STATUS __stdcall
 supdrvNtProtectCallback_ThreadHandlePre(PVOID pvUser, POB_PRE_OPERATION_INFORMATION pOpInfo)
 {
-    Assert(pvUser == NULL);
+    Assert(pvUser == NULL); RT_NOREF1(pvUser);
     Assert(pOpInfo->Operation == OB_OPERATION_HANDLE_CREATE || pOpInfo->Operation == OB_OPERATION_HANDLE_DUPLICATE);
     Assert(pOpInfo->ObjectType == *PsThreadType);
 
@@ -3714,7 +3731,7 @@ supdrvNtProtectCallback_ThreadHandlePre(PVOID pvUser, POB_PRE_OPERATION_INFORMAT
 static VOID __stdcall
 supdrvNtProtectCallback_ThreadHandlePost(PVOID pvUser, POB_POST_OPERATION_INFORMATION pOpInfo)
 {
-    Assert(pvUser == NULL);
+    Assert(pvUser == NULL); RT_NOREF1(pvUser);
     Assert(pOpInfo->Operation == OB_OPERATION_HANDLE_CREATE || pOpInfo->Operation == OB_OPERATION_HANDLE_DUPLICATE);
     Assert(pOpInfo->ObjectType == *PsThreadType);
 
@@ -3812,7 +3829,7 @@ static void supdrvNtProtectRelease(PSUPDRVNTPROTECT pNtProtect)
         if (pNtProtect->fInTree)
         {
             PSUPDRVNTPROTECT pRemoved = (PSUPDRVNTPROTECT)RTAvlPVRemove(&g_NtProtectTree, pNtProtect->AvlCore.Key);
-            Assert(pRemoved == pNtProtect);
+            Assert(pRemoved == pNtProtect); RT_NOREF_PV(pRemoved);
             pNtProtect->fInTree = false;
         }
 
@@ -3832,7 +3849,7 @@ static void supdrvNtProtectRelease(PSUPDRVNTPROTECT pNtProtect)
                     if (pChild->fInTree)
                     {
                         PSUPDRVNTPROTECT pRemovedChild = (PSUPDRVNTPROTECT)RTAvlPVRemove(&g_NtProtectTree, pChild->AvlCore.Key);
-                        Assert(pRemovedChild == pChild);
+                        Assert(pRemovedChild == pChild); RT_NOREF_PV(pRemovedChild);
                         pChild->fInTree = false;
                     }
                 }
@@ -3905,7 +3922,7 @@ static int supdrvNtProtectVerifyStubForVmProcess(PSUPDRVNTPROTECT pNtProtect, PR
             if (enmStub == kSupDrvNtProtectKind_StubParent)
             {
                 uint32_t cRefs = ASMAtomicIncU32(&pNtStub->cRefs);
-                Assert(cRefs > 0 && cRefs < 1024);
+                Assert(cRefs > 0 && cRefs < 1024); RT_NOREF_PV(cRefs);
             }
             else
                 pNtStub = NULL;
@@ -4381,6 +4398,7 @@ DECLASM(void) supdrvNtQueryVirtualMemory_0x23(void);
 extern "C" NTSYSAPI NTSTATUS NTAPI ZwRequestWaitReplyPort(HANDLE, PVOID, PVOID);
 # endif
 
+
 /**
  * Initalizes the hardening bits.
  *
@@ -4549,18 +4567,21 @@ static NTSTATUS supdrvNtProtectInit(void)
                     static OB_OPERATION_REGISTRATION s_aObOperations[] =
                     {
                         {
-                            PsProcessType,
+                            0, /* PsProcessType - imported, need runtime init, better do it explicitly. */
                             OB_OPERATION_HANDLE_CREATE | OB_OPERATION_HANDLE_DUPLICATE,
                             supdrvNtProtectCallback_ProcessHandlePre,
                             supdrvNtProtectCallback_ProcessHandlePost,
                         },
                         {
-                            PsThreadType,
+                            0, /* PsThreadType - imported, need runtime init, better do it explicitly. */
                             OB_OPERATION_HANDLE_CREATE | OB_OPERATION_HANDLE_DUPLICATE,
                             supdrvNtProtectCallback_ThreadHandlePre,
                             supdrvNtProtectCallback_ThreadHandlePost,
                         },
                     };
+                    s_aObOperations[0].ObjectType = PsProcessType;
+                    s_aObOperations[1].ObjectType = PsThreadType;
+
                     static OB_CALLBACK_REGISTRATION s_ObCallbackReg =
                     {
                         /* .Version                     = */ OB_FLT_REGISTRATION_VERSION,
diff --git a/src/VBox/HostDrivers/Support/win/SUPDrvA-win.asm b/src/VBox/HostDrivers/Support/win/SUPDrvA-win.asm
index ae9297b..6d9bf27 100644
--- a/src/VBox/HostDrivers/Support/win/SUPDrvA-win.asm
+++ b/src/VBox/HostDrivers/Support/win/SUPDrvA-win.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/win/SUPHardenedVerify-win.h b/src/VBox/HostDrivers/Support/win/SUPHardenedVerify-win.h
index 14c9064..f44c692 100644
--- a/src/VBox/HostDrivers/Support/win/SUPHardenedVerify-win.h
+++ b/src/VBox/HostDrivers/Support/win/SUPHardenedVerify-win.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -214,11 +214,11 @@ extern PFNNTQUERYVIRTUALMEMORY g_pfnNtQueryVirtualMemory;
 
 /** Creates a combined NT version number for simple comparisons. */
 #define SUP_MAKE_NT_VER_COMBINED(a_uMajor, a_uMinor, a_uBuild, a_uSpMajor, a_uSpMinor) \
-    (   ((uint32_t)((a_uMajor) & UINT32_C(0xf))    << 28) \
-      | ((uint32_t)((a_uMinor) & UINT32_C(0xf))    << 24) \
-      | ((uint32_t)((a_uBuild) & UINT32_C(0xffff)) << 8) \
-      | ((uint32_t)((a_uSpMajor) & UINT32_C(0xf))  << 4) \
-      | RT_MIN((uint32_t)(a_uSpMinor), UINT32_C(0xf)) )
+    (   ((uint32_t)((a_uMajor)   & UINT32_C(0xf))    << 28) \
+      | ((uint32_t)((a_uMinor)   & UINT32_C(0xf))    << 24) \
+      | ((uint32_t)((a_uBuild)   & UINT32_C(0xffff)) << 8) \
+      | ((uint32_t)((a_uSpMajor) & UINT32_C(0xf))    << 4) \
+      |  (uint32_t)((a_uSpMinor) & UINT32_C(0xf)) )
 /** Simple version of SUP_MAKE_NT_VER_COMBINED. */
 #define SUP_MAKE_NT_VER_SIMPLE(a_uMajor, a_uMinor) SUP_MAKE_NT_VER_COMBINED(a_uMajor, a_uMinor, 0, 0, 0)
 extern uint32_t         g_uNtVerCombined;
diff --git a/src/VBox/HostDrivers/Support/win/SUPHardenedVerifyImage-win.cpp b/src/VBox/HostDrivers/Support/win/SUPHardenedVerifyImage-win.cpp
index 487c7d3..f527e25 100644
--- a/src/VBox/HostDrivers/Support/win/SUPHardenedVerifyImage-win.cpp
+++ b/src/VBox/HostDrivers/Support/win/SUPHardenedVerifyImage-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -307,6 +307,7 @@ static DECLCALLBACK(const char *) supHardNtViRdrLogName(PRTLDRREADER pReader)
 /** @copydoc RTLDRREADER::pfnMap */
 static DECLCALLBACK(int) supHardNtViRdrMap(PRTLDRREADER pReader, const void **ppvBits)
 {
+    RT_NOREF2(pReader, ppvBits);
     return VERR_NOT_SUPPORTED;
 }
 
@@ -314,6 +315,7 @@ static DECLCALLBACK(int) supHardNtViRdrMap(PRTLDRREADER pReader, const void **pp
 /** @copydoc RTLDRREADER::pfnUnmap */
 static DECLCALLBACK(int) supHardNtViRdrUnmap(PRTLDRREADER pReader, const void *pvBits)
 {
+    RT_NOREF2(pReader, pvBits);
     return VERR_NOT_SUPPORTED;
 }
 
@@ -495,6 +497,7 @@ static bool supHardNtViCheckIsOwnedByTrustedInstallerOrSimilar(HANDLE hFile, PCR
 
     SUP_DPRINTF(("%ls: Owner is not trusted installer (%.*Rhxs)\n",
                  pwszName, ((uint8_t *)pOwner)[1] /*SubAuthorityCount*/ * sizeof(ULONG) + 8, pOwner));
+    RT_NOREF1(pwszName);
     return false;
 }
 
@@ -557,6 +560,7 @@ static bool supHardViUtf16PathIsEqual(PCRTUTF16 pwszLeft, const char *pszRight)
 }
 
 
+#if 0 /* unused */
 /**
  * Simple case insensitive UTF-16 / ASCII ends-with path predicate.
  *
@@ -572,6 +576,7 @@ static bool supHardViUtf16PathEndsWith(PCRTUTF16 pwsz, const char *pszSuffix)
         return supHardViUtf16PathIsEqual(pwsz + cwc - cchSuffix, pszSuffix);
     return false;
 }
+#endif
 
 
 /**
@@ -674,7 +679,7 @@ DECLHIDDEN(bool) supHardViUniStrPathStartsWithUniStr(UNICODE_STRING const *pUniS
 }
 
 
-
+#ifndef IN_RING0
 /**
  * Counts slashes in the given UTF-8 path string.
  *
@@ -690,6 +695,7 @@ static uint32_t supHardViUtf16PathCountSlashes(PCRTUTF16 pwsz)
             cSlashes++;
     return cSlashes;
 }
+#endif
 
 
 #ifdef VBOX_PERMIT_MORE
@@ -732,6 +738,8 @@ DECLHIDDEN(bool) supHardViIsAppPatchDir(PCRTUTF16 pwszPath, uint32_t cwcName)
  */
 static int supHardNtViCheckIfNotSignedOk(RTLDRMOD hLdrMod, PCRTUTF16 pwszName, uint32_t fFlags, HANDLE hFile, int rc)
 {
+    RT_NOREF1(hLdrMod);
+
     if (fFlags & (SUPHNTVI_F_REQUIRE_BUILD_CERT | SUPHNTVI_F_REQUIRE_KERNEL_CODE_SIGNING))
         return rc;
 
@@ -1036,6 +1044,8 @@ static DECLCALLBACK(int) supHardNtViCallback(RTLDRMOD hLdrMod, RTLDRSIGNATURETYP
                                              void const *pvSignature, size_t cbSignature,
                                              PRTERRINFO pErrInfo, void *pvUser)
 {
+    RT_NOREF2(hLdrMod, enmSignature);
+
     /*
      * Check out the input.
      */
@@ -1213,6 +1223,8 @@ DECLHIDDEN(int) supHardenedWinVerifyImageByLdrMod(RTLDRMOD hLdrMod, PCRTUTF16 pw
      */
     if (!fAvoidWinVerifyTrust)
         rc = supHardenedWinVerifyImageTrust(pNtViRdr->hFile, pwszName, pNtViRdr->fFlags, rc, pfWinVerifyTrust, pErrInfo);
+#else
+    RT_NOREF1(fAvoidWinVerifyTrust);
 #endif
 
 #ifdef IN_SUP_HARDENED_R3
@@ -1463,6 +1475,7 @@ static int supHardNtViCertStoreInit(PRTCRSTORE phStore,
                                     PRTERRINFO pErrInfo, const char *pszErrorTag)
 {
     AssertReturn(*phStore == NIL_RTCRSTORE, VERR_WRONG_ORDER);
+    RT_NOREF1(pszErrorTag);
 
     int rc = RTCrStoreCreateInMem(phStore, cCerts1 + cCerts2);
     if (RT_FAILURE(rc))
@@ -2147,6 +2160,8 @@ DECLHIDDEN(void) supR3HardenedWinResolveVerifyTrustApiAndHookThreadCreation(cons
     if (RT_FAILURE(rc))
         supR3HardenedFatalMsg(pszProgName, kSupInitOp_Integrity, rc,
                               "WinVerifyTrust failed on stub executable: %s", ErrInfoStatic.szMsg);
+# else
+    RT_NOREF1(pszProgName);
 # endif
 
     if (g_uNtVerCombined >= SUP_MAKE_NT_VER_SIMPLE(6, 0)) /* ntdll isn't signed on XP, assuming this is the case on W2K3 for now. */
@@ -2208,6 +2223,7 @@ static int supR3HardNtViNtToWinPath(PCRTUTF16 pwszNtName, PCRTUTF16 *ppwszWinPat
 static int supR3HardNtViCallWinVerifyTrust(HANDLE hFile, PCRTUTF16 pwszName, uint32_t fFlags, PRTERRINFO pErrInfo,
                                            PFNWINVERIFYTRUST pfnWinVerifyTrust, HRESULT *phrcWinVerifyTrust)
 {
+    RT_NOREF1(fFlags);
     if (phrcWinVerifyTrust)
         *phrcWinVerifyTrust = S_OK;
 
@@ -2332,6 +2348,7 @@ static int supR3HardNtViCallWinVerifyTrust(HANDLE hFile, PCRTUTF16 pwszName, uin
 static int supR3HardNtViCallWinVerifyTrustCatFile(HANDLE hFile, PCRTUTF16 pwszName, uint32_t fFlags, PRTERRINFO pErrInfo,
                                                   PFNWINVERIFYTRUST pfnWinVerifyTrust)
 {
+    RT_NOREF1(fFlags);
     SUP_DPRINTF(("supR3HardNtViCallWinVerifyTrustCatFile: hFile=%p pwszName=%ls\n", hFile, pwszName));
 
     /*
@@ -2727,6 +2744,7 @@ DECLHIDDEN(int) supHardenedWinVerifyImageTrust(HANDLE hFile, PCRTUTF16 pwszName,
                         int rc2 = supR3HardNtViCallWinVerifyTrust(hFile, pwszName, fFlags, pErrInfo, g_pfnWinVerifyTrust, NULL);
                         AssertMsg(RT_FAILURE_NP(rc2),
                                   ("rc=%Rrc, rc2=%Rrc %s", rc, rc2, pErrInfo ? pErrInfo->pszMsg : "<no-err-info>"));
+                        RT_NOREF_PV(rc2);
                     }
                 }
 
diff --git a/src/VBox/HostDrivers/Support/win/SUPHardenedVerifyProcess-win.cpp b/src/VBox/HostDrivers/Support/win/SUPHardenedVerifyProcess-win.cpp
index 62060ca..5840ed0 100644
--- a/src/VBox/HostDrivers/Support/win/SUPHardenedVerifyProcess-win.cpp
+++ b/src/VBox/HostDrivers/Support/win/SUPHardenedVerifyProcess-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -358,6 +358,7 @@ static NTSTATUS supHardNtVpReadMem(HANDLE hProcess, uintptr_t uPtr, void *pvBuf,
 {
 #ifdef IN_RING0
     /* ASSUMES hProcess is the current process. */
+    RT_NOREF1(hProcess);
     /** @todo use MmCopyVirtualMemory where available! */
     int rc = RTR0MemUserCopyFrom(pvBuf, uPtr, cbRead);
     if (RT_SUCCESS(rc))
@@ -410,6 +411,9 @@ static int supHardNtVpFileMemCompareSection(PSUPHNTVPSTATE pThis, PSUPHNTVPIMAGE
                                             int32_t iSh, PSUPHNTVPSKIPAREA paSkipAreas, uint32_t cSkipAreas,
                                             uint32_t fCorrectProtection)
 {
+#ifndef IN_RING3
+    RT_NOREF1(fCorrectProtection);
+#endif
     AssertCompileAdjacentMembers(SUPHNTVPSTATE, abMemory, abFile); /* Use both the memory and file buffers here. Parfait might hate me for this... */
     uint32_t  const cbMemory = sizeof(pThis->abMemory) + sizeof(pThis->abFile);
     uint8_t * const pbMemory = &pThis->abMemory[0];
@@ -635,6 +639,7 @@ static PSUPHNTVPIMAGE supHardNtVpFindModule(PSUPHNTVPSTATE pThis, const char *ps
 static DECLCALLBACK(int) supHardNtVpGetImport(RTLDRMOD hLdrMod, const char *pszModule, const char *pszSymbol, unsigned uSymbol,
                                               PRTLDRADDR pValue, void *pvUser)
 {
+    RT_NOREF1(hLdrMod);
     /*SUP_DPRINTF(("supHardNtVpGetImport: %s / %#x / %s.\n", pszModule, uSymbol, pszSymbol));*/
     PSUPHNTVPSTATE pThis = (PSUPHNTVPSTATE)pvUser;
 
@@ -718,11 +723,10 @@ static DECLCALLBACK(int) supHardNtVpGetImport(RTLDRMOD hLdrMod, const char *pszM
  *                              two scratch buffers).
  * @param   pImage              The image data collected during the address
  *                              space scan.
- * @param   hProcess            Handle to the process.
- * @param   pErrInfo            Pointer to error info structure. Optional.
  */
-static int supHardNtVpVerifyImageMemoryCompare(PSUPHNTVPSTATE pThis, PSUPHNTVPIMAGE pImage, HANDLE hProcess, PRTERRINFO pErrInfo)
+static int supHardNtVpVerifyImageMemoryCompare(PSUPHNTVPSTATE pThis, PSUPHNTVPIMAGE pImage)
 {
+
     /*
      * Read and find the file headers.
      */
@@ -1037,9 +1041,8 @@ static int supHardNtVpVerifyImageMemoryCompare(PSUPHNTVPSTATE pThis, PSUPHNTVPIM
  *                              two scratch buffers).
  * @param   pImage              The image data collected during the address
  *                              space scan.
- * @param   hProcess            Handle to the process.
  */
-static int supHardNtVpVerifyImage(PSUPHNTVPSTATE pThis, PSUPHNTVPIMAGE pImage, HANDLE hProcess)
+static int supHardNtVpVerifyImage(PSUPHNTVPSTATE pThis, PSUPHNTVPIMAGE pImage)
 {
     /*
      * Validate the file signature first, then do the memory compare.
@@ -1050,7 +1053,7 @@ static int supHardNtVpVerifyImage(PSUPHNTVPSTATE pThis, PSUPHNTVPIMAGE pImage, H
     {
         rc = supHardNtLdrCacheEntryVerify(pImage->pCacheEntry, pImage->Name.UniStr.Buffer, pThis->pErrInfo);
         if (RT_SUCCESS(rc))
-            rc = supHardNtVpVerifyImageMemoryCompare(pThis, pImage, hProcess, pThis->pErrInfo);
+            rc = supHardNtVpVerifyImageMemoryCompare(pThis, pImage);
     }
     else
         rc = supHardNtVpSetInfo2(pThis, VERR_OPEN_FAILED, "pCacheEntry/hLdrMod is NIL! Impossible!");
@@ -1068,6 +1071,8 @@ static int supHardNtVpVerifyImage(PSUPHNTVPSTATE pThis, PSUPHNTVPIMAGE pImage, H
  */
 DECLHIDDEN(int) supHardNtVpThread(HANDLE hProcess, HANDLE hThread, PRTERRINFO pErrInfo)
 {
+    RT_NOREF1(hProcess);
+
     /*
      * Use the ThreadAmILastThread request to check that there is only one
      * thread in the process.
@@ -1114,6 +1119,8 @@ DECLHIDDEN(int) supHardNtVpDebugger(HANDLE hProcess, PRTERRINFO pErrInfo)
     if (uPtr != 0)
         return supHardNtVpSetInfo1(pErrInfo, VERR_SUP_VP_DEBUGGED,
                                    "Debugger attached (%#zx)", uPtr);
+#else
+    RT_NOREF2(hProcess, pErrInfo);
 #endif /* !VBOX_WITHOUT_DEBUGGER_CHECKS */
     return VINF_SUCCESS;
 }
@@ -1200,7 +1207,6 @@ static int supHardNtVpNewImage(PSUPHNTVPSTATE pThis, PSUPHNTVPIMAGE pImage, PMEM
      */
     RTUTF16   wc;
     unsigned  cwcDirName   = pLongName->Length / sizeof(WCHAR);
-    PCRTUTF16 pwcDirName   = &pLongName->Buffer[cwcDirName];
     PCRTUTF16 pwszFilename = &pLongName->Buffer[cwcDirName];
     while (   cwcDirName > 0
            && (wc = pwszFilename[-1]) != '\\'
@@ -1425,7 +1431,7 @@ static bool supHardNtVpFreeOrReplacePrivateExecMemory(PSUPHNTVPSTATE pThis, HAND
     NTSTATUS rcNt;
 
     /*
-     * Try figure if the entire allocation size. Free/Alloc may fail otherwise.
+     * Try figure the entire allocation size. Free/Alloc may fail otherwise.
      */
     PVOID   pvFree = pMemInfo->AllocationBase;
     SIZE_T  cbFree = pMemInfo->RegionSize + ((uintptr_t)pMemInfo->BaseAddress - (uintptr_t)pMemInfo->AllocationBase);
@@ -1444,6 +1450,9 @@ static bool supHardNtVpFreeOrReplacePrivateExecMemory(PSUPHNTVPSTATE pThis, HAND
             break;
         if (pMemInfo->AllocationBase != MemInfo2.AllocationBase)
             break;
+        if (MemInfo2.RegionSize == 0)
+            break;
+        cbFree += MemInfo2.RegionSize;
     }
     SUP_DPRINTF(("supHardNtVpFreeOrReplacePrivateExecMemory: %s exec mem at %p (LB %#zx, %p LB %#zx)\n",
                  pThis->fFlags & SUPHARDNTVP_F_EXEC_ALLOC_REPLACE_WITH_RW ? "Replacing" : "Freeing",
@@ -2204,10 +2213,11 @@ static int supHardNtVpOpenImages(PSUPHNTVPSTATE pThis)
  *
  * @returns VBox status code.
  * @param   pThis               The process scanning state structure. Details
- *                              about images are added to this.
- * @param   hProcess            The process to verify.
+ *                              about images are added to this.  The hProcess
+ *                              member holds the handle to the process that is
+ *                              to be verified.
  */
-static int supHardNtVpCheckExe(PSUPHNTVPSTATE pThis, HANDLE hProcess)
+static int supHardNtVpCheckExe(PSUPHNTVPSTATE pThis)
 {
     /*
      * Make sure there is exactly one executable image.
@@ -2241,7 +2251,7 @@ static int supHardNtVpCheckExe(PSUPHNTVPSTATE pThis, HANDLE hProcess)
         return supHardNtVpSetInfo2(pThis, VERR_SUP_VP_NO_MEMORY,
                                   "Error allocating %zu bytes for process name.", cbUniStr);
     ULONG    cbIgn = 0;
-    NTSTATUS rcNt = NtQueryInformationProcess(hProcess, ProcessImageFileName, pUniStr, cbUniStr - sizeof(WCHAR), &cbIgn);
+    NTSTATUS rcNt = NtQueryInformationProcess(pThis->hProcess, ProcessImageFileName, pUniStr, cbUniStr - sizeof(WCHAR), &cbIgn);
     if (NT_SUCCESS(rcNt))
     {
         if (supHardNtVpAreUniStringsEqual(pUniStr, &pImage->Name.UniStr))
@@ -2265,7 +2275,7 @@ static int supHardNtVpCheckExe(PSUPHNTVPSTATE pThis, HANDLE hProcess)
      * Validate the signing of the executable image.
      * This will load the fDllCharecteristics and fImageCharecteristics members we use below.
      */
-    rc = supHardNtVpVerifyImage(pThis, pImage, hProcess);
+    rc = supHardNtVpVerifyImage(pThis, pImage);
     if (RT_FAILURE(rc))
         return rc;
 
@@ -2275,15 +2285,16 @@ static int supHardNtVpCheckExe(PSUPHNTVPSTATE pThis, HANDLE hProcess)
      * older windows versions.  The cut-off seems to be Vista.
      */
     SECTION_IMAGE_INFORMATION ImageInfo;
-    rcNt = NtQueryInformationProcess(hProcess, ProcessImageInformation, &ImageInfo, sizeof(ImageInfo), NULL);
+    rcNt = NtQueryInformationProcess(pThis->hProcess, ProcessImageInformation, &ImageInfo, sizeof(ImageInfo), NULL);
     if (!NT_SUCCESS(rcNt))
     {
         if (   rcNt == STATUS_INVALID_PARAMETER
             && g_uNtVerCombined < SUP_NT_VER_VISTA
-            && hProcess != NtCurrentProcess() )
+            && pThis->hProcess != NtCurrentProcess() )
             return VINF_SUCCESS;
         return supHardNtVpSetInfo2(pThis, VERR_SUP_VP_NT_QI_PROCESS_IMG_INFO_ERROR,
-                                   "NtQueryInformationProcess/ProcessImageInformation failed: %#x hProcess=%#x", rcNt, hProcess);
+                                   "NtQueryInformationProcess/ProcessImageInformation failed: %#x hProcess=%#x",
+                                   rcNt, pThis->hProcess);
     }
     if ( !(ImageInfo.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY))
         return supHardNtVpSetInfo2(pThis, VERR_SUP_VP_EXE_MISSING_FORCE_INTEGRITY,
@@ -2317,10 +2328,11 @@ static int supHardNtVpCheckExe(PSUPHNTVPSTATE pThis, HANDLE hProcess)
  *
  * @returns VBox status code.
  * @param   pThis               The process scanning state structure. Details
- *                              about images are added to this.
- * @param   hProcess            The process to verify.
+ *                              about images are added to this.  The hProcess
+ *                              member holds the handle to the process that is
+ *                              to be verified.
  */
-static int supHardNtVpCheckDlls(PSUPHNTVPSTATE pThis, HANDLE hProcess)
+static int supHardNtVpCheckDlls(PSUPHNTVPSTATE pThis)
 {
     /*
      * Check for duplicate entries (paranoia).
@@ -2365,7 +2377,7 @@ static int supHardNtVpCheckDlls(PSUPHNTVPSTATE pThis, HANDLE hProcess)
     i = pThis->cImages;
     while (i-- > 0)
     {
-        int rc = supHardNtVpVerifyImage(pThis, &pThis->aImages[i], hProcess);
+        int rc = supHardNtVpVerifyImage(pThis, &pThis->aImages[i]);
         if (RT_FAILURE(rc))
             return rc;
     }
@@ -2433,9 +2445,9 @@ DECLHIDDEN(int) supHardenedWinVerifyProcess(HANDLE hProcess, HANDLE hThread, SUP
             if (RT_SUCCESS(rc))
                 rc = supHardNtVpOpenImages(pThis);
             if (RT_SUCCESS(rc))
-                rc = supHardNtVpCheckExe(pThis, hProcess);
+                rc = supHardNtVpCheckExe(pThis);
             if (RT_SUCCESS(rc))
-                rc = supHardNtVpCheckDlls(pThis, hProcess);
+                rc = supHardNtVpCheckDlls(pThis);
 
             if (pcFixes)
                 *pcFixes = pThis->cFixes;
diff --git a/src/VBox/HostDrivers/Support/win/SUPLib-win.cpp b/src/VBox/HostDrivers/Support/win/SUPLib-win.cpp
index 1a1b991..ace1958 100644
--- a/src/VBox/HostDrivers/Support/win/SUPLib-win.cpp
+++ b/src/VBox/HostDrivers/Support/win/SUPLib-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -259,6 +259,8 @@ int suplibOsInit(PSUPLIBDATA pThis, bool fPreInited, bool fUnrestricted, SUPINIT
             else
                 pErrInfo->pszMsg[0] = '\0';
         }
+#else
+        RT_NOREF1(penmWhat);
 #endif
         return rc;
     }
@@ -456,6 +458,8 @@ int suplibOsDeleteService(void)
         }
         CloseServiceHandle(hSMgr);
     }
+    else
+        rc = RTErrConvertFromWin32(dwErr);
     return rc;
 }
 
@@ -569,7 +573,7 @@ static int suplibOsStartService(void)
          */
         SERVICE_STATUS Status;
         BOOL fRc = QueryServiceStatus(hService, &Status);
-        Assert(fRc);
+        Assert(fRc); NOREF(fRc);
         if (Status.dwCurrentState == SERVICE_RUNNING)
             rc = VINF_ALREADY_INITIALIZED;
         else
@@ -651,6 +655,8 @@ int suplibOsTerm(PSUPLIBDATA pThis)
 
 int suplibOsIOCtl(PSUPLIBDATA pThis, uintptr_t uFunction, void *pvReq, size_t cbReq)
 {
+    RT_NOREF1(cbReq);
+
     /*
      * Issue the device I/O control.
      */
@@ -740,7 +746,7 @@ static int suplibConvertWin32Err(int rc)
 {
     /* Conversion program (link with ntdll.lib from ddk):
         #define _WIN32_WINNT 0x0501
-        #include <windows.h>
+        #include <iprt/win/windows.h>
         #include <ntstatus.h>
         #include <winternl.h>
         #include <stdio.h>
diff --git a/src/VBox/HostDrivers/Support/win/SUPR0IdcClient-win.c b/src/VBox/HostDrivers/Support/win/SUPR0IdcClient-win.c
index ef6f7cf..4dda79c 100644
--- a/src/VBox/HostDrivers/Support/win/SUPR0IdcClient-win.c
+++ b/src/VBox/HostDrivers/Support/win/SUPR0IdcClient-win.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/win/SUPR3HardenedMain-win.cpp b/src/VBox/HostDrivers/Support/win/SUPR3HardenedMain-win.cpp
index 1655f10..9dc9e74 100644
--- a/src/VBox/HostDrivers/Support/win/SUPR3HardenedMain-win.cpp
+++ b/src/VBox/HostDrivers/Support/win/SUPR3HardenedMain-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -389,6 +389,7 @@ static void     supR3HardenedWinReInstallHooks(bool fFirst);
 DECLASM(void)   supR3HardenedEarlyProcessInitThunk(void);
 
 
+#if 0 /* unused */
 
 /**
  * Simple wide char search routine.
@@ -427,6 +428,8 @@ static size_t suplibHardenedWStrLen(PCRTUTF16 pwsz)
     return pwszCur - pwsz;
 }
 
+#endif /* unused */
+
 
 /**
  * Our version of GetTickCount.
@@ -507,7 +510,7 @@ DECLHIDDEN(void *) supR3HardenedWinLoadLibrary(const char *pszName, bool fSystem
         return pvRet;
     }
     supR3HardenedFatal("RTStrToUtf16Ex failed on '%s': %Rrc", pszName, rc);
-    return NULL;
+    /* not reached */
 }
 
 
@@ -2107,8 +2110,7 @@ static VOID CALLBACK supR3HardenedDllNotificationCallback(ULONG ulReason, PCLDR_
             supR3HardenedFatal("supR3HardenedDllNotificationCallback: NtCreateFile failed on '%.*ls' / '%.*ls': %#x\n",
                                pData->Loaded.FullDllName->Length / sizeof(WCHAR), pData->Loaded.FullDllName->Buffer,
                                NtPathUniStr.Length / sizeof(WCHAR), NtPathUniStr.Buffer, rcNt);
-            RTNtPathFree(&NtPathUniStr, &hRootDir);
-            return;
+            /* not reached */
         }
 
         /* Do the screening. */
@@ -2124,8 +2126,7 @@ static VOID CALLBACK supR3HardenedDllNotificationCallback(ULONG ulReason, PCLDR_
             supR3HardenedFatal("supR3HardenedDllNotificationCallback: supR3HardenedScreenImage failed on '%.*ls' / '%.*ls': %#x\n",
                                pData->Loaded.FullDllName->Length / sizeof(WCHAR), pData->Loaded.FullDllName->Buffer,
                                NtPathUniStr.Length / sizeof(WCHAR), NtPathUniStr.Buffer, rcNt);
-            RTNtPathFree(&NtPathUniStr, &hRootDir);
-            return;
+            /* not reached */
         }
         RTNtPathFree(&NtPathUniStr, &hRootDir);
     }
@@ -2242,8 +2243,7 @@ static DECLCALLBACK(int) supR3HardenedWinParentWatcherThread(RTTHREAD hSelf, voi
     NtClose(hProcWait);
     SUP_DPRINTF(("supR3HardenedWinParentWatcherThread: Quitting: ExitCode=%#x rcNt=%#x\n", BasicInfo.ExitStatus, rcNt));
     suplibHardenedExit((RTEXITCODE)BasicInfo.ExitStatus);
-
-    return VINF_SUCCESS; /* won't be reached. */
+    /* not reached */
 }
 
 
@@ -3098,7 +3098,7 @@ static PRTUTF16 supR3HardNtChildConstructCmdLine(PUNICODE_STRING pString, int iW
     }
 
     *pwszDst = '\0';
-    SUPR3HARDENED_ASSERT(pwszDst - pwszCmdLine == cwcCmdLine);
+    SUPR3HARDENED_ASSERT((uintptr_t)(pwszDst - pwszCmdLine) == cwcCmdLine);
 
     if (pString)
     {
@@ -3167,7 +3167,7 @@ static void supR3HardenedWinKillChild(HANDLE hProcess, const char *pszWhere, int
      */
     va_start(va, pszFormat);
     supR3HardenedFatalMsgV(pszWhere, kSupInitOp_Misc, rc, pszFormat, va);
-    va_end(va);
+    /* not reached */
 }
 
 
@@ -3496,7 +3496,7 @@ static void supR3HardNtChildPurify(PSUPR3HARDNTCHILD pThis)
     uint64_t uMsTsOuterStart = supR3HardenedWinGetMilliTS();
     uint32_t cMsFudge        = g_fSupAdversaries ? 512 : 256;
     uint32_t cTotalFixes     = 0;
-    uint32_t cFixes;
+    uint32_t cFixes          = 0; /* (MSC wrongly thinks this maybe used uninitialized) */
     for (uint32_t iLoop = 0; iLoop < 16; iLoop++)
     {
         /*
@@ -3894,7 +3894,7 @@ static void supR3HardNtChildGatherData(PSUPR3HARDNTCHILD pThis)
  * @param   iWhich              Which respawn we're to check for, 1 being the
  *                              first one, and 2 the second and final.
  */
-static void supR3HardenedWinDoReSpawn(int iWhich)
+static DECL_NO_RETURN(void) supR3HardenedWinDoReSpawn(int iWhich)
 {
     NTSTATUS                        rcNt;
     PPEB                            pPeb              = NtCurrentPeb();
@@ -4126,7 +4126,8 @@ static void supR3HardenedWinDoReSpawn(int iWhich)
      * Wait for the process to terminate.
      */
     supR3HardNtChildWaitFor(&This, kSupR3WinChildReq_End, RT_INDEFINITE_WAIT, "the end");
-    SUPR3HARDENED_ASSERT(false); /* We're not supposed to get here! */
+    supR3HardenedFatal("supR3HardenedWinDoReSpawn: supR3HardNtChildWaitFor unexpectedly returned!\n");
+    /* not reached*/
 }
 
 
@@ -4187,7 +4188,6 @@ static void supR3HardenedWinLogObjDir(const char *pszDir)
         POBJECT_DIRECTORY_INFORMATION pObjDir = (POBJECT_DIRECTORY_INFORMATION)abBuffer;
         while (pObjDir->Name.Length != 0)
         {
-            WCHAR wcSaved = pObjDir->Name.Buffer[pObjDir->Name.Length / sizeof(WCHAR)];
             SUP_DPRINTF(("  %.*ls  %.*ls\n",
                          pObjDir->TypeName.Length / sizeof(WCHAR), pObjDir->TypeName.Buffer,
                          pObjDir->Name.Length / sizeof(WCHAR), pObjDir->Name.Buffer));
@@ -4562,8 +4562,7 @@ DECLHIDDEN(int) supR3HardenedWinReSpawn(int iWhich)
      * Respawn the process with kernel protection for the new process.
      */
     supR3HardenedWinDoReSpawn(iWhich);
-    SUPR3HARDENED_ASSERT(false); /* We're not supposed to get here! */
-    return RTEXITCODE_FAILURE;
+    /* not reached! */
 }
 
 
@@ -4966,6 +4965,8 @@ static char **suplibCommandLineToArgvWStub(PCRTUTF16 pawcCmdLine, size_t cwcCmdL
  */
 static void supR3HardenedLogFileInfo(PCRTUTF16 pwszFile, bool fAdversarial)
 {
+    RT_NOREF1(fAdversarial);
+
     /*
      * Open the file.
      */
@@ -5657,7 +5658,7 @@ DECLHIDDEN(void) supR3HardenedWinReportErrorToParent(const char *pszWhere, SUPIN
     {
         LARGE_INTEGER Timeout;
         Timeout.QuadPart = -300000000; /* 30 second */
-        NTSTATUS rcNt = NtWaitForSingleObject(g_ProcParams.hEvtChild, FALSE /*Alertable*/, &Timeout);
+        /*NTSTATUS rcNt =*/ NtWaitForSingleObject(g_ProcParams.hEvtChild, FALSE /*Alertable*/, &Timeout);
     }
 }
 
diff --git a/src/VBox/HostDrivers/Support/win/SUPR3HardenedMainA-win.asm b/src/VBox/HostDrivers/Support/win/SUPR3HardenedMainA-win.asm
index ebbe01f..bb7dea4 100644
--- a/src/VBox/HostDrivers/Support/win/SUPR3HardenedMainA-win.asm
+++ b/src/VBox/HostDrivers/Support/win/SUPR3HardenedMainA-win.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2012-2015 Oracle Corporation
+; Copyright (C) 2012-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/win/SUPR3HardenedMainImports-win.cpp b/src/VBox/HostDrivers/Support/win/SUPR3HardenedMainImports-win.cpp
index 9bd8fdb..93b02ea 100644
--- a/src/VBox/HostDrivers/Support/win/SUPR3HardenedMainImports-win.cpp
+++ b/src/VBox/HostDrivers/Support/win/SUPR3HardenedMainImports-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -853,6 +853,6 @@ DECLHIDDEN(PFNRT) supR3HardenedWinGetRealDllSymbol(const char *pszDll, const cha
         }
 
     supR3HardenedFatal("supR3HardenedWinGetRealDllSymbol: Unknown DLL %s (proc: %s)\n", pszDll, pszProcedure);
-    return NULL;
+    /* not reached */
 }
 
diff --git a/src/VBox/HostDrivers/Support/win/SUPR3HardenedNoCrt-win.cpp b/src/VBox/HostDrivers/Support/win/SUPR3HardenedNoCrt-win.cpp
index d943d4a..da0a0fc 100644
--- a/src/VBox/HostDrivers/Support/win/SUPR3HardenedNoCrt-win.cpp
+++ b/src/VBox/HostDrivers/Support/win/SUPR3HardenedNoCrt-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -140,7 +140,7 @@ static void supR3HardenedEarlyCompact(void)
             g_cSupR3HardenedEarlyHeaps--;
 
             NTSTATUS rcNt = NtFreeVirtualMemory(NtCurrentProcess(), &pvMem, &cbMem, MEM_RELEASE);
-            Assert(NT_SUCCESS(rcNt));
+            Assert(NT_SUCCESS(rcNt)); RT_NOREF_PV(rcNt);
             SUP_DPRINTF(("supR3HardenedEarlyCompact: Removed heap %#u (%#p LB %#zx)\n", iHeap, pvMem, cbMem));
         }
 }
@@ -229,7 +229,7 @@ static HANDLE supR3HardenedHeapInit(void)
     }
 
     supR3HardenedFatal("RtlCreateHeap failed.\n");
-    return NULL;
+    /* not reached */
 }
 
 
@@ -266,6 +266,7 @@ RTDECL(void) RTMemTmpFree(void *pv) RT_NO_THROW_DEF
 
 RTDECL(void *) RTMemAllocTag(size_t cb, const char *pszTag) RT_NO_THROW_DEF
 {
+    RT_NOREF1(pszTag);
     HANDLE hHeap = g_hSupR3HardenedHeap;
     if (!hHeap)
     {
@@ -284,6 +285,7 @@ RTDECL(void *) RTMemAllocTag(size_t cb, const char *pszTag) RT_NO_THROW_DEF
 
 RTDECL(void *) RTMemAllocZTag(size_t cb, const char *pszTag) RT_NO_THROW_DEF
 {
+    RT_NOREF1(pszTag);
     HANDLE hHeap = g_hSupR3HardenedHeap;
     if (!hHeap)
     {
diff --git a/src/VBox/HostDrivers/Support/win/SUPSvc-win.cpp b/src/VBox/HostDrivers/Support/win/SUPSvc-win.cpp
index d575941..4ac2e75 100644
--- a/src/VBox/HostDrivers/Support/win/SUPSvc-win.cpp
+++ b/src/VBox/HostDrivers/Support/win/SUPSvc-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #define LOG_GROUP   LOG_GROUP_SUP
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 #include <VBox/log.h>
 #include <VBox/version.h>
diff --git a/src/VBox/HostDrivers/Support/win/VBoxDrv.inf b/src/VBox/HostDrivers/Support/win/VBoxDrv.inf
index 715cd27..a279ca0 100644
--- a/src/VBox/HostDrivers/Support/win/VBoxDrv.inf
+++ b/src/VBox/HostDrivers/Support/win/VBoxDrv.inf
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/win/VBoxDrv.rc b/src/VBox/HostDrivers/Support/win/VBoxDrv.rc
index 43c63e0..9cb9f90 100644
--- a/src/VBox/HostDrivers/Support/win/VBoxDrv.rc
+++ b/src/VBox/HostDrivers/Support/win/VBoxDrv.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/win/VBoxSupLib-win.cpp b/src/VBox/HostDrivers/Support/win/VBoxSupLib-win.cpp
index bc3e372..47c7b23 100644
--- a/src/VBox/HostDrivers/Support/win/VBoxSupLib-win.cpp
+++ b/src/VBox/HostDrivers/Support/win/VBoxSupLib-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -41,6 +41,8 @@
 extern "C" __declspec(dllexport)
 BOOL __stdcall DllMainEntrypoint(HANDLE hModule, DWORD dwReason, PVOID pvReserved)
 {
+    RT_NOREF1(pvReserved);
+
     switch (dwReason)
     {
         /*
diff --git a/src/VBox/HostDrivers/Support/win/VBoxSupLib.rc b/src/VBox/HostDrivers/Support/win/VBoxSupLib.rc
index 0e01deb..e5b7aef 100644
--- a/src/VBox/HostDrivers/Support/win/VBoxSupLib.rc
+++ b/src/VBox/HostDrivers/Support/win/VBoxSupLib.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxNetAdp/Makefile.kmk b/src/VBox/HostDrivers/VBoxNetAdp/Makefile.kmk
index 4827fac..49be895 100644
--- a/src/VBox/HostDrivers/VBoxNetAdp/Makefile.kmk
+++ b/src/VBox/HostDrivers/VBoxNetAdp/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2009-2015 Oracle Corporation
+# Copyright (C) 2009-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxNetAdp/VBoxNetAdp.c b/src/VBox/HostDrivers/VBoxNetAdp/VBoxNetAdp.c
index a616cb1..f2d7252 100644
--- a/src/VBox/HostDrivers/VBoxNetAdp/VBoxNetAdp.c
+++ b/src/VBox/HostDrivers/VBoxNetAdp/VBoxNetAdp.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxNetAdp/VBoxNetAdpInternal.h b/src/VBox/HostDrivers/VBoxNetAdp/VBoxNetAdpInternal.h
index 5b871ba..547b32d 100644
--- a/src/VBox/HostDrivers/VBoxNetAdp/VBoxNetAdpInternal.h
+++ b/src/VBox/HostDrivers/VBoxNetAdp/VBoxNetAdpInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -76,7 +76,7 @@ enum VBoxNetAdpState
     kVBoxNetAdpState_Invalid,
     kVBoxNetAdpState_Transitional,
     kVBoxNetAdpState_Active,
-    kVBoxNetAdpState_U32Hack = 0xFFFFFFFF
+    kVBoxNetAdpState_32BitHack = 0x7FFFFFFF
 };
 typedef enum VBoxNetAdpState VBOXNETADPSTATE;
 
diff --git a/src/VBox/HostDrivers/VBoxNetAdp/darwin/VBoxNetAdp-darwin.cpp b/src/VBox/HostDrivers/VBoxNetAdp/darwin/VBoxNetAdp-darwin.cpp
index 78f07c3..33324f3 100644
--- a/src/VBox/HostDrivers/VBoxNetAdp/darwin/VBoxNetAdp-darwin.cpp
+++ b/src/VBox/HostDrivers/VBoxNetAdp/darwin/VBoxNetAdp-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -123,8 +123,8 @@ static struct cdevsw    g_ChDev =
     /*.d_select   = */eno_select,
     /*.d_mmap     = */eno_mmap,
     /*.d_strategy = */eno_strat,
-    /*.d_getc     = */eno_getc,
-    /*.d_putc     = */eno_putc,
+    /*.d_getc     = */(void *)(uintptr_t)&enodev, //eno_getc,
+    /*.d_putc     = */(void *)(uintptr_t)&enodev, //eno_putc,
     /*.d_type     = */0
 };
 
@@ -303,7 +303,6 @@ int vboxNetAdpOsCreate(PVBOXNETADP pThis, PCRTMAC pMACAddress)
 
 void vboxNetAdpOsDestroy(PVBOXNETADP pThis)
 {
-    u_int32_t i;
     /* Bring down the interface */
     int rc = VINF_SUCCESS;
     errno_t err;
@@ -343,10 +342,13 @@ void vboxNetAdpOsDestroy(PVBOXNETADP pThis)
  */
 static int VBoxNetAdpDarwinOpen(dev_t Dev, int fFlags, int fDevType, struct proc *pProcess)
 {
+    RT_NOREF(Dev, fFlags, fDevType, pProcess);
+#ifdef LOG_ENABLED
     char szName[128];
     szName[0] = '\0';
     proc_name(proc_pid(pProcess), szName, sizeof(szName));
     Log(("VBoxNetAdpDarwinOpen: pid=%d '%s'\n", proc_pid(pProcess), szName));
+#endif
     return 0;
 }
 
@@ -355,6 +357,7 @@ static int VBoxNetAdpDarwinOpen(dev_t Dev, int fFlags, int fDevType, struct proc
  */
 static int VBoxNetAdpDarwinClose(dev_t Dev, int fFlags, int fDevType, struct proc *pProcess)
 {
+    RT_NOREF(Dev, fFlags, fDevType, pProcess);
     Log(("VBoxNetAdpDarwinClose: pid=%d\n", proc_pid(pProcess)));
     return 0;
 }
@@ -371,6 +374,7 @@ static int VBoxNetAdpDarwinClose(dev_t Dev, int fFlags, int fDevType, struct pro
  */
 static int VBoxNetAdpDarwinIOCtl(dev_t Dev, u_long iCmd, caddr_t pData, int fFlags, struct proc *pProcess)
 {
+    RT_NOREF(Dev, fFlags, pProcess);
     uint32_t cbReq = IOCPARM_LEN(iCmd);
     PVBOXNETADPREQ pReq = (PVBOXNETADPREQ)pData;
     int rc;
@@ -439,6 +443,7 @@ int  vboxNetAdpOsInit(PVBOXNETADP pThis)
  */
 static kern_return_t    VBoxNetAdpDarwinStart(struct kmod_info *pKModInfo, void *pvData)
 {
+    RT_NOREF(pKModInfo, pvData);
     int rc;
 
     /*
@@ -491,6 +496,7 @@ static kern_return_t    VBoxNetAdpDarwinStart(struct kmod_info *pKModInfo, void
  */
 static kern_return_t VBoxNetAdpDarwinStop(struct kmod_info *pKModInfo, void *pvData)
 {
+    RT_NOREF(pKModInfo, pvData);
     Log(("VBoxNetAdpDarwinStop\n"));
 
     vboxNetAdpShutdown();
diff --git a/src/VBox/HostDrivers/VBoxNetAdp/linux/VBoxNetAdp-linux.c b/src/VBox/HostDrivers/VBoxNetAdp/linux/VBoxNetAdp-linux.c
index f4c7dd5..b36f8ba 100644
--- a/src/VBox/HostDrivers/VBoxNetAdp/linux/VBoxNetAdp-linux.c
+++ b/src/VBox/HostDrivers/VBoxNetAdp/linux/VBoxNetAdp-linux.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxNetAdp/solaris/VBoxNetAdp-solaris.c b/src/VBox/HostDrivers/VBoxNetAdp/solaris/VBoxNetAdp-solaris.c
index 7a46774..e674261 100644
--- a/src/VBox/HostDrivers/VBoxNetAdp/solaris/VBoxNetAdp-solaris.c
+++ b/src/VBox/HostDrivers/VBoxNetAdp/solaris/VBoxNetAdp-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Audio_old/Makefile.kup b/src/VBox/HostDrivers/VBoxNetAdp/win/Makefile.kup
similarity index 100%
copy from src/VBox/Devices/Audio_old/Makefile.kup
copy to src/VBox/HostDrivers/VBoxNetAdp/win/Makefile.kup
diff --git a/src/VBox/HostDrivers/VBoxNetAdp/win/VBoxNetAdp-win.cpp b/src/VBox/HostDrivers/VBoxNetAdp/win/VBoxNetAdp-win.cpp
index 2708e3b..e16b50d 100644
--- a/src/VBox/HostDrivers/VBoxNetAdp/win/VBoxNetAdp-win.cpp
+++ b/src/VBox/HostDrivers/VBoxNetAdp/win/VBoxNetAdp-win.cpp
@@ -3,7 +3,7 @@
  * VBoxNetAdp-win.cpp - NDIS6 Host-only Networking Driver, Windows-specific code.
  */
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -22,9 +22,7 @@
 #include <iprt/initterm.h>
 #include <iprt/assert.h>
 
-RT_C_DECLS_BEGIN
-#include <ndis.h>
-RT_C_DECLS_END
+#include <iprt/nt/ndis.h>
 
 #include "VBoxNetAdp-win.h"
 #include "VBox/VBoxNetCmn-win.h"
@@ -79,20 +77,21 @@ typedef VBOXNETADP_ADAPTER *PVBOXNETADP_ADAPTER;
 
 static NTSTATUS vboxNetAdpWinDevDispatch(IN PDEVICE_OBJECT pDevObj, IN PIRP pIrp)
 {
-    PIO_STACK_LOCATION pIrpSl = IoGetCurrentIrpStackLocation(pIrp);;
+    RT_NOREF1(pDevObj);
+    PIO_STACK_LOCATION pIrpSl = IoGetCurrentIrpStackLocation(pIrp);
     NTSTATUS Status = STATUS_SUCCESS;
 
     switch (pIrpSl->MajorFunction)
     {
         case IRP_MJ_DEVICE_CONTROL:
-            Status = STATUS_NOT_SUPPORTED; // TODO: add/remove ioctls
+            Status = STATUS_NOT_SUPPORTED; /// @todo add/remove ioctls
             break;
         case IRP_MJ_CREATE:
         case IRP_MJ_CLEANUP:
         case IRP_MJ_CLOSE:
             break;
         default:
-            Assert(0);
+            AssertFailed();
             break;
     }
 
@@ -197,7 +196,7 @@ DECLHIDDEN(NDIS_STATUS) vboxNetAdpWinAllocAdapter(NDIS_HANDLE hAdapter, PVBOXNET
         NdisZeroMemory(pAdapter, sizeof(VBOXNETADP_ADAPTER));
         pAdapter->hAdapter = hAdapter;
         pAdapter->pGlobals = &g_VBoxNetAdpGlobals;
-        // TODO: Use netadp structure instead!
+        /// @todo Use netadp structure instead!
     /* Use a locally administered version of the OUI we use for the guest NICs. */
     pAdapter->MacAddr.au8[0] = 0x08 | 2;
     pAdapter->MacAddr.au8[1] = 0x00;
@@ -207,7 +206,7 @@ DECLHIDDEN(NDIS_STATUS) vboxNetAdpWinAllocAdapter(NDIS_HANDLE hAdapter, PVBOXNET
     pAdapter->MacAddr.au8[4] = (uIfIndex >> 8) & 0xFF;
     pAdapter->MacAddr.au8[5] = uIfIndex & 0xFF;
 
-        //TODO: Statistics?
+        /// @todo Statistics?
 
         *ppAdapter = pAdapter;
     }
@@ -222,6 +221,7 @@ DECLHIDDEN(void) vboxNetAdpWinFreeAdapter(PVBOXNETADP_ADAPTER pAdapter)
 
 DECLINLINE(NDIS_MEDIA_CONNECT_STATE) vboxNetAdpWinGetConnectState(PVBOXNETADP_ADAPTER pAdapter)
 {
+    RT_NOREF1(pAdapter);
     return MediaConnectStateConnected;
 }
 
@@ -230,6 +230,7 @@ DECLHIDDEN(NDIS_STATUS) vboxNetAdpWinInitializeEx(IN NDIS_HANDLE NdisMiniportHan
                                                   IN NDIS_HANDLE MiniportDriverContext,
                                                   IN PNDIS_MINIPORT_INIT_PARAMETERS MiniportInitParameters)
 {
+    RT_NOREF1(MiniportDriverContext);
     PVBOXNETADP_ADAPTER pAdapter = NULL;
     NDIS_STATUS Status = NDIS_STATUS_SUCCESS;
 
@@ -263,11 +264,11 @@ DECLHIDDEN(NDIS_STATUS) vboxNetAdpWinInitializeEx(IN NDIS_HANDLE NdisMiniportHan
             break;
         }
 
-        // TODO: Registry?
+        /// @todo Registry?
 
-        // TODO: WDM stack?
+        /// @todo WDM stack?
 
-        // TODO: DPC?
+        /// @todo DPC?
 
         GAttrs.Header.Type = NDIS_OBJECT_TYPE_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES;
         GAttrs.Header.Size = NDIS_SIZEOF_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES_REVISION_1;
@@ -275,17 +276,17 @@ DECLHIDDEN(NDIS_STATUS) vboxNetAdpWinInitializeEx(IN NDIS_HANDLE NdisMiniportHan
 
         GAttrs.MediaType = NdisMedium802_3;
         GAttrs.PhysicalMediumType = NdisPhysicalMediumUnspecified;
-        GAttrs.MtuSize = 1500; //TODO
+        GAttrs.MtuSize = 1500; /// @todo
         GAttrs.MaxXmitLinkSpeed = VBOXNETADPWIN_LINK_SPEED;
         GAttrs.XmitLinkSpeed = VBOXNETADPWIN_LINK_SPEED;
         GAttrs.MaxRcvLinkSpeed = VBOXNETADPWIN_LINK_SPEED;
         GAttrs.RcvLinkSpeed = VBOXNETADPWIN_LINK_SPEED;
         GAttrs.MediaConnectState = vboxNetAdpWinGetConnectState(pAdapter);
         GAttrs.MediaDuplexState = MediaDuplexStateFull;
-        GAttrs.LookaheadSize = 1500; //TODO
+        GAttrs.LookaheadSize = 1500; /// @todo
         GAttrs.MacOptions = VBOXNETADP_MAC_OPTIONS;
         GAttrs.SupportedPacketFilters = VBOXNETADP_SUPPORTED_FILTERS;
-        GAttrs.MaxMulticastListSize = 32; //TODO
+        GAttrs.MaxMulticastListSize = 32; /// @todo
 
         GAttrs.MacAddressLength = ETH_LENGTH_OF_ADDRESS;
         Assert(GAttrs.MacAddressLength == sizeof(pAdapter->MacAddr));
@@ -329,9 +330,10 @@ DECLHIDDEN(NDIS_STATUS) vboxNetAdpWinInitializeEx(IN NDIS_HANDLE NdisMiniportHan
 DECLHIDDEN(VOID) vboxNetAdpWinHaltEx(IN NDIS_HANDLE MiniportAdapterContext,
                                      IN NDIS_HALT_ACTION HaltAction)
 {
+    RT_NOREF1(HaltAction);
     PVBOXNETADP_ADAPTER pAdapter = (PVBOXNETADP_ADAPTER)MiniportAdapterContext;
     LogFlow(("==>vboxNetAdpWinHaltEx\n"));
-    // TODO: Stop something?
+    /// @todo Stop something?
     if (pAdapter)
         vboxNetAdpWinFreeAdapter(pAdapter);
     LogFlow(("<==vboxNetAdpWinHaltEx\n"));
@@ -340,6 +342,7 @@ DECLHIDDEN(VOID) vboxNetAdpWinHaltEx(IN NDIS_HANDLE MiniportAdapterContext,
 DECLHIDDEN(NDIS_STATUS) vboxNetAdpWinPause(IN NDIS_HANDLE MiniportAdapterContext,
                                            IN PNDIS_MINIPORT_PAUSE_PARAMETERS MiniportPauseParameters)
 {
+    RT_NOREF2(MiniportAdapterContext, MiniportPauseParameters);
     NDIS_STATUS Status = NDIS_STATUS_SUCCESS;
     LogFlow(("==>vboxNetAdpWinPause\n"));
     LogFlow(("<==vboxNetAdpWinPause: status=0x%x\n", Status));
@@ -349,6 +352,7 @@ DECLHIDDEN(NDIS_STATUS) vboxNetAdpWinPause(IN NDIS_HANDLE MiniportAdapterContext
 DECLHIDDEN(NDIS_STATUS) vboxNetAdpWinRestart(IN NDIS_HANDLE MiniportAdapterContext,
                                              IN PNDIS_MINIPORT_RESTART_PARAMETERS MiniportRestartParameters)
 {
+    RT_NOREF2(MiniportAdapterContext, MiniportRestartParameters);
     NDIS_STATUS Status = NDIS_STATUS_SUCCESS;
     LogFlow(("==>vboxNetAdpWinRestart\n"));
     LogFlow(("<==vboxNetAdpWinRestart: status=0x%x\n", Status));
@@ -398,7 +402,7 @@ DECLHIDDEN(NDIS_STATUS) vboxNetAdpWinOidRqQuery(PVBOXNETADP_ADAPTER pAdapter,
             break;
         case OID_GEN_RECEIVE_BUFFER_SPACE:
         case OID_GEN_TRANSMIT_BUFFER_SPACE:
-            // TODO: Make configurable
+            /// @todo Make configurable
             ulTmp = VBOXNETADP_MAX_FRAME_SIZE * 40;
             break;
         case OID_GEN_STATISTICS:
@@ -413,7 +417,7 @@ DECLHIDDEN(NDIS_STATUS) vboxNetAdpWinOidRqQuery(PVBOXNETADP_ADAPTER pAdapter,
             pStats->Header.Type = NDIS_OBJECT_TYPE_DEFAULT;
             pStats->Header.Revision = NDIS_STATISTICS_INFO_REVISION_1;
             pStats->Header.Size = NDIS_SIZEOF_STATISTICS_INFO_REVISION_1;
-            // TODO: We need some stats, don't we?
+            /// @todo We need some stats, don't we?
             break;
         }
         case OID_GEN_VENDOR_DESCRIPTION:
@@ -470,6 +474,7 @@ DECLHIDDEN(NDIS_STATUS) vboxNetAdpWinOidRqQuery(PVBOXNETADP_ADAPTER pAdapter,
 DECLHIDDEN(NDIS_STATUS) vboxNetAdpWinOidRqSet(PVBOXNETADP_ADAPTER pAdapter,
                                               PNDIS_OID_REQUEST pRequest)
 {
+    RT_NOREF1(pAdapter);
     NDIS_STATUS Status = NDIS_STATUS_SUCCESS;
     struct _NDIS_OID_REQUEST::_REQUEST_DATA::_SET *pSet = &pRequest->DATA.SET_INFORMATION;
 
@@ -484,7 +489,7 @@ DECLHIDDEN(NDIS_STATUS) vboxNetAdpWinOidRqSet(PVBOXNETADP_ADAPTER pAdapter,
                 Status = NDIS_STATUS_INVALID_LENGTH;
                 break;
             }
-            // TODO: For the time being we simply ignore lookahead settings.
+            /// @todo For the time being we simply ignore lookahead settings.
             pSet->BytesRead = sizeof(ULONG);
             Status = NDIS_STATUS_SUCCESS;
             break;
@@ -496,7 +501,7 @@ DECLHIDDEN(NDIS_STATUS) vboxNetAdpWinOidRqSet(PVBOXNETADP_ADAPTER pAdapter,
                 Status = NDIS_STATUS_INVALID_LENGTH;
                 break;
             }
-            // TODO: For the time being we simply ignore packet filter settings.
+            /// @todo For the time being we simply ignore packet filter settings.
             pSet->BytesRead = pSet->InformationBufferLength;
             Status = NDIS_STATUS_SUCCESS;
             break;
@@ -564,6 +569,7 @@ DECLHIDDEN(VOID) vboxNetAdpWinSendNetBufferLists(IN NDIS_HANDLE MiniportAdapterC
                                                  IN NDIS_PORT_NUMBER PortNumber,
                                                  IN ULONG SendFlags)
 {
+    RT_NOREF1(PortNumber);
     PVBOXNETADP_ADAPTER pAdapter = (PVBOXNETADP_ADAPTER)MiniportAdapterContext;
     LogFlow(("==>vboxNetAdpWinSendNetBufferLists\n"));
     PNET_BUFFER_LIST pNbl = NetBufferLists;
@@ -579,7 +585,7 @@ DECLHIDDEN(VOID) vboxNetAdpWinReturnNetBufferLists(IN NDIS_HANDLE MiniportAdapte
                                                    IN PNET_BUFFER_LIST NetBufferLists,
                                                    IN ULONG ReturnFlags)
 {
-    PVBOXNETADP_ADAPTER pAdapter = (PVBOXNETADP_ADAPTER)MiniportAdapterContext;
+    RT_NOREF3(MiniportAdapterContext, NetBufferLists, ReturnFlags);
     LogFlow(("==>vboxNetAdpWinReturnNetBufferLists\n"));
     Log(("vboxNetAdpWinReturnNetBufferLists: We should not be here!\n"));
     LogFlow(("<==vboxNetAdpWinReturnNetBufferLists\n"));
@@ -588,7 +594,7 @@ DECLHIDDEN(VOID) vboxNetAdpWinReturnNetBufferLists(IN NDIS_HANDLE MiniportAdapte
 DECLHIDDEN(VOID) vboxNetAdpWinCancelSend(IN NDIS_HANDLE MiniportAdapterContext,
                                          IN PVOID CancelId)
 {
-    PVBOXNETADP_ADAPTER pAdapter = (PVBOXNETADP_ADAPTER)MiniportAdapterContext;
+    RT_NOREF2(MiniportAdapterContext, CancelId);
     LogFlow(("==>vboxNetAdpWinCancelSend\n"));
     Log(("vboxNetAdpWinCancelSend: We should not be here!\n"));
     LogFlow(("<==vboxNetAdpWinCancelSend\n"));
@@ -597,7 +603,7 @@ DECLHIDDEN(VOID) vboxNetAdpWinCancelSend(IN NDIS_HANDLE MiniportAdapterContext,
 
 DECLHIDDEN(BOOLEAN) vboxNetAdpWinCheckForHangEx(IN NDIS_HANDLE MiniportAdapterContext)
 {
-    PVBOXNETADP_ADAPTER pAdapter = (PVBOXNETADP_ADAPTER)MiniportAdapterContext;
+    RT_NOREF1(MiniportAdapterContext);
     LogFlow(("==>vboxNetAdpWinCheckForHangEx\n"));
     LogFlow(("<==vboxNetAdpWinCheckForHangEx return false\n"));
     return FALSE;
@@ -606,6 +612,7 @@ DECLHIDDEN(BOOLEAN) vboxNetAdpWinCheckForHangEx(IN NDIS_HANDLE MiniportAdapterCo
 DECLHIDDEN(NDIS_STATUS) vboxNetAdpWinResetEx(IN NDIS_HANDLE MiniportAdapterContext,
                                              OUT PBOOLEAN AddressingReset)
 {
+    RT_NOREF2(MiniportAdapterContext, AddressingReset);
     NDIS_STATUS Status = NDIS_STATUS_SUCCESS;
     LogFlow(("==>vboxNetAdpWinResetEx\n"));
     LogFlow(("<==vboxNetAdpWinResetEx: status=0x%x\n", Status));
@@ -615,7 +622,7 @@ DECLHIDDEN(NDIS_STATUS) vboxNetAdpWinResetEx(IN NDIS_HANDLE MiniportAdapterConte
 DECLHIDDEN(VOID) vboxNetAdpWinDevicePnPEventNotify(IN NDIS_HANDLE MiniportAdapterContext,
                                                    IN PNET_DEVICE_PNP_EVENT NetDevicePnPEvent)
 {
-    PVBOXNETADP_ADAPTER pAdapter = (PVBOXNETADP_ADAPTER)MiniportAdapterContext;
+    RT_NOREF2(MiniportAdapterContext, NetDevicePnPEvent);
     LogFlow(("==>vboxNetAdpWinDevicePnPEventNotify\n"));
     Log(("vboxNetAdpWinDevicePnPEventNotify: PnP event=%d\n", NetDevicePnPEvent->DevicePnPEvent));
     LogFlow(("<==vboxNetAdpWinDevicePnPEventNotify\n"));
@@ -625,7 +632,7 @@ DECLHIDDEN(VOID) vboxNetAdpWinDevicePnPEventNotify(IN NDIS_HANDLE MiniportAdapte
 DECLHIDDEN(VOID) vboxNetAdpWinShutdownEx(IN NDIS_HANDLE MiniportAdapterContext,
                                          IN NDIS_SHUTDOWN_ACTION ShutdownAction)
 {
-    PVBOXNETADP_ADAPTER pAdapter = (PVBOXNETADP_ADAPTER)MiniportAdapterContext;
+    RT_NOREF2(MiniportAdapterContext, ShutdownAction);
     LogFlow(("==>vboxNetAdpWinShutdownEx\n"));
     Log(("vboxNetAdpWinShutdownEx: action=%d\n", ShutdownAction));
     LogFlow(("<==vboxNetAdpWinShutdownEx\n"));
@@ -634,7 +641,7 @@ DECLHIDDEN(VOID) vboxNetAdpWinShutdownEx(IN NDIS_HANDLE MiniportAdapterContext,
 DECLHIDDEN(VOID) vboxNetAdpWinCancelOidRequest(IN NDIS_HANDLE MiniportAdapterContext,
                                                IN PVOID RequestId)
 {
-    PVBOXNETADP_ADAPTER pAdapter = (PVBOXNETADP_ADAPTER)MiniportAdapterContext;
+    RT_NOREF2(MiniportAdapterContext, RequestId);
     LogFlow(("==>vboxNetAdpWinCancelOidRequest\n"));
     Log(("vboxNetAdpWinCancelOidRequest: req id=%p\n", RequestId));
     LogFlow(("<==vboxNetAdpWinCancelOidRequest\n"));
@@ -644,6 +651,7 @@ DECLHIDDEN(VOID) vboxNetAdpWinCancelOidRequest(IN NDIS_HANDLE MiniportAdapterCon
 
 DECLHIDDEN(VOID) vboxNetAdpWinUnload(IN PDRIVER_OBJECT DriverObject)
 {
+    RT_NOREF1(DriverObject);
     LogFlow(("==>vboxNetAdpWinUnload\n"));
     //vboxNetAdpWinDevDestroy(&g_VBoxNetAdpGlobals);
     if (g_VBoxNetAdpGlobals.hMiniportDriver)
diff --git a/src/VBox/HostDrivers/VBoxNetAdp/win/VBoxNetAdp-win.h b/src/VBox/HostDrivers/VBoxNetAdp/win/VBoxNetAdp-win.h
index e378c85..5787117 100644
--- a/src/VBox/HostDrivers/VBoxNetAdp/win/VBoxNetAdp-win.h
+++ b/src/VBox/HostDrivers/VBoxNetAdp/win/VBoxNetAdp-win.h
@@ -3,7 +3,7 @@
  * VBoxNetAdp-win.h - Host-only Miniport Driver, Windows-specific code.
  */
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxNetAdp/win/VBoxNetAdp-win.rc b/src/VBox/HostDrivers/VBoxNetAdp/win/VBoxNetAdp-win.rc
index faaa63a..f100bc4 100644
--- a/src/VBox/HostDrivers/VBoxNetAdp/win/VBoxNetAdp-win.rc
+++ b/src/VBox/HostDrivers/VBoxNetAdp/win/VBoxNetAdp-win.rc
@@ -3,7 +3,7 @@
  * VBoxNetAdp6 - Resource file containing version info and icon.
  */
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxNetAdp/win/VBoxNetAdp6.inf b/src/VBox/HostDrivers/VBoxNetAdp/win/VBoxNetAdp6.inf
index 83b4931..2e96662 100644
--- a/src/VBox/HostDrivers/VBoxNetAdp/win/VBoxNetAdp6.inf
+++ b/src/VBox/HostDrivers/VBoxNetAdp/win/VBoxNetAdp6.inf
@@ -5,7 +5,7 @@
 ; Note: We use the same component id as the old NetAdp implementation ?
 ;
 ;
-; Copyright (C) 2014-2015 Oracle Corporation
+; Copyright (C) 2014-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFlt.c b/src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFlt.c
index 73f31b5..06657b4 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFlt.c
+++ b/src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFlt.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1333,7 +1333,8 @@ static DECLCALLBACK(void) vboxNetFltFactoryRelease(PINTNETTRUNKFACTORY pIfFactor
  * @param   pSession            The session - unused.
  * @param   pszInterfaceUuid    The factory interface id.
  */
-static DECLCALLBACK(void *) vboxNetFltQueryFactoryInterface(PCSUPDRVFACTORY pSupDrvFactory, PSUPDRVSESSION pSession, const char *pszInterfaceUuid)
+static DECLCALLBACK(void *) vboxNetFltQueryFactoryInterface(PCSUPDRVFACTORY pSupDrvFactory, PSUPDRVSESSION pSession,
+                                                            const char *pszInterfaceUuid)
 {
     PVBOXNETFLTGLOBALS pGlobals = (PVBOXNETFLTGLOBALS)((uint8_t *)pSupDrvFactory - RT_OFFSETOF(VBOXNETFLTGLOBALS, SupDrvFactory));
 
@@ -1361,6 +1362,7 @@ static DECLCALLBACK(void *) vboxNetFltQueryFactoryInterface(PCSUPDRVFACTORY pSup
     else
         Log(("VBoxNetFlt: rc=%Rrc, uuid=%s\n", rc, pszInterfaceUuid));
 
+    RT_NOREF1(pSession);
     return NULL;
 }
 
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFlt.rc b/src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFlt.rc
index 1caa0a3..2050135 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFlt.rc
+++ b/src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFlt.rc
@@ -3,7 +3,7 @@
  * VBoxNetFlt - Resource file containing version info and icon.
  */
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFltInternal.h b/src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFltInternal.h
index f9c8f5c..dee782b 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFltInternal.h
+++ b/src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFltInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/darwin/VBoxNetFlt-darwin.cpp b/src/VBox/HostDrivers/VBoxNetFlt/darwin/VBoxNetFlt-darwin.cpp
index c8e4d28..64b13b9 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/darwin/VBoxNetFlt-darwin.cpp
+++ b/src/VBox/HostDrivers/VBoxNetFlt/darwin/VBoxNetFlt-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -236,13 +236,13 @@ static void vboxNetFltDarwinDetectPCountOffset(ifnet_t pIfNet)
  */
 static kern_return_t    VBoxNetFltDarwinStart(struct kmod_info *pKModInfo, void *pvData)
 {
-    int rc;
+    RT_NOREF(pKModInfo, pvData);
 
     /*
      * Initialize IPRT and find our module tag id.
      * (IPRT is shared with VBoxDrv, it creates the loggers.)
      */
-    rc = RTR0Init(0);
+    int rc = RTR0Init(0);
     if (RT_SUCCESS(rc))
     {
         Log(("VBoxNetFltDarwinStart\n"));
@@ -282,6 +282,7 @@ static kern_return_t    VBoxNetFltDarwinStart(struct kmod_info *pKModInfo, void
  */
 static kern_return_t VBoxNetFltDarwinStop(struct kmod_info *pKModInfo, void *pvData)
 {
+    RT_NOREF(pKModInfo, pvData);
     Log(("VBoxNetFltDarwinStop\n"));
 
     /*
@@ -568,9 +569,10 @@ DECLINLINE(unsigned) vboxNetFltDarwinMBufCalcSGSegs(PVBOXNETFLTINS pThis, mbuf_t
  *                              This should match the number in the mbuf exactly!
  * @param   fSrc                The source of the frame.
  */
-DECLINLINE(void) vboxNetFltDarwinMBufToSG(PVBOXNETFLTINS pThis, mbuf_t pMBuf, void *pvFrame, PINTNETSG pSG, unsigned cSegs, uint32_t fSrc)
+DECLINLINE(void) vboxNetFltDarwinMBufToSG(PVBOXNETFLTINS pThis, mbuf_t pMBuf, void *pvFrame, PINTNETSG pSG, unsigned cSegs,
+                                          uint32_t fSrc)
 {
-    NOREF(pThis);
+    RT_NOREF(pThis, fSrc);
 
     /*
      * Walk the chain and convert the buffers to segments.  Works INTNETSG::cbTotal.
@@ -771,6 +773,7 @@ static void vboxNetFltDarwinIffDetached(void *pvThis, ifnet_t pIfNet)
  */
 static errno_t vboxNetFltDarwinIffIoCtl(void *pvThis, ifnet_t pIfNet, protocol_family_t eProtocol, u_long uCmd, void *pvArg)
 {
+    RT_NOREF(pIfNet);
     PVBOXNETFLTINS pThis = (PVBOXNETFLTINS)pvThis;
     LogFlow(("vboxNetFltDarwinIffIoCtl: pThis=%p uCmd=%lx\n", pThis, uCmd));
 
@@ -984,8 +987,7 @@ static errno_t vboxNetFltDarwinIffOutput(void *pvThis, ifnet_t pIfNet, protocol_
  */
 static errno_t vboxNetFltDarwinIffInput(void *pvThis, ifnet_t pIfNet, protocol_family_t eProtocol, mbuf_t *ppMBuf, char **ppchFrame)
 {
-    NOREF(eProtocol);
-    NOREF(pIfNet);
+    RT_NOREF(eProtocol, pIfNet);
     return vboxNetFltDarwinIffInputOutputWorker((PVBOXNETFLTINS)pvThis, *ppMBuf, *ppchFrame, INTNETTRUNKDIR_WIRE, eProtocol);
 }
 
@@ -993,6 +995,7 @@ static errno_t vboxNetFltDarwinIffInput(void *pvThis, ifnet_t pIfNet, protocol_f
 /** A worker thread for vboxNetFltSendDummy(). */
 static DECLCALLBACK(int) vboxNetFltSendDummyWorker(RTTHREAD hThreadSelf, void *pvUser)
 {
+    RT_NOREF(hThreadSelf);
     Assert(pvUser);
     ifnet_t pIfNet = (ifnet_t)pvUser;
     return VBoxNetSendDummy(pIfNet);
@@ -1107,7 +1110,7 @@ static int vboxNetFltDarwinAttachToInterface(PVBOXNETFLTINS pThis, bool fRedisco
             Assert(pThis->pSwitchPort);
             pThis->pSwitchPort->pfnReportMacAddress(pThis->pSwitchPort, &pThis->u.s.MacAddr);
 #if 0
-            /* 
+            /*
              * XXX: Don't tell SrvIntNetR0 if the interface is
              * promiscuous, because there's no code yet to update that
              * information and we don't want it stuck, spamming all
@@ -1330,6 +1333,7 @@ void vboxNetFltPortOsSetActive(PVBOXNETFLTINS pThis, bool fActive)
 int vboxNetFltOsDisconnectIt(PVBOXNETFLTINS pThis)
 {
     /* Nothing to do here. */
+    RT_NOREF(pThis);
     return VINF_SUCCESS;
 }
 
@@ -1337,6 +1341,7 @@ int vboxNetFltOsDisconnectIt(PVBOXNETFLTINS pThis)
 int  vboxNetFltOsConnectIt(PVBOXNETFLTINS pThis)
 {
     /* Nothing to do here. */
+    RT_NOREF(pThis);
     return VINF_SUCCESS;
 }
 
@@ -1516,7 +1521,6 @@ static void vboxNetFltDarwinSysSockUpcall(socket_t pSysSock, void *pvData, int f
         return;
     }
 
-    struct net_event_data my_link;
     ifnet_t pIfNet = pThis->u.s.pIfNet; /* XXX: retain? */
     ifnet_family_t if_family = ifnet_family(pIfNet);
     u_int32_t if_unit = ifnet_unit(pIfNet);
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c b/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
index a5a7a0c..2cfc8ed 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
+++ b/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFlt-solaris.c b/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFlt-solaris.c
index fc00dcb..68d826b 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFlt-solaris.c
+++ b/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFlt-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFltBow-solaris.c b/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFltBow-solaris.c
index 5d8c697..8dd89ea 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFltBow-solaris.c
+++ b/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFltBow-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/win/cfg/VBoxNetCfg.cpp b/src/VBox/HostDrivers/VBoxNetFlt/win/cfg/VBoxNetCfg.cpp
index afbe0b0..ba3e0af 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/win/cfg/VBoxNetCfg.cpp
+++ b/src/VBox/HostDrivers/VBoxNetFlt/win/cfg/VBoxNetCfg.cpp
@@ -3,7 +3,7 @@
  * VBoxNetCfg.cpp - Network Configuration API.
  */
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -18,14 +18,13 @@
 
 #define _WIN32_DCOM
 
-
 #include <devguid.h>
 #include <stdio.h>
 #include <regstr.h>
-#include <shlobj.h>
+#include <iprt/win/shlobj.h>
 #include <cfgmgr32.h>
 #include <tchar.h>
-#include <objbase.h>
+#include <iprt/win/objbase.h>
 
 #include <crtdbg.h>
 #include <stdlib.h>
@@ -34,11 +33,11 @@
 #include <Wbemidl.h>
 #include <comdef.h>
 
-#include <winsock2.h>
-#include <Ws2tcpip.h>
+#include <iprt/win/winsock2.h>
+#include <iprt/win/ws2tcpip.h>
 #include <ws2ipdef.h>
-#include <netioapi.h>
-#include <iphlpapi.h>
+#include <iprt/win/netioapi.h>
+#include <iprt/win/iphlpapi.h>
 
 
 #ifndef Assert   /** @todo r=bird: where would this be defined? */
@@ -497,8 +496,9 @@ static HRESULT vboxNetCfgWinEnumNetCfgComponents(IN INetCfg *pNetCfg,
 VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinGenHostonlyConnectionName(PCWSTR DevName, WCHAR *pBuf, PULONG pcbBuf);
 VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinRenameConnection(LPWSTR pGuid, PCWSTR NewName);
 
-static BOOL vboxNetCfgWinRemoveAllNetDevicesOfIdCallback(HDEVINFO hDevInfo, PSP_DEVINFO_DATA pDev, PVOID pContext)
+static BOOL vboxNetCfgWinRemoveAllNetDevicesOfIdCallback(HDEVINFO hDevInfo, PSP_DEVINFO_DATA pDev, PVOID pvContext)
 {
+    RT_NOREF1(pvContext);
     SP_REMOVEDEVICE_PARAMS rmdParams;
     memset(&rmdParams, 0, sizeof(SP_REMOVEDEVICE_PARAMS));
     rmdParams.ClassInstallHeader.cbSize = sizeof(SP_CLASSINSTALL_HEADER);
@@ -673,9 +673,9 @@ static BOOL vboxNetCfgWinPropChangeAllNetDevicesOfIdCallback(HDEVINFO hDevInfo,
     return TRUE;
 }
 
-typedef BOOL (*VBOXNETCFGWIN_NETENUM_CALLBACK) (HDEVINFO hDevInfo, PSP_DEVINFO_DATA pDev, PVOID pContext);
+typedef BOOL (*PFNVBOXNETCFGWINNETENUMCALLBACK)(HDEVINFO hDevInfo, PSP_DEVINFO_DATA pDev, PVOID pContext);
 VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinEnumNetDevices(LPCWSTR pwszPnPId,
-                                                        VBOXNETCFGWIN_NETENUM_CALLBACK callback, PVOID pContext)
+                                                        PFNVBOXNETCFGWINNETENUMCALLBACK pfnCallback, PVOID pvContext)
 {
     NonStandardLogFlow(("VBoxNetCfgWinEnumNetDevices: Searching for: %S\n", pwszPnPId));
 
@@ -689,7 +689,7 @@ VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinEnumNetDevices(LPCWSTR pwszPnPId,
                                                NULL             /* IN PVOID Reserved */);
     if (hDevInfo != INVALID_HANDLE_VALUE)
     {
-        DWORD winEr;
+        DWORD winEr = NO_ERROR;
 
         DWORD dwDevId = 0;
         size_t cPnPId = wcslen(pwszPnPId);
@@ -770,7 +770,7 @@ VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinEnumNetDevices(LPCWSTR pwszPnPId,
                 pCurId += cCurId - cPnPId;
                 if (!wcsnicmp(pCurId, pwszPnPId, cPnPId))
                 {
-                    if (!callback(hDevInfo, &Dev, pContext))
+                    if (!pfnCallback(hDevInfo, &Dev, pvContext))
                         break;
                 }
             }
@@ -1117,7 +1117,6 @@ static HRESULT netIfWinFindAdapterClassById(IWbemServices * pSvc, const GUID * p
 static HRESULT netIfWinIsHostOnly(IWbemClassObject * pAdapterConfig, BOOL * pbIsHostOnly)
 {
     VARIANT vtServiceName;
-    BOOL bIsHostOnly = FALSE;
     VariantInit(&vtServiceName);
 
     HRESULT hr = pAdapterConfig->Get(L"ServiceName", 0 /*lFlags*/, &vtServiceName, NULL /*pvtType*/, NULL /*plFlavor*/);
@@ -1197,6 +1196,7 @@ static HRESULT netIfWinGetIpSettings(IWbemClassObject * pAdapterConfig, ULONG *p
     return hr;
 }
 
+#if 0 /* unused */
 
 static HRESULT netIfWinHasIpSettings(IWbemClassObject * pAdapterConfig, SAFEARRAY * pCheckIp, SAFEARRAY * pCheckMask, bool *pFound)
 {
@@ -1272,6 +1272,8 @@ static HRESULT netIfWinWaitIpSettings(IWbemServices *pSvc, const GUID * pGuid, S
     return hr;
 }
 
+#endif /* unused */
+
 static HRESULT netIfWinCreateIWbemServices(IWbemServices ** ppSvc)
 {
     IWbemLocator *pLoc = NULL;
@@ -1377,7 +1379,7 @@ static HRESULT netIfExecMethod(IWbemServices * pSvc, IWbemClassObject *pClass, B
 
 static HRESULT netIfWinCreateIpArray(SAFEARRAY **ppArray, in_addr* aIp, UINT cIp)
 {
-    HRESULT hr;
+    HRESULT hr = S_OK; /* MSC maybe used uninitialized */
     SAFEARRAY * pIpArray = SafeArrayCreateVector(VT_BSTR, 0, cIp);
     if (pIpArray)
     {
@@ -1407,6 +1409,7 @@ static HRESULT netIfWinCreateIpArray(SAFEARRAY **ppArray, in_addr* aIp, UINT cIp
     return hr;
 }
 
+#if 0 /* unused */
 static HRESULT netIfWinCreateIpArrayV4V6(SAFEARRAY **ppArray, BSTR Ip)
 {
     HRESULT hr;
@@ -1433,6 +1436,7 @@ static HRESULT netIfWinCreateIpArrayV4V6(SAFEARRAY **ppArray, BSTR Ip)
 
     return hr;
 }
+#endif
 
 
 static HRESULT netIfWinCreateIpArrayVariantV4(VARIANT * pIpAddresses, in_addr* aIp, UINT cIp)
@@ -1449,6 +1453,7 @@ static HRESULT netIfWinCreateIpArrayVariantV4(VARIANT * pIpAddresses, in_addr* a
     return hr;
 }
 
+#if 0 /* unused */
 static HRESULT netIfWinCreateIpArrayVariantV4V6(VARIANT * pIpAddresses, BSTR Ip)
 {
     HRESULT hr;
@@ -1462,8 +1467,9 @@ static HRESULT netIfWinCreateIpArrayVariantV4V6(VARIANT * pIpAddresses, BSTR Ip)
     }
     return hr;
 }
+#endif
 
-static HRESULT netIfWinEnableStatic(IWbemServices * pSvc, const GUID * pGuid, BSTR ObjPath, VARIANT * pIp, VARIANT * pMask)
+static HRESULT netIfWinEnableStatic(IWbemServices *pSvc, const GUID *pGuid, BSTR ObjPath, VARIANT *pIp, VARIANT *pMask)
 {
     ComPtr<IWbemClassObject> pClass;
     BSTR ClassName = SysAllocString(L"Win32_NetworkAdapterConfiguration");
@@ -1490,16 +1496,17 @@ static HRESULT netIfWinEnableStatic(IWbemServices * pSvc, const GUID * pGuid, BS
                     int winEr = varReturnValue.uintVal;
                     switch (winEr)
                     {
-                    case 0:
+                        case 0:
                         {
                             hr = S_OK;
 //                            bool bFound;
 //                            HRESULT tmpHr = netIfWinWaitIpSettings(pSvc, pGuid, pIp->parray, pMask->parray, 180, &bFound);
+                            NOREF(pGuid);
+                            break;
                         }
-                        break;
-                    default:
-                        hr = HRESULT_FROM_WIN32( winEr );
-                        break;
+                        default:
+                            hr = HRESULT_FROM_WIN32( winEr );
+                            break;
                     }
                 }
             }
@@ -1531,6 +1538,8 @@ static HRESULT netIfWinEnableStaticV4(IWbemServices * pSvc, const GUID * pGuid,
     return hr;
 }
 
+#if 0 /* unused */
+
 static HRESULT netIfWinEnableStaticV4V6(IWbemServices * pSvc, const GUID * pGuid, BSTR ObjPath, BSTR Ip, BSTR Mask)
 {
     VARIANT ipAddresses;
@@ -1620,6 +1629,8 @@ static HRESULT netIfWinSetGatewaysV4V6(IWbemServices * pSvc, BSTR ObjPath, BSTR
     return hr;
 }
 
+#endif /* unused */
+
 static HRESULT netIfWinEnableDHCP(IWbemServices * pSvc, BSTR ObjPath)
 {
     ComPtr<IWbemClassObject> pClass;
@@ -2171,12 +2182,12 @@ VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinNetFltInstall(IN INetCfg *pNc,
 
 static HRESULT vboxNetCfgWinNetAdpUninstall(IN INetCfg *pNc, LPCWSTR pwszId, DWORD InfRmFlags)
 {
-    HRESULT hr = S_OK;
+    NOREF(pNc);
     NonStandardLog("Finding NetAdp driver package and trying to uninstall it ...\n");
 
     VBoxDrvCfgInfUninstallAllF(L"Net", pwszId, InfRmFlags);
     NonStandardLog("NetAdp is not installed currently\n");
-    return hr;
+    return S_OK;
 }
 
 VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinNetAdpUninstall(IN INetCfg *pNc, IN LPCWSTR pwszId)
@@ -2290,7 +2301,6 @@ VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinGenHostonlyConnectionName(PCWSTR DevNam
 {
     const WCHAR * pSuffix = wcsrchr( DevName, L'#' );
     ULONG cbSize = sizeof(VBOX_CONNECTION_NAME);
-    ULONG cbSufSize = 0;
 
     if (pSuffix)
     {
@@ -2316,6 +2326,7 @@ VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinGenHostonlyConnectionName(PCWSTR DevNam
 
 static BOOL vboxNetCfgWinAdjustHostOnlyNetworkInterfacePriority(IN INetCfg *pNc, IN INetCfgComponent *pNcc, PVOID pContext)
 {
+    RT_NOREF1(pNc);
     INetCfgComponentBindings *pNetCfgBindings;
     GUID *pGuid = (GUID*)pContext;
 
@@ -2651,7 +2662,6 @@ VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinRemoveHostOnlyNetworkInterface(IN const
         do
         {
             BOOL ok;
-            DWORD ret = 0;
             GUID netGuid;
             SP_DEVINFO_DATA DeviceInfoData;
             DWORD index = 0;
@@ -2662,20 +2672,20 @@ VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinRemoveHostOnlyNetworkInterface(IN const
             DeviceInfoData.cbSize = sizeof (SP_DEVINFO_DATA);
 
             /* copy the net class GUID */
-            memcpy (&netGuid, &GUID_DEVCLASS_NET, sizeof (GUID_DEVCLASS_NET));
+            memcpy(&netGuid, &GUID_DEVCLASS_NET, sizeof (GUID_DEVCLASS_NET));
 
             /* return a device info set contains all installed devices of the Net class */
-            hDeviceInfo = SetupDiGetClassDevs (&netGuid, NULL, NULL, DIGCF_PRESENT);
+            hDeviceInfo = SetupDiGetClassDevs(&netGuid, NULL, NULL, DIGCF_PRESENT);
 
             if (hDeviceInfo == INVALID_HANDLE_VALUE)
-                SetErrBreak (("SetupDiGetClassDevs failed (0x%08X)", GetLastError()));
+                SetErrBreak(("SetupDiGetClassDevs failed (0x%08X)", GetLastError()));
 
             /* enumerate the driver info list */
             while (TRUE)
             {
                 TCHAR *deviceHwid;
 
-                ok = SetupDiEnumDeviceInfo (hDeviceInfo, index, &DeviceInfoData);
+                ok = SetupDiEnumDeviceInfo(hDeviceInfo, index, &DeviceInfoData);
 
                 if (!ok)
                 {
@@ -2689,13 +2699,13 @@ VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinRemoveHostOnlyNetworkInterface(IN const
                 }
 
                 /* try to get the hardware ID registry property */
-                ok = SetupDiGetDeviceRegistryProperty (hDeviceInfo,
-                                                       &DeviceInfoData,
-                                                       SPDRP_HARDWAREID,
-                                                       NULL,
-                                                       NULL,
-                                                       0,
-                                                       &size);
+                ok = SetupDiGetDeviceRegistryProperty(hDeviceInfo,
+                                                      &DeviceInfoData,
+                                                      SPDRP_HARDWAREID,
+                                                      NULL,
+                                                      NULL,
+                                                      0,
+                                                      &size);
                 if (!ok)
                 {
                     if (GetLastError() != ERROR_INSUFFICIENT_BUFFER)
@@ -2704,17 +2714,17 @@ VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinRemoveHostOnlyNetworkInterface(IN const
                         continue;
                     }
 
-                    deviceHwid = (TCHAR *) malloc (size);
-                    ok = SetupDiGetDeviceRegistryProperty (hDeviceInfo,
-                                                           &DeviceInfoData,
-                                                           SPDRP_HARDWAREID,
-                                                           NULL,
-                                                           (PBYTE)deviceHwid,
-                                                           size,
-                                                           NULL);
+                    deviceHwid = (TCHAR *) malloc(size);
+                    ok = SetupDiGetDeviceRegistryProperty(hDeviceInfo,
+                                                          &DeviceInfoData,
+                                                          SPDRP_HARDWAREID,
+                                                          NULL,
+                                                          (PBYTE)deviceHwid,
+                                                          size,
+                                                          NULL);
                     if (!ok)
                     {
-                        free (deviceHwid);
+                        free(deviceHwid);
                         deviceHwid = NULL;
                         index++;
                         continue;
@@ -2729,9 +2739,9 @@ VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinRemoveHostOnlyNetworkInterface(IN const
 
                 for (TCHAR *t = deviceHwid;
                      t && *t && t < &deviceHwid[size / sizeof(TCHAR)];
-                     t += _tcslen (t) + 1)
+                     t += _tcslen(t) + 1)
                 {
-                    if (!_tcsicmp (DRIVERHWID, t))
+                    if (!_tcsicmp(DRIVERHWID, t))
                     {
                           /* get the device instance ID */
                           TCHAR devId[MAX_DEVICE_ID_LEN];
@@ -3161,7 +3171,7 @@ static HRESULT vboxNetCfgWinCreateHostOnlyNetworkInterface(IN LPCWSTR pInfPath,
             SetErrBreak(("Querying NetCfgInstanceId failed (0x%08X)", ret));
 
         /*
-        *   Set default metric value of interface to fix multicast issue 
+        *   Set default metric value of interface to fix multicast issue
         *   See @bugref{6379} for details.
         */
         HRESULT hSMRes = vboxNetCfgWinSetupMetric(hkey);
@@ -3275,7 +3285,7 @@ static HRESULT vboxNetCfgWinCreateHostOnlyNetworkInterface(IN LPCWSTR pInfPath,
 
         hr = VBoxNetCfgWinQueryINetCfg(&pNetCfg, TRUE, L"VirtualBox Host-Only Creation",
                                        30 * 1000, /* on Vista we often get 6to4svc.dll holding the lock, wait for 30 sec.  */
-                                       /* TODO: special handling for 6to4svc.dll ???, i.e. several retrieves */
+                                       /** @todo special handling for 6to4svc.dll ???, i.e. several retrieves */
                                        &lpszApp);
         if (hr == S_OK)
         {
@@ -3385,21 +3395,21 @@ HRESULT vboxLoadIpHelpFunctions(HINSTANCE& pIpHlpInstance)
     pIpHlpInstance = loadSystemDll("Iphlpapi.dll");
     if (pIpHlpInstance == NULL)
         return E_FAIL;
-    
-    g_pfnInitializeIpInterfaceEntry = 
+
+    g_pfnInitializeIpInterfaceEntry =
         (PFNINITIALIZEIPINTERFACEENTRY)GetProcAddress(pIpHlpInstance, "InitializeIpInterfaceEntry");
     Assert(g_pfnInitializeIpInterfaceEntry);
 
     if (g_pfnInitializeIpInterfaceEntry)
     {
-        g_pfnGetIpInterfaceEntry = 
+        g_pfnGetIpInterfaceEntry =
             (PFNGETIPINTERFACEENTRY)GetProcAddress(pIpHlpInstance, "GetIpInterfaceEntry");
         Assert(g_pfnGetIpInterfaceEntry);
     }
 
     if (g_pfnGetIpInterfaceEntry)
     {
-        g_pfnSetIpInterfaceEntry = 
+        g_pfnSetIpInterfaceEntry =
             (PFNSETIPINTERFACEENTRY)GetProcAddress(pIpHlpInstance, "SetIpInterfaceEntry");
         Assert(g_pfnSetIpInterfaceEntry);
     }
@@ -3469,7 +3479,7 @@ HRESULT vboxNetCfgWinGetInterfaceLUID(IN HKEY hKey, OUT NET_LUID* pLUID)
 
     if (pLUID == NULL)
         return E_INVALIDARG;
-    
+
     res = RegQueryValueExW(hKey, L"NetLuidIndex", NULL,
         &dwValueType, (LPBYTE)&luidIndex, &cbSize);
     if (res != 0)
@@ -3492,21 +3502,20 @@ HRESULT vboxNetCfgWinGetInterfaceLUID(IN HKEY hKey, OUT NET_LUID* pLUID)
 
 HRESULT vboxNetCfgWinSetupMetric(IN HKEY hKey)
 {
-    HRESULT rc = S_OK;
     HINSTANCE hModule = NULL;
-    NET_LUID luid;
-    int loopbackMetric;
-    
-    rc = vboxLoadIpHelpFunctions(hModule);
-
+    HRESULT rc = vboxLoadIpHelpFunctions(hModule);
     if (SUCCEEDED(rc))
+    {
+        NET_LUID luid;
         rc = vboxNetCfgWinGetInterfaceLUID(hKey, &luid);
-
-    if (SUCCEEDED(rc))
-        rc = vboxNetCfgWinGetLoopbackMetric(&loopbackMetric);
-
-    if (SUCCEEDED(rc))
-        rc = vboxNetCfgWinSetInterfaceMetric(&luid, loopbackMetric - 1);
+        if (SUCCEEDED(rc))
+        {
+            int loopbackMetric;
+            rc = vboxNetCfgWinGetLoopbackMetric(&loopbackMetric);
+            if (SUCCEEDED(rc))
+                rc = vboxNetCfgWinSetInterfaceMetric(&luid, loopbackMetric - 1);
+        }
+    }
 
     g_pfnInitializeIpInterfaceEntry = NULL;
     g_pfnSetIpInterfaceEntry = NULL;
@@ -3527,7 +3536,7 @@ VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinRenameHostOnlyConnection(IN const GUID
     if (hDevInfo != INVALID_HANDLE_VALUE)
     {
         SP_DEVINFO_DATA DevInfoData;
-                
+
         DevInfoData.cbSize = sizeof(SP_DEVINFO_DATA);
         if (SetupDiOpenDeviceInfo(hDevInfo, pwszId, NULL, 0, &DevInfoData))
         {
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetAdp.inf b/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetAdp.inf
index c5aa5f0..63e0cde 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetAdp.inf
+++ b/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetAdp.inf
@@ -3,7 +3,7 @@
 ; VBoxNetAdp.inf - VirtualBox Host-Only Driver inf file
 ;
 ;
-; Copyright (C) 2011-2015 Oracle Corporation
+; Copyright (C) 2011-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFlt-win.rc b/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFlt-win.rc
index 0343c2d..571b6a8 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFlt-win.rc
+++ b/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFlt-win.rc
@@ -3,7 +3,7 @@
  * VBoxNetFlt - Resource file containing version info and icon.
  */
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFlt.inf b/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFlt.inf
index 7b41bb6..f09d526 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFlt.inf
+++ b/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFlt.inf
@@ -4,7 +4,7 @@
 ; Protocol edge
 ;
 ;
-; Copyright (C) 2011-2015 Oracle Corporation
+; Copyright (C) 2011-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltCmn-win.h b/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltCmn-win.h
index e1e426d..1bf3419 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltCmn-win.h
+++ b/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltCmn-win.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -57,44 +57,8 @@
 #include <iprt/net.h>
 #include <iprt/list.h>
 
-RT_C_DECLS_BEGIN
-/* ntddk.h has a missing #pragma pack(), work around it
- * see #ifdef VBOX_WITH_WORKAROUND_MISSING_PACK below for detail */
-#define VBOX_WITH_WORKAROUND_MISSING_PACK
-#if (_MSC_VER >= 1400) && !defined(VBOX_WITH_PATCHED_DDK)
-#  define _InterlockedExchange           _InterlockedExchange_StupidDDKVsCompilerCrap
-#  define _InterlockedExchangeAdd        _InterlockedExchangeAdd_StupidDDKVsCompilerCrap
-#  define _InterlockedCompareExchange    _InterlockedCompareExchange_StupidDDKVsCompilerCrap
-#  define _InterlockedAddLargeStatistic  _InterlockedAddLargeStatistic_StupidDDKVsCompilerCrap
-#  define _interlockedbittestandset      _interlockedbittestandset_StupidDDKVsCompilerCrap
-#  define _interlockedbittestandreset    _interlockedbittestandreset_StupidDDKVsCompilerCrap
-#  define _interlockedbittestandset64    _interlockedbittestandset64_StupidDDKVsCompilerCrap
-#  define _interlockedbittestandreset64  _interlockedbittestandreset64_StupidDDKVsCompilerCrap
-#  pragma warning(disable : 4163)
-#  ifdef VBOX_WITH_WORKAROUND_MISSING_PACK
-#    pragma warning(disable : 4103)
-#  endif
-#  include <ntddk.h>
-#  pragma warning(default : 4163)
-#  ifdef VBOX_WITH_WORKAROUND_MISSING_PACK
-#    pragma pack()
-#    pragma warning(default : 4103)
-#  endif
-#  undef  _InterlockedExchange
-#  undef  _InterlockedExchangeAdd
-#  undef  _InterlockedCompareExchange
-#  undef  _InterlockedAddLargeStatistic
-#  undef  _interlockedbittestandset
-#  undef  _interlockedbittestandreset
-#  undef  _interlockedbittestandset64
-#  undef  _interlockedbittestandreset64
-#  include <ndis.h>
-#else
-//#  include <ntddk.h>
-/* can include ndis.h right away */
-#  include <ndis.h>
-#endif
-RT_C_DECLS_END
+#include <iprt/nt/ntddk.h>
+#include <iprt/nt/ndis.h>
 
 #define VBOXNETFLT_OS_SPECFIC 1
 
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltM-win.cpp b/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltM-win.cpp
index 09450d9..471275b 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltM-win.cpp
+++ b/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltM-win.cpp
@@ -4,7 +4,7 @@
  * Miniport edge
  */
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -26,6 +26,7 @@ static NDIS_STATUS vboxNetFltWinMpInitialize(OUT PNDIS_STATUS OpenErrorStatus,
         IN NDIS_HANDLE MiniportAdapterHandle,
         IN NDIS_HANDLE WrapperConfigurationContext)
 {
+    RT_NOREF1(WrapperConfigurationContext);
     PVBOXNETFLTINS pNetFlt = (PVBOXNETFLTINS)NdisIMGetDeviceContext(MiniportAdapterHandle);
     NDIS_STATUS Status = NDIS_STATUS_FAILURE;
 
@@ -157,8 +158,10 @@ DECLHIDDEN(NDIS_STATUS) vboxNetFltWinMpDoDeinitialization(PVBOXNETFLTINS pNetFlt
     return NDIS_STATUS_SUCCESS;
 }
 
-static NDIS_STATUS vboxNetFltWinMpReadApplyConfig(PVBOXNETFLTINS pThis, NDIS_HANDLE hMiniportAdapter, NDIS_HANDLE hWrapperConfigurationContext)
+static NDIS_STATUS vboxNetFltWinMpReadApplyConfig(PVBOXNETFLTINS pThis, NDIS_HANDLE hMiniportAdapter,
+                                                  NDIS_HANDLE hWrapperConfigurationContext)
 {
+    RT_NOREF1(hMiniportAdapter);
     NDIS_STATUS Status = NDIS_STATUS_SUCCESS;
     NDIS_HANDLE hConfiguration;
     PNDIS_CONFIGURATION_PARAMETER pParameterValue;
@@ -380,7 +383,7 @@ static NDIS_STATUS vboxNetFltWinMpInitialize(OUT PNDIS_STATUS OpenErrorStatus,
         Status = NDIS_STATUS_UNSUPPORTED_MEDIA;
     }
 
-    /* TODO: */
+    /** @todo */
     *OpenErrorStatus = Status;
 
     LogFlowFunc(("LEAVE: Status (0x%x)\n", Status));
@@ -485,7 +488,7 @@ static VOID vboxNetFltWinMpSendPackets(IN NDIS_HANDLE hMiniportAdapterContext,
     else
     {
         NDIS_HANDLE h = pNetFlt->u.s.WinIf.hMiniport;
-        Assert(0);
+        AssertFailed();
         if (h)
         {
             for (UINT i = 0; i < cNumberOfPackets; i++)
@@ -650,7 +653,7 @@ static NDIS_STATUS vboxNetFltWinMpHandlePowerState(PVBOXNETFLTINS pNetFlt, NDIS_
             && enmState != NdisDeviceStateD0)
     {
         /* invalid state transformation */
-        Assert(0);
+        AssertFailed();
         return NDIS_STATUS_FAILURE;
     }
 
@@ -706,7 +709,7 @@ static NDIS_STATUS vboxNetFltWinMpRequestPostSet(PVBOXNETFLTINS pNetFlt)
             Assert(fWinIfActive);
 
             /* netflt is active, update the cached value */
-            /* TODO: in case we are are not in promiscuous now, we are issuing a request.
+            /** @todo in case we are are not in promiscuous now, we are issuing a request.
              * what should we do in case of a failure?
              * i.e. should we update the fUpperProtocolSetFilter in completion routine in this case? etc. */
             pNetFlt->u.s.WinIf.fUpperProtocolSetFilter = *((PULONG)pNetFlt->u.s.WinIf.PassDownRequest.DATA.SET_INFORMATION.InformationBuffer);
@@ -1229,7 +1232,7 @@ static NDIS_STATUS vboxNetFltWinMpSetInformation(IN NDIS_HANDLE MiniportAdapterC
 #define VBOXNETFLTDUMP_STRCASE(_t) \
         case _t: return #_t;
 #define VBOXNETFLTDUMP_STRCASE_UNKNOWN() \
-        default: /*Assert(0);*/ return "Unknown";
+        default: /*AssertFailed();*/ return "Unknown";
 
 static const char* vboxNetFltWinMpDumpOid(ULONG oid)
 {
@@ -1366,22 +1369,24 @@ static NDIS_STATUS vboxNetFltWinMpTransferData(OUT PNDIS_PACKET Packet,
 
     LogFlowFunc(("ENTER: pNetFlt (0x%p)\n", pNetFlt));
 
-    if (vboxNetFltWinGetPowerState(&pNetFlt->u.s.WinIf.PtState) != NdisDeviceStateD0
-            || vboxNetFltWinGetPowerState(&pNetFlt->u.s.WinIf.MpState) != NdisDeviceStateD0)
+    if (   vboxNetFltWinGetPowerState(&pNetFlt->u.s.WinIf.PtState) != NdisDeviceStateD0
+        || vboxNetFltWinGetPowerState(&pNetFlt->u.s.WinIf.MpState) != NdisDeviceStateD0)
     {
         LogFlowFunc(("LEAVE: pNetFlt (0x%p), Status (0x%x)\n", pNetFlt, NDIS_STATUS_FAILURE));
         return NDIS_STATUS_FAILURE;
     }
 
     NdisTransferData(&Status, pNetFlt->u.s.WinIf.hBinding, MiniportReceiveContext,
-            ByteOffset, BytesToTransfer, Packet, BytesTransferred);
+                     ByteOffset, BytesToTransfer, Packet, BytesTransferred);
 
     LogFlowFunc(("LEAVE: pNetFlt (0x%p), Status (0x%x)\n", pNetFlt, Status));
     return Status;
+
 #else
+    RT_NOREF6(Packet, BytesTransferred, hContext, MiniportReceiveContext, ByteOffset, BytesToTransfer);
     LogFlowFunc(("ENTER: pNetFlt (0x%p)\n", hContext));
     /* should never be here */
-    Assert(0);
+    AssertFailed();
     LogFlowFunc(("LEAVE: pNetFlt (0x%p), Status (0x%x)\n", hContext, NDIS_STATUS_FAILURE));
     return NDIS_STATUS_FAILURE;
 #endif
@@ -1507,7 +1512,6 @@ DECLHIDDEN(bool) vboxNetFltWinMpDeInitializeDeviceInstance(PVBOXNETFLTINS pThis,
     if (vboxNetFltWinGetOpState(&pThis->u.s.WinIf.MpState) == kVBoxNetDevOpState_Initializing)
     {
         Status = NdisIMCancelInitializeDeviceInstance(g_VBoxNetFltGlobalsWin.Mp.hMiniport, &pThis->u.s.WinIf.MpDeviceName);
-
         if (Status == NDIS_STATUS_SUCCESS)
         {
             /* we've canceled the initialization successfully */
@@ -1516,13 +1520,13 @@ DECLHIDDEN(bool) vboxNetFltWinMpDeInitializeDeviceInstance(PVBOXNETFLTINS pThis,
             vboxNetFltWinSetOpState(&pThis->u.s.WinIf.MpState, kVBoxNetDevOpState_Deinitialized);
         }
         else
-        {
             NdisWaitEvent(&pThis->u.s.WinIf.MpInitCompleteEvent, 0);
-        }
     }
+    else
+        Status = NDIS_STATUS_SUCCESS;
 
-    Assert(vboxNetFltWinGetOpState(&pThis->u.s.WinIf.MpState) == kVBoxNetDevOpState_Initialized
-            || vboxNetFltWinGetOpState(&pThis->u.s.WinIf.MpState) == kVBoxNetDevOpState_Deinitialized);
+    Assert(   vboxNetFltWinGetOpState(&pThis->u.s.WinIf.MpState) == kVBoxNetDevOpState_Initialized
+           || vboxNetFltWinGetOpState(&pThis->u.s.WinIf.MpState) == kVBoxNetDevOpState_Deinitialized);
     if (vboxNetFltWinGetOpState(&pThis->u.s.WinIf.MpState) == kVBoxNetDevOpState_Initialized)
     {
         vboxNetFltWinSetOpState(&pThis->u.s.WinIf.MpState, kVBoxNetDevOpState_Deinitializing);
@@ -1531,9 +1535,7 @@ DECLHIDDEN(bool) vboxNetFltWinMpDeInitializeDeviceInstance(PVBOXNETFLTINS pThis,
 
         vboxNetFltWinSetOpState(&pThis->u.s.WinIf.MpState, kVBoxNetDevOpState_Deinitialized);
         if (Status != NDIS_STATUS_SUCCESS)
-        {
             Status = NDIS_STATUS_FAILURE;
-        }
 
         *pStatus = Status;
         return true;
@@ -1545,4 +1547,5 @@ DECLHIDDEN(bool) vboxNetFltWinMpDeInitializeDeviceInstance(PVBOXNETFLTINS pThis,
     *pStatus = Status;
     return false;
 }
-#endif
+
+#endif /* !VBOXNETADP */
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltM-win.h b/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltM-win.h
index fc0931a..fca1214 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltM-win.h
+++ b/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltM-win.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltM.inf b/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltM.inf
index 4129e39..4f7f7d2 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltM.inf
+++ b/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltM.inf
@@ -4,7 +4,7 @@
 ; Miniport edge
 ;
 ;
-; Copyright (C) 2011-2015 Oracle Corporation
+; Copyright (C) 2011-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltP-win.cpp b/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltP-win.cpp
index 278e0b5..9f993bc 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltP-win.cpp
+++ b/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltP-win.cpp
@@ -4,7 +4,7 @@
  * Protocol edge
  */
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -112,6 +112,7 @@ static VOID vboxNetFltWinPtBindAdapter(OUT PNDIS_STATUS pStatus,
         IN PVOID pvSystemSpecific2)
 {
     LogFlowFuncEnter();
+    RT_NOREF2(hBindContext, pvSystemSpecific2);
 
     NDIS_STATUS Status;
     NDIS_HANDLE hConfig = NULL;
@@ -141,7 +142,8 @@ static VOID vboxNetFltWinPtBindAdapter(OUT PNDIS_STATUS pStatus,
 
 static VOID vboxNetFltWinPtOpenAdapterComplete(IN NDIS_HANDLE hProtocolBindingContext, IN NDIS_STATUS Status, IN NDIS_STATUS OpenErrorStatus)
 {
-    PVBOXNETFLTINS pNetFlt =(PVBOXNETFLTINS)hProtocolBindingContext;
+    PVBOXNETFLTINS pNetFlt = (PVBOXNETFLTINS)hProtocolBindingContext;
+    RT_NOREF1(OpenErrorStatus);
 
     LogFlowFunc(("ENTER: pNetFlt (0x%p), Status (0x%x), OpenErrorStatus(0x%x)\n", pNetFlt, Status, OpenErrorStatus));
     Assert(pNetFlt->u.s.WinIf.OpenCloseStatus == NDIS_STATUS_SUCCESS);
@@ -253,6 +255,7 @@ static VOID vboxNetFltWinPtUnbindAdapter(OUT PNDIS_STATUS pStatus,
         IN NDIS_HANDLE hUnbindContext)
 {
     PVBOXNETFLTINS pNetFlt = (PVBOXNETFLTINS)hContext;
+    RT_NOREF1(hUnbindContext);
 
     LogFlowFunc(("ENTER: pNetFlt (0x%p)\n", pNetFlt));
 
@@ -266,7 +269,7 @@ static VOID vboxNetFltWinPtUnloadProtocol()
 {
     LogFlowFuncEnter();
     NDIS_STATUS Status = vboxNetFltWinPtDeregister(&g_VBoxNetFltGlobalsWin.Pt);
-    Assert(Status == NDIS_STATUS_SUCCESS);
+    Assert(Status == NDIS_STATUS_SUCCESS); NOREF(Status);
     LogFlowFunc(("LEAVE: PtDeregister Status (0x%x)\n", Status));
 }
 
@@ -289,11 +292,12 @@ static VOID vboxNetFltWinPtCloseAdapterComplete(IN NDIS_HANDLE ProtocolBindingCo
 
 static VOID vboxNetFltWinPtResetComplete(IN NDIS_HANDLE hProtocolBindingContext, IN NDIS_STATUS Status)
 {
+    RT_NOREF2(hProtocolBindingContext, Status);
     LogFlowFunc(("ENTER: pNetFlt 0x%p, Status 0x%x\n", hProtocolBindingContext, Status));
     /*
      * should never be here
      */
-    Assert(0);
+    AssertFailed();
     LogFlowFunc(("LEAVE: pNetFlt 0x%p, Status 0x%x\n", hProtocolBindingContext, Status));
 }
 
@@ -320,7 +324,7 @@ static NDIS_STATUS vboxNetFltWinPtHandleQueryInfoComplete(PVBOXNETFLTINS pNetFlt
                 }
                 else
                 {
-                    Assert(0);
+                    AssertFailed();
                     *pNetFlt->u.s.WinIf.pcPDRBytesNeeded = sizeof(NDIS_PNP_CAPABILITIES);
                     Status = NDIS_STATUS_RESOURCES;
                 }
@@ -347,7 +351,7 @@ static NDIS_STATUS vboxNetFltWinPtHandleQueryInfoComplete(PVBOXNETFLTINS pNetFlt
                 }
                 else
                 {
-                    Assert(0);
+                    AssertFailed();
                     *pNetFlt->u.s.WinIf.pcPDRBytesNeeded = sizeof (ULONG);
                     Status = NDIS_STATUS_RESOURCES;
                 }
@@ -380,7 +384,7 @@ static NDIS_STATUS vboxNetFltWinPtHandleQueryInfoComplete(PVBOXNETFLTINS pNetFlt
                     }
                     else
                     {
-                        Assert(0);
+                        AssertFailed();
                         *pNetFlt->u.s.WinIf.pcPDRBytesNeeded = sizeof (ULONG);
                         Status = NDIS_STATUS_RESOURCES;
                     }
@@ -426,7 +430,7 @@ static NDIS_STATUS vboxNetFltWinPtHandleSetInfoComplete(PVBOXNETFLTINS pNetFlt,
                             }
                             else
                             {
-                                Assert(0);
+                                AssertFailed();
                                 *pNetFlt->u.s.WinIf.pcPDRBytesNeeded = sizeof (ULONG);
                                 Status = NDIS_STATUS_RESOURCES;
                             }
@@ -447,7 +451,7 @@ static NDIS_STATUS vboxNetFltWinPtHandleSetInfoComplete(PVBOXNETFLTINS pNetFlt,
                             }
                             else
                             {
-                                Assert(0);
+                                AssertFailed();
                                 *pNetFlt->u.s.WinIf.pcPDRBytesNeeded = sizeof (ULONG);
                                 Status = NDIS_STATUS_RESOURCES;
                             }
@@ -461,7 +465,7 @@ static NDIS_STATUS vboxNetFltWinPtHandleSetInfoComplete(PVBOXNETFLTINS pNetFlt,
 #ifdef DEBUG_misha
                 else
                 {
-                    Assert(0);
+                    AssertFailed();
                 }
 #endif
             }
@@ -483,7 +487,6 @@ DECLHIDDEN(VOID) vboxNetFltWinPtRequestComplete(NDIS_HANDLE hContext, PNDIS_REQU
 {
     PVBOXNETFLTINS pNetFlt = (PVBOXNETFLTINS)hContext;
     PNDIS_REQUEST pSynchRequest = pNetFlt->u.s.WinIf.pSynchRequest;
-    NDIS_OID Oid = pNetFlt->u.s.WinIf.PassDownRequest.DATA.SET_INFORMATION.Oid;
 
     LogFlowFunc(("ENTER: pNetFlt (0x%p), pNdisRequest (0x%p), Status (0x%x)\n", pNetFlt, pNdisRequest, Status));
 
@@ -517,7 +520,7 @@ DECLHIDDEN(VOID) vboxNetFltWinPtRequestComplete(NDIS_HANDLE hContext, PNDIS_REQU
           break;
 
       default:
-          Assert(0);
+          AssertFailed();
           break;
     }
 
@@ -584,7 +587,7 @@ static VOID vboxNetFltWinPtSendComplete(IN NDIS_HANDLE hProtocolBindingContext,
     LogFlowFunc(("ENTER: pNetFlt (0x%p), pPacket (0x%p), Status (0x%x)\n", pNetFlt, pPacket, Status));
 
 #if defined(DEBUG_NETFLT_PACKETS) || !defined(VBOX_LOOPBACK_USEFLAGS)
-    /* @todo: for optimization we could check only for netflt-mode packets
+    /** @todo for optimization we could check only for netflt-mode packets
      * do it for all for now */
      vboxNetFltWinLbRemoveSendPacket(pNetFlt, pPacket);
 #endif
@@ -670,7 +673,7 @@ static bool vboxNetFltWinPtTransferDataCompleteActive(PVBOXNETFLTINS pNetFltIf,
             if (vboxNetFltWinIsLoopedBackPacket(pPacket))
             {
                 /* should not be here */
-                Assert(0);
+                AssertFailed();
             }
 #else
             PNDIS_PACKET pLb = vboxNetFltWinLbSearchLoopBack(pNetFltIf, pPacket, false);
@@ -678,7 +681,7 @@ static bool vboxNetFltWinPtTransferDataCompleteActive(PVBOXNETFLTINS pNetFltIf,
             {
 #ifndef DEBUG_NETFLT_RECV_TRANSFERDATA
                 /* should not be here */
-                Assert(0);
+                AssertFailed();
 #endif
                 if (!vboxNetFltWinLbIsFromIntNet(pLb))
                 {
@@ -721,13 +724,13 @@ static bool vboxNetFltWinPtTransferDataCompleteActive(PVBOXNETFLTINS pNetFltIf,
                 {
                     break;
                 }
-                Assert(0);
+                AssertFailed();
 # endif
             }
         }
         else
         {
-            Assert(0);
+            AssertFailed();
         }
         /* we are here because of error either in data transfer or in enqueueing the packet */
         vboxNetFltWinFreeSGNdisPacket(pPacket, true);
@@ -762,7 +765,7 @@ static VOID vboxNetFltWinPtTransferDataComplete(IN NDIS_HANDLE hProtocolBindingC
     LogFlowFunc(("LEAVE: pNetFlt (0x%p), pPacket (0x%p), Status (0x%x), cbTransfered (%d)\n", pNetFlt, pPacket, Status, cbTransferred));
 }
 
-static INT vboxNetFltWinRecvPacketPassThru(PVBOXNETFLTINS pNetFlt, PNDIS_PACKET pPacket, BOOLEAN bForceIndicate)
+static INT vboxNetFltWinRecvPacketPassThru(PVBOXNETFLTINS pNetFlt, PNDIS_PACKET pPacket)
 {
     Assert(KeGetCurrentIrql() == DISPATCH_LEVEL);
 
@@ -833,7 +836,7 @@ static VOID vboxNetFltWinRecvIndicatePassThru(PVBOXNETFLTINS pNetFlt, NDIS_HANDL
                                          cbPacket);
             break;
         default:
-            Assert(FALSE);
+            AssertFailed();
             break;
     }
 }
@@ -872,7 +875,7 @@ static NDIS_STATUS vboxNetFltWinPtReceiveActive(PVBOXNETFLTINS pNetFlt, NDIS_HAN
             Status = vboxNetFltWinAllocSG(cbPacket + cbHeaderBuffer, &pSG);
             if (Status != NDIS_STATUS_SUCCESS)
             {
-                Assert(0);
+                AssertFailed();
                 break;
             }
 
@@ -890,7 +893,7 @@ static NDIS_STATUS vboxNetFltWinPtReceiveActive(PVBOXNETFLTINS pNetFlt, NDIS_HAN
             {
 #ifndef DEBUG_NETFLT_RECV_NOPACKET
                 /* should not be here */
-                Assert(0);
+                AssertFailed();
 #endif
                 if (!vboxNetFltWinLbIsFromIntNet(pLb))
                 {
@@ -960,7 +963,7 @@ static NDIS_STATUS vboxNetFltWinPtReceiveActive(PVBOXNETFLTINS pNetFlt, NDIS_HAN
             Status = vboxNetFltWinQuEnqueuePacket(pNetFlt, pSG, PACKET_SG | PACKET_MINE);
             if (Status != NDIS_STATUS_SUCCESS)
             {
-                Assert(0);
+                AssertFailed();
                 vboxNetFltWinMemFree(pSG);
                 break;
             }
@@ -980,7 +983,7 @@ static NDIS_STATUS vboxNetFltWinPtReceiveActive(PVBOXNETFLTINS pNetFlt, NDIS_HAN
             NdisAllocatePacket(&Status, &pPacket, pNetFlt->u.s.WinIf.hRecvPacketPool);
             if (Status != NDIS_STATUS_SUCCESS)
             {
-                Assert(0);
+                AssertFailed();
                 break;
             }
 
@@ -996,14 +999,14 @@ static NDIS_STATUS vboxNetFltWinPtReceiveActive(PVBOXNETFLTINS pNetFlt, NDIS_HAN
             Status = vboxNetFltWinMemAlloc((PVOID*)(&pMemBuf), cbBuf);
             if (Status != NDIS_STATUS_SUCCESS)
             {
-                Assert(0);
+                AssertFailed();
                 NdisFreePacket(pPacket);
                 break;
             }
             NdisAllocateBuffer(&Status, &pTransferBuffer, pNetFlt->u.s.WinIf.hRecvBufferPool, pMemBuf + cbHeaderBuffer, cbPacket);
             if (Status != NDIS_STATUS_SUCCESS)
             {
-                Assert(0);
+                AssertFailed();
                 Status = NDIS_STATUS_FAILURE;
                 NdisFreePacket(pPacket);
                 vboxNetFltWinMemFree(pMemBuf);
@@ -1013,7 +1016,7 @@ static NDIS_STATUS vboxNetFltWinPtReceiveActive(PVBOXNETFLTINS pNetFlt, NDIS_HAN
             NdisAllocateBuffer(&Status, &pOrigBuffer, pNetFlt->u.s.WinIf.hRecvBufferPool, pMemBuf, cbBuf);
             if (Status != NDIS_STATUS_SUCCESS)
             {
-                Assert(0);
+                AssertFailed();
                 Status = NDIS_STATUS_FAILURE;
                 NdisFreeBuffer(pTransferBuffer);
                 NdisFreePacket(pPacket);
@@ -1085,7 +1088,7 @@ static NDIS_STATUS vboxNetFltWinPtReceive(IN NDIS_HANDLE hProtocolBindingContext
 # else
                 if (vboxNetFltWinIsLoopedBackPacket(pPacket))
                 {
-                    Assert(0);
+                    AssertFailed();
                     /* nothing else to do here, just return the packet */
                     //NdisReturnPackets(&pPacket, 1);
                     Status = NDIS_STATUS_NOT_ACCEPTED;
@@ -1176,7 +1179,7 @@ static NDIS_STATUS vboxNetFltWinPtReceive(IN NDIS_HANDLE hProtocolBindingContext
 #ifndef VBOX_LOOPBACK_USEFLAGS
                         /* this is a loopback packet, nothing to do here */
 #else
-                        Assert(0);
+                        AssertFailed();
                         /* should not be here */
 #endif
                     }
@@ -1223,9 +1226,8 @@ static NDIS_STATUS vboxNetFltWinPtReceive(IN NDIS_HANDLE hProtocolBindingContext
 static VOID vboxNetFltWinPtReceiveComplete(NDIS_HANDLE hProtocolBindingContext)
 {
     PVBOXNETFLTINS pNetFlt = (PVBOXNETFLTINS)hProtocolBindingContext;
-    ULONG cPackets = 0;
-    bool bNetFltActive;
-    bool fWinIfActive = vboxNetFltWinReferenceWinIfNetFlt(pNetFlt, &bNetFltActive);
+    bool fNetFltActive;
+    bool fWinIfActive = vboxNetFltWinReferenceWinIfNetFlt(pNetFlt, &fNetFltActive);
     NDIS_HANDLE hMiniport = pNetFlt->u.s.WinIf.hMiniport;
     /* Note: we're using KeGetCurrentProcessorNumber, which is not entirely correct in case
     * we're running on 64bit win7+, which can handle > 64 CPUs, however since KeGetCurrentProcessorNumber
@@ -1245,7 +1247,7 @@ static VOID vboxNetFltWinPtReceiveComplete(NDIS_HANDLE hProtocolBindingContext)
                 NdisMEthIndicateReceiveComplete(hMiniport);
                 break;
             default:
-                Assert(0);
+                AssertFailed();
                 break;
         }
     }
@@ -1254,14 +1256,10 @@ static VOID vboxNetFltWinPtReceiveComplete(NDIS_HANDLE hProtocolBindingContext)
 
     if (fWinIfActive)
     {
-        if (bNetFltActive)
-        {
+        if (fNetFltActive)
             vboxNetFltWinDereferenceNetFlt(pNetFlt);
-        }
         else
-        {
             vboxNetFltWinDereferenceModePassThru(pNetFlt);
-        }
         vboxNetFltWinDereferenceWinIf(pNetFlt);
     }
 
@@ -1285,7 +1283,7 @@ static INT vboxNetFltWinPtReceivePacket(NDIS_HANDLE hProtocolBindingContext, PND
 #ifdef VBOX_LOOPBACK_USEFLAGS
             if (vboxNetFltWinIsLoopedBackPacket(pPacket))
             {
-                Assert(0);
+                AssertFailed();
                 Log(("lb_rp"));
 
                 /* nothing else to do here, just return the packet */
@@ -1307,14 +1305,14 @@ static INT vboxNetFltWinPtReceivePacket(NDIS_HANDLE hProtocolBindingContext, PND
 #ifndef VBOXNETFLT_NO_PACKET_QUEUE
                     NDIS_STATUS fStatus;
 #endif
-                    bool bResources = NDIS_GET_PACKET_STATUS(pPacket) == NDIS_STATUS_RESOURCES;
+                    bool fResources = NDIS_GET_PACKET_STATUS(pPacket) == NDIS_STATUS_RESOURCES; NOREF(fResources);
 
                     VBOXNETFLT_LBVERIFY(pNetFlt, pPacket);
 #ifdef DEBUG_misha
-                    /*TODO: remove this assert.
+                    /** @todo remove this assert.
                      * this is a temporary assert for debugging purposes:
                      * we're probably doing something wrong with the packets if the miniport reports NDIS_STATUS_RESOURCES */
-                    Assert(!bResources);
+                    Assert(!fResources);
 #endif
 
 #ifdef VBOXNETFLT_NO_PACKET_QUEUE
@@ -1326,25 +1324,23 @@ static INT vboxNetFltWinPtReceivePacket(NDIS_HANDLE hProtocolBindingContext, PND
                     }
 
 #else
-                    fStatus = vboxNetFltWinQuEnqueuePacket(pNetFlt, pPacket, bResources ? PACKET_COPY : 0);
+                    fStatus = vboxNetFltWinQuEnqueuePacket(pNetFlt, pPacket, fResources ? PACKET_COPY : 0);
                     if (fStatus == NDIS_STATUS_SUCCESS)
                     {
                         bNetFltActive = false;
                         fWinIfActive = false;
-                        if (bResources)
+                        if (fResources)
                         {
                             cRefCount = 0;
                             //NdisReturnPackets(&pPacket, 1);
                         }
                         else
-                        {
                             cRefCount = 1;
-                        }
                         break;
                     }
                     else
                     {
-                        Assert(0);
+                        AssertFailed();
                     }
 #endif
                 }
@@ -1361,7 +1357,7 @@ static INT vboxNetFltWinPtReceivePacket(NDIS_HANDLE hProtocolBindingContext, PND
 #endif
             }
 
-            cRefCount = vboxNetFltWinRecvPacketPassThru(pNetFlt, pPacket, bNetFltActive);
+            cRefCount = vboxNetFltWinRecvPacketPassThru(pNetFlt, pPacket);
             if (cRefCount)
             {
                 Assert(cRefCount == 1);
@@ -1401,13 +1397,13 @@ DECLHIDDEN(bool) vboxNetFltWinPtCloseInterface(PVBOXNETFLTINS pNetFlt, PNDIS_STA
     if (pNetFlt->u.s.WinIf.StateFlags.fInterfaceClosing)
     {
         RTSpinlockRelease(pNetFlt->hSpinlock);
-        Assert(0);
+        AssertFailed();
         return false;
     }
     if (pNetFlt->u.s.WinIf.hBinding == NULL)
     {
         RTSpinlockRelease(pNetFlt->hSpinlock);
-        Assert(0);
+        AssertFailed();
         return false;
     }
 
@@ -1493,8 +1489,11 @@ static NDIS_STATUS vboxNetFltWinPtPnPEvent(IN NDIS_HANDLE hProtocolBindingContex
         case NetEventSetPower:
         {
             NDIS_DEVICE_POWER_STATE enmPowerState = *((PNDIS_DEVICE_POWER_STATE)pNetPnPEvent->Buffer);
-            return vboxNetFltWinPtPnPSetPower(pNetFlt, enmPowerState);
+            NDIS_STATUS rcNdis = vboxNetFltWinPtPnPSetPower(pNetFlt, enmPowerState);
+            LogFlowFunc(("LEAVE: pNetFlt (0x%p), NetEvent (%d), rcNdis=%#x\n", pNetFlt, pNetPnPEvent->NetEvent, rcNdis));
+            return rcNdis;
         }
+
         case NetEventReconfigure:
         {
             if (!pNetFlt)
@@ -1502,11 +1501,12 @@ static NDIS_STATUS vboxNetFltWinPtPnPEvent(IN NDIS_HANDLE hProtocolBindingContex
                 NdisReEnumerateProtocolBindings(g_VBoxNetFltGlobalsWin.Pt.hProtocol);
             }
         }
+        /** @todo r=bird: Is the fall thru intentional?? */
         default:
+            LogFlowFunc(("LEAVE: pNetFlt (0x%p), NetEvent (%d)\n", pNetFlt, pNetPnPEvent->NetEvent));
             return NDIS_STATUS_SUCCESS;
     }
 
-    LogFlowFunc(("LEAVE: pNetFlt (0x%p), NetEvent (%d)\n", pNetFlt, pNetPnPEvent->NetEvent));
 }
 
 #ifdef __cplusplus
@@ -1518,8 +1518,10 @@ static NDIS_STATUS vboxNetFltWinPtPnPEvent(IN NDIS_HANDLE hProtocolBindingContex
 /**
  * register the protocol edge
  */
-DECLHIDDEN(NDIS_STATUS) vboxNetFltWinPtRegister(PVBOXNETFLTGLOBALS_PT pGlobalsPt, PDRIVER_OBJECT pDriverObject, PUNICODE_STRING pRegistryPathStr)
+DECLHIDDEN(NDIS_STATUS) vboxNetFltWinPtRegister(PVBOXNETFLTGLOBALS_PT pGlobalsPt, PDRIVER_OBJECT pDriverObject,
+                                                PUNICODE_STRING pRegistryPathStr)
 {
+    RT_NOREF2(pDriverObject, pRegistryPathStr);
     NDIS_PROTOCOL_CHARACTERISTICS PtChars;
     NDIS_STRING NameStr;
 
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltP-win.h b/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltP-win.h
index a1ae343..3ea3995 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltP-win.h
+++ b/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltP-win.h
@@ -4,7 +4,7 @@
  * Protocol edge API
  */
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltRt-win.cpp b/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltRt-win.cpp
index beb7b6f..41236ae 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltRt-win.cpp
+++ b/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltRt-win.cpp
@@ -1,10 +1,10 @@
 /* $Id: VBoxNetFltRt-win.cpp $ */
 /** @file
- * VBoxNetFltRt-win.cpp - Bridged Networking Driver, Windows Specific Code.
- * NetFlt Runtime
+ * VBoxNetFltRt-win.cpp - Bridged Networking Driver, Windows Specific Runtime Code.
  */
+
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -14,15 +14,22 @@
  * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
 #include "VBoxNetFltCmn-win.h"
 #include <VBox/intnetinline.h>
 #include <iprt/thread.h>
 
-RT_C_DECLS_BEGIN
-#include <tdikrnl.h>
-RT_C_DECLS_END
+#include <iprt/nt/tdikrnl.h>
 #include <mstcpip.h>
 
+
+/*********************************************************************************************************************************
+*   Structures and Typedefs                                                                                                      *
+*********************************************************************************************************************************/
 /** represents the job element of the job queue
  * see comments for VBOXNETFLT_JOB_QUEUE */
 typedef struct VBOXNETFLT_JOB
@@ -70,7 +77,7 @@ typedef struct _CREATE_INSTANCE_CONTEXT
     NDIS_HANDLE hWrapperConfigurationContext;
 #endif
     NDIS_STATUS Status;
-}CREATE_INSTANCE_CONTEXT, *PCREATE_INSTANCE_CONTEXT;
+} CREATE_INSTANCE_CONTEXT, *PCREATE_INSTANCE_CONTEXT;
 
 /*contexts used for our jobs */
 /* Attach context */
@@ -80,14 +87,14 @@ typedef struct _ATTACH_INFO
     PCREATE_INSTANCE_CONTEXT pCreateContext;
     bool fRediscovery;
     int Status;
-}ATTACH_INFO, *PATTACH_INFO;
+} ATTACH_INFO, *PATTACH_INFO;
 
 /* general worker context */
 typedef struct _WORKER_INFO
 {
     PVBOXNETFLTINS pNetFltIf;
     int Status;
-}WORKER_INFO, *PWORKER_INFO;
+} WORKER_INFO, *PWORKER_INFO;
 
 /* idc initialization */
 typedef struct _INIT_IDC_INFO
@@ -97,15 +104,18 @@ typedef struct _INIT_IDC_INFO
     volatile bool bStop;
     volatile int rc;
     KEVENT hCompletionEvent;
-}INIT_IDC_INFO, *PINIT_IDC_INFO;
+} INIT_IDC_INFO, *PINIT_IDC_INFO;
 
 
-/** globals */
+/*********************************************************************************************************************************
+*   Global Variables                                                                                                             *
+*********************************************************************************************************************************/
 /** global job queue. some operations are required to be done at passive level, e.g. thread creation, adapter bind/unbind initiation,
  * while IntNet typically calls us APC_LEVEL, so we just create a system thread in our DriverEntry and enqueue the jobs to that thread */
 static VBOXNETFLT_JOB_QUEUE g_VBoxJobQueue;
 volatile static bool g_bVBoxIdcInitialized;
 INIT_IDC_INFO g_VBoxInitIdcInfo;
+
 /**
  * The (common) global data.
  */
@@ -113,9 +123,17 @@ static VBOXNETFLTGLOBALS g_VBoxNetFltGlobals;
 /* win-specific global data */
 VBOXNETFLTGLOBALS_WIN g_VBoxNetFltGlobalsWin = {0};
 
+
+/*********************************************************************************************************************************
+*   Defined Constants And Macros                                                                                                 *
+*********************************************************************************************************************************/
 #define LIST_ENTRY_2_JOB(pListEntry) \
     ( (PVBOXNETFLT_JOB)((uint8_t *)(pListEntry) - RT_OFFSETOF(VBOXNETFLT_JOB, ListEntry)) )
 
+
+/*********************************************************************************************************************************
+*   Internal Functions                                                                                                           *
+*********************************************************************************************************************************/
 static int vboxNetFltWinAttachToInterface(PVBOXNETFLTINS pThis, void * pContext, bool fRediscovery);
 static int vboxNetFltWinConnectIt(PVBOXNETFLTINS pThis);
 static int vboxNetFltWinFiniIdc();
@@ -125,6 +143,8 @@ static int vboxNetFltWinFiniNetFlt();
 static int vboxNetFltWinStartInitIdcProbing();
 static int vboxNetFltWinStopInitIdcProbing();
 
+
+
 /** makes the current thread to sleep for the given number of miliseconds */
 DECLHIDDEN(void) vboxNetFltWinSleep(ULONG milis)
 {
@@ -159,22 +179,20 @@ DECLHIDDEN(void) vboxNetFltWinWaitDereference(PVBOXNETFLT_WINIF_DEVICE pState)
  * mem functions
  */
 /* allocates and zeroes the nonpaged memory of a given size */
-DECLHIDDEN(NDIS_STATUS) vboxNetFltWinMemAlloc(PVOID* ppMemBuf, UINT cbLength)
+DECLHIDDEN(NDIS_STATUS) vboxNetFltWinMemAlloc(PVOID *ppvMemBuf, UINT cbLength)
 {
 #ifdef DEBUG_NETFLT_USE_EXALLOC
-    *ppMemBuf = ExAllocatePoolWithTag(NonPagedPool, cbLength, VBOXNETFLT_MEM_TAG);
-    if (*ppMemBuf)
+    *ppvMemBuf = ExAllocatePoolWithTag(NonPagedPool, cbLength, VBOXNETFLT_MEM_TAG);
+    if (*ppvMemBuf)
     {
-        NdisZeroMemory(*ppMemBuf, cbLength);
+        NdisZeroMemory(*ppvMemBuf, cbLength);
         return NDIS_STATUS_SUCCESS;
     }
     return NDIS_STATUS_FAILURE;
 #else
-    NDIS_STATUS fStatus = NdisAllocateMemoryWithTag(ppMemBuf, cbLength, VBOXNETFLT_MEM_TAG);
+    NDIS_STATUS fStatus = NdisAllocateMemoryWithTag(ppvMemBuf, cbLength, VBOXNETFLT_MEM_TAG);
     if (fStatus == NDIS_STATUS_SUCCESS)
-    {
-        NdisZeroMemory(*ppMemBuf, cbLength);
-    }
+        NdisZeroMemory(*ppvMemBuf, cbLength);
     return fStatus;
 #endif
 }
@@ -272,7 +290,6 @@ DECLHIDDEN(NDIS_STATUS) vboxNetFltWinCopyString(PNDIS_STRING pDst, PNDIS_STRING
  * the contents of the given NDIS_BUFFER and all other buffers chained to it */
 static NDIS_STATUS vboxNetFltWinNdisBufferMoveToSG0(PNDIS_BUFFER pBuffer, PINTNETSG pSG)
 {
-    UINT cSegs = 0;
     PINTNETSEG paSeg;
     uint8_t * ptr;
     PVOID pVirtualAddress;
@@ -546,7 +563,6 @@ DECLHIDDEN(bool) vboxNetFltWinPostIntnet(PVBOXNETFLTINS pNetFltIf, PVOID pvPacke
         /* we have NDIS_PACKET enqueued, we need to convert it to INTNETSG to be passed to intnet */
         PNDIS_BUFFER pCurrentBuffer = NULL;
         UINT cBufferCount;
-        UINT uBytesCopied = 0;
         UINT cbPacketLength;
 
         pPacket = (PNDIS_PACKET)pvPacket;
@@ -790,7 +806,7 @@ static VOID vboxNetFltWinQuPacketQueueWorkerThreadProc(PVBOXNETFLTINS pNetFltIf)
             PNDIS_PACKET pTmpPacket = NULL;
 #endif
 
-            /*TODO: FIXME: !!! the better approach for performance would be to dequeue all packets at once
+            /** @todo FIXME: !!! the better approach for performance would be to dequeue all packets at once
              * and then go through all dequeued packets
              * the same should be done for enqueue !!! */
             pInfo = vboxNetFltWinQuInterlockedDequeueHead(&pWorker->PacketQueue);
@@ -957,7 +973,7 @@ static NTSTATUS vboxNetFltWinQuCreateSystemThread(PKTHREAD *ppThread, PKSTART_RO
             return STATUS_SUCCESS;
         }
 
-        /* @todo: how would we fail in this case ?*/
+        /** @todo how would we fail in this case ?*/
     }
     return Status;
 }
@@ -1177,7 +1193,7 @@ DECLHIDDEN(NDIS_STATUS) vboxNetFltWinQuEnqueuePacket(PVBOXNETFLTINS pInstance, P
             if (!pInfo)
             {
                 AssertFailed();
-                /* TODO: what status to set? */
+                /** @todo what status to set? */
                 fStatus = NDIS_STATUS_FAILURE;
                 vboxNetFltWinMemFree(pSG);
                 break;
@@ -1207,7 +1223,7 @@ DECLHIDDEN(NDIS_STATUS) vboxNetFltWinQuEnqueuePacket(PVBOXNETFLTINS pInstance, P
             if (!pInfo)
             {
                 AssertFailed();
-                /* TODO: what status to set? */
+                /** @todo what status to set? */
                 fStatus = NDIS_STATUS_FAILURE;
                 break;
             }
@@ -1280,7 +1296,7 @@ DECLHIDDEN(NDIS_STATUS) vboxNetFltWinGetMacAddress(PVBOXNETFLTINS pNetFlt, PRTMA
     status = vboxNetFltWinSynchNdisRequest(pNetFlt, &request);
     if (status != NDIS_STATUS_SUCCESS)
     {
-        /* TODO */
+        /** @todo */
         AssertFailed();
     }
 
@@ -1328,7 +1344,7 @@ DECLHIDDEN(bool) vboxNetFltWinIsPromiscuous(PVBOXNETFLTINS pNetFlt)
     status = vboxNetFltWinSynchNdisRequest(pNetFlt, &request);
     if (status != NDIS_STATUS_SUCCESS)
     {
-        /* TODO */
+        /** @todo */
         AssertFailed();
         return false;
     }
@@ -1355,7 +1371,7 @@ DECLHIDDEN(NDIS_STATUS) vboxNetFltWinSetPromiscuous(PVBOXNETFLTINS pNetFlt, bool
         fStatus = vboxNetFltWinSynchNdisRequest(pNetFlt, &Request);
         if (fStatus != NDIS_STATUS_SUCCESS)
         {
-            /* TODO: */
+            /** @todo */
             AssertFailed();
             return fStatus;
         }
@@ -1388,7 +1404,7 @@ DECLHIDDEN(NDIS_STATUS) vboxNetFltWinSetPromiscuous(PVBOXNETFLTINS pNetFlt, bool
             fStatus = vboxNetFltWinSynchNdisRequest(pNetFlt, &Request);
             if (fStatus != NDIS_STATUS_SUCCESS)
             {
-                /* TODO */
+                /** @todo */
                 AssertFailed();
                 return fStatus;
             }
@@ -1398,7 +1414,8 @@ DECLHIDDEN(NDIS_STATUS) vboxNetFltWinSetPromiscuous(PVBOXNETFLTINS pNetFlt, bool
     }
     return NDIS_STATUS_NOT_SUPPORTED;
 }
-#else /* if defined VBOXNETADP */
+
+#else /* VBOXNETADP */
 
 /**
  *  Generates a new unique MAC address based on our vendor ID
@@ -1441,53 +1458,39 @@ DECLHIDDEN(int) vboxNetFltWinMAC2NdisString(RTMAC *pMac, PNDIS_STRING pNdisStrin
     return VINF_SUCCESS;
 }
 
-static int vboxNetFltWinWchar2Int(WCHAR c, uint8_t * pv)
+static int vboxNetFltWinWchar2Byte(WCHAR c, uint8_t *pb)
 {
     if (c >= L'A' && c <= L'F')
-    {
-        *pv = (c - L'A') + 10;
-    }
+        *pb = (c - L'A') + 10;
     else if (c >= L'a' && c <= L'f')
-    {
-        *pv = (c - L'a') + 10;
-    }
+        *pb = (c - L'a') + 10;
     else if (c >= L'0' && c <= L'9')
-    {
-        *pv = (c - L'0');
-    }
+        *pb = (c - L'0');
     else
-    {
         return VERR_INVALID_PARAMETER;
-    }
     return VINF_SUCCESS;
 }
 
 DECLHIDDEN(int) vboxNetFltWinMACFromNdisString(RTMAC *pMac, PNDIS_STRING pNdisString)
 {
-    int i, rc;
-    PWSTR pString;
 
     /* validate parameters */
     AssertPtrReturn(pMac, VERR_INVALID_PARAMETER);
     AssertPtrReturn(pNdisString, VERR_INVALID_PARAMETER);
     AssertReturn(pNdisString->Length >= 12*sizeof(pNdisString->Buffer[0]), VERR_INVALID_PARAMETER);
 
-    pString = pNdisString->Buffer;
-
-    for (i = 0; i < 6; i++)
+    int rc = VINF_SUCCESS;
+    PWSTR pString = pNdisString->Buffer;
+    for (int i = 0; i < 6; i++)
     {
         uint8_t v1, v2;
-        rc = vboxNetFltWinWchar2Int(pString[0], &v1);
+        rc = vboxNetFltWinWchar2Byte(pString[0], &v1);
         if (RT_FAILURE(rc))
-        {
             break;
-        }
 
-        rc = vboxNetFltWinWchar2Int(pString[1], &v2);
+        rc = vboxNetFltWinWchar2Byte(pString[1], &v2);
         if (RT_FAILURE(rc))
-        {
             break;
-        }
 
         pMac->au8[i] = (v1 << 4) | v2;
 
@@ -1497,7 +1500,8 @@ DECLHIDDEN(int) vboxNetFltWinMACFromNdisString(RTMAC *pMac, PNDIS_STRING pNdisSt
     return rc;
 }
 
-#endif
+#endif /* VBOXNETADP */
+
 /**
  * creates a NDIS_PACKET from the PINTNETSG
  */
@@ -1523,7 +1527,7 @@ DECLHIDDEN(PNDIS_PACKET) vboxNetFltWinNdisPacketFromSG(PVBOXNETFLTINS pNetFlt, P
         PNDIS_BUFFER pBuffer;
         PVOID pvMemBuf;
 
-        /* @todo: generally we do not always need to zero-initialize the complete OOB data here, reinitialize only when/what we need,
+        /** @todo generally we do not always need to zero-initialize the complete OOB data here, reinitialize only when/what we need,
          * however we DO need to reset the status for the packets we indicate via NdisMIndicateReceivePacket to avoid packet loss
          * in case the status contains NDIS_STATUS_RESOURCES */
         VBOXNETFLT_OOB_INIT(pPacket);
@@ -1581,7 +1585,7 @@ DECLHIDDEN(PNDIS_PACKET) vboxNetFltWinNdisPacketFromSG(PVBOXNETFLTINS pNetFlt, P
                      * but keeps the packet flags, clean them here */
                     NdisGetPacketFlags(pPacket) = 0;
                 }
-                /* TODO: set out of bound data */
+                /** @todo set out of bound data */
             }
             else
             {
@@ -1669,7 +1673,7 @@ DECLHIDDEN(VOID) vboxNetFltWinUnload(IN PDRIVER_OBJECT DriverObject)
     rc = vboxNetFltWinFiniIdc();
     if (RT_FAILURE(rc))
     {
-        /* TODO: we can not prevent driver unload here */
+        /** @todo we can not prevent driver unload here */
         AssertFailed();
 
         LogFlowFunc(("vboxNetFltWinFiniIdc - failed, busy.\n"));
@@ -1761,10 +1765,12 @@ NTSTATUS DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING Registry
 //                vboxNetFltWinPtDeregister(&g_VBoxNetFltGlobalsWin.Pt);
 //#endif
                 }
+#ifndef VBOXNETADP /* unreachable for VBOXNETADP because of the above return */
                 vboxNetFltWinMpDeregister(&g_VBoxNetFltGlobalsWin.Mp);
-#ifndef VBOXNETADP
+# ifndef VBOXNETADP
                 NdisFreeSpinLock(&g_VBoxNetFltGlobalsWin.lockFilters);
-#endif /* VBOXNETADP */
+# endif
+#endif
             }
             vboxNetFltWinJobFiniQueue(&g_VBoxJobQueue);
         }
@@ -1960,7 +1966,6 @@ DECLHIDDEN(NDIS_STATUS) vboxNetFltWinPtInitWinIf(PVBOXNETFLTWIN pWinIf)
 #ifndef VBOXNETADP
     int rc;
 #endif
-    BOOLEAN bCallFiniOnFail = FALSE;
 
     LogFlowFunc(("ENTER: pWinIf 0x%p\n", pWinIf));
 
@@ -2023,20 +2028,18 @@ DECLHIDDEN(NDIS_STATUS) vboxNetFltWinPtInitWinIf(PVBOXNETFLTWIN pWinIf)
 #endif
                             return NDIS_STATUS_SUCCESS;
 #ifndef VBOXNETADP
-                            vboxNetFltWinMemFree(pWinIf->MpDeviceName.Buffer);
+                            // unreachable: vboxNetFltWinMemFree(pWinIf->MpDeviceName.Buffer);
                         }
                         RTSemFastMutexDestroy(pWinIf->hSynchRequestMutex);
                     }
                     else
-                    {
                         Status = NDIS_STATUS_FAILURE;
-                    }
                     NdisFreePacketPool(pWinIf->hSendPacketPool);
                 }
                 NdisFreeBufferPool(pWinIf->hSendBufferPool);
             }
-#endif
             NdisFreeBufferPool(pWinIf->hRecvBufferPool);
+#endif
         }
         NdisFreePacketPool(pWinIf->hRecvPacketPool);
     }
@@ -2147,13 +2150,13 @@ DECLHIDDEN(bool) vboxNetFltWinMatchPackets(PNDIS_PACKET pPacket1, PNDIS_PACKET p
     UINT cBufCount1;
     PNDIS_BUFFER pBuffer1;
     UINT uTotalPacketLength1;
-    uint8_t* pMemBuf1;
+    uint8_t *pbMemBuf1 = NULL;
     UINT cbLength1 = 0;
 
     UINT cBufCount2;
     PNDIS_BUFFER pBuffer2;
     UINT uTotalPacketLength2;
-    uint8_t* pMemBuf2;
+    uint8_t *pbMemBuf2 = NULL;
     UINT cbLength2 = 0;
     bool bMatch = true;
 
@@ -2192,32 +2195,32 @@ DECLHIDDEN(bool) vboxNetFltWinMatchPackets(PNDIS_PACKET pPacket1, PNDIS_PACKET p
         {
             if (!cbLength1)
             {
-                NdisQueryBufferSafe(pBuffer1, &pMemBuf1, &cbLength1, NormalPagePriority);
+                NdisQueryBufferSafe(pBuffer1, &pbMemBuf1, &cbLength1, NormalPagePriority);
                 NdisGetNextBuffer(pBuffer1, &pBuffer1);
             }
             else
             {
-                Assert(pMemBuf1);
+                Assert(pbMemBuf1);
                 Assert(ucbLength2Match);
-                pMemBuf1 += ucbLength2Match;
+                pbMemBuf1 += ucbLength2Match;
             }
 
             if (!cbLength2)
             {
-                NdisQueryBufferSafe(pBuffer2, &pMemBuf2, &cbLength2, NormalPagePriority);
+                NdisQueryBufferSafe(pBuffer2, &pbMemBuf2, &cbLength2, NormalPagePriority);
                 NdisGetNextBuffer(pBuffer2, &pBuffer2);
             }
             else
             {
-                Assert(pMemBuf2);
+                Assert(pbMemBuf2);
                 Assert(ucbLength2Match);
-                pMemBuf2 += ucbLength2Match;
+                pbMemBuf2 += ucbLength2Match;
             }
 
             ucbLength2Match = MIN(ucbMatch, cbLength1);
             ucbLength2Match = MIN(ucbLength2Match, cbLength2);
 
-            if (memcmp((PVOID*)pMemBuf1, (PVOID*)pMemBuf2, ucbLength2Match))
+            if (memcmp(pbMemBuf1, pbMemBuf2, ucbLength2Match))
             {
                 bMatch = false;
                 break;
@@ -2252,10 +2255,10 @@ DECLHIDDEN(bool) vboxNetFltWinMatchPacketAndSG(PNDIS_PACKET pPacket, PINTNETSG p
     UINT cBufCount1;
     PNDIS_BUFFER pBuffer1;
     UINT uTotalPacketLength1;
-    uint8_t* pMemBuf1;
+    uint8_t *pbMemBuf1 = NULL;
     UINT cbLength1 = 0;
     UINT uTotalPacketLength2 = pSG->cbTotal;
-    uint8_t* pMemBuf2;
+    uint8_t *pbMemBuf2 = NULL;
     UINT cbLength2 = 0;
     bool bMatch = true;
     bool bCompleteMatch = false;
@@ -2292,34 +2295,34 @@ DECLHIDDEN(bool) vboxNetFltWinMatchPacketAndSG(PNDIS_PACKET pPacket, PINTNETSG p
         {
             if (!cbLength1)
             {
-                NdisQueryBufferSafe(pBuffer1, &pMemBuf1, &cbLength1, NormalPagePriority);
+                NdisQueryBufferSafe(pBuffer1, &pbMemBuf1, &cbLength1, NormalPagePriority);
                 NdisGetNextBuffer(pBuffer1, &pBuffer1);
             }
             else
             {
-                Assert(pMemBuf1);
+                Assert(pbMemBuf1);
                 Assert(ucbLength2Match);
-                pMemBuf1 += ucbLength2Match;
+                pbMemBuf1 += ucbLength2Match;
             }
 
             if (!cbLength2)
             {
                 Assert(i < pSG->cSegsUsed);
-                pMemBuf2 = (uint8_t*)pSG->aSegs[i].pv;
+                pbMemBuf2 = (uint8_t*)pSG->aSegs[i].pv;
                 cbLength2 = pSG->aSegs[i].cb;
                 i++;
             }
             else
             {
-                Assert(pMemBuf2);
+                Assert(pbMemBuf2);
                 Assert(ucbLength2Match);
-                pMemBuf2 += ucbLength2Match;
+                pbMemBuf2 += ucbLength2Match;
             }
 
             ucbLength2Match = MIN(ucbMatch, cbLength1);
             ucbLength2Match = MIN(ucbLength2Match, cbLength2);
 
-            if (memcmp((PVOID*)pMemBuf1, (PVOID*)pMemBuf2, ucbLength2Match))
+            if (memcmp(pbMemBuf1, pbMemBuf2, ucbLength2Match))
             {
                 bMatch = false;
                 AssertFailed();
@@ -2351,11 +2354,11 @@ DECLHIDDEN(bool) vboxNetFltWinMatchPacketAndSG(PNDIS_PACKET pPacket, PINTNETSG p
 static bool vboxNetFltWinMatchSGs(PINTNETSG pSG1, PINTNETSG pSG2, const INT cbMatch)
 {
     UINT uTotalPacketLength1 = pSG1->cbTotal;
-    PVOID pMemBuf1;
+    PVOID pbMemBuf1 = NULL;
     UINT cbLength1 = 0;
     UINT i1 = 0;
     UINT uTotalPacketLength2 = pSG2->cbTotal;
-    PVOID pMemBuf2;
+    PVOID pbMemBuf2 = NULL;
     UINT cbLength2 = 0;
 
     bool bMatch = true;
@@ -2392,7 +2395,7 @@ static bool vboxNetFltWinMatchSGs(PINTNETSG pSG1, PINTNETSG pSG2, const INT cbMa
             if (!cbLength1)
             {
                 Assert(i1 < pSG1->cSegsUsed);
-                pMemBuf1 = pSG1->aSegs[i1].pv;
+                pbMemBuf1 = pSG1->aSegs[i1].pv;
                 cbLength1 = pSG1->aSegs[i1].cb;
                 i1++;
             }
@@ -2400,7 +2403,7 @@ static bool vboxNetFltWinMatchSGs(PINTNETSG pSG1, PINTNETSG pSG2, const INT cbMa
             if (!cbLength2)
             {
                 Assert(i2 < pSG2->cSegsUsed);
-                pMemBuf2 = pSG2->aSegs[i2].pv;
+                pbMemBuf2 = pSG2->aSegs[i2].pv;
                 cbLength2 = pSG2->aSegs[i2].cb;
                 i2++;
             }
@@ -2408,7 +2411,7 @@ static bool vboxNetFltWinMatchSGs(PINTNETSG pSG1, PINTNETSG pSG2, const INT cbMa
             ucbLength2Match = MIN(ucbMatch, cbLength1);
             ucbLength2Match = MIN(ucbLength2Match, cbLength2);
 
-            if (memcmp(pMemBuf1, pMemBuf2, ucbLength2Match))
+            if (memcmp(pbMemBuf1, pbMemBuf2, ucbLength2Match))
             {
                 bMatch = false;
                 AssertFailed();
@@ -2676,6 +2679,8 @@ static NDIS_STATUS vboxNetFltWinDisconnectIt(PVBOXNETFLTINS pInstance)
 {
 #ifndef VBOXNETFLT_NO_PACKET_QUEUE
     vboxNetFltWinQuFiniPacketQueue(pInstance);
+#else
+    RT_NOREF1(pInstance);
 #endif
     return NDIS_STATUS_SUCCESS;
 }
@@ -2745,7 +2750,7 @@ DECLHIDDEN(NDIS_STATUS) vboxNetFltWinDetachFromInterface(PVBOXNETFLTINS pNetFlt,
 
     /* release for the retain we made before waining on the mutex */
     vboxNetFltRelease(pNetFlt, false);
-    
+
     LogFlowFunc(("LEAVE: Status 0x%x\n", Status));
 
     return Status;
@@ -2775,6 +2780,7 @@ static bool vboxNetFltWinIsPromiscuous2(PVBOXNETFLTINS pThis)
     }
     return false;
 #else
+    RT_NOREF1(pThis);
     return true;
 #endif
 }
@@ -2836,7 +2842,8 @@ static void vboxNetFltWinAttachToInterfaceWorker(PATTACH_INFO pAttachInfo)
             {
                 /* rediscovery means adaptor bind is performed while intnet is already using it
                  * i.e. adaptor was unbound while being used by intnet and now being bound back again */
-                Assert(((VBOXNETFTLINSSTATE)ASMAtomicUoReadU32((uint32_t volatile *)&pThis->enmState)) == kVBoxNetFltInsState_Connected);
+                Assert(   ((VBOXNETFTLINSSTATE)ASMAtomicUoReadU32((uint32_t volatile *)&pThis->enmState))
+                       == kVBoxNetFltInsState_Connected);
             }
 #ifndef VBOXNETADP
             Status = vboxNetFltWinPtInitWinIf(&pThis->u.s.WinIf, pAttachInfo->pCreateContext->pOurName);
@@ -2855,9 +2862,7 @@ static void vboxNetFltWinAttachToInterfaceWorker(PATTACH_INFO pAttachInfo)
                 if (Status == NDIS_STATUS_SUCCESS)
                 {
                     if (!pAttachInfo->fRediscovery)
-                    {
                         vboxNetFltWinDrvReference();
-                    }
 #ifndef VBOXNETADP
                     if (pThis->u.s.WinIf.OpenCloseStatus == NDIS_STATUS_SUCCESS)
 #endif
@@ -2883,16 +2888,18 @@ static void vboxNetFltWinAttachToInterfaceWorker(PATTACH_INFO pAttachInfo)
 
                         return;
                     }
+#ifndef VBOXNETADP /* unreachable for VBOXNETADP because of the return above */
                     AssertBreakpoint();
 
                     if (!pAttachInfo->fRediscovery)
                     {
                         vboxNetFltWinDrvDereference();
                     }
-#ifndef VBOXNETADP
+# ifndef VBOXNETADP
                     vboxNetFltWinPtDoUnbinding(pThis, true);
-#else
-                    vboxNetFltWinMpDoDeinitialization(pThis);
+/*# else - unreachable
+                    vboxNetFltWinMpDoDeinitialization(pThis); */
+# endif
 #endif
                 }
                 AssertBreakpoint();
@@ -2944,6 +2951,7 @@ static int vboxNetFltWinAttachToInterface(PVBOXNETFLTINS pThis, void * pContext,
 }
 static NTSTATUS vboxNetFltWinPtDevDispatch(IN PDEVICE_OBJECT pDevObj, IN PIRP pIrp)
 {
+    RT_NOREF1(pDevObj);
     PIO_STACK_LOCATION pIrpSl = IoGetCurrentIrpStackLocation(pIrp);;
     NTSTATUS Status = STATUS_SUCCESS;
 
@@ -2957,7 +2965,7 @@ static NTSTATUS vboxNetFltWinPtDevDispatch(IN PDEVICE_OBJECT pDevObj, IN PIRP pI
         case IRP_MJ_CLOSE:
             break;
         default:
-            Assert(0);
+            AssertFailed();
             break;
     }
 
@@ -3030,7 +3038,7 @@ static NDIS_STATUS vboxNetFltWinDevCreateReference(PVBOXNETFLTGLOBALS_WIN pGloba
     else
     {
         /* should never happen actually */
-        Assert(0);
+        AssertFailed();
         Status = NDIS_STATUS_FAILURE;
     }
     return Status;
@@ -3058,7 +3066,7 @@ static NDIS_STATUS vboxNetFltWinDevDereference(PVBOXNETFLTGLOBALS_WIN pGlobals)
     else
     {
         /* should never happen actually */
-        Assert(0);
+        AssertFailed();
         Status = NDIS_STATUS_FAILURE;
     }
     return Status;
@@ -3091,22 +3099,17 @@ bool vboxNetFltOsMaybeRediscovered(PVBOXNETFLTINS pThis)
 
 int vboxNetFltPortOsXmit(PVBOXNETFLTINS pThis, void *pvIfData, PINTNETSG pSG, uint32_t fDst)
 {
+    RT_NOREF1(pvIfData);
     int rc = VINF_SUCCESS;
     uint32_t cRefs = 0;
 #ifndef VBOXNETADP
     if (fDst & INTNETTRUNKDIR_WIRE)
-    {
         cRefs++;
-    }
     if (fDst & INTNETTRUNKDIR_HOST)
-    {
         cRefs++;
-    }
 #else
-    if (fDst & INTNETTRUNKDIR_WIRE || fDst & INTNETTRUNKDIR_HOST)
-    {
+    if ((fDst & INTNETTRUNKDIR_WIRE) || (fDst & INTNETTRUNKDIR_HOST))
         cRefs = 1;
-    }
 #endif
 
     AssertReturn(cRefs, VINF_SUCCESS);
@@ -3143,14 +3146,11 @@ int vboxNetFltPortOsXmit(PVBOXNETFLTINS pThis, void *pvIfData, PINTNETSG pSG, ui
             {
 #if defined(DEBUG_NETFLT_PACKETS) || !defined(VBOX_LOOPBACK_USEFLAGS)
                 /* the status is NOT pending, complete the packet */
-                bool bTmp = vboxNetFltWinLbRemoveSendPacket(pThis, pPacket);
-                Assert(bTmp);
+                bool fTmp = vboxNetFltWinLbRemoveSendPacket(pThis, pPacket);
+                Assert(fTmp); NOREF(fTmp);
 #endif
                 if (!NT_SUCCESS(fStatus))
-                {
-                    /* TODO: convert status to VERR_xxx */
-                    rc = VERR_GENERAL_FAILURE;
-                }
+                    rc = VERR_GENERAL_FAILURE; /** @todo convert status to VERR_xxx */
 
                 vboxNetFltWinFreeSGNdisPacket(pPacket, true);
             }
@@ -3410,6 +3410,7 @@ void vboxNetFltWinAddAddressHandler(PTA_ADDRESS Address,
                                     PUNICODE_STRING DeviceName,
                                     PTDI_PNP_CONTEXT Context)
 {
+    RT_NOREF2(DeviceName, Context);
     vboxNetFltWinNotifyHostAddress(Address, true);
 }
 
@@ -3417,6 +3418,7 @@ void vboxNetFltWinDelAddressHandler(PTA_ADDRESS Address,
                                     PUNICODE_STRING DeviceName,
                                     PTDI_PNP_CONTEXT Context)
 {
+    RT_NOREF2(DeviceName, Context);
     vboxNetFltWinNotifyHostAddress(Address, false);
 }
 
@@ -3443,7 +3445,7 @@ void vboxNetFltWinRegisterIpAddrNotifier(PVBOXNETFLTINS pThis)
             Info.DelAddressHandlerV2 = vboxNetFltWinDelAddressHandler;
             Assert(!g_VBoxNetFltGlobalsWin.hNotifier);
             NTSTATUS Status = TdiRegisterPnPHandlers(&Info, sizeof(Info), &g_VBoxNetFltGlobalsWin.hNotifier);
-            Log2(("vboxNetFltWinRegisterIpAddrNotifier: TdiRegisterPnPHandlers returned %d\n", Status));
+            Log2(("vboxNetFltWinRegisterIpAddrNotifier: TdiRegisterPnPHandlers returned %d\n", Status)); NOREF(Status);
         }
         else
             Log2(("vboxNetFltWinRegisterIpAddrNotifier: already registed\n"));
@@ -3486,7 +3488,7 @@ void vboxNetFltWinUnregisterIpAddrNotifier(PVBOXNETFLTINS pThis)
         {
             NTSTATUS Status = TdiDeregisterPnPHandlers(hNotifier);
             Log2(("vboxNetFltWinUnregisterIpAddrNotifier: TdiDeregisterPnPHandlers(%p) returned %d\n",
-                  hNotifier, Status));
+                  hNotifier, Status)); NOREF(Status);
         }
         else
             Log2(("vboxNetFltWinUnregisterIpAddrNotifier: filters remain, do not deregister handlers yet\n"));
@@ -3611,16 +3613,19 @@ int vboxNetFltOsPreInitInstance(PVBOXNETFLTINS pThis)
 
 void vboxNetFltPortOsNotifyMacAddress(PVBOXNETFLTINS pThis, void *pvIfData, PCRTMAC pMac)
 {
+    RT_NOREF3(pThis, pvIfData, pMac);
 }
 
 int vboxNetFltPortOsConnectInterface(PVBOXNETFLTINS pThis, void *pvIf, void **ppvIfData)
 {
     /* Nothing to do */
+    RT_NOREF3(pThis, pvIf, ppvIfData);
     return VINF_SUCCESS;
 }
 
 int vboxNetFltPortOsDisconnectInterface(PVBOXNETFLTINS pThis, void *pvIfData)
 {
     /* Nothing to do */
+    RT_NOREF2(pThis, pvIfData);
     return VINF_SUCCESS;
 }
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltRt-win.h b/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltRt-win.h
index e8c2e3b..639e470 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltRt-win.h
+++ b/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltRt-win.h
@@ -4,7 +4,7 @@
  * NetFlt Runtime API
  */
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetLwf-win.cpp b/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetLwf-win.cpp
index 4f2a499..67a469c 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetLwf-win.cpp
+++ b/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetLwf-win.cpp
@@ -3,7 +3,7 @@
  * VBoxNetLwf-win.cpp - NDIS6 Bridged Networking Driver, Windows-specific code.
  */
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -46,48 +46,10 @@
 #include <iprt/list.h>
 #include <VBox/intnetinline.h>
 
-/// @todo Not sure why, but can it help with build errors?
-RT_C_DECLS_BEGIN
-/* ntddk.h has a missing #pragma pack(), work around it
- * see #ifdef VBOX_WITH_WORKAROUND_MISSING_PACK below for detail */
-#define VBOX_WITH_WORKAROUND_MISSING_PACK
-#if (_MSC_VER >= 1400) && !defined(VBOX_WITH_PATCHED_DDK)
-#  define _InterlockedExchange           _InterlockedExchange_StupidDDKVsCompilerCrap
-#  define _InterlockedExchangeAdd        _InterlockedExchangeAdd_StupidDDKVsCompilerCrap
-#  define _InterlockedCompareExchange    _InterlockedCompareExchange_StupidDDKVsCompilerCrap
-#  define _InterlockedAddLargeStatistic  _InterlockedAddLargeStatistic_StupidDDKVsCompilerCrap
-#  define _interlockedbittestandset      _interlockedbittestandset_StupidDDKVsCompilerCrap
-#  define _interlockedbittestandreset    _interlockedbittestandreset_StupidDDKVsCompilerCrap
-#  define _interlockedbittestandset64    _interlockedbittestandset64_StupidDDKVsCompilerCrap
-#  define _interlockedbittestandreset64  _interlockedbittestandreset64_StupidDDKVsCompilerCrap
-#  pragma warning(disable : 4163)
-#  ifdef VBOX_WITH_WORKAROUND_MISSING_PACK
-#    pragma warning(disable : 4103)
-#  endif
-#  include <ntddk.h>
-#  pragma warning(default : 4163)
-#  ifdef VBOX_WITH_WORKAROUND_MISSING_PACK
-#    pragma pack()
-#    pragma warning(default : 4103)
-#  endif
-#  undef  _InterlockedExchange
-#  undef  _InterlockedExchangeAdd
-#  undef  _InterlockedCompareExchange
-#  undef  _InterlockedAddLargeStatistic
-#  undef  _interlockedbittestandset
-#  undef  _interlockedbittestandreset
-#  undef  _interlockedbittestandset64
-#  undef  _interlockedbittestandreset64
-#  include <ndis.h>
-#  include <netioapi.h>
-#else
-#  include <ntddk.h>
-#  include <netioapi.h>
-/* can include ndis.h right away */
-#  include <ndis.h>
-#endif
+#include <iprt/nt/ntddk.h>
+#include <iprt/nt/ndis.h>
+#include <iprt/win/netioapi.h>
 #include <mstcpip.h>
-RT_C_DECLS_END
 
 #define LogError(x) DbgPrint x
 
@@ -113,22 +75,6 @@ typedef struct VBOXNETFLTWIN
 #include "VBoxNetLwf-win.h"
 #include "VBox/VBoxNetCmn-win.h"
 
-/* Forward declarations */
-FILTER_ATTACH vboxNetLwfWinAttach;
-FILTER_DETACH vboxNetLwfWinDetach;
-FILTER_RESTART vboxNetLwfWinRestart;
-FILTER_PAUSE vboxNetLwfWinPause;
-FILTER_OID_REQUEST vboxNetLwfWinOidRequest;
-FILTER_OID_REQUEST_COMPLETE vboxNetLwfWinOidRequestComplete;
-//FILTER_CANCEL_OID_REQUEST vboxNetLwfWinCancelOidRequest;
-FILTER_STATUS vboxNetLwfWinStatus;
-//FILTER_NET_PNP_EVENT vboxNetLwfWinPnPEvent;
-FILTER_SEND_NET_BUFFER_LISTS vboxNetLwfWinSendNetBufferLists;
-FILTER_SEND_NET_BUFFER_LISTS_COMPLETE vboxNetLwfWinSendNetBufferListsComplete;
-FILTER_RECEIVE_NET_BUFFER_LISTS vboxNetLwfWinReceiveNetBufferLists;
-FILTER_RETURN_NET_BUFFER_LISTS vboxNetLwfWinReturnNetBufferLists;
-KSTART_ROUTINE vboxNetLwfWinInitIdcWorker;
-
 typedef enum {
     LwfState_Detached = 0,
     LwfState_Attaching,
@@ -247,10 +193,30 @@ typedef struct _VBOXNETLWF_OIDREQ {
 } VBOXNETLWF_OIDREQ;
 typedef VBOXNETLWF_OIDREQ *PVBOXNETLWF_OIDREQ;
 
-/* Forward declarations */
+
+/*********************************************************************************************************************************
+*   Internal Functions                                                                                                           *
+*********************************************************************************************************************************/
+static FILTER_ATTACH                            vboxNetLwfWinAttach;
+static FILTER_DETACH                            vboxNetLwfWinDetach;
+static FILTER_RESTART                           vboxNetLwfWinRestart;
+static FILTER_PAUSE                             vboxNetLwfWinPause;
+static FILTER_OID_REQUEST                       vboxNetLwfWinOidRequest;
+static FILTER_OID_REQUEST_COMPLETE              vboxNetLwfWinOidRequestComplete;
+//static FILTER_CANCEL_OID_REQUEST                vboxNetLwfWinCancelOidRequest;
+static FILTER_STATUS                            vboxNetLwfWinStatus;
+//static FILTER_NET_PNP_EVENT                     vboxNetLwfWinPnPEvent;
+static FILTER_SEND_NET_BUFFER_LISTS             vboxNetLwfWinSendNetBufferLists;
+static FILTER_SEND_NET_BUFFER_LISTS_COMPLETE    vboxNetLwfWinSendNetBufferListsComplete;
+static FILTER_RECEIVE_NET_BUFFER_LISTS          vboxNetLwfWinReceiveNetBufferLists;
+static FILTER_RETURN_NET_BUFFER_LISTS           vboxNetLwfWinReturnNetBufferLists;
+static KSTART_ROUTINE vboxNetLwfWinInitIdcWorker;
+
 static VOID vboxNetLwfWinUnloadDriver(IN PDRIVER_OBJECT pDriver);
-static int vboxNetLwfWinInitBase();
-static int vboxNetLwfWinFini();
+static int  vboxNetLwfWinInitBase(void);
+static int  vboxNetLwfWinFini(void);
+
+
 
 /**
  * Logs an error to the system event log.
@@ -316,6 +282,7 @@ static void vboxNetLwfLogErrorEvent(NTSTATUS uErrCode, NTSTATUS uReturnedStatus,
 }
 
 #ifdef DEBUG
+
 static const char *vboxNetLwfWinStatusToText(NDIS_STATUS code)
 {
     switch (code)
@@ -653,11 +620,11 @@ DECLINLINE(void) vboxNetLwfWinDumpPacket(PCINTNETSG pSG, const char *cszText)
 }
 
 #else /* !DEBUG */
-#define vboxNetLwfWinDumpFilterTypes(uFlags)
-#define vboxNetLwfWinDumpOffloadSettings(p)
-#define vboxNetLwfWinDumpSetOffloadSettings(p)
-#define vboxNetLwfWinDumpPackets(m,l)
-#define vboxNetLwfWinDumpPacket(p,t)
+# define vboxNetLwfWinDumpFilterTypes(uFlags)    do { } while (0)
+# define vboxNetLwfWinDumpOffloadSettings(p)     do { } while (0)
+# define vboxNetLwfWinDumpSetOffloadSettings(p)  do { } while (0)
+# define vboxNetLwfWinDumpPackets(m,l)           do { } while (0)
+# define vboxNetLwfWinDumpPacket(p,t)            do { } while (0)
 #endif /* !DEBUG */
 
 DECLINLINE(bool) vboxNetLwfWinChangeState(PVBOXNETLWF_MODULE pModuleCtx, uint32_t enmNew, uint32_t enmOld = LwfState_32BitHack)
@@ -685,6 +652,7 @@ DECLINLINE(bool) vboxNetLwfWinChangeState(PVBOXNETLWF_MODULE pModuleCtx, uint32_
         Log(("vboxNetLwfWinChangeState: state change %s -> %s\n",
              vboxNetLwfWinStateToText(enmPrevState),
              vboxNetLwfWinStateToText(enmNew)));
+        NOREF(enmPrevState);
     }
     return fSuccess;
 }
@@ -823,7 +791,7 @@ VOID vboxNetLwfWinOidRequestComplete(IN NDIS_HANDLE hModuleCtx,
     {
         /* NDIS is supposed to serialize requests */
         PNDIS_OID_REQUEST pPrev = ASMAtomicXchgPtrT(&pModuleCtx->pPendingRequest, NULL, PNDIS_OID_REQUEST);
-        Assert(pPrev == pRequest);
+        Assert(pPrev == pRequest); NOREF(pPrev);
 
         Log5(("vboxNetLwfWinOidRequestComplete: completed rq type=%d oid=%x\n", pRequest->RequestType, pRequest->DATA.QUERY_INFORMATION.Oid));
         vboxNetLwfWinCopyOidRequestResults(pRequest, pOriginal);
@@ -944,6 +912,7 @@ static NDIS_STATUS vboxNetLwfWinSetPacketFilter(PVBOXNETLWF_MODULE pModuleCtx, b
 
 static NTSTATUS vboxNetLwfWinDevDispatch(IN PDEVICE_OBJECT pDevObj, IN PIRP pIrp)
 {
+    RT_NOREF1(pDevObj);
     PIO_STACK_LOCATION pIrpSl = IoGetCurrentIrpStackLocation(pIrp);;
     NTSTATUS Status = STATUS_SUCCESS;
 
@@ -957,7 +926,7 @@ static NTSTATUS vboxNetLwfWinDevDispatch(IN PDEVICE_OBJECT pDevObj, IN PIRP pIrp
         case IRP_MJ_CLOSE:
             break;
         default:
-            Assert(0);
+            AssertFailed();
             break;
     }
 
@@ -1244,6 +1213,7 @@ static VOID vboxNetLwfWinDetach(IN NDIS_HANDLE hModuleCtx)
 
 static NDIS_STATUS vboxNetLwfWinPause(IN NDIS_HANDLE hModuleCtx, IN PNDIS_FILTER_PAUSE_PARAMETERS pParameters)
 {
+    RT_NOREF1(pParameters);
     LogFlow(("==>vboxNetLwfWinPause: module=%p\n", hModuleCtx));
     PVBOXNETLWF_MODULE pModuleCtx = (PVBOXNETLWF_MODULE)hModuleCtx;
     vboxNetLwfWinChangeState(pModuleCtx, LwfState_Pausing, LwfState_Running);
@@ -1278,6 +1248,7 @@ static void vboxNetLwfWinIndicateOffload(PVBOXNETLWF_MODULE pModuleCtx, PNDIS_OF
 
 static NDIS_STATUS vboxNetLwfWinRestart(IN NDIS_HANDLE hModuleCtx, IN PNDIS_FILTER_RESTART_PARAMETERS pParameters)
 {
+    RT_NOREF1(pParameters);
     LogFlow(("==>vboxNetLwfWinRestart: module=%p\n", hModuleCtx));
     PVBOXNETLWF_MODULE pModuleCtx = (PVBOXNETLWF_MODULE)hModuleCtx;
     vboxNetLwfWinChangeState(pModuleCtx, LwfState_Restarting, LwfState_Paused);
@@ -1309,19 +1280,21 @@ DECLINLINE(void) vboxNetLwfWinFreeMdlChain(PMDL pMdl)
     while (pMdl)
     {
         pMdlNext = pMdl->Next;
-#ifndef VBOXNETLWF_SYNC_SEND
+# ifndef VBOXNETLWF_SYNC_SEND
         PUCHAR pDataBuf;
         ULONG cb = 0;
         NdisQueryMdl(pMdl, &pDataBuf, &cb, NormalPagePriority);
-#endif /* !VBOXNETLWF_SYNC_SEND */
+# endif /* !VBOXNETLWF_SYNC_SEND */
         NdisFreeMdl(pMdl);
         Log4(("vboxNetLwfWinFreeMdlChain: freed MDL 0x%p\n", pMdl));
-#ifndef VBOXNETLWF_SYNC_SEND
+# ifndef VBOXNETLWF_SYNC_SEND
         NdisFreeMemory(pDataBuf, 0, 0);
         Log4(("vboxNetLwfWinFreeMdlChain: freed data buffer 0x%p\n", pDataBuf));
-#endif /* !VBOXNETLWF_SYNC_SEND */
+# endif /* !VBOXNETLWF_SYNC_SEND */
         pMdl = pMdlNext;
     }
+#else  /* VBOXNETLWF_FIXED_SIZE_POOLS */
+    RT_NOREF1(pMdl);
 #endif /* VBOXNETLWF_FIXED_SIZE_POOLS */
 }
 
@@ -1653,7 +1626,6 @@ DECLINLINE(bool) vboxNetLwfWinIsRunning(PVBOXNETLWF_MODULE pModule)
 
 VOID vboxNetLwfWinSendNetBufferLists(IN NDIS_HANDLE hModuleCtx, IN PNET_BUFFER_LIST pBufLists, IN NDIS_PORT_NUMBER nPort, IN ULONG fFlags)
 {
-    size_t cb = 0;
     LogFlow(("==>vboxNetLwfWinSendNetBufferLists: module=%p\n", hModuleCtx));
     PVBOXNETLWF_MODULE pModule = (PVBOXNETLWF_MODULE)hModuleCtx;
     vboxNetLwfWinDumpPackets("vboxNetLwfWinSendNetBufferLists: got", pBufLists);
@@ -1730,7 +1702,6 @@ VOID vboxNetLwfWinSendNetBufferLists(IN NDIS_HANDLE hModuleCtx, IN PNET_BUFFER_L
 
 VOID vboxNetLwfWinSendNetBufferListsComplete(IN NDIS_HANDLE hModuleCtx, IN PNET_BUFFER_LIST pBufLists, IN ULONG fFlags)
 {
-    size_t cb = 0;
     LogFlow(("==>vboxNetLwfWinSendNetBufferListsComplete: module=%p\n", hModuleCtx));
     PVBOXNETLWF_MODULE pModule = (PVBOXNETLWF_MODULE)hModuleCtx;
     PNET_BUFFER_LIST pList = pBufLists;
@@ -1901,7 +1872,6 @@ VOID vboxNetLwfWinReceiveNetBufferLists(IN NDIS_HANDLE hModuleCtx,
 
 VOID vboxNetLwfWinReturnNetBufferLists(IN NDIS_HANDLE hModuleCtx, IN PNET_BUFFER_LIST pBufLists, IN ULONG fFlags)
 {
-    size_t cb = 0;
     LogFlow(("==>vboxNetLwfWinReturnNetBufferLists: module=%p\n", hModuleCtx));
     PVBOXNETLWF_MODULE pModule = (PVBOXNETLWF_MODULE)hModuleCtx;
     PNET_BUFFER_LIST pList = pBufLists;
@@ -1955,6 +1925,7 @@ VOID vboxNetLwfWinReturnNetBufferLists(IN NDIS_HANDLE hModuleCtx, IN PNET_BUFFER
  */
 DECLHIDDEN(NDIS_STATUS) vboxNetLwfWinRegister(PDRIVER_OBJECT pDriverObject, PUNICODE_STRING pRegistryPathStr)
 {
+    RT_NOREF1(pRegistryPathStr);
     NDIS_FILTER_DRIVER_CHARACTERISTICS FChars;
     NDIS_STRING FriendlyName;
     NDIS_STRING UniqueName;
@@ -2105,6 +2076,7 @@ NTSTATUS DriverEntry(IN PDRIVER_OBJECT pDriverObject, IN PUNICODE_STRING pRegist
 
 static VOID vboxNetLwfWinUnloadDriver(IN PDRIVER_OBJECT pDriver)
 {
+    RT_NOREF1(pDriver);
     LogFlow(("==>vboxNetLwfWinUnloadDriver: driver=%p\n", pDriver));
     vboxNetLwfWinDevDestroy(&g_VBoxNetLwfGlobals);
     NdisFDeregisterFilterDriver(g_VBoxNetLwfGlobals.hFilterDriver);
@@ -2259,6 +2231,7 @@ bool vboxNetFltOsMaybeRediscovered(PVBOXNETFLTINS pThis)
 
 int vboxNetFltPortOsXmit(PVBOXNETFLTINS pThis, void *pvIfData, PINTNETSG pSG, uint32_t fDst)
 {
+    RT_NOREF1(pvIfData);
     int rc = VINF_SUCCESS;
 
     PVBOXNETLWF_MODULE pModule = (PVBOXNETLWF_MODULE)pThis->u.s.WinIf.hModuleCtx;
@@ -2277,9 +2250,9 @@ int vboxNetFltPortOsXmit(PVBOXNETFLTINS pThis, void *pvIfData, PINTNETSG pSG, ui
         return VINF_SUCCESS;
     }
 
-    const char *pszDir = (fDst & INTNETTRUNKDIR_WIRE) ?
-        ( (fDst & INTNETTRUNKDIR_HOST) ? "intnet --> all" : "intnet --> wire" ) : "intnet --> host";
-    vboxNetLwfWinDumpPacket(pSG, pszDir);
+    vboxNetLwfWinDumpPacket(pSG,   !(fDst & INTNETTRUNKDIR_WIRE) ? "intnet --> host"
+                                 : !(fDst & INTNETTRUNKDIR_HOST) ? "intnet --> wire" : "intnet --> all");
+
     /*
      * There are two possible strategies to deal with incoming SGs:
      * 1) make a copy of data and complete asynchronously;
@@ -2353,6 +2326,7 @@ NDIS_IO_WORKITEM_FUNCTION vboxNetLwfWinToggleOffloading;
 VOID vboxNetLwfWinToggleOffloading(PVOID WorkItemContext, NDIS_HANDLE NdisIoWorkItemHandle)
 {
     /* WARNING! Call this with IRQL=Passive! */
+    RT_NOREF1(NdisIoWorkItemHandle);
     PVBOXNETLWF_MODULE pModuleCtx = (PVBOXNETLWF_MODULE)WorkItemContext;
 
     if (ASMAtomicReadBool(&pModuleCtx->fActive))
@@ -2414,6 +2388,7 @@ void vboxNetFltPortOsSetActive(PVBOXNETFLTINS pThis, bool fActive)
 
 int vboxNetFltOsDisconnectIt(PVBOXNETFLTINS pThis)
 {
+    RT_NOREF1(pThis);
     LogFlow(("==>vboxNetFltOsDisconnectIt: instance=%p\n", pThis));
     LogFlow(("<==vboxNetFltOsDisconnectIt: return 0\n"));
     return VINF_SUCCESS;
@@ -2421,6 +2396,7 @@ int vboxNetFltOsDisconnectIt(PVBOXNETFLTINS pThis)
 
 int vboxNetFltOsConnectIt(PVBOXNETFLTINS pThis)
 {
+    RT_NOREF1(pThis);
     LogFlow(("==>vboxNetFltOsConnectIt: instance=%p\n", pThis));
     LogFlow(("<==vboxNetFltOsConnectIt: return 0\n"));
     return VINF_SUCCESS;
@@ -2437,7 +2413,6 @@ static void __stdcall vboxNetLwfWinIpAddrChangeCallback(IN PVOID pvCtx,
                                                         IN MIB_NOTIFICATION_TYPE enmNotifType)
 {
     PVBOXNETFLTINS pThis = (PVBOXNETFLTINS)pvCtx;
-    PVBOXNETLWF_MODULE pModule = (PVBOXNETLWF_MODULE)pThis->u.s.WinIf.hModuleCtx;
 
     /* We are only interested in add or remove notifications. */
     bool fAdded;
@@ -2569,6 +2544,7 @@ static void vboxNetLwfWinReportCapabilities(PVBOXNETFLTINS pThis, PVBOXNETLWF_MO
 
 int vboxNetFltOsInitInstance(PVBOXNETFLTINS pThis, void *pvContext)
 {
+    RT_NOREF1(pvContext);
     LogFlow(("==>vboxNetFltOsInitInstance: instance=%p context=%p\n", pThis, pvContext));
     AssertReturn(pThis, VERR_INVALID_PARAMETER);
     Log(("vboxNetFltOsInitInstance: trunk name=%s\n", pThis->szName));
@@ -2606,12 +2582,14 @@ int vboxNetFltOsPreInitInstance(PVBOXNETFLTINS pThis)
 
 void vboxNetFltPortOsNotifyMacAddress(PVBOXNETFLTINS pThis, void *pvIfData, PCRTMAC pMac)
 {
+    RT_NOREF3(pThis, pvIfData, pMac);
     LogFlow(("==>vboxNetFltPortOsNotifyMacAddress: instance=%p data=%p mac=%RTmac\n", pThis, pvIfData, pMac));
     LogFlow(("<==vboxNetFltPortOsNotifyMacAddress\n"));
 }
 
 int vboxNetFltPortOsConnectInterface(PVBOXNETFLTINS pThis, void *pvIf, void **ppvIfData)
 {
+    RT_NOREF3(pThis, pvIf, ppvIfData);
     LogFlow(("==>vboxNetFltPortOsConnectInterface: instance=%p if=%p data=%p\n", pThis, pvIf, ppvIfData));
     LogFlow(("<==vboxNetFltPortOsConnectInterface: return 0\n"));
     /* Nothing to do */
@@ -2620,6 +2598,7 @@ int vboxNetFltPortOsConnectInterface(PVBOXNETFLTINS pThis, void *pvIf, void **pp
 
 int vboxNetFltPortOsDisconnectInterface(PVBOXNETFLTINS pThis, void *pvIfData)
 {
+    RT_NOREF2(pThis, pvIfData);
     LogFlow(("==>vboxNetFltPortOsDisconnectInterface: instance=%p data=%p\n", pThis, pvIfData));
     LogFlow(("<==vboxNetFltPortOsDisconnectInterface: return 0\n"));
     /* Nothing to do */
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetLwf-win.h b/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetLwf-win.h
index 8208825..b442c0a 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetLwf-win.h
+++ b/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetLwf-win.h
@@ -3,7 +3,7 @@
  * VBoxNetLwf-win.h - Bridged Networking Driver, Windows-specific code.
  */
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetLwf.inf b/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetLwf.inf
index 937a8d4..3c75903 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetLwf.inf
+++ b/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetLwf.inf
@@ -3,7 +3,7 @@
 ; VBoxNetLwf.inf - VirtualBox Bridged Networking Driver inf file
 ;
 ;
-; Copyright (C) 2014-2015 Oracle Corporation
+; Copyright (C) 2014-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/win/nobj/VBoxNetFltNobj.cpp b/src/VBox/HostDrivers/VBoxNetFlt/win/nobj/VBoxNetFltNobj.cpp
index 9f3807d..b82f18a 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/win/nobj/VBoxNetFltNobj.cpp
+++ b/src/VBox/HostDrivers/VBoxNetFlt/win/nobj/VBoxNetFltNobj.cpp
@@ -15,7 +15,7 @@
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
 #include "VBoxNetFltNobj.h"
-#include <Ntddndis.h>
+#include <iprt/win/ntddndis.h>
 #include <assert.h>
 #include <stdio.h>
 
@@ -93,6 +93,7 @@ STDMETHODIMP VBoxNetFltNobj::ApplyRegistryChanges()
 
 STDMETHODIMP VBoxNetFltNobj::ApplyPnpChanges(IN INetCfgPnpReconfigCallback *pCallback)
 {
+    RT_NOREF1(pCallback);
     return S_OK;
 }
 
@@ -270,7 +271,7 @@ static HRESULT vboxNetFltWinNotifyCheckMsLoop(IN INetCfgComponent *pComponent, O
                 }
                 else
                 {
-                    /* TODO: we should check the default medium in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\<driver_id>\Ndi\Params\Medium, REG_SZ "Default" value */
+                    /** @todo we should check the default medium in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\<driver_id>\Ndi\Params\Medium, REG_SZ "Default" value */
                     NonStandardAssertBreakpoint();
                     *pbShouldBind = true;
                 }
@@ -535,6 +536,7 @@ STDMETHODIMP VBoxNetFltNobj::NotifyBindingPath(IN DWORD dwChangeFlag, IN INetCfg
 
 STDMETHODIMP VBoxNetFltNobj::QueryBindingPath(IN DWORD dwChangeFlag, IN INetCfgBindingPath *pNetCfgBP)
 {
+    RT_NOREF1(dwChangeFlag);
     if (vboxNetFltWinNotifyShouldBind(pNetCfgBP))
         return S_OK;
     return NETCFG_S_DISABLE_QUERY;
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/win/nobj/VBoxNetFltNobj.def b/src/VBox/HostDrivers/VBoxNetFlt/win/nobj/VBoxNetFltNobj.def
index b022bbc..5fbedbb 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/win/nobj/VBoxNetFltNobj.def
+++ b/src/VBox/HostDrivers/VBoxNetFlt/win/nobj/VBoxNetFltNobj.def
@@ -4,7 +4,7 @@
 ; Library def file
 ;
 ;
-; Copyright (C) 2011-2015 Oracle Corporation
+; Copyright (C) 2011-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/win/nobj/VBoxNetFltNobj.h b/src/VBox/HostDrivers/VBoxNetFlt/win/nobj/VBoxNetFltNobj.h
index dfa2ee2..9867c97 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/win/nobj/VBoxNetFltNobj.h
+++ b/src/VBox/HostDrivers/VBoxNetFlt/win/nobj/VBoxNetFltNobj.h
@@ -17,7 +17,7 @@
 #ifndef ___VBoxNetFltNobj_h___
 #define ___VBoxNetFltNobj_h___
 
-#include <windows.h>
+#include <iprt/win/windows.h>
 
 #include "VBox/com/defs.h"
 #include "VBoxNetFltNobjT.h"
@@ -37,7 +37,7 @@ class ATL_NO_VTABLE VBoxNetFltNobj :
 {
 public:
     VBoxNetFltNobj();
-    ~VBoxNetFltNobj();
+    virtual ~VBoxNetFltNobj();
 
     BEGIN_COM_MAP(VBoxNetFltNobj)
         COM_INTERFACE_ENTRY(INetCfgComponentControl)
@@ -70,4 +70,4 @@ private:
     BOOL mbInstalling;
 };
 
-#endif /* #ifndef ___VBoxNetFltNobj_h___ */
+#endif /* !___VBoxNetFltNobj_h___ */
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/win/nobj/VBoxNetFltNobj.rc b/src/VBox/HostDrivers/VBoxNetFlt/win/nobj/VBoxNetFltNobj.rc
index f98786f..a197017 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/win/nobj/VBoxNetFltNobj.rc
+++ b/src/VBox/HostDrivers/VBoxNetFlt/win/nobj/VBoxNetFltNobj.rc
@@ -3,7 +3,7 @@
  * VBoxNetFltNobj - Resource file containing version info and icon.
  */
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/win/nobj/VBoxNetFltNobjRc.h b/src/VBox/HostDrivers/VBoxNetFlt/win/nobj/VBoxNetFltNobjRc.h
index 0c7c175..064fb29 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/win/nobj/VBoxNetFltNobjRc.h
+++ b/src/VBox/HostDrivers/VBoxNetFlt/win/nobj/VBoxNetFltNobjRc.h
@@ -4,7 +4,7 @@
  * Resource definitions
  */
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/win/tools/VBoxNetAdpInstall.cpp b/src/VBox/HostDrivers/VBoxNetFlt/win/tools/VBoxNetAdpInstall.cpp
index e2feb85..bd0e56e 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/win/tools/VBoxNetAdpInstall.cpp
+++ b/src/VBox/HostDrivers/VBoxNetFlt/win/tools/VBoxNetAdpInstall.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/win/tools/VBoxNetAdpUninstall.cpp b/src/VBox/HostDrivers/VBoxNetFlt/win/tools/VBoxNetAdpUninstall.cpp
index 4672047..f0d9e96 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/win/tools/VBoxNetAdpUninstall.cpp
+++ b/src/VBox/HostDrivers/VBoxNetFlt/win/tools/VBoxNetAdpUninstall.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -75,5 +75,6 @@ static int VBoxNetAdpUninstall()
 
 int __cdecl main(int argc, char **argv)
 {
+    RT_NOREF2(argc, argv);
     return VBoxNetAdpUninstall();
 }
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/win/tools/VBoxNetFltInstall.cpp b/src/VBox/HostDrivers/VBoxNetFlt/win/tools/VBoxNetFltInstall.cpp
index 6abc72c..2dbe8b4 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/win/tools/VBoxNetFltInstall.cpp
+++ b/src/VBox/HostDrivers/VBoxNetFlt/win/tools/VBoxNetFltInstall.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -169,5 +169,6 @@ static int VBoxNetFltInstall()
 
 int __cdecl main(int argc, char **argv)
 {
+    RT_NOREF2(argc, argv);
     return VBoxNetFltInstall();
 }
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/win/tools/VBoxNetFltUninstall.cpp b/src/VBox/HostDrivers/VBoxNetFlt/win/tools/VBoxNetFltUninstall.cpp
index 1524d81..8033a85 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/win/tools/VBoxNetFltUninstall.cpp
+++ b/src/VBox/HostDrivers/VBoxNetFlt/win/tools/VBoxNetFltUninstall.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -99,5 +99,6 @@ static int VBoxNetFltUninstall()
 
 int __cdecl main(int argc, char **argv)
 {
+    RT_NOREF2(argc, argv);
     return VBoxNetFltUninstall();
 }
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/win/tools/VBoxNetLwfInstall.cpp b/src/VBox/HostDrivers/VBoxNetFlt/win/tools/VBoxNetLwfInstall.cpp
index 062a025..ddd66c9 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/win/tools/VBoxNetLwfInstall.cpp
+++ b/src/VBox/HostDrivers/VBoxNetFlt/win/tools/VBoxNetLwfInstall.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -153,5 +153,6 @@ static int VBoxNetLwfInstall()
 
 int __cdecl main(int argc, char **argv)
 {
+    RT_NOREF2(argc, argv);
     return VBoxNetLwfInstall();
 }
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/win/tools/VBoxNetLwfUninstall.cpp b/src/VBox/HostDrivers/VBoxNetFlt/win/tools/VBoxNetLwfUninstall.cpp
index 9586277..19ab688 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/win/tools/VBoxNetLwfUninstall.cpp
+++ b/src/VBox/HostDrivers/VBoxNetFlt/win/tools/VBoxNetLwfUninstall.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -96,5 +96,6 @@ static int VBoxNetLwfUninstall()
 
 int __cdecl main(int argc, char **argv)
 {
+    RT_NOREF2(argc, argv);
     return VBoxNetLwfUninstall();
 }
diff --git a/src/VBox/HostDrivers/VBoxPci/Makefile.kmk b/src/VBox/HostDrivers/VBoxPci/Makefile.kmk
index a78b1a9..c918656 100644
--- a/src/VBox/HostDrivers/VBoxPci/Makefile.kmk
+++ b/src/VBox/HostDrivers/VBoxPci/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2011-2015 Oracle Corporation
+# Copyright (C) 2011-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxPci/VBoxPci.c b/src/VBox/HostDrivers/VBoxPci/VBoxPci.c
index 35905e3..2249632 100644
--- a/src/VBox/HostDrivers/VBoxPci/VBoxPci.c
+++ b/src/VBox/HostDrivers/VBoxPci/VBoxPci.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxPci/VBoxPciInternal.h b/src/VBox/HostDrivers/VBoxPci/VBoxPciInternal.h
index 598ebd5..c1f8d46 100644
--- a/src/VBox/HostDrivers/VBoxPci/VBoxPciInternal.h
+++ b/src/VBox/HostDrivers/VBoxPci/VBoxPciInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c b/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
index 00fe94c..3a3f00a 100644
--- a/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
+++ b/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -220,7 +220,7 @@ static int vboxPciLinuxDevRegisterWithIommu(PVBOXRAWPCIINS pIns)
     {
         if (RT_LIKELY(pData->pIommuDomain))
         {
-            /** @todo: KVM checks IOMMU_CAP_CACHE_COHERENCY and sets
+            /** @todo KVM checks IOMMU_CAP_CACHE_COHERENCY and sets
              *  flag IOMMU_CACHE later used when mapping physical
              *  addresses, which could improve performance.
              */
@@ -412,7 +412,7 @@ static int vboxPciLinuxDevDetachHostDriver(PVBOXRAWPCIINS pIns)
             printk(KERN_DEBUG "vboxpci: ERROR: %s contains invalid symbols\n", currentDriver);
             return VERR_ACCESS_DENIED;
         }
-        /** @todo: RTStrCopy not exported. */
+        /** @todo RTStrCopy not exported. */
         strncpy(pIns->szPrevDriver, currentDriver, sizeof(pIns->szPrevDriver));
     }
 
@@ -1023,12 +1023,12 @@ DECLHIDDEN(int) vboxPciOsDevPowerStateChange(PVBOXRAWPCIINS pIns, PCIRAWPOWERSTA
         case PCIRAW_POWER_SUSPEND:
             vbpci_printk(KERN_DEBUG, pIns->pPciDev, "PCIRAW_POWER_SUSPEND\n");
             rc = VINF_SUCCESS;
-            /// @todo: what do we do here?
+            /// @todo what do we do here?
             break;
         case PCIRAW_POWER_RESUME:
             vbpci_printk(KERN_DEBUG, pIns->pPciDev, "PCIRAW_POWER_RESUME\n");
             rc = VINF_SUCCESS;
-            /// @todo: what do we do here?
+            /// @todo what do we do here?
             break;
         default:
             vbpci_printk(KERN_DEBUG, pIns->pPciDev, "unknown power state %u\n", aState);
@@ -1060,7 +1060,7 @@ static DECLCALLBACK(int) vboxPciOsContigMemInfo(PRAWPCIPERVM pVmCtx, RTHCPHYS Ho
                 break;
 
             flags = IOMMU_READ | IOMMU_WRITE;
-            /* @todo: flags |= IOMMU_CACHE; */
+            /** @todo flags |= IOMMU_CACHE; */
 
             r = iommu_map(domain, GuestStart, HostStart, get_order(cMemSize), flags);
             if (r)
diff --git a/src/VBox/HostDrivers/VBoxUSB/Makefile.kmk b/src/VBox/HostDrivers/VBoxUSB/Makefile.kmk
index e37b290..4a42c75 100644
--- a/src/VBox/HostDrivers/VBoxUSB/Makefile.kmk
+++ b/src/VBox/HostDrivers/VBoxUSB/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxUSB/USBFilter.cpp b/src/VBox/HostDrivers/VBoxUSB/USBFilter.cpp
index c59d9a2..c129082 100644
--- a/src/VBox/HostDrivers/VBoxUSB/USBFilter.cpp
+++ b/src/VBox/HostDrivers/VBoxUSB/USBFilter.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -285,6 +285,7 @@ static int usbfilterValidateStringPattern(const char *psz)
      * This is only becomes important if we start doing
      * sets ([0-9]) and such like.
      */
+    RT_NOREF1(psz);
     return VINF_SUCCESS;
 }
 
@@ -949,7 +950,7 @@ USBLIB_DECL(bool) USBFilterMatchDevice(PCUSBFILTER pFilter, PUSBDEVICE pDevice)
                     case USBFILTERIDX_DEVICE_PROTOCOL:  u16Value = pDevice->bDeviceProtocol; break;
                     case USBFILTERIDX_BUS:              u16Value = pDevice->bBus; break;
                     case USBFILTERIDX_PORT:             u16Value = pDevice->bPort; break;
-                    default:                            u16Value = ~0; break;
+                    default:                            u16Value = UINT16_MAX; break;
 
                 }
                 switch (pFilter->aFields[i].enmMatch)
diff --git a/src/VBox/HostDrivers/VBoxUSB/USBLib.cpp b/src/VBox/HostDrivers/VBoxUSB/USBLib.cpp
index e6a6bc5..30d3659 100644
--- a/src/VBox/HostDrivers/VBoxUSB/USBLib.cpp
+++ b/src/VBox/HostDrivers/VBoxUSB/USBLib.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxUSB/VBoxUSBFilterMgr.cpp b/src/VBox/HostDrivers/VBoxUSB/VBoxUSBFilterMgr.cpp
index 2161875..8061367 100644
--- a/src/VBox/HostDrivers/VBoxUSB/VBoxUSBFilterMgr.cpp
+++ b/src/VBox/HostDrivers/VBoxUSB/VBoxUSBFilterMgr.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -138,7 +138,7 @@ int VBoxUSBFilterInit(void)
 #else
         fFlags = RTHANDLETABLE_FLAGS_LOCKED;
 #endif
-        rc = RTHandleTableCreateEx(&g_hHndTableFilters, fFlags, 1 /* uBase */, 32768 /* cMax */,
+        rc = RTHandleTableCreateEx(&g_hHndTableFilters, fFlags, 1 /* uBase */, 8192 /* cMax */,
                                    NULL, NULL);
         if (RT_SUCCESS(rc))
         {
@@ -258,6 +258,8 @@ int VBoxUSBFilterAdd(PCUSBFILTER pFilter, VBOXUSBFILTER_CONTEXT Owner, uintptr_t
 
         VBOXUSBFILTERMGR_UNLOCK();
     }
+    else
+        RTMemFree(pNew);
 
     return rc;
 }
@@ -326,7 +328,7 @@ int VBoxUSBFilterRemove(VBOXUSBFILTER_CONTEXT Owner, uintptr_t uId)
     if (pCur)
     {
         void *pv = RTHandleTableFree(g_hHndTableFilters, pCur->uHnd);
-        Assert(pv == pCur);
+        Assert(pv == pCur); NOREF(pv);
         vboxUSBFilterFree(pCur);
         return VINF_SUCCESS;
     }
@@ -416,7 +418,7 @@ void VBoxUSBFilterRemoveOwner(VBOXUSBFILTER_CONTEXT Owner)
     {
         PVBOXUSBFILTER pNext = pToFree->pNext;
         void *pv = RTHandleTableFree(g_hHndTableFilters, pToFree->uHnd);
-        Assert(pv == pToFree);
+        Assert(pv == pToFree); NOREF(pv);
         vboxUSBFilterFree(pToFree);
         pToFree = pNext;
     }
@@ -502,7 +504,7 @@ VBOXUSBFILTER_CONTEXT VBoxUSBFilterMatchEx(PCUSBFILTER pDevice, uintptr_t *puId,
                     if (fRemoveFltIfOneShot)
                     {
                         void *pv = RTHandleTableFree(g_hHndTableFilters, pCur->uHnd);
-                        Assert(pv == pCur);
+                        Assert(pv == pCur); NOREF(pv);
                         vboxUSBFilterFree(pCur);
                     }
                     if (pfIsOneShot)
diff --git a/src/VBox/HostDrivers/VBoxUSB/VBoxUSBFilterMgr.h b/src/VBox/HostDrivers/VBoxUSB/VBoxUSBFilterMgr.h
index 07ded8b..ef0838c 100644
--- a/src/VBox/HostDrivers/VBoxUSB/VBoxUSBFilterMgr.h
+++ b/src/VBox/HostDrivers/VBoxUSB/VBoxUSBFilterMgr.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxUSB/darwin/Makefile.kmk b/src/VBox/HostDrivers/VBoxUSB/darwin/Makefile.kmk
index 275f982..500d8a6 100644
--- a/src/VBox/HostDrivers/VBoxUSB/darwin/Makefile.kmk
+++ b/src/VBox/HostDrivers/VBoxUSB/darwin/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxUSB/darwin/USBLib-darwin.cpp b/src/VBox/HostDrivers/VBoxUSB/darwin/USBLib-darwin.cpp
index 72e3343..88f9c2a 100644
--- a/src/VBox/HostDrivers/VBoxUSB/darwin/USBLib-darwin.cpp
+++ b/src/VBox/HostDrivers/VBoxUSB/darwin/USBLib-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxUSB/darwin/VBoxUSB.cpp b/src/VBox/HostDrivers/VBoxUSB/darwin/VBoxUSB.cpp
index 62c211b..3b6a653 100644
--- a/src/VBox/HostDrivers/VBoxUSB/darwin/VBoxUSB.cpp
+++ b/src/VBox/HostDrivers/VBoxUSB/darwin/VBoxUSB.cpp
@@ -8,7 +8,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -313,6 +313,7 @@ static volatile uint32_t g_cInstances = 0;
  */
 static kern_return_t VBoxUSBStart(struct kmod_info *pKModInfo, void *pvData)
 {
+    RT_NOREF(pKModInfo, pvData);
     int rc;
     Log(("VBoxUSBStart\n"));
 
@@ -366,7 +367,7 @@ static kern_return_t VBoxUSBStart(struct kmod_info *pKModInfo, void *pvData)
  */
 static kern_return_t VBoxUSBStop(struct kmod_info *pKModInfo, void *pvData)
 {
-    int rc;
+    RT_NOREF(pKModInfo, pvData);
     Log(("VBoxUSBStop: g_cInstances=%d\n", g_cInstances));
 
     /** @todo Fix problem with crashing when unloading a driver that's in use. */
@@ -376,7 +377,7 @@ static kern_return_t VBoxUSBStop(struct kmod_info *pKModInfo, void *pvData)
      */
     VBoxUSBFilterTerm();
 
-    rc = RTSemFastMutexDestroy(g_Mtx);
+    int rc = RTSemFastMutexDestroy(g_Mtx);
     AssertRC(rc);
     g_Mtx = NIL_RTSEMFASTMUTEX;
 
@@ -390,7 +391,7 @@ static kern_return_t VBoxUSBStop(struct kmod_info *pKModInfo, void *pvData)
 
 
 
-
+#ifdef LOG_ENABLED
 /**
  * Gets the name of a IOKit message.
  *
@@ -399,10 +400,9 @@ static kern_return_t VBoxUSBStop(struct kmod_info *pKModInfo, void *pvData)
  */
 DECLINLINE(const char *) DbgGetIOKitMessageName(UInt32 enmMsg)
 {
-#ifdef DEBUG
     switch (enmMsg)
     {
-#define MY_CASE(enm) case enm: return #enm; break
+# define MY_CASE(enm) case enm: return #enm; break
         MY_CASE(kIOMessageServiceIsTerminated);
         MY_CASE(kIOMessageServiceIsSuspended);
         MY_CASE(kIOMessageServiceIsResumed);
@@ -438,11 +438,11 @@ DECLINLINE(const char *) DbgGetIOKitMessageName(UInt32 enmMsg)
         MY_CASE(kIOUSBMessagePortWasNotSuspended);
         MY_CASE(kIOUSBMessageExpressCardCantWake);
 //        MY_CASE(kIOUSBMessageCompositeDriverReconfigured);
-#undef MY_CASE
+# undef MY_CASE
     }
-#endif /* DEBUG */
     return "unknown";
 }
+#endif /* LOG_ENABLED */
 
 
 
@@ -464,6 +464,8 @@ org_virtualbox_VBoxUSB::init(OSDictionary *pDictionary)
 {
     uint32_t cInstances = ASMAtomicIncU32(&g_cInstances);
     Log(("VBoxUSB::init([%p], %p) new g_cInstances=%d\n", this, pDictionary, cInstances));
+    RT_NOREF_PV(cInstances);
+
     if (IOService::init(pDictionary))
     {
         /* init members. */
@@ -604,6 +606,7 @@ org_virtualbox_VBoxUSBClient::initWithTask(task_t OwningTask, void *pvSecurityId
         uint32_t cInstances = ASMAtomicIncU32(&g_cInstances);
         Log(("VBoxUSBClient::initWithTask([%p], %p(->%p:{.pid=%d}, %p, %#x) -> true; new g_cInstances=%d\n",
                  this, OwningTask, pProc, pProc ? proc_pid(pProc) : -1, pvSecurityId, u32Type, cInstances));
+        RT_NOREF_PV(cInstances);
         return true;
     }
 
@@ -976,6 +979,7 @@ org_virtualbox_VBoxUSBDevice::init(OSDictionary *pDictionary)
 {
     uint32_t cInstances = ASMAtomicIncU32(&g_cInstances);
     Log(("VBoxUSBDevice::init([%p], %p) new g_cInstances=%d\n", this, pDictionary, cInstances));
+    RT_NOREF_PV(cInstances);
 
     m_pDevice = NULL;
     m_Owner = NIL_RTPROCESS;
@@ -1338,7 +1342,7 @@ IOReturn
 org_virtualbox_VBoxUSBDevice::message(UInt32 enmMsg, IOService *pProvider, void *pvArg)
 {
     Log(("VBoxUSBDevice::message([%p], %#x {%s}, %p {%s}, %p) - pid=%d\n",
-             this, enmMsg, DbgGetIOKitMessageName(enmMsg), pProvider, pProvider->getName(), pvArg, RTProcSelf()));
+         this, enmMsg, DbgGetIOKitMessageName(enmMsg), pProvider, pProvider->getName(), pvArg, RTProcSelf()));
 
     IOReturn irc;
     switch (enmMsg)
@@ -1471,7 +1475,7 @@ org_virtualbox_VBoxUSBDevice::message(UInt32 enmMsg, IOService *pProvider, void
     }
 
     Log(("VBoxUSBDevice::message([%p], %#x {%s}, %p {%s}, %p) -> %#x\n",
-             this, enmMsg, DbgGetIOKitMessageName(enmMsg), pProvider, pProvider->getName(), pvArg, irc));
+         this, enmMsg, DbgGetIOKitMessageName(enmMsg), pProvider, pProvider->getName(), pvArg, irc));
     return irc;
 }
 
@@ -1561,27 +1565,27 @@ org_virtualbox_VBoxUSBDevice::MyInterestHandler(void *pvTarget, void *pvRefCon,
             /* pvMsgArg == the open() fOptions, so we could check for kIOServiceSeize if we care.
                We'll also get a kIIOServiceRequestingClose message() for that...  */
             Log(("VBoxUSBDevice::MyInterestHandler: kIOMessageServiceIsAttemptingOpen - pvRefCon=%p pProvider=%p pvMsgArg=%p cbMsgArg=%d\n",
-                     pvRefCon, pProvider, pvMsgArg, cbMsgArg));
+                 pvRefCon, pProvider, pvMsgArg, cbMsgArg));
             break;
 
         case kIOMessageServiceWasClosed:
             Log(("VBoxUSBDevice::MyInterestHandler: kIOMessageServiceWasClosed - pvRefCon=%p pProvider=%p pvMsgArg=%p cbMsgArg=%d\n",
-                     pvRefCon, pProvider, pvMsgArg, cbMsgArg));
+                 pvRefCon, pProvider, pvMsgArg, cbMsgArg));
             break;
 
         case kIOMessageServiceIsTerminated:
             Log(("VBoxUSBDevice::MyInterestHandler: kIOMessageServiceIsTerminated - pvRefCon=%p pProvider=%p pvMsgArg=%p cbMsgArg=%d\n",
-                     pvRefCon, pProvider, pvMsgArg, cbMsgArg));
+                 pvRefCon, pProvider, pvMsgArg, cbMsgArg));
             break;
 
         case kIOUSBMessagePortHasBeenReset:
             Log(("VBoxUSBDevice::MyInterestHandler: kIOUSBMessagePortHasBeenReset - pvRefCon=%p pProvider=%p pvMsgArg=%p cbMsgArg=%d\n",
-                     pvRefCon, pProvider, pvMsgArg, cbMsgArg));
+                 pvRefCon, pProvider, pvMsgArg, cbMsgArg));
             break;
 
         default:
             Log(("VBoxUSBDevice::MyInterestHandler: %#x (%s) - pvRefCon=%p pProvider=%p pvMsgArg=%p cbMsgArg=%d\n",
-                     enmMsgType, DbgGetIOKitMessageName(enmMsgType), pvRefCon, pProvider, pvMsgArg, cbMsgArg));
+                 enmMsgType, DbgGetIOKitMessageName(enmMsgType), pvRefCon, pProvider, pvMsgArg, cbMsgArg));
             break;
     }
 
@@ -1616,6 +1620,7 @@ org_virtualbox_VBoxUSBInterface::init(OSDictionary *pDictionary)
 {
     uint32_t cInstances = ASMAtomicIncU32(&g_cInstances);
     Log(("VBoxUSBInterface::init([%p], %p) new g_cInstances=%d\n", this, pDictionary, cInstances));
+    RT_NOREF_PV(cInstances);
 
     m_pInterface = NULL;
     m_fOpen = false;
@@ -1780,7 +1785,7 @@ IOReturn
 org_virtualbox_VBoxUSBInterface::message(UInt32 enmMsg, IOService *pProvider, void *pvArg)
 {
     Log(("VBoxUSBInterface::message([%p], %#x {%s}, %p {%s}, %p)\n",
-             this, enmMsg, DbgGetIOKitMessageName(enmMsg), pProvider, pProvider->getName(), pvArg));
+         this, enmMsg, DbgGetIOKitMessageName(enmMsg), pProvider, pProvider->getName(), pvArg));
 
     IOReturn irc;
     switch (enmMsg)
@@ -1864,7 +1869,7 @@ org_virtualbox_VBoxUSBInterface::message(UInt32 enmMsg, IOService *pProvider, vo
     }
 
     Log(("VBoxUSBInterface::message([%p], %#x {%s}, %p {%s}, %p) -> %#x\n",
-             this, enmMsg, DbgGetIOKitMessageName(enmMsg), pProvider, pProvider->getName(), pvArg, irc));
+         this, enmMsg, DbgGetIOKitMessageName(enmMsg), pProvider, pProvider->getName(), pvArg, irc));
     return irc;
 }
 
diff --git a/src/VBox/HostDrivers/VBoxUSB/darwin/VBoxUSBInterface.h b/src/VBox/HostDrivers/VBoxUSB/darwin/VBoxUSBInterface.h
index 961efde..a7d38ac 100644
--- a/src/VBox/HostDrivers/VBoxUSB/darwin/VBoxUSBInterface.h
+++ b/src/VBox/HostDrivers/VBoxUSB/darwin/VBoxUSBInterface.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Audio_old/Makefile.kup b/src/VBox/HostDrivers/VBoxUSB/darwin/testcase/Makefile.kup
similarity index 100%
copy from src/VBox/Devices/Audio_old/Makefile.kup
copy to src/VBox/HostDrivers/VBoxUSB/darwin/testcase/Makefile.kup
diff --git a/src/VBox/HostDrivers/VBoxUSB/darwin/testcase/tstOpenUSBDev.cpp b/src/VBox/HostDrivers/VBoxUSB/darwin/testcase/tstOpenUSBDev.cpp
index 3ee74de..54f65b4 100644
--- a/src/VBox/HostDrivers/VBoxUSB/darwin/testcase/tstOpenUSBDev.cpp
+++ b/src/VBox/HostDrivers/VBoxUSB/darwin/testcase/tstOpenUSBDev.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -79,7 +79,7 @@ static bool tstDictGetU64(CFMutableDictionaryRef DictRef, CFStringRef KeyStrRef,
 }
 
 
-static int tstDoWork(io_object_t USBDevice, mach_port_t MasterPort, const char *argv0)
+static int tstDoWork(io_object_t USBDevice, const char *argv0)
 {
     /*
      * Create a plugin interface for the device and query its IOUSBDeviceInterface.
@@ -189,7 +189,6 @@ int main(int argc, char **argv)
     uint32_t u32LocationId = 0;
 
     int ch;
-    int i = 1;
     RTGETOPTUNION ValueUnion;
     RTGETOPTSTATE GetState;
     RTGetOptInit(&GetState, argc, argv, g_aOptions, RT_ELEMENTS(g_aOptions), 1, 0 /* fFlags */);
@@ -206,7 +205,7 @@ int main(int argc, char **argv)
             case 'h':
                 return tstSyntax(argv[0]);
             case 'V':
-                RTPrintf("$Revision: 102121 $\n");
+                RTPrintf("$Revision: 110148 $\n");
                 return 0;
 
             default:
@@ -217,7 +216,7 @@ int main(int argc, char **argv)
     /*
      * Open the master port.
      */
-    mach_port_t MasterPort = NULL;
+    mach_port_t MasterPort = MACH_PORT_NULL;
     krc = IOMasterPort(MACH_PORT_NULL, &MasterPort);
     if (krc != KERN_SUCCESS)
     {
@@ -235,7 +234,7 @@ int main(int argc, char **argv)
         return 1;
     }
 
-    io_iterator_t USBDevices = NULL;
+    io_iterator_t USBDevices = IO_OBJECT_NULL;
     IOReturn irc = IOServiceGetMatchingServices(MasterPort, RefMatchingDict, &USBDevices);
     if (irc != kIOReturnSuccess)
     {
@@ -266,7 +265,7 @@ int main(int argc, char **argv)
             {
                 cMatches++;
                 CFRelease(PropsRef);
-                tstDoWork(USBDevice, MasterPort, argv[0]);
+                tstDoWork(USBDevice, argv[0]);
             }
             else
                 CFRelease(PropsRef);
diff --git a/src/VBox/HostDrivers/VBoxUSB/solaris/Makefile.kmk b/src/VBox/HostDrivers/VBoxUSB/solaris/Makefile.kmk
index d307652..b4ad9df 100644
--- a/src/VBox/HostDrivers/VBoxUSB/solaris/Makefile.kmk
+++ b/src/VBox/HostDrivers/VBoxUSB/solaris/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2008-2015 Oracle Corporation
+# Copyright (C) 2008-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxUSB/solaris/USBLib-solaris.cpp b/src/VBox/HostDrivers/VBoxUSB/solaris/USBLib-solaris.cpp
index b693c89..72dbefb 100644
--- a/src/VBox/HostDrivers/VBoxUSB/solaris/USBLib-solaris.cpp
+++ b/src/VBox/HostDrivers/VBoxUSB/solaris/USBLib-solaris.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxUSB/solaris/VBoxUSB-solaris.c b/src/VBox/HostDrivers/VBoxUSB/solaris/VBoxUSB-solaris.c
index a207746..9de7d2c 100644
--- a/src/VBox/HostDrivers/VBoxUSB/solaris/VBoxUSB-solaris.c
+++ b/src/VBox/HostDrivers/VBoxUSB/solaris/VBoxUSB-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxUSB/solaris/VBoxUSBMon-solaris.c b/src/VBox/HostDrivers/VBoxUSB/solaris/VBoxUSBMon-solaris.c
index 614c96a..217eba3 100644
--- a/src/VBox/HostDrivers/VBoxUSB/solaris/VBoxUSBMon-solaris.c
+++ b/src/VBox/HostDrivers/VBoxUSB/solaris/VBoxUSBMon-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxUSB/testcase/tstUSBFilter.cpp b/src/VBox/HostDrivers/VBoxUSB/testcase/tstUSBFilter.cpp
index 00deb12..a180ec4 100644
--- a/src/VBox/HostDrivers/VBoxUSB/testcase/tstUSBFilter.cpp
+++ b/src/VBox/HostDrivers/VBoxUSB/testcase/tstUSBFilter.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxUSB/win/Install/USBInstall.cpp b/src/VBox/HostDrivers/VBoxUSB/win/Install/USBInstall.cpp
index baef0d2..f28ceb2 100644
--- a/src/VBox/HostDrivers/VBoxUSB/win/Install/USBInstall.cpp
+++ b/src/VBox/HostDrivers/VBoxUSB/win/Install/USBInstall.cpp
@@ -4,7 +4,7 @@
  *
  * Installation code
  *
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -19,8 +19,8 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
-#include <windows.h>
-#include <setupapi.h>
+#include <iprt/win/windows.h>
+#include <iprt/win/setupapi.h>
 #include <newdev.h>
 #include <iprt/assert.h>
 #include <iprt/err.h>
@@ -34,23 +34,25 @@
 
 #include <VBox/VBoxDrvCfg-win.h>
 
-static DECLCALLBACK(void) vboxUsbLog(VBOXDRVCFG_LOG_SEVERITY enmSeverity, char * msg, void * pvContext)
+static DECLCALLBACK(void) vboxUsbLog(VBOXDRVCFG_LOG_SEVERITY enmSeverity, char *pszMsg, void *pvContext)
 {
+    RT_NOREF1(pvContext);
     switch (enmSeverity)
     {
         case VBOXDRVCFG_LOG_SEVERITY_FLOW:
         case VBOXDRVCFG_LOG_SEVERITY_REGULAR:
             break;
         case VBOXDRVCFG_LOG_SEVERITY_REL:
-            RTPrintf("%s", msg);
+            RTPrintf("%s", pszMsg);
             break;
         default:
             break;
     }
 }
 
-static DECLCALLBACK(void) vboxUsbPanic(void * pvPanic)
+static DECLCALLBACK(void) vboxUsbPanic(void *pvPanic)
 {
+    RT_NOREF1(pvPanic);
 #ifndef DEBUG_bird
     AssertFailed();
 #endif
diff --git a/src/VBox/HostDrivers/VBoxUSB/win/Install/USBUninstall.cpp b/src/VBox/HostDrivers/VBoxUSB/win/Install/USBUninstall.cpp
index e1c5227..6c3c903 100644
--- a/src/VBox/HostDrivers/VBoxUSB/win/Install/USBUninstall.cpp
+++ b/src/VBox/HostDrivers/VBoxUSB/win/Install/USBUninstall.cpp
@@ -4,7 +4,7 @@
  *
  * Installation code
  *
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -19,8 +19,8 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
-#include <windows.h>
-#include <setupapi.h>
+#include <iprt/win/windows.h>
+#include <iprt/win/setupapi.h>
 #include <newdev.h>
 
 #include <iprt/assert.h>
@@ -36,23 +36,25 @@
 int usblibOsStopService(void);
 int usblibOsDeleteService(void);
 
-static DECLCALLBACK(void) vboxUsbLog(VBOXDRVCFG_LOG_SEVERITY enmSeverity, char * msg, void * pvContext)
+static DECLCALLBACK(void) vboxUsbLog(VBOXDRVCFG_LOG_SEVERITY enmSeverity, char *pszMsg, void *pvContext)
 {
+    RT_NOREF1(pvContext);
     switch (enmSeverity)
     {
         case VBOXDRVCFG_LOG_SEVERITY_FLOW:
         case VBOXDRVCFG_LOG_SEVERITY_REGULAR:
             break;
         case VBOXDRVCFG_LOG_SEVERITY_REL:
-            printf("%s", msg);
+            printf("%s", pszMsg);
             break;
         default:
             break;
     }
 }
 
-static DECLCALLBACK(void) vboxUsbPanic(void * pvPanic)
+static DECLCALLBACK(void) vboxUsbPanic(void *pvPanic)
 {
+    RT_NOREF1(pvPanic);
 #ifndef DEBUG_bird
     AssertFailed();
 #endif
@@ -61,6 +63,7 @@ static DECLCALLBACK(void) vboxUsbPanic(void * pvPanic)
 
 int __cdecl main(int argc, char **argv)
 {
+    RT_NOREF2(argc, argv);
     printf("USB uninstallation\n");
 
     VBoxDrvCfgLoggerSet(vboxUsbLog, NULL);
@@ -119,10 +122,10 @@ int usblibOsStopService(void)
                 rc = 0;
             else if (ControlService(hService, SERVICE_CONTROL_STOP, &Status))
             {
-	        /*
-		 * Wait for finish about 1 minute.
-		 * It should be enough for work with driver verifier
-		 */
+                /*
+                 * Wait for finish about 1 minute.
+                 * It should be enough for work with driver verifier
+                 */
                 int iWait = 600;
                 while (Status.dwCurrentState == SERVICE_STOP_PENDING && iWait-- > 0)
                 {
diff --git a/src/VBox/HostDrivers/VBoxUSB/win/Makefile.kmk b/src/VBox/HostDrivers/VBoxUSB/win/Makefile.kmk
index 7496507..5fe384b 100644
--- a/src/VBox/HostDrivers/VBoxUSB/win/Makefile.kmk
+++ b/src/VBox/HostDrivers/VBoxUSB/win/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxUSB/win/cmn/VBoxDrvTool.cpp b/src/VBox/HostDrivers/VBoxUSB/win/cmn/VBoxDrvTool.cpp
index 7f8f499..4564fa5 100644
--- a/src/VBox/HostDrivers/VBoxUSB/win/cmn/VBoxDrvTool.cpp
+++ b/src/VBox/HostDrivers/VBoxUSB/win/cmn/VBoxDrvTool.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -79,11 +79,11 @@ VBOXDRVTOOL_DECL(NTSTATUS) VBoxDrvToolRegQueryValueDword(IN HANDLE hKey, IN PWCH
     UNICODE_STRING RtlStr;
     RtlInitUnicodeString(&RtlStr, pName);
     NTSTATUS Status = ZwQueryValueKey(hKey,
-                &RtlStr,
-                KeyValuePartialInformation,
-                &Buf.Info,
-                sizeof(Buf),
-                &cbBuf);
+                                      &RtlStr,
+                                      KeyValuePartialInformation,
+                                      &Buf.Info,
+                                      sizeof(Buf),
+                                      &cbBuf);
     if (Status == STATUS_SUCCESS)
     {
         if (Buf.Info.Type == REG_DWORD)
@@ -110,6 +110,7 @@ VBOXDRVTOOL_DECL(NTSTATUS) VBoxDrvToolRegSetValueDword(IN HANDLE hKey, IN PWCHAR
 
 static NTSTATUS vboxDrvToolIoCompletionSetEvent(IN PDEVICE_OBJECT pDevObj, IN PIRP pIrp, IN PVOID pvContext)
 {
+    RT_NOREF2(pDevObj, pIrp);
     PKEVENT pEvent = (PKEVENT)pvContext;
     KeSetEvent(pEvent, 0, FALSE);
     return STATUS_MORE_PROCESSING_REQUIRED;
diff --git a/src/VBox/HostDrivers/VBoxUSB/win/cmn/VBoxDrvTool.h b/src/VBox/HostDrivers/VBoxUSB/win/cmn/VBoxDrvTool.h
index 38fb287..e707f7d 100644
--- a/src/VBox/HostDrivers/VBoxUSB/win/cmn/VBoxDrvTool.h
+++ b/src/VBox/HostDrivers/VBoxUSB/win/cmn/VBoxDrvTool.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -14,46 +14,18 @@
  * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
+
 #ifndef ___VBoxDrvTool_win_h___
 #define ___VBoxDrvTool_win_h___
+
 #include <VBox/cdefs.h>
 #include <iprt/stdint.h>
 #include <iprt/assert.h>
 #include <iprt/asm.h>
+#include <iprt/nt/wdm.h>
 
-RT_C_DECLS_BEGIN
-#if (_MSC_VER >= 1400) && !defined(VBOX_WITH_PATCHED_DDK)
-# define _InterlockedExchange           _InterlockedExchange_StupidDDKVsCompilerCrap
-# define _InterlockedExchangeAdd        _InterlockedExchangeAdd_StupidDDKVsCompilerCrap
-# define _InterlockedCompareExchange    _InterlockedCompareExchange_StupidDDKVsCompilerCrap
-# define _InterlockedAddLargeStatistic  _InterlockedAddLargeStatistic_StupidDDKVsCompilerCrap
-# pragma warning(disable : 4163)
-#endif
-#if (_MSC_VER >= 1600) && !defined(VBOX_WITH_PATCHED_DDK)
-# define _interlockedbittestandset      _interlockedbittestandset_StillStupidDdkVsCompilerCrap
-# define _interlockedbittestandreset    _interlockedbittestandreset_StillStupidDdkVsCompilerCrap
-# define _interlockedbittestandset64    _interlockedbittestandset64_StillStupidDdkVsCompilerCrap
-# define _interlockedbittestandreset64  _interlockedbittestandreset64_StillStupidDdkVsCompilerCrap
-# pragma warning(disable : 4163)
-#endif
-
-#include <wdm.h>
-
-#if (_MSC_VER >= 1400) && !defined(VBOX_WITH_PATCHED_DDK)
-# pragma warning(default : 4163)
-# undef  _InterlockedExchange
-# undef  _InterlockedExchangeAdd
-# undef  _InterlockedCompareExchange
-# undef  _InterlockedAddLargeStatistic
-#endif
-#if (_MSC_VER >= 1600) && !defined(VBOX_WITH_PATCHED_DDK)
-# pragma warning(default : 4163)
-# undef _interlockedbittestandset
-# undef _interlockedbittestandreset
-# undef _interlockedbittestandset64
-# undef _interlockedbittestandreset64
-#endif
 
+RT_C_DECLS_BEGIN
 
 #if 0
 /* enable this in case we include this in a dll*/
@@ -115,4 +87,5 @@ VBOXDRVTOOL_DECL(VOID) VBoxDrvToolStrFree(PUNICODE_STRING pStr);
 
 RT_C_DECLS_END
 
-#endif /* #ifndef ___VBoxDrvTool_win_h___ */
+#endif
+
diff --git a/src/VBox/HostDrivers/VBoxUSB/win/cmn/VBoxUsbIdc.h b/src/VBox/HostDrivers/VBoxUSB/win/cmn/VBoxUsbIdc.h
index a86af4b..05bb7c8 100644
--- a/src/VBox/HostDrivers/VBoxUSB/win/cmn/VBoxUsbIdc.h
+++ b/src/VBox/HostDrivers/VBoxUSB/win/cmn/VBoxUsbIdc.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxUSB/win/cmn/VBoxUsbTool.cpp b/src/VBox/HostDrivers/VBoxUSB/win/cmn/VBoxUsbTool.cpp
index f6bf7e5..28620b0 100644
--- a/src/VBox/HostDrivers/VBoxUSB/win/cmn/VBoxUsbTool.cpp
+++ b/src/VBox/HostDrivers/VBoxUSB/win/cmn/VBoxUsbTool.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -334,7 +334,8 @@ VBOXUSBTOOL_DECL(PIRP) VBoxUsbToolIoBuildAsyncInternalCtl(PDEVICE_OBJECT pDevObj
     return pIrp;
 }
 
-VBOXUSBTOOL_DECL(NTSTATUS) VBoxUsbToolIoInternalCtlSendSyncWithTimeout(PDEVICE_OBJECT pDevObj, ULONG uCtl, void *pvArg1, void *pvArg2, ULONG dwTimeoutMs)
+VBOXUSBTOOL_DECL(NTSTATUS) VBoxUsbToolIoInternalCtlSendSyncWithTimeout(PDEVICE_OBJECT pDevObj, ULONG uCtl,
+                                                                       void *pvArg1, void *pvArg2, ULONG dwTimeoutMs)
 {
     /* since we're going to cancel the irp on timeout, we should allocate our own IRP rather than using the threaded one
      * */
@@ -353,13 +354,12 @@ VBOXUSBTOOL_DECL(NTSTATUS) VBoxUsbToolIoInternalCtlSendSyncWithTimeout(PDEVICE_O
 }
 
 VBOXUSBTOOL_DECL(NTSTATUS) VBoxUsbToolIoInternalCtlSendAsync(PDEVICE_OBJECT pDevObj, ULONG uCtl, void *pvArg1, void *pvArg2,
-        PKEVENT pEvent, PIO_STATUS_BLOCK pIoStatus)
+                                                             PKEVENT pEvent, PIO_STATUS_BLOCK pIoStatus)
 {
     NTSTATUS Status;
     PIRP pIrp;
     PIO_STACK_LOCATION pSl;
-    KIRQL Irql = KeGetCurrentIrql();
-    Assert(Irql == PASSIVE_LEVEL);
+    Assert(KeGetCurrentIrql() == PASSIVE_LEVEL);
 
     pIrp = IoBuildDeviceIoControlRequest(uCtl, pDevObj, NULL, 0, NULL, 0, TRUE, pEvent, pIoStatus);
     if (!pIrp)
diff --git a/src/VBox/HostDrivers/VBoxUSB/win/cmn/VBoxUsbTool.h b/src/VBox/HostDrivers/VBoxUSB/win/cmn/VBoxUsbTool.h
index 2ea40fb..9d21775 100644
--- a/src/VBox/HostDrivers/VBoxUSB/win/cmn/VBoxUsbTool.h
+++ b/src/VBox/HostDrivers/VBoxUSB/win/cmn/VBoxUsbTool.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUSB.inf b/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUSB.inf
index 9bde6ee..94bc3ff 100644
--- a/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUSB.inf
+++ b/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUSB.inf
@@ -1,7 +1,7 @@
 ;
 ; VBox host drivers - USB drivers - Win32 USB device
 ;
-; Copyright (C) 2011-2015 Oracle Corporation
+; Copyright (C) 2011-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbCmn.h b/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbCmn.h
index 61512c1..5fdee4c 100644
--- a/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbCmn.h
+++ b/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbCmn.h
@@ -3,7 +3,7 @@
  * VBoxUsmCmn.h - USB device. Common defs
  */
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbDev.cpp b/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbDev.cpp
index 98c4875..0d92596 100644
--- a/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbDev.cpp
+++ b/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbDev.cpp
@@ -2,8 +2,9 @@
 /** @file
  * VBoxUsbDev.cpp - USB device.
  */
+
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -13,12 +14,23 @@
  * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
 #include "VBoxUsbCmn.h"
 #include <iprt/assert.h>
 #include <VBox/log.h>
 
+
+/*********************************************************************************************************************************
+*   Defined Constants And Macros                                                                                                 *
+*********************************************************************************************************************************/
 #define VBOXUSB_MEMTAG 'bUBV'
 
+
+
 DECLHIDDEN(PVOID) vboxUsbMemAlloc(SIZE_T cbBytes)
 {
     PVOID pvMem = ExAllocatePoolWithTag(NonPagedPool, cbBytes, VBOXUSB_MEMTAG);
@@ -96,6 +108,7 @@ static NTSTATUS vboxUsbDdiAddDevice(PDRIVER_OBJECT pDriverObject,
 
 static VOID vboxUsbDdiUnload(PDRIVER_OBJECT pDriverObject)
 {
+    RT_NOREF1(pDriverObject);
     LogRel(("VBoxUsb::DriverUnload. Built Date (%s) Time (%s)\n", __DATE__, __TIME__));
     VBoxDrvToolStrFree(&g_VBoxUsbGlobals.RegPath);
 
@@ -160,11 +173,13 @@ static NTSTATUS vboxUsbDispatchCreate(IN PDEVICE_OBJECT pDeviceObject, IN PIRP p
 static NTSTATUS vboxUsbDispatchClose(IN PDEVICE_OBJECT pDeviceObject, IN PIRP pIrp)
 {
     PVBOXUSBDEV_EXT pDevExt = (PVBOXUSBDEV_EXT)pDeviceObject->DeviceExtension;
+    NTSTATUS Status = STATUS_SUCCESS;
+#ifdef VBOX_STRICT
     PIO_STACK_LOCATION pSl = IoGetCurrentIrpStackLocation(pIrp);
     PFILE_OBJECT pFObj = pSl->FileObject;
-    NTSTATUS Status = STATUS_SUCCESS;
     Assert(pFObj);
     Assert(!pFObj->FileName.Length);
+#endif
     Status = vboxUsbRtClose(pDevExt, pIrp);
     if (NT_SUCCESS(Status))
     {
@@ -181,26 +196,15 @@ static NTSTATUS vboxUsbDispatchClose(IN PDEVICE_OBJECT pDeviceObject, IN PIRP pI
 static NTSTATUS vboxUsbDispatchDeviceControl(IN PDEVICE_OBJECT pDeviceObject, IN PIRP pIrp)
 {
     PVBOXUSBDEV_EXT pDevExt = (PVBOXUSBDEV_EXT)pDeviceObject->DeviceExtension;
-    NTSTATUS Status = STATUS_INVALID_HANDLE;
     if (vboxUsbDdiStateRetainIfStarted(pDevExt))
-    {
         return vboxUsbRtDispatch(pDevExt, pIrp);
-    }
-    else
-    {
-        Status = STATUS_INVALID_DEVICE_STATE;
-    }
-
-    Status = VBoxDrvToolIoComplete(pIrp, Status, 0);
-    return Status;
+    return VBoxDrvToolIoComplete(pIrp, STATUS_INVALID_DEVICE_STATE, 0);
 }
 
 static NTSTATUS vboxUsbDispatchCleanup(IN PDEVICE_OBJECT pDeviceObject, IN PIRP pIrp)
 {
-    PVBOXUSBDEV_EXT pDevExt = (PVBOXUSBDEV_EXT)pDeviceObject->DeviceExtension;
-    NTSTATUS Status = STATUS_SUCCESS;
-    Status = VBoxDrvToolIoComplete(pIrp, Status, 0);
-    return Status;
+    RT_NOREF1(pDeviceObject);
+    return VBoxDrvToolIoComplete(pIrp, STATUS_SUCCESS, 0);
 }
 
 static NTSTATUS vboxUsbDevAccessDeviedDispatchStub(IN PDEVICE_OBJECT pDeviceObject, IN PIRP pIrp)
@@ -212,8 +216,7 @@ static NTSTATUS vboxUsbDevAccessDeviedDispatchStub(IN PDEVICE_OBJECT pDeviceObje
         return STATUS_DELETE_PENDING;
     }
 
-    NTSTATUS Status = STATUS_ACCESS_DENIED;
-    Status = VBoxDrvToolIoComplete(pIrp, Status, 0);
+    NTSTATUS Status = VBoxDrvToolIoComplete(pIrp, STATUS_ACCESS_DENIED, 0);
 
     vboxUsbDdiStateRelease(pDevExt);
 
@@ -298,17 +301,17 @@ NTSTATUS DriverEntry(IN PDRIVER_OBJECT pDriverObject, IN PUNICODE_STRING pRegist
     return Status;
 }
 
-#ifdef DEBUG
+#ifdef VBOX_STRICT
 DECLHIDDEN(VOID) vboxUsbPnPStateGbgChange(ENMVBOXUSB_PNPSTATE enmOldState, ENMVBOXUSB_PNPSTATE enmNewState)
 {
     /* *ensure the state change is valid */
     switch (enmNewState)
     {
         case ENMVBOXUSB_PNPSTATE_STARTED:
-            Assert(enmOldState == ENMVBOXUSB_PNPSTATE_START_PENDING
-                    || ENMVBOXUSB_PNPSTATE_REMOVE_PENDING
-                    || ENMVBOXUSB_PNPSTATE_STOPPED
-                    || ENMVBOXUSB_PNPSTATE_STOP_PENDING);
+            Assert(   enmOldState == ENMVBOXUSB_PNPSTATE_START_PENDING
+                   || enmOldState == ENMVBOXUSB_PNPSTATE_REMOVE_PENDING
+                   || enmOldState == ENMVBOXUSB_PNPSTATE_STOPPED
+                   || enmOldState == ENMVBOXUSB_PNPSTATE_STOP_PENDING);
             break;
         case ENMVBOXUSB_PNPSTATE_STOP_PENDING:
             Assert(enmOldState == ENMVBOXUSB_PNPSTATE_STARTED);
@@ -323,11 +326,11 @@ DECLHIDDEN(VOID) vboxUsbPnPStateGbgChange(ENMVBOXUSB_PNPSTATE enmOldState, ENMVB
             Assert(enmOldState == ENMVBOXUSB_PNPSTATE_STARTED);
             break;
         case ENMVBOXUSB_PNPSTATE_REMOVED:
-            Assert(enmOldState == ENMVBOXUSB_PNPSTATE_REMOVE_PENDING
-                    || enmOldState == ENMVBOXUSB_PNPSTATE_SURPRISE_REMOVED);
+            Assert(   enmOldState == ENMVBOXUSB_PNPSTATE_REMOVE_PENDING
+                   || enmOldState == ENMVBOXUSB_PNPSTATE_SURPRISE_REMOVED);
             break;
         default:
-            AssertBreakpoint();
+            AssertFailed();
             break;
     }
 
diff --git a/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbDev.h b/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbDev.h
index 7ee2b99..1e2e24a 100644
--- a/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbDev.h
+++ b/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbDev.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -17,7 +17,9 @@
 
 #ifndef ___VBoxUsbDev_h___
 #define ___VBoxUsbDev_h___
+
 #include "VBoxUsbCmn.h"
+#include <VBox/cdefs.h>
 #include <iprt/assert.h>
 
 typedef struct VBOXUSB_GLOBALS
@@ -44,7 +46,7 @@ typedef enum
 } ENMVBOXUSB_PNPSTATE;
 AssertCompile(sizeof (ENMVBOXUSB_PNPSTATE) == sizeof (uint32_t));
 
-#ifdef DEBUG
+#ifdef VBOX_STRICT
 DECLHIDDEN(VOID) vboxUsbPnPStateGbgChange(ENMVBOXUSB_PNPSTATE enmOld, ENMVBOXUSB_PNPSTATE enmNew);
 # define VBOXUSB_PNP_GBG_STATE_CHANGE(_old, _new) vboxUsbPnPStateGbgChange((_old), (_new))
 #else
diff --git a/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbDev.rc b/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbDev.rc
index 7073735..97d4ab6 100644
--- a/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbDev.rc
+++ b/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbDev.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbPnP.cpp b/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbPnP.cpp
index 326b0b5..0931ce5 100644
--- a/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbPnP.cpp
+++ b/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbPnP.cpp
@@ -2,8 +2,9 @@
 /** @file
  * USB PnP Handling
  */
+
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -13,6 +14,7 @@
  * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
+
 #include "VBoxUsbCmn.h"
 
 static NTSTATUS vboxUsbPnPMnStartDevice(PVBOXUSBDEV_EXT pDevExt, PIRP pIrp)
@@ -178,8 +180,8 @@ static NTSTATUS vboxUsbPnPMnQueryCapabilities(PVBOXUSBDEV_EXT pDevExt, PIRP pIrp
 
     if (pDevCaps->Version < 1 || pDevCaps->Size < sizeof (*pDevCaps))
     {
-        Assert(0);
-        /* todo: return more appropriate status ?? */
+        AssertFailed();
+        /** @todo return more appropriate status ?? */
         return STATUS_UNSUCCESSFUL;
     }
 
@@ -213,55 +215,41 @@ static NTSTATUS vboxUsbPnPMnDefault(PVBOXUSBDEV_EXT pDevExt, PIRP pIrp)
 DECLHIDDEN(NTSTATUS) vboxUsbDispatchPnP(IN PDEVICE_OBJECT pDeviceObject, IN PIRP pIrp)
 {
     PVBOXUSBDEV_EXT pDevExt = (PVBOXUSBDEV_EXT)pDeviceObject->DeviceExtension;
-    ENMVBOXUSB_PNPSTATE enmState = vboxUsbPnPStateGet(pDevExt);
     if (!vboxUsbDdiStateRetainIfNotRemoved(pDevExt))
-    {
         return VBoxDrvToolIoComplete(pIrp, STATUS_DELETE_PENDING, 0);
-    }
 
     PIO_STACK_LOCATION pSl = IoGetCurrentIrpStackLocation(pIrp);
-
     switch (pSl->MinorFunction)
     {
         case IRP_MN_START_DEVICE:
-        {
             return vboxUsbPnPMnStartDevice(pDevExt, pIrp);
-        }
+
         case IRP_MN_QUERY_STOP_DEVICE:
-        {
             return vboxUsbPnPMnQueryStopDevice(pDevExt, pIrp);
-        }
+
         case IRP_MN_STOP_DEVICE:
-        {
             return vboxUsbPnPMnStopDevice(pDevExt, pIrp);
-        }
+
         case IRP_MN_CANCEL_STOP_DEVICE:
-        {
             return vboxUsbPnPMnCancelStopDevice(pDevExt, pIrp);
-        }
+
         case IRP_MN_QUERY_REMOVE_DEVICE:
-        {
             return vboxUsbPnPMnQueryRemoveDevice(pDevExt, pIrp);
-        }
+
         case IRP_MN_REMOVE_DEVICE:
-        {
             return vboxUsbPnPMnRemoveDevice(pDevExt, pIrp);
-        }
+
         case IRP_MN_CANCEL_REMOVE_DEVICE:
-        {
             return vboxUsbPnPMnCancelRemoveDevice(pDevExt, pIrp);
-        }
+
         case IRP_MN_SURPRISE_REMOVAL:
-        {
             return vboxUsbPnPMnSurpriseRemoval(pDevExt, pIrp);
-        }
+
         case IRP_MN_QUERY_CAPABILITIES:
-        {
             return vboxUsbPnPMnQueryCapabilities(pDevExt, pIrp);
-        }
+
         default:
-        {
             return vboxUsbPnPMnDefault(pDevExt, pIrp);
-        }
     }
 }
+
diff --git a/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbPnP.h b/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbPnP.h
index adeedb1..5816362 100644
--- a/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbPnP.h
+++ b/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbPnP.h
@@ -3,7 +3,7 @@
  * USB PnP Handling
  */
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbPwr.cpp b/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbPwr.cpp
index 082e3d7..a375e75 100644
--- a/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbPwr.cpp
+++ b/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbPwr.cpp
@@ -2,8 +2,9 @@
 /** @file
  * USB Power state Handling
  */
+
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -41,7 +42,7 @@ static NTSTATUS vboxUsbPwrMnDefault(IN PVBOXUSBDEV_EXT pDevExt, IN PIRP pIrp)
 
 static NTSTATUS vboxUsbPwrMnPowerSequence(IN PVBOXUSBDEV_EXT pDevExt, IN PIRP pIrp)
 {
-    Assert(0);
+    AssertFailed();
     return vboxUsbPwrMnDefault(pDevExt, pIrp);
 }
 
@@ -52,11 +53,12 @@ typedef struct VBOXUSB_PWRDEV_CTX
 } VBOXUSB_PWRDEV_CTX, *PVBOXUSB_PWRDEV_CTX;
 
 static VOID vboxUsbPwrIoDeviceCompletion(IN PDEVICE_OBJECT pDeviceObject,
-                    IN UCHAR MinorFunction,
-                    IN POWER_STATE PowerState,
-                    IN PVOID pvContext,
-                    IN PIO_STATUS_BLOCK pIoStatus)
+                                         IN UCHAR MinorFunction,
+                                         IN POWER_STATE PowerState,
+                                         IN PVOID pvContext,
+                                         IN PIO_STATUS_BLOCK pIoStatus)
 {
+    RT_NOREF3(pDeviceObject, MinorFunction, PowerState);
     PVBOXUSB_PWRDEV_CTX pDevCtx = (PVBOXUSB_PWRDEV_CTX)pvContext;
     PVBOXUSBDEV_EXT pDevExt = pDevCtx->pDevExt;
     PIRP pIrp = pDevCtx->pIrp;
@@ -86,12 +88,10 @@ static NTSTATUS vboxUsbPwrIoRequestDev(IN PVBOXUSBDEV_EXT pDevExt, IN PIRP pIrp)
         pDevCtx->pIrp = pIrp;
 
         Status = PoRequestPowerIrp(pDevExt->pPDO, pSl->MinorFunction, PwrState,
-                        vboxUsbPwrIoDeviceCompletion, pDevCtx, NULL);
+                                   vboxUsbPwrIoDeviceCompletion, pDevCtx, NULL);
         Assert(NT_SUCCESS(Status));
         if (NT_SUCCESS(Status))
-        {
             return STATUS_MORE_PROCESSING_REQUIRED;
-        }
 
         vboxUsbMemFree(pDevCtx);
     }
@@ -108,6 +108,7 @@ static NTSTATUS vboxUsbPwrIoRequestDev(IN PVBOXUSBDEV_EXT pDevExt, IN PIRP pIrp)
 
 static NTSTATUS vboxUsbPwrIoPostSysCompletion(IN PDEVICE_OBJECT pDevObj, IN PIRP pIrp, IN PVOID pvContext)
 {
+    RT_NOREF1(pDevObj);
     PVBOXUSBDEV_EXT pDevExt = (PVBOXUSBDEV_EXT)pvContext;
     NTSTATUS Status = pIrp->IoStatus.Status;
     Assert(Status == STATUS_SUCCESS);
@@ -117,14 +118,11 @@ static NTSTATUS vboxUsbPwrIoPostSysCompletion(IN PDEVICE_OBJECT pDevObj, IN PIRP
         switch (pSl->MinorFunction)
         {
             case IRP_MN_SET_POWER:
-            {
                 pDevExt->DdiState.PwrState.PowerState.SystemState = pSl->Parameters.Power.State.SystemState;
                 break;
-            }
+
             default:
-            {
                 break;
-            }
         }
 
         return vboxUsbPwrIoRequestDev(pDevExt, pIrp);
@@ -141,26 +139,25 @@ static NTSTATUS vboxUsbPwrIoPostSys(IN PVBOXUSBDEV_EXT pDevExt, IN PIRP pIrp)
     IoCopyCurrentIrpStackLocationToNext(pIrp);
     IoSetCompletionRoutine(pIrp, vboxUsbPwrIoPostSysCompletion, pDevExt, TRUE, TRUE, TRUE);
     NTSTATUS Status = PoCallDriver(pDevExt->pLowerDO, pIrp);
-    Assert(NT_SUCCESS(Status));
+    Assert(NT_SUCCESS(Status)); NOREF(Status);
     return STATUS_PENDING;
 }
 
 static NTSTATUS vboxUsbPwrQueryPowerSys(IN PVBOXUSBDEV_EXT pDevExt, IN PIRP pIrp)
 {
-    PIO_STACK_LOCATION pSl = IoGetCurrentIrpStackLocation(pIrp);
-    SYSTEM_POWER_STATE enmSysPState = pSl->Parameters.Power.State.SystemState;
+    /*PIO_STACK_LOCATION pSl = IoGetCurrentIrpStackLocation(pIrp);
+    SYSTEM_POWER_STATE enmSysPState = pSl->Parameters.Power.State.SystemState;*/
 
     return vboxUsbPwrIoPostSys(pDevExt, pIrp);
 }
 
 static NTSTATUS vboxUsbPwrIoPostDevCompletion(IN PDEVICE_OBJECT pDevObj, IN PIRP pIrp, IN PVOID pvContext)
 {
+    RT_NOREF1(pDevObj);
     PVBOXUSBDEV_EXT pDevExt = (PVBOXUSBDEV_EXT)pvContext;
 
     if (pIrp->PendingReturned)
-    {
         IoMarkIrpPending(pIrp);
-    }
 
     NTSTATUS Status = pIrp->IoStatus.Status;
     Assert(Status == STATUS_SUCCESS);
@@ -170,15 +167,12 @@ static NTSTATUS vboxUsbPwrIoPostDevCompletion(IN PDEVICE_OBJECT pDevObj, IN PIRP
         switch (pSl->MinorFunction)
         {
             case IRP_MN_SET_POWER:
-            {
                 pDevExt->DdiState.PwrState.PowerState.DeviceState = pSl->Parameters.Power.State.DeviceState;
                 PoSetPowerState(pDevExt->pFDO, DevicePowerState, pSl->Parameters.Power.State);
                 break;
-            }
+
             default:
-            {
                 break;
-            }
         }
     }
 
@@ -193,7 +187,7 @@ static NTSTATUS vboxUsbPwrIoPostDev(IN PVBOXUSBDEV_EXT pDevExt, IN PIRP pIrp)
     IoCopyCurrentIrpStackLocationToNext(pIrp);
     IoSetCompletionRoutine(pIrp, vboxUsbPwrIoPostDevCompletion, pDevExt, TRUE, TRUE, TRUE);
     NTSTATUS Status = PoCallDriver(pDevExt->pLowerDO, pIrp);
-    Assert(NT_SUCCESS(Status));
+    Assert(NT_SUCCESS(Status)); RT_NOREF_PV(Status);
     return STATUS_PENDING;
 }
 
@@ -274,31 +268,25 @@ static NTSTATUS vboxUsbPwrQueryPowerDev(IN PVBOXUSBDEV_EXT pDevExt, IN PIRP pIrp
 static NTSTATUS vboxUsbPwrMnQueryPower(IN PVBOXUSBDEV_EXT pDevExt, IN PIRP pIrp)
 {
     PIO_STACK_LOCATION pSl = IoGetCurrentIrpStackLocation(pIrp);
-
     switch (pSl->Parameters.Power.Type)
     {
         case SystemPowerState:
-        {
             return vboxUsbPwrQueryPowerSys(pDevExt, pIrp);
-        }
+
         case DevicePowerState:
-        {
             return vboxUsbPwrQueryPowerDev(pDevExt, pIrp);
-        }
+
         default:
-        {
-            Assert(0);
+            AssertFailed();
             return vboxUsbPwrMnDefault(pDevExt, pIrp);
-        }
 
     }
-    return vboxUsbPwrMnDefault(pDevExt, pIrp);
 }
 
 static NTSTATUS vboxUsbPwrSetPowerSys(IN PVBOXUSBDEV_EXT pDevExt, IN PIRP pIrp)
 {
-    PIO_STACK_LOCATION pSl = IoGetCurrentIrpStackLocation(pIrp);
-    SYSTEM_POWER_STATE enmSysPState = pSl->Parameters.Power.State.SystemState;
+    /*PIO_STACK_LOCATION pSl = IoGetCurrentIrpStackLocation(pIrp);
+    SYSTEM_POWER_STATE enmSysPState = pSl->Parameters.Power.State.SystemState;*/
 
     return vboxUsbPwrIoPostSys(pDevExt, pIrp);
 }
@@ -342,25 +330,18 @@ static NTSTATUS vboxUsbPwrSetPowerDev(IN PVBOXUSBDEV_EXT pDevExt, IN PIRP pIrp)
 static NTSTATUS vboxUsbPwrMnSetPower(IN PVBOXUSBDEV_EXT pDevExt, IN PIRP pIrp)
 {
     PIO_STACK_LOCATION pSl = IoGetCurrentIrpStackLocation(pIrp);
-
     switch (pSl->Parameters.Power.Type)
     {
         case SystemPowerState:
-        {
             return vboxUsbPwrSetPowerSys(pDevExt, pIrp);
-        }
+
         case DevicePowerState:
-        {
             return vboxUsbPwrSetPowerDev(pDevExt, pIrp);
-        }
+
         default:
-        {
-            Assert(0);
+            AssertFailed();
             return vboxUsbPwrMnDefault(pDevExt, pIrp);
-        }
-
     }
-    return vboxUsbPwrMnDefault(pDevExt, pIrp);
 }
 
 static NTSTATUS vboxUsbPwrMnWaitWake(IN PVBOXUSBDEV_EXT pDevExt, IN PIRP pIrp)
@@ -377,26 +358,20 @@ static NTSTATUS vboxUsbPwrDispatch(IN PVBOXUSBDEV_EXT pDevExt, IN PIRP pIrp)
     switch (pSl->MinorFunction)
     {
         case IRP_MN_POWER_SEQUENCE:
-        {
             return vboxUsbPwrMnPowerSequence(pDevExt, pIrp);
-        }
+
         case IRP_MN_QUERY_POWER:
-        {
             return vboxUsbPwrMnQueryPower(pDevExt, pIrp);
-        }
+
         case IRP_MN_SET_POWER:
-        {
             return vboxUsbPwrMnSetPower(pDevExt, pIrp);
-        }
+
         case IRP_MN_WAIT_WAKE:
-        {
             return vboxUsbPwrMnWaitWake(pDevExt, pIrp);
-        }
+
         default:
-        {
-//            Assert(0);
+//            AssertFailed();
             return vboxUsbPwrMnDefault(pDevExt, pIrp);
-        }
     }
 }
 
@@ -407,7 +382,6 @@ DECLHIDDEN(NTSTATUS) vboxUsbDispatchPower(IN PDEVICE_OBJECT pDeviceObject, IN PI
     switch (enmState)
     {
         case ENMVBOXUSB_PNPSTATE_REMOVED:
-        {
             PoStartNextPowerIrp(pIrp);
 
             pIrp->IoStatus.Status = STATUS_DELETE_PENDING;
@@ -418,19 +392,17 @@ DECLHIDDEN(NTSTATUS) vboxUsbDispatchPower(IN PDEVICE_OBJECT pDeviceObject, IN PI
             vboxUsbDdiStateRelease(pDevExt);
 
             return STATUS_DELETE_PENDING;
-        }
+
         case ENMVBOXUSB_PNPSTATE_START_PENDING:
-        {
             PoStartNextPowerIrp(pIrp);
             IoSkipCurrentIrpStackLocation(pIrp);
 
             vboxUsbDdiStateRelease(pDevExt);
 
             return PoCallDriver(pDevExt->pLowerDO, pIrp);
-        }
+
         default:
-        {
             return vboxUsbPwrDispatch(pDevExt, pIrp);
-        }
     }
 }
+
diff --git a/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbPwr.h b/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbPwr.h
index fc87553..271dc26 100644
--- a/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbPwr.h
+++ b/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbPwr.h
@@ -3,7 +3,7 @@
  * USB Power state Handling
  */
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbRt.cpp b/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbRt.cpp
index 1c5d9b3..5d0f6ee 100644
--- a/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbRt.cpp
+++ b/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbRt.cpp
@@ -2,8 +2,9 @@
 /** @file
  * VBox USB R0 runtime
  */
+
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -14,6 +15,10 @@
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
 
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
 #include "VBoxUsbCmn.h"
 #include "../cmn/VBoxUsbIdc.h"
 #include "../cmn/VBoxUsbTool.h"
@@ -21,12 +26,21 @@
 #include <VBox/usblib-win.h>
 #include <iprt/assert.h>
 #include <VBox/log.h>
-#define _USBD_
+
+
+/*********************************************************************************************************************************
+*   Defined Constants And Macros                                                                                                 *
+*********************************************************************************************************************************/
+#define _USBD_ /** @todo r=bird: What is this?? */
 
 #define USBD_DEFAULT_PIPE_TRANSFER 0x00000008
 
 #define VBOXUSB_MAGIC  0xABCF1423
 
+
+/*********************************************************************************************************************************
+*   Structures and Typedefs                                                                                                      *
+*********************************************************************************************************************************/
 typedef struct VBOXUSB_URB_CONTEXT
 {
     PURB pUrb;
@@ -46,32 +60,26 @@ typedef struct VBOXUSB_SETUP
     uint16_t wLength;
 } VBOXUSB_SETUP, *PVBOXUSB_SETUP;
 
+
+
 static bool vboxUsbRtCtxSetOwner(PVBOXUSBDEV_EXT pDevExt, PFILE_OBJECT pFObj)
 {
-    bool bRc = ASMAtomicCmpXchgPtr(&pDevExt->Rt.pOwner, pFObj, NULL);
-    if (bRc)
-    {
+    bool fRc = ASMAtomicCmpXchgPtr(&pDevExt->Rt.pOwner, pFObj, NULL);
+    if (fRc)
         LogFunc(("pDevExt (0x%x) Owner(0x%x) acquired\n", pFObj));
-    }
     else
-    {
         LogFunc(("pDevExt (0x%x) Owner(0x%x) FAILED!!\n", pFObj));
-    }
-    return bRc;
+    return fRc;
 }
 
 static bool vboxUsbRtCtxReleaseOwner(PVBOXUSBDEV_EXT pDevExt, PFILE_OBJECT pFObj)
 {
-    bool bRc = ASMAtomicCmpXchgPtr(&pDevExt->Rt.pOwner, NULL, pFObj);
-    if (bRc)
-    {
+    bool fRc = ASMAtomicCmpXchgPtr(&pDevExt->Rt.pOwner, NULL, pFObj);
+    if (fRc)
         LogFunc(("pDevExt (0x%x) Owner(0x%x) released\n", pFObj));
-    }
     else
-    {
         LogFunc(("pDevExt (0x%x) Owner(0x%x) release: is NOT an owner\n", pFObj));
-    }
-    return bRc;
+    return fRc;
 }
 
 static bool vboxUsbRtCtxIsOwner(PVBOXUSBDEV_EXT pDevExt, PFILE_OBJECT pFObj)
@@ -99,8 +107,11 @@ static NTSTATUS vboxUsbRtIdcInit()
         vboxUsbRtIdcSubmit(VBOXUSBIDC_INTERNAL_IOCTL_GET_VERSION, &Version);
         if (NT_SUCCESS(Status))
         {
-            if (Version.u32Major == VBOXUSBIDC_VERSION_MAJOR
-                    && Version.u32Minor >= VBOXUSBIDC_VERSION_MINOR)
+            if (   Version.u32Major == VBOXUSBIDC_VERSION_MAJOR
+#if VBOXUSBIDC_VERSION_MINOR != 0
+                && Version.u32Minor >= VBOXUSBIDC_VERSION_MINOR
+#endif
+               )
                 return STATUS_SUCCESS;
             AssertFailed();
         }
@@ -407,8 +418,8 @@ static NTSTATUS vboxUsbRtDispatchReleaseDevice(PVBOXUSBDEV_EXT pDevExt, PIRP pIr
     if (vboxUsbRtCtxIsOwner(pDevExt, pFObj))
     {
         vboxUsbRtFreeCachedDescriptors(pDevExt);
-        bool bRc = vboxUsbRtCtxReleaseOwner(pDevExt, pFObj);
-        Assert(bRc);
+        bool fRc = vboxUsbRtCtxReleaseOwner(pDevExt, pFObj);
+        Assert(fRc); NOREF(fRc);
     }
     else
     {
@@ -463,14 +474,14 @@ static NTSTATUS vboxUsbRtGetDeviceDescription(PVBOXUSBDEV_EXT pDevExt)
 static NTSTATUS vboxUsbRtDispatchGetDevice(PVBOXUSBDEV_EXT pDevExt, PIRP pIrp)
 {
     PIO_STACK_LOCATION pSl = IoGetCurrentIrpStackLocation(pIrp);
-    PUSBSUP_GETDEV pDev  = (PUSBSUP_GETDEV)pIrp->AssociatedIrp.SystemBuffer;
-    NTSTATUS Status = STATUS_SUCCESS;
+    PUSBSUP_GETDEV pDev = (PUSBSUP_GETDEV)pIrp->AssociatedIrp.SystemBuffer;
     ULONG cbOut = 0;
 
     /* don't check for owner since this request is allowed for non-owners as well */
-
-    if (pDev && pSl->Parameters.DeviceIoControl.InputBufferLength == sizeof (*pDev)
-             && pSl->Parameters.DeviceIoControl.OutputBufferLength == sizeof (*pDev))
+    NTSTATUS Status;
+    if (   pDev
+        && pSl->Parameters.DeviceIoControl.InputBufferLength  == sizeof(*pDev)
+        && pSl->Parameters.DeviceIoControl.OutputBufferLength == sizeof(*pDev))
     {
         Status = VBoxUsbToolGetDeviceSpeed(pDevExt->pLowerDO, &pDevExt->Rt.fIsHighSpeed);
         if (NT_SUCCESS(Status))
@@ -482,9 +493,7 @@ static NTSTATUS vboxUsbRtDispatchGetDevice(PVBOXUSBDEV_EXT pDevExt, PIRP pIrp)
         }
     }
     else
-    {
         Status = STATUS_INVALID_PARAMETER;
-    }
 
     Assert(Status != STATUS_PENDING);
     VBoxDrvToolIoComplete(pIrp, Status, cbOut);
@@ -494,44 +503,42 @@ static NTSTATUS vboxUsbRtDispatchGetDevice(PVBOXUSBDEV_EXT pDevExt, PIRP pIrp)
 
 static NTSTATUS vboxUsbRtDispatchUsbReset(PVBOXUSBDEV_EXT pDevExt, PIRP pIrp)
 {
-    PIO_STACK_LOCATION pSl = IoGetCurrentIrpStackLocation(pIrp);
-    PFILE_OBJECT pFObj = pSl->FileObject;
-    PUSBSUP_GETDEV pDev  = (PUSBSUP_GETDEV)pIrp->AssociatedIrp.SystemBuffer;
-    NTSTATUS Status = STATUS_SUCCESS;
-
-    do
+    PIO_STACK_LOCATION  pSl   = IoGetCurrentIrpStackLocation(pIrp);
+    PFILE_OBJECT        pFObj = pSl->FileObject;
+    NTSTATUS            rcNt;
+    if (pFObj)
     {
-        if (!pFObj)
-        {
-            AssertFailed();
-            Status = STATUS_INVALID_PARAMETER;
-            break;
-        }
-
-        if (!vboxUsbRtCtxIsOwner(pDevExt, pFObj))
+        if (vboxUsbRtCtxIsOwner(pDevExt, pFObj))
         {
-            AssertFailed();
-            Status = STATUS_ACCESS_DENIED;
-            break;
+            if (   pIrp->AssociatedIrp.SystemBuffer == NULL
+                && pSl->Parameters.DeviceIoControl.InputBufferLength == 0
+                && pSl->Parameters.DeviceIoControl.OutputBufferLength == 0)
+            {
+                rcNt = VBoxUsbToolIoInternalCtlSendSync(pDevExt->pLowerDO, IOCTL_INTERNAL_USB_RESET_PORT, NULL, NULL);
+                Assert(NT_SUCCESS(rcNt));
+            }
+            else
+            {
+                AssertFailed();
+                rcNt = STATUS_INVALID_PARAMETER;
+            }
         }
-
-        if (pIrp->AssociatedIrp.SystemBuffer
-                || pSl->Parameters.DeviceIoControl.InputBufferLength
-                || pSl->Parameters.DeviceIoControl.OutputBufferLength)
+        else
         {
             AssertFailed();
-            Status = STATUS_INVALID_PARAMETER;
-            break;
+            rcNt = STATUS_ACCESS_DENIED;
         }
+    }
+    else
+    {
+        AssertFailed();
+        rcNt = STATUS_INVALID_PARAMETER;
+    }
 
-        Status = VBoxUsbToolIoInternalCtlSendSync(pDevExt->pLowerDO, IOCTL_INTERNAL_USB_RESET_PORT, NULL, NULL);
-        Assert(NT_SUCCESS(Status));
-    } while (0);
-
-    Assert(Status != STATUS_PENDING);
-    VBoxDrvToolIoComplete(pIrp, Status, 0);
+    Assert(rcNt != STATUS_PENDING);
+    VBoxDrvToolIoComplete(pIrp, rcNt, 0);
     vboxUsbDdiStateRelease(pDevExt);
-    return Status;
+    return rcNt;
 }
 
 static PUSB_CONFIGURATION_DESCRIPTOR vboxUsbRtFindConfigDesc(PVBOXUSBDEV_EXT pDevExt, uint8_t uConfiguration)
@@ -588,6 +595,10 @@ static NTSTATUS vboxUsbRtSetConfig(PVBOXUSBDEV_EXT pDevExt, uint8_t uConfigurati
         return Status;
     }
 
+/** @todo r=bird: Need to write a script for fixing these kind of clueless use
+ *        of AssertMsgFailed (into AssertMsgReturn).  The __FUNCTION__ is just
+ *        the topping it off - the assertion message includes function, file and
+ *        line number. Duh! */
     PUSB_CONFIGURATION_DESCRIPTOR pCfgDr = vboxUsbRtFindConfigDesc(pDevExt, uConfiguration);
     if (!pCfgDr)
     {
@@ -739,38 +750,23 @@ static NTSTATUS vboxUsbRtDispatchUsbSetConfig(PVBOXUSBDEV_EXT pDevExt, PIRP pIrp
 
 static NTSTATUS vboxUsbRtSetInterface(PVBOXUSBDEV_EXT pDevExt, uint32_t InterfaceNumber, int AlternateSetting)
 {
-    if (!pDevExt->Rt.uConfigValue)
-    {
-        AssertMsgFailed((__FUNCTION__": Can't select an interface without an active configuration\n"));
-        return STATUS_INVALID_PARAMETER;
-    }
-
-    if (InterfaceNumber >= pDevExt->Rt.uNumInterfaces)
-    {
-        AssertMsgFailed((__FUNCTION__": InterfaceNumber %d too high!!\n", InterfaceNumber));
-        return STATUS_INVALID_PARAMETER;
-    }
-
+    AssertMsgReturn(pDevExt->Rt.uConfigValue, ("Can't select an interface without an active configuration\n"),
+                    STATUS_INVALID_PARAMETER);
+    AssertMsgReturn(InterfaceNumber < pDevExt->Rt.uNumInterfaces, ("InterfaceNumber %d too high!!\n", InterfaceNumber),
+                    STATUS_INVALID_PARAMETER);
     PUSB_CONFIGURATION_DESCRIPTOR pCfgDr = vboxUsbRtFindConfigDesc(pDevExt, pDevExt->Rt.uConfigValue);
-    if (!pCfgDr)
-    {
-        AssertMsgFailed((__FUNCTION__": configuration %d not found!!\n", pDevExt->Rt.uConfigValue));
-        return STATUS_INVALID_PARAMETER;
-    }
-
+    AssertMsgReturn(pCfgDr, ("configuration %d not found!!\n", pDevExt->Rt.uConfigValue),
+                    STATUS_INVALID_PARAMETER);
     PUSB_INTERFACE_DESCRIPTOR pIfDr = USBD_ParseConfigurationDescriptorEx(pCfgDr, pCfgDr, InterfaceNumber, AlternateSetting, -1, -1, -1);
-    if (!pIfDr)
-    {
-        AssertMsgFailed((__FUNCTION__": invalid interface %d or alternate setting %d\n", InterfaceNumber, AlternateSetting));
-        return STATUS_UNSUCCESSFUL;
-    }
+    AssertMsgReturn(pIfDr, ("invalid interface %d or alternate setting %d\n", InterfaceNumber, AlternateSetting),
+                    STATUS_UNSUCCESSFUL);
 
     USHORT uUrbSize = GET_SELECT_INTERFACE_REQUEST_SIZE(pIfDr->bNumEndpoints);
     ULONG uTotalIfaceInfoLength = GET_USBD_INTERFACE_SIZE(pIfDr->bNumEndpoints);
     NTSTATUS Status = STATUS_SUCCESS;
     PURB pUrb;
-    PUSBD_INTERFACE_INFORMATION pNewIFInfo;
-    VBOXUSB_PIPE_INFO *pNewPipeInfo;
+    PUSBD_INTERFACE_INFORMATION pNewIFInfo = NULL;
+    VBOXUSB_PIPE_INFO *pNewPipeInfo = NULL;
 
     if (pDevExt->Rt.pVBIfaceInfo[InterfaceNumber].pInterfaceInfo)
     {
@@ -843,13 +839,13 @@ static NTSTATUS vboxUsbRtSetInterface(PVBOXUSBDEV_EXT pDevExt, uint32_t Interfac
     } while (0);
 
     /* Clean up. */
-    if (pUrb) 
+    if (pUrb)
         VBoxUsbToolUrbFree(pUrb);
     if (pNewIFInfo)
         vboxUsbMemFree(pNewIFInfo);
     if (pNewPipeInfo)
         vboxUsbMemFree(pNewPipeInfo);
-    
+
     return Status;
 }
 
@@ -897,9 +893,7 @@ static NTSTATUS vboxUsbRtDispatchUsbSelectInterface(PVBOXUSBDEV_EXT pDevExt, PIR
 static HANDLE vboxUsbRtGetPipeHandle(PVBOXUSBDEV_EXT pDevExt, uint32_t EndPointAddress)
 {
     if (EndPointAddress == 0)
-    {
         return pDevExt->Rt.hPipe0;
-    }
 
     for (ULONG i = 0; i < pDevExt->Rt.uNumInterfaces; i++)
     {
@@ -1025,6 +1019,8 @@ static NTSTATUS vboxUsbRtDispatchUsbAbortEndpoint(PVBOXUSBDEV_EXT pDevExt, PIRP
 
 static NTSTATUS vboxUsbRtUrbSendCompletion(PDEVICE_OBJECT pDevObj, IRP *pIrp, void *pvContext)
 {
+    RT_NOREF1(pDevObj);
+
     if (!pvContext)
     {
         AssertMsgFailed((__FUNCTION__":  context is NULL\n"));
@@ -1075,7 +1071,7 @@ static NTSTATUS vboxUsbRtUrbSendCompletion(PDEVICE_OBJECT pDevObj, IRP *pIrp, vo
             case USBD_STATUS_DEV_NOT_RESPONDING:
             default:
                 pUrbInfo->error = USBSUP_XFER_DNR;
-            break;
+                break;
         }
 
         switch(pContext->ulTransferType)
@@ -1089,10 +1085,10 @@ static NTSTATUS vboxUsbRtUrbSendCompletion(PDEVICE_OBJECT pDevObj, IRP *pIrp, vo
                 pUrbInfo->len += sizeof (pUrb->UrbControlTransfer.SetupPacket);
 
                 /* If a control URB was successfully completed on the default control
-                 * pipe, stash away the handle. When submitting the URB, we don't need 
-                 * to know (and initially don't have) the handle. If we want to abort 
-                 * the default control pipe, we *have* to have a handle. This is how we 
-                 * find out what the handle is. 
+                 * pipe, stash away the handle. When submitting the URB, we don't need
+                 * to know (and initially don't have) the handle. If we want to abort
+                 * the default control pipe, we *have* to have a handle. This is how we
+                 * find out what the handle is.
                  */
                 if (!pUrbInfo->ep && (pDevExt->Rt.hPipe0 == NULL))
                 {
@@ -1158,7 +1154,7 @@ static NTSTATUS vboxUsbRtUrbSendCompletion(PDEVICE_OBJECT pDevObj, IRP *pIrp, vo
                 Status = STATUS_SUCCESS;
                 break;
             case ((USBD_STATUS)0xC0010000L): // USBD_STATUS_CANCELED - too bad usbdi.h and usb.h aren't consistent!
-                // TODO: What the heck are we really supposed to do here?
+                /// @todo What the heck are we really supposed to do here?
                 pUrbInfo->error = USBSUP_XFER_STALL;
                 Status = STATUS_SUCCESS;
                 break;
@@ -1299,7 +1295,7 @@ static NTSTATUS vboxUsbRtUrbSend(PVBOXUSBDEV_EXT pDevExt, PIRP pIrp, PUSBSUP_URB
                  * the first 8 bytes of the buffer is the setup packet so the real
                  * data length is therefore pUrb->len - 8
                  */
-                PVBOXUSB_SETUP pSetup = (PVBOXUSB_SETUP)pUrb->UrbControlTransfer.SetupPacket;
+                //PVBOXUSB_SETUP pSetup = (PVBOXUSB_SETUP)pUrb->UrbControlTransfer.SetupPacket;
                 memcpy(pUrb->UrbControlTransfer.SetupPacket, pBuffer, min(sizeof (pUrb->UrbControlTransfer.SetupPacket), pUrbInfo->len));
 
                 if (pUrb->UrbControlTransfer.TransferBufferLength <= sizeof (pUrb->UrbControlTransfer.SetupPacket))
@@ -1487,8 +1483,9 @@ static NTSTATUS vboxUsbRtDispatchGetVersion(PVBOXUSBDEV_EXT pDevExt, PIRP pIrp)
     PUSBSUP_VERSION pVer= (PUSBSUP_VERSION)pIrp->AssociatedIrp.SystemBuffer;
     NTSTATUS Status = STATUS_SUCCESS;
 
-    if (pVer && pSl->Parameters.DeviceIoControl.InputBufferLength == 0
-             && pSl->Parameters.DeviceIoControl.OutputBufferLength == sizeof (*pVer))
+    if (   pVer
+        && pSl->Parameters.DeviceIoControl.InputBufferLength == 0
+        && pSl->Parameters.DeviceIoControl.OutputBufferLength == sizeof(*pVer))
     {
         pVer->u32Major = USBDRV_MAJOR_VERSION;
         pVer->u32Minor = USBDRV_MINOR_VERSION;
@@ -1514,14 +1511,10 @@ static NTSTATUS vboxUsbRtDispatchDefault(PVBOXUSBDEV_EXT pDevExt, PIRP pIrp)
 
 DECLHIDDEN(NTSTATUS) vboxUsbRtCreate(PVBOXUSBDEV_EXT pDevExt, PIRP pIrp)
 {
+    RT_NOREF1(pDevExt);
     PIO_STACK_LOCATION pSl = IoGetCurrentIrpStackLocation(pIrp);
     PFILE_OBJECT pFObj = pSl->FileObject;
-    if (!pFObj)
-    {
-        AssertFailed();
-        return STATUS_INVALID_PARAMETER;
-    }
-
+    AssertReturn(pFObj, STATUS_INVALID_PARAMETER);
     return STATUS_SUCCESS;
 }
 
@@ -1542,52 +1535,39 @@ DECLHIDDEN(NTSTATUS) vboxUsbRtDispatch(PVBOXUSBDEV_EXT pDevExt, PIRP pIrp)
     switch (pSl->Parameters.DeviceIoControl.IoControlCode)
     {
         case SUPUSB_IOCTL_USB_CLAIM_DEVICE:
-        {
             return vboxUsbRtDispatchClaimDevice(pDevExt, pIrp);
-        }
+
         case SUPUSB_IOCTL_USB_RELEASE_DEVICE:
-        {
             return vboxUsbRtDispatchReleaseDevice(pDevExt, pIrp);
-        }
+
         case SUPUSB_IOCTL_GET_DEVICE:
-        {
             return vboxUsbRtDispatchGetDevice(pDevExt, pIrp);
-        }
+
         case SUPUSB_IOCTL_USB_RESET:
-        {
             return vboxUsbRtDispatchUsbReset(pDevExt, pIrp);
-        }
+
         case SUPUSB_IOCTL_USB_SET_CONFIG:
-        {
             return vboxUsbRtDispatchUsbSetConfig(pDevExt, pIrp);
-        }
+
         case SUPUSB_IOCTL_USB_SELECT_INTERFACE:
-        {
             return vboxUsbRtDispatchUsbSelectInterface(pDevExt, pIrp);
-        }
+
         case SUPUSB_IOCTL_USB_CLEAR_ENDPOINT:
-        {
             return vboxUsbRtDispatchUsbClearEndpoint(pDevExt, pIrp);
-        }
+
         case SUPUSB_IOCTL_USB_ABORT_ENDPOINT:
-        {
             return vboxUsbRtDispatchUsbAbortEndpoint(pDevExt, pIrp);
-        }
+
         case SUPUSB_IOCTL_SEND_URB:
-        {
             return vboxUsbRtDispatchSendUrb(pDevExt, pIrp);
-        }
+
         case SUPUSB_IOCTL_IS_OPERATIONAL:
-        {
             return vboxUsbRtDispatchIsOperational(pDevExt, pIrp);
-        }
+
         case SUPUSB_IOCTL_GET_VERSION:
-        {
             return vboxUsbRtDispatchGetVersion(pDevExt, pIrp);
-        }
+
         default:
-        {
             return vboxUsbRtDispatchDefault(pDevExt, pIrp);
-        }
     }
 }
diff --git a/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbRt.h b/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbRt.h
index baad72c..5ee012d 100644
--- a/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbRt.h
+++ b/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbRt.h
@@ -3,7 +3,7 @@
  * VBox USB R0 runtime
  */
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxUSB/win/lib/VBoxUsbLib-win.cpp b/src/VBox/HostDrivers/VBoxUSB/win/lib/VBoxUsbLib-win.cpp
index d2db3ea..afb0a7c 100644
--- a/src/VBox/HostDrivers/VBoxUSB/win/lib/VBoxUsbLib-win.cpp
+++ b/src/VBox/HostDrivers/VBoxUSB/win/lib/VBoxUsbLib-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -20,7 +20,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #define LOG_GROUP LOG_GROUP_DRV_USBPROXY
-#include <windows.h>
+#include <iprt/win/windows.h>
 
 #include <VBox/sup.h>
 #include <VBox/types.h>
@@ -38,7 +38,7 @@
 #include <VBox/VBoxDrvCfg-win.h>
 #include <stdio.h>
 #pragma warning (disable:4200) /* shuts up the empty array member warnings */
-#include <setupapi.h>
+#include <iprt/win/setupapi.h>
 #include <usbdi.h>
 #include <hidsdi.h>
 
@@ -113,8 +113,8 @@ int usbLibVuDeviceValidate(PVBOXUSB_DEV pVuDev)
 
     if (hOut == INVALID_HANDLE_VALUE)
     {
-        DWORD winEr = GetLastError();
-        AssertMsgFailed(("CreateFile FAILED to open %s, winEr (%d)\n", pVuDev->szName, winEr));
+        DWORD dwErr = GetLastError(); NOREF(dwErr);
+        AssertMsgFailed(("CreateFile FAILED to open %s, dwErr (%d)\n", pVuDev->szName, dwErr));
         return VERR_GENERAL_FAILURE;
     }
 
@@ -131,7 +131,10 @@ int usbLibVuDeviceValidate(PVBOXUSB_DEV pVuDev)
         }
 
         if (   version.u32Major != USBDRV_MAJOR_VERSION
-            || version.u32Minor <  USBDRV_MINOR_VERSION)
+#if USBDRV_MINOR_VERSION != 0
+            || version.u32Minor <  USBDRV_MINOR_VERSION
+#endif
+           )
         {
             AssertMsgFailed(("Invalid version %d:%d vs %d:%d\n", version.u32Major, version.u32Minor, USBDRV_MAJOR_VERSION, USBDRV_MINOR_VERSION));
             break;
@@ -183,8 +186,8 @@ static int usbLibVuDevicePopulate(PVBOXUSB_DEV pVuDev, HDEVINFO hDevInfo, PSP_DE
                                 &cbDbgRequired,
                                 &DevInfoData))
         {
-            DWORD winEr = GetLastError();
-            AssertMsgFailed(("SetupDiGetDeviceInterfaceDetail, cbRequired (%d), was (%d), winEr (%d)\n", cbDbgRequired, cbIfDetailData, winEr));
+            DWORD dwErr = GetLastError(); NOREF(dwErr);
+            AssertMsgFailed(("SetupDiGetDeviceInterfaceDetail, cbRequired (%d), was (%d), dwErr (%d)\n", cbDbgRequired, cbIfDetailData, dwErr));
             rc = VERR_GENERAL_FAILURE;
             break;
         }
@@ -197,8 +200,8 @@ static int usbLibVuDevicePopulate(PVBOXUSB_DEV pVuDev, HDEVINFO hDevInfo, PSP_DE
             sizeof (pVuDev->szDriverRegName),
             &cbDbgRequired))
         {
-            DWORD winEr = GetLastError();
-            AssertMsgFailed(("SetupDiGetDeviceRegistryPropertyA, cbRequired (%d), was (%d), winEr (%d)\n", cbDbgRequired, sizeof (pVuDev->szDriverRegName), winEr));
+            DWORD dwErr = GetLastError(); NOREF(dwErr);
+            AssertMsgFailed(("SetupDiGetDeviceRegistryPropertyA, cbRequired (%d), was (%d), dwErr (%d)\n", cbDbgRequired, sizeof (pVuDev->szDriverRegName), dwErr));
             rc = VERR_GENERAL_FAILURE;
             break;
         }
@@ -233,8 +236,8 @@ static int usbLibVuGetDevices(PVBOXUSB_DEV *ppVuDevs, uint32_t *pcVuDevs)
             );
     if (hDevInfo == INVALID_HANDLE_VALUE)
     {
-        DWORD winEr = GetLastError();
-        AssertMsgFailed(("SetupDiGetClassDevs, winEr (%d)\n", winEr));
+        DWORD dwErr = GetLastError(); NOREF(dwErr);
+        AssertMsgFailed(("SetupDiGetClassDevs, dwErr (%d)\n", dwErr));
         return VERR_GENERAL_FAILURE;
     }
 
@@ -248,11 +251,11 @@ static int usbLibVuGetDevices(PVBOXUSB_DEV *ppVuDevs, uint32_t *pcVuDevs)
                             i,
                             &IfData))
         {
-            DWORD winEr = GetLastError();
-            if (winEr == ERROR_NO_MORE_ITEMS)
+            DWORD dwErr = GetLastError();
+            if (dwErr == ERROR_NO_MORE_ITEMS)
                 break;
 
-            AssertMsgFailed(("SetupDiEnumDeviceInterfaces, winEr (%d), resuming\n", winEr));
+            AssertMsgFailed(("SetupDiEnumDeviceInterfaces, dwErr (%d), resuming\n", dwErr));
             continue;
         }
 
@@ -359,8 +362,8 @@ static int usbLibDevStrDriverKeyGet(HANDLE hHub, ULONG iPort, LPSTR* plpszName)
     if (!DeviceIoControl(hHub, IOCTL_USB_GET_NODE_CONNECTION_DRIVERKEY_NAME, &Name, sizeof (Name), &Name, sizeof (Name), &cbReturned, NULL))
     {
 #ifdef VBOX_WITH_ANNOYING_USB_ASSERTIONS
-        DWORD winEr = GetLastError();
-        AssertMsgFailed(("DeviceIoControl 1 fail winEr (%d)\n", winEr));
+        DWORD dwErr = GetLastError();
+        AssertMsgFailed(("DeviceIoControl 1 fail dwErr (%d)\n", dwErr));
 #endif
         return VERR_GENERAL_FAILURE;
     }
@@ -389,8 +392,8 @@ static int usbLibDevStrDriverKeyGet(HANDLE hHub, ULONG iPort, LPSTR* plpszName)
     }
     else
     {
-        DWORD winEr = GetLastError();
-        AssertMsgFailed(("DeviceIoControl 2 fail winEr (%d)\n", winEr));
+        DWORD dwErr = GetLastError(); NOREF(dwErr);
+        AssertMsgFailed(("DeviceIoControl 2 fail dwErr (%d)\n", dwErr));
         rc = VERR_GENERAL_FAILURE;
     }
     RTMemFree(pName);
@@ -487,8 +490,8 @@ static int usbLibDevCfgDrGet(HANDLE hHub, ULONG iPort, ULONG iDr, PUSB_CONFIGURA
                                 pCfgDrRq, sizeof (Buf),
                                 &cbReturned, NULL))
     {
-        DWORD winEr = GetLastError();
-        LogRelFunc(("DeviceIoControl 1 fail winEr (%d)\n", winEr));
+        DWORD dwErr = GetLastError();
+        LogRelFunc(("DeviceIoControl 1 fail dwErr (%d)\n", dwErr));
 #ifdef VBOX_WITH_ANNOYING_USB_ASSERTIONS
         AssertFailed();
 #endif
@@ -524,8 +527,8 @@ static int usbLibDevCfgDrGet(HANDLE hHub, ULONG iPort, ULONG iDr, PUSB_CONFIGURA
                                     pRq, cbRq,
                                     &cbReturned, NULL))
         {
-            DWORD winEr = GetLastError();
-            LogRelFunc(("DeviceIoControl 2 fail winEr (%d)\n", winEr));
+            DWORD dwErr = GetLastError();
+            LogRelFunc(("DeviceIoControl 2 fail dwErr (%d)\n", dwErr));
 #ifdef VBOX_WITH_ANNOYING_USB_ASSERTIONS
             AssertFailed();
 #endif
@@ -728,7 +731,7 @@ static int usbLibDevGetHubPortDevices(HANDLE hHub, LPCSTR lpcszHubName, ULONG iP
     int rc = VINF_SUCCESS;
     char Buf[sizeof (USB_NODE_CONNECTION_INFORMATION_EX) + (sizeof (USB_PIPE_INFO) * 20)];
     PUSB_NODE_CONNECTION_INFORMATION_EX pConInfo = (PUSB_NODE_CONNECTION_INFORMATION_EX)Buf;
-    PUSB_PIPE_INFO paPipeInfo = (PUSB_PIPE_INFO)(Buf + sizeof (PUSB_NODE_CONNECTION_INFORMATION_EX));
+    //PUSB_PIPE_INFO paPipeInfo = (PUSB_PIPE_INFO)(Buf + sizeof (PUSB_NODE_CONNECTION_INFORMATION_EX));
     DWORD cbReturned = 0;
     memset(&Buf, 0, sizeof (Buf));
     pConInfo->ConnectionIndex = iPort;
@@ -737,8 +740,8 @@ static int usbLibDevGetHubPortDevices(HANDLE hHub, LPCSTR lpcszHubName, ULONG iP
                                   pConInfo, sizeof (Buf),
                                   &cbReturned, NULL))
     {
-        DWORD winEr = GetLastError();
-        AssertMsg(winEr == ERROR_DEVICE_NOT_CONNECTED, (__FUNCTION__": DeviceIoControl failed winEr (%d)\n", winEr));
+        DWORD dwErr = GetLastError(); NOREF(dwErr);
+        AssertMsg(dwErr == ERROR_DEVICE_NOT_CONNECTED, (__FUNCTION__": DeviceIoControl failed dwErr (%d)\n", dwErr));
         return VERR_GENERAL_FAILURE;
     }
 
@@ -893,6 +896,7 @@ static int usbLibDevGetDevices(PUSBDEVICE *ppDevs, uint32_t *pcDevs)
     return VINF_SUCCESS;
 }
 
+#if 0 /* unused */
 static PUSBSUP_GET_DEVICES usbLibMonGetDevRqAlloc(uint32_t cDevs, PDWORD pcbRq)
 {
     DWORD cbRq = RT_OFFSETOF(USBSUP_GET_DEVICES, aDevices[cDevs]);
@@ -904,6 +908,7 @@ static PUSBSUP_GET_DEVICES usbLibMonGetDevRqAlloc(uint32_t cDevs, PDWORD pcbRq)
     *pcbRq = cbRq;
     return pRq;
 }
+#endif
 
 static int usbLibMonDevicesCmp(PUSBDEVICE pDev, PVBOXUSB_DEV pDevInfo)
 {
@@ -912,8 +917,9 @@ static int usbLibMonDevicesCmp(PUSBDEVICE pDev, PVBOXUSB_DEV pDevInfo)
     return iDiff;
 }
 
-static int usbLibMonDevicesUpdate(PVBOXUSBGLOBALSTATE pGlobal, PUSBDEVICE pDevs, uint32_t cDevs, PVBOXUSB_DEV pDevInfos, uint32_t cDevInfos)
+static int usbLibMonDevicesUpdate(PVBOXUSBGLOBALSTATE pGlobal, PUSBDEVICE pDevs, PVBOXUSB_DEV pDevInfos)
 {
+
     PUSBDEVICE pDevsHead = pDevs;
     for (; pDevInfos; pDevInfos = pDevInfos->pNext)
     {
@@ -940,10 +946,10 @@ static int usbLibMonDevicesUpdate(PVBOXUSBGLOBALSTATE pGlobal, PUSBDEVICE pDevs,
             DWORD cbReturned = 0;
             if (!DeviceIoControl(hDev, SUPUSB_IOCTL_GET_DEVICE, &Dev, sizeof (Dev), &Dev, sizeof (Dev), &cbReturned, NULL))
             {
-                 DWORD winEr = GetLastError();
-                 /* ERROR_DEVICE_NOT_CONNECTED -> device was removed just now */
 #ifdef VBOX_WITH_ANNOYING_USB_ASSERTIONS
-                 AssertMsg(winEr == ERROR_DEVICE_NOT_CONNECTED, (__FUNCTION__": DeviceIoControl failed winEr (%d)\n", winEr));
+                 DWORD dwErr = GetLastError(); NOREF(dwErr);
+                 /* ERROR_DEVICE_NOT_CONNECTED -> device was removed just now */
+                 AssertMsg(dwErr == ERROR_DEVICE_NOT_CONNECTED, (__FUNCTION__": DeviceIoControl failed dwErr (%d)\n", dwErr));
 #endif
                  Log(("SUPUSB_IOCTL_GET_DEVICE: DeviceIoControl no longer connected\n"));
                  CloseHandle(hDev);
@@ -957,9 +963,9 @@ static int usbLibMonDevicesUpdate(PVBOXUSBGLOBALSTATE pGlobal, PUSBDEVICE pDevs,
             HVBOXUSBDEVUSR hDevice = Dev.hDevice;
             if (!DeviceIoControl(pGlobal->hMonitor, SUPUSBFLT_IOCTL_GET_DEVICE, &hDevice, sizeof (hDevice), &MonInfo, sizeof (MonInfo), &cbReturned, NULL))
             {
-                 DWORD winEr = GetLastError();
+                 DWORD dwErr = GetLastError(); NOREF(dwErr);
                  /* ERROR_DEVICE_NOT_CONNECTED -> device was removed just now */
-                 AssertMsgFailed(("Monitor DeviceIoControl failed winEr (%d)\n", winEr));
+                 AssertMsgFailed(("Monitor DeviceIoControl failed dwErr (%d)\n", dwErr));
                  Log(("SUPUSBFLT_IOCTL_GET_DEVICE: DeviceIoControl no longer connected\n"));
                  CloseHandle(hDev);
                  break;
@@ -1020,7 +1026,7 @@ static int usbLibGetDevices(PVBOXUSBGLOBALSTATE pGlobal, PUSBDEVICE *ppDevs, uin
         AssertRC(rc);
         if (RT_SUCCESS(rc))
         {
-            rc = usbLibMonDevicesUpdate(pGlobal, *ppDevs, *pcDevs, pDevInfos, cDevInfos);
+            rc = usbLibMonDevicesUpdate(pGlobal, *ppDevs, pDevInfos);
             AssertRC(rc);
             usbLibVuFreeDevices(pDevInfos);
         }
@@ -1048,8 +1054,8 @@ static int usbLibStateWaitChange(PVBOXUSBGLOBALSTATE pGlobal, RTMSINTERVAL cMill
             return VERR_TIMEOUT;
         default:
         {
-            DWORD winEr = GetLastError();
-            AssertMsgFailed(("WaitForMultipleObjects failed, winEr (%d)\n", winEr));
+            DWORD dwErr = GetLastError(); NOREF(dwErr);
+            AssertMsgFailed(("WaitForMultipleObjects failed, dwErr (%d)\n", dwErr));
             return VERR_GENERAL_FAILURE;
         }
     }
@@ -1064,11 +1070,11 @@ USBLIB_DECL(int) USBLibWaitChange(RTMSINTERVAL msWaitTimeout)
 
 static int usbLibInterruptWaitChange(PVBOXUSBGLOBALSTATE pGlobal)
 {
-    BOOL bRc = SetEvent(pGlobal->hInterruptEvent);
-    if (!bRc)
+    BOOL fRc = SetEvent(pGlobal->hInterruptEvent);
+    if (!fRc)
     {
-        DWORD winEr = GetLastError();
-        AssertMsgFailed(("SetEvent failed, winEr (%d)\n", winEr));
+        DWORD dwErr = GetLastError(); NOREF(dwErr);
+        AssertMsgFailed(("SetEvent failed, dwErr (%d)\n", dwErr));
         return VERR_GENERAL_FAILURE;
     }
     return VINF_SUCCESS;
@@ -1116,8 +1122,8 @@ USBLIB_DECL(void *) USBLibAddFilter(PCUSBFILTER pFilter)
                 &FltAddRc, sizeof(FltAddRc),
                 &cbReturned, NULL))
     {
-        DWORD winEr = GetLastError();
-        AssertMsgFailed(("DeviceIoControl failed with winEr (%d(\n", winEr));
+        DWORD dwErr = GetLastError(); NOREF(dwErr);
+        AssertMsgFailed(("DeviceIoControl failed with dwErr (%d(\n", dwErr));
         return NULL;
     }
 
@@ -1161,9 +1167,9 @@ USBLIB_DECL(int) USBLibRunFilters()
                 NULL, 0,
                 &cbReturned, NULL))
     {
-        DWORD winEr = GetLastError();
-        AssertMsgFailed(("DeviceIoControl failed with winEr (%d(\n", winEr));
-        return RTErrConvertFromWin32(winEr);
+        DWORD dwErr = GetLastError();
+        AssertMsgFailed(("DeviceIoControl failed with dwErr (%d(\n", dwErr));
+        return RTErrConvertFromWin32(dwErr);
     }
 
     return VINF_SUCCESS;
@@ -1174,6 +1180,7 @@ USBLIB_DECL(int) USBLibRunFilters()
 
 static VOID CALLBACK usbLibTimerCallback(__in PVOID lpParameter, __in BOOLEAN TimerOrWaitFired)
 {
+    RT_NOREF2(lpParameter, TimerOrWaitFired);
     SetEvent(g_VBoxUsbGlobal.hNotifyEvent);
 }
 
@@ -1189,8 +1196,8 @@ static void usbLibOnDeviceChange(void)
     {
         if (!DeleteTimerQueueTimer(g_VBoxUsbGlobal.hTimerQueue, g_VBoxUsbGlobal.hTimer, NULL))
         {
-            DWORD winEr = GetLastError();
-            AssertMsg(winEr == ERROR_IO_PENDING, ("DeleteTimerQueueTimer failed, winEr (%d)\n", winEr));
+            DWORD dwErr = GetLastError(); NOREF(dwErr);
+            AssertMsg(dwErr == ERROR_IO_PENDING, ("DeleteTimerQueueTimer failed, dwErr (%d)\n", dwErr));
         }
     }
 
@@ -1201,8 +1208,8 @@ static void usbLibOnDeviceChange(void)
                                0,
                                WT_EXECUTEONLYONCE))
     {
-        DWORD winEr = GetLastError();
-        AssertMsgFailed(("CreateTimerQueueTimer failed, winEr (%d)\n", winEr));
+        DWORD dwErr = GetLastError(); NOREF(dwErr);
+        AssertMsgFailed(("CreateTimerQueueTimer failed, dwErr (%d)\n", dwErr));
 
         /* call it directly */
         usbLibTimerCallback(NULL, FALSE);
@@ -1242,6 +1249,7 @@ static DWORD WINAPI usbLibMsgThreadProc(__in LPVOID lpParameter)
 {
     static LPCSTR   s_szVBoxUsbWndClassName = "VBoxUsbLibClass";
     const HINSTANCE hInstance               = (HINSTANCE)GetModuleHandle(NULL);
+    RT_NOREF1(lpParameter);
 
     Assert(g_VBoxUsbGlobal.hWnd == NULL);
     g_VBoxUsbGlobal.hWnd = NULL;
@@ -1360,8 +1368,8 @@ USBLIB_DECL(int) USBLibInit(void)
                                                           NULL);
                     if (g_VBoxUsbGlobal.hMonitor == INVALID_HANDLE_VALUE)
                     {
-                        DWORD winEr = GetLastError();
-                        LogRelFunc(("CreateFile failed winEr(%d)\n", winEr));
+                        DWORD dwErr = GetLastError();
+                        LogRelFunc(("CreateFile failed dwErr(%d)\n", dwErr));
                         rc = VERR_FILE_NOT_FOUND;
                     }
                 }
@@ -1386,7 +1394,10 @@ USBLIB_DECL(int) USBLibInit(void)
                                     &cbReturned, NULL))
                 {
                     if (   Version.u32Major == USBMON_MAJOR_VERSION
-                        && Version.u32Minor >= USBMON_MINOR_VERSION)
+#if USBMON_MINOR_VERSION != 0
+                        && Version.u32Minor >= USBMON_MINOR_VERSION
+#endif
+                        )
                     {
 #ifndef VBOX_USB_USE_DEVICE_NOTIFICATION
                         /*
@@ -1414,8 +1425,8 @@ USBLIB_DECL(int) USBLibInit(void)
                         }
                         else
                         {
-                            DWORD winEr = GetLastError();
-                            AssertMsgFailed(("SetEvent Ioctl failed, winEr (%d)\n", winEr));
+                            DWORD dwErr = GetLastError();
+                            AssertMsgFailed(("SetEvent Ioctl failed, dwErr (%d)\n", dwErr));
                             rc = VERR_VERSION_MISMATCH;
                         }
 #else
@@ -1459,14 +1470,15 @@ USBLIB_DECL(int) USBLibInit(void)
 
                                 dwResult = WaitForSingleObject(g_VBoxUsbGlobal.hThread, INFINITE);
                                 Assert(dwResult == WAIT_OBJECT_0);
-                                BOOL bRc = CloseHandle(g_VBoxUsbGlobal.hThread);
-                                AssertMsg(bRc, ("CloseHandle for hThread failed winEr(%d)\n", GetLastError()));
+                                BOOL fRc = CloseHandle(g_VBoxUsbGlobal.hThread); NOREF(fRc);
+                                DWORD dwErr = GetLastError(); NOREF(dwErr);
+                                AssertMsg(fRc, ("CloseHandle for hThread failed dwErr(%d)\n", dwErr));
                                 g_VBoxUsbGlobal.hThread = INVALID_HANDLE_VALUE;
                             }
                             else
                             {
-                                DWORD winEr = GetLastError();
-                                AssertMsgFailed(("CreateThread failed, winEr (%d)\n", winEr));
+                                DWORD dwErr = GetLastError(); NOREF(dwErr);
+                                AssertMsgFailed(("CreateThread failed, dwErr (%d)\n", dwErr));
                                 rc = VERR_GENERAL_FAILURE;
                             }
 
@@ -1475,8 +1487,8 @@ USBLIB_DECL(int) USBLibInit(void)
                         }
                         else
                         {
-                            DWORD winEr = GetLastError();
-                            AssertMsgFailed(("CreateTimerQueue failed winEr(%d)\n", winEr));
+                            DWORD dwErr = GetLastError(); NOREF(dwErr);
+                            AssertMsgFailed(("CreateTimerQueue failed dwErr(%d)\n", dwErr));
                         }
 #endif
                     }
@@ -1492,8 +1504,8 @@ USBLIB_DECL(int) USBLibInit(void)
                 }
                 else
                 {
-                    DWORD winEr = GetLastError();
-                    AssertMsgFailed(("DeviceIoControl failed winEr(%d)\n", winEr));
+                    DWORD dwErr = GetLastError(); NOREF(dwErr);
+                    AssertMsgFailed(("DeviceIoControl failed dwErr(%d)\n", dwErr));
                     rc = VERR_VERSION_MISMATCH;
                 }
 
@@ -1514,8 +1526,8 @@ USBLIB_DECL(int) USBLibInit(void)
         }
         else
         {
-            DWORD winEr = GetLastError();
-            AssertMsgFailed(("CreateEvent for InterruptEvent failed winEr(%d)\n", winEr));
+            DWORD dwErr = GetLastError(); NOREF(dwErr);
+            AssertMsgFailed(("CreateEvent for InterruptEvent failed dwErr(%d)\n", dwErr));
             rc = VERR_GENERAL_FAILURE;
         }
 
@@ -1524,8 +1536,8 @@ USBLIB_DECL(int) USBLibInit(void)
     }
     else
     {
-        DWORD winEr = GetLastError();
-        AssertMsgFailed(("CreateEvent for NotifyEvent failed winEr(%d)\n", winEr));
+        DWORD dwErr = GetLastError(); NOREF(dwErr);
+        AssertMsgFailed(("CreateEvent for NotifyEvent failed dwErr(%d)\n", dwErr));
         rc = VERR_GENERAL_FAILURE;
     }
 
@@ -1551,44 +1563,44 @@ USBLIB_DECL(int) USBLibTerm(void)
         return VINF_SUCCESS;
     }
 
-    BOOL bRc;
+    BOOL fRc;
 #ifdef VBOX_USB_USE_DEVICE_NOTIFICATION
-    bRc = PostMessage(g_VBoxUsbGlobal.hWnd, WM_CLOSE, 0, 0);
-    AssertMsg(bRc, ("PostMessage for hWnd failed winEr(%d)\n", GetLastError()));
+    fRc = PostMessage(g_VBoxUsbGlobal.hWnd, WM_CLOSE, 0, 0);
+    AssertMsg(fRc, ("PostMessage for hWnd failed dwErr(%d)\n", GetLastError()));
 
     if (g_VBoxUsbGlobal.hThread != NULL)
     {
         DWORD dwResult = WaitForSingleObject(g_VBoxUsbGlobal.hThread, INFINITE);
-        Assert(dwResult == WAIT_OBJECT_0);
-        bRc = CloseHandle(g_VBoxUsbGlobal.hThread);
-        AssertMsg(bRc, ("CloseHandle for hThread failed winEr(%d)\n", GetLastError()));
+        Assert(dwResult == WAIT_OBJECT_0); NOREF(dwResult);
+        fRc = CloseHandle(g_VBoxUsbGlobal.hThread);
+        AssertMsg(fRc, ("CloseHandle for hThread failed dwErr(%d)\n", GetLastError()));
     }
 
     if (g_VBoxUsbGlobal.hTimer)
     {
-        bRc = DeleteTimerQueueTimer(g_VBoxUsbGlobal.hTimerQueue, g_VBoxUsbGlobal.hTimer,
+        fRc = DeleteTimerQueueTimer(g_VBoxUsbGlobal.hTimerQueue, g_VBoxUsbGlobal.hTimer,
                                     INVALID_HANDLE_VALUE); /* <-- to block until the timer is completed */
-        AssertMsg(bRc, ("DeleteTimerQueueTimer failed winEr(%d)\n", GetLastError()));
+        AssertMsg(fRc, ("DeleteTimerQueueTimer failed dwErr(%d)\n", GetLastError()));
     }
 
     if (g_VBoxUsbGlobal.hTimerQueue)
     {
-        bRc = DeleteTimerQueueEx(g_VBoxUsbGlobal.hTimerQueue,
+        fRc = DeleteTimerQueueEx(g_VBoxUsbGlobal.hTimerQueue,
                                  INVALID_HANDLE_VALUE); /* <-- to block until all timers are completed */
-        AssertMsg(bRc, ("DeleteTimerQueueEx failed winEr(%d)\n", GetLastError()));
+        AssertMsg(fRc, ("DeleteTimerQueueEx failed dwErr(%d)\n", GetLastError()));
     }
 #endif /* VBOX_USB_USE_DEVICE_NOTIFICATION */
 
-    bRc = CloseHandle(g_VBoxUsbGlobal.hMonitor);
-    AssertMsg(bRc, ("CloseHandle for hMonitor failed winEr(%d)\n", GetLastError()));
+    fRc = CloseHandle(g_VBoxUsbGlobal.hMonitor);
+    AssertMsg(fRc, ("CloseHandle for hMonitor failed dwErr(%d)\n", GetLastError()));
     g_VBoxUsbGlobal.hMonitor = INVALID_HANDLE_VALUE;
 
-    bRc = CloseHandle(g_VBoxUsbGlobal.hInterruptEvent);
-    AssertMsg(bRc, ("CloseHandle for hInterruptEvent failed lasterr=%u\n", GetLastError()));
+    fRc = CloseHandle(g_VBoxUsbGlobal.hInterruptEvent);
+    AssertMsg(fRc, ("CloseHandle for hInterruptEvent failed lasterr=%u\n", GetLastError()));
     g_VBoxUsbGlobal.hInterruptEvent = NULL;
 
-    bRc = CloseHandle(g_VBoxUsbGlobal.hNotifyEvent);
-    AssertMsg(bRc, ("CloseHandle for hNotifyEvent failed winEr(%d)\n", GetLastError()));
+    fRc = CloseHandle(g_VBoxUsbGlobal.hNotifyEvent);
+    AssertMsg(fRc, ("CloseHandle for hNotifyEvent failed dwErr(%d)\n", GetLastError()));
     g_VBoxUsbGlobal.hNotifyEvent = NULL;
 
     return VINF_SUCCESS;
diff --git a/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUSBMon.inf b/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUSBMon.inf
index 78f4261..46cbcb0 100644
--- a/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUSBMon.inf
+++ b/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUSBMon.inf
@@ -3,7 +3,7 @@
 ;
 ; Installation file
 ;
-; Copyright (C) 2011-2015 Oracle Corporation
+; Copyright (C) 2011-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbFlt.cpp b/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbFlt.cpp
index 0b2cbf1..bd1eeaa 100644
--- a/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbFlt.cpp
+++ b/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbFlt.cpp
@@ -3,7 +3,7 @@
  * VBox USB Monitor Device Filtering functionality
  */
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -782,8 +782,10 @@ typedef struct VBOXUSBFLTCHECKWALKER
     PVBOXUSBFLTCTX pContext;
 } VBOXUSBFLTCHECKWALKER, *PVBOXUSBFLTCHECKWALKER;
 
-static DECLCALLBACK(BOOLEAN) vboxUsbFltFilterCheckWalker(PFILE_OBJECT pFile, PDEVICE_OBJECT pTopDo, PDEVICE_OBJECT pHubDo, PVOID pvContext)
+static DECLCALLBACK(BOOLEAN) vboxUsbFltFilterCheckWalker(PFILE_OBJECT pFile, PDEVICE_OBJECT pTopDo,
+                                                         PDEVICE_OBJECT pHubDo, PVOID pvContext)
 {
+    RT_NOREF1(pHubDo);
     PVBOXUSBFLTCHECKWALKER pData = (PVBOXUSBFLTCHECKWALKER)pvContext;
     PVBOXUSBFLTCTX pContext = pData->pContext;
 
@@ -842,9 +844,10 @@ static DECLCALLBACK(BOOLEAN) vboxUsbFltFilterCheckWalker(PFILE_OBJECT pFile, PDE
                 bool fIsOneShot = false;
                 VBOXUSBFLT_LOCK_ACQUIRE();
                 PVBOXUSBFLTCTX pCtx = vboxUsbFltDevMatchLocked(&Device, &uId,
-                        false, /* do not remove a one-shot filter */
-                        &fFilter, &fIsOneShot);
+                                                               false, /* do not remove a one-shot filter */
+                                                               &fFilter, &fIsOneShot);
                 VBOXUSBFLT_LOCK_RELEASE();
+                NOREF(pCtx);
                 LOG(("Matching Info: Filter (0x%p), pCtx(0x%p), fFilter(%d), fIsOneShot(%d)", uId, pCtx, (int)fFilter, (int)fIsOneShot));
                 if (fFilter)
                 {
@@ -930,7 +933,7 @@ NTSTATUS VBoxUsbFltClose(PVBOXUSBFLTCTX pContext)
     ASSERT_WARN(Irql == PASSIVE_LEVEL, ("irql==(%d)", Irql));
 
     VBOXUSBFLT_LOCK_ACQUIRE();
-    uint32_t cActiveFilters = pContext->cActiveFilters;
+
     pContext->bRemoved = TRUE;
     if (pContext->pChangeEvent)
     {
@@ -942,9 +945,7 @@ NTSTATUS VBoxUsbFltClose(PVBOXUSBFLTCTX pContext)
         pContext->pChangeEvent = NULL;
     }
     else
-    {
         LOG(("no change event"));
-    }
     RemoveEntryList(&pContext->ListEntry);
 
     LOG(("removing owner filters"));
@@ -955,8 +956,8 @@ NTSTATUS VBoxUsbFltClose(PVBOXUSBFLTCTX pContext)
     LOG(("enumerating devices.."));
     /* 2. check if there are devices owned */
     for (PLIST_ENTRY pEntry = g_VBoxUsbFltGlobals.DeviceList.Flink;
-            pEntry != &g_VBoxUsbFltGlobals.DeviceList;
-            pEntry = pEntry->Flink)
+         pEntry != &g_VBoxUsbFltGlobals.DeviceList;
+         pEntry = pEntry->Flink)
     {
         PVBOXUSBFLT_DEVICE pDevice = PVBOXUSBFLT_DEVICE_FROM_LE(pEntry);
         if (pDevice->pOwner != pContext)
@@ -983,6 +984,7 @@ NTSTATUS VBoxUsbFltClose(PVBOXUSBFLTCTX pContext)
             LOG(("device does NOT need replug"));
         }
     }
+
     VBOXUSBFLT_LOCK_RELEASE();
 
     /* this should replug all devices that were either skipped or grabbed due to the context's */
@@ -1191,6 +1193,8 @@ static void vboxUsbDevToUserInfo(PVBOXUSBFLTCTX pContext, PVBOXUSBFLT_DEVICE pDe
         strcpy(pDevInfo->szObjName, pDevice->szObjName);
     }
     pDevInfo->fHighSpeed = pDevice->fHighSpeed;
+#else
+    RT_NOREF3(pContext, pDevice, pDevInfo);
 #endif
 }
 
@@ -1315,6 +1319,7 @@ NTSTATUS VBoxUsbFltPdoAdd(PDEVICE_OBJECT pPdo, BOOLEAN *pbFiltered)
 
 NTSTATUS VBoxUsbFltPdoAddCompleted(PDEVICE_OBJECT pPdo)
 {
+    RT_NOREF1(pPdo);
     VBOXUSBFLT_LOCK_ACQUIRE();
     vboxUsbFltSignalChangeLocked();
     VBOXUSBFLT_LOCK_RELEASE();
@@ -1325,11 +1330,11 @@ BOOLEAN VBoxUsbFltPdoIsFiltered(PDEVICE_OBJECT pPdo)
 {
     VBOXUSBFLT_DEVSTATE enmState = VBOXUSBFLT_DEVSTATE_REMOVED;
     VBOXUSBFLT_LOCK_ACQUIRE();
+
     PVBOXUSBFLT_DEVICE pDevice = vboxUsbFltDevGetLocked(pPdo);
     if (pDevice)
-    {
         enmState = pDevice->enmState;
-    }
+
     VBOXUSBFLT_LOCK_RELEASE();
 
     return enmState >= VBOXUSBFLT_DEVSTATE_CAPTURING;
diff --git a/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbFlt.h b/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbFlt.h
index f0aea57..6077952 100644
--- a/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbFlt.h
+++ b/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbFlt.h
@@ -2,8 +2,9 @@
 /** @file
  * VBox USB Monitor Device Filtering functionality
  */
+
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -13,8 +14,9 @@
  * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
-#ifndef ___VBoxUsbFlt_h___
-#define ___VBoxUsbFlt_h___
+
+#ifndef ___win_mon_VBoxUsbFlt_h___
+#define ___win_mon_VBoxUsbFlt_h___
 
 #include "VBoxUsbMon.h"
 #include <VBoxUSBFilterMgr.h>
@@ -50,4 +52,5 @@ NTSTATUS VBoxUsbFltPdoAddCompleted(PDEVICE_OBJECT pPdo);
 NTSTATUS VBoxUsbFltPdoRemove(PDEVICE_OBJECT pPdo);
 BOOLEAN VBoxUsbFltPdoIsFiltered(PDEVICE_OBJECT pPdo);
 
-#endif /* #ifndef ___VBoxUsbFlt_h___ */
+#endif
+
diff --git a/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbHook.cpp b/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbHook.cpp
index e63b7ff..345c8db 100644
--- a/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbHook.cpp
+++ b/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbHook.cpp
@@ -2,8 +2,9 @@
 /** @file
  * Driver Dispatch Table Hooking API
  */
+
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -13,10 +14,20 @@
  * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
 #include "VBoxUsbMon.h"
 
+
+/*********************************************************************************************************************************
+*   Defined Constants And Macros                                                                                                 *
+*********************************************************************************************************************************/
 #define VBOXUSBHOOK_MEMTAG 'HUBV'
 
+
 NTSTATUS VBoxUsbHookInstall(PVBOXUSBHOOK_ENTRY pHook)
 {
     KIRQL Irql;
@@ -131,8 +142,10 @@ NTSTATUS VBoxUsbHookRequestPassDownHookSkip(PVBOXUSBHOOK_ENTRY pHook, PDEVICE_OB
     return pHook->pfnOldHandler(pDevObj, pIrp);
 }
 
-NTSTATUS VBoxUsbHookRequestMoreProcessingRequired(PVBOXUSBHOOK_ENTRY pHook, PDEVICE_OBJECT pDevObj, PIRP pIrp, PVBOXUSBHOOK_REQUEST pRequest)
+NTSTATUS VBoxUsbHookRequestMoreProcessingRequired(PVBOXUSBHOOK_ENTRY pHook, PDEVICE_OBJECT pDevObj, PIRP pIrp,
+                                                  PVBOXUSBHOOK_REQUEST pRequest)
 {
+    RT_NOREF3(pHook, pDevObj, pIrp);
     Assert(!pRequest->bCompletionStopped);
     pRequest->bCompletionStopped = TRUE;
     return STATUS_MORE_PROCESSING_REQUIRED;
diff --git a/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbHook.h b/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbHook.h
index 772bb2f..5558a44 100644
--- a/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbHook.h
+++ b/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbHook.h
@@ -3,7 +3,7 @@
  * Driver Dispatch Table Hooking API impl
  */
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbMon.cpp b/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbMon.cpp
index 2c84cdb..dba6c1d 100644
--- a/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbMon.cpp
+++ b/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbMon.cpp
@@ -2,8 +2,9 @@
 /** @file
  * VBox USB Monitor
  */
+
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -14,6 +15,10 @@
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
 
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
 #include "VBoxUsbMon.h"
 #include "../cmn/VBoxUsbIdc.h"
 #include <vbox/err.h>
@@ -21,6 +26,10 @@
 #include <excpt.h>
 #include <stdio.h>
 
+
+/*********************************************************************************************************************************
+*   Defined Constants And Macros                                                                                                 *
+*********************************************************************************************************************************/
 /*
  * Note: Must match the VID & PID in the USB driver .inf file!!
  */
@@ -40,6 +49,13 @@
 
 #define szDeviceTextDescription          L"VirtualBox USB"
 
+
+#define VBOXUSBMON_MEMTAG 'MUBV'
+
+
+/*********************************************************************************************************************************
+*   Structures and Typedefs                                                                                                      *
+*********************************************************************************************************************************/
 typedef struct VBOXUSBMONINS
 {
     void * pvDummy;
@@ -91,9 +107,13 @@ typedef struct VBOXUSBMONGLOBALS
     PFILE_OBJECT pPreventUnloadFileObj;
 } VBOXUSBMONGLOBALS, *PVBOXUSBMONGLOBALS;
 
+
+/*********************************************************************************************************************************
+*   Global Variables                                                                                                             *
+*********************************************************************************************************************************/
 static VBOXUSBMONGLOBALS g_VBoxUsbMonGlobals;
 
-#define VBOXUSBMON_MEMTAG 'MUBV'
+
 
 PVOID VBoxUsbMonMemAlloc(SIZE_T cbBytes)
 {
@@ -155,11 +175,8 @@ static const char* vboxUsbDbgStrPnPMn(UCHAR uMn)
 
 void vboxUsbDbgPrintUnicodeString(PUNICODE_STRING pUnicodeString)
 {
-    PWSTR pStr = pUnicodeString->Buffer;
-    for (int i = 0; i < pUnicodeString->Length/2; ++i)
-    {
-        LOG(("%c", *pStr++));
-    }
+    RT_NOREF1(pUnicodeString);
+    Log(("%.*ls", pUnicodeString->Length / 2, pUnicodeString->Buffer));
 }
 
 /**
@@ -420,6 +437,7 @@ typedef struct VBOXUSBOBJNAMEPREFIXMATCHER
 
 static DECLCALLBACK(VOID) vboxUsbObjDevNamePrefixMatcher(PDEVICE_OBJECT pDo, PUNICODE_STRING pName, PVOID pvMatcher)
 {
+    RT_NOREF1(pDo);
     PVBOXUSBOBJNAMEPREFIXMATCHER pData = (PVBOXUSBOBJNAMEPREFIXMATCHER)pvMatcher;
     PUNICODE_STRING pNamePrefix = pData->pNamePrefix;
     ASSERT_WARN(!pData->fMatched, ("match flag already set!"));
@@ -437,6 +455,7 @@ typedef struct VBOXUSBOBJDRVOBJSEARCHER
 
 static DECLCALLBACK(BOOLEAN) vboxUsbObjDevObjSearcherWalker(PDEVICE_OBJECT pTopDo, PDEVICE_OBJECT pCurDo, PVOID pvContext)
 {
+    RT_NOREF1(pTopDo);
     PVBOXUSBOBJDRVOBJSEARCHER pData = (PVBOXUSBOBJDRVOBJSEARCHER)pvContext;
     ASSERT_WARN(!pData->pDevObj, ("non-null dev object (0x%p) on enter", pData->pDevObj));
     pData->pDevObj = NULL;
@@ -607,6 +626,7 @@ VOID vboxUsbMonHubDevWalk(PFNVBOXUSBMONDEVWALKER pfnWalker, PVOID pvWalker, ULON
         }
     }
 #else /* VBOX_USB3PORT */
+    RT_NOREF1(fFlags);
     PWSTR szwHubList;
     Status = IoGetDeviceInterfaces(&GUID_DEVINTERFACE_USB_HUB, NULL, 0, &szwHubList);
     if (Status != STATUS_SUCCESS)
@@ -654,6 +674,7 @@ typedef struct VBOXUSBMONFINDHUBWALKER
 
 static DECLCALLBACK(BOOLEAN) vboxUsbMonFindHubDrvObjWalker(PFILE_OBJECT pFile, PDEVICE_OBJECT pTopDo, PDEVICE_OBJECT pHubDo, PVOID pvContext)
 {
+    RT_NOREF2(pFile, pTopDo);
     PVBOXUSBMONFINDHUBWALKER pData = (PVBOXUSBMONFINDHUBWALKER)pvContext;
     PDRIVER_OBJECT pDrvObj = pHubDo->DriverObject;
 
@@ -672,9 +693,7 @@ static DECLCALLBACK(BOOLEAN) vboxUsbMonFindHubDrvObjWalker(PFILE_OBJECT pFile, P
 
 static PDRIVER_OBJECT vboxUsbMonHookFindHubDrvObj()
 {
-    NTSTATUS Status = STATUS_UNSUCCESSFUL;
     UNICODE_STRING szStandardHubName;
-    PDRIVER_OBJECT pDrvObj = NULL;
     szStandardHubName.Length = 0;
     szStandardHubName.MaximumLength = 0;
     szStandardHubName.Buffer = 0;
@@ -684,13 +703,9 @@ static PDRIVER_OBJECT vboxUsbMonHookFindHubDrvObj()
     VBOXUSBMONFINDHUBWALKER Data = {0};
     vboxUsbMonHubDevWalk(vboxUsbMonFindHubDrvObjWalker, &Data, VBOXUSBMONHUBWALK_F_ALL);
     if (Data.pDrvObj)
-    {
         LOG(("returning driver object 0x%p", Data.pDrvObj));
-    }
     else
-    {
         WARN(("no hub driver object found!"));
-    }
     return Data.pDrvObj;
 }
 
@@ -769,7 +784,7 @@ static NTSTATUS vboxUsbMonHandlePnPIoctl(PDEVICE_OBJECT pDevObj, PIO_STACK_LOCAT
                     /* IRQL should be always passive here */
                     ASSERT_WARN(Iqrl == PASSIVE_LEVEL, ("irql is not PASSIVE"));
 
-                    switch (pSl->Parameters.QueryDeviceRelations.Type)
+                    switch (pSl->Parameters.QueryId.IdType)
                     {
                         case BusQueryInstanceID:
                             LOG(("BusQueryInstanceID"));
@@ -898,6 +913,10 @@ static NTSTATUS vboxUsbMonHandlePnPIoctl(PDEVICE_OBJECT pDevObj, PIO_STACK_LOCAT
                             LOG(("PDO (0x%p) is NOT filtered", pDevObj));
                         }
                         break;
+
+                        default:
+                            /** @todo r=bird: handle BusQueryContainerID and whatever else we might see  */
+                            break;
                     }
                 }
                 else
@@ -913,36 +932,36 @@ static NTSTATUS vboxUsbMonHandlePnPIoctl(PDEVICE_OBJECT pDevObj, PIO_STACK_LOCAT
         {
             switch(pSl->Parameters.QueryDeviceRelations.Type)
             {
-            case BusRelations:
-            {
-                LOG(("BusRelations"));
+                case BusRelations:
+                    LOG(("BusRelations"));
 
-                if (pIoStatus->Status == STATUS_SUCCESS)
-                {
-                    PDEVICE_RELATIONS pRel = (PDEVICE_RELATIONS)pIoStatus->Information;
-                    LOG(("pRel = %p", pRel));
-                    if (VALID_PTR(pRel))
+                    if (pIoStatus->Status == STATUS_SUCCESS)
                     {
-                        for (unsigned i=0;i<pRel->Count;i++)
+                        PDEVICE_RELATIONS pRel = (PDEVICE_RELATIONS)pIoStatus->Information;
+                        LOG(("pRel = %p", pRel));
+                        if (VALID_PTR(pRel))
                         {
-                            if (VBoxUsbFltPdoIsFiltered(pDevObj))
-                                LOG(("New PDO %p", pRel->Objects[i]));
+                            for (unsigned i=0;i<pRel->Count;i++)
+                            {
+                                if (VBoxUsbFltPdoIsFiltered(pDevObj))
+                                    LOG(("New PDO %p", pRel->Objects[i]));
+                            }
                         }
+                        else
+                            LOG(("Invalid pointer %p", pRel));
                     }
-                    else
-                        LOG(("Invalid pointer %p", pRel));
-                }
-                break;
-            }
-            case TargetDeviceRelation:
-                LOG(("TargetDeviceRelation"));
-                break;
-            case RemovalRelations:
-                LOG(("RemovalRelations"));
-                break;
-            case EjectionRelations:
-                LOG(("EjectionRelations"));
-                break;
+                    break;
+                case TargetDeviceRelation:
+                    LOG(("TargetDeviceRelation"));
+                    break;
+                case RemovalRelations:
+                    LOG(("RemovalRelations"));
+                    break;
+                case EjectionRelations:
+                    LOG(("EjectionRelations"));
+                    break;
+                default:
+                    LOG(("QueryDeviceRelations.Type=%d", pSl->Parameters.QueryDeviceRelations.Type));
             }
             break;
         }
@@ -1191,6 +1210,7 @@ static void vboxUsbMonLogError(NTSTATUS ErrCode, NTSTATUS ReturnedStatus, ULONG
 
 static DECLCALLBACK(BOOLEAN) vboxUsbMonHookDrvObjWalker(PFILE_OBJECT pFile, PDEVICE_OBJECT pTopDo, PDEVICE_OBJECT pHubDo, PVOID pvContext)
 {
+    RT_NOREF3(pFile, pTopDo, pvContext);
     PDRIVER_OBJECT pDrvObj = pHubDo->DriverObject;
 
     /* First we try to figure out if we are already hooked to this driver. */
@@ -1518,6 +1538,7 @@ static NTSTATUS _stdcall VBoxUsbMonClose(PDEVICE_OBJECT pDevObj, PIRP pIrp)
 
 static NTSTATUS _stdcall VBoxUsbMonCreate(PDEVICE_OBJECT pDevObj, PIRP pIrp)
 {
+    RT_NOREF1(pDevObj);
     PIO_STACK_LOCATION pStack = IoGetCurrentIrpStackLocation(pIrp);
     PFILE_OBJECT pFileObj = pStack->FileObject;
     NTSTATUS Status;
@@ -1593,7 +1614,8 @@ static NTSTATUS VBoxUsbMonGetDevice(PVBOXUSBMONCTX pContext, HVBOXUSBDEVUSR hDev
     return Status;
 }
 
-static NTSTATUS vboxUsbMonIoctlDispatch(PVBOXUSBMONCTX pContext, ULONG Ctl, PVOID pvBuffer, ULONG cbInBuffer, ULONG cbOutBuffer, ULONG_PTR* pInfo)
+static NTSTATUS vboxUsbMonIoctlDispatch(PVBOXUSBMONCTX pContext, ULONG Ctl, PVOID pvBuffer, ULONG cbInBuffer,
+                                        ULONG cbOutBuffer, ULONG_PTR *pInfo)
 {
     NTSTATUS Status = STATUS_SUCCESS;
     ULONG_PTR Info = 0;
@@ -1657,7 +1679,7 @@ static NTSTATUS vboxUsbMonIoctlDispatch(PVBOXUSBMONCTX pContext, ULONG Ctl, PVOI
             if (cbOutBuffer)
             {
                 /* we've validated that already */
-                Assert(cbOutBuffer == *pRc);
+                Assert(cbOutBuffer == (ULONG)*pRc);
                 *pRc = rc;
                 Info = sizeof (*pRc);
             }
@@ -1865,6 +1887,7 @@ static NTSTATUS _stdcall VBoxUsbMonInternalDeviceControl(PDEVICE_OBJECT pDevObj,
  */
 static void _stdcall VBoxUsbMonUnload(PDRIVER_OBJECT pDrvObj)
 {
+    RT_NOREF1(pDrvObj);
     LOG(("VBoxUSBMonUnload pDrvObj (0x%p)", pDrvObj));
 
     IoReleaseRemoveLockAndWait(&g_VBoxUsbMonGlobals.RmLock, &g_VBoxUsbMonGlobals);
@@ -1873,21 +1896,17 @@ static void _stdcall VBoxUsbMonUnload(PDRIVER_OBJECT pDrvObj)
 
     UNICODE_STRING DosName;
     RtlInitUnicodeString(&DosName, USBMON_DEVICE_NAME_DOS);
-    NTSTATUS rc = IoDeleteSymbolicLink(&DosName);
+    IoDeleteSymbolicLink(&DosName);
 
     IoDeleteDevice(g_VBoxUsbMonGlobals.pDevObj);
 
     /* cleanup the logger */
     PRTLOGGER pLogger = RTLogRelSetDefaultInstance(NULL);
     if (pLogger)
-    {
         RTLogDestroy(pLogger);
-    }
     pLogger = RTLogSetDefaultInstance(NULL);
     if (pLogger)
-    {
         RTLogDestroy(pLogger);
-    }
 }
 
 RT_C_DECLS_BEGIN
@@ -1903,6 +1922,7 @@ RT_C_DECLS_END
  */
 NTSTATUS _stdcall DriverEntry(PDRIVER_OBJECT pDrvObj, PUNICODE_STRING pRegPath)
 {
+    RT_NOREF1(pRegPath);
 #ifdef VBOX_USB_WITH_VERBOSE_LOGGING
     RTLogGroupSettings(0, "+default.e.l.f.l2.l3");
     RTLogDestinations(0, "debugger");
diff --git a/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbMon.h b/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbMon.h
index b88df2d..b218bde 100644
--- a/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbMon.h
+++ b/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbMon.h
@@ -3,7 +3,7 @@
  * VBox USB Monitor
  */
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbMon.rc b/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbMon.rc
index 1e41b64..13bb166 100644
--- a/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbMon.rc
+++ b/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbMon.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/VBoxUSB/win/testcase/USBTest.cpp b/src/VBox/HostDrivers/VBoxUSB/win/testcase/USBTest.cpp
index 2324131..0d5b81d 100644
--- a/src/VBox/HostDrivers/VBoxUSB/win/testcase/USBTest.cpp
+++ b/src/VBox/HostDrivers/VBoxUSB/win/testcase/USBTest.cpp
@@ -4,7 +4,7 @@
  *
  * Installation code
  *
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -19,8 +19,8 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
-#include <windows.h>
-#include <setupapi.h>
+#include <iprt/win/windows.h>
+#include <iprt/win/setupapi.h>
 #include <newdev.h>
 #include <iprt/assert.h>
 #include <iprt/err.h>
@@ -252,8 +252,11 @@ int usbMonitorInit()
         goto failure;
     }
 
-    if (version.u32Major != USBMON_MAJOR_VERSION ||
-        version.u32Minor <  USBMON_MINOR_VERSION)
+    if (   version.u32Major != USBMON_MAJOR_VERSION
+#if USBMON_MINOR_VERSION != 0
+        || version.u32Minor < USBMON_MINOR_VERSION
+#endif
+        )
     {
         printf("usbproxy: Filter driver version mismatch!!\n");
         rc = VERR_VERSION_MISMATCH;
@@ -304,6 +307,7 @@ int usbMonitorTerm()
 int __cdecl main(int argc, char **argv)
 {
     int rc;
+    RT_NOREF2(argc, argv);
 
     printf("USB test\n");
 
diff --git a/src/VBox/HostDrivers/VBoxUSB/win/usbd/usbd.def b/src/VBox/HostDrivers/VBoxUSB/win/usbd/usbd.def
index f4ce1b1..8771ea9 100644
--- a/src/VBox/HostDrivers/VBoxUSB/win/usbd/usbd.def
+++ b/src/VBox/HostDrivers/VBoxUSB/win/usbd/usbd.def
@@ -1,7 +1,7 @@
 ;
 ; Export definitions
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/adpctl/Makefile.kmk b/src/VBox/HostDrivers/adpctl/Makefile.kmk
new file mode 100644
index 0000000..606d5a2
--- /dev/null
+++ b/src/VBox/HostDrivers/adpctl/Makefile.kmk
@@ -0,0 +1,29 @@
+# $Id: Makefile.kmk $
+## @file
+# Sub-Makefile for VBoxAdpCtl
+#
+# VBoxAdpCtl is a tool for configuring vboxnetX adapters.
+#
+
+#
+# Copyright (C) 2009-2016 Oracle Corporation
+#
+# This file is part of VirtualBox Open Source Edition (OSE), as
+# available from http://www.virtualbox.org. This file is free software;
+# you can redistribute it and/or modify it under the terms of the GNU
+# General Public License (GPL) as published by the Free Software
+# Foundation, in version 2 as it comes in the "COPYING" file of the
+# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+#
+
+SUB_DEPTH = ../../../..
+include $(KBUILD_PATH)/subheader.kmk
+
+PROGRAMS              += VBoxNetAdpCtl
+### Another template? We must *not* set RPATH!
+VBoxNetAdpCtl_TEMPLATE = VBOXR3HARDENEDEXE
+VBoxNetAdpCtl_SOURCES  = VBoxNetAdpCtl.cpp
+
+include $(FILE_KBUILD_SUB_FOOTER)
+
diff --git a/src/VBox/HostDrivers/adpctl/VBoxNetAdpCtl.cpp b/src/VBox/HostDrivers/adpctl/VBoxNetAdpCtl.cpp
new file mode 100644
index 0000000..9858f63
--- /dev/null
+++ b/src/VBox/HostDrivers/adpctl/VBoxNetAdpCtl.cpp
@@ -0,0 +1,487 @@
+/* $Id: VBoxNetAdpCtl.cpp $ */
+/** @file
+ * Apps - VBoxAdpCtl, Configuration tool for vboxnetX adapters.
+ */
+
+/*
+ * Copyright (C) 2009-2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/wait.h>
+#include <sys/ioctl.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#ifdef RT_OS_LINUX
+# include <net/if.h>
+# include <linux/types.h>
+/* Older versions of ethtool.h rely on these: */
+typedef unsigned long long u64;
+typedef __uint32_t u32;
+typedef __uint16_t u16;
+typedef __uint8_t u8;
+# include <limits.h> /* for INT_MAX */
+# include <linux/ethtool.h>
+# include <linux/sockios.h>
+#endif
+#ifdef RT_OS_SOLARIS
+# include <sys/ioccom.h>
+#endif
+
+/** @todo Error codes must be moved to some header file */
+#define ADPCTLERR_BAD_NAME         2
+#define ADPCTLERR_NO_CTL_DEV       3
+#define ADPCTLERR_IOCTL_FAILED     4
+#define ADPCTLERR_SOCKET_FAILED    5
+
+/** @todo These are duplicates from src/VBox/HostDrivers/VBoxNetAdp/VBoxNetAdpInternal.h */
+#define VBOXNETADP_CTL_DEV_NAME    "/dev/vboxnetctl"
+#define VBOXNETADP_MAX_INSTANCES   128
+#define VBOXNETADP_NAME            "vboxnet"
+#define VBOXNETADP_MAX_NAME_LEN    32
+#define VBOXNETADP_CTL_ADD   _IOWR('v', 1, VBOXNETADPREQ)
+#define VBOXNETADP_CTL_REMOVE _IOW('v', 2, VBOXNETADPREQ)
+typedef struct VBoxNetAdpReq
+{
+    char szName[VBOXNETADP_MAX_NAME_LEN];
+} VBOXNETADPREQ;
+typedef VBOXNETADPREQ *PVBOXNETADPREQ;
+
+#define VBOXADPCTL_IFCONFIG_PATH1 "/sbin/ifconfig"
+#define VBOXADPCTL_IFCONFIG_PATH2 "/bin/ifconfig"
+static char *g_pszIfConfig;
+
+#if defined(RT_OS_LINUX)
+# define VBOXADPCTL_DEL_CMD "del"
+# define VBOXADPCTL_ADD_CMD "add"
+#elif defined(RT_OS_SOLARIS)
+# define VBOXADPCTL_DEL_CMD "removeif"
+# define VBOXADPCTL_ADD_CMD "addif"
+#else
+# define VBOXADPCTL_DEL_CMD "delete"
+# define VBOXADPCTL_ADD_CMD "add"
+#endif
+
+static void showUsage(void)
+{
+    fprintf(stderr, "Usage: VBoxNetAdpCtl <adapter> <address> ([netmask <address>] | remove)\n");
+    fprintf(stderr, "     | VBoxNetAdpCtl [<adapter>] add\n");
+    fprintf(stderr, "     | VBoxNetAdpCtl <adapter> remove\n");
+}
+
+static void setPathIfConfig(void)
+{
+    struct stat s;
+    if (   !stat(VBOXADPCTL_IFCONFIG_PATH1, &s)
+        && S_ISREG(s.st_mode))
+        g_pszIfConfig = (char*)VBOXADPCTL_IFCONFIG_PATH1;
+    else
+        g_pszIfConfig = (char*)VBOXADPCTL_IFCONFIG_PATH2;
+}
+
+static int executeIfconfig(const char *pcszAdapterName, const char *pcszArg1,
+                           const char *pcszArg2 = NULL,
+                           const char *pcszArg3 = NULL,
+                           const char *pcszArg4 = NULL,
+                           const char *pcszArg5 = NULL)
+{
+    const char * const argv[] =
+    {
+        g_pszIfConfig,
+        pcszAdapterName,
+        pcszArg1, /* [address family] */
+        pcszArg2, /* address */
+        pcszArg3, /* ['netmask'] */
+        pcszArg4, /* [network mask] */
+        pcszArg5, /* [network mask] */
+        NULL  /* terminator */
+    };
+    char * const envp[] = { (char*)"LC_ALL=C", NULL };
+    int rc = EXIT_SUCCESS;
+    pid_t childPid = fork();
+    switch (childPid)
+    {
+        case -1: /* Something went wrong. */
+            perror("fork() failed");
+            rc = EXIT_FAILURE;
+            break;
+        case 0: /* Child process. */
+            if (execve(argv[0], (char * const*)argv, envp) == -1)
+                rc = EXIT_FAILURE;
+            break;
+        default: /* Parent process. */
+            waitpid(childPid, &rc, 0);
+            break;
+    }
+
+    return rc;
+}
+
+#define MAX_ADDRESSES 128
+#define MAX_ADDRLEN   64
+
+static bool removeAddresses(char *pszAdapterName)
+{
+    char szBuf[1024];
+    char aszAddresses[MAX_ADDRESSES][MAX_ADDRLEN];
+    int rc;
+    int fds[2];
+    char * const argv[] = { g_pszIfConfig, pszAdapterName, NULL };
+    char * const envp[] = { (char*)"LC_ALL=C", NULL };
+
+    memset(aszAddresses, 0, sizeof(aszAddresses));
+
+    rc = pipe(fds);
+    if (rc < 0)
+        return false;
+
+    pid_t pid = fork();
+    if (pid < 0)
+        return false;
+
+    if (pid == 0)
+    {
+        /* child */
+        close(fds[0]);
+        close(STDOUT_FILENO);
+        rc = dup2(fds[1], STDOUT_FILENO);
+        if (rc >= 0)
+            execve(argv[0], argv, envp);
+        return false;
+    }
+
+    /* parent */
+    close(fds[1]);
+    FILE *fp = fdopen(fds[0], "r");
+    if (!fp)
+        return false;
+
+    int cAddrs;
+    for (cAddrs = 0; cAddrs < MAX_ADDRESSES && fgets(szBuf, sizeof(szBuf), fp);)
+    {
+        int cbSkipWS = strspn(szBuf, " \t");
+        char *pszWord = strtok(szBuf + cbSkipWS, " ");
+        /* We are concerned with IPv6 address lines only. */
+        if (!pszWord || strcmp(pszWord, "inet6"))
+            continue;
+#ifdef RT_OS_LINUX
+        pszWord = strtok(NULL, " ");
+        /* Skip "addr:". */
+        if (!pszWord || strcmp(pszWord, "addr:"))
+            continue;
+#endif
+        pszWord = strtok(NULL, " ");
+        /* Skip link-local addresses. */
+        if (!pszWord || !strncmp(pszWord, "fe80", 4))
+            continue;
+        strncpy(aszAddresses[cAddrs++], pszWord, MAX_ADDRLEN-1);
+    }
+    fclose(fp);
+
+    for (int i = 0; i < cAddrs; i++)
+    {
+        if (executeIfconfig(pszAdapterName, "inet6",
+                            VBOXADPCTL_DEL_CMD, aszAddresses[i]) != EXIT_SUCCESS)
+            return false;
+    }
+
+    return true;
+}
+
+
+#ifndef RT_OS_SOLARIS
+static int doIOCtl(unsigned long iCmd, VBOXNETADPREQ *pReq)
+{
+    int fd = open(VBOXNETADP_CTL_DEV_NAME, O_RDWR);
+    if (fd == -1)
+    {
+        fprintf(stderr, "VBoxNetAdpCtl: Error while %s %s: ",
+                iCmd == VBOXNETADP_CTL_REMOVE ? "removing" : "adding",
+                pReq->szName[0] ? pReq->szName : "new interface");
+        perror("failed to open " VBOXNETADP_CTL_DEV_NAME);
+        return ADPCTLERR_NO_CTL_DEV;
+    }
+
+    int rc = ioctl(fd, iCmd, pReq);
+    if (rc == -1)
+    {
+        fprintf(stderr, "VBoxNetAdpCtl: Error while %s %s: ",
+                iCmd == VBOXNETADP_CTL_REMOVE ? "removing" : "adding",
+                pReq->szName[0] ? pReq->szName : "new interface");
+        perror("VBoxNetAdpCtl: ioctl failed for " VBOXNETADP_CTL_DEV_NAME);
+        rc = ADPCTLERR_IOCTL_FAILED;
+    }
+
+    close(fd);
+
+    return rc;
+}
+#endif /* !RT_OS_SOLARIS */
+
+
+static int checkAdapterName(const char *pcszNameIn, char *pszNameOut)
+{
+    int iAdapterIndex = -1;
+
+    if (   strlen(pcszNameIn) >= VBOXNETADP_MAX_NAME_LEN
+        || sscanf(pcszNameIn, "vboxnet%d", &iAdapterIndex) != 1
+        || iAdapterIndex < 0 || iAdapterIndex >= VBOXNETADP_MAX_INSTANCES )
+    {
+        fprintf(stderr, "VBoxNetAdpCtl: Setting configuration for '%s' is not supported.\n", pcszNameIn);
+        return ADPCTLERR_BAD_NAME;
+    }
+    sprintf(pszNameOut, "vboxnet%d", iAdapterIndex);
+    if (strcmp(pszNameOut, pcszNameIn))
+    {
+        fprintf(stderr, "VBoxNetAdpCtl: Invalid adapter name '%s'.\n", pcszNameIn);
+        return ADPCTLERR_BAD_NAME;
+    }
+
+    return 0;
+}
+
+int main(int argc, char *argv[])
+{
+    char szAdapterName[VBOXNETADP_MAX_NAME_LEN];
+    char *pszAdapterName = NULL;
+    const char *pszAddress = NULL;
+    const char *pszNetworkMask = NULL;
+    const char *pszOption = NULL;
+    int rc = EXIT_SUCCESS;
+    bool fRemove = false;
+    VBOXNETADPREQ Req;
+
+    setPathIfConfig();
+
+    switch (argc)
+    {
+        case 5:
+        {
+            /* Add a netmask to existing interface */
+            if (strcmp("netmask", argv[3]))
+            {
+                fprintf(stderr, "Invalid argument: %s\n\n", argv[3]);
+                showUsage();
+                return 1;
+            }
+            pszOption = "netmask";
+            pszNetworkMask = argv[4];
+            pszAdapterName = argv[1];
+            pszAddress = argv[2];
+            break;
+        }
+
+        case 4:
+        {
+            /* Remove a single address from existing interface */
+            if (strcmp("remove", argv[3]))
+            {
+                fprintf(stderr, "Invalid argument: %s\n\n", argv[3]);
+                showUsage();
+                return 1;
+            }
+            fRemove = true;
+            pszAdapterName = argv[1];
+            pszAddress = argv[2];
+            break;
+        }
+
+        case 3:
+        {
+            pszAdapterName = argv[1];
+            memset(&Req, '\0', sizeof(Req));
+#ifdef RT_OS_LINUX
+            if (strcmp("speed", argv[2]) == 0)
+            {
+                /*
+                 * This ugly hack is needed for retrieving the link speed on
+                 * pre-2.6.33 kernels (see @bugref{6345}).
+                 */
+                if (strlen(pszAdapterName) >= IFNAMSIZ)
+                {
+                    showUsage();
+                    return -1;
+                }
+                struct ifreq IfReq;
+                struct ethtool_value EthToolVal;
+                struct ethtool_cmd EthToolReq;
+                int fd = socket(AF_INET, SOCK_DGRAM, 0);
+                if (fd < 0)
+                {
+                    fprintf(stderr, "VBoxNetAdpCtl: Error while retrieving link "
+                            "speed for %s: ", pszAdapterName);
+                    perror("VBoxNetAdpCtl: failed to open control socket");
+                    return ADPCTLERR_SOCKET_FAILED;
+                }
+                /* Get link status first. */
+                memset(&EthToolVal, 0, sizeof(EthToolVal));
+                memset(&IfReq, 0, sizeof(IfReq));
+                snprintf(IfReq.ifr_name, sizeof(IfReq.ifr_name), "%s", pszAdapterName);
+
+                EthToolVal.cmd = ETHTOOL_GLINK;
+                IfReq.ifr_data = (caddr_t)&EthToolVal;
+                rc = ioctl(fd, SIOCETHTOOL, &IfReq);
+                if (rc == 0)
+                {
+                    if (EthToolVal.data)
+                    {
+                        memset(&IfReq, 0, sizeof(IfReq));
+                        snprintf(IfReq.ifr_name, sizeof(IfReq.ifr_name), "%s", pszAdapterName);
+                        EthToolReq.cmd = ETHTOOL_GSET;
+                        IfReq.ifr_data = (caddr_t)&EthToolReq;
+                        rc = ioctl(fd, SIOCETHTOOL, &IfReq);
+                        if (rc == 0)
+                        {
+                            printf("%u", EthToolReq.speed);
+                        }
+                        else
+                        {
+                            fprintf(stderr, "VBoxNetAdpCtl: Error while retrieving link "
+                                    "speed for %s: ", pszAdapterName);
+                            perror("VBoxNetAdpCtl: ioctl failed");
+                            rc = ADPCTLERR_IOCTL_FAILED;
+                        }
+                    }
+                    else
+                        printf("0");
+                }
+                else
+                {
+                    fprintf(stderr, "VBoxNetAdpCtl: Error while retrieving link "
+                            "status for %s: ", pszAdapterName);
+                    perror("VBoxNetAdpCtl: ioctl failed");
+                    rc = ADPCTLERR_IOCTL_FAILED;
+                }
+
+                close(fd);
+                return rc;
+            }
+#endif
+            rc = checkAdapterName(pszAdapterName, szAdapterName);
+            if (rc)
+                return rc;
+            snprintf(Req.szName, sizeof(Req.szName), "%s", szAdapterName);
+            pszAddress = argv[2];
+            if (strcmp("remove", pszAddress) == 0)
+            {
+                /* Remove an existing interface */
+#ifdef RT_OS_SOLARIS
+                return 1;
+#else
+                return doIOCtl(VBOXNETADP_CTL_REMOVE, &Req);
+#endif
+            }
+            else if (strcmp("add", pszAddress) == 0)
+            {
+                /* Create an interface with given name */
+#ifdef RT_OS_SOLARIS
+                return 1;
+#else
+                rc = doIOCtl(VBOXNETADP_CTL_ADD, &Req);
+                if (rc == 0)
+                    puts(Req.szName);
+#endif
+                return rc;
+            }
+            break;
+        }
+
+        case 2:
+        {
+            /* Create a new interface */
+            if (strcmp("add", argv[1]) == 0)
+            {
+#ifdef RT_OS_SOLARIS
+                return 1;
+#else
+                memset(&Req, '\0', sizeof(Req));
+                rc = doIOCtl(VBOXNETADP_CTL_ADD, &Req);
+                if (rc == 0)
+                    puts(Req.szName);
+#endif
+                return rc;
+            }
+            /* Fall through */
+        }
+
+        default:
+            fprintf(stderr, "Invalid number of arguments.\n\n");
+            /* Fall through */
+        case 1:
+            showUsage();
+            return 1;
+    }
+
+    rc = checkAdapterName(pszAdapterName, szAdapterName);
+    if (rc)
+        return rc;
+
+    pszAdapterName = szAdapterName;
+
+    if (fRemove)
+    {
+        if (strchr(pszAddress, ':'))
+            rc = executeIfconfig(pszAdapterName, "inet6", VBOXADPCTL_DEL_CMD, pszAddress);
+        else
+        {
+#if defined(RT_OS_LINUX)
+            rc = executeIfconfig(pszAdapterName, "0.0.0.0");
+#else
+            rc = executeIfconfig(pszAdapterName, VBOXADPCTL_DEL_CMD, pszAddress);
+#endif
+
+#ifdef RT_OS_SOLARIS
+            /* On Solaris we can unplumb the ipv4 interface */
+            executeIfconfig(pszAdapterName, "inet", "unplumb");
+#endif
+        }
+    }
+    else
+    {
+        /* We are setting/replacing address. */
+        if (strchr(pszAddress, ':'))
+        {
+#ifdef RT_OS_SOLARIS
+            /* On Solaris we need to plumb the interface first if it's not already plumbed. */
+            if (executeIfconfig(pszAdapterName, "inet6") != 0)
+                executeIfconfig(pszAdapterName, "inet6", "plumb", "up");
+#endif
+            /*
+             * Before we set IPv6 address we'd like to remove
+             * all previously assigned addresses except the
+             * self-assigned one.
+             */
+            if (!removeAddresses(pszAdapterName))
+                rc = EXIT_FAILURE;
+            else
+                rc = executeIfconfig(pszAdapterName, "inet6", VBOXADPCTL_ADD_CMD, pszAddress, pszOption, pszNetworkMask);
+        }
+        else
+        {
+#ifdef RT_OS_SOLARIS
+            /* On Solaris we need to plumb the interface first if it's not already plumbed. */
+            if (executeIfconfig(pszAdapterName, "inet") != 0)
+                executeIfconfig(pszAdapterName, "plumb", "up");
+#endif
+            rc = executeIfconfig(pszAdapterName, pszAddress, pszOption, pszNetworkMask);
+        }
+    }
+    return rc;
+}
+
diff --git a/src/VBox/HostDrivers/darwin/Makefile.kmk b/src/VBox/HostDrivers/darwin/Makefile.kmk
index 0b3a7e2..dfe2262 100644
--- a/src/VBox/HostDrivers/darwin/Makefile.kmk
+++ b/src/VBox/HostDrivers/darwin/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2010-2015 Oracle Corporation
+# Copyright (C) 2010-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/darwin/VBoxNetSend.h b/src/VBox/HostDrivers/darwin/VBoxNetSend.h
index cc59014..fdbeb94 100644
--- a/src/VBox/HostDrivers/darwin/VBoxNetSend.h
+++ b/src/VBox/HostDrivers/darwin/VBoxNetSend.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -75,7 +75,7 @@ DECLINLINE(int) VBoxNetSendDummy(ifnet_t pIfNet)
 
         mbuf_pkthdr_setrcvif(pPkt, pIfNet); /* will crash without this. */
 
-        errno_t err = ifnet_input(pIfNet, pPkt, NULL);
+        err = ifnet_input(pIfNet, pPkt, NULL);
         if (err)
         {
             rc = RTErrConvertFromErrno(err);
diff --git a/src/VBox/HostDrivers/freebsd/Makefile.kmk b/src/VBox/HostDrivers/freebsd/Makefile.kmk
index 5bd1178..bfd631a 100644
--- a/src/VBox/HostDrivers/freebsd/Makefile.kmk
+++ b/src/VBox/HostDrivers/freebsd/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/linux/Makefile.kmk b/src/VBox/HostDrivers/linux/Makefile.kmk
index d6c8754..5839e80 100644
--- a/src/VBox/HostDrivers/linux/Makefile.kmk
+++ b/src/VBox/HostDrivers/linux/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/linux/loadall.sh b/src/VBox/HostDrivers/linux/loadall.sh
index a8dd9fd..9a9c907 100755
--- a/src/VBox/HostDrivers/linux/loadall.sh
+++ b/src/VBox/HostDrivers/linux/loadall.sh
@@ -22,7 +22,7 @@ MY_GROUPNAME="vboxusers"
 #
 # vboxusers membership check.
 #
-if ! (id -Gn | grep -w ${MY_GROUPNAME}); then 
+if ! (id -Gn | grep -w ${MY_GROUPNAME}); then
     echo "loadall.sh: you're not a member of vboxusers...";
     # Create the group.
     if ! getent group ${MY_GROUPNAME}; then
diff --git a/src/VBox/HostDrivers/win/Makefile.kmk b/src/VBox/HostDrivers/win/Makefile.kmk
index 840db4f..5a1f535 100644
--- a/src/VBox/HostDrivers/win/Makefile.kmk
+++ b/src/VBox/HostDrivers/win/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2011-2015 Oracle Corporation
+# Copyright (C) 2011-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/win/VBoxDbgLog.h b/src/VBox/HostDrivers/win/VBoxDbgLog.h
index 80a3195..f59d34a 100644
--- a/src/VBox/HostDrivers/win/VBoxDbgLog.h
+++ b/src/VBox/HostDrivers/win/VBoxDbgLog.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -15,8 +15,8 @@
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
 
-#ifndef ___VBoxDbgLog_h__
-#define ___VBoxDbgLog_h__
+#ifndef ___VBoxDbgLog_h___
+#define ___VBoxDbgLog_h___
 
 #ifndef VBOX_DBG_LOG_NAME
 # error VBOX_DBG_LOG_NAME should be defined!
@@ -124,4 +124,5 @@
     } while (0)
 
 
-#endif /*___VBoxDbgLog_h__*/
+#endif
+
diff --git a/src/VBox/HostDrivers/win/cfg/VBoxDrvCfg.cpp b/src/VBox/HostDrivers/win/cfg/VBoxDrvCfg.cpp
index 499be4c..216b597 100644
--- a/src/VBox/HostDrivers/win/cfg/VBoxDrvCfg.cpp
+++ b/src/VBox/HostDrivers/win/cfg/VBoxDrvCfg.cpp
@@ -2,8 +2,9 @@
 /** @file
  * VBoxDrvCfg.cpp - Windows Driver Manipulation API implementation
  */
+
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -13,10 +14,15 @@
  * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
 #include <VBox/VBoxDrvCfg-win.h>
 
-#include <setupapi.h>
-#include <shlobj.h>
+#include <iprt/win/setupapi.h>
+#include <iprt/win/shlobj.h>
 
 #include <string.h>
 
@@ -26,6 +32,10 @@
 
 #include <Newdev.h>
 
+
+/*********************************************************************************************************************************
+*   Global Variables                                                                                                             *
+*********************************************************************************************************************************/
 static PFNVBOXDRVCFG_LOG g_pfnVBoxDrvCfgLog;
 static void *g_pvVBoxDrvCfgLog;
 
@@ -351,7 +361,6 @@ static HRESULT vboxDrvCfgInfQueryFirstPnPId(HINF hInf, LPWSTR *lppszPnPId)
     *lppszPnPId = NULL;
 
     LPWSTR lpszModels;
-    LPWSTR lpszPnPId;
     HRESULT hr = vboxDrvCfgInfQueryModelsSectionName(hInf, &lpszModels, NULL);
     NonStandardLogRelCrap((__FUNCTION__ ": vboxDrvCfgInfQueryModelsSectionName returned lpszModels = (%S)", lpszModels));
     if (hr != S_OK)
@@ -360,6 +369,7 @@ static HRESULT vboxDrvCfgInfQueryFirstPnPId(HINF hInf, LPWSTR *lppszPnPId)
         return hr;
     }
 
+    LPWSTR lpszPnPId = NULL;
     INFCONTEXT InfCtx;
     hr = vboxDrvCfgInfQueryContext(hInf, lpszModels, NULL, &InfCtx);
     if (hr != S_OK)
@@ -443,7 +453,6 @@ VBOXDRVCFG_DECL(HRESULT) VBoxDrvCfgInfUninstall(IN LPCWSTR lpszInfPath, DWORD fF
 static HRESULT vboxDrvCfgCollectInfsSetupDi(const GUID * pGuid, LPCWSTR pPnPId, VBoxDrvCfgStringList & list)
 {
     DWORD dwErr = ERROR_SUCCESS;
-    int counter = 0;
     HDEVINFO hDevInfo = SetupDiCreateDeviceInfoList(
                             pGuid, /* IN LPGUID ClassGuid, OPTIONAL */
                             NULL /*IN HWND hwndParent OPTIONAL */
diff --git a/src/VBox/HostServices/DragAndDrop/VBoxDragAndDropSvc.rc b/src/VBox/HostServices/DragAndDrop/VBoxDragAndDropSvc.rc
index bb245fd..11a8a1f 100644
--- a/src/VBox/HostServices/DragAndDrop/VBoxDragAndDropSvc.rc
+++ b/src/VBox/HostServices/DragAndDrop/VBoxDragAndDropSvc.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/DragAndDrop/dndmanager.h b/src/VBox/HostServices/DragAndDrop/dndmanager.h
index f665280..e5bd557 100644
--- a/src/VBox/HostServices/DragAndDrop/dndmanager.h
+++ b/src/VBox/HostServices/DragAndDrop/dndmanager.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/DragAndDrop/service.cpp b/src/VBox/HostServices/DragAndDrop/service.cpp
index c15351b..01ba8fe 100644
--- a/src/VBox/HostServices/DragAndDrop/service.cpp
+++ b/src/VBox/HostServices/DragAndDrop/service.cpp
@@ -41,6 +41,7 @@
 
 using namespace DragAndDropSvc;
 
+
 /*********************************************************************************************************************************
 *   Service class declaration                                                                                                    *
 *********************************************************************************************************************************/
@@ -211,6 +212,7 @@ void DragAndDropClient::setDeferred(VBOXHGCMCALLHANDLE hHandle, uint32_t u32Func
     m_paParms = paParms;
 }
 
+
 /*********************************************************************************************************************************
 *   Service class implementation                                                                                                 *
 *********************************************************************************************************************************/
@@ -265,6 +267,7 @@ int DragAndDropService::uninit(void)
 
 int DragAndDropService::clientConnect(uint32_t u32ClientID, void *pvClient)
 {
+    RT_NOREF1(pvClient);
     if (m_clientMap.size() >= UINT8_MAX) /* Don't allow too much clients at the same time. */
     {
         AssertMsgFailed(("Maximum number of clients reached\n"));
@@ -309,6 +312,8 @@ int DragAndDropService::clientConnect(uint32_t u32ClientID, void *pvClient)
 
 int DragAndDropService::clientDisconnect(uint32_t u32ClientID, void *pvClient)
 {
+    RT_NOREF1(pvClient);
+
     /* Client not found? Bail out early. */
     DnDClientMap::iterator itClient =  m_clientMap.find(u32ClientID);
     if (itClient == m_clientMap.end())
@@ -363,6 +368,7 @@ void DragAndDropService::guestCall(VBOXHGCMCALLHANDLE callHandle, uint32_t u32Cl
                                    void *pvClient, uint32_t u32Function,
                                    uint32_t cParms, VBOXHGCMSVCPARM paParms[])
 {
+    RT_NOREF1(pvClient);
     LogFlowFunc(("u32ClientID=%RU32, u32Function=%RU32, cParms=%RU32\n",
                  u32ClientID, u32Function, cParms));
 
@@ -1132,6 +1138,7 @@ int DragAndDropService::hostCall(uint32_t u32Function,
                 m_pManager->clear();
 
                 fSendToGuest = true;
+                rc = VINF_SUCCESS;
                 break;
             }
 
@@ -1174,6 +1181,7 @@ int DragAndDropService::hostCall(uint32_t u32Function,
             default:
             {
                 fSendToGuest = true;
+                rc = VINF_SUCCESS;
                 break;
             }
         }
diff --git a/src/VBox/HostServices/GuestControl/Makefile.kmk b/src/VBox/HostServices/GuestControl/Makefile.kmk
index be29550..a61b3b3 100644
--- a/src/VBox/HostServices/GuestControl/Makefile.kmk
+++ b/src/VBox/HostServices/GuestControl/Makefile.kmk
@@ -33,7 +33,6 @@ VBoxGuestControlSvc_INCS.win  = \
 	$(VBOX_PATH_SDK)
 
 VBoxGuestControlSvc_SOURCES = \
-	gctrl.cpp \
 	service.cpp
 
 VBoxGuestControlSvc_SOURCES.win = \
diff --git a/src/VBox/HostServices/GuestControl/VBoxGuestControlSvc.rc b/src/VBox/HostServices/GuestControl/VBoxGuestControlSvc.rc
index 773d88e..66bcef6 100644
--- a/src/VBox/HostServices/GuestControl/VBoxGuestControlSvc.rc
+++ b/src/VBox/HostServices/GuestControl/VBoxGuestControlSvc.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/GuestControl/gctrl.cpp b/src/VBox/HostServices/GuestControl/gctrl.cpp
deleted file mode 100644
index 6875bf3..0000000
--- a/src/VBox/HostServices/GuestControl/gctrl.cpp
+++ /dev/null
@@ -1,230 +0,0 @@
-/* $Id: gctrl.cpp $ */
-/** @file
- * Guest Control Service: Internal function used by service, Main and testcase.
- */
-
-/*
- * Copyright (C) 2010-2011 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-
-/*********************************************************************************************************************************
-*   Header Files                                                                                                                 *
-*********************************************************************************************************************************/
-#define LOG_GROUP LOG_GROUP_HGCM
-#include <VBox/HostServices/GuestControlSvc.h>
-
-/** @todo Remove unused header files below! */
-#include <iprt/alloca.h>
-#include <iprt/initterm.h>
-#include <iprt/crc.h>
-#include <iprt/ctype.h>
-#include <iprt/env.h>
-#include <iprt/file.h>
-#include <iprt/getopt.h>
-#include <iprt/handle.h>
-#include <iprt/mem.h>
-#include <iprt/message.h>
-#include <iprt/param.h>
-#include <iprt/path.h>
-#include <iprt/pipe.h>
-#include <iprt/poll.h>
-#include <iprt/process.h>
-#include <iprt/stream.h>
-#include <iprt/thread.h>
-
-#include "gctrl.h"
-
-namespace guestControl {
-
-/**
- * Creates the argument list as an array used for executing a program.
- *
- * @returns VBox status code.
- *
- * @todo
- *
- * @todo Respect spaces when quoting for arguments, e.g. "c:\\program files\\".
- * @todo Handle empty ("") arguments.
- */
-int gctrlPrepareExecArgv(char *pszArgs, void **ppvList, uint32_t *pcbList, uint32_t *pcArgs)
-{
-    char **ppaArg;
-    int iArgs;
-    int rc = RTGetOptArgvFromString(&ppaArg, &iArgs, pszArgs, RTGETOPTARGV_CNV_QUOTE_BOURNE_SH, NULL);
-    if (RT_SUCCESS(rc))
-    {
-        char *pszTemp = NULL;
-        *pcbList = 0;
-        for (int i=0; i<iArgs; i++)
-        {
-            if (i > 0) /* Insert space as delimiter. */
-                rc = RTStrAAppendN(&pszTemp, " ", 1);
-
-            if (RT_FAILURE(rc))
-                break;
-            else
-            {
-                rc = RTStrAAppendN(&pszTemp, ppaArg[i], strlen(ppaArg[i]));
-                if (RT_FAILURE(rc))
-                    break;
-            }
-        }
-        RTGetOptArgvFree(ppaArg);
-        if (RT_SUCCESS(rc))
-        {
-            *ppvList = pszTemp;
-            *pcArgs = iArgs;
-            *pcbList = strlen(pszTemp) + 1; /* Include zero termination. */
-        }
-        else
-            RTStrFree(pszTemp);
-    }
-    return rc;
-}
-
-
-/**
- * Appends environment variables to the environment block. Each var=value pair is separated
- * by NULL (\0) sequence. The whole block will be stored in one blob and disassembled on the
- * guest side later to fit into the HGCM param structure.
- *
- * @returns VBox status code.
- *
- * @todo
- *
- */
-int gctrlAddToExecEnvv(const char *pszEnv, void **ppvList, uint32_t *pcbList, uint32_t *pcEnv)
-{
-    int rc = VINF_SUCCESS;
-    uint32_t cbLen = strlen(pszEnv);
-    if (*ppvList)
-    {
-        uint32_t cbNewLen = *pcbList + cbLen + 1; /* Include zero termination. */
-        char *pvTmp = (char*)RTMemRealloc(*ppvList, cbNewLen);
-        if (NULL == pvTmp)
-        {
-            rc = VERR_NO_MEMORY;
-        }
-        else
-        {
-            memcpy(pvTmp + *pcbList, pszEnv, cbLen);
-            pvTmp[cbNewLen - 1] = '\0'; /* Add zero termination. */
-            *ppvList = (void**)pvTmp;
-        }
-    }
-    else
-    {
-        char *pcTmp;
-        if (RTStrAPrintf(&pcTmp, "%s", pszEnv) > 0)
-        {
-            *ppvList = (void**)pcTmp;
-            /* Reset counters. */
-            *pcEnv = 0;
-            *pcbList = 0;
-        }
-    }
-    if (RT_SUCCESS(rc))
-    {
-        *pcbList += cbLen + 1; /* Include zero termination. */
-        *pcEnv += 1;           /* Increase env pairs count. */
-    }
-    return rc;
-}
-
-/*
-int gctrlAllocateExecBlock(PVBOXGUESTCTRLEXECBLOCK *ppBlock,
-                           const char *pszCmd, uint32_t fFlags,
-                           uint32_t cArgs,    const char * const *papszArgs,
-                           uint32_t cEnvVars, const char * const *papszEnv,
-                           const char *pszStdIn, const char *pszStdOut, const char *pszStdErr,
-                           const char *pszUsername, const char *pszPassword, RTMSINTERVAL cMillies)
-{
-    PVBOXGUESTCTRLEXECBLOCK pNewBlock = (VBOXGUESTCTRLEXECBLOCK*)RTMemAlloc(sizeof(VBOXGUESTCTRLEXECBLOCK));
-    int rc;
-    if (pNewBlock)
-    {
-
-
-        *ppBlock = pNewBlock;
-        rc = VINF_SUCCESS;
-    }
-    else
-        rc = VERR_NO_MEMORY;
-    return rc;
-}
-
-
-int gctrlFreeExecBlock(PVBOXGUESTCTRLEXECBLOCK pBlock)
-{
-    AssertPtr(pBlock);
-
-    RTStrFree(pBlock->pszCmd);
-    RTMemFree(pBlock->pvArgs);
-    RTMemFree(pBlock->pvEnv);
-    RTStrFree(pBlock->pszStdIn);
-    RTStrFree(pBlock->pszStdOut);
-    RTStrFree(pBlock->pszStdErr);
-    RTStrFree(pBlock->pszUsername);
-    RTStrFree(pBlock->pszPassword);
-
-    RT_ZERO(*pBlock);
-    return VINF_SUCCESS;
-}
-
-
-int gctrlPrepareHostCmdExec(PVBOXHGCMSVCPARM *ppaParms, uint32_t *pcParms,
-                            PVBOXGUESTCTRLEXECBLOCK pBlock)
-{
-    AssertPtr(ppaParms);
-    AssertPtr(pBlock);
-
-    PVBOXHGCMSVCPARM pNewParms =
-        (VBOXHGCMSVCPARM*)RTMemAlloc(sizeof(VBOXHGCMSVCPARM) * 13);
-
-    int rc;
-    if (pNewParms)
-    {
-        pNewParms[0].setUInt32(HOST_EXEC_CMD);
-        pNewParms[1].setUInt32(pBlock->u32Flags);
-        pNewParms[2].setPointer((void*)pBlock->pszCmd, (uint32_t)strlen(pBlock->pszCmd) + 1);
-        pNewParms[3].setUInt32(pBlock->u32Args);
-        pNewParms[4].setPointer((void*)pBlock->pvArgs, pBlock->cbArgs);
-        pNewParms[5].setUInt32(pBlock->u32EnvVars);
-        pNewParms[6].setPointer((void*)pBlock->pvEnv, pBlock->cbEnv);
-        pNewParms[7].setPointer((void*)pBlock->pszStdIn, (uint32_t)strlen(pBlock->pszStdIn) + 1);
-        pNewParms[8].setPointer((void*)pBlock->pszStdOut, (uint32_t)strlen(pBlock->pszStdOut) + 1);
-        pNewParms[9].setPointer((void*)pBlock->pszStdErr, (uint32_t)strlen(pBlock->pszStdErr) + 1);
-        pNewParms[10].setPointer((void*)pBlock->pszUsername, (uint32_t)strlen(pBlock->pszUsername) + 1);
-        pNewParms[11].setPointer((void*)pBlock->pszPassword, (uint32_t)strlen(pBlock->pszPassword) + 1);
-        pNewParms[12].setUInt32(pBlock->cMillies);
-
-        *ppaParms = pNewParms;
-        rc = VINF_SUCCESS;
-    }
-    else
-        rc = VERR_NO_MEMORY;
-
-    if (pcParms)
-        *pcParms = 13;
-
-    return rc;
-}
-
-
-void gctrlFreeHostCmd(PVBOXHGCMSVCPARM paParms)
-{
-    RTMemFree(paParms);
-}
-*/
-
-}
-
diff --git a/src/VBox/HostServices/GuestControl/gctrl.h b/src/VBox/HostServices/GuestControl/gctrl.h
deleted file mode 100644
index 5ca9b08..0000000
--- a/src/VBox/HostServices/GuestControl/gctrl.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/** @file
- * Guest Control Service: Internal function used by service, Main and testcase.
- */
-
-/*
- * Copyright (C) 2010 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-#ifndef VBOX_GCTRL_H
-#define VBOX_GCTRL_H
-
-#include <VBox/err.h>
-#include <VBox/hgcmsvc.h>
-
-namespace guestControl {
-
-/** @todo write docs! */
-int gctrlPrepareExecArgv(char *pszArgs, void **ppvList, uint32_t *pcbList, uint32_t *pcArgs);
-/** @todo write docs! */
-int gctrlAddToExecEnvv(const char *pszEnv, void **ppvList, uint32_t *pcbList, uint32_t *pcEnv);
-/** @todo write docs! */
-#if 0
-int gctrlAllocateExecBlock(PVBOXGUESTCTRLEXECBLOCK *ppBlock,
-                           const char *pszCmd, uint32_t fFlags,
-                           uint32_t cArgs,    const char * const *papszArgs,
-                           uint32_t cEnvVars, const char * const *papszEnv,
-                           const char *pszStdIn, const char *pszStdOut, const char *pszStdErr,
-                           const char *pszUsername, const char *pszPassword, RTMSINTERVAL cMillies);
-/** @todo write docs! */
-int gctrlFreeExecBlock(PVBOXGUESTCTRLEXECBLOCK pBlock);
-/** @todo write docs! */
-int gctrlPrepareHostCmdExec(PVBOXHGCMSVCPARM *ppaParms, uint32_t *pcParms,
-                            PVBOXGUESTCTRLEXECBLOCK pBlock);
-/** @todo write docs! */
-void gctrlFreeHostCmd(PVBOXHGCMSVCPARM paParms);
-#endif
-}
-
-#endif /* !VBOX_GCTRL_H */
-
diff --git a/src/VBox/HostServices/GuestControl/service.cpp b/src/VBox/HostServices/GuestControl/service.cpp
index 2281b44..9910c4f 100644
--- a/src/VBox/HostServices/GuestControl/service.cpp
+++ b/src/VBox/HostServices/GuestControl/service.cpp
@@ -82,7 +82,6 @@
 #include <string>
 #include <list>
 
-#include "gctrl.h"
 
 namespace guestControl {
 
@@ -791,8 +790,8 @@ typedef struct ClientState
         return rc;
     }
 
-    int SendReply(const ClientConnection *pConnection,
-                        HostCommand      *pHostCmd)
+    int SendReply(ClientConnection const *pConnection,
+                  HostCommand            *pHostCmd)
     {
         AssertPtrReturn(pConnection, VERR_INVALID_POINTER);
         AssertPtrReturn(pHostCmd, VERR_INVALID_POINTER);
@@ -1027,6 +1026,8 @@ private:
     int hostCall(uint32_t eFunction, uint32_t cParms, VBOXHGCMSVCPARM paParms[]);
     int sessionClose(uint32_t u32ClientID, VBOXHGCMCALLHANDLE callHandle, uint32_t cParms, VBOXHGCMSVCPARM paParms[]);
     int uninit(void);
+
+    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(Service);
 };
 
 /**
@@ -1038,6 +1039,7 @@ private:
  */
 int Service::clientConnect(uint32_t u32ClientID, void *pvClient)
 {
+    RT_NOREF1(pvClient);
     LogFlowFunc(("[Client %RU32] Connected\n", u32ClientID));
 #ifdef VBOX_STRICT
     ClientStateMapIterConst it = mClientStateMap.find(u32ClientID);
@@ -1065,6 +1067,7 @@ int Service::clientConnect(uint32_t u32ClientID, void *pvClient)
  */
 int Service::clientDisconnect(uint32_t u32ClientID, void *pvClient)
 {
+    RT_NOREF1(pvClient);
     LogFlowFunc(("[Client %RU32] Disconnected (%zu clients total)\n",
                  u32ClientID, mClientStateMap.size()));
 
@@ -1168,6 +1171,8 @@ int Service::clientGetCommand(uint32_t u32ClientID, VBOXHGCMCALLHANDLE callHandl
 int Service::clientSetMsgFilterSet(uint32_t u32ClientID, VBOXHGCMCALLHANDLE callHandle,
                                    uint32_t cParms, VBOXHGCMSVCPARM paParms[])
 {
+    RT_NOREF1(callHandle);
+
     /*
      * Lookup client in our list so that we can assign the context ID of
      * a command to that client.
@@ -1181,28 +1186,34 @@ int Service::clientSetMsgFilterSet(uint32_t u32ClientID, VBOXHGCMCALLHANDLE call
     if (cParms != 4)
         return VERR_INVALID_PARAMETER;
 
-    uint32_t uValue, uMaskAdd, uMaskRemove;
+    uint32_t uValue;
     int rc = paParms[0].getUInt32(&uValue);
     if (RT_SUCCESS(rc))
-        rc = paParms[1].getUInt32(&uMaskAdd);
-    if (RT_SUCCESS(rc))
-        rc = paParms[2].getUInt32(&uMaskRemove);
-    /** @todo paParm[3] (flags) not used yet. */
-    if (RT_SUCCESS(rc))
     {
-        ClientState &clientState = itClientState->second;
+        uint32_t uMaskAdd;
+        rc = paParms[1].getUInt32(&uMaskAdd);
+        if (RT_SUCCESS(rc))
+        {
+            uint32_t uMaskRemove;
+            rc = paParms[2].getUInt32(&uMaskRemove);
+            /** @todo paParm[3] (flags) not used yet. */
+            if (RT_SUCCESS(rc))
+            {
+                ClientState &clientState = itClientState->second;
 
-        clientState.mFlags |= CLIENTSTATE_FLAG_CONTEXTFILTER;
-        if (uMaskAdd)
-            clientState.mFilterMask |= uMaskAdd;
-        if (uMaskRemove)
-            clientState.mFilterMask &= ~uMaskRemove;
+                clientState.mFlags |= CLIENTSTATE_FLAG_CONTEXTFILTER;
+                if (uMaskAdd)
+                    clientState.mFilterMask |= uMaskAdd;
+                if (uMaskRemove)
+                    clientState.mFilterMask &= ~uMaskRemove;
 
-        clientState.mFilterValue = uValue;
+                clientState.mFilterValue = uValue;
 
-        LogFlowFunc(("[Client %RU32] Setting message filterMask=0x%x, filterVal=%RU32 set (flags=0x%x, maskAdd=0x%x, maskRemove=0x%x)\n",
-                     u32ClientID, clientState.mFilterMask, clientState.mFilterValue,
-                     clientState.mFlags, uMaskAdd, uMaskRemove));
+                LogFlowFunc(("[Client %RU32] Setting message filterMask=0x%x, filterVal=%RU32 set (flags=0x%x, maskAdd=0x%x, maskRemove=0x%x)\n",
+                             u32ClientID, clientState.mFilterMask, clientState.mFilterValue,
+                             clientState.mFlags, uMaskAdd, uMaskRemove));
+            }
+        }
     }
 
     return rc;
@@ -1211,6 +1222,8 @@ int Service::clientSetMsgFilterSet(uint32_t u32ClientID, VBOXHGCMCALLHANDLE call
 int Service::clientSetMsgFilterUnset(uint32_t u32ClientID, VBOXHGCMCALLHANDLE callHandle,
                                      uint32_t cParms, VBOXHGCMSVCPARM paParms[])
 {
+    RT_NOREF2(callHandle, paParms);
+
     /*
      * Lookup client in our list so that we can assign the context ID of
      * a command to that client.
@@ -1237,6 +1250,8 @@ int Service::clientSetMsgFilterUnset(uint32_t u32ClientID, VBOXHGCMCALLHANDLE ca
 int Service::clientSkipMsg(uint32_t u32ClientID, VBOXHGCMCALLHANDLE callHandle,
                            uint32_t cParms, VBOXHGCMSVCPARM paParms[])
 {
+    RT_NOREF2(callHandle, paParms);
+
     /*
      * Lookup client in our list so that we can assign the context ID of
      * a command to that client.
@@ -1559,6 +1574,7 @@ int Service::hostCall(uint32_t eFunction, uint32_t cParms, VBOXHGCMSVCPARM paPar
  */
 int Service::sessionClose(uint32_t u32ClientID, VBOXHGCMCALLHANDLE callHandle, uint32_t cParms, VBOXHGCMSVCPARM paParms[])
 {
+    RT_NOREF2(u32ClientID, callHandle);
     if (cParms < 2)
         return VERR_INVALID_PARAMETER;
 
@@ -1573,7 +1589,7 @@ int Service::sessionClose(uint32_t u32ClientID, VBOXHGCMCALLHANDLE callHandle, u
         rc = hostProcessCommand(HOST_SESSION_CLOSE, cParms, paParms);
 
     LogFlowFunc(("Closing guest session ID=%RU32 (from client ID=%RU32) returned with rc=%Rrc\n",
-                 uSessionID, u32ClientID, rc));
+                 uSessionID, u32ClientID, rc)); NOREF(uSessionID);
     return rc;
 }
 
diff --git a/src/VBox/HostServices/GuestControl/testcase/Makefile.kmk b/src/VBox/HostServices/GuestControl/testcase/Makefile.kmk
index 4ced749..6b93bbd 100644
--- a/src/VBox/HostServices/GuestControl/testcase/Makefile.kmk
+++ b/src/VBox/HostServices/GuestControl/testcase/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2010-2015 Oracle Corporation
+# Copyright (C) 2010-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -32,7 +32,6 @@ if defined(VBOX_WITH_TESTCASES) && !defined(VBOX_ONLY_ADDITIONS) && !defined(VBO
  # without waiting for any thread synchronisation.
  tstGuestControlSvc_DEFS     = VBOX_WITH_HGCM VBOX_GUEST_CONTROL_TEST_NOTHREAD
  tstGuestControlSvc_SOURCES  = \
- 	../gctrl.cpp \
 	../service.cpp \
 	tstGuestControlSvc.cpp
  tstGuestControlSvc_LIBS     = $(LIB_RUNTIME)
diff --git a/src/VBox/HostServices/GuestControl/testcase/tstGuestControlSvc.cpp b/src/VBox/HostServices/GuestControl/testcase/tstGuestControlSvc.cpp
index e8b5c66..6035985 100644
--- a/src/VBox/HostServices/GuestControl/testcase/tstGuestControlSvc.cpp
+++ b/src/VBox/HostServices/GuestControl/testcase/tstGuestControlSvc.cpp
@@ -1,11 +1,10 @@
 /* $Id: tstGuestControlSvc.cpp $ */
 /** @file
- *
  * Testcase for the guest control service.
  */
 
 /*
- * Copyright (C) 2011-2013 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -25,8 +24,6 @@
 #include <iprt/stream.h>
 #include <iprt/test.h>
 
-#include "../gctrl.h"
-
 
 /*********************************************************************************************************************************
 *   Global Variables                                                                                                             *
@@ -153,17 +150,17 @@ static int testHost(const VBOXHGCMSVCFNTABLE *pTable)
 {
     RTTestSub(g_hTest, "Testing host commands ...");
 
-    static VBOXHGCMSVCPARM s_aParms[1];
-    s_aParms[0].setUInt32(1000 /* Context ID */);
+    VBOXHGCMSVCPARM aParms[1];
+    aParms[0].setUInt32(1000 /* Context ID */);
 
-    static CMDHOST s_aCmdHostAll[] =
+    CMDHOST aCmdHostAll[] =
     {
-        #if 0
+#if 0
         /** No client connected. */
         { 1024 /* Not existing command */, 0, 0, false, VERR_NOT_FOUND },
         { -1 /* Invalid command */, 0, 0, false, VERR_NOT_FOUND },
         { HOST_CANCEL_PENDING_WAITS, 1024, 0, false, VERR_NOT_FOUND },
-        { HOST_CANCEL_PENDING_WAITS, 0, &s_aParms[0], false, VERR_NOT_FOUND },
+        { HOST_CANCEL_PENDING_WAITS, 0, &aParms[0], false, VERR_NOT_FOUND },
 
         /** No client connected, valid command. */
         { HOST_CANCEL_PENDING_WAITS, 0, 0, false, VERR_NOT_FOUND },
@@ -175,9 +172,9 @@ static int testHost(const VBOXHGCMSVCFNTABLE *pTable)
 
         /** Client connected, valid parameters given. */
         { HOST_CANCEL_PENDING_WAITS, 0, 0, true, VINF_SUCCESS },
-        { HOST_CANCEL_PENDING_WAITS, 1024, &s_aParms[0], true, VINF_SUCCESS },
-        { HOST_CANCEL_PENDING_WAITS, 0, &s_aParms[0], true, VINF_SUCCESS},
-        #endif
+        { HOST_CANCEL_PENDING_WAITS, 1024, &aParms[0], true, VINF_SUCCESS },
+        { HOST_CANCEL_PENDING_WAITS, 0, &aParms[0], true, VINF_SUCCESS},
+#endif
 
         /** Client connected, invalid parameters given. */
         { HOST_EXEC_CMD, 1024, 0, true, VERR_INVALID_POINTER },
@@ -185,16 +182,16 @@ static int testHost(const VBOXHGCMSVCFNTABLE *pTable)
         { HOST_EXEC_CMD, -1, 0, true, VERR_INVALID_POINTER },
 
         /** Client connected, parameters given. */
-        { HOST_CANCEL_PENDING_WAITS, 1, &s_aParms[0], true, VINF_SUCCESS },
-        { HOST_EXEC_CMD, 1, &s_aParms[0], true, VINF_SUCCESS },
-        { HOST_EXEC_SET_INPUT, 1, &s_aParms[0], true, VINF_SUCCESS },
-        { HOST_EXEC_GET_OUTPUT, 1, &s_aParms[0], true, VINF_SUCCESS },
+        { HOST_CANCEL_PENDING_WAITS, 1, &aParms[0], true, VINF_SUCCESS },
+        { HOST_EXEC_CMD, 1, &aParms[0], true, VINF_SUCCESS },
+        { HOST_EXEC_SET_INPUT, 1, &aParms[0], true, VINF_SUCCESS },
+        { HOST_EXEC_GET_OUTPUT, 1, &aParms[0], true, VINF_SUCCESS },
 
         /** Client connected, unknown command + valid parameters given. */
-        { -1, 1, &s_aParms[0], true, VINF_SUCCESS }
+        { -1, 1, &aParms[0], true, VINF_SUCCESS }
     };
 
-    int rc = testHostCmd(pTable, &s_aCmdHostAll[0], RT_ELEMENTS(s_aCmdHostAll));
+    int rc = testHostCmd(pTable, &aCmdHostAll[0], RT_ELEMENTS(aCmdHostAll));
     RTTestSubDone(g_hTest);
     return rc;
 }
@@ -209,20 +206,20 @@ static int testClient(const VBOXHGCMSVCFNTABLE *pTable)
         VBOXHGCMCALLHANDLE_TYPEDEF callHandle = { VINF_SUCCESS };
 
         /* No commands from host yet. */
-        static VBOXHGCMSVCPARM s_aParmsGuest[8];
-        s_aParmsGuest[0].setUInt32(0 /* Msg type */);
-        s_aParmsGuest[1].setUInt32(0 /* Parameters */);
+        VBOXHGCMSVCPARM aParmsGuest[8];
+        aParmsGuest[0].setUInt32(0 /* Msg type */);
+        aParmsGuest[1].setUInt32(0 /* Parameters */);
         pTable->pfnCall(pTable->pvService, &callHandle, 1 /* Client ID */, NULL /* pvClient */,
-                        GUEST_MSG_WAIT, 2, &s_aParmsGuest[0]);
+                        GUEST_MSG_WAIT, 2, &aParmsGuest[0]);
         RTTEST_CHECK_RC_RET(g_hTest, callHandle.rc, VINF_SUCCESS, callHandle.rc);
 
         /* Host: Add a dummy command. */
-        static VBOXHGCMSVCPARM s_aParmsHost[8];
-        s_aParmsHost[0].setUInt32(1000 /* Context ID */);
-        s_aParmsHost[1].setString("foo.bar");
-        s_aParmsHost[2].setString("baz");
+        VBOXHGCMSVCPARM aParmsHost[8];
+        aParmsHost[0].setUInt32(1000 /* Context ID */);
+        aParmsHost[1].setString("foo.bar");
+        aParmsHost[2].setString("baz");
 
-        rc = pTable->pfnHostCall(pTable->pvService, HOST_EXEC_CMD, 3, &s_aParmsHost[0]);
+        rc = pTable->pfnHostCall(pTable->pvService, HOST_EXEC_CMD, 3, &aParmsHost[0]);
         RTTEST_CHECK_RC_RET(g_hTest, rc, VINF_SUCCESS, rc);
 
         /* Client: Disconnect again. */
@@ -238,7 +235,7 @@ static int testClient(const VBOXHGCMSVCFNTABLE *pTable)
 /*
  * Set environment variable "IPRT_TEST_MAX_LEVEL=all" to get more debug output!
  */
-int main(int argc, char **argv)
+int main()
 {
     RTEXITCODE rcExit  = RTTestInitAndCreate("tstGuestControlSvc", &g_hTest);
     if (rcExit != RTEXITCODE_SUCCESS)
diff --git a/src/VBox/HostServices/GuestProperties/VBoxGuestPropSvc.rc b/src/VBox/HostServices/GuestProperties/VBoxGuestPropSvc.rc
index cb4cc3e..0f9c558 100644
--- a/src/VBox/HostServices/GuestProperties/VBoxGuestPropSvc.rc
+++ b/src/VBox/HostServices/GuestProperties/VBoxGuestPropSvc.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/GuestProperties/service.cpp b/src/VBox/HostServices/GuestProperties/service.cpp
index 813bec4..0e123c7 100644
--- a/src/VBox/HostServices/GuestProperties/service.cpp
+++ b/src/VBox/HostServices/GuestProperties/service.cpp
@@ -409,6 +409,8 @@ private:
     RTREQQUEUE mhReqQNotifyHost;
     static DECLCALLBACK(int) threadNotifyHost(RTTHREAD self, void *pvUser);
 #endif
+
+    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(Service);
 };
 
 
@@ -471,7 +473,7 @@ int Service::validateName(const char *pszName, uint32_t cbName)
  */
 int Service::validateValue(const char *pszValue, uint32_t cbValue)
 {
-    LogFlowFunc(("cbValue=%d\n", cbValue));
+    LogFlowFunc(("cbValue=%d\n", cbValue)); RT_NOREF1(pszValue);
 
     int rc = VINF_SUCCESS;
     if (RT_SUCCESS(rc) && cbValue == 0)
@@ -511,56 +513,57 @@ int Service::setPropertyBlock(uint32_t cParms, VBOXHGCMSVCPARM paParms[])
         )
         rc = VERR_INVALID_PARAMETER;
     /** @todo validate the array sizes... */
-
-    for (unsigned i = 0; RT_SUCCESS(rc) && papszNames[i] != NULL; ++i)
-    {
-        if (   !RT_VALID_PTR(papszNames[i])
-            || !RT_VALID_PTR(papszValues[i])
-            || !RT_VALID_PTR(papszFlags[i])
-            )
-            rc = VERR_INVALID_POINTER;
-        else
-        {
-            uint32_t fFlagsIgn;
-            rc = validateFlags(papszFlags[i], &fFlagsIgn);
-        }
-    }
-
-    if (RT_SUCCESS(rc))
+    else
     {
-        /*
-         * Add the properties.  No way to roll back here.
-         */
-        for (unsigned i = 0; papszNames[i] != NULL; ++i)
+        for (unsigned i = 0; RT_SUCCESS(rc) && papszNames[i] != NULL; ++i)
         {
-            uint32_t fFlags;
-            rc = validateFlags(papszFlags[i], &fFlags);
-            AssertRCBreak(rc);
-
-            Property *pProp = getPropertyInternal(papszNames[i]);
-            if (pProp)
+            if (   !RT_VALID_PTR(papszNames[i])
+                || !RT_VALID_PTR(papszValues[i])
+                || !RT_VALID_PTR(papszFlags[i])
+                )
+                rc = VERR_INVALID_POINTER;
+            else
             {
-                /* Update existing property. */
-                pProp->mValue     = papszValues[i];
-                pProp->mTimestamp = pau64Timestamps[i];
-                pProp->mFlags     = fFlags;
+                uint32_t fFlagsIgn;
+                rc = validateFlags(papszFlags[i], &fFlagsIgn);
             }
-            else
+        }
+        if (RT_SUCCESS(rc))
+        {
+            /*
+             * Add the properties.  No way to roll back here.
+             */
+            for (unsigned i = 0; papszNames[i] != NULL; ++i)
             {
-                /* Create a new property */
-                pProp = new Property(papszNames[i], papszValues[i], pau64Timestamps[i], fFlags);
-                if (!pProp)
+                uint32_t fFlags;
+                rc = validateFlags(papszFlags[i], &fFlags);
+                AssertRCBreak(rc);
+
+                Property *pProp = getPropertyInternal(papszNames[i]);
+                if (pProp)
                 {
-                    rc = VERR_NO_MEMORY;
-                    break;
+                    /* Update existing property. */
+                    pProp->mValue     = papszValues[i];
+                    pProp->mTimestamp = pau64Timestamps[i];
+                    pProp->mFlags     = fFlags;
                 }
-                if (RTStrSpaceInsert(&mhProperties, &pProp->mStrCore))
-                    mcProperties++;
                 else
                 {
-                    delete pProp;
-                    rc = VERR_INTERNAL_ERROR_3;
-                    AssertFailedBreak();
+                    /* Create a new property */
+                    pProp = new Property(papszNames[i], papszValues[i], pau64Timestamps[i], fFlags);
+                    if (!pProp)
+                    {
+                        rc = VERR_NO_MEMORY;
+                        break;
+                    }
+                    if (RTStrSpaceInsert(&mhProperties, &pProp->mStrCore))
+                        mcProperties++;
+                    else
+                    {
+                        delete pProp;
+                        rc = VERR_INTERNAL_ERROR_3;
+                        AssertFailedBreak();
+                    }
                 }
             }
         }
@@ -585,8 +588,9 @@ int Service::getProperty(uint32_t cParms, VBOXHGCMSVCPARM paParms[])
 {
     int         rc;
     const char *pcszName = NULL;        /* shut up gcc */
-    char       *pchBuf;
-    uint32_t    cbName, cbBuf;
+    char       *pchBuf = NULL;          /* shut up MSC */
+    uint32_t    cbName;
+    uint32_t    cbBuf = 0;              /* shut up MSC */
 
     /*
      * Get and validate the parameters
@@ -1021,18 +1025,19 @@ int Service::getNotificationWriteOut(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
             buffer += szFlags;
             buffer += '\0';
             u64Timestamp = prop.mTimestamp;
+
+            /* Write out the data. */
+            if (RT_SUCCESS(rc))
+            {
+                paParms[1].setUInt64(u64Timestamp);
+                paParms[3].setUInt32((uint32_t)buffer.size());
+                if (buffer.size() <= cbBuf)
+                    buffer.copy(pchBuf, cbBuf);
+                else
+                    rc = VERR_BUFFER_OVERFLOW;
+            }
         }
     }
-    /* Write out the data. */
-    if (RT_SUCCESS(rc))
-    {
-        paParms[1].setUInt64(u64Timestamp);
-        paParms[3].setUInt32((uint32_t)buffer.size());
-        if (buffer.size() <= cbBuf)
-            buffer.copy(pchBuf, cbBuf);
-        else
-            rc = VERR_BUFFER_OVERFLOW;
-    }
     return rc;
 }
 
@@ -1060,63 +1065,64 @@ int Service::getNotification(uint32_t u32ClientId, VBOXHGCMCALLHANDLE callHandle
      * Get the HGCM function arguments and perform basic verification.
      */
     LogFlowThisFunc(("\n"));
-    if (   (cParms != 4)  /* Hardcoded value as the next lines depend on it. */
+    if (   cParms != 4  /* Hardcoded value as the next lines depend on it. */
         || RT_FAILURE(paParms[0].getString(&pszPatterns, &cchPatterns))  /* patterns */
         || RT_FAILURE(paParms[1].getUInt64(&u64Timestamp))  /* timestamp */
         || RT_FAILURE(paParms[2].getBuffer((void **)&pchBuf, &cbBuf))  /* return buffer */
        )
         rc = VERR_INVALID_PARAMETER;
-
-    if (RT_SUCCESS(rc))
+    else
+    {
         LogFlow(("pszPatterns=%s, u64Timestamp=%llu\n", pszPatterns, u64Timestamp));
 
-    /*
-     * If no timestamp was supplied or no notification was found in the queue
-     * of old notifications, enqueue the request in the waiting queue.
-     */
-    Property prop;
-    if (RT_SUCCESS(rc) && u64Timestamp != 0)
-        rc = getOldNotification(pszPatterns, u64Timestamp, &prop);
-    if (RT_SUCCESS(rc))
-    {
-        if (prop.isNull())
+        /*
+         * If no timestamp was supplied or no notification was found in the queue
+         * of old notifications, enqueue the request in the waiting queue.
+         */
+        Property prop;
+        if (RT_SUCCESS(rc) && u64Timestamp != 0)
+            rc = getOldNotification(pszPatterns, u64Timestamp, &prop);
+        if (RT_SUCCESS(rc))
         {
-            /*
-             * Check if the client already had the same request.
-             * Complete the old request with an error in this case.
-             * Protection against clients, which cancel and resubmits requests.
-             */
-            CallList::iterator it = mGuestWaiters.begin();
-            while (it != mGuestWaiters.end())
+            if (prop.isNull())
             {
-                const char *pszPatternsExisting;
-                uint32_t cchPatternsExisting;
-                int rc3 = it->mParms[0].getString(&pszPatternsExisting, &cchPatternsExisting);
-
-                if (   RT_SUCCESS(rc3)
-                    && u32ClientId == it->u32ClientId
-                    && RTStrCmp(pszPatterns, pszPatternsExisting) == 0)
+                /*
+                 * Check if the client already had the same request.
+                 * Complete the old request with an error in this case.
+                 * Protection against clients, which cancel and resubmits requests.
+                 */
+                CallList::iterator it = mGuestWaiters.begin();
+                while (it != mGuestWaiters.end())
                 {
-                    /* Complete the old request. */
-                    mpHelpers->pfnCallComplete(it->mHandle, VERR_INTERRUPTED);
-                    it = mGuestWaiters.erase(it);
+                    const char *pszPatternsExisting;
+                    uint32_t cchPatternsExisting;
+                    int rc3 = it->mParms[0].getString(&pszPatternsExisting, &cchPatternsExisting);
+
+                    if (   RT_SUCCESS(rc3)
+                        && u32ClientId == it->u32ClientId
+                        && RTStrCmp(pszPatterns, pszPatternsExisting) == 0)
+                    {
+                        /* Complete the old request. */
+                        mpHelpers->pfnCallComplete(it->mHandle, VERR_INTERRUPTED);
+                        it = mGuestWaiters.erase(it);
+                    }
+                    else
+                        ++it;
                 }
-                else
-                    ++it;
-            }
 
-            mGuestWaiters.push_back(GuestCall(u32ClientId, callHandle, GET_NOTIFICATION,
-                                              cParms, paParms, rc));
-            rc = VINF_HGCM_ASYNC_EXECUTE;
-        }
-        /*
-         * Otherwise reply at once with the enqueued notification we found.
-         */
-        else
-        {
-            int rc2 = getNotificationWriteOut(cParms, paParms, prop);
-            if (RT_FAILURE(rc2))
-                rc = rc2;
+                mGuestWaiters.push_back(GuestCall(u32ClientId, callHandle, GET_NOTIFICATION,
+                                                  cParms, paParms, rc));
+                rc = VINF_HGCM_ASYNC_EXECUTE;
+            }
+            /*
+             * Otherwise reply at once with the enqueued notification we found.
+             */
+            else
+            {
+                int rc2 = getNotificationWriteOut(cParms, paParms, prop);
+                if (RT_FAILURE(rc2))
+                    rc = rc2;
+            }
         }
     }
 
@@ -1424,6 +1430,7 @@ void Service::dbgInfoShow(PCDBGFINFOHLP pHlp)
  */
 void Service::dbgInfo(void *pvUser, PCDBGFINFOHLP pHlp, const char *pszArgs)
 {
+    RT_NOREF1(pszArgs);
     SELF *pSelf = reinterpret_cast<SELF *>(pvUser);
     pSelf->dbgInfoShow(pHlp);
 }
@@ -1518,8 +1525,9 @@ int Service::hostCall (uint32_t eFunction, uint32_t cParms, VBOXHGCMSVCPARM paPa
 
 #ifdef ASYNC_HOST_NOTIFY
 /* static */
-DECLCALLBACK(int) Service::threadNotifyHost(RTTHREAD self, void *pvUser)
+DECLCALLBACK(int) Service::threadNotifyHost(RTTHREAD hThreadSelf, void *pvUser)
 {
+    RT_NOREF1(hThreadSelf);
     Service *pThis = (Service *)pvUser;
     int rc = VINF_SUCCESS;
 
diff --git a/src/VBox/HostServices/GuestProperties/testcase/Makefile.kmk b/src/VBox/HostServices/GuestProperties/testcase/Makefile.kmk
index a5714ad..9d02fef 100644
--- a/src/VBox/HostServices/GuestProperties/testcase/Makefile.kmk
+++ b/src/VBox/HostServices/GuestProperties/testcase/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/GuestProperties/testcase/tstGuestPropSvc.cpp b/src/VBox/HostServices/GuestProperties/testcase/tstGuestPropSvc.cpp
index d22e135..638374a 100644
--- a/src/VBox/HostServices/GuestProperties/testcase/tstGuestPropSvc.cpp
+++ b/src/VBox/HostServices/GuestProperties/testcase/tstGuestPropSvc.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2008-2012 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -767,6 +767,7 @@ static void setupAsyncNotification(VBOXHGCMSVCFNTABLE *pTable)
  */
 static void testAsyncNotification(VBOXHGCMSVCFNTABLE *pTable)
 {
+    RT_NOREF1(pTable);
     uint64_t u64Timestamp;
     uint32_t u32Size;
     if (   g_AsyncNotification.callHandle.rc != VINF_SUCCESS
@@ -1004,7 +1005,7 @@ static void test4(void)
             VBOXHGCMSVCPARM aParms[4];
             aParms[0].setString(s_szProp);
             aParms[1].setPointer(pvBuf, cbBuf);
-            int rc = svcTable.pfnHostCall(svcTable.pvService, GET_PROP_HOST, RT_ELEMENTS(aParms), aParms);
+            svcTable.pfnHostCall(svcTable.pvService, GET_PROP_HOST, RT_ELEMENTS(aParms), aParms);
 
             RTTestGuardedFree(g_hTest, pvBuf);
         }
@@ -1040,7 +1041,7 @@ static void test5(void)
             VBOXHGCMSVCPARM aParms[3];
             aParms[0].setString("*");
             aParms[1].setPointer(pvBuf, cbBuf);
-            int rc2 = svcTable.pfnHostCall(svcTable.pvService, ENUM_PROPS_HOST, RT_ELEMENTS(aParms), aParms);
+            svcTable.pfnHostCall(svcTable.pvService, ENUM_PROPS_HOST, RT_ELEMENTS(aParms), aParms);
 
             RTTestGuardedFree(g_hTest, pvBuf);
         }
@@ -1107,7 +1108,7 @@ static void test6(void)
         {
             VBOXHGCMSVCPARM aParms[4];
             char            szBuffer[256];
-            aParms[0].setPointer(szProp, cchProp + 1);
+            aParms[0].setPointer(szProp, (uint32_t)cchProp + 1);
             aParms[1].setPointer(szBuffer, sizeof(szBuffer));
             RTTESTI_CHECK_RC_BREAK(svcTable.pfnHostCall(svcTable.pvService, GET_PROP_HOST, 4, aParms), VINF_SUCCESS);
         }
@@ -1135,7 +1136,7 @@ static void test6(void)
 
 
 
-int main(int argc, char **argv)
+int main()
 {
     RTEXITCODE rcExit = RTTestInitAndCreate("tstGuestPropSvc", &g_hTest);
     if (rcExit != RTEXITCODE_SUCCESS)
diff --git a/src/VBox/HostServices/HostChannel/HostChannel.cpp b/src/VBox/HostServices/HostChannel/HostChannel.cpp
index 3edf7d2..b5fd759 100644
--- a/src/VBox/HostServices/HostChannel/HostChannel.cpp
+++ b/src/VBox/HostServices/HostChannel/HostChannel.cpp
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -142,7 +142,7 @@ static int vhcProviderRegister(VBOXHOSTCHCTX *pCtx, VBOXHOSTCHPROVIDER *pProvide
 
     if (RT_SUCCESS(rc))
     {
-        /* @todo check a duplicate. */
+        /** @todo check a duplicate. */
 
         RTListAppend(&pCtx->listProviders, &pProvider->nodeContext);
 
@@ -163,8 +163,8 @@ static int vhcProviderUnregister(VBOXHOSTCHPROVIDER *pProvider)
 
     if (RT_SUCCESS(rc))
     {
-        /* @todo check that the provider is in the list. */
-        /* @todo mark the provider as invalid in each instance. also detach channels? */
+        /** @todo check that the provider is in the list. */
+        /** @todo mark the provider as invalid in each instance. also detach channels? */
 
         RTListNodeRemove(&pProvider->nodeContext);
 
@@ -228,6 +228,7 @@ static int vhcHandleCreate(VBOXHOSTCHCLIENT *pClient, uint32_t *pu32Handle)
 
 static void vhcInstanceDestroy(VBOXHOSTCHINSTANCE *pInstance)
 {
+    RT_NOREF1(pInstance);
     HOSTCHLOG(("HostChannel: destroy %p\n", pInstance));
 }
 
@@ -927,6 +928,7 @@ static DECLCALLBACK(void) HostChannelCallbackEvent(void *pvCallbacks, void *pvCh
 /* @thread provider */
 static DECLCALLBACK(void) HostChannelCallbackDeleted(void *pvCallbacks, void *pvChannel)
 {
+    RT_NOREF1(pvChannel);
     vhcCallbackCtxDelete((VBOXHOSTCHCALLBACKCTX *)pvCallbacks);
 }
 
@@ -966,6 +968,7 @@ int vboxHostChannelRegister(const char *pszName,
                             const VBOXHOSTCHANNELINTERFACE *pInterface,
                             uint32_t cbInterface)
 {
+    RT_NOREF1(cbInterface);
     int rc = VINF_SUCCESS;
 
     VBOXHOSTCHCTX *pCtx = &g_ctx;
diff --git a/src/VBox/HostServices/HostChannel/HostChannel.h b/src/VBox/HostServices/HostChannel/HostChannel.h
index 190f4b9..56858ee 100644
--- a/src/VBox/HostServices/HostChannel/HostChannel.h
+++ b/src/VBox/HostServices/HostChannel/HostChannel.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/HostChannel/Makefile.kmk b/src/VBox/HostServices/HostChannel/Makefile.kmk
index a545b50..7647433 100644
--- a/src/VBox/HostServices/HostChannel/Makefile.kmk
+++ b/src/VBox/HostServices/HostChannel/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2012-2015 Oracle Corporation
+# Copyright (C) 2012-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/HostChannel/VBoxHostChannel.rc b/src/VBox/HostServices/HostChannel/VBoxHostChannel.rc
index 339ddbc..27665d1 100644
--- a/src/VBox/HostServices/HostChannel/VBoxHostChannel.rc
+++ b/src/VBox/HostServices/HostChannel/VBoxHostChannel.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/HostChannel/service.cpp b/src/VBox/HostServices/HostChannel/service.cpp
index a204298..d67c6c2 100644
--- a/src/VBox/HostServices/HostChannel/service.cpp
+++ b/src/VBox/HostServices/HostChannel/service.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -67,12 +67,14 @@ static int VBoxHGCMParmUInt32Get(VBOXHGCMSVCPARM *pParm, uint32_t *pu32)
     return VERR_INVALID_PARAMETER;
 }
 
+#if 0 /* unused */
 static void VBoxHGCMParmPtrSet(VBOXHGCMSVCPARM *pParm, void *pv, uint32_t cb)
 {
     pParm->type             = VBOX_HGCM_SVC_PARM_PTR;
     pParm->u.pointer.size   = cb;
     pParm->u.pointer.addr   = pv;
 }
+#endif
 
 static int VBoxHGCMParmPtrGet(VBOXHGCMSVCPARM *pParm, void **ppv, uint32_t *pcb)
 {
@@ -167,7 +169,7 @@ static DECLCALLBACK(int) svcUnload(void *pvService)
 
 static DECLCALLBACK(int) svcDisconnect(void *pvService, uint32_t u32ClientID, void *pvClient)
 {
-    NOREF(pvService);
+    RT_NOREF2(pvService, u32ClientID);
 
     VBOXHOSTCHCLIENT *pClient = (VBOXHOSTCHCLIENT *)pvClient;
 
@@ -180,6 +182,7 @@ static DECLCALLBACK(int) svcDisconnect(void *pvService, uint32_t u32ClientID, vo
 
 static DECLCALLBACK(int) svcConnect(void *pvService, uint32_t u32ClientID, void *pvClient)
 {
+    RT_NOREF1(pvService);
     VBOXHOSTCHCLIENT *pClient = (VBOXHOSTCHCLIENT *)pvClient;
 
     int rc = VINF_SUCCESS;
@@ -258,7 +261,7 @@ static DECLCALLBACK(void) svcCall(void *pvService,
                     {
                         uint32_t u32Handle = 0;
 
-                        /* @todo make sure that pvName is a nul terminated */
+                        /** @todo make sure that pvName is a nul terminated */
                         rc = vboxHostChannelAttach(pClient, &u32Handle, (const char *)pvName, u32Flags);
 
                         if (RT_SUCCESS(rc))
@@ -529,7 +532,7 @@ static DECLCALLBACK(void) svcCall(void *pvService,
                             {
                                 uint32_t u32SizeDataReturned = 0;
 
-                                /* @todo make sure that pvName is a nul terminated */
+                                /** @todo make sure that pvName is a nul terminated */
                                 rc = vboxHostChannelQuery(pClient, (const char *)pvName, u32Code,
                                                           pvParm, cbParm,
                                                           pvData, cbData, &u32SizeDataReturned);
diff --git a/src/VBox/HostServices/Makefile.kmk b/src/VBox/HostServices/Makefile.kmk
index cfd1b6b..3c27cc1 100644
--- a/src/VBox/HostServices/Makefile.kmk
+++ b/src/VBox/HostServices/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedClipboard/Makefile.kmk b/src/VBox/HostServices/SharedClipboard/Makefile.kmk
index 43231b4..964cdd2 100644
--- a/src/VBox/HostServices/SharedClipboard/Makefile.kmk
+++ b/src/VBox/HostServices/SharedClipboard/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedClipboard/VBoxClipboard-win.cpp b/src/VBox/HostServices/SharedClipboard/VBoxClipboard-win.cpp
index 1e31147..b4c24da 100644
--- a/src/VBox/HostServices/SharedClipboard/VBoxClipboard-win.cpp
+++ b/src/VBox/HostServices/SharedClipboard/VBoxClipboard-win.cpp
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -14,7 +14,7 @@
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
 
-#include <windows.h>
+#include <iprt/win/windows.h>
 
 #include <VBox/HostServices/VBoxClipboardSvc.h>
 
@@ -41,10 +41,13 @@ typedef FNADDCLIPBOARDFORMATLISTENER *PFNADDCLIPBOARDFORMATLISTENER;
 typedef BOOL WINAPI FNREMOVECLIPBOARDFORMATLISTENER(HWND);
 typedef FNREMOVECLIPBOARDFORMATLISTENER *PFNREMOVECLIPBOARDFORMATLISTENER;
 
-/*Forward declarations*/
-int ConvertMimeToCFHTML(const char *source, size_t cb, char **output, size_t *pcch);
-int ConvertCFHtmlToMime(const char *source, const uint32_t cch, char **output, size_t *pcch);
-bool IsWindowsHTML(const char *source);
+
+/*********************************************************************************************************************************
+*   Internal Functions                                                                                                           *
+*********************************************************************************************************************************/
+static int ConvertCFHtmlToMime(const char *pszSource, const uint32_t cch, char **ppszOutput, uint32_t *pch);
+static int ConvertMimeToCFHTML(const char *pszSource, size_t cb, char **ppszOutput, uint32_t *pcbOutput);
+static bool IsWindowsHTML(const char *source);
 
 
 #ifndef WM_CLIPBOARDUPDATE
@@ -82,51 +85,40 @@ void vboxClipboardDump(const void *pv, size_t cb, uint32_t u32Format)
     {
         Log(("DUMP: VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT:\n"));
         if (pv && cb)
-        {
             Log(("%ls\n", pv));
-        }
         else
-        {
             Log(("%p %d\n", pv, cb));
-        }
     }
     else if (u32Format & VBOX_SHARED_CLIPBOARD_FMT_BITMAP)
-    {
         dprintf(("DUMP: VBOX_SHARED_CLIPBOARD_FMT_BITMAP\n"));
-    }
     else if (u32Format & VBOX_SHARED_CLIPBOARD_FMT_HTML)
     {
         Log(("DUMP: VBOX_SHARED_CLIPBOARD_FMT_HTML:\n"));
         if (pv && cb)
         {
             Log(("%s\n", pv));
-            
+
             //size_t cb = RTStrNLen(pv, );
-            char* buf = (char*)RTMemAlloc(cb + 1);
-            RT_BZERO(buf, cb);
-            RTStrCopy(buf, cb, (const char*)pv);
-            for (int i = 0; i < cb; ++i)
+            char *pszBuf = (char *)RTMemAllocZ(cb + 1);
+            RTStrCopy(pszBuf, cb + 1, (const char *)pv);
+            for (size_t off = 0; off < cb; ++off)
             {
-                if (buf[i] == '\n' || buf[i] == '\r')
-                    buf[i] = ' ';
+                if (pszBuf[off] == '\n' || pszBuf[off] == '\r')
+                    pszBuf[off] = ' ';
             }
-            
-            Log(("%s\n", buf));
-            RTMemFree(buf);
+
+            Log(("%s\n", pszBuf));
+            RTMemFree(pszBuf);
         }
         else
-        {
             Log(("%p %d\n", pv, cb));
-        }
     }
     else
-    {
         dprintf(("DUMP: invalid format %02X\n", u32Format));
-    }
 }
-#else
-#define vboxClipboardDump(__pv, __cb, __format) do { NOREF(__pv); NOREF(__cb); NOREF(__format); } while (0)
-#endif /* LOG_ENABLED */
+#else  /* !LOG_ENABLED */
+# define vboxClipboardDump(__pv, __cb, __format) do { NOREF(__pv); NOREF(__cb); NOREF(__format); } while (0)
+#endif /* !LOG_ENABLED */
 
 
 static void vboxClipboardInitNewAPI(VBOXCLIPBOARDCONTEXT *pCtx)
@@ -204,38 +196,46 @@ static int vboxOpenClipboard(HWND hwnd)
 }
 
 
+/** @todo Someone please explain the protocol wrt overflows...  */
 static void vboxClipboardGetData (uint32_t u32Format, const void *pvSrc, uint32_t cbSrc,
                                   void *pvDst, uint32_t cbDst, uint32_t *pcbActualDst)
 {
     dprintf (("vboxClipboardGetData.\n"));
 
-    *pcbActualDst = cbSrc;
-
     LogFlow(("vboxClipboardGetData cbSrc = %d, cbDst = %d\n", cbSrc, cbDst));
 
-    if (cbSrc > cbDst)
+    if (   u32Format == VBOX_SHARED_CLIPBOARD_FMT_HTML
+        && IsWindowsHTML((const char *)pvSrc))
     {
-        /* Do not copy data. The dst buffer is not enough. */
-        return;
+        /** @todo r=bird: Why the double conversion? */
+        char *pszBuf = NULL;
+        uint32_t cbBuf = 0;
+        int rc = ConvertCFHtmlToMime((const char*)pvSrc, cbSrc, &pszBuf, &cbBuf);
+        if (RT_SUCCESS(rc))
+        {
+            *pcbActualDst = cbBuf;
+            if (cbBuf > cbDst)
+            {
+                /* Do not copy data. The dst buffer is not enough. */
+                RTMemFree(pszBuf);
+                return;
+            }
+            memcpy(pvDst, pszBuf, cbBuf);
+            RTMemFree(pszBuf);
+        }
+        else
+            *pcbActualDst = 0;
     }
-
-    if (u32Format == VBOX_SHARED_CLIPBOARD_FMT_HTML &&
-                            IsWindowsHTML((const char*)pvSrc))
+    else
     {
-        char* buffer = NULL;
-        size_t cbuf = 0;
-        ConvertCFHtmlToMime((const char*)pvSrc, cbSrc, (char**)&buffer, &cbuf);
-        if (cbuf > cbDst)
+        *pcbActualDst = cbSrc;
+
+        if (cbSrc > cbDst)
         {
             /* Do not copy data. The dst buffer is not enough. */
             return;
         }
-        memcpy(pvDst, buffer, cbuf);
-        *pcbActualDst = cbuf;
-        RTMemFree(buffer);
-    }
-    else
-    {
+
         memcpy(pvDst, pvSrc, cbSrc);
     }
 
@@ -456,7 +456,7 @@ static LRESULT CALLBACK vboxClipboardWndProc(HWND hwnd, UINT msg, WPARAM wParam,
             if (hViewer)
                 SendMessageCallback(hViewer, WM_CHANGECBCHAIN, (WPARAM)pCtx->hwndNextInChain, (LPARAM)pCtx->hwndNextInChain, CBChainPingProc, (ULONG_PTR) pCtx);
         } break;
-		        
+
         case WM_RENDERFORMAT:
         {
             /* Insert the requested clipboard format data into the clipboard. */
@@ -503,7 +503,7 @@ static LRESULT CALLBACK vboxClipboardWndProc(HWND hwnd, UINT msg, WPARAM wParam,
             else
             {
                 int vboxrc = vboxClipboardReadDataFromClient (pCtx, u32Format);
-                
+
                 dprintf(("vboxClipboardReadDataFromClient vboxrc = %d, pv %p, cb %d, u32Format %d\n",
                           vboxrc, pCtx->pClient->data.pv, pCtx->pClient->data.cb, pCtx->pClient->data.u32Format));
 
@@ -668,8 +668,9 @@ static LRESULT CALLBACK vboxClipboardWndProc(HWND hwnd, UINT msg, WPARAM wParam,
     return rc;
 }
 
-DECLCALLBACK(int) VBoxClipboardThread (RTTHREAD ThreadSelf, void *pInstance)
+DECLCALLBACK(int) VBoxClipboardThread (RTTHREAD hThreadSelf, void *pvUser)
 {
+    RT_NOREF2(hThreadSelf, pvUser);
     /* Create a window and make it a clipboard viewer. */
     int rc = VINF_SUCCESS;
 
@@ -725,9 +726,9 @@ DECLCALLBACK(int) VBoxClipboardThread (RTTHREAD ThreadSelf, void *pInstance)
                 TranslateMessage(&msg);
                 DispatchMessage(&msg);
             }
-            /* 
-            * Window procedure can return error, 
-            * but this is exceptional situation 
+            /*
+            * Window procedure can return error,
+            * but this is exceptional situation
             * that should be identified in testing
             */
             Assert(msgret >= 0);
@@ -777,7 +778,7 @@ void vboxClipboardDestroy (void)
 
     if (g_ctx.hwnd)
     {
-        int rc = PostMessage (g_ctx.hwnd, WM_CLOSE, 0, 0);
+        PostMessage (g_ctx.hwnd, WM_CLOSE, 0, 0);
     }
 
     CloseHandle (g_ctx.hRenderEvent);
@@ -818,6 +819,7 @@ int vboxClipboardSync (VBOXCLIPBOARDCLIENTDATA *pClient)
 
 void vboxClipboardDisconnect (VBOXCLIPBOARDCLIENTDATA *pClient)
 {
+    RT_NOREF1(pClient);
     Log(("vboxClipboardDisconnect\n"));
 
     g_ctx.pClient = NULL;
@@ -831,31 +833,26 @@ void vboxClipboardFormatAnnounce (VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32
     PostMessage (pClient->pCtx->hwnd, WM_USER, 0, u32Formats);
 }
 
-int DumpHtml(char* src, size_t cb)
+int DumpHtml(const char *pszSrc, size_t cb)
 {
-    size_t lenght = 0;
-    int rc = RTStrNLenEx(src, cb, &lenght);
+    size_t cchIgnored = 0;
+    int rc = RTStrNLenEx(pszSrc, cb, &cchIgnored);
     if (RT_SUCCESS(rc))
     {
-        char* buf = (char*)RTMemAlloc(cb + 1);
-        if (buf != NULL)
+        char *pszBuf = (char *)RTMemAllocZ(cb + 1);
+        if (pszBuf != NULL)
         {
-            RT_BZERO(buf, cb + 1);
-            rc = RTStrCopy(buf, cb, (const char*)src);
+            rc = RTStrCopy(pszBuf, cb + 1, (const char *)pszSrc);
             if (RT_SUCCESS(rc))
             {
-                for (int i = 0; i < cb; ++i)
-                {
-                    if (buf[i] == '\n' || buf[i] == '\r')
-                        buf[i] = ' ';
-                }
+                for (size_t i = 0; i < cb; ++i)
+                    if (pszBuf[i] == '\n' || pszBuf[i] == '\r')
+                        pszBuf[i] = ' ';
             }
             else
-            {
                 Log(("Error in copying string.\n"));
-            }
-            Log(("Removed \\r\\n: %s\n", buf));
-            RTMemFree(buf);
+            Log(("Removed \\r\\n: %s\n", pszBuf));
+            RTMemFree(pszBuf);
         }
         else
         {
@@ -986,30 +983,29 @@ void vboxClipboardWriteData (VBOXCLIPBOARDCLIENTDATA *pClient, void *pv, uint32_
 
     if (cb > 0)
     {
-        char* pszResult = NULL;
-        size_t cch;
+        char *pszResult = NULL;
 
-        if(u32Format == VBOX_SHARED_CLIPBOARD_FMT_HTML && 
-            !IsWindowsHTML((const char*)pv))
+        if (   u32Format == VBOX_SHARED_CLIPBOARD_FMT_HTML
+            && !IsWindowsHTML((const char*)pv))
         {
             /* check that this is not already CF_HTML */
-            int rc = ConvertMimeToCFHTML((const char*)pv, cb, &pszResult, &cch);
+            uint32_t cbResult;
+            int rc = ConvertMimeToCFHTML((const char *)pv, cb, &pszResult, &cbResult);
             if (RT_SUCCESS(rc))
             {
-                if (pszResult != NULL && cch != 0)
+                if (pszResult != NULL && cbResult != 0)
                 {
-                    pClient->data.pv = pszResult;
-                    pClient->data.cb = cch;
+                    pClient->data.pv        = pszResult;
+                    pClient->data.cb        = cbResult;
                     pClient->data.u32Format = u32Format;
                 }
             }
         }
         else
         {
-            pClient->data.pv = RTMemAlloc (cb);
+            pClient->data.pv = RTMemDup(pv, cb);
             if (pClient->data.pv)
             {
-                memcpy (pClient->data.pv, pv, cb);
                 pClient->data.cb = cb;
                 pClient->data.u32Format = u32Format;
             }
@@ -1019,178 +1015,197 @@ void vboxClipboardWriteData (VBOXCLIPBOARDCLIENTDATA *pClient, void *pv, uint32_
     SetEvent(pClient->pCtx->hRenderEvent);
 }
 
-/*
- at StartHtml - pos before <html>
- at EndHtml - whole size of text excluding ending zero char
- at StartFragment - pos after <!--StartFragment-->
- at EndFragment - pos before <!--EndFragment-->
- at note: all values includes CR\LF inserted into text
-Calculations:
-Header length = format Length + (3*6('digits')) - 2('%s') = format length + 16 (control value - 183)
-EndHtml  = Header length + fragment length
-StartHtml = 105(constant)
-StartFragment = 143(constant)
-EndFragment  = Header length + fragment length - 40(ending length)
-*/
-const char pcszFormatSample[] =
-    "Version:1.0\r\n"
-    "StartHTML:000000101\r\n"
-    "EndHTML:%09d\r\n" // END HTML = Header length + fragment lengh 
-"StartFragment:000000137\r\n"
-"EndFragment:%09d\r\n"
-"<html>\r\n"
-"<body>\r\n"
-"<!--StartFragment-->%s<!--EndFragment-->\r\n"
-"</body>\r\n"
-"</html>\r\n";
-
-/* 
-* Extracts field value from CF_HTML struct
-* @src - source in CF_HTML format
-* @option - name of CF_HTML field
-* @value - extracted value of CF_HTML field
-* returns RC result code
-*/
-int GetHeaderValue(const char *pcszSrc, const char *pcszOption, size_t *pcValue)
+
+/**
+ * Extracts field value from CF_HTML struct
+ *
+ * @returns VBox status code
+ * @param   pszSrc      source in CF_HTML format
+ * @param   pszOption   Name of CF_HTML field
+ * @param   puValue     Where to return extracted value of CF_HTML field
+ */
+static int GetHeaderValue(const char *pszSrc, const char *pszOption, uint32_t *puValue)
 {
-    size_t cOptionLenght = 0;
     int rc = VERR_INVALID_PARAMETER;
 
-    Assert(pcszSrc);
-    Assert(pcszOption);
+    Assert(pszSrc);
+    Assert(pszOption);
 
-    char* pcszOptionValue = RTStrStr(pcszSrc, pcszOption);
-    if (pcszOptionValue)
+    const char *pszOptionValue = RTStrStr(pszSrc, pszOption);
+    if (pszOptionValue)
     {
-        rc = RTStrNLenEx(pcszOption, RTSTR_MAX, &cOptionLenght);
-        Assert(cOptionLenght);
-        if (RT_SUCCESS(rc))
-        {
-            int32_t tmpValue;
-            rc = RTStrToInt32Ex(pcszOptionValue + cOptionLenght, NULL, 10, &tmpValue);
-            if (RT_SUCCESS(rc))
-            {
-                *pcValue = tmpValue;
-                rc = VINF_SUCCESS;
-            }
-        }
+        size_t cchOption = strlen(pszOption);
+        Assert(cchOption);
+
+        rc = RTStrToUInt32Ex(pszOptionValue + cchOption, NULL, 10, puValue);
     }
     return rc;
 }
 
-/* 
+
+/**
  * Check that the source string contains CF_HTML struct
- * returns true if the @source string is in CF_HTML format
+ *
+ * @returns @c true if the @source string is in CF_HTML format
  */
-bool IsWindowsHTML(const char *pcszSource)
+static bool IsWindowsHTML(const char *pszSource)
 {
-    return RTStrStr(pcszSource, "Version:") != NULL
-        && RTStrStr(pcszSource, "StartHTML:") != NULL;
+    return RTStrStr(pszSource, "Version:") != NULL
+        && RTStrStr(pszSource, "StartHTML:") != NULL;
 }
 
 
-/* 
-* Converts clipboard data from CF_HTML format to mimie clipboard format
-* Returns allocated buffer that contains html converted to text/html mime type
-* return result code
-* parameters - output buffer and size of output buffer
-* It allocates the buffer needed for storing converted fragment 
-* Allocated buffer should be destroyed by RTMemFree after usage
-*/
-int ConvertCFHtmlToMime(const char *pcszSource, const uint32_t cch, char **ppszOutput, size_t *pcCh)
+/*
+ * Converts clipboard data from CF_HTML format to mimie clipboard format
+ *
+ * Returns allocated buffer that contains html converted to text/html mime type
+ *
+ * @returns VBox status code.
+ * @param   pszSource   The input.
+ * @param   cch         The length of the input.
+ * @param   ppszOutput  Where to return the result.  Free using RTMemFree.
+ * @param   pcbOutput   Where to the return length of the result (bytes/chars).
+ */
+static int ConvertCFHtmlToMime(const char *pszSource, const uint32_t cch, char **ppszOutput, uint32_t *pcbOutput)
 {
-    char* result = NULL;
-
-    Assert(pcszSource);
+    Assert(pszSource);
     Assert(cch);
     Assert(ppszOutput);
-    Assert(pcCh);
+    Assert(pcbOutput);
 
-    size_t cStartOffset, cEndOffset;
-    int rc = GetHeaderValue(pcszSource, "StartFragment:", &cStartOffset);
-    if (!RT_SUCCESS(rc))
-    {
-        LogRelFlowFunc(("Error: Unknown CF_HTML format. Expected StartFragment. rc = %Rrc.\n", rc));
-        return VERR_INVALID_PARAMETER;
-    }
-    rc = GetHeaderValue(pcszSource, "EndFragment:", &cEndOffset);
-    if (!RT_SUCCESS(rc))
-    {
-        LogRelFlowFunc(("Error: Unknown CF_HTML format. Expected EndFragment. rc = %Rrc.\n", rc));
-        return VERR_INVALID_PARAMETER;
-    }
-    if (cStartOffset > 0 && cEndOffset > 0 && cEndOffset > cStartOffset)
+    uint32_t offStart;
+    int rc = GetHeaderValue(pszSource, "StartFragment:", &offStart);
+    if (RT_SUCCESS(rc))
     {
-        size_t cSubstrlen = cEndOffset - cStartOffset;
-        result = (char*)RTMemAlloc(cSubstrlen + 1);
-        if (result)
+        uint32_t offEnd;
+        rc = GetHeaderValue(pszSource, "EndFragment:", &offEnd);
+        if (RT_SUCCESS(rc))
         {
-            RT_BZERO(result, cSubstrlen + 1);
-            rc = RTStrCopyEx(result, cSubstrlen + 1, pcszSource + cStartOffset, cSubstrlen);
-            if (RT_SUCCESS(rc))
+            if (   offStart > 0
+                && offEnd > 0
+                && offEnd > offStart
+                && offEnd <= cch)
             {
-                *ppszOutput = result;
-                *pcCh = cSubstrlen + 1;
+                uint32_t cchSubStr = offEnd - offStart;
+                char *pszResult = (char *)RTMemAlloc(cchSubStr + 1);
+                if (pszResult)
+                {
+                    rc = RTStrCopyEx(pszResult, cchSubStr + 1, pszSource + offStart, cchSubStr);
+                    if (RT_SUCCESS(rc))
+                    {
+                        *ppszOutput = pszResult;
+                        *pcbOutput  = (uint32_t)(cchSubStr + 1);
+                        rc = VINF_SUCCESS;
+                    }
+                    else
+                    {
+                        LogRelFlowFunc(("Error: Unknown CF_HTML format. Expected EndFragment. rc = %Rrc\n", rc));
+                        RTMemFree(pszResult);
+                    }
+                }
+                else
+                {
+                    LogRelFlowFunc(("Error: Unknown CF_HTML format. Expected EndFragment.\n"));
+                    rc = VERR_NO_MEMORY;
+                }
             }
             else
             {
-                LogRelFlowFunc(("Error: Unknown CF_HTML format. Expected EndFragment. rc = %Rrc\n", rc));
-                return rc;
+                LogRelFlowFunc(("Error: CF_HTML out of bounds - offStart=%#x offEnd=%#x cch=%#x\n", offStart, offEnd, cch));
+                rc = VERR_INVALID_PARAMETER;
             }
         }
         else
         {
-            LogRelFlowFunc(("Error: Unknown CF_HTML format. Expected EndFragment.\n"));
-            return VERR_NO_MEMORY;
+            LogRelFlowFunc(("Error: Unknown CF_HTML format. Expected EndFragment. rc = %Rrc.\n", rc));
+            rc = VERR_INVALID_PARAMETER;
         }
     }
+    else
+    {
+        LogRelFlowFunc(("Error: Unknown CF_HTML format. Expected StartFragment. rc = %Rrc.\n", rc));
+        rc = VERR_INVALID_PARAMETER;
+    }
 
-return VINF_SUCCESS;
+    return rc;
 }
 
 
 
-/*
-* Converts source Utf16 mime html clipboard data to Utf8 CF_HTML format
-* It allocates
-* Calculations:
-* Header length = format Length + (2*(10 - 5('%010d'))('digits')) - 2('%s') = format length + 8
-* EndHtml  = Header length + fragment length
-* StartHtml = 105(constant)
-* StartFragment = 141(constant) may vary if the header html content will be extended
-* EndFragment  = Header length + fragment length - 38(ending length)
-* @source: source buffer that contains utf-16 string in mime html format
-* @cb: size of source buffer in bytes
-* @output: allocated output buffer to put converted Utf8 CF_HTML clipboard data. This function allocates memory for this.
-* @pcch: size of allocated result buffer in bytes
-* @note: output buffer should be free using RTMemFree()
-* @note: Everything inside of fragment can be UTF8. Windows allows it. Everything in header should be Latin1.
-*/
-int ConvertMimeToCFHTML(const char *pcszSource, size_t cb, char **pcszOutput, size_t *pcCh)
+/**
+ * Converts source UTF-8 MIME HTML clipboard data to UTF-8 CF_HTML format.
+ *
+ * This is just encapsulation work, slapping a header on the data.
+ *
+ * It allocates
+ *
+ * Calculations:
+ *   Header length = format Length + (2*(10 - 5('%010d'))('digits')) - 2('%s') = format length + 8
+ *   EndHtml       = Header length + fragment length
+ *   StartHtml     = 105(constant)
+ *   StartFragment = 141(constant) may vary if the header html content will be extended
+ *   EndFragment   = Header length + fragment length - 38(ending length)
+ *
+ * @param   pszSource   Source buffer that contains utf-16 string in mime html format
+ * @param   cb          Size of source buffer in bytes
+ * @param   ppszOutput  Where to return the allocated output buffer to put converted UTF-8
+ *                      CF_HTML clipboard data.  This function allocates memory for this.
+ * @param   pcbOutput   Where to return the size of allocated result buffer in bytes/chars, including zero terminator
+ *
+ * @note    output buffer should be free using RTMemFree()
+ * @note    Everything inside of fragment can be UTF8. Windows allows it. Everything in header should be Latin1.
+ */
+static int ConvertMimeToCFHTML(const char *pszSource, size_t cb, char **ppszOutput, uint32_t *pcbOutput)
 {
-    Assert(pcszOutput);
-    Assert(pcCh);
-    Assert(pcszSource);
+    Assert(ppszOutput);
+    Assert(pcbOutput);
+    Assert(pszSource);
     Assert(cb);
 
-    size_t cFragmentLength = 0;
-
-    char* pszBuf = (char*)pcszSource;
-    
     /* construct CF_HTML formatted string */
-    char* pszResult = NULL;
-    int rc = RTStrNLenEx(pszBuf, RTSTR_MAX, &cFragmentLength);
+    char *pszResult = NULL;
+    size_t cchFragment;
+    int rc = RTStrNLenEx(pszSource, cb, &cchFragment);
     if (!RT_SUCCESS(rc))
     {
         LogRelFlowFunc(("Error: invalid source fragment. rc = %Rrc.\n"));
         return VERR_INVALID_PARAMETER;
     }
 
-    /* caluclate parameters of CF_HTML header */
-    size_t cHeaderLength = (sizeof(pcszFormatSample) - 1) + 8;
-    size_t cEndHtml = cHeaderLength + cFragmentLength;
-    size_t cEndFragment = cHeaderLength + cFragmentLength - 38;
-    pszResult = (char*)RTMemAlloc(cEndHtml + 1);
+    /*
+    @StartHtml - pos before <html>
+    @EndHtml - whole size of text excluding ending zero char
+    @StartFragment - pos after <!--StartFragment-->
+    @EndFragment - pos before <!--EndFragment-->
+    @note: all values includes CR\LF inserted into text
+    Calculations:
+    Header length = format Length + (3*6('digits')) - 2('%s') = format length + 16 (control value - 183)
+    EndHtml  = Header length + fragment length
+    StartHtml = 105(constant)
+    StartFragment = 143(constant)
+    EndFragment  = Header length + fragment length - 40(ending length)
+    */
+    static const char s_szFormatSample[] =
+    /*   0:   */ "Version:1.0\r\n"
+    /*  13:   */ "StartHTML:000000101\r\n"
+    /*  34:   */ "EndHTML:%0000009u\r\n" // END HTML = Header length + fragment length
+    /*  53:   */ "StartFragment:000000137\r\n"
+    /*  78:   */ "EndFragment:%0000009u\r\n"
+    /* 101:   */ "<html>\r\n"
+    /* 109:   */ "<body>\r\n"
+    /* 117:   */ "<!--StartFragment-->"
+    /* 137:   */ "%s"
+    /* 137+2: */ "<!--EndFragment-->\r\n"
+    /* 157+2: */ "</body>\r\n"
+    /* 166+2: */ "</html>\r\n";
+    /* 175+2: */
+    AssertCompile(sizeof(s_szFormatSample) == 175+2+1);
+
+    /* calculate parameters of CF_HTML header */
+    size_t cchHeader      = sizeof(s_szFormatSample) - 1;
+    size_t offEndHtml     = cchHeader + cchFragment;
+    size_t offEndFragment = cchHeader + cchFragment - 38; /* 175-137 = 38 */
+    pszResult = (char *)RTMemAlloc(offEndHtml + 1);
     if (pszResult == NULL)
     {
         LogRelFlowFunc(("Error: Cannot allocate memory for result buffer. rc = %Rrc.\n"));
@@ -1198,32 +1213,27 @@ int ConvertMimeToCFHTML(const char *pcszSource, size_t cb, char **pcszOutput, si
     }
 
     /* format result CF_HTML string */
-    rc = RTStrPrintf(pszResult, cEndHtml + 1, pcszFormatSample, cEndHtml, cEndFragment, pszBuf);
-    if (rc == -1)
-    {
-        LogRelFlowFunc(("Error: cannot construct CF_HTML. rc = %Rrc.\n"));
-        return VERR_CANT_CREATE;
-    }
-    Assert(cEndHtml == rc);
-
-#ifdef DEBUG
-    {
-        /*Control calculations. check consistency.*/
-        const char pcszStartFragment[] = "<!--StartFragment-->";
-        const char pcszEndFragment[] = "<!--EndFragment-->";
-
-        /* check 'StartFragment:' value */
-        const char* pcszRealStartFragment = RTStrStr(pszResult, pcszStartFragment);
-        Assert((pcszRealStartFragment + sizeof(pcszStartFragment) - 1) - pszResult == 137);//141);
-
-        /* check 'EndFragment:' value */
-        const char* pcszRealEndFragment = RTStrStr(pszResult, pcszEndFragment);
-        Assert((pcszRealEndFragment - pszResult) == cEndFragment);
-    }
+    size_t cchFormatted = RTStrPrintf(pszResult, offEndHtml + 1,
+                                      s_szFormatSample, offEndHtml, offEndFragment, pszSource);
+    Assert(offEndHtml == cchFormatted); NOREF(cchFormatted);
+
+#ifdef VBOX_STRICT
+    /* Control calculations. check consistency.*/
+    static const char s_szStartFragment[] = "<!--StartFragment-->";
+    static const char s_szEndFragment[] = "<!--EndFragment-->";
+
+    /* check 'StartFragment:' value */
+    const char *pszRealStartFragment = RTStrStr(pszResult, s_szStartFragment);
+    Assert(&pszRealStartFragment[sizeof(s_szStartFragment) - 1] - pszResult == 137);
+
+    /* check 'EndFragment:' value */
+    const char *pszRealEndFragment = RTStrStr(pszResult, s_szEndFragment);
+    Assert((size_t)(pszRealEndFragment - pszResult) == offEndFragment);
 #endif
 
-    *pcszOutput = pszResult;
-    *pcCh = rc+1;
+    *ppszOutput = pszResult;
+    *pcbOutput = (uint32_t)cchFormatted + 1;
+    Assert(*pcbOutput == cchFormatted + 1);
 
     return VINF_SUCCESS;
 }
diff --git a/src/VBox/HostServices/SharedClipboard/VBoxClipboard.h b/src/VBox/HostServices/SharedClipboard/VBoxClipboard.h
index df38bbe..8085d3d 100644
--- a/src/VBox/HostServices/SharedClipboard/VBoxClipboard.h
+++ b/src/VBox/HostServices/SharedClipboard/VBoxClipboard.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboard.rc b/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboard.rc
index c47862b..9c29b8b 100644
--- a/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboard.rc
+++ b/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboard.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.cpp b/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.cpp
index 1809cf2..a09cce9 100644
--- a/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.cpp
+++ b/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.cpp
@@ -6,7 +6,7 @@
 /*
  * Includes contributions from Fran�ois Revol
  *
- * Copyright (C) 2008-2012 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.h b/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.h
index 5e51c29..af93bbb 100644
--- a/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.h
+++ b/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2010 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedClipboard/darwin.cpp b/src/VBox/HostServices/SharedClipboard/darwin.cpp
index 46442a4..ce09c40 100644
--- a/src/VBox/HostServices/SharedClipboard/darwin.cpp
+++ b/src/VBox/HostServices/SharedClipboard/darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2011 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedClipboard/service.cpp b/src/VBox/HostServices/SharedClipboard/service.cpp
index 75152b9..8b8c3a9 100644
--- a/src/VBox/HostServices/SharedClipboard/service.cpp
+++ b/src/VBox/HostServices/SharedClipboard/service.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -748,6 +748,7 @@ static DECLCALLBACK(int) svcHostCall (void *,
     return rc;
 }
 
+#ifndef UNIT_TEST
 /**
  * SSM descriptor table for the VBOXCLIPBOARDCLIENTDATA structure.
  */
@@ -760,6 +761,7 @@ static SSMFIELD const g_aClipboardClientDataFields[] =
     SSMFIELD_ENTRY(VBOXCLIPBOARDCLIENTDATA, u32RequestedFormat),
     SSMFIELD_ENTRY_TERM()
 };
+#endif
 
 static DECLCALLBACK(int) svcSaveState(void *, uint32_t u32ClientID, void *pvClient, PSSMHANDLE pSSM)
 {
@@ -779,7 +781,10 @@ static DECLCALLBACK(int) svcSaveState(void *, uint32_t u32ClientID, void *pvClie
     SSMR3PutU32 (pSSM, UINT32_C (0x80000002));
     int rc = SSMR3PutStructEx (pSSM, pClient, sizeof(*pClient), 0 /*fFlags*/, &g_aClipboardClientDataFields[0], NULL);
     AssertRCReturn (rc, rc);
-#endif /* !UNIT_TEST */
+
+#else  /* UNIT_TEST */
+    RT_NOREF3(u32ClientID, pvClient, pSSM);
+#endif /* UNIT_TEST */
     return VINF_SUCCESS;
 }
 
@@ -848,7 +853,7 @@ static DECLCALLBACK(int) svcLoadState(void *, uint32_t u32ClientID, void *pvClie
         rc = SSMR3GetStructEx (pSSM, pClient, sizeof(*pClient), 0 /*fFlags*/, &g_aClipboardClientDataFields[0], NULL);
         AssertRCReturn (rc, rc);
     }
-    else if (lenOrVer == (SSMR3HandleHostBits (pSSM) == 64 ? 72 : 48))
+    else if (lenOrVer == (SSMR3HandleHostBits (pSSM) == 64 ? 72U : 48U))
     {
         /**
          * SSM descriptor table for the CLIPSAVEDSTATEDATA structure.
@@ -898,12 +903,15 @@ static DECLCALLBACK(int) svcLoadState(void *, uint32_t u32ClientID, void *pvClie
     /* Actual host data are to be reported to guest (SYNC). */
     vboxClipboardSync (pClient);
 
-#endif /* !UNIT_TEST */
+#else  /* UNIT_TEST*/
+    RT_NOREF3(u32ClientID, pvClient, pSSM);
+#endif /* UNIT_TEST */
     return VINF_SUCCESS;
 }
 
 static DECLCALLBACK(int) extCallback (uint32_t u32Function, uint32_t u32Format, void *pvData, uint32_t cbData)
 {
+    RT_NOREF2(pvData, cbData);
     if (g_pClient != NULL)
     {
         switch (u32Function)
diff --git a/src/VBox/HostServices/SharedClipboard/testcase/Makefile.kmk b/src/VBox/HostServices/SharedClipboard/testcase/Makefile.kmk
index d4b3e76..75cd54e 100644
--- a/src/VBox/HostServices/SharedClipboard/testcase/Makefile.kmk
+++ b/src/VBox/HostServices/SharedClipboard/testcase/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2011-2015 Oracle Corporation
+# Copyright (C) 2011-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedClipboard/testcase/tstClipboardServiceHost.cpp b/src/VBox/HostServices/SharedClipboard/testcase/tstClipboardServiceHost.cpp
index 50bfabb..8b79907 100644
--- a/src/VBox/HostServices/SharedClipboard/testcase/tstClipboardServiceHost.cpp
+++ b/src/VBox/HostServices/SharedClipboard/testcase/tstClipboardServiceHost.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedClipboard/x11-clipboard.cpp b/src/VBox/HostServices/SharedClipboard/x11-clipboard.cpp
index c370025..445bab5 100644
--- a/src/VBox/HostServices/SharedClipboard/x11-clipboard.cpp
+++ b/src/VBox/HostServices/SharedClipboard/x11-clipboard.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -453,6 +453,7 @@ struct _CLIPBACKEND
 
 void vboxSvcClipboardReportMsg (VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Msg, uint32_t u32Formats)
 {
+    RT_NOREF1(u32Formats);
     CLIPBACKEND *pBackend = pClient->pCtx->pBackend;
     if (   (u32Msg == VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA)
         && !pBackend->writeData.timeout)
@@ -472,6 +473,7 @@ void vboxSvcClipboardCompleteReadData(VBOXCLIPBOARDCLIENTDATA *pClient, int rc,
 
 CLIPBACKEND *ClipConstructX11(VBOXCLIPBOARDCONTEXT *pFrontend, bool)
 {
+    RT_NOREF1(pFrontend);
     return (CLIPBACKEND *)RTMemAllocZ(sizeof(CLIPBACKEND));
 }
 
@@ -482,11 +484,13 @@ void ClipDestructX11(CLIPBACKEND *pBackend)
 
 int ClipStartX11(CLIPBACKEND *pBackend, bool)
 {
+    RT_NOREF1(pBackend);
     return VINF_SUCCESS;
 }
 
 int ClipStopX11(CLIPBACKEND *pBackend)
 {
+    RT_NOREF1(pBackend);
     return VINF_SUCCESS;
 }
 
diff --git a/src/VBox/HostServices/SharedClipboard/x11-stub.cpp b/src/VBox/HostServices/SharedClipboard/x11-stub.cpp
index bb92809..445161c 100644
--- a/src/VBox/HostServices/SharedClipboard/x11-stub.cpp
+++ b/src/VBox/HostServices/SharedClipboard/x11-stub.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedFolders/VBoxSharedFolders.rc b/src/VBox/HostServices/SharedFolders/VBoxSharedFolders.rc
index 2cccf78..1072150 100644
--- a/src/VBox/HostServices/SharedFolders/VBoxSharedFolders.rc
+++ b/src/VBox/HostServices/SharedFolders/VBoxSharedFolders.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedFolders/mappings.cpp b/src/VBox/HostServices/SharedFolders/mappings.cpp
index 07a43af..4b666ba 100644
--- a/src/VBox/HostServices/SharedFolders/mappings.cpp
+++ b/src/VBox/HostServices/SharedFolders/mappings.cpp
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -251,6 +251,7 @@ int vbsfMappingsAdd(const char *pszFolderName, PSHFLSTRING pMapName,
 
             /* Check if the host file system is case sensitive */
             RTFSPROPERTIES prop;
+            prop.fCaseSensitive = false; /* Shut up MSC. */
             char *pszAsciiRoot;
 
             int rc = RTStrUtf8ToCurrentCP(&pszAsciiRoot, FolderMapping[i].pszFolderName);
@@ -485,6 +486,7 @@ int vbsfMappingsQueryName(PSHFLCLIENTDATA pClient, SHFLROOT root, SHFLSTRING *pS
  */
 int vbsfMappingsQueryWritable(PSHFLCLIENTDATA pClient, SHFLROOT root, bool *fWritable)
 {
+    RT_NOREF1(pClient);
     int rc = VINF_SUCCESS;
 
     LogFlow(("vbsfMappingsQueryWritable: pClient = %p, root = %d\n", pClient, root));
@@ -505,6 +507,7 @@ int vbsfMappingsQueryWritable(PSHFLCLIENTDATA pClient, SHFLROOT root, bool *fWri
 
 int vbsfMappingsQueryAutoMount(PSHFLCLIENTDATA pClient, SHFLROOT root, bool *fAutoMount)
 {
+    RT_NOREF1(pClient);
     int rc = VINF_SUCCESS;
 
     LogFlow(("vbsfMappingsQueryAutoMount: pClient = %p, root = %d\n", pClient, root));
@@ -524,6 +527,7 @@ int vbsfMappingsQueryAutoMount(PSHFLCLIENTDATA pClient, SHFLROOT root, bool *fAu
 
 int vbsfMappingsQuerySymlinksCreate(PSHFLCLIENTDATA pClient, SHFLROOT root, bool *fSymlinksCreate)
 {
+    RT_NOREF1(pClient);
     int rc = VINF_SUCCESS;
 
     LogFlow(("vbsfMappingsQueryAutoMount: pClient = %p, root = %d\n", pClient, root));
@@ -635,6 +639,7 @@ void testUnmapFolder(RTTEST hTest)
 #endif
 int vbsfUnmapFolder(PSHFLCLIENTDATA pClient, SHFLROOT root)
 {
+    RT_NOREF1(pClient);
     int rc = VINF_SUCCESS;
 
     MAPPING *pFolderMapping = vbsfMappingGetByRoot(root);
diff --git a/src/VBox/HostServices/SharedFolders/mappings.h b/src/VBox/HostServices/SharedFolders/mappings.h
index b749eb8..f51724f 100644
--- a/src/VBox/HostServices/SharedFolders/mappings.h
+++ b/src/VBox/HostServices/SharedFolders/mappings.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedFolders/service.cpp b/src/VBox/HostServices/SharedFolders/service.cpp
index 88f8e64..b9e7a4f 100644
--- a/src/VBox/HostServices/SharedFolders/service.cpp
+++ b/src/VBox/HostServices/SharedFolders/service.cpp
@@ -1,9 +1,10 @@
+/* $Id: service.cpp $ */
 /** @file
- * Shared Folders: Host service entry points.
+ * Shared Folders - Host service entry points.
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -31,7 +32,7 @@
 #define SHFL_SSM_VERSION                    3
 
 
-/* Shared Folders Host Service.
+/** @page pg_shfl_svc   Shared Folders Host Service
  *
  * Shared Folders map a host file system to guest logical filesystem.
  * A mapping represents 'host name'<->'guest name' translation and a root
@@ -83,11 +84,9 @@ static DECLCALLBACK(int) svcUnload (void *)
 
 static DECLCALLBACK(int) svcConnect (void *, uint32_t u32ClientID, void *pvClient)
 {
+    RT_NOREF2(u32ClientID, pvClient);
     int rc = VINF_SUCCESS;
 
-    NOREF(u32ClientID);
-    NOREF(pvClient);
-
     Log(("SharedFolders host service: connected, u32ClientID = %u\n", u32ClientID));
 
     return rc;
@@ -95,6 +94,7 @@ static DECLCALLBACK(int) svcConnect (void *, uint32_t u32ClientID, void *pvClien
 
 static DECLCALLBACK(int) svcDisconnect (void *, uint32_t u32ClientID, void *pvClient)
 {
+    RT_NOREF1(u32ClientID);
     int rc = VINF_SUCCESS;
     SHFLCLIENTDATA *pClient = (SHFLCLIENTDATA *)pvClient;
 
@@ -113,6 +113,7 @@ static DECLCALLBACK(int) svcDisconnect (void *, uint32_t u32ClientID, void *pvCl
 static DECLCALLBACK(int) svcSaveState(void *, uint32_t u32ClientID, void *pvClient, PSSMHANDLE pSSM)
 {
 #ifndef UNITTEST  /* Read this as not yet tested */
+    RT_NOREF1(u32ClientID);
     SHFLCLIENTDATA *pClient = (SHFLCLIENTDATA *)pvClient;
 
     Log(("SharedFolders host service: saving state, u32ClientID = %u\n", u32ClientID));
@@ -168,6 +169,8 @@ static DECLCALLBACK(int) svcSaveState(void *, uint32_t u32ClientID, void *pvClie
         }
     }
 
+#else
+    RT_NOREF3(u32ClientID, pvClient, pSSM);
 #endif
     return VINF_SUCCESS;
 }
@@ -175,6 +178,7 @@ static DECLCALLBACK(int) svcSaveState(void *, uint32_t u32ClientID, void *pvClie
 static DECLCALLBACK(int) svcLoadState(void *, uint32_t u32ClientID, void *pvClient, PSSMHANDLE pSSM)
 {
 #ifndef UNITTEST  /* Read this as not yet tested */
+    RT_NOREF1(u32ClientID);
     uint32_t        nrMappings;
     SHFLCLIENTDATA *pClient = (SHFLCLIENTDATA *)pvClient;
     uint32_t        len, version;
@@ -285,12 +289,15 @@ static DECLCALLBACK(int) svcLoadState(void *, uint32_t u32ClientID, void *pvClie
         }
     }
     Log(("SharedFolders host service: successfully loaded state\n"));
+#else
+    RT_NOREF3(u32ClientID, pvClient, pSSM);
 #endif
     return VINF_SUCCESS;
 }
 
 static DECLCALLBACK(void) svcCall (void *, VBOXHGCMCALLHANDLE callHandle, uint32_t u32ClientID, void *pvClient, uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM paParms[])
 {
+    RT_NOREF1(u32ClientID);
     int rc = VINF_SUCCESS;
 
     Log(("SharedFolders host service: svcCall: u32ClientID = %u, fn = %u, cParms = %u, pparms = %p\n", u32ClientID, u32Function, cParms, paParms));
@@ -299,10 +306,8 @@ static DECLCALLBACK(void) svcCall (void *, VBOXHGCMCALLHANDLE callHandle, uint32
 
     bool fAsynchronousProcessing = false;
 
-#ifdef DEBUG
-    uint32_t i;
-
-    for (i = 0; i < cParms; i++)
+#ifdef LOG_ENABLED
+    for (uint32_t i = 0; i < cParms; i++)
     {
         /** @todo parameters other than 32 bit */
         Log(("    pparms[%d]: type %u, value %u\n", i, paParms[i].type, paParms[i].u.uint32));
@@ -681,7 +686,7 @@ static DECLCALLBACK(void) svcCall (void *, VBOXHGCMCALLHANDLE callHandle, uint32
                 }
                 else if (flags & SHFL_LOCK_WAIT)
                 {
-                    /* @todo This should be properly implemented by the shared folders service.
+                    /** @todo This should be properly implemented by the shared folders service.
                      *       The service thread must never block. If an operation requires
                      *       blocking, it must be processed by another thread and when it is
                      *       completed, the another thread must call
diff --git a/src/VBox/HostServices/SharedFolders/shfl.h b/src/VBox/HostServices/SharedFolders/shfl.h
index 500c24f..15f64cc 100644
--- a/src/VBox/HostServices/SharedFolders/shfl.h
+++ b/src/VBox/HostServices/SharedFolders/shfl.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedFolders/shflhandle.cpp b/src/VBox/HostServices/SharedFolders/shflhandle.cpp
index 1a5f71b..26e580b 100644
--- a/src/VBox/HostServices/SharedFolders/shflhandle.cpp
+++ b/src/VBox/HostServices/SharedFolders/shflhandle.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedFolders/shflhandle.h b/src/VBox/HostServices/SharedFolders/shflhandle.h
index 59638b9..8a0ea63 100644
--- a/src/VBox/HostServices/SharedFolders/shflhandle.h
+++ b/src/VBox/HostServices/SharedFolders/shflhandle.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedFolders/testcase/Makefile.kmk b/src/VBox/HostServices/SharedFolders/testcase/Makefile.kmk
index 0a02a37..0901a7b 100644
--- a/src/VBox/HostServices/SharedFolders/testcase/Makefile.kmk
+++ b/src/VBox/HostServices/SharedFolders/testcase/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedFolders/testcase/tstSharedFolderService.cpp b/src/VBox/HostServices/SharedFolders/testcase/tstSharedFolderService.cpp
index 7e4a397..4c8244b 100644
--- a/src/VBox/HostServices/SharedFolders/testcase/tstSharedFolderService.cpp
+++ b/src/VBox/HostServices/SharedFolders/testcase/tstSharedFolderService.cpp
@@ -10,7 +10,7 @@
  */
 
 /*
- * Copyright (C) 2011-2013 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -115,20 +115,21 @@ static void bufferFromPath(void *pvDest, size_t cb, const char *pcszSrc)
 *   Stub functions and data                                                                                                      *
 *********************************************************************************************************************************/
 
-static PRTDIR testRTDirClosepDir;
+static PRTDIR g_testRTDirClosepDir;
 
 extern int testRTDirClose(PRTDIR pDir)
 {
  /* RTPrintf("%s: pDir=%p\n", __PRETTY_FUNCTION__, pDir); */
-    testRTDirClosepDir = pDir;
+    g_testRTDirClosepDir = pDir;
     return VINF_SUCCESS;
 }
 
 static char testRTDirCreatePath[256];
-static RTFMODE testRTDirCreateMode;
+//static RTFMODE testRTDirCreateMode; - unused
 
 extern int testRTDirCreate(const char *pszPath, RTFMODE fMode, uint32_t fCreate)
 {
+    RT_NOREF2(fMode, fCreate);
  /* RTPrintf("%s: pszPath=%s, fMode=0x%llx\n", __PRETTY_FUNCTION__, pszPath,
              LLUIFY(fMode)); */
     ARRAY_FROM_PATH(testRTDirCreatePath, pszPath);
@@ -157,44 +158,47 @@ extern int testRTDirOpenFiltered(PRTDIR *ppDir, const char *pszPath, RTDIRFILTER
     return VINF_SUCCESS;
 }
 
-static PRTDIR testRTDirQueryInfoDir;
+static PRTDIR g_testRTDirQueryInfoDir;
 static RTTIMESPEC testRTDirQueryInfoATime;
 
-extern int testRTDirQueryInfo(PRTDIR pDir, PRTFSOBJINFO pObjInfo,
-                               RTFSOBJATTRADD enmAdditionalAttribs)
+extern int testRTDirQueryInfo(PRTDIR pDir, PRTFSOBJINFO pObjInfo, RTFSOBJATTRADD enmAdditionalAttribs)
 {
+    RT_NOREF1(enmAdditionalAttribs);
  /* RTPrintf("%s: pDir=%p, enmAdditionalAttribs=0x%llx\n", __PRETTY_FUNCTION__,
              pDir, LLUIFY(enmAdditionalAttribs)); */
-    testRTDirQueryInfoDir = pDir;
+    g_testRTDirQueryInfoDir = pDir;
     RT_ZERO(*pObjInfo);
     pObjInfo->AccessTime = testRTDirQueryInfoATime;
     RT_ZERO(testRTDirQueryInfoATime);
     return VINF_SUCCESS;
 }
 
-extern int testRTDirRemove(const char *pszPath) { RTPrintf("%s\n", __PRETTY_FUNCTION__); return 0; }
+extern int testRTDirRemove(const char *pszPath)
+{
+    RT_NOREF1(pszPath);
+    RTPrintf("%s\n", __PRETTY_FUNCTION__);
+    return 0;
+}
 
-static PRTDIR testRTDirReadExDir;
+static PRTDIR g_testRTDirReadExDir;
 
-extern int testRTDirReadEx(PRTDIR pDir, PRTDIRENTRYEX pDirEntry,
-                            size_t *pcbDirEntry,
-                            RTFSOBJATTRADD enmAdditionalAttribs,
-                            uint32_t fFlags)
+extern int testRTDirReadEx(PRTDIR pDir, PRTDIRENTRYEX pDirEntry, size_t *pcbDirEntry,
+                           RTFSOBJATTRADD enmAdditionalAttribs, uint32_t fFlags)
 {
+    RT_NOREF4(pDirEntry, pcbDirEntry, enmAdditionalAttribs, fFlags);
  /* RTPrintf("%s: pDir=%p, pcbDirEntry=%d, enmAdditionalAttribs=%llu, fFlags=0x%llx\n",
              __PRETTY_FUNCTION__, pDir, pcbDirEntry ? (int) *pcbDirEntry : -1,
              LLUIFY(enmAdditionalAttribs), LLUIFY(fFlags)); */
-    testRTDirReadExDir = pDir;
+    g_testRTDirReadExDir = pDir;
     return VERR_NO_MORE_FILES;
 }
 
 static RTTIMESPEC testRTDirSetTimesATime;
 
-extern int testRTDirSetTimes(PRTDIR pDir, PCRTTIMESPEC pAccessTime,
-                                PCRTTIMESPEC pModificationTime,
-                                PCRTTIMESPEC pChangeTime,
-                                PCRTTIMESPEC pBirthTime)
+extern int testRTDirSetTimes(PRTDIR pDir, PCRTTIMESPEC pAccessTime, PCRTTIMESPEC pModificationTime,
+                             PCRTTIMESPEC pChangeTime, PCRTTIMESPEC pBirthTime)
 {
+    RT_NOREF4(pDir, pModificationTime, pChangeTime, pBirthTime);
  /* RTPrintf("%s: pDir=%p, *pAccessTime=%lli, *pModificationTime=%lli, *pChangeTime=%lli, *pBirthTime=%lli\n",
              __PRETTY_FUNCTION__, pDir,
              pAccessTime ? (long long)RTTimeSpecGetNano(pAccessTime) : -1,
@@ -209,38 +213,42 @@ extern int testRTDirSetTimes(PRTDIR pDir, PCRTTIMESPEC pAccessTime,
     return VINF_SUCCESS;
 }
 
-static RTFILE testRTFileCloseFile;
+static RTFILE g_testRTFileCloseFile;
 
 extern int  testRTFileClose(RTFILE File)
 {
  /* RTPrintf("%s: File=%p\n", __PRETTY_FUNCTION__, File); */
-    testRTFileCloseFile = File;
+    g_testRTFileCloseFile = File;
     return 0;
 }
 
-extern int  testRTFileDelete(const char *pszFilename) { RTPrintf("%s\n", __PRETTY_FUNCTION__); return 0; }
+extern int  testRTFileDelete(const char *pszFilename)
+{
+    RT_NOREF1(pszFilename);
+    RTPrintf("%s\n", __PRETTY_FUNCTION__);
+    return 0;
+}
 
-static RTFILE testRTFileFlushFile;
+static RTFILE g_testRTFileFlushFile;
 
 extern int  testRTFileFlush(RTFILE File)
 {
  /* RTPrintf("%s: File=%p\n", __PRETTY_FUNCTION__, File); */
-    testRTFileFlushFile = File;
+    g_testRTFileFlushFile = File;
     return VINF_SUCCESS;
 }
 
-static RTFILE testRTFileLockFile;
+static RTFILE g_testRTFileLockFile;
 static unsigned testRTFileLockfLock;
 static int64_t testRTFileLockOffset;
 static uint64_t testRTFileLockSize;
 
-extern int  testRTFileLock(RTFILE hFile, unsigned fLock, int64_t offLock,
-                            uint64_t cbLock)
+extern int  testRTFileLock(RTFILE hFile, unsigned fLock, int64_t offLock, uint64_t cbLock)
 {
  /* RTPrintf("%s: hFile=%p, fLock=%u, offLock=%lli, cbLock=%llu\n",
              __PRETTY_FUNCTION__, hFile, fLock, (long long) offLock,
              LLUIFY(cbLock)); */
-    testRTFileLockFile = hFile;
+    g_testRTFileLockFile = hFile;
     testRTFileLockfLock = fLock;
     testRTFileLockOffset = offLock;
     testRTFileLockSize = cbLock;
@@ -251,8 +259,7 @@ static char testRTFileOpenName[256];
 static uint64_t testRTFileOpenFlags;
 static RTFILE testRTFileOpenpFile;
 
-extern int  testRTFileOpen(PRTFILE pFile, const char *pszFilename,
-                            uint64_t fOpen)
+extern int  testRTFileOpen(PRTFILE pFile, const char *pszFilename, uint64_t fOpen)
 {
  /* RTPrintf("%s, pszFilename=%s, fOpen=0x%llx\n", __PRETTY_FUNCTION__,
              pszFilename, LLUIFY(fOpen)); */
@@ -263,15 +270,16 @@ extern int  testRTFileOpen(PRTFILE pFile, const char *pszFilename,
     return VINF_SUCCESS;
 }
 
-static RTFILE testRTFileQueryInfoFile;
+static RTFILE g_testRTFileQueryInfoFile;
 static RTTIMESPEC testRTFileQueryInfoATime;
 static uint32_t testRTFileQueryInfoFMode;
 
 extern int  testRTFileQueryInfo(RTFILE hFile, PRTFSOBJINFO pObjInfo, RTFSOBJATTRADD enmAdditionalAttribs)
 {
+    RT_NOREF1(enmAdditionalAttribs);
  /* RTPrintf("%s, hFile=%p, enmAdditionalAttribs=0x%llx\n",
              __PRETTY_FUNCTION__, hFile, LLUIFY(enmAdditionalAttribs)); */
-    testRTFileQueryInfoFile = hFile;
+    g_testRTFileQueryInfoFile = hFile;
     RT_ZERO(*pObjInfo);
     pObjInfo->AccessTime = testRTFileQueryInfoATime;
     RT_ZERO(testRTDirQueryInfoATime);
@@ -282,9 +290,9 @@ extern int  testRTFileQueryInfo(RTFILE hFile, PRTFSOBJINFO pObjInfo, RTFSOBJATTR
 
 static const char *testRTFileReadData;
 
-extern int  testRTFileRead(RTFILE File, void *pvBuf, size_t cbToRead,
-                            size_t *pcbRead)
+extern int  testRTFileRead(RTFILE File, void *pvBuf, size_t cbToRead, size_t *pcbRead)
 {
+    RT_NOREF1(File);
  /* RTPrintf("%s : File=%p, cbToRead=%llu\n", __PRETTY_FUNCTION__, File,
              LLUIFY(cbToRead)); */
     bufferFromPath(pvBuf, cbToRead, testRTFileReadData);
@@ -294,9 +302,9 @@ extern int  testRTFileRead(RTFILE File, void *pvBuf, size_t cbToRead,
     return VINF_SUCCESS;
 }
 
-extern int testRTFileSeek(RTFILE hFile, int64_t offSeek, unsigned uMethod,
-                           uint64_t *poffActual)
+extern int testRTFileSeek(RTFILE hFile, int64_t offSeek, unsigned uMethod, uint64_t *poffActual)
 {
+    RT_NOREF3(hFile, offSeek, uMethod);
  /* RTPrintf("%s : hFile=%p, offSeek=%llu, uMethod=%u\n", __PRETTY_FUNCTION__,
              hFile, LLUIFY(offSeek), uMethod); */
     if (poffActual)
@@ -308,30 +316,30 @@ static uint64_t testRTFileSetFMode;
 
 extern int testRTFileSetMode(RTFILE File, RTFMODE fMode)
 {
+    RT_NOREF1(File);
  /* RTPrintf("%s: fMode=%llu\n", __PRETTY_FUNCTION__, LLUIFY(fMode)); */
     testRTFileSetFMode = fMode;
     return VINF_SUCCESS;
 }
 
-static RTFILE testRTFileSetSizeFile;
+static RTFILE g_testRTFileSetSizeFile;
 static RTFOFF testRTFileSetSizeSize;
 
 extern int  testRTFileSetSize(RTFILE File, uint64_t cbSize)
 {
  /* RTPrintf("%s: File=%llu, cbSize=%llu\n", __PRETTY_FUNCTION__, LLUIFY(File),
              LLUIFY(cbSize)); */
-    testRTFileSetSizeFile = File;
+    g_testRTFileSetSizeFile = File;
     testRTFileSetSizeSize = (RTFOFF) cbSize; /* Why was this signed before? */
     return VINF_SUCCESS;
 }
 
 static RTTIMESPEC testRTFileSetTimesATime;
 
-extern int testRTFileSetTimes(RTFILE File, PCRTTIMESPEC pAccessTime,
-                               PCRTTIMESPEC pModificationTime,
-                               PCRTTIMESPEC pChangeTime,
-                               PCRTTIMESPEC pBirthTime)
+extern int testRTFileSetTimes(RTFILE File, PCRTTIMESPEC pAccessTime, PCRTTIMESPEC pModificationTime,
+                              PCRTTIMESPEC pChangeTime, PCRTTIMESPEC pBirthTime)
 {
+    RT_NOREF4(File, pModificationTime, pChangeTime, pBirthTime);
  /* RTPrintf("%s: pFile=%p, *pAccessTime=%lli, *pModificationTime=%lli, *pChangeTime=%lli, *pBirthTime=%lli\n",
              __PRETTY_FUNCTION__,
              pAccessTime ? (long long)RTTimeSpecGetNano(pAccessTime) : -1,
@@ -346,7 +354,7 @@ extern int testRTFileSetTimes(RTFILE File, PCRTTIMESPEC pAccessTime,
     return VINF_SUCCESS;
 }
 
-static RTFILE testRTFileUnlockFile;
+static RTFILE g_testRTFileUnlockFile;
 static int64_t testRTFileUnlockOffset;
 static uint64_t testRTFileUnlockSize;
 
@@ -354,7 +362,7 @@ extern int  testRTFileUnlock(RTFILE File, int64_t offLock, uint64_t cbLock)
 {
  /* RTPrintf("%s: hFile=%p, ofLock=%lli, cbLock=%llu\n", __PRETTY_FUNCTION__,
              File, (long long) offLock, LLUIFY(cbLock)); */
-    testRTFileUnlockFile = File;
+    g_testRTFileUnlockFile = File;
     testRTFileUnlockOffset = offLock;
     testRTFileUnlockSize = cbLock;
     return VINF_SUCCESS;
@@ -362,9 +370,9 @@ extern int  testRTFileUnlock(RTFILE File, int64_t offLock, uint64_t cbLock)
 
 static char testRTFileWriteData[256];
 
-extern int  testRTFileWrite(RTFILE File, const void *pvBuf, size_t cbToWrite,
-                             size_t *pcbWritten)
+extern int  testRTFileWrite(RTFILE File, const void *pvBuf, size_t cbToWrite, size_t *pcbWritten)
 {
+    RT_NOREF2(File, cbToWrite);
  /* RTPrintf("%s: File=%p, pvBuf=%.*s, cbToWrite=%llu\n", __PRETTY_FUNCTION__,
              File, cbToWrite, (const char *)pvBuf, LLUIFY(cbToWrite)); */
     ARRAY_FROM_PATH(testRTFileWriteData, (const char *)pvBuf);
@@ -373,9 +381,9 @@ extern int  testRTFileWrite(RTFILE File, const void *pvBuf, size_t cbToWrite,
     return VINF_SUCCESS;
 }
 
-extern int testRTFsQueryProperties(const char *pszFsPath,
-                                      PRTFSPROPERTIES pProperties)
+extern int testRTFsQueryProperties(const char *pszFsPath, PRTFSPROPERTIES pProperties)
 {
+    RT_NOREF1(pszFsPath);
  /* RTPrintf("%s, pszFsPath=%s\n", __PRETTY_FUNCTION__, pszFsPath);
     RT_ZERO(*pProperties); */
     pProperties->cbMaxComponent = 256;
@@ -384,16 +392,21 @@ extern int testRTFsQueryProperties(const char *pszFsPath,
 }
 
 extern int testRTFsQuerySerial(const char *pszFsPath, uint32_t *pu32Serial)
-{ RTPrintf("%s\n", __PRETTY_FUNCTION__); return 0; }
-extern int testRTFsQuerySizes(const char *pszFsPath, PRTFOFF pcbTotal,
-                                 RTFOFF *pcbFree, uint32_t *pcbBlock,
-                                 uint32_t *pcbSector) { RTPrintf("%s\n", __PRETTY_FUNCTION__); return 0; }
-
-extern int testRTPathQueryInfoEx(const char *pszPath,
-                                    PRTFSOBJINFO pObjInfo,
-                                    RTFSOBJATTRADD enmAdditionalAttribs,
-                                    uint32_t fFlags)
 {
+    RT_NOREF2(pszFsPath, pu32Serial);
+    RTPrintf("%s\n", __PRETTY_FUNCTION__);
+    return 0;
+}
+extern int testRTFsQuerySizes(const char *pszFsPath, PRTFOFF pcbTotal, RTFOFF *pcbFree, uint32_t *pcbBlock, uint32_t *pcbSector)
+{
+    RT_NOREF5(pszFsPath, pcbTotal, pcbFree, pcbBlock, pcbSector);
+    RTPrintf("%s\n", __PRETTY_FUNCTION__);
+    return 0;
+}
+
+extern int testRTPathQueryInfoEx(const char *pszPath, PRTFSOBJINFO pObjInfo, RTFSOBJATTRADD enmAdditionalAttribs, uint32_t fFlags)
+{
+    RT_NOREF3(pszPath, enmAdditionalAttribs, fFlags);
  /* RTPrintf("%s: pszPath=%s, enmAdditionalAttribs=0x%x, fFlags=0x%x\n",
              __PRETTY_FUNCTION__, pszPath, (unsigned) enmAdditionalAttribs,
              (unsigned) fFlags); */
@@ -402,10 +415,18 @@ extern int testRTPathQueryInfoEx(const char *pszPath,
 }
 
 extern int testRTSymlinkDelete(const char *pszSymlink, uint32_t fDelete)
-{ RTPrintf("%s\n", __PRETTY_FUNCTION__); return 0; }
-extern int testRTSymlinkRead(const char *pszSymlink, char *pszTarget,
-                              size_t cbTarget, uint32_t fRead)
-{ RTPrintf("%s\n", __PRETTY_FUNCTION__); return 0; }
+{
+    RT_NOREF2(pszSymlink, fDelete);
+    RTPrintf("%s\n", __PRETTY_FUNCTION__);
+    return 0;
+}
+
+extern int testRTSymlinkRead(const char *pszSymlink, char *pszTarget, size_t cbTarget, uint32_t fRead)
+{
+    RT_NOREF4(pszSymlink, pszTarget, cbTarget, fRead);
+    RTPrintf("%s\n", __PRETTY_FUNCTION__);
+    return 0;
+}
 
 
 /*********************************************************************************************************************************
@@ -413,71 +434,71 @@ extern int testRTSymlinkRead(const char *pszSymlink, char *pszTarget,
 *********************************************************************************************************************************/
 
 /* Sub-tests for testMappingsQuery(). */
-void testMappingsQuerySimple(RTTEST hTest) {}
-void testMappingsQueryTooFewBuffers(RTTEST hTest) {}
-void testMappingsQueryAutoMount(RTTEST hTest) {}
-void testMappingsQueryArrayWrongSize(RTTEST hTest) {}
+void testMappingsQuerySimple(RTTEST hTest) { RT_NOREF1(hTest); }
+void testMappingsQueryTooFewBuffers(RTTEST hTest) { RT_NOREF1(hTest); }
+void testMappingsQueryAutoMount(RTTEST hTest) { RT_NOREF1(hTest); }
+void testMappingsQueryArrayWrongSize(RTTEST hTest) { RT_NOREF1(hTest); }
 
 /* Sub-tests for testMappingsQueryName(). */
-void testMappingsQueryNameValid(RTTEST hTest) {}
-void testMappingsQueryNameInvalid(RTTEST hTest) {}
-void testMappingsQueryNameBadBuffer(RTTEST hTest) {}
+void testMappingsQueryNameValid(RTTEST hTest) { RT_NOREF1(hTest); }
+void testMappingsQueryNameInvalid(RTTEST hTest) { RT_NOREF1(hTest); }
+void testMappingsQueryNameBadBuffer(RTTEST hTest) { RT_NOREF1(hTest); }
 
 /* Sub-tests for testMapFolder(). */
-void testMapFolderValid(RTTEST hTest) {}
-void testMapFolderInvalid(RTTEST hTest) {}
-void testMapFolderTwice(RTTEST hTest) {}
-void testMapFolderDelimiter(RTTEST hTest) {}
-void testMapFolderCaseSensitive(RTTEST hTest) {}
-void testMapFolderCaseInsensitive(RTTEST hTest) {}
-void testMapFolderBadParameters(RTTEST hTest) {}
+void testMapFolderValid(RTTEST hTest) { RT_NOREF1(hTest); }
+void testMapFolderInvalid(RTTEST hTest) { RT_NOREF1(hTest); }
+void testMapFolderTwice(RTTEST hTest) { RT_NOREF1(hTest); }
+void testMapFolderDelimiter(RTTEST hTest) { RT_NOREF1(hTest); }
+void testMapFolderCaseSensitive(RTTEST hTest) { RT_NOREF1(hTest); }
+void testMapFolderCaseInsensitive(RTTEST hTest) { RT_NOREF1(hTest); }
+void testMapFolderBadParameters(RTTEST hTest) { RT_NOREF1(hTest); }
 
 /* Sub-tests for testUnmapFolder(). */
-void testUnmapFolderValid(RTTEST hTest) {}
-void testUnmapFolderInvalid(RTTEST hTest) {}
-void testUnmapFolderBadParameters(RTTEST hTest) {}
+void testUnmapFolderValid(RTTEST hTest) { RT_NOREF1(hTest); }
+void testUnmapFolderInvalid(RTTEST hTest) { RT_NOREF1(hTest); }
+void testUnmapFolderBadParameters(RTTEST hTest) { RT_NOREF1(hTest); }
 
 /* Sub-tests for testCreate(). */
-void testCreateBadParameters(RTTEST hTest) {}
+void testCreateBadParameters(RTTEST hTest) { RT_NOREF1(hTest); }
 
 /* Sub-tests for testClose(). */
-void testCloseBadParameters(RTTEST hTest) {}
+void testCloseBadParameters(RTTEST hTest) { RT_NOREF1(hTest); }
 
 /* Sub-tests for testRead(). */
-void testReadBadParameters(RTTEST hTest) {}
+void testReadBadParameters(RTTEST hTest) { RT_NOREF1(hTest); }
 
 /* Sub-tests for testWrite(). */
-void testWriteBadParameters(RTTEST hTest) {}
+void testWriteBadParameters(RTTEST hTest) { RT_NOREF1(hTest); }
 
 /* Sub-tests for testLock(). */
-void testLockBadParameters(RTTEST hTest) {}
+void testLockBadParameters(RTTEST hTest) { RT_NOREF1(hTest); }
 
 /* Sub-tests for testFlush(). */
-void testFlushBadParameters(RTTEST hTest) {}
+void testFlushBadParameters(RTTEST hTest) { RT_NOREF1(hTest); }
 
 /* Sub-tests for testDirList(). */
-void testDirListBadParameters(RTTEST hTest) {}
+void testDirListBadParameters(RTTEST hTest) { RT_NOREF1(hTest); }
 
 /* Sub-tests for testReadLink(). */
-void testReadLinkBadParameters(RTTEST hTest) {}
+void testReadLinkBadParameters(RTTEST hTest) { RT_NOREF1(hTest); }
 
 /* Sub-tests for testFSInfo(). */
-void testFSInfoBadParameters(RTTEST hTest) {}
+void testFSInfoBadParameters(RTTEST hTest) { RT_NOREF1(hTest); }
 
 /* Sub-tests for testRemove(). */
-void testRemoveBadParameters(RTTEST hTest) {}
+void testRemoveBadParameters(RTTEST hTest) { RT_NOREF1(hTest); }
 
 /* Sub-tests for testRename(). */
-void testRenameBadParameters(RTTEST hTest) {}
+void testRenameBadParameters(RTTEST hTest) { RT_NOREF1(hTest); }
 
 /* Sub-tests for testSymlink(). */
-void testSymlinkBadParameters(RTTEST hTest) {}
+void testSymlinkBadParameters(RTTEST hTest) { RT_NOREF1(hTest); }
 
 /* Sub-tests for testMappingsAdd(). */
-void testMappingsAddBadParameters(RTTEST hTest) {}
+void testMappingsAddBadParameters(RTTEST hTest) { RT_NOREF1(hTest); }
 
 /* Sub-tests for testMappingsRemove(). */
-void testMappingsRemoveBadParameters(RTTEST hTest) {}
+void testMappingsRemoveBadParameters(RTTEST hTest) { RT_NOREF1(hTest); }
 
 struct TESTSHFLSTRING
 {
@@ -541,6 +562,7 @@ static SHFLROOT initWithWritableMapping(RTTEST hTest,
 static void unmapAndRemoveMapping(RTTEST hTest, VBOXHGCMSVCFNTABLE *psvcTable,
                                   SHFLROOT root, const char *pcszFolderName)
 {
+    RT_NOREF1(hTest);
     VBOXHGCMSVCPARM aParms[RT_MAX(SHFL_CPARMS_UNMAP_FOLDER,
                                   SHFL_CPARMS_REMOVE_MAPPING)];
     VBOXHGCMCALLHANDLE_TYPEDEF callHandle = { VINF_SUCCESS };
@@ -736,8 +758,8 @@ void testCreateFileSimple(RTTEST hTest)
     unmapAndRemoveMapping(hTest, &svcTable, Root, "testname");
     AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
     RTTestGuardedFree(hTest, svcTable.pvService);
-    RTTEST_CHECK_MSG(hTest, testRTFileCloseFile == hcFile,
-                     (hTest, "File=%llu\n", LLUIFY(testRTFileCloseFile)));
+    RTTEST_CHECK_MSG(hTest, g_testRTFileCloseFile == hcFile,
+                     (hTest, "File=%u\n", (uintptr_t)g_testRTFileCloseFile));
 }
 
 void testCreateDirSimple(RTTEST hTest)
@@ -767,9 +789,7 @@ void testCreateDirSimple(RTTEST hTest)
     unmapAndRemoveMapping(hTest, &svcTable, Root, "testname");
     AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
     RTTestGuardedFree(hTest, svcTable.pvService);
-    RTTEST_CHECK_MSG(hTest,
-                     testRTDirClosepDir == pcDir,
-                     (hTest, "pDir=%llu\n", LLUIFY(testRTDirClosepDir)));
+    RTTEST_CHECK_MSG(hTest, g_testRTDirClosepDir == pcDir, (hTest, "pDir=%p\n", g_testRTDirClosepDir));
 }
 
 void testReadFileSimple(RTTEST hTest)
@@ -792,7 +812,7 @@ void testReadFileSimple(RTTEST hTest)
                     &Handle, NULL);
     RTTEST_CHECK_RC_OK(hTest, rc);
     testRTFileReadData = pcszReadData;
-    rc = readFile(&svcTable, Root, Handle, 0, strlen(pcszReadData) + 1,
+    rc = readFile(&svcTable, Root, Handle, 0, (uint32_t)strlen(pcszReadData) + 1,
                   &cbRead, acBuf, (uint32_t)sizeof(acBuf));
     RTTEST_CHECK_RC_OK(hTest, rc);
     RTTEST_CHECK_MSG(hTest,
@@ -801,8 +821,7 @@ void testReadFileSimple(RTTEST hTest)
     RTTEST_CHECK_MSG(hTest, cbRead == strlen(pcszReadData) + 1,
                      (hTest, "cbRead=%llu\n", LLUIFY(cbRead)));
     unmapAndRemoveMapping(hTest, &svcTable, Root, "testname");
-    RTTEST_CHECK_MSG(hTest, testRTFileCloseFile == hcFile,
-                     (hTest, "File=%llu\n", LLUIFY(testRTFileCloseFile)));
+    RTTEST_CHECK_MSG(hTest, g_testRTFileCloseFile == hcFile, (hTest, "File=%u\n", g_testRTFileCloseFile));
     AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
     RTTestGuardedFree(hTest, svcTable.pvService);
 }
@@ -835,8 +854,7 @@ void testWriteFileSimple(RTTEST hTest)
     RTTEST_CHECK_MSG(hTest, cbWritten == cbToWrite,
                      (hTest, "cbWritten=%llu\n", LLUIFY(cbWritten)));
     unmapAndRemoveMapping(hTest, &svcTable, Root, "testname");
-    RTTEST_CHECK_MSG(hTest, testRTFileCloseFile == hcFile,
-                     (hTest, "File=%llu\n", LLUIFY(testRTFileCloseFile)));
+    RTTEST_CHECK_MSG(hTest, g_testRTFileCloseFile == hcFile, (hTest, "File=%u\n", g_testRTFileCloseFile));
     AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
     RTTestGuardedFree(hTest, svcTable.pvService);
 }
@@ -859,13 +877,11 @@ void testFlushFileSimple(RTTEST hTest)
     RTTEST_CHECK_RC_OK(hTest, rc);
     rc = flushFile(&svcTable, Root, Handle);
     RTTEST_CHECK_RC_OK(hTest, rc);
-    RTTEST_CHECK_MSG(hTest, testRTFileFlushFile == hcFile,
-                     (hTest, "File=%llu\n", LLUIFY(testRTFileFlushFile)));
+    RTTEST_CHECK_MSG(hTest, g_testRTFileFlushFile == hcFile, (hTest, "File=%u\n", g_testRTFileFlushFile));
     unmapAndRemoveMapping(hTest, &svcTable, Root, "testname");
     AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
     RTTestGuardedFree(hTest, svcTable.pvService);
-    RTTEST_CHECK_MSG(hTest, testRTFileCloseFile == hcFile,
-                     (hTest, "File=%llu\n", LLUIFY(testRTFileCloseFile)));
+    RTTEST_CHECK_MSG(hTest, g_testRTFileCloseFile == hcFile, (hTest, "File=%u\n", g_testRTFileCloseFile));
 }
 
 void testDirListEmpty(RTTEST hTest)
@@ -889,16 +905,13 @@ void testDirListEmpty(RTTEST hTest)
     rc = listDir(&svcTable, Root, Handle, 0, sizeof (SHFLDIRINFO), NULL,
                  &DirInfo, sizeof(DirInfo), 0, &cFiles);
     RTTEST_CHECK_RC(hTest, rc, VERR_NO_MORE_FILES);
-    RTTEST_CHECK_MSG(hTest, testRTDirReadExDir == pcDir,
-                     (hTest, "Dir=%llu\n", LLUIFY(testRTDirReadExDir)));
+    RTTEST_CHECK_MSG(hTest, g_testRTDirReadExDir == pcDir, (hTest, "Dir=%p\n", g_testRTDirReadExDir));
     RTTEST_CHECK_MSG(hTest, cFiles == 0,
                      (hTest, "cFiles=%llu\n", LLUIFY(cFiles)));
     unmapAndRemoveMapping(hTest, &svcTable, Root, "testname");
     AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
     RTTestGuardedFree(hTest, svcTable.pvService);
-    RTTEST_CHECK_MSG(hTest,
-                     testRTDirClosepDir == pcDir,
-                     (hTest, "pDir=%llu\n", LLUIFY(testRTDirClosepDir)));
+    RTTEST_CHECK_MSG(hTest, g_testRTDirClosepDir == pcDir, (hTest, "pDir=%p\n", g_testRTDirClosepDir));
 }
 
 void testFSInfoQuerySetFMode(RTTEST hTest)
@@ -924,8 +937,7 @@ void testFSInfoQuerySetFMode(RTTEST hTest)
     rc = sfInformation(&svcTable, Root, Handle, SHFL_INFO_FILE, sizeof(Info),
                        &Info);
     RTTEST_CHECK_RC_OK(hTest, rc);
-    RTTEST_CHECK_MSG(hTest, testRTFileQueryInfoFile == hcFile,
-                     (hTest, "File=%llu\n", LLUIFY(testRTFileQueryInfoFile)));
+    RTTEST_CHECK_MSG(hTest, g_testRTFileQueryInfoFile == hcFile, (hTest, "File=%u\n", g_testRTFileQueryInfoFile));
     RTTEST_CHECK_MSG(hTest, Info.Attr.fMode == fMode,
                      (hTest, "cbObject=%llu\n", LLUIFY(Info.cbObject)));
     RT_ZERO(Info);
@@ -938,8 +950,7 @@ void testFSInfoQuerySetFMode(RTTEST hTest)
     unmapAndRemoveMapping(hTest, &svcTable, Root, "testname");
     AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
     RTTestGuardedFree(hTest, svcTable.pvService);
-    RTTEST_CHECK_MSG(hTest, testRTFileCloseFile == hcFile,
-                     (hTest, "File=%llu\n", LLUIFY(testRTFileCloseFile)));
+    RTTEST_CHECK_MSG(hTest, g_testRTFileCloseFile == hcFile, (hTest, "File=%u\n", g_testRTFileCloseFile));
 }
 
 void testFSInfoQuerySetDirATime(RTTEST hTest)
@@ -965,8 +976,7 @@ void testFSInfoQuerySetDirATime(RTTEST hTest)
     rc = sfInformation(&svcTable, Root, Handle, SHFL_INFO_FILE, sizeof(Info),
                        &Info);
     RTTEST_CHECK_RC_OK(hTest, rc);
-    RTTEST_CHECK_MSG(hTest, testRTDirQueryInfoDir == pcDir,
-                     (hTest, "Dir=%llu\n", LLUIFY(testRTDirQueryInfoDir)));
+    RTTEST_CHECK_MSG(hTest, g_testRTDirQueryInfoDir == pcDir, (hTest, "Dir=%p\n", g_testRTDirQueryInfoDir));
     RTTEST_CHECK_MSG(hTest, RTTimeSpecGetNano(&Info.AccessTime) == ccAtimeNano,
                      (hTest, "ATime=%llu\n",
                       LLUIFY(RTTimeSpecGetNano(&Info.AccessTime))));
@@ -982,8 +992,7 @@ void testFSInfoQuerySetDirATime(RTTEST hTest)
     unmapAndRemoveMapping(hTest, &svcTable, Root, "testname");
     AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
     RTTestGuardedFree(hTest, svcTable.pvService);
-    RTTEST_CHECK_MSG(hTest, testRTDirClosepDir == pcDir,
-                     (hTest, "File=%llu\n", LLUIFY(testRTDirClosepDir)));
+    RTTEST_CHECK_MSG(hTest, g_testRTDirClosepDir == pcDir, (hTest, "pDir=%p\n", g_testRTDirClosepDir));
 }
 
 void testFSInfoQuerySetFileATime(RTTEST hTest)
@@ -1009,8 +1018,7 @@ void testFSInfoQuerySetFileATime(RTTEST hTest)
     rc = sfInformation(&svcTable, Root, Handle, SHFL_INFO_FILE, sizeof(Info),
                        &Info);
     RTTEST_CHECK_RC_OK(hTest, rc);
-    RTTEST_CHECK_MSG(hTest, testRTFileQueryInfoFile == hcFile,
-                     (hTest, "File=%llu\n", LLUIFY(testRTFileQueryInfoFile)));
+    RTTEST_CHECK_MSG(hTest, g_testRTFileQueryInfoFile == hcFile, (hTest, "File=%u\n", g_testRTFileQueryInfoFile));
     RTTEST_CHECK_MSG(hTest, RTTimeSpecGetNano(&Info.AccessTime) == ccAtimeNano,
                      (hTest, "ATime=%llu\n",
                       LLUIFY(RTTimeSpecGetNano(&Info.AccessTime))));
@@ -1026,8 +1034,7 @@ void testFSInfoQuerySetFileATime(RTTEST hTest)
     unmapAndRemoveMapping(hTest, &svcTable, Root, "testname");
     AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
     RTTestGuardedFree(hTest, svcTable.pvService);
-    RTTEST_CHECK_MSG(hTest, testRTFileCloseFile == hcFile,
-                     (hTest, "File=%llu\n", LLUIFY(testRTFileCloseFile)));
+    RTTEST_CHECK_MSG(hTest, g_testRTFileCloseFile == hcFile, (hTest, "File=%u\n", g_testRTFileCloseFile));
 }
 
 void testFSInfoQuerySetEndOfFile(RTTEST hTest)
@@ -1053,15 +1060,13 @@ void testFSInfoQuerySetEndOfFile(RTTEST hTest)
     rc = sfInformation(&svcTable, Root, Handle, SHFL_INFO_SET | SHFL_INFO_SIZE,
                        sizeof(Info), &Info);
     RTTEST_CHECK_RC_OK(hTest, rc);
-    RTTEST_CHECK_MSG(hTest, testRTFileSetSizeFile == hcFile,
-                     (hTest, "File=%llu\n", LLUIFY(testRTFileSetSizeFile)));
+    RTTEST_CHECK_MSG(hTest, g_testRTFileSetSizeFile == hcFile, (hTest, "File=%u\n", g_testRTFileSetSizeFile));
     RTTEST_CHECK_MSG(hTest, testRTFileSetSizeSize == cbNew,
                      (hTest, "Size=%llu\n", LLUIFY(testRTFileSetSizeSize)));
     unmapAndRemoveMapping(hTest, &svcTable, Root, "testname");
     AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
     RTTestGuardedFree(hTest, svcTable.pvService);
-    RTTEST_CHECK_MSG(hTest, testRTFileCloseFile == hcFile,
-                     (hTest, "File=%llu\n", LLUIFY(testRTFileCloseFile)));
+    RTTEST_CHECK_MSG(hTest, g_testRTFileCloseFile == hcFile, (hTest, "File=%u\n", g_testRTFileCloseFile));
 }
 
 void testLockFileSimple(RTTEST hTest)
@@ -1085,8 +1090,7 @@ void testLockFileSimple(RTTEST hTest)
     rc = lockFile(&svcTable, Root, Handle, offLock, cbLock, SHFL_LOCK_SHARED);
     RTTEST_CHECK_RC_OK(hTest, rc);
 #ifdef RT_OS_WINDOWS  /* Locking is a no-op elsewhere. */
-    RTTEST_CHECK_MSG(hTest, testRTFileLockFile == hcFile,
-                     (hTest, "File=%llu\n", LLUIFY(testRTFileLockFile)));
+    RTTEST_CHECK_MSG(hTest, g_testRTFileLockFile == hcFile, (hTest, "File=%u\n", g_testRTFileLockFile));
     RTTEST_CHECK_MSG(hTest, testRTFileLockfLock == 0,
                      (hTest, "fLock=%u\n", testRTFileLockfLock));
     RTTEST_CHECK_MSG(hTest, testRTFileLockOffset == offLock,
@@ -1097,8 +1101,7 @@ void testLockFileSimple(RTTEST hTest)
     rc = lockFile(&svcTable, Root, Handle, offLock, cbLock, SHFL_LOCK_CANCEL);
     RTTEST_CHECK_RC_OK(hTest, rc);
 #ifdef RT_OS_WINDOWS
-    RTTEST_CHECK_MSG(hTest, testRTFileUnlockFile == hcFile,
-                     (hTest, "File=%llu\n", LLUIFY(testRTFileUnlockFile)));
+    RTTEST_CHECK_MSG(hTest, g_testRTFileUnlockFile == hcFile, (hTest, "File=%u\n", g_testRTFileUnlockFile));
     RTTEST_CHECK_MSG(hTest, testRTFileUnlockOffset == offLock,
                      (hTest, "Offs=%llu\n",
                       (long long) testRTFileUnlockOffset));
@@ -1108,8 +1111,7 @@ void testLockFileSimple(RTTEST hTest)
     unmapAndRemoveMapping(hTest, &svcTable, Root, "testname");
     AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
     RTTestGuardedFree(hTest, svcTable.pvService);
-    RTTEST_CHECK_MSG(hTest, testRTFileCloseFile == hcFile,
-                     (hTest, "File=%llu\n", LLUIFY(testRTFileCloseFile)));
+    RTTEST_CHECK_MSG(hTest, g_testRTFileCloseFile == hcFile, (hTest, "File=%u\n", g_testRTFileCloseFile));
 }
 
 
@@ -1142,8 +1144,8 @@ static void testAPI(RTTEST hTest)
 
 int main(int argc, char **argv)
 {
-    RTEXITCODE rcExit = RTTestInitAndCreate(RTPathFilename(argv[0]),
-                                            &g_hTest);
+    RT_NOREF1(argc);
+    RTEXITCODE rcExit = RTTestInitAndCreate(RTPathFilename(argv[0]), &g_hTest);
     if (rcExit != RTEXITCODE_SUCCESS)
         return rcExit;
     RTTestBanner(g_hTest);
diff --git a/src/VBox/HostServices/SharedFolders/testcase/tstSharedFolderService.h b/src/VBox/HostServices/SharedFolders/testcase/tstSharedFolderService.h
index 9e9643f..f85fb80 100644
--- a/src/VBox/HostServices/SharedFolders/testcase/tstSharedFolderService.h
+++ b/src/VBox/HostServices/SharedFolders/testcase/tstSharedFolderService.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2011 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedFolders/testcase/tstShflCase.cpp b/src/VBox/HostServices/SharedFolders/testcase/tstShflCase.cpp
index bd1153a..bc7e505 100644
--- a/src/VBox/HostServices/SharedFolders/testcase/tstShflCase.cpp
+++ b/src/VBox/HostServices/SharedFolders/testcase/tstShflCase.cpp
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -54,59 +54,60 @@
 static int iDirList = 0;
 static int iDirFile = 0;
 
-static const char *pszDirList[] =
+static const char *g_apszDirs[] =
 {
-"c:",
-"c:\\test dir",
-"c:\\test dir\\SUBDIR",
+    "c:",
+    "c:\\test dir",
+    "c:\\test dir\\SUBDIR",
 };
 
-static const char *pszDirListC[] =
+static const char *g_apszDirsC[] =
 {
-".",
-"..",
-"test dir"
+    ".",
+    "..",
+    "test dir"
 };
 
-static const char *pszDirListTestdir[] =
+static const char *g_apszTestdirEntries[] =
 {
-".",
-"..",
-"SUBDIR",
-"a.bat",
-"aTestJe.bat",
-"aTestje.bat",
-"b.bat",
-"c.bat",
-"d.bat",
-"e.bat",
-"f.bat",
-"g.bat",
-"h.bat",
-"x.bat",
-"z.bat",
+    ".",
+    "..",
+    "SUBDIR",
+    "a.bat",
+    "aTestJe.bat",
+    "aTestje.bat",
+    "b.bat",
+    "c.bat",
+    "d.bat",
+    "e.bat",
+    "f.bat",
+    "g.bat",
+    "h.bat",
+    "x.bat",
+    "z.bat",
 };
 
-static const char *pszDirListSUBDIR[] =
+static const char *g_apszSUBDIREntries[] =
 {
-".",
-"..",
-"a.bat",
-"aTestJe.bat",
-"aTestje.bat",
-"b.bat",
-"c.bat",
-"d.bat",
-"e.bat",
-"f.bat",
-"g.bat",
-"h.bat",
-"x.bat",
-"z.bat",
+    ".",
+    "..",
+    "a.bat",
+    "aTestJe.bat",
+    "aTestje.bat",
+    "b.bat",
+    "c.bat",
+    "d.bat",
+    "e.bat",
+    "f.bat",
+    "g.bat",
+    "h.bat",
+    "x.bat",
+    "z.bat",
 };
 
 int rtDirOpenFiltered(PRTDIR *ppDir, const char *pszPath, RTDIRFILTER enmFilter)
 {
+    RT_NOREF1(enmFilter);
     if (!strcmp(pszPath, "c:\\*"))
         iDirList = 1;
     else if (!strcmp(pszPath, "c:\\test dir\\*"))
@@ -122,69 +123,71 @@ int rtDirOpenFiltered(PRTDIR *ppDir, const char *pszPath, RTDIRFILTER enmFilter)
 
 int rtDirClose(PRTDIR pDir)
 {
+    RT_NOREF1(pDir);
     iDirFile = 0;
     return VINF_SUCCESS;
 }
 
 int rtDirReadEx(PRTDIR pDir, PRTDIRENTRYEX pDirEntry, size_t *pcbDirEntry, RTFSOBJATTRADD enmAdditionalAttribs, uint32_t fFlags)
 {
-    NOREF(fFlags);
-    switch(iDirList)
+    RT_NOREF4(pDir, pcbDirEntry, enmAdditionalAttribs, fFlags);
+    switch (iDirList)
     {
-    case 1:
-        if (iDirFile == RT_ELEMENTS(pszDirListC))
-            return VERR_NO_MORE_FILES;
-        pDirEntry->cbName = (uint16_t)strlen(pszDirListC[iDirFile]);
-        strcpy(pDirEntry->szName, pszDirListC[iDirFile++]);
-        break;
-    case 2:
-        if (iDirFile == RT_ELEMENTS(pszDirListTestdir))
-            return VERR_NO_MORE_FILES;
-        pDirEntry->cbName = (uint16_t)strlen(pszDirListTestdir[iDirFile]);
-        strcpy(pDirEntry->szName, pszDirListTestdir[iDirFile++]);
-        break;
-    case 3:
-        if (iDirFile == RT_ELEMENTS(pszDirListSUBDIR))
-            return VERR_NO_MORE_FILES;
-        pDirEntry->cbName = (uint16_t)strlen(pszDirListSUBDIR[iDirFile]);
-        strcpy(pDirEntry->szName, pszDirListSUBDIR[iDirFile++]);
-        break;
+        case 1:
+            if (iDirFile == RT_ELEMENTS(g_apszDirsC))
+                return VERR_NO_MORE_FILES;
+            pDirEntry->cbName = (uint16_t)strlen(g_apszDirsC[iDirFile]);
+            strcpy(pDirEntry->szName, g_apszDirsC[iDirFile++]);
+            break;
+        case 2:
+            if (iDirFile == RT_ELEMENTS(g_apszTestdirEntries))
+                return VERR_NO_MORE_FILES;
+            pDirEntry->cbName = (uint16_t)strlen(g_apszTestdirEntries[iDirFile]);
+            strcpy(pDirEntry->szName, g_apszTestdirEntries[iDirFile++]);
+            break;
+        case 3:
+            if (iDirFile == RT_ELEMENTS(g_apszSUBDIREntries))
+                return VERR_NO_MORE_FILES;
+            pDirEntry->cbName = (uint16_t)strlen(g_apszSUBDIREntries[iDirFile]);
+            strcpy(pDirEntry->szName, g_apszSUBDIREntries[iDirFile++]);
+            break;
     }
     return VINF_SUCCESS;
 }
 
 int rtPathQueryInfo(const char *pszPath, PRTFSOBJINFO pObjInfo, RTFSOBJATTRADD enmAdditionalAttribs)
 {
+    RT_NOREF2(pObjInfo, enmAdditionalAttribs);
     int cMax;
-    const char **ppszDirList;
 
-    /* first try pszDirList */
-    for (unsigned int i=0;i<RT_ELEMENTS(pszDirList);i++)
+    /* first try g_apszDirs */
+    for (unsigned int i=0;i<RT_ELEMENTS(g_apszDirs);i++)
     {
-        if(!strcmp(pszPath, pszDirList[i]))
+        if(!strcmp(pszPath, g_apszDirs[i]))
             return VINF_SUCCESS;
     }
 
-    switch(iDirList)
+    const char **papszDirList;
+    switch (iDirList)
     {
-    case 1:
-        cMax = RT_ELEMENTS(pszDirListC);
-        ppszDirList = pszDirListC;
-        break;
-    case 2:
-        cMax = RT_ELEMENTS(pszDirListTestdir);
-        ppszDirList = pszDirListTestdir;
-        break;
-    case 3:
-        cMax = RT_ELEMENTS(pszDirListSUBDIR);
-        ppszDirList = pszDirListSUBDIR;
-        break;
-    default:
-        return VERR_FILE_NOT_FOUND;
+        case 1:
+            cMax = RT_ELEMENTS(g_apszDirsC);
+            papszDirList = g_apszDirsC;
+            break;
+        case 2:
+            cMax = RT_ELEMENTS(g_apszTestdirEntries);
+            papszDirList = g_apszTestdirEntries;
+            break;
+        case 3:
+            cMax = RT_ELEMENTS(g_apszSUBDIREntries);
+            papszDirList = g_apszSUBDIREntries;
+            break;
+        default:
+            return VERR_FILE_NOT_FOUND;
     }
-    for (int i=0;i<cMax;i++)
+    for (int i = 0; i < cMax; i++)
     {
-        if(!strcmp(pszPath, ppszDirList[i]))
+        if (!strcmp(pszPath, papszDirList[i]))
             return VINF_SUCCESS;
     }
     return VERR_FILE_NOT_FOUND;
diff --git a/src/VBox/HostServices/SharedFolders/testcase/tstShflSizes.cpp b/src/VBox/HostServices/SharedFolders/testcase/tstShflSizes.cpp
index 77866fa..9d1a063 100644
--- a/src/VBox/HostServices/SharedFolders/testcase/tstShflSizes.cpp
+++ b/src/VBox/HostServices/SharedFolders/testcase/tstShflSizes.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedFolders/teststubs.h b/src/VBox/HostServices/SharedFolders/teststubs.h
index 54c9ef4..ca10162 100644
--- a/src/VBox/HostServices/SharedFolders/teststubs.h
+++ b/src/VBox/HostServices/SharedFolders/teststubs.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2011-2012 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedFolders/vbsf.cpp b/src/VBox/HostServices/SharedFolders/vbsf.cpp
index e46bb78..46f636a 100644
--- a/src/VBox/HostServices/SharedFolders/vbsf.cpp
+++ b/src/VBox/HostServices/SharedFolders/vbsf.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -451,7 +451,7 @@ static int vbsfOpenFile(SHFLCLIENTDATA *pClient, const char *pszPath, SHFLCREATE
             if (cErrors < 32)
             {
                 LogRel(("SharedFolders host service: Cannot open '%s' -- too many open files.\n", pszPath));
-#if defined RT_OS_LINUX || RT_OS_SOLARIS
+#if defined RT_OS_LINUX || defined(RT_OS_SOLARIS)
                 if (cErrors < 1)
                     LogRel(("SharedFolders host service: Try to increase the limit for open files (ulimit -n)\n"));
 #endif
@@ -475,7 +475,7 @@ static int vbsfOpenFile(SHFLCLIENTDATA *pClient, const char *pszPath, SHFLCREATE
                 == BIT_FLAG(pParms->CreateFlags, SHFL_CF_ACT_MASK_IF_EXISTS)))
         {
             /* For now, we do not treat a failure here as fatal. */
-            /* @todo Also set the size for SHFL_CF_ACT_CREATE_IF_NEW if
+            /** @todo Also set the size for SHFL_CF_ACT_CREATE_IF_NEW if
                      SHFL_CF_ACT_FAIL_IF_EXISTS is set. */
             RTFileSetSize(pHandle->file.Handle, pParms->Info.cbObject);
             pParms->Result = SHFL_FILE_REPLACED;
@@ -488,7 +488,7 @@ static int vbsfOpenFile(SHFLCLIENTDATA *pClient, const char *pszPath, SHFLCREATE
             pParms->Result = SHFL_FILE_CREATED;
         }
 #if 0
-        /* @todo */
+        /** @todo */
         /* Set new attributes. */
         if (   (   SHFL_CF_ACT_REPLACE_IF_EXISTS
                 == BIT_FLAG(pParms->CreateFlags, SHFL_CF_ACT_MASK_IF_EXISTS))
@@ -901,8 +901,10 @@ void testClose(RTTEST hTest)
     /* Add tests as required... */
 }
 #endif
+
 int vbsfClose(SHFLCLIENTDATA *pClient, SHFLROOT root, SHFLHANDLE Handle)
 {
+    RT_NOREF1(root);
     int rc = VINF_SUCCESS;
 
     LogFlow(("vbsfClose: pClient = %p, Handle = %RX64\n",
@@ -967,7 +969,7 @@ int vbsfRead  (SHFLCLIENTDATA *pClient, SHFLROOT root, SHFLHANDLE Handle, uint64
         return VERR_ACCESS_DENIED;
 
     if (*pcbBuffer == 0)
-        return VINF_SUCCESS; /* @todo correct? */
+        return VINF_SUCCESS; /** @todo correct? */
 
 
     rc = RTFileSeek(pHandle->file.Handle, offset, RTFILE_SEEK_BEGIN, NULL);
@@ -1045,8 +1047,10 @@ void testFlush(RTTEST hTest)
     /* Add tests as required... */
 }
 #endif
+
 int vbsfFlush(SHFLCLIENTDATA *pClient, SHFLROOT root, SHFLHANDLE Handle)
 {
+    RT_NOREF1(root);
     SHFLFILEHANDLE *pHandle = vbsfQueryFileHandle(pClient, Handle);
     int rc = VINF_SUCCESS;
 
@@ -1337,8 +1341,10 @@ int vbsfReadLink(SHFLCLIENTDATA *pClient, SHFLROOT root, SHFLSTRING *pPath, uint
     return rc;
 }
 
-int vbsfQueryFileInfo(SHFLCLIENTDATA *pClient, SHFLROOT root, SHFLHANDLE Handle, uint32_t flags, uint32_t *pcbBuffer, uint8_t *pBuffer)
+int vbsfQueryFileInfo(SHFLCLIENTDATA *pClient, SHFLROOT root, SHFLHANDLE Handle, uint32_t flags,
+                      uint32_t *pcbBuffer, uint8_t *pBuffer)
 {
+    RT_NOREF2(root, flags);
     uint32_t type = vbsfQueryHandleType(pClient, Handle);
     int            rc = VINF_SUCCESS;
     SHFLFSOBJINFO   *pObjInfo = (SHFLFSOBJINFO *)pBuffer;
@@ -1354,7 +1360,7 @@ int vbsfQueryFileInfo(SHFLCLIENTDATA *pClient, SHFLROOT root, SHFLHANDLE Handle,
         return VERR_INVALID_PARAMETER;
     }
 
-    /* @todo other options */
+    /** @todo other options */
     Assert(flags == (SHFL_INFO_GET|SHFL_INFO_FILE));
 
     *pcbBuffer  = 0;
@@ -1384,8 +1390,10 @@ int vbsfQueryFileInfo(SHFLCLIENTDATA *pClient, SHFLROOT root, SHFLHANDLE Handle,
     return rc;
 }
 
-static int vbsfSetFileInfo(SHFLCLIENTDATA *pClient, SHFLROOT root, SHFLHANDLE Handle, uint32_t flags, uint32_t *pcbBuffer, uint8_t *pBuffer)
+static int vbsfSetFileInfo(SHFLCLIENTDATA *pClient, SHFLROOT root, SHFLHANDLE Handle, uint32_t flags,
+                           uint32_t *pcbBuffer, uint8_t *pBuffer)
 {
+    RT_NOREF2(root, flags);
     uint32_t type = vbsfQueryHandleType(pClient, Handle);
     int             rc = VINF_SUCCESS;
     SHFLFSOBJINFO  *pSFDEntry;
@@ -1460,7 +1468,7 @@ static int vbsfSetFileInfo(SHFLCLIENTDATA *pClient, SHFLROOT root, SHFLHANDLE Ha
             }
         }
     }
-    /* TODO: mode for directories */
+    /** @todo mode for directories */
 
     if (rc == VINF_SUCCESS)
     {
@@ -1479,8 +1487,10 @@ static int vbsfSetFileInfo(SHFLCLIENTDATA *pClient, SHFLROOT root, SHFLHANDLE Ha
 }
 
 
-static int vbsfSetEndOfFile(SHFLCLIENTDATA *pClient, SHFLROOT root, SHFLHANDLE Handle, uint32_t flags, uint32_t *pcbBuffer, uint8_t *pBuffer)
+static int vbsfSetEndOfFile(SHFLCLIENTDATA *pClient, SHFLROOT root, SHFLHANDLE Handle, uint32_t flags,
+                            uint32_t *pcbBuffer, uint8_t *pBuffer)
 {
+    RT_NOREF2(root, flags);
     SHFLFILEHANDLE *pHandle = vbsfQueryFileHandle(pClient, Handle);
     int             rc = VINF_SUCCESS;
     SHFLFSOBJINFO  *pSFDEntry;
@@ -1526,6 +1536,7 @@ static int vbsfSetEndOfFile(SHFLCLIENTDATA *pClient, SHFLROOT root, SHFLHANDLE H
 
 int vbsfQueryVolumeInfo(SHFLCLIENTDATA *pClient, SHFLROOT root, uint32_t flags, uint32_t *pcbBuffer, uint8_t *pBuffer)
 {
+    RT_NOREF2(root, flags);
     int            rc = VINF_SUCCESS;
     SHFLVOLINFO   *pSFDEntry;
     char          *pszFullPath = NULL;
@@ -1537,7 +1548,7 @@ int vbsfQueryVolumeInfo(SHFLCLIENTDATA *pClient, SHFLROOT root, uint32_t flags,
         return VERR_INVALID_PARAMETER;
     }
 
-    /* @todo other options */
+    /** @todo other options */
     Assert(flags == (SHFL_INFO_GET|SHFL_INFO_VOLUME));
 
     *pcbBuffer  = 0;
@@ -1651,8 +1662,10 @@ void testLock(RTTEST hTest)
     /* Add tests as required... */
 }
 #endif
+
 int vbsfLock(SHFLCLIENTDATA *pClient, SHFLROOT root, SHFLHANDLE Handle, uint64_t offset, uint64_t length, uint32_t flags)
 {
+    RT_NOREF1(root);
     SHFLFILEHANDLE *pHandle = vbsfQueryFileHandle(pClient, Handle);
     uint32_t        fRTLock = 0;
     int             rc;
@@ -1701,12 +1714,14 @@ int vbsfLock(SHFLCLIENTDATA *pClient, SHFLROOT root, SHFLHANDLE Handle, uint64_t
 #else
     Log(("vbsfLock: Pretend success handle=%x\n", Handle));
     rc = VINF_SUCCESS;
+    RT_NOREF2(offset,  length);
 #endif
     return rc;
 }
 
 int vbsfUnlock(SHFLCLIENTDATA *pClient, SHFLROOT root, SHFLHANDLE Handle, uint64_t offset, uint64_t length, uint32_t flags)
 {
+    RT_NOREF1(root);
     SHFLFILEHANDLE *pHandle = vbsfQueryFileHandle(pClient, Handle);
     int             rc;
 
@@ -1730,6 +1745,7 @@ int vbsfUnlock(SHFLCLIENTDATA *pClient, SHFLROOT root, SHFLHANDLE Handle, uint64
 #else
     Log(("vbsfUnlock: Pretend success handle=%x\n", Handle));
     rc = VINF_SUCCESS;
+    RT_NOREF2(offset,  length);
 #endif
 
     return rc;
@@ -1880,7 +1896,6 @@ int vbsfSymlink(SHFLCLIENTDATA *pClient, SHFLROOT root, SHFLSTRING *pNewPath, SH
 
     char *pszFullNewPath = NULL;
     char *pszFullOldPath = NULL;
-    const char *pszOldPath = (const char *)pOldPath->String.utf8;
 
     /* XXX: no support for UCS2 at the moment. */
     if (!BIT_FLAG(pClient->fu32Flags, SHFL_CF_UTF8))
diff --git a/src/VBox/HostServices/SharedFolders/vbsf.h b/src/VBox/HostServices/SharedFolders/vbsf.h
index 0151a22..7ec8c9d 100644
--- a/src/VBox/HostServices/SharedFolders/vbsf.h
+++ b/src/VBox/HostServices/SharedFolders/vbsf.h
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedFolders/vbsfpath.cpp b/src/VBox/HostServices/SharedFolders/vbsfpath.cpp
index 7d86a76..94d867e 100644
--- a/src/VBox/HostServices/SharedFolders/vbsfpath.cpp
+++ b/src/VBox/HostServices/SharedFolders/vbsfpath.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -528,8 +528,8 @@ int vbsfPathGuestToHost(SHFLCLIENTDATA *pClient, SHFLROOT hRoot,
      * Get the UTF8 string with the relative path provided by the guest.
      * If guest uses UTF-16 then convert it to UTF-8.
      */
-    uint32_t    cbGuestPath;
-    const char *pchGuestPath;
+    uint32_t    cbGuestPath = 0;        /* Shut up MSC */
+    const char *pchGuestPath = NULL;    /* Ditto. */
     char *pchGuestPathAllocated = NULL; /* Converted from UTF-16. */
     if (BIT_FLAG(pClient->fu32Flags, SHFL_CF_UTF8))
     {
@@ -578,7 +578,7 @@ int vbsfPathGuestToHost(SHFLCLIENTDATA *pClient, SHFLROOT hRoot,
                         /* Terminate the string. */
                         pchGuestPathAllocated[cbPathAsUtf8] = '\0';
 
-                        cbGuestPath = cbPathAsUtf8;
+                        cbGuestPath = (uint32_t)cbPathAsUtf8; Assert(cbGuestPath == cbPathAsUtf8);
                         pchGuestPath = pchGuestPathAllocated;
                     }
                 }
diff --git a/src/VBox/HostServices/SharedFolders/vbsfpath.h b/src/VBox/HostServices/SharedFolders/vbsfpath.h
index 662df32..8bd4f1a 100644
--- a/src/VBox/HostServices/SharedFolders/vbsfpath.h
+++ b/src/VBox/HostServices/SharedFolders/vbsfpath.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedOpenGL/OpenGLTest/OpenGLTest.cpp b/src/VBox/HostServices/SharedOpenGL/OpenGLTest/OpenGLTest.cpp
index ee6fd27..baec9f9 100644
--- a/src/VBox/HostServices/SharedOpenGL/OpenGLTest/OpenGLTest.cpp
+++ b/src/VBox/HostServices/SharedOpenGL/OpenGLTest/OpenGLTest.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedOpenGL/OpenGLTest/OpenGLTestApp.cpp b/src/VBox/HostServices/SharedOpenGL/OpenGLTest/OpenGLTestApp.cpp
index 9d59458..0ec8ca4 100644
--- a/src/VBox/HostServices/SharedOpenGL/OpenGLTest/OpenGLTestApp.cpp
+++ b/src/VBox/HostServices/SharedOpenGL/OpenGLTest/OpenGLTestApp.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -22,7 +22,7 @@
 #include <iprt/initterm.h>
 #include <iprt/stream.h>
 #ifdef RT_OS_WINDOWS
-# include <Windows.h>
+# include <iprt/win/windows.h>
 #endif
 #if !defined(RT_OS_WINDOWS) && !defined(RT_OS_OS2)
 # include <sys/resource.h>
@@ -355,9 +355,9 @@ int main(int argc, char **argv)
 }
 
 #ifdef RT_OS_WINDOWS
-extern "C" int WINAPI WinMain(HINSTANCE hInstance,
-    HINSTANCE /*hPrevInstance*/, LPSTR lpCmdLine, int /*nShowCmd*/)
+extern "C" int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
 {
+    RT_NOREF(hInstance, hPrevInstance, lpCmdLine, nShowCmd);
     return main(__argc, __argv);
 }
 #endif
diff --git a/src/VBox/HostServices/SharedOpenGL/OpenGLTest/OpenGLTestDarwin.cpp b/src/VBox/HostServices/SharedOpenGL/OpenGLTest/OpenGLTestDarwin.cpp
index b12a7d8..1a9a122 100644
--- a/src/VBox/HostServices/SharedOpenGL/OpenGLTest/OpenGLTestDarwin.cpp
+++ b/src/VBox/HostServices/SharedOpenGL/OpenGLTest/OpenGLTestDarwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2014 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedOpenGL/OpenGLTest/VBoxTestOGL.rc b/src/VBox/HostServices/SharedOpenGL/OpenGLTest/VBoxTestOGL.rc
index de5baa9..b691e91 100644
--- a/src/VBox/HostServices/SharedOpenGL/OpenGLTest/VBoxTestOGL.rc
+++ b/src/VBox/HostServices/SharedOpenGL/OpenGLTest/VBoxTestOGL.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedOpenGL/crserver/VBoxSharedCrOpenGL.rc b/src/VBox/HostServices/SharedOpenGL/crserver/VBoxSharedCrOpenGL.rc
index b759cf5..7b4019c 100644
--- a/src/VBox/HostServices/SharedOpenGL/crserver/VBoxSharedCrOpenGL.rc
+++ b/src/VBox/HostServices/SharedOpenGL/crserver/VBoxSharedCrOpenGL.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedOpenGL/crserver/crservice.cpp b/src/VBox/HostServices/SharedOpenGL/crserver/crservice.cpp
index c45ed38..7ab9bc9 100644
--- a/src/VBox/HostServices/SharedOpenGL/crserver/crservice.cpp
+++ b/src/VBox/HostServices/SharedOpenGL/crserver/crservice.cpp
@@ -1,11 +1,10 @@
 /* $Id: crservice.cpp $ */
-
 /** @file
- * VBox crOpenGL: Host service entry points.
+ * VBox crOpenGL - Host service entry points.
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1503,9 +1502,9 @@ static DECLCALLBACK(int) svcHostCall(void *, uint32_t u32Function, uint32_t cPar
                     WARN(("svcHostCall: invalid function %d", pCtl->enmType));
                     return VERR_INVALID_PARAMETER;
             }
-            WARN(("should not be here!"));
-            return VERR_INTERNAL_ERROR;
+            /* not reached. */
         }
+
         default:
             if (g_u32fCrHgcmDisabled)
             {
@@ -1564,7 +1563,7 @@ extern "C" DECLCALLBACK(DECLEXPORT(int)) VBoxHGCMSvcLoad (VBOXHGCMSVCFNTABLE *pt
 
 #ifdef RT_OS_WINDOWS
 #define WIN32_LEAN_AND_MEAN
-#include <windows.h>
+#include <iprt/win/windows.h>
 BOOL WINAPI DllMain(HINSTANCE hDLLInst, DWORD fdwReason, LPVOID lpvReserved)
 {
     (void) lpvReserved;
diff --git a/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/display_base.cpp b/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/display_base.cpp
index c7fca48..73f12b5 100644
--- a/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/display_base.cpp
+++ b/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/display_base.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/display_composite.cpp b/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/display_composite.cpp
index fae8d2d..55aca45 100644
--- a/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/display_composite.cpp
+++ b/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/display_composite.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/display_vrdp.cpp b/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/display_vrdp.cpp
index 4f95527..f23fc02 100644
--- a/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/display_vrdp.cpp
+++ b/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/display_vrdp.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/display_window.cpp b/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/display_window.cpp
index e10a774..474e1fa 100644
--- a/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/display_window.cpp
+++ b/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/display_window.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/display_window_rootvr.cpp b/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/display_window_rootvr.cpp
index d408da1..90cb448 100644
--- a/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/display_window_rootvr.cpp
+++ b/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/display_window_rootvr.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/server_presenter.cpp b/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/server_presenter.cpp
index 703de4f..1ce4f4f 100644
--- a/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/server_presenter.cpp
+++ b/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/server_presenter.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2012-2013 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/server_presenter.h b/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/server_presenter.h
index a929d27..8a3d0e2 100644
--- a/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/server_presenter.h
+++ b/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/server_presenter.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/window.cpp b/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/window.cpp
index 9601c58..8839477 100644
--- a/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/window.cpp
+++ b/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/window.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedOpenGL/crserverlib/server_boundsinfo.c b/src/VBox/HostServices/SharedOpenGL/crserverlib/server_boundsinfo.c
index f88f018..640806d 100644
--- a/src/VBox/HostServices/SharedOpenGL/crserverlib/server_boundsinfo.c
+++ b/src/VBox/HostServices/SharedOpenGL/crserverlib/server_boundsinfo.c
@@ -234,9 +234,11 @@ void SERVER_DISPATCH_APIENTRY
 crServerDispatchBoundsInfoCR( const CRrecti *bounds, const GLbyte *payload,
 															GLint len, GLint num_opcodes )
 {
+#if 0
 	CRMuralInfo *mural = cr_server.curClient->currentMural;
 	char *data_ptr = (char*)(payload + ((num_opcodes + 3 ) & ~0x03));
 	unsigned int bx, by;
+#endif
 
 	/* Save current unpacker state */
 	crUnpackPush();
diff --git a/src/VBox/HostServices/SharedOpenGL/crserverlib/server_clip.c b/src/VBox/HostServices/SharedOpenGL/crserverlib/server_clip.c
index 04ebbc5..03143b0 100644
--- a/src/VBox/HostServices/SharedOpenGL/crserverlib/server_clip.c
+++ b/src/VBox/HostServices/SharedOpenGL/crserverlib/server_clip.c
@@ -10,6 +10,7 @@
 
 
 #include <math.h>
+
 #include "cr_server.h"
 #include "cr_mem.h"
 #include "server.h"
diff --git a/src/VBox/HostServices/SharedOpenGL/crserverlib/server_framebuffer.c b/src/VBox/HostServices/SharedOpenGL/crserverlib/server_framebuffer.c
index da25dbb..574b537 100644
--- a/src/VBox/HostServices/SharedOpenGL/crserverlib/server_framebuffer.c
+++ b/src/VBox/HostServices/SharedOpenGL/crserverlib/server_framebuffer.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedOpenGL/crserverlib/server_getshaders.c b/src/VBox/HostServices/SharedOpenGL/crserverlib/server_getshaders.c
index 5ff17dd..731f642 100644
--- a/src/VBox/HostServices/SharedOpenGL/crserverlib/server_getshaders.c
+++ b/src/VBox/HostServices/SharedOpenGL/crserverlib/server_getshaders.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedOpenGL/crserverlib/server_glsl.c b/src/VBox/HostServices/SharedOpenGL/crserverlib/server_glsl.c
index b627084..e9c77ec 100644
--- a/src/VBox/HostServices/SharedOpenGL/crserverlib/server_glsl.c
+++ b/src/VBox/HostServices/SharedOpenGL/crserverlib/server_glsl.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedOpenGL/crserverlib/server_main.c b/src/VBox/HostServices/SharedOpenGL/crserverlib/server_main.c
index ff33118..6a1de35 100644
--- a/src/VBox/HostServices/SharedOpenGL/crserverlib/server_main.c
+++ b/src/VBox/HostServices/SharedOpenGL/crserverlib/server_main.c
@@ -2567,11 +2567,11 @@ DECLEXPORT(int32_t) crVBoxServerSetScreenCount(int sCount)
 {
     int i;
 
-    if (sCount>CR_MAX_GUEST_MONITORS)
+    if (sCount > CR_MAX_GUEST_MONITORS)
         return VERR_INVALID_PARAMETER;
 
     /*Shouldn't happen yet, but to be safe in future*/
-    for (i=0; i<cr_server.screenCount; ++i)
+    for (i = 0; i < cr_server.screenCount; /*++i - unreachable code*/)
     {
         if (MAPPED(SCREEN(i)))
             WARN(("Screen count is changing, but screen[%i] is still mapped", i));
@@ -3572,9 +3572,7 @@ static DECLCALLBACK(int8_t) crVBoxCrCmdCmd(HVBOXCRCMDSVR hSvr, const VBOXCMDVBVA
             WARN(("unsupported command"));
             return -1;
     }
-
-    WARN(("internal error"));
-    return -1;
+    /* not reached */
 }
 
 /* We moved all CrHgsmi command processing to crserverlib to keep the logic of dealing with CrHgsmi commands in one place.
@@ -3915,7 +3913,7 @@ static DECLCALLBACK(bool) crVBoxServerHasDataForScreen(uint32_t u32ScreenID)
 }
 
 
-static DECLCALLBACK(bool) crVBoxServerHasData()
+static DECLCALLBACK(bool) crVBoxServerHasData(void)
 {
     HCR_FRAMEBUFFER hFb = CrPMgrFbGetFirstEnabled();
     for (;
diff --git a/src/VBox/HostServices/SharedOpenGL/crserverlib/server_misc.c b/src/VBox/HostServices/SharedOpenGL/crserverlib/server_misc.c
index 6583c6d..c90c4e8 100644
--- a/src/VBox/HostServices/SharedOpenGL/crserverlib/server_misc.c
+++ b/src/VBox/HostServices/SharedOpenGL/crserverlib/server_misc.c
@@ -587,7 +587,8 @@ crServerDispatchCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLi
         }
         else
         {
-            GLuint pboId, dRow, sRow;
+            GLint dRow;
+            GLuint pboId, sRow;
             CRContext *ctx = crStateGetCurrent();
 
             gl->GenBuffersARB(1, &pboId);
diff --git a/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.cpp b/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.cpp
index ba73bef..b4c56f5 100644
--- a/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.cpp
+++ b/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2010-2013 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedOpenGL/crserverlib/server_rpw.cpp b/src/VBox/HostServices/SharedOpenGL/crserverlib/server_rpw.cpp
index 51c5d46..25a93d7 100644
--- a/src/VBox/HostServices/SharedOpenGL/crserverlib/server_rpw.cpp
+++ b/src/VBox/HostServices/SharedOpenGL/crserverlib/server_rpw.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2010-2013 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedOpenGL/crserverlib/server_texture.c b/src/VBox/HostServices/SharedOpenGL/crserverlib/server_texture.c
index 2042567..bbe9167 100644
--- a/src/VBox/HostServices/SharedOpenGL/crserverlib/server_texture.c
+++ b/src/VBox/HostServices/SharedOpenGL/crserverlib/server_texture.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2010 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedOpenGL/dlm/dlm_lists.c b/src/VBox/HostServices/SharedOpenGL/dlm/dlm_lists.c
index f80035f..8dac4fd 100644
--- a/src/VBox/HostServices/SharedOpenGL/dlm/dlm_lists.c
+++ b/src/VBox/HostServices/SharedOpenGL/dlm/dlm_lists.c
@@ -10,7 +10,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedOpenGL/dlm/dlm_state.c b/src/VBox/HostServices/SharedOpenGL/dlm/dlm_state.c
index 3caf733..7a6135c 100644
--- a/src/VBox/HostServices/SharedOpenGL/dlm/dlm_state.c
+++ b/src/VBox/HostServices/SharedOpenGL/dlm/dlm_state.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedOpenGL/expando/expandospu.c b/src/VBox/HostServices/SharedOpenGL/expando/expandospu.c
index 063c49e..6025a80 100644
--- a/src/VBox/HostServices/SharedOpenGL/expando/expandospu.c
+++ b/src/VBox/HostServices/SharedOpenGL/expando/expandospu.c
@@ -11,7 +11,7 @@
 
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedOpenGL/render/VBoxOGLrenderspu.rc b/src/VBox/HostServices/SharedOpenGL/render/VBoxOGLrenderspu.rc
index b22d6c7..55dae86 100644
--- a/src/VBox/HostServices/SharedOpenGL/render/VBoxOGLrenderspu.rc
+++ b/src/VBox/HostServices/SharedOpenGL/render/VBoxOGLrenderspu.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedOpenGL/render/renderspu.h b/src/VBox/HostServices/SharedOpenGL/render/renderspu.h
index 68492d2..3cc473f 100644
--- a/src/VBox/HostServices/SharedOpenGL/render/renderspu.h
+++ b/src/VBox/HostServices/SharedOpenGL/render/renderspu.h
@@ -9,7 +9,7 @@
 
 #ifdef WINDOWS
 #define WIN32_LEAN_AND_MEAN
-#include <windows.h>
+#include <iprt/win/windows.h>
 #define RENDER_APIENTRY __stdcall
 #define snprintf _snprintf
 #elif defined(DARWIN)
diff --git a/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa.c b/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa.c
index b5cb4b3..a658715 100644
--- a/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa.c
+++ b/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa.c
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa_helper.h b/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa_helper.h
index fef56d9..6636220 100644
--- a/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa_helper.h
+++ b/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa_helper.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2014 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedOpenGL/render/renderspu_wgl.c b/src/VBox/HostServices/SharedOpenGL/render/renderspu_wgl.c
index faf9908..78e2492 100644
--- a/src/VBox/HostServices/SharedOpenGL/render/renderspu_wgl.c
+++ b/src/VBox/HostServices/SharedOpenGL/render/renderspu_wgl.c
@@ -6,7 +6,7 @@
 
 
 #define WIN32_LEAN_AND_MEAN
-#include <windows.h>
+#include <iprt/win/windows.h>
 
 #include <stdlib.h>
 #include <stdio.h>
diff --git a/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_framebuffer.c b/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_framebuffer.c
index cdf0591..a6c4812 100644
--- a/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_framebuffer.c
+++ b/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_framebuffer.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2009-2010 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_shaders.c b/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_shaders.c
index 069d583..035f096 100644
--- a/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_shaders.c
+++ b/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_shaders.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2009-2010 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_visibleregion.c b/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_visibleregion.c
index 961f7ac..570c5dd 100644
--- a/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_visibleregion.c
+++ b/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_visibleregion.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2008-2010 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/auth/Makefile.kmk b/src/VBox/HostServices/auth/Makefile.kmk
index 59ad7f3..c535c0c 100644
--- a/src/VBox/HostServices/auth/Makefile.kmk
+++ b/src/VBox/HostServices/auth/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/auth/directoryservice/directoryservice.cpp b/src/VBox/HostServices/auth/directoryservice/directoryservice.cpp
index 57608f9..d50d0d4 100644
--- a/src/VBox/HostServices/auth/directoryservice/directoryservice.cpp
+++ b/src/VBox/HostServices/auth/directoryservice/directoryservice.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2009-2011 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -37,8 +37,8 @@ tDirStatus defaultSearchNodePath(tDirReference pDirRef, tDataListPtr *pdsNodePat
     {
         /* Try to find the default search node for local names */
         UInt32 cNodes;
-        tContextData pCtx = NULL;
-        dsErr = dsFindDirNodes(pDirRef, pTmpBuf, NULL, eDSLocalNodeNames, &cNodes, &pCtx);
+        tContextData hCtx = 0;
+        dsErr = dsFindDirNodes(pDirRef, pTmpBuf, NULL, eDSLocalNodeNames, &cNodes, &hCtx);
         /* Any nodes found? */
         if (   dsErr == eDSNoErr
             && cNodes >= 1)
@@ -47,8 +47,8 @@ tDirStatus defaultSearchNodePath(tDirReference pDirRef, tDataListPtr *pdsNodePat
         else
             dsErr = eDSNodeNotFound;
 
-        if (pCtx)
-            dsReleaseContinueData(pDirRef, pCtx);
+        if (hCtx) /* (DSoNodeConfig.m from DSTools-162 does exactly the same free if not-zero-regardless-of-return-code.) */
+            dsReleaseContinueData(pDirRef, hCtx);
         dsDataBufferDeAllocate(pDirRef, pTmpBuf);
     }
     else
@@ -75,7 +75,7 @@ tDirStatus userAuthInfo(tDirReference pDirRef, tDirNodeReference pNodeRef, const
         {
             /* Now search for the first matching record */
             UInt32 cRecords = 1;
-            tContextData pCtx = NULL;
+            tContextData hCtx = 0;
             dsErr = dsGetRecordList(pNodeRef,
                                     pTmpBuf,
                                     pRecordName,
@@ -84,31 +84,31 @@ tDirStatus userAuthInfo(tDirReference pDirRef, tDirNodeReference pNodeRef, const
                                     pRequestedAttributes,
                                     false,
                                     &cRecords,
-                                    &pCtx);
+                                    &hCtx);
             if (   dsErr == eDSNoErr
                 && cRecords >= 1)
             {
                 /* Process the first found record. Look at any attribute one by one. */
-                tAttributeListRef pRecAttrListRef = NULL;
+                tAttributeListRef hRecAttrListRef = 0;
                 tRecordEntryPtr pRecEntry = NULL;
                 tDataListPtr pAuthNodeList = NULL;
-                dsErr = dsGetRecordEntry(pNodeRef, pTmpBuf, 1, &pRecAttrListRef, &pRecEntry);
+                dsErr = dsGetRecordEntry(pNodeRef, pTmpBuf, 1, &hRecAttrListRef, &pRecEntry);
                 if (dsErr == eDSNoErr)
                 {
                     for (size_t i = 1; i <= pRecEntry->fRecordAttributeCount; ++i)
                     {
-                        tAttributeValueListRef pAttrValueListRef = NULL;
+                        tAttributeValueListRef hAttrValueListRef = 0;
                         tAttributeEntryPtr pAttrEntry = NULL;
                         /* Get the information for this attribute. */
-                        dsErr = dsGetAttributeEntry(pNodeRef, pTmpBuf, pRecAttrListRef, i,
-                                                    &pAttrValueListRef, &pAttrEntry);
+                        dsErr = dsGetAttributeEntry(pNodeRef, pTmpBuf, hRecAttrListRef, i,
+                                                    &hAttrValueListRef, &pAttrEntry);
                         if (dsErr == eDSNoErr)
                         {
                             tAttributeValueEntryPtr pValueEntry = NULL;
                             /* Has any value? */
                             if (pAttrEntry->fAttributeValueCount > 0)
                             {
-                                dsErr = dsGetAttributeValue(pNodeRef, pTmpBuf, 1, pAttrValueListRef, &pValueEntry);
+                                dsErr = dsGetAttributeValue(pNodeRef, pTmpBuf, 1, hAttrValueListRef, &pValueEntry);
                                 if (dsErr == eDSNoErr)
                                 {
                                     /* Check for kDSNAttrMetaNodeLocation */
@@ -126,8 +126,8 @@ tDirStatus userAuthInfo(tDirReference pDirRef, tDirNodeReference pNodeRef, const
 
                             if (pValueEntry != NULL)
                                 dsDeallocAttributeValueEntry(pDirRef, pValueEntry);
-                            if (pAttrValueListRef)
-                                dsCloseAttributeValueList(pAttrValueListRef);
+                            if (hAttrValueListRef)
+                                dsCloseAttributeValueList(hAttrValueListRef);
                             if (pAttrEntry != NULL)
                                 dsDeallocAttributeEntry(pDirRef, pAttrEntry);
 
@@ -155,15 +155,15 @@ tDirStatus userAuthInfo(tDirReference pDirRef, tDirNodeReference pNodeRef, const
                     if (dsCleanErr == eDSNoErr)
                         free(pAuthNodeList);
                 }
-                if (pRecAttrListRef)
-                    dsCloseAttributeList(pRecAttrListRef);
+                if (hRecAttrListRef)
+                    dsCloseAttributeList(hRecAttrListRef);
                 if (pRecEntry != NULL)
                     dsDeallocRecordEntry(pDirRef, pRecEntry);
             }
             else
                 dsErr = eDSRecordNotFound;
-            if (pCtx)
-                dsReleaseContinueData(pDirRef, pCtx);
+            if (hCtx)
+                dsReleaseContinueData(pDirRef, hCtx);
         }
         else
             dsErr = eDSAllocationFailed;
@@ -197,8 +197,8 @@ tDirStatus authWithNode(tDirReference pDirRef, tDataListPtr pAuthNodeList, const
 {
     tDirStatus dsErr = eDSNoErr;
     /* Open the authentication node. */
-    tDirNodeReference pAuthNodeRef = NULL;
-    dsErr = dsOpenDirNode(pDirRef, pAuthNodeList, &pAuthNodeRef);
+    tDirNodeReference hAuthNodeRef = 0;
+    dsErr = dsOpenDirNode(pDirRef, pAuthNodeList, &hAuthNodeRef);
     if (dsErr == eDSNoErr)
     {
         /* How like we to authenticate! */
@@ -235,7 +235,7 @@ tDirStatus authWithNode(tDirReference pDirRef, tDataListPtr pAuthNodeList, const
                     memcpy(&pAuthInBuf->fBufferData[pAuthInBuf->fBufferLength], pszPassword, cPassword);
                     pAuthInBuf->fBufferLength += cPassword;
                     /* Now authenticate */
-                    dsErr = dsDoDirNodeAuth(pAuthNodeRef, pAuthMethod, true, pAuthInBuf, pAuthOutBuf, NULL);
+                    dsErr = dsDoDirNodeAuth(hAuthNodeRef, pAuthMethod, true, pAuthInBuf, pAuthOutBuf, NULL);
                     /* Clean up. */
                     dsDataBufferDeAllocate(pDirRef, pAuthInBuf);
                 }
@@ -249,25 +249,30 @@ tDirStatus authWithNode(tDirReference pDirRef, tDataListPtr pAuthNodeList, const
         }
         else
             dsErr = eDSAllocationFailed;
-        dsCloseDirNode(pAuthNodeRef);
+        dsCloseDirNode(hAuthNodeRef);
     }
 
     return dsErr;
 }
 
 RT_C_DECLS_BEGIN
-DECLEXPORT(AuthResult) AUTHCALL AuthEntry(const char *szCaller,
+DECLEXPORT(FNAUTHENTRY3) AuthEntry;
+RT_C_DECLS_END
+
+DECLEXPORT(AuthResult) AUTHCALL AuthEntry(const char *pszCaller,
                                           PAUTHUUID pUuid,
                                           AuthGuestJudgement guestJudgement,
-                                          const char *szUser,
-                                          const char *szPassword,
-                                          const char *szDomain,
+                                          const char *pszUser,
+                                          const char *pszPassword,
+                                          const char *pszDomain,
                                           int fLogon,
                                           unsigned clientId)
 {
+    RT_NOREF(pszCaller, pUuid, guestJudgement, pszDomain, clientId);
+
     /* Validate input */
-    AssertPtrReturn(szUser, AuthResultAccessDenied);
-    AssertPtrReturn(szPassword, AuthResultAccessDenied);
+    AssertPtrReturn(pszUser, AuthResultAccessDenied);
+    AssertPtrReturn(pszPassword, AuthResultAccessDenied);
 
     /* Result to a default value */
     AuthResult result = AuthResultAccessDenied;
@@ -278,19 +283,19 @@ DECLEXPORT(AuthResult) AUTHCALL AuthEntry(const char *szCaller,
 
     tDirStatus dsErr = eDSNoErr;
     tDirStatus dsCleanErr = eDSNoErr;
-    tDirReference pDirRef = NULL;
+    tDirReference hDirRef = 0;
     /* Connect to the Directory Service. */
-    dsErr = dsOpenDirService(&pDirRef);
+    dsErr = dsOpenDirService(&hDirRef);
     if (dsErr == eDSNoErr)
     {
         /* Fetch the default search node */
         tDataListPtr pSearchNodeList = NULL;
-        dsErr = defaultSearchNodePath(pDirRef, &pSearchNodeList);
+        dsErr = defaultSearchNodePath(hDirRef, &pSearchNodeList);
         if (dsErr == eDSNoErr)
         {
             /* Open the default search node */
-            tDirNodeReference pSearchNodeRef = NULL;
-            dsErr = dsOpenDirNode(pDirRef, pSearchNodeList, &pSearchNodeRef);
+            tDirNodeReference hSearchNodeRef = 0;
+            dsErr = dsOpenDirNode(hDirRef, pSearchNodeList, &hSearchNodeRef);
             if (dsErr == eDSNoErr)
             {
                 /* Search for the user info, fetch the authentication node &
@@ -298,29 +303,26 @@ DECLEXPORT(AuthResult) AUTHCALL AuthEntry(const char *szCaller,
                  * specify a long user name even if the name which is used to
                  * authenticate has the short form. */
                 tDataListPtr pAuthNodeList = NULL;
-                dsErr = userAuthInfo(pDirRef, pSearchNodeRef, szUser, &pAuthNodeList);
+                dsErr = userAuthInfo(hDirRef, hSearchNodeRef, pszUser, &pAuthNodeList);
                 if (dsErr == eDSNoErr)
                 {
                     /* Open the authentication node and do the authentication. */
-                    dsErr = authWithNode(pDirRef, pAuthNodeList, szUser, szPassword);
+                    dsErr = authWithNode(hDirRef, pAuthNodeList, pszUser, pszPassword);
                     if (dsErr == eDSNoErr)
                         result = AuthResultAccessGranted;
-                    dsCleanErr = dsDataListDeallocate(pDirRef, pAuthNodeList);
+                    dsCleanErr = dsDataListDeallocate(hDirRef, pAuthNodeList);
                     if (dsCleanErr == eDSNoErr)
                         free(pAuthNodeList);
                 }
-                dsCloseDirNode(pSearchNodeRef);
+                dsCloseDirNode(hSearchNodeRef);
             }
-            dsCleanErr = dsDataListDeallocate(pDirRef, pSearchNodeList);
+            dsCleanErr = dsDataListDeallocate(hDirRef, pSearchNodeList);
             if (dsCleanErr == eDSNoErr)
                 free(pSearchNodeList);
         }
-        dsCloseDirService(pDirRef);
+        dsCloseDirService(hDirRef);
     }
 
     return result;
 }
-RT_C_DECLS_END
-
-static PAUTHENTRY3 gpfnAuthEntry = AuthEntry;
 
diff --git a/src/VBox/HostServices/auth/pam/VBoxAuthPAM.c b/src/VBox/HostServices/auth/pam/VBoxAuthPAM.c
index d80395f..4721945 100644
--- a/src/VBox/HostServices/auth/pam/VBoxAuthPAM.c
+++ b/src/VBox/HostServices/auth/pam/VBoxAuthPAM.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -240,8 +240,8 @@ static const char *auth_get_pam_service (void)
 
 typedef struct _PamContext
 {
-    char *szUser;
-    char *szPassword;
+    char *pszUser;
+    char *pszPassword;
 } PamContext;
 
 static int conv (int num_msg, const struct pam_message **msg,
@@ -258,7 +258,7 @@ static int conv (int num_msg, const struct pam_message **msg,
         return PAM_CONV_ERR;
     }
 
-    debug_printf("conv: num %d u[%s] p[%d]\n", num_msg, ctx->szUser, ctx->szPassword? strlen (ctx->szPassword): 0);
+    debug_printf("conv: num %d u[%s] p[%d]\n", num_msg, ctx->pszUser, ctx->pszPassword? strlen (ctx->pszPassword): 0);
 
     r = (struct pam_response *) calloc (num_msg, sizeof (struct pam_response));
 
@@ -273,12 +273,12 @@ static int conv (int num_msg, const struct pam_message **msg,
 
         if (msg[i]->msg_style == PAM_PROMPT_ECHO_OFF)
         {
-            r[i].resp = strdup (ctx->szPassword);
+            r[i].resp = strdup (ctx->pszPassword);
             debug_printf("conv: %d returning password [%d]\n", i, r[i].resp? strlen (r[i].resp): 0);
         }
         else if (msg[i]->msg_style == PAM_PROMPT_ECHO_ON)
         {
-            r[i].resp = strdup (ctx->szUser);
+            r[i].resp = strdup (ctx->pszUser);
             debug_printf("conv: %d returning name [%s]\n", i, r[i].resp);
         }
         else
@@ -304,40 +304,36 @@ static int conv (int num_msg, const struct pam_message **msg,
 #endif
 
 /* prototype to prevent gcc warning */
-DECLEXPORT(AuthResult) AUTHCALL AuthEntry(const char *szCaller,
-                                          PAUTHUUID pUuid,
-                                          AuthGuestJudgement guestJudgement,
-                                          const char *szUser,
-                                          const char *szPassword,
-                                          const char *szDomain,
-                                          int fLogon,
-                                          unsigned clientId);
-DECLEXPORT(AuthResult) AUTHCALL AuthEntry(const char *szCaller,
+DECLEXPORT(AUTHENTRY3) AuthEntry;
+
+DECLEXPORT(AuthResult) AUTHCALL AuthEntry(const char *pszCaller,
                                           PAUTHUUID pUuid,
                                           AuthGuestJudgement guestJudgement,
-                                          const char *szUser,
-                                          const char *szPassword,
-                                          const char *szDomain,
+                                          const char *pszUser,
+                                          const char *pszPassword,
+                                          const char *pszDomain,
                                           int fLogon,
                                           unsigned clientId)
 {
     AuthResult result = AuthResultAccessDenied;
-
     int rc;
-
     PamContext ctx;
     struct pam_conv pam_conversation;
-
     pam_handle_t *pam_handle = NULL;
 
+    (void)pszCaller;
+    (void)pUuid;
+    (void)guestJudgement;
+    (void)clientId;
+
     /* Only process logon requests. */
     if (!fLogon)
         return result; /* Return value is ignored by the caller. */
 
-    debug_printf("u[%s], d[%s], p[%d]\n", szUser, szDomain, szPassword? strlen (szPassword): 0);
+    debug_printf("u[%s], d[%s], p[%d]\n", pszUser, pszDomain, pszPassword ? strlen(pszPassword) : 0);
 
-    ctx.szUser     = (char *)szUser;
-    ctx.szPassword = (char *)szPassword;
+    ctx.pszUser     = (char *)pszUser;
+    ctx.pszPassword = (char *)pszPassword;
 
     pam_conversation.conv        = conv;
     pam_conversation.appdata_ptr = &ctx;
@@ -348,7 +344,7 @@ DECLEXPORT(AuthResult) AUTHCALL AuthEntry(const char *szCaller,
     {
         debug_printf("init ok\n");
 
-        rc = fn_pam_start(auth_get_pam_service (), szUser, &pam_conversation, &pam_handle);
+        rc = fn_pam_start(auth_get_pam_service (), pszUser, &pam_conversation, &pam_handle);
 
         if (rc == PAM_SUCCESS)
         {
@@ -404,5 +400,3 @@ DECLEXPORT(AuthResult) AUTHCALL AuthEntry(const char *szCaller,
     return result;
 }
 
-/* Verify the function prototype. */
-static PAUTHENTRY3 gpfnAuthEntry = AuthEntry;
diff --git a/src/VBox/HostServices/auth/simple/VBoxAuthSimple.cpp b/src/VBox/HostServices/auth/simple/VBoxAuthSimple.cpp
index 476a678..106d23a 100644
--- a/src/VBox/HostServices/auth/simple/VBoxAuthSimple.cpp
+++ b/src/VBox/HostServices/auth/simple/VBoxAuthSimple.cpp
@@ -1,7 +1,6 @@
+/* $Id: VBoxAuthSimple.cpp $ */
 /** @file
- *
- * VirtualBox External Authentication Library:
- * Simple Authentication.
+ * VirtualBox External Authentication Library - Simple Authentication.
  */
 
 /*
@@ -37,38 +36,38 @@ using namespace com;
 //#define AUTH_DEBUG_FILE_NAME "/tmp/VBoxAuth.log"
 
 
-static void dprintf(const char *fmt, ...)
+static void dprintf(const char *pszFormat, ...)
 {
 #ifdef AUTH_DEBUG_FILE_NAME
-    va_list va;
-
-    va_start(va, fmt);
-
-    char buffer[1024];
-
-    vsnprintf(buffer, sizeof(buffer), fmt, va);
-
     FILE *f = fopen(AUTH_DEBUG_FILE_NAME, "ab");
     if (f)
     {
-        fprintf(f, "%s", buffer);
+        va_list va;
+        va_start(va, pszFormat);
+        vfprintf(f, pszFormat, va);
+        va_end(va);
         fclose(f);
     }
-
-    va_end (va);
+#else
+    RT_NOREF(pszFormat);
 #endif
 }
 
 RT_C_DECLS_BEGIN
-DECLEXPORT(AuthResult) AUTHCALL AuthEntry(const char *szCaller,
+DECLEXPORT(FNAUTHENTRY3) AuthEntry;
+RT_C_DECLS_END
+
+DECLEXPORT(AuthResult) AUTHCALL AuthEntry(const char *pszCaller,
                                           PAUTHUUID pUuid,
                                           AuthGuestJudgement guestJudgement,
-                                          const char *szUser,
-                                          const char *szPassword,
-                                          const char *szDomain,
+                                          const char *pszUser,
+                                          const char *pszPassword,
+                                          const char *pszDomain,
                                           int fLogon,
                                           unsigned clientId)
 {
+    RT_NOREF(pszCaller, guestJudgement, pszDomain, clientId);
+
     /* default is failed */
     AuthResult result = AuthResultAccessDenied;
 
@@ -82,13 +81,13 @@ DECLEXPORT(AuthResult) AUTHCALL AuthEntry(const char *szCaller,
         RTUuidToStr((PCRTUUID)pUuid, (char*)uuid, RTUUID_STR_LENGTH);
 
     /* the user might contain a domain name, split it */
-    char *user = strchr((char*)szUser, '\\');
+    const char *user = strchr(pszUser, '\\');
     if (user)
         user++;
     else
-        user = (char*)szUser;
+        user = (char*)pszUser;
 
-    dprintf("VBoxAuth: uuid: %s, user: %s, szPassword: %s\n", uuid, user, szPassword);
+    dprintf("VBoxAuth: uuid: %s, user: %s, pszPassword: %s\n", uuid, user, pszPassword);
 
     ComPtr<IVirtualBoxClient> virtualBoxClient;
     ComPtr<IVirtualBox> virtualBox;
@@ -96,41 +95,43 @@ DECLEXPORT(AuthResult) AUTHCALL AuthEntry(const char *szCaller,
 
     rc = virtualBoxClient.createInprocObject(CLSID_VirtualBoxClient);
     if (SUCCEEDED(rc))
-        rc = virtualBoxClient->COMGETTER(VirtualBox)(virtualBox.asOutParam());
-    if (SUCCEEDED(rc))
     {
-        Bstr key = BstrFmt("VBoxAuthSimple/users/%s", user);
-        Bstr password;
-
-        /* lookup in VM's extra data? */
-        if (pUuid)
-        {
-            ComPtr<IMachine> machine;
-            virtualBox->FindMachine(Bstr(uuid).raw(), machine.asOutParam());
-            if (machine)
-                machine->GetExtraData(key.raw(), password.asOutParam());
-        } else
-            /* lookup global extra data */
-            virtualBox->GetExtraData(key.raw(), password.asOutParam());
-
-        if (!password.isEmpty())
+        rc = virtualBoxClient->COMGETTER(VirtualBox)(virtualBox.asOutParam());
+        if (SUCCEEDED(rc))
         {
-            /* calculate hash */
-            uint8_t abDigest[RTSHA256_HASH_SIZE];
-            RTSha256(szPassword, strlen(szPassword), abDigest);
-            char pszDigest[RTSHA256_DIGEST_LEN + 1];
-            RTSha256ToString(abDigest, pszDigest, sizeof(pszDigest));
-
-            if (password == pszDigest)
-                result = AuthResultAccessGranted;
+            Bstr key = BstrFmt("VBoxAuthSimple/users/%s", user);
+            Bstr password;
+
+            /* lookup in VM's extra data? */
+            if (pUuid)
+            {
+                ComPtr<IMachine> machine;
+                virtualBox->FindMachine(Bstr(uuid).raw(), machine.asOutParam());
+                if (machine)
+                    machine->GetExtraData(key.raw(), password.asOutParam());
+            }
+            else
+                /* lookup global extra data */
+                virtualBox->GetExtraData(key.raw(), password.asOutParam());
+
+            if (!password.isEmpty())
+            {
+                /* calculate hash */
+                uint8_t abDigest[RTSHA256_HASH_SIZE];
+                RTSha256(pszPassword, strlen(pszPassword), abDigest);
+                char pszDigest[RTSHA256_DIGEST_LEN + 1];
+                RTSha256ToString(abDigest, pszDigest, sizeof(pszDigest));
+
+                if (password == pszDigest)
+                    result = AuthResultAccessGranted;
+            }
         }
+        else
+            dprintf("VBoxAuth: failed to get VirtualBox object reference: %#x\n", rc);
     }
     else
-        dprintf("VBoxAuth: failed to get VirtualBox object reference: %Rhrc\n", rc);
+        dprintf("VBoxAuth: failed to get VirtualBoxClient object reference: %#x\n", rc);
 
     return result;
 }
-RT_C_DECLS_END
 
-/* Verify the function prototype. */
-static PAUTHENTRY3 gpfnAuthEntry = AuthEntry;
diff --git a/src/VBox/HostServices/auth/simple/VBoxAuthSimple.rc b/src/VBox/HostServices/auth/simple/VBoxAuthSimple.rc
index ab65b22..d30f4a7 100644
--- a/src/VBox/HostServices/auth/simple/VBoxAuthSimple.rc
+++ b/src/VBox/HostServices/auth/simple/VBoxAuthSimple.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/auth/winlogon/VBoxAuth.rc b/src/VBox/HostServices/auth/winlogon/VBoxAuth.rc
index 87d7784..1d3683c 100644
--- a/src/VBox/HostServices/auth/winlogon/VBoxAuth.rc
+++ b/src/VBox/HostServices/auth/winlogon/VBoxAuth.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/auth/winlogon/winlogon.cpp b/src/VBox/HostServices/auth/winlogon/winlogon.cpp
index 99c54e8..857b07d 100644
--- a/src/VBox/HostServices/auth/winlogon/winlogon.cpp
+++ b/src/VBox/HostServices/auth/winlogon/winlogon.cpp
@@ -1,11 +1,10 @@
+/* $Id: winlogon.cpp $ */
 /** @file
- *
- * VirtualBox External Authentication Library:
- * Windows Logon Authentication.
+ * VirtualBox External Authentication Library - Windows Logon Authentication.
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -19,12 +18,12 @@
 /* If defined, debug messages will be written to the debugger. */
 // #define AUTH_DEBUG
 
-#include <Windows.h>
-
+#include <iprt/win/windows.h>
 #include <VBox/VBoxAuth.h>
+#include <iprt/cdefs.h>
 
 #ifdef AUTH_DEBUG
-#include <stdio.h>
+# include <stdio.h>
 
 static void dprintfw(const WCHAR *fmt, ...)
 {
@@ -39,16 +38,16 @@ static void dprintfw(const WCHAR *fmt, ...)
 
    va_end(va);
 }
-#define DBGAUTH(a) dprintfw a
+# define DBGAUTH(a) dprintfw a
 #else
-#define DBGAUTH(a)
+# define DBGAUTH(a)
 #endif
 
-static WCHAR swszEmpty[] = { L"" };
+static WCHAR g_wszEmpty[] = { L"" };
 
 static void freeWideChar(WCHAR *pwszString)
 {
-    if (pwszString && pwszString != &swszEmpty[0])
+    if (pwszString && pwszString != &g_wszEmpty[0])
     {
         size_t cb = (wcslen(pwszString) + 1) * sizeof(WCHAR);
         SecureZeroMemory(pwszString, cb);
@@ -62,7 +61,7 @@ static WCHAR *utf8ToWideChar(const char *pszString)
      * Shortcut for empty strings.
      */
     if (!pszString || *pszString == 0)
-        return &swszEmpty[0];
+        return &g_wszEmpty[0];
 
     /*
      * Return NULL on errors.
@@ -97,34 +96,42 @@ static WCHAR *utf8ToWideChar(const char *pszString)
     return pwszString;
 }
 
+/* Prototype it to make sure we've got the right prototype. */
 extern "C"
 #if defined(_MSC_VER)
 __declspec(dllexport)
 #endif
-AuthResult AUTHCALL AuthEntry (const char *szCaller,
-                               PAUTHUUID pUuid,
-                               AuthGuestJudgement guestJudgement,
-                               const char *szUser,
-                               const char *szPassword,
-                               const char *szDomain,
-                               int fLogon,
-                               unsigned clientId)
+FNAUTHENTRY3 AuthEntry;
+
+/**
+ * @callback_method_impl{FNAUTHENTRY3}
+ */
+extern "C"
+AuthResult AUTHCALL AuthEntry(const char *pszCaller,
+                              PAUTHUUID pUuid,
+                              AuthGuestJudgement guestJudgement,
+                              const char *pszUser,
+                              const char *pszPassword,
+                              const char *pszDomain,
+                              int fLogon,
+                              unsigned clientId)
 {
+    RT_NOREF4(pszCaller, pUuid, guestJudgement, clientId);
     if (!fLogon)
     {
         /* Nothing to cleanup. The return code does not matter. */
         return AuthResultAccessDenied;
     }
 
-    LPWSTR lpwszUsername = utf8ToWideChar(szUser);
-    LPWSTR lpwszDomain   = utf8ToWideChar(szDomain);
-    LPWSTR lpwszPassword = utf8ToWideChar(szPassword);
+    LPWSTR pwszUsername = utf8ToWideChar(pszUser);
+    LPWSTR pwszDomain   = utf8ToWideChar(pszDomain);
+    LPWSTR pwszPassword = utf8ToWideChar(pszPassword);
 
     DBGAUTH((L"u[%ls], d[%ls], p[%ls]\n", lpwszUsername, lpwszDomain, lpwszPassword));
 
     AuthResult result = AuthResultAccessDenied;
 
-    if (lpwszUsername && lpwszDomain && lpwszPassword)
+    if (pwszUsername && pwszDomain && pwszPassword)
     {
         /* LOGON32_LOGON_INTERACTIVE is intended for users who will be interactively using the computer,
          * such as a user being logged on by a terminal server, remote shell, or similar process.
@@ -134,9 +141,9 @@ AuthResult AUTHCALL AuthEntry (const char *szCaller,
 
         HANDLE hToken;
 
-        BOOL fSuccess = LogonUserW(lpwszUsername,
-                                   lpwszDomain,
-                                   lpwszPassword,
+        BOOL fSuccess = LogonUserW(pwszUsername,
+                                   pwszDomain,
+                                   pwszPassword,
                                    dwLogonType,
                                    dwLogonProvider,
                                    &hToken);
@@ -155,12 +162,10 @@ AuthResult AUTHCALL AuthEntry (const char *szCaller,
         }
     }
 
-    freeWideChar(lpwszUsername);
-    freeWideChar(lpwszDomain);
-    freeWideChar(lpwszPassword);
+    freeWideChar(pwszUsername);
+    freeWideChar(pwszDomain);
+    freeWideChar(pwszPassword);
 
     return result;
 }
 
-/* Verify the function prototype. */
-static PAUTHENTRY3 gpfnAuthEntry = AuthEntry;
diff --git a/src/VBox/HostServices/testcase/Makefile.kmk b/src/VBox/HostServices/testcase/Makefile.kmk
index 9e5e347..531144f 100644
--- a/src/VBox/HostServices/testcase/Makefile.kmk
+++ b/src/VBox/HostServices/testcase/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2009-2015 Oracle Corporation
+# Copyright (C) 2009-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/testcase/tstHGCMSvc.cpp b/src/VBox/HostServices/testcase/tstHGCMSvc.cpp
index 1284f92..f8f4e02 100644
--- a/src/VBox/HostServices/testcase/tstHGCMSvc.cpp
+++ b/src/VBox/HostServices/testcase/tstHGCMSvc.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2010 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ImageMounter/VBoxFUSE/Makefile.kmk b/src/VBox/ImageMounter/VBoxFUSE/Makefile.kmk
index ada53d9..f14e9ab 100644
--- a/src/VBox/ImageMounter/VBoxFUSE/Makefile.kmk
+++ b/src/VBox/ImageMounter/VBoxFUSE/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2009-2015 Oracle Corporation
+# Copyright (C) 2009-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ImageMounter/VBoxFUSE/VBoxFUSE.cpp b/src/VBox/ImageMounter/VBoxFUSE/VBoxFUSE.cpp
index 6edff0e..beebeea 100644
--- a/src/VBox/ImageMounter/VBoxFUSE/VBoxFUSE.cpp
+++ b/src/VBox/ImageMounter/VBoxFUSE/VBoxFUSE.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/Config.kmk b/src/VBox/Installer/Config.kmk
index f033aff..b0a4997 100644
--- a/src/VBox/Installer/Config.kmk
+++ b/src/VBox/Installer/Config.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2015 Oracle Corporation
+# Copyright (C) 2015-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/Makefile.kmk b/src/VBox/Installer/Makefile.kmk
index 5c21d4e..0861f19 100644
--- a/src/VBox/Installer/Makefile.kmk
+++ b/src/VBox/Installer/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/common/Makefile.kmk b/src/VBox/Installer/common/Makefile.kmk
index b0f91d1..3b1302b 100644
--- a/src/VBox/Installer/common/Makefile.kmk
+++ b/src/VBox/Installer/common/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/darwin/Makefile.kmk b/src/VBox/Installer/darwin/Makefile.kmk
index 6e51aed..e64d13b 100644
--- a/src/VBox/Installer/darwin/Makefile.kmk
+++ b/src/VBox/Installer/darwin/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/freebsd/Makefile.kmk b/src/VBox/Installer/freebsd/Makefile.kmk
index b513657..46e8389 100644
--- a/src/VBox/Installer/freebsd/Makefile.kmk
+++ b/src/VBox/Installer/freebsd/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/linux/Makefile.kmk b/src/VBox/Installer/linux/Makefile.kmk
index 143f895..f2277d0 100644
--- a/src/VBox/Installer/linux/Makefile.kmk
+++ b/src/VBox/Installer/linux/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/linux/prerm-common.sh b/src/VBox/Installer/linux/prerm-common.sh
index 776fffd..a16181d 100755
--- a/src/VBox/Installer/linux/prerm-common.sh
+++ b/src/VBox/Installer/linux/prerm-common.sh
@@ -29,6 +29,8 @@
 # stopped (installers may show an error themselves or just pass on standard
 # error).
 
+OLDMODULES="vboxdrv vboxnetflt vboxnetadp vboxpci"
+
 # The below is GNU-specific.  See VBox.sh for the longer Solaris/OS X version.
 TARGET=`readlink -e -- "${0}"` || exit 1
 MY_PATH="${TARGET%/[!/]*}"
@@ -67,11 +69,15 @@ remove_init_script vboxnet >/dev/null 2>&1
 rm -f /sbin/vboxconfig
 # Remove any generated modules
 if [ -z "$VBOX_DONT_REMOVE_OLD_MODULES" ]; then
-    for folder in /lib/modules/*/misc /lib/modules/*/kernel/misc; do
-        ## @todo not duplicate the names all over the place.
-        for file in vboxdrv.ko vboxnetflt.ko vboxnetadp.ko vboxpci.ko; do
-            test -f "${folder}/${file}" && rm -f "${folder}/${file}"
-        done
+    for i in ${OLDMODULES}; do
+        # Remove old modules.
+        rm -f /lib/modules/*/misc/"${i}"*
+        # This second is no longer used.  Remove the line some time.
+        rm -f /lib/modules/*/kernel/misc/"${i}"*
+    done
+    # Remove leftover module folders.
+    for i in /lib/modules/*/misc; do
+        test -d "${i}" && rmdir -p "${i}" 2>/dev/null
     done
 fi
 exit 0
diff --git a/src/VBox/Installer/linux/routines.sh b/src/VBox/Installer/linux/routines.sh
index bf0d6fc..9343662 100644
--- a/src/VBox/Installer/linux/routines.sh
+++ b/src/VBox/Installer/linux/routines.sh
@@ -357,9 +357,9 @@ maybe_run_python_bindings_installer() {
     VBOX_INSTALL_PATH="${1}"
 
     PYTHON=python
-    if [ ! `python -c 'import sys
+    if [ "`python -c 'import sys
 if sys.version_info >= (2, 6):
-    print "test"' 2> /dev/null` = "test" ]; then
+    print \"test\"' 2> /dev/null`" != "test" ]; then
         echo  1>&2 "Python 2.6 or later not available, skipping bindings installation."
         return 1
     fi
diff --git a/src/VBox/Installer/linux/rpm/LocalConfig.kmk b/src/VBox/Installer/linux/rpm/LocalConfig.kmk
index f256565..9a5118a 100644
--- a/src/VBox/Installer/linux/rpm/LocalConfig.kmk
+++ b/src/VBox/Installer/linux/rpm/LocalConfig.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/linux/run-inst.sh b/src/VBox/Installer/linux/run-inst.sh
deleted file mode 100755
index e6ded80..0000000
--- a/src/VBox/Installer/linux/run-inst.sh
+++ /dev/null
@@ -1,536 +0,0 @@
-#!/bin/sh
-#
-# Oracle VM VirtualBox
-# VirtualBox Makeself installation starter script
-# for Linux Guest Additions
-
-#
-# Copyright (C) 2006-2015 Oracle Corporation
-#
-# This file is part of VirtualBox Open Source Edition (OSE), as
-# available from http://www.virtualbox.org. This file is free software;
-# you can redistribute it and/or modify it under the terms of the GNU
-# General Public License (GPL) as published by the Free Software
-# Foundation, in version 2 as it comes in the "COPYING" file of the
-# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
-# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-#
-
-# This is a stub installation script to be included in VirtualBox Makeself
-# installers which removes any previous installations of the package, unpacks
-# the package into the filesystem (by default under /opt) and starts the real
-# installation script.
-#
-PATH=$PATH:/bin:/sbin:/usr/sbin
-
-# Note: These variable names must *not* clash with variables in $CONFIG_DIR/$CONFIG!
-PACKAGE="_PACKAGE_"
-PACKAGE_NAME="_PACKAGE_NAME_"
-UNINSTALL="uninstall.sh"
-ROUTINES="routines.sh"
-ARCH="_ARCH_"
-INSTALLATION_VER="_VERSION_"
-INSTALLATION_REV="_SVNREV_"
-BUILD_TYPE="_BUILDTYPE_"
-USERNAME="_USERNAME_"
-UNINSTALL_SCRIPTS="_UNINSTALL_SCRIPTS_"
-
-INSTALLATION_DIR="/opt/$PACKAGE-$INSTALLATION_VER"
-CONFIG_DIR="/var/lib/$PACKAGE"
-CONFIG="config"
-CONFIG_FILES="filelist"
-SELF=$1
-LOGFILE="/var/log/$PACKAGE.log"
-
-. "./$ROUTINES"
-
-check_root
-
-create_log "$LOGFILE"
-
-## @todo r=andy: Explain options like "force" and "no_setup" -- not self-explanatory
-#        to the user.
-usage()
-{
-    info ""
-    info "Usage: $SELF install [<installation directory>]"
-    info "       [--with-<module>] |"
-    info "       uninstall"
-    info "       [--force] [--no-setup]"
-    info ""
-    info "Example:"
-    info "$SELF install"
-    exit 1
-}
-
-# Create a symlink in the filesystem and add it to the list of package files
-add_symlink()
-{
-    self=add_symlink
-    ## Parameters:
-    # The file the link should point to
-    target="$1"
-    # The name of the actual symlink file.  Must be an absolute path to a
-    # non-existing file in an existing directory.
-    link="$2"
-    link_dir="`dirname "$link"`"
-    test -n "$target" ||
-        { echo 1>&2 "$self: no target specified"; return 1; }
-    test -d "$link_dir" ||
-        { echo 1>&2 "$self: link directory $link_dir does not exist"; return 1; }
-    expr "$link" : "/.*" > /dev/null ||
-        { echo 1>&2 "$self: link file name is not absolute"; return 1; }
-    rm -f "$link"
-    ln -s "$target" "$link"
-    echo "$link" >> "$CONFIG_DIR/$CONFIG_FILES"
-}
-
-# Create symbolic links targeting all files in a directory in another
-# directory in the filesystem
-link_into_fs()
-{
-    ## Parameters:
-    # Directory containing the link target files
-    target_branch="$1"
-    # Directory to create the link files in
-    directory="$2"
-    for i in "$INSTALLATION_DIR/$target_branch"/*; do
-        test -e "$i" &&
-            add_symlink "$i" "$directory/`basename $i`"
-    done
-}
-
-# Look for broken installations or installations without a known uninstaller
-# and try to clean them up, asking the user first.
-def_uninstall()
-{
-    ## Parameters:
-    # Whether to force cleanup without asking the user
-    force="$1"
-
-    . ./deffiles
-    found=0
-    for i in "/opt/$PACKAGE-"*; do
-        test -e "$i" && found=1
-    done
-    for i in $DEFAULT_FILE_NAMES; do
-        test "$found" = 0 && test -e "$i" && found=1
-    done
-    test "$found" = 0 &&
-        for i in $DEFAULT_VERSIONED_FILE_NAMES; do
-            for j in $i-*; do
-                test "$found" = 0 && test -e "$j" && found=1
-            done
-        done
-    test "$found" = 0 && return 0
-    if ! test "$1" = "force" ; then
-        cat 1>&2 << EOF
-You appear to have a version of the _PACKAGE_ software
-on your system which was installed from a different source or using a
-different type of installer.  If you installed it from a package from your
-Linux distribution or if it is a default part of the system then we strongly
-recommend that you cancel this installation and remove it properly before
-installing this version.  If this is simply an older or a damaged
-installation you may safely proceed.
-
-Do you wish to continue anyway? [yes or no]
-EOF
-        read reply dummy
-        if ! expr "$reply" : [yY] > /dev/null &&
-            ! expr "$reply" : [yY][eE][sS] > /dev/null
-        then
-            info
-            info "Cancelling installation."
-            return 1
-        fi
-    fi
-    # Stop what we can in the way of services and remove them from the
-    # system
-    for i in $UNINSTALL_SCRIPTS; do
-        stop_init_script "$i" 2>> "${LOGFILE}"
-        test -z "$NO_CLEANUP" && test -x "./$i" && "./$i" cleanup 1>&2 2>> "$LOGFILE"
-        delrunlevel "$i" 2>> "${LOGFILE}"
-        remove_init_script "$i" 2>> "${LOGFILE}"
-    done
-    for i in "/opt/$PACKAGE-"*/init/*; do
-      test -z "$NO_CLEANUP" && grep -q '^# *cleanup_script *$' "${i}" && "${i}" cleanup 1>&2 2>> "$LOGFILE"
-    done
-
-    # Get rid of any remaining files
-    for i in $DEFAULT_FILE_NAMES; do
-        rm -f "$i" 2> /dev/null
-    done
-    for i in $DEFAULT_VERSIONED_FILE_NAMES; do
-        rm -f "$i-"* 2> /dev/null
-    done
-    rm -f "/usr/lib/$PACKAGE" "/usr/lib64/$PACKAGE" "/usr/share/$PACKAGE" \
-        "/usr/lib/i386-linux-gnu/$PACKAGE" "/usr/lib/x86_64-linux-gnu/$PACKAGE"
-
-    # And any packages left under /opt
-    for i in "/opt/$PACKAGE-"*; do
-        test -d "$i" && rm -rf "$i"
-    done
-    return 0
-}
-
-info "$PACKAGE_NAME installer"
-
-# Check architecture
-cpu=`uname -m`;
-case "$cpu" in
-  i[3456789]86|x86)
-    cpu="x86"
-    lib_candidates="/usr/lib/i386-linux-gnu /usr/lib /lib"
-    ;;
-  x86_64|amd64)
-    cpu="amd64"
-    lib_candidates="/usr/lib/x86_64-linux-gnu /usr/lib64 /usr/lib /lib64 /lib"
-    ;;
-  *)
-    cpu="unknown"
-esac
-ARCH_PACKAGE="$PACKAGE-$cpu.tar.bz2"
-if [ ! -r "$ARCH_PACKAGE" ]; then
-  info "Detected unsupported $cpu machine type."
-  exit 1
-fi
-# Find the most appropriate libary folder by seeing which of the candidate paths
-# are actually in the shared linker path list and choosing the first.  We look
-# for Debian-specific paths first, then LSB ones, then the new RedHat ones.
-libs=`ldconfig -v 2>/dev/null | grep -v ^$'\t'`
-for i in $lib_candidates; do
-  if echo $libs | grep -q $i; then
-    lib_path=$i
-    break
-  fi
-done
-if [ ! -x "$lib_path" ]; then
-  info "Unable to determine correct library path."
-  exit 1
-fi
-
-# Sensible default actions
-ACTION="install"
-DO_SETUP="true"
-NO_CLEANUP=""
-FORCE_UPGRADE=""
-
-while [ $# -ge 2 ];
-do
-    ARG=$2
-    shift
-
-    if [ -z "$MY_END_OF_OPTIONS" ]; then
-        case "$ARG" in
-
-            install)
-                ACTION="install"
-                ;;
-
-            uninstall)
-                ACTION="uninstall"
-                ;;
-
-            ## @todo Add per-module options handling, e.g. --lightdm-greeter-dir
-             #       or --lightdm-config
-
-            ## @todo Add listing all available modules (+ their options, e.g.
-             #       with callback mod_mymod_show_options?)
-
-            --with-*)
-                MODULE_CUR=`expr "$ARG" : '--with-\(.*\)'`
-                # Check if corresponding module in installer/module-$1 exists.
-                # Note: Module names may not contain spaces or other funny things.
-                if [ ! -f "./installer/module-${MODULE_CUR}" ]; then
-                    info "Error: Module \"${MODULE_CUR}\" does not exist."
-                    usage
-                fi
-                # Give the module the chance of doing initialization work / checks.
-                . "./installer/module-${MODULE_CUR}"
-                mod_${MODULE_CUR}_init
-                if test $? -ne 0; then
-                    echo 1>&2 "Module '${MODULE_CUR}' failed to initialize"
-                    if ! test "$FORCE_UPGRADE" = "force"; then
-                        return 1
-                    fi
-                    # Continue initialization.
-                fi
-                # Add module to the list of modules to handle later.
-                if test -z "${INSTALLATION_MODULES_LIST}"; then
-                    INSTALLATION_MODULES_LIST="${MODULE_CUR}"
-                else
-                    INSTALLATION_MODULES_LIST="${INSTALLATION_MODULES_LIST} ${MODULE_CUR}"
-                fi
-                shift
-                ;;
-
-            --force|force) # Keep "force" for backwards compatibility.
-                FORCE_UPGRADE="force"
-                ;;
-
-            --no-setup|no_setup) # Keep "no_setup" for backwards compatibility.
-                DO_SETUP=""
-                ;;
-
-            --no-cleanup|no_cleanup) # Keep "no_cleanup" for backwards compatibility.
-                # Do not do cleanup of old modules when removing them.  For
-                # testing purposes only.
-                DO_SETUP=""
-                NO_CLEANUP="no_cleanup"
-                ;;
-
-            --)
-                MY_END_OF_OPTIONS="1"
-                ;;
-
-            *)
-                if [ "`echo $1|cut -c1`" != "/" ]; then
-                    info "Please specify an absolute path"
-                    usage
-                fi
-                INSTALLATION_DIR="$1"
-                shift
-                ;;
-        esac
-    fi
-done
-
-# uninstall any previous installation
-INSTALL_DIR=""
-uninstalled=0
-test -r "$CONFIG_DIR/$CONFIG" &&
-    eval `grep ^INSTALL_DIR= "$CONFIG_DIR/$CONFIG"` 2>/dev/null &&
-    eval `grep ^UNINSTALLER= "$CONFIG_DIR/$CONFIG"` 2>/dev/null
-if test -n "$INSTALL_DIR" -a -x "$INSTALL_DIR/$UNINSTALLER"; then
-  "$INSTALL_DIR/$UNINSTALLER" $NO_CLEANUP 1>&2 ||
-    abort "Failed to remove existing installation.  Aborting..."
-  uninstalled=1
-fi
-test "$uninstalled" = 0 && def_uninstall "$FORCE_UPGRADE" && uninstalled=1
-test "$uninstalled" = 0 && exit 1
-rm -f "$CONFIG_DIR/$CONFIG"
-rm -f "$CONFIG_DIR/$CONFIG_FILES"
-rmdir "$CONFIG_DIR" 2>/dev/null
-test "$ACTION" = "install" || exit 0
-
-# Choose a proper umask
-umask 022
-
-# Set installer modules directory
-INSTALLATION_MODULES_DIR="$INSTALLATION_DIR/installer/"
-
-# install the new version
-mkdir -p -m 755 "$CONFIG_DIR"
-test ! -d "$INSTALLATION_DIR" && REMOVE_INSTALLATION_DIR=1
-mkdir -p -m 755 "$INSTALLATION_DIR"
-
-# install and load installer modules
-if [ -d installer ]; then
-  info "Copying additional installer modules ..."
-  mkdir -p -m 755 "$INSTALLATION_MODULES_DIR"
-  for CUR_FILE in `ls installer/*`; do
-      install -p -m 755 "$CUR_FILE" "$INSTALLATION_MODULES_DIR"
-      if [ $? -ne 0 ]; then
-          info "Error: Failed to copy installer module \"$CUR_FILE\""
-          if ! test "$FORCE_UPGRADE" = "force"; then
-              exit 1
-          fi
-      fi
-  done
-fi
-
-# Create a list of the files in the archive, skipping any directories which
-# already exist in the filesystem.
-bzip2 -d -c "$ARCH_PACKAGE" | tar -tf - |
-  while read name; do
-    fullname="$INSTALLATION_DIR/$name"
-    case "$fullname" in
-      */)
-        test ! -d "$fullname" &&
-          echo "$fullname" >> "$CONFIG_DIR/$CONFIG_FILES"
-        ;;
-      *)
-        echo "$fullname" >> "$CONFIG_DIR/$CONFIG_FILES"
-        ;;
-    esac
-  done
-bzip2 -d -c "$ARCH_PACKAGE" | tar -xf - -C "$INSTALLATION_DIR" || exit 1
-
-# Set symlinks into /usr and /sbin
-link_into_fs "bin" "/usr/bin"
-link_into_fs "sbin" "/usr/sbin"
-link_into_fs "lib" "$lib_path"
-add_symlink "$INSTALLATION_DIR/lib/$PACKAGE" /usr/lib/"$PACKAGE"
-link_into_fs "share" "/usr/share"
-link_into_fs "src" "/usr/src"
-
-if [ -d "$INSTALLATION_MODULES_DIR" ]; then
-  info "Installing additional modules ..."
-  for CUR_MODULE in `find "$INSTALLATION_MODULES_DIR" 2>/dev/null`
-      do
-          echo "$CUR_MODULE" >> "$CONFIG_DIR/$CONFIG_FILES"
-      done
-fi
-
-for CUR_MODULE in ${INSTALLATION_MODULES_LIST}
-do
-    mod_${CUR_MODULE}_install
-    if [ $? -ne 0 ]; then
-        info "Error: Failed to install module \"$CUR_MODULE\""
-        if ! test "$FORCE_UPGRADE" = "force"; then
-            exit 1
-        fi
-    fi
-done
-
-# Remember our installation configuration before we call any init scripts
-cat > "$CONFIG_DIR/$CONFIG" << EOF
-# $PACKAGE installation record.
-# Package installation directory
-INSTALL_DIR='$INSTALLATION_DIR'
-# Additional installation modules
-INSTALL_MODULES_DIR='$INSTALLATION_MODULES_DIR'
-INSTALL_MODULES_LIST='$INSTALLATION_MODULES_LIST'
-# Package uninstaller.  If you repackage this software, please make sure
-# that this prints a message and returns an error so that the default
-# uninstaller does not attempt to delete the files installed by your
-# package.
-UNINSTALLER='$UNINSTALL'
-# Package version
-INSTALL_VER='$INSTALLATION_VER'
-INSTALL_REV='$INSTALLATION_REV'
-# Build type and user name for logging purposes
-BUILD_TYPE='$BUILD_TYPE'
-USERNAME='$USERNAME'
-EOF
-
-# Give the modules the chance to write their stuff
-# to the installation config as well.
-if [ -n "${INSTALLATION_MODULES_LIST}" ]; then
-  info "Saving modules configuration ..."
-  for CUR_MODULE in ${INSTALLATION_MODULES_LIST}
-  do
-    echo "`mod_${CUR_MODULE}_config_save`" >> "$CONFIG_DIR/$CONFIG"
-  done
-fi
-
-# Install, set up and start init scripts
-for i in "$INSTALLATION_DIR/init/"*; do
-  if test -r "$i"; then
-    install_init_script "$i" "`basename "$i"`" 2>> "${LOGFILE}"
-    addrunlevel "`basename "$i"`" 2>> "${LOGFILE}"
-    if test -n "$DO_SETUP" && grep -q '^# *setup_script *$' "${i}"; then
-        if "${i}" setup 1>&2 2>> "${LOGFILE}"; then
-            start_init_script "`basename "$i"`" 2>> "${LOGFILE}"
-        else
-            echo 1>&2 "Failed to set up service `basename "$i"`, please check the log file"
-            echo 1>&2 "${LOGFILE} for details."
-        fi
-    fi
-  fi
-done
-
-cp $ROUTINES $INSTALLATION_DIR
-echo $INSTALLATION_DIR/$ROUTINES >> "$CONFIG_DIR/$CONFIG_FILES"
-cat > $INSTALLATION_DIR/$UNINSTALL << EOF
-#!/bin/sh
-# Auto-generated uninstallation file
-
-PATH=\$PATH:/bin:/sbin:/usr/sbin
-LOGFILE="/var/log/$PACKAGE-uninstall.log"
-
-# Read routines.sh
-if ! test -r "$INSTALLATION_DIR/$ROUTINES"; then
-    echo 1>&2 "Required file $ROUTINES not found.  Aborting..."
-    return 1
-fi
-. "$INSTALLATION_DIR/$ROUTINES"
-
-# We need to be run as root
-check_root
-
-create_log "\$LOGFILE"
-
-echo 1>&2 "Removing installed version $INSTALLATION_VER of $PACKAGE_NAME..."
-
-NO_CLEANUP=""
-if test "\$1" = "no_cleanup"; then
-    shift
-    NO_CLEANUP="no_cleanup"
-fi
-
-test -r "$CONFIG_DIR/$CONFIG_FILES" || abort "Required file $CONFIG_FILES not found.  Aborting..."
-
-# Stop and clean up all services
-for i in "$INSTALLATION_DIR/init/"*; do
-    if test -r "\$i"; then
-        stop_init_script "\`basename "\$i"\`" 2>> "${LOGFILE}"
-        test -z "\${NO_CLEANUP}" && grep -q '^# *cleanup_script *$' "\${i}" && "\${i}" cleanup 2>> "\$LOGFILE"
-        delrunlevel "\`basename "\$i"\`" 2>> "${LOGFILE}"
-        remove_init_script "\`basename "\$i"\`" 2>> "${LOGFILE}"
-    fi
-done
-
-# Load all modules
-# Important: This needs to be done before loading the configuration
-#            value below to not override values which are set to a default
-#            value in the modules itself.
-for CUR_MODULE in `find "$INSTALLATION_MODULES_DIR" -name "module-*" 2>/dev/null`
-    do
-        . "\$CUR_MODULE"
-    done
-
-# Load configuration values
-test -r "$CONFIG_DIR/$CONFIG" && . "$CONFIG_DIR/$CONFIG"
-
-# Call uninstallation initialization of all modules
-for CUR_MODULE in "$INSTALLATION_MODULES_LIST"
-    do
-        if test -z "\$CUR_MODULE"; then
-            continue
-        fi
-        mod_\${CUR_MODULE}_pre_uninstall
-        if [ $? -ne 0 ]; then
-            echo 1>&2 "Module \"\$CUR_MODULE\" failed to initialize uninstallation"
-            # Continue initialization.
-        fi
-    done
-
-# Call uninstallation of all modules
-for CUR_MODULE in "$INSTALLATION_MODULES_LIST"
-    do
-        if test -z "\$CUR_MODULE"; then
-            continue
-        fi
-        mod_\${CUR_MODULE}_uninstall
-        if [ $? -ne 0 ]; then
-            echo 1>&2 "Module \"\$CUR_MODULE\" failed to uninstall"
-            # Continue uninstallation.
-        fi
-    done
-
-# And remove all files and empty installation directories
-# Remove any non-directory entries
-cat "$CONFIG_DIR/$CONFIG_FILES" | xargs rm 2>/dev/null
-# Remove any empty (of files) directories in the file list
-cat "$CONFIG_DIR/$CONFIG_FILES" |
-    while read file; do
-        case "\$file" in
-            */)
-            test -d "\$file" &&
-                find "\$file" -depth -type d -exec rmdir '{}' ';' 2>/dev/null
-            ;;
-        esac
-    done
-
-# Remove configuration files
-rm "$CONFIG_DIR/$CONFIG_FILES" 2>/dev/null
-rm "$CONFIG_DIR/$CONFIG" 2>/dev/null
-rmdir "$CONFIG_DIR" 2>/dev/null
-exit 0
-EOF
-chmod 0755 $INSTALLATION_DIR/$UNINSTALL
-echo $INSTALLATION_DIR/$UNINSTALL >> "$CONFIG_DIR/$CONFIG_FILES"
-test -n "$REMOVE_INSTALLATION_DIR" &&
-  echo "$INSTALLATION_DIR/" >> "$CONFIG_DIR/$CONFIG_FILES"
-
diff --git a/src/VBox/Installer/linux/testcase/Makefile.kmk b/src/VBox/Installer/linux/testcase/Makefile.kmk
index f965671..90b170b 100644
--- a/src/VBox/Installer/linux/testcase/Makefile.kmk
+++ b/src/VBox/Installer/linux/testcase/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/linux/uninstall.sh b/src/VBox/Installer/linux/uninstall.sh
index c7139ae..2d60322 100755
--- a/src/VBox/Installer/linux/uninstall.sh
+++ b/src/VBox/Installer/linux/uninstall.sh
@@ -55,13 +55,6 @@ fi
 
 # Remove kernel module installed
 if [ -z "$VBOX_DONT_REMOVE_OLD_MODULES" ]; then
-    find /lib/modules/`uname -r` -name "vboxdrv\.*" 2>/dev/null|xargs rm -f 2> /dev/null
-    find /lib/modules/`uname -r` -name "vboxnetflt\.*" 2>/dev/null|xargs rm -f 2> /dev/null
-    find /lib/modules/`uname -r` -name "vboxnetadp\.*" 2>/dev/null|xargs rm -f 2> /dev/null
-    find /lib/modules/`uname -r` -name "vboxpci\.*" 2>/dev/null|xargs rm -f 2> /dev/null
-    # Remove directories we have installed to in the past
-    find /lib/modules/`uname -r` -name vbox\* 2>/dev/null|xargs rmdir -p 2> /dev/null
-    find /lib/modules/`uname -r` -name misc\* 2>/dev/null|xargs rmdir -p 2> /dev/null
     rm -f /usr/src/vboxhost-$INSTALL_VER 2> /dev/null
     rm -f /usr/src/vboxdrv-$INSTALL_VER 2> /dev/null
     rm -f /usr/src/vboxnetflt-$INSTALL_VER 2> /dev/null
diff --git a/src/VBox/Installer/linux/vboxdrv.sh b/src/VBox/Installer/linux/vboxdrv.sh
index d3bfc8c..66a3c61 100755
--- a/src/VBox/Installer/linux/vboxdrv.sh
+++ b/src/VBox/Installer/linux/vboxdrv.sh
@@ -26,6 +26,12 @@
 # Short-Description: VirtualBox Linux kernel module
 ### END INIT INFO
 
+## @todo This file duplicates a lot of script with vboxadd.sh.  When making
+# changes please try to reduce differences between the two wherever possible.
+
+## @todo Remove the stop_vms target so that this script is only relevant to
+# kernel modules.  Nice but not urgent.
+
 PATH=/sbin:/bin:/usr/sbin:/usr/bin:$PATH
 DEVICE=/dev/vboxdrv
 LOG="/var/log/vbox-install.log"
@@ -135,34 +141,12 @@ generate_udev_rule() {
     INSTALLATION_DIR="$3" # The directory VirtualBox is installed in
     USB_GROUP="$4"        # The group that has permission to access USB devices
     NO_INSTALL="$5"       # Set this to "1" to remove but not re-install rules
-    UDEV_STRING="$6"      # The output of the udev version command
 
     # Extra space!
     case "$USB_GROUP" in ?*) USB_GROUP=" $USB_GROUP" ;; esac
-    case "$NO_INSTALL" in
-    "1") ;;
-    *)
-        udev_ver=`expr "$UDEV_STRING" : '[^0-9]*\([0-9]*\)'`
-        udev_fix=""
-        test "$udev_ver" = "" -o "$udev_ver" -lt 55 &&
-            udev_fix="1"
-        udev_do_usb=""
-        test "$udev_ver" -ge 59 &&
-            udev_do_usb="1"
-        case "$udev_fix" in
-        "1")
-            udev_write_vboxdrv "$VBOXDRV_GRP" "$VBOXDRV_MODE" |
-                sed 's/\([^+=]*\)[+=]*\([^"]*"[^"]*"\)/\1=\2/g'
-            ;;
-        *)
-            udev_write_vboxdrv "$VBOXDRV_GRP" "$VBOXDRV_MODE"
-            case "$udev_do_usb" in "1")
-                udev_write_usb "$INSTALLATION_DIR" "$USB_GROUP" ;;
-            esac
-            ;;
-        esac
-        ;;
-    esac
+    case "$NO_INSTALL" in "1") return ;; esac
+    udev_write_vboxdrv "$VBOXDRV_GRP" "$VBOXDRV_MODE"
+    udev_write_usb "$INSTALLATION_DIR" "$USB_GROUP"
 }
 
 ## Install udev rule (disable with INSTALL_NO_UDEV=1 in
@@ -175,9 +159,8 @@ install_udev() {
     NO_INSTALL="$5"       # Set this to "1" to remove but not re-install rules
 
     if test -d /etc/udev/rules.d; then
-        udev_out="`udevadm version 2>/dev/null ||  udevinfo -V 2>/dev/null`"
         generate_udev_rule "$VBOXDRV_GRP" "$VBOXDRV_MODE" "$INSTALLATION_DIR" \
-                           "$USB_GROUP" "$NO_INSTALL" "$udev_out"
+                           "$USB_GROUP" "$NO_INSTALL"
     fi
     # Remove old udev description file
     rm -f /etc/udev/rules.d/10-vboxdrv.rules 2> /dev/null
@@ -342,7 +325,7 @@ stop()
 }
 
 # enter the following variables in /etc/default/virtualbox:
-#   SHUTDOWN_USERS="foo bar"  
+#   SHUTDOWN_USERS="foo bar"
 #     check for running VMs of user foo and user bar
 #   SHUTDOWN=poweroff
 #   SHUTDOWN=acpibutton
@@ -496,8 +479,7 @@ restart)
     stop && start
     ;;
 setup)
-    MODULE_BUILT=
-    start
+    setup && start
     ;;
 cleanup)
     stop && cleanup
diff --git a/src/VBox/Installer/solaris/Makefile.kmk b/src/VBox/Installer/solaris/Makefile.kmk
index d708937..1c239e7 100644
--- a/src/VBox/Installer/solaris/Makefile.kmk
+++ b/src/VBox/Installer/solaris/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2007-2015 Oracle Corporation
+# Copyright (C) 2007-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -356,7 +356,7 @@ ifdef VBOX_WITH_QTGUI
           libQt5WidgetsVBox.so.5 \
           plugins/platforms/libqxcb.so \
 	  $(if $(VBOX_GUI_USE_QGL),libQt5OpenGLVBox.so.5,)
-  endif  
+  endif
  else # VBOX_WITH_QTGUI_V5
   ifdef VBOX_WITH_ORACLE_QT
    SOLARIS_STRIP_BINS += \
@@ -446,7 +446,7 @@ ifndef VBOX_WITH_QTGUI_V5
  SOLARIS_QTLIBS.DST     := $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/$(VBOX_SI_ARCH)
  SOLARIS_QTLIBS =
  ifdef VBOX_WITH_QTGUI
-  ifdef VBOX_WITH_ORACLE_QT 
+  ifdef VBOX_WITH_ORACLE_QT
     SOLARIS_QTLIBS += \
        	  libQtXmlVBox.so.4 \
   	  libQtSqlVBox.so.4 \
diff --git a/src/VBox/Installer/solaris/VBoxISAExec.c b/src/VBox/Installer/solaris/VBoxISAExec.c
index b9d93dd..a2e260e 100644
--- a/src/VBox/Installer/solaris/VBoxISAExec.c
+++ b/src/VBox/Installer/solaris/VBoxISAExec.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/solaris/VBoxZoneAccess.c b/src/VBox/Installer/solaris/VBoxZoneAccess.c
index 0d0b4c1..82ca24d 100644
--- a/src/VBox/Installer/solaris/VBoxZoneAccess.c
+++ b/src/VBox/Installer/solaris/VBoxZoneAccess.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/solaris/vboxconfig.sh b/src/VBox/Installer/solaris/vboxconfig.sh
index c86eb8e..8fdf4e9 100755
--- a/src/VBox/Installer/solaris/vboxconfig.sh
+++ b/src/VBox/Installer/solaris/vboxconfig.sh
@@ -1195,10 +1195,10 @@ postinstall()
     if test -d "/opt/VirtualBox/legacy/"; then
         if test "$HOST_OS_MAJORVERSION" -eq 10; then
             for lib in `ls -1 /opt/VirtualBox/legacy/`; do
-	       /usr/sbin/installf -c none $PKGINST /opt/VirtualBox/$lib=legacy/$lib s 
-            done        
+	       /usr/sbin/installf -c none $PKGINST /opt/VirtualBox/$lib=legacy/$lib s
+            done
             for lib in `ls -1 /opt/VirtualBox/amd64/legacy/`; do
-                /usr/sbin/installf -c none $PKGINST /opt/VirtualBox/amd64/$lib=legacy/$lib s 
+                /usr/sbin/installf -c none $PKGINST /opt/VirtualBox/amd64/$lib=legacy/$lib s
             done
         fi
     fi
diff --git a/src/VBox/Installer/win/InstallHelper/Makefile.kmk b/src/VBox/Installer/win/InstallHelper/Makefile.kmk
index caed5c6..983788e 100644
--- a/src/VBox/Installer/win/InstallHelper/Makefile.kmk
+++ b/src/VBox/Installer/win/InstallHelper/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2008-2015 Oracle Corporation
+# Copyright (C) 2008-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/InstallHelper/VBoxCommon.cpp b/src/VBox/Installer/win/InstallHelper/VBoxCommon.cpp
index 6ea608c..e45d0ce 100644
--- a/src/VBox/Installer/win/InstallHelper/VBoxCommon.cpp
+++ b/src/VBox/Installer/win/InstallHelper/VBoxCommon.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -19,7 +19,7 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
-#include <windows.h>
+#include <iprt/win/windows.h>
 #include <tchar.h>
 #include <stdio.h>
 
diff --git a/src/VBox/Installer/win/InstallHelper/VBoxCommon.h b/src/VBox/Installer/win/InstallHelper/VBoxCommon.h
index cd3b004..3dad6c3 100644
--- a/src/VBox/Installer/win/InstallHelper/VBoxCommon.h
+++ b/src/VBox/Installer/win/InstallHelper/VBoxCommon.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.cpp b/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.cpp
index 66a510a..698d9d4 100644
--- a/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.cpp
+++ b/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@
 
 #include <VBox/version.h>
 
-#include <windows.h>
+#include <iprt/win/windows.h>
 #include <wchar.h>
 #include <stdio.h>
 
@@ -34,15 +34,15 @@
 #include <msiquery.h>
 
 #define _WIN32_DCOM
-#include <windows.h>
+#include <iprt/win/windows.h>
 #include <assert.h>
 #include <shellapi.h>
 #define INITGUID
 #include <guiddef.h>
 #include <devguid.h>
-#include <objbase.h>
-#include <setupapi.h>
-#include <shlobj.h>
+#include <iprt/win/objbase.h>
+#include <iprt/win/setupapi.h>
+#include <iprt/win/shlobj.h>
 #include <cfgmgr32.h>
 
 #include "VBoxCommon.h"
@@ -65,13 +65,13 @@
 #define MY_WTEXT(a_str)     MY_WTEXT_HLP(a_str)
 
 
-BOOL APIENTRY DllMain(HANDLE hModule,
-                      DWORD  ul_reason_for_call,
-                      LPVOID lpReserved)
+BOOL APIENTRY DllMain(HANDLE hModule, DWORD  uReason, LPVOID lpReserved)
 {
+    RT_NOREF3(hModule, uReason, lpReserved);
     return TRUE;
 }
 
+
 static void logString(MSIHANDLE hInstall, LPCSTR szString, ...)
 {
     PMSIHANDLE newHandle = MsiCreateRecord(2);
@@ -110,6 +110,8 @@ UINT __stdcall IsSerialCheckNeeded(MSIHANDLE hModule)
 {
 #ifndef VBOX_OSE
     /*BOOL bRet =*/ serialCheckNeeded(hModule);
+#else
+    RT_NOREF1(hModule);
 #endif
     return ERROR_SUCCESS;
 }
@@ -118,6 +120,8 @@ UINT __stdcall CheckSerial(MSIHANDLE hModule)
 {
 #ifndef VBOX_OSE
     /*BOOL bRet =*/ serialIsValid(hModule);
+#else
+    RT_NOREF1(hModule);
 #endif
     return ERROR_SUCCESS;
 }
@@ -500,8 +504,9 @@ UINT __stdcall InstallBranding(MSIHANDLE hModule)
 
 static MSIHANDLE g_hCurrentModule = NULL;
 
-static VOID vboxDrvLoggerCallback(VBOXDRVCFG_LOG_SEVERITY enmSeverity, char * msg, void * pvContext)
+static VOID vboxDrvLoggerCallback(VBOXDRVCFG_LOG_SEVERITY enmSeverity, char *pszMsg, void *pvContext)
 {
+    RT_NOREF1(pvContext);
     switch (enmSeverity)
     {
         case VBOXDRVCFG_LOG_SEVERITY_FLOW:
@@ -509,7 +514,7 @@ static VOID vboxDrvLoggerCallback(VBOXDRVCFG_LOG_SEVERITY enmSeverity, char * ms
             break;
         case VBOXDRVCFG_LOG_SEVERITY_REL:
             if (g_hCurrentModule)
-                logString(g_hCurrentModule, (LPCSTR)msg);
+                logString(g_hCurrentModule, pszMsg);
             break;
         default:
             break;
@@ -857,7 +862,6 @@ UINT __stdcall InstallNetLwf(MSIHANDLE hModule)
         uErr = doNetCfgInit(hModule, &pNetCfg, TRUE);
         if (uErr == ERROR_SUCCESS)
         {
-            WCHAR wszInfName[] = NETLWF_INF_NAME;
             WCHAR wszInf[MAX_PATH];
             DWORD cchInf = RT_ELEMENTS(wszInf) - sizeof(NETLWF_INF_NAME) - 1;
             UINT uErr = MsiGetPropertyW(hModule, L"CustomActionData", wszInf, &cchInf);
@@ -974,18 +978,16 @@ static UINT _createHostOnlyInterface(MSIHANDLE hModule, LPCWSTR pwszId, LPCWSTR
 #ifdef VBOX_WITH_NETFLT
     netCfgLoggerEnable(hModule);
 
-    BOOL bSetupModeInteractive = SetupSetNonInteractiveMode(FALSE);
-    bool bSetStaticIp = true;
+    BOOL fSetupModeInteractive = SetupSetNonInteractiveMode(FALSE);
 
     logStringW(hModule, L"CreateHostOnlyInterface: Creating host-only interface");
 
-    HRESULT hr;
-
+    HRESULT hr = E_FAIL;
     GUID guid;
     WCHAR wszMpInf[MAX_PATH];
-    DWORD cchMpInf = RT_ELEMENTS(wszMpInf) - wcslen(pwszInfName) - 1 - 1;
+    DWORD cchMpInf = RT_ELEMENTS(wszMpInf) - (DWORD)wcslen(pwszInfName) - 1 - 1;
     LPCWSTR pwszInfPath = NULL;
-    bool bIsFile = false;
+    bool fIsFile = false;
     UINT uErr = MsiGetPropertyW(hModule, L"CustomActionData", wszMpInf, &cchMpInf);
     if (uErr == ERROR_SUCCESS)
     {
@@ -1000,7 +1002,7 @@ static UINT _createHostOnlyInterface(MSIHANDLE hModule, LPCWSTR pwszId, LPCWSTR
 
             wcscat(wszMpInf, pwszInfName);
             pwszInfPath = wszMpInf;
-            bIsFile = true;
+            fIsFile = true;
 
             logStringW(hModule, L"CreateHostOnlyInterface: Resulting INF path = %s", pwszInfPath);
         }
@@ -1011,7 +1013,7 @@ static UINT _createHostOnlyInterface(MSIHANDLE hModule, LPCWSTR pwszId, LPCWSTR
         logStringW(hModule, L"CreateHostOnlyInterface: Unable to retrieve VBox installation path, error = 0x%x", uErr);
 
     /* Make sure the inf file is installed. */
-    if (pwszInfPath != NULL && bIsFile)
+    if (pwszInfPath != NULL && fIsFile)
     {
         logStringW(hModule, L"CreateHostOnlyInterface: Calling VBoxDrvCfgInfInstall(%s)", pwszInfPath);
         hr = VBoxDrvCfgInfInstall(pwszInfPath);
@@ -1043,9 +1045,9 @@ static UINT _createHostOnlyInterface(MSIHANDLE hModule, LPCWSTR pwszId, LPCWSTR
             logStringW(hModule, L"CreateHostOnlyInterface: calling VBoxNetCfgWinCreateHostOnlyNetworkInterface");
 #ifdef VBOXNETCFG_DELAYEDRENAME
             BSTR devId;
-            hr = VBoxNetCfgWinCreateHostOnlyNetworkInterface(pwszInfPath, bIsFile, &guid, &devId, NULL);
+            hr = VBoxNetCfgWinCreateHostOnlyNetworkInterface(pwszInfPath, fIsFile, &guid, &devId, NULL);
 #else /* !VBOXNETCFG_DELAYEDRENAME */
-            hr = VBoxNetCfgWinCreateHostOnlyNetworkInterface(pwszInfPath, bIsFile, &guid, NULL, NULL);
+            hr = VBoxNetCfgWinCreateHostOnlyNetworkInterface(pwszInfPath, fIsFile, &guid, NULL, NULL);
 #endif /* !VBOXNETCFG_DELAYEDRENAME */
             logStringW(hModule, L"CreateHostOnlyInterface: VBoxNetCfgWinCreateHostOnlyNetworkInterface returns 0x%x", hr);
             if (SUCCEEDED(hr))
@@ -1074,8 +1076,8 @@ static UINT _createHostOnlyInterface(MSIHANDLE hModule, LPCWSTR pwszId, LPCWSTR
 
     /* Restore original setup mode. */
     logStringW(hModule, L"CreateHostOnlyInterface: Almost done...");
-    if (bSetupModeInteractive)
-        SetupSetNonInteractiveMode(bSetupModeInteractive);
+    if (fSetupModeInteractive)
+        SetupSetNonInteractiveMode(fSetupModeInteractive);
 
     netCfgLoggerDisable();
 
@@ -1103,7 +1105,7 @@ static UINT _removeHostOnlyInterfaces(MSIHANDLE hModule, LPCWSTR pwszId)
 
     logStringW(hModule, L"RemoveHostOnlyInterfaces: Removing all host-only interfaces");
 
-    BOOL bSetupModeInteractive = SetupSetNonInteractiveMode(FALSE);
+    BOOL fSetupModeInteractive = SetupSetNonInteractiveMode(FALSE);
 
     HRESULT hr = VBoxNetCfgWinRemoveAllNetDevicesOfId(pwszId);
     if (SUCCEEDED(hr))
@@ -1121,8 +1123,8 @@ static UINT _removeHostOnlyInterfaces(MSIHANDLE hModule, LPCWSTR pwszId)
         logStringW(hModule, L"RemoveHostOnlyInterfaces: NetAdp uninstall failed, hr = 0x%x", hr);
 
     /* Restore original setup mode. */
-    if (bSetupModeInteractive)
-        SetupSetNonInteractiveMode(bSetupModeInteractive);
+    if (fSetupModeInteractive)
+        SetupSetNonInteractiveMode(fSetupModeInteractive);
 
     netCfgLoggerDisable();
 #endif /* VBOX_WITH_NETFLT */
@@ -1143,7 +1145,7 @@ static UINT _stopHostOnlyInterfaces(MSIHANDLE hModule, LPCWSTR pwszId)
 
     logStringW(hModule, L"StopHostOnlyInterfaces: Stopping all host-only interfaces");
 
-    BOOL bSetupModeInteractive = SetupSetNonInteractiveMode(FALSE);
+    BOOL fSetupModeInteractive = SetupSetNonInteractiveMode(FALSE);
 
     HRESULT hr = VBoxNetCfgWinPropChangeAllNetDevicesOfId(pwszId, VBOXNECTFGWINPROPCHANGE_TYPE_DISABLE);
     if (SUCCEEDED(hr))
@@ -1154,8 +1156,8 @@ static UINT _stopHostOnlyInterfaces(MSIHANDLE hModule, LPCWSTR pwszId)
         logStringW(hModule, L"StopHostOnlyInterfaces: Disabling host interfaces failed, hr = 0x%x", hr);
 
     /* Restore original setup mode. */
-    if (bSetupModeInteractive)
-        SetupSetNonInteractiveMode(bSetupModeInteractive);
+    if (fSetupModeInteractive)
+        SetupSetNonInteractiveMode(fSetupModeInteractive);
 
     netCfgLoggerDisable();
 #endif /* VBOX_WITH_NETFLT */
@@ -1176,12 +1178,12 @@ static UINT _updateHostOnlyInterfaces(MSIHANDLE hModule, LPCWSTR pwszInfName, LP
 
     logStringW(hModule, L"UpdateHostOnlyInterfaces: Updating all host-only interfaces");
 
-    BOOL bSetupModeInteractive = SetupSetNonInteractiveMode(FALSE);
+    BOOL fSetupModeInteractive = SetupSetNonInteractiveMode(FALSE);
 
     WCHAR wszMpInf[MAX_PATH];
-    DWORD cchMpInf = RT_ELEMENTS(wszMpInf) - wcslen(pwszInfName) - 1 - 1;
+    DWORD cchMpInf = RT_ELEMENTS(wszMpInf) - (DWORD)wcslen(pwszInfName) - 1 - 1;
     LPCWSTR pwszInfPath = NULL;
-    bool bIsFile = false;
+    bool fIsFile = false;
     UINT uErr = MsiGetPropertyW(hModule, L"CustomActionData", wszMpInf, &cchMpInf);
     if (uErr == ERROR_SUCCESS)
     {
@@ -1196,7 +1198,7 @@ static UINT _updateHostOnlyInterfaces(MSIHANDLE hModule, LPCWSTR pwszInfName, LP
 
             wcscat(wszMpInf, pwszInfName);
             pwszInfPath = wszMpInf;
-            bIsFile = true;
+            fIsFile = true;
 
             logStringW(hModule, L"UpdateHostOnlyInterfaces: Resulting INF path = %s", pwszInfPath);
 
@@ -1235,8 +1237,8 @@ static UINT _updateHostOnlyInterfaces(MSIHANDLE hModule, LPCWSTR pwszInfName, LP
         logStringW(hModule, L"UpdateHostOnlyInterfaces: Unable to retrieve VBox installation path, error = 0x%x", uErr);
 
     /* Restore original setup mode. */
-    if (bSetupModeInteractive)
-        SetupSetNonInteractiveMode(bSetupModeInteractive);
+    if (fSetupModeInteractive)
+        SetupSetNonInteractiveMode(fSetupModeInteractive);
 
     netCfgLoggerDisable();
 #endif /* VBOX_WITH_NETFLT */
@@ -1369,10 +1371,10 @@ static bool isTAPDevice(const WCHAR *pwszGUID)
     return bIsTapDevice;
 }
 
-#define SetErrBreak(strAndArgs) \
+#define SetErrBreak(args) \
     if (1) { \
         rc = 0; \
-        logStringW(hModule, strAndArgs); \
+        logStringW args; \
         break; \
     } else do {} while (0)
 
@@ -1396,18 +1398,21 @@ int removeNetworkInterface(MSIHANDLE hModule, const WCHAR *pwszGUID)
                      pwszGUID);
             LONG lStatus = RegOpenKeyExW(HKEY_LOCAL_MACHINE, wszRegLocation, 0, KEY_READ, &hkeyNetwork);
             if ((lStatus != ERROR_SUCCESS) || !hkeyNetwork)
-                SetErrBreak((L"VBox HostInterfaces: Host interface network was not found in registry (%s)! [1]", wszRegLocation));
+                SetErrBreak((hModule, L"VBox HostInterfaces: Host interface network was not found in registry (%s)! [1]",
+                             wszRegLocation));
 
             lStatus = RegOpenKeyExW(hkeyNetwork, L"Connection", 0, KEY_READ, &hkeyConnection);
             if ((lStatus != ERROR_SUCCESS) || !hkeyConnection)
-                SetErrBreak((L"VBox HostInterfaces: Host interface network was not found in registry (%s)! [2]", wszRegLocation));
+                SetErrBreak((hModule, L"VBox HostInterfaces: Host interface network was not found in registry (%s)! [2]",
+                             wszRegLocation));
 
             DWORD len = sizeof(wszPnPInstanceId);
             DWORD dwKeyType;
             lStatus = RegQueryValueExW(hkeyConnection, L"PnPInstanceID", NULL,
                                        &dwKeyType, (LPBYTE)&wszPnPInstanceId[0], &len);
             if ((lStatus != ERROR_SUCCESS) || (dwKeyType != REG_SZ))
-                SetErrBreak((L"VBox HostInterfaces: Host interface network was not found in registry (%s)! [3]", wszRegLocation));
+                SetErrBreak((hModule, L"VBox HostInterfaces: Host interface network was not found in registry (%s)! [3]",
+                             wszRegLocation));
         }
         while (0);
 
@@ -1426,7 +1431,6 @@ int removeNetworkInterface(MSIHANDLE hModule, const WCHAR *pwszGUID)
 
         do
         {
-            DWORD ret = 0;
             GUID netGuid;
             SP_DEVINFO_DATA DeviceInfoData;
             DWORD index = 0;
@@ -1443,7 +1447,7 @@ int removeNetworkInterface(MSIHANDLE hModule, const WCHAR *pwszGUID)
             if (hDeviceInfo == INVALID_HANDLE_VALUE)
             {
                 logStringW(hModule, L"VBox HostInterfaces: SetupDiGetClassDevs failed (0x%08X)!", GetLastError());
-                SetErrBreak(L"VBox HostInterfaces: Uninstallation failed!");
+                SetErrBreak((hModule, L"VBox HostInterfaces: Uninstallation failed!"));
             }
 
             BOOL fFoundDevice = FALSE;
@@ -1546,26 +1550,24 @@ int removeNetworkInterface(MSIHANDLE hModule, const WCHAR *pwszGUID)
                 if (!fResult)
                 {
                     logStringW(hModule, L"VBox HostInterfaces: SetupDiSetSelectedDevice failed (0x%08X)!", GetLastError());
-                    SetErrBreak(L"VBox HostInterfaces: Uninstallation failed!");
+                    SetErrBreak((hModule, L"VBox HostInterfaces: Uninstallation failed!"));
                 }
 
                 fResult = SetupDiCallClassInstaller(DIF_REMOVE, hDeviceInfo, &DeviceInfoData);
                 if (!fResult)
                 {
                     logStringW(hModule, L"VBox HostInterfaces: SetupDiCallClassInstaller (DIF_REMOVE) failed (0x%08X)!", GetLastError());
-                    SetErrBreak(L"VBox HostInterfaces: Uninstallation failed!");
+                    SetErrBreak((hModule, L"VBox HostInterfaces: Uninstallation failed!"));
                 }
             }
             else
-                SetErrBreak(L"VBox HostInterfaces: Host interface network device not found!");
-        }
-        while (0);
+                SetErrBreak((hModule, L"VBox HostInterfaces: Host interface network device not found!"));
+        } while (0);
 
         /* clean up the device info set */
         if (hDeviceInfo != INVALID_HANDLE_VALUE)
             SetupDiDestroyDeviceInfoList(hDeviceInfo);
-    }
-    while (0);
+    } while (0);
     return rc;
 }
 
diff --git a/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.def b/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.def
index 2c36c3f..e7ee3e8 100644
--- a/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.def
+++ b/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.def
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2008-2015 Oracle Corporation
+; Copyright (C) 2008-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.rc b/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.rc
index 66fc00e..a374079 100644
--- a/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.rc
+++ b/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/Properties.wxi b/src/VBox/Installer/win/Properties.wxi
index 1243098..9ca61a9 100644
--- a/src/VBox/Installer/win/Properties.wxi
+++ b/src/VBox/Installer/win/Properties.wxi
@@ -2,7 +2,7 @@
 <!--
     VirtualBox Windows Installation Script (WiX)
 
-    Copyright (C) 2014-2015 Oracle Corporation
+    Copyright (C) 2014-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/PublicProperties.wxi b/src/VBox/Installer/win/PublicProperties.wxi
index 4332209..f6e9c01 100644
--- a/src/VBox/Installer/win/PublicProperties.wxi
+++ b/src/VBox/Installer/win/PublicProperties.wxi
@@ -2,7 +2,7 @@
 <!--
     VirtualBox Windows Installation Script (WiX)
 
-    Copyright (C) 2015 Oracle Corporation
+    Copyright (C) 2015-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/Resources/Makefile.kmk b/src/VBox/Installer/win/Resources/Makefile.kmk
index a51717b..4dac9b4 100644
--- a/src/VBox/Installer/win/Resources/Makefile.kmk
+++ b/src/VBox/Installer/win/Resources/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2010-2015 Oracle Corporation
+# Copyright (C) 2010-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/Resources/VBoxRes.rc b/src/VBox/Installer/win/Resources/VBoxRes.rc
index d275ecf..2e5e97b 100644
--- a/src/VBox/Installer/win/Resources/VBoxRes.rc
+++ b/src/VBox/Installer/win/Resources/VBoxRes.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/Resources/dummy.cpp b/src/VBox/Installer/win/Resources/dummy.cpp
index 0b5233e..99fa814 100644
--- a/src/VBox/Installer/win/Resources/dummy.cpp
+++ b/src/VBox/Installer/win/Resources/dummy.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/Resources/resource.h b/src/VBox/Installer/win/Resources/resource.h
index 2c1babc..f26ffc2 100644
--- a/src/VBox/Installer/win/Resources/resource.h
+++ b/src/VBox/Installer/win/Resources/resource.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/Stub/Makefile.kmk b/src/VBox/Installer/win/Stub/Makefile.kmk
index 90b482c..445596d 100644
--- a/src/VBox/Installer/win/Stub/Makefile.kmk
+++ b/src/VBox/Installer/win/Stub/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2009-2015 Oracle Corporation
+# Copyright (C) 2009-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/Stub/VBoxStub.cpp b/src/VBox/Installer/win/Stub/VBoxStub.cpp
index 6e047df..cbc315e 100644
--- a/src/VBox/Installer/win/Stub/VBoxStub.cpp
+++ b/src/VBox/Installer/win/Stub/VBoxStub.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -24,15 +24,15 @@
 # define _WIN32_WINNT 0x0501 /* AttachConsole() / FreeConsole(). */
 #endif
 
-#include <Windows.h>
+#include <iprt/win/windows.h>
 #include <commctrl.h>
 #include <fcntl.h>
 #include <io.h>
 #include <lmerr.h>
 #include <msiquery.h>
-#include <objbase.h>
+#include <iprt/win/objbase.h>
 
-#include <shlobj.h>
+#include <iprt/win/shlobj.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -283,14 +283,17 @@ static int GetTempFileAlloc(const char  *pszTempPath,
 static int ExtractFile(const char *pszResourceName,
                        const char *pszTempFile)
 {
+#if 0 /* Another example of how unnecessarily complicated things get with
+         do-break-while-false and you end up with buggy code using uninitialized
+         variables. */
     int rc;
     RTFILE fh;
     BOOL bCreatedFile = FALSE;
 
     do
     {
-        AssertMsgBreak(pszResourceName, ("Resource pointer invalid!\n"));
-        AssertMsgBreak(pszTempFile, ("Temp file pointer invalid!"));
+        AssertMsgBreak(pszResourceName, ("Resource pointer invalid!\n")); /* rc is not initialized here, we'll return garbage. */
+        AssertMsgBreak(pszTempFile, ("Temp file pointer invalid!"));      /* Ditto. */
 
         /* Read the data of the built-in resource. */
         PVOID pvData = NULL;
@@ -315,7 +318,7 @@ static int ExtractFile(const char *pszResourceName,
 
     } while (0);
 
-    if (RTFileIsValid(fh))
+    if (RTFileIsValid(fh)) /* fh is unused uninitalized (MSC agrees) */
         RTFileClose(fh);
 
     if (RT_FAILURE(rc))
@@ -323,6 +326,43 @@ static int ExtractFile(const char *pszResourceName,
         if (bCreatedFile)
             RTFileDelete(pszTempFile);
     }
+
+#else /* This is exactly the same as above, except no bug and better assertion
+         message.  Note only the return-success statment is indented, indicating
+         that the whole do-break-while-false approach was totally unnecessary.   */
+
+    AssertPtrReturn(pszResourceName, VERR_INVALID_POINTER);
+    AssertPtrReturn(pszTempFile, VERR_INVALID_POINTER);
+
+    /* Read the data of the built-in resource. */
+    PVOID pvData = NULL;
+    DWORD dwDataSize = 0;
+    int rc = FindData(pszResourceName, &pvData, &dwDataSize);
+    AssertMsgRCReturn(rc, ("Could not read resource data: %Rrc\n", rc), rc);
+
+    /* Create new (and replace an old) file. */
+    RTFILE hFile;
+    rc = RTFileOpen(&hFile, pszTempFile,
+                      RTFILE_O_CREATE_REPLACE
+                    | RTFILE_O_WRITE
+                    | RTFILE_O_DENY_NOT_DELETE
+                    | RTFILE_O_DENY_WRITE);
+    AssertMsgRCReturn(rc, ("Could not open '%s' for writing: %Rrc\n", pszTempFile, rc), rc);
+
+    /* Write contents to new file. */
+    size_t cbWritten = 0;
+    rc = RTFileWrite(hFile, pvData, dwDataSize, &cbWritten);
+    AssertMsgStmt(cbWritten == dwDataSize || RT_FAILURE_NP(rc), ("%#zx vs %#x\n", cbWritten, dwDataSize), rc = VERR_WRITE_ERROR);
+
+    int rc2 = RTFileClose(hFile);
+    AssertRC(rc2);
+
+    if (RT_SUCCESS(rc))
+        return VINF_SUCCESS;
+
+    RTFileDelete(pszTempFile);
+
+#endif
     return rc;
 }
 
@@ -339,8 +379,7 @@ static int ExtractFile(const char *pszResourceName,
 static int Extract(const PVBOXSTUBPKG  pPackage,
                    const char         *pszTempFile)
 {
-    return ExtractFile(pPackage->szResourceName,
-                       pszTempFile);
+    return ExtractFile(pPackage->szResourceName, pszTempFile);
 }
 
 
@@ -411,11 +450,10 @@ static bool AddCleanupRec(const char *pszPath, bool fFile)
  * Cleans up all the extracted files and optionally removes the package
  * directory.
  *
- * @param   cPackages           The number of packages.
  * @param   pszPkgDir           The package directory, NULL if it shouldn't be
  *                              removed.
  */
-static void CleanUp(unsigned cPackages, const char *pszPkgDir)
+static void CleanUp(const char *pszPkgDir)
 {
     for (int i = 0; i < 5; i++)
     {
@@ -798,6 +836,7 @@ int WINAPI WinMain(HINSTANCE  hInstance,
                    char      *lpCmdLine,
                    int        nCmdShow)
 {
+    RT_NOREF(hInstance, hPrevInstance, lpCmdLine, nCmdShow);
     char **argv = __argv;
     int argc    = __argc;
 
@@ -1001,6 +1040,12 @@ int WINAPI WinMain(HINSTANCE  hInstance,
     if (rcExit != RTEXITCODE_SUCCESS)
         vrc = VERR_PARSE_ERROR;
 
+/** @todo
+ *
+ *  Split the remainder up in functions and simplify the code flow!!
+ *
+ *   */
+
 #if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0501
 # ifdef VBOX_STUB_WITH_OWN_CONSOLE /* Use an own console window if run in debug mode. */
     if (   RT_SUCCESS(vrc)
@@ -1062,61 +1107,60 @@ int WINAPI WinMain(HINSTANCE  hInstance,
     }
 
     /* Read our manifest. */
-    PVBOXSTUBPKGHEADER pHeader;
     if (RT_SUCCESS(vrc))
     {
+        PVBOXSTUBPKGHEADER pHeader;
         vrc = FindData("MANIFEST", (PVOID *)&pHeader, NULL);
-        if (RT_FAILURE(vrc))
-            rcExit = ShowError("Internal package error: Manifest not found (%Rrc)", vrc);
-    }
-    if (RT_SUCCESS(vrc))
-    {
-        /** @todo If we could, we should validate the header. Only the magic isn't
-         *        commonly defined, nor the version number... */
+        if (RT_SUCCESS(vrc))
+        {
+            /** @todo If we could, we should validate the header. Only the magic isn't
+             *        commonly defined, nor the version number... */
 
-        RTListInit(&g_TmpFiles);
+            RTListInit(&g_TmpFiles);
 
-        /*
-         * Up to this point, we haven't done anything that requires any cleanup.
-         * From here on, we do everything in function so we can counter clean up.
-         */
-        bool fCreatedExtractDir;
-        rcExit = ExtractFiles(pHeader->byCntPkgs, szExtractPath,
-                              fExtractOnly, &fCreatedExtractDir);
-        if (rcExit == RTEXITCODE_SUCCESS)
-        {
-            if (fExtractOnly)
-                ShowInfo("Files were extracted to: %s", szExtractPath);
-            else
+            /*
+             * Up to this point, we haven't done anything that requires any cleanup.
+             * From here on, we do everything in function so we can counter clean up.
+             */
+            bool fCreatedExtractDir;
+            rcExit = ExtractFiles(pHeader->byCntPkgs, szExtractPath,
+                                  fExtractOnly, &fCreatedExtractDir);
+            if (rcExit == RTEXITCODE_SUCCESS)
             {
-                rcExit = CopyCustomDir(szExtractPath);
-#ifdef VBOX_WITH_CODE_SIGNING
-                if (rcExit == RTEXITCODE_SUCCESS && fEnableSilentCert && g_fSilent)
-                    rcExit = InstallCertificate();
-#endif
-                unsigned iPackage = 0;
-                while (   iPackage < pHeader->byCntPkgs
-                       && rcExit == RTEXITCODE_SUCCESS)
+                if (fExtractOnly)
+                    ShowInfo("Files were extracted to: %s", szExtractPath);
+                else
                 {
-                    rcExit = ProcessPackage(iPackage, szExtractPath,
-                                            szMSIArgs, fEnableLogging);
-                    iPackage++;
+                    rcExit = CopyCustomDir(szExtractPath);
+    #ifdef VBOX_WITH_CODE_SIGNING
+                    if (rcExit == RTEXITCODE_SUCCESS && fEnableSilentCert && g_fSilent)
+                        rcExit = InstallCertificate();
+    #endif
+                    unsigned iPackage = 0;
+                    while (   iPackage < pHeader->byCntPkgs
+                           && rcExit == RTEXITCODE_SUCCESS)
+                    {
+                        rcExit = ProcessPackage(iPackage, szExtractPath,
+                                                szMSIArgs, fEnableLogging);
+                        iPackage++;
+                    }
+
+                    /* Don't fail if cleanup fail. At least for now. */
+                    CleanUp(   !fEnableLogging
+                            && fCreatedExtractDir ? szExtractPath : NULL);
                 }
-
-                /* Don't fail if cleanup fail. At least for now. */
-                CleanUp(pHeader->byCntPkgs,
-                           !fEnableLogging
-                        && fCreatedExtractDir ? szExtractPath : NULL);
             }
-        }
 
-        /* Free any left behind cleanup records (not strictly needed). */
-        PSTUBCLEANUPREC pCur, pNext;
-        RTListForEachSafe(&g_TmpFiles, pCur, pNext, STUBCLEANUPREC, ListEntry)
-        {
-            RTListNodeRemove(&pCur->ListEntry);
-            RTMemFree(pCur);
+            /* Free any left behind cleanup records (not strictly needed). */
+            PSTUBCLEANUPREC pCur, pNext;
+            RTListForEachSafe(&g_TmpFiles, pCur, pNext, STUBCLEANUPREC, ListEntry)
+            {
+                RTListNodeRemove(&pCur->ListEntry);
+                RTMemFree(pCur);
+            }
         }
+        else
+            rcExit = ShowError("Internal package error: Manifest not found (%Rrc)", vrc);
     }
 
 #if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0501
diff --git a/src/VBox/Installer/win/Stub/VBoxStub.h b/src/VBox/Installer/win/Stub/VBoxStub.h
index ddc3fdb..8c1c108 100644
--- a/src/VBox/Installer/win/Stub/VBoxStub.h
+++ b/src/VBox/Installer/win/Stub/VBoxStub.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/Stub/VBoxStub.rc b/src/VBox/Installer/win/Stub/VBoxStub.rc
index 9baba72..0e82fb3 100644
--- a/src/VBox/Installer/win/Stub/VBoxStub.rc
+++ b/src/VBox/Installer/win/Stub/VBoxStub.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/Stub/VBoxStubCertUtil.cpp b/src/VBox/Installer/win/Stub/VBoxStubCertUtil.cpp
index c948ccf..a15e947 100644
--- a/src/VBox/Installer/win/Stub/VBoxStubCertUtil.cpp
+++ b/src/VBox/Installer/win/Stub/VBoxStubCertUtil.cpp
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -22,7 +22,7 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
-#include <Windows.h>
+#include <iprt/win/windows.h>
 #include <Wincrypt.h>
 
 #include <iprt/string.h>
diff --git a/src/VBox/Installer/win/Stub/VBoxStubCertUtil.h b/src/VBox/Installer/win/Stub/VBoxStubCertUtil.h
index 6bed4ab..8c2fcd1 100644
--- a/src/VBox/Installer/win/Stub/VBoxStubCertUtil.h
+++ b/src/VBox/Installer/win/Stub/VBoxStubCertUtil.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/Stub/resource.h b/src/VBox/Installer/win/Stub/resource.h
index 98e9f5a..2f4ebb6 100644
--- a/src/VBox/Installer/win/Stub/resource.h
+++ b/src/VBox/Installer/win/Stub/resource.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/StubBld/Makefile.kmk b/src/VBox/Installer/win/StubBld/Makefile.kmk
index b792172..9ff3ca4 100644
--- a/src/VBox/Installer/win/StubBld/Makefile.kmk
+++ b/src/VBox/Installer/win/StubBld/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2009-2015 Oracle Corporation
+# Copyright (C) 2009-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/StubBld/VBoxStubBld.cpp b/src/VBox/Installer/win/StubBld/VBoxStubBld.cpp
index 02140a7..dd6e706 100644
--- a/src/VBox/Installer/win/StubBld/VBoxStubBld.cpp
+++ b/src/VBox/Installer/win/StubBld/VBoxStubBld.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -19,7 +19,7 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
-#include <windows.h>
+#include <iprt/win/windows.h>
 #include <shellapi.h>
 #include <strsafe.h>
 
@@ -49,11 +49,10 @@ HRESULT GetFile (const char* pszFilePath,
 }
 
 HRESULT UpdateResource(HANDLE hFile,
-                       const char* pszFilePath,
                        DWORD dwFileSize,
                        HANDLE hResourceUpdate,
-                       const char* szResourceType,
-                       const char* szResourceId)
+                       const char *szResourceType,
+                       const char *szResourceId)
 {
     HRESULT hr = S_OK;
     PVOID pvFile = NULL;
@@ -101,8 +100,7 @@ HRESULT IntegrateFile (HANDLE hResourceUpdate,
         }
         else
         {
-            hr = UpdateResource(hFile, pszFilePath, dwFileSize,
-                                hResourceUpdate, szResourceType, szResourceId);
+            hr = UpdateResource(hFile, dwFileSize, hResourceUpdate, szResourceType, szResourceId);
             if (FAILED(hr))
             {
                 printf("ERROR: Error updating resource for file %s!", pszFilePath);
@@ -150,7 +148,6 @@ static char * MyPathFilename(const char *pszPath)
     }
 
     /* will never get here */
-    return NULL;
 }
 
 
@@ -253,7 +250,6 @@ int main (int argc, char* argv[])
 
         PVBOXSTUBPKG pPackage = stbPkg;
         char szHeaderName[_MAX_PATH] = {0};
-        size_t iLen = 0;
 
         for (BYTE i=0; i<stbHeader.byCntPkgs; i++)
         {
diff --git a/src/VBox/Installer/win/StubBld/VBoxStubBld.h b/src/VBox/Installer/win/StubBld/VBoxStubBld.h
index 1ae7137..b3151bd 100644
--- a/src/VBox/Installer/win/StubBld/VBoxStubBld.h
+++ b/src/VBox/Installer/win/StubBld/VBoxStubBld.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/UserInterface.wxi b/src/VBox/Installer/win/UserInterface.wxi
index 961f952..485142f 100644
--- a/src/VBox/Installer/win/UserInterface.wxi
+++ b/src/VBox/Installer/win/UserInterface.wxi
@@ -2,7 +2,7 @@
 <!--
     User interface include for VirtualBox WiX script.
 
-    Copyright (C) 2006-2015 Oracle Corporation
+    Copyright (C) 2006-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/VBoxMergeAppCA.wxi b/src/VBox/Installer/win/VBoxMergeAppCA.wxi
index ca18e64..78179c2 100644
--- a/src/VBox/Installer/win/VBoxMergeAppCA.wxi
+++ b/src/VBox/Installer/win/VBoxMergeAppCA.wxi
@@ -2,7 +2,7 @@
 <!--
     VirtualBox Windows Installation Script (WiX)
 
-    Copyright (C) 2014-2015 Oracle Corporation
+    Copyright (C) 2014-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/VBoxMergeCOM32On64.wxi b/src/VBox/Installer/win/VBoxMergeCOM32On64.wxi
index 8bc9e12..bba8217 100644
--- a/src/VBox/Installer/win/VBoxMergeCOM32On64.wxi
+++ b/src/VBox/Installer/win/VBoxMergeCOM32On64.wxi
@@ -2,7 +2,7 @@
 <!--
     VirtualBox Windows Installation Script (WiX)
 
-    Copyright (C) 2006-2015 Oracle Corporation
+    Copyright (C) 2006-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/VBoxMergeCOM32On64CA.wxi b/src/VBox/Installer/win/VBoxMergeCOM32On64CA.wxi
index ca18e64..78179c2 100644
--- a/src/VBox/Installer/win/VBoxMergeCOM32On64CA.wxi
+++ b/src/VBox/Installer/win/VBoxMergeCOM32On64CA.wxi
@@ -2,7 +2,7 @@
 <!--
     VirtualBox Windows Installation Script (WiX)
 
-    Copyright (C) 2014-2015 Oracle Corporation
+    Copyright (C) 2014-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/VBoxMergeCOM32On64Seq.wxi b/src/VBox/Installer/win/VBoxMergeCOM32On64Seq.wxi
index ca18e64..78179c2 100644
--- a/src/VBox/Installer/win/VBoxMergeCOM32On64Seq.wxi
+++ b/src/VBox/Installer/win/VBoxMergeCOM32On64Seq.wxi
@@ -2,7 +2,7 @@
 <!--
     VirtualBox Windows Installation Script (WiX)
 
-    Copyright (C) 2014-2015 Oracle Corporation
+    Copyright (C) 2014-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/VBoxMergeNetAdp.wxi b/src/VBox/Installer/win/VBoxMergeNetAdp.wxi
index 5a98948..07b9e34 100644
--- a/src/VBox/Installer/win/VBoxMergeNetAdp.wxi
+++ b/src/VBox/Installer/win/VBoxMergeNetAdp.wxi
@@ -1,7 +1,7 @@
 <!--
     VirtualBox Windows Installation Script (WiX)
 
-    Copyright (C) 2006-2015 Oracle Corporation
+    Copyright (C) 2006-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/VBoxMergeNetAdp6.wxi b/src/VBox/Installer/win/VBoxMergeNetAdp6.wxi
index d3d0c1e..453aeec 100644
--- a/src/VBox/Installer/win/VBoxMergeNetAdp6.wxi
+++ b/src/VBox/Installer/win/VBoxMergeNetAdp6.wxi
@@ -1,7 +1,7 @@
 <!--
     VirtualBox Windows Installation Script (WiX)
 
-    Copyright (C) 2006-2015 Oracle Corporation
+    Copyright (C) 2006-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/VBoxMergeNetAdp6CA.wxi b/src/VBox/Installer/win/VBoxMergeNetAdp6CA.wxi
index 29c39e8..32a4d78 100644
--- a/src/VBox/Installer/win/VBoxMergeNetAdp6CA.wxi
+++ b/src/VBox/Installer/win/VBoxMergeNetAdp6CA.wxi
@@ -2,7 +2,7 @@
 <!--
     VirtualBox Windows Installation Script (WiX)
 
-    Copyright (C) 2006-2015 Oracle Corporation
+    Copyright (C) 2006-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/VBoxMergeNetAdp6Seq.wxi b/src/VBox/Installer/win/VBoxMergeNetAdp6Seq.wxi
index 648da63..1750890 100644
--- a/src/VBox/Installer/win/VBoxMergeNetAdp6Seq.wxi
+++ b/src/VBox/Installer/win/VBoxMergeNetAdp6Seq.wxi
@@ -2,7 +2,7 @@
 <!--
     VirtualBox Windows Installation Script (WiX)
 
-    Copyright (C) 2006-2015 Oracle Corporation
+    Copyright (C) 2006-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/VBoxMergeNetAdpCA.wxi b/src/VBox/Installer/win/VBoxMergeNetAdpCA.wxi
index 69d0f06..8e807c0 100644
--- a/src/VBox/Installer/win/VBoxMergeNetAdpCA.wxi
+++ b/src/VBox/Installer/win/VBoxMergeNetAdpCA.wxi
@@ -2,7 +2,7 @@
 <!--
     VirtualBox Windows Installation Script (WiX)
 
-    Copyright (C) 2006-2015 Oracle Corporation
+    Copyright (C) 2006-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/VBoxMergeNetAdpSeq.wxi b/src/VBox/Installer/win/VBoxMergeNetAdpSeq.wxi
index a20803a..c0aaa45 100644
--- a/src/VBox/Installer/win/VBoxMergeNetAdpSeq.wxi
+++ b/src/VBox/Installer/win/VBoxMergeNetAdpSeq.wxi
@@ -2,7 +2,7 @@
 <!--
     VirtualBox Windows Installation Script (WiX)
 
-    Copyright (C) 2006-2015 Oracle Corporation
+    Copyright (C) 2006-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/VBoxMergeNetFlt.wxi b/src/VBox/Installer/win/VBoxMergeNetFlt.wxi
index c454feb..568610e 100644
--- a/src/VBox/Installer/win/VBoxMergeNetFlt.wxi
+++ b/src/VBox/Installer/win/VBoxMergeNetFlt.wxi
@@ -1,7 +1,7 @@
 <!--
     VirtualBox Windows Installation Script (WiX)
 
-    Copyright (C) 2006-2015 Oracle Corporation
+    Copyright (C) 2006-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/VBoxMergeNetFltCA.wxi b/src/VBox/Installer/win/VBoxMergeNetFltCA.wxi
index 641743d..5d0b159 100644
--- a/src/VBox/Installer/win/VBoxMergeNetFltCA.wxi
+++ b/src/VBox/Installer/win/VBoxMergeNetFltCA.wxi
@@ -2,7 +2,7 @@
 <!--
     VirtualBox Windows Installation Script (WiX)
 
-    Copyright (C) 2006-2015 Oracle Corporation
+    Copyright (C) 2006-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/VBoxMergeNetFltSeq.wxi b/src/VBox/Installer/win/VBoxMergeNetFltSeq.wxi
index 6f0d799..ddab246 100644
--- a/src/VBox/Installer/win/VBoxMergeNetFltSeq.wxi
+++ b/src/VBox/Installer/win/VBoxMergeNetFltSeq.wxi
@@ -2,7 +2,7 @@
 <!--
     VirtualBox Windows Installation Script (WiX)
 
-    Copyright (C) 2006-2015 Oracle Corporation
+    Copyright (C) 2006-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/VBoxMergeNetLwf.wxi b/src/VBox/Installer/win/VBoxMergeNetLwf.wxi
index 768911c..05bff47 100644
--- a/src/VBox/Installer/win/VBoxMergeNetLwf.wxi
+++ b/src/VBox/Installer/win/VBoxMergeNetLwf.wxi
@@ -1,7 +1,7 @@
 <!--
     VirtualBox Windows Installation Script (WiX)
 
-    Copyright (C) 2006-2015 Oracle Corporation
+    Copyright (C) 2006-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/VBoxMergeNetLwfCA.wxi b/src/VBox/Installer/win/VBoxMergeNetLwfCA.wxi
index 8c008a2..3865a0b 100644
--- a/src/VBox/Installer/win/VBoxMergeNetLwfCA.wxi
+++ b/src/VBox/Installer/win/VBoxMergeNetLwfCA.wxi
@@ -2,7 +2,7 @@
 <!--
     VirtualBox Windows Installation Script (WiX)
 
-    Copyright (C) 2006-2015 Oracle Corporation
+    Copyright (C) 2006-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/VBoxMergeNetLwfSeq.wxi b/src/VBox/Installer/win/VBoxMergeNetLwfSeq.wxi
index 4fbd3d4..613d155 100644
--- a/src/VBox/Installer/win/VBoxMergeNetLwfSeq.wxi
+++ b/src/VBox/Installer/win/VBoxMergeNetLwfSeq.wxi
@@ -2,7 +2,7 @@
 <!--
     VirtualBox Windows Installation Script (WiX)
 
-    Copyright (C) 2006-2015 Oracle Corporation
+    Copyright (C) 2006-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/VBoxMergePython.wxi b/src/VBox/Installer/win/VBoxMergePython.wxi
index 7ac5920..bd1d04e 100644
--- a/src/VBox/Installer/win/VBoxMergePython.wxi
+++ b/src/VBox/Installer/win/VBoxMergePython.wxi
@@ -1,7 +1,7 @@
 <!--
     VirtualBox Windows Installation Script (WiX)
 
-    Copyright (C) 2006-2015 Oracle Corporation
+    Copyright (C) 2006-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/VBoxMergePythonCA.wxi b/src/VBox/Installer/win/VBoxMergePythonCA.wxi
index 16ded0a..d789bed 100644
--- a/src/VBox/Installer/win/VBoxMergePythonCA.wxi
+++ b/src/VBox/Installer/win/VBoxMergePythonCA.wxi
@@ -2,7 +2,7 @@
 <!--
     VirtualBox Windows Installation Script (WiX)
 
-    Copyright (C) 2006-2015 Oracle Corporation
+    Copyright (C) 2006-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/VBoxMergePythonSeq.wxi b/src/VBox/Installer/win/VBoxMergePythonSeq.wxi
index a1737eb..1dde45e 100644
--- a/src/VBox/Installer/win/VBoxMergePythonSeq.wxi
+++ b/src/VBox/Installer/win/VBoxMergePythonSeq.wxi
@@ -2,7 +2,7 @@
 <!--
     VirtualBox Windows Installation Script (WiX)
 
-    Copyright (C) 2006-2015 Oracle Corporation
+    Copyright (C) 2006-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/VBoxMergeUSB.wxi b/src/VBox/Installer/win/VBoxMergeUSB.wxi
index 7cb526c..81cab2c 100644
--- a/src/VBox/Installer/win/VBoxMergeUSB.wxi
+++ b/src/VBox/Installer/win/VBoxMergeUSB.wxi
@@ -2,7 +2,7 @@
 <!--
     VirtualBox Windows Installation Script (WiX)
 
-    Copyright (C) 2006-2015 Oracle Corporation
+    Copyright (C) 2006-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/VBoxMergeUSBCA.wxi b/src/VBox/Installer/win/VBoxMergeUSBCA.wxi
index ca18e64..78179c2 100644
--- a/src/VBox/Installer/win/VBoxMergeUSBCA.wxi
+++ b/src/VBox/Installer/win/VBoxMergeUSBCA.wxi
@@ -2,7 +2,7 @@
 <!--
     VirtualBox Windows Installation Script (WiX)
 
-    Copyright (C) 2014-2015 Oracle Corporation
+    Copyright (C) 2014-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/VBoxMergeUSBSeq.wxi b/src/VBox/Installer/win/VBoxMergeUSBSeq.wxi
index ca18e64..78179c2 100644
--- a/src/VBox/Installer/win/VBoxMergeUSBSeq.wxi
+++ b/src/VBox/Installer/win/VBoxMergeUSBSeq.wxi
@@ -2,7 +2,7 @@
 <!--
     VirtualBox Windows Installation Script (WiX)
 
-    Copyright (C) 2014-2015 Oracle Corporation
+    Copyright (C) 2014-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/VirtualBox_TypeLib.xsl b/src/VBox/Installer/win/VirtualBox_TypeLib.xsl
index 68d7085..319eff3 100644
--- a/src/VBox/Installer/win/VirtualBox_TypeLib.xsl
+++ b/src/VBox/Installer/win/VirtualBox_TypeLib.xsl
@@ -5,7 +5,7 @@
  *  type library definitions for VirtualBox COM components
  *  from the generic interface definition expressed in XML.
 
-    Copyright (C) 2007-2015 Oracle Corporation
+    Copyright (C) 2007-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/dep.xsl b/src/VBox/Installer/win/dep.xsl
index e3542df..f6fd820 100644
--- a/src/VBox/Installer/win/dep.xsl
+++ b/src/VBox/Installer/win/dep.xsl
@@ -3,7 +3,7 @@
 <!--
     Generate a list of dependencies from a wixobj file.
 
-    Copyright (C) 2015 Oracle Corporation
+    Copyright (C) 2015-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Installer/win/dep2.xsl b/src/VBox/Installer/win/dep2.xsl
index aad0245..7683c3c 100644
--- a/src/VBox/Installer/win/dep2.xsl
+++ b/src/VBox/Installer/win/dep2.xsl
@@ -3,7 +3,7 @@
 <!--
     Generate a list of dependencies from a wixobj file.
 
-    Copyright (C) 2015 Oracle Corporation
+    Copyright (C) 2015-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/Config.kmk b/src/VBox/Main/Config.kmk
index f6706d5..69ec4d7 100644
--- a/src/VBox/Main/Config.kmk
+++ b/src/VBox/Main/Config.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2013-2015 Oracle Corporation
+# Copyright (C) 2013-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/Docs-Intro.cpp b/src/VBox/Main/Docs-Intro.cpp
index aca3f65..65814ef 100644
--- a/src/VBox/Main/Docs-Intro.cpp
+++ b/src/VBox/Main/Docs-Intro.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2013 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/Makefile.kmk b/src/VBox/Main/Makefile.kmk
index 04d6434..ecdbcdc 100644
--- a/src/VBox/Main/Makefile.kmk
+++ b/src/VBox/Main/Makefile.kmk
@@ -178,44 +178,44 @@ endif
 
 
 ifndef VBOX_ONLY_SDK
-#
-# Generate library with API class wrappers from the XIDL file.
-#
-LIBRARIES += VBoxAPIWrap
-VBoxAPIWrap_TEMPLATE        = VBoxMainLib
-VBoxAPIWrap_SOURCES         = \
-	$(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d \
-	$(VBOX_MAIN_APIWRAPPER_GEN_SRCS)
-VBoxAPIWrap_INTERMEDIATES   = $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
-VBoxAPIWrap_DEFS.win.x86   += _WIN32_WINNT=0x0500
-VBoxAPIWrap_DEFS.win.amd64 += _WIN32_WINNT=0x0510
-VBoxAPIWrap_INCS           += \
-	include
-VBoxAPIWrap_CLEAN           = \
-	$(wildcard $(VBoxAPIWrap_0_OUTDIR)/*.cpp) \
-	$(wildcard $(VBoxAPIWrap_0_OUTDIR)/*.h) \
-	$(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d.ts \
-	$(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d \
-	$(VBoxAPIWrap_0_OUTDIR)/apiwrappers-headers \
-	$(VBoxAPIWrap_0_OUTDIR)/apiwrappers-sources-even \
-	$(VBoxAPIWrap_0_OUTDIR)/apiwrappers-sources-odd
-
-# Two VBox variables used here and/or in the rules generating wrappers.
-VBoxAPIWrap_VBOX_XSLT       = \
-	$(VBOX_PATH_MAIN_SRC)/idl/apiwrap-server.xsl
-
-
-# This include file (generated at the bottom of this file), defines
-# VBOX_MAIN_APIWRAPPER_GEN_SRCS and VBOX_MAIN_APIWRAPPER_GEN_HDRS.
-VBoxAPIWrap_VBOX_KMK_FILE = $(PATH_OUT)/vboxapiwrap.kmk
-include $(VBoxAPIWrap_VBOX_KMK_FILE)
+ #
+ # Generate library with API class wrappers from the XIDL file.
+ #
+ LIBRARIES += VBoxAPIWrap
+ VBoxAPIWrap_TEMPLATE        = VBoxMainLib
+ VBoxAPIWrap_SOURCES         = \
+ 	$(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d \
+ 	$(VBOX_MAIN_APIWRAPPER_GEN_SRCS)
+ VBoxAPIWrap_INTERMEDIATES   = $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
+ VBoxAPIWrap_DEFS.win.x86   += _WIN32_WINNT=0x0500
+ VBoxAPIWrap_DEFS.win.amd64 += _WIN32_WINNT=0x0510
+ VBoxAPIWrap_INCS           += \
+ 	include
+ VBoxAPIWrap_CLEAN           = \
+ 	$(wildcard $(VBoxAPIWrap_0_OUTDIR)/*.cpp) \
+ 	$(wildcard $(VBoxAPIWrap_0_OUTDIR)/*.h) \
+ 	$(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d.ts \
+ 	$(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d \
+ 	$(VBoxAPIWrap_0_OUTDIR)/apiwrappers-headers \
+ 	$(VBoxAPIWrap_0_OUTDIR)/apiwrappers-sources-even \
+ 	$(VBoxAPIWrap_0_OUTDIR)/apiwrappers-sources-odd
+
+ # Two VBox variables used here and/or in the rules generating wrappers.
+ VBoxAPIWrap_VBOX_XSLT       = \
+ 	$(VBOX_PATH_MAIN_SRC)/idl/apiwrap-server.xsl
+
+
+ # This include file (generated at the bottom of this file), defines
+ # VBOX_MAIN_APIWRAPPER_GEN_SRCS and VBOX_MAIN_APIWRAPPER_GEN_HDRS.
+ VBoxAPIWrap_VBOX_KMK_FILE = $(PATH_OUT)/vboxapiwrap.kmk
+ include $(VBoxAPIWrap_VBOX_KMK_FILE)
 
-ifdef VBOX_WITH_32_ON_64_MAIN_API
-LIBRARIES += VBoxAPIWrap-x86
-VBoxAPIWrap-x86_TEMPLATE = VBoxMainLib-x86
-VBoxAPIWrap-x86_EXTENDS  = VBoxAPIWrap
-VBoxAPIWrap-x86_DTRACE_HDR_FLAGS = -32 # ugly, should be fixed in the tool in Config.kmk
-endif
+ ifdef VBOX_WITH_32_ON_64_MAIN_API
+  LIBRARIES += VBoxAPIWrap-x86
+  VBoxAPIWrap-x86_TEMPLATE = VBoxMainLib-x86
+  VBoxAPIWrap-x86_EXTENDS  = VBoxAPIWrap
+  VBoxAPIWrap-x86_DTRACE_HDR_FLAGS = -32 # ugly, should be fixed in the tool in Config.kmk
+ endif
 
 endif # !VBOX_ONLY_SDK
 
@@ -270,9 +270,10 @@ VBoxSVC_DEFS = \
 	$(if $(VBOX_WITH_HEADLESS),VBOX_WITH_HEADLESS,) \
 	$(if $(VBOX_WITH_QTGUI),VBOX_WITH_QTGUI,) \
 	$(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
-	$(if $(VBOX_WITH_OSS),VBOX_WITH_OSS,) \
-	$(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA,) \
-	$(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE,) \
+	$(if $(VBOX_WITH_AUDIO_OSS),VBOX_WITH_AUDIO_OSS,) \
+	$(if $(VBOX_WITH_AUDIO_ALSA),VBOX_WITH_AUDIO_ALSA,) \
+	$(if $(VBOX_WITH_AUDIO_PULSE),VBOX_WITH_AUDIO_PULSE,) \
+	$(if $(VBOX_WITH_AUDIO_DEBUG),VBOX_WITH_AUDIO_DEBUG,) \
 	$(if $(VBOX_WITH_VRDE_AUDIO),VBOX_WITH_VRDE_AUDIO,) \
 	$(if $(VBOX_WITH_E1000),VBOX_WITH_E1000,) \
 	$(if $(VBOX_WITH_VIRTIO),VBOX_WITH_VIRTIO,) \
@@ -304,7 +305,7 @@ VBoxSVC_DEFS.win += _WIN32_WINNT=0x0510
 # VBoxSVC_DEFS.linux += VBOX_USE_LIBHAL
 VBoxSVC_DEFS.solaris += VBOX_USE_LIBHAL
 
-ifneq ($(KBUILD_TARGET),win)
+if $(KBUILD_TARGET) != "win" && $(VBOX_GCC_VERSION_CXX) >= 40900 # gcc 4.9.x (4.8.x is causing endless RT_ELEMENT trouble)
  VBoxSVC_CXXFLAGS = -Wunused -Wconversion
 endif
 
@@ -426,7 +427,6 @@ VBoxSVC_SOURCES.win = \
 	src-server/win/svchlp.cpp \
 	src-server/win/HostPowerWin.cpp \
 	src-server/win/VBoxSVC.rc \
-	src-server/win/VBoxComEvents.cpp \
 	src-server/win/HostDnsServiceWin.cpp
 
 VBoxSVC_SOURCES.linux = \
@@ -641,9 +641,10 @@ VBoxC_DEFS = \
 	$(VBOX_MAIN_DEFS) \
 	VBOX_COM_INPROC \
 	$(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
-	$(if $(VBOX_WITH_OSS),VBOX_WITH_OSS,) \
-	$(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA,) \
-	$(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE,) \
+	$(if $(VBOX_WITH_AUDIO_OSS),VBOX_WITH_AUDIO_OSS,) \
+	$(if $(VBOX_WITH_AUDIO_ALSA),VBOX_WITH_AUDIO_ALSA,) \
+	$(if $(VBOX_WITH_AUDIO_PULSE),VBOX_WITH_AUDIO_PULSE,) \
+	$(if $(VBOX_WITH_AUDIO_DEBUG),VBOX_WITH_AUDIO_DEBUG,) \
 	$(if $(VBOX_WITH_VRDE_AUDIO),VBOX_WITH_VRDE_AUDIO,) \
 	$(if $(VBOX_WITH_E1000),VBOX_WITH_E1000,) \
 	$(if $(VBOX_WITH_VIRTIO),VBOX_WITH_VIRTIO,) \
@@ -671,7 +672,7 @@ VBoxC_DEFS.darwin.x86 = VBOX_WITH_2X_4GB_ADDR_SPACE
 VBoxC_DEFS.win.x86 += _WIN32_WINNT=0x0500
 VBoxC_DEFS.win.amd64 += _WIN32_WINNT=0x0510
 
-ifneq ($(KBUILD_TARGET),win)
+if $(KBUILD_TARGET) != "win" && $(VBOX_GCC_VERSION_CXX) >= 40900 # gcc 4.9.x (4.8.x is causing endless RT_ELEMENT trouble)
 # VBoxC_CXXFLAGS = -Wunused -Wconversion
 endif
 
@@ -784,12 +785,9 @@ VBoxC_SOURCES = \
 	$(VBOX_XML_SCHEMADEFS_CPP)
 
 # Audio bits.
-VBoxC_DEFS    += \
-	$(if $(VBOX_WITH_AUDIO_50),VBOX_WITH_AUDIO_50,)
-
 VBoxC_SOURCES += \
-	../Devices/$(VBOX_AUDIO_PATH_SOURCES)/AudioMixBuffer.cpp \
-	../Devices/$(VBOX_AUDIO_PATH_SOURCES)/DrvAudioCommon.cpp \
+	../Devices/Audio/AudioMixBuffer.cpp \
+	../Devices/Audio/DrvAudioCommon.cpp \
 	$(if $(VBOX_WITH_VRDE_AUDIO),src-client/DrvAudioVRDE$(VBOX_AUDIO_FILE_SUFFIX).cpp,)
 
 VBoxC_SOURCES.win = \
@@ -1145,6 +1143,24 @@ $(VBoxCOM_0_OUTDIR)/VirtualBox_XPCOM_i.c: $(VBOX_PATH_MAIN_SRC)/idl/xpidl_iid.xs
 	$(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
 	$(QUIET)$(VBOX_XSLTPROC) -o $@ $< $(VBOX_XIDL_FILE)
 
+##
+# Edits $1 and adding #pragma directives for disabling warnings windows.h causes.
+# @param 1     The name of the file to edit.
+define def_VBoxMainDisableMscWarnings
+	$(QUIET)$(MV) -f "$1" "$1.tmp"
+	$(QUIET)$(APPEND) -nt "$1" \
+		'#pragma warning(push) /* -Wall and windows.h */' \
+		'#pragma warning(disable:4668 4255)' \
+               ''
+	$(QUIET)$(CAT_EXT) "$1.tmp" >> "$1"
+	$(QUIET)$(APPEND) -n "$1" \
+		'' \
+		'#pragma warning(pop)' \
+               ''
+	$(QUIET)$(RM) -f "$1.tmp"
+
+endef
+
 # Note! Because we've got a different proxy stub DLL for pre windows 7 64-bit hosts, we target windows 7 for AMD64.
 #       The output is different and hopefully more efficient, at least memory wise (using more helpers in OLE32).
 # Note! We're checking for win.amd64 below when setting the target because of the SDK build which happens on linux.amd64
@@ -1153,7 +1169,7 @@ $(if $(VBOX_WITH_MIDL_PROXY_STUB),$(VBoxCOM_0_OUTDIR)/VirtualBox_p.c + $(VBoxCOM
 $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c \
 + $(VBoxCOM_0_OUTDIR)/VirtualBox.h \
 + $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb: $(VBOX_IDL_FILE.MSCOM) | $$(dir $$@)
-	$(VBOX_WIN_MIDL) /nologo \
+	$(VBOX_WIN_MIDL) /nologo /W4 \
 		/env $(if-expr "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "win.amd64" ,amd64,win32) \
 		/robust /protocol all /target $(if-expr defined(VBOX_WITH_MIDL_PROXY_STUB),NT61,NT51) \
 		/out $(call VBOX_FN_MAKE_WIN_PATH,$(VBoxCOM_0_OUTDIR)) \
@@ -1161,6 +1177,9 @@ $(VBoxCOM_0_OUTDIR)/VirtualBox_i.c \
 		/I $(call VBOX_FN_MAKE_WIN_PATH,$(PATH_SDK_$(VBOX_WINPSDK)_INC)) \
 		/I idl \
 		$(call VBOX_FN_MAKE_WIN_PATH,$<)
+	$(call def_VBoxMainDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/VirtualBox.h)
+	$(call def_VBoxMainDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/VirtualBox_i.c)
+	$(call def_VBoxMainDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/VirtualBox_p.c)
 
 if defined(VBOX_WITH_MIDL_PROXY_STUB)
 # -Windows Server 2003 AMD64 SP1 does not like the result when using '/protocol all' and '/target NT51'.
@@ -1172,7 +1191,7 @@ $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_i.c \
 + $(VBoxCOM_0_OUTDIR)/legacy/dlldata.c \
 + $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox.h \
 + $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox.tlb: $(VBOX_IDL_FILE.MSCOM) | $$(dir $$@)
-	$(VBOX_WIN_MIDL) /nologo \
+	$(VBOX_WIN_MIDL) /nologo /W4 \
 		$(if-expr "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "win.amd64" \
 		,/env amd64 /x64 /target NT50 /robust \
 		,/env win32      /target NT51 /robust /protocol all ) \
@@ -1181,6 +1200,9 @@ $(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_i.c \
 		/I $(call VBOX_FN_MAKE_WIN_PATH,$(PATH_SDK_$(VBOX_WINPSDK)_INC)) \
 		/I idl \
 		$(call VBOX_FN_MAKE_WIN_PATH,$<)
+	$(call def_VBoxMainDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/legacy/VirtualBox.h)
+	$(call def_VBoxMainDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_i.c)
+	$(call def_VBoxMainDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_p.c)
 endif
 
 # The XP targetted 32-bit proxy stub works with all versions of windows (the
@@ -1189,7 +1211,7 @@ $(if $(VBOX_WITH_MIDL_PROXY_STUB),$(VBoxCOM-x86_0_OUTDIR)/VirtualBox_p.c + $(VBo
 $(VBoxCOM-x86_0_OUTDIR)/VirtualBox_i.c \
 + $(VBoxCOM-x86_0_OUTDIR)/VirtualBox.h \
 + $(VBoxCOM-x86_0_OUTDIR)/VirtualBox-x86.tlb: $(VBOX_IDL_FILE.MSCOM) | $$(dir $$@)
-	$(VBOX_WIN_MIDL) /nologo \
+	$(VBOX_WIN_MIDL) /nologo /W4 \
 		/env win32 /target NT51 /robust /protocol all  \
 		/out $(call VBOX_FN_MAKE_WIN_PATH,$(VBoxCOM-x86_0_OUTDIR)) \
 		/tlb $(call VBOX_FN_MAKE_WIN_PATH,$(VBoxCOM-x86_0_OUTDIR)/VirtualBox-x86.tlb) \
@@ -1197,6 +1219,9 @@ $(VBoxCOM-x86_0_OUTDIR)/VirtualBox_i.c \
 		/I $(call VBOX_FN_MAKE_WIN_PATH,$(PATH_SDK_$(VBOX_WINPSDK)_INC)) \
 		/I idl \
 		$(call VBOX_FN_MAKE_WIN_PATH,$<)
+	$(call def_VBoxMainDisableMscWarnings,$(VBoxCOM-x86_0_OUTDIR)/VirtualBox.h)
+	$(call def_VBoxMainDisableMscWarnings,$(VBoxCOM-x86_0_OUTDIR)/VirtualBox_i.c)
+	$(call def_VBoxMainDisableMscWarnings,$(VBoxCOM-x86_0_OUTDIR)/VirtualBox_p.c)
 
 #
 # Translation stuff
@@ -1253,11 +1278,11 @@ $(VBOX_JMSCOM_GEN)/jmscomglue.list: \
 	$(call MSG_L1,Generating Java MSCOM glue files from XIDL)
 	$(QUIET)$(RM) -f $(wildcard $(VBOX_JMSCOM_GEN)/java/*.java)
 	$(QUIET)$(VBOX_XSLTPROC) \
-              --stringparam filelistonly ""                    \
-              --stringparam G_vboxApiSuffix $(VBOX_API_SUFFIX) \
-              --stringparam G_vboxGlueStyle mscom              \
-              --stringparam G_vboxDirPrefix ""                 \
-              -o $(VBOX_JMSCOM_GEN)/java/merged.file $(VBOX_GLUE_XSLT_DIR)/glue-java.xsl $<
+		--stringparam filelistonly "" \
+		--stringparam G_vboxApiSuffix $(VBOX_API_SUFFIX) \
+		--stringparam G_vboxGlueStyle mscom \
+		--stringparam G_vboxDirPrefix "" \
+		-o $(VBOX_JMSCOM_GEN)/java/merged.file $(VBOX_GLUE_XSLT_DIR)/glue-java.xsl $<
 	$(QUIET)$(VBOX_FILESPLIT) $(VBOX_JMSCOM_GEN)/java/merged.file $(VBOX_JMSCOM_GEN)/java
 	$(QUIET)echo $(VBOX_JMSCOM_GEN)/java/*.java > $@
 
diff --git a/src/VBox/Main/cbinding/Makefile.kmk b/src/VBox/Main/cbinding/Makefile.kmk
index e384045..5bb018a 100644
--- a/src/VBox/Main/cbinding/Makefile.kmk
+++ b/src/VBox/Main/cbinding/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2009-2015 Oracle Corporation
+# Copyright (C) 2009-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/cbinding/VBoxCAPI.cpp b/src/VBox/Main/cbinding/VBoxCAPI.cpp
index 905a3ea..470b98c 100644
--- a/src/VBox/Main/cbinding/VBoxCAPI.cpp
+++ b/src/VBox/Main/cbinding/VBoxCAPI.cpp
@@ -38,7 +38,10 @@
 #include "VBox/com/com.h"
 #include "VBox/com/NativeEventQueue.h"
 
+
+#ifndef RT_OS_DARWIN /* Probably not used for xpcom, so clang gets upset: error: using directive refers to implicitly-defined namespace 'std' [-Werror]*/
 using namespace std;
+#endif
 
 /* The following 2 object references should be eliminated once the legacy
  * way to initialize the COM/XPCOM C bindings is removed. */
@@ -68,18 +71,21 @@ VBoxUtf16ToUtf8(CBSTR pwszString, char **ppszString)
 static int
 VBoxUtf8ToUtf16(const char *pszString, BSTR *ppwszString)
 {
+    *ppwszString = NULL;
     if (!pszString)
-    {
-        *ppwszString = NULL;
         return VINF_SUCCESS;
-    }
 #ifdef VBOX_WITH_XPCOM
     return RTStrToUtf16(pszString, ppwszString);
 #else /* !VBOX_WITH_XPCOM */
     PRTUTF16 pwsz;
     int vrc = RTStrToUtf16(pszString, &pwsz);
-    *ppwszString = ::SysAllocString(pwsz);
-    RTUtf16Free(pwsz);
+    if (RT_SUCCESS(vrc))
+    {
+        *ppwszString = ::SysAllocString(pwsz);
+        if (!*ppwszString)
+            vrc = VERR_NO_STR_MEMORY;
+        RTUtf16Free(pwsz);
+    }
     return vrc;
 #endif /* !VBOX_WITH_XPCOM */
 }
@@ -101,9 +107,9 @@ VBoxUtf16Free(BSTR pwszString)
 {
 #ifdef VBOX_WITH_XPCOM
     RTUtf16Free(pwszString);
-#else /* !VBOX_WITH_XPCOM */
+#else
     ::SysFreeString(pwszString);
-#endif /* !VBOX_WITH_XPCOM */
+#endif
 }
 
 static void
@@ -119,9 +125,9 @@ VBoxComUnallocString(BSTR pwsz)
     {
 #ifdef VBOX_WITH_XPCOM
         nsMemory::Free(pwsz);
-#else /* !VBOX_WITH_XPCOM */
+#else
         ::SysFreeString(pwsz);
-#endif /* !VBOX_WITH_XPCOM */
+#endif
     }
 }
 
@@ -253,7 +259,7 @@ VBoxSafeArrayCopyInParamHelper(SAFEARRAY *psa, const void *pv, ULONG cb)
     memcpy(pData, pv, cb);
 #ifndef VBOX_WITH_XPCOM
     SafeArrayUnaccessData(psa);
-#endif /* !VBOX_WITH_XPCOM */
+#endif
     return S_OK;
 }
 
@@ -316,7 +322,7 @@ VBoxSafeArrayCopyOutParamHelper(void **ppv, ULONG *pcb, VARTYPE vt, SAFEARRAY *p
         *pcb = (ULONG)cbTotal;
 #ifndef VBOX_WITH_XPCOM
     SafeArrayUnaccessData(psa);
-#endif /* !VBOX_WITH_XPCOM */
+#endif
     return S_OK;
 }
 
diff --git a/src/VBox/Main/cbinding/VBoxCAPI.rc b/src/VBox/Main/cbinding/VBoxCAPI.rc
index 8e2a217..69bb0bd 100644
--- a/src/VBox/Main/cbinding/VBoxCAPI.rc
+++ b/src/VBox/Main/cbinding/VBoxCAPI.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/cbinding/VBoxCAPIGlue.c b/src/VBox/Main/cbinding/VBoxCAPIGlue.c
index e0c1f49..333ea20 100644
--- a/src/VBox/Main/cbinding/VBoxCAPIGlue.c
+++ b/src/VBox/Main/cbinding/VBoxCAPIGlue.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * Permission is hereby granted, free of charge, to any person
  * obtaining a copy of this software and associated documentation
@@ -38,12 +38,13 @@
 #include <string.h>
 #include <stdlib.h>
 #include <stdarg.h>
-#include <stdint.h>
 #ifndef WIN32
+# include <stdint.h>
 # include <dlfcn.h>
 # include <pthread.h>
 #else /* WIN32 */
-# include <Windows.h>
+# include <iprt/stdint.h>
+# include <iprt/win/windows.h>
 #endif /* WIN32 */
 
 
diff --git a/src/VBox/Main/cbinding/VBoxCAPI_v2_2.h b/src/VBox/Main/cbinding/VBoxCAPI_v2_2.h
index eb0367a..316b1b4 100644
--- a/src/VBox/Main/cbinding/VBoxCAPI_v2_2.h
+++ b/src/VBox/Main/cbinding/VBoxCAPI_v2_2.h
@@ -19,7 +19,7 @@
  */
 
 /*
- * Copyright (C) 2008-2012 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of a free software library; you can redistribute
  * it and/or modify it under the terms of the GNU Lesser General
diff --git a/src/VBox/Main/cbinding/VBoxCAPI_v3_0.h b/src/VBox/Main/cbinding/VBoxCAPI_v3_0.h
index bc5c4d3..0e5aa98 100644
--- a/src/VBox/Main/cbinding/VBoxCAPI_v3_0.h
+++ b/src/VBox/Main/cbinding/VBoxCAPI_v3_0.h
@@ -19,7 +19,7 @@
  */
 
 /*
- * Copyright (C) 2008-2012 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of a free software library; you can redistribute
  * it and/or modify it under the terms of the GNU Lesser General
diff --git a/src/VBox/Main/cbinding/VBoxCAPI_v3_1.h b/src/VBox/Main/cbinding/VBoxCAPI_v3_1.h
index 079bfc1..a2fab99 100644
--- a/src/VBox/Main/cbinding/VBoxCAPI_v3_1.h
+++ b/src/VBox/Main/cbinding/VBoxCAPI_v3_1.h
@@ -19,7 +19,7 @@
  */
 
 /*
- * Copyright (C) 2008-2012 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of a free software library; you can redistribute
  * it and/or modify it under the terms of the GNU Lesser General
diff --git a/src/VBox/Main/cbinding/VBoxCAPI_v3_2.h b/src/VBox/Main/cbinding/VBoxCAPI_v3_2.h
index df009a6..7df26af 100644
--- a/src/VBox/Main/cbinding/VBoxCAPI_v3_2.h
+++ b/src/VBox/Main/cbinding/VBoxCAPI_v3_2.h
@@ -19,7 +19,7 @@
  */
 
 /*
- * Copyright (C) 2008-2012 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of a free software library; you can redistribute
  * it and/or modify it under the terms of the GNU Lesser General
diff --git a/src/VBox/Main/cbinding/VBoxCAPI_v4_0.h b/src/VBox/Main/cbinding/VBoxCAPI_v4_0.h
index bb621d0..3e6b435 100644
--- a/src/VBox/Main/cbinding/VBoxCAPI_v4_0.h
+++ b/src/VBox/Main/cbinding/VBoxCAPI_v4_0.h
@@ -19,7 +19,7 @@
  */
 
 /*
- * Copyright (C) 2008-2012 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of a free software library; you can redistribute
  * it and/or modify it under the terms of the GNU Lesser General
diff --git a/src/VBox/Main/cbinding/VBoxCAPI_v4_1.h b/src/VBox/Main/cbinding/VBoxCAPI_v4_1.h
index 0edd973..4fcd938 100644
--- a/src/VBox/Main/cbinding/VBoxCAPI_v4_1.h
+++ b/src/VBox/Main/cbinding/VBoxCAPI_v4_1.h
@@ -19,7 +19,7 @@
  */
 
 /*
- * Copyright (C) 2008-2012 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of a free software library; you can redistribute
  * it and/or modify it under the terms of the GNU Lesser General
diff --git a/src/VBox/Main/cbinding/VBoxCAPI_v4_2.h b/src/VBox/Main/cbinding/VBoxCAPI_v4_2.h
index 61b6d65..d541eab 100644
--- a/src/VBox/Main/cbinding/VBoxCAPI_v4_2.h
+++ b/src/VBox/Main/cbinding/VBoxCAPI_v4_2.h
@@ -19,7 +19,7 @@
  */
 
 /*
- * Copyright (C) 2008-2012 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of a free software library; you can redistribute
  * it and/or modify it under the terms of the GNU Lesser General
diff --git a/src/VBox/Main/cbinding/VBoxCAPI_v4_3.h b/src/VBox/Main/cbinding/VBoxCAPI_v4_3.h
index 18db2bb..d8ff302 100644
--- a/src/VBox/Main/cbinding/VBoxCAPI_v4_3.h
+++ b/src/VBox/Main/cbinding/VBoxCAPI_v4_3.h
@@ -20,7 +20,7 @@
  */
 
 /*
- * Copyright (C) 2008-2014 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of a free software library; you can redistribute
  * it and/or modify it under the terms of the GNU Lesser General
diff --git a/src/VBox/Main/cbinding/capiidl.xsl b/src/VBox/Main/cbinding/capiidl.xsl
index 29daf00..60001c6 100644
--- a/src/VBox/Main/cbinding/capiidl.xsl
+++ b/src/VBox/Main/cbinding/capiidl.xsl
@@ -7,7 +7,7 @@
  *  works on Windows, by using the C bindings header created by the MS COM IDL
  *  compiler (which simultaneously supports C and C++, unlike XPCOM).
 
-    Copyright (C) 2008-2015 Oracle Corporation
+    Copyright (C) 2008-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
@@ -72,7 +72,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of a free software library; you can redistribute
  * it and/or modify it under the terms of the GNU Lesser General
@@ -95,9 +95,12 @@
 #define ___VirtualBox_CAPI_h
 
 #ifdef _WIN32
+# pragma warning(push)
+# pragma warning(disable:4668 4255) /* -Wall and windows.h */
 # undef COBJMACROS
 # define COBJMACROS
 # include "Windows.h"
+# pragma warning(pop)
 #endif /* _WIN32 */
 
 #ifdef WIN32
diff --git a/src/VBox/Main/cbinding/tstCAPIGlue.c b/src/VBox/Main/cbinding/tstCAPIGlue.c
index ba939f0..ad22479 100644
--- a/src/VBox/Main/cbinding/tstCAPIGlue.c
+++ b/src/VBox/Main/cbinding/tstCAPIGlue.c
@@ -8,7 +8,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -20,6 +20,13 @@
  */
 
 
+/** @todo
+ * Our appologies for the 256+ missing return code checks in this sample file.
+ *
+ * We strongly recomment users of the VBoxCAPI to check all return codes!
+ */
+
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
@@ -32,6 +39,9 @@
 # include <unistd.h>
 # include <sys/poll.h>
 #endif
+#ifdef ___iprt_cdefs_h
+# error "not supposed to involve any IPRT or VBox headers here."
+#endif
 
 /**
  * Select between active event listener (defined) and passive event listener
@@ -431,9 +441,8 @@ static IEventListenerDemoVtblInt g_IEventListenerDemoVtblInt =
  *
  * @param   virtualBox ptr to IVirtualBox object
  * @param   session    ptr to ISession object
- * @param   id         identifies the machine to start
  */
-static void registerActiveEventListener(IVirtualBox *virtualBox, ISession *session, BSTR machineId)
+static void registerActiveEventListener(IVirtualBox *virtualBox, ISession *session)
 {
     IConsole *console = NULL;
     HRESULT rc;
@@ -445,33 +454,36 @@ static void registerActiveEventListener(IVirtualBox *virtualBox, ISession *sessi
         rc = IConsole_get_EventSource(console, &es);
         if (SUCCEEDED(rc) && es)
         {
-            static const ULONG interestingEvents[] =
-                {
-                    VBoxEventType_OnMousePointerShapeChanged,
-                    VBoxEventType_OnMouseCapabilityChanged,
-                    VBoxEventType_OnKeyboardLedsChanged,
-                    VBoxEventType_OnStateChanged,
-                    VBoxEventType_OnAdditionsStateChanged,
-                    VBoxEventType_OnNetworkAdapterChanged,
-                    VBoxEventType_OnSerialPortChanged,
-                    VBoxEventType_OnParallelPortChanged,
-                    VBoxEventType_OnStorageControllerChanged,
-                    VBoxEventType_OnMediumChanged,
-                    VBoxEventType_OnVRDEServerChanged,
-                    VBoxEventType_OnUSBControllerChanged,
-                    VBoxEventType_OnUSBDeviceStateChanged,
-                    VBoxEventType_OnSharedFolderChanged,
-                    VBoxEventType_OnRuntimeError,
-                    VBoxEventType_OnCanShowWindow,
-                    VBoxEventType_OnShowWindow
-                };
+            static const ULONG s_auInterestingEvents[] =
+            {
+                VBoxEventType_OnMousePointerShapeChanged,
+                VBoxEventType_OnMouseCapabilityChanged,
+                VBoxEventType_OnKeyboardLedsChanged,
+                VBoxEventType_OnStateChanged,
+                VBoxEventType_OnAdditionsStateChanged,
+                VBoxEventType_OnNetworkAdapterChanged,
+                VBoxEventType_OnSerialPortChanged,
+                VBoxEventType_OnParallelPortChanged,
+                VBoxEventType_OnStorageControllerChanged,
+                VBoxEventType_OnMediumChanged,
+                VBoxEventType_OnVRDEServerChanged,
+                VBoxEventType_OnUSBControllerChanged,
+                VBoxEventType_OnUSBDeviceStateChanged,
+                VBoxEventType_OnSharedFolderChanged,
+                VBoxEventType_OnRuntimeError,
+                VBoxEventType_OnCanShowWindow,
+                VBoxEventType_OnShowWindow
+            };
             SAFEARRAY *interestingEventsSA = NULL;
             IEventListenerDemo *consoleListener = NULL;
 
             /* The VirtualBox API expects enum values as VT_I4, which in the
              * future can be hopefully relaxed. */
-            interestingEventsSA = g_pVBoxFuncs->pfnSafeArrayCreateVector(VT_I4, 0, sizeof(interestingEvents) / sizeof(interestingEvents[0]));
-            g_pVBoxFuncs->pfnSafeArrayCopyInParamHelper(interestingEventsSA, &interestingEvents, sizeof(interestingEvents));
+            interestingEventsSA = g_pVBoxFuncs->pfnSafeArrayCreateVector(VT_I4, 0,
+                                                                           sizeof(s_auInterestingEvents)
+                                                                         / sizeof(s_auInterestingEvents[0]));
+            g_pVBoxFuncs->pfnSafeArrayCopyInParamHelper(interestingEventsSA, &s_auInterestingEvents,
+                                                        sizeof(s_auInterestingEvents));
 
             consoleListener = calloc(1, sizeof(IEventListenerDemo));
             if (consoleListener)
@@ -498,9 +510,7 @@ static void registerActiveEventListener(IVirtualBox *virtualBox, ISession *sessi
 #endif
 
                     while (!g_fStop)
-                    {
                         g_pVBoxFuncs->pfnProcessEventQueue(250);
-                    }
 
 #ifdef WIN32
                     SetConsoleCtrlHandler(ctrlCHandler, FALSE);
@@ -509,9 +519,7 @@ static void registerActiveEventListener(IVirtualBox *virtualBox, ISession *sessi
 #endif
                 }
                 else
-                {
                     printf("Failed to register event listener.\n");
-                }
                 IEventSource_UnregisterListener(es, (IEventListener *)consoleListener);
 #ifdef WIN32
                 if (consoleListener->pUnkMarshaler)
@@ -520,16 +528,12 @@ static void registerActiveEventListener(IVirtualBox *virtualBox, ISession *sessi
                 IEventListenerDemo_Release(consoleListener);
             }
             else
-            {
                 printf("Failed while allocating memory for console event listener.\n");
-            }
             g_pVBoxFuncs->pfnSafeArrayDestroy(interestingEventsSA);
             IEventSource_Release(es);
         }
         else
-        {
             printf("Failed to get the event source instance.\n");
-        }
         IConsole_Release(console);
     }
 }
@@ -541,47 +545,49 @@ static void registerActiveEventListener(IVirtualBox *virtualBox, ISession *sessi
  *
  * @param   virtualBox ptr to IVirtualBox object
  * @param   session    ptr to ISession object
- * @param   id         identifies the machine to start
  */
-static void registerPassiveEventListener(IVirtualBox *virtualBox, ISession *session, BSTR machineId)
+static void registerPassiveEventListener(ISession *session)
 {
     IConsole *console = NULL;
     HRESULT rc;
 
     rc = ISession_get_Console(session, &console);
-    if ((SUCCEEDED(rc)) && console)
+    if (SUCCEEDED(rc) && console)
     {
         IEventSource *es = NULL;
         rc = IConsole_get_EventSource(console, &es);
         if (SUCCEEDED(rc) && es)
         {
-            static const ULONG interestingEvents[] =
-                {
-                    VBoxEventType_OnMousePointerShapeChanged,
-                    VBoxEventType_OnMouseCapabilityChanged,
-                    VBoxEventType_OnKeyboardLedsChanged,
-                    VBoxEventType_OnStateChanged,
-                    VBoxEventType_OnAdditionsStateChanged,
-                    VBoxEventType_OnNetworkAdapterChanged,
-                    VBoxEventType_OnSerialPortChanged,
-                    VBoxEventType_OnParallelPortChanged,
-                    VBoxEventType_OnStorageControllerChanged,
-                    VBoxEventType_OnMediumChanged,
-                    VBoxEventType_OnVRDEServerChanged,
-                    VBoxEventType_OnUSBControllerChanged,
-                    VBoxEventType_OnUSBDeviceStateChanged,
-                    VBoxEventType_OnSharedFolderChanged,
-                    VBoxEventType_OnRuntimeError,
-                    VBoxEventType_OnCanShowWindow,
-                    VBoxEventType_OnShowWindow
-                };
+            static const ULONG s_auInterestingEvents[] =
+            {
+                VBoxEventType_OnMousePointerShapeChanged,
+                VBoxEventType_OnMouseCapabilityChanged,
+                VBoxEventType_OnKeyboardLedsChanged,
+                VBoxEventType_OnStateChanged,
+                VBoxEventType_OnAdditionsStateChanged,
+                VBoxEventType_OnNetworkAdapterChanged,
+                VBoxEventType_OnSerialPortChanged,
+                VBoxEventType_OnParallelPortChanged,
+                VBoxEventType_OnStorageControllerChanged,
+                VBoxEventType_OnMediumChanged,
+                VBoxEventType_OnVRDEServerChanged,
+                VBoxEventType_OnUSBControllerChanged,
+                VBoxEventType_OnUSBDeviceStateChanged,
+                VBoxEventType_OnSharedFolderChanged,
+                VBoxEventType_OnRuntimeError,
+                VBoxEventType_OnCanShowWindow,
+                VBoxEventType_OnShowWindow
+            };
             SAFEARRAY *interestingEventsSA = NULL;
             IEventListener *consoleListener = NULL;
 
             /* The VirtualBox API expects enum values as VT_I4, which in the
              * future can be hopefully relaxed. */
-            interestingEventsSA = g_pVBoxFuncs->pfnSafeArrayCreateVector(VT_I4, 0, sizeof(interestingEvents) / sizeof(interestingEvents[0]));
-            g_pVBoxFuncs->pfnSafeArrayCopyInParamHelper(interestingEventsSA, &interestingEvents, sizeof(interestingEvents));
+            interestingEventsSA = g_pVBoxFuncs->pfnSafeArrayCreateVector(VT_I4, 0,
+                                                                           sizeof(s_auInterestingEvents)
+                                                                         / sizeof(s_auInterestingEvents[0]));
+            g_pVBoxFuncs->pfnSafeArrayCopyInParamHelper(interestingEventsSA, &s_auInterestingEvents,
+                                                        sizeof(s_auInterestingEvents));
 
             rc = IEventSource_CreateListener(es, &consoleListener);
             if (SUCCEEDED(rc) && consoleListener)
@@ -642,23 +648,17 @@ static void registerPassiveEventListener(IVirtualBox *virtualBox, ISession *sess
 #endif
                 }
                 else
-                {
                     printf("Failed to register event listener.\n");
-                }
                 IEventSource_UnregisterListener(es, (IEventListener *)consoleListener);
                 IEventListener_Release(consoleListener);
             }
             else
-            {
                 printf("Failed to create an event listener instance.\n");
-            }
             g_pVBoxFuncs->pfnSafeArrayDestroy(interestingEventsSA);
             IEventSource_Release(es);
         }
         else
-        {
             printf("Failed to get the event source instance.\n");
-        }
         IConsole_Release(console);
     }
 }
@@ -674,16 +674,14 @@ static void registerPassiveEventListener(IVirtualBox *virtualBox, ISession *sess
 static void PrintErrorInfo(const char *pszExecutable, const char *pszErrorMsg, HRESULT rc)
 {
     IErrorInfo *ex;
-    HRESULT rc2 = S_OK;
+    HRESULT rc2;
     fprintf(stderr, "%s: %s (rc=%#010x)\n", pszExecutable, pszErrorMsg, (unsigned)rc);
     rc2 = g_pVBoxFuncs->pfnGetException(&ex);
     if (SUCCEEDED(rc2) && ex)
     {
         IVirtualBoxErrorInfo *ei;
         rc2 = IErrorInfo_QueryInterface(ex, &IID_IVirtualBoxErrorInfo, (void **)&ei);
-        if (FAILED(rc2))
-            ei = NULL;
-        if (ei)
+        if (SUCCEEDED(rc2) && ei != NULL)
         {
             /* got extended error info, maybe multiple infos */
             do
@@ -716,8 +714,7 @@ static void PrintErrorInfo(const char *pszExecutable, const char *pszErrorMsg, H
                     ei_next = NULL;
                 IVirtualBoxErrorInfo_Release(ei);
                 ei = ei_next;
-            }
-            while (ei);
+            } while (ei);
         }
 
         IErrorInfo_Release(ex);
@@ -812,10 +809,10 @@ static void startVM(const char *argv0, IVirtualBox *virtualBox, ISession *sessio
             /* Kick off the event listener demo part, which is quite separate.
              * Ignore it if you need a more basic sample. */
 #ifdef USE_ACTIVE_EVENT_LISTENER
-            registerActiveEventListener(virtualBox, session, id);
-#else /* !USE_ACTIVE_EVENT_LISTENER */
-            registerPassiveEventListener(virtualBox, session, id);
-#endif /* !USE_ACTIVE_EVENT_LISTENER */
+            registerActiveEventListener(virtualBox, session);
+#else
+            registerPassiveEventListener(session);
+#endif
         }
         IProgress_Release(progress);
     }
@@ -871,7 +868,6 @@ static void listVMs(const char *argv0, IVirtualBox *virtualBox, ISession *sessio
     /*
      * Iterate through the collection.
      */
-
     for (i = 0; i < machineCnt; ++i)
     {
         IMachine *machine      = machines[i];
@@ -899,9 +895,7 @@ static void listVMs(const char *argv0, IVirtualBox *virtualBox, ISession *sessio
             g_pVBoxFuncs->pfnUtf8Free(machineName);
         }
         else
-        {
             printf("\tName:        <inaccessible>\n");
-        }
 
         {
             BSTR uuidUtf16;
@@ -957,9 +951,8 @@ static void listVMs(const char *argv0, IVirtualBox *virtualBox, ISession *sessio
     /*
      * Let the user chose a machine to start.
      */
-
     printf("Type Machine# to start (0 - %u) or 'quit' to do nothing: ",
-        (unsigned)(machineCnt - 1));
+           (unsigned)(machineCnt - 1));
     fflush(stdout);
 
     if (scanf("%u", &start_id) == 1 && start_id < machineCnt)
@@ -979,15 +972,12 @@ static void listVMs(const char *argv0, IVirtualBox *virtualBox, ISession *sessio
     /*
      * Don't forget to release the objects in the array.
      */
-
     for (i = 0; i < machineCnt; ++i)
     {
         IMachine *machine = machines[i];
 
         if (machine)
-        {
             IMachine_Release(machine);
-        }
     }
     g_pVBoxFuncs->pfnArrayOutFree(machines);
 }
@@ -1002,7 +992,8 @@ int main(int argc, char **argv)
     ULONG       revision         = 0;
     BSTR        versionUtf16     = NULL;
     BSTR        homefolderUtf16  = NULL;
-    HRESULT    rc;     /* Result code of various function (method) calls. */
+    HRESULT     rc;     /* Result code of various function (method) calls. */
+    (void)argc;
 
     printf("Starting main()\n");
 
@@ -1060,7 +1051,6 @@ int main(int argc, char **argv)
      */
 
     /* 1. Revision */
-
     rc = IVirtualBox_get_Revision(vbox, &revision);
     if (SUCCEEDED(rc))
         printf("\tRevision: %u\n", revision);
@@ -1068,7 +1058,6 @@ int main(int argc, char **argv)
         PrintErrorInfo(argv[0], "GetRevision() failed", rc);
 
     /* 2. Version */
-
     rc = IVirtualBox_get_Version(vbox, &versionUtf16);
     if (SUCCEEDED(rc))
     {
@@ -1082,7 +1071,6 @@ int main(int argc, char **argv)
         PrintErrorInfo(argv[0], "GetVersion() failed", rc);
 
     /* 3. Home Folder */
-
     rc = IVirtualBox_get_HomeFolder(vbox, &homefolderUtf16);
     if (SUCCEEDED(rc))
     {
@@ -1103,7 +1091,6 @@ int main(int argc, char **argv)
     /*
      * Do as mom told us: always clean up after yourself.
      */
-
 #ifdef USE_ACTIVE_EVENT_LISTENER
 # ifdef WIN32
     if (g_pTInfoIEventListener)
diff --git a/src/VBox/Main/glue/AutoLock.cpp b/src/VBox/Main/glue/AutoLock.cpp
index 0f6246c..813a05e 100644
--- a/src/VBox/Main/glue/AutoLock.cpp
+++ b/src/VBox/Main/glue/AutoLock.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -126,11 +126,11 @@ void InitAutoLockSystem()
 bool AutoLockHoldsLocksInClass(VBoxLockingClass lockClass)
 {
 #ifdef VBOX_WITH_MAIN_LOCK_VALIDATION
-    return RTLockValidatorHoldsLocksInClass(NIL_RTTHREAD,
-                                            g_mapLockValidationClasses[lockClass]);
-#else /* !VBOX_WITH_MAIN_LOCK_VALIDATION */
+    return RTLockValidatorHoldsLocksInClass(NIL_RTTHREAD, g_mapLockValidationClasses[lockClass]);
+#else
+    RT_NOREF(lockClass);
     return false;
-#endif /* !VBOX_WITH_MAIN_LOCK_VALIDATION */
+#endif
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -401,17 +401,15 @@ struct AutoLockBase::Data
 AutoLockBase::AutoLockBase(uint32_t cHandles
                            COMMA_LOCKVAL_SRC_POS_DECL)
 {
-    m = new Data(cHandles
-                 COMMA_LOCKVAL_SRC_POS_ARGS);
+    m = new Data(cHandles COMMA_LOCKVAL_SRC_POS_ARGS);
 }
 
 AutoLockBase::AutoLockBase(uint32_t cHandles,
                            LockHandle *pHandle
                            COMMA_LOCKVAL_SRC_POS_DECL)
 {
-    Assert(cHandles == 1);
-    m = new Data(1
-                 COMMA_LOCKVAL_SRC_POS_ARGS);
+    Assert(cHandles == 1); NOREF(cHandles);
+    m = new Data(1 COMMA_LOCKVAL_SRC_POS_ARGS);
     m->aHandles[0] = pHandle;
 }
 
diff --git a/src/VBox/Main/glue/ErrorInfo.cpp b/src/VBox/Main/glue/ErrorInfo.cpp
index 149708f..e825998 100644
--- a/src/VBox/Main/glue/ErrorInfo.cpp
+++ b/src/VBox/Main/glue/ErrorInfo.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/glue/EventQueue.cpp b/src/VBox/Main/glue/EventQueue.cpp
index c918c99..cf6c4ff 100644
--- a/src/VBox/Main/glue/EventQueue.cpp
+++ b/src/VBox/Main/glue/EventQueue.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/glue/NativeEventQueue.cpp b/src/VBox/Main/glue/NativeEventQueue.cpp
index 0efdcda..73f2ed5 100644
--- a/src/VBox/Main/glue/NativeEventQueue.cpp
+++ b/src/VBox/Main/glue/NativeEventQueue.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -545,7 +545,7 @@ int NativeEventQueue::processEventQueue(RTMSINTERVAL cMsTimeout)
 #else // !VBOX_WITH_XPCOM
     if (cMsTimeout == RT_INDEFINITE_WAIT)
     {
-        BOOL fRet;
+        BOOL fRet = 0; /* Shut up MSC */
         MSG  Msg;
         rc = VINF_SUCCESS;
         while (   rc != VERR_INTERRUPTED
diff --git a/src/VBox/Main/glue/com.cpp b/src/VBox/Main/glue/com.cpp
index 9fcfd9a..eecf40c 100644
--- a/src/VBox/Main/glue/com.cpp
+++ b/src/VBox/Main/glue/com.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2005-2013 Oracle Corporation
+ * Copyright (C) 2005-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -17,7 +17,7 @@
 
 #if !defined (VBOX_WITH_XPCOM)
 
-# include <objbase.h>
+# include <iprt/win/objbase.h>
 
 #else /* !defined (VBOX_WITH_XPCOM) */
 # include <stdlib.h>
diff --git a/src/VBox/Main/glue/errorprint.cpp b/src/VBox/Main/glue/errorprint.cpp
index b1b53ee..c2d4451 100644
--- a/src/VBox/Main/glue/errorprint.cpp
+++ b/src/VBox/Main/glue/errorprint.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/glue/initterm.cpp b/src/VBox/Main/glue/initterm.cpp
index 212b0f3..4b9dbdb 100644
--- a/src/VBox/Main/glue/initterm.cpp
+++ b/src/VBox/Main/glue/initterm.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -19,7 +19,7 @@
 #if !defined(VBOX_WITH_XPCOM)
 
 # include <iprt/nt/nt-and-windows.h>
-# include <objbase.h>
+# include <iprt/win/objbase.h>
 
 #else /* !defined(VBOX_WITH_XPCOM) */
 
diff --git a/src/VBox/Main/glue/string.cpp b/src/VBox/Main/glue/string.cpp
index 2124096..62d33bb 100644
--- a/src/VBox/Main/glue/string.cpp
+++ b/src/VBox/Main/glue/string.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/glue/vboxapi.py b/src/VBox/Main/glue/vboxapi.py
index 142820e..b97935f 100755
--- a/src/VBox/Main/glue/vboxapi.py
+++ b/src/VBox/Main/glue/vboxapi.py
@@ -25,7 +25,7 @@ __copyright__ = \
     You may elect to license modified versions of this file under the
     terms and conditions of either the GPL or the CDDL or both.
     """
-__version__ = "$Revision: 107684 $"
+__version__ = "$Revision: 109501 $"
 
 
 # Note! To set Python bitness on OSX use 'export VERSIONER_PYTHON_PREFER_32_BIT=yes'
@@ -463,6 +463,7 @@ class PlatformMSCOM(PlatformBase):
         self.flushGenPyCache(win32com.client.gencache)
         win32com.client.gencache.EnsureDispatch('VirtualBox.Session')
         win32com.client.gencache.EnsureDispatch('VirtualBox.VirtualBox')
+        win32com.client.gencache.EnsureDispatch('VirtualBox.VirtualBoxClient')
 
         self.oIntCv = threading.Condition()
         self.fInterrupted = False
@@ -506,7 +507,8 @@ class PlatformMSCOM(PlatformBase):
     def getVirtualBox(self):
         import win32com
         from win32com.client import Dispatch
-        return win32com.client.Dispatch("VirtualBox.VirtualBox")
+        client = win32com.client.Dispatch("VirtualBox.VirtualBoxClient")
+        return client.virtualBox
 
     def getType(self):
         return 'MSCOM'
@@ -737,7 +739,8 @@ class PlatformXPCOM(PlatformBase):
 
     def getVirtualBox(self):
         import xpcom.components
-        return xpcom.components.classes["@virtualbox.org/VirtualBox;1"].createInstance()
+        client = xpcom.components.classes["@virtualbox.org/VirtualBoxClient;1"].createInstance()
+        return client.virtualBox
 
     def getType(self):
         return 'XPCOM'
diff --git a/src/VBox/Main/glue/xpcom/helpers.cpp b/src/VBox/Main/glue/xpcom/helpers.cpp
index 215433d..9e0774a 100644
--- a/src/VBox/Main/glue/xpcom/helpers.cpp
+++ b/src/VBox/Main/glue/xpcom/helpers.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/idl/VirtualBox.xidl b/src/VBox/Main/idl/VirtualBox.xidl
index b91c244..7cb62e2 100644
--- a/src/VBox/Main/idl/VirtualBox.xidl
+++ b/src/VBox/Main/idl/VirtualBox.xidl
@@ -17598,7 +17598,7 @@ Snapshot 1 (B.vdi)            Snapshot 1 (B.vdi)
     name="IMachineDebugger" extends="$unknown"
     uuid="9c0f5269-47ae-ee34-c2fe-53a16e388925"
     wsmap="managed"
-    reservedMethods="16" reservedAttributes="16"
+    reservedMethods="16" reservedAttributes="15"
     >
     <method name="dumpGuestCore">
       <desc>
@@ -18080,6 +18080,11 @@ Snapshot 1 (B.vdi)            Snapshot 1 (B.vdi)
       </desc>
     </attribute>
 
+    <attribute name="uptime" type="long long" readonly="yes">
+      <desc>VM uptime in milliseconds, i.e. time in which it could have been
+        executing guest code. Excludes the time when the VM was paused.</desc>
+    </attribute>
+
   </interface>
 
   <!--
@@ -23759,4 +23764,5 @@ Snapshot 1 (B.vdi)            Snapshot 1 (B.vdi)
 
 </idl>
 
+
 <!-- vim: set shiftwidth=2 tabstop=2 expandtab: -->
diff --git a/src/VBox/Main/idl/apiwrap-server-filelist.xsl b/src/VBox/Main/idl/apiwrap-server-filelist.xsl
index 246c124..0f0d77b 100644
--- a/src/VBox/Main/idl/apiwrap-server-filelist.xsl
+++ b/src/VBox/Main/idl/apiwrap-server-filelist.xsl
@@ -7,7 +7,7 @@
         the lists of files that apiwrap-server.xsl produces
         from VirtualBox.xidl.
 
-    Copyright (C) 2015 Oracle Corporation
+    Copyright (C) 2015-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/idl/apiwrap-server.xsl b/src/VBox/Main/idl/apiwrap-server.xsl
index a322d9b..f97b4b7 100644
--- a/src/VBox/Main/idl/apiwrap-server.xsl
+++ b/src/VBox/Main/idl/apiwrap-server.xsl
@@ -80,7 +80,7 @@ templates for file headers/footers
  */
 
 /**
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -178,7 +178,13 @@ public:
 
 <xsl:template match="interface" mode="classfooter">
     <xsl:param name="addinterfaces"/>
-    <xsl:text>};
+    <xsl:text>
+private:
+    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(</xsl:text>
+    <xsl:value-of select="concat(substring(@name, 2),'Wrap')"/>
+    <xsl:text>); /* Shuts up MSC warning C4625. */
+
+};
 
 </xsl:text>
     <xsl:value-of select="concat('#endif // !', substring(@name, 2), 'Wrap_H_', $G_sNewLine)"/>
@@ -1326,6 +1332,7 @@ Returns empty if not needed, non-empty ('yes') if needed. -->
     <xsl:if test="$attrbasename = 'MidlDoesNotLikeEmptyInterfaces'">
         <xsl:text>
 #else  /* dummy attribute */
+    NOREF(aMidlDoesNotLikeEmptyInterfaces);
     return E_FAIL;
 #endif /* dummy attribute */</xsl:text>
     </xsl:if>
diff --git a/src/VBox/Main/idl/docstrip.xsl b/src/VBox/Main/idl/docstrip.xsl
index 9efb49a..009c90d 100644
--- a/src/VBox/Main/idl/docstrip.xsl
+++ b/src/VBox/Main/idl/docstrip.xsl
@@ -9,7 +9,7 @@
     original XIDL should not cause a full recompile of nearly all of
     VirtualBox.
 
-    Copyright (C) 2009-2012 Oracle Corporation
+    Copyright (C) 2009-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/idl/doxygen.xsl b/src/VBox/Main/idl/doxygen.xsl
index f7e1c72..0120586 100644
--- a/src/VBox/Main/idl/doxygen.xsl
+++ b/src/VBox/Main/idl/doxygen.xsl
@@ -5,7 +5,7 @@
  *  definition expressed in XML. The generated file is intended solely to
  *  generate the documentation using Doxygen.
 
-    Copyright (C) 2006-2012 Oracle Corporation
+    Copyright (C) 2006-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/idl/midl.xsl b/src/VBox/Main/idl/midl.xsl
index 1f4a4c6..3dc0c1a 100644
--- a/src/VBox/Main/idl/midl.xsl
+++ b/src/VBox/Main/idl/midl.xsl
@@ -5,7 +5,7 @@
  *  A template to generate a MS IDL compatible interface definition file
  *  from the generic interface definition expressed in XML.
 
-    Copyright (C) 2006-2015 Oracle Corporation
+    Copyright (C) 2006-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
@@ -52,9 +52,17 @@
  *  Source    : src/VBox/Main/idl/VirtualBox.xidl
  *  Generator : src/VBox/Main/idl/midl.xsl
  */
-  </xsl:text>
-  <xsl:text>&#x0A;</xsl:text>
-  <xsl:text>import "unknwn.idl";&#x0A;&#x0A;</xsl:text>
+
+#if (__midl >= 501)
+midl_pragma warning(disable:2039) /* Disable warning MIDL2039 regarding interface not being automation
+                                     marshaling conformant and requiring NT 4.0 SP4 or greater. */
+midl_pragma warning(disable:2456) /* Disable warning MIDL2456 regarding SAFEARRAY(interface pointer). */
+midl_pragma warning(disable:2111) /* Disable warning MIDL2111 regarding identifier lengths exceeding 31 chars. */
+#endif
+
+import "unknwn.idl";
+
+</xsl:text>
   <xsl:apply-templates/>
 </xsl:template>
 
diff --git a/src/VBox/Main/idl/typemap-shared.inc.xsl b/src/VBox/Main/idl/typemap-shared.inc.xsl
index 0a4252e..915b2e6 100644
--- a/src/VBox/Main/idl/typemap-shared.inc.xsl
+++ b/src/VBox/Main/idl/typemap-shared.inc.xsl
@@ -4,7 +4,7 @@
     for the webservice, so we can share some definitions that must
     be the same for all of them (like method prefixes/suffices).
 
-    Copyright (C) 2006-2013 Oracle Corporation
+    Copyright (C) 2006-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/idl/xpidl.xsl b/src/VBox/Main/idl/xpidl.xsl
index 12fb1d9..d5439a6 100644
--- a/src/VBox/Main/idl/xpidl.xsl
+++ b/src/VBox/Main/idl/xpidl.xsl
@@ -5,7 +5,7 @@
  *  A template to generate a XPCOM IDL compatible interface definition file
  *  from the generic interface definition expressed in XML.
 
-    Copyright (C) 2006-2015 Oracle Corporation
+    Copyright (C) 2006-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/idl/xpidl_iid.xsl b/src/VBox/Main/idl/xpidl_iid.xsl
index 1e21608..763df10 100644
--- a/src/VBox/Main/idl/xpidl_iid.xsl
+++ b/src/VBox/Main/idl/xpidl_iid.xsl
@@ -5,7 +5,7 @@
  *  A template to generate a header file containing IIDs for XPCOM
  *  from the generic interface definition expressed in XML.
 
-    Copyright (C) 2006-2014 Oracle Corporation
+    Copyright (C) 2006-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/AdditionsFacilityImpl.h b/src/VBox/Main/include/AdditionsFacilityImpl.h
index 59d78ad..f6c14ab 100644
--- a/src/VBox/Main/include/AdditionsFacilityImpl.h
+++ b/src/VBox/Main/include/AdditionsFacilityImpl.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/ApplianceImpl.h b/src/VBox/Main/include/ApplianceImpl.h
index 7c54f4a..18157b9 100644
--- a/src/VBox/Main/include/ApplianceImpl.h
+++ b/src/VBox/Main/include/ApplianceImpl.h
@@ -134,7 +134,7 @@ private:
     void i_disksWeight();
     void i_parseBucket(Utf8Str &aPath, Utf8Str &aBucket);
 
-    static DECLCALLBACK(int) i_taskThreadImportOrExport(RTTHREAD aThread, void *pvUser);
+    static void i_importOrExportThreadTask(TaskOVF *pTask);
 
     HRESULT i_initSetOfSupportedStandardsURI();
 
diff --git a/src/VBox/Main/include/ApplianceImplPrivate.h b/src/VBox/Main/include/ApplianceImplPrivate.h
index a2b1f33..1be6f12 100644
--- a/src/VBox/Main/include/ApplianceImplPrivate.h
+++ b/src/VBox/Main/include/ApplianceImplPrivate.h
@@ -238,7 +238,7 @@ struct Appliance::XMLStack
     std::map<Utf8Str, bool> mapNetworks;
 };
 
-class Appliance::TaskOVF: public ThreadTask
+class Appliance::TaskOVF : public ThreadTask
 {
 public:
     enum TaskType
@@ -282,7 +282,7 @@ public:
 
     void handler()
     {
-        int vrc = Appliance::i_taskThreadImportOrExport(NULL, this); NOREF(vrc);
+        Appliance::i_importOrExportThreadTask(this);
     }
 };
 
diff --git a/src/VBox/Main/include/AudioAdapterImpl.h b/src/VBox/Main/include/AudioAdapterImpl.h
index 0f6591b..b15564b 100644
--- a/src/VBox/Main/include/AudioAdapterImpl.h
+++ b/src/VBox/Main/include/AudioAdapterImpl.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/AuthLibrary.h b/src/VBox/Main/include/AuthLibrary.h
index 5d4192a..3425975 100644
--- a/src/VBox/Main/include/AuthLibrary.h
+++ b/src/VBox/Main/include/AuthLibrary.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/AutoCaller.h b/src/VBox/Main/include/AutoCaller.h
index baeaffa..8896f9f 100644
--- a/src/VBox/Main/include/AutoCaller.h
+++ b/src/VBox/Main/include/AutoCaller.h
@@ -189,8 +189,8 @@ protected:
     }
 
 private:
-    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(AutoCaller)
-    DECLARE_CLS_NEW_DELETE_NOOP(AutoCaller)
+    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(AutoCaller);
+    DECLARE_CLS_NEW_DELETE_NOOP(AutoCaller);
 
     VirtualBoxBase *mObj;
     HRESULT mRC;
@@ -246,6 +246,8 @@ public:
         AutoCaller::init(aObj, true);
     }
 
+private:
+    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(AutoLimitedCaller); /* Shuts up MSC warning C4625. */
 };
 
 /**
@@ -345,8 +347,8 @@ public:
 
 private:
 
-    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(AutoInitSpan)
-    DECLARE_CLS_NEW_DELETE_NOOP(AutoInitSpan)
+    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(AutoInitSpan);
+    DECLARE_CLS_NEW_DELETE_NOOP(AutoInitSpan);
 
     VirtualBoxBase *mObj;
     Result mResult : 3; // must be at least total number of bits + 1 (sign)
@@ -422,8 +424,8 @@ public:
 
 private:
 
-    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(AutoReinitSpan)
-    DECLARE_CLS_NEW_DELETE_NOOP(AutoReinitSpan)
+    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(AutoReinitSpan);
+    DECLARE_CLS_NEW_DELETE_NOOP(AutoReinitSpan);
 
     VirtualBoxBase *mObj;
     bool mSucceeded : 1;
@@ -486,8 +488,8 @@ public:
 
 private:
 
-    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(AutoUninitSpan)
-    DECLARE_CLS_NEW_DELETE_NOOP(AutoUninitSpan)
+    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(AutoUninitSpan);
+    DECLARE_CLS_NEW_DELETE_NOOP(AutoUninitSpan);
 
     VirtualBoxBase *mObj;
     bool mInitFailed : 1;
diff --git a/src/VBox/Main/include/AutoStateDep.h b/src/VBox/Main/include/AutoStateDep.h
index f90dec9..8cc483e 100644
--- a/src/VBox/Main/include/AutoStateDep.h
+++ b/src/VBox/Main/include/AutoStateDep.h
@@ -10,7 +10,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -110,8 +110,8 @@
 
     private:
 
-        DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(AutoStateDependency)
-        DECLARE_CLS_NEW_DELETE_NOOP(AutoStateDependency)
+        DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(AutoStateDependency);
+        DECLARE_CLS_NEW_DELETE_NOOP(AutoStateDependency);
     };
 
     /**
diff --git a/src/VBox/Main/include/AutostartDb.h b/src/VBox/Main/include/AutostartDb.h
index a516224..70b9010 100644
--- a/src/VBox/Main/include/AutostartDb.h
+++ b/src/VBox/Main/include/AutostartDb.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/BandwidthControlImpl.h b/src/VBox/Main/include/BandwidthControlImpl.h
index e47ac0e..a93ab6d 100644
--- a/src/VBox/Main/include/BandwidthControlImpl.h
+++ b/src/VBox/Main/include/BandwidthControlImpl.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/ClientToken.h b/src/VBox/Main/include/ClientToken.h
index d452269..1b3ee18 100644
--- a/src/VBox/Main/include/ClientToken.h
+++ b/src/VBox/Main/include/ClientToken.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/ClientTokenHolder.h b/src/VBox/Main/include/ClientTokenHolder.h
index 30a2e51..172072b 100644
--- a/src/VBox/Main/include/ClientTokenHolder.h
+++ b/src/VBox/Main/include/ClientTokenHolder.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/ConsoleImpl.h b/src/VBox/Main/include/ConsoleImpl.h
index d8b7b21..8017229 100644
--- a/src/VBox/Main/include/ConsoleImpl.h
+++ b/src/VBox/Main/include/ConsoleImpl.h
@@ -50,6 +50,8 @@ class ExtPackManager;
 #endif
 class VMMDevMouseInterface;
 class DisplayMouseInterface;
+class VMPowerUpTask;
+class VMPowerDownTask;
 
 #include <iprt/uuid.h>
 #include <iprt/memsafer.h>
@@ -59,10 +61,6 @@ class DisplayMouseInterface;
 # include <VBox/HostServices/GuestPropertySvc.h>  /* For the property notification callback */
 #endif
 
-#ifdef RT_OS_WINDOWS
-# include "../src-server/win/VBoxComEvents.h"
-#endif
-
 struct VUSBIRHCONFIG;
 typedef struct VUSBIRHCONFIG *PVUSBIRHCONFIG;
 
@@ -383,7 +381,7 @@ private:
         }
     private:
         HRESULT mRC; /* Whether the caller was added. */
-        DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(AutoVMCallerBase)
+        DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(AutoVMCallerBase);
     };
 
 #if 0
@@ -477,7 +475,7 @@ private:
         }
         HRESULT mRC; /* Whether the VM ptr was retained. */
         PUVM    mpUVM;
-        DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(SafeVMPtrBase)
+        DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(SafeVMPtrBase);
     };
 
 public:
@@ -564,8 +562,8 @@ public:
     typedef std::map<Utf8Str, ComPtr<IMediumAttachment> > MediumAttachmentMap;
     typedef std::list <USBStorageDevice> USBStorageDeviceList;
 
-    static DECLCALLBACK(int)    i_powerUpThread(RTTHREAD Thread, void *pvUser);
-    static DECLCALLBACK(int)    i_powerDownThread(RTTHREAD Thread, void *pvUser);
+    static void i_powerUpThreadTask(VMPowerUpTask *pTask);
+    static void i_powerDownThreadTask(VMPowerDownTask *pTask);
 
 private:
 
@@ -813,7 +811,7 @@ private:
 
     /** @name Teleporter support
      * @{ */
-    static DECLCALLBACK(int)    i_teleporterSrcThreadWrapper(RTTHREAD hThread, void *pvUser);
+    static DECLCALLBACK(int)    i_teleporterSrcThreadWrapper(RTTHREAD hThreadSelf, void *pvUser);
     HRESULT                     i_teleporterSrc(TeleporterStateSrc *pState);
     HRESULT                     i_teleporterSrcReadACK(TeleporterStateSrc *pState, const char *pszWhich, const char *pszNAckMsg = NULL);
     HRESULT                     i_teleporterSrcSubmitCommand(TeleporterStateSrc *pState, const char *pszCommand, bool fWaitForAck = true);
diff --git a/src/VBox/Main/include/ConsoleVRDPServer.h b/src/VBox/Main/include/ConsoleVRDPServer.h
index 4617123..42c3042 100644
--- a/src/VBox/Main/include/ConsoleVRDPServer.h
+++ b/src/VBox/Main/include/ConsoleVRDPServer.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/DisplayImpl.h b/src/VBox/Main/include/DisplayImpl.h
index 7a1921e..7e204cd 100644
--- a/src/VBox/Main/include/DisplayImpl.h
+++ b/src/VBox/Main/include/DisplayImpl.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -178,6 +178,9 @@ public:
                                           uint32_t x, uint32_t y, uint32_t uPixelFormat, uint32_t uBitsPerPixel,
                                           uint32_t uBytesPerLine, uint32_t uGuestWidth, uint32_t uGuestHeight,
                                           uint8_t *pu8BufferAddress, uint64_t u64TimeStamp);
+    /** @todo r=bird: u64TimeStamp - using the 'u64' prefix add nothing.
+     *        However, using one of the prefixes indicating the timestamp unit
+     *        would be very valuable!  */
     bool i_handleCrVRecScreenshotBegin(uint32_t uScreen, uint64_t u64TimeStamp);
     void i_handleCrVRecScreenshotEnd(uint32_t uScreen, uint64_t u64TimeStamp);
     void i_handleVRecCompletion();
@@ -187,7 +190,7 @@ public:
 
     int  i_saveVisibleRegion(uint32_t cRect, PRTRECT pRect);
     int  i_handleSetVisibleRegion(uint32_t cRect, PRTRECT pRect);
-    int  i_handleQueryVisibleRegion(uint32_t *pcRect, PRTRECT pRect);
+    int  i_handleQueryVisibleRegion(uint32_t *pcRects, PRTRECT paRects);
 
     void i_VideoAccelVRDP(bool fEnable);
 
@@ -503,6 +506,9 @@ private:
     VIDEORECCONTEXT *mpVideoRecCtx;
     bool maVideoRecEnabled[SchemaDefs::MaxGuestMonitors];
 #endif
+
+private:
+    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(Display); /* Shuts up MSC warning C4625. */
 };
 
 /* The legacy VBVA helpers. */
@@ -521,10 +527,6 @@ void videoAccelLeaveVMMDev(VIDEOACCEL *pVideoAccel);
 
 
 /* helper function, code in DisplayResampleImage.cpp */
-void gdImageCopyResampled(uint8_t *dst, uint8_t *src,
-                            int dstX, int dstY, int srcX, int srcY,
-                            int dstW, int dstH, int srcW, int srcH);
-
 void BitmapScale32(uint8_t *dst, int dstW, int dstH,
                    const uint8_t *src, int iDeltaLine, int srcW, int srcH);
 
diff --git a/src/VBox/Main/include/DisplayUtils.h b/src/VBox/Main/include/DisplayUtils.h
index ae805db..c0d50bc 100644
--- a/src/VBox/Main/include/DisplayUtils.h
+++ b/src/VBox/Main/include/DisplayUtils.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2012 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/DrvAudioVRDE.h b/src/VBox/Main/include/DrvAudioVRDE.h
index 7d31636..3690219 100644
--- a/src/VBox/Main/include/DrvAudioVRDE.h
+++ b/src/VBox/Main/include/DrvAudioVRDE.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/DrvAudioVRDE_old.h b/src/VBox/Main/include/DrvAudioVRDE_old.h
deleted file mode 100644
index d87abc0..0000000
--- a/src/VBox/Main/include/DrvAudioVRDE_old.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* $Id: DrvAudioVRDE_old.h $ */
-/** @file
- * VirtualBox driver interface to VRDE backend.
- */
-
-/*
- * Copyright (C) 2014-2015 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-#ifndef ____H_DRVAUDIOVRDE
-#define ____H_DRVAUDIOVRDE
-
-#include <VBox/com/ptr.h>
-#include <VBox/RemoteDesktop/VRDE.h>
-#include <VBox/vmm/pdmdrv.h>
-#include <VBox/vmm/pdmifs.h>
-
-class Console;
-
-class AudioVRDE
-{
-
-public:
-
-    AudioVRDE(Console *pConsole);
-    virtual ~AudioVRDE(void);
-
-public:
-
-    static const PDMDRVREG DrvReg;
-
-    Console *getParent(void) { return mParent; }
-
-public:
-
-    int onVRDEControl(bool fEnable, uint32_t uFlags);
-    int onVRDEInputBegin(void *pvContext, PVRDEAUDIOINBEGIN pVRDEAudioBegin);
-    int onVRDEInputData(void *pvContext, const void *pvData, uint32_t cbData);
-    int onVRDEInputEnd(void *pvContext);
-    int onVRDEInputIntercept(bool fIntercept);
-
-public:
-
-    static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags);
-    static DECLCALLBACK(void) drvDestruct(PPDMDRVINS pDrvIns);
-
-private:
-
-    /** Pointer to the associated VRDE audio driver. */
-    struct DRVAUDIOVRDE *mpDrv;
-    /** Pointer to parent. */
-    Console * const mParent;
-};
-
-#endif /* !____H_DRVAUDIOVRDE */
-
diff --git a/src/VBox/Main/include/DrvAudioVideoRec.h b/src/VBox/Main/include/DrvAudioVideoRec.h
index cef1e50..7abb5d4 100644
--- a/src/VBox/Main/include/DrvAudioVideoRec.h
+++ b/src/VBox/Main/include/DrvAudioVideoRec.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/DrvAudioVideoRec_old.h b/src/VBox/Main/include/DrvAudioVideoRec_old.h
deleted file mode 100644
index 0cd6243..0000000
--- a/src/VBox/Main/include/DrvAudioVideoRec_old.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* $Id: DrvAudioVideoRec_old.h $ */
-/** @file
- * VirtualBox driver interface to video recording backend.
- */
-
-/*
- * Copyright (C) 2014 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-#ifndef ____H_DRVAUDIOVIDEOREC
-#define ____H_DRVAUDIOVIDEOREC
-
-#include <VBox/com/ptr.h>
-#include <VBox/vmm/pdmdrv.h>
-#include <VBox/vmm/pdmifs.h>
-
-class Console;
-
-class AudioVideoRec
-{
-
-public:
-
-    AudioVideoRec(Console *pConsole);
-    virtual ~AudioVideoRec(void);
-
-public:
-
-    static const PDMDRVREG DrvReg;
-
-    Console *getParent(void) { return mParent; }
-
-public:
-
-    int handleVideoRecSvrCmdAudioInputIntercept(bool fIntercept);
-    int handleVideoRecSvrCmdAudioInputEventBegin(void *pvContext, int iSampleHz, int cChannels, int cBits, bool fUnsigned);
-    int handleVideoRecSvrCmdAudioInputEventData(void *pvContext, const void *pvData, uint32_t cbData);
-    int handleVideoRecSvrCmdAudioInputEventEnd(void *pvContext);
-
-public:
-
-    static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags);
-    static DECLCALLBACK(void) drvDestruct(PPDMDRVINS pDrvIns);
-
-private:
-
-    /** Pointer to the associated video recording audio driver. */
-    struct DRVAUDIOVIDEOREC *mpDrv;
-    /** Pointer to parent. */
-    Console * const mParent;
-};
-
-#endif /* !____H_DRVAUDIOVIDEOREC */
-
diff --git a/src/VBox/Main/include/EmulatedUSBImpl.h b/src/VBox/Main/include/EmulatedUSBImpl.h
index eabbebc..ddb8ac9 100644
--- a/src/VBox/Main/include/EmulatedUSBImpl.h
+++ b/src/VBox/Main/include/EmulatedUSBImpl.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/EventImpl.h b/src/VBox/Main/include/EventImpl.h
index faade26..2d55b55 100644
--- a/src/VBox/Main/include/EventImpl.h
+++ b/src/VBox/Main/include/EventImpl.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2014 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/ExtPackManagerImpl.h b/src/VBox/Main/include/ExtPackManagerImpl.h
index 8219e9e..669f8e0 100644
--- a/src/VBox/Main/include/ExtPackManagerImpl.h
+++ b/src/VBox/Main/include/ExtPackManagerImpl.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2014 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -25,6 +25,11 @@
 #include "ExtPackManagerWrap.h"
 #include <iprt/fs.h>
 
+
+/** The name of the oracle extension back. */
+#define ORACLE_PUEL_EXTPACK_NAME "Oracle VM VirtualBox Extension Pack"
+
+
 #if !defined(VBOX_COM_INPROC)
 /**
  * An extension pack file.
@@ -203,7 +208,7 @@ public:
     void        i_callAllVmPowerOffHooks(IConsole *a_pConsole, PVM a_pVM);
     HRESULT     i_checkVrdeExtPack(Utf8Str const *a_pstrExtPack);
     int         i_getVrdeLibraryPathForExtPack(Utf8Str const *a_pstrExtPack, Utf8Str *a_pstrVrdeLibrary);
-    HRESULT     i_getLibraryPathForExtPack(const char *a_pszModuleName, Utf8Str const *a_pstrExtPack, Utf8Str *a_pstrLibrary);
+    HRESULT     i_getLibraryPathForExtPack(const char *a_pszModuleName, const char *a_pszExtPack, Utf8Str *a_pstrLibrary);
     HRESULT     i_getDefaultVrdeExtPack(Utf8Str *a_pstrExtPack);
     bool        i_isExtPackUsable(const char *a_pszExtPack);
     void        i_dumpAllToReleaseLog(void);
diff --git a/src/VBox/Main/include/ExtPackUtil.h b/src/VBox/Main/include/ExtPackUtil.h
index 8d9c211..38dbe09 100644
--- a/src/VBox/Main/include/ExtPackUtil.h
+++ b/src/VBox/Main/include/ExtPackUtil.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2012 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/Global.h b/src/VBox/Main/include/Global.h
index 9f01bd1..d459b65 100644
--- a/src/VBox/Main/include/Global.h
+++ b/src/VBox/Main/include/Global.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2011 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -82,7 +82,7 @@ public:
     };
 
     static const OSType sOSTypes[];
-    static uint32_t cOSTypes;
+    static size_t cOSTypes;
 
     /**
      * Maps VBOXOSTYPE to the OS type which is used in VM configs.
diff --git a/src/VBox/Main/include/GuestCtrlImplPrivate.h b/src/VBox/Main/include/GuestCtrlImplPrivate.h
index 2be9c94..d672b43 100644
--- a/src/VBox/Main/include/GuestCtrlImplPrivate.h
+++ b/src/VBox/Main/include/GuestCtrlImplPrivate.h
@@ -822,20 +822,20 @@ public:
     void Dump(const char *pszFile);
 #endif
 
-    uint32_t GetOffset() { return m_cbOffset; }
+    size_t GetOffset() { return m_offBuffer; }
 
-    size_t GetSize() { return m_cbSize; }
+    size_t GetSize() { return m_cbUsed; }
 
     int ParseBlock(GuestProcessStreamBlock &streamBlock);
 
 protected:
 
     /** Currently allocated size of internal stream buffer. */
-    uint32_t m_cbAllocated;
-    /** Currently used size of allocated internal stream buffer. */
-    size_t m_cbSize;
-    /** Current offset within the internal stream buffer. */
-    uint32_t m_cbOffset;
+    size_t m_cbAllocated;
+    /** Currently used size at m_offBuffer. */
+    size_t m_cbUsed;
+    /** Current byte offset within the internal stream buffer. */
+    size_t m_offBuffer;
     /** Internal stream buffer. */
     BYTE *m_pbBuffer;
 };
@@ -1143,7 +1143,7 @@ protected:
 
     int bindToSession(Console *pConsole, GuestSession *pSession, uint32_t uObjectID);
     int registerWaitEvent(const GuestEventTypes &lstEvents, GuestWaitEvent **ppEvent);
-    int sendCommand(uint32_t uFunction, uint32_t uParms, PVBOXHGCMSVCPARM paParms);
+    int sendCommand(uint32_t uFunction, uint32_t cParms, PVBOXHGCMSVCPARM paParms);
 
 protected:
 
diff --git a/src/VBox/Main/include/GuestDnDPrivate.h b/src/VBox/Main/include/GuestDnDPrivate.h
index 8b00a83..d3ed475 100644
--- a/src/VBox/Main/include/GuestDnDPrivate.h
+++ b/src/VBox/Main/include/GuestDnDPrivate.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -537,6 +537,7 @@ public:
 
     GuestDnDURIObjCtx &getObj(uint64_t uID = 0)
     {
+        RT_NOREF(uID);
         AssertMsg(uID == 0, ("Other objects than object 0 is not supported yet\n"));
         return objCtx;
     }
@@ -1123,7 +1124,10 @@ private:
     static GuestDnD           *s_pInstance;
 };
 
-/** Access to the GuestDnD's singleton instance. */
+/** Access to the GuestDnD's singleton instance.
+ * @todo r=bird: Please add a 'Get' or something to this as it currently looks
+ *       like a class instantiation rather than a getter.  Alternatively, use
+ *       UPPER_CASE like the coding guideline suggest for macros. */
 #define GuestDnDInst() GuestDnD::getInstance()
 
 /** List of pointers to guest DnD Messages. */
diff --git a/src/VBox/Main/include/GuestDnDSourceImpl.h b/src/VBox/Main/include/GuestDnDSourceImpl.h
index 7f9cf12..1e42375 100644
--- a/src/VBox/Main/include/GuestDnDSourceImpl.h
+++ b/src/VBox/Main/include/GuestDnDSourceImpl.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -26,6 +26,7 @@ using namespace DragAndDropSvc;
 #include "GuestDnDSourceWrap.h"
 #include "GuestDnDPrivate.h"
 
+class RecvDataTask;
 struct RECVDATACTX;
 typedef struct RECVDATACTX *PRECVDATACTX;
 
@@ -82,9 +83,9 @@ protected:
     static Utf8Str i_guestErrorToString(int guestRc);
     static Utf8Str i_hostErrorToString(int hostRc);
 
-    /** @name Thread callbacks.
+    /** @name Thread task .
      * @{ */
-    static DECLCALLBACK(int) i_receiveDataThread(RTTHREAD Thread, void *pvUser);
+    static void i_receiveDataThreadTask(RecvDataTask *pTask);
     /** @}  */
 
     /** @name Callbacks for dispatch handler.
diff --git a/src/VBox/Main/include/GuestDnDTargetImpl.h b/src/VBox/Main/include/GuestDnDTargetImpl.h
index 31733af..597316f 100644
--- a/src/VBox/Main/include/GuestDnDTargetImpl.h
+++ b/src/VBox/Main/include/GuestDnDTargetImpl.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -26,6 +26,7 @@
 
 struct SENDDATACTX;
 typedef struct SENDDATACTX *PSENDDATACTX;
+class SendDataTask;
 
 class ATL_NO_VTABLE GuestDnDTarget :
     public GuestDnDTargetWrap,
@@ -70,9 +71,9 @@ protected:
     static Utf8Str i_guestErrorToString(int guestRc);
     static Utf8Str i_hostErrorToString(int hostRc);
 
-    /** @name Thread callbacks.
+    /** @name Thread task workers.
      * @{ */
-    static DECLCALLBACK(int) i_sendDataThread(RTTHREAD Thread, void *pvUser);
+    static void i_sendDataThreadTask(SendDataTask *pTask);
     /** @}  */
 
     /** @name Callbacks for dispatch handler.
diff --git a/src/VBox/Main/include/GuestFileImpl.h b/src/VBox/Main/include/GuestFileImpl.h
index 5940270..c64f318 100644
--- a/src/VBox/Main/include/GuestFileImpl.h
+++ b/src/VBox/Main/include/GuestFileImpl.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2014 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/GuestFsObjInfoImpl.h b/src/VBox/Main/include/GuestFsObjInfoImpl.h
index ebf94a6..a3b1e6d 100644
--- a/src/VBox/Main/include/GuestFsObjInfoImpl.h
+++ b/src/VBox/Main/include/GuestFsObjInfoImpl.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2014 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/GuestImpl.h b/src/VBox/Main/include/GuestImpl.h
index 906ada2..8f00c61 100644
--- a/src/VBox/Main/include/GuestImpl.h
+++ b/src/VBox/Main/include/GuestImpl.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/GuestOSTypeImpl.h b/src/VBox/Main/include/GuestOSTypeImpl.h
index 8b6a4f9..bfa2862 100644
--- a/src/VBox/Main/include/GuestOSTypeImpl.h
+++ b/src/VBox/Main/include/GuestOSTypeImpl.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/GuestProcessImpl.h b/src/VBox/Main/include/GuestProcessImpl.h
index d06e1d6..ffbe741 100644
--- a/src/VBox/Main/include/GuestProcessImpl.h
+++ b/src/VBox/Main/include/GuestProcessImpl.h
@@ -25,6 +25,7 @@
 
 class Console;
 class GuestSession;
+class GuestProcessStartTask;
 
 /**
  * Class for handling a guest process.
@@ -52,7 +53,8 @@ public:
     inline int i_checkPID(uint32_t uPID);
     int i_onRemove(void);
     int i_readData(uint32_t uHandle, uint32_t uSize, uint32_t uTimeoutMS, void *pvData, size_t cbData, uint32_t *pcbRead, int *pGuestRc);
-    int i_startProcess(uint32_t uTimeoutMS, int *pGuestRc);
+    int i_startProcess(uint32_t cMsTimeout, int *pGuestRc);
+    int i_startProcessInner(uint32_t cMsTimeout, AutoWriteLock &rLock, GuestWaitEvent *pEvent, int *pGuestRc);
     int i_startProcessAsync(void);
     int i_terminateProcess(uint32_t uTimeoutMS, int *pGuestRc);
     ProcessWaitResult_T i_waitFlagsToResult(uint32_t fWaitFlags);
@@ -84,7 +86,7 @@ protected:
     int i_onProcessOutput(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData);
     int i_prepareExecuteEnv(const char *pszEnv, void **ppvList, ULONG *pcbList, ULONG *pcEnvVars);
     int i_setProcessStatus(ProcessStatus_T procStatus, int procRc);
-    static DECLCALLBACK(int) i_startProcessThread(RTTHREAD Thread, void *pvUser);
+    static void i_startProcessThreadTask(GuestProcessStartTask *pTask);
     /** @}  */
 
 private:
diff --git a/src/VBox/Main/include/GuestSessionImpl.h b/src/VBox/Main/include/GuestSessionImpl.h
index 0d32799..41a0f72 100644
--- a/src/VBox/Main/include/GuestSessionImpl.h
+++ b/src/VBox/Main/include/GuestSessionImpl.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2013 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -31,6 +31,7 @@
 #include <iprt/isofs.h> /* For UpdateAdditions. */
 
 class Guest;
+class GuestSessionTaskInternalOpen;
 
 /**
  * Abstract base class for a lenghtly per-session operation which
@@ -47,7 +48,18 @@ public:
 public:
 
     virtual int Run(void) = 0;
-    virtual int RunAsync(const Utf8Str &strDesc, ComObjPtr<Progress> &pProgress) = 0;
+    void handler()
+    {
+        int vrc = Run();
+        NOREF(vrc);
+        /** @todo
+         *
+         * r=bird: what was your idea WRT to Run status code and async tasks?
+         *
+         */
+    }
+
+    int RunAsync(const Utf8Str &strDesc, ComObjPtr<Progress> &pProgress);
 
     HRESULT Init(const Utf8Str &strTaskDesc)
     {
@@ -91,18 +103,8 @@ public:
     SessionTaskOpen(GuestSession *pSession,
                     uint32_t uFlags,
                     uint32_t uTimeoutMS);
-
     virtual ~SessionTaskOpen(void);
-
-public:
-
-    int Run(int *pGuestRc);
-    int RunAsync(const Utf8Str &strDesc, ComObjPtr<Progress> &pProgress);
-    static DECLCALLBACK(int) taskThread(RTTHREAD Thread, void *pvUser);
-    void handler()
-    {
-        int vrc = SessionTaskOpen::taskThread(NULL, this);
-    }
+    int Run(void);
 
 protected:
 
@@ -121,22 +123,11 @@ public:
 
     SessionTaskCopyTo(GuestSession *pSession,
                       const Utf8Str &strSource, const Utf8Str &strDest, uint32_t uFlags);
-
     SessionTaskCopyTo(GuestSession *pSession,
                       PRTFILE pSourceFile, size_t cbSourceOffset, uint64_t cbSourceSize,
                       const Utf8Str &strDest, uint32_t uFlags);
-
     virtual ~SessionTaskCopyTo(void);
-
-public:
-
     int Run(void);
-    int RunAsync(const Utf8Str &strDesc, ComObjPtr<Progress> &pProgress);
-    static DECLCALLBACK(int) taskThread(RTTHREAD Thread, void *pvUser);
-    void handler()
-    {
-        int vrc = SessionTaskCopyTo::taskThread(NULL, this);
-    }
 
 protected:
 
@@ -157,18 +148,8 @@ public:
 
     SessionTaskCopyFrom(GuestSession *pSession,
                         const Utf8Str &strSource, const Utf8Str &strDest, uint32_t uFlags);
-
     virtual ~SessionTaskCopyFrom(void);
-
-public:
-
     int Run(void);
-    int RunAsync(const Utf8Str &strDesc, ComObjPtr<Progress> &pProgress);
-    static DECLCALLBACK(int) taskThread(RTTHREAD Thread, void *pvUser);
-    void handler()
-    {
-        int vrc = SessionTaskCopyFrom::taskThread(NULL, this);
-    }
 
 protected:
 
@@ -187,18 +168,8 @@ public:
     SessionTaskUpdateAdditions(GuestSession *pSession,
                                const Utf8Str &strSource, const ProcessArguments &aArguments,
                                uint32_t uFlags);
-
     virtual ~SessionTaskUpdateAdditions(void);
-
-public:
-
     int Run(void);
-    int RunAsync(const Utf8Str &strDesc, ComObjPtr<Progress> &pProgress);
-    static DECLCALLBACK(int) taskThread(RTTHREAD Thread, void *pvUser);
-    void handler()
-    {
-        int vrc = SessionTaskUpdateAdditions::taskThread(NULL, this);
-    }
 
 protected:
 
@@ -483,8 +454,7 @@ public:
     int                     i_onSessionStatusChange(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData);
     int                     i_startSessionInternal(int *pGuestRc);
     int                     i_startSessionAsync(void);
-    static DECLCALLBACK(int)
-                            i_startSessionThread(RTTHREAD Thread, void *pvUser);
+    static void             i_startSessionThreadTask(GuestSessionTaskInternalOpen *pTask);
     Guest                  *i_getParent(void) { return mParent; }
     uint32_t                i_getProtocolVersion(void) { return mData.mProtocolVersion; }
     int                     i_pathRenameInternal(const Utf8Str &strSource, const Utf8Str &strDest, uint32_t uFlags,
diff --git a/src/VBox/Main/include/HGCM.h b/src/VBox/Main/include/HGCM.h
index d7348d6..422fd68 100644
--- a/src/VBox/Main/include/HGCM.h
+++ b/src/VBox/Main/include/HGCM.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/HGCMObjects.h b/src/VBox/Main/include/HGCMObjects.h
index 5d2c1e2..3e1a157 100644
--- a/src/VBox/Main/include/HGCMObjects.h
+++ b/src/VBox/Main/include/HGCMObjects.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/HGCMThread.h b/src/VBox/Main/include/HGCMThread.h
index f50ad1a..74b93e6 100644
--- a/src/VBox/Main/include/HGCMThread.h
+++ b/src/VBox/Main/include/HGCMThread.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/HashedPw.h b/src/VBox/Main/include/HashedPw.h
index 3e3ac1a..4134939 100644
--- a/src/VBox/Main/include/HashedPw.h
+++ b/src/VBox/Main/include/HashedPw.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/HostHardwareLinux.h b/src/VBox/Main/include/HostHardwareLinux.h
index b30da8a..5780e84 100644
--- a/src/VBox/Main/include/HostHardwareLinux.h
+++ b/src/VBox/Main/include/HostHardwareLinux.h
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (C) 2008-2011 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/HostImpl.h b/src/VBox/Main/include/HostImpl.h
index deb266e..ad472ed 100644
--- a/src/VBox/Main/include/HostImpl.h
+++ b/src/VBox/Main/include/HostImpl.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/HostNetworkInterfaceImpl.h b/src/VBox/Main/include/HostNetworkInterfaceImpl.h
index 6a9efcb..24c2527 100644
--- a/src/VBox/Main/include/HostNetworkInterfaceImpl.h
+++ b/src/VBox/Main/include/HostNetworkInterfaceImpl.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/HostPower.h b/src/VBox/Main/include/HostPower.h
index 2a45335..ddc6cd3 100644
--- a/src/VBox/Main/include/HostPower.h
+++ b/src/VBox/Main/include/HostPower.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/HostVideoInputDeviceImpl.h b/src/VBox/Main/include/HostVideoInputDeviceImpl.h
index 5e38545..289f611 100644
--- a/src/VBox/Main/include/HostVideoInputDeviceImpl.h
+++ b/src/VBox/Main/include/HostVideoInputDeviceImpl.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/KeyboardImpl.h b/src/VBox/Main/include/KeyboardImpl.h
index 6cd7e20..7baf50d 100644
--- a/src/VBox/Main/include/KeyboardImpl.h
+++ b/src/VBox/Main/include/KeyboardImpl.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/Logging.h b/src/VBox/Main/include/Logging.h
index 07f0fc5..0cfd3a8 100644
--- a/src/VBox/Main/include/Logging.h
+++ b/src/VBox/Main/include/Logging.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2004-2015 Oracle Corporation
+ * Copyright (C) 2004-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/MachineDebuggerImpl.h b/src/VBox/Main/include/MachineDebuggerImpl.h
index b753f46..5a28b05 100644
--- a/src/VBox/Main/include/MachineDebuggerImpl.h
+++ b/src/VBox/Main/include/MachineDebuggerImpl.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -75,6 +75,7 @@ private:
     HRESULT getVirtualTimeRate(ULONG *aVirtualTimeRate);
     HRESULT setVirtualTimeRate(ULONG aVirtualTimeRate);
     HRESULT getVM(LONG64 *aVM);
+    HRESULT getUptime(LONG64 *aUptime);
 
     // wrapped IMachineDeugger properties
     HRESULT dumpGuestCore(const com::Utf8Str &aFilename,
diff --git a/src/VBox/Main/include/MachineImplCloneVM.h b/src/VBox/Main/include/MachineImplCloneVM.h
index 89b0e34..60b0d32 100644
--- a/src/VBox/Main/include/MachineImplCloneVM.h
+++ b/src/VBox/Main/include/MachineImplCloneVM.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/Matching.h b/src/VBox/Main/include/Matching.h
index d55fea0..65fa7f8 100644
--- a/src/VBox/Main/include/Matching.h
+++ b/src/VBox/Main/include/Matching.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/MediumFormatImpl.h b/src/VBox/Main/include/MediumFormatImpl.h
index 2acdc6e..ff04579 100644
--- a/src/VBox/Main/include/MediumFormatImpl.h
+++ b/src/VBox/Main/include/MediumFormatImpl.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2008-2013 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/MediumImpl.h b/src/VBox/Main/include/MediumImpl.h
index 1b7199a..94b6a87 100644
--- a/src/VBox/Main/include/MediumImpl.h
+++ b/src/VBox/Main/include/MediumImpl.h
@@ -387,9 +387,6 @@ private:
     friend class ImportTask;
     friend class EncryptTask;
 
-    HRESULT i_startThread(Medium::Task *pTask);
-    HRESULT i_runNow(Medium::Task *pTask);
-
     HRESULT i_taskCreateBaseHandler(Medium::CreateBaseTask &task);
     HRESULT i_taskCreateDiffHandler(Medium::CreateDiffTask &task);
     HRESULT i_taskMergeHandler(Medium::MergeTask &task);
diff --git a/src/VBox/Main/include/MediumLock.h b/src/VBox/Main/include/MediumLock.h
index a65ebd0..ff45d8b 100644
--- a/src/VBox/Main/include/MediumLock.h
+++ b/src/VBox/Main/include/MediumLock.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2010-2013 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/MouseImpl.h b/src/VBox/Main/include/MouseImpl.h
index ca72753..715a139 100644
--- a/src/VBox/Main/include/MouseImpl.h
+++ b/src/VBox/Main/include/MouseImpl.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/NetworkServiceRunner.h b/src/VBox/Main/include/NetworkServiceRunner.h
index 0d37fb6..c04d0a7 100644
--- a/src/VBox/Main/include/NetworkServiceRunner.h
+++ b/src/VBox/Main/include/NetworkServiceRunner.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2010 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/Nvram.h b/src/VBox/Main/include/Nvram.h
index 0a444b7..9629277 100644
--- a/src/VBox/Main/include/Nvram.h
+++ b/src/VBox/Main/include/Nvram.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/ObjectState.h b/src/VBox/Main/include/ObjectState.h
index 0625b19..d373178 100644
--- a/src/VBox/Main/include/ObjectState.h
+++ b/src/VBox/Main/include/ObjectState.h
@@ -129,6 +129,9 @@ private:
 
     /** Protects access to state related data members */
     util::RWLockHandle mStateLock;
+
+private:
+    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(ObjectState); /* Shuts up MSC warning C4625. */
 };
 
 #endif // !____H_OBJECTSTATE
diff --git a/src/VBox/Main/include/PCIRawDevImpl.h b/src/VBox/Main/include/PCIRawDevImpl.h
index 8518569..79202db 100644
--- a/src/VBox/Main/include/PCIRawDevImpl.h
+++ b/src/VBox/Main/include/PCIRawDevImpl.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2012 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -42,7 +42,6 @@ class PCIRawDev
     static DECLCALLBACK(void *) drvQueryInterface(PPDMIBASE pInterface, const char *pszIID);
     static DECLCALLBACK(int)    drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags);
     static DECLCALLBACK(void)   drvDestruct(PPDMDRVINS pDrvIns);
-    static DECLCALLBACK(void)   drvReset(PPDMDRVINS pDrvIns);
     static DECLCALLBACK(int)    drvDeviceConstructComplete(PPDMIPCIRAWCONNECTOR pInterface, const char *pcszName,
                                                            uint32_t uHostPCIAddress, uint32_t uGuestPCIAddress,
                                                            int rc);
diff --git a/src/VBox/Main/include/Performance.h b/src/VBox/Main/include/Performance.h
index 95422cc..c465f9d 100644
--- a/src/VBox/Main/include/Performance.h
+++ b/src/VBox/Main/include/Performance.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/PerformanceImpl.h b/src/VBox/Main/include/PerformanceImpl.h
index 269ec05..8c043dd 100644
--- a/src/VBox/Main/include/PerformanceImpl.h
+++ b/src/VBox/Main/include/PerformanceImpl.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -170,12 +170,9 @@ private:
     typedef std::list<pm::Metric*> MetricList;
     typedef std::list<pm::BaseMetric*> BaseMetricList;
 
-    enum
-    {
-        MAGIC = 0xABBA1972u
-    };
-
-    unsigned int mMagic;
+/** PerformanceMetric::mMagic value. */
+#define PERFORMANCE_METRIC_MAGIC    UINT32_C(0xABBA1972)
+    uint32_t mMagic;
     const Utf8Str mUnknownGuest;
 
     struct Data
diff --git a/src/VBox/Main/include/ProgressImpl.h b/src/VBox/Main/include/ProgressImpl.h
index 33678e2..a84d86f 100644
--- a/src/VBox/Main/include/ProgressImpl.h
+++ b/src/VBox/Main/include/ProgressImpl.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -216,6 +216,9 @@ private:
 
     RTSEMEVENTMULTI mCompletedSem;
     ULONG mWaitersCount;
+
+private:
+    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(Progress); /* Shuts up MSC warning C4625. */
 };
 
 #endif /* ____H_PROGRESSIMPL */
diff --git a/src/VBox/Main/include/QMTranslator.h b/src/VBox/Main/include/QMTranslator.h
index 3dc89dd..73cb51a 100644
--- a/src/VBox/Main/include/QMTranslator.h
+++ b/src/VBox/Main/include/QMTranslator.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/RemoteUSBBackend.h b/src/VBox/Main/include/RemoteUSBBackend.h
index 4fc8ea4..b91cba7 100644
--- a/src/VBox/Main/include/RemoteUSBBackend.h
+++ b/src/VBox/Main/include/RemoteUSBBackend.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/RemoteUSBDeviceImpl.h b/src/VBox/Main/include/RemoteUSBDeviceImpl.h
index 2c7e797..9f47a0b 100644
--- a/src/VBox/Main/include/RemoteUSBDeviceImpl.h
+++ b/src/VBox/Main/include/RemoteUSBDeviceImpl.h
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/SecretKeyStore.h b/src/VBox/Main/include/SecretKeyStore.h
index af62b62..1f3f3ab 100644
--- a/src/VBox/Main/include/SecretKeyStore.h
+++ b/src/VBox/Main/include/SecretKeyStore.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/SharedFolderImpl.h b/src/VBox/Main/include/SharedFolderImpl.h
index b9e8c84..8a6b9c0 100644
--- a/src/VBox/Main/include/SharedFolderImpl.h
+++ b/src/VBox/Main/include/SharedFolderImpl.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/SnapshotImpl.h b/src/VBox/Main/include/SnapshotImpl.h
index b02b554..6d38f29 100644
--- a/src/VBox/Main/include/SnapshotImpl.h
+++ b/src/VBox/Main/include/SnapshotImpl.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/StorageControllerImpl.h b/src/VBox/Main/include/StorageControllerImpl.h
index 1306519..541799f 100644
--- a/src/VBox/Main/include/StorageControllerImpl.h
+++ b/src/VBox/Main/include/StorageControllerImpl.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2008-2013 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/SystemPropertiesImpl.h b/src/VBox/Main/include/SystemPropertiesImpl.h
index 4fefab9..243275f 100644
--- a/src/VBox/Main/include/SystemPropertiesImpl.h
+++ b/src/VBox/Main/include/SystemPropertiesImpl.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/ThreadTask.h b/src/VBox/Main/include/ThreadTask.h
index 33158da..edc09a3 100644
--- a/src/VBox/Main/include/ThreadTask.h
+++ b/src/VBox/Main/include/ThreadTask.h
@@ -19,30 +19,42 @@
 
 #include "VBox/com/string.h"
 
-struct ThreadVoidData
-{
-/*
+/**
  * The class ThreadVoidData is used as a base class for any data which we want to pass into a thread
  */
+struct ThreadVoidData
+{
 public:
-    ThreadVoidData(){};
-    virtual ~ThreadVoidData(){};
+    ThreadVoidData() { }
+    virtual ~ThreadVoidData() { }
 };
 
+
 class ThreadTask
 {
 public:
-    ThreadTask(const Utf8Str &t) : m_pThread(NULL), m_strTaskName(t){};
-    virtual ~ThreadTask(){};
-    HRESULT createThread(PRTTHREAD pThread = NULL, RTTHREADTYPE enmType = RTTHREADTYPE_MAIN_WORKER);
-    virtual void handler() = 0;
-    static DECLCALLBACK(int) taskHandler(RTTHREAD thread, void *pvUser);
+    ThreadTask(const Utf8Str &t) : m_hThread(NIL_RTTHREAD), m_strTaskName(t)
+    { }
+
+    virtual ~ThreadTask()
+    { }
+
+    HRESULT createThread(void);
+    HRESULT createThreadWithType(RTTHREADTYPE enmType);
+    HRESULT createThreadWithRaceCondition(PRTTHREAD pThread);
 
-    inline Utf8Str getTaskName() const {return m_strTaskName;};
+    virtual void handler() = 0;
+    inline Utf8Str getTaskName() const { return m_strTaskName; }
 
 protected:
-    ThreadTask():m_pThread(NULL), m_strTaskName("GenericTask"){};
-    PRTTHREAD m_pThread;
+    HRESULT createThreadInternal(RTTHREADTYPE enmType, PRTTHREAD pThread);
+    static DECLCALLBACK(int) taskHandlerThreadProc(RTTHREAD thread, void *pvUser);
+
+    ThreadTask() : m_hThread(NIL_RTTHREAD), m_strTaskName("GenericTask")
+    { }
+
+    /** The worker thread handle (may be invalid if the thread has shut down). */
+    RTTHREAD m_hThread;
     Utf8Str m_strTaskName;
 };
 
diff --git a/src/VBox/Main/include/TokenImpl.h b/src/VBox/Main/include/TokenImpl.h
index 1bb4963..11f8078 100644
--- a/src/VBox/Main/include/TokenImpl.h
+++ b/src/VBox/Main/include/TokenImpl.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/USBControllerImpl.h b/src/VBox/Main/include/USBControllerImpl.h
index dda003b..6b72c94 100644
--- a/src/VBox/Main/include/USBControllerImpl.h
+++ b/src/VBox/Main/include/USBControllerImpl.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2005-2015 Oracle Corporation
+ * Copyright (C) 2005-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/USBDeviceFiltersImpl.h b/src/VBox/Main/include/USBDeviceFiltersImpl.h
index 596ea70..4a2c00b 100644
--- a/src/VBox/Main/include/USBDeviceFiltersImpl.h
+++ b/src/VBox/Main/include/USBDeviceFiltersImpl.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/USBDeviceImpl.h b/src/VBox/Main/include/USBDeviceImpl.h
index ee8cdd8..2ff1dbf 100644
--- a/src/VBox/Main/include/USBDeviceImpl.h
+++ b/src/VBox/Main/include/USBDeviceImpl.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/USBGetDevices.h b/src/VBox/Main/include/USBGetDevices.h
index 01f0cc8..9a21558 100644
--- a/src/VBox/Main/include/USBGetDevices.h
+++ b/src/VBox/Main/include/USBGetDevices.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/USBIdDatabase.h b/src/VBox/Main/include/USBIdDatabase.h
index 5979524..5f77bfa 100644
--- a/src/VBox/Main/include/USBIdDatabase.h
+++ b/src/VBox/Main/include/USBIdDatabase.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/USBProxyBackend.h b/src/VBox/Main/include/USBProxyBackend.h
index 6684a7a..62acbcc 100644
--- a/src/VBox/Main/include/USBProxyBackend.h
+++ b/src/VBox/Main/include/USBProxyBackend.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2005-2015 Oracle Corporation
+ * Copyright (C) 2005-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/USBProxyService.h b/src/VBox/Main/include/USBProxyService.h
index 9ffb7ff..99ec41b 100644
--- a/src/VBox/Main/include/USBProxyService.h
+++ b/src/VBox/Main/include/USBProxyService.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2005-2012 Oracle Corporation
+ * Copyright (C) 2005-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/UsbCardReader.h b/src/VBox/Main/include/UsbCardReader.h
index a45d194..a5326df 100644
--- a/src/VBox/Main/include/UsbCardReader.h
+++ b/src/VBox/Main/include/UsbCardReader.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2011-2012 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/UsbWebcamInterface.h b/src/VBox/Main/include/UsbWebcamInterface.h
index 2604c73..8ab3754 100644
--- a/src/VBox/Main/include/UsbWebcamInterface.h
+++ b/src/VBox/Main/include/UsbWebcamInterface.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2013 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/VFSExplorerImpl.h b/src/VBox/Main/include/VFSExplorerImpl.h
index 187e941..a27a72f 100644
--- a/src/VBox/Main/include/VFSExplorerImpl.h
+++ b/src/VBox/Main/include/VFSExplorerImpl.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2013 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/VMMDev.h b/src/VBox/Main/include/VMMDev.h
index 3f6d65e..107ae73 100644
--- a/src/VBox/Main/include/VMMDev.h
+++ b/src/VBox/Main/include/VMMDev.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/VirtualBoxBase.h b/src/VBox/Main/include/VirtualBoxBase.h
index c0ce4f0..526e537 100644
--- a/src/VBox/Main/include/VirtualBoxBase.h
+++ b/src/VBox/Main/include/VirtualBoxBase.h
@@ -806,6 +806,9 @@ private:
 
     /** Slot of this object in the saFactoryStats array */
     uint32_t iFactoryStat;
+
+private:
+    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(VirtualBoxBase); /* Shuts up MSC warning C4625. */
 };
 
 /** Structure for counting the currently existing and ever created objects
@@ -853,7 +856,7 @@ class Shareable
 public:
 
     Shareable() : mData(NULL), mIsShared(FALSE) {}
-    ~Shareable() { free(); }
+    virtual ~Shareable() { free(); }
 
     void allocate() { attach(new D); }
 
diff --git a/src/VBox/Main/include/VirtualBoxErrorInfoImpl.h b/src/VBox/Main/include/VirtualBoxErrorInfoImpl.h
index 923dafd..7035a0e 100644
--- a/src/VBox/Main/include/VirtualBoxErrorInfoImpl.h
+++ b/src/VBox/Main/include/VirtualBoxErrorInfoImpl.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -67,7 +67,7 @@ public:
     HRESULT init(IErrorInfo *aInfo);
 
     STDMETHOD(GetGUID)(GUID *guid);
-    STDMETHOD(GetSource)(BSTR *source);
+    STDMETHOD(GetSource)(BSTR *pBstrSource);
     STDMETHOD(GetDescription)(BSTR *description);
     STDMETHOD(GetHelpFile)(BSTR *pBstrHelpFile);
     STDMETHOD(GetHelpContext)(DWORD *pdwHelpContext);
diff --git a/src/VBox/Main/include/VirtualBoxImpl.h b/src/VBox/Main/include/VirtualBoxImpl.h
index 3602f0e..a146f9a 100644
--- a/src/VBox/Main/include/VirtualBoxImpl.h
+++ b/src/VBox/Main/include/VirtualBoxImpl.h
@@ -57,6 +57,7 @@ namespace settings
     class MainConfigFile;
     struct MediaRegistry;
 }
+
 class ATL_NO_VTABLE VirtualBox :
     public VirtualBoxWrap
 #ifdef RT_OS_WINDOWS
@@ -89,7 +90,7 @@ public:
     HRESULT FinalConstruct();
     void FinalRelease();
 
-    /* public initializer/uninitializer for internal purposes only */
+    // public initializer/uninitializer for internal purposes only
     HRESULT init();
     HRESULT initMachines();
     HRESULT initMedia(const Guid &uuidMachineRegistry,
@@ -97,7 +98,7 @@ public:
                       const Utf8Str &strMachineFolder);
     void uninit();
 
-    /* public methods only for internal purposes */
+    // public methods only for internal purposes
 
     /**
      * Override of the default locking class to be used for validating lock
@@ -383,7 +384,7 @@ private:
 
 #ifdef RT_OS_WINDOWS
     friend class StartSVCHelperClientData;
-    static DECLCALLBACK(int) SVCHelperClientThread(RTTHREAD aThread, void *aUser);
+    static void i_SVCHelperClientThreadTask(StartSVCHelperClientData *pTask);
 #endif
 
 };
diff --git a/src/VBox/Main/include/Wrapper.h b/src/VBox/Main/include/Wrapper.h
index de6637e..5045903 100644
--- a/src/VBox/Main/include/Wrapper.h
+++ b/src/VBox/Main/include/Wrapper.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/netif.h b/src/VBox/Main/include/netif.h
index 7f3bfd4..51bb1b7 100644
--- a/src/VBox/Main/include/netif.h
+++ b/src/VBox/Main/include/netif.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2012 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -88,14 +88,14 @@ int NetIfList(std::list <ComObjPtr<HostNetworkInterface> > &list);
 int NetIfEnableStaticIpConfig(VirtualBox *pVBox, HostNetworkInterface * pIf, ULONG aOldIp, ULONG aNewIp, ULONG aMask);
 int NetIfEnableStaticIpConfigV6(VirtualBox *pVBox, HostNetworkInterface * pIf, IN_BSTR aOldIPV6Address, IN_BSTR aIPV6Address, ULONG aIPV6MaskPrefixLength);
 int NetIfEnableDynamicIpConfig(VirtualBox *pVBox, HostNetworkInterface * pIf);
-int NetIfCreateHostOnlyNetworkInterface (VirtualBox *pVBox, IHostNetworkInterface **aHostNetworkInterface, IProgress **aProgress, const char *pcszName = NULL);
-int NetIfRemoveHostOnlyNetworkInterface (VirtualBox *pVBox, IN_GUID aId, IProgress **aProgress);
+int NetIfCreateHostOnlyNetworkInterface(VirtualBox *pVBox, IHostNetworkInterface **aHostNetworkInterface, IProgress **aProgress, const char *pszName = NULL);
+int NetIfRemoveHostOnlyNetworkInterface(VirtualBox *pVBox, IN_GUID aId, IProgress **aProgress);
 int NetIfGetConfig(HostNetworkInterface * pIf, NETIFINFO *);
 int NetIfGetConfigByName(PNETIFINFO pInfo);
-int NetIfGetState(const char *pcszIfName, NETIFSTATUS *penmState);
-int NetIfGetLinkSpeed(const char *pcszIfName, uint32_t *puMbits);
+int NetIfGetState(const char *pszIfName, NETIFSTATUS *penmState);
+int NetIfGetLinkSpeed(const char *pszIfName, uint32_t *puMbits);
 int NetIfDhcpRediscover(VirtualBox *pVBox, HostNetworkInterface * pIf);
-int NetIfAdpCtlOut(const char * pcszName, const char * pcszCmd, char *pszBuffer, size_t cBufSize);
+int NetIfAdpCtlOut(const char *pszName, const char *pszCmd, char *pszBuffer, size_t cBufSize);
 
 DECLINLINE(Bstr) composeIPv6Address(PRTNETADDRIPV6 aAddrPtr)
 {
diff --git a/src/VBox/Main/include/objectslist.h b/src/VBox/Main/include/objectslist.h
index c506dd8..61750e8 100644
--- a/src/VBox/Main/include/objectslist.h
+++ b/src/VBox/Main/include/objectslist.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2009-2014 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/ovfreader.h b/src/VBox/Main/include/ovfreader.h
index 8076930..e0ac7db 100644
--- a/src/VBox/Main/include/ovfreader.h
+++ b/src/VBox/Main/include/ovfreader.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2008-2011 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -358,6 +358,8 @@ public:
         itemName = "Item";
     };
 
+    virtual ~VirtualHardwareItem() { /* Makes MSC happy. */ }
+
     void fillItem(const xml::ElementNode *item);
 
     void setDefaultFlag()
diff --git a/src/VBox/Main/include/vbox-libhal.h b/src/VBox/Main/include/vbox-libhal.h
index 890fb28..9205e57 100644
--- a/src/VBox/Main/include/vbox-libhal.h
+++ b/src/VBox/Main/include/vbox-libhal.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/vector.h b/src/VBox/Main/include/vector.h
index abcf0a6..7ed95b2 100644
--- a/src/VBox/Main/include/vector.h
+++ b/src/VBox/Main/include/vector.h
@@ -13,7 +13,7 @@
  */
 
 /*
- * Copyright (C) 2008-2010 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/include/win/resource.h b/src/VBox/Main/include/win/resource.h
index 854e1e2..9ee2d4c 100644
--- a/src/VBox/Main/include/win/resource.h
+++ b/src/VBox/Main/include/win/resource.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-all/AuthLibrary.cpp b/src/VBox/Main/src-all/AuthLibrary.cpp
index f01e279..7595fa5 100644
--- a/src/VBox/Main/src-all/AuthLibrary.cpp
+++ b/src/VBox/Main/src-all/AuthLibrary.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -41,8 +41,9 @@ typedef struct AuthCtx
     unsigned           clientId;
 } AuthCtx;
 
-static DECLCALLBACK(int) authThread(RTTHREAD self, void *pvUser)
+static DECLCALLBACK(int) authThread(RTTHREAD hThreadSelf, void *pvUser)
 {
+    RT_NOREF(hThreadSelf);
     AuthCtx *pCtx = (AuthCtx *)pvUser;
 
     if (pCtx->pfnAuthEntry3)
diff --git a/src/VBox/Main/src-all/DisplayPNGUtil.cpp b/src/VBox/Main/src-all/DisplayPNGUtil.cpp
index 6515845..260b4b7 100644
--- a/src/VBox/Main/src-all/DisplayPNGUtil.cpp
+++ b/src/VBox/Main/src-all/DisplayPNGUtil.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2011 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-all/DisplayResampleImage.cpp b/src/VBox/Main/src-all/DisplayResampleImage.cpp
index 7216d0c..1612879 100644
--- a/src/VBox/Main/src-all/DisplayResampleImage.cpp
+++ b/src/VBox/Main/src-all/DisplayResampleImage.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2011 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -15,188 +15,20 @@
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
 
-/*
- * Based on gdImageCopyResampled from libgd.
- * Original copyright notice follows:
-
-     Portions copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
-     Pierre-Alain Joye (pierre at libgd.org).
-
-     Permission has been granted to copy, distribute and modify gd in
-     any context without fee, including a commercial application,
-     provided that this notice is present in user-accessible supporting
-     documentation.
-
-     This does not affect your ownership of the derived work itself, and
-     the intent is to assure proper credit for the authors of gd, not to
-     interfere with your productive use of gd. If you have questions,
-     ask. "Derived works" includes all programs that utilize the
-     library. Credit must be given in user-accessible documentation.
-
-     This software is provided "AS IS." The copyright holders disclaim
-     all warranties, either express or implied, including but not
-     limited to implied warranties of merchantability and fitness for a
-     particular purpose, with respect to this code and accompanying
-     documentation.
- */
-
-/*
- *
- * @todo Simplify: Offsets of images are 0,0 => no dstX, dstY, srcX, srcY;
- *             Screenshot has no alpha channel => no processing of alpha byte.
- */
-
 #include <iprt/types.h>
 
-/* 2.0.10: cast instead of floor() yields 35% performance improvement.
-        Thanks to John Buckman. */
-
-#define floor2(exp) ((long) exp)
-/*#define floor2(exp) floor(exp)*/
-
-typedef uint8_t *gdImagePtr;
-
-DECLINLINE(int) gdImageGetTrueColorPixel (gdImagePtr im, int x, int y, int w)
-{
-    return *(int32_t *)(im + y * w * 4 + x * 4);
-}
-
-DECLINLINE(void) gdImageSetPixel (gdImagePtr im, int x, int y, int color, int w)
+DECLINLINE(void) imageSetPixel (uint8_t *im, int x, int y, int color, int w)
 {
     *(int32_t *)(im + y * w * 4 + x * 4) = color;
 }
 
-#define gdAlphaMax 127
-#define gdAlphaOpaque 0
-#define gdAlphaTransparent 127
-#define gdRedMax 255
-#define gdGreenMax 255
-#define gdBlueMax 255
-#define gdTrueColorGetAlpha(c) (((c) & 0x7F000000) >> 24)
-#define gdTrueColorGetRed(c) (((c) & 0xFF0000) >> 16)
-#define gdTrueColorGetGreen(c) (((c) & 0x00FF00) >> 8)
-#define gdTrueColorGetBlue(c) ((c) & 0x0000FF)
-#define gdTrueColorAlpha(r, g, b, a) (((a) << 24) + \
-        ((r) << 16) + \
-        ((g) << 8) + \
-        (b))
-
-void gdImageCopyResampled (uint8_t *dst,
-                      uint8_t *src,
-                      int dstX, int dstY,
-                      int srcX, int srcY,
-                      int dstW, int dstH, int srcW, int srcH)
-{
-  int x, y;
-  double sy1, sy2, sx1, sx2;
-  for (y = dstY; (y < dstY + dstH); y++)
-    {
-      sy1 = ((double) y - (double) dstY) * (double) srcH / (double) dstH;
-      sy2 = ((double) (y + 1) - (double) dstY) * (double) srcH /
-        (double) dstH;
-      for (x = dstX; (x < dstX + dstW); x++)
-        {
-          double sx, sy;
-          double spixels = 0;
-          double red = 0.0, green = 0.0, blue = 0.0, alpha = 0.0;
-          sx1 = ((double) x - (double) dstX) * (double) srcW / dstW;
-          sx2 = ((double) (x + 1) - (double) dstX) * (double) srcW / dstW;
-          sy = sy1;
-          do
-            {
-              double yportion;
-              if (floor2 (sy) == floor2 (sy1))
-                {
-                  yportion = 1.0 - (sy - (double)floor2 (sy));
-                  if (yportion > sy2 - sy1)
-                    {
-                      yportion = sy2 - sy1;
-                    }
-                  sy = (double)floor2 (sy);
-                }
-              else if (sy == floor2 (sy2))
-                {
-                  yportion = sy2 - (double)floor2 (sy2);
-                }
-              else
-                {
-                  yportion = 1.0;
-                }
-              sx = sx1;
-              do
-                {
-                  double xportion;
-                  double pcontribution;
-                  int p;
-                  if (floor2 (sx) == floor2 (sx1))
-                    {
-                      xportion = 1.0 - (sx - (double)floor2 (sx));
-                      if (xportion > sx2 - sx1)
-                        {
-                          xportion = sx2 - sx1;
-                        }
-                      sx = (double)floor2 (sx);
-                    }
-                  else if (sx == floor2 (sx2))
-                    {
-                      xportion = sx2 - (double)floor2 (sx2);
-                    }
-                  else
-                    {
-                      xportion = 1.0;
-                    }
-                  pcontribution = xportion * yportion;
-                  /* 2.08: previously srcX and srcY were ignored.
-                     Andrew Pattison */
-                  p = gdImageGetTrueColorPixel (src,
-                                                (int) sx + srcX,
-                                                (int) sy + srcY, srcW);
-                  red += gdTrueColorGetRed (p) * pcontribution;
-                  green += gdTrueColorGetGreen (p) * pcontribution;
-                  blue += gdTrueColorGetBlue (p) * pcontribution;
-                  alpha += gdTrueColorGetAlpha (p) * pcontribution;
-                  spixels += xportion * yportion;
-                  sx += 1.0;
-                }
-              while (sx < sx2);
-              sy += 1.0;
-            }
-          while (sy < sy2);
-          if (spixels != 0.0)
-            {
-              red /= spixels;
-              green /= spixels;
-              blue /= spixels;
-              alpha /= spixels;
-            }
-          /* Clamping to allow for rounding errors above */
-          if (red > 255.0)
-            {
-              red = 255.0;
-            }
-          if (green > 255.0)
-            {
-              green = 255.0;
-            }
-          if (blue > 255.0)
-            {
-              blue = 255.0;
-            }
-          if (alpha > gdAlphaMax)
-            {
-              alpha = gdAlphaMax;
-            }
-          gdImageSetPixel (dst,
-                           x, y,
-                           gdTrueColorAlpha ((int) red,
-                                             (int) green,
-                                             (int) blue, (int) alpha), dstW);
-        }
-    }
-}
+#define trueColorGetAlpha(c) (((c) & 0x7F000000) >> 24)
+#define trueColorGetRed(c)   (((c) & 0xFF0000)   >> 16)
+#define trueColorGetGreen(c) (((c) & 0x00FF00)   >> 8)
+#define trueColorGetBlue(c)   ((c) & 0x0000FF)
 
 /* Fast integer implementation for 32 bpp bitmap scaling.
- * Use fixed point values * 16.
+ * Using fixed point values * 16.
  */
 typedef int32_t FIXEDPOINT;
 #define INT_TO_FIXEDPOINT(i) (FIXEDPOINT)((i) << 4)
@@ -206,10 +38,10 @@ typedef int32_t FIXEDPOINT;
 
 /* For 32 bit source only. */
 void BitmapScale32 (uint8_t *dst,
-                        int dstW, int dstH,
-                        const uint8_t *src,
-                        int iDeltaLine,
-                        int srcW, int srcH)
+                    int dstW, int dstH,
+                    const uint8_t *src,
+                    int iDeltaLine,
+                    int srcW, int srcH)
 {
     int x, y;
 
@@ -280,9 +112,9 @@ void BitmapScale32 (uint8_t *dst,
                     /* Color depth specific code begin */
                     p = *(uint32_t *)(pu8SrcLine + FIXEDPOINT_TO_INT(sx) * 4);
                     /* Color depth specific code end */
-                    red += gdTrueColorGetRed (p) * pcontribution;
-                    green += gdTrueColorGetGreen (p) * pcontribution;
-                    blue += gdTrueColorGetBlue (p) * pcontribution;
+                    red   += trueColorGetRed (p) * pcontribution;
+                    green += trueColorGetGreen (p) * pcontribution;
+                    blue  += trueColorGetBlue (p) * pcontribution;
 
                     sx += INT_TO_FIXEDPOINT(1);
                 } while (sx < sx2);
@@ -309,11 +141,10 @@ void BitmapScale32 (uint8_t *dst,
             {
                 blue = 255;
             }
-            gdImageSetPixel (dst,
-                             x, y,
-                             ( ((int) red) << 16) + (((int) green) << 8) + ((int) blue),
-                             dstW);
+            imageSetPixel (dst,
+                           x, y,
+                           ( ((int) red) << 16) + (((int) green) << 8) + ((int) blue),
+                           dstW);
         }
     }
 }
-
diff --git a/src/VBox/Main/src-all/DisplayUtils.cpp b/src/VBox/Main/src-all/DisplayUtils.cpp
index 25e6f9a..e83fb9c 100644
--- a/src/VBox/Main/src-all/DisplayUtils.cpp
+++ b/src/VBox/Main/src-all/DisplayUtils.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2012 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ int readSavedDisplayScreenshot(const Utf8Str &strStateFilePath, uint32_t u32Type
 {
     LogFlowFunc(("u32Type = %d [%s]\n", u32Type, strStateFilePath.c_str()));
 
-    /* @todo cache read data */
+    /** @todo cache read data */
     if (strStateFilePath.isEmpty())
     {
         /* No saved state data. */
@@ -138,7 +138,7 @@ int readSavedDisplayScreenshot(const Utf8Str &strStateFilePath, uint32_t u32Type
 
 void freeSavedDisplayScreenshot(uint8_t *pu8Data)
 {
-    /* @todo not necessary when caching is implemented. */
+    /** @todo not necessary when caching is implemented. */
     RTMemFree(pu8Data);
 }
 
@@ -148,7 +148,7 @@ int readSavedGuestScreenInfo(const Utf8Str &strStateFilePath, uint32_t u32Screen
 {
     LogFlowFunc(("u32ScreenId = %d [%s]\n", u32ScreenId, strStateFilePath.c_str()));
 
-    /* @todo cache read data */
+    /** @todo cache read data */
     if (strStateFilePath.isEmpty())
     {
         /* No saved state data. */
diff --git a/src/VBox/Main/src-all/EventImpl.cpp b/src/VBox/Main/src-all/EventImpl.cpp
index 30b5a68..5b1ef82 100644
--- a/src/VBox/Main/src-all/EventImpl.cpp
+++ b/src/VBox/Main/src-all/EventImpl.cpp
@@ -209,7 +209,7 @@ HRESULT VBoxEvent::waitProcessed(LONG aTimeout, BOOL *aResult)
 
     // must drop lock while waiting, because setProcessed() needs synchronization.
     alock.release();
-    /* @todo: maybe while loop for spurious wakeups? */
+    /** @todo maybe while loop for spurious wakeups? */
     int vrc = ::RTSemEventWait(m->mWaitEvent, aTimeout);
     AssertMsg(RT_SUCCESS(vrc) || vrc == VERR_TIMEOUT || vrc == VERR_INTERRUPTED,
               ("RTSemEventWait returned %Rrc\n", vrc));
diff --git a/src/VBox/Main/src-all/ExtPackManagerImpl.cpp b/src/VBox/Main/src-all/ExtPackManagerImpl.cpp
index f2355b5..fc2af9f 100644
--- a/src/VBox/Main/src-all/ExtPackManagerImpl.cpp
+++ b/src/VBox/Main/src-all/ExtPackManagerImpl.cpp
@@ -659,7 +659,7 @@ HRESULT ExtPackFile::install(BOOL aReplace, const com::Utf8Str &aDisplayInfo, Co
             if (SUCCEEDED(hrc))
             {
                 ComPtr<Progress> ptrProgress = pTask->ptrProgress;
-                hrc = pTask->createThread(NULL, RTTHREADTYPE_DEFAULT);
+                hrc = pTask->createThreadWithType(RTTHREADTYPE_DEFAULT);
                 pTask = NULL; /* The _completely_ _undocumented_ createThread method always consumes pTask. */
                 if (SUCCEEDED(hrc))
                     hrc = ptrProgress.queryInterfaceTo(aProgress.asOutParam());
@@ -1611,8 +1611,8 @@ ExtPack::i_hlpLoadHGCMService(PCVBOXEXTPACKHLP pHlp, VBOXEXTPACK_IF_CS(IConsole)
     return pCon->i_hgcmLoadService(pszServiceLibrary, pszServiceName);
 #else
     NOREF(pHlp); NOREF(pConsole); NOREF(pszServiceLibrary); NOREF(pszServiceName);
-#endif
     return VERR_INVALID_STATE;
+#endif
 }
 
 /*static*/ DECLCALLBACK(int)
@@ -1635,9 +1635,9 @@ ExtPack::i_hlpLoadVDPlugin(PCVBOXEXTPACKHLP pHlp, VBOXEXTPACK_IF_CS(IVirtualBox)
     VirtualBox *pVBox = (VirtualBox *)pVirtualBox;
     return pVBox->i_loadVDPlugin(pszPluginLibrary);
 #else
-    NOREF(pHlp); NOREF(pVirtualBox);
-#endif
+    NOREF(pHlp); NOREF(pVirtualBox); NOREF(pszPluginLibrary);
     return VERR_INVALID_STATE;
+#endif
 }
 
 /*static*/ DECLCALLBACK(int)
@@ -1660,9 +1660,9 @@ ExtPack::i_hlpUnloadVDPlugin(PCVBOXEXTPACKHLP pHlp, VBOXEXTPACK_IF_CS(IVirtualBo
     VirtualBox *pVBox = (VirtualBox *)pVirtualBox;
     return pVBox->i_unloadVDPlugin(pszPluginLibrary);
 #else
-    NOREF(pHlp); NOREF(pVirtualBox);
-#endif
+    NOREF(pHlp); NOREF(pVirtualBox); NOREF(pszPluginLibrary);
     return VERR_INVALID_STATE;
+#endif
 }
 
 /*static*/ DECLCALLBACK(int)
@@ -1723,9 +1723,6 @@ HRESULT ExtPack::getVRDEModule(com::Utf8Str &aVRDEModule)
 HRESULT ExtPack::getPlugIns(std::vector<ComPtr<IExtPackPlugIn> > &aPlugIns)
 {
     /** @todo implement plug-ins. */
-#ifdef VBOX_WITH_XPCOM
-    NOREF(aPlugIns);
-#endif
     NOREF(aPlugIns);
     ReturnComNotImplemented();
 }
@@ -1901,10 +1898,12 @@ HRESULT ExtPackManager::initExtPackManager(VirtualBox *a_pVirtualBox, VBOXEXTPAC
     m = new Data;
     m->strBaseDir           = szBaseDir;
     m->strCertificatDirPath = szCertificatDir;
-#if !defined(VBOX_COM_INPROC)
+    m->enmContext           = a_enmContext;
+#ifndef VBOX_COM_INPROC
     m->pVirtualBox          = a_pVirtualBox;
+#else
+    RT_NOREF_PV(a_pVirtualBox);
 #endif
-    m->enmContext           = a_enmContext;
 
     /*
      * Slurp in VBoxVMM which is used by VBoxPuelMain.
@@ -2067,6 +2066,7 @@ HRESULT ExtPackManager::openExtPackFile(const com::Utf8Str &aPath, ComPtr<IExtPa
 
     return hrc;
 #else
+    RT_NOREF(aPath, aFile);
     return E_NOTIMPL;
 #endif
 }
@@ -2087,7 +2087,7 @@ HRESULT ExtPackManager::uninstall(const com::Utf8Str &aName, BOOL aForcedRemoval
         if (SUCCEEDED(hrc))
         {
             ComPtr<Progress> ptrProgress = pTask->ptrProgress;
-            hrc = pTask->createThread(NULL, RTTHREADTYPE_DEFAULT);
+            hrc = pTask->createThreadWithType(RTTHREADTYPE_DEFAULT);
             pTask = NULL;               /* always consumed by createThread */
             if (SUCCEEDED(hrc))
                 hrc = ptrProgress.queryInterfaceTo(aProgress.asOutParam());
@@ -2112,6 +2112,7 @@ HRESULT ExtPackManager::uninstall(const com::Utf8Str &aName, BOOL aForcedRemoval
         delete pTask;
     return hrc;
 #else
+    RT_NOREF(aName, aForcedRemoval, aDisplayInfo, aProgress);
     return E_NOTIMPL;
 #endif
 }
@@ -2578,7 +2579,7 @@ HRESULT ExtPackManager::i_refreshExtPack(const char *a_pszName, bool a_fUnusable
 bool ExtPackManager::i_areThereAnyRunningVMs(void) const
 {
     Assert(m->pVirtualBox != NULL); /* Only called from VBoxSVC. */
-    
+
     /*
      * Get list of machines and their states.
      */
@@ -3040,11 +3041,10 @@ int ExtPackManager::i_getVrdeLibraryPathForExtPack(Utf8Str const *a_pstrExtPack,
  * @returns S_OK if a path is returned, COM error status and message return if
  *          not.
  * @param   a_pszModuleName     The library.
- * @param   a_pstrExtPack       The extension pack.
+ * @param   a_pszExtPack        The extension pack.
  * @param   a_pstrVrdeLibrary   Where to return the path.
  */
-HRESULT ExtPackManager::i_getLibraryPathForExtPack(const char *a_pszModuleName, Utf8Str const *a_pstrExtPack,
-                                                   Utf8Str *a_pstrLibrary)
+HRESULT ExtPackManager::i_getLibraryPathForExtPack(const char *a_pszModuleName, const char *a_pszExtPack, Utf8Str *a_pstrLibrary)
 {
     AutoCaller autoCaller(this);
     HRESULT hrc = autoCaller.rc();
@@ -3052,11 +3052,11 @@ HRESULT ExtPackManager::i_getLibraryPathForExtPack(const char *a_pszModuleName,
     {
         AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS);
 
-        ExtPack *pExtPack = i_findExtPack(a_pstrExtPack->c_str());
+        ExtPack *pExtPack = i_findExtPack(a_pszExtPack);
         if (pExtPack)
             hrc = pExtPack->i_getLibraryName(a_pszModuleName, a_pstrLibrary);
         else
-            hrc = setError(VBOX_E_OBJECT_NOT_FOUND, tr("No extension pack by the name '%s' was found"), a_pstrExtPack->c_str());
+            hrc = setError(VBOX_E_OBJECT_NOT_FOUND, tr("No extension pack by the name '%s' was found"), a_pszExtPack);
     }
 
     return hrc;
diff --git a/src/VBox/Main/src-all/ExtPackUtil.cpp b/src/VBox/Main/src-all/ExtPackUtil.cpp
index 7065486..2bbe0a6 100644
--- a/src/VBox/Main/src-all/ExtPackUtil.cpp
+++ b/src/VBox/Main/src-all/ExtPackUtil.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2012 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-all/Global.cpp b/src/VBox/Main/src-all/Global.cpp
index baaf7a7..0448163 100644
--- a/src/VBox/Main/src-all/Global.cpp
+++ b/src/VBox/Main/src-all/Global.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -185,7 +185,7 @@ const Global::OSType Global::sOSTypes[] =
         StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97, AudioCodecType_AD1980  },
 
     { "Linux",   "Linux",             "Linux26_64",         "Linux 2.6 / 3.x / 4.x (64-bit)",
-      VBOXOSTYPE_Linux26_x64,     VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC 
+      VBOXOSTYPE_Linux26_x64,     VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC
                                 | VBOXOSHINT_USBTABLET | VBOXOSHINT_X2APIC,
       1024,  16,  8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
         StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97, AudioCodecType_AD1980  },
@@ -503,7 +503,7 @@ const Global::OSType Global::sOSTypes[] =
         StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97, AudioCodecType_STAC9700  },
 };
 
-uint32_t Global::cOSTypes = RT_ELEMENTS(Global::sOSTypes);
+size_t Global::cOSTypes = RT_ELEMENTS(Global::sOSTypes);
 
 /**
  * Returns an OS Type ID for the given VBOXOSTYPE value.
diff --git a/src/VBox/Main/src-all/HashedPw.cpp b/src/VBox/Main/src-all/HashedPw.cpp
index 5e6fbb3..70f2f01 100644
--- a/src/VBox/Main/src-all/HashedPw.cpp
+++ b/src/VBox/Main/src-all/HashedPw.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-all/Logging.cpp b/src/VBox/Main/src-all/Logging.cpp
index 0bf6b75..c6e5c2e 100644
--- a/src/VBox/Main/src-all/Logging.cpp
+++ b/src/VBox/Main/src-all/Logging.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-all/ProgressImpl.cpp b/src/VBox/Main/src-all/ProgressImpl.cpp
index 25ce8a1..5e861b1 100644
--- a/src/VBox/Main/src-all/ProgressImpl.cpp
+++ b/src/VBox/Main/src-all/ProgressImpl.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-all/QMTranslatorImpl.cpp b/src/VBox/Main/src-all/QMTranslatorImpl.cpp
index 5ee0999..48b1e58 100644
--- a/src/VBox/Main/src-all/QMTranslatorImpl.cpp
+++ b/src/VBox/Main/src-all/QMTranslatorImpl.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -191,7 +191,7 @@ public:
         do {
             uint32_t hash = calculateHash(pszSource, pszDisamb);
             lowerIter = m_hashSet.lower_bound(HashOffset(hash, 0));
-            upperIter = m_hashSet.upper_bound(HashOffset(hash, ~0));
+            upperIter = m_hashSet.upper_bound(HashOffset(hash, UINT32_MAX));
 
             for (iter = lowerIter; iter != upperIter; ++iter)
             {
diff --git a/src/VBox/Main/src-all/SecretKeyStore.cpp b/src/VBox/Main/src-all/SecretKeyStore.cpp
index cb9ab71..74be9e4 100644
--- a/src/VBox/Main/src-all/SecretKeyStore.cpp
+++ b/src/VBox/Main/src-all/SecretKeyStore.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-all/SharedFolderImpl.cpp b/src/VBox/Main/src-all/SharedFolderImpl.cpp
index 8ee29db..87853f2 100644
--- a/src/VBox/Main/src-all/SharedFolderImpl.cpp
+++ b/src/VBox/Main/src-all/SharedFolderImpl.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-all/ThreadTask.cpp b/src/VBox/Main/src-all/ThreadTask.cpp
index a2fa902..29ee4db 100644
--- a/src/VBox/Main/src-all/ThreadTask.cpp
+++ b/src/VBox/Main/src-all/ThreadTask.cpp
@@ -19,74 +19,111 @@
 #include "VirtualBoxBase.h"
 #include "ThreadTask.h"
 
+
 /**
- *  The function takes ownership of "this" instance (object
- *  instance which calls this function).
- *  And the function is responsible for deletion of "this"
- *  pointer in all cases.
- *  Possible way of usage:
+ * Starts the task (on separate thread), consuming @a this.
+ *
+ * The function takes ownership of "this" instance (object instance which calls
+ * this function). And the function is responsible for deletion of "this"
+ * pointer in all cases.
  *
- *  int vrc = VINF_SUCCESS;
- *  HRESULT hr = S_OK;
+ * Possible way of usage:
+ * @code{.cpp}
+        HRESULT hr;
+        SomeTaskInheritedFromThreadTask *pTask = NULL;
+        try
+        {
+            pTask = new SomeTaskInheritedFromThreadTask(this);
+            if (!pTask->Init()) // some init procedure
+                throw E_FAIL;
+        }
+        catch (...)
+        {
+            if (pTask);
+                delete pTask;
+            return E_FAIL;
+        }
+        return pTask->createThread(); // pTask is always consumed
+   @endcode
+ *
+ * @sa createThreadWithType, createThreadWithRaceCondition
+ */
+HRESULT ThreadTask::createThread(void)
+{
+    return createThreadInternal(RTTHREADTYPE_MAIN_WORKER, NULL /*phThread*/);
+}
+
+
+/**
+ * Same ThreadTask::createThread(), except it takes a thread type parameter.
+ *
+ * @param   enmType     The thread type.
+ */
+HRESULT ThreadTask::createThreadWithType(RTTHREADTYPE enmType)
+{
+    return createThreadInternal(enmType, NULL /*phThread*/);
+}
+
+
+/**
+ * Same ThreadTask::createThread(), except it returns a thread handle.
  *
- *  SomeTaskInheritedFromThreadTask* pTask = NULL;
- *  try
- *  {
- *      pTask = new SomeTaskInheritedFromThreadTask(this);
- *      if (!pTask->Init())//some init procedure
- *      {
- *          delete pTask;
- *          throw E_FAIL;
- *      }
- *      //this function delete pTask in case of exceptions, so
- *      there is no need the call of delete operator
+ * If the task thread is incorrectly mananged, the caller may easily race the
+ * completion and termination of the task thread!  Use with care!
  *
- *      hr = pTask->createThread();
- *  }
- *  catch(...)
- *  {
- *      vrc = E_FAIL;
- *  }
+ * @param   phThread    Handle of the worker thread.
  */
-HRESULT ThreadTask::createThread(PRTTHREAD pThread, RTTHREADTYPE enmType)
+HRESULT ThreadTask::createThreadWithRaceCondition(PRTTHREAD phThread)
 {
-    HRESULT rc = S_OK;
+    return createThreadInternal(RTTHREADTYPE_MAIN_WORKER, phThread);
+}
 
-    m_pThread = pThread;
-    int vrc = RTThreadCreate(m_pThread,
-                             taskHandler,
+
+/**
+ * Internal worker for ThreadTask::createThread,
+ * ThreadTask::createThreadWithType, ThreadTask::createThreadwithRaceCondition.
+ *
+ * @note Always consumes @a this!
+ */
+HRESULT ThreadTask::createThreadInternal(RTTHREADTYPE enmType, PRTTHREAD phThread)
+{
+    int vrc = RTThreadCreate(&m_hThread,
+                             taskHandlerThreadProc,
                              (void *)this,
                              0,
                              enmType,
                              0,
                              this->getTaskName().c_str());
-
-    if (RT_FAILURE(vrc))
+    if (RT_SUCCESS(vrc))
     {
-        delete this;
-        return E_FAIL;
+        if (phThread)
+            *phThread = m_hThread;
+        return S_OK;
     }
 
-    return rc;
+    delete this;
+    return E_FAIL;
 }
 
+
 /**
  * Static method that can get passed to RTThreadCreate to have a
  * thread started for a Task.
  */
-/* static */ DECLCALLBACK(int) ThreadTask::taskHandler(RTTHREAD /* thread */, void *pvUser)
+/* static */ DECLCALLBACK(int) ThreadTask::taskHandlerThreadProc(RTTHREAD /* thread */, void *pvUser)
 {
     if (pvUser == NULL)
-        return VERR_INVALID_POINTER;
+        return VERR_INVALID_POINTER; /* nobody cares */
 
     ThreadTask *pTask = static_cast<ThreadTask *>(pvUser);
 
     /*
-    *  handler shall catch and process all possible cases as errors and exceptions.
-    */
+     *  handler shall catch and process all possible cases as errors and exceptions.
+     */
     pTask->handler();
 
+    pTask->m_hThread = NIL_RTTHREAD; /* unnecessary, but whatever. */
     delete pTask;
-
     return VINF_SUCCESS;
 }
+
diff --git a/src/VBox/Main/src-all/VirtualBoxBase.cpp b/src/VBox/Main/src-all/VirtualBoxBase.cpp
index 4bb79d8..0c84be4 100644
--- a/src/VBox/Main/src-all/VirtualBoxBase.cpp
+++ b/src/VBox/Main/src-all/VirtualBoxBase.cpp
@@ -24,7 +24,7 @@
 #include <typeinfo>
 
 #if !defined(VBOX_WITH_XPCOM)
-#include <windows.h>
+#include <iprt/win/windows.h>
 #include <dbghelp.h>
 #else /* !defined(VBOX_WITH_XPCOM) */
 /// @todo remove when VirtualBoxErrorInfo goes away from here
@@ -252,9 +252,11 @@ HRESULT VirtualBoxBase::handleUnexpectedExceptions(VirtualBoxBase *const aThis,
                                 true /* aLogIt */);
     }
 
+#ifndef _MSC_VER /* (unreachable) */
     /* should not get here */
     AssertFailed();
     return E_FAIL;
+#endif
 }
 
 /**
diff --git a/src/VBox/Main/src-all/VirtualBoxErrorInfoImpl.cpp b/src/VBox/Main/src-all/VirtualBoxErrorInfoImpl.cpp
index 405e5c5..b39676d 100644
--- a/src/VBox/Main/src-all/VirtualBoxErrorInfoImpl.cpp
+++ b/src/VBox/Main/src-all/VirtualBoxErrorInfoImpl.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -181,17 +181,19 @@ STDMETHODIMP VirtualBoxErrorInfo::GetGUID(GUID *guid)
 
 STDMETHODIMP VirtualBoxErrorInfo::GetHelpContext(DWORD *pdwHelpContext)
 {
+    RT_NOREF(pdwHelpContext);
     return E_NOTIMPL;
 }
 
-STDMETHODIMP VirtualBoxErrorInfo::GetHelpFile(BSTR *pbstrHelpFile)
+STDMETHODIMP VirtualBoxErrorInfo::GetHelpFile(BSTR *pBstrHelpFile)
 {
+    RT_NOREF(pBstrHelpFile);
     return E_NOTIMPL;
 }
 
-STDMETHODIMP VirtualBoxErrorInfo::GetSource(BSTR *source)
+STDMETHODIMP VirtualBoxErrorInfo::GetSource(BSTR *pBstrSource)
 {
-    return COMGETTER(Component)(source);
+    return COMGETTER(Component)(pBstrSource);
 }
 
 #else // defined(VBOX_WITH_XPCOM)
diff --git a/src/VBox/Main/src-all/win/VBoxProxyStub.c b/src/VBox/Main/src-all/win/VBoxProxyStub.c
index bc07e70..6336ca3 100644
--- a/src/VBox/Main/src-all/win/VBoxProxyStub.c
+++ b/src/VBox/Main/src-all/win/VBoxProxyStub.c
@@ -26,7 +26,7 @@
 #define PROXY_DELEGATION                                                                             /* see generated dlldata.c */
 #include <iprt/nt/nt-and-windows.h>
 #include <rpcproxy.h>
-#include <Shlwapi.h>
+#include <iprt/win/shlwapi.h>
 #include <stdio.h>
 
 #include "VirtualBox.h"
@@ -743,7 +743,7 @@ static LSTATUS vbpsSetRegValueAA(VBPSREGSTATE *pState, HKEY hkey, const char *ps
         DWORD cbExistingData = cbValue + 128;
         char *pszExistingData = alloca(cbExistingData);
         DWORD dwExistingType;
-        rc = RegQueryValueExA(hkey, pszValueNm, 0 /*Reserved*/, &dwExistingType, pszExistingData, &cbExistingData);
+        rc = RegQueryValueExA(hkey, pszValueNm, 0 /*Reserved*/, &dwExistingType, (PBYTE)pszExistingData, &cbExistingData);
         if (rc == ERROR_SUCCESS)
         {
             if (   dwExistingType == REG_SZ
@@ -770,7 +770,7 @@ static LSTATUS vbpsSetRegValueAA(VBPSREGSTATE *pState, HKEY hkey, const char *ps
     /*
      * Set the value.
      */
-    rc = RegSetValueExA(hkey, pszValueNm, 0 /*Reserved*/, REG_SZ, pszValue, cbValue);
+    rc = RegSetValueExA(hkey, pszValueNm, 0 /*Reserved*/, REG_SZ, (PBYTE)pszValue, cbValue);
     if (rc == ERROR_SUCCESS)
     {
         VBSP_LOG_SET_VALUE(("vbpsSetRegValueAA: %ls/%s=%s (at %d)\n",
@@ -1169,6 +1169,7 @@ LSTATUS VbpsRegisterClassId(VBPSREGSTATE *pState, const CLSID *pClsId, const cha
 {
     LSTATUS rc;
     char szClsId[CURLY_UUID_STR_BUF_SIZE];
+    RT_NOREF(pszAppId);
 
     Assert(!pszAppId || *pszAppId == '{');
     Assert((pwszVBoxDir == NULL && !pState->fUpdate) || pwszVBoxDir[RTUtf16Len(pwszVBoxDir) - 1] == '\\');
@@ -1323,6 +1324,7 @@ static void vbpsUpdateTypeLibRegistration(VBPSREGSTATE *pState, PCRTUTF16 pwszVB
     HKEY hkeyTypeLibs;
     HKEY hkeyTypeLibId;
     LSTATUS rc;
+    RT_NOREF(fIs32On64);
 
     Assert(pState->fUpdate && !pState->fDelete);
 
@@ -1404,6 +1406,7 @@ static void vbpsUpdateProxyStubRegistration(VBPSREGSTATE *pState, PCRTUTF16 pwsz
      * It's simple compared to the VBox classes, thus all the NULL parameters.
      */
     const char *pszPsDll = VBPS_PROXY_STUB_FILE(fIs32On64);
+    RT_NOREF(fIs32On64);
     Assert(pState->fUpdate && !pState->fDelete);
     VbpsRegisterClassId(pState, &g_ProxyClsId, "PSFactoryBuffer", NULL /*pszAppId*/,
                         NULL /*pszClassName*/, NULL /*pszCurClassNameVerSuffix*/, NULL /*pTypeLibId*/,
diff --git a/src/VBox/Main/src-all/win/VirtualBox_rgs.xsl b/src/VBox/Main/src-all/win/VirtualBox_rgs.xsl
index 68a2f34..cdabb1b 100644
--- a/src/VBox/Main/src-all/win/VirtualBox_rgs.xsl
+++ b/src/VBox/Main/src-all/win/VirtualBox_rgs.xsl
@@ -5,7 +5,7 @@
  *  registry definitions necessary to properly register
  *  VirtualBox Main API COM components.
 
-    Copyright (C) 2007-2012 Oracle Corporation
+    Copyright (C) 2007-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-client/AdditionsFacilityImpl.cpp b/src/VBox/Main/src-client/AdditionsFacilityImpl.cpp
index c0bd7c2..2b6c9a4 100644
--- a/src/VBox/Main/src-client/AdditionsFacilityImpl.cpp
+++ b/src/VBox/Main/src-client/AdditionsFacilityImpl.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -60,6 +60,7 @@ void AdditionsFacility::FinalRelease()
 HRESULT AdditionsFacility::init(Guest *a_pParent, AdditionsFacilityType_T a_enmFacility, AdditionsFacilityStatus_T a_enmStatus,
                                 uint32_t a_fFlags, PCRTTIMESPEC a_pTimeSpecTS)
 {
+    RT_NOREF(a_pParent);
     LogFlowThisFunc(("a_pParent=%p\n", a_pParent));
 
     /* Enclose the state transition NotReady->InInit->Ready. */
diff --git a/src/VBox/Main/src-client/ClientTokenHolder.cpp b/src/VBox/Main/src-client/ClientTokenHolder.cpp
index d7d17bc..4e66d08 100644
--- a/src/VBox/Main/src-client/ClientTokenHolder.cpp
+++ b/src/VBox/Main/src-client/ClientTokenHolder.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -38,7 +38,7 @@
 
 #if defined(RT_OS_WINDOWS) || defined(RT_OS_OS2)
 /** client token holder thread */
-static DECLCALLBACK(int) ClientTokenHolderThread(RTTHREAD Thread, void *pvUser);
+static DECLCALLBACK(int) ClientTokenHolderThread(RTTHREAD hThreadSelf, void *pvUser);
 #endif
 
 
@@ -237,8 +237,9 @@ bool Session::ClientTokenHolder::isReady()
 
 #if defined(RT_OS_WINDOWS) || defined(RT_OS_OS2)
 /** client token holder thread */
-DECLCALLBACK(int) ClientTokenHolderThread(RTTHREAD Thread, void *pvUser)
+DECLCALLBACK(int) ClientTokenHolderThread(RTTHREAD hThreadSelf, void *pvUser)
 {
+    RT_NOREF(hThreadSelf);
     LogFlowFuncEnter();
 
     Assert(pvUser);
@@ -270,8 +271,8 @@ DECLCALLBACK(int) ClientTokenHolderThread(RTTHREAD Thread, void *pvUser)
                 ::WaitForSingleObject(finishSem, INFINITE);
                 /* release the token */
                 LogFlow(("ClientTokenHolderThread(): releasing token...\n"));
-                BOOL success = ::ReleaseMutex(mutex);
-                AssertMsg(success, ("cannot release token, err=%d\n", ::GetLastError()));
+                BOOL fRc = ::ReleaseMutex(mutex);
+                AssertMsg(fRc, ("cannot release token, err=%d\n", ::GetLastError())); NOREF(fRc);
                 ::CloseHandle(mutex);
                 ::CloseHandle(finishSem);
             }
diff --git a/src/VBox/Main/src-client/ConsoleImpl.cpp b/src/VBox/Main/src-client/ConsoleImpl.cpp
index fd43062..f718cc8 100644
--- a/src/VBox/Main/src-client/ConsoleImpl.cpp
+++ b/src/VBox/Main/src-client/ConsoleImpl.cpp
@@ -238,7 +238,7 @@ public:
 
     void handler()
     {
-        int vrc = Console::i_powerUpThread(NULL, this);
+        Console::i_powerUpThreadTask(this);
     }
 
 };
@@ -256,7 +256,7 @@ public:
 
     void handler()
     {
-        int vrc = Console::i_powerDownThread(NULL, this);
+        Console::i_powerDownThreadTask(this);
     }
 };
 
@@ -1437,6 +1437,7 @@ void Console::i_VRDPClientDisconnect(uint32_t u32ClientId,
 
 void Console::i_VRDPInterceptAudio(uint32_t u32ClientId)
 {
+    RT_NOREF(u32ClientId);
     LogFlowFuncEnter();
 
     AutoCaller autoCaller(this);
@@ -1510,7 +1511,7 @@ inline static const char *networkAdapterTypeToName(NetworkAdapterType_T adapterT
             AssertFailed();
             return "unknown";
     }
-    return NULL;
+    /* not reached */
 }
 
 /**
@@ -2811,6 +2812,7 @@ HRESULT Console::attachUSBDevice(const com::Guid &aId, const com::Utf8Str &aCapt
 
 HRESULT Console::detachUSBDevice(const com::Guid &aId, ComPtr<IUSBDevice> &aDevice)
 {
+    RT_NOREF(aDevice);
 #ifdef VBOX_WITH_USB
 
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
@@ -3991,75 +3993,75 @@ HRESULT Console::i_onNetworkAdapterChange(INetworkAdapter *aNetworkAdapter, BOOL
         {
             rc = aNetworkAdapter->COMGETTER(TraceEnabled)(&fTraceEnabled);
             AssertComRC(rc);
-        }
-        if (SUCCEEDED(rc))
-        {
-            ULONG ulInstance;
-            rc = aNetworkAdapter->COMGETTER(Slot)(&ulInstance);
-            AssertComRC(rc);
             if (SUCCEEDED(rc))
             {
-                /*
-                 * Find the adapter instance, get the config interface and update
-                 * the link state.
-                 */
-                NetworkAdapterType_T adapterType;
-                rc = aNetworkAdapter->COMGETTER(AdapterType)(&adapterType);
+                ULONG ulInstance;
+                rc = aNetworkAdapter->COMGETTER(Slot)(&ulInstance);
                 AssertComRC(rc);
-                const char *pszAdapterName = networkAdapterTypeToName(adapterType);
+                if (SUCCEEDED(rc))
+                {
+                    /*
+                     * Find the adapter instance, get the config interface and update
+                     * the link state.
+                     */
+                    NetworkAdapterType_T adapterType;
+                    rc = aNetworkAdapter->COMGETTER(AdapterType)(&adapterType);
+                    AssertComRC(rc);
+                    const char *pszAdapterName = networkAdapterTypeToName(adapterType);
 
-                // prevent cross-thread deadlocks, don't need the lock any more
-                alock.release();
+                    // prevent cross-thread deadlocks, don't need the lock any more
+                    alock.release();
 
-                PPDMIBASE pBase;
-                int vrc = PDMR3QueryDeviceLun(ptrVM.rawUVM(), pszAdapterName, ulInstance, 0, &pBase);
-                if (RT_SUCCESS(vrc))
-                {
-                    Assert(pBase);
-                    PPDMINETWORKCONFIG pINetCfg;
-                    pINetCfg = PDMIBASE_QUERY_INTERFACE(pBase, PDMINETWORKCONFIG);
-                    if (pINetCfg)
-                    {
-                        Log(("Console::onNetworkAdapterChange: setting link state to %d\n",
-                              fCableConnected));
-                        vrc = pINetCfg->pfnSetLinkState(pINetCfg,
-                                                        fCableConnected ? PDMNETWORKLINKSTATE_UP
-                                                                        : PDMNETWORKLINKSTATE_DOWN);
-                        ComAssertRC(vrc);
-                    }
-                    if (RT_SUCCESS(vrc) && changeAdapter)
+                    PPDMIBASE pBase;
+                    int vrc = PDMR3QueryDeviceLun(ptrVM.rawUVM(), pszAdapterName, ulInstance, 0, &pBase);
+                    if (RT_SUCCESS(vrc))
                     {
-                        VMSTATE enmVMState = VMR3GetStateU(ptrVM.rawUVM());
-                        if (    enmVMState == VMSTATE_RUNNING    /** @todo LiveMigration: Forbid or deal
-                                                                     correctly with the _LS variants */
-                            ||  enmVMState == VMSTATE_SUSPENDED)
+                        Assert(pBase);
+                        PPDMINETWORKCONFIG pINetCfg;
+                        pINetCfg = PDMIBASE_QUERY_INTERFACE(pBase, PDMINETWORKCONFIG);
+                        if (pINetCfg)
                         {
-                            if (fTraceEnabled && fCableConnected && pINetCfg)
-                            {
-                                vrc = pINetCfg->pfnSetLinkState(pINetCfg, PDMNETWORKLINKSTATE_DOWN);
-                                ComAssertRC(vrc);
-                            }
-
-                            rc = i_doNetworkAdapterChange(ptrVM.rawUVM(), pszAdapterName, ulInstance, 0, aNetworkAdapter);
-
-                            if (fTraceEnabled && fCableConnected && pINetCfg)
+                            Log(("Console::onNetworkAdapterChange: setting link state to %d\n",
+                                  fCableConnected));
+                            vrc = pINetCfg->pfnSetLinkState(pINetCfg,
+                                                            fCableConnected ? PDMNETWORKLINKSTATE_UP
+                                                                            : PDMNETWORKLINKSTATE_DOWN);
+                            ComAssertRC(vrc);
+                        }
+                        if (RT_SUCCESS(vrc) && changeAdapter)
+                        {
+                            VMSTATE enmVMState = VMR3GetStateU(ptrVM.rawUVM());
+                            if (    enmVMState == VMSTATE_RUNNING    /** @todo LiveMigration: Forbid or deal
+                                                                         correctly with the _LS variants */
+                                ||  enmVMState == VMSTATE_SUSPENDED)
                             {
-                                vrc = pINetCfg->pfnSetLinkState(pINetCfg, PDMNETWORKLINKSTATE_UP);
-                                ComAssertRC(vrc);
+                                if (fTraceEnabled && fCableConnected && pINetCfg)
+                                {
+                                    vrc = pINetCfg->pfnSetLinkState(pINetCfg, PDMNETWORKLINKSTATE_DOWN);
+                                    ComAssertRC(vrc);
+                                }
+
+                                rc = i_doNetworkAdapterChange(ptrVM.rawUVM(), pszAdapterName, ulInstance, 0, aNetworkAdapter);
+
+                                if (fTraceEnabled && fCableConnected && pINetCfg)
+                                {
+                                    vrc = pINetCfg->pfnSetLinkState(pINetCfg, PDMNETWORKLINKSTATE_UP);
+                                    ComAssertRC(vrc);
+                                }
                             }
                         }
                     }
-                }
-                else if (vrc == VERR_PDM_DEVICE_INSTANCE_NOT_FOUND)
-                    return setError(E_FAIL,
-                            tr("The network adapter #%u is not enabled"), ulInstance);
-                else
-                    ComAssertRC(vrc);
+                    else if (vrc == VERR_PDM_DEVICE_INSTANCE_NOT_FOUND)
+                        return setError(E_FAIL,
+                                tr("The network adapter #%u is not enabled"), ulInstance);
+                    else
+                        ComAssertRC(vrc);
 
-                if (RT_FAILURE(vrc))
-                    rc = E_FAIL;
+                    if (RT_FAILURE(vrc))
+                        rc = E_FAIL;
 
-                alock.acquire();
+                    alock.acquire();
+                }
             }
         }
         ptrVM.release();
@@ -5632,27 +5634,30 @@ HRESULT Console::i_onBandwidthGroupChange(IBandwidthGroup *aBandwidthGroup)
             )
         {
             /* No need to call in the EMT thread. */
-            LONG64 cMax;
             Bstr strName;
-            BandwidthGroupType_T enmType;
             rc = aBandwidthGroup->COMGETTER(Name)(strName.asOutParam());
             if (SUCCEEDED(rc))
-                rc = aBandwidthGroup->COMGETTER(MaxBytesPerSec)(&cMax);
-            if (SUCCEEDED(rc))
-                rc = aBandwidthGroup->COMGETTER(Type)(&enmType);
-
-            if (SUCCEEDED(rc))
             {
-                int vrc = VINF_SUCCESS;
-                if (enmType == BandwidthGroupType_Disk)
-                    vrc = PDMR3AsyncCompletionBwMgrSetMaxForFile(ptrVM.rawUVM(), Utf8Str(strName).c_str(), (uint32_t)cMax);
+                LONG64 cMax;
+                rc = aBandwidthGroup->COMGETTER(MaxBytesPerSec)(&cMax);
+                if (SUCCEEDED(rc))
+                {
+                    BandwidthGroupType_T enmType;
+                    rc = aBandwidthGroup->COMGETTER(Type)(&enmType);
+                    if (SUCCEEDED(rc))
+                    {
+                        int vrc = VINF_SUCCESS;
+                        if (enmType == BandwidthGroupType_Disk)
+                            vrc = PDMR3AsyncCompletionBwMgrSetMaxForFile(ptrVM.rawUVM(), Utf8Str(strName).c_str(), (uint32_t)cMax);
 #ifdef VBOX_WITH_NETSHAPER
-                else if (enmType == BandwidthGroupType_Network)
-                    vrc = PDMR3NsBwGroupSetLimit(ptrVM.rawUVM(), Utf8Str(strName).c_str(), cMax);
-                else
-                    rc = E_NOTIMPL;
-#endif /* VBOX_WITH_NETSHAPER */
-                AssertRC(vrc);
+                        else if (enmType == BandwidthGroupType_Network)
+                            vrc = PDMR3NsBwGroupSetLimit(ptrVM.rawUVM(), Utf8Str(strName).c_str(), cMax);
+                        else
+                            rc = E_NOTIMPL;
+#endif
+                        AssertRC(vrc);
+                    }
+                }
             }
         }
         else
@@ -6852,6 +6857,7 @@ HRESULT Console::i_onShowWindow(BOOL aCheck, BOOL *aCanShow, LONG64 *aWinId)
 HRESULT Console::i_addVMCaller(bool aQuiet /* = false */,
                                bool aAllowNullVM /* = false */)
 {
+    RT_NOREF(aAllowNullVM);
     AutoCaller autoCaller(this);
     /** @todo Fix race during console/VM reference destruction, refer @bugref{6318}
      *        comment 25. */
@@ -8792,6 +8798,7 @@ Console::i_usbAttachCallback(Console *that, PUVM pUVM, IUSBDevice *aHostDevice,
                              const char *aAddress, void *pvRemoteBackend, USHORT aPortVersion, ULONG aMaskedIfs,
                              const char *pszCaptureFilename)
 {
+    RT_NOREF(aHostDevice);
     LogFlowFuncEnter();
     LogFlowFunc(("that={%p} aUuid={%RTuuid}\n", that, aUuid));
 
@@ -9214,6 +9221,7 @@ DECLCALLBACK(int) Console::i_stateProgressCallback(PUVM pUVM, unsigned uPercent,
 Console::i_genericVMSetErrorCallback(PUVM pUVM, void *pvUser, int rc, RT_SRC_POS_DECL,
                                      const char *pszErrorFmt, va_list va)
 {
+    RT_SRC_POS_NOREF();
     Utf8Str *pErrorText = (Utf8Str *)pvUser;
     AssertPtr(pErrorText);
 
@@ -9275,6 +9283,7 @@ Console::i_atVMRuntimeErrorCallback(PUVM pUVM, void *pvUser, uint32_t fFlags,
  */
 HRESULT Console::i_captureUSBDevices(PUVM pUVM)
 {
+    RT_NOREF(pUVM);
     LogFlowThisFunc(("\n"));
 
     /* sanity check */
@@ -9504,25 +9513,21 @@ static void faultToleranceProgressCancelCallback(void *pvUser)
 }
 
 /**
- * Thread function which starts the VM (also from saved state) and
- * track progress.
+ * Worker called by VMPowerUpTask::handler to start the VM (also from saved
+ * state) and track progress.
  *
- * @param   Thread      The thread id.
- * @param   pvUser      Pointer to a VMPowerUpTask structure.
- * @return  VINF_SUCCESS (ignored).
+ * @param   pTask       The power up task.
  *
  * @note Locks the Console object for writing.
  */
 /*static*/
-DECLCALLBACK(int) Console::i_powerUpThread(RTTHREAD Thread, void *pvUser)
+void Console::i_powerUpThreadTask(VMPowerUpTask *pTask)
 {
     LogFlowFuncEnter();
 
-    VMPowerUpTask* task = static_cast<VMPowerUpTask *>(pvUser);
-    AssertReturn(task, VERR_INVALID_PARAMETER);
-
-    AssertReturn(!task->mConsole.isNull(), VERR_INVALID_PARAMETER);
-    AssertReturn(!task->mProgress.isNull(), VERR_INVALID_PARAMETER);
+    AssertReturnVoid(pTask);
+    AssertReturnVoid(!pTask->mConsole.isNull());
+    AssertReturnVoid(!pTask->mProgress.isNull());
 
     VirtualBoxBase::initializeComForThread();
 
@@ -9535,7 +9540,7 @@ DECLCALLBACK(int) Console::i_powerUpThread(RTTHREAD Thread, void *pvUser)
     RTStrPrintf(saBuildID, sizeof(saBuildID), "%s%s%s%s VirtualBox %s r%u %s%s%s%s",
                 "BU", "IL", "DI", "D", RTBldCfgVersion(), RTBldCfgRevision(), "BU", "IL", "DI", "D");
 
-    ComObjPtr<Console> pConsole = task->mConsole;
+    ComObjPtr<Console> pConsole = pTask->mConsole;
 
     /* Note: no need to use AutoCaller because VMPowerUpTask does that */
 
@@ -9554,20 +9559,20 @@ DECLCALLBACK(int) Console::i_powerUpThread(RTTHREAD Thread, void *pvUser)
         if (!pConsole->m_pVMMDev)
         {
             pConsole->m_pVMMDev = new VMMDev(pConsole);
-            AssertReturn(pConsole->m_pVMMDev, E_FAIL);
+            AssertReturnVoid(pConsole->m_pVMMDev);
         }
 
         /* wait for auto reset ops to complete so that we can successfully lock
          * the attached hard disks by calling LockMedia() below */
         for (VMPowerUpTask::ProgressList::const_iterator
-             it = task->hardDiskProgresses.begin();
-             it != task->hardDiskProgresses.end(); ++it)
+             it = pTask->hardDiskProgresses.begin();
+             it != pTask->hardDiskProgresses.end(); ++it)
         {
             HRESULT rc2 = (*it)->WaitForCompletion(-1);
             AssertComRC(rc2);
 
-            rc = task->mProgress->SetNextOperation(BstrFmt(tr("Disk Image Reset Operation - Immutable Image")).raw(), 1);
-            AssertComRCReturnRC(rc);
+            rc = pTask->mProgress->SetNextOperation(BstrFmt(tr("Disk Image Reset Operation - Immutable Image")).raw(), 1);
+            AssertComRCReturnVoid(rc);
         }
 
         /*
@@ -9578,8 +9583,8 @@ DECLCALLBACK(int) Console::i_powerUpThread(RTTHREAD Thread, void *pvUser)
          * Note! The media will be unlocked automatically by
          *       SessionMachine::i_setMachineState() when the VM is powered down.
          */
-        if (    !task->mTeleporterEnabled
-            &&  task->mEnmFaultToleranceState != FaultToleranceState_Standby)
+        if (    !pTask->mTeleporterEnabled
+            &&  pTask->mEnmFaultToleranceState != FaultToleranceState_Standby)
         {
             rc = pConsole->mControl->LockMedia();
             if (FAILED(rc)) throw rc;
@@ -9622,8 +9627,8 @@ DECLCALLBACK(int) Console::i_powerUpThread(RTTHREAD Thread, void *pvUser)
         vrc = VMR3Create(cCpus,
                          pConsole->mpVmm2UserMethods,
                          Console::i_genericVMSetErrorCallback,
-                         &task->mErrorMsg,
-                         task->mConfigConstructor,
+                         &pTask->mErrorMsg,
+                         pTask->mConfigConstructor,
                          static_cast<Console *>(pConsole),
                          &pVM, NULL);
 
@@ -9667,8 +9672,8 @@ DECLCALLBACK(int) Console::i_powerUpThread(RTTHREAD Thread, void *pvUser)
                      * Not sure, so release the lock just in case. */
                     alock.release();
 
-                    for (SharedFolderDataMap::const_iterator it = task->mSharedFolders.begin();
-                         it != task->mSharedFolders.end();
+                    for (SharedFolderDataMap::const_iterator it = pTask->mSharedFolders.begin();
+                         it != pTask->mSharedFolders.end();
                          ++it)
                     {
                         const SharedFolderData &d = it->second;
@@ -9698,22 +9703,24 @@ DECLCALLBACK(int) Console::i_powerUpThread(RTTHREAD Thread, void *pvUser)
                  */
                 rc = pConsole->i_captureUSBDevices(pConsole->mpUVM);
                 if (FAILED(rc))
+                {
+                    alock.acquire();
                     break;
+                }
 
                 /* Load saved state? */
-                if (task->mSavedStateFile.length())
+                if (pTask->mSavedStateFile.length())
                 {
-                    LogFlowFunc(("Restoring saved state from '%s'...\n",
-                                 task->mSavedStateFile.c_str()));
+                    LogFlowFunc(("Restoring saved state from '%s'...\n", pTask->mSavedStateFile.c_str()));
 
                     vrc = VMR3LoadFromFile(pConsole->mpUVM,
-                                           task->mSavedStateFile.c_str(),
+                                           pTask->mSavedStateFile.c_str(),
                                            Console::i_stateProgressCallback,
-                                           static_cast<IProgress *>(task->mProgress));
+                                           static_cast<IProgress *>(pTask->mProgress));
 
                     if (RT_SUCCESS(vrc))
                     {
-                        if (task->mStartPaused)
+                        if (pTask->mStartPaused)
                             /* done */
                             pConsole->i_setMachineState(MachineState_Paused);
                         else
@@ -9737,12 +9744,12 @@ DECLCALLBACK(int) Console::i_powerUpThread(RTTHREAD Thread, void *pvUser)
 #endif
                     }
                 }
-                else if (task->mTeleporterEnabled)
+                else if (pTask->mTeleporterEnabled)
                 {
                     /* -> ConsoleImplTeleporter.cpp */
                     bool fPowerOffOnFailure;
-                    rc = pConsole->i_teleporterTrg(pConsole->mpUVM, pMachine, &task->mErrorMsg, task->mStartPaused,
-                                                   task->mProgress, &fPowerOffOnFailure);
+                    rc = pConsole->i_teleporterTrg(pConsole->mpUVM, pMachine, &pTask->mErrorMsg, pTask->mStartPaused,
+                                                   pTask->mProgress, &fPowerOffOnFailure);
                     if (FAILED(rc) && fPowerOffOnFailure)
                     {
                         ErrorInfoKeeper eik;
@@ -9752,52 +9759,61 @@ DECLCALLBACK(int) Console::i_powerUpThread(RTTHREAD Thread, void *pvUser)
 #endif
                     }
                 }
-                else if (task->mEnmFaultToleranceState != FaultToleranceState_Inactive)
+                else if (pTask->mEnmFaultToleranceState != FaultToleranceState_Inactive)
                 {
                     /*
                      * Get the config.
                      */
                     ULONG uPort;
-                    ULONG uInterval;
-                    Bstr bstrAddress, bstrPassword;
-
                     rc = pMachine->COMGETTER(FaultTolerancePort)(&uPort);
                     if (SUCCEEDED(rc))
                     {
+                        ULONG uInterval;
                         rc = pMachine->COMGETTER(FaultToleranceSyncInterval)(&uInterval);
                         if (SUCCEEDED(rc))
-                            rc = pMachine->COMGETTER(FaultToleranceAddress)(bstrAddress.asOutParam());
-                        if (SUCCEEDED(rc))
-                            rc = pMachine->COMGETTER(FaultTolerancePassword)(bstrPassword.asOutParam());
-                    }
-                    if (task->mProgress->i_setCancelCallback(faultToleranceProgressCancelCallback, pConsole->mpUVM))
-                    {
-                        if (SUCCEEDED(rc))
                         {
-                            Utf8Str strAddress(bstrAddress);
-                            const char *pszAddress = strAddress.isEmpty() ? NULL : strAddress.c_str();
-                            Utf8Str strPassword(bstrPassword);
-                            const char *pszPassword = strPassword.isEmpty() ? NULL : strPassword.c_str();
-
-                            /* Power on the FT enabled VM. */
+                            Bstr bstrAddress;
+                            rc = pMachine->COMGETTER(FaultToleranceAddress)(bstrAddress.asOutParam());
+                            if (SUCCEEDED(rc))
+                            {
+                                Bstr bstrPassword;
+                                rc = pMachine->COMGETTER(FaultTolerancePassword)(bstrPassword.asOutParam());
+                                if (SUCCEEDED(rc))
+                                {
+                                    if (pTask->mProgress->i_setCancelCallback(faultToleranceProgressCancelCallback,
+                                                                              pConsole->mpUVM))
+                                    {
+                                        if (SUCCEEDED(rc))
+                                        {
+                                            Utf8Str strAddress(bstrAddress);
+                                            const char *pszAddress = strAddress.isEmpty() ? NULL : strAddress.c_str();
+                                            Utf8Str strPassword(bstrPassword);
+                                            const char *pszPassword = strPassword.isEmpty() ? NULL : strPassword.c_str();
+
+                                            /* Power on the FT enabled VM. */
 #ifdef VBOX_WITH_EXTPACK
-                            vrc = pConsole->mptrExtPackManager->i_callAllVmPowerOnHooks(pConsole, pVM);
+                                            vrc = pConsole->mptrExtPackManager->i_callAllVmPowerOnHooks(pConsole, pVM);
 #endif
-                            if (RT_SUCCESS(vrc))
-                                vrc = FTMR3PowerOn(pConsole->mpUVM,
-                                                   task->mEnmFaultToleranceState == FaultToleranceState_Master /* fMaster */,
-                                                   uInterval,
-                                                   pszAddress,
-                                                   uPort,
-                                                   pszPassword);
-                            AssertLogRelRC(vrc);
+                                            if (RT_SUCCESS(vrc))
+                                                vrc = FTMR3PowerOn(pConsole->mpUVM,
+                                                                   pTask->mEnmFaultToleranceState == FaultToleranceState_Master /* fMaster */,
+                                                                   uInterval,
+                                                                   pszAddress,
+                                                                   uPort,
+                                                                   pszPassword);
+                                            AssertLogRelRC(vrc);
+                                        }
+                                        pTask->mProgress->i_setCancelCallback(NULL, NULL);
+                                    }
+                                    else
+                                        rc = E_FAIL;
+
+                                }
+                            }
                         }
-                        task->mProgress->i_setCancelCallback(NULL, NULL);
                     }
-                    else
-                        rc = E_FAIL;
                 }
-                else if (task->mStartPaused)
+                else if (pTask->mStartPaused)
                     /* done */
                     pConsole->i_setMachineState(MachineState_Paused);
                 else
@@ -9837,7 +9853,7 @@ DECLCALLBACK(int) Console::i_powerUpThread(RTTHREAD Thread, void *pvUser)
                  * be sticky but our error callback isn't.
                  */
                 alock.release();
-                VMR3AtErrorDeregister(pConsole->mpUVM, Console::i_genericVMSetErrorCallback, &task->mErrorMsg);
+                VMR3AtErrorDeregister(pConsole->mpUVM, Console::i_genericVMSetErrorCallback, &pTask->mErrorMsg);
                 /** @todo register another VMSetError callback? */
                 alock.acquire();
             }
@@ -9854,11 +9870,11 @@ DECLCALLBACK(int) Console::i_powerUpThread(RTTHREAD Thread, void *pvUser)
         if (SUCCEEDED(rc) && RT_FAILURE(vrc))
         {
             /* If VMR3Create() or one of the other calls in this function fail,
-             * an appropriate error message has been set in task->mErrorMsg.
+             * an appropriate error message has been set in pTask->mErrorMsg.
              * However since that happens via a callback, the rc status code in
              * this function is not updated.
              */
-            if (!task->mErrorMsg.length())
+            if (!pTask->mErrorMsg.length())
             {
                 /* If the error message is not set but we've got a failure,
                  * convert the VBox status code into a meaningful error message.
@@ -9866,12 +9882,12 @@ DECLCALLBACK(int) Console::i_powerUpThread(RTTHREAD Thread, void *pvUser)
                  * appropriate error message themselves.
                  */
                 AssertMsgFailed(("Missing error message during powerup for status code %Rrc\n", vrc));
-                task->mErrorMsg = Utf8StrFmt(tr("Failed to start VM execution (%Rrc)"), vrc);
+                pTask->mErrorMsg = Utf8StrFmt(tr("Failed to start VM execution (%Rrc)"), vrc);
             }
 
             /* Set the error message as the COM error.
              * Progress::notifyComplete() will pick it up later. */
-            throw i_setErrorStatic(E_FAIL, task->mErrorMsg.c_str());
+            throw i_setErrorStatic(E_FAIL, pTask->mErrorMsg.c_str());
         }
     }
     catch (HRESULT aRC) { rc = aRC; }
@@ -9909,12 +9925,12 @@ DECLCALLBACK(int) Console::i_powerUpThread(RTTHREAD Thread, void *pvUser)
     if (SUCCEEDED(rc))
     {
         /* Notify the progress object of the success */
-        task->mProgress->i_notifyComplete(S_OK);
+        pTask->mProgress->i_notifyComplete(S_OK);
     }
     else
     {
         /* The progress object will fetch the current error info */
-        task->mProgress->i_notifyComplete(rc);
+        pTask->mProgress->i_notifyComplete(rc);
         LogRel(("Power up failed (vrc=%Rrc, rc=%Rhrc (%#08X))\n", vrc, rc, rc));
     }
 
@@ -9927,8 +9943,6 @@ DECLCALLBACK(int) Console::i_powerUpThread(RTTHREAD Thread, void *pvUser)
 #endif
 
     LogFlowFuncLeave();
-
-    return VINF_SUCCESS;
 }
 
 
@@ -10010,27 +10024,21 @@ DECLCALLBACK(int) Console::i_reconfigureMediumAttachment(Console *pThis,
 /**
  * Thread for powering down the Console.
  *
- * @param   Thread      The thread handle.
- * @param   pvUser      Pointer to the VMTask structure.
- * @return  VINF_SUCCESS (ignored).
+ * @param   pTask       The power down task.
  *
  * @note Locks the Console object for writing.
  */
 /*static*/
-DECLCALLBACK(int) Console::i_powerDownThread(RTTHREAD Thread, void *pvUser)
+void Console::i_powerDownThreadTask(VMPowerDownTask *pTask)
 {
+    int rc = VINF_SUCCESS; /* only used in assertion */
     LogFlowFuncEnter();
-
-    int rc = VINF_SUCCESS;
-    //we get pvUser pointer from another thread (see Console::powerDown) where one was allocated.
-    //and here we are in charge of correct deletion this pointer.
-    VMPowerDownTask* task = static_cast<VMPowerDownTask *>(pvUser);
     try
     {
-        if (task->isOk() == false)
+        if (pTask->isOk() == false)
             rc = VERR_GENERAL_FAILURE;
 
-        const ComObjPtr<Console> &that = task->mConsole;
+        const ComObjPtr<Console> &that = pTask->mConsole;
 
         /* Note: no need to use AutoCaller to protect Console because VMTask does
          * that */
@@ -10039,23 +10047,23 @@ DECLCALLBACK(int) Console::i_powerDownThread(RTTHREAD Thread, void *pvUser)
         AutoWriteLock thatLock(that COMMA_LOCKVAL_SRC_POS);
 
         /* release VM caller to avoid the powerDown() deadlock */
-        task->releaseVMCaller();
+        pTask->releaseVMCaller();
 
         thatLock.release();
 
-        that->i_powerDown(task->mServerProgress);
+        that->i_powerDown(pTask->mServerProgress);
 
         /* complete the operation */
         that->mControl->EndPoweringDown(S_OK, Bstr().raw());
 
     }
-    catch(const std::exception &e)
+    catch (const std::exception &e)
     {
-        AssertMsgFailed(("Exception %s was cought, rc=%Rrc\n", e.what(), rc));
+        AssertMsgFailed(("Exception %s was caught, rc=%Rrc\n", e.what(), rc));
+        NOREF(e); NOREF(rc);
     }
 
     LogFlowFuncLeave();
-    return rc;
 }
 
 /**
@@ -10370,6 +10378,7 @@ DECLCALLBACK(void) Console::i_drvStatus_Destruct(PPDMDRVINS pDrvIns)
  */
 DECLCALLBACK(int) Console::i_drvStatus_Construct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
     PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
     PDRVMAINSTATUS pThis = PDMINS_2_DATA(pDrvIns, PDRVMAINSTATUS);
     LogFlowFunc(("iInstance=%d\n", pDrvIns->iInstance));
diff --git a/src/VBox/Main/src-client/ConsoleImpl2.cpp b/src/VBox/Main/src-client/ConsoleImpl2.cpp
index e625310..7ad2129 100644
--- a/src/VBox/Main/src-client/ConsoleImpl2.cpp
+++ b/src/VBox/Main/src-client/ConsoleImpl2.cpp
@@ -112,7 +112,7 @@
 #  include <net80211/ieee80211_ioctl.h>
 # endif
 # if defined(RT_OS_WINDOWS)
-#  include <Ntddndis.h>
+#  include <iprt/win/ntddndis.h>
 #  include <devguid.h>
 # else
 #  include <HostNetworkInterfaceImpl.h>
@@ -260,7 +260,9 @@ static int getSmcDeviceKey(IVirtualBox *pVirtualBox, IMachine *pMachine, Utf8Str
  * As a temporary measure, we'll drop global optimizations.
  */
 #if defined(_MSC_VER) && defined(RT_ARCH_AMD64)
-# pragma optimize("g", off)
+# if _MSC_VER >= RT_MSC_VER_VC80 && _MSC_VER < RT_MSC_VER_VC100
+#  pragma optimize("g", off)
+# endif
 #endif
 
 static const char *const g_apszIDEDrives[4] =
@@ -457,6 +459,7 @@ static LONG GetNextUsedPort(LONG aPortUsed[30], LONG lBaseVal, uint32_t u32Size)
 static int SetBiosDiskInfo(ComPtr<IMachine> pMachine, PCFGMNODE pCfg, PCFGMNODE pBiosCfg,
                            Bstr controllerName, const char * const s_apszBiosConfig[4])
 {
+    RT_NOREF(pCfg);
     HRESULT             hrc;
 #define MAX_DEVICES     30
 #define H()     AssertLogRelMsgReturn(!FAILED(hrc), ("hrc=%Rhrc\n", hrc), VERR_MAIN_CONFIG_CONSTRUCTOR_COM_ERROR)
@@ -524,6 +527,9 @@ static int SetBiosDiskInfo(ComPtr<IMachine> pMachine, PCFGMNODE pCfg, PCFGMNODE
 #ifdef VBOX_WITH_PCI_PASSTHROUGH
 HRESULT Console::i_attachRawPCIDevices(PUVM pUVM, BusAssignmentManager *pBusMgr, PCFGMNODE pDevices)
 {
+# ifndef VBOX_WITH_EXTPACK
+    RT_NOREF(pUVM);
+# endif
     HRESULT hrc = S_OK;
     PCFGMNODE pInst, pCfg, pLunL0, pLunL1;
 
@@ -605,7 +611,7 @@ HRESULT Console::i_attachRawPCIDevices(PUVM pUVM, BusAssignmentManager *pBusMgr,
          * Currently, using IOMMU needed for PCI passthrough
          * requires RAM preallocation.
          */
-        /** @todo: check if we can lift this requirement */
+        /** @todo check if we can lift this requirement */
         CFGMR3RemoveValue(pRoot, "RamPreAlloc");
         InsertConfigInteger(pRoot, "RamPreAlloc", 1);
     }
@@ -748,6 +754,7 @@ DECLCALLBACK(int) Console::i_configConstructor(PUVM pUVM, PVM pVM, void *pvConso
  */
 int Console::i_configConstructorInner(PUVM pUVM, PVM pVM, AutoWriteLock *pAlock)
 {
+    RT_NOREF(pVM /* when everything is disabled */);
     VMMDev         *pVMMDev   = m_pVMMDev; Assert(pVMMDev);
     ComPtr<IMachine> pMachine = i_machine();
 
@@ -1527,7 +1534,7 @@ int Console::i_configConstructorInner(PUVM pUVM, PVM pVM, AutoWriteLock *pAlock)
          * Low Pin Count (LPC) bus
          */
         BOOL fLpcEnabled;
-        /** @todo: implement appropriate getter */
+        /** @todo implement appropriate getter */
         fLpcEnabled = fOsXGuest || (chipsetType == ChipsetType_ICH9);
         if (fLpcEnabled)
         {
@@ -1882,8 +1889,8 @@ int Console::i_configConstructorInner(PUVM pUVM, PVM pVM, AutoWriteLock *pAlock)
                      * necessary evil to patch over legacy compatability issues
                      * introduced by the new distribution model.
                      */
-                    static const char *s_pszUsbExtPackName = "Oracle VM VirtualBox Extension Pack";
 # ifdef VBOX_WITH_EXTPACK
+                    static const char *s_pszUsbExtPackName = "Oracle VM VirtualBox Extension Pack";
                     if (mptrExtPackManager->i_isExtPackUsable(s_pszUsbExtPackName))
 # endif
                     {
@@ -1930,8 +1937,8 @@ int Console::i_configConstructorInner(PUVM pUVM, PVM pVM, AutoWriteLock *pAlock)
                      * necessary evil to patch over legacy compatability issues
                      * introduced by the new distribution model.
                      */
-                    static const char *s_pszUsbExtPackName = "Oracle VM VirtualBox Extension Pack";
 # ifdef VBOX_WITH_EXTPACK
+                    static const char *s_pszUsbExtPackName = "Oracle VM VirtualBox Extension Pack";
                     if (mptrExtPackManager->i_isExtPackUsable(s_pszUsbExtPackName))
 # endif
                     {
@@ -2499,7 +2506,8 @@ int Console::i_configConstructorInner(PUVM pUVM, PVM pVM, AutoWriteLock *pAlock)
             llBootNics.push_back(nic);
 
             /*
-             * The virtual hardware type. PCNet supports two types.
+             * The virtual hardware type. PCNet supports two types, E1000 three,
+             * but VirtIO only one.
              */
             switch (adapterType)
             {
@@ -2518,6 +2526,9 @@ int Console::i_configConstructorInner(PUVM pUVM, PVM pVM, AutoWriteLock *pAlock)
                 case NetworkAdapterType_I82545EM:
                     InsertConfigInteger(pCfg, "AdapterType", 2);
                     break;
+                case NetworkAdapterType_Virtio:
+                    break;
+                case NetworkAdapterType_Null: AssertFailedBreak(); /* Shut up MSC */
             }
 
             /*
@@ -2786,6 +2797,7 @@ int Console::i_configConstructorInner(PUVM pUVM, PVM pVM, AutoWriteLock *pAlock)
                         case AudioCodecType_AD1980:
                             InsertConfigString(pCfg,   "Codec", "AD1980");
                             break;
+                        default: AssertFailedBreak();
                     }
                     break;
                 }
@@ -2876,21 +2888,21 @@ int Console::i_configConstructorInner(PUVM pUVM, PVM pVM, AutoWriteLock *pAlock)
                     break;
                 }
 #endif
-#ifdef VBOX_WITH_OSS
+#ifdef VBOX_WITH_AUDIO_OSS
                 case AudioDriverType_OSS:
                 {
                     InsertConfigString(pLunL1, "Driver", "OSSAudio");
                     break;
                 }
 #endif
-#ifdef VBOX_WITH_ALSA
+#ifdef VBOX_WITH_AUDIO_ALSA
                 case AudioDriverType_ALSA:
                 {
                     InsertConfigString(pLunL1, "Driver", "ALSAAudio");
                     break;
                 }
 #endif
-#ifdef VBOX_WITH_PULSE
+#ifdef VBOX_WITH_AUDIO_PULSE
                 case AudioDriverType_Pulse:
                 {
                     InsertConfigString(pLunL1, "Driver", "PulseAudio");
@@ -2904,6 +2916,7 @@ int Console::i_configConstructorInner(PUVM pUVM, PVM pVM, AutoWriteLock *pAlock)
                     break;
                 }
 #endif
+                default: AssertFailedBreak();
             }
 
 #ifdef VBOX_WITH_VRDE_AUDIO
@@ -2923,6 +2936,18 @@ int Console::i_configConstructorInner(PUVM pUVM, PVM pVM, AutoWriteLock *pAlock)
             InsertConfigInteger(pCfg, "Object", (uintptr_t)mAudioVRDE);
             InsertConfigInteger(pCfg, "ObjectVRDPServer", (uintptr_t)mConsoleVRDPServer);
 #endif
+
+#ifdef VBOX_WITH_AUDIO_DEBUG
+            InsertConfigNode(pInst, "LUN#2", &pLunL1);
+            InsertConfigString(pLunL1, "Driver", "AUDIO");
+
+            InsertConfigNode(pLunL1, "AttachedDriver", &pLunL1);
+            InsertConfigString(pLunL1, "Driver", "DebugAudio");
+
+            InsertConfigNode(pLunL1, "Config", &pCfg);
+            InsertConfigString(pCfg, "AudioDriver", "DebugAudio");
+            InsertConfigString(pCfg, "StreamName", bstr);
+#endif
             /** @todo Add audio video recording driver here. */
         }
 
@@ -3606,7 +3631,7 @@ int Console::i_configGraphicsController(PCFGMNODE pDevices,
             if (SUCCEEDED(hrc) && pFramebuffer)
             {
                 LONG64 winId = 0;
-                /* @todo deal with multimonitor setup */
+                /** @todo deal with multimonitor setup */
                 Assert(cMonitorCount == 1);
                 hrc = pFramebuffer->COMGETTER(WinId)(&winId);
                 InsertConfigInteger(pCfg, "HostWindowId", winId);
@@ -3823,7 +3848,7 @@ int Console::i_configMediumAttachment(const char *pcszDevice,
                 InsertConfigString(pCtlInst, "UUID", aszUuid);
                 mUSBStorageDevices.push_back(UsbMsd);
 
-                /** @todo: No LED after hotplugging. */
+                /** @todo No LED after hotplugging. */
                 /* Attach the status driver */
                 Assert(cLedUsb >= 8);
                 i_attachStatusDriver(pCtlInst, &mapStorageLeds[iLedUsb], 0, 7,
@@ -4349,20 +4374,19 @@ int Console::i_configMedium(PCFGMNODE pLunL0,
                 uImage--;
 
 # ifdef VBOX_WITH_EXTPACK
-                static const Utf8Str strExtPackPuel("Oracle VM VirtualBox Extension Pack");
-                static const char *s_pszVDPlugin = "VDPluginCrypt";
-                if (mptrExtPackManager->i_isExtPackUsable(strExtPackPuel.c_str()))
+                if (mptrExtPackManager->i_isExtPackUsable(ORACLE_PUEL_EXTPACK_NAME))
                 {
                     /* Configure loading the VDPlugin. */
+                    static const char s_szVDPlugin[] = "VDPluginCrypt";
                     PCFGMNODE pCfgPlugins = NULL;
                     PCFGMNODE pCfgPlugin = NULL;
                     Utf8Str strPlugin;
-                    hrc = mptrExtPackManager->i_getLibraryPathForExtPack(s_pszVDPlugin, &strExtPackPuel, &strPlugin);
+                    hrc = mptrExtPackManager->i_getLibraryPathForExtPack(s_szVDPlugin, ORACLE_PUEL_EXTPACK_NAME, &strPlugin);
                     // Don't fail, this is optional!
                     if (SUCCEEDED(hrc))
                     {
                         InsertConfigNode(pCfg, "Plugins", &pCfgPlugins);
-                        InsertConfigNode(pCfgPlugins, s_pszVDPlugin, &pCfgPlugin);
+                        InsertConfigNode(pCfgPlugins, s_szVDPlugin, &pCfgPlugin);
                         InsertConfigString(pCfgPlugin, "Path", strPlugin.c_str());
                     }
                 }
@@ -4614,6 +4638,7 @@ int Console::i_configNetwork(const char *pszDevice,
                              bool fAttachDetach,
                              bool fIgnoreConnectFailure)
 {
+    RT_NOREF(fIgnoreConnectFailure);
     AutoCaller autoCaller(this);
     AssertComRCReturn(autoCaller.rc(), VERR_ACCESS_DENIED);
 
@@ -5003,7 +5028,7 @@ int Console::i_configNetwork(const char *pszDevice,
                     LogRel(("NetworkAttachmentType_Bridged: VBoxNetCfgWinGetComponentByGuid failed, hrc (0x%x)\n", hrc));
                     H();
                 }
-#define VBOX_WIN_BINDNAME_PREFIX "\\DEVICE\\"
+# define VBOX_WIN_BINDNAME_PREFIX "\\DEVICE\\"
                 char szTrunkName[INTNET_MAX_TRUNK_NAME];
                 char *pszTrunkName = szTrunkName;
                 wchar_t * pswzBindName;
@@ -5126,16 +5151,16 @@ int Console::i_configNetwork(const char *pszDevice,
                 InsertConfigString(pCfg, "IfPolicyPromisc", pszPromiscuousGuestPolicy);
                 char szNetwork[INTNET_MAX_NETWORK_NAME];
 
-#if defined(RT_OS_SOLARIS) || defined(RT_OS_DARWIN)
+# if defined(RT_OS_SOLARIS) || defined(RT_OS_DARWIN)
                 /*
                  * 'pszTrunk' contains just the interface name required in ring-0, while 'pszBridgedIfName' contains
                  * interface name + optional description. We must not pass any description to the VM as it can differ
                  * for the same interface name, eg: "nge0 - ethernet" (GUI) vs "nge0" (VBoxManage).
                  */
                 RTStrPrintf(szNetwork, sizeof(szNetwork), "HostInterfaceNetworking-%s", pszTrunk);
-#else
+# else
                 RTStrPrintf(szNetwork, sizeof(szNetwork), "HostInterfaceNetworking-%s", pszBridgedIfName);
-#endif
+# endif
                 InsertConfigString(pCfg, "Network", szNetwork);
                 networkName = Bstr(szNetwork);
                 trunkName = Bstr(pszTrunk);
diff --git a/src/VBox/Main/src-client/ConsoleImplTeleporter.cpp b/src/VBox/Main/src-client/ConsoleImplTeleporter.cpp
index ca9a0a7..0e9c9d3 100644
--- a/src/VBox/Main/src-client/ConsoleImplTeleporter.cpp
+++ b/src/VBox/Main/src-client/ConsoleImplTeleporter.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -143,6 +143,7 @@ public:
         , mRc(VINF_SUCCESS)
         , mErrorText()
     {
+        RT_NOREF(fStartPaused); /** @todo figure out why fStartPaused isn't used */
     }
 };
 
@@ -308,6 +309,7 @@ HRESULT Console::i_teleporterSrcSubmitCommand(TeleporterStateSrc *pState, const
  */
 static DECLCALLBACK(int) teleporterTcpOpWrite(void *pvUser, uint64_t offStream, const void *pvBuf, size_t cbToWrite)
 {
+    RT_NOREF(offStream);
     TeleporterState *pState = (TeleporterState *)pvUser;
 
     AssertReturn(cbToWrite > 0, VINF_SUCCESS);
@@ -374,6 +376,7 @@ static int teleporterTcpReadSelect(TeleporterState *pState)
  */
 static DECLCALLBACK(int) teleporterTcpOpRead(void *pvUser, uint64_t offStream, void *pvBuf, size_t cbToRead, size_t *pcbRead)
 {
+    RT_NOREF(offStream);
     TeleporterState *pState = (TeleporterState *)pvUser;
     AssertReturn(!pState->mfIsSource, VERR_INVALID_HANDLE);
 
@@ -470,6 +473,7 @@ static DECLCALLBACK(int) teleporterTcpOpRead(void *pvUser, uint64_t offStream, v
  */
 static DECLCALLBACK(int) teleporterTcpOpSeek(void *pvUser, int64_t offSeek, unsigned uMethod, uint64_t *poffActual)
 {
+    RT_NOREF(pvUser, offSeek, uMethod, poffActual);
     return VERR_NOT_SUPPORTED;
 }
 
@@ -489,6 +493,7 @@ static DECLCALLBACK(uint64_t) teleporterTcpOpTell(void *pvUser)
  */
 static DECLCALLBACK(int) teleporterTcpOpSize(void *pvUser, uint64_t *pcb)
 {
+    RT_NOREF(pvUser, pcb);
     return VERR_NOT_SUPPORTED;
 }
 
@@ -612,6 +617,7 @@ static DECLCALLBACK(int) teleporterProgressCallback(PUVM pUVM, unsigned uPercent
  */
 static DECLCALLBACK(void) teleporterDstTimeout(RTTIMERLR hTimerLR, void *pvUser, uint64_t iTick)
 {
+    RT_NOREF(hTimerLR, iTick);
     /* This is harmless for any open connections. */
     RTTcpServerShutdown((PRTTCPSERVER)pvUser);
 }
@@ -753,12 +759,13 @@ HRESULT Console::i_teleporterSrc(TeleporterStateSrc *pState)
  * Static thread method wrapper.
  *
  * @returns VINF_SUCCESS (ignored).
- * @param   hThread             The thread.
+ * @param   hThreadSelf         The thread.
  * @param   pvUser              Pointer to a TeleporterStateSrc instance.
  */
 /*static*/ DECLCALLBACK(int)
-Console::i_teleporterSrcThreadWrapper(RTTHREAD hThread, void *pvUser)
+Console::i_teleporterSrcThreadWrapper(RTTHREAD hThreadSelf, void *pvUser)
 {
+    RT_NOREF(hThreadSelf);
     TeleporterStateSrc *pState = (TeleporterStateSrc *)pvUser;
 
     /*
@@ -1064,8 +1071,8 @@ HRESULT Console::i_teleporterTrg(PUVM pUVM, IMachine *pMachine, Utf8Str *pErrorM
     /*
      * Create the TCP server.
      */
-    int vrc;
-    PRTTCPSERVER hServer;
+    int vrc = VINF_SUCCESS; /* Shut up MSC */
+    PRTTCPSERVER hServer = NULL; /* ditto */
     if (uPort)
         vrc = RTTcpServerCreateEx(pszAddress, uPort, &hServer);
     else
diff --git a/src/VBox/Main/src-client/ConsoleVRDPServer.cpp b/src/VBox/Main/src-client/ConsoleVRDPServer.cpp
index 5f0766e..4892856 100644
--- a/src/VBox/Main/src-client/ConsoleVRDPServer.cpp
+++ b/src/VBox/Main/src-client/ConsoleVRDPServer.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -200,7 +200,7 @@ static void findTopLeftBorder(const uint8_t *pu8AndMask, const uint8_t *pu8XorMa
     /*
      * Find the top border of the AND mask. First assign to special value.
      */
-    uint32_t ySkipAnd = ~0;
+    uint32_t ySkipAnd = UINT32_MAX;
 
     const uint8_t *pu8And = pu8AndMask;
     const uint32_t cbAndRow = (width + 7) / 8;
@@ -241,7 +241,7 @@ static void findTopLeftBorder(const uint8_t *pu8AndMask, const uint8_t *pu8XorMa
     /*
      * Find the left border of the AND mask.
      */
-    uint32_t xSkipAnd = ~0;
+    uint32_t xSkipAnd = UINT32_MAX;
 
     /* For all bit columns. */
     for (x = 0; x < width && xSkipAnd == ~(uint32_t)0; x++)
@@ -267,7 +267,7 @@ static void findTopLeftBorder(const uint8_t *pu8AndMask, const uint8_t *pu8XorMa
     /*
      * Find the XOR mask top border.
      */
-    uint32_t ySkipXor = ~0;
+    uint32_t ySkipXor = UINT32_MAX;
 
     uint32_t *pu32XorStart = (uint32_t *)pu8XorMask;
 
@@ -788,7 +788,7 @@ DECLCALLBACK(int) ConsoleVRDPServer::VRDPCallbackQueryProperty(void *pvCallback,
                 || RTStrICmp(pFeature->achInfo, "Client/DisableClipboard") == 0
                )
             {
-                /* @todo these features should be per client. */
+                /** @todo these features should be per client. */
                 NOREF(pFeature->u32ClientId);
 
                 /* These features are mapped to "VRDE/Feature/NAME" extra data. */
@@ -1037,6 +1037,7 @@ DECLCALLBACK(int) ConsoleVRDPServer::VRDPCallbackIntercept(void *pvCallback, uin
 DECLCALLBACK(int) ConsoleVRDPServer::VRDPCallbackUSB(void *pvCallback, void *pvIntercept, uint32_t u32ClientId,
                                                      uint8_t u8Code, const void *pvRet, uint32_t cbRet)
 {
+    RT_NOREF(pvCallback);
 #ifdef VBOX_WITH_USB
     return USBClientResponseCallback(pvIntercept, u32ClientId, u8Code, pvRet, cbRet);
 #else
@@ -1048,6 +1049,7 @@ DECLCALLBACK(int) ConsoleVRDPServer::VRDPCallbackClipboard(void *pvCallback, voi
                                                            uint32_t u32Function, uint32_t u32Format,
                                                            const void *pvData, uint32_t cbData)
 {
+    RT_NOREF(pvCallback);
     return ClipboardCallback(pvIntercept, u32ClientId, u32Function, u32Format, pvData, cbData);
 }
 
@@ -1283,6 +1285,7 @@ DECLCALLBACK(void) ConsoleVRDPServer::VRDECallbackAudioIn(void *pvCallback,
                                                           const void *pvData,
                                                           uint32_t cbData)
 {
+    RT_NOREF(u32ClientId);
     ConsoleVRDPServer *pServer = static_cast<ConsoleVRDPServer*>(pvCallback);
     AssertPtrReturnVoid(pServer);
 
@@ -1838,7 +1841,7 @@ typedef struct H3DORInstance
     Assert(p);
     Assert(p->pThis);
 
-    /* @todo find out what to do if size changes to 0x0 from non zero */
+    /** @todo find out what to do if size changes to 0x0 from non zero */
     if (w == 0 || h == 0)
     {
         /* Do nothing. */
@@ -1888,7 +1891,7 @@ typedef struct H3DORInstance
     if (!p->hImageBitmap)
     {
         /* Create a new bitmap handle. */
-        uint32_t u32ScreenId = 0; /* @todo clip to corresponding screens.
+        uint32_t u32ScreenId = 0; /** @todo clip to corresponding screens.
                                    * Clipping can be done here or in VRDP server.
                                    * If VRDP does clipping, then uScreenId parameter
                                    * is not necessary and coords must be global.
@@ -2035,6 +2038,7 @@ typedef struct H3DORInstance
 /* static */ DECLCALLBACK(int) ConsoleVRDPServer::H3DORContextProperty(const void *pvContext, uint32_t index,
                                                                        void *pvBuffer, uint32_t cbBuffer, uint32_t *pcbOut)
 {
+    RT_NOREF(pvContext, pvBuffer);
     int rc = VINF_SUCCESS;
 
     H3DORLOG(("H3DORContextProperty: index %d\n", index));
@@ -2142,6 +2146,7 @@ void ConsoleVRDPServer::remote3DRedirect(bool fEnable)
                                                                      void *pvData,
                                                                      uint32_t cbData)
 {
+    RT_NOREF(hVideo);
     H3DORLOG(("H3DOR: VRDEImageCbNotify: pvContext %p, pvUser %p, hVideo %p, u32Id %u, pvData %p, cbData %d\n",
               pvContext, pvUser, hVideo, u32Id, pvData, cbData));
 
@@ -2165,7 +2170,7 @@ void ConsoleVRDPServer::remote3DRedirect(bool fEnable)
 
         if (u32StreamId != 0)
         {
-            p->fCreated = true; // @todo not needed?
+            p->fCreated = true; /// @todo not needed?
         }
         else
         {
@@ -2325,7 +2330,7 @@ void ConsoleVRDPServer::tsmfUnlock(void)
 
     if (RT_SUCCESS(rc))
     {
-        /* @todo contexts should be in a list for accounting. */
+        /** @todo contexts should be in a list for accounting. */
         *ppvChannel = pHostChCtx;
     }
     else
@@ -2456,6 +2461,7 @@ void ConsoleVRDPServer::tsmfUnlock(void)
                                                                          uint32_t cbData,
                                                                          uint32_t *pcbDataReturned)
 {
+    RT_NOREF(pvParm, cbParm, pvData, cbData);
     LogFlowFunc(("u32Code %u\n", u32Code));
 
     if (!pvChannel)
@@ -2529,7 +2535,7 @@ void ConsoleVRDPServer::setupTSMF(void)
     return;
 }
 
-/* @todo these defines must be in a header, which is used by guest component as well. */
+/** @todo these defines must be in a header, which is used by guest component as well. */
 #define VBOX_TSMF_HCH_CREATE_ACCEPTED (VBOX_HOST_CHANNEL_EVENT_USER + 0)
 #define VBOX_TSMF_HCH_CREATE_DECLINED (VBOX_HOST_CHANNEL_EVENT_USER + 1)
 #define VBOX_TSMF_HCH_DISCONNECTED    (VBOX_HOST_CHANNEL_EVENT_USER + 2)
@@ -2540,6 +2546,7 @@ void ConsoleVRDPServer::setupTSMF(void)
                                                                     const void *pvParm,
                                                                     uint32_t cbParm)
 {
+    RT_NOREF(cbParm);
     int rc = VINF_SUCCESS;
 
     ConsoleVRDPServer *pThis = static_cast<ConsoleVRDPServer*>(pvContext);
@@ -2867,7 +2874,7 @@ int ConsoleVRDPServer::VideoInControl(void *pvUser, const VRDEVIDEOINDEVICEHANDL
             }
             else if (pHeader->u16EventId == VRDEINPUT_EVENTID_DISMISS_HOVERING_CONTACT)
             {
-                /* @todo */
+                /** @todo */
             }
             else
             {
@@ -3311,6 +3318,7 @@ DECLCALLBACK(int) ConsoleVRDPServer::ClipboardServiceExtension(void *pvExtension
                                                                void *pvParms,
                                                                uint32_t cbParms)
 {
+    RT_NOREF(cbParms);
     LogFlowFunc(("pvExtension = %p, u32Function = %d, pvParms = %p, cbParms = %d\n",
                  pvExtension, u32Function, pvParms, cbParms));
 
@@ -3380,6 +3388,7 @@ DECLCALLBACK(int) ConsoleVRDPServer::ClipboardServiceExtension(void *pvExtension
 
 void ConsoleVRDPServer::ClipboardCreate(uint32_t u32ClientId)
 {
+    RT_NOREF(u32ClientId);
     int rc = lockConsoleVRDPServer();
 
     if (RT_SUCCESS(rc))
@@ -3400,6 +3409,7 @@ void ConsoleVRDPServer::ClipboardCreate(uint32_t u32ClientId)
 
 void ConsoleVRDPServer::ClipboardDelete(uint32_t u32ClientId)
 {
+    RT_NOREF(u32ClientId);
     int rc = lockConsoleVRDPServer();
 
     if (RT_SUCCESS(rc))
@@ -3762,6 +3772,7 @@ int ConsoleVRDPServer::SendAudioInputBegin(void **ppvUserCtx,
 
 void ConsoleVRDPServer::SendAudioInputEnd(void *pvUserCtx)
 {
+    RT_NOREF(pvUserCtx);
     if (mpEntryPoints && mhServer && mpEntryPoints->VRDEAudioInClose)
     {
         uint32_t u32ClientId = ASMAtomicReadU32(&mu32AudioInputClientId);
@@ -3927,7 +3938,7 @@ void VRDEServerInfo::uninit()
 #define IMPL_GETTER_BOOL(_aType, _aName, _aIndex)                         \
     HRESULT VRDEServerInfo::get##_aName(_aType *a##_aName)                \
     {                                                                     \
-        /* todo: Not sure if a AutoReadLock would be sufficient. */       \
+        /** @todo Not sure if a AutoReadLock would be sufficient. */       \
         AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);                  \
                                                                           \
         uint32_t value;                                                   \
@@ -3945,7 +3956,7 @@ void VRDEServerInfo::uninit()
 #define IMPL_GETTER_SCALAR(_aType, _aName, _aIndex, _aValueMask)          \
     HRESULT VRDEServerInfo::get##_aName(_aType *a##_aName)                \
     {                                                                     \
-        /* todo: Not sure if a AutoReadLock would be sufficient. */       \
+        /** @todo Not sure if a AutoReadLock would be sufficient. */       \
         AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);                  \
                                                                           \
         _aType value;                                                     \
@@ -3964,7 +3975,7 @@ void VRDEServerInfo::uninit()
 #define IMPL_GETTER_UTF8STR(_aType, _aName, _aIndex)                      \
     HRESULT VRDEServerInfo::get##_aName(_aType &a##_aName)                \
     {                                                                     \
-        /* todo: Not sure if a AutoReadLock would be sufficient. */       \
+        /** @todo Not sure if a AutoReadLock would be sufficient. */       \
         AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);                  \
                                                                           \
         uint32_t cbOut = 0;                                               \
diff --git a/src/VBox/Main/src-client/DisplayImpl.cpp b/src/VBox/Main/src-client/DisplayImpl.cpp
index dfa3ccc..2883aa7 100644
--- a/src/VBox/Main/src-client/DisplayImpl.cpp
+++ b/src/VBox/Main/src-client/DisplayImpl.cpp
@@ -273,8 +273,9 @@ typedef struct
 static DECLCALLBACK(void) displaySaveScreenshotReport(void *pvCtx, uint32_t uScreen,
                                                       uint32_t x, uint32_t y, uint32_t uBitsPerPixel,
                                                       uint32_t uBytesPerLine, uint32_t uGuestWidth, uint32_t uGuestHeight,
-                                                      uint8_t *pu8BufferAddress, uint64_t u64TimeStamp)
+                                                      uint8_t *pu8BufferAddress, uint64_t u64Timestamp)
 {
+    RT_NOREF(uScreen, x, y, uBitsPerPixel,uBytesPerLine, u64Timestamp);
     VBOX_DISPLAY_SAVESCREENSHOT_DATA *pData = (VBOX_DISPLAY_SAVESCREENSHOT_DATA*)pvCtx;
     displayMakeThumbnail(pu8BufferAddress, uGuestWidth, uGuestHeight, &pData->pu8Thumbnail,
                          &pData->cbThumbnail, &pData->cxThumbnail, &pData->cyThumbnail);
@@ -468,6 +469,7 @@ DECLCALLBACK(void) Display::i_displaySSMSaveScreenshot(PSSMHANDLE pSSM, void *pv
 DECLCALLBACK(int)
 Display::i_displaySSMLoadScreenshot(PSSMHANDLE pSSM, void *pvUser, uint32_t uVersion, uint32_t uPass)
 {
+    RT_NOREF(pvUser);
     if (uVersion != sSSMDisplayScreenshotVer)
         return VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION;
     Assert(uPass == SSM_PASS_FINAL); NOREF(uPass);
@@ -781,6 +783,7 @@ int Display::i_registerSSM(PUVM pUVM)
 
 DECLCALLBACK(void) Display::i_displayCrCmdFree(struct VBOXCRCMDCTL* pCmd, uint32_t cbCmd, int rc, void *pvCompletion)
 {
+    RT_NOREF(pCmd, cbCmd, rc);
     Assert(pvCompletion);
     RTMemFree(pvCompletion);
 }
@@ -837,6 +840,7 @@ int Display::i_crOglWindowsShow(bool fShow)
 
 int Display::i_notifyCroglResize(const PVBVAINFOVIEW pView, const PVBVAINFOSCREEN pScreen, void *pvVRAM)
 {
+    RT_NOREF(pView);
 #if defined(VBOX_WITH_HGCM) && defined(VBOX_WITH_CROGL)
     if (maFramebuffers[pScreen->u32ViewIndex].fRenderThreadMode)
         return VINF_SUCCESS; /* nop it */
@@ -877,7 +881,9 @@ int Display::i_notifyCroglResize(const PVBVAINFOVIEW pView, const PVBVAINFOSCREE
 
         return rc;
     }
-#endif /* #if defined(VBOX_WITH_HGCM) && defined(VBOX_WITH_CROGL) */
+#else /* !VBOX_WITH_HGCM || !VBOX_WITH_CROGL */
+    RT_NOREF(pScreen, pvVRAM);
+#endif
     return VINF_SUCCESS;
 }
 
@@ -935,7 +941,7 @@ int Display::i_handleDisplayResize(unsigned uScreenId, uint32_t bpp, void *pvVRA
 
     if (!maFramebuffers[uScreenId].pFramebuffer.isNull())
     {
-        HRESULT hr = maFramebuffers[uScreenId].pFramebuffer->NotifyChange(uScreenId, 0, 0, w, h); /* @todo origin */
+        HRESULT hr = maFramebuffers[uScreenId].pFramebuffer->NotifyChange(uScreenId, 0, 0, w, h); /** @todo origin */
         LogFunc(("NotifyChange hr %08X\n", hr));
         NOREF(hr);
     }
@@ -1393,9 +1399,11 @@ int Display::i_handleSetVisibleRegion(uint32_t cRect, PRTRECT pRect)
     return VINF_SUCCESS;
 }
 
-int Display::i_handleQueryVisibleRegion(uint32_t *pcRect, PRTRECT pRect)
+int Display::i_handleQueryVisibleRegion(uint32_t *pcRects, PRTRECT paRects)
 {
-    // @todo Currently not used by the guest and is not implemented in framebuffers. Remove?
+    /// @todo Currently not used by the guest and is not implemented in
+    /// framebuffers. Remove?
+    RT_NOREF(pcRects, paRects);
     return VERR_NOT_SUPPORTED;
 }
 
@@ -1525,7 +1533,7 @@ void Display::i_VideoAccelVRDP(bool fEnable)
 
         mfVideoAccelVRDP = true;
         /* Supporting all orders. */
-        mfu32SupportedOrders = ~0;
+        mfu32SupportedOrders = UINT32_MAX;
 
         i_vbvaSetMemoryFlags(pVideoAccel->pVbvaMemory, pVideoAccel->fVideoAccelEnabled, mfVideoAccelVRDP, mfu32SupportedOrders,
                              maFramebuffers, mcMonitors);
@@ -2577,7 +2585,7 @@ HRESULT Display::drawToScreen(ULONG aScreenId, BYTE *aAddress, ULONG aX, ULONG a
     else if (RT_FAILURE(rcVBox))
         rc = setError(VBOX_E_IPRT_ERROR,
                       tr("Could not draw to the screen (%Rrc)"), rcVBox);
-//@todo
+/// @todo
 //    else
 //    {
 //        /* All ok. Redraw the screen. */
@@ -3300,11 +3308,11 @@ int Display::i_handleVHWACommandProcess(PVBOXVHWACMD pCommand)
     HRESULT hr = pFramebuffer->ProcessVHWACommand((BYTE*)pCommand);
     if (hr == S_FALSE)
         return VINF_SUCCESS;
-    else if (SUCCEEDED(hr))
+    if (SUCCEEDED(hr))
         return VINF_CALLBACK_RETURN;
-    else if (hr == E_ACCESSDENIED)
+    if (hr == E_ACCESSDENIED)
         return VERR_INVALID_STATE; /* notify we can not handle request atm */
-    else if (hr == E_NOTIMPL)
+    if (hr == E_NOTIMPL)
         return VERR_NOT_IMPLEMENTED;
     return VERR_GENERAL_FAILURE;
 }
@@ -3320,12 +3328,14 @@ DECLCALLBACK(int) Display::i_displayVHWACommandProcess(PPDMIDISPLAYCONNECTOR pIn
 #ifdef VBOX_WITH_CRHGSMI
 void Display::i_handleCrHgsmiCommandCompletion(int32_t result, uint32_t u32Function, PVBOXHGCMSVCPARM pParam)
 {
+    RT_NOREF(u32Function);
     mpDrv->pVBVACallbacks->pfnCrHgsmiCommandCompleteAsync(mpDrv->pVBVACallbacks,
                                                           (PVBOXVDMACMD_CHROMIUM_CMD)pParam->u.pointer.addr, result);
 }
 
 void Display::i_handleCrHgsmiControlCompletion(int32_t result, uint32_t u32Function, PVBOXHGCMSVCPARM pParam)
 {
+    RT_NOREF(u32Function);
     PVBOXVDMACMD_CHROMIUM_CTL pCtl = (PVBOXVDMACMD_CHROMIUM_CTL)pParam->u.pointer.addr;
     mpDrv->pVBVACallbacks->pfnCrHgsmiControlCompleteAsync(mpDrv->pVBVACallbacks, pCtl, result);
 }
@@ -3445,6 +3455,7 @@ DECLCALLBACK(void) Display::i_displayCrHgsmiControlCompletion(int32_t result, ui
 DECLCALLBACK(void)  Display::i_displayCrHgcmCtlSubmitCompletion(int32_t result, uint32_t u32Function, PVBOXHGCMSVCPARM pParam,
                                                                 void *pvContext)
 {
+    RT_NOREF(u32Function);
     VBOXCRCMDCTL *pCmd = (VBOXCRCMDCTL*)pParam->u.pointer.addr;
     if (pCmd->u.pfnInternal)
         ((PFNCRCTLCOMPLETION)pCmd->u.pfnInternal)(pCmd, pParam->u.pointer.size, result, pvContext);
@@ -3554,24 +3565,29 @@ int Display::i_crCtlSubmitSyncIfHasDataForScreen(uint32_t u32ScreenID, struct VB
     return rc;
 }
 
-bool  Display::i_handleCrVRecScreenshotBegin(uint32_t uScreen, uint64_t u64TimeStamp)
+bool  Display::i_handleCrVRecScreenshotBegin(uint32_t uScreen, uint64_t u64Timestamp)
 {
+    /** @todo r=bird: u64Timestamp - using the 'u64' prefix add nothing.
+     *        However, using one of the prefixes indicating the timestamp unit
+     *        would be very valuable!  */
 # if VBOX_WITH_VPX
-    return VideoRecIsReady(mpVideoRecCtx, uScreen, u64TimeStamp);
+    return VideoRecIsReady(mpVideoRecCtx, uScreen, u64Timestamp);
 # else
+    RT_NOREF(uScreen, u64Timestamp);
     return false;
 # endif
 }
 
-void  Display::i_handleCrVRecScreenshotEnd(uint32_t uScreen, uint64_t u64TimeStamp)
+void  Display::i_handleCrVRecScreenshotEnd(uint32_t uScreen, uint64_t u64Timestamp)
 {
+    RT_NOREF(uScreen, u64Timestamp);
 }
 
 void  Display::i_handleCrVRecScreenshotPerform(uint32_t uScreen,
                                                uint32_t x, uint32_t y, uint32_t uPixelFormat,
                                                uint32_t uBitsPerPixel, uint32_t uBytesPerLine,
                                                uint32_t uGuestWidth, uint32_t uGuestHeight,
-                                               uint8_t *pu8BufferAddress, uint64_t u64TimeStamp)
+                                               uint8_t *pu8BufferAddress, uint64_t u64Timestamp)
 {
     Assert(mfCrOglVideoRecState == CRVREC_STATE_SUBMITTED);
 # if VBOX_WITH_VPX
@@ -3579,7 +3595,7 @@ void  Display::i_handleCrVRecScreenshotPerform(uint32_t uScreen,
                                   uPixelFormat,
                                   uBitsPerPixel, uBytesPerLine,
                                   uGuestWidth, uGuestHeight,
-                                  pu8BufferAddress, u64TimeStamp);
+                                  pu8BufferAddress, u64Timestamp);
     NOREF(rc);
     Assert(rc == VINF_SUCCESS /* || rc == VERR_TRY_AGAIN || rc == VINF_TRY_AGAIN*/);
 # endif
@@ -3661,10 +3677,12 @@ HRESULT Display::notifyScaleFactorChange(ULONG aScreenId, ULONG aScaleFactorWMul
 # endif
 
     return hr;
-#else
+
+#else /* !VBOX_WITH_HGCM || !VBOX_WITH_CROGL */
+    RT_NOREF(aScreenId, aScaleFactorWMultiplied, aScaleFactorHMultiplied);
     AssertMsgFailed(("Attempt to specify OpenGL content scale factor while corresponding functionality is disabled."));
     return E_UNEXPECTED;
-#endif /* VBOX_WITH_HGCM && VBOX_WITH_CROGL */
+#endif /* !VBOX_WITH_HGCM || !VBOX_WITH_CROGL */
 }
 
 HRESULT Display::notifyHiDPIOutputPolicyChange(BOOL fUnscaledHiDPI)
@@ -3726,10 +3744,12 @@ HRESULT Display::notifyHiDPIOutputPolicyChange(BOOL fUnscaledHiDPI)
     }
 
     return hr;
-#else
+
+#else /* !VBOX_WITH_HGCM || !VBOX_WITH_CROGL */
+    RT_NOREF(fUnscaledHiDPI);
     AssertMsgFailed(("Attempt to notify OpenGL about HiDPI output scaling policy change while corresponding functionality is disabled."));
     return E_UNEXPECTED;
-#endif /* VBOX_WITH_HGCM && VBOX_WITH_CROGL */
+#endif /* !VBOX_WITH_HGCM || !VBOX_WITH_CROGL */
 }
 
 #if defined(VBOX_WITH_HGCM) && defined(VBOX_WITH_CROGL)
@@ -3737,29 +3757,30 @@ DECLCALLBACK(void) Display::i_displayCrVRecScreenshotPerform(void *pvCtx, uint32
                                                              uint32_t x, uint32_t y,
                                                              uint32_t uBitsPerPixel, uint32_t uBytesPerLine,
                                                              uint32_t uGuestWidth, uint32_t uGuestHeight,
-                                                             uint8_t *pu8BufferAddress, uint64_t u64TimeStamp)
+                                                             uint8_t *pu8BufferAddress, uint64_t u64Timestamp)
 {
     Display *pDisplay = (Display *)pvCtx;
     pDisplay->i_handleCrVRecScreenshotPerform(uScreen,
                                               x, y, BitmapFormat_BGR, uBitsPerPixel,
                                               uBytesPerLine, uGuestWidth, uGuestHeight,
-                                              pu8BufferAddress, u64TimeStamp);
+                                              pu8BufferAddress, u64Timestamp);
 }
 
-DECLCALLBACK(bool) Display::i_displayCrVRecScreenshotBegin(void *pvCtx, uint32_t uScreen, uint64_t u64TimeStamp)
+DECLCALLBACK(bool) Display::i_displayCrVRecScreenshotBegin(void *pvCtx, uint32_t uScreen, uint64_t u64Timestamp)
 {
     Display *pDisplay = (Display *)pvCtx;
-    return pDisplay->i_handleCrVRecScreenshotBegin(uScreen, u64TimeStamp);
+    return pDisplay->i_handleCrVRecScreenshotBegin(uScreen, u64Timestamp);
 }
 
-DECLCALLBACK(void) Display::i_displayCrVRecScreenshotEnd(void *pvCtx, uint32_t uScreen, uint64_t u64TimeStamp)
+DECLCALLBACK(void) Display::i_displayCrVRecScreenshotEnd(void *pvCtx, uint32_t uScreen, uint64_t u64Timestamp)
 {
     Display *pDisplay = (Display *)pvCtx;
-    pDisplay->i_handleCrVRecScreenshotEnd(uScreen, u64TimeStamp);
+    pDisplay->i_handleCrVRecScreenshotEnd(uScreen, u64Timestamp);
 }
 
-DECLCALLBACK(void) Display::i_displayVRecCompletion(struct VBOXCRCMDCTL* pCmd, uint32_t cbCmd, int rc, void *pvCompletion)
+DECLCALLBACK(void) Display::i_displayVRecCompletion(struct VBOXCRCMDCTL *pCmd, uint32_t cbCmd, int rc, void *pvCompletion)
 {
+    RT_NOREF(pCmd, cbCmd, rc);
     Display *pDisplay = (Display *)pvCompletion;
     pDisplay->i_handleVRecCompletion();
 }
@@ -3839,6 +3860,7 @@ DECLCALLBACK(void) Display::i_displayVBVADisable(PPDMIDISPLAYCONNECTOR pInterfac
 
 DECLCALLBACK(void) Display::i_displayVBVAUpdateBegin(PPDMIDISPLAYCONNECTOR pInterface, unsigned uScreenId)
 {
+    RT_NOREF(uScreenId);
     LogFlowFunc(("uScreenId %d\n", uScreenId));
 
     PDRVMAINDISPLAY pDrv = PDMIDISPLAYCONNECTOR_2_MAINDISPLAY(pInterface);
@@ -3928,7 +3950,7 @@ DECLCALLBACK(void) Display::i_displayVBVAUpdateProcess(PPDMIDISPLAYCONNECTOR pIn
     pHdrUnconst->x -= (int16_t)pFBInfo->xOrigin;
     pHdrUnconst->y -= (int16_t)pFBInfo->yOrigin;
 
-    /* @todo new SendUpdate entry which can get a separate cmd header or coords. */
+    /** @todo new SendUpdate entry which can get a separate cmd header or coords. */
     pThis->mParent->i_consoleVRDPServer()->SendUpdate(uScreenId, pCmd, (uint32_t)cbCmd);
 
     *pHdrUnconst = hdrSaved;
@@ -3943,7 +3965,7 @@ DECLCALLBACK(void) Display::i_displayVBVAUpdateEnd(PPDMIDISPLAYCONNECTOR pInterf
     Display *pThis = pDrv->pDisplay;
     DISPLAYFBINFO *pFBInfo = &pThis->maFramebuffers[uScreenId];
 
-    /* @todo handleFramebufferUpdate (uScreenId,
+    /** @todo handleFramebufferUpdate (uScreenId,
      *                                x - pThis->maFramebuffers[uScreenId].xOrigin,
      *                                y - pThis->maFramebuffers[uScreenId].yOrigin,
      *                                cx, cy);
@@ -4245,6 +4267,7 @@ DECLCALLBACK(void) Display::i_drvDestruct(PPDMDRVINS pDrvIns)
  */
 DECLCALLBACK(int) Display::i_drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
     PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
     PDRVMAINDISPLAY pThis = PDMINS_2_DATA(pDrvIns, PDRVMAINDISPLAY);
     LogRelFlowFunc(("iInstance=%d\n", pDrvIns->iInstance));
diff --git a/src/VBox/Main/src-client/DisplayImplLegacy.cpp b/src/VBox/Main/src-client/DisplayImplLegacy.cpp
index b1314c3..657b6b8 100644
--- a/src/VBox/Main/src-client/DisplayImplLegacy.cpp
+++ b/src/VBox/Main/src-client/DisplayImplLegacy.cpp
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -52,6 +52,8 @@ void videoAccelDestroy(VIDEOACCEL *pVideoAccel)
 
 static unsigned mapCoordsToScreen(DISPLAYFBINFO *pInfos, unsigned cInfos, int *px, int *py, int *pw, int *ph)
 {
+    RT_NOREF(pw, ph);
+
     DISPLAYFBINFO *pInfo = pInfos;
     unsigned uScreenId;
     Log9(("mapCoordsToScreen: %d,%d %dx%d\n", *px, *py, *pw, *ph));
@@ -160,7 +162,7 @@ static void vbvaRgnDirtyRect(VBVADIRTYREGION *prgn, unsigned uScreenId, VBVACMDH
 
     if (pFBInfo->fDefaultFormat)
     {
-        //@todo pfnUpdateDisplayRect must take the vram offset parameter for the framebuffer
+        /// @todo pfnUpdateDisplayRect must take the vram offset parameter for the framebuffer
         prgn->pPort->pfnUpdateDisplayRect(prgn->pPort, phdr->x, phdr->y, phdr->w, phdr->h);
         prgn->pDisplay->i_handleDisplayUpdate(uScreenId, phdr->x, phdr->y, phdr->w, phdr->h);
     }
@@ -178,7 +180,7 @@ static void vbvaRgnUpdateFramebuffer(VBVADIRTYREGION *prgn, unsigned uScreenId)
 
     if (!pFBInfo->fDefaultFormat && w != 0 && h != 0)
     {
-        //@todo pfnUpdateDisplayRect must take the vram offset parameter for the framebuffer
+        /// @todo pfnUpdateDisplayRect must take the vram offset parameter for the framebuffer
         prgn->pPort->pfnUpdateDisplayRect(prgn->pPort, pDirtyRect->xLeft, pDirtyRect->yTop, w, h);
         prgn->pDisplay->i_handleDisplayUpdate(uScreenId, pDirtyRect->xLeft, pDirtyRect->yTop, w, h);
     }
@@ -356,6 +358,7 @@ int Display::i_videoAccelEnable(bool fEnable, VBVAMEMORY *pVbvaMemory, PPDMIDISP
 
 static bool i_vbvaVerifyRingBuffer(VBVAMEMORY *pVbvaMemory)
 {
+    RT_NOREF(pVbvaMemory);
     return true;
 }
 
@@ -584,6 +587,7 @@ static bool i_vbvaFetchCmd(VIDEOACCEL *pVideoAccel, VBVACMDHDR **ppHdr, uint32_t
 
 static void i_vbvaReleaseCmd(VIDEOACCEL *pVideoAccel, VBVACMDHDR *pHdr, int32_t cbCmd)
 {
+    RT_NOREF(cbCmd);
     uint8_t *au8RingBuffer = pVideoAccel->pVbvaMemory->au8RingBuffer;
 
     if (   (uint8_t *)pHdr >= au8RingBuffer
@@ -677,7 +681,7 @@ int Display::i_videoAccelFlush(PPDMIDISPLAYPORT pUpPort)
     for (;;)
     {
         VBVACMDHDR *phdr = NULL;
-        uint32_t cbCmd = ~0;
+        uint32_t cbCmd = UINT32_MAX;
 
         /* Fetch the command data. */
         if (!i_vbvaFetchCmd(pVideoAccel, &phdr, &cbCmd))
@@ -780,6 +784,7 @@ int Display::i_videoAccelRefreshProcess(PPDMIDISPLAYPORT pUpPort)
 
 void Display::processAdapterData(void *pvVRAM, uint32_t u32VRAMSize)
 {
+    RT_NOREF(u32VRAMSize);
     if (pvVRAM == NULL)
     {
         unsigned i;
@@ -798,7 +803,7 @@ void Display::processAdapterData(void *pvVRAM, uint32_t u32VRAMSize)
          uint8_t *pu8 = (uint8_t *)pvVRAM;
          pu8 += u32VRAMSize - VBOX_VIDEO_ADAPTER_INFORMATION_SIZE;
 
-         // @todo
+         /// @todo
          uint8_t *pu8End = pu8 + VBOX_VIDEO_ADAPTER_INFORMATION_SIZE;
 
          VBOXVIDEOINFOHDR *pHdr;
@@ -858,7 +863,7 @@ void Display::processAdapterData(void *pvVRAM, uint32_t u32VRAMSize)
 
                      case VBOX_VIDEO_QCI32_OFFSCREEN_HEAP_SIZE:
                      {
-                         /* @todo make configurable. */
+                         /** @todo make configurable. */
                          pConf32->u32Value = _1M;
                      } break;
 
@@ -902,7 +907,7 @@ void Display::processDisplayData(void *pvVRAM, unsigned uScreenId)
     uint8_t *pu8 = (uint8_t *)pvVRAM;
     pu8 += pFBInfo->u32Offset + pFBInfo->u32MaxFramebufferSize;
 
-    // @todo
+    /// @todo
     uint8_t *pu8End = pu8 + pFBInfo->u32InformationSize;
 
     VBOXVIDEOINFOHDR *pHdr;
diff --git a/src/VBox/Main/src-client/DisplaySourceBitmapImpl.cpp b/src/VBox/Main/src-client/DisplaySourceBitmapImpl.cpp
index cf4734a..5815382 100644
--- a/src/VBox/Main/src-client/DisplaySourceBitmapImpl.cpp
+++ b/src/VBox/Main/src-client/DisplaySourceBitmapImpl.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -117,6 +117,7 @@ HRESULT DisplaySourceBitmap::queryBitmapInfo(BYTE **aAddress,
 int DisplaySourceBitmap::initSourceBitmap(unsigned aScreenId,
                                           DISPLAYFBINFO *pFBInfo)
 {
+    RT_NOREF(aScreenId);
     int rc = VINF_SUCCESS;
 
     if (pFBInfo->w == 0 || pFBInfo->h == 0)
diff --git a/src/VBox/Main/src-client/DrvAudioVRDE.cpp b/src/VBox/Main/src-client/DrvAudioVRDE.cpp
index 098bc1d..bdf6cd9 100644
--- a/src/VBox/Main/src-client/DrvAudioVRDE.cpp
+++ b/src/VBox/Main/src-client/DrvAudioVRDE.cpp
@@ -51,22 +51,22 @@ typedef struct DRVAUDIOVRDE
 {
     /** Pointer to audio VRDE object. */
     AudioVRDE           *pAudioVRDE;
-    PPDMDRVINS           pDrvIns;
     /** Pointer to the driver instance structure. */
+    PPDMDRVINS           pDrvIns;
+    /** Pointer to host audio interface. */
     PDMIHOSTAUDIO        IHostAudio;
     /** Pointer to the VRDP's console object. */
     ConsoleVRDPServer   *pConsoleVRDPServer;
     /** Pointer to the DrvAudio port interface that is above us. */
     PPDMIAUDIOCONNECTOR  pDrvAudio;
-    /** Whether this driver is enabled or not. */
-    bool                 fEnabled;
 } DRVAUDIOVRDE, *PDRVAUDIOVRDE;
 
 typedef struct VRDESTREAMIN
 {
-    /** Associated host input stream.
-     *  Note: Always must come first! */
+    /** Note: Always must come first! */
     PDMAUDIOSTREAM       Stream;
+    /** The PCM properties of this stream. */
+    PDMAUDIOPCMPROPS     Props;
     /** Number of samples captured asynchronously in the
      *  onVRDEInputXXX callbacks. */
     uint32_t             cSamplesCaptured;
@@ -76,49 +76,66 @@ typedef struct VRDESTREAMIN
 
 typedef struct VRDESTREAMOUT
 {
-    /** Associated host output stream.
-     *  Note: Always must come first! */
+    /** Note: Always must come first! */
     PDMAUDIOSTREAM       Stream;
+    /** The PCM properties of this stream. */
+    PDMAUDIOPCMPROPS     Props;
     uint64_t             old_ticks;
     uint64_t             cSamplesSentPerSec;
 } VRDESTREAMOUT, *PVRDESTREAMOUT;
 
 
+
 static int vrdeCreateStreamIn(PPDMIHOSTAUDIO pInterface,
-                              PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfg, uint32_t *pcSamples)
+                              PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
 {
-    PDRVAUDIOVRDE pDrv = RT_FROM_MEMBER(pInterface, DRVAUDIOVRDE, IHostAudio);
-    AssertPtrReturn(pDrv, VERR_INVALID_POINTER);
+    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
+    AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
+    AssertPtrReturn(pCfgReq,    VERR_INVALID_POINTER);
+    AssertPtrReturn(pCfgAcq,    VERR_INVALID_POINTER);
 
     PVRDESTREAMIN pVRDEStrmIn = (PVRDESTREAMIN)pStream;
     AssertPtrReturn(pVRDEStrmIn, VERR_INVALID_POINTER);
 
-    if (pcSamples)
-        *pcSamples = _4K; /** @todo Make this configurable. */
+    int rc = DrvAudioHlpStreamCfgToProps(pCfgReq, &pVRDEStrmIn->Props);
+    if (RT_SUCCESS(rc))
+    {
+        if (pCfgAcq)
+            pCfgAcq->cSampleBufferSize = _4K; /** @todo Make this configurable. */
+    }
 
-    return DrvAudioHlpStreamCfgToProps(pCfg, &pVRDEStrmIn->Stream.Props);
+    LogFlowFuncLeaveRC(VINF_SUCCESS);
+    return VINF_SUCCESS;
 }
 
+
 static int vrdeCreateStreamOut(PPDMIHOSTAUDIO pInterface,
-                               PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfg, uint32_t *pcSamples)
+                               PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
 {
-    PDRVAUDIOVRDE pDrv = RT_FROM_MEMBER(pInterface, DRVAUDIOVRDE, IHostAudio);
-    AssertPtrReturn(pDrv, VERR_INVALID_POINTER);
-
-    LogFlowFunc(("pStream=%p, pCfg=%p\n", pStream, pCfg));
+    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
+    AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
+    AssertPtrReturn(pCfgReq,    VERR_INVALID_POINTER);
+    AssertPtrReturn(pCfgAcq,    VERR_INVALID_POINTER);
 
     PVRDESTREAMOUT pVRDEStrmOut = (PVRDESTREAMOUT)pStream;
     AssertPtrReturn(pVRDEStrmOut, VERR_INVALID_POINTER);
 
-    if (pcSamples)
-        *pcSamples = _4K; /** @todo Make this configurable. */
+    int rc = DrvAudioHlpStreamCfgToProps(pCfgReq, &pVRDEStrmOut->Props);
+    if (RT_SUCCESS(rc))
+    {
+        if (pCfgAcq)
+            pCfgAcq->cSampleBufferSize = _4K; /** @todo Make this configurable. */
+    }
 
-    return DrvAudioHlpStreamCfgToProps(pCfg, &pVRDEStrmOut->Stream.Props);
+    LogFlowFuncLeaveRC(VINF_SUCCESS);
+    return VINF_SUCCESS;
 }
 
+
 static int vrdeControlStreamOut(PPDMIHOSTAUDIO pInterface,
                                 PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)
 {
+    RT_NOREF(enmStreamCmd);
     PDRVAUDIOVRDE pDrv = RT_FROM_MEMBER(pInterface, DRVAUDIOVRDE, IHostAudio);
     AssertPtrReturn(pDrv, VERR_INVALID_POINTER);
 
@@ -132,6 +149,7 @@ static int vrdeControlStreamOut(PPDMIHOSTAUDIO pInterface,
     return VINF_SUCCESS;
 }
 
+
 static int vrdeControlStreamIn(PPDMIHOSTAUDIO pInterface,
                                PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)
 {
@@ -153,8 +171,8 @@ static int vrdeControlStreamIn(PPDMIHOSTAUDIO pInterface,
     if (enmStreamCmd == PDMAUDIOSTREAMCMD_ENABLE)
     {
         rc = pDrv->pConsoleVRDPServer->SendAudioInputBegin(NULL, pVRDEStrmIn, AudioMixBufSize(&pStream->MixBuf),
-                                                           pStream->Props.uHz,
-                                                           pStream->Props.cChannels, pStream->Props.cBits);
+                                                           pVRDEStrmIn->Props.uHz,
+                                                           pVRDEStrmIn->Props.cChannels, pVRDEStrmIn->Props.cBits);
         if (rc == VERR_NOT_SUPPORTED)
         {
             LogFlowFunc(("No RDP client connected, so no input recording supported\n"));
@@ -172,37 +190,32 @@ static int vrdeControlStreamIn(PPDMIHOSTAUDIO pInterface,
     return rc;
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnInit}
+ */
 static DECLCALLBACK(int) drvAudioVRDEInit(PPDMIHOSTAUDIO pInterface)
 {
+    RT_NOREF(pInterface);
     LogFlowFuncEnter();
 
     return VINF_SUCCESS;
 }
 
+
 /**
- * {FIXME - Missing brief description - FIXME}
- *
- * Transfers audio input formerly sent by a connected RDP client / VRDE backend
- * (using the onVRDEInputXXX methods) over to the VRDE host (VM). The audio device
- * emulation then will read and send the data to the guest.
- *
- * @return  IPRT status code.
- * @param   pInterface
- * @param   pStream
- * @param   pcSamplesCaptured
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamCapture}
  */
-static DECLCALLBACK(int) drvAudioVRDEStreamCapture(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream,
-                                                   uint32_t *pcSamplesCaptured)
+static DECLCALLBACK(int) drvAudioVRDEStreamCapture(PPDMIHOSTAUDIO pInterface,
+                                                   PPDMAUDIOSTREAM pStream, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead)
 {
-    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
-    AssertPtrReturn(pStream, VERR_INVALID_POINTER);
-    AssertPtrReturn(pcSamplesCaptured, VERR_INVALID_POINTER);
+    RT_NOREF2(pvBuf, cbBuf);
 
-    PDRVAUDIOVRDE pDrv = RT_FROM_MEMBER(pInterface, DRVAUDIOVRDE, IHostAudio);
-    AssertPtrReturn(pDrv, VERR_INVALID_POINTER);
+    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
+    AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
+    /* pcbRead is optional. */
 
     PVRDESTREAMIN pVRDEStrmIn = (PVRDESTREAMIN)pStream;
-    AssertPtrReturn(pVRDEStrmIn, VERR_INVALID_POINTER);
 
     /** @todo Use CritSect! */
 
@@ -219,39 +232,32 @@ static DECLCALLBACK(int) drvAudioVRDEStreamCapture(PPDMIHOSTAUDIO pInterface, PP
 
     if (RT_SUCCESS(rc))
     {
-        *pcSamplesCaptured = cProcessed;
-
         Assert(pVRDEStrmIn->cSamplesCaptured >= cProcessed);
         pVRDEStrmIn->cSamplesCaptured -= cProcessed;
+
+        if (pcbRead)
+            *pcbRead = cProcessed;
     }
 
     LogFlowFunc(("cSamplesCaptured=%RU32, cProcessed=%RU32 rc=%Rrc\n", pVRDEStrmIn->cSamplesCaptured, cProcessed, rc));
     return rc;
 }
 
+
 /**
- * Transfers VM audio output to remote client.
- *
- * Transfers VM audio output over to the VRDE instance for playing remotely
- * on the client.
- *
- * @return  IPRT status code.
- * @param   pInterface
- * @param   pStream
- * @param   pcSamplesPlayed
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamPlay}
  */
 static DECLCALLBACK(int) drvAudioVRDEStreamPlay(PPDMIHOSTAUDIO pInterface,
-                                                PPDMAUDIOSTREAM pStream, uint32_t *pcSamplesPlayed)
+                                                PPDMAUDIOSTREAM pStream, const void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten)
 {
+    RT_NOREF2(pvBuf, cbBuf);
+
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
     AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
-    /* pcSamplesPlayed is optional. */
-
-    PDRVAUDIOVRDE pDrv = RT_FROM_MEMBER(pInterface, DRVAUDIOVRDE, IHostAudio);
-    AssertPtrReturn(pDrv, VERR_INVALID_POINTER);
+    /* pcbWritten is optional. */
 
+    PDRVAUDIOVRDE  pDrv         = RT_FROM_MEMBER(pInterface, DRVAUDIOVRDE, IHostAudio);
     PVRDESTREAMOUT pVRDEStrmOut = (PVRDESTREAMOUT)pStream;
-    AssertPtrReturn(pVRDEStrmOut, VERR_INVALID_POINTER);
 
     uint32_t cLive = AudioMixBufLive(&pStream->MixBuf);
 
@@ -260,7 +266,7 @@ static DECLCALLBACK(int) drvAudioVRDEStreamPlay(PPDMIHOSTAUDIO pInterface,
     uint64_t ticks_per_second = PDMDrvHlpTMGetVirtualFreq(pDrv->pDrvIns);
 
     /* Minimize the rounding error: samples = int((ticks * freq) / ticks_per_second + 0.5). */
-    uint32_t cSamplesPlayed = (int)((2 * ticks * pStream->Props.uHz + ticks_per_second) / ticks_per_second / 2);
+    uint32_t cSamplesPlayed = (int)((2 * ticks * pVRDEStrmOut->Props.uHz + ticks_per_second) / ticks_per_second / 2);
 
     /* Don't play more than available. */
     if (cSamplesPlayed > cLive)
@@ -269,16 +275,16 @@ static DECLCALLBACK(int) drvAudioVRDEStreamPlay(PPDMIHOSTAUDIO pInterface,
     /* Remember when samples were consumed. */
     pVRDEStrmOut->old_ticks = now;
 
-    VRDEAUDIOFORMAT format = VRDE_AUDIO_FMT_MAKE(pStream->Props.uHz,
-                                                 pStream->Props.cChannels,
-                                                 pStream->Props.cBits,
-                                                 pStream->Props.fSigned);
+    VRDEAUDIOFORMAT format = VRDE_AUDIO_FMT_MAKE(pVRDEStrmOut->Props.uHz,
+                                                 pVRDEStrmOut->Props.cChannels,
+                                                 pVRDEStrmOut->Props.cBits,
+                                                 pVRDEStrmOut->Props.fSigned);
 
     int cSamplesToSend = cSamplesPlayed;
 
     LogFlowFunc(("uFreq=%RU32, cChan=%RU8, cBits=%RU8, fSigned=%RTbool, enmFormat=%ld, cSamplesToSend=%RU32\n",
-                 pStream->Props.uHz, pStream->Props.cChannels,
-                 pStream->Props.cBits, pStream->Props.fSigned,
+                 pVRDEStrmOut->Props.uHz,   pVRDEStrmOut->Props.cChannels,
+                 pVRDEStrmOut->Props.cBits, pVRDEStrmOut->Props.fSigned,
                  format, cSamplesToSend));
 
     /*
@@ -313,15 +319,17 @@ static DECLCALLBACK(int) drvAudioVRDEStreamPlay(PPDMIHOSTAUDIO pInterface,
      * Always report back all samples acquired, regardless of whether the
      * VRDP server actually did process those.
      */
-    if (pcSamplesPlayed)
-        *pcSamplesPlayed = cReadTotal;
+    if (pcbWritten)
+        *pcbWritten = cReadTotal;
 
     LogFlowFunc(("cReadTotal=%RU32, rc=%Rrc\n", cReadTotal, rc));
     return rc;
 }
 
+
 static int vrdeDestroyStreamIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
 {
+    RT_NOREF(pStream);
     PDRVAUDIOVRDE pDrv = RT_FROM_MEMBER(pInterface, DRVAUDIOVRDE, IHostAudio);
     AssertPtrReturn(pDrv, VERR_INVALID_POINTER);
 
@@ -331,29 +339,39 @@ static int vrdeDestroyStreamIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStrea
     return VINF_SUCCESS;
 }
 
+
 static int vrdeDestroyStreamOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
 {
+    RT_NOREF(pStream);
     PDRVAUDIOVRDE pDrv = RT_FROM_MEMBER(pInterface, DRVAUDIOVRDE, IHostAudio);
     AssertPtrReturn(pDrv, VERR_INVALID_POINTER);
 
     return VINF_SUCCESS;
 }
 
-static DECLCALLBACK(int) drvAudioVRDEGetConfig(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDCFG pCfg)
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnGetConfig}
+ */
+static DECLCALLBACK(int) drvAudioVRDEGetConfig(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDCFG pBackendCfg)
 {
     NOREF(pInterface);
-    AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
+    AssertPtrReturn(pBackendCfg, VERR_INVALID_POINTER);
 
-    pCfg->cbStreamOut    = sizeof(VRDESTREAMOUT);
-    pCfg->cbStreamIn     = sizeof(VRDESTREAMIN);
-    pCfg->cMaxStreamsIn  = UINT32_MAX;
-    pCfg->cMaxStreamsOut = UINT32_MAX;
-    pCfg->cSources       = 1;
-    pCfg->cSinks         = 1;
+    pBackendCfg->cbStreamOut    = sizeof(VRDESTREAMOUT);
+    pBackendCfg->cbStreamIn     = sizeof(VRDESTREAMIN);
+    pBackendCfg->cMaxStreamsIn  = UINT32_MAX;
+    pBackendCfg->cMaxStreamsOut = UINT32_MAX;
+    pBackendCfg->cSources       = 1;
+    pBackendCfg->cSinks         = 1;
 
     return VINF_SUCCESS;
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnShutdown}
+ */
 static DECLCALLBACK(void) drvAudioVRDEShutdown(PPDMIHOSTAUDIO pInterface)
 {
     PDRVAUDIOVRDE pDrv = RT_FROM_MEMBER(pInterface, DRVAUDIOVRDE, IHostAudio);
@@ -363,30 +381,43 @@ static DECLCALLBACK(void) drvAudioVRDEShutdown(PPDMIHOSTAUDIO pInterface)
         pDrv->pConsoleVRDPServer->SendAudioInputEnd(NULL);
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnGetStatus}
+ */
 static DECLCALLBACK(PDMAUDIOBACKENDSTS) drvAudioVRDEGetStatus(PPDMIHOSTAUDIO pInterface, PDMAUDIODIR enmDir)
 {
+    RT_NOREF(enmDir);
     AssertPtrReturn(pInterface, PDMAUDIOBACKENDSTS_UNKNOWN);
 
     return PDMAUDIOBACKENDSTS_RUNNING;
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamCreate}
+ */
 static DECLCALLBACK(int) drvAudioVRDEStreamCreate(PPDMIHOSTAUDIO pInterface,
-                                                  PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfg, uint32_t *pcSamples)
+                                                  PPDMAUDIOSTREAM pStream, PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
     AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg,       VERR_INVALID_POINTER);
+    AssertPtrReturn(pCfgReq,    VERR_INVALID_POINTER);
+    AssertPtrReturn(pCfgAcq,    VERR_INVALID_POINTER);
 
     int rc;
-    if (pCfg->enmDir == PDMAUDIODIR_IN)
-        rc = vrdeCreateStreamIn(pInterface,  pStream, pCfg, pcSamples);
+    if (pCfgReq->enmDir == PDMAUDIODIR_IN)
+        rc = vrdeCreateStreamIn(pInterface,  pStream, pCfgReq, pCfgAcq);
     else
-        rc = vrdeCreateStreamOut(pInterface, pStream, pCfg, pcSamples);
+        rc = vrdeCreateStreamOut(pInterface, pStream, pCfgReq, pCfgAcq);
 
-    LogFlowFunc(("%s: rc=%Rrc\n", pStream->szName, rc));
     return rc;
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamDestroy}
+ */
 static DECLCALLBACK(int) drvAudioVRDEStreamDestroy(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
@@ -401,6 +432,10 @@ static DECLCALLBACK(int) drvAudioVRDEStreamDestroy(PPDMIHOSTAUDIO pInterface, PP
     return rc;
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamControl}
+ */
 static DECLCALLBACK(int) drvAudioVRDEStreamControl(PPDMIHOSTAUDIO pInterface,
                                                    PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)
 {
@@ -418,6 +453,10 @@ static DECLCALLBACK(int) drvAudioVRDEStreamControl(PPDMIHOSTAUDIO pInterface,
     return rc;
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetStatus}
+ */
 static DECLCALLBACK(PDMAUDIOSTRMSTS) drvAudioVRDEStreamGetStatus(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
 {
     NOREF(pInterface);
@@ -427,6 +466,10 @@ static DECLCALLBACK(PDMAUDIOSTRMSTS) drvAudioVRDEStreamGetStatus(PPDMIHOSTAUDIO
             | PDMAUDIOSTRMSTS_FLAG_DATA_READABLE | PDMAUDIOSTRMSTS_FLAG_DATA_WRITABLE);
 }
 
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamIterate}
+ */
 static DECLCALLBACK(int) drvAudioVRDEStreamIterate(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
@@ -438,6 +481,7 @@ static DECLCALLBACK(int) drvAudioVRDEStreamIterate(PPDMIHOSTAUDIO pInterface, PP
     return VINF_SUCCESS;
 }
 
+
 /**
  * @interface_method_impl{PDMIBASE,pfnQueryInterface}
  */
@@ -451,12 +495,14 @@ static DECLCALLBACK(void *) drvAudioVRDEQueryInterface(PPDMIBASE pInterface, con
     return NULL;
 }
 
+
 AudioVRDE::AudioVRDE(Console *pConsole)
     : mpDrv(NULL),
       mParent(pConsole)
 {
 }
 
+
 AudioVRDE::~AudioVRDE(void)
 {
     if (mpDrv)
@@ -466,18 +512,19 @@ AudioVRDE::~AudioVRDE(void)
     }
 }
 
+
 int AudioVRDE::onVRDEControl(bool fEnable, uint32_t uFlags)
 {
+    RT_NOREF(fEnable, uFlags);
     LogFlowThisFunc(("fEnable=%RTbool, uFlags=0x%x\n", fEnable, uFlags));
 
     if (mpDrv == NULL)
         return VERR_INVALID_STATE;
 
-    mpDrv->fEnabled = fEnable;
-
     return VINF_SUCCESS; /* Never veto. */
 }
 
+
 /**
  * Marks the beginning of sending captured audio data from a connected
  * RDP client.
@@ -508,6 +555,7 @@ int AudioVRDE::onVRDEInputBegin(void *pvContext, PVRDEAUDIOINBEGIN pVRDEAudioBeg
     return VINF_SUCCESS;
 }
 
+
 int AudioVRDE::onVRDEInputData(void *pvContext, const void *pvData, uint32_t cbData)
 {
     PVRDESTREAMIN pVRDEStrmIn = (PVRDESTREAMIN)pvContext;
@@ -528,6 +576,7 @@ int AudioVRDE::onVRDEInputData(void *pvContext, const void *pvData, uint32_t cbD
     return rc;
 }
 
+
 int AudioVRDE::onVRDEInputEnd(void *pvContext)
 {
     NOREF(pvContext);
@@ -535,11 +584,14 @@ int AudioVRDE::onVRDEInputEnd(void *pvContext)
     return VINF_SUCCESS;
 }
 
+
 int AudioVRDE::onVRDEInputIntercept(bool fEnabled)
 {
+    RT_NOREF(fEnabled);
     return VINF_SUCCESS; /* Never veto. */
 }
 
+
 /**
  * Construct a VRDE audio driver instance.
  *
@@ -548,8 +600,11 @@ int AudioVRDE::onVRDEInputIntercept(bool fEnabled)
 /* static */
 DECLCALLBACK(int) AudioVRDE::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
+
     PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
     PDRVAUDIOVRDE pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIOVRDE);
+
     AssertPtrReturn(pDrvIns, VERR_INVALID_POINTER);
     AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
 
@@ -569,9 +624,6 @@ DECLCALLBACK(int) AudioVRDE::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, ui
     /* IHostAudio */
     PDMAUDIO_IHOSTAUDIO_CALLBACKS(drvAudioVRDE);
 
-    /* Init defaults. */
-    pThis->fEnabled = false;
-
     /*
      * Get the ConsoleVRDPServer object pointer.
      */
diff --git a/src/VBox/Main/src-client/DrvAudioVRDE_old.cpp b/src/VBox/Main/src-client/DrvAudioVRDE_old.cpp
deleted file mode 100644
index e010e7a..0000000
--- a/src/VBox/Main/src-client/DrvAudioVRDE_old.cpp
+++ /dev/null
@@ -1,613 +0,0 @@
-/* $Id: DrvAudioVRDE_old.cpp $ */
-/** @file
- * VRDE audio backend for Main.
- */
-
-/*
- * Copyright (C) 2013-2015 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-
-/*********************************************************************************************************************************
-*   Header Files                                                                                                                 *
-*********************************************************************************************************************************/
-#define LOG_GROUP LOG_GROUP_DRV_VRDE_AUDIO
-#include <VBox/log.h>
-#include "DrvAudioVRDE_old.h"
-#include "ConsoleImpl.h"
-#include "ConsoleVRDPServer.h"
-
-#include "Logging.h"
-
-#include "../../Devices/Audio_old/DrvAudio.h"
-#include "../../Devices/Audio_old/AudioMixBuffer.h"
-
-#include <iprt/mem.h>
-#include <iprt/cdefs.h>
-#include <iprt/circbuf.h>
-
-#include <VBox/vmm/pdmaudioifs.h>
-#include <VBox/vmm/pdmdrv.h>
-#include <VBox/RemoteDesktop/VRDE.h>
-#include <VBox/vmm/cfgm.h>
-#include <VBox/err.h>
-
-
-/*********************************************************************************************************************************
-*   Structures and Typedefs                                                                                                      *
-*********************************************************************************************************************************/
-/**
- * Audio VRDE driver instance data.
- */
-typedef struct DRVAUDIOVRDE
-{
-    /** Pointer to audio VRDE object. */
-    AudioVRDE           *pAudioVRDE;
-    PPDMDRVINS           pDrvIns;
-    /** Pointer to the driver instance structure. */
-    PDMIHOSTAUDIO        IHostAudio;
-    /** Pointer to the VRDP's console object. */
-    ConsoleVRDPServer   *pConsoleVRDPServer;
-    /** Pointer to the DrvAudio port interface that is above us. */
-    PPDMIAUDIOCONNECTOR  pDrvAudio;
-    /** Whether this driver is enabled or not. */
-    bool                 fEnabled;
-} DRVAUDIOVRDE, *PDRVAUDIOVRDE;
-
-typedef struct VRDESTREAMIN
-{
-    /** Associated host input stream. */
-    PDMAUDIOHSTSTRMIN    HstStrmIn;
-    /** Number of samples captured asynchronously in the
-     *  onVRDEInputXXX callbacks. */
-    uint32_t             cSamplesCaptured;
-    /** Critical section. */
-    RTCRITSECT           CritSect;
-} VRDESTREAMIN, *PVRDESTREAMIN;
-
-typedef struct VRDESTREAMOUT
-{
-    /** Associated host output stream. */
-    PDMAUDIOHSTSTRMOUT HstStrmOut;
-    uint64_t old_ticks;
-    uint64_t cSamplesSentPerSec;
-} VRDESTREAMOUT, *PVRDESTREAMOUT;
-
-
-
-static DECLCALLBACK(int) drvAudioVRDEInit(PPDMIHOSTAUDIO pInterface)
-{
-    LogFlowFuncEnter();
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) drvAudioVRDEInitIn(PPDMIHOSTAUDIO pInterface,
-                                            PPDMAUDIOHSTSTRMIN pHstStrmIn, PPDMAUDIOSTREAMCFG pCfg,
-                                            PDMAUDIORECSOURCE enmRecSource,
-                                            uint32_t *pcSamples)
-{
-    PDRVAUDIOVRDE pDrv = RT_FROM_MEMBER(pInterface, DRVAUDIOVRDE, IHostAudio);
-    AssertPtrReturn(pDrv, VERR_INVALID_POINTER);
-
-    PVRDESTREAMIN pVRDEStrmIn = (PVRDESTREAMIN)pHstStrmIn;
-    AssertPtrReturn(pVRDEStrmIn, VERR_INVALID_POINTER);
-
-    if (pcSamples)
-        *pcSamples = _4K; /** @todo Make this configurable. */
-
-    return DrvAudioStreamCfgToProps(pCfg, &pVRDEStrmIn->HstStrmIn.Props);
-}
-
-static DECLCALLBACK(int) drvAudioVRDEInitOut(PPDMIHOSTAUDIO pInterface,
-                                             PPDMAUDIOHSTSTRMOUT pHstStrmOut, PPDMAUDIOSTREAMCFG pCfg,
-                                             uint32_t *pcSamples)
-{
-    PDRVAUDIOVRDE pDrv = RT_FROM_MEMBER(pInterface, DRVAUDIOVRDE, IHostAudio);
-    AssertPtrReturn(pDrv, VERR_INVALID_POINTER);
-
-    LogFlowFunc(("pHstStrmOut=%p, pCfg=%p\n", pHstStrmOut, pCfg));
-
-    PVRDESTREAMOUT pVRDEStrmOut = (PVRDESTREAMOUT)pHstStrmOut;
-    AssertPtrReturn(pVRDEStrmOut, VERR_INVALID_POINTER);
-
-    if (pcSamples)
-        *pcSamples = _4K; /** @todo Make this configurable. */
-
-    return DrvAudioStreamCfgToProps(pCfg, &pVRDEStrmOut->HstStrmOut.Props);
-}
-
-static DECLCALLBACK(bool) drvAudioVRDEIsEnabled(PPDMIHOSTAUDIO pInterface, PDMAUDIODIR enmDir)
-{
-    PDRVAUDIOVRDE pDrv = RT_FROM_MEMBER(pInterface, DRVAUDIOVRDE, IHostAudio);
-    AssertPtrReturn(pDrv, false);
-
-    NOREF(enmDir);
-
-    if (!pDrv->fEnabled)
-        return false;
-
-    return true;
-}
-
-/**
- * {FIXME - Missing brief description - FIXME}
- *
- * Transfers audio input formerly sent by a connected RDP client / VRDE backend
- * (using the onVRDEInputXXX methods) over to the VRDE host (VM). The audio device
- * emulation then will read and send the data to the guest.
- *
- * @return  IPRT status code.
- * @param   pInterface
- * @param   pHstStrmIn
- * @param   pcSamplesCaptured
- */
-static DECLCALLBACK(int) drvAudioVRDECaptureIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHstStrmIn,
-                                               uint32_t *pcSamplesCaptured)
-{
-    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
-    AssertPtrReturn(pHstStrmIn, VERR_INVALID_POINTER);
-    AssertPtrReturn(pcSamplesCaptured, VERR_INVALID_POINTER);
-
-    PDRVAUDIOVRDE pDrv = RT_FROM_MEMBER(pInterface, DRVAUDIOVRDE, IHostAudio);
-    AssertPtrReturn(pDrv, VERR_INVALID_POINTER);
-
-    PVRDESTREAMIN pVRDEStrmIn = (PVRDESTREAMIN)pHstStrmIn;
-    AssertPtrReturn(pVRDEStrmIn, VERR_INVALID_POINTER);
-
-    /** @todo Use CritSect! */
-
-    int rc;
-
-    uint32_t cProcessed = 0;
-    if (pVRDEStrmIn->cSamplesCaptured)
-    {
-        rc = AudioMixBufMixToParent(&pVRDEStrmIn->HstStrmIn.MixBuf, pVRDEStrmIn->cSamplesCaptured,
-                                    &cProcessed);
-    }
-    else
-        rc = VINF_SUCCESS;
-
-    if (RT_SUCCESS(rc))
-    {
-        *pcSamplesCaptured = cProcessed;
-
-        Assert(pVRDEStrmIn->cSamplesCaptured >= cProcessed);
-        pVRDEStrmIn->cSamplesCaptured -= cProcessed;
-    }
-
-    LogFlowFunc(("cSamplesCaptured=%RU32, cProcessed=%RU32 rc=%Rrc\n", pVRDEStrmIn->cSamplesCaptured, cProcessed, rc));
-    return rc;
-}
-
-/**
- * Transfers VM audio output to remote client.
- *
- * Transfers VM audio output over to the VRDE instance for playing remotely
- * on the client.
- *
- * @return  IPRT status code.
- * @param   pInterface
- * @param   pHstStrmOut
- * @param   pcSamplesPlayed
- */
-static DECLCALLBACK(int) drvAudioVRDEPlayOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHstStrmOut,
-                                             uint32_t *pcSamplesPlayed)
-{
-    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
-    AssertPtrReturn(pHstStrmOut, VERR_INVALID_POINTER);
-    /* pcSamplesPlayed is optional. */
-
-    PDRVAUDIOVRDE pDrv = RT_FROM_MEMBER(pInterface, DRVAUDIOVRDE, IHostAudio);
-    AssertPtrReturn(pDrv, VERR_INVALID_POINTER);
-
-    PVRDESTREAMOUT pVRDEStrmOut = (PVRDESTREAMOUT)pHstStrmOut;
-    AssertPtrReturn(pVRDEStrmOut, VERR_INVALID_POINTER);
-
-    uint32_t live = AudioMixBufAvail(&pHstStrmOut->MixBuf);
-    uint64_t now = PDMDrvHlpTMGetVirtualTime(pDrv->pDrvIns);
-    uint64_t ticks = now  - pVRDEStrmOut->old_ticks;
-    uint64_t ticks_per_second = PDMDrvHlpTMGetVirtualFreq(pDrv->pDrvIns);
-
-    /* Minimize the rounding error: samples = int((ticks * freq) / ticks_per_second + 0.5). */
-    uint32_t cSamplesPlayed = (int)((2 * ticks * pHstStrmOut->Props.uHz + ticks_per_second) / ticks_per_second / 2);
-
-    /* Don't play more than available. */
-    if (cSamplesPlayed > live)
-        cSamplesPlayed = live;
-
-    /* Remember when samples were consumed. */
-    pVRDEStrmOut->old_ticks = now;
-
-    VRDEAUDIOFORMAT format = VRDE_AUDIO_FMT_MAKE(pHstStrmOut->Props.uHz,
-                                                 pHstStrmOut->Props.cChannels,
-                                                 pHstStrmOut->Props.cBits,
-                                                 pHstStrmOut->Props.fSigned);
-
-    int cSamplesToSend = cSamplesPlayed;
-
-    LogFlowFunc(("uFreq=%RU32, cChan=%RU8, cBits=%RU8, fSigned=%RTbool, enmFormat=%ld, cSamplesToSend=%RU32\n",
-                 pHstStrmOut->Props.uHz, pHstStrmOut->Props.cChannels,
-                 pHstStrmOut->Props.cBits, pHstStrmOut->Props.fSigned,
-                 format, cSamplesToSend));
-
-    /*
-     * Call the VRDP server with the data.
-     */
-    uint32_t cReadTotal = 0;
-
-    PPDMAUDIOSAMPLE pSamples;
-    uint32_t cRead;
-    int rc = AudioMixBufAcquire(&pHstStrmOut->MixBuf, cSamplesToSend,
-                                &pSamples, &cRead);
-    if (   RT_SUCCESS(rc)
-        && cRead)
-    {
-        cReadTotal = cRead;
-        pDrv->pConsoleVRDPServer->SendAudioSamples(pSamples, cRead, format);
-
-        if (rc == VINF_TRY_AGAIN)
-        {
-            rc = AudioMixBufAcquire(&pHstStrmOut->MixBuf, cSamplesToSend - cRead,
-                                    &pSamples, &cRead);
-            if (RT_SUCCESS(rc))
-                pDrv->pConsoleVRDPServer->SendAudioSamples(pSamples, cRead, format);
-
-            cReadTotal += cRead;
-        }
-    }
-
-    AudioMixBufFinish(&pHstStrmOut->MixBuf, cSamplesToSend);
-
-    /*
-     * Always report back all samples acquired, regardless of whether the
-     * VRDP server actually did process those.
-     */
-    if (pcSamplesPlayed)
-        *pcSamplesPlayed = cReadTotal;
-
-    LogFlowFunc(("cReadTotal=%RU32, rc=%Rrc\n", cReadTotal, rc));
-    return rc;
-}
-
-static DECLCALLBACK(int) drvAudioVRDEFiniIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHstStrmIn)
-{
-    PDRVAUDIOVRDE pDrv = RT_FROM_MEMBER(pInterface, DRVAUDIOVRDE, IHostAudio);
-    AssertPtrReturn(pDrv, VERR_INVALID_POINTER);
-
-    if (pDrv->pConsoleVRDPServer)
-        pDrv->pConsoleVRDPServer->SendAudioInputEnd(NULL);
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) drvAudioVRDEFiniOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHstStrmOut)
-{
-    PDRVAUDIOVRDE pDrv = RT_FROM_MEMBER(pInterface, DRVAUDIOVRDE, IHostAudio);
-    AssertPtrReturn(pDrv, VERR_INVALID_POINTER);
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) drvAudioVRDEControlOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHstStrmOut,
-                                                PDMAUDIOSTREAMCMD enmStreamCmd)
-{
-    PDRVAUDIOVRDE pDrv = RT_FROM_MEMBER(pInterface, DRVAUDIOVRDE, IHostAudio);
-    AssertPtrReturn(pDrv, VERR_INVALID_POINTER);
-
-    PVRDESTREAMOUT pVRDEStrmOut = (PVRDESTREAMOUT)pHstStrmOut;
-    AssertPtrReturn(pVRDEStrmOut, VERR_INVALID_POINTER);
-
-    LogFlowFunc(("enmStreamCmd=%ld\n", enmStreamCmd));
-
-    AudioMixBufReset(&pHstStrmOut->MixBuf);
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) drvAudioVRDEControlIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHstStrmIn,
-                                               PDMAUDIOSTREAMCMD enmStreamCmd)
-{
-    PDRVAUDIOVRDE pDrv = RT_FROM_MEMBER(pInterface, DRVAUDIOVRDE, IHostAudio);
-    AssertPtrReturn(pDrv, VERR_INVALID_POINTER);
-
-    PVRDESTREAMIN pVRDEStrmIn = (PVRDESTREAMIN)pHstStrmIn;
-    AssertPtrReturn(pVRDEStrmIn, VERR_INVALID_POINTER);
-
-    PPDMAUDIOHSTSTRMIN pThisStrmIn = &pVRDEStrmIn->HstStrmIn;
-
-    LogFlowFunc(("enmStreamCmd=%ld\n", enmStreamCmd));
-
-    if (!pDrv->pConsoleVRDPServer)
-        return VINF_SUCCESS;
-
-    AudioMixBufReset(&pThisStrmIn->MixBuf);
-
-    /* Initialize only if not already done. */
-    int rc;
-    if (enmStreamCmd == PDMAUDIOSTREAMCMD_ENABLE)
-    {
-        rc = pDrv->pConsoleVRDPServer->SendAudioInputBegin(NULL, pVRDEStrmIn, AudioMixBufSize(&pThisStrmIn->MixBuf),
-                                                           pThisStrmIn->Props.uHz,
-                                                           pThisStrmIn->Props.cChannels, pThisStrmIn->Props.cBits);
-        if (rc == VERR_NOT_SUPPORTED)
-        {
-            LogFlowFunc(("No RDP client connected, so no input recording supported\n"));
-            rc = VINF_SUCCESS;
-        }
-    }
-    else if (enmStreamCmd == PDMAUDIOSTREAMCMD_DISABLE)
-    {
-        pDrv->pConsoleVRDPServer->SendAudioInputEnd(NULL /* pvUserCtx */);
-        rc = VINF_SUCCESS;
-    }
-    else
-        rc = VERR_INVALID_PARAMETER;
-
-    return rc;
-}
-
-static DECLCALLBACK(int) drvAudioVRDEGetConf(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDCFG pCfg)
-{
-    pCfg->cbStreamOut     = sizeof(VRDESTREAMOUT);
-    pCfg->cbStreamIn      = sizeof(VRDESTREAMIN);
-    pCfg->cMaxHstStrmsOut = 1;
-    pCfg->cMaxHstStrmsIn  = 2; /* Microphone in + Line in. */
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(void) drvAudioVRDEShutdown(PPDMIHOSTAUDIO pInterface)
-{
-    PDRVAUDIOVRDE pDrv = RT_FROM_MEMBER(pInterface, DRVAUDIOVRDE, IHostAudio);
-    AssertPtrReturnVoid(pDrv);
-
-    if (pDrv->pConsoleVRDPServer)
-        pDrv->pConsoleVRDPServer->SendAudioInputEnd(NULL);
-}
-
-/**
- * @interface_method_impl{PDMIBASE,pfnQueryInterface}
- */
-static DECLCALLBACK(void *) drvAudioVRDEQueryInterface(PPDMIBASE pInterface, const char *pszIID)
-{
-    PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
-    PDRVAUDIOVRDE pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIOVRDE);
-
-    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase);
-    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIHOSTAUDIO, &pThis->IHostAudio);
-    return NULL;
-}
-
-AudioVRDE::AudioVRDE(Console *pConsole)
-    : mpDrv(NULL),
-      mParent(pConsole)
-{
-}
-
-AudioVRDE::~AudioVRDE(void)
-{
-    if (mpDrv)
-    {
-        mpDrv->pAudioVRDE = NULL;
-        mpDrv = NULL;
-    }
-}
-
-int AudioVRDE::onVRDEControl(bool fEnable, uint32_t uFlags)
-{
-    LogFlowThisFunc(("fEnable=%RTbool, uFlags=0x%x\n", fEnable, uFlags));
-
-    if (mpDrv == NULL)
-        return VERR_INVALID_STATE;
-
-    mpDrv->fEnabled = fEnable;
-
-    return VINF_SUCCESS; /* Never veto. */
-}
-
-/**
- * Marks the beginning of sending captured audio data from a connected
- * RDP client.
- *
- * @return  IPRT status code.
- * @param   pvContext               The context; in this case a pointer to a
- *                                  VRDESTREAMIN structure.
- * @param   pVRDEAudioBegin         Pointer to a VRDEAUDIOINBEGIN structure.
- */
-int AudioVRDE::onVRDEInputBegin(void *pvContext, PVRDEAUDIOINBEGIN pVRDEAudioBegin)
-{
-    AssertPtrReturn(pvContext, VERR_INVALID_POINTER);
-    AssertPtrReturn(pVRDEAudioBegin, VERR_INVALID_POINTER);
-
-    PVRDESTREAMIN pVRDEStrmIn = (PVRDESTREAMIN)pvContext;
-    AssertPtrReturn(pVRDEStrmIn, VERR_INVALID_POINTER);
-
-    VRDEAUDIOFORMAT audioFmt = pVRDEAudioBegin->fmt;
-
-    int iSampleHz  = VRDE_AUDIO_FMT_SAMPLE_FREQ(audioFmt);
-    int cChannels  = VRDE_AUDIO_FMT_CHANNELS(audioFmt);
-    int cBits      = VRDE_AUDIO_FMT_BITS_PER_SAMPLE(audioFmt);
-    bool fUnsigned = VRDE_AUDIO_FMT_SIGNED(audioFmt);
-
-    LogFlowFunc(("cbSample=%RU32, iSampleHz=%d, cChannels=%d, cBits=%d, fUnsigned=%RTbool\n",
-                 VRDE_AUDIO_FMT_BYTES_PER_SAMPLE(audioFmt), iSampleHz, cChannels, cBits, fUnsigned));
-
-    return VINF_SUCCESS;
-}
-
-int AudioVRDE::onVRDEInputData(void *pvContext, const void *pvData, uint32_t cbData)
-{
-    PVRDESTREAMIN pVRDEStrmIn = (PVRDESTREAMIN)pvContext;
-    AssertPtrReturn(pVRDEStrmIn, VERR_INVALID_POINTER);
-
-    PPDMAUDIOHSTSTRMIN pHstStrmIn = &pVRDEStrmIn->HstStrmIn;
-    AssertPtrReturn(pHstStrmIn, VERR_INVALID_POINTER);
-
-    /** @todo Use CritSect! */
-
-    uint32_t cWritten;
-    int rc = AudioMixBufWriteCirc(&pHstStrmIn->MixBuf, pvData, cbData, &cWritten);
-    if (RT_SUCCESS(rc))
-        pVRDEStrmIn->cSamplesCaptured += cWritten;
-
-    LogFlowFunc(("cbData=%RU32, cWritten=%RU32, cSamplesCaptured=%RU32, rc=%Rrc\n",
-                 cbData, cWritten, pVRDEStrmIn->cSamplesCaptured, rc));
-    return rc;
-}
-
-int AudioVRDE::onVRDEInputEnd(void *pvContext)
-{
-    NOREF(pvContext);
-
-    return VINF_SUCCESS;
-}
-
-int AudioVRDE::onVRDEInputIntercept(bool fEnabled)
-{
-    return VINF_SUCCESS; /* Never veto. */
-}
-
-/**
- * Construct a VRDE audio driver instance.
- *
- * @copydoc FNPDMDRVCONSTRUCT
- */
-/* static */
-DECLCALLBACK(int) AudioVRDE::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
-{
-    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
-    PDRVAUDIOVRDE pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIOVRDE);
-    AssertPtrReturn(pDrvIns, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
-
-    LogRel(("Audio: Initializing VRDE driver\n"));
-    LogFlowFunc(("fFlags=0x%x\n", fFlags));
-
-    AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER,
-                    ("Configuration error: Not possible to attach anything to this driver!\n"),
-                    VERR_PDM_DRVINS_NO_ATTACH);
-
-    /*
-     * Init the static parts.
-     */
-    pThis->pDrvIns                   = pDrvIns;
-    /* IBase */
-    pDrvIns->IBase.pfnQueryInterface = drvAudioVRDEQueryInterface;
-    /* IHostAudio */
-    PDMAUDIO_IHOSTAUDIO_CALLBACKS(drvAudioVRDE);
-
-    /* Init defaults. */
-    pThis->fEnabled = false;
-
-    /*
-     * Get the ConsoleVRDPServer object pointer.
-     */
-    void *pvUser;
-    int rc = CFGMR3QueryPtr(pCfg, "ObjectVRDPServer", &pvUser);
-    AssertMsgRCReturn(rc, ("Confguration error: No/bad \"ObjectVRDPServer\" value, rc=%Rrc\n", rc), rc);
-
-    /* CFGM tree saves the pointer to ConsoleVRDPServer in the Object node of AudioVRDE. */
-    pThis->pConsoleVRDPServer = (ConsoleVRDPServer *)pvUser;
-
-    /*
-     * Get the AudioVRDE object pointer.
-     */
-    pvUser = NULL;
-    rc = CFGMR3QueryPtr(pCfg, "Object", &pvUser);
-    AssertMsgRCReturn(rc, ("Confguration error: No/bad \"Object\" value, rc=%Rrc\n", rc), rc);
-
-    pThis->pAudioVRDE = (AudioVRDE *)pvUser;
-    pThis->pAudioVRDE->mpDrv = pThis;
-
-    /*
-     * Get the interface for the above driver (DrvAudio) to make mixer/conversion calls.
-     * Described in CFGM tree.
-     */
-    pThis->pDrvAudio = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMIAUDIOCONNECTOR);
-    AssertMsgReturn(pThis->pDrvAudio, ("Configuration error: No upper interface specified!\n"), VERR_PDM_MISSING_INTERFACE_ABOVE);
-
-    return VINF_SUCCESS;
-}
-
-
-/**
- * @interface_method_impl{PDMDRVREG,pfnDestruct}
- */
-/* static */
-DECLCALLBACK(void) AudioVRDE::drvDestruct(PPDMDRVINS pDrvIns)
-{
-    PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns);
-    PDRVAUDIOVRDE pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIOVRDE);
-    LogFlowFuncEnter();
-
-    /*
-     * If the AudioVRDE object is still alive, we must clear it's reference to
-     * us since we'll be invalid when we return from this method.
-     */
-    if (pThis->pAudioVRDE)
-    {
-        pThis->pAudioVRDE->mpDrv = NULL;
-        pThis->pAudioVRDE = NULL;
-    }
-}
-
-
-/**
- * VRDE audio driver registration record.
- */
-const PDMDRVREG AudioVRDE::DrvReg =
-{
-    PDM_DRVREG_VERSION,
-    /* szName */
-    "AudioVRDE",
-    /* szRCMod */
-    "",
-    /* szR0Mod */
-    "",
-    /* pszDescription */
-    "Audio driver for VRDE backend",
-    /* fFlags */
-    PDM_DRVREG_FLAGS_HOST_BITS_DEFAULT,
-    /* fClass. */
-    PDM_DRVREG_CLASS_AUDIO,
-    /* cMaxInstances */
-    ~0U,
-    /* cbInstance */
-    sizeof(DRVAUDIOVRDE),
-    /* pfnConstruct */
-    AudioVRDE::drvConstruct,
-    /* pfnDestruct */
-    AudioVRDE::drvDestruct,
-    /* pfnRelocate */
-    NULL,
-    /* pfnIOCtl */
-    NULL,
-    /* pfnPowerOn */
-    NULL,
-    /* pfnReset */
-    NULL,
-    /* pfnSuspend */
-    NULL,
-    /* pfnResume */
-    NULL,
-    /* pfnAttach */
-    NULL,
-    /* pfnDetach */
-    NULL,
-    /* pfnPowerOff */
-    NULL,
-    /* pfnSoftReset */
-    NULL,
-    /* u32EndVersion */
-    PDM_DRVREG_VERSION
-};
-
diff --git a/src/VBox/Main/src-client/DrvAudioVideoRec.cpp b/src/VBox/Main/src-client/DrvAudioVideoRec.cpp
index c0da637..0f7b07f 100644
--- a/src/VBox/Main/src-client/DrvAudioVideoRec.cpp
+++ b/src/VBox/Main/src-client/DrvAudioVideoRec.cpp
@@ -42,7 +42,7 @@
 #define CA_STATUS_INIT      UINT32_C(2) /* The device is initialized */
 #define CA_STATUS_IN_UNINIT UINT32_C(3) /* The device is currently uninitializing */
 
-//@todo move t_sample as a PDM interface
+/// @todo move t_sample as a PDM interface
 //typedef struct { int mute;  uint32_t r; uint32_t l; } volume_t;
 
 #define INT_MAX         0x7fffffff
@@ -129,7 +129,7 @@ static DECLCALLBACK(int) drvAudioVideoRecInit(PPDMIHOSTAUDIO pInterface)
 }
 
 /** @todo Replace this with drvAudioHlpPcmPropsFromCfg(). */
-static int drvAudioVideoRecPcmInitInfo(PDMPCMPROPS * pProps, PPDMAUDIOSTREAMCFG as)
+static int drvAudioVideoRecPcmInitInfo(PDMAUDIOPCMPROPS * pProps, PPDMAUDIOSTREAMCFG as)
 {
     int rc = VINF_SUCCESS;
 
@@ -211,9 +211,9 @@ static int audio_pcm_hw_get_live_out2 (PPDMAUDIOHSTSTRMOUT hw, int *nb_live)
     {
         int live = smin;
 
-        if (live < 0 || live > hw->cSamples)
+        if (live < 0 || live > hw->cSampleBufferSize)
         {
-            LogFlowFunc(("Error: live=%d hw->samples=%d\n", live, hw->cSamples));
+            LogFlowFunc(("Error: live=%d hw->samples=%d\n", live, hw->cSampleBufferSize));
             return 0;
         }
         return live;
@@ -227,9 +227,9 @@ static int audio_pcm_hw_get_live_out (PPDMAUDIOHSTSTRMOUT hw)
     int live;
 
     live = audio_pcm_hw_get_live_out2 (hw, &nb_live);
-    if (live < 0 || live > hw->cSamples)
+    if (live < 0 || live > hw->cSampleBufferSize)
     {
-        LogFlowFunc(("Error: live=%d hw->samples=%d\n", live, hw->cSamples));
+        LogFlowFunc(("Error: live=%d hw->samples=%d\n", live, hw->cSampleBufferSize));
         return 0;
     }
     return live;
@@ -256,9 +256,9 @@ static int audio_pcm_hw_find_min_in (PPDMAUDIOHSTSTRMIN hw)
 int audio_pcm_hw_get_live_in (PPDMAUDIOHSTSTRMIN hw)
 {
     int live = hw->cTotalSamplesCaptured - audio_pcm_hw_find_min_in (hw);
-    if (live < 0 || live > hw->cSamples)
+    if (live < 0 || live > hw->cSampleBufferSize)
     {
-        LogFlowFunc(("Error: live=%d hw->samples=%d\n", live, hw->cSamples));
+        LogFlowFunc(("Error: live=%d hw->samples=%d\n", live, hw->cSampleBufferSize));
         return 0;
     }
     return live;
@@ -382,7 +382,7 @@ static DECLCALLBACK(int) drvAudioVideoRecInitOut(PPDMIHOSTAUDIO pInterface, PPDM
     PDRVAUDIOVIDEOREC pDrv = RT_FROM_MEMBER(pInterface, DRVAUDIOVIDEOREC, IHostAudio);
 
     PVIDEORECAUDIOOUT pVRDEVoiceOut = (PVIDEORECAUDIOOUT)pHostVoiceOut;
-    pHostVoiceOut->cSamples = _4K; /* 4096 samples * 4 = 16K bytes total. */
+    pHostVoiceOut->cSampleBufferSize = _4K; /* 4096 samples * 4 = 16K bytes total. */
 
     return drvAudioVideoRecPcmInitInfo(&pVRDEVoiceOut->pHostVoiceOut.Props, pCfg);
 }
@@ -393,7 +393,7 @@ static DECLCALLBACK(int) drvAudioVideoRecInitIn(PPDMIHOSTAUDIO pInterface, PPDMA
     PDRVAUDIOVIDEOREC pDrv = RT_FROM_MEMBER(pInterface, DRVAUDIOVIDEOREC, IHostAudio);
 
     PVIDEORECAUDIOIN pVRDEVoice = (PVIDEORECAUDIOIN)pHostVoiceIn;
-    pHostVoiceIn->cSamples = _4K; /* 4096 samples * 4 = 16K bytes total. */
+    pHostVoiceIn->cSampleBufferSize = _4K; /* 4096 samples * 4 = 16K bytes total. */
 
     return drvAudioVideoRecPcmInitInfo(&pVRDEVoice->pHostVoiceIn.Props, pCfg);
 }
@@ -417,7 +417,7 @@ static DECLCALLBACK(int) drvAudioVideoRecCaptureIn(PPDMIHOSTAUDIO pInterface, PP
     size_t cSamplesRingBuffer = RTCircBufUsed(pVRDEVoice->pRecordedVoiceBuf) / sizeof(PDMAUDIOSAMPLE);
 
     /* How much space is available in the mix buffer. Use the smaller size of the too. */
-    cSamplesRingBuffer = RT_MIN(cSamplesRingBuffer, (uint32_t)(pVRDEVoice->pHostVoiceIn.cSamples -
+    cSamplesRingBuffer = RT_MIN(cSamplesRingBuffer, (uint32_t)(pVRDEVoice->pHostVoiceIn.cSampleBufferSize -
                                 audio_pcm_hw_get_live_in (&pVRDEVoice->pHostVoiceIn)));
 
     LogFlowFunc(("Start reading buffer with %d samples (%d bytes)\n", cSamplesRingBuffer,
@@ -429,14 +429,14 @@ static DECLCALLBACK(int) drvAudioVideoRecCaptureIn(PPDMIHOSTAUDIO pInterface, PP
     {
         /* How much is left? Split request at the end of our samples buffer. */
         size_t cSamplesToRead = RT_MIN(cSamplesRingBuffer - cSamplesRead,
-                                       (uint32_t)(pVRDEVoice->pHostVoiceIn.cSamples - pVRDEVoice->pHostVoiceIn.offSamplesWritten));
+                                       (uint32_t)(pVRDEVoice->pHostVoiceIn.cSampleBufferSize - pVRDEVoice->pHostVoiceIn.offSamplesWritten));
         size_t cbToRead = cSamplesToRead * sizeof(PDMAUDIOSAMPLE);
         LogFlowFunc(("Try reading %zu samples (%zu bytes)\n", cSamplesToRead, cbToRead));
 
         /* Try to acquire the necessary block from the ring buffer. Remeber in fltRecrodCallback we
          * we are filling this buffer with the audio data available from VRDP. Here we are reading it
          */
-        /*todo do I need to introduce a thread to fill the buffer in fltRecordcallback. So that
+        /** @todo do I need to introduce a thread to fill the buffer in fltRecordcallback. So that
          * filling is in separate thread and the reading of that buffer is in separate thread
          */
         void *pvSrc;
@@ -461,7 +461,7 @@ static DECLCALLBACK(int) drvAudioVideoRecCaptureIn(PPDMIHOSTAUDIO pInterface, PP
             break;
 
         pVRDEVoice->pHostVoiceIn.offSamplesWritten = (pVRDEVoice->pHostVoiceIn.offSamplesWritten + cSamplesToRead)
-                                              % pVRDEVoice->pHostVoiceIn.cSamples;
+                                              % pVRDEVoice->pHostVoiceIn.cSampleBufferSize;
 
         /* How much have we reads so far. */
         cSamplesRead += cSamplesToRead;
@@ -501,22 +501,22 @@ static DECLCALLBACK(int) drvAudioVideoRecPlayOut(PPDMIHOSTAUDIO pInterface, PPDM
     LogFlowFunc(("freq=%d, chan=%d, cBits = %d, fsigned = %d, cSamples=%d format=%d\n",
                  pHostVoiceOut->Props.uHz, pHostVoiceOut->Props.cChannels,
                  pHostVoiceOut->Props.cBits, pHostVoiceOut->Props.fSigned,
-                 pHostVoiceOut->cSamples, format));
+                 pHostVoiceOut->cSampleBufferSize, format));
 
     pVRDEVoiceOut->old_ticks = now;
     int cSamplesToSend = RT_MIN(live, cSamplesPlayed);
 
-    if (pHostVoiceOut->cOffSamplesRead + cSamplesToSend > pHostVoiceOut->cSamples)
+    if (pHostVoiceOut->cOffSamplesRead + cSamplesToSend > pHostVoiceOut->cSampleBufferSize)
     {
         /* send the samples till the end of pHostStereoSampleBuf */
         pDrv->pConsoleVRDPServer->SendAudioSamples(&pHostVoiceOut->paSamples[pHostVoiceOut->cOffSamplesRead],
-                                                   (pHostVoiceOut->cSamples - pHostVoiceOut->cOffSamplesRead), format);
+                                                   (pHostVoiceOut->cSampleBufferSize - pHostVoiceOut->cOffSamplesRead), format);
         /*pHostStereoSampleBuff already has the samples which exceeded its space. They have overwriten the old
          * played sampled starting from offset 0. So based on the number of samples that we had to play,
          * read the number of samples from offset 0 .
          */
         pDrv->pConsoleVRDPServer->SendAudioSamples(&pHostVoiceOut->paSamples[0],
-                                                   (cSamplesToSend - (pHostVoiceOut->cSamples -
+                                                   (cSamplesToSend - (pHostVoiceOut->cSampleBufferSize -
                                                                       pHostVoiceOut->cOffSamplesRead)),
                                                    format);
     }
@@ -526,7 +526,7 @@ static DECLCALLBACK(int) drvAudioVideoRecPlayOut(PPDMIHOSTAUDIO pInterface, PPDM
                                                    cSamplesToSend, format);
     }
 
-    pHostVoiceOut->cOffSamplesRead = (pHostVoiceOut->cOffSamplesRead + cSamplesToSend) % pHostVoiceOut->cSamples;
+    pHostVoiceOut->cOffSamplesRead = (pHostVoiceOut->cOffSamplesRead + cSamplesToSend) % pHostVoiceOut->cSampleBufferSize;
 
     *pcSamplesPlayed = cSamplesToSend;
     return VINF_SUCCESS;
@@ -572,7 +572,7 @@ static DECLCALLBACK(int) drvAudioVideoRecControlIn(PPDMIHOSTAUDIO pInterface, PP
     /* initialize only if not already done */
     if (enmStreamCmd == PDMAUDIOSTREAMCMD_ENABLE)
     {
-        //@todo if (!pVRDEVoice->fIsInit)
+        /// @todo if (!pVRDEVoice->fIsInit)
         //    RTCircBufReset(pVRDEVoice->pRecordedVoiceBuf);
         pVRDEVoice->fIsInit = 1;
         pVRDEVoice->pHostVoiceIn = *pHostVoiceIn;
@@ -583,14 +583,14 @@ static DECLCALLBACK(int) drvAudioVideoRecControlIn(PPDMIHOSTAUDIO pInterface, PP
         pVRDEVoice->pvRateBuffer = NULL;
         pVRDEVoice->cbRateBufferAllocated = 0;
 
-        pVRDEVoice->pHostVoiceIn.cSamples = 2048;
+        pVRDEVoice->pHostVoiceIn.cSampleBufferSize = 2048;
         /* Initialize the hardware info section with the audio settings */
 
         ASMAtomicWriteU32(&pVRDEVoice->status, CA_STATUS_IN_INIT);
 
         /* Create the internal ring buffer. */
         RTCircBufCreate(&pVRDEVoice->pRecordedVoiceBuf,
-                        pVRDEVoice->pHostVoiceIn.cSamples * sizeof(PDMAUDIOSAMPLE));
+                        pVRDEVoice->pHostVoiceIn.cSampleBufferSize * sizeof(PDMAUDIOSAMPLE));
 
         if (!RT_VALID_PTR(pVRDEVoice->pRecordedVoiceBuf))
         {
@@ -599,7 +599,7 @@ static DECLCALLBACK(int) drvAudioVideoRecControlIn(PPDMIHOSTAUDIO pInterface, PP
         }
 
         ASMAtomicWriteU32(&pVRDEVoice->status, CA_STATUS_INIT);
-        return pDrv->pConsoleVRDPServer->SendAudioInputBegin(NULL, pVRDEVoice, pHostVoiceIn->cSamples,
+        return pDrv->pConsoleVRDPServer->SendAudioInputBegin(NULL, pVRDEVoice, pHostVoiceIn->cSampleBufferSize,
                                                              pHostVoiceIn->Props.uHz,
                                                              pHostVoiceIn->Props.cChannels, pHostVoiceIn->Props.cBits);
     }
@@ -703,7 +703,7 @@ int AudioVideoRec::handleVideoRecSvrCmdAudioInputEventBegin(void *pvContext, int
     LogFlowFunc(("Required freq as requested by VRDP Server = %d\n", iSampleHz));
     //if (iSampleHz && iSampleHz != pVRDEVoice->pHostVoiceIn.Props.uFrequency)
     {
-        /* @todo if the above condition is false then pVRDEVoice->uFrequency will remain 0 */
+        /** @todo if the above condition is false then pVRDEVoice->uFrequency will remain 0 */
         /*mpDrv->pUpPort->pfnPrepareAudioConversion(mpDrv->pUpPort, iSampleHz,
                                                   pVRDEVoice->pHostVoiceIn.Props.uFrequency,
                                                   &pVRDEVoice->rate);*/
@@ -736,7 +736,7 @@ int AudioVideoRec::handleVideoRecSvrCmdAudioInputEventData(void *pvContext, cons
     pVRDEVoice->convAudioDevFmtToStSampl(pHostStereoSampleBuf, pvData, cSamples, &videorec_nominal_volume);
 
     /* count of rate adjusted samples */
-    pVRDEVoice->uFrequency = 22100; /* @todo handle this. How pVRDEVoice will get proper value */
+    pVRDEVoice->uFrequency = 22100; /** @todo handle this. How pVRDEVoice will get proper value */
     cConvertedSamples = (cSamples * pVRDEVoice->pHostVoiceIn.Props.uHz) / pVRDEVoice->uFrequency;
     vrdeReallocRateAdjSampleBuf(pVRDEVoice, cConvertedSamples);
 
diff --git a/src/VBox/Main/src-client/DrvAudioVideoRec_old.cpp b/src/VBox/Main/src-client/DrvAudioVideoRec_old.cpp
deleted file mode 100644
index a8d0c35..0000000
--- a/src/VBox/Main/src-client/DrvAudioVideoRec_old.cpp
+++ /dev/null
@@ -1,911 +0,0 @@
-/* $Id: DrvAudioVideoRec_old.cpp $ */
-/** @file
- * Video recording audio backend for Main.
- */
-
-/*
- * Copyright (C) 2014-2015 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-#include "DrvAudioVideoRec_old.h"
-#include "ConsoleImpl.h"
-#include "ConsoleVRDPServer.h"
-
-#include "Logging.h"
-
-#include <iprt/mem.h>
-#include <iprt/cdefs.h>
-#include <iprt/circbuf.h>
-
-#include <VBox/vmm/pdmaudioifs.h>
-#include <VBox/vmm/pdmdrv.h>
-#include <VBox/RemoteDesktop/VRDE.h>
-#include <VBox/vmm/cfgm.h>
-#include <VBox/err.h>
-
-#ifdef LOG_GROUP
- #undef LOG_GROUP
-#endif
-#define LOG_GROUP LOG_GROUP_DEV_AUDIO
-#include <VBox/log.h>
-
-/* Initialization status indicator used for the recreation of the AudioUnits. */
-#define CA_STATUS_UNINIT    UINT32_C(0) /* The device is uninitialized */
-#define CA_STATUS_IN_INIT   UINT32_C(1) /* The device is currently initializing */
-#define CA_STATUS_INIT      UINT32_C(2) /* The device is initialized */
-#define CA_STATUS_IN_UNINIT UINT32_C(3) /* The device is currently uninitializing */
-
-//@todo move t_sample as a PDM interface
-//typedef struct { int mute;  uint32_t r; uint32_t l; } volume_t;
-
-#define INT_MAX         0x7fffffff
-volume_t videorec_nominal_volume = {
-    0,
-    INT_MAX,
-    INT_MAX
-};
-
-/* The desired buffer length in milliseconds. Will be the target total stream
- * latency on newer version of pulse. Apparent latency can be less (or more.)
- * In case its need to be used. Currently its not used.
- */
-#if 0
-static struct
-{
-    int         buffer_msecs_out;
-    int         buffer_msecs_in;
-} confAudioVideoRec
-=
-{
-    INIT_FIELD (.buffer_msecs_out = ) 100,
-    INIT_FIELD (.buffer_msecs_in  = ) 100,
-};
-#endif
-
-/**
- * Audio video recording driver instance data.
- *
- * @extends PDMIAUDIOSNIFFERCONNECTOR
- */
-typedef struct DRVAUDIOVIDEOREC
-{
-    /** Pointer to audio video recording object. */
-    AudioVideoRec      *pAudioVideoRec;
-    PPDMDRVINS          pDrvIns;
-    /** Pointer to the driver instance structure. */
-    PDMIHOSTAUDIO       IHostAudio;
-    ConsoleVRDPServer *pConsoleVRDPServer;
-    /** Pointer to the DrvAudio port interface that is above it. */
-    PPDMIAUDIOCONNECTOR       pUpPort;
-} DRVAUDIOVIDEOREC, *PDRVAUDIOVIDEOREC;
-typedef struct PDMAUDIOHSTSTRMOUT PDMAUDIOHSTSTRMOUT;
-typedef PDMAUDIOHSTSTRMOUT *PPDMAUDIOHSTSTRMOUT;
-
-typedef struct VIDEORECAUDIOIN
-{
-    /* Audio and audio details for recording */
-    PDMAUDIOHSTSTRMIN   pHostVoiceIn;
-    void * pvUserCtx;
-    /* Number of bytes per frame (bitsPerSample * channels) of the actual input format. */
-    uint32_t cBytesPerFrame;
-    /* Frequency of the actual audio format. */
-    uint32_t uFrequency;
-    /* If the actual format frequence differs from the requested format, this is not NULL. */
-    void *rate;
-    /* Temporary buffer for st_sample_t representation of the input audio data. */
-    void *pvSamplesBuffer;
-    /* buffer for bytes of samples (not rate converted) */
-    uint32_t cbSamplesBufferAllocated;
-    /* Temporary buffer for frequency conversion. */
-    void *pvRateBuffer;
-    /* buffer for bytes rate converted samples */
-    uint32_t cbRateBufferAllocated;
-    /* A ring buffer for transferring data to the playback thread */
-    PRTCIRCBUF pRecordedVoiceBuf;
-    t_sample * convAudioDevFmtToStSampl;
-    uint32_t fIsInit;
-    uint32_t status;
-} VIDEORECAUDIOIN, *PVIDEORECAUDIOIN;
-
-typedef struct VIDEORECAUDIOOUT
-{
-    PDMAUDIOHSTSTRMOUT pHostVoiceOut;
-    uint64_t old_ticks;
-    uint64_t cSamplesSentPerSec;
-} VIDEORECAUDIOOUT, *PVIDEORECAUDIOOUT;
-
-static DECLCALLBACK(int) drvAudioVideoRecInit(PPDMIHOSTAUDIO pInterface)
-{
-    LogFlowFuncEnter();
-
-    return VINF_SUCCESS;
-}
-
-/** @todo Replace this with drvAudioHlpPcmPropsFromCfg(). */
-static int drvAudioVideoRecPcmInitInfo(PDMPCMPROPS * pProps, PPDMAUDIOSTREAMCFG as)
-{
-    int rc = VINF_SUCCESS;
-
-    uint8_t cBits = 8, cShift = 0;
-    bool fSigned = false;
-
-    switch (as->enmFormat)
-    {
-        case AUD_FMT_S8:
-            fSigned = 1;
-        case AUD_FMT_U8:
-            break;
-
-        case AUD_FMT_S16:
-            fSigned = 1;
-        case AUD_FMT_U16:
-            cBits = 16;
-            cShift = 1;
-            break;
-
-        case AUD_FMT_S32:
-            fSigned = 1;
-        case AUD_FMT_U32:
-            cBits = 32;
-            cShift = 2;
-            break;
-
-        default:
-            rc = VERR_NOT_SUPPORTED;
-            break;
-    }
-
-    pProps->uHz = as->uHz;
-    pProps->cBits = cBits;
-    pProps->fSigned = fSigned;
-    pProps->cChannels = as->cChannels;
-    pProps->cShift = (as->cChannels == 2) + cShift;
-    pProps->uAlign = (1 << pProps->cShift) - 1;
-    pProps->cbPerSec = pProps->uHz << pProps->cShift;
-    pProps->fSwapEndian = (as->enmEndianness != PDMAUDIOHOSTENDIANESS);
-
-    return rc;
-}
-
-/*
- * Hard voice (playback)
- */
-static int audio_pcm_hw_find_min_out (PPDMAUDIOHSTSTRMOUT hw, int *nb_livep)
-{
-    PPDMAUDIOGSTSTRMOUT sw;
-    PPDMAUDIOGSTSTRMOUT pIter;
-    int m = INT_MAX;
-    int nb_live = 0;
-
-    RTListForEach(&hw->lstGstStrmOut, pIter, PDMAUDIOGSTSTRMOUT, Node)
-    {
-        sw = pIter;
-        if (sw->State.fActive || !sw->State.fEmpty)
-        {
-            m = RT_MIN (m, sw->cTotalSamplesWritten);
-            nb_live += 1;
-        }
-    }
-
-    *nb_livep = nb_live;
-    return m;
-}
-
-static int audio_pcm_hw_get_live_out2 (PPDMAUDIOHSTSTRMOUT hw, int *nb_live)
-{
-    int smin;
-
-    smin = audio_pcm_hw_find_min_out (hw, nb_live);
-
-    if (!*nb_live) {
-        return 0;
-    }
-    else
-    {
-        int live = smin;
-
-        if (live < 0 || live > hw->cSamples)
-        {
-            LogFlowFunc(("Error: live=%d hw->samples=%d\n", live, hw->cSamples));
-            return 0;
-        }
-        return live;
-    }
-}
-
-
-static int audio_pcm_hw_get_live_out (PPDMAUDIOHSTSTRMOUT hw)
-{
-    int nb_live;
-    int live;
-
-    live = audio_pcm_hw_get_live_out2 (hw, &nb_live);
-    if (live < 0 || live > hw->cSamples)
-    {
-        LogFlowFunc(("Error: live=%d hw->samples=%d\n", live, hw->cSamples));
-        return 0;
-    }
-    return live;
-}
-
-/*
- * Hard voice (capture)
- */
-static int audio_pcm_hw_find_min_in (PPDMAUDIOHSTSTRMIN hw)
-{
-    PPDMAUDIOGSTSTRMIN pIter;
-    int m = hw->cTotalSamplesCaptured;
-
-    RTListForEach(&hw->lstGstStreamsIn, pIter, PDMAUDIOGSTSTRMIN, Node)
-    {
-        if (pIter->State.fActive)
-        {
-            m = RT_MIN (m, pIter->cTotalHostSamplesRead);
-        }
-    }
-    return m;
-}
-
-int audio_pcm_hw_get_live_in (PPDMAUDIOHSTSTRMIN hw)
-{
-    int live = hw->cTotalSamplesCaptured - audio_pcm_hw_find_min_in (hw);
-    if (live < 0 || live > hw->cSamples)
-    {
-        LogFlowFunc(("Error: live=%d hw->samples=%d\n", live, hw->cSamples));
-        return 0;
-    }
-    return live;
-}
-
-static inline void *advance (void *p, int incr)
-{
-    uint8_t *d = (uint8_t*)p;
-    return (d + incr);
-}
-
-static int vrdeReallocSampleBuf(PVIDEORECAUDIOIN pVRDEVoice, uint32_t cSamples)
-{
-    uint32_t cbBuffer = cSamples * sizeof(PDMAUDIOSAMPLE);
-    if (cbBuffer > pVRDEVoice->cbSamplesBufferAllocated)
-    {
-        /** @todo r=andy Why not using RTMemReAlloc? */
-        if (pVRDEVoice->pvSamplesBuffer)
-        {
-            RTMemFree(pVRDEVoice->pvSamplesBuffer);
-            pVRDEVoice->pvSamplesBuffer = NULL;
-        }
-        pVRDEVoice->pvSamplesBuffer = RTMemAlloc(cbBuffer);
-        if (pVRDEVoice->pvSamplesBuffer)
-            pVRDEVoice->cbSamplesBufferAllocated = cbBuffer;
-        else
-            pVRDEVoice->cbSamplesBufferAllocated = 0;
-    }
-
-    return VINF_SUCCESS;
-}
-
-static int vrdeReallocRateAdjSampleBuf(PVIDEORECAUDIOIN pVRDEVoice, uint32_t cSamples)
-{
-    uint32_t cbBuffer = cSamples * sizeof(PDMAUDIOSAMPLE);
-    if (cbBuffer > pVRDEVoice->cbRateBufferAllocated)
-    {
-        RTMemFree(pVRDEVoice->pvRateBuffer);
-        pVRDEVoice->pvRateBuffer = RTMemAlloc(cbBuffer);
-        if (pVRDEVoice->pvRateBuffer)
-            pVRDEVoice->cbRateBufferAllocated = cbBuffer;
-        else
-            pVRDEVoice->cbRateBufferAllocated = 0;
-    }
-
-    return VINF_SUCCESS;
-}
-
-/*******************************************************************************
- *
- * AudioVideoRec input section
- *
- ******************************************************************************/
-
-/*
- * Callback to feed audio input buffer. Samples format is be the same as
- * in the voice. The caller prepares st_sample_t.
- *
- * @param cbSamples Size of pvSamples array in bytes.
- * @param pvSamples Points to an array of samples.
- *
- * @return IPRT status code.
- */
-static int vrdeRecordingCallback(PVIDEORECAUDIOIN pVRDEVoice, uint32_t cbSamples, const void *pvSamples)
-{
-    int rc = VINF_SUCCESS;
-    size_t csWritten = 0;
-
-    Assert((cbSamples % sizeof(PDMAUDIOSAMPLE)) == 0);
-
-    if (!pVRDEVoice->fIsInit)
-        return VINF_SUCCESS;
-
-    /* If nothing is pending return immediately. */
-    if (cbSamples == 0)
-        return VINF_SUCCESS;
-
-    /* How much space is free in the ring buffer? */
-    size_t csAvail = RTCircBufFree(pVRDEVoice->pRecordedVoiceBuf) / sizeof(PDMAUDIOSAMPLE); /* bytes -> samples */
-
-    /* How much space is used in the audio buffer. Use the smaller size of the too. */
-    csAvail = RT_MIN(csAvail, cbSamples / sizeof(PDMAUDIOSAMPLE));
-
-    /* Iterate as long as data is available. */
-    while (csWritten < csAvail)
-    {
-        /* How much is left? */
-        size_t csToWrite = csAvail - csWritten;
-        size_t cbToWrite = csToWrite * sizeof(PDMAUDIOSAMPLE);
-
-        /* Try to acquire the necessary space from the ring buffer. */
-        void *pcDst;
-        RTCircBufAcquireWriteBlock(pVRDEVoice->pRecordedVoiceBuf, cbToWrite, &pcDst, &cbToWrite);
-
-        /* How much do we get? */
-        csToWrite = cbToWrite / sizeof(PDMAUDIOSAMPLE);
-
-        /* Copy the data from the audio buffer to the ring buffer in PVRDEVoice. */
-        if (csToWrite)
-        {
-            memcpy(pcDst, (uint8_t *)pvSamples + (csWritten * sizeof(PDMAUDIOSAMPLE)), cbToWrite);
-            csWritten += csToWrite;
-        }
-
-        /* Release the ring buffer, so the main thread could start reading this data. */
-        RTCircBufReleaseWriteBlock(pVRDEVoice->pRecordedVoiceBuf, cbToWrite);
-
-        if (RT_UNLIKELY(csToWrite == 0))
-            break;
-    }
-
-    LogFlowFunc(("Finished writing buffer with %RU32 samples (%RU32 bytes)\n",
-                 csWritten, csWritten * sizeof(PDMAUDIOSAMPLE)));
-
-    return rc;
-}
-
-static DECLCALLBACK(int) drvAudioVideoRecInitOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHostVoiceOut, PPDMAUDIOSTREAMCFG pCfg)
-{
-    LogFlowFuncEnter();
-    PDRVAUDIOVIDEOREC pDrv = RT_FROM_MEMBER(pInterface, DRVAUDIOVIDEOREC, IHostAudio);
-
-    PVIDEORECAUDIOOUT pVRDEVoiceOut = (PVIDEORECAUDIOOUT)pHostVoiceOut;
-    pHostVoiceOut->cSamples = _4K; /* 4096 samples * 4 = 16K bytes total. */
-
-    return drvAudioVideoRecPcmInitInfo(&pVRDEVoiceOut->pHostVoiceOut.Props, pCfg);
-}
-
-static DECLCALLBACK(int) drvAudioVideoRecInitIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHostVoiceIn, PPDMAUDIOSTREAMCFG pCfg)
-{
-    LogFlowFuncEnter();
-    PDRVAUDIOVIDEOREC pDrv = RT_FROM_MEMBER(pInterface, DRVAUDIOVIDEOREC, IHostAudio);
-
-    PVIDEORECAUDIOIN pVRDEVoice = (PVIDEORECAUDIOIN)pHostVoiceIn;
-    pHostVoiceIn->cSamples = _4K; /* 4096 samples * 4 = 16K bytes total. */
-
-    return drvAudioVideoRecPcmInitInfo(&pVRDEVoice->pHostVoiceIn.Props, pCfg);
-}
-
-static DECLCALLBACK(int) drvAudioVideoRecCaptureIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHostVoiceIn,
-                                                   uint32_t *pcSamplesCaptured)
-{
-    /** @todo Take care of the size of the buffer allocated to pHostVoiceIn. */
-    PVIDEORECAUDIOIN pVRDEVoice = (PVIDEORECAUDIOIN)pHostVoiceIn;
-
-    /* use this from DrvHostCoreAudio.c */
-    if (ASMAtomicReadU32(&pVRDEVoice->status) != CA_STATUS_INIT)
-    {
-        LogFlowFunc(("VRDE voice not initialized\n"));
-
-        *pcSamplesCaptured = 0;
-        return VERR_GENERAL_FAILURE; /** @todo Fudge! */
-    }
-
-    /* how much space is used in the ring buffer in pRecordedVocieBuf with pAudioVideoRec . Bytes-> samples*/
-    size_t cSamplesRingBuffer = RTCircBufUsed(pVRDEVoice->pRecordedVoiceBuf) / sizeof(PDMAUDIOSAMPLE);
-
-    /* How much space is available in the mix buffer. Use the smaller size of the too. */
-    cSamplesRingBuffer = RT_MIN(cSamplesRingBuffer, (uint32_t)(pVRDEVoice->pHostVoiceIn.cSamples -
-                                audio_pcm_hw_get_live_in (&pVRDEVoice->pHostVoiceIn)));
-
-    LogFlowFunc(("Start reading buffer with %d samples (%d bytes)\n", cSamplesRingBuffer,
-                 cSamplesRingBuffer * sizeof(PDMAUDIOSAMPLE)));
-
-    /* Iterate as long as data is available */
-    size_t cSamplesRead = 0;
-    while (cSamplesRead < cSamplesRingBuffer)
-    {
-        /* How much is left? Split request at the end of our samples buffer. */
-        size_t cSamplesToRead = RT_MIN(cSamplesRingBuffer - cSamplesRead,
-                                       (uint32_t)(pVRDEVoice->pHostVoiceIn.cSamples - pVRDEVoice->pHostVoiceIn.offSamplesWritten));
-        size_t cbToRead = cSamplesToRead * sizeof(PDMAUDIOSAMPLE);
-        LogFlowFunc(("Try reading %zu samples (%zu bytes)\n", cSamplesToRead, cbToRead));
-
-        /* Try to acquire the necessary block from the ring buffer. Remeber in fltRecrodCallback we
-         * we are filling this buffer with the audio data available from VRDP. Here we are reading it
-         */
-        /*todo do I need to introduce a thread to fill the buffer in fltRecordcallback. So that
-         * filling is in separate thread and the reading of that buffer is in separate thread
-         */
-        void *pvSrc;
-        RTCircBufAcquireReadBlock(pVRDEVoice->pRecordedVoiceBuf, cbToRead, &pvSrc, &cbToRead);
-
-        /* How much to we get? */
-        cSamplesToRead = cbToRead / sizeof(PDMAUDIOSAMPLE);
-        LogFlowFunc(("AuderVRDE: There are %d samples (%d bytes) available\n", cSamplesToRead, cbToRead));
-
-        /* Break if nothing is used anymore. */
-        if (cSamplesToRead)
-        {
-            /* Copy the data from our ring buffer to the mix buffer. */
-            PPDMAUDIOSAMPLE psDst = pVRDEVoice->pHostVoiceIn.paSamples + pVRDEVoice->pHostVoiceIn.offSamplesWritten;
-            memcpy(psDst, pvSrc, cbToRead);
-        }
-
-        /* Release the read buffer, so it could be used for new data. */
-        RTCircBufReleaseReadBlock(pVRDEVoice->pRecordedVoiceBuf, cbToRead);
-
-        if (!cSamplesToRead)
-            break;
-
-        pVRDEVoice->pHostVoiceIn.offSamplesWritten = (pVRDEVoice->pHostVoiceIn.offSamplesWritten + cSamplesToRead)
-                                              % pVRDEVoice->pHostVoiceIn.cSamples;
-
-        /* How much have we reads so far. */
-        cSamplesRead += cSamplesToRead;
-    }
-
-    LogFlowFunc(("Finished reading buffer with %zu samples (%zu bytes)\n",
-                 cSamplesRead, cSamplesRead * sizeof(PDMAUDIOSAMPLE)));
-
-    *pcSamplesCaptured = cSamplesRead;
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) drvAudioVideoRecPlayOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHostVoiceOut,
-                                                 uint32_t *pcSamplesPlayed)
-{
-    PDRVAUDIOVIDEOREC pDrv = RT_FROM_MEMBER(pInterface, DRVAUDIOVIDEOREC, IHostAudio);
-    PVIDEORECAUDIOOUT pVRDEVoiceOut = (PVIDEORECAUDIOOUT)pHostVoiceOut;
-
-    /*
-     * Just call the VRDP server with the data.
-     */
-    int live = audio_pcm_hw_get_live_out(pHostVoiceOut);
-    uint64_t now = PDMDrvHlpTMGetVirtualTime(pDrv->pDrvIns);
-    uint64_t ticks = now  - pVRDEVoiceOut->old_ticks;
-    uint64_t ticks_per_second = PDMDrvHlpTMGetVirtualFreq(pDrv->pDrvIns);
-
-    int cSamplesPlayed = (int)((2 * ticks * pHostVoiceOut->Props.uHz + ticks_per_second) / ticks_per_second / 2);
-    if (cSamplesPlayed < 0)
-        cSamplesPlayed = live;
-
-    pHostVoiceOut->Props.cBits = 128; /** @todo Make this configurable (or at least a define)? */
-    VRDEAUDIOFORMAT format = VRDE_AUDIO_FMT_MAKE(pHostVoiceOut->Props.uHz,
-                                                 pHostVoiceOut->Props.cChannels,
-                                                 pHostVoiceOut->Props.cBits, /* bits per sample */
-                                                 !pHostVoiceOut->Props.fSigned);
-
-    LogFlowFunc(("freq=%d, chan=%d, cBits = %d, fsigned = %d, cSamples=%d format=%d\n",
-                 pHostVoiceOut->Props.uHz, pHostVoiceOut->Props.cChannels,
-                 pHostVoiceOut->Props.cBits, pHostVoiceOut->Props.fSigned,
-                 pHostVoiceOut->cSamples, format));
-
-    pVRDEVoiceOut->old_ticks = now;
-    int cSamplesToSend = RT_MIN(live, cSamplesPlayed);
-
-    if (pHostVoiceOut->cOffSamplesRead + cSamplesToSend > pHostVoiceOut->cSamples)
-    {
-        /* send the samples till the end of pHostStereoSampleBuf */
-        pDrv->pConsoleVRDPServer->SendAudioSamples(&pHostVoiceOut->paSamples[pHostVoiceOut->cOffSamplesRead],
-                                                   (pHostVoiceOut->cSamples - pHostVoiceOut->cOffSamplesRead), format);
-        /*pHostStereoSampleBuff already has the samples which exceeded its space. They have overwriten the old
-         * played sampled starting from offset 0. So based on the number of samples that we had to play,
-         * read the number of samples from offset 0 .
-         */
-        pDrv->pConsoleVRDPServer->SendAudioSamples(&pHostVoiceOut->paSamples[0],
-                                                   (cSamplesToSend - (pHostVoiceOut->cSamples -
-                                                                      pHostVoiceOut->cOffSamplesRead)),
-                                                   format);
-    }
-    else
-    {
-        pDrv->pConsoleVRDPServer->SendAudioSamples(&pHostVoiceOut->paSamples[pHostVoiceOut->cOffSamplesRead],
-                                                   cSamplesToSend, format);
-    }
-
-    pHostVoiceOut->cOffSamplesRead = (pHostVoiceOut->cOffSamplesRead + cSamplesToSend) % pHostVoiceOut->cSamples;
-
-    *pcSamplesPlayed = cSamplesToSend;
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) drvAudioVideoRecFiniIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN hw)
-{
-    PDRVAUDIOVIDEOREC pDrv = RT_FROM_MEMBER(pInterface, DRVAUDIOVIDEOREC, IHostAudio);
-    LogFlowFuncEnter();
-    pDrv->pConsoleVRDPServer->SendAudioInputEnd(NULL);
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) drvAudioVideoRecFiniOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHostVoiceOut)
-{
-    PDRVAUDIOVIDEOREC pDrv = RT_FROM_MEMBER(pInterface, DRVAUDIOVIDEOREC, IHostAudio);
-    LogFlowFuncEnter();
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) drvAudioVideoRecControlOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT hw,
-                                                    PDMAUDIOSTREAMCMD enmStreamCmd)
-{
-    PDRVAUDIOVIDEOREC pDrv = RT_FROM_MEMBER(pInterface, DRVAUDIOVIDEOREC, IHostAudio);
-    LogFlowFuncEnter();
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) drvAudioVideoRecControlIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHostVoiceIn,
-                                                   PDMAUDIOSTREAMCMD enmStreamCmd)
-{
-    PDRVAUDIOVIDEOREC pDrv = RT_FROM_MEMBER(pInterface, DRVAUDIOVIDEOREC, IHostAudio);
-
-    /* Initialize  VRDEVoice and return to VRDP server which returns this struct back to us
-     * in the form void * pvContext
-     */
-    PVIDEORECAUDIOIN pVRDEVoice = (PVIDEORECAUDIOIN)pHostVoiceIn;
-    LogFlowFunc(("enmStreamCmd=%ld\n", enmStreamCmd));
-
-    /* initialize only if not already done */
-    if (enmStreamCmd == PDMAUDIOSTREAMCMD_ENABLE)
-    {
-        //@todo if (!pVRDEVoice->fIsInit)
-        //    RTCircBufReset(pVRDEVoice->pRecordedVoiceBuf);
-        pVRDEVoice->fIsInit = 1;
-        pVRDEVoice->pHostVoiceIn = *pHostVoiceIn;
-        pVRDEVoice->cBytesPerFrame = 1;
-        pVRDEVoice->uFrequency = 0;
-        pVRDEVoice->rate = NULL;
-        pVRDEVoice->cbSamplesBufferAllocated = 0;
-        pVRDEVoice->pvRateBuffer = NULL;
-        pVRDEVoice->cbRateBufferAllocated = 0;
-
-        pVRDEVoice->pHostVoiceIn.cSamples = 2048;
-        /* Initialize the hardware info section with the audio settings */
-
-        ASMAtomicWriteU32(&pVRDEVoice->status, CA_STATUS_IN_INIT);
-
-        /* Create the internal ring buffer. */
-        RTCircBufCreate(&pVRDEVoice->pRecordedVoiceBuf,
-                        pVRDEVoice->pHostVoiceIn.cSamples * sizeof(PDMAUDIOSAMPLE));
-
-        if (!RT_VALID_PTR(pVRDEVoice->pRecordedVoiceBuf))
-        {
-            LogRel(("Failed to create internal ring buffer\n"));
-            return  VERR_NO_MEMORY;
-        }
-
-        ASMAtomicWriteU32(&pVRDEVoice->status, CA_STATUS_INIT);
-        return pDrv->pConsoleVRDPServer->SendAudioInputBegin(NULL, pVRDEVoice, pHostVoiceIn->cSamples,
-                                                             pHostVoiceIn->Props.uHz,
-                                                             pHostVoiceIn->Props.cChannels, pHostVoiceIn->Props.cBits);
-    }
-    else if (enmStreamCmd == PDMAUDIOSTREAMCMD_DISABLE)
-    {
-        pVRDEVoice->fIsInit = 0;
-        ASMAtomicWriteU32(&pVRDEVoice->status, CA_STATUS_IN_UNINIT);
-        RTCircBufDestroy(pVRDEVoice->pRecordedVoiceBuf);
-        pVRDEVoice->pRecordedVoiceBuf = NULL;
-        ASMAtomicWriteU32(&pVRDEVoice->status, CA_STATUS_UNINIT);
-        pDrv->pConsoleVRDPServer->SendAudioInputEnd(NULL);
-    }
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(int) drvAudioVideoRecGetConf(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDCFG pAudioConf)
-{
-    LogFlowFunc(("pAudioConf=%p\n", pAudioConf));
-
-    pAudioConf->cbStreamOut = sizeof(VIDEORECAUDIOOUT);
-    pAudioConf->cbStreamIn = sizeof(VIDEORECAUDIOIN);
-    pAudioConf->cMaxHstStrmsOut = 1;
-    pAudioConf->cMaxHstStrmsIn = 1;
-
-    return VINF_SUCCESS;
-}
-
-static DECLCALLBACK(void) drvAudioVideoRecShutdown(PPDMIHOSTAUDIO pInterface)
-{
-    NOREF(pInterface);
-}
-
-/**
- * @interface_method_impl{PDMIBASE,pfnQueryInterface}
- */
-static DECLCALLBACK(void *) drvAudioVideoRecQueryInterface(PPDMIBASE pInterface, const char *pszIID)
-{
-    PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
-    PDRVAUDIOVIDEOREC  pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIOVIDEOREC);
-    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase);
-    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIHOSTAUDIO, &pThis->IHostAudio);
-    return NULL;
-}
-
-AudioVideoRec::AudioVideoRec(Console *pConsole)
-    : mpDrv(NULL),
-      mParent(pConsole)
-{
-}
-
-AudioVideoRec::~AudioVideoRec(void)
-{
-    if (mpDrv)
-    {
-        mpDrv->pAudioVideoRec = NULL;
-        mpDrv = NULL;
-    }
-}
-
-int AudioVideoRec::handleVideoRecSvrCmdAudioInputIntercept(bool fIntercept)
-{
-    LogFlowThisFunc(("fIntercept=%RTbool\n", fIntercept));
-    return VINF_SUCCESS;
-}
-
-int AudioVideoRec::handleVideoRecSvrCmdAudioInputEventBegin(void *pvContext, int iSampleHz, int cChannels,
-                                                            int cBits, bool fUnsigned)
-{
-    int bitIdx;
-    PVIDEORECAUDIOIN pVRDEVoice = (PVIDEORECAUDIOIN)pvContext;
-    LogFlowFunc(("handleVRDPCmdInputEventBegin\n"));
-    /* Prepare a format convertion for the actually used format. */
-    pVRDEVoice->cBytesPerFrame = ((cBits + 7) / 8) * cChannels;
-    if (cBits == 16)
-    {
-        bitIdx = 1;
-    }
-    else if (cBits == 32)
-    {
-        bitIdx = 2;
-    }
-    else
-    {
-        bitIdx = 0;
-    }
-
-    //PPDMIAUDIOCONNECTOR pPort = server->mConsole->getAudioVideoRec()->getDrvAudioPort();
-    /* Call DrvAudio interface to get the t_sample type conversion function */
-    /*mpDrv->pUpPort->pfnConvDevFmtToStSample(mpDrv->pUpPort,
-                                            (cChannels == 2) ? 1 : 0,
-                                            !fUnsigned, 0, bitIdx,
-                                            pVRDEVoice->convAudioDevFmtToStSampl);*/
-    if (pVRDEVoice->convAudioDevFmtToStSampl)
-    {
-        LogFlowFunc(("Failed to get the conversion function \n"));
-    }
-    LogFlowFunc(("Required freq as requested by VRDP Server = %d\n", iSampleHz));
-    //if (iSampleHz && iSampleHz != pVRDEVoice->pHostVoiceIn.Props.uFrequency)
-    {
-        /* @todo if the above condition is false then pVRDEVoice->uFrequency will remain 0 */
-        /*mpDrv->pUpPort->pfnPrepareAudioConversion(mpDrv->pUpPort, iSampleHz,
-                                                  pVRDEVoice->pHostVoiceIn.Props.uFrequency,
-                                                  &pVRDEVoice->rate);*/
-        pVRDEVoice->uFrequency = iSampleHz;
-        LogFlowFunc(("pVRDEVoice assigned requested freq =%d\n", pVRDEVoice->uFrequency));
-    }
-    return VINF_SUCCESS;
-}
-
-/*
- * pvContext: pointer to VRDP voice returned by the VRDP server. The is same pointer that we initialized in
- *            drvAudioVideoRecDisableEnableIn VOICE_ENABLE case.
- */
-int AudioVideoRec::handleVideoRecSvrCmdAudioInputEventData(void *pvContext, const void *pvData, uint32_t cbData)
-{
-    PVIDEORECAUDIOIN pVRDEVoice = (PVIDEORECAUDIOIN)pvContext;
-    PPDMAUDIOSAMPLE pHostStereoSampleBuf; /* target sample buffer */
-    PPDMAUDIOSAMPLE pConvertedSampleBuf; /* samples adjusted for rate */
-    uint32_t cSamples = cbData / pVRDEVoice->cBytesPerFrame; /* Count of samples */
-    void * pTmpSampleBuf = NULL;
-    uint32_t cConvertedSamples; /* samples adjusted for rate */
-    uint32_t cbSamples = 0; /* count of bytes occupied by samples */
-    int rc = VINF_SUCCESS;
-
-    LogFlowFunc(("handleVRDPCmdInputEventData cbData = %d, bytesperfram=%d\n",
-              cbData, pVRDEVoice->cBytesPerFrame));
-
-    vrdeReallocSampleBuf(pVRDEVoice, cSamples);
-    pHostStereoSampleBuf = (PPDMAUDIOSAMPLE)pVRDEVoice->pvSamplesBuffer;
-    pVRDEVoice->convAudioDevFmtToStSampl(pHostStereoSampleBuf, pvData, cSamples, &videorec_nominal_volume);
-
-    /* count of rate adjusted samples */
-    pVRDEVoice->uFrequency = 22100; /* @todo handle this. How pVRDEVoice will get proper value */
-    cConvertedSamples = (cSamples * pVRDEVoice->pHostVoiceIn.Props.uHz) / pVRDEVoice->uFrequency;
-    vrdeReallocRateAdjSampleBuf(pVRDEVoice, cConvertedSamples);
-
-    pConvertedSampleBuf = (PPDMAUDIOSAMPLE)pVRDEVoice->pvRateBuffer;
-    if (pConvertedSampleBuf)
-    {
-        uint32_t cSampleSrc = cSamples;
-        uint32_t cSampleDst = cConvertedSamples;
-        /*mpDrv->pUpPort->pfnDoRateConversion(mpDrv->pUpPort, pVRDEVoice->rate, pHostStereoSampleBuf,
-                                            pConvertedSampleBuf, &cSampleSrc, &cConvertedSamples);*/
-        pTmpSampleBuf = pConvertedSampleBuf;
-        cbSamples =  cConvertedSamples * sizeof(PDMAUDIOSAMPLE);
-    }
-
-    if (cbSamples)
-        rc = vrdeRecordingCallback(pVRDEVoice, cbSamples, pTmpSampleBuf);
-
-    return rc;
-}
-
-/*
- * pvContext: pointer to VRDP voice returned by the VRDP server. The is same pointer that we initialized in
- *            drvAudioVideoRecDisableEnableIn VOICE_ENABLE case.
- */
-int AudioVideoRec::handleVideoRecSvrCmdAudioInputEventEnd(void *pvContext)
-{
-    LogFlowFuncEnter();
-
-    PVIDEORECAUDIOIN pVRDEVoice = (PVIDEORECAUDIOIN)pvContext;
-    AssertPtrReturn(pVRDEVoice, VERR_INVALID_POINTER);
-
-    /* The caller will not use this context anymore. */
-    if (pVRDEVoice->rate)
-    {
-        //mpDrv->pUpPort->pfnEndAudioConversion(mpDrv->pUpPort, pVRDEVoice->rate);
-    }
-
-    if (pVRDEVoice->pvSamplesBuffer)
-    {
-        RTMemFree(pVRDEVoice->pvSamplesBuffer);
-        pVRDEVoice->pvSamplesBuffer = NULL;
-    }
-
-    if (pVRDEVoice->pvRateBuffer)
-    {
-        RTMemFree(pVRDEVoice->pvRateBuffer);
-        pVRDEVoice->pvRateBuffer = NULL;
-    }
-
-    return VINF_SUCCESS;
-}
-
-/**
- * Construct a VRDE audio driver instance.
- *
- * @copydoc FNPDMDRVCONSTRUCT
- */
-/* static */
-DECLCALLBACK(int) AudioVideoRec::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
-{
-    PDRVAUDIOVIDEOREC pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIOVIDEOREC);
-    LogRel(("Audio: Initializing VRDE driver\n"));
-    LogFlowFunc(("fFlags=0x%x\n", fFlags));
-
-    /* we save the address of AudioVideoRec in Object node in CFGM tree and address of VRDP server in
-     * ObjectVRDPServer node. So presence of both is necessary.
-     */
-    //if (!CFGMR3AreValuesValid(pCfg, "Object\0") || !CFGMR3AreValuesValid(pCfg, "ObjectVRDPServer\0"))
-    //   return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES;
-    AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER,
-                    ("Configuration error: Not possible to attach anything to this driver!\n"),
-                    VERR_PDM_DRVINS_NO_ATTACH);
-
-    /*
-     * Init the static parts.
-     */
-    pThis->pDrvIns                   = pDrvIns;
-    /* IBase */
-    pDrvIns->IBase.pfnQueryInterface = drvAudioVideoRecQueryInterface;
-    /* IHostAudio */
-    PDMAUDIO_IHOSTAUDIO_CALLBACKS(drvAudioVideoRec);
-
-    /* Get VRDPServer pointer. */
-    void *pvUser;
-    int rc = CFGMR3QueryPtr(pCfg, "ObjectVRDPServer", &pvUser);
-    if (RT_FAILURE(rc))
-    {
-        AssertMsgFailed(("Confguration error: No/bad \"ObjectVRDPServer\" value, rc=%Rrc\n", rc));
-        return rc;
-    }
-
-    /* CFGM tree saves the pointer to ConsoleVRDPServer in the Object node of AudioVideoRec. */
-    pThis->pConsoleVRDPServer = (ConsoleVRDPServer *)pvUser;
-
-    pvUser = NULL;
-    rc = CFGMR3QueryPtr(pCfg, "Object", &pvUser);
-    if (RT_FAILURE(rc))
-    {
-        AssertMsgFailed(("Confguration error: No/bad \"Object\" value, rc=%Rrc\n", rc));
-        return rc;
-    }
-
-    pThis->pAudioVideoRec = (AudioVideoRec *)pvUser;
-    pThis->pAudioVideoRec->mpDrv = pThis;
-
-    /*
-     * Get the interface for the above driver (DrvAudio) to make mixer/conversion calls.
-     * Described in CFGM tree.
-     */
-    pThis->pUpPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMIAUDIOCONNECTOR);
-    if (!pThis->pUpPort)
-    {
-        AssertMsgFailed(("Configuration error: No upper interface specified!\n"));
-        return VERR_PDM_MISSING_INTERFACE_ABOVE;
-    }
-
-    return VINF_SUCCESS;
-}
-
-/* static */
-DECLCALLBACK(void) AudioVideoRec::drvDestruct(PPDMDRVINS pDrvIns)
-{
-    LogFlowFuncEnter();
-}
-
-/**
- * VRDE audio driver registration record.
- */
-const PDMDRVREG AudioVideoRec::DrvReg =
-{
-    PDM_DRVREG_VERSION,
-    /* szName */
-    "AudioVideoRec",
-    /* szRCMod */
-    "",
-    /* szR0Mod */
-    "",
-    /* pszDescription */
-    "Audio driver for video recording",
-    /* fFlags */
-    PDM_DRVREG_FLAGS_HOST_BITS_DEFAULT,
-    /* fClass. */
-    PDM_DRVREG_CLASS_AUDIO,
-    /* cMaxInstances */
-    ~0U,
-    /* cbInstance */
-    sizeof(DRVAUDIOVIDEOREC),
-    /* pfnConstruct */
-    AudioVideoRec::drvConstruct,
-    /* pfnDestruct */
-    AudioVideoRec::drvDestruct,
-    /* pfnRelocate */
-    NULL,
-    /* pfnIOCtl */
-    NULL,
-    /* pfnPowerOn */
-    NULL,
-    /* pfnReset */
-    NULL,
-    /* pfnSuspend */
-    NULL,
-    /* pfnResume */
-    NULL,
-    /* pfnAttach */
-    NULL,
-    /* pfnDetach */
-    NULL,
-    /* pfnPowerOff */
-    NULL,
-    /* pfnSoftReset */
-    NULL,
-    /* u32EndVersion */
-    PDM_DRVREG_VERSION
-};
-
diff --git a/src/VBox/Main/src-client/EbmlIDs.h b/src/VBox/Main/src-client/EbmlIDs.h
new file mode 100644
index 0000000..d6f1c79
--- /dev/null
+++ b/src/VBox/Main/src-client/EbmlIDs.h
@@ -0,0 +1,246 @@
+/* $Id: EbmlIDs.h $ */
+/** @file
+ * EbmlIDs.h - Matroska EBML Class IDs.
+ */
+
+/*
+ * Copyright (C) 2013-2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ *
+ * This code is based on:
+ *
+ * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS.  All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+
+/** Matroska EBML Class IDs supported by WebM */
+enum Mkv
+{
+    EBML = 0x1A45DFA3,
+    EBMLVersion = 0x4286,
+    EBMLReadVersion = 0x42F7,
+    EBMLMaxIDLength = 0x42F2,
+    EBMLMaxSizeLength = 0x42F3,
+    DocType = 0x4282,
+    DocTypeVersion = 0x4287,
+    DocTypeReadVersion = 0x4285,
+//  CRC_32 = 0xBF,
+    Void = 0xEC,
+    SignatureSlot = 0x1B538667,
+    SignatureAlgo = 0x7E8A,
+    SignatureHash = 0x7E9A,
+    SignaturePublicKey = 0x7EA5,
+    Signature = 0x7EB5,
+    SignatureElements = 0x7E5B,
+    SignatureElementList = 0x7E7B,
+    SignedElement = 0x6532,
+    //segment
+    Segment = 0x18538067,
+    //Meta Seek Information
+    SeekHead = 0x114D9B74,
+    Seek = 0x4DBB,
+    SeekID = 0x53AB,
+    SeekPosition = 0x53AC,
+    //Segment Information
+    Info = 0x1549A966,
+//  SegmentUID = 0x73A4,
+//  SegmentFilename = 0x7384,
+//  PrevUID = 0x3CB923,
+//  PrevFilename = 0x3C83AB,
+//  NextUID = 0x3EB923,
+//  NextFilename = 0x3E83BB,
+//  SegmentFamily = 0x4444,
+//  ChapterTranslate = 0x6924,
+//  ChapterTranslateEditionUID = 0x69FC,
+//  ChapterTranslateCodec = 0x69BF,
+//  ChapterTranslateID = 0x69A5,
+    TimecodeScale = 0x2AD7B1,
+    Segment_Duration = 0x4489,
+    DateUTC = 0x4461,
+//  Title = 0x7BA9,
+    MuxingApp = 0x4D80,
+    WritingApp = 0x5741,
+    //Cluster
+    Cluster = 0x1F43B675,
+    Timecode = 0xE7,
+//  SilentTracks = 0x5854,
+//  SilentTrackNumber = 0x58D7,
+//  Position = 0xA7,
+    PrevSize = 0xAB,
+    BlockGroup = 0xA0,
+    Block = 0xA1,
+//  BlockVirtual = 0xA2,
+//  BlockAdditions = 0x75A1,
+//  BlockMore = 0xA6,
+//  BlockAddID = 0xEE,
+//  BlockAdditional = 0xA5,
+    BlockDuration = 0x9B,
+//  ReferencePriority = 0xFA,
+    ReferenceBlock = 0xFB,
+//  ReferenceVirtual = 0xFD,
+//  CodecState = 0xA4,
+//  Slices = 0x8E,
+//  TimeSlice = 0xE8,
+    LaceNumber = 0xCC,
+//  FrameNumber = 0xCD,
+//  BlockAdditionID = 0xCB,
+//  MkvDelay = 0xCE,
+//  Cluster_Duration = 0xCF,
+    SimpleBlock = 0xA3,
+//  EncryptedBlock = 0xAF,
+    //Track
+    Tracks = 0x1654AE6B,
+    TrackEntry = 0xAE,
+    TrackNumber = 0xD7,
+    TrackUID = 0x73C5,
+    TrackType = 0x83,
+    FlagEnabled = 0xB9,
+    FlagDefault = 0x88,
+    FlagForced = 0x55AA,
+    FlagLacing = 0x9C,
+//  MinCache = 0x6DE7,
+//  MaxCache = 0x6DF8,
+    DefaultDuration = 0x23E383,
+//  TrackTimecodeScale = 0x23314F,
+//  TrackOffset = 0x537F,
+//  MaxBlockAdditionID = 0x55EE,
+    Name = 0x536E,
+    Language = 0x22B59C,
+    CodecID = 0x86,
+    CodecPrivate = 0x63A2,
+    CodecName = 0x258688,
+//  AttachmentLink = 0x7446,
+//  CodecSettings = 0x3A9697,
+//  CodecInfoURL = 0x3B4040,
+//  CodecDownloadURL = 0x26B240,
+//  CodecDecodeAll = 0xAA,
+//  TrackOverlay = 0x6FAB,
+//  TrackTranslate = 0x6624,
+//  TrackTranslateEditionUID = 0x66FC,
+//  TrackTranslateCodec = 0x66BF,
+//  TrackTranslateTrackID = 0x66A5,
+    //video
+    Video = 0xE0,
+    FlagInterlaced = 0x9A,
+//  StereoMode = 0x53B8,
+    PixelWidth = 0xB0,
+    PixelHeight = 0xBA,
+    PixelCropBottom = 0x54AA,
+    PixelCropTop = 0x54BB,
+    PixelCropLeft = 0x54CC,
+    PixelCropRight = 0x54DD,
+    DisplayWidth = 0x54B0,
+    DisplayHeight = 0x54BA,
+    DisplayUnit = 0x54B2,
+    AspectRatioType = 0x54B3,
+//  ColourSpace = 0x2EB524,
+//  GammaValue = 0x2FB523,
+    FrameRate = 0x2383E3,
+    //end video
+    //audio
+    Audio = 0xE1,
+    SamplingFrequency = 0xB5,
+    OutputSamplingFrequency = 0x78B5,
+    Channels = 0x9F,
+//  ChannelPositions = 0x7D7B,
+    BitDepth = 0x6264,
+    //end audio
+    //content encoding
+//  ContentEncodings = 0x6d80,
+//  ContentEncoding = 0x6240,
+//  ContentEncodingOrder = 0x5031,
+//  ContentEncodingScope = 0x5032,
+//  ContentEncodingType = 0x5033,
+//  ContentCompression = 0x5034,
+//  ContentCompAlgo = 0x4254,
+//  ContentCompSettings = 0x4255,
+//  ContentEncryption = 0x5035,
+//  ContentEncAlgo = 0x47e1,
+//  ContentEncKeyID = 0x47e2,
+//  ContentSignature = 0x47e3,
+//  ContentSigKeyID = 0x47e4,
+//  ContentSigAlgo = 0x47e5,
+//  ContentSigHashAlgo = 0x47e6,
+    //end content encoding
+    //Cueing Data
+    Cues = 0x1C53BB6B,
+    CuePoint = 0xBB,
+    CueTime = 0xB3,
+    CueTrackPositions = 0xB7,
+    CueTrack = 0xF7,
+    CueClusterPosition = 0xF1,
+    CueBlockNumber = 0x5378
+//  CueCodecState = 0xEA,
+//  CueReference = 0xDB,
+//  CueRefTime = 0x96,
+//  CueRefCluster = 0x97,
+//  CueRefNumber = 0x535F,
+//  CueRefCodecState = 0xEB,
+    //Attachment
+//  Attachments = 0x1941A469,
+//  AttachedFile = 0x61A7,
+//  FileDescription = 0x467E,
+//  FileName = 0x466E,
+//  FileMimeType = 0x4660,
+//  FileData = 0x465C,
+//  FileUID = 0x46AE,
+//  FileReferral = 0x4675,
+    //Chapters
+//  Chapters = 0x1043A770,
+//  EditionEntry = 0x45B9,
+//  EditionUID = 0x45BC,
+//  EditionFlagHidden = 0x45BD,
+//  EditionFlagDefault = 0x45DB,
+//  EditionFlagOrdered = 0x45DD,
+//  ChapterAtom = 0xB6,
+//  ChapterUID = 0x73C4,
+//  ChapterTimeStart = 0x91,
+//  ChapterTimeEnd = 0x92,
+//  ChapterFlagHidden = 0x98,
+//  ChapterFlagEnabled = 0x4598,
+//  ChapterSegmentUID = 0x6E67,
+//  ChapterSegmentEditionUID = 0x6EBC,
+//  ChapterPhysicalEquiv = 0x63C3,
+//  ChapterTrack = 0x8F,
+//  ChapterTrackNumber = 0x89,
+//  ChapterDisplay = 0x80,
+//  ChapString = 0x85,
+//  ChapLanguage = 0x437C,
+//  ChapCountry = 0x437E,
+//  ChapProcess = 0x6944,
+//  ChapProcessCodecID = 0x6955,
+//  ChapProcessPrivate = 0x450D,
+//  ChapProcessCommand = 0x6911,
+//  ChapProcessTime = 0x6922,
+//  ChapProcessData = 0x6933,
+    //Tagging
+//  Tags = 0x1254C367,
+//  Tag = 0x7373,
+//  Targets = 0x63C0,
+//  TargetTypeValue = 0x68CA,
+//  TargetType = 0x63CA,
+//  Tagging_TrackUID = 0x63C5,
+//  Tagging_EditionUID = 0x63C9,
+//  Tagging_ChapterUID = 0x63C4,
+//  AttachmentUID = 0x63C6,
+//  SimpleTag = 0x67C8,
+//  TagName = 0x45A3,
+//  TagLanguage = 0x447A,
+//  TagDefault = 0x4484,
+//  TagString = 0x4487,
+//  TagBinary = 0x4485,
+};
diff --git a/src/VBox/Main/src-client/EbmlWriter.cpp b/src/VBox/Main/src-client/EbmlWriter.cpp
index b156d98..7faeb04 100644
--- a/src/VBox/Main/src-client/EbmlWriter.cpp
+++ b/src/VBox/Main/src-client/EbmlWriter.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2014 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -15,17 +15,6 @@
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
 
-/*
- * This code is based on:
- *
- * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS.  All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
 
 #include <list>
 #include <stack>
@@ -36,224 +25,8 @@
 #include <iprt/err.h>
 #include <VBox/log.h>
 #include "EbmlWriter.h"
+#include "EbmlIDs.h"
 
-/* Matroska EBML Class IDs supported by WebM */
- enum Mkv
- {
-     EBML = 0x1A45DFA3,
-     EBMLVersion = 0x4286,
-     EBMLReadVersion = 0x42F7,
-     EBMLMaxIDLength = 0x42F2,
-     EBMLMaxSizeLength = 0x42F3,
-     DocType = 0x4282,
-     DocTypeVersion = 0x4287,
-     DocTypeReadVersion = 0x4285,
- //  CRC_32 = 0xBF,
-     Void = 0xEC,
-     SignatureSlot = 0x1B538667,
-     SignatureAlgo = 0x7E8A,
-     SignatureHash = 0x7E9A,
-     SignaturePublicKey = 0x7EA5,
-     Signature = 0x7EB5,
-     SignatureElements = 0x7E5B,
-     SignatureElementList = 0x7E7B,
-     SignedElement = 0x6532,
-     //segment
-     Segment = 0x18538067,
-     //Meta Seek Information
-     SeekHead = 0x114D9B74,
-     Seek = 0x4DBB,
-     SeekID = 0x53AB,
-     SeekPosition = 0x53AC,
-     //Segment Information
-     Info = 0x1549A966,
- //  SegmentUID = 0x73A4,
- //  SegmentFilename = 0x7384,
- //  PrevUID = 0x3CB923,
- //  PrevFilename = 0x3C83AB,
- //  NextUID = 0x3EB923,
- //  NextFilename = 0x3E83BB,
- //  SegmentFamily = 0x4444,
- //  ChapterTranslate = 0x6924,
- //  ChapterTranslateEditionUID = 0x69FC,
- //  ChapterTranslateCodec = 0x69BF,
- //  ChapterTranslateID = 0x69A5,
-     TimecodeScale = 0x2AD7B1,
-     Segment_Duration = 0x4489,
-     DateUTC = 0x4461,
- //  Title = 0x7BA9,
-     MuxingApp = 0x4D80,
-     WritingApp = 0x5741,
-     //Cluster
-     Cluster = 0x1F43B675,
-     Timecode = 0xE7,
- //  SilentTracks = 0x5854,
- //  SilentTrackNumber = 0x58D7,
- //  Position = 0xA7,
-     PrevSize = 0xAB,
-     BlockGroup = 0xA0,
-     Block = 0xA1,
- //  BlockVirtual = 0xA2,
- //  BlockAdditions = 0x75A1,
- //  BlockMore = 0xA6,
- //  BlockAddID = 0xEE,
- //  BlockAdditional = 0xA5,
-     BlockDuration = 0x9B,
- //  ReferencePriority = 0xFA,
-     ReferenceBlock = 0xFB,
- //  ReferenceVirtual = 0xFD,
- //  CodecState = 0xA4,
- //  Slices = 0x8E,
- //  TimeSlice = 0xE8,
-     LaceNumber = 0xCC,
- //  FrameNumber = 0xCD,
- //  BlockAdditionID = 0xCB,
- //  MkvDelay = 0xCE,
- //  Cluster_Duration = 0xCF,
-     SimpleBlock = 0xA3,
- //  EncryptedBlock = 0xAF,
-     //Track
-     Tracks = 0x1654AE6B,
-     TrackEntry = 0xAE,
-     TrackNumber = 0xD7,
-     TrackUID = 0x73C5,
-     TrackType = 0x83,
-     FlagEnabled = 0xB9,
-     FlagDefault = 0x88,
-     FlagForced = 0x55AA,
-     FlagLacing = 0x9C,
- //  MinCache = 0x6DE7,
- //  MaxCache = 0x6DF8,
-     DefaultDuration = 0x23E383,
- //  TrackTimecodeScale = 0x23314F,
- //  TrackOffset = 0x537F,
- //  MaxBlockAdditionID = 0x55EE,
-     Name = 0x536E,
-     Language = 0x22B59C,
-     CodecID = 0x86,
-     CodecPrivate = 0x63A2,
-     CodecName = 0x258688,
- //  AttachmentLink = 0x7446,
- //  CodecSettings = 0x3A9697,
- //  CodecInfoURL = 0x3B4040,
- //  CodecDownloadURL = 0x26B240,
- //  CodecDecodeAll = 0xAA,
- //  TrackOverlay = 0x6FAB,
- //  TrackTranslate = 0x6624,
- //  TrackTranslateEditionUID = 0x66FC,
- //  TrackTranslateCodec = 0x66BF,
- //  TrackTranslateTrackID = 0x66A5,
-     //video
-     Video = 0xE0,
-     FlagInterlaced = 0x9A,
- //  StereoMode = 0x53B8,
-     PixelWidth = 0xB0,
-     PixelHeight = 0xBA,
-     PixelCropBottom = 0x54AA,
-     PixelCropTop = 0x54BB,
-     PixelCropLeft = 0x54CC,
-     PixelCropRight = 0x54DD,
-     DisplayWidth = 0x54B0,
-     DisplayHeight = 0x54BA,
-     DisplayUnit = 0x54B2,
-     AspectRatioType = 0x54B3,
- //  ColourSpace = 0x2EB524,
- //  GammaValue = 0x2FB523,
-     FrameRate = 0x2383E3,
-     //end video
-     //audio
-     Audio = 0xE1,
-     SamplingFrequency = 0xB5,
-     OutputSamplingFrequency = 0x78B5,
-     Channels = 0x9F,
- //  ChannelPositions = 0x7D7B,
-     BitDepth = 0x6264,
-     //end audio
-     //content encoding
- //  ContentEncodings = 0x6d80,
- //  ContentEncoding = 0x6240,
- //  ContentEncodingOrder = 0x5031,
- //  ContentEncodingScope = 0x5032,
- //  ContentEncodingType = 0x5033,
- //  ContentCompression = 0x5034,
- //  ContentCompAlgo = 0x4254,
- //  ContentCompSettings = 0x4255,
- //  ContentEncryption = 0x5035,
- //  ContentEncAlgo = 0x47e1,
- //  ContentEncKeyID = 0x47e2,
- //  ContentSignature = 0x47e3,
- //  ContentSigKeyID = 0x47e4,
- //  ContentSigAlgo = 0x47e5,
- //  ContentSigHashAlgo = 0x47e6,
-     //end content encoding
-     //Cueing Data
-     Cues = 0x1C53BB6B,
-     CuePoint = 0xBB,
-     CueTime = 0xB3,
-     CueTrackPositions = 0xB7,
-     CueTrack = 0xF7,
-     CueClusterPosition = 0xF1,
-     CueBlockNumber = 0x5378
- //  CueCodecState = 0xEA,
- //  CueReference = 0xDB,
- //  CueRefTime = 0x96,
- //  CueRefCluster = 0x97,
- //  CueRefNumber = 0x535F,
- //  CueRefCodecState = 0xEB,
-     //Attachment
- //  Attachments = 0x1941A469,
- //  AttachedFile = 0x61A7,
- //  FileDescription = 0x467E,
- //  FileName = 0x466E,
- //  FileMimeType = 0x4660,
- //  FileData = 0x465C,
- //  FileUID = 0x46AE,
- //  FileReferral = 0x4675,
-     //Chapters
- //  Chapters = 0x1043A770,
- //  EditionEntry = 0x45B9,
- //  EditionUID = 0x45BC,
- //  EditionFlagHidden = 0x45BD,
- //  EditionFlagDefault = 0x45DB,
- //  EditionFlagOrdered = 0x45DD,
- //  ChapterAtom = 0xB6,
- //  ChapterUID = 0x73C4,
- //  ChapterTimeStart = 0x91,
- //  ChapterTimeEnd = 0x92,
- //  ChapterFlagHidden = 0x98,
- //  ChapterFlagEnabled = 0x4598,
- //  ChapterSegmentUID = 0x6E67,
- //  ChapterSegmentEditionUID = 0x6EBC,
- //  ChapterPhysicalEquiv = 0x63C3,
- //  ChapterTrack = 0x8F,
- //  ChapterTrackNumber = 0x89,
- //  ChapterDisplay = 0x80,
- //  ChapString = 0x85,
- //  ChapLanguage = 0x437C,
- //  ChapCountry = 0x437E,
- //  ChapProcess = 0x6944,
- //  ChapProcessCodecID = 0x6955,
- //  ChapProcessPrivate = 0x450D,
- //  ChapProcessCommand = 0x6911,
- //  ChapProcessTime = 0x6922,
- //  ChapProcessData = 0x6933,
-     //Tagging
- //  Tags = 0x1254C367,
- //  Tag = 0x7373,
- //  Targets = 0x63C0,
- //  TargetTypeValue = 0x68CA,
- //  TargetType = 0x63CA,
- //  Tagging_TrackUID = 0x63C5,
- //  Tagging_EditionUID = 0x63C9,
- //  Tagging_ChapterUID = 0x63C4,
- //  AttachmentUID = 0x63C6,
- //  SimpleTag = 0x67C8,
- //  TagName = 0x45A3,
- //  TagLanguage = 0x447A,
- //  TagDefault = 0x4484,
- //  TagString = 0x4487,
- //  TagBinary = 0x4485,
- };
 
 class Ebml
 {
@@ -274,25 +47,25 @@ private:
 
 public:
 
-    /* Creates EBML output file. */
+    /** Creates EBML output file. */
     inline int create(const char *a_pszFilename)
     {
       return RTFileOpen(&m_File, a_pszFilename, RTFILE_O_CREATE | RTFILE_O_WRITE | RTFILE_O_DENY_NONE);
     }
 
-    /* Returns file size. */
+    /** Returns file size. */
     inline uint64_t getFileSize()
     {
         return RTFileTell(m_File);
     }
 
-    /* Get reference to file descriptor */
+    /** Get reference to file descriptor */
     inline const RTFILE &getFile()
     {
         return m_File;
     }
 
-    /* Returns available space on storage. */
+    /** Returns available space on storage. */
     inline uint64_t getAvailableSpace()
     {
         RTFOFF pcbFree;
@@ -300,13 +73,13 @@ public:
         return (RT_SUCCESS(rc)? (uint64_t)pcbFree : UINT64_MAX);
     }
 
-    /* Closes the file. */
+    /** Closes the file. */
     inline void close()
     {
         RTFileClose(m_File);
     }
 
-    /* Starts an EBML sub-element. */
+    /** Starts an EBML sub-element. */
     inline Ebml &subStart(EbmlClassId classId)
     {
         writeClassId(classId);
@@ -319,7 +92,7 @@ public:
         return *this;
     }
 
-    /* Ends an EBML sub-element. */
+    /** Ends an EBML sub-element. */
     inline Ebml &subEnd(EbmlClassId classId)
     {
         /* Class ID on the top of the stack should match the class ID passed
@@ -338,7 +111,7 @@ public:
         return *this;
     }
 
-    /* Serializes a null-terminated string. */
+    /** Serializes a null-terminated string. */
     inline Ebml &serializeString(EbmlClassId classId, const char *str)
     {
         writeClassId(classId);
@@ -359,7 +132,8 @@ public:
         return *this;
     }
 
-    /* Serializes a floating point value.
+    /** Serializes a floating point value.
+     *
      * Only 8-bytes double precision values are supported
      * by this function.
      */
@@ -371,14 +145,14 @@ public:
         return *this;
     }
 
-    /* Writes raw data to file. */
+    /** Writes raw data to file. */
     inline void write(const void *data, size_t size)
     {
         int rc = RTFileWrite(m_File, data, size, NULL);
         if (!RT_SUCCESS(rc)) throw rc;
     }
 
-    /* Writes an unsigned integer of variable of fixed size. */
+    /** Writes an unsigned integer of variable of fixed size. */
     inline void writeUnsignedInteger(uint64_t value, size_t size = sizeof(uint64_t))
     {
         /* convert to big-endian */
@@ -386,7 +160,8 @@ public:
         write(reinterpret_cast<uint8_t*>(&value) + sizeof(value) - size, size);
     }
 
-    /* Writes EBML class ID to file.
+    /** Writes EBML class ID to file.
+     *
      * EBML ID already has a UTF8-like represenation
      * so getSizeOfUInt is used to determine
      * the number of its bytes.
@@ -396,7 +171,7 @@ public:
         writeUnsignedInteger(parm, getSizeOfUInt(parm));
     }
 
-    /* Writes data size value. */
+    /** Writes data size value. */
     inline void writeSize(uint64_t parm)
     {
         /* The following expression defines the size of the value that will be serialized
@@ -418,7 +193,9 @@ public:
         uint64_t mask = RT_BIT_64(size * 8 - 1);
         writeUnsignedInteger((parm & (((mask << 1) - 1) >> size)) | (mask >> (size - 1)), size);
     }
-    /* Size calculation for variable size UNSIGNED integer.
+
+    /** Size calculation for variable size UNSIGNED integer.
+     *
      * The function defines the size of the number by trimming
      * consequent trailing zero bytes starting from the most significant.
      * The following statement is always true:
@@ -729,3 +506,4 @@ uint64_t WebMWriter::getAvailableSpace()
 {
     return m_Impl->m_Ebml.getAvailableSpace();
 }
+
diff --git a/src/VBox/Main/src-client/EbmlWriter.h b/src/VBox/Main/src-client/EbmlWriter.h
index 85e29db..0dac074 100644
--- a/src/VBox/Main/src-client/EbmlWriter.h
+++ b/src/VBox/Main/src-client/EbmlWriter.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2014 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -15,22 +15,17 @@
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
 
-/*
- * This code is based on:
- *
- * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS.  All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
 #ifndef ____EBMLWRITER
 #define ____EBMLWRITER
 
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable: 4668) /* vpx_codec.h(64) : warning C4668: '__GNUC__' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
 #include <vpx/vpx_encoder.h>
+# pragma warning(pop)
+#else
+# include <vpx/vpx_encoder.h>
+#endif
 
 class WebMWriter_Impl;
 
@@ -40,7 +35,7 @@ public:
     WebMWriter();
     virtual ~WebMWriter();
 
-    /* Creates output file
+    /** Creates output file
      *
      * @param   a_pszFilename   Name of the file to create.
      *
@@ -50,7 +45,8 @@ public:
     /* Closes output file. */
     void close();
 
-    /* Writes WebM header to file.
+    /** Writes WebM header to file.
+     *
      * Should be called before any writeBlock call.
      *
      * @param a_pCfg Pointer to VPX Codec configuration structure.
@@ -60,7 +56,7 @@ public:
      */
     int writeHeader(const vpx_codec_enc_cfg_t *a_pCfg, const vpx_rational *a_pFps);
 
-    /* Writes a block of compressed data
+    /** Writes a block of compressed data
      *
      * @param a_pCfg Pointer to VPX Codec configuration structure.
      * @param a_pPkt VPX data packet.
@@ -69,20 +65,23 @@ public:
      */
     int writeBlock(const vpx_codec_enc_cfg_t *a_pCfg, const vpx_codec_cx_pkt_t *a_pPkt);
 
-    /* Writes WebM footer.
+    /** Writes WebM footer.
+     *
      * No other write functions should be called after this one.
+     *
      * @param a_u64Hash Hash value for the data written.
      *
      * @returns VBox status code.
      */
     int writeFooter(uint32_t a_u64Hash);
 
-    /* Gets current output file size.
+    /** Gets current output file size.
+     *
      * @returns File size in bytes.
      */
     uint64_t getFileSize();
 
-    /* Gets current free storage space
+    /** Gets current free storage space
      * available for the file.
      *
      * @returns Available storage free space.
@@ -90,13 +89,11 @@ public:
     uint64_t getAvailableSpace();
 
 private:
-    /* WebMWriter implementation.
+    /** WebMWriter implementation.
      * To isolate some include files */
     WebMWriter_Impl *m_Impl;
 
-    /* Not defined */
-    void operator=(const WebMWriter &);
-    WebMWriter(const WebMWriter &);
+    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(WebMWriter);
 };
 
 #endif
diff --git a/src/VBox/Main/src-client/EmulatedUSBImpl.cpp b/src/VBox/Main/src-client/EmulatedUSBImpl.cpp
index 191b6fb..9794228 100644
--- a/src/VBox/Main/src-client/EmulatedUSBImpl.cpp
+++ b/src/VBox/Main/src-client/EmulatedUSBImpl.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-client/GuestCtrlImpl.cpp b/src/VBox/Main/src-client/GuestCtrlImpl.cpp
index 3112567..72824a0 100644
--- a/src/VBox/Main/src-client/GuestCtrlImpl.cpp
+++ b/src/VBox/Main/src-client/GuestCtrlImpl.cpp
@@ -583,7 +583,7 @@ HRESULT Guest::updateGuestAdditions(const com::Utf8Str &aSource, const std::vect
                     throw hr;
                 }
 
-                hr = pTask->createThread(NULL, RTTHREADTYPE_MAIN_HEAVY_WORKER);
+                hr = pTask->createThreadWithType(RTTHREADTYPE_MAIN_HEAVY_WORKER);
 
                 if (SUCCEEDED(hr))
                 {
diff --git a/src/VBox/Main/src-client/GuestCtrlPrivate.cpp b/src/VBox/Main/src-client/GuestCtrlPrivate.cpp
index a8cce6b..7bbf4b5 100644
--- a/src/VBox/Main/src-client/GuestCtrlPrivate.cpp
+++ b/src/VBox/Main/src-client/GuestCtrlPrivate.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -356,8 +356,8 @@ int GuestProcessStreamBlock::SetValue(const char *pszKey, const char *pszValue)
 
 GuestProcessStream::GuestProcessStream(void)
     : m_cbAllocated(0),
-      m_cbSize(0),
-      m_cbOffset(0),
+      m_cbUsed(0),
+      m_offBuffer(0),
       m_pbBuffer(NULL)
 {
 
@@ -384,34 +384,35 @@ int GuestProcessStream::AddData(const BYTE *pbData, size_t cbData)
     int rc = VINF_SUCCESS;
 
     /* Rewind the buffer if it's empty. */
-    size_t     cbInBuf   = m_cbSize - m_cbOffset;
+    size_t     cbInBuf   = m_cbUsed - m_offBuffer;
     bool const fAddToSet = cbInBuf == 0;
     if (fAddToSet)
-        m_cbSize = m_cbOffset = 0;
+        m_cbUsed = m_offBuffer = 0;
 
     /* Try and see if we can simply append the data. */
-    if (cbData + m_cbSize <= m_cbAllocated)
+    if (cbData + m_cbUsed <= m_cbAllocated)
     {
-        memcpy(&m_pbBuffer[m_cbSize], pbData, cbData);
-        m_cbSize += cbData;
+        memcpy(&m_pbBuffer[m_cbUsed], pbData, cbData);
+        m_cbUsed += cbData;
     }
     else
     {
         /* Move any buffered data to the front. */
-        cbInBuf = m_cbSize - m_cbOffset;
+        cbInBuf = m_cbUsed - m_offBuffer;
         if (cbInBuf == 0)
-            m_cbSize = m_cbOffset = 0;
-        else if (m_cbOffset) /* Do we have something to move? */
+            m_cbUsed = m_offBuffer = 0;
+        else if (m_offBuffer) /* Do we have something to move? */
         {
-            memmove(m_pbBuffer, &m_pbBuffer[m_cbOffset], cbInBuf);
-            m_cbSize = cbInBuf;
-            m_cbOffset = 0;
+            memmove(m_pbBuffer, &m_pbBuffer[m_offBuffer], cbInBuf);
+            m_cbUsed = cbInBuf;
+            m_offBuffer = 0;
         }
 
         /* Do we need to grow the buffer? */
-        if (cbData + m_cbSize > m_cbAllocated)
+        if (cbData + m_cbUsed > m_cbAllocated)
         {
-            size_t cbAlloc = m_cbSize + cbData;
+/** @todo Put an upper limit on the allocation?   */
+            size_t cbAlloc = m_cbUsed + cbData;
             cbAlloc = RT_ALIGN_Z(cbAlloc, _64K);
             void *pvNew = RTMemRealloc(m_pbBuffer, cbAlloc);
             if (pvNew)
@@ -426,10 +427,10 @@ int GuestProcessStream::AddData(const BYTE *pbData, size_t cbData)
         /* Finally, copy the data. */
         if (RT_SUCCESS(rc))
         {
-            if (cbData + m_cbSize <= m_cbAllocated)
+            if (cbData + m_cbUsed <= m_cbAllocated)
             {
-                memcpy(&m_pbBuffer[m_cbSize], pbData, cbData);
-                m_cbSize += cbData;
+                memcpy(&m_pbBuffer[m_cbUsed], pbData, cbData);
+                m_cbUsed += cbData;
             }
             else
                 rc = VERR_BUFFER_OVERFLOW;
@@ -451,21 +452,21 @@ void GuestProcessStream::Destroy(void)
     }
 
     m_cbAllocated = 0;
-    m_cbSize = 0;
-    m_cbOffset = 0;
+    m_cbUsed = 0;
+    m_offBuffer = 0;
 }
 
 #ifdef DEBUG
 void GuestProcessStream::Dump(const char *pszFile)
 {
     LogFlowFunc(("Dumping contents of stream=0x%p (cbAlloc=%u, cbSize=%u, cbOff=%u) to %s\n",
-                 m_pbBuffer, m_cbAllocated, m_cbSize, m_cbOffset, pszFile));
+                 m_pbBuffer, m_cbAllocated, m_cbUsed, m_offBuffer, pszFile));
 
     RTFILE hFile;
     int rc = RTFileOpen(&hFile, pszFile, RTFILE_O_CREATE_REPLACE | RTFILE_O_WRITE | RTFILE_O_DENY_WRITE);
     if (RT_SUCCESS(rc))
     {
-        rc = RTFileWrite(hFile, m_pbBuffer, m_cbSize, NULL /* pcbWritten */);
+        rc = RTFileWrite(hFile, m_pbBuffer, m_cbUsed, NULL /* pcbWritten */);
         RTFileClose(hFile);
     }
 }
@@ -492,25 +493,25 @@ void GuestProcessStream::Dump(const char *pszFile)
 int GuestProcessStream::ParseBlock(GuestProcessStreamBlock &streamBlock)
 {
     if (   !m_pbBuffer
-        || !m_cbSize)
+        || !m_cbUsed)
     {
         return VERR_NO_DATA;
     }
 
-    AssertReturn(m_cbOffset <= m_cbSize, VERR_INVALID_PARAMETER);
-    if (m_cbOffset == m_cbSize)
+    AssertReturn(m_offBuffer <= m_cbUsed, VERR_INVALID_PARAMETER);
+    if (m_offBuffer == m_cbUsed)
         return VERR_NO_DATA;
 
     int rc = VINF_SUCCESS;
 
-    char    *pszOff    = (char*)&m_pbBuffer[m_cbOffset];
+    char    *pszOff    = (char*)&m_pbBuffer[m_offBuffer];
     char    *pszStart  = pszOff;
     uint32_t uDistance;
     while (*pszStart)
     {
         size_t pairLen = strlen(pszStart);
         uDistance = (pszStart - pszOff);
-        if (m_cbOffset + uDistance + pairLen + 1 >= m_cbSize)
+        if (m_offBuffer + uDistance + pairLen + 1 >= m_cbUsed)
         {
             rc = VERR_MORE_DATA;
             break;
@@ -546,11 +547,11 @@ int GuestProcessStream::ParseBlock(GuestProcessStreamBlock &streamBlock)
     uDistance = (pszStart - pszOff);
     if (   !uDistance
         && *pszStart == '\0'
-        && m_cbOffset < m_cbSize)
+        && m_offBuffer < m_cbUsed)
     {
         uDistance++;
     }
-    m_cbOffset += uDistance;
+    m_offBuffer += uDistance;
 
     return rc;
 }
@@ -578,6 +579,7 @@ void GuestBase::baseUninit(void)
     LogFlowThisFuncEnter();
 
     int rc = RTCritSectDelete(&mWaitEventCritSect);
+    NOREF(rc);
 
     LogFlowFuncLeaveRC(rc);
     /* No return value. */
@@ -981,7 +983,7 @@ int GuestObject::registerWaitEvent(const GuestEventTypes &lstEvents,
 }
 
 int GuestObject::sendCommand(uint32_t uFunction,
-                             uint32_t uParms, PVBOXHGCMSVCPARM paParms)
+                             uint32_t cParms, PVBOXHGCMSVCPARM paParms)
 {
 #ifndef VBOX_GUESTCTRL_TEST_CASE
     ComObjPtr<Console> pConsole = mConsole;
@@ -993,8 +995,8 @@ int GuestObject::sendCommand(uint32_t uFunction,
     VMMDev *pVMMDev = pConsole->i_getVMMDev();
     if (pVMMDev)
     {
-        LogFlowThisFunc(("uFunction=%RU32, uParms=%RU32\n", uFunction, uParms));
-        vrc = pVMMDev->hgcmHostCall(HGCMSERVICE_NAME, uFunction, uParms, paParms);
+        LogFlowThisFunc(("uFunction=%RU32, cParms=%RU32\n", uFunction, cParms));
+        vrc = pVMMDev->hgcmHostCall(HGCMSERVICE_NAME, uFunction, cParms, paParms);
         if (RT_FAILURE(vrc))
         {
             /** @todo What to do here? */
@@ -1004,6 +1006,7 @@ int GuestObject::sendCommand(uint32_t uFunction,
     LogFlowThisFuncEnter();
 
     /* Not needed within testcases. */
+    RT_NOREF(uFunction, cParms, paParms);
     int vrc = VINF_SUCCESS;
 #endif
     return vrc;
diff --git a/src/VBox/Main/src-client/GuestDirectoryImpl.cpp b/src/VBox/Main/src-client/GuestDirectoryImpl.cpp
index 5883022..0bfe93a 100644
--- a/src/VBox/Main/src-client/GuestDirectoryImpl.cpp
+++ b/src/VBox/Main/src-client/GuestDirectoryImpl.cpp
@@ -187,10 +187,7 @@ int GuestDirectory::i_callbackDispatcher(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGU
             pSvcCb->mpaParms[idx++].getUInt32(&dataCb.uType);
             pSvcCb->mpaParms[idx++].getUInt32(&dataCb.rc);
 
-            int guestRc = (int)dataCb.rc; /* uint32_t vs. int. */
-
-            LogFlowFunc(("uType=%RU32, guestRc=%Rrc\n",
-                         dataCb.uType, guestRc));
+            LogFlowFunc(("uType=%RU32, vrcGguest=%Rrc\n", dataCb.uType, (int)dataCb.rc));
 
             switch (dataCb.uType)
             {
diff --git a/src/VBox/Main/src-client/GuestDnDPrivate.cpp b/src/VBox/Main/src-client/GuestDnDPrivate.cpp
index ba659be..a7b43c1 100644
--- a/src/VBox/Main/src-client/GuestDnDPrivate.cpp
+++ b/src/VBox/Main/src-client/GuestDnDPrivate.cpp
@@ -280,6 +280,7 @@ int GuestDnDResponse::setProgress(unsigned uPercentage,
                                   uint32_t uStatus,
                                   int rcOp /* = VINF_SUCCESS */, const Utf8Str &strMsg /* = "" */)
 {
+    RT_NOREF(rcOp);
     LogFlowFunc(("uStatus=%RU32, uPercentage=%RU32, rcOp=%Rrc, strMsg=%s\n",
                  uStatus, uPercentage, rcOp, strMsg.c_str()));
 
@@ -839,37 +840,35 @@ int GuestDnDBase::getProtocolVersion(uint32_t *puProto)
 
     int rc;
 
-    uint32_t uProto        = 0;
-    uint32_t uVerAdditions = 0;
-    uint32_t uRevAdditions = 0;
+    uint32_t uProto = 0;
+    uint32_t uVerAdditions;
+    uint32_t uRevAdditions;
     if (   m_pGuest
         && (uVerAdditions = m_pGuest->i_getAdditionsVersion())  > 0
         && (uRevAdditions = m_pGuest->i_getAdditionsRevision()) > 0)
     {
-#ifdef DEBUG
-# if 0
+#if 0 && defined(DEBUG)
         /* Hardcode the to-used protocol version; nice for testing side effects. */
-        uProto = 3;
-        rc = VINF_SUCCESS;
-# endif
+        if (true)
+            uProto = 3;
+        else
 #endif
-        if (!uProto) /* Protocol not set yet? */
+        if (uVerAdditions >= VBOX_FULL_VERSION_MAKE(5, 0, 0))
         {
-            if (uVerAdditions >= VBOX_FULL_VERSION_MAKE(5, 0, 0))
-            {
-                if (uRevAdditions >= 103344) /* Since r103344: Protocol v3. */
-                {
-                    uProto = 3;
-                }
-                else
-                    uProto = 2; /* VBox 5.0.0 - 5.0.8: Protocol v2. */
-            }
-
-            LogFlowFunc(("uVerAdditions=%RU32 (%RU32.%RU32.%RU32), r%RU32\n",
-                         uVerAdditions, VBOX_FULL_VERSION_GET_MAJOR(uVerAdditions), VBOX_FULL_VERSION_GET_MINOR(uVerAdditions),
-                                        VBOX_FULL_VERSION_GET_BUILD(uVerAdditions), uRevAdditions));
-            rc = VINF_SUCCESS;
+/** @todo
+ *  r=bird: This is just too bad for anyone using an OSE additions build...
+ */
+            if (uRevAdditions >= 103344) /* Since r103344: Protocol v3. */
+                uProto = 3;
+            else
+                uProto = 2; /* VBox 5.0.0 - 5.0.8: Protocol v2. */
         }
+        /* else: uProto: 0 */
+
+        LogFlowFunc(("uVerAdditions=%RU32 (%RU32.%RU32.%RU32), r%RU32\n",
+                     uVerAdditions, VBOX_FULL_VERSION_GET_MAJOR(uVerAdditions), VBOX_FULL_VERSION_GET_MINOR(uVerAdditions),
+                                    VBOX_FULL_VERSION_GET_BUILD(uVerAdditions), uRevAdditions));
+        rc = VINF_SUCCESS;
     }
     else
     {
diff --git a/src/VBox/Main/src-client/GuestDnDSourceImpl.cpp b/src/VBox/Main/src-client/GuestDnDSourceImpl.cpp
index b6eb67c..bc7400c 100644
--- a/src/VBox/Main/src-client/GuestDnDSourceImpl.cpp
+++ b/src/VBox/Main/src-client/GuestDnDSourceImpl.cpp
@@ -85,7 +85,7 @@ public:
 
     void handler()
     {
-        int vrc = GuestDnDSource::i_receiveDataThread(*m_pThread, this);
+        GuestDnDSource::i_receiveDataThreadTask(this);
     }
 
     virtual ~RecvDataTask(void) { }
@@ -357,8 +357,6 @@ HRESULT GuestDnDSource::drop(const com::Utf8Str &aFormat, DnDAction_T aAction, C
         return hr;
 
     RecvDataTask *pTask = NULL;
-    RTTHREAD threadRcv;
-    int rc = S_OK;
 
     try
     {
@@ -380,36 +378,30 @@ HRESULT GuestDnDSource::drop(const com::Utf8Str &aFormat, DnDAction_T aAction, C
 
         /* This function delete pTask in case of exceptions,
          * so there is no need in the call of delete operator. */
-        hr = pTask->createThread(&threadRcv);
+        hr = pTask->createThreadWithType(RTTHREADTYPE_MAIN_WORKER);
 
     }
-    catch(std::bad_alloc &)
+    catch (std::bad_alloc &)
     {
         hr = setError(E_OUTOFMEMORY);
     }
-    catch(...)
+    catch (...)
     {
-        LogRel2(("DnD: Could not create thread for RecvDataTask \n"));
+        LogRel2(("DnD: Could not create thread for data receiving task\n"));
         hr = E_FAIL;
     }
 
     if (SUCCEEDED(hr))
     {
-        rc = RTThreadUserWait(threadRcv, 30 * 1000 /* 30s timeout */);
-        if (RT_SUCCESS(rc))
-        {
-            mDataBase.m_cTransfersPending++;
+        mDataBase.m_cTransfersPending++;
 
-            hr = pResp->queryProgressTo(aProgress.asOutParam());
-            ComAssertComRC(hr);
+        hr = pResp->queryProgressTo(aProgress.asOutParam());
+        ComAssertComRC(hr);
 
-            /* Note: pTask is now owned by the worker thread. */
-        }
-        else
-            hr = setError(VBOX_E_IPRT_ERROR, tr("Waiting for receiving thread failed (%Rrc)"), rc);
+        /* Note: pTask is now owned by the worker thread. */
     }
     else
-        hr = setError(VBOX_E_IPRT_ERROR, tr("Starting thread for GuestDnDSource::i_receiveDataThread failed (%Rrc)"), rc);
+        hr = setError(VBOX_E_IPRT_ERROR, tr("Starting thread for GuestDnDSource::i_receiveDataThread failed (%Rhrc)"), hr);
     /* Note: mDataBase.mfTransferIsPending will be set to false again by i_receiveDataThread. */
 
     LogFlowFunc(("Returning hr=%Rhrc\n", hr));
@@ -745,6 +737,7 @@ int GuestDnDSource::i_onReceiveDir(PRECVDATACTX pCtx, const char *pszPath, uint3
 int GuestDnDSource::i_onReceiveFileHdr(PRECVDATACTX pCtx, const char *pszPath, uint32_t cbPath,
                                        uint64_t cbSize, uint32_t fMode, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
     AssertPtrReturn(pCtx,    VERR_INVALID_POINTER);
     AssertPtrReturn(pszPath, VERR_INVALID_POINTER);
     AssertReturn(cbPath,     VERR_INVALID_PARAMETER);
@@ -957,6 +950,10 @@ int GuestDnDSource::i_onReceiveFileData(PRECVDATACTX pCtx, const void *pvData, u
 }
 #endif /* VBOX_WITH_DRAG_AND_DROP_GH */
 
+/**
+ * @returns VBox status code that the caller ignores. Not sure if that's
+ *          intentional or not.
+ */
 int GuestDnDSource::i_receiveData(PRECVDATACTX pCtx, RTMSINTERVAL msTimeout)
 {
     AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
@@ -1057,31 +1054,33 @@ int GuestDnDSource::i_receiveData(PRECVDATACTX pCtx, RTMSINTERVAL msTimeout)
 }
 
 /* static */
-DECLCALLBACK(int) GuestDnDSource::i_receiveDataThread(RTTHREAD Thread, void *pvUser)
+void GuestDnDSource::i_receiveDataThreadTask(RecvDataTask *pTask)
 {
-    LogFlowFunc(("pvUser=%p\n", pvUser));
-
-    RecvDataTask *pTask = (RecvDataTask *)pvUser;
-    AssertPtrReturn(pTask, VERR_INVALID_POINTER);
+    LogFlowFunc(("pTask=%p\n", pTask));
+    AssertPtrReturnVoid(pTask);
 
     const ComObjPtr<GuestDnDSource> pThis(pTask->getSource());
     Assert(!pThis.isNull());
 
     AutoCaller autoCaller(pThis);
-    if (FAILED(autoCaller.rc())) return VERR_COM_INVALID_OBJECT_STATE;
-
-    int rc = RTThreadUserSignal(Thread);
-    AssertRC(rc);
+    if (FAILED(autoCaller.rc()))
+        return;
 
-    rc = pThis->i_receiveData(pTask->getCtx(), RT_INDEFINITE_WAIT /* msTimeout */);
+    int vrc = pThis->i_receiveData(pTask->getCtx(), RT_INDEFINITE_WAIT /* msTimeout */);
+    AssertRC(vrc);
+/** @todo
+ *
+ *  r=bird: What happens with @a vrc?
+ *
+ */
 
     AutoWriteLock alock(pThis COMMA_LOCKVAL_SRC_POS);
 
     Assert(pThis->mDataBase.m_cTransfersPending);
-    pThis->mDataBase.m_cTransfersPending--;
+    if (pThis->mDataBase.m_cTransfersPending)
+        pThis->mDataBase.m_cTransfersPending--;
 
-    LogFlowFunc(("pSource=%p returning rc=%Rrc\n", (GuestDnDSource *)pThis, rc));
-    return rc;
+    LogFlowFunc(("pSource=%p vrc=%Rrc (ignored)\n", (GuestDnDSource *)pThis, vrc));
 }
 
 int GuestDnDSource::i_receiveRawData(PRECVDATACTX pCtx, RTMSINTERVAL msTimeout)
diff --git a/src/VBox/Main/src-client/GuestDnDTargetImpl.cpp b/src/VBox/Main/src-client/GuestDnDTargetImpl.cpp
index b9bab3a..764cede 100644
--- a/src/VBox/Main/src-client/GuestDnDTargetImpl.cpp
+++ b/src/VBox/Main/src-client/GuestDnDTargetImpl.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -89,8 +89,7 @@ public:
 
     void handler()
     {
-        int vrc = GuestDnDTarget::i_sendDataThread(*m_pThread, this);
-        NOREF(vrc);
+        GuestDnDTarget::i_sendDataThreadTask(this);
     }
 
     virtual ~SendDataTask(void)
@@ -426,6 +425,7 @@ HRESULT GuestDnDTarget::move(ULONG aScreenId, ULONG aX, ULONG aY,
 
 HRESULT GuestDnDTarget::leave(ULONG uScreenId)
 {
+    RT_NOREF(uScreenId);
 #if !defined(VBOX_WITH_DRAG_AND_DROP)
     ReturnComNotImplemented();
 #else /* VBOX_WITH_DRAG_AND_DROP */
@@ -557,31 +557,36 @@ HRESULT GuestDnDTarget::drop(ULONG aScreenId, ULONG aX, ULONG aY,
 }
 
 /* static */
-DECLCALLBACK(int) GuestDnDTarget::i_sendDataThread(RTTHREAD Thread, void *pvUser)
+void GuestDnDTarget::i_sendDataThreadTask(SendDataTask *pTask)
 {
-    LogFlowFunc(("pvUser=%p\n", pvUser));
+    LogFlowFunc(("pTask=%p\n", pTask));
 
-    SendDataTask *pTask = (SendDataTask *)pvUser;
-    AssertPtrReturn(pTask, VERR_INVALID_POINTER);
+    AssertPtrReturnVoid(pTask);
 
     const ComObjPtr<GuestDnDTarget> pThis(pTask->getTarget());
     Assert(!pThis.isNull());
 
     AutoCaller autoCaller(pThis);
-    if (FAILED(autoCaller.rc())) return VERR_COM_INVALID_OBJECT_STATE;
+    if (FAILED(autoCaller.rc()))
+        return;
 
-    int rc = RTThreadUserSignal(Thread);
-    AssertRC(rc);
+    int vrc = RTThreadUserSignal(RTThreadSelf());
+    AssertRC(vrc);
 
-    rc = pThis->i_sendData(pTask->getCtx(), RT_INDEFINITE_WAIT /* msTimeout */);
+    vrc = pThis->i_sendData(pTask->getCtx(), RT_INDEFINITE_WAIT /* msTimeout */);
+/** @todo
+ *
+ *  r=bird: What happens with @a vrc?
+ *
+ */
 
     AutoWriteLock alock(pThis COMMA_LOCKVAL_SRC_POS);
 
     Assert(pThis->mDataBase.m_cTransfersPending);
-    pThis->mDataBase.m_cTransfersPending--;
+    if (pThis->mDataBase.m_cTransfersPending)
+        pThis->mDataBase.m_cTransfersPending--;
 
-    LogFlowFunc(("pTarget=%p returning rc=%Rrc\n", (GuestDnDTarget *)pThis, rc));
-    return rc;
+    LogFlowFunc(("pTarget=%p vrc=%Rrc (ignored)\n", (GuestDnDTarget *)pThis, vrc));
 }
 
 /**
@@ -616,7 +621,7 @@ HRESULT GuestDnDTarget::sendData(ULONG aScreenId, const com::Utf8Str &aFormat, c
     if (mDataBase.m_cTransfersPending)
         return setError(E_INVALIDARG, tr("Another drop operation already is in progress"));
 
-    /* Dito. */
+    /* Ditto. */
     GuestDnDResponse *pResp = GuestDnDInst()->response();
     AssertPtr(pResp);
 
@@ -626,8 +631,6 @@ HRESULT GuestDnDTarget::sendData(ULONG aScreenId, const com::Utf8Str &aFormat, c
 
     SendDataTask *pTask = NULL;
     PSENDDATACTX pSendCtx = NULL;
-    RTTHREAD threadSnd;
-    int rc = S_OK;
 
     try
     {
@@ -650,38 +653,32 @@ HRESULT GuestDnDTarget::sendData(ULONG aScreenId, const com::Utf8Str &aFormat, c
             throw hr = E_FAIL;
         }
 
-        //this function delete pTask in case of exceptions, so there is no need in the call of delete operator
-        //pSendCtx is deleted in the pTask destructor
-        hr = pTask->createThread(&threadSnd);
+        /* This function delete pTask in case of exceptions,
+         * so there is no need in the call of delete operator. */
+        hr = pTask->createThreadWithType(RTTHREADTYPE_MAIN_WORKER);
 
     }
-    catch(std::bad_alloc &)
+    catch (std::bad_alloc &)
     {
         hr = setError(E_OUTOFMEMORY);
     }
-    catch(...)
+    catch (...)
     {
-        LogRel2(("DnD: Could not create thread for SendDataTask \n"));
+        LogRel2(("DnD: Could not create thread for data sending task\n"));
         hr = E_FAIL;
     }
 
     if (SUCCEEDED(hr))
     {
-        rc = RTThreadUserWait(threadSnd, 30 * 1000 /* 30s timeout */);
-        if (RT_SUCCESS(rc))
-        {
-            mDataBase.m_cTransfersPending++;
+        mDataBase.m_cTransfersPending++;
 
-            hr = pResp->queryProgressTo(aProgress.asOutParam());
-            ComAssertComRC(hr);
+        hr = pResp->queryProgressTo(aProgress.asOutParam());
+        ComAssertComRC(hr);
 
-            /* Note: pTask is now owned by the worker thread. */
-        }
-        else
-            hr = setError(VBOX_E_IPRT_ERROR, tr("Waiting for sending thread failed (%Rrc)"), rc);
+        /* Note: pTask is now owned by the worker thread. */
     }
     else
-        hr = setError(VBOX_E_IPRT_ERROR, tr("Starting thread for GuestDnDTarget::i_sendDataThread (%Rrc)"), rc);
+        hr = setError(VBOX_E_IPRT_ERROR, tr("Starting thread for GuestDnDTarget::i_sendDataThread (%Rhrc)"), hr);
 
     LogFlowFunc(("Returning hr=%Rhrc\n", hr));
     return hr;
@@ -774,6 +771,10 @@ Utf8Str GuestDnDTarget::i_hostErrorToString(int hostRc)
     return strError;
 }
 
+/**
+ * @returns VBox status code that the caller ignores. Not sure if that's
+ *          intentional or not.
+ */
 int GuestDnDTarget::i_sendData(PSENDDATACTX pCtx, RTMSINTERVAL msTimeout)
 {
     AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
@@ -999,8 +1000,7 @@ int GuestDnDTarget::i_sendFileData(PSENDDATACTX pCtx, GuestDnDURIObjCtx *pObjCtx
     DnDURIObject *pObj = pObjCtx->getObj();
     AssertPtr(pObj);
 
-    GuestDnDResponse *pResp = pCtx->mpResp;
-    AssertPtr(pResp);
+    AssertPtr(pCtx->mpResp);
 
     /** @todo Don't allow concurrent reads per context! */
 
@@ -1491,9 +1491,6 @@ int GuestDnDTarget::i_sendRawData(PSENDDATACTX pCtx, RTMSINTERVAL msTimeout)
     AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
     NOREF(msTimeout);
 
-    GuestDnD *pInst = GuestDnDInst();
-    AssertPtr(pInst);
-
     GuestDnDData *pData = &pCtx->mData;
 
     /** @todo At the moment we only allow sending up to 64K raw data.
diff --git a/src/VBox/Main/src-client/GuestFileImpl.cpp b/src/VBox/Main/src-client/GuestFileImpl.cpp
index 19947de..a5cda63 100644
--- a/src/VBox/Main/src-client/GuestFileImpl.cpp
+++ b/src/VBox/Main/src-client/GuestFileImpl.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -84,6 +84,7 @@ public:
             {
                 AssertPtrReturn(mFile, E_POINTER);
                 int rc2 = mFile->signalWaitEvent(aType, aEvent);
+                NOREF(rc2);
 #ifdef DEBUG_andy
                 LogFlowFunc(("Signalling events of type=%RU32, file=%p resulted in rc=%Rrc\n",
                              aType, mFile, rc2));
@@ -444,7 +445,6 @@ int GuestFile::i_onFileNotify(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOST
     pSvcCbData->mpaParms[idx++].getUInt32(&dataCb.uType);
     pSvcCbData->mpaParms[idx++].getUInt32(&dataCb.rc);
 
-    FileStatus_T fileStatus = FileStatus_Undefined;
     int guestRc = (int)dataCb.rc; /* uint32_t vs. int. */
 
     LogFlowFunc(("uType=%RU32, guestRc=%Rrc\n",
@@ -737,17 +737,17 @@ int GuestFile::i_readData(uint32_t uSize, uint32_t uTimeoutMS,
 
     alock.release(); /* Drop write lock before sending. */
 
-    uint32_t cbRead;
     vrc = sendCommand(HOST_FILE_READ, i, paParms);
     if (RT_SUCCESS(vrc))
-        vrc = i_waitForRead(pEvent, uTimeoutMS, pvData, cbData, &cbRead);
-
-    if (RT_SUCCESS(vrc))
     {
-        LogFlowThisFunc(("cbRead=%RU32\n", cbRead));
-
-        if (pcbRead)
-            *pcbRead = cbRead;
+        uint32_t cbRead = 0;
+        vrc = i_waitForRead(pEvent, uTimeoutMS, pvData, cbData, &cbRead);
+        if (RT_SUCCESS(vrc))
+        {
+            LogFlowThisFunc(("cbRead=%RU32\n", cbRead));
+            if (pcbRead)
+                *pcbRead = cbRead;
+        }
     }
 
     unregisterWaitEvent(pEvent);
@@ -793,17 +793,18 @@ int GuestFile::i_readDataAt(uint64_t uOffset, uint32_t uSize, uint32_t uTimeoutM
 
     alock.release(); /* Drop write lock before sending. */
 
-    uint32_t cbRead;
     vrc = sendCommand(HOST_FILE_READ_AT, i, paParms);
     if (RT_SUCCESS(vrc))
-        vrc = i_waitForRead(pEvent, uTimeoutMS, pvData, cbData, &cbRead);
-
-    if (RT_SUCCESS(vrc))
     {
-        LogFlowThisFunc(("cbRead=%RU32\n", cbRead));
+        uint32_t cbRead = 0;
+        vrc = i_waitForRead(pEvent, uTimeoutMS, pvData, cbData, &cbRead);
+        if (RT_SUCCESS(vrc))
+        {
+            LogFlowThisFunc(("cbRead=%RU32\n", cbRead));
 
-        if (pcbRead)
-            *pcbRead = cbRead;
+            if (pcbRead)
+                *pcbRead = cbRead;
+        }
     }
 
     unregisterWaitEvent(pEvent);
@@ -1098,17 +1099,17 @@ int GuestFile::i_writeData(uint32_t uTimeoutMS, void *pvData, uint32_t cbData,
 
     alock.release(); /* Drop write lock before sending. */
 
-    uint32_t cbWritten;
     vrc = sendCommand(HOST_FILE_WRITE, i, paParms);
     if (RT_SUCCESS(vrc))
-        vrc = i_waitForWrite(pEvent, uTimeoutMS, &cbWritten);
-
-    if (RT_SUCCESS(vrc))
     {
-        LogFlowThisFunc(("cbWritten=%RU32\n", cbWritten));
-
-        if (cbWritten)
-            *pcbWritten = cbWritten;
+        uint32_t cbWritten = 0;
+        vrc = i_waitForWrite(pEvent, uTimeoutMS, &cbWritten);
+        if (RT_SUCCESS(vrc))
+        {
+            LogFlowThisFunc(("cbWritten=%RU32\n", cbWritten));
+            if (cbWritten)
+                *pcbWritten = cbWritten;
+        }
     }
 
     unregisterWaitEvent(pEvent);
@@ -1158,17 +1159,17 @@ int GuestFile::i_writeDataAt(uint64_t uOffset, uint32_t uTimeoutMS,
 
     alock.release(); /* Drop write lock before sending. */
 
-    uint32_t cbWritten;
     vrc = sendCommand(HOST_FILE_WRITE_AT, i, paParms);
     if (RT_SUCCESS(vrc))
-        vrc = i_waitForWrite(pEvent, uTimeoutMS, &cbWritten);
-
-    if (RT_SUCCESS(vrc))
     {
-        LogFlowThisFunc(("cbWritten=%RU32\n", cbWritten));
-
-        if (cbWritten)
-            *pcbWritten = cbWritten;
+        uint32_t cbWritten = 0;
+        vrc = i_waitForWrite(pEvent, uTimeoutMS, &cbWritten);
+        if (RT_SUCCESS(vrc))
+        {
+            LogFlowThisFunc(("cbWritten=%RU32\n", cbWritten));
+            if (cbWritten)
+                *pcbWritten = cbWritten;
+        }
     }
 
     unregisterWaitEvent(pEvent);
@@ -1209,11 +1210,13 @@ HRESULT GuestFile::close()
 
 HRESULT GuestFile::queryInfo(ComPtr<IFsObjInfo> &aObjInfo)
 {
+    RT_NOREF(aObjInfo);
     ReturnComNotImplemented();
 }
 
 HRESULT GuestFile::querySize(LONG64 *aSize)
 {
+    RT_NOREF(aSize);
     ReturnComNotImplemented();
 }
 
@@ -1337,11 +1340,13 @@ HRESULT GuestFile::seek(LONG64 aOffset, FileSeekOrigin_T aWhence, LONG64 *aNewOf
 
 HRESULT GuestFile::setACL(const com::Utf8Str &aAcl, ULONG aMode)
 {
+    RT_NOREF(aAcl, aMode);
     ReturnComNotImplemented();
 }
 
 HRESULT GuestFile::setSize(LONG64 aSize)
 {
+    RT_NOREF(aSize);
     ReturnComNotImplemented();
 }
 
diff --git a/src/VBox/Main/src-client/GuestFsObjInfoImpl.cpp b/src/VBox/Main/src-client/GuestFsObjInfoImpl.cpp
index 32f01da..62f16d7 100644
--- a/src/VBox/Main/src-client/GuestFsObjInfoImpl.cpp
+++ b/src/VBox/Main/src-client/GuestFsObjInfoImpl.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-client/GuestImpl.cpp b/src/VBox/Main/src-client/GuestImpl.cpp
index 5670600..af1c439 100644
--- a/src/VBox/Main/src-client/GuestImpl.cpp
+++ b/src/VBox/Main/src-client/GuestImpl.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -209,6 +209,7 @@ DECLCALLBACK(int)  Guest::i_staticEnumStatsCallback(const char *pszName, STAMTYP
                                                     STAMUNIT enmUnit, STAMVISIBILITY enmVisiblity,
                                                     const char *pszDesc, void *pvUser)
 {
+    RT_NOREF(enmVisiblity, pszDesc);
     AssertLogRelMsgReturn(enmType == STAMTYPE_COUNTER, ("Unexpected sample type %d ('%s')\n", enmType, pszName), VINF_SUCCESS);
     AssertLogRelMsgReturn(enmUnit == STAMUNIT_BYTES, ("Unexpected sample unit %d ('%s')\n", enmUnit, pszName), VINF_SUCCESS);
 
@@ -257,6 +258,8 @@ DECLCALLBACK(int)  Guest::i_staticEnumStatsCallback(const char *pszName, STAMTYP
 
 void Guest::i_updateStats(uint64_t iTick)
 {
+    RT_NOREF(iTick);
+
     uint64_t cbFreeTotal      = 0;
     uint64_t cbAllocTotal     = 0;
     uint64_t cbBalloonedTotal = 0;
@@ -488,6 +491,7 @@ HRESULT Guest::getAdditionsRevision(ULONG *aAdditionsRevision)
 HRESULT Guest::getDnDSource(ComPtr<IGuestDnDSource> &aDnDSource)
 {
 #ifndef VBOX_WITH_DRAG_AND_DROP
+    RT_NOREF(aDnDSource);
     ReturnComNotImplemented();
 #else
     LogFlowThisFuncEnter();
@@ -503,6 +507,7 @@ HRESULT Guest::getDnDSource(ComPtr<IGuestDnDSource> &aDnDSource)
 HRESULT Guest::getDnDTarget(ComPtr<IGuestDnDTarget> &aDnDTarget)
 {
 #ifndef VBOX_WITH_DRAG_AND_DROP
+    RT_NOREF(aDnDTarget);
     ReturnComNotImplemented();
 #else
     LogFlowThisFuncEnter();
@@ -1023,6 +1028,7 @@ void Guest::i_facilityUpdate(VBoxGuestFacilityType a_enmFacility, VBoxGuestFacil
 void Guest::i_onUserStateChange(Bstr aUser, Bstr aDomain, VBoxGuestUserState enmState,
                                 const uint8_t *pbDetails, uint32_t cbDetails)
 {
+    RT_NOREF(pbDetails, cbDetails);
     LogFlowThisFunc(("\n"));
 
     AutoCaller autoCaller(this);
diff --git a/src/VBox/Main/src-client/GuestProcessImpl.cpp b/src/VBox/Main/src-client/GuestProcessImpl.cpp
index 75196ce..11e8e91 100644
--- a/src/VBox/Main/src-client/GuestProcessImpl.cpp
+++ b/src/VBox/Main/src-client/GuestProcessImpl.cpp
@@ -92,7 +92,7 @@ public:
 
     void handler()
     {
-        int vrc = GuestProcess::i_startProcessThread(NULL, this);
+        GuestProcess::i_startProcessThreadTask(this);
     }
 };
 
@@ -134,7 +134,8 @@ public:
             {
                 AssertPtrReturn(mProcess, E_POINTER);
                 int rc2 = mProcess->signalWaitEvent(aType, aEvent);
-#ifdef DEBUG
+                RT_NOREF(rc2);
+#ifdef LOG_ENABLED
                 LogFlowThisFunc(("Signalling events of type=%RU32, pProcess=%p resulted in rc=%Rrc\n",
                                  aType, &mProcess, rc2));
 #endif
@@ -298,6 +299,7 @@ void GuestProcess::uninit(void)
 
     LogFlowThisFunc(("Returning rc=%Rrc, guestRc=%Rrc\n",
                      vrc, guestRc));
+    RT_NOREF_PV(vrc);
 }
 
 // implementation of public getters/setters for attributes
@@ -313,7 +315,7 @@ HRESULT GuestProcess::getArguments(std::vector<com::Utf8Str> &aArguments)
 
 HRESULT GuestProcess::getEnvironment(std::vector<com::Utf8Str> &aEnvironment)
 {
-#ifndef VBOX_WTIH_GUEST_CONTROL
+#ifndef VBOX_WITH_GUEST_CONTROL
     ReturnComNotImplemented();
 #else
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);  /* (Paranoia since both environment objects are immutable.) */
@@ -330,7 +332,7 @@ HRESULT GuestProcess::getEnvironment(std::vector<com::Utf8Str> &aEnvironment)
             if (RT_SUCCESS(vrc))
             {
                 vrc = TmpEnv.applyChanges(mData.mProcess.mEnvironmentChanges);
-                if (RT_SUCCESS(rc))
+                if (RT_SUCCESS(vrc))
                     vrc = TmpEnv.queryPutEnvArray(&aEnvironment);
             }
         }
@@ -789,6 +791,7 @@ int GuestProcess::i_onProcessStatusChange(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXG
 
 int GuestProcess::i_onProcessOutput(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData)
 {
+    RT_NOREF(pCbCtx);
     AssertPtrReturn(pSvcCbData, VERR_INVALID_POINTER);
 
     if (pSvcCbData->mParms < 5)
@@ -1005,10 +1008,10 @@ HRESULT GuestProcess::i_setErrorExternal(VirtualBoxBase *pInterface, int guestRc
     return pInterface->setError(VBOX_E_IPRT_ERROR, GuestProcess::i_guestErrorToString(guestRc).c_str());
 }
 
-int GuestProcess::i_startProcess(uint32_t uTimeoutMS, int *pGuestRc)
+int GuestProcess::i_startProcess(uint32_t cMsTimeout, int *pGuestRc)
 {
-    LogFlowThisFunc(("uTimeoutMS=%RU32, procExe=%s, procTimeoutMS=%RU32, procFlags=%x, sessionID=%RU32\n",
-                     uTimeoutMS, mData.mProcess.mExecutable.c_str(), mData.mProcess.mTimeoutMS, mData.mProcess.mFlags,
+    LogFlowThisFunc(("cMsTimeout=%RU32, procExe=%s, procTimeoutMS=%RU32, procFlags=%x, sessionID=%RU32\n",
+                     cMsTimeout, mData.mProcess.mExecutable.c_str(), mData.mProcess.mTimeoutMS, mData.mProcess.mFlags,
                      mSession->i_getId()));
 
     /* Wait until the caller function (if kicked off by a thread)
@@ -1024,17 +1027,25 @@ int GuestProcess::i_startProcess(uint32_t uTimeoutMS, int *pGuestRc)
     try
     {
         eventTypes.push_back(VBoxEventType_OnGuestProcessStateChanged);
-
         vrc = registerWaitEvent(eventTypes, &pEvent);
     }
     catch (std::bad_alloc)
     {
         vrc = VERR_NO_MEMORY;
     }
-
     if (RT_FAILURE(vrc))
         return vrc;
 
+    vrc = i_startProcessInner(cMsTimeout, alock, pEvent, pGuestRc);
+
+    unregisterWaitEvent(pEvent);
+
+    LogFlowFuncLeaveRC(vrc);
+    return vrc;
+}
+
+int GuestProcess::i_startProcessInner(uint32_t cMsTimeout, AutoWriteLock &rLock, GuestWaitEvent *pEvent, int *pGuestRc)
+{
     GuestSession *pSession = mSession;
     AssertPtr(pSession);
     uint32_t const uProtocol = pSession->i_getProtocolVersion();
@@ -1043,13 +1054,13 @@ int GuestProcess::i_startProcess(uint32_t uTimeoutMS, int *pGuestRc)
 
 
     /* Prepare arguments. */
-    char *pszArgs = NULL;
     size_t cArgs = mData.mProcess.mArguments.size();
-    if (cArgs >= UINT32_MAX)
-        vrc = VERR_BUFFER_OVERFLOW;
+    if (cArgs >= 128*1024)
+        return VERR_BUFFER_OVERFLOW;
 
-    if (   RT_SUCCESS(vrc)
-        && cArgs)
+    char *pszArgs = NULL;
+    int vrc = VINF_SUCCESS;
+    if (cArgs)
     {
         char const **papszArgv = (char const **)RTMemAlloc((cArgs + 1) * sizeof(papszArgv[0]));
         AssertReturn(papszArgv, VERR_NO_MEMORY);
@@ -1067,18 +1078,19 @@ int GuestProcess::i_startProcess(uint32_t uTimeoutMS, int *pGuestRc)
             vrc = RTGetOptArgvToString(&pszArgs, papszArgv, RTGETOPTARGV_CNV_QUOTE_BOURNE_SH);
 
         RTMemFree(papszArgv);
+        if (RT_FAILURE(vrc))
+            return vrc;
+
+        /* Note! No returns after this. */
     }
 
     /* Calculate arguments size (in bytes). */
-    size_t cbArgs = 0;
-    if (RT_SUCCESS(vrc))
-        cbArgs = pszArgs ? strlen(pszArgs) + 1 : 0; /* Include terminating zero. */
+    size_t cbArgs = pszArgs ? strlen(pszArgs) + 1 : 0; /* Include terminating zero. */
 
     /* Prepare environment.  The guest service dislikes the empty string at the end, so drop it. */
     size_t  cbEnvBlock;
     char   *pszzEnvBlock;
-    if (RT_SUCCESS(vrc))
-        vrc = mData.mProcess.mEnvironmentChanges.queryUtf8Block(&pszzEnvBlock, &cbEnvBlock);
+    vrc = mData.mProcess.mEnvironmentChanges.queryUtf8Block(&pszzEnvBlock, &cbEnvBlock);
     if (RT_SUCCESS(vrc))
     {
         Assert(cbEnvBlock > 0);
@@ -1123,7 +1135,7 @@ int GuestProcess::i_startProcess(uint32_t uTimeoutMS, int *pGuestRc)
             paParms[i++].setPointer((void *)&mData.mProcess.mAffinity, sizeof(mData.mProcess.mAffinity));
         }
 
-        alock.release(); /* Drop the write lock before sending. */
+        rLock.release(); /* Drop the write lock before sending. */
 
         vrc = sendCommand(HOST_EXEC_CMD, i, paParms);
         if (RT_FAILURE(vrc))
@@ -1135,15 +1147,11 @@ int GuestProcess::i_startProcess(uint32_t uTimeoutMS, int *pGuestRc)
         mData.mProcess.mEnvironmentChanges.freeUtf8Block(pszzEnvBlock);
     }
 
-    if (pszArgs)
-        RTStrFree(pszArgs);
+    RTStrFree(pszArgs);
 
     if (RT_SUCCESS(vrc))
-        vrc = i_waitForStatusChange(pEvent, uTimeoutMS,
+        vrc = i_waitForStatusChange(pEvent, cMsTimeout,
                                     NULL /* Process status */, pGuestRc);
-    unregisterWaitEvent(pEvent);
-
-    LogFlowFuncLeaveRC(vrc);
     return vrc;
 }
 
@@ -1183,24 +1191,29 @@ int GuestProcess::i_startProcessAsync(void)
 }
 
 /* static */
-DECLCALLBACK(int) GuestProcess::i_startProcessThread(RTTHREAD Thread, void *pvUser)
+void GuestProcess::i_startProcessThreadTask(GuestProcessStartTask *pTask)
 {
-    LogFlowFunc(("pvUser=%p\n", pvUser));
-
-    GuestProcessStartTask* pTask = static_cast<GuestProcessStartTask*>(pvUser);
+    LogFlowFunc(("pTask=%p\n", pTask));
 
     const ComObjPtr<GuestProcess> pProcess(pTask->i_process());
     Assert(!pProcess.isNull());
 
     AutoCaller autoCaller(pProcess);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+    if (FAILED(autoCaller.rc()))
+        return;
 
     int vrc = pProcess->i_startProcess(30 * 1000 /* 30s timeout */,
                                        NULL /* Guest rc, ignored */);
+/** @todo
+ *
+ * r=bird: what's up with vrc here? Safe to ignore it?
+ *
+ */
+
     /* Nothing to do here anymore. */
 
-    LogFlowFunc(("pProcess=%p returning rc=%Rrc\n", (GuestProcess *)pProcess, vrc));
-    return vrc;
+    LogFlowFunc(("pProcess=%p vrc=%Rrc (ignored)\n", (GuestProcess *)pProcess, vrc));
+    NOREF(vrc);
 }
 
 int GuestProcess::i_terminateProcess(uint32_t uTimeoutMS, int *pGuestRc)
@@ -1326,6 +1339,8 @@ ProcessWaitResult_T GuestProcess::i_waitFlagsToResultEx(uint32_t fWaitFlags,
 
         case ProcessStatus_Undefined:
         case ProcessStatus_Starting:
+        case ProcessStatus_Terminating:
+        case ProcessStatus_Paused:
             /* No result available yet, leave wait
              * flags untouched. */
             break;
@@ -1477,6 +1492,7 @@ int GuestProcess::i_waitFor(uint32_t fWaitFlags, ULONG uTimeoutMS,
 int GuestProcess::i_waitForInputNotify(GuestWaitEvent *pEvent, uint32_t uHandle, uint32_t uTimeoutMS,
                                        ProcessInputStatus_T *pInputStatus, uint32_t *pcbProcessed)
 {
+    RT_NOREF(uHandle);
     AssertPtrReturn(pEvent, VERR_INVALID_POINTER);
 
     VBoxEventType_T evtType;
@@ -1642,6 +1658,9 @@ bool GuestProcess::i_waitResultImpliesEx(ProcessWaitResult_T waitResult,
                                          ProcessStatus_T procStatus, uint32_t uProcFlags,
                                          uint32_t uProtocol)
 {
+    /** @todo r=bird: If you subscribe to HN, which the 'u' in 'uProcFlags'
+     *        indicates, you should actually be using 'fProc'! */
+    RT_NOREF(uProtocol, uProcFlags);
     bool fImplies;
 
     switch (waitResult)
@@ -1965,18 +1984,18 @@ int GuestProcessTool::Init(GuestSession *pGuestSession, const GuestProcessStartu
     int vrc = pSession->i_processCreateExInternal(mStartupInfo, pProcess);
     if (RT_SUCCESS(vrc))
     {
-        int guestRc;
+        int vrcGuest = VINF_SUCCESS;
         vrc = fAsync
             ? pProcess->i_startProcessAsync()
-            : pProcess->i_startProcess(30 * 1000 /* 30s timeout */, &guestRc);
+            : pProcess->i_startProcess(30 * 1000 /* 30s timeout */, &vrcGuest);
 
         if (   RT_SUCCESS(vrc)
             && !fAsync
-            && RT_FAILURE(guestRc)
+            && RT_FAILURE(vrcGuest)
            )
         {
             if (pGuestRc)
-                *pGuestRc = guestRc;
+                *pGuestRc = vrcGuest;
             vrc = VERR_GSTCTL_GUEST_ERROR;
         }
     }
@@ -2012,9 +2031,9 @@ int GuestProcessTool::i_getCurrentBlock(uint32_t uHandle, GuestProcessStreamBloc
 
 int GuestProcessTool::i_getRc(void) const
 {
-    LONG exitCode;
+    LONG exitCode = -1;
     HRESULT hr = pProcess->COMGETTER(ExitCode(&exitCode));
-    Assert(SUCCEEDED(hr));
+    AssertComRC(hr);
 
     return GuestProcessTool::i_exitCodeToRc(mStartupInfo, exitCode);
 }
@@ -2025,7 +2044,7 @@ bool GuestProcessTool::i_isRunning(void)
 
     ProcessStatus_T procStatus = ProcessStatus_Undefined;
     HRESULT hr = pProcess->COMGETTER(Status(&procStatus));
-    Assert(SUCCEEDED(hr));
+    AssertComRC(hr);
 
     if (   procStatus == ProcessStatus_Started
         || procStatus == ProcessStatus_Paused
@@ -2200,9 +2219,9 @@ int GuestProcessTool::i_terminatedOk(LONG *plExitCode /* = NULL */)
     int vrc;
     if (!i_isRunning())
     {
-        LONG lExitCode;
+        LONG lExitCode = -1;
         HRESULT hr = pProcess->COMGETTER(ExitCode(&lExitCode));
-        Assert(SUCCEEDED(hr));
+        AssertComRC(hr);
 
         if (plExitCode)
             *plExitCode = lExitCode;
@@ -2249,7 +2268,7 @@ int GuestProcessTool::i_waitEx(uint32_t fFlags, GuestProcessStreamBlock *pStrmBl
     uint64_t u64StartMS = RTTimeMilliTS();
     uint32_t uTimeoutMS = mStartupInfo.mTimeoutMS;
 
-    int guestRc;
+    int vrcGuest = VINF_SUCCESS;
     bool fDone = false;
 
     BYTE byBuf[_64K];
@@ -2278,14 +2297,14 @@ int GuestProcessTool::i_waitEx(uint32_t fFlags, GuestProcessStreamBlock *pStrmBl
       uTimeoutMS == RT_INDEFINITE_WAIT                         \
     ? RT_INDEFINITE_WAIT : uTimeoutMS - (uint32_t)u64ElapsedMS \
 
-    ProcessWaitResult_T waitRes;
+    ProcessWaitResult_T waitRes = ProcessWaitResult_None;
     do
     {
         uint64_t u64ElapsedMS;
         UPDATE_AND_CHECK_ELAPSED_TIME();
 
         vrc = pProcess->i_waitFor(fWaitFlags, GET_REMAINING_TIME,
-                                  waitRes, &guestRc);
+                                  waitRes, &vrcGuest);
         if (RT_FAILURE(vrc))
             break;
 
@@ -2346,7 +2365,7 @@ int GuestProcessTool::i_waitEx(uint32_t fFlags, GuestProcessStreamBlock *pStrmBl
             vrc = pProcess->i_readData(OUTPUT_HANDLE_ID_STDOUT, sizeof(byBuf),
                                        GET_REMAINING_TIME,
                                        byBuf, sizeof(byBuf),
-                                       &cbRead, &guestRc);
+                                       &cbRead, &vrcGuest);
             if (   RT_FAILURE(vrc)
                 || vrc == VWRN_GSTCTL_OBJECTSTATE_CHANGED)
                 break;
@@ -2380,7 +2399,7 @@ int GuestProcessTool::i_waitEx(uint32_t fFlags, GuestProcessStreamBlock *pStrmBl
             vrc = pProcess->i_readData(OUTPUT_HANDLE_ID_STDERR, sizeof(byBuf),
                                        GET_REMAINING_TIME,
                                        byBuf, sizeof(byBuf),
-                                       &cbRead, &guestRc);
+                                       &cbRead, &vrcGuest);
             if (   RT_FAILURE(vrc)
                 || vrc == VWRN_GSTCTL_OBJECTSTATE_CHANGED)
                 break;
@@ -2399,13 +2418,13 @@ int GuestProcessTool::i_waitEx(uint32_t fFlags, GuestProcessStreamBlock *pStrmBl
 #undef UPDATE_AND_CHECK_ELAPSED_TIME
 #undef GET_REMAINING_TIME
 
-    if (RT_FAILURE(guestRc))
+    if (RT_FAILURE(vrcGuest))
         vrc = VERR_GSTCTL_GUEST_ERROR;
 
-    LogFlowThisFunc(("Loop ended with rc=%Rrc, guestRc=%Rrc, waitRes=%RU32\n",
-                     vrc, guestRc, waitRes));
+    LogFlowThisFunc(("Loop ended with rc=%Rrc, vrcGuest=%Rrc, waitRes=%RU32\n",
+                     vrc, vrcGuest, waitRes));
     if (pGuestRc)
-        *pGuestRc = guestRc;
+        *pGuestRc = vrcGuest;
 
     LogFlowFuncLeaveRC(vrc);
     return vrc;
diff --git a/src/VBox/Main/src-client/GuestSessionImpl.cpp b/src/VBox/Main/src-client/GuestSessionImpl.cpp
index ed74121..ca91abb 100644
--- a/src/VBox/Main/src-client/GuestSessionImpl.cpp
+++ b/src/VBox/Main/src-client/GuestSessionImpl.cpp
@@ -91,7 +91,7 @@ public:
 
     void handler()
     {
-        int vrc = GuestSession::i_startSessionThread(NULL, this);
+        GuestSession::i_startSessionThreadTask(this);
     }
 };
 
@@ -131,6 +131,7 @@ public:
             {
                 AssertPtrReturn(mSession, E_POINTER);
                 int rc2 = mSession->signalWaitEvent(aType, aEvent);
+                RT_NOREF(rc2);
 #ifdef DEBUG_andy
                 LogFlowFunc(("Signalling events of type=%RU32, session=%p resulted in rc=%Rrc\n",
                              aType, mSession, rc2));
@@ -531,11 +532,13 @@ HRESULT GuestSession::getPathStyle(PathStyle_T *aPathStyle)
 
 HRESULT GuestSession::getCurrentDirectory(com::Utf8Str &aCurrentDirectory)
 {
+    RT_NOREF(aCurrentDirectory);
     ReturnComNotImplemented();
 }
 
 HRESULT GuestSession::setCurrentDirectory(const com::Utf8Str &aCurrentDirectory)
 {
+    RT_NOREF(aCurrentDirectory);
     ReturnComNotImplemented();
 }
 
@@ -826,14 +829,11 @@ int GuestSession::i_objectCreateTempInternal(const Utf8Str &strTemplate, const U
     LogFlowThisFunc(("strTemplate=%s, strPath=%s, fDirectory=%RTbool\n",
                      strTemplate.c_str(), strPath.c_str(), fDirectory));
 
-    int vrc = VINF_SUCCESS;
-
     GuestProcessStartupInfo procInfo;
-    procInfo.mFlags      = ProcessCreateFlag_WaitForStdOut;
-    procInfo.mExecutable = Utf8Str(VBOXSERVICE_TOOL_MKTEMP);
-
+    procInfo.mFlags = ProcessCreateFlag_WaitForStdOut;
     try
     {
+        procInfo.mExecutable = Utf8Str(VBOXSERVICE_TOOL_MKTEMP);
         procInfo.mArguments.push_back(procInfo.mExecutable); /* Set argv0. */
         procInfo.mArguments.push_back(Utf8Str("--machinereadable"));
         if (fDirectory)
@@ -848,18 +848,17 @@ int GuestSession::i_objectCreateTempInternal(const Utf8Str &strTemplate, const U
     }
     catch (std::bad_alloc)
     {
-        vrc = VERR_NO_MEMORY;
+        Log(("Out of memory!\n"));
+        return VERR_NO_MEMORY;
     }
 
     /** @todo Use an internal HGCM command for this operation, since
      *        we now can run in a user-dedicated session. */
-    int guestRc;
+    int vrcGuest = VERR_IPE_UNINITIALIZED_STATUS;
     GuestCtrlStreamObjects stdOut;
-    if (RT_SUCCESS(vrc))
-        vrc = GuestProcessTool::i_runEx(this, procInfo,
+    int vrc = GuestProcessTool::i_runEx(this, procInfo,
                                         &stdOut, 1 /* cStrmOutObjects */,
-                                        &guestRc);
-
+                                        &vrcGuest);
     if (!GuestProcess::i_isGuestError(vrc))
     {
         GuestFsObjData objData;
@@ -868,7 +867,9 @@ int GuestSession::i_objectCreateTempInternal(const Utf8Str &strTemplate, const U
             vrc = objData.FromMkTemp(stdOut.at(0));
             if (RT_FAILURE(vrc))
             {
-                guestRc = vrc;
+                vrcGuest = vrc;
+                if (pGuestRc)
+                    *pGuestRc = vrc;
                 vrc = VERR_GSTCTL_GUEST_ERROR;
             }
         }
@@ -879,11 +880,9 @@ int GuestSession::i_objectCreateTempInternal(const Utf8Str &strTemplate, const U
             strName = objData.mName;
     }
     else if (pGuestRc)
-    {
-        *pGuestRc = guestRc;
-    }
+        *pGuestRc = vrcGuest;
 
-    LogFlowThisFunc(("Returning rc=%Rrc, guestRc=%Rrc\n", vrc, guestRc));
+    LogFlowThisFunc(("Returning vrc=%Rrc, vrcGuest=%Rrc\n", vrc, vrcGuest));
     return vrc;
 }
 
@@ -1401,15 +1400,12 @@ int GuestSession::i_fsQueryInfoInternal(const Utf8Str &strPath, bool fFollowSyml
 {
     LogFlowThisFunc(("strPath=%s\n", strPath.c_str()));
 
-    int vrc = VINF_SUCCESS;
-
     /** @todo Merge this with IGuestFile::queryInfo(). */
     GuestProcessStartupInfo procInfo;
     procInfo.mFlags      = ProcessCreateFlag_WaitForStdOut;
-    procInfo.mExecutable = Utf8Str(VBOXSERVICE_TOOL_STAT);
-
     try
     {
+        procInfo.mExecutable = Utf8Str(VBOXSERVICE_TOOL_STAT);
         procInfo.mArguments.push_back(procInfo.mExecutable); /* Set argv0. */
         procInfo.mArguments.push_back(Utf8Str("--machinereadable"));
         if (fFollowSymlinks)
@@ -1419,16 +1415,15 @@ int GuestSession::i_fsQueryInfoInternal(const Utf8Str &strPath, bool fFollowSyml
     }
     catch (std::bad_alloc)
     {
-        vrc = VERR_NO_MEMORY;
+        Log(("Out of memory!\n"));
+        return VERR_NO_MEMORY;
     }
 
-    int guestRc;
+    int vrcGuest = VERR_IPE_UNINITIALIZED_STATUS;
     GuestCtrlStreamObjects stdOut;
-    if (RT_SUCCESS(vrc))
-        vrc = GuestProcessTool::i_runEx(this, procInfo,
+    int vrc = GuestProcessTool::i_runEx(this, procInfo,
                                         &stdOut, 1 /* cStrmOutObjects */,
-                                        &guestRc);
-
+                                        &vrcGuest);
     if (!GuestProcess::i_isGuestError(vrc))
     {
         if (!stdOut.empty())
@@ -1436,7 +1431,9 @@ int GuestSession::i_fsQueryInfoInternal(const Utf8Str &strPath, bool fFollowSyml
             vrc = objData.FromStat(stdOut.at(0));
             if (RT_FAILURE(vrc))
             {
-                guestRc = vrc;
+                vrcGuest = vrc;
+                if (pGuestRc)
+                    *pGuestRc = vrc;
                 vrc = VERR_GSTCTL_GUEST_ERROR;
             }
         }
@@ -1444,11 +1441,9 @@ int GuestSession::i_fsQueryInfoInternal(const Utf8Str &strPath, bool fFollowSyml
             vrc = VERR_BROKEN_PIPE;
     }
     else if (pGuestRc)
-    {
-        *pGuestRc = guestRc;
-    }
+        *pGuestRc = vrcGuest;
 
-    LogFlowThisFunc(("Returning rc=%Rrc, guestRc=%Rrc\n", vrc, guestRc));
+    LogFlowThisFunc(("Returning vrc=%Rrc, vrcGuest=%Rrc\n", vrc, vrcGuest));
     return vrc;
 }
 
@@ -1741,8 +1736,7 @@ int GuestSession::i_startSessionAsync(void)
 {
     LogFlowThisFuncEnter();
 
-    int vrc = VINF_SUCCESS;
-
+    int vrc;
     GuestSessionTaskInternalOpen* pTask = NULL;
     try
     {
@@ -1758,6 +1752,7 @@ int GuestSession::i_startSessionAsync(void)
          * worker thread. */
         //this function delete pTask in case of exceptions, so there is no need in the call of delete operator
         HRESULT hrc = pTask->createThread();
+        vrc = Global::vboxStatusCodeFromCOM(hrc);
     }
     catch(std::bad_alloc &)
     {
@@ -1774,25 +1769,29 @@ int GuestSession::i_startSessionAsync(void)
 }
 
 /* static */
-DECLCALLBACK(int) GuestSession::i_startSessionThread(RTTHREAD Thread, void *pvUser)
+void GuestSession::i_startSessionThreadTask(GuestSessionTaskInternalOpen *pTask)
 {
-    LogFlowFunc(("pvUser=%p\n", pvUser));
-
-
-    GuestSessionTaskInternalOpen* pTask = static_cast<GuestSessionTaskInternalOpen*>(pvUser);
+    LogFlowFunc(("pTask=%p\n", pTask));
     AssertPtr(pTask);
 
     const ComObjPtr<GuestSession> pSession(pTask->Session());
     Assert(!pSession.isNull());
 
     AutoCaller autoCaller(pSession);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+    if (FAILED(autoCaller.rc()))
+        return;
 
     int vrc = pSession->i_startSessionInternal(NULL /* Guest rc, ignored */);
+/** @todo
+ *
+ * r=bird: Is it okay to ignore @a vrc here?
+ *
+ */
+
     /* Nothing to do here anymore. */
 
     LogFlowFuncLeaveRC(vrc);
-    return vrc;
+    NOREF(vrc);
 }
 
 int GuestSession::i_pathRenameInternal(const Utf8Str &strSource, const Utf8Str &strDest,
@@ -2133,6 +2132,8 @@ int GuestSession::i_setSessionStatus(GuestSessionStatus_T sessionStatus, int ses
 
 int GuestSession::i_signalWaiters(GuestSessionWaitResult_T enmWaitResult, int rc /*= VINF_SUCCESS */)
 {
+    RT_NOREF(enmWaitResult, rc);
+
     /*LogFlowThisFunc(("enmWaitResult=%d, rc=%Rrc, mWaitCount=%RU32, mWaitEvent=%p\n",
                      enmWaitResult, rc, mData.mWaitCount, mData.mWaitEvent));*/
 
@@ -2388,6 +2389,7 @@ int GuestSession::i_waitFor(uint32_t fWaitFlags, ULONG uTimeoutMS, GuestSessionW
 int GuestSession::i_waitForStatusChange(GuestWaitEvent *pEvent, uint32_t fWaitFlags, uint32_t uTimeoutMS,
                                         GuestSessionStatus_T *pSessionStatus, int *pGuestRc)
 {
+    RT_NOREF(fWaitFlags);
     AssertPtrReturn(pEvent, VERR_INVALID_POINTER);
 
     VBoxEventType_T evtType;
@@ -2469,6 +2471,7 @@ HRESULT GuestSession::close()
 HRESULT GuestSession::fileCopy(const com::Utf8Str &aSource, const com::Utf8Str &aDestination,
                                const std::vector<FileCopyFlag_T> &aFlags, ComPtr<IProgress> &aProgress)
 {
+    RT_NOREF(aSource, aDestination, aFlags, aProgress);
     ReturnComNotImplemented();
 }
 
@@ -2519,7 +2522,7 @@ HRESULT GuestSession::fileCopyFromGuest(const com::Utf8Str &aSource, const com::
             throw hr;
         }
 
-        hr = pTask->createThread(NULL, RTTHREADTYPE_MAIN_HEAVY_WORKER);
+        hr = pTask->createThreadWithType(RTTHREADTYPE_MAIN_HEAVY_WORKER);
 
         if (SUCCEEDED(hr))
         {
@@ -2592,7 +2595,7 @@ HRESULT GuestSession::fileCopyToGuest(const com::Utf8Str &aSource, const com::Ut
             throw hr;
         }
 
-        hr = pTask->createThread(NULL, RTTHREADTYPE_MAIN_HEAVY_WORKER);
+        hr = pTask->createThreadWithType(RTTHREADTYPE_MAIN_HEAVY_WORKER);
 
         if (SUCCEEDED(hr))
         {
@@ -2621,18 +2624,21 @@ HRESULT GuestSession::fileCopyToGuest(const com::Utf8Str &aSource, const com::Ut
 HRESULT GuestSession::directoryCopy(const com::Utf8Str &aSource, const com::Utf8Str &aDestination,
                                     const std::vector<DirectoryCopyFlags_T> &aFlags, ComPtr<IProgress> &aProgress)
 {
+    RT_NOREF(aSource, aDestination, aFlags, aProgress);
     ReturnComNotImplemented();
 }
 
 HRESULT GuestSession::directoryCopyFromGuest(const com::Utf8Str &aSource, const com::Utf8Str &aDestination,
                                              const std::vector<DirectoryCopyFlags_T> &aFlags, ComPtr<IProgress> &aProgress)
 {
+    RT_NOREF(aSource, aDestination, aFlags, aProgress);
     ReturnComNotImplemented();
 }
 
 HRESULT GuestSession::directoryCopyToGuest(const com::Utf8Str &aSource, const com::Utf8Str &aDestination,
                                            const std::vector<DirectoryCopyFlags_T> &aFlags, ComPtr<IProgress> &aProgress)
 {
+    RT_NOREF(aSource, aDestination, aFlags, aProgress);
     ReturnComNotImplemented();
 }
 
@@ -2688,6 +2694,7 @@ HRESULT GuestSession::directoryCreate(const com::Utf8Str &aPath, ULONG aMode,
 HRESULT GuestSession::directoryCreateTemp(const com::Utf8Str &aTemplateName, ULONG aMode, const com::Utf8Str &aPath,
                                           BOOL aSecure, com::Utf8Str &aDirectory)
 {
+    RT_NOREF(aMode, aSecure);
     LogFlowThisFuncEnter();
 
     if (RT_UNLIKELY((aTemplateName.c_str()) == NULL || *(aTemplateName.c_str()) == '\0'))
@@ -2851,6 +2858,7 @@ HRESULT GuestSession::directoryRemove(const com::Utf8Str &aPath)
 HRESULT GuestSession::directoryRemoveRecursive(const com::Utf8Str &aPath, const std::vector<DirectoryRemoveRecFlag_T> &aFlags,
                                                ComPtr<IProgress> &aProgress)
 {
+    RT_NOREF(aFlags);
     LogFlowThisFuncEnter();
 
     if (RT_UNLIKELY((aPath.c_str()) == NULL || *(aPath.c_str()) == '\0'))
@@ -3028,6 +3036,7 @@ HRESULT GuestSession::environmentDoesBaseVariableExist(const com::Utf8Str &aName
 HRESULT GuestSession::fileCreateTemp(const com::Utf8Str &aTemplateName, ULONG aMode, const com::Utf8Str &aPath, BOOL aSecure,
                                      ComPtr<IGuestFile> &aFile)
 {
+    RT_NOREF(aTemplateName, aMode, aPath, aSecure, aFile);
     ReturnComNotImplemented();
 }
 
@@ -3367,11 +3376,13 @@ HRESULT GuestSession::fsObjRename(const com::Utf8Str &aSource,
 HRESULT GuestSession::fsObjMove(const com::Utf8Str &aSource, const com::Utf8Str &aDestination,
                                 const std::vector<FsObjMoveFlags_T> &aFlags, ComPtr<IProgress> &aProgress)
 {
+    RT_NOREF(aSource, aDestination, aFlags, aProgress);
     ReturnComNotImplemented();
 }
 
 HRESULT GuestSession::fsObjSetACL(const com::Utf8Str &aPath, BOOL aFollowSymlinks, const com::Utf8Str &aAcl, ULONG aMode)
 {
+    RT_NOREF(aPath, aFollowSymlinks, aAcl, aMode);
     ReturnComNotImplemented();
 }
 
@@ -3523,18 +3534,21 @@ HRESULT GuestSession::processGet(ULONG aPid, ComPtr<IGuestProcess> &aGuestProces
 
 HRESULT GuestSession::symlinkCreate(const com::Utf8Str &aSource, const com::Utf8Str &aTarget, SymlinkType_T aType)
 {
+    RT_NOREF(aSource, aTarget, aType);
     ReturnComNotImplemented();
 }
 
 HRESULT GuestSession::symlinkExists(const com::Utf8Str &aSymlink, BOOL *aExists)
 
 {
+    RT_NOREF(aSymlink, aExists);
     ReturnComNotImplemented();
 }
 
 HRESULT GuestSession::symlinkRead(const com::Utf8Str &aSymlink, const std::vector<SymlinkReadFlag_T> &aFlags,
                                   com::Utf8Str &aTarget)
 {
+    RT_NOREF(aSymlink, aFlags, aTarget);
     ReturnComNotImplemented();
 }
 
diff --git a/src/VBox/Main/src-client/GuestSessionImplTasks.cpp b/src/VBox/Main/src-client/GuestSessionImplTasks.cpp
index b46d128..4e5d695 100644
--- a/src/VBox/Main/src-client/GuestSessionImplTasks.cpp
+++ b/src/VBox/Main/src-client/GuestSessionImplTasks.cpp
@@ -66,7 +66,8 @@
 // session task classes
 /////////////////////////////////////////////////////////////////////////////
 
-GuestSessionTask::GuestSessionTask(GuestSession *pSession):ThreadTask("GenericGuestSessionTask")
+GuestSessionTask::GuestSessionTask(GuestSession *pSession)
+    : ThreadTask("GenericGuestSessionTask")
 {
     mSession = pSession;
 }
@@ -99,6 +100,19 @@ HRESULT GuestSessionTask::createAndSetProgressObject()
     return hr;
 }
 
+int GuestSessionTask::RunAsync(const Utf8Str &strDesc, ComObjPtr<Progress> &pProgress)
+{
+    LogFlowThisFunc(("strDesc=%s\n", strDesc.c_str()));
+
+    mDesc = strDesc;
+    mProgress = pProgress;
+    HRESULT hrc = createThreadWithType(RTTHREADTYPE_MAIN_HEAVY_WORKER);
+
+    LogFlowThisFunc(("Returning hrc=%Rhrc\n", hrc));
+    return Global::vboxStatusCodeToCOM(hrc);
+}
+
+
 int GuestSessionTask::getGuestProperty(const ComObjPtr<Guest> &pGuest,
                                        const Utf8Str &strPath, Utf8Str &strValue)
 {
@@ -202,7 +216,7 @@ SessionTaskOpen::~SessionTaskOpen(void)
 
 }
 
-int SessionTaskOpen::Run(int *pGuestRc)
+int SessionTaskOpen::Run(void)
 {
     LogFlowThisFuncEnter();
 
@@ -212,38 +226,13 @@ int SessionTaskOpen::Run(int *pGuestRc)
     AutoCaller autoCaller(pSession);
     if (FAILED(autoCaller.rc())) return autoCaller.rc();
 
-    int vrc = pSession->i_startSessionInternal(pGuestRc);
+    int vrc = pSession->i_startSessionInternal(NULL /*pvrcGuest*/);
     /* Nothing to do here anymore. */
 
     LogFlowFuncLeaveRC(vrc);
     return vrc;
 }
 
-int SessionTaskOpen::RunAsync(const Utf8Str &strDesc, ComObjPtr<Progress> &pProgress)
-{
-    LogFlowThisFunc(("strDesc=%s\n", strDesc.c_str()));
-
-    mDesc = strDesc;
-    mProgress = pProgress;
-
-    int rc = RTThreadCreate(NULL, SessionTaskOpen::taskThread, this,
-                            0, RTTHREADTYPE_MAIN_HEAVY_WORKER, 0,
-                            "gctlSesOpen");
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-/* static */
-DECLCALLBACK(int) SessionTaskOpen::taskThread(RTTHREAD Thread, void *pvUser)
-{
-    SessionTaskOpen* task = static_cast<SessionTaskOpen*>(pvUser);
-    AssertReturn(task, VERR_GENERAL_FAILURE);
-
-    LogFlowFunc(("pTask=%p\n", task));
-
-    return task->Run(NULL /* guestRc */);
-}
-
 SessionTaskCopyTo::SessionTaskCopyTo(GuestSession *pSession,
                                      const Utf8Str &strSource, const Utf8Str &strDest, uint32_t uFlags)
                                      : GuestSessionTask(pSession),
@@ -343,7 +332,7 @@ int SessionTaskCopyTo::Run(void)
     /*
      * Query information about our destination first.
      */
-    int guestRc;
+    int guestRc = VERR_IPE_UNINITIALIZED_STATUS;
     if (RT_SUCCESS(rc))
     {
         GuestFsObjData objData;
@@ -559,16 +548,25 @@ int SessionTaskCopyTo::Run(void)
              * Newer VBoxService toolbox versions report what went wrong via exit code.
              * So handle this first.
              */
-            ProcessStatus_T procStatus;
-            LONG exitCode;
-            if (   (   SUCCEEDED(pProcess->COMGETTER(Status(&procStatus)))
-                    && procStatus != ProcessStatus_TerminatedNormally)
-                || (   SUCCEEDED(pProcess->COMGETTER(ExitCode(&exitCode)))
-                    && exitCode != 0)
-               )
+            /** @todo This code sequence is duplicated in CopyFrom...   */
+            ProcessStatus_T procStatus = ProcessStatus_TerminatedAbnormally;
+            HRESULT hrc = pProcess->COMGETTER(Status(&procStatus));
+            if (!SUCCEEDED(hrc))
+                procStatus = ProcessStatus_TerminatedAbnormally;
+
+            LONG exitCode = 42424242;
+            hrc = pProcess->COMGETTER(ExitCode(&exitCode));
+            if (!SUCCEEDED(hrc))
+                exitCode = 42424242;
+
+            if (   procStatus != ProcessStatus_TerminatedNormally
+                || exitCode != 0)
             {
-                LogFlowThisFunc(("procStatus=%ld, exitCode=%ld\n", procStatus, exitCode));
-                rc = GuestProcessTool::i_exitCodeToRc(procInfo, exitCode);
+                LogFlowThisFunc(("procStatus=%d, exitCode=%d\n", procStatus, exitCode));
+                if (procStatus == ProcessStatus_TerminatedNormally)
+                    rc = GuestProcessTool::i_exitCodeToRc(procInfo, exitCode);
+                else
+                    rc = VERR_GENERAL_FAILURE;
                 setProgressErrorMsg(VBOX_E_IPRT_ERROR,
                                     Utf8StrFmt(GuestSession::tr("Copying file \"%s\" to guest failed: %Rrc"),
                                                mSource.c_str(), rc));
@@ -595,8 +593,7 @@ int SessionTaskCopyTo::Run(void)
                                                mSource.c_str(), cbWrittenTotal, mSourceSize));
                 rc = VERR_INTERRUPTED;
             }
-
-            if (RT_SUCCESS(rc))
+            else
                 rc = setProgressSuccess();
         }
     } /* processCreateExInteral */
@@ -608,32 +605,6 @@ int SessionTaskCopyTo::Run(void)
     return rc;
 }
 
-int SessionTaskCopyTo::RunAsync(const Utf8Str &strDesc, ComObjPtr<Progress> &pProgress)
-{
-    LogFlowThisFunc(("strDesc=%s, strSource=%s, strDest=%s, mCopyFileFlags=%x\n",
-                     strDesc.c_str(), mSource.c_str(), mDest.c_str(), mCopyFileFlags));
-
-    mDesc = strDesc;
-    mProgress = pProgress;
-
-    int rc = RTThreadCreate(NULL, SessionTaskCopyTo::taskThread, this,
-                            0, RTTHREADTYPE_MAIN_HEAVY_WORKER, 0,
-                            "gctlCpyTo");
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-/* static */
-DECLCALLBACK(int) SessionTaskCopyTo::taskThread(RTTHREAD Thread, void *pvUser)
-{
-    SessionTaskCopyTo* task = static_cast<SessionTaskCopyTo*>(pvUser);
-    AssertReturn(task, VERR_GENERAL_FAILURE);
-
-    LogFlowFunc(("pTask=%p\n", task));
-
-    return task->Run();
-}
-
 SessionTaskCopyFrom::SessionTaskCopyFrom(GuestSession *pSession,
                                          const Utf8Str &strSource, const Utf8Str &strDest, uint32_t uFlags)
                                          : GuestSessionTask(pSession)
@@ -855,16 +826,25 @@ int SessionTaskCopyFrom::Run(void)
 
                 if (RT_SUCCESS(rc))
                 {
-                    ProcessStatus_T procStatus;
-                    LONG exitCode;
-                    if (   (   SUCCEEDED(pProcess->COMGETTER(Status(&procStatus)))
-                            && procStatus != ProcessStatus_TerminatedNormally)
-                        || (   SUCCEEDED(pProcess->COMGETTER(ExitCode(&exitCode)))
-                            && exitCode != 0)
-                       )
+                    /** @todo this code sequence is duplicated in CopyTo   */
+                    ProcessStatus_T procStatus = ProcessStatus_TerminatedAbnormally;
+                    HRESULT hrc = pProcess->COMGETTER(Status(&procStatus));
+                    if (!SUCCEEDED(hrc))
+                        procStatus = ProcessStatus_TerminatedAbnormally;
+
+                    LONG exitCode = 42424242;
+                    hrc = pProcess->COMGETTER(ExitCode(&exitCode));
+                    if (!SUCCEEDED(hrc))
+                        exitCode = 42424242;
+
+                    if (   procStatus != ProcessStatus_TerminatedNormally
+                        || exitCode != 0)
                     {
-                        LogFlowThisFunc(("procStatus=%ld, exitCode=%ld\n", procStatus, exitCode));
-                        rc = GuestProcessTool::i_exitCodeToRc(procInfo, exitCode);
+                        LogFlowThisFunc(("procStatus=%d, exitCode=%d\n", procStatus, exitCode));
+                        if (procStatus == ProcessStatus_TerminatedNormally)
+                            rc = GuestProcessTool::i_exitCodeToRc(procInfo, exitCode);
+                        else
+                            rc = VERR_GENERAL_FAILURE;
                         setProgressErrorMsg(VBOX_E_IPRT_ERROR,
                                             Utf8StrFmt(GuestSession::tr("Copying file \"%s\" to host failed: %Rrc"),
                                                        mSource.c_str(), rc));
@@ -891,8 +871,7 @@ int SessionTaskCopyFrom::Run(void)
                                                        mSource.c_str(), mDest.c_str(), cbWrittenTotal, objData.mObjectSize));
                         rc = VERR_INTERRUPTED;
                     }
-
-                    if (RT_SUCCESS(rc))
+                    else
                         rc = setProgressSuccess();
                 }
             }
@@ -905,32 +884,6 @@ int SessionTaskCopyFrom::Run(void)
     return rc;
 }
 
-int SessionTaskCopyFrom::RunAsync(const Utf8Str &strDesc, ComObjPtr<Progress> &pProgress)
-{
-    LogFlowThisFunc(("strDesc=%s, strSource=%s, strDest=%s, uFlags=%x\n",
-                     strDesc.c_str(), mSource.c_str(), mDest.c_str(), mFlags));
-
-    mDesc = strDesc;
-    mProgress = pProgress;
-
-    int rc = RTThreadCreate(NULL, SessionTaskCopyFrom::taskThread, this,
-                            0, RTTHREADTYPE_MAIN_HEAVY_WORKER, 0,
-                            "gctlCpyFrom");
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-/* static */
-DECLCALLBACK(int) SessionTaskCopyFrom::taskThread(RTTHREAD Thread, void *pvUser)
-{
-    SessionTaskCopyFrom* task = static_cast<SessionTaskCopyFrom*>(pvUser);
-    AssertReturn(task, VERR_GENERAL_FAILURE);
-
-    LogFlowFunc(("pTask=%p\n", task));
-
-    return task->Run();
-}
-
 SessionTaskUpdateAdditions::SessionTaskUpdateAdditions(GuestSession *pSession,
                                                        const Utf8Str &strSource,
                                                        const ProcessArguments &aArguments,
@@ -1047,7 +1000,7 @@ int SessionTaskUpdateAdditions::i_copyFileToGuest(GuestSession *pSession, PRTISO
                     throw hr;
                 }
 
-                hr = pTask->createThread(NULL, RTTHREADTYPE_MAIN_HEAVY_WORKER);
+                hr = pTask->createThreadWithType(RTTHREADTYPE_MAIN_HEAVY_WORKER);
 
                 if (SUCCEEDED(hr))
                 {
@@ -1642,29 +1595,3 @@ int SessionTaskUpdateAdditions::Run(void)
     return rc;
 }
 
-int SessionTaskUpdateAdditions::RunAsync(const Utf8Str &strDesc, ComObjPtr<Progress> &pProgress)
-{
-    LogFlowThisFunc(("strDesc=%s, strSource=%s, uFlags=%x\n",
-                     strDesc.c_str(), mSource.c_str(), mFlags));
-
-    mDesc = strDesc;
-    mProgress = pProgress;
-
-    int rc = RTThreadCreate(NULL, SessionTaskUpdateAdditions::taskThread, this,
-                            0, RTTHREADTYPE_MAIN_HEAVY_WORKER, 0,
-                            "gctlUpGA");
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-/* static */
-DECLCALLBACK(int) SessionTaskUpdateAdditions::taskThread(RTTHREAD Thread, void *pvUser)
-{
-    SessionTaskUpdateAdditions* task = static_cast<SessionTaskUpdateAdditions*>(pvUser);
-    AssertReturn(task, VERR_GENERAL_FAILURE);
-
-    LogFlowFunc(("pTask=%p\n", task));
-
-    return task->Run();
-}
-
diff --git a/src/VBox/Main/src-client/HGCM.cpp b/src/VBox/Main/src-client/HGCM.cpp
index 3f8ebcb..6b24a37 100644
--- a/src/VBox/Main/src-client/HGCM.cpp
+++ b/src/VBox/Main/src-client/HGCM.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1144,7 +1144,7 @@ void HGCMService::ReleaseService(void)
         }
 
 #ifdef VBOX_WITH_CRHGSMI
-        /* @todo: could this actually happen that the service is destroyed on ReleaseService? */
+        /** @todo could this actually happen that the service is destroyed on ReleaseService? */
         HGCMService *pNextSvc = pSvc->m_pSvcNext;
         while (pSvc->m_cHandleAcquires)
         {
diff --git a/src/VBox/Main/src-client/HGCMObjects.cpp b/src/VBox/Main/src-client/HGCMObjects.cpp
index 76de0e7..c91c585 100644
--- a/src/VBox/Main/src-client/HGCMObjects.cpp
+++ b/src/VBox/Main/src-client/HGCMObjects.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-client/HGCMThread.cpp b/src/VBox/Main/src-client/HGCMThread.cpp
index 426752c..ea5de1b 100644
--- a/src/VBox/Main/src-client/HGCMThread.cpp
+++ b/src/VBox/Main/src-client/HGCMThread.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-client/KeyboardImpl.cpp b/src/VBox/Main/src-client/KeyboardImpl.cpp
index 3374e36..694280f 100644
--- a/src/VBox/Main/src-client/KeyboardImpl.cpp
+++ b/src/VBox/Main/src-client/KeyboardImpl.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -233,7 +233,7 @@ HRESULT Keyboard::putScancodes(const std::vector<LONG> &aScancodes,
  */
 HRESULT Keyboard::putCAD()
 {
-    static std::vector<LONG> cadSequence;
+    std::vector<LONG> cadSequence;
     cadSequence.resize(8);
 
     cadSequence[0] = 0x1d; // Ctrl down
@@ -365,6 +365,7 @@ DECLCALLBACK(void) Keyboard::i_drvDestruct(PPDMDRVINS pDrvIns)
  */
 DECLCALLBACK(int) Keyboard::i_drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
     PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
     PDRVMAINKEYBOARD pThis = PDMINS_2_DATA(pDrvIns, PDRVMAINKEYBOARD);
     LogFlow(("Keyboard::drvConstruct: iInstance=%d\n", pDrvIns->iInstance));
diff --git a/src/VBox/Main/src-client/MachineDebuggerImpl.cpp b/src/VBox/Main/src-client/MachineDebuggerImpl.cpp
index ef0cdd4..26cf6fd 100644
--- a/src/VBox/Main/src-client/MachineDebuggerImpl.cpp
+++ b/src/VBox/Main/src-client/MachineDebuggerImpl.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -70,7 +70,7 @@ void MachineDebugger::FinalRelease()
  * @returns COM result indicator
  * @param aParent handle of our parent object
  */
-HRESULT MachineDebugger::init (Console *aParent)
+HRESULT MachineDebugger::init(Console *aParent)
 {
     LogFlowThisFunc(("aParent=%p\n", aParent));
 
@@ -84,13 +84,13 @@ HRESULT MachineDebugger::init (Console *aParent)
 
     for (unsigned i = 0; i < RT_ELEMENTS(maiQueuedEmExecPolicyParams); i++)
         maiQueuedEmExecPolicyParams[i] = UINT8_MAX;
-    mSingleStepQueued = ~0;
-    mRecompileUserQueued = ~0;
-    mRecompileSupervisorQueued = ~0;
-    mPatmEnabledQueued = ~0;
-    mCsamEnabledQueued = ~0;
-    mLogEnabledQueued = ~0;
-    mVirtualTimeRateQueued = ~0;
+    mSingleStepQueued = -1;
+    mRecompileUserQueued = -1;
+    mRecompileSupervisorQueued = -1;
+    mPatmEnabledQueued = -1;
+    mCsamEnabledQueued = -1;
+    mLogEnabledQueued = -1;
+    mVirtualTimeRateQueued = UINT32_MAX;
     mFlushMode = false;
 
     /* Confirm a successful initialization */
@@ -132,7 +132,7 @@ HRESULT MachineDebugger::getSingleStep(BOOL *aSingleStep)
     HRESULT hrc = ptrVM.rc();
     if (SUCCEEDED(hrc))
     {
-        /** @todo */
+        RT_NOREF(aSingleStep); /** @todo */
         ReturnComNotImplemented();
     }
     return hrc;
@@ -151,7 +151,7 @@ HRESULT MachineDebugger::setSingleStep(BOOL aSingleStep)
     HRESULT hrc = ptrVM.rc();
     if (SUCCEEDED(hrc))
     {
-        /** @todo */
+        NOREF(aSingleStep); /** @todo */
         ReturnComNotImplemented();
     }
     return hrc;
@@ -301,7 +301,7 @@ HRESULT MachineDebugger::getPATMEnabled(BOOL *aPATMEnabled)
 
     Console::SafeVMPtrQuiet ptrVM(mParent);
     if (ptrVM.isOk())
-        *aPATMEnabled = PATMR3IsEnabled (ptrVM.rawUVM());
+        *aPATMEnabled = PATMR3IsEnabled(ptrVM.rawUVM());
     else
 #endif
         *aPATMEnabled = false;
@@ -749,7 +749,7 @@ HRESULT MachineDebugger::setVirtualTimeRate(ULONG aVirtualTimeRate)
  * This is only temporary (promise) while prototyping the debugger.
  *
  * @returns COM status code
- * @param   a_u64Vm     Where to store the vm handle. Since there is no
+ * @param   aVM         Where to store the vm handle. Since there is no
  *                      uintptr_t in COM, we're using the max integer.
  *                      (No, ULONG is not pointer sized!)
  * @remarks The returned handle must be passed to VMR3ReleaseUVM()!
@@ -774,6 +774,24 @@ HRESULT MachineDebugger::getVM(LONG64 *aVM)
     return hrc;
 }
 
+/**
+ * Get the VM uptime in milliseconds.
+ *
+ * @returns COM status code
+ * @param   aUptime     Where to store the uptime.
+ */
+HRESULT MachineDebugger::getUptime(LONG64 *aUptime)
+{
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+    Console::SafeVMPtr ptrVM(mParent);
+    HRESULT hrc = ptrVM.rc();
+    if (SUCCEEDED(hrc))
+        *aUptime = (int64_t)TMR3TimeVirtGetMilli(ptrVM.rawUVM());
+
+    return hrc;
+}
+
 // IMachineDebugger methods
 /////////////////////////////////////////////////////////////////////////////
 
@@ -799,6 +817,7 @@ HRESULT MachineDebugger::dumpGuestCore(const com::Utf8Str &aFilename, const com:
 
 HRESULT MachineDebugger::dumpHostProcessCore(const com::Utf8Str &aFilename, const com::Utf8Str &aCompression)
 {
+    RT_NOREF(aFilename, aCompression);
     ReturnComNotImplemented();
 }
 
@@ -1031,21 +1050,25 @@ HRESULT MachineDebugger::modifyLogDestinations(const com::Utf8Str &aSettings)
 
 HRESULT MachineDebugger::readPhysicalMemory(LONG64 aAddress, ULONG aSize, std::vector<BYTE> &aBytes)
 {
+    RT_NOREF(aAddress, aSize, aBytes);
     ReturnComNotImplemented();
 }
 
 HRESULT MachineDebugger::writePhysicalMemory(LONG64 aAddress, ULONG aSize, const std::vector<BYTE> &aBytes)
 {
+    RT_NOREF(aAddress, aSize, aBytes);
     ReturnComNotImplemented();
 }
 
 HRESULT MachineDebugger::readVirtualMemory(ULONG aCpuId, LONG64 aAddress, ULONG aSize, std::vector<BYTE> &aBytes)
 {
+    RT_NOREF(aCpuId, aAddress, aSize, aBytes);
     ReturnComNotImplemented();
 }
 
 HRESULT MachineDebugger::writeVirtualMemory(ULONG aCpuId, LONG64 aAddress, ULONG aSize, const std::vector<BYTE> &aBytes)
 {
+    RT_NOREF(aCpuId, aAddress, aSize, aBytes);
     ReturnComNotImplemented();
 }
 
@@ -1280,6 +1303,8 @@ HRESULT MachineDebugger::getRegister(ULONG aCpuId, const com::Utf8Str &aName, co
 
 HRESULT MachineDebugger::getRegisters(ULONG aCpuId, std::vector<com::Utf8Str> &aNames, std::vector<com::Utf8Str> &aValues)
 {
+    RT_NOREF(aCpuId); /** @todo fix missing aCpuId usage! */
+
     /*
      * The prologue.
      */
@@ -1338,12 +1363,14 @@ HRESULT MachineDebugger::getRegisters(ULONG aCpuId, std::vector<com::Utf8Str> &a
 
 HRESULT MachineDebugger::setRegister(ULONG aCpuId, const com::Utf8Str &aName, const com::Utf8Str &aValue)
 {
+    RT_NOREF(aCpuId, aName, aValue);
     ReturnComNotImplemented();
 }
 
 HRESULT MachineDebugger::setRegisters(ULONG aCpuId, const std::vector<com::Utf8Str> &aNames,
                                       const std::vector<com::Utf8Str> &aValues)
 {
+    RT_NOREF(aCpuId, aNames, aValues);
     ReturnComNotImplemented();
 }
 
@@ -1536,7 +1563,7 @@ HRESULT MachineDebugger::dumpStats(const com::Utf8Str &aPattern)
  */
 HRESULT MachineDebugger::getStats(const com::Utf8Str &aPattern, BOOL aWithDescriptions, com::Utf8Str &aStats)
 {
-    Console::SafeVMPtrQuiet ptrVM (mParent);
+    Console::SafeVMPtrQuiet ptrVM(mParent);
 
     if (!ptrVM.isOk())
         return setError(VBOX_E_INVALID_VM_STATE, "Machine is not running");
@@ -1564,10 +1591,10 @@ HRESULT MachineDebugger::getStats(const com::Utf8Str &aPattern, BOOL aWithDescri
 void MachineDebugger::i_flushQueuedSettings()
 {
     mFlushMode = true;
-    if (mSingleStepQueued != ~0)
+    if (mSingleStepQueued != -1)
     {
         COMSETTER(SingleStep)(mSingleStepQueued);
-        mSingleStepQueued = ~0;
+        mSingleStepQueued = -1;
     }
     for (unsigned i = 0; i < EMEXECPOLICY_END; i++)
         if (maiQueuedEmExecPolicyParams[i] != UINT8_MAX)
@@ -1575,25 +1602,25 @@ void MachineDebugger::i_flushQueuedSettings()
             i_setEmExecPolicyProperty((EMEXECPOLICY)i, RT_BOOL(maiQueuedEmExecPolicyParams[i]));
             maiQueuedEmExecPolicyParams[i] = UINT8_MAX;
         }
-    if (mPatmEnabledQueued != ~0)
+    if (mPatmEnabledQueued != -1)
     {
         COMSETTER(PATMEnabled)(mPatmEnabledQueued);
-        mPatmEnabledQueued = ~0;
+        mPatmEnabledQueued = -1;
     }
-    if (mCsamEnabledQueued != ~0)
+    if (mCsamEnabledQueued != -1)
     {
         COMSETTER(CSAMEnabled)(mCsamEnabledQueued);
-        mCsamEnabledQueued = ~0;
+        mCsamEnabledQueued = -1;
     }
-    if (mLogEnabledQueued != ~0)
+    if (mLogEnabledQueued != -1)
     {
         COMSETTER(LogEnabled)(mLogEnabledQueued);
-        mLogEnabledQueued = ~0;
+        mLogEnabledQueued = -1;
     }
-    if (mVirtualTimeRateQueued != ~(uint32_t)0)
+    if (mVirtualTimeRateQueued != UINT32_MAX)
     {
         COMSETTER(VirtualTimeRate)(mVirtualTimeRateQueued);
-        mVirtualTimeRateQueued = ~0;
+        mVirtualTimeRateQueued = UINT32_MAX;
     }
     mFlushMode = false;
 }
diff --git a/src/VBox/Main/src-client/MouseImpl.cpp b/src/VBox/Main/src-client/MouseImpl.cpp
index c8ab779..44b736b 100644
--- a/src/VBox/Main/src-client/MouseImpl.cpp
+++ b/src/VBox/Main/src-client/MouseImpl.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1214,6 +1214,7 @@ DECLCALLBACK(void) Mouse::i_drvDestruct(PPDMDRVINS pDrvIns)
  */
 DECLCALLBACK(int) Mouse::i_drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
     PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
     PDRVMAINMOUSE pThis = PDMINS_2_DATA(pDrvIns, PDRVMAINMOUSE);
     LogFlow(("drvMainMouse_Construct: iInstance=%d\n", pDrvIns->iInstance));
diff --git a/src/VBox/Main/src-client/Nvram.cpp b/src/VBox/Main/src-client/Nvram.cpp
index 0267c12..5d8126b 100644
--- a/src/VBox/Main/src-client/Nvram.cpp
+++ b/src/VBox/Main/src-client/Nvram.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2014 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -343,6 +343,7 @@ DECLCALLBACK(void) Nvram::drvNvram_Destruct(PPDMDRVINS pDrvIns)
  */
 DECLCALLBACK(int) Nvram::drvNvram_Construct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
     PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
     LogFlowFunc(("iInstance/#%d pCfg=%p fFlags=%x\n", pDrvIns->iInstance, pCfg, fFlags));
     PNVRAM pThis = PDMINS_2_DATA(pDrvIns, PNVRAM);
diff --git a/src/VBox/Main/src-client/PCIRawDevImpl.cpp b/src/VBox/Main/src-client/PCIRawDevImpl.cpp
index ae2b0c6..f99f8e1 100644
--- a/src/VBox/Main/src-client/PCIRawDevImpl.cpp
+++ b/src/VBox/Main/src-client/PCIRawDevImpl.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2014 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -106,14 +106,6 @@ DECLCALLBACK(int) PCIRawDev::drvDeviceConstructComplete(PPDMIPCIRAWCONNECTOR pIn
 /**
  * @interface_method_impl{PDMDRVREG,pfnReset}
  */
-DECLCALLBACK(void) PCIRawDev::drvReset(PPDMDRVINS pDrvIns)
-{
-}
-
-
-/**
- * @interface_method_impl{PDMDRVREG,pfnReset}
- */
 DECLCALLBACK(void) PCIRawDev::drvDestruct(PPDMDRVINS pDrvIns)
 {
     PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns);
@@ -129,6 +121,7 @@ DECLCALLBACK(void) PCIRawDev::drvDestruct(PPDMDRVINS pDrvIns)
  */
 DECLCALLBACK(int) PCIRawDev::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
     PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
     PDRVMAINPCIRAWDEV pThis = PDMINS_2_DATA(pDrvIns, PDRVMAINPCIRAWDEV);
 
@@ -203,7 +196,7 @@ const PDMDRVREG PCIRawDev::DrvReg =
     /* pfnPowerOn */
     NULL,
     /* pfnReset */
-    PCIRawDev::drvReset,
+    NULL,
     /* pfnSuspend */
     NULL,
     /* pfnResume */
diff --git a/src/VBox/Main/src-client/RemoteUSBBackend.cpp b/src/VBox/Main/src-client/RemoteUSBBackend.cpp
index 886e838..73a1432 100644
--- a/src/VBox/Main/src-client/RemoteUSBBackend.cpp
+++ b/src/VBox/Main/src-client/RemoteUSBBackend.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -133,7 +133,7 @@ static void releaseDevice(REMOTEUSBDEVICE *pDevice)
 
 static REMOTEUSBQURB *qurbAlloc(PREMOTEUSBDEVICE pDevice)
 {
-    /* @todo reuse URBs. */
+    /** @todo reuse URBs. */
     REMOTEUSBQURB *pQURB = (REMOTEUSBQURB *)RTMemAllocZ (sizeof (REMOTEUSBQURB));
 
     if (pQURB)
@@ -154,6 +154,7 @@ static void qurbFree (REMOTEUSBQURB *pQURB)
 /* Called by VRDP server when the client responds to a request on USB channel. */
 DECLCALLBACK(int) USBClientResponseCallback(void *pv, uint32_t u32ClientId, uint8_t code, const void *pvRet, uint32_t cbRet)
 {
+    RT_NOREF(u32ClientId);
     int rc = VINF_SUCCESS;
 
     LogFlow(("USBClientResponseCallback: id = %d, pv = %p, code = %d, pvRet = %p, cbRet = %d\n",
@@ -253,6 +254,7 @@ DECLCALLBACK(int) USBClientResponseCallback(void *pv, uint32_t u32ClientId, uint
 static DECLCALLBACK(int) iface_Open(PREMOTEUSBBACKEND pInstance, const char *pszAddress,
                                     size_t cbAddress, PREMOTEUSBDEVICE *ppDevice)
 {
+    RT_NOREF(cbAddress);
     int rc = VINF_SUCCESS;
 
     RemoteUSBBackend *pThis = (RemoteUSBBackend *)pInstance;
@@ -560,7 +562,7 @@ static DECLCALLBACK(int) iface_QueueURB(PREMOTEUSBDEVICE pDevice, uint8_t u8Type
             if (u8Type == VUSBXFERTYPE_MSG)
             {
                 u32DataLen = 8; /* 8 byte header. */
-                // u32DataLen = u32Len; // @todo do messages need all information?
+                // u32DataLen = u32Len; /// @todo do messages need all information?
             }
         } break;
 
diff --git a/src/VBox/Main/src-client/RemoteUSBDeviceImpl.cpp b/src/VBox/Main/src-client/RemoteUSBDeviceImpl.cpp
index c717577..0df7e65 100644
--- a/src/VBox/Main/src-client/RemoteUSBDeviceImpl.cpp
+++ b/src/VBox/Main/src-client/RemoteUSBDeviceImpl.cpp
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-client/SessionImpl.cpp b/src/VBox/Main/src-client/SessionImpl.cpp
index 7d65cc2..7b093e2 100644
--- a/src/VBox/Main/src-client/SessionImpl.cpp
+++ b/src/VBox/Main/src-client/SessionImpl.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -277,6 +277,7 @@ HRESULT Session::getRemoteConsole(ComPtr<IConsole> &aConsole)
     return S_OK;
 
 #else  /* VBOX_COM_INPROC_API_CLIENT */
+    RT_NOREF(aConsole);
     AssertFailed();
     return VBOX_E_INVALID_OBJECT_STATE;
 #endif /* VBOX_COM_INPROC_API_CLIENT */
@@ -292,6 +293,7 @@ HRESULT Session::getNominalState(MachineState_T *aNominalState)
 
     return mConsole->i_getNominalState(*aNominalState);
 #else
+    RT_NOREF(aNominalState);
     AssertFailed();
     return E_NOTIMPL;
 #endif
@@ -345,6 +347,7 @@ HRESULT Session::assignMachine(const ComPtr<IMachine> &aMachine,
     else
         mRemoteMachine = aMachine;
 #else
+    RT_NOREF(aLockType);
     mRemoteMachine = aMachine;
 #endif
 
@@ -501,6 +504,7 @@ HRESULT Session::updateMachineState(MachineState_T aMachineState)
 
     return mConsole->i_updateMachineState(aMachineState);
 #else
+    RT_NOREF(aMachineState);
     return S_OK;
 #endif
 }
@@ -575,6 +579,7 @@ HRESULT Session::onNetworkAdapterChange(const ComPtr<INetworkAdapter> &aNetworkA
 
     return mConsole->i_onNetworkAdapterChange(aNetworkAdapter, aChangeAdapter);
 #else
+    RT_NOREF(aNetworkAdapter, aChangeAdapter);
     return S_OK;
 #endif
 }
@@ -591,6 +596,7 @@ HRESULT Session::onSerialPortChange(const ComPtr<ISerialPort> &aSerialPort)
 
     return mConsole->i_onSerialPortChange(aSerialPort);
 #else
+    RT_NOREF(aSerialPort);
     return S_OK;
 #endif
 }
@@ -607,6 +613,7 @@ HRESULT Session::onParallelPortChange(const ComPtr<IParallelPort> &aParallelPort
 
     return mConsole->i_onParallelPortChange(aParallelPort);
 #else
+    RT_NOREF(aParallelPort);
     return S_OK;
 #endif
 }
@@ -640,6 +647,7 @@ HRESULT Session::onMediumChange(const ComPtr<IMediumAttachment> &aMediumAttachme
 
     return mConsole->i_onMediumChange(aMediumAttachment, aForce);
 #else
+    RT_NOREF(aMediumAttachment, aForce);
     return S_OK;
 #endif
 }
@@ -656,6 +664,7 @@ HRESULT Session::onCPUChange(ULONG aCpu, BOOL aAdd)
 
     return mConsole->i_onCPUChange(aCpu, aAdd);
 #else
+    RT_NOREF(aCpu, aAdd);
     return S_OK;
 #endif
 }
@@ -672,6 +681,7 @@ HRESULT Session::onCPUExecutionCapChange(ULONG aExecutionCap)
 
     return mConsole->i_onCPUExecutionCapChange(aExecutionCap);
 #else
+    RT_NOREF(aExecutionCap);
     return S_OK;
 #endif
 }
@@ -688,6 +698,7 @@ HRESULT Session::onVRDEServerChange(BOOL aRestart)
 
     return mConsole->i_onVRDEServerChange(aRestart);
 #else
+    RT_NOREF(aRestart);
     return S_OK;
 #endif
 }
@@ -736,6 +747,7 @@ HRESULT Session::onSharedFolderChange(BOOL aGlobal)
 
     return mConsole->i_onSharedFolderChange(aGlobal);
 #else
+    RT_NOREF(aGlobal);
     return S_OK;
 #endif
 }
@@ -752,6 +764,7 @@ HRESULT Session::onClipboardModeChange(ClipboardMode_T aClipboardMode)
 
     return mConsole->i_onClipboardModeChange(aClipboardMode);
 #else
+    RT_NOREF(aClipboardMode);
     return S_OK;
 #endif
 }
@@ -768,6 +781,7 @@ HRESULT Session::onDnDModeChange(DnDMode_T aDndMode)
 
     return mConsole->i_onDnDModeChange(aDndMode);
 #else
+    RT_NOREF(aDndMode);
     return S_OK;
 #endif
 }
@@ -787,6 +801,7 @@ HRESULT Session::onUSBDeviceAttach(const ComPtr<IUSBDevice> &aDevice,
 
     return mConsole->i_onUSBDeviceAttach(aDevice, aError, aMaskedInterfaces, aCaptureFilename);
 #else
+    RT_NOREF(aDevice, aError, aMaskedInterfaces, aCaptureFilename);
     return S_OK;
 #endif
 }
@@ -804,6 +819,7 @@ HRESULT Session::onUSBDeviceDetach(const com::Guid &aId,
 
     return mConsole->i_onUSBDeviceDetach(aId.toUtf16().raw(), aError);
 #else
+    RT_NOREF(aId, aError);
     return S_OK;
 #endif
 }
@@ -847,6 +863,7 @@ HRESULT Session::onBandwidthGroupChange(const ComPtr<IBandwidthGroup> &aBandwidt
 
     return mConsole->i_onBandwidthGroupChange(aBandwidthGroup);
 #else
+    RT_NOREF(aBandwidthGroup);
     return S_OK;
 #endif
 }
@@ -863,6 +880,7 @@ HRESULT Session::onStorageDeviceChange(const ComPtr<IMediumAttachment> &aMediumA
 
     return mConsole->i_onStorageDeviceChange(aMediumAttachment, aRemove, aSilent);
 #else
+    RT_NOREF(aMediumAttachment, aRemove, aSilent);
     return S_OK;
 #endif
 }
@@ -902,6 +920,7 @@ HRESULT Session::accessGuestProperty(const com::Utf8Str &aName, const com::Utf8S
     /** @todo This is nonsense, non-VM API users shouldn't need to deal with this
      *        method call, VBoxSVC should be clever enough to see that the
      *        session doesn't have a console! */
+    RT_NOREF(aName, aValue, aFlags, aAccessMode, aRetValue, aRetTimestamp, aRetFlags);
     return E_ACCESSDENIED;
 # endif /* VBOX_COM_INPROC_API_CLIENT */
 
@@ -931,6 +950,7 @@ HRESULT Session::enumerateGuestProperties(const com::Utf8Str &aPatterns,
     return mConsole->i_enumerateGuestProperties(aPatterns, aKeys, aValues, aTimestamps, aFlags);
 
 #else /* VBOX_WITH_GUEST_PROPS not defined */
+    RT_NOREF(aPatterns, aKeys, aValues, aTimestamps, aFlags);
     ReturnComNotImplemented();
 #endif /* VBOX_WITH_GUEST_PROPS not defined */
 }
@@ -950,6 +970,7 @@ HRESULT Session::onlineMergeMedium(const ComPtr<IMediumAttachment> &aMediumAttac
                                          aSourceIdx, aTargetIdx,
                                          aProgress);
 #else
+    RT_NOREF(aMediumAttachment, aSourceIdx, aTargetIdx, aProgress);
     AssertFailed();
     return E_NOTIMPL;
 #endif
@@ -967,6 +988,7 @@ HRESULT Session::reconfigureMediumAttachments(const std::vector<ComPtr<IMediumAt
 
     return mConsole->i_reconfigureMediumAttachments(aAttachments);
 #else
+    RT_NOREF(aAttachments);
     AssertFailed();
     return E_NOTIMPL;
 #endif
@@ -984,6 +1006,7 @@ HRESULT Session::enableVMMStatistics(BOOL aEnable)
 
     return S_OK;
 #else
+    RT_NOREF(aEnable);
     AssertFailed();
     return E_NOTIMPL;
 #endif
@@ -999,6 +1022,7 @@ HRESULT Session::pauseWithReason(Reason_T aReason)
 
     return mConsole->i_pause(aReason);
 #else
+    RT_NOREF(aReason);
     AssertFailed();
     return E_NOTIMPL;
 #endif
@@ -1015,12 +1039,14 @@ HRESULT Session::resumeWithReason(Reason_T aReason)
     AutoWriteLock dummyLock(mConsole COMMA_LOCKVAL_SRC_POS);
     return mConsole->i_resume(aReason, dummyLock);
 #else
+    RT_NOREF(aReason);
     AssertFailed();
     return E_NOTIMPL;
 #endif
 }
 
-HRESULT Session::saveStateWithReason(Reason_T aReason, const ComPtr<IProgress> &aProgress, const Utf8Str &aStateFilePath, BOOL aPauseVM, BOOL *aLeftPaused)
+HRESULT Session::saveStateWithReason(Reason_T aReason, const ComPtr<IProgress> &aProgress, const Utf8Str &aStateFilePath,
+                                     BOOL aPauseVM, BOOL *aLeftPaused)
 {
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
     AssertReturn(mState == SessionState_Locked, VBOX_E_INVALID_VM_STATE);
@@ -1034,6 +1060,7 @@ HRESULT Session::saveStateWithReason(Reason_T aReason, const ComPtr<IProgress> &
         *aLeftPaused = fLeftPaused;
     return rc;
 #else
+    RT_NOREF(aReason, aProgress, aStateFilePath, aPauseVM, aLeftPaused);
     AssertFailed();
     return E_NOTIMPL;
 #endif
diff --git a/src/VBox/Main/src-client/USBDeviceImpl.cpp b/src/VBox/Main/src-client/USBDeviceImpl.cpp
index 1612453..8545d7b 100644
--- a/src/VBox/Main/src-client/USBDeviceImpl.cpp
+++ b/src/VBox/Main/src-client/USBDeviceImpl.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-client/UsbCardReader.cpp b/src/VBox/Main/src-client/UsbCardReader.cpp
index 2bc7b25..f956401 100644
--- a/src/VBox/Main/src-client/UsbCardReader.cpp
+++ b/src/VBox/Main/src-client/UsbCardReader.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2014 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -373,7 +373,7 @@ static DECLCALLBACK(int) drvCardReaderDownReleaseContext(PPDMICARDREADERDOWN pIn
     LogFlowFunc(("ENTER: pvUser:%p\n",
                  pvUser));
     PUSBCARDREADER pThis = RT_FROM_MEMBER(pInterface, USBCARDREADER, ICardReaderDown);
-    /* @todo Device calls this when the driver already destroyed. */
+    /** @todo Device calls this when the driver already destroyed. */
     if (pThis->hReqQCardReaderCmd == NIL_RTREQQUEUE)
     {
         LogFlowFunc(("LEAVE: device already deleted.\n"));
@@ -428,6 +428,7 @@ static DECLCALLBACK(int) drvCardReaderDownGetStatusChange(PPDMICARDREADERDOWN pI
 static DECLCALLBACK(int) drvCardReaderDownBeginTransaction(PPDMICARDREADERDOWN pInterface,
                                                            void *pvUser)
 {
+    RT_NOREF(pvUser);
     AssertPtrReturn(pInterface, VERR_INVALID_PARAMETER);
     LogFlowFunc(("ENTER: pvUser:%p\n",
                  pvUser));
@@ -442,6 +443,7 @@ static DECLCALLBACK(int) drvCardReaderDownEndTransaction(PPDMICARDREADERDOWN pIn
                                                          void *pvUser,
                                                          uint32_t u32Disposition)
 {
+    RT_NOREF(pvUser, u32Disposition);
     AssertPtrReturn(pInterface, VERR_INVALID_PARAMETER);
     LogFlowFunc(("ENTER: pvUser:%p, u32Disposition:%RX32\n",
                  pvUser, u32Disposition));
@@ -598,8 +600,8 @@ static int drvCardReaderWakeupFunc(PUSBCARDREADER pThis)
 
 static DECLCALLBACK(int) drvCardReaderThreadCmdWakeup(PPDMDRVINS pDrvIns, PPDMTHREAD pThread)
 {
+    RT_NOREF(pThread);
     LogFlowFunc(("ENTER: pDrvIns:%i\n", pDrvIns->iInstance));
-
     PUSBCARDREADER pThis = PDMINS_2_DATA(pDrvIns, PUSBCARDREADER);
 
     AssertReturn(pThis->hReqQCardReaderCmd != NIL_RTREQQUEUE, VERR_INVALID_STATE);
@@ -610,7 +612,7 @@ static DECLCALLBACK(int) drvCardReaderThreadCmdWakeup(PPDMDRVINS pDrvIns, PPDMTH
 
     if (RT_SUCCESS(rc))
         RTReqRelease(pReq);
-    /* @todo handle VERR_TIMEOUT */
+    /** @todo handle VERR_TIMEOUT */
 
     return rc;
 }
@@ -699,6 +701,7 @@ int UsbCardReader::vrdeSCardRequest(void *pvUser, uint32_t u32Function, const vo
 
 int UsbCardReader::VRDENotify(uint32_t u32Id, void *pvData, uint32_t cbData)
 {
+    RT_NOREF(cbData);
     int rc = VINF_SUCCESS;
 
     switch (u32Id)
@@ -747,7 +750,7 @@ int UsbCardReader::VRDENotify(uint32_t u32Id, void *pvData, uint32_t cbData)
             VRDESCARDNOTIFYDETACH *p = (VRDESCARDNOTIFYDETACH *)pvData; NOREF(p);
             Assert(cbData == sizeof(VRDESCARDNOTIFYDETACH));
 
-            /* @todo Just free. There should be no pending requests, because VRDP cancels them. */
+            /** @todo Just free. There should be no pending requests, because VRDP cancels them. */
             RTMemFree(m_pRemote);
             m_pRemote = NULL;
         } break;
@@ -763,6 +766,7 @@ int UsbCardReader::VRDENotify(uint32_t u32Id, void *pvData, uint32_t cbData)
 
 int UsbCardReader::VRDEResponse(int rcRequest, void *pvUser, uint32_t u32Function, void *pvData, uint32_t cbData)
 {
+    RT_NOREF(cbData);
     int rc = VINF_SUCCESS;
 
     LogFlowFunc(("%Rrc %p %u %p %u\n",
@@ -814,7 +818,7 @@ int UsbCardReader::VRDEResponse(int rcRequest, void *pvUser, uint32_t u32Functio
                     LogFlowFunc(("LISTREADERS: [%d] [%s]\n",
                                  i, pRsp->apszNames[i]));
 
-                    /* @todo only the first reader is supported. */
+                    /** @todo only the first reader is supported. */
                     if (i != 0)
                     {
                         continue;
@@ -868,7 +872,7 @@ int UsbCardReader::VRDEResponse(int rcRequest, void *pvUser, uint32_t u32Functio
                         LogFlowFunc(("GETSTATUSCHANGE: [%d] %RX32\n",
                                      i, pRsp->aReaderStates[i].u32EventState));
 
-                        /* @todo only the first reader is supported. */
+                        /** @todo only the first reader is supported. */
                         if (i != 0)
                         {
                             continue;
@@ -1102,7 +1106,7 @@ int UsbCardReader::VRDEResponse(int rcRequest, void *pvUser, uint32_t u32Functio
                 {
                     pu8RecvBuffer = pRsp->pu8RecvBuffer;
                     cbRecvBuffer = pRsp->u32RecvLength;
-                    /* @todo pioRecvPci */
+                    /** @todo pioRecvPci */
                 }
             }
 
@@ -1355,6 +1359,7 @@ int UsbCardReader::Connect(struct USBCARDREADER *pDrv,
                            uint32_t u32ShareMode,
                            uint32_t u32PreferredProtocols)
 {
+    RT_NOREF(pszReaderName);
     AssertReturn(pDrv == mpDrv, VERR_NOT_SUPPORTED);
 
     int rc = VINF_SUCCESS;
@@ -1861,6 +1866,7 @@ int UsbCardReader::SetAttrib(struct USBCARDREADER *pDrv,
 
 /* static */ DECLCALLBACK(int) UsbCardReader::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
     PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
     LogFlowFunc(("iInstance/%d, pCfg:%p, fFlags:%x\n", pDrvIns->iInstance, pCfg, fFlags));
     PUSBCARDREADER pThis = PDMINS_2_DATA(pDrvIns, PUSBCARDREADER);
diff --git a/src/VBox/Main/src-client/UsbWebcamInterface.cpp b/src/VBox/Main/src-client/UsbWebcamInterface.cpp
index 8928260..67a2c9d 100644
--- a/src/VBox/Main/src-client/UsbWebcamInterface.cpp
+++ b/src/VBox/Main/src-client/UsbWebcamInterface.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2014 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -44,8 +44,8 @@ typedef struct EMWEBCAMREMOTE
 typedef struct EMWEBCAMDRV
 {
     EMWEBCAMREMOTE *pRemote;
-    PPDMIWEBCAMUP  pIWebcamUp;
-    PDMIWEBCAMDOWN IWebcamDown;
+    PPDMIWEBCAMDEV  pIWebcamUp;
+    PDMIWEBCAMDRV   IWebcamDrv;
 } EMWEBCAMDRV, *PEMWEBCAMDRV;
 
 typedef struct EMWEBCAMREQCTX
@@ -55,39 +55,39 @@ typedef struct EMWEBCAMREQCTX
 } EMWEBCAMREQCTX;
 
 
-static DECLCALLBACK(void) drvEmWebcamReady(PPDMIWEBCAMDOWN pInterface,
+static DECLCALLBACK(void) drvEmWebcamReady(PPDMIWEBCAMDRV pInterface,
                                            bool fReady)
 {
     NOREF(fReady);
 
-    PEMWEBCAMDRV pThis = RT_FROM_MEMBER(pInterface, EMWEBCAMDRV, IWebcamDown);
+    PEMWEBCAMDRV pThis = RT_FROM_MEMBER(pInterface, EMWEBCAMDRV, IWebcamDrv);
     EMWEBCAMREMOTE *pRemote = pThis->pRemote;
 
     LogFlowFunc(("pRemote:%p\n", pThis->pRemote));
 
     if (pThis->pIWebcamUp)
     {
-        pThis->pIWebcamUp->pfnWebcamUpAttached(pThis->pIWebcamUp,
-                                               pRemote->u64DeviceId,
-                                               (const PDMIWEBCAM_DEVICEDESC *)pRemote->pDeviceDesc,
-                                               pRemote->cbDeviceDesc,
-                                               pRemote->u32Version,
-                                               pRemote->fu32Capabilities);
+        pThis->pIWebcamUp->pfnAttached(pThis->pIWebcamUp,
+                                       pRemote->u64DeviceId,
+                                       pRemote->pDeviceDesc,
+                                       pRemote->cbDeviceDesc,
+                                       pRemote->u32Version,
+                                       pRemote->fu32Capabilities);
     }
 }
 
-static DECLCALLBACK(int) drvEmWebcamControl(PPDMIWEBCAMDOWN pInterface,
+static DECLCALLBACK(int) drvEmWebcamControl(PPDMIWEBCAMDRV pInterface,
                                             void *pvUser,
                                             uint64_t u64DeviceId,
-                                            const PDMIWEBCAM_CTRLHDR *pCtrl,
+                                            const struct VRDEVIDEOINCTRLHDR *pCtrl,
                                             uint32_t cbCtrl)
 {
-    PEMWEBCAMDRV pThis = RT_FROM_MEMBER(pInterface, EMWEBCAMDRV, IWebcamDown);
+    PEMWEBCAMDRV pThis = RT_FROM_MEMBER(pInterface, EMWEBCAMDRV, IWebcamDrv);
     EMWEBCAMREMOTE *pRemote = pThis->pRemote;
 
     LogFlowFunc(("pRemote:%p, u64DeviceId %lld\n", pRemote, u64DeviceId));
 
-    return pRemote->pEmWebcam->SendControl(pThis, pvUser, u64DeviceId, (const VRDEVIDEOINCTRLHDR *)pCtrl, cbCtrl);
+    return pRemote->pEmWebcam->SendControl(pThis, pvUser, u64DeviceId, pCtrl, cbCtrl);
 }
 
 
@@ -219,14 +219,11 @@ void EmWebcam::EmWebcamCbNotify(uint32_t u32Id, const void *pvData, uint32_t cbD
 
             LogFlowFunc(("DETACH[%d,%d]\n", p->deviceHandle.u32ClientId, p->deviceHandle.u32DeviceId));
 
-            /* @todo */
+            /** @todo */
             if (mpRemote)
             {
                 if (mpDrv && mpDrv->pIWebcamUp)
-                {
-                    mpDrv->pIWebcamUp->pfnWebcamUpDetached(mpDrv->pIWebcamUp,
-                                                           mpRemote->u64DeviceId);
-                }
+                    mpDrv->pIWebcamUp->pfnDetached(mpDrv->pIWebcamUp, mpRemote->u64DeviceId);
                 /* mpRemote is deallocated in EmWebcamDestruct */
             }
         } break;
@@ -243,6 +240,7 @@ void EmWebcam::EmWebcamCbNotify(uint32_t u32Id, const void *pvData, uint32_t cbD
 void EmWebcam::EmWebcamCbDeviceDesc(int rcRequest, void *pDeviceCtx, void *pvUser,
                                     const VRDEVIDEOINDEVICEDESC *pDeviceDesc, uint32_t cbDeviceDesc)
 {
+    RT_NOREF(pvUser);
     EMWEBCAMREMOTE *pRemote = (EMWEBCAMREMOTE *)pDeviceCtx;
     Assert(pRemote == mpRemote);
 
@@ -271,6 +269,7 @@ void EmWebcam::EmWebcamCbDeviceDesc(int rcRequest, void *pDeviceCtx, void *pvUse
 void EmWebcam::EmWebcamCbControl(int rcRequest, void *pDeviceCtx, void *pvUser,
                                  const VRDEVIDEOINCTRLHDR *pControl, uint32_t cbControl)
 {
+    RT_NOREF(rcRequest);
     EMWEBCAMREMOTE *pRemote = (EMWEBCAMREMOTE *)pDeviceCtx; NOREF(pRemote);
     Assert(pRemote == mpRemote);
 
@@ -281,12 +280,12 @@ void EmWebcam::EmWebcamCbControl(int rcRequest, void *pDeviceCtx, void *pvUser,
 
     if (mpDrv && mpDrv->pIWebcamUp)
     {
-        mpDrv->pIWebcamUp->pfnWebcamUpControl(mpDrv->pIWebcamUp,
-                                              fResponse,
-                                              pvUser,
-                                              mpRemote->u64DeviceId,
-                                              (const PDMIWEBCAM_CTRLHDR *)pControl,
-                                              cbControl);
+        mpDrv->pIWebcamUp->pfnControl(mpDrv->pIWebcamUp,
+                                      fResponse,
+                                      pvUser,
+                                      mpRemote->u64DeviceId,
+                                      pControl,
+                                      cbControl);
     }
 
     RTMemFree(pvUser);
@@ -295,6 +294,7 @@ void EmWebcam::EmWebcamCbControl(int rcRequest, void *pDeviceCtx, void *pvUser,
 void EmWebcam::EmWebcamCbFrame(int rcRequest, void *pDeviceCtx,
                                const VRDEVIDEOINPAYLOADHDR *pFrame, uint32_t cbFrame)
 {
+    RT_NOREF(rcRequest, pDeviceCtx);
     LogFlowFunc(("rcRequest %Rrc %p %p %d\n",
                  rcRequest, pDeviceCtx, pFrame, cbFrame));
 
@@ -306,12 +306,12 @@ void EmWebcam::EmWebcamCbFrame(int rcRequest, void *pDeviceCtx,
             uint32_t cbImage = cbFrame - pFrame->u8HeaderLength;
             const uint8_t *pu8Image = cbImage > 0? (const uint8_t *)pFrame + pFrame->u8HeaderLength: NULL;
 
-            mpDrv->pIWebcamUp->pfnWebcamUpFrame(mpDrv->pIWebcamUp,
-                                                mpRemote->u64DeviceId,
-                                                (PDMIWEBCAM_FRAMEHDR *)pFrame,
-                                                pFrame->u8HeaderLength,
-                                                pu8Image,
-                                                cbImage);
+            mpDrv->pIWebcamUp->pfnFrame(mpDrv->pIWebcamUp,
+                                        mpRemote->u64DeviceId,
+                                        pFrame,
+                                        pFrame->u8HeaderLength,
+                                        pu8Image,
+                                        cbImage);
         }
     }
 }
@@ -365,7 +365,7 @@ int EmWebcam::SendControl(EMWEBCAMDRV *pDrv, void *pvUser, uint64_t u64DeviceId,
     LogFlowFunc(("pszIID:%s\n", pszIID));
 
     PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase);
-    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIWEBCAMDOWN, &pThis->IWebcamDown);
+    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIWEBCAMDRV, &pThis->IWebcamDrv);
     return NULL;
 }
 
@@ -386,6 +386,7 @@ int EmWebcam::SendControl(EMWEBCAMDRV *pDrv, void *pvUser, uint64_t u64DeviceId,
 
 /* static */ DECLCALLBACK(int) EmWebcam::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
     PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
     LogFlowFunc(("iInstance:%d, pCfg:%p, fFlags:%x\n", pDrvIns->iInstance, pCfg, fFlags));
 
@@ -396,7 +397,7 @@ int EmWebcam::SendControl(EMWEBCAMDRV *pDrv, void *pvUser, uint64_t u64DeviceId,
                     VERR_PDM_DRVINS_NO_ATTACH);
 
     /* Check early that there is a device. No need to init anything if there is no device. */
-    pThis->pIWebcamUp = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMIWEBCAMUP);
+    pThis->pIWebcamUp = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMIWEBCAMDEV);
     if (pThis->pIWebcamUp == NULL)
     {
         LogRel(("USBWEBCAM: Emulated webcam device does not exist.\n"));
@@ -416,8 +417,8 @@ int EmWebcam::SendControl(EMWEBCAMDRV *pDrv, void *pvUser, uint64_t u64DeviceId,
 
     pDrvIns->IBase.pfnQueryInterface = drvQueryInterface;
 
-    pThis->IWebcamDown.pfnWebcamDownReady = drvEmWebcamReady;
-    pThis->IWebcamDown.pfnWebcamDownControl = drvEmWebcamControl;
+    pThis->IWebcamDrv.pfnReady   = drvEmWebcamReady;
+    pThis->IWebcamDrv.pfnControl = drvEmWebcamControl;
 
     return VINF_SUCCESS;
 }
diff --git a/src/VBox/Main/src-client/VMMDevInterface.cpp b/src/VBox/Main/src-client/VMMDevInterface.cpp
index f0981c8..abfe116 100644
--- a/src/VBox/Main/src-client/VMMDevInterface.cpp
+++ b/src/VBox/Main/src-client/VMMDevInterface.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -459,13 +459,13 @@ DECLCALLBACK(int) vmmdevSetVisibleRegion(PPDMIVMMDEVCONNECTOR pInterface, uint32
     return VINF_SUCCESS;
 }
 
-DECLCALLBACK(int) vmmdevQueryVisibleRegion(PPDMIVMMDEVCONNECTOR pInterface, uint32_t *pcRect, PRTRECT pRect)
+DECLCALLBACK(int) vmmdevQueryVisibleRegion(PPDMIVMMDEVCONNECTOR pInterface, uint32_t *pcRects, PRTRECT paRects)
 {
     PDRVMAINVMMDEV pDrv = RT_FROM_MEMBER(pInterface, DRVMAINVMMDEV, Connector);
     Console *pConsole = pDrv->pVMMDev->getParent();
 
     /* Forward to Display, which calls corresponding framebuffers. */
-    pConsole->i_getDisplay()->i_handleQueryVisibleRegion(pcRect, pRect);
+    pConsole->i_getDisplay()->i_handleQueryVisibleRegion(pcRects, paRects);
 
     return VINF_SUCCESS;
 }
@@ -655,6 +655,7 @@ static DECLCALLBACK(int) iface_hgcmCall(PPDMIHGCMCONNECTOR pInterface, PVBOXHGCM
  */
 static DECLCALLBACK(int) iface_hgcmSave(PPDMDRVINS pDrvIns, PSSMHANDLE pSSM)
 {
+    RT_NOREF(pDrvIns);
     Log9(("Enter\n"));
     return HGCMHostSaveState(pSSM);
 }
@@ -671,6 +672,7 @@ static DECLCALLBACK(int) iface_hgcmSave(PPDMDRVINS pDrvIns, PSSMHANDLE pSSM)
  */
 static DECLCALLBACK(int) iface_hgcmLoad(PPDMDRVINS pDrvIns, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass)
 {
+    RT_NOREF(pDrvIns);
     LogFlowFunc(("Enter\n"));
 
     if (uVersion != HGCM_SSM_VERSION)
@@ -750,9 +752,10 @@ DECLCALLBACK(void *) VMMDev::drvQueryInterface(PPDMIBASE pInterface, const char
  */
 DECLCALLBACK(void) VMMDev::drvReset(PPDMDRVINS pDrvIns)
 {
+    RT_NOREF(pDrvIns);
     LogFlow(("VMMDev::drvReset: iInstance=%d\n", pDrvIns->iInstance));
 #ifdef VBOX_WITH_HGCM
-    HGCMHostReset ();
+    HGCMHostReset();
 #endif /* VBOX_WITH_HGCM */
 }
 
@@ -777,6 +780,7 @@ DECLCALLBACK(void) VMMDev::drvDestruct(PPDMDRVINS pDrvIns)
  */
 DECLCALLBACK(int) VMMDev::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags)
 {
+    RT_NOREF(fFlags);
     PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
     PDRVMAINVMMDEV pThis = PDMINS_2_DATA(pDrvIns, PDRVMAINVMMDEV);
     LogFlow(("Keyboard::drvConstruct: iInstance=%d\n", pDrvIns->iInstance));
diff --git a/src/VBox/Main/src-client/VideoRec.cpp b/src/VBox/Main/src-client/VideoRec.cpp
index 49a2a03..5271c05 100644
--- a/src/VBox/Main/src-client/VideoRec.cpp
+++ b/src/VBox/Main/src-client/VideoRec.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2013 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -289,12 +289,11 @@ private:
  * @param aSrcBuf   the source image as an array of bytes
  */
 template <class T>
-inline bool colorConvWriteYUV420p(unsigned aWidth, unsigned aHeight,
-                                  uint8_t *aDestBuf, uint8_t *aSrcBuf)
+inline bool colorConvWriteYUV420p(unsigned aWidth, unsigned aHeight, uint8_t *aDestBuf, uint8_t *aSrcBuf)
 {
-    AssertReturn(0 == (aWidth & 1), false);
-    AssertReturn(0 == (aHeight & 1), false);
-    bool rc = true;
+    AssertReturn(!(aWidth & 1), false);
+    AssertReturn(!(aHeight & 1), false);
+    bool fRc = true;
     T iter1(aWidth, aHeight, aSrcBuf);
     T iter2 = iter1;
     iter2.skip(aWidth);
@@ -302,53 +301,50 @@ inline bool colorConvWriteYUV420p(unsigned aWidth, unsigned aHeight,
     unsigned offY = 0;
     unsigned offU = cPixels;
     unsigned offV = cPixels + cPixels / 4;
-    for (unsigned i = 0; (i < aHeight / 2) && rc; ++i)
+    unsigned const cyHalf = aHeight / 2;
+    unsigned const cxHalf = aWidth  / 2;
+    for (unsigned i = 0; i < cyHalf && fRc; ++i)
     {
-        for (unsigned j = 0; (j < aWidth / 2) && rc; ++j)
-        {
-            unsigned red, green, blue, u, v;
-            rc = iter1.getRGB(&red, &green, &blue);
-            if (rc)
-            {
-                aDestBuf[offY] = ((66 * red + 129 * green + 25 * blue + 128) >> 8) + 16;
-                u = (((-38 * red - 74 * green + 112 * blue + 128) >> 8) + 128) / 4;
-                v = (((112 * red - 94 * green - 18 * blue + 128) >> 8) + 128) / 4;
-                rc = iter1.getRGB(&red, &green, &blue);
-            }
-            if (rc)
-            {
-                aDestBuf[offY + 1] = ((66 * red + 129 * green + 25 * blue + 128) >> 8) + 16;
-                u += (((-38 * red - 74 * green + 112 * blue + 128) >> 8) + 128) / 4;
-                v += (((112 * red - 94 * green - 18 * blue + 128) >> 8) + 128) / 4;
-                rc = iter2.getRGB(&red, &green, &blue);
-            }
-            if (rc)
-            {
-                aDestBuf[offY + aWidth] = ((66 * red + 129 * green + 25 * blue + 128) >> 8) + 16;
-                u += (((-38 * red - 74 * green + 112 * blue + 128) >> 8) + 128) / 4;
-                v += (((112 * red - 94 * green - 18 * blue + 128) >> 8) + 128) / 4;
-                rc = iter2.getRGB(&red, &green, &blue);
-            }
-            if (rc)
-            {
-                aDestBuf[offY + aWidth + 1] = ((66 * red + 129 * green + 25 * blue + 128) >> 8) + 16;
-                u += (((-38 * red - 74 * green + 112 * blue + 128) >> 8) + 128) / 4;
-                v += (((112 * red - 94 * green - 18 * blue + 128) >> 8) + 128) / 4;
-                aDestBuf[offU] = u;
-                aDestBuf[offV] = v;
-                offY += 2;
-                ++offU;
-                ++offV;
-            }
-        }
-        if (rc)
+        for (unsigned j = 0; j < cxHalf; ++j)
         {
-            iter1.skip(aWidth);
-            iter2.skip(aWidth);
-            offY += aWidth;
+            unsigned red, green, blue;
+            fRc = iter1.getRGB(&red, &green, &blue);
+            AssertReturn(fRc, false);
+            aDestBuf[offY] = ((66 * red + 129 * green + 25 * blue + 128) >> 8) + 16;
+            unsigned u = (((-38 * red - 74 * green + 112 * blue + 128) >> 8) + 128) / 4;
+            unsigned v = (((112 * red - 94 * green -  18 * blue + 128) >> 8) + 128) / 4;
+
+            fRc = iter1.getRGB(&red, &green, &blue);
+            AssertReturn(fRc, false);
+            aDestBuf[offY + 1] = ((66 * red + 129 * green + 25 * blue + 128) >> 8) + 16;
+            u += (((-38 * red - 74 * green + 112 * blue + 128) >> 8) + 128) / 4;
+            v += (((112 * red - 94 * green -  18 * blue + 128) >> 8) + 128) / 4;
+
+            fRc = iter2.getRGB(&red, &green, &blue);
+            AssertReturn(fRc, false);
+            aDestBuf[offY + aWidth] = ((66 * red + 129 * green + 25 * blue + 128) >> 8) + 16;
+            u += (((-38 * red - 74 * green + 112 * blue + 128) >> 8) + 128) / 4;
+            v += (((112 * red - 94 * green -  18 * blue + 128) >> 8) + 128) / 4;
+
+            fRc = iter2.getRGB(&red, &green, &blue);
+            AssertReturn(fRc, false);
+            aDestBuf[offY + aWidth + 1] = ((66 * red + 129 * green + 25 * blue + 128) >> 8) + 16;
+            u += (((-38 * red - 74 * green + 112 * blue + 128) >> 8) + 128) / 4;
+            v += (((112 * red - 94 * green -  18 * blue + 128) >> 8) + 128) / 4;
+
+            aDestBuf[offU] = u;
+            aDestBuf[offV] = v;
+            offY += 2;
+            ++offU;
+            ++offV;
         }
+
+        iter1.skip(aWidth);
+        iter2.skip(aWidth);
+        offY += aWidth;
     }
-    return rc;
+
+    return true;
 }
 
 /**
@@ -389,8 +385,9 @@ inline bool colorConvWriteRGB24(unsigned aWidth, unsigned aHeight,
  *
  * RGB/YUV conversion and encoding.
  */
-static DECLCALLBACK(int) videoRecThread(RTTHREAD Thread, void *pvUser)
+static DECLCALLBACK(int) videoRecThread(RTTHREAD hThreadSelf, void *pvUser)
 {
+    RT_NOREF(hThreadSelf);
     PVIDEORECCONTEXT pCtx = (PVIDEORECCONTEXT)pvUser;
     for (;;)
     {
@@ -617,7 +614,7 @@ void VideoRecContextClose(PVIDEORECCONTEXT pCtx)
             pStrm->Ebml.close();
             vpx_img_free(&pStrm->VpxRawImage);
             vpx_codec_err_t rcv = vpx_codec_destroy(&pStrm->VpxCodec);
-            Assert(rcv == VPX_CODEC_OK);
+            Assert(rcv == VPX_CODEC_OK); RT_NOREF(rcv);
             RTMemFree(pStrm->pu8RgbBuf);
             pStrm->pu8RgbBuf = NULL;
         }
@@ -638,6 +635,7 @@ void VideoRecContextClose(PVIDEORECCONTEXT pCtx)
  */
 bool VideoRecIsEnabled(PVIDEORECCONTEXT pCtx)
 {
+    RT_NOREF(pCtx);
     uint32_t enmState = ASMAtomicReadU32(&g_enmState);
     return (   enmState == VIDREC_IDLE
             || enmState == VIDREC_COPYING);
diff --git a/src/VBox/Main/src-client/VideoRec.h b/src/VBox/Main/src-client/VideoRec.h
index 02ed56a..184c40c 100644
--- a/src/VBox/Main/src-client/VideoRec.h
+++ b/src/VBox/Main/src-client/VideoRec.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2013 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-client/win/VBoxC.def b/src/VBox/Main/src-client/win/VBoxC.def
index 250b937..f53aeeb 100644
--- a/src/VBox/Main/src-client/win/VBoxC.def
+++ b/src/VBox/Main/src-client/win/VBoxC.def
@@ -3,7 +3,7 @@
 ; VBoxC DLL Definition File.
 ;
 
-; Copyright (C) 2006-2010 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-client/win/VBoxC.rc b/src/VBox/Main/src-client/win/VBoxC.rc
index e8dff9c..68908a3 100644
--- a/src/VBox/Main/src-client/win/VBoxC.rc
+++ b/src/VBox/Main/src-client/win/VBoxC.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-client/win/VBoxClient-x86.def b/src/VBox/Main/src-client/win/VBoxClient-x86.def
index c689444..dff7ca9 100644
--- a/src/VBox/Main/src-client/win/VBoxClient-x86.def
+++ b/src/VBox/Main/src-client/win/VBoxClient-x86.def
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2013 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-client/win/VBoxClient-x86.rc b/src/VBox/Main/src-client/win/VBoxClient-x86.rc
index 2a0785e..42b443a 100644
--- a/src/VBox/Main/src-client/win/VBoxClient-x86.rc
+++ b/src/VBox/Main/src-client/win/VBoxClient-x86.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-helper-apps/VBoxExtPackHelperApp.cpp b/src/VBox/Main/src-helper-apps/VBoxExtPackHelperApp.cpp
index ba454b8..3bb3fa3 100644
--- a/src/VBox/Main/src-helper-apps/VBoxExtPackHelperApp.cpp
+++ b/src/VBox/Main/src-helper-apps/VBoxExtPackHelperApp.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2012 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -47,8 +47,8 @@
 
 #ifdef RT_OS_WINDOWS
 # define _WIN32_WINNT 0x0501
-# include <Objbase.h>                   /* CoInitializeEx */
-# include <Windows.h>                   /* ShellExecuteEx, ++ */
+# include <iprt/win/windows.h>          /* ShellExecuteEx, ++ */
+# include <iprt/win/objbase.h>                   /* CoInitializeEx */
 # ifdef DEBUG
 #  include <Sddl.h>
 # endif
@@ -295,6 +295,7 @@ static RTEXITCODE SetExtPackPermissions(const char *pszDir)
          return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to set directory permissions: %Rrc ('%s')", rc, pszDir);
 #else
      /** @todo TrustedInstaller? */
+     RT_NOREF1(pszDir);
 #endif
 
     return RTEXITCODE_SUCCESS;
@@ -338,6 +339,7 @@ static RTEXITCODE ValidateMemberOfExtPack(const char *pszName, RTVFSOBJTYPE enmT
  */
 static RTEXITCODE ValidateUnpackedExtPack(const char *pszDir, const char *pszTarball, const char *pszExtPackName)
 {
+    RT_NOREF2(pszTarball, pszExtPackName);
     RTMsgInfo("Validating unpacked extension pack...");
 
     RTERRINFOSTATIC ErrInfo;
@@ -489,6 +491,7 @@ static RTEXITCODE UnpackExtPackFile(const char *pszName, const char *pszDstFilen
 static RTEXITCODE UnpackExtPack(RTFILE hTarballFile, const char *pszDirDst, RTMANIFEST hValidManifest,
                                 const char *pszTarball)
 {
+    RT_NOREF1(pszTarball);
     RTMsgInfo("Unpacking extension pack into '%s'...", pszDirDst);
 
     /*
@@ -652,6 +655,8 @@ static RTEXITCODE DoInstall2(const char *pszBaseDir, const char *pszCertDir, con
                              const char *pszTarballDigest, RTFILE hTarballFile, RTFILE hTarballFileOpt,
                              const char *pszName, const char *pszMangledName, bool fReplace)
 {
+    RT_NOREF1(pszCertDir);
+
     /*
      * Do some basic validation of the tarball file.
      */
@@ -1232,6 +1237,7 @@ static void CopyFileToStdXxx(RTFILE hSrc, PRTSTREAM pDst, bool fComplain)
 static RTEXITCODE RelaunchElevatedNative(const char *pszExecPath, const char **papszArgs, int cSuArgs, int cMyArgs,
                                          int iCmd, const char *pszDisplayInfoHack)
 {
+    RT_NOREF1(cMyArgs);
     RTEXITCODE rcExit = RTEXITCODE_FAILURE;
 #ifdef RT_OS_WINDOWS
     NOREF(iCmd);
@@ -1319,7 +1325,7 @@ static RTEXITCODE RelaunchElevatedNative(const char *pszExecPath, const char **p
                         DWORD dwExitCode;
                         if (GetExitCodeProcess(Info.hProcess, &dwExitCode))
                         {
-                            if (dwExitCode >= 0 && dwExitCode < 128)
+                            if (dwExitCode < 128)
                                 rcExit = (RTEXITCODE)dwExitCode;
                             else
                                 rcExit = RTEXITCODE_FAILURE;
@@ -1344,6 +1350,7 @@ static RTEXITCODE RelaunchElevatedNative(const char *pszExecPath, const char **p
         RTMsgError("RTStrToUtf16 failed: %Rc", rc);
 
 #elif defined(RT_OS_DARWIN)
+    RT_NOREF(pszDisplayInfoHack);
     char szIconName[RTPATH_MAX];
     int rc = RTPathAppPrivateArch(szIconName, sizeof(szIconName));
     if (RT_SUCCESS(rc))
@@ -1380,9 +1387,16 @@ static RTEXITCODE RelaunchElevatedNative(const char *pszExecPath, const char **p
              * Execute with extra permissions
              */
             FILE *pSocketStrm;
+#if defined(__clang__) || RT_GNUC_PREREQ(4, 4)
+# pragma GCC diagnostic push
+#endif
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
             orc = AuthorizationExecuteWithPrivileges(AuthRef, pszExecPath, kAuthorizationFlagDefaults,
                                                      (char * const *)&papszArgs[cSuArgs + 3],
                                                      &pSocketStrm);
+#if defined(__clang__) || RT_GNUC_PREREQ(4, 4)
+# pragma GCC diagnostic pop
+#endif
             if (orc == errAuthorizationSuccess)
             {
                 /*
@@ -1413,6 +1427,8 @@ static RTEXITCODE RelaunchElevatedNative(const char *pszExecPath, const char **p
 
 #else
 
+    RT_NOREF2(pszExecPath, pszDisplayInfoHack);
+
     /*
      * Several of the alternatives below will require a command line.
      */
diff --git a/src/VBox/Main/src-helper-apps/VBoxExtPackHelperApp.rc b/src/VBox/Main/src-helper-apps/VBoxExtPackHelperApp.rc
index 7e58e17..06a2b3b 100644
--- a/src/VBox/Main/src-helper-apps/VBoxExtPackHelperApp.rc
+++ b/src/VBox/Main/src-helper-apps/VBoxExtPackHelperApp.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-helper-apps/VBoxVolInfo.cpp b/src/VBox/Main/src-helper-apps/VBoxVolInfo.cpp
index a2bb7d8..338ff98 100644
--- a/src/VBox/Main/src-helper-apps/VBoxVolInfo.cpp
+++ b/src/VBox/Main/src-helper-apps/VBoxVolInfo.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/ApplianceImpl.cpp b/src/VBox/Main/src-server/ApplianceImpl.cpp
index ea46921..2c19e02 100644
--- a/src/VBox/Main/src-server/ApplianceImpl.cpp
+++ b/src/VBox/Main/src-server/ApplianceImpl.cpp
@@ -901,7 +901,7 @@ HRESULT Appliance::i_searchUniqueVMName(Utf8Str& aName) const
     IMachine *machine = NULL;
     char *tmpName = RTStrDup(aName.c_str());
     int i = 1;
-    /** @todo: Maybe too cost-intensive; try to find a lighter way */
+    /** @todo Maybe too cost-intensive; try to find a lighter way */
     while (mVirtualBox->FindMachine(Bstr(tmpName).raw(), &machine) != VBOX_E_OBJECT_NOT_FOUND)
     {
         RTStrFree(tmpName);
@@ -921,7 +921,7 @@ HRESULT Appliance::i_searchUniqueDiskImageFilePath(Utf8Str& aName) const
     int i = 1;
     /* Check if the file exists or if a file with this path is registered
      * already */
-    /** @todo: Maybe too cost-intensive; try to find a lighter way */
+    /** @todo Maybe too cost-intensive; try to find a lighter way */
     while (    RTPathExists(tmpName)
             || mVirtualBox->OpenMedium(Bstr(tmpName).raw(), DeviceType_HardDisk, AccessMode_ReadWrite,
                                        FALSE /* fForceNewUuid */,  &harddisk) != VBOX_E_OBJECT_NOT_FOUND)
@@ -1208,24 +1208,23 @@ void Appliance::i_parseBucket(Utf8Str &aPath, Utf8Str &aBucket)
 }
 
 /**
- * Thread function for the thread started in Appliance::readImpl() and Appliance::importImpl()
+ * Worker for TaskOVF::handler.
+ *
+ * The TaskOVF is started in Appliance::readImpl() and Appliance::importImpl()
  * and Appliance::writeImpl().
  *
  * This will in turn call Appliance::readFS() or Appliance::importFS() or
  * Appliance::writeFS().
  *
- * @param aThread
- * @param pvUser
+ * @thread  pTask       The task.
  */
 /* static */
-DECLCALLBACK(int) Appliance::i_taskThreadImportOrExport(RTTHREAD /* aThread */, void *pvUser)
+void Appliance::i_importOrExportThreadTask(TaskOVF *pTask)
 {
-    TaskOVF *pTask = static_cast<TaskOVF*>(pvUser);
-    AssertReturn(pTask, VERR_GENERAL_FAILURE);
+    LogFlowFuncEnter();
+    AssertReturnVoid(pTask);
 
     Appliance *pAppliance = pTask->pAppliance;
-
-    LogFlowFuncEnter();
     LogFlowFunc(("Appliance %p taskType=%d\n", pAppliance, pTask->taskType));
 
     switch (pTask->taskType)
@@ -1282,8 +1281,6 @@ DECLCALLBACK(int) Appliance::i_taskThreadImportOrExport(RTTHREAD /* aThread */,
         pTask->pProgress->i_notifyComplete(pTask->rc);
 
     LogFlowFuncLeave();
-
-    return VINF_SUCCESS;
 }
 
 /* static */
@@ -1657,7 +1654,8 @@ const VirtualSystemDescriptionEntry* VirtualSystemDescription::i_findControllerF
             case VirtualSystemDescriptionType_HardDiskControllerSAS:
                 if (d.strRef == strRef)
                     return &d;
-            break;
+                break;
+            default: break; /* Shut up MSC. */
         }
     }
 
diff --git a/src/VBox/Main/src-server/ApplianceImplExport.cpp b/src/VBox/Main/src-server/ApplianceImplExport.cpp
index e544f8d..931d86d 100644
--- a/src/VBox/Main/src-server/ApplianceImplExport.cpp
+++ b/src/VBox/Main/src-server/ApplianceImplExport.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2014 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -206,15 +206,17 @@ HRESULT Machine::exportTo(const ComPtr<IAppliance> &aAppliance, const com::Utf8S
 //     <const name="HardDiskControllerIDE" value="6" />
         if (!pIDEController.isNull())
         {
-            Utf8Str strVBox;
             StorageControllerType_T ctlr;
             rc = pIDEController->COMGETTER(ControllerType)(&ctlr);
             if (FAILED(rc)) throw rc;
-            switch(ctlr)
+
+            Utf8Str strVBox;
+            switch (ctlr)
             {
                 case StorageControllerType_PIIX3: strVBox = "PIIX3"; break;
                 case StorageControllerType_PIIX4: strVBox = "PIIX4"; break;
                 case StorageControllerType_ICH6: strVBox = "ICH6"; break;
+                default: break; /* Shut up MSC. */
             }
 
             if (strVBox.length())
@@ -251,10 +253,11 @@ HRESULT Machine::exportTo(const ComPtr<IAppliance> &aAppliance, const com::Utf8S
             if (SUCCEEDED(rc))
             {
                 Utf8Str strVBox = "LsiLogic";       // the default in VBox
-                switch(ctlr)
+                switch (ctlr)
                 {
                     case StorageControllerType_LsiLogic: strVBox = "LsiLogic"; break;
                     case StorageControllerType_BusLogic: strVBox = "BusLogic"; break;
+                    default: break; /* Shut up MSC. */
                 }
                 lSCSIControllerIndex = (int32_t)pNewDesc->m->maDescriptions.size();
                 pNewDesc->i_addEntry(VirtualSystemDescriptionType_HardDiskControllerSCSI,
@@ -518,7 +521,7 @@ HRESULT Machine::exportTo(const ComPtr<IAppliance> &aAppliance, const com::Utf8S
                                          strLocation, // vbox value: media path
                                         (uint32_t)(llSize / _1M),
                                          strExtra);
-                break;
+                    break;
 
                 case DeviceType_DVD:
                     Log(("Adding VirtualSystemDescriptionType_CDROM, disk size: %RI64\n", llSize));
@@ -528,7 +531,7 @@ HRESULT Machine::exportTo(const ComPtr<IAppliance> &aAppliance, const com::Utf8S
                                          strLocation, // vbox value
                                          (uint32_t)(llSize / _1M),// ulSize
                                          strExtra);
-                break;
+                    break;
 
                 case DeviceType_Floppy:
                     pNewDesc->i_addEntry(VirtualSystemDescriptionType_Floppy,
@@ -537,7 +540,9 @@ HRESULT Machine::exportTo(const ComPtr<IAppliance> &aAppliance, const com::Utf8S
                                          strEmpty,      // vbox value
                                          1,       // ulSize
                                          strExtra);
-                break;
+                    break;
+
+                default: break; /* Shut up MSC. */
             }
         }
 
@@ -742,7 +747,7 @@ HRESULT Appliance::write(const com::Utf8Str &aFormat,
  */
 HRESULT Appliance::i_writeImpl(ovf::OVFVersion_T aFormat, const LocationInfo &aLocInfo, ComObjPtr<Progress> &aProgress)
 {
-    HRESULT rc = S_OK;
+    HRESULT rc;
     try
     {
         rc = i_setUpProgress(aProgress,
@@ -758,7 +763,7 @@ HRESULT Appliance::i_writeImpl(ovf::OVFVersion_T aFormat, const LocationInfo &aL
         catch(...)
         {
             delete task;
-            throw rc = setError(VBOX_E_OBJECT_NOT_FOUND, 
+            throw rc = setError(VBOX_E_OBJECT_NOT_FOUND,
                                 tr("Could not create TaskOVF object for for writing out the OVF to disk"));
         }
 
@@ -1000,7 +1005,7 @@ void Appliance::i_buildXML(AutoWriteLockBase& writeLock,
         LONG64 cbCapacity = 0;     // size reported to guest
         rc = pSourceDisk->COMGETTER(LogicalSize)(&cbCapacity);
         if (FAILED(rc)) throw rc;
-        // Todo r=poetzsch: wrong it is reported in bytes ...
+        /// @todo r=poetzsch: wrong it is reported in bytes ...
         // capacity is reported in megabytes, so...
         //cbCapacity *= _1M;
 
@@ -1013,7 +1018,7 @@ void Appliance::i_buildXML(AutoWriteLockBase& writeLock,
         xml::ElementNode *pelmFile = pelmReferences->createChild("File");
         pelmFile->setAttribute("ovf:href", strTargetFileNameOnly);
         pelmFile->setAttribute("ovf:id", strFileRef);
-        // Todo: the actual size is not available at this point of time,
+        /// @todo the actual size is not available at this point of time,
         // cause the disk will be compressed. The 1.0 standard says this is
         // optional! 1.1 isn't fully clear if the "gzip" format is used.
         // Need to be checked. */
@@ -1372,7 +1377,7 @@ void Appliance::i_buildXMLForOneVirtualSystem(AutoWriteLockBase& writeLock,
                         strCaption = Utf8StrFmt("%d MB of memory", lVirtualQuantity);     // without this ovftool
                                                                                           // won't eat the item
                     }
-                break;
+                    break;
 
                 case VirtualSystemDescriptionType_HardDiskControllerIDE:
                     /* <Item>
@@ -1410,7 +1415,7 @@ void Appliance::i_buildXMLForOneVirtualSystem(AutoWriteLockBase& writeLock,
                             lIDESecondaryControllerIndex = lIndexThis;
                         }
                     }
-                break;
+                    break;
 
                 case VirtualSystemDescriptionType_HardDiskControllerSATA:
                     /*  <Item>
@@ -1445,7 +1450,7 @@ void Appliance::i_buildXMLForOneVirtualSystem(AutoWriteLockBase& writeLock,
                         idSATAController = ulInstanceID;
                         lSATAControllerIndex = lIndexThis;
                     }
-                break;
+                    break;
 
                 case VirtualSystemDescriptionType_HardDiskControllerSCSI:
                 case VirtualSystemDescriptionType_HardDiskControllerSAS:
@@ -1486,7 +1491,7 @@ void Appliance::i_buildXMLForOneVirtualSystem(AutoWriteLockBase& writeLock,
                         idSCSIController = ulInstanceID;
                         lSCSIControllerIndex = lIndexThis;
                     }
-                break;
+                    break;
 
                 case VirtualSystemDescriptionType_HardDiskImage:
                     /*  <Item>
@@ -1541,7 +1546,7 @@ void Appliance::i_buildXMLForOneVirtualSystem(AutoWriteLockBase& writeLock,
 
                         stack.mapDisks[strDiskID] = &desc;
                     }
-                break;
+                    break;
 
                 case VirtualSystemDescriptionType_Floppy:
                     if (uLoop == 1)
@@ -1552,7 +1557,7 @@ void Appliance::i_buildXMLForOneVirtualSystem(AutoWriteLockBase& writeLock,
                         lAutomaticAllocation = 0;
                         lAddressOnParent = 0;           // this is what OVFTool writes
                     }
-                break;
+                    break;
 
                 case VirtualSystemDescriptionType_CDROM:
                     /*  <Item>
@@ -1615,7 +1620,7 @@ void Appliance::i_buildXMLForOneVirtualSystem(AutoWriteLockBase& writeLock,
                         // there is no DVD drive map to update because it is
                         // handled completely with this entry.
                     }
-                break;
+                    break;
 
                 case VirtualSystemDescriptionType_NetworkAdapter:
                     /* <Item>
@@ -1649,7 +1654,7 @@ void Appliance::i_buildXMLForOneVirtualSystem(AutoWriteLockBase& writeLock,
 
                         stack.mapNetworks[desc.strOvf] = true;
                     }
-                break;
+                    break;
 
                 case VirtualSystemDescriptionType_USBController:
                     /*  <Item ovf:required="false">
@@ -1668,7 +1673,7 @@ void Appliance::i_buildXMLForOneVirtualSystem(AutoWriteLockBase& writeLock,
                         lAddress = 0;                   // this is what OVFTool writes
                         lBusNumber = 0;                 // this is what OVFTool writes
                     }
-                break;
+                    break;
 
                 case VirtualSystemDescriptionType_SoundCard:
                 /*  <Item ovf:required="false">
@@ -1689,7 +1694,9 @@ void Appliance::i_buildXMLForOneVirtualSystem(AutoWriteLockBase& writeLock,
                         lAutomaticAllocation = 0;
                         lAddressOnParent = 3;               // what gives? this is what OVFTool writes
                     }
-                break;
+                    break;
+
+                default: break; /* Shut up MSC. */
             }
 
             if (type)
@@ -2311,7 +2318,7 @@ HRESULT Appliance::i_writeFSImpl(TaskOVF *pTask, AutoWriteLockBase& writeLock, P
             catch (HRESULT rc3)
             {
                 writeLock.acquire();
-                // Todo: file deletion on error? If not, we can remove that whole try/catch block.
+                /// @todo file deletion on error? If not, we can remove that whole try/catch block.
                 throw rc3;
             }
             // Finished, lock again (so nobody mess around with the medium tree
diff --git a/src/VBox/Main/src-server/ApplianceImplIO.cpp b/src/VBox/Main/src-server/ApplianceImplIO.cpp
index 918c6ff..81cc55a 100644
--- a/src/VBox/Main/src-server/ApplianceImplIO.cpp
+++ b/src/VBox/Main/src-server/ApplianceImplIO.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2013 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/ApplianceImplImport.cpp b/src/VBox/Main/src-server/ApplianceImplImport.cpp
index 92e8fb5..01a9024 100644
--- a/src/VBox/Main/src-server/ApplianceImplImport.cpp
+++ b/src/VBox/Main/src-server/ApplianceImplImport.cpp
@@ -113,7 +113,7 @@ HRESULT Appliance::read(const com::Utf8Str &aFile,
  */
 HRESULT Appliance::interpret()
 {
-    // @todo:
+    /// @todo
     //  - don't use COM methods but the methods directly (faster, but needs appropriate
     // locking of that objects itself (s. HardDisk))
     //  - Appropriate handle errors like not supported file formats
@@ -520,7 +520,7 @@ HRESULT Appliance::interpret()
                         /* Check for the constrains */
                         if (cIDEused < 4)
                         {
-                            // @todo: figure out the IDE types
+                            /// @todo figure out the IDE types
                             /* Use PIIX4 as default */
                             Utf8Str strType = "PIIX4";
                             if (!hdc.strControllerType.compare("PIIX3", Utf8Str::CaseInsensitive))
@@ -546,7 +546,7 @@ HRESULT Appliance::interpret()
                         /* Check for the constrains */
                         if (cSATAused < 1)
                         {
-                            // @todo: figure out the SATA types
+                            /// @todo figure out the SATA types
                             /* We only support a plain AHCI controller, so use them always */
                             pNewDesc->i_addEntry(VirtualSystemDescriptionType_HardDiskControllerSATA,
                                                  strControllerID,
@@ -636,7 +636,7 @@ HRESULT Appliance::interpret()
                         throw rc;
                     Utf8Str vdf = Utf8Str(bstrFormatName);
 
-                    // @todo:
+                    /// @todo
                     //  - figure out all possible vmdk formats we also support
                     //  - figure out if there is a url specifier for vhd already
                     //  - we need a url specifier for the vdi format
@@ -3806,6 +3806,11 @@ l_skipped:
             settings::StorageController &sc = *sit;
 
             // find the OVF virtual system description entry for this storage controller
+/** @todo
+ * r=bird: What on earh this is switch supposed to do?  (I've added the default:break;, so don't
+ * get confused by it.)  Kind of looks like it's supposed to do something error handling related
+ * in the default case...
+ */
             switch (sc.storageBus)
             {
                 case StorageBus_SATA:
@@ -3816,6 +3821,7 @@ l_skipped:
                     break;
                 case StorageBus_SAS:
                     break;
+                default: break; /* Shut up MSC. */
             }
 
             // for each medium attachment to this controller...
@@ -4064,7 +4070,7 @@ void Appliance::i_importMachines(ImportStack &stack)
         // audio adapter
         std::list<VirtualSystemDescriptionEntry*> vsdeAudioAdapter =
             vsdescThis->i_findByType(VirtualSystemDescriptionType_SoundCard);
-        /* @todo: we support one audio adapter only */
+        /** @todo we support one audio adapter only */
         if (!vsdeAudioAdapter.empty())
             stack.strAudioAdapter = vsdeAudioAdapter.front()->strVBoxCurrent;
 
diff --git a/src/VBox/Main/src-server/AudioAdapterImpl.cpp b/src/VBox/Main/src-server/AudioAdapterImpl.cpp
index 15c08b6..53da8c5 100644
--- a/src/VBox/Main/src-server/AudioAdapterImpl.cpp
+++ b/src/VBox/Main/src-server/AudioAdapterImpl.cpp
@@ -315,8 +315,8 @@ HRESULT AudioAdapter::setAudioController(AudioControllerType_T aAudioController)
                 break;
 
             default:
-                AssertMsgFailed(("Wrong audio controller type %d\n",
-                                 aAudioController));
+                AssertMsgFailed(("Wrong audio controller type %d\n", aAudioController));
+                defaultCodec = AudioCodecType_Null; /* Shut up MSC */
                 rc = E_FAIL;
         }
         if (rc == S_OK)
diff --git a/src/VBox/Main/src-server/BandwidthControlImpl.cpp b/src/VBox/Main/src-server/BandwidthControlImpl.cpp
index 1a6b62d..2c5937f 100644
--- a/src/VBox/Main/src-server/BandwidthControlImpl.cpp
+++ b/src/VBox/Main/src-server/BandwidthControlImpl.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/ClientToken.cpp b/src/VBox/Main/src-server/ClientToken.cpp
index b54a3c3..8fd5299 100644
--- a/src/VBox/Main/src-server/ClientToken.cpp
+++ b/src/VBox/Main/src-server/ClientToken.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2004-2013 Oracle Corporation
+ * Copyright (C) 2004-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/GuestOSTypeImpl.cpp b/src/VBox/Main/src-server/GuestOSTypeImpl.cpp
index d668ec0..fa4c5c0 100644
--- a/src/VBox/Main/src-server/GuestOSTypeImpl.cpp
+++ b/src/VBox/Main/src-server/GuestOSTypeImpl.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/HostDnsService.cpp b/src/VBox/Main/src-server/HostDnsService.cpp
index 00efc8d..e989d08 100644
--- a/src/VBox/Main/src-server/HostDnsService.cpp
+++ b/src/VBox/Main/src-server/HostDnsService.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/HostDnsService.h b/src/VBox/Main/src-server/HostDnsService.h
index 70da69d..8ed4730 100644
--- a/src/VBox/Main/src-server/HostDnsService.h
+++ b/src/VBox/Main/src-server/HostDnsService.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2005-2012 Oracle Corporation
+ * Copyright (C) 2005-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/HostDnsServiceResolvConf.cpp b/src/VBox/Main/src-server/HostDnsServiceResolvConf.cpp
index a47a2b5..b593d0b 100644
--- a/src/VBox/Main/src-server/HostDnsServiceResolvConf.cpp
+++ b/src/VBox/Main/src-server/HostDnsServiceResolvConf.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/HostImpl.cpp b/src/VBox/Main/src-server/HostImpl.cpp
index f24b29a..928514a 100644
--- a/src/VBox/Main/src-server/HostImpl.cpp
+++ b/src/VBox/Main/src-server/HostImpl.cpp
@@ -117,14 +117,14 @@ typedef SOLARISDVD *PSOLARISDVD;
 
 #ifdef RT_OS_WINDOWS
 # define _WIN32_DCOM
-# include <windows.h>
+# include <iprt/win/windows.h>
 # include <shellapi.h>
 # define INITGUID
 # include <guiddef.h>
 # include <devguid.h>
-# include <objbase.h>
-//# include <setupapi.h>
-# include <shlobj.h>
+# include <iprt/win/objbase.h>
+//# include <iprt/win/setupapi.h>
+# include <iprt/win/shlobj.h>
 # include <cfgmgr32.h>
 # include <tchar.h>
 #endif /* RT_OS_WINDOWS */
@@ -702,7 +702,7 @@ HRESULT Host::getNetworkInterfaces(std::vector<ComPtr<IHostNetworkInterface> > &
 #     ifndef VBOX_WITH_HARDENING
         if (hr != S_OK)
         {
-            /* TODO: try to install the netflt from here */
+            /** @todo try to install the netflt from here */
         }
 #     endif
 
@@ -811,6 +811,7 @@ HRESULT Host::getNetworkInterfaces(std::vector<ComPtr<IHostNetworkInterface> > &
 # endif
 #else
     /* Not implemented / supported on this platform. */
+    RT_NOREF(aNetworkInterfaces);
     ReturnComNotImplemented();
 #endif
 }
@@ -1790,7 +1791,7 @@ HRESULT Host::i_saveSettings(settings::Host &data)
         pFilter->i_saveSettings(f);
         data.llUSBDeviceFilters.push_back(f);
     }
-    
+
     return m->pUSBProxyService->i_saveSettings(data.llUSBDeviceSources);
 #else
     NOREF(data);
diff --git a/src/VBox/Main/src-server/HostNetworkInterfaceImpl.cpp b/src/VBox/Main/src-server/HostNetworkInterfaceImpl.cpp
index 6e321d3..120d1df 100644
--- a/src/VBox/Main/src-server/HostNetworkInterfaceImpl.cpp
+++ b/src/VBox/Main/src-server/HostNetworkInterfaceImpl.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/HostPower.cpp b/src/VBox/Main/src-server/HostPower.cpp
index 1fc5186..589f168 100644
--- a/src/VBox/Main/src-server/HostPower.cpp
+++ b/src/VBox/Main/src-server/HostPower.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/HostUSBDeviceImpl.cpp b/src/VBox/Main/src-server/HostUSBDeviceImpl.cpp
index 573db3c..e6fe8a9 100644
--- a/src/VBox/Main/src-server/HostUSBDeviceImpl.cpp
+++ b/src/VBox/Main/src-server/HostUSBDeviceImpl.cpp
@@ -1787,8 +1787,7 @@ bool HostUSBDevice::i_hasAsyncOperationTimedOut() const
             AssertFailedReturn("BadState");
 
     }
-
-    AssertFailedReturn("shouldn't get here");
+    /* not reached */
 }
 
 /**
diff --git a/src/VBox/Main/src-server/HostVideoInputDeviceImpl.cpp b/src/VBox/Main/src-server/HostVideoInputDeviceImpl.cpp
index 1d84b3d..ef87c76 100644
--- a/src/VBox/Main/src-server/HostVideoInputDeviceImpl.cpp
+++ b/src/VBox/Main/src-server/HostVideoInputDeviceImpl.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -131,49 +131,41 @@ typedef FNVBOXHOSTWEBCAMLIST *PFNVBOXHOSTWEBCAMLIST;
 
 static int loadHostWebcamLibrary(const char *pszPath, RTLDRMOD *phmod, PFNVBOXHOSTWEBCAMLIST *ppfn)
 {
-    int rc = VINF_SUCCESS;
-    RTLDRMOD hmod = NIL_RTLDRMOD;
-
-    RTERRINFOSTATIC ErrInfo;
-    RTErrInfoInitStatic(&ErrInfo);
+    int rc;
     if (RTPathHavePath(pszPath))
-        rc = SUPR3HardenedLdrLoadPlugIn(pszPath, &hmod, &ErrInfo.Core);
-    else
-        rc = VERR_INVALID_PARAMETER;
-    if (RT_SUCCESS(rc))
-    {
-        static const char *pszSymbol = "VBoxHostWebcamList";
-        rc = RTLdrGetSymbol(hmod, pszSymbol, (void **)ppfn);
-
-        if (RT_FAILURE(rc) && rc != VERR_SYMBOL_NOT_FOUND)
-            LogRel(("Resolving symbol '%s': %Rrc\n", pszSymbol, rc));
-    }
-    else
     {
-        LogRel(("Loading the library '%s': %Rrc\n", pszPath, rc));
-        if (RTErrInfoIsSet(&ErrInfo.Core))
-            LogRel(("  %s\n", ErrInfo.Core.pszMsg));
-
-        hmod = NIL_RTLDRMOD;
-    }
-
-    if (RT_SUCCESS(rc))
-    {
-        *phmod = hmod;
+        RTLDRMOD hmod = NIL_RTLDRMOD;
+        RTERRINFOSTATIC ErrInfo;
+        rc = SUPR3HardenedLdrLoadPlugIn(pszPath, &hmod, RTErrInfoInitStatic(&ErrInfo));
+        if (RT_SUCCESS(rc))
+        {
+            static const char s_szSymbol[] = "VBoxHostWebcamList";
+            rc = RTLdrGetSymbol(hmod, s_szSymbol, (void **)ppfn);
+            if (RT_SUCCESS(rc))
+                *phmod = hmod;
+            else
+            {
+                if (rc != VERR_SYMBOL_NOT_FOUND)
+                    LogRel(("Resolving symbol '%s': %Rrc\n", s_szSymbol, rc));
+                RTLdrClose(hmod);
+                hmod = NIL_RTLDRMOD;
+            }
+        }
+        else
+        {
+            LogRel(("Loading the library '%s': %Rrc\n", pszPath, rc));
+            if (RTErrInfoIsSet(&ErrInfo.Core))
+                LogRel(("  %s\n", ErrInfo.Core.pszMsg));
+        }
     }
     else
     {
-        if (hmod != NIL_RTLDRMOD)
-        {
-            RTLdrClose(hmod);
-            hmod = NIL_RTLDRMOD;
-        }
+        LogRel(("Loading the library '%s': No path! Refusing to try loading it!\n", pszPath));
+        rc = VERR_INVALID_PARAMETER;
     }
-
     return rc;
 }
 
-static const Utf8Str strExtPackPuel("Oracle VM VirtualBox Extension Pack");
 
 static HRESULT fillDeviceList(VirtualBox *pVirtualBox, HostVideoInputDeviceList *pList)
 {
@@ -182,7 +174,7 @@ static HRESULT fillDeviceList(VirtualBox *pVirtualBox, HostVideoInputDeviceList
 
 #ifdef VBOX_WITH_EXTPACK
     ExtPackManager *pExtPackMgr = pVirtualBox->i_getExtPackManager();
-    hr = pExtPackMgr->i_getLibraryPathForExtPack("VBoxHostWebcam", &strExtPackPuel, &strLibrary);
+    hr = pExtPackMgr->i_getLibraryPathForExtPack("VBoxHostWebcam", ORACLE_PUEL_EXTPACK_NAME, &strLibrary);
 #else
     hr = E_NOTIMPL;
 #endif
diff --git a/src/VBox/Main/src-server/MachineImpl.cpp b/src/VBox/Main/src-server/MachineImpl.cpp
index 19ec798..094e80d 100644
--- a/src/VBox/Main/src-server/MachineImpl.cpp
+++ b/src/VBox/Main/src-server/MachineImpl.cpp
@@ -756,7 +756,7 @@ HRESULT Machine::i_registeredInit()
         mData->mAccessible = TRUE;
 
         /* commit all changes made during loading the settings file */
-        i_commit(); // @todo r=dj why do we need a commit during init?!? this is very expensive
+        i_commit(); /// @todo r=dj why do we need a commit during init?!? this is very expensive
         /// @todo r=klaus for some reason the settings loading logic backs up
         // the settings, and therefore a commit is needed. Should probably be changed.
     }
@@ -1364,6 +1364,8 @@ HRESULT Machine::getEffectiveParavirtProvider(ParavirtProvider_T *aParavirtProvi
                         *aParavirtProvider = ParavirtProvider_None;
                     break;
                 }
+
+                default: AssertFailedBreak(); /* Shut up MSC. */
             }
             break;
         }
@@ -2603,7 +2605,7 @@ HRESULT Machine::getSnapshotFolder(com::Utf8Str &aSnapshotFolder)
 
 HRESULT Machine::setSnapshotFolder(const com::Utf8Str &aSnapshotFolder)
 {
-    /* @todo (r=dmik):
+    /** @todo (r=dmik):
      *  1. Allow to change the name of the snapshot folder containing snapshots
      *  2. Rename the folder on disk instead of just changing the property
      *     value (to be smart and not to leave garbage). Note that it cannot be
@@ -2736,6 +2738,7 @@ HRESULT Machine::getSettingsFilePath(com::Utf8Str &aSettingsFilePath)
 
 HRESULT Machine::getSettingsAuxFilePath(com::Utf8Str &aSettingsFilePath)
 {
+    RT_NOREF(aSettingsFilePath);
     ReturnComNotImplemented();
 }
 
@@ -3074,7 +3077,7 @@ HRESULT Machine::setFaultToleranceState(FaultToleranceState_T aFaultToleranceSta
 {
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    /* @todo deal with running state change. */
+    /** @todo deal with running state change. */
     HRESULT rc = i_checkStateDependency(MutableOrSavedOrRunningStateDep);
     if (FAILED(rc)) return rc;
 
@@ -3096,7 +3099,7 @@ HRESULT Machine::setFaultToleranceAddress(const com::Utf8Str &aFaultToleranceAdd
 {
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    /* @todo deal with running state change. */
+    /** @todo deal with running state change. */
     HRESULT rc = i_checkStateDependency(MutableOrSavedStateDep);
     if (FAILED(rc)) return rc;
 
@@ -3118,7 +3121,7 @@ HRESULT Machine::setFaultTolerancePort(ULONG aFaultTolerancePort)
 {
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    /* @todo deal with running state change. */
+    /** @todo deal with running state change. */
     HRESULT rc = i_checkStateDependency(MutableOrSavedStateDep);
     if (FAILED(rc)) return rc;
 
@@ -3141,7 +3144,7 @@ HRESULT Machine::setFaultTolerancePassword(const com::Utf8Str &aFaultTolerancePa
 {
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    /* @todo deal with running state change. */
+    /** @todo deal with running state change. */
     HRESULT rc = i_checkStateDependency(MutableOrSavedStateDep);
     if (FAILED(rc)) return rc;
 
@@ -3164,7 +3167,7 @@ HRESULT Machine::setFaultToleranceSyncInterval(ULONG aFaultToleranceSyncInterval
 {
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    /* @todo deal with running state change. */
+    /** @todo deal with running state change. */
     HRESULT rc = i_checkStateDependency(MutableOrSavedStateDep);
     if (FAILED(rc)) return rc;
 
@@ -7125,6 +7128,7 @@ HRESULT Machine::getVMProcessPriority(com::Utf8Str &aVMProcessPriority)
 
 HRESULT Machine::setVMProcessPriority(const com::Utf8Str &aVMProcessPriority)
 {
+    RT_NOREF(aVMProcessPriority);
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     HRESULT hrc = i_checkStateDependency(MutableOrSavedOrRunningStateDep);
     if (SUCCEEDED(hrc))
@@ -7133,12 +7137,14 @@ HRESULT Machine::setVMProcessPriority(const com::Utf8Str &aVMProcessPriority)
          * the code for setting the priority of the process is not there
          * (neither when starting the VM nor at runtime). */
         ReturnComNotImplemented();
+#if 0
         hrc = mUserData.backupEx();
         if (SUCCEEDED(hrc))
         {
             i_setModified(IsModified_MachineData);
             mUserData->s.strVMPriority = aVMProcessPriority;
         }
+#endif
     }
     return hrc;
 }
@@ -10594,7 +10600,7 @@ HRESULT Machine::i_saveStateSettings(int aFlags)
             mData->pMachineConfigFile->timeLastStateChange = mData->mLastStateChange;
 
             mData->pMachineConfigFile->fAborted = (mData->mMachineState == MachineState_Aborted);
-//@todo live migration             mData->pMachineConfigFile->fTeleported = (mData->mMachineState == MachineState_Teleported);
+/// @todo live migration             mData->pMachineConfigFile->fTeleported = (mData->mMachineState == MachineState_Teleported);
         }
 
         mData->pMachineConfigFile->write(mData->m_strConfigFileFull);
@@ -12701,7 +12707,7 @@ void SessionMachine::uninit(Uninit::Reason aReason)
      *  unexpected uninit, just log a warning.
      */
 
-    if ((aReason == Uninit::Unexpected))
+    if (aReason == Uninit::Unexpected)
         Log1WarningThisFunc(("Unexpected SessionMachine uninitialization!\n"));
 
     if (aReason != Uninit::Normal)
diff --git a/src/VBox/Main/src-server/Matching.cpp b/src/VBox/Main/src-server/Matching.cpp
index 7808a21..eb3d26a 100644
--- a/src/VBox/Main/src-server/Matching.cpp
+++ b/src/VBox/Main/src-server/Matching.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/MediumImpl.cpp b/src/VBox/Main/src-server/MediumImpl.cpp
index 5044d47..dd5393b 100644
--- a/src/VBox/Main/src-server/MediumImpl.cpp
+++ b/src/VBox/Main/src-server/MediumImpl.cpp
@@ -23,7 +23,7 @@
 
 #include "AutoCaller.h"
 #include "Logging.h"
-
+#include "ThreadTask.h"
 #include "VBox/com/MultiResult.h"
 #include "VBox/com/ErrorInfo.h"
 
@@ -47,6 +47,12 @@
 
 typedef std::list<Guid> GuidList;
 
+
+#ifdef VBOX_WITH_EXTPACK
+static const char g_szVDPlugin[] = "VDPluginCrypt";
+#endif
+
+
 ////////////////////////////////////////////////////////////////////////////////
 //
 // Medium data definition
@@ -210,11 +216,12 @@ typedef struct VDSOCKETINT
  * @note The constructor of this class adds a caller on the managed Medium
  *       object which is automatically released upon destruction.
  */
-class Medium::Task
+class Medium::Task : public ThreadTask
 {
 public:
     Task(Medium *aMedium, Progress *aProgress)
-        : mVDOperationIfaces(NULL),
+        : ThreadTask("Medium::Task"),
+          mVDOperationIfaces(NULL),
           mMedium(aMedium),
           mMediumCaller(aMedium),
           mThread(NIL_RTTHREAD),
@@ -250,28 +257,65 @@ public:
 
     // Make all destructors virtual. Just in case.
     virtual ~Task()
-    {}
+    {
+        /* send the notification of completion.*/
+        if (!mProgress.isNull())
+            mProgress->i_notifyComplete(mRC);
+    }
 
     HRESULT rc() const { return mRC; }
     bool isOk() const { return SUCCEEDED(rc()); }
 
-    static DECLCALLBACK(int) fntMediumTask(RTTHREAD aThread, void *pvUser);
-
     bool isAsync() { return mThread != NIL_RTTHREAD; }
 
+    const ComPtr<Progress>& GetProgressObject() const {return mProgress;}
+
+    /**
+     * Runs Medium::Task::executeTask() on the current thread
+     * instead of creating a new one.
+     */
+    HRESULT runNow()
+    {
+        LogFlowFuncEnter();
+
+        mRC = executeTask();
+
+        LogFlowFunc(("rc=%Rhrc\n", mRC));
+        LogFlowFuncLeave();
+        return mRC;
+    }
+
+    /**
+     * Implementation code for the "create base" task.
+     * Used as function for execution from a standalone thread.
+     */
+    void handler()
+    {
+        LogFlowFuncEnter();
+        try
+        {
+            mRC = executeTask(); /* (destructor picks up mRC, see above) */
+            LogFlowFunc(("rc=%Rhrc\n", mRC));
+        }
+        catch (...)
+        {
+            LogRel(("Some exception in the function Medium::Task:handler()\n"));
+        }
+
+        LogFlowFuncLeave();
+    }
+
     PVDINTERFACE mVDOperationIfaces;
 
     const ComObjPtr<Medium> mMedium;
     AutoCaller mMediumCaller;
 
-    friend HRESULT Medium::i_runNow(Medium::Task*);
-
 protected:
     HRESULT mRC;
     RTTHREAD mThread;
 
 private:
-    virtual HRESULT handler() = 0;
+    virtual HRESULT executeTask() = 0;
 
     const ComObjPtr<Progress> mProgress;
 
@@ -288,6 +332,11 @@ private:
     AutoCaller mVirtualBoxCaller;
 };
 
+HRESULT Medium::Task::executeTask()
+{
+    return E_NOTIMPL;//ReturnComNotImplemented()
+}
+
 class Medium::CreateBaseTask : public Medium::Task
 {
 public:
@@ -298,13 +347,15 @@ public:
         : Medium::Task(aMedium, aProgress),
           mSize(aSize),
           mVariant(aVariant)
-    {}
+    {
+        m_strTaskName = "createBase";
+    }
 
     uint64_t mSize;
     MediumVariant_T mVariant;
 
 private:
-    virtual HRESULT handler();
+    HRESULT executeTask();
 };
 
 class Medium::CreateDiffTask : public Medium::Task
@@ -327,6 +378,7 @@ public:
         mRC = mTargetCaller.rc();
         if (FAILED(mRC))
             return;
+        m_strTaskName = "createDiff";
     }
 
     ~CreateDiffTask()
@@ -341,8 +393,7 @@ public:
     MediumVariant_T mVariant;
 
 private:
-    virtual HRESULT handler();
-
+    HRESULT executeTask();
     AutoCaller mTargetCaller;
     bool mfKeepMediumLockList;
 };
@@ -384,6 +435,7 @@ public:
             return;
         AssertReturnVoidStmt(aSourceMediumLockList != NULL, mRC = E_FAIL);
         AssertReturnVoidStmt(aTargetMediumLockList != NULL, mRC = E_FAIL);
+        m_strTaskName = "createClone";
     }
 
     ~CloneTask()
@@ -403,8 +455,7 @@ public:
     uint32_t midxDstImageSame;
 
 private:
-    virtual HRESULT handler();
-
+    HRESULT executeTask();
     AutoCaller mTargetCaller;
     AutoCaller mParentCaller;
     bool mfKeepSourceMediumLockList;
@@ -425,6 +476,7 @@ public:
           mfKeepMediumLockList(fKeepMediumLockList)
     {
         AssertReturnVoidStmt(aMediumLockList != NULL, mRC = E_FAIL);
+        m_strTaskName = "createMove";
     }
 
     ~MoveTask()
@@ -437,8 +489,7 @@ public:
     MediumVariant_T mVariant;
 
 private:
-    virtual HRESULT handler();
-
+    HRESULT executeTask();
     bool mfKeepMediumLockList;
 };
 
@@ -454,6 +505,7 @@ public:
           mfKeepMediumLockList(fKeepMediumLockList)
     {
         AssertReturnVoidStmt(aMediumLockList != NULL, mRC = E_FAIL);
+        m_strTaskName = "createCompact";
     }
 
     ~CompactTask()
@@ -465,8 +517,7 @@ public:
     MediumLockList *mpMediumLockList;
 
 private:
-    virtual HRESULT handler();
-
+    HRESULT executeTask();
     bool mfKeepMediumLockList;
 };
 
@@ -484,6 +535,7 @@ public:
           mfKeepMediumLockList(fKeepMediumLockList)
     {
         AssertReturnVoidStmt(aMediumLockList != NULL, mRC = E_FAIL);
+        m_strTaskName = "createResize";
     }
 
     ~ResizeTask()
@@ -496,8 +548,7 @@ public:
     MediumLockList *mpMediumLockList;
 
 private:
-    virtual HRESULT handler();
-
+    HRESULT executeTask();
     bool mfKeepMediumLockList;
 };
 
@@ -511,7 +562,9 @@ public:
         : Medium::Task(aMedium, aProgress),
           mpMediumLockList(aMediumLockList),
           mfKeepMediumLockList(fKeepMediumLockList)
-    {}
+    {
+        m_strTaskName = "createReset";
+    }
 
     ~ResetTask()
     {
@@ -522,8 +575,7 @@ public:
     MediumLockList *mpMediumLockList;
 
 private:
-    virtual HRESULT handler();
-
+    HRESULT executeTask();
     bool mfKeepMediumLockList;
 };
 
@@ -537,7 +589,9 @@ public:
         : Medium::Task(aMedium, aProgress),
           mpMediumLockList(aMediumLockList),
           mfKeepMediumLockList(fKeepMediumLockList)
-    {}
+    {
+        m_strTaskName = "createDelete";
+    }
 
     ~DeleteTask()
     {
@@ -548,8 +602,7 @@ public:
     MediumLockList *mpMediumLockList;
 
 private:
-    virtual HRESULT handler();
-
+    HRESULT executeTask();
     bool mfKeepMediumLockList;
 };
 
@@ -575,6 +628,7 @@ public:
           mfKeepMediumLockList(fKeepMediumLockList)
     {
         AssertReturnVoidStmt(aMediumLockList != NULL, mRC = E_FAIL);
+        m_strTaskName = "createMerge";
     }
 
     ~MergeTask()
@@ -594,8 +648,7 @@ public:
     MediumLockList *mpMediumLockList;
 
 private:
-    virtual HRESULT handler();
-
+    HRESULT executeTask();
     AutoCaller mTargetCaller;
     AutoCaller mParentForTargetCaller;
     bool mfKeepMediumLockList;
@@ -632,6 +685,7 @@ public:
                                      sizeof(VDINTERFACEIO), &mVDImageIfaces);
             AssertRCReturnVoidStmt(vrc, mRC = E_FAIL);
         }
+        m_strTaskName = "createExport";
     }
 
     ~ExportTask()
@@ -648,8 +702,7 @@ public:
     SecretKeyStore *m_pSecretKeyStore;
 
 private:
-    virtual HRESULT handler();
-
+    HRESULT executeTask();
     bool mfKeepSourceMediumLockList;
 };
 
@@ -690,6 +743,7 @@ public:
                              VDINTERFACETYPE_IO, mpVfsIoIf,
                              sizeof(VDINTERFACEIO), &mVDImageIfaces);
         AssertRCReturnVoidStmt(vrc, mRC = E_FAIL);
+        m_strTaskName = "createImport";
     }
 
     ~ImportTask()
@@ -712,8 +766,7 @@ public:
     PVDINTERFACEIO mpVfsIoIf; /**< Pointer to the VFS I/O stream to VD I/O interface wrapper. */
 
 private:
-    virtual HRESULT handler();
-
+    HRESULT executeTask();
     AutoCaller mParentCaller;
     bool mfKeepTargetMediumLockList;
 };
@@ -742,6 +795,7 @@ public:
             return;
 
         mVDImageIfaces = aMedium->m->vdImageIfaces;
+        m_strTaskName = "createEncrypt";
     }
 
     ~EncryptTask()
@@ -764,8 +818,7 @@ public:
     PVDINTERFACE    mVDImageIfaces;
 
 private:
-    virtual HRESULT handler();
-
+    HRESULT executeTask();
     AutoCaller mParentCaller;
 };
 
@@ -804,44 +857,6 @@ struct Medium::CryptoFilterSettings
 };
 
 /**
- * Thread function for time-consuming medium tasks.
- *
- * @param pvUser    Pointer to the Medium::Task instance.
- */
-/* static */
-DECLCALLBACK(int) Medium::Task::fntMediumTask(RTTHREAD aThread, void *pvUser)
-{
-    LogFlowFuncEnter();
-    AssertReturn(pvUser, (int)E_INVALIDARG);
-    Medium::Task *pTask = static_cast<Medium::Task *>(pvUser);
-
-    pTask->mThread = aThread;
-
-    HRESULT rc = pTask->handler();
-
-    /*
-     * save the progress reference if run asynchronously, since we want to
-     * destroy the task before we send out the completion notification.
-     * see @bugref{7763}
-     */
-    ComObjPtr<Progress> pProgress;
-    if (pTask->isAsync())
-        pProgress = pTask->mProgress;
-
-    /* pTask is no longer needed, delete it. */
-    delete pTask;
-
-    /* complete the progress if run asynchronously */
-    if (!pProgress.isNull())
-        pProgress->i_notifyComplete(rc);
-
-    LogFlowFunc(("rc=%Rhrc\n", rc));
-    LogFlowFuncLeave();
-
-    return (int)rc;
-}
-
-/**
  * PFNVDPROGRESS callback handler for Task operations.
  *
  * @param pvUser      Pointer to the Progress instance.
@@ -872,7 +887,7 @@ DECLCALLBACK(int) Medium::Task::vdProgressCall(void *pvUser, unsigned uPercent)
 /**
  * Implementation code for the "create base" task.
  */
-HRESULT Medium::CreateBaseTask::handler()
+HRESULT Medium::CreateBaseTask::executeTask()
 {
     return mMedium->i_taskCreateBaseHandler(*this);
 }
@@ -880,7 +895,7 @@ HRESULT Medium::CreateBaseTask::handler()
 /**
  * Implementation code for the "create diff" task.
  */
-HRESULT Medium::CreateDiffTask::handler()
+HRESULT Medium::CreateDiffTask::executeTask()
 {
     return mMedium->i_taskCreateDiffHandler(*this);
 }
@@ -888,7 +903,7 @@ HRESULT Medium::CreateDiffTask::handler()
 /**
  * Implementation code for the "clone" task.
  */
-HRESULT Medium::CloneTask::handler()
+HRESULT Medium::CloneTask::executeTask()
 {
     return mMedium->i_taskCloneHandler(*this);
 }
@@ -896,7 +911,7 @@ HRESULT Medium::CloneTask::handler()
 /**
  * Implementation code for the "move" task.
  */
-HRESULT Medium::MoveTask::handler()
+HRESULT Medium::MoveTask::executeTask()
 {
     return mMedium->i_taskMoveHandler(*this);
 }
@@ -904,7 +919,7 @@ HRESULT Medium::MoveTask::handler()
 /**
  * Implementation code for the "compact" task.
  */
-HRESULT Medium::CompactTask::handler()
+HRESULT Medium::CompactTask::executeTask()
 {
     return mMedium->i_taskCompactHandler(*this);
 }
@@ -912,7 +927,7 @@ HRESULT Medium::CompactTask::handler()
 /**
  * Implementation code for the "resize" task.
  */
-HRESULT Medium::ResizeTask::handler()
+HRESULT Medium::ResizeTask::executeTask()
 {
     return mMedium->i_taskResizeHandler(*this);
 }
@@ -921,7 +936,7 @@ HRESULT Medium::ResizeTask::handler()
 /**
  * Implementation code for the "reset" task.
  */
-HRESULT Medium::ResetTask::handler()
+HRESULT Medium::ResetTask::executeTask()
 {
     return mMedium->i_taskResetHandler(*this);
 }
@@ -929,7 +944,7 @@ HRESULT Medium::ResetTask::handler()
 /**
  * Implementation code for the "delete" task.
  */
-HRESULT Medium::DeleteTask::handler()
+HRESULT Medium::DeleteTask::executeTask()
 {
     return mMedium->i_taskDeleteHandler(*this);
 }
@@ -937,7 +952,7 @@ HRESULT Medium::DeleteTask::handler()
 /**
  * Implementation code for the "merge" task.
  */
-HRESULT Medium::MergeTask::handler()
+HRESULT Medium::MergeTask::executeTask()
 {
     return mMedium->i_taskMergeHandler(*this);
 }
@@ -945,7 +960,7 @@ HRESULT Medium::MergeTask::handler()
 /**
  * Implementation code for the "export" task.
  */
-HRESULT Medium::ExportTask::handler()
+HRESULT Medium::ExportTask::executeTask()
 {
     return mMedium->i_taskExportHandler(*this);
 }
@@ -953,7 +968,7 @@ HRESULT Medium::ExportTask::handler()
 /**
  * Implementation code for the "import" task.
  */
-HRESULT Medium::ImportTask::handler()
+HRESULT Medium::ImportTask::executeTask()
 {
     return mMedium->i_taskImportHandler(*this);
 }
@@ -961,7 +976,7 @@ HRESULT Medium::ImportTask::handler()
 /**
  * Implementation code for the "encrypt" task.
  */
-HRESULT Medium::EncryptTask::handler()
+HRESULT Medium::EncryptTask::executeTask()
 {
     return mMedium->i_taskEncryptHandler(*this);
 }
@@ -2623,7 +2638,7 @@ HRESULT Medium::createBaseStorage(LONG64 aLogicalSize,
 
     if (SUCCEEDED(rc))
     {
-        rc = i_startThread(pTask);
+        rc = pTask->createThread();
 
         if (SUCCEEDED(rc))
             pProgress.queryInterfaceTo(aProgress.asOutParam());
@@ -2931,7 +2946,7 @@ HRESULT Medium::cloneTo(const ComPtr<IMedium> &aTarget,
 
     if (SUCCEEDED(rc))
     {
-        rc = i_startThread(pTask);
+        rc = pTask->createThread();
 
         if (SUCCEEDED(rc))
             pProgress.queryInterfaceTo(aProgress.asOutParam());
@@ -3171,7 +3186,7 @@ HRESULT Medium::setLocation(const com::Utf8Str &aLocation, ComPtr<IProgress> &aP
 
     if (SUCCEEDED(rc))
     {
-        rc = i_startThread(pTask);
+        rc = pTask->createThread();
 
         if (SUCCEEDED(rc))
             pProgress.queryInterfaceTo(aProgress.asOutParam());
@@ -3243,7 +3258,7 @@ HRESULT Medium::compact(ComPtr<IProgress> &aProgress)
 
     if (SUCCEEDED(rc))
     {
-        rc = i_startThread(pTask);
+        rc = pTask->createThread();
 
         if (SUCCEEDED(rc))
             pProgress.queryInterfaceTo(aProgress.asOutParam());
@@ -3313,7 +3328,7 @@ HRESULT Medium::resize(LONG64 aLogicalSize,
 
     if (SUCCEEDED(rc))
     {
-        rc = i_startThread(pTask);
+        rc = pTask->createThread();
 
         if (SUCCEEDED(rc))
             pProgress.queryInterfaceTo(aProgress.asOutParam());
@@ -3402,7 +3417,7 @@ HRESULT Medium::reset(AutoCaller &autoCaller, ComPtr<IProgress> &aProgress)
 
     if (SUCCEEDED(rc))
     {
-        rc = i_startThread(pTask);
+        rc = pTask->createThread();
 
         if (SUCCEEDED(rc))
             pProgress.queryInterfaceTo(aProgress.asOutParam());
@@ -3538,7 +3553,7 @@ HRESULT Medium::changeEncryption(const com::Utf8Str &aCurrentPassword, const com
 
     if (SUCCEEDED(rc))
     {
-        rc = i_startThread(pTask);
+        rc = pTask->createThread();
 
         if (SUCCEEDED(rc))
             pProgress.queryInterfaceTo(aProgress.asOutParam());
@@ -3551,6 +3566,9 @@ HRESULT Medium::changeEncryption(const com::Utf8Str &aCurrentPassword, const com
 
 HRESULT Medium::getEncryptionSettings(com::Utf8Str &aCipher, com::Utf8Str &aPasswordId)
 {
+#ifndef VBOX_WITH_EXTPACK
+    RT_NOREF(aCipher, aPasswordId);
+#endif
     HRESULT rc = S_OK;
 
     try
@@ -3564,14 +3582,12 @@ HRESULT Medium::getEncryptionSettings(com::Utf8Str &aCipher, com::Utf8Str &aPass
             throw VBOX_E_NOT_SUPPORTED;
 
 # ifdef VBOX_WITH_EXTPACK
-        static const Utf8Str strExtPackPuel("Oracle VM VirtualBox Extension Pack");
-        static const char *s_pszVDPlugin = "VDPluginCrypt";
         ExtPackManager *pExtPackManager = m->pVirtualBox->i_getExtPackManager();
-        if (pExtPackManager->i_isExtPackUsable(strExtPackPuel.c_str()))
+        if (pExtPackManager->i_isExtPackUsable(ORACLE_PUEL_EXTPACK_NAME))
         {
             /* Load the plugin */
             Utf8Str strPlugin;
-            rc = pExtPackManager->i_getLibraryPathForExtPack(s_pszVDPlugin, &strExtPackPuel, &strPlugin);
+            rc = pExtPackManager->i_getLibraryPathForExtPack(g_szVDPlugin, ORACLE_PUEL_EXTPACK_NAME, &strPlugin);
             if (SUCCEEDED(rc))
             {
                 int vrc = VDPluginLoadFromFilename(strPlugin.c_str());
@@ -3583,12 +3599,12 @@ HRESULT Medium::getEncryptionSettings(com::Utf8Str &aCipher, com::Utf8Str &aPass
             else
                 throw setError(VBOX_E_NOT_SUPPORTED,
                                tr("Encryption is not supported because the extension pack '%s' is missing the encryption plugin (old extension pack installed?)"),
-                               strExtPackPuel.c_str());
+                               ORACLE_PUEL_EXTPACK_NAME);
         }
         else
             throw setError(VBOX_E_NOT_SUPPORTED,
                            tr("Encryption is not supported because the extension pack '%s' is missing"),
-                           strExtPackPuel.c_str());
+                           ORACLE_PUEL_EXTPACK_NAME);
 
         PVBOXHDD pDisk = NULL;
         int vrc = VDCreate(m->vdDiskIfaces, i_convertDeviceType(), &pDisk);
@@ -3642,14 +3658,12 @@ HRESULT Medium::checkEncryptionPassword(const com::Utf8Str &aPassword)
                            tr("The given password must not be empty"));
 
 # ifdef VBOX_WITH_EXTPACK
-        static const Utf8Str strExtPackPuel("Oracle VM VirtualBox Extension Pack");
-        static const char *s_pszVDPlugin = "VDPluginCrypt";
         ExtPackManager *pExtPackManager = m->pVirtualBox->i_getExtPackManager();
-        if (pExtPackManager->i_isExtPackUsable(strExtPackPuel.c_str()))
+        if (pExtPackManager->i_isExtPackUsable(ORACLE_PUEL_EXTPACK_NAME))
         {
             /* Load the plugin */
             Utf8Str strPlugin;
-            rc = pExtPackManager->i_getLibraryPathForExtPack(s_pszVDPlugin, &strExtPackPuel, &strPlugin);
+            rc = pExtPackManager->i_getLibraryPathForExtPack(g_szVDPlugin, ORACLE_PUEL_EXTPACK_NAME, &strPlugin);
             if (SUCCEEDED(rc))
             {
                 int vrc = VDPluginLoadFromFilename(strPlugin.c_str());
@@ -3661,12 +3675,12 @@ HRESULT Medium::checkEncryptionPassword(const com::Utf8Str &aPassword)
             else
                 throw setError(VBOX_E_NOT_SUPPORTED,
                                tr("Encryption is not supported because the extension pack '%s' is missing the encryption plugin (old extension pack installed?)"),
-                               strExtPackPuel.c_str());
+                               ORACLE_PUEL_EXTPACK_NAME);
         }
         else
             throw setError(VBOX_E_NOT_SUPPORTED,
                            tr("Encryption is not supported because the extension pack '%s' is missing"),
-                           strExtPackPuel.c_str());
+                           ORACLE_PUEL_EXTPACK_NAME);
 
         PVBOXHDD pDisk = NULL;
         int vrc = VDCreate(m->vdDiskIfaces, i_convertDeviceType(), &pDisk);
@@ -3935,7 +3949,7 @@ bool Medium::i_removeRegistry(const Guid &id)
 
     bool fRemove = false;
 
-    // @todo r=klaus eliminate this code, replace it by using find.
+    /// @todo r=klaus eliminate this code, replace it by using find.
     for (GuidList::iterator it = m->llRegistryIDs.begin();
          it != m->llRegistryIDs.end();
          ++it)
@@ -3991,7 +4005,7 @@ bool Medium::i_removeRegistryRecursive(const Guid &id)
  */
 bool Medium::i_isInRegistry(const Guid &id)
 {
-    // @todo r=klaus eliminate this code, replace it by using find.
+    /// @todo r=klaus eliminate this code, replace it by using find.
     for (GuidList::const_iterator it = m->llRegistryIDs.begin();
          it != m->llRegistryIDs.end();
          ++it)
@@ -4817,9 +4831,13 @@ HRESULT Medium::i_createDiffStorage(ComObjPtr<Medium> &aTarget,
     if (SUCCEEDED(rc))
     {
         if (aWait)
-            rc = i_runNow(pTask);
+        {
+            rc = pTask->runNow();
+
+            delete pTask;
+        }
         else
-            rc = i_startThread(pTask);
+            rc = pTask->createThread();
 
         if (SUCCEEDED(rc) && aProgress != NULL)
             *aProgress = pProgress;
@@ -5148,9 +5166,13 @@ HRESULT Medium::i_deleteStorage(ComObjPtr<Progress> *aProgress,
     if (SUCCEEDED(rc))
     {
         if (aWait)
-            rc = i_runNow(pTask);
+        {
+            rc = pTask->runNow();
+
+            delete pTask;
+        }
         else
-            rc = i_startThread(pTask);
+            rc = pTask->createThread();
 
         if (SUCCEEDED(rc) && aProgress != NULL)
             *aProgress = pProgress;
@@ -5831,9 +5853,13 @@ HRESULT Medium::i_mergeTo(const ComObjPtr<Medium> &pTarget,
     if (SUCCEEDED(rc))
     {
         if (aWait)
-            rc = i_runNow(pTask);
+        {
+            rc = pTask->runNow();
+
+            delete pTask;
+        }
         else
-            rc = i_startThread(pTask);
+            rc = pTask->createThread();
 
         if (SUCCEEDED(rc) && aProgress != NULL)
             *aProgress = pProgress;
@@ -6062,7 +6088,7 @@ HRESULT Medium::i_exportFile(const char *aFilename,
     catch (HRESULT aRC) { rc = aRC; }
 
     if (SUCCEEDED(rc))
-        rc = i_startThread(pTask);
+        rc = pTask->createThread();
     else if (pTask != NULL)
         delete pTask;
 
@@ -6160,7 +6186,7 @@ HRESULT Medium::i_importFile(const char *aFilename,
     catch (HRESULT aRC) { rc = aRC; }
 
     if (SUCCEEDED(rc))
-        rc = i_startThread(pTask);
+        rc = pTask->createThread();
     else if (pTask != NULL)
         delete pTask;
 
@@ -6305,7 +6331,7 @@ HRESULT Medium::i_cloneToEx(const ComObjPtr<Medium> &aTarget, ULONG aVariant,
 
     if (SUCCEEDED(rc))
     {
-        rc = i_startThread(pTask);
+        rc = pTask->createThread();
 
         if (SUCCEEDED(rc))
             pProgress.queryInterfaceTo(aProgress);
@@ -6396,6 +6422,7 @@ HRESULT Medium::i_preparationForMoving(const Utf8Str &aLocation)
  */
 bool Medium::i_isMoveOperation(const ComObjPtr<Medium> &aTarget) const
 {
+    RT_NOREF(aTarget);
     return (m->fMoveThisMedium == true) ? true:false;
 }
 
@@ -7764,66 +7791,6 @@ DECLCALLBACK(int) Medium::i_vdCryptoKeyStoreReturnParameters(void *pvUser, const
 }
 
 /**
- * Starts a new thread driven by the appropriate Medium::Task::handler() method.
- *
- * @note When the task is executed by this method, IProgress::notifyComplete()
- *       is automatically called for the progress object associated with this
- *       task when the task is finished to signal the operation completion for
- *       other threads asynchronously waiting for it.
- */
-HRESULT Medium::i_startThread(Medium::Task *pTask)
-{
-#ifdef VBOX_WITH_MAIN_LOCK_VALIDATION
-    /* Extreme paranoia: The calling thread should not hold the medium
-     * tree lock or any medium lock. Since there is no separate lock class
-     * for medium objects be even more strict: no other object locks. */
-    Assert(!AutoLockHoldsLocksInClass(LOCKCLASS_LISTOFMEDIA));
-    Assert(!AutoLockHoldsLocksInClass(getLockingClass()));
-#endif
-
-    /// @todo use a more descriptive task name
-    int vrc = RTThreadCreate(NULL, Medium::Task::fntMediumTask, pTask,
-                             0, RTTHREADTYPE_MAIN_HEAVY_WORKER, 0,
-                             "Medium::Task");
-    if (RT_FAILURE(vrc))
-    {
-        delete pTask;
-        return setError(E_FAIL, "Could not create Medium::Task thread (%Rrc)\n",  vrc);
-    }
-
-    return S_OK;
-}
-
-/**
- * Runs Medium::Task::handler() on the current thread instead of creating
- * a new one.
- *
- * This call implies that it is made on another temporary thread created for
- * some asynchronous task. Avoid calling it from a normal thread since the task
- * operations are potentially lengthy and will block the calling thread in this
- * case.
- *
- * @note When the task is executed by this method, IProgress::notifyComplete()
- *       is not called for the progress object associated with this task when
- *       the task is finished. Instead, the result of the operation is returned
- *       by this method directly and it's the caller's responsibility to
- *       complete the progress object in this case.
- */
-HRESULT Medium::i_runNow(Medium::Task *pTask)
-{
-#ifdef VBOX_WITH_MAIN_LOCK_VALIDATION
-    /* Extreme paranoia: The calling thread should not hold the medium
-     * tree lock or any medium lock. Since there is no separate lock class
-     * for medium objects be even more strict: no other object locks. */
-    Assert(!AutoLockHoldsLocksInClass(LOCKCLASS_LISTOFMEDIA));
-    Assert(!AutoLockHoldsLocksInClass(getLockingClass()));
-#endif
-
-    /* NIL_RTTHREAD indicates synchronous call. */
-    return (HRESULT)Medium::Task::fntMediumTask(NIL_RTTHREAD, pTask);
-}
-
-/**
  * Implementation code for the "create base" task.
  *
  * This only gets started from Medium::CreateBaseStorage() and always runs
@@ -9452,14 +9419,12 @@ HRESULT Medium::i_taskExportHandler(Medium::ExportTask &task)
                 settings::StringsMap::iterator itKeyId = pBase->m->mapProperties.find("CRYPT/KeyId");
 
 #ifdef VBOX_WITH_EXTPACK
-                static const Utf8Str strExtPackPuel("Oracle VM VirtualBox Extension Pack");
-                static const char *s_pszVDPlugin = "VDPluginCrypt";
                 ExtPackManager *pExtPackManager = m->pVirtualBox->i_getExtPackManager();
-                if (pExtPackManager->i_isExtPackUsable(strExtPackPuel.c_str()))
+                if (pExtPackManager->i_isExtPackUsable(ORACLE_PUEL_EXTPACK_NAME))
                 {
                     /* Load the plugin */
                     Utf8Str strPlugin;
-                    rc = pExtPackManager->i_getLibraryPathForExtPack(s_pszVDPlugin, &strExtPackPuel, &strPlugin);
+                    rc = pExtPackManager->i_getLibraryPathForExtPack(g_szVDPlugin, ORACLE_PUEL_EXTPACK_NAME, &strPlugin);
                     if (SUCCEEDED(rc))
                     {
                         vrc = VDPluginLoadFromFilename(strPlugin.c_str());
@@ -9471,12 +9436,12 @@ HRESULT Medium::i_taskExportHandler(Medium::ExportTask &task)
                     else
                         throw setError(VBOX_E_NOT_SUPPORTED,
                                        tr("Encryption is not supported because the extension pack '%s' is missing the encryption plugin (old extension pack installed?)"),
-                                       strExtPackPuel.c_str());
+                                       ORACLE_PUEL_EXTPACK_NAME);
                 }
                 else
                     throw setError(VBOX_E_NOT_SUPPORTED,
                                    tr("Encryption is not supported because the extension pack '%s' is missing"),
-                                   strExtPackPuel.c_str());
+                                   ORACLE_PUEL_EXTPACK_NAME);
 #else
                 throw setError(VBOX_E_NOT_SUPPORTED,
                                tr("Encryption is not supported because extension pack support is not built in"));
@@ -9923,6 +9888,9 @@ void Medium::i_taskEncryptSettingsSetup(CryptoFilterSettings *pSettings, const c
  */
 HRESULT Medium::i_taskEncryptHandler(Medium::EncryptTask &task)
 {
+# ifndef VBOX_WITH_EXTPACK
+    RT_NOREF(task);
+# endif
     HRESULT rc = S_OK;
 
     /* Lock all in {parent,child} order. The lock is also used as a
@@ -9934,14 +9902,12 @@ HRESULT Medium::i_taskEncryptHandler(Medium::EncryptTask &task)
     try
     {
 # ifdef VBOX_WITH_EXTPACK
-        static const Utf8Str strExtPackPuel("Oracle VM VirtualBox Extension Pack");
-        static const char *s_pszVDPlugin = "VDPluginCrypt";
         ExtPackManager *pExtPackManager = m->pVirtualBox->i_getExtPackManager();
-        if (pExtPackManager->i_isExtPackUsable(strExtPackPuel.c_str()))
+        if (pExtPackManager->i_isExtPackUsable(ORACLE_PUEL_EXTPACK_NAME))
         {
             /* Load the plugin */
             Utf8Str strPlugin;
-            rc = pExtPackManager->i_getLibraryPathForExtPack(s_pszVDPlugin, &strExtPackPuel, &strPlugin);
+            rc = pExtPackManager->i_getLibraryPathForExtPack(g_szVDPlugin, ORACLE_PUEL_EXTPACK_NAME, &strPlugin);
             if (SUCCEEDED(rc))
             {
                 int vrc = VDPluginLoadFromFilename(strPlugin.c_str());
@@ -9953,12 +9919,12 @@ HRESULT Medium::i_taskEncryptHandler(Medium::EncryptTask &task)
             else
                 throw setError(VBOX_E_NOT_SUPPORTED,
                                tr("Encryption is not supported because the extension pack '%s' is missing the encryption plugin (old extension pack installed?)"),
-                               strExtPackPuel.c_str());
+                               ORACLE_PUEL_EXTPACK_NAME);
         }
         else
             throw setError(VBOX_E_NOT_SUPPORTED,
                            tr("Encryption is not supported because the extension pack '%s' is missing"),
-                           strExtPackPuel.c_str());
+                           ORACLE_PUEL_EXTPACK_NAME);
 
         PVBOXHDD pDisk = NULL;
         int vrc = VDCreate(m->vdDiskIfaces, i_convertDeviceType(), &pDisk);
diff --git a/src/VBox/Main/src-server/MediumLock.cpp b/src/VBox/Main/src-server/MediumLock.cpp
index 0643108..bdf553b 100644
--- a/src/VBox/Main/src-server/MediumLock.cpp
+++ b/src/VBox/Main/src-server/MediumLock.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2010-2013 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/NetworkAdapterImpl.cpp b/src/VBox/Main/src-server/NetworkAdapterImpl.cpp
index 1e86b09..0d3b58b 100644
--- a/src/VBox/Main/src-server/NetworkAdapterImpl.cpp
+++ b/src/VBox/Main/src-server/NetworkAdapterImpl.cpp
@@ -1295,7 +1295,7 @@ HRESULT NetworkAdapter::setBandwidthGroup(const ComPtr<IBandwidthGroup> &aBandwi
         mParent->i_setModified(Machine::IsModified_NetworkAdapters);
         mlock.release();
 
-        /* TODO: changeAdapter=???. */
+        /** @todo changeAdapter=???. */
         mParent->i_onNetworkAdapterChange(this, FALSE);
     }
 
diff --git a/src/VBox/Main/src-server/NetworkServiceRunner.cpp b/src/VBox/Main/src-server/NetworkServiceRunner.cpp
index bea3b50..1e38d99 100644
--- a/src/VBox/Main/src-server/NetworkServiceRunner.cpp
+++ b/src/VBox/Main/src-server/NetworkServiceRunner.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/Performance.cpp b/src/VBox/Main/src-server/Performance.cpp
index 68cee35..be4be96 100644
--- a/src/VBox/Main/src-server/Performance.cpp
+++ b/src/VBox/Main/src-server/Performance.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -247,7 +247,7 @@ int CollectorGuest::enableVMMStats(bool mCollectVMMStats)
 
     if (mGuest)
     {
-        /* @todo: replace this with a direct call to mGuest in trunk! */
+        /** @todo replace this with a direct call to mGuest in trunk! */
         AutoCaller autoCaller(mMachine);
         if (FAILED(autoCaller.rc())) return autoCaller.rc();
 
@@ -1459,7 +1459,7 @@ bool Filter::patternMatch(const char *pszPat, const char *pszName,
         pszName++;
         pszPat++;
     }
-    return true;
+    /* not reached */
 }
 
 bool Filter::match(const ComPtr<IUnknown> object, const RTCString &name) const
diff --git a/src/VBox/Main/src-server/PerformanceImpl.cpp b/src/VBox/Main/src-server/PerformanceImpl.cpp
index e527a6c..b35c62f 100644
--- a/src/VBox/Main/src-server/PerformanceImpl.cpp
+++ b/src/VBox/Main/src-server/PerformanceImpl.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -186,7 +186,7 @@ HRESULT PerformanceCollector::init()
     m.gm = new pm::CollectorGuestManager;
 
     /* Let the sampler know it gets a valid collector.  */
-    mMagic = MAGIC;
+    mMagic = PERFORMANCE_METRIC_MAGIC;
 
     /* Start resource usage sampler */
     int vrc = RTTimerLRCreate(&m.sampler, VBOX_USAGE_SAMPLER_MIN_INTERVAL,
@@ -498,7 +498,7 @@ HRESULT PerformanceCollector::queryMetricsData(const std::vector<com::Utf8Str> &
     for (it = filteredMetrics.begin(); it != filteredMetrics.end(); ++it, ++i)
     {
         ULONG *values, length, sequenceNumber;
-        /* @todo We may want to revise the query method to get rid of excessive alloc/memcpy calls. */
+        /** @todo We may want to revise the query method to get rid of excessive alloc/memcpy calls. */
         (*it)->query(&values, &length, &sequenceNumber);
         LogFlow(("PerformanceCollector::QueryMetricsData() querying metric %s returned %d values.\n",
                  (*it)->getName(), length));
@@ -639,8 +639,8 @@ DECLCALLBACK(void) PerformanceCollector::staticSamplerCallback(RTTIMERLR hTimerL
 {
     AssertReturnVoid(pvUser != NULL);
     PerformanceCollector *collector = static_cast <PerformanceCollector *> (pvUser);
-    Assert(collector->mMagic == MAGIC);
-    if (collector->mMagic == MAGIC)
+    Assert(collector->mMagic == PERFORMANCE_METRIC_MAGIC);
+    if (collector->mMagic == PERFORMANCE_METRIC_MAGIC)
         collector->samplerCallback(iTick);
 
     NOREF(hTimerLR);
diff --git a/src/VBox/Main/src-server/ProgressProxyImpl.cpp b/src/VBox/Main/src-server/ProgressProxyImpl.cpp
index 404e89f..f1c5350 100644
--- a/src/VBox/Main/src-server/ProgressProxyImpl.cpp
+++ b/src/VBox/Main/src-server/ProgressProxyImpl.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/SnapshotImpl.cpp b/src/VBox/Main/src-server/SnapshotImpl.cpp
index 5f029b5..364644b 100644
--- a/src/VBox/Main/src-server/SnapshotImpl.cpp
+++ b/src/VBox/Main/src-server/SnapshotImpl.cpp
@@ -24,7 +24,7 @@
 #include "Global.h"
 #include "ProgressImpl.h"
 
-// @todo these three includes are required for about one or two lines, try
+/// @todo these three includes are required for about one or two lines, try
 // to remove them and put that code in shared code in MachineImplcpp
 #include "SharedFolderImpl.h"
 #include "USBControllerImpl.h"
@@ -1561,7 +1561,7 @@ void SessionMachine::i_takeSnapshotHandler(TakeSnapshotTask &task)
 
     try
     {
-        // @todo: at this point we have to be in the right state!!!!
+        /// @todo at this point we have to be in the right state!!!!
         AssertStmt(   mData->mMachineState == MachineState_Snapshotting
                    || mData->mMachineState == MachineState_OnlineSnapshotting
                    || mData->mMachineState == MachineState_LiveSnapshotting, throw E_FAIL);
@@ -1709,7 +1709,7 @@ void SessionMachine::i_takeSnapshotHandler(TakeSnapshotTask &task)
         rc = rcThrown;
         LogThisFunc(("Caught %Rhrc [mMachineState=%s]\n", rc, Global::stringifyMachineState(mData->mMachineState)));
 
-        // @todo r=klaus check that the implicit diffs created above are cleaned up im the relevant error cases
+        /// @todo r=klaus check that the implicit diffs created above are cleaned up im the relevant error cases
 
         /* preserve existing error info */
         ErrorInfoKeeper eik;
diff --git a/src/VBox/Main/src-server/StorageControllerImpl.cpp b/src/VBox/Main/src-server/StorageControllerImpl.cpp
index aa887fa..98a1313 100644
--- a/src/VBox/Main/src-server/StorageControllerImpl.cpp
+++ b/src/VBox/Main/src-server/StorageControllerImpl.cpp
@@ -160,6 +160,7 @@ HRESULT StorageController::init(Machine *aParent,
             m->bd->ulPortCount = 1;
             m->bd->controllerType = StorageControllerType_NVMe;
             break;
+        case StorageBus_Null: break; /* Shut up MSC. */
     }
 
     /* Confirm a successful initialization */
diff --git a/src/VBox/Main/src-server/SystemPropertiesImpl.cpp b/src/VBox/Main/src-server/SystemPropertiesImpl.cpp
index 0aa8b0b..dff8e2a 100644
--- a/src/VBox/Main/src-server/SystemPropertiesImpl.cpp
+++ b/src/VBox/Main/src-server/SystemPropertiesImpl.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -947,9 +947,10 @@ HRESULT SystemProperties::getDefaultAdditionsISO(com::Utf8Str &aDefaultAdditions
 
 HRESULT SystemProperties::setDefaultAdditionsISO(const com::Utf8Str &aDefaultAdditionsISO)
 {
+    RT_NOREF(aDefaultAdditionsISO);
     /** @todo not yet implemented, settings handling is missing */
     ReturnComNotImplemented();
-
+#if 0 /* not implemented */
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     HRESULT rc = i_setDefaultAdditionsISO(aDefaultAdditionsISO);
     alock.release();
@@ -962,6 +963,7 @@ HRESULT SystemProperties::setDefaultAdditionsISO(const com::Utf8Str &aDefaultAdd
     }
 
     return rc;
+#endif
 }
 
 HRESULT SystemProperties::getDefaultFrontend(com::Utf8Str &aDefaultFrontend)
diff --git a/src/VBox/Main/src-server/TokenImpl.cpp b/src/VBox/Main/src-server/TokenImpl.cpp
index a55820f..b126ab2 100644
--- a/src/VBox/Main/src-server/TokenImpl.cpp
+++ b/src/VBox/Main/src-server/TokenImpl.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/USBDeviceFilterImpl.cpp b/src/VBox/Main/src-server/USBDeviceFilterImpl.cpp
index 444bdb9..f4cb432 100644
--- a/src/VBox/Main/src-server/USBDeviceFilterImpl.cpp
+++ b/src/VBox/Main/src-server/USBDeviceFilterImpl.cpp
@@ -40,7 +40,7 @@
  *  @param  aIdx        The field index.
  *  @param  aStr        The output string.
  */
-static void i_usbFilterFieldToString(PCUSBFILTER aFilter, USBFILTERIDX aIdx, Utf8Str &out)
+static void i_usbFilterFieldToString(PCUSBFILTER aFilter, USBFILTERIDX aIdx, Utf8Str &rstrOut)
 {
     const USBFILTERMATCH matchingMethod = USBFilterGetMatchingMethod(aFilter, aIdx);
     Assert(matchingMethod != USBFILTERMATCH_INVALID);
@@ -50,14 +50,12 @@ static void i_usbFilterFieldToString(PCUSBFILTER aFilter, USBFILTERIDX aIdx, Utf
         int value = USBFilterGetNum(aFilter, aIdx);
         Assert(value >= 0 && value <= 0xffff);
 
-        out = Utf8StrFmt("%04RX16", (uint16_t)value);
+        rstrOut = Utf8StrFmt("%04RX16", (uint16_t)value);
     }
     else if (USBFilterIsMethodString(matchingMethod))
-    {
-        out = USBFilterGetString(aFilter, aIdx);
-    }
+        rstrOut = USBFilterGetString(aFilter, aIdx);
     else
-        out.setNull();
+        rstrOut.setNull();
 }
 
 /*static*/
@@ -65,16 +63,16 @@ const char* USBDeviceFilter::i_describeUSBFilterIdx(USBFILTERIDX aIdx)
 {
     switch (aIdx)
     {
-        case USBFILTERIDX_VENDOR_ID: return tr("Vendor ID");
-        case USBFILTERIDX_PRODUCT_ID: return tr("Product ID");
-        case USBFILTERIDX_DEVICE: return tr("Revision");
-        case USBFILTERIDX_MANUFACTURER_STR: return tr("Manufacturer");
-        case USBFILTERIDX_PRODUCT_STR: return tr("Product");
-        case USBFILTERIDX_SERIAL_NUMBER_STR: return tr("Serial number");
-        case USBFILTERIDX_PORT: return tr("Port number");
-        default: return "";
+        case USBFILTERIDX_VENDOR_ID:            return tr("Vendor ID");
+        case USBFILTERIDX_PRODUCT_ID:           return tr("Product ID");
+        case USBFILTERIDX_DEVICE:               return tr("Revision");
+        case USBFILTERIDX_MANUFACTURER_STR:     return tr("Manufacturer");
+        case USBFILTERIDX_PRODUCT_STR:          return tr("Product");
+        case USBFILTERIDX_SERIAL_NUMBER_STR:    return tr("Serial number");
+        case USBFILTERIDX_PORT:                 return tr("Port number");
+        default:                                return "";
     }
-    return "";
+    /* not reached. */
 }
 
 /**
diff --git a/src/VBox/Main/src-server/USBProxyBackend.cpp b/src/VBox/Main/src-server/USBProxyBackend.cpp
index 08f4876..a9ce0c3 100644
--- a/src/VBox/Main/src-server/USBProxyBackend.cpp
+++ b/src/VBox/Main/src-server/USBProxyBackend.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/VFSExplorerImpl.cpp b/src/VBox/Main/src-server/VFSExplorerImpl.cpp
index 2c021b2..df43d6d 100644
--- a/src/VBox/Main/src-server/VFSExplorerImpl.cpp
+++ b/src/VBox/Main/src-server/VFSExplorerImpl.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2013 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -159,56 +159,50 @@ public:
     };
 
     TaskVFSExplorer(TaskType aTaskType, VFSExplorer *aThat, Progress *aProgress)
-        : taskType(aTaskType),
-          pVFSExplorer(aThat),
-          progress(aProgress),
-          rc(S_OK)
+        : m_taskType(aTaskType),
+          m_pVFSExplorer(aThat),
+          m_ptrProgress(aProgress),
+          m_rc(S_OK)
     {
         m_strTaskName = "Explorer::Task";
     }
     ~TaskVFSExplorer() {}
 
 private:
-    void handler()
-    {
-        int vrc = taskThread(NULL, this);
-        NOREF(vrc);
-    }
+    void handler();
 
-    static DECLCALLBACK(int) taskThread(RTTHREAD aThread, void *pvUser);
+#if 0 /* unused */
     static DECLCALLBACK(int) uploadProgress(unsigned uPercent, void *pvUser);
+#endif
 
-    TaskType taskType;
-    VFSExplorer *pVFSExplorer;
+    TaskType m_taskType;
+    VFSExplorer *m_pVFSExplorer;
 
-    ComObjPtr<Progress> progress;
-    HRESULT rc;
+    ComObjPtr<Progress> m_ptrProgress;
+    HRESULT m_rc;
 
     /* task data */
-    std::list<Utf8Str> filenames;
+    std::list<Utf8Str> m_lstFilenames;
 
     friend class VFSExplorer;
 };
 
 /* static */
-DECLCALLBACK(int) VFSExplorer::TaskVFSExplorer::taskThread(RTTHREAD /* aThread */, void *pvUser)
+void VFSExplorer::TaskVFSExplorer::handler()
 {
-    TaskVFSExplorer* pTask = static_cast<TaskVFSExplorer*>(pvUser);
-    AssertReturn(pTask, VERR_GENERAL_FAILURE);
-
-    VFSExplorer *pVFSExplorer = pTask->pVFSExplorer;
+    VFSExplorer *pVFSExplorer = this->m_pVFSExplorer;
 
     LogFlowFuncEnter();
     LogFlowFunc(("VFSExplorer %p\n", pVFSExplorer));
 
     HRESULT rc = S_OK;
 
-    switch(pTask->taskType)
+    switch (this->m_taskType)
     {
         case TaskVFSExplorer::Update:
         {
             if (pVFSExplorer->m->storageType == VFSType_File)
-                rc = pVFSExplorer->i_updateFS(pTask);
+                rc = pVFSExplorer->i_updateFS(this);
             else if (pVFSExplorer->m->storageType == VFSType_S3)
                 rc = VERR_NOT_IMPLEMENTED;
             break;
@@ -216,38 +210,38 @@ DECLCALLBACK(int) VFSExplorer::TaskVFSExplorer::taskThread(RTTHREAD /* aThread *
         case TaskVFSExplorer::Delete:
         {
             if (pVFSExplorer->m->storageType == VFSType_File)
-                rc = pVFSExplorer->i_deleteFS(pTask);
+                rc = pVFSExplorer->i_deleteFS(this);
             else if (pVFSExplorer->m->storageType == VFSType_S3)
                 rc = VERR_NOT_IMPLEMENTED;
             break;
         }
         default:
-            AssertMsgFailed(("Invalid task type %u specified!\n", pTask->taskType));
+            AssertMsgFailed(("Invalid task type %u specified!\n", this->m_taskType));
             break;
     }
 
     LogFlowFunc(("rc=%Rhrc\n", rc)); NOREF(rc);
     LogFlowFuncLeave();
-
-    return VINF_SUCCESS;
 }
 
+#if 0 /* unused */
 /* static */
 DECLCALLBACK(int) VFSExplorer::TaskVFSExplorer::uploadProgress(unsigned uPercent, void *pvUser)
 {
     VFSExplorer::TaskVFSExplorer* pTask = *(VFSExplorer::TaskVFSExplorer**)pvUser;
 
     if (pTask &&
-        !pTask->progress.isNull())
+        !pTask->m_ptrProgress.isNull())
     {
         BOOL fCanceled;
-        pTask->progress->COMGETTER(Canceled)(&fCanceled);
+        pTask->m_ptrProgress->COMGETTER(Canceled)(&fCanceled);
         if (fCanceled)
             return -1;
-        pTask->progress->SetCurrentOperationProgress(uPercent);
+        pTask->m_ptrProgress->SetCurrentOperationProgress(uPercent);
     }
     return VINF_SUCCESS;
 }
+#endif
 
 FsObjType_T VFSExplorer::i_iprtToVfsObjType(RTFMODE aType) const
 {
@@ -293,8 +287,8 @@ HRESULT VFSExplorer::i_updateFS(TaskVFSExplorer *aTask)
         if (RT_FAILURE(vrc))
             throw setError(VBOX_E_FILE_ERROR, tr ("Can't open directory '%s' (%Rrc)"), pszPath, vrc);
 
-        if (aTask->progress)
-            aTask->progress->SetCurrentOperationProgress(33);
+        if (aTask->m_ptrProgress)
+            aTask->m_ptrProgress->SetCurrentOperationProgress(33);
         RTDIRENTRYEX entry;
         while (RT_SUCCESS(vrc))
         {
@@ -309,8 +303,8 @@ HRESULT VFSExplorer::i_updateFS(TaskVFSExplorer *aTask)
                                        entry.Info.Attr.fMode & (RTFS_UNIX_IRWXU | RTFS_UNIX_IRWXG | RTFS_UNIX_IRWXO)));
             }
         }
-        if (aTask->progress)
-            aTask->progress->SetCurrentOperationProgress(66);
+        if (aTask->m_ptrProgress)
+            aTask->m_ptrProgress->SetCurrentOperationProgress(66);
     }
     catch(HRESULT aRC)
     {
@@ -323,17 +317,17 @@ HRESULT VFSExplorer::i_updateFS(TaskVFSExplorer *aTask)
     if (pDir)
         RTDirClose(pDir);
 
-    if (aTask->progress)
-        aTask->progress->SetCurrentOperationProgress(99);
+    if (aTask->m_ptrProgress)
+        aTask->m_ptrProgress->SetCurrentOperationProgress(99);
 
     /* Assign the result on success (this clears the old list) */
     if (rc == S_OK)
         m->entryList.assign(fileList.begin(), fileList.end());
 
-    aTask->rc = rc;
+    aTask->m_rc = rc;
 
-    if (!aTask->progress.isNull())
-        aTask->progress->i_notifyComplete(rc);
+    if (!aTask->m_ptrProgress.isNull())
+        aTask->m_ptrProgress->i_notifyComplete(rc);
 
     LogFlowFunc(("rc=%Rhrc\n", rc));
     LogFlowFuncLeave();
@@ -352,14 +346,14 @@ HRESULT VFSExplorer::i_deleteFS(TaskVFSExplorer *aTask)
 
     HRESULT rc = S_OK;
 
-    float fPercentStep = 100.0f / (float)aTask->filenames.size();
+    float fPercentStep = 100.0f / (float)aTask->m_lstFilenames.size();
     try
     {
         char szPath[RTPATH_MAX];
         std::list<Utf8Str>::const_iterator it;
         size_t i = 0;
-        for (it = aTask->filenames.begin();
-             it != aTask->filenames.end();
+        for (it = aTask->m_lstFilenames.begin();
+             it != aTask->m_lstFilenames.end();
              ++it, ++i)
         {
             int vrc = RTPathJoin(szPath, sizeof(szPath), m->strPath.c_str(), (*it).c_str());
@@ -368,19 +362,19 @@ HRESULT VFSExplorer::i_deleteFS(TaskVFSExplorer *aTask)
             vrc = RTFileDelete(szPath);
             if (RT_FAILURE(vrc))
                 throw setError(VBOX_E_FILE_ERROR, tr("Can't delete file '%s' (%Rrc)"), szPath, vrc);
-            if (aTask->progress)
-                aTask->progress->SetCurrentOperationProgress((ULONG)(fPercentStep * (float)i));
+            if (aTask->m_ptrProgress)
+                aTask->m_ptrProgress->SetCurrentOperationProgress((ULONG)(fPercentStep * (float)i));
         }
     }
-    catch(HRESULT aRC)
+    catch (HRESULT aRC)
     {
         rc = aRC;
     }
 
-    aTask->rc = rc;
+    aTask->m_rc = rc;
 
-    if (!aTask->progress.isNull())
-        aTask->progress->i_notifyComplete(rc);
+    if (aTask->m_ptrProgress.isNotNull())
+        aTask->m_ptrProgress->i_notifyComplete(rc);
 
     LogFlowFunc(("rc=%Rhrc\n", rc));
     LogFlowFuncLeave();
@@ -412,7 +406,7 @@ HRESULT VFSExplorer::update(ComPtr<IProgress> &aProgress)
         TaskVFSExplorer* pTask = new TaskVFSExplorer(TaskVFSExplorer::Update, this, progress);
 
         //this function delete task in case of exceptions, so there is no need in the call of delete operator
-        rc = pTask->createThread(NULL, RTTHREADTYPE_MAIN_HEAVY_WORKER);
+        rc = pTask->createThreadWithType(RTTHREADTYPE_MAIN_HEAVY_WORKER);
     }
     catch (HRESULT aRC)
     {
@@ -527,10 +521,10 @@ HRESULT VFSExplorer::remove(const std::vector<com::Utf8Str> &aNames,
 
         /* Add all filenames to delete as task data */
         for (size_t i = 0; i < aNames.size(); ++i)
-            pTask->filenames.push_back(aNames[i]);
+            pTask->m_lstFilenames.push_back(aNames[i]);
 
         //this function delete task in case of exceptions, so there is no need in the call of delete operator
-        rc = pTask->createThread(NULL, RTTHREADTYPE_MAIN_HEAVY_WORKER);
+        rc = pTask->createThreadWithType(RTTHREADTYPE_MAIN_HEAVY_WORKER);
     }
     catch (HRESULT aRC)
     {
diff --git a/src/VBox/Main/src-server/VRDEServerImpl.cpp b/src/VBox/Main/src-server/VRDEServerImpl.cpp
index 75a41a1..8a36045 100644
--- a/src/VBox/Main/src-server/VRDEServerImpl.cpp
+++ b/src/VBox/Main/src-server/VRDEServerImpl.cpp
@@ -89,6 +89,8 @@ HRESULT VRDEServer::init(Machine *aParent)
 
     mData.allocate();
 
+    mData->fEnabled = false;
+
     /* Confirm a successful initialization */
     autoInitSpan.setSucceeded();
 
@@ -739,7 +741,7 @@ HRESULT VRDEServer::setAllowMultiConnection(BOOL aAllowMultiConnection)
         mParent->i_setModified(Machine::IsModified_VRDEServer);
         mlock.release();
 
-        mParent->i_onVRDEServerChange(/* aRestart */ TRUE); // @todo does it need a restart?
+        mParent->i_onVRDEServerChange(/* aRestart */ TRUE); /// @todo does it need a restart?
     }
 
     return S_OK;
@@ -774,7 +776,7 @@ HRESULT VRDEServer::setReuseSingleConnection(BOOL aReuseSingleConnection)
         mParent->i_setModified(Machine::IsModified_VRDEServer);
         mlock.release();
 
-        mParent->i_onVRDEServerChange(/* aRestart */ TRUE); // @todo needs a restart?
+        mParent->i_onVRDEServerChange(/* aRestart */ TRUE); /// @todo needs a restart?
     }
 
     return S_OK;
diff --git a/src/VBox/Main/src-server/VirtualBoxImpl.cpp b/src/VBox/Main/src-server/VirtualBoxImpl.cpp
index 3c2f9c8..82c9e65 100644
--- a/src/VBox/Main/src-server/VirtualBoxImpl.cpp
+++ b/src/VBox/Main/src-server/VirtualBoxImpl.cpp
@@ -80,7 +80,6 @@
 
 #ifdef RT_OS_WINDOWS
 # include "win/svchlp.h"
-# include "win/VBoxComEvents.h"
 # include "ThreadTask.h"
 # include "tchar.h"
 #endif
@@ -1300,7 +1299,7 @@ HRESULT VirtualBox::checkFirmwarePresent(FirmwareType_T aFirmwareType,
             break;
         }
 
-        /** @todo: account for version in the URL */
+        /** @todo account for version in the URL */
         aUrl = firmwareDesc[i].url;
         *aResult = FALSE;
 
@@ -1405,25 +1404,39 @@ HRESULT VirtualBox::composeMachineFilename(const com::Utf8Str &aName,
  */
 void sanitiseMachineFilename(Utf8Str &strName)
 {
-    /** Set of characters which should be safe for use in filenames: some basic
+    /* Set of characters which should be safe for use in filenames: some basic
      * ASCII, Unicode from Latin-1 alphabetic to the end of Hangul.  We try to
      * skip anything that could count as a control character in Windows or
      * *nix, or be otherwise difficult for shells to handle (I would have
      * preferred to remove the space and brackets too).  We also remove all
-     * characters which need UTF-16 surrogate pairs for Windows's benefit. */
-    RTUNICP aCpSet[] =
-        { ' ', ' ', '(', ')', '-', '.', '0', '9', 'A', 'Z', 'a', 'z', '_', '_',
-          0xa0, 0xd7af, '\0' };
+     * characters which need UTF-16 surrogate pairs for Windows's benefit.
+     */
+    static RTUNICP const s_uszValidRangePairs[] =
+    {
+        ' ', ' ',
+        '(', ')',
+        '-', '.',
+        '0', '9',
+        'A', 'Z',
+        'a', 'z',
+        '_', '_',
+        0xa0, 0xd7af,
+        '\0'
+    };
+
     char *pszName = strName.mutableRaw();
-    ssize_t cReplacements = RTStrPurgeComplementSet(pszName, aCpSet, '_');
+    ssize_t cReplacements = RTStrPurgeComplementSet(pszName, s_uszValidRangePairs, '_');
     Assert(cReplacements >= 0);
     NOREF(cReplacements);
+
     /* No leading dot or dash. */
     if (pszName[0] == '.' || pszName[0] == '-')
         pszName[0] = '_';
+
     /* No trailing dot. */
     if (pszName[strName.length() - 1] == '.')
         pszName[strName.length() - 1] = '_';
+
     /* Mangle leading and trailing spaces. */
     for (size_t i = 0; pszName[i] == ' '; ++i)
        pszName[i] = '_';
@@ -1934,7 +1947,6 @@ HRESULT VirtualBox::getGuestOSType(const com::Utf8Str &aId,
     aType = NULL;
     AutoReadLock alock(m->allGuestOSTypes.getLockHandle() COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = S_OK;
     for (GuestOSTypesOList::iterator it = m->allGuestOSTypes.begin();
          it != m->allGuestOSTypes.end();
          ++it)
@@ -1947,11 +1959,7 @@ HRESULT VirtualBox::getGuestOSType(const com::Utf8Str &aId,
             break;
         }
     }
-    return (aType) ? S_OK :
-        setError(E_INVALIDARG,
-                 tr("'%s' is not a valid Guest OS type"),
-                 aId.c_str());
-    return rc;
+    return (aType) ? S_OK : setError(E_INVALIDARG, tr("'%s' is not a valid Guest OS type"), aId.c_str());
 }
 
 HRESULT VirtualBox::createSharedFolder(const com::Utf8Str &aName,
@@ -2436,7 +2444,7 @@ public:
 
     void handler()
     {
-        int vrc = VirtualBox::SVCHelperClientThread(NULL, this);
+        VirtualBox::i_SVCHelperClientThreadTask(this);
     }
 
     const ComPtr<Progress>& GetProgressObject() const {return progress;}
@@ -2458,7 +2466,7 @@ public:
 
         initialized = true;
 
-	return initialized;
+        return initialized;
     }
 
     bool isOk() const{ return initialized;}
@@ -2539,11 +2547,10 @@ HRESULT VirtualBox::i_startSVCHelperClient(bool aPrivileged,
     AutoCaller autoCaller(this);
     if (FAILED(autoCaller.rc())) return autoCaller.rc();
 
-    /* create the SVCHelperClientThread() argument */
+    /* create the i_SVCHelperClientThreadTask() argument */
 
     HRESULT hr = S_OK;
     StartSVCHelperClientData *pTask = NULL;
-    RTTHREAD tid = NIL_RTTHREAD;
     try
     {
         pTask = new StartSVCHelperClientData();
@@ -2558,7 +2565,7 @@ HRESULT VirtualBox::i_startSVCHelperClient(bool aPrivileged,
         }
 
         //this function delete pTask in case of exceptions, so there is no need in the call of delete operator
-        hr = pTask->createThread(&tid, RTTHREADTYPE_MAIN_WORKER);
+        hr = pTask->createThreadWithType(RTTHREADTYPE_MAIN_WORKER);
 
     }
     catch(std::bad_alloc &)
@@ -2578,22 +2585,19 @@ HRESULT VirtualBox::i_startSVCHelperClient(bool aPrivileged,
  *  Worker thread for startSVCHelperClient().
  */
 /* static */
-DECLCALLBACK(int)
-VirtualBox::SVCHelperClientThread(RTTHREAD aThread, void *aUser)
+void VirtualBox::i_SVCHelperClientThreadTask(StartSVCHelperClientData *pTask)
 {
     LogFlowFuncEnter();
-
-    StartSVCHelperClientData* d = static_cast<StartSVCHelperClientData*>(aUser);
     HRESULT rc = S_OK;
     bool userFuncCalled = false;
 
     do
     {
-        AssertBreakStmt(d, rc = E_POINTER);
-        AssertReturn(!d->progress.isNull(), E_POINTER);
+        AssertBreakStmt(pTask, rc = E_POINTER);
+        AssertReturnVoid(!pTask->progress.isNull());
 
         /* protect VirtualBox from uninitialization */
-        AutoCaller autoCaller(d->that);
+        AutoCaller autoCaller(pTask->that);
         if (!autoCaller.isOk())
         {
             /* it's too late */
@@ -2610,8 +2614,7 @@ VirtualBox::SVCHelperClientThread(RTTHREAD aThread, void *aUser)
                                        id.raw()).c_str());
         if (RT_FAILURE(vrc))
         {
-            rc = d->that->setError(E_FAIL,
-                                   tr("Could not create the communication channel (%Rrc)"), vrc);
+            rc = pTask->that->setError(E_FAIL, tr("Could not create the communication channel (%Rrc)"), vrc);
             break;
         }
 
@@ -2620,7 +2623,7 @@ VirtualBox::SVCHelperClientThread(RTTHREAD aThread, void *aUser)
         char *exePath = RTProcGetExecutablePath(exePathBuf, RTPATH_MAX);
         if (!exePath)
         {
-            rc = d->that->setError(E_FAIL, tr("Cannot get executable name"));
+            rc = pTask->that->setError(E_FAIL, tr("Cannot get executable name"));
             break;
         }
 
@@ -2630,7 +2633,7 @@ VirtualBox::SVCHelperClientThread(RTTHREAD aThread, void *aUser)
 
         RTPROCESS pid = NIL_RTPROCESS;
 
-        if (d->privileged)
+        if (pTask->privileged)
         {
             /* Attempt to start a privileged process using the Run As dialog */
 
@@ -2656,12 +2659,9 @@ VirtualBox::SVCHelperClientThread(RTTHREAD aThread, void *aUser)
                 /* hide excessive details in case of a frequent error
                  * (pressing the Cancel button to close the Run As dialog) */
                 if (vrc2 == VERR_CANCELLED)
-                    rc = d->that->setError(E_FAIL,
-                                           tr("Operation canceled by the user"));
+                    rc = pTask->that->setError(E_FAIL, tr("Operation canceled by the user"));
                 else
-                    rc = d->that->setError(E_FAIL,
-                                           tr("Could not launch a privileged process '%s' (%Rrc)"),
-                                           exePath, vrc2);
+                    rc = pTask->that->setError(E_FAIL, tr("Could not launch a privileged process '%s' (%Rrc)"), exePath, vrc2);
                 break;
             }
         }
@@ -2671,8 +2671,7 @@ VirtualBox::SVCHelperClientThread(RTTHREAD aThread, void *aUser)
             vrc = RTProcCreate(exePath, args, RTENV_DEFAULT, 0, &pid);
             if (RT_FAILURE(vrc))
             {
-                rc = d->that->setError(E_FAIL,
-                                       tr("Could not launch a process '%s' (%Rrc)"), exePath, vrc);
+                rc = pTask->that->setError(E_FAIL, tr("Could not launch a process '%s' (%Rrc)"), exePath, vrc);
                 break;
             }
         }
@@ -2682,7 +2681,7 @@ VirtualBox::SVCHelperClientThread(RTTHREAD aThread, void *aUser)
         if (RT_SUCCESS(vrc))
         {
             /* start the user supplied function */
-            rc = d->func(&client, d->progress, d->user, &vrc);
+            rc = pTask->func(&client, pTask->progress, pTask->user, &vrc);
             userFuncCalled = true;
         }
 
@@ -2695,8 +2694,7 @@ VirtualBox::SVCHelperClientThread(RTTHREAD aThread, void *aUser)
 
         if (SUCCEEDED(rc) && RT_FAILURE(vrc))
         {
-            rc = d->that->setError(E_FAIL,
-                                   tr("Could not operate the communication channel (%Rrc)"), vrc);
+            rc = pTask->that->setError(E_FAIL, tr("Could not operate the communication channel (%Rrc)"), vrc);
             break;
         }
     }
@@ -2706,13 +2704,12 @@ VirtualBox::SVCHelperClientThread(RTTHREAD aThread, void *aUser)
     {
         /* call the user function in the "cleanup only" mode
          * to let it free resources passed to in aUser */
-        d->func(NULL, NULL, d->user, NULL);
+        pTask->func(NULL, NULL, pTask->user, NULL);
     }
 
-    d->progress->i_notifyComplete(rc);
+    pTask->progress->i_notifyComplete(rc);
 
     LogFlowFuncLeave();
-    return 0;
 }
 
 #endif /* RT_OS_WINDOWS */
diff --git a/src/VBox/Main/src-server/darwin/HostDnsServiceDarwin.cpp b/src/VBox/Main/src-server/darwin/HostDnsServiceDarwin.cpp
index ddb2778..d532bb5 100644
--- a/src/VBox/Main/src-server/darwin/HostDnsServiceDarwin.cpp
+++ b/src/VBox/Main/src-server/darwin/HostDnsServiceDarwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2004-2013 Oracle Corporation
+ * Copyright (C) 2004-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/darwin/HostPowerDarwin.cpp b/src/VBox/Main/src-server/darwin/HostPowerDarwin.cpp
index c588622..bb3f686 100644
--- a/src/VBox/Main/src-server/darwin/HostPowerDarwin.cpp
+++ b/src/VBox/Main/src-server/darwin/HostPowerDarwin.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2008-2013 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/darwin/NetIf-darwin.cpp b/src/VBox/Main/src-server/darwin/NetIf-darwin.cpp
index 7adc457..35deca4 100644
--- a/src/VBox/Main/src-server/darwin/NetIf-darwin.cpp
+++ b/src/VBox/Main/src-server/darwin/NetIf-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2011 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/darwin/PerformanceDarwin.cpp b/src/VBox/Main/src-server/darwin/PerformanceDarwin.cpp
index 85397ed..61e4735 100644
--- a/src/VBox/Main/src-server/darwin/PerformanceDarwin.cpp
+++ b/src/VBox/Main/src-server/darwin/PerformanceDarwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2013 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -30,7 +30,7 @@
 #include "Performance.h"
 
 /* The following declarations are missing in 10.4.x SDK */
-/* @todo Replace them with libproc.h and sys/proc_info.h when 10.4 is no longer supported */
+/** @todo Replace them with libproc.h and sys/proc_info.h when 10.4 is no longer supported */
 extern "C" int proc_pidinfo(int pid, int flavor, uint64_t arg,  void *buffer, int buffersize);
 struct proc_taskinfo {
     uint64_t    pti_virtual_size;       /* virtual memory size (bytes) */
diff --git a/src/VBox/Main/src-server/darwin/USBProxyBackendDarwin.cpp b/src/VBox/Main/src-server/darwin/USBProxyBackendDarwin.cpp
index fb5c6e4..ed04194 100644
--- a/src/VBox/Main/src-server/darwin/USBProxyBackendDarwin.cpp
+++ b/src/VBox/Main/src-server/darwin/USBProxyBackendDarwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2005-2012 Oracle Corporation
+ * Copyright (C) 2005-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/darwin/iokit.cpp b/src/VBox/Main/src-server/darwin/iokit.cpp
index 4d336fb..c122ac8 100644
--- a/src/VBox/Main/src-server/darwin/iokit.cpp
+++ b/src/VBox/Main/src-server/darwin/iokit.cpp
@@ -8,7 +8,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -90,7 +90,7 @@
 *   Global Variables                                                                                                             *
 *********************************************************************************************************************************/
 /** The IO Master Port. */
-static mach_port_t g_MasterPort = NULL;
+static mach_port_t g_MasterPort = MACH_PORT_NULL;
 /** Major darwin version as returned by uname -r. */
 static uint32_t g_uMajorDarwin = 0;
 
@@ -697,11 +697,11 @@ void DarwinUnsubscribeUSBNotifications(void *pvOpaque)
         return;
 
     IOObjectRelease(pNotify->AttachIterator);
-    pNotify->AttachIterator = NULL;
+    pNotify->AttachIterator = IO_OBJECT_NULL;
     IOObjectRelease(pNotify->AttachIterator2);
-    pNotify->AttachIterator2 = NULL;
+    pNotify->AttachIterator2 = IO_OBJECT_NULL;
     IOObjectRelease(pNotify->DetachIterator);
-    pNotify->DetachIterator = NULL;
+    pNotify->DetachIterator = IO_OBJECT_NULL;
 
     CFRunLoopRemoveSource(CFRunLoopGetCurrent(), pNotify->NotifyRLSrc, CFSTR(VBOX_IOKIT_MODE_STRING));
     IONotificationPortDestroy(pNotify->NotifyPort);
@@ -728,7 +728,7 @@ static io_object_t darwinFindObjectByClass(io_object_t Object, const char *pszCl
     io_iterator_t Children;
     kern_return_t krc = IORegistryEntryGetChildIterator(Object, kIOServicePlane, &Children);
     if (krc != KERN_SUCCESS)
-        return NULL;
+        return IO_OBJECT_NULL;
     io_object_t Child;
     while ((Child = IOIteratorNext(Children)) != IO_OBJECT_NULL)
     {
@@ -817,7 +817,7 @@ static kern_return_t darwinGetUSBHostDeviceFromLegacyDevice(io_object_t USBDevic
     /*
      * Perform the search and get a collection of USB Device back.
      */
-    io_iterator_t USBDevices = NULL;
+    io_iterator_t USBDevices = IO_OBJECT_NULL;
     IOReturn rc = IOServiceGetMatchingServices(g_MasterPort, RefMatchingDict, &USBDevices);
     AssertMsgReturn(rc == kIOReturnSuccess, ("rc=%d\n", rc), KERN_FAILURE);
     RefMatchingDict = NULL; /* the reference is consumed by IOServiceGetMatchingServices. */
@@ -1026,7 +1026,7 @@ static void darwinDeterminUSBDeviceState(PUSBDEVICE pCur, io_object_t USBDevice,
          * To make the checks below work we have to get hold of the IOUSBHostDevice and IOUSBHostInterface
          * instances for the current device. Fortunately the IOUSBHostDevice instance contains a
          * "AppleUSBAlternateServiceRegistryID" which points to the legacy class instance for the same device.
-         * So just iterate over the list of IOUSBHostDevice instances and check whether the 
+         * So just iterate over the list of IOUSBHostDevice instances and check whether the
          * AppleUSBAlternateServiceRegistryID property matches with the legacy instance.
          *
          * The upside is that we can keep VBoxUSB untouched and still compatible with older OS X releases.
@@ -1068,7 +1068,7 @@ PUSBDEVICE DarwinGetUSBDevices(void)
     /*
      * Perform the search and get a collection of USB Device back.
      */
-    io_iterator_t USBDevices = NULL;
+    io_iterator_t USBDevices = IO_OBJECT_NULL;
     IOReturn rc = IOServiceGetMatchingServices(g_MasterPort, RefMatchingDict, &USBDevices);
     AssertMsgReturn(rc == kIOReturnSuccess, ("rc=%d\n", rc), NULL);
     RefMatchingDict = NULL; /* the reference is consumed by IOServiceGetMatchingServices. */
@@ -1291,7 +1291,7 @@ int DarwinReEnumerateUSBDevice(PCUSBDEVICE pCur)
      */
 
     CFMutableDictionaryRef RefMatchingDict = IOServiceMatching(kIOUSBDeviceClassName);
-    AssertReturn(RefMatchingDict, NULL);
+    AssertReturn(RefMatchingDict, VERR_INTERNAL_ERROR_4);
 
     uint64_t u64SessionId = 0;
     uint32_t u32LocationId = 0;
@@ -1331,9 +1331,9 @@ int DarwinReEnumerateUSBDevice(PCUSBDEVICE pCur)
             psz++;
     } while (*psz);
 
-    io_iterator_t USBDevices = NULL;
+    io_iterator_t USBDevices = IO_OBJECT_NULL;
     IOReturn irc = IOServiceGetMatchingServices(g_MasterPort, RefMatchingDict, &USBDevices);
-    AssertMsgReturn(irc == kIOReturnSuccess, ("irc=%#x\n", irc), NULL);
+    AssertMsgReturn(irc == kIOReturnSuccess, ("irc=%#x\n", irc), VERR_INTERNAL_ERROR_5);
     RefMatchingDict = NULL; /* the reference is consumed by IOServiceGetMatchingServices. */
 
     unsigned cMatches = 0;
@@ -1363,7 +1363,7 @@ int DarwinReEnumerateUSBDevice(PCUSBDEVICE pCur)
         IOObjectRelease(USBDevice);
     }
     IOObjectRelease(USBDevices);
-    USBDevices = NULL;
+    USBDevices = IO_OBJECT_NULL;
     if (!USBDevice)
     {
         LogRel(("USB: Device '%s' not found (%d pid+vid matches)\n", pszAddress, cMatches));
@@ -1467,7 +1467,7 @@ PDARWINDVD DarwinGetDVDDrives(void)
     /*
      * Perform the search and get a collection of DVD services.
      */
-    io_iterator_t DVDServices = NULL;
+    io_iterator_t DVDServices = IO_OBJECT_NULL;
     IOReturn rc = IOServiceGetMatchingServices(g_MasterPort, RefMatchingDict, &DVDServices);
     AssertMsgReturn(rc == kIOReturnSuccess, ("rc=%d\n", rc), NULL);
     RefMatchingDict = NULL; /* the reference is consumed by IOServiceGetMatchingServices. */
@@ -1599,7 +1599,7 @@ PDARWINETHERNIC DarwinGetEthernetControllers(void)
     /*
      * Perform the search and get a collection of ethernet controller services.
      */
-    io_iterator_t EtherIfServices = NULL;
+    io_iterator_t EtherIfServices = IO_OBJECT_NULL;
     IOReturn rc = IOServiceGetMatchingServices(g_MasterPort, RefMatchingDict, &EtherIfServices);
     AssertMsgReturn(rc == kIOReturnSuccess, ("rc=%d\n", rc), NULL);
     RefMatchingDict = NULL; /* the reference is consumed by IOServiceGetMatchingServices. */
diff --git a/src/VBox/Main/src-server/darwin/iokit.h b/src/VBox/Main/src-server/darwin/iokit.h
index ff81b3c..b94c87e 100644
--- a/src/VBox/Main/src-server/darwin/iokit.h
+++ b/src/VBox/Main/src-server/darwin/iokit.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/freebsd/HostHardwareFreeBSD.cpp b/src/VBox/Main/src-server/freebsd/HostHardwareFreeBSD.cpp
index 6a84156..ea5848f 100644
--- a/src/VBox/Main/src-server/freebsd/HostHardwareFreeBSD.cpp
+++ b/src/VBox/Main/src-server/freebsd/HostHardwareFreeBSD.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2013 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/freebsd/NetIf-freebsd.cpp b/src/VBox/Main/src-server/freebsd/NetIf-freebsd.cpp
index 5b142f0..81f9c27 100644
--- a/src/VBox/Main/src-server/freebsd/NetIf-freebsd.cpp
+++ b/src/VBox/Main/src-server/freebsd/NetIf-freebsd.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2012 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/freebsd/PerformanceFreeBSD.cpp b/src/VBox/Main/src-server/freebsd/PerformanceFreeBSD.cpp
index 6770c75..b0fc8e3 100644
--- a/src/VBox/Main/src-server/freebsd/PerformanceFreeBSD.cpp
+++ b/src/VBox/Main/src-server/freebsd/PerformanceFreeBSD.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2013 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -47,7 +47,7 @@ int CollectorFreeBSD::getHostCpuMHz(ULONG *mhz)
     int CpuMHz = 0;
     size_t cbParameter = sizeof(CpuMHz);
 
-    /** @todo: Howto support more than one CPU? */
+    /** @todo Howto support more than one CPU? */
     if (sysctlbyname("dev.cpu.0.freq", &CpuMHz, &cbParameter, NULL, 0))
         return VERR_NOT_SUPPORTED;
 
diff --git a/src/VBox/Main/src-server/freebsd/USBProxyBackendFreeBSD.cpp b/src/VBox/Main/src-server/freebsd/USBProxyBackendFreeBSD.cpp
index e455829..736d8d9 100644
--- a/src/VBox/Main/src-server/freebsd/USBProxyBackendFreeBSD.cpp
+++ b/src/VBox/Main/src-server/freebsd/USBProxyBackendFreeBSD.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2005-2012 Oracle Corporation
+ * Copyright (C) 2005-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/generic/AutostartDb-generic.cpp b/src/VBox/Main/src-server/generic/AutostartDb-generic.cpp
index 07aafe2..d384208 100644
--- a/src/VBox/Main/src-server/generic/AutostartDb-generic.cpp
+++ b/src/VBox/Main/src-server/generic/AutostartDb-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -83,7 +83,7 @@ int AutostartDb::autostartModifyDb(bool fAutostart, bool fAddVM)
                     /* Check if the file was just created. */
                     if (cbFile)
                     {
-                        rc = RTFileRead(hAutostartFile, abBuf, cbFile, NULL);
+                        rc = RTFileRead(hAutostartFile, abBuf, (size_t)cbFile, NULL);
                         if (RT_SUCCESS(rc))
                         {
                             rc = RTStrToUInt32Ex(abBuf, NULL, 10 /* uBase */, &cAutostartVms);
diff --git a/src/VBox/Main/src-server/generic/NetIf-generic.cpp b/src/VBox/Main/src-server/generic/NetIf-generic.cpp
index c007cae..98dc91a 100644
--- a/src/VBox/Main/src-server/generic/NetIf-generic.cpp
+++ b/src/VBox/Main/src-server/generic/NetIf-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2012 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/generic/USBProxyBackendUsbIp.cpp b/src/VBox/Main/src-server/generic/USBProxyBackendUsbIp.cpp
index 1e0a36c..56bde71 100644
--- a/src/VBox/Main/src-server/generic/USBProxyBackendUsbIp.cpp
+++ b/src/VBox/Main/src-server/generic/USBProxyBackendUsbIp.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -49,7 +49,7 @@
 /** Command/Reply code for OP_REQ/RET_DEVLIST. */
 #define USBIP_REQ_RET_DEVLIST UINT16_C(5)
 
-/** @todo: Duplicate code in USBProxyDevice-usbip.cpp */
+/** @todo Duplicate code in USBProxyDevice-usbip.cpp */
 /**
  * Exported device entry in the OP_RET_DEVLIST reply.
  */
@@ -954,7 +954,7 @@ int USBProxyBackendUsbIp::addDeviceToList(PUsbIpExportedDevice pDev)
         pNew->bNumConfigurations = pDev->bNumConfigurations;
         pNew->enmState           = USBDEVICESTATE_USED_BY_HOST_CAPTURABLE;
         pNew->u64SerialHash      = 0;
-        /** @todo: The following is not correct but is required to to get USB testing working
+        /** @todo The following is not correct but is required to to get USB testing working
          * because only the port can be part of a filter (adding the required attributes for the bus
          * breaks API and ABI compatibility).
          * Filtering by port number is required for USB testing to connect to the correct device
diff --git a/src/VBox/Main/src-server/linux/HostDnsServiceLinux.cpp b/src/VBox/Main/src-server/linux/HostDnsServiceLinux.cpp
index e49d9c3..9edde02 100644
--- a/src/VBox/Main/src-server/linux/HostDnsServiceLinux.cpp
+++ b/src/VBox/Main/src-server/linux/HostDnsServiceLinux.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2014 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/linux/HostHardwareLinux.cpp b/src/VBox/Main/src-server/linux/HostHardwareLinux.cpp
index 8308bba..65dd230 100644
--- a/src/VBox/Main/src-server/linux/HostHardwareLinux.cpp
+++ b/src/VBox/Main/src-server/linux/HostHardwareLinux.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2008-2013 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -641,7 +641,7 @@ private:
                                          "block/%s/device/vendor", mpcszName);
             if (RT_SUCCESS(rc))
             {
-                rc = RTLinuxSysFsReadStrFile(szModel, sizeof(szModel), NULL, 
+                rc = RTLinuxSysFsReadStrFile(szModel, sizeof(szModel), NULL,
                                              "block/%s/device/model", mpcszName);
                 if (RT_SUCCESS(rc))
                 {
diff --git a/src/VBox/Main/src-server/linux/HostPowerLinux.cpp b/src/VBox/Main/src-server/linux/HostPowerLinux.cpp
index c39d607..9425807 100644
--- a/src/VBox/Main/src-server/linux/HostPowerLinux.cpp
+++ b/src/VBox/Main/src-server/linux/HostPowerLinux.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/linux/NetIf-linux.cpp b/src/VBox/Main/src-server/linux/NetIf-linux.cpp
index 6816c33..613a4ca 100644
--- a/src/VBox/Main/src-server/linux/NetIf-linux.cpp
+++ b/src/VBox/Main/src-server/linux/NetIf-linux.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2012 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/linux/PerformanceLinux.cpp b/src/VBox/Main/src-server/linux/PerformanceLinux.cpp
index 89de3a8..68490ed 100644
--- a/src/VBox/Main/src-server/linux/PerformanceLinux.cpp
+++ b/src/VBox/Main/src-server/linux/PerformanceLinux.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2008-2012 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -286,7 +286,7 @@ int CollectorLinux::getRawProcessStats(RTPROCESS process, uint64_t *cpuUser, uin
     unsigned long ulTmp;
     signed long ilTmp;
     ULONG u32user, u32kernel;
-    char buf[80]; /* @todo: this should be tied to max allowed proc name. */
+    char buf[80]; /** @todo this should be tied to max allowed proc name. */
 
     RTStrAPrintf(&pszName, "/proc/%d/stat", process);
     FILE *f = fopen(pszName, "r");
diff --git a/src/VBox/Main/src-server/linux/USBGetDevices.cpp b/src/VBox/Main/src-server/linux/USBGetDevices.cpp
index 9d4eba1..307cf39 100644
--- a/src/VBox/Main/src-server/linux/USBGetDevices.cpp
+++ b/src/VBox/Main/src-server/linux/USBGetDevices.cpp
@@ -458,18 +458,18 @@ static char *usbfsPrefix(char *psz, const char *pszPref, size_t cchPref)
 
 
 /** Just a worker for USBProxyServiceLinux::getDevices that avoids some code duplication. */
-static int usbfsAddDeviceToChain(PUSBDEVICE pDev, PUSBDEVICE *ppFirst, PUSBDEVICE **pppNext, const char *pcszUsbfsRoot,
-                                 bool testfs, int rc)
+static int usbfsAddDeviceToChain(PUSBDEVICE pDev, PUSBDEVICE *ppFirst, PUSBDEVICE **pppNext, const char *pszUsbfsRoot,
+                                 bool fUnsupportedDevicesToo, int rc)
 {
     /* usbDeterminState requires the address. */
     PUSBDEVICE pDevNew = (PUSBDEVICE)RTMemDup(pDev, sizeof(*pDev));
     if (pDevNew)
     {
-        RTStrAPrintf((char **)&pDevNew->pszAddress, "%s/%03d/%03d", pcszUsbfsRoot, pDevNew->bBus, pDevNew->bDevNum);
+        RTStrAPrintf((char **)&pDevNew->pszAddress, "%s/%03d/%03d", pszUsbfsRoot, pDevNew->bBus, pDevNew->bDevNum);
         if (pDevNew->pszAddress)
         {
             pDevNew->enmState = usbDeterminState(pDevNew);
-            if (pDevNew->enmState != USBDEVICESTATE_UNSUPPORTED || testfs)
+            if (pDevNew->enmState != USBDEVICESTATE_UNSUPPORTED || fUnsupportedDevicesToo)
             {
                 if (*pppNext)
                     **pppNext = pDevNew;
@@ -496,11 +496,11 @@ static int usbfsAddDeviceToChain(PUSBDEVICE pDev, PUSBDEVICE *ppFirst, PUSBDEVIC
 }
 
 
-static int usbfsOpenDevicesFile(const char *pcszUsbfsRoot, FILE **ppFile)
+static int usbfsOpenDevicesFile(const char *pszUsbfsRoot, FILE **ppFile)
 {
     char *pszPath;
     FILE *pFile;
-    RTStrAPrintf(&pszPath, "%s/devices", pcszUsbfsRoot);
+    RTStrAPrintf(&pszPath, "%s/devices", pszUsbfsRoot);
     if (!pszPath)
         return VERR_NO_MEMORY;
     pFile = fopen(pszPath, "r");
@@ -513,17 +513,18 @@ static int usbfsOpenDevicesFile(const char *pcszUsbfsRoot, FILE **ppFile)
 
 
 /**
- * USBProxyService::getDevices() implementation for usbfs.  The @a testfs flag
- * tells the function to return information about unsupported devices as well.
- * This is used as a sanity test to check that a devices file is really what
- * we expect.
+ * USBProxyService::getDevices() implementation for usbfs.
+ *
+ * The @a fUnsupportedDevicesToo flag tells the function to return information
+ * about unsupported devices as well.  This is used as a sanity test to check
+ * that a devices file is really what we expect.
  */
-static PUSBDEVICE usbfsGetDevices(const char *pcszUsbfsRoot, bool testfs)
+static PUSBDEVICE usbfsGetDevices(const char *pszUsbfsRoot, bool fUnsupportedDevicesToo)
 {
     PUSBDEVICE pFirst = NULL;
     FILE *pFile = NULL;
     int rc;
-    rc = usbfsOpenDevicesFile(pcszUsbfsRoot, &pFile);
+    rc = usbfsOpenDevicesFile(pszUsbfsRoot, &pFile);
     if (RT_SUCCESS(rc))
     {
         PUSBDEVICE     *ppNext = NULL;
@@ -534,9 +535,9 @@ static PUSBDEVICE usbfsGetDevices(const char *pcszUsbfsRoot, bool testfs)
         Dev.enmState = USBDEVICESTATE_UNUSED;
 
         /* Set close on exit and hope no one is racing us. */
-        rc =   fcntl(fileno(pFile), F_SETFD, FD_CLOEXEC) >= 0
-             ? VINF_SUCCESS
-             : RTErrConvertFromErrno(errno);
+        rc = fcntl(fileno(pFile), F_SETFD, FD_CLOEXEC) >= 0
+           ? VINF_SUCCESS
+           : RTErrConvertFromErrno(errno);
         while (     RT_SUCCESS(rc)
                &&   fgets(szLine, sizeof(szLine), pFile))
         {
@@ -583,7 +584,7 @@ static PUSBDEVICE usbfsGetDevices(const char *pcszUsbfsRoot, bool testfs)
                     /* add */
                     AssertMsg(cHits >= 3 || cHits == 0, ("cHits=%d\n", cHits));
                     if (cHits >= 3)
-                        rc = usbfsAddDeviceToChain(&Dev, &pFirst, &ppNext, pcszUsbfsRoot, testfs, rc);
+                        rc = usbfsAddDeviceToChain(&Dev, &pFirst, &ppNext, pszUsbfsRoot, fUnsupportedDevicesToo, rc);
                     else
                         deviceFreeMembers(&Dev);
 
@@ -776,7 +777,7 @@ static PUSBDEVICE usbfsGetDevices(const char *pcszUsbfsRoot, bool testfs)
          */
         AssertMsg(cHits >= 3 || cHits == 0, ("cHits=%d\n", cHits));
         if (cHits >= 3)
-            rc = usbfsAddDeviceToChain(&Dev, &pFirst, &ppNext, pcszUsbfsRoot, testfs, rc);
+            rc = usbfsAddDeviceToChain(&Dev, &pFirst, &ppNext, pszUsbfsRoot, fUnsupportedDevicesToo, rc);
 
         /*
          * Success?
@@ -835,15 +836,15 @@ static int usbsysfsInitDevInfo(USBDeviceInfo *pSelf, const char *aDevice, const
  *
  * @returns a bus number greater than 0 on success or 0 on failure.
  */
-static unsigned usbsysfsGetBusFromPath(const char *pcszPath)
+static unsigned usbsysfsGetBusFromPath(const char *pszPath)
 {
-    const char *pcszFile = strrchr(pcszPath, '/');
-    if (!pcszFile)
+    const char *pszFile = strrchr(pszPath, '/');
+    if (!pszFile)
         return 0;
-    unsigned bus = RTStrToUInt32(pcszFile + 1);
+    unsigned bus = RTStrToUInt32(pszFile + 1);
     if (   !bus
-        && pcszFile[1] == 'u' && pcszFile[2] == 's' && pcszFile[3] == 'b')
-    bus = RTStrToUInt32(pcszFile + 4);
+        && pszFile[1] == 'u' && pszFile[2] == 's' && pszFile[3] == 'b')
+    bus = RTStrToUInt32(pszFile + 4);
     return bus;
 }
 
@@ -863,23 +864,23 @@ static dev_t usbsysfsMakeDevNum(unsigned bus, unsigned device)
 
 
 /**
- * If a file @a pcszNode from /sys/bus/usb/devices is a device rather than an
+ * If a file @a pszNode from /sys/bus/usb/devices is a device rather than an
  * interface add an element for the device to @a pvecDevInfo.
  */
-static int usbsysfsAddIfDevice(const char *pcszDevicesRoot, const char *pcszNode, VECTOR_OBJ(USBDeviceInfo) *pvecDevInfo)
+static int usbsysfsAddIfDevice(const char *pszDevicesRoot, const char *pszNode, VECTOR_OBJ(USBDeviceInfo) *pvecDevInfo)
 {
-    const char *pcszFile = strrchr(pcszNode, '/');
-    if (!pcszFile)
+    const char *pszFile = strrchr(pszNode, '/');
+    if (!pszFile)
         return VERR_INVALID_PARAMETER;
-    if (strchr(pcszFile, ':'))
+    if (strchr(pszFile, ':'))
         return VINF_SUCCESS;
 
-    unsigned bus = usbsysfsGetBusFromPath(pcszNode);
+    unsigned bus = usbsysfsGetBusFromPath(pszNode);
     if (!bus)
         return VINF_SUCCESS;
 
     int64_t device;
-    int rc = RTLinuxSysFsReadIntFile(10, &device, "%s/devnum", pcszNode);
+    int rc = RTLinuxSysFsReadIntFile(10, &device, "%s/devnum", pszNode);
     if (RT_FAILURE(rc))
         return VINF_SUCCESS;
 
@@ -891,12 +892,12 @@ static int usbsysfsAddIfDevice(const char *pcszDevicesRoot, const char *pcszNode
     rc = RTLinuxCheckDevicePath(devnum, RTFS_TYPE_DEV_CHAR,
                                 szDevPath, sizeof(szDevPath),
                                 "%s/%.3d/%.3d",
-                                pcszDevicesRoot, bus, device);
+                                pszDevicesRoot, bus, device);
     if (RT_FAILURE(rc))
         return VINF_SUCCESS;
 
     USBDeviceInfo info;
-    if (usbsysfsInitDevInfo(&info, szDevPath, pcszNode))
+    if (usbsysfsInitDevInfo(&info, szDevPath, pszNode))
     {
         rc = VEC_PUSH_BACK_OBJ(pvecDevInfo, USBDeviceInfo, &info);
         if (RT_SUCCESS(rc))
@@ -914,30 +915,30 @@ static int usbsysfsAddIfDevice(const char *pcszDevicesRoot, const char *pcszNode
  * Both must be referenced by their canonical sysfs paths.  This is not tested,
  * as the test requires file-system interaction.
  */
-static bool usbsysfsMuiIsAnInterfaceOf(const char *pcszIface, const char *pcszDev)
+static bool usbsysfsMuiIsAnInterfaceOf(const char *pszIface, const char *pszDev)
 {
-    size_t cchDev = strlen(pcszDev);
+    size_t cchDev = strlen(pszDev);
 
-    AssertPtr(pcszIface);
-    AssertPtr(pcszDev);
-    Assert(pcszIface[0] == '/');
-    Assert(pcszDev[0] == '/');
-    Assert(pcszDev[cchDev - 1] != '/');
+    AssertPtr(pszIface);
+    AssertPtr(pszDev);
+    Assert(pszIface[0] == '/');
+    Assert(pszDev[0] == '/');
+    Assert(pszDev[cchDev - 1] != '/');
 
-    /* If this passes, pcszIface is at least cchDev long */
-    if (strncmp(pcszIface, pcszDev, cchDev))
+    /* If this passes, pszIface is at least cchDev long */
+    if (strncmp(pszIface, pszDev, cchDev))
         return false;
 
-    /* If this passes, pcszIface is longer than cchDev */
-    if (pcszIface[cchDev] != '/')
+    /* If this passes, pszIface is longer than cchDev */
+    if (pszIface[cchDev] != '/')
         return false;
 
     /* In sysfs an interface is an immediate subdirectory of the device */
-    if (strchr(pcszIface + cchDev + 1, '/'))
+    if (strchr(pszIface + cchDev + 1, '/'))
         return false;
 
     /* And it always has a colon in its name */
-    if (!strchr(pcszIface + cchDev + 1, ':'))
+    if (!strchr(pszIface + cchDev + 1, ':'))
         return false;
 
     /* And hopefully we have now elimitated everything else */
@@ -970,12 +971,12 @@ static testIsAnInterfaceOf testIsAnInterfaceOfInst;
  * Tell whether a file in /sys/bus/usb/devices is an interface rather than a
  * device.
  */
-static int usbsysfsAddIfInterfaceOf(const char *pcszNode, USBDeviceInfo *pInfo)
+static int usbsysfsAddIfInterfaceOf(const char *pszNode, USBDeviceInfo *pInfo)
 {
-    if (!usbsysfsMuiIsAnInterfaceOf(pcszNode, pInfo->mSysfsPath))
+    if (!usbsysfsMuiIsAnInterfaceOf(pszNode, pInfo->mSysfsPath))
         return VINF_SUCCESS;
 
-    char *pszDup = (char *)RTStrDup(pcszNode);
+    char *pszDup = (char *)RTStrDup(pszNode);
     if (pszDup)
     {
         int rc = VEC_PUSH_BACK_PTR(&pInfo->mvecpszInterfaces, char *, pszDup);
@@ -994,7 +995,7 @@ static int usbsysfsAddIfInterfaceOf(const char *pcszNode, USBDeviceInfo *pInfo)
  * using either the full path or the realpath() and skipping hidden files and
  * files on which realpath() fails.
  */
-static int usbsysfsReadFilePathsFromDir(const char *pcszPath, DIR *pDir, VECTOR_PTR(char *) *pvecpchDevs)
+static int usbsysfsReadFilePathsFromDir(const char *pszPath, DIR *pDir, VECTOR_PTR(char *) *pvecpchDevs)
 {
     struct dirent entry, *pResult;
     int err, rc;
@@ -1006,14 +1007,14 @@ static int usbsysfsReadFilePathsFromDir(const char *pcszPath, DIR *pDir, VECTOR_
         char szRealPath[RTPATH_MAX + 1];
         if (entry.d_name[0] == '.')
             continue;
-        if (snprintf(szPath, sizeof(szPath), "%s/%s", pcszPath, entry.d_name) < 0)
-            return RTErrConvertFromErrno(errno); /** @todo r=bird: snprintf isn't document to set errno. Also, wouldn't it be better to continue on errors? Finally, you don't need to copy pcszPath each time... */
+        if (snprintf(szPath, sizeof(szPath), "%s/%s", pszPath, entry.d_name) < 0)
+            return RTErrConvertFromErrno(errno); /** @todo r=bird: snprintf isn't document to set errno. Also, wouldn't it be better to continue on errors? Finally, you don't need to copy pszPath each time... */
         if (!realpath(szPath, szRealPath))
             return RTErrConvertFromErrno(errno);
-        char *pszPath = RTStrDup(szRealPath);
-        if (!pszPath)
+        char *pszPathCopy = RTStrDup(szRealPath);
+        if (!pszPathCopy)
             return VERR_NO_MEMORY;
-        if (RT_FAILURE(rc = VEC_PUSH_BACK_PTR(pvecpchDevs, char *, pszPath)))
+        if (RT_FAILURE(rc = VEC_PUSH_BACK_PTR(pvecpchDevs, char *, pszPathCopy)))
             return rc;
     }
     return RTErrConvertFromErrno(err);
@@ -1024,21 +1025,21 @@ static int usbsysfsReadFilePathsFromDir(const char *pcszPath, DIR *pDir, VECTOR_
  * Dump the names of a directory's entries into a vector of char pointers.
  *
  * @returns zero on success or (positive) posix error value.
- * @param   pcszPath      the path to dump.
+ * @param   pszPath      the path to dump.
  * @param   pvecpchDevs   an empty vector of char pointers - must be cleaned up
  *                        by the caller even on failure.
  * @param   withRealPath  whether to canonicalise the filename with realpath
  */
-static int usbsysfsReadFilePaths(const char *pcszPath, VECTOR_PTR(char *) *pvecpchDevs)
+static int usbsysfsReadFilePaths(const char *pszPath, VECTOR_PTR(char *) *pvecpchDevs)
 {
     AssertPtrReturn(pvecpchDevs, EINVAL);
     AssertReturn(VEC_SIZE_PTR(pvecpchDevs) == 0, EINVAL);
-    AssertPtrReturn(pcszPath, EINVAL);
+    AssertPtrReturn(pszPath, EINVAL);
 
-    DIR *pDir = opendir(pcszPath);
+    DIR *pDir = opendir(pszPath);
     if (!pDir)
         return RTErrConvertFromErrno(errno);
-    int rc = usbsysfsReadFilePathsFromDir(pcszPath, pDir, pvecpchDevs);
+    int rc = usbsysfsReadFilePathsFromDir(pszPath, pDir, pvecpchDevs);
     if (closedir(pDir) < 0 && RT_SUCCESS(rc))
         rc = RTErrConvertFromErrno(errno);
     return rc;
@@ -1053,7 +1054,7 @@ static int usbsysfsReadFilePaths(const char *pcszPath, VECTOR_PTR(char *) *pvecp
  * @param pvecpchDevs  empty scratch vector which will be freed by the caller,
  *                     to simplify exit logic
  */
-static int usbsysfsEnumerateHostDevicesWorker(const char *pcszDevicesRoot,
+static int usbsysfsEnumerateHostDevicesWorker(const char *pszDevicesRoot,
                                               VECTOR_OBJ(USBDeviceInfo) *pvecDevInfo,
                                               VECTOR_PTR(char *) *pvecpchDevs)
 {
@@ -1068,7 +1069,7 @@ static int usbsysfsEnumerateHostDevicesWorker(const char *pcszDevicesRoot,
     char **ppszEntry;
     VEC_FOR_EACH(pvecpchDevs, char *, ppszEntry)
     {
-        rc = usbsysfsAddIfDevice(pcszDevicesRoot, *ppszEntry, pvecDevInfo);
+        rc = usbsysfsAddIfDevice(pszDevicesRoot, *ppszEntry, pvecDevInfo);
         if (RT_FAILURE(rc))
             return rc;
     }
@@ -1085,14 +1086,14 @@ static int usbsysfsEnumerateHostDevicesWorker(const char *pcszDevicesRoot,
 }
 
 
-static int usbsysfsEnumerateHostDevices(const char *pcszDevicesRoot, VECTOR_OBJ(USBDeviceInfo) *pvecDevInfo)
+static int usbsysfsEnumerateHostDevices(const char *pszDevicesRoot, VECTOR_OBJ(USBDeviceInfo) *pvecDevInfo)
 {
     VECTOR_PTR(char *) vecpchDevs;
 
     AssertReturn(VEC_SIZE_OBJ(pvecDevInfo) == 0, VERR_INVALID_PARAMETER);
     LogFlowFunc(("entered\n"));
     VEC_INIT_PTR(&vecpchDevs, char *, RTStrFree);
-    int rc = usbsysfsEnumerateHostDevicesWorker(pcszDevicesRoot, pvecDevInfo, &vecpchDevs);
+    int rc = usbsysfsEnumerateHostDevicesWorker(pszDevicesRoot, pvecDevInfo, &vecpchDevs);
     VEC_CLEANUP_PTR(&vecpchDevs);
     LogFlowFunc(("rc=%Rrc\n", rc));
     return rc;
@@ -1389,7 +1390,7 @@ static void usbsysfsFillInDevice(USBDEVICE *pDev, USBDeviceInfo *pInfo)
 /**
  * USBProxyService::getDevices() implementation for sysfs.
  */
-static PUSBDEVICE usbsysfsGetDevices(const char *pcszDevicesRoot, bool testfs)
+static PUSBDEVICE usbsysfsGetDevices(const char *pszDevicesRoot, bool fUnsupportedDevicesToo)
 {
     /* Add each of the devices found to the chain. */
     PUSBDEVICE pFirst = NULL;
@@ -1399,7 +1400,7 @@ static PUSBDEVICE usbsysfsGetDevices(const char *pcszDevicesRoot, bool testfs)
     int rc;
 
     VEC_INIT_OBJ(&vecDevInfo, USBDeviceInfo, usbsysfsCleanupDevInfo);
-    rc = usbsysfsEnumerateHostDevices(pcszDevicesRoot, &vecDevInfo);
+    rc = usbsysfsEnumerateHostDevices(pszDevicesRoot, &vecDevInfo);
     if (RT_FAILURE(rc))
         return NULL;
     VEC_FOR_EACH(&vecDevInfo, USBDeviceInfo, pInfo)
@@ -1411,7 +1412,7 @@ static PUSBDEVICE usbsysfsGetDevices(const char *pcszDevicesRoot, bool testfs)
             usbsysfsFillInDevice(pDev, pInfo);
         if (   RT_SUCCESS(rc)
             && (   pDev->enmState != USBDEVICESTATE_UNSUPPORTED
-                || testfs)
+                || fUnsupportedDevicesToo)
             && pDev->pszAddress != NULL
            )
         {
@@ -1447,6 +1448,7 @@ static bool s_fHaveInotifyKernel = true;
 
 static void *testDLSym(void *handle, const char *symbol)
 {
+    RT_NOREF(handle, symbol);
     Assert(handle == RTLD_DEFAULT);
     Assert(!RTStrCmp(symbol, "inotify_init"));
     if (!s_fHaveInotifyLibC)
@@ -1493,15 +1495,16 @@ static bool usbsysfsInotifyAvailable(void)
 /** Unit test list of usbfs addresses of connected devices. */
 static const char **g_papszUsbfsDeviceAddresses = NULL;
 
-static PUSBDEVICE testGetUsbfsDevices(const char *pcszUsbfsRoot, bool testfs)
+static PUSBDEVICE testGetUsbfsDevices(const char *pszUsbfsRoot, bool fUnsupportedDevicesToo)
 {
-    const char **pcsz;
+    RT_NOREF(pszUsbfsRoot, fUnsupportedDevicesToo);
+    const char **psz;
     PUSBDEVICE pList = NULL, pTail = NULL;
-    for (pcsz = g_papszUsbfsDeviceAddresses; pcsz && *pcsz; ++pcsz)
+    for (psz = g_papszUsbfsDeviceAddresses; psz && *psz; ++psz)
     {
         PUSBDEVICE pNext = (PUSBDEVICE)RTMemAllocZ(sizeof(USBDEVICE));
         if (pNext)
-            pNext->pszAddress = RTStrDup(*pcsz);
+            pNext->pszAddress = RTStrDup(*psz);
         if (!pNext || !pNext->pszAddress)
         {
             if (pNext)
@@ -1533,11 +1536,12 @@ void TestUSBSetAvailableUsbfsDevices(const char **papszDeviceAddresses)
  * accessible or not accessible. */
 static const char **g_papszAccessibleFiles = NULL;
 
-static int testAccess(const char *pcszPath, int mode)
+static int testAccess(const char *pszPath, int mode)
 {
-    const char **pcsz;
-    for (pcsz = g_papszAccessibleFiles; pcsz && *pcsz; ++pcsz)
-        if (!RTStrCmp(pcszPath, *pcsz))
+    RT_NOREF(mode);
+    const char **psz;
+    for (psz = g_papszAccessibleFiles; psz && *psz; ++psz)
+        if (!RTStrCmp(pszPath, *psz))
             return 0;
     return -1;
 }
@@ -1558,31 +1562,31 @@ void TestUSBSetAccessibleFiles(const char **papszAccessibleFiles)
 
 
 /** The path we pretend the usbfs root is located at, or NULL. */
-const char *s_pcszTestUsbfsRoot;
+const char *s_pszTestUsbfsRoot;
 /** Should usbfs be accessible to the current user? */
 bool s_fTestUsbfsAccessible;
 /** The path we pretend the device node tree root is located at, or NULL. */
-const char *s_pcszTestDevicesRoot;
+const char *s_pszTestDevicesRoot;
 /** Should the device node tree be accessible to the current user? */
 bool s_fTestDevicesAccessible;
 /** The result of the usbfs/inotify-specific init */
 int s_rcTestMethodInitResult;
 /** The value of the VBOX_USB environment variable. */
-const char *s_pcszTestEnvUsb;
+const char *s_pszTestEnvUsb;
 /** The value of the VBOX_USB_ROOT environment variable. */
-const char *s_pcszTestEnvUsbRoot;
+const char *s_pszTestEnvUsbRoot;
 
 
 /** Select which access methods will be available to the @a init method
  * during unit testing, and (hack!) what return code it will see from
  * the access method-specific initialisation. */
-void TestUSBSetupInit(const char *pcszUsbfsRoot, bool fUsbfsAccessible,
-                      const char *pcszDevicesRoot, bool fDevicesAccessible,
+void TestUSBSetupInit(const char *pszUsbfsRoot, bool fUsbfsAccessible,
+                      const char *pszDevicesRoot, bool fDevicesAccessible,
                       int rcMethodInitResult)
 {
-    s_pcszTestUsbfsRoot = pcszUsbfsRoot;
+    s_pszTestUsbfsRoot = pszUsbfsRoot;
     s_fTestUsbfsAccessible = fUsbfsAccessible;
-    s_pcszTestDevicesRoot = pcszDevicesRoot;
+    s_pszTestDevicesRoot = pszDevicesRoot;
     s_fTestDevicesAccessible = fDevicesAccessible;
     s_rcTestMethodInitResult = rcMethodInitResult;
 }
@@ -1590,32 +1594,32 @@ void TestUSBSetupInit(const char *pcszUsbfsRoot, bool fUsbfsAccessible,
 
 /** Specify the environment that the @a init method will see during unit
  * testing. */
-void TestUSBSetEnv(const char *pcszEnvUsb, const char *pcszEnvUsbRoot)
+void TestUSBSetEnv(const char *pszEnvUsb, const char *pszEnvUsbRoot)
 {
-    s_pcszTestEnvUsb = pcszEnvUsb;
-    s_pcszTestEnvUsbRoot = pcszEnvUsbRoot;
+    s_pszTestEnvUsb = pszEnvUsb;
+    s_pszTestEnvUsbRoot = pszEnvUsbRoot;
 }
 
 /* For testing we redefine anything that accesses the outside world to
  * return test values. */
 # define RTEnvGet(a) \
-    (  !RTStrCmp(a, "VBOX_USB") ? s_pcszTestEnvUsb \
-     : !RTStrCmp(a, "VBOX_USB_ROOT") ? s_pcszTestEnvUsbRoot \
+    (  !RTStrCmp(a, "VBOX_USB") ? s_pszTestEnvUsb \
+     : !RTStrCmp(a, "VBOX_USB_ROOT") ? s_pszTestEnvUsbRoot \
      : NULL)
-# define USBProxyLinuxCheckDeviceRoot(pcszPath, fUseNodes) \
+# define USBProxyLinuxCheckDeviceRoot(pszPath, fUseNodes) \
     (   ((fUseNodes) && s_fTestDevicesAccessible \
-         && !RTStrCmp(pcszPath, s_pcszTestDevicesRoot)) \
+         && !RTStrCmp(pszPath, s_pszTestDevicesRoot)) \
      || (!(fUseNodes) && s_fTestUsbfsAccessible \
-         && !RTStrCmp(pcszPath, s_pcszTestUsbfsRoot)))
-# define RTDirExists(pcszDir) \
-    (   (pcszDir) \
-     && (   !RTStrCmp(pcszDir, s_pcszTestDevicesRoot) \
-         || !RTStrCmp(pcszDir, s_pcszTestUsbfsRoot)))
-# define RTFileExists(pcszFile) \
-    (   (pcszFile) \
-     && s_pcszTestUsbfsRoot \
-     && !RTStrNCmp(pcszFile, s_pcszTestUsbfsRoot, strlen(s_pcszTestUsbfsRoot)) \
-     && !RTStrCmp(pcszFile + strlen(s_pcszTestUsbfsRoot), "/devices"))
+         && !RTStrCmp(pszPath, s_pszTestUsbfsRoot)))
+# define RTDirExists(pszDir) \
+    (   (pszDir) \
+     && (   !RTStrCmp(pszDir, s_pszTestDevicesRoot) \
+         || !RTStrCmp(pszDir, s_pszTestUsbfsRoot)))
+# define RTFileExists(pszFile) \
+    (   (pszFile) \
+     && s_pszTestUsbfsRoot \
+     && !RTStrNCmp(pszFile, s_pszTestUsbfsRoot, strlen(s_pszTestUsbfsRoot)) \
+     && !RTStrCmp(pszFile + strlen(s_pszTestUsbfsRoot), "/devices"))
 
 #endif /* UNIT_TEST */
 
@@ -1630,10 +1634,10 @@ void TestUSBSetEnv(const char *pcszEnvUsb, const char *pcszEnvUsbRoot)
  * @param  pfUsingUsbfsDevices  on success this will be set to true if
  *                              the prefered access method is USBFS-like and to
  *                              false if it is sysfs/device node-like
- * @param  ppcszDevicesRoot     on success the root of the tree of USBFS-like
+ * @param  ppszDevicesRoot     on success the root of the tree of USBFS-like
  *                              device nodes will be stored here
  */
-int USBProxyLinuxChooseMethod(bool *pfUsingUsbfsDevices, const char **ppcszDevicesRoot)
+int USBProxyLinuxChooseMethod(bool *pfUsingUsbfsDevices, const char **ppszDevicesRoot)
 {
     /*
      * We have two methods available for getting host USB device data - using
@@ -1646,57 +1650,57 @@ int USBProxyLinuxChooseMethod(bool *pfUsingUsbfsDevices, const char **ppcszDevic
      */
     bool fUsbfsChosen = false;
     bool fSysfsChosen = false;
-    const char *pcszUsbFromEnv = RTEnvGet("VBOX_USB");
-    const char *pcszUsbRoot = NULL;
-    if (pcszUsbFromEnv)
+    const char *pszUsbFromEnv = RTEnvGet("VBOX_USB");
+    const char *pszUsbRoot = NULL;
+    if (pszUsbFromEnv)
     {
         bool fValidVBoxUSB = true;
 
-        pcszUsbRoot = RTEnvGet("VBOX_USB_ROOT");
-        if (!RTStrICmp(pcszUsbFromEnv, "USBFS"))
+        pszUsbRoot = RTEnvGet("VBOX_USB_ROOT");
+        if (!RTStrICmp(pszUsbFromEnv, "USBFS"))
         {
             LogRel(("Default USB access method set to \"usbfs\" from environment\n"));
             fUsbfsChosen = true;
         }
-        else if (!RTStrICmp(pcszUsbFromEnv, "SYSFS"))
+        else if (!RTStrICmp(pszUsbFromEnv, "SYSFS"))
         {
             LogRel(("Default USB method set to \"sysfs\" from environment\n"));
             fSysfsChosen = true;
         }
         else
         {
-            LogRel(("Invalid VBOX_USB environment variable setting \"%s\"\n", pcszUsbFromEnv));
+            LogRel(("Invalid VBOX_USB environment variable setting \"%s\"\n", pszUsbFromEnv));
             fValidVBoxUSB = false;
-            pcszUsbFromEnv = NULL;
+            pszUsbFromEnv = NULL;
         }
-        if (!fValidVBoxUSB && pcszUsbRoot)
-            pcszUsbRoot = NULL;
+        if (!fValidVBoxUSB && pszUsbRoot)
+            pszUsbRoot = NULL;
     }
-    if (!pcszUsbRoot)
+    if (!pszUsbRoot)
     {
         if (   !fUsbfsChosen
             && USBProxyLinuxCheckDeviceRoot("/dev/vboxusb", true))
         {
             fSysfsChosen = true;
-            pcszUsbRoot = "/dev/vboxusb";
+            pszUsbRoot = "/dev/vboxusb";
         }
         else if (   !fSysfsChosen
                  && USBProxyLinuxCheckDeviceRoot("/proc/bus/usb", false))
         {
             fUsbfsChosen = true;
-            pcszUsbRoot = "/proc/bus/usb";
+            pszUsbRoot = "/proc/bus/usb";
         }
     }
-    else if (!USBProxyLinuxCheckDeviceRoot(pcszUsbRoot, fSysfsChosen))
-        pcszUsbRoot = NULL;
-    if (pcszUsbRoot)
+    else if (!USBProxyLinuxCheckDeviceRoot(pszUsbRoot, fSysfsChosen))
+        pszUsbRoot = NULL;
+    if (pszUsbRoot)
     {
         *pfUsingUsbfsDevices = fUsbfsChosen;
-        *ppcszDevicesRoot = pcszUsbRoot;
+        *ppszDevicesRoot = pszUsbRoot;
         return VINF_SUCCESS;
     }
     /* else */
-    return pcszUsbFromEnv ? VERR_NOT_FOUND
+    return pszUsbFromEnv ? VERR_NOT_FOUND
          : RTDirExists("/dev/vboxusb") ? VERR_VUSB_USB_DEVICE_PERMISSION
          : RTFileExists("/proc/bus/usb/devices") ? VERR_VUSB_USBFS_PERMISSION
          : VERR_NOT_FOUND;
@@ -1712,20 +1716,20 @@ int USBProxyLinuxChooseMethod(bool *pfUsingUsbfsDevices, const char **ppcszDevic
 /**
  * Check whether a USB device tree root is usable.
  *
- * @param pcszRoot        the path to the root of the device tree
+ * @param pszRoot        the path to the root of the device tree
  * @param fIsDeviceNodes  whether this is a device node (or usbfs) tree
  * @note  returns a pointer into a static array so it will stay valid
  */
-bool USBProxyLinuxCheckDeviceRoot(const char *pcszRoot, bool fIsDeviceNodes)
+bool USBProxyLinuxCheckDeviceRoot(const char *pszRoot, bool fIsDeviceNodes)
 {
     bool fOK = false;
     if (!fIsDeviceNodes)  /* usbfs */
     {
 #ifdef VBOX_USB_WITH_USBFS
-        if (!access(pcszRoot, R_OK | X_OK))
+        if (!access(pszRoot, R_OK | X_OK))
         {
             fOK = true;
-            PUSBDEVICE pDevices = usbfsGetDevices(pcszRoot, true);
+            PUSBDEVICE pDevices = usbfsGetDevices(pszRoot, true);
             if (pDevices)
             {
                 PUSBDEVICE pDevice;
@@ -1739,7 +1743,7 @@ bool USBProxyLinuxCheckDeviceRoot(const char *pcszRoot, bool fIsDeviceNodes)
     }
 #ifdef VBOX_USB_WITH_SYSFS
     /* device nodes */
-    else if (usbsysfsInotifyAvailable() && !access(pcszRoot, R_OK | X_OK))
+    else if (usbsysfsInotifyAvailable() && !access(pszRoot, R_OK | X_OK))
         fOK = true;
 #endif
     return fOK;
@@ -1755,22 +1759,22 @@ bool USBProxyLinuxCheckDeviceRoot(const char *pcszRoot, bool fIsDeviceNodes)
  *
  * Result should be freed using #deviceFree or something equivalent.
  *
- * @param pcszDevicesRoot  the path to the root of the device tree
+ * @param pszDevicesRoot  the path to the root of the device tree
  * @param fUseSysfs        whether to use sysfs (or usbfs) for enumeration
  */
-PUSBDEVICE USBProxyLinuxGetDevices(const char *pcszDevicesRoot, bool fUseSysfs)
+PUSBDEVICE USBProxyLinuxGetDevices(const char *pszDevicesRoot, bool fUseSysfs)
 {
     if (!fUseSysfs)
     {
 #ifdef VBOX_USB_WITH_USBFS
-        return usbfsGetDevices(pcszDevicesRoot, false);
+        return usbfsGetDevices(pszDevicesRoot, false);
 #else
         return NULL;
 #endif
     }
 
 #ifdef VBOX_USB_WITH_SYSFS
-    return usbsysfsGetDevices(pcszDevicesRoot, false);
+    return usbsysfsGetDevices(pszDevicesRoot, false);
 #else
     return NULL;
 #endif
diff --git a/src/VBox/Main/src-server/linux/USBProxyBackendLinux.cpp b/src/VBox/Main/src-server/linux/USBProxyBackendLinux.cpp
index 4e22cc7..6218576 100644
--- a/src/VBox/Main/src-server/linux/USBProxyBackendLinux.cpp
+++ b/src/VBox/Main/src-server/linux/USBProxyBackendLinux.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2005-2012 Oracle Corporation
+ * Copyright (C) 2005-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/linux/vbox-libhal.cpp b/src/VBox/Main/src-server/linux/vbox-libhal.cpp
index 30da016..9cac23c 100644
--- a/src/VBox/Main/src-server/linux/vbox-libhal.cpp
+++ b/src/VBox/Main/src-server/linux/vbox-libhal.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/os2/NetIf-os2.cpp b/src/VBox/Main/src-server/os2/NetIf-os2.cpp
index e25ff4e..e8d7b12 100644
--- a/src/VBox/Main/src-server/os2/NetIf-os2.cpp
+++ b/src/VBox/Main/src-server/os2/NetIf-os2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2010 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/os2/PerformanceOs2.cpp b/src/VBox/Main/src-server/os2/PerformanceOs2.cpp
index 054932f..f8f0316 100644
--- a/src/VBox/Main/src-server/os2/PerformanceOs2.cpp
+++ b/src/VBox/Main/src-server/os2/PerformanceOs2.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2008-2012 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/os2/USBProxyBackendOs2.cpp b/src/VBox/Main/src-server/os2/USBProxyBackendOs2.cpp
index e54c7ba..5038f25 100644
--- a/src/VBox/Main/src-server/os2/USBProxyBackendOs2.cpp
+++ b/src/VBox/Main/src-server/os2/USBProxyBackendOs2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2005-2012 Oracle Corporation
+ * Copyright (C) 2005-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/solaris/DynLoadLibSolaris.cpp b/src/VBox/Main/src-server/solaris/DynLoadLibSolaris.cpp
index 4bf51bc..323719b 100644
--- a/src/VBox/Main/src-server/solaris/DynLoadLibSolaris.cpp
+++ b/src/VBox/Main/src-server/solaris/DynLoadLibSolaris.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2010 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/solaris/DynLoadLibSolaris.h b/src/VBox/Main/src-server/solaris/DynLoadLibSolaris.h
index f172910..f824f18 100644
--- a/src/VBox/Main/src-server/solaris/DynLoadLibSolaris.h
+++ b/src/VBox/Main/src-server/solaris/DynLoadLibSolaris.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2010 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/solaris/NetIf-solaris.cpp b/src/VBox/Main/src-server/solaris/NetIf-solaris.cpp
index 0eb3f33..965e5c3 100644
--- a/src/VBox/Main/src-server/solaris/NetIf-solaris.cpp
+++ b/src/VBox/Main/src-server/solaris/NetIf-solaris.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2012 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/solaris/USBProxyBackendSolaris.cpp b/src/VBox/Main/src-server/solaris/USBProxyBackendSolaris.cpp
index 6f4a03f..c3aab8c 100644
--- a/src/VBox/Main/src-server/solaris/USBProxyBackendSolaris.cpp
+++ b/src/VBox/Main/src-server/solaris/USBProxyBackendSolaris.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2005-2014 Oracle Corporation
+ * Copyright (C) 2005-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -283,22 +283,23 @@ static int solarisWalkDeviceNode(di_node_t Node, void *pvArg)
             /*
              * Optional (some devices don't have all these)
              */
+            char *pszCopy;
             if (di_prop_lookup_strings(DDI_DEV_T_ANY, Node, "usb-product-name", &pStr) > 0)
             {
-                pCur->pszProduct = RTStrDup(pStr);
-                USBLibPurgeEncoding(pCur->pszProduct);
+                pCur->pszProduct = pszCopy = RTStrDup(pStr);
+                USBLibPurgeEncoding(pszCopy);
             }
 
             if (di_prop_lookup_strings(DDI_DEV_T_ANY, Node, "usb-vendor-name", &pStr) > 0)
             {
-                pCur->pszManufacturer = RTStrDup(pStr);
-                USBLibPurgeEncoding(pCur->pszManufacturer);
+                pCur->pszManufacturer = pszCopy = RTStrDup(pStr);
+                USBLibPurgeEncoding(pszCopy);
             }
 
             if (di_prop_lookup_strings(DDI_DEV_T_ANY, Node, "usb-serialno", &pStr) > 0)
             {
-                pCur->pszSerialNumber = RTStrDup(pStr);
-                USBLibPurgeEncoding(pCur->pszSerialNumber);
+                pCur->pszSerialNumber = pszCopy = RTStrDup(pStr);
+                USBLibPurgeEncoding(pszCopy);
             }
 
             if (pCur->bcdUSB == 0x300)
diff --git a/src/VBox/Main/src-server/win/HostDnsServiceWin.cpp b/src/VBox/Main/src-server/win/HostDnsServiceWin.cpp
index 50a847d..aff0f9f 100644
--- a/src/VBox/Main/src-server/win/HostDnsServiceWin.cpp
+++ b/src/VBox/Main/src-server/win/HostDnsServiceWin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -20,7 +20,7 @@
  * <iptypes.h> and it must be included before <windows.h>, which is
  * pulled in by IPRT headers.
  */
-#include <winsock2.h>
+#include <iprt/win/winsock2.h>
 
 #include "../HostDnsService.h"
 
@@ -31,10 +31,10 @@
 #include <iprt/err.h>
 #include <VBox/log.h>
 
-#include <Windows.h>
+#include <iprt/win/windows.h>
 #include <windns.h>
 #include <iptypes.h>
-#include <iphlpapi.h>
+#include <iprt/win/iphlpapi.h>
 
 #include <algorithm>
 #include <sstream>
diff --git a/src/VBox/Main/src-server/win/HostPowerWin.cpp b/src/VBox/Main/src-server/win/HostPowerWin.cpp
index 82d5fad..a817031 100644
--- a/src/VBox/Main/src-server/win/HostPowerWin.cpp
+++ b/src/VBox/Main/src-server/win/HostPowerWin.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -20,7 +20,7 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
-#include <windows.h>
+#include <iprt/win/windows.h>
 /* Some SDK versions lack the extern "C" and thus cause linking failures.
  * This workaround isn't pretty, but there are not many options. */
 extern "C" {
@@ -62,8 +62,9 @@ HostPowerServiceWin::~HostPowerServiceWin()
 
 
 
-DECLCALLBACK(int) HostPowerServiceWin::NotificationThread(RTTHREAD ThreadSelf, void *pInstance)
+DECLCALLBACK(int) HostPowerServiceWin::NotificationThread(RTTHREAD hThreadSelf, void *pInstance)
 {
+    RT_NOREF(hThreadSelf);
     HostPowerServiceWin *pPowerObj = (HostPowerServiceWin *)pInstance;
     HWND                 hwnd = 0;
 
@@ -213,7 +214,7 @@ LRESULT CALLBACK HostPowerServiceWin::WndProc(HWND hwnd, UINT msg, WPARAM wParam
             SetWindowLongPtr(hwnd, 0, 0);
             PostQuitMessage(0);
             return 0;
-        } 
+        }
 
         default:
             return DefWindowProc(hwnd, msg, wParam, lParam);
diff --git a/src/VBox/Main/src-server/win/NetIf-win.cpp b/src/VBox/Main/src-server/win/NetIf-win.cpp
index 0bfcc17..97846d0 100644
--- a/src/VBox/Main/src-server/win/NetIf-win.cpp
+++ b/src/VBox/Main/src-server/win/NetIf-win.cpp
@@ -29,9 +29,9 @@
 #include <list>
 
 #define _WIN32_DCOM
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#include <windows.h>
+#include <iprt/win/winsock2.h>
+#include <iprt/win/ws2tcpip.h>
+#include <iprt/win/windows.h>
 #include <tchar.h>
 
 #ifdef VBOX_WITH_NETFLT
@@ -39,7 +39,7 @@
 # include "devguid.h"
 #endif
 
-#include <iphlpapi.h>
+#include <iprt/win/iphlpapi.h>
 
 #include "Logging.h"
 #include "HostNetworkInterfaceImpl.h"
@@ -58,9 +58,9 @@
 #define INITGUID
 #include <guiddef.h>
 #include <devguid.h>
-#include <objbase.h>
-#include <setupapi.h>
-#include <shlobj.h>
+#include <iprt/win/objbase.h>
+#include <iprt/win/setupapi.h>
+#include <iprt/win/shlobj.h>
 #include <cfgmgr32.h>
 
 #define VBOX_APP_NAME L"VirtualBox"
@@ -96,8 +96,8 @@ static int getDefaultInterfaceIndex()
 
 static int collectNetIfInfo(Bstr &strName, Guid &guid, PNETIFINFO pInfo, int iDefault)
 {
-    DWORD dwRc;
-    int rc = VINF_SUCCESS;
+    RT_NOREF(strName);
+
     /*
      * Most of the hosts probably have less than 10 adapters,
      * so we'll mostly succeed from the first attempt.
@@ -106,7 +106,7 @@ static int collectNetIfInfo(Bstr &strName, Guid &guid, PNETIFINFO pInfo, int iDe
     PIP_ADAPTER_ADDRESSES pAddresses = (PIP_ADAPTER_ADDRESSES)RTMemAlloc(uBufLen);
     if (!pAddresses)
         return VERR_NO_MEMORY;
-    dwRc = GetAdaptersAddresses(AF_UNSPEC, GAA_FLAG_INCLUDE_PREFIX, NULL, pAddresses, &uBufLen);
+    DWORD dwRc = GetAdaptersAddresses(AF_UNSPEC, GAA_FLAG_INCLUDE_PREFIX, NULL, pAddresses, &uBufLen);
     if (dwRc == ERROR_BUFFER_OVERFLOW)
     {
         /* Impressive! More than 10 adapters! Get more memory and try again. */
@@ -195,7 +195,7 @@ static int collectNetIfInfo(Bstr &strName, Guid &guid, PNETIFINFO pInfo, int iDe
                         memcpy(pInfo->MACAddress.au8, pAdapter->PhysicalAddress, sizeof(pInfo->MACAddress));
                     pInfo->enmMediumType = NETIF_T_ETHERNET;
                     pInfo->enmStatus = pAdapter->OperStatus == IfOperStatusUp ? NETIF_S_UP : NETIF_S_DOWN;
-                    pInfo->bIsDefault = (pAdapter->IfIndex == iDefault);
+                    pInfo->bIsDefault = (pAdapter->IfIndex == (DWORD)iDefault);
                     RTStrFree(pszUuid);
                     break;
                 }
@@ -349,7 +349,7 @@ static HRESULT netIfNetworkInterfaceHelperClient(SVCHlpClient *aClient,
                     default:
                     {
                         endLoop = true;
-                        rc = E_FAIL;//TODO: ComAssertMsgFailedBreak((
+                        rc = E_FAIL;/// @todo ComAssertMsgFailedBreak((
                             //"Invalid message code %d (%08lX)\n",
                             //reply, reply),
                             //rc = E_FAIL);
@@ -403,7 +403,7 @@ static HRESULT netIfNetworkInterfaceHelperClient(SVCHlpClient *aClient,
                     default:
                     {
                         endLoop = true;
-                        rc = E_FAIL; // TODO: ComAssertMsgFailedBreak((
+                        rc = E_FAIL; /// @todo ComAssertMsgFailedBreak((
                             //"Invalid message code %d (%08lX)\n",
                             //reply, reply),
                             //rc = E_FAIL);
@@ -457,7 +457,7 @@ static HRESULT netIfNetworkInterfaceHelperClient(SVCHlpClient *aClient,
                     default:
                     {
                         endLoop = true;
-                        rc = E_FAIL; // TODO: ComAssertMsgFailedBreak((
+                        rc = E_FAIL; /// @todo ComAssertMsgFailedBreak((
                             //"Invalid message code %d (%08lX)\n",
                             //reply, reply),
                             //rc = E_FAIL);
@@ -515,7 +515,7 @@ static HRESULT netIfNetworkInterfaceHelperClient(SVCHlpClient *aClient,
                     default:
                     {
                         endLoop = true;
-                        rc = E_FAIL; // TODO: ComAssertMsgFailedBreak((
+                        rc = E_FAIL; /// @todo ComAssertMsgFailedBreak((
                             //"Invalid message code %d (%08lX)\n",
                             //reply, reply),
                             //rc = E_FAIL);
@@ -573,7 +573,7 @@ static HRESULT netIfNetworkInterfaceHelperClient(SVCHlpClient *aClient,
                     default:
                     {
                         endLoop = true;
-                        rc = E_FAIL; // TODO: ComAssertMsgFailedBreak((
+                        rc = E_FAIL; /// @todo ComAssertMsgFailedBreak((
                             //"Invalid message code %d (%08lX)\n",
                             //reply, reply),
                             //rc = E_FAIL);
@@ -627,7 +627,7 @@ static HRESULT netIfNetworkInterfaceHelperClient(SVCHlpClient *aClient,
                     default:
                     {
                         endLoop = true;
-                        rc = E_FAIL; // TODO: ComAssertMsgFailedBreak((
+                        rc = E_FAIL; /// @todo ComAssertMsgFailedBreak((
                             //"Invalid message code %d (%08lX)\n",
                             //reply, reply),
                             //rc = E_FAIL);
@@ -638,7 +638,7 @@ static HRESULT netIfNetworkInterfaceHelperClient(SVCHlpClient *aClient,
             break;
         }
         default:
-            rc = E_FAIL; // TODO: ComAssertMsgFailedBreak((
+            rc = E_FAIL; /// @todo ComAssertMsgFailedBreak((
 //                "Invalid message code %d (%08lX)\n",
 //                d->msgCode, d->msgCode),
 //                rc = E_FAIL);
@@ -980,14 +980,13 @@ static int vboxNetWinAddComponent(std::list<ComObjPtr<HostNetworkInterface> > *
         Assert(hr == S_OK);
         if (hr == S_OK)
         {
+            Guid guidIfCopy(IfGuid);
             NETIFINFO Info;
             RT_ZERO(Info);
-            Info.Uuid = *(Guid(IfGuid).raw());
-            rc = collectNetIfInfo(name, Guid(IfGuid), &Info, iDefaultInterface);
+            Info.Uuid = *guidIfCopy.raw();
+            rc = collectNetIfInfo(name, guidIfCopy, &Info, iDefaultInterface);
             if (RT_FAILURE(rc))
-            {
                 LogRel(("vboxNetWinAddComponent: collectNetIfInfo() -> %Rrc\n", rc));
-            }
             Log(("vboxNetWinAddComponent: adding %ls\n", lpszName));
             /* create a new object and add it to the list */
             ComObjPtr<HostNetworkInterface> iface;
@@ -1112,11 +1111,12 @@ int NetIfGetConfigByName(PNETIFINFO)
  *
  * @returns VBox status code.
  *
- * @param   pcszIfName  Interface name.
+ * @param   pszIfName   Interface name.
  * @param   penmState   Where to store the retrieved state.
  */
-int NetIfGetState(const char *pcszIfName, NETIFSTATUS *penmState)
+int NetIfGetState(const char *pszIfName, NETIFSTATUS *penmState)
 {
+    RT_NOREF(pszIfName, penmState);
     return VERR_NOT_IMPLEMENTED;
 }
 
@@ -1126,19 +1126,21 @@ int NetIfGetState(const char *pcszIfName, NETIFSTATUS *penmState)
  *
  * @returns VBox status code.
  *
- * @param   pcszIfName  Interface name.
+ * @param   pszIfName  Interface name.
  * @param   puMbits     Where to store the link speed.
  */
-int NetIfGetLinkSpeed(const char * /*pcszIfName*/, uint32_t * /*puMbits*/)
+int NetIfGetLinkSpeed(const char *pszIfName, uint32_t *puMbits)
 {
+    RT_NOREF(pszIfName, puMbits);
     return VERR_NOT_IMPLEMENTED;
 }
 
 int NetIfCreateHostOnlyNetworkInterface(VirtualBox *pVirtualBox,
                                         IHostNetworkInterface **aHostNetworkInterface,
                                         IProgress **aProgress,
-                                        const char *pcszName)
+                                        const char *pszName)
 {
+    RT_NOREF(pszName);
 #ifndef VBOX_WITH_NETFLT
     return VERR_NOT_IMPLEMENTED;
 #else
@@ -1226,12 +1228,12 @@ int NetIfRemoveHostOnlyNetworkInterface(VirtualBox *pVirtualBox, IN_GUID aId,
 
 int NetIfEnableStaticIpConfig(VirtualBox *vBox, HostNetworkInterface * pIf, ULONG aOldIp, ULONG ip, ULONG mask)
 {
+    RT_NOREF(aOldIp);
 #ifndef VBOX_WITH_NETFLT
     return VERR_NOT_IMPLEMENTED;
 #else
-    HRESULT rc;
     Bstr guid;
-    rc = pIf->COMGETTER(Id)(guid.asOutParam());
+    HRESULT rc = pIf->COMGETTER(Id)(guid.asOutParam());
     if (SUCCEEDED(rc))
     {
 //        ComPtr<VirtualBox> vBox;
@@ -1284,12 +1286,12 @@ int NetIfEnableStaticIpConfig(VirtualBox *vBox, HostNetworkInterface * pIf, ULON
 int NetIfEnableStaticIpConfigV6(VirtualBox *vBox, HostNetworkInterface * pIf, IN_BSTR aOldIPV6Address,
                                 IN_BSTR aIPV6Address, ULONG aIPV6MaskPrefixLength)
 {
+    RT_NOREF(aOldIPV6Address);
 #ifndef VBOX_WITH_NETFLT
     return VERR_NOT_IMPLEMENTED;
 #else
-    HRESULT rc;
     Bstr guid;
-    rc = pIf->COMGETTER(Id)(guid.asOutParam());
+    HRESULT rc = pIf->COMGETTER(Id)(guid.asOutParam());
     if (SUCCEEDED(rc))
     {
 //        ComPtr<VirtualBox> vBox;
@@ -1553,7 +1555,7 @@ static HRESULT netIfGetBoundAdapters(std::list<BoundAdapter> &boundAdapters)
                     INetCfgBindingInterface     *pBi;
                     if (pBp->IsEnabled() != S_OK)
                     {
-                        /* @todo some id of disabled path could be useful. */
+                        /** @todo some id of disabled path could be useful. */
                         netIfLog(("netIfGetBoundAdapters: INetCfgBindingPath is disabled (0x%x)\n", hr));
                         pBp->Release();
                         continue;
@@ -1864,7 +1866,7 @@ int NetIfList(std::list<ComObjPtr<HostNetworkInterface> > &list)
                 if (pAdapter)
                 {
                     info.enmStatus = pAdapter->OperStatus == IfOperStatusUp ? NETIF_S_UP : NETIF_S_DOWN;
-                    info.bIsDefault = (pAdapter->IfIndex == iDefault);
+                    info.bIsDefault = (pAdapter->IfIndex == (DWORD)iDefault);
                     info.bDhcpEnabled = pAdapter->Flags & IP_ADAPTER_DHCP_ENABLED;
                     netIfFillInfoWithAddresses(&info, pAdapter);
                 }
diff --git a/src/VBox/Main/src-server/win/PerformanceWin.cpp b/src/VBox/Main/src-server/win/PerformanceWin.cpp
index 388b696..6def983 100644
--- a/src/VBox/Main/src-server/win/PerformanceWin.cpp
+++ b/src/VBox/Main/src-server/win/PerformanceWin.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2008-2012 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -25,7 +25,7 @@
 #endif /* _WIN32_WINNT < 0x0500 */
 #endif /* !_WIN32_WINNT */
 
-#include <windows.h>
+#include <iprt/win/windows.h>
 #include <winternl.h>
 #include <psapi.h>
 extern "C" {
@@ -194,6 +194,7 @@ int CollectorWin::preCollect(const CollectorHints& hints, uint64_t /* iTick */)
 
 int CollectorWin::getHostCpuLoad(ULONG *user, ULONG *kernel, ULONG *idle)
 {
+    RT_NOREF(user, kernel, idle);
     return VERR_NOT_IMPLEMENTED;
 }
 
@@ -312,6 +313,7 @@ int CollectorWin::getHostMemoryUsage(ULONG *total, ULONG *used, ULONG *available
 
 int CollectorWin::getProcessCpuLoad(RTPROCESS process, ULONG *user, ULONG *kernel)
 {
+    RT_NOREF(process, user, kernel);
     return VERR_NOT_IMPLEMENTED;
 }
 
diff --git a/src/VBox/Main/src-server/win/USBProxyBackendWindows.cpp b/src/VBox/Main/src-server/win/USBProxyBackendWindows.cpp
index d8ed681..599af5b 100644
--- a/src/VBox/Main/src-server/win/USBProxyBackendWindows.cpp
+++ b/src/VBox/Main/src-server/win/USBProxyBackendWindows.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2005-2012 Oracle Corporation
+ * Copyright (C) 2005-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/win/VBoxComEvents.cpp b/src/VBox/Main/src-server/win/VBoxComEvents.cpp
deleted file mode 100644
index 6584e34..0000000
--- a/src/VBox/Main/src-server/win/VBoxComEvents.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
-/* $Id: VBoxComEvents.cpp $ */
-/** @file
- *
- *  COM Events Helper routines.
- */
-
-/*
- * Copyright (C) 2010-2016 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-#include "VBoxComEvents.h"
-// for IIDs
-#include "VirtualBoxImpl.h"
-
-ComEventsHelper::ComEventsHelper()
-{
-}
-
-ComEventsHelper::~ComEventsHelper()
-{
-}
-
-HRESULT ComEventsHelper::init(const com::Guid &aGuid)
-{
-    HRESULT            hr = 0;
-    ComPtr<ITypeLib>   ptlib;
-    ComPtr<ITypeInfo>  ptinfo;
-    int i;
-
-
-    hr = ::LoadRegTypeLib(LIBID_VirtualBox, kTypeLibraryMajorVersion, kTypeLibraryMinorVersion, LOCALE_SYSTEM_DEFAULT, ptlib.asOutParam());
-    if (FAILED(hr))
-        return hr;
-
-    hr = ptlib->GetTypeInfoOfGuid(aGuid.ref(), ptinfo.asOutParam());
-    if (FAILED(hr))
-        return hr;
-
-    TYPEATTR *pta;
-    hr = ptinfo->GetTypeAttr(&pta);
-    if (FAILED(hr))
-        return hr;
-
-    int cFuncs = pta->cFuncs;
-
-    for (i = 0; i < cFuncs; i++)
-    {
-        FUNCDESC *pfd;
-        DWORD hContext; // help context
-        BSTR fName;
-
-        hr = ptinfo->GetFuncDesc(i, &pfd);
-        if (FAILED(hr))
-            break;
-
-        hr = ptinfo->GetDocumentation(pfd->memid, &fName, NULL, &hContext, NULL);
-        if (FAILED(hr))
-	{
-            ptinfo->ReleaseFuncDesc(pfd);
-            break;
-	}
-
-        /* We only allow firing event callbacks */
-        if (_wcsnicmp(fName, L"On", 2) == 0)
-        {
-            DISPID did;
-
-            hr = ::DispGetIDsOfNames(ptinfo, &fName, 1, &did);
-            evMap.insert(ComEventsMap::value_type(com::Utf8Str(fName), did));
-
-        }
-        SysFreeString(fName);
-
-        ptinfo->ReleaseFuncDesc(pfd);
-    }
-    ptinfo->ReleaseTypeAttr(pta);
-
-    return hr;
-}
-
-HRESULT ComEventsHelper::lookup(com::Utf8Str &aName, DISPID *did)
-{
-   ComEventsMap::const_iterator it = evMap.find(aName);
-
-   if (it != evMap.end())
-   {
-       *did = it->second;
-       return S_OK;
-   }
-   else
-   {
-       *did = 0;
-       return VBOX_E_OBJECT_NOT_FOUND;
-   }
-}
-
-
-HRESULT ComEventsHelper::fire(IDispatch *aObj, ComEventDesc &event, tagVARIANT *result)
-{
-     int argc = event.mArgc;
-     tagVARIANT *args = event.mArgs;
-     DISPPARAMS disp = { args, NULL, argc, 0};
-     DISPID           dispid;
-
-     HRESULT          hr = lookup(event.mName, &dispid);
-
-     if (FAILED(hr))
-         return hr;
-
-     hr = aObj->Invoke(dispid, IID_NULL,
-                       LOCALE_USER_DEFAULT,
-                       DISPATCH_METHOD,
-                       &disp, result,
-                       NULL, NULL);
-
-     return hr;
-}
diff --git a/src/VBox/Main/src-server/win/VBoxComEvents.h b/src/VBox/Main/src-server/win/VBoxComEvents.h
deleted file mode 100644
index 72465ee..0000000
--- a/src/VBox/Main/src-server/win/VBoxComEvents.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/* $Id: VBoxComEvents.h $ */
-/** @file
- *
- *  Declaration of COM Events Helper routines.
- */
-
-/*
- * Copyright (C) 2010-2016 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-#ifndef __VBOXCOMEVENTS_h__
-#define __VBOXCOMEVENTS_h__
-
-#include <map>
-
-#include "VBox/com/string.h"
-#include "VBox/com/guid.h"
-
-#include <VBox/err.h>
-
-
-class ComEventDesc
-{
-public:
- ComEventDesc()
-   : mArgc(0), mArgs(0), mPos(0)
- {}
- ~ComEventDesc()
- {
-   if (mArgs)
-      delete [] mArgs;
- }
-
- void init(const char *name, int argc)
- {
-   // copies content
-   mName = name;
-   mArgc = argc;
-   if (mArgs)
-     delete [] mArgs;
-   mArgs = new tagVARIANT[mArgc];
-   mPos = argc - 1;
- }
-
- template <class T>
- ComEventDesc &add(T v)
- {
-   Assert(mPos>= 0);
-   mArgs[mPos] = v;
-   mPos--;
-   return *this;
- }
-
-private:
- com::Utf8Str mName;
- int          mArgc;
- tagVARIANT  *mArgs;
- int          mPos;
-
- friend class ComEventsHelper;
-};
-
-class ComEventsHelper
-{
-public:
-    ComEventsHelper();
-    ~ComEventsHelper();
-
-    HRESULT init(const com::Guid &aGuid);
-    HRESULT lookup(com::Utf8Str &aName, DISPID *did);
-    HRESULT fire(IDispatch *aObj, ComEventDesc &desc, tagVARIANT *pResult);
-
-private:
-    typedef std::map<com::Utf8Str, DISPID> ComEventsMap;
-
-    ComEventsMap evMap;
-};
-
-#endif /* __VBOXCOMEVENTS_h__ */
diff --git a/src/VBox/Main/src-server/win/svchlp.cpp b/src/VBox/Main/src-server/win/svchlp.cpp
index f550717..28b5c4a 100644
--- a/src/VBox/Main/src-server/win/svchlp.cpp
+++ b/src/VBox/Main/src-server/win/svchlp.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/win/svchlp.h b/src/VBox/Main/src-server/win/svchlp.h
index 5777bb1..446321e 100644
--- a/src/VBox/Main/src-server/win/svchlp.h
+++ b/src/VBox/Main/src-server/win/svchlp.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -24,7 +24,7 @@
 
 #include <VBox/err.h>
 
-#include <windows.h>
+#include <iprt/win/windows.h>
 
 struct SVCHlpMsg
 {
diff --git a/src/VBox/Main/src-server/win/svcmain.cpp b/src/VBox/Main/src-server/win/svcmain.cpp
index 421623f..3993bf7 100644
--- a/src/VBox/Main/src-server/win/svcmain.cpp
+++ b/src/VBox/Main/src-server/win/svcmain.cpp
@@ -16,7 +16,7 @@
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
 
-#include <Windows.h>
+#include <iprt/win/windows.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <tchar.h>
@@ -40,6 +40,7 @@
 #include <iprt/path.h>
 #include <iprt/getopt.h>
 #include <iprt/message.h>
+#include <iprt\asm.h>
 
 class CExeModule : public ATL::CComModule
 {
@@ -49,11 +50,13 @@ public:
     HANDLE hEventShutdown;
     void MonitorShutdown();
     bool StartMonitor();
+    bool HasActiveConnection();
     bool bActivity;
 };
 
-const DWORD dwTimeOut = 5000; /* time for EXE to be idle before shutting down */
-const DWORD dwPause = 100; /* time to wait for threads to finish up */
+/* Normal timeout usually used in Shutdown Monitor */
+const DWORD dwNormalTimeout = 5000;
+volatile uint32_t dwTimeOut = dwNormalTimeout; /* time for EXE to be idle before shutting down. Can be decreased at system shutdown phase. */
 
 /* Passed to CreateThread to monitor the shutdown event */
 static DWORD WINAPI MonitorProc(void* pv)
@@ -74,6 +77,11 @@ LONG CExeModule::Unlock()
     return l;
 }
 
+bool CExeModule::HasActiveConnection()
+{
+    return bActivity || GetLockCount() > 0;
+}
+
 /* Monitors the shutdown event */
 void CExeModule::MonitorShutdown()
 {
@@ -87,7 +95,7 @@ void CExeModule::MonitorShutdown()
             dwWait = WaitForSingleObject(hEventShutdown, dwTimeOut);
         } while (dwWait == WAIT_OBJECT_0);
         /* timed out */
-        if (!bActivity && GetLockCount() == 0) /* if no activity let's really bail */
+        if (!HasActiveConnection()) /* if no activity let's really bail */
         {
             /* Disable log rotation at this point, worst case a log file
              * becomes slightly bigger than it should. Avoids quirks with
@@ -111,7 +119,7 @@ void CExeModule::MonitorShutdown()
             }
 #if _WIN32_WINNT >= 0x0400
             CoSuspendClassObjects();
-            if (!bActivity && GetLockCount() == 0)
+            if (!HasActiveConnection())
 #endif
                 break;
         }
@@ -135,6 +143,160 @@ BEGIN_OBJECT_MAP(ObjectMap)
     OBJECT_ENTRY(CLSID_VirtualBox, VirtualBox)
 END_OBJECT_MAP()
 
+CExeModule _Module;
+HWND g_hMainWindow = NULL;
+HINSTANCE g_hInstance = NULL;
+#define MAIN_WND_CLASS L"VirtualBox Interface"
+
+/*
+* Wrapper for Win API function ShutdownBlockReasonCreate
+* This function defined starting from Vista only.
+*/
+BOOL ShutdownBlockReasonCreateAPI(HWND hWnd,LPCWSTR pwszReason)
+{
+    BOOL result = FALSE;
+    typedef BOOL(WINAPI *PFNSHUTDOWNBLOCKREASONCREATE)(HWND hWnd, LPCWSTR pwszReason);
+
+    PFNSHUTDOWNBLOCKREASONCREATE pfn = (PFNSHUTDOWNBLOCKREASONCREATE)GetProcAddress(
+            GetModuleHandle(L"User32.dll"), "ShutdownBlockReasonCreate");
+    _ASSERTE(pfn);
+    if (pfn)
+        result = pfn(hWnd, pwszReason);
+    return result;
+}
+
+/*
+* Wrapper for Win API function ShutdownBlockReasonDestroy
+* This function defined starting from Vista only.
+*/
+BOOL ShutdownBlockReasonDestroyAPI(HWND hWnd)
+{
+    BOOL result = FALSE;
+    typedef BOOL(WINAPI *PFNSHUTDOWNBLOCKREASONDESTROY)(HWND hWnd);
+
+    PFNSHUTDOWNBLOCKREASONDESTROY pfn = (PFNSHUTDOWNBLOCKREASONDESTROY)GetProcAddress(
+        GetModuleHandle(L"User32.dll"), "ShutdownBlockReasonDestroy");
+    _ASSERTE(pfn);
+    if (pfn)
+        result = pfn(hWnd);
+    return result;
+}
+
+
+LRESULT CALLBACK WinMainWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+    LRESULT rc = 0;
+    switch (msg)
+    {
+    case WM_QUERYENDSESSION:
+    {
+        rc = !_Module.HasActiveConnection();
+        if (!rc)
+        {
+            /* place the VBoxSVC into system shutdown list */
+            ShutdownBlockReasonCreateAPI(hwnd, L"Has active connections.");
+            /* decrease a latency of MonitorShutdown loop */
+            ASMAtomicXchgU32(&dwTimeOut, 100);
+            Log(("VBoxSVCWinMain: VBoxSvc has active connections. bActivity = %d. Loc count = %d\n",
+                _Module.bActivity, _Module.GetLockCount()));
+        }
+        Log(("VBoxSVCWinMain: WM_QUERYENDSESSION msg: %d rc= %d\n", msg, rc));
+    } break;
+    case WM_ENDSESSION:
+    {
+        /* Restore timeout of Monitor Shutdown if user canceled system shutdown */
+        if (wParam == FALSE)
+        {
+            ASMAtomicXchgU32(&dwTimeOut, dwNormalTimeout);
+            Log(("VBoxSVCWinMain: user canceled system shutdown.\n"));
+        }
+        Log(("VBoxSVCWinMain: WM_ENDSESSION msg: %d. wParam: %d. lParam: %d\n", msg, wParam, lParam));
+    } break;
+    case WM_DESTROY:
+    {
+        Log(("VBoxSVCWinMain: WM_DESTROY \n"));
+        ShutdownBlockReasonDestroyAPI(hwnd);
+        PostQuitMessage(0);
+    } break;
+
+    default:
+    {
+        Log(("VBoxSVCWinMain: msg %p\n", msg));
+        rc = DefWindowProc(hwnd, msg, wParam, lParam);
+    }
+    }
+    return rc;
+}
+
+
+int CreateMainWindow()
+{
+    int rc = VINF_SUCCESS;
+    _ASSERTE(g_hMainWindow == NULL);
+
+    LogFlow(("CreateMainWindow\n"));
+
+    g_hInstance = (HINSTANCE)GetModuleHandle(NULL);
+
+    /* Register the Window Class. */
+    WNDCLASS wc;
+    RT_ZERO(wc);
+
+    wc.style = CS_NOCLOSE;
+    wc.lpfnWndProc = WinMainWndProc;
+    wc.hInstance = g_hInstance;
+    wc.hbrBackground = (HBRUSH)(COLOR_BACKGROUND + 1);
+    wc.lpszClassName = MAIN_WND_CLASS;
+
+
+    ATOM atomWindowClass = RegisterClass(&wc);
+
+    if (atomWindowClass == 0)
+    {
+        Log(("Failed to register main window class\n"));
+        rc = VERR_NOT_SUPPORTED;
+    }
+    else
+    {
+        /* Create the window. */
+        g_hMainWindow = CreateWindowEx(WS_EX_TOOLWINDOW |  WS_EX_TOPMOST,
+            MAIN_WND_CLASS, MAIN_WND_CLASS,
+            WS_POPUPWINDOW,
+            0, 0, 1, 1, NULL, NULL, g_hInstance, NULL);
+
+        if (g_hMainWindow == NULL)
+        {
+            Log(("Failed to create main window\n"));
+            rc = VERR_NOT_SUPPORTED;
+        }
+        else
+        {
+            SetWindowPos(g_hMainWindow, HWND_TOPMOST, -200, -200, 0, 0,
+                SWP_NOACTIVATE | SWP_HIDEWINDOW | SWP_NOCOPYBITS | SWP_NOREDRAW | SWP_NOSIZE);
+
+        }
+    }
+    return 0;
+}
+
+
+void DestroyMainWindow()
+{
+    _ASSERTE(g_hMainWindow != NULL);
+    Log(("SVCMain: DestroyMainWindow \n"));
+    if (g_hMainWindow != NULL)
+    {
+        DestroyWindow(g_hMainWindow);
+        g_hMainWindow = NULL;
+
+        if (g_hInstance != NULL)
+        {
+            UnregisterClass(MAIN_WND_CLASS, g_hInstance);
+            g_hInstance = NULL;
+        }
+    }
+}
+
 
 /////////////////////////////////////////////////////////////////////////////
 //
@@ -171,7 +333,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPSTR /*lpC
      * the support driver.
      */
     RTR3InitExe(argc, &argv, 0);
-    CExeModule _Module;
+
 
     /* Note that all options are given lowercase/camel case/uppercase to
      * approximate case insensitive matching, which RTGetOpt doesn't offer. */
@@ -394,12 +556,25 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPSTR /*lpC
 #endif
         _ASSERTE(SUCCEEDED(hRes));
 
+        if (RT_SUCCESS(CreateMainWindow()))
+        {
+            Log(("SVCMain: Main window succesfully created\n"));
+        }
+        else
+        {
+            Log(("SVCMain: Failed to create main window\n"));
+        }
+
         MSG msg;
-        while (GetMessage(&msg, 0, 0, 0))
+        while (GetMessage(&msg, 0, 0, 0) > 0)
+        {
             DispatchMessage(&msg);
+            TranslateMessage(&msg);
+        }
+
+        DestroyMainWindow();
 
         _Module.RevokeClassObjects();
-        Sleep(dwPause); //wait for any threads to finish
     }
 
     _Module.Term();
diff --git a/src/VBox/Main/src-server/xpcom/server.cpp b/src/VBox/Main/src-server/xpcom/server.cpp
index 4a492c1..094691e 100644
--- a/src/VBox/Main/src-server/xpcom/server.cpp
+++ b/src/VBox/Main/src-server/xpcom/server.cpp
@@ -161,7 +161,7 @@ public:
 
                 int vrc = RTTimerLRStart(sTimer, gShutdownDelayMs * RT_NS_1MS_64);
                 AssertRC(vrc);
-                timerStarted = SUCCEEDED(vrc);
+                timerStarted = !!(SUCCEEDED(vrc));
             }
             else
             {
@@ -856,7 +856,7 @@ int main(int argc, char **argv)
         {
             RTPrintf("\nStarting event loop....\n[send TERM signal to quit]\n");
             /* now we're ready, signal the parent process */
-            PR_Write(daemon_pipe_wr, "READY", strlen("READY"));
+            PR_Write(daemon_pipe_wr, RT_STR_TUPLE("READY"));
             /* close writing end of the pipe, its job is done */
             PR_Close(daemon_pipe_wr);
         }
diff --git a/src/VBox/Main/src-server/xpcom/server.h b/src/VBox/Main/src-server/xpcom/server.h
index a6727c7..867ad0b 100644
--- a/src/VBox/Main/src-server/xpcom/server.h
+++ b/src/VBox/Main/src-server/xpcom/server.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/src-server/xpcom/server_module.cpp b/src/VBox/Main/src-server/xpcom/server_module.cpp
index f332c48..0cf98a5 100644
--- a/src/VBox/Main/src-server/xpcom/server_module.cpp
+++ b/src/VBox/Main/src-server/xpcom/server_module.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -174,7 +174,6 @@ VirtualBoxConstructor(nsISupports *aOuter, REFNSIID aIID,
     LogFlowFuncEnter();
 
     nsresult rc = NS_OK;
-    int vrc = VINF_SUCCESS;
 
     do
     {
@@ -311,7 +310,7 @@ VirtualBoxConstructor(nsISupports *aOuter, REFNSIID aIID,
     }
     while (0);
 
-    LogFlowFunc(("rc=%Rhrc (%#08x), vrc=%Rrc\n", rc, rc, vrc));
+    LogFlowFunc(("rc=%Rhrc (%#08x)\n", rc, rc));
     LogFlowFuncLeave();
 
     return rc;
diff --git a/src/VBox/Main/testcase/Makefile.kmk b/src/VBox/Main/testcase/Makefile.kmk
index de40607..691f7fe 100644
--- a/src/VBox/Main/testcase/Makefile.kmk
+++ b/src/VBox/Main/testcase/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2004-2015 Oracle Corporation
+# Copyright (C) 2004-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/testcase/tstAPI.cpp b/src/VBox/Main/testcase/tstAPI.cpp
index 401ab6f..2443fec 100644
--- a/src/VBox/Main/testcase/tstAPI.cpp
+++ b/src/VBox/Main/testcase/tstAPI.cpp
@@ -43,13 +43,14 @@ using namespace com;
 // forward declarations
 ///////////////////////////////////////////////////////////////////////////////
 
-static Bstr getObjectName(ComPtr<IVirtualBox> aVirtualBox,
-                                  ComPtr<IUnknown> aObject);
+#ifdef VBOX_WITH_RESOURCE_USAGE_API
+static Bstr getObjectName(ComPtr<IVirtualBox> aVirtualBox, ComPtr<IUnknown> aObject);
 static void queryMetrics(ComPtr<IVirtualBox> aVirtualBox,
                          ComPtr<IPerformanceCollector> collector,
                          ComSafeArrayIn(IUnknown *, objects));
 static void listAffectedMetrics(ComPtr<IVirtualBox> aVirtualBox,
                                 ComSafeArrayIn(IPerformanceMetric*, aMetrics));
+#endif
 
 // funcs
 ///////////////////////////////////////////////////////////////////////////////
@@ -1595,6 +1596,7 @@ int main(int argc, char *argv[])
 }
 
 #ifdef VBOX_WITH_RESOURCE_USAGE_API
+
 static void queryMetrics(ComPtr<IVirtualBox> aVirtualBox,
                          ComPtr<IPerformanceCollector> collector,
                          ComSafeArrayIn(IUnknown *, objects))
diff --git a/src/VBox/Main/testcase/tstCollector.cpp b/src/VBox/Main/testcase/tstCollector.cpp
index 48c0e18..7f73b92 100644
--- a/src/VBox/Main/testcase/tstCollector.cpp
+++ b/src/VBox/Main/testcase/tstCollector.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2008-2012 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -34,8 +34,8 @@
 #endif
 #ifdef RT_OS_WINDOWS
 # define _WIN32_DCOM
-# include <objidl.h>
-# include <objbase.h>
+# include <iprt/win/objidl.h>
+# include <iprt/win/objbase.h>
 # include "../src-server/win/PerformanceWin.cpp"
 #endif
 
@@ -82,7 +82,7 @@ void shutdownProcessList(std::vector<RTPROCESS> const &rProcesses)
 void measurePerformance(pm::CollectorHAL *collector, const char *pszName, int cVMs)
 {
 
-    static const char * const args[] = { pszName, "-child", NULL };
+    const char * const args[] = { pszName, "-child", NULL };
     pm::CollectorHints hints;
     std::vector<RTPROCESS> processes;
 
diff --git a/src/VBox/Main/testcase/tstGuestCtrlContextID.cpp b/src/VBox/Main/testcase/tstGuestCtrlContextID.cpp
index 38388b0..73920f6 100644
--- a/src/VBox/Main/testcase/tstGuestCtrlContextID.cpp
+++ b/src/VBox/Main/testcase/tstGuestCtrlContextID.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/testcase/tstGuestCtrlParseBuffer.cpp b/src/VBox/Main/testcase/tstGuestCtrlParseBuffer.cpp
index f58d8bb..b9ff0a2 100644
--- a/src/VBox/Main/testcase/tstGuestCtrlParseBuffer.cpp
+++ b/src/VBox/Main/testcase/tstGuestCtrlParseBuffer.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2012 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -31,6 +31,9 @@ using namespace com;
 # define BYTE uint8_t
 #endif
 
+#define STR_SIZE(a_sz) a_sz, sizeof(a_sz)
+
+
 typedef struct VBOXGUESTCTRL_BUFFER_VALUE
 {
     char *pszValue;
@@ -50,7 +53,7 @@ static struct
     uint32_t    uOffsetAfter;
     uint32_t    uMapElements;
     int         iResult;
-} aTestBlock[] =
+} g_aTestBlock[] =
 {
     /*
      * Single object parsing.
@@ -59,38 +62,39 @@ static struct
      * that we need to collect more data to do a successful parsing.
      */
     /* Invalid stuff. */
-    { NULL,                             0,                                                 0,  0,                                         0, VERR_INVALID_POINTER },
-    { NULL,                             512,                                               0,  0,                                         0, VERR_INVALID_POINTER },
-    { "",                               0,                                                 0,  0,                                         0, VERR_INVALID_PARAMETER },
-    { "",                               0,                                                 0,  0,                                         0, VERR_INVALID_PARAMETER },
-    { "foo=bar1",                       0,                                                 0,  0,                                         0, VERR_INVALID_PARAMETER },
-    { "foo=bar2",                       0,                                                 50, 50,                                        0, VERR_INVALID_PARAMETER },
+    { NULL,                             0,          0,  0,                                         0, VERR_INVALID_POINTER },
+    { NULL,                             512,        0,  0,                                         0, VERR_INVALID_POINTER },
+    { "",                               0,          0,  0,                                         0, VERR_INVALID_PARAMETER },
+    { "",                               0,          0,  0,                                         0, VERR_INVALID_PARAMETER },
+    { "foo=bar1",                       0,          0,  0,                                         0, VERR_INVALID_PARAMETER },
+    { "foo=bar2",                       0,          50, 50,                                        0, VERR_INVALID_PARAMETER },
     /* Empty buffers. */
-    { "",                               1,                                                 0,  1,                                         0, VINF_SUCCESS },
-    { "\0",                             1,                                                 0,  1,                                         0, VINF_SUCCESS },
+    { "",                               1,          0,  1,                                         0, VINF_SUCCESS },
+    { "\0",                             1,          0,  1,                                         0, VINF_SUCCESS },
     /* Unterminated values (missing "\0"). */
-    { "test1",                          sizeof("test1"),                                   0,  0,                                         0, VERR_MORE_DATA },
-    { "test2=",                         sizeof("test2="),                                  0,  0,                                         0, VERR_MORE_DATA },
-    { "test3=test3",                    sizeof("test3=test3"),                             0,  0,                                         0, VERR_MORE_DATA },
-    { "test4=test4\0t41",               sizeof("test4=test4\0t41"),                        0,  sizeof("test4=test4\0") - 1,               1, VERR_MORE_DATA },
-    { "test5=test5\0t51=t51",           sizeof("test5=test5\0t51=t51"),                    0,  sizeof("test5=test5\0") - 1,               1, VERR_MORE_DATA },
+    { STR_SIZE("test1"),                            0,  0,                                         0, VERR_MORE_DATA },
+    { STR_SIZE("test2="),                           0,  0,                                         0, VERR_MORE_DATA },
+    { STR_SIZE("test3=test3"),                      0,  0,                                         0, VERR_MORE_DATA },
+    { STR_SIZE("test4=test4\0t41"),                 0,  sizeof("test4=test4\0") - 1,               1, VERR_MORE_DATA },
+    { STR_SIZE("test5=test5\0t51=t51"),             0,  sizeof("test5=test5\0") - 1,               1, VERR_MORE_DATA },
     /* Next block unterminated. */
-    { "t51=t51\0t52=t52\0\0t53=t53",    sizeof("t51=t51\0t52=t52\0\0t53=t53"),             0,  sizeof("t51=t51\0t52=t52\0") - 1,          2, VINF_SUCCESS },
-    { "test6=test6\0\0t61=t61",         sizeof("test6=test6\0\0t61=t61"),                  0,  sizeof("test6=test6\0") - 1,               1, VINF_SUCCESS },
+    { STR_SIZE("t51=t51\0t52=t52\0\0t53=t53"),      0,  sizeof("t51=t51\0t52=t52\0") - 1,          2, VINF_SUCCESS },
+    { STR_SIZE("test6=test6\0\0t61=t61"),           0,  sizeof("test6=test6\0") - 1,               1, VINF_SUCCESS },
     /* Good stuff. */
-    { "test61=\0test611=test611\0",     sizeof("test61=\0test611=test611\0"),              0,  sizeof("test61=\0test611=test611\0") - 1,  2, VINF_SUCCESS },
-    { "test7=test7\0\0",                sizeof("test7=test7\0\0"),                         0,  sizeof("test7=test7\0") - 1,               1, VINF_SUCCESS },
-    { "test8=test8\0t81=t81\0\0",       sizeof("test8=test8\0t81=t81\0\0"),                0,  sizeof("test8=test8\0t81=t81\0") - 1,      2, VINF_SUCCESS },
+    { STR_SIZE("test61=\0test611=test611\0"),       0,  sizeof("test61=\0test611=test611\0") - 1,  2, VINF_SUCCESS },
+    { STR_SIZE("test7=test7\0\0"),                  0,  sizeof("test7=test7\0") - 1,               1, VINF_SUCCESS },
+    { STR_SIZE("test8=test8\0t81=t81\0\0"),         0,  sizeof("test8=test8\0t81=t81\0") - 1,      2, VINF_SUCCESS },
     /* Good stuff, but with a second block -- should be *not* taken into account since
      * we're only interested in parsing/handling the first object. */
-    { "t9=t9\0t91=t91\0\0t92=t92\0\0",  sizeof("t9=t9\0t91=t91\0\0t92=t92\0\0"),           0,  sizeof("t9=t9\0t91=t91\0") - 1,            2, VINF_SUCCESS },
+    { STR_SIZE("t9=t9\0t91=t91\0\0t92=t92\0\0"),    0,  sizeof("t9=t9\0t91=t91\0") - 1,            2, VINF_SUCCESS },
     /* Nasty stuff. */
-    { "���=f��\0\0",                    sizeof("���=f��\0\0"),                             0,  sizeof("���=f��\0") - 1,                   1, VINF_SUCCESS },
-    { "���=f��\0���=���",               sizeof("���=f��\0���=���"),                        0,  sizeof("���=f��\0") - 1,                   1, VERR_MORE_DATA },
+        /* iso 8859-1 encoding (?) of 'aou' all with diaeresis '=f' and 'ao' with diaeresis. */
+    { STR_SIZE("\xe4\xf6\xfc=\x66\xe4\xf6\0\0"),    0,  sizeof("\xe4\xf6\xfc=\x66\xe4\xf6\0") - 1, 1, VINF_SUCCESS },
+        /* Like above, but after the first '\0' it adds 'ooo=aaa' all letters with diaeresis. */
+    { STR_SIZE("\xe4\xf6\xfc=\x66\xe4\xf6\0\xf6\xf6\xf6=\xe4\xe4\xe4"),
+                                                    0,  sizeof("\xe4\xf6\xfc=\x66\xe4\xf6\0") - 1, 1, VERR_MORE_DATA },
     /* Some "real world" examples. */
-    { "hdr_id=vbt_stat\0hdr_ver=1\0name=foo.txt\0\0",
-                                        sizeof("hdr_id=vbt_stat\0hdr_ver=1\0name=foo.txt\0\0"),
-                                                                                           0,  sizeof("hdr_id=vbt_stat\0hdr_ver=1\0name=foo.txt\0") - 1,
+    { STR_SIZE("hdr_id=vbt_stat\0hdr_ver=1\0name=foo.txt\0\0"), 0, sizeof("hdr_id=vbt_stat\0hdr_ver=1\0name=foo.txt\0") - 1,
                                                                                                                                           3, VINF_SUCCESS }
 };
 
@@ -102,7 +106,7 @@ static struct
     uint32_t    uNumBlocks;
     /** Overall result when done parsing. */
     int         iResult;
-} aTestStream[] =
+} g_aTestStream[] =
 {
     /* No blocks. */
     { "\0\0\0\0",                                      sizeof("\0\0\0\0"),                                0, VERR_NO_DATA },
@@ -113,9 +117,9 @@ static struct
     { "b1=b1\0b2=b2\0\0\0",                            sizeof("b1=b1\0b2=b2\0\0\0"),                      1, VERR_NO_DATA }
 };
 
-int manualTest()
+int manualTest(void)
 {
-    int rc;
+    int rc = VINF_SUCCESS;
     static struct
     {
         const char *pbData;
@@ -124,19 +128,18 @@ int manualTest()
         uint32_t    uOffsetAfter;
         uint32_t    uMapElements;
         int         iResult;
-    } aTest[] =
+    } s_aTest[] =
     {
         { "test5=test5\0t51=t51",           sizeof("test5=test5\0t51=t51"),                            0,  sizeof("test5=test5\0") - 1,                   1, VERR_MORE_DATA },
         { "\0\0test5=test5\0t51=t51",       sizeof("\0\0test5=test5\0t51=t51"),                        0,  sizeof("\0\0test5=test5\0") - 1,               1, VERR_MORE_DATA },
     };
 
-    unsigned iTest = 0;
-    for (iTest; iTest < RT_ELEMENTS(aTest); iTest++)
+    for (unsigned iTest = 0; iTest < RT_ELEMENTS(s_aTest); iTest++)
     {
         RTTestIPrintf(RTTESTLVL_DEBUG, "Manual test #%d\n", iTest);
 
         GuestProcessStream stream;
-        rc = stream.AddData((BYTE*)aTest[iTest].pbData, aTest[iTest].cbData);
+        rc = stream.AddData((BYTE *)s_aTest[iTest].pbData, s_aTest[iTest].cbData);
 
         for (;;)
         {
@@ -188,68 +191,66 @@ int main()
      * -- we rely on the return values in the test(s) below. */
     RTAssertSetQuiet(true);
 
-    unsigned iTest = 0;
-    for (iTest; iTest < RT_ELEMENTS(aTestBlock); iTest++)
+    unsigned iTest;
+    for (iTest = 0; iTest < RT_ELEMENTS(g_aTestBlock); iTest++)
     {
         RTTestIPrintf(RTTESTLVL_DEBUG, "=> Test #%u\n", iTest);
 
         GuestProcessStream stream;
-        int iResult = stream.AddData((BYTE*)aTestBlock[iTest].pbData, aTestBlock[iTest].cbData);
+        int iResult = stream.AddData((BYTE*)g_aTestBlock[iTest].pbData, g_aTestBlock[iTest].cbData);
         if (RT_SUCCESS(iResult))
         {
             GuestProcessStreamBlock curBlock;
             iResult = stream.ParseBlock(curBlock);
-            if (iResult != aTestBlock[iTest].iResult)
+            if (iResult != g_aTestBlock[iTest].iResult)
             {
                 RTTestFailed(hTest, "\tReturned %Rrc, expected %Rrc\n",
-                             iResult, aTestBlock[iTest].iResult);
+                             iResult, g_aTestBlock[iTest].iResult);
             }
-            else if (stream.GetOffset() != aTestBlock[iTest].uOffsetAfter)
+            else if (stream.GetOffset() != g_aTestBlock[iTest].uOffsetAfter)
             {
-                RTTestFailed(hTest, "\tOffset %u wrong, expected %u\n",
-                             stream.GetOffset(), aTestBlock[iTest].uOffsetAfter);
+                RTTestFailed(hTest, "\tOffset %zu wrong, expected %u\n",
+                             stream.GetOffset(), g_aTestBlock[iTest].uOffsetAfter);
             }
             else if (iResult == VERR_MORE_DATA)
             {
-                RTTestIPrintf(RTTESTLVL_DEBUG, "\tMore data (Offset: %u)\n", stream.GetOffset());
+                RTTestIPrintf(RTTESTLVL_DEBUG, "\tMore data (Offset: %zu)\n", stream.GetOffset());
             }
 
             if (  (   RT_SUCCESS(iResult)
                    || iResult == VERR_MORE_DATA))
             {
-                if (curBlock.GetCount() != aTestBlock[iTest].uMapElements)
+                if (curBlock.GetCount() != g_aTestBlock[iTest].uMapElements)
                 {
                     RTTestFailed(hTest, "\tMap has %u elements, expected %u\n",
-                                 curBlock.GetCount(), aTestBlock[iTest].uMapElements);
+                                 curBlock.GetCount(), g_aTestBlock[iTest].uMapElements);
                 }
             }
 
             /* There is remaining data left in the buffer (which needs to be merged
              * with a following buffer) -- print it. */
-            uint32_t uOffset = stream.GetOffset();
-            size_t uToWrite = aTestBlock[iTest].cbData - uOffset;
-            if (uToWrite)
+            size_t off = stream.GetOffset();
+            size_t cbToWrite = g_aTestBlock[iTest].cbData - off;
+            if (cbToWrite)
             {
-                const char *pszRemaining = aTestBlock[iTest].pbData;
-                RTTestIPrintf(RTTESTLVL_DEBUG, "\tRemaining (%u):\n", uToWrite);
+                RTTestIPrintf(RTTESTLVL_DEBUG, "\tRemaining (%u):\n", cbToWrite);
 
                 /* How to properly get the current RTTESTLVL (aka IPRT_TEST_MAX_LEVEL) here?
                  * Hack alert: Using RTEnvGet for now. */
                 if (!RTStrICmp(RTEnvGet("IPRT_TEST_MAX_LEVEL"), "debug"))
-                    RTStrmWriteEx(g_pStdOut, &aTestBlock[iTest].pbData[uOffset], uToWrite - 1, NULL);
+                    RTStrmWriteEx(g_pStdOut, &g_aTestBlock[iTest].pbData[off], cbToWrite - 1, NULL);
             }
         }
     }
 
     RTTestIPrintf(RTTESTLVL_INFO, "Doing block tests ...\n");
 
-    iTest = 0;
-    for (iTest; iTest < RT_ELEMENTS(aTestStream); iTest++)
+    for (iTest = 0; iTest < RT_ELEMENTS(g_aTestStream); iTest++)
     {
         RTTestIPrintf(RTTESTLVL_DEBUG, "=> Block test #%u\n", iTest);
 
         GuestProcessStream stream;
-        int iResult = stream.AddData((BYTE*)aTestStream[iTest].pbData, aTestStream[iTest].cbData);
+        int iResult = stream.AddData((BYTE*)g_aTestStream[iTest].pbData, g_aTestStream[iTest].cbData);
         if (RT_SUCCESS(iResult))
         {
             uint32_t uNumBlocks = 0;
@@ -269,15 +270,15 @@ int main()
                     break;
             } while (RT_SUCCESS(iResult));
 
-            if (iResult != aTestStream[iTest].iResult)
+            if (iResult != g_aTestStream[iTest].iResult)
             {
                 RTTestFailed(hTest, "\tReturned %Rrc, expected %Rrc\n",
-                             iResult, aTestStream[iTest].iResult);
+                             iResult, g_aTestStream[iTest].iResult);
             }
-            else if (uNumBlocks != aTestStream[iTest].uNumBlocks)
+            else if (uNumBlocks != g_aTestStream[iTest].uNumBlocks)
             {
                 RTTestFailed(hTest, "\tReturned %u blocks, expected %u\n",
-                             uNumBlocks, aTestStream[iTest].uNumBlocks);
+                             uNumBlocks, g_aTestStream[iTest].uNumBlocks);
             }
         }
         else
diff --git a/src/VBox/Main/testcase/tstGuid.cpp b/src/VBox/Main/testcase/tstGuid.cpp
index 54650f0..8d5f8f4 100644
--- a/src/VBox/Main/testcase/tstGuid.cpp
+++ b/src/VBox/Main/testcase/tstGuid.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2014 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/testcase/tstUSBLinux.h b/src/VBox/Main/testcase/tstUSBLinux.h
index e5e0eb5..389be24 100644
--- a/src/VBox/Main/testcase/tstUSBLinux.h
+++ b/src/VBox/Main/testcase/tstUSBLinux.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2010 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/testcase/tstUSBProxyLinux.cpp b/src/VBox/Main/testcase/tstUSBProxyLinux.cpp
index 359aaec..bc20989 100644
--- a/src/VBox/Main/testcase/tstUSBProxyLinux.cpp
+++ b/src/VBox/Main/testcase/tstUSBProxyLinux.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/testcase/tstVBoxAPI.cpp b/src/VBox/Main/testcase/tstVBoxAPI.cpp
index 1c90c28..02fac81 100644
--- a/src/VBox/Main/testcase/tstVBoxAPI.cpp
+++ b/src/VBox/Main/testcase/tstVBoxAPI.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -353,7 +353,7 @@ static BOOL tstApiClean(IVirtualBox *pVBox)
 }
 
 
-int main(int argc, char **argv)
+int main()
 {
     /*
      * Initialization.
diff --git a/src/VBox/Main/testcase/tstVBoxAPIPerf.cpp b/src/VBox/Main/testcase/tstVBoxAPIPerf.cpp
index 8e7a0db..49ca718 100644
--- a/src/VBox/Main/testcase/tstVBoxAPIPerf.cpp
+++ b/src/VBox/Main/testcase/tstVBoxAPIPerf.cpp
@@ -195,7 +195,7 @@ static void tstApiPrf4(IVirtualBox *pVBox)
 
 
 
-int main(int argc, char **argv)
+int main()
 {
     /*
      * Initialization.
diff --git a/src/VBox/Main/testcase/tstVBoxAPIWin.cpp b/src/VBox/Main/testcase/tstVBoxAPIWin.cpp
index da9eb60..db8fdea 100644
--- a/src/VBox/Main/testcase/tstVBoxAPIWin.cpp
+++ b/src/VBox/Main/testcase/tstVBoxAPIWin.cpp
@@ -52,6 +52,7 @@
 
 
 #include <stdio.h>
+#include <iprt/win/windows.h>  /* Avoid -Wall warnings. */
 #include "VirtualBox.h"
 
 #define SAFE_RELEASE(x) \
@@ -255,44 +256,38 @@ int testStartVM(IVirtualBox *virtualBox)
 }
 
 
-int main(int argc, char *argv[])
+int main()
 {
-    HRESULT rc;
-    IVirtualBoxClient *virtualBoxClient;
-    IVirtualBox *virtualBox;
+    /* Initialize the COM subsystem. */
+    CoInitialize(NULL);
 
-    do
+    /* Instantiate the VirtualBox root object. */
+    IVirtualBoxClient *virtualBoxClient;
+    HRESULT rc = CoCreateInstance(CLSID_VirtualBoxClient, /* the VirtualBoxClient object */
+                                  NULL,                   /* no aggregation */
+                                  CLSCTX_INPROC_SERVER,   /* the object lives in the current process */
+                                  IID_IVirtualBoxClient,  /* IID of the interface */
+                                  (void**)&virtualBoxClient);
+    if (SUCCEEDED(rc))
     {
-        /* Initialize the COM subsystem. */
-        CoInitialize(NULL);
-
-        /* Instantiate the VirtualBox root object. */
-        rc = CoCreateInstance(CLSID_VirtualBoxClient, /* the VirtualBoxClient object */
-                              NULL,                   /* no aggregation */
-                              CLSCTX_INPROC_SERVER,   /* the object lives in the current process */
-                              IID_IVirtualBoxClient,  /* IID of the interface */
-                              (void**)&virtualBoxClient);
+        IVirtualBox *virtualBox;
+        rc = virtualBoxClient->get_VirtualBox(&virtualBox);
         if (SUCCEEDED(rc))
-            virtualBoxClient->get_VirtualBox(&virtualBox);
-
-        if (!SUCCEEDED(rc))
         {
-            printf("Error creating VirtualBox instance! rc = 0x%x\n", rc);
-            break;
-        }
+            listVMs(virtualBox);
 
-        listVMs(virtualBox);
+            testErrorInfo(virtualBox);
 
-        testErrorInfo(virtualBox);
+            /* Enable the following line to get a VM started. */
+            //testStartVM(virtualBox);
 
-        /* Enable the following line to get a VM started. */
-        //testStartVM(virtualBox);
-
-        /* Release the VirtualBox object. */
-        virtualBox->Release();
-        virtualBoxClient->Release();
-
-    } while (0);
+            /* Release the VirtualBox object. */
+            virtualBox->Release();
+            virtualBoxClient->Release();
+        }
+        else
+            printf("Error creating VirtualBox instance! rc = 0x%x\n", rc);
+    }
 
     CoUninitialize();
     return 0;
diff --git a/src/VBox/Main/testcase/tstVBoxAPIXPCOM.cpp b/src/VBox/Main/testcase/tstVBoxAPIXPCOM.cpp
index 71caca4..356a40a 100644
--- a/src/VBox/Main/testcase/tstVBoxAPIXPCOM.cpp
+++ b/src/VBox/Main/testcase/tstVBoxAPIXPCOM.cpp
@@ -8,7 +8,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -432,7 +432,7 @@ void createVM(IVirtualBox *virtualBox)
 // main
 ///////////////////////////////////////////////////////////////////////////////
 
-int main(int argc, char *argv[])
+int main()
 {
     /*
      * Check that PRUnichar is equal in size to what compiler composes L""
diff --git a/src/VBox/Main/testcase/tstVBoxMultipleVM.cpp b/src/VBox/Main/testcase/tstVBoxMultipleVM.cpp
index 0bc641a..9d3e36f 100644
--- a/src/VBox/Main/testcase/tstVBoxMultipleVM.cpp
+++ b/src/VBox/Main/testcase/tstVBoxMultipleVM.cpp
@@ -43,14 +43,8 @@ using namespace com;
 
 
 /*********************************************************************************************************************************
-*   Global Variables & defs                                                                                                         *
+*   Structures and Typedefs                                                                                                      *
 *********************************************************************************************************************************/
-typedef std::vector<Bstr>       TMachinesList;
-static volatile bool            g_RunTest = true;
-static RTSEMEVENT               g_PingEevent;
-static volatile uint64_t        g_Counter = 0;
-static RTTEST                   g_hTest;
-
 /* Arguments of test thread */
 struct TestThreadArgs
 {
@@ -65,7 +59,17 @@ struct TestThreadArgs
     uint32_t numberMachines;
 };
 
-static TestThreadArgs g_Args;
+
+/*********************************************************************************************************************************
+*   Global Variables & defs                                                                                                      *
+*********************************************************************************************************************************/
+static RTTEST                   g_hTest;
+#ifdef RT_ARCH_AMD64
+typedef std::vector<Bstr>       TMachinesList;
+static volatile bool            g_RunTest = true;
+static RTSEMEVENT               g_PingEevent;
+static volatile uint64_t        g_Counter = 0;
+static TestThreadArgs           g_Args;
 
 
 /** Worker for TST_COM_EXPR(). */
@@ -140,66 +144,68 @@ static int tstStartVM(IVirtualBox *pVBox, ISession *pSession, Bstr machineID, bo
 
 static int tstStopVM(IVirtualBox* pVBox, ISession* pSession, Bstr machineID, bool fSkipUnlock)
 {
-    HRESULT rc;
-    MachineState_T machineState;
     ComPtr<IMachine> machine;
-    Bstr machineName;
-
-    rc = TST_COM_EXPR(pVBox->FindMachine(machineID.raw(), machine.asOutParam()));
-    if(SUCCEEDED(rc))
-        rc = TST_COM_EXPR(machine->COMGETTER(Name)(machineName.asOutParam()));
-    if(SUCCEEDED(rc))
-        rc = TST_COM_EXPR(machine->COMGETTER(State)(&machineState));
-    // check that machine is in running state
-    if (   SUCCEEDED(rc)
-        && (   machineState == MachineState_Running
-            || machineState == MachineState_Paused))
+    HRESULT rc = TST_COM_EXPR(pVBox->FindMachine(machineID.raw(), machine.asOutParam()));
+    if (SUCCEEDED(rc))
     {
-        ComPtr<IConsole> console;
-        ComPtr<IProgress> progress;
-
-        rc = TST_COM_EXPR(machine->LockMachine(pSession, LockType_Shared));
-        if(SUCCEEDED(rc))
-            TST_COM_EXPR(pSession->COMGETTER(Console)(console.asOutParam()));
-        if(SUCCEEDED(rc))
-            rc = console->PowerDown(progress.asOutParam());
-        if (SUCCEEDED(rc) && !progress.isNull())
+        Bstr machineName;
+        rc = TST_COM_EXPR(machine->COMGETTER(Name)(machineName.asOutParam()));
+        if (SUCCEEDED(rc))
         {
-            //RTPrintf("Stopping VM %ls...\n", machineName.raw());
-            CHECK_ERROR_L(progress, WaitForCompletion(-1));
-            if (SUCCEEDED(rc))
+            MachineState_T machineState;
+            rc = TST_COM_EXPR(machine->COMGETTER(State)(&machineState));
+            // check that machine is in running state
+            if (   SUCCEEDED(rc)
+                && (   machineState == MachineState_Running
+                    || machineState == MachineState_Paused))
             {
-                BOOL completed = true;
-                CHECK_ERROR_L(progress, COMGETTER(Completed)(&completed));
-                if (SUCCEEDED(rc))
+                ComPtr<IConsole> console;
+                ComPtr<IProgress> progress;
+
+                rc = TST_COM_EXPR(machine->LockMachine(pSession, LockType_Shared));
+                if(SUCCEEDED(rc))
+                    TST_COM_EXPR(pSession->COMGETTER(Console)(console.asOutParam()));
+                if(SUCCEEDED(rc))
+                    rc = console->PowerDown(progress.asOutParam());
+                if (SUCCEEDED(rc) && !progress.isNull())
                 {
-                    //ASSERT(completed);
-                    LONG iRc;
-                    CHECK_ERROR_L(progress, COMGETTER(ResultCode)(&iRc));
+                    //RTPrintf("Stopping VM %ls...\n", machineName.raw());
+                    CHECK_ERROR_L(progress, WaitForCompletion(-1));
                     if (SUCCEEDED(rc))
                     {
-                        if (FAILED(iRc))
+                        BOOL completed = true;
+                        CHECK_ERROR_L(progress, COMGETTER(Completed)(&completed));
+                        if (SUCCEEDED(rc))
                         {
-                            ProgressErrorInfo info(progress);
-                            RTPrintf("Stop VM %ls failed. Warning: %ls.\n", machineName.raw(), info.getText().raw());
-                            rc = iRc;
-                        }
-                        else
-                        {
-                            RTPrintf("VM '%ls' stopped.\n", machineName.raw());
+                            //ASSERT(completed);
+                            LONG iRc;
+                            CHECK_ERROR_L(progress, COMGETTER(ResultCode)(&iRc));
+                            if (SUCCEEDED(rc))
+                            {
+                                if (FAILED(iRc))
+                                {
+                                    ProgressErrorInfo info(progress);
+                                    RTPrintf("Stop VM %ls failed. Warning: %ls.\n", machineName.raw(), info.getText().raw());
+                                    rc = iRc;
+                                }
+                                else
+                                {
+                                    RTPrintf("VM '%ls' stopped.\n", machineName.raw());
+                                }
+                            }
                         }
                     }
+                    if (!fSkipUnlock)
+                        pSession->UnlockMachine();
+                    else
+                        RTPrintf("Session unlock skipped.\n");
                 }
             }
-            if (!fSkipUnlock)
-                pSession->UnlockMachine();
-            else
-                RTPrintf("Session unlock skipped.\n");
         }
     }
     return rc;
 }
- 
+
 
 /**
  * Get random @a maxCount machines from list of existing VMs.
@@ -208,36 +214,36 @@ static int tstStopVM(IVirtualBox* pVBox, ISession* pSession, Bstr machineID, boo
  */
 static int tstGetMachinesList(IVirtualBox *pVBox, uint32_t maxCount, TMachinesList &listToFill)
 {
-    HRESULT rc;
-    size_t machinesCount = 0;
     com::SafeIfaceArray<IMachine> machines;
-    
-    TST_COM_EXPR(pVBox->COMGETTER(Machines)(ComSafeArrayAsOutParam(machines)));
-
-    machinesCount = RT_MIN(machines.size(), maxCount);
-    for (size_t i = 0; i < machinesCount; ++i)
+    HRESULT rc = TST_COM_EXPR(pVBox->COMGETTER(Machines)(ComSafeArrayAsOutParam(machines)));
+    if (SUCCEEDED(rc))
     {
-        // choose random index of machine
-        uint32_t idx = RTRandU32Ex(0, (uint32_t)machines.size() - 1);
-        if (machines[idx])
+
+        size_t cMachines = RT_MIN(machines.size(), maxCount);
+        for (size_t i = 0; i < cMachines; ++i)
         {
-            Bstr bstrId;
-            Bstr machineName;
-            CHECK_ERROR_L(machines[idx], COMGETTER(Id)(bstrId.asOutParam()));
-            if (SUCCEEDED(rc))
-                CHECK_ERROR_L(machines[idx], COMGETTER(Name)(machineName.asOutParam()));
-            if (SUCCEEDED(rc))
+            // choose random index of machine
+            uint32_t idx = RTRandU32Ex(0, (uint32_t)machines.size() - 1);
+            if (machines[idx])
             {
-                if (Utf8Str(machineName).startsWith("umtvm"))
-                    listToFill.push_back(bstrId);
+                Bstr bstrId;
+                Bstr machineName;
+                CHECK_ERROR_L(machines[idx], COMGETTER(Id)(bstrId.asOutParam()));
+                if (SUCCEEDED(rc))
+                    CHECK_ERROR_L(machines[idx], COMGETTER(Name)(machineName.asOutParam()));
+                if (SUCCEEDED(rc))
+                {
+                    if (Utf8Str(machineName).startsWith("umtvm"))
+                        listToFill.push_back(bstrId);
+                }
             }
         }
-    }
 
-    // remove duplicates from the vector
-    std::sort(listToFill.begin(), listToFill.end());
-    listToFill.erase(std::unique(listToFill.begin(), listToFill.end()), listToFill.end());
-    RTPrintf("Filled pack of %d from %d machines.\n", listToFill.size(), machines.size());
+        // remove duplicates from the vector
+        std::sort(listToFill.begin(), listToFill.end());
+        listToFill.erase(std::unique(listToFill.begin(), listToFill.end()), listToFill.end());
+        RTPrintf("Filled pack of %d from %d machines.\n", listToFill.size(), machines.size());
+    }
 
     return rc;
 }
@@ -250,7 +256,7 @@ static int tstMachinesPack(IVirtualBox *pVBox, uint32_t maxPackSize, uint32_t pe
     bool alwaysUnlock = false;
     uint64_t percN = 0;
 
-    // choose and fill pack of machines for test 
+    // choose and fill pack of machines for test
     tstGetMachinesList(pVBox, maxPackSize, machinesList);
 
     RTPrintf("Start test.\n");
@@ -262,7 +268,7 @@ static int tstMachinesPack(IVirtualBox *pVBox, uint32_t maxPackSize, uint32_t pe
         alwaysUnlock = true;
 
     // start all machines in pack
-    for (TMachinesList::iterator it = machinesList.begin(); 
+    for (TMachinesList::iterator it = machinesList.begin();
          it != machinesList.end() && g_RunTest;
          ++it)
     {
@@ -276,7 +282,7 @@ static int tstMachinesPack(IVirtualBox *pVBox, uint32_t maxPackSize, uint32_t pe
         RTThreadSleep(100);
     }
     // stop all machines in the pack
-    for (TMachinesList::iterator it = machinesList.begin(); 
+    for (TMachinesList::iterator it = machinesList.begin();
          it != machinesList.end() && g_RunTest;
          ++it)
     {
@@ -304,7 +310,7 @@ static Bstr tstMakeMachineName(int i)
 
 static int tstCreateMachines(IVirtualBox *pVBox)
 {
-    HRESULT rc;
+    HRESULT rc = S_OK;
     // create machines for the test
     for (uint32_t i = 0; i < g_Args.numberMachines; i++)
     {
@@ -334,8 +340,8 @@ static int tstCreateMachines(IVirtualBox *pVBox)
 
 static int tstClean(IVirtualBox *pVBox, IVirtualBoxClient *pClient)
 {
-    HRESULT rc;
-    MachineState_T machineState;
+    NOREF(pClient);
+    HRESULT rc = S_OK;
 
     // stop all machines created for the test
     for (uint32_t i = 0; i < g_Args.numberMachines; i++)
@@ -352,13 +358,17 @@ static int tstClean(IVirtualBox *pVBox, IVirtualBoxClient *pClient)
 
         // try to stop it again if it was not stopped
         if (SUCCEEDED(rc))
-            CHECK_ERROR_L(machine, COMGETTER(State)(&machineState));
-        if (machineState == MachineState_Running
-            || machineState == MachineState_Paused)
         {
-            rc = session.createInprocObject(CLSID_Session);
-            if (SUCCEEDED(rc))
-                tstStopVM(pVBox, session, machineName, FALSE);
+            MachineState_T machineState;
+            CHECK_ERROR_L(machine, COMGETTER(State)(&machineState));
+            if (   SUCCEEDED(rc)
+                && (   machineState == MachineState_Running
+                    || machineState == MachineState_Paused) )
+            {
+                rc = session.createInprocObject(CLSID_Session);
+                if (SUCCEEDED(rc))
+                    tstStopVM(pVBox, session, machineName, FALSE);
+            }
         }
 
         if (SUCCEEDED(rc))
@@ -374,8 +384,9 @@ static int tstClean(IVirtualBox *pVBox, IVirtualBoxClient *pClient)
 }
 
 
-static DECLCALLBACK(int) tstThreadRun(RTTHREAD thread, void *pvUser)
+static DECLCALLBACK(int) tstThreadRun(RTTHREAD hThreadSelf, void *pvUser)
 {
+    RT_NOREF(hThreadSelf);
     TestThreadArgs* args = (TestThreadArgs*)pvUser;
     Assert(args != NULL);
     uint32_t maxPackSize = args->machinesPackSize;
@@ -430,7 +441,7 @@ static int ParseArguments(int argc, char **argv, TestThreadArgs *pArgs)
     int rc = RTGetOptInit(&GetState, argc, argv, s_aOptions, RT_ELEMENTS(s_aOptions), 1, 0 /*fFlags*/);
     AssertRCReturn(rc, rc);
     AssertPtr(pArgs);
-    
+
     while ((rc = RTGetOpt(&GetState, &ValueUnion)) != 0)
     {
         switch (rc)
@@ -487,6 +498,8 @@ static int ParseArguments(int argc, char **argv, TestThreadArgs *pArgs)
     return rc;
 }
 
+#endif /* RT_ARCH_AMD64 */
+
 
 /**
  *
@@ -505,6 +518,7 @@ static int ParseArguments(int argc, char **argv, TestThreadArgs *pArgs)
  */
 int main(int argc, char **argv)
 {
+    RT_NOREF(argc, argv);
     RTEXITCODE rcExit = RTTestInitAndCreate("tstVBoxMultipleVM", &g_hTest);
     if (rcExit != RTEXITCODE_SUCCESS)
         return rcExit;
@@ -516,9 +530,8 @@ int main(int argc, char **argv)
     /*
      * Linux OOM killer when running many VMs on a 32-bit host.
      */
-    RTTestSkipped(g_hTest, "Warning: the test can be processed on 64-bit hosts only.\n");
-    return RTTestSummaryAndDestroy(g_hTest);
-#endif
+    return RTTestSkipAndDestroy(g_hTest, "The test can only run reliably on 64-bit hosts.");
+#else  /* RT_ARCH_AMD64 */
 
     RTPrintf("Initializing ...\n");
     int rc = RTSemEventCreate(&g_PingEevent);
@@ -583,5 +596,6 @@ int main(int argc, char **argv)
     else
         RTTestPassed(g_hTest, "Test finished.\n");
     return RTTestSummaryAndDestroy(g_hTest);
+#endif /* RT_ARCH_AMD64 */
 }
 
diff --git a/src/VBox/Main/webservice/Makefile.kmk b/src/VBox/Main/webservice/Makefile.kmk
index de510b0..611dff5 100644
--- a/src/VBox/Main/webservice/Makefile.kmk
+++ b/src/VBox/Main/webservice/Makefile.kmk
@@ -6,7 +6,7 @@
 #
 
 #
-# Copyright (C) 2007-2015 Oracle Corporation
+# Copyright (C) 2007-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -206,32 +206,33 @@ TEMPLATE_VBOXWEBR3EXE_CXXFLAGS = $(filter-out $(VBOX_GCC_fvisibility-hidden) $(V
 
 ifdef VBOX_GSOAP_INSTALLED
  ifndef VBOX_ONLY_SDK
- #
- # vboxsoap - Library used by both the programs (save build time).
- #
- LIBRARIES += vboxsoap
- vboxsoap_TEMPLATE = VBOXWEBR3EXE
- vboxsoap_CXXFLAGS.win += -bigobj
- ifn1of ($(KBUILD_TARGET), win)
-  vboxsoap_CXXFLAGS += -Wno-shadow
- endif
- vboxsoap_INCS := \
-	$(VBOX_GSOAP_INCS) \
-	$(VBOXWEB_OUT_DIR) \
-	$(PATH_SUB_CURRENT)
- ifdef VBOX_WITH_WEBSERVICES_SSL
-  vboxsoap_DEFS += WITH_OPENSSL
-  vboxsoap_SDKS += VBOX_OPENSSL2
- endif
- ifdef VBOX_WITHOUT_SPLIT_SOAPC
-  vboxsoap_SOURCES = \
-	$(VBOXWEB_OUT_DIR)/soapC.cpp
- else
-  BLDPROGS += split-soapC
-  split-soapC_TEMPLATE = VBoxBldProg
-  split-soapC_SOURCES = split-soapC.cpp
+  #
+  # vboxsoap - Library used by both the programs (save build time).
+  #
+  LIBRARIES += vboxsoap
+  vboxsoap_TEMPLATE = VBOXWEBR3EXE
+  vboxsoap_CXXFLAGS += $(VBOX_C_CXX_FLAGS_NO_UNUSED_PARAMETERS)
+  vboxsoap_CXXFLAGS.win += -bigobj
+  ifn1of ($(KBUILD_TARGET), win)
+   vboxsoap_CXXFLAGS += -Wno-shadow -Wno-parentheses $(VBOX_GCC_Wno-literal-suffix)
+  endif
+  vboxsoap_INCS := \
+  	$(VBOX_GSOAP_INCS) \
+  	$(VBOXWEB_OUT_DIR) \
+  	$(PATH_SUB_CURRENT)
+  ifdef VBOX_WITH_WEBSERVICES_SSL
+   vboxsoap_DEFS += WITH_OPENSSL
+   vboxsoap_SDKS += VBOX_OPENSSL2
+  endif
+  ifdef VBOX_WITHOUT_SPLIT_SOAPC
+   vboxsoap_SOURCES = \
+   	$(VBOXWEB_OUT_DIR)/soapC.cpp
+  else
+   BLDPROGS += split-soapC
+   split-soapC_TEMPLATE = VBoxBldProg
+   split-soapC_SOURCES = split-soapC.cpp
 
-  vboxsoap_SOURCES = \
+   vboxsoap_SOURCES = \
 	$(VBOXWEB_OUT_DIR)/soapC-1.cpp \
 	$(VBOXWEB_OUT_DIR)/soapC-2.cpp \
 	$(VBOXWEB_OUT_DIR)/soapC-3.cpp \
@@ -253,35 +254,50 @@ ifdef VBOX_GSOAP_INSTALLED
 	$(VBOXWEB_OUT_DIR)/soapC-19.cpp \
 	$(VBOXWEB_OUT_DIR)/soapC-20.cpp
   vboxsoap_CXXFLAGS += \
-	$(VBOX_GCC_Wno-vla)
- endif
- vboxsoap_CLEAN := $(vboxsoap_SOURCES) # lazy bird
- vboxsoap_SOURCES += \
-	$(VBOX_GSOAP_CXX_SOURCES)
- vboxsoap_ORDERDEPS = \
-	$(VBOXWEB_IDL_SRC) \
-	$(VBOXWEB_OUT_DIR)/gsoap_copy_all_ts
- ifn1of ($(KBUILD_TARGET), win)
-  $(VBOX_GSOAP_CXX_SOURCES)_CXXFLAGS = -Wno-format
-  # currently necessary when compiling against OpenSSL 1.0 due to a missing
-  # typecase from 'const v3_ext_method*' to 'aka v3_ext_method*'.
-  $(VBOX_GSOAP_CXX_SOURCES)_CXXFLAGS += -fpermissive
+  	$(VBOX_GCC_Wno-vla)
+  endif
+  vboxsoap_CLEAN := $(vboxsoap_SOURCES) # lazy bird
+  vboxsoap_SOURCES += \
+  	$(VBOX_GSOAP_CXX_SOURCES)
+  vboxsoap_ORDERDEPS = \
+  	$(VBOXWEB_IDL_SRC) \
+  	$(VBOXWEB_OUT_DIR)/gsoap_copy_all_ts
+  ifn1of ($(KBUILD_TARGET), win)
+   $(VBOX_GSOAP_CXX_SOURCES)_CXXFLAGS = -Wno-format
+   # currently necessary when compiling against OpenSSL 1.0 due to a missing
+   # typecase from 'const v3_ext_method*' to 'aka v3_ext_method*'.
+   $(VBOX_GSOAP_CXX_SOURCES)_CXXFLAGS += -fpermissive
 
- endif
- $(VBOXWEB_OUT_DIR)/soapC-3.cpp_CXXFLAGS.win.x86 = -Og- # VCC70 says "function too large".
-
-ifdef VBOX_SOAP_PRECOMPILED_HEADER
- # This'll save a few seconds, but the compiler invocation currently makes it impracticable. This will
- # be addressed in a future kBuild version, by adding PCH support or/and by adding some helpers to
- # gather the required data (DEFS,INCS,CXXTOOL,CXXFLAGS).
- vboxsoap_INTERMEDIATES += $(VBOXWEB_OUT_DIR)/soapH.h.gch
- vboxsoap_CXXFLAGS += -Winvalid-pch -H
- vboxsoap_CLEAN += $(VBOXWEB_OUT_DIR)/soapH.h.gch
-
-$(VBOXWEB_OUT_DIR)/soapH.h.gch: $(VBOXWEB_OUT_DIR)/soapH.h
-	g++ -x c++-header -g -g -Wall -pedantic -Wno-long-long -Wno-trigraphs -Wno-variadic-macros -pipe -O0 -fno-omit-frame-pointer -fno-strict-aliasing -fvisibility-inlines-hidden -fvisibility=hidden -DVBOX_HAVE_VISIBILITY_HIDDEN -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -m32 -I/Volumes/ScratchHFS/bird/vbox/svn/trunk/src/VBox/Main/webservice/gsoap -I/Volumes/ScratchHFS/bird/vbox/svn/trunk/out/darwin.x86/debug/obj/src/VBox/Main -I/Volumes/ScratchHFS/bird/vbox/svn/trun [...]
+  endif
+  $(VBOXWEB_OUT_DIR)/soapC-3.cpp_CXXFLAGS.win.x86 = -Og- # VCC70 says "function too large".
+
+  if "$(KBUILD_TARGET)" == "win" && "$(VBOX_GSOAP_CXX_SOURCES)" != ""
+   $(VBOX_GSOAP_CXX_SOURCES)_CXXFLAGS.win += -wd4668 # preprocessor / windows.h
+   $(VBOX_GSOAP_CXX_SOURCES)_CXXFLAGS.win += -wd4211 # nonstandard extension used: redefined extern to static
+   $(VBOX_GSOAP_CXX_SOURCES)_CXXFLAGS.win += -wd4310 # cast truncates constant value
+  endif
+
+  ifdef VBOX_SOAP_PRECOMPILED_HEADER
+   # This'll save a few seconds, but the compiler invocation currently makes it impracticable. This will
+   # be addressed in a future kBuild version, by adding PCH support or/and by adding some helpers to
+   # gather the required data (DEFS,INCS,CXXTOOL,CXXFLAGS).
+   vboxsoap_INTERMEDIATES += $(VBOXWEB_OUT_DIR)/soapH.h.gch
+   vboxsoap_CXXFLAGS += -Winvalid-pch -H
+   vboxsoap_CLEAN += $(VBOXWEB_OUT_DIR)/soapH.h.gch
+
+   $(VBOXWEB_OUT_DIR)/soapH.h.gch: $(VBOXWEB_OUT_DIR)/soapH.h
+	g++ -x c++-header -g -g -Wall -pedantic -Wno-long-long -Wno-trigraphs -Wno-variadic-macros -pipe -O0 -fno-omit-frame-pointer \
+		-fno-strict-aliasing -fvisibility-inlines-hidden -fvisibility=hidden -DVBOX_HAVE_VISIBILITY_HIDDEN \
+		-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -m32 \
+		-I/Volumes/ScratchHFS/bird/vbox/svn/trunk/src/VBox/Main/webservice/gsoap \
+		-I/Volumes/ScratchHFS/bird/vbox/svn/trunk/out/darwin.x86/debug/obj/src/VBox/Main \
+		-I/Volumes/ScratchHFS/bird/vbox/svn/trunk/src/VBox/Main/webservice \
+		-I/Volumes/ScratchHFS/bird/vbox/svn/trunk/include -I/Volumes/ScratchHFS/bird/vbox/svn/trunk/out/darwin.x86/debug
+		\-DVBOX -DVBOX_WITH_DEBUGGER -DVBOX_WITH_DEBUGGER_GUI -DDEBUG -DDEBUG_bird -DDEBUG_USERNAME=bird -DRT_OS_DARWIN \
+		-D__DARWIN__ -DRT_ARCH_X86 -D__X86__ -DVBOX_WITH_HYBRID_32BIT_KERNEL -DIN_RING3 -DHC_ARCH_BITS=32 -DGC_ARCH_BITS=32 \
+		-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 -DMAC_OS_X_VERSION_MAX_ALLOWED=1040 \
 		$< -o $@
-endif
+  endif
  endif # !VBOX_ONLY_SDK
 
 
@@ -298,7 +314,7 @@ endif
 	.
  vboxwebsrv_CXXFLAGS.win += -bigobj
  ifn1of ($(KBUILD_TARGET), win)
-  vboxwebsrv_CXXFLAGS += -Wno-shadow
+  vboxwebsrv_CXXFLAGS += -Wno-shadow $(VBOX_GCC_Wno-literal-suffix)
  endif
  vboxwebsrv_LIBS += \
 	$(PATH_STAGE_LIB)/vboxsoap$(VBOX_SUFF_LIB) \
@@ -700,14 +716,20 @@ GSOAPH_RELEVANT = $(VBOXWEB_GSOAPH_FROM_XSLT)
 # generate server and client code from gsoap pseudo-C header file
 $(VBOXWEB_OUT_DIR)/gsoap_generate_all_ts \
 + $(VBOXWEB_OUT_DIR)/soapH.h \
-+ $(VBOXWEB_OUT_DIR)/soapStub.h \
++ $(VBOXWEB_SOAP_CLIENT_H) \
 + $(VBOXWEB_OUT_DIR)/soapC.cpp \
 + $(VBOXWEB_OUT_DIR)/soapClient.cpp \
 + $(VBOXWEB_OUT_DIR)/soapServer.cpp \
-: $(VBOXWEB_GSOAPH_FROM_GSOAP) $(VBOXWEB_GSOAPH_FROM_XSLT) $(VBOX_NSMAP) $(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@)
+: $(VBOXWEB_GSOAPH_FROM_GSOAP) $(VBOXWEB_GSOAPH_FROM_XSLT) $(VBOX_NSMAP) $(VBOX_PATH_WEBSERVICE)/stdsoap2.sed \
+		$(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@)
 	$(call MSG_GENERATE,,lots of files,$(GSOAPH_RELEVANT))
 	$(RM) -f $@
 	$(REDIRECT) -C $(VBOXWEB_OUT_DIR) -- $(VBOX_SOAPCPP2) $(VBOXWEB_SOAPCPP2_SKIP_FILES) -L -2 -w -I$(VBOX_PATH_GSOAP_IMPORT) $(GSOAPH_RELEVANT)
+ifeq ($(KBUILD_TARGET),win) # MSC -Wall workaround.
+	$(CP) -f "$(VBOXWEB_SOAP_CLIENT_H)" "$(VBOXWEB_SOAP_CLIENT_H).tmp"
+	$(SED) -f $(VBOX_PATH_WEBSERVICE)/stdsoap2.sed --output "$(VBOXWEB_SOAP_CLIENT_H)" "$(VBOXWEB_SOAP_CLIENT_H).tmp"
+	$(RM) -f "$(VBOXWEB_SOAP_CLIENT_H).tmp"
+endif
 	$(APPEND) $@ done
 
 # Copy the generated headers and stuff.  This was split into a separate rule
diff --git a/src/VBox/Main/webservice/VBoxWebSrv.rc b/src/VBox/Main/webservice/VBoxWebSrv.rc
index 989d2d5..0bd0bc2 100644
--- a/src/VBox/Main/webservice/VBoxWebSrv.rc
+++ b/src/VBox/Main/webservice/VBoxWebSrv.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/webservice/platform-xidl.xsl b/src/VBox/Main/webservice/platform-xidl.xsl
index 066a5fe..1d95215 100644
--- a/src/VBox/Main/webservice/platform-xidl.xsl
+++ b/src/VBox/Main/webservice/platform-xidl.xsl
@@ -8,7 +8,7 @@
         is identical to the original except that all <if...>
         sections are resolved (for easier processing).
 
-    Copyright (C) 2006-2012 Oracle Corporation
+    Copyright (C) 2006-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/webservice/samples/python/clienttest.py b/src/VBox/Main/webservice/samples/python/clienttest.py
index 0b03ebe..c214151 100755
--- a/src/VBox/Main/webservice/samples/python/clienttest.py
+++ b/src/VBox/Main/webservice/samples/python/clienttest.py
@@ -1,6 +1,6 @@
 #!/usr/bin/python
 #
-# Copyright (C) 2012 Oracle Corporation
+# Copyright (C) 2012-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/webservice/split-soapC.cpp b/src/VBox/Main/webservice/split-soapC.cpp
index d491235..f2f4273 100644
--- a/src/VBox/Main/webservice/split-soapC.cpp
+++ b/src/VBox/Main/webservice/split-soapC.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2010 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -15,6 +15,7 @@
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
 
+#include <iprt/types.h>
 #include <sys/types.h>
 #include <stdio.h>
 #include <string.h>
@@ -22,179 +23,189 @@
 #include <limits.h>
 
 
-int main(int argc, char *argv[])
+char *readfileIntoBuffer(const char *pszFile, size_t *pcbFile)
 {
-    int rc = 0;
-    FILE *pFileIn = NULL;
-    FILE *pFileOut = NULL;
-    char *pBuffer = NULL;
-
-    do
+    FILE *pFileIn = fopen(pszFile, "rb");
+    if (pFileIn)
     {
-        if (argc != 4)
+        int rc2 = fseek(pFileIn, 0, SEEK_END);
+        long cbFileIn = ftell(pFileIn);
+        int rc3 = fseek(pFileIn, 0, SEEK_SET);
+        if (rc3 != -1 && rc2 != -1 && cbFileIn >= 0)
         {
-            fprintf(stderr, "split-soapC: Must be started with exactly three arguments,\n"
-                            "1) the input file, 2) the directory where to put the output files and\n"
-                            "3) the number chunks to create.\n");
-            rc = 2;
-            break;
-        }
+            char *pBuffer = (char *)malloc(cbFileIn + 1);
+            if (pBuffer)
+            {
+                size_t cbRead = fread(pBuffer, 1, cbFileIn, pFileIn);
+                if (cbRead == (size_t)cbFileIn)
+                {
+                    pBuffer[cbFileIn] = '\0';
+                    fclose(pFileIn);
+                    *pcbFile = (size_t)cbFileIn;
+                    return pBuffer;
+                }
 
-        char *pEnd = NULL;
-        unsigned long cChunk = strtoul(argv[3], &pEnd, 0);
-        if (cChunk == ULONG_MAX || cChunk == 0 || !argv[3] || *pEnd)
-        {
-            fprintf(stderr, "split-soapC: Given argument \"%s\" is not a valid chunk count.\n", argv[3]);
-            rc = 2;
-            break;
+                fprintf(stderr, "split-soapC: Failed to read %ld bytes from input file.\n", cbFileIn);
+                free(pBuffer);
+            }
+            else
+                fprintf(stderr, "split-soapC: Failed to allocate %ld bytes.\n", cbFileIn);
         }
+        else
+            fprintf(stderr, "split-soapC: Seek failure.\n");
+        fclose(pFileIn);
+    }
+    else
+        fprintf(stderr, "split-soapC: Cannot open file \"%s\" for reading.\n", pszFile);
+    return NULL;
+}
+
 
-        pFileIn = fopen(argv[1], "rb");
-        if (!pFileIn)
+int main(int argc, char *argv[])
+{
+    /*
+     * Check argument count.
+     */
+    if (argc != 4)
+    {
+        fprintf(stderr, "split-soapC: Must be started with exactly three arguments,\n"
+                        "1) the input file, 2) the directory where to put the output files and\n"
+                        "3) the number chunks to create.\n");
+        return RTEXITCODE_SYNTAX;
+    }
+
+    /*
+     * Number of chunks (argv[3]).
+     */
+    char *pszEnd = NULL;
+    unsigned long cChunks = strtoul(argv[3], &pszEnd, 0);
+    if (cChunks == ULONG_MAX || cChunks == 0 || !argv[3] || *pszEnd)
+    {
+        fprintf(stderr, "split-soapC: Given argument \"%s\" is not a valid chunk count.\n", argv[3]);
+        return RTEXITCODE_SYNTAX;
+    }
+
+    /*
+     * Read the input file into a zero terminated memory buffer.
+     */
+    size_t cbFileIn;
+    char *pszBuffer = readfileIntoBuffer(argv[1], &cbFileIn);
+    if (!pszBuffer)
+        return RTEXITCODE_FAILURE;
+
+    /*
+     * Split the file.
+     */
+    RTEXITCODE    rcExit = RTEXITCODE_SUCCESS;
+    FILE         *pFileOut = NULL;
+    const char   *pszLine = pszBuffer;
+    size_t        cbChunk = cbFileIn / cChunks;
+    unsigned long cFiles = 0;
+    size_t        cbLimit = 0;
+    size_t        cbWritten = 0;
+    unsigned long cIfNesting = 0;
+    unsigned long cBraceNesting = 0;
+    unsigned long cLinesSinceStaticMap = ~0UL / 2;
+    bool          fJustZero = false;
+
+    do
+    {
+        if (!pFileOut)
         {
-            fprintf(stderr, "split-soapC: Cannot open file \"%s\" for reading.\n", argv[1]);
-            rc = 2;
-            break;
+            /* construct output filename */
+            char szFilename[1024];
+            sprintf(szFilename, "%s/soapC-%lu.cpp", argv[2], ++cFiles);
+            szFilename[sizeof(szFilename)-1] = '\0';
+            printf("info: soapC-%lu.cpp\n", cFiles);
+
+            /* create output file */
+            pFileOut = fopen(szFilename, "wb");
+            if (!pFileOut)
+            {
+                fprintf(stderr, "split-soapC: Failed to open file \"%s\" for writing\n", szFilename);
+                rcExit = RTEXITCODE_FAILURE;
+                break;
+            }
+            if (cFiles > 1)
+                fprintf(pFileOut, "#include \"soapH.h\"%s\n",
+#ifdef RT_OS_WINDOWS
+                                  "\r"
+#else
+                                  ""
+#endif
+                       );
+            cbLimit += cbChunk;
+            cLinesSinceStaticMap = ~0UL / 2;
         }
-        int rc2 = fseek(pFileIn, 0, SEEK_END);
-        long cbFileIn = ftell(pFileIn);
-        int rc3 = fseek(pFileIn, 0, SEEK_SET);
-        if (rc3 == -1 || rc2 == -1 || cbFileIn < 0)
+
+        /* find begin of next line and print current line */
+        const char *pszNextLine = strchr(pszLine, '\n');
+        size_t cbLine;
+        if (pszNextLine)
         {
-            fprintf(stderr, "split-soapC: Seek failure.\n");
-            rc = 2;
-            break;
+            pszNextLine++;
+            cbLine = pszNextLine - pszLine;
         }
-
-        if (!(pBuffer = (char*)malloc(cbFileIn + 1)))
+        else
+            cbLine = strlen(pszLine);
+        if (fwrite(pszLine, 1, cbLine, pFileOut) != cbLine)
         {
-            fprintf(stderr, "split-soapC: Failed to allocate %ld bytes.\n", cbFileIn);
-            rc = 2;
+            fprintf(stderr, "split-soapC: Failed to write to output file\n");
+            rcExit = RTEXITCODE_FAILURE;
             break;
         }
+        cbWritten += cbLine;
 
-        if (fread(pBuffer, 1, cbFileIn, pFileIn) != (size_t)cbFileIn)
+        /* process nesting depth information */
+        if (!strncmp(pszLine, "#if", 3))
+            cIfNesting++;
+        else if (!strncmp(pszLine, "#endif", 6))
         {
-            fprintf(stderr, "split-soapC: Failed to read %ld bytes from input file.\n", cbFileIn);
-            rc = 2;
-            break;
+            cIfNesting--;
+            if (!cBraceNesting && !cIfNesting)
+                fJustZero = true;
         }
-        pBuffer[cbFileIn] = '\0';
-
-        const char *pLine = pBuffer;
-        unsigned long cbChunk = cbFileIn / cChunk;
-        unsigned long cFiles = 0;
-        unsigned long uLimit = 0;
-        unsigned long cbWritten = 0;
-        unsigned long cIfNesting = 0;
-        unsigned long cBraceNesting = 0;
-        unsigned long cLinesSinceStaticMap = ~0UL / 2;
-        bool fJustZero = false;
-
-        do
+        else
         {
-            if (!pFileOut)
-            {
-                /* construct output filename */
-                char szFilename[1024];
-                sprintf(szFilename, "%s/soapC-%lu.cpp", argv[2], ++cFiles);
-                szFilename[sizeof(szFilename)-1] = '\0';
-                printf("info: soapC-%lu.cpp\n", cFiles);
-
-                /* create output file */
-                if (!(pFileOut = fopen(szFilename, "wb")))
-                {
-                    fprintf(stderr, "split-soapC: Failed to open file \"%s\" for writing\n", szFilename);
-                    rc = 2;
-                    break;
-                }
-                if (cFiles > 1)
-                    fprintf(pFileOut, "#include \"soapH.h\"%s\n",
-#ifdef RT_OS_WINDOWS
-                                      "\r"
-#else /* !RT_OS_WINDOWS */
-                                      ""
-#endif /* !RT_OS_WINDOWS */
-                           );
-                uLimit += cbChunk;
-                cLinesSinceStaticMap = ~0UL / 2;
-            }
-
-            /* find begin of next line and print current line */
-            const char *pNextLine = strchr(pLine, '\n');
-            size_t cbLine;
-            if (pNextLine)
-            {
-                pNextLine++;
-                cbLine = pNextLine - pLine;
-            }
-            else
-                cbLine = strlen(pLine);
-            if (fwrite(pLine, 1, cbLine, pFileOut) != cbLine)
+            for (const char *p = pszLine; p < pszLine + cbLine; p++)
             {
-                fprintf(stderr, "split-soapC: Failed to write to output file\n");
-                rc = 2;
-                break;
-            }
-            cbWritten += cbLine;
-
-            /* process nesting depth information */
-            if (!strncmp(pLine, "#if", 3))
-                cIfNesting++;
-            else if (!strncmp(pLine, "#endif", 6))
-            {
-                cIfNesting--;
-                if (!cBraceNesting && !cIfNesting)
-                    fJustZero = true;
-            }
-            else
-            {
-                for (const char *p = pLine; p < pLine + cbLine; p++)
+                if (*p == '{')
+                    cBraceNesting++;
+                else if (*p == '}')
                 {
-                    if (*p == '{')
-                        cBraceNesting++;
-                    else if (*p == '}')
-                    {
-                        cBraceNesting--;
-                        if (!cBraceNesting && !cIfNesting)
-                            fJustZero = true;
-                    }
+                    cBraceNesting--;
+                    if (!cBraceNesting && !cIfNesting)
+                        fJustZero = true;
                 }
             }
+        }
 
-            /* look for static variables used for enum conversion. */
-            if (!strncmp(pLine, "static const struct soap_code_map", sizeof("static const struct soap_code_map") - 1))
-                cLinesSinceStaticMap = 0;
-            else
-                cLinesSinceStaticMap++;
-
-            /* start a new output file if necessary and possible */
-            if (   cbWritten >= uLimit
-                && cIfNesting == 0
-                && fJustZero
-                && cFiles < cChunk
-                && cLinesSinceStaticMap > 150 /*hack!*/)
-            {
-                fclose(pFileOut);
-                pFileOut = NULL;
-            }
-
-            if (rc)
-                break;
+        /* look for static variables used for enum conversion. */
+        if (!strncmp(pszLine, "static const struct soap_code_map", sizeof("static const struct soap_code_map") - 1))
+            cLinesSinceStaticMap = 0;
+        else
+            cLinesSinceStaticMap++;
+
+        /* start a new output file if necessary and possible */
+        if (   cbWritten >= cbLimit
+            && cIfNesting == 0
+            && fJustZero
+            && cFiles < cChunks
+            && cLinesSinceStaticMap > 150 /*hack!*/)
+        {
+            fclose(pFileOut);
+            pFileOut = NULL;
+        }
 
-            fJustZero = false;
-            pLine = pNextLine;
-        } while (pLine);
+        fJustZero = false;
+        pszLine = pszNextLine;
+    } while (pszLine);
 
-        printf("split-soapC: Created %lu files.\n", cFiles);
-    } while (0);
+    printf("split-soapC: Created %lu files.\n", (unsigned long)cFiles);
 
-    if (pBuffer)
-        free(pBuffer);
-    if (pFileIn)
-        fclose(pFileIn);
+    free(pszBuffer);
     if (pFileOut)
         fclose(pFileOut);
 
-    return rc;
+    return rcExit;
 }
diff --git a/src/VBox/Main/webservice/stdsoap2.sed b/src/VBox/Main/webservice/stdsoap2.sed
new file mode 100644
index 0000000..6750c6f
--- /dev/null
+++ b/src/VBox/Main/webservice/stdsoap2.sed
@@ -0,0 +1,21 @@
+# $Id: stdsoap2.sed $
+## @file
+# WebService - SED script for inserting a iprt/win/windows.h include
+#              before stdsoap2.h in soapStub.h.  This prevents hacking
+#              client and server code to do the same when using -Wall.
+#
+
+#
+# Copyright (C) 2016 Oracle Corporation
+#
+# This file is part of VirtualBox Open Source Edition (OSE), as
+# available from http://www.virtualbox.org. This file is free software;
+# you can redistribute it and/or modify it under the terms of the GNU
+# General Public License (GPL) as published by the Free Software
+# Foundation, in version 2 as it comes in the "COPYING" file of the
+# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+#
+
+s/\(#include "stdsoap2\.h"\)/#ifdef RT_OS_WINDOWS\n# include <iprt\/win\/windows.h>\n#endif\n\1/
+
diff --git a/src/VBox/Main/webservice/vboxweb.cpp b/src/VBox/Main/webservice/vboxweb.cpp
index ce4ed81..d0ad8c5 100644
--- a/src/VBox/Main/webservice/vboxweb.cpp
+++ b/src/VBox/Main/webservice/vboxweb.cpp
@@ -398,15 +398,17 @@ public:
     /**
      * Static function that can be passed to RTThreadCreate and that calls
      * process() on the SoapThread instance passed as the thread parameter.
-     * @param pThread
-     * @param pvThread
+     *
+     * @param   hThreadSelf
+     * @param   pvThread
      * @return
      */
-    static DECLCALLBACK(int) fntWrapper(RTTHREAD pThread, void *pvThread)
+    static DECLCALLBACK(int) fntWrapper(RTTHREAD hThreadSelf, void *pvThread)
     {
+        RT_NOREF(hThreadSelf);
         SoapThread *pst = (SoapThread*)pvThread;
         pst->process();
-        return 0;
+        return VINF_SUCCESS;
     }
 
     size_t          m_u;            // thread number
@@ -891,7 +893,7 @@ static void doQueuesLoop()
                   g_pcszBindToHost ? g_pcszBindToHost : "localhost",    // safe default host
                   g_uBindToPort,    // port
                   g_uBacklog);      // backlog = max queue size for requests
-    if (m < 0)
+    if (m == SOAP_INVALID_SOCKET)
         WebLogSoapError(&soap);
     else
     {
@@ -901,8 +903,8 @@ static void doQueuesLoop()
         const char *pszSsl = "";
 #endif /*!WITH_OPENSSL */
         LogRel(("Socket connection successful: host = %s, port = %u, %smaster socket = %d\n",
-               (g_pcszBindToHost) ? g_pcszBindToHost : "default (localhost)",
-               g_uBindToPort, pszSsl, m));
+                (g_pcszBindToHost) ? g_pcszBindToHost : "default (localhost)",
+                g_uBindToPort, pszSsl, m));
 
         // initialize thread queue, mutex and eventsem
         g_pSoapQ = new SoapQ(&soap);
@@ -973,8 +975,10 @@ static void doQueuesLoop()
  * the loop that takes SOAP calls from HTTP and serves them by handing sockets to the
  * SOAP queue worker threads.
  */
-static DECLCALLBACK(int) fntQPumper(RTTHREAD ThreadSelf, void *pvUser)
+static DECLCALLBACK(int) fntQPumper(RTTHREAD hThreadSelf, void *pvUser)
 {
+    RT_NOREF(hThreadSelf, pvUser);
+
     // store a log prefix for this thread
     util::AutoWriteLock thrLock(g_pThreadsLockHandle COMMA_LOCKVAL_SRC_POS);
     g_mapThreads[RTThreadSelf()] = "[ P ]";
@@ -984,7 +988,7 @@ static DECLCALLBACK(int) fntQPumper(RTTHREAD ThreadSelf, void *pvUser)
 
     thrLock.acquire();
     g_mapThreads.erase(RTThreadSelf());
-    return 0;
+    return VINF_SUCCESS;
 }
 
 #ifdef RT_OS_WINDOWS
@@ -1436,8 +1440,10 @@ int main(int argc, char *argv[])
  * for whether they have been no requests in a configurable timeout period. In
  * that case, the websession is automatically logged off.
  */
-static DECLCALLBACK(int) fntWatchdog(RTTHREAD ThreadSelf, void *pvUser)
+static DECLCALLBACK(int) fntWatchdog(RTTHREAD hThreadSelf, void *pvUser)
 {
+    RT_NOREF(hThreadSelf, pvUser);
+
     // store a log prefix for this thread
     util::AutoWriteLock thrLock(g_pThreadsLockHandle COMMA_LOCKVAL_SRC_POS);
     g_mapThreads[RTThreadSelf()] = "[W  ]";
@@ -1589,7 +1595,7 @@ void RaiseSoapInvalidObjectFault(struct soap *soap,
 std::string ConvertComString(const com::Bstr &bstr)
 {
     com::Utf8Str ustr(bstr);
-    return ustr.c_str();        // @todo r=dj since the length is known, we can probably use a better std::string allocator
+    return ustr.c_str();        /// @todo r=dj since the length is known, we can probably use a better std::string allocator
 }
 
 /**
@@ -1601,7 +1607,7 @@ std::string ConvertComString(const com::Bstr &bstr)
 std::string ConvertComString(const com::Guid &uuid)
 {
     com::Utf8Str ustr(uuid.toString());
-    return ustr.c_str();        // @todo r=dj since the length is known, we can probably use a better std::string allocator
+    return ustr.c_str();        /// @todo r=dj since the length is known, we can probably use a better std::string allocator
 }
 
 /** Code to handle string <-> byte arrays base64 conversion. */
@@ -2260,6 +2266,7 @@ int __vbox__IManagedObjectRef_USCOREgetInterfaceName(
     _vbox__IManagedObjectRef_USCOREgetInterfaceName *req,
     _vbox__IManagedObjectRef_USCOREgetInterfaceNameResponse *resp)
 {
+    RT_NOREF(soap);
     HRESULT rc = S_OK;
     WEBDEBUG(("-- entering %s\n", __FUNCTION__));
 
@@ -2295,6 +2302,7 @@ int __vbox__IManagedObjectRef_USCORErelease(
     _vbox__IManagedObjectRef_USCORErelease *req,
     _vbox__IManagedObjectRef_USCOREreleaseResponse *resp)
 {
+    RT_NOREF(resp);
     HRESULT rc = S_OK;
     WEBDEBUG(("-- entering %s\n", __FUNCTION__));
 
@@ -2360,6 +2368,7 @@ int __vbox__IWebsessionManager_USCORElogon(
         _vbox__IWebsessionManager_USCORElogon *req,
         _vbox__IWebsessionManager_USCORElogonResponse *resp)
 {
+    RT_NOREF(soap);
     HRESULT rc = S_OK;
     WEBDEBUG(("-- entering %s\n", __FUNCTION__));
 
@@ -2449,16 +2458,16 @@ int __vbox__IWebsessionManager_USCORElogoff(
         _vbox__IWebsessionManager_USCORElogoff *req,
         _vbox__IWebsessionManager_USCORElogoffResponse *resp)
 {
+    RT_NOREF(resp);
     HRESULT rc = S_OK;
     WEBDEBUG(("-- entering %s\n", __FUNCTION__));
 
-    do
     {
         // findWebsessionFromRef and the websession destructor require the lock
         util::AutoWriteLock lock(g_pWebsessionsLockHandle COMMA_LOCKVAL_SRC_POS);
 
-        WebServiceSession* pWebsession;
-        if ((pWebsession = WebServiceSession::findWebsessionFromRef(req->refIVirtualBox)))
+        WebServiceSession *pWebsession = WebServiceSession::findWebsessionFromRef(req->refIVirtualBox);
+        if (pWebsession)
         {
             WEBDEBUG(("websession logoff, deleting websession %#llx\n", pWebsession->getID()));
             delete pWebsession;
@@ -2466,7 +2475,7 @@ int __vbox__IWebsessionManager_USCORElogoff(
 
             WEBDEBUG(("websession destroyed, %d websessions left open\n", g_mapWebsessions.size()));
         }
-    } while (0);
+    }
 
     WEBDEBUG(("-- leaving %s, rc: %#lx\n", __FUNCTION__, rc));
     if (FAILED(rc))
diff --git a/src/VBox/Main/webservice/websrv-cpp.xsl b/src/VBox/Main/webservice/websrv-cpp.xsl
index 1884691..43844b4 100644
--- a/src/VBox/Main/webservice/websrv-cpp.xsl
+++ b/src/VBox/Main/webservice/websrv-cpp.xsl
@@ -11,7 +11,7 @@
         See webservice/Makefile.kmk for an overview of all the things
         generated for the webservice.
 
-    Copyright (C) 2007-2014 Oracle Corporation
+    Copyright (C) 2007-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/webservice/websrv-nsmap.xsl b/src/VBox/Main/webservice/websrv-nsmap.xsl
index 05b8e16..cf66ed0 100644
--- a/src/VBox/Main/webservice/websrv-nsmap.xsl
+++ b/src/VBox/Main/webservice/websrv-nsmap.xsl
@@ -9,7 +9,7 @@
         See webservice/Makefile.kmk for an overview of all the things
         generated for the webservice.
 
-    Copyright (C) 2006-2013 Oracle Corporation
+    Copyright (C) 2006-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/webservice/websrv-php.xsl b/src/VBox/Main/webservice/websrv-php.xsl
index d20abbc..8cad962 100644
--- a/src/VBox/Main/webservice/websrv-php.xsl
+++ b/src/VBox/Main/webservice/websrv-php.xsl
@@ -11,7 +11,7 @@
 
      Contributed by James Lucas (mjlucas at eng.uts.edu.au).
 
-    Copyright (C) 2008-2015 Oracle Corporation
+    Copyright (C) 2008-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
@@ -362,7 +362,7 @@ class <xsl:value-of select="$ifname"/>Collection extends VBox_EnumCollection
 <xsl:text><?php
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of a free software library; you can redistribute
  * it and/or modify it under the terms of the GNU Lesser General
diff --git a/src/VBox/Main/webservice/websrv-typemap.xsl b/src/VBox/Main/webservice/websrv-typemap.xsl
index b4d305e..bc42f15 100644
--- a/src/VBox/Main/webservice/websrv-typemap.xsl
+++ b/src/VBox/Main/webservice/websrv-typemap.xsl
@@ -8,7 +8,7 @@
         See webservice/Makefile.kmk for an overview of all the things
         generated for the webservice.
 
-    Copyright (C) 2006-2013 Oracle Corporation
+    Copyright (C) 2006-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/webservice/websrv-wsdl-service.xsl b/src/VBox/Main/webservice/websrv-wsdl-service.xsl
index e5c1ea3..f3e5eab 100644
--- a/src/VBox/Main/webservice/websrv-wsdl-service.xsl
+++ b/src/VBox/Main/webservice/websrv-wsdl-service.xsl
@@ -9,7 +9,7 @@
         See webservice/Makefile.kmk for an overview of all the things
         generated for the webservice.
 
-    Copyright (C) 2006-2013 Oracle Corporation
+    Copyright (C) 2006-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/webservice/websrv-wsdl.xsl b/src/VBox/Main/webservice/websrv-wsdl.xsl
index ddabc7c..4826731 100644
--- a/src/VBox/Main/webservice/websrv-wsdl.xsl
+++ b/src/VBox/Main/webservice/websrv-wsdl.xsl
@@ -9,7 +9,7 @@
         See webservice/Makefile.kmk for an overview of all the things
         generated for the webservice.
 
-    Copyright (C) 2006-2015 Oracle Corporation
+    Copyright (C) 2006-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/webservice/websrv-wsdl2gsoapH.xsl b/src/VBox/Main/webservice/websrv-wsdl2gsoapH.xsl
index 4db1fd7..eb14f23 100644
--- a/src/VBox/Main/webservice/websrv-wsdl2gsoapH.xsl
+++ b/src/VBox/Main/webservice/websrv-wsdl2gsoapH.xsl
@@ -9,7 +9,7 @@
         See webservice/Makefile.kmk for an overview of all the things
         generated for the webservice.
 
-    Copyright (C) 2006-2013 Oracle Corporation
+    Copyright (C) 2006-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/webservice/webtest.cpp b/src/VBox/Main/webservice/webtest.cpp
index 97f5933..813816c 100644
--- a/src/VBox/Main/webservice/webtest.cpp
+++ b/src/VBox/Main/webservice/webtest.cpp
@@ -3,7 +3,7 @@
  *      demo webservice client in C++. This mimics some of the
  *      functionality of VBoxManage for testing purposes.
  *
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Main/xml/Settings.cpp b/src/VBox/Main/xml/Settings.cpp
index f0bc75b..604125b 100644
--- a/src/VBox/Main/xml/Settings.cpp
+++ b/src/VBox/Main/xml/Settings.cpp
@@ -231,9 +231,6 @@ public:
 ConfigFileBase::ConfigFileBase(const com::Utf8Str *pstrFilename)
     : m(new Data)
 {
-    Utf8Str strMajor;
-    Utf8Str strMinor;
-
     m->fFileExists = false;
 
     if (pstrFilename)
@@ -257,76 +254,7 @@ ConfigFileBase::ConfigFileBase(const com::Utf8Str *pstrFilename)
 
         LogRel(("Loading settings file \"%s\" with version \"%s\"\n", m->strFilename.c_str(), m->strSettingsVersionFull.c_str()));
 
-        // parse settings version; allow future versions but fail if file is older than 1.6
-        m->sv = SettingsVersion_Null;
-        if (m->strSettingsVersionFull.length() > 3)
-        {
-            const char *pcsz = m->strSettingsVersionFull.c_str();
-            char c;
-
-            while (    (c = *pcsz)
-                    && RT_C_IS_DIGIT(c)
-                  )
-            {
-                strMajor.append(c);
-                ++pcsz;
-            }
-
-            if (*pcsz++ == '.')
-            {
-                while (    (c = *pcsz)
-                        && RT_C_IS_DIGIT(c)
-                      )
-                {
-                    strMinor.append(c);
-                    ++pcsz;
-                }
-            }
-
-            uint32_t ulMajor = RTStrToUInt32(strMajor.c_str());
-            uint32_t ulMinor = RTStrToUInt32(strMinor.c_str());
-
-            if (ulMajor == 1)
-            {
-                if (ulMinor == 3)
-                    m->sv = SettingsVersion_v1_3;
-                else if (ulMinor == 4)
-                    m->sv = SettingsVersion_v1_4;
-                else if (ulMinor == 5)
-                    m->sv = SettingsVersion_v1_5;
-                else if (ulMinor == 6)
-                    m->sv = SettingsVersion_v1_6;
-                else if (ulMinor == 7)
-                    m->sv = SettingsVersion_v1_7;
-                else if (ulMinor == 8)
-                    m->sv = SettingsVersion_v1_8;
-                else if (ulMinor == 9)
-                    m->sv = SettingsVersion_v1_9;
-                else if (ulMinor == 10)
-                    m->sv = SettingsVersion_v1_10;
-                else if (ulMinor == 11)
-                    m->sv = SettingsVersion_v1_11;
-                else if (ulMinor == 12)
-                    m->sv = SettingsVersion_v1_12;
-                else if (ulMinor == 13)
-                    m->sv = SettingsVersion_v1_13;
-                else if (ulMinor == 14)
-                    m->sv = SettingsVersion_v1_14;
-                else if (ulMinor == 15)
-                    m->sv = SettingsVersion_v1_15;
-                else if (ulMinor == 16)
-                    m->sv = SettingsVersion_v1_16;
-                else if (ulMinor > 16)
-                    m->sv = SettingsVersion_Future;
-            }
-            else if (ulMajor > 1)
-                m->sv = SettingsVersion_Future;
-
-            Log(("Parsed settings version %d.%d to enum value %d\n", ulMajor, ulMinor, m->sv));
-        }
-
-        if (m->sv == SettingsVersion_Null)
-            throw ConfigFileError(this, m->pelmRoot, N_("Cannot handle settings version '%s'"), m->strSettingsVersionFull.c_str());
+        m->sv = parseVersion(m->strSettingsVersionFull);
 
         // remember the settings version we read in case it gets upgraded later,
         // so we know when to make backups
@@ -382,6 +310,90 @@ const char *ConfigFileBase::stringifyMediaType(MediaType t)
 }
 
 /**
+ * Helper function that parses a full version number.
+ *
+ * Allow future versions but fail if file is older than 1.6. Throws on errors.
+ * @returns settings version
+ * @param strVersion
+ */
+SettingsVersion_T ConfigFileBase::parseVersion(const Utf8Str &strVersion)
+{
+    SettingsVersion_T sv = SettingsVersion_Null;
+    if (strVersion.length() > 3)
+    {
+        uint32_t ulMajor = 0;
+        uint32_t ulMinor = 0;
+
+        const char *pcsz = strVersion.c_str();
+        char c;
+
+        while (    (c = *pcsz)
+                && RT_C_IS_DIGIT(c)
+              )
+        {
+            ulMajor *= 10;
+            ulMajor += c - '0';
+            ++pcsz;
+        }
+
+        if (*pcsz++ == '.')
+        {
+            while (    (c = *pcsz)
+                    && RT_C_IS_DIGIT(c)
+                  )
+            {
+                ulMinor *= 10;
+                ulMinor += c - '0';
+                ++pcsz;
+            }
+        }
+
+        if (ulMajor == 1)
+        {
+            if (ulMinor == 3)
+                sv = SettingsVersion_v1_3;
+            else if (ulMinor == 4)
+                sv = SettingsVersion_v1_4;
+            else if (ulMinor == 5)
+                sv = SettingsVersion_v1_5;
+            else if (ulMinor == 6)
+                sv = SettingsVersion_v1_6;
+            else if (ulMinor == 7)
+                sv = SettingsVersion_v1_7;
+            else if (ulMinor == 8)
+                sv = SettingsVersion_v1_8;
+            else if (ulMinor == 9)
+                sv = SettingsVersion_v1_9;
+            else if (ulMinor == 10)
+                sv = SettingsVersion_v1_10;
+            else if (ulMinor == 11)
+                sv = SettingsVersion_v1_11;
+            else if (ulMinor == 12)
+                sv = SettingsVersion_v1_12;
+            else if (ulMinor == 13)
+                sv = SettingsVersion_v1_13;
+            else if (ulMinor == 14)
+                sv = SettingsVersion_v1_14;
+            else if (ulMinor == 15)
+                sv = SettingsVersion_v1_15;
+            else if (ulMinor == 16)
+                sv = SettingsVersion_v1_16;
+            else if (ulMinor > 16)
+                sv = SettingsVersion_Future;
+        }
+        else if (ulMajor > 1)
+            sv = SettingsVersion_Future;
+
+        Log(("Parsed settings version %d.%d to enum value %d\n", ulMajor, ulMinor, sv));
+    }
+
+    if (sv == SettingsVersion_Null)
+        throw ConfigFileError(this, NULL, N_("Cannot handle settings version '%s'"), strVersion.c_str());
+
+    return sv;
+}
+
+/**
  * Helper function that parses a UUID in string form into
  * a com::Guid item. Accepts UUIDs both with and without
  * "{}" brackets. Throws on errors.
@@ -3186,6 +3198,17 @@ bool MachineConfigFile::canHaveOwnMediaRegistry() const
  */
 void MachineConfigFile::importMachineXML(const xml::ElementNode &elmMachine)
 {
+    if (!(elmMachine.getAttributeValue("version", m->strSettingsVersionFull)))
+        throw ConfigFileError(this, &elmMachine, N_("Required Machine/@version attribute is missing"));
+
+    LogRel(("Import settings with version \"%s\"\n", m->strSettingsVersionFull.c_str()));
+
+    m->sv = parseVersion(m->strSettingsVersionFull);
+
+    // remember the settings version we read in case it gets upgraded later,
+    // so we know when to make backups
+    m->svRead = m->sv;
+
     readMachine(elmMachine);
 }
 
@@ -6381,6 +6404,8 @@ void MachineConfigFile::buildStorageControllersXML(xml::ElementNode &elmParent,
                 case DeviceType_Floppy:
                     pcszType = "Floppy";
                     break;
+
+                default: break; /* Shut up MSC. */
             }
 
             pelmDevice->setAttribute("type", pcszType);
@@ -6700,13 +6725,13 @@ bool MachineConfigFile::isAudioDriverAllowedOnThisHost(AudioDriverType_T drv)
 #ifdef RT_OS_WINDOWS
         case AudioDriverType_DirectSound:
 #endif
-#ifdef VBOX_WITH_OSS
+#ifdef VBOX_WITH_AUDIO_OSS
         case AudioDriverType_OSS:
 #endif
-#ifdef VBOX_WITH_ALSA
+#ifdef VBOX_WITH_AUDIO_ALSA
         case AudioDriverType_ALSA:
 #endif
-#ifdef VBOX_WITH_PULSE
+#ifdef VBOX_WITH_AUDIO_PULSE
         case AudioDriverType_Pulse:
 #endif
 #ifdef RT_OS_DARWIN
@@ -6716,6 +6741,7 @@ bool MachineConfigFile::isAudioDriverAllowedOnThisHost(AudioDriverType_T drv)
         case AudioDriverType_MMPM:
 #endif
             return true;
+        default: break; /* Shut up MSC. */
     }
 
     return false;
@@ -6733,6 +6759,7 @@ AudioDriverType_T MachineConfigFile::getHostDefaultAudioDriver()
 {
 #if defined(RT_OS_WINDOWS)
     return AudioDriverType_DirectSound;
+
 #elif defined(RT_OS_LINUX)
     /* On Linux, we need to check at runtime what's actually supported. */
     static RTCLockMtx s_mtx;
@@ -6740,34 +6767,37 @@ AudioDriverType_T MachineConfigFile::getHostDefaultAudioDriver()
     RTCLock lock(s_mtx);
     if (s_linuxDriver == (AudioDriverType_T)-1)
     {
-# ifdef VBOX_WITH_PULSE
+# ifdef VBOX_WITH_AUDIO_PULSE
         /* Check for the pulse library & that the pulse audio daemon is running. */
         if (RTProcIsRunningByName("pulseaudio") &&
             RTLdrIsLoadable("libpulse.so.0"))
             s_linuxDriver = AudioDriverType_Pulse;
         else
-# endif /* VBOX_WITH_PULSE */
-# ifdef VBOX_WITH_ALSA
+# endif /* VBOX_WITH_AUDIO_PULSE */
+# ifdef VBOX_WITH_AUDIO_ALSA
             /* Check if we can load the ALSA library */
              if (RTLdrIsLoadable("libasound.so.2"))
                 s_linuxDriver = AudioDriverType_ALSA;
         else
-# endif /* VBOX_WITH_ALSA */
+# endif /* VBOX_WITH_AUDIO_ALSA */
             s_linuxDriver = AudioDriverType_OSS;
     }
     return s_linuxDriver;
+
 #elif defined(RT_OS_DARWIN)
     return AudioDriverType_CoreAudio;
+
 #elif defined(RT_OS_OS2)
     return AudioDriverType_MMPM;
+
 #else /* All other platforms. */
-# ifdef VBOX_WITH_OSS
+# ifdef VBOX_WITH_AUDIO_OSS
     return AudioDriverType_OSS;
-# endif
-#endif
-
+# else
     /* Return NULL driver as a fallback if nothing of the above is available. */
     return AudioDriverType_Null;
+# endif
+#endif
 }
 
 /**
diff --git a/src/VBox/Main/xml/ovfreader.cpp b/src/VBox/Main/xml/ovfreader.cpp
index 67e437a..5441c1a 100644
--- a/src/VBox/Main/xml/ovfreader.cpp
+++ b/src/VBox/Main/xml/ovfreader.cpp
@@ -153,7 +153,7 @@ void OVFReader::LoopThruSections(const xml::ElementNode *pReferencesElem,
         }
         else if (    !strcmp(pcszElemName, "DeploymentOptionSection"))
         {
-            // TODO
+            /// @todo
         }
         else if (    !strcmp(pcszElemName, "Info"))
         {
@@ -181,7 +181,7 @@ void OVFReader::LoopThruSections(const xml::ElementNode *pReferencesElem,
                      )
                 )
         {
-            // TODO ResourceAllocationSection
+            /// @todo ResourceAllocationSection
 
             // recurse for this, since it has VirtualSystem elements as children
             LoopThruSections(pReferencesElem, pElem);
diff --git a/src/VBox/Makefile.kmk b/src/VBox/Makefile.kmk
index 7f86b7a..7bbb1af 100644
--- a/src/VBox/Makefile.kmk
+++ b/src/VBox/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -22,7 +22,7 @@ include $(KBUILD_PATH)/subheader.kmk
 ifdef VBOX_ONLY_ADDITIONS
  include $(PATH_SUB_CURRENT)/Runtime/Makefile.kmk
  if defined(VBOX_WITH_CROGL) || defined(VBOX_WITH_HGSMI)
-  if1of ($(KBUILD_TARGET),win linux solaris freebsd haiku)
+  if1of ($(KBUILD_TARGET),win linux solaris freebsd netbsd haiku)
    include $(PATH_SUB_CURRENT)/GuestHost/Makefile.kmk
   endif
  endif
diff --git a/src/VBox/NetworkServices/DHCP/ClientDataInt.h b/src/VBox/NetworkServices/DHCP/ClientDataInt.h
index ddfcb4c..a1c039a 100644
--- a/src/VBox/NetworkServices/DHCP/ClientDataInt.h
+++ b/src/VBox/NetworkServices/DHCP/ClientDataInt.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/NetworkServices/DHCP/Config.cpp b/src/VBox/NetworkServices/DHCP/Config.cpp
index e5fc0e4..fcfecd5 100644
--- a/src/VBox/NetworkServices/DHCP/Config.cpp
+++ b/src/VBox/NetworkServices/DHCP/Config.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -84,7 +84,7 @@ bool MACClientMatchCriteria::check(const Client& client) const
 
 int BaseConfigEntity::match(Client& client, BaseConfigEntity **cfg)
 {
-    int iMatch = (m_criteria && m_criteria->check(client)? m_MatchLevel: 0);
+    int iMatch = (m_criteria && m_criteria->check(client) ? m_MatchLevel : 0);
     if (m_children.empty())
     {
         if (iMatch > 0)
@@ -237,7 +237,7 @@ int ConfigurationManager::loadFromFile(const com::Utf8Str& leaseStorageFileName)
             NetworkConfigEntity *pNetCfg = NULL;
             Client c(data);
             int rc = g_RootConfig->match(c, (BaseConfigEntity **)&pNetCfg);
-            Assert(rc >= 0 && pNetCfg);
+            Assert(rc >= 0 && pNetCfg); RT_NOREF(rc);
 
             l.setConfig(pNetCfg);
 
@@ -357,7 +357,6 @@ ConfigurationManager::findOption(uint8_t uOption, PCRTNETBOOTP pDhcpMsg, size_t
     /*
      * Search the vendor field.
      */
-    bool            fExtended = false;
     uint8_t const  *pb = &pDhcpMsg->bp_vend.Dhcp.dhcp_opts[0];
     while (pb && cbLeft > 0)
     {
@@ -371,9 +370,9 @@ ConfigurationManager::findOption(uint8_t uOption, PCRTNETBOOTP pDhcpMsg, size_t
             break;
         else
         {
-            size_t cbCur = pb[1];
+            uint8_t cbCur = pb[1];
             if (cbCur > cbLeft - 2)
-                cbCur = cbLeft - 2;
+                cbCur = (uint8_t)(cbLeft - 2);
             if (uCur == uOption)
             {
                 opt.u8OptId = uCur;
@@ -651,15 +650,14 @@ int ConfigurationManager::setString(uint8_t u8OptId, const std::string& str)
 }
 
 
-const std::string& ConfigurationManager::getString(uint8_t u8OptId)
+const std::string &ConfigurationManager::getString(uint8_t u8OptId)
 {
     switch (u8OptId)
     {
         case RTNET_DHCP_OPT_DOMAIN_NAME:
             if (m->m_domainName.length())
                 return m->m_domainName;
-            else
-                return m_noString;
+            return m_noString;
         default:
             break;
     }
@@ -1203,10 +1201,12 @@ int NetworkManager::processParameterReqList(const Client& client, const uint8_t
                         break;
                     }
 
-                    char *pszDomainName = (char *)&opt.au8RawOpt[0];
-
-                    strcpy(pszDomainName, domainName.c_str());
-                    opt.cbRawOpt = domainName.length();
+                    size_t cchLength = domainName.length();
+                    if (cchLength >= sizeof(opt.au8RawOpt))
+                        cchLength = sizeof(opt.au8RawOpt) - 1;
+                    memcpy(&opt.au8RawOpt[0], domainName.c_str(), cchLength);
+                    opt.au8RawOpt[cchLength] = '\0';
+                    opt.cbRawOpt = (uint8_t)cchLength;
                 }
                 break;
             default:
diff --git a/src/VBox/NetworkServices/DHCP/Config.h b/src/VBox/NetworkServices/DHCP/Config.h
index da669b5..903e2a0 100644
--- a/src/VBox/NetworkServices/DHCP/Config.h
+++ b/src/VBox/NetworkServices/DHCP/Config.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -28,17 +28,12 @@
 #include "../NetLib/cpp/utils.h"
 
 
-static bool operator > (const RTNETADDRIPV4& a, const RTNETADDRIPV4& b)
-{
-    return (b < a);
-}
-
-
 class RawOption
 {
 public:
     RawOption()
     {
+        /** @todo r=bird: this is crazy. */
         RT_ZERO(*this);
     }
     uint8_t u8OptId;
diff --git a/src/VBox/NetworkServices/DHCP/Makefile.kmk b/src/VBox/NetworkServices/DHCP/Makefile.kmk
index d1b5125..827c54b 100644
--- a/src/VBox/NetworkServices/DHCP/Makefile.kmk
+++ b/src/VBox/NetworkServices/DHCP/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2009-2015 Oracle Corporation
+# Copyright (C) 2009-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/NetworkServices/DHCP/NetworkManagerDhcp.cpp b/src/VBox/NetworkServices/DHCP/NetworkManagerDhcp.cpp
index 3511eb3..1dcc9e3 100644
--- a/src/VBox/NetworkServices/DHCP/NetworkManagerDhcp.cpp
+++ b/src/VBox/NetworkServices/DHCP/NetworkManagerDhcp.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -66,6 +66,7 @@ bool NetworkManager::handleDhcpReqDiscover(PCRTNETBOOTP pDhcpMsg, size_t cb)
     AssertReturn(lease != Lease::NullLease, VINF_SUCCESS);
 
     int rc = ConfigurationManager::extractRequestList(pDhcpMsg, cb, opt);
+    NOREF(rc); /** @todo check */
 
     /* 3. Send of offer */
 
@@ -74,7 +75,7 @@ bool NetworkManager::handleDhcpReqDiscover(PCRTNETBOOTP pDhcpMsg, size_t cb)
     lease.setExpiration(300); /* 3 min. */
     offer4Client(client, pDhcpMsg->bp_xid, opt.au8RawOpt, opt.cbRawOpt);
 
-    return VINF_SUCCESS;
+    return true;
 }
 
 
@@ -106,20 +107,18 @@ bool NetworkManager::handleDhcpReqRequest(PCRTNETBOOTP pDhcpMsg, size_t cb)
             confManager->expireLease4Client(c);
             return true;
         }
-        else {
-            /* XXX: Validate request */
-            RawOption opt;
-            RT_ZERO(opt);
+        /* XXX: Validate request */
+        RawOption opt;
+        RT_ZERO(opt);
 
-            Client c(client);
-            int rc = confManager->commitLease4Client(c);
-            AssertRCReturn(rc, false);
+        Client c(client);
+        int rc = confManager->commitLease4Client(c);
+        AssertRCReturn(rc, false);
 
-            rc = ConfigurationManager::extractRequestList(pDhcpMsg, cb, opt);
-            AssertRCReturn(rc, false);
+        rc = ConfigurationManager::extractRequestList(pDhcpMsg, cb, opt);
+        AssertRCReturn(rc, false);
 
-            ack(client, pDhcpMsg->bp_xid, opt.au8RawOpt, opt.cbRawOpt);
-        }
+        ack(client, pDhcpMsg->bp_xid, opt.au8RawOpt, opt.cbRawOpt);
     }
     else
     {
diff --git a/src/VBox/NetworkServices/DHCP/VBoxNetDHCP.cpp b/src/VBox/NetworkServices/DHCP/VBoxNetDHCP.cpp
index 2a7ce59..0d836db 100644
--- a/src/VBox/NetworkServices/DHCP/VBoxNetDHCP.cpp
+++ b/src/VBox/NetworkServices/DHCP/VBoxNetDHCP.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -47,6 +47,9 @@
 #include <iprt/stream.h>
 #include <iprt/time.h>
 #include <iprt/string.h>
+#ifdef RT_OS_WINDOWS
+# include <iprt/thread.h>
+#endif
 
 #include <VBox/sup.h>
 #include <VBox/intnet.h>
@@ -54,7 +57,6 @@
 #include <VBox/vmm/vmm.h>
 #include <VBox/version.h>
 
-
 #include "../NetLib/VBoxNetLib.h"
 #include "../NetLib/shared_ptr.h"
 
@@ -67,7 +69,7 @@
 #include "../NetLib/utils.h"
 
 #ifdef RT_OS_WINDOWS /* WinMain */
-# include <Windows.h>
+# include <iprt/win/windows.h>
 # include <stdlib.h>
 # ifdef INET_ADDRSTRLEN
 /* On Windows INET_ADDRSTRLEN defined as 22 Ws2ipdef.h, because it include port number */
@@ -88,7 +90,7 @@
 /**
  * DHCP server instance.
  */
-class VBoxNetDhcp: public VBoxNetBaseService, public NATNetworkEventAdapter
+class VBoxNetDhcp : public VBoxNetBaseService, public NATNetworkEventAdapter
 {
 public:
     VBoxNetDhcp();
@@ -344,7 +346,7 @@ int  VBoxNetDhcp::processUDP(void *pv, size_t cbPv)
 /**
  * Handles a DHCP message.
  *
- * @returns true if handled, false if not.
+ * @returns true if handled, false if not.  (IGNORED BY CALLER)
  * @param   uMsgType        The message type.
  * @param   pDhcpMsg        The DHCP message.
  * @param   cb              The size of the DHCP message.
@@ -610,7 +612,7 @@ int VBoxNetDhcp::fetchAndUpdateDnsInfo()
 
 HRESULT VBoxNetDhcp::HandleEvent(VBoxEventType_T aEventType, IEvent *pEvent)
 {
-    switch(aEventType)
+    switch (aEventType)
     {
         case VBoxEventType_OnHostNameResolutionConfigurationChange:
             fetchAndUpdateDnsInfo();
@@ -639,11 +641,88 @@ HRESULT VBoxNetDhcp::HandleEvent(VBoxEventType_T aEventType, IEvent *pEvent)
             shutdown();
             break;
         }
+
+        default: break; /* Shut up MSC. */
     }
 
     return S_OK;
 }
 
+#ifdef RT_OS_WINDOWS
+
+/** The class name for the DIFx-killable window.    */
+static WCHAR g_wszWndClassName[] = L"VBoxNetDHCPClass";
+/** Whether to exit the process on quit.   */
+static bool g_fExitProcessOnQuit = true;
+
+/**
+ * Window procedure for making us DIFx-killable.
+ */
+static LRESULT CALLBACK DIFxKillableWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+    if (uMsg == WM_DESTROY)
+    {
+        PostQuitMessage(0);
+        return 0;
+    }
+    return DefWindowProc(hwnd, uMsg, wParam, lParam);
+}
+
+/** @callback_method_impl{FNRTTHREAD,
+ *      Thread that creates service a window the DIFx can destroy, thereby
+ *      triggering process termination. }
+ */
+static DECLCALLBACK(int) DIFxKillableProcessThreadProc(RTTHREAD hThreadSelf, void *pvUser)
+{
+    RT_NOREF(hThreadSelf, pvUser);
+    HINSTANCE hInstance = (HINSTANCE)GetModuleHandle(NULL);
+
+    /* Register the Window Class. */
+    WNDCLASSW WndCls;
+    WndCls.style         = 0;
+    WndCls.lpfnWndProc   = DIFxKillableWindowProc;
+    WndCls.cbClsExtra    = 0;
+    WndCls.cbWndExtra    = sizeof(void *);
+    WndCls.hInstance     = hInstance;
+    WndCls.hIcon         = NULL;
+    WndCls.hCursor       = NULL;
+    WndCls.hbrBackground = (HBRUSH)(COLOR_BACKGROUND + 1);
+    WndCls.lpszMenuName  = NULL;
+    WndCls.lpszClassName = g_wszWndClassName;
+
+    ATOM atomWindowClass = RegisterClassW(&WndCls);
+    if (atomWindowClass != 0)
+    {
+        /* Create the window. */
+        HWND hwnd = CreateWindowExW(WS_EX_TOOLWINDOW | WS_EX_TRANSPARENT | WS_EX_TOPMOST,
+                                    g_wszWndClassName, g_wszWndClassName,
+                                    WS_POPUPWINDOW,
+                                    -200, -200, 100, 100, NULL, NULL, hInstance, NULL);
+        if (hwnd)
+        {
+            SetWindowPos(hwnd, HWND_TOPMOST, -200, -200, 0, 0,
+                         SWP_NOACTIVATE | SWP_HIDEWINDOW | SWP_NOCOPYBITS | SWP_NOREDRAW | SWP_NOSIZE);
+
+            MSG msg;
+            while (GetMessage(&msg, NULL, 0, 0))
+            {
+                TranslateMessage(&msg);
+                DispatchMessage(&msg);
+            }
+
+            DestroyWindow(hwnd);
+        }
+
+        UnregisterClassW(g_wszWndClassName, hInstance);
+
+        if (hwnd && g_fExitProcessOnQuit)
+            exit(0);
+    }
+    return 0;
+}
+
+#endif /* RT_OS_WINDOWS */
+
 /**
  *  Entry point.
  */
@@ -652,40 +731,56 @@ extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv)
     /*
      * Instantiate the DHCP server and hand it the options.
      */
-
     VBoxNetDhcp *pDhcp = new VBoxNetDhcp();
     if (!pDhcp)
     {
         RTStrmPrintf(g_pStdErr, "VBoxNetDHCP: new VBoxNetDhcp failed!\n");
         return 1;
     }
-    int rc = pDhcp->parseArgs(argc - 1, argv + 1);
-    if (rc)
-        return rc;
+
+    RTEXITCODE rcExit = (RTEXITCODE)pDhcp->parseArgs(argc - 1, argv + 1);
+    if (rcExit != RTEXITCODE_SUCCESS)
+        return rcExit;
+
+#ifdef RT_OS_WINDOWS
+    /* DIFx hack. */
+    RTTHREAD hMakeUseKillableThread = NIL_RTTHREAD;
+    int rc2 = RTThreadCreate(&hMakeUseKillableThread, DIFxKillableProcessThreadProc, NULL, 0,
+                             RTTHREADTYPE_DEFAULT, RTTHREADFLAGS_WAITABLE, "DIFxKill");
+    if (RT_FAILURE(rc2))
+        hMakeUseKillableThread = NIL_RTTHREAD;
+#endif
 
     pDhcp->init();
 
     /*
      * Try connect the server to the network.
      */
-    rc = pDhcp->tryGoOnline();
-    if (RT_FAILURE(rc))
+    int rc = pDhcp->tryGoOnline();
+    if (RT_SUCCESS(rc))
     {
-        delete pDhcp;
-        return 1;
+        /*
+         * Process requests.
+         */
+        g_pDhcp = pDhcp;
+        rc = pDhcp->run();
+        pDhcp->done();
+
+        g_pDhcp = NULL;
     }
-
-    /*
-     * Process requests.
-     */
-    g_pDhcp = pDhcp;
-    rc = pDhcp->run();
-    pDhcp->done();
-
-    g_pDhcp = NULL;
     delete pDhcp;
 
-    return 0;
+#ifdef RT_OS_WINDOWS
+    /* Kill DIFx hack. */
+    if (hMakeUseKillableThread != NIL_RTTHREAD)
+    {
+        g_fExitProcessOnQuit = false;
+        PostThreadMessage((DWORD)RTThreadGetNative(hMakeUseKillableThread), WM_QUIT, 0, 0);
+        RTThreadWait(hMakeUseKillableThread, RT_MS_1SEC * 5U, NULL);
+    }
+#endif
+
+    return RT_SUCCESS(rc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE;
 }
 
 
@@ -702,98 +797,12 @@ int main(int argc, char **argv)
 
 # ifdef RT_OS_WINDOWS
 
-static LRESULT CALLBACK WindowProc(HWND hwnd,
-    UINT uMsg,
-    WPARAM wParam,
-    LPARAM lParam
-)
-{
-    if(uMsg == WM_DESTROY)
-    {
-        PostQuitMessage(0);
-        return 0;
-    }
-    return DefWindowProc (hwnd, uMsg, wParam, lParam);
-}
-
-static LPCWSTR g_WndClassName = L"VBoxNetDHCPClass";
-
-static DWORD WINAPI MsgThreadProc(__in  LPVOID lpParameter)
-{
-     HWND                 hwnd = 0;
-     HINSTANCE hInstance = (HINSTANCE)GetModuleHandle (NULL);
-     bool bExit = false;
-
-     /* Register the Window Class. */
-     WNDCLASS wc;
-     wc.style         = 0;
-     wc.lpfnWndProc   = WindowProc;
-     wc.cbClsExtra    = 0;
-     wc.cbWndExtra    = sizeof(void *);
-     wc.hInstance     = hInstance;
-     wc.hIcon         = NULL;
-     wc.hCursor       = NULL;
-     wc.hbrBackground = (HBRUSH)(COLOR_BACKGROUND + 1);
-     wc.lpszMenuName  = NULL;
-     wc.lpszClassName = g_WndClassName;
-
-     ATOM atomWindowClass = RegisterClass(&wc);
-
-     if (atomWindowClass != 0)
-     {
-         /* Create the window. */
-         hwnd = CreateWindowEx (WS_EX_TOOLWINDOW | WS_EX_TRANSPARENT | WS_EX_TOPMOST,
-                 g_WndClassName, g_WndClassName,
-                                                   WS_POPUPWINDOW,
-                                                  -200, -200, 100, 100, NULL, NULL, hInstance, NULL);
-
-         if (hwnd)
-         {
-             SetWindowPos(hwnd, HWND_TOPMOST, -200, -200, 0, 0,
-                          SWP_NOACTIVATE | SWP_HIDEWINDOW | SWP_NOCOPYBITS | SWP_NOREDRAW | SWP_NOSIZE);
-
-             MSG msg;
-             while (GetMessage(&msg, NULL, 0, 0))
-             {
-                 TranslateMessage(&msg);
-                 DispatchMessage(&msg);
-             }
-
-             DestroyWindow (hwnd);
-
-             bExit = true;
-         }
-
-         UnregisterClass (g_WndClassName, hInstance);
-     }
-
-     if(bExit)
-     {
-         /* no need any accuracy here, in anyway the DHCP server usually gets terminated with TerminateProcess */
-         exit(0);
-     }
-
-     return 0;
-}
 
 
 /** (We don't want a console usually.) */
 int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
 {
     NOREF(hInstance); NOREF(hPrevInstance); NOREF(lpCmdLine); NOREF(nCmdShow);
-
-    HANDLE hThread = CreateThread(
-      NULL, /*__in_opt   LPSECURITY_ATTRIBUTES lpThreadAttributes, */
-      0, /*__in       SIZE_T dwStackSize, */
-      MsgThreadProc, /*__in       LPTHREAD_START_ROUTINE lpStartAddress,*/
-      NULL, /*__in_opt   LPVOID lpParameter,*/
-      0, /*__in       DWORD dwCreationFlags,*/
-      NULL /*__out_opt  LPDWORD lpThreadId*/
-    );
-
-    if(hThread != NULL)
-        CloseHandle(hThread);
-
     return main(__argc, __argv);
 }
 # endif /* RT_OS_WINDOWS */
diff --git a/src/VBox/NetworkServices/DHCP/VBoxNetDHCP.rc b/src/VBox/NetworkServices/DHCP/VBoxNetDHCP.rc
index f282f79..8beff36 100644
--- a/src/VBox/NetworkServices/DHCP/VBoxNetDHCP.rc
+++ b/src/VBox/NetworkServices/DHCP/VBoxNetDHCP.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/NetworkServices/DHCP/VBoxNetDHCPHardened.cpp b/src/VBox/NetworkServices/DHCP/VBoxNetDHCPHardened.cpp
index 444a4b0..a89a62f 100644
--- a/src/VBox/NetworkServices/DHCP/VBoxNetDHCPHardened.cpp
+++ b/src/VBox/NetworkServices/DHCP/VBoxNetDHCPHardened.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/NetworkServices/Makefile.kmk b/src/VBox/NetworkServices/Makefile.kmk
index f374a99..342f8eb 100644
--- a/src/VBox/NetworkServices/Makefile.kmk
+++ b/src/VBox/NetworkServices/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2009-2015 Oracle Corporation
+# Copyright (C) 2009-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/NetworkServices/NAT/Makefile.kmk b/src/VBox/NetworkServices/NAT/Makefile.kmk
index f6c9d6c..4b1094f 100644
--- a/src/VBox/NetworkServices/NAT/Makefile.kmk
+++ b/src/VBox/NetworkServices/NAT/Makefile.kmk
@@ -1,9 +1,10 @@
 # $Id: Makefile.kmk $
 ## @file
+# Sub-makefile for NAT Networking
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -16,131 +17,135 @@
 
 SUB_DEPTH = ../../../..
 include $(KBUILD_PATH)/subheader.kmk
+ifdef VBOX_WITH_LWIP_NAT
 
 VBOX_PATH_NAT_SRC := $(PATH_SUB_CURRENT)
 
-ifdef VBOX_WITH_LWIP_NAT
-# XXX: do not depend on order
-ifndef LWIP_SOURCES
-  include $(PATH_SUB_CURRENT)/../../Devices/Network/lwip-new/Makefile.kmk
-endif
-
-ifdef VBOX_WITH_HARDENING
- PROGRAMS += VBoxNetLwipNATHardened
- DLLS += VBoxNetLwipNAT
-else
- PROGRAMS += VBoxNetLwipNAT
-endif
-
-ifdef VBOX_WITH_HARDENING
- VBoxNetLwipNATHardened_SOURCES += VBoxNetNATHardened.cpp
- VBoxNetLwipNATHardened_SOURCES.win = $(VBoxNetLwipNAT_0_OUTDIR)/VBoxNetLwipNAT-icon.rc
- VBoxNetLwipNATHardened_DEFS += SERVICE_NAME=\"VBoxNetNAT\"
- VBoxNetLwipNATHardened_TEMPLATE=VBOXR3HARDENEDEXE
- VBoxNetLwipNATHardened_NAME = VBoxNetNAT
- VBoxNetLwipNATHardened_LDFLAGS.win = /SUBSYSTEM:windows
-endif
-
-VBoxNetLwipNAT_TEMPLATE =
-VBoxNetLwipNAT_TEMPLATE := VBOXMAIN$(if-expr defined(VBOX_WITH_HARDENING),DLL,CLIENTEXE)
-VBoxNetLwipNAT_NAME = VBoxNetNAT
-VBoxNetLwipNAT_DEFS += ${LWIP_DEFS} IPv6
-# VBoxNetLwipNAT_DEFS.linux += WITH_VALGRIND # instrument lwip memp.c
-VBoxNetLwipNAT_DEFS.win += VBOX_COM_OUTOFPROC_MODULE _WIN32_WINNT=0x501 # Windows XP
-VBoxNetLwipNAT_SOURCES += VBoxNetLwipNAT.cpp	\
-	$(VBOX_PATH_NAT_SRC)/../NetLib/VBoxNetBaseService.cpp \
-	$(VBOX_PATH_NAT_SRC)/../NetLib/VBoxNetPortForwardString.cpp \
-	$(VBOX_PATH_NAT_SRC)/../NetLib/VBoxNetIntIf.cpp \
-	$(VBOX_PATH_NAT_SRC)/../NetLib/VBoxNetUDP.cpp \
-	$(VBOX_PATH_NAT_SRC)/../NetLib/VBoxNetARP.cpp \
-	$(VBOX_PATH_NAT_SRC)/../NetLib/ComHostUtils.cpp
-
-VBoxNetLwipNAT_LIBS = \
-	$(LIB_RUNTIME)
-VBoxNetLwipNAT_LIBS.solaris += socket nsl
-VBoxNetLwipNAT_LDFLAGS.win = /SUBSYSTEM:windows
-
-# Convince Solaris headers to expose socket stuff we need.
-#
-# Setting _XOPEN_SOURCE to either 500 or 600 would always work, but
-# <sys/feature_tests.h> insists that 600 requires C99 and so it
-# explodes for older g++.  It also insists that 500 is NOT to be used
-# with C99.
-#
-# Newer g++ in C++11 mode (formerly known as C++0x) needs 600, so it
-# employs sleight of hand to pretend it's C99 to keep feature test
-# happy.
-#
-# Compile the C code with settings that match g++.  This probably
-# should be centralized so that whole codebase uses consistent
-# settings.
-ifeq ($(KBUILD_TARGET),solaris)
- ifneq ($(VBOX_GCC_VERSION_CXX),)
-  ifneq ($(int-ge $(VBOX_GCC_VERSION_CXX),40600),)
-   # we compile C++ code with -std=c++0x / -std=c++11
-   VBoxNetLwipNAT_CFLAGS.solaris += -std=c99
-   VBoxNetLwipNAT_DEFS.solaris += _XOPEN_SOURCE=600
-  else
-   VBoxNetLwipNAT_DEFS.solaris += _XOPEN_SOURCE=500
+ # XXX: do not depend on order
+ ifndef LWIP_SOURCES
+  include $(PATH_SUB_CURRENT)/../../Devices/Network/lwip-new/Config.kmk
+ endif
+
+
+ ifdef VBOX_WITH_HARDENING
+  #
+  # Hardened stub exe for VBoxNetLwipNAT.
+  #
+  PROGRAMS += VBoxNetLwipNATHardened
+  VBoxNetLwipNATHardened_TEMPLATE = VBOXR3HARDENEDEXE
+  VBoxNetLwipNATHardened_NAME     = VBoxNetNAT
+  VBoxNetLwipNATHardened_DEFS     = SERVICE_NAME=\"VBoxNetNAT\"
+  VBoxNetLwipNATHardened_SOURCES  = VBoxNetNATHardened.cpp
+  VBoxNetLwipNATHardened_SOURCES.win = $(VBoxNetLwipNAT_0_OUTDIR)/VBoxNetLwipNAT-icon.rc
+  VBoxNetLwipNATHardened_LDFLAGS.win = /SUBSYSTEM:windows
+ endif
+
+
+ #
+ # VBoxNetLwipNAT.
+ #
+ ifdef VBOX_WITH_HARDENING
+  DLLS += VBoxNetLwipNAT
+ else
+  PROGRAMS += VBoxNetLwipNAT
+ endif
+ VBoxNetLwipNAT_TEMPLATE := $(if-expr defined(VBOX_WITH_HARDENING),VBOXMAINDLL,VBOXMAINCLIENTEXE)
+ VBoxNetLwipNAT_NAME     := VBoxNetNAT
+ VBoxNetLwipNAT_DEFS      = IPv6
+ # VBoxNetLwipNAT_DEFS.linux = WITH_VALGRIND # instrument lwip memp.c
+ VBoxNetLwipNAT_DEFS.win  = VBOX_COM_OUTOFPROC_MODULE _WIN32_WINNT=0x501 # Windows XP
+ # Convince Solaris headers to expose socket stuff we need.
+ #
+ # Setting _XOPEN_SOURCE to either 500 or 600 would always work, but
+ # <sys/feature_tests.h> insists that 600 requires C99 and so it
+ # explodes for older g++.  It also insists that 500 is NOT to be used
+ # with C99.
+ #
+ # Newer g++ in C++11 mode (formerly known as C++0x) needs 600, so it
+ # employs sleight of hand to pretend it's C99 to keep feature test
+ # happy.
+ #
+ # Compile the C code with settings that match g++.  This probably
+ # should be centralized so that whole codebase uses consistent
+ # settings.
+ ifeq ($(KBUILD_TARGET),solaris)
+  ifneq ($(VBOX_GCC_VERSION_CXX),)
+   ifneq ($(int-ge $(VBOX_GCC_VERSION_CXX),40600),)
+    # we compile C++ code with -std=c++0x / -std=c++11
+    VBoxNetLwipNAT_CFLAGS.solaris += -std=c99
+    VBoxNetLwipNAT_DEFS.solaris += _XOPEN_SOURCE=600
+   else
+    VBoxNetLwipNAT_DEFS.solaris += _XOPEN_SOURCE=500
+   endif
   endif
+  VBoxNetLwipNAT_DEFS.solaris += __EXTENSIONS__=1
  endif
- VBoxNetLwipNAT_DEFS.solaris += __EXTENSIONS__=1
-endif
-
-VBoxNetLwipNAT_SOURCES += \
-    proxy_pollmgr.c \
-    proxy_rtadvd.c \
-    proxy.c \
-    pxremap.c \
-    pxtcp.c \
-    pxudp.c \
-    pxdns.c \
-    fwtcp.c \
-    fwudp.c \
-    portfwd.c \
-    proxy_dhcp6ds.c \
-    proxy_tftpd.c
-
-ifeq ($(KBUILD_TARGET),win)
- # unprivileged Icmp API
- VBoxNetLwipNAT_SOURCES += pxping_win.c
-else
- # raw sockets
- VBoxNetLwipNAT_SOURCES += pxping.c
-endif
-
-# ifeq ($(VBOX_WITH_HARDENING),)
-#  ifn1of ($(KBUILD_TARGET), darwin win)
-#   # helper for debugging unprivileged
-#   VBoxNetLwipNAT_DEFS += VBOX_RAWSOCK_DEBUG_HELPER
-#   VBoxNetLwipNAT_SOURCES += getrawsock.c
-#  endif
-# endif
-
-VBoxNetLwipNAT_SOURCES.darwin  += rtmon_bsd.c
-VBoxNetLwipNAT_SOURCES.freebsd += rtmon_bsd.c
-VBoxNetLwipNAT_SOURCES.linux   += rtmon_linux.c
-VBoxNetLwipNAT_SOURCES.solaris += rtmon_bsd.c
-VBoxNetLwipNAT_SOURCES.win     += rtmon_win.c
-
-VBoxNetLwipNAT_SOURCES.win += \
-    RTWinPoll.cpp \
-    RTWinSocketPair.cpp
-
-VBoxNetLwipNAT_INCS += . # for lwipopts.h
-$(eval $(call def_vbox_lwip_public, \
-    VBoxNetLwipNAT, $(PATH_SUB_CURRENT)/../../Devices/Network/lwip-new))
-endif
-
-ifeq ($(KBUILD_TARGET),win)
-# Icon include file.
-VBoxNetLwipNAT_SOURCES  += VBoxNetNAT.rc
-VBoxNetNAT.rc_INCS       = $(VBoxNetLwipNAT_0_OUTDIR)
-VBoxNetNAT.rc_DEPS       = $(VBoxNetLwipNAT_0_OUTDIR)/VBoxNetLwipNAT-icon.rc
-VBoxNetNAT.rc_CLEAN      = $(VBoxNetLwipNAT_0_OUTDIR)/VBoxNetLwipNAT-icon.rc
-$$(VBoxNetLwipNAT_0_OUTDIR)/VBoxNetLwipNAT-icon.rc: $(VBOX_WINDOWS_ICON_FILE) $$(VBoxNetLwipNAT_DEFPATH)/Makefile.kmk | $$(dir $$@)
+
+ # (current dir is for for lwipopts.h)
+ VBoxNetLwipNAT_INCS += . $(addprefix ../../Devices/Network/lwip-new/,$(LWIP_INCS))
+
+ VBoxNetLwipNAT_SOURCES = \
+ 	VBoxNetLwipNAT.cpp \
+ 	../NetLib/VBoxNetBaseService.cpp \
+ 	../NetLib/VBoxNetPortForwardString.cpp \
+ 	../NetLib/VBoxNetIntIf.cpp \
+ 	../NetLib/VBoxNetUDP.cpp \
+ 	../NetLib/VBoxNetARP.cpp \
+ 	../NetLib/ComHostUtils.cpp \
+ 	$(addprefix ../../Devices/Network/lwip-new/,$(LWIP_SOURCES)) \
+ 	proxy_pollmgr.c \
+ 	proxy_rtadvd.c \
+ 	proxy.c \
+ 	pxremap.c \
+ 	pxtcp.c \
+ 	pxudp.c \
+ 	pxdns.c \
+ 	fwtcp.c \
+ 	fwudp.c \
+ 	portfwd.c \
+ 	proxy_dhcp6ds.c \
+ 	proxy_tftpd.c
+
+ ifeq ($(KBUILD_TARGET),win)
+  VBoxNetLwipNAT_SOURCES += pxping_win.c # unprivileged Icmp API
+ else
+  VBoxNetLwipNAT_SOURCES += pxping.c     # raw sockets
+ endif
+
+ VBoxNetLwipNAT_SOURCES.darwin  += rtmon_bsd.c
+ VBoxNetLwipNAT_SOURCES.freebsd += rtmon_bsd.c
+ VBoxNetLwipNAT_SOURCES.linux   += rtmon_linux.c
+ VBoxNetLwipNAT_SOURCES.solaris += rtmon_bsd.c
+ VBoxNetLwipNAT_SOURCES.win     += \
+ 	rtmon_win.c \
+ 	RTWinPoll.cpp \
+ 	RTWinSocketPair.cpp
+
+ VBoxNetLwipNAT_LIBS = \
+ 	$(LIB_RUNTIME)
+ VBoxNetLwipNAT_LIBS.solaris += socket nsl
+
+ VBoxNetLwipNAT_LDFLAGS.win = /SUBSYSTEM:windows
+
+ # ifeq ($(VBOX_WITH_HARDENING),)
+ #  ifn1of ($(KBUILD_TARGET), darwin win)
+ #   # helper for debugging unprivileged
+ #   VBoxNetLwipNAT_DEFS += VBOX_RAWSOCK_DEBUG_HELPER
+ #   VBoxNetLwipNAT_SOURCES += getrawsock.c
+ #  endif
+ # endif
+
+ ifeq ($(KBUILD_TARGET),win)
+  # Icon include file.
+  VBoxNetLwipNAT_SOURCES  += VBoxNetNAT.rc
+  VBoxNetNAT.rc_INCS       = $(VBoxNetLwipNAT_0_OUTDIR)
+  VBoxNetNAT.rc_DEPS       = $(VBoxNetLwipNAT_0_OUTDIR)/VBoxNetLwipNAT-icon.rc
+  VBoxNetNAT.rc_CLEAN      = $(VBoxNetLwipNAT_0_OUTDIR)/VBoxNetLwipNAT-icon.rc
+  $$(VBoxNetLwipNAT_0_OUTDIR)/VBoxNetLwipNAT-icon.rc: $(VBOX_WINDOWS_ICON_FILE) $$(VBoxNetLwipNAT_DEFPATH)/Makefile.kmk | $$(dir $$@)
 	$(RM) -f $@
 	$(APPEND) $@ 'IDI_VIRTUALBOX ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
-endif # win
+ endif # win
 
+endif # VBOX_WITH_LWIP_NAT
 include $(FILE_KBUILD_SUB_FOOTER)
+
diff --git a/src/VBox/NetworkServices/NAT/RTWinPoll.cpp b/src/VBox/NetworkServices/NAT/RTWinPoll.cpp
index 66c4160..f754b57 100644
--- a/src/VBox/NetworkServices/NAT/RTWinPoll.cpp
+++ b/src/VBox/NetworkServices/NAT/RTWinPoll.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -25,8 +25,8 @@
 #include <VBox/err.h>
 #include <VBox/log.h>
 
-#include <Winsock2.h>
-#include <Windows.h>
+#include <iprt/win/winsock2.h>
+#include <iprt/win/windows.h>
 #include "winpoll.h"
 
 static HANDLE g_hNetworkEvent;
@@ -54,7 +54,7 @@ RTWinPoll(struct pollfd *pFds, unsigned int nfds, int timeout, int *pNready)
         if (pFds[i].fd == INVALID_SOCKET)
           continue;
 
-        /**
+        /*
          * POLLIN         Data other than high priority data may be read without blocking.
          * This is equivalent to ( POLLRDNORM | POLLRDBAND ).
          * POLLRDBAND     Priority data may be read without blocking.
@@ -63,7 +63,7 @@ RTWinPoll(struct pollfd *pFds, unsigned int nfds, int timeout, int *pNready)
         if (pollEvents & POLLIN)
             eventMask |= FD_READ | FD_ACCEPT;
 
-        /**
+        /*
          * POLLOUT        Normal data may be written without blocking.  This is equivalent
          *  to POLLWRNORM.
          * POLLWRNORM     Normal data may be written without blocking.
@@ -71,7 +71,7 @@ RTWinPoll(struct pollfd *pFds, unsigned int nfds, int timeout, int *pNready)
         if (pollEvents & POLLOUT)
             eventMask |= FD_WRITE | FD_CONNECT;
 
-        /**
+        /*
          * This is "moral" equivalent to POLLHUP.
          */
         eventMask |= FD_CLOSE;
diff --git a/src/VBox/NetworkServices/NAT/RTWinSocketPair.cpp b/src/VBox/NetworkServices/NAT/RTWinSocketPair.cpp
index 5445f4f..35cc04a 100644
--- a/src/VBox/NetworkServices/NAT/RTWinSocketPair.cpp
+++ b/src/VBox/NetworkServices/NAT/RTWinSocketPair.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -22,8 +22,8 @@
 
 #include <VBox/err.h>
 
-#include <Winsock2.h>
-#include <Windows.h>
+#include <iprt/win/winsock2.h>
+#include <iprt/win/windows.h>
 
 #include <stdio.h>
 #include <iprt/log.h>
diff --git a/src/VBox/NetworkServices/NAT/VBoxNetLwipNAT.cpp b/src/VBox/NetworkServices/NAT/VBoxNetLwipNAT.cpp
index 37b1538..1307262 100644
--- a/src/VBox/NetworkServices/NAT/VBoxNetLwipNAT.cpp
+++ b/src/VBox/NetworkServices/NAT/VBoxNetLwipNAT.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -140,7 +140,7 @@ class VBoxNetLwipNAT: public VBoxNetBaseService, public NATNetworkEventAdapter
   public:
     VBoxNetLwipNAT(SOCKET icmpsock4, SOCKET icmpsock6);
     virtual ~VBoxNetLwipNAT();
-    void usage(){                /* @todo: should be implemented */ };
+    void usage(){                /** @todo should be implemented */ };
     int run();
     virtual int init(void);
     virtual int parseOpt(int rc, const RTGETOPTUNION& getOptVal);
@@ -414,6 +414,8 @@ HRESULT VBoxNetLwipNAT::HandleEvent(VBoxEventType_T aEventType, IEvent *pEvent)
             shutdown();
             break;
         }
+
+        default: break; /* Shut up MSC. */
     }
     return hrc;
 }
@@ -425,7 +427,7 @@ HRESULT VBoxNetLwipNAT::HandleEvent(VBoxEventType_T aEventType, IEvent *pEvent)
     VBoxNetLwipNAT *pNat = static_cast<VBoxNetLwipNAT *>(arg);
 
     HRESULT hrc = com::Initialize();
-    Assert(!FAILED(hrc));
+    Assert(!FAILED(hrc)); NOREF(hrc);
 
     proxy_arp_hook = pxremap_proxy_arp;
     proxy_ip4_divert_hook = pxremap_ip4_divert;
@@ -515,7 +517,6 @@ HRESULT VBoxNetLwipNAT::HandleEvent(VBoxEventType_T aEventType, IEvent *pEvent)
 /*static*/ DECLCALLBACK(void) VBoxNetLwipNAT::onLwipTcpIpFini(void* arg)
 {
     AssertPtrReturnVoid(arg);
-    VBoxNetLwipNAT *pThis = (VBoxNetLwipNAT *)arg;
 
     /* XXX: proxy finalization */
     netif_set_link_down(&g_pLwipNat->m_LwipNetIf);
@@ -997,7 +998,8 @@ int VBoxNetLwipNAT::parseOpt(int rc, const RTGETOPTUNION& Val)
 
             RT_ZERO(Rule);
 
-            int irc = netPfStrToPf(Val.psz, (rc == 'P'), &Rule.Pfr);
+            int rc2 = netPfStrToPf(Val.psz, (rc == 'P'), &Rule.Pfr);
+            RT_NOREF_PV(rc2);
             rules.push_back(Rule);
             return VINF_SUCCESS;
         }
@@ -1012,7 +1014,7 @@ int VBoxNetLwipNAT::processFrame(void *pvFrame, size_t cbFrame)
     AssertPtrReturn(pvFrame, VERR_INVALID_PARAMETER);
     AssertReturn(cbFrame != 0, VERR_INVALID_PARAMETER);
 
-    struct pbuf *p = pbuf_alloc(PBUF_RAW, cbFrame + ETH_PAD_SIZE, PBUF_POOL);
+    struct pbuf *p = pbuf_alloc(PBUF_RAW, (u16_t)cbFrame + ETH_PAD_SIZE, PBUF_POOL);
     if (RT_UNLIKELY(p == NULL))
         return VERR_NO_MEMORY;
 
@@ -1048,25 +1050,23 @@ int VBoxNetLwipNAT::processFrame(void *pvFrame, size_t cbFrame)
 
 int VBoxNetLwipNAT::processGSO(PCPDMNETWORKGSO pGso, size_t cbFrame)
 {
-    if (!PDMNetGsoIsValid(pGso, cbFrame,
-                          cbFrame - sizeof(PDMNETWORKGSO)))
+    if (!PDMNetGsoIsValid(pGso, cbFrame, cbFrame - sizeof(PDMNETWORKGSO)))
         return VERR_INVALID_PARAMETER;
 
     cbFrame -= sizeof(PDMNETWORKGSO);
     uint8_t         abHdrScratch[256];
     uint32_t const  cSegs = PDMNetGsoCalcSegmentCount(pGso,
                                                       cbFrame);
-    for (size_t iSeg = 0; iSeg < cSegs; iSeg++)
+    for (uint32_t iSeg = 0; iSeg < cSegs; iSeg++)
     {
         uint32_t cbSegFrame;
-        void    *pvSegFrame =
-          PDMNetGsoCarveSegmentQD(pGso,
-                                  (uint8_t *)(pGso + 1),
-                                  cbFrame,
-                                  abHdrScratch,
-                                  iSeg,
-                                  cSegs,
-                                  &cbSegFrame);
+        void    *pvSegFrame = PDMNetGsoCarveSegmentQD(pGso,
+                                                      (uint8_t *)(pGso + 1),
+                                                      cbFrame,
+                                                      abHdrScratch,
+                                                      iSeg,
+                                                      cSegs,
+                                                      &cbSegFrame);
 
         int rc = processFrame(pvSegFrame, cbSegFrame);
         if (RT_FAILURE(rc))
@@ -1340,8 +1340,8 @@ static int fetchNatPortForwardRules(const ComNatPtr& nat, bool fIsIPv6, VECNATSE
         Log(("%d-%s rule: %ls\n", idxRules, (fIsIPv6 ? "IPv6" : "IPv4"), rules[idxRules]));
         RT_ZERO(Rule);
 
-        int rc = netPfStrToPf(com::Utf8Str(rules[idxRules]).c_str(),
-                              fIsIPv6, &Rule.Pfr);
+        int rc = netPfStrToPf(com::Utf8Str(rules[idxRules]).c_str(), fIsIPv6,
+                              &Rule.Pfr);
         if (RT_FAILURE(rc))
             continue;
 
@@ -1365,6 +1365,7 @@ int main(int argc, char **argv, char **envp)
 
 # if defined(RT_OS_WINDOWS)
 
+#  if 0 /* Some copy and paste from DHCP that nobody explained why was diabled. */
 static LRESULT CALLBACK WindowProc(HWND hwnd,
     UINT uMsg,
     WPARAM wParam,
@@ -1437,13 +1438,14 @@ static DWORD WINAPI MsgThreadProc(__in  LPVOID lpParameter)
 
      return 0;
 }
-
+#  endif
 
 
 /** (We don't want a console usually.) */
 int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
 {
-#if 0
+    RT_NOREF(hInstance, hPrevInstance, lpCmdLine, nCmdShow);
+#  if 0 /* some copy and paste from DHCP that nobody explained why was diabled. */
     NOREF(hInstance); NOREF(hPrevInstance); NOREF(lpCmdLine); NOREF(nCmdShow);
 
     HANDLE hThread = CreateThread(
@@ -1458,7 +1460,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
     if(hThread != NULL)
         CloseHandle(hThread);
 
-#endif
+#  endif
     return main(__argc, __argv, environ);
 }
 # endif /* RT_OS_WINDOWS */
diff --git a/src/VBox/NetworkServices/NAT/VBoxNetNAT.rc b/src/VBox/NetworkServices/NAT/VBoxNetNAT.rc
index db80698..3771835 100644
--- a/src/VBox/NetworkServices/NAT/VBoxNetNAT.rc
+++ b/src/VBox/NetworkServices/NAT/VBoxNetNAT.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/NetworkServices/NAT/VBoxNetNATHardened.cpp b/src/VBox/NetworkServices/NAT/VBoxNetNATHardened.cpp
index c2afc4f..e3a84fb 100644
--- a/src/VBox/NetworkServices/NAT/VBoxNetNATHardened.cpp
+++ b/src/VBox/NetworkServices/NAT/VBoxNetNATHardened.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/NetworkServices/NAT/dhcp6.h b/src/VBox/NetworkServices/NAT/dhcp6.h
index ed53020..05f8770 100644
--- a/src/VBox/NetworkServices/NAT/dhcp6.h
+++ b/src/VBox/NetworkServices/NAT/dhcp6.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/NetworkServices/NAT/fwtcp.c b/src/VBox/NetworkServices/NAT/fwtcp.c
index 57d9489..d0ebd77 100644
--- a/src/VBox/NetworkServices/NAT/fwtcp.c
+++ b/src/VBox/NetworkServices/NAT/fwtcp.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -239,6 +239,7 @@ fwtcp_pmgr_listen(struct pollmgr_handler *handler, SOCKET fd, int revents)
     }
 
 
+#ifdef LOG_ENABLED
     if (ss.ss_family == PF_INET) {
         struct sockaddr_in *peer4 = (struct sockaddr_in *)&ss;
         DPRINTF(("<--- TCP %RTnaipv4:%d\n",
@@ -249,6 +250,7 @@ fwtcp_pmgr_listen(struct pollmgr_handler *handler, SOCKET fd, int revents)
         DPRINTF(("<--- TCP %RTnaipv6:%d\n",
                  &peer6->sin6_addr, ntohs(peer6->sin6_port)));
     }
+#endif
 
     pxtcp = pxtcp_create_forwarded(newsock);
     if (pxtcp == NULL) {
diff --git a/src/VBox/NetworkServices/NAT/fwudp.c b/src/VBox/NetworkServices/NAT/fwudp.c
index 6deb812..7c5307e 100644
--- a/src/VBox/NetworkServices/NAT/fwudp.c
+++ b/src/VBox/NetworkServices/NAT/fwudp.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -278,8 +278,13 @@ fwudp_pmgr_pump(struct pollmgr_handler *handler, SOCKET fd, int revents)
     LWIP_UNUSED_ARG(fd);
     LWIP_UNUSED_ARG(revents);
 
+#ifdef RT_OS_WINDOWS
+    nread = recvfrom(fwudp->sock, (char *)pollmgr_udpbuf, sizeof(pollmgr_udpbuf), 0,
+                     (struct sockaddr *)&ss, &sslen);
+#else
     nread = recvfrom(fwudp->sock, pollmgr_udpbuf, sizeof(pollmgr_udpbuf), 0,
                      (struct sockaddr *)&ss, &sslen);
+#endif
     if (nread < 0) {
         DPRINTF(("%s: %R[sockerr]\n", __func__, SOCKERRNO()));
         return POLLIN;
diff --git a/src/VBox/NetworkServices/NAT/lwipopts.h b/src/VBox/NetworkServices/NAT/lwipopts.h
index 105fc2b..81161a7 100644
--- a/src/VBox/NetworkServices/NAT/lwipopts.h
+++ b/src/VBox/NetworkServices/NAT/lwipopts.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -18,6 +18,7 @@
 #ifndef _VBOX_NETNAT_LWIP_OPTS_H_
 #define _VBOX_NETNAT_LWIP_OPTS_H_
 
+#include <VBox/cdefs.h>     /* For VBOX_STRICT. */
 #include <iprt/mem.h>
 #include <iprt/alloca.h>    /* This may include malloc.h (msc), which is something that has
                              * to be done before redefining any of the functions therein. */
@@ -193,4 +194,9 @@
 #define realloc(x,y) RTMemRealloc((x), (y))
 #define free(x) RTMemFree(x)
 
+/* Align VBOX_STRICT and LWIP_NOASSERT. */
+#ifndef VBOX_STRICT
+# define LWIP_NOASSERT 1
+#endif
+
 #endif /* _VBOX_NETNAT_LWIP_OPTS_H_ */
diff --git a/src/VBox/NetworkServices/NAT/portfwd.c b/src/VBox/NetworkServices/NAT/portfwd.c
index 013654d..1561001 100644
--- a/src/VBox/NetworkServices/NAT/portfwd.c
+++ b/src/VBox/NetworkServices/NAT/portfwd.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/NetworkServices/NAT/portfwd.h b/src/VBox/NetworkServices/NAT/portfwd.h
index 4b04007..7d859d9 100644
--- a/src/VBox/NetworkServices/NAT/portfwd.h
+++ b/src/VBox/NetworkServices/NAT/portfwd.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/NetworkServices/NAT/proxy.c b/src/VBox/NetworkServices/NAT/proxy.c
index 8b3f430..848fc7a 100644
--- a/src/VBox/NetworkServices/NAT/proxy.c
+++ b/src/VBox/NetworkServices/NAT/proxy.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -134,9 +134,8 @@ proxy_sockerr_rtstrfmt(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput,
                        void *pvUser)
 {
     const int error = (int)(intptr_t)pvValue;
-    size_t cb = 0;
 
-    const char *msg = NULL;
+    const char *msg;
     char buf[128];
 
     NOREF(cchWidth);
@@ -147,13 +146,12 @@ proxy_sockerr_rtstrfmt(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput,
     AssertReturn(strcmp(pszType, "sockerr") == 0, 0);
 
     /* make sure return type mismatch is caught */
+    buf[0] = '\0';
 #if defined(RT_OS_LINUX) && defined(_GNU_SOURCE)
     msg = strerror_r(error, buf, sizeof(buf));
 #else
-    {
-        int status = strerror_r(error, buf, sizeof(buf));
-        msg = buf;
-    }
+    strerror_r(error, buf, sizeof(buf));
+    msg = buf;
 #endif
     return RTStrFormat(pfnOutput, pvArgOutput, NULL, NULL, "%s", msg);
 }
@@ -459,7 +457,7 @@ proxy_connected_socket(int sdom, int stype,
     }
     DPRINTF(("socket %d\n", s));
 
-    /* TODO: needs locking if dynamic modifyvm is allowed */
+    /** @todo needs locking if dynamic modifyvm is allowed */
     if (sdom == PF_INET6) {
         psrc_sa = (const struct sockaddr *)g_proxy_options->src6;
         src_sa_len = sizeof(struct sockaddr_in6);
diff --git a/src/VBox/NetworkServices/NAT/proxy.h b/src/VBox/NetworkServices/NAT/proxy.h
index f2cc7ad..4d52868 100644
--- a/src/VBox/NetworkServices/NAT/proxy.h
+++ b/src/VBox/NetworkServices/NAT/proxy.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -15,8 +15,8 @@
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
 
-#ifndef _nat_proxy_h_
-#define _nat_proxy_h_
+#ifndef ___nat_proxy_h___
+#define ___nat_proxy_h___
 
 #if !defined(VBOX)
 #include "vbox-compat.h"
@@ -114,4 +114,5 @@ err_t pxping_init(struct netif *, SOCKET, SOCKET);
 #define DPRINTF1(a) Log2(a)
 #define DPRINTF2(a) Log3(a)
 
-#endif /* _nat_proxy_h_ */
+#endif /* !___nat_proxy_h___ */
+
diff --git a/src/VBox/NetworkServices/NAT/proxy_dhcp6ds.c b/src/VBox/NetworkServices/NAT/proxy_dhcp6ds.c
index f97211b..66920f0 100644
--- a/src/VBox/NetworkServices/NAT/proxy_dhcp6ds.c
+++ b/src/VBox/NetworkServices/NAT/proxy_dhcp6ds.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -186,7 +186,7 @@ dhcp6ds_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p,
     msg_type = msg_header[0];
     msg_tid = (msg_header[1] << 16) | (msg_header[2] << 8) | msg_header[3];
     DPRINTF(("%s: type %u, tid 0x%6x\n", __func__, msg_type, msg_tid));
-    if (msg_type != DHCP6_INFORMATION_REQUEST) { /* TODO:? RELAY_FORW */
+    if (msg_type != DHCP6_INFORMATION_REQUEST) { /** @todo ? RELAY_FORW */
         pbuf_free(p);
         return;
     }
@@ -292,13 +292,14 @@ dhcp6ds_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p,
     memcpy(dhcp6ds_reply_buf + roff, dhcp6ds_dns, sizeof(dhcp6ds_dns));
     roff += sizeof(dhcp6ds_dns);
 
-    q = pbuf_alloc(PBUF_RAW, roff, PBUF_RAM);
+    Assert(roff == (u16_t)roff);
+    q = pbuf_alloc(PBUF_RAW, (u16_t)roff, PBUF_RAM);
     if (q == NULL) {
         DPRINTF(("%s: pbuf_alloc(%d) failed\n", __func__, (int)roff));
         return;
     }
 
-    error = pbuf_take(q, dhcp6ds_reply_buf, roff);
+    error = pbuf_take(q, dhcp6ds_reply_buf, (u16_t)roff);
     if (error != ERR_OK) {
         DPRINTF(("%s: pbuf_take(%d) failed: %s\n",
                  __func__, (int)roff, proxy_lwip_strerr(error)));
diff --git a/src/VBox/NetworkServices/NAT/proxy_pollmgr.c b/src/VBox/NetworkServices/NAT/proxy_pollmgr.c
index 0c497a9..6431c98 100644
--- a/src/VBox/NetworkServices/NAT/proxy_pollmgr.c
+++ b/src/VBox/NetworkServices/NAT/proxy_pollmgr.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -90,8 +90,8 @@ pollmgr_init(void)
     pollmgr.nfds = 0;
 
     for (i = 0; i < POLLMGR_SLOT_STATIC_COUNT; ++i) {
-        pollmgr.chan[i][POLLMGR_CHFD_RD] = -1;
-        pollmgr.chan[i][POLLMGR_CHFD_WR] = -1;
+        pollmgr.chan[i][POLLMGR_CHFD_RD] = INVALID_SOCKET;
+        pollmgr.chan[i][POLLMGR_CHFD_WR] = INVALID_SOCKET;
     }
 
     for (i = 0; i < POLLMGR_SLOT_STATIC_COUNT; ++i) {
@@ -145,7 +145,7 @@ pollmgr_init(void)
   cleanup_close:
     for (i = 0; i < POLLMGR_SLOT_STATIC_COUNT; ++i) {
         SOCKET *chan = pollmgr.chan[i];
-        if (chan[POLLMGR_CHFD_RD] >= 0) {
+        if (chan[POLLMGR_CHFD_RD] != INVALID_SOCKET) {
             closesocket(chan[POLLMGR_CHFD_RD]);
             closesocket(chan[POLLMGR_CHFD_WR]);
         }
@@ -163,7 +163,7 @@ pollmgr_add_chan(int slot, struct pollmgr_handler *handler)
 {
     if (slot >= POLLMGR_SLOT_FIRST_DYNAMIC) {
         handler->slot = -1;
-        return -1;
+        return INVALID_SOCKET;
     }
 
     pollmgr_add_at(slot, handler, pollmgr.chan[slot][POLLMGR_CHFD_RD], POLLIN);
@@ -275,6 +275,7 @@ pollmgr_chan_recv_ptr(struct pollmgr_handler *handler, SOCKET fd, int revents)
 {
     void *ptr;
     ssize_t nread;
+    NOREF(handler);
 
     if (revents & POLLNVAL) {
         errx(EXIT_FAILURE, "chan %d: fd invalid", (int)handler->slot);
@@ -402,7 +403,8 @@ pollmgr_loop(void)
             handler = pollmgr.handlers[i];
 
             if (handler != NULL && handler->callback != NULL) {
-#if LWIP_PROXY_DEBUG /* DEBUG */
+#ifdef LWIP_PROXY_DEBUG
+# if LWIP_PROXY_DEBUG /* DEBUG */
                 if (i < POLLMGR_SLOT_FIRST_DYNAMIC) {
                     if (revents == POLLIN) {
                         DPRINTF2(("%s: ch %d\n", __func__, i));
@@ -416,7 +418,8 @@ pollmgr_loop(void)
                     DPRINTF2(("%s: fd %d @ revents 0x%x\n",
                               __func__, fd, revents));
                 }
-#endif /* DEBUG */
+# endif /* LWIP_PROXY_DEBUG / DEBUG */
+#endif
                 nevents = (*handler->callback)(handler, fd, revents);
             }
             else {
@@ -487,7 +490,7 @@ pollmgr_loop(void)
                 /* drop garbage entry at the end of the array */
                 --pollmgr.nfds;
 
-                if (delfirst == last) {
+                if (delfirst == (SOCKET)last) {
                     /* congruent to delnext >= pollmgr.nfds test below */
                     delfirst = INVALID_SOCKET; /* done */
                 }
diff --git a/src/VBox/NetworkServices/NAT/proxy_pollmgr.h b/src/VBox/NetworkServices/NAT/proxy_pollmgr.h
index e16481d..932990f 100644
--- a/src/VBox/NetworkServices/NAT/proxy_pollmgr.h
+++ b/src/VBox/NetworkServices/NAT/proxy_pollmgr.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/NetworkServices/NAT/proxy_rtadvd.c b/src/VBox/NetworkServices/NAT/proxy_rtadvd.c
index f25acd8..2a27744 100644
--- a/src/VBox/NetworkServices/NAT/proxy_rtadvd.c
+++ b/src/VBox/NetworkServices/NAT/proxy_rtadvd.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/NetworkServices/NAT/proxy_tftpd.c b/src/VBox/NetworkServices/NAT/proxy_tftpd.c
index 1c4c300..b124fe5 100644
--- a/src/VBox/NetworkServices/NAT/proxy_tftpd.c
+++ b/src/VBox/NetworkServices/NAT/proxy_tftpd.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -281,7 +281,8 @@ tftpd_rrq(struct pbuf *p, ip_addr_t *addr, u16_t port)
             }
 
             if (xfer->oack != NULL) {
-                pbuf_realloc(xfer->oack, xfer->oack->len - len);
+                Assert((u16_t)(xfer->oack->len - len) == xfer->oack->len - len);
+                pbuf_realloc(xfer->oack, (u16_t)(xfer->oack->len - len));
             }
         }
     }
@@ -617,10 +618,13 @@ tftp_parse_filename(struct xfer *xfer, char **ps, size_t *plen)
         return tftp_internal_error(xfer);
     }
 
-    status = RTStrPrintf(pathname, len, "%s/%s", tftpd.root, xfer->filename);
-    if (status < 0) {
-        return tftp_internal_error(xfer);
-    }
+    RTStrPrintf(pathname, len, "%s/%s", tftpd.root, xfer->filename);
+/** @todo fix RTStrPrintf because this does not currently work:
+ *   status = RTStrPrintf(pathname, len, "%s/%s", tftpd.root, xfer->filename);
+ *   if (status < 0) {
+ *       return tftp_internal_error(xfer);
+ *   }
+ */
 
     DPRINTF(("%s: full pathname: %s\n", __func__, pathname));
     xfer->fd = open(pathname, O_RDONLY);
@@ -820,8 +824,13 @@ tftp_add_oack(char **ps, size_t *plen,
     va_list ap;
     int sz;
 
-    sz = RTStrPrintf(*ps, *plen, "%s", optname);
-    if (sz < 0 || (size_t)sz >= *plen) {
+/** @todo Fix RTStrPrintf because this doesn't really work.
+ *   sz = RTStrPrintf(*ps, *plen, "%s", optname);
+ *   if (sz < 0 || (size_t)sz >= *plen) {
+ *       return -1;
+ *   } */
+    sz = (int)RTStrPrintf(*ps, *plen, "%s", optname);
+    if (/*sz < 0 ||*/ (size_t)sz >= *plen) {
         return -1;
     }
 
diff --git a/src/VBox/NetworkServices/NAT/pxdns.c b/src/VBox/NetworkServices/NAT/pxdns.c
index 0380c78..4850fbf 100644
--- a/src/VBox/NetworkServices/NAT/pxdns.c
+++ b/src/VBox/NetworkServices/NAT/pxdns.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -312,7 +312,7 @@ pxdns_set_nameservers(void *arg)
     const char **nameservers = (const char **)arg;
 
     if (g_proxy_options->nameservers != NULL) {
-        RTMemFree(g_proxy_options->nameservers);
+        RTMemFree((void *)g_proxy_options->nameservers);
     }
     g_proxy_options->nameservers = nameservers;
 
@@ -702,6 +702,14 @@ pxdns_forward_outbound(struct pxdns *pxdns, struct request *req)
 {
     union sockaddr_inet *resolver;
     ssize_t nsent;
+#ifdef RT_OS_WINDOWS
+    const char *pSendData = (const char *)&req->data[0];
+    int         cbSendData = (int)req->size;
+    Assert((size_t)cbSendData == req->size);
+#else
+    const void *pSendData = &req->data[0];
+    size_t      cbSendData = req->size;
+#endif
 
     DPRINTF2(("%s: req %p: sending to resolver #%lu\n",
               __func__, (void *)req, (unsigned long)req->residx));
@@ -711,13 +719,13 @@ pxdns_forward_outbound(struct pxdns *pxdns, struct request *req)
     resolver = &pxdns->resolvers[req->residx];
 
     if (resolver->sa.sa_family == AF_INET) {
-        nsent = sendto(pxdns->sock4, req->data, req->size, 0,
+        nsent = sendto(pxdns->sock4, pSendData, cbSendData, 0,
                        &resolver->sa, sizeof(resolver->sin));
 
     }
     else if (resolver->sa.sa_family == AF_INET6) {
         if (pxdns->sock6 != INVALID_SOCKET) {
-            nsent = sendto(pxdns->sock6, req->data, req->size, 0,
+            nsent = sendto(pxdns->sock6, pSendData, cbSendData, 0,
                            &resolver->sa, sizeof(resolver->sin6));
         }
         else {
@@ -815,7 +823,11 @@ pxdns_pmgr_pump(struct pollmgr_handler *handler, SOCKET fd, int revents)
     }
 
 
+#ifdef RT_OS_WINDOWS
+    nread = recv(fd, (char *)pollmgr_udpbuf, sizeof(pollmgr_udpbuf), 0);
+#else
     nread = recv(fd, pollmgr_udpbuf, sizeof(pollmgr_udpbuf), 0);
+#endif
     if (nread < 0) {
         DPRINTF(("%s: %R[sockerr]\n", __func__, SOCKERRNO()));
         return POLLIN;
diff --git a/src/VBox/NetworkServices/NAT/pxping.c b/src/VBox/NetworkServices/NAT/pxping.c
index 7f07c47..1781bc7 100644
--- a/src/VBox/NetworkServices/NAT/pxping.c
+++ b/src/VBox/NetworkServices/NAT/pxping.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -334,7 +334,7 @@ pxping_init(struct netif *netif, SOCKET sock4, SOCKET sock6)
         }
 
 #ifdef IPV6_RECVTCLASS  /* new in RFC 3542, there's no RFC 2292 counterpart */
-        /* TODO: IPV6_RECVTCLASS */
+        /** @todo IPV6_RECVTCLASS */
 #endif
 
         g_pxping.pmhdl6.callback = pxping_pmgr_pump;
@@ -556,7 +556,7 @@ pxping_recv4(void *arg, struct pbuf *p)
         /* control DF flag via setsockopt(2) */
 #define USE_DF_OPTION(_Optname)                         \
         const int dfopt = _Optname;                     \
-        const char * const dfoptname = #_Optname;
+        const char * const dfoptname = #_Optname; NOREF(dfoptname)
 #if   defined(RT_OS_LINUX)
         USE_DF_OPTION(IP_MTU_DISCOVER);
         df = df ? IP_PMTUDISC_DO : IP_PMTUDISC_DONT;
@@ -721,7 +721,7 @@ pxping_recv6(void *arg, struct pbuf *p)
      */
     icmph->id = pcb->host_id;
 
-    /* TODO: use control messages to save a syscall? */
+    /** @todo use control messages to save a syscall? */
     if (hopl != pxping->hopl) {
         status = setsockopt(pxping->sock6, IPPROTO_IPV6, IPV6_UNICAST_HOPS,
                             (char *)&hopl, sizeof(hopl));
@@ -1246,6 +1246,7 @@ pxping_pmgr_icmp4_echo(struct pxping *pxping,
     u16_t guest_id;
     u16_t oipsum;
     u32_t sum;
+    RT_NOREF(peer);
 
     iph = (struct ip_hdr *)pollmgr_udpbuf;
     icmph = (struct icmp_echo_hdr *)(pollmgr_udpbuf + IP_HLEN);
@@ -1347,6 +1348,7 @@ pxping_pmgr_icmp4_error(struct pxping *pxping,
     struct ping_pcb *pcb;
     u16_t guest_id;
     u32_t sum;
+    RT_NOREF(peer);
 
     iph = (struct ip_hdr *)pollmgr_udpbuf;
     icmph = (struct icmp_echo_hdr *)(pollmgr_udpbuf + IP_HLEN);
@@ -1511,11 +1513,13 @@ pxping_pmgr_icmp6(struct pxping *pxping)
     static u8_t cmsgbuf[128];
     struct cmsghdr *cmh;
     struct sockaddr_in6 sin6;
-    socklen_t salen = sizeof(sin6);
+    /* socklen_t salen = sizeof(sin6); - unused */
     struct icmp6_echo_hdr *icmph;
     struct in6_pktinfo *pktinfo;
     int hopl, tclass;
+#ifdef RT_OS_WINDOWS
     int status;
+#endif
 
     /*
      * Reads from raw IPv6 sockets deliver only the payload.  Full
diff --git a/src/VBox/NetworkServices/NAT/pxping_win.c b/src/VBox/NetworkServices/NAT/pxping_win.c
index 9498ee6..bc69969 100644
--- a/src/VBox/NetworkServices/NAT/pxping_win.c
+++ b/src/VBox/NetworkServices/NAT/pxping_win.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -33,7 +33,10 @@
 #undef IP6_STATS
 
 #include <winternl.h>           /* for PIO_APC_ROUTINE &c */
-#include <iphlpapi.h>
+#ifndef PIO_APC_ROUTINE_DEFINED
+# define PIO_APC_ROUTINE_DEFINED 1
+#endif
+#include <iprt/win/iphlpapi.h>
 #include <icmpapi.h>
 
 #include <stdio.h>
@@ -58,8 +61,8 @@ struct pxping {
      * so to avoid stack corruption we check windows version at run
      * time and provide correct callback.
      */
-    void *callback4;
-    void *callback6;
+    PIO_APC_ROUTINE pfnCallback4;
+    PIO_APC_ROUTINE pfnCallback6;
 };
 
 
@@ -118,12 +121,12 @@ pxping_init(struct netif *netif, SOCKET sock4, SOCKET sock6)
     }
 
     if (osvi.dwMajorVersion >= 6) {
-        g_pxping.callback4 = (void *)pxping_icmp4_callback_apc;
-        g_pxping.callback6 = (void *)pxping_icmp6_callback_apc;
+        g_pxping.pfnCallback4 = pxping_icmp4_callback_apc;
+        g_pxping.pfnCallback6 = pxping_icmp6_callback_apc;
     }
     else {
-        g_pxping.callback4 = (void *)pxping_icmp4_callback_old;
-        g_pxping.callback6 = (void *)pxping_icmp6_callback_old;
+        g_pxping.pfnCallback4 = (PIO_APC_ROUTINE)pxping_icmp4_callback_old;
+        g_pxping.pfnCallback6 = (PIO_APC_ROUTINE)pxping_icmp6_callback_old;
     }
 
 
@@ -242,7 +245,7 @@ pxping_recv4(void *arg, struct pbuf *p)
     opts.OptionsData = 0;
 
     status = IcmpSendEcho2(pxping->hdl4, NULL,
-                           pxping->callback4, pong,
+                           pxping->pfnCallback4, pong,
                            dst, reqdata, (WORD)reqsize, &opts,
                            pong->buf, (DWORD)pong->bufsize,
                            5 * 1000 /* ms */);
@@ -251,7 +254,7 @@ pxping_recv4(void *arg, struct pbuf *p)
         DPRINTF(("IcmpSendEcho2: unexpected status %d\n", status));
         goto out;
     }
-    else if ((status = GetLastError()) != ERROR_IO_PENDING) {
+    if ((status = GetLastError()) != ERROR_IO_PENDING) {
         int code;
 
         DPRINTF(("IcmpSendEcho2: error %d\n", status));
@@ -529,7 +532,7 @@ pxping_recv6(void *arg, struct pbuf *p)
     opts.Ttl = hopl;
 
     status = Icmp6SendEcho2(pxping->hdl6, NULL,
-                            pxping->callback6, pong,
+                            pxping->pfnCallback6, pong,
                             &src, &dst, reqdata, (WORD)reqsize, &opts,
                             pong->buf, (DWORD)pong->bufsize,
                             5 * 1000 /* ms */);
@@ -538,7 +541,7 @@ pxping_recv6(void *arg, struct pbuf *p)
         DPRINTF(("Icmp6SendEcho2: unexpected status %d\n", status));
         goto out;
     }
-    else if ((status = GetLastError()) != ERROR_IO_PENDING) {
+    if ((status = GetLastError()) != ERROR_IO_PENDING) {
         int code;
 
         DPRINTF(("Icmp6SendEcho2: error %d\n", status));
diff --git a/src/VBox/NetworkServices/NAT/pxremap.c b/src/VBox/NetworkServices/NAT/pxremap.c
index 5fc1628..11c0b40 100644
--- a/src/VBox/NetworkServices/NAT/pxremap.c
+++ b/src/VBox/NetworkServices/NAT/pxremap.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/NetworkServices/NAT/pxremap.h b/src/VBox/NetworkServices/NAT/pxremap.h
index b0b038d..e024b28 100644
--- a/src/VBox/NetworkServices/NAT/pxremap.h
+++ b/src/VBox/NetworkServices/NAT/pxremap.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/NetworkServices/NAT/pxtcp.c b/src/VBox/NetworkServices/NAT/pxtcp.c
index d1f5178..cd2482f 100644
--- a/src/VBox/NetworkServices/NAT/pxtcp.c
+++ b/src/VBox/NetworkServices/NAT/pxtcp.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -400,7 +400,11 @@ pxtcp_pmgr_add(struct pxtcp *pxtcp)
     int status;
 
     LWIP_ASSERT1(pxtcp != NULL);
+#ifdef RT_OS_WINDOWS
+    LWIP_ASSERT1(pxtcp->sock != INVALID_SOCKET);
+#else
     LWIP_ASSERT1(pxtcp->sock >= 0);
+#endif
     LWIP_ASSERT1(pxtcp->pmhdl.callback != NULL);
     LWIP_ASSERT1(pxtcp->pmhdl.data == (void *)pxtcp);
     LWIP_ASSERT1(pxtcp->pmhdl.slot < 0);
@@ -1115,6 +1119,7 @@ static int
 pxtcp_pmgr_connect(struct pollmgr_handler *handler, SOCKET fd, int revents)
 {
     struct pxtcp *pxtcp;
+    RT_NOREF(fd);
 
     pxtcp = (struct pxtcp *)handler->data;
     LWIP_ASSERT1(handler == &pxtcp->pmhdl);
@@ -1689,6 +1694,7 @@ pxtcp_pmgr_pump(struct pollmgr_handler *handler, SOCKET fd, int revents)
     struct pxtcp *pxtcp;
     int status;
     int sockerr;
+    RT_NOREF(fd);
 
     pxtcp = (struct pxtcp *)handler->data;
     LWIP_ASSERT1(handler == &pxtcp->pmhdl);
@@ -2143,7 +2149,8 @@ pxtcp_pcb_forward_inbound(struct pxtcp *pxtcp)
                 maybemore = TCP_WRITE_FLAG_MORE;
             }
 
-            error = tcp_write(pcb, &pxtcp->inbuf.buf[beg], toeob, maybemore);
+            Assert(toeob == (u16_t)toeob);
+            error = tcp_write(pcb, &pxtcp->inbuf.buf[beg], (u16_t)toeob, maybemore);
             if (error != ERR_OK) {
                 goto writeerr;
             }
diff --git a/src/VBox/NetworkServices/NAT/pxtcp.h b/src/VBox/NetworkServices/NAT/pxtcp.h
index b776e53..333b4c1 100644
--- a/src/VBox/NetworkServices/NAT/pxtcp.h
+++ b/src/VBox/NetworkServices/NAT/pxtcp.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/NetworkServices/NAT/pxudp.c b/src/VBox/NetworkServices/NAT/pxudp.c
index f216ad1..e5acb41 100644
--- a/src/VBox/NetworkServices/NAT/pxudp.c
+++ b/src/VBox/NetworkServices/NAT/pxudp.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -598,9 +598,10 @@ pxudp_pcb_forward_outbound(struct pxudp *pxudp, struct pbuf *p,
          * Unlike pxping.c, we can't use IP_HDRINCL here as it's only
          * valid for SOCK_RAW.
          */
-#     define USE_DF_OPTION(_Optname)                    \
-        const int dfopt = _Optname;                     \
-        const char * const dfoptname = #_Optname;
+#     define USE_DF_OPTION(_Optname) \
+            const int dfopt = _Optname; \
+            const char * const dfoptname = #_Optname; \
+            RT_NOREF_PV(dfoptname)
 #if   defined(IP_MTU_DISCOVER)  /* Linux */
         USE_DF_OPTION(IP_MTU_DISCOVER);
 #elif defined(IP_DONTFRAG)      /* Solaris 11+, FreeBSD */
@@ -758,7 +759,11 @@ pxudp_pmgr_pump(struct pollmgr_handler *handler, SOCKET fd, int revents)
         return POLLIN;
     }
 
+#ifdef RT_OS_WINDOWS
+    nread = recv(pxudp->sock, (char *)pollmgr_udpbuf, sizeof(pollmgr_udpbuf), 0);
+#else
     nread = recv(pxudp->sock, pollmgr_udpbuf, sizeof(pollmgr_udpbuf), 0);
+#endif
     if (nread == SOCKET_ERROR) {
         DPRINTF(("%s: %R[sockerr]\n", __func__, SOCKERRNO()));
         return POLLIN;
diff --git a/src/VBox/NetworkServices/NAT/rtmon_bsd.c b/src/VBox/NetworkServices/NAT/rtmon_bsd.c
index c6721b4..1fc6cb8 100644
--- a/src/VBox/NetworkServices/NAT/rtmon_bsd.c
+++ b/src/VBox/NetworkServices/NAT/rtmon_bsd.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/NetworkServices/NAT/rtmon_linux.c b/src/VBox/NetworkServices/NAT/rtmon_linux.c
index 8b6200b..c97ea28 100644
--- a/src/VBox/NetworkServices/NAT/rtmon_linux.c
+++ b/src/VBox/NetworkServices/NAT/rtmon_linux.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/NetworkServices/NAT/rtmon_win.c b/src/VBox/NetworkServices/NAT/rtmon_win.c
index 2625261..5119ab5 100644
--- a/src/VBox/NetworkServices/NAT/rtmon_win.c
+++ b/src/VBox/NetworkServices/NAT/rtmon_win.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/NetworkServices/NAT/tftp.h b/src/VBox/NetworkServices/NAT/tftp.h
index 42df909..8fb72bd 100644
--- a/src/VBox/NetworkServices/NAT/tftp.h
+++ b/src/VBox/NetworkServices/NAT/tftp.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/NetworkServices/NAT/winpoll.h b/src/VBox/NetworkServices/NAT/winpoll.h
index 915dc85..6e83f81 100644
--- a/src/VBox/NetworkServices/NAT/winpoll.h
+++ b/src/VBox/NetworkServices/NAT/winpoll.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/NetworkServices/NAT/winutils.h b/src/VBox/NetworkServices/NAT/winutils.h
index fc83bed..465e6ba 100644
--- a/src/VBox/NetworkServices/NAT/winutils.h
+++ b/src/VBox/NetworkServices/NAT/winutils.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -21,10 +21,10 @@
 # include <iprt/cdefs.h>
 
 # ifdef RT_OS_WINDOWS
-#  include <WinSock2.h>
-#  include <ws2tcpip.h>
+#  include <iprt/win/winsock2.h>
+#  include <iprt/win/ws2tcpip.h>
 #  include <mswsock.h>
-#  include <Windows.h>
+#  include <iprt/win/windows.h>
 #  include <iprt/err.h>
 #  include <iprt/net.h>
 #  include <iprt/log.h>
diff --git a/src/VBox/NetworkServices/NetLib/ComHostUtils.cpp b/src/VBox/NetworkServices/NetLib/ComHostUtils.cpp
index 2c5fcba..706937e 100644
--- a/src/VBox/NetworkServices/NetLib/ComHostUtils.cpp
+++ b/src/VBox/NetworkServices/NetLib/ComHostUtils.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -19,7 +19,7 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
-#ifdef RT_OS_WINDOWS
+#if defined(RT_OS_WINDOWS) && !defined(VBOX_COM_OUTOFPROC_MODULE)
 # define VBOX_COM_OUTOFPROC_MODULE
 #endif
 #include <VBox/com/com.h>
@@ -57,7 +57,7 @@
 #include "../NetLib/VBoxNetBaseService.h"
 
 #ifdef RT_OS_WINDOWS /* WinMain */
-# include <Windows.h>
+# include <iprt/win/windows.h>
 # include <stdlib.h>
 # ifdef INET_ADDRSTRLEN
 /* On Windows INET_ADDRSTRLEN defined as 22 Ws2ipdef.h, because it include port number */
diff --git a/src/VBox/NetworkServices/NetLib/VBoxNetARP.cpp b/src/VBox/NetworkServices/NetLib/VBoxNetARP.cpp
index 02ea7d7..2ac61be 100644
--- a/src/VBox/NetworkServices/NetLib/VBoxNetARP.cpp
+++ b/src/VBox/NetworkServices/NetLib/VBoxNetARP.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/NetworkServices/NetLib/VBoxNetBaseService.cpp b/src/VBox/NetworkServices/NetLib/VBoxNetBaseService.cpp
index e4779c8..d3848c5 100644
--- a/src/VBox/NetworkServices/NetLib/VBoxNetBaseService.cpp
+++ b/src/VBox/NetworkServices/NetLib/VBoxNetBaseService.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -63,7 +63,7 @@
 #include "VBoxNetBaseService.h"
 
 #ifdef RT_OS_WINDOWS /* WinMain */
-# include <Windows.h>
+# include <iprt/win/windows.h>
 # include <stdlib.h>
 #endif
 
@@ -246,6 +246,10 @@ int VBoxNetBaseService::run()
  *
  * @param   argc    Argument count.
  * @param   argv    Argument vector.
+ *
+ * @todo r=bird: The --help and --version options shall not return a
+ *               non-zero exit code.  So, this method need to grow some
+ *               complexity.  I'm to blame for that blunder :/
  */
 int VBoxNetBaseService::parseArgs(int argc, char **argv)
 {
@@ -294,7 +298,7 @@ int VBoxNetBaseService::parseArgs(int argc, char **argv)
                 else
                 {
                     RTStrmPrintf(g_pStdErr, "Invalid trunk type '%s'\n", Val.psz);
-                    return 1;
+                    return RTEXITCODE_SYNTAX;
                 }
                 break;
 
@@ -316,7 +320,7 @@ int VBoxNetBaseService::parseArgs(int argc, char **argv)
 
             case 'V': // --version (missed)
                 RTPrintf("%sr%u\n", RTBldCfgVersion(), RTBldCfgRevision());
-                return 1;
+                return 1; /** @todo this exit code is wrong, of course. :/ */
 
             case 'M': // --need-main
                 m->m_fNeedMain = true;
@@ -337,16 +341,16 @@ int VBoxNetBaseService::parseArgs(int argc, char **argv)
                 for (unsigned int i = 0; i < m->m_vecOptionDefs.size(); i++)
                     RTPrintf("    -%c, %s\n", m->m_vecOptionDefs[i]->iShort, m->m_vecOptionDefs[i]->pszLong);
                 usage(); /* to print Service Specific usage */
-                return 1;
+                return 1; /** @todo this exit code is wrong, of course. :/ */
 
             default:
             {
                 int rc1 = parseOpt(rc, Val);
                 if (RT_FAILURE(rc1))
                 {
-                    rc = RTGetOptPrintError(rc, &Val);
+                    RTEXITCODE rcExit = RTGetOptPrintError(rc, &Val);
                     RTPrintf("Use --help for more information.\n");
-                    return rc;
+                    return rcExit;
                 }
                 break;
             }
@@ -354,7 +358,7 @@ int VBoxNetBaseService::parseArgs(int argc, char **argv)
     }
 
     RTMemFree(paOptionArray);
-    return rc;
+    return RTEXITCODE_SUCCESS;
 }
 
 
@@ -532,21 +536,20 @@ int VBoxNetBaseService::abortWait()
 
 
 /* S/G API */
-int VBoxNetBaseService::sendBufferOnWire(PCINTNETSEG pcSg, int cSg, size_t cbFrame)
+int VBoxNetBaseService::sendBufferOnWire(PCINTNETSEG paSegs, size_t cSegs, size_t cbFrame)
 {
-    PINTNETHDR pHdr = NULL;
-    uint8_t *pu8Frame = NULL;
-
     /* Allocate frame */
-    int rc = IntNetRingAllocateFrame(&m->m_pIfBuf->Send, cbFrame, &pHdr, (void **)&pu8Frame);
+    PINTNETHDR pHdr = NULL;
+    uint8_t *pbFrame = NULL;
+    int rc = IntNetRingAllocateFrame(&m->m_pIfBuf->Send, (uint32_t)cbFrame, &pHdr, (void **)&pbFrame);
     AssertRCReturn(rc, rc);
 
     /* Now we fill pvFrame with S/G above */
-    int offFrame = 0;
-    for (int idxSg = 0; idxSg < cSg; ++idxSg)
+    size_t offFrame = 0;
+    for (size_t idxSeg = 0; idxSeg < cSegs; ++idxSeg)
     {
-        memcpy(&pu8Frame[offFrame], pcSg[idxSg].pv, pcSg[idxSg].cb);
-        offFrame+=pcSg[idxSg].cb;
+        memcpy(&pbFrame[offFrame], paSegs[idxSeg].pv, paSegs[idxSeg].cb);
+        offFrame += paSegs[idxSeg].cb;
     }
 
     /* Commit */
@@ -816,6 +819,7 @@ void VBoxNetBaseService::debugPrint(int32_t iMinLevel, bool fMsg, const char *ps
  */
 void VBoxNetBaseService::debugPrintV(int iMinLevel, bool fMsg, const char *pszFmt, va_list va) const
 {
+    RT_NOREF(fMsg);
     if (iMinLevel <= m->m_cVerbosity)
     {
         va_list vaCopy;                 /* This dude is *very* special, thus the copy. */
@@ -839,7 +843,7 @@ PRTGETOPTDEF VBoxNetBaseService::getOptionsPtr()
     for (unsigned int i = 0; i < m->m_vecOptionDefs.size(); ++i)
     {
         PRTGETOPTDEF pOpt = m->m_vecOptionDefs[i];
-        memcpy(&pOptArray[i], m->m_vecOptionDefs[i], sizeof(RTGETOPTDEF));
+        memcpy(&pOptArray[i], pOpt, sizeof(*pOpt));
     }
     return pOptArray;
 }
diff --git a/src/VBox/NetworkServices/NetLib/VBoxNetBaseService.h b/src/VBox/NetworkServices/NetLib/VBoxNetBaseService.h
index ac99e28..69963a0 100644
--- a/src/VBox/NetworkServices/NetLib/VBoxNetBaseService.h
+++ b/src/VBox/NetworkServices/NetLib/VBoxNetBaseService.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -69,7 +69,7 @@ public:
     int                 syncLeave();
     int                 waitForIntNetEvent(int cMillis);
     int                 abortWait();
-    int                 sendBufferOnWire(PCINTNETSEG pSg, int cSg, size_t cbBuffer);
+    int                 sendBufferOnWire(PCINTNETSEG paSegs, size_t cSegs, size_t cbBuffer);
     void                flushWire();
 
     virtual int         hlpUDPBroadcast(unsigned uSrcPort, unsigned uDstPort,
diff --git a/src/VBox/NetworkServices/NetLib/VBoxNetIntIf.cpp b/src/VBox/NetworkServices/NetLib/VBoxNetIntIf.cpp
index bf278fc..b496280 100644
--- a/src/VBox/NetworkServices/NetLib/VBoxNetIntIf.cpp
+++ b/src/VBox/NetworkServices/NetLib/VBoxNetIntIf.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -79,6 +79,8 @@ static void vboxnetIntIfCopySG(void *pvFrame, size_t cSegs, PCINTNETSEG paSegs)
  */
 int VBoxNetIntIfRingWriteFrame(PINTNETBUF pBuf, PINTNETRINGBUF pRingBuf, size_t cSegs, PCINTNETSEG paSegs)
 {
+    RT_NOREF(pBuf);
+
     /*
      * Validate input.
      */
diff --git a/src/VBox/NetworkServices/NetLib/VBoxNetLib.h b/src/VBox/NetworkServices/NetLib/VBoxNetLib.h
index 982dec7..43af321 100644
--- a/src/VBox/NetworkServices/NetLib/VBoxNetLib.h
+++ b/src/VBox/NetworkServices/NetLib/VBoxNetLib.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/NetworkServices/NetLib/VBoxNetPortForwardString.cpp b/src/VBox/NetworkServices/NetLib/VBoxNetPortForwardString.cpp
index 0cb32b7..fe1e29f 100644
--- a/src/VBox/NetworkServices/NetLib/VBoxNetPortForwardString.cpp
+++ b/src/VBox/NetworkServices/NetLib/VBoxNetPortForwardString.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -20,9 +20,9 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #ifndef RT_OS_WINDOWS
-#include <netinet/in.h>
+# include <netinet/in.h>
 #else
-# include <Winsock2.h>
+# include <iprt/win/winsock2.h>
 # include <Ws2ipdef.h>
 #endif
 
@@ -50,12 +50,12 @@
 #define PF_STR_ADDRESS_FIELD_STARTS "["
 #define PF_STR_ADDRESS_FIELD_ENDS "]"
 
-static int netPfStrAddressParse(char *pszRaw, int cbRaw,
+
+static int netPfStrAddressParse(char *pszRaw, size_t cchRaw,
                                 char *pszAddress, int cbAddress,
                                 bool fEmptyAcceptable)
 {
-    int idxRaw = 0;
-    int cbField = 0;
+    size_t cchField = 0;
 
     AssertPtrReturn(pszRaw, -1);
     AssertPtrReturn(pszAddress, -1);
@@ -65,36 +65,63 @@ static int netPfStrAddressParse(char *pszRaw, int cbRaw,
     {
         /* shift pszRaw to next symbol */
         pszRaw++;
-        cbRaw--;
+        cchRaw--;
 
 
         /* we shouldn't face with ending here */
-        AssertReturn(cbRaw > 0, VERR_INVALID_PARAMETER);
+        AssertReturn(cchRaw > 0, VERR_INVALID_PARAMETER);
 
         char *pszEndOfAddress = RTStrStr(pszRaw, PF_STR_ADDRESS_FIELD_ENDS);
 
         /* no pair closing sign */
         AssertPtrReturn(pszEndOfAddress, VERR_INVALID_PARAMETER);
 
-        cbField = pszEndOfAddress - pszRaw;
+        cchField = pszEndOfAddress - pszRaw;
 
         /* field should be less then the rest of the string */
-        AssertReturn(cbField < cbRaw, VERR_INVALID_PARAMETER);
+        AssertReturn(cchField < cchRaw, VERR_INVALID_PARAMETER);
 
-        if (cbField != 0)
-            RTStrCopy(pszAddress, RT_MIN(cbField + 1, cbAddress), pszRaw);
+        if (cchField != 0)
+            RTStrCopy(pszAddress, RT_MIN(cchField + 1, (size_t)cbAddress), pszRaw);
         else if (!fEmptyAcceptable)
             return -1;
     }
 
-    AssertReturn(pszRaw[cbField] == PF_ADDRESS_FIELD_ENDS, -1);
+    AssertReturn(pszRaw[cchField] == PF_ADDRESS_FIELD_ENDS, -1);
 
-    return cbField + 2; /* length of the field and closing braces */
+    return (int)cchField + 2; /* length of the field and closing braces */
 }
 
 
-static int netPfStrPortParse(char *pszRaw, int cbRaw, uint16_t *pu16Port)
+/**
+ * Parses a port something.
+ *
+ * @returns Offset relative to @a pszRaw of the end of the port field.
+ *          -1 on failure.
+ * @param   pszRaw          The zero terminated string to parse.  Points a field
+ *                          separator.
+ * @param   pu16Port        Where to store the port number on success.
+ */
+static int netPfStrPortParse(char *pszRaw, uint16_t *pu16Port)
 {
+#if 1
+    AssertPtrReturn(pszRaw, -1);
+    AssertPtrReturn(pu16Port, -1);
+    AssertReturn(pszRaw[0] == PF_FIELD_SEPARATOR, -1);
+
+    char *pszNext = NULL;
+    int rc = RTStrToUInt16Ex(&pszRaw[1], &pszNext, 0, pu16Port);
+    if (rc == VWRN_TRAILING_CHARS)
+        AssertReturn(*pszNext == PF_FIELD_SEPARATOR, -1);
+    else if (rc == VINF_SUCCESS)
+        Assert(*pszNext == '\0');
+    else
+        AssertMsgFailedReturn(("rc=%Rrc\n", rc), -1);
+    if (*pu16Port == 0)
+        return -1;
+    return (int)(pszNext - pszRaw);
+
+#else /* The same code, just a little more verbose: */
     char *pszEndOfPort = NULL;
     uint16_t u16Port = 0;
     int idxRaw = 1; /* we increment pszRaw after checks. */
@@ -105,15 +132,15 @@ static int netPfStrPortParse(char *pszRaw, int cbRaw, uint16_t *pu16Port)
     AssertPtrReturn(pu16Port, -1);
     AssertReturn(pszRaw[0] == PF_FIELD_SEPARATOR, -1);
 
-    pszRaw++; /* skip line separator */
-    cbRaw --;
+    pszRaw++; /* skip field separator */
+    cchRaw --;
 
-    pszEndOfPort = RTStrStr(pszRaw, ":");
+    char *pszEndOfPort = RTStrStr(pszRaw, ":");
     if (!pszEndOfPort)
     {
         cbRest = strlen(pszRaw);
 
-        Assert(cbRaw == cbRest);
+        Assert(cchRaw == cbRest);
 
         /* XXX: Assumption that if string is too big, it will be reported by
          * RTStrToUint16.
@@ -146,10 +173,11 @@ static int netPfStrPortParse(char *pszRaw, int cbRaw, uint16_t *pu16Port)
     *pu16Port = u16Port;
 
      return idxRaw;
+#endif
 }
 
 
-static int netPfStrAddressPortPairParse(char *pszRaw, int cbRaw,
+static int netPfStrAddressPortPairParse(char *pszRaw, size_t cchRaw,
                                         char *pszAddress, int cbAddress,
                                         bool fEmptyAddressAcceptable,
                                         uint16_t *pu16Port)
@@ -166,15 +194,15 @@ static int netPfStrAddressPortPairParse(char *pszRaw, int cbRaw,
               && pszRaw[1] == PF_ADDRESS_FIELD_STARTS);
 
     pszRaw++; /* field separator skip */
-    cbRaw--;
-    AssertReturn(cbRaw > 0, VERR_INVALID_PARAMETER);
+    cchRaw--;
+    AssertReturn(cchRaw > 0, VERR_INVALID_PARAMETER);
 
     idxRaw = 0;
 
     if (pszRaw[0] == PF_ADDRESS_FIELD_STARTS)
     {
         idxRaw += netPfStrAddressParse(pszRaw,
-                                       cbRaw - idxRaw,
+                                       cchRaw - idxRaw,
                                        pszAddress,
                                        cbAddress,
                                        fEmptyAddressAcceptable);
@@ -187,9 +215,9 @@ static int netPfStrAddressPortPairParse(char *pszRaw, int cbRaw,
 
     pszRaw += idxRaw;
     idxRawTotal += idxRaw;
-    cbRaw -= idxRaw;
+    cchRaw -= idxRaw;
 
-    AssertReturn(cbRaw > 0, VERR_INVALID_PARAMETER);
+    AssertReturn(cchRaw > 0, VERR_INVALID_PARAMETER);
 
     idxRaw = 0;
 
@@ -197,7 +225,7 @@ static int netPfStrAddressPortPairParse(char *pszRaw, int cbRaw,
 
     if (pszRaw[0] == PF_FIELD_SEPARATOR)
     {
-        idxRaw = netPfStrPortParse(pszRaw, strlen(pszRaw), pu16Port);
+        idxRaw = netPfStrPortParse(pszRaw, pu16Port);
 
         Assert(strlen(&pszRaw[idxRaw]) == 0 || pszRaw[idxRaw] == PF_FIELD_SEPARATOR);
 
@@ -213,42 +241,39 @@ static int netPfStrAddressPortPairParse(char *pszRaw, int cbRaw,
 
 /* XXX: Having fIPv6 we might emprove adress verification comparing address length
  * with INET[6]_ADDRLEN
+ *
  */
-int netPfStrToPf(const char *pcszStrPortForward, int fIPv6, PPORTFORWARDRULE pPfr)
+int netPfStrToPf(const char *pcszStrPortForward, bool fIPv6, PPORTFORWARDRULE pPfr)
 {
-    char *pszName;
+/** r=bird: Redo from scratch?  This is very hard to read.  And it's going about
+ *  things in a very complicated, potentially leaky (pszRaw) fashion. */
+
     int  proto;
-    char *pszHostAddr;
-    char *pszGuestAddr;
     uint16_t u16HostPort;
     uint16_t u16GuestPort;
     bool fTcpProto = false;
 
-    char *pszRawBegin = NULL;
-    char *pszRaw = NULL;
     int idxRaw = 0;
     int cbToken = 0;
-    int cbRaw = 0;
-    int rc = VINF_SUCCESS;
 
     AssertPtrReturn(pcszStrPortForward, VERR_INVALID_PARAMETER);
     AssertPtrReturn(pPfr, VERR_INVALID_PARAMETER);
 
     RT_ZERO(*pPfr);
 
-    pszHostAddr = &pPfr->szPfrHostAddr[0];
-    pszGuestAddr = &pPfr->szPfrGuestAddr[0];
-    pszName = &pPfr->szPfrName[0];
+    char *pszHostAddr = &pPfr->szPfrHostAddr[0];
+    char *pszGuestAddr = &pPfr->szPfrGuestAddr[0];
+    char *pszName = &pPfr->szPfrName[0];
 
-    cbRaw = strlen(pcszStrPortForward);
+    size_t cchRaw = strlen(pcszStrPortForward);
 
     /* Minimal rule ":tcp:[]:0:[]:0" has got lenght 14 */
-    AssertReturn(cbRaw > 14, VERR_INVALID_PARAMETER);
+    AssertReturn(cchRaw > 14, VERR_INVALID_PARAMETER);
 
-    pszRaw = RTStrDup(pcszStrPortForward);
+    char *pszRaw = RTStrDup(pcszStrPortForward);
     AssertReturn(pszRaw, VERR_NO_MEMORY);
 
-    pszRawBegin = pszRaw;
+    char *pszRawBegin = pszRaw;
 
     /* name */
     if (pszRaw[idxRaw] == PF_FIELD_SEPARATOR)
@@ -259,9 +284,9 @@ int netPfStrToPf(const char *pcszStrPortForward, int fIPv6, PPORTFORWARDRULE pPf
         if (!pszEndOfName)
             goto invalid_parameter;
 
-        cbToken = (pszEndOfName) - pszRaw; /* don't take : into account */
+        cbToken = pszEndOfName - pszRaw; /* don't take : into account */
         /* XXX it's unacceptable to have only name entry in PF */
-        AssertReturn(cbToken < cbRaw, VERR_INVALID_PARAMETER);
+        AssertReturn(cbToken < (ssize_t)cchRaw, VERR_INVALID_PARAMETER);
 
         if (   cbToken < 0
             || (size_t)cbToken >= PF_NAMELEN)
@@ -271,14 +296,14 @@ int netPfStrToPf(const char *pcszStrPortForward, int fIPv6, PPORTFORWARDRULE pPf
                   RT_MIN((size_t)cbToken + 1, PF_NAMELEN),
                   pszRaw);
         pszRaw += cbToken; /* move to separator */
-        cbRaw -= cbToken;
+        cchRaw -= cbToken;
     }
 
     AssertReturn(pszRaw[0] == PF_FIELD_SEPARATOR, VERR_INVALID_PARAMETER);
     /* protocol */
 
     pszRaw++; /* skip separator */
-    cbRaw--;
+    cchRaw--;
     idxRaw = 0;
 
     if (  (  (fTcpProto = (RTStrNICmp(pszRaw, "tcp", 3) == 0))
@@ -292,20 +317,20 @@ int netPfStrToPf(const char *pcszStrPortForward, int fIPv6, PPORTFORWARDRULE pPf
         goto invalid_parameter;
 
     pszRaw += idxRaw;
-    cbRaw -= idxRaw;
+    cchRaw -= idxRaw;
 
-    idxRaw = netPfStrAddressPortPairParse(pszRaw, cbRaw,
-                                         pszHostAddr, INET6_ADDRSTRLEN,
-                                         true, &u16HostPort);
+    idxRaw = netPfStrAddressPortPairParse(pszRaw, cchRaw,
+                                          pszHostAddr, INET6_ADDRSTRLEN,
+                                          true, &u16HostPort);
     if (idxRaw < 0)
         return VERR_INVALID_PARAMETER;
 
     pszRaw += idxRaw;
-    cbRaw -= idxRaw;
+    cchRaw -= idxRaw;
 
     Assert(pszRaw[0] == PF_FIELD_SEPARATOR);
 
-    idxRaw = netPfStrAddressPortPairParse(pszRaw, cbRaw,
+    idxRaw = netPfStrAddressPortPairParse(pszRaw, cchRaw,
                                           pszGuestAddr, INET6_ADDRSTRLEN,
                                           false, &u16GuestPort);
 
diff --git a/src/VBox/NetworkServices/NetLib/VBoxNetUDP.cpp b/src/VBox/NetworkServices/NetLib/VBoxNetUDP.cpp
index 01e7b75..8cabcdb 100644
--- a/src/VBox/NetworkServices/NetLib/VBoxNetUDP.cpp
+++ b/src/VBox/NetworkServices/NetLib/VBoxNetUDP.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/NetworkServices/NetLib/VBoxPortForwardString.h b/src/VBox/NetworkServices/NetLib/VBoxPortForwardString.h
index 16b28e1..a1b9676 100644
--- a/src/VBox/NetworkServices/NetLib/VBoxPortForwardString.h
+++ b/src/VBox/NetworkServices/NetLib/VBoxPortForwardString.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -48,7 +48,7 @@ typedef struct PORTFORWARDRULE
     uint16_t   u16PfrGuestPort;
 } PORTFORWARDRULE, *PPORTFORWARDRULE;
 
-int netPfStrToPf(const char *pcszStrPortForward,int fIPv6, PPORTFORWARDRULE pPfr);
+int netPfStrToPf(const char *pszStrPortForward, bool fIPv6, PPORTFORWARDRULE pPfr);
 
 RT_C_DECLS_END
 
diff --git a/src/VBox/NetworkServices/NetLib/cpp/utils.h b/src/VBox/NetworkServices/NetLib/cpp/utils.h
index adba457..f8ce98c 100644
--- a/src/VBox/NetworkServices/NetLib/cpp/utils.h
+++ b/src/VBox/NetworkServices/NetLib/cpp/utils.h
@@ -1,10 +1,10 @@
-/* $Id$ */
+/* $Id: utils.h $ */
 /** @file
  * NetLib/cpp/utils.h
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -15,20 +15,30 @@
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
 
-#ifndef _NETLIB_CPP_UTILS_H_
-# define _NETLIB_CPP_UTILS_H_
+#ifndef ___NETLIB_CPP_UTILS_H___
+#define ___NETLIB_CPP_UTILS_H___
 
-/* less operator for IPv4 addresess */
-static bool operator <(const RTNETADDRIPV4& a, const RTNETADDRIPV4& b)
+#include <iprt/types.h>
+
+/** less operator for IPv4 addresess */
+DECLINLINE(bool) operator <(const RTNETADDRIPV4 &lhs, const RTNETADDRIPV4 &rhs)
+{
+    return RT_N2H_U32(lhs.u) < RT_N2H_U32(rhs.u);
+}
+
+/** greater operator for IPv4 addresess */
+DECLINLINE(bool) operator >(const RTNETADDRIPV4 &lhs, const RTNETADDRIPV4 &rhs)
 {
-    return (RT_N2H_U32(a.u) < RT_N2H_U32(b.u));
+    return RT_N2H_U32(lhs.u) > RT_N2H_U32(rhs.u);
 }
 
-/*  Compares MAC addresses */
-static bool operator== (const RTMAC& lhs, const RTMAC& rhs)
+/**  Compares MAC addresses */
+DECLINLINE(bool) operator== (const RTMAC &lhs, const RTMAC &rhs)
 {
-    return (   lhs.au16[0] == rhs.au16[0]
-            && lhs.au16[1] == rhs.au16[1]
-            && lhs.au16[2] == rhs.au16[2]);
+    return lhs.au16[0] == rhs.au16[0]
+        && lhs.au16[1] == rhs.au16[1]
+        && lhs.au16[2] == rhs.au16[2];
 }
+
 #endif
+
diff --git a/src/VBox/NetworkServices/NetLib/shared_ptr.h b/src/VBox/NetworkServices/NetLib/shared_ptr.h
index 0624504..d539b51 100644
--- a/src/VBox/NetworkServices/NetLib/shared_ptr.h
+++ b/src/VBox/NetworkServices/NetLib/shared_ptr.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/NetworkServices/NetLib/utils.h b/src/VBox/NetworkServices/NetLib/utils.h
index 5140bb2..011e7f1 100644
--- a/src/VBox/NetworkServices/NetLib/utils.h
+++ b/src/VBox/NetworkServices/NetLib/utils.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -120,7 +120,7 @@ class NATNetworkListener
 };
 typedef ListenerImpl<NATNetworkListener, NATNetworkEventAdapter*> NATNetworkListenerImpl;
 
-# if VBOX_WITH_XPCOM
+# ifdef VBOX_WITH_XPCOM
 class NS_CLASSINFO_NAME(NATNetworkListenerImpl);
 # endif
 
diff --git a/src/VBox/RDP/client-1.8.3/Makefile.kmk b/src/VBox/RDP/client-1.8.3/Makefile.kmk
index 1d427a2..0060aa8 100644
--- a/src/VBox/RDP/client-1.8.3/Makefile.kmk
+++ b/src/VBox/RDP/client-1.8.3/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/Doxyfile b/src/VBox/Runtime/Doxyfile
index f8ee33b..901c6a7 100644
--- a/src/VBox/Runtime/Doxyfile
+++ b/src/VBox/Runtime/Doxyfile
@@ -2055,6 +2055,7 @@ PREDEFINED             = \
     "DECLINLINE(type)=inline type" \
     DECL_FORCE_INLINE(type)=DECLINLINE(type) \
     DECL_NO_INLINE(type)=type \
+    DECL_NO_RETURN(type)=type \
     DECLCALLBACK(type)=type \
     \
     AssertCompile(expr) \
diff --git a/src/VBox/Runtime/Makefile.kmk b/src/VBox/Runtime/Makefile.kmk
index 95b327f..89015e4 100644
--- a/src/VBox/Runtime/Makefile.kmk
+++ b/src/VBox/Runtime/Makefile.kmk
@@ -266,7 +266,8 @@ RuntimeR3_DEFS          = \
 	RT_WITH_VBOX \
  	RT_NO_GIP \
 	RT_WITHOUT_NOCRT_WRAPPERS \
-       IPRT_WITH_OPENSSL
+       IPRT_WITH_OPENSSL \
+       NOFILEID
 #RuntimeR3_DEFS         += RTMEM_WRAP_TO_EF_APIS
 ifdef IPRT_WITH_KSTUFF
  RuntimeR3_DEFS        += LDR_WITH_KLDR
@@ -1151,8 +1152,75 @@ RuntimeR3_SOURCES.freebsd = \
 	r3/posix/timer-posix.cpp \
 	r3/posix/tls-posix.cpp \
 	r3/posix/utf8-posix.cpp
-RuntimeR3_SOURCES.freebsd.x86   += common/string/memrchr.asm
-RuntimeR3_SOURCES.freebsd.amd64 += common/string/memrchr.asm
+
+RuntimeR3_SOURCES.netbsd = \
+	generic/cdrom-generic.cpp \
+	generic/RTDirQueryInfo-generic.cpp \
+	generic/RTDirSetTimes-generic.cpp \
+	generic/RTFileMove-generic.cpp \
+	generic/RTLogWriteDebugger-generic.cpp \
+	generic/RTPathAbs-generic.cpp \
+	generic/RTSemEventMultiWait-2-ex-generic.cpp \
+	generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
+	generic/RTSystemQueryDmiString-generic.cpp \
+	generic/RTSystemShutdown-generic.cpp \
+	generic/RTThreadGetAffinity-stub-generic.cpp \
+	generic/RTThreadSetAffinity-stub-generic.cpp \
+	generic/RTThreadSetAffinityToCpu-generic.cpp \
+	generic/RTTimeLocalNow-generic.cpp \
+	generic/RTTimerCreate-generic.cpp \
+	generic/RTUuidCreate-generic.cpp \
+	generic/mppresent-generic.cpp \
+	generic/sched-generic.cpp \
+	generic/utf16locale-generic.cpp \
+	generic/uuid-generic.cpp \
+	generic/RTMpCpuId-generic.cpp \
+	generic/RTMpGetCoreCount-generic.cpp \
+	generic/RTMpGetOnlineCoreCount-generic.cpp \
+	generic/RTProcDaemonize-generic.cpp \
+	generic/RTProcIsRunningByName-generic.cpp \
+	generic/RTThreadGetNativeState-generic.cpp \
+	r3/netbsd/rtProcInitExePath-netbsd.cpp \
+	r3/generic/allocex-r3-generic.cpp \
+	r3/posix/RTFileQueryFsSizes-posix.cpp \
+	r3/posix/RTHandleGetStandard-posix.cpp \
+	r3/posix/RTMemProtect-posix.cpp \
+	r3/posix/RTPathUserHome-posix.cpp \
+	r3/posix/RTSystemQueryOSInfo-posix.cpp \
+	r3/posix/RTSystemQueryTotalRam-posix.cpp \
+	r3/posix/RTTimeNow-posix.cpp \
+	r3/posix/RTTimeSet-posix.cpp \
+	r3/posix/dir-posix.cpp \
+	r3/posix/env-posix.cpp \
+	r3/posix/errvars-posix.cpp \
+	r3/posix/fileio-posix.cpp \
+	r3/posix/fileio2-posix.cpp \
+	r3/posix/filelock-posix.cpp \
+	r3/posix/fs-posix.cpp \
+	r3/posix/fs2-posix.cpp \
+	r3/posix/fs3-posix.cpp \
+	r3/posix/ldrNative-posix.cpp \
+	r3/posix/rtmempage-exec-mmap-heap-posix.cpp \
+	r3/posix/path-posix.cpp \
+	r3/posix/path2-posix.cpp \
+	r3/posix/pathhost-posix.cpp \
+	r3/posix/RTPathUserDocuments-posix.cpp \
+	r3/posix/pipe-posix.cpp \
+	r3/posix/process-posix.cpp \
+	r3/posix/process-creation-posix.cpp \
+	r3/posix/rand-posix.cpp \
+	r3/posix/semevent-posix.cpp \
+	r3/posix/semeventmulti-posix.cpp \
+	r3/posix/semmutex-posix.cpp \
+	r3/posix/semrw-posix.cpp \
+	r3/posix/symlink-posix.cpp \
+	r3/posix/thread-posix.cpp \
+	r3/posix/thread2-posix.cpp \
+	r3/posix/time-posix.cpp \
+	r3/posix/timelocal-posix.cpp \
+	r3/posix/timer-posix.cpp \
+	r3/posix/tls-posix.cpp \
+	r3/posix/utf8-posix.cpp
 
 RuntimeR3_SOURCES.solaris = \
 	generic/cdrom-generic.cpp \
@@ -1761,7 +1829,7 @@ RuntimeR3NoCRTGCC_SOURCES.x86 = \
 # RuntimeR0 - Ring-0 library for VMMR0.
 #
 RuntimeR0_TEMPLATE      = VBoxR0
-RuntimeR0_DEFS          = IN_RT_R0 RT_WITH_VBOX
+RuntimeR0_DEFS          = IN_RT_R0 RT_WITH_VBOX NOFILEID
 ifn1of ($(KBUILD_TARGET_ARCH), amd64 x86)
  RuntimeR0_DEFS        += RT_NO_GIP
 endif
@@ -1908,7 +1976,7 @@ RuntimeR0Stub_SOURCES.solaris = \
 #
 RuntimeR0Drv_TEMPLATE   = VBoxR0DrvLib
 RuntimeR0Drv_SDKS.win   = ReorderCompilerIncs $(VBOX_WINDDK) $(VBOX_WINPSDK)INCS VBOX_OPENSSL
-RuntimeR0Drv_DEFS       = IN_RT_R0 RT_WITH_VBOX RT_WITHOUT_NOCRT_WRAPPERS RT_NO_EXPORT_SYMBOL
+RuntimeR0Drv_DEFS       = IN_RT_R0 RT_WITH_VBOX RT_WITHOUT_NOCRT_WRAPPERS RT_NO_EXPORT_SYMBOL NOFILEID
 RuntimeR0Drv_DEFS.win   = IN_SUP_R0 LDR_ONLY_PE
 RuntimeR0Drv_DEFS.linux = MODULE KBUILD_MODNAME=KBUILD_STR\(vboxdrv\) KBUILD_BASENAME=KBUILD_STR\(vboxdrv\) IN_SUP_R0
 
@@ -2341,6 +2409,39 @@ RuntimeR0Drv_SOURCES.freebsd = \
 	r0drv/memobj-r0drv.cpp \
 	r0drv/powernotification-r0drv.c
 
+RuntimeR0Drv_SOURCES.netbsd = \
+	common/misc/thread.cpp \
+	common/string/memchr.asm \
+	common/string/memmove.asm \
+	common/string/strpbrk.cpp \
+	common/string/memcmp.asm \
+	common/string/strchr.asm \
+	generic/RTAssertShouldPanic-generic.cpp \
+	generic/RTLogWriteDebugger-generic.cpp \
+	generic/RTTimerCreate-generic.cpp \
+	generic/mppresent-generic.cpp \
+	r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp \
+	r0drv/generic/mpnotification-r0drv-generic.cpp \
+	r0drv/generic/threadctxhooks-r0drv-generic.cpp \
+	r0drv/netbsd/RTLogWriteStdOut-r0drv-netbsd.c \
+	r0drv/netbsd/alloc-r0drv-netbsd.c \
+	r0drv/netbsd/assert-r0drv-netbsd.c \
+	r0drv/netbsd/initterm-r0drv-netbsd.c \
+	r0drv/netbsd/memobj-r0drv-netbsd.c \
+	r0drv/netbsd/memuserkernel-r0drv-netbsd.c \
+	r0drv/netbsd/process-r0drv-netbsd.c \
+	r0drv/netbsd/semevent-r0drv-netbsd.c \
+	r0drv/netbsd/semeventmulti-r0drv-netbsd.c \
+	r0drv/netbsd/semfastmutex-r0drv-netbsd.c \
+	r0drv/netbsd/spinlock-r0drv-netbsd.c \
+	r0drv/netbsd/thread-r0drv-netbsd.c \
+	r0drv/netbsd/thread2-r0drv-netbsd.c \
+	r0drv/netbsd/time-r0drv-netbsd.c \
+	r0drv/netbsd/mp-r0drv-netbsd.c \
+	generic/timer-generic.cpp \
+	r0drv/memobj-r0drv.cpp \
+	r0drv/powernotification-r0drv.c
+
 RuntimeR0Drv_SOURCES.solaris = \
 	common/misc/thread.cpp \
 	common/string/memchr.asm \
@@ -2443,7 +2544,7 @@ ifdef VBOX_WITH_RAW_MODE
  # RuntimeRC - Raw-mode context library.
  #
  RuntimeRC_TEMPLATE      = VBoxRc
- RuntimeRC_DEFS          = IN_RT_RC RT_WITH_VBOX IN_SUP_RC IN_VMM_RC
+ RuntimeRC_DEFS          = IN_RT_RC RT_WITH_VBOX IN_SUP_RC IN_VMM_RC NOFILEID
  RuntimeRC_INCS          = include
  RuntimeRC_SOURCES      := \
 	common/asm/ASMMemFirstMismatchingU8.asm \
diff --git a/src/VBox/Runtime/VBox/RTAssertShouldPanic-vbox.cpp b/src/VBox/Runtime/VBox/RTAssertShouldPanic-vbox.cpp
index 547e392..2b2fc7d 100644
--- a/src/VBox/Runtime/VBox/RTAssertShouldPanic-vbox.cpp
+++ b/src/VBox/Runtime/VBox/RTAssertShouldPanic-vbox.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/VBox/VBoxRTDeps.cpp b/src/VBox/Runtime/VBox/VBoxRTDeps.cpp
index a0f9f06..ddfccec 100644
--- a/src/VBox/Runtime/VBox/VBoxRTDeps.cpp
+++ b/src/VBox/Runtime/VBox/VBoxRTDeps.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -41,7 +41,10 @@
 #include <libxml/globals.h>
 #include <openssl/md5.h>
 #include <openssl/rc4.h>
-#include <openssl/pem.h>
+#ifdef RT_OS_WINDOWS
+# include <iprt/win/windows.h>
+#endif
+#include <openssl/pem.h> /* drags in Windows.h */
 #include <openssl/x509.h>
 #include <openssl/rsa.h>
 #include <openssl/ssl.h>
diff --git a/src/VBox/Runtime/VBox/VBoxRTImp.def b/src/VBox/Runtime/VBox/VBoxRTImp.def
index 4096c8a..b7ac81e 100644
--- a/src/VBox/Runtime/VBox/VBoxRTImp.def
+++ b/src/VBox/Runtime/VBox/VBoxRTImp.def
@@ -3,7 +3,7 @@
 ; VirtualBox Runtime DLL - Stable Interface Definition file.
 
 ;
-; Copyright (C) 2010-2015 Oracle Corporation
+; Copyright (C) 2010-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/VBox/dbus.cpp b/src/VBox/Runtime/VBox/dbus.cpp
index ddd22e1..9112123 100644
--- a/src/VBox/Runtime/VBox/dbus.cpp
+++ b/src/VBox/Runtime/VBox/dbus.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/VBox/errmsgvboxcom.xsl b/src/VBox/Runtime/VBox/errmsgvboxcom.xsl
index 1032cb1..a1d8ac5 100644
--- a/src/VBox/Runtime/VBox/errmsgvboxcom.xsl
+++ b/src/VBox/Runtime/VBox/errmsgvboxcom.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 
 <!--
- *  A template to generate a C header that will contain all result code
- *  definitions as entires of the const RTCOMERRMSG array (for use in the
- *  %Rhrc format specifier) as they are defined in the VirtualBox interface
- *  definition file (src/VBox/Main/idl/VirtualBox.xidl).
+    A template to generate a C header that will contain all result code
+    definitions as entires of the const RTCOMERRMSG array (for use in the
+    %Rhrc format specifier) as they are defined in the VirtualBox interface
+    definition file (src/VBox/Main/idl/VirtualBox.xidl).
 
-    Copyright (C) 2006-2015 Oracle Corporation
+    Copyright (C) 2006-2016 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/VBox/log-vbox.cpp b/src/VBox/Runtime/VBox/log-vbox.cpp
index b326067..99a058c 100644
--- a/src/VBox/Runtime/VBox/log-vbox.cpp
+++ b/src/VBox/Runtime/VBox/log-vbox.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -128,13 +128,15 @@
 *********************************************************************************************************************************/
 #ifdef IN_RING3
 # if defined(RT_OS_WINDOWS)
-#  include <Windows.h>
+#  include <iprt/win/windows.h>
 # elif defined(RT_OS_LINUX)
 #  include <unistd.h>
-# elif defined(RT_OS_FREEBSD)
+# elif defined(RT_OS_FREEBSD) || defined(RT_OS_NETBSD)
 #  include <sys/param.h>
 #  include <sys/sysctl.h>
-#  include <sys/user.h>
+#  if defined(RT_OS_FREEBSD)
+#    include <sys/user.h>
+#  endif
 #  include <stdlib.h>
 #  include <unistd.h>
 # elif defined(RT_OS_HAIKU)
@@ -207,28 +209,41 @@ RTDECL(PRTLOGGER) RTLogDefaultInit(void)
     ASSERT_LOG_GROUP(DEFAULT);
     ASSERT_LOG_GROUP(AUDIO_MIXER);
     ASSERT_LOG_GROUP(AUDIO_MIXER_BUFFER);
+    ASSERT_LOG_GROUP(AUTOLOGON);
     ASSERT_LOG_GROUP(CFGM);
     ASSERT_LOG_GROUP(CPUM);
     ASSERT_LOG_GROUP(CSAM);
     ASSERT_LOG_GROUP(DBGC);
     ASSERT_LOG_GROUP(DBGF);
     ASSERT_LOG_GROUP(DBGF_INFO);
+    ASSERT_LOG_GROUP(DBGG);
     ASSERT_LOG_GROUP(DEV);
     ASSERT_LOG_GROUP(DEV_AC97);
     ASSERT_LOG_GROUP(DEV_ACPI);
     ASSERT_LOG_GROUP(DEV_APIC);
+    ASSERT_LOG_GROUP(DEV_BUSLOGIC);
+    ASSERT_LOG_GROUP(DEV_DMA);
+    ASSERT_LOG_GROUP(DEV_E1000);
+    ASSERT_LOG_GROUP(DEV_EFI);
+    ASSERT_LOG_GROUP(DEV_EHCI);
     ASSERT_LOG_GROUP(DEV_FDC);
+    ASSERT_LOG_GROUP(DEV_GIM);
     ASSERT_LOG_GROUP(DEV_HDA);
     ASSERT_LOG_GROUP(DEV_HDA_CODEC);
     ASSERT_LOG_GROUP(DEV_HPET);
     ASSERT_LOG_GROUP(DEV_IDE);
+    ASSERT_LOG_GROUP(DEV_INIP);
     ASSERT_LOG_GROUP(DEV_KBD);
     ASSERT_LOG_GROUP(DEV_LPC);
-    ASSERT_LOG_GROUP(DEV_NE2000);
+    ASSERT_LOG_GROUP(DEV_LSILOGICSCSI);
+    ASSERT_LOG_GROUP(DEV_NVME);
+    ASSERT_LOG_GROUP(DEV_OHCI);
+    ASSERT_LOG_GROUP(DEV_PARALLEL);
     ASSERT_LOG_GROUP(DEV_PC);
     ASSERT_LOG_GROUP(DEV_PC_ARCH);
     ASSERT_LOG_GROUP(DEV_PC_BIOS);
     ASSERT_LOG_GROUP(DEV_PCI);
+    ASSERT_LOG_GROUP(DEV_PCI_RAW);
     ASSERT_LOG_GROUP(DEV_PCNET);
     ASSERT_LOG_GROUP(DEV_PIC);
     ASSERT_LOG_GROUP(DEV_PIT);
@@ -237,35 +252,243 @@ RTDECL(PRTLOGGER) RTLogDefaultInit(void)
     ASSERT_LOG_GROUP(DEV_SERIAL);
     ASSERT_LOG_GROUP(DEV_SMC);
     ASSERT_LOG_GROUP(DEV_VGA);
+    ASSERT_LOG_GROUP(DEV_VIRTIO);
+    ASSERT_LOG_GROUP(DEV_VIRTIO_NET);
     ASSERT_LOG_GROUP(DEV_VMM);
+    ASSERT_LOG_GROUP(DEV_VMM_BACKDOOR);
     ASSERT_LOG_GROUP(DEV_VMM_STDERR);
+    ASSERT_LOG_GROUP(DEV_VMSVGA);
+    ASSERT_LOG_GROUP(DEV_XHCI);
     ASSERT_LOG_GROUP(DIS);
     ASSERT_LOG_GROUP(DRV);
     ASSERT_LOG_GROUP(DRV_ACPI);
     ASSERT_LOG_GROUP(DRV_AUDIO);
     ASSERT_LOG_GROUP(DRV_BLOCK);
+    ASSERT_LOG_GROUP(DRV_CHAR);
+    ASSERT_LOG_GROUP(DRV_DISK_INTEGRITY);
+    ASSERT_LOG_GROUP(DRV_DISPLAY);
     ASSERT_LOG_GROUP(DRV_FLOPPY);
     ASSERT_LOG_GROUP(DRV_HOST_AUDIO);
+    ASSERT_LOG_GROUP(DRV_HOST_BASE);
     ASSERT_LOG_GROUP(DRV_HOST_DVD);
     ASSERT_LOG_GROUP(DRV_HOST_FLOPPY);
+    ASSERT_LOG_GROUP(DRV_HOST_PARALLEL);
+    ASSERT_LOG_GROUP(DRV_HOST_SERIAL);
+    ASSERT_LOG_GROUP(DRV_INTNET);
     ASSERT_LOG_GROUP(DRV_ISO);
     ASSERT_LOG_GROUP(DRV_KBD_QUEUE);
+    ASSERT_LOG_GROUP(DRV_LWIP);
+    ASSERT_LOG_GROUP(DRV_MINIPORT);
     ASSERT_LOG_GROUP(DRV_MOUSE_QUEUE);
+    ASSERT_LOG_GROUP(DRV_NAMEDPIPE);
     ASSERT_LOG_GROUP(DRV_NAT);
     ASSERT_LOG_GROUP(DRV_RAW_IMAGE);
+    ASSERT_LOG_GROUP(DRV_SCSI);
+    ASSERT_LOG_GROUP(DRV_SCSIHOST);
+    ASSERT_LOG_GROUP(DRV_TCP);
+    ASSERT_LOG_GROUP(DRV_TRANSPORT_ASYNC);
     ASSERT_LOG_GROUP(DRV_TUN);
+    ASSERT_LOG_GROUP(DRV_UDPTUNNEL);
     ASSERT_LOG_GROUP(DRV_USBPROXY);
     ASSERT_LOG_GROUP(DRV_VBOXHDD);
+    ASSERT_LOG_GROUP(DRV_VD);
     ASSERT_LOG_GROUP(DRV_VRDE_AUDIO);
     ASSERT_LOG_GROUP(DRV_VSWITCH);
     ASSERT_LOG_GROUP(DRV_VUSB);
     ASSERT_LOG_GROUP(EM);
+    ASSERT_LOG_GROUP(FTM);
+    ASSERT_LOG_GROUP(GIM);
+    ASSERT_LOG_GROUP(GMM);
+    ASSERT_LOG_GROUP(GUEST_CONTROL);
+    ASSERT_LOG_GROUP(GUEST_DND);
     ASSERT_LOG_GROUP(GUI);
+    ASSERT_LOG_GROUP(GVMM);
     ASSERT_LOG_GROUP(HGCM);
+    ASSERT_LOG_GROUP(HGSMI);
     ASSERT_LOG_GROUP(HM);
+    ASSERT_LOG_GROUP(IEM);
     ASSERT_LOG_GROUP(IOM);
+    ASSERT_LOG_GROUP(IPC);
     ASSERT_LOG_GROUP(LWIP);
+    ASSERT_LOG_GROUP(LWIP_API_LIB);
+    ASSERT_LOG_GROUP(LWIP_API_MSG);
+    ASSERT_LOG_GROUP(LWIP_ETHARP);
+    ASSERT_LOG_GROUP(LWIP_ICMP);
+    ASSERT_LOG_GROUP(LWIP_IGMP);
+    ASSERT_LOG_GROUP(LWIP_INET);
+    ASSERT_LOG_GROUP(LWIP_IP4);
+    ASSERT_LOG_GROUP(LWIP_IP4_REASS);
+    ASSERT_LOG_GROUP(LWIP_IP6);
+    ASSERT_LOG_GROUP(LWIP_MEM);
+    ASSERT_LOG_GROUP(LWIP_MEMP);
+    ASSERT_LOG_GROUP(LWIP_NETIF);
+    ASSERT_LOG_GROUP(LWIP_PBUF);
+    ASSERT_LOG_GROUP(LWIP_RAW);
+    ASSERT_LOG_GROUP(LWIP_SOCKETS);
+    ASSERT_LOG_GROUP(LWIP_SYS);
+    ASSERT_LOG_GROUP(LWIP_TCP);
+    ASSERT_LOG_GROUP(LWIP_TCPIP);
+    ASSERT_LOG_GROUP(LWIP_TCP_CWND);
+    ASSERT_LOG_GROUP(LWIP_TCP_FR);
+    ASSERT_LOG_GROUP(LWIP_TCP_INPUT);
+    ASSERT_LOG_GROUP(LWIP_TCP_OUTPUT);
+    ASSERT_LOG_GROUP(LWIP_TCP_QLEN);
+    ASSERT_LOG_GROUP(LWIP_TCP_RST);
+    ASSERT_LOG_GROUP(LWIP_TCP_RTO);
+    ASSERT_LOG_GROUP(LWIP_TCP_WND);
+    ASSERT_LOG_GROUP(LWIP_TIMERS);
+    ASSERT_LOG_GROUP(LWIP_UDP);
     ASSERT_LOG_GROUP(MAIN);
+    ASSERT_LOG_GROUP(MAIN_ADDITIONSFACILITY);
+    ASSERT_LOG_GROUP(MAIN_ADDITIONSSTATECHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_APPLIANCE);
+    ASSERT_LOG_GROUP(MAIN_AUDIOADAPTER);
+    ASSERT_LOG_GROUP(MAIN_BANDWIDTHCONTROL);
+    ASSERT_LOG_GROUP(MAIN_BANDWIDTHGROUP);
+    ASSERT_LOG_GROUP(MAIN_BANDWIDTHGROUPCHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_BIOSSETTINGS);
+    ASSERT_LOG_GROUP(MAIN_CANSHOWWINDOWEVENT);
+    ASSERT_LOG_GROUP(MAIN_CLIPBOARDMODECHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_CONSOLE);
+    ASSERT_LOG_GROUP(MAIN_CPUCHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_CPUEXECUTIONCAPCHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_DHCPSERVER);
+    ASSERT_LOG_GROUP(MAIN_DIRECTORY);
+    ASSERT_LOG_GROUP(MAIN_DISPLAY);
+    ASSERT_LOG_GROUP(MAIN_DISPLAYSOURCEBITMAP);
+    ASSERT_LOG_GROUP(MAIN_DNDBASE);
+    ASSERT_LOG_GROUP(MAIN_DNDMODECHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_DNDSOURCE);
+    ASSERT_LOG_GROUP(MAIN_DNDTARGET);
+    ASSERT_LOG_GROUP(MAIN_EMULATEDUSB);
+    ASSERT_LOG_GROUP(MAIN_EVENT);
+    ASSERT_LOG_GROUP(MAIN_EVENTLISTENER);
+    ASSERT_LOG_GROUP(MAIN_EVENTSOURCE);
+    ASSERT_LOG_GROUP(MAIN_EVENTSOURCECHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_EXTPACK);
+    ASSERT_LOG_GROUP(MAIN_EXTPACKBASE);
+    ASSERT_LOG_GROUP(MAIN_EXTPACKFILE);
+    ASSERT_LOG_GROUP(MAIN_EXTPACKMANAGER);
+    ASSERT_LOG_GROUP(MAIN_EXTPACKPLUGIN);
+    ASSERT_LOG_GROUP(MAIN_EXTRADATACANCHANGEEVENT);
+    ASSERT_LOG_GROUP(MAIN_EXTRADATACHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_FILE);
+    ASSERT_LOG_GROUP(MAIN_FRAMEBUFFER);
+    ASSERT_LOG_GROUP(MAIN_FRAMEBUFFEROVERLAY);
+    ASSERT_LOG_GROUP(MAIN_FSOBJINFO);
+    ASSERT_LOG_GROUP(MAIN_GUEST);
+    ASSERT_LOG_GROUP(MAIN_GUESTDIRECTORY);
+    ASSERT_LOG_GROUP(MAIN_GUESTDNDSOURCE);
+    ASSERT_LOG_GROUP(MAIN_GUESTDNDTARGET);
+    ASSERT_LOG_GROUP(MAIN_GUESTERRORINFO);
+    ASSERT_LOG_GROUP(MAIN_GUESTFILE);
+    ASSERT_LOG_GROUP(MAIN_GUESTFILEEVENT);
+    ASSERT_LOG_GROUP(MAIN_GUESTFILEIOEVENT);
+    ASSERT_LOG_GROUP(MAIN_GUESTFILEOFFSETCHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_GUESTFILEREADEVENT);
+    ASSERT_LOG_GROUP(MAIN_GUESTFILEREGISTEREDEVENT);
+    ASSERT_LOG_GROUP(MAIN_GUESTFILESTATECHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_GUESTFILEWRITEEVENT);
+    ASSERT_LOG_GROUP(MAIN_GUESTFSOBJINFO);
+    ASSERT_LOG_GROUP(MAIN_GUESTKEYBOARDEVENT);
+    ASSERT_LOG_GROUP(MAIN_GUESTMONITORCHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_GUESTMOUSEEVENT);
+    ASSERT_LOG_GROUP(MAIN_GUESTMULTITOUCHEVENT);
+    ASSERT_LOG_GROUP(MAIN_GUESTOSTYPE);
+    ASSERT_LOG_GROUP(MAIN_GUESTPROCESS);
+    ASSERT_LOG_GROUP(MAIN_GUESTPROCESSEVENT);
+    ASSERT_LOG_GROUP(MAIN_GUESTPROCESSINPUTNOTIFYEVENT);
+    ASSERT_LOG_GROUP(MAIN_GUESTPROCESSIOEVENT);
+    ASSERT_LOG_GROUP(MAIN_GUESTPROCESSOUTPUTEVENT);
+    ASSERT_LOG_GROUP(MAIN_GUESTPROCESSREGISTEREDEVENT);
+    ASSERT_LOG_GROUP(MAIN_GUESTPROCESSSTATECHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_GUESTPROPERTYCHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_GUESTSESSION);
+    ASSERT_LOG_GROUP(MAIN_GUESTSESSIONEVENT);
+    ASSERT_LOG_GROUP(MAIN_GUESTSESSIONREGISTEREDEVENT);
+    ASSERT_LOG_GROUP(MAIN_GUESTSESSIONSTATECHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_GUESTUSERSTATECHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_HOST);
+    ASSERT_LOG_GROUP(MAIN_HOSTNAMERESOLUTIONCONFIGURATIONCHANGEEVENT);
+    ASSERT_LOG_GROUP(MAIN_HOSTNETWORKINTERFACE);
+    ASSERT_LOG_GROUP(MAIN_HOSTPCIDEVICEPLUGEVENT);
+    ASSERT_LOG_GROUP(MAIN_HOSTUSBDEVICE);
+    ASSERT_LOG_GROUP(MAIN_HOSTUSBDEVICEFILTER);
+    ASSERT_LOG_GROUP(MAIN_HOSTVIDEOINPUTDEVICE);
+    ASSERT_LOG_GROUP(MAIN_INTERNALMACHINECONTROL);
+    ASSERT_LOG_GROUP(MAIN_INTERNALSESSIONCONTROL);
+    ASSERT_LOG_GROUP(MAIN_KEYBOARD);
+    ASSERT_LOG_GROUP(MAIN_KEYBOARDLEDSCHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_MACHINE);
+    ASSERT_LOG_GROUP(MAIN_MACHINEDATACHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_MACHINEDEBUGGER);
+    ASSERT_LOG_GROUP(MAIN_MACHINEEVENT);
+    ASSERT_LOG_GROUP(MAIN_MACHINEREGISTEREDEVENT);
+    ASSERT_LOG_GROUP(MAIN_MACHINESTATECHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_MEDIUM);
+    ASSERT_LOG_GROUP(MAIN_MEDIUMATTACHMENT);
+    ASSERT_LOG_GROUP(MAIN_MEDIUMCHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_MEDIUMCONFIGCHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_MEDIUMFORMAT);
+    ASSERT_LOG_GROUP(MAIN_MEDIUMREGISTEREDEVENT);
+    ASSERT_LOG_GROUP(MAIN_MOUSE);
+    ASSERT_LOG_GROUP(MAIN_MOUSECAPABILITYCHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_MOUSEPOINTERSHAPE);
+    ASSERT_LOG_GROUP(MAIN_MOUSEPOINTERSHAPECHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_NATENGINE);
+    ASSERT_LOG_GROUP(MAIN_NATNETWORK);
+    ASSERT_LOG_GROUP(MAIN_NATNETWORKALTEREVENT);
+    ASSERT_LOG_GROUP(MAIN_NATNETWORKCHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_NATNETWORKCREATIONDELETIONEVENT);
+    ASSERT_LOG_GROUP(MAIN_NATNETWORKPORTFORWARDEVENT);
+    ASSERT_LOG_GROUP(MAIN_NATNETWORKSETTINGEVENT);
+    ASSERT_LOG_GROUP(MAIN_NATNETWORKSTARTSTOPEVENT);
+    ASSERT_LOG_GROUP(MAIN_NATREDIRECTEVENT);
+    ASSERT_LOG_GROUP(MAIN_NETWORKADAPTER);
+    ASSERT_LOG_GROUP(MAIN_NETWORKADAPTERCHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_PARALLELPORT);
+    ASSERT_LOG_GROUP(MAIN_PARALLELPORTCHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_PCIADDRESS);
+    ASSERT_LOG_GROUP(MAIN_PCIDEVICEATTACHMENT);
+    ASSERT_LOG_GROUP(MAIN_PERFORMANCECOLLECTOR);
+    ASSERT_LOG_GROUP(MAIN_PERFORMANCEMETRIC);
+    ASSERT_LOG_GROUP(MAIN_PROCESS);
+    ASSERT_LOG_GROUP(MAIN_PROGRESS);
+    ASSERT_LOG_GROUP(MAIN_REUSABLEEVENT);
+    ASSERT_LOG_GROUP(MAIN_RUNTIMEERROREVENT);
+    ASSERT_LOG_GROUP(MAIN_SERIALPORT);
+    ASSERT_LOG_GROUP(MAIN_SERIALPORTCHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_SESSION);
+    ASSERT_LOG_GROUP(MAIN_SESSIONSTATECHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_SHAREDFOLDER);
+    ASSERT_LOG_GROUP(MAIN_SHAREDFOLDERCHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_SHOWWINDOWEVENT);
+    ASSERT_LOG_GROUP(MAIN_SNAPSHOT);
+    ASSERT_LOG_GROUP(MAIN_SNAPSHOTCHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_SNAPSHOTDELETEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_SNAPSHOTEVENT);
+    ASSERT_LOG_GROUP(MAIN_SNAPSHOTRESTOREDEVENT);
+    ASSERT_LOG_GROUP(MAIN_SNAPSHOTTAKENEVENT);
+    ASSERT_LOG_GROUP(MAIN_STATECHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_STORAGECONTROLLER);
+    ASSERT_LOG_GROUP(MAIN_STORAGECONTROLLERCHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_STORAGEDEVICECHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_SYSTEMPROPERTIES);
+    ASSERT_LOG_GROUP(MAIN_TOKEN);
+    ASSERT_LOG_GROUP(MAIN_USBCONTROLLER);
+    ASSERT_LOG_GROUP(MAIN_USBCONTROLLERCHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_USBDEVICE);
+    ASSERT_LOG_GROUP(MAIN_USBDEVICEFILTERS);
+    ASSERT_LOG_GROUP(MAIN_USBDEVICESTATECHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_VBOXSVCAVAILABILITYCHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_VIRTUALBOX);
+    ASSERT_LOG_GROUP(MAIN_VIRTUALBOXCLIENT);
+    ASSERT_LOG_GROUP(MAIN_VIRTUALSYSTEMDESCRIPTION);
+    ASSERT_LOG_GROUP(MAIN_VRDESERVER);
+    ASSERT_LOG_GROUP(MAIN_VRDESERVERCHANGEDEVENT);
+    ASSERT_LOG_GROUP(MAIN_VRDESERVERINFO);
+    ASSERT_LOG_GROUP(MAIN_VRDESERVERINFOCHANGEDEVENT);
+    ASSERT_LOG_GROUP(MISC);
     ASSERT_LOG_GROUP(MM);
     ASSERT_LOG_GROUP(MM_HEAP);
     ASSERT_LOG_GROUP(MM_HYPER);
@@ -273,15 +496,24 @@ RTDECL(PRTLOGGER) RTLogDefaultInit(void)
     ASSERT_LOG_GROUP(MM_PHYS);
     ASSERT_LOG_GROUP(MM_POOL);
     ASSERT_LOG_GROUP(NAT_SERVICE);
+    ASSERT_LOG_GROUP(NET_ADP_DRV);
+    ASSERT_LOG_GROUP(NET_FLT_DRV);
     ASSERT_LOG_GROUP(NET_SERVICE);
+    ASSERT_LOG_GROUP(NET_SHAPER);
     ASSERT_LOG_GROUP(PATM);
     ASSERT_LOG_GROUP(PDM);
+    ASSERT_LOG_GROUP(PDM_ASYNC_COMPLETION);
+    ASSERT_LOG_GROUP(PDM_BLK_CACHE);
     ASSERT_LOG_GROUP(PDM_DEVICE);
     ASSERT_LOG_GROUP(PDM_DRIVER);
     ASSERT_LOG_GROUP(PDM_LDR);
     ASSERT_LOG_GROUP(PDM_QUEUE);
     ASSERT_LOG_GROUP(PGM);
+    ASSERT_LOG_GROUP(PGM_DYNMAP);
+    ASSERT_LOG_GROUP(PGM_PHYS);
+    ASSERT_LOG_GROUP(PGM_PHYS_ACCESS);
     ASSERT_LOG_GROUP(PGM_POOL);
+    ASSERT_LOG_GROUP(PGM_SHARED);
     ASSERT_LOG_GROUP(REM);
     ASSERT_LOG_GROUP(REM_DISAS);
     ASSERT_LOG_GROUP(REM_HANDLER);
@@ -290,14 +522,43 @@ RTDECL(PRTLOGGER) RTLogDefaultInit(void)
     ASSERT_LOG_GROUP(REM_PRINTF);
     ASSERT_LOG_GROUP(REM_RUN);
     ASSERT_LOG_GROUP(SELM);
+    ASSERT_LOG_GROUP(SHARED_CLIPBOARD);
+    ASSERT_LOG_GROUP(SHARED_CROPENGL);
+    ASSERT_LOG_GROUP(SHARED_FOLDERS);
+    ASSERT_LOG_GROUP(SHARED_OPENGL);
+    ASSERT_LOG_GROUP(SRV_INTNET);
     ASSERT_LOG_GROUP(SSM);
     ASSERT_LOG_GROUP(STAM);
     ASSERT_LOG_GROUP(SUP);
     ASSERT_LOG_GROUP(TM);
     ASSERT_LOG_GROUP(TRPM);
+    ASSERT_LOG_GROUP(USB_CARDREADER);
+    ASSERT_LOG_GROUP(USB_DRV);
+    ASSERT_LOG_GROUP(USB_FILTER);
+    ASSERT_LOG_GROUP(USB_KBD);
+    ASSERT_LOG_GROUP(USB_MOUSE);
+    ASSERT_LOG_GROUP(USB_MSD);
+    ASSERT_LOG_GROUP(USB_REMOTE);
+    ASSERT_LOG_GROUP(USB_WEBCAM);
+    ASSERT_LOG_GROUP(VGDRV);
+    ASSERT_LOG_GROUP(VBGL);
+    ASSERT_LOG_GROUP(VD);
+    ASSERT_LOG_GROUP(VD_DMG);
+    ASSERT_LOG_GROUP(VD_ISCSI);
+    ASSERT_LOG_GROUP(VD_PARALLELS);
+    ASSERT_LOG_GROUP(VD_QCOW);
+    ASSERT_LOG_GROUP(VD_QED);
+    ASSERT_LOG_GROUP(VD_RAW);
+    ASSERT_LOG_GROUP(VD_VDI);
+    ASSERT_LOG_GROUP(VD_VHD);
+    ASSERT_LOG_GROUP(VD_VHDX);
+    ASSERT_LOG_GROUP(VD_VMDK);
     ASSERT_LOG_GROUP(VM);
     ASSERT_LOG_GROUP(VMM);
+    ASSERT_LOG_GROUP(VRDE);
     ASSERT_LOG_GROUP(VRDP);
+    ASSERT_LOG_GROUP(VSCSI);
+    ASSERT_LOG_GROUP(WEBSERVICE);
 #undef ASSERT_LOG_GROUP
 #undef ASSERT_LOG_GROUP2
 #endif /* IN_RING3 */
@@ -388,13 +649,20 @@ RTDECL(PRTLOGGER) RTLogDefaultInit(void)
             RTLogLoggerEx(pLogger, 0, ~0U, "Commandline: %.64s\n", info.args);
         }
 
-#  elif defined(RT_OS_FREEBSD)
+#  elif defined(RT_OS_FREEBSD) || defined(RT_OS_NETBSD)
         /* Retrieve the required length first */
         int aiName[4];
+#  if defined(RT_OS_FREEBSD)
         aiName[0] = CTL_KERN;
         aiName[1] = KERN_PROC;
         aiName[2] = KERN_PROC_ARGS;     /* Introduced in FreeBSD 4.0 */
         aiName[3] = getpid();
+#  elif defined(RT_OS_NETBSD)
+        aiName[0] = CTL_KERN;
+        aiName[1] = KERN_PROC_ARGS;
+        aiName[2] = getpid();
+        aiName[3] = KERN_PROC_ARGV;
+#  endif
         size_t cchArgs = 0;
         int rcBSD = sysctl(aiName, RT_ELEMENTS(aiName), NULL, &cchArgs, NULL, 0);
         if (cchArgs > 0)
diff --git a/src/VBox/Runtime/VBox/logbackdoor-redirect.cpp b/src/VBox/Runtime/VBox/logbackdoor-redirect.cpp
index 30d4388..af2e955 100644
--- a/src/VBox/Runtime/VBox/logbackdoor-redirect.cpp
+++ b/src/VBox/Runtime/VBox/logbackdoor-redirect.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/VBox/logbackdoor.cpp b/src/VBox/Runtime/VBox/logbackdoor.cpp
index 143cc34..5ac3667 100644
--- a/src/VBox/Runtime/VBox/logbackdoor.cpp
+++ b/src/VBox/Runtime/VBox/logbackdoor.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -68,10 +68,11 @@ RT_EXPORT_SYMBOL(RTLogBackdoorPrintfV);
 
 /**
  * Callback for RTLogFormatV which writes to the backdoor.
- * See PFNLOGOUTPUT() for details.
+ * See PFNRTSTROUTPUT() for details.
  */
-static DECLCALLBACK(size_t) rtLogBackdoorOutput(void *pv, const char *pachChars, size_t cbChars)
+static DECLCALLBACK(size_t) rtLogBackdoorOutput(void *pvArg, const char *pachChars, size_t cbChars)
 {
+    RT_NOREF_PV(pvArg);
     RTLogWriteUser(pachChars, cbChars);
     return cbChars;
 }
diff --git a/src/VBox/Runtime/common/alloc/alloc.cpp b/src/VBox/Runtime/common/alloc/alloc.cpp
index 136ff6d..8733ee0 100644
--- a/src/VBox/Runtime/common/alloc/alloc.cpp
+++ b/src/VBox/Runtime/common/alloc/alloc.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/alloc/heapoffset.cpp b/src/VBox/Runtime/common/alloc/heapoffset.cpp
index ec1e529..4962511 100644
--- a/src/VBox/Runtime/common/alloc/heapoffset.cpp
+++ b/src/VBox/Runtime/common/alloc/heapoffset.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -335,7 +335,7 @@ static void rtHeapOffsetFreeBlock(PRTHEAPOFFSETINTERNAL pHeapInt, PRTHEAPOFFSETB
 #ifdef RTHEAPOFFSET_STRICT
 
 /** Checked version of RTHEAPOFF_TO_PTR and RTHEAPOFF_TO_PTR_N. */
-DECLINLINE(void *) rtHeapOffCheckedOffToPtr(PRTHEAPOFFSETINTERNAL pHeapInt, uint32_t off, bool fNull)
+static void *rtHeapOffCheckedOffToPtr(PRTHEAPOFFSETINTERNAL pHeapInt, uint32_t off, bool fNull)
 {
     Assert(off || fNull);
     if (!off)
@@ -346,7 +346,7 @@ DECLINLINE(void *) rtHeapOffCheckedOffToPtr(PRTHEAPOFFSETINTERNAL pHeapInt, uint
 }
 
 /** Checked version of RTHEAPOFF_TO_OFF. */
-DECLINLINE(uint32_t) rtHeapOffCheckedPtrToOff(PRTHEAPOFFSETINTERNAL pHeapInt, void *pv)
+static uint32_t rtHeapOffCheckedPtrToOff(PRTHEAPOFFSETINTERNAL pHeapInt, void *pv)
 {
     if (!pv)
         return 0;
@@ -664,7 +664,7 @@ RTDECL(void) RTHeapOffsetFree(RTHEAPOFFSET hHeap, void *pv)
     pHeapInt = RTHEAPOFF_GET_ANCHOR(pBlock);
     ASSERT_BLOCK_USED(pHeapInt, pBlock);
     ASSERT_ANCHOR(pHeapInt);
-    Assert(pHeapInt == (PRTHEAPOFFSETINTERNAL)hHeap || !hHeap);
+    Assert(pHeapInt == (PRTHEAPOFFSETINTERNAL)hHeap || !hHeap); RT_NOREF_PV(hHeap);
 
 #ifdef RTHEAPOFFSET_FREE_POISON
     /*
@@ -858,7 +858,7 @@ RTDECL(size_t) RTHeapOffsetSize(RTHEAPOFFSET hHeap, void *pv)
     pHeapInt = RTHEAPOFF_GET_ANCHOR(pBlock);
     ASSERT_BLOCK_USED(pHeapInt, pBlock);
     ASSERT_ANCHOR(pHeapInt);
-    Assert(pHeapInt == (PRTHEAPOFFSETINTERNAL)hHeap || !hHeap);
+    Assert(pHeapInt == (PRTHEAPOFFSETINTERNAL)hHeap || !hHeap); RT_NOREF_PV(hHeap);
 
     /*
      * Calculate the block size.
diff --git a/src/VBox/Runtime/common/alloc/heapsimple.cpp b/src/VBox/Runtime/common/alloc/heapsimple.cpp
index 5c44d33..0294c2f 100644
--- a/src/VBox/Runtime/common/alloc/heapsimple.cpp
+++ b/src/VBox/Runtime/common/alloc/heapsimple.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -656,7 +656,7 @@ RTDECL(void) RTHeapSimpleFree(RTHEAPSIMPLE hHeap, void *pv)
     pHeapInt = pBlock->pHeap;
     ASSERT_BLOCK_USED(pHeapInt, pBlock);
     ASSERT_ANCHOR(pHeapInt);
-    Assert(pHeapInt == (PRTHEAPSIMPLEINTERNAL)hHeap || !hHeap);
+    Assert(pHeapInt == (PRTHEAPSIMPLEINTERNAL)hHeap || !hHeap); RT_NOREF_PV(hHeap);
 
 #ifdef RTHEAPSIMPLE_FREE_POISON
     /*
@@ -850,7 +850,7 @@ RTDECL(size_t) RTHeapSimpleSize(RTHEAPSIMPLE hHeap, void *pv)
     pHeapInt = pBlock->pHeap;
     ASSERT_BLOCK_USED(pHeapInt, pBlock);
     ASSERT_ANCHOR(pHeapInt);
-    Assert(pHeapInt == (PRTHEAPSIMPLEINTERNAL)hHeap || !hHeap);
+    Assert(pHeapInt == (PRTHEAPSIMPLEINTERNAL)hHeap || !hHeap); RT_NOREF_PV(hHeap);
 
     /*
      * Calculate the block size.
diff --git a/src/VBox/Runtime/common/alloc/memcache.cpp b/src/VBox/Runtime/common/alloc/memcache.cpp
index 5096125..5af2210 100644
--- a/src/VBox/Runtime/common/alloc/memcache.cpp
+++ b/src/VBox/Runtime/common/alloc/memcache.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/alloc/memtracker.cpp b/src/VBox/Runtime/common/alloc/memtracker.cpp
index ee6e7ad..0501381 100644
--- a/src/VBox/Runtime/common/alloc/memtracker.cpp
+++ b/src/VBox/Runtime/common/alloc/memtracker.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMAtomicCmpXchgExU64.asm b/src/VBox/Runtime/common/asm/ASMAtomicCmpXchgExU64.asm
index ec1ee1c..d7ae29c 100644
--- a/src/VBox/Runtime/common/asm/ASMAtomicCmpXchgExU64.asm
+++ b/src/VBox/Runtime/common/asm/ASMAtomicCmpXchgExU64.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMAtomicCmpXchgU16.asm b/src/VBox/Runtime/common/asm/ASMAtomicCmpXchgU16.asm
index a5740cb..95bde6a 100644
--- a/src/VBox/Runtime/common/asm/ASMAtomicCmpXchgU16.asm
+++ b/src/VBox/Runtime/common/asm/ASMAtomicCmpXchgU16.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMAtomicCmpXchgU64.asm b/src/VBox/Runtime/common/asm/ASMAtomicCmpXchgU64.asm
index 583be7b..5e4f844 100644
--- a/src/VBox/Runtime/common/asm/ASMAtomicCmpXchgU64.asm
+++ b/src/VBox/Runtime/common/asm/ASMAtomicCmpXchgU64.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMAtomicCmpXchgU8.asm b/src/VBox/Runtime/common/asm/ASMAtomicCmpXchgU8.asm
index 07fe47b..f4f44c8 100644
--- a/src/VBox/Runtime/common/asm/ASMAtomicCmpXchgU8.asm
+++ b/src/VBox/Runtime/common/asm/ASMAtomicCmpXchgU8.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMAtomicReadU64.asm b/src/VBox/Runtime/common/asm/ASMAtomicReadU64.asm
index 7b6139a..9dc81b8 100644
--- a/src/VBox/Runtime/common/asm/ASMAtomicReadU64.asm
+++ b/src/VBox/Runtime/common/asm/ASMAtomicReadU64.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMAtomicUoAndU32.asm b/src/VBox/Runtime/common/asm/ASMAtomicUoAndU32.asm
index 529597c..7b46a39 100644
--- a/src/VBox/Runtime/common/asm/ASMAtomicUoAndU32.asm
+++ b/src/VBox/Runtime/common/asm/ASMAtomicUoAndU32.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2013-2015 Oracle Corporation
+; Copyright (C) 2013-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMAtomicUoAndU64.asm b/src/VBox/Runtime/common/asm/ASMAtomicUoAndU64.asm
index 1a027e8..8bf8d0a 100644
--- a/src/VBox/Runtime/common/asm/ASMAtomicUoAndU64.asm
+++ b/src/VBox/Runtime/common/asm/ASMAtomicUoAndU64.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2013-2015 Oracle Corporation
+; Copyright (C) 2013-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMAtomicUoDecU32.asm b/src/VBox/Runtime/common/asm/ASMAtomicUoDecU32.asm
index 2651bfa..e3dd89e 100644
--- a/src/VBox/Runtime/common/asm/ASMAtomicUoDecU32.asm
+++ b/src/VBox/Runtime/common/asm/ASMAtomicUoDecU32.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2014-2015 Oracle Corporation
+; Copyright (C) 2014-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMAtomicUoIncU32.asm b/src/VBox/Runtime/common/asm/ASMAtomicUoIncU32.asm
index 0c134fa..efa608d 100644
--- a/src/VBox/Runtime/common/asm/ASMAtomicUoIncU32.asm
+++ b/src/VBox/Runtime/common/asm/ASMAtomicUoIncU32.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2014-2015 Oracle Corporation
+; Copyright (C) 2014-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMAtomicUoOrU32.asm b/src/VBox/Runtime/common/asm/ASMAtomicUoOrU32.asm
index 10ed35b..af6c1c6 100644
--- a/src/VBox/Runtime/common/asm/ASMAtomicUoOrU32.asm
+++ b/src/VBox/Runtime/common/asm/ASMAtomicUoOrU32.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2013-2015 Oracle Corporation
+; Copyright (C) 2013-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMAtomicUoOrU64.asm b/src/VBox/Runtime/common/asm/ASMAtomicUoOrU64.asm
index 147485c..57bc9fb 100644
--- a/src/VBox/Runtime/common/asm/ASMAtomicUoOrU64.asm
+++ b/src/VBox/Runtime/common/asm/ASMAtomicUoOrU64.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2013-2015 Oracle Corporation
+; Copyright (C) 2013-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMAtomicUoReadU64.asm b/src/VBox/Runtime/common/asm/ASMAtomicUoReadU64.asm
index ec5c270..eeaadc0 100644
--- a/src/VBox/Runtime/common/asm/ASMAtomicUoReadU64.asm
+++ b/src/VBox/Runtime/common/asm/ASMAtomicUoReadU64.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMAtomicXchgU16.asm b/src/VBox/Runtime/common/asm/ASMAtomicXchgU16.asm
index 74380ed..083ca50 100644
--- a/src/VBox/Runtime/common/asm/ASMAtomicXchgU16.asm
+++ b/src/VBox/Runtime/common/asm/ASMAtomicXchgU16.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMAtomicXchgU64.asm b/src/VBox/Runtime/common/asm/ASMAtomicXchgU64.asm
index 1f0da99..fb51765 100644
--- a/src/VBox/Runtime/common/asm/ASMAtomicXchgU64.asm
+++ b/src/VBox/Runtime/common/asm/ASMAtomicXchgU64.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMBitFirstClear.asm b/src/VBox/Runtime/common/asm/ASMBitFirstClear.asm
index 493ac6a..7abee92 100644
--- a/src/VBox/Runtime/common/asm/ASMBitFirstClear.asm
+++ b/src/VBox/Runtime/common/asm/ASMBitFirstClear.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMBitFirstSet.asm b/src/VBox/Runtime/common/asm/ASMBitFirstSet.asm
index 0c34c85..eba9267 100644
--- a/src/VBox/Runtime/common/asm/ASMBitFirstSet.asm
+++ b/src/VBox/Runtime/common/asm/ASMBitFirstSet.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMBitNextClear.asm b/src/VBox/Runtime/common/asm/ASMBitNextClear.asm
index 3d679ef..ee53220 100644
--- a/src/VBox/Runtime/common/asm/ASMBitNextClear.asm
+++ b/src/VBox/Runtime/common/asm/ASMBitNextClear.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMBitNextSet.asm b/src/VBox/Runtime/common/asm/ASMBitNextSet.asm
index b4ee3da..4a4e86c 100644
--- a/src/VBox/Runtime/common/asm/ASMBitNextSet.asm
+++ b/src/VBox/Runtime/common/asm/ASMBitNextSet.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMCpuIdExSlow.asm b/src/VBox/Runtime/common/asm/ASMCpuIdExSlow.asm
index 3f7cd5c..8ce8f7e 100644
--- a/src/VBox/Runtime/common/asm/ASMCpuIdExSlow.asm
+++ b/src/VBox/Runtime/common/asm/ASMCpuIdExSlow.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2012-2015 Oracle Corporation
+; Copyright (C) 2012-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMCpuId_Idx_ECX.asm b/src/VBox/Runtime/common/asm/ASMCpuId_Idx_ECX.asm
index eb32bea..407c99f 100644
--- a/src/VBox/Runtime/common/asm/ASMCpuId_Idx_ECX.asm
+++ b/src/VBox/Runtime/common/asm/ASMCpuId_Idx_ECX.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2012-2015 Oracle Corporation
+; Copyright (C) 2012-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMGetGDTR.asm b/src/VBox/Runtime/common/asm/ASMGetGDTR.asm
index 47f860c..00d50df 100644
--- a/src/VBox/Runtime/common/asm/ASMGetGDTR.asm
+++ b/src/VBox/Runtime/common/asm/ASMGetGDTR.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMGetIDTR.asm b/src/VBox/Runtime/common/asm/ASMGetIDTR.asm
index 3b0c889..a4345a4 100644
--- a/src/VBox/Runtime/common/asm/ASMGetIDTR.asm
+++ b/src/VBox/Runtime/common/asm/ASMGetIDTR.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMGetIdtrLimit.asm b/src/VBox/Runtime/common/asm/ASMGetIdtrLimit.asm
index 389bb20..92739da 100644
--- a/src/VBox/Runtime/common/asm/ASMGetIdtrLimit.asm
+++ b/src/VBox/Runtime/common/asm/ASMGetIdtrLimit.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMGetLDTR.asm b/src/VBox/Runtime/common/asm/ASMGetLDTR.asm
index 7cb7aea..2101491 100644
--- a/src/VBox/Runtime/common/asm/ASMGetLDTR.asm
+++ b/src/VBox/Runtime/common/asm/ASMGetLDTR.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMGetSegAttr.asm b/src/VBox/Runtime/common/asm/ASMGetSegAttr.asm
index c37e9a9..ece3163 100644
--- a/src/VBox/Runtime/common/asm/ASMGetSegAttr.asm
+++ b/src/VBox/Runtime/common/asm/ASMGetSegAttr.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2013-2015 Oracle Corporation
+; Copyright (C) 2013-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMGetTR.asm b/src/VBox/Runtime/common/asm/ASMGetTR.asm
index 5e58a2f..59568ef 100644
--- a/src/VBox/Runtime/common/asm/ASMGetTR.asm
+++ b/src/VBox/Runtime/common/asm/ASMGetTR.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMGetXcr0.asm b/src/VBox/Runtime/common/asm/ASMGetXcr0.asm
index e14e393..3c413a7 100644
--- a/src/VBox/Runtime/common/asm/ASMGetXcr0.asm
+++ b/src/VBox/Runtime/common/asm/ASMGetXcr0.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMMemFirstMismatchingU8.asm b/src/VBox/Runtime/common/asm/ASMMemFirstMismatchingU8.asm
index 6f0b9e3..321ecdb 100644
--- a/src/VBox/Runtime/common/asm/ASMMemFirstMismatchingU8.asm
+++ b/src/VBox/Runtime/common/asm/ASMMemFirstMismatchingU8.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMMultU32ByU32DivByU32.asm b/src/VBox/Runtime/common/asm/ASMMultU32ByU32DivByU32.asm
index 3f21a12..8c28683 100644
--- a/src/VBox/Runtime/common/asm/ASMMultU32ByU32DivByU32.asm
+++ b/src/VBox/Runtime/common/asm/ASMMultU32ByU32DivByU32.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMMultU64ByU32DivByU32.asm b/src/VBox/Runtime/common/asm/ASMMultU64ByU32DivByU32.asm
index b149323..27e99c2 100644
--- a/src/VBox/Runtime/common/asm/ASMMultU64ByU32DivByU32.asm
+++ b/src/VBox/Runtime/common/asm/ASMMultU64ByU32DivByU32.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMNopPause.asm b/src/VBox/Runtime/common/asm/ASMNopPause.asm
index ff60aef..9d38a73 100644
--- a/src/VBox/Runtime/common/asm/ASMNopPause.asm
+++ b/src/VBox/Runtime/common/asm/ASMNopPause.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2009-2015 Oracle Corporation
+; Copyright (C) 2009-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMRdMsrEx.asm b/src/VBox/Runtime/common/asm/ASMRdMsrEx.asm
index da8b541..08ed44f 100644
--- a/src/VBox/Runtime/common/asm/ASMRdMsrEx.asm
+++ b/src/VBox/Runtime/common/asm/ASMRdMsrEx.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2013-2015 Oracle Corporation
+; Copyright (C) 2013-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMSetGDTR.asm b/src/VBox/Runtime/common/asm/ASMSetGDTR.asm
index 5ffd8f0..6da3ba6 100644
--- a/src/VBox/Runtime/common/asm/ASMSetGDTR.asm
+++ b/src/VBox/Runtime/common/asm/ASMSetGDTR.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMSetIDTR.asm b/src/VBox/Runtime/common/asm/ASMSetIDTR.asm
index b7b56f9..10166ba 100644
--- a/src/VBox/Runtime/common/asm/ASMSetIDTR.asm
+++ b/src/VBox/Runtime/common/asm/ASMSetIDTR.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMSetXcr0.asm b/src/VBox/Runtime/common/asm/ASMSetXcr0.asm
index fcc73c3..4fb1869 100644
--- a/src/VBox/Runtime/common/asm/ASMSetXcr0.asm
+++ b/src/VBox/Runtime/common/asm/ASMSetXcr0.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMWrMsrEx.asm b/src/VBox/Runtime/common/asm/ASMWrMsrEx.asm
index f36b3f9..f8c5ef4 100644
--- a/src/VBox/Runtime/common/asm/ASMWrMsrEx.asm
+++ b/src/VBox/Runtime/common/asm/ASMWrMsrEx.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2013-2015 Oracle Corporation
+; Copyright (C) 2013-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMXRstor.asm b/src/VBox/Runtime/common/asm/ASMXRstor.asm
index dbb857f..59494f6 100644
--- a/src/VBox/Runtime/common/asm/ASMXRstor.asm
+++ b/src/VBox/Runtime/common/asm/ASMXRstor.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/ASMXSave.asm b/src/VBox/Runtime/common/asm/ASMXSave.asm
index f0d8842..1c2a1e2 100644
--- a/src/VBox/Runtime/common/asm/ASMXSave.asm
+++ b/src/VBox/Runtime/common/asm/ASMXSave.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asm/asm-fake.cpp b/src/VBox/Runtime/common/asm/asm-fake.cpp
index 597c646..2272f2e 100644
--- a/src/VBox/Runtime/common/asm/asm-fake.cpp
+++ b/src/VBox/Runtime/common/asm/asm-fake.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asn1/asn1-basics.cpp b/src/VBox/Runtime/common/asn1/asn1-basics.cpp
index beb4070..3bb3312 100644
--- a/src/VBox/Runtime/common/asn1/asn1-basics.cpp
+++ b/src/VBox/Runtime/common/asn1/asn1-basics.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -587,7 +587,7 @@ RTDECL(int) RTAsn1ContextTagN_Init(PRTASN1CONTEXTTAG pThis, uint32_t uTag, PCRTA
 
 RTDECL(int) RTAsn1ContextTagN_Clone(PRTASN1CONTEXTTAG pThis, PCRTASN1CONTEXTTAG pSrc, uint32_t uTag)
 {
-    Assert(pSrc->Asn1Core.uTag == uTag || !RTASN1CORE_IS_PRESENT(&pSrc->Asn1Core));
+    Assert(pSrc->Asn1Core.uTag == uTag || !RTASN1CORE_IS_PRESENT(&pSrc->Asn1Core)); RT_NOREF_PV(uTag);
     return RTAsn1Core_CloneNoContent(&pThis->Asn1Core, &pSrc->Asn1Core);
 }
 
diff --git a/src/VBox/Runtime/common/asn1/asn1-cursor.cpp b/src/VBox/Runtime/common/asn1/asn1-cursor.cpp
index c785ddd..9cf2145 100644
--- a/src/VBox/Runtime/common/asn1/asn1-cursor.cpp
+++ b/src/VBox/Runtime/common/asn1/asn1-cursor.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -57,12 +57,6 @@
 #endif
 
 
-/*********************************************************************************************************************************
-*   Global Variables                                                                                                             *
-*********************************************************************************************************************************/
-static char const g_achDigits[11] = "0123456789";
-
-
 
 RTDECL(PRTASN1CURSOR) RTAsn1CursorInitPrimary(PRTASN1CURSORPRIMARY pPrimaryCursor, void const *pvFirst, uint32_t cb,
                                               PRTERRINFO pErrInfo, PCRTASN1ALLOCATORVTABLE pAllocator, uint32_t fFlags,
@@ -70,7 +64,7 @@ RTDECL(PRTASN1CURSOR) RTAsn1CursorInitPrimary(PRTASN1CURSORPRIMARY pPrimaryCurso
 {
     pPrimaryCursor->Cursor.pbCur            = (uint8_t const *)pvFirst;
     pPrimaryCursor->Cursor.cbLeft           = cb;
-    pPrimaryCursor->Cursor.fFlags           = fFlags;
+    pPrimaryCursor->Cursor.fFlags           = (uint8_t)fFlags; Assert(fFlags <= UINT8_MAX);
     pPrimaryCursor->Cursor.cDepth           = 0;
     pPrimaryCursor->Cursor.abReserved[0]    = 0;
     pPrimaryCursor->Cursor.abReserved[1]    = 0;
diff --git a/src/VBox/Runtime/common/asn1/asn1-default-allocator.cpp b/src/VBox/Runtime/common/asn1/asn1-default-allocator.cpp
index 657d984..9bf2379 100644
--- a/src/VBox/Runtime/common/asn1/asn1-default-allocator.cpp
+++ b/src/VBox/Runtime/common/asn1/asn1-default-allocator.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -57,6 +57,7 @@ static size_t rtAsn1DefaultAllocator_AlignSize(size_t cb)
 /** @interface_method_impl{RTASN1ALLOCATORVTABLE, pfnFree} */
 static DECLCALLBACK(void) rtAsn1DefaultAllocator_Free(PCRTASN1ALLOCATORVTABLE pThis, PRTASN1ALLOCATION pAllocation, void *pv)
 {
+    RT_NOREF_PV(pThis);
     RTMemFree(pv);
     pAllocation->cbAllocated = 0;
 }
@@ -74,6 +75,7 @@ static DECLCALLBACK(int)  rtAsn1DefaultAllocator_Alloc(PCRTASN1ALLOCATORVTABLE p
         pAllocation->cbAllocated = (uint32_t)cbAlloc;
         return VINF_SUCCESS;
     }
+    RT_NOREF_PV(pThis);
     return VERR_NO_MEMORY;
 }
 
@@ -92,6 +94,7 @@ static DECLCALLBACK(int)  rtAsn1DefaultAllocator_Realloc(PCRTASN1ALLOCATORVTABLE
         pAllocation->cbAllocated = (uint32_t)cbAlloc;
         return VINF_SUCCESS;
     }
+    RT_NOREF_PV(pThis);
     return VERR_NO_MEMORY;
 }
 
diff --git a/src/VBox/Runtime/common/asn1/asn1-dump.cpp b/src/VBox/Runtime/common/asn1/asn1-dump.cpp
index deb5f6a..da9ced4 100644
--- a/src/VBox/Runtime/common/asn1/asn1-dump.cpp
+++ b/src/VBox/Runtime/common/asn1/asn1-dump.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asn1/asn1-efence-allocator.cpp b/src/VBox/Runtime/common/asn1/asn1-efence-allocator.cpp
index 516fbb9..750bc87 100644
--- a/src/VBox/Runtime/common/asn1/asn1-efence-allocator.cpp
+++ b/src/VBox/Runtime/common/asn1/asn1-efence-allocator.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -39,6 +39,7 @@
 /** @interface_method_impl{RTASN1ALLOCATORVTABLE, pfnFree} */
 static DECLCALLBACK(void) rtAsn1EFenceAllocator_Free(PCRTASN1ALLOCATORVTABLE pThis, PRTASN1ALLOCATION pAllocation, void *pv)
 {
+    RT_NOREF_PV(pThis);
     RTMemEfFreeNP(pv);
     pAllocation->cbAllocated = 0;
 }
@@ -55,6 +56,7 @@ static DECLCALLBACK(int)  rtAsn1EFenceAllocator_Alloc(PCRTASN1ALLOCATORVTABLE pT
         pAllocation->cbAllocated = (uint32_t)cb;
         return VINF_SUCCESS;
     }
+    RT_NOREF_PV(pThis);
     return VERR_NO_MEMORY;
 }
 
@@ -72,6 +74,7 @@ static DECLCALLBACK(int)  rtAsn1EFenceAllocator_Realloc(PCRTASN1ALLOCATORVTABLE
         pAllocation->cbAllocated = (uint32_t)cbNew;
         return VINF_SUCCESS;
     }
+    RT_NOREF_PV(pThis);
     return VERR_NO_MEMORY;
 }
 
diff --git a/src/VBox/Runtime/common/asn1/asn1-encode.cpp b/src/VBox/Runtime/common/asn1/asn1-encode.cpp
index 4c1bb79..d049f0d 100644
--- a/src/VBox/Runtime/common/asn1/asn1-encode.cpp
+++ b/src/VBox/Runtime/common/asn1/asn1-encode.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -166,6 +166,7 @@ RTDECL(int) RTAsn1EncodeRecalcHdrSize(PRTASN1CORE pAsn1Core, uint32_t fFlags, PR
 static DECLCALLBACK(int) rtAsn1EncodePrepareCallback(PRTASN1CORE pAsn1Core, const char *pszName, uint32_t uDepth, void *pvUser)
 {
     RTASN1ENCODEPREPARGS *pArgs = (RTASN1ENCODEPREPARGS *)pvUser;
+    RT_NOREF_PV(pszName);
     if (RTASN1CORE_IS_PRESENT(pAsn1Core))
     {
         /*
@@ -375,6 +376,7 @@ RTDECL(int) RTAsn1EncodeWriteHeader(PCRTASN1CORE pAsn1Core, uint32_t fFlags, FNR
 static DECLCALLBACK(int) rtAsn1EncodeWriteCallback(PRTASN1CORE pAsn1Core, const char *pszName, uint32_t uDepth, void *pvUser)
 {
     RTASN1ENCODEWRITEARGS *pArgs = (RTASN1ENCODEWRITEARGS *)pvUser;
+    RT_NOREF_PV(pszName);
     int rc;
     if (RTASN1CORE_IS_PRESENT(pAsn1Core))
     {
@@ -459,6 +461,7 @@ static DECLCALLBACK(int) rtAsn1EncodeToBufferCallback(const void *pvBuf, size_t
         pArgs->pbDst -= pArgs->cbDst;
         pArgs->cbDst  = 0;
     }
+    RT_NOREF_PV(pErrInfo);
     return VERR_BUFFER_OVERFLOW;
 }
 
diff --git a/src/VBox/Runtime/common/asn1/asn1-ut-bitstring-decode.cpp b/src/VBox/Runtime/common/asn1/asn1-ut-bitstring-decode.cpp
index e455339..0e7f1d1 100644
--- a/src/VBox/Runtime/common/asn1/asn1-ut-bitstring-decode.cpp
+++ b/src/VBox/Runtime/common/asn1/asn1-ut-bitstring-decode.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asn1/asn1-ut-bitstring-template.h b/src/VBox/Runtime/common/asn1/asn1-ut-bitstring-template.h
index 17a9354..7fcd8ae 100644
--- a/src/VBox/Runtime/common/asn1/asn1-ut-bitstring-template.h
+++ b/src/VBox/Runtime/common/asn1/asn1-ut-bitstring-template.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asn1/asn1-ut-bitstring.cpp b/src/VBox/Runtime/common/asn1/asn1-ut-bitstring.cpp
index f648dc2..1747e0a 100644
--- a/src/VBox/Runtime/common/asn1/asn1-ut-bitstring.cpp
+++ b/src/VBox/Runtime/common/asn1/asn1-ut-bitstring.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -81,6 +81,7 @@ static DECLCALLBACK(int) rtAsn1BitStringEncodeCompare(const void *pvBuf, size_t
     if (memcmp(&pCtx->pbBuf[pCtx->offBuf], pvBuf, cbToWrite) != 0)
         return VERR_NOT_EQUAL;
     pCtx->offBuf += (uint32_t)cbToWrite;
+    RT_NOREF_PV(pErrInfo);
     return VINF_SUCCESS;
 }
 
diff --git a/src/VBox/Runtime/common/asn1/asn1-ut-boolean-decode.cpp b/src/VBox/Runtime/common/asn1/asn1-ut-boolean-decode.cpp
index 7b03689..c2a81ce 100644
--- a/src/VBox/Runtime/common/asn1/asn1-ut-boolean-decode.cpp
+++ b/src/VBox/Runtime/common/asn1/asn1-ut-boolean-decode.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asn1/asn1-ut-boolean-template.h b/src/VBox/Runtime/common/asn1/asn1-ut-boolean-template.h
index e4be88a..2f82e74 100644
--- a/src/VBox/Runtime/common/asn1/asn1-ut-boolean-template.h
+++ b/src/VBox/Runtime/common/asn1/asn1-ut-boolean-template.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asn1/asn1-ut-boolean.cpp b/src/VBox/Runtime/common/asn1/asn1-ut-boolean.cpp
index 3bb5538..1624ac6 100644
--- a/src/VBox/Runtime/common/asn1/asn1-ut-boolean.cpp
+++ b/src/VBox/Runtime/common/asn1/asn1-ut-boolean.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -53,6 +53,7 @@ static const uint8_t  g_bTrue  = 0xff;
 
 RTDECL(int) RTAsn1Boolean_InitDefault(PRTASN1BOOLEAN pThis, bool fValue, PCRTASN1ALLOCATORVTABLE pAllocator)
 {
+    RT_NOREF_PV(pAllocator);
     RTAsn1Core_InitEx(&pThis->Asn1Core, ASN1_TAG_BOOLEAN, ASN1_TAGCLASS_UNIVERSAL | ASN1_TAGFLAG_PRIMITIVE,
                       &g_RTAsn1Boolean_Vtable, RTASN1CORE_F_DEFAULT | RTASN1CORE_F_PRIMITE_TAG_STRUCT);
     pThis->fValue = fValue;
@@ -101,6 +102,7 @@ RT_DECL_DATA_CONST(RTASN1COREVTABLE const) g_RTAsn1Boolean_Vtable =
 
 RTDECL(int) RTAsn1Boolean_Init(PRTASN1BOOLEAN pThis, PCRTASN1ALLOCATORVTABLE pAllocator)
 {
+    RT_NOREF_PV(pAllocator);
     RTAsn1Core_InitEx(&pThis->Asn1Core, ASN1_TAG_BOOLEAN, ASN1_TAGCLASS_UNIVERSAL | ASN1_TAGFLAG_PRIMITIVE,
                       &g_RTAsn1Boolean_Vtable, RTASN1CORE_F_PRESENT | RTASN1CORE_F_PRIMITE_TAG_STRUCT);
     pThis->fValue = true;
@@ -160,6 +162,7 @@ RTDECL(void) RTAsn1Boolean_Delete(PRTASN1BOOLEAN pThis)
 RTDECL(int) RTAsn1Boolean_Enum(PRTASN1BOOLEAN pThis, PFNRTASN1ENUMCALLBACK pfnCallback, uint32_t uDepth, void *pvUser)
 {
     Assert(pThis && (!RTAsn1Boolean_IsPresent(pThis) || pThis->Asn1Core.pOps == &g_RTAsn1Boolean_Vtable));
+    RT_NOREF_PV(pThis); RT_NOREF_PV(pfnCallback); RT_NOREF_PV(uDepth); RT_NOREF_PV(pvUser);
 
     /* No children to enumerate. */
     return VINF_SUCCESS;
@@ -189,6 +192,7 @@ RTDECL(int) RTAsn1Boolean_CheckSanity(PCRTASN1BOOLEAN pThis, uint32_t fFlags, PR
 {
     if (RT_UNLIKELY(!RTAsn1Boolean_IsPresent(pThis)))
         return RTErrInfoSetF(pErrInfo, VERR_ASN1_NOT_PRESENT, "%s: Missing (BOOLEAN).", pszErrorTag);
+    RT_NOREF_PV(fFlags);
     return VINF_SUCCESS;
 }
 
diff --git a/src/VBox/Runtime/common/asn1/asn1-ut-core-decode.cpp b/src/VBox/Runtime/common/asn1/asn1-ut-core-decode.cpp
index b697230..923a141 100644
--- a/src/VBox/Runtime/common/asn1/asn1-ut-core-decode.cpp
+++ b/src/VBox/Runtime/common/asn1/asn1-ut-core-decode.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -44,6 +44,7 @@ RTDECL(int) RTAsn1Core_DecodeAsn1(PRTASN1CURSOR pCursor, uint32_t fFlags, PRTASN
         pThis->pOps = &g_RTAsn1Core_Vtable;
         return VINF_SUCCESS;
     }
+    RT_NOREF_PV(fFlags);
     RT_ZERO(*pThis);
     return rc;
 }
diff --git a/src/VBox/Runtime/common/asn1/asn1-ut-core-template.h b/src/VBox/Runtime/common/asn1/asn1-ut-core-template.h
index 7291c8a..469744d 100644
--- a/src/VBox/Runtime/common/asn1/asn1-ut-core-template.h
+++ b/src/VBox/Runtime/common/asn1/asn1-ut-core-template.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asn1/asn1-ut-core.cpp b/src/VBox/Runtime/common/asn1/asn1-ut-core.cpp
index 58325c9..4ab6960 100644
--- a/src/VBox/Runtime/common/asn1/asn1-ut-core.cpp
+++ b/src/VBox/Runtime/common/asn1/asn1-ut-core.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -205,6 +205,7 @@ RT_DECL_DATA_CONST(RTASN1COREVTABLE const) g_RTAsn1Core_Vtable =
 
 RTDECL(int) RTAsn1Core_Init(PRTASN1CORE pThis, PCRTASN1ALLOCATORVTABLE pAllocator)
 {
+    RT_NOREF_PV(pAllocator);
     return RTAsn1Core_InitEx(pThis, 0, ASN1_TAGCLASS_CONTEXT | ASN1_TAGFLAG_PRIMITIVE,
                              &g_RTAsn1Core_Vtable, RTASN1CORE_F_PRESENT);
 }
@@ -261,6 +262,8 @@ RTDECL(int) RTAsn1Core_Compare(PCRTASN1CORE pLeft, PCRTASN1CORE pRight)
 
 RTDECL(int) RTAsn1Core_CheckSanity(PCRTASN1CORE pThis, uint32_t fFlags, PRTERRINFO pErrInfo, const char *pszErrorTag)
 {
+    RT_NOREF_PV(fFlags);
+
     /* We can only check that it's present. */
     if (!RTAsn1Core_IsPresent(pThis))
         return RTErrInfoSetF(pErrInfo, VERR_ASN1_NOT_PRESENT, "%s: Missing (RTASN1CORE).", pszErrorTag);
diff --git a/src/VBox/Runtime/common/asn1/asn1-ut-dyntype-decode.cpp b/src/VBox/Runtime/common/asn1/asn1-ut-dyntype-decode.cpp
index 65792f0..a14137c 100644
--- a/src/VBox/Runtime/common/asn1/asn1-ut-dyntype-decode.cpp
+++ b/src/VBox/Runtime/common/asn1/asn1-ut-dyntype-decode.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -42,7 +42,7 @@ RTDECL(int) RTAsn1DynType_DecodeAsn1(PRTASN1CURSOR pCursor, uint32_t fFlags, PRT
 {
     RT_ZERO(*pDynType);
 
-    Assert(!(fFlags & RTASN1CURSOR_GET_F_IMPLICIT));
+    Assert(!(fFlags & RTASN1CURSOR_GET_F_IMPLICIT)); RT_NOREF_PV(fFlags);
     uint32_t        cbSavedLeft = pCursor->cbLeft;
     uint8_t const  *pbSavedCur  = pCursor->pbCur;
 
diff --git a/src/VBox/Runtime/common/asn1/asn1-ut-dyntype.cpp b/src/VBox/Runtime/common/asn1/asn1-ut-dyntype.cpp
index b78f771..210de50 100644
--- a/src/VBox/Runtime/common/asn1/asn1-ut-dyntype.cpp
+++ b/src/VBox/Runtime/common/asn1/asn1-ut-dyntype.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -44,6 +44,7 @@
 
 RTDECL(int) RTAsn1DynType_Init(PRTASN1DYNTYPE pThis, PCRTASN1ALLOCATORVTABLE pAllocator)
 {
+    RT_NOREF_PV(pAllocator);
     RT_ZERO(*pThis);
     pThis->enmType = RTASN1TYPE_NOT_PRESENT;
     return VINF_SUCCESS;
diff --git a/src/VBox/Runtime/common/asn1/asn1-ut-integer-decode.cpp b/src/VBox/Runtime/common/asn1/asn1-ut-integer-decode.cpp
index c159b47..ab5a353 100644
--- a/src/VBox/Runtime/common/asn1/asn1-ut-integer-decode.cpp
+++ b/src/VBox/Runtime/common/asn1/asn1-ut-integer-decode.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asn1/asn1-ut-integer-template.h b/src/VBox/Runtime/common/asn1/asn1-ut-integer-template.h
index 8f2e682..9de5e83 100644
--- a/src/VBox/Runtime/common/asn1/asn1-ut-integer-template.h
+++ b/src/VBox/Runtime/common/asn1/asn1-ut-integer-template.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asn1/asn1-ut-integer.cpp b/src/VBox/Runtime/common/asn1/asn1-ut-integer.cpp
index 63424ee..6d7cb92 100644
--- a/src/VBox/Runtime/common/asn1/asn1-ut-integer.cpp
+++ b/src/VBox/Runtime/common/asn1/asn1-ut-integer.cpp
@@ -402,6 +402,7 @@ RT_DECL_DATA_CONST(RTASN1COREVTABLE const) g_RTAsn1Integer_Vtable =
 
 RTDECL(int) RTAsn1Integer_Init(PRTASN1INTEGER pThis, PCRTASN1ALLOCATORVTABLE pAllocator)
 {
+    RT_NOREF_PV(pAllocator);
     RTAsn1Core_InitEx(&pThis->Asn1Core,
                       ASN1_TAG_INTEGER,
                       ASN1_TAGCLASS_UNIVERSAL | ASN1_TAGFLAG_PRIMITIVE,
@@ -461,6 +462,7 @@ RTDECL(void) RTAsn1Integer_Delete(PRTASN1INTEGER pThis)
 
 RTDECL(int) RTAsn1Integer_Enum(PRTASN1INTEGER pThis, PFNRTASN1ENUMCALLBACK pfnCallback, uint32_t uDepth, void *pvUser)
 {
+    RT_NOREF_PV(pThis); RT_NOREF_PV(pfnCallback); RT_NOREF_PV(uDepth); RT_NOREF_PV(pvUser);
     Assert(pThis && (!RTAsn1Integer_IsPresent(pThis) || pThis->Asn1Core.pOps == &g_RTAsn1Integer_Vtable));
 
     /* No children to enumerate. */
@@ -476,6 +478,7 @@ RTDECL(int) RTAsn1Integer_Compare(PCRTASN1INTEGER pLeft, PCRTASN1INTEGER pRight)
 
 RTDECL(int) RTAsn1Integer_CheckSanity(PCRTASN1INTEGER pThis, uint32_t fFlags, PRTERRINFO pErrInfo, const char *pszErrorTag)
 {
+    RT_NOREF_PV(fFlags);
     if (RT_UNLIKELY(!RTAsn1Integer_IsPresent(pThis)))
         return RTErrInfoSetF(pErrInfo, VERR_ASN1_NOT_PRESENT, "%s: Missing (INTEGER).", pszErrorTag);
     return VINF_SUCCESS;
diff --git a/src/VBox/Runtime/common/asn1/asn1-ut-null-decode.cpp b/src/VBox/Runtime/common/asn1/asn1-ut-null-decode.cpp
index a9477d3..830dbee 100644
--- a/src/VBox/Runtime/common/asn1/asn1-ut-null-decode.cpp
+++ b/src/VBox/Runtime/common/asn1/asn1-ut-null-decode.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asn1/asn1-ut-null.cpp b/src/VBox/Runtime/common/asn1/asn1-ut-null.cpp
index a96ccb5..43ca883 100644
--- a/src/VBox/Runtime/common/asn1/asn1-ut-null.cpp
+++ b/src/VBox/Runtime/common/asn1/asn1-ut-null.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -66,6 +66,7 @@ RT_DECL_DATA_CONST(RTASN1COREVTABLE const) g_RTAsn1Null_Vtable =
 
 RTDECL(int) RTAsn1Null_Init(PRTASN1NULL pThis, PCRTASN1ALLOCATORVTABLE pAllocator)
 {
+    RT_NOREF_PV(pAllocator);
     return RTAsn1Core_InitEx(&pThis->Asn1Core, ASN1_TAG_NULL, ASN1_TAGCLASS_UNIVERSAL | ASN1_TAGFLAG_PRIMITIVE,
                              &g_RTAsn1Null_Vtable, RTASN1CORE_F_PRESENT | RTASN1CORE_F_PRIMITE_TAG_STRUCT);
 }
@@ -73,7 +74,7 @@ RTDECL(int) RTAsn1Null_Init(PRTASN1NULL pThis, PCRTASN1ALLOCATORVTABLE pAllocato
 
 RTDECL(int) RTAsn1Null_Clone(PRTASN1NULL pThis, PCRTASN1NULL pSrc, PCRTASN1ALLOCATORVTABLE pAllocator)
 {
-    AssertPtr(pSrc); AssertPtr(pThis); AssertPtr(pAllocator);
+    AssertPtr(pSrc); AssertPtr(pThis); AssertPtr(pAllocator); RT_NOREF_PV(pAllocator);
     RT_ZERO(*pThis);
     if (RTAsn1Null_IsPresent(pSrc))
     {
@@ -101,6 +102,7 @@ RTDECL(void) RTAsn1Null_Delete(PRTASN1NULL pThis)
 
 RTDECL(int) RTAsn1Null_Enum(PRTASN1NULL pThis, PFNRTASN1ENUMCALLBACK pfnCallback, uint32_t uDepth, void *pvUser)
 {
+    RT_NOREF_PV(pThis); RT_NOREF_PV(pfnCallback); RT_NOREF_PV(uDepth); RT_NOREF_PV(pvUser);
     Assert(pThis && (!RTAsn1Null_IsPresent(pThis) || pThis->Asn1Core.pOps == &g_RTAsn1Null_Vtable));
 
     /* No children to enumerate. */
@@ -119,6 +121,7 @@ RTDECL(int) RTAsn1Null_Compare(PCRTASN1NULL pLeft, PCRTASN1NULL pRight)
 
 RTDECL(int) RTAsn1Null_CheckSanity(PCRTASN1NULL pThis, uint32_t fFlags, PRTERRINFO pErrInfo, const char *pszErrorTag)
 {
+    RT_NOREF_PV(fFlags);
     if (RT_UNLIKELY(!RTAsn1Null_IsPresent(pThis)))
         return RTErrInfoSetF(pErrInfo, VERR_ASN1_NOT_PRESENT, "%s: Missing (NULL).", pszErrorTag);
     return VINF_SUCCESS;
diff --git a/src/VBox/Runtime/common/asn1/asn1-ut-objid-decode.cpp b/src/VBox/Runtime/common/asn1/asn1-ut-objid-decode.cpp
index 1567e49..deb86c6 100644
--- a/src/VBox/Runtime/common/asn1/asn1-ut-objid-decode.cpp
+++ b/src/VBox/Runtime/common/asn1/asn1-ut-objid-decode.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -232,24 +232,25 @@ static int rtAsn1ObjId_PreParse(uint8_t const *pbContent, uint32_t cbContent, PR
                             return VINF_SUCCESS;
                         }
                         return RTAsn1CursorSetInfo(pCursor, VERR_ASN1_OBJID_TOO_LONG_STRING_FORM,
-                                                   "Object ID has a too long string form: %#x (max %#x)",
-                                                   cchObjId, RT_SIZEOFMEMB(RTASN1OBJID, szObjId));
+                                                   "%s: Object ID has a too long string form: %#x (max %#x)",
+                                                   pszErrorTag, cchObjId, RT_SIZEOFMEMB(RTASN1OBJID, szObjId));
                     }
                     return RTAsn1CursorSetInfo(pCursor, VERR_ASN1_OBJID_TOO_MANY_COMPONENTS,
-                                               "Object ID has too many components: %#x (max 127)", cComponents);
+                                               "%s: Object ID has too many components: %#x (max 127)", pszErrorTag, cComponents);
                 }
 
                 /* next */
                 rc = rtAsn1ObjId_ReadComponent(pbContent, cbContent, &uValue);
             } while (rc > 0);
         }
-        rc = RTAsn1CursorSetInfo(pCursor, rc, "Bad object ID component #%u encoding: %.*Rhxs",
-                                 cComponents, cbContent, pbContent);
+        rc = RTAsn1CursorSetInfo(pCursor, rc, "%s: Bad object ID component #%u encoding: %.*Rhxs",
+                                 pszErrorTag, cComponents, cbContent, pbContent);
     }
     else if (cbContent)
-        rc = RTAsn1CursorSetInfo(pCursor, VERR_ASN1_INVALID_OBJID_ENCODING, "Object ID content is loo long: %#x", cbContent);
+        rc = RTAsn1CursorSetInfo(pCursor, VERR_ASN1_INVALID_OBJID_ENCODING, "%s: Object ID content is loo long: %#x",
+                                 pszErrorTag, cbContent);
     else
-        rc = RTAsn1CursorSetInfo(pCursor, VERR_ASN1_INVALID_OBJID_ENCODING, "Zero length object ID content");
+        rc = RTAsn1CursorSetInfo(pCursor, VERR_ASN1_INVALID_OBJID_ENCODING, "%s: Zero length object ID content", pszErrorTag);
     return rc;
 }
 
diff --git a/src/VBox/Runtime/common/asn1/asn1-ut-objid-template.h b/src/VBox/Runtime/common/asn1/asn1-ut-objid-template.h
index 099ce7c..b86893d 100644
--- a/src/VBox/Runtime/common/asn1/asn1-ut-objid-template.h
+++ b/src/VBox/Runtime/common/asn1/asn1-ut-objid-template.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asn1/asn1-ut-objid.cpp b/src/VBox/Runtime/common/asn1/asn1-ut-objid.cpp
index 661dcd6..dd963fc 100644
--- a/src/VBox/Runtime/common/asn1/asn1-ut-objid.cpp
+++ b/src/VBox/Runtime/common/asn1/asn1-ut-objid.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -394,6 +394,7 @@ RT_DECL_DATA_CONST(RTASN1COREVTABLE const) g_RTAsn1ObjId_Vtable =
 
 RTDECL(int) RTAsn1ObjId_Init(PRTASN1OBJID pThis, PCRTASN1ALLOCATORVTABLE pAllocator)
 {
+    RT_NOREF_PV(pAllocator);
     RTAsn1Core_InitEx(&pThis->Asn1Core,
                       ASN1_TAG_OID,
                       ASN1_TAGCLASS_UNIVERSAL | ASN1_TAGFLAG_PRIMITIVE,
@@ -429,8 +430,8 @@ RTDECL(int) RTAsn1ObjId_Clone(PRTASN1OBJID pThis, PCRTASN1OBJID pSrc, PCRTASN1AL
         int rc;
         RTAsn1MemInitAllocation(&pThis->Allocation, pAllocator);
         pThis->cComponents = pSrc->cComponents;
-        size_t cbLeft = sizeof(pThis->szObjId);
 #if 0 /** @todo breaks with arrays of ObjIds or structs containing them. They get resized and repositioned in memory, thus invalidating the pointer. Add recall-pointers callback, or just waste memory? Or maybe make all arrays pointer-arrays? */
+        size_t cbLeft = sizeof(pThis->szObjId);
         if (pSrc->cComponents * sizeof(uint32_t) <= cbLeft)
         {
             pThis->pauComponents = (uint32_t *)&pThis->szObjId[sizeof(pThis->szObjId) - pSrc->cComponents * sizeof(uint32_t)];
@@ -496,6 +497,7 @@ RTDECL(void) RTAsn1ObjId_Delete(PRTASN1OBJID pThis)
 
 RTDECL(int) RTAsn1ObjId_Enum(PRTASN1OBJID pThis, PFNRTASN1ENUMCALLBACK pfnCallback, uint32_t uDepth, void *pvUser)
 {
+    RT_NOREF_PV(pThis); RT_NOREF_PV(pfnCallback); RT_NOREF_PV(uDepth); RT_NOREF_PV(pvUser);
     Assert(pThis && (!RTAsn1ObjId_IsPresent(pThis) || pThis->Asn1Core.pOps == &g_RTAsn1ObjId_Vtable));
 
     /* No children to enumerate. */
@@ -526,6 +528,7 @@ RTDECL(int) RTAsn1ObjId_Compare(PCRTASN1OBJID pLeft, PCRTASN1OBJID pRight)
 
 RTDECL(int) RTAsn1ObjId_CheckSanity(PCRTASN1OBJID pThis, uint32_t fFlags, PRTERRINFO pErrInfo, const char *pszErrorTag)
 {
+    RT_NOREF_PV(fFlags);
     if (RT_UNLIKELY(!RTAsn1ObjId_IsPresent(pThis)))
         return RTErrInfoSetF(pErrInfo, VERR_ASN1_NOT_PRESENT, "%s: Missing (OBJID).", pszErrorTag);
     return VINF_SUCCESS;
diff --git a/src/VBox/Runtime/common/asn1/asn1-ut-octetstring-decode.cpp b/src/VBox/Runtime/common/asn1/asn1-ut-octetstring-decode.cpp
index 8a1abad..587bd5a 100644
--- a/src/VBox/Runtime/common/asn1/asn1-ut-octetstring-decode.cpp
+++ b/src/VBox/Runtime/common/asn1/asn1-ut-octetstring-decode.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asn1/asn1-ut-octetstring-template.h b/src/VBox/Runtime/common/asn1/asn1-ut-octetstring-template.h
index a6c5f25..6dc33e6 100644
--- a/src/VBox/Runtime/common/asn1/asn1-ut-octetstring-template.h
+++ b/src/VBox/Runtime/common/asn1/asn1-ut-octetstring-template.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asn1/asn1-ut-octetstring.cpp b/src/VBox/Runtime/common/asn1/asn1-ut-octetstring.cpp
index aadc958..1cd6da1 100644
--- a/src/VBox/Runtime/common/asn1/asn1-ut-octetstring.cpp
+++ b/src/VBox/Runtime/common/asn1/asn1-ut-octetstring.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -77,6 +77,7 @@ static DECLCALLBACK(int) rtAsn1OctetStringEncodeWriter(const void *pvBuf, size_t
 static DECLCALLBACK(int) rtAsn1OctetStringEncodeCompare(const void *pvBuf, size_t cbToWrite, void *pvUser, PRTERRINFO pErrInfo)
 {
     RTASN1OCTETSTRINGWRITERCTX *pCtx = (RTASN1OCTETSTRINGWRITERCTX *)pvUser;
+    RT_NOREF_PV(pErrInfo);
     AssertReturn(cbToWrite <= pCtx->cbBuf - pCtx->offBuf, VERR_BUFFER_OVERFLOW);
     if (memcmp(&pCtx->pbBuf[pCtx->offBuf], pvBuf, cbToWrite) != 0)
         return VERR_NOT_EQUAL;
diff --git a/src/VBox/Runtime/common/asn1/asn1-ut-string-decode.cpp b/src/VBox/Runtime/common/asn1/asn1-ut-string-decode.cpp
index 276fc01..c9a7853 100644
--- a/src/VBox/Runtime/common/asn1/asn1-ut-string-decode.cpp
+++ b/src/VBox/Runtime/common/asn1/asn1-ut-string-decode.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asn1/asn1-ut-string-template.h b/src/VBox/Runtime/common/asn1/asn1-ut-string-template.h
index 34297a3..48b4377 100644
--- a/src/VBox/Runtime/common/asn1/asn1-ut-string-template.h
+++ b/src/VBox/Runtime/common/asn1/asn1-ut-string-template.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asn1/asn1-ut-string-template2.h b/src/VBox/Runtime/common/asn1/asn1-ut-string-template2.h
index b7cfd1c..5cdff7c 100644
--- a/src/VBox/Runtime/common/asn1/asn1-ut-string-template2.h
+++ b/src/VBox/Runtime/common/asn1/asn1-ut-string-template2.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asn1/asn1-ut-string.cpp b/src/VBox/Runtime/common/asn1/asn1-ut-string.cpp
index da12973..1441c46 100644
--- a/src/VBox/Runtime/common/asn1/asn1-ut-string.cpp
+++ b/src/VBox/Runtime/common/asn1/asn1-ut-string.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -206,6 +206,7 @@ static const RTISO2022MAP g_IsoIr102Map =
 };
 
 
+#if 0 /* unused */
 /** GL mappings for ISO-IR-87 (Japanese),  with space and delete. */
 static const RTISO2022MAP g_IsoIr87Map =
 {
@@ -216,6 +217,7 @@ static const RTISO2022MAP g_IsoIr87Map =
     { 0x24, 0x2a, 0x42, 0xff, 0xff, 0xff } /* Esc into G2 */,
     { 0x24, 0x2b, 0x42, 0xff, 0xff, 0xff } /* Esc into G3 */,
 };
+#endif
 
 
 /**
@@ -517,7 +519,7 @@ static int rtIso2022Decoder_FindEscAndSet(PRTISO2022DECODERSTATE pThis,
     uint32_t i = cMaps;
     while (i-- > 0)
     {
-        uint32_t cchMatch;
+        uint32_t cchMatch = 0; /* (MSC maybe used uninitialized) */
         PCRTISO2022MAP pMap = papMaps[i];
         /** @todo skip non-Teletex codesets if we ever add more than we need for it. */
         if (   pMap->abEscLoadXX[0] == b0
@@ -529,7 +531,8 @@ static int rtIso2022Decoder_FindEscAndSet(PRTISO2022DECODERSTATE pThis,
                 pThis->apMapGn[0] = pMap;
             return cchMatch + 1;
         }
-        else if (!ppMapRet) /* ppMapRet is NULL if Gn. */
+
+        if (!ppMapRet) /* ppMapRet is NULL if Gn. */
         {
             uint32_t iGn;
             if (   pMap->abEscLoadG1[0] == b0
@@ -1032,7 +1035,6 @@ static int rtIso2022RecodeAsUtf8(uint32_t uProfile, const char *pchSrc, uint32_t
     int rc = rtIso2022Decoder_Init(&Decoder, pchSrc, cchSrc, 102, 106, 107, 102, NULL /*pErrInfo*/);
     if (RT_SUCCESS(rc))
     {
-        size_t cchUtf8 = 0;
         for (;;)
         {
             RTUNICP uc;
@@ -1735,6 +1737,7 @@ RTDECL(void) RTAsn1String_Delete(PRTASN1STRING pThis)
 
 RTDECL(int) RTAsn1String_Enum(PRTASN1STRING pThis, PFNRTASN1ENUMCALLBACK pfnCallback, uint32_t uDepth, void *pvUser)
 {
+    RT_NOREF_PV(pThis); RT_NOREF_PV(pfnCallback); RT_NOREF_PV(uDepth); RT_NOREF_PV(pvUser);
     Assert(pThis && (!RTAsn1String_IsPresent(pThis) || pThis->Asn1Core.pOps == &g_RTAsn1String_Vtable));
 
     /* No children to enumerate. */
@@ -1751,6 +1754,7 @@ RTDECL(int) RTAsn1String_Compare(PCRTASN1STRING pLeft, PCRTASN1STRING pRight)
 
 RTDECL(int) RTAsn1String_CheckSanity(PCRTASN1STRING pThis, uint32_t fFlags, PRTERRINFO pErrInfo, const char *pszErrorTag)
 {
+    RT_NOREF_PV(fFlags);
     if (RT_UNLIKELY(!RTAsn1String_IsPresent(pThis)))
         return RTErrInfoSetF(pErrInfo, VERR_ASN1_NOT_PRESENT, "%s: Missing (STRING).", pszErrorTag);
     return rtAsn1String_CheckSanity(pThis, pErrInfo, pszErrorTag, NULL /*pcchUtf8*/);
@@ -1786,6 +1790,7 @@ RTDECL(int) RTAsn1String_CheckSanity(PCRTASN1STRING pThis, uint32_t fFlags, PRTE
     \
     RTDECL(int) RT_CONCAT(a_Api,_Enum)(PRTASN1STRING pThis, PFNRTASN1ENUMCALLBACK pfnCallback, uint32_t uDepth, void *pvUser) \
     { \
+        RT_NOREF_PV(pThis); RT_NOREF_PV(pfnCallback); RT_NOREF_PV(uDepth); RT_NOREF_PV(pvUser); \
         Assert(   pThis \
                && (   !RTAsn1String_IsPresent(pThis) \
                    || (   pThis->Asn1Core.pOps == &g_RTAsn1String_Vtable \
diff --git a/src/VBox/Runtime/common/asn1/asn1-ut-time-decode.cpp b/src/VBox/Runtime/common/asn1/asn1-ut-time-decode.cpp
index 94e1835..040b2f4 100644
--- a/src/VBox/Runtime/common/asn1/asn1-ut-time-decode.cpp
+++ b/src/VBox/Runtime/common/asn1/asn1-ut-time-decode.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -304,7 +304,7 @@ static int rtAsn1Time_ConvertGeneralizedTime(PRTASN1CURSOR pCursor, PRTASN1TIME
 
 RTDECL(int) RTAsn1Time_DecodeAsn1(PRTASN1CURSOR pCursor, uint32_t fFlags, PRTASN1TIME pThis, const char *pszErrorTag)
 {
-    Assert(!(fFlags & RTASN1CURSOR_GET_F_IMPLICIT));
+    Assert(!(fFlags & RTASN1CURSOR_GET_F_IMPLICIT)); RT_NOREF_PV(fFlags);
     int rc = RTAsn1CursorReadHdr(pCursor, &pThis->Asn1Core, pszErrorTag);
     if (RT_SUCCESS(rc))
     {
diff --git a/src/VBox/Runtime/common/asn1/asn1-ut-time-template.h b/src/VBox/Runtime/common/asn1/asn1-ut-time-template.h
index 1ce37e0..4da528c 100644
--- a/src/VBox/Runtime/common/asn1/asn1-ut-time-template.h
+++ b/src/VBox/Runtime/common/asn1/asn1-ut-time-template.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asn1/asn1-ut-time-template2.h b/src/VBox/Runtime/common/asn1/asn1-ut-time-template2.h
index 354f7b6..6ca2c79 100644
--- a/src/VBox/Runtime/common/asn1/asn1-ut-time-template2.h
+++ b/src/VBox/Runtime/common/asn1/asn1-ut-time-template2.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/asn1/asn1-ut-time.cpp b/src/VBox/Runtime/common/asn1/asn1-ut-time.cpp
index cb77e27..2418e5e 100644
--- a/src/VBox/Runtime/common/asn1/asn1-ut-time.cpp
+++ b/src/VBox/Runtime/common/asn1/asn1-ut-time.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -54,6 +54,7 @@ static const char g_szEpochGeneralized[] = "19700101000000Z";
 
 RTDECL(int) RTAsn1Time_InitEx(PRTASN1TIME pThis, uint32_t uTag, PCRTASN1ALLOCATORVTABLE pAllocator)
 {
+    RT_NOREF_PV(pAllocator);
     AssertReturn(uTag == ASN1_TAG_UTC_TIME || uTag == ASN1_TAG_GENERALIZED_TIME, VERR_INVALID_PARAMETER);
     RTAsn1Core_InitEx(&pThis->Asn1Core,
                       uTag,
@@ -153,6 +154,7 @@ RTDECL(void) RTAsn1Time_Delete(PRTASN1TIME pThis)
 
 RTDECL(int) RTAsn1Time_Enum(PRTASN1TIME pThis, PFNRTASN1ENUMCALLBACK pfnCallback, uint32_t uDepth, void *pvUser)
 {
+    RT_NOREF_PV(pThis); RT_NOREF_PV(pfnCallback); RT_NOREF_PV(uDepth); RT_NOREF_PV(pvUser);
     Assert(pThis && (!RTAsn1Time_IsPresent(pThis) || pThis->Asn1Core.pOps == &g_RTAsn1Time_Vtable));
 
     /* No children to enumerate. */
@@ -189,6 +191,7 @@ RTDECL(int) RTAsn1Time_Compare(PCRTASN1TIME pLeft, PCRTASN1TIME pRight)
 
 RTDECL(int) RTAsn1Time_CheckSanity(PCRTASN1TIME pThis, uint32_t fFlags, PRTERRINFO pErrInfo, const char *pszErrorTag)
 {
+    RT_NOREF_PV(fFlags);
     if (RT_UNLIKELY(!RTAsn1Time_IsPresent(pThis)))
         return RTErrInfoSetF(pErrInfo, VERR_ASN1_NOT_PRESENT, "%s: Missing (TIME).", pszErrorTag);
     return VINF_SUCCESS;
@@ -224,6 +227,7 @@ RTDECL(int) RTAsn1Time_CheckSanity(PCRTASN1TIME pThis, uint32_t fFlags, PRTERRIN
     \
     RTDECL(int) RT_CONCAT(a_Api,_Enum)(PRTASN1TIME pThis, PFNRTASN1ENUMCALLBACK pfnCallback, uint32_t uDepth, void *pvUser) \
     { \
+        RT_NOREF_PV(pThis); RT_NOREF_PV(pfnCallback); RT_NOREF_PV(uDepth); RT_NOREF_PV(pvUser); \
         Assert(   pThis \
                && (   !RTAsn1Time_IsPresent(pThis) \
                    || (   pThis->Asn1Core.pOps == &g_RTAsn1Time_Vtable \
diff --git a/src/VBox/Runtime/common/asn1/oiddb2c.cpp b/src/VBox/Runtime/common/asn1/oiddb2c.cpp
index 5195ae5..eeb6855 100644
--- a/src/VBox/Runtime/common/asn1/oiddb2c.cpp
+++ b/src/VBox/Runtime/common/asn1/oiddb2c.cpp
@@ -392,7 +392,7 @@ static RTEXITCODE loadOidFile(FILE *pIn, const char *pszFile)
      * 'Description = <name>' which we keep.  We save the entry once we
      * see the description attribute.
      */
-    unsigned    cOidComponents;
+    unsigned    cOidComponents = 0;
     uint32_t    auOidComponents[16];
     unsigned    iLineNo = 0;
     char        szLine[16384];
diff --git a/src/VBox/Runtime/common/checksum/RTSha1Digest.cpp b/src/VBox/Runtime/common/checksum/RTSha1Digest.cpp
index 2e2d70f..aa78d4d 100644
--- a/src/VBox/Runtime/common/checksum/RTSha1Digest.cpp
+++ b/src/VBox/Runtime/common/checksum/RTSha1Digest.cpp
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/checksum/RTSha256Digest.cpp b/src/VBox/Runtime/common/checksum/RTSha256Digest.cpp
index 305770e..cfa25be 100644
--- a/src/VBox/Runtime/common/checksum/RTSha256Digest.cpp
+++ b/src/VBox/Runtime/common/checksum/RTSha256Digest.cpp
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/checksum/adler32.cpp b/src/VBox/Runtime/common/checksum/adler32.cpp
index c524818..edd5afe 100644
--- a/src/VBox/Runtime/common/checksum/adler32.cpp
+++ b/src/VBox/Runtime/common/checksum/adler32.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/checksum/alt-md2.cpp b/src/VBox/Runtime/common/checksum/alt-md2.cpp
index dd10c1c..fdcf87c 100644
--- a/src/VBox/Runtime/common/checksum/alt-md2.cpp
+++ b/src/VBox/Runtime/common/checksum/alt-md2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/checksum/alt-md5.cpp b/src/VBox/Runtime/common/checksum/alt-md5.cpp
index 8a6e9ce..942e5b9 100644
--- a/src/VBox/Runtime/common/checksum/alt-md5.cpp
+++ b/src/VBox/Runtime/common/checksum/alt-md5.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/checksum/alt-sha1.cpp b/src/VBox/Runtime/common/checksum/alt-sha1.cpp
index 5526929..8e64ab2 100644
--- a/src/VBox/Runtime/common/checksum/alt-sha1.cpp
+++ b/src/VBox/Runtime/common/checksum/alt-sha1.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/checksum/alt-sha256.cpp b/src/VBox/Runtime/common/checksum/alt-sha256.cpp
index 4c40d3c..402e91b 100644
--- a/src/VBox/Runtime/common/checksum/alt-sha256.cpp
+++ b/src/VBox/Runtime/common/checksum/alt-sha256.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/checksum/alt-sha512.cpp b/src/VBox/Runtime/common/checksum/alt-sha512.cpp
index fdf1169..d51eb1f 100644
--- a/src/VBox/Runtime/common/checksum/alt-sha512.cpp
+++ b/src/VBox/Runtime/common/checksum/alt-sha512.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/checksum/crc32-zlib.cpp b/src/VBox/Runtime/common/checksum/crc32-zlib.cpp
index e0dacca..c1b851c 100644
--- a/src/VBox/Runtime/common/checksum/crc32-zlib.cpp
+++ b/src/VBox/Runtime/common/checksum/crc32-zlib.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/checksum/crc32.cpp b/src/VBox/Runtime/common/checksum/crc32.cpp
index bae5647..33c5acf 100644
--- a/src/VBox/Runtime/common/checksum/crc32.cpp
+++ b/src/VBox/Runtime/common/checksum/crc32.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/checksum/crc32c.cpp b/src/VBox/Runtime/common/checksum/crc32c.cpp
index 8921add..6e4f06a 100644
--- a/src/VBox/Runtime/common/checksum/crc32c.cpp
+++ b/src/VBox/Runtime/common/checksum/crc32c.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -78,8 +78,8 @@ static uint32_t const g_au32Crc32C[] =
 };
 
 
-DECLINLINE(uint32_t) rtCrc32ProcessWithTable(const uint32_t *pau32Crc32,
-                                             uint32_t uCrc32, const void *pv, size_t cb)
+DECLINLINE(uint32_t) rtCrc32CProcessWithTable(const uint32_t *pau32Crc32,
+                                              uint32_t uCrc32, const void *pv, size_t cb)
 {
     const uint8_t  *pu8 = (const uint8_t *)pv;
 
@@ -94,29 +94,29 @@ RTDECL(uint32_t) RTCrc32CStart(void)
 {
     return ~0U;
 }
-RT_EXPORT_SYMBOL(RTCrc32Start);
+RT_EXPORT_SYMBOL(RTCrc32CStart);
 
 
 RTDECL(uint32_t) RTCrc32CFinish(uint32_t uCRC32)
 {
     return uCRC32 ^ ~0U;
 }
-RT_EXPORT_SYMBOL(RTCrc32Finish);
+RT_EXPORT_SYMBOL(RTCrc32CFinish);
 
 
 RTDECL(uint32_t) RTCrc32C(const void *pv, size_t cb)
 {
-    uint32_t uCrc32C = RTCrc32Start();
+    uint32_t uCrc32C = RTCrc32CStart();
 
-    uCrc32C = rtCrc32ProcessWithTable(g_au32Crc32C, uCrc32C, pv, cb);
-    return RTCrc32Finish(uCrc32C);
+    uCrc32C = rtCrc32CProcessWithTable(g_au32Crc32C, uCrc32C, pv, cb);
+    return RTCrc32CFinish(uCrc32C);
 }
 RT_EXPORT_SYMBOL(RTCrc32C);
 
 
 RTDECL(uint32_t) RTCrc32CProcess(uint32_t uCrc32C, const void *pv, size_t cb)
 {
-    return rtCrc32ProcessWithTable(g_au32Crc32C, uCrc32C, pv, cb);;
+    return rtCrc32CProcessWithTable(g_au32Crc32C, uCrc32C, pv, cb);;
 }
 RT_EXPORT_SYMBOL(RTCrc32CProcess);
 
diff --git a/src/VBox/Runtime/common/checksum/crc64.cpp b/src/VBox/Runtime/common/checksum/crc64.cpp
index bb0e250..7af1d05 100644
--- a/src/VBox/Runtime/common/checksum/crc64.cpp
+++ b/src/VBox/Runtime/common/checksum/crc64.cpp
@@ -9,7 +9,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/checksum/ipv4.cpp b/src/VBox/Runtime/common/checksum/ipv4.cpp
index 209484b..632b931 100644
--- a/src/VBox/Runtime/common/checksum/ipv4.cpp
+++ b/src/VBox/Runtime/common/checksum/ipv4.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/checksum/ipv6.cpp b/src/VBox/Runtime/common/checksum/ipv6.cpp
index 4c19af1..f0398fe 100644
--- a/src/VBox/Runtime/common/checksum/ipv6.cpp
+++ b/src/VBox/Runtime/common/checksum/ipv6.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/checksum/manifest-file.cpp b/src/VBox/Runtime/common/checksum/manifest-file.cpp
index 31be4e2..ed05136 100644
--- a/src/VBox/Runtime/common/checksum/manifest-file.cpp
+++ b/src/VBox/Runtime/common/checksum/manifest-file.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/checksum/manifest.cpp b/src/VBox/Runtime/common/checksum/manifest.cpp
index 8720721..601d3d5 100644
--- a/src/VBox/Runtime/common/checksum/manifest.cpp
+++ b/src/VBox/Runtime/common/checksum/manifest.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/checksum/manifest2.cpp b/src/VBox/Runtime/common/checksum/manifest2.cpp
index 06be46f..a70a14f 100644
--- a/src/VBox/Runtime/common/checksum/manifest2.cpp
+++ b/src/VBox/Runtime/common/checksum/manifest2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -300,8 +300,7 @@ RTDECL(int) RTManifestDup(RTMANIFEST hManifestSrc, PRTMANIFEST phManifestDst)
     AssertReturn(pThis->u32Magic == RTMANIFEST_MAGIC, VERR_INVALID_HANDLE);
     AssertPtr(phManifestDst);
 
-
-    /** @todo implement cloning. */
+    RT_NOREF_PV(phManifestDst); /** @todo implement cloning. */
 
     return VERR_NOT_IMPLEMENTED;
 }
diff --git a/src/VBox/Runtime/common/checksum/manifest3.cpp b/src/VBox/Runtime/common/checksum/manifest3.cpp
index 110106b..67aef42 100644
--- a/src/VBox/Runtime/common/checksum/manifest3.cpp
+++ b/src/VBox/Runtime/common/checksum/manifest3.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/checksum/md2str.cpp b/src/VBox/Runtime/common/checksum/md2str.cpp
index 2c7bf2e..a821e9c 100644
--- a/src/VBox/Runtime/common/checksum/md2str.cpp
+++ b/src/VBox/Runtime/common/checksum/md2str.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/checksum/md5str.cpp b/src/VBox/Runtime/common/checksum/md5str.cpp
index 5049860..43740eb 100644
--- a/src/VBox/Runtime/common/checksum/md5str.cpp
+++ b/src/VBox/Runtime/common/checksum/md5str.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/checksum/openssl-md2.cpp b/src/VBox/Runtime/common/checksum/openssl-md2.cpp
index c878c4c..f220977 100644
--- a/src/VBox/Runtime/common/checksum/openssl-md2.cpp
+++ b/src/VBox/Runtime/common/checksum/openssl-md2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/checksum/openssl-md5.cpp b/src/VBox/Runtime/common/checksum/openssl-md5.cpp
index 0c93b52..180c5a5 100644
--- a/src/VBox/Runtime/common/checksum/openssl-md5.cpp
+++ b/src/VBox/Runtime/common/checksum/openssl-md5.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/checksum/openssl-sha1.cpp b/src/VBox/Runtime/common/checksum/openssl-sha1.cpp
index 98e566a..b004215 100644
--- a/src/VBox/Runtime/common/checksum/openssl-sha1.cpp
+++ b/src/VBox/Runtime/common/checksum/openssl-sha1.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/checksum/openssl-sha256.cpp b/src/VBox/Runtime/common/checksum/openssl-sha256.cpp
index 81d24fd..44e381b 100644
--- a/src/VBox/Runtime/common/checksum/openssl-sha256.cpp
+++ b/src/VBox/Runtime/common/checksum/openssl-sha256.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/checksum/openssl-sha512.cpp b/src/VBox/Runtime/common/checksum/openssl-sha512.cpp
index 10a728b..d8faa9d 100644
--- a/src/VBox/Runtime/common/checksum/openssl-sha512.cpp
+++ b/src/VBox/Runtime/common/checksum/openssl-sha512.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/checksum/sha1str.cpp b/src/VBox/Runtime/common/checksum/sha1str.cpp
index f03d9ef..31345c4 100644
--- a/src/VBox/Runtime/common/checksum/sha1str.cpp
+++ b/src/VBox/Runtime/common/checksum/sha1str.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/checksum/sha224str.cpp b/src/VBox/Runtime/common/checksum/sha224str.cpp
index dc2b159..5589c34 100644
--- a/src/VBox/Runtime/common/checksum/sha224str.cpp
+++ b/src/VBox/Runtime/common/checksum/sha224str.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/checksum/sha256str.cpp b/src/VBox/Runtime/common/checksum/sha256str.cpp
index 900bc74..7e57034 100644
--- a/src/VBox/Runtime/common/checksum/sha256str.cpp
+++ b/src/VBox/Runtime/common/checksum/sha256str.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/checksum/sha384str.cpp b/src/VBox/Runtime/common/checksum/sha384str.cpp
index 3cf3278..6cee7da 100644
--- a/src/VBox/Runtime/common/checksum/sha384str.cpp
+++ b/src/VBox/Runtime/common/checksum/sha384str.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/checksum/sha512str.cpp b/src/VBox/Runtime/common/checksum/sha512str.cpp
index 9813a82..d11cb51 100644
--- a/src/VBox/Runtime/common/checksum/sha512str.cpp
+++ b/src/VBox/Runtime/common/checksum/sha512str.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/checksum/sha512t224str.cpp b/src/VBox/Runtime/common/checksum/sha512t224str.cpp
index e68c530..f528d2f 100644
--- a/src/VBox/Runtime/common/checksum/sha512t224str.cpp
+++ b/src/VBox/Runtime/common/checksum/sha512t224str.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/checksum/sha512t256str.cpp b/src/VBox/Runtime/common/checksum/sha512t256str.cpp
index 9ed05ae..b687420 100644
--- a/src/VBox/Runtime/common/checksum/sha512t256str.cpp
+++ b/src/VBox/Runtime/common/checksum/sha512t256str.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/RTCrStoreCertAddFromJavaKeyStore.cpp b/src/VBox/Runtime/common/crypto/RTCrStoreCertAddFromJavaKeyStore.cpp
index 96168ce..fecf759 100644
--- a/src/VBox/Runtime/common/crypto/RTCrStoreCertAddFromJavaKeyStore.cpp
+++ b/src/VBox/Runtime/common/crypto/RTCrStoreCertAddFromJavaKeyStore.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/RTCrStoreCertAddWantedFromFishingExpedition.cpp b/src/VBox/Runtime/common/crypto/RTCrStoreCertAddWantedFromFishingExpedition.cpp
index 68f7ae4..7977ed1 100644
--- a/src/VBox/Runtime/common/crypto/RTCrStoreCertAddWantedFromFishingExpedition.cpp
+++ b/src/VBox/Runtime/common/crypto/RTCrStoreCertAddWantedFromFishingExpedition.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -244,4 +244,3 @@ RTDECL(int) RTCrStoreCertAddWantedFromFishingExpedition(RTCRSTORE hStore, uint32
 }
 RT_EXPORT_SYMBOL(RTCrStoreCertAddWantedFromFishingExpedition);
 
-
diff --git a/src/VBox/Runtime/common/crypto/RTCrStoreCertExportAsPem.cpp b/src/VBox/Runtime/common/crypto/RTCrStoreCertExportAsPem.cpp
index b7bc5c8..3698344 100644
--- a/src/VBox/Runtime/common/crypto/RTCrStoreCertExportAsPem.cpp
+++ b/src/VBox/Runtime/common/crypto/RTCrStoreCertExportAsPem.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/digest-builtin.cpp b/src/VBox/Runtime/common/crypto/digest-builtin.cpp
index 997523c..66b4304 100644
--- a/src/VBox/Runtime/common/crypto/digest-builtin.cpp
+++ b/src/VBox/Runtime/common/crypto/digest-builtin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -63,6 +63,7 @@ static DECLCALLBACK(void) rtCrDigestMd2_Final(void *pvState, uint8_t *pbHash)
 /** @impl_interface_method{RTCRDIGESTDESC::pfnInit} */
 static DECLCALLBACK(int) rtCrDigestMd2_Init(void *pvState, void *pvOpaque, bool fReInit)
 {
+    RT_NOREF_PV(fReInit); RT_NOREF_PV(pvOpaque);
     AssertReturn(pvOpaque == NULL, VERR_INVALID_PARAMETER);
     RTMd2Init((PRTMD2CONTEXT)pvState);
     return VINF_SUCCESS;
@@ -117,6 +118,7 @@ static DECLCALLBACK(void) rtCrDigestMd5_Final(void *pvState, uint8_t *pbHash)
 /** @impl_interface_method{RTCRDIGESTDESC::pfnInit} */
 static DECLCALLBACK(int) rtCrDigestMd5_Init(void *pvState, void *pvOpaque, bool fReInit)
 {
+    RT_NOREF_PV(pvOpaque); RT_NOREF_PV(fReInit);
     AssertReturn(pvOpaque == NULL, VERR_INVALID_PARAMETER);
     RTMd5Init((PRTMD5CONTEXT)pvState);
     return VINF_SUCCESS;
@@ -171,6 +173,7 @@ static DECLCALLBACK(void) rtCrDigestSha1_Final(void *pvState, uint8_t *pbHash)
 /** @impl_interface_method{RTCRDIGESTDESC::pfnInit} */
 static DECLCALLBACK(int) rtCrDigestSha1_Init(void *pvState, void *pvOpaque, bool fReInit)
 {
+    RT_NOREF_PV(pvOpaque); RT_NOREF_PV(fReInit);
     AssertReturn(pvOpaque == NULL, VERR_INVALID_PARAMETER);
     RTSha1Init((PRTSHA1CONTEXT)pvState);
     return VINF_SUCCESS;
@@ -225,6 +228,7 @@ static DECLCALLBACK(void) rtCrDigestSha256_Final(void *pvState, uint8_t *pbHash)
 /** @impl_interface_method{RTCRDIGESTDESC::pfnInit} */
 static DECLCALLBACK(int) rtCrDigestSha256_Init(void *pvState, void *pvOpaque, bool fReInit)
 {
+    RT_NOREF_PV(pvOpaque); RT_NOREF_PV(fReInit);
     AssertReturn(pvOpaque == NULL, VERR_INVALID_PARAMETER);
     RTSha256Init((PRTSHA256CONTEXT)pvState);
     return VINF_SUCCESS;
@@ -278,6 +282,7 @@ static DECLCALLBACK(void) rtCrDigestSha512_Final(void *pvState, uint8_t *pbHash)
 /** @impl_interface_method{RTCRDIGESTDESC::pfnInit} */
 static DECLCALLBACK(int) rtCrDigestSha512_Init(void *pvState, void *pvOpaque, bool fReInit)
 {
+    RT_NOREF_PV(pvOpaque); RT_NOREF_PV(fReInit);
     AssertReturn(pvOpaque == NULL, VERR_INVALID_PARAMETER);
     RTSha512Init((PRTSHA512CONTEXT)pvState);
     return VINF_SUCCESS;
@@ -331,6 +336,7 @@ static DECLCALLBACK(void) rtCrDigestSha224_Final(void *pvState, uint8_t *pbHash)
 /** @impl_interface_method{RTCRDIGESTDESC::pfnInit} */
 static DECLCALLBACK(int) rtCrDigestSha224_Init(void *pvState, void *pvOpaque, bool fReInit)
 {
+    RT_NOREF_PV(pvOpaque); RT_NOREF_PV(fReInit);
     AssertReturn(pvOpaque == NULL, VERR_INVALID_PARAMETER);
     RTSha224Init((PRTSHA224CONTEXT)pvState);
     return VINF_SUCCESS;
@@ -384,6 +390,7 @@ static DECLCALLBACK(void) rtCrDigestSha384_Final(void *pvState, uint8_t *pbHash)
 /** @impl_interface_method{RTCRDIGESTDESC::pfnInit} */
 static DECLCALLBACK(int) rtCrDigestSha384_Init(void *pvState, void *pvOpaque, bool fReInit)
 {
+    RT_NOREF_PV(pvOpaque); RT_NOREF_PV(fReInit);
     AssertReturn(pvOpaque == NULL, VERR_INVALID_PARAMETER);
     RTSha384Init((PRTSHA384CONTEXT)pvState);
     return VINF_SUCCESS;
@@ -438,6 +445,7 @@ static DECLCALLBACK(void) rtCrDigestSha512t224_Final(void *pvState, uint8_t *pbH
 /** @impl_interface_method{RTCRDIGESTDESC::pfnInit} */
 static DECLCALLBACK(int) rtCrDigestSha512t224_Init(void *pvState, void *pvOpaque, bool fReInit)
 {
+    RT_NOREF_PV(pvOpaque); RT_NOREF_PV(fReInit);
     AssertReturn(pvOpaque == NULL, VERR_INVALID_PARAMETER);
     RTSha512t224Init((PRTSHA512T224CONTEXT)pvState);
     return VINF_SUCCESS;
@@ -492,6 +500,7 @@ static DECLCALLBACK(void) rtCrDigestSha512t256_Final(void *pvState, uint8_t *pbH
 /** @impl_interface_method{RTCRDIGESTDESC::pfnInit} */
 static DECLCALLBACK(int) rtCrDigestSha512t256_Init(void *pvState, void *pvOpaque, bool fReInit)
 {
+    RT_NOREF_PV(pvOpaque); RT_NOREF_PV(fReInit);
     AssertReturn(pvOpaque == NULL, VERR_INVALID_PARAMETER);
     RTSha512t256Init((PRTSHA512T256CONTEXT)pvState);
     return VINF_SUCCESS;
@@ -551,7 +560,7 @@ static PCRTCRDIGESTDESC const g_apDigestOps[] =
 /*
  * OpenSSL EVP.
  */
-    
+
 # if OPENSSL_VERSION_NUMBER >= 0x10100000
 /** @impl_interface_method{RTCRDIGESTDESC::pfnNew} */
 static DECLCALLBACK(void*) rtCrDigestOsslEvp_New(void)
@@ -638,7 +647,7 @@ static DECLCALLBACK(uint32_t) rtCrDigestOsslEvp_GetHashSize(void *pvState)
 /** @impl_interface_method{RTCRDIGESTDESC::pfnGetHashSize} */
 static DECLCALLBACK(RTDIGESTTYPE) rtCrDigestOsslEvp_GetDigestType(void *pvState)
 {
-    EVP_MD_CTX *pThis = (EVP_MD_CTX *)pvState;
+    RT_NOREF_PV(pvState); //EVP_MD_CTX *pThis = (EVP_MD_CTX *)pvState;
     /** @todo figure which digest algorithm it is! */
     return RTDIGESTTYPE_UNKNOWN;
 }
diff --git a/src/VBox/Runtime/common/crypto/digest-core.cpp b/src/VBox/Runtime/common/crypto/digest-core.cpp
index f26a3fc..1a9a626 100644
--- a/src/VBox/Runtime/common/crypto/digest-core.cpp
+++ b/src/VBox/Runtime/common/crypto/digest-core.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/iprt-openssl.cpp b/src/VBox/Runtime/common/crypto/iprt-openssl.cpp
index 75deec4..b8eef30 100644
--- a/src/VBox/Runtime/common/crypto/iprt-openssl.cpp
+++ b/src/VBox/Runtime/common/crypto/iprt-openssl.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/pemfile.cpp b/src/VBox/Runtime/common/crypto/pemfile.cpp
index d1e63e0..806c2b2 100644
--- a/src/VBox/Runtime/common/crypto/pemfile.cpp
+++ b/src/VBox/Runtime/common/crypto/pemfile.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -333,6 +333,8 @@ RTDECL(int) RTCrPemParseContent(void const *pvContent, size_t cbContent, uint32_
                                 PCRTCRPEMMARKER paMarkers, size_t cMarkers,
                                 PCRTCRPEMSECTION *ppSectionHead, PRTERRINFO pErrInfo)
 {
+    RT_NOREF_PV(pErrInfo);
+
     /*
      * Input validation.
      */
diff --git a/src/VBox/Runtime/common/crypto/pkcs7-asn1-decoder.cpp b/src/VBox/Runtime/common/crypto/pkcs7-asn1-decoder.cpp
index c421dd7..d1eb18e 100644
--- a/src/VBox/Runtime/common/crypto/pkcs7-asn1-decoder.cpp
+++ b/src/VBox/Runtime/common/crypto/pkcs7-asn1-decoder.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -56,6 +56,7 @@ typedef enum RTCRPKCS7CONTENTINFOCHOICE
 static int rtCrPkcs7ContentInfo_DecodeExtra(PRTASN1CURSOR pCursor, uint32_t fFlags, PRTCRPKCS7CONTENTINFO pThis,
                                             const char *pszErrorTag)
 {
+    RT_NOREF_PV(fFlags); RT_NOREF_PV(pszErrorTag);
     pThis->u.pCore = NULL;
 
     /*
diff --git a/src/VBox/Runtime/common/crypto/pkcs7-core.cpp b/src/VBox/Runtime/common/crypto/pkcs7-core.cpp
index 0348c97..2ce1a91 100644
--- a/src/VBox/Runtime/common/crypto/pkcs7-core.cpp
+++ b/src/VBox/Runtime/common/crypto/pkcs7-core.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/pkcs7-init.cpp b/src/VBox/Runtime/common/crypto/pkcs7-init.cpp
index 35993e9..8f0b392 100644
--- a/src/VBox/Runtime/common/crypto/pkcs7-init.cpp
+++ b/src/VBox/Runtime/common/crypto/pkcs7-init.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/pkcs7-internal.h b/src/VBox/Runtime/common/crypto/pkcs7-internal.h
index 6f2ee48..f7cdd17 100644
--- a/src/VBox/Runtime/common/crypto/pkcs7-internal.h
+++ b/src/VBox/Runtime/common/crypto/pkcs7-internal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/pkcs7-sanity.cpp b/src/VBox/Runtime/common/crypto/pkcs7-sanity.cpp
index 66d8100..f712420 100644
--- a/src/VBox/Runtime/common/crypto/pkcs7-sanity.cpp
+++ b/src/VBox/Runtime/common/crypto/pkcs7-sanity.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -43,6 +43,7 @@ static int rtCrPkcs7SignedData_CheckSanityExtra(PCRTCRPKCS7SIGNEDDATA pSignedDat
                                                 PRTERRINFO pErrInfo, const char *pszErrorTag)
 {
     bool const fAuthenticode = RT_BOOL(fFlags & RTCRPKCS7SIGNEDDATA_SANITY_F_AUTHENTICODE);
+    RT_NOREF_PV(fFlags);
 
     //RTAsn1Dump(&pSignedData->SeqCore.Asn1Core, 0, 0, RTAsn1DumpStrmPrintfV, g_pStdOut);
 
@@ -60,20 +61,20 @@ static int rtCrPkcs7SignedData_CheckSanityExtra(PCRTCRPKCS7SIGNEDDATA pSignedDat
         return RTErrInfoSet(pErrInfo, VERR_CR_PKCS7_SIGNED_DATA_NO_DIGEST_ALGOS, "SignedData.DigestAlgorithms is empty");
     if (pSignedData->DigestAlgorithms.cItems != 1 && fAuthenticode)
         return RTErrInfoSetF(pErrInfo, VERR_CR_SPC_NOT_EXACTLY_ONE_DIGEST_ALGO,
-                             "SignedData.DigestAlgorithms has more than one algorithm (%u)",
-                             pSignedData->DigestAlgorithms.cItems);
+                             "%s: SignedData.DigestAlgorithms has more than one algorithm (%u)",
+                             pszErrorTag, pSignedData->DigestAlgorithms.cItems);
 
     if (fFlags & RTCRPKCS7SIGNEDDATA_SANITY_F_ONLY_KNOWN_HASH)
         for (uint32_t i = 0; i < pSignedData->DigestAlgorithms.cItems; i++)
         {
             if (RTCrX509AlgorithmIdentifier_QueryDigestType(&pSignedData->DigestAlgorithms.paItems[i]) == RTDIGESTTYPE_INVALID)
                 return RTErrInfoSetF(pErrInfo, VERR_CR_PKCS7_UNKNOWN_DIGEST_ALGORITHM,
-                                     "SignedData.DigestAlgorithms[%i] is not known: %s",
-                                     i, pSignedData->DigestAlgorithms.paItems[i].Algorithm.szObjId);
+                                     "%s: SignedData.DigestAlgorithms[%i] is not known: %s",
+                                     pszErrorTag, i, pSignedData->DigestAlgorithms.paItems[i].Algorithm.szObjId);
             if (pSignedData->DigestAlgorithms.paItems[i].Parameters.enmType != RTASN1TYPE_NULL)
                 return RTErrInfoSetF(pErrInfo, VERR_CR_PKCS7_DIGEST_PARAMS_NOT_IMPL,
-                                     "SignedData.DigestAlgorithms[%i] has parameters: tag=%u",
-                                     i, pSignedData->DigestAlgorithms.paItems[i].Parameters.u.Core.uTag);
+                                     "%s: SignedData.DigestAlgorithms[%i] has parameters: tag=%u",
+                                     pszErrorTag, i, pSignedData->DigestAlgorithms.paItems[i].Parameters.u.Core.uTag);
         }
 
     /*
@@ -81,26 +82,26 @@ static int rtCrPkcs7SignedData_CheckSanityExtra(PCRTCRPKCS7SIGNEDDATA pSignedDat
      */
     if (   (fFlags & RTCRPKCS7SIGNEDDATA_SANITY_F_SIGNING_CERT_PRESENT)
         && pSignedData->Certificates.cItems == 0)
-        return RTErrInfoSet(pErrInfo, VERR_CR_PKCS7_NO_CERTIFICATES,
-                            "SignedData.Certifcates is empty, expected at least one certificate");
+        return RTErrInfoSetF(pErrInfo, VERR_CR_PKCS7_NO_CERTIFICATES,
+                             "%s: SignedData.Certifcates is empty, expected at least one certificate", pszErrorTag);
 
     /*
      * Crls.
      */
     if (fAuthenticode && RTAsn1Core_IsPresent(&pSignedData->Crls))
-        return RTErrInfoSet(pErrInfo, VERR_CR_PKCS7_EXPECTED_NO_CRLS,
-                            "SignedData.Crls is not empty as expected for authenticode.");
+        return RTErrInfoSetF(pErrInfo, VERR_CR_PKCS7_EXPECTED_NO_CRLS,
+                             "%s: SignedData.Crls is not empty as expected for authenticode.", pszErrorTag);
     /** @todo check Crls when they become important. */
 
     /*
      * SignerInfos.
      */
     if (pSignedData->SignerInfos.cItems == 0)
-        return RTErrInfoSet(pErrInfo, VERR_CR_PKCS7_NO_SIGNER_INFOS, "SignedData.SignerInfos is empty?");
+        return RTErrInfoSetF(pErrInfo, VERR_CR_PKCS7_NO_SIGNER_INFOS, "%s: SignedData.SignerInfos is empty?", pszErrorTag);
     if (fAuthenticode && pSignedData->SignerInfos.cItems != 1)
         return RTErrInfoSetF(pErrInfo, VERR_CR_PKCS7_EXPECTED_ONE_SIGNER_INFO,
-                             "SignedData.SignerInfos should have one entry for authenticode: %u",
-                             pSignedData->SignerInfos.cItems);
+                             "%s: SignedData.SignerInfos should have one entry for authenticode: %u",
+                             pszErrorTag, pSignedData->SignerInfos.cItems);
 
     for (uint32_t i = 0; i < pSignedData->SignerInfos.cItems; i++)
     {
@@ -108,8 +109,8 @@ static int rtCrPkcs7SignedData_CheckSanityExtra(PCRTCRPKCS7SIGNEDDATA pSignedDat
 
         if (RTAsn1Integer_UnsignedCompareWithU32(&pSignerInfo->Version, RTCRPKCS7SIGNERINFO_V1) != 0)
             return RTErrInfoSetF(pErrInfo, VERR_CR_PKCS7_SIGNER_INFO_VERSION,
-                                 "SignedData.SignerInfos[%u] version is %llu, expected %u",
-                                 i, pSignerInfo->Version.uValue.u, RTCRPKCS7SIGNERINFO_V1);
+                                 "%s: SignedData.SignerInfos[%u] version is %llu, expected %u",
+                                 pszErrorTag, i, pSignerInfo->Version.uValue.u, RTCRPKCS7SIGNERINFO_V1);
 
         /* IssuerAndSerialNumber. */
         int rc = RTCrX509Name_CheckSanity(&pSignerInfo->IssuerAndSerialNumber.Name, 0, pErrInfo,
@@ -119,7 +120,8 @@ static int rtCrPkcs7SignedData_CheckSanityExtra(PCRTCRPKCS7SIGNEDDATA pSignedDat
 
         if (pSignerInfo->IssuerAndSerialNumber.SerialNumber.Asn1Core.cb == 0)
             return RTErrInfoSetF(pErrInfo, VERR_CR_PKCS7_SIGNER_INFO_NO_ISSUER_SERIAL_NO,
-                                 "SignedData.SignerInfos[%u].IssuerAndSerialNumber.SerialNumber is missing (zero length)", i);
+                                 "%s: SignedData.SignerInfos[%u].IssuerAndSerialNumber.SerialNumber is missing (zero length)",
+                                 pszErrorTag, i);
 
         PCRTCRX509CERTIFICATE pCert;
         pCert = RTCrPkcs7SetOfCerts_FindX509ByIssuerAndSerialNumber(&pSignedData->Certificates,
@@ -127,7 +129,8 @@ static int rtCrPkcs7SignedData_CheckSanityExtra(PCRTCRPKCS7SIGNEDDATA pSignedDat
                                                                     &pSignerInfo->IssuerAndSerialNumber.SerialNumber);
         if (!pCert && (fFlags & RTCRPKCS7SIGNEDDATA_SANITY_F_SIGNING_CERT_PRESENT))
             return RTErrInfoSetF(pErrInfo, VERR_CR_PKCS7_SIGNER_CERT_NOT_SHIPPED,
-                                 "SignedData.SignerInfos[%u].IssuerAndSerialNumber not found in T0.Certificates", i);
+                                 "%s: SignedData.SignerInfos[%u].IssuerAndSerialNumber not found in T0.Certificates",
+                                 pszErrorTag, i);
 
         /* DigestAlgorithm */
         uint32_t j = 0;
@@ -137,8 +140,8 @@ static int rtCrPkcs7SignedData_CheckSanityExtra(PCRTCRPKCS7SIGNEDDATA pSignedDat
             j++;
         if (j >= pSignedData->DigestAlgorithms.cItems)
             return RTErrInfoSetF(pErrInfo, VERR_CR_PKCS7_DIGEST_ALGO_NOT_FOUND_IN_LIST,
-                                 "SignedData.SignerInfos[%u].DigestAlgorithm (%s) not found in SignedData.DigestAlgorithms",
-                                 i, pSignerInfo->DigestAlgorithm.Algorithm.szObjId);
+                                 "%s: SignedData.SignerInfos[%u].DigestAlgorithm (%s) not found in SignedData.DigestAlgorithms",
+                                 pszErrorTag, i, pSignerInfo->DigestAlgorithm.Algorithm.szObjId);
 
         /* Digest encryption algorithm. */
 #if 0  /** @todo Unimportant: Seen timestamp signatures specifying pkcs1-Sha256WithRsaEncryption in SignerInfo and just RSA in the certificate.  Figure out how to compare the two. */
@@ -162,35 +165,35 @@ static int rtCrPkcs7SignedData_CheckSanityExtra(PCRTCRPKCS7SIGNEDDATA pSignedDat
                 if (RTAsn1ObjId_CompareWithString(&pAttrib->Type, RTCR_PKCS9_ID_CONTENT_TYPE_OID) == 0)
                 {
                     if (fFoundContentInfo)
-                        return RTErrInfoSet(pErrInfo, VERR_CR_PKCS7_MISSING_CONTENT_TYPE_ATTRIB,
-                                            "Multiple authenticated content-type attributes.");
+                        return RTErrInfoSetF(pErrInfo, VERR_CR_PKCS7_MISSING_CONTENT_TYPE_ATTRIB,
+                                             "%s: Multiple authenticated content-type attributes.", pszErrorTag);
                     fFoundContentInfo = true;
                     AssertReturn(pAttrib->enmType == RTCRPKCS7ATTRIBUTETYPE_OBJ_IDS, VERR_INTERNAL_ERROR_3);
                     if (pAttrib->uValues.pObjIds->cItems != 1)
                         return RTErrInfoSetF(pErrInfo, VERR_CR_PKCS7_BAD_CONTENT_TYPE_ATTRIB,
-                                             "Expected exactly one value for content-type attrib, found: %u",
-                                             pAttrib->uValues.pObjIds->cItems);
+                                             "%s: Expected exactly one value for content-type attrib, found: %u",
+                                             pszErrorTag, pAttrib->uValues.pObjIds->cItems);
                 }
                 else if (RTAsn1ObjId_CompareWithString(&pAttrib->Type, RTCR_PKCS9_ID_MESSAGE_DIGEST_OID) == 0)
                 {
                     if (fFoundMessageDigest)
-                        return RTErrInfoSet(pErrInfo, VERR_CR_PKCS7_MISSING_MESSAGE_DIGEST_ATTRIB,
-                                            "Multiple authenticated message-digest attributes.");
+                        return RTErrInfoSetF(pErrInfo, VERR_CR_PKCS7_MISSING_MESSAGE_DIGEST_ATTRIB,
+                                             "%s: Multiple authenticated message-digest attributes.", pszErrorTag);
                     fFoundMessageDigest = true;
                     AssertReturn(pAttrib->enmType == RTCRPKCS7ATTRIBUTETYPE_OCTET_STRINGS, VERR_INTERNAL_ERROR_3);
                     if (pAttrib->uValues.pOctetStrings->cItems != 1)
                         return RTErrInfoSetF(pErrInfo, VERR_CR_PKCS7_BAD_CONTENT_TYPE_ATTRIB,
-                                             "Expected exactly one value for message-digest attrib, found: %u",
-                                             pAttrib->uValues.pOctetStrings->cItems);
+                                             "%s: Expected exactly one value for message-digest attrib, found: %u",
+                                             pszErrorTag, pAttrib->uValues.pOctetStrings->cItems);
                 }
             }
 
             if (!fFoundContentInfo)
-                return RTErrInfoSet(pErrInfo, VERR_CR_PKCS7_MISSING_CONTENT_TYPE_ATTRIB,
-                                    "Missing authenticated content-type attribute.");
+                return RTErrInfoSetF(pErrInfo, VERR_CR_PKCS7_MISSING_CONTENT_TYPE_ATTRIB,
+                                     "%s: Missing authenticated content-type attribute.", pszErrorTag);
             if (!fFoundMessageDigest)
-                return RTErrInfoSet(pErrInfo, VERR_CR_PKCS7_MISSING_MESSAGE_DIGEST_ATTRIB,
-                                    "Missing authenticated message-digest attribute.");
+                return RTErrInfoSetF(pErrInfo, VERR_CR_PKCS7_MISSING_MESSAGE_DIGEST_ATTRIB,
+                                     "%s: Missing authenticated message-digest attribute.", pszErrorTag);
         }
     }
 
diff --git a/src/VBox/Runtime/common/crypto/pkcs7-template.h b/src/VBox/Runtime/common/crypto/pkcs7-template.h
index 0bab59c..d6de7ca 100644
--- a/src/VBox/Runtime/common/crypto/pkcs7-template.h
+++ b/src/VBox/Runtime/common/crypto/pkcs7-template.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/pkcs7-verify.cpp b/src/VBox/Runtime/common/crypto/pkcs7-verify.cpp
index f0a99bf..7a08388 100644
--- a/src/VBox/Runtime/common/crypto/pkcs7-verify.cpp
+++ b/src/VBox/Runtime/common/crypto/pkcs7-verify.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -52,6 +52,8 @@ static int rtCrPkcs7VerifySignedDataUsingOpenSsl(PCRTCRPKCS7CONTENTINFO pContent
                                                  RTCRSTORE hAdditionalCerts, RTCRSTORE hTrustedCerts,
                                                  void const *pvContent, uint32_t cbContent, PRTERRINFO pErrInfo)
 {
+    RT_NOREF_PV(fFlags);
+
     /*
      * Verify using OpenSSL.
      */
@@ -148,6 +150,7 @@ static int rtCrPkcs7VerifyCertUsageDigitalSignature(PCRTCRX509CERTIFICATE pCert,
 RTDECL(int) RTCrPkcs7VerifyCertCallbackDefault(PCRTCRX509CERTIFICATE pCert, RTCRX509CERTPATHS hCertPaths, uint32_t fFlags,
                                                void *pvUser, PRTERRINFO pErrInfo)
 {
+    RT_NOREF_PV(hCertPaths); RT_NOREF_PV(pvUser);
     int rc = VINF_SUCCESS;
 
     if (fFlags & RTCRPKCS7VCC_F_SIGNED_DATA)
@@ -168,6 +171,7 @@ RTDECL(int) RTCrPkcs7VerifyCertCallbackDefault(PCRTCRX509CERTIFICATE pCert, RTCR
 RTDECL(int) RTCrPkcs7VerifyCertCallbackCodeSigning(PCRTCRX509CERTIFICATE pCert, RTCRX509CERTPATHS hCertPaths, uint32_t fFlags,
                                                    void *pvUser, PRTERRINFO pErrInfo)
 {
+    RT_NOREF_PV(hCertPaths); RT_NOREF_PV(pvUser);
     int rc = VINF_SUCCESS;
     if (fFlags & RTCRPKCS7VCC_F_SIGNED_DATA)
     {
diff --git a/src/VBox/Runtime/common/crypto/pkix-signature-builtin.cpp b/src/VBox/Runtime/common/crypto/pkix-signature-builtin.cpp
index a717c61..a854c7e 100644
--- a/src/VBox/Runtime/common/crypto/pkix-signature-builtin.cpp
+++ b/src/VBox/Runtime/common/crypto/pkix-signature-builtin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/pkix-signature-builtin.h b/src/VBox/Runtime/common/crypto/pkix-signature-builtin.h
index 746c45d..0ae67f0 100644
--- a/src/VBox/Runtime/common/crypto/pkix-signature-builtin.h
+++ b/src/VBox/Runtime/common/crypto/pkix-signature-builtin.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/pkix-signature-core.cpp b/src/VBox/Runtime/common/crypto/pkix-signature-core.cpp
index 0ea3046..70c38ed 100644
--- a/src/VBox/Runtime/common/crypto/pkix-signature-core.cpp
+++ b/src/VBox/Runtime/common/crypto/pkix-signature-core.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/pkix-signature-rsa.cpp b/src/VBox/Runtime/common/crypto/pkix-signature-rsa.cpp
index 611758b..34e09eb 100644
--- a/src/VBox/Runtime/common/crypto/pkix-signature-rsa.cpp
+++ b/src/VBox/Runtime/common/crypto/pkix-signature-rsa.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -139,6 +139,8 @@ static struct
 static DECLCALLBACK(int) rtCrPkixSignatureRsa_Init(PCRTCRPKIXSIGNATUREDESC pDesc, void *pvState, void *pvOpaque,
                                                    bool fSigning, PCRTASN1BITSTRING pKey, PCRTASN1DYNTYPE pParams)
 {
+    RT_NOREF_PV(pDesc); RT_NOREF_PV(pvState); RT_NOREF_PV(pvOpaque);
+
     if (pParams)
         return VERR_CR_PKIX_SIGNATURE_TAKES_NO_PARAMETERS;
 
@@ -198,6 +200,7 @@ static DECLCALLBACK(int) rtCrPkixSignatureRsa_Init(PCRTCRPKIXSIGNATUREDESC pDesc
 static DECLCALLBACK(int) rtCrPkixSignatureRsa_Reset(PCRTCRPKIXSIGNATUREDESC pDesc, void *pvState, bool fSigning)
 {
     PRTCRPKIXSIGNATURERSA pThis = (PRTCRPKIXSIGNATURERSA)pvState;
+    RT_NOREF_PV(fSigning); RT_NOREF_PV(pDesc);
     Assert(pThis->fSigning == fSigning); NOREF(pThis);
     return VINF_SUCCESS;
 }
@@ -207,7 +210,8 @@ static DECLCALLBACK(int) rtCrPkixSignatureRsa_Reset(PCRTCRPKIXSIGNATUREDESC pDes
 static DECLCALLBACK(void) rtCrPkixSignatureRsa_Delete(PCRTCRPKIXSIGNATUREDESC pDesc, void *pvState, bool fSigning)
 {
     PRTCRPKIXSIGNATURERSA pThis = (PRTCRPKIXSIGNATURERSA)pvState;
-    Assert(pThis->fSigning == fSigning); NOREF(pThis);
+    RT_NOREF_PV(fSigning); RT_NOREF_PV(pDesc);
+    Assert(pThis->fSigning == fSigning);
 
     RTBigNumDestroy(&pThis->Modulus);
     RTBigNumDestroy(&pThis->Exponent);
@@ -296,6 +300,7 @@ static DECLCALLBACK(int) rtCrPkixSignatureRsa_Verify(PCRTCRPKIXSIGNATUREDESC pDe
                                                      RTCRDIGEST hDigest, void const *pvSignature, size_t cbSignature)
 {
     PRTCRPKIXSIGNATURERSA pThis = (PRTCRPKIXSIGNATURERSA)pvState;
+    RT_NOREF_PV(pDesc);
     Assert(!pThis->fSigning);
     if (cbSignature > sizeof(pThis->Scratch) / 2)
         return VERR_CR_PKIX_SIGNATURE_TOO_LONG;
@@ -385,6 +390,7 @@ static DECLCALLBACK(int) rtCrPkixSignatureRsa_Sign(PCRTCRPKIXSIGNATUREDESC pDesc
                                                    RTCRDIGEST hDigest, void *pvSignature, size_t *pcbSignature)
 {
     PRTCRPKIXSIGNATURERSA pThis = (PRTCRPKIXSIGNATURERSA)pvState;
+    RT_NOREF_PV(pDesc);  RT_NOREF_PV(hDigest); RT_NOREF_PV(pvSignature); RT_NOREF_PV(pcbSignature);
     Assert(pThis->fSigning); NOREF(pThis);
     return VERR_NOT_IMPLEMENTED;
 }
diff --git a/src/VBox/Runtime/common/crypto/pkix-util.cpp b/src/VBox/Runtime/common/crypto/pkix-util.cpp
index d94f2f5..449e576 100644
--- a/src/VBox/Runtime/common/crypto/pkix-util.cpp
+++ b/src/VBox/Runtime/common/crypto/pkix-util.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/pkix-verify.cpp b/src/VBox/Runtime/common/crypto/pkix-verify.cpp
index c0d1a5d..ba537d5 100644
--- a/src/VBox/Runtime/common/crypto/pkix-verify.cpp
+++ b/src/VBox/Runtime/common/crypto/pkix-verify.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/rsa-asn1-decoder.cpp b/src/VBox/Runtime/common/crypto/rsa-asn1-decoder.cpp
index f878034..78fc718 100644
--- a/src/VBox/Runtime/common/crypto/rsa-asn1-decoder.cpp
+++ b/src/VBox/Runtime/common/crypto/rsa-asn1-decoder.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/rsa-core.cpp b/src/VBox/Runtime/common/crypto/rsa-core.cpp
index c58a1a1..1bb1b77 100644
--- a/src/VBox/Runtime/common/crypto/rsa-core.cpp
+++ b/src/VBox/Runtime/common/crypto/rsa-core.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/rsa-init.cpp b/src/VBox/Runtime/common/crypto/rsa-init.cpp
index 7515191..914eb89 100644
--- a/src/VBox/Runtime/common/crypto/rsa-init.cpp
+++ b/src/VBox/Runtime/common/crypto/rsa-init.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/rsa-internal.h b/src/VBox/Runtime/common/crypto/rsa-internal.h
index bd14a83..b8e2092 100644
--- a/src/VBox/Runtime/common/crypto/rsa-internal.h
+++ b/src/VBox/Runtime/common/crypto/rsa-internal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/rsa-sanity.cpp b/src/VBox/Runtime/common/crypto/rsa-sanity.cpp
index ee48b3e..80e6309 100644
--- a/src/VBox/Runtime/common/crypto/rsa-sanity.cpp
+++ b/src/VBox/Runtime/common/crypto/rsa-sanity.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/rsa-template.h b/src/VBox/Runtime/common/crypto/rsa-template.h
index fcf9f0b..4035404 100644
--- a/src/VBox/Runtime/common/crypto/rsa-template.h
+++ b/src/VBox/Runtime/common/crypto/rsa-template.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/spc-asn1-decoder.cpp b/src/VBox/Runtime/common/crypto/spc-asn1-decoder.cpp
index 77d7cde..68cebf7 100644
--- a/src/VBox/Runtime/common/crypto/spc-asn1-decoder.cpp
+++ b/src/VBox/Runtime/common/crypto/spc-asn1-decoder.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -47,6 +47,8 @@ static int rtCrSpcSerializedObject_DecodeMore(PRTASN1CURSOR pCursor, uint32_t fF
                                               PRTCRSPCSERIALIZEDOBJECT pThis, const char *pszErrorTag)
 
 {
+    RT_NOREF_PV(fFlags); RT_NOREF_PV(pszErrorTag);
+
     int rc;
     RTASN1CURSOR SubCursor;
     if (RTUuidCompareStr(pThis->Uuid.Asn1Core.uData.pUuid, RTCRSPCSERIALIZEDOBJECT_UUID_STR) == 0)
diff --git a/src/VBox/Runtime/common/crypto/spc-core.cpp b/src/VBox/Runtime/common/crypto/spc-core.cpp
index c308617..642e68b 100644
--- a/src/VBox/Runtime/common/crypto/spc-core.cpp
+++ b/src/VBox/Runtime/common/crypto/spc-core.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/spc-init.cpp b/src/VBox/Runtime/common/crypto/spc-init.cpp
index 219e76f..303bd5a 100644
--- a/src/VBox/Runtime/common/crypto/spc-init.cpp
+++ b/src/VBox/Runtime/common/crypto/spc-init.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/spc-internal.h b/src/VBox/Runtime/common/crypto/spc-internal.h
index 3d30fd3..5788ba9 100644
--- a/src/VBox/Runtime/common/crypto/spc-internal.h
+++ b/src/VBox/Runtime/common/crypto/spc-internal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/spc-sanity.cpp b/src/VBox/Runtime/common/crypto/spc-sanity.cpp
index 4b2fd33..e2f90dc 100644
--- a/src/VBox/Runtime/common/crypto/spc-sanity.cpp
+++ b/src/VBox/Runtime/common/crypto/spc-sanity.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/spc-template.h b/src/VBox/Runtime/common/crypto/spc-template.h
index 2c57a5b..2849ecf 100644
--- a/src/VBox/Runtime/common/crypto/spc-template.h
+++ b/src/VBox/Runtime/common/crypto/spc-template.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/store-cert-add-basic.cpp b/src/VBox/Runtime/common/crypto/store-cert-add-basic.cpp
index 260de32..ff1bc03 100644
--- a/src/VBox/Runtime/common/crypto/store-cert-add-basic.cpp
+++ b/src/VBox/Runtime/common/crypto/store-cert-add-basic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -81,6 +81,7 @@ static RTCRPEMMARKER const g_aX509CertificateMarkers[3] =
 
 
 
+#ifdef RT_STRICT
 /**
  * Checks if we've found all the certificates already.
  *
@@ -95,6 +96,7 @@ DECLINLINE(bool) rtCrStoreAllDone(bool const *afFound, size_t cWanted)
             return false;
     return true;
 }
+#endif /* RT_STRICT */
 
 
 /**
diff --git a/src/VBox/Runtime/common/crypto/store-inmem.cpp b/src/VBox/Runtime/common/crypto/store-inmem.cpp
index 0f10f5c..619f93e 100644
--- a/src/VBox/Runtime/common/crypto/store-inmem.cpp
+++ b/src/VBox/Runtime/common/crypto/store-inmem.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -227,6 +227,7 @@ static DECLCALLBACK(void) rtCrStoreInMem_DestroyStore(void *pvProvider)
 static DECLCALLBACK(int) rtCrStoreInMem_CertCtxQueryPrivateKey(void *pvProvider, PRTCRCERTCTXINT pCertCtx,
                                                                uint8_t *pbKey, size_t cbKey, size_t *pcbKeyRet)
 {
+    RT_NOREF_PV(pvProvider); RT_NOREF_PV(pCertCtx); RT_NOREF_PV(pbKey); RT_NOREF_PV(cbKey); RT_NOREF_PV(pcbKeyRet);
     //PRTCRSTOREINMEM pThis = (PRTCRSTOREINMEM)pvProvider;
     return VERR_NOT_FOUND;
 }
@@ -235,7 +236,6 @@ static DECLCALLBACK(int) rtCrStoreInMem_CertCtxQueryPrivateKey(void *pvProvider,
 /** @interface_method_impl{RTCRSTOREPROVIDER, pfnCertFindAll} */
 static DECLCALLBACK(int) rtCrStoreInMem_CertFindAll(void *pvProvider, PRTCRSTORECERTSEARCH pSearch)
 {
-    PRTCRSTOREINMEM pThis = (PRTCRSTOREINMEM)pvProvider;
     pSearch->auOpaque[0] = ~(uintptr_t)pvProvider;
     pSearch->auOpaque[1] = 0;
     pSearch->auOpaque[2] = ~(uintptr_t)0;  /* For the front-end API. */
diff --git a/src/VBox/Runtime/common/crypto/store-internal.h b/src/VBox/Runtime/common/crypto/store-internal.h
index 6f1ec26..59ab804 100644
--- a/src/VBox/Runtime/common/crypto/store-internal.h
+++ b/src/VBox/Runtime/common/crypto/store-internal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/store.cpp b/src/VBox/Runtime/common/crypto/store.cpp
index 04dd18d..b49e8ff 100644
--- a/src/VBox/Runtime/common/crypto/store.cpp
+++ b/src/VBox/Runtime/common/crypto/store.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -322,6 +322,7 @@ RTDECL(int) RTCrStoreConvertToOpenSslCertStore(RTCRSTORE hStore, uint32_t fFlags
     PRTCRSTOREINT pThis = (PRTCRSTOREINT)hStore;
     AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
     AssertReturn(pThis->u32Magic == RTCRSTOREINT_MAGIC, VERR_INVALID_HANDLE);
+    RT_NOREF_PV(fFlags);
 
     /*
      * Use the pfnCertFindAll method to add all certificates to the store we're returning.
@@ -375,6 +376,7 @@ RTDECL(int) RTCrStoreConvertToOpenSslCertStack(RTCRSTORE hStore, uint32_t fFlags
     PRTCRSTOREINT pThis = (PRTCRSTOREINT)hStore;
     AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
     AssertReturn(pThis->u32Magic == RTCRSTOREINT_MAGIC, VERR_INVALID_HANDLE);
+    RT_NOREF_PV(fFlags);
 
     /*
      * Use the pfnCertFindAll method to add all certificates to the store we're returning.
diff --git a/src/VBox/Runtime/common/crypto/taf-asn1-decoder.cpp b/src/VBox/Runtime/common/crypto/taf-asn1-decoder.cpp
index 2c0edf9..5cd83b6 100644
--- a/src/VBox/Runtime/common/crypto/taf-asn1-decoder.cpp
+++ b/src/VBox/Runtime/common/crypto/taf-asn1-decoder.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/taf-core.cpp b/src/VBox/Runtime/common/crypto/taf-core.cpp
index 2836a2e..7f89525 100644
--- a/src/VBox/Runtime/common/crypto/taf-core.cpp
+++ b/src/VBox/Runtime/common/crypto/taf-core.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/taf-init.cpp b/src/VBox/Runtime/common/crypto/taf-init.cpp
index c7ac08a..c11371a 100644
--- a/src/VBox/Runtime/common/crypto/taf-init.cpp
+++ b/src/VBox/Runtime/common/crypto/taf-init.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/taf-internal.h b/src/VBox/Runtime/common/crypto/taf-internal.h
index 0020b6b..4fd4490 100644
--- a/src/VBox/Runtime/common/crypto/taf-internal.h
+++ b/src/VBox/Runtime/common/crypto/taf-internal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/taf-sanity.cpp b/src/VBox/Runtime/common/crypto/taf-sanity.cpp
index bb97796..d283e92 100644
--- a/src/VBox/Runtime/common/crypto/taf-sanity.cpp
+++ b/src/VBox/Runtime/common/crypto/taf-sanity.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/taf-template.h b/src/VBox/Runtime/common/crypto/taf-template.h
index 07a25a7..b5907bc 100644
--- a/src/VBox/Runtime/common/crypto/taf-template.h
+++ b/src/VBox/Runtime/common/crypto/taf-template.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/tsp-asn1-decoder.cpp b/src/VBox/Runtime/common/crypto/tsp-asn1-decoder.cpp
index eacd1e1..e5d3298 100644
--- a/src/VBox/Runtime/common/crypto/tsp-asn1-decoder.cpp
+++ b/src/VBox/Runtime/common/crypto/tsp-asn1-decoder.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/tsp-core.cpp b/src/VBox/Runtime/common/crypto/tsp-core.cpp
index b759c93..af23b82 100644
--- a/src/VBox/Runtime/common/crypto/tsp-core.cpp
+++ b/src/VBox/Runtime/common/crypto/tsp-core.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/tsp-init.cpp b/src/VBox/Runtime/common/crypto/tsp-init.cpp
index eb2b721..b6f1f7e 100644
--- a/src/VBox/Runtime/common/crypto/tsp-init.cpp
+++ b/src/VBox/Runtime/common/crypto/tsp-init.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/tsp-internal.h b/src/VBox/Runtime/common/crypto/tsp-internal.h
index 57df4e5..6edb0dd 100644
--- a/src/VBox/Runtime/common/crypto/tsp-internal.h
+++ b/src/VBox/Runtime/common/crypto/tsp-internal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/tsp-sanity.cpp b/src/VBox/Runtime/common/crypto/tsp-sanity.cpp
index 61b819a..9c47feb 100644
--- a/src/VBox/Runtime/common/crypto/tsp-sanity.cpp
+++ b/src/VBox/Runtime/common/crypto/tsp-sanity.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/tsp-template.h b/src/VBox/Runtime/common/crypto/tsp-template.h
index b2a760b..f4dc502 100644
--- a/src/VBox/Runtime/common/crypto/tsp-template.h
+++ b/src/VBox/Runtime/common/crypto/tsp-template.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/x509-asn1-decoder.cpp b/src/VBox/Runtime/common/crypto/x509-asn1-decoder.cpp
index c5bca6e..c74f40a 100644
--- a/src/VBox/Runtime/common/crypto/x509-asn1-decoder.cpp
+++ b/src/VBox/Runtime/common/crypto/x509-asn1-decoder.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -43,6 +43,8 @@
 RTDECL(int) RTCrX509Extension_ExtnValue_DecodeAsn1(PRTASN1CURSOR pCursor, uint32_t fFlags,
                                                    PRTCRX509EXTENSION pThis, const char *pszErrorTag)
 {
+    RT_NOREF_PV(fFlags); RT_NOREF_PV(pszErrorTag);
+
     pThis->enmValue = RTCRX509EXTENSIONVALUE_UNKNOWN;
 
     /*
diff --git a/src/VBox/Runtime/common/crypto/x509-certpaths.cpp b/src/VBox/Runtime/common/crypto/x509-certpaths.cpp
index bb566c6..ddcbee2 100644
--- a/src/VBox/Runtime/common/crypto/x509-certpaths.cpp
+++ b/src/VBox/Runtime/common/crypto/x509-certpaths.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -749,6 +749,8 @@ static PRTCRX509CERTPATHNODE rtCrX509CertPathsGetNextRightUp(PRTCRX509CERTPATHSI
         /* Up. */
         pNode = pParent;
     }
+
+    RT_NOREF_PV(pThis);
 }
 
 
@@ -1136,6 +1138,7 @@ static const char *rtCrX509CertPathsNodeGetSourceName(PRTCRX509CERTPATHNODE pNod
 static void rtCrX509CertPathsDumpOneWorker(PRTCRX509CERTPATHSINT pThis, uint32_t iPath, PRTCRX509CERTPATHNODE pCurLeaf,
                                            uint32_t uVerbosity, PFNRTDUMPPRINTFV pfnPrintfV, void *pvUser)
 {
+    RT_NOREF_PV(pThis);
     rtDumpPrintf(pfnPrintfV, pvUser, "Path #%u: %s, %u deep, rcVerify=%Rrc\n",
                  iPath, RTCRX509CERTPATHNODE_SRC_IS_TRUSTED(pCurLeaf->uSrc) ? "trusted" : "untrusted", pCurLeaf->uDepth,
                  pCurLeaf->rcVerify);
@@ -2652,7 +2655,6 @@ RTDECL(int) RTCrX509CertPathsValidateAll(RTCRX509CERTPATHS hCertPaths, uint32_t
 
     int      rcLastFailure = VINF_SUCCESS;
     uint32_t cValidPaths   = 0;
-    uint32_t iPath         = 0;
     PRTCRX509CERTPATHNODE pCurLeaf;
     RTListForEach(&pThis->LeafList, pCurLeaf, RTCRX509CERTPATHNODE, ChildListOrLeafEntry)
     {
diff --git a/src/VBox/Runtime/common/crypto/x509-core.cpp b/src/VBox/Runtime/common/crypto/x509-core.cpp
index daea1b1..30b4aaf 100644
--- a/src/VBox/Runtime/common/crypto/x509-core.cpp
+++ b/src/VBox/Runtime/common/crypto/x509-core.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/x509-file.cpp b/src/VBox/Runtime/common/crypto/x509-file.cpp
index 190d7cb..0a37edf 100644
--- a/src/VBox/Runtime/common/crypto/x509-file.cpp
+++ b/src/VBox/Runtime/common/crypto/x509-file.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/x509-init.cpp b/src/VBox/Runtime/common/crypto/x509-init.cpp
index 491092e..bf7d184 100644
--- a/src/VBox/Runtime/common/crypto/x509-init.cpp
+++ b/src/VBox/Runtime/common/crypto/x509-init.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/x509-internal.h b/src/VBox/Runtime/common/crypto/x509-internal.h
index 6976252..4a667b0 100644
--- a/src/VBox/Runtime/common/crypto/x509-internal.h
+++ b/src/VBox/Runtime/common/crypto/x509-internal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/x509-sanity.cpp b/src/VBox/Runtime/common/crypto/x509-sanity.cpp
index 4f1b37e..caf0e6e 100644
--- a/src/VBox/Runtime/common/crypto/x509-sanity.cpp
+++ b/src/VBox/Runtime/common/crypto/x509-sanity.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -40,6 +40,8 @@
 
 static int rtCrX509Validity_CheckSanityExtra(PCRTCRX509VALIDITY pThis, uint32_t fFlags, PRTERRINFO pErrInfo, const char *pszErrorTag)
 {
+    RT_NOREF_PV(fFlags);
+
     if (RTAsn1Time_Compare(&pThis->NotBefore, &pThis->NotAfter) > 0)
         return RTErrInfoSetF(pErrInfo, VERR_CR_X509_VALIDITY_SWAPPED, "%s: NotBefore is after NotAfter", pszErrorTag);
     /** @todo check tag constraints? */
@@ -49,6 +51,8 @@ static int rtCrX509Validity_CheckSanityExtra(PCRTCRX509VALIDITY pThis, uint32_t
 
 static int rtCrX509Name_CheckSanityExtra(PCRTCRX509NAME pThis, uint32_t fFlags, PRTERRINFO pErrInfo, const char *pszErrorTag)
 {
+    RT_NOREF_PV(fFlags);
+
     if (pThis->cItems == 0)
         return RTErrInfoSetF(pErrInfo, VERR_CR_X509_NAME_EMPTY_SET, "%s: Has no components.", pszErrorTag);
 
@@ -93,6 +97,7 @@ static int rtCrX509Name_CheckSanityExtra(PCRTCRX509NAME pThis, uint32_t fFlags,
 static int rtCrX509SubjectPublicKeyInfo_CheckSanityExtra(PCRTCRX509SUBJECTPUBLICKEYINFO pThis, uint32_t fFlags,
                                                          PRTERRINFO pErrInfo, const char *pszErrorTag)
 {
+    RT_NOREF_PV(fFlags);
     if (pThis->SubjectPublicKey.cBits <= 32)
         return RTErrInfoSetF(pErrInfo, VERR_CR_X509_PUBLIC_KEY_TOO_SMALL,
                              "%s: SubjectPublicKey is too small, only %u bits", pszErrorTag, pThis->SubjectPublicKey.cBits);
@@ -103,6 +108,8 @@ static int rtCrX509SubjectPublicKeyInfo_CheckSanityExtra(PCRTCRX509SUBJECTPUBLIC
 static int rtCrX509TbsCertificate_CheckSanityExtra(PCRTCRX509TBSCERTIFICATE pThis, uint32_t fFlags,
                                                    PRTERRINFO pErrInfo, const char *pszErrorTag)
 {
+    RT_NOREF_PV(fFlags);
+
     if (   RTAsn1Integer_IsPresent(&pThis->T0.Version)
         && RTAsn1Integer_UnsignedCompareWithU32(&pThis->T0.Version, RTCRX509TBSCERTIFICATE_V1) != 0
         && RTAsn1Integer_UnsignedCompareWithU32(&pThis->T0.Version, RTCRX509TBSCERTIFICATE_V2) != 0
@@ -133,6 +140,8 @@ static int rtCrX509TbsCertificate_CheckSanityExtra(PCRTCRX509TBSCERTIFICATE pThi
 static int rtCrX509Certificate_CheckSanityExtra(PCRTCRX509CERTIFICATE pThis, uint32_t fFlags,
                                                PRTERRINFO pErrInfo, const char *pszErrorTag)
 {
+    RT_NOREF_PV(fFlags);
+
     if (RTCrX509AlgorithmIdentifier_Compare(&pThis->SignatureAlgorithm, &pThis->TbsCertificate.Signature) != 0)
         return RTErrInfoSetF(pErrInfo, VERR_CR_X509_CERT_TBS_SIGN_ALGO_MISMATCH,
                              "%s: SignatureAlgorithm (%s) does not match TbsCertificate.Signature (%s).", pszErrorTag,
diff --git a/src/VBox/Runtime/common/crypto/x509-template.h b/src/VBox/Runtime/common/crypto/x509-template.h
index b11e812..9ade250 100644
--- a/src/VBox/Runtime/common/crypto/x509-template.h
+++ b/src/VBox/Runtime/common/crypto/x509-template.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/crypto/x509-verify.cpp b/src/VBox/Runtime/common/crypto/x509-verify.cpp
index ae0aa1e..7158884 100644
--- a/src/VBox/Runtime/common/crypto/x509-verify.cpp
+++ b/src/VBox/Runtime/common/crypto/x509-verify.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/dbg/dbg.cpp b/src/VBox/Runtime/common/dbg/dbg.cpp
index 6cdaf69..386f59e 100644
--- a/src/VBox/Runtime/common/dbg/dbg.cpp
+++ b/src/VBox/Runtime/common/dbg/dbg.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/dbg/dbgas.cpp b/src/VBox/Runtime/common/dbg/dbgas.cpp
index 9182c56..92c4d2d 100644
--- a/src/VBox/Runtime/common/dbg/dbgas.cpp
+++ b/src/VBox/Runtime/common/dbg/dbgas.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/dbg/dbgcfg.cpp b/src/VBox/Runtime/common/dbg/dbgcfg.cpp
index 8207627..ca9bf48 100644
--- a/src/VBox/Runtime/common/dbg/dbgcfg.cpp
+++ b/src/VBox/Runtime/common/dbg/dbgcfg.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -739,8 +739,9 @@ static int rtDbgCfgTryDownloadAndOpen(PRTDBGCFGINT pThis, const char *pszServer,
                                       PFNRTDBGCFGOPEN pfnCallback, void *pvUser1, void *pvUser2)
 {
 #ifdef IPRT_WITH_HTTP
-    NOREF(pszUuidMappingSubDir); /** @todo do we bother trying pszUuidMappingSubDir? */
-    NOREF(pszCacheSuffix); /** @todo do we bother trying pszUuidMappingSubDir? */
+    RT_NOREF_PV(pszUuidMappingSubDir); /** @todo do we bother trying pszUuidMappingSubDir? */
+    RT_NOREF_PV(pszCacheSuffix); /** @todo do we bother trying pszUuidMappingSubDir? */
+    RT_NOREF_PV(fFlags);
 
     if (pThis->fFlags & RTDBGCFG_FLAGS_NO_SYM_SRV)
         return VWRN_NOT_FOUND;
@@ -869,6 +870,9 @@ static int rtDbgCfgTryDownloadAndOpen(PRTDBGCFGINT pThis, const char *pszServer,
     return rc;
 
 #else  /* !IPRT_WITH_HTTP */
+    RT_NOREF_PV(pThis); RT_NOREF_PV(pszServer); RT_NOREF_PV(pszPath); RT_NOREF_PV(pszCacheSubDir);
+    RT_NOREF_PV(pszUuidMappingSubDir); RT_NOREF_PV(pSplitFn); RT_NOREF_PV(pszCacheSuffix); RT_NOREF_PV(fFlags);
+    RT_NOREF_PV(pfnCallback); RT_NOREF_PV(pvUser1); RT_NOREF_PV(pvUser2);
     return VWRN_NOT_FOUND;
 #endif /* !IPRT_WITH_HTTP */
 }
@@ -877,6 +881,9 @@ static int rtDbgCfgTryDownloadAndOpen(PRTDBGCFGINT pThis, const char *pszServer,
 static int rtDbgCfgCopyFileToCache(PRTDBGCFGINT pThis, char const *pszSrc, const char *pchCache, size_t cchCache,
                                    const char *pszCacheSubDir, const char *pszUuidMappingSubDir, PRTPATHSPLIT pSplitFn)
 {
+    RT_NOREF_PV(pThis); RT_NOREF_PV(pszSrc); RT_NOREF_PV(pchCache); RT_NOREF_PV(cchCache);
+    RT_NOREF_PV(pszUuidMappingSubDir); RT_NOREF_PV(pSplitFn);
+
     if (!pszCacheSubDir || !*pszCacheSubDir)
         return VINF_SUCCESS;
 
@@ -1314,6 +1321,7 @@ RTDECL(int) RTDbgCfgOpenPdb70(RTDBGCFG hDbgCfg, const char *pszFilename, PCRTUUI
 RTDECL(int) RTDbgCfgOpenPdb20(RTDBGCFG hDbgCfg, const char *pszFilename, uint32_t cbImage, uint32_t uTimestamp, uint32_t uAge,
                               PFNRTDBGCFGOPEN pfnCallback, void *pvUser1, void *pvUser2)
 {
+    RT_NOREF_PV(cbImage);
     /** @todo test this! */
     char szSubDir[32];
     RTStrPrintf(szSubDir, sizeof(szSubDir), "%08X%x", uTimestamp, uAge);
@@ -1400,7 +1408,6 @@ static int rtDbgCfgTryOpenDsymBundleInDir(PRTDBGCFGINT pThis, char *pszPath, PRT
                 rc2 = VERR_FILE_NOT_FOUND;
         if (RT_SUCCESS(rc2))
         {
-            size_t cchCurPath = cchPath + strlen(&pszPath[cchPath]);
             for (uint32_t iSuffix = 0; papszSuffixes[iSuffix]; iSuffix++)
             {
                 if (   !rtDbgCfgIsDirAndFixCase2(pszPath, pszName, papszSuffixes[iSuffix], fCaseInsensitive)
@@ -1865,6 +1872,8 @@ static void rtDbgCfgFreeStrList(PRTLISTANCHOR pList)
 static int rtDbgCfgChangeStringList(PRTDBGCFGINT pThis, RTDBGCFGOP enmOp, const char *pszValue, bool fPaths,
                                     PRTLISTANCHOR pList)
 {
+    RT_NOREF_PV(pThis); RT_NOREF_PV(fPaths);
+
     if (enmOp == RTDBGCFGOP_SET)
         rtDbgCfgFreeStrList(pList);
 
@@ -1939,8 +1948,9 @@ static int rtDbgCfgChangeStringList(PRTDBGCFGINT pThis, RTDBGCFGOP enmOp, const
 static int rtDbgCfgChangeStringU64(PRTDBGCFGINT pThis, RTDBGCFGOP enmOp, const char *pszValue,
                                    PCRTDBGCFGU64MNEMONIC paMnemonics, uint64_t *puValue)
 {
-    uint64_t    uNew = enmOp == RTDBGCFGOP_SET ? 0 : *puValue;
+    RT_NOREF_PV(pThis);
 
+    uint64_t    uNew = enmOp == RTDBGCFGOP_SET ? 0 : *puValue;
     char        ch;
     while ((ch = *pszValue))
     {
@@ -2095,6 +2105,8 @@ RTDECL(int) RTDbgCfgChangeUInt(RTDBGCFG hDbgCfg, RTDBGCFGPROP enmProp, RTDBGCFGO
 static int rtDbgCfgQueryStringList(RTDBGCFG hDbgCfg, PRTLISTANCHOR pList,
                                    char *pszValue, size_t cbValue)
 {
+    RT_NOREF_PV(hDbgCfg);
+
     /*
      * Check the length first.
      */
@@ -2135,6 +2147,8 @@ static int rtDbgCfgQueryStringList(RTDBGCFG hDbgCfg, PRTLISTANCHOR pList,
 static int rtDbgCfgQueryStringU64(RTDBGCFG hDbgCfg, uint64_t uValue, PCRTDBGCFGU64MNEMONIC paMnemonics,
                                   char *pszValue, size_t cbValue)
 {
+    RT_NOREF_PV(hDbgCfg);
+
     /*
      * If no mnemonics, just return the hex value.
      */
diff --git a/src/VBox/Runtime/common/dbg/dbgmod.cpp b/src/VBox/Runtime/common/dbg/dbgmod.cpp
index 63c18a6..45bd5c6 100644
--- a/src/VBox/Runtime/common/dbg/dbgmod.cpp
+++ b/src/VBox/Runtime/common/dbg/dbgmod.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -368,6 +368,8 @@ RT_EXPORT_SYMBOL(RTDbgModCreate);
 RTDECL(int) RTDbgModCreateFromMap(PRTDBGMOD phDbgMod, const char *pszFilename, const char *pszName,
                                   RTUINTPTR uSubtrahend, RTDBGCFG hDbgCfg)
 {
+    RT_NOREF_PV(hDbgCfg);
+
     /*
      * Input validation and lazy initialization.
      */
@@ -504,7 +506,8 @@ static DECLCALLBACK(int) rtDbgModExtDbgInfoOpenCallback(RTDBGCFG hDbgCfg, const
 {
     PRTDBGMODINT        pDbgMod   = (PRTDBGMODINT)pvUser1;
     PCRTLDRDBGINFO      pDbgInfo  = (PCRTLDRDBGINFO)pvUser2;
-    NOREF(pDbgInfo); /** @todo consider a more direct search for a interpreter. */
+    RT_NOREF_PV(pDbgInfo); /** @todo consider a more direct search for a interpreter. */
+    RT_NOREF_PV(hDbgCfg);
 
     Assert(!pDbgMod->pDbgVt);
     Assert(!pDbgMod->pvDbgPriv);
@@ -562,6 +565,7 @@ static DECLCALLBACK(int)
 rtDbgModOpenDebugInfoExternalToImageCallback(RTLDRMOD hLdrMod, PCRTLDRDBGINFO pDbgInfo, void *pvUser)
 {
     RTDBGMODOPENDIETI *pArgs = (RTDBGMODOPENDIETI *)pvUser;
+    RT_NOREF_PV(hLdrMod);
 
     Assert(pDbgInfo->enmType > RTLDRDBGINFOTYPE_INVALID && pDbgInfo->enmType < RTLDRDBGINFOTYPE_END);
     const char *pszExtFile = pDbgInfo->pszExtFile;
@@ -674,7 +678,8 @@ static int rtDbgModOpenDebugInfoExternalToImage(PRTDBGMODINT pDbgMod, RTDBGCFG h
 static DECLCALLBACK(int) rtDbgModExtDbgInfoOpenCallback2(RTDBGCFG hDbgCfg, const char *pszFilename, void *pvUser1, void *pvUser2)
 {
     PRTDBGMODINT        pDbgMod   = (PRTDBGMODINT)pvUser1;
-    NOREF(pvUser2); /** @todo image matching string or smth. */
+    RT_NOREF_PV(pvUser2); /** @todo image matching string or smth. */
+    RT_NOREF_PV(hDbgCfg);
 
     Assert(!pDbgMod->pDbgVt);
     Assert(!pDbgMod->pvDbgPriv);
@@ -944,6 +949,7 @@ static DECLCALLBACK(int) rtDbgModFromPeImageOpenCallback(RTDBGCFG hDbgCfg, const
     PRTDBGMODINT        pDbgMod   = (PRTDBGMODINT)pvUser1;
     PRTDBGMODDEFERRED   pDeferred = (PRTDBGMODDEFERRED)pvUser2;
     LogFlow(("rtDbgModFromPeImageOpenCallback: %s\n", pszFilename));
+    RT_NOREF_PV(hDbgCfg);
 
     Assert(pDbgMod->pImgVt == NULL);
     Assert(pDbgMod->pvImgPriv == NULL);
@@ -1211,6 +1217,7 @@ rtDbgModFromMachOImageOpenDsymMachOCallback(RTDBGCFG hDbgCfg, const char *pszFil
 {
     PRTDBGMODINT        pDbgMod = (PRTDBGMODINT)pvUser1;
     PCRTDBGMODMACHOARGS pArgs   = (PCRTDBGMODMACHOARGS)pvUser2;
+    RT_NOREF_PV(hDbgCfg);
 
     Assert(!pDbgMod->pDbgVt);
     Assert(!pDbgMod->pvDbgPriv);
@@ -1330,6 +1337,8 @@ rtDbgModFromMachOImageOpenDsymMachOCallback(RTDBGCFG hDbgCfg, const char *pszFil
 static int rtDbgModFromMachOImageWorker(PRTDBGMODINT pDbgMod, RTLDRARCH enmArch, uint32_t cbImage,
                                         uint32_t cSegs, PCRTDBGSEGMENT paSegs, PCRTUUID pUuid, RTDBGCFG hDbgCfg)
 {
+    RT_NOREF_PV(cbImage); RT_NOREF_PV(cSegs); RT_NOREF_PV(paSegs);
+
     RTDBGMODMACHOARGS Args;
     Args.enmArch    = enmArch;
     Args.pUuid      = pUuid && RTUuidIsNull(pUuid) ? pUuid : NULL;
diff --git a/src/VBox/Runtime/common/dbg/dbgmodcodeview.cpp b/src/VBox/Runtime/common/dbg/dbgmodcodeview.cpp
index 6dedcfb..f0aafb3 100644
--- a/src/VBox/Runtime/common/dbg/dbgmodcodeview.cpp
+++ b/src/VBox/Runtime/common/dbg/dbgmodcodeview.cpp
@@ -19,7 +19,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -277,6 +277,7 @@ static int rtDbgModCvReadAtAlloc(PRTDBGMODCV pThis, uint32_t off, void **ppvBuf,
 }
 
 
+#ifdef LOG_ENABLED
 /**
  * Gets a name string for a subsection type.
  *
@@ -324,8 +325,10 @@ static const char *rtDbgModCvGetSubSectionName(uint16_t uSubSectType)
     RTStrPrintf(s_sz, sizeof(s_sz), "Unknown%#x", uSubSectType);
     return s_sz;
 }
+#endif /* LOG_ENABLED */
 
 
+#ifdef LOG_ENABLED
 /**
  * Gets a name string for a symbol type.
  *
@@ -336,7 +339,7 @@ static const char *rtDbgModCvSsSymTypeName(RTCVSYMTYPE enmSymType)
 {
     switch (enmSymType)
     {
-#define CASE_RET_STR(Name)  case kCvSymType_##Name: return #Name;
+# define CASE_RET_STR(Name)  case kCvSymType_##Name: return #Name;
         CASE_RET_STR(Compile);
         CASE_RET_STR(Register);
         CASE_RET_STR(Constant);
@@ -445,6 +448,7 @@ static const char *rtDbgModCvSsSymTypeName(RTCVSYMTYPE enmSymType)
     }
     return "<unknown type>";
 }
+#endif /* LOG_ENABLED */
 
 
 /**
@@ -577,6 +581,7 @@ DECLINLINE(int) rtDbgModCvAdjustSegAndOffset(PRTDBGMODCV pThis, uint32_t *piSeg,
 static int rtDbgModCvAddSymbol(PRTDBGMODCV pThis, uint32_t iSeg, uint64_t off, const char *pchName,
                                uint32_t cchName, uint32_t fFlags, uint32_t cbSym)
 {
+    RT_NOREF_PV(fFlags);
     const char *pszName = rtDbgModCvAddSanitizedStringToCache(pchName, cchName);
     int rc;
     if (pszName)
@@ -663,6 +668,8 @@ static int rtDbgModCvSsProcessV4PlusSymTab(PRTDBGMODCV pThis, void const *pvSymT
     RTCPTRUNION uCursor;
     uCursor.pv = pvSymTab;
 
+    RT_NOREF_PV(fFlags);
+
     while (cbSymTab > 0 && RT_SUCCESS(rc))
     {
         uint8_t const * const pbRecStart = uCursor.pu8;
@@ -738,7 +745,7 @@ static int rtDbgModCvSsProcessV4PlusSymTab(PRTDBGMODCV pThis, void const *pvSymT
                     /*uint32_t uParent       =*/ *uCursor.pu32++;
                     /*uint32_t uEnd          =*/ *uCursor.pu32++;
                     /*uint32_t uNext         =*/ *uCursor.pu32++;
-                    uint32_t cbProc        = *uCursor.pu32++;
+                    /*uint32_t cbProc        =*/ *uCursor.pu32++;
                     /*uint32_t offDebugStart =*/ *uCursor.pu32++;
                     /*uint32_t offDebugEnd   =*/ *uCursor.pu32++;
                     uint32_t off           = *uCursor.pu32++;
@@ -822,6 +829,8 @@ static int rtDbgModCvSsProcessV4PlusSymTab(PRTDBGMODCV pThis, void const *pvSymT
  */
 static int rtDbgModCvSsProcessV8SrcStrings(PRTDBGMODCV pThis, void const *pvSrcStrings, size_t cbSrcStrings, uint32_t fFlags)
 {
+    RT_NOREF_PV(fFlags);
+
     if (pThis->cbSrcStrings)
         Log(("\n!!More than one source file string table for this module!!\n\n"));
 
@@ -867,6 +876,8 @@ static int rtDbgModCvSsProcessV8SrcStrings(PRTDBGMODCV pThis, void const *pvSrcS
  */
 static int rtDbgModCvSsProcessV8SrcInfo(PRTDBGMODCV pThis, void const *pvSrcInfo, size_t cbSrcInfo, uint32_t fFlags)
 {
+    RT_NOREF_PV(fFlags);
+
     if (pThis->cbSrcInfo)
         Log(("\n!!More than one source file info table for this module!!\n\n"));
 
@@ -898,6 +909,8 @@ static int rtDbgModCvSsProcessV8SrcInfo(PRTDBGMODCV pThis, void const *pvSrcInfo
  */
 static int rtDbgModCvSsProcessV8SectLines(PRTDBGMODCV pThis, void const *pvSectLines, size_t cbSectLines, uint32_t fFlags)
 {
+    RT_NOREF_PV(fFlags);
+
     /*
      * Starts with header.
      */
@@ -1028,6 +1041,7 @@ static int rtDbgModCvSsProcessV8SymTab(PRTDBGMODCV pThis, void const *pvSymTab,
         while (off + 4 <= pThis->cbSrcInfo)
         {
             PCRTCV8SRCINFO pSrcInfo = (PCRTCV8SRCINFO)&pThis->pbSrcInfo[off];
+#ifdef LOG_ENABLED
             const char    *pszName  = pSrcInfo->offSourceName < pThis->cbSrcStrings
                                     ? &pThis->pchSrcStrings[pSrcInfo->offSourceName] : "out-of-bounds.c!";
             if (pSrcInfo->uDigestType == RTCV8SRCINFO_DIGEST_TYPE_MD5)
@@ -1036,6 +1050,7 @@ static int rtDbgModCvSsProcessV8SymTab(PRTDBGMODCV pThis, void const *pvSymTab,
                 Log3(("    %010zx #%03zu: <none> %#x=%s\n", off, iFile, pSrcInfo->offSourceName, pszName));
             else
                 Log3(("    %010zx #%03zu: !%#x! %#x=%s\n", off, iFile, pSrcInfo->uDigestType, pSrcInfo->offSourceName, pszName));
+#endif
             off += pSrcInfo->uDigestType == RTCV8SRCINFO_DIGEST_TYPE_MD5 ? sizeof(*pSrcInfo) : 8;
             iFile++;
         }
@@ -1091,6 +1106,7 @@ static DECLCALLBACK(int)
 rtDbgModCvSs_GlobalPub_GlobalSym_StaticSym(PRTDBGMODCV pThis, void const *pvSubSect, size_t cbSubSect, PCRTCVDIRENT32 pDirEnt)
 {
     PCRTCVGLOBALSYMTABHDR pHdr = (PCRTCVGLOBALSYMTABHDR)pvSubSect;
+    RT_NOREF_PV(pDirEnt);
 
     /*
      * Quick data validation.
@@ -1117,11 +1133,13 @@ rtDbgModCvSs_GlobalPub_GlobalSym_StaticSym(PRTDBGMODCV pThis, void const *pvSubS
 static DECLCALLBACK(int)
 rtDbgModCvSs_Module(PRTDBGMODCV pThis, void const *pvSubSect, size_t cbSubSect, PCRTCVDIRENT32 pDirEnt)
 {
+    RT_NOREF_PV(pDirEnt);
+
     RTCPTRUNION uCursor;
     uCursor.pv = pvSubSect;
     RTDBGMODCV_CHECK_NOMSG_RET_BF(cbSubSect >= 2 + 2 + 2 + 2 + 0 + 1);
-    uint16_t iOverlay = *uCursor.pu16++;
-    uint16_t iLib     = *uCursor.pu16++;
+    uint16_t iOverlay = *uCursor.pu16++; NOREF(iOverlay);
+    uint16_t iLib     = *uCursor.pu16++; NOREF(iLib);
     uint16_t cSegs    = *uCursor.pu16++;
     pThis->uCurStyle  = *uCursor.pu16++;
     if (pThis->uCurStyle == 0)
@@ -1132,14 +1150,18 @@ rtDbgModCvSs_Module(PRTDBGMODCV pThis, void const *pvSubSect, size_t cbSubSect,
     uint8_t cchName   = uCursor.pu8[cSegs * 12];
     RTDBGMODCV_CHECK_NOMSG_RET_BF(cbSubSect >= 2 + 2 + 2 + 2 + cSegs * 12U + 1 + cchName);
 
+#ifdef LOG_ENABLED
     const char *pchName = (const char *)&uCursor.pu8[cSegs * 12 + 1];
     Log2(("RTDbgModCv: Module: iOverlay=%#x iLib=%#x cSegs=%#x Style=%c%c (%#x) %.*s\n", iOverlay, iLib, cSegs,
           RT_BYTE1(pThis->uCurStyle), RT_BYTE2(pThis->uCurStyle), pThis->uCurStyle, cchName, pchName));
+#endif
     RTDBGMODCV_CHECK_NOMSG_RET_BF(pThis->uCurStyle == RT_MAKE_U16('C', 'V'));
 
+#ifdef LOG_ENABLED
     PCRTCVMODSEGINFO32 paSegs = (PCRTCVMODSEGINFO32)uCursor.pv;
     for (uint16_t iSeg = 0; iSeg < cSegs; iSeg++)
         Log2(("    #%02u: %04x:%08x LB %08x\n", iSeg, paSegs[iSeg].iSeg, paSegs[iSeg].off, paSegs[iSeg].cb));
+#endif
 
     return VINF_SUCCESS;
 }
@@ -1151,6 +1173,7 @@ rtDbgModCvSs_Module(PRTDBGMODCV pThis, void const *pvSubSect, size_t cbSubSect,
 static DECLCALLBACK(int)
 rtDbgModCvSs_Symbols_PublicSym_AlignSym(PRTDBGMODCV pThis, void const *pvSubSect, size_t cbSubSect, PCRTCVDIRENT32 pDirEnt)
 {
+    RT_NOREF_PV(pDirEnt);
     RTDBGMODCV_CHECK_NOMSG_RET_BF(pThis->uCurStyle == RT_MAKE_U16('C', 'V'));
     RTDBGMODCV_CHECK_NOMSG_RET_BF(cbSubSect >= 8);
 
@@ -1169,6 +1192,7 @@ rtDbgModCvSs_Symbols_PublicSym_AlignSym(PRTDBGMODCV pThis, void const *pvSubSect
 static DECLCALLBACK(int)
 rtDbgModCvSs_SrcModule(PRTDBGMODCV pThis, void const *pvSubSect, size_t cbSubSect, PCRTCVDIRENT32 pDirEnt)
 {
+    RT_NOREF_PV(pDirEnt);
     Log(("rtDbgModCvSs_SrcModule: uCurStyle=%#x\n%.*Rhxd\n", pThis->uCurStyle, cbSubSect, pvSubSect));
 
     /* Check the header. */
@@ -1180,6 +1204,7 @@ rtDbgModCvSs_SrcModule(PRTDBGMODCV pThis, void const *pvSubSect, size_t cbSubSec
                  + pHdr->cSegs * sizeof(uint16_t);
     Log2(("RTDbgModCv: SrcModule: cFiles=%u cSegs=%u\n", pHdr->cFiles, pHdr->cFiles));
     RTDBGMODCV_CHECK_RET_BF(cbSubSect >= cbHdr, ("cbSubSect=%#x cbHdr=%zx\n", cbSubSect, cbHdr));
+#ifdef LOG_ENABLED
     if (LogIs2Enabled())
     {
         for (uint32_t i = 0; i < pHdr->cFiles; i++)
@@ -1189,6 +1214,7 @@ rtDbgModCvSs_SrcModule(PRTDBGMODCV pThis, void const *pvSubSect, size_t cbSubSec
         for (uint32_t i = 0; i < pHdr->cSegs; i++)
             Log2(("RTDbgModCv:   seg #%u: %#010x-%#010x\n", paidxSegs[i], paSegRanges[i].offStart, paSegRanges[i].offEnd));
     }
+#endif
 
     /*
      * Work over the source files.
@@ -1332,7 +1358,6 @@ static int rtDbgModCvLoadSegmentMap(PRTDBGMODCV pThis)
     {
         if (i == pHdr->cLogSegs)
             Log2(("Group/Physical descriptors: %u\n", pHdr->cSegs - pHdr->cLogSegs));
-        uint16_t idx = i < pHdr->cLogSegs ? i : i - pHdr->cLogSegs;
         char szFlags[16];
         memset(szFlags, '-', sizeof(szFlags));
         if (paDescs[i].fFlags & RTCVSEGMAPDESC_F_READ)
@@ -1353,8 +1378,8 @@ static int rtDbgModCvLoadSegmentMap(PRTDBGMODCV pThis)
         if (paDescs[i].fFlags & RTCVSEGMAPDESC_F_RESERVED)
             szFlags[8]  = '!', szFlags[9] = '\0';
         Log2(("    #%02u: %#010x LB %#010x flags=%#06x ovl=%#06x group=%#06x frame=%#06x iSegName=%#06x iClassName=%#06x %s\n",
-              idx, paDescs[i].off, paDescs[i].cb, paDescs[i].fFlags, paDescs[i].iOverlay, paDescs[i].iGroup,
-              paDescs[i].iFrame, paDescs[i].offSegName, paDescs[i].offClassName, szFlags));
+              i < pHdr->cLogSegs ? i : i - pHdr->cLogSegs, paDescs[i].off, paDescs[i].cb, paDescs[i].fFlags, paDescs[i].iOverlay,
+              paDescs[i].iGroup, paDescs[i].iFrame, paDescs[i].offSegName, paDescs[i].offClassName, szFlags));
 
         RTDBGMODCV_CHECK_NOMSG_RET_BF(paDescs[i].offSegName == UINT16_MAX || paDescs[i].offSegName < pThis->cbSegNames);
         RTDBGMODCV_CHECK_NOMSG_RET_BF(paDescs[i].offClassName == UINT16_MAX || paDescs[i].offClassName < pThis->cbSegNames);
@@ -1612,7 +1637,7 @@ static int rtDbgModCvLoadSegmentMap(PRTDBGMODCV pThis)
     uint16_t iSeg = iSeg0 + (cbGroup0 > 0); /** @todo probably wrong... */
     for (i = 0; i < pHdr->cSegs; i++)
         if (paDescs[i].fFlags & RTCVSEGMAPDESC_F_ABS)
-            paDescs[i].iGroup = (uint16_t)RTDBGSEGIDX_ABS;
+            paDescs[i].iGroup = (uint16_t)(RTDBGSEGIDX_ABS & UINT16_MAX);
         else if ((paDescs[i].fFlags & RTCVSEGMAPDESC_F_GROUP) || fNoGroups)
             paDescs[i].iGroup = iSeg++;
 
@@ -1648,6 +1673,8 @@ static DECLCALLBACK(int) rtDbgModCvDirEntCmp(void const *pvElement1, void const
         return -1;
     if (pEntry1->uSubSectType > pEntry2->uSubSectType)
         return 1;
+
+    RT_NOREF_PV(pvUser);
     return 0;
 }
 
@@ -2044,6 +2071,7 @@ static int rtDbgModCvLoadCodeViewInfo(PRTDBGMODCV pThis)
  *
  */
 
+#ifdef LOG_ENABLED
 static const char *rtDbgModCvGetCoffStorageClassName(uint8_t bStorageClass)
 {
     switch (bStorageClass)
@@ -2082,6 +2110,7 @@ static const char *rtDbgModCvGetCoffStorageClassName(uint8_t bStorageClass)
     RTStrPrintf(s_szName, sizeof(s_szName), "Unknown%#04x", bStorageClass);
     return s_szName;
 }
+#endif /* LOG_ENABLED */
 
 
 /**
@@ -2096,6 +2125,7 @@ static const char *rtDbgModCvGetCoffStorageClassName(uint8_t bStorageClass)
 static void rtDbgModCvAddCoffLineNumbers(PRTDBGMODCV pThis, const char *pszFile, uint32_t iSection,
                                          PCIMAGE_LINENUMBER paLines, uint32_t cLines)
 {
+    RT_NOREF_PV(iSection);
     Log4(("Adding %u line numbers in section #%u  for %s\n", cLines, iSection, pszFile));
     PCIMAGE_LINENUMBER pCur = paLines;
     while (cLines-- > 0)
@@ -2103,7 +2133,7 @@ static void rtDbgModCvAddCoffLineNumbers(PRTDBGMODCV pThis, const char *pszFile,
         if (pCur->Linenumber)
         {
             int rc = RTDbgModLineAdd(pThis->hCnt, pszFile, pCur->Linenumber, RTDBGSEGIDX_RVA, pCur->Type.VirtualAddress, NULL);
-            Log4(("    %#010x: %u  [%Rrc]\n", pCur->Type.VirtualAddress, pCur->Linenumber, rc));
+            Log4(("    %#010x: %u  [%Rrc]\n", pCur->Type.VirtualAddress, pCur->Linenumber, rc)); NOREF(rc);
         }
         pCur++;
     }
@@ -2425,7 +2455,7 @@ static DECLCALLBACK(int) rtDbgModCv_SymbolByName(PRTDBGMODINT pMod, const char *
                                                     PRTDBGSYMBOL pSymInfo)
 {
     PRTDBGMODCV pThis = (PRTDBGMODCV)pMod->pvDbgPriv;
-    Assert(!pszSymbol[cchSymbol]);
+    Assert(!pszSymbol[cchSymbol]); RT_NOREF_PV(cchSymbol);
     return RTDbgModSymbolByName(pThis->hCnt, pszSymbol/*, cchSymbol*/, pSymInfo);
 }
 
@@ -2558,6 +2588,8 @@ static DECLCALLBACK(int) rtDbgModCvAddSegmentsCallback(RTLDRMOD hLdrMod, PCRTLDR
  */
 static int rtDbgModCvAddSegmentsFromDbg(PRTDBGMODCV pThis, PCIMAGE_SEPARATE_DEBUG_HEADER pDbgHdr, const char *pszFilename)
 {
+    RT_NOREF_PV(pszFilename);
+
     /*
      * Validate the header fields a little.
      */
@@ -2727,6 +2759,8 @@ static int rtDbgModCvCreateInstance(PRTDBGMODINT pDbgMod, RTCVFILETYPE enmFileTy
 static int rtDbgModCvProbeCoff(PRTDBGMODINT pDbgMod, RTCVFILETYPE enmFileType, RTFILE hFile,
                                uint32_t off, uint32_t cb, const char *pszFilename)
 {
+    RT_NOREF_PV(pszFilename);
+
     /*
      * Check that there is sufficient data for a header, then read it.
      */
@@ -2820,6 +2854,7 @@ static int rtDbgModCvProbeCommon(PRTDBGMODINT pDbgMod, PRTCVHDR pCvHdr, RTCVFILE
                                  uint32_t off, uint32_t cb, RTLDRARCH enmArch, const char *pszFilename)
 {
     int rc = VERR_DBG_NO_MATCHING_INTERPRETER;
+    RT_NOREF_PV(enmArch); RT_NOREF_PV(pszFilename);
 
     /* Is a codeview format we (wish to) support? */
     if (   pCvHdr->u32Magic == RTCVHDR_MAGIC_NB11
@@ -2864,6 +2899,7 @@ static DECLCALLBACK(int) rtDbgModCvEnumCallback(RTLDRMOD hLdrMod, PCRTLDRDBGINFO
 {
     PRTDBGMODINT pDbgMod = (PRTDBGMODINT)pvUser;
     Assert(!pDbgMod->pvDbgPriv);
+    RT_NOREF_PV(hLdrMod);
 
     /* Skip external files, RTDbgMod will deal with those
        via RTDBGMODINT::pszDbgFile. */
diff --git a/src/VBox/Runtime/common/dbg/dbgmodcontainer.cpp b/src/VBox/Runtime/common/dbg/dbgmodcontainer.cpp
index 7f18094..77dacfc 100644
--- a/src/VBox/Runtime/common/dbg/dbgmodcontainer.cpp
+++ b/src/VBox/Runtime/common/dbg/dbgmodcontainer.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/dbg/dbgmoddbghelp.cpp b/src/VBox/Runtime/common/dbg/dbgmoddbghelp.cpp
index a4d1dc6..6d03a0b 100644
--- a/src/VBox/Runtime/common/dbg/dbgmoddbghelp.cpp
+++ b/src/VBox/Runtime/common/dbg/dbgmoddbghelp.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -42,7 +42,7 @@
 #include <iprt/string.h>
 #include "internal/dbgmod.h"
 
-#include <Windows.h>
+#include <iprt/win/windows.h>
 #include <Dbghelp.h>
 #include <iprt/win/lazy-dbghelp.h>
 
@@ -116,7 +116,7 @@ static DECLCALLBACK(int) rtDbgModDbgHelp_SymbolByName(PRTDBGMODINT pMod, const c
                                                       PRTDBGSYMBOL pSymInfo)
 {
     RTDBGMOD hCnt = (RTDBGMOD)pMod->pvDbgPriv;
-    Assert(!pszSymbol[cchSymbol]);
+    Assert(!pszSymbol[cchSymbol]); RT_NOREF_PV(cchSymbol);
     return RTDbgModSymbolByName(hCnt, pszSymbol/*, cchSymbol*/, pSymInfo);
 }
 
@@ -363,6 +363,7 @@ static int rtDbgModDbgHelpCopySymbols(PRTDBGMODINT pMod, RTDBGMOD hCnt, HANDLE h
 static DECLCALLBACK(int) rtDbgModDbgHelpAddSegmentsCallback(RTLDRMOD hLdrMod, PCRTLDRSEG pSeg, void *pvUser)
 {
     RTDBGMODBGHELPARGS *pArgs = (RTDBGMODBGHELPARGS *)pvUser;
+    RT_NOREF_PV(hLdrMod);
 
     Log(("Segment %.*s: LinkAddress=%#llx RVA=%#llx cb=%#llx\n",
          pSeg->cchName, pSeg->pszName, (uint64_t)pSeg->LinkAddress, (uint64_t)pSeg->RVA, pSeg->cb));
diff --git a/src/VBox/Runtime/common/dbg/dbgmoddeferred.cpp b/src/VBox/Runtime/common/dbg/dbgmoddeferred.cpp
index 809587d..3aef607 100644
--- a/src/VBox/Runtime/common/dbg/dbgmoddeferred.cpp
+++ b/src/VBox/Runtime/common/dbg/dbgmoddeferred.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/dbg/dbgmoddwarf.cpp b/src/VBox/Runtime/common/dbg/dbgmoddwarf.cpp
index dc733d7..3adc09c 100644
--- a/src/VBox/Runtime/common/dbg/dbgmoddwarf.cpp
+++ b/src/VBox/Runtime/common/dbg/dbgmoddwarf.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1030,6 +1030,7 @@ static int rtDwarfInfo_ParseDie(PRTDBGMODDWARF pThis, PRTDWARFDIE pDie, PCRTDWAR
 
 #if defined(LOG_ENABLED) || defined(RT_STRICT)
 
+# if 0 /* unused */
 /**
  * Turns a tag value into a string for logging purposes.
  *
@@ -1049,6 +1050,7 @@ static const char *rtDwarfLog_GetTagName(uint32_t uTag)
     RTStrPrintf(s_szStatic, sizeof(s_szStatic),"DW_TAG_%#x", uTag);
     return s_szStatic;
 }
+# endif
 
 
 /**
@@ -2460,7 +2462,14 @@ static int rtDwarfLine_RunProgram(PRTDWARFLINESTATE pLnState, PRTDWARFCURSOR pCu
                   offOpCode, bLogOpCode, cLineDelta, pLnState->Regs.uLine, cAddressDelta, pLnState->Regs.uAddress,
                   cOpIndexDelta, pLnState->Regs.idxOp));
 
-            rc = rtDwarfLine_AddLine(pLnState, offOpCode);
+            /*
+             * LLVM emits debug info for global constructors (_GLOBAL__I_a) which are not part of source
+             * code but are inserted by the compiler: The resulting line number will be 0
+             * because they are not part of the source file obviously (see https://reviews.llvm.org/rL205999),
+             * so skip adding them when they are encountered.
+             */
+            if (pLnState->Regs.uLine)
+                rc = rtDwarfLine_AddLine(pLnState, offOpCode);
         }
         else
         {
@@ -2471,7 +2480,9 @@ static int rtDwarfLine_RunProgram(PRTDWARFLINESTATE pLnState, PRTDWARFCURSOR pCu
                  */
                 case DW_LNS_copy:
                     Log2(("%08x: DW_LNS_copy\n", offOpCode));
-                    rc = rtDwarfLine_AddLine(pLnState, offOpCode);
+                    /* See the comment about LLVM above. */
+                    if (pLnState->Regs.uLine)
+                        rc = rtDwarfLine_AddLine(pLnState, offOpCode);
                     break;
 
                 case DW_LNS_advance_pc:
@@ -3527,6 +3538,8 @@ static int rtDwarfLoc_Push(PRTDWARFLOCST pLoc, uint64_t uValue)
 
 static int rtDwarfLoc_Evaluate(PRTDWARFLOCST pLoc, void *pvLater, void *pvUser)
 {
+    RT_NOREF_PV(pvLater); RT_NOREF_PV(pvUser);
+
     while (!rtDwarfCursor_IsAtEndOfUnit(&pLoc->Cursor))
     {
         /* Read the next opcode.*/
@@ -4421,7 +4434,7 @@ static DECLCALLBACK(int) rtDwarfSyms_EnumSymbolsCallback(RTLDRMOD hLdrMod, const
                                                          RTLDRADDR Value, void *pvUser)
 {
     PRTDBGMODDWARF pThis = (PRTDBGMODDWARF)pvUser;
-    NOREF(hLdrMod);
+    RT_NOREF_PV(hLdrMod); RT_NOREF_PV(uSymbol);
     Assert(pThis->iWatcomPass != 1);
 
     RTLDRADDR uRva = Value - RTDBGDWARF_SYM_ENUM_BASE_ADDRESS;
@@ -4553,7 +4566,7 @@ static DECLCALLBACK(int) rtDbgModDwarf_SymbolByName(PRTDBGMODINT pMod, const cha
                                                     PRTDBGSYMBOL pSymInfo)
 {
     PRTDBGMODDWARF pThis = (PRTDBGMODDWARF)pMod->pvDbgPriv;
-    Assert(!pszSymbol[cchSymbol]);
+    Assert(!pszSymbol[cchSymbol]); RT_NOREF_PV(cchSymbol);
     return RTDbgModSymbolByName(pThis->hCnt, pszSymbol/*, cchSymbol*/, pSymInfo);
 }
 
@@ -4667,6 +4680,8 @@ static DECLCALLBACK(int) rtDbgModDwarf_Close(PRTDBGMODINT pMod)
 /** @callback_method_impl{FNRTLDRENUMDBG} */
 static DECLCALLBACK(int) rtDbgModDwarfEnumCallback(RTLDRMOD hLdrMod, PCRTLDRDBGINFO pDbgInfo, void *pvUser)
 {
+    RT_NOREF_PV(hLdrMod);
+
     /*
      * Skip stuff we can't handle.
      */
diff --git a/src/VBox/Runtime/common/dbg/dbgmodexports.cpp b/src/VBox/Runtime/common/dbg/dbgmodexports.cpp
index cacd0bf..8c777ec 100644
--- a/src/VBox/Runtime/common/dbg/dbgmodexports.cpp
+++ b/src/VBox/Runtime/common/dbg/dbgmodexports.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/dbg/dbgmodldr.cpp b/src/VBox/Runtime/common/dbg/dbgmodldr.cpp
index a9b9343..a6d9ded 100644
--- a/src/VBox/Runtime/common/dbg/dbgmodldr.cpp
+++ b/src/VBox/Runtime/common/dbg/dbgmodldr.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -88,6 +88,7 @@ static DECLCALLBACK(RTLDRFMT) rtDbgModLdr_GetFormat(PRTDBGMODINT pMod)
 static DECLCALLBACK(int) rtDbgModLdr_ReadAt(PRTDBGMODINT pMod, uint32_t iDbgInfoHint, RTFOFF off, void *pvBuf, size_t cb)
 {
     PRTDBGMODLDR pThis = (PRTDBGMODLDR)pMod->pvImgPriv;
+    RT_NOREF_PV(iDbgInfoHint);
     return rtLdrReadAt(pThis->hLdrMod, pvBuf, UINT32_MAX /** @todo iDbgInfo*/, off, cb);
 }
 
diff --git a/src/VBox/Runtime/common/dbg/dbgmodnm.cpp b/src/VBox/Runtime/common/dbg/dbgmodnm.cpp
index 61015b0..47d0a17 100644
--- a/src/VBox/Runtime/common/dbg/dbgmodnm.cpp
+++ b/src/VBox/Runtime/common/dbg/dbgmodnm.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/dvm/dvm.cpp b/src/VBox/Runtime/common/dvm/dvm.cpp
index 2d21d3d..0ee41b8 100644
--- a/src/VBox/Runtime/common/dvm/dvm.cpp
+++ b/src/VBox/Runtime/common/dvm/dvm.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/dvm/dvmbsdlabel.cpp b/src/VBox/Runtime/common/dvm/dvmbsdlabel.cpp
index d0e9769..c2a8ab1 100644
--- a/src/VBox/Runtime/common/dvm/dvmbsdlabel.cpp
+++ b/src/VBox/Runtime/common/dvm/dvmbsdlabel.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/dvm/dvmgpt.cpp b/src/VBox/Runtime/common/dvm/dvmgpt.cpp
index e00f6a1..0f17689 100644
--- a/src/VBox/Runtime/common/dvm/dvmgpt.cpp
+++ b/src/VBox/Runtime/common/dvm/dvmgpt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -271,7 +271,7 @@ static DECLCALLBACK(int) rtDvmFmtGptOpen(PCRTDVMDISK pDisk, PRTDVMFMT phVolMgrFm
             pThis->HdrRev1.u64LbaBackup           = RT_LE2H_U64(pThis->HdrRev1.u64LbaBackup);
             pThis->HdrRev1.u64LbaFirstPartition   = RT_LE2H_U64(pThis->HdrRev1.u64LbaFirstPartition);
             pThis->HdrRev1.u64LbaLastPartition    = RT_LE2H_U64(pThis->HdrRev1.u64LbaLastPartition);
-            /** @todo: Disk UUID */
+            /** @todo Disk UUID */
             pThis->HdrRev1.u64LbaPartitionEntries = RT_LE2H_U64(pThis->HdrRev1.u64LbaPartitionEntries);
             pThis->HdrRev1.cPartitionEntries      = RT_LE2H_U32(pThis->HdrRev1.cPartitionEntries);
             pThis->HdrRev1.cbPartitionEntry       = RT_LE2H_U32(pThis->HdrRev1.cbPartitionEntry);
@@ -291,7 +291,7 @@ static DECLCALLBACK(int) rtDvmFmtGptOpen(PCRTDVMDISK pDisk, PRTDVMFMT phVolMgrFm
                             if (!RTUuidIsNull(&pThis->paGptEntries[i].UuidType))
                             {
                                 /* Convert to host endianess. */
-                                /** @todo: Uuids */
+                                /** @todo Uuids */
                                 pThis->paGptEntries[i].u64LbaFirst = RT_LE2H_U64(pThis->paGptEntries[i].u64LbaFirst);
                                 pThis->paGptEntries[i].u64LbaLast  = RT_LE2H_U64(pThis->paGptEntries[i].u64LbaLast);
                                 pThis->paGptEntries[i].u64Flags    = RT_LE2H_U64(pThis->paGptEntries[i].u64Flags);
diff --git a/src/VBox/Runtime/common/dvm/dvmmbr.cpp b/src/VBox/Runtime/common/dvm/dvmmbr.cpp
index dd585ff..3d50dc8 100644
--- a/src/VBox/Runtime/common/dvm/dvmmbr.cpp
+++ b/src/VBox/Runtime/common/dvm/dvmmbr.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -215,16 +215,11 @@ static DECLCALLBACK(int) rtDvmFmtMbrQueryRangeUse(RTDVMFMT hVolMgrFmt,
                                                   uint64_t off, uint64_t cbRange,
                                                   bool *pfUsed)
 {
-    PRTDVMFMTINTERNAL pThis = hVolMgrFmt;
-
+    NOREF(hVolMgrFmt);
     NOREF(cbRange);
 
     /* MBR uses the first sector only. */
-    if (off < 512)
-        *pfUsed = true;
-    else
-        *pfUsed = false;
-
+    *pfUsed = off < 512;
     return VINF_SUCCESS;
 }
 
@@ -238,7 +233,7 @@ static DECLCALLBACK(uint32_t) rtDvmFmtMbrGetValidVolumes(RTDVMFMT hVolMgrFmt)
 static DECLCALLBACK(uint32_t) rtDvmFmtMbrGetMaxVolumes(RTDVMFMT hVolMgrFmt)
 {
     NOREF(hVolMgrFmt);
-    return 4; /** @todo: Add support for EBR? */
+    return 4; /** @todo Add support for EBR? */
 }
 
 /**
diff --git a/src/VBox/Runtime/common/dvm/dvmvfs.cpp b/src/VBox/Runtime/common/dvm/dvmvfs.cpp
index 897f7ac..f6e68f4 100644
--- a/src/VBox/Runtime/common/dvm/dvmvfs.cpp
+++ b/src/VBox/Runtime/common/dvm/dvmvfs.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -200,7 +200,7 @@ static DECLCALLBACK(int) rtDvmVfsFile_Write(void *pvThis, RTFOFF off, PCRTSGBUF
 static DECLCALLBACK(int) rtDvmVfsFile_Flush(void *pvThis)
 {
     NOREF(pvThis);
-    return VINF_SUCCESS; /* @todo: Implement missing DVM API. */
+    return VINF_SUCCESS; /** @todo Implement missing DVM API. */
 }
 
 
diff --git a/src/VBox/Runtime/common/err/RTErrConvertFromErrno.cpp b/src/VBox/Runtime/common/err/RTErrConvertFromErrno.cpp
index a631929..8e6e242 100644
--- a/src/VBox/Runtime/common/err/RTErrConvertFromErrno.cpp
+++ b/src/VBox/Runtime/common/err/RTErrConvertFromErrno.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -68,7 +68,7 @@ RTDECL(int)  RTErrConvertFromErrno(unsigned uNativeCode)
         case EIO:               return VERR_DEV_IO_ERROR;
 #endif
 #ifdef ENXIO
-        case ENXIO:             return VERR_DEV_IO_ERROR; /**@todo fix this duplicate error */
+        case ENXIO:             return VERR_DEV_IO_ERROR; /** @todo fix this duplicate error */
 #endif
 #ifdef E2BIG
         case E2BIG:             return VERR_TOO_MUCH_DATA;
@@ -80,7 +80,7 @@ RTDECL(int)  RTErrConvertFromErrno(unsigned uNativeCode)
         case EBADF:             return VERR_INVALID_HANDLE;
 #endif
 #ifdef ECHILD
-        case ECHILD:            return VERR_PROCESS_NOT_FOUND;                  /*  10 */ /**@todo fix duplicate error */
+        case ECHILD:            return VERR_PROCESS_NOT_FOUND;                  /*  10 */ /** @todo fix duplicate error */
 #endif
 #ifdef EAGAIN
         case EAGAIN:            return VERR_TRY_AGAIN;
@@ -89,7 +89,7 @@ RTDECL(int)  RTErrConvertFromErrno(unsigned uNativeCode)
         case ENOMEM:            return VERR_NO_MEMORY;
 #endif
 #ifdef EACCES
-        case EACCES:            return VERR_ACCESS_DENIED; /**@todo fix duplicate error */
+        case EACCES:            return VERR_ACCESS_DENIED; /** @todo fix duplicate error */
 #endif
 #ifdef EFAULT
         case EFAULT:            return VERR_INVALID_POINTER;
@@ -107,7 +107,7 @@ RTDECL(int)  RTErrConvertFromErrno(unsigned uNativeCode)
         case EXDEV:             return VERR_NOT_SAME_DEVICE;
 #endif
 #ifdef ENODEV
-        case ENODEV:            return VERR_NOT_SUPPORTED; /**@todo fix duplicate error */
+        case ENODEV:            return VERR_NOT_SUPPORTED; /** @todo fix duplicate error */
 #endif
 #ifdef ENOTDIR
         case ENOTDIR:           return VERR_PATH_NOT_FOUND;                     /*  20 */
@@ -149,10 +149,10 @@ RTDECL(int)  RTErrConvertFromErrno(unsigned uNativeCode)
         case EPIPE:             return VERR_BROKEN_PIPE;
 #endif
 #ifdef EDOM
-        case EDOM:              return VERR_INVALID_PARAMETER;  /**@todo fix duplicate error */
+        case EDOM:              return VERR_INVALID_PARAMETER;  /** @todo fix duplicate error */
 #endif
 #ifdef ERANGE
-        case ERANGE:            return VERR_INVALID_PARAMETER;  /**@todo fix duplicate error */
+        case ERANGE:            return VERR_INVALID_PARAMETER;  /** @todo fix duplicate error */
 #endif
 #ifdef EDEADLK
         case EDEADLK:           return VERR_DEADLOCK;
@@ -271,13 +271,13 @@ RTDECL(int)  RTErrConvertFromErrno(unsigned uNativeCode)
         //case EBADMSG          74      /* Not a data message */
 #endif
 #ifdef EOVERFLOW
-        case EOVERFLOW:         return VERR_TOO_MUCH_DATA;   /**@todo fix duplicate error */
+        case EOVERFLOW:         return VERR_TOO_MUCH_DATA;   /** @todo fix duplicate error */
 #endif
 #ifdef ENOTUNIQ
         case ENOTUNIQ:          return VERR_NET_NOT_UNIQUE_NAME;
 #endif
 #ifdef EBADFD
-        case EBADFD:            return VERR_INVALID_HANDLE; /**@todo fix duplicate error? */
+        case EBADFD:            return VERR_INVALID_HANDLE; /** @todo fix duplicate error? */
 #endif
 #ifdef EREMCHG
         //case EREMCHG          78      /* Remote address changed */
@@ -301,7 +301,7 @@ RTDECL(int)  RTErrConvertFromErrno(unsigned uNativeCode)
         case EILSEQ:            return VERR_NO_TRANSLATION;
 #endif
 #ifdef ERESTART
-        case ERESTART:          return VERR_INTERRUPTED;/**@todo fix duplicate error?*/
+        case ERESTART:          return VERR_INTERRUPTED;/** @todo fix duplicate error?*/
 #endif
 #ifdef ESTRPIPE
         //case ESTRPIPE 86      /* Streams pipe error */
@@ -412,7 +412,7 @@ RTDECL(int)  RTErrConvertFromErrno(unsigned uNativeCode)
         //case EREMOTEIO        121     /* Remote I/O error */
 #endif
 #ifdef EDQUOT
-        case EDQUOT:            return VERR_DISK_FULL; /**@todo fix duplicate error */
+        case EDQUOT:            return VERR_DISK_FULL; /** @todo fix duplicate error */
 #endif
 #ifdef ENOMEDIUM
         case ENOMEDIUM:         return VERR_MEDIA_NOT_PRESENT;
diff --git a/src/VBox/Runtime/common/err/RTErrConvertToErrno.cpp b/src/VBox/Runtime/common/err/RTErrConvertToErrno.cpp
index a9d1430..ba93173 100644
--- a/src/VBox/Runtime/common/err/RTErrConvertToErrno.cpp
+++ b/src/VBox/Runtime/common/err/RTErrConvertToErrno.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/err/errinfo-alloc.cpp b/src/VBox/Runtime/common/err/errinfo-alloc.cpp
index c3518bb..d0b269e 100644
--- a/src/VBox/Runtime/common/err/errinfo-alloc.cpp
+++ b/src/VBox/Runtime/common/err/errinfo-alloc.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/err/errinfo.cpp b/src/VBox/Runtime/common/err/errinfo.cpp
index 7400ce0..3df0f7c 100644
--- a/src/VBox/Runtime/common/err/errinfo.cpp
+++ b/src/VBox/Runtime/common/err/errinfo.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/err/errmsg.cpp b/src/VBox/Runtime/common/err/errmsg.cpp
index f912a95..62e08eb 100644
--- a/src/VBox/Runtime/common/err/errmsg.cpp
+++ b/src/VBox/Runtime/common/err/errmsg.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -78,7 +78,7 @@ static volatile uint32_t    g_iUnknownMsgs;
  */
 RTDECL(PCRTSTATUSMSG) RTErrGet(int rc)
 {
-    unsigned iFound = ~0;
+    unsigned iFound = ~0U;
     unsigned i;
     for (i = 0; i < RT_ELEMENTS(g_aStatusMsgs) - 1; i++)
     {
diff --git a/src/VBox/Runtime/common/err/errmsgxpcom.cpp b/src/VBox/Runtime/common/err/errmsgxpcom.cpp
index d4341f1..4311c3e 100644
--- a/src/VBox/Runtime/common/err/errmsgxpcom.cpp
+++ b/src/VBox/Runtime/common/err/errmsgxpcom.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/filesystem/filesystem.cpp b/src/VBox/Runtime/common/filesystem/filesystem.cpp
index ce42f2f..da4f319 100644
--- a/src/VBox/Runtime/common/filesystem/filesystem.cpp
+++ b/src/VBox/Runtime/common/filesystem/filesystem.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/filesystem/filesystemext.cpp b/src/VBox/Runtime/common/filesystem/filesystemext.cpp
index 6f96cba..2ee7152 100644
--- a/src/VBox/Runtime/common/filesystem/filesystemext.cpp
+++ b/src/VBox/Runtime/common/filesystem/filesystemext.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -273,7 +273,7 @@ static DECLCALLBACK(int) rtFsExtProbe(RTVFSFILE hVfsFile, uint32_t *puScore)
             if (RT_SUCCESS(rc))
             {
 #if defined(RT_BIGENDIAN)
-                /** @todo: Convert to host endianess. */
+                /** @todo Convert to host endianess. */
 #endif
                 if (SuperBlock.u16Signature == RTFILESYSTEM_EXT2_SIGNATURE)
                     *puScore = RTFILESYSTEM_MATCH_SCORE_SUPPORTED;
@@ -297,7 +297,7 @@ static DECLCALLBACK(int) rtFsExtInit(void *pvThis, RTVFSFILE hVfsFile)
     if (RT_SUCCESS(rc))
     {
 #if defined(RT_BIGENDIAN)
-        /** @todo: Convert to host endianess. */
+        /** @todo Convert to host endianess. */
 #endif
         if (SuperBlock.u16FilesystemState == RTFILESYSTEM_EXT2_STATE_ERRORS)
             rc = VERR_FILESYSTEM_CORRUPT;
diff --git a/src/VBox/Runtime/common/ldr/ldr.cpp b/src/VBox/Runtime/common/ldr/ldr.cpp
index 3aae875..addce5c 100644
--- a/src/VBox/Runtime/common/ldr/ldr.cpp
+++ b/src/VBox/Runtime/common/ldr/ldr.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/ldr/ldrELF.cpp b/src/VBox/Runtime/common/ldr/ldrELF.cpp
index 812f255..06c8922 100644
--- a/src/VBox/Runtime/common/ldr/ldrELF.cpp
+++ b/src/VBox/Runtime/common/ldr/ldrELF.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -122,6 +122,8 @@ int rtldrELFOpen(PRTLDRREADER pReader, uint32_t fFlags, RTLDRARCH enmArch, PRTLD
 {
     const char *pszLogName = pReader->pfnLogName(pReader); NOREF(pszLogName);
 
+    RT_NOREF_PV(pErrInfo); /** @todo implement */
+
     /*
      * Read the ident to decide if this is 32-bit or 64-bit
      * and worth dealing with.
diff --git a/src/VBox/Runtime/common/ldr/ldrELFRelocatable.cpp.h b/src/VBox/Runtime/common/ldr/ldrELFRelocatable.cpp.h
index 94aeb06..d84fb21 100644
--- a/src/VBox/Runtime/common/ldr/ldrELFRelocatable.cpp.h
+++ b/src/VBox/Runtime/common/ldr/ldrELFRelocatable.cpp.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -240,7 +240,7 @@ static int RTLDRELF_NAME(RelocateSectionExecDyn)(PRTLDRMODELF pModElf, Elf_Addr
             /* Try to resolve the symbol. */
             const char *pszName = ELF_STR(pModElf, pSym->st_name);
             RTUINTPTR   ExtValue;
-            int rc = pfnGetImport(&pModElf->Core, "", pszName, ~0, &ExtValue, pvUser);
+            int rc = pfnGetImport(&pModElf->Core, "", pszName, ~0U, &ExtValue, pvUser);
             AssertMsgRCReturn(rc, ("Failed to resolve '%s' rc=%Rrc\n", pszName, rc), rc);
             SymValue = (Elf_Addr)ExtValue;
             AssertMsgReturn((RTUINTPTR)SymValue == ExtValue, ("Symbol value overflowed! '%s'\n", pszName),
@@ -444,7 +444,7 @@ static int RTLDRELF_NAME(Symbol)(PRTLDRMODELF pModElf, Elf_Addr BaseAddr, PFNRTL
         {
             /* Try to resolve the symbol. */
             RTUINTPTR Value;
-            int rc = pfnGetImport(&pModElf->Core, "", pszName, ~0, &Value, pvUser);
+            int rc = pfnGetImport(&pModElf->Core, "", pszName, ~0U, &Value, pvUser);
             if (RT_FAILURE(rc))
             {
                 AssertMsgFailed(("Failed to resolve '%s' rc=%Rrc\n", pszName, rc));
@@ -746,7 +746,7 @@ static DECLCALLBACK(int) RTLDRELF_NAME(EnumSymbols)(PRTLDRMODINTERNAL pMod, unsi
                  * Call back.
                  */
                 AssertMsgReturn(Value == (RTUINTPTR)Value, (FMT_ELF_ADDR "\n", Value), VERR_SYMBOL_VALUE_TOO_BIG);
-                rc = pfnCallback(pMod, pszName, ~0, (RTUINTPTR)Value, pvUser);
+                rc = pfnCallback(pMod, pszName, ~0U, (RTUINTPTR)Value, pvUser);
                 if (rc)
                     return rc;
             }
@@ -1019,6 +1019,7 @@ static DECLCALLBACK(int) RTLDRELF_NAME(EnumDbgInfo)(PRTLDRMODINTERNAL pMod, cons
                                                     PFNRTLDRENUMDBG pfnCallback, void *pvUser)
 {
     PRTLDRMODELF pModElf = (PRTLDRMODELF)pMod;
+    RT_NOREF_PV(pvBits);
 
     /*
      * Map the image bits if not already done and setup pointer into it.
@@ -1289,6 +1290,8 @@ static DECLCALLBACK(int) RTLDRELF_NAME(RvaToSegOffset)(PRTLDRMODINTERNAL pMod, R
 static DECLCALLBACK(int) RTLDRELF_NAME(GetImportStubCallback)(RTLDRMOD hLdrMod, const char *pszModule, const char *pszSymbol,
                                                               unsigned uSymbol, PRTLDRADDR pValue, void *pvUser)
 {
+    RT_NOREF_PV(hLdrMod); RT_NOREF_PV(pszModule); RT_NOREF_PV(pszSymbol);
+    RT_NOREF_PV(uSymbol); RT_NOREF_PV(pValue); RT_NOREF_PV(pvUser);
     return VERR_SYMBOL_NOT_FOUND;
 }
 
@@ -1743,6 +1746,7 @@ static int RTLDRELF_NAME(Open)(PRTLDRREADER pReader, uint32_t fFlags, RTLDRARCH
 {
     const char *pszLogName = pReader->pfnLogName(pReader);
     RTFOFF      cbRawImage = pReader->pfnSize(pReader);
+    RT_NOREF_PV(fFlags);
 
     /*
      * Create the loader module instance.
diff --git a/src/VBox/Runtime/common/ldr/ldrEx.cpp b/src/VBox/Runtime/common/ldr/ldrEx.cpp
index 77ce005..cd529af 100644
--- a/src/VBox/Runtime/common/ldr/ldrEx.cpp
+++ b/src/VBox/Runtime/common/ldr/ldrEx.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/ldr/ldrFile.cpp b/src/VBox/Runtime/common/ldr/ldrFile.cpp
index f315b77..1c0471b 100644
--- a/src/VBox/Runtime/common/ldr/ldrFile.cpp
+++ b/src/VBox/Runtime/common/ldr/ldrFile.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/ldr/ldrMemory.cpp b/src/VBox/Runtime/common/ldr/ldrMemory.cpp
index d7e40fa..4ec8841 100644
--- a/src/VBox/Runtime/common/ldr/ldrMemory.cpp
+++ b/src/VBox/Runtime/common/ldr/ldrMemory.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/ldr/ldrNative.cpp b/src/VBox/Runtime/common/ldr/ldrNative.cpp
index cccd176..590c65d 100644
--- a/src/VBox/Runtime/common/ldr/ldrNative.cpp
+++ b/src/VBox/Runtime/common/ldr/ldrNative.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/ldr/ldrPE.cpp b/src/VBox/Runtime/common/ldr/ldrPE.cpp
index 1d8ea71..cc03623 100644
--- a/src/VBox/Runtime/common/ldr/ldrPE.cpp
+++ b/src/VBox/Runtime/common/ldr/ldrPE.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -672,8 +672,9 @@ static DECLCALLBACK(int) rtldrPEResolveImports32(PRTLDRMODPE pModPe, const void
             else if (   pThunk->u1.Ordinal > 0
                      && pThunk->u1.Ordinal < pModPe->cbImage)
             {
-                rc = pfnGetImport(&pModPe->Core, pszModName, PE_RVA2TYPE(pvBitsR, (char*)(uintptr_t)pThunk->u1.AddressOfData + 2, const char *),
-                                  ~0, &Value, pvUser);
+                rc = pfnGetImport(&pModPe->Core, pszModName,
+                                  PE_RVA2TYPE(pvBitsR, (char*)(uintptr_t)pThunk->u1.AddressOfData + 2, const char *),
+                                  ~0U, &Value, pvUser);
                 Log4((RT_SUCCESS(rc) ? "RTLdrPE:  %RTptr %s\n" : "RTLdrPE:  %08RX32 %s rc=%Rrc\n",
                       (uint32_t)Value, PE_RVA2TYPE(pvBitsR, (char*)(uintptr_t)pThunk->u1.AddressOfData + 2, const char *), rc));
             }
@@ -712,7 +713,8 @@ typedef IMAGE_THUNK_DATA64 *PIMAGE_THUNK_DATA64;
 
 
 /** @copydoc RTLDROPSPE::pfnResolveImports */
-static DECLCALLBACK(int) rtldrPEResolveImports64(PRTLDRMODPE pModPe, const void *pvBitsR, void *pvBitsW, PFNRTLDRIMPORT pfnGetImport, void *pvUser)
+static DECLCALLBACK(int) rtldrPEResolveImports64(PRTLDRMODPE pModPe, const void *pvBitsR, void *pvBitsW,
+                                                 PFNRTLDRIMPORT pfnGetImport, void *pvUser)
 {
     /*
      * Check if there is actually anything to work on.
@@ -765,7 +767,7 @@ static DECLCALLBACK(int) rtldrPEResolveImports64(PRTLDRMODPE pModPe, const void
             {
                 /** @todo add validation of the string pointer! */
                 rc = pfnGetImport(&pModPe->Core, pszModName, PE_RVA2TYPE(pvBitsR, (uintptr_t)pThunk->u1.AddressOfData + 2, const char *),
-                                  ~0, &Value, pvUser);
+                                  ~0U, &Value, pvUser);
                 Log4((RT_SUCCESS(rc) ? "RTLdrPE:  %016RX64 %s\n" : "RTLdrPE:  %016RX64 %s rc=%Rrc\n",
                       (uint64_t)Value, PE_RVA2TYPE(pvBitsR, (uintptr_t)pThunk->u1.AddressOfData + 2, const char *), rc));
             }
@@ -787,7 +789,8 @@ static DECLCALLBACK(int) rtldrPEResolveImports64(PRTLDRMODPE pModPe, const void
 /**
  * Applies fixups.
  */
-static int rtldrPEApplyFixups(PRTLDRMODPE pModPe, const void *pvBitsR, void *pvBitsW, RTUINTPTR BaseAddress, RTUINTPTR OldBaseAddress)
+static int rtldrPEApplyFixups(PRTLDRMODPE pModPe, const void *pvBitsR, void *pvBitsW, RTUINTPTR BaseAddress,
+                              RTUINTPTR OldBaseAddress)
 {
     if (    !pModPe->RelocDir.VirtualAddress
         ||  !pModPe->RelocDir.Size)
@@ -2036,6 +2039,7 @@ static void rtLdrPE_HashFinalize(PRTLDRPEHASHCTXUNION pHashCtx, RTDIGESTTYPE enm
 }
 
 
+#ifndef IPRT_WITHOUT_LDR_VERIFY
 /**
  * Returns the digest size for the given digest type.
  *
@@ -2053,6 +2057,7 @@ static uint32_t rtLdrPE_HashGetHashSize(RTDIGESTTYPE enmDigest)
         default:                   AssertReleaseFailedReturn(0);
     }
 }
+#endif
 
 
 /**
@@ -2377,6 +2382,7 @@ static int rtldrPE_VerifySignatureRead(PRTLDRMODPE pModPe, PRTLDRPESIGNATURE *pp
  */
 static void rtldrPE_VerifySignatureDestroy(PRTLDRMODPE pModPe, PRTLDRPESIGNATURE pSignature)
 {
+    RT_NOREF_PV(pModPe);
     RTCrPkcs7ContentInfo_Delete(&pSignature->ContentInfo);
     RTMemTmpFree(pSignature);
 }
@@ -2395,6 +2401,7 @@ static int rtldrPE_VerifySignatureDecode(PRTLDRMODPE pModPe, PRTLDRPESIGNATURE p
     WIN_CERTIFICATE const  *pEntry = pSignature->pRawData;
     AssertReturn(pEntry->wCertificateType == WIN_CERT_TYPE_PKCS_SIGNED_DATA, VERR_INTERNAL_ERROR_2);
     AssertReturn(pEntry->wRevision        == WIN_CERT_REVISION_2_0, VERR_INTERNAL_ERROR_2);
+    RT_NOREF_PV(pModPe);
 
     RTASN1CURSORPRIMARY PrimaryCursor;
     RTAsn1CursorInitPrimary(&PrimaryCursor,
@@ -2760,6 +2767,7 @@ static DECLCALLBACK(int) rtldrPE_VerifySignature(PRTLDRMODINTERNAL pMod, PFNRTLD
     }
     return rc;
 #else
+    RT_NOREF_PV(pMod); RT_NOREF_PV(pfnCallback); RT_NOREF_PV(pvUser); RT_NOREF_PV(pErrInfo);
     return VERR_NOT_SUPPORTED;
 #endif
 }
@@ -3048,6 +3056,8 @@ static const char *rtldrPEGetArchName(uint16_t uMachine)
  */
 static int rtldrPEValidateFileHeader(PIMAGE_FILE_HEADER pFileHdr, uint32_t fFlags, const char *pszLogName, PRTLDRARCH penmArch)
 {
+    RT_NOREF_PV(pszLogName);
+
     size_t cbOptionalHeader;
     switch (pFileHdr->Machine)
     {
@@ -3109,6 +3119,8 @@ static int rtldrPEValidateFileHeader(PIMAGE_FILE_HEADER pFileHdr, uint32_t fFlag
 static int rtldrPEValidateOptionalHeader(const IMAGE_OPTIONAL_HEADER64 *pOptHdr, const char *pszLogName, RTFOFF offNtHdrs,
                                          const IMAGE_FILE_HEADER *pFileHdr, RTFOFF cbRawImage, uint32_t fFlags)
 {
+    RT_NOREF_PV(pszLogName);
+
     const uint16_t CorrectMagic = pFileHdr->SizeOfOptionalHeader == sizeof(IMAGE_OPTIONAL_HEADER32)
                                 ? IMAGE_NT_OPTIONAL_HDR32_MAGIC : IMAGE_NT_OPTIONAL_HDR64_MAGIC;
     if (pOptHdr->Magic != CorrectMagic)
@@ -3300,6 +3312,8 @@ static int rtldrPEValidateOptionalHeader(const IMAGE_OPTIONAL_HEADER64 *pOptHdr,
 static int rtldrPEValidateSectionHeaders(const IMAGE_SECTION_HEADER *paSections, unsigned cSections, const char *pszLogName,
                                          const IMAGE_OPTIONAL_HEADER64 *pOptHdr, RTFOFF cbRawImage, uint32_t fFlags, bool fNoCode)
 {
+    RT_NOREF_PV(pszLogName);
+
     const uint32_t              cbImage  = pOptHdr->SizeOfImage;
     const IMAGE_SECTION_HEADER *pSH      = &paSections[0];
     uint32_t                    uRvaPrev = pOptHdr->SizeOfHeaders;
@@ -3362,7 +3376,7 @@ static int rtldrPEValidateSectionHeaders(const IMAGE_SECTION_HEADER *paSections,
 #endif
         }
 
-        ///@todo only if SizeOfRawData > 0 ?
+        /// @todo only if SizeOfRawData > 0 ?
         if (    pSH->PointerToRawData > cbRawImage /// @todo pSH->PointerToRawData >= cbRawImage ?
             ||  pSH->SizeOfRawData > cbRawImage
             ||  pSH->PointerToRawData + pSH->SizeOfRawData > cbRawImage)
diff --git a/src/VBox/Runtime/common/ldr/ldrkStuff.cpp b/src/VBox/Runtime/common/ldr/ldrkStuff.cpp
index 94008fc..96d4e5d 100644
--- a/src/VBox/Runtime/common/ldr/ldrkStuff.cpp
+++ b/src/VBox/Runtime/common/ldr/ldrkStuff.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -599,7 +599,8 @@ static int rtkldrEnumDbgInfoWrapper(PKLDRMOD pMod, KU32 iDbgInfo, KLDRDBGINFOTYP
                                     const char *pszExtFile, void *pvUser)
 {
     PRTLDRMODKLDRARGS pArgs = (PRTLDRMODKLDRARGS)pvUser;
-    NOREF(pMod);
+    RT_NOREF_PV(pMod); RT_NOREF_PV(iMajorVer); RT_NOREF_PV(iMinorVer);
+
 
     RTLDRDBGINFO DbgInfo;
     RT_ZERO(DbgInfo.u);
@@ -831,6 +832,7 @@ static DECLCALLBACK(int) rtkldr_RvaToSegOffset(PRTLDRMODINTERNAL pMod, RTLDRADDR
 static DECLCALLBACK(int) rtkldr_ReadDbgInfo(PRTLDRMODINTERNAL pMod, uint32_t iDbgInfo, RTFOFF off, size_t cb, void *pvBuf)
 {
     PRTLDRMODKLDR   pThis = (PRTLDRMODKLDR)pMod;
+    RT_NOREF_PV(iDbgInfo);
     /** @todo May have to apply fixups here. */
     return pThis->Core.pReader->pfnRead(pThis->Core.pReader, pvBuf, cb, off);
 }
@@ -849,11 +851,15 @@ static DECLCALLBACK(int) rtkldr_QueryProp(PRTLDRMODINTERNAL pMod, RTLDRPROP enmP
             if (rc == KLDR_ERR_NO_IMAGE_UUID)
                 return VERR_NOT_FOUND;
             AssertReturn(rc == 0, VERR_INVALID_PARAMETER);
+            cbBuf = RT_MIN(cbBuf, sizeof(RTUUID));
             break;
 
         default:
             return VERR_NOT_FOUND;
     }
+    if (pcbRet)
+        *pcbRet = cbBuf;
+    RT_NOREF_PV(pvBits);
     return VINF_SUCCESS;
 }
 
@@ -900,6 +906,8 @@ static const RTLDROPS g_rtkldrOps =
  */
 int rtldrkLdrOpen(PRTLDRREADER pReader, uint32_t fFlags, RTLDRARCH enmArch, PRTLDRMOD phLdrMod, PRTERRINFO pErrInfo)
 {
+    RT_NOREF_PV(pErrInfo);
+
     /* Convert enmArch to k-speak. */
     KCPUARCH enmCpuArch;
     switch (enmArch)
diff --git a/src/VBox/Runtime/common/log/log.cpp b/src/VBox/Runtime/common/log/log.cpp
index 27c3df0..7d134b2 100644
--- a/src/VBox/Runtime/common/log/log.cpp
+++ b/src/VBox/Runtime/common/log/log.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -358,6 +358,7 @@ static struct
     { RT_STR_TUPLE("user"),         RTLOGDEST_USER },
 };
 
+#ifdef IN_RING3
 /** Log rotation backoff table - millisecond sleep intervals.
  * Important on Windows host, especially for VBoxSVC release logging.  Only a
  * medium term solution, until a proper fix for log file handling is available.
@@ -365,6 +366,7 @@ static struct
  */
 static const uint32_t g_acMsLogBackoff[] =
 { 10, 10, 10, 20, 50, 100, 200, 200, 200, 200, 500, 500, 500, 500, 1000, 1000, 1000, 1000, 1000, 1000, 1000 };
+#endif
 
 
 /**
@@ -473,7 +475,7 @@ static DECLCALLBACK(void) rtlogPhaseMsgLocked(PRTLOGGER pLogger, const char *psz
     Assert(pLogger->pInt->hSpinMtx != NIL_RTSEMSPINMUTEX);
 
     va_start(args, pszFormat);
-    rtlogLoggerExVLocked(pLogger, 0, ~0, pszFormat, args);
+    rtlogLoggerExVLocked(pLogger, 0, ~0U, pszFormat, args);
     va_end(args);
 }
 
@@ -493,7 +495,7 @@ static DECLCALLBACK(void) rtlogPhaseMsgNormal(PRTLOGGER pLogger, const char *psz
     Assert(pLogger->pInt->hSpinMtx != NIL_RTSEMSPINMUTEX);
 
     va_start(args, pszFormat);
-    RTLogLoggerExV(pLogger, 0, ~0, pszFormat, args);
+    RTLogLoggerExV(pLogger, 0, ~0U, pszFormat, args);
     va_end(args);
 }
 
@@ -850,7 +852,9 @@ RTDECL(int) RTLogCreateExV(PRTLOGGER *ppLogger, uint32_t fFlags, const char *psz
             pLogger->pInt->cSecsHistoryTimeSlot = UINT32_MAX;
         else
             pLogger->pInt->cSecsHistoryTimeSlot = cSecsHistoryTimeSlot;
-# endif  /* IN_RING3 */
+# else   /* !IN_RING3 */
+        RT_NOREF_PV(pfnPhase); RT_NOREF_PV(cHistory); RT_NOREF_PV(cbHistoryFileMax); RT_NOREF_PV(cSecsHistoryTimeSlot);
+# endif  /* !IN_RING3 */
         if (pszGroupSettings)
             RTLogGroupSettings(pLogger, pszGroupSettings);
 
@@ -933,7 +937,9 @@ RTDECL(int) RTLogCreateExV(PRTLOGGER *ppLogger, uint32_t fFlags, const char *psz
                 if (pszValue)
                     RTLogGroupSettings(pLogger, pszValue);
             }
-# endif /* IN_RING3 */
+# else  /* !IN_RING3 */
+            RT_NOREF_PV(pszEnvVarBase); RT_NOREF_PV(pszFilenameFmt); RT_NOREF_PV(args);
+# endif /* !IN_RING3 */
 
             /*
              * Open the destination(s).
@@ -2386,7 +2392,7 @@ RTDECL(int) RTLogDestinations(PRTLOGGER pLogger, char const *pszValue)
                     else if (i == 5 /* ringbuf */ && !fNo)
                     {
                         int rc = RTStrCopyEx(szTmp, sizeof(szTmp), pszValue, cch);
-                        uint32_t cbRingBuf;
+                        uint32_t cbRingBuf = 0;
                         if (RT_SUCCESS(rc))
                             rc = RTStrToUInt32Full(szTmp, 0, &cbRingBuf);
                         AssertMsgRCReturn(rc, ("Invalid ring buffer size value '%s' (%Rrc)!\n", szTmp, rc), rc);
@@ -2665,8 +2671,8 @@ RTDECL(PRTLOGGER)   RTLogDefaultInstanceEx(uint32_t fFlagsAndGroup)
             uint16_t const fFlags = RT_LO_U16(fFlagsAndGroup);
             uint16_t const iGroup = RT_HI_U16(fFlagsAndGroup);
             if (   iGroup != UINT16_MAX
-                 && (   (pLogger->afGroups[iGroup < pLogger->cGroups ? iGroup : 0] & (fFlags | RTLOGGRPFLAGS_ENABLED))
-                     != (fFlags | RTLOGGRPFLAGS_ENABLED)))
+                 && (   (pLogger->afGroups[iGroup < pLogger->cGroups ? iGroup : 0] & (fFlags | (uint32_t)RTLOGGRPFLAGS_ENABLED))
+                     != (fFlags | (uint32_t)RTLOGGRPFLAGS_ENABLED)))
             pLogger = NULL;
         }
     }
diff --git a/src/VBox/Runtime/common/log/logcom.cpp b/src/VBox/Runtime/common/log/logcom.cpp
index 0f67da7..7e13cf5 100644
--- a/src/VBox/Runtime/common/log/logcom.cpp
+++ b/src/VBox/Runtime/common/log/logcom.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/log/logellipsis.cpp b/src/VBox/Runtime/common/log/logellipsis.cpp
index 5ef052b..81f8ab1 100644
--- a/src/VBox/Runtime/common/log/logellipsis.cpp
+++ b/src/VBox/Runtime/common/log/logellipsis.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/log/logformat.cpp b/src/VBox/Runtime/common/log/logformat.cpp
index 8c4dd9f..813074b 100644
--- a/src/VBox/Runtime/common/log/logformat.cpp
+++ b/src/VBox/Runtime/common/log/logformat.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/log/logrel.cpp b/src/VBox/Runtime/common/log/logrel.cpp
index 873ae84..b029339 100644
--- a/src/VBox/Runtime/common/log/logrel.cpp
+++ b/src/VBox/Runtime/common/log/logrel.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -96,8 +96,8 @@ RTDECL(PRTLOGGER)   RTLogRelGetDefaultInstanceEx(uint32_t fFlagsAndGroup)
             uint16_t const fFlags = RT_LO_U16(fFlagsAndGroup);
             uint16_t const iGroup = RT_HI_U16(fFlagsAndGroup);
             if (   iGroup != UINT16_MAX
-                 && (   (pLogger->afGroups[iGroup < pLogger->cGroups ? iGroup : 0] & (fFlags | RTLOGGRPFLAGS_ENABLED))
-                     != (fFlags | RTLOGGRPFLAGS_ENABLED)))
+                 && (   (pLogger->afGroups[iGroup < pLogger->cGroups ? iGroup : 0] & (fFlags | (uint32_t)RTLOGGRPFLAGS_ENABLED))
+                     != (fFlags | (uint32_t)RTLOGGRPFLAGS_ENABLED)))
             pLogger = NULL;
         }
     }
diff --git a/src/VBox/Runtime/common/log/logrelellipsis.cpp b/src/VBox/Runtime/common/log/logrelellipsis.cpp
index e1f78dd..91a42e6 100644
--- a/src/VBox/Runtime/common/log/logrelellipsis.cpp
+++ b/src/VBox/Runtime/common/log/logrelellipsis.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/log/tracebuf.cpp b/src/VBox/Runtime/common/log/tracebuf.cpp
index 037a29b..be642c4 100644
--- a/src/VBox/Runtime/common/log/tracebuf.cpp
+++ b/src/VBox/Runtime/common/log/tracebuf.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/log/tracedefault.cpp b/src/VBox/Runtime/common/log/tracedefault.cpp
index 140eab3..122bd1a 100644
--- a/src/VBox/Runtime/common/log/tracedefault.cpp
+++ b/src/VBox/Runtime/common/log/tracedefault.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/math/RTUInt128MulByU64.asm b/src/VBox/Runtime/common/math/RTUInt128MulByU64.asm
index c6da932..2e44a72 100644
--- a/src/VBox/Runtime/common/math/RTUInt128MulByU64.asm
+++ b/src/VBox/Runtime/common/math/RTUInt128MulByU64.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/math/bignum-amd64-x86.asm b/src/VBox/Runtime/common/math/bignum-amd64-x86.asm
index 06421b1..4da6e34 100644
--- a/src/VBox/Runtime/common/math/bignum-amd64-x86.asm
+++ b/src/VBox/Runtime/common/math/bignum-amd64-x86.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/math/bignum.cpp b/src/VBox/Runtime/common/math/bignum.cpp
index a13143a..5ac74fb 100644
--- a/src/VBox/Runtime/common/math/bignum.cpp
+++ b/src/VBox/Runtime/common/math/bignum.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -176,6 +176,7 @@ DECLINLINE(RTBIGNUMELEMENT) rtBigNumElementAddWithCarry(RTBIGNUMELEMENT uAugend,
 }
 
 
+#if !defined(IPRT_BIGINT_WITH_ASM) || defined(RT_STRICT)
 /**
  * Does addition with borrow.
  *
@@ -196,6 +197,7 @@ DECLINLINE(RTBIGNUMELEMENT) rtBigNumElementSubWithBorrow(RTBIGNUMELEMENT uMinuen
     *pfBorrow = !*pfBorrow ? uMinuend < uSubtrahend : uMinuend <= uSubtrahend;
     return uRet;
 }
+#endif
 
 /** @} */
 
@@ -281,6 +283,7 @@ DECLINLINE(void) rtBigNumElement2xDec(RTBIGNUMELEMENT2X *puValue)
 #endif
 }
 
+#if 0 /* unused */
 DECLINLINE(void) rtBigNumElement2xAdd1x(RTBIGNUMELEMENT2X *puValue, RTBIGNUMELEMENT uAdd)
 {
 #if RTBIGNUM_ELEMENT_BITS == 64
@@ -289,6 +292,7 @@ DECLINLINE(void) rtBigNumElement2xAdd1x(RTBIGNUMELEMENT2X *puValue, RTBIGNUMELEM
     puValue->u += uAdd;
 #endif
 }
+#endif /* unused */
 
 /** @} */
 
@@ -1100,7 +1104,7 @@ RTDECL(int) RTBigNumCompareWithS64(PRTBIGNUM pLeft, int64_t iRight)
     if (RT_SUCCESS(rc))
     {
         RTBIGNUM_ASSERT_VALID(pLeft);
-        if (pLeft->fNegative == (iRight < 0))
+        if (pLeft->fNegative == (unsigned)(iRight < 0)) /* (unsigned cast is for MSC weirdness) */
         {
             AssertCompile(RTBIGNUM_ELEMENT_SIZE <= sizeof(iRight));
             if (pLeft->cUsed * RTBIGNUM_ELEMENT_SIZE <= sizeof(iRight))
@@ -1614,6 +1618,7 @@ RTDECL(int) RTBigNumMultiply(PRTBIGNUM pResult, PCRTBIGNUM pMultiplicand, PCRTBI
 }
 
 
+#if 0 /* unused */
 /**
  * Clears a bit in the magnitude of @a pBigNum.
  *
@@ -1633,6 +1638,7 @@ DECLINLINE(void) rtBigNumMagnitudeClearBit(PRTBIGNUM pBigNum, uint32_t iBit)
             rtBigNumStripTrailingZeros(pBigNum);
     }
 }
+#endif /* unused */
 
 
 /**
@@ -1658,6 +1664,7 @@ DECLINLINE(int) rtBigNumMagnitudeSetBit(PRTBIGNUM pBigNum, uint32_t iBit)
 }
 
 
+#if 0 /* unused */
 /**
  * Writes a bit in the magnitude of @a pBigNum.
  *
@@ -1675,6 +1682,7 @@ DECLINLINE(int) rtBigNumMagnitudeWriteBit(PRTBIGNUM pBigNum, uint32_t iBit, bool
     rtBigNumMagnitudeClearBit(pBigNum, iBit);
     return VINF_SUCCESS;
 }
+#endif
 
 
 /**
@@ -1728,6 +1736,7 @@ DECLINLINE(int) rtBigNumMagnitudeShiftLeftOne(PRTBIGNUM pBigNum, RTBIGNUMELEMENT
     if (uCarry)
     {
         int rc = rtBigNumSetUsed(pBigNum, cUsed + 1);
+        AssertRCReturn(rc, rc);
         pBigNum->pauElements[cUsed] = uCarry;
     }
 
diff --git a/src/VBox/Runtime/common/math/ceill.asm b/src/VBox/Runtime/common/math/ceill.asm
index 80174d7..a075d42 100644
--- a/src/VBox/Runtime/common/math/ceill.asm
+++ b/src/VBox/Runtime/common/math/ceill.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/math/cosl.asm b/src/VBox/Runtime/common/math/cosl.asm
index 6f37ad7..a8a0fe9 100644
--- a/src/VBox/Runtime/common/math/cosl.asm
+++ b/src/VBox/Runtime/common/math/cosl.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/math/fabs.asm b/src/VBox/Runtime/common/math/fabs.asm
index ae5d28f..32610da 100644
--- a/src/VBox/Runtime/common/math/fabs.asm
+++ b/src/VBox/Runtime/common/math/fabs.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/math/fabsf.asm b/src/VBox/Runtime/common/math/fabsf.asm
index 5f4baaf..422bbdf 100644
--- a/src/VBox/Runtime/common/math/fabsf.asm
+++ b/src/VBox/Runtime/common/math/fabsf.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/math/fabsl.asm b/src/VBox/Runtime/common/math/fabsl.asm
index 6e4ea50..db00459 100644
--- a/src/VBox/Runtime/common/math/fabsl.asm
+++ b/src/VBox/Runtime/common/math/fabsl.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/math/floor.asm b/src/VBox/Runtime/common/math/floor.asm
index 7ef76d4..f6fad97 100644
--- a/src/VBox/Runtime/common/math/floor.asm
+++ b/src/VBox/Runtime/common/math/floor.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/math/floorf.asm b/src/VBox/Runtime/common/math/floorf.asm
index 74152e1..a3f8081 100644
--- a/src/VBox/Runtime/common/math/floorf.asm
+++ b/src/VBox/Runtime/common/math/floorf.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/math/floorl.asm b/src/VBox/Runtime/common/math/floorl.asm
index a1b9ffa..9bcd5de 100644
--- a/src/VBox/Runtime/common/math/floorl.asm
+++ b/src/VBox/Runtime/common/math/floorl.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/math/ldexpl.asm b/src/VBox/Runtime/common/math/ldexpl.asm
index 0e6caa9..deec14e 100644
--- a/src/VBox/Runtime/common/math/ldexpl.asm
+++ b/src/VBox/Runtime/common/math/ldexpl.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/math/llrint.asm b/src/VBox/Runtime/common/math/llrint.asm
index a7b8022..1928261 100644
--- a/src/VBox/Runtime/common/math/llrint.asm
+++ b/src/VBox/Runtime/common/math/llrint.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/math/llrintf.asm b/src/VBox/Runtime/common/math/llrintf.asm
index 34ea2b8..6cb0a17 100644
--- a/src/VBox/Runtime/common/math/llrintf.asm
+++ b/src/VBox/Runtime/common/math/llrintf.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/math/llrintl.asm b/src/VBox/Runtime/common/math/llrintl.asm
index bb19ebf..64fafd2 100644
--- a/src/VBox/Runtime/common/math/llrintl.asm
+++ b/src/VBox/Runtime/common/math/llrintl.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/math/logl.asm b/src/VBox/Runtime/common/math/logl.asm
index 10be0e7..379f188 100644
--- a/src/VBox/Runtime/common/math/logl.asm
+++ b/src/VBox/Runtime/common/math/logl.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/math/lrint.asm b/src/VBox/Runtime/common/math/lrint.asm
index 13d91f7..cec7881 100644
--- a/src/VBox/Runtime/common/math/lrint.asm
+++ b/src/VBox/Runtime/common/math/lrint.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/math/lrintf.asm b/src/VBox/Runtime/common/math/lrintf.asm
index 29b0c19..376ce32 100644
--- a/src/VBox/Runtime/common/math/lrintf.asm
+++ b/src/VBox/Runtime/common/math/lrintf.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/math/lrintl.asm b/src/VBox/Runtime/common/math/lrintl.asm
index 1f789b2..02b896d 100644
--- a/src/VBox/Runtime/common/math/lrintl.asm
+++ b/src/VBox/Runtime/common/math/lrintl.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/math/remainder.asm b/src/VBox/Runtime/common/math/remainder.asm
index 31feb24..8f36498 100644
--- a/src/VBox/Runtime/common/math/remainder.asm
+++ b/src/VBox/Runtime/common/math/remainder.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/math/remainderf.asm b/src/VBox/Runtime/common/math/remainderf.asm
index eb026d5..14122dd 100644
--- a/src/VBox/Runtime/common/math/remainderf.asm
+++ b/src/VBox/Runtime/common/math/remainderf.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/math/remainderl.asm b/src/VBox/Runtime/common/math/remainderl.asm
index 90dfa52..ee8e52d 100644
--- a/src/VBox/Runtime/common/math/remainderl.asm
+++ b/src/VBox/Runtime/common/math/remainderl.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/math/sinl.asm b/src/VBox/Runtime/common/math/sinl.asm
index 5de384a..3d9cc23 100644
--- a/src/VBox/Runtime/common/math/sinl.asm
+++ b/src/VBox/Runtime/common/math/sinl.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/math/tanl.asm b/src/VBox/Runtime/common/math/tanl.asm
index 50ddde6..72be4c7 100644
--- a/src/VBox/Runtime/common/math/tanl.asm
+++ b/src/VBox/Runtime/common/math/tanl.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/math/trunc.asm b/src/VBox/Runtime/common/math/trunc.asm
index a884191..7b7c93d 100644
--- a/src/VBox/Runtime/common/math/trunc.asm
+++ b/src/VBox/Runtime/common/math/trunc.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/math/truncf.asm b/src/VBox/Runtime/common/math/truncf.asm
index 5223fc6..14f1706 100644
--- a/src/VBox/Runtime/common/math/truncf.asm
+++ b/src/VBox/Runtime/common/math/truncf.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/math/truncl.asm b/src/VBox/Runtime/common/math/truncl.asm
index 267fe5f..f4fc23d 100644
--- a/src/VBox/Runtime/common/math/truncl.asm
+++ b/src/VBox/Runtime/common/math/truncl.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/RTAssertMsg1Weak.cpp b/src/VBox/Runtime/common/misc/RTAssertMsg1Weak.cpp
index fbbc95c..645e5e6 100644
--- a/src/VBox/Runtime/common/misc/RTAssertMsg1Weak.cpp
+++ b/src/VBox/Runtime/common/misc/RTAssertMsg1Weak.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/RTAssertMsg2.cpp b/src/VBox/Runtime/common/misc/RTAssertMsg2.cpp
index 291fcea..9fe1fb8 100644
--- a/src/VBox/Runtime/common/misc/RTAssertMsg2.cpp
+++ b/src/VBox/Runtime/common/misc/RTAssertMsg2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/RTAssertMsg2Add.cpp b/src/VBox/Runtime/common/misc/RTAssertMsg2Add.cpp
index 946268e..2a22505 100644
--- a/src/VBox/Runtime/common/misc/RTAssertMsg2Add.cpp
+++ b/src/VBox/Runtime/common/misc/RTAssertMsg2Add.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/RTAssertMsg2AddWeak.cpp b/src/VBox/Runtime/common/misc/RTAssertMsg2AddWeak.cpp
index 4c68515..72b55b5 100644
--- a/src/VBox/Runtime/common/misc/RTAssertMsg2AddWeak.cpp
+++ b/src/VBox/Runtime/common/misc/RTAssertMsg2AddWeak.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/RTAssertMsg2AddWeakV.cpp b/src/VBox/Runtime/common/misc/RTAssertMsg2AddWeakV.cpp
index fae8a35..e1c35a7 100644
--- a/src/VBox/Runtime/common/misc/RTAssertMsg2AddWeakV.cpp
+++ b/src/VBox/Runtime/common/misc/RTAssertMsg2AddWeakV.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/RTAssertMsg2Weak.cpp b/src/VBox/Runtime/common/misc/RTAssertMsg2Weak.cpp
index 439b79b..b342fdf 100644
--- a/src/VBox/Runtime/common/misc/RTAssertMsg2Weak.cpp
+++ b/src/VBox/Runtime/common/misc/RTAssertMsg2Weak.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/RTAssertMsg2WeakV.cpp b/src/VBox/Runtime/common/misc/RTAssertMsg2WeakV.cpp
index 8a7c820..2a1a99d 100644
--- a/src/VBox/Runtime/common/misc/RTAssertMsg2WeakV.cpp
+++ b/src/VBox/Runtime/common/misc/RTAssertMsg2WeakV.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/RTFileModeToFlags.cpp b/src/VBox/Runtime/common/misc/RTFileModeToFlags.cpp
index bbeb209..a2ce3b4 100644
--- a/src/VBox/Runtime/common/misc/RTFileModeToFlags.cpp
+++ b/src/VBox/Runtime/common/misc/RTFileModeToFlags.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -35,20 +35,17 @@
 #include "internal/iprt.h"
 
 
-RTR3DECL(int) RTFileModeToFlags(const char *pszMode, uint64_t *puMode)
+RTR3DECL(int) RTFileModeToFlags(const char *pszMode, uint64_t *pfMode)
 {
     AssertPtrReturn(pszMode, VERR_INVALID_POINTER);
-    AssertPtrReturn(puMode, VERR_INVALID_POINTER);
-
-    int rc = VINF_SUCCESS;
+    AssertPtrReturn(pfMode, VERR_INVALID_POINTER);
 
     const char *pszCur = pszMode;
-    uint64_t uMode = 0;
-    char chPrev = 0;
-
     if (*pszCur == '\0')
         return VERR_INVALID_PARAMETER;
 
+    uint64_t    fMode  = 0;
+    char        chPrev = '\0';
     while (    pszCur
            && *pszCur != '\0')
     {
@@ -59,14 +56,12 @@ RTR3DECL(int) RTFileModeToFlags(const char *pszMode, uint64_t *puMode)
              * file pointer at the end of the file. The file is
              * created if it does not exist. */
             case 'a':
-                if ((uMode & RTFILE_O_ACTION_MASK) == 0)
-                {
-                    uMode |=   RTFILE_O_OPEN_CREATE
-                             | RTFILE_O_WRITE
-                             | RTFILE_O_APPEND;
-                }
+                if ((fMode & RTFILE_O_ACTION_MASK) == 0)
+                    fMode |= RTFILE_O_OPEN_CREATE
+                           | RTFILE_O_WRITE
+                           | RTFILE_O_APPEND;
                 else
-                    rc = VERR_INVALID_PARAMETER;
+                    return VERR_INVALID_PARAMETER;
                 break;
 
             case 'b': /* Binary mode. */
@@ -78,26 +73,22 @@ RTR3DECL(int) RTFileModeToFlags(const char *pszMode, uint64_t *puMode)
              * writing only. The file pointer will be placed
              * at the beginning of the file.*/
             case 'c':
-                if ((uMode & RTFILE_O_ACTION_MASK) == 0)
-                {
-                    uMode |=   RTFILE_O_OPEN_CREATE
-                             | RTFILE_O_WRITE;
-                }
+                if ((fMode & RTFILE_O_ACTION_MASK) == 0)
+                    fMode |= RTFILE_O_OPEN_CREATE
+                           | RTFILE_O_WRITE;
                 else
-                    rc = VERR_INVALID_PARAMETER;
+                    return VERR_INVALID_PARAMETER;
                 break;
 
             /* Opens an existing file for reading and places the
              * file pointer at the beginning of the file. If the
              * file does not exist an error will be returned. */
             case 'r':
-                if ((uMode & RTFILE_O_ACTION_MASK) == 0)
-                {
-                    uMode |=   RTFILE_O_OPEN
-                             | RTFILE_O_READ;
-                }
+                if ((fMode & RTFILE_O_ACTION_MASK) == 0)
+                    fMode |=  RTFILE_O_OPEN
+                           | RTFILE_O_READ;
                 else
-                    rc = VERR_INVALID_PARAMETER;
+                    return VERR_INVALID_PARAMETER;
                 break;
 
             case 't': /* Text mode. */
@@ -109,27 +100,23 @@ RTR3DECL(int) RTFileModeToFlags(const char *pszMode, uint64_t *puMode)
              * for writing. Places the file pointer at the beginning.
              * An existing file will be truncated to 0 bytes. */
             case 'w':
-                if ((uMode & RTFILE_O_ACTION_MASK) == 0)
-                {
-                    uMode |=   RTFILE_O_CREATE_REPLACE
-                             | RTFILE_O_WRITE
-                             | RTFILE_O_TRUNCATE;
-                }
+                if ((fMode & RTFILE_O_ACTION_MASK) == 0)
+                    fMode |= RTFILE_O_CREATE_REPLACE
+                           | RTFILE_O_WRITE
+                           | RTFILE_O_TRUNCATE;
                 else
-                    rc = VERR_INVALID_PARAMETER;
+                    return VERR_INVALID_PARAMETER;
                 break;
 
             /* Creates a new file and opens it for writing. Places
              * the file pointer at the beginning. If the file
              * exists an error will be returned. */
             case 'x':
-                if ((uMode & RTFILE_O_ACTION_MASK) == 0)
-                {
-                    uMode |=   RTFILE_O_CREATE
-                             | RTFILE_O_WRITE;
-                }
+                if ((fMode & RTFILE_O_ACTION_MASK) == 0)
+                    fMode |= RTFILE_O_CREATE
+                           | RTFILE_O_WRITE;
                 else
-                    rc = VERR_INVALID_PARAMETER;
+                    return VERR_INVALID_PARAMETER;
                 break;
 
             case '+':
@@ -141,12 +128,12 @@ RTR3DECL(int) RTFileModeToFlags(const char *pszMode, uint64_t *puMode)
                     case 'w':
                     case 'x':
                         /* Also open / create file with read access. */
-                        uMode |= RTFILE_O_READ;
+                        fMode |= RTFILE_O_READ;
                         break;
 
                     case 'r':
                         /* Also open / create file with write access. */
-                        uMode |= RTFILE_O_WRITE;
+                        fMode |= RTFILE_O_WRITE;
                         break;
 
                     case 'b':
@@ -162,62 +149,52 @@ RTR3DECL(int) RTFileModeToFlags(const char *pszMode, uint64_t *puMode)
                         break;
 
                     default:
-                        rc = VERR_INVALID_PARAMETER;
-                        break;
+                        return VERR_INVALID_PARAMETER;
                 }
 
                 break;
             }
 
             default:
-                rc = VERR_INVALID_PARAMETER;
-                break;
+                return VERR_INVALID_PARAMETER;
         }
 
-        if (RT_FAILURE(rc))
-            break;
-
         if (!fSkip)
             chPrev = *pszCur;
         pszCur++;
     }
 
     /* No action mask set? */
-    if (   RT_SUCCESS(rc)
-        && (uMode & RTFILE_O_ACTION_MASK) == 0)
-        rc = VERR_INVALID_PARAMETER;
-
-    /** @todo Handle sharing mode. */
-    uMode |= RTFILE_O_DENY_NONE;
+    if ((fMode & RTFILE_O_ACTION_MASK) == 0)
+        return VERR_INVALID_PARAMETER;
 
-    if (RT_SUCCESS(rc))
-        *puMode = uMode;
+    /** @todo Handle sharing mode */
+    fMode |= RTFILE_O_DENY_NONE;
 
-    return rc;
+    /* Return. */
+    *pfMode = fMode;
+    return VINF_SUCCESS;
 }
 RT_EXPORT_SYMBOL(RTFileModeToFlags);
 
 
 RTR3DECL(int) RTFileModeToFlagsEx(const char *pszAccess, const char *pszDisposition,
-                                  const char *pszSharing, uint64_t *puMode)
+                                  const char *pszSharing, uint64_t *pfMode)
 {
     AssertPtrReturn(pszAccess, VERR_INVALID_POINTER);
     AssertPtrReturn(pszDisposition, VERR_INVALID_POINTER);
-    /* pszSharing is not used yet. */
-    AssertPtrReturn(puMode, VERR_INVALID_POINTER);
-
-    int rc = VINF_SUCCESS;
+    AssertPtrNullReturn(pszSharing, VERR_INVALID_POINTER);
+    AssertPtrReturn(pfMode, VERR_INVALID_POINTER);
 
     const char *pszCur = pszAccess;
-    uint64_t uMode = 0;
-    char chPrev = 0;
-
     if (*pszCur == '\0')
         return VERR_INVALID_PARAMETER;
 
     /*
      * Handle access mode.
      */
+    uint64_t fMode  = 0;
+    char     chPrev = '\0';
     while (    pszCur
            && *pszCur != '\0')
     {
@@ -230,7 +207,7 @@ RTR3DECL(int) RTFileModeToFlagsEx(const char *pszAccess, const char *pszDisposit
                 break;
 
             case 'r': /* Read. */
-                uMode |= RTFILE_O_READ;
+                fMode |= RTFILE_O_READ;
                 break;
 
             case 't': /* Text mode. */
@@ -239,7 +216,7 @@ RTR3DECL(int) RTFileModeToFlagsEx(const char *pszAccess, const char *pszDisposit
                 break;
 
             case 'w': /* Write. */
-                uMode |= RTFILE_O_WRITE;
+                fMode |= RTFILE_O_WRITE;
                 break;
 
             case '+':
@@ -248,12 +225,12 @@ RTR3DECL(int) RTFileModeToFlagsEx(const char *pszAccess, const char *pszDisposit
                 {
                     case 'w':
                         /* Also use read access in write mode. */
-                        uMode |= RTFILE_O_READ;
+                        fMode |= RTFILE_O_READ;
                         break;
 
                     case 'r':
                         /* Also use write access in read mode. */
-                        uMode |= RTFILE_O_WRITE;
+                        fMode |= RTFILE_O_WRITE;
                         break;
 
                     case 'b':
@@ -269,29 +246,21 @@ RTR3DECL(int) RTFileModeToFlagsEx(const char *pszAccess, const char *pszDisposit
                         break;
 
                     default:
-                        rc = VERR_INVALID_PARAMETER;
-                        break;
+                        return VERR_INVALID_PARAMETER;
                 }
 
                 break;
             }
 
             default:
-                rc = VERR_INVALID_PARAMETER;
-                break;
+                return VERR_INVALID_PARAMETER;
         }
 
-        if (RT_FAILURE(rc))
-            break;
-
         if (!fSkip)
             chPrev = *pszCur;
         pszCur++;
     }
 
-    if (RT_FAILURE(rc))
-        return rc;
-
     /*
      * Handle disposition.
      */
@@ -299,39 +268,37 @@ RTR3DECL(int) RTFileModeToFlagsEx(const char *pszAccess, const char *pszDisposit
 
     /* Create a new file, always, overwrite an existing file. */
     if (!RTStrCmp(pszCur, "ca"))
-        uMode |= RTFILE_O_CREATE_REPLACE;
+        fMode |= RTFILE_O_CREATE_REPLACE;
     /* Create a new file if it does not exist, fail if exist. */
     else if (!RTStrCmp(pszCur, "ce"))
-        uMode |= RTFILE_O_CREATE;
+        fMode |= RTFILE_O_CREATE;
     /* Open existing file, create file if does not exist. */
     else if (!RTStrCmp(pszCur, "oc"))
-        uMode |= RTFILE_O_OPEN_CREATE;
+        fMode |= RTFILE_O_OPEN_CREATE;
     /* Open existing file and place the file pointer at
      * the end of the file, if opened with write access.
      * Create the file if does not exist. */
     else if (!RTStrCmp(pszCur, "oa"))
-        uMode |= RTFILE_O_OPEN_CREATE | RTFILE_O_APPEND;
+        fMode |= RTFILE_O_OPEN_CREATE | RTFILE_O_APPEND;
     /* Open existing, fail if does not exist. */
     else if (!RTStrCmp(pszCur, "oe"))
-        uMode |= RTFILE_O_OPEN;
+        fMode |= RTFILE_O_OPEN;
     /* Open and truncate existing, fail of not exist. */
     else if (!RTStrCmp(pszCur, "ot"))
-        uMode |= RTFILE_O_OPEN | RTFILE_O_TRUNCATE;
+        fMode |= RTFILE_O_OPEN | RTFILE_O_TRUNCATE;
     else
-        rc = VERR_INVALID_PARAMETER;
+        return VERR_INVALID_PARAMETER;
 
     /* No action mask set? */
-    if (   RT_SUCCESS(rc)
-        && (uMode & RTFILE_O_ACTION_MASK) == 0)
-        rc = VERR_INVALID_PARAMETER;
+    if ((fMode & RTFILE_O_ACTION_MASK) == 0)
+        return VERR_INVALID_PARAMETER;
 
     /** @todo Handle sharing mode. */
-    uMode |= RTFILE_O_DENY_NONE;
-
-    if (RT_SUCCESS(rc))
-        *puMode = uMode;
+    fMode |= RTFILE_O_DENY_NONE;
 
-    return rc;
+    /* Return. */
+    *pfMode = fMode;
+    return VINF_SUCCESS;
 }
 RT_EXPORT_SYMBOL(RTFileModeToFlagsEx);
 
diff --git a/src/VBox/Runtime/common/misc/RTFileOpenF.cpp b/src/VBox/Runtime/common/misc/RTFileOpenF.cpp
index 75e841e..f5e8f9c 100644
--- a/src/VBox/Runtime/common/misc/RTFileOpenF.cpp
+++ b/src/VBox/Runtime/common/misc/RTFileOpenF.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/RTFileOpenV.cpp b/src/VBox/Runtime/common/misc/RTFileOpenV.cpp
index 0d4976f..bfb9db1 100644
--- a/src/VBox/Runtime/common/misc/RTFileOpenV.cpp
+++ b/src/VBox/Runtime/common/misc/RTFileOpenV.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/RTMemWipeThoroughly.cpp b/src/VBox/Runtime/common/misc/RTMemWipeThoroughly.cpp
index eeddbbb..79d2076 100644
--- a/src/VBox/Runtime/common/misc/RTMemWipeThoroughly.cpp
+++ b/src/VBox/Runtime/common/misc/RTMemWipeThoroughly.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/RTSystemIsInsideVM-amd64-x86.cpp b/src/VBox/Runtime/common/misc/RTSystemIsInsideVM-amd64-x86.cpp
index 2d0aaf1..c7e20c3 100644
--- a/src/VBox/Runtime/common/misc/RTSystemIsInsideVM-amd64-x86.cpp
+++ b/src/VBox/Runtime/common/misc/RTSystemIsInsideVM-amd64-x86.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/aiomgr.cpp b/src/VBox/Runtime/common/misc/aiomgr.cpp
index 4e14b8e..6843c80 100644
--- a/src/VBox/Runtime/common/misc/aiomgr.cpp
+++ b/src/VBox/Runtime/common/misc/aiomgr.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -509,7 +509,7 @@ static int rtAioMgrReqPrepareNonBuffered(PRTAIOMGRFILEINT pFile, PRTAIOMGRREQ pR
      * need to be on a 512 boundary.
      */
     if (   !fAlignedReq
-        /** @todo: || ((pEpClassFile->uBitmaskAlignment & (RTR3UINTPTR)pvBuf) != (RTR3UINTPTR)pvBuf) */)
+        /** @todo || ((pEpClassFile->uBitmaskAlignment & (RTR3UINTPTR)pvBuf) != (RTR3UINTPTR)pvBuf) */)
     {
         /* Create bounce buffer. */
         pReq->cbBounceBuffer = cbToTransfer;
@@ -518,7 +518,7 @@ static int rtAioMgrReqPrepareNonBuffered(PRTAIOMGRFILEINT pFile, PRTAIOMGRREQ pR
                   pReq->off, offStart));
         pReq->offBounceBuffer = pReq->off - offStart;
 
-        /** @todo: I think we need something like a RTMemAllocAligned method here.
+        /** @todo I think we need something like a RTMemAllocAligned method here.
          * Current assumption is that the maximum alignment is 4096byte
          * (GPT disk on Windows)
          * so we can use RTMemPageAlloc here.
@@ -734,7 +734,6 @@ static int rtAioMgrQueueWaitingReqs(PRTAIOMGRINT pThis, PRTAIOMGRFILEINT pFile)
 static int rtAioMgrQueueReqs(PRTAIOMGRINT pThis, PRTAIOMGRFILEINT pFile)
 {
     int rc = VINF_SUCCESS;
-    PRTAIOMGRFILEINT pReqsHead = NULL;
 
     /* Check the pending list first */
     if (!RTListIsEmpty(&pFile->AioMgr.ListWaitingReqs))
@@ -849,7 +848,7 @@ static int rtAioMgrProcessBlockingEvent(PRTAIOMGRINT pThis)
 static DECLCALLBACK(int) rtAioMgrWorker(RTTHREAD hThreadSelf, void *pvUser)
 {
     PRTAIOMGRINT pThis = (PRTAIOMGRINT)pvUser;
-    bool fRunning = true;
+    /*bool fRunning = true;*/
     int rc = VINF_SUCCESS;
 
     do
@@ -867,7 +866,7 @@ static DECLCALLBACK(int) rtAioMgrWorker(RTTHREAD hThreadSelf, void *pvUser)
         else if (RT_FAILURE(rc))
         {
             /* Something bad happened. */
-            /** @todo: */
+            /** @todo */
         }
         else
         {
@@ -878,9 +877,10 @@ static DECLCALLBACK(int) rtAioMgrWorker(RTTHREAD hThreadSelf, void *pvUser)
             /* Check files for new requests and queue waiting requests. */
             rc = rtAioMgrCheckFiles(pThis);
         }
-    } while (   fRunning
-             && RT_SUCCESS(rc));
+    } while (   /*fRunning - never modified
+             && */ RT_SUCCESS(rc));
 
+    RT_NOREF_PV(hThreadSelf);
     return rc;
 }
 
@@ -1075,7 +1075,7 @@ static int rtAioMgrFileIoReqCreate(RTAIOMGRFILE hAioMgrFile, RTFOFF off, PRTSGBU
         }
         else
         {
-            /** @todo: Real S/G buffer support. */
+            /** @todo Real S/G buffer support. */
             rtAioMgrReqFree(pAioMgr, pReq);
             rc = VERR_NOT_SUPPORTED;
         }
@@ -1097,6 +1097,7 @@ static int rtAioMgrFileIoReqCreate(RTAIOMGRFILE hAioMgrFile, RTFOFF off, PRTSGBU
 static DECLCALLBACK(int) rtAioMgrReqCtor(RTMEMCACHE hMemCache, void *pvObj, void *pvUser)
 {
     PRTAIOMGRREQ pReq = (PRTAIOMGRREQ)pvObj;
+    RT_NOREF_PV(hMemCache); RT_NOREF_PV(pvUser);
 
     memset(pReq, 0, sizeof(RTAIOMGRREQ));
     return RTFileAioReqCreate(&pReq->hReqIo);
@@ -1113,8 +1114,9 @@ static DECLCALLBACK(void) rtAioMgrReqDtor(RTMEMCACHE hMemCache, void *pvObj, voi
 {
     PRTAIOMGRREQ pReq = (PRTAIOMGRREQ)pvObj;
     int rc = RTFileAioReqDestroy(pReq->hReqIo);
-
     AssertRC(rc);
+
+    RT_NOREF_PV(hMemCache); RT_NOREF_PV(pvUser);
 }
 
 RTDECL(int) RTAioMgrCreate(PRTAIOMGR phAioMgr, uint32_t cReqsMax)
diff --git a/src/VBox/Runtime/common/misc/assert.cpp b/src/VBox/Runtime/common/misc/assert.cpp
index bc2fa60..ab0ec89 100644
--- a/src/VBox/Runtime/common/misc/assert.cpp
+++ b/src/VBox/Runtime/common/misc/assert.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/buildconfig.cpp b/src/VBox/Runtime/common/misc/buildconfig.cpp
index 8856dbc..c4f155c 100644
--- a/src/VBox/Runtime/common/misc/buildconfig.cpp
+++ b/src/VBox/Runtime/common/misc/buildconfig.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/cidr.cpp b/src/VBox/Runtime/common/misc/cidr.cpp
index 07afb7f..ffdebad 100644
--- a/src/VBox/Runtime/common/misc/cidr.cpp
+++ b/src/VBox/Runtime/common/misc/cidr.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/circbuf.cpp b/src/VBox/Runtime/common/misc/circbuf.cpp
index 863f523..60cb10e 100644
--- a/src/VBox/Runtime/common/misc/circbuf.cpp
+++ b/src/VBox/Runtime/common/misc/circbuf.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/getopt.cpp b/src/VBox/Runtime/common/misc/getopt.cpp
index f549e49..f3543b0 100644
--- a/src/VBox/Runtime/common/misc/getopt.cpp
+++ b/src/VBox/Runtime/common/misc/getopt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/getoptargv.cpp b/src/VBox/Runtime/common/misc/getoptargv.cpp
index 2a1b7da..8c7ab4a 100644
--- a/src/VBox/Runtime/common/misc/getoptargv.cpp
+++ b/src/VBox/Runtime/common/misc/getoptargv.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/handle.cpp b/src/VBox/Runtime/common/misc/handle.cpp
index e6ad272..2e0fc27 100644
--- a/src/VBox/Runtime/common/misc/handle.cpp
+++ b/src/VBox/Runtime/common/misc/handle.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/handletable.cpp b/src/VBox/Runtime/common/misc/handletable.cpp
index 6ba583a..f0c9f8b 100644
--- a/src/VBox/Runtime/common/misc/handletable.cpp
+++ b/src/VBox/Runtime/common/misc/handletable.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/handletable.h b/src/VBox/Runtime/common/misc/handletable.h
index 83bcff5..fba92bb 100644
--- a/src/VBox/Runtime/common/misc/handletable.h
+++ b/src/VBox/Runtime/common/misc/handletable.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/handletablectx.cpp b/src/VBox/Runtime/common/misc/handletablectx.cpp
index 5ae1efc..9808165 100644
--- a/src/VBox/Runtime/common/misc/handletablectx.cpp
+++ b/src/VBox/Runtime/common/misc/handletablectx.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/handletablesimple.cpp b/src/VBox/Runtime/common/misc/handletablesimple.cpp
index 0d9346f..9431042 100644
--- a/src/VBox/Runtime/common/misc/handletablesimple.cpp
+++ b/src/VBox/Runtime/common/misc/handletablesimple.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/json.cpp b/src/VBox/Runtime/common/misc/json.cpp
index e5335de..9f8b5d5 100644
--- a/src/VBox/Runtime/common/misc/json.cpp
+++ b/src/VBox/Runtime/common/misc/json.cpp
@@ -37,6 +37,7 @@
 #include <iprt/stream.h>
 #include <iprt/string.h>
 
+
 /*********************************************************************************************************************************
 *   Structures and Typedefs                                                                                                      *
 *********************************************************************************************************************************/
@@ -247,6 +248,7 @@ typedef struct RTJSONREADERARGS
 /** Pointer to a readers argument. */
 typedef RTJSONREADERARGS *PRTJSONREADERARGS;
 
+
 /*********************************************************************************************************************************
 *   Global variables                                                                                                             *
 *********************************************************************************************************************************/
@@ -293,7 +295,7 @@ static int rtJsonTokenizerSkip(PRTJSONTOKENIZER pTokenizer, size_t cchSkip)
 
     /*
      * In case we reached the end of the stream don't even attempt to read new data.
-     * Safety precaution for possible bugs in the parser causing out of bounds reads 
+     * Safety precaution for possible bugs in the parser causing out of bounds reads
      */
     if (pTokenizer->achBuf[pTokenizer->offBuf] == '\0')
         return rc;
@@ -352,7 +354,7 @@ DECLINLINE(char) rtJsonTokenizerPeekCh(PRTJSONTOKENIZER pTokenizer)
 {
     return   rtJsonTokenizerIsEos(pTokenizer)
            ? '\0'
-           : pTokenizer->achBuf[pTokenizer->offBuf + 1]; /** @todo: Read out of bounds */
+           : pTokenizer->achBuf[pTokenizer->offBuf + 1]; /** @todo Read out of bounds */
 }
 
 /**
@@ -429,9 +431,7 @@ DECLINLINE(void) rtJsonTokenizerSkipWhitespace(PRTJSONTOKENIZER pTokenizer)
 
         if (   !rtJsonTokenizerIsEos(pTokenizer)
             && !rtJsonTokenizerIsSkipNewLine(pTokenizer))
-        {
             break; /* Skipped everything, next is some real content. */
-        }
     }
 }
 
@@ -447,27 +447,27 @@ static int rtJsonTokenizerGetLiteral(PRTJSONTOKENIZER pTokenizer, PRTJSONTOKEN p
     int rc = VINF_SUCCESS;
     char ch = rtJsonTokenizerGetCh(pTokenizer);
     size_t cchLiteral = 0;
-    char aszLiteral[6]; /* false + 0 terminator as the lingest possible literal. */
-    RT_ZERO(aszLiteral);
+    char szLiteral[6]; /* false + 0 terminator as the lingest possible literal. */
+    RT_ZERO(szLiteral);
 
     pToken->Pos = pTokenizer->Pos;
 
     Assert(RT_C_IS_ALPHA(ch));
 
     while (   RT_C_IS_ALPHA(ch)
-           && cchLiteral < RT_ELEMENTS(aszLiteral) - 1)
+           && cchLiteral < RT_ELEMENTS(szLiteral) - 1)
     {
-        aszLiteral[cchLiteral] = ch;
+        szLiteral[cchLiteral] = ch;
         cchLiteral++;
         rtJsonTokenizerSkipCh(pTokenizer);
         ch = rtJsonTokenizerGetCh(pTokenizer);
     }
 
-    if (!RTStrNCmp(&aszLiteral[0], "false", RT_ELEMENTS(aszLiteral)))
+    if (!RTStrNCmp(&szLiteral[0], "false", RT_ELEMENTS(szLiteral)))
         pToken->enmClass = RTJSONTOKENCLASS_FALSE;
-    else if (!RTStrNCmp(&aszLiteral[0], "true", RT_ELEMENTS(aszLiteral)))
+    else if (!RTStrNCmp(&szLiteral[0], "true", RT_ELEMENTS(szLiteral)))
         pToken->enmClass = RTJSONTOKENCLASS_TRUE;
-    else if (!RTStrNCmp(&aszLiteral[0], "null", RT_ELEMENTS(aszLiteral)))
+    else if (!RTStrNCmp(&szLiteral[0], "null", RT_ELEMENTS(szLiteral)))
         pToken->enmClass = RTJSONTOKENCLASS_NULL;
     else
     {
@@ -488,30 +488,28 @@ static int rtJsonTokenizerGetLiteral(PRTJSONTOKENIZER pTokenizer, PRTJSONTOKEN p
  */
 static int rtJsonTokenizerGetNumber(PRTJSONTOKENIZER pTokenizer, PRTJSONTOKEN pToken)
 {
-    unsigned uBase = 10;
-    char *pszNext = NULL;
     size_t cchNum = 0;
-    char aszTmp[128]; /* Everything larger is not possible to display in signed 64bit. */
-    RT_ZERO(aszTmp);
+    char   szTmp[128]; /* Everything larger is not possible to display in signed 64bit. */
 
     pToken->enmClass = RTJSONTOKENCLASS_NUMBER;
 
     char ch = rtJsonTokenizerGetCh(pTokenizer);
     while (   RT_C_IS_DIGIT(ch)
-           && cchNum < sizeof(aszTmp) - 1)
+           && cchNum < sizeof(szTmp) - 1)
     {
-        aszTmp[cchNum] = ch;
+        szTmp[cchNum] = ch;
         cchNum++;
         rtJsonTokenizerSkipCh(pTokenizer);
         ch = rtJsonTokenizerGetCh(pTokenizer);
     }
 
     int rc = VINF_SUCCESS;
-    if (RT_C_IS_DIGIT(ch) && cchNum == sizeof(aszTmp) - 1)
+    if (RT_C_IS_DIGIT(ch) && cchNum >= sizeof(szTmp) - 1)
         rc = VERR_NUMBER_TOO_BIG;
     else
     {
-        rc = RTStrToInt64Ex(&aszTmp[0], NULL, 0, &pToken->Class.Number.i64Num);
+        szTmp[cchNum] = '\0';
+        rc = RTStrToInt64Ex(&szTmp[0], NULL, 0, &pToken->Class.Number.i64Num);
         Assert(RT_SUCCESS(rc) || rc == VWRN_NUMBER_TOO_BIG);
         if (rc == VWRN_NUMBER_TOO_BIG)
             rc = VERR_NUMBER_TOO_BIG;
@@ -531,8 +529,8 @@ static int rtJsonTokenizerGetString(PRTJSONTOKENIZER pTokenizer, PRTJSONTOKEN pT
 {
     int rc = VINF_SUCCESS;
     size_t cchStr = 0;
-    char aszTmp[_4K];
-    RT_ZERO(aszTmp);
+    char szTmp[_4K];
+    RT_ZERO(szTmp);
 
     Assert(rtJsonTokenizerGetCh(pTokenizer) == '\"');
     rtJsonTokenizerSkipCh(pTokenizer); /* Skip " */
@@ -543,7 +541,7 @@ static int rtJsonTokenizerGetString(PRTJSONTOKENIZER pTokenizer, PRTJSONTOKEN pT
     char ch = rtJsonTokenizerGetCh(pTokenizer);
     while (   ch != '\"'
            && ch != '\0'
-           && cchStr < sizeof(aszTmp) - 1)
+           && cchStr < sizeof(szTmp) - 1)
     {
         if (ch == '\\')
         {
@@ -553,28 +551,28 @@ static int rtJsonTokenizerGetString(PRTJSONTOKENIZER pTokenizer, PRTJSONTOKEN pT
             switch (chNext)
             {
                 case '\"':
-                    aszTmp[cchStr] = '\"';
+                    szTmp[cchStr] = '\"';
                     break;
                 case '\\':
-                    aszTmp[cchStr] = '\\';
+                    szTmp[cchStr] = '\\';
                     break;
                 case '/':
-                    aszTmp[cchStr] = '/';
+                    szTmp[cchStr] = '/';
                     break;
                 case '\b':
-                    aszTmp[cchStr] = '\b';
+                    szTmp[cchStr] = '\b';
                     break;
                 case '\n':
-                    aszTmp[cchStr] = '\n';
+                    szTmp[cchStr] = '\n';
                     break;
                 case '\f':
-                    aszTmp[cchStr] = '\f';
+                    szTmp[cchStr] = '\f';
                     break;
                 case '\r':
-                    aszTmp[cchStr] = '\r';
+                    szTmp[cchStr] = '\r';
                     break;
                 case '\t':
-                    aszTmp[cchStr] = '\t';
+                    szTmp[cchStr] = '\t';
                     break;
                 case 'u':
                     rc = VERR_NOT_SUPPORTED;
@@ -584,7 +582,7 @@ static int rtJsonTokenizerGetString(PRTJSONTOKENIZER pTokenizer, PRTJSONTOKEN pT
             }
         }
         else
-            aszTmp[cchStr] = ch;
+            szTmp[cchStr] = ch;
         cchStr++;
         rtJsonTokenizerSkipCh(pTokenizer);
         ch = rtJsonTokenizerGetCh(pTokenizer);
@@ -593,7 +591,7 @@ static int rtJsonTokenizerGetString(PRTJSONTOKENIZER pTokenizer, PRTJSONTOKEN pT
     if (rtJsonTokenizerGetCh(pTokenizer) == '\"')
         rtJsonTokenizerSkipCh(pTokenizer); /* Skip closing " */
 
-    pToken->Class.String.pszStr = RTStrDupN(&aszTmp[0], cchStr);
+    pToken->Class.String.pszStr = RTStrDupN(&szTmp[0], cchStr);
     if (pToken->Class.String.pszStr)
         pToken->Pos.iChEnd += cchStr;
     else
@@ -722,7 +720,7 @@ static int rtJsonTokenizerInit(PRTJSONTOKENIZER pTokenizer, PFNRTJSONTOKENIZERRE
  */
 static void rtJsonTokenizerDestroy(PRTJSONTOKENIZER pTokenizer)
 {
-
+    RT_NOREF_PV(pTokenizer);
 }
 
 /**
@@ -1060,7 +1058,7 @@ static int rtJsonParseValue(PRTJSONTOKENIZER pTokenizer, PRTJSONTOKEN pToken,
         case RTJSONTOKENCLASS_VALUE_SEPARATOR:
         case RTJSONTOKENCLASS_EOS:
         default:
-            /** @todo: Error info */
+            /** @todo Error info */
             rc = VERR_JSON_MALFORMED;
             break;
     }
@@ -1141,11 +1139,12 @@ static DECLCALLBACK(int) rtJsonTokenizerParseFromFile(void *pvUser, size_t offIn
                                                       void *pvBuf, size_t cbBuf,
                                                       size_t *pcbRead)
 {
-    int rc = VINF_SUCCESS;
     PRTJSONREADERARGS pArgs = (PRTJSONREADERARGS)pvUser;
-    size_t cbRead = 0;
 
-    rc = RTStrmReadEx(pArgs->u.hStream, pvBuf, cbBuf, &cbRead);
+    RT_NOREF_PV(offInput);
+
+    size_t cbRead = 0;
+    int rc = RTStrmReadEx(pArgs->u.hStream, pvBuf, cbBuf, &cbRead);
     if (RT_SUCCESS(rc))
         *pcbRead = cbRead;
 
@@ -1159,14 +1158,12 @@ RTDECL(int) RTJsonParseFromBuf(PRTJSONVAL phJsonVal, const uint8_t *pbBuf, size_
     AssertPtrReturn(pbBuf, VERR_INVALID_POINTER);
     AssertReturn(cbBuf > 0, VERR_INVALID_PARAMETER);
 
-    int rc = VINF_SUCCESS;
-    RTJSONREADERARGS Args;
     RTJSONTOKENIZER Tokenizer;
-
+    RTJSONREADERARGS Args;
     Args.cbData  = cbBuf;
     Args.u.pbBuf = pbBuf;
 
-    rc = rtJsonTokenizerInit(&Tokenizer, rtJsonTokenizerParseFromBuf, &Args);
+    int rc = rtJsonTokenizerInit(&Tokenizer, rtJsonTokenizerParseFromBuf, &Args);
     if (RT_SUCCESS(rc))
     {
         rc = rtJsonParse(&Tokenizer, phJsonVal, pErrInfo);
@@ -1181,10 +1178,8 @@ RTDECL(int) RTJsonParseFromString(PRTJSONVAL phJsonVal, const char *pszStr, PRTE
     AssertPtrReturn(phJsonVal, VERR_INVALID_POINTER);
     AssertPtrReturn(pszStr, VERR_INVALID_POINTER);
 
-    int rc = VINF_SUCCESS;
     RTJSONTOKENIZER Tokenizer;
-
-    rc = rtJsonTokenizerInit(&Tokenizer, rtJsonTokenizerParseFromString, (void *)pszStr);
+    int rc = rtJsonTokenizerInit(&Tokenizer, rtJsonTokenizerParseFromString, (void *)pszStr);
     if (RT_SUCCESS(rc))
     {
         rc = rtJsonParse(&Tokenizer, phJsonVal, pErrInfo);
diff --git a/src/VBox/Runtime/common/misc/lockvalidator.cpp b/src/VBox/Runtime/common/misc/lockvalidator.cpp
index 1d53e12..bdf6273 100644
--- a/src/VBox/Runtime/common/misc/lockvalidator.cpp
+++ b/src/VBox/Runtime/common/misc/lockvalidator.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -396,7 +396,7 @@ static const char *rtLockValidatorNameThreadHandle(RTTHREAD volatile *phThread)
 /**
  * Launch a simple assertion like complaint w/ panic.
  *
- * @param   SRC_POS             The source position where call is being made from. 
+ * @param   SRC_POS             The source position where call is being made from.
  * @param   pszWhat             What we're complaining about.
  * @param   ...                 Format arguments.
  */
@@ -1568,6 +1568,7 @@ RTDECL(int) RTLockValidatorRecMakeSiblings(PRTLOCKVALRECCORE pRec1, PRTLOCKVALRE
 }
 
 
+#if 0 /* unused */
 /**
  * Gets the lock name for the given record.
  *
@@ -1605,8 +1606,10 @@ DECL_FORCE_INLINE(const char *) rtLockValidatorRecName(PRTLOCKVALRECUNION pRec)
             return "unknown";
     }
 }
+#endif /* unused */
 
 
+#if 0 /* unused */
 /**
  * Gets the class for this locking record.
  *
@@ -1664,7 +1667,7 @@ DECLINLINE(RTLOCKVALCLASSINT *) rtLockValidatorRecGetClass(PRTLOCKVALRECUNION pR
             return NIL_RTLOCKVALCLASS;
     }
 }
-
+#endif /* unused */
 
 /**
  * Gets the class for this locking record and the pointer to the one below it in
@@ -3060,7 +3063,7 @@ RTDECL(void) RTLockValidatorRecExclSetOwner(PRTLOCKVALRECEXCL pRec, RTTHREAD hTh
 
     if (pRecU->Excl.hThread == hThreadSelf)
     {
-        Assert(!fFirstRecursion);
+        Assert(!fFirstRecursion); RT_NOREF_PV(fFirstRecursion);
         pRecU->Excl.cRecursion++;
         rtLockValidatorStackPushRecursion(hThreadSelf, pRecU, pSrcPos);
     }
@@ -3097,7 +3100,7 @@ static void  rtLockValidatorRecExclReleaseOwnerUnchecked(PRTLOCKVALRECUNION pRec
     else
     {
         Assert(c < UINT32_C(0xffff0000));
-        Assert(!fFinalRecursion);
+        Assert(!fFinalRecursion); RT_NOREF_PV(fFinalRecursion);
         rtLockValidatorStackPopRecursion(pThread, pRec);
     }
 }
diff --git a/src/VBox/Runtime/common/misc/message.cpp b/src/VBox/Runtime/common/misc/message.cpp
index 4b821dc..837d7cd 100644
--- a/src/VBox/Runtime/common/misc/message.cpp
+++ b/src/VBox/Runtime/common/misc/message.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/once.cpp b/src/VBox/Runtime/common/misc/once.cpp
index 59f0c84..e23f734 100644
--- a/src/VBox/Runtime/common/misc/once.cpp
+++ b/src/VBox/Runtime/common/misc/once.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/req.cpp b/src/VBox/Runtime/common/misc/req.cpp
index 36dd985..79e6219 100644
--- a/src/VBox/Runtime/common/misc/req.cpp
+++ b/src/VBox/Runtime/common/misc/req.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/reqpool.cpp b/src/VBox/Runtime/common/misc/reqpool.cpp
index e72e797..650ed67 100644
--- a/src/VBox/Runtime/common/misc/reqpool.cpp
+++ b/src/VBox/Runtime/common/misc/reqpool.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/reqqueue.cpp b/src/VBox/Runtime/common/misc/reqqueue.cpp
index f06ae38..1576856 100644
--- a/src/VBox/Runtime/common/misc/reqqueue.cpp
+++ b/src/VBox/Runtime/common/misc/reqqueue.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/s3.cpp b/src/VBox/Runtime/common/misc/s3.cpp
index 32b93a0..930d643 100644
--- a/src/VBox/Runtime/common/misc/s3.cpp
+++ b/src/VBox/Runtime/common/misc/s3.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -38,6 +38,9 @@
 #include <iprt/file.h>
 #include <iprt/stream.h>
 
+#ifdef RT_OS_WINDOWS /* OpenSSL drags in Windows.h, which isn't compatible with -Wall.  */
+# include <iprt/win/windows.h>
+#endif
 #include <curl/curl.h>
 #include <openssl/hmac.h>
 #include <libxml/parser.h>
@@ -968,7 +971,7 @@ RTR3DECL(int) RTS3PutKey(RTS3 hS3, const char *pszBucketName, const char *pszKey
     /* Create the three basic header entries */
     char *apszHead[5] =
     {
-        /* todo: For now we use octet-stream for all types. Later we should try
+        /** @todo For now we use octet-stream for all types. Later we should try
          * to set the right one (libmagic from the file packet could be a
          * candidate for finding the right type). */
         RTStrDup("Content-Type: octet-stream"),            /* Content type entry */
diff --git a/src/VBox/Runtime/common/misc/sanity-c.c b/src/VBox/Runtime/common/misc/sanity-c.c
index 64c0626..da77c20 100644
--- a/src/VBox/Runtime/common/misc/sanity-c.c
+++ b/src/VBox/Runtime/common/misc/sanity-c.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/sanity-cpp.cpp b/src/VBox/Runtime/common/misc/sanity-cpp.cpp
index 68ee16c..d2eb62c 100644
--- a/src/VBox/Runtime/common/misc/sanity-cpp.cpp
+++ b/src/VBox/Runtime/common/misc/sanity-cpp.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/sanity.h b/src/VBox/Runtime/common/misc/sanity.h
index b06185d..097b099 100644
--- a/src/VBox/Runtime/common/misc/sanity.h
+++ b/src/VBox/Runtime/common/misc/sanity.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/semspingpong.cpp b/src/VBox/Runtime/common/misc/semspingpong.cpp
index c065809..927476d 100644
--- a/src/VBox/Runtime/common/misc/semspingpong.cpp
+++ b/src/VBox/Runtime/common/misc/semspingpong.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/setjmp.asm b/src/VBox/Runtime/common/misc/setjmp.asm
index 1d56b17..59db6c8 100644
--- a/src/VBox/Runtime/common/misc/setjmp.asm
+++ b/src/VBox/Runtime/common/misc/setjmp.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/sg.cpp b/src/VBox/Runtime/common/misc/sg.cpp
index 0c00c71..4674a31 100644
--- a/src/VBox/Runtime/common/misc/sg.cpp
+++ b/src/VBox/Runtime/common/misc/sg.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/term.cpp b/src/VBox/Runtime/common/misc/term.cpp
index a9281fa..0635413 100644
--- a/src/VBox/Runtime/common/misc/term.cpp
+++ b/src/VBox/Runtime/common/misc/term.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/misc/thread.cpp b/src/VBox/Runtime/common/misc/thread.cpp
index 0e8a212..3ca5d26 100644
--- a/src/VBox/Runtime/common/misc/thread.cpp
+++ b/src/VBox/Runtime/common/misc/thread.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1565,6 +1565,7 @@ static DECLCALLBACK(int) rtThreadNameThreadCallback(PAVLPVNODECORE pNode, void *
 {
     PRTTHREADINT pThread = (PRTTHREADINT)pNode;
     rtThreadNativeInformDebugger(pThread);
+    RT_NOREF_PV(pvUser);
     return 0;
 }
 
diff --git a/src/VBox/Runtime/common/misc/uri.cpp b/src/VBox/Runtime/common/misc/uri.cpp
index 3e4c7f5..3364a56 100644
--- a/src/VBox/Runtime/common/misc/uri.cpp
+++ b/src/VBox/Runtime/common/misc/uri.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1161,4 +1161,3 @@ RTDECL(char *) RTUriFilePath(const char *pszUri)
     return NULL;
 }
 
-
diff --git a/src/VBox/Runtime/common/misc/zero.asm b/src/VBox/Runtime/common/misc/zero.asm
index 0db7dbc..1b1cc85 100644
--- a/src/VBox/Runtime/common/misc/zero.asm
+++ b/src/VBox/Runtime/common/misc/zero.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2013-2015 Oracle Corporation
+; Copyright (C) 2013-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/net/macstr.cpp b/src/VBox/Runtime/common/net/macstr.cpp
index 3447db2..2ab1616 100644
--- a/src/VBox/Runtime/common/net/macstr.cpp
+++ b/src/VBox/Runtime/common/net/macstr.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/net/netaddrstr.cpp b/src/VBox/Runtime/common/net/netaddrstr.cpp
index 3b13518..393c517 100644
--- a/src/VBox/Runtime/common/net/netaddrstr.cpp
+++ b/src/VBox/Runtime/common/net/netaddrstr.cpp
@@ -10,7 +10,7 @@
 /*
  * Contributed by Oliver Loch.
  *
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/net/netaddrstr2.cpp b/src/VBox/Runtime/common/net/netaddrstr2.cpp
index 0529a63..beed41c 100644
--- a/src/VBox/Runtime/common/net/netaddrstr2.cpp
+++ b/src/VBox/Runtime/common/net/netaddrstr2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -223,6 +223,7 @@ DECLHIDDEN(int) rtNetStrToIPv6AddrBase(const char *pcszAddr, PRTNETADDRIPV6 pAdd
          * Scan forward until we either get complete address or find
          * "::" compressed zero run.
          */
+        pszNext = NULL; /* (MSC incorrectly thinks it may be used unitialized) */
         for (iGroup = 0; iGroup < 8; ++iGroup)
         {
             /* check for embedded IPv4 at the end */
diff --git a/src/VBox/Runtime/common/path/RTPathAbsDup.cpp b/src/VBox/Runtime/common/path/RTPathAbsDup.cpp
index 70a0581..0b6a706 100644
--- a/src/VBox/Runtime/common/path/RTPathAbsDup.cpp
+++ b/src/VBox/Runtime/common/path/RTPathAbsDup.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/path/RTPathAbsEx.cpp b/src/VBox/Runtime/common/path/RTPathAbsEx.cpp
index 0f51c98..e2ec715 100644
--- a/src/VBox/Runtime/common/path/RTPathAbsEx.cpp
+++ b/src/VBox/Runtime/common/path/RTPathAbsEx.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/path/RTPathAbsExDup.cpp b/src/VBox/Runtime/common/path/RTPathAbsExDup.cpp
index d4d9deb..bb7a9a8 100644
--- a/src/VBox/Runtime/common/path/RTPathAbsExDup.cpp
+++ b/src/VBox/Runtime/common/path/RTPathAbsExDup.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/path/RTPathAppend.cpp b/src/VBox/Runtime/common/path/RTPathAppend.cpp
index 182a624..46f072e 100644
--- a/src/VBox/Runtime/common/path/RTPathAppend.cpp
+++ b/src/VBox/Runtime/common/path/RTPathAppend.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/path/RTPathAppendEx.cpp b/src/VBox/Runtime/common/path/RTPathAppendEx.cpp
index 782dce7..a8f1909 100644
--- a/src/VBox/Runtime/common/path/RTPathAppendEx.cpp
+++ b/src/VBox/Runtime/common/path/RTPathAppendEx.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/path/RTPathCalcRelative.cpp b/src/VBox/Runtime/common/path/RTPathCalcRelative.cpp
index fcd2956..569eae1 100644
--- a/src/VBox/Runtime/common/path/RTPathCalcRelative.cpp
+++ b/src/VBox/Runtime/common/path/RTPathCalcRelative.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/path/RTPathChangeToDosSlashes.cpp b/src/VBox/Runtime/common/path/RTPathChangeToDosSlashes.cpp
index 4746557..0621b64 100644
--- a/src/VBox/Runtime/common/path/RTPathChangeToDosSlashes.cpp
+++ b/src/VBox/Runtime/common/path/RTPathChangeToDosSlashes.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -44,7 +44,9 @@
  */
 RTDECL(char *) RTPathChangeToDosSlashes(char *pszPath, bool fForce)
 {
-#if !defined(RT_OS_WINDOWS) && !defined(RT_OS_OS2)
+#if defined(RT_OS_WINDOWS) || defined(RT_OS_OS2)
+    RT_NOREF_PV(fForce);
+#else
     if (fForce)
 #endif
     {
diff --git a/src/VBox/Runtime/common/path/RTPathChangeToUnixSlashes.cpp b/src/VBox/Runtime/common/path/RTPathChangeToUnixSlashes.cpp
index da08377..5324e06 100644
--- a/src/VBox/Runtime/common/path/RTPathChangeToUnixSlashes.cpp
+++ b/src/VBox/Runtime/common/path/RTPathChangeToUnixSlashes.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -44,7 +44,9 @@
  */
 RTDECL(char *) RTPathChangeToUnixSlashes(char *pszPath, bool fForce)
 {
-#if !defined(RT_OS_WINDOWS) && !defined(RT_OS_OS2)
+#if defined(RT_OS_WINDOWS) || defined(RT_OS_OS2)
+    RT_NOREF_PV(fForce);
+#else
     if (fForce)
 #endif
     {
diff --git a/src/VBox/Runtime/common/path/RTPathCopyComponents.cpp b/src/VBox/Runtime/common/path/RTPathCopyComponents.cpp
index a4090f7..53f25c1 100644
--- a/src/VBox/Runtime/common/path/RTPathCopyComponents.cpp
+++ b/src/VBox/Runtime/common/path/RTPathCopyComponents.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/path/RTPathCountComponents.cpp b/src/VBox/Runtime/common/path/RTPathCountComponents.cpp
index a48378d..b776cce 100644
--- a/src/VBox/Runtime/common/path/RTPathCountComponents.cpp
+++ b/src/VBox/Runtime/common/path/RTPathCountComponents.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/path/RTPathEnsureTrailingSeparator.cpp b/src/VBox/Runtime/common/path/RTPathEnsureTrailingSeparator.cpp
index 901afb4..58df91c 100644
--- a/src/VBox/Runtime/common/path/RTPathEnsureTrailingSeparator.cpp
+++ b/src/VBox/Runtime/common/path/RTPathEnsureTrailingSeparator.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/path/RTPathExt.cpp b/src/VBox/Runtime/common/path/RTPathExt.cpp
index 8a51552..39917cd 100644
--- a/src/VBox/Runtime/common/path/RTPathExt.cpp
+++ b/src/VBox/Runtime/common/path/RTPathExt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -64,7 +64,6 @@ RTDECL(char *) RTPathSuffix(const char *pszPath)
         }
     }
 
-    /* will never get here */
-    return NULL;
+    /* not reached */
 }
 
diff --git a/src/VBox/Runtime/common/path/RTPathFilename.cpp b/src/VBox/Runtime/common/path/RTPathFilename.cpp
index c325800..2a54b37 100644
--- a/src/VBox/Runtime/common/path/RTPathFilename.cpp
+++ b/src/VBox/Runtime/common/path/RTPathFilename.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/path/RTPathGlob.cpp b/src/VBox/Runtime/common/path/RTPathGlob.cpp
index 1d56396..8da9170 100644
--- a/src/VBox/Runtime/common/path/RTPathGlob.cpp
+++ b/src/VBox/Runtime/common/path/RTPathGlob.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -43,7 +43,7 @@
 #include <iprt/uni.h>
 
 #if defined(RT_OS_WINDOWS)
-# include <Windows.h>
+# include <iprt/win/windows.h>
 # include "../../r3/win/internal-r3-win.h"
 
 #elif defined(RT_OS_OS2)
@@ -458,6 +458,8 @@ RTPATHMATCHVAR_MULTIPLE_ENVVARS(WinAllCommonProgramFiles, a_apszWinCommonProgram
 static DECLCALLBACK(int) rtPathVarQuery_Path(uint32_t iItem, char *pszBuf, size_t cbBuf, size_t *pcchValue,
                                              PRTPATHMATCHCACHE pCache)
 {
+    RT_NOREF_PV(pCache);
+
     /*
      * Query the PATH value.
      */
@@ -547,6 +549,8 @@ static DECLCALLBACK(int) rtPathVarQuery_Path(uint32_t iItem, char *pszBuf, size_
 static DECLCALLBACK(int) rtPathVarQuery_DosSystemDrive(uint32_t iItem, char *pszBuf, size_t cbBuf, size_t *pcchValue,
                                                        PRTPATHMATCHCACHE pCache)
 {
+    RT_NOREF_PV(pCache);
+
     if (iItem == 0)
     {
         AssertReturn(cbBuf >= 3, VERR_BUFFER_OVERFLOW);
@@ -599,6 +603,8 @@ static DECLCALLBACK(int) rtPathVarQuery_DosSystemDrive(uint32_t iItem, char *psz
 static DECLCALLBACK(int) rtPathVarQuery_WinSystemRoot(uint32_t iItem, char *pszBuf, size_t cbBuf, size_t *pcchValue,
                                                       PRTPATHMATCHCACHE pCache)
 {
+    RT_NOREF_PV(pCache);
+
     if (iItem == 0)
     {
         Assert(pszBuf); Assert(cbBuf);
@@ -618,28 +624,26 @@ static DECLCALLBACK(int) rtPathVarQuery_WinSystemRoot(uint32_t iItem, char *pszB
 #undef RTPATHMATCHVAR_DOUBLE_ENVVAR
 
 /**
- *
- *
- * @author bird (9/29/2015)
+ * Variables.
  */
 static RTPATHMATCHVAR const g_aVariables[] =
 {
-    { RT_STR_TUPLE("Arch"),                     false,  rtPathVarQuery_Arch, rtPathVarMatch_Arch },
-    { RT_STR_TUPLE("Bits"),                     false,  rtPathVarQuery_Bits, rtPathVarMatch_Bits },
-    { RT_STR_TUPLE("Path"),                     true,   rtPathVarQuery_Path, NULL },
+    { RT_STR_TUPLE("Arch"),                     false,  rtPathVarQuery_Arch,                        rtPathVarMatch_Arch },
+    { RT_STR_TUPLE("Bits"),                     false,  rtPathVarQuery_Bits,                        rtPathVarMatch_Bits },
+    { RT_STR_TUPLE("Path"),                     true,   rtPathVarQuery_Path,                        NULL },
 #if defined(RT_OS_WINDOWS) || defined(RT_OS_OS2)
-    { RT_STR_TUPLE("SystemDrive"),              true,   rtPathVarQuery_DosSystemDrive, NULL },
+    { RT_STR_TUPLE("SystemDrive"),              true,   rtPathVarQuery_DosSystemDrive,              NULL },
 #endif
 #ifdef RT_OS_WINDOWS
-    { RT_STR_TUPLE("SystemRoot"),               true,   rtPathVarQuery_WinSystemRoot, NULL },
-    { RT_STR_TUPLE("AppData"),                  true,   rtPathVarQuery_WinAppData, NULL },
-    { RT_STR_TUPLE("ProgramData"),              true,   rtPathVarQuery_WinProgramData, NULL },
-    { RT_STR_TUPLE("ProgramFiles"),             true,   rtPathVarQuery_WinProgramFiles, NULL },
-    { RT_STR_TUPLE("OtherProgramFiles"),        true,   rtPathVarQuery_WinOtherProgramFiles, NULL },
-    { RT_STR_TUPLE("AllProgramFiles"),          true,   rtPathVarQuery_WinAllProgramFiles, NULL },
-    { RT_STR_TUPLE("CommonProgramFiles"),       true,   rtPathVarQuery_WinCommonProgramFiles, NULL },
-    { RT_STR_TUPLE("OtherCommonProgramFiles"),  true,   rtPathVarQuery_WinOtherCommonProgramFiles, NULL },
-    { RT_STR_TUPLE("AllCommonProgramFiles"),    true,   rtPathVarQuery_WinAllCommonProgramFiles, NULL },
+    { RT_STR_TUPLE("SystemRoot"),               true,   rtPathVarQuery_WinSystemRoot,               NULL },
+    { RT_STR_TUPLE("AppData"),                  true,   rtPathVarQuery_WinAppData,                  rtPathVarMatch_WinAppData },
+    { RT_STR_TUPLE("ProgramData"),              true,   rtPathVarQuery_WinProgramData,              rtPathVarMatch_WinProgramData },
+    { RT_STR_TUPLE("ProgramFiles"),             true,   rtPathVarQuery_WinProgramFiles,             rtPathVarMatch_WinProgramFiles },
+    { RT_STR_TUPLE("OtherProgramFiles"),        true,   rtPathVarQuery_WinOtherProgramFiles,        rtPathVarMatch_WinOtherProgramFiles },
+    { RT_STR_TUPLE("AllProgramFiles"),          true,   rtPathVarQuery_WinAllProgramFiles,          rtPathVarMatch_WinAllProgramFiles },
+    { RT_STR_TUPLE("CommonProgramFiles"),       true,   rtPathVarQuery_WinCommonProgramFiles,       rtPathVarMatch_WinCommonProgramFiles },
+    { RT_STR_TUPLE("OtherCommonProgramFiles"),  true,   rtPathVarQuery_WinOtherCommonProgramFiles,  rtPathVarMatch_WinOtherCommonProgramFiles },
+    { RT_STR_TUPLE("AllCommonProgramFiles"),    true,   rtPathVarQuery_WinAllCommonProgramFiles,    rtPathVarMatch_WinAllCommonProgramFiles },
 #endif
 };
 
@@ -1651,7 +1655,7 @@ DECLINLINE(bool) rtPathGlobExecIsMatchFinalWithFileMode(PRTPATHGLOB pGlob, RTFMO
 {
     if (!(pGlob->fFlags & (RTPATHGLOB_F_NO_DIRS | RTPATHGLOB_F_ONLY_DIRS)))
         return true;
-    return RT_BOOL(pGlob->fFlags & RTPATHGLOB_F_ONLY_DIRS) == RTFS_IS_DIRECTORY(pGlob->u.ObjInfo.Attr.fMode);
+    return RT_BOOL(pGlob->fFlags & RTPATHGLOB_F_ONLY_DIRS) == RTFS_IS_DIRECTORY(fMode);
 }
 
 
@@ -1671,6 +1675,10 @@ DECL_NO_INLINE(static, int) rtPathGlobExecRecursiveStarStar(PRTPATHGLOB pGlob, s
                                                             size_t offStarStarPath)
 {
     /** @todo implement multi subdir matching. */
+    RT_NOREF_PV(pGlob);
+    RT_NOREF_PV(offPath);
+    RT_NOREF_PV(iStarStarComp);
+    RT_NOREF_PV(offStarStarPath);
     return VERR_PATH_MATCH_FEATURE_NOT_IMPLEMENTED;
 }
 
diff --git a/src/VBox/Runtime/common/path/RTPathHasExt.cpp b/src/VBox/Runtime/common/path/RTPathHasExt.cpp
index f45a363..0e18b75 100644
--- a/src/VBox/Runtime/common/path/RTPathHasExt.cpp
+++ b/src/VBox/Runtime/common/path/RTPathHasExt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/path/RTPathHasPath.cpp b/src/VBox/Runtime/common/path/RTPathHasPath.cpp
index 7573713..eb5cbf5 100644
--- a/src/VBox/Runtime/common/path/RTPathHasPath.cpp
+++ b/src/VBox/Runtime/common/path/RTPathHasPath.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/path/RTPathJoin.cpp b/src/VBox/Runtime/common/path/RTPathJoin.cpp
index 42445d9..a129b1a 100644
--- a/src/VBox/Runtime/common/path/RTPathJoin.cpp
+++ b/src/VBox/Runtime/common/path/RTPathJoin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/path/RTPathJoinA.cpp b/src/VBox/Runtime/common/path/RTPathJoinA.cpp
index 0ef390b..5f7c33c 100644
--- a/src/VBox/Runtime/common/path/RTPathJoinA.cpp
+++ b/src/VBox/Runtime/common/path/RTPathJoinA.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/path/RTPathJoinEx.cpp b/src/VBox/Runtime/common/path/RTPathJoinEx.cpp
index 58be05c..b026315 100644
--- a/src/VBox/Runtime/common/path/RTPathJoinEx.cpp
+++ b/src/VBox/Runtime/common/path/RTPathJoinEx.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/path/RTPathParse.cpp b/src/VBox/Runtime/common/path/RTPathParse.cpp
index 2e9d497..b6ff53e 100644
--- a/src/VBox/Runtime/common/path/RTPathParse.cpp
+++ b/src/VBox/Runtime/common/path/RTPathParse.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/path/RTPathParse.cpp.h b/src/VBox/Runtime/common/path/RTPathParse.cpp.h
index 09e7cfa..92e357d 100644
--- a/src/VBox/Runtime/common/path/RTPathParse.cpp.h
+++ b/src/VBox/Runtime/common/path/RTPathParse.cpp.h
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -208,7 +208,6 @@ static int RTPATH_STYLE_FN(rtPathParse)(const char *pszPath, PRTPATHPARSED pPars
                     fProps |= RTPATH_PROP_FILENAME;
 
                     /* look for an ? */
-                    uint16_t cDots  = 0;
                     uint32_t offSuffix = offStart + cchComp;
                     while (offSuffix-- > offStart)
                         if (pszPath[offSuffix] == '.')
diff --git a/src/VBox/Runtime/common/path/RTPathParseSimple.cpp b/src/VBox/Runtime/common/path/RTPathParseSimple.cpp
index d897ca7..9f1d455 100644
--- a/src/VBox/Runtime/common/path/RTPathParseSimple.cpp
+++ b/src/VBox/Runtime/common/path/RTPathParseSimple.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -113,6 +113,5 @@ RTDECL(size_t) RTPathParseSimple(const char *pszPath, size_t *pcchDir, ssize_t *
     }
 
     /* will never get here */
-    return 0;
 }
 
diff --git a/src/VBox/Runtime/common/path/RTPathParsedReassemble.cpp b/src/VBox/Runtime/common/path/RTPathParsedReassemble.cpp
index 7d4bebb..4536b63 100644
--- a/src/VBox/Runtime/common/path/RTPathParsedReassemble.cpp
+++ b/src/VBox/Runtime/common/path/RTPathParsedReassemble.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/path/RTPathRealDup.cpp b/src/VBox/Runtime/common/path/RTPathRealDup.cpp
index b7a93eb..b95e18e 100644
--- a/src/VBox/Runtime/common/path/RTPathRealDup.cpp
+++ b/src/VBox/Runtime/common/path/RTPathRealDup.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/path/RTPathRmCmd.cpp b/src/VBox/Runtime/common/path/RTPathRmCmd.cpp
index 96980ab..aad641d 100644
--- a/src/VBox/Runtime/common/path/RTPathRmCmd.cpp
+++ b/src/VBox/Runtime/common/path/RTPathRmCmd.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/path/RTPathSplit.cpp b/src/VBox/Runtime/common/path/RTPathSplit.cpp
index df1ecb9..46a678d 100644
--- a/src/VBox/Runtime/common/path/RTPathSplit.cpp
+++ b/src/VBox/Runtime/common/path/RTPathSplit.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/path/RTPathSplitA.cpp b/src/VBox/Runtime/common/path/RTPathSplitA.cpp
index 7c14eda..aef6277 100644
--- a/src/VBox/Runtime/common/path/RTPathSplitA.cpp
+++ b/src/VBox/Runtime/common/path/RTPathSplitA.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/path/RTPathSplitReassemble.cpp b/src/VBox/Runtime/common/path/RTPathSplitReassemble.cpp
index 24343a3..b8ead92 100644
--- a/src/VBox/Runtime/common/path/RTPathSplitReassemble.cpp
+++ b/src/VBox/Runtime/common/path/RTPathSplitReassemble.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/path/RTPathStartsWithRoot.cpp b/src/VBox/Runtime/common/path/RTPathStartsWithRoot.cpp
index f89f12c..44cae01 100644
--- a/src/VBox/Runtime/common/path/RTPathStartsWithRoot.cpp
+++ b/src/VBox/Runtime/common/path/RTPathStartsWithRoot.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/path/RTPathStripExt.cpp b/src/VBox/Runtime/common/path/RTPathStripExt.cpp
index ee2f7cc..6b709b9 100644
--- a/src/VBox/Runtime/common/path/RTPathStripExt.cpp
+++ b/src/VBox/Runtime/common/path/RTPathStripExt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/path/RTPathStripFilename.cpp b/src/VBox/Runtime/common/path/RTPathStripFilename.cpp
index 66cf98c..34f7809 100644
--- a/src/VBox/Runtime/common/path/RTPathStripFilename.cpp
+++ b/src/VBox/Runtime/common/path/RTPathStripFilename.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/path/RTPathStripTrailingSlash.cpp b/src/VBox/Runtime/common/path/RTPathStripTrailingSlash.cpp
index bde6d10..46cade1 100644
--- a/src/VBox/Runtime/common/path/RTPathStripTrailingSlash.cpp
+++ b/src/VBox/Runtime/common/path/RTPathStripTrailingSlash.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/path/RTPathTraverseList.cpp b/src/VBox/Runtime/common/path/RTPathTraverseList.cpp
index aff30c3..642804e 100644
--- a/src/VBox/Runtime/common/path/RTPathTraverseList.cpp
+++ b/src/VBox/Runtime/common/path/RTPathTraverseList.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/path/comparepaths.cpp b/src/VBox/Runtime/common/path/comparepaths.cpp
index ea2853d..9aba563 100644
--- a/src/VBox/Runtime/common/path/comparepaths.cpp
+++ b/src/VBox/Runtime/common/path/comparepaths.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/path/rtPathRootSpecLen.cpp b/src/VBox/Runtime/common/path/rtPathRootSpecLen.cpp
index 383b6ab..efff5d1 100644
--- a/src/VBox/Runtime/common/path/rtPathRootSpecLen.cpp
+++ b/src/VBox/Runtime/common/path/rtPathRootSpecLen.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/path/rtPathVolumeSpecLen.cpp b/src/VBox/Runtime/common/path/rtPathVolumeSpecLen.cpp
index aa101fe..72b0b57 100644
--- a/src/VBox/Runtime/common/path/rtPathVolumeSpecLen.cpp
+++ b/src/VBox/Runtime/common/path/rtPathVolumeSpecLen.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/path/rtpath-expand-template.cpp.h b/src/VBox/Runtime/common/path/rtpath-expand-template.cpp.h
index bc22da9..8e6ff76 100644
--- a/src/VBox/Runtime/common/path/rtpath-expand-template.cpp.h
+++ b/src/VBox/Runtime/common/path/rtpath-expand-template.cpp.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/rand/rand.cpp b/src/VBox/Runtime/common/rand/rand.cpp
index 471ab54..40e6930 100644
--- a/src/VBox/Runtime/common/rand/rand.cpp
+++ b/src/VBox/Runtime/common/rand/rand.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/rand/randadv.cpp b/src/VBox/Runtime/common/rand/randadv.cpp
index 081c1bd..f3be18b 100644
--- a/src/VBox/Runtime/common/rand/randadv.cpp
+++ b/src/VBox/Runtime/common/rand/randadv.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/rand/randparkmiller.cpp b/src/VBox/Runtime/common/rand/randparkmiller.cpp
index bebb84b..1cdb799 100644
--- a/src/VBox/Runtime/common/rand/randparkmiller.cpp
+++ b/src/VBox/Runtime/common/rand/randparkmiller.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/sort/RTSortApvIsSorted.cpp b/src/VBox/Runtime/common/sort/RTSortApvIsSorted.cpp
index c270958..d4c60fd 100644
--- a/src/VBox/Runtime/common/sort/RTSortApvIsSorted.cpp
+++ b/src/VBox/Runtime/common/sort/RTSortApvIsSorted.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/sort/RTSortIsSorted.cpp b/src/VBox/Runtime/common/sort/RTSortIsSorted.cpp
index bbd0fd6..c38429c 100644
--- a/src/VBox/Runtime/common/sort/RTSortIsSorted.cpp
+++ b/src/VBox/Runtime/common/sort/RTSortIsSorted.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/sort/shellsort.cpp b/src/VBox/Runtime/common/sort/shellsort.cpp
index 1e689a3..32bea07 100644
--- a/src/VBox/Runtime/common/sort/shellsort.cpp
+++ b/src/VBox/Runtime/common/sort/shellsort.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/RTStrCat.cpp b/src/VBox/Runtime/common/string/RTStrCat.cpp
index 204daed..aa6cd06 100644
--- a/src/VBox/Runtime/common/string/RTStrCat.cpp
+++ b/src/VBox/Runtime/common/string/RTStrCat.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/RTStrCatEx.cpp b/src/VBox/Runtime/common/string/RTStrCatEx.cpp
index acee7bf..46d0252 100644
--- a/src/VBox/Runtime/common/string/RTStrCatEx.cpp
+++ b/src/VBox/Runtime/common/string/RTStrCatEx.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/RTStrCatP.cpp b/src/VBox/Runtime/common/string/RTStrCatP.cpp
index 6bdbc24..5f5202a 100644
--- a/src/VBox/Runtime/common/string/RTStrCatP.cpp
+++ b/src/VBox/Runtime/common/string/RTStrCatP.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/RTStrCatPEx.cpp b/src/VBox/Runtime/common/string/RTStrCatPEx.cpp
index 61ce65e..da19004 100644
--- a/src/VBox/Runtime/common/string/RTStrCatPEx.cpp
+++ b/src/VBox/Runtime/common/string/RTStrCatPEx.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/RTStrCmp.cpp b/src/VBox/Runtime/common/string/RTStrCmp.cpp
index f4ba2a5..adfc552 100644
--- a/src/VBox/Runtime/common/string/RTStrCmp.cpp
+++ b/src/VBox/Runtime/common/string/RTStrCmp.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/RTStrCopy.cpp b/src/VBox/Runtime/common/string/RTStrCopy.cpp
index 6384664..74e3116 100644
--- a/src/VBox/Runtime/common/string/RTStrCopy.cpp
+++ b/src/VBox/Runtime/common/string/RTStrCopy.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/RTStrCopyEx.cpp b/src/VBox/Runtime/common/string/RTStrCopyEx.cpp
index 90ee4ec..eac00f5 100644
--- a/src/VBox/Runtime/common/string/RTStrCopyEx.cpp
+++ b/src/VBox/Runtime/common/string/RTStrCopyEx.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/RTStrCopyP.cpp b/src/VBox/Runtime/common/string/RTStrCopyP.cpp
index b642b32..b850390 100644
--- a/src/VBox/Runtime/common/string/RTStrCopyP.cpp
+++ b/src/VBox/Runtime/common/string/RTStrCopyP.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/RTStrCopyPEx.cpp b/src/VBox/Runtime/common/string/RTStrCopyPEx.cpp
index faa47e3..954f6de 100644
--- a/src/VBox/Runtime/common/string/RTStrCopyPEx.cpp
+++ b/src/VBox/Runtime/common/string/RTStrCopyPEx.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/RTStrIStartsWith.cpp b/src/VBox/Runtime/common/string/RTStrIStartsWith.cpp
index 9e67fdf..974f30f 100644
--- a/src/VBox/Runtime/common/string/RTStrIStartsWith.cpp
+++ b/src/VBox/Runtime/common/string/RTStrIStartsWith.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/RTStrNCmp.cpp b/src/VBox/Runtime/common/string/RTStrNCmp.cpp
index 61953b4..0784086 100644
--- a/src/VBox/Runtime/common/string/RTStrNCmp.cpp
+++ b/src/VBox/Runtime/common/string/RTStrNCmp.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/RTStrNLen.cpp b/src/VBox/Runtime/common/string/RTStrNLen.cpp
index 82f830d..00a87cc 100644
--- a/src/VBox/Runtime/common/string/RTStrNLen.cpp
+++ b/src/VBox/Runtime/common/string/RTStrNLen.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/RTStrNLenEx.cpp b/src/VBox/Runtime/common/string/RTStrNLenEx.cpp
index 6a86a33..29e0110 100644
--- a/src/VBox/Runtime/common/string/RTStrNLenEx.cpp
+++ b/src/VBox/Runtime/common/string/RTStrNLenEx.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/RTStrStartsWith.cpp b/src/VBox/Runtime/common/string/RTStrStartsWith.cpp
index 657c55f..9b92ec2 100644
--- a/src/VBox/Runtime/common/string/RTStrStartsWith.cpp
+++ b/src/VBox/Runtime/common/string/RTStrStartsWith.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/RTStrStr.cpp b/src/VBox/Runtime/common/string/RTStrStr.cpp
index 7b3c43e..9d63db0 100644
--- a/src/VBox/Runtime/common/string/RTStrStr.cpp
+++ b/src/VBox/Runtime/common/string/RTStrStr.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/RTUtf16Cat.cpp b/src/VBox/Runtime/common/string/RTUtf16Cat.cpp
index f98783d..22390c0 100644
--- a/src/VBox/Runtime/common/string/RTUtf16Cat.cpp
+++ b/src/VBox/Runtime/common/string/RTUtf16Cat.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/RTUtf16CatAscii.cpp b/src/VBox/Runtime/common/string/RTUtf16CatAscii.cpp
index 97e6a3c..f5d2487 100644
--- a/src/VBox/Runtime/common/string/RTUtf16CatAscii.cpp
+++ b/src/VBox/Runtime/common/string/RTUtf16CatAscii.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/RTUtf16CmpAscii.cpp b/src/VBox/Runtime/common/string/RTUtf16CmpAscii.cpp
index 2ef0842..a349f29 100644
--- a/src/VBox/Runtime/common/string/RTUtf16CmpAscii.cpp
+++ b/src/VBox/Runtime/common/string/RTUtf16CmpAscii.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/RTUtf16Copy.cpp b/src/VBox/Runtime/common/string/RTUtf16Copy.cpp
index 0e91fdd..72d4122 100644
--- a/src/VBox/Runtime/common/string/RTUtf16Copy.cpp
+++ b/src/VBox/Runtime/common/string/RTUtf16Copy.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/RTUtf16CopyAscii.cpp b/src/VBox/Runtime/common/string/RTUtf16CopyAscii.cpp
index 5a7046f..57a3286 100644
--- a/src/VBox/Runtime/common/string/RTUtf16CopyAscii.cpp
+++ b/src/VBox/Runtime/common/string/RTUtf16CopyAscii.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/RTUtf16End.cpp b/src/VBox/Runtime/common/string/RTUtf16End.cpp
index ba256d6..5e97141 100644
--- a/src/VBox/Runtime/common/string/RTUtf16End.cpp
+++ b/src/VBox/Runtime/common/string/RTUtf16End.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/RTUtf16ICmpAscii.cpp b/src/VBox/Runtime/common/string/RTUtf16ICmpAscii.cpp
index 67c0c7c..eda459d 100644
--- a/src/VBox/Runtime/common/string/RTUtf16ICmpAscii.cpp
+++ b/src/VBox/Runtime/common/string/RTUtf16ICmpAscii.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/RTUtf16NLen.cpp b/src/VBox/Runtime/common/string/RTUtf16NLen.cpp
index 3f0bd5f..e5e529c 100644
--- a/src/VBox/Runtime/common/string/RTUtf16NLen.cpp
+++ b/src/VBox/Runtime/common/string/RTUtf16NLen.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/RTUtf16NLenEx.cpp b/src/VBox/Runtime/common/string/RTUtf16NLenEx.cpp
index 7bb6f4c..165c139 100644
--- a/src/VBox/Runtime/common/string/RTUtf16NLenEx.cpp
+++ b/src/VBox/Runtime/common/string/RTUtf16NLenEx.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/RTUtf16PrintHexBytes.cpp b/src/VBox/Runtime/common/string/RTUtf16PrintHexBytes.cpp
index 54ab9b2..61ddc5b 100644
--- a/src/VBox/Runtime/common/string/RTUtf16PrintHexBytes.cpp
+++ b/src/VBox/Runtime/common/string/RTUtf16PrintHexBytes.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/base64.cpp b/src/VBox/Runtime/common/string/base64.cpp
index 41943f6..347d6f9 100644
--- a/src/VBox/Runtime/common/string/base64.cpp
+++ b/src/VBox/Runtime/common/string/base64.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/memchr.asm b/src/VBox/Runtime/common/string/memchr.asm
index d187c46..4b5563d 100644
--- a/src/VBox/Runtime/common/string/memchr.asm
+++ b/src/VBox/Runtime/common/string/memchr.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/memchr.cpp b/src/VBox/Runtime/common/string/memchr.cpp
index 88dd744..7679432 100644
--- a/src/VBox/Runtime/common/string/memchr.cpp
+++ b/src/VBox/Runtime/common/string/memchr.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/memchr_alias.c b/src/VBox/Runtime/common/string/memchr_alias.c
index dba9c1b..207c800 100644
--- a/src/VBox/Runtime/common/string/memchr_alias.c
+++ b/src/VBox/Runtime/common/string/memchr_alias.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/memcmp.asm b/src/VBox/Runtime/common/string/memcmp.asm
index 0b9ec20..e38fd05 100644
--- a/src/VBox/Runtime/common/string/memcmp.asm
+++ b/src/VBox/Runtime/common/string/memcmp.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/memcmp.cpp b/src/VBox/Runtime/common/string/memcmp.cpp
index 623cb97..c9e55ed 100644
--- a/src/VBox/Runtime/common/string/memcmp.cpp
+++ b/src/VBox/Runtime/common/string/memcmp.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/memcmp_alias.c b/src/VBox/Runtime/common/string/memcmp_alias.c
index c11eabc..a2279e0 100644
--- a/src/VBox/Runtime/common/string/memcmp_alias.c
+++ b/src/VBox/Runtime/common/string/memcmp_alias.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/memcpy.asm b/src/VBox/Runtime/common/string/memcpy.asm
index f63d88a..6051910 100644
--- a/src/VBox/Runtime/common/string/memcpy.asm
+++ b/src/VBox/Runtime/common/string/memcpy.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/memcpy.cpp b/src/VBox/Runtime/common/string/memcpy.cpp
index 20d3050..ffef956 100644
--- a/src/VBox/Runtime/common/string/memcpy.cpp
+++ b/src/VBox/Runtime/common/string/memcpy.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/memcpy_alias.c b/src/VBox/Runtime/common/string/memcpy_alias.c
index 5b106e7..e18f6d5 100644
--- a/src/VBox/Runtime/common/string/memcpy_alias.c
+++ b/src/VBox/Runtime/common/string/memcpy_alias.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/memmove.asm b/src/VBox/Runtime/common/string/memmove.asm
index e0c0018..76edfef 100644
--- a/src/VBox/Runtime/common/string/memmove.asm
+++ b/src/VBox/Runtime/common/string/memmove.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/memmove_alias.c b/src/VBox/Runtime/common/string/memmove_alias.c
index c1584dd..6315372 100644
--- a/src/VBox/Runtime/common/string/memmove_alias.c
+++ b/src/VBox/Runtime/common/string/memmove_alias.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/mempcpy.asm b/src/VBox/Runtime/common/string/mempcpy.asm
index 3d82152..1bd4878 100644
--- a/src/VBox/Runtime/common/string/mempcpy.asm
+++ b/src/VBox/Runtime/common/string/mempcpy.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/memrchr.asm b/src/VBox/Runtime/common/string/memrchr.asm
index dbebb94..4aea839 100644
--- a/src/VBox/Runtime/common/string/memrchr.asm
+++ b/src/VBox/Runtime/common/string/memrchr.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/memset.asm b/src/VBox/Runtime/common/string/memset.asm
index 1a94c32..51e4f29 100644
--- a/src/VBox/Runtime/common/string/memset.asm
+++ b/src/VBox/Runtime/common/string/memset.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/memset.cpp b/src/VBox/Runtime/common/string/memset.cpp
index 0df2a90..eb7df80 100644
--- a/src/VBox/Runtime/common/string/memset.cpp
+++ b/src/VBox/Runtime/common/string/memset.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/memset_alias.c b/src/VBox/Runtime/common/string/memset_alias.c
index cffad97..e6af4c4 100644
--- a/src/VBox/Runtime/common/string/memset_alias.c
+++ b/src/VBox/Runtime/common/string/memset_alias.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/ministring.cpp b/src/VBox/Runtime/common/string/ministring.cpp
index 8f6e57e..8d54409 100644
--- a/src/VBox/Runtime/common/string/ministring.cpp
+++ b/src/VBox/Runtime/common/string/ministring.cpp
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/simplepattern.cpp b/src/VBox/Runtime/common/string/simplepattern.cpp
index 38e4479..e81d681 100644
--- a/src/VBox/Runtime/common/string/simplepattern.cpp
+++ b/src/VBox/Runtime/common/string/simplepattern.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/straprintf.cpp b/src/VBox/Runtime/common/string/straprintf.cpp
index 0035281..e269858 100644
--- a/src/VBox/Runtime/common/string/straprintf.cpp
+++ b/src/VBox/Runtime/common/string/straprintf.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/strcache.cpp b/src/VBox/Runtime/common/string/strcache.cpp
index c3317c4..90a6c7f 100644
--- a/src/VBox/Runtime/common/string/strcache.cpp
+++ b/src/VBox/Runtime/common/string/strcache.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -348,6 +348,8 @@ RTDECL(int) RTStrCacheCreate(PRTSTRCACHE phStrCache, const char *pszName)
         }
         RTMemFree(pThis);
     }
+
+    RT_NOREF_PV(pszName);
     return rc;
 }
 RT_EXPORT_SYMBOL(RTStrCacheCreate);
@@ -430,6 +432,7 @@ static void rtStrCacheCheck(PRTSTRCACHEINT pThis)
         }
     }
 # endif
+    RT_NOREF_PV(pThis);
 }
 #else
 # define RTSTRCACHE_CHECK(a_pThis)  do { } while (0)
@@ -849,7 +852,7 @@ RTDECL(const char *) RTStrCacheEnterN(RTSTRCACHE hStrCache, const char *pchStrin
     if (pEntry)
     {
         uint32_t cRefs = ASMAtomicIncU32(&pEntry->cRefs);
-        Assert(cRefs < UINT32_MAX / 2);
+        Assert(cRefs < UINT32_MAX / 2); NOREF(cRefs);
     }
     else
     {
diff --git a/src/VBox/Runtime/common/string/strchr.asm b/src/VBox/Runtime/common/string/strchr.asm
index 9a488b0..07d7486 100644
--- a/src/VBox/Runtime/common/string/strchr.asm
+++ b/src/VBox/Runtime/common/string/strchr.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/strchr_alias.c b/src/VBox/Runtime/common/string/strchr_alias.c
index 1162cb5..2e4d1fd 100644
--- a/src/VBox/Runtime/common/string/strchr_alias.c
+++ b/src/VBox/Runtime/common/string/strchr_alias.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/strcmp.asm b/src/VBox/Runtime/common/string/strcmp.asm
index aeab32c..fe9c8be 100644
--- a/src/VBox/Runtime/common/string/strcmp.asm
+++ b/src/VBox/Runtime/common/string/strcmp.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/strcmp_alias.c b/src/VBox/Runtime/common/string/strcmp_alias.c
index 4abd2f2..4e38b2b 100644
--- a/src/VBox/Runtime/common/string/strcmp_alias.c
+++ b/src/VBox/Runtime/common/string/strcmp_alias.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/strcpy.asm b/src/VBox/Runtime/common/string/strcpy.asm
index a4dd693..25f32bc 100644
--- a/src/VBox/Runtime/common/string/strcpy.asm
+++ b/src/VBox/Runtime/common/string/strcpy.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/strcpy.cpp b/src/VBox/Runtime/common/string/strcpy.cpp
index f5291b9..ead649b 100644
--- a/src/VBox/Runtime/common/string/strcpy.cpp
+++ b/src/VBox/Runtime/common/string/strcpy.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/strcpy_alias.c b/src/VBox/Runtime/common/string/strcpy_alias.c
index cceea23..06c094c 100644
--- a/src/VBox/Runtime/common/string/strcpy_alias.c
+++ b/src/VBox/Runtime/common/string/strcpy_alias.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/strformat.cpp b/src/VBox/Runtime/common/string/strformat.cpp
index bbd47dd..99dd9a2 100644
--- a/src/VBox/Runtime/common/string/strformat.cpp
+++ b/src/VBox/Runtime/common/string/strformat.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -554,7 +554,7 @@ RTDECL(size_t) RTStrFormatV(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput, PFNSTRF
                             cchWidth -= cchStr;
                             while (cchStr-- > 0)
                             {
-/**@todo \#ifndef IN_RC*/
+/** @todo \#ifndef IN_RC*/
 #ifdef IN_RING3
                                 RTUNICP Cp;
                                 RTUtf16GetCpEx(&pwszStr, &Cp);
@@ -588,7 +588,7 @@ RTDECL(size_t) RTStrFormatV(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput, PFNSTRF
                             cchWidth -= cchStr;
                             while (cchStr-- > 0)
                             {
-/**@todo \#ifndef IN_RC*/
+/** @todo \#ifndef IN_RC*/
 #ifdef IN_RING3
                                 char *pszEnd = RTStrPutCp(szTmp, *puszStr++);
                                 cch += pfnOutput(pvArgOutput, szTmp, pszEnd - szTmp);
diff --git a/src/VBox/Runtime/common/string/strformatnum.cpp b/src/VBox/Runtime/common/string/strformatnum.cpp
index 08186a8..15d2e70 100644
--- a/src/VBox/Runtime/common/string/strformatnum.cpp
+++ b/src/VBox/Runtime/common/string/strformatnum.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/strformatrt.cpp b/src/VBox/Runtime/common/string/strformatrt.cpp
index 034f084..51a5f16 100644
--- a/src/VBox/Runtime/common/string/strformatrt.cpp
+++ b/src/VBox/Runtime/common/string/strformatrt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -374,6 +374,7 @@ DECLHIDDEN(size_t) rtstrFormatRt(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput, co
                 } u;
 
                 AssertMsg(!chArgSize, ("Not argument size '%c' for RT types! '%.10s'\n", chArgSize, pszFormatOrg));
+                RT_NOREF_PV(chArgSize);
 
                 /*
                  * Lookup the type - binary search.
@@ -708,6 +709,8 @@ DECLHIDDEN(size_t) rtstrFormatRt(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput, co
                     {
                         const char *pszStart;
                         const char *psz = pszStart = va_arg(*pArgs, const char *);
+                        int cAngle = 0;
+
                         if (!VALID_PTR(psz))
                             return pfnOutput(pvArgOutput, RT_STR_TUPLE("<null>"));
 
@@ -718,11 +721,21 @@ DECLHIDDEN(size_t) rtstrFormatRt(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput, co
                                 psz++;
                                 while ((ch = *psz) != '\0' && (RT_C_IS_BLANK(ch) || ch == '('))
                                     psz++;
-                                if (ch)
+                                if (ch && cAngle == 0)
                                     pszStart = psz;
                             }
                             else if (ch == '(')
                                 break;
+                            else if (ch == '<')
+                            {
+                                cAngle++;
+                                psz++;
+                            }
+                            else if (ch == '>')
+                            {
+                                cAngle--;
+                                psz++;
+                            }
                             else
                                 psz++;
                         }
diff --git a/src/VBox/Runtime/common/string/strformattype.cpp b/src/VBox/Runtime/common/string/strformattype.cpp
index a7332ef..def13a7 100644
--- a/src/VBox/Runtime/common/string/strformattype.cpp
+++ b/src/VBox/Runtime/common/string/strformattype.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/strhash1.cpp b/src/VBox/Runtime/common/string/strhash1.cpp
index 8515246..e45fa87 100644
--- a/src/VBox/Runtime/common/string/strhash1.cpp
+++ b/src/VBox/Runtime/common/string/strhash1.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/stringalloc.cpp b/src/VBox/Runtime/common/string/stringalloc.cpp
index 715b26c..d6dd4d9 100644
--- a/src/VBox/Runtime/common/string/stringalloc.cpp
+++ b/src/VBox/Runtime/common/string/stringalloc.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/strlen.asm b/src/VBox/Runtime/common/string/strlen.asm
index 25e35f1..0580411 100644
--- a/src/VBox/Runtime/common/string/strlen.asm
+++ b/src/VBox/Runtime/common/string/strlen.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/strlen.cpp b/src/VBox/Runtime/common/string/strlen.cpp
index 4ad1fcb..94b6069 100644
--- a/src/VBox/Runtime/common/string/strlen.cpp
+++ b/src/VBox/Runtime/common/string/strlen.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/strlen_alias.c b/src/VBox/Runtime/common/string/strlen_alias.c
index dd73dec..00c5bd8 100644
--- a/src/VBox/Runtime/common/string/strlen_alias.c
+++ b/src/VBox/Runtime/common/string/strlen_alias.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/strncmp.asm b/src/VBox/Runtime/common/string/strncmp.asm
index e580a17..3332f91 100644
--- a/src/VBox/Runtime/common/string/strncmp.asm
+++ b/src/VBox/Runtime/common/string/strncmp.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/strncmp.cpp b/src/VBox/Runtime/common/string/strncmp.cpp
index 91d4555..87fa8be 100644
--- a/src/VBox/Runtime/common/string/strncmp.cpp
+++ b/src/VBox/Runtime/common/string/strncmp.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/strncpy.asm b/src/VBox/Runtime/common/string/strncpy.asm
index fe71a54..1faf3ac 100644
--- a/src/VBox/Runtime/common/string/strncpy.asm
+++ b/src/VBox/Runtime/common/string/strncpy.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/strpbrk.cpp b/src/VBox/Runtime/common/string/strpbrk.cpp
index 7bf218a..f7d678e 100644
--- a/src/VBox/Runtime/common/string/strpbrk.cpp
+++ b/src/VBox/Runtime/common/string/strpbrk.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/strprintf.cpp b/src/VBox/Runtime/common/string/strprintf.cpp
index 26475e3..bf11477 100644
--- a/src/VBox/Runtime/common/string/strprintf.cpp
+++ b/src/VBox/Runtime/common/string/strprintf.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/strspace.cpp b/src/VBox/Runtime/common/string/strspace.cpp
index 52d6e4d..a43ed3d 100644
--- a/src/VBox/Runtime/common/string/strspace.cpp
+++ b/src/VBox/Runtime/common/string/strspace.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/strstrip.cpp b/src/VBox/Runtime/common/string/strstrip.cpp
index cd6c1bd..45265e9 100644
--- a/src/VBox/Runtime/common/string/strstrip.cpp
+++ b/src/VBox/Runtime/common/string/strstrip.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/strtonum.cpp b/src/VBox/Runtime/common/string/strtonum.cpp
index 400520a..66c958a 100644
--- a/src/VBox/Runtime/common/string/strtonum.cpp
+++ b/src/VBox/Runtime/common/string/strtonum.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/strversion.cpp b/src/VBox/Runtime/common/string/strversion.cpp
index b3be2d6..fe4ac54 100644
--- a/src/VBox/Runtime/common/string/strversion.cpp
+++ b/src/VBox/Runtime/common/string/strversion.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/uni.cpp b/src/VBox/Runtime/common/string/uni.cpp
index ced67d2..5763add 100644
--- a/src/VBox/Runtime/common/string/uni.cpp
+++ b/src/VBox/Runtime/common/string/uni.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/unidata-flags.cpp b/src/VBox/Runtime/common/string/unidata-flags.cpp
index e5c1f72..4cb685b 100644
--- a/src/VBox/Runtime/common/string/unidata-flags.cpp
+++ b/src/VBox/Runtime/common/string/unidata-flags.cpp
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/unidata-lower.cpp b/src/VBox/Runtime/common/string/unidata-lower.cpp
index 698b272..7992f62 100644
--- a/src/VBox/Runtime/common/string/unidata-lower.cpp
+++ b/src/VBox/Runtime/common/string/unidata-lower.cpp
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/unidata-upper.cpp b/src/VBox/Runtime/common/string/unidata-upper.cpp
index ea309c1..c3f07ba 100644
--- a/src/VBox/Runtime/common/string/unidata-upper.cpp
+++ b/src/VBox/Runtime/common/string/unidata-upper.cpp
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/uniread.cpp b/src/VBox/Runtime/common/string/uniread.cpp
index f0c304c..b96b6e8 100644
--- a/src/VBox/Runtime/common/string/uniread.cpp
+++ b/src/VBox/Runtime/common/string/uniread.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -59,7 +59,7 @@ static FILE *g_pCurOutFile;
  * @param   pszFormat           The message.
  * @param   ...                 Format arguments.
  */
-static void ParseError(const char *pszFormat, ...)
+static DECL_NO_RETURN(void) ParseError(const char *pszFormat, ...)
 {
     va_list va;
     va_start(va, pszFormat);
@@ -197,7 +197,7 @@ static char *SplitDecompField(char **ppszType)
     if (!psz)
     {
         ParseError("Bad Decomposition Type/Mappings\n");
-        return *ppszType;
+        /* not reached: return *ppszType; */
     }
     *psz++ = '\0';
 
@@ -255,13 +255,13 @@ static RTUNICP ToRange(const char *psz, PRTUNICP pLast)
             if (pszEnd && *pszEnd)
             {
                 ParseError("failed converting '%s' to a number!\n", psz);
-                return ~(RTUNICP)0;
+                /* not reached: return ~(RTUNICP)0;*/
             }
         }
         else
         {
             ParseError("failed converting '%s' to a number!\n", psz);
-            return ~(RTUNICP)0;
+            /* not reached: return ~(RTUNICP)0; */
         }
     }
     *pLast = (RTUNICP)ulLast;
@@ -298,7 +298,7 @@ static PRTUNICP ToMapping(char *psz, unsigned *pcEntries, unsigned cMax)
         if (i >= cMax)
         {
             ParseError("Too many mappings.\n");
-            break;
+            /* not reached: break; */
         }
         if (i >= cAlloc)
         {
@@ -592,7 +592,7 @@ static int ReadUnicodeData(const char *pszBasePath, const char *pszFilename)
         if (CodePoint >= RT_ELEMENTS(g_aCPInfo))
         {
             ParseError("U+05X is out of range\n", CodePoint);
-            continue;
+            /* not reached: continue;*/
         }
 
         /* catchup? */
@@ -601,8 +601,8 @@ static int ReadUnicodeData(const char *pszBasePath, const char *pszFilename)
         if (i != CodePoint)
         {
             ParseError("i=%d CodePoint=%u\n", i, CodePoint);
-            CloseFile(pFile);
-            return 1;
+            /* not reached: CloseFile(pFile);
+            return 1; */
         }
 
         /* this one */
@@ -674,19 +674,19 @@ static int GenerateExcludedData(void)
 static int YesNoMaybePropertyValue(char **ppszNextField)
 {
     if (!**ppszNextField)
-    {
         ParseError("Missing Y/N/M field\n");
-        return 0;
+    else
+    {
+        char *psz = NextField(ppszNextField);
+        if (!strcmp(psz, "N"))
+            return 0;
+        if (!strcmp(psz, "Y"))
+            return 1;
+        if (!strcmp(psz, "M"))
+            return 2;
+        ParseError("Unexpected Y/N/M value: '%s'\n",  psz);
     }
-    char *psz = NextField(ppszNextField);
-    if (!strcmp(psz, "N"))
-        return 0;
-    if (!strcmp(psz, "Y"))
-        return 1;
-    if (!strcmp(psz, "M"))
-        return 2;
-    ParseError("Unexpected Y/N/M value: '%s'\n",  psz);
-    return 0;
+    /* not reached: return 0; */
 }
 
 
@@ -720,7 +720,7 @@ static void ApplyProperty(RTUNICP StartCP, const char *pszProperty, char *pszNex
     if (StartCP >= RT_ELEMENTS(g_aCPInfo))
     {
         ParseError("U+%06X is out of the g_aCPInfo range.\n", StartCP);
-        return;
+        /* not reached: return; */
     }
     struct CPINFO *pCPInfo = &g_aCPInfo[StartCP];
     /* string switch */
@@ -791,7 +791,7 @@ static void ApplyProperty(RTUNICP StartCP, const char *pszProperty, char *pszNex
     else
     {
         ParseError("Unknown property '%s'\n", pszProperty);
-        return;
+        /* not reached: return; */
     }
 
     if (pszNextField && *pszNextField)
@@ -833,7 +833,7 @@ static int ReadProperties(const char *pszBasePath, const char *pszFilename)
         if (!*pszProperty)
         {
             ParseError("no property field.\n");
-            continue;
+            /* not reached: continue; */
         }
 
         RTUNICP LastCP;
@@ -1023,10 +1023,11 @@ int PrintHeader(const char *argv0, const char *pszBaseDir)
     {
         memset(szBuf, 0, sizeof(szBuf));
 #ifdef _MSC_VER
-        _getcwd(szBuf, sizeof(szBuf));
+        if (!_getcwd(szBuf, sizeof(szBuf)))
 #else
-        getcwd(szBuf, sizeof(szBuf));
+        if (!getcwd(szBuf, sizeof(szBuf)))
 #endif
+            return RTEXITCODE_FAILURE;
         pszBaseDir = szBuf;
     }
 
@@ -1039,7 +1040,7 @@ int PrintHeader(const char *argv0, const char *pszBaseDir)
                   " */\n"
                   "\n"
                   "/*\n"
-                  " * Copyright (C) 2006-2015 Oracle Corporation \n"
+                  " * Copyright (C) 2006-2016 Oracle Corporation \n"
                   " *\n"
                   " * This file is part of VirtualBox Open Source Edition (OSE), as\n"
                   " * available from http://www.virtualbox.org. This file is free software;\n"
diff --git a/src/VBox/Runtime/common/string/utf-16-case.cpp b/src/VBox/Runtime/common/string/utf-16-case.cpp
index 956dccf..998d617 100644
--- a/src/VBox/Runtime/common/string/utf-16-case.cpp
+++ b/src/VBox/Runtime/common/string/utf-16-case.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/utf-16-latin-1.cpp b/src/VBox/Runtime/common/string/utf-16-latin-1.cpp
index 17103f1..3b62719 100644
--- a/src/VBox/Runtime/common/string/utf-16-latin-1.cpp
+++ b/src/VBox/Runtime/common/string/utf-16-latin-1.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/utf-16.cpp b/src/VBox/Runtime/common/string/utf-16.cpp
index bd98c45..721a296 100644
--- a/src/VBox/Runtime/common/string/utf-16.cpp
+++ b/src/VBox/Runtime/common/string/utf-16.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -298,32 +298,68 @@ RTDECL(bool) RTUtf16IsValidEncoding(PCRTUTF16 pwsz)
 RT_EXPORT_SYMBOL(RTUtf16IsValidEncoding);
 
 
-RTDECL(ssize_t) RTUtf16PurgeComplementSet(PRTUTF16 pwsz, PCRTUNICP puszValidSet, char chReplacement)
+/**
+ * Helper for RTUtf16PurgeComplementSet.
+ *
+ * @returns true if @a Cp is valid, false if not.
+ * @param   Cp              The code point to validate.
+ * @param   puszValidPairs  Pair of valid code point sets.
+ * @param   cValidPairs     Number of pairs.
+ */
+DECLINLINE(bool) rtUtf16PurgeIsInSet(RTUNICP Cp, PCRTUNICP puszValidPairs, uint32_t cValidPairs)
+{
+    while (cValidPairs-- > 0)
+    {
+        if (   Cp >= puszValidPairs[0]
+            && Cp <= puszValidPairs[1])
+            return true;
+        puszValidPairs += 2;
+    }
+    return false;
+}
+
+
+RTDECL(ssize_t) RTUtf16PurgeComplementSet(PRTUTF16 pwsz, PCRTUNICP puszValidPairs, char chReplacement)
 {
-    size_t cReplacements = 0;
     AssertReturn(chReplacement && (unsigned)chReplacement < 128, -1);
-    /* Validate the encoding. */
+
+    /*
+     * Calc valid pairs and check that we've got an even number.
+     */
+    uint32_t cValidPairs = 0;
+    while (puszValidPairs[cValidPairs * 2])
+    {
+        AssertReturn(puszValidPairs[cValidPairs * 2 + 1], -1);
+        AssertMsg(puszValidPairs[cValidPairs * 2] <= puszValidPairs[cValidPairs * 2 + 1],
+                  ("%#x vs %#x\n", puszValidPairs[cValidPairs * 2], puszValidPairs[cValidPairs * 2 + 1]));
+        cValidPairs++;
+    }
+
+    /*
+     * Do the replacing.
+     */
+    ssize_t cReplacements = 0;
     for (;;)
     {
+        PRTUTF16 pwszCur = pwsz;
         RTUNICP Cp;
-        PCRTUNICP pCp;
-        PRTUTF16 pwszOld = pwsz;
-        if (RT_FAILURE(RTUtf16GetCpEx((PCRTUTF16 *)&pwsz, &Cp)))
-            return -1;
-        if (!Cp)
-            break;
-        for (pCp = puszValidSet; *pCp; pCp += 2)
+        int rc = RTUtf16GetCpEx((PCRTUTF16 *)&pwsz, &Cp);
+        if (RT_SUCCESS(rc))
         {
-            AssertReturn(*(pCp + 1), -1);
-            if (*pCp <= Cp && *(pCp + 1) >= Cp) /* No, I won't do * and ++. */
+            if (Cp)
+            {
+                if (!rtUtf16PurgeIsInSet(Cp, puszValidPairs, cValidPairs))
+                {
+                    for (; pwszCur != pwsz; ++pwszCur)
+                        *pwszCur = chReplacement;
+                    ++cReplacements;
+                }
+            }
+            else
                 break;
         }
-        if (!*pCp)
-        {
-            for (; pwszOld != pwsz; ++pwszOld)
-                *pwszOld = chReplacement;
-            ++cReplacements;
-        }
+        else
+            return -1;
     }
     return cReplacements;
 }
diff --git a/src/VBox/Runtime/common/string/utf-8-case.cpp b/src/VBox/Runtime/common/string/utf-8-case.cpp
index 9969d4c..425e3a3 100644
--- a/src/VBox/Runtime/common/string/utf-8-case.cpp
+++ b/src/VBox/Runtime/common/string/utf-8-case.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/utf-8-case2.cpp b/src/VBox/Runtime/common/string/utf-8-case2.cpp
index d1d5636..6020870 100644
--- a/src/VBox/Runtime/common/string/utf-8-case2.cpp
+++ b/src/VBox/Runtime/common/string/utf-8-case2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/string/utf-8.cpp b/src/VBox/Runtime/common/string/utf-8.cpp
index e47d906..cf8fd2c 100644
--- a/src/VBox/Runtime/common/string/utf-8.cpp
+++ b/src/VBox/Runtime/common/string/utf-8.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -363,31 +363,68 @@ RTDECL(size_t) RTStrPurgeEncoding(char *psz)
 RT_EXPORT_SYMBOL(RTStrPurgeEncoding);
 
 
-RTDECL(ssize_t) RTStrPurgeComplementSet(char *psz, PCRTUNICP puszValidSet, char chReplacement)
+/**
+ * Helper for RTStrPurgeComplementSet.
+ *
+ * @returns true if @a Cp is valid, false if not.
+ * @param   Cp              The code point to validate.
+ * @param   puszValidPairs  Pair of valid code point sets.
+ * @param   cValidPairs     Number of pairs.
+ */
+DECLINLINE(bool) rtStrPurgeIsInSet(RTUNICP Cp, PCRTUNICP puszValidPairs, uint32_t cValidPairs)
+{
+    while (cValidPairs-- > 0)
+    {
+        if (   Cp >= puszValidPairs[0]
+            && Cp <= puszValidPairs[1])
+            return true;
+        puszValidPairs += 2;
+    }
+    return false;
+}
+
+
+RTDECL(ssize_t) RTStrPurgeComplementSet(char *psz, PCRTUNICP puszValidPairs, char chReplacement)
 {
-    size_t cReplacements = 0;
     AssertReturn(chReplacement && (unsigned)chReplacement < 128, -1);
+
+    /*
+     * Calc valid pairs and check that we've got an even number.
+     */
+    uint32_t cValidPairs = 0;
+    while (puszValidPairs[cValidPairs * 2])
+    {
+        AssertReturn(puszValidPairs[cValidPairs * 2 + 1], -1);
+        AssertMsg(puszValidPairs[cValidPairs * 2] <= puszValidPairs[cValidPairs * 2 + 1],
+                  ("%#x vs %#x\n", puszValidPairs[cValidPairs * 2], puszValidPairs[cValidPairs * 2 + 1]));
+        cValidPairs++;
+    }
+
+    /*
+     * Do the replacing.
+     */
+    ssize_t cReplacements = 0;
     for (;;)
     {
-        RTUNICP Cp;
-        PCRTUNICP pCp;
-        char *pszOld = psz;
-        if (RT_FAILURE(RTStrGetCpEx((const char **)&psz, &Cp)))
-            return -1;
-        if (!Cp)
-            break;
-        for (pCp = puszValidSet; *pCp; pCp += 2)
+        char    *pszCur = psz;
+        RTUNICP  Cp;
+        int rc = RTStrGetCpEx((const char **)&psz, &Cp);
+        if (RT_SUCCESS(rc))
         {
-            AssertReturn(*(pCp + 1), -1);
-            if (*pCp <= Cp && *(pCp + 1) >= Cp) /* No, I won't do * and ++. */
+            if (Cp)
+            {
+                if (!rtStrPurgeIsInSet(Cp, puszValidPairs, cValidPairs))
+                {
+                    for (; pszCur != psz; ++pszCur)
+                        *pszCur = chReplacement;
+                    ++cReplacements;
+                }
+            }
+            else
                 break;
         }
-        if (!*pCp)
-        {
-            for (; pszOld != psz; ++pszOld)
-                *pszOld = chReplacement;
-            ++cReplacements;
-        }
+        else
+            return -1;
     }
     return cReplacements;
 }
diff --git a/src/VBox/Runtime/common/table/avl_Enum.cpp.h b/src/VBox/Runtime/common/table/avl_Enum.cpp.h
index 1ab59f7..f7b62e2 100644
--- a/src/VBox/Runtime/common/table/avl_Enum.cpp.h
+++ b/src/VBox/Runtime/common/table/avl_Enum.cpp.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/time/time.cpp b/src/VBox/Runtime/common/time/time.cpp
index 2f0ccff..ee02cb0 100644
--- a/src/VBox/Runtime/common/time/time.cpp
+++ b/src/VBox/Runtime/common/time/time.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/time/timeprog.cpp b/src/VBox/Runtime/common/time/timeprog.cpp
index 146481d..56fcb33 100644
--- a/src/VBox/Runtime/common/time/timeprog.cpp
+++ b/src/VBox/Runtime/common/time/timeprog.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/time/timesup.cpp b/src/VBox/Runtime/common/time/timesup.cpp
index 9e9ada7..34652a9 100644
--- a/src/VBox/Runtime/common/time/timesup.cpp
+++ b/src/VBox/Runtime/common/time/timesup.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -131,6 +131,7 @@ static DECLCALLBACK(void) rtTimeNanoTSInternalBitch(PRTTIMENANOTSDATA pData, uin
 static DECLCALLBACK(uint64_t) rtTimeNanoTSInternalBadCpuIndex(PRTTIMENANOTSDATA pData, uint16_t idApic,
                                                               uint16_t iCpuSet, uint16_t iGipCpu)
 {
+    RT_NOREF_PV(pData); RT_NOREF_PV(idApic); RT_NOREF_PV(iCpuSet); RT_NOREF_PV(iGipCpu);
 # ifndef IN_RC
     AssertMsgFailed(("idApic=%#x iCpuSet=%#x iGipCpu=%#x\n", idApic, iCpuSet, iGipCpu));
     return RTTimeSystemNanoTS();
diff --git a/src/VBox/Runtime/common/time/timesupA.asm b/src/VBox/Runtime/common/time/timesupA.asm
index 009a482..48e5665 100644
--- a/src/VBox/Runtime/common/time/timesupA.asm
+++ b/src/VBox/Runtime/common/time/timesupA.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/time/timesupA.mac b/src/VBox/Runtime/common/time/timesupA.mac
index 865df83..db01a70 100644
--- a/src/VBox/Runtime/common/time/timesupA.mac
+++ b/src/VBox/Runtime/common/time/timesupA.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/time/timesupref.cpp b/src/VBox/Runtime/common/time/timesupref.cpp
index 256b735..5d87827 100644
--- a/src/VBox/Runtime/common/time/timesupref.cpp
+++ b/src/VBox/Runtime/common/time/timesupref.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/time/timesupref.h b/src/VBox/Runtime/common/time/timesupref.h
index 4cd54c8..4219506 100644
--- a/src/VBox/Runtime/common/time/timesupref.h
+++ b/src/VBox/Runtime/common/time/timesupref.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -313,6 +313,9 @@ RTDECL(uint64_t) rtTimeNanoTSInternalRef(PRTTIMENANOTSDATA pData)
                 /*
                  * No joy must try again.
                  */
+#ifdef _MSC_VER
+# pragma warning(disable: 4702)
+#endif
 #ifndef IN_RING3
                 ASMSetFlags(uFlags);
 #endif
diff --git a/src/VBox/Runtime/common/time/timesysalias.cpp b/src/VBox/Runtime/common/time/timesysalias.cpp
index 434a57a..9c85caf 100644
--- a/src/VBox/Runtime/common/time/timesysalias.cpp
+++ b/src/VBox/Runtime/common/time/timesysalias.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/vfs/vfsbase.cpp b/src/VBox/Runtime/common/vfs/vfsbase.cpp
index c64f8c2..d0671ae 100644
--- a/src/VBox/Runtime/common/vfs/vfsbase.cpp
+++ b/src/VBox/Runtime/common/vfs/vfsbase.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/vfs/vfschain.cpp b/src/VBox/Runtime/common/vfs/vfschain.cpp
index e4387d7..8fdc3f2 100644
--- a/src/VBox/Runtime/common/vfs/vfschain.cpp
+++ b/src/VBox/Runtime/common/vfs/vfschain.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/vfs/vfsiosmisc.cpp b/src/VBox/Runtime/common/vfs/vfsiosmisc.cpp
index 73a3507..5a1438a 100644
--- a/src/VBox/Runtime/common/vfs/vfsiosmisc.cpp
+++ b/src/VBox/Runtime/common/vfs/vfsiosmisc.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -219,7 +219,7 @@ RTDECL(void) RTVfsIoStrmReadAllFree(void *pvBuf, size_t cbBuf)
 
     /* Make sure the caller isn't messing with us. Hardcoded, but works. */
     Assert(((size_t *)pvBuf)[0] == READ_ALL_HEADER_MAGIC);
-    Assert(((size_t *)pvBuf)[1] == cbBuf);
+    Assert(((size_t *)pvBuf)[1] == cbBuf); RT_NOREF_PV(cbBuf);
 
     /* Free it. */
     RTMemFree(pvBuf);
diff --git a/src/VBox/Runtime/common/vfs/vfsmemory.cpp b/src/VBox/Runtime/common/vfs/vfsmemory.cpp
index 1e11e20..648630d 100644
--- a/src/VBox/Runtime/common/vfs/vfsmemory.cpp
+++ b/src/VBox/Runtime/common/vfs/vfsmemory.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -797,8 +797,20 @@ RTDECL(int) RTVfsMemFileCreate(RTVFSIOSTREAM hVfsIos, size_t cbEstimate, PRTVFSF
         pThis->Base.ObjInfo.Attr.fMode = RTFS_DOS_NT_NORMAL | RTFS_TYPE_FILE | RTFS_UNIX_IRWXU;
         rtVfsMemFileInit(pThis, cbEstimate, RTFILE_O_READ | RTFILE_O_WRITE);
 
-        *phVfsFile = hVfsFile;
-        return VINF_SUCCESS;
+        if (hVfsIos != NIL_RTVFSIOSTREAM)
+        {
+            RTVFSIOSTREAM hVfsIosDst = RTVfsFileToIoStream(hVfsFile);
+            rc = RTVfsUtilPumpIoStreams(hVfsIos, hVfsIosDst, pThis->cbExtent);
+            RTVfsIoStrmRelease(hVfsIosDst);
+        }
+
+        if (RT_SUCCESS(rc))
+        {
+            *phVfsFile = hVfsFile;
+            return VINF_SUCCESS;
+        }
+
+        RTVfsFileRelease(hVfsFile);
     }
     return rc;
 }
diff --git a/src/VBox/Runtime/common/vfs/vfsmisc.cpp b/src/VBox/Runtime/common/vfs/vfsmisc.cpp
index c08c1f9..38749bd 100644
--- a/src/VBox/Runtime/common/vfs/vfsmisc.cpp
+++ b/src/VBox/Runtime/common/vfs/vfsmisc.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/vfs/vfsreadahead.cpp b/src/VBox/Runtime/common/vfs/vfsreadahead.cpp
index 304f7d4..291b807 100644
--- a/src/VBox/Runtime/common/vfs/vfsreadahead.cpp
+++ b/src/VBox/Runtime/common/vfs/vfsreadahead.cpp
@@ -347,6 +347,7 @@ static DECLCALLBACK(int) rtVfsReadAhead_Read(void *pvThis, RTFOFF off, PCRTSGBUF
  */
 static DECLCALLBACK(int) rtVfsReadAhead_Write(void *pvThis, RTFOFF off, PCRTSGBUF pSgBuf, bool fBlocking, size_t *pcbWritten)
 {
+    RT_NOREF_PV(pvThis); RT_NOREF_PV(off); RT_NOREF_PV(pSgBuf); RT_NOREF_PV(fBlocking); RT_NOREF_PV(pcbWritten);
     AssertFailed();
     return VERR_ACCESS_DENIED;
 }
@@ -402,7 +403,7 @@ static DECLCALLBACK(int) rtVfsReadAhead_SetMode(void *pvThis, RTFMODE fMode, RTF
     AssertReturn(pThis->hFile != NIL_RTVFSFILE, VERR_NOT_SUPPORTED);
 
     RTCritSectEnter(&pThis->IoCritSect);
-    /// @todo int rc = RTVfsFileSetMode(pThis->hFile, fMode, fMask);
+    RT_NOREF_PV(fMode); RT_NOREF_PV(fMask); /// @todo int rc = RTVfsFileSetMode(pThis->hFile, fMode, fMask);
     int rc = VERR_NOT_SUPPORTED;
     RTCritSectLeave(&pThis->IoCritSect);
 
@@ -414,12 +415,13 @@ static DECLCALLBACK(int) rtVfsReadAhead_SetMode(void *pvThis, RTFMODE fMode, RTF
  * @interface_method_impl{RTVFSOBJSETOPS,pfnSetTimes}
  */
 static DECLCALLBACK(int) rtVfsReadAhead_SetTimes(void *pvThis, PCRTTIMESPEC pAccessTime, PCRTTIMESPEC pModificationTime,
-                                               PCRTTIMESPEC pChangeTime, PCRTTIMESPEC pBirthTime)
+                                                 PCRTTIMESPEC pChangeTime, PCRTTIMESPEC pBirthTime)
 {
     PRTVFSREADAHEAD pThis = (PRTVFSREADAHEAD)pvThis;
     AssertReturn(pThis->hFile != NIL_RTVFSFILE, VERR_NOT_SUPPORTED);
 
     RTCritSectEnter(&pThis->IoCritSect);
+    RT_NOREF_PV(pAccessTime); RT_NOREF_PV(pModificationTime); RT_NOREF_PV(pChangeTime); RT_NOREF_PV(pBirthTime);
     /// @todo int rc = RTVfsFileSetTimes(pThis->hFile, pAccessTime, pModificationTime, pChangeTime, pBirthTime);
     int rc = VERR_NOT_SUPPORTED;
     RTCritSectLeave(&pThis->IoCritSect);
@@ -437,6 +439,7 @@ static DECLCALLBACK(int) rtVfsReadAhead_SetOwner(void *pvThis, RTUID uid, RTGID
     AssertReturn(pThis->hFile != NIL_RTVFSFILE, VERR_NOT_SUPPORTED);
 
     RTCritSectEnter(&pThis->IoCritSect);
+    RT_NOREF_PV(uid); RT_NOREF_PV(gid);
     /// @todo int rc = RTVfsFileSetOwner(pThis->hFile, uid, gid);
     int rc = VERR_NOT_SUPPORTED;
     RTCritSectLeave(&pThis->IoCritSect);
@@ -459,7 +462,11 @@ static DECLCALLBACK(int) rtVfsReadAhead_Seek(void *pvThis, RTFOFF offSeek, unsig
     uint64_t offActual = UINT64_MAX;
     int rc = RTVfsFileSeek(pThis->hFile, offSeek, uMethod, &offActual);
     if (RT_SUCCESS(rc))
+    {
         pThis->offConsumer = offActual;
+        if (poffActual)
+            *poffActual = offActual;
+    }
 
     RTCritSectLeave(&pThis->BufferCritSect);
     RTCritSectLeave(&pThis->IoCritSect);
@@ -582,9 +589,8 @@ static DECLCALLBACK(int) rtVfsReadAheadThreadProc(RTTHREAD hThreadSelf, void *pv
             if (!pThis->fTerminateThread)
             {
 
-                pBufDesc->off      = RTVfsIoStrmTell(pThis->hIos);
-                size_t cbRead      = 0;
-                size_t cbToRead    = pThis->cbBuffer;
+                pBufDesc->off = RTVfsIoStrmTell(pThis->hIos);
+                size_t cbRead = 0;
                 rc = RTVfsIoStrmRead(pThis->hIos, pBufDesc->pbBuffer, pThis->cbBuffer, true /*fBlocking*/, &cbRead);
                 if (RT_SUCCESS(rc))
                 {
diff --git a/src/VBox/Runtime/common/vfs/vfsstdfile.cpp b/src/VBox/Runtime/common/vfs/vfsstdfile.cpp
index 19bcf50..252ad25 100644
--- a/src/VBox/Runtime/common/vfs/vfsstdfile.cpp
+++ b/src/VBox/Runtime/common/vfs/vfsstdfile.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/vfs/vfsstdpipe.cpp b/src/VBox/Runtime/common/vfs/vfsstdpipe.cpp
index 68ebacd..65365e4 100644
--- a/src/VBox/Runtime/common/vfs/vfsstdpipe.cpp
+++ b/src/VBox/Runtime/common/vfs/vfsstdpipe.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/zip/gzipvfs.cpp b/src/VBox/Runtime/common/zip/gzipvfs.cpp
index 4f927c0..277595e 100644
--- a/src/VBox/Runtime/common/zip/gzipvfs.cpp
+++ b/src/VBox/Runtime/common/zip/gzipvfs.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/zip/pkzip.cpp b/src/VBox/Runtime/common/zip/pkzip.cpp
index 320ea72..a2e4683 100644
--- a/src/VBox/Runtime/common/zip/pkzip.cpp
+++ b/src/VBox/Runtime/common/zip/pkzip.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -90,6 +90,7 @@ static DECLCALLBACK(int) memFssIos_Read(void *pvThis, RTFOFF off, PCRTSGBUF pSgB
 {
     PMEMIOSTREAM pThis = (PMEMIOSTREAM)pvThis;
     Assert(pSgBuf->cSegs == 1);
+    RT_NOREF_PV(fBlocking);
 
     if (off < 0)
         off = pThis->off;
@@ -118,6 +119,7 @@ static DECLCALLBACK(int) memFssIos_Read(void *pvThis, RTFOFF off, PCRTSGBUF pSgB
  */
 static DECLCALLBACK(int) memFssIos_Write(void *pvThis, RTFOFF off, PCRTSGBUF pSgBuf, bool fBlocking, size_t *pcbWritten)
 {
+    RT_NOREF_PV(pvThis); RT_NOREF_PV(off); RT_NOREF_PV(pSgBuf); RT_NOREF_PV(fBlocking); RT_NOREF_PV(pcbWritten);
     return VERR_NOT_IMPLEMENTED;
 }
 
@@ -126,6 +128,7 @@ static DECLCALLBACK(int) memFssIos_Write(void *pvThis, RTFOFF off, PCRTSGBUF pSg
  */
 static DECLCALLBACK(int) memFssIos_Flush(void *pvThis)
 {
+    RT_NOREF_PV(pvThis);
     return VERR_NOT_IMPLEMENTED;
 }
 
@@ -134,6 +137,7 @@ static DECLCALLBACK(int) memFssIos_Flush(void *pvThis)
  */
 static DECLCALLBACK(int) memFssIos_PollOne(void *pvThis, uint32_t fEvents, RTMSINTERVAL cMillies, bool fIntr, uint32_t *pfRetEvents)
 {
+    RT_NOREF_PV(pvThis); RT_NOREF_PV(fEvents); RT_NOREF_PV(cMillies); RT_NOREF_PV(fIntr); RT_NOREF_PV(pfRetEvents);
     return VERR_NOT_IMPLEMENTED;
 }
 
diff --git a/src/VBox/Runtime/common/zip/pkzipvfs.cpp b/src/VBox/Runtime/common/zip/pkzipvfs.cpp
index b8c702e..e386a3f 100644
--- a/src/VBox/Runtime/common/zip/pkzipvfs.cpp
+++ b/src/VBox/Runtime/common/zip/pkzipvfs.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -405,6 +405,8 @@ static int rtZipPkzipReaderDecodeDosTime(PRTTIMESPEC pTimeSpec, uint16_t u16Time
  */
 static int rtZipPkzipParseLocalFileHeader(PRTZIPPKZIPREADER pThis, PRTZIPPKZIPLOCALFILEHDR pLfh, size_t *pcbExtra)
 {
+    RT_NOREF_PV(pThis);
+
     if (pLfh->cbFilename >= sizeof(pThis->szName))
         return VERR_PKZIP_NAME_TOO_LONG;
 
@@ -477,7 +479,6 @@ static int rtZipPkzipParseCentrDirHeaderExtra(PRTZIPPKZIPREADER pThis, uint8_t *
     int rc = RTStrCopyEx(pThis->szName, sizeof(pThis->szName), (const char*)pu8Buf, pThis->cdh.cbFilename);
     if (RT_SUCCESS(rc))
     {
-        uint8_t *offStart = pu8Buf;
         pu8Buf += pThis->cdh.cbFilename;
         cb      = pThis->cdh.cbExtra;
         while (cb >= 4)
@@ -766,8 +767,7 @@ static int rtZipPkzipFssIosReadEocb(PRTZIPPKZIPFSSTREAM pThis)
  */
 static DECLCALLBACK(int) rtZipPkzipFssBaseObj_Close(void *pvThis)
 {
-    PRTZIPPKZIPBASEOBJ pThis = (PRTZIPPKZIPBASEOBJ)pvThis;
-
+    NOREF(pvThis);
     return VINF_SUCCESS;
 }
 
@@ -899,6 +899,7 @@ static DECLCALLBACK(int) rtZipPkzipFssIos_Read(void *pvThis, RTFOFF off, PCRTSGB
 {
     PRTZIPPKZIPIOSTREAM pThis = (PRTZIPPKZIPIOSTREAM)pvThis;
     Assert(pSgBuf->cSegs == 1);
+    RT_NOREF_PV(fBlocking);
 
     if (off < 0)
         off = pThis->offFile;
@@ -982,13 +983,15 @@ static DECLCALLBACK(int) rtZipPkzipFssIos_Read(void *pvThis, RTFOFF off, PCRTSGB
     return rc;
 }
 
-static DECLCALLBACK(int) rtZipPkzipFssIos_Write(void *pvThis, RTFOFF off, PCRTSGBUF pSgBuf, bool fBlocking, size_t *pcWritten)
+static DECLCALLBACK(int) rtZipPkzipFssIos_Write(void *pvThis, RTFOFF off, PCRTSGBUF pSgBuf, bool fBlocking, size_t *pcbWritten)
 {
+    RT_NOREF_PV(pvThis); RT_NOREF_PV(off); RT_NOREF_PV(pSgBuf); RT_NOREF_PV(fBlocking); RT_NOREF_PV(pcbWritten);
     return VERR_NOT_IMPLEMENTED;
 }
 
 static DECLCALLBACK(int) rtZipPkzipFssIos_Flush(void *pvThis)
 {
+    RT_NOREF_PV(pvThis);
     return VERR_NOT_IMPLEMENTED;
 }
 
diff --git a/src/VBox/Runtime/common/zip/tar.cpp b/src/VBox/Runtime/common/zip/tar.cpp
index 4c8eee2..af9ab72 100644
--- a/src/VBox/Runtime/common/zip/tar.cpp
+++ b/src/VBox/Runtime/common/zip/tar.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -242,13 +242,13 @@ RTR3DECL(int) RTTarClose(RTTAR hTar)
 
     if (pInt->hVfsFss != NIL_RTVFSFSSTREAM)
     {
-        uint32_t cRefs = RTVfsFsStrmRelease(pInt->hVfsFss); Assert(cRefs != UINT32_MAX);
+        uint32_t cRefs = RTVfsFsStrmRelease(pInt->hVfsFss); Assert(cRefs != UINT32_MAX); NOREF(cRefs);
         pInt->hVfsFss  = NIL_RTVFSFSSTREAM;
     }
 
     if (pInt->hVfsFile != NIL_RTVFSFILE)
     {
-        uint32_t cRefs = RTVfsFileRelease(pInt->hVfsFile); Assert(cRefs != UINT32_MAX);
+        uint32_t cRefs = RTVfsFileRelease(pInt->hVfsFile); Assert(cRefs != UINT32_MAX); NOREF(cRefs);
         pInt->hVfsFile = NIL_RTVFSFILE;
     }
 
@@ -361,7 +361,7 @@ RTR3DECL(int) RTTarFileOpen(RTTAR hTar, PRTTARFILE phFile, const char *pszFilena
         {
             if (pInt->hVfsFss != NIL_RTVFSFSSTREAM)
             {
-                uint32_t cRefs = RTVfsFsStrmRelease(pInt->hVfsFss); Assert(cRefs != UINT32_MAX);
+                uint32_t cRefs = RTVfsFsStrmRelease(pInt->hVfsFss); Assert(cRefs != UINT32_MAX); NOREF(cRefs);
                 pInt->hVfsFss  = NIL_RTVFSFSSTREAM;
             }
 
@@ -655,7 +655,7 @@ RTR3DECL(int) RTTarFileClose(RTTARFILE hFile)
             }
 
             /* Create a header record for the file */
-            /* Todo: mode, gid, uid, mtime should be setable (or detected myself) */
+            /** @todo mode, gid, uid, mtime should be setable (or detected myself) */
             RTTIMESPEC time;
             RTTimeNow(&time);
             rc = rtTarCreateHeaderRecord(&record, pFileInt->pszFilename, pFileInt->cbSize,
diff --git a/src/VBox/Runtime/common/zip/tar.h b/src/VBox/Runtime/common/zip/tar.h
index c215e34..c9dcedb 100644
--- a/src/VBox/Runtime/common/zip/tar.h
+++ b/src/VBox/Runtime/common/zip/tar.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/zip/tarcmd.cpp b/src/VBox/Runtime/common/zip/tarcmd.cpp
index 5c15ac1..400df51 100644
--- a/src/VBox/Runtime/common/zip/tarcmd.cpp
+++ b/src/VBox/Runtime/common/zip/tarcmd.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -400,6 +400,7 @@ static bool rtZipTarHasEscapeSequence(const char *pszName)
     return false;
 }
 
+#if !defined(RT_OS_WINDOWS) && !defined(RT_OS_OS2)
 
 /**
  * Queries the user ID to use when extracting a member.
@@ -462,6 +463,7 @@ static RTEXITCODE rtZipTarQueryExtractGroup(PRTZIPTARCMDOPS pOpts, PCRTFSOBJINFO
     return rcExit;
 }
 
+#endif /* !defined(RT_OS_WINDOWS) && !defined(RT_OS_OS2) */
 
 
 /**
@@ -546,6 +548,8 @@ static RTEXITCODE rtZipTarCmdExtractFile(PRTZIPTARCMDOPS pOpts, RTVFSOBJ hVfsObj
                         rcExit = RTMsgErrorExit(RTEXITCODE_FAILURE, "%s: Error owner/group: %Rrc", pszDst, rc);
                 }
             }
+#else
+            RT_NOREF_PV(pOwner); RT_NOREF_PV(pGroup);
 #endif
 
             RTFMODE fMode = (pUnixInfo->Attr.fMode & pOpts->fFileModeAndMask) | pOpts->fFileModeOrMask;
@@ -595,7 +599,6 @@ static RTEXITCODE rtZipTarCmdExtractCallback(PRTZIPTARCMDOPS pOpts, RTVFSOBJ hVf
                               "RTVfsObjQueryInfo(,,UNIX_OWNER) returned %Rrc on '%s'",
                               rc, pszName);
 
-    const char *pszLinkType = NULL;
     char szTarget[RTPATH_MAX];
     szTarget[0] = '\0';
     RTVFSSYMLINK hVfsSymlink = RTVfsObjToSymlink(hVfsObj);
diff --git a/src/VBox/Runtime/common/zip/tarvfs.cpp b/src/VBox/Runtime/common/zip/tarvfs.cpp
index 993a505..c2a75a6 100644
--- a/src/VBox/Runtime/common/zip/tarvfs.cpp
+++ b/src/VBox/Runtime/common/zip/tarvfs.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/zip/unzipcmd.cpp b/src/VBox/Runtime/common/zip/unzipcmd.cpp
index aad799f..eb6e7e3 100644
--- a/src/VBox/Runtime/common/zip/unzipcmd.cpp
+++ b/src/VBox/Runtime/common/zip/unzipcmd.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -94,6 +94,8 @@ typedef RTEXITCODE (*PFNDOWITHMEMBER)(PRTZIPUNZIPCMDOPS pOpts, RTVFSOBJ hVfsObj,
 static RTEXITCODE rtZipUnzipCmdListCallback(PRTZIPUNZIPCMDOPS pOpts, RTVFSOBJ hVfsObj,
                                             const char *pszName, RTEXITCODE rcExit, PRTFOFF pcBytes)
 {
+    RT_NOREF_PV(pOpts);
+
     /*
      * Query all the information.
      */
@@ -476,6 +478,4 @@ RTDECL(RTEXITCODE) RTZipUnzipCmd(unsigned cArgs, char **papszArgs)
         default:
             return rtZipUnzipDoWithMembers(&Opts, rtZipUnzipCmdExtractCallback, &cFiles, &cBytes);
     }
-
-    return RTEXITCODE_SUCCESS;
 }
diff --git a/src/VBox/Runtime/common/zip/xarvfs.cpp b/src/VBox/Runtime/common/zip/xarvfs.cpp
index 6d298db..39885ad 100644
--- a/src/VBox/Runtime/common/zip/xarvfs.cpp
+++ b/src/VBox/Runtime/common/zip/xarvfs.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1401,12 +1401,13 @@ static DECLCALLBACK(int) rtZipXarFssSym_SetOwner(void *pvThis, RTUID uid, RTGID
 /**
  * @interface_method_impl{RTVFSSYMLINKOPS,pfnRead}
  */
-static DECLCALLBACK(int) rtZipXarFssSym_Read(void *pvThis, char *pszTarget, size_t cbXarget)
+static DECLCALLBACK(int) rtZipXarFssSym_Read(void *pvThis, char *pszTarget, size_t cbTarget)
 {
     PRTZIPXARBASEOBJ pThis = (PRTZIPXARBASEOBJ)pvThis;
 #if 0
     return RTStrCopy(pszTarget, cbXarget, pThis->pXarReader->szTarget);
 #else
+    RT_NOREF_PV(pThis); RT_NOREF_PV(pszTarget); RT_NOREF_PV(cbTarget);
     return VERR_NOT_IMPLEMENTED;
 #endif
 }
@@ -1818,6 +1819,7 @@ static const RTVFSFSSTREAMOPS rtZipXarFssOps =
 static int rtZipXarValidateTocPart2(PRTZIPXARFSSTREAM pThis, PCXARHEADER pXarHdr, PCRTZIPXARHASHDIGEST pTocDigest)
 {
     int rc;
+    RT_NOREF_PV(pXarHdr);
 
     /*
      * Check that the hash function in the TOC matches the one in the XAR header.
diff --git a/src/VBox/Runtime/common/zip/zip.cpp b/src/VBox/Runtime/common/zip/zip.cpp
index 8a7f0e7..a8bbcca 100644
--- a/src/VBox/Runtime/common/zip/zip.cpp
+++ b/src/VBox/Runtime/common/zip/zip.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -530,7 +530,6 @@ static DECLCALLBACK(int) rtZipZlibCompFinish(PRTZIPCOMP pZip)
         if (rc != Z_OK && rc != Z_STREAM_END)
             return zipErrConvertFromZlib(rc, true /*fCompressing*/);
     }
-    return VINF_SUCCESS;
 }
 
 
@@ -1720,8 +1719,8 @@ RTDECL(int) RTZipBlockCompress(RTZIPTYPE enmType, RTZIPLEVEL enmLevel, uint32_t
                                void *pvDst, size_t cbDst, size_t *pcbDstActual) RT_NO_THROW_DEF
 {
     /* input validation - the crash and burn approach as speed is essential here. */
-    Assert(enmLevel <= RTZIPLEVEL_MAX && enmLevel >= RTZIPLEVEL_STORE);
-    Assert(!fFlags);
+    Assert(enmLevel <= RTZIPLEVEL_MAX && enmLevel >= RTZIPLEVEL_STORE); RT_NOREF_PV(enmLevel);
+    Assert(!fFlags);                                                    RT_NOREF_PV(fFlags);
 
     /*
      * Deal with flags involving prefixes.
@@ -1836,7 +1835,7 @@ RTDECL(int) RTZipBlockDecompress(RTZIPTYPE enmType, uint32_t fFlags,
                                  void *pvDst, size_t cbDst, size_t *pcbDstActual) RT_NO_THROW_DEF
 {
     /* input validation - the crash and burn approach as speed is essential here. */
-    Assert(!fFlags);
+    Assert(!fFlags); RT_NOREF_PV(fFlags);
 
     /*
      * Deal with flags involving prefixes.
diff --git a/src/VBox/Runtime/darwin/RTErrConvertFromDarwin.cpp b/src/VBox/Runtime/darwin/RTErrConvertFromDarwin.cpp
index 5c228cc..708f329 100644
--- a/src/VBox/Runtime/darwin/RTErrConvertFromDarwin.cpp
+++ b/src/VBox/Runtime/darwin/RTErrConvertFromDarwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/darwin/RTErrConvertFromDarwinCOM.cpp b/src/VBox/Runtime/darwin/RTErrConvertFromDarwinCOM.cpp
index 16387b8..32d8950 100644
--- a/src/VBox/Runtime/darwin/RTErrConvertFromDarwinCOM.cpp
+++ b/src/VBox/Runtime/darwin/RTErrConvertFromDarwinCOM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/darwin/RTErrConvertFromDarwinIO.cpp b/src/VBox/Runtime/darwin/RTErrConvertFromDarwinIO.cpp
index 93dc1ce..1b54d94 100644
--- a/src/VBox/Runtime/darwin/RTErrConvertFromDarwinIO.cpp
+++ b/src/VBox/Runtime/darwin/RTErrConvertFromDarwinIO.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/darwin/RTErrConvertFromDarwinKern.cpp b/src/VBox/Runtime/darwin/RTErrConvertFromDarwinKern.cpp
index 8389272..fc11cf9 100644
--- a/src/VBox/Runtime/darwin/RTErrConvertFromDarwinKern.cpp
+++ b/src/VBox/Runtime/darwin/RTErrConvertFromDarwinKern.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/gc/initterm-gc.cpp b/src/VBox/Runtime/gc/initterm-gc.cpp
index e5d9a2f..4535cd3 100644
--- a/src/VBox/Runtime/gc/initterm-gc.cpp
+++ b/src/VBox/Runtime/gc/initterm-gc.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTAssertShouldPanic-generic.cpp b/src/VBox/Runtime/generic/RTAssertShouldPanic-generic.cpp
index a079261..3e0550a 100644
--- a/src/VBox/Runtime/generic/RTAssertShouldPanic-generic.cpp
+++ b/src/VBox/Runtime/generic/RTAssertShouldPanic-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTCrStoreCreateSnapshotById-generic.cpp b/src/VBox/Runtime/generic/RTCrStoreCreateSnapshotById-generic.cpp
index c65e1a4..7f6a798 100644
--- a/src/VBox/Runtime/generic/RTCrStoreCreateSnapshotById-generic.cpp
+++ b/src/VBox/Runtime/generic/RTCrStoreCreateSnapshotById-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTDirCreateUniqueNumbered-generic.cpp b/src/VBox/Runtime/generic/RTDirCreateUniqueNumbered-generic.cpp
index 727331d..b873b02 100644
--- a/src/VBox/Runtime/generic/RTDirCreateUniqueNumbered-generic.cpp
+++ b/src/VBox/Runtime/generic/RTDirCreateUniqueNumbered-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -34,10 +34,11 @@
 #include <iprt/assert.h>
 #include <iprt/err.h>
 #include <iprt/path.h>
+#include <iprt/rand.h>
 #include <iprt/string.h>
 
 
-RTDECL(int) RTDirCreateUniqueNumbered(char *pszPath, size_t cbSize, RTFMODE fMode, signed int cchDigits, char chSep)
+RTDECL(int) RTDirCreateUniqueNumbered(char *pszPath, size_t cbSize, RTFMODE fMode, size_t cchDigits, char chSep)
 {
     /*
      * Validate input.
@@ -45,58 +46,97 @@ RTDECL(int) RTDirCreateUniqueNumbered(char *pszPath, size_t cbSize, RTFMODE fMod
     AssertPtrReturn(pszPath, VERR_INVALID_POINTER);
     AssertReturn(cbSize, VERR_BUFFER_OVERFLOW);
     AssertReturn(cchDigits > 0, VERR_INVALID_PARAMETER);
+    AssertReturn(cchDigits < 64, VERR_INVALID_PARAMETER);
 
-    /* Check that there is sufficient space. */
+    /* Check that there is sufficient space.  */
     char *pszEnd = RTStrEnd(pszPath, cbSize);
     AssertReturn(pszEnd, VERR_BUFFER_OVERFLOW);
-    AssertReturn(cbSize - 1 - (pszEnd - pszPath) >= (size_t)cchDigits + (chSep ? 1 : 0), VERR_BUFFER_OVERFLOW);
     size_t cbLeft = cbSize - (pszEnd - pszPath);
+    AssertReturn(cbLeft > (chSep ? 1U : 0U) + cchDigits, VERR_BUFFER_OVERFLOW);
 
-    /* First try is to create the path without any numbers. */
+    /*
+     * First try the pretty name without any numbers appended.
+     */
     int rc = RTDirCreate(pszPath, fMode, 0);
-    if (   RT_SUCCESS(rc)
-        || rc != VERR_ALREADY_EXISTS)
+    if (RT_SUCCESS(rc))
         return rc;
-
-    /* If the separator value isn't zero, add it. */
-    if (chSep != '\0')
+    if (rc == VERR_ALREADY_EXISTS)
     {
-        cbLeft--;
-        *pszEnd++ = chSep;
-        *pszEnd   = '\0';
-    }
+        /*
+         * Already exist, apply template specification.
+         */
 
-    /* How many tries? Stay within somewhat sane limits. */
-    uint32_t cMaxTries;
-    if (cchDigits >= 8)
-        cMaxTries = 100 * _1M;
-    else
-    {
-        cMaxTries = 10;
-        for (int a = 0; a < cchDigits - 1; ++a)
-            cMaxTries *= 10;
-    }
+        /* Max 10000 tries (like RTDirCreateTemp), but stop earlier if we haven't got enough digits to work with.  */
+        uint32_t cMaxTries;
+        switch (cchDigits)
+        {
+            case 1:  cMaxTries =    40; break;
+            case 2:  cMaxTries =   400; break;
+            case 3:  cMaxTries =  4000; break;
+            default: cMaxTries = 10000; break;
+        }
 
-    /* Try cMaxTries - 1 times to create a directory with appended numbers. */
-    uint32_t i = 1;
-    while (i < cMaxTries)
-    {
-        /* Format the number with leading zero's. */
-        ssize_t rc2 = RTStrFormatU32(pszEnd, cbLeft, i, 10, cchDigits, 0, RTSTR_F_WIDTH | RTSTR_F_ZEROPAD);
-        if (RT_FAILURE((int) rc2))
+        static uint64_t const s_aEndSeqs[] =
+        {
+            UINT64_C(0),
+            UINT64_C(9),
+            UINT64_C(99),
+            UINT64_C(999),
+            UINT64_C(9999),
+            UINT64_C(99999),
+            UINT64_C(999999),
+            UINT64_C(9999999),
+            UINT64_C(99999999),
+            UINT64_C(999999999),
+            UINT64_C(9999999999),
+            UINT64_C(99999999999),
+            UINT64_C(999999999999),
+            UINT64_C(9999999999999),
+            UINT64_C(99999999999999),
+            UINT64_C(999999999999999),
+            UINT64_C(9999999999999999),
+            UINT64_C(99999999999999999),
+            UINT64_C(999999999999999999),
+            UINT64_C(9999999999999999999),
+        };
+        uint64_t const uEndSeq = cchDigits < RT_ELEMENTS(s_aEndSeqs) ? s_aEndSeqs[cchDigits] : UINT64_MAX;
+
+        /* Add separator if requested. */
+        if (chSep != '\0')
         {
-            *pszPath = '\0';
-            return (int)rc2;
+            *pszEnd++ = chSep;
+            *pszEnd   = '\0';
+            cbLeft--;
+        }
+
+        Assert(cbLeft > cchDigits);
+        for (uint32_t iTry = 0; iTry <= cMaxTries; iTry++)
+        {
+            /* Try sequentially first for a little bit, then switch to random numbers. */
+            uint64_t iSeq;
+            if (iTry > 20)
+                iSeq = RTRandU64Ex(0, uEndSeq);
+            else
+            {
+                iSeq = iTry;
+                if (uEndSeq < UINT64_MAX)
+                    iSeq %= uEndSeq + 1;
+            }
+            ssize_t cchRet = RTStrFormatU64(pszEnd, cbLeft, iSeq, 10 /*uiBase*/,
+                                            (int)cchDigits /*cchWidth*/, 0 /*cchPrecision*/, RTSTR_F_WIDTH | RTSTR_F_ZEROPAD);
+            Assert((size_t)cchRet == cchDigits); NOREF(cchRet);
+
+            rc = RTDirCreate(pszPath, fMode, 0);
+            if (RT_SUCCESS(rc))
+                return rc;
+            if (rc != VERR_ALREADY_EXISTS)
+                break;
         }
-        rc = RTDirCreate(pszPath, fMode, 0);
-        if (RT_SUCCESS(rc))
-            return rc;
-        ++i;
     }
 
-    /* We've given up. */
+    /* We've given up or failed. */
     *pszPath = '\0';
-    return VERR_ALREADY_EXISTS;
+    return rc;
 }
 RT_EXPORT_SYMBOL(RTDirCreateUniqueNumbered);
 
diff --git a/src/VBox/Runtime/generic/RTDirExists-generic.cpp b/src/VBox/Runtime/generic/RTDirExists-generic.cpp
index 5a5c626..b5d5578 100644
--- a/src/VBox/Runtime/generic/RTDirExists-generic.cpp
+++ b/src/VBox/Runtime/generic/RTDirExists-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTDirQueryInfo-generic.cpp b/src/VBox/Runtime/generic/RTDirQueryInfo-generic.cpp
index 82c951a..8221bc5 100644
--- a/src/VBox/Runtime/generic/RTDirQueryInfo-generic.cpp
+++ b/src/VBox/Runtime/generic/RTDirQueryInfo-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -30,7 +30,7 @@
 *********************************************************************************************************************************/
 #define LOG_GROUP RTLOGGROUP_DIR
 #ifdef RT_OS_WINDOWS /* dir.h has host specific stuff */
-# include <Windows.h>
+# include <iprt/win/windows.h>
 #else
 # include <dirent.h>
 #endif
diff --git a/src/VBox/Runtime/generic/RTDirSetTimes-generic.cpp b/src/VBox/Runtime/generic/RTDirSetTimes-generic.cpp
index 3abe54c..57f1854 100644
--- a/src/VBox/Runtime/generic/RTDirSetTimes-generic.cpp
+++ b/src/VBox/Runtime/generic/RTDirSetTimes-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -30,7 +30,7 @@
 *********************************************************************************************************************************/
 #define LOG_GROUP RTLOGGROUP_DIR
 #ifdef RT_OS_WINDOWS /* dir.h has host specific stuff */
-# include <Windows.h>
+# include <iprt/win/windows.h>
 #else
 # include <dirent.h>
 #endif
diff --git a/src/VBox/Runtime/generic/RTEnvDupEx-generic.cpp b/src/VBox/Runtime/generic/RTEnvDupEx-generic.cpp
index 2c55000..00ec781 100644
--- a/src/VBox/Runtime/generic/RTEnvDupEx-generic.cpp
+++ b/src/VBox/Runtime/generic/RTEnvDupEx-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTFileCopy-generic.cpp b/src/VBox/Runtime/generic/RTFileCopy-generic.cpp
index 90a7546..3e92f93 100644
--- a/src/VBox/Runtime/generic/RTFileCopy-generic.cpp
+++ b/src/VBox/Runtime/generic/RTFileCopy-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTFileExists-generic.cpp b/src/VBox/Runtime/generic/RTFileExists-generic.cpp
index b99c85a..b49b804 100644
--- a/src/VBox/Runtime/generic/RTFileExists-generic.cpp
+++ b/src/VBox/Runtime/generic/RTFileExists-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTFileMove-generic.cpp b/src/VBox/Runtime/generic/RTFileMove-generic.cpp
index 0d16397..414700e 100644
--- a/src/VBox/Runtime/generic/RTFileMove-generic.cpp
+++ b/src/VBox/Runtime/generic/RTFileMove-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTFileQuerySize-generic.cpp b/src/VBox/Runtime/generic/RTFileQuerySize-generic.cpp
index d283b51..a66f405 100644
--- a/src/VBox/Runtime/generic/RTFileQuerySize-generic.cpp
+++ b/src/VBox/Runtime/generic/RTFileQuerySize-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTFileReadAll-generic.cpp b/src/VBox/Runtime/generic/RTFileReadAll-generic.cpp
index 502eb54..46c4572 100644
--- a/src/VBox/Runtime/generic/RTFileReadAll-generic.cpp
+++ b/src/VBox/Runtime/generic/RTFileReadAll-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTFileReadAllByHandle-generic.cpp b/src/VBox/Runtime/generic/RTFileReadAllByHandle-generic.cpp
index 3a7d0df..1c68430 100644
--- a/src/VBox/Runtime/generic/RTFileReadAllByHandle-generic.cpp
+++ b/src/VBox/Runtime/generic/RTFileReadAllByHandle-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTFileReadAllByHandleEx-generic.cpp b/src/VBox/Runtime/generic/RTFileReadAllByHandleEx-generic.cpp
index 75922a0..4c8516d 100644
--- a/src/VBox/Runtime/generic/RTFileReadAllByHandleEx-generic.cpp
+++ b/src/VBox/Runtime/generic/RTFileReadAllByHandleEx-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTFileReadAllEx-generic.cpp b/src/VBox/Runtime/generic/RTFileReadAllEx-generic.cpp
index 4931e19..5f7a9e0 100644
--- a/src/VBox/Runtime/generic/RTFileReadAllEx-generic.cpp
+++ b/src/VBox/Runtime/generic/RTFileReadAllEx-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTFileReadAllFree-generic.cpp b/src/VBox/Runtime/generic/RTFileReadAllFree-generic.cpp
index d0e1f2c..9ff50d1 100644
--- a/src/VBox/Runtime/generic/RTFileReadAllFree-generic.cpp
+++ b/src/VBox/Runtime/generic/RTFileReadAllFree-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -44,7 +44,7 @@ RTDECL(void) RTFileReadAllFree(void *pvFile, size_t cbFile)
      * It's all hardcoded fun for now...
      */
     pvFile = (void *)((uintptr_t)pvFile - 32);
-    Assert(*(size_t *)pvFile == cbFile);
+    Assert(*(size_t *)pvFile == cbFile); RT_NOREF_PV(cbFile);
     *(size_t *)pvFile = ~(size_t)1;
 
     RTMemFree(pvFile);
diff --git a/src/VBox/Runtime/generic/RTLogDefaultInit-generic.cpp b/src/VBox/Runtime/generic/RTLogDefaultInit-generic.cpp
index a17f047..23089e9 100644
--- a/src/VBox/Runtime/generic/RTLogDefaultInit-generic.cpp
+++ b/src/VBox/Runtime/generic/RTLogDefaultInit-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTLogWriteDebugger-generic.cpp b/src/VBox/Runtime/generic/RTLogWriteDebugger-generic.cpp
index 3567d8e..0cb112d 100644
--- a/src/VBox/Runtime/generic/RTLogWriteDebugger-generic.cpp
+++ b/src/VBox/Runtime/generic/RTLogWriteDebugger-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTLogWriteStdErr-generic.cpp b/src/VBox/Runtime/generic/RTLogWriteStdErr-generic.cpp
index 66f5afc..3d567da 100644
--- a/src/VBox/Runtime/generic/RTLogWriteStdErr-generic.cpp
+++ b/src/VBox/Runtime/generic/RTLogWriteStdErr-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTLogWriteStdErr-stub-generic.cpp b/src/VBox/Runtime/generic/RTLogWriteStdErr-stub-generic.cpp
index c9040e2..ad91639 100644
--- a/src/VBox/Runtime/generic/RTLogWriteStdErr-stub-generic.cpp
+++ b/src/VBox/Runtime/generic/RTLogWriteStdErr-stub-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTLogWriteStdOut-generic.cpp b/src/VBox/Runtime/generic/RTLogWriteStdOut-generic.cpp
index cb2acbe..67ca84f 100644
--- a/src/VBox/Runtime/generic/RTLogWriteStdOut-generic.cpp
+++ b/src/VBox/Runtime/generic/RTLogWriteStdOut-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTLogWriteStdOut-stub-generic.cpp b/src/VBox/Runtime/generic/RTLogWriteStdOut-stub-generic.cpp
index 92406c7..642be3d 100644
--- a/src/VBox/Runtime/generic/RTLogWriteStdOut-stub-generic.cpp
+++ b/src/VBox/Runtime/generic/RTLogWriteStdOut-stub-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTLogWriteUser-generic.cpp b/src/VBox/Runtime/generic/RTLogWriteUser-generic.cpp
index 22c8a5a..b56e86d 100644
--- a/src/VBox/Runtime/generic/RTLogWriteUser-generic.cpp
+++ b/src/VBox/Runtime/generic/RTLogWriteUser-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTMpCpuId-generic.cpp b/src/VBox/Runtime/generic/RTMpCpuId-generic.cpp
index a464d46..f08c567 100644
--- a/src/VBox/Runtime/generic/RTMpCpuId-generic.cpp
+++ b/src/VBox/Runtime/generic/RTMpCpuId-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTMpCpuIdFromSetIndex-generic.cpp b/src/VBox/Runtime/generic/RTMpCpuIdFromSetIndex-generic.cpp
index 597418f..f66db20 100644
--- a/src/VBox/Runtime/generic/RTMpCpuIdFromSetIndex-generic.cpp
+++ b/src/VBox/Runtime/generic/RTMpCpuIdFromSetIndex-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTMpCpuIdToSetIndex-generic.cpp b/src/VBox/Runtime/generic/RTMpCpuIdToSetIndex-generic.cpp
index bf71c86..38ff22b 100644
--- a/src/VBox/Runtime/generic/RTMpCpuIdToSetIndex-generic.cpp
+++ b/src/VBox/Runtime/generic/RTMpCpuIdToSetIndex-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTMpGetArraySize-generic.cpp b/src/VBox/Runtime/generic/RTMpGetArraySize-generic.cpp
index 6bd0787..bc1e1e7 100644
--- a/src/VBox/Runtime/generic/RTMpGetArraySize-generic.cpp
+++ b/src/VBox/Runtime/generic/RTMpGetArraySize-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTMpGetCoreCount-generic.cpp b/src/VBox/Runtime/generic/RTMpGetCoreCount-generic.cpp
index 8ead6e8..ab6ac55 100644
--- a/src/VBox/Runtime/generic/RTMpGetCoreCount-generic.cpp
+++ b/src/VBox/Runtime/generic/RTMpGetCoreCount-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTMpGetCount-generic.cpp b/src/VBox/Runtime/generic/RTMpGetCount-generic.cpp
index 06f3ff5..6d6c579 100644
--- a/src/VBox/Runtime/generic/RTMpGetCount-generic.cpp
+++ b/src/VBox/Runtime/generic/RTMpGetCount-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTMpGetCurFrequency-generic.cpp b/src/VBox/Runtime/generic/RTMpGetCurFrequency-generic.cpp
index 1f2654f..e2f15bd 100644
--- a/src/VBox/Runtime/generic/RTMpGetCurFrequency-generic.cpp
+++ b/src/VBox/Runtime/generic/RTMpGetCurFrequency-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTMpGetDescription-generic-stub.cpp b/src/VBox/Runtime/generic/RTMpGetDescription-generic-stub.cpp
index 1e0f1ee..589ac39 100644
--- a/src/VBox/Runtime/generic/RTMpGetDescription-generic-stub.cpp
+++ b/src/VBox/Runtime/generic/RTMpGetDescription-generic-stub.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTMpGetDescription-generic.cpp b/src/VBox/Runtime/generic/RTMpGetDescription-generic.cpp
index e0823fa..774a9ba 100644
--- a/src/VBox/Runtime/generic/RTMpGetDescription-generic.cpp
+++ b/src/VBox/Runtime/generic/RTMpGetDescription-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTMpGetMaxCpuId-generic.cpp b/src/VBox/Runtime/generic/RTMpGetMaxCpuId-generic.cpp
index 03bfb29..4a7fc67 100644
--- a/src/VBox/Runtime/generic/RTMpGetMaxCpuId-generic.cpp
+++ b/src/VBox/Runtime/generic/RTMpGetMaxCpuId-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTMpGetMaxFrequency-generic.cpp b/src/VBox/Runtime/generic/RTMpGetMaxFrequency-generic.cpp
index 0b75b85..437e9c8 100644
--- a/src/VBox/Runtime/generic/RTMpGetMaxFrequency-generic.cpp
+++ b/src/VBox/Runtime/generic/RTMpGetMaxFrequency-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTMpGetOnlineCoreCount-generic.cpp b/src/VBox/Runtime/generic/RTMpGetOnlineCoreCount-generic.cpp
index 4370c70..0fc6c91 100644
--- a/src/VBox/Runtime/generic/RTMpGetOnlineCoreCount-generic.cpp
+++ b/src/VBox/Runtime/generic/RTMpGetOnlineCoreCount-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTMpGetOnlineCount-generic.cpp b/src/VBox/Runtime/generic/RTMpGetOnlineCount-generic.cpp
index 4f2b88a..c79c492 100644
--- a/src/VBox/Runtime/generic/RTMpGetOnlineCount-generic.cpp
+++ b/src/VBox/Runtime/generic/RTMpGetOnlineCount-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTMpGetOnlineSet-generic.cpp b/src/VBox/Runtime/generic/RTMpGetOnlineSet-generic.cpp
index cf3017e..be52ebf 100644
--- a/src/VBox/Runtime/generic/RTMpGetOnlineSet-generic.cpp
+++ b/src/VBox/Runtime/generic/RTMpGetOnlineSet-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTMpGetSet-generic.cpp b/src/VBox/Runtime/generic/RTMpGetSet-generic.cpp
index 56b6690..8b610a1 100644
--- a/src/VBox/Runtime/generic/RTMpGetSet-generic.cpp
+++ b/src/VBox/Runtime/generic/RTMpGetSet-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTMpIsCpuOnline-generic.cpp b/src/VBox/Runtime/generic/RTMpIsCpuOnline-generic.cpp
index 24e7743..db96205 100644
--- a/src/VBox/Runtime/generic/RTMpIsCpuOnline-generic.cpp
+++ b/src/VBox/Runtime/generic/RTMpIsCpuOnline-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTMpIsCpuPossible-generic.cpp b/src/VBox/Runtime/generic/RTMpIsCpuPossible-generic.cpp
index 77436ad..e48483c 100644
--- a/src/VBox/Runtime/generic/RTMpIsCpuPossible-generic.cpp
+++ b/src/VBox/Runtime/generic/RTMpIsCpuPossible-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTMpOnPair-generic.cpp b/src/VBox/Runtime/generic/RTMpOnPair-generic.cpp
index d507fc3..5a90c3f 100644
--- a/src/VBox/Runtime/generic/RTMpOnPair-generic.cpp
+++ b/src/VBox/Runtime/generic/RTMpOnPair-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -63,6 +63,7 @@ typedef RTMPONPAIRGENERIC *PRTMPONPAIRGENERIC;
  */
 static DECLCALLBACK(void) rtMpOnPairGenericWorker(RTCPUID idCpu, void *pvUser1, void *pvUser2)
 {
+    RT_NOREF(pvUser2);
     PRTMPONPAIRGENERIC pArgs = (PRTMPONPAIRGENERIC)pvUser1;
 
     /*
diff --git a/src/VBox/Runtime/generic/RTPathAbs-generic.cpp b/src/VBox/Runtime/generic/RTPathAbs-generic.cpp
index 9a921ae..bb15b75 100644
--- a/src/VBox/Runtime/generic/RTPathAbs-generic.cpp
+++ b/src/VBox/Runtime/generic/RTPathAbs-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -94,7 +94,7 @@ static int fsCleanPath(char *pszPath)
      * Just change slashes to RTPATH_SLASH and skip them.
      */
     /** @todo check how OS/2 treats unnecessary leading slashes */
-    int cchIgnoreLeading = 0;
+    /*int cchIgnoreLeading = 0;*/
 #ifdef HAVE_UNC
     if (   RTPATH_IS_SLASH(pszSrc[0])
         && RTPATH_IS_SLASH(pszSrc[1]))
@@ -103,10 +103,10 @@ static int fsCleanPath(char *pszPath)
         pszTrg[1] = RTPATH_SLASH;
         pszTrg += 2;
         pszSrc += 2;
-        cchIgnoreLeading = 1;
+        /*cchIgnoreLeading = 1;*/
         while (RTPATH_IS_SLASH(*pszSrc))
         {
-            cchIgnoreLeading++;
+            /*cchIgnoreLeading++;*/
             pszSrc++;
             *pszTrg++ = RTPATH_SLASH;
         }
diff --git a/src/VBox/Runtime/generic/RTPathGetCurrentDrive-generic.cpp b/src/VBox/Runtime/generic/RTPathGetCurrentDrive-generic.cpp
index 0016a73..54af169 100644
--- a/src/VBox/Runtime/generic/RTPathGetCurrentDrive-generic.cpp
+++ b/src/VBox/Runtime/generic/RTPathGetCurrentDrive-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTPathGetCurrentOnDrive-generic.cpp b/src/VBox/Runtime/generic/RTPathGetCurrentOnDrive-generic.cpp
index fd7d21e..1500062 100644
--- a/src/VBox/Runtime/generic/RTPathGetCurrentOnDrive-generic.cpp
+++ b/src/VBox/Runtime/generic/RTPathGetCurrentOnDrive-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTPathIsSame-generic.cpp b/src/VBox/Runtime/generic/RTPathIsSame-generic.cpp
index a4e514f..fd527c1 100644
--- a/src/VBox/Runtime/generic/RTPathIsSame-generic.cpp
+++ b/src/VBox/Runtime/generic/RTPathIsSame-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -51,23 +51,26 @@ RTDECL(int) RTPathIsSame(const char *pszPath1, const char *pszPath2)
     /*
      * If the files exist, try use the attributes.
      */
-    RTFSOBJINFO ObjInfo1, ObjInfo2;
+    RTFSOBJINFO ObjInfo1;
     int rc = RTPathQueryInfoEx(pszPath1, &ObjInfo1, RTFSOBJATTRADD_UNIX, RTPATH_F_ON_LINK);
     if (RT_SUCCESS(rc))
-        rc = RTPathQueryInfoEx(pszPath2, &ObjInfo2, RTFSOBJATTRADD_UNIX, RTPATH_F_ON_LINK);
-    if (RT_SUCCESS(rc))
     {
-        if ((ObjInfo1.Attr.fMode & RTFS_TYPE_MASK) != (ObjInfo2.Attr.fMode & RTFS_TYPE_MASK))
-            return false;
-        if (ObjInfo1.Attr.u.Unix.INodeIdDevice       != ObjInfo2.Attr.u.Unix.INodeIdDevice)
-            return false;
-        if (ObjInfo1.Attr.u.Unix.INodeId             != ObjInfo2.Attr.u.Unix.INodeId)
-            return false;
-        if (ObjInfo1.Attr.u.Unix.GenerationId        != ObjInfo2.Attr.u.Unix.GenerationId)
-            return false;
-        if (   ObjInfo1.Attr.u.Unix.INodeIdDevice != 0
-            && ObjInfo1.Attr.u.Unix.INodeId       != 0)
-            return true;
+        RTFSOBJINFO ObjInfo2;
+        rc = RTPathQueryInfoEx(pszPath2, &ObjInfo2, RTFSOBJATTRADD_UNIX, RTPATH_F_ON_LINK);
+        if (RT_SUCCESS(rc))
+        {
+            if ((ObjInfo1.Attr.fMode & RTFS_TYPE_MASK) != (ObjInfo2.Attr.fMode & RTFS_TYPE_MASK))
+                return false;
+            if (ObjInfo1.Attr.u.Unix.INodeIdDevice       != ObjInfo2.Attr.u.Unix.INodeIdDevice)
+                return false;
+            if (ObjInfo1.Attr.u.Unix.INodeId             != ObjInfo2.Attr.u.Unix.INodeId)
+                return false;
+            if (ObjInfo1.Attr.u.Unix.GenerationId        != ObjInfo2.Attr.u.Unix.GenerationId)
+                return false;
+            if (   ObjInfo1.Attr.u.Unix.INodeIdDevice != 0
+                && ObjInfo1.Attr.u.Unix.INodeId       != 0)
+                return true;
+        }
     }
 
     /*
diff --git a/src/VBox/Runtime/generic/RTProcDaemonize-generic.cpp b/src/VBox/Runtime/generic/RTProcDaemonize-generic.cpp
index 78b391d..fe7fcf3 100644
--- a/src/VBox/Runtime/generic/RTProcDaemonize-generic.cpp
+++ b/src/VBox/Runtime/generic/RTProcDaemonize-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTProcIsRunningByName-generic.cpp b/src/VBox/Runtime/generic/RTProcIsRunningByName-generic.cpp
index 47b9b65..2a65518 100644
--- a/src/VBox/Runtime/generic/RTProcIsRunningByName-generic.cpp
+++ b/src/VBox/Runtime/generic/RTProcIsRunningByName-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTProcessQueryUsernameA-generic.cpp b/src/VBox/Runtime/generic/RTProcessQueryUsernameA-generic.cpp
index 1c3903a..54b5dee 100644
--- a/src/VBox/Runtime/generic/RTProcessQueryUsernameA-generic.cpp
+++ b/src/VBox/Runtime/generic/RTProcessQueryUsernameA-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTRandAdvCreateSystemFaster-generic.cpp b/src/VBox/Runtime/generic/RTRandAdvCreateSystemFaster-generic.cpp
index 0813ef2..1f27853 100644
--- a/src/VBox/Runtime/generic/RTRandAdvCreateSystemFaster-generic.cpp
+++ b/src/VBox/Runtime/generic/RTRandAdvCreateSystemFaster-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTRandAdvCreateSystemTruer-generic.cpp b/src/VBox/Runtime/generic/RTRandAdvCreateSystemTruer-generic.cpp
index 4110fd3..50d974c 100644
--- a/src/VBox/Runtime/generic/RTRandAdvCreateSystemTruer-generic.cpp
+++ b/src/VBox/Runtime/generic/RTRandAdvCreateSystemTruer-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTSemEventMultiWait-2-ex-generic.cpp b/src/VBox/Runtime/generic/RTSemEventMultiWait-2-ex-generic.cpp
index bfeb1af..b853d0b 100644
--- a/src/VBox/Runtime/generic/RTSemEventMultiWait-2-ex-generic.cpp
+++ b/src/VBox/Runtime/generic/RTSemEventMultiWait-2-ex-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTSemEventMultiWait-generic.cpp b/src/VBox/Runtime/generic/RTSemEventMultiWait-generic.cpp
index af1cd27..19afcd5 100644
--- a/src/VBox/Runtime/generic/RTSemEventMultiWait-generic.cpp
+++ b/src/VBox/Runtime/generic/RTSemEventMultiWait-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp b/src/VBox/Runtime/generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp
index 2c0dcc4..1ae3400 100644
--- a/src/VBox/Runtime/generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp
+++ b/src/VBox/Runtime/generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTSemEventWait-2-ex-generic.cpp b/src/VBox/Runtime/generic/RTSemEventWait-2-ex-generic.cpp
index a196c21..a6ffe93 100644
--- a/src/VBox/Runtime/generic/RTSemEventWait-2-ex-generic.cpp
+++ b/src/VBox/Runtime/generic/RTSemEventWait-2-ex-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTSemEventWait-generic.cpp b/src/VBox/Runtime/generic/RTSemEventWait-generic.cpp
index 6de259f..2511d01 100644
--- a/src/VBox/Runtime/generic/RTSemEventWait-generic.cpp
+++ b/src/VBox/Runtime/generic/RTSemEventWait-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTSemEventWaitNoResume-2-ex-generic.cpp b/src/VBox/Runtime/generic/RTSemEventWaitNoResume-2-ex-generic.cpp
index 804e83c..b62afc9 100644
--- a/src/VBox/Runtime/generic/RTSemEventWaitNoResume-2-ex-generic.cpp
+++ b/src/VBox/Runtime/generic/RTSemEventWaitNoResume-2-ex-generic.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTSemMutexRequest-generic.cpp b/src/VBox/Runtime/generic/RTSemMutexRequest-generic.cpp
index 46873ee..ca2aaec 100644
--- a/src/VBox/Runtime/generic/RTSemMutexRequest-generic.cpp
+++ b/src/VBox/Runtime/generic/RTSemMutexRequest-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTSemMutexRequestDebug-generic.cpp b/src/VBox/Runtime/generic/RTSemMutexRequestDebug-generic.cpp
index 886ab63..7ffa912 100644
--- a/src/VBox/Runtime/generic/RTSemMutexRequestDebug-generic.cpp
+++ b/src/VBox/Runtime/generic/RTSemMutexRequestDebug-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTSystemIsInsideVM-generic.cpp b/src/VBox/Runtime/generic/RTSystemIsInsideVM-generic.cpp
index 2eee650..4e34cf7 100644
--- a/src/VBox/Runtime/generic/RTSystemIsInsideVM-generic.cpp
+++ b/src/VBox/Runtime/generic/RTSystemIsInsideVM-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTSystemQueryDmiString-generic.cpp b/src/VBox/Runtime/generic/RTSystemQueryDmiString-generic.cpp
index 48c440f..8d22dec 100644
--- a/src/VBox/Runtime/generic/RTSystemQueryDmiString-generic.cpp
+++ b/src/VBox/Runtime/generic/RTSystemQueryDmiString-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTSystemQueryOSInfo-generic.cpp b/src/VBox/Runtime/generic/RTSystemQueryOSInfo-generic.cpp
index 5fcd0de..d8f4f77 100644
--- a/src/VBox/Runtime/generic/RTSystemQueryOSInfo-generic.cpp
+++ b/src/VBox/Runtime/generic/RTSystemQueryOSInfo-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTSystemShutdown-generic.cpp b/src/VBox/Runtime/generic/RTSystemShutdown-generic.cpp
index f91fbf2..d4fd1ca 100644
--- a/src/VBox/Runtime/generic/RTSystemShutdown-generic.cpp
+++ b/src/VBox/Runtime/generic/RTSystemShutdown-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -37,6 +37,7 @@
 
 RTDECL(int) RTSystemShutdown(RTMSINTERVAL cMsDelay, uint32_t fFlags, const char *pszLogMsg)
 {
+    RT_NOREF(cMsDelay, pszLogMsg);
     AssertPtrReturn(pszLogMsg, VERR_INVALID_POINTER);
     AssertReturn(!(fFlags & ~RTSYSTEM_SHUTDOWN_VALID_MASK), VERR_INVALID_PARAMETER);
     return VERR_NOT_SUPPORTED;
diff --git a/src/VBox/Runtime/generic/RTThreadGetAffinity-stub-generic.cpp b/src/VBox/Runtime/generic/RTThreadGetAffinity-stub-generic.cpp
index 5db4d37..5a6c7f8 100644
--- a/src/VBox/Runtime/generic/RTThreadGetAffinity-stub-generic.cpp
+++ b/src/VBox/Runtime/generic/RTThreadGetAffinity-stub-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTThreadGetNativeState-generic.cpp b/src/VBox/Runtime/generic/RTThreadGetNativeState-generic.cpp
index 24747d4..a53f94f 100644
--- a/src/VBox/Runtime/generic/RTThreadGetNativeState-generic.cpp
+++ b/src/VBox/Runtime/generic/RTThreadGetNativeState-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTThreadSetAffinity-stub-generic.cpp b/src/VBox/Runtime/generic/RTThreadSetAffinity-stub-generic.cpp
index d40a4e2..bfed35a 100644
--- a/src/VBox/Runtime/generic/RTThreadSetAffinity-stub-generic.cpp
+++ b/src/VBox/Runtime/generic/RTThreadSetAffinity-stub-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTThreadSetAffinityToCpu-generic.cpp b/src/VBox/Runtime/generic/RTThreadSetAffinityToCpu-generic.cpp
index af02471..1d86fdf 100644
--- a/src/VBox/Runtime/generic/RTThreadSetAffinityToCpu-generic.cpp
+++ b/src/VBox/Runtime/generic/RTThreadSetAffinityToCpu-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTTimeLocalDeltaNano-generic.cpp b/src/VBox/Runtime/generic/RTTimeLocalDeltaNano-generic.cpp
index 52d2d3d..6b6c310 100644
--- a/src/VBox/Runtime/generic/RTTimeLocalDeltaNano-generic.cpp
+++ b/src/VBox/Runtime/generic/RTTimeLocalDeltaNano-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTTimeLocalExplode-generic.cpp b/src/VBox/Runtime/generic/RTTimeLocalExplode-generic.cpp
index 2cc02e5..52cf0f5 100644
--- a/src/VBox/Runtime/generic/RTTimeLocalExplode-generic.cpp
+++ b/src/VBox/Runtime/generic/RTTimeLocalExplode-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTTimeLocalNow-generic.cpp b/src/VBox/Runtime/generic/RTTimeLocalNow-generic.cpp
index 319f7c6..72a9e1f 100644
--- a/src/VBox/Runtime/generic/RTTimeLocalNow-generic.cpp
+++ b/src/VBox/Runtime/generic/RTTimeLocalNow-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTTimerCreate-generic.cpp b/src/VBox/Runtime/generic/RTTimerCreate-generic.cpp
index bcb279b..763ba01 100644
--- a/src/VBox/Runtime/generic/RTTimerCreate-generic.cpp
+++ b/src/VBox/Runtime/generic/RTTimerCreate-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTTimerLRCreate-generic.cpp b/src/VBox/Runtime/generic/RTTimerLRCreate-generic.cpp
index 577276e..a4aabe1 100644
--- a/src/VBox/Runtime/generic/RTTimerLRCreate-generic.cpp
+++ b/src/VBox/Runtime/generic/RTTimerLRCreate-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/RTUuidCreate-generic.cpp b/src/VBox/Runtime/generic/RTUuidCreate-generic.cpp
index 59ca330..47ae26f 100644
--- a/src/VBox/Runtime/generic/RTUuidCreate-generic.cpp
+++ b/src/VBox/Runtime/generic/RTUuidCreate-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/cdrom-generic.cpp b/src/VBox/Runtime/generic/cdrom-generic.cpp
index f629fdf..5f6543d 100644
--- a/src/VBox/Runtime/generic/cdrom-generic.cpp
+++ b/src/VBox/Runtime/generic/cdrom-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -37,48 +37,59 @@
 
 RTDECL(int) RTCdromOpen(const char *psz, uint32_t fFlags, PRTCDROM phCdrom)
 {
+    RT_NOREF_PV(psz); RT_NOREF_PV(fFlags); RT_NOREF_PV(phCdrom);
     return VERR_NOT_IMPLEMENTED;
 }
 
 
 RTDECL(uint32_t) RTCdromRetain(RTCDROM hCdrom)
 {
+    RT_NOREF_PV(hCdrom);
     AssertFailedReturn(UINT32_MAX);
 }
 
 
 RTDECL(uint32_t)    RTCdromRelease(RTCDROM hCdrom)
 {
+    RT_NOREF_PV(hCdrom);
     AssertFailedReturn(UINT32_MAX);
 }
 
 
 RTDECL(int) RTCdromQueryMountPoint(RTCDROM hCdrom, char *pszMountPoint, size_t cbMountPoint)
 {
+    RT_NOREF_PV(hCdrom);
+    RT_NOREF_PV(pszMountPoint);
+    RT_NOREF_PV(cbMountPoint);
     AssertFailedReturn(VERR_NOT_IMPLEMENTED);
 }
 
 
 RTDECL(int)         RTCdromUnmount(RTCDROM hCdrom)
 {
+    RT_NOREF_PV(hCdrom);
     AssertFailedReturn(VERR_NOT_IMPLEMENTED);
 }
 
 
 RTDECL(int)         RTCdromEject(RTCDROM hCdrom, bool fForce)
 {
+    RT_NOREF_PV(hCdrom);
+    RT_NOREF_PV(fForce);
     AssertFailedReturn(VERR_NOT_IMPLEMENTED);
 }
 
 
 RTDECL(int)         RTCdromLock(RTCDROM hCdrom)
 {
+    RT_NOREF_PV(hCdrom);
     AssertFailedReturn(VERR_NOT_IMPLEMENTED);
 }
 
 
 RTDECL(int)         RTCdromUnlock(RTCDROM hCdrom)
 {
+    RT_NOREF_PV(hCdrom);
     AssertFailedReturn(VERR_NOT_IMPLEMENTED);
 }
 
@@ -90,6 +101,7 @@ RTDECL(unsigned)    RTCdromCount(void)
 
 RTDECL(int)         RTCdromOrdinalToName(unsigned iCdrom, char *pszName, size_t cbName)
 {
+    RT_NOREF_PV(iCdrom);
     if (cbName)
         *pszName = '\0';
     return VERR_OUT_OF_RANGE;
@@ -98,6 +110,9 @@ RTDECL(int)         RTCdromOrdinalToName(unsigned iCdrom, char *pszName, size_t
 
 RTDECL(int)         RTCdromOpenByOrdinal(unsigned iCdrom, uint32_t fFlags, PRTCDROM phCdrom)
 {
+    RT_NOREF_PV(iCdrom);
+    RT_NOREF_PV(fFlags);
+    RT_NOREF_PV(phCdrom);
     return VERR_OUT_OF_RANGE;
 }
 
diff --git a/src/VBox/Runtime/generic/createtemp-generic.cpp b/src/VBox/Runtime/generic/createtemp-generic.cpp
index ae063e9..4aaa648 100644
--- a/src/VBox/Runtime/generic/createtemp-generic.cpp
+++ b/src/VBox/Runtime/generic/createtemp-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -279,4 +279,3 @@ RTDECL(int) RTFileOpenTemp(PRTFILE phFile, char *pszFilename, size_t cbFilename,
 }
 RT_EXPORT_SYMBOL(RTFileOpenTemp);
 
-
diff --git a/src/VBox/Runtime/generic/critsect-generic.cpp b/src/VBox/Runtime/generic/critsect-generic.cpp
index 6c3b5dc..79cbdb4 100644
--- a/src/VBox/Runtime/generic/critsect-generic.cpp
+++ b/src/VBox/Runtime/generic/critsect-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -71,6 +71,7 @@ RTDECL(int) RTCritSectInitEx(PRTCRITSECT pCritSect, uint32_t fFlags, RTLOCKVALCL
 {
     AssertReturn(!(fFlags & ~(RTCRITSECT_FLAGS_NO_NESTING | RTCRITSECT_FLAGS_NO_LOCK_VAL | RTCRITSECT_FLAGS_BOOTSTRAP_HACK | RTCRITSECT_FLAGS_NOP)),
                  VERR_INVALID_PARAMETER);
+    RT_NOREF_PV(hClass); RT_NOREF_PV(uSubClass); RT_NOREF_PV(pszNameFmt);
 
     /*
      * Initialize the structure and
@@ -142,6 +143,7 @@ RTDECL(uint32_t) RTCritSectSetSubClass(PRTCRITSECT pCritSect, uint32_t uSubClass
     AssertReturn(!(pCritSect->fFlags & RTCRITSECT_FLAGS_NOP), RTLOCKVAL_SUB_CLASS_INVALID);
     return RTLockValidatorRecExclSetSubClass(pCritSect->pValidatorRec, uSubClass);
 # else
+    RT_NOREF_PV(pCritSect); RT_NOREF_PV(uSubClass);
     return RTLOCKVAL_SUB_CLASS_INVALID;
 # endif
 }
@@ -157,6 +159,7 @@ DECL_FORCE_INLINE(int) rtCritSectTryEnter(PRTCRITSECT pCritSect, PCRTLOCKVALSRCP
 #else
     Assert(!(pCritSect->fFlags & RTCRITSECT_FLAGS_RING0));
 #endif
+    RT_NOREF_PV(pSrcPos);
 
     /*
      * Return straight away if NOP.
@@ -237,6 +240,7 @@ DECL_FORCE_INLINE(int) rtCritSectEnter(PRTCRITSECT pCritSect, PCRTLOCKVALSRCPOS
 #else
     Assert(!(pCritSect->fFlags & RTCRITSECT_FLAGS_RING0));
 #endif
+    RT_NOREF_PV(pSrcPos);
 
     /*
      * Return straight away if NOP.
@@ -297,7 +301,7 @@ DECL_FORCE_INLINE(int) rtCritSectEnter(PRTCRITSECT pCritSect, PCRTLOCKVALSRCPOS
          * Wait for the current owner to release it.
          */
         IPRT_CRITSECT_WAITING(pCritSect, NULL, cLockers, (void *)pCritSect->NativeThreadOwner);
-#ifndef RTCRITSECT_STRICT
+#if !defined(RTCRITSECT_STRICT) && defined(IN_RING3)
         RTTHREAD hThreadSelf = RTThreadSelf();
 #endif
         for (;;)
diff --git a/src/VBox/Runtime/generic/critsectrw-generic.cpp b/src/VBox/Runtime/generic/critsectrw-generic.cpp
index 85b3e63..9b5113e 100644
--- a/src/VBox/Runtime/generic/critsectrw-generic.cpp
+++ b/src/VBox/Runtime/generic/critsectrw-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -93,6 +93,8 @@ RTDECL(int) RTCritSectRwInitEx(PRTCRITSECTRW pThis, uint32_t fFlags,
     AssertReturn(!(fFlags & ~( RTCRITSECT_FLAGS_NO_NESTING | RTCRITSECT_FLAGS_NO_LOCK_VAL | RTCRITSECT_FLAGS_BOOTSTRAP_HACK
                               | RTCRITSECT_FLAGS_NOP )),
                  VERR_INVALID_PARAMETER);
+    RT_NOREF_PV(hClass); RT_NOREF_PV(uSubClass); RT_NOREF_PV(pszNameFmt);
+
 
     /*
      * Initialize the structure, allocate the lock validator stuff and sems.
@@ -205,6 +207,7 @@ static int rtCritSectRwEnterShared(PRTCRITSECTRW pThis, PCRTLOCKVALSRCPOS pSrcPo
 #else
     Assert(!(pThis->fFlags & RTCRITSECT_FLAGS_RING0));
 #endif
+    RT_NOREF_PV(pSrcPos);
 
 #ifdef RTCRITSECTRW_STRICT
     RTTHREAD hThreadSelf = RTThreadSelfAutoAdopt();
@@ -545,6 +548,7 @@ static int rtCritSectRwEnterExcl(PRTCRITSECTRW pThis, PCRTLOCKVALSRCPOS pSrcPos,
 #else
     Assert(!(pThis->fFlags & RTCRITSECT_FLAGS_RING0));
 #endif
+    RT_NOREF_PV(pSrcPos);
 
 #ifdef RTCRITSECTRW_STRICT
     RTTHREAD hThreadSelf = NIL_RTTHREAD;
@@ -574,6 +578,7 @@ static int rtCritSectRwEnterExcl(PRTCRITSECTRW pThis, PCRTLOCKVALSRCPOS pSrcPos,
         Assert(pThis->cWriteRecursions < UINT32_MAX / 2);
         uint32_t cNestings = ASMAtomicIncU32(&pThis->cWriteRecursions); NOREF(cNestings);
 
+#ifdef IPRT_WITH_DTRACE
         if (IPRT_CRITSECTRW_EXCL_ENTERED_ENABLED())
         {
             uint64_t u64State = ASMAtomicReadU64(&pThis->u64State);
@@ -581,6 +586,7 @@ static int rtCritSectRwEnterExcl(PRTCRITSECTRW pThis, PCRTLOCKVALSRCPOS pSrcPos,
                                          (uint32_t)((u64State & RTCSRW_WAIT_CNT_RD_MASK) >> RTCSRW_WAIT_CNT_RD_SHIFT),
                                          (uint32_t)((u64State & RTCSRW_CNT_WR_MASK) >> RTCSRW_CNT_WR_SHIFT));
         }
+#endif
         return VINF_SUCCESS;
     }
 
@@ -878,6 +884,7 @@ RTDECL(int) RTCritSectRwLeaveExcl(PRTCRITSECTRW pThis)
             return rc9;
 #endif
         uint32_t cNestings = ASMAtomicDecU32(&pThis->cWriteRecursions); NOREF(cNestings);
+#ifdef IPRT_WITH_DTRACE
         if (IPRT_CRITSECTRW_EXCL_LEAVING_ENABLED())
         {
             uint64_t u64State = ASMAtomicReadU64(&pThis->u64State);
@@ -885,6 +892,7 @@ RTDECL(int) RTCritSectRwLeaveExcl(PRTCRITSECTRW pThis)
                                          (uint32_t)((u64State & RTCSRW_WAIT_CNT_RD_MASK) >> RTCSRW_WAIT_CNT_RD_SHIFT),
                                          (uint32_t)((u64State & RTCSRW_CNT_WR_MASK) >> RTCSRW_CNT_WR_SHIFT));
         }
+#endif
     }
 
     return VINF_SUCCESS;
@@ -918,6 +926,8 @@ RT_EXPORT_SYMBOL(RTCritSectRwIsWriteOwner);
 
 RTDECL(bool) RTCritSectRwIsReadOwner(PRTCRITSECTRW pThis, bool fWannaHear)
 {
+    RT_NOREF_PV(fWannaHear);
+
     /*
      * Validate handle.
      */
diff --git a/src/VBox/Runtime/generic/env-generic.cpp b/src/VBox/Runtime/generic/env-generic.cpp
index 191b006..68bd9b5 100644
--- a/src/VBox/Runtime/generic/env-generic.cpp
+++ b/src/VBox/Runtime/generic/env-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -234,7 +234,7 @@ RTDECL(int) RTEnvClone(PRTENV pEnv, RTENV EnvToClone)
     size_t cVars;
     const char * const *papszEnv;
 #ifdef RTENV_HAVE_WENVIRON
-    PCRTUTF16 const * papwszEnv;
+    PCRTUTF16 const * papwszEnv = NULL;
 #endif
     PRTENVINTERNAL pIntEnvToClone;
     AssertPtrReturn(pEnv, VERR_INVALID_POINTER);
diff --git a/src/VBox/Runtime/generic/errvars-generic.cpp b/src/VBox/Runtime/generic/errvars-generic.cpp
index c9a67d9..d013bf7 100644
--- a/src/VBox/Runtime/generic/errvars-generic.cpp
+++ b/src/VBox/Runtime/generic/errvars-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -46,6 +46,7 @@ RTDECL(PRTERRVARS) RTErrVarsSave(PRTERRVARS pVars)
 RTDECL(void) RTErrVarsRestore(PCRTERRVARS pVars)
 {
     Assert(pVars->ai32Vars[0] == RTERRVARS_MAGIC);
+    RT_NOREF_PV(pVars);
 }
 
 
@@ -61,6 +62,7 @@ RTDECL(bool) RTErrVarsAreEqual(PCRTERRVARS pVars1, PCRTERRVARS pVars2)
 RTDECL(bool) RTErrVarsHaveChanged(PCRTERRVARS pVars)
 {
     Assert(pVars->ai32Vars[0] == RTERRVARS_MAGIC);
+    RT_NOREF_PV(pVars);
     return false;
 }
 
diff --git a/src/VBox/Runtime/generic/fs-stubs-generic.cpp b/src/VBox/Runtime/generic/fs-stubs-generic.cpp
index 6af8d33..adc4c2a 100644
--- a/src/VBox/Runtime/generic/fs-stubs-generic.cpp
+++ b/src/VBox/Runtime/generic/fs-stubs-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/http-curl.cpp b/src/VBox/Runtime/generic/http-curl.cpp
index d3adcc8..a38d1a7 100644
--- a/src/VBox/Runtime/generic/http-curl.cpp
+++ b/src/VBox/Runtime/generic/http-curl.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -53,6 +53,9 @@
 
 #include "internal/magics.h"
 
+#ifdef RT_OS_WINDOWS /* curl.h drags in windows.h which isn't necessarily -Wall clean. */
+# include <iprt/win/windows.h>
+#endif
 #include <curl/curl.h>
 
 #ifdef RT_OS_DARWIN
@@ -639,7 +642,6 @@ static int rtHttpConfigureProxyFromUrl(PRTHTTPINTERNAL pThis, const char *pszPro
     int rc = RTUriParse(pszProxyUrl, &Parsed);
     if (RT_SUCCESS(rc))
     {
-        bool fDone = false;
         char *pszHost = RTUriParsedAuthorityHost(pszProxyUrl, &Parsed);
         if (pszHost)
         {
@@ -977,11 +979,10 @@ static void rtHttpDarwinPacCallback(void *pvUser, CFArrayRef hArrayProxies, CFEr
  * Executes a PAC script and returning the proxies it suggests.
  *
  * @returns Array of proxy configs (CFProxySupport.h style).
- * @param   pThis           The HTTP client instance.
  * @param   hUrlTarget      The URL we're about to use.
  * @param   hUrlScript      The PAC script URL.
  */
-static CFArrayRef rtHttpDarwinExecuteProxyAutoConfigurationUrl(PRTHTTPINTERNAL pThis, CFURLRef hUrlTarget, CFURLRef hUrlScript)
+static CFArrayRef rtHttpDarwinExecuteProxyAutoConfigurationUrl(CFURLRef hUrlTarget, CFURLRef hUrlScript)
 {
     char szTmp[256];
     if (LogIsFlowEnabled())
@@ -1067,7 +1068,7 @@ static int rtHttpDarwinTryConfigProxy(PRTHTTPINTERNAL pThis, CFDictionaryRef hDi
         AssertReturn(hUrlScript, VINF_NOT_SUPPORTED);
 
         int rcRet = VINF_NOT_SUPPORTED;
-        CFArrayRef hArray = rtHttpDarwinExecuteProxyAutoConfigurationUrl(pThis, hUrlTarget, hUrlScript);
+        CFArrayRef hArray = rtHttpDarwinExecuteProxyAutoConfigurationUrl(hUrlTarget, hUrlScript);
         if (hArray)
         {
             rcRet = rtHttpDarwinTryConfigProxies(pThis, hArray, hUrlTarget, true /*fIgnorePacType*/);
@@ -1177,7 +1178,7 @@ static int rtHttpDarwinTryConfigProxies(PRTHTTPINTERNAL pThis, CFArrayRef hArray
  * @param   pszUrl      The URL.
  */
 static int rtHttpDarwinConfigureProxyForUrlWorker(PRTHTTPINTERNAL pThis, CFDictionaryRef hDictProxies,
-                                                  const char *pszUrl, PRTURIPARSED pParsed, const char *pszHost)
+                                                  const char *pszUrl, const char *pszHost)
 {
     CFArrayRef  hArray;
 
@@ -1256,7 +1257,7 @@ static int rtHttpDarwinConfigureProxyForUrlWorker(PRTHTTPINTERNAL pThis, CFDicti
                         if (hArray)
                             CFRelease(hArray);
 
-                        hArray = rtHttpDarwinExecuteProxyAutoConfigurationUrl(pThis, hUrlTarget, hUrlScript);
+                        hArray = rtHttpDarwinExecuteProxyAutoConfigurationUrl(hUrlTarget, hUrlScript);
                         if (hArray)
                         {
                             rcRet = rtHttpDarwinTryConfigProxies(pThis, hArray, hUrlTarget, true /*fIgnorePacType*/);
@@ -1331,7 +1332,7 @@ static int rtHttpDarwinConfigureProxyForUrl(PRTHTTPINTERNAL pThis, const char *p
      */
     CFDictionaryRef hDictProxies = CFNetworkCopySystemProxySettings(); /* Alt for 10.5: SCDynamicStoreCopyProxies(NULL); */
     if (hDictProxies)
-        rc = rtHttpDarwinConfigureProxyForUrlWorker(pThis, hDictProxies, pszUrl, &Parsed, pszHost);
+        rc = rtHttpDarwinConfigureProxyForUrlWorker(pThis, hDictProxies, pszUrl, pszHost);
     else
         rc = VINF_NOT_SUPPORTED;
     CFRelease(hDictProxies);
@@ -1424,7 +1425,7 @@ static bool rtHttpWinIsUrlInBypassList(const char *pszUrl, PCRTUTF16 pwszBypass)
          * names or IP addresses, and may use wildcard ('*', '?', I guess).  There
          * special "<local>" entry matches anything without a dot.
          */
-        RTNETADDRU  HostAddr;
+        RTNETADDRU  HostAddr = { 0, 0 };
         int         fIsHostIpv4Address = -1;
         char *pszEntry = pszBypassFree;
         while (*pszEntry != '\0')
@@ -1554,7 +1555,7 @@ static int rtHttpWinSelectProxyFromList(PRTHTTPINTERNAL pThis, const char *pszUr
                                                               pszEndOfScheme ? pszEndOfScheme - pszEntry : cchEntry);
             if (pszEqual)
             {
-                if (   pszEqual - pszEntry == cchUrlScheme
+                if (   (uintptr_t)(pszEqual - pszEntry) == cchUrlScheme
                     && RTStrNICmp(pszEntry, pszUrlScheme, cchUrlScheme) == 0)
                 {
                     pszBestEntry = pszEqual + 1;
@@ -1564,7 +1565,7 @@ static int rtHttpWinSelectProxyFromList(PRTHTTPINTERNAL pThis, const char *pszUr
             else
             {
                 bool fSchemeMatch = pszEndOfScheme
-                                 && pszEndOfScheme - pszEntry == cchUrlScheme
+                                 && (uintptr_t)(pszEndOfScheme - pszEntry) == cchUrlScheme
                                  && RTStrNICmp(pszEntry, pszUrlScheme, cchUrlScheme) == 0;
                 if (   !pszBestEntry
                     || (   !fBestEntryHasSameScheme
@@ -1621,8 +1622,6 @@ static int rtHttpWinConfigureProxyForUrl(PRTHTTPINTERNAL pThis, const char *pszU
          * in some way, if we can we prepare ProxyOptions with a non-zero dwFlags.
          */
         WINHTTP_PROXY_INFO          ProxyInfo;
-        PRTUTF16                    pwszProxy = NULL;
-        PRTUTF16                    pwszNoProxy = NULL;
         WINHTTP_AUTOPROXY_OPTIONS   AutoProxyOptions;
         RT_ZERO(AutoProxyOptions);
         RT_ZERO(ProxyInfo);
@@ -1873,7 +1872,7 @@ static void rtHttpUnsetCaFile(PRTHTTPINTERNAL pThis)
     {
         if (pThis->fDeleteCaFile)
         {
-            int rc2 = RTFileDelete(pThis->pszCaFile);
+            int rc2 = RTFileDelete(pThis->pszCaFile); RT_NOREF_PV(rc2);
             AssertMsg(RT_SUCCESS(rc2) || !RTFileExists(pThis->pszCaFile), ("rc=%Rrc '%s'\n", rc2, pThis->pszCaFile));
         }
         RTStrFree(pThis->pszCaFile);
@@ -1955,6 +1954,8 @@ RTR3DECL(int) RTHttpGatherCaCertsInStore(RTCRSTORE hStore, uint32_t fFlags, PRTE
 {
     uint32_t const cBefore = RTCrStoreCertCount(hStore);
     AssertReturn(cBefore != UINT32_MAX, VERR_INVALID_HANDLE);
+    RT_NOREF_PV(fFlags);
+
 
     /*
      * Add the user store, quitely ignoring any errors.
@@ -2123,6 +2124,8 @@ static int rtHttpProgress(void *pData, double rdTotalDownload, double rdDownload
 {
     PRTHTTPINTERNAL pThis = (PRTHTTPINTERNAL)pData;
     AssertReturn(pThis->u32Magic == RTHTTP_MAGIC, 1);
+    RT_NOREF_PV(rdTotalUpload);
+    RT_NOREF_PV(rdUploaded);
 
     pThis->cbDownloadHint = (uint64_t)rdTotalDownload;
 
diff --git a/src/VBox/Runtime/generic/mempool-generic.cpp b/src/VBox/Runtime/generic/mempool-generic.cpp
index 0380b57..fc929db 100644
--- a/src/VBox/Runtime/generic/mempool-generic.cpp
+++ b/src/VBox/Runtime/generic/mempool-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -379,7 +379,7 @@ RTDECL(uint32_t) RTMemPoolRelease(RTMEMPOOL hMemPool, void *pv) RT_NO_THROW_DEF
     RTMEMPOOL_VALID_ENTRY_RETURN_RC(pEntry, UINT32_MAX);
     Assert(    hMemPool == NIL_RTMEMPOOL
            ||  hMemPool == pEntry->pMemPool
-           ||  (hMemPool == RTMEMPOOL_DEFAULT && pEntry->pMemPool == &g_rtMemPoolDefault));
+           ||  (hMemPool == RTMEMPOOL_DEFAULT && pEntry->pMemPool == &g_rtMemPoolDefault)); RT_NOREF_PV(hMemPool);
     AssertReturn(pEntry->cRefs > 0, UINT32_MAX);
 
     uint32_t cRefs = ASMAtomicDecU32(&pEntry->cRefs);
diff --git a/src/VBox/Runtime/generic/memsafer-generic.cpp b/src/VBox/Runtime/generic/memsafer-generic.cpp
index 156d6de..9eeced0 100644
--- a/src/VBox/Runtime/generic/memsafer-generic.cpp
+++ b/src/VBox/Runtime/generic/memsafer-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -107,6 +107,7 @@ RTDECL(int) RTMemSaferAllocZExTag(void **ppvNew, size_t cb, uint32_t fFlags, con
     AssertPtrReturn(ppvNew, VERR_INVALID_PARAMETER);
     *ppvNew = NULL;
     AssertReturn(cb, VERR_INVALID_PARAMETER);
+    RT_NOREF_PV(pszTag);
 
     /*
      * We support none of the hard requirements passed thru flags.
diff --git a/src/VBox/Runtime/generic/mppresent-generic.cpp b/src/VBox/Runtime/generic/mppresent-generic.cpp
index ea988e0..1112696 100644
--- a/src/VBox/Runtime/generic/mppresent-generic.cpp
+++ b/src/VBox/Runtime/generic/mppresent-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/pathhost-generic.cpp b/src/VBox/Runtime/generic/pathhost-generic.cpp
index 11c442b..494bdc9 100644
--- a/src/VBox/Runtime/generic/pathhost-generic.cpp
+++ b/src/VBox/Runtime/generic/pathhost-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/sched-generic.cpp b/src/VBox/Runtime/generic/sched-generic.cpp
index b0f51c8..0f67dcd 100644
--- a/src/VBox/Runtime/generic/sched-generic.cpp
+++ b/src/VBox/Runtime/generic/sched-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/semfastmutex-generic.cpp b/src/VBox/Runtime/generic/semfastmutex-generic.cpp
index 8f070b2..8fd0de4 100644
--- a/src/VBox/Runtime/generic/semfastmutex-generic.cpp
+++ b/src/VBox/Runtime/generic/semfastmutex-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/semrw-generic.cpp b/src/VBox/Runtime/generic/semrw-generic.cpp
index f72f60c..d2f876f 100644
--- a/src/VBox/Runtime/generic/semrw-generic.cpp
+++ b/src/VBox/Runtime/generic/semrw-generic.cpp
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -158,6 +158,8 @@ RTDECL(int) RTSemRWCreateEx(PRTSEMRW phRWSem, uint32_t fFlags,
                             va_end(va);
                         }
                         RTLockValidatorRecMakeSiblings(&pThis->ValidatorWrite.Core, &pThis->ValidatorRead.Core);
+#else
+                        RT_NOREF_PV(hClass); RT_NOREF_PV(uSubClass); RT_NOREF_PV(pszNameFmt);
 #endif
                         *phRWSem = pThis;
                         return VINF_SUCCESS;
@@ -202,7 +204,7 @@ RTDECL(int) RTSemRWDestroy(RTSEMRW hRWSem)
              * Make it invalid and unusable.
              */
             ASMAtomicWriteU32(&pThis->u32Magic, ~RTSEMRW_MAGIC);
-            pThis->cReads = ~0;
+            pThis->cReads = UINT32_MAX;
 
             /*
              * Do actual cleanup. None of these can now fail.
@@ -256,6 +258,7 @@ RTDECL(uint32_t) RTSemRWSetSubClass(RTSEMRW hRWSem, uint32_t uSubClass)
     RTLockValidatorRecSharedSetSubClass(&pThis->ValidatorRead, uSubClass);
     return RTLockValidatorRecExclSetSubClass(&pThis->ValidatorWrite, uSubClass);
 #else
+    RT_NOREF_PV(hRWSem); RT_NOREF_PV(uSubClass);
     return RTLOCKVAL_SUB_CLASS_INVALID;
 #endif
 }
@@ -373,6 +376,7 @@ DECL_FORCE_INLINE(int) rtSemRWRequestRead(RTSEMRW hRWSem, RTMSINTERVAL cMillies,
             break;
 #else
         RTThreadBlocking(hThreadSelf, RTTHREADSTATE_RW_READ, false);
+        RT_NOREF_PV(pSrcPos);
 #endif
         int rcWait;
         if (fInterruptible)
@@ -662,6 +666,7 @@ DECL_FORCE_INLINE(int) rtSemRWRequestWrite(RTSEMRW hRWSem, RTMSINTERVAL cMillies
             break;
 #else
         RTThreadBlocking(hThreadSelf, RTTHREADSTATE_RW_WRITE, false);
+        RT_NOREF_PV(pSrcPos);
 #endif
         int rcWait;
         if (fInterruptible)
diff --git a/src/VBox/Runtime/generic/semrw-lockless-generic.cpp b/src/VBox/Runtime/generic/semrw-lockless-generic.cpp
index 1aa4200..ef72a7e 100644
--- a/src/VBox/Runtime/generic/semrw-lockless-generic.cpp
+++ b/src/VBox/Runtime/generic/semrw-lockless-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/semxroads-generic.cpp b/src/VBox/Runtime/generic/semxroads-generic.cpp
index c2f084e..b3e9a02 100644
--- a/src/VBox/Runtime/generic/semxroads-generic.cpp
+++ b/src/VBox/Runtime/generic/semxroads-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/spinlock-generic.cpp b/src/VBox/Runtime/generic/spinlock-generic.cpp
index 5d0bd5b..f6367f9 100644
--- a/src/VBox/Runtime/generic/spinlock-generic.cpp
+++ b/src/VBox/Runtime/generic/spinlock-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -77,6 +77,7 @@ RTDECL(int)  RTSpinlockCreate(PRTSPINLOCK pSpinlock, uint32_t fFlags, const char
 {
     PRTSPINLOCKINTERNAL pThis;
     AssertReturn(fFlags == RTSPINLOCK_FLAGS_INTERRUPT_SAFE || fFlags == RTSPINLOCK_FLAGS_INTERRUPT_UNSAFE, VERR_INVALID_PARAMETER);
+    RT_NOREF_PV(pszName);
 
     /*
      * Allocate.
diff --git a/src/VBox/Runtime/generic/strcache-stubs-generic.cpp b/src/VBox/Runtime/generic/strcache-stubs-generic.cpp
index 7498c9a..0d2336a 100644
--- a/src/VBox/Runtime/generic/strcache-stubs-generic.cpp
+++ b/src/VBox/Runtime/generic/strcache-stubs-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/timer-generic.cpp b/src/VBox/Runtime/generic/timer-generic.cpp
index e5932ec..b16bd9e 100644
--- a/src/VBox/Runtime/generic/timer-generic.cpp
+++ b/src/VBox/Runtime/generic/timer-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/timerlr-generic.cpp b/src/VBox/Runtime/generic/timerlr-generic.cpp
index bd42008..cc5b0e4 100644
--- a/src/VBox/Runtime/generic/timerlr-generic.cpp
+++ b/src/VBox/Runtime/generic/timerlr-generic.cpp
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -261,7 +261,7 @@ RTDECL(int) RTTimerLRChangeInterval(RTTIMERLR hTimerLR, uint64_t u64NanoInterval
         ASMAtomicWriteU64(&pThis->u64StartTS, u64Now);
         ASMAtomicWriteU64(&pThis->u64NextTS, u64Now);
         ASMAtomicWriteU64(&pThis->u64NanoInterval, u64NanoInterval);
-        int rc = RTSemEventSignal(pThis->hEvent);
+        RTSemEventSignal(pThis->hEvent);
     }
 
     return VINF_SUCCESS;
diff --git a/src/VBox/Runtime/generic/tls-generic.cpp b/src/VBox/Runtime/generic/tls-generic.cpp
index fbbb191..a325469 100644
--- a/src/VBox/Runtime/generic/tls-generic.cpp
+++ b/src/VBox/Runtime/generic/tls-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/utf16locale-generic.cpp b/src/VBox/Runtime/generic/utf16locale-generic.cpp
index 551b588..6daf705 100644
--- a/src/VBox/Runtime/generic/utf16locale-generic.cpp
+++ b/src/VBox/Runtime/generic/utf16locale-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/generic/uuid-generic.cpp b/src/VBox/Runtime/generic/uuid-generic.cpp
index bf04a25..ac053ce 100644
--- a/src/VBox/Runtime/generic/uuid-generic.cpp
+++ b/src/VBox/Runtime/generic/uuid-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/alignmentchecks.h b/src/VBox/Runtime/include/internal/alignmentchecks.h
index 59ade37..efb114f 100644
--- a/src/VBox/Runtime/include/internal/alignmentchecks.h
+++ b/src/VBox/Runtime/include/internal/alignmentchecks.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/assert.h b/src/VBox/Runtime/include/internal/assert.h
index c8e4ce0..78e4e43 100644
--- a/src/VBox/Runtime/include/internal/assert.h
+++ b/src/VBox/Runtime/include/internal/assert.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/bignum.mac b/src/VBox/Runtime/include/internal/bignum.mac
index 61e2905..d7a75a1 100644
--- a/src/VBox/Runtime/include/internal/bignum.mac
+++ b/src/VBox/Runtime/include/internal/bignum.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2009-2015 Oracle Corporation
+; Copyright (C) 2009-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/dbgmod.h b/src/VBox/Runtime/include/internal/dbgmod.h
index 25e5695..f507c51 100644
--- a/src/VBox/Runtime/include/internal/dbgmod.h
+++ b/src/VBox/Runtime/include/internal/dbgmod.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/dir.h b/src/VBox/Runtime/include/internal/dir.h
index 7508f31..49222c8 100644
--- a/src/VBox/Runtime/include/internal/dir.h
+++ b/src/VBox/Runtime/include/internal/dir.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/dvm.h b/src/VBox/Runtime/include/internal/dvm.h
index 0f60713..6303fd4 100644
--- a/src/VBox/Runtime/include/internal/dvm.h
+++ b/src/VBox/Runtime/include/internal/dvm.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/file.h b/src/VBox/Runtime/include/internal/file.h
index da38c2b..eafb805 100644
--- a/src/VBox/Runtime/include/internal/file.h
+++ b/src/VBox/Runtime/include/internal/file.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/fileaio.h b/src/VBox/Runtime/include/internal/fileaio.h
index f1bcbaf..19b7a3d 100644
--- a/src/VBox/Runtime/include/internal/fileaio.h
+++ b/src/VBox/Runtime/include/internal/fileaio.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/filesystem.h b/src/VBox/Runtime/include/internal/filesystem.h
index 4600f92..f7d74d8 100644
--- a/src/VBox/Runtime/include/internal/filesystem.h
+++ b/src/VBox/Runtime/include/internal/filesystem.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/fs.h b/src/VBox/Runtime/include/internal/fs.h
index 336d2a1..84a7b9d 100644
--- a/src/VBox/Runtime/include/internal/fs.h
+++ b/src/VBox/Runtime/include/internal/fs.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/initterm.h b/src/VBox/Runtime/include/internal/initterm.h
index 4194c48..4f6495f 100644
--- a/src/VBox/Runtime/include/internal/initterm.h
+++ b/src/VBox/Runtime/include/internal/initterm.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/iprt-openssl.h b/src/VBox/Runtime/include/internal/iprt-openssl.h
index fb007c8..3cf331f 100644
--- a/src/VBox/Runtime/include/internal/iprt-openssl.h
+++ b/src/VBox/Runtime/include/internal/iprt-openssl.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/iprt.h b/src/VBox/Runtime/include/internal/iprt.h
index c03b4e8..de86779 100644
--- a/src/VBox/Runtime/include/internal/iprt.h
+++ b/src/VBox/Runtime/include/internal/iprt.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/ldr.h b/src/VBox/Runtime/include/internal/ldr.h
index e15bbc7..eed2829 100644
--- a/src/VBox/Runtime/include/internal/ldr.h
+++ b/src/VBox/Runtime/include/internal/ldr.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/ldrELF.h b/src/VBox/Runtime/include/internal/ldrELF.h
index 0b54499..018bc04 100644
--- a/src/VBox/Runtime/include/internal/ldrELF.h
+++ b/src/VBox/Runtime/include/internal/ldrELF.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/ldrELF32.h b/src/VBox/Runtime/include/internal/ldrELF32.h
index 85a9ba7..1c8441a 100644
--- a/src/VBox/Runtime/include/internal/ldrELF32.h
+++ b/src/VBox/Runtime/include/internal/ldrELF32.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/ldrELF64.h b/src/VBox/Runtime/include/internal/ldrELF64.h
index 405d039..817871b 100644
--- a/src/VBox/Runtime/include/internal/ldrELF64.h
+++ b/src/VBox/Runtime/include/internal/ldrELF64.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/lockvalidator.h b/src/VBox/Runtime/include/internal/lockvalidator.h
index f77c21e..342402d 100644
--- a/src/VBox/Runtime/include/internal/lockvalidator.h
+++ b/src/VBox/Runtime/include/internal/lockvalidator.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/magics.h b/src/VBox/Runtime/include/internal/magics.h
index 7b0d66a..ff23f47 100644
--- a/src/VBox/Runtime/include/internal/magics.h
+++ b/src/VBox/Runtime/include/internal/magics.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/mem.h b/src/VBox/Runtime/include/internal/mem.h
index d86a9cb..4fb1835 100644
--- a/src/VBox/Runtime/include/internal/mem.h
+++ b/src/VBox/Runtime/include/internal/mem.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/memobj.h b/src/VBox/Runtime/include/internal/memobj.h
index 7191e39..919c0f6 100644
--- a/src/VBox/Runtime/include/internal/memobj.h
+++ b/src/VBox/Runtime/include/internal/memobj.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/path.h b/src/VBox/Runtime/include/internal/path.h
index 9471ef9..3e534e6 100644
--- a/src/VBox/Runtime/include/internal/path.h
+++ b/src/VBox/Runtime/include/internal/path.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/pipe.h b/src/VBox/Runtime/include/internal/pipe.h
index 19f182d..d0f4fe1 100644
--- a/src/VBox/Runtime/include/internal/pipe.h
+++ b/src/VBox/Runtime/include/internal/pipe.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/process.h b/src/VBox/Runtime/include/internal/process.h
index ad84f9d..abe4b5c 100644
--- a/src/VBox/Runtime/include/internal/process.h
+++ b/src/VBox/Runtime/include/internal/process.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/rand.h b/src/VBox/Runtime/include/internal/rand.h
index 01d877d..d7686ad 100644
--- a/src/VBox/Runtime/include/internal/rand.h
+++ b/src/VBox/Runtime/include/internal/rand.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/req.h b/src/VBox/Runtime/include/internal/req.h
index c22ea19..6b2dcd3 100644
--- a/src/VBox/Runtime/include/internal/req.h
+++ b/src/VBox/Runtime/include/internal/req.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/sched.h b/src/VBox/Runtime/include/internal/sched.h
index fdaa21b..5191605 100644
--- a/src/VBox/Runtime/include/internal/sched.h
+++ b/src/VBox/Runtime/include/internal/sched.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/socket.h b/src/VBox/Runtime/include/internal/socket.h
index edd39d4..c5ea378 100644
--- a/src/VBox/Runtime/include/internal/socket.h
+++ b/src/VBox/Runtime/include/internal/socket.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/strhash.h b/src/VBox/Runtime/include/internal/strhash.h
index e063561..e9c396d 100644
--- a/src/VBox/Runtime/include/internal/strhash.h
+++ b/src/VBox/Runtime/include/internal/strhash.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/strict.h b/src/VBox/Runtime/include/internal/strict.h
index 245ab76..d402f1c 100644
--- a/src/VBox/Runtime/include/internal/strict.h
+++ b/src/VBox/Runtime/include/internal/strict.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/string.h b/src/VBox/Runtime/include/internal/string.h
index 451100a..799d104 100644
--- a/src/VBox/Runtime/include/internal/string.h
+++ b/src/VBox/Runtime/include/internal/string.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/thread.h b/src/VBox/Runtime/include/internal/thread.h
index 96112a5..54dc78a 100644
--- a/src/VBox/Runtime/include/internal/thread.h
+++ b/src/VBox/Runtime/include/internal/thread.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/include/internal/time.h b/src/VBox/Runtime/include/internal/time.h
index 7714532..3f59825 100644
--- a/src/VBox/Runtime/include/internal/time.h
+++ b/src/VBox/Runtime/include/internal/time.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/nt/NtProcessStartup-stub.cpp b/src/VBox/Runtime/nt/NtProcessStartup-stub.cpp
index e1ce1fd..2b1ae75 100644
--- a/src/VBox/Runtime/nt/NtProcessStartup-stub.cpp
+++ b/src/VBox/Runtime/nt/NtProcessStartup-stub.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/nt/RTErrConvertFromNtStatus.cpp b/src/VBox/Runtime/nt/RTErrConvertFromNtStatus.cpp
index 4810306..5a7ba47 100644
--- a/src/VBox/Runtime/nt/RTErrConvertFromNtStatus.cpp
+++ b/src/VBox/Runtime/nt/RTErrConvertFromNtStatus.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/os2/RTErrConvertFromOS2.cpp b/src/VBox/Runtime/os2/RTErrConvertFromOS2.cpp
index 0aa3c0d..1a58795 100644
--- a/src/VBox/Runtime/os2/RTErrConvertFromOS2.cpp
+++ b/src/VBox/Runtime/os2/RTErrConvertFromOS2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/os2/rtSemWaitOs2ConvertTimeout.cpp b/src/VBox/Runtime/os2/rtSemWaitOs2ConvertTimeout.cpp
index 36db98c..a6bb57b 100644
--- a/src/VBox/Runtime/os2/rtSemWaitOs2ConvertTimeout.cpp
+++ b/src/VBox/Runtime/os2/rtSemWaitOs2ConvertTimeout.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/os2/sys0.asm b/src/VBox/Runtime/os2/sys0.asm
index 892e01e..5074504 100644
--- a/src/VBox/Runtime/os2/sys0.asm
+++ b/src/VBox/Runtime/os2/sys0.asm
@@ -3,7 +3,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/alloc-ef-r0drv.cpp b/src/VBox/Runtime/r0drv/alloc-ef-r0drv.cpp
index 0bf77d9..8cd73cf 100644
--- a/src/VBox/Runtime/r0drv/alloc-ef-r0drv.cpp
+++ b/src/VBox/Runtime/r0drv/alloc-ef-r0drv.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -46,9 +46,9 @@
 #include "internal/mem.h"
 
 
-/*******************************************************************************
-*   Defined Constants And Macros                                               *
-*******************************************************************************/
+/*********************************************************************************************************************************
+*   Defined Constants And Macros                                                                                                 *
+*********************************************************************************************************************************/
 #if defined(DOXYGEN_RUNNING)
 # define RTR0MEM_EF_IN_FRONT
 #endif
@@ -112,11 +112,11 @@
 #define RTR0MEM_EF_FENCE_FILLER     0xcc
 
 
-/*******************************************************************************
-*   Header Files                                                               *
-*******************************************************************************/
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
 #ifdef RT_OS_WINDOWS
-# include <Windows.h>
+# include <iprt/win/windows.h>
 #elif !defined(RT_OS_FREEBSD)
 # include <sys/mman.h>
 #endif
@@ -124,9 +124,9 @@
 #include <iprt/thread.h>
 
 
-/*******************************************************************************
-*   Structures and Typedefs                                                    *
-*******************************************************************************/
+/*********************************************************************************************************************************
+*   Structures and Typedefs                                                                                                      *
+*********************************************************************************************************************************/
 /**
  * Allocation types.
  */
@@ -205,6 +205,7 @@ bool    gfRTMemFreeLog = false;
  */
 static DECLCALLBACK(size_t) rtR0MemEfWrite(void *pvArg, const char *pachChars, size_t cbChars)
 {
+    RT_NOREF1(pvArg);
     if (cbChars)
     {
         RTLogWriteDebugger(pachChars, cbChars);
diff --git a/src/VBox/Runtime/r0drv/alloc-r0drv.cpp b/src/VBox/Runtime/r0drv/alloc-r0drv.cpp
index d6b9cf2..ce142a6 100644
--- a/src/VBox/Runtime/r0drv/alloc-r0drv.cpp
+++ b/src/VBox/Runtime/r0drv/alloc-r0drv.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -117,6 +117,7 @@ RTDECL(void *)  RTMemAllocTag(size_t cb, const char *pszTag) RT_NO_THROW_DEF
 {
     PRTMEMHDR pHdr;
     RT_ASSERT_INTS_ON();
+    RT_NOREF_PV(pszTag);
 
     pHdr = rtR0MemAlloc(cb + RTR0MEM_FENCE_EXTRA, 0);
     if (pHdr)
@@ -136,6 +137,7 @@ RTDECL(void *)  RTMemAllocZTag(size_t cb, const char *pszTag) RT_NO_THROW_DEF
 {
     PRTMEMHDR pHdr;
     RT_ASSERT_INTS_ON();
+    RT_NOREF_PV(pszTag);
 
     pHdr = rtR0MemAlloc(cb + RTR0MEM_FENCE_EXTRA, RTMEMHDR_FLAG_ZEROED);
     if (pHdr)
@@ -284,6 +286,8 @@ RTDECL(void *)    RTMemExecAllocTag(size_t cb, const char *pszTag) RT_NO_THROW_D
 #else
     RT_ASSERT_PREEMPTIBLE();
 #endif
+    RT_NOREF_PV(pszTag);
+
 
     pHdr = rtR0MemAlloc(cb + RTR0MEM_FENCE_EXTRA, RTMEMHDR_FLAG_EXEC);
     if (pHdr)
@@ -303,6 +307,7 @@ RTDECL(void)      RTMemExecFree(void *pv, size_t cb) RT_NO_THROW_DEF
 {
     PRTMEMHDR pHdr;
     RT_ASSERT_INTS_ON();
+    RT_NOREF_PV(cb);
 
     if (!pv)
         return;
@@ -334,6 +339,7 @@ RTDECL(int) RTMemAllocExTag(size_t cb, size_t cbAlignment, uint32_t fFlags, cons
     uint32_t    fHdrFlags = RTMEMHDR_FLAG_ALLOC_EX;
     PRTMEMHDR   pHdr;
     int         rc;
+    RT_NOREF_PV(pszTag);
 
     RT_ASSERT_PREEMPT_CPUID_VAR();
     if (!(fFlags & RTMEMALLOCEX_FLAGS_ANY_CTX_ALLOC))
@@ -396,6 +402,7 @@ RT_EXPORT_SYMBOL(RTMemAllocExTag);
 RTDECL(void) RTMemFreeEx(void *pv, size_t cb) RT_NO_THROW_DEF
 {
     PRTMEMHDR pHdr;
+    RT_NOREF_PV(cb);
 
     if (!pv)
         return;
diff --git a/src/VBox/Runtime/r0drv/alloc-r0drv.h b/src/VBox/Runtime/r0drv/alloc-r0drv.h
index b92b149..5e5a3e0 100644
--- a/src/VBox/Runtime/r0drv/alloc-r0drv.h
+++ b/src/VBox/Runtime/r0drv/alloc-r0drv.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/darwin/RTLogWriteDebugger-r0drv-darwin.cpp b/src/VBox/Runtime/r0drv/darwin/RTLogWriteDebugger-r0drv-darwin.cpp
index 656eda2..d8858e7 100644
--- a/src/VBox/Runtime/r0drv/darwin/RTLogWriteDebugger-r0drv-darwin.cpp
+++ b/src/VBox/Runtime/r0drv/darwin/RTLogWriteDebugger-r0drv-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/darwin/RTLogWriteStdOut-r0drv-darwin.cpp b/src/VBox/Runtime/r0drv/darwin/RTLogWriteStdOut-r0drv-darwin.cpp
index 3040da2..fb5c5c9 100644
--- a/src/VBox/Runtime/r0drv/darwin/RTLogWriteStdOut-r0drv-darwin.cpp
+++ b/src/VBox/Runtime/r0drv/darwin/RTLogWriteStdOut-r0drv-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/darwin/alloc-r0drv-darwin.cpp b/src/VBox/Runtime/r0drv/darwin/alloc-r0drv-darwin.cpp
index 2b22ef8..94bca78 100644
--- a/src/VBox/Runtime/r0drv/darwin/alloc-r0drv-darwin.cpp
+++ b/src/VBox/Runtime/r0drv/darwin/alloc-r0drv-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -28,6 +28,7 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations" /* (IOMallocContiguous et al are deprecated) */
 #include "the-darwin-kernel.h"
 #include "internal/iprt.h"
 #include <iprt/mem.h>
diff --git a/src/VBox/Runtime/r0drv/darwin/assert-r0drv-darwin.cpp b/src/VBox/Runtime/r0drv/darwin/assert-r0drv-darwin.cpp
index d3dcb9b..1337927 100644
--- a/src/VBox/Runtime/r0drv/darwin/assert-r0drv-darwin.cpp
+++ b/src/VBox/Runtime/r0drv/darwin/assert-r0drv-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/darwin/dbgkrnlinfo-r0drv-darwin.cpp b/src/VBox/Runtime/r0drv/darwin/dbgkrnlinfo-r0drv-darwin.cpp
index 4978665..57dad49 100644
--- a/src/VBox/Runtime/r0drv/darwin/dbgkrnlinfo-r0drv-darwin.cpp
+++ b/src/VBox/Runtime/r0drv/darwin/dbgkrnlinfo-r0drv-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -770,7 +770,6 @@ static int rtR0DbgKrnlDarwinLoadCommands(RTDBGKRNLINFOINT *pThis)
 
                 /* Validate the sections. */
                 uint32_t            uAlignment = 0;
-                uintptr_t           uAddr      = pSeg->vmaddr;
                 MY_SECTION const   *paSects    = (MY_SECTION const *)(pSeg + 1);
                 for (uint32_t i = 0; i < pSeg->nsects; i++)
                 {
@@ -1166,9 +1165,10 @@ RTR0DECL(int) RTR0DbgKrnlInfoQueryMember(RTDBGKRNLINFO hKrnlInfo, const char *ps
     RTDBGKRNLINFOINT *pThis = hKrnlInfo;
     AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
     AssertMsgReturn(pThis->u32Magic == RTDBGKRNLINFO_MAGIC, ("%p: u32Magic=%RX32\n", pThis, pThis->u32Magic), VERR_INVALID_HANDLE);
-    AssertPtrReturn(pszMember, VERR_INVALID_PARAMETER);
-    AssertPtrReturn(pszStructure, VERR_INVALID_PARAMETER);
-    AssertPtrReturn(poffMember, VERR_INVALID_PARAMETER);
+    AssertPtrReturn(pszMember, VERR_INVALID_POINTER);
+    AssertPtrReturn(pszModule, VERR_INVALID_POINTER);
+    AssertPtrReturn(pszStructure, VERR_INVALID_POINTER);
+    AssertPtrReturn(poffMember, VERR_INVALID_POINTER);
     return VERR_NOT_FOUND;
 }
 
diff --git a/src/VBox/Runtime/r0drv/darwin/initterm-r0drv-darwin.cpp b/src/VBox/Runtime/r0drv/darwin/initterm-r0drv-darwin.cpp
index 83dab0d..5ab00bb 100644
--- a/src/VBox/Runtime/r0drv/darwin/initterm-r0drv-darwin.cpp
+++ b/src/VBox/Runtime/r0drv/darwin/initterm-r0drv-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/darwin/memobj-r0drv-darwin.cpp b/src/VBox/Runtime/r0drv/darwin/memobj-r0drv-darwin.cpp
index db88a8b..c339df8 100644
--- a/src/VBox/Runtime/r0drv/darwin/memobj-r0drv-darwin.cpp
+++ b/src/VBox/Runtime/r0drv/darwin/memobj-r0drv-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -210,6 +210,7 @@ static vm_map_offset_t rtR0MemObjDarwinGetMapMin(vm_map_t pMap)
 #endif /* unused */
 
 #ifdef RT_STRICT
+# if 0 /* unused */
 
 /**
  * Read from a physical page.
@@ -350,6 +351,7 @@ static uint64_t rtR0MemObjDarwinGetPTE(void *pvPage)
     return 0;
 }
 
+# endif /* unused */
 #endif /* RT_STRICT */
 
 DECLHIDDEN(int) rtR0MemObjNativeFree(RTR0MEMOBJ pMem)
@@ -564,10 +566,10 @@ static int rtR0MemObjNativeAllocWorker(PPRTR0MEMOBJINTERNAL ppMem, size_t cb,
                         rc = rtR0MemObjNativeProtect(&pMemDarwin->Core, 0, cb, RTMEM_PROT_READ | RTMEM_PROT_WRITE | RTMEM_PROT_EXEC);
 # ifdef RT_STRICT
                         /* check that the memory is actually mapped. */
-                        RTTHREADPREEMPTSTATE State = RTTHREADPREEMPTSTATE_INITIALIZER;
-                        RTThreadPreemptDisable(&State);
+                        RTTHREADPREEMPTSTATE State2 = RTTHREADPREEMPTSTATE_INITIALIZER;
+                        RTThreadPreemptDisable(&State2);
                         rtR0MemObjDarwinTouchPages(pv, cb);
-                        RTThreadPreemptRestore(&State);
+                        RTThreadPreemptRestore(&State2);
 # endif
 
                         /* Bug 6226: Ignore KERN_PROTECTION_FAILURE on Leopard and older. */
@@ -708,6 +710,7 @@ DECLHIDDEN(int) rtR0MemObjNativeAllocPhysNC(PPRTR0MEMOBJINTERNAL ppMem, size_t c
      * object which we populate with pages but without mapping it into any address space.
      * Estimate is 2-3 days.
      */
+    RT_NOREF(ppMem, cb, PhysHighest);
     return VERR_NOT_SUPPORTED;
 }
 
@@ -866,12 +869,14 @@ DECLHIDDEN(int) rtR0MemObjNativeLockKernel(PPRTR0MEMOBJINTERNAL ppMem, void *pv,
 
 DECLHIDDEN(int) rtR0MemObjNativeReserveKernel(PPRTR0MEMOBJINTERNAL ppMem, void *pvFixed, size_t cb, size_t uAlignment)
 {
+    RT_NOREF(ppMem, pvFixed, cb, uAlignment);
     return VERR_NOT_SUPPORTED;
 }
 
 
 DECLHIDDEN(int) rtR0MemObjNativeReserveUser(PPRTR0MEMOBJINTERNAL ppMem, RTR3PTR R3PtrFixed, size_t cb, size_t uAlignment, RTR0PROCESS R0Process)
 {
+    RT_NOREF(ppMem, R3PtrFixed, cb, uAlignment, R0Process);
     return VERR_NOT_SUPPORTED;
 }
 
@@ -879,6 +884,7 @@ DECLHIDDEN(int) rtR0MemObjNativeReserveUser(PPRTR0MEMOBJINTERNAL ppMem, RTR3PTR
 DECLHIDDEN(int) rtR0MemObjNativeMapKernel(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ pMemToMap, void *pvFixed, size_t uAlignment,
                                           unsigned fProt, size_t offSub, size_t cbSub)
 {
+    RT_NOREF(fProt);
     AssertReturn(pvFixed == (void *)-1, VERR_NOT_SUPPORTED);
 
     /*
@@ -987,8 +993,11 @@ DECLHIDDEN(int) rtR0MemObjNativeMapKernel(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ
 }
 
 
-DECLHIDDEN(int) rtR0MemObjNativeMapUser(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ pMemToMap, RTR3PTR R3PtrFixed, size_t uAlignment, unsigned fProt, RTR0PROCESS R0Process)
+DECLHIDDEN(int) rtR0MemObjNativeMapUser(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ pMemToMap, RTR3PTR R3PtrFixed, size_t uAlignment,
+                                        unsigned fProt, RTR0PROCESS R0Process)
 {
+    RT_NOREF(fProt);
+
     /*
      * Check for unsupported things.
      */
diff --git a/src/VBox/Runtime/r0drv/darwin/memuserkernel-r0drv-darwin.cpp b/src/VBox/Runtime/r0drv/darwin/memuserkernel-r0drv-darwin.cpp
index a401fe5..bf8f95f 100644
--- a/src/VBox/Runtime/r0drv/darwin/memuserkernel-r0drv-darwin.cpp
+++ b/src/VBox/Runtime/r0drv/darwin/memuserkernel-r0drv-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -105,12 +105,14 @@ RTR0DECL(bool) RTR0MemAreKrnlAndUsrDifferent(void)
 
 RTR0DECL(int) RTR0MemKernelCopyFrom(void *pvDst, void const *pvSrc, size_t cb)
 {
+    RT_NOREF(pvDst, pvSrc, cb);
     return VERR_NOT_SUPPORTED;
 }
 
 
 RTR0DECL(int) RTR0MemKernelCopyTo(void *pvDst, void const *pvSrc, size_t cb)
 {
+    RT_NOREF(pvDst, pvSrc, cb);
     return VERR_NOT_SUPPORTED;
 }
 
diff --git a/src/VBox/Runtime/r0drv/darwin/mp-r0drv-darwin.cpp b/src/VBox/Runtime/r0drv/darwin/mp-r0drv-darwin.cpp
index b6935f6..7643bd9 100644
--- a/src/VBox/Runtime/r0drv/darwin/mp-r0drv-darwin.cpp
+++ b/src/VBox/Runtime/r0drv/darwin/mp-r0drv-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -163,6 +163,7 @@ RTDECL(bool) RTMpIsCpuOnline(RTCPUID idCpu)
 RTDECL(uint32_t) RTMpGetCurFrequency(RTCPUID idCpu)
 {
     /** @todo darwin R0 MP (rainy day) */
+    RT_NOREF(idCpu);
     return 0;
 }
 
@@ -170,6 +171,7 @@ RTDECL(uint32_t) RTMpGetCurFrequency(RTCPUID idCpu)
 RTDECL(uint32_t) RTMpGetMaxFrequency(RTCPUID idCpu)
 {
     /** @todo darwin R0 MP (rainy day) */
+    RT_NOREF(idCpu);
     return 0;
 }
 
diff --git a/src/VBox/Runtime/r0drv/darwin/process-r0drv-darwin.cpp b/src/VBox/Runtime/r0drv/darwin/process-r0drv-darwin.cpp
index 59c7fe0..678b81a 100644
--- a/src/VBox/Runtime/r0drv/darwin/process-r0drv-darwin.cpp
+++ b/src/VBox/Runtime/r0drv/darwin/process-r0drv-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/darwin/semevent-r0drv-darwin.cpp b/src/VBox/Runtime/r0drv/darwin/semevent-r0drv-darwin.cpp
index 88569ea..4bf7e91 100644
--- a/src/VBox/Runtime/r0drv/darwin/semevent-r0drv-darwin.cpp
+++ b/src/VBox/Runtime/r0drv/darwin/semevent-r0drv-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -95,6 +95,7 @@ RTDECL(int)  RTSemEventCreate(PRTSEMEVENT phEventSem)
 
 RTDECL(int)  RTSemEventCreateEx(PRTSEMEVENT phEventSem, uint32_t fFlags, RTLOCKVALCLASS hClass, const char *pszNameFmt, ...)
 {
+    RT_NOREF(hClass, pszNameFmt);
     AssertCompile(sizeof(RTSEMEVENTINTERNAL) > sizeof(void *));
     AssertReturn(!(fFlags & ~(RTSEMEVENT_FLAGS_NO_LOCK_VAL | RTSEMEVENT_FLAGS_BOOTSTRAP_HACK)), VERR_INVALID_PARAMETER);
     Assert(!(fFlags & RTSEMEVENT_FLAGS_BOOTSTRAP_HACK) || (fFlags & RTSEMEVENT_FLAGS_NO_LOCK_VAL));
@@ -135,7 +136,7 @@ RTDECL(int)  RTSemEventCreateEx(PRTSEMEVENT phEventSem, uint32_t fFlags, RTLOCKV
 DECLINLINE(void) rtR0SemEventDarwinRetain(PRTSEMEVENTINTERNAL pThis)
 {
     uint32_t cRefs = ASMAtomicIncU32(&pThis->cRefs);
-    Assert(cRefs && cRefs < 100000);
+    Assert(cRefs && cRefs < 100000); RT_NOREF_PV(cRefs);
 }
 
 
@@ -244,6 +245,8 @@ RTDECL(int)  RTSemEventSignal(RTSEMEVENT hEventSem)
 static int rtR0SemEventDarwinWait(PRTSEMEVENTINTERNAL pThis, uint32_t fFlags, uint64_t uTimeout,
                                   PCRTLOCKVALSRCPOS pSrcPos)
 {
+    RT_NOREF(pSrcPos);
+
     /*
      * Validate the input.
      */
diff --git a/src/VBox/Runtime/r0drv/darwin/semeventmulti-r0drv-darwin.cpp b/src/VBox/Runtime/r0drv/darwin/semeventmulti-r0drv-darwin.cpp
index 35810b6..28e7214 100644
--- a/src/VBox/Runtime/r0drv/darwin/semeventmulti-r0drv-darwin.cpp
+++ b/src/VBox/Runtime/r0drv/darwin/semeventmulti-r0drv-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -99,6 +99,7 @@ RTDECL(int)  RTSemEventMultiCreate(PRTSEMEVENTMULTI phEventMultiSem)
 RTDECL(int)  RTSemEventMultiCreateEx(PRTSEMEVENTMULTI phEventMultiSem, uint32_t fFlags, RTLOCKVALCLASS hClass,
                                      const char *pszNameFmt, ...)
 {
+    RT_NOREF(hClass, pszNameFmt);
     AssertReturn(!(fFlags & ~RTSEMEVENTMULTI_FLAGS_NO_LOCK_VAL), VERR_INVALID_PARAMETER);
     AssertCompile(sizeof(RTSEMEVENTMULTIINTERNAL) > sizeof(void *));
     AssertPtrReturn(phEventMultiSem, VERR_INVALID_POINTER);
@@ -138,6 +139,7 @@ DECLINLINE(void) rtR0SemEventMultiDarwinRetain(PRTSEMEVENTMULTIINTERNAL pThis)
 {
     uint32_t cRefs = ASMAtomicIncU32(&pThis->cRefs);
     Assert(cRefs && cRefs < 100000);
+    RT_NOREF_PV(cRefs);
 }
 
 
@@ -263,6 +265,8 @@ RTDECL(int)  RTSemEventMultiReset(RTSEMEVENTMULTI hEventMultiSem)
 static int rtR0SemEventMultiDarwinWait(PRTSEMEVENTMULTIINTERNAL pThis, uint32_t fFlags, uint64_t uTimeout,
                                        PCRTLOCKVALSRCPOS pSrcPos)
 {
+    RT_NOREF(pSrcPos);
+
     /*
      * Validate input.
      */
diff --git a/src/VBox/Runtime/r0drv/darwin/semfastmutex-r0drv-darwin.cpp b/src/VBox/Runtime/r0drv/darwin/semfastmutex-r0drv-darwin.cpp
index a0a7a27..85e07d2 100644
--- a/src/VBox/Runtime/r0drv/darwin/semfastmutex-r0drv-darwin.cpp
+++ b/src/VBox/Runtime/r0drv/darwin/semfastmutex-r0drv-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/darwin/semmutex-r0drv-darwin.cpp b/src/VBox/Runtime/r0drv/darwin/semmutex-r0drv-darwin.cpp
index c353577..2c7faee 100644
--- a/src/VBox/Runtime/r0drv/darwin/semmutex-r0drv-darwin.cpp
+++ b/src/VBox/Runtime/r0drv/darwin/semmutex-r0drv-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -78,6 +78,7 @@ RTDECL(int)  RTSemMutexCreate(PRTSEMMUTEX phMutexSem)
 RTDECL(int) RTSemMutexCreateEx(PRTSEMMUTEX phMutexSem, uint32_t fFlags,
                                RTLOCKVALCLASS hClass, uint32_t uSubClass, const char *pszNameFmt, ...)
 {
+    RT_NOREF(hClass, uSubClass, pszNameFmt);
     AssertReturn(!(fFlags & ~RTSEMMUTEX_FLAGS_NO_LOCK_VAL), VERR_INVALID_PARAMETER);
     RT_ASSERT_PREEMPTIBLE();
     IPRT_DARWIN_SAVE_EFL_AC();
@@ -325,6 +326,7 @@ RTDECL(int) RTSemMutexRequest(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies)
 
 RTDECL(int) RTSemMutexRequestDebug(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
 {
+    RT_SRC_POS_NOREF(); RT_NOREF(uId);
     return RTSemMutexRequest(hMutexSem, cMillies);
 }
 
@@ -337,6 +339,7 @@ RTDECL(int) RTSemMutexRequestNoResume(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillie
 
 RTDECL(int) RTSemMutexRequestNoResumeDebug(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
 {
+    RT_SRC_POS_NOREF(); RT_NOREF(uId);
     return RTSemMutexRequestNoResume(hMutexSem, cMillies);
 }
 
diff --git a/src/VBox/Runtime/r0drv/darwin/spinlock-r0drv-darwin.cpp b/src/VBox/Runtime/r0drv/darwin/spinlock-r0drv-darwin.cpp
index 46f79de..a6c22a8 100644
--- a/src/VBox/Runtime/r0drv/darwin/spinlock-r0drv-darwin.cpp
+++ b/src/VBox/Runtime/r0drv/darwin/spinlock-r0drv-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/darwin/the-darwin-kernel.h b/src/VBox/Runtime/r0drv/darwin/the-darwin-kernel.h
index 2b6ee8a..e19896c 100644
--- a/src/VBox/Runtime/r0drv/darwin/the-darwin-kernel.h
+++ b/src/VBox/Runtime/r0drv/darwin/the-darwin-kernel.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -51,6 +51,17 @@
 # error "RT_OS_DARWIN must be defined!"
 #endif
 
+#if defined(__clang__) || RT_GNUC_PREREQ(4, 4)
+# pragma GCC diagnostic push
+#endif
+#if defined(__clang__) || RT_GNUC_PREREQ(4, 2)
+# pragma GCC diagnostic ignored "-Wc++11-extensions"
+# pragma GCC diagnostic ignored "-Wc99-extensions"
+# pragma GCC diagnostic ignored "-Wextra-semi"
+# pragma GCC diagnostic ignored "-Wzero-length-array"
+# pragma GCC diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
+#endif
+
 /* now we're ready for including the rest of the Darwin headers. */
 #include <kern/thread.h>
 #include <kern/clock.h>
@@ -79,6 +90,10 @@
 #include <IOKit/IOBufferMemoryDescriptor.h>
 #include <IOKit/IOMapper.h>
 
+#if defined(__clang__) || RT_GNUC_PREREQ(4, 4)
+# pragma GCC diagnostic pop
+#endif
+
 
 /* See osfmk/kern/ast.h. */
 #ifndef AST_PREEMPT
diff --git a/src/VBox/Runtime/r0drv/darwin/thread-r0drv-darwin.cpp b/src/VBox/Runtime/r0drv/darwin/thread-r0drv-darwin.cpp
index 8cbab20..5bab37a 100644
--- a/src/VBox/Runtime/r0drv/darwin/thread-r0drv-darwin.cpp
+++ b/src/VBox/Runtime/r0drv/darwin/thread-r0drv-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/darwin/thread2-r0drv-darwin.cpp b/src/VBox/Runtime/r0drv/darwin/thread2-r0drv-darwin.cpp
index ac5ce58..a5595ba 100644
--- a/src/VBox/Runtime/r0drv/darwin/thread2-r0drv-darwin.cpp
+++ b/src/VBox/Runtime/r0drv/darwin/thread2-r0drv-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -132,12 +132,14 @@ DECLHIDDEN(int) rtThreadNativeSetPriority(PRTTHREADINT pThread, RTTHREADTYPE enm
 
 DECLHIDDEN(int) rtThreadNativeAdopt(PRTTHREADINT pThread)
 {
+    RT_NOREF(pThread);
     return VERR_NOT_IMPLEMENTED;
 }
 
 
 DECLHIDDEN(void) rtThreadNativeWaitKludge(PRTTHREADINT pThread)
 {
+    RT_NOREF(pThread);
     /** @todo fix RTThreadWait/RTR0Term race on darwin. */
     RTThreadSleep(1);
 }
@@ -145,7 +147,7 @@ DECLHIDDEN(void) rtThreadNativeWaitKludge(PRTTHREADINT pThread)
 
 DECLHIDDEN(void) rtThreadNativeDestroy(PRTTHREADINT pThread)
 {
-    NOREF(pThread);
+    RT_NOREF(pThread);
 }
 
 
@@ -159,6 +161,7 @@ DECLHIDDEN(void) rtThreadNativeDestroy(PRTTHREADINT pThread)
  */
 static void rtThreadNativeMain(void *pvArg, wait_result_t Ignored)
 {
+    RT_NOREF(Ignored);
     const thread_t Self = current_thread();
     PRTTHREADINT pThread = (PRTTHREADINT)pvArg;
 
diff --git a/src/VBox/Runtime/r0drv/darwin/threadpreempt-r0drv-darwin.cpp b/src/VBox/Runtime/r0drv/darwin/threadpreempt-r0drv-darwin.cpp
index 1c593b1..e40c9d6 100644
--- a/src/VBox/Runtime/r0drv/darwin/threadpreempt-r0drv-darwin.cpp
+++ b/src/VBox/Runtime/r0drv/darwin/threadpreempt-r0drv-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -103,6 +103,7 @@ void rtThreadPreemptDarwinTerm(void)
 
 RTDECL(bool) RTThreadPreemptIsEnabled(RTTHREAD hThread)
 {
+    RT_NOREF(hThread);
     Assert(hThread == NIL_RTTHREAD);
     return preemption_enabled();
 }
@@ -110,6 +111,7 @@ RTDECL(bool) RTThreadPreemptIsEnabled(RTTHREAD hThread)
 
 RTDECL(bool) RTThreadPreemptIsPending(RTTHREAD hThread)
 {
+    RT_NOREF(hThread);
     if (!g_pfnR0DarwinAstPending)
         return false;
     uint32_t volatile *pfAstPending = g_pfnR0DarwinAstPending(); AssertPtr(pfAstPending);
diff --git a/src/VBox/Runtime/r0drv/darwin/time-r0drv-darwin.cpp b/src/VBox/Runtime/r0drv/darwin/time-r0drv-darwin.cpp
index eb2527b..36cf65d 100644
--- a/src/VBox/Runtime/r0drv/darwin/time-r0drv-darwin.cpp
+++ b/src/VBox/Runtime/r0drv/darwin/time-r0drv-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Audio_old/Makefile.kup b/src/VBox/Runtime/r0drv/freebsd/Makefile.kup
similarity index 100%
copy from src/VBox/Devices/Audio_old/Makefile.kup
copy to src/VBox/Runtime/r0drv/freebsd/Makefile.kup
diff --git a/src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c b/src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c
index fc63e34..6561e1b 100644
--- a/src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c
+++ b/src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c
@@ -749,7 +749,7 @@ DECLHIDDEN(int) rtR0MemObjNativeMapUser(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ p
     vm_offset_t AddrR3;
     if (R3PtrFixed == (RTR3PTR)-1)
     {
-        /** @todo: is this needed?. */
+        /** @todo is this needed?. */
         PROC_LOCK(pProc);
         AddrR3 = round_page((vm_offset_t)pProc->p_vmspace->vm_daddr + lim_max(pProc, RLIMIT_DATA));
         PROC_UNLOCK(pProc);
diff --git a/src/VBox/Runtime/r0drv/freebsd/memuserkernel-r0drv-freebsd.c b/src/VBox/Runtime/r0drv/freebsd/memuserkernel-r0drv-freebsd.c
index c0c8f84..6c412dd 100644
--- a/src/VBox/Runtime/r0drv/freebsd/memuserkernel-r0drv-freebsd.c
+++ b/src/VBox/Runtime/r0drv/freebsd/memuserkernel-r0drv-freebsd.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/freebsd/mp-r0drv-freebsd.c b/src/VBox/Runtime/r0drv/freebsd/mp-r0drv-freebsd.c
index 702e27e..0f8ef7b 100644
--- a/src/VBox/Runtime/r0drv/freebsd/mp-r0drv-freebsd.c
+++ b/src/VBox/Runtime/r0drv/freebsd/mp-r0drv-freebsd.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/freebsd/semmutex-r0drv-freebsd.c b/src/VBox/Runtime/r0drv/freebsd/semmutex-r0drv-freebsd.c
index c7432e3..4812efd 100644
--- a/src/VBox/Runtime/r0drv/freebsd/semmutex-r0drv-freebsd.c
+++ b/src/VBox/Runtime/r0drv/freebsd/semmutex-r0drv-freebsd.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/freebsd/sleepqueue-r0drv-freebsd.h b/src/VBox/Runtime/r0drv/freebsd/sleepqueue-r0drv-freebsd.h
index 000b1e6..853a346 100644
--- a/src/VBox/Runtime/r0drv/freebsd/sleepqueue-r0drv-freebsd.h
+++ b/src/VBox/Runtime/r0drv/freebsd/sleepqueue-r0drv-freebsd.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/freebsd/thread-r0drv-freebsd.c b/src/VBox/Runtime/r0drv/freebsd/thread-r0drv-freebsd.c
index aac0392..0d35a19 100644
--- a/src/VBox/Runtime/r0drv/freebsd/thread-r0drv-freebsd.c
+++ b/src/VBox/Runtime/r0drv/freebsd/thread-r0drv-freebsd.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp b/src/VBox/Runtime/r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp
index 49363f9..6f5cf00 100644
--- a/src/VBox/Runtime/r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp
+++ b/src/VBox/Runtime/r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/generic/RTMpOn-r0drv-generic.cpp b/src/VBox/Runtime/r0drv/generic/RTMpOn-r0drv-generic.cpp
index 8170294..1e888b8 100644
--- a/src/VBox/Runtime/r0drv/generic/RTMpOn-r0drv-generic.cpp
+++ b/src/VBox/Runtime/r0drv/generic/RTMpOn-r0drv-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/generic/RTMpPokeCpu-r0drv-generic.cpp b/src/VBox/Runtime/r0drv/generic/RTMpPokeCpu-r0drv-generic.cpp
index 10c7532..d9437fa 100644
--- a/src/VBox/Runtime/r0drv/generic/RTMpPokeCpu-r0drv-generic.cpp
+++ b/src/VBox/Runtime/r0drv/generic/RTMpPokeCpu-r0drv-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/generic/RTThreadPreemptDisable-r0drv-generic.cpp b/src/VBox/Runtime/r0drv/generic/RTThreadPreemptDisable-r0drv-generic.cpp
index 02f5509..9fb2831 100644
--- a/src/VBox/Runtime/r0drv/generic/RTThreadPreemptDisable-r0drv-generic.cpp
+++ b/src/VBox/Runtime/r0drv/generic/RTThreadPreemptDisable-r0drv-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/generic/RTThreadPreemptIsEnabled-r0drv-generic.cpp b/src/VBox/Runtime/r0drv/generic/RTThreadPreemptIsEnabled-r0drv-generic.cpp
index cdf3054..5df457f 100644
--- a/src/VBox/Runtime/r0drv/generic/RTThreadPreemptIsEnabled-r0drv-generic.cpp
+++ b/src/VBox/Runtime/r0drv/generic/RTThreadPreemptIsEnabled-r0drv-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/generic/RTThreadPreemptIsPending-r0drv-generic.cpp b/src/VBox/Runtime/r0drv/generic/RTThreadPreemptIsPending-r0drv-generic.cpp
index 75cff45..9c3ebb6 100644
--- a/src/VBox/Runtime/r0drv/generic/RTThreadPreemptIsPending-r0drv-generic.cpp
+++ b/src/VBox/Runtime/r0drv/generic/RTThreadPreemptIsPending-r0drv-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/generic/RTThreadPreemptIsPendingTrusty-r0drv-generic.cpp b/src/VBox/Runtime/r0drv/generic/RTThreadPreemptIsPendingTrusty-r0drv-generic.cpp
index 43ad6c6..28c9e87 100644
--- a/src/VBox/Runtime/r0drv/generic/RTThreadPreemptIsPendingTrusty-r0drv-generic.cpp
+++ b/src/VBox/Runtime/r0drv/generic/RTThreadPreemptIsPendingTrusty-r0drv-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/generic/RTThreadPreemptRestore-r0drv-generic.cpp b/src/VBox/Runtime/r0drv/generic/RTThreadPreemptRestore-r0drv-generic.cpp
index e3df2f3..083f4c1 100644
--- a/src/VBox/Runtime/r0drv/generic/RTThreadPreemptRestore-r0drv-generic.cpp
+++ b/src/VBox/Runtime/r0drv/generic/RTThreadPreemptRestore-r0drv-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/generic/mpnotification-r0drv-generic.cpp b/src/VBox/Runtime/r0drv/generic/mpnotification-r0drv-generic.cpp
index 118a30c..5856d28 100644
--- a/src/VBox/Runtime/r0drv/generic/mpnotification-r0drv-generic.cpp
+++ b/src/VBox/Runtime/r0drv/generic/mpnotification-r0drv-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/generic/semspinmutex-r0drv-generic.c b/src/VBox/Runtime/r0drv/generic/semspinmutex-r0drv-generic.c
index 395fdcd..2136ab7 100644
--- a/src/VBox/Runtime/r0drv/generic/semspinmutex-r0drv-generic.c
+++ b/src/VBox/Runtime/r0drv/generic/semspinmutex-r0drv-generic.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/generic/threadctxhooks-r0drv-generic.cpp b/src/VBox/Runtime/r0drv/generic/threadctxhooks-r0drv-generic.cpp
index 61ffe5a..65eb451 100644
--- a/src/VBox/Runtime/r0drv/generic/threadctxhooks-r0drv-generic.cpp
+++ b/src/VBox/Runtime/r0drv/generic/threadctxhooks-r0drv-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -35,9 +35,7 @@
 
 RTDECL(int) RTThreadCtxHookCreate(PRTTHREADCTXHOOK phCtxHook, uint32_t fFlags, PFNRTTHREADCTXHOOK pfnCallback, void *pvUser)
 {
-    NOREF(phCtxHook);
-    NOREF(pfnCallback);
-    NOREF(pvUser);
+    RT_NOREF4(phCtxHook, fFlags, pfnCallback, pvUser);
     return VERR_NOT_SUPPORTED;
 }
 RT_EXPORT_SYMBOL(RTThreadCtxHookCreate);
diff --git a/src/VBox/Devices/Audio_old/Makefile.kup b/src/VBox/Runtime/r0drv/haiku/Makefile.kup
similarity index 100%
copy from src/VBox/Devices/Audio_old/Makefile.kup
copy to src/VBox/Runtime/r0drv/haiku/Makefile.kup
diff --git a/src/VBox/Runtime/r0drv/haiku/RTLogWriteDebugger-r0drv-haiku.c b/src/VBox/Runtime/r0drv/haiku/RTLogWriteDebugger-r0drv-haiku.c
index 937f784..1ea368a 100644
--- a/src/VBox/Runtime/r0drv/haiku/RTLogWriteDebugger-r0drv-haiku.c
+++ b/src/VBox/Runtime/r0drv/haiku/RTLogWriteDebugger-r0drv-haiku.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/haiku/RTLogWriteStdOut-r0drv-haiku.c b/src/VBox/Runtime/r0drv/haiku/RTLogWriteStdOut-r0drv-haiku.c
index 0da9d89..160e1b4 100644
--- a/src/VBox/Runtime/r0drv/haiku/RTLogWriteStdOut-r0drv-haiku.c
+++ b/src/VBox/Runtime/r0drv/haiku/RTLogWriteStdOut-r0drv-haiku.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/haiku/alloc-r0drv-haiku.c b/src/VBox/Runtime/r0drv/haiku/alloc-r0drv-haiku.c
index 344c1db..561eab6 100644
--- a/src/VBox/Runtime/r0drv/haiku/alloc-r0drv-haiku.c
+++ b/src/VBox/Runtime/r0drv/haiku/alloc-r0drv-haiku.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/haiku/assert-r0drv-haiku.c b/src/VBox/Runtime/r0drv/haiku/assert-r0drv-haiku.c
index 4b05960..01f27fb 100644
--- a/src/VBox/Runtime/r0drv/haiku/assert-r0drv-haiku.c
+++ b/src/VBox/Runtime/r0drv/haiku/assert-r0drv-haiku.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/haiku/initterm-r0drv-haiku.c b/src/VBox/Runtime/r0drv/haiku/initterm-r0drv-haiku.c
index 83369c1..e133634 100644
--- a/src/VBox/Runtime/r0drv/haiku/initterm-r0drv-haiku.c
+++ b/src/VBox/Runtime/r0drv/haiku/initterm-r0drv-haiku.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/haiku/memobj-r0drv-haiku.c b/src/VBox/Runtime/r0drv/haiku/memobj-r0drv-haiku.c
index 9c56eae..20164f2 100644
--- a/src/VBox/Runtime/r0drv/haiku/memobj-r0drv-haiku.c
+++ b/src/VBox/Runtime/r0drv/haiku/memobj-r0drv-haiku.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/haiku/mp-r0drv-haiku.c b/src/VBox/Runtime/r0drv/haiku/mp-r0drv-haiku.c
index cbdf1f1..be46d25 100644
--- a/src/VBox/Runtime/r0drv/haiku/mp-r0drv-haiku.c
+++ b/src/VBox/Runtime/r0drv/haiku/mp-r0drv-haiku.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -103,7 +103,7 @@ RTDECL(RTCPUID) RTMpGetCount(void)
 RTDECL(bool) RTMpIsCpuOnline(RTCPUID idCpu)
 {
     return idCpu < smp_get_num_cpus();
-    /** @todo: FixMe && !CPU_ABSENT(idCpu) */
+    /** @todo FixMe && !CPU_ABSENT(idCpu) */
 }
 
 
diff --git a/src/VBox/Runtime/r0drv/haiku/process-r0drv-haiku.c b/src/VBox/Runtime/r0drv/haiku/process-r0drv-haiku.c
index fc64f25..bb21393 100644
--- a/src/VBox/Runtime/r0drv/haiku/process-r0drv-haiku.c
+++ b/src/VBox/Runtime/r0drv/haiku/process-r0drv-haiku.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/haiku/semevent-r0drv-haiku.c b/src/VBox/Runtime/r0drv/haiku/semevent-r0drv-haiku.c
index f125d8f..8e78bb1 100644
--- a/src/VBox/Runtime/r0drv/haiku/semevent-r0drv-haiku.c
+++ b/src/VBox/Runtime/r0drv/haiku/semevent-r0drv-haiku.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/haiku/semeventmulti-r0drv-haiku.c b/src/VBox/Runtime/r0drv/haiku/semeventmulti-r0drv-haiku.c
index fa99877..40b969d 100644
--- a/src/VBox/Runtime/r0drv/haiku/semeventmulti-r0drv-haiku.c
+++ b/src/VBox/Runtime/r0drv/haiku/semeventmulti-r0drv-haiku.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/haiku/semfastmutex-r0drv-haiku.c b/src/VBox/Runtime/r0drv/haiku/semfastmutex-r0drv-haiku.c
index b7682ef..ccaac42 100644
--- a/src/VBox/Runtime/r0drv/haiku/semfastmutex-r0drv-haiku.c
+++ b/src/VBox/Runtime/r0drv/haiku/semfastmutex-r0drv-haiku.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/haiku/semmutex-r0drv-haiku.c b/src/VBox/Runtime/r0drv/haiku/semmutex-r0drv-haiku.c
index 8e75bca..646725e 100644
--- a/src/VBox/Runtime/r0drv/haiku/semmutex-r0drv-haiku.c
+++ b/src/VBox/Runtime/r0drv/haiku/semmutex-r0drv-haiku.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/haiku/spinlock-r0drv-haiku.c b/src/VBox/Runtime/r0drv/haiku/spinlock-r0drv-haiku.c
index 589b3b5..ca2c12d 100644
--- a/src/VBox/Runtime/r0drv/haiku/spinlock-r0drv-haiku.c
+++ b/src/VBox/Runtime/r0drv/haiku/spinlock-r0drv-haiku.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/haiku/the-haiku-kernel.h b/src/VBox/Runtime/r0drv/haiku/the-haiku-kernel.h
index 02ee5d4..25b6148 100644
--- a/src/VBox/Runtime/r0drv/haiku/the-haiku-kernel.h
+++ b/src/VBox/Runtime/r0drv/haiku/the-haiku-kernel.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/haiku/thread-r0drv-haiku.c b/src/VBox/Runtime/r0drv/haiku/thread-r0drv-haiku.c
index a164241..d936cdf 100644
--- a/src/VBox/Runtime/r0drv/haiku/thread-r0drv-haiku.c
+++ b/src/VBox/Runtime/r0drv/haiku/thread-r0drv-haiku.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/haiku/thread2-r0drv-haiku.c b/src/VBox/Runtime/r0drv/haiku/thread2-r0drv-haiku.c
index 092f245..73dc021 100644
--- a/src/VBox/Runtime/r0drv/haiku/thread2-r0drv-haiku.c
+++ b/src/VBox/Runtime/r0drv/haiku/thread2-r0drv-haiku.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/haiku/time-r0drv-haiku.c b/src/VBox/Runtime/r0drv/haiku/time-r0drv-haiku.c
index 6c68386..9ab1c49 100644
--- a/src/VBox/Runtime/r0drv/haiku/time-r0drv-haiku.c
+++ b/src/VBox/Runtime/r0drv/haiku/time-r0drv-haiku.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/initterm-r0drv.cpp b/src/VBox/Runtime/r0drv/initterm-r0drv.cpp
index b517941..26cea6a 100644
--- a/src/VBox/Runtime/r0drv/initterm-r0drv.cpp
+++ b/src/VBox/Runtime/r0drv/initterm-r0drv.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -66,7 +66,7 @@ RTR0DECL(int) RTR0Init(unsigned fReserved)
 {
     int rc;
     uint32_t cNewUsers;
-    Assert(fReserved == 0);
+    Assert(fReserved == 0); RT_NOREF_PV(fReserved);
 #ifndef RT_OS_SOLARIS       /* On Solaris our thread preemption information is only obtained in rtR0InitNative().*/
     RT_ASSERT_PREEMPTIBLE();
 #endif
diff --git a/src/VBox/Runtime/r0drv/linux/RTLogWriteDebugger-r0drv-linux.c b/src/VBox/Runtime/r0drv/linux/RTLogWriteDebugger-r0drv-linux.c
index 79aa6ab..a1c858b 100644
--- a/src/VBox/Runtime/r0drv/linux/RTLogWriteDebugger-r0drv-linux.c
+++ b/src/VBox/Runtime/r0drv/linux/RTLogWriteDebugger-r0drv-linux.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c b/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c
index 0451e7b..e011867 100644
--- a/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c
+++ b/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -142,6 +142,7 @@ RTR0DECL(int) RTR0MemExecDonate(void *pvMemory, size_t cb)
     }
     return rc;
 #else
+    RT_NOREF_PV(pvMemory); RT_NOREF_PV(cb);
     return VERR_NOT_SUPPORTED;
 #endif
 }
diff --git a/src/VBox/Runtime/r0drv/linux/assert-r0drv-linux.c b/src/VBox/Runtime/r0drv/linux/assert-r0drv-linux.c
index 84be7e5..5a96ffd 100644
--- a/src/VBox/Runtime/r0drv/linux/assert-r0drv-linux.c
+++ b/src/VBox/Runtime/r0drv/linux/assert-r0drv-linux.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/linux/initterm-r0drv-linux.c b/src/VBox/Runtime/r0drv/linux/initterm-r0drv-linux.c
index ef3627b..7ff66af 100644
--- a/src/VBox/Runtime/r0drv/linux/initterm-r0drv-linux.c
+++ b/src/VBox/Runtime/r0drv/linux/initterm-r0drv-linux.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c b/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
index 6ca2487..4cf93c6 100644
--- a/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
+++ b/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -188,7 +188,8 @@ static void *rtR0MemObjLinuxDoMmap(RTR3PTR R3PtrFixed, size_t cb, size_t uAlignm
     unsigned fLnxProt;
     unsigned long ulAddr;
 
-    Assert((pTask == current)); /* do_mmap */
+    Assert(pTask == current); /* do_mmap */
+    RT_NOREF_PV(pTask);
 
     /*
      * Convert from IPRT protection to mman.h PROT_ and call do_mmap.
@@ -256,7 +257,7 @@ static void *rtR0MemObjLinuxDoMmap(RTR3PTR R3PtrFixed, size_t cb, size_t uAlignm
 static void rtR0MemObjLinuxDoMunmap(void *pv, size_t cb, struct task_struct *pTask)
 {
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0)
-    Assert(pTask == current);
+    Assert(pTask == current); RT_NOREF_PV(pTask);
     vm_munmap((unsigned long)pv, cb);
 #elif defined(USE_RHEL4_MUNMAP)
     down_write(&pTask->mm->mmap_sem);
@@ -375,7 +376,7 @@ static int rtR0MemObjLinuxAllocPages(PRTR0MEMOBJLNX *ppMemLnx, RTR0MEMOBJTYPE en
 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0)
     /*
      * Reserve the pages.
-     * 
+     *
      * Linux >= 4.5 with CONFIG_DEBUG_VM panics when setting PG_reserved on compound
      * pages. According to Michal Hocko this shouldn't be necessary anyway because
      * as pages which are not on the LRU list are never evictable.
diff --git a/src/VBox/Runtime/r0drv/linux/memuserkernel-r0drv-linux.c b/src/VBox/Runtime/r0drv/linux/memuserkernel-r0drv-linux.c
index 3532724..2115443 100644
--- a/src/VBox/Runtime/r0drv/linux/memuserkernel-r0drv-linux.c
+++ b/src/VBox/Runtime/r0drv/linux/memuserkernel-r0drv-linux.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/linux/mp-r0drv-linux.c b/src/VBox/Runtime/r0drv/linux/mp-r0drv-linux.c
index 8bd8b1a..5b37881 100644
--- a/src/VBox/Runtime/r0drv/linux/mp-r0drv-linux.c
+++ b/src/VBox/Runtime/r0drv/linux/mp-r0drv-linux.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/linux/mpnotification-r0drv-linux.c b/src/VBox/Runtime/r0drv/linux/mpnotification-r0drv-linux.c
index 4b2eb21..e12146c 100644
--- a/src/VBox/Runtime/r0drv/linux/mpnotification-r0drv-linux.c
+++ b/src/VBox/Runtime/r0drv/linux/mpnotification-r0drv-linux.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/linux/process-r0drv-linux.c b/src/VBox/Runtime/r0drv/linux/process-r0drv-linux.c
index b04ac1a..f264c1e 100644
--- a/src/VBox/Runtime/r0drv/linux/process-r0drv-linux.c
+++ b/src/VBox/Runtime/r0drv/linux/process-r0drv-linux.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/linux/semevent-r0drv-linux.c b/src/VBox/Runtime/r0drv/linux/semevent-r0drv-linux.c
index ab27087..650aa4f 100644
--- a/src/VBox/Runtime/r0drv/linux/semevent-r0drv-linux.c
+++ b/src/VBox/Runtime/r0drv/linux/semevent-r0drv-linux.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -73,6 +73,7 @@ RTDECL(int)  RTSemEventCreateEx(PRTSEMEVENT phEventSem, uint32_t fFlags, RTLOCKV
 {
     PRTSEMEVENTINTERNAL pThis;
     IPRT_LINUX_SAVE_EFL_AC();
+    RT_NOREF_PV(hClass); RT_NOREF_PV(pszNameFmt);
 
     AssertReturn(!(fFlags & ~(RTSEMEVENT_FLAGS_NO_LOCK_VAL | RTSEMEVENT_FLAGS_BOOTSTRAP_HACK)), VERR_INVALID_PARAMETER);
     Assert(!(fFlags & RTSEMEVENT_FLAGS_BOOTSTRAP_HACK) || (fFlags & RTSEMEVENT_FLAGS_NO_LOCK_VAL));
@@ -183,6 +184,7 @@ static int rtR0SemEventLnxWait(PRTSEMEVENTINTERNAL pThis, uint32_t fFlags, uint6
                                PCRTLOCKVALSRCPOS pSrcPos)
 {
     int rc;
+    RT_NOREF_PV(pSrcPos);
 
     /*
      * Validate the input.
diff --git a/src/VBox/Runtime/r0drv/linux/semeventmulti-r0drv-linux.c b/src/VBox/Runtime/r0drv/linux/semeventmulti-r0drv-linux.c
index d46ded0..b108c9c 100644
--- a/src/VBox/Runtime/r0drv/linux/semeventmulti-r0drv-linux.c
+++ b/src/VBox/Runtime/r0drv/linux/semeventmulti-r0drv-linux.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -96,6 +96,7 @@ RTDECL(int)  RTSemEventMultiCreateEx(PRTSEMEVENTMULTI phEventMultiSem, uint32_t
 {
     PRTSEMEVENTMULTIINTERNAL pThis;
     IPRT_LINUX_SAVE_EFL_AC();
+    RT_NOREF_PV(hClass); RT_NOREF_PV(pszNameFmt);
 
     AssertReturn(!(fFlags & ~RTSEMEVENTMULTI_FLAGS_NO_LOCK_VAL), VERR_INVALID_PARAMETER);
     pThis = (PRTSEMEVENTMULTIINTERNAL)RTMemAlloc(sizeof(*pThis));
@@ -248,6 +249,7 @@ static int rtR0SemEventMultiLnxWait(PRTSEMEVENTMULTIINTERNAL pThis, uint32_t fFl
 {
     uint32_t    fOrgStateAndGen;
     int         rc;
+    RT_NOREF_PV(pSrcPos);
 
     /*
      * Validate the input.
diff --git a/src/VBox/Runtime/r0drv/linux/semfastmutex-r0drv-linux.c b/src/VBox/Runtime/r0drv/linux/semfastmutex-r0drv-linux.c
index b437151..534a434 100644
--- a/src/VBox/Runtime/r0drv/linux/semfastmutex-r0drv-linux.c
+++ b/src/VBox/Runtime/r0drv/linux/semfastmutex-r0drv-linux.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/linux/semmutex-r0drv-linux.c b/src/VBox/Runtime/r0drv/linux/semmutex-r0drv-linux.c
index 135f45c..c2adfce 100644
--- a/src/VBox/Runtime/r0drv/linux/semmutex-r0drv-linux.c
+++ b/src/VBox/Runtime/r0drv/linux/semmutex-r0drv-linux.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -323,6 +323,7 @@ RT_EXPORT_SYMBOL(RTSemMutexRequest);
 
 RTDECL(int) RTSemMutexRequestDebug(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
 {
+    RT_NOREF_PV(uId); RT_SRC_POS_NOREF();
     return RTSemMutexRequest(hMutexSem, cMillies);
 }
 RT_EXPORT_SYMBOL(RTSemMutexRequestDebug);
@@ -337,6 +338,7 @@ RT_EXPORT_SYMBOL(RTSemMutexRequestNoResume);
 
 RTDECL(int) RTSemMutexRequestNoResumeDebug(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
 {
+    RT_NOREF_PV(uId); RT_SRC_POS_NOREF();
     return RTSemMutexRequestNoResume(hMutexSem, cMillies);
 }
 RT_EXPORT_SYMBOL(RTSemMutexRequestNoResumeDebug);
diff --git a/src/VBox/Runtime/r0drv/linux/spinlock-r0drv-linux.c b/src/VBox/Runtime/r0drv/linux/spinlock-r0drv-linux.c
index b6ae5d4..d6d0895 100644
--- a/src/VBox/Runtime/r0drv/linux/spinlock-r0drv-linux.c
+++ b/src/VBox/Runtime/r0drv/linux/spinlock-r0drv-linux.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -76,6 +76,7 @@ RTDECL(int)  RTSpinlockCreate(PRTSPINLOCK pSpinlock, uint32_t fFlags, const char
     IPRT_LINUX_SAVE_EFL_AC();
     PRTSPINLOCKINTERNAL pThis;
     AssertReturn(fFlags == RTSPINLOCK_FLAGS_INTERRUPT_SAFE || fFlags == RTSPINLOCK_FLAGS_INTERRUPT_UNSAFE, VERR_INVALID_PARAMETER);
+    RT_NOREF_PV(pszName);
 
     /*
      * Allocate.
diff --git a/src/VBox/Runtime/r0drv/linux/string.h b/src/VBox/Runtime/r0drv/linux/string.h
index c871825..c475340 100644
--- a/src/VBox/Runtime/r0drv/linux/string.h
+++ b/src/VBox/Runtime/r0drv/linux/string.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h b/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
index 65ce3cb..d5e92ac 100644
--- a/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
+++ b/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -34,6 +34,16 @@
 #include <iprt/types.h>
 #define bool linux_bool
 
+#if RT_GNUC_PREREQ(4, 6)
+# pragma GCC diagnostic push
+#endif
+#if RT_GNUC_PREREQ(4, 2)
+# pragma GCC diagnostic ignored "-Wunused-parameter"
+# if !defined(__cplusplus) && RT_GNUC_PREREQ(4, 3)
+#  pragma GCC diagnostic ignored "-Wold-style-declaration" /* 2.6.18-411.0.0.0.1.el5/build/include/asm/apic.h:110: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration] */
+# endif
+#endif
+
 #include <linux/version.h>
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33)
 # include <generated/autoconf.h>
@@ -249,9 +259,9 @@ DECLINLINE(unsigned long) msecs_to_jiffies(unsigned int cMillies)
 #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 8) && defined(PAGE_KERNEL_EXEC) && defined(CONFIG_X86_PAE)
 # ifdef __PAGE_KERNEL_EXEC
    /* >= 2.6.27 */
-#  define MY_PAGE_KERNEL_EXEC   __pgprot(cpu_has_pge ? __PAGE_KERNEL_EXEC | _PAGE_GLOBAL : __PAGE_KERNEL_EXEC)
+#  define MY_PAGE_KERNEL_EXEC   __pgprot(boot_cpu_has(X86_FEATURE_PGE) ? __PAGE_KERNEL_EXEC | _PAGE_GLOBAL : __PAGE_KERNEL_EXEC)
 # else
-#  define MY_PAGE_KERNEL_EXEC   __pgprot(cpu_has_pge ? _PAGE_KERNEL_EXEC | _PAGE_GLOBAL : _PAGE_KERNEL_EXEC)
+#  define MY_PAGE_KERNEL_EXEC   __pgprot(boot_cpu_has(X86_FEATURE_PGE) ? _PAGE_KERNEL_EXEC | _PAGE_GLOBAL : _PAGE_KERNEL_EXEC)
 # endif
 #else
 # define MY_PAGE_KERNEL_EXEC    PAGE_KERNEL
@@ -337,6 +347,10 @@ DECLINLINE(unsigned long) msecs_to_jiffies(unsigned int cMillies)
  */
 #undef bool
 
+#if RT_GNUC_PREREQ(4, 6)
+# pragma GCC diagnostic pop
+#endif
+
 /*
  * There are post-2.6.24 kernels (confusingly with unchanged version number)
  * which eliminate macros which were marked as deprecated.
diff --git a/src/VBox/Runtime/r0drv/linux/thread-r0drv-linux.c b/src/VBox/Runtime/r0drv/linux/thread-r0drv-linux.c
index b55541d..680a74d 100644
--- a/src/VBox/Runtime/r0drv/linux/thread-r0drv-linux.c
+++ b/src/VBox/Runtime/r0drv/linux/thread-r0drv-linux.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -104,7 +104,7 @@ RT_EXPORT_SYMBOL(RTThreadYield);
 RTDECL(bool) RTThreadPreemptIsEnabled(RTTHREAD hThread)
 {
 #ifdef CONFIG_PREEMPT
-    Assert(hThread == NIL_RTTHREAD);
+    Assert(hThread == NIL_RTTHREAD); RT_NOREF_PV(hThread);
 # ifdef preemptible
     return preemptible();
 # else
@@ -137,7 +137,7 @@ RT_EXPORT_SYMBOL(RTThreadPreemptIsEnabled);
 
 RTDECL(bool) RTThreadPreemptIsPending(RTTHREAD hThread)
 {
-    Assert(hThread == NIL_RTTHREAD);
+    Assert(hThread == NIL_RTTHREAD); RT_NOREF_PV(hThread);
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 4)
     return !!test_tsk_thread_flag(current, TIF_NEED_RESCHED);
 
diff --git a/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c b/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c
index ed5dfa6..1e7eb70 100644
--- a/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c
+++ b/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -90,7 +90,10 @@ DECLHIDDEN(int) rtThreadNativeSetPriority(PRTTHREADINT pThread, RTTHREADTYPE enm
     }
 
     sched_setscheduler(current, iSchedClass, &Param);
+#else
+    RT_NOREF_PV(enmType);
 #endif
+    RT_NOREF_PV(pThread);
 
     return VINF_SUCCESS;
 }
@@ -98,6 +101,7 @@ DECLHIDDEN(int) rtThreadNativeSetPriority(PRTTHREADINT pThread, RTTHREADTYPE enm
 
 DECLHIDDEN(int) rtThreadNativeAdopt(PRTTHREADINT pThread)
 {
+    RT_NOREF_PV(pThread);
     return VERR_NOT_IMPLEMENTED;
 }
 
diff --git a/src/VBox/Runtime/r0drv/linux/threadctxhooks-r0drv-linux.c b/src/VBox/Runtime/r0drv/linux/threadctxhooks-r0drv-linux.c
index 61a84bb..84d3976 100644
--- a/src/VBox/Runtime/r0drv/linux/threadctxhooks-r0drv-linux.c
+++ b/src/VBox/Runtime/r0drv/linux/threadctxhooks-r0drv-linux.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -98,6 +98,7 @@ static void rtThreadCtxHooksLnxSchedOut(struct preempt_notifier *pPreemptNotifie
     RTCCUINTREG fSavedEFlags = ASMGetFlags();
     stac();
 #endif
+    RT_NOREF_PV(pNext);
 
     AssertPtr(pThis);
     AssertPtr(pThis->pfnCallback);
@@ -132,6 +133,7 @@ static void rtThreadCtxHooksLnxSchedIn(struct preempt_notifier *pPreemptNotifier
     RTCCUINTREG fSavedEFlags = ASMGetFlags();
     stac();
 #endif
+    RT_NOREF_PV(iCpu);
 
     AssertPtr(pThis);
     AssertPtr(pThis->pfnCallback);
diff --git a/src/VBox/Runtime/r0drv/linux/time-r0drv-linux.c b/src/VBox/Runtime/r0drv/linux/time-r0drv-linux.c
index 18b5a3d..b7d3e3b 100644
--- a/src/VBox/Runtime/r0drv/linux/time-r0drv-linux.c
+++ b/src/VBox/Runtime/r0drv/linux/time-r0drv-linux.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/linux/timer-r0drv-linux.c b/src/VBox/Runtime/r0drv/linux/timer-r0drv-linux.c
index a26d146..e560ade 100644
--- a/src/VBox/Runtime/r0drv/linux/timer-r0drv-linux.c
+++ b/src/VBox/Runtime/r0drv/linux/timer-r0drv-linux.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -361,7 +361,13 @@ static void rtTimerLnxStartSubTimer(PRTTIMERLNXSUBTIMER pSubTimer, uint64_t u64N
         pSubTimer->u.Std.fFirstAfterChg = true;
 #ifdef CONFIG_SMP
         if (fPinned)
+        {
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
+            mod_timer(&pSubTimer->u.Std.LnxTimer, pSubTimer->u.Std.ulNextJiffies);
+# else
             mod_timer_pinned(&pSubTimer->u.Std.LnxTimer, pSubTimer->u.Std.ulNextJiffies);
+# endif
+        }
         else
 #endif
             mod_timer(&pSubTimer->u.Std.LnxTimer, pSubTimer->u.Std.ulNextJiffies);
@@ -796,7 +802,13 @@ static void rtTimerLinuxStdCallback(unsigned long ulUser)
         {
 #ifdef CONFIG_SMP
             if (pTimer->fSpecificCpu || pTimer->fAllCpus)
+            {
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
+                mod_timer(&pSubTimer->u.Std.LnxTimer, pSubTimer->u.Std.ulNextJiffies);
+# else
                 mod_timer_pinned(&pSubTimer->u.Std.LnxTimer, pSubTimer->u.Std.ulNextJiffies);
+# endif
+            }
             else
 #endif
                 mod_timer(&pSubTimer->u.Std.LnxTimer, pSubTimer->u.Std.ulNextJiffies);
@@ -853,7 +865,13 @@ static void rtTimerLinuxStdCallback(unsigned long ulUser)
 
 #ifdef CONFIG_SMP
                     if (pTimer->fSpecificCpu || pTimer->fAllCpus)
+                    {
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
+                        mod_timer(&pSubTimer->u.Std.LnxTimer, pSubTimer->u.Std.ulNextJiffies);
+# else
                         mod_timer_pinned(&pSubTimer->u.Std.LnxTimer, pSubTimer->u.Std.ulNextJiffies);
+# endif
+                    }
                     else
 #endif
                         mod_timer(&pSubTimer->u.Std.LnxTimer, pSubTimer->u.Std.ulNextJiffies);
@@ -1177,6 +1195,7 @@ static DECLCALLBACK(void) rtTimerLnxStartOnSpecificCpu(RTCPUID idCpu, void *pvUs
 {
     PRTTIMERLINUXSTARTONCPUARGS pArgs = (PRTTIMERLINUXSTARTONCPUARGS)pvUser2;
     PRTTIMER pTimer = (PRTTIMER)pvUser1;
+    RT_NOREF_PV(idCpu);
     rtTimerLnxStartSubTimer(&pTimer->aSubTimers[0], pArgs->u64Now, pArgs->u64First, true /*fPinned*/, pTimer->fHighRes);
 }
 
@@ -1565,7 +1584,11 @@ RTDECL(int) RTTimerCreateEx(PRTTIMER *ppTimer, uint64_t u64NanoInterval, uint32_
         else
 #endif
         {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
+            init_timer_pinned(&pTimer->aSubTimers[iCpu].u.Std.LnxTimer);
+#else
             init_timer(&pTimer->aSubTimers[iCpu].u.Std.LnxTimer);
+#endif
             pTimer->aSubTimers[iCpu].u.Std.LnxTimer.data        = (unsigned long)&pTimer->aSubTimers[iCpu];
             pTimer->aSubTimers[iCpu].u.Std.LnxTimer.function    = rtTimerLinuxStdCallback;
             pTimer->aSubTimers[iCpu].u.Std.LnxTimer.expires     = jiffies;
@@ -1629,6 +1652,7 @@ RT_EXPORT_SYMBOL(RTTimerGetSystemGranularity);
 
 RTDECL(int) RTTimerRequestSystemGranularity(uint32_t u32Request, uint32_t *pu32Granted)
 {
+    RT_NOREF_PV(u32Request); RT_NOREF_PV(*pu32Granted);
     return VERR_NOT_SUPPORTED;
 }
 RT_EXPORT_SYMBOL(RTTimerRequestSystemGranularity);
@@ -1636,6 +1660,7 @@ RT_EXPORT_SYMBOL(RTTimerRequestSystemGranularity);
 
 RTDECL(int) RTTimerReleaseSystemGranularity(uint32_t u32Granted)
 {
+    RT_NOREF_PV(u32Granted);
     return VERR_NOT_SUPPORTED;
 }
 RT_EXPORT_SYMBOL(RTTimerReleaseSystemGranularity);
diff --git a/src/VBox/Runtime/r0drv/linux/waitqueue-r0drv-linux.h b/src/VBox/Runtime/r0drv/linux/waitqueue-r0drv-linux.h
index 67d71ae..09df351 100644
--- a/src/VBox/Runtime/r0drv/linux/waitqueue-r0drv-linux.h
+++ b/src/VBox/Runtime/r0drv/linux/waitqueue-r0drv-linux.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/memobj-r0drv.cpp b/src/VBox/Runtime/r0drv/memobj-r0drv.cpp
index b5b5100..7450444 100644
--- a/src/VBox/Runtime/r0drv/memobj-r0drv.cpp
+++ b/src/VBox/Runtime/r0drv/memobj-r0drv.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -28,7 +28,7 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
-#define LOG_GROUP RTLOGGROUP_DEFAULT ///@todo RTLOGGROUP_MEM
+#define LOG_GROUP RTLOGGROUP_DEFAULT /// @todo RTLOGGROUP_MEM
 #define RTMEM_NO_WRAP_TO_EF_APIS /* circular dependency otherwise. */
 #include <iprt/memobj.h>
 #include "internal/iprt.h"
@@ -426,6 +426,8 @@ RTR0DECL(int) RTR0MemObjAllocPageTag(PRTR0MEMOBJ pMemObj, size_t cb, bool fExecu
     AssertReturn(cb <= cbAligned, VERR_INVALID_PARAMETER);
     RT_ASSERT_PREEMPTIBLE();
 
+    RT_NOREF_PV(pszTag);
+
     /* do the allocation. */
     return rtR0MemObjNativeAllocPage(pMemObj, cbAligned, fExecutable);
 }
@@ -442,6 +444,8 @@ RTR0DECL(int) RTR0MemObjAllocLowTag(PRTR0MEMOBJ pMemObj, size_t cb, bool fExecut
     AssertReturn(cb <= cbAligned, VERR_INVALID_PARAMETER);
     RT_ASSERT_PREEMPTIBLE();
 
+    RT_NOREF_PV(pszTag);
+
     /* do the allocation. */
     return rtR0MemObjNativeAllocLow(pMemObj, cbAligned, fExecutable);
 }
@@ -458,6 +462,8 @@ RTR0DECL(int) RTR0MemObjAllocContTag(PRTR0MEMOBJ pMemObj, size_t cb, bool fExecu
     AssertReturn(cb <= cbAligned, VERR_INVALID_PARAMETER);
     RT_ASSERT_PREEMPTIBLE();
 
+    RT_NOREF_PV(pszTag);
+
     /* do the allocation. */
     return rtR0MemObjNativeAllocCont(pMemObj, cbAligned, fExecutable);
 }
@@ -480,6 +486,8 @@ RTR0DECL(int) RTR0MemObjLockUserTag(PRTR0MEMOBJ pMemObj, RTR3PTR R3Ptr, size_t c
     AssertReturn(fAccess, VERR_INVALID_PARAMETER);
     RT_ASSERT_PREEMPTIBLE();
 
+    RT_NOREF_PV(pszTag);
+
     /* do the locking. */
     return rtR0MemObjNativeLockUser(pMemObj, R3PtrAligned, cbAligned, fAccess, R0Process);
 }
@@ -500,6 +508,8 @@ RTR0DECL(int) RTR0MemObjLockKernelTag(PRTR0MEMOBJ pMemObj, void *pv, size_t cb,
     AssertReturn(fAccess, VERR_INVALID_PARAMETER);
     RT_ASSERT_PREEMPTIBLE();
 
+    RT_NOREF_PV(pszTag);
+
     /* do the allocation. */
     return rtR0MemObjNativeLockKernel(pMemObj, pvAligned, cbAligned, fAccess);
 }
@@ -517,6 +527,8 @@ RTR0DECL(int) RTR0MemObjAllocPhysTag(PRTR0MEMOBJ pMemObj, size_t cb, RTHCPHYS Ph
     AssertReturn(PhysHighest >= cb, VERR_INVALID_PARAMETER);
     RT_ASSERT_PREEMPTIBLE();
 
+    RT_NOREF_PV(pszTag);
+
     /* do the allocation. */
     return rtR0MemObjNativeAllocPhys(pMemObj, cbAligned, PhysHighest, PAGE_SIZE /* page aligned */);
 }
@@ -547,6 +559,8 @@ RTR0DECL(int) RTR0MemObjAllocPhysExTag(PRTR0MEMOBJ pMemObj, size_t cb, RTHCPHYS
 #endif
     RT_ASSERT_PREEMPTIBLE();
 
+    RT_NOREF_PV(pszTag);
+
     /* do the allocation. */
     return rtR0MemObjNativeAllocPhys(pMemObj, cbAligned, PhysHighest, uAlignment);
 }
@@ -564,6 +578,8 @@ RTR0DECL(int) RTR0MemObjAllocPhysNCTag(PRTR0MEMOBJ pMemObj, size_t cb, RTHCPHYS
     AssertReturn(PhysHighest >= cb, VERR_INVALID_PARAMETER);
     RT_ASSERT_PREEMPTIBLE();
 
+    RT_NOREF_PV(pszTag);
+
     /* do the allocation. */
     return rtR0MemObjNativeAllocPhysNC(pMemObj, cbAligned, PhysHighest);
 }
@@ -585,6 +601,8 @@ RTR0DECL(int) RTR0MemObjEnterPhysTag(PRTR0MEMOBJ pMemObj, RTHCPHYS Phys, size_t
                  VERR_INVALID_PARAMETER);
     RT_ASSERT_PREEMPTIBLE();
 
+    RT_NOREF_PV(pszTag);
+
     /* do the allocation. */
     return rtR0MemObjNativeEnterPhys(pMemObj, PhysAligned, cbAligned, uCachePolicy);
 }
@@ -606,6 +624,8 @@ RTR0DECL(int) RTR0MemObjReserveKernelTag(PRTR0MEMOBJ pMemObj, void *pvFixed, siz
         AssertReturn(!((uintptr_t)pvFixed & (uAlignment - 1)), VERR_INVALID_PARAMETER);
     RT_ASSERT_PREEMPTIBLE();
 
+    RT_NOREF_PV(pszTag);
+
     /* do the reservation. */
     return rtR0MemObjNativeReserveKernel(pMemObj, pvFixed, cbAligned, uAlignment);
 }
@@ -630,6 +650,8 @@ RTR0DECL(int) RTR0MemObjReserveUserTag(PRTR0MEMOBJ pMemObj, RTR3PTR R3PtrFixed,
         R0Process = RTR0ProcHandleSelf();
     RT_ASSERT_PREEMPTIBLE();
 
+    RT_NOREF_PV(pszTag);
+
     /* do the reservation. */
     return rtR0MemObjNativeReserveUser(pMemObj, R3PtrFixed, cbAligned, uAlignment, R0Process);
 }
@@ -674,6 +696,8 @@ RTR0DECL(int) RTR0MemObjMapKernelExTag(PRTR0MEMOBJ pMemObj, RTR0MEMOBJ MemObjToM
     AssertReturn((!offSub && !cbSub) || (offSub + cbSub) <= pMemToMap->cb, VERR_INVALID_PARAMETER);
     RT_ASSERT_PREEMPTIBLE();
 
+    RT_NOREF_PV(pszTag);
+
     /* adjust the request to simplify the native code. */
     if (offSub == 0 && cbSub == pMemToMap->cb)
         cbSub = 0;
@@ -728,6 +752,8 @@ RTR0DECL(int) RTR0MemObjMapUserTag(PRTR0MEMOBJ pMemObj, RTR0MEMOBJ MemObjToMap,
         R0Process = RTR0ProcHandleSelf();
     RT_ASSERT_PREEMPTIBLE();
 
+    RT_NOREF_PV(pszTag);
+
     /* do the mapping. */
     rc = rtR0MemObjNativeMapUser(&pNew, pMemToMap, R3PtrFixed, uAlignment, fProt, R0Process);
     if (RT_SUCCESS(rc))
diff --git a/src/VBox/Runtime/r0drv/mp-r0drv.h b/src/VBox/Runtime/r0drv/mp-r0drv.h
index 0d1b36b..e98ee4a 100644
--- a/src/VBox/Runtime/r0drv/mp-r0drv.h
+++ b/src/VBox/Runtime/r0drv/mp-r0drv.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/mpnotification-r0drv.c b/src/VBox/Runtime/r0drv/mpnotification-r0drv.c
index 023397d..30a48be 100644
--- a/src/VBox/Runtime/r0drv/mpnotification-r0drv.c
+++ b/src/VBox/Runtime/r0drv/mpnotification-r0drv.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Audio_old/Makefile.kup b/src/VBox/Runtime/r0drv/netbsd/Makefile.kup
similarity index 100%
copy from src/VBox/Devices/Audio_old/Makefile.kup
copy to src/VBox/Runtime/r0drv/netbsd/Makefile.kup
diff --git a/src/VBox/Runtime/r0drv/netbsd/RTLogWriteStdOut-r0drv-netbsd.c b/src/VBox/Runtime/r0drv/netbsd/RTLogWriteStdOut-r0drv-netbsd.c
new file mode 100644
index 0000000..74ca02b
--- /dev/null
+++ b/src/VBox/Runtime/r0drv/netbsd/RTLogWriteStdOut-r0drv-netbsd.c
@@ -0,0 +1,39 @@
+/* $Id: RTLogWriteStdOut-r0drv-netbsd.c $ */
+/** @file
+ * IPRT - Log To StdOut, Ring-0 Driver, NetBSD.
+ */
+
+/*
+ * Copyright (C) 2006-2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#include "the-netbsd-kernel.h"
+#include "internal/iprt.h"
+#include <iprt/log.h>
+
+
+RTDECL(void) RTLogWriteStdOut(const char *pch, size_t cb)
+{
+    printf("%.*s", (int)cb, pch);
+}
diff --git a/src/VBox/Runtime/r0drv/netbsd/alloc-r0drv-netbsd.c b/src/VBox/Runtime/r0drv/netbsd/alloc-r0drv-netbsd.c
new file mode 100644
index 0000000..797a70c
--- /dev/null
+++ b/src/VBox/Runtime/r0drv/netbsd/alloc-r0drv-netbsd.c
@@ -0,0 +1,155 @@
+/* $Id: alloc-r0drv-netbsd.c $ */
+/** @file
+ * IPRT - Memory Allocation, Ring-0 Driver, NetBSD.
+ */
+/*
+ * Copyright (C) 2014-2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * This code is based on:
+ *
+ * Copyright (c) 2014 Arto Huusko
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#include "the-netbsd-kernel.h"
+#include "internal/iprt.h"
+#include <iprt/mem.h>
+
+#include <iprt/assert.h>
+#include <iprt/err.h>
+#include <iprt/param.h>
+
+#include "r0drv/alloc-r0drv.h"
+
+
+DECLHIDDEN(int) rtR0MemAllocEx(size_t cb, uint32_t fFlags, PRTMEMHDR *ppHdr)
+{
+    size_t      cbAllocated = cb;
+    PRTMEMHDR   pHdr        = NULL;
+
+    if (fFlags & RTMEMHDR_FLAG_ZEROED)
+        pHdr = kmem_zalloc(cb + sizeof(RTMEMHDR), KM_NOSLEEP);
+    else
+        pHdr = kmem_alloc(cb + sizeof(RTMEMHDR), KM_NOSLEEP);
+
+    if (RT_UNLIKELY(!pHdr))
+        return VERR_NO_MEMORY;
+
+    pHdr->u32Magic   = RTMEMHDR_MAGIC;
+    pHdr->fFlags     = fFlags;
+    pHdr->cb         = cbAllocated;
+    pHdr->cbReq      = cb;
+
+    *ppHdr = pHdr;
+    return VINF_SUCCESS;
+}
+
+
+DECLHIDDEN(void) rtR0MemFree(PRTMEMHDR pHdr)
+{
+    pHdr->u32Magic += 1;
+
+    kmem_free(pHdr, pHdr->cb + sizeof(RTMEMHDR));
+}
+
+RTR0DECL(void) RTMemContFree(void *pv, size_t cb)
+{
+    if (pv)
+    {
+        cb = round_page(cb);
+
+        paddr_t pa;
+        pmap_extract(pmap_kernel(), (vaddr_t)pv, &pa);
+
+        /*
+         * Reconstruct pglist to free the physical pages
+         */
+        struct pglist rlist;
+        TAILQ_INIT(&rlist);
+
+        for (paddr_t pa2 = pa ; pa2 < pa + cb ; pa2 += PAGE_SIZE) {
+            struct vm_page *page = PHYS_TO_VM_PAGE(pa2);
+            TAILQ_INSERT_TAIL(&rlist, page, pageq.queue);
+        }
+
+        /* Unmap */
+        pmap_kremove((vaddr_t)pv, cb);
+
+        /* Free the virtual space */
+        uvm_km_free(kernel_map, (vaddr_t)pv, cb, UVM_KMF_VAONLY);
+
+        /* Free the physical pages */
+        uvm_pglistfree(&rlist);
+    }
+}
+
+RTR0DECL(void *) RTMemContAlloc(PRTCCPHYS pPhys, size_t cb)
+{
+    /*
+     * Validate input.
+     */
+    AssertPtr(pPhys);
+    Assert(cb > 0);
+
+    cb = round_page(cb);
+
+    vaddr_t virt = uvm_km_alloc(kernel_map, cb, 0,
+            UVM_KMF_VAONLY | UVM_KMF_WAITVA | UVM_KMF_CANFAIL);
+    if (virt == 0)
+        return NULL;
+
+    struct pglist rlist;
+
+    if (uvm_pglistalloc(cb, 0, (paddr_t)0xFFFFFFFF,
+            PAGE_SIZE, 0, &rlist, 1, 1) != 0)
+    {
+        uvm_km_free(kernel_map, virt, cb, UVM_KMF_VAONLY);
+        return NULL;
+    }
+
+    struct vm_page *page;
+    vaddr_t virt2 = virt;
+    TAILQ_FOREACH(page, &rlist, pageq.queue)
+    {
+        pmap_kenter_pa(virt2, VM_PAGE_TO_PHYS(page),
+                VM_PROT_READ | VM_PROT_WRITE | VM_PROT_EXECUTE, 0);
+        virt2 += PAGE_SIZE;
+    }
+
+    page = TAILQ_FIRST(&rlist);
+    *pPhys = VM_PAGE_TO_PHYS(page);
+
+    return (void *)virt;
+}
diff --git a/src/VBox/Runtime/r0drv/netbsd/assert-r0drv-netbsd.c b/src/VBox/Runtime/r0drv/netbsd/assert-r0drv-netbsd.c
new file mode 100644
index 0000000..43872a2
--- /dev/null
+++ b/src/VBox/Runtime/r0drv/netbsd/assert-r0drv-netbsd.c
@@ -0,0 +1,63 @@
+/* $Id: assert-r0drv-netbsd.c $ */
+/** @file
+ * IPRT - Assertion Workers, Ring-0 Drivers, NetBSD.
+ */
+
+/*
+ * Copyright (c) 2007 knut st. osmundsen <bird-src-spam at anduin.net>
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#include "the-netbsd-kernel.h"
+
+#include <iprt/assert.h>
+#include <iprt/log.h>
+#include <iprt/stdarg.h>
+
+#include "internal/assert.h"
+
+
+DECLHIDDEN(void) rtR0AssertNativeMsg1(const char *pszExpr, unsigned uLine, const char *pszFile, const char *pszFunction)
+{
+    printf("\r\n!!Assertion Failed!!\r\n"
+           "Expression: %s\r\n"
+           "Location  : %s(%d) %s\r\n",
+           pszExpr, pszFile, uLine, pszFunction);
+}
+
+
+DECLHIDDEN(void) rtR0AssertNativeMsg2V(bool fInitial, const char *pszFormat, va_list va)
+{
+    /** @todo implement rtR0AssertNativeMsg2V. */
+}
+
+
+RTR0DECL(void) RTR0AssertPanicSystem(void)
+{
+    panic("%s%s", g_szRTAssertMsg1, g_szRTAssertMsg2);
+
+}
diff --git a/src/VBox/Runtime/r0drv/netbsd/initterm-r0drv-netbsd.c b/src/VBox/Runtime/r0drv/netbsd/initterm-r0drv-netbsd.c
new file mode 100644
index 0000000..5d3c9ec
--- /dev/null
+++ b/src/VBox/Runtime/r0drv/netbsd/initterm-r0drv-netbsd.c
@@ -0,0 +1,52 @@
+/* $Id: initterm-r0drv-netbsd.c $ */
+/** @file
+ * IPRT - Initialization & Termination, Ring-0 Driver, NetBSD.
+ */
+
+/*
+ * Copyright (c) 2007 knut st. osmundsen <bird-src-spam at anduin.net>
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#include "the-netbsd-kernel.h"
+
+#include <iprt/err.h>
+
+#include "internal/initterm.h"
+
+
+DECLHIDDEN(int) rtR0InitNative(void)
+{
+    /* nothing to do */
+    return VINF_SUCCESS;
+}
+
+
+DECLHIDDEN(void) rtR0TermNative(void)
+{
+    /* nothing to undo */
+}
diff --git a/src/VBox/Runtime/r0drv/netbsd/memobj-r0drv-netbsd.c b/src/VBox/Runtime/r0drv/netbsd/memobj-r0drv-netbsd.c
new file mode 100644
index 0000000..4d4b5bb
--- /dev/null
+++ b/src/VBox/Runtime/r0drv/netbsd/memobj-r0drv-netbsd.c
@@ -0,0 +1,558 @@
+/* $Id: memobj-r0drv-netbsd.c $ */
+/** @file
+ * IPRT - Ring-0 Memory Objects, NetBSD.
+ */
+
+/*
+ * Copyright (c) 2007 knut st. osmundsen <bird-src-spam at anduin.net>
+ * Copyright (c) 2011 Andriy Gapon <avg at FreeBSD.org>
+ * Copyright (c) 2014 Arto Huusko
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#include "the-netbsd-kernel.h"
+
+#include <iprt/memobj.h>
+#include <iprt/mem.h>
+#include <iprt/err.h>
+#include <iprt/assert.h>
+#include <iprt/log.h>
+#include <iprt/param.h>
+#include <iprt/process.h>
+#include "internal/memobj.h"
+
+
+/*********************************************************************************************************************************
+*   Structures and Typedefs                                                                                                      *
+*********************************************************************************************************************************/
+/**
+ * The NetBSD version of the memory object structure.
+ */
+typedef struct RTR0MEMOBJNETBSD
+{
+    /** The core structure. */
+    RTR0MEMOBJINTERNAL  Core;
+    size_t              size;
+    struct pglist       pglist;
+} RTR0MEMOBJNETBSD, *PRTR0MEMOBJNETBSD;
+
+
+typedef struct vm_map* vm_map_t;
+
+/**
+ * Gets the virtual memory map the specified object is mapped into.
+ *
+ * @returns VM map handle on success, NULL if no map.
+ * @param   pMem                The memory object.
+ */
+static vm_map_t rtR0MemObjNetBSDGetMap(PRTR0MEMOBJINTERNAL pMem)
+{
+    switch (pMem->enmType)
+    {
+        case RTR0MEMOBJTYPE_PAGE:
+        case RTR0MEMOBJTYPE_LOW:
+        case RTR0MEMOBJTYPE_CONT:
+            return kernel_map;
+
+        case RTR0MEMOBJTYPE_PHYS:
+        case RTR0MEMOBJTYPE_PHYS_NC:
+            return NULL; /* pretend these have no mapping atm. */
+
+        case RTR0MEMOBJTYPE_LOCK:
+            return pMem->u.Lock.R0Process == NIL_RTR0PROCESS
+                ? kernel_map
+                : &((struct proc *)pMem->u.Lock.R0Process)->p_vmspace->vm_map;
+
+        case RTR0MEMOBJTYPE_RES_VIRT:
+            return pMem->u.ResVirt.R0Process == NIL_RTR0PROCESS
+                ? kernel_map
+                : &((struct proc *)pMem->u.ResVirt.R0Process)->p_vmspace->vm_map;
+
+        case RTR0MEMOBJTYPE_MAPPING:
+            return pMem->u.Mapping.R0Process == NIL_RTR0PROCESS
+                ? kernel_map
+                : &((struct proc *)pMem->u.Mapping.R0Process)->p_vmspace->vm_map;
+
+        default:
+            return NULL;
+    }
+}
+
+
+DECLHIDDEN(int) rtR0MemObjNativeFree(RTR0MEMOBJ pMem)
+{
+    PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)pMem;
+    int rc;
+
+    switch (pMemNetBSD->Core.enmType)
+    {
+        case RTR0MEMOBJTYPE_PAGE:
+        {
+            kmem_free(pMemNetBSD->Core.pv, pMemNetBSD->Core.cb);
+            break;
+        }
+        case RTR0MEMOBJTYPE_LOW:
+        case RTR0MEMOBJTYPE_CONT:
+        {
+            /* Unmap */
+            pmap_kremove((vaddr_t)pMemNetBSD->Core.pv, pMemNetBSD->Core.cb);
+            /* Free the virtual space */
+            uvm_km_free(kernel_map, (vaddr_t)pMemNetBSD->Core.pv, pMemNetBSD->Core.cb, UVM_KMF_VAONLY);
+            /* Free the physical pages */
+            uvm_pglistfree(&pMemNetBSD->pglist);
+            break;
+        }
+        case RTR0MEMOBJTYPE_PHYS:
+        case RTR0MEMOBJTYPE_PHYS_NC:
+        {
+            /* Free the physical pages */
+            uvm_pglistfree(&pMemNetBSD->pglist);
+            break;
+        }
+        case RTR0MEMOBJTYPE_LOCK:
+            if (pMemNetBSD->Core.u.Lock.R0Process != NIL_RTR0PROCESS)
+            {
+                uvm_map_pageable(
+                        &((struct proc *)pMemNetBSD->Core.u.Lock.R0Process)->p_vmspace->vm_map,
+                        (vaddr_t)pMemNetBSD->Core.pv,
+                        ((vaddr_t)pMemNetBSD->Core.pv) + pMemNetBSD->Core.cb,
+                        1, 0);
+            }
+            break;
+        case RTR0MEMOBJTYPE_RES_VIRT:
+            if (pMemNetBSD->Core.u.Lock.R0Process == NIL_RTR0PROCESS)
+            {
+                uvm_km_free(kernel_map, (vaddr_t)pMemNetBSD->Core.pv, pMemNetBSD->Core.cb, UVM_KMF_VAONLY);
+            }
+            break;
+        case RTR0MEMOBJTYPE_MAPPING:
+            if (pMemNetBSD->Core.u.Lock.R0Process == NIL_RTR0PROCESS)
+            {
+                pmap_kremove((vaddr_t)pMemNetBSD->Core.pv, pMemNetBSD->Core.cb);
+                uvm_km_free(kernel_map, (vaddr_t)pMemNetBSD->Core.pv, pMemNetBSD->Core.cb, UVM_KMF_VAONLY);
+            }
+            break;
+
+        default:
+            AssertMsgFailed(("enmType=%d\n", pMemNetBSD->Core.enmType));
+            return VERR_INTERNAL_ERROR;
+    }
+
+    return VINF_SUCCESS;
+}
+
+static int rtR0MemObjNetBSDAllocHelper(PRTR0MEMOBJNETBSD pMemNetBSD, size_t cb, bool fExecutable,
+                                         paddr_t VmPhysAddrHigh, bool fContiguous)
+{
+    /* Virtual space first */
+    vaddr_t virt = uvm_km_alloc(kernel_map, cb, 0,
+            UVM_KMF_VAONLY | UVM_KMF_WAITVA | UVM_KMF_CANFAIL);
+    if (virt == 0)
+        return VERR_NO_MEMORY;
+
+    struct pglist *rlist = &pMemNetBSD->pglist;
+
+    int nsegs = fContiguous ? 1 : INT_MAX;
+
+    /* Physical pages */
+    if (uvm_pglistalloc(cb, 0, VmPhysAddrHigh,
+            PAGE_SIZE, 0, rlist, nsegs, 1) != 0)
+    {
+        uvm_km_free(kernel_map, virt, cb, UVM_KMF_VAONLY);
+        return VERR_NO_MEMORY;
+    }
+
+    /* Map */
+    struct vm_page *page;
+    vm_prot_t prot = VM_PROT_READ | VM_PROT_WRITE;
+    if (fExecutable)
+        prot |= VM_PROT_EXECUTE;
+    vaddr_t virt2 = virt;
+    TAILQ_FOREACH(page, rlist, pageq.queue)
+    {
+        pmap_kenter_pa(virt2, VM_PAGE_TO_PHYS(page), prot, 0);
+        virt2 += PAGE_SIZE;
+    }
+
+    pMemNetBSD->Core.pv = (void *)virt;
+    if (fContiguous)
+    {
+        page = TAILQ_FIRST(rlist);
+        pMemNetBSD->Core.u.Cont.Phys = VM_PAGE_TO_PHYS(page);
+    }
+    return VINF_SUCCESS;
+}
+
+DECLHIDDEN(int) rtR0MemObjNativeAllocPage(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable)
+{
+    PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD),
+                                                                       RTR0MEMOBJTYPE_PAGE, NULL, cb);
+    if (!pMemNetBSD)
+        return VERR_NO_MEMORY;
+
+    void *pvMem = kmem_alloc(cb, KM_SLEEP);
+    if (RT_UNLIKELY(!pvMem))
+    {
+        rtR0MemObjDelete(&pMemNetBSD->Core);
+        return VERR_NO_PAGE_MEMORY;
+    }
+    if (fExecutable)
+    {
+        pmap_protect(pmap_kernel(), (vaddr_t)pvMem, ((vaddr_t)pvMem) + cb,
+                VM_PROT_READ | VM_PROT_WRITE | VM_PROT_EXECUTE);
+    }
+
+    pMemNetBSD->Core.pv = pvMem;
+    *ppMem = &pMemNetBSD->Core;
+    return VINF_SUCCESS;
+}
+
+
+DECLHIDDEN(int) rtR0MemObjNativeAllocLow(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable)
+{
+    PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD),
+                                                                       RTR0MEMOBJTYPE_LOW, NULL, cb);
+    if (!pMemNetBSD)
+        return VERR_NO_MEMORY;
+
+    int rc = rtR0MemObjNetBSDAllocHelper(pMemNetBSD, cb, fExecutable, _4G - 1, false);
+    if (rc)
+    {
+        rtR0MemObjDelete(&pMemNetBSD->Core);
+        return rc;
+    }
+
+    *ppMem = &pMemNetBSD->Core;
+    return VINF_SUCCESS;
+}
+
+
+DECLHIDDEN(int) rtR0MemObjNativeAllocCont(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable)
+{
+    PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD),
+                                                                       RTR0MEMOBJTYPE_CONT, NULL, cb);
+    if (!pMemNetBSD)
+        return VERR_NO_MEMORY;
+
+    int rc = rtR0MemObjNetBSDAllocHelper(pMemNetBSD, cb, fExecutable, _4G - 1, true);
+    if (rc)
+    {
+        rtR0MemObjDelete(&pMemNetBSD->Core);
+        return rc;
+    }
+
+    *ppMem = &pMemNetBSD->Core;
+    return VINF_SUCCESS;
+}
+
+
+static int rtR0MemObjNetBSDAllocPhysPages(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJTYPE enmType,
+                                           size_t cb,
+                                           RTHCPHYS PhysHighest, size_t uAlignment,
+                                           bool fContiguous)
+{
+    paddr_t VmPhysAddrHigh;
+
+    /* create the object. */
+    PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD),
+                                                                       enmType, NULL, cb);
+    if (!pMemNetBSD)
+        return VERR_NO_MEMORY;
+
+    if (PhysHighest != NIL_RTHCPHYS)
+        VmPhysAddrHigh = PhysHighest;
+    else
+        VmPhysAddrHigh = ~(paddr_t)0;
+
+    int nsegs = fContiguous ? 1 : INT_MAX;
+
+    int error = uvm_pglistalloc(cb, 0, VmPhysAddrHigh, uAlignment, 0, &pMemNetBSD->pglist, nsegs, 1);
+    if (error)
+    {
+        rtR0MemObjDelete(&pMemNetBSD->Core);
+        return VERR_NO_MEMORY;
+    }
+
+    if (fContiguous)
+    {
+        Assert(enmType == RTR0MEMOBJTYPE_PHYS);
+        const struct vm_page * const pg = TAILQ_FIRST(&pMemNetBSD->pglist);
+        pMemNetBSD->Core.u.Phys.PhysBase = VM_PAGE_TO_PHYS(pg);
+        pMemNetBSD->Core.u.Phys.fAllocated = true;
+    }
+    *ppMem = &pMemNetBSD->Core;
+
+    return VINF_SUCCESS;
+}
+
+
+DECLHIDDEN(int) rtR0MemObjNativeAllocPhys(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, RTHCPHYS PhysHighest, size_t uAlignment)
+{
+    return rtR0MemObjNetBSDAllocPhysPages(ppMem, RTR0MEMOBJTYPE_PHYS, cb, PhysHighest, uAlignment, true);
+}
+
+
+DECLHIDDEN(int) rtR0MemObjNativeAllocPhysNC(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, RTHCPHYS PhysHighest)
+{
+    return rtR0MemObjNetBSDAllocPhysPages(ppMem, RTR0MEMOBJTYPE_PHYS_NC, cb, PhysHighest, PAGE_SIZE, false);
+}
+
+
+DECLHIDDEN(int) rtR0MemObjNativeEnterPhys(PPRTR0MEMOBJINTERNAL ppMem, RTHCPHYS Phys, size_t cb, uint32_t uCachePolicy)
+{
+    AssertReturn(uCachePolicy == RTMEM_CACHE_POLICY_DONT_CARE, VERR_NOT_SUPPORTED);
+
+    /* create the object. */
+    PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), RTR0MEMOBJTYPE_PHYS, NULL, cb);
+    if (!pMemNetBSD)
+        return VERR_NO_MEMORY;
+
+    /* there is no allocation here, it needs to be mapped somewhere first. */
+    pMemNetBSD->Core.u.Phys.fAllocated = false;
+    pMemNetBSD->Core.u.Phys.PhysBase = Phys;
+    pMemNetBSD->Core.u.Phys.uCachePolicy = uCachePolicy;
+    TAILQ_INIT(&pMemNetBSD->pglist);
+    *ppMem = &pMemNetBSD->Core;
+    return VINF_SUCCESS;
+}
+
+
+DECLHIDDEN(int) rtR0MemObjNativeLockUser(PPRTR0MEMOBJINTERNAL ppMem, RTR3PTR R3Ptr, size_t cb, uint32_t fAccess, RTR0PROCESS R0Process)
+{
+    PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), RTR0MEMOBJTYPE_LOCK, (void *)R3Ptr, cb);
+    if (!pMemNetBSD)
+        return VERR_NO_MEMORY;
+
+    int rc = uvm_map_pageable(
+            &((struct proc *)R0Process)->p_vmspace->vm_map,
+            R3Ptr,
+            R3Ptr + cb,
+            0, 0);
+    if (rc)
+    {
+        rtR0MemObjDelete(&pMemNetBSD->Core);
+        return VERR_NO_MEMORY;
+    }
+
+    pMemNetBSD->Core.u.Lock.R0Process = R0Process;
+    *ppMem = &pMemNetBSD->Core;
+    return VINF_SUCCESS;
+}
+
+
+DECLHIDDEN(int) rtR0MemObjNativeLockKernel(PPRTR0MEMOBJINTERNAL ppMem, void *pv, size_t cb, uint32_t fAccess)
+{
+    /* Kernel memory (always?) wired; all memory allocated by vbox code is? */
+    PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), RTR0MEMOBJTYPE_LOCK, pv, cb);
+    if (!pMemNetBSD)
+        return VERR_NO_MEMORY;
+
+    pMemNetBSD->Core.u.Lock.R0Process = NIL_RTR0PROCESS;
+    pMemNetBSD->Core.pv = pv;
+    *ppMem = &pMemNetBSD->Core;
+    return VINF_SUCCESS;
+}
+
+DECLHIDDEN(int) rtR0MemObjNativeReserveKernel(PPRTR0MEMOBJINTERNAL ppMem, void *pvFixed, size_t cb, size_t uAlignment)
+{
+    if (pvFixed != (void *)-1)
+    {
+        /* can we support this? or can we assume the virtual space is already reserved? */
+        printf("reserve specified kernel virtual address not supported\n");
+        return VERR_NOT_SUPPORTED;
+    }
+
+    PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), RTR0MEMOBJTYPE_RES_VIRT, NULL, cb);
+    if (!pMemNetBSD)
+        return VERR_NO_MEMORY;
+
+    vaddr_t virt = uvm_km_alloc(kernel_map, cb, uAlignment,
+            UVM_KMF_VAONLY | UVM_KMF_WAITVA | UVM_KMF_CANFAIL);
+    if (virt == 0)
+    {
+        rtR0MemObjDelete(&pMemNetBSD->Core);
+        return VERR_NO_MEMORY;
+    }
+
+    pMemNetBSD->Core.u.ResVirt.R0Process = NIL_RTR0PROCESS;
+    pMemNetBSD->Core.pv = (void *)virt;
+    *ppMem = &pMemNetBSD->Core;
+    return VINF_SUCCESS;
+}
+
+
+DECLHIDDEN(int) rtR0MemObjNativeReserveUser(PPRTR0MEMOBJINTERNAL ppMem, RTR3PTR R3PtrFixed, size_t cb, size_t uAlignment, RTR0PROCESS R0Process)
+{
+    printf("NativeReserveUser\n");
+    return VERR_NOT_SUPPORTED;
+}
+
+
+DECLHIDDEN(int) rtR0MemObjNativeMapKernel(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ pMemToMap, void *pvFixed, size_t uAlignment,
+                                          unsigned fProt, size_t offSub, size_t cbSub)
+{
+    if (pvFixed != (void *)-1)
+    {
+        /* can we support this? or can we assume the virtual space is already reserved? */
+        printf("map to specified kernel virtual address not supported\n");
+        return VERR_NOT_SUPPORTED;
+    }
+
+    PRTR0MEMOBJNETBSD pMemNetBSD0 = (PRTR0MEMOBJNETBSD)pMemToMap;
+    if ((pMemNetBSD0->Core.enmType != RTR0MEMOBJTYPE_PHYS)
+        && (pMemNetBSD0->Core.enmType != RTR0MEMOBJTYPE_PHYS_NC))
+    {
+        printf("memory to map is not physical\n");
+        return VERR_NOT_SUPPORTED;
+    }
+    size_t sz = cbSub > 0 ? cbSub : pMemNetBSD0->Core.cb;
+
+    PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)rtR0MemObjNew(sizeof(*pMemNetBSD), RTR0MEMOBJTYPE_MAPPING, NULL, sz);
+
+    vaddr_t virt = uvm_km_alloc(kernel_map, sz, uAlignment,
+            UVM_KMF_VAONLY | UVM_KMF_WAITVA | UVM_KMF_CANFAIL);
+    if (virt == 0)
+    {
+        rtR0MemObjDelete(&pMemNetBSD->Core);
+        return VERR_NO_MEMORY;
+    }
+
+    vm_prot_t prot = 0;
+
+    if ((fProt & RTMEM_PROT_READ) == RTMEM_PROT_READ)
+        prot |= VM_PROT_READ;
+    if ((fProt & RTMEM_PROT_WRITE) == RTMEM_PROT_WRITE)
+        prot |= VM_PROT_WRITE;
+    if ((fProt & RTMEM_PROT_EXEC) == RTMEM_PROT_EXEC)
+        prot |= VM_PROT_EXECUTE;
+
+    struct vm_page *page;
+    vaddr_t virt2 = virt;
+    size_t map_pos = 0;
+    TAILQ_FOREACH(page, &pMemNetBSD0->pglist, pageq.queue)
+    {
+        if (map_pos >= offSub)
+        {
+            if (cbSub > 0 && (map_pos >= offSub + cbSub))
+                break;
+
+            pmap_kenter_pa(virt2, VM_PAGE_TO_PHYS(page), prot, 0);
+            virt2 += PAGE_SIZE;
+        }
+        map_pos += PAGE_SIZE;
+    }
+
+    pMemNetBSD->Core.pv = (void *)virt;
+    pMemNetBSD->Core.u.Mapping.R0Process = NIL_RTR0PROCESS;
+    *ppMem = &pMemNetBSD->Core;
+
+    return VINF_SUCCESS;
+}
+
+
+DECLHIDDEN(int) rtR0MemObjNativeMapUser(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ pMemToMap, RTR3PTR R3PtrFixed, size_t uAlignment,
+                                        unsigned fProt, RTR0PROCESS R0Process)
+{
+    printf("NativeMapUser\n");
+    return VERR_NOT_SUPPORTED;
+}
+
+
+DECLHIDDEN(int) rtR0MemObjNativeProtect(PRTR0MEMOBJINTERNAL pMem, size_t offSub, size_t cbSub, uint32_t fProt)
+{
+    vm_prot_t          ProtectionFlags = 0;
+    vaddr_t        AddrStart       = (vaddr_t)pMem->pv + offSub;
+    vm_map_t           pVmMap          = rtR0MemObjNetBSDGetMap(pMem);
+
+    if (!pVmMap)
+        return VERR_NOT_SUPPORTED;
+
+    if ((fProt & RTMEM_PROT_READ) == RTMEM_PROT_READ)
+        ProtectionFlags |= UVM_PROT_R;
+    if ((fProt & RTMEM_PROT_WRITE) == RTMEM_PROT_WRITE)
+        ProtectionFlags |= UVM_PROT_W;
+    if ((fProt & RTMEM_PROT_EXEC) == RTMEM_PROT_EXEC)
+        ProtectionFlags |= UVM_PROT_X;
+
+    int error = uvm_map_protect(pVmMap, AddrStart, AddrStart + cbSub,
+        ProtectionFlags, 0);
+    if (!error)
+        return VINF_SUCCESS;
+
+    return VERR_NOT_SUPPORTED;
+}
+
+
+DECLHIDDEN(RTHCPHYS) rtR0MemObjNativeGetPagePhysAddr(PRTR0MEMOBJINTERNAL pMem, size_t iPage)
+{
+    PRTR0MEMOBJNETBSD pMemNetBSD = (PRTR0MEMOBJNETBSD)pMem;
+
+    switch (pMemNetBSD->Core.enmType)
+    {
+        case RTR0MEMOBJTYPE_PAGE:
+        case RTR0MEMOBJTYPE_LOW:
+        {
+            vaddr_t va = (vaddr_t)pMemNetBSD->Core.pv + ptoa(iPage);
+            paddr_t pa = 0;
+            pmap_extract(pmap_kernel(), va, &pa);
+            return pa;
+        }
+        case RTR0MEMOBJTYPE_CONT:
+            return pMemNetBSD->Core.u.Cont.Phys + ptoa(iPage);
+        case RTR0MEMOBJTYPE_PHYS:
+            return pMemNetBSD->Core.u.Phys.PhysBase + ptoa(iPage);
+        case RTR0MEMOBJTYPE_PHYS_NC:
+        {
+            struct vm_page *page;
+            size_t i = 0;
+            TAILQ_FOREACH(page, &pMemNetBSD->pglist, pageq.queue)
+            {
+                if (i == iPage)
+                    break;
+                i++;
+            }
+            return VM_PAGE_TO_PHYS(page);
+        }
+        case RTR0MEMOBJTYPE_LOCK:
+        case RTR0MEMOBJTYPE_MAPPING:
+        {
+            pmap_t pmap;
+            if (pMem->u.Lock.R0Process == NIL_RTR0PROCESS)
+                pmap = pmap_kernel();
+            else
+                pmap = ((struct proc *)pMem->u.Lock.R0Process)->p_vmspace->vm_map.pmap;
+            vaddr_t va = (vaddr_t)pMemNetBSD->Core.pv + ptoa(iPage);
+            paddr_t pa = 0;
+            pmap_extract(pmap, va, &pa);
+            return pa;
+        }
+        case RTR0MEMOBJTYPE_RES_VIRT:
+            return NIL_RTHCPHYS;
+        default:
+            return NIL_RTHCPHYS;
+    }
+}
diff --git a/src/VBox/Runtime/r0drv/netbsd/memuserkernel-r0drv-netbsd.c b/src/VBox/Runtime/r0drv/netbsd/memuserkernel-r0drv-netbsd.c
new file mode 100644
index 0000000..4c625f7
--- /dev/null
+++ b/src/VBox/Runtime/r0drv/netbsd/memuserkernel-r0drv-netbsd.c
@@ -0,0 +1,82 @@
+/* $Id: memuserkernel-r0drv-netbsd.c $ */
+/** @file
+ * IPRT - User & Kernel Memory, Ring-0 Driver, NetBSD.
+ */
+
+/*
+ * Copyright (C) 2009-2012 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#include "the-netbsd-kernel.h"
+
+#include <iprt/mem.h>
+#include <iprt/err.h>
+
+
+RTR0DECL(int) RTR0MemUserCopyFrom(void *pvDst, RTR3PTR R3PtrSrc, size_t cb)
+{
+    int rc = copyin((const void *)R3PtrSrc, pvDst, cb);
+    if (RT_LIKELY(rc == 0))
+        return VINF_SUCCESS;
+    return VERR_ACCESS_DENIED;
+}
+
+
+RTR0DECL(int) RTR0MemUserCopyTo(RTR3PTR R3PtrDst, void const *pvSrc, size_t cb)
+{
+    int rc = copyout(pvSrc, (void *)R3PtrDst, cb);
+    if (RT_LIKELY(rc == 0))
+        return VINF_SUCCESS;
+    return VERR_ACCESS_DENIED;
+}
+
+
+RTR0DECL(bool) RTR0MemUserIsValidAddr(RTR3PTR R3Ptr)
+{
+    return R3Ptr < VM_MAXUSER_ADDRESS;
+}
+
+
+RTR0DECL(bool) RTR0MemKernelIsValidAddr(void *pv)
+{
+    return (uintptr_t)pv >= VM_MAXUSER_ADDRESS;
+}
+
+
+RTR0DECL(bool) RTR0MemAreKrnlAndUsrDifferent(void)
+{
+    return true;
+}
+
+
+RTR0DECL(int) RTR0MemKernelCopyFrom(void *pvDst, void const *pvSrc, size_t cb)
+{
+    return VERR_NOT_SUPPORTED;
+}
+
+
+RTR0DECL(int) RTR0MemKernelCopyTo(void *pvDst, void const *pvSrc, size_t cb)
+{
+    return VERR_NOT_SUPPORTED;
+}
diff --git a/src/VBox/Runtime/r0drv/netbsd/mp-r0drv-netbsd.c b/src/VBox/Runtime/r0drv/netbsd/mp-r0drv-netbsd.c
new file mode 100644
index 0000000..caf84f8
--- /dev/null
+++ b/src/VBox/Runtime/r0drv/netbsd/mp-r0drv-netbsd.c
@@ -0,0 +1,43 @@
+/* $Id: mp-r0drv-netbsd.c $ */
+/** @file
+ * IPRT - Multiprocessor, Ring-0 Driver, NetBSD.
+ */
+
+/*
+ * Copyright (C) 2008-2011 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#include "the-netbsd-kernel.h"
+
+#include <iprt/mp.h>
+#include <iprt/err.h>
+#include <iprt/asm.h>
+#include <iprt/cpuset.h>
+#include "r0drv/mp-r0drv.h"
+
+
+RTDECL(RTCPUID) RTMpCpuId(void)
+{
+    return cpu_number();
+}
diff --git a/src/VBox/Runtime/r0drv/netbsd/process-r0drv-netbsd.c b/src/VBox/Runtime/r0drv/netbsd/process-r0drv-netbsd.c
new file mode 100644
index 0000000..cc304e6
--- /dev/null
+++ b/src/VBox/Runtime/r0drv/netbsd/process-r0drv-netbsd.c
@@ -0,0 +1,48 @@
+/* $Id: process-r0drv-netbsd.c $ */
+/** @file
+ * IPRT - Process Management, Ring-0 Driver, NetBSD.
+ */
+
+/*
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#include "the-netbsd-kernel.h"
+
+#include <iprt/process.h>
+
+
+RTDECL(RTPROCESS) RTProcSelf(void)
+{
+    struct proc *pSelf = curproc;
+    return pSelf->p_pid;
+}
+
+
+RTR0DECL(RTR0PROCESS) RTR0ProcHandleSelf(void)
+{
+    return (RTR0PROCESS)curproc;
+}
diff --git a/src/VBox/Runtime/r0drv/netbsd/semevent-r0drv-netbsd.c b/src/VBox/Runtime/r0drv/netbsd/semevent-r0drv-netbsd.c
new file mode 100644
index 0000000..716e539
--- /dev/null
+++ b/src/VBox/Runtime/r0drv/netbsd/semevent-r0drv-netbsd.c
@@ -0,0 +1,255 @@
+/* $Id: semevent-r0drv-netbsd.c $ */
+/** @file
+ * IPRT - Single Release Event Semaphores, Ring-0 Driver, NetBSD.
+ */
+
+/*
+ * Copyright (c) 2007 knut st. osmundsen <bird-src-spam at anduin.net>
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#define RTSEMEVENT_WITHOUT_REMAPPING
+#include "the-netbsd-kernel.h"
+#include "internal/iprt.h"
+#include <iprt/semaphore.h>
+
+#include <iprt/asm.h>
+#include <iprt/assert.h>
+#include <iprt/err.h>
+#include <iprt/lockvalidator.h>
+#include <iprt/mem.h>
+
+#include "sleepqueue-r0drv-netbsd.h"
+#include "internal/magics.h"
+
+
+/*********************************************************************************************************************************
+*   Structures and Typedefs                                                                                                      *
+*********************************************************************************************************************************/
+/**
+ * NetBSD event semaphore.
+ */
+typedef struct RTSEMEVENTINTERNAL
+{
+    /** Magic value (RTSEMEVENT_MAGIC). */
+    uint32_t volatile   u32Magic;
+    /** The object status - !0 when signaled and 0 when reset. */
+    uint32_t volatile   fState;
+    /** Reference counter. */
+    uint32_t volatile   cRefs;
+} RTSEMEVENTINTERNAL, *PRTSEMEVENTINTERNAL;
+
+
+RTDECL(int)  RTSemEventCreate(PRTSEMEVENT phEventSem)
+{
+    return RTSemEventCreateEx(phEventSem, 0 /*fFlags*/, NIL_RTLOCKVALCLASS, NULL);
+}
+
+
+RTDECL(int)  RTSemEventCreateEx(PRTSEMEVENT phEventSem, uint32_t fFlags, RTLOCKVALCLASS hClass, const char *pszNameFmt, ...)
+{
+    AssertCompile(sizeof(RTSEMEVENTINTERNAL) > sizeof(void *));
+    AssertReturn(!(fFlags & ~(RTSEMEVENT_FLAGS_NO_LOCK_VAL | RTSEMEVENT_FLAGS_BOOTSTRAP_HACK)), VERR_INVALID_PARAMETER);
+    Assert(!(fFlags & RTSEMEVENT_FLAGS_BOOTSTRAP_HACK) || (fFlags & RTSEMEVENT_FLAGS_NO_LOCK_VAL));
+    AssertPtrReturn(phEventSem, VERR_INVALID_POINTER);
+
+    PRTSEMEVENTINTERNAL pThis = (PRTSEMEVENTINTERNAL)RTMemAllocZ(sizeof(*pThis));
+    if (!pThis)
+        return VERR_NO_MEMORY;
+
+    pThis->u32Magic  = RTSEMEVENT_MAGIC;
+    pThis->cRefs     = 1;
+    pThis->fState    = 0;
+
+    *phEventSem = pThis;
+    return VINF_SUCCESS;
+}
+
+
+/**
+ * Retains a reference to the event semaphore.
+ *
+ * @param   pThis       The event semaphore.
+ */
+DECLINLINE(void) rtR0SemEventBsdRetain(PRTSEMEVENTINTERNAL pThis)
+{
+    uint32_t cRefs = ASMAtomicIncU32(&pThis->cRefs);
+    Assert(cRefs < 100000); NOREF(cRefs);
+}
+
+
+/**
+ * Releases a reference to the event semaphore.
+ *
+ * @param   pThis       The event semaphore.
+ */
+DECLINLINE(void) rtR0SemEventBsdRelease(PRTSEMEVENTINTERNAL pThis)
+{
+    if (RT_UNLIKELY(ASMAtomicDecU32(&pThis->cRefs) == 0))
+        RTMemFree(pThis);
+}
+
+
+RTDECL(int)  RTSemEventDestroy(RTSEMEVENT hEventSem)
+{
+    /*
+     * Validate input.
+     */
+    PRTSEMEVENTINTERNAL pThis = hEventSem;
+    if (pThis == NIL_RTSEMEVENT)
+        return VINF_SUCCESS;
+    AssertMsgReturn(pThis->u32Magic == RTSEMEVENT_MAGIC, ("pThis->u32Magic=%RX32 pThis=%p\n", pThis->u32Magic, pThis), VERR_INVALID_HANDLE);
+    Assert(pThis->cRefs > 0);
+
+    /*
+     * Invalidate it and signal the object just in case.
+     */
+    ASMAtomicWriteU32(&pThis->u32Magic, ~RTSEMEVENT_MAGIC);
+    ASMAtomicWriteU32(&pThis->fState, 0);
+    rtR0SemBsdBroadcast(pThis);
+    rtR0SemEventBsdRelease(pThis);
+    return VINF_SUCCESS;
+}
+
+
+RTDECL(int)  RTSemEventSignal(RTSEMEVENT hEventSem)
+{
+    /*
+     * Validate input.
+     */
+    PRTSEMEVENTINTERNAL pThis = (PRTSEMEVENTINTERNAL)hEventSem;
+    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
+    AssertMsgReturn(pThis->u32Magic == RTSEMEVENT_MAGIC, ("pThis->u32Magic=%RX32 pThis=%p\n", pThis->u32Magic, pThis), VERR_INVALID_HANDLE);
+    rtR0SemEventBsdRetain(pThis);
+
+    /*
+     * Signal the event object.
+     */
+    ASMAtomicWriteU32(&pThis->fState, 1);
+    rtR0SemBsdSignal(pThis);
+    rtR0SemEventBsdRelease(pThis);
+    return VINF_SUCCESS;
+}
+
+/**
+ * Worker for RTSemEventWaitEx and RTSemEventWaitExDebug.
+ *
+ * @returns VBox status code.
+ * @param   pThis           The event semaphore.
+ * @param   fFlags          See RTSemEventWaitEx.
+ * @param   uTimeout        See RTSemEventWaitEx.
+ * @param   pSrcPos         The source code position of the wait.
+ */
+static int rtR0SemEventWait(PRTSEMEVENTINTERNAL pThis, uint32_t fFlags, uint64_t uTimeout,
+                            PCRTLOCKVALSRCPOS pSrcPos)
+{
+    int rc;
+
+    /*
+     * Validate the input.
+     */
+    AssertPtrReturn(pThis, VERR_INVALID_PARAMETER);
+    AssertMsgReturn(pThis->u32Magic == RTSEMEVENT_MAGIC, ("%p u32Magic=%RX32\n", pThis, pThis->u32Magic), VERR_INVALID_PARAMETER);
+    AssertReturn(RTSEMWAIT_FLAGS_ARE_VALID(fFlags), VERR_INVALID_PARAMETER);
+    rtR0SemEventBsdRetain(pThis);
+
+    /*
+     * Try grab the event without setting up the wait.
+     */
+    if (ASMAtomicCmpXchgU32(&pThis->fState, 0, 1))
+        rc = VINF_SUCCESS;
+    else
+    {
+        /*
+         * We have to wait.
+         */
+        RTR0SEMBSDSLEEP Wait;
+        rc = rtR0SemBsdWaitInit(&Wait, fFlags, uTimeout, pThis);
+        if (RT_SUCCESS(rc))
+        {
+            for (;;)
+            {
+                /* The destruction test. */
+                if (RT_UNLIKELY(pThis->u32Magic != RTSEMEVENT_MAGIC))
+                    rc = VERR_SEM_DESTROYED;
+                else
+                {
+                    rtR0SemBsdWaitPrepare(&Wait);
+
+                    /* Check the exit conditions. */
+                    if (RT_UNLIKELY(pThis->u32Magic != RTSEMEVENT_MAGIC))
+                        rc = VERR_SEM_DESTROYED;
+                    else if (ASMAtomicCmpXchgU32(&pThis->fState, 0, 1))
+                        rc = VINF_SUCCESS;
+                    else if (rtR0SemBsdWaitHasTimedOut(&Wait))
+                        rc = VERR_TIMEOUT;
+                    else if (rtR0SemBsdWaitWasInterrupted(&Wait))
+                        rc = VERR_INTERRUPTED;
+                    else
+                    {
+                        /* Do the wait and then recheck the conditions. */
+                        rtR0SemBsdWaitDoIt(&Wait);
+                        continue;
+                    }
+                }
+                break;
+            }
+
+            rtR0SemBsdWaitDelete(&Wait);
+        }
+    }
+
+    rtR0SemEventBsdRelease(pThis);
+    return rc;
+}
+
+
+RTDECL(int)  RTSemEventWaitEx(RTSEMEVENT hEventSem, uint32_t fFlags, uint64_t uTimeout)
+{
+#ifndef RTSEMEVENT_STRICT
+    return rtR0SemEventWait(hEventSem, fFlags, uTimeout, NULL);
+#else
+    RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_NORMAL_API();
+    return rtR0SemEventWait(hEventSem, fFlags, uTimeout, &SrcPos);
+#endif
+}
+RT_EXPORT_SYMBOL(RTSemEventWaitEx);
+
+
+RTDECL(int)  RTSemEventWaitExDebug(RTSEMEVENT hEventSem, uint32_t fFlags, uint64_t uTimeout,
+                                   RTHCUINTPTR uId, RT_SRC_POS_DECL)
+{
+    RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_DEBUG_API();
+    return rtR0SemEventWait(hEventSem, fFlags, uTimeout, &SrcPos);
+}
+RT_EXPORT_SYMBOL(RTSemEventWaitExDebug);
+
+
+RTDECL(uint32_t) RTSemEventGetResolution(void)
+{
+    return 1000000000 / hz;
+}
diff --git a/src/VBox/Runtime/r0drv/netbsd/semeventmulti-r0drv-netbsd.c b/src/VBox/Runtime/r0drv/netbsd/semeventmulti-r0drv-netbsd.c
new file mode 100644
index 0000000..48c2cec
--- /dev/null
+++ b/src/VBox/Runtime/r0drv/netbsd/semeventmulti-r0drv-netbsd.c
@@ -0,0 +1,319 @@
+/* $Id: semeventmulti-r0drv-netbsd.c $ */
+/** @file
+ * IPRT - Multiple Release Event Semaphores, Ring-0 Driver, NetBSD.
+ */
+
+/*
+ * Copyright (c) 2007 knut st. osmundsen <bird-src-spam at anduin.net>
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#define RTSEMEVENTMULTI_WITHOUT_REMAPPING
+#include "the-netbsd-kernel.h"
+#include "internal/iprt.h"
+#include <iprt/semaphore.h>
+
+#include <iprt/assert.h>
+#include <iprt/asm.h>
+#include <iprt/err.h>
+#include <iprt/mem.h>
+#include <iprt/lockvalidator.h>
+
+#include "sleepqueue-r0drv-netbsd.h"
+#include "internal/magics.h"
+
+
+/*********************************************************************************************************************************
+*   Defined Constants And Macros                                                                                                 *
+*********************************************************************************************************************************/
+/** @name fStateAndGen values
+ * @{ */
+/** The state bit number. */
+#define RTSEMEVENTMULTIBSD_STATE_BIT        0
+/** The state mask. */
+#define RTSEMEVENTMULTIBSD_STATE_MASK       RT_BIT_32(RTSEMEVENTMULTIBSD_STATE_BIT)
+/** The generation mask. */
+#define RTSEMEVENTMULTIBSD_GEN_MASK         ~RTSEMEVENTMULTIBSD_STATE_MASK
+/** The generation shift. */
+#define RTSEMEVENTMULTIBSD_GEN_SHIFT        1
+/** The initial variable value. */
+#define RTSEMEVENTMULTIBSD_STATE_GEN_INIT   UINT32_C(0xfffffffc)
+/** @}  */
+
+
+/*********************************************************************************************************************************
+*   Structures and Typedefs                                                                                                      *
+*********************************************************************************************************************************/
+/**
+ * NetBSD multiple release event semaphore.
+ */
+typedef struct RTSEMEVENTMULTIINTERNAL
+{
+    /** Magic value (RTSEMEVENTMULTI_MAGIC). */
+    uint32_t volatile   u32Magic;
+    /** The object state bit and generation counter.
+     * The generation counter is incremented every time the object is
+     * signalled. */
+    uint32_t volatile   fStateAndGen;
+    /** Reference counter. */
+    uint32_t volatile   cRefs;
+} RTSEMEVENTMULTIINTERNAL, *PRTSEMEVENTMULTIINTERNAL;
+
+
+RTDECL(int)  RTSemEventMultiCreate(PRTSEMEVENTMULTI phEventMultiSem)
+{
+    return RTSemEventMultiCreateEx(phEventMultiSem, 0 /*fFlags*/, NIL_RTLOCKVALCLASS, NULL);
+}
+
+
+RTDECL(int)  RTSemEventMultiCreateEx(PRTSEMEVENTMULTI phEventMultiSem, uint32_t fFlags, RTLOCKVALCLASS hClass,
+                                     const char *pszNameFmt, ...)
+{
+    PRTSEMEVENTMULTIINTERNAL pThis;
+
+    AssertReturn(!(fFlags & ~RTSEMEVENTMULTI_FLAGS_NO_LOCK_VAL), VERR_INVALID_PARAMETER);
+    pThis = (PRTSEMEVENTMULTIINTERNAL)RTMemAlloc(sizeof(*pThis));
+    if (pThis)
+    {
+        pThis->u32Magic     = RTSEMEVENTMULTI_MAGIC;
+        pThis->fStateAndGen = RTSEMEVENTMULTIBSD_STATE_GEN_INIT;
+        pThis->cRefs        = 1;
+
+        *phEventMultiSem = pThis;
+        return VINF_SUCCESS;
+    }
+    return VERR_NO_MEMORY;
+}
+
+
+/**
+ * Retain a reference to the semaphore.
+ *
+ * @param   pThis       The semaphore.
+ */
+DECLINLINE(void) rtR0SemEventMultiBsdRetain(PRTSEMEVENTMULTIINTERNAL pThis)
+{
+    uint32_t cRefs = ASMAtomicIncU32(&pThis->cRefs);
+    Assert(cRefs && cRefs < 100000);
+}
+
+
+/**
+ * Release a reference, destroy the thing if necessary.
+ *
+ * @param   pThis       The semaphore.
+ */
+DECLINLINE(void) rtR0SemEventMultiBsdRelease(PRTSEMEVENTMULTIINTERNAL pThis)
+{
+    if (RT_UNLIKELY(ASMAtomicDecU32(&pThis->cRefs) == 0))
+    {
+        Assert(pThis->u32Magic != RTSEMEVENTMULTI_MAGIC);
+        RTMemFree(pThis);
+    }
+}
+
+
+RTDECL(int)  RTSemEventMultiDestroy(RTSEMEVENTMULTI hEventMultiSem)
+{
+    /*
+     * Validate input.
+     */
+    PRTSEMEVENTMULTIINTERNAL pThis = (PRTSEMEVENTMULTIINTERNAL)hEventMultiSem;
+    if (pThis == NIL_RTSEMEVENTMULTI)
+        return VINF_SUCCESS;
+    AssertPtrReturn(pThis, VERR_INVALID_PARAMETER);
+    AssertMsgReturn(pThis->u32Magic == RTSEMEVENTMULTI_MAGIC, ("%p u32Magic=%RX32\n", pThis, pThis->u32Magic), VERR_INVALID_PARAMETER);
+    Assert(pThis->cRefs > 0);
+
+    /*
+     * Invalidate it and signal the object just in case.
+     */
+    ASMAtomicWriteU32(&pThis->u32Magic, ~RTSEMEVENTMULTI_MAGIC);
+    ASMAtomicAndU32(&pThis->fStateAndGen, RTSEMEVENTMULTIBSD_GEN_MASK);
+    rtR0SemBsdBroadcast(pThis);
+    rtR0SemEventMultiBsdRelease(pThis);
+    return VINF_SUCCESS;
+}
+
+
+RTDECL(int)  RTSemEventMultiSignal(RTSEMEVENTMULTI hEventMultiSem)
+{
+    uint32_t fNew;
+    uint32_t fOld;
+
+    /*
+     * Validate input.
+     */
+    PRTSEMEVENTMULTIINTERNAL pThis = (PRTSEMEVENTMULTIINTERNAL)hEventMultiSem;
+    if (!pThis)
+        return VERR_INVALID_PARAMETER;
+    AssertPtrReturn(pThis, VERR_INVALID_PARAMETER);
+    AssertMsgReturn(pThis->u32Magic == RTSEMEVENTMULTI_MAGIC, ("%p u32Magic=%RX32\n", pThis, pThis->u32Magic), VERR_INVALID_PARAMETER);
+    rtR0SemEventMultiBsdRetain(pThis);
+
+    /*
+     * Signal the event object.  The cause of the parnoia here is racing to try
+     * deal with racing RTSemEventMultiSignal calls (should probably be
+     * forbidden, but it's relatively easy to handle).
+     */
+    do
+    {
+        fNew = fOld = ASMAtomicUoReadU32(&pThis->fStateAndGen);
+        fNew += 1 << RTSEMEVENTMULTIBSD_GEN_SHIFT;
+        fNew |= RTSEMEVENTMULTIBSD_STATE_MASK;
+    }
+    while (!ASMAtomicCmpXchgU32(&pThis->fStateAndGen, fNew, fOld));
+
+    rtR0SemBsdBroadcast(pThis);
+    rtR0SemEventMultiBsdRelease(pThis);
+    return VINF_SUCCESS;
+}
+
+
+RTDECL(int)  RTSemEventMultiReset(RTSEMEVENTMULTI hEventMultiSem)
+{
+    /*
+     * Validate input.
+     */
+    PRTSEMEVENTMULTIINTERNAL pThis = (PRTSEMEVENTMULTIINTERNAL)hEventMultiSem;
+    if (!pThis)
+        return VERR_INVALID_PARAMETER;
+    AssertPtrReturn(pThis, VERR_INVALID_PARAMETER);
+    AssertMsgReturn(pThis->u32Magic == RTSEMEVENTMULTI_MAGIC, ("%p u32Magic=%RX32\n", pThis, pThis->u32Magic), VERR_INVALID_PARAMETER);
+    rtR0SemEventMultiBsdRetain(pThis);
+
+    /*
+     * Reset it.
+     */
+    ASMAtomicAndU32(&pThis->fStateAndGen, ~RTSEMEVENTMULTIBSD_STATE_MASK);
+
+    rtR0SemEventMultiBsdRelease(pThis);
+    return VINF_SUCCESS;
+}
+
+
+/**
+ * Worker for RTSemEventMultiWaitEx and RTSemEventMultiWaitExDebug.
+ *
+ * @returns VBox status code.
+ * @param   pThis           The event semaphore.
+ * @param   fFlags          See RTSemEventMultiWaitEx.
+ * @param   uTimeout        See RTSemEventMultiWaitEx.
+ * @param   pSrcPos         The source code position of the wait.
+ */
+static int rtR0SemEventMultiBsdWait(PRTSEMEVENTMULTIINTERNAL pThis, uint32_t fFlags, uint64_t uTimeout,
+                                    PCRTLOCKVALSRCPOS pSrcPos)
+{
+    uint32_t    fOrgStateAndGen;
+    int         rc;
+
+    /*
+     * Validate the input.
+     */
+    AssertPtrReturn(pThis, VERR_INVALID_PARAMETER);
+    AssertMsgReturn(pThis->u32Magic == RTSEMEVENTMULTI_MAGIC, ("%p u32Magic=%RX32\n", pThis, pThis->u32Magic), VERR_INVALID_PARAMETER);
+    AssertReturn(RTSEMWAIT_FLAGS_ARE_VALID(fFlags), VERR_INVALID_PARAMETER);
+    rtR0SemEventMultiBsdRetain(pThis);
+
+    /*
+     * Is the event already signalled or do we have to wait?
+     */
+    fOrgStateAndGen = ASMAtomicUoReadU32(&pThis->fStateAndGen);
+    if (fOrgStateAndGen & RTSEMEVENTMULTIBSD_STATE_MASK)
+        rc = VINF_SUCCESS;
+    else
+    {
+        /*
+         * We have to wait.
+         */
+        RTR0SEMBSDSLEEP Wait;
+        rc = rtR0SemBsdWaitInit(&Wait, fFlags, uTimeout, pThis);
+        if (RT_SUCCESS(rc))
+        {
+            for (;;)
+            {
+                /* The destruction test. */
+                if (RT_UNLIKELY(pThis->u32Magic != RTSEMEVENTMULTI_MAGIC))
+                    rc = VERR_SEM_DESTROYED;
+                else
+                {
+                    rtR0SemBsdWaitPrepare(&Wait);
+
+                    /* Check the exit conditions. */
+                    if (RT_UNLIKELY(pThis->u32Magic != RTSEMEVENTMULTI_MAGIC))
+                        rc = VERR_SEM_DESTROYED;
+                    else if (ASMAtomicUoReadU32(&pThis->fStateAndGen) != fOrgStateAndGen)
+                        rc = VINF_SUCCESS;
+                    else if (rtR0SemBsdWaitHasTimedOut(&Wait))
+                        rc = VERR_TIMEOUT;
+                    else if (rtR0SemBsdWaitWasInterrupted(&Wait))
+                        rc = VERR_INTERRUPTED;
+                    else
+                    {
+                        /* Do the wait and then recheck the conditions. */
+                        rtR0SemBsdWaitDoIt(&Wait);
+                        continue;
+                    }
+                }
+                break;
+            }
+
+            rtR0SemBsdWaitDelete(&Wait);
+        }
+    }
+
+    rtR0SemEventMultiBsdRelease(pThis);
+    return rc;
+}
+
+
+RTDECL(int)  RTSemEventMultiWaitEx(RTSEMEVENTMULTI hEventMultiSem, uint32_t fFlags, uint64_t uTimeout)
+{
+#ifndef RTSEMEVENT_STRICT
+    return rtR0SemEventMultiBsdWait(hEventMultiSem, fFlags, uTimeout, NULL);
+#else
+    RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_NORMAL_API();
+    return rtR0SemEventMultiBsdWait(hEventMultiSem, fFlags, uTimeout, &SrcPos);
+#endif
+}
+RT_EXPORT_SYMBOL(RTSemEventMultiWaitEx);
+
+
+RTDECL(int)  RTSemEventMultiWaitExDebug(RTSEMEVENTMULTI hEventMultiSem, uint32_t fFlags, uint64_t uTimeout,
+                                        RTHCUINTPTR uId, RT_SRC_POS_DECL)
+{
+    RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_DEBUG_API();
+    return rtR0SemEventMultiBsdWait(hEventMultiSem, fFlags, uTimeout, &SrcPos);
+}
+RT_EXPORT_SYMBOL(RTSemEventMultiWaitExDebug);
+
+
+RTDECL(uint32_t) RTSemEventMultiGetResolution(void)
+{
+    return rtR0SemBsdWaitGetResolution();
+}
+RT_EXPORT_SYMBOL(RTSemEventMultiGetResolution);
diff --git a/src/VBox/Runtime/r0drv/netbsd/semfastmutex-r0drv-netbsd.c b/src/VBox/Runtime/r0drv/netbsd/semfastmutex-r0drv-netbsd.c
new file mode 100644
index 0000000..93627c6
--- /dev/null
+++ b/src/VBox/Runtime/r0drv/netbsd/semfastmutex-r0drv-netbsd.c
@@ -0,0 +1,114 @@
+/* $Id: semfastmutex-r0drv-netbsd.c $ */
+/** @file
+ * IPRT - Fast Mutex Semaphores, Ring-0 Driver, NetBSD.
+ */
+
+/*
+ * Copyright (c) 2007 knut st. osmundsen <bird-src-spam at anduin.net>
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#include "the-netbsd-kernel.h"
+
+#include <iprt/semaphore.h>
+#include <iprt/err.h>
+#include <iprt/alloc.h>
+#include <iprt/assert.h>
+#include <iprt/asm.h>
+
+#include "internal/magics.h"
+
+
+/*********************************************************************************************************************************
+*   Structures and Typedefs                                                                                                      *
+*********************************************************************************************************************************/
+/**
+ * Wrapper for the NetBSD (sleep) mutex.
+ */
+typedef struct RTSEMFASTMUTEXINTERNAL
+{
+    /** Magic value (RTSEMFASTMUTEX_MAGIC). */
+    uint32_t            u32Magic;
+    /** The NetBSD shared/exclusive lock mutex. */
+    krwlock_t           Mtx;
+} RTSEMFASTMUTEXINTERNAL, *PRTSEMFASTMUTEXINTERNAL;
+
+
+RTDECL(int)  RTSemFastMutexCreate(PRTSEMFASTMUTEX phFastMtx)
+{
+    AssertCompile(sizeof(RTSEMFASTMUTEXINTERNAL) > sizeof(void *));
+    AssertPtrReturn(phFastMtx, VERR_INVALID_POINTER);
+
+    PRTSEMFASTMUTEXINTERNAL pThis = (PRTSEMFASTMUTEXINTERNAL)RTMemAllocZ(sizeof(*pThis));
+    if (pThis)
+    {
+        pThis->u32Magic = RTSEMFASTMUTEX_MAGIC;
+        rw_init(&pThis->Mtx);
+
+        *phFastMtx = pThis;
+        return VINF_SUCCESS;
+    }
+    return VERR_NO_MEMORY;
+}
+
+
+RTDECL(int)  RTSemFastMutexDestroy(RTSEMFASTMUTEX hFastMtx)
+{
+    PRTSEMFASTMUTEXINTERNAL pThis = hFastMtx;
+    if (pThis == NIL_RTSEMFASTMUTEX)
+        return VINF_SUCCESS;
+    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
+    AssertMsgReturn(pThis->u32Magic == RTSEMFASTMUTEX_MAGIC, ("%p: u32Magic=%RX32\n", pThis, pThis->u32Magic), VERR_INVALID_HANDLE);
+
+    ASMAtomicWriteU32(&pThis->u32Magic, RTSEMFASTMUTEX_MAGIC_DEAD);
+    rw_destroy(&pThis->Mtx);
+    RTMemFree(pThis);
+
+    return VINF_SUCCESS;
+}
+
+
+RTDECL(int)  RTSemFastMutexRequest(RTSEMFASTMUTEX hFastMtx)
+{
+    PRTSEMFASTMUTEXINTERNAL pThis = hFastMtx;
+    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
+    AssertMsgReturn(pThis->u32Magic == RTSEMFASTMUTEX_MAGIC, ("%p: u32Magic=%RX32\n", pThis, pThis->u32Magic), VERR_INVALID_HANDLE);
+
+    rw_enter(&pThis->Mtx, RW_WRITER);
+    return VINF_SUCCESS;
+}
+
+
+RTDECL(int)  RTSemFastMutexRelease(RTSEMFASTMUTEX hFastMtx)
+{
+    PRTSEMFASTMUTEXINTERNAL pThis = hFastMtx;
+    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
+    AssertMsgReturn(pThis->u32Magic == RTSEMFASTMUTEX_MAGIC, ("%p: u32Magic=%RX32\n", pThis, pThis->u32Magic), VERR_INVALID_HANDLE);
+
+    rw_exit(&pThis->Mtx);
+    return VINF_SUCCESS;
+}
diff --git a/src/VBox/Runtime/r0drv/netbsd/semmutex-r0drv-netbsd.c b/src/VBox/Runtime/r0drv/netbsd/semmutex-r0drv-netbsd.c
new file mode 100644
index 0000000..a6c3895
--- /dev/null
+++ b/src/VBox/Runtime/r0drv/netbsd/semmutex-r0drv-netbsd.c
@@ -0,0 +1,218 @@
+/* $Id: semmutex-r0drv-netbsd.c $ */
+/** @file
+ * IPRT - Mutex Semaphores, Ring-0 Driver, NetBSD.
+ */
+
+/*
+ * Copyright (C) 2010-2011 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#define RTSEMMUTEX_WITHOUT_REMAPPING
+#include "the-netbsd-kernel.h"
+#include "internal/iprt.h"
+#include <iprt/semaphore.h>
+
+#include <iprt/asm.h>
+#include <iprt/assert.h>
+#include <iprt/err.h>
+#include <iprt/mem.h>
+#include <iprt/thread.h>
+#include <iprt/time.h>
+
+#include "internal/magics.h"
+
+
+/*********************************************************************************************************************************
+*   Structures and Typedefs                                                                                                      *
+*********************************************************************************************************************************/
+/**
+ * Wrapper for the NetBSD (sleep) mutex.
+ */
+typedef struct RTSEMMUTEXINTERNAL
+{
+    /** Magic value (RTSEMMUTEX_MAGIC). */
+    uint32_t            u32Magic;
+    /** The NetBSD shared/exclusive lock mutex. */
+    struct sx           SxLock;
+} RTSEMMUTEXINTERNAL, *PRTSEMMUTEXINTERNAL;
+
+
+RTDECL(int)  RTSemMutexCreate(PRTSEMMUTEX phMutexSem)
+{
+    AssertCompile(sizeof(RTSEMMUTEXINTERNAL) > sizeof(void *));
+    AssertPtrReturn(phMutexSem, VERR_INVALID_POINTER);
+
+    PRTSEMMUTEXINTERNAL pThis = (PRTSEMMUTEXINTERNAL)RTMemAllocZ(sizeof(*pThis));
+    if (pThis)
+    {
+        pThis->u32Magic = RTSEMMUTEX_MAGIC;
+        sx_init_flags(&pThis->SxLock, "IPRT Mutex Semaphore", SX_RECURSE);
+
+        *phMutexSem = pThis;
+        return VINF_SUCCESS;
+    }
+    return VERR_NO_MEMORY;
+}
+
+
+RTDECL(int)  RTSemMutexDestroy(RTSEMMUTEX hMutexSem)
+{
+    PRTSEMMUTEXINTERNAL pThis = hMutexSem;
+    if (pThis == NIL_RTSEMMUTEX)
+        return VINF_SUCCESS;
+    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
+    AssertMsgReturn(pThis->u32Magic == RTSEMMUTEX_MAGIC, ("%p: u32Magic=%RX32\n", pThis, pThis->u32Magic), VERR_INVALID_HANDLE);
+
+    AssertReturn(ASMAtomicCmpXchgU32(&pThis->u32Magic, RTSEMMUTEX_MAGIC_DEAD, RTSEMMUTEX_MAGIC), VERR_INVALID_HANDLE);
+
+    sx_destroy(&pThis->SxLock);
+    RTMemFree(pThis);
+
+    return VINF_SUCCESS;
+}
+
+
+RTDECL(int)  RTSemMutexRequest(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies)
+{
+    PRTSEMMUTEXINTERNAL pThis = hMutexSem;
+    int                 rc;
+    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
+    AssertMsgReturn(pThis->u32Magic == RTSEMMUTEX_MAGIC, ("%p: u32Magic=%RX32\n", pThis, pThis->u32Magic), VERR_INVALID_HANDLE);
+
+    if (cMillies == RT_INDEFINITE_WAIT)
+    {
+        sx_xlock(&pThis->SxLock);
+        rc = VINF_SUCCESS;
+    }
+    else if (!cMillies)
+    {
+        if (sx_try_xlock(&pThis->SxLock))
+            rc = VINF_SUCCESS;
+        else
+            rc = VERR_TIMEOUT;
+    }
+    /*
+     * GROSS HACK: poll implementation of timeout.
+     */
+    /** @todo Implement timeouts in RTSemMutexRequest. */
+    else if (sx_try_xlock(&pThis->SxLock))
+        rc = VINF_SUCCESS;
+    else
+    {
+        uint64_t StartTS = RTTimeSystemMilliTS();
+        rc = VERR_TIMEOUT;
+        do
+        {
+            RTThreadSleep(1);
+            if (sx_try_xlock(&pThis->SxLock))
+            {
+                rc = VINF_SUCCESS;
+                break;
+            }
+        } while (RTTimeSystemMilliTS() - StartTS < cMillies);
+    }
+
+    return rc;
+}
+
+
+RTDECL(int) RTSemMutexRequestDebug(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
+{
+    return RTSemMutexRequest(hMutexSem, cMillies);
+}
+
+
+RTDECL(int)  RTSemMutexRequestNoResume(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies)
+{
+    PRTSEMMUTEXINTERNAL pThis = hMutexSem;
+    int                 rc;
+    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
+    AssertMsgReturn(pThis->u32Magic == RTSEMMUTEX_MAGIC, ("%p: u32Magic=%RX32\n", pThis, pThis->u32Magic), VERR_INVALID_HANDLE);
+
+    if (cMillies == RT_INDEFINITE_WAIT)
+    {
+        if (!sx_xlock_sig(&pThis->SxLock))
+            rc = VINF_SUCCESS;
+        else
+            rc = VERR_INTERRUPTED;
+    }
+    else if (!cMillies)
+    {
+        if (sx_try_xlock(&pThis->SxLock))
+            rc = VINF_SUCCESS;
+        else
+            rc = VERR_TIMEOUT;
+    }
+    /*
+     * GROSS HACK: poll implementation of timeout.
+     */
+    /** @todo Implement timeouts and interrupt checks in
+     *        RTSemMutexRequestNoResume. */
+    else if (sx_try_xlock(&pThis->SxLock))
+        rc = VINF_SUCCESS;
+    else
+    {
+        uint64_t StartTS = RTTimeSystemMilliTS();
+        rc = VERR_TIMEOUT;
+        do
+        {
+            RTThreadSleep(1);
+            if (sx_try_xlock(&pThis->SxLock))
+            {
+                rc = VINF_SUCCESS;
+                break;
+            }
+        } while (RTTimeSystemMilliTS() - StartTS < cMillies);
+    }
+
+    return rc;
+}
+
+
+RTDECL(int) RTSemMutexRequestNoResumeDebug(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
+{
+    return RTSemMutexRequestNoResume(hMutexSem, cMillies);
+}
+
+
+RTDECL(int)  RTSemMutexRelease(RTSEMMUTEX hMutexSem)
+{
+    PRTSEMMUTEXINTERNAL pThis = hMutexSem;
+    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
+    AssertMsgReturn(pThis->u32Magic == RTSEMMUTEX_MAGIC, ("%p: u32Magic=%RX32\n", pThis, pThis->u32Magic), VERR_INVALID_HANDLE);
+
+    sx_xunlock(&pThis->SxLock);
+    return VINF_SUCCESS;
+}
+
+
+
+RTDECL(bool) RTSemMutexIsOwned(RTSEMMUTEX hMutexSem)
+{
+    PRTSEMMUTEXINTERNAL pThis = hMutexSem;
+    AssertPtrReturn(pThis, false);
+    AssertMsgReturn(pThis->u32Magic == RTSEMMUTEX_MAGIC, ("%p: u32Magic=%RX32\n", pThis, pThis->u32Magic), false);
+
+    return sx_xlocked(&pThis->SxLock);
+}
diff --git a/src/VBox/Runtime/r0drv/netbsd/sleepqueue-r0drv-netbsd.h b/src/VBox/Runtime/r0drv/netbsd/sleepqueue-r0drv-netbsd.h
new file mode 100644
index 0000000..38b31ed
--- /dev/null
+++ b/src/VBox/Runtime/r0drv/netbsd/sleepqueue-r0drv-netbsd.h
@@ -0,0 +1,279 @@
+/* $Id: sleepqueue-r0drv-netbsd.h $ */
+/** @file
+ * IPRT - NetBSD Ring-0 Driver Helpers for Abstracting Sleep Queues,
+ */
+
+/*
+ * Copyright (C) 2006-2012 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+#ifndef ___r0drv_netbsd_sleepqueue_r0drv_netbsd_h
+#define ___r0drv_netbsd_sleepqueue_r0drv_netbsd_h
+
+#include "the-netbsd-kernel.h"
+
+#include <iprt/asm-math.h>
+#include <iprt/err.h>
+#include <iprt/time.h>
+
+static syncobj_t vbox_syncobj = {
+        SOBJ_SLEEPQ_FIFO,
+        sleepq_unsleep,
+        sleepq_changepri,
+        sleepq_lendpri,
+        syncobj_noowner,
+};
+
+/**
+ * Kernel mode Linux wait state structure.
+ */
+typedef struct RTR0SEMBSDSLEEP
+{
+    /** The absolute timeout given as nano seconds since the start of the
+     *  monotonic clock. */
+    uint64_t        uNsAbsTimeout;
+    /** The timeout in ticks. Updated after waiting. */
+    int             iTimeout;
+    /** Set if it's an indefinite wait. */
+    bool            fIndefinite;
+    /** Set if we've already timed out.
+     * Set by rtR0SemBsdWaitDoIt and read by rtR0SemBsdWaitHasTimedOut. */
+    bool            fTimedOut;
+    /** Flag whether the wait was interrupted. */
+    bool            fInterrupted;
+    /** flag whether the wait is interruptible or not. */
+    bool            fInterruptible;
+    /** Opaque wait channel id. */
+    wchan_t         wchan;
+    sleepq_t *sq;
+    kmutex_t *sq_lock;
+} RTR0SEMBSDSLEEP;
+/** Pointer to a NetBSD wait state. */
+typedef RTR0SEMBSDSLEEP *PRTR0SEMBSDSLEEP;
+
+
+/**
+ * Updates the timeout of the NetBSD wait.
+ *
+ * @returns RTSEMWAIT_FLAGS_INDEFINITE if the timeout value is too big.
+ *          0 otherwise
+ * @param   pWait               The wait structure.
+ * @param   uTimeout            The relative timeout in nanoseconds.
+ */
+DECLINLINE(void) rtR0SemBsdWaitUpdateTimeout(PRTR0SEMBSDSLEEP pWait)
+{
+    /* Convert absolute timeout to ticks */
+    uint64_t now = RTTimeNanoTS();
+    if (now >= pWait->uNsAbsTimeout) {
+        pWait->iTimeout = 0;
+    } else {
+        uint64_t nanos = pWait->uNsAbsTimeout - now;
+        pWait->iTimeout = hz * nanos / 1000000000;
+        /* for 1ms wait, wait at least one tick ?? */
+        if ((pWait->iTimeout == 0) && (nanos >= 1000000)) {
+            pWait->iTimeout = 1;
+        }
+    }
+}
+
+/**
+ * Initializes a wait.
+ *
+ * The caller MUST check the wait condition BEFORE calling this function or the
+ * timeout logic will be flawed.
+ *
+ * @returns VINF_SUCCESS or VERR_TIMEOUT.
+ * @param   pWait               The wait structure.
+ * @param   fFlags              The wait flags.
+ * @param   uTimeout            The timeout.
+ * @param   pvWaitChan          The opaque wait channel.
+ */
+DECLINLINE(int) rtR0SemBsdWaitInit(PRTR0SEMBSDSLEEP pWait, uint32_t fFlags, uint64_t uTimeout,
+                                   void *pvWaitChan)
+{
+    if (fFlags & RTSEMWAIT_FLAGS_INDEFINITE) {
+        pWait->fIndefinite      = true;
+        pWait->iTimeout = 0;
+        pWait->uNsAbsTimeout = 0;
+    } else {
+        if (fFlags & RTSEMWAIT_FLAGS_RELATIVE) {
+            if (fFlags & RTSEMWAIT_FLAGS_MILLISECS) {
+                pWait->uNsAbsTimeout = uTimeout * 1000000 + RTTimeSystemNanoTS();
+            } else {
+                pWait->uNsAbsTimeout = uTimeout + RTTimeSystemNanoTS();
+            }
+        } else {
+            if (fFlags & RTSEMWAIT_FLAGS_MILLISECS) {
+                pWait->uNsAbsTimeout = uTimeout * 1000000;
+            } else {
+                pWait->uNsAbsTimeout = uTimeout;
+            }
+        }
+        rtR0SemBsdWaitUpdateTimeout(pWait);
+        if (pWait->iTimeout == 0) {
+            return VERR_TIMEOUT;
+        }
+    }
+
+    pWait->fTimedOut   = false;
+    /*
+     * Initialize the wait queue related bits.
+     */
+    pWait->fInterruptible = fFlags & RTSEMWAIT_FLAGS_INTERRUPTIBLE
+                            ? true : false;
+    pWait->fInterrupted   = false;
+    pWait->wchan = pvWaitChan;
+    pWait->sq = NULL;
+    pWait->sq_lock = NULL;
+
+    return VINF_SUCCESS;
+}
+
+/**
+ * Prepares the next wait.
+ *
+ * This must be called before rtR0SemBsdWaitDoIt, and the caller should check
+ * the exit conditions inbetween the two calls.
+ *
+ * @param   pWait               The wait structure.
+ */
+DECLINLINE(void) rtR0SemBsdWaitPrepare(PRTR0SEMBSDSLEEP pWait)
+{
+    pWait->sq = sleeptab_lookup(&sleeptab, pWait->wchan, &pWait->sq_lock);
+}
+
+/**
+ * Do the actual wait.
+ *
+ * @param   pWait               The wait structure.
+ */
+DECLINLINE(void) rtR0SemBsdWaitDoIt(PRTR0SEMBSDSLEEP pWait)
+{
+    sleepq_enter(pWait->sq, curlwp, pWait->sq_lock);
+    sleepq_enqueue(pWait->sq, pWait->wchan, "VBoxIS", &vbox_syncobj);
+
+    pWait->sq = NULL;
+    pWait->sq_lock = NULL;
+
+    int error = sleepq_block(pWait->iTimeout, pWait->fInterruptible);
+    if (error == EWOULDBLOCK) {
+        if (!pWait->fIndefinite) {
+            pWait->fTimedOut = true;
+        }
+    } else if (error == ERESTART) {
+        if (pWait->fInterruptible) {
+            pWait->fInterrupted = true;
+        } else if (!pWait->fIndefinite) {
+            rtR0SemBsdWaitUpdateTimeout(pWait);
+            if (pWait->iTimeout == 0) {
+                pWait->fTimedOut = true;
+            }
+        }
+    } else if (error == EINTR) {
+        if (pWait->fInterruptible) {
+            pWait->fInterrupted = true;
+        } else if (!pWait->fIndefinite) {
+            rtR0SemBsdWaitUpdateTimeout(pWait);
+            if (pWait->iTimeout == 0) {
+                pWait->fTimedOut = true;
+            }
+        }
+    } else if (error) {
+        AssertMsgFailed(("sleepq_block -> %d\n", error));
+    }
+}
+
+
+/**
+ * Checks if a NetBSD wait was interrupted.
+ *
+ * @returns true / false
+ * @param   pWait               The wait structure.
+ * @remarks This shall be called before the first rtR0SemLnxWaitDoIt().
+ */
+DECLINLINE(bool) rtR0SemBsdWaitWasInterrupted(PRTR0SEMBSDSLEEP pWait)
+{
+    return pWait->fInterrupted;
+}
+
+
+/**
+ * Checks if a NetBSD wait has timed out.
+ *
+ * @returns true / false
+ * @param   pWait               The wait structure.
+ */
+DECLINLINE(bool) rtR0SemBsdWaitHasTimedOut(PRTR0SEMBSDSLEEP pWait)
+{
+    return pWait->fTimedOut;
+}
+
+
+/**
+ * Deletes a NetBSD wait.
+ *
+ * @param   pWait               The wait structure.
+ */
+DECLINLINE(void) rtR0SemBsdWaitDelete(PRTR0SEMBSDSLEEP pWait)
+{
+    if (pWait->sq_lock != NULL) {
+        mutex_spin_exit(pWait->sq_lock);
+        pWait->sq = NULL;
+        pWait->sq_lock = NULL;
+    }
+}
+
+
+/**
+ * Signals the wait channel.
+ *
+ * @param  pvWaitChan           The opaque wait channel handle.
+ */
+DECLINLINE(void) rtR0SemBsdSignal(void *pvWaitChan)
+{
+    kmutex_t *mp;
+    sleepq_t *sq = sleeptab_lookup(&sleeptab, pvWaitChan, &mp);
+    sleepq_wake(sq, pvWaitChan, 1, mp);
+}
+
+/**
+ * Wakes up all waiters on the wait channel.
+ *
+ * @param  pvWaitChan           The opaque wait channel handle.
+ */
+DECLINLINE(void) rtR0SemBsdBroadcast(void *pvWaitChan)
+{
+    kmutex_t *mp;
+    sleepq_t *sq = sleeptab_lookup(&sleeptab, pvWaitChan, &mp);
+    sleepq_wake(sq, pvWaitChan, ~0u, mp);
+}
+
+/**
+ * Gets the max resolution of the timeout machinery.
+ *
+ * @returns Resolution specified in nanoseconds.
+ */
+DECLINLINE(uint32_t) rtR0SemBsdWaitGetResolution(void)
+{
+    return 1000000000 / hz; /* ns */
+}
+
+#endif /* ___r0drv_netbsd_sleepqueue_r0drv_netbsd_h */
diff --git a/src/VBox/Runtime/r0drv/netbsd/spinlock-r0drv-netbsd.c b/src/VBox/Runtime/r0drv/netbsd/spinlock-r0drv-netbsd.c
new file mode 100644
index 0000000..d56d09d
--- /dev/null
+++ b/src/VBox/Runtime/r0drv/netbsd/spinlock-r0drv-netbsd.c
@@ -0,0 +1,148 @@
+/* $Id: spinlock-r0drv-netbsd.c $ */
+/** @file
+ * IPRT - Spinlocks, Ring-0 Driver, NetBSD.
+ */
+
+/*
+ * Copyright (c) 2007 knut st. osmundsen <bird-src-spam at anduin.net>
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#include "the-netbsd-kernel.h"
+#include "internal/iprt.h"
+
+#include <iprt/spinlock.h>
+#include <iprt/err.h>
+#include <iprt/alloc.h>
+#include <iprt/assert.h>
+#include <iprt/asm.h>
+#include <iprt/asm-amd64-x86.h>
+#include <iprt/thread.h>
+#include <iprt/mp.h>
+
+#include "internal/magics.h"
+
+
+/*********************************************************************************************************************************
+*   Structures and Typedefs                                                                                                      *
+*********************************************************************************************************************************/
+/**
+ * Wrapper for the struct mtx type.
+ */
+typedef struct RTSPINLOCKINTERNAL
+{
+    /** Spinlock magic value (RTSPINLOCK_MAGIC). */
+    uint32_t volatile   u32Magic;
+    /** The spinlock. */
+    kmutex_t            pSpinLock;
+    /** Saved interrupt flag. */
+    uint32_t volatile   fIntSaved;
+    /** The spinlock creation flags. */
+    uint32_t            fFlags;
+} RTSPINLOCKINTERNAL, *PRTSPINLOCKINTERNAL;
+
+
+RTDECL(int)  RTSpinlockCreate(PRTSPINLOCK pSpinlock, uint32_t fFlags, const char *pszName)
+{
+    RT_ASSERT_PREEMPTIBLE();
+    AssertReturn(fFlags == RTSPINLOCK_FLAGS_INTERRUPT_SAFE || fFlags == RTSPINLOCK_FLAGS_INTERRUPT_UNSAFE, VERR_INVALID_PARAMETER);
+
+    /*
+     * Allocate.
+     */
+    AssertCompile(sizeof(RTSPINLOCKINTERNAL) > sizeof(void *));
+    PRTSPINLOCKINTERNAL pThis = (PRTSPINLOCKINTERNAL)RTMemAllocZ(sizeof(*pThis));
+    if (!pThis)
+        return VERR_NO_MEMORY;
+
+    /*
+     * Initialize & return.
+     */
+    pThis->u32Magic  = RTSPINLOCK_MAGIC;
+    pThis->fFlags    = fFlags;
+    pThis->fIntSaved = 0;
+    if (fFlags & RTSPINLOCK_FLAGS_INTERRUPT_SAFE) {
+        mutex_init(&pThis->pSpinLock, MUTEX_DEFAULT, IPL_BIO);
+    } else {
+        mutex_init(&pThis->pSpinLock, MUTEX_DEFAULT, IPL_NONE);
+    }
+
+    *pSpinlock = pThis;
+    return VINF_SUCCESS;
+}
+
+
+RTDECL(int)  RTSpinlockDestroy(RTSPINLOCK Spinlock)
+{
+    /*
+     * Validate input.
+     */
+    RT_ASSERT_INTS_ON();
+    PRTSPINLOCKINTERNAL pThis = (PRTSPINLOCKINTERNAL)Spinlock;
+    if (!pThis)
+        return VERR_INVALID_PARAMETER;
+    AssertMsgReturn(pThis->u32Magic == RTSPINLOCK_MAGIC,
+                    ("Invalid spinlock %p magic=%#x\n", pThis, pThis->u32Magic),
+                    VERR_INVALID_PARAMETER);
+
+    /*
+     * Make the lock invalid and release the memory.
+     */
+    ASMAtomicIncU32(&pThis->u32Magic);
+    mutex_destroy(&pThis->pSpinLock);
+    RTMemFree(pThis);
+    return VINF_SUCCESS;
+}
+
+
+RTDECL(void) RTSpinlockAcquire(RTSPINLOCK Spinlock)
+{
+    PRTSPINLOCKINTERNAL pThis = (PRTSPINLOCKINTERNAL)Spinlock;
+    RT_ASSERT_PREEMPT_CPUID_VAR();
+    AssertPtr(pThis);
+    Assert(pThis->u32Magic == RTSPINLOCK_MAGIC);
+
+    if (pThis->fFlags & RTSPINLOCK_FLAGS_INTERRUPT_SAFE) {
+        mutex_spin_enter(&pThis->pSpinLock);
+    } else {
+        mutex_enter(&pThis->pSpinLock);
+    }
+}
+
+
+RTDECL(void) RTSpinlockRelease(RTSPINLOCK Spinlock)
+{
+    PRTSPINLOCKINTERNAL pThis = (PRTSPINLOCKINTERNAL)Spinlock;
+    AssertPtr(pThis);
+    Assert(pThis->u32Magic == RTSPINLOCK_MAGIC);
+
+    if (pThis->fFlags & RTSPINLOCK_FLAGS_INTERRUPT_SAFE) {
+        mutex_spin_exit(&pThis->pSpinLock);
+    } else {
+        mutex_exit(&pThis->pSpinLock);
+    }
+}
diff --git a/src/VBox/Runtime/r0drv/netbsd/the-netbsd-kernel.h b/src/VBox/Runtime/r0drv/netbsd/the-netbsd-kernel.h
new file mode 100644
index 0000000..f2aa910
--- /dev/null
+++ b/src/VBox/Runtime/r0drv/netbsd/the-netbsd-kernel.h
@@ -0,0 +1,72 @@
+/* $Id: the-netbsd-kernel.h $ */
+/** @file
+ * IPRT - Ring-0 Driver, The NetBSD Kernel Headers.
+ */
+
+/*
+ * Copyright (c) 2007 knut st. osmundsen <bird-src-spam at anduin.net>
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef ___the_netbsd_kernel_h
+#define ___the_netbsd_kernel_h
+
+#include <iprt/types.h>
+
+/* Deal with conflicts first. */
+#include <sys/param.h>
+#undef PVM
+#include <sys/bus.h>
+#include <sys/types.h>
+#include <sys/errno.h>
+#include <sys/kernel.h>
+#include <sys/uio.h>
+#include <sys/systm.h>
+#include <sys/malloc.h>
+#include <sys/proc.h>
+#include <sys/syslimits.h>
+#include <sys/sleepq.h>
+#include <sys/unistd.h>
+#include <sys/kthread.h>
+#include <sys/lock.h>
+#include <sys/mutex.h>
+#include <sys/sched.h>
+#include <sys/callout.h>
+#include <sys/rwlock.h>
+#include <sys/kmem.h>
+#include <sys/cpu.h>
+#include <sys/vmmeter.h>        /* cnt */
+#include <sys/resourcevar.h>
+#include <uvm/uvm.h>
+#include <uvm/uvm_extern.h>
+#include <uvm/uvm_page.h>
+#include <machine/cpu.h>
+
+/**
+ * Check whether we can use kmem_alloc_prot.
+ */
+#if 0 /** @todo Not available yet. */
+# define USE_KMEM_ALLOC_PROT
+#endif
+
+#endif /* ___the_netbsd_kernel_h */
diff --git a/src/VBox/Runtime/r0drv/netbsd/thread-r0drv-netbsd.c b/src/VBox/Runtime/r0drv/netbsd/thread-r0drv-netbsd.c
new file mode 100644
index 0000000..325b683
--- /dev/null
+++ b/src/VBox/Runtime/r0drv/netbsd/thread-r0drv-netbsd.c
@@ -0,0 +1,181 @@
+/* $Id: thread-r0drv-netbsd.c $ */
+/** @file
+ * IPRT - Threads (Part 1), Ring-0 Driver, NetBSD.
+ */
+
+/*
+ * Copyright (C) 2007-2011 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#include "the-netbsd-kernel.h"
+#include "internal/iprt.h"
+#include <iprt/thread.h>
+
+#include <iprt/asm.h>
+#include <iprt/asm-amd64-x86.h>
+#include <iprt/assert.h>
+#include <iprt/err.h>
+#include <iprt/mp.h>
+#include "internal/thread.h"
+
+
+RTDECL(RTNATIVETHREAD) RTThreadNativeSelf(void)
+{
+    return (RTNATIVETHREAD)curlwp;
+}
+
+
+static int rtR0ThreadNbsdSleepCommon(RTMSINTERVAL cMillies)
+{
+    int rc;
+    int cTicks;
+
+    /*
+     * 0 ms sleep -> yield.
+     */
+    if (!cMillies)
+    {
+        RTThreadYield();
+        return VINF_SUCCESS;
+    }
+
+    /*
+     * Translate milliseconds into ticks and go to sleep.
+     */
+    if (cMillies != RT_INDEFINITE_WAIT)
+    {
+        if (hz == 1000)
+            cTicks = cMillies;
+        else if (hz == 100)
+            cTicks = cMillies / 10;
+        else
+        {
+            int64_t cTicks64 = ((uint64_t)cMillies * hz) / 1000;
+            cTicks = (int)cTicks64;
+            if (cTicks != cTicks64)
+                cTicks = INT_MAX;
+        }
+    }
+    else
+        cTicks = 0;     /* requires giant lock! */
+
+    rc = tsleep((void *)RTThreadSleep,
+                PZERO | PCATCH,
+                "iprtsl",           /* max 6 chars */
+                cTicks);
+    switch (rc)
+    {
+        case 0:
+            return VINF_SUCCESS;
+        case EWOULDBLOCK:
+            return VERR_TIMEOUT;
+        case EINTR:
+        case ERESTART:
+            return VERR_INTERRUPTED;
+        default:
+            AssertMsgFailed(("%d\n", rc));
+            return VERR_NO_TRANSLATION;
+    }
+}
+
+
+RTDECL(int) RTThreadSleep(RTMSINTERVAL cMillies)
+{
+    return rtR0ThreadNbsdSleepCommon(cMillies);
+}
+
+
+RTDECL(int) RTThreadSleepNoLog(RTMSINTERVAL cMillies)
+{
+    return rtR0ThreadNbsdSleepCommon(cMillies);
+}
+
+
+RTDECL(bool) RTThreadYield(void)
+{
+    yield();
+    return true;
+}
+
+
+RTDECL(bool) RTThreadPreemptIsEnabled(RTTHREAD hThread)
+{
+    Assert(hThread == NIL_RTTHREAD);
+
+    return curlwp->l_dopreempt == 0
+        && ASMIntAreEnabled(); /** @todo is there a native netbsd function/macro for this? */
+}
+
+
+RTDECL(bool) RTThreadPreemptIsPending(RTTHREAD hThread)
+{
+    Assert(hThread == NIL_RTTHREAD);
+
+    return curlwp->l_dopreempt;
+}
+
+
+RTDECL(bool) RTThreadPreemptIsPendingTrusty(void)
+{
+    /* yes, RTThreadPreemptIsPending is reliable. */
+    return true;
+}
+
+
+RTDECL(bool) RTThreadPreemptIsPossible(void)
+{
+    /* yes, kernel preemption is possible. */
+    return true;
+}
+
+
+RTDECL(void) RTThreadPreemptDisable(PRTTHREADPREEMPTSTATE pState)
+{
+    AssertPtr(pState);
+
+    curlwp->l_nopreempt++;
+    __insn_barrier();
+}
+
+
+RTDECL(void) RTThreadPreemptRestore(PRTTHREADPREEMPTSTATE pState)
+{
+    AssertPtr(pState);
+    __insn_barrier();
+    if (--curlwp->l_nopreempt != 0)
+        return;
+    __insn_barrier();
+    if (__predict_false(curlwp->l_dopreempt))
+        kpreempt(0);
+    __insn_barrier();
+}
+
+
+RTDECL(bool) RTThreadIsInInterrupt(RTTHREAD hThread)
+{
+    Assert(hThread == NIL_RTTHREAD); NOREF(hThread);
+    /** @todo NetBSD: Implement RTThreadIsInInterrupt. Required for guest
+     *        additions! */
+    return !ASMIntAreEnabled();
+}
diff --git a/src/VBox/Runtime/r0drv/netbsd/thread2-r0drv-netbsd.c b/src/VBox/Runtime/r0drv/netbsd/thread2-r0drv-netbsd.c
new file mode 100644
index 0000000..73320de
--- /dev/null
+++ b/src/VBox/Runtime/r0drv/netbsd/thread2-r0drv-netbsd.c
@@ -0,0 +1,135 @@
+/* $Id: thread2-r0drv-netbsd.c $ */
+/** @file
+ * IPRT - Threads (Part 2), Ring-0 Driver, NetBSD.
+ */
+
+/*
+ * Copyright (c) 2007 knut st. osmundsen <bird-src-spam at anduin.net>
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#include "the-netbsd-kernel.h"
+
+#include <iprt/thread.h>
+#include <iprt/err.h>
+#include <iprt/assert.h>
+
+#include "internal/thread.h"
+
+
+DECLHIDDEN(int) rtThreadNativeInit(void)
+{
+    return VINF_SUCCESS;
+}
+
+
+RTDECL(RTTHREAD) RTThreadSelf(void)
+{
+    return rtThreadGetByNative(RTThreadNativeSelf());
+}
+
+
+DECLHIDDEN(int) rtThreadNativeSetPriority(PRTTHREADINT pThread, RTTHREADTYPE enmType)
+{
+    int iPriority;
+
+    switch (enmType)
+    {
+        case RTTHREADTYPE_INFREQUENT_POLLER:    iPriority = PZERO + 8;      break;
+        case RTTHREADTYPE_EMULATION:            iPriority = PZERO + 4;      break;
+        case RTTHREADTYPE_DEFAULT:              iPriority = PZERO;          break;
+        case RTTHREADTYPE_MSG_PUMP:             iPriority = PZERO - 4;      break;
+        case RTTHREADTYPE_IO:                   iPriority = PRIBIO;         break;
+        case RTTHREADTYPE_TIMER:                iPriority = PSWP;           break;
+        default:
+            AssertMsgFailed(("enmType=%d\n", enmType));
+            return VERR_INVALID_PARAMETER;
+    }
+
+    lwp_lock(curlwp);
+    lwp_changepri(curlwp, iPriority);
+    lwp_unlock(curlwp);
+
+    return VINF_SUCCESS;
+}
+
+
+DECLHIDDEN(int) rtThreadNativeAdopt(PRTTHREADINT pThread)
+{
+    NOREF(pThread);
+    /* There is nothing special that needs doing here, but the
+       user really better know what he's cooking. */
+    return VINF_SUCCESS;
+}
+
+
+DECLHIDDEN(void) rtThreadNativeWaitKludge(PRTTHREADINT pThread)
+{
+    /** @todo fix RTThreadWait/RTR0Term race on netbsd. */
+    RTThreadSleep(1);
+}
+
+
+DECLHIDDEN(void) rtThreadNativeDestroy(PRTTHREADINT pThread)
+{
+    NOREF(pThread);
+}
+
+
+/**
+ * Native thread main function.
+ *
+ * @param   pvThreadInt     The thread structure.
+ */
+static void rtThreadNativeMain(void *pvThreadInt)
+{
+    const struct lwp *Self = curlwp;
+    PRTTHREADINT pThreadInt = (PRTTHREADINT)pvThreadInt;
+    int rc;
+
+    rc = rtThreadMain(pThreadInt, (RTNATIVETHREAD)Self, &pThreadInt->szName[0]);
+
+    kthread_exit(rc);
+}
+
+
+DECLHIDDEN(int) rtThreadNativeCreate(PRTTHREADINT pThreadInt, PRTNATIVETHREAD pNativeThread)
+{
+    int rc;
+    struct lwp *l;
+
+    rc = kthread_create(PRI_NONE, 0, NULL, rtThreadNativeMain, (void *)pThreadInt, &l, "%s", pThreadInt->szName);
+
+    if (!rc)
+    {
+        *pNativeThread = (RTNATIVETHREAD)l;
+        rc = VINF_SUCCESS;
+    }
+    else
+        rc = RTErrConvertFromErrno(rc);
+    return rc;
+}
diff --git a/src/VBox/Runtime/r0drv/netbsd/time-r0drv-netbsd.c b/src/VBox/Runtime/r0drv/netbsd/time-r0drv-netbsd.c
new file mode 100644
index 0000000..162fceb
--- /dev/null
+++ b/src/VBox/Runtime/r0drv/netbsd/time-r0drv-netbsd.c
@@ -0,0 +1,73 @@
+/* $Id: time-r0drv-netbsd.c $ */
+/** @file
+ * IPRT - Time, Ring-0 Driver, NetBSD.
+ */
+
+/*
+ * Copyright (c) 2007 knut st. osmundsen <bird-src-spam at anduin.net>
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#include "the-netbsd-kernel.h"
+#define RTTIME_INCL_TIMESPEC
+
+#include <iprt/time.h>
+
+
+RTDECL(uint64_t) RTTimeNanoTS(void)
+{
+    struct timespec tsp;
+    nanotime(&tsp);
+    return tsp.tv_sec * RT_NS_1SEC_64
+         + tsp.tv_nsec;
+}
+
+
+RTDECL(uint64_t) RTTimeMilliTS(void)
+{
+    return RTTimeNanoTS() / RT_NS_1MS;
+}
+
+
+RTDECL(uint64_t) RTTimeSystemNanoTS(void)
+{
+    return RTTimeNanoTS();
+}
+
+
+RTDECL(uint64_t) RTTimeSystemMilliTS(void)
+{
+    return RTTimeMilliTS();
+}
+
+
+RTDECL(PRTTIMESPEC) RTTimeNow(PRTTIMESPEC pTime)
+{
+    struct timespec tsp;
+    nanotime(&tsp);
+    return RTTimeSpecSetTimespec(pTime, &tsp);
+}
diff --git a/src/VBox/Runtime/r0drv/nt/RTLogWriteDebugger-r0drv-nt.cpp b/src/VBox/Runtime/r0drv/nt/RTLogWriteDebugger-r0drv-nt.cpp
index 01f37d0..54b9f90 100644
--- a/src/VBox/Runtime/r0drv/nt/RTLogWriteDebugger-r0drv-nt.cpp
+++ b/src/VBox/Runtime/r0drv/nt/RTLogWriteDebugger-r0drv-nt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/nt/alloc-r0drv-nt.cpp b/src/VBox/Runtime/r0drv/nt/alloc-r0drv-nt.cpp
index 90ed667..5f22329 100644
--- a/src/VBox/Runtime/r0drv/nt/alloc-r0drv-nt.cpp
+++ b/src/VBox/Runtime/r0drv/nt/alloc-r0drv-nt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/nt/assert-r0drv-nt.cpp b/src/VBox/Runtime/r0drv/nt/assert-r0drv-nt.cpp
index 71e36e3..0e45bae 100644
--- a/src/VBox/Runtime/r0drv/nt/assert-r0drv-nt.cpp
+++ b/src/VBox/Runtime/r0drv/nt/assert-r0drv-nt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/nt/initterm-r0drv-nt.cpp b/src/VBox/Runtime/r0drv/nt/initterm-r0drv-nt.cpp
index 7c72f0a..17fa5d7 100644
--- a/src/VBox/Runtime/r0drv/nt/initterm-r0drv-nt.cpp
+++ b/src/VBox/Runtime/r0drv/nt/initterm-r0drv-nt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/nt/internal-r0drv-nt.h b/src/VBox/Runtime/r0drv/nt/internal-r0drv-nt.h
index 0ebc344..a81e47e 100644
--- a/src/VBox/Runtime/r0drv/nt/internal-r0drv-nt.h
+++ b/src/VBox/Runtime/r0drv/nt/internal-r0drv-nt.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/nt/memobj-r0drv-nt.cpp b/src/VBox/Runtime/r0drv/nt/memobj-r0drv-nt.cpp
index 6bfb677..5f8f1e8 100644
--- a/src/VBox/Runtime/r0drv/nt/memobj-r0drv-nt.cpp
+++ b/src/VBox/Runtime/r0drv/nt/memobj-r0drv-nt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -247,6 +247,7 @@ DECLHIDDEN(int) rtR0MemObjNativeFree(RTR0MEMOBJ pMem)
 DECLHIDDEN(int) rtR0MemObjNativeAllocPage(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable)
 {
     AssertMsgReturn(cb <= _1G, ("%#x\n", cb), VERR_OUT_OF_RANGE); /* for safe size_t -> ULONG */
+    RT_NOREF1(fExecutable);
 
     /*
      * Try allocate the memory and create an MDL for them so
@@ -345,8 +346,10 @@ DECLHIDDEN(int) rtR0MemObjNativeAllocLow(PPRTR0MEMOBJINTERNAL ppMem, size_t cb,
             }
             __except(EXCEPTION_EXECUTE_HANDLER)
             {
+# ifdef LOG_ENABLED
                 NTSTATUS rcNt = GetExceptionCode();
                 Log(("rtR0MemObjNativeAllocLow: Exception Code %#x\n", rcNt));
+# endif
                 /* nothing */
             }
         }
@@ -379,6 +382,7 @@ static int rtR0MemObjNativeAllocContEx(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bo
                                        size_t uAlignment)
 {
     AssertMsgReturn(cb <= _1G, ("%#x\n", cb), VERR_OUT_OF_RANGE); /* for safe size_t -> ULONG */
+    RT_NOREF1(fExecutable);
 #ifdef IPRT_TARGET_NT4
     if (uAlignment != PAGE_SIZE)
         return VERR_NOT_SUPPORTED;
@@ -518,6 +522,7 @@ DECLHIDDEN(int) rtR0MemObjNativeAllocPhysNC(PPRTR0MEMOBJINTERNAL ppMem, size_t c
     }
     return VERR_NO_MEMORY;
 #else   /* IPRT_TARGET_NT4 */
+    RT_NOREF(ppMem, cb, PhysHighest);
     return VERR_NOT_SUPPORTED;
 #endif  /* IPRT_TARGET_NT4 */
 }
@@ -689,6 +694,7 @@ DECLHIDDEN(int) rtR0MemObjNativeReserveKernel(PPRTR0MEMOBJINTERNAL ppMem, void *
     /*
      * MmCreateSection(SEC_RESERVE) + MmMapViewInSystemSpace perhaps?
      */
+    RT_NOREF4(ppMem, pvFixed, cb, uAlignment);
     return VERR_NOT_SUPPORTED;
 }
 
@@ -699,6 +705,7 @@ DECLHIDDEN(int) rtR0MemObjNativeReserveUser(PPRTR0MEMOBJINTERNAL ppMem, RTR3PTR
     /*
      * ZeCreateSection(SEC_RESERVE) + ZwMapViewOfSection perhaps?
      */
+    RT_NOREF5(ppMem, R3PtrFixed, cb, uAlignment, R0Process);
     return VERR_NOT_SUPPORTED;
 }
 
@@ -787,8 +794,10 @@ static int rtR0MemObjNtMap(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ pMemToMap, voi
         }
         __except(EXCEPTION_EXECUTE_HANDLER)
         {
+#ifdef LOG_ENABLED
             NTSTATUS rcNt = GetExceptionCode();
             Log(("rtR0MemObjNtMap: Exception Code %#x\n", rcNt));
+#endif
 
             /* nothing */
             rc = VERR_MAP_FAILED;
@@ -848,7 +857,9 @@ DECLHIDDEN(int) rtR0MemObjNativeMapUser(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ p
 
 DECLHIDDEN(int) rtR0MemObjNativeProtect(PRTR0MEMOBJINTERNAL pMem, size_t offSub, size_t cbSub, uint32_t fProt)
 {
+#if 0
     PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)pMem;
+#endif
     if (!g_fResolvedDynamicApis)
         rtR0MemObjNtResolveDynamicApis();
 
@@ -966,6 +977,8 @@ DECLHIDDEN(int) rtR0MemObjNativeProtect(PRTR0MEMOBJINTERNAL pMem, size_t offSub,
             return VINF_SUCCESS;
         return RTErrConvertFromNtStatus(rcNt);
     }
+#else
+    RT_NOREF4(pMem, offSub, cbSub, fProt);
 #endif
 
     return VERR_NOT_SUPPORTED;
diff --git a/src/VBox/Runtime/r0drv/nt/memuserkernel-r0drv-nt.cpp b/src/VBox/Runtime/r0drv/nt/memuserkernel-r0drv-nt.cpp
index 73ff8f0..998aaed 100644
--- a/src/VBox/Runtime/r0drv/nt/memuserkernel-r0drv-nt.cpp
+++ b/src/VBox/Runtime/r0drv/nt/memuserkernel-r0drv-nt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/nt/mp-r0drv-nt.cpp b/src/VBox/Runtime/r0drv/nt/mp-r0drv-nt.cpp
index ef556b9..9b02878 100644
--- a/src/VBox/Runtime/r0drv/nt/mp-r0drv-nt.cpp
+++ b/src/VBox/Runtime/r0drv/nt/mp-r0drv-nt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -344,6 +344,7 @@ static int rtMpCallUsingBroadcastIpi(PFNRTMPWORKER pfnWorker, void *pvUser1, voi
 static VOID rtmpNtDPCWrapper(IN PKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
 {
     PRTMPARGS pArgs = (PRTMPARGS)DeferredContext;
+    RT_NOREF3(Dpc, SystemArgument1, SystemArgument2);
 
     ASMAtomicIncU32(&pArgs->cHits);
     pArgs->pfnWorker(KeGetCurrentProcessorNumber(), pArgs->pvUser1, pArgs->pvUser2);
@@ -372,23 +373,23 @@ static VOID rtmpNtDPCWrapper(IN PKDPC Dpc, IN PVOID DeferredContext, IN PVOID Sy
 static int rtMpCallUsingDpcs(PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2,
                              RT_NT_CPUID enmCpuid, RTCPUID idCpu, RTCPUID idCpu2, uint32_t *pcHits)
 {
+#ifdef IPRT_TARGET_NT4
+    RT_NOREF(pfnWorker, pvUser1, pvUser2, enmCpuid, idCpu, idCpu2, pcHits);
+    /* g_pfnrtNt* are not present on NT anyway. */
+    return VERR_NOT_SUPPORTED;
+
+#else  /* !IPRT_TARGET_NT4 */
     PRTMPARGS pArgs;
     KDPC     *paExecCpuDpcs;
 
-#if 0
+# if 0
     /* KeFlushQueuedDpcs must be run at IRQL PASSIVE_LEVEL according to MSDN, but the
      * driver verifier doesn't complain...
      */
     AssertMsg(KeGetCurrentIrql() == PASSIVE_LEVEL, ("%d != %d (PASSIVE_LEVEL)\n", KeGetCurrentIrql(), PASSIVE_LEVEL));
-#endif
+# endif
 
-#ifdef IPRT_TARGET_NT4
-    KAFFINITY Mask;
-    /* g_pfnrtNt* are not present on NT anyway. */
-    return VERR_NOT_SUPPORTED;
-#else
     KAFFINITY Mask = KeQueryActiveProcessors();
-#endif
 
     /* KeFlushQueuedDpcs is not present in Windows 2000; import it dynamically so we can just fail this call. */
     if (!g_pfnrtNtKeFlushQueuedDpcs)
@@ -452,18 +453,18 @@ static int rtMpCallUsingDpcs(PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUse
     if (enmCpuid == RT_NT_CPUID_SPECIFIC)
     {
         ASMAtomicIncS32(&pArgs->cRefs);
-        BOOLEAN ret = KeInsertQueueDpc(&paExecCpuDpcs[0], 0, 0);
-        Assert(ret);
+        BOOLEAN fRc = KeInsertQueueDpc(&paExecCpuDpcs[0], 0, 0);
+        Assert(fRc); NOREF(fRc);
     }
     else if (enmCpuid == RT_NT_CPUID_PAIR)
     {
         ASMAtomicIncS32(&pArgs->cRefs);
-        BOOLEAN ret = KeInsertQueueDpc(&paExecCpuDpcs[0], 0, 0);
-        Assert(ret);
+        BOOLEAN fRc = KeInsertQueueDpc(&paExecCpuDpcs[0], 0, 0);
+        Assert(fRc); NOREF(fRc);
 
         ASMAtomicIncS32(&pArgs->cRefs);
-        ret = KeInsertQueueDpc(&paExecCpuDpcs[1], 0, 0);
-        Assert(ret);
+        fRc = KeInsertQueueDpc(&paExecCpuDpcs[1], 0, 0);
+        Assert(fRc); NOREF(fRc);
     }
     else
     {
@@ -475,8 +476,8 @@ static int rtMpCallUsingDpcs(PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUse
                 &&  (Mask & RT_BIT_64(i)))
             {
                 ASMAtomicIncS32(&pArgs->cRefs);
-                BOOLEAN ret = KeInsertQueueDpc(&paExecCpuDpcs[i], 0, 0);
-                Assert(ret);
+                BOOLEAN fRc = KeInsertQueueDpc(&paExecCpuDpcs[i], 0, 0);
+                Assert(fRc); NOREF(fRc);
             }
         }
         if (enmCpuid != RT_NT_CPUID_OTHERS)
@@ -503,6 +504,7 @@ static int rtMpCallUsingDpcs(PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUse
         ExFreePool(pArgs);
 
     return VINF_SUCCESS;
+#endif /* */
 }
 
 
@@ -604,6 +606,8 @@ static VOID rtMpNtOnSpecificDpcWrapper(IN PKDPC Dpc, IN PVOID DeferredContext,
                                        IN PVOID SystemArgument1, IN PVOID SystemArgument2)
 {
     PRTMPNTONSPECIFICARGS pArgs = (PRTMPNTONSPECIFICARGS)DeferredContext;
+    RT_NOREF3(Dpc, SystemArgument1, SystemArgument2);
+
     ASMAtomicWriteBool(&pArgs->fExecuting, true);
 
     pArgs->CallbackArgs.pfnWorker(KeGetCurrentProcessorNumber(), pArgs->CallbackArgs.pvUser1, pArgs->CallbackArgs.pvUser2);
@@ -701,7 +705,7 @@ RTDECL(int) RTMpOnSpecific(RTCPUID idCpu, PFNRTMPWORKER pfnWorker, void *pvUser1
     if (RTMpIsCpuOnline(idCpu))
     {
         BOOLEAN fRc = KeInsertQueueDpc(&pArgs->Dpc, 0, 0);
-        Assert(fRc);
+        Assert(fRc); NOREF(fRc);
         KeLowerIrql(bOldIrql);
 
         uint64_t const nsRealWaitTS = RTTimeNanoTS();
@@ -812,6 +816,7 @@ static ULONG_PTR rtMpIpiGenericCall(ULONG_PTR Argument)
  */
 int rtMpPokeCpuUsingBroadcastIpi(RTCPUID idCpu)
 {
+    NOREF(idCpu);
     g_pfnrtKeIpiGenericCall(rtMpIpiGenericCall, 0);
     return VINF_SUCCESS;
 }
diff --git a/src/VBox/Runtime/r0drv/nt/mpnotification-r0drv-nt.cpp b/src/VBox/Runtime/r0drv/nt/mpnotification-r0drv-nt.cpp
index 113d3c6..6d40c5d 100644
--- a/src/VBox/Runtime/r0drv/nt/mpnotification-r0drv-nt.cpp
+++ b/src/VBox/Runtime/r0drv/nt/mpnotification-r0drv-nt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/nt/ntBldSymDb.cpp b/src/VBox/Runtime/r0drv/nt/ntBldSymDb.cpp
index b1cce4c..b81824c 100644
--- a/src/VBox/Runtime/r0drv/nt/ntBldSymDb.cpp
+++ b/src/VBox/Runtime/r0drv/nt/ntBldSymDb.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -28,7 +28,7 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
-#include <Windows.h>
+#include <iprt/win/windows.h>
 #include <Dbghelp.h>
 
 #include <iprt/alloca.h>
@@ -196,7 +196,7 @@ static void generateHeader(PRTSTREAM pOut)
                  " */\n"
                  "\n"
                  "/*\n"
-                 " * Copyright (C) 2013-2015 Oracle Corporation \n"
+                 " * Copyright (C) 2013-2016 Oracle Corporation \n"
                  " *\n"
                  " * This file is part of VirtualBox Open Source Edition (OSE), as\n"
                  " * available from http://www.virtualbox.org. This file is free software;\n"
@@ -470,6 +470,7 @@ static uint32_t matchUpStructMembers(unsigned cWantedMembers, PMYMEMBER paWanted
 }
 
 
+#if 0
 /**
  * Resets the writable structure members prior to processing a PDB.
  *
@@ -490,6 +491,7 @@ static void resetMyStructs(void)
         }
     }
 }
+#endif
 
 
 /**
@@ -689,6 +691,7 @@ static RTEXITCODE findStructures(HANDLE hFake, uint64_t uModAddr, const char *ps
 }
 
 
+#if 0 /* unused */
 static bool strIEndsWith(const char *pszString, const char *pszSuffix)
 {
     size_t cchString = strlen(pszString);
@@ -697,6 +700,7 @@ static bool strIEndsWith(const char *pszString, const char *pszSuffix)
         return false;
     return RTStrICmp(pszString + cchString - cchSuffix, pszSuffix) == 0;
 }
+#endif
 
 
 /**
@@ -753,7 +757,6 @@ static RTEXITCODE FigurePdbVersionInfo(const char *pszPdb, PRTNTSDBOSVER pVerInf
      *  - Windows_Win8.9200.16384.120725-1247.X86CHK
      *  - en_windows_8_1_symbols_debug_checked_x64_2712568
      */
-    bool fFound = false;
     uint32_t i = u.Split.cComps - 1;
     while (i-- > 0)
     {
@@ -1150,7 +1153,7 @@ int main(int argc, char **argv)
                 break;
 
             case 'V':
-                RTPrintf("$Revision: 102976 $");
+                RTPrintf("$Revision: 109161 $");
                 break;
 
             case 'h':
diff --git a/src/VBox/Runtime/r0drv/nt/process-r0drv-nt.cpp b/src/VBox/Runtime/r0drv/nt/process-r0drv-nt.cpp
index 6d38e0a..3ab5f89 100644
--- a/src/VBox/Runtime/r0drv/nt/process-r0drv-nt.cpp
+++ b/src/VBox/Runtime/r0drv/nt/process-r0drv-nt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -34,7 +34,7 @@
 
 RTDECL(RTPROCESS) RTProcSelf(void)
 {
-    return (RTPROCESS)PsGetCurrentProcessId();
+    return (RTPROCESS)(uintptr_t)PsGetCurrentProcessId();
 }
 
 
diff --git a/src/VBox/Runtime/r0drv/nt/semevent-r0drv-nt.cpp b/src/VBox/Runtime/r0drv/nt/semevent-r0drv-nt.cpp
index 49cd603..aa958b4 100644
--- a/src/VBox/Runtime/r0drv/nt/semevent-r0drv-nt.cpp
+++ b/src/VBox/Runtime/r0drv/nt/semevent-r0drv-nt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -71,6 +71,7 @@ RTDECL(int)  RTSemEventCreateEx(PRTSEMEVENT phEventSem, uint32_t fFlags, RTLOCKV
     AssertReturn(!(fFlags & ~(RTSEMEVENT_FLAGS_NO_LOCK_VAL | RTSEMEVENT_FLAGS_BOOTSTRAP_HACK)), VERR_INVALID_PARAMETER);
     Assert(!(fFlags & RTSEMEVENT_FLAGS_BOOTSTRAP_HACK) || (fFlags & RTSEMEVENT_FLAGS_NO_LOCK_VAL));
     AssertCompile(sizeof(RTSEMEVENTINTERNAL) > sizeof(void *));
+    RT_NOREF2(hClass, pszNameFmt);
 
     PRTSEMEVENTINTERNAL pThis = (PRTSEMEVENTINTERNAL)RTMemAlloc(sizeof(*pThis));
     if (pThis)
@@ -172,6 +173,7 @@ DECLINLINE(int) rtR0SemEventNtWait(PRTSEMEVENTINTERNAL pThis, uint32_t fFlags, u
     AssertPtrReturn(pThis, VERR_INVALID_PARAMETER);
     AssertMsgReturn(pThis->u32Magic == RTSEMEVENT_MAGIC, ("%p u32Magic=%RX32\n", pThis, pThis->u32Magic), VERR_INVALID_PARAMETER);
     AssertReturn(RTSEMWAIT_FLAGS_ARE_VALID(fFlags), VERR_INVALID_PARAMETER);
+    NOREF(pSrcPos);
 
     rtR0SemEventNtRetain(pThis);
 
diff --git a/src/VBox/Runtime/r0drv/nt/semeventmulti-r0drv-nt.cpp b/src/VBox/Runtime/r0drv/nt/semeventmulti-r0drv-nt.cpp
index 2a16d15..9c0b507 100644
--- a/src/VBox/Runtime/r0drv/nt/semeventmulti-r0drv-nt.cpp
+++ b/src/VBox/Runtime/r0drv/nt/semeventmulti-r0drv-nt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -70,6 +70,7 @@ RTDECL(int)  RTSemEventMultiCreateEx(PRTSEMEVENTMULTI phEventMultiSem, uint32_t
                                      const char *pszNameFmt, ...)
 {
     AssertReturn(!(fFlags & ~RTSEMEVENTMULTI_FLAGS_NO_LOCK_VAL), VERR_INVALID_PARAMETER);
+    RT_NOREF2(hClass, pszNameFmt);
 
     AssertCompile(sizeof(RTSEMEVENTMULTIINTERNAL) > sizeof(void *));
     PRTSEMEVENTMULTIINTERNAL pThis = (PRTSEMEVENTMULTIINTERNAL)RTMemAlloc(sizeof(*pThis));
@@ -195,6 +196,7 @@ DECLINLINE(int) rtR0SemEventMultiNtWait(PRTSEMEVENTMULTIINTERNAL pThis, uint32_t
     AssertPtrReturn(pThis, VERR_INVALID_PARAMETER);
     AssertMsgReturn(pThis->u32Magic == RTSEMEVENTMULTI_MAGIC, ("%p u32Magic=%RX32\n", pThis, pThis->u32Magic), VERR_INVALID_PARAMETER);
     AssertReturn(RTSEMWAIT_FLAGS_ARE_VALID(fFlags), VERR_INVALID_PARAMETER);
+    RT_NOREF1(pSrcPos);
 
     rtR0SemEventMultiNtRetain(pThis);
 
diff --git a/src/VBox/Runtime/r0drv/nt/semfastmutex-r0drv-nt.cpp b/src/VBox/Runtime/r0drv/nt/semfastmutex-r0drv-nt.cpp
index cc1c7af..2260355 100644
--- a/src/VBox/Runtime/r0drv/nt/semfastmutex-r0drv-nt.cpp
+++ b/src/VBox/Runtime/r0drv/nt/semfastmutex-r0drv-nt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/nt/semmutex-r0drv-nt.cpp b/src/VBox/Runtime/r0drv/nt/semmutex-r0drv-nt.cpp
index 6848f6a..44f6041 100644
--- a/src/VBox/Runtime/r0drv/nt/semmutex-r0drv-nt.cpp
+++ b/src/VBox/Runtime/r0drv/nt/semmutex-r0drv-nt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -71,6 +71,7 @@ RTDECL(int) RTSemMutexCreateEx(PRTSEMMUTEX phMutexSem, uint32_t fFlags,
                                RTLOCKVALCLASS hClass, uint32_t uSubClass, const char *pszNameFmt, ...)
 {
     AssertReturn(!(fFlags & ~RTSEMMUTEX_FLAGS_NO_LOCK_VAL), VERR_INVALID_PARAMETER);
+    RT_NOREF3(hClass, uSubClass, pszNameFmt);
 
     AssertCompile(sizeof(RTSEMMUTEXINTERNAL) > sizeof(void *));
     PRTSEMMUTEXINTERNAL pThis = (PRTSEMMUTEXINTERNAL)RTMemAlloc(sizeof(*pThis));
@@ -134,6 +135,8 @@ static int rtSemMutexRequest(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies, BOOLEA
 #ifdef RT_USE_FAST_MUTEX
     AssertMsg(cMillies == RT_INDEFINITE_WAIT, ("timeouts are not supported when using fast mutexes!\n"));
     ExAcquireFastMutex(&pThis->Mutex);
+    return VINF_SUCCESS;
+
 #else  /* !RT_USE_FAST_MUTEX */
     NTSTATUS rcNt;
     if (cMillies == RT_INDEFINITE_WAIT)
@@ -165,7 +168,6 @@ static int rtSemMutexRequest(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies, BOOLEA
             return VERR_INTERNAL_ERROR;
     }
 #endif /* !RT_USE_FAST_MUTEX */
-    return VINF_SUCCESS;
 }
 
 
@@ -177,6 +179,7 @@ RTDECL(int) RTSemMutexRequest(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies)
 
 RTDECL(int) RTSemMutexRequestDebug(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
 {
+    RT_NOREF1(uId); RT_SRC_POS_NOREF();
     return RTSemMutexRequest(hMutexSem, cMillies);
 }
 
@@ -189,6 +192,7 @@ RTDECL(int) RTSemMutexRequestNoResume(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillie
 
 RTDECL(int) RTSemMutexRequestNoResumeDebug(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
 {
+    RT_NOREF1(uId); RT_SRC_POS_NOREF();
     return RTSemMutexRequestNoResume(hMutexSem, cMillies);
 }
 
diff --git a/src/VBox/Runtime/r0drv/nt/spinlock-r0drv-nt.cpp b/src/VBox/Runtime/r0drv/nt/spinlock-r0drv-nt.cpp
index 12f57db..5d9b19e 100644
--- a/src/VBox/Runtime/r0drv/nt/spinlock-r0drv-nt.cpp
+++ b/src/VBox/Runtime/r0drv/nt/spinlock-r0drv-nt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -85,6 +85,7 @@ typedef struct RTSPINLOCKINTERNAL
 RTDECL(int)  RTSpinlockCreate(PRTSPINLOCK pSpinlock, uint32_t fFlags, const char *pszName)
 {
     AssertReturn(fFlags == RTSPINLOCK_FLAGS_INTERRUPT_SAFE || fFlags == RTSPINLOCK_FLAGS_INTERRUPT_UNSAFE, VERR_INVALID_PARAMETER);
+    RT_NOREF1(pszName);
 
     /*
      * Allocate.
diff --git a/src/VBox/Runtime/r0drv/nt/symdb.h b/src/VBox/Runtime/r0drv/nt/symdb.h
index bc159da..cf9517d 100644
--- a/src/VBox/Runtime/r0drv/nt/symdb.h
+++ b/src/VBox/Runtime/r0drv/nt/symdb.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/nt/symdbdata.h b/src/VBox/Runtime/r0drv/nt/symdbdata.h
index 8c4b279..cc971f8 100644
--- a/src/VBox/Runtime/r0drv/nt/symdbdata.h
+++ b/src/VBox/Runtime/r0drv/nt/symdbdata.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/nt/the-nt-kernel.h b/src/VBox/Runtime/r0drv/nt/the-nt-kernel.h
index 6ad8896..b171981 100644
--- a/src/VBox/Runtime/r0drv/nt/the-nt-kernel.h
+++ b/src/VBox/Runtime/r0drv/nt/the-nt-kernel.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/nt/thread-r0drv-nt.cpp b/src/VBox/Runtime/r0drv/nt/thread-r0drv-nt.cpp
index dab9845..04c2d4b 100644
--- a/src/VBox/Runtime/r0drv/nt/thread-r0drv-nt.cpp
+++ b/src/VBox/Runtime/r0drv/nt/thread-r0drv-nt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -84,7 +84,7 @@ RTDECL(bool) RTThreadYield(void)
 
 RTDECL(bool) RTThreadPreemptIsEnabled(RTTHREAD hThread)
 {
-    Assert(hThread == NIL_RTTHREAD);
+    Assert(hThread == NIL_RTTHREAD); RT_NOREF1(hThread);
     KIRQL Irql = KeGetCurrentIrql();
     if (Irql > APC_LEVEL)
         return false;
@@ -96,7 +96,7 @@ RTDECL(bool) RTThreadPreemptIsEnabled(RTTHREAD hThread)
 
 RTDECL(bool) RTThreadPreemptIsPending(RTTHREAD hThread)
 {
-    Assert(hThread == NIL_RTTHREAD);
+    Assert(hThread == NIL_RTTHREAD); RT_NOREF1(hThread);
 
     /*
      * Read the globals and check if they are useful.
@@ -139,6 +139,8 @@ RTDECL(bool) RTThreadPreemptIsPending(RTTHREAD hThread)
         uint32_t volatile *pu32QuantumEnd = (uint32_t volatile *)(pbPrcb + offQuantumEnd);
         fPending = *pu32QuantumEnd != 0;
     }
+    else
+        fPending = false;
 
     /* Check DpcQueueDepth. */
     if (    !fPending
diff --git a/src/VBox/Runtime/r0drv/nt/thread2-r0drv-nt.cpp b/src/VBox/Runtime/r0drv/nt/thread2-r0drv-nt.cpp
index 85aacc5..24cb786 100644
--- a/src/VBox/Runtime/r0drv/nt/thread2-r0drv-nt.cpp
+++ b/src/VBox/Runtime/r0drv/nt/thread2-r0drv-nt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -84,6 +84,7 @@ DECLHIDDEN(int) rtThreadNativeSetPriority(PRTTHREADINT pThread, RTTHREADTYPE enm
 
 DECLHIDDEN(int) rtThreadNativeAdopt(PRTTHREADINT pThread)
 {
+    RT_NOREF1(pThread);
     return VERR_NOT_IMPLEMENTED;
 }
 
@@ -92,7 +93,7 @@ DECLHIDDEN(void) rtThreadNativeWaitKludge(PRTTHREADINT pThread)
 {
     PVOID pvThreadObj = pThread->Core.Key;
     NTSTATUS rcNt = KeWaitForSingleObject(pvThreadObj, Executive, KernelMode, FALSE, NULL);
-    AssertMsg(rcNt == STATUS_SUCCESS, ("rcNt=%#x\n", rcNt));
+    AssertMsg(rcNt == STATUS_SUCCESS, ("rcNt=%#x\n", rcNt)); RT_NOREF1(rcNt);
 }
 
 
diff --git a/src/VBox/Runtime/r0drv/nt/time-r0drv-nt.cpp b/src/VBox/Runtime/r0drv/nt/time-r0drv-nt.cpp
index 5e63038..723335b 100644
--- a/src/VBox/Runtime/r0drv/nt/time-r0drv-nt.cpp
+++ b/src/VBox/Runtime/r0drv/nt/time-r0drv-nt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/nt/timer-r0drv-nt.cpp b/src/VBox/Runtime/r0drv/nt/timer-r0drv-nt.cpp
index c826e2d..387d91b 100644
--- a/src/VBox/Runtime/r0drv/nt/timer-r0drv-nt.cpp
+++ b/src/VBox/Runtime/r0drv/nt/timer-r0drv-nt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -129,7 +129,7 @@ static uint64_t rtTimerNtQueryInterruptTime(void)
     {
         InterruptTime.HighPart = ((KUSER_SHARED_DATA volatile *)SharedUserData)->InterruptTime.High1Time;
         InterruptTime.LowPart  = ((KUSER_SHARED_DATA volatile *)SharedUserData)->InterruptTime.LowPart;
-    } while (((KUSER_SHARED_DATA volatile *)SharedUserData)->InterruptTime.High2Time != InterruptTime.HighPart);
+    } while (((KUSER_SHARED_DATA volatile *)SharedUserData)->InterruptTime.High2Time != (LONG)InterruptTime.HighPart);
     return InterruptTime.QuadPart;
 # endif
 }
@@ -150,6 +150,7 @@ DECLINLINE(void) rtTimerNtRearmInternval(PRTTIMER pTimer, uint64_t iTick, PKDPC
 {
 #ifdef RTR0TIMER_NT_MANUAL_RE_ARM
     Assert(pTimer->u64NanoInterval);
+    RT_NOREF1(pMasterDpc);
 
     uint64_t uNtNext = (iTick * pTimer->u64NanoInterval) / 100 - 10; /* 1us fudge */
     LARGE_INTEGER DueTime;
@@ -162,6 +163,8 @@ DECLINLINE(void) rtTimerNtRearmInternval(PRTTIMER pTimer, uint64_t iTick, PKDPC
         DueTime.QuadPart = -2500; /* 0.25ms */
 
     KeSetTimerEx(&pTimer->NtTimer, DueTime, 0, &pTimer->aSubTimers[0].NtDpc);
+#else
+    RT_NOREF3(pTimer, iTick, pMasterDpc);
 #endif
 }
 
@@ -425,6 +428,7 @@ RTDECL(int) RTTimerChangeInterval(PRTTIMER pTimer, uint64_t u64NanoInterval)
 {
     AssertPtrReturn(pTimer, VERR_INVALID_HANDLE);
     AssertReturn(pTimer->u32Magic == RTTIMER_MAGIC, VERR_INVALID_HANDLE);
+    RT_NOREF1(u64NanoInterval);
 
     return VERR_NOT_SUPPORTED;
 }
diff --git a/src/VBox/Runtime/r0drv/nt/toxic-chkstk-r0drv-nt.asm b/src/VBox/Runtime/r0drv/nt/toxic-chkstk-r0drv-nt.asm
index 016f6b6..72e79c7 100644
--- a/src/VBox/Runtime/r0drv/nt/toxic-chkstk-r0drv-nt.asm
+++ b/src/VBox/Runtime/r0drv/nt/toxic-chkstk-r0drv-nt.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/os2/memuserkernel-r0drv-os2.cpp b/src/VBox/Runtime/r0drv/os2/memuserkernel-r0drv-os2.cpp
index d758c0a..3e795cc 100644
--- a/src/VBox/Runtime/r0drv/os2/memuserkernel-r0drv-os2.cpp
+++ b/src/VBox/Runtime/r0drv/os2/memuserkernel-r0drv-os2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/power-r0drv.h b/src/VBox/Runtime/r0drv/power-r0drv.h
index 6181901..ca9283a 100644
--- a/src/VBox/Runtime/r0drv/power-r0drv.h
+++ b/src/VBox/Runtime/r0drv/power-r0drv.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/powernotification-r0drv.c b/src/VBox/Runtime/r0drv/powernotification-r0drv.c
index 1afec3d..92acef3 100644
--- a/src/VBox/Runtime/r0drv/powernotification-r0drv.c
+++ b/src/VBox/Runtime/r0drv/powernotification-r0drv.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/solaris/RTLogWriteDebugger-r0drv-solaris.c b/src/VBox/Runtime/r0drv/solaris/RTLogWriteDebugger-r0drv-solaris.c
index 3a7f721..7ff43cc 100644
--- a/src/VBox/Runtime/r0drv/solaris/RTLogWriteDebugger-r0drv-solaris.c
+++ b/src/VBox/Runtime/r0drv/solaris/RTLogWriteDebugger-r0drv-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/solaris/RTMpPokeCpu-r0drv-solaris.c b/src/VBox/Runtime/r0drv/solaris/RTMpPokeCpu-r0drv-solaris.c
index c8d4f51..e98fa88 100644
--- a/src/VBox/Runtime/r0drv/solaris/RTMpPokeCpu-r0drv-solaris.c
+++ b/src/VBox/Runtime/r0drv/solaris/RTMpPokeCpu-r0drv-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/solaris/alloc-r0drv-solaris.c b/src/VBox/Runtime/r0drv/solaris/alloc-r0drv-solaris.c
index 8b23ca9..68ba92b 100644
--- a/src/VBox/Runtime/r0drv/solaris/alloc-r0drv-solaris.c
+++ b/src/VBox/Runtime/r0drv/solaris/alloc-r0drv-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/solaris/assert-r0drv-solaris.c b/src/VBox/Runtime/r0drv/solaris/assert-r0drv-solaris.c
index 820936c..15aee9d 100644
--- a/src/VBox/Runtime/r0drv/solaris/assert-r0drv-solaris.c
+++ b/src/VBox/Runtime/r0drv/solaris/assert-r0drv-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/solaris/dbgkrnlinfo-r0drv-solaris.c b/src/VBox/Runtime/r0drv/solaris/dbgkrnlinfo-r0drv-solaris.c
index 3379c30..c9c8c35 100644
--- a/src/VBox/Runtime/r0drv/solaris/dbgkrnlinfo-r0drv-solaris.c
+++ b/src/VBox/Runtime/r0drv/solaris/dbgkrnlinfo-r0drv-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/solaris/initterm-r0drv-solaris.c b/src/VBox/Runtime/r0drv/solaris/initterm-r0drv-solaris.c
index 7f05eef..326066e 100644
--- a/src/VBox/Runtime/r0drv/solaris/initterm-r0drv-solaris.c
+++ b/src/VBox/Runtime/r0drv/solaris/initterm-r0drv-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/solaris/memobj-r0drv-solaris.c b/src/VBox/Runtime/r0drv/solaris/memobj-r0drv-solaris.c
index 2b082a3..f9a4eca 100644
--- a/src/VBox/Runtime/r0drv/solaris/memobj-r0drv-solaris.c
+++ b/src/VBox/Runtime/r0drv/solaris/memobj-r0drv-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/solaris/memobj-r0drv-solaris.h b/src/VBox/Runtime/r0drv/solaris/memobj-r0drv-solaris.h
index 24319ce..b88168f 100644
--- a/src/VBox/Runtime/r0drv/solaris/memobj-r0drv-solaris.h
+++ b/src/VBox/Runtime/r0drv/solaris/memobj-r0drv-solaris.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/solaris/memuserkernel-r0drv-solaris.c b/src/VBox/Runtime/r0drv/solaris/memuserkernel-r0drv-solaris.c
index 0568e18..a63284d 100644
--- a/src/VBox/Runtime/r0drv/solaris/memuserkernel-r0drv-solaris.c
+++ b/src/VBox/Runtime/r0drv/solaris/memuserkernel-r0drv-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/solaris/modulestub-r0drv-solaris.c b/src/VBox/Runtime/r0drv/solaris/modulestub-r0drv-solaris.c
index 08dee84..6c9990d 100644
--- a/src/VBox/Runtime/r0drv/solaris/modulestub-r0drv-solaris.c
+++ b/src/VBox/Runtime/r0drv/solaris/modulestub-r0drv-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/solaris/mp-r0drv-solaris.c b/src/VBox/Runtime/r0drv/solaris/mp-r0drv-solaris.c
index 9b736e1..a6c7b58 100644
--- a/src/VBox/Runtime/r0drv/solaris/mp-r0drv-solaris.c
+++ b/src/VBox/Runtime/r0drv/solaris/mp-r0drv-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/solaris/mpnotification-r0drv-solaris.c b/src/VBox/Runtime/r0drv/solaris/mpnotification-r0drv-solaris.c
index 956ca9a..ec81ba3 100644
--- a/src/VBox/Runtime/r0drv/solaris/mpnotification-r0drv-solaris.c
+++ b/src/VBox/Runtime/r0drv/solaris/mpnotification-r0drv-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/solaris/process-r0drv-solaris.c b/src/VBox/Runtime/r0drv/solaris/process-r0drv-solaris.c
index 56a38eb..8d462c3 100644
--- a/src/VBox/Runtime/r0drv/solaris/process-r0drv-solaris.c
+++ b/src/VBox/Runtime/r0drv/solaris/process-r0drv-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/solaris/semevent-r0drv-solaris.c b/src/VBox/Runtime/r0drv/solaris/semevent-r0drv-solaris.c
index 9092bbe..a9c80af 100644
--- a/src/VBox/Runtime/r0drv/solaris/semevent-r0drv-solaris.c
+++ b/src/VBox/Runtime/r0drv/solaris/semevent-r0drv-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/solaris/semeventmulti-r0drv-solaris.c b/src/VBox/Runtime/r0drv/solaris/semeventmulti-r0drv-solaris.c
index a4fab1a..4b0bfe3 100644
--- a/src/VBox/Runtime/r0drv/solaris/semeventmulti-r0drv-solaris.c
+++ b/src/VBox/Runtime/r0drv/solaris/semeventmulti-r0drv-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/solaris/semeventwait-r0drv-solaris.h b/src/VBox/Runtime/r0drv/solaris/semeventwait-r0drv-solaris.h
index caa5be0..0d42004 100644
--- a/src/VBox/Runtime/r0drv/solaris/semeventwait-r0drv-solaris.h
+++ b/src/VBox/Runtime/r0drv/solaris/semeventwait-r0drv-solaris.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/solaris/semfastmutex-r0drv-solaris.c b/src/VBox/Runtime/r0drv/solaris/semfastmutex-r0drv-solaris.c
index 45f05f9..f90d4ba 100644
--- a/src/VBox/Runtime/r0drv/solaris/semfastmutex-r0drv-solaris.c
+++ b/src/VBox/Runtime/r0drv/solaris/semfastmutex-r0drv-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/solaris/semmutex-r0drv-solaris.c b/src/VBox/Runtime/r0drv/solaris/semmutex-r0drv-solaris.c
index 974fd7c..a79d3a4 100644
--- a/src/VBox/Runtime/r0drv/solaris/semmutex-r0drv-solaris.c
+++ b/src/VBox/Runtime/r0drv/solaris/semmutex-r0drv-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/solaris/spinlock-r0drv-solaris.c b/src/VBox/Runtime/r0drv/solaris/spinlock-r0drv-solaris.c
index b5b7c73..d32226c 100644
--- a/src/VBox/Runtime/r0drv/solaris/spinlock-r0drv-solaris.c
+++ b/src/VBox/Runtime/r0drv/solaris/spinlock-r0drv-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/solaris/the-solaris-kernel.h b/src/VBox/Runtime/r0drv/solaris/the-solaris-kernel.h
index 3874aee..86030ae 100644
--- a/src/VBox/Runtime/r0drv/solaris/the-solaris-kernel.h
+++ b/src/VBox/Runtime/r0drv/solaris/the-solaris-kernel.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/solaris/thread-r0drv-solaris.c b/src/VBox/Runtime/r0drv/solaris/thread-r0drv-solaris.c
index 6ea692c..d8a455d 100644
--- a/src/VBox/Runtime/r0drv/solaris/thread-r0drv-solaris.c
+++ b/src/VBox/Runtime/r0drv/solaris/thread-r0drv-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/solaris/thread2-r0drv-solaris.c b/src/VBox/Runtime/r0drv/solaris/thread2-r0drv-solaris.c
index 7defa8c..bdf7d86 100644
--- a/src/VBox/Runtime/r0drv/solaris/thread2-r0drv-solaris.c
+++ b/src/VBox/Runtime/r0drv/solaris/thread2-r0drv-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/solaris/threadctxhooks-r0drv-solaris.c b/src/VBox/Runtime/r0drv/solaris/threadctxhooks-r0drv-solaris.c
index 2129e51..7349e4f 100644
--- a/src/VBox/Runtime/r0drv/solaris/threadctxhooks-r0drv-solaris.c
+++ b/src/VBox/Runtime/r0drv/solaris/threadctxhooks-r0drv-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/solaris/time-r0drv-solaris.c b/src/VBox/Runtime/r0drv/solaris/time-r0drv-solaris.c
index e82e9bf..5419cbe 100644
--- a/src/VBox/Runtime/r0drv/solaris/time-r0drv-solaris.c
+++ b/src/VBox/Runtime/r0drv/solaris/time-r0drv-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r0drv/solaris/timer-r0drv-solaris.c b/src/VBox/Runtime/r0drv/solaris/timer-r0drv-solaris.c
index d975328..995a8ab 100644
--- a/src/VBox/Runtime/r0drv/solaris/timer-r0drv-solaris.c
+++ b/src/VBox/Runtime/r0drv/solaris/timer-r0drv-solaris.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/alloc-ef-cpp.cpp b/src/VBox/Runtime/r3/alloc-ef-cpp.cpp
index 3d23aa0..0058747 100644
--- a/src/VBox/Runtime/r3/alloc-ef-cpp.cpp
+++ b/src/VBox/Runtime/r3/alloc-ef-cpp.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/alloc-ef.cpp b/src/VBox/Runtime/r3/alloc-ef.cpp
index 27e3d85..7bb6a08 100644
--- a/src/VBox/Runtime/r3/alloc-ef.cpp
+++ b/src/VBox/Runtime/r3/alloc-ef.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/alloc-ef.h b/src/VBox/Runtime/r3/alloc-ef.h
index e3a4611..6fcda53 100644
--- a/src/VBox/Runtime/r3/alloc-ef.h
+++ b/src/VBox/Runtime/r3/alloc-ef.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -133,7 +133,7 @@
 *   Header Files                                                               *
 *******************************************************************************/
 #ifdef RT_OS_WINDOWS
-# include <Windows.h>
+# include <iprt/win/windows.h>
 #else
 # include <sys/mman.h>
 #endif
diff --git a/src/VBox/Runtime/r3/alloc.cpp b/src/VBox/Runtime/r3/alloc.cpp
index f236879..e245403 100644
--- a/src/VBox/Runtime/r3/alloc.cpp
+++ b/src/VBox/Runtime/r3/alloc.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/allocex.cpp b/src/VBox/Runtime/r3/allocex.cpp
index 61b71bc..d523a41 100644
--- a/src/VBox/Runtime/r3/allocex.cpp
+++ b/src/VBox/Runtime/r3/allocex.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -40,6 +40,8 @@
 
 RTDECL(int) RTMemAllocExTag(size_t cb, size_t cbAlignment, uint32_t fFlags, const char *pszTag, void **ppv) RT_NO_THROW_DEF
 {
+    RT_NOREF_PV(pszTag);
+
     /*
      * Validate and adjust input.
      */
@@ -113,7 +115,7 @@ RTDECL(void) RTMemFreeEx(void *pv, size_t cb) RT_NO_THROW_DEF
     PRTMEMHDRR3 pHdr = (PRTMEMHDRR3)pv - 1;
     AssertMsg(pHdr->u32Magic == RTMEMHDR_MAGIC, ("pHdr->u32Magic=%RX32 pv=%p cb=%#x\n", pHdr->u32Magic, pv, cb));
     pHdr->u32Magic = RTMEMHDR_MAGIC_DEAD;
-    Assert(pHdr->cbReq == cb);
+    Assert(pHdr->cbReq == cb); RT_NOREF_PV(cb);
 
     if (pHdr->fFlags & (RTMEMALLOCEX_FLAGS_16BIT_REACH | RTMEMALLOCEX_FLAGS_32BIT_REACH))
         rtMemFreeExYyBitReach(pHdr, pHdr->cb + sizeof(*pHdr), pHdr->fFlags);
diff --git a/src/VBox/Runtime/r3/allocex.h b/src/VBox/Runtime/r3/allocex.h
index 178e9a1..073e79d 100644
--- a/src/VBox/Runtime/r3/allocex.h
+++ b/src/VBox/Runtime/r3/allocex.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/darwin/RTCrStoreCreateSnapshotById-darwin.cpp b/src/VBox/Runtime/r3/darwin/RTCrStoreCreateSnapshotById-darwin.cpp
index bc40507..57aa639 100644
--- a/src/VBox/Runtime/r3/darwin/RTCrStoreCreateSnapshotById-darwin.cpp
+++ b/src/VBox/Runtime/r3/darwin/RTCrStoreCreateSnapshotById-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -57,7 +57,7 @@ static bool rtCrStoreIsDarwinCertTrustworthy(SecCertificateRef hCert, SecTrustSe
     OSStatus orc = SecTrustSettingsCopyTrustSettings(hCert, enmTrustDomain, &hTrustSettings);
     if (orc == noErr)
     {
-	CFIndex const cTrustSettings = CFArrayGetCount(hTrustSettings);
+        CFIndex const cTrustSettings = CFArrayGetCount(hTrustSettings);
         for (CFIndex i = 0; i < cTrustSettings; i++)
         {
             CFDictionaryRef hDict = (CFDictionaryRef)CFArrayGetValueAtIndex(hTrustSettings, i);
@@ -246,4 +246,3 @@ RTDECL(int) RTCrStoreCreateSnapshotById(PRTCRSTORE phStore, RTCRSTOREID enmStore
 }
 RT_EXPORT_SYMBOL(RTCrStoreCreateSnapshotById);
 
-
diff --git a/src/VBox/Runtime/r3/darwin/RTPathUserDocuments-darwin.cpp b/src/VBox/Runtime/r3/darwin/RTPathUserDocuments-darwin.cpp
index b4e0604..c0adf5b 100644
--- a/src/VBox/Runtime/r3/darwin/RTPathUserDocuments-darwin.cpp
+++ b/src/VBox/Runtime/r3/darwin/RTPathUserDocuments-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/darwin/RTSystemQueryDmiString-darwin.cpp b/src/VBox/Runtime/r3/darwin/RTSystemQueryDmiString-darwin.cpp
index bbd9d4a..d3d657c 100644
--- a/src/VBox/Runtime/r3/darwin/RTSystemQueryDmiString-darwin.cpp
+++ b/src/VBox/Runtime/r3/darwin/RTSystemQueryDmiString-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/darwin/filelock-darwin.cpp b/src/VBox/Runtime/r3/darwin/filelock-darwin.cpp
index 662a16a..a42e67d 100644
--- a/src/VBox/Runtime/r3/darwin/filelock-darwin.cpp
+++ b/src/VBox/Runtime/r3/darwin/filelock-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/darwin/mp-darwin.cpp b/src/VBox/Runtime/r3/darwin/mp-darwin.cpp
index 9d7c616..45d76e7 100644
--- a/src/VBox/Runtime/r3/darwin/mp-darwin.cpp
+++ b/src/VBox/Runtime/r3/darwin/mp-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -77,6 +77,8 @@ static RTCPUID rtMpDarwinMaxPhysicalCpus(void)
     return 1;
 }
 
+
+#if 0 /* unused */
 /**
  * Internal worker that determines the current number of logical CPUs (hyperthreads).
  *
@@ -92,6 +94,8 @@ static RTCPUID rtMpDarwinOnlineLogicalCpus(void)
     AssertFailed();
     return 1;
 }
+#endif /* unused */
+
 
 /**
  * Internal worker that determines the current number of physical CPUs.
diff --git a/src/VBox/Runtime/r3/darwin/pathhost-darwin.cpp b/src/VBox/Runtime/r3/darwin/pathhost-darwin.cpp
index 1cba7fc..f45ba7b 100644
--- a/src/VBox/Runtime/r3/darwin/pathhost-darwin.cpp
+++ b/src/VBox/Runtime/r3/darwin/pathhost-darwin.cpp
@@ -8,7 +8,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/darwin/rtProcInitExePath-darwin.cpp b/src/VBox/Runtime/r3/darwin/rtProcInitExePath-darwin.cpp
index d110edc..0b6636b 100644
--- a/src/VBox/Runtime/r3/darwin/rtProcInitExePath-darwin.cpp
+++ b/src/VBox/Runtime/r3/darwin/rtProcInitExePath-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/darwin/sched-darwin.cpp b/src/VBox/Runtime/r3/darwin/sched-darwin.cpp
index ad1c454..c03b155 100644
--- a/src/VBox/Runtime/r3/darwin/sched-darwin.cpp
+++ b/src/VBox/Runtime/r3/darwin/sched-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/darwin/systemmem-darwin.cpp b/src/VBox/Runtime/r3/darwin/systemmem-darwin.cpp
index 9c48589..c436fd7 100644
--- a/src/VBox/Runtime/r3/darwin/systemmem-darwin.cpp
+++ b/src/VBox/Runtime/r3/darwin/systemmem-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/darwin/time-darwin.cpp b/src/VBox/Runtime/r3/darwin/time-darwin.cpp
index 179e9c5..3299603 100644
--- a/src/VBox/Runtime/r3/darwin/time-darwin.cpp
+++ b/src/VBox/Runtime/r3/darwin/time-darwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/dir.cpp b/src/VBox/Runtime/r3/dir.cpp
index d8ea168..aa7ea99 100644
--- a/src/VBox/Runtime/r3/dir.cpp
+++ b/src/VBox/Runtime/r3/dir.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -655,6 +655,7 @@ RTDECL(int) RTDirOpenFiltered(PRTDIR *ppDir, const char *pszPath, RTDIRFILTER en
      */
     AssertMsgReturn(VALID_PTR(ppDir), ("%p\n", ppDir), VERR_INVALID_POINTER);
     AssertMsgReturn(VALID_PTR(pszPath), ("%p\n", pszPath), VERR_INVALID_POINTER);
+    AssertReturn(!(fOpen & ~RTDIROPEN_FLAGS_NO_SYMLINKS), VERR_INVALID_FLAGS);
     switch (enmFilter)
     {
         case RTDIRFILTER_UNIX:
diff --git a/src/VBox/Runtime/r3/dir2.cpp b/src/VBox/Runtime/r3/dir2.cpp
index 82b1048..26abedf 100644
--- a/src/VBox/Runtime/r3/dir2.cpp
+++ b/src/VBox/Runtime/r3/dir2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/fileio.cpp b/src/VBox/Runtime/r3/fileio.cpp
index 2be0f17..19fe6fe 100644
--- a/src/VBox/Runtime/r3/fileio.cpp
+++ b/src/VBox/Runtime/r3/fileio.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/freebsd/fileaio-freebsd.cpp b/src/VBox/Runtime/r3/freebsd/fileaio-freebsd.cpp
index e8f8934..e89cbcb 100644
--- a/src/VBox/Runtime/r3/freebsd/fileaio-freebsd.cpp
+++ b/src/VBox/Runtime/r3/freebsd/fileaio-freebsd.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/freebsd/mp-freebsd.cpp b/src/VBox/Runtime/r3/freebsd/mp-freebsd.cpp
index 9212c10..edaf931 100644
--- a/src/VBox/Runtime/r3/freebsd/mp-freebsd.cpp
+++ b/src/VBox/Runtime/r3/freebsd/mp-freebsd.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/freebsd/rtProcInitExePath-freebsd.cpp b/src/VBox/Runtime/r3/freebsd/rtProcInitExePath-freebsd.cpp
index 4161fb5..82721fc 100644
--- a/src/VBox/Runtime/r3/freebsd/rtProcInitExePath-freebsd.cpp
+++ b/src/VBox/Runtime/r3/freebsd/rtProcInitExePath-freebsd.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/freebsd/systemmem-freebsd.cpp b/src/VBox/Runtime/r3/freebsd/systemmem-freebsd.cpp
index 2c27339..4ece858 100644
--- a/src/VBox/Runtime/r3/freebsd/systemmem-freebsd.cpp
+++ b/src/VBox/Runtime/r3/freebsd/systemmem-freebsd.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/fs.cpp b/src/VBox/Runtime/r3/fs.cpp
index 1076f4d..783cbdc 100644
--- a/src/VBox/Runtime/r3/fs.cpp
+++ b/src/VBox/Runtime/r3/fs.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/generic/allocex-r3-generic.cpp b/src/VBox/Runtime/r3/generic/allocex-r3-generic.cpp
index 1d5d3f3..d96c17c 100644
--- a/src/VBox/Runtime/r3/generic/allocex-r3-generic.cpp
+++ b/src/VBox/Runtime/r3/generic/allocex-r3-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -40,18 +40,21 @@
 
 DECLHIDDEN(int) rtMemAllocEx16BitReach(size_t cbAlloc, uint32_t fFlags, void **ppv)
 {
+    RT_NOREF(cbAlloc, fFlags, ppv);
     return VERR_NOT_SUPPORTED;
 }
 
 
 DECLHIDDEN(int) rtMemAllocEx32BitReach(size_t cbAlloc, uint32_t fFlags, void **ppv)
 {
+    RT_NOREF(cbAlloc, fFlags, ppv);
     return VERR_NOT_SUPPORTED;
 }
 
 
 DECLHIDDEN(void) rtMemFreeExYyBitReach(void *pv, size_t cb, uint32_t fFlags)
 {
+    RT_NOREF(pv, cb, fFlags);
     AssertFailed();
 }
 
diff --git a/src/VBox/Runtime/r3/generic/semspinmutex-r3-generic.cpp b/src/VBox/Runtime/r3/generic/semspinmutex-r3-generic.cpp
index cd8221c..2f2df0d 100644
--- a/src/VBox/Runtime/r3/generic/semspinmutex-r3-generic.cpp
+++ b/src/VBox/Runtime/r3/generic/semspinmutex-r3-generic.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Devices/Audio_old/Makefile.kup b/src/VBox/Runtime/r3/haiku/Makefile.kup
similarity index 100%
copy from src/VBox/Devices/Audio_old/Makefile.kup
copy to src/VBox/Runtime/r3/haiku/Makefile.kup
diff --git a/src/VBox/Runtime/r3/haiku/rtProcInitExePath-haiku.cpp b/src/VBox/Runtime/r3/haiku/rtProcInitExePath-haiku.cpp
index 1468b86..c8eb7ad 100644
--- a/src/VBox/Runtime/r3/haiku/rtProcInitExePath-haiku.cpp
+++ b/src/VBox/Runtime/r3/haiku/rtProcInitExePath-haiku.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/haiku/time-haiku.cpp b/src/VBox/Runtime/r3/haiku/time-haiku.cpp
index ffb6d12..90a62f2 100644
--- a/src/VBox/Runtime/r3/haiku/time-haiku.cpp
+++ b/src/VBox/Runtime/r3/haiku/time-haiku.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/init.cpp b/src/VBox/Runtime/r3/init.cpp
index 49660ba..adb99be 100644
--- a/src/VBox/Runtime/r3/init.cpp
+++ b/src/VBox/Runtime/r3/init.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -33,7 +33,7 @@
 
 #ifdef RT_OS_WINDOWS
 # include <process.h>
-# include <Windows.h>
+# include <iprt/win/windows.h>
 #else
 # include <unistd.h>
 # ifndef RT_OS_OS2
@@ -142,12 +142,12 @@ RTDATADECL(bool) g_fRTAlignmentChecks = false;
 #endif
 
 
-#if defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD) || defined(RT_OS_HAIKU) \
+#if defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD) || defined(RT_OS_NETBSD) || defined(RT_OS_HAIKU) \
  || defined(RT_OS_LINUX)  || defined(RT_OS_OS2)     || defined(RT_OS_SOLARIS) /** @todo add host init hooks everywhere. */
 /* Stubs */
-DECLHIDDEN(int)  rtR3InitNativeFirst(uint32_t fFlags) { return VINF_SUCCESS; }
-DECLHIDDEN(int)  rtR3InitNativeFinal(uint32_t fFlags) { return VINF_SUCCESS; }
-DECLHIDDEN(void) rtR3InitNativeObtrusive(uint32_t fFlags) { }
+DECLHIDDEN(int)  rtR3InitNativeFirst(uint32_t fFlags)     { RT_NOREF_PV(fFlags); return VINF_SUCCESS; }
+DECLHIDDEN(int)  rtR3InitNativeFinal(uint32_t fFlags)     { RT_NOREF_PV(fFlags); return VINF_SUCCESS; }
+DECLHIDDEN(void) rtR3InitNativeObtrusive(uint32_t fFlags) { RT_NOREF_PV(fFlags); }
 #endif
 
 
diff --git a/src/VBox/Runtime/r3/init.h b/src/VBox/Runtime/r3/init.h
index abd3298..73f3477 100644
--- a/src/VBox/Runtime/r3/init.h
+++ b/src/VBox/Runtime/r3/init.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/isofs.cpp b/src/VBox/Runtime/r3/isofs.cpp
index 83f8999..1019632 100644
--- a/src/VBox/Runtime/r3/isofs.cpp
+++ b/src/VBox/Runtime/r3/isofs.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/linux/RTProcIsRunningByName-linux.cpp b/src/VBox/Runtime/r3/linux/RTProcIsRunningByName-linux.cpp
index d6fd711..89363ab 100644
--- a/src/VBox/Runtime/r3/linux/RTProcIsRunningByName-linux.cpp
+++ b/src/VBox/Runtime/r3/linux/RTProcIsRunningByName-linux.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/linux/RTSystemQueryDmiString-linux.cpp b/src/VBox/Runtime/r3/linux/RTSystemQueryDmiString-linux.cpp
index d51a8ab..38080df 100644
--- a/src/VBox/Runtime/r3/linux/RTSystemQueryDmiString-linux.cpp
+++ b/src/VBox/Runtime/r3/linux/RTSystemQueryDmiString-linux.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/linux/RTSystemShutdown-linux.cpp b/src/VBox/Runtime/r3/linux/RTSystemShutdown-linux.cpp
index 2d00928..5ec2a15 100644
--- a/src/VBox/Runtime/r3/linux/RTSystemShutdown-linux.cpp
+++ b/src/VBox/Runtime/r3/linux/RTSystemShutdown-linux.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/linux/RTThreadGetNativeState-linux.cpp b/src/VBox/Runtime/r3/linux/RTThreadGetNativeState-linux.cpp
index 10e68a2..19063d8 100644
--- a/src/VBox/Runtime/r3/linux/RTThreadGetNativeState-linux.cpp
+++ b/src/VBox/Runtime/r3/linux/RTThreadGetNativeState-linux.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/linux/fileaio-linux.cpp b/src/VBox/Runtime/r3/linux/fileaio-linux.cpp
index 18e1311..1e3e4ef 100644
--- a/src/VBox/Runtime/r3/linux/fileaio-linux.cpp
+++ b/src/VBox/Runtime/r3/linux/fileaio-linux.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/linux/mp-linux.cpp b/src/VBox/Runtime/r3/linux/mp-linux.cpp
index 3807e39..7f4da6b 100644
--- a/src/VBox/Runtime/r3/linux/mp-linux.cpp
+++ b/src/VBox/Runtime/r3/linux/mp-linux.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/linux/rtProcInitExePath-linux.cpp b/src/VBox/Runtime/r3/linux/rtProcInitExePath-linux.cpp
index 7d8a171..ea6eb43 100644
--- a/src/VBox/Runtime/r3/linux/rtProcInitExePath-linux.cpp
+++ b/src/VBox/Runtime/r3/linux/rtProcInitExePath-linux.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/linux/sched-linux.cpp b/src/VBox/Runtime/r3/linux/sched-linux.cpp
index 358ffb3..9deb64d 100644
--- a/src/VBox/Runtime/r3/linux/sched-linux.cpp
+++ b/src/VBox/Runtime/r3/linux/sched-linux.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -588,7 +588,7 @@ DECLHIDDEN(int) rtThreadNativeSetPriority(PRTTHREADINT pThread, RTTHREADTYPE enm
     /* sanity */
     Assert(enmType > RTTHREADTYPE_INVALID && enmType < RTTHREADTYPE_END);
     Assert(enmType == g_pProcessPriority->paTypes[enmType].enmType);
-    Assert((pthread_t)pThread->Core.Key == pthread_self());
+    Assert((pthread_t)pThread->Core.Key == pthread_self()); RT_NOREF_PV(pThread);
 
     /*
      * Calculate the thread priority and apply it.
diff --git a/src/VBox/Runtime/r3/linux/semevent-linux.cpp b/src/VBox/Runtime/r3/linux/semevent-linux.cpp
index 01cdde1..5f22e21 100644
--- a/src/VBox/Runtime/r3/linux/semevent-linux.cpp
+++ b/src/VBox/Runtime/r3/linux/semevent-linux.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -159,6 +159,8 @@ RTDECL(int)  RTSemEventCreateEx(PRTSEMEVENT phEventSem, uint32_t fFlags, RTLOCKV
             va_end(va);
         }
         pThis->fEverHadSignallers = false;
+#else
+        RT_NOREF(hClass, pszNameFmt);
 #endif
 
         *phEventSem = pThis;
@@ -239,7 +241,9 @@ RTDECL(int)  RTSemEventSignal(RTSEMEVENT hEventSem)
 
 static int rtSemEventWait(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies, bool fAutoResume)
 {
+#ifdef RTSEMEVENT_STRICT
     PCRTLOCKVALSRCPOS pSrcPos = NULL;
+#endif
 
     /*
      * Validate input.
@@ -375,6 +379,8 @@ RTDECL(void) RTSemEventSetSignaller(RTSEMEVENT hEventSem, RTTHREAD hThread)
 
     ASMAtomicWriteBool(&pThis->fEverHadSignallers, true);
     RTLockValidatorRecSharedResetOwner(&pThis->Signallers, hThread, NULL);
+#else
+    RT_NOREF(hEventSem, hThread);
 #endif
 }
 
@@ -388,6 +394,8 @@ RTDECL(void) RTSemEventAddSignaller(RTSEMEVENT hEventSem, RTTHREAD hThread)
 
     ASMAtomicWriteBool(&pThis->fEverHadSignallers, true);
     RTLockValidatorRecSharedAddOwner(&pThis->Signallers, hThread, NULL);
+#else
+    RT_NOREF(hEventSem, hThread);
 #endif
 }
 
@@ -400,6 +408,8 @@ RTDECL(void) RTSemEventRemoveSignaller(RTSEMEVENT hEventSem, RTTHREAD hThread)
     AssertReturnVoid(pThis->iMagic == RTSEMEVENT_MAGIC);
 
     RTLockValidatorRecSharedRemoveOwner(&pThis->Signallers, hThread);
+#else
+    RT_NOREF(hEventSem, hThread);
 #endif
 }
 
diff --git a/src/VBox/Runtime/r3/linux/semeventmulti-linux.cpp b/src/VBox/Runtime/r3/linux/semeventmulti-linux.cpp
index d191d0a..a2bdda0 100644
--- a/src/VBox/Runtime/r3/linux/semeventmulti-linux.cpp
+++ b/src/VBox/Runtime/r3/linux/semeventmulti-linux.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -152,6 +152,8 @@ RTDECL(int)  RTSemEventMultiCreateEx(PRTSEMEVENTMULTI phEventMultiSem, uint32_t
             va_end(va);
         }
         pThis->fEverHadSignallers = false;
+#else
+        RT_NOREF(hClass, pszNameFmt);
 #endif
 
         *phEventMultiSem = pThis;
@@ -252,6 +254,8 @@ RTDECL(int)  RTSemEventMultiReset(RTSEMEVENTMULTI hEventMultiSem)
 DECLINLINE(int) rtSemEventLnxMultiWait(struct RTSEMEVENTMULTIINTERNAL *pThis, uint32_t fFlags, uint64_t uTimeout,
                                        PCRTLOCKVALSRCPOS pSrcPos)
 {
+    RT_NOREF(pSrcPos);
+
     /*
      * Validate input.
      */
@@ -411,6 +415,8 @@ RTDECL(void) RTSemEventMultiSetSignaller(RTSEMEVENTMULTI hEventMultiSem, RTTHREA
 
     ASMAtomicWriteBool(&pThis->fEverHadSignallers, true);
     RTLockValidatorRecSharedResetOwner(&pThis->Signallers, hThread, NULL);
+#else
+    RT_NOREF(hEventMultiSem, hThread);
 #endif
 }
 
@@ -424,6 +430,8 @@ RTDECL(void) RTSemEventMultiAddSignaller(RTSEMEVENTMULTI hEventMultiSem, RTTHREA
 
     ASMAtomicWriteBool(&pThis->fEverHadSignallers, true);
     RTLockValidatorRecSharedAddOwner(&pThis->Signallers, hThread, NULL);
+#else
+    RT_NOREF(hEventMultiSem, hThread);
 #endif
 }
 
@@ -436,6 +444,8 @@ RTDECL(void) RTSemEventMultiRemoveSignaller(RTSEMEVENTMULTI hEventMultiSem, RTTH
     AssertReturnVoid(pThis->u32Magic == RTSEMEVENTMULTI_MAGIC);
 
     RTLockValidatorRecSharedRemoveOwner(&pThis->Signallers, hThread);
+#else
+    RT_NOREF(hEventMultiSem, hThread);
 #endif
 }
 
diff --git a/src/VBox/Runtime/r3/linux/semmutex-linux.cpp b/src/VBox/Runtime/r3/linux/semmutex-linux.cpp
index b42c0c1..c02b24b 100644
--- a/src/VBox/Runtime/r3/linux/semmutex-linux.cpp
+++ b/src/VBox/Runtime/r3/linux/semmutex-linux.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -137,6 +137,8 @@ RTDECL(int) RTSemMutexCreateEx(PRTSEMMUTEX phMutexSem, uint32_t fFlags,
                                         !(fFlags & RTSEMMUTEX_FLAGS_NO_LOCK_VAL), pszNameFmt, va);
             va_end(va);
         }
+#else
+        RT_NOREF(hClass, uSubClass, pszNameFmt);
 #endif
 
         *phMutexSem = pThis;
@@ -195,6 +197,7 @@ RTDECL(uint32_t) RTSemMutexSetSubClass(RTSEMMUTEX hMutexSem, uint32_t uSubClass)
 
     return RTLockValidatorRecExclSetSubClass(&pThis->ValidatorRec, uSubClass);
 #else
+    RT_NOREF(hMutexSem, uSubClass);
     return RTLOCKVAL_SUB_CLASS_INVALID;
 #endif
 }
@@ -202,6 +205,8 @@ RTDECL(uint32_t) RTSemMutexSetSubClass(RTSEMMUTEX hMutexSem, uint32_t uSubClass)
 
 DECL_FORCE_INLINE(int) rtSemMutexRequest(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies, bool fAutoResume, PCRTLOCKVALSRCPOS pSrcPos)
 {
+    RT_NOREF(pSrcPos);
+
     /*
      * Validate input.
      */
diff --git a/src/VBox/Runtime/r3/linux/systemmem-linux.cpp b/src/VBox/Runtime/r3/linux/systemmem-linux.cpp
index 3607c3b..a5ce7a3 100644
--- a/src/VBox/Runtime/r3/linux/systemmem-linux.cpp
+++ b/src/VBox/Runtime/r3/linux/systemmem-linux.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/linux/thread-affinity-linux.cpp b/src/VBox/Runtime/r3/linux/thread-affinity-linux.cpp
index 30d7209..8ade765 100644
--- a/src/VBox/Runtime/r3/linux/thread-affinity-linux.cpp
+++ b/src/VBox/Runtime/r3/linux/thread-affinity-linux.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/linux/time-linux.cpp b/src/VBox/Runtime/r3/linux/time-linux.cpp
index 6532cd2..940963e 100644
--- a/src/VBox/Runtime/r3/linux/time-linux.cpp
+++ b/src/VBox/Runtime/r3/linux/time-linux.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/memsafer-r3.cpp b/src/VBox/Runtime/r3/memsafer-r3.cpp
index 0c7a2f4..c892033 100644
--- a/src/VBox/Runtime/r3/memsafer-r3.cpp
+++ b/src/VBox/Runtime/r3/memsafer-r3.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -113,6 +113,8 @@ static uintptr_t    g_cMemSaferPtrScramblerRotate;
  */
 static DECLCALLBACK(int32_t) rtMemSaferOnceInit(void *pvUserIgnore)
 {
+    RT_NOREF_PV(pvUserIgnore);
+
     g_uMemSaferScramblerXor = (uintptr_t)RTRandU64();
     g_uMemSaferPtrScramblerXor = (uintptr_t)RTRandU64();
     g_cMemSaferPtrScramblerRotate = RTRandU32Ex(0, ARCH_BITS - 1);
@@ -125,6 +127,8 @@ static DECLCALLBACK(int32_t) rtMemSaferOnceInit(void *pvUserIgnore)
  */
 static DECLCALLBACK(void) rtMemSaferOnceTerm(void *pvUser, bool fLazyCleanUpOk)
 {
+    RT_NOREF_PV(pvUser);
+
     if (!fLazyCleanUpOk)
     {
         RTCritSectRwDelete(&g_MemSaferCritSect);
@@ -160,7 +164,7 @@ static void rtMemSaferNodeInsert(PRTMEMSAFERNODE pThis)
     pThis->Core.Key = rtMemSaferScramblePointer(pThis->Core.Key);
     bool fRc = RTAvlPVInsert(&g_pMemSaferTree, &pThis->Core);
     RTCritSectRwLeaveExcl(&g_MemSaferCritSect);
-    Assert(fRc);
+    Assert(fRc); NOREF(fRc);
 }
 
 
@@ -313,7 +317,9 @@ static int rtMemSaferSupR3AllocPages(PRTMEMSAFERNODE pThis)
 #endif
     }
     return rc;
+
 #else  /* !IN_SUP_R3 */
+    RT_NOREF_PV(pThis);
     return VERR_NOT_SUPPORTED;
 #endif /* !IN_SUP_R3 */
 }
@@ -361,6 +367,8 @@ static int rtMemSaferMemAllocPages(PRTMEMSAFERNODE pThis)
 
 RTDECL(int) RTMemSaferAllocZExTag(void **ppvNew, size_t cb, uint32_t fFlags, const char *pszTag) RT_NO_THROW_DEF
 {
+    RT_NOREF_PV(pszTag);
+
     /*
      * Validate input.
      */
diff --git a/src/VBox/Devices/Audio_old/Makefile.kup b/src/VBox/Runtime/r3/netbsd/Makefile.kup
similarity index 100%
rename from src/VBox/Devices/Audio_old/Makefile.kup
rename to src/VBox/Runtime/r3/netbsd/Makefile.kup
diff --git a/src/VBox/Runtime/r3/netbsd/rtProcInitExePath-netbsd.cpp b/src/VBox/Runtime/r3/netbsd/rtProcInitExePath-netbsd.cpp
new file mode 100644
index 0000000..6131a62
--- /dev/null
+++ b/src/VBox/Runtime/r3/netbsd/rtProcInitExePath-netbsd.cpp
@@ -0,0 +1,100 @@
+/* $Id: rtProcInitExePath-netbsd.cpp $ */
+/** @file
+ * IPRT - rtProcInitName, NetBSD.
+ */
+
+/*
+ * Copyright (C) 2006-2010 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#define LOG_GROUP RTLOGGROUP_PROCESS
+#include <sys/param.h>
+#include <sys/sysctl.h>
+#include <unistd.h>
+#include <errno.h>
+#include <dlfcn.h>
+#include <link.h>
+
+#include <iprt/string.h>
+#include <iprt/assert.h>
+#include <iprt/err.h>
+#include <iprt/path.h>
+#include "internal/process.h"
+#include "internal/path.h"
+
+
+DECLHIDDEN(int) rtProcInitExePath(char *pszPath, size_t cchPath)
+{
+    /*
+     * Read the /proc/curproc/file link, convert to native and return it.
+     */
+    int cchLink = readlink("/proc/curproc/exe", pszPath, cchPath - 1);
+    if (cchLink > 0 && (size_t)cchLink <= cchPath - 1)
+    {
+        pszPath[cchLink] = '\0';
+
+        char const *pszTmp;
+        int rc = rtPathFromNative(&pszTmp, pszPath, NULL);
+        AssertMsgRCReturn(rc, ("rc=%Rrc pszLink=\"%s\"\nhex: %.*Rhxs\n", rc, pszPath, cchLink, pszPath), rc);
+        if (pszTmp != pszPath)
+        {
+            rc = RTStrCopy(pszPath, cchPath, pszTmp);
+            rtPathFreeIprt(pszTmp, pszPath);
+        }
+        return rc;
+    }
+
+    int err = errno;
+
+    /*
+     * Fall back on the dynamic linker since /proc is optional.
+     */
+    void *hExe = dlopen(NULL, 0);
+    if (hExe)
+    {
+        struct link_map const *pLinkMap = 0;
+        if (dlinfo(hExe, RTLD_DI_LINKMAP, &pLinkMap) == 0)
+        {
+            const char *pszImageName = pLinkMap->l_name;
+            if (*pszImageName == '/') /* this may not always be absolute, despite the docs. :-( */
+            {
+                char const *pszTmp;
+                int rc = rtPathFromNative(&pszTmp, pszImageName, NULL);
+                AssertMsgRCReturn(rc, ("rc=%Rrc pszImageName=\"%s\"\n", rc, pszImageName), rc);
+                if (pszTmp != pszPath)
+                {
+                    rc = RTStrCopy(pszPath, cchPath, pszTmp);
+                    rtPathFreeIprt(pszTmp, pszPath);
+                }
+                return rc;
+            }
+            /** @todo Try search the PATH for the file name or append the current
+             *        directory, which ever makes sense... */
+        }
+    }
+
+    int rc = RTErrConvertFromErrno(err);
+    AssertMsgFailed(("rc=%Rrc err=%d cchLink=%d hExe=%p\n", rc, err, cchLink, hExe));
+    return rc;
+}
diff --git a/src/VBox/Runtime/r3/nt/RTProcQueryParent-r3-nt.cpp b/src/VBox/Runtime/r3/nt/RTProcQueryParent-r3-nt.cpp
index c847ddb..8fe498c 100644
--- a/src/VBox/Runtime/r3/nt/RTProcQueryParent-r3-nt.cpp
+++ b/src/VBox/Runtime/r3/nt/RTProcQueryParent-r3-nt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/nt/direnum-r3-nt.cpp b/src/VBox/Runtime/r3/nt/direnum-r3-nt.cpp
index a07799c..c02b936 100644
--- a/src/VBox/Runtime/r3/nt/direnum-r3-nt.cpp
+++ b/src/VBox/Runtime/r3/nt/direnum-r3-nt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -195,6 +195,8 @@ static int rtDirNtCheckRecord(PRTDIR pThis)
         AssertReturn((unsigned)pThis->uCurData.pBoth->ShortNameLength <= sizeof(pThis->uCurData.pBoth->ShortName),
                      VERR_IO_GEN_FAILURE);
     }
+#else
+    RT_NOREF_PV(pThis);
 #endif
 
     return VINF_SUCCESS;
diff --git a/src/VBox/Runtime/r3/nt/fs-nt.cpp b/src/VBox/Runtime/r3/nt/fs-nt.cpp
index bb96b51..389c130 100644
--- a/src/VBox/Runtime/r3/nt/fs-nt.cpp
+++ b/src/VBox/Runtime/r3/nt/fs-nt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -227,6 +227,7 @@ RTR3DECL(int) RTFsQueryProperties(const char *pszFsPath, PRTFSPROPERTIES pProper
 
 RTR3DECL(bool) RTFsIsCaseSensitive(const char *pszFsPath)
 {
+    RT_NOREF_PV(pszFsPath);
     return false;
 }
 
diff --git a/src/VBox/Runtime/r3/nt/internal-r3-nt.h b/src/VBox/Runtime/r3/nt/internal-r3-nt.h
index 5bdebb1..d3e69ea 100644
--- a/src/VBox/Runtime/r3/nt/internal-r3-nt.h
+++ b/src/VBox/Runtime/r3/nt/internal-r3-nt.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/nt/pathint-nt.cpp b/src/VBox/Runtime/r3/nt/pathint-nt.cpp
index 640de94..23c490a 100644
--- a/src/VBox/Runtime/r3/nt/pathint-nt.cpp
+++ b/src/VBox/Runtime/r3/nt/pathint-nt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -393,6 +393,8 @@ static void rtNtPathFreeNative(struct _UNICODE_STRING *pNtName, PHANDLE phRootDi
 {
     RTUtf16Free(pNtName->Buffer);
     pNtName->Buffer = NULL;
+
+    RT_NOREF_PV(phRootDir); /* never returned by rtNtPathToNative */
 }
 
 
diff --git a/src/VBox/Runtime/r3/nt/time-nt.cpp b/src/VBox/Runtime/r3/nt/time-nt.cpp
index 52f19ec..5d1f11b 100644
--- a/src/VBox/Runtime/r3/nt/time-nt.cpp
+++ b/src/VBox/Runtime/r3/nt/time-nt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/os2/filelock-os2.cpp b/src/VBox/Runtime/r3/os2/filelock-os2.cpp
index 484c488..6ecd6ec 100644
--- a/src/VBox/Runtime/r3/os2/filelock-os2.cpp
+++ b/src/VBox/Runtime/r3/os2/filelock-os2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/os2/mp-os2.cpp b/src/VBox/Runtime/r3/os2/mp-os2.cpp
index 39c53cf..6cad50b 100644
--- a/src/VBox/Runtime/r3/os2/mp-os2.cpp
+++ b/src/VBox/Runtime/r3/os2/mp-os2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/os2/pipe-os2.cpp b/src/VBox/Runtime/r3/os2/pipe-os2.cpp
index 9876e88..cf5e8ee 100644
--- a/src/VBox/Runtime/r3/os2/pipe-os2.cpp
+++ b/src/VBox/Runtime/r3/os2/pipe-os2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/os2/rtProcInitExePath-os2.cpp b/src/VBox/Runtime/r3/os2/rtProcInitExePath-os2.cpp
index 4b5b34d..800a589 100644
--- a/src/VBox/Runtime/r3/os2/rtProcInitExePath-os2.cpp
+++ b/src/VBox/Runtime/r3/os2/rtProcInitExePath-os2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/os2/sched-os2.cpp b/src/VBox/Runtime/r3/os2/sched-os2.cpp
index eeccd21..9a534ac 100644
--- a/src/VBox/Runtime/r3/os2/sched-os2.cpp
+++ b/src/VBox/Runtime/r3/os2/sched-os2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/os2/sems-os2.cpp b/src/VBox/Runtime/r3/os2/sems-os2.cpp
index c433282..dccd2ea 100644
--- a/src/VBox/Runtime/r3/os2/sems-os2.cpp
+++ b/src/VBox/Runtime/r3/os2/sems-os2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/os2/systemmem-os2.cpp b/src/VBox/Runtime/r3/os2/systemmem-os2.cpp
index cdd46ee..3ced505 100644
--- a/src/VBox/Runtime/r3/os2/systemmem-os2.cpp
+++ b/src/VBox/Runtime/r3/os2/systemmem-os2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/os2/thread-os2.cpp b/src/VBox/Runtime/r3/os2/thread-os2.cpp
index 469f861..8718e84 100644
--- a/src/VBox/Runtime/r3/os2/thread-os2.cpp
+++ b/src/VBox/Runtime/r3/os2/thread-os2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/path.cpp b/src/VBox/Runtime/r3/path.cpp
index d1d438d..944848e 100644
--- a/src/VBox/Runtime/r3/path.cpp
+++ b/src/VBox/Runtime/r3/path.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/poll.cpp b/src/VBox/Runtime/r3/poll.cpp
index b55c6a9..5ea9927 100644
--- a/src/VBox/Runtime/r3/poll.cpp
+++ b/src/VBox/Runtime/r3/poll.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -30,7 +30,7 @@
 *********************************************************************************************************************************/
 #include <iprt/cdefs.h>
 #ifdef RT_OS_WINDOWS
-# include <Windows.h>
+# include <iprt/win/windows.h>
 
 #elif defined(RT_OS_OS2)
 # define INCL_BASE
@@ -240,12 +240,14 @@ static int rtPollNoResumeWorker(RTPOLLSETINTERNAL *pThis, uint64_t MsStart, RTMS
      * Wait.
      */
 # ifdef RT_OS_WINDOWS
+    RT_NOREF_PV(MsStart);
+
     DWORD dwRc = WaitForMultipleObjectsEx(cHandles, pThis->pahNative,
                                           FALSE /*fWaitAll */,
                                           cMillies == RT_INDEFINITE_WAIT ? INFINITE : cMillies,
                                           TRUE /*fAlertable*/);
-    if (    dwRc >= WAIT_OBJECT_0
-        &&  dwRc <  WAIT_OBJECT_0 + cHandles)
+    AssertCompile(WAIT_OBJECT_0 == 0);
+    if (dwRc < WAIT_OBJECT_0 + cHandles)
         rc = VERR_INTERRUPTED;
     else if (dwRc == WAIT_TIMEOUT)
         rc = VERR_TIMEOUT;
@@ -353,6 +355,8 @@ static int rtPollNoResumeWorker(RTPOLLSETINTERNAL *pThis, uint64_t MsStart, RTMS
 
 #else  /* POSIX */
 
+    RT_NOREF_PV(MsStart);
+
     /* clear the revents. */
     uint32_t i = pThis->cHandles;
     while (i-- > 0)
diff --git a/src/VBox/Runtime/r3/posix/RTFileQueryFsSizes-posix.cpp b/src/VBox/Runtime/r3/posix/RTFileQueryFsSizes-posix.cpp
index 0fb3a80..7e8d22a 100644
--- a/src/VBox/Runtime/r3/posix/RTFileQueryFsSizes-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/RTFileQueryFsSizes-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/posix/RTHandleGetStandard-posix.cpp b/src/VBox/Runtime/r3/posix/RTHandleGetStandard-posix.cpp
index 1a8d981..2ae3258 100644
--- a/src/VBox/Runtime/r3/posix/RTHandleGetStandard-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/RTHandleGetStandard-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/posix/RTMemProtect-posix.cpp b/src/VBox/Runtime/r3/posix/RTMemProtect-posix.cpp
index 8d58793..f0f9e7e 100644
--- a/src/VBox/Runtime/r3/posix/RTMemProtect-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/RTMemProtect-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/posix/RTMpGetCount-posix.cpp b/src/VBox/Runtime/r3/posix/RTMpGetCount-posix.cpp
index 1bfacc5..7bdd59d 100644
--- a/src/VBox/Runtime/r3/posix/RTMpGetCount-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/RTMpGetCount-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/posix/RTPathUserDocuments-posix.cpp b/src/VBox/Runtime/r3/posix/RTPathUserDocuments-posix.cpp
index fbfd2db..74530bd 100644
--- a/src/VBox/Runtime/r3/posix/RTPathUserDocuments-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/RTPathUserDocuments-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/posix/RTPathUserHome-posix.cpp b/src/VBox/Runtime/r3/posix/RTPathUserHome-posix.cpp
index c1d1af8..3d54d50 100644
--- a/src/VBox/Runtime/r3/posix/RTPathUserHome-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/RTPathUserHome-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/posix/RTSystemQueryOSInfo-posix.cpp b/src/VBox/Runtime/r3/posix/RTSystemQueryOSInfo-posix.cpp
index 691348f..b03106b 100644
--- a/src/VBox/Runtime/r3/posix/RTSystemQueryOSInfo-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/RTSystemQueryOSInfo-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/posix/RTSystemQueryTotalRam-posix.cpp b/src/VBox/Runtime/r3/posix/RTSystemQueryTotalRam-posix.cpp
index 22862eb..b0466a5 100644
--- a/src/VBox/Runtime/r3/posix/RTSystemQueryTotalRam-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/RTSystemQueryTotalRam-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/posix/RTTimeNow-posix.cpp b/src/VBox/Runtime/r3/posix/RTTimeNow-posix.cpp
index 9dee759..d0431c4 100644
--- a/src/VBox/Runtime/r3/posix/RTTimeNow-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/RTTimeNow-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/posix/RTTimeSet-posix.cpp b/src/VBox/Runtime/r3/posix/RTTimeSet-posix.cpp
index 9f1a754..b07804f 100644
--- a/src/VBox/Runtime/r3/posix/RTTimeSet-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/RTTimeSet-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/posix/allocex-r3-posix.cpp b/src/VBox/Runtime/r3/posix/allocex-r3-posix.cpp
index 0a8a657..15580b3 100644
--- a/src/VBox/Runtime/r3/posix/allocex-r3-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/allocex-r3-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -104,6 +104,7 @@ DECLHIDDEN(int) rtMemAllocEx32BitReach(size_t cbAlloc, uint32_t fFlags, void **p
 
 DECLHIDDEN(void) rtMemFreeExYyBitReach(void *pv, size_t cb, uint32_t fFlags)
 {
+    RT_NOREF_PV(fFlags);
     munmap(pv, cb);
 }
 
diff --git a/src/VBox/Runtime/r3/posix/dir-posix.cpp b/src/VBox/Runtime/r3/posix/dir-posix.cpp
index 62cada2..2861873 100644
--- a/src/VBox/Runtime/r3/posix/dir-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/dir-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -78,6 +78,8 @@ RTDECL(bool) RTDirExists(const char *pszPath)
 
 RTDECL(int) RTDirCreate(const char *pszPath, RTFMODE fMode, uint32_t fCreate)
 {
+    RT_NOREF_PV(fCreate);
+
     int rc;
     fMode = rtFsModeNormalize(fMode, pszPath, 0);
     if (rtFsModeIsValidPermissions(fMode))
diff --git a/src/VBox/Runtime/r3/posix/env-posix.cpp b/src/VBox/Runtime/r3/posix/env-posix.cpp
index 8828804..5658c28 100644
--- a/src/VBox/Runtime/r3/posix/env-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/env-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/posix/errvars-posix.cpp b/src/VBox/Runtime/r3/posix/errvars-posix.cpp
index d9bd742..a270290 100644
--- a/src/VBox/Runtime/r3/posix/errvars-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/errvars-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/posix/fileaio-posix.cpp b/src/VBox/Runtime/r3/posix/fileaio-posix.cpp
index c1a48e9..bdbe74b 100644
--- a/src/VBox/Runtime/r3/posix/fileaio-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/fileaio-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/posix/fileio-posix.cpp b/src/VBox/Runtime/r3/posix/fileio-posix.cpp
index 2203f96..31c429f 100644
--- a/src/VBox/Runtime/r3/posix/fileio-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/fileio-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -154,7 +154,7 @@ RTR3DECL(int) RTFileOpen(PRTFILE pFile, const char *pszFilename, uint64_t fOpen)
     if (fOpen & RTFILE_O_ASYNC_IO)
         fOpenMode |= O_DIRECT;
 #endif
-#if defined(O_DIRECT) && (defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD))
+#if defined(O_DIRECT) && (defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD) || defined(RT_OS_NETBSD))
     /* Disable the kernel cache. */
     if (fOpen & RTFILE_O_NO_CACHE)
         fOpenMode |= O_DIRECT;
@@ -559,7 +559,7 @@ RTR3DECL(int) RTFileGetSize(RTFILE hFile, uint64_t *pcbSize)
         if (   st.st_size != 0
 #if defined(RT_OS_SOLARIS)
             || (!S_ISBLK(st.st_mode) && !S_ISCHR(st.st_mode))
-#elif defined(RT_OS_FREEBSD)
+#elif defined(RT_OS_FREEBSD) || defined(RT_OS_NETBSD)
             || !S_ISCHR(st.st_mode)
 #else
             || !S_ISBLK(st.st_mode)
diff --git a/src/VBox/Runtime/r3/posix/fileio2-posix.cpp b/src/VBox/Runtime/r3/posix/fileio2-posix.cpp
index a357c12..a32508b 100644
--- a/src/VBox/Runtime/r3/posix/fileio2-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/fileio2-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/posix/filelock-posix.cpp b/src/VBox/Runtime/r3/posix/filelock-posix.cpp
index 8114cc4..c23397b 100644
--- a/src/VBox/Runtime/r3/posix/filelock-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/filelock-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -127,7 +127,7 @@ RTR3DECL(int)  RTFileUnlock(RTFILE hFile, int64_t offLock, uint64_t cbLock)
     if (fcntl(RTFileToNative(hFile), F_SETLK, &fl) >= 0)
         return VINF_SUCCESS;
 
-    /* @todo check error codes for non existing lock. */
+    /** @todo check error codes for non existing lock. */
     int iErr = errno;
     if (    iErr == EAGAIN
         ||  iErr == EACCES)
diff --git a/src/VBox/Runtime/r3/posix/fs-posix.cpp b/src/VBox/Runtime/r3/posix/fs-posix.cpp
index d639228..441087c 100644
--- a/src/VBox/Runtime/r3/posix/fs-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/fs-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -176,6 +176,7 @@ RTR3DECL(int) RTFsQueryProperties(const char *pszFsPath, PRTFSPROPERTIES pProper
 
 RTR3DECL(bool) RTFsIsCaseSensitive(const char *pszFsPath)
 {
+    RT_NOREF_PV(pszFsPath);
 #if defined(RT_OS_OS2) || defined(RT_OS_WINDOWS)
     return false;
 #else
diff --git a/src/VBox/Runtime/r3/posix/fs2-posix.cpp b/src/VBox/Runtime/r3/posix/fs2-posix.cpp
index b9fc7da..95750a1 100644
--- a/src/VBox/Runtime/r3/posix/fs2-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/fs2-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/posix/fs3-posix.cpp b/src/VBox/Runtime/r3/posix/fs3-posix.cpp
index 18c8925..879218f 100644
--- a/src/VBox/Runtime/r3/posix/fs3-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/fs3-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/posix/ldrNative-posix.cpp b/src/VBox/Runtime/r3/posix/ldrNative-posix.cpp
index 03d2cce..3cacc35 100644
--- a/src/VBox/Runtime/r3/posix/ldrNative-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/ldrNative-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -122,6 +122,7 @@ DECLCALLBACK(int) rtldrNativeClose(PRTLDRMODINTERNAL pMod)
 
 int rtldrNativeLoadSystem(const char *pszFilename, const char *pszExt, uint32_t fFlags, PRTLDRMOD phLdrMod)
 {
+    RT_NOREF_PV(pszFilename); RT_NOREF_PV(pszExt); RT_NOREF_PV(fFlags); RT_NOREF_PV(phLdrMod);
     /** @todo implement this in some sensible fashion. */
     return VERR_NOT_SUPPORTED;
 }
diff --git a/src/VBox/Runtime/r3/posix/localipc-posix.cpp b/src/VBox/Runtime/r3/posix/localipc-posix.cpp
index fa0ef81..844c00e 100644
--- a/src/VBox/Runtime/r3/posix/localipc-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/localipc-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -25,9 +25,9 @@
  */
 
 
-/*******************************************************************************
-*   Header Files                                                               *
-*******************************************************************************/
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
 #define LOG_GROUP RTLOGGROUP_LOCALIPC
 #include "internal/iprt.h"
 #include <iprt/localipc.h>
@@ -59,9 +59,9 @@
 #include "internal/socket.h"
 
 
-/*******************************************************************************
-*   Structures and Typedefs                                                    *
-*******************************************************************************/
+/*********************************************************************************************************************************
+*   Structures and Typedefs                                                                                                      *
+*********************************************************************************************************************************/
 /**
  * Local IPC service instance, POSIX.
  */
@@ -280,7 +280,7 @@ RTDECL(int) RTLocalIpcServerCreate(PRTLOCALIPCSERVER phServer, const char *pszNa
 DECLINLINE(void) rtLocalIpcServerRetain(PRTLOCALIPCSERVERINT pThis)
 {
     uint32_t cRefs = ASMAtomicIncU32(&pThis->cRefs);
-    Assert(cRefs < UINT32_MAX / 2 && cRefs);
+    Assert(cRefs < UINT32_MAX / 2 && cRefs); RT_NOREF_PV(cRefs);
 }
 
 
@@ -548,7 +548,7 @@ RTDECL(int) RTLocalIpcSessionConnect(PRTLOCALIPCSESSION phSession, const char *p
 DECLINLINE(void) rtLocalIpcSessionRetain(PRTLOCALIPCSESSIONINT pThis)
 {
     uint32_t cRefs = ASMAtomicIncU32(&pThis->cRefs);
-    Assert(cRefs < UINT32_MAX / 2 && cRefs);
+    Assert(cRefs < UINT32_MAX / 2 && cRefs); RT_NOREF_PV(cRefs);
 }
 
 
@@ -1048,20 +1048,21 @@ RTDECL(int) RTLocalIpcSessionWaitForData(RTLOCALIPCSESSION hSession, uint32_t cM
 
 RTDECL(int) RTLocalIpcSessionQueryProcess(RTLOCALIPCSESSION hSession, PRTPROCESS pProcess)
 {
+    RT_NOREF_PV(hSession); RT_NOREF_PV(pProcess);
     return VERR_NOT_SUPPORTED;
 }
 
 
 RTDECL(int) RTLocalIpcSessionQueryUserId(RTLOCALIPCSESSION hSession, PRTUID pUid)
 {
+    RT_NOREF_PV(hSession); RT_NOREF_PV(pUid);
     return VERR_NOT_SUPPORTED;
 }
 
 
 RTDECL(int) RTLocalIpcSessionQueryGroupId(RTLOCALIPCSESSION hSession, PRTGID pGid)
 {
+    RT_NOREF_PV(hSession); RT_NOREF_PV(pGid);
     return VERR_NOT_SUPPORTED;
 }
 
-
-
diff --git a/src/VBox/Runtime/r3/posix/path-posix.cpp b/src/VBox/Runtime/r3/posix/path-posix.cpp
index 0b42f19..79a92cf 100644
--- a/src/VBox/Runtime/r3/posix/path-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/path-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -301,6 +301,7 @@ RTR3DECL(int) RTPathRename(const char *pszSrc, const char *pszDst, unsigned fRen
 
 RTR3DECL(int) RTPathUnlink(const char *pszPath, uint32_t fUnlink)
 {
+    RT_NOREF_PV(pszPath); RT_NOREF_PV(fUnlink);
     return VERR_NOT_IMPLEMENTED;
 }
 
diff --git a/src/VBox/Runtime/r3/posix/path2-posix.cpp b/src/VBox/Runtime/r3/posix/path2-posix.cpp
index 98b0e73..a14b293 100644
--- a/src/VBox/Runtime/r3/posix/path2-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/path2-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/posix/pathhost-posix.cpp b/src/VBox/Runtime/r3/posix/pathhost-posix.cpp
index fa03b35..5e57220 100644
--- a/src/VBox/Runtime/r3/posix/pathhost-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/pathhost-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/posix/pipe-posix.cpp b/src/VBox/Runtime/r3/posix/pipe-posix.cpp
index 494a735..925b09f 100644
--- a/src/VBox/Runtime/r3/posix/pipe-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/pipe-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/posix/process-creation-posix.cpp b/src/VBox/Runtime/r3/posix/process-creation-posix.cpp
index 8aea1ed..7fc3a43 100644
--- a/src/VBox/Runtime/r3/posix/process-creation-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/process-creation-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -313,6 +313,8 @@ static int rtProcPosixAdjustProfileEnvFromChild(RTENV hEnvToUse, uint32_t fFlags
         else
             rc = VERR_BUFFER_OVERFLOW;
     }
+#else
+    RT_NOREF_PV(hEnvToUse); RT_NOREF_PV(fFlags); RT_NOREF_PV(hEnv);
 #endif
     return rc;
 }
diff --git a/src/VBox/Runtime/r3/posix/process-posix.cpp b/src/VBox/Runtime/r3/posix/process-posix.cpp
index 3129958..fe02eb2 100644
--- a/src/VBox/Runtime/r3/posix/process-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/process-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/posix/rand-posix.cpp b/src/VBox/Runtime/r3/posix/rand-posix.cpp
index dcb67f3..bb16bce 100644
--- a/src/VBox/Runtime/r3/posix/rand-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/rand-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/posix/rtmempage-exec-mmap-heap-posix.cpp b/src/VBox/Runtime/r3/posix/rtmempage-exec-mmap-heap-posix.cpp
index 5d580b6..bdb6eb8 100644
--- a/src/VBox/Runtime/r3/posix/rtmempage-exec-mmap-heap-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/rtmempage-exec-mmap-heap-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/posix/rtmempage-exec-mmap-posix.cpp b/src/VBox/Runtime/r3/posix/rtmempage-exec-mmap-posix.cpp
index c6ecd61..a73ece9 100644
--- a/src/VBox/Runtime/r3/posix/rtmempage-exec-mmap-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/rtmempage-exec-mmap-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/posix/semevent-posix.cpp b/src/VBox/Runtime/r3/posix/semevent-posix.cpp
index f9c1d3b..80d5747 100644
--- a/src/VBox/Runtime/r3/posix/semevent-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/semevent-posix.cpp
@@ -49,7 +49,7 @@
 # define pthread_yield() pthread_yield_np()
 #endif
 
-#if defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU)
+#if defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU) || defined(RT_OS_FREEBSD) || defined(RT_OS_NETBSD)
 # include <sched.h>
 # define pthread_yield() sched_yield()
 #endif
@@ -150,6 +150,8 @@ RTDECL(int)  RTSemEventCreateEx(PRTSEMEVENT phEventSem, uint32_t fFlags, RTLOCKV
                     va_end(va);
                 }
                 pThis->fEverHadSignallers = false;
+#else
+                RT_NOREF_PV(hClass); RT_NOREF_PV(pszNameFmt);
 #endif
 
                 *phEventSem = pThis;
@@ -499,6 +501,8 @@ RTDECL(void) RTSemEventSetSignaller(RTSEMEVENT hEventSem, RTTHREAD hThread)
 
     ASMAtomicWriteBool(&pThis->fEverHadSignallers, true);
     RTLockValidatorRecSharedResetOwner(&pThis->Signallers, hThread, NULL);
+#else
+    RT_NOREF_PV(hEventSem); RT_NOREF_PV(hThread);
 #endif
 }
 
@@ -513,6 +517,8 @@ RTDECL(void) RTSemEventAddSignaller(RTSEMEVENT hEventSem, RTTHREAD hThread)
 
     ASMAtomicWriteBool(&pThis->fEverHadSignallers, true);
     RTLockValidatorRecSharedAddOwner(&pThis->Signallers, hThread, NULL);
+#else
+    RT_NOREF_PV(hEventSem); RT_NOREF_PV(hThread);
 #endif
 }
 
@@ -526,6 +532,8 @@ RTDECL(void) RTSemEventRemoveSignaller(RTSEMEVENT hEventSem, RTTHREAD hThread)
     AssertReturnVoid(u32 == EVENT_STATE_NOT_SIGNALED || u32 == EVENT_STATE_SIGNALED);
 
     RTLockValidatorRecSharedRemoveOwner(&pThis->Signallers, hThread);
+#else
+    RT_NOREF_PV(hEventSem); RT_NOREF_PV(hThread);
 #endif
 }
 
diff --git a/src/VBox/Runtime/r3/posix/semeventmulti-posix.cpp b/src/VBox/Runtime/r3/posix/semeventmulti-posix.cpp
index efe7b5e..deea6a6 100644
--- a/src/VBox/Runtime/r3/posix/semeventmulti-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/semeventmulti-posix.cpp
@@ -166,6 +166,8 @@ RTDECL(int)  RTSemEventMultiCreateEx(PRTSEMEVENTMULTI phEventMultiSem, uint32_t
                         va_end(va);
                     }
                     pThis->fEverHadSignallers = false;
+#else
+                    RT_NOREF_PV(hClass); RT_NOREF_PV(pszNameFmt);
 #endif
 
                     *phEventMultiSem = pThis;
@@ -420,6 +422,7 @@ static int rtSemEventMultiPosixWaitIndefinite(struct RTSEMEVENTMULTIINTERNAL *pT
         }
 #else
         RTTHREAD hThreadSelf = RTThreadSelf();
+        RT_NOREF_PV(pSrcPos);
 #endif
         RTThreadBlocking(hThreadSelf, RTTHREADSTATE_EVENT_MULTI, true);
         /** @todo interruptible wait is not implementable... */ NOREF(fFlags);
@@ -631,6 +634,8 @@ RTDECL(void) RTSemEventMultiSetSignaller(RTSEMEVENTMULTI hEventMultiSem, RTTHREA
 
     ASMAtomicWriteBool(&pThis->fEverHadSignallers, true);
     RTLockValidatorRecSharedResetOwner(&pThis->Signallers, hThread, NULL);
+#else
+    RT_NOREF_PV(hEventMultiSem); RT_NOREF_PV(hThread);
 #endif
 }
 
@@ -645,6 +650,8 @@ RTDECL(void) RTSemEventMultiAddSignaller(RTSEMEVENTMULTI hEventMultiSem, RTTHREA
 
     ASMAtomicWriteBool(&pThis->fEverHadSignallers, true);
     RTLockValidatorRecSharedAddOwner(&pThis->Signallers, hThread, NULL);
+#else
+    RT_NOREF_PV(hEventMultiSem); RT_NOREF_PV(hThread);
 #endif
 }
 
@@ -658,6 +665,8 @@ RTDECL(void) RTSemEventMultiRemoveSignaller(RTSEMEVENTMULTI hEventMultiSem, RTTH
     AssertReturnVoid(u32 == EVENTMULTI_STATE_NOT_SIGNALED || u32 == EVENTMULTI_STATE_SIGNALED);
 
     RTLockValidatorRecSharedRemoveOwner(&pThis->Signallers, hThread);
+#else
+    RT_NOREF_PV(hEventMultiSem); RT_NOREF_PV(hThread);
 #endif
 }
 
diff --git a/src/VBox/Runtime/r3/posix/semmutex-posix.cpp b/src/VBox/Runtime/r3/posix/semmutex-posix.cpp
index afdc098..30a354d 100644
--- a/src/VBox/Runtime/r3/posix/semmutex-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/semmutex-posix.cpp
@@ -66,40 +66,58 @@ struct RTSEMMUTEXINTERNAL
 #endif
 };
 
-#ifdef RT_OS_DARWIN
+#if defined(RT_OS_DARWIN) || defined(RT_OS_NETBSD)
 /**
- * This function emulate pthread_mutex_timedlock on Mac OS X
+ * This function is a crude approximation of pthread_mutex_timedlock.
  */
-static int DarwinPthreadMutexTimedlock(pthread_mutex_t * mutex, const struct timespec * pTsAbsTimeout)
+int rtSemFallbackPthreadMutexTimedlock(pthread_mutex_t *mutex, RTMSINTERVAL cMillies)
 {
-    int rc = 0;
-    struct timeval tv;
-    timespec ts = {0, 0};
-    do
+    struct timespec ts;
+    int rc;
+
+    rc = pthread_mutex_trylock(mutex);
+    if (rc != EBUSY)
+        return rc;
+
+    ts.tv_sec = cMillies / 1000;
+    ts.tv_nsec = (cMillies % 1000) * 1000000;
+
+    while (ts.tv_sec > 0 || ts.tv_nsec > 0)
     {
-        rc = pthread_mutex_trylock(mutex);
-        if (rc == EBUSY)
+        struct timespec delta, remaining;
+
+        if (ts.tv_sec > 0)
+        {
+            delta.tv_sec = 1;
+            delta.tv_nsec = 0;
+            ts.tv_sec--;
+        }
+        else
         {
-            gettimeofday(&tv, NULL);
+            delta.tv_sec = 0;
+            delta.tv_nsec = ts.tv_nsec;
+            ts.tv_nsec = 0;
+        }
 
-            ts.tv_sec = pTsAbsTimeout->tv_sec - tv.tv_sec;
-            ts.tv_nsec = pTsAbsTimeout->tv_nsec - tv.tv_sec;
+        nanosleep(&delta, &remaining);
 
-            if (ts.tv_nsec < 0)
+        rc = pthread_mutex_trylock(mutex);
+        if (rc != EBUSY)
+            return rc;
+
+        if (RT_UNLIKELY(remaining.tv_nsec > 0 || remaining.tv_sec > 0))
+        {
+            ts.tv_sec += remaining.tv_sec;
+            ts.tv_nsec += remaining.tv_nsec;
+            if (ts.tv_nsec >= 1000000000)
             {
-                ts.tv_sec--;
-                ts.tv_nsec += 1000000000;
+                ts.tv_nsec -= 1000000000;
+                ts.tv_sec++;
             }
-
-            if (   ts.tv_sec > 0
-                && ts.tv_nsec > 0)
-                nanosleep(&ts, &ts);
         }
-        else
-            break;
-    } while (   rc != 0
-             || ts.tv_sec > 0);
-    return rc;
+    }
+
+    return ETIMEDOUT;
 }
 #endif
 
@@ -148,6 +166,8 @@ RTDECL(int) RTSemMutexCreateEx(PRTSEMMUTEX phMutexSem, uint32_t fFlags,
                                             !(fFlags & RTSEMMUTEX_FLAGS_NO_LOCK_VAL), pszNameFmt, va);
                 va_end(va);
             }
+#else
+            RT_NOREF_PV(hClass); RT_NOREF_PV(uSubClass); RT_NOREF_PV(pszNameFmt);
 #endif
 
             *phMutexSem = pThis;
@@ -210,6 +230,7 @@ RTDECL(uint32_t) RTSemMutexSetSubClass(RTSEMMUTEX hMutexSem, uint32_t uSubClass)
 
     return RTLockValidatorRecExclSetSubClass(&pThis->ValidatorRec, uSubClass);
 #else
+    RT_NOREF_PV(hMutexSem); RT_NOREF_PV(uSubClass);
     return RTLOCKVAL_SUB_CLASS_INVALID;
 #endif
 }
@@ -255,6 +276,7 @@ DECL_FORCE_INLINE(int) rtSemMutexRequest(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMil
 #else
         hThreadSelf = RTThreadSelf();
         RTThreadBlocking(hThreadSelf, RTTHREADSTATE_MUTEX, true);
+        RT_NOREF_PV(pSrcPos);
 #endif
     }
 
@@ -271,16 +293,17 @@ DECL_FORCE_INLINE(int) rtSemMutexRequest(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMil
     }
     else
     {
+        int rc;
+#if !defined(RT_OS_DARWIN) && !defined(RT_OS_NETBSD)
         struct timespec     ts = {0,0};
-#if defined(RT_OS_DARWIN) || defined(RT_OS_HAIKU)
-
+# if defined(RT_OS_HAIKU)
         struct timeval      tv = {0,0};
         gettimeofday(&tv, NULL);
         ts.tv_sec = tv.tv_sec;
         ts.tv_nsec = tv.tv_usec * 1000;
-#else
+# else
         clock_gettime(CLOCK_REALTIME, &ts);
-#endif
+# endif
         if (cMillies != 0)
         {
             ts.tv_nsec += (cMillies % 1000) * 1000000;
@@ -293,10 +316,16 @@ DECL_FORCE_INLINE(int) rtSemMutexRequest(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMil
         }
 
         /* take mutex */
-#ifndef RT_OS_DARWIN
-        int rc = pthread_mutex_timedlock(&pThis->Mutex, &ts);
+        rc = pthread_mutex_timedlock(&pThis->Mutex, &ts);
 #else
-        int rc = DarwinPthreadMutexTimedlock(&pThis->Mutex, &ts);
+        /*
+         * When there's no pthread_mutex_timedlock() use a crude sleep
+         * and retry approximation.  Since the sleep interval is
+         * relative, we don't need to convert to the absolute time
+         * here only to convert back to relative in the fallback
+         * function.
+         */
+        rc = rtSemFallbackPthreadMutexTimedlock(&pThis->Mutex, cMillies);
 #endif
         RTThreadUnblocked(hThreadSelf, RTTHREADSTATE_MUTEX);
         if (rc)
diff --git a/src/VBox/Runtime/r3/posix/semrw-posix.cpp b/src/VBox/Runtime/r3/posix/semrw-posix.cpp
index 65c419d..ae03c3d 100644
--- a/src/VBox/Runtime/r3/posix/semrw-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/semrw-posix.cpp
@@ -144,6 +144,8 @@ RTDECL(int) RTSemRWCreateEx(PRTSEMRW phRWSem, uint32_t fFlags,
                 va_end(va);
             }
             RTLockValidatorRecMakeSiblings(&pThis->ValidatorWrite.Core, &pThis->ValidatorRead.Core);
+#else
+            RT_NOREF_PV(hClass); RT_NOREF_PV(uSubClass); RT_NOREF_PV(pszNameFmt);
 #endif
             *phRWSem = pThis;
             return VINF_SUCCESS;
@@ -214,6 +216,7 @@ RTDECL(uint32_t) RTSemRWSetSubClass(RTSEMRW hRWSem, uint32_t uSubClass)
     RTLockValidatorRecSharedSetSubClass(&pThis->ValidatorRead, uSubClass);
     return RTLockValidatorRecExclSetSubClass(&pThis->ValidatorWrite, uSubClass);
 #else
+    RT_NOREF_PV(hRWSem); RT_NOREF_PV(uSubClass);
     return RTLOCKVAL_SUB_CLASS_INVALID;
 #endif
 }
@@ -263,6 +266,7 @@ DECL_FORCE_INLINE(int) rtSemRWRequestRead(RTSEMRW hRWSem, RTMSINTERVAL cMillies,
 #else
         hThreadSelf = RTThreadSelf();
         RTThreadBlocking(hThreadSelf, RTTHREADSTATE_RW_READ, true);
+        RT_NOREF_PV(pSrcPos);
 #endif
     }
 
@@ -458,6 +462,7 @@ DECL_FORCE_INLINE(int) rtSemRWRequestWrite(RTSEMRW hRWSem, RTMSINTERVAL cMillies
 #else
         hThreadSelf = RTThreadSelf();
         RTThreadBlocking(hThreadSelf, RTTHREADSTATE_RW_WRITE, true);
+        RT_NOREF_PV(pSrcPos);
 #endif
     }
 
diff --git a/src/VBox/Runtime/r3/posix/symlink-posix.cpp b/src/VBox/Runtime/r3/posix/symlink-posix.cpp
index 052f7c2..6effebb 100644
--- a/src/VBox/Runtime/r3/posix/symlink-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/symlink-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -93,6 +93,8 @@ RTDECL(bool) RTSymlinkIsDangling(const char *pszSymlink)
 
 RTDECL(int) RTSymlinkCreate(const char *pszSymlink, const char *pszTarget, RTSYMLINKTYPE enmType, uint32_t fCreate)
 {
+    RT_NOREF_PV(fCreate);
+
     /*
      * Validate the input.
      */
@@ -131,6 +133,8 @@ RTDECL(int) RTSymlinkCreate(const char *pszSymlink, const char *pszTarget, RTSYM
 
 RTDECL(int) RTSymlinkDelete(const char *pszSymlink, uint32_t fDelete)
 {
+    RT_NOREF_PV(fDelete);
+
     char const *pszNativeSymlink;
     int rc = rtPathToNative(&pszNativeSymlink, pszSymlink, NULL);
     if (RT_SUCCESS(rc))
@@ -160,6 +164,8 @@ RTDECL(int) RTSymlinkDelete(const char *pszSymlink, uint32_t fDelete)
 
 RTDECL(int) RTSymlinkRead(const char *pszSymlink, char *pszTarget, size_t cbTarget, uint32_t fRead)
 {
+    RT_NOREF_PV(fRead);
+
     char *pszMyTarget;
     int rc = RTSymlinkReadA(pszSymlink, &pszMyTarget);
     if (RT_SUCCESS(rc))
diff --git a/src/VBox/Runtime/r3/posix/thread-posix.cpp b/src/VBox/Runtime/r3/posix/thread-posix.cpp
index a72f9ae..c6ca434 100644
--- a/src/VBox/Runtime/r3/posix/thread-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/thread-posix.cpp
@@ -117,7 +117,9 @@ static PFNPTHREADSETNAME g_pfnThreadSetName = NULL;
 *********************************************************************************************************************************/
 static void *rtThreadNativeMain(void *pvArgs);
 static void rtThreadKeyDestruct(void *pvValue);
+#ifdef RTTHREAD_POSIX_WITH_POKE
 static void rtThreadPosixPokeSignal(int iSignal);
+#endif
 
 
 #ifdef RTTHREAD_POSIX_WITH_POKE
@@ -291,7 +293,8 @@ static void *rtThreadNativeMain(void *pvArgs)
 {
     PRTTHREADINT  pThread = (PRTTHREADINT)pvArgs;
     pthread_t     Self    = pthread_self();
-    Assert((uintptr_t)Self == (RTNATIVETHREAD)Self && (uintptr_t)Self != NIL_RTNATIVETHREAD);
+    Assert((uintptr_t)Self != NIL_RTNATIVETHREAD);
+    Assert(Self == (pthread_t)(RTNATIVETHREAD)Self);
 
 #if defined(RT_OS_LINUX)
     /*
diff --git a/src/VBox/Runtime/r3/posix/thread2-posix.cpp b/src/VBox/Runtime/r3/posix/thread2-posix.cpp
index 7bdbe2f..b581fc7 100644
--- a/src/VBox/Runtime/r3/posix/thread2-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/thread2-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -32,7 +32,7 @@
 #include <errno.h>
 #include <pthread.h>
 #include <unistd.h>
-#if defined(RT_OS_SOLARIS)
+#if defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) || defined(RT_OS_NETBSD)
 # include <sched.h>
 #endif
 
@@ -60,9 +60,7 @@ RTDECL(int) RTThreadSleep(RTMSINTERVAL cMillies)
         /* pthread_yield() isn't part of SuS, thus this fun. */
 #ifdef RT_OS_DARWIN
         pthread_yield_np();
-#elif defined(RT_OS_FREEBSD) /* void pthread_yield */
-        pthread_yield();
-#elif defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU)
+#elif defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU) || defined(RT_OS_FREEBSD) || defined(RT_OS_NETBSD)
         sched_yield();
 #else
         if (!pthread_yield())
@@ -99,9 +97,7 @@ RTDECL(int) RTThreadSleepNoLog(RTMSINTERVAL cMillies)
         /* pthread_yield() isn't part of SuS, thus this fun. */
 #ifdef RT_OS_DARWIN
         pthread_yield_np();
-#elif defined(RT_OS_FREEBSD) /* void pthread_yield */
-        pthread_yield();
-#elif defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU)
+#elif defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU) || defined(RT_OS_FREEBSD) || defined(RT_OS_NETBSD)
         sched_yield();
 #else
         if (!pthread_yield())
@@ -130,7 +126,7 @@ RTDECL(bool) RTThreadYield(void)
 #endif
 #ifdef RT_OS_DARWIN
     pthread_yield_np();
-#elif defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU)
+#elif defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU) || defined(RT_OS_FREEBSD) || defined(RT_OS_NETBSD)
     sched_yield();
 #else
     pthread_yield();
diff --git a/src/VBox/Runtime/r3/posix/time-posix.cpp b/src/VBox/Runtime/r3/posix/time-posix.cpp
index 7c6f372..0273e35 100644
--- a/src/VBox/Runtime/r3/posix/time-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/time-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/posix/timelocal-posix.cpp b/src/VBox/Runtime/r3/posix/timelocal-posix.cpp
index 08edad9..e3427d3 100644
--- a/src/VBox/Runtime/r3/posix/timelocal-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/timelocal-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/posix/timer-posix.cpp b/src/VBox/Runtime/r3/posix/timer-posix.cpp
index 3ba4ef6..99ce751 100644
--- a/src/VBox/Runtime/r3/posix/timer-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/timer-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/posix/tls-posix.cpp b/src/VBox/Runtime/r3/posix/tls-posix.cpp
index 0eae42f..f4eb13b 100644
--- a/src/VBox/Runtime/r3/posix/tls-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/tls-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/posix/utf8-posix.cpp b/src/VBox/Runtime/r3/posix/utf8-posix.cpp
index a4481dd..fecb17f 100644
--- a/src/VBox/Runtime/r3/posix/utf8-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/utf8-posix.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -173,8 +173,8 @@ static int rtstrConvertCached(const void *pvInput, size_t cbInput, const char *p
         iconv_t hIconv = (iconv_t)*phIconv;
         if (hIconv == (iconv_t)-1)
         {
-#ifdef RT_OS_SOLARIS
-            /* Solaris doesn't grok empty codeset strings, so help it find the current codeset. */
+#if defined(RT_OS_SOLARIS) || defined(RT_OS_NETBSD)
+            /* Some systems don't grok empty codeset strings, so help them find the current codeset. */
             if (!*pszInputCS)
                 pszInputCS = rtStrGetLocaleCodeset();
             if (!*pszOutputCS)
@@ -304,8 +304,8 @@ static int rtStrConvertUncached(const void *pvInput, size_t cbInput, const char
         /*
          * Create conversion object.
          */
-#ifdef RT_OS_SOLARIS
-        /* Solaris doesn't grok empty codeset strings, so help it find the current codeset. */
+#if defined(RT_OS_SOLARIS) || defined(RT_OS_NETBSD)
+        /* Some systems don't grok empty codeset strings, so help them find the current codeset. */
         if (!*pszInputCS)
             pszInputCS = rtStrGetLocaleCodeset();
         if (!*pszOutputCS)
diff --git a/src/VBox/Runtime/r3/process.cpp b/src/VBox/Runtime/r3/process.cpp
index d48c783..2aab645 100644
--- a/src/VBox/Runtime/r3/process.cpp
+++ b/src/VBox/Runtime/r3/process.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/socket.cpp b/src/VBox/Runtime/r3/socket.cpp
index 331caee..c7b69d9 100644
--- a/src/VBox/Runtime/r3/socket.cpp
+++ b/src/VBox/Runtime/r3/socket.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,8 +29,8 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #ifdef RT_OS_WINDOWS
-# include <winsock2.h>
-# include <ws2tcpip.h>
+# include <iprt/win/winsock2.h>
+# include <iprt/win/ws2tcpip.h>
 #else /* !RT_OS_WINDOWS */
 # include <errno.h>
 # include <sys/select.h>
@@ -776,7 +776,6 @@ RTDECL(int) RTSocketQueryAddressStr(const char *pszHost, char *pszResult, size_t
         return VERR_NET_ADDRESS_NOT_AVAILABLE;
     }
 
-    uint8_t const  *pbDummy;
     RTNETADDRTYPE   enmAddrType = RTNETADDRTYPE_INVALID;
     size_t          cchIpAddress;
     char            szIpAddress[48];
@@ -1315,13 +1314,12 @@ RTDECL(int) RTSocketWriteNB(RTSOCKET hSocket, const void *pvBuffer, size_t cbBuf
         return rc;
 
     rtSocketErrorReset();
-#ifdef RTSOCKET_MAX_WRITE
+#ifdef RT_OS_WINDOWS
+# ifdef RTSOCKET_MAX_WRITE
     int    cbNow = cbBuffer >= RTSOCKET_MAX_WRITE ? RTSOCKET_MAX_WRITE : (int)cbBuffer;
-#else
+# else
     size_t cbNow = cbBuffer;
-#endif
-
-#ifdef RT_OS_WINDOWS
+# endif
     int cbWritten = send(pThis->hNative, (const char *)pvBuffer, cbNow, MSG_NOSIGNAL);
     if (cbWritten >= 0)
     {
@@ -1468,7 +1466,7 @@ RTDECL(int) RTSocketSelectOne(RTSOCKET hSocket, RTMSINTERVAL cMillies)
     AssertReturn(pThis->u32Magic == RTSOCKET_MAGIC, VERR_INVALID_HANDLE);
     AssertReturn(RTMemPoolRefCount(pThis) >= (pThis->cUsers ? 2U : 1U), VERR_CALLER_NO_REFERENCE);
     int const fdMax = (int)pThis->hNative + 1;
-    AssertReturn(fdMax - 1 == pThis->hNative, VERR_INTERNAL_ERROR_5);
+    AssertReturn((RTSOCKETNATIVE)(fdMax - 1) == pThis->hNative, VERR_INTERNAL_ERROR_5);
 
     /*
      * Set up the file descriptor sets and do the select.
@@ -1512,7 +1510,7 @@ RTDECL(int) RTSocketSelectOneEx(RTSOCKET hSocket, uint32_t fEvents, uint32_t *pf
     AssertReturn(!(fEvents & ~RTSOCKET_EVT_VALID_MASK), VERR_INVALID_PARAMETER);
     AssertReturn(RTMemPoolRefCount(pThis) >= (pThis->cUsers ? 2U : 1U), VERR_CALLER_NO_REFERENCE);
     int const fdMax = (int)pThis->hNative + 1;
-    AssertReturn(fdMax - 1 == pThis->hNative, VERR_INTERNAL_ERROR_5);
+    AssertReturn((RTSOCKETNATIVE)(fdMax - 1) == pThis->hNative, VERR_INTERNAL_ERROR_5);
 
     *pfEvents = 0;
 
@@ -1960,6 +1958,7 @@ DECLHIDDEN(int) rtSocketSetOpt(RTSOCKET hSocket, int iLevel, int iOption, void c
 DECLHIDDEN(int) rtSocketPollGetHandle(RTSOCKET hSocket, uint32_t fEvents, PRTHCINTPTR phNative)
 {
     RTSOCKETINT *pThis = hSocket;
+    RT_NOREF_PV(fEvents);
     AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
     AssertReturn(pThis->u32Magic == RTSOCKET_MAGIC, VERR_INVALID_HANDLE);
 #ifdef RT_OS_WINDOWS
@@ -2235,6 +2234,7 @@ DECLHIDDEN(uint32_t) rtSocketPollDone(RTSOCKET hSocket, uint32_t fEvents, bool f
     AssertReturn(pThis->u32Magic == RTSOCKET_MAGIC, 0);
     Assert(pThis->cUsers > 0);
     Assert(pThis->hPollSet != NIL_RTPOLLSET);
+    RT_NOREF_PV(fFinalEntry);
 
     /* Harvest events and clear the event mask for the next round of polling. */
     uint32_t fRetEvents = rtSocketPollCheck(pThis, fEvents);
diff --git a/src/VBox/Runtime/r3/solaris/RTSystemQueryDmiString-solaris.cpp b/src/VBox/Runtime/r3/solaris/RTSystemQueryDmiString-solaris.cpp
index 2fa09d7..51ca550 100644
--- a/src/VBox/Runtime/r3/solaris/RTSystemQueryDmiString-solaris.cpp
+++ b/src/VBox/Runtime/r3/solaris/RTSystemQueryDmiString-solaris.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/solaris/RTSystemShutdown-solaris.cpp b/src/VBox/Runtime/r3/solaris/RTSystemShutdown-solaris.cpp
index 192360a..ac9dfd5 100644
--- a/src/VBox/Runtime/r3/solaris/RTSystemShutdown-solaris.cpp
+++ b/src/VBox/Runtime/r3/solaris/RTSystemShutdown-solaris.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/solaris/coredumper-solaris.cpp b/src/VBox/Runtime/r3/solaris/coredumper-solaris.cpp
index 09f03d7..1b0bf47 100644
--- a/src/VBox/Runtime/r3/solaris/coredumper-solaris.cpp
+++ b/src/VBox/Runtime/r3/solaris/coredumper-solaris.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/solaris/coredumper-solaris.h b/src/VBox/Runtime/r3/solaris/coredumper-solaris.h
index f60e5f8..38ea39c 100644
--- a/src/VBox/Runtime/r3/solaris/coredumper-solaris.h
+++ b/src/VBox/Runtime/r3/solaris/coredumper-solaris.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/solaris/fileaio-solaris.cpp b/src/VBox/Runtime/r3/solaris/fileaio-solaris.cpp
index 8ff6b72..fa82c52 100644
--- a/src/VBox/Runtime/r3/solaris/fileaio-solaris.cpp
+++ b/src/VBox/Runtime/r3/solaris/fileaio-solaris.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/solaris/mp-solaris.cpp b/src/VBox/Runtime/r3/solaris/mp-solaris.cpp
index 48fa076..f98daf0 100644
--- a/src/VBox/Runtime/r3/solaris/mp-solaris.cpp
+++ b/src/VBox/Runtime/r3/solaris/mp-solaris.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/solaris/rtProcInitExePath-solaris.cpp b/src/VBox/Runtime/r3/solaris/rtProcInitExePath-solaris.cpp
index 5c1c14b..9f96627 100644
--- a/src/VBox/Runtime/r3/solaris/rtProcInitExePath-solaris.cpp
+++ b/src/VBox/Runtime/r3/solaris/rtProcInitExePath-solaris.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/solaris/systemmem-solaris.cpp b/src/VBox/Runtime/r3/solaris/systemmem-solaris.cpp
index c8ae627..e3c3be9 100644
--- a/src/VBox/Runtime/r3/solaris/systemmem-solaris.cpp
+++ b/src/VBox/Runtime/r3/solaris/systemmem-solaris.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/solaris/thread-affinity-solaris.cpp b/src/VBox/Runtime/r3/solaris/thread-affinity-solaris.cpp
index 92ad05d..6e714fc 100644
--- a/src/VBox/Runtime/r3/solaris/thread-affinity-solaris.cpp
+++ b/src/VBox/Runtime/r3/solaris/thread-affinity-solaris.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/stream.cpp b/src/VBox/Runtime/r3/stream.cpp
index 9c30eea..465074d 100644
--- a/src/VBox/Runtime/r3/stream.cpp
+++ b/src/VBox/Runtime/r3/stream.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -58,7 +58,7 @@
 # include <fcntl.h>
 #endif
 #ifdef RT_OS_WINDOWS
-# include <Windows.h>
+# include <iprt/win/windows.h>
 #endif
 #ifndef RT_OS_WINDOWS
 # include <termios.h>
diff --git a/src/VBox/Runtime/r3/tcp.cpp b/src/VBox/Runtime/r3/tcp.cpp
index fa67e69..4ab6d43 100644
--- a/src/VBox/Runtime/r3/tcp.cpp
+++ b/src/VBox/Runtime/r3/tcp.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #ifdef RT_OS_WINDOWS
-# include <winsock2.h>
+# include <iprt/win/winsock2.h>
 #else
 # include <sys/types.h>
 # include <sys/socket.h>
diff --git a/src/VBox/Runtime/r3/test.cpp b/src/VBox/Runtime/r3/test.cpp
index 79b2e76..cb76bea 100644
--- a/src/VBox/Runtime/r3/test.cpp
+++ b/src/VBox/Runtime/r3/test.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -144,6 +144,13 @@ typedef struct RTTESTINT
     size_t              cXmlElements;
     /** XML element stack. */
     const char         *apszXmlElements[10];
+
+    /** Number of times assertions has been disabled and quieted. */
+    uint32_t volatile   cAssertionsDisabledAndQuieted;
+    /** Saved RTAssertSetQuiet return code. */
+    bool                fAssertSavedQuiet;
+    /** Saved RTAssertSetMayPanic return code. */
+    bool                fAssertSavedMayPanic;
 } RTTESTINT;
 /** Pointer to a test instance. */
 typedef RTTESTINT *PRTTESTINT;
@@ -268,6 +275,9 @@ RTR3DECL(int) RTTestCreateEx(const char *pszTest, uint32_t fFlags, RTTESTLVL enm
     pTest->hXmlPipe         = NIL_RTPIPE;
     pTest->hXmlFile         = NIL_RTFILE;
     pTest->cXmlElements     = 0;
+    pTest->cAssertionsDisabledAndQuieted = 0;
+    pTest->fAssertSavedMayPanic          = true;
+    pTest->fAssertSavedQuiet             = false;
 
     rc = RTCritSectInit(&pTest->Lock);
     if (RT_SUCCESS(rc))
@@ -1760,3 +1770,40 @@ RTR3DECL(int) RTTestFailureDetails(RTTEST hTest, const char *pszFormat, ...)
     return cch;
 }
 
+
+RTR3DECL(int) RTTestDisableAssertions(RTTEST hTest)
+{
+    PRTTESTINT pTest = hTest;
+    RTTEST_GET_VALID_RETURN(pTest);
+
+    uint32_t cTimes = ASMAtomicIncU32(&pTest->cAssertionsDisabledAndQuieted);
+    if (cTimes >= 2 && cTimes <= 8)
+        return VINF_SUCCESS;
+    if (cTimes > 8)
+    {
+        RTAssertSetMayPanic(pTest->fAssertSavedMayPanic);
+        RTAssertSetQuiet(pTest->fAssertSavedQuiet);
+        Assert(cTimes <= 8);
+    }
+    pTest->fAssertSavedMayPanic = RTAssertSetMayPanic(false);
+    pTest->fAssertSavedQuiet    = RTAssertSetQuiet(true);
+    return VINF_SUCCESS;
+}
+
+
+RTR3DECL(int) RTTestRestoreAssertions(RTTEST hTest)
+{
+    PRTTESTINT pTest = hTest;
+    RTTEST_GET_VALID_RETURN(pTest);
+
+    uint32_t cTimes = ASMAtomicDecU32(&pTest->cAssertionsDisabledAndQuieted);
+    if (cTimes == 0)
+    {
+        RTAssertSetMayPanic(pTest->fAssertSavedMayPanic);
+        RTAssertSetQuiet(pTest->fAssertSavedQuiet);
+    }
+    else
+        AssertStmt(cTimes < UINT32_MAX / 2, ASMAtomicIncU32(&pTest->cAssertionsDisabledAndQuieted));
+    return VINF_SUCCESS;
+}
+
diff --git a/src/VBox/Runtime/r3/testi.cpp b/src/VBox/Runtime/r3/testi.cpp
index 6799c05..cf87034 100644
--- a/src/VBox/Runtime/r3/testi.cpp
+++ b/src/VBox/Runtime/r3/testi.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -174,3 +174,15 @@ RTR3DECL(int) RTTestIFailureDetails(const char *pszFormat, ...)
     return cch;
 }
 
+
+RTR3DECL(int) RTTestIDisableAssertions(void)
+{
+    return RTTestDisableAssertions(NIL_RTTEST);
+}
+
+
+RTR3DECL(int) RTTestIRestoreAssertions(void)
+{
+    return RTTestRestoreAssertions(NIL_RTTEST);
+}
+
diff --git a/src/VBox/Runtime/r3/udp.cpp b/src/VBox/Runtime/r3/udp.cpp
index 11bfd9d..ba36ed1 100644
--- a/src/VBox/Runtime/r3/udp.cpp
+++ b/src/VBox/Runtime/r3/udp.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #ifdef RT_OS_WINDOWS
-# include <winsock2.h>
+# include <iprt/win/winsock2.h>
 #else
 # include <sys/types.h>
 # include <sys/socket.h>
diff --git a/src/VBox/Runtime/r3/win/RTCrStoreCreateSnapshotById-win.cpp b/src/VBox/Runtime/r3/win/RTCrStoreCreateSnapshotById-win.cpp
index 4a9e185..f69e173 100644
--- a/src/VBox/Runtime/r3/win/RTCrStoreCreateSnapshotById-win.cpp
+++ b/src/VBox/Runtime/r3/win/RTCrStoreCreateSnapshotById-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -36,7 +36,7 @@
 #include <iprt/once.h>
 #include <iprt/ldr.h>
 
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 
 /*********************************************************************************************************************************
diff --git a/src/VBox/Runtime/r3/win/RTHandleGetStandard-win.cpp b/src/VBox/Runtime/r3/win/RTHandleGetStandard-win.cpp
index 8f9c1f6..7934b4e 100644
--- a/src/VBox/Runtime/r3/win/RTHandleGetStandard-win.cpp
+++ b/src/VBox/Runtime/r3/win/RTHandleGetStandard-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -37,7 +37,7 @@
 #include <iprt/err.h>
 #include <iprt/log.h>
 
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 #include "internal/socket.h"            /* (Needs Windows.h.) */
 
diff --git a/src/VBox/Runtime/r3/win/RTLogWriteDebugger-win.cpp b/src/VBox/Runtime/r3/win/RTLogWriteDebugger-win.cpp
index c611df9..1d1a209 100644
--- a/src/VBox/Runtime/r3/win/RTLogWriteDebugger-win.cpp
+++ b/src/VBox/Runtime/r3/win/RTLogWriteDebugger-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -28,7 +28,7 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 #include <iprt/log.h>
 #include <iprt/assert.h>
diff --git a/src/VBox/Runtime/r3/win/RTSystemQueryDmiString-win.cpp b/src/VBox/Runtime/r3/win/RTSystemQueryDmiString-win.cpp
index 7fc3287..b7e8e5c 100644
--- a/src/VBox/Runtime/r3/win/RTSystemQueryDmiString-win.cpp
+++ b/src/VBox/Runtime/r3/win/RTSystemQueryDmiString-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #define _WIN32_DCOM
-#include <Windows.h>
+#include <iprt/win/windows.h>
 #include <WbemCli.h>
 
 #include <iprt/system.h>
diff --git a/src/VBox/Runtime/r3/win/RTSystemQueryOSInfo-win.cpp b/src/VBox/Runtime/r3/win/RTSystemQueryOSInfo-win.cpp
index 39d7f7f..c46110c 100644
--- a/src/VBox/Runtime/r3/win/RTSystemQueryOSInfo-win.cpp
+++ b/src/VBox/Runtime/r3/win/RTSystemQueryOSInfo-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #include "internal/iprt.h"
-#include <Windows.h>
+#include <iprt/win/windows.h>
 #include <WinUser.h>
 
 #include "internal-r3-win.h"
diff --git a/src/VBox/Runtime/r3/win/RTSystemQueryTotalRam-win.cpp b/src/VBox/Runtime/r3/win/RTSystemQueryTotalRam-win.cpp
index e97f9a8..f992f2f 100644
--- a/src/VBox/Runtime/r3/win/RTSystemQueryTotalRam-win.cpp
+++ b/src/VBox/Runtime/r3/win/RTSystemQueryTotalRam-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -28,7 +28,7 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
-#include <windows.h>
+#include <iprt/win/windows.h>
 #include <iprt/system.h>
 #include "internal/iprt.h"
 
diff --git a/src/VBox/Runtime/r3/win/RTSystemShutdown-win.cpp b/src/VBox/Runtime/r3/win/RTSystemShutdown-win.cpp
index 6ae8554..eb20b05 100644
--- a/src/VBox/Runtime/r3/win/RTSystemShutdown-win.cpp
+++ b/src/VBox/Runtime/r3/win/RTSystemShutdown-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -35,7 +35,7 @@
 #include <iprt/err.h>
 #include <iprt/string.h>
 
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 
 RTDECL(int) RTSystemShutdown(RTMSINTERVAL cMsDelay, uint32_t fFlags, const char *pszLogMsg)
diff --git a/src/VBox/Runtime/r3/win/RTUuidCreate-win.cpp b/src/VBox/Runtime/r3/win/RTUuidCreate-win.cpp
index 9136b0b..0c118fe 100644
--- a/src/VBox/Runtime/r3/win/RTUuidCreate-win.cpp
+++ b/src/VBox/Runtime/r3/win/RTUuidCreate-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #define LOG_GROUP RTLOGGROUP_UUID
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 #include <iprt/uuid.h>
 #include <iprt/assert.h>
diff --git a/src/VBox/Runtime/r3/win/VBoxRT-msvcr100-win32.def b/src/VBox/Runtime/r3/win/VBoxRT-msvcr100-win32.def
index eb52122..6317e65 100644
--- a/src/VBox/Runtime/r3/win/VBoxRT-msvcr100-win32.def
+++ b/src/VBox/Runtime/r3/win/VBoxRT-msvcr100-win32.def
@@ -276,7 +276,7 @@
   ?set_unexpected@@YAP6AXXZP6AXXZ at Z
   ?swprintf@@YAHPAGIPBGZZ
   ?swprintf@@YAHPA_WIPB_WZZ
-  ?terminate@@YAXXZ ;fixme-causes-trouble-with-version-in-libcmt.lib; 
+  ?terminate@@YAXXZ ;fixme-causes-trouble-with-version-in-libcmt.lib;
   ?try_lock at critical_section@Concurrency@@QAE_NXZ
   ?try_lock at reader_writer_lock@Concurrency@@QAE_NXZ
   ?try_lock_read at reader_writer_lock@Concurrency@@QAE_NXZ
@@ -1638,4 +1638,3 @@
   wscanf
   wscanf_s
 
-
diff --git a/src/VBox/Runtime/r3/win/VBoxRT-openssl-ose.def b/src/VBox/Runtime/r3/win/VBoxRT-openssl-ose.def
index 249b3fe..a10f837 100644
--- a/src/VBox/Runtime/r3/win/VBoxRT-openssl-ose.def
+++ b/src/VBox/Runtime/r3/win/VBoxRT-openssl-ose.def
@@ -9,7 +9,7 @@
 ;
 
 ;
-; Copyright (C) 2009-2015 Oracle Corporation
+; Copyright (C) 2009-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/win/VBoxRT-openssl.def b/src/VBox/Runtime/r3/win/VBoxRT-openssl.def
index bacaa3f..86ed1be 100644
--- a/src/VBox/Runtime/r3/win/VBoxRT-openssl.def
+++ b/src/VBox/Runtime/r3/win/VBoxRT-openssl.def
@@ -1,4 +1,4 @@
-; $Id: VBoxRT-openssl.def $
+; $Id: VBoxRT-openssl.def 109093 2016-07-22 19:30:22Z bird $
 ;; @file
 ; IPRT - Windows OpenSSL exports.
 ;
@@ -9,7 +9,7 @@
 ;
 
 ;
-; Copyright (C) 2009-2015 Oracle Corporation
+; Copyright (C) 2009-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/win/VBoxRT-win32.def b/src/VBox/Runtime/r3/win/VBoxRT-win32.def
index 1cecf92..45828a8 100644
--- a/src/VBox/Runtime/r3/win/VBoxRT-win32.def
+++ b/src/VBox/Runtime/r3/win/VBoxRT-win32.def
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/win/VBoxRT-win64.def b/src/VBox/Runtime/r3/win/VBoxRT-win64.def
index f24ecca..b1de963 100644
--- a/src/VBox/Runtime/r3/win/VBoxRT-win64.def
+++ b/src/VBox/Runtime/r3/win/VBoxRT-win64.def
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/win/alloc-win.cpp b/src/VBox/Runtime/r3/win/alloc-win.cpp
index 906834a..19c3740 100644
--- a/src/VBox/Runtime/r3/win/alloc-win.cpp
+++ b/src/VBox/Runtime/r3/win/alloc-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -30,7 +30,7 @@
 *********************************************************************************************************************************/
 /*#define USE_VIRTUAL_ALLOC*/
 #define LOG_GROUP RTLOGGROUP_MEM
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 #include <iprt/alloc.h>
 #include <iprt/assert.h>
@@ -45,6 +45,8 @@
 
 RTDECL(void *) RTMemExecAllocTag(size_t cb, const char *pszTag) RT_NO_THROW_DEF
 {
+    RT_NOREF_PV(pszTag);
+
     /*
      * Allocate first.
      */
@@ -72,6 +74,8 @@ RTDECL(void *) RTMemExecAllocTag(size_t cb, const char *pszTag) RT_NO_THROW_DEF
 
 RTDECL(void)    RTMemExecFree(void *pv, size_t cb) RT_NO_THROW_DEF
 {
+    RT_NOREF_PV(cb);
+
     if (pv)
         free(pv);
 }
@@ -79,6 +83,8 @@ RTDECL(void)    RTMemExecFree(void *pv, size_t cb) RT_NO_THROW_DEF
 
 RTDECL(void *) RTMemPageAllocTag(size_t cb, const char *pszTag) RT_NO_THROW_DEF
 {
+    RT_NOREF_PV(pszTag);
+
 #ifdef USE_VIRTUAL_ALLOC
     void *pv = VirtualAlloc(NULL, RT_ALIGN_Z(cb, PAGE_SIZE), MEM_COMMIT, PAGE_READWRITE);
 #else
@@ -91,6 +97,8 @@ RTDECL(void *) RTMemPageAllocTag(size_t cb, const char *pszTag) RT_NO_THROW_DEF
 
 RTDECL(void *) RTMemPageAllocZTag(size_t cb, const char *pszTag) RT_NO_THROW_DEF
 {
+    RT_NOREF_PV(pszTag);
+
 #ifdef USE_VIRTUAL_ALLOC
     void *pv = VirtualAlloc(NULL, RT_ALIGN_Z(cb, PAGE_SIZE), MEM_COMMIT, PAGE_READWRITE);
 #else
@@ -108,6 +116,8 @@ RTDECL(void *) RTMemPageAllocZTag(size_t cb, const char *pszTag) RT_NO_THROW_DEF
 
 RTDECL(void) RTMemPageFree(void *pv, size_t cb) RT_NO_THROW_DEF
 {
+    RT_NOREF_PV(cb);
+
     if (pv)
     {
 #ifdef USE_VIRTUAL_ALLOC
diff --git a/src/VBox/Runtime/r3/win/allocex-win.cpp b/src/VBox/Runtime/r3/win/allocex-win.cpp
index 108530e..7800bfa 100644
--- a/src/VBox/Runtime/r3/win/allocex-win.cpp
+++ b/src/VBox/Runtime/r3/win/allocex-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -37,7 +37,7 @@
 #include <iprt/param.h>
 #include "../allocex.h"
 
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 
 static int rtMemAllocExInRange(size_t cbAlloc, uint32_t fFlags, void **ppv, uintptr_t uAddr, uintptr_t uAddrLast)
@@ -114,7 +114,9 @@ DECLHIDDEN(int) rtMemAllocEx32BitReach(size_t cbAlloc, uint32_t fFlags, void **p
 
 DECLHIDDEN(void) rtMemFreeExYyBitReach(void *pv, size_t cb, uint32_t fFlags)
 {
+    RT_NOREF_PV(fFlags);
+
     BOOL fRc = VirtualFree(pv, cb, MEM_RELEASE);
-    Assert(fRc);
+    Assert(fRc); RT_NOREF_PV(fRc);
 }
 
diff --git a/src/VBox/Runtime/r3/win/dir-win.cpp b/src/VBox/Runtime/r3/win/dir-win.cpp
index f51d162..67689f7 100644
--- a/src/VBox/Runtime/r3/win/dir-win.cpp
+++ b/src/VBox/Runtime/r3/win/dir-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #define LOG_GROUP RTLOGGROUP_DIR
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 #include <iprt/dir.h>
 #include <iprt/path.h>
@@ -130,6 +130,7 @@ RTDECL(int) RTDirRemove(const char *pszPath)
 
 RTDECL(int) RTDirFlush(const char *pszPath)
 {
+    RT_NOREF_PV(pszPath);
     return VERR_NOT_SUPPORTED;
 }
 
diff --git a/src/VBox/Runtime/r3/win/direnum-win.cpp b/src/VBox/Runtime/r3/win/direnum-win.cpp
index 1b7e88c..76d5e74 100644
--- a/src/VBox/Runtime/r3/win/direnum-win.cpp
+++ b/src/VBox/Runtime/r3/win/direnum-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #define LOG_GROUP RTLOGGROUP_DIR
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 #include <iprt/dir.h>
 #include <iprt/path.h>
diff --git a/src/VBox/Runtime/r3/win/dllmain-win.cpp b/src/VBox/Runtime/r3/win/dllmain-win.cpp
index ad57121..7fe6c8e 100644
--- a/src/VBox/Runtime/r3/win/dllmain-win.cpp
+++ b/src/VBox/Runtime/r3/win/dllmain-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -28,7 +28,7 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
-#include <Windows.h>
+#include <iprt/win/windows.h>
 #include <iprt/thread.h>
 #include <iprt/param.h>
 #include "internal/thread.h"
@@ -40,6 +40,8 @@
  */
 BOOL __stdcall DllMain(HANDLE hModule, DWORD dwReason, PVOID pvReserved)
 {
+    RT_NOREF_PV(pvReserved);
+
     switch (dwReason)
     {
         /*
diff --git a/src/VBox/Runtime/r3/win/env-win.cpp b/src/VBox/Runtime/r3/win/env-win.cpp
index eda445c..aefd705 100644
--- a/src/VBox/Runtime/r3/win/env-win.cpp
+++ b/src/VBox/Runtime/r3/win/env-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/win/errvars-win.cpp b/src/VBox/Runtime/r3/win/errvars-win.cpp
index c61f524..50d1c3d 100644
--- a/src/VBox/Runtime/r3/win/errvars-win.cpp
+++ b/src/VBox/Runtime/r3/win/errvars-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -28,7 +28,7 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
-#include <Winsock2.h>
+#include <iprt/win/winsock2.h>
 #include <errno.h>
 
 #include <iprt/err.h>
@@ -76,7 +76,7 @@ RTDECL(bool) RTErrVarsHaveChanged(PCRTERRVARS pVars)
     Assert(pVars->ai32Vars[0] == RTERRVARS_MAGIC);
 
     return pVars->ai32Vars[0] != RTERRVARS_MAGIC
-        || pVars->ai32Vars[1] != GetLastError()
+        || (uint32_t)pVars->ai32Vars[1] != GetLastError()
         || pVars->ai32Vars[2] != WSAGetLastError()
         || pVars->ai32Vars[3] != errno;
 }
diff --git a/src/VBox/Runtime/r3/win/fileaio-win.cpp b/src/VBox/Runtime/r3/win/fileaio-win.cpp
index 511b2aa..1d0d981 100644
--- a/src/VBox/Runtime/r3/win/fileaio-win.cpp
+++ b/src/VBox/Runtime/r3/win/fileaio-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -39,7 +39,7 @@
 #include <iprt/log.h>
 #include "internal/fileaio.h"
 
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 
 /*********************************************************************************************************************************
@@ -125,7 +125,6 @@ typedef RTFILEAIOREQINTERNAL *PRTFILEAIOREQINTERNAL;
 
 RTR3DECL(int) RTFileAioGetLimits(PRTFILEAIOLIMITS pAioLimits)
 {
-    int rcBSD = 0;
     AssertPtrReturn(pAioLimits, VERR_INVALID_POINTER);
 
     /* No limits known. */
@@ -223,6 +222,7 @@ RTDECL(int) RTFileAioReqPrepareFlush(RTFILEAIOREQ hReq, RTFILE hFile, void *pvUs
     RTFILEAIOREQ_VALID_RETURN(pReqInt);
     RTFILEAIOREQ_NOT_STATE_RETURN_RC(pReqInt, SUBMITTED, VERR_FILE_AIO_IN_PROGRESS);
     AssertReturn(hFile != NIL_RTFILE, VERR_INVALID_HANDLE);
+    RT_NOREF_PV(pvUser);
 
     return VERR_NOT_SUPPORTED;
 }
@@ -270,12 +270,12 @@ RTDECL(int) RTFileAioReqGetRC(RTFILEAIOREQ hReq, size_t *pcbTransfered)
     return rc;
 }
 
-RTDECL(int) RTFileAioCtxCreate(PRTFILEAIOCTX phAioCtx, uint32_t cAioReqsMax,
-                               uint32_t fFlags)
+RTDECL(int) RTFileAioCtxCreate(PRTFILEAIOCTX phAioCtx, uint32_t cAioReqsMax, uint32_t fFlags)
 {
     PRTFILEAIOCTXINTERNAL pCtxInt;
     AssertPtrReturn(phAioCtx, VERR_INVALID_POINTER);
     AssertReturn(!(fFlags & ~RTFILEAIOCTX_FLAGS_VALID_MASK), VERR_INVALID_PARAMETER);
+    RT_NOREF_PV(cAioReqsMax);
 
     pCtxInt = (PRTFILEAIOCTXINTERNAL)RTMemAllocZ(sizeof(RTFILEAIOCTXINTERNAL));
     if (RT_UNLIKELY(!pCtxInt))
@@ -333,6 +333,7 @@ RTDECL(int) RTFileAioCtxAssociateWithFile(RTFILEAIOCTX hAioCtx, RTFILE hFile)
 
 RTDECL(uint32_t) RTFileAioCtxGetMaxReqCount(RTFILEAIOCTX hAioCtx)
 {
+    RT_NOREF_PV(hAioCtx);
     return RTFILEAIO_UNLIMITED_REQS;
 }
 
diff --git a/src/VBox/Runtime/r3/win/fileio-win.cpp b/src/VBox/Runtime/r3/win/fileio-win.cpp
index 5296093..5424859 100644
--- a/src/VBox/Runtime/r3/win/fileio-win.cpp
+++ b/src/VBox/Runtime/r3/win/fileio-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -32,7 +32,7 @@
 #ifndef _WIN32_WINNT
 # define _WIN32_WINNT 0x0500
 #endif
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 #include <iprt/file.h>
 
@@ -699,6 +699,7 @@ RTR3DECL(int) RTFileGetMaxSizeEx(RTFILE hFile, PRTFOFF pcbMax)
      * back on NtQueryVolumeInformationFile(,,,, FileFsAttributeInformation)
      * else where, and check for known file system names. (For LAN shares we'll
      * have to figure out the remote file system.) */
+    RT_NOREF_PV(hFile); RT_NOREF_PV(pcbMax);
     return VERR_NOT_IMPLEMENTED;
 }
 
@@ -942,6 +943,8 @@ RTR3DECL(int) RTFileQueryInfo(RTFILE hFile, PRTFSOBJINFO pObjInfo, RTFSOBJATTRAD
 RTR3DECL(int) RTFileSetTimes(RTFILE hFile, PCRTTIMESPEC pAccessTime, PCRTTIMESPEC pModificationTime,
                              PCRTTIMESPEC pChangeTime, PCRTTIMESPEC pBirthTime)
 {
+    RT_NOREF_PV(pChangeTime); /* Not exposed thru the windows API we're using. */
+
     if (!pAccessTime && !pModificationTime && !pBirthTime)
         return VINF_SUCCESS;    /* NOP */
 
@@ -1005,6 +1008,7 @@ RTR3DECL(int) RTFileQueryFsSizes(RTFILE hFile, PRTFOFF pcbTotal, RTFOFF *pcbFree
 {
     /** @todo implement this using NtQueryVolumeInformationFile(hFile,,,,
      *        FileFsSizeInformation). */
+    RT_NOREF_PV(hFile); RT_NOREF_PV(pcbTotal); RT_NOREF_PV(pcbFree); RT_NOREF_PV(pcbBlock); RT_NOREF_PV(pcbSector);
     return VERR_NOT_SUPPORTED;
 }
 
diff --git a/src/VBox/Runtime/r3/win/fs-win.cpp b/src/VBox/Runtime/r3/win/fs-win.cpp
index 791435f..d53b508 100644
--- a/src/VBox/Runtime/r3/win/fs-win.cpp
+++ b/src/VBox/Runtime/r3/win/fs-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #define LOG_GROUP RTLOGGROUP_FS
-#include <windows.h>
+#include <iprt/win/windows.h>
 
 #include <iprt/fs.h>
 #include <iprt/path.h>
diff --git a/src/VBox/Runtime/r3/win/init-win.cpp b/src/VBox/Runtime/r3/win/init-win.cpp
index f88a07c..4fed218 100644
--- a/src/VBox/Runtime/r3/win/init-win.cpp
+++ b/src/VBox/Runtime/r3/win/init-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #define LOG_GROUP RTLOGGROUP_DEFAULT
-#include <Windows.h>
+#include <iprt/win/windows.h>
 #ifndef LOAD_LIBRARY_SEARCH_APPLICATION_DIR
 # define LOAD_LIBRARY_SEARCH_APPLICATION_DIR    0x200
 # define LOAD_LIBRARY_SEARCH_SYSTEM32           0x800
@@ -343,6 +343,7 @@ DECLHIDDEN(void) rtR3InitNativeObtrusive(uint32_t fFlags)
 DECLHIDDEN(int) rtR3InitNativeFinal(uint32_t fFlags)
 {
     /* Nothing to do here. */
+    RT_NOREF_PV(fFlags);
     return VINF_SUCCESS;
 }
 
diff --git a/src/VBox/Runtime/r3/win/internal-r3-win.h b/src/VBox/Runtime/r3/win/internal-r3-win.h
index f4b99e1..7b0bcf3 100644
--- a/src/VBox/Runtime/r3/win/internal-r3-win.h
+++ b/src/VBox/Runtime/r3/win/internal-r3-win.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/win/ldrNative-win.cpp b/src/VBox/Runtime/r3/win/ldrNative-win.cpp
index 575c79c..7f63356 100644
--- a/src/VBox/Runtime/r3/win/ldrNative-win.cpp
+++ b/src/VBox/Runtime/r3/win/ldrNative-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -244,7 +244,6 @@ int rtldrNativeLoadSystem(const char *pszFilename, const char *pszExt, uint32_t
                  * returns a system32 path for some reason).
                  */
                 unsigned cMatchingComponents = 0;
-                unsigned cSlashes = 0;
                 size_t   off = 0;
                 while (off < pUniStrResult->Length)
                 {
diff --git a/src/VBox/Runtime/r3/win/localipc-win.cpp b/src/VBox/Runtime/r3/win/localipc-win.cpp
index da3ff4b..33b786b 100644
--- a/src/VBox/Runtime/r3/win/localipc-win.cpp
+++ b/src/VBox/Runtime/r3/win/localipc-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -41,7 +41,7 @@
 # define _WIN32_WINNT 0x0500
 #endif
 #define UNICODE    /* For the SDDL_ strings. */
-#include <Windows.h>
+#include <iprt/win/windows.h>
 #include <sddl.h>
 
 #include "internal/iprt.h"
@@ -454,7 +454,7 @@ RTDECL(int) RTLocalIpcServerCreate(PRTLOCALIPCSERVER phServer, const char *pszNa
 DECLINLINE(void) rtLocalIpcServerRetain(PRTLOCALIPCSERVERINT pThis)
 {
     uint32_t cRefs = ASMAtomicIncU32(&pThis->cRefs);
-    Assert(cRefs < UINT32_MAX / 2 && cRefs);
+    Assert(cRefs < UINT32_MAX / 2 && cRefs); NOREF(cRefs);
 }
 
 
@@ -902,7 +902,7 @@ static int rtLocalIpcWinCancel(PRTLOCALIPCSESSIONINT pThis)
 DECLINLINE(void) rtLocalIpcSessionRetain(PRTLOCALIPCSESSIONINT pThis)
 {
     uint32_t cRefs = ASMAtomicIncU32(&pThis->cRefs);
-    Assert(cRefs < UINT32_MAX / 2 && cRefs);
+    Assert(cRefs < UINT32_MAX / 2 && cRefs); NOREF(cRefs);
 }
 
 
@@ -1122,7 +1122,7 @@ RTDECL(int) RTLocalIpcSessionRead(RTLOCALIPCSESSION hSession, void *pvBuf, size_
                     }
                     else if (GetLastError() == ERROR_IO_PENDING)
                     {
-                        DWORD rcWait = WaitForSingleObject(pThis->Read.OverlappedIO.hEvent, INFINITE);
+                        WaitForSingleObject(pThis->Read.OverlappedIO.hEvent, INFINITE);
 
                         RTCritSectEnter(&pThis->CritSect);
                         if (GetOverlappedResult(pThis->hNmPipe, &pThis->Read.OverlappedIO, &cbRead, TRUE /*fWait*/))
@@ -1530,7 +1530,7 @@ RTDECL(int) RTLocalIpcSessionWaitForData(RTLOCALIPCSESSION hSession, uint32_t cM
                         rc = VERR_TIMEOUT;
                         break;
                     }
-                    BOOL fRc = ResetEvent(pThis->Read.OverlappedIO.hEvent); Assert(fRc == TRUE);
+                    BOOL fRc = ResetEvent(pThis->Read.OverlappedIO.hEvent); Assert(fRc == TRUE); NOREF(fRc);
                     DWORD cbRead = 0;
                     if (ReadFile(pThis->hNmPipe, pThis->abBuf, 0 /*cbToRead*/, &cbRead, &pThis->Read.OverlappedIO))
                     {
@@ -1552,7 +1552,7 @@ RTDECL(int) RTLocalIpcSessionWaitForData(RTLOCALIPCSESSION hSession, uint32_t cM
                 /*
                  * Check for timeout.
                  */
-                DWORD cMsMaxWait;
+                DWORD cMsMaxWait = INFINITE; /* (MSC maybe used uninitialized) */
                 if (cMillies == RT_INDEFINITE_WAIT)
                     cMsMaxWait = INFINITE;
                 else if (   hWait != INVALID_HANDLE_VALUE
@@ -1621,18 +1621,21 @@ RTDECL(int) RTLocalIpcSessionCancel(RTLOCALIPCSESSION hSession)
 
 RTDECL(int) RTLocalIpcSessionQueryProcess(RTLOCALIPCSESSION hSession, PRTPROCESS pProcess)
 {
+    RT_NOREF_PV(hSession); RT_NOREF_PV(pProcess);
     return VERR_NOT_SUPPORTED;
 }
 
 
 RTDECL(int) RTLocalIpcSessionQueryUserId(RTLOCALIPCSESSION hSession, PRTUID pUid)
 {
+    RT_NOREF_PV(hSession); RT_NOREF_PV(pUid);
     return VERR_NOT_SUPPORTED;
 }
 
 
-RTDECL(int) RTLocalIpcSessionQueryGroupId(RTLOCALIPCSESSION hSession, PRTUID pUid)
+RTDECL(int) RTLocalIpcSessionQueryGroupId(RTLOCALIPCSESSION hSession, PRTGID pGid)
 {
+    RT_NOREF_PV(hSession); RT_NOREF_PV(pGid);
     return VERR_NOT_SUPPORTED;
 }
 
diff --git a/src/VBox/Runtime/r3/win/mp-win.cpp b/src/VBox/Runtime/r3/win/mp-win.cpp
index 70d5205..e723e5d 100644
--- a/src/VBox/Runtime/r3/win/mp-win.cpp
+++ b/src/VBox/Runtime/r3/win/mp-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #define LOG_GROUP RTLOGGROUP_SYSTEM
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 #include <iprt/mp.h>
 #include "internal/iprt.h"
diff --git a/src/VBox/Runtime/r3/win/ntdll-mini-implib.def b/src/VBox/Runtime/r3/win/ntdll-mini-implib.def
index e220cba..68b7ce2 100644
--- a/src/VBox/Runtime/r3/win/ntdll-mini-implib.def
+++ b/src/VBox/Runtime/r3/win/ntdll-mini-implib.def
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2010-2015 Oracle Corporation
+; Copyright (C) 2010-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/win/path-win.cpp b/src/VBox/Runtime/r3/win/path-win.cpp
index 9e85c5a..a3c31cc 100644
--- a/src/VBox/Runtime/r3/win/path-win.cpp
+++ b/src/VBox/Runtime/r3/win/path-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,8 +29,8 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #define LOG_GROUP RTLOGGROUP_PATH
-#include <Windows.h>
-#include <Shlobj.h>
+#include <iprt/win/windows.h>
+#include <iprt/win/shlobj.h>
 
 #include <iprt/path.h>
 #include <iprt/assert.h>
@@ -607,6 +607,7 @@ RTR3DECL(int) RTPathRename(const char *pszSrc, const char *pszDst, unsigned fRen
 
 RTR3DECL(int) RTPathUnlink(const char *pszPath, uint32_t fUnlink)
 {
+    RT_NOREF_PV(pszPath); RT_NOREF_PV(fUnlink);
     return VERR_NOT_IMPLEMENTED;
 }
 
diff --git a/src/VBox/Runtime/r3/win/pipe-win.cpp b/src/VBox/Runtime/r3/win/pipe-win.cpp
index 807df71..99aec69 100644
--- a/src/VBox/Runtime/r3/win/pipe-win.cpp
+++ b/src/VBox/Runtime/r3/win/pipe-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -28,7 +28,7 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 #include <iprt/pipe.h>
 #include "internal/iprt.h"
@@ -126,17 +126,17 @@ typedef struct _FILE_PIPE_LOCAL_INFORMATION {
      ULONG NamedPipeEnd;
 } FILE_PIPE_LOCAL_INFORMATION, *PFILE_PIPE_LOCAL_INFORMATION;
 
-#define FILE_PIPE_DISCONNECTED_STATE    0x00000001
-#define FILE_PIPE_LISTENING_STATE       0x00000002
-#define FILE_PIPE_CONNECTED_STATE       0x00000003
-#define FILE_PIPE_CLOSING_STATE         0x00000004
+#define FILE_PIPE_DISCONNECTED_STATE    0x00000001U
+#define FILE_PIPE_LISTENING_STATE       0x00000002U
+#define FILE_PIPE_CONNECTED_STATE       0x00000003U
+#define FILE_PIPE_CLOSING_STATE         0x00000004U
 
-#define FILE_PIPE_INBOUND               0x00000000
-#define FILE_PIPE_OUTBOUND              0x00000001
-#define FILE_PIPE_FULL_DUPLEX           0x00000002
+#define FILE_PIPE_INBOUND               0x00000000U
+#define FILE_PIPE_OUTBOUND              0x00000001U
+#define FILE_PIPE_FULL_DUPLEX           0x00000002U
 
-#define FILE_PIPE_CLIENT_END            0x00000000
-#define FILE_PIPE_SERVER_END            0x00000001
+#define FILE_PIPE_CLIENT_END            0x00000000U
+#define FILE_PIPE_SERVER_END            0x00000001U
 
 extern "C" NTSYSAPI NTSTATUS WINAPI NtQueryInformationFile(HANDLE, PIO_STATUS_BLOCK, PVOID, LONG, FILE_INFORMATION_CLASS);
 
@@ -857,7 +857,7 @@ RTDECL(int) RTPipeWriteBlocking(RTPIPE hPipe, const void *pvBuf, size_t cbToWrit
                     Assert(pThis->fIOPending);
                     HANDLE hEvent = pThis->Overlapped.hEvent;
                     RTCritSectLeave(&pThis->CritSect);
-                    WaitForSingleObject(pThis->Overlapped.hEvent, INFINITE);
+                    WaitForSingleObject(hEvent, INFINITE);
                     RTCritSectEnter(&pThis->CritSect);
                 }
             }
@@ -927,9 +927,7 @@ RTDECL(int) RTPipeWriteBlocking(RTPIPE hPipe, const void *pvBuf, size_t cbToWrit
     }
     return rc;
 
-#if 1
-    return VERR_NOT_IMPLEMENTED;
-#else
+#if 0 /** @todo r=bird: What's this? */
     int rc = rtPipeTryBlocking(pThis);
     if (RT_SUCCESS(rc))
     {
@@ -1307,6 +1305,7 @@ uint32_t rtPipePollStart(RTPIPE hPipe, RTPOLLSET hPollSet, uint32_t fEvents, boo
     RTPIPEINTERNAL *pThis = hPipe;
     AssertPtrReturn(pThis, UINT32_MAX);
     AssertReturn(pThis->u32Magic == RTPIPE_MAGIC, UINT32_MAX);
+    RT_NOREF_PV(fFinalEntry);
 
     int rc = RTCritSectEnter(&pThis->CritSect);
     AssertRCReturn(rc, UINT32_MAX);
@@ -1387,6 +1386,8 @@ uint32_t rtPipePollDone(RTPIPE hPipe, uint32_t fEvents, bool fFinalEntry, bool f
     RTPIPEINTERNAL *pThis = hPipe;
     AssertPtrReturn(pThis, 0);
     AssertReturn(pThis->u32Magic == RTPIPE_MAGIC, 0);
+    RT_NOREF_PV(fFinalEntry);
+    RT_NOREF_PV(fHarvestEvents);
 
     int rc = RTCritSectEnter(&pThis->CritSect);
     AssertRCReturn(rc, 0);
diff --git a/src/VBox/Runtime/r3/win/process-win.cpp b/src/VBox/Runtime/r3/win/process-win.cpp
index 717435a..51d29eb 100644
--- a/src/VBox/Runtime/r3/win/process-win.cpp
+++ b/src/VBox/Runtime/r3/win/process-win.cpp
@@ -308,6 +308,7 @@ static DECLCALLBACK(int) rtProcWinResolveOnce(void *pvUser)
 {
     int      rc;
     RTLDRMOD hMod;
+    RT_NOREF_PV(pvUser);
 
     /*
      * kernel32.dll APIs introduced after NT4.
@@ -499,7 +500,7 @@ static bool rtProcWinFindTokenByProcessAndPsApi(const char * const *papszNames,
     bool   fFound          = false;
     int    rc              = VINF_SUCCESS;
     DWORD  cbPidsAllocated = 4096;
-    DWORD  cbPidsReturned;
+    DWORD  cbPidsReturned  = 0; /* (MSC maybe used uninitialized) */
     DWORD *paPids;
     for (;;)
     {
@@ -2078,7 +2079,7 @@ static int rtProcWinCreateEnvBlockAndFindExe(uint32_t fFlags, RTENV hEnv, const
      * In most cases, we just need to convert the incoming enviornment to a
      * UTF-16 environment block.
      */
-    RTENV hEnvToUse;
+    RTENV hEnvToUse = NIL_RTENV; /* (MSC maybe used uninitialized) */
     if (   !(fFlags & (RTPROC_FLAGS_PROFILE | RTPROC_FLAGS_ENV_CHANGE_RECORD))
         || (hEnv == RTENV_DEFAULT && !(fFlags & RTPROC_FLAGS_PROFILE))
         || (hEnv != RTENV_DEFAULT && !(fFlags & RTPROC_FLAGS_ENV_CHANGE_RECORD)) )
@@ -2252,7 +2253,7 @@ RTR3DECL(int)   RTProcCreateEx(const char *pszExec, const char * const *papszArg
     /*
      * Create the command line and convert the executable name.
      */
-    PRTUTF16 pwszCmdLine;
+    PRTUTF16 pwszCmdLine = NULL; /* Shut up, MSC! */
     if (RT_SUCCESS(rc))
         rc = RTGetOptArgvToUtf16String(&pwszCmdLine, papszArgs,
                                        !(fFlags & RTPROC_FLAGS_UNQUOTED_ARGS)
@@ -2497,7 +2498,7 @@ RTR3DECL(uint64_t) RTProcGetAffinityMask(void)
     DWORD_PTR dwSystemAffinityMask;
 
     BOOL fRc = GetProcessAffinityMask(GetCurrentProcess(), &dwProcessAffinityMask, &dwSystemAffinityMask);
-    Assert(fRc);
+    Assert(fRc); NOREF(fRc);
 
     return dwProcessAffinityMask;
 }
diff --git a/src/VBox/Runtime/r3/win/rtFileNativeSetAttributes-win.cpp b/src/VBox/Runtime/r3/win/rtFileNativeSetAttributes-win.cpp
index 0b05e86..7c243d3 100644
--- a/src/VBox/Runtime/r3/win/rtFileNativeSetAttributes-win.cpp
+++ b/src/VBox/Runtime/r3/win/rtFileNativeSetAttributes-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -28,27 +28,16 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
-/* APIs used here require DDK headers. */
-#include <wdm.h>
+#include <iprt/nt/nt.h>
+#include <iprt/string.h>
 
-/* Declare ntdll exports. */
-extern "C"
-{
-NTSYSAPI ULONG NTAPI RtlNtStatusToDosError (IN NTSTATUS Status);
-
-NTSYSAPI NTSTATUS NTAPI NtSetInformationFile(IN HANDLE FileHandle,
-                                             OUT PIO_STATUS_BLOCK IoStatusBlock,
-                                             IN PVOID FileInformation,
-                                             IN ULONG Length,
-                                             IN FILE_INFORMATION_CLASS FileInformationClass);
-}
 
 /** Windows/NT worker.
  * @todo rename to rtFileWinSetAttributes */
 int rtFileNativeSetAttributes(HANDLE hFile, ULONG fAttributes)
 {
     IO_STATUS_BLOCK IoStatusBlock;
-    memset(&IoStatusBlock, 0, sizeof(IoStatusBlock));
+    RT_ZERO(IoStatusBlock);
 
     /*
      * Members that are set 0 will not be modified on the file object.
@@ -56,16 +45,15 @@ int rtFileNativeSetAttributes(HANDLE hFile, ULONG fAttributes)
      * for details.
      */
     FILE_BASIC_INFORMATION Info;
-    memset(&Info, 0, sizeof(Info));
+    RT_ZERO(Info);
     Info.FileAttributes = fAttributes;
 
     /** @todo resolve dynamically to avoid dragging in NtDll? */
-    NTSTATUS Status = NtSetInformationFile(hFile,
-                                           &IoStatusBlock,
-                                           &Info,
-                                           sizeof(Info),
-                                           FileBasicInformation);
-
-    return RtlNtStatusToDosError(Status);
+    NTSTATUS rcNt = NtSetInformationFile(hFile,
+                                         &IoStatusBlock,
+                                         &Info,
+                                         sizeof(Info),
+                                         FileBasicInformation);
+    return RtlNtStatusToDosError(rcNt);
 }
 
diff --git a/src/VBox/Runtime/r3/win/rtProcInitExePath-win.cpp b/src/VBox/Runtime/r3/win/rtProcInitExePath-win.cpp
index 4248add..a564119 100644
--- a/src/VBox/Runtime/r3/win/rtProcInitExePath-win.cpp
+++ b/src/VBox/Runtime/r3/win/rtProcInitExePath-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #define LOG_GROUP RTLOGGROUP_PROCESS
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 #include <iprt/string.h>
 #include <iprt/assert.h>
diff --git a/src/VBox/Runtime/r3/win/sched-win.cpp b/src/VBox/Runtime/r3/win/sched-win.cpp
index 2bdb053..db6632d 100644
--- a/src/VBox/Runtime/r3/win/sched-win.cpp
+++ b/src/VBox/Runtime/r3/win/sched-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -33,7 +33,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #define LOG_GROUP RTLOGGROUP_THREAD
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 #include <iprt/thread.h>
 #include <iprt/log.h>
@@ -64,7 +64,7 @@ typedef struct
         /** For sanity include the array index. */
         RTTHREADTYPE    enmType;
         /** The Win32 thread priority. */
-        DWORD           dwThreadPriority;
+        int             iThreadPriority;
     } aTypes[RTTHREADTYPE_END];
 } PROCPRIORITY;
 
@@ -258,7 +258,7 @@ static const PROCPRIORITY *g_pProcessPriority = &g_aDefaultPriority;
  */
 DECLHIDDEN(int) rtSchedNativeCalcDefaultPriority(RTTHREADTYPE enmType)
 {
-    Assert(enmType > RTTHREADTYPE_INVALID && enmType < RTTHREADTYPE_END);
+    Assert(enmType > RTTHREADTYPE_INVALID && enmType < RTTHREADTYPE_END); RT_NOREF_PV(enmType);
     return VINF_SUCCESS;
 }
 
@@ -274,7 +274,7 @@ DECLHIDDEN(int) rtSchedNativeCalcDefaultPriority(RTTHREADTYPE enmType)
  */
 DECLHIDDEN(int) rtProcNativeSetPriority(RTPROCPRIORITY enmPriority)
 {
-    Assert(enmPriority > RTPROCPRIORITY_INVALID && enmPriority < RTPROCPRIORITY_LAST);
+    Assert(enmPriority > RTPROCPRIORITY_INVALID && enmPriority < RTPROCPRIORITY_LAST); RT_NOREF_PV(enmPriority);
     return VINF_SUCCESS;
 }
 
@@ -312,13 +312,13 @@ DECLHIDDEN(int) rtThreadNativeSetPriority(PRTTHREADINT pThread, RTTHREADTYPE enm
               ("enmType=%d entry=%d\n", enmType, g_pProcessPriority->aTypes[enmType].enmType));
 
 #ifdef WIN32_SCHED_ENABLED
-    if (SetThreadPriority(rtThreadNativeGetHandle(pThread), g_pProcessPriority->aTypes[enmType].dwThreadPriority))
+    if (SetThreadPriority(rtThreadNativeGetHandle(pThread), g_pProcessPriority->aTypes[enmType].iThreadPriority))
         return VINF_SUCCESS;
 
     DWORD dwLastError = GetLastError();
     int rc = RTErrConvertFromWin32(dwLastError);
     AssertMsgFailed(("SetThreadPriority(%p, %d) failed, dwLastError=%d rc=%Rrc\n",
-                     rtThreadNativeGetHandle(pThread), g_pProcessPriority->aTypes[enmType].dwThreadPriority, dwLastError, rc));
+                     rtThreadNativeGetHandle(pThread), g_pProcessPriority->aTypes[enmType].iThreadPriority, dwLastError, rc));
     return rc;
 #else
     return VINF_SUCCESS;
diff --git a/src/VBox/Runtime/r3/win/semevent-win.cpp b/src/VBox/Runtime/r3/win/semevent-win.cpp
index ac426dd..37490e4 100644
--- a/src/VBox/Runtime/r3/win/semevent-win.cpp
+++ b/src/VBox/Runtime/r3/win/semevent-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #define LOG_GROUP RTLOGGROUP_SEMAPHORE
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 #include <iprt/semaphore.h>
 #include "internal/iprt.h"
@@ -112,6 +112,8 @@ RTDECL(int)  RTSemEventCreateEx(PRTSEMEVENT phEventSem, uint32_t fFlags, RTLOCKV
             va_end(va);
         }
         pThis->fEverHadSignallers = false;
+#else
+        RT_NOREF_PV(hClass); RT_NOREF_PV(pszNameFmt);
 #endif
 
         *phEventSem = pThis;
@@ -210,6 +212,7 @@ DECL_FORCE_INLINE(int) rtSemEventWaitHandleStatus(struct RTSEMEVENTINTERNAL *pTh
                 return rc2;
 
             AssertMsgFailed(("WaitForSingleObject(event) -> rc=%d while converted lasterr=%d\n", rc, rc2));
+            RT_NOREF_PV(pThis);
             return VERR_INTERNAL_ERROR;
         }
     }
@@ -219,8 +222,6 @@ DECL_FORCE_INLINE(int) rtSemEventWaitHandleStatus(struct RTSEMEVENTINTERNAL *pTh
 #undef RTSemEventWaitNoResume
 RTDECL(int)   RTSemEventWaitNoResume(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies)
 {
-    PCRTLOCKVALSRCPOS pSrcPos = NULL;
-
     /*
      * Validate input.
      */
@@ -242,7 +243,7 @@ RTDECL(int)   RTSemEventWaitNoResume(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies
                                          TRUE /*fAlertable*/);
         if (rc != WAIT_TIMEOUT || cMillies == 0)
             return rtSemEventWaitHandleStatus(pThis, rc);
-        int rc9 = RTLockValidatorRecSharedCheckBlocking(&pThis->Signallers, hThreadSelf, pSrcPos, false,
+        int rc9 = RTLockValidatorRecSharedCheckBlocking(&pThis->Signallers, hThreadSelf, NULL /*pSrcPos*/, false,
                                                         cMillies, RTTHREADSTATE_EVENT, true);
         if (RT_FAILURE(rc9))
             return rc9;
@@ -268,6 +269,8 @@ RTDECL(void) RTSemEventSetSignaller(RTSEMEVENT hEventSem, RTTHREAD hThread)
 
     ASMAtomicWriteBool(&pThis->fEverHadSignallers, true);
     RTLockValidatorRecSharedResetOwner(&pThis->Signallers, hThread, NULL);
+#else
+    RT_NOREF_PV(hEventSem); RT_NOREF_PV(hThread);
 #endif
 }
 
@@ -281,6 +284,8 @@ RTDECL(void) RTSemEventAddSignaller(RTSEMEVENT hEventSem, RTTHREAD hThread)
 
     ASMAtomicWriteBool(&pThis->fEverHadSignallers, true);
     RTLockValidatorRecSharedAddOwner(&pThis->Signallers, hThread, NULL);
+#else
+    RT_NOREF_PV(hEventSem); RT_NOREF_PV(hThread);
 #endif
 }
 
@@ -293,6 +298,8 @@ RTDECL(void) RTSemEventRemoveSignaller(RTSEMEVENT hEventSem, RTTHREAD hThread)
     AssertReturnVoid(pThis->u32Magic == RTSEMEVENT_MAGIC);
 
     RTLockValidatorRecSharedRemoveOwner(&pThis->Signallers, hThread);
+#else
+    RT_NOREF_PV(hEventSem); RT_NOREF_PV(hThread);
 #endif
 }
 
diff --git a/src/VBox/Runtime/r3/win/semeventmulti-win.cpp b/src/VBox/Runtime/r3/win/semeventmulti-win.cpp
index 0ecdd34..eb0d5e9 100644
--- a/src/VBox/Runtime/r3/win/semeventmulti-win.cpp
+++ b/src/VBox/Runtime/r3/win/semeventmulti-win.cpp
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -32,7 +32,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #define LOG_GROUP RTLOGGROUP_SEMAPHORE
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 #include <iprt/semaphore.h>
 #include "internal/iprt.h"
@@ -108,6 +108,8 @@ RTDECL(int)  RTSemEventMultiCreateEx(PRTSEMEVENTMULTI phEventMultiSem, uint32_t
             va_end(va);
         }
         pThis->fEverHadSignallers = false;
+#else
+        RT_NOREF_PV(hClass); RT_NOREF_PV(pszNameFmt);
 #endif
 
         *phEventMultiSem = pThis;
@@ -221,6 +223,7 @@ rtSemEventWaitHandleStatus(struct RTSEMEVENTMULTIINTERNAL *pThis, uint32_t fFlag
                 return rc2;
 
             AssertMsgFailed(("WaitForSingleObject(event) -> rc=%d while converted lasterr=%d\n", rc, rc2));
+            RT_NOREF_PV(pThis);
             return VERR_INTERNAL_ERROR;
         }
     }
@@ -293,6 +296,7 @@ DECLINLINE(int) rtSemEventMultiWinWait(RTSEMEVENTMULTI hEventMultiSem, uint32_t
     }
 #else
     RTTHREAD hThreadSelf = RTThreadSelf();
+    RT_NOREF_PV(pSrcPos);
 #endif
     RTThreadBlocking(hThreadSelf, RTTHREADSTATE_EVENT_MULTI, true);
     rc = WaitForSingleObjectEx(pThis->hev, dwMsTimeout, TRUE /*fAlertable*/);
@@ -339,6 +343,8 @@ RTDECL(void) RTSemEventMultiSetSignaller(RTSEMEVENTMULTI hEventMultiSem, RTTHREA
 
     ASMAtomicWriteBool(&pThis->fEverHadSignallers, true);
     RTLockValidatorRecSharedResetOwner(&pThis->Signallers, hThread, NULL);
+#else
+    RT_NOREF_PV(hEventMultiSem); RT_NOREF_PV(hThread);
 #endif
 }
 
@@ -352,6 +358,8 @@ RTDECL(void) RTSemEventMultiAddSignaller(RTSEMEVENTMULTI hEventMultiSem, RTTHREA
 
     ASMAtomicWriteBool(&pThis->fEverHadSignallers, true);
     RTLockValidatorRecSharedAddOwner(&pThis->Signallers, hThread, NULL);
+#else
+    RT_NOREF_PV(hEventMultiSem); RT_NOREF_PV(hThread);
 #endif
 }
 
@@ -364,6 +372,8 @@ RTDECL(void) RTSemEventMultiRemoveSignaller(RTSEMEVENTMULTI hEventMultiSem, RTTH
     AssertReturnVoid(pThis->u32Magic == RTSEMEVENTMULTI_MAGIC);
 
     RTLockValidatorRecSharedRemoveOwner(&pThis->Signallers, hThread);
+#else
+    RT_NOREF_PV(hEventMultiSem); RT_NOREF_PV(hThread);
 #endif
 }
 
diff --git a/src/VBox/Runtime/r3/win/semmutex-win.cpp b/src/VBox/Runtime/r3/win/semmutex-win.cpp
index 44c58bd..a073aad 100644
--- a/src/VBox/Runtime/r3/win/semmutex-win.cpp
+++ b/src/VBox/Runtime/r3/win/semmutex-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #define LOG_GROUP RTLOGGROUP_SEMAPHORE
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 #include <iprt/semaphore.h>
 #include "internal/iprt.h"
@@ -108,6 +108,8 @@ RTDECL(int) RTSemMutexCreateEx(PRTSEMMUTEX phMutexSem, uint32_t fFlags,
                                             !(fFlags & RTSEMMUTEX_FLAGS_NO_LOCK_VAL), pszNameFmt, va);
                 va_end(va);
             }
+#else
+            RT_NOREF_PV(hClass); RT_NOREF_PV(uSubClass); RT_NOREF_PV(pszNameFmt);
 #endif
             *phMutexSem = pThis;
             return VINF_SUCCESS;
@@ -166,6 +168,7 @@ RTDECL(uint32_t) RTSemMutexSetSubClass(RTSEMMUTEX hMutexSem, uint32_t uSubClass)
 
     return RTLockValidatorRecExclSetSubClass(&pThis->ValidatorRec, uSubClass);
 #else
+    RT_NOREF_PV(hMutexSem); RT_NOREF_PV(uSubClass);
     return RTLOCKVAL_SUB_CLASS_INVALID;
 #endif
 }
@@ -220,6 +223,7 @@ DECL_FORCE_INLINE(int) rtSemMutexRequestNoResume(RTSEMMUTEX hMutexSem, RTMSINTER
 #else
         hThreadSelf = RTThreadSelf();
         RTThreadBlocking(hThreadSelf, RTTHREADSTATE_MUTEX, true);
+        RT_NOREF_PV(pSrcPos);
 #endif
     }
     DWORD rc = WaitForSingleObjectEx(pThis->hMtx,
diff --git a/src/VBox/Runtime/r3/win/symlink-win.cpp b/src/VBox/Runtime/r3/win/symlink-win.cpp
index 68f20b0..d81a7cb 100644
--- a/src/VBox/Runtime/r3/win/symlink-win.cpp
+++ b/src/VBox/Runtime/r3/win/symlink-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #define LOG_GROUP RTLOGGROUP_SYMLINK
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 #include <iprt/symlink.h>
 #include "internal-r3-win.h"
@@ -125,6 +125,7 @@ RTDECL(int) RTSymlinkCreate(const char *pszSymlink, const char *pszTarget, RTSYM
     AssertReturn(enmType > RTSYMLINKTYPE_INVALID && enmType < RTSYMLINKTYPE_END, VERR_INVALID_PARAMETER);
     AssertPtrReturn(pszSymlink, VERR_INVALID_POINTER);
     AssertPtrReturn(pszTarget, VERR_INVALID_POINTER);
+    RT_NOREF_PV(fCreate);
 
     /*
      * Resolve the API.
@@ -229,6 +230,8 @@ RTDECL(int) RTSymlinkCreate(const char *pszSymlink, const char *pszTarget, RTSYM
 
 RTDECL(int) RTSymlinkDelete(const char *pszSymlink, uint32_t fDelete)
 {
+    RT_NOREF_PV(fDelete);
+
     /*
      * Convert the path.
      */
@@ -272,6 +275,8 @@ RTDECL(int) RTSymlinkDelete(const char *pszSymlink, uint32_t fDelete)
 
 RTDECL(int) RTSymlinkRead(const char *pszSymlink, char *pszTarget, size_t cbTarget, uint32_t fRead)
 {
+    RT_NOREF_PV(fRead);
+
     char *pszMyTarget;
     int rc = RTSymlinkReadA(pszSymlink, &pszMyTarget);
     if (RT_SUCCESS(rc))
diff --git a/src/VBox/Runtime/r3/win/thread-win.cpp b/src/VBox/Runtime/r3/win/thread-win.cpp
index 8644bc3..500cf5e 100644
--- a/src/VBox/Runtime/r3/win/thread-win.cpp
+++ b/src/VBox/Runtime/r3/win/thread-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #define LOG_GROUP RTLOGGROUP_THREAD
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 #include <errno.h>
 #include <process.h>
diff --git a/src/VBox/Runtime/r3/win/thread2-win.cpp b/src/VBox/Runtime/r3/win/thread2-win.cpp
index 657d719..cf39b9b 100644
--- a/src/VBox/Runtime/r3/win/thread2-win.cpp
+++ b/src/VBox/Runtime/r3/win/thread2-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #define LOG_GROUP RTLOGGROUP_THREAD
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 #include <iprt/thread.h>
 #include "internal/iprt.h"
diff --git a/src/VBox/Runtime/r3/win/time-win.cpp b/src/VBox/Runtime/r3/win/time-win.cpp
index 5498034..63a81f9 100644
--- a/src/VBox/Runtime/r3/win/time-win.cpp
+++ b/src/VBox/Runtime/r3/win/time-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #define LOG_GROUP RTLOGGROUP_TIME
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 #include <iprt/time.h>
 #include "internal/iprt.h"
diff --git a/src/VBox/Runtime/r3/win/time2-win.cpp b/src/VBox/Runtime/r3/win/time2-win.cpp
index 6030c1d..3ff51be 100644
--- a/src/VBox/Runtime/r3/win/time2-win.cpp
+++ b/src/VBox/Runtime/r3/win/time2-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #define LOG_GROUP RTLOGGROUP_TIME
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 #include <iprt/time.h>
 #include "internal/iprt.h"
diff --git a/src/VBox/Runtime/r3/win/timer-win.cpp b/src/VBox/Runtime/r3/win/timer-win.cpp
index dc08ce3..b689a5b 100644
--- a/src/VBox/Runtime/r3/win/timer-win.cpp
+++ b/src/VBox/Runtime/r3/win/timer-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -55,7 +55,7 @@
 *********************************************************************************************************************************/
 #define LOG_GROUP RTLOGGROUP_TIMER
 #define _WIN32_WINNT 0x0500
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 #include <iprt/timer.h>
 #ifdef USE_CATCH_UP
@@ -242,7 +242,7 @@ static DECLCALLBACK(int) rttimerCallback(RTTHREAD Thread, void *pvArg)
             /*
              * Rearm the timer handler.
              */
-#ifdef USE_CATCH_UP
+# ifdef USE_CATCH_UP
             pTimer->llNext.QuadPart += NSInterval;
             LARGE_INTEGER ll;
             ll.QuadPart = RTTimeNanoTS() - pTimer->llNext.QuadPart;
@@ -250,11 +250,11 @@ static DECLCALLBACK(int) rttimerCallback(RTTHREAD Thread, void *pvArg)
                 ll.QuadPart = ll.QuadPart / 100;
             else
                 ll.QuadPart = -500000 / 100; /* need to catch up, do a minimum wait of 0.5ms. */
-#else
+# else
             LARGE_INTEGER ll = pTimer->llNext;
-#endif
-            BOOL frc = SetWaitableTimer(pTimer->hTimer, &ll, 0, NULL, NULL, FALSE);
-            AssertMsg(frc || pTimer->u32Magic != RTTIMER_MAGIC, ("last error %d\n", GetLastError()));
+# endif
+            BOOL fRc = SetWaitableTimer(pTimer->hTimer, &ll, 0, NULL, NULL, FALSE);
+            AssertMsg(fRc || pTimer->u32Magic != RTTIMER_MAGIC, ("last error %d\n", GetLastError())); NOREF(fRc);
         }
         else
 #endif
@@ -264,7 +264,7 @@ static DECLCALLBACK(int) rttimerCallback(RTTHREAD Thread, void *pvArg)
              */
             int rc2 = GetLastError();
             RTThreadUserSignal(Thread);
-            AssertMsgFailed(("Wait on hTimer failed, rc=%d lasterr=%d\n", rc, rc2));
+            AssertMsgFailed(("Wait on hTimer failed, rc=%d lasterr=%d\n", rc, rc2)); NOREF(rc2);
             return -1;
         }
     }
@@ -285,9 +285,9 @@ RTDECL(int) RTTimerCreate(PRTTIMER *ppTimer, unsigned uMilliesInterval, PFNRTTIM
      * On windows we'll have to set the timer resolution before
      * we start the timer.
      */
-    ULONG ulMax = ~0;
-    ULONG ulMin = ~0;
-    ULONG ulCur = ~0;
+    ULONG ulMax = UINT32_MAX;
+    ULONG ulMin = UINT32_MAX;
+    ULONG ulCur = UINT32_MAX;
     NtQueryTimerResolution(&ulMax, &ulMin, &ulCur);
     Log(("NtQueryTimerResolution -> ulMax=%lu00ns ulMin=%lu00ns ulCur=%lu00ns\n", ulMax, ulMin, ulCur));
     if (ulCur > ulMin && ulCur > 10000 /* = 1ms */)
@@ -311,7 +311,7 @@ RTDECL(int) RTTimerCreate(PRTTIMER *ppTimer, unsigned uMilliesInterval, PFNRTTIM
     /*
      * Create new timer.
      */
-    int rc;
+    int rc = VERR_IPE_UNINITIALIZED_STATUS;
     PRTTIMER pTimer = (PRTTIMER)RTMemAlloc(sizeof(*pTimer));
     if (pTimer)
     {
@@ -325,9 +325,9 @@ RTDECL(int) RTTimerCreate(PRTTIMER *ppTimer, unsigned uMilliesInterval, PFNRTTIM
         pTimer->TimerId     = timeSetEvent(uMilliesInterval, 0, rttimerCallback, (DWORD_PTR)pTimer, TIME_PERIODIC | TIME_CALLBACK_FUNCTION);
         if (pTimer->TimerId)
         {
-            ULONG ulMax = ~0;
-            ULONG ulMin = ~0;
-            ULONG ulCur = ~0;
+            ULONG ulMax = UINT32_MAX;
+            ULONG ulMin = UINT32_MAX;
+            ULONG ulCur = UINT32_MAX;
             NtQueryTimerResolution(&ulMax, &ulMin, &ulCur);
             Log(("NtQueryTimerResolution -> ulMax=%lu00ns ulMin=%lu00ns ulCur=%lu00ns\n", ulMax, ulMin, ulCur));
 
@@ -341,7 +341,7 @@ RTDECL(int) RTTimerCreate(PRTTIMER *ppTimer, unsigned uMilliesInterval, PFNRTTIM
         /*
          * Create Win32 event semaphore.
          */
-        pTimer->iError      = 0;
+        pTimer->iError = 0;
         pTimer->hTimer = CreateWaitableTimer(NULL, TRUE, NULL);
         if (pTimer->hTimer)
         {
@@ -440,7 +440,7 @@ RTR3DECL(int)     RTTimerDestroy(PRTTIMER pTimer)
          */
         rc = RTThreadWait(pTimer->Thread, 1000, NULL);
         if (RT_FAILURE(rc))
-            TerminateThread((HANDLE)RTThreadGetNative(pTimer->Thread), -1);
+            TerminateThread((HANDLE)RTThreadGetNative(pTimer->Thread), UINT32_MAX);
 
         /*
          * Free resource.
diff --git a/src/VBox/Runtime/r3/win/tls-win.cpp b/src/VBox/Runtime/r3/win/tls-win.cpp
index 6d1790b..b81e99e 100644
--- a/src/VBox/Runtime/r3/win/tls-win.cpp
+++ b/src/VBox/Runtime/r3/win/tls-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #define LOG_GROUP RTLOGGROUP_THREAD
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 #include <iprt/thread.h>
 #include <iprt/log.h>
diff --git a/src/VBox/Runtime/r3/win/utf16locale-win.cpp b/src/VBox/Runtime/r3/win/utf16locale-win.cpp
index 5208d59..1381bb1 100644
--- a/src/VBox/Runtime/r3/win/utf16locale-win.cpp
+++ b/src/VBox/Runtime/r3/win/utf16locale-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #define LOG_GROUP RTLOGGROUP_UTF16
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 #include <iprt/string.h>
 
diff --git a/src/VBox/Runtime/r3/win/utf8-win.cpp b/src/VBox/Runtime/r3/win/utf8-win.cpp
index 01c378d..08b4e05 100644
--- a/src/VBox/Runtime/r3/win/utf8-win.cpp
+++ b/src/VBox/Runtime/r3/win/utf8-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #define LOG_GROUP RTLOGGROUP_UTF8
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 #include <iprt/string.h>
 #include <iprt/alloc.h>
diff --git a/src/VBox/Runtime/r3/win/uuid-win.cpp b/src/VBox/Runtime/r3/win/uuid-win.cpp
index 15e51b0..79d778f 100644
--- a/src/VBox/Runtime/r3/win/uuid-win.cpp
+++ b/src/VBox/Runtime/r3/win/uuid-win.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #define LOG_GROUP RTLOGGROUP_UUID
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 #include <iprt/uuid.h>
 #include <iprt/assert.h>
diff --git a/src/VBox/Runtime/r3/win/vcc100-kernel32-fakes.cpp b/src/VBox/Runtime/r3/win/vcc100-kernel32-fakes.cpp
index ee2e00a..3554c8b 100644
--- a/src/VBox/Runtime/r3/win/vcc100-kernel32-fakes.cpp
+++ b/src/VBox/Runtime/r3/win/vcc100-kernel32-fakes.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -53,7 +53,7 @@
 #define VerifyVersionInfoA                      Ignore_VerifyVersionInfoA
 #define VerSetConditionMask                     Ignore_VerSetConditionMask
 
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 #undef DecodePointer
 #undef EncodePointer
diff --git a/src/VBox/Runtime/r3/win/vcc100-msvcrt-fakes.cpp b/src/VBox/Runtime/r3/win/vcc100-msvcrt-fakes.cpp
index 8a345c0..64bff70 100644
--- a/src/VBox/Runtime/r3/win/vcc100-msvcrt-fakes.cpp
+++ b/src/VBox/Runtime/r3/win/vcc100-msvcrt-fakes.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/r3/win/vcc100-ntdll-fakes.cpp b/src/VBox/Runtime/r3/win/vcc100-ntdll-fakes.cpp
index 3c7b8db..22cd63e 100644
--- a/src/VBox/Runtime/r3/win/vcc100-ntdll-fakes.cpp
+++ b/src/VBox/Runtime/r3/win/vcc100-ntdll-fakes.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -35,7 +35,7 @@
 # error "This code is X86 only"
 #endif
 
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 
 
@@ -72,4 +72,3 @@ extern "C" int vcc100_ntdll_fakes_cpp(void)
     return 42;
 }
 
-
diff --git a/src/VBox/Runtime/r3/win/vcc100-ws2_32-fakes.cpp b/src/VBox/Runtime/r3/win/vcc100-ws2_32-fakes.cpp
index 5bfc9fd..a1f1963 100644
--- a/src/VBox/Runtime/r3/win/vcc100-ws2_32-fakes.cpp
+++ b/src/VBox/Runtime/r3/win/vcc100-ws2_32-fakes.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -40,8 +40,8 @@
 #define getaddrinfo                             Ignore_getaddrinfo
 #define freeaddrinfo                            Ignore_freeaddrinfo
 
-#include <winsock2.h>
-#include <ws2tcpip.h>
+#include <iprt/win/winsock2.h>
+#include <iprt/win/ws2tcpip.h>
 
 #undef getaddrinfo
 #undef freeaddrinfo
diff --git a/src/VBox/Runtime/r3/xml.cpp b/src/VBox/Runtime/r3/xml.cpp
index 4f1db52..b5f1b04 100644
--- a/src/VBox/Runtime/r3/xml.cpp
+++ b/src/VBox/Runtime/r3/xml.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1470,6 +1470,7 @@ AttributeNode::AttributeNode(const ElementNode *pElmRoot,
            pLibAttr)
 {
     m_pcszName = (const char *)pLibAttr->name;
+    RT_NOREF_PV(pElmRoot);
 
     if (   pLibAttr->ns
         && pLibAttr->ns->prefix)
@@ -1837,6 +1838,9 @@ struct IOContext
     {
         error = x.what();
     }
+
+private:
+    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(IOContext); /* (shuts up C4626 and C4625 MSC warnings) */
 };
 
 struct ReadContext : IOContext
@@ -1845,6 +1849,9 @@ struct ReadContext : IOContext
         : IOContext(pcszFilename, File::Mode_Read)
     {
     }
+
+private:
+    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(ReadContext); /* (shuts up C4626 and C4625 MSC warnings) */
 };
 
 struct WriteContext : IOContext
@@ -1853,6 +1860,9 @@ struct WriteContext : IOContext
         : IOContext(pcszFilename, File::Mode_Overwrite, fFlush)
     {
     }
+
+private:
+    DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(WriteContext); /* (shuts up C4626 and C4625 MSC warnings) */
 };
 
 /**
diff --git a/src/VBox/Runtime/testcase/72kb-random.h b/src/VBox/Runtime/testcase/72kb-random.h
index 46f6998..c056c85 100644
--- a/src/VBox/Runtime/testcase/72kb-random.h
+++ b/src/VBox/Runtime/testcase/72kb-random.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/Makefile.kmk b/src/VBox/Runtime/testcase/Makefile.kmk
index 67ec51d..60db22b 100644
--- a/src/VBox/Runtime/testcase/Makefile.kmk
+++ b/src/VBox/Runtime/testcase/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/ntGetTimerResolution.cpp b/src/VBox/Runtime/testcase/ntGetTimerResolution.cpp
index fa81e12..c54c447 100644
--- a/src/VBox/Runtime/testcase/ntGetTimerResolution.cpp
+++ b/src/VBox/Runtime/testcase/ntGetTimerResolution.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,8 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #define _WIN32_WINNT 0x0500
-#include <Windows.h>
+#include <iprt/win/windows.h>
+#include <iprt/types.h>
 #include <stdio.h>
 
 extern "C" {
@@ -40,9 +41,9 @@ NTSYSAPI LONG NTAPI NtQueryTimerResolution(OUT PULONG MaximumResolution, OUT PUL
 
 int main()
 {
-    ULONG Min = ~0;
-    ULONG Max = ~0;
-    ULONG Cur = ~0;
+    ULONG Min = UINT32_MAX;
+    ULONG Max = UINT32_MAX;
+    ULONG Cur = UINT32_MAX;
     NtQueryTimerResolution(&Max, &Min, &Cur);
     printf("NtQueryTimerResolution -> Max=%08luns Min=%08luns Cur=%08luns\n", Min * 100, Max * 100, Cur * 100);
 
diff --git a/src/VBox/Runtime/testcase/tstDarwinSched.cpp b/src/VBox/Runtime/testcase/tstDarwinSched.cpp
index c848b02..b83e539 100644
--- a/src/VBox/Runtime/testcase/tstDarwinSched.cpp
+++ b/src/VBox/Runtime/testcase/tstDarwinSched.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstDir-2.cpp b/src/VBox/Runtime/testcase/tstDir-2.cpp
index 23e737a..e3b0a76 100644
--- a/src/VBox/Runtime/testcase/tstDir-2.cpp
+++ b/src/VBox/Runtime/testcase/tstDir-2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstDir-3.cpp b/src/VBox/Runtime/testcase/tstDir-3.cpp
index 6e1b82d..4a687db 100644
--- a/src/VBox/Runtime/testcase/tstDir-3.cpp
+++ b/src/VBox/Runtime/testcase/tstDir-3.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstDir.cpp b/src/VBox/Runtime/testcase/tstDir.cpp
index ba30f60..5186b0d 100644
--- a/src/VBox/Runtime/testcase/tstDir.cpp
+++ b/src/VBox/Runtime/testcase/tstDir.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstEnv.cpp b/src/VBox/Runtime/testcase/tstEnv.cpp
index 6eb6fbc..b853434 100644
--- a/src/VBox/Runtime/testcase/tstEnv.cpp
+++ b/src/VBox/Runtime/testcase/tstEnv.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstFile.cpp b/src/VBox/Runtime/testcase/tstFile.cpp
index e96a1c2..b7d9d43 100644
--- a/src/VBox/Runtime/testcase/tstFile.cpp
+++ b/src/VBox/Runtime/testcase/tstFile.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstFileAppendWin-1.cpp b/src/VBox/Runtime/testcase/tstFileAppendWin-1.cpp
index 275f126..daa64c2 100644
--- a/src/VBox/Runtime/testcase/tstFileAppendWin-1.cpp
+++ b/src/VBox/Runtime/testcase/tstFileAppendWin-1.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -28,7 +28,7 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
-#include <Windows.h>
+#include <iprt/win/windows.h>
 #include <stdio.h>
 #include <string.h>
 #include <stdarg.h>
diff --git a/src/VBox/Runtime/testcase/tstFileLock.cpp b/src/VBox/Runtime/testcase/tstFileLock.cpp
index 0fa2e56..b22314c 100644
--- a/src/VBox/Runtime/testcase/tstFileLock.cpp
+++ b/src/VBox/Runtime/testcase/tstFileLock.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstFork.cpp b/src/VBox/Runtime/testcase/tstFork.cpp
index bd1d82b..9801abb 100644
--- a/src/VBox/Runtime/testcase/tstFork.cpp
+++ b/src/VBox/Runtime/testcase/tstFork.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstHandleTable.cpp b/src/VBox/Runtime/testcase/tstHandleTable.cpp
index b028406..13f2a3d 100644
--- a/src/VBox/Runtime/testcase/tstHandleTable.cpp
+++ b/src/VBox/Runtime/testcase/tstHandleTable.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -48,12 +48,14 @@ static DECLCALLBACK(void) tstHandleTableTest1Delete(RTHANDLETABLE hHandleTable,
 {
     uint32_t *pcCalls = (uint32_t *)pvUser;
     (*pcCalls)++;
+    RT_NOREF_PV(hHandleTable); RT_NOREF_PV(h); RT_NOREF_PV(pvCtx); RT_NOREF_PV(pvObj);
 }
 
 static DECLCALLBACK(int) tstHandleTableTest1Retain(RTHANDLETABLE hHandleTable, void *pvObj, void *pvCtx, void *pvUser)
 {
     uint32_t *pcCalls = (uint32_t *)pvUser;
     (*pcCalls)++;
+    RT_NOREF_PV(hHandleTable); RT_NOREF_PV(pvCtx); RT_NOREF_PV(pvObj);
     return VINF_SUCCESS;
 }
 
@@ -488,7 +490,7 @@ int main(int argc, char **argv)
                 return 1;
 
             case 'V':
-                RTPrintf("$Revision: 102121 $\n");
+                RTPrintf("$Revision: 109139 $\n");
                 return 0;
 
             default:
diff --git a/src/VBox/Runtime/testcase/tstIprtList.cpp b/src/VBox/Runtime/testcase/tstIprtList.cpp
index 048549d..c7c7adb 100644
--- a/src/VBox/Runtime/testcase/tstIprtList.cpp
+++ b/src/VBox/Runtime/testcase/tstIprtList.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -497,6 +497,7 @@ static void test1(const char *pcszDesc, T3 paTestData[], size_t cTestItems)
 static DECLCALLBACK(int) MtTest1ThreadProc(RTTHREAD hSelf, void *pvUser)
 {
     MTTESTLISTTYPE<MTTESTTYPE> *pTestList = (MTTESTLISTTYPE<MTTESTTYPE> *)pvUser;
+    RT_NOREF_PV(hSelf);
 
     /* Prepend new items at the start of the list. */
     for (size_t i = 0; i < MTTESTITEMS; ++i)
@@ -514,6 +515,7 @@ static DECLCALLBACK(int) MtTest1ThreadProc(RTTHREAD hSelf, void *pvUser)
 static DECLCALLBACK(int) MtTest2ThreadProc(RTTHREAD hSelf, void *pvUser)
 {
     MTTESTLISTTYPE<MTTESTTYPE> *pTestList = (MTTESTLISTTYPE<MTTESTTYPE> *)pvUser;
+    RT_NOREF_PV(hSelf);
 
     /* Append new items at the end of the list. */
     for (size_t i = 0; i < MTTESTITEMS; ++i)
@@ -531,6 +533,7 @@ static DECLCALLBACK(int) MtTest2ThreadProc(RTTHREAD hSelf, void *pvUser)
 static DECLCALLBACK(int) MtTest3ThreadProc(RTTHREAD hSelf, void *pvUser)
 {
     MTTESTLISTTYPE<MTTESTTYPE> *pTestList = (MTTESTLISTTYPE<MTTESTTYPE> *)pvUser;
+    RT_NOREF_PV(hSelf);
 
     /* Insert new items in the middle of the list. */
     for (size_t i = 0; i < MTTESTITEMS; ++i)
@@ -548,6 +551,7 @@ static DECLCALLBACK(int) MtTest3ThreadProc(RTTHREAD hSelf, void *pvUser)
 static DECLCALLBACK(int) MtTest4ThreadProc(RTTHREAD hSelf, void *pvUser)
 {
     MTTESTLISTTYPE<MTTESTTYPE> *pTestList = (MTTESTLISTTYPE<MTTESTTYPE> *)pvUser;
+    RT_NOREF_PV(hSelf);
 
     MTTESTTYPE a;
     /* Try to read C items from random places. */
@@ -571,6 +575,7 @@ static DECLCALLBACK(int) MtTest4ThreadProc(RTTHREAD hSelf, void *pvUser)
 static DECLCALLBACK(int) MtTest5ThreadProc(RTTHREAD hSelf, void *pvUser)
 {
     MTTESTLISTTYPE<MTTESTTYPE> *pTestList = (MTTESTLISTTYPE<MTTESTTYPE> *)pvUser;
+    RT_NOREF_PV(hSelf);
 
     /* Try to replace C items from random places. */
     for (size_t i = 0; i < MTTESTITEMS; ++i)
@@ -593,6 +598,7 @@ static DECLCALLBACK(int) MtTest5ThreadProc(RTTHREAD hSelf, void *pvUser)
 static DECLCALLBACK(int) MtTest6ThreadProc(RTTHREAD hSelf, void *pvUser)
 {
     MTTESTLISTTYPE<MTTESTTYPE> *pTestList = (MTTESTLISTTYPE<MTTESTTYPE> *)pvUser;
+    RT_NOREF_PV(hSelf);
 
     /* Try to delete items from random places. */
     for (size_t i = 0; i < MTTESTITEMS; ++i)
@@ -615,7 +621,6 @@ static void test2()
 {
     RTTestISubF("MT test with 6 threads (%u tests per thread).", MTTESTITEMS);
 
-    int                         rc;
     MTTESTLISTTYPE<MTTESTTYPE>  testList;
     RTTHREAD                    ahThreads[6];
     static PFNRTTHREAD          apfnThreads[6] =
@@ -634,7 +639,7 @@ static void test2()
     {
         uint64_t tsNow = RTTimeMilliTS();
         uint32_t cWait = tsNow > tsMsDeadline ? 5000 : tsMsDeadline - tsNow;
-        RTTESTI_CHECK_RC(RTThreadWait(ahThreads[i], tsNow, NULL), VINF_SUCCESS);
+        RTTESTI_CHECK_RC(RTThreadWait(ahThreads[i], cWait, NULL), VINF_SUCCESS);
     }
 
     RTTESTI_CHECK_RETV(testList.size() == MTTESTITEMS * 2);
diff --git a/src/VBox/Runtime/testcase/tstIprtMiniString.cpp b/src/VBox/Runtime/testcase/tstIprtMiniString.cpp
index c26b60d..0e9616d 100644
--- a/src/VBox/Runtime/testcase/tstIprtMiniString.cpp
+++ b/src/VBox/Runtime/testcase/tstIprtMiniString.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -45,6 +45,9 @@ static void test1Hlp1(const char *pszExpect, const char *pszFormat, ...)
     RTCString strTst(pszFormat, va);
     va_end(va);
     RTTESTI_CHECK_MSG(strTst.equals(pszExpect),  ("strTst='%s' expected='%s'\n",  strTst.c_str(), pszExpect));
+#else
+    RT_NOREF_PV(pszExpect);
+    RT_NOREF_PV(pszFormat);
 #endif
 }
 
diff --git a/src/VBox/Runtime/testcase/tstLdr-2.cpp b/src/VBox/Runtime/testcase/tstLdr-2.cpp
index 45d9014..d4b73df 100644
--- a/src/VBox/Runtime/testcase/tstLdr-2.cpp
+++ b/src/VBox/Runtime/testcase/tstLdr-2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -70,8 +70,10 @@ bool MyDisBlock(uint8_t const *pbCodeBlock, int32_t cbMax)
  * @param   pValue          Where to store the symbol value (address).
  * @param   pvUser          User argument.
  */
-static DECLCALLBACK(int) testGetImport(RTLDRMOD hLdrMod, const char *pszModule, const char *pszSymbol, unsigned uSymbol, RTUINTPTR *pValue, void *pvUser)
+static DECLCALLBACK(int) testGetImport(RTLDRMOD hLdrMod, const char *pszModule, const char *pszSymbol, unsigned uSymbol,
+                                       RTUINTPTR *pValue, void *pvUser)
 {
+    RT_NOREF5(hLdrMod, pszModule, pszSymbol, uSymbol, pvUser);
     /* check the name format and only permit certain names */
     *pValue = 0xf0f0f0f0;
     return VINF_SUCCESS;
diff --git a/src/VBox/Runtime/testcase/tstLdr-3.cpp b/src/VBox/Runtime/testcase/tstLdr-3.cpp
index 730cfca..b75ad50 100644
--- a/src/VBox/Runtime/testcase/tstLdr-3.cpp
+++ b/src/VBox/Runtime/testcase/tstLdr-3.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -72,6 +72,7 @@ typedef struct TESTNEARSYM
  */
 static DECLCALLBACK(int) testEnumSymbol2(RTLDRMOD hLdrMod, const char *pszSymbol, unsigned uSymbol, RTUINTPTR Value, void *pvUser)
 {
+    RT_NOREF1(hLdrMod);
     PTESTNEARSYM pSym = (PTESTNEARSYM)pvUser;
 
     /* less or equal */
@@ -128,6 +129,8 @@ static DECLCALLBACK(int) MyGetSymbol(PCDISCPUSTATE pCpu, uint32_t u32Sel, RTUINT
                                      char *pszBuf, size_t cchBuf, RTINTPTR *poff,
                                      void *pvUser)
 {
+    RT_NOREF3(pCpu, u32Sel, pvUser);
+
     if (   uAddress > RTLdrSize(g_hLdrMod) + g_uLoadAddr
         || uAddress < g_uLoadAddr)
         return VERR_SYMBOL_NOT_FOUND;
@@ -148,6 +151,7 @@ static DECLCALLBACK(int) MyGetSymbol(PCDISCPUSTATE pCpu, uint32_t u32Sel, RTUINT
  */
 static DECLCALLBACK(int) MyReadBytes(PDISCPUSTATE pDis, uint8_t offInstr, uint8_t cbMinRead, uint8_t cbMaxRead)
 {
+    RT_NOREF1(cbMaxRead);
     uint8_t const *pbSrc = (uint8_t const *)((uintptr_t)pDis->uInstrAddr + (uintptr_t)pDis->pvUser + offInstr);
     memcpy(&pDis->abInstr[offInstr], pbSrc, cbMinRead);
     pDis->cbCachedInstr = offInstr + cbMinRead;
@@ -206,8 +210,10 @@ static bool MyDisBlock(DISCPUMODE enmCpuMode, RTHCUINTPTR pvCodeBlock, int32_t c
  * @param   pValue          Where to store the symbol value (address).
  * @param   pvUser          User argument.
  */
-static DECLCALLBACK(int) testGetImport(RTLDRMOD hLdrMod, const char *pszModule, const char *pszSymbol, unsigned uSymbol, RTUINTPTR *pValue, void *pvUser)
+static DECLCALLBACK(int) testGetImport(RTLDRMOD hLdrMod, const char *pszModule, const char *pszSymbol,
+                                       unsigned uSymbol, RTUINTPTR *pValue, void *pvUser)
 {
+    RT_NOREF5(hLdrMod, pszModule, pszSymbol, uSymbol, pvUser);
 #if 1
     RTUINTPTR BaseAddr = *(PCRTUINTPTR)pvUser;
     *pValue = BaseAddr + UINT32_C(0x604020f0);
@@ -232,6 +238,7 @@ static DECLCALLBACK(int) testGetImport(RTLDRMOD hLdrMod, const char *pszModule,
  */
 static DECLCALLBACK(int) testEnumSymbol1(RTLDRMOD hLdrMod, const char *pszSymbol, unsigned uSymbol, RTUINTPTR Value, void *pvUser)
 {
+    RT_NOREF2(hLdrMod, pvUser);
     RTPrintf("  %RTptr %s (%d)\n", Value, pszSymbol, uSymbol);
     return VINF_SUCCESS;
 }
@@ -255,7 +262,7 @@ static int testDisasNear(uint64_t uAddr)
         uint8_t *pbCode = (uint8_t *)g_pvBits + (NearSym.aSyms[0].Value - g_uLoadAddr);
         MyDisBlock(enmDisCpuMode, (uintptr_t)pbCode,
                    RT_MAX(NearSym.aSyms[1].Value - NearSym.aSyms[0].Value, 0x20000),
-                   NearSym.aSyms[0].Value - (RTUINTPTR)pbCode,
+                   NearSym.aSyms[0].Value - (uintptr_t)pbCode,
                    NearSym.aSyms[0].Value,
                    NearSym.Addr);
     }
diff --git a/src/VBox/Runtime/testcase/tstLdr-4.cpp b/src/VBox/Runtime/testcase/tstLdr-4.cpp
index d2a7460..d05732d 100644
--- a/src/VBox/Runtime/testcase/tstLdr-4.cpp
+++ b/src/VBox/Runtime/testcase/tstLdr-4.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -56,6 +56,7 @@ extern "C" DECLEXPORT(int) DisasmTest1(void);
  */
 static DECLCALLBACK(int) testGetImport(RTLDRMOD hLdrMod, const char *pszModule, const char *pszSymbol, unsigned uSymbol, RTUINTPTR *pValue, void *pvUser)
 {
+    RT_NOREF4(hLdrMod, pszModule, uSymbol, pvUser);
     if (     !strcmp(pszSymbol, "RTAssertMsg1Weak")     || !strcmp(pszSymbol, "_RTAssertMsg1Weak"))
         *pValue = (uintptr_t)RTAssertMsg1Weak;
     else if (!strcmp(pszSymbol, "RTAssertMsg2Weak")     || !strcmp(pszSymbol, "_RTAssertMsg2Weak"))
diff --git a/src/VBox/Runtime/testcase/tstLdr-4Imp-os2.def b/src/VBox/Runtime/testcase/tstLdr-4Imp-os2.def
index b336f54..76dbea2 100644
--- a/src/VBox/Runtime/testcase/tstLdr-4Imp-os2.def
+++ b/src/VBox/Runtime/testcase/tstLdr-4Imp-os2.def
@@ -2,7 +2,7 @@
 ; tstLdr-4 fake DLL - Definition file.
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstLdr-4Imp-win.def b/src/VBox/Runtime/testcase/tstLdr-4Imp-win.def
index 0980003..d95765d 100644
--- a/src/VBox/Runtime/testcase/tstLdr-4Imp-win.def
+++ b/src/VBox/Runtime/testcase/tstLdr-4Imp-win.def
@@ -2,7 +2,7 @@
 ; tstLdr-4 fake DLL - Definition file.
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstLdr.cpp b/src/VBox/Runtime/testcase/tstLdr.cpp
index 9518c60..bef3963 100644
--- a/src/VBox/Runtime/testcase/tstLdr.cpp
+++ b/src/VBox/Runtime/testcase/tstLdr.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -59,9 +59,11 @@ static uint32_t g_cBits = HC_ARCH_BITS;
  * @param   pValue          Where to store the symbol value (address).
  * @param   pvUser          User argument.
  */
-static DECLCALLBACK(int) testGetImport(RTLDRMOD hLdrMod, const char *pszModule, const char *pszSymbol, unsigned uSymbol, RTUINTPTR *pValue, void *pvUser)
+static DECLCALLBACK(int) testGetImport(RTLDRMOD hLdrMod, const char *pszModule, const char *pszSymbol, unsigned uSymbol,
+                                       RTUINTPTR *pValue, void *pvUser)
 {
     /* check the name format and only permit certain names... later, right?  */
+    RT_NOREF_PV(hLdrMod); RT_NOREF_PV(pszModule); RT_NOREF_PV(pszSymbol); RT_NOREF_PV(uSymbol); RT_NOREF_PV(pvUser);
 
     if (g_cBits == 32)
         *pValue = 0xabcdef0f;
diff --git a/src/VBox/Runtime/testcase/tstLdrDisasmTest.cpp b/src/VBox/Runtime/testcase/tstLdrDisasmTest.cpp
index 3fa77bc..6617006 100644
--- a/src/VBox/Runtime/testcase/tstLdrDisasmTest.cpp
+++ b/src/VBox/Runtime/testcase/tstLdrDisasmTest.cpp
@@ -9,7 +9,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstLdrLoad.cpp b/src/VBox/Runtime/testcase/tstLdrLoad.cpp
index 69bfdb2..a9686f6 100644
--- a/src/VBox/Runtime/testcase/tstLdrLoad.cpp
+++ b/src/VBox/Runtime/testcase/tstLdrLoad.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstLdrObj.cpp b/src/VBox/Runtime/testcase/tstLdrObj.cpp
index 6bf89d4..cbb4ef6 100644
--- a/src/VBox/Runtime/testcase/tstLdrObj.cpp
+++ b/src/VBox/Runtime/testcase/tstLdrObj.cpp
@@ -9,7 +9,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstLdrObjR0.cpp b/src/VBox/Runtime/testcase/tstLdrObjR0.cpp
index 800f600..ecb91f3 100644
--- a/src/VBox/Runtime/testcase/tstLdrObjR0.cpp
+++ b/src/VBox/Runtime/testcase/tstLdrObjR0.cpp
@@ -9,7 +9,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstLog.cpp b/src/VBox/Runtime/testcase/tstLog.cpp
index e907483..c0dd38a 100644
--- a/src/VBox/Runtime/testcase/tstLog.cpp
+++ b/src/VBox/Runtime/testcase/tstLog.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -63,17 +63,17 @@ int main()
     RTLogPrintf("%%RHp: %RHp\n", (RTGCPHYS)0x87654321);
     RTLogPrintf("%%RHv: %RHv\n", (RTGCPTR)0x87654321);
 
-    RTLogPrintf("%%RI8 : %RI8\n", (uint8_t)808);
+    RTLogPrintf("%%RI8 : %RI8\n", (uint8_t)88);
     RTLogPrintf("%%RI16: %RI16\n", (uint16_t)16016);
     RTLogPrintf("%%RI32: %RI32\n", _1G);
     RTLogPrintf("%%RI64: %RI64\n", _1E);
 
-    RTLogPrintf("%%RU8 : %RU8\n", (uint8_t)808);
+    RTLogPrintf("%%RU8 : %RU8\n", (uint8_t)88);
     RTLogPrintf("%%RU16: %RU16\n", (uint16_t)16016);
     RTLogPrintf("%%RU32: %RU32\n", _2G32);
     RTLogPrintf("%%RU64: %RU64\n", _2E);
 
-    RTLogPrintf("%%RX8 : %RX8 %#RX8\n",   (uint8_t)808, (uint8_t)808);
+    RTLogPrintf("%%RX8 : %RX8 %#RX8\n",   (uint8_t)88, (uint8_t)88);
     RTLogPrintf("%%RX16: %RX16 %#RX16\n", (uint16_t)16016, (uint16_t)16016);
     RTLogPrintf("%%RX32: %RX32 %#RX32\n", _2G32, _2G32);
     RTLogPrintf("%%RX64: %RX64 %#RX64\n", _2E, _2E);
diff --git a/src/VBox/Runtime/testcase/tstMove.cpp b/src/VBox/Runtime/testcase/tstMove.cpp
index 18dfacc..3ae7140 100644
--- a/src/VBox/Runtime/testcase/tstMove.cpp
+++ b/src/VBox/Runtime/testcase/tstMove.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstNoCrt-1.cpp b/src/VBox/Runtime/testcase/tstNoCrt-1.cpp
index 21781be..7d3765e 100644
--- a/src/VBox/Runtime/testcase/tstNoCrt-1.cpp
+++ b/src/VBox/Runtime/testcase/tstNoCrt-1.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstOnce.cpp b/src/VBox/Runtime/testcase/tstOnce.cpp
index f4926a3..740b301 100644
--- a/src/VBox/Runtime/testcase/tstOnce.cpp
+++ b/src/VBox/Runtime/testcase/tstOnce.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstPrfRT.cpp b/src/VBox/Runtime/testcase/tstPrfRT.cpp
index 818acc3..634e8cb 100644
--- a/src/VBox/Runtime/testcase/tstPrfRT.cpp
+++ b/src/VBox/Runtime/testcase/tstPrfRT.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -64,12 +64,13 @@ void PrintResult(uint64_t u64Ticks, uint64_t u64MaxTicks, uint64_t u64MinTicks,
     //RTTestValueF(g_hTest, u64MinTicks,                  RTTESTUNIT_NONE, "%s min ticks", pszOperation);
     RTTestValueF(g_hTest, u64Ticks / (uint64_t)cTimes,  RTTESTUNIT_NONE, "%s avg ticks", pszOperation);
     //RTTestValueF(g_hTest, u64MaxTicks,                  RTTESTUNIT_NONE, "%s max ticks", pszOperation);
+    RT_NOREF_PV(u64MaxTicks); RT_NOREF_PV(u64MinTicks);
 }
 
 # define ITERATE(preexpr, expr, postexpr, cIterations) \
     AssertCompile(((cIterations) % 8) == 0); \
     /* Min and max value. */ \
-    for (i = 0, u64MinTS = ~0, u64MaxTS = 0; i < (cIterations); i++) \
+    for (i = 0, u64MinTS = UINT64_MAX, u64MaxTS = 0; i < (cIterations); i++) \
     { \
         { preexpr } \
         uint64_t u64StartTS = ASMReadTSC(); \
@@ -122,7 +123,7 @@ void PrintResult(uint64_t cNs, uint64_t cNsMax, uint64_t cNsMin, unsigned cTimes
 }
 
 # define ITERATE(preexpr, expr, postexpr, cIterations) \
-    for (i = 0, u64TotalTS = 0, u64MinTS = ~0, u64MaxTS = 0; i < (cIterations); i++) \
+    for (i = 0, u64TotalTS = 0, u64MinTS = UINT64_MAX, u64MaxTS = 0; i < (cIterations); i++) \
     { \
         { preexpr } \
         uint64_t u64StartTS = RTTimeNanoTS(); \
@@ -149,7 +150,7 @@ int main(int argc, char **argv)
     uint64_t    u64TotalTS;
     uint64_t    u64MinTS;
     uint64_t    u64MaxTS;
-    unsigned    i;
+    uint32_t    i;
 
     RTEXITCODE rcExit = RTTestInitExAndCreate(argc, &argv, argc == 2 ? RTR3INIT_FLAGS_SUPLIB : 0, "tstRTPrf", &g_hTest);
     if (rcExit != RTEXITCODE_SUCCESS)
@@ -159,53 +160,53 @@ int main(int argc, char **argv)
     /*
      * RTTimeNanoTS, RTTimeProgramNanoTS, RTTimeMilliTS, and RTTimeProgramMilliTS.
      */
-    ITERATE(RT_NOTHING, RTTimeNanoTS();, RT_NOTHING, _1M * 32);
+    ITERATE(RT_NOTHING, RTTimeNanoTS();, RT_NOTHING, _32M);
     PrintResult(u64TotalTS, u64MaxTS, u64MinTS, i, "RTTimeNanoTS");
 
-    ITERATE(RT_NOTHING, RTTimeProgramNanoTS();, RT_NOTHING, 1000000);
+    ITERATE(RT_NOTHING, RTTimeProgramNanoTS();, RT_NOTHING, UINT32_C(1000000));
     PrintResult(u64TotalTS, u64MaxTS, u64MinTS, i, "RTTimeProgramNanoTS");
 
-    ITERATE(RT_NOTHING, RTTimeMilliTS();, RT_NOTHING, 1000000);
+    ITERATE(RT_NOTHING, RTTimeMilliTS();, RT_NOTHING, UINT32_C(1000000));
     PrintResult(u64TotalTS, u64MaxTS, u64MinTS, i, "RTTimeMilliTS");
 
-    ITERATE(RT_NOTHING, RTTimeProgramMilliTS();, RT_NOTHING, 1000000);
+    ITERATE(RT_NOTHING, RTTimeProgramMilliTS();, RT_NOTHING, UINT32_C(1000000));
     PrintResult(u64TotalTS, u64MaxTS, u64MinTS, i, "RTTimeProgramMilliTS");
 
     /*
      * RTTimeNow
      */
     RTTIMESPEC Time;
-    ITERATE(RT_NOTHING, RTTimeNow(&Time);, RT_NOTHING, 1000000);
+    ITERATE(RT_NOTHING, RTTimeNow(&Time);, RT_NOTHING, UINT32_C(1000000));
     PrintResult(u64TotalTS, u64MaxTS, u64MinTS, i, "RTTimeNow");
 
     /*
      * RTLogDefaultInstance()
      */
-    ITERATE(RT_NOTHING, RTLogDefaultInstance();, RT_NOTHING, 1000000);
+    ITERATE(RT_NOTHING, RTLogDefaultInstance();, RT_NOTHING, UINT32_C(1000000));
     PrintResult(u64TotalTS, u64MaxTS, u64MinTS, i, "RTLogDefaultInstance");
 
     /*
      * RTThreadSelf and RTThreadNativeSelf
      */
-    ITERATE(RT_NOTHING, RTThreadSelf();, RT_NOTHING, 1000000);
+    ITERATE(RT_NOTHING, RTThreadSelf();, RT_NOTHING, UINT32_C(1000000));
     PrintResult(u64TotalTS, u64MaxTS, u64MinTS, i, "RTThreadSelf");
 
-    ITERATE(RT_NOTHING, RTThreadNativeSelf();, RT_NOTHING, 1000000);
+    ITERATE(RT_NOTHING, RTThreadNativeSelf();, RT_NOTHING, UINT32_C(1000000));
     PrintResult(u64TotalTS, u64MaxTS, u64MinTS, i, "RTThreadNativeSelf");
 
 #if defined(RT_ARCH_X86) || defined(RT_ARCH_AMD64)
     /*
      * Registers vs stack.
      */
-    ITERATE(RT_NOTHING, tstRTPRfARegisterAccess();, RT_NOTHING, 1000);
+    ITERATE(RT_NOTHING, tstRTPRfARegisterAccess();, RT_NOTHING, UINT32_C(1000));
     uint64_t const cRegTotal = u64TotalTS;
     //PrintResult(u64TotalTS, u64MaxTS, u64MinTS, i, "Register only algorithm");
 
-    ITERATE(RT_NOTHING, tstRTPRfAMemoryAccess();, RT_NOTHING, 1000);
+    ITERATE(RT_NOTHING, tstRTPRfAMemoryAccess();, RT_NOTHING, UINT32_C(1000));
     uint64_t const cMemTotal = u64TotalTS;
     //PrintResult(u64TotalTS, u64MaxTS, u64MinTS, i, "Memory only algorithm");
 
-    ITERATE(RT_NOTHING, tstRTPRfAMemoryUnalignedAccess();, RT_NOTHING, 1000);
+    ITERATE(RT_NOTHING, tstRTPRfAMemoryUnalignedAccess();, RT_NOTHING, UINT32_C(1000));
     uint64_t const cMemUnalignedTotal = u64TotalTS;
     //PrintResult(u64TotalTS, u64MaxTS, u64MinTS, i, "Memory only algorithm");
 
diff --git a/src/VBox/Runtime/testcase/tstRTAssertCompile.cpp b/src/VBox/Runtime/testcase/tstRTAssertCompile.cpp
index a13635c..fab9a8b 100644
--- a/src/VBox/Runtime/testcase/tstRTAssertCompile.cpp
+++ b/src/VBox/Runtime/testcase/tstRTAssertCompile.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -155,7 +155,10 @@ int main(int argc, char **argv)
      * AssertCompile so it's kind of related.
      */
 #ifdef RT_COMPILER_SUPPORTS_VA_ARGS
+# if 0
     AssertCompile(RT_COUNT_VA_ARGS() == 0);
+    AssertCompile(RT_COUNT_VA_ARGS(RT_NOTHING) == 1);
+# endif
     AssertCompile(RT_COUNT_VA_ARGS(asdf) == 1);
     AssertCompile(RT_COUNT_VA_ARGS(yyyy) == 1);
     AssertCompile(RT_COUNT_VA_ARGS(_) == 1);
diff --git a/src/VBox/Runtime/testcase/tstRTAvl.cpp b/src/VBox/Runtime/testcase/tstRTAvl.cpp
index 88662f1..89c9958 100644
--- a/src/VBox/Runtime/testcase/tstRTAvl.cpp
+++ b/src/VBox/Runtime/testcase/tstRTAvl.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTBase64.cpp b/src/VBox/Runtime/testcase/tstRTBase64.cpp
index 6149e15..85d23a6 100644
--- a/src/VBox/Runtime/testcase/tstRTBase64.cpp
+++ b/src/VBox/Runtime/testcase/tstRTBase64.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTBigNum.cpp b/src/VBox/Runtime/testcase/tstRTBigNum.cpp
index b915da1..3cc6f45 100644
--- a/src/VBox/Runtime/testcase/tstRTBigNum.cpp
+++ b/src/VBox/Runtime/testcase/tstRTBigNum.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -108,7 +108,7 @@ static RTBIGNUM g_Ten;
 static RTBIGNUM g_FourtyTwo;
 
 static uint8_t const g_abMinus1[] = { 0xff, 0xff, 0xff, 0xff,  0xff, 0xff, 0xff, 0xff };
-static int64_t  g_iBitMinus1 = -1;
+//static int64_t  g_iBitMinus1 = -1;
 static RTBIGNUM g_Minus1;
 
 
@@ -1614,6 +1614,8 @@ static void testUInt128Division(void)
 
 int main(int argc, char **argv)
 {
+    RT_NOREF_PV(argv);
+
     RTEXITCODE rcExit = RTTestInitAndCreate("tstRTBigNum", &g_hTest);
     if (rcExit != RTEXITCODE_SUCCESS)
         return rcExit;
diff --git a/src/VBox/Runtime/testcase/tstRTBitOperations.cpp b/src/VBox/Runtime/testcase/tstRTBitOperations.cpp
index b94cce7..2251acf 100644
--- a/src/VBox/Runtime/testcase/tstRTBitOperations.cpp
+++ b/src/VBox/Runtime/testcase/tstRTBitOperations.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTCType.cpp b/src/VBox/Runtime/testcase/tstRTCType.cpp
index 295a44a..a2dfe3c 100644
--- a/src/VBox/Runtime/testcase/tstRTCType.cpp
+++ b/src/VBox/Runtime/testcase/tstRTCType.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTCidr.cpp b/src/VBox/Runtime/testcase/tstRTCidr.cpp
index 9a4772c..b7942a8 100644
--- a/src/VBox/Runtime/testcase/tstRTCidr.cpp
+++ b/src/VBox/Runtime/testcase/tstRTCidr.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTCircBuf.cpp b/src/VBox/Runtime/testcase/tstRTCircBuf.cpp
index 399c200..7d4a81b 100644
--- a/src/VBox/Runtime/testcase/tstRTCircBuf.cpp
+++ b/src/VBox/Runtime/testcase/tstRTCircBuf.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -43,9 +43,9 @@ static void tst1(void)
     void *pvBuf;
     size_t cbSize;
 
-    char pcTestPattern1[] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9 };
-    char pcTestPattern2[] = { 0x8, 0x9, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9 };
-    char pcTestPattern3[] = { 0x5, 0x6, 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 };
+    char achTestPattern1[] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9 };
+//    char achTestPattern2[] = { 0x8, 0x9, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9 };
+//    char achTestPattern3[] = { 0x5, 0x6, 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 };
 
     /* Create */
     RTTestISub("Creation");
@@ -58,17 +58,17 @@ static void tst1(void)
     RTTestISub("Full write");
     RTCircBufAcquireWriteBlock(pBuf, 10, &pvBuf, &cbSize);
     RTTESTI_CHECK(cbSize == 10);
-    memcpy(pvBuf, pcTestPattern1, 10);
+    memcpy(pvBuf, achTestPattern1, 10);
     RTCircBufReleaseWriteBlock(pBuf, 10);
     RTTESTI_CHECK(RTCircBufFree(pBuf) == 0);
     RTTESTI_CHECK(RTCircBufUsed(pBuf) == 10);
-//    RTTESTI_CHECK(memcmp(pBuf->pvBuf, pcTestPattern1, 10) == 0); /* Check the internal state */
+//    RTTESTI_CHECK(memcmp(pBuf->pvBuf, achTestPattern1, 10) == 0); /* Check the internal state */
 
     /* Half read */
     RTTestISub("Half read");
     RTCircBufAcquireReadBlock(pBuf, 5, &pvBuf, &cbSize);
     RTTESTI_CHECK(cbSize == 5);
-    RTTESTI_CHECK(memcmp(pvBuf, pcTestPattern1, 5) == 0);
+    RTTESTI_CHECK(memcmp(pvBuf, achTestPattern1, 5) == 0);
     RTCircBufReleaseReadBlock(pBuf, 5);
     RTTESTI_CHECK(RTCircBufFree(pBuf) == 5);
     RTTESTI_CHECK(RTCircBufUsed(pBuf) == 5);
@@ -77,24 +77,24 @@ static void tst1(void)
     RTTestISub("Sub write");
     RTCircBufAcquireWriteBlock(pBuf, 2, &pvBuf, &cbSize);
     RTTESTI_CHECK(cbSize == 2);
-    memcpy(pvBuf, &pcTestPattern1[8], 2);
+    memcpy(pvBuf, &achTestPattern1[8], 2);
     RTCircBufReleaseWriteBlock(pBuf, 2);
     RTTESTI_CHECK(RTCircBufFree(pBuf) == 3);
     RTTESTI_CHECK(RTCircBufUsed(pBuf) == 7);
-//    RTTESTI_CHECK(memcmp(pBuf->pvBuf, pcTestPattern2, 10) == 0); /* Check the internal state */
+//    RTTESTI_CHECK(memcmp(pBuf->pvBuf, achTestPattern2, 10) == 0); /* Check the internal state */
 
     /* Split tests */
     /* Split read */
     RTTestISub("Split read");
     RTCircBufAcquireReadBlock(pBuf, 7, &pvBuf, &cbSize);
     RTTESTI_CHECK(cbSize == 5);
-    RTTESTI_CHECK(memcmp(pvBuf, &pcTestPattern1[5], 5) == 0);
+    RTTESTI_CHECK(memcmp(pvBuf, &achTestPattern1[5], 5) == 0);
     RTCircBufReleaseReadBlock(pBuf, 5);
     RTTESTI_CHECK(RTCircBufFree(pBuf) == 8);
     RTTESTI_CHECK(RTCircBufUsed(pBuf) == 2);
     RTCircBufAcquireReadBlock(pBuf, 2, &pvBuf, &cbSize);
     RTTESTI_CHECK(cbSize == 2);
-    RTTESTI_CHECK(memcmp(pvBuf, &pcTestPattern1[8], 2) == 0);
+    RTTESTI_CHECK(memcmp(pvBuf, &achTestPattern1[8], 2) == 0);
     RTCircBufReleaseReadBlock(pBuf, 2);
     RTTESTI_CHECK(RTCircBufFree(pBuf) == 10);
     RTTESTI_CHECK(RTCircBufUsed(pBuf) == 0);
@@ -103,17 +103,17 @@ static void tst1(void)
     RTTestISub("Split write");
     RTCircBufAcquireWriteBlock(pBuf, 10, &pvBuf, &cbSize);
     RTTESTI_CHECK(cbSize == 8);
-    memcpy(pvBuf, pcTestPattern1, 8);
+    memcpy(pvBuf, achTestPattern1, 8);
     RTCircBufReleaseWriteBlock(pBuf, 8);
     RTTESTI_CHECK(RTCircBufFree(pBuf) == 2);
     RTTESTI_CHECK(RTCircBufUsed(pBuf) == 8);
     RTCircBufAcquireWriteBlock(pBuf, 2, &pvBuf, &cbSize);
     RTTESTI_CHECK(cbSize == 2);
-    memcpy(pvBuf, &pcTestPattern1[5], 2);
+    memcpy(pvBuf, &achTestPattern1[5], 2);
     RTCircBufReleaseWriteBlock(pBuf, 2);
     RTTESTI_CHECK(RTCircBufFree(pBuf) == 0);
     RTTESTI_CHECK(RTCircBufUsed(pBuf) == 10);
-//    RTTESTI_CHECK(memcmp(pBuf->pvBuf, pcTestPattern3, 10) == 0); /* Check the internal state */
+//    RTTESTI_CHECK(memcmp(pBuf->pvBuf, achTestPattern3, 10) == 0); /* Check the internal state */
 
     /* Destroy */
     RTCircBufDestroy(pBuf);
diff --git a/src/VBox/Runtime/testcase/tstRTCoreDump.cpp b/src/VBox/Runtime/testcase/tstRTCoreDump.cpp
index c8549fe..e4b1f0b 100644
--- a/src/VBox/Runtime/testcase/tstRTCoreDump.cpp
+++ b/src/VBox/Runtime/testcase/tstRTCoreDump.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTCrX509-1.cpp b/src/VBox/Runtime/testcase/tstRTCrX509-1.cpp
index 1086680..84781a7 100644
--- a/src/VBox/Runtime/testcase/tstRTCrX509-1.cpp
+++ b/src/VBox/Runtime/testcase/tstRTCrX509-1.cpp
@@ -194,4 +194,3 @@ int main()
     return RTTestSummaryAndDestroy(g_hTest);
 }
 
-
diff --git a/src/VBox/Runtime/testcase/tstRTCritSect.cpp b/src/VBox/Runtime/testcase/tstRTCritSect.cpp
index e8e7726..0cf1cb6 100644
--- a/src/VBox/Runtime/testcase/tstRTCritSect.cpp
+++ b/src/VBox/Runtime/testcase/tstRTCritSect.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #ifdef TRY_WIN32_CRIT
-# include <Windows.h>
+# include <iprt/win/windows.h>
 #endif
 #define RTCRITSECT_WITHOUT_REMAPPING
 #include <iprt/critsect.h>
@@ -151,6 +151,7 @@ static RTTEST g_hTest;
  */
 static DECLCALLBACK(int) ThreadTest1(RTTHREAD ThreadSelf, void *pvArgs)
 {
+    RT_NOREF1(ThreadSelf);
     THREADTEST1ARGS Args = *(PTHREADTEST1ARGS)pvArgs;
     Log2(("ThreadTest1: Start - iThread=%d ThreadSelf=%p\n", Args.iThread, ThreadSelf));
     RTMemFree(pvArgs);
@@ -245,6 +246,7 @@ static int Test1(unsigned cThreads)
  */
 static DECLCALLBACK(int) ThreadTest2(RTTHREAD ThreadSelf, void *pvArg)
 {
+    RT_NOREF1(ThreadSelf);
     PTHREADTEST2ARGS pArgs = (PTHREADTEST2ARGS)pvArg;
     Log2(("ThreadTest2: Start - iThread=%d ThreadSelf=%p\n", pArgs->iThread, ThreadSelf));
     uint64_t    u64TSStart = 0;
@@ -311,7 +313,7 @@ static DECLCALLBACK(int) ThreadTest2(RTTHREAD ThreadSelf, void *pvArg)
                 return 1;
             }
         }
-        ASMAtomicCmpXchgU32(pArgs->pu32Alone, pArgs->iThread, ~0);
+        ASMAtomicCmpXchgU32(pArgs->pu32Alone, pArgs->iThread, UINT32_MAX);
         for (u32 = 0; u32 < pArgs->cCheckLoops; u32++)
         {
             if (*pArgs->pu32Alone != pArgs->iThread)
@@ -321,7 +323,7 @@ static DECLCALLBACK(int) ThreadTest2(RTTHREAD ThreadSelf, void *pvArg)
                 return 1;
             }
         }
-        ASMAtomicXchgU32(pArgs->pu32Alone, ~0);
+        ASMAtomicXchgU32(pArgs->pu32Alone, UINT32_MAX);
 
         /*
          * Check for sequences.
@@ -375,8 +377,8 @@ static int Test2(unsigned cThreads, unsigned cIterations, unsigned cCheckLoops)
     RTSEMEVENT       EventDone;
     RTTEST_CHECK_RC_RET(g_hTest, RTSemEventCreate(&EventDone), VINF_SUCCESS, 1);
     uint32_t volatile   u32Release = 0;
-    uint32_t volatile   u32Alone = ~0;
-    uint32_t volatile   u32Prev = ~0;
+    uint32_t volatile   u32Alone = UINT32_MAX;
+    uint32_t volatile   u32Prev = UINT32_MAX;
     uint32_t volatile   cSeq = 0;
     uint32_t volatile   cReordered = 0;
     uint32_t volatile   cThreadRunning = 0;
@@ -492,7 +494,7 @@ int main(int argc, char **argv)
                 return 1;
 
             case 'V':
-                RTPrintf("$Revision: 102121 $\n");
+                RTPrintf("$Revision: 109295 $\n");
                 return 0;
 
             default:
diff --git a/src/VBox/Runtime/testcase/tstRTCritSectRw.cpp b/src/VBox/Runtime/testcase/tstRTCritSectRw.cpp
index 3a685c2..c1a144b 100644
--- a/src/VBox/Runtime/testcase/tstRTCritSectRw.cpp
+++ b/src/VBox/Runtime/testcase/tstRTCritSectRw.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -447,6 +447,7 @@ static bool Test1(void)
 
 int main(int argc, char **argv)
 {
+    RT_NOREF_PV(argv);
     int rc = RTTestInitAndCreate("tstRTCritSectRw", &g_hTest);
     if (rc)
         return 1;
diff --git a/src/VBox/Runtime/testcase/tstRTDarwinMachKernel.cpp b/src/VBox/Runtime/testcase/tstRTDarwinMachKernel.cpp
index 64a2de3..65cec1e 100644
--- a/src/VBox/Runtime/testcase/tstRTDarwinMachKernel.cpp
+++ b/src/VBox/Runtime/testcase/tstRTDarwinMachKernel.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -65,7 +65,7 @@ static void dotest(void)
 }
 
 
-int main(int argc, char **argv)
+int main()
 {
     RTTEST hTest;
     RTEXITCODE rcExit = RTTestInitAndCreate("tstRTDarwinMachKernel", &hTest);
diff --git a/src/VBox/Runtime/testcase/tstRTDigest-2.cpp b/src/VBox/Runtime/testcase/tstRTDigest-2.cpp
index ce9ef5f..92fc9fa 100644
--- a/src/VBox/Runtime/testcase/tstRTDigest-2.cpp
+++ b/src/VBox/Runtime/testcase/tstRTDigest-2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTDigest.cpp b/src/VBox/Runtime/testcase/tstRTDigest.cpp
index e048d0d..5bebec1 100644
--- a/src/VBox/Runtime/testcase/tstRTDigest.cpp
+++ b/src/VBox/Runtime/testcase/tstRTDigest.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTDirCreateUniqueNumbered.cpp b/src/VBox/Runtime/testcase/tstRTDirCreateUniqueNumbered.cpp
index dc751d1..4dfdc24 100644
--- a/src/VBox/Runtime/testcase/tstRTDirCreateUniqueNumbered.cpp
+++ b/src/VBox/Runtime/testcase/tstRTDirCreateUniqueNumbered.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -52,23 +52,26 @@ static void tst1(size_t cTest, size_t cchDigits, char chSep)
         cTimes *= 10;
 
     /* Allocate the result array. */
-    char **papszNames = (char **)RTMemTmpAllocZ(cTimes * sizeof(char *));
+    char **papszNames = (char **)RTMemTmpAllocZ((cTimes + 1) * sizeof(char *));
     RTTESTI_CHECK_RETV(papszNames != NULL);
 
     int rc = VERR_INTERNAL_ERROR;
     /* The test loop. */
     size_t i;
-    for (i = 0; i < cTimes; i++)
+    for (i = 0; i < cTimes + 1; i++)
     {
         char szName[RTPATH_MAX];
         RTTESTI_CHECK_RC(rc = RTPathAppend(strcpy(szName, g_szTempPath), sizeof(szName), "RTDirCreateUniqueNumbered"), VINF_SUCCESS);
         if (RT_FAILURE(rc))
             break;
 
-        RTTESTI_CHECK_RC(rc = RTDirCreateUniqueNumbered(szName, sizeof(szName), 0700, cchDigits, chSep), VINF_SUCCESS);
-        if (RT_FAILURE(rc))
+        rc = RTDirCreateUniqueNumbered(szName, sizeof(szName), 0700, cchDigits, chSep);
+        if (rc != VINF_SUCCESS)
         {
-            RTTestIFailed("RTDirCreateUniqueNumbered(%s) call #%u -> %Rrc\n", szName, i, rc);
+            /* Random selection (system) isn't 100% predictable, so we must give a little
+               leeway for the 2+ digit tests.  (Using random is essential for performance.) */
+            if (cchDigits == 1 || rc != VERR_ALREADY_EXISTS || i < cTimes - 1)
+                RTTestIFailed("RTDirCreateUniqueNumbered(%s) call #%u -> %Rrc\n", szName, i, rc);
             break;
         }
 
@@ -80,7 +83,7 @@ static void tst1(size_t cTest, size_t cchDigits, char chSep)
     }
 
     /* Try to create one more, which shouldn't be possible. */
-    if (RT_SUCCESS(rc))
+    if (RT_SUCCESS(rc) && i == cTimes + 1)
     {
         char szName[RTPATH_MAX];
         RTTESTI_CHECK_RC(rc = RTPathAppend(strcpy(szName, g_szTempPath), sizeof(szName), "RTDirCreateUniqueNumbered"), VINF_SUCCESS);
@@ -117,9 +120,9 @@ int main()
     /*
      * Create some test directories.
      */
-    tst1(1, 1, 0  );
+    tst1(1, 1, '\0');
     tst1(2, 1, '-');
-    tst1(3, 2, 0  );
+    tst1(3, 2, '\0');
     tst1(4, 2, '-');
 
     /*
diff --git a/src/VBox/Runtime/testcase/tstRTDvm.cpp b/src/VBox/Runtime/testcase/tstRTDvm.cpp
index 10641cd..6e64f83 100644
--- a/src/VBox/Runtime/testcase/tstRTDvm.cpp
+++ b/src/VBox/Runtime/testcase/tstRTDvm.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTErrUnique.cpp b/src/VBox/Runtime/testcase/tstRTErrUnique.cpp
index 369ab88..9b7c487 100644
--- a/src/VBox/Runtime/testcase/tstRTErrUnique.cpp
+++ b/src/VBox/Runtime/testcase/tstRTErrUnique.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTFileAio.cpp b/src/VBox/Runtime/testcase/tstRTFileAio.cpp
index b6c1563..5a1594a 100644
--- a/src/VBox/Runtime/testcase/tstRTFileAio.cpp
+++ b/src/VBox/Runtime/testcase/tstRTFileAio.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTFileAppend-1.cpp b/src/VBox/Runtime/testcase/tstRTFileAppend-1.cpp
index aa6a314..6c5221c 100644
--- a/src/VBox/Runtime/testcase/tstRTFileAppend-1.cpp
+++ b/src/VBox/Runtime/testcase/tstRTFileAppend-1.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTFileGetSize-1.cpp b/src/VBox/Runtime/testcase/tstRTFileGetSize-1.cpp
index 158f2c5..d5d4e71 100644
--- a/src/VBox/Runtime/testcase/tstRTFileGetSize-1.cpp
+++ b/src/VBox/Runtime/testcase/tstRTFileGetSize-1.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTFileModeStringToFlags.cpp b/src/VBox/Runtime/testcase/tstRTFileModeStringToFlags.cpp
index 5af6944..1d3321f 100644
--- a/src/VBox/Runtime/testcase/tstRTFileModeStringToFlags.cpp
+++ b/src/VBox/Runtime/testcase/tstRTFileModeStringToFlags.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTFilesystem.cpp b/src/VBox/Runtime/testcase/tstRTFilesystem.cpp
index 5ad4855..798784d 100644
--- a/src/VBox/Runtime/testcase/tstRTFilesystem.cpp
+++ b/src/VBox/Runtime/testcase/tstRTFilesystem.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTFsQueries.cpp b/src/VBox/Runtime/testcase/tstRTFsQueries.cpp
index 3a840b5..b4ab744 100644
--- a/src/VBox/Runtime/testcase/tstRTFsQueries.cpp
+++ b/src/VBox/Runtime/testcase/tstRTFsQueries.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTGetOpt.cpp b/src/VBox/Runtime/testcase/tstRTGetOpt.cpp
index 7b7d41d..933fa44 100644
--- a/src/VBox/Runtime/testcase/tstRTGetOpt.cpp
+++ b/src/VBox/Runtime/testcase/tstRTGetOpt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTGetOptArgv.cpp b/src/VBox/Runtime/testcase/tstRTGetOptArgv.cpp
index c8b49e0..329b4e9 100644
--- a/src/VBox/Runtime/testcase/tstRTGetOptArgv.cpp
+++ b/src/VBox/Runtime/testcase/tstRTGetOptArgv.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -430,46 +430,47 @@ static void tst3(void)
 }
 
 
-static void tst2(void)
+/* Global to avoid weird C4640 warning about "construction of local static object is not thread-safe". */
+static const struct
+{
+    const char * const      apszArgs[5];
+    const char             *pszCmdLine;
+} g_aMscCrtTests[] =
 {
-    RTTestISub("RTGetOptArgvToString / MS_CRT");
-
-    static const struct
     {
-        const char * const      apszArgs[5];
-        const char             *pszCmdLine;
-    } s_aMscCrtTests[] =
+        { "abcd", "a ", " b", " c ", NULL },
+        "abcd \"a \" \" b\" \" c \""
+    },
     {
-        {
-            { "abcd", "a ", " b", " c ", NULL },
-            "abcd \"a \" \" b\" \" c \""
-        },
-        {
-            { "a\\\\\\b", "de fg", "h", NULL, NULL },
-            "a\\\\\\b \"de fg\" h"
-        },
-        {
-            { "a\\\"b", "c", "d", "\"", NULL },
-            "\"a\\\\\\\"b\" c d \"\\\"\""
-        },
-        {
-            { "a\\\\b c", "d", "e", " \\", NULL },
-            "\"a\\\\b c\" d e \" \\\\\""
-        },
-    };
+        { "a\\\\\\b", "de fg", "h", NULL, NULL },
+        "a\\\\\\b \"de fg\" h"
+    },
+    {
+        { "a\\\"b", "c", "d", "\"", NULL },
+        "\"a\\\\\\\"b\" c d \"\\\"\""
+    },
+    {
+        { "a\\\\b c", "d", "e", " \\", NULL },
+        "\"a\\\\b c\" d e \" \\\\\""
+    },
+};
+
+static void tst2(void)
+{
+    RTTestISub("RTGetOptArgvToString / MS_CRT");
 
-    for (size_t i = 0; i < RT_ELEMENTS(s_aMscCrtTests); i++)
+    for (size_t i = 0; i < RT_ELEMENTS(g_aMscCrtTests); i++)
     {
         char *pszCmdLine = NULL;
-        int rc = RTGetOptArgvToString(&pszCmdLine, s_aMscCrtTests[i].apszArgs, RTGETOPTARGV_CNV_QUOTE_MS_CRT);
+        int rc = RTGetOptArgvToString(&pszCmdLine, g_aMscCrtTests[i].apszArgs, RTGETOPTARGV_CNV_QUOTE_MS_CRT);
         RTTESTI_CHECK_RC_RETV(rc, VINF_SUCCESS);
-        if (!strcmp(s_aMscCrtTests[i].pszCmdLine, pszCmdLine))
-            tstCheckNativeMsCrtToArgv(pszCmdLine, -1, s_aMscCrtTests[i].apszArgs);
+        if (!strcmp(g_aMscCrtTests[i].pszCmdLine, pszCmdLine))
+            tstCheckNativeMsCrtToArgv(pszCmdLine, -1, g_aMscCrtTests[i].apszArgs);
         else
             RTTestIFailed("g_aTest[%i] failed:\n"
                           " got      '%s'\n"
                           " expected '%s'\n",
-                          i, pszCmdLine, s_aMscCrtTests[i].pszCmdLine);
+                          i, pszCmdLine, g_aMscCrtTests[i].pszCmdLine);
         RTStrFree(pszCmdLine);
     }
 
diff --git a/src/VBox/Runtime/testcase/tstRTHeapOffset.cpp b/src/VBox/Runtime/testcase/tstRTHeapOffset.cpp
index b63907b..974d582 100644
--- a/src/VBox/Runtime/testcase/tstRTHeapOffset.cpp
+++ b/src/VBox/Runtime/testcase/tstRTHeapOffset.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -42,8 +42,10 @@
 #include <iprt/time.h>
 
 
-int main(int argc, char *argv[])
+int main(int argc, char **argv)
 {
+    RT_NOREF_PV(argc); RT_NOREF_PV(argv);
+
     /*
      * Init runtime.
      */
diff --git a/src/VBox/Runtime/testcase/tstRTHeapSimple.cpp b/src/VBox/Runtime/testcase/tstRTHeapSimple.cpp
index bb31648..1309b26 100644
--- a/src/VBox/Runtime/testcase/tstRTHeapSimple.cpp
+++ b/src/VBox/Runtime/testcase/tstRTHeapSimple.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -39,8 +39,10 @@
 #include <iprt/test.h>
 
 
-int main(int argc, char *argv[])
+int main(int argc, char **argv)
 {
+    RT_NOREF_PV(argc); RT_NOREF_PV(argv);
+
     /*
      * Init runtime.
      */
diff --git a/src/VBox/Runtime/testcase/tstRTHttp.cpp b/src/VBox/Runtime/testcase/tstRTHttp.cpp
index 79469dc..205cb8d 100644
--- a/src/VBox/Runtime/testcase/tstRTHttp.cpp
+++ b/src/VBox/Runtime/testcase/tstRTHttp.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -194,7 +194,7 @@ static void checkError(RTHTTP hHttp, int rc, const char *pszFile)
 
 int main(int argc, char **argv)
 {
-    unsigned cErrors = 0;
+    //unsigned cErrors = 0;
 
     RTR3InitExe(argc, &argv, 0);
 
diff --git a/src/VBox/Runtime/testcase/tstRTInlineAsm.cpp b/src/VBox/Runtime/testcase/tstRTInlineAsm.cpp
index b54b1d7..c9c2c5f 100644
--- a/src/VBox/Runtime/testcase/tstRTInlineAsm.cpp
+++ b/src/VBox/Runtime/testcase/tstRTInlineAsm.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -639,10 +639,10 @@ DECLINLINE(void) tstASMAtomicXchgU8Worker(uint8_t volatile *pu8)
     CHECKOP(ASMAtomicXchgU8(pu8, 0), 1, "%#x", uint8_t);
     CHECKVAL(*pu8, 0, "%#x");
 
-    CHECKOP(ASMAtomicXchgU8(pu8, 0xff), 0, "%#x", uint8_t);
+    CHECKOP(ASMAtomicXchgU8(pu8, UINT8_C(0xff)), 0, "%#x", uint8_t);
     CHECKVAL(*pu8, 0xff, "%#x");
 
-    CHECKOP(ASMAtomicXchgU8(pu8, 0x87), 0xffff, "%#x", uint8_t);
+    CHECKOP(ASMAtomicXchgU8(pu8, UINT8_C(0x87)), UINT8_C(0xff), "%#x", uint8_t);
     CHECKVAL(*pu8, 0x87, "%#x");
 }
 
@@ -1433,6 +1433,10 @@ void tstASMMemFirstMismatchingU8(RTTEST hTest)
                     pbBuf1[offEnd] = 0xff;
                     pbBuf2[offEnd] = 0xff;
                 }
+#ifdef _MSC_VER /* simple stupid compiler warnings */
+                else
+                    bSaved1 = bSaved2 = 0;
+#endif
 
                 uint8_t *pbRet = (uint8_t *)ASMMemFirstMismatchingU8(pbBuf1 + offStart, cb, bFiller1);
                 RTTESTI_CHECK(offNonZero - offStart < cb ? pbRet == &pbBuf1[offNonZero] : pbRet == NULL);
@@ -1666,7 +1670,7 @@ void tstASMByteSwap(void)
     u64In  = 0;
     u64Out = ASMByteSwapU64(u64In);
     CHECKVAL(u64Out, u64In, "%#018RX64");
-    u64In  = ~(uint64_t)0;
+    u64In  = UINT64_MAX;
     u64Out = ASMByteSwapU64(u64In);
     CHECKVAL(u64Out, u64In, "%#018RX64");
 
@@ -1685,7 +1689,7 @@ void tstASMByteSwap(void)
     u32In  = 0;
     u32Out = ASMByteSwapU32(u32In);
     CHECKVAL(u32Out, u32In, "%#010RX32");
-    u32In  = ~(uint32_t)0;
+    u32In  = UINT32_MAX;
     u32Out = ASMByteSwapU32(u32In);
     CHECKVAL(u32Out, u32In, "%#010RX32");
 
@@ -1704,7 +1708,7 @@ void tstASMByteSwap(void)
     u16In  = 0;
     u16Out = ASMByteSwapU16(u16In);
     CHECKVAL(u16Out, u16In, "%#06RX16");
-    u16In  = ~(uint16_t)0;
+    u16In  = UINT16_MAX;
     u16Out = ASMByteSwapU16(u16In);
     CHECKVAL(u16Out, u16In, "%#06RX16");
 }
@@ -1878,8 +1882,10 @@ void tstASMBench(void)
 }
 
 
-int main(int argc, char *argv[])
+int main(int argc, char **argv)
 {
+    RT_NOREF_PV(argc); RT_NOREF_PV(argv);
+
     int rc = RTTestInitAndCreate("tstRTInlineAsm", &g_hTest);
     if (rc)
         return rc;
diff --git a/src/VBox/Runtime/testcase/tstRTJson.cpp b/src/VBox/Runtime/testcase/tstRTJson.cpp
index b5e0b59..2547435 100644
--- a/src/VBox/Runtime/testcase/tstRTJson.cpp
+++ b/src/VBox/Runtime/testcase/tstRTJson.cpp
@@ -101,6 +101,7 @@ static void tstBasic(RTTEST hTest)
 static void tstCorrectnessRcForInvalidType(RTTEST hTest, RTJSONVAL hJsonVal, RTJSONVALTYPE enmType)
 {
 #ifndef RT_STRICT /* Enable manually if assertions are enabled or it will assert all over the place for debug builds. */
+/** @todo you can disable assertions and all the noise. See RTAssertSetMayPanic and RTAssertSetQuiet. */
     if (   enmType != RTJSONVALTYPE_OBJECT
         && enmType != RTJSONVALTYPE_ARRAY)
     {
@@ -138,6 +139,8 @@ static void tstCorrectnessRcForInvalidType(RTTEST hTest, RTJSONVAL hJsonVal, RTJ
         RTTEST_CHECK(hTest, RTJsonValueGetString(hJsonVal) == NULL);
         RTTEST_CHECK_RC(hTest, RTJsonValueQueryString(hJsonVal, &psz), VERR_JSON_VALUE_INVALID_TYPE);
     }
+#else
+    RT_NOREF3(hTest, hJsonVal, enmType);
 #endif
 }
 
diff --git a/src/VBox/Runtime/testcase/tstRTLdrVerifyPeImage.cpp b/src/VBox/Runtime/testcase/tstRTLdrVerifyPeImage.cpp
index 43f08cf..31736f9 100644
--- a/src/VBox/Runtime/testcase/tstRTLdrVerifyPeImage.cpp
+++ b/src/VBox/Runtime/testcase/tstRTLdrVerifyPeImage.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -45,6 +45,8 @@ static DECLCALLBACK(int) TestCallback(RTLDRMOD hLdrMod, RTLDRSIGNATURETYPE enmSi
                                       void const *pvSignature, size_t cbSignature,
                                       PRTERRINFO pErrInfo, void *pvUser)
 {
+    RT_NOREF_PV(hLdrMod); RT_NOREF_PV(enmSignature); RT_NOREF_PV(pvSignature); RT_NOREF_PV(cbSignature);
+    RT_NOREF_PV(pErrInfo); RT_NOREF_PV(pvUser);
     return VINF_SUCCESS;
 }
 
diff --git a/src/VBox/Runtime/testcase/tstRTList.cpp b/src/VBox/Runtime/testcase/tstRTList.cpp
index 02f3f1a..4e50378 100644
--- a/src/VBox/Runtime/testcase/tstRTList.cpp
+++ b/src/VBox/Runtime/testcase/tstRTList.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTLocalIpc.cpp b/src/VBox/Runtime/testcase/tstRTLocalIpc.cpp
index b4a5433..13d2105 100644
--- a/src/VBox/Runtime/testcase/tstRTLocalIpc.cpp
+++ b/src/VBox/Runtime/testcase/tstRTLocalIpc.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -137,6 +137,8 @@ static DECLCALLBACK(int) testServerListenThread(RTTHREAD hSelf, void *pvUser)
 static DECLCALLBACK(int) tstRTLocalIpcSessionConnectionChild(RTTHREAD hSelf, void *pvUser)
 {
     RTLOCALIPCSESSION hClientSession;
+    RT_NOREF_PV(hSelf); RT_NOREF_PV(pvUser);
+
     RTTEST_CHECK_RC_OK_RET(g_hTest, RTTestSetDefault(g_hTest, NULL), rcCheck);
 
     RTTEST_CHECK_RC_RET(g_hTest, RTLocalIpcSessionConnect(&hClientSession, "tstRTLocalIpcSessionConnection",0 /* Flags */),
@@ -268,6 +270,7 @@ static DECLCALLBACK(int) testSessionWaitThread(RTTHREAD hSelf, void *pvUser)
 static DECLCALLBACK(int) tstRTLocalIpcSessionWaitChild(RTTHREAD hSelf, void *pvUser)
 {
     RTTEST_CHECK_RC_OK_RET(g_hTest, RTTestSetDefault(g_hTest, NULL), rcCheck);
+    RT_NOREF_PV(hSelf); RT_NOREF_PV(pvUser);
 
     RTLOCALIPCSESSION hClientSession;
     RTTESTI_CHECK_RC_RET(RTLocalIpcSessionConnect(&hClientSession, "tstRTLocalIpcSessionWait", 0 /*fFlags*/),
@@ -563,6 +566,7 @@ static DECLCALLBACK(int) testSessionDataThread(RTTHREAD hSelf, void *pvUser)
 static DECLCALLBACK(int) tstRTLocalIpcSessionDataChild(RTTHREAD hSelf, void *pvUser)
 {
     RTTEST_CHECK_RC_OK_RET(g_hTest, RTTestSetDefault(g_hTest, NULL), rcCheck);
+    RT_NOREF_PV(hSelf); RT_NOREF_PV(pvUser);
 
     /*
      * Connect.
@@ -756,6 +760,7 @@ static DECLCALLBACK(int) testSessionPerfThread(RTTHREAD hSelf, void *pvUser)
 static DECLCALLBACK(int) tstRTLocalIpcSessionPerfChild(RTTHREAD hSelf, void *pvUser)
 {
     RTTEST_CHECK_RC_OK_RET(g_hTest, RTTestSetDefault(g_hTest, NULL), rcCheck);
+    RT_NOREF_PV(hSelf); RT_NOREF_PV(pvUser);
 
     /*
      * Connect.
diff --git a/src/VBox/Runtime/testcase/tstRTLockValidator.cpp b/src/VBox/Runtime/testcase/tstRTLockValidator.cpp
index dea8a2f..74f51c7 100644
--- a/src/VBox/Runtime/testcase/tstRTLockValidator.cpp
+++ b/src/VBox/Runtime/testcase/tstRTLockValidator.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -422,6 +422,7 @@ static DECLCALLBACK(int) testDd1Thread(RTTHREAD ThreadSelf, void *pvUser)
     uintptr_t       i     = (uintptr_t)pvUser;
     PRTCRITSECT     pMine = &g_aCritSects[i];
     PRTCRITSECT     pNext = &g_aCritSects[(i + 1) % g_cThreads];
+    RT_NOREF_PV(ThreadSelf);
 
     RTTEST_CHECK_RC_RET(g_hTest, RTCritSectEnter(pMine), VINF_SUCCESS, rcCheck);
     if (!(i & 1))
@@ -463,6 +464,7 @@ static DECLCALLBACK(int) testDd2Thread(RTTHREAD ThreadSelf, void *pvUser)
     RTSEMRW         hMine = g_ahSemRWs[i];
     RTSEMRW         hNext = g_ahSemRWs[(i + 1) % g_cThreads];
     int             rc;
+    RT_NOREF_PV(ThreadSelf);
 
     if (i & 1)
     {
@@ -519,6 +521,7 @@ static DECLCALLBACK(int) testDd3Thread(RTTHREAD ThreadSelf, void *pvUser)
     RTSEMRW         hMine = g_ahSemRWs[i];
     RTSEMRW         hNext = g_ahSemRWs[(i + 1) % g_cThreads];
     int             rc;
+    RT_NOREF_PV(ThreadSelf);
 
     if (i & 1)
         RTTEST_CHECK_RC_RET(g_hTest, RTSemRWRequestWrite(hMine, RT_INDEFINITE_WAIT), VINF_SUCCESS, rcCheck);
@@ -565,6 +568,7 @@ static DECLCALLBACK(int) testDd4Thread(RTTHREAD ThreadSelf, void *pvUser)
     uintptr_t       i     = (uintptr_t)pvUser;
     RTSEMRW         hMine = g_ahSemRWs[i];
     RTSEMRW         hNext = g_ahSemRWs[(i + 1) % g_cThreads];
+    RT_NOREF_PV(ThreadSelf);
 
     do
     {
@@ -621,6 +625,7 @@ static DECLCALLBACK(int) testDd5Thread(RTTHREAD ThreadSelf, void *pvUser)
     uintptr_t       i     = (uintptr_t)pvUser;
     RTSEMMUTEX      hMine = g_ahSemMtxes[i];
     RTSEMMUTEX      hNext = g_ahSemMtxes[(i + 1) % g_cThreads];
+    RT_NOREF_PV(ThreadSelf);
 
     RTTEST_CHECK_RC_RET(g_hTest, RTSemMutexRequest(hMine, RT_INDEFINITE_WAIT), VINF_SUCCESS, rcCheck);
     if (i & 1)
@@ -661,6 +666,7 @@ static DECLCALLBACK(int) testDd6Thread(RTTHREAD ThreadSelf, void *pvUser)
     uintptr_t       i     = (uintptr_t)pvUser;
     PRTCRITSECT     pMine = &g_aCritSects[i];
     PRTCRITSECT     pNext = &g_aCritSects[(i + 1) % g_cThreads];
+    RT_NOREF_PV(ThreadSelf);
 
     RTTEST_CHECK_RC_RET(g_hTest, RTCritSectEnter(pMine), VINF_SUCCESS, rcCheck);
     if (i & 1)
@@ -714,6 +720,7 @@ static DECLCALLBACK(int) testDd7Thread(RTTHREAD ThreadSelf, void *pvUser)
     uintptr_t       i     = (uintptr_t)pvUser;
     PRTCRITSECT     pMine = &g_aCritSects[i];
     PRTCRITSECT     pNext = &g_aCritSects[(i + 1) % g_cThreads];
+    RT_NOREF_PV(ThreadSelf);
 
     RTTEST_CHECK_RC_RET(g_hTest, RTCritSectEnter(pMine), VINF_SUCCESS, rcCheck);
     if (i & 1)
diff --git a/src/VBox/Runtime/testcase/tstRTManifest.cpp b/src/VBox/Runtime/testcase/tstRTManifest.cpp
index 91209a8..75c3314 100644
--- a/src/VBox/Runtime/testcase/tstRTManifest.cpp
+++ b/src/VBox/Runtime/testcase/tstRTManifest.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTMemCache.cpp b/src/VBox/Runtime/testcase/tstRTMemCache.cpp
index f48b562..b923982 100644
--- a/src/VBox/Runtime/testcase/tstRTMemCache.cpp
+++ b/src/VBox/Runtime/testcase/tstRTMemCache.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -145,6 +145,8 @@ static DECLCALLBACK(int) tst2Ctor(RTMEMCACHE hMemCache, void *pvObj, void *pvUse
 /** Destructor for tst2.  Checks that it was constructed and used twice. */
 static DECLCALLBACK(void) tst2Dtor(RTMEMCACHE hMemCache, void *pvObj, void *pvUser)
 {
+    RT_NOREF_PV(hMemCache); RT_NOREF_PV(pvUser);
+
     RTTESTI_CHECK(!strcmp((char *)pvObj, "ctor was called\nused\nused\n"));
     strcat((char *)pvObj, "dtor was called\n");
 }
@@ -206,6 +208,7 @@ static DECLCALLBACK(int) tst3Thread(RTTHREAD hThreadSelf, void *pvArg)
     PTST3THREAD     pThread     = (PTST3THREAD)(pvArg);
     size_t          cbObject    = pThread->cbObject;
     uint64_t        cIterations = 0;
+    RT_NOREF_PV(hThreadSelf);
 
     /* wait for the kick-off */
     RTTEST_CHECK_RC_OK(g_hTest, RTSemEventMultiWait(pThread->hEvt, RT_INDEFINITE_WAIT));
@@ -322,6 +325,8 @@ static void tst3AllMethods(uint32_t cThreads, uint32_t cbObject, uint32_t cSecs)
 
 int main(int argc, char **argv)
 {
+    RT_NOREF_PV(argc); RT_NOREF_PV(argv);
+
     RTTEST hTest;
     int rc = RTTestInitAndCreate("tstRTMemCache", &hTest);
     if (rc)
diff --git a/src/VBox/Runtime/testcase/tstRTMemEf.cpp b/src/VBox/Runtime/testcase/tstRTMemEf.cpp
index 1215e79..7ba3077 100644
--- a/src/VBox/Runtime/testcase/tstRTMemEf.cpp
+++ b/src/VBox/Runtime/testcase/tstRTMemEf.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTMemPool.cpp b/src/VBox/Runtime/testcase/tstRTMemPool.cpp
index fc91a7a..7c8b9eb 100644
--- a/src/VBox/Runtime/testcase/tstRTMemPool.cpp
+++ b/src/VBox/Runtime/testcase/tstRTMemPool.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -219,6 +219,8 @@ static DECLCALLBACK(int) tst4Thread(RTTHREAD hSelf, void *pvArg)
 {
 //    uint32_t    iThread  = (uint32_t)(uintptr_t)pvArg;
     RTMEMPOOL   hMemPool = g_hMemPool4;
+    RT_NOREF_PV(pvArg);
+
 
     /* setup. */
     RTTestSetDefault(g_hTest, NULL);
diff --git a/src/VBox/Runtime/testcase/tstRTMemSafer.cpp b/src/VBox/Runtime/testcase/tstRTMemSafer.cpp
index 5fbd102..7538abd 100644
--- a/src/VBox/Runtime/testcase/tstRTMemSafer.cpp
+++ b/src/VBox/Runtime/testcase/tstRTMemSafer.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -43,6 +43,8 @@
 
 static void doMemSaferScramble(RTTEST hTest, void *pvBuf, size_t cbAlloc)
 {
+    RT_NOREF_PV(hTest);
+
     /*
      * Fill it with random bytes and make a reference copy of these.
      */
diff --git a/src/VBox/Runtime/testcase/tstRTMemWipe.cpp b/src/VBox/Runtime/testcase/tstRTMemWipe.cpp
index 6b1fb94..688347e 100644
--- a/src/VBox/Runtime/testcase/tstRTMemWipe.cpp
+++ b/src/VBox/Runtime/testcase/tstRTMemWipe.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -45,7 +45,7 @@ static void doMemWipeThoroughly(RTTEST hTest)
 {
     for (uint32_t p = 0; p < RTRandU32Ex(1, 64); p++)
     {
-        size_t cbAlloc = RTRandS32Ex(1, _1M) * sizeof(uint8_t);
+        uint32_t cbAlloc = RTRandS32Ex(1, _1M) * sizeof(uint8_t);
 
         RTTestPrintf(hTest, RTTESTLVL_ALWAYS, "Testing wipe #%.02RU32 (%u bytes) ...\n",
                      p + 1, cbAlloc);
@@ -68,7 +68,7 @@ static void doMemWipeThoroughly(RTTEST hTest)
                           cbAlloc);
             continue;
         }
-        size_t cbWipeRand = RTRandU32Ex(1, cbAlloc);
+        uint32_t cbWipeRand = RTRandU32Ex(1, cbAlloc);
         RTMemWipeThoroughly(pvWipe, RT_MIN(cbAlloc, cbWipeRand), p /* Passes */);
         if (!memcmp(pvWipe, pvBuf, cbAlloc))
             RTTestIFailed("Memory blocks must differ (%z bytes, 0x%p vs. 0x%p)!\n",
diff --git a/src/VBox/Runtime/testcase/tstRTMp-1.cpp b/src/VBox/Runtime/testcase/tstRTMp-1.cpp
index 610c53a..47ac0d6 100644
--- a/src/VBox/Runtime/testcase/tstRTMp-1.cpp
+++ b/src/VBox/Runtime/testcase/tstRTMp-1.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTNetIPv4.cpp b/src/VBox/Runtime/testcase/tstRTNetIPv4.cpp
index e5faa8a..c2f73ab 100644
--- a/src/VBox/Runtime/testcase/tstRTNetIPv4.cpp
+++ b/src/VBox/Runtime/testcase/tstRTNetIPv4.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTNetIPv6.cpp b/src/VBox/Runtime/testcase/tstRTNetIPv6.cpp
index 7399c42..1d284e9 100644
--- a/src/VBox/Runtime/testcase/tstRTNetIPv6.cpp
+++ b/src/VBox/Runtime/testcase/tstRTNetIPv6.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTPathGlob.cpp b/src/VBox/Runtime/testcase/tstRTPathGlob.cpp
index 916efc5..0c429b7 100644
--- a/src/VBox/Runtime/testcase/tstRTPathGlob.cpp
+++ b/src/VBox/Runtime/testcase/tstRTPathGlob.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -79,4 +79,3 @@ int main(int argc, char **argv)
     return RTTestSummaryAndDestroy(hTest);
 }
 
-
diff --git a/src/VBox/Runtime/testcase/tstRTPipe.cpp b/src/VBox/Runtime/testcase/tstRTPipe.cpp
index 845f57f..70ffbd1 100644
--- a/src/VBox/Runtime/testcase/tstRTPipe.cpp
+++ b/src/VBox/Runtime/testcase/tstRTPipe.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -251,7 +251,7 @@ static void tstRTPipe2(void)
 
     RTPIPE  hPipeR = (RTPIPE)1;
     RTPIPE  hPipeW = (RTPIPE)1;
-    RTTESTI_CHECK_RC(RTPipeCreate(&hPipeR, &hPipeW, ~0), VERR_INVALID_PARAMETER);
+    RTTESTI_CHECK_RC(RTPipeCreate(&hPipeR, &hPipeW, UINT32_MAX), VERR_INVALID_PARAMETER);
     RTTESTI_CHECK_RC(RTPipeCreate(NULL, &hPipeW, 0), VERR_INVALID_POINTER);
     RTTESTI_CHECK_RC(RTPipeCreate(&hPipeR, NULL, 0), VERR_INVALID_POINTER);
     RTTESTI_CHECK(hPipeR == (RTPIPE)1);
diff --git a/src/VBox/Runtime/testcase/tstRTPoll.cpp b/src/VBox/Runtime/testcase/tstRTPoll.cpp
index da916b1..8662c5d 100644
--- a/src/VBox/Runtime/testcase/tstRTPoll.cpp
+++ b/src/VBox/Runtime/testcase/tstRTPoll.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTPrfIO.cpp b/src/VBox/Runtime/testcase/tstRTPrfIO.cpp
index 8a649e3..28c74b6 100644
--- a/src/VBox/Runtime/testcase/tstRTPrfIO.cpp
+++ b/src/VBox/Runtime/testcase/tstRTPrfIO.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -210,7 +210,7 @@ int main(int argc, char **argv)
                 break;
 
             case 'V':
-                RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "$Revision: 102121 $\n");
+                RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "$Revision: 109033 $\n");
                 return RTTestSummaryAndDestroy(g_hTest);
 
             case 'h':
diff --git a/src/VBox/Runtime/testcase/tstRTProcCreateEx.cpp b/src/VBox/Runtime/testcase/tstRTProcCreateEx.cpp
index 795a158..01b5654 100644
--- a/src/VBox/Runtime/testcase/tstRTProcCreateEx.cpp
+++ b/src/VBox/Runtime/testcase/tstRTProcCreateEx.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -45,7 +45,7 @@
 
 #ifdef RT_OS_WINDOWS
 # define SECURITY_WIN32
-# include <windows.h>
+# include <iprt/win/windows.h>
 # include <Security.h>
 #endif
 
diff --git a/src/VBox/Runtime/testcase/tstRTProcCreatePrf.cpp b/src/VBox/Runtime/testcase/tstRTProcCreatePrf.cpp
index ca0aeb0..c6cb058 100644
--- a/src/VBox/Runtime/testcase/tstRTProcCreatePrf.cpp
+++ b/src/VBox/Runtime/testcase/tstRTProcCreatePrf.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTProcIsRunningByName.cpp b/src/VBox/Runtime/testcase/tstRTProcIsRunningByName.cpp
index 2da8166..c1ccee0 100644
--- a/src/VBox/Runtime/testcase/tstRTProcIsRunningByName.cpp
+++ b/src/VBox/Runtime/testcase/tstRTProcIsRunningByName.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTProcQueryUsername.cpp b/src/VBox/Runtime/testcase/tstRTProcQueryUsername.cpp
index 679e503..739389e 100644
--- a/src/VBox/Runtime/testcase/tstRTProcQueryUsername.cpp
+++ b/src/VBox/Runtime/testcase/tstRTProcQueryUsername.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -72,6 +72,8 @@ static void tstRTProcQueryUsername(void)
 
 int main(int argc, char **argv)
 {
+    RT_NOREF_PV(argc); RT_NOREF_PV(argv);
+
     /*
      * Initialize IPRT and create the test.
      */
diff --git a/src/VBox/Runtime/testcase/tstRTProcWait.cpp b/src/VBox/Runtime/testcase/tstRTProcWait.cpp
index bd1740b..2becd0e 100644
--- a/src/VBox/Runtime/testcase/tstRTProcWait.cpp
+++ b/src/VBox/Runtime/testcase/tstRTProcWait.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -49,6 +49,7 @@ typedef struct SpawnerArgs
 
 DECLCALLBACK(int) SpawnerThread(RTTHREAD Thread, void *pvUser)
 {
+    RT_NOREF1(Thread);
     PSPAWNERARGS pArgs = (PSPAWNERARGS)pvUser;
     pArgs->Process = NIL_RTPROCESS;
     const char *apszArgs[3] = { pArgs->pszExe, "child", NULL };
diff --git a/src/VBox/Runtime/testcase/tstRTR0Common.h b/src/VBox/Runtime/testcase/tstRTR0Common.h
index c128a59..82027b7 100644
--- a/src/VBox/Runtime/testcase/tstRTR0Common.h
+++ b/src/VBox/Runtime/testcase/tstRTR0Common.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTR0CommonDriver.h b/src/VBox/Runtime/testcase/tstRTR0CommonDriver.h
index a856d54..0e0b0ae 100644
--- a/src/VBox/Runtime/testcase/tstRTR0CommonDriver.h
+++ b/src/VBox/Runtime/testcase/tstRTR0CommonDriver.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -46,7 +46,7 @@ RTTEST              g_hTest;
 /** The test & service name. */
 char                g_szSrvName[64];
 /** The length of the service name.  */
-uint32_t            g_cchSrvName;
+size_t              g_cchSrvName;
 /** The base address of the service module. */
 void               *g_pvImageBase;
 
diff --git a/src/VBox/Runtime/testcase/tstRTR0CommonReq.h b/src/VBox/Runtime/testcase/tstRTR0CommonReq.h
index 1c53dc6..2c67f8e 100644
--- a/src/VBox/Runtime/testcase/tstRTR0CommonReq.h
+++ b/src/VBox/Runtime/testcase/tstRTR0CommonReq.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTR0DbgKrnlInfo.cpp b/src/VBox/Runtime/testcase/tstRTR0DbgKrnlInfo.cpp
index fab18e6..fc7bdf5 100644
--- a/src/VBox/Runtime/testcase/tstRTR0DbgKrnlInfo.cpp
+++ b/src/VBox/Runtime/testcase/tstRTR0DbgKrnlInfo.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -93,11 +93,10 @@ DECLEXPORT(int) TSTR0DbgKrnlInfoSrvReqHandler(PSUPDRVSESSION pSession, uint32_t
             RTR0TESTR0_CHECK_RC_BREAK(RTR0DbgKrnlInfoQuerySymbol(hKrnlInfo, "TestModule", "Test", &pvSymbol), VERR_MODULE_NOT_FOUND);
             RTR0TESTR0_CHECK_RC_BREAK(RTR0DbgKrnlInfoQuerySymbol(hKrnlInfo, NULL, NULL, &pvSymbol), VERR_INVALID_PARAMETER);
 
-            RTDBGKRNLINFO hTmp = hKrnlInfo;
-            hKrnlInfo = NIL_RTDBGKRNLINFO;
             RTR0DbgKrnlInfoRelease(hKrnlInfo);
+            hKrnlInfo = NIL_RTDBGKRNLINFO;
             uint32_t cRefs;
-            RTR0TESTR0_CHECK_MSG((cRefs = RTR0DbgKrnlInfoRelease(hKrnlInfo)) == 0, ("cRefs=%#x", cRefs));
+            RTR0TESTR0_CHECK_MSG((cRefs = RTR0DbgKrnlInfoRelease(NIL_RTDBGKRNLINFO)) == 0, ("cRefs=%#x", cRefs));
             break;
         }
 
diff --git a/src/VBox/Runtime/testcase/tstRTR0DbgKrnlInfo.h b/src/VBox/Runtime/testcase/tstRTR0DbgKrnlInfo.h
index 129d941..2eda788 100644
--- a/src/VBox/Runtime/testcase/tstRTR0DbgKrnlInfo.h
+++ b/src/VBox/Runtime/testcase/tstRTR0DbgKrnlInfo.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTR0DbgKrnlInfoDriver.cpp b/src/VBox/Runtime/testcase/tstRTR0DbgKrnlInfoDriver.cpp
index 5bb4ef7..6c170e5 100644
--- a/src/VBox/Runtime/testcase/tstRTR0DbgKrnlInfoDriver.cpp
+++ b/src/VBox/Runtime/testcase/tstRTR0DbgKrnlInfoDriver.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -47,6 +47,7 @@
  */
 extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
 {
+    RT_NOREF(argc, argv, envp);
 #ifndef VBOX
     RTPrintf("tstSup: SKIPPED\n");
     return 0;
diff --git a/src/VBox/Runtime/testcase/tstRTR0MemUserKernel.cpp b/src/VBox/Runtime/testcase/tstRTR0MemUserKernel.cpp
index e5c7a7b..279a615 100644
--- a/src/VBox/Runtime/testcase/tstRTR0MemUserKernel.cpp
+++ b/src/VBox/Runtime/testcase/tstRTR0MemUserKernel.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTR0MemUserKernel.h b/src/VBox/Runtime/testcase/tstRTR0MemUserKernel.h
index 9cd87b1..4627378 100644
--- a/src/VBox/Runtime/testcase/tstRTR0MemUserKernel.h
+++ b/src/VBox/Runtime/testcase/tstRTR0MemUserKernel.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTR0MemUserKernelDriver.cpp b/src/VBox/Runtime/testcase/tstRTR0MemUserKernelDriver.cpp
index 60b0c9c..c73a143 100644
--- a/src/VBox/Runtime/testcase/tstRTR0MemUserKernelDriver.cpp
+++ b/src/VBox/Runtime/testcase/tstRTR0MemUserKernelDriver.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -48,6 +48,7 @@
  */
 extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
 {
+    RT_NOREF3(argc, argv, envp);
 #ifndef VBOX
     RTPrintf("tstSup: SKIPPED\n");
     return 0;
diff --git a/src/VBox/Runtime/testcase/tstRTR0SemMutex.cpp b/src/VBox/Runtime/testcase/tstRTR0SemMutex.cpp
index 193dd2a..0ea187b 100644
--- a/src/VBox/Runtime/testcase/tstRTR0SemMutex.cpp
+++ b/src/VBox/Runtime/testcase/tstRTR0SemMutex.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTR0SemMutex.h b/src/VBox/Runtime/testcase/tstRTR0SemMutex.h
index e161793..7a78e7d 100644
--- a/src/VBox/Runtime/testcase/tstRTR0SemMutex.h
+++ b/src/VBox/Runtime/testcase/tstRTR0SemMutex.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTR0SemMutexDriver.cpp b/src/VBox/Runtime/testcase/tstRTR0SemMutexDriver.cpp
index b0a802c..d73f291 100644
--- a/src/VBox/Runtime/testcase/tstRTR0SemMutexDriver.cpp
+++ b/src/VBox/Runtime/testcase/tstRTR0SemMutexDriver.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -69,6 +69,7 @@ static RTTEST g_hTest;
  */
 static DECLCALLBACK(int) tstThreadFn(RTTHREAD hThreadSelf, void *pvUser)
 {
+    RT_NOREF1(hThreadSelf);
     uint32_t            u32   = (uint32_t)(uintptr_t)pvUser;
     TSTRTR0SEMMUTEX     enmDo = (TSTRTR0SEMMUTEX)RT_LOWORD(u32);
     uint32_t            cSecs = RT_HIWORD(u32);
@@ -175,6 +176,7 @@ static bool tstDoThreadedTest(TSTRTR0SEMMUTEX enmSetup, TSTRTR0SEMMUTEX enmDo, T
  */
 extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
 {
+    RT_NOREF3(argc, argv, envp);
 #ifndef VBOX
     RTPrintf("tstSup: SKIPPED\n");
     return 0;
diff --git a/src/VBox/Runtime/testcase/tstRTR0Thread.cpp b/src/VBox/Runtime/testcase/tstRTR0Thread.cpp
index 4dedc80..2eb7395 100644
--- a/src/VBox/Runtime/testcase/tstRTR0Thread.cpp
+++ b/src/VBox/Runtime/testcase/tstRTR0Thread.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -57,6 +57,7 @@ typedef TSTRTR0THREADDATA *PTSTRTR0THREADDATA;
 static DECLCALLBACK(int) tstRTR0ThreadCallback(RTTHREAD hThread, void *pvUser)
 {
     PTSTRTR0THREADDATA pData = (PTSTRTR0THREADDATA)pvUser;
+    RT_NOREF1(hThread);
     if (RT_LIKELY(pData))
     {
         if (pData->uMagic == TSTRTR0THREADDATA_MAGIC)
@@ -81,6 +82,7 @@ DECLEXPORT(int) TSTRTR0ThreadSrvReqHandler(PSUPDRVSESSION pSession, uint32_t uOp
                                                    uint64_t u64Arg, PSUPR0SERVICEREQHDR pReqHdr)
 {
     RTR0TESTR0_SRV_REQ_PROLOG_RET(pReqHdr);
+    RT_NOREF2(pSession, u64Arg);
 
     /*
      * The big switch.
diff --git a/src/VBox/Runtime/testcase/tstRTR0Thread.h b/src/VBox/Runtime/testcase/tstRTR0Thread.h
index 04c9211..9e54e11 100644
--- a/src/VBox/Runtime/testcase/tstRTR0Thread.h
+++ b/src/VBox/Runtime/testcase/tstRTR0Thread.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTR0ThreadDriver.cpp b/src/VBox/Runtime/testcase/tstRTR0ThreadDriver.cpp
index 452aab8..09c9f10 100644
--- a/src/VBox/Runtime/testcase/tstRTR0ThreadDriver.cpp
+++ b/src/VBox/Runtime/testcase/tstRTR0ThreadDriver.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -48,6 +48,7 @@
  */
 extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
 {
+    RT_NOREF3(argc, argv, envp);
 #ifndef VBOX
     RTPrintf("tstRTR0Thread: SKIPPED\n");
     return RTEXITCODE_SKIPPED;
diff --git a/src/VBox/Runtime/testcase/tstRTR0ThreadPreemption.cpp b/src/VBox/Runtime/testcase/tstRTR0ThreadPreemption.cpp
index 36fdc3d..f76e995 100644
--- a/src/VBox/Runtime/testcase/tstRTR0ThreadPreemption.cpp
+++ b/src/VBox/Runtime/testcase/tstRTR0ThreadPreemption.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTR0ThreadPreemption.h b/src/VBox/Runtime/testcase/tstRTR0ThreadPreemption.h
index b59aa68..8006b54 100644
--- a/src/VBox/Runtime/testcase/tstRTR0ThreadPreemption.h
+++ b/src/VBox/Runtime/testcase/tstRTR0ThreadPreemption.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTR0ThreadPreemptionDriver.cpp b/src/VBox/Runtime/testcase/tstRTR0ThreadPreemptionDriver.cpp
index 846de02..f14552a 100644
--- a/src/VBox/Runtime/testcase/tstRTR0ThreadPreemptionDriver.cpp
+++ b/src/VBox/Runtime/testcase/tstRTR0ThreadPreemptionDriver.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -57,6 +57,7 @@ static bool volatile g_fTerminate = false;
  */
 static DECLCALLBACK(int) MyThreadProc(RTTHREAD hSelf, void *pvCpuIdx)
 {
+    RT_NOREF1(hSelf);
     RTCPUSET Affinity;
     RTCpuSetEmpty(&Affinity);
     RTCpuSetAddByIndex(&Affinity, (intptr_t)pvCpuIdx);
@@ -81,6 +82,7 @@ static DECLCALLBACK(int) MyThreadProc(RTTHREAD hSelf, void *pvCpuIdx)
  */
 extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
 {
+    RT_NOREF3(argc, argv, envp);
 #ifndef VBOX
     RTPrintf("tstSup: SKIPPED\n");
     return 0;
@@ -194,7 +196,6 @@ extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
      * Stay in ring-0 until preemption is pending.
      */
     RTTHREAD ahThreads[RTCPUSET_MAX_CPUS];
-    uint32_t cThreads = RTMpGetCount();
     RTCPUSET OnlineSet;
     RTMpGetOnlineSet(&OnlineSet);
     for (uint32_t i = 0; i < RT_ELEMENTS(ahThreads); i++)
diff --git a/src/VBox/Runtime/testcase/tstRTR0Timer.cpp b/src/VBox/Runtime/testcase/tstRTR0Timer.cpp
index af1d18e..ad8ce6c 100644
--- a/src/VBox/Runtime/testcase/tstRTR0Timer.cpp
+++ b/src/VBox/Runtime/testcase/tstRTR0Timer.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTR0Timer.h b/src/VBox/Runtime/testcase/tstRTR0Timer.h
index 73ec78a..c1f6758 100644
--- a/src/VBox/Runtime/testcase/tstRTR0Timer.h
+++ b/src/VBox/Runtime/testcase/tstRTR0Timer.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTR0TimerDriver.cpp b/src/VBox/Runtime/testcase/tstRTR0TimerDriver.cpp
index ded7837..e860fbd 100644
--- a/src/VBox/Runtime/testcase/tstRTR0TimerDriver.cpp
+++ b/src/VBox/Runtime/testcase/tstRTR0TimerDriver.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -50,9 +50,13 @@
 extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
 {
 #ifndef VBOX
+    RT_NOREF3(argc, argv, envp);
     RTPrintf("tstRTR0Timer: SKIPPED\n");
     return RTEXITCODE_SKIPPED;
+
 #else
+    RT_NOREF1(envp);
+
     /*
      * Init.
      */
diff --git a/src/VBox/Runtime/testcase/tstRTReqPool.cpp b/src/VBox/Runtime/testcase/tstRTReqPool.cpp
index e1a8e96..c6cf217 100644
--- a/src/VBox/Runtime/testcase/tstRTReqPool.cpp
+++ b/src/VBox/Runtime/testcase/tstRTReqPool.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTS3.cpp b/src/VBox/Runtime/testcase/tstRTS3.cpp
index b02e8e3..13ad01b 100644
--- a/src/VBox/Runtime/testcase/tstRTS3.cpp
+++ b/src/VBox/Runtime/testcase/tstRTS3.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -59,7 +59,9 @@ static DECLCALLBACK(int) progress(unsigned uPercent, void *pvUser)
 {
 #ifdef TSTS3_SHOWPROGRESS
     RTTestIPrintf(RTTESTLVL_ALWAYS, " Progress for %s - %d%% done.\n", (char*)pvUser, (int)uPercent);
-#endif /* TSTS3_SHOWPROGRESS */
+#else
+    RT_NOREF2(uPercent, pvUser);
+#endif
     return VINF_SUCCESS;
 }
 
diff --git a/src/VBox/Runtime/testcase/tstRTSemEventMulti.cpp b/src/VBox/Runtime/testcase/tstRTSemEventMulti.cpp
index 0c422cb..22641b3 100644
--- a/src/VBox/Runtime/testcase/tstRTSemEventMulti.cpp
+++ b/src/VBox/Runtime/testcase/tstRTSemEventMulti.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -50,6 +50,7 @@ static RTTEST  g_hTest;
 static DECLCALLBACK(int) test1Thread1(RTTHREAD ThreadSelf, void *pvUser)
 {
     RTSEMEVENTMULTI hSem = *(PRTSEMEVENTMULTI)pvUser;
+    RT_NOREF_PV(ThreadSelf);
 
     uint64_t u64 = RTTimeSystemMilliTS();
     RTTEST_CHECK_RC(g_hTest, RTSemEventMultiWait(hSem, 1000), VERR_TIMEOUT);
@@ -64,6 +65,8 @@ static DECLCALLBACK(int) test1Thread1(RTTHREAD ThreadSelf, void *pvUser)
 static DECLCALLBACK(int) test1Thread2(RTTHREAD ThreadSelf, void *pvUser)
 {
     RTSEMEVENTMULTI hSem = *(PRTSEMEVENTMULTI)pvUser;
+    RT_NOREF_PV(ThreadSelf);
+
     RTTEST_CHECK_RC(g_hTest, RTSemEventMultiWait(hSem, RT_INDEFINITE_WAIT), VINF_SUCCESS);
     return VINF_SUCCESS;
 }
@@ -245,6 +248,8 @@ static void testBasics(void)
 
 int main(int argc, char **argv)
 {
+    RT_NOREF_PV(argc); RT_NOREF_PV(argv);
+
     RTEXITCODE rcExit = RTTestInitAndCreate("tstRTSemEventMulti", &g_hTest);
     if (rcExit != RTEXITCODE_SUCCESS)
         return rcExit;
diff --git a/src/VBox/Runtime/testcase/tstRTSemRW.cpp b/src/VBox/Runtime/testcase/tstRTSemRW.cpp
index 7f7a867..744e512 100644
--- a/src/VBox/Runtime/testcase/tstRTSemRW.cpp
+++ b/src/VBox/Runtime/testcase/tstRTSemRW.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -316,6 +316,7 @@ static void Test4(unsigned cThreads, unsigned cSeconds, unsigned uWritePercent,
 static DECLCALLBACK(int) Test2Thread(RTTHREAD hThreadSelf, void *pvUser)
 {
     RTSEMRW hSemRW = (RTSEMRW)pvUser;
+    RT_NOREF_PV(hThreadSelf);
 
     RTTEST_CHECK_RC(g_hTest, RTSemRWRequestRead(hSemRW, 0), VERR_TIMEOUT);
     RTTEST_CHECK_RC(g_hTest, RTSemRWRequestWrite(hSemRW, 0), VERR_TIMEOUT);
@@ -459,6 +460,7 @@ static bool Test1(void)
 
 int main(int argc, char **argv)
 {
+    RT_NOREF_PV(argv);
     int rc = RTTestInitAndCreate("tstRTSemRW", &g_hTest);
     if (rc)
         return 1;
diff --git a/src/VBox/Runtime/testcase/tstRTSemXRoads.cpp b/src/VBox/Runtime/testcase/tstRTSemXRoads.cpp
index 3f8c8b6..2567311 100644
--- a/src/VBox/Runtime/testcase/tstRTSemXRoads.cpp
+++ b/src/VBox/Runtime/testcase/tstRTSemXRoads.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -52,6 +52,8 @@ static RTSEMXROADS          g_hXRoads;
 
 static int tstTrafficThreadCommon(uintptr_t iThread, bool fNS)
 {
+    RT_NOREF_PV(iThread);
+
     for (uint32_t iLoop = 0; RTTimeMilliTS() - g_u64StartMilliTS < g_cSecs*1000; iLoop++)
     {
         /* fudge */
@@ -79,6 +81,8 @@ static int tstTrafficThreadCommon(uintptr_t iThread, bool fNS)
 
 static DECLCALLBACK(int) tstTrafficNSThread(RTTHREAD hSelf, void *pvUser)
 {
+    RT_NOREF_PV(hSelf);
+
     uintptr_t iThread = (uintptr_t)pvUser;
     return tstTrafficThreadCommon(iThread, true);
 }
@@ -86,6 +90,8 @@ static DECLCALLBACK(int) tstTrafficNSThread(RTTHREAD hSelf, void *pvUser)
 
 static DECLCALLBACK(int) tstTrafficEWThread(RTTHREAD hSelf, void *pvUser)
 {
+    RT_NOREF_PV(hSelf);
+
     uintptr_t iThread = (uintptr_t)pvUser;
     return tstTrafficThreadCommon(iThread, false);
 }
diff --git a/src/VBox/Runtime/testcase/tstRTSort.cpp b/src/VBox/Runtime/testcase/tstRTSort.cpp
index bda9296..0a6d7a5 100644
--- a/src/VBox/Runtime/testcase/tstRTSort.cpp
+++ b/src/VBox/Runtime/testcase/tstRTSort.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTStrAlloc.cpp b/src/VBox/Runtime/testcase/tstRTStrAlloc.cpp
index 73197cf..a13e5ee 100644
--- a/src/VBox/Runtime/testcase/tstRTStrAlloc.cpp
+++ b/src/VBox/Runtime/testcase/tstRTStrAlloc.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTStrCache.cpp b/src/VBox/Runtime/testcase/tstRTStrCache.cpp
index e0fcf60..63a85bd 100644
--- a/src/VBox/Runtime/testcase/tstRTStrCache.cpp
+++ b/src/VBox/Runtime/testcase/tstRTStrCache.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTStrCatCopy.cpp b/src/VBox/Runtime/testcase/tstRTStrCatCopy.cpp
index 02b85af..ec2c47f 100644
--- a/src/VBox/Runtime/testcase/tstRTStrCatCopy.cpp
+++ b/src/VBox/Runtime/testcase/tstRTStrCatCopy.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTStrFormat.cpp b/src/VBox/Runtime/testcase/tstRTStrFormat.cpp
index 5d737dc..28945d4 100644
--- a/src/VBox/Runtime/testcase/tstRTStrFormat.cpp
+++ b/src/VBox/Runtime/testcase/tstRTStrFormat.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -472,19 +472,20 @@ int main()
         CHECK42("%RTptr", (RTUINTPTR)0x84342134, "84342134");
     }
 
-    if (sizeof(RTCCUINTREG) == 8)
-    {
-        CHECK42("%RTreg", (RTCCUINTREG)0, "0000000000000000");
-        CHECK42("%RTreg", ~(RTCCUINTREG)0, "ffffffffffffffff");
-        CHECK42("%RTreg", (RTCCUINTREG)0x84342134, "0000000084342134");
-        CHECK42("%RTreg", (RTCCUINTREG)0x23484342134ULL, "0000023484342134");
-    }
-    else
-    {
-        CHECK42("%RTreg", (RTCCUINTREG)0, "00000000");
-        CHECK42("%RTreg", ~(RTCCUINTREG)0, "ffffffff");
-        CHECK42("%RTreg", (RTCCUINTREG)0x84342134, "84342134");
-    }
+#if ARCH_BITS == 64
+    AssertCompileSize(RTCCUINTREG, 8);
+    CHECK42("%RTreg", (RTCCUINTREG)0, "0000000000000000");
+    CHECK42("%RTreg", ~(RTCCUINTREG)0, "ffffffffffffffff");
+    CHECK42("%RTreg", (RTCCUINTREG)0x84342134, "0000000084342134");
+    CHECK42("%RTreg", (RTCCUINTREG)0x23484342134ULL, "0000023484342134");
+#elif ARCH_BITS == 32
+    AssertCompileSize(RTCCUINTREG, 4);
+    CHECK42("%RTreg", (RTCCUINTREG)0, "00000000");
+    CHECK42("%RTreg", ~(RTCCUINTREG)0, "ffffffff");
+    CHECK42("%RTreg", (RTCCUINTREG)0x84342134, "84342134");
+#else
+# error ARCH_BITS
+#endif
 
     CHECK42("%RTsel", (RTSEL)0x543, "0543");
     CHECK42("%RTsel", (RTSEL)0xf8f8, "f8f8");
@@ -645,7 +646,7 @@ int main()
 #if 0
     static RTUNICP s_usz2[] = { 0xc5, 0xc6, 0xf8, 0 };
     static RTUTF16 s_wsz2[] = { 0xc5, 0xc6, 0xf8, 0 };
-    static char    s_sz2[]  = { 0xc5, 0xc6, 0xf8, 0 };///@todo multibyte tests.
+    static char    s_sz2[]  = { 0xc5, 0xc6, 0xf8, 0 };/// @todo multibyte tests.
 
     cch = RTStrPrintf(pszBuf, BUF_SIZE, "%ls", s_wsz2);
     CHECKSTR(s_sz2);
diff --git a/src/VBox/Runtime/testcase/tstRTStrVersion.cpp b/src/VBox/Runtime/testcase/tstRTStrVersion.cpp
index 87e99eb..b425842 100644
--- a/src/VBox/Runtime/testcase/tstRTStrVersion.cpp
+++ b/src/VBox/Runtime/testcase/tstRTStrVersion.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTSymlink.cpp b/src/VBox/Runtime/testcase/tstRTSymlink.cpp
index b80cfad..aaeb8e1 100644
--- a/src/VBox/Runtime/testcase/tstRTSymlink.cpp
+++ b/src/VBox/Runtime/testcase/tstRTSymlink.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -143,12 +143,10 @@ static void test1(RTTEST hTest, const char *pszBaseDir)
     RTTestISub("Negative RTSymlinkRead, Exists & IsDangling");
     char szExecDir[RTPATH_MAX];
     RTTESTI_CHECK_RC_OK_RETV(RTPathExecDir(szExecDir, sizeof(szExecDir)));
-    size_t cchExecDir = strlen(szExecDir);
     RTTESTI_CHECK(RTDirExists(szExecDir));
 
     char szExecFile[RTPATH_MAX];
     RTTESTI_CHECK_RETV(RTProcGetExecutablePath(szExecFile, sizeof(szExecFile)) != NULL);
-    size_t cchExecFile = strlen(szExecFile);
     RTTESTI_CHECK(RTFileExists(szExecFile));
 
     RTTESTI_CHECK(!RTSymlinkExists(szExecFile));
@@ -186,7 +184,7 @@ static void test1(RTTEST hTest, const char *pszBaseDir)
 }
 
 
-int main(int argc, char **argv)
+int main()
 {
     RTTEST hTest;
     int rc = RTTestInitAndCreate("tstRTSymlink", &hTest);
diff --git a/src/VBox/Runtime/testcase/tstRTSystemQueryDmi.cpp b/src/VBox/Runtime/testcase/tstRTSystemQueryDmi.cpp
index aad04db..ca1546e 100644
--- a/src/VBox/Runtime/testcase/tstRTSystemQueryDmi.cpp
+++ b/src/VBox/Runtime/testcase/tstRTSystemQueryDmi.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTSystemQueryOsInfo.cpp b/src/VBox/Runtime/testcase/tstRTSystemQueryOsInfo.cpp
index 2146748..0330a6f 100644
--- a/src/VBox/Runtime/testcase/tstRTSystemQueryOsInfo.cpp
+++ b/src/VBox/Runtime/testcase/tstRTSystemQueryOsInfo.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -35,12 +35,6 @@
 #include <iprt/test.h>
 
 
-/*********************************************************************************************************************************
-*   Global Variables                                                                                                             *
-*********************************************************************************************************************************/
-static int g_cErrors = 0;
-
-
 int main()
 {
     RTTEST hTest;
diff --git a/src/VBox/Runtime/testcase/tstRTTcp-1.cpp b/src/VBox/Runtime/testcase/tstRTTcp-1.cpp
index 7a2d183..09623d1 100644
--- a/src/VBox/Runtime/testcase/tstRTTcp-1.cpp
+++ b/src/VBox/Runtime/testcase/tstRTTcp-1.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -41,6 +41,8 @@ static RTTEST g_hTest;
 
 static DECLCALLBACK(int) test3Server(RTSOCKET hSocket, void *pvUser)
 {
+    RT_NOREF_PV(pvUser);
+
     RTTestSetDefault(g_hTest, NULL);
     char szBuf[4096];
 
@@ -73,9 +75,10 @@ void test3()
     {
         PRTTCPSERVER pServer;
         int rc = RTTcpServerCreate("localhost", 9999, RTTHREADTYPE_DEFAULT, "server-2", test3Server, NULL, &pServer);
-#ifdef RT_OS_SOLARIS
+#if defined(RT_OS_SOLARIS) || defined(RT_OS_LINUX)
         /** @todo testboxsh1 occationally hits this for some stupid reason. i=21 in
-         *        one occurrence. Fudge a bit for now and see if it helps. */
+         *        one occurrence. Fudge a bit for now and see if it helps.
+         *        Same for testboxopt, i=98 in another case. */
         if (rc == VERR_NET_ADDRESS_IN_USE)
         {
             RTThreadSleep(500);
@@ -113,6 +116,8 @@ void test3()
 
 static DECLCALLBACK(int) test2Server(RTSOCKET hSocket, void *pvUser)
 {
+    RT_NOREF_PV(pvUser);
+
     RTTestSetDefault(g_hTest, NULL);
     char szBuf[512];
 
diff --git a/src/VBox/Runtime/testcase/tstRTTemp.cpp b/src/VBox/Runtime/testcase/tstRTTemp.cpp
index 3e582de..bc59edb 100644
--- a/src/VBox/Runtime/testcase/tstRTTemp.cpp
+++ b/src/VBox/Runtime/testcase/tstRTTemp.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTThreadExecutionTime.cpp b/src/VBox/Runtime/testcase/tstRTThreadExecutionTime.cpp
index a966356..1feccb1 100644
--- a/src/VBox/Runtime/testcase/tstRTThreadExecutionTime.cpp
+++ b/src/VBox/Runtime/testcase/tstRTThreadExecutionTime.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -46,6 +46,8 @@ static volatile uint64_t g_kernel, g_user;
 
 static DECLCALLBACK(int) testThread(RTTHREAD hSelf, void *pvUser)
 {
+    RT_NOREF_PV(hSelf); RT_NOREF_PV(pvUser);
+
     uint64_t u64Now = RTTimeMilliTS();
     uint64_t kernel, kernelStart, user, userStart;
     RTThreadGetExecutionTimeMilli(&kernelStart, &userStart);
diff --git a/src/VBox/Runtime/testcase/tstRTThreadPoke.cpp b/src/VBox/Runtime/testcase/tstRTThreadPoke.cpp
index 7bc1b7b..2def4e4 100644
--- a/src/VBox/Runtime/testcase/tstRTThreadPoke.cpp
+++ b/src/VBox/Runtime/testcase/tstRTThreadPoke.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -44,6 +44,7 @@ static RTTEST g_hTest;
 
 static DECLCALLBACK(int) test1Thread(RTTHREAD hSelf, void *pvUser)
 {
+    RT_NOREF_PV(hSelf); RT_NOREF_PV(pvUser);
     RTTEST_CHECK_RC(g_hTest, RTThreadSleep(60*1000), VERR_INTERRUPTED);
     return VINF_SUCCESS;
 }
diff --git a/src/VBox/Runtime/testcase/tstRTTime.cpp b/src/VBox/Runtime/testcase/tstRTTime.cpp
index f661a9c..2a6fdf6 100644
--- a/src/VBox/Runtime/testcase/tstRTTime.cpp
+++ b/src/VBox/Runtime/testcase/tstRTTime.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTTimeSpec.cpp b/src/VBox/Runtime/testcase/tstRTTimeSpec.cpp
index 96d43da..cdb1f2f 100644
--- a/src/VBox/Runtime/testcase/tstRTTimeSpec.cpp
+++ b/src/VBox/Runtime/testcase/tstRTTimeSpec.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRTUdp-1.cpp b/src/VBox/Runtime/testcase/tstRTUdp-1.cpp
index ec0f846..8d0d2fd 100644
--- a/src/VBox/Runtime/testcase/tstRTUdp-1.cpp
+++ b/src/VBox/Runtime/testcase/tstRTUdp-1.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -34,6 +34,7 @@
 #define RT_TEST_UDP_LOCAL_HOST         "localhost"
 #define RT_TEST_UDP_SERVER_PORT        52000
 
+
 /*********************************************************************************************************************************
 *   Global Variables                                                                                                             *
 *********************************************************************************************************************************/
diff --git a/src/VBox/Runtime/testcase/tstRTUri.cpp b/src/VBox/Runtime/testcase/tstRTUri.cpp
index f9bd4c4..760d5fe 100644
--- a/src/VBox/Runtime/testcase/tstRTUri.cpp
+++ b/src/VBox/Runtime/testcase/tstRTUri.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -38,7 +38,7 @@
 
 #if 0 && defined(RT_OS_WINDOWS) /* Enable for windows API reference results. */
 # define TSTRTURI_WITH_WINDOWS_REFERENCE_RESULTS
-# include <Shlwapi.h>
+# include <iprt/win/shlwapi.h>
 # include <iprt/stream.h>
 #endif
 
diff --git a/src/VBox/Runtime/testcase/tstRTUuid.cpp b/src/VBox/Runtime/testcase/tstRTUuid.cpp
index 5a75d1b..0b3e223 100644
--- a/src/VBox/Runtime/testcase/tstRTUuid.cpp
+++ b/src/VBox/Runtime/testcase/tstRTUuid.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -36,7 +36,7 @@
 #include <iprt/initterm.h>
 
 
-int main(int argc, char **argv)
+int main()
 {
     RTTEST hTest;
     int rc = RTTestInitAndCreate("tstRTUuid", &hTest);
diff --git a/src/VBox/Runtime/testcase/tstRTVfs.cpp b/src/VBox/Runtime/testcase/tstRTVfs.cpp
index f9fce70..cc14ef8 100644
--- a/src/VBox/Runtime/testcase/tstRTVfs.cpp
+++ b/src/VBox/Runtime/testcase/tstRTVfs.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -35,6 +35,7 @@
 #include <iprt/file.h>
 #include <iprt/string.h>
 
+
 /*********************************************************************************************************************************
 *   Structures and Typedefs                                                                                                      *
 *********************************************************************************************************************************/
@@ -83,6 +84,8 @@ static void tstVfsIoFromStandardHandle(RTTEST hTest, RTHANDLESTD enmHandle)
 
 int main(int argc, char **argv)
 {
+    RT_NOREF2(argc, argv);
+
     /*
      * Initialize IPRT and create the test.
      */
diff --git a/src/VBox/Runtime/testcase/tstRTZip.cpp b/src/VBox/Runtime/testcase/tstRTZip.cpp
index b79bfd6..698252d 100644
--- a/src/VBox/Runtime/testcase/tstRTZip.cpp
+++ b/src/VBox/Runtime/testcase/tstRTZip.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstRand.cpp b/src/VBox/Runtime/testcase/tstRand.cpp
index a41d3ac..3fa3e71 100644
--- a/src/VBox/Runtime/testcase/tstRand.cpp
+++ b/src/VBox/Runtime/testcase/tstRand.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstSemMutex.cpp b/src/VBox/Runtime/testcase/tstSemMutex.cpp
index 73f6bdc..bac8776 100644
--- a/src/VBox/Runtime/testcase/tstSemMutex.cpp
+++ b/src/VBox/Runtime/testcase/tstSemMutex.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstSemPingPong.cpp b/src/VBox/Runtime/testcase/tstSemPingPong.cpp
index c8300f2..762822d 100644
--- a/src/VBox/Runtime/testcase/tstSemPingPong.cpp
+++ b/src/VBox/Runtime/testcase/tstSemPingPong.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -49,7 +49,9 @@ static volatile uint32_t g_cErrors = 0;
 
 static DECLCALLBACK(int) tstSemPingPongThread(RTTHREAD hThread, void *pvPP)
 {
-    int rc;
+    RT_NOREF_PV(hThread);
+
+    int rc = VINF_SUCCESS; /* (MSC powers of deduction are rather weak. sigh) */
     PRTPINGPONG pPP = (PRTPINGPONG)pvPP;
     for (uint32_t i = 0; i < TSTSEMPINGPONG_ITERATIONS; i++)
     {
diff --git a/src/VBox/Runtime/testcase/tstStrSimplePattern.cpp b/src/VBox/Runtime/testcase/tstStrSimplePattern.cpp
index e61ca91..b3c9320 100644
--- a/src/VBox/Runtime/testcase/tstStrSimplePattern.cpp
+++ b/src/VBox/Runtime/testcase/tstStrSimplePattern.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstStrToNum.cpp b/src/VBox/Runtime/testcase/tstStrToNum.cpp
index c15dc3d..270e104 100644
--- a/src/VBox/Runtime/testcase/tstStrToNum.cpp
+++ b/src/VBox/Runtime/testcase/tstStrToNum.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -188,10 +188,10 @@ int main()
         { "-4564678",              10,  VINF_SUCCESS,          -4564678 },
         { "4564678",                0,  VINF_SUCCESS,          4564678 },
         { "4564678",               10,  VINF_SUCCESS,          4564678 },
-        { "-1234567890123456789",   0,  VWRN_NUMBER_TOO_BIG,   (int32_t)-1234567890123456789LL },
-        { "-1234567890123456789",  10,  VWRN_NUMBER_TOO_BIG,   (int32_t)-1234567890123456789LL },
-        { "1234567890123456789",    0,  VWRN_NUMBER_TOO_BIG,   (int32_t)1234567890123456789LL },
-        { "1234567890123456789",   10,  VWRN_NUMBER_TOO_BIG,   (int32_t)1234567890123456789LL },
+        { "-1234567890123456789",   0,  VWRN_NUMBER_TOO_BIG,   (int32_t)((uint64_t)INT64_C(-1234567890123456789) & UINT32_MAX) },
+        { "-1234567890123456789",  10,  VWRN_NUMBER_TOO_BIG,   (int32_t)((uint64_t)INT64_C(-1234567890123456789) & UINT32_MAX) },
+        { "1234567890123456789",    0,  VWRN_NUMBER_TOO_BIG,   (int32_t)(INT64_C(1234567890123456789)            & UINT32_MAX) },
+        { "1234567890123456789",   10,  VWRN_NUMBER_TOO_BIG,   (int32_t)(INT64_C(1234567890123456789)            & UINT32_MAX) },
         { "0x",                     0,  VWRN_TRAILING_CHARS,    0 },
         { "0x1",                    0,  VINF_SUCCESS,           1 },
         { "0x1",                   10,  VWRN_TRAILING_CHARS,    0 },
diff --git a/src/VBox/Runtime/testcase/tstTSC.cpp b/src/VBox/Runtime/testcase/tstTSC.cpp
index fee193b..be18c52 100644
--- a/src/VBox/Runtime/testcase/tstTSC.cpp
+++ b/src/VBox/Runtime/testcase/tstTSC.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -418,7 +418,6 @@ int main(int argc, char **argv)
         { "--duration",         'd', RTGETOPT_REQ_UINT32 },
         { "--calc-frequency",   'f', RTGETOPT_REQ_NOTHING },
     };
-    int iArg = 1;
     int ch;
     RTGETOPTUNION Value;
     RTGETOPTSTATE GetState;
@@ -438,7 +437,7 @@ int main(int argc, char **argv)
                 return 1;
 
             case 'V':
-                RTPrintf("$Revision: 102121 $\n");
+                RTPrintf("$Revision: 109298 $\n");
                 return 0;
 
             default:
diff --git a/src/VBox/Runtime/testcase/tstTermCallbacks.cpp b/src/VBox/Runtime/testcase/tstTermCallbacks.cpp
index eccd299..26c779e 100644
--- a/src/VBox/Runtime/testcase/tstTermCallbacks.cpp
+++ b/src/VBox/Runtime/testcase/tstTermCallbacks.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -45,6 +45,7 @@ static uint32_t g_fCalled;
 
 static DECLCALLBACK(void) tstTermCallback0(RTTERMREASON enmReason, int32_t iStatus, void *pvUser)
 {
+    RT_NOREF_PV(enmReason); RT_NOREF_PV(iStatus);
     RTTESTI_CHECK(pvUser == (void *)0);
     g_cCalls++;
     g_fCalled |= RT_BIT_32(0);
@@ -53,6 +54,7 @@ static DECLCALLBACK(void) tstTermCallback0(RTTERMREASON enmReason, int32_t iStat
 
 static DECLCALLBACK(void) tstTermCallback1(RTTERMREASON enmReason, int32_t iStatus, void *pvUser)
 {
+    RT_NOREF_PV(enmReason); RT_NOREF_PV(iStatus);
     RTTESTI_CHECK(pvUser == (void *)1);
     g_cCalls++;
     g_fCalled |= RT_BIT_32(1);
@@ -61,6 +63,7 @@ static DECLCALLBACK(void) tstTermCallback1(RTTERMREASON enmReason, int32_t iStat
 
 static DECLCALLBACK(void) tstTermCallback2(RTTERMREASON enmReason, int32_t iStatus, void *pvUser)
 {
+    RT_NOREF_PV(enmReason); RT_NOREF_PV(iStatus);
     RTTESTI_CHECK(pvUser == (void *)2);
     g_cCalls++;
     g_fCalled |= RT_BIT_32(2);
@@ -69,13 +72,14 @@ static DECLCALLBACK(void) tstTermCallback2(RTTERMREASON enmReason, int32_t iStat
 
 static DECLCALLBACK(void) tstTermCallback3(RTTERMREASON enmReason, int32_t iStatus, void *pvUser)
 {
+    RT_NOREF_PV(enmReason); RT_NOREF_PV(iStatus);
     RTTESTI_CHECK(pvUser == (void *)3);
     g_cCalls++;
     g_fCalled |= RT_BIT_32(3);
 }
 
 
-int main(int argc, char **argv)
+int main()
 {
     RTTEST hTest;
     int rc = RTTestInitAndCreate("tstTermCallback", &hTest);
diff --git a/src/VBox/Runtime/testcase/tstThread-1.cpp b/src/VBox/Runtime/testcase/tstThread-1.cpp
index 59741c8..fbb659f 100644
--- a/src/VBox/Runtime/testcase/tstThread-1.cpp
+++ b/src/VBox/Runtime/testcase/tstThread-1.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -40,9 +40,9 @@
 static unsigned volatile g_cErrors = 0;
 
 
-static DECLCALLBACK(int) tstThread1ReturnImmediately(RTTHREAD Thread, void *pvUser)
+static DECLCALLBACK(int) tstThread1ReturnImmediately(RTTHREAD hSelf, void *pvUser)
 {
-    NOREF(pvUser);
+    RT_NOREF_PV(hSelf); RT_NOREF_PV(pvUser);
     return VINF_SUCCESS;
 }
 
diff --git a/src/VBox/Runtime/testcase/tstTime-2.cpp b/src/VBox/Runtime/testcase/tstTime-2.cpp
index 0153243..3db797a 100644
--- a/src/VBox/Runtime/testcase/tstTime-2.cpp
+++ b/src/VBox/Runtime/testcase/tstTime-2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstTime-3.cpp b/src/VBox/Runtime/testcase/tstTime-3.cpp
index 3c103cc..c11bd1f 100644
--- a/src/VBox/Runtime/testcase/tstTime-3.cpp
+++ b/src/VBox/Runtime/testcase/tstTime-3.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
 #ifdef RT_OS_WINDOWS
-# include <Windows.h>
+# include <iprt/win/windows.h>
 
 #else /* posix */
 # include <sys/time.h>
diff --git a/src/VBox/Runtime/testcase/tstTime-4.cpp b/src/VBox/Runtime/testcase/tstTime-4.cpp
index a16fd54..73e9da8 100644
--- a/src/VBox/Runtime/testcase/tstTime-4.cpp
+++ b/src/VBox/Runtime/testcase/tstTime-4.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/testcase/tstTimer.cpp b/src/VBox/Runtime/testcase/tstTimer.cpp
index 932ca26..be4dea9 100644
--- a/src/VBox/Runtime/testcase/tstTimer.cpp
+++ b/src/VBox/Runtime/testcase/tstTimer.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -52,6 +52,8 @@ static uint32_t cFrequency[200];
 
 static DECLCALLBACK(void) TimerCallback(PRTTIMER pTimer, void *pvUser, uint64_t iTick)
 {
+    RT_NOREF_PV(pTimer); RT_NOREF_PV(pvUser); RT_NOREF_PV(iTick);
+
     gcTicks++;
 
     const uint64_t u64Now = RTTimeNanoTS();
diff --git a/src/VBox/Runtime/testcase/tstTimerLR.cpp b/src/VBox/Runtime/testcase/tstTimerLR.cpp
index 781b85c..09cac5e 100644
--- a/src/VBox/Runtime/testcase/tstTimerLR.cpp
+++ b/src/VBox/Runtime/testcase/tstTimerLR.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -48,6 +48,8 @@ static volatile uint64_t gu64Prev;
 
 static DECLCALLBACK(void) TimerLRCallback(RTTIMERLR hTimerLR, void *pvUser, uint64_t iTick)
 {
+    RT_NOREF_PV(hTimerLR); RT_NOREF_PV(pvUser); RT_NOREF_PV(iTick);
+
     gcTicks++;
 
     const uint64_t u64Now = RTTimeNanoTS();
diff --git a/src/VBox/Runtime/testcase/tstUtf8.cpp b/src/VBox/Runtime/testcase/tstUtf8.cpp
index 91c3f08..d3af54a 100644
--- a/src/VBox/Runtime/testcase/tstUtf8.cpp
+++ b/src/VBox/Runtime/testcase/tstUtf8.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -873,8 +873,9 @@ void TstRTStrPurgeComplementSet(RTTEST hTest)
         char szCopy[MAX_IN_STRING];
         ssize_t cReplacements;
         AssertRC(RTStrCopy(szCopy, RT_ELEMENTS(szCopy), aTests[i].pcszIn));
-        cReplacements = RTStrPurgeComplementSet(szCopy, aTests[i].pcCpSet,
-                                                aTests[i].chReplacement);
+        RTTestDisableAssertions(hTest);
+        cReplacements = RTStrPurgeComplementSet(szCopy, aTests[i].pcCpSet, aTests[i].chReplacement);
+        RTTestRestoreAssertions(hTest);
         if (cReplacements != aTests[i].cExpected)
             RTTestFailed(hTest, "#%u: expected %lld, actual %lld\n", i,
                          (long long) aTests[i].cExpected,
@@ -936,8 +937,11 @@ void TstRTUtf16PurgeComplementSet(RTTEST hTest)
             memcpy(wszInCopy, aTests[i].pcszIn, aTests[i].cwc * 2);
             memcpy(wszOutCopy, aTests[i].pcszOut, aTests[i].cwc * 2);
         }
-        cReplacements = RTUtf16PurgeComplementSet(wszInCopy, aTests[i].pcCpSet,
-                                                  aTests[i].chReplacement);
+
+        RTTestDisableAssertions(hTest);
+        cReplacements = RTUtf16PurgeComplementSet(wszInCopy, aTests[i].pcCpSet, aTests[i].chReplacement);
+        RTTestRestoreAssertions(hTest);
+
         if (cReplacements != aTests[i].cExpected)
             RTTestFailed(hTest, "#%u: expected %lld, actual %lld\n", i,
                          (long long) aTests[i].cExpected,
@@ -1037,11 +1041,12 @@ static void testStrStr(RTTEST hTest)
 #define CHECK(expr, expect) \
     do { \
         const char *pszRet = expr; \
-        if (   (pszRet != NULL && (expect) == NULL) \
-            || (pszRet == NULL && (expect) != NULL) \
-            || strcmp(pszRet, (expect)) \
+        const char *pszExpect = (expect); \
+        if (   (pszRet != NULL && pszExpect == NULL) \
+            || (pszRet == NULL && pszExpect != NULL) \
+            || strcmp(pszRet, pszExpect) \
             ) \
-            RTTestFailed(hTest, "%d: %#x -> %s expected %s", __LINE__, #expr, pszRet, (expect)); \
+            RTTestFailed(hTest, "%d: %#x -> %s expected %s", __LINE__, #expr, pszRet, pszExpect); \
     } while (0)
 
 
@@ -1515,13 +1520,8 @@ int main()
     TstRTStrXCmp(hTest);
     TstRTStrPurgeEncoding(hTest);
     /* TstRT*PurgeComplementSet test conditions which assert. */
-    bool fAreQuiet = RTAssertAreQuiet(), fMayPanic = RTAssertMayPanic();
-    RTAssertSetQuiet(true);
-    RTAssertSetMayPanic(false);
     TstRTStrPurgeComplementSet(hTest);
     TstRTUtf16PurgeComplementSet(hTest);
-    RTAssertSetQuiet(fAreQuiet);
-    RTAssertSetMayPanic(fMayPanic);
     testStrEnd(hTest);
     testStrStr(hTest);
     testUtf8Latin1(hTest);
diff --git a/src/VBox/Runtime/testcase/tstVector.cpp b/src/VBox/Runtime/testcase/tstVector.cpp
index a91774d..23c873d 100644
--- a/src/VBox/Runtime/testcase/tstVector.cpp
+++ b/src/VBox/Runtime/testcase/tstVector.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -56,6 +56,9 @@ static void deletePVoidValue(void *pv)
 }
 
 /* Start by instantiating each function once for syntax checking */
+#ifdef __clang__
+# pragma GCC diagnostic ignored "-Wunused-function" /* https://llvm.org/bugs/show_bug.cgi?id=22712 */
+#endif
 RTVEC_DECL_STRUCT(tstInstance, void *)
 RTVEC_DECL_STRUCT(tstInstance2, void *)
 
@@ -68,16 +71,14 @@ RTVEC_DECLFN_BEGIN(tstInstance, void *)
 RTVEC_DECLFN_END(tstInstance, void *)
 RTVEC_DECLFN_PUSHBACK(tstInstance, void *)
 RTVEC_DECLFN_POPBACK(tstInstance)
-RTVEC_DECLFN_POPBACK_DELETE(tstInstance2, void *, deletePVoid,
-                            tstInstanceDeleteAdapterId)
+RTVEC_DECLFN_POPBACK_DELETE(tstInstance2, void *, deletePVoid, tstInstanceDeleteAdapterId)
 RTVEC_DECLFN_CLEAR(tstInstance)
-RTVEC_DECLFN_CLEAR_DELETE(tstInstance2, deletePVoid,
-                          tstInstanceDeleteAdapterId)
+RTVEC_DECLFN_CLEAR_DELETE(tstInstance2, deletePVoid, tstInstanceDeleteAdapterId)
 RTVEC_DECLFN_DETACH(tstInstance, void *)
 
 RTVEC_DECL(tstSimple, void *)
 
-static void testVectorSimple(RTTEST hTest)
+static void testVectorSimple(void)
 {
     RTTestISub("Vector structure, no cleanup callback");
 
@@ -141,7 +142,7 @@ static void testVectorSimple(RTTEST hTest)
 
 RTVEC_DECL_DELETE(tstDelete, void *, deletePVoid)
 
-static void testVectorDelete(RTTEST hTest)
+static void testVectorDelete(void)
 {
     RTTestISub("Vector structure with cleanup by pointer callback");
 
@@ -180,7 +181,7 @@ static void testVectorDelete(RTTEST hTest)
 
 RTVEC_DECL_DELETE_BY_VALUE(tstDeleteValue, void *, deletePVoidValue)
 
-static void testVectorDeleteValue(RTTEST hTest)
+static void testVectorDeleteValue(void)
 {
     RTTestISub("Vector structure with cleanup by value callback");
 
@@ -227,9 +228,9 @@ int main()
     if (rcExit != RTEXITCODE_SUCCESS)
         return rcExit;
 
-    testVectorSimple(hTest);
-    testVectorDelete(hTest);
-    testVectorDeleteValue(hTest);
+    testVectorSimple();
+    testVectorDelete();
+    testVectorDeleteValue();
 
     return RTTestSummaryAndDestroy(hTest);
 }
diff --git a/src/VBox/Runtime/tools/Makefile.kmk b/src/VBox/Runtime/tools/Makefile.kmk
index 1a96cea..a18f5ed 100644
--- a/src/VBox/Runtime/tools/Makefile.kmk
+++ b/src/VBox/Runtime/tools/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/tools/RTDbgSymCache.cpp b/src/VBox/Runtime/tools/RTDbgSymCache.cpp
index d0c42e1..def55a3 100644
--- a/src/VBox/Runtime/tools/RTDbgSymCache.cpp
+++ b/src/VBox/Runtime/tools/RTDbgSymCache.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -219,7 +219,6 @@ static int rtDbgSymCacheAddCreateUuidMapping(const char *pszCacheFile, PRTUUID p
     /*
      * Create the directories in the path.
      */
-    char chSaved = RTPATH_SLASH;
     for (unsigned i = 0; i < 6; i++, cch += 5)
     {
         Assert(szMapPath[cch] == '-');
@@ -575,6 +574,7 @@ static int rtDbgSymCacheAddImageFile(const char *pszPath, const char *pszExtraSu
 static int rtDbgSymCacheAddDebugMachO(const char *pszPath, PCRTDBGSYMCACHEADDCFG pCfg)
 {
     /* This shouldn't happen, figure out what to do if it does. */
+    RT_NOREF_PV(pCfg);
     return RTMsgErrorRc(VERR_NOT_IMPLEMENTED,
                         "'%s' is an OS X image file, did you point me to a file inside a .dSYM or .sym file?",
                         pszPath);
@@ -591,6 +591,7 @@ static int rtDbgSymCacheAddDebugMachO(const char *pszPath, PCRTDBGSYMCACHEADDCFG
  */
 static int rtDbgSymCacheAddDebugPdb(const char *pszPath, PCRTDBGSYMCACHEADDCFG pCfg, RTFILE hFile)
 {
+    RT_NOREF2(pCfg, hFile);
     return RTMsgErrorRc(VERR_NOT_IMPLEMENTED, "PDB support not implemented: '%s'", pszPath);
 }
 
@@ -1108,6 +1109,7 @@ static int rtDbgSymCacheAddDir(const char *pszPath, PCRTDBGSYMCACHEADDCFG pCfg)
 static RTEXITCODE rtDbgSymCacheAddFileOrDir(const char *pszPath, const char *pszCache, bool fRecursive,
                                             bool fOverwriteOnConflict)
 {
+    RT_NOREF1(fOverwriteOnConflict);
     RTDBGSYMCACHEADDCFG Cfg;
     Cfg.fRecursive      = fRecursive;
     Cfg.pszCache        = pszCache;
@@ -1195,7 +1197,7 @@ static RTEXITCODE rtDbgSymCacheCmdAdd(const char *pszArg0, int cArgs, char **pap
     if (RT_FAILURE(rc))
         return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTGetOptInit failed: %Rrc", rc);
 
-    uint32_t        cAdded = 0;
+    //uint32_t        cAdded = 0;
     RTGETOPTUNION   ValueUnion;
     int             chOpt;
     while ((chOpt = RTGetOpt(&State, &ValueUnion)) != 0)
diff --git a/src/VBox/Runtime/tools/RTGzip.cpp b/src/VBox/Runtime/tools/RTGzip.cpp
index d36d50d..dd9db7c 100644
--- a/src/VBox/Runtime/tools/RTGzip.cpp
+++ b/src/VBox/Runtime/tools/RTGzip.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -84,6 +84,7 @@ typedef RTGZIPCMDOPTS const *PCRTGZIPCMDOPTS;
 static bool gzipIsStdHandleATty(RTHANDLESTD enmStdHandle)
 {
     /** @todo Add isatty() to IPRT. */
+    RT_NOREF1(enmStdHandle);
     return false;
 }
 
@@ -188,7 +189,7 @@ static RTEXITCODE gzipCompressFile(PRTVFSIOSTREAM phVfsSrc, PCRTGZIPCMDOPTS pOpt
         return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTZipGzipCompressIoStream failed: %Rrc", rc);
 
     uint32_t cRefs = RTVfsIoStrmRelease(*phVfsDst);
-    Assert(cRefs > 0);
+    Assert(cRefs > 0); RT_NOREF_PV(cRefs);
     *phVfsDst = hVfsGzip;
 
     return gzipPushFlushAndClose(phVfsSrc, pOpts, phVfsDst);
@@ -215,7 +216,7 @@ static RTEXITCODE gzipSetupDecompressor(PRTVFSIOSTREAM phVfsSrc)
         return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTZipGzipDecompressIoStream failed: %Rrc", rc);
 
     uint32_t cRefs = RTVfsIoStrmRelease(*phVfsSrc);
-    Assert(cRefs > 0);
+    Assert(cRefs > 0); RT_NOREF_PV(cRefs);
     *phVfsSrc = hVfsGunzip;
 
 #if 0
@@ -260,6 +261,8 @@ static RTEXITCODE gzipDecompressFile(PRTVFSIOSTREAM phVfsSrc, PCRTGZIPCMDOPTS pO
  */
 static RTEXITCODE gzipTestFile(PRTVFSIOSTREAM phVfsSrc, PCRTGZIPCMDOPTS pOpts)
 {
+    RT_NOREF_PV(pOpts);
+
     /*
      * Read the whole stream.
      */
@@ -283,6 +286,7 @@ static RTEXITCODE gzipTestFile(PRTVFSIOSTREAM phVfsSrc, PCRTGZIPCMDOPTS pOpts)
 
 static RTEXITCODE gzipListFile(PRTVFSIOSTREAM phVfsSrc, PCRTGZIPCMDOPTS pOpts)
 {
+    RT_NOREF2(phVfsSrc, pOpts);
     return RTMsgErrorExit(RTEXITCODE_FAILURE, "Listing has not been implemented");
 }
 
@@ -484,7 +488,7 @@ RTEXITCODE RTZipGzipCmd(unsigned cArgs, char **papszArgs)
 
     RTEXITCODE  rcExit      = RTEXITCODE_SUCCESS;
     unsigned    cProcessed  = 0;
-    RTVFSIOSTREAM hVfsStdOut= NIL_RTVFSIOSTREAM;
+    //RTVFSIOSTREAM hVfsStdOut= NIL_RTVFSIOSTREAM;
 
     RTGETOPTSTATE GetState;
     int rc = RTGetOptInit(&GetState, cArgs, papszArgs, s_aOptions, RT_ELEMENTS(s_aOptions), 1,
diff --git a/src/VBox/Runtime/tools/RTHttp.cpp b/src/VBox/Runtime/tools/RTHttp.cpp
index e1149d5..0836c2f 100644
--- a/src/VBox/Runtime/tools/RTHttp.cpp
+++ b/src/VBox/Runtime/tools/RTHttp.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -105,7 +105,7 @@ int main(int argc, char **argv)
                 return RTEXITCODE_SUCCESS;
 
             case 'V':
-                RTPrintf("$Revision: 102641 $\n");
+                RTPrintf("$Revision: 109033 $\n");
                 return RTEXITCODE_SUCCESS;
 
             case VINF_GETOPT_NOT_OPTION:
diff --git a/src/VBox/Runtime/tools/RTLdrFlt.cpp b/src/VBox/Runtime/tools/RTLdrFlt.cpp
index fdb8ff7..baaf7bc 100644
--- a/src/VBox/Runtime/tools/RTLdrFlt.cpp
+++ b/src/VBox/Runtime/tools/RTLdrFlt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -224,7 +224,7 @@ int main(int argc, char **argv)
                 return RTEXITCODE_SUCCESS;
 
             case 'V':
-                RTPrintf("$Revision: 104079 $\n");
+                RTPrintf("$Revision: 109033 $\n");
                 return RTEXITCODE_SUCCESS;
 
             case VINF_GETOPT_NOT_OPTION:
diff --git a/src/VBox/Runtime/tools/RTManifest.cpp b/src/VBox/Runtime/tools/RTManifest.cpp
index cefbc41..d017e0c 100644
--- a/src/VBox/Runtime/tools/RTManifest.cpp
+++ b/src/VBox/Runtime/tools/RTManifest.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -55,6 +55,8 @@
  */
 static RTEXITCODE rtManifestDoVerify(const char *pszManifest, bool fStdFormat, const char *pszChDir)
 {
+    RT_NOREF_PV(pszChDir); /** @todo implement pszChDir! */
+
     /*
      * Open the manifest.
      */
diff --git a/src/VBox/Runtime/tools/RTNtDbgHelp.cpp b/src/VBox/Runtime/tools/RTNtDbgHelp.cpp
index fccd902..4e4a751 100644
--- a/src/VBox/Runtime/tools/RTNtDbgHelp.cpp
+++ b/src/VBox/Runtime/tools/RTNtDbgHelp.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -28,7 +28,7 @@
 /*******************************************************************************
 *   Header Files                                                               *
 *******************************************************************************/
-#include <Windows.h>
+#include <iprt/win/windows.h>
 #include <Dbghelp.h>
 
 #include <iprt/alloca.h>
@@ -210,10 +210,13 @@ static const char *symTypeName(SYM_TYPE enmType)
         case SymSym:        return "SymSym";
         case SymDia:        return "SymDia";
         case SymVirtual:    return "SymVirtual";
+        default:
+        {
+            static char s_szBuf[32];
+            RTStrPrintf(s_szBuf, sizeof(s_szBuf), "Unknown-%#x", enmType);
+            return s_szBuf;
+        }
     }
-    static char s_szBuf[32];
-    RTStrPrintf(s_szBuf, sizeof(s_szBuf), "Unknown-%#x", enmType);
-    return s_szBuf;
 }
 
 
@@ -319,7 +322,7 @@ int main(int argc, char **argv)
     };
 
     RTEXITCODE  rcExit      = RTEXITCODE_SUCCESS;
-    const char *pszOutput   = "-";
+    //const char *pszOutput   = "-";
 
     int ch;
     RTGETOPTUNION ValueUnion;
@@ -358,7 +361,7 @@ int main(int argc, char **argv)
 
 
             case 'V':
-                RTPrintf("$Revision: 100874 $");
+                RTPrintf("$Revision: 109299 $");
                 break;
 
             case 'h':
diff --git a/src/VBox/Runtime/tools/RTRm.cpp b/src/VBox/Runtime/tools/RTRm.cpp
index 8a2fb50..0046c84 100644
--- a/src/VBox/Runtime/tools/RTRm.cpp
+++ b/src/VBox/Runtime/tools/RTRm.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/tools/RTShutdown.cpp b/src/VBox/Runtime/tools/RTShutdown.cpp
index fb84b6a..1f4965c 100644
--- a/src/VBox/Runtime/tools/RTShutdown.cpp
+++ b/src/VBox/Runtime/tools/RTShutdown.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/tools/RTSignTool.cpp b/src/VBox/Runtime/tools/RTSignTool.cpp
index 96c478a..a01274f 100644
--- a/src/VBox/Runtime/tools/RTSignTool.cpp
+++ b/src/VBox/Runtime/tools/RTSignTool.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -74,6 +74,7 @@ static RTEXITCODE HandleVersion(int cArgs, char **papszArgs);
  */
 static RTEXITCODE HelpExtractExeSignerCert(PRTSTREAM pStrm, RTSIGNTOOLHELP enmLevel)
 {
+    RT_NOREF_PV(enmLevel);
     RTStrmPrintf(pStrm, "extract-exe-signer-cert [--ber|--cer|--der] [--exe|-e] <exe> [--output|-o] <outfile.cer>\n");
     return RTEXITCODE_SUCCESS;
 }
@@ -244,6 +245,7 @@ static RTEXITCODE HandleExtractExeSignerCert(int cArgs, char **papszArgs)
  */
 static RTEXITCODE HelpVerifyExe(PRTSTREAM pStrm, RTSIGNTOOLHELP enmLevel)
 {
+    RT_NOREF_PV(enmLevel);
     RTStrmPrintf(pStrm,
                  "verify-exe [--verbose|--quiet] [--kernel] [--root <root-cert.der>] [--additional <supp-cert.der>]\n"
                  "        [--type <win|osx>] <exe1> [exe2 [..]]\n");
@@ -381,6 +383,8 @@ static DECLCALLBACK(int) VerifyExeCallback(RTLDRMOD hLdrMod, RTLDRSIGNATURETYPE
                                            PRTERRINFO pErrInfo, void *pvUser)
 {
     VERIFYEXESTATE *pState = (VERIFYEXESTATE *)pvUser;
+    RT_NOREF_PV(hLdrMod); RT_NOREF_PV(cbSignature);
+
     switch (enmSignature)
     {
         case RTLDRSIGNATURETYPE_PKCS7_SIGNED_DATA:
@@ -412,7 +416,6 @@ static DECLCALLBACK(int) VerifyExeCallback(RTLDRMOD hLdrMod, RTLDRSIGNATURETYPE
         default:
             return RTErrInfoSetF(pErrInfo, VERR_NOT_SUPPORTED, "Unsupported signature type: %d", enmSignature);
     }
-    return VINF_SUCCESS;
 }
 
 /** Worker for HandleVerifyExe. */
@@ -613,6 +616,7 @@ static RTEXITCODE HandleVerifyExe(int cArgs, char **papszArgs)
  */
 static RTEXITCODE HelpMakeTaInfo(PRTSTREAM pStrm, RTSIGNTOOLHELP enmLevel)
 {
+    RT_NOREF_PV(enmLevel);
     RTStrmPrintf(pStrm,
                  "make-tainfo [--verbose|--quiet] [--cert <cert.der>]  [-o|--output] <tainfo.der>\n");
     return RTEXITCODE_SUCCESS;
@@ -630,6 +634,7 @@ typedef struct MAKETAINFOSTATE
 /** @callback_method_impl{FNRTASN1ENCODEWRITER}  */
 static DECLCALLBACK(int) handleMakeTaInfoWriter(const void *pvBuf, size_t cbToWrite, void *pvUser, PRTERRINFO pErrInfo)
 {
+    RT_NOREF_PV(pErrInfo);
     return RTStrmWrite((PRTSTREAM)pvUser, pvBuf, cbToWrite);
 }
 
@@ -647,7 +652,6 @@ static RTEXITCODE HandleMakeTaInfo(int cArgs, char **papszArgs)
         { "--quiet",        'q', RTGETOPT_REQ_NOTHING },
     };
 
-    RTLDRARCH       enmLdrArch = RTLDRARCH_WHATEVER;
     MAKETAINFOSTATE State = { 0, NULL, NULL };
 
     RTGETOPTSTATE GetState;
@@ -823,12 +827,14 @@ static RTEXITCODE HandleMakeTaInfo(int cArgs, char **papszArgs)
  */
 static RTEXITCODE HelpVersion(PRTSTREAM pStrm, RTSIGNTOOLHELP enmLevel)
 {
+    RT_NOREF_PV(enmLevel);
     RTStrmPrintf(pStrm, "version\n");
     return RTEXITCODE_SUCCESS;
 }
 
 static RTEXITCODE HandleVersion(int cArgs, char **papszArgs)
 {
+    RT_NOREF_PV(cArgs); RT_NOREF_PV(papszArgs);
 #ifndef IN_BLD_PROG  /* RTBldCfgVersion or RTBldCfgRevision in build time IPRT lib. */
     RTPrintf("%s\n", RTBldCfgVersion());
     return RTEXITCODE_SUCCESS;
@@ -883,6 +889,7 @@ const g_aCommands[] =
  */
 static RTEXITCODE HelpHelp(PRTSTREAM pStrm, RTSIGNTOOLHELP enmLevel)
 {
+    RT_NOREF_PV(enmLevel);
     RTStrmPrintf(pStrm, "help [cmd-patterns]\n");
     return RTEXITCODE_SUCCESS;
 }
diff --git a/src/VBox/Runtime/tools/RTTar.cpp b/src/VBox/Runtime/tools/RTTar.cpp
index 2e7ae5c..547b14f 100644
--- a/src/VBox/Runtime/tools/RTTar.cpp
+++ b/src/VBox/Runtime/tools/RTTar.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/tools/RTUnzip.cpp b/src/VBox/Runtime/tools/RTUnzip.cpp
index 9b8ab03..21eefb9 100644
--- a/src/VBox/Runtime/tools/RTUnzip.cpp
+++ b/src/VBox/Runtime/tools/RTUnzip.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/win/RTErrConvertFromWin32.cpp b/src/VBox/Runtime/win/RTErrConvertFromWin32.cpp
index 475983f..c49559d 100644
--- a/src/VBox/Runtime/win/RTErrConvertFromWin32.cpp
+++ b/src/VBox/Runtime/win/RTErrConvertFromWin32.cpp
@@ -28,7 +28,7 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 #include <iprt/err.h>
 #include <iprt/assert.h>
@@ -185,8 +185,8 @@ RTR3DECL(int)  RTErrConvertFromWin32(unsigned uNativeCode)
         case ERROR_INVALID_EXE_SIGNATURE:   return VERR_INVALID_EXE_SIGNATURE;
         case ERROR_BAD_EXE_FORMAT:          return VERR_BAD_EXE_FORMAT;
         case ERROR_FILE_CORRUPT:            return VERR_BAD_EXE_FORMAT;
-        case ERROR_RESOURCE_DATA_NOT_FOUND: return VERR_NO_DATA; ///@todo fix ERROR_RESOURCE_DATA_NOT_FOUND translation
-        case ERROR_INVALID_ADDRESS:         return VERR_INVALID_POINTER; ///@todo fix ERROR_INVALID_ADDRESS translation - dbghelp returns it on some line number queries.
+        case ERROR_RESOURCE_DATA_NOT_FOUND: return VERR_NO_DATA; /// @todo fix ERROR_RESOURCE_DATA_NOT_FOUND translation
+        case ERROR_INVALID_ADDRESS:         return VERR_INVALID_POINTER; /// @todo fix ERROR_INVALID_ADDRESS translation - dbghelp returns it on some line number queries.
 
         case ERROR_CANCELLED:               return VERR_CANCELLED;
         case ERROR_USER_MAPPED_FILE:        return VERR_SHARING_VIOLATION;
diff --git a/src/VBox/Runtime/win/amd64/ASMAtomicBitClear.asm b/src/VBox/Runtime/win/amd64/ASMAtomicBitClear.asm
index f7b0409..66032c3 100644
--- a/src/VBox/Runtime/win/amd64/ASMAtomicBitClear.asm
+++ b/src/VBox/Runtime/win/amd64/ASMAtomicBitClear.asm
@@ -3,7 +3,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/win/amd64/ASMAtomicBitTestAndToggle.asm b/src/VBox/Runtime/win/amd64/ASMAtomicBitTestAndToggle.asm
index 2b90d8a..40ca675 100644
--- a/src/VBox/Runtime/win/amd64/ASMAtomicBitTestAndToggle.asm
+++ b/src/VBox/Runtime/win/amd64/ASMAtomicBitTestAndToggle.asm
@@ -3,7 +3,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/win/amd64/ASMAtomicBitToggle.asm b/src/VBox/Runtime/win/amd64/ASMAtomicBitToggle.asm
index dc264ba..e188a9c 100644
--- a/src/VBox/Runtime/win/amd64/ASMAtomicBitToggle.asm
+++ b/src/VBox/Runtime/win/amd64/ASMAtomicBitToggle.asm
@@ -3,7 +3,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/win/amd64/ASMAtomicReadU64.asm b/src/VBox/Runtime/win/amd64/ASMAtomicReadU64.asm
index e6e29ef..8117319 100644
--- a/src/VBox/Runtime/win/amd64/ASMAtomicReadU64.asm
+++ b/src/VBox/Runtime/win/amd64/ASMAtomicReadU64.asm
@@ -3,7 +3,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/win/amd64/ASMAtomicXchgU8.asm b/src/VBox/Runtime/win/amd64/ASMAtomicXchgU8.asm
index 5569b23..05bb276 100644
--- a/src/VBox/Runtime/win/amd64/ASMAtomicXchgU8.asm
+++ b/src/VBox/Runtime/win/amd64/ASMAtomicXchgU8.asm
@@ -3,7 +3,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/win/amd64/ASMGetCS.asm b/src/VBox/Runtime/win/amd64/ASMGetCS.asm
index dfae090..626eaf0 100644
--- a/src/VBox/Runtime/win/amd64/ASMGetCS.asm
+++ b/src/VBox/Runtime/win/amd64/ASMGetCS.asm
@@ -3,7 +3,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/win/amd64/ASMGetDR0.asm b/src/VBox/Runtime/win/amd64/ASMGetDR0.asm
index f8f84b3..37e12c5 100644
--- a/src/VBox/Runtime/win/amd64/ASMGetDR0.asm
+++ b/src/VBox/Runtime/win/amd64/ASMGetDR0.asm
@@ -3,7 +3,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/win/amd64/ASMGetDR1.asm b/src/VBox/Runtime/win/amd64/ASMGetDR1.asm
index 1245deb..4fbca59 100644
--- a/src/VBox/Runtime/win/amd64/ASMGetDR1.asm
+++ b/src/VBox/Runtime/win/amd64/ASMGetDR1.asm
@@ -3,7 +3,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/win/amd64/ASMGetDR2.asm b/src/VBox/Runtime/win/amd64/ASMGetDR2.asm
index ce1899e..b92d5d9 100644
--- a/src/VBox/Runtime/win/amd64/ASMGetDR2.asm
+++ b/src/VBox/Runtime/win/amd64/ASMGetDR2.asm
@@ -3,7 +3,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/win/amd64/ASMGetDR3.asm b/src/VBox/Runtime/win/amd64/ASMGetDR3.asm
index a480938..804bd3e 100644
--- a/src/VBox/Runtime/win/amd64/ASMGetDR3.asm
+++ b/src/VBox/Runtime/win/amd64/ASMGetDR3.asm
@@ -3,7 +3,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/win/amd64/ASMGetDR6.asm b/src/VBox/Runtime/win/amd64/ASMGetDR6.asm
index c78bd94..9a65806 100644
--- a/src/VBox/Runtime/win/amd64/ASMGetDR6.asm
+++ b/src/VBox/Runtime/win/amd64/ASMGetDR6.asm
@@ -3,7 +3,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/win/amd64/ASMGetDR7.asm b/src/VBox/Runtime/win/amd64/ASMGetDR7.asm
index d85ac5b..70fff3a 100644
--- a/src/VBox/Runtime/win/amd64/ASMGetDR7.asm
+++ b/src/VBox/Runtime/win/amd64/ASMGetDR7.asm
@@ -3,7 +3,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/win/amd64/ASMGetDS.asm b/src/VBox/Runtime/win/amd64/ASMGetDS.asm
index e9a2171..ec08901 100644
--- a/src/VBox/Runtime/win/amd64/ASMGetDS.asm
+++ b/src/VBox/Runtime/win/amd64/ASMGetDS.asm
@@ -3,7 +3,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/win/amd64/ASMGetES.asm b/src/VBox/Runtime/win/amd64/ASMGetES.asm
index fbef691..53ac754 100644
--- a/src/VBox/Runtime/win/amd64/ASMGetES.asm
+++ b/src/VBox/Runtime/win/amd64/ASMGetES.asm
@@ -3,7 +3,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/win/amd64/ASMGetFS.asm b/src/VBox/Runtime/win/amd64/ASMGetFS.asm
index b35b3b2..f4185ea 100644
--- a/src/VBox/Runtime/win/amd64/ASMGetFS.asm
+++ b/src/VBox/Runtime/win/amd64/ASMGetFS.asm
@@ -3,7 +3,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/win/amd64/ASMGetFlags.asm b/src/VBox/Runtime/win/amd64/ASMGetFlags.asm
index 896e492..dfcdd75 100644
--- a/src/VBox/Runtime/win/amd64/ASMGetFlags.asm
+++ b/src/VBox/Runtime/win/amd64/ASMGetFlags.asm
@@ -3,7 +3,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/win/amd64/ASMGetGS.asm b/src/VBox/Runtime/win/amd64/ASMGetGS.asm
index 46b211d..d9c5e5d 100644
--- a/src/VBox/Runtime/win/amd64/ASMGetGS.asm
+++ b/src/VBox/Runtime/win/amd64/ASMGetGS.asm
@@ -3,7 +3,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/win/amd64/ASMGetSS.asm b/src/VBox/Runtime/win/amd64/ASMGetSS.asm
index d990c2b..1fdd17d 100644
--- a/src/VBox/Runtime/win/amd64/ASMGetSS.asm
+++ b/src/VBox/Runtime/win/amd64/ASMGetSS.asm
@@ -3,7 +3,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/win/amd64/ASMProbeReadByte.asm b/src/VBox/Runtime/win/amd64/ASMProbeReadByte.asm
index f5e5730..cd93e72 100644
--- a/src/VBox/Runtime/win/amd64/ASMProbeReadByte.asm
+++ b/src/VBox/Runtime/win/amd64/ASMProbeReadByte.asm
@@ -3,7 +3,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/win/amd64/ASMSetFlags.asm b/src/VBox/Runtime/win/amd64/ASMSetFlags.asm
index 74941bf..0ebd730 100644
--- a/src/VBox/Runtime/win/amd64/ASMSetFlags.asm
+++ b/src/VBox/Runtime/win/amd64/ASMSetFlags.asm
@@ -3,7 +3,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/win/errmsgwin.cpp b/src/VBox/Runtime/win/errmsgwin.cpp
index 1dd28bc..86cce3e 100644
--- a/src/VBox/Runtime/win/errmsgwin.cpp
+++ b/src/VBox/Runtime/win/errmsgwin.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -28,7 +28,7 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 #include <iprt/err.h>
 #include <iprt/asm.h>
diff --git a/src/VBox/Storage/DMG.cpp b/src/VBox/Storage/DMG.cpp
index 7538f58..403fd94 100644
--- a/src/VBox/Storage/DMG.cpp
+++ b/src/VBox/Storage/DMG.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -431,13 +431,17 @@ static const VDFILEEXTENSION s_aDmgFileExtensions[] =
 /*********************************************************************************************************************************
 *   Internal Functions                                                                                                           *
 *********************************************************************************************************************************/
+#if 0 /* unused */
 static void dmgUdifFtrHost2FileEndian(PDMGUDIF pUdif);
+#endif
 static void dmgUdifFtrFile2HostEndian(PDMGUDIF pUdif);
 
 static void dmgUdifIdHost2FileEndian(PDMGUDIFID pId);
 static void dmgUdifIdFile2HostEndian(PDMGUDIFID pId);
 
+#if 0 /* unused */
 static void dmgUdifCkSumHost2FileEndian(PDMGUDIFCKSUM pCkSum);
+#endif
 static void dmgUdifCkSumFile2HostEndian(PDMGUDIFCKSUM pCkSum);
 static bool dmgUdifCkSumIsValid(PCDMGUDIFCKSUM pCkSum, const char *pszPrefix);
 
@@ -588,6 +592,7 @@ static void dmgSwapEndianUdif(PDMGUDIF pUdif)
 }
 
 
+#if 0 /* unused */
 /**
  * Swaps endian from host cpu to file.
  * @param   pUdif       The structure.
@@ -599,6 +604,7 @@ static void dmgUdifFtrHost2FileEndian(PDMGUDIF pUdif)
     dmgUdifCkSumHost2FileEndian(&pUdif->DataCkSum);
     dmgUdifCkSumHost2FileEndian(&pUdif->MasterCkSum);
 }
+#endif
 
 
 /**
@@ -740,6 +746,7 @@ static void dmgSwapEndianUdifCkSum(PDMGUDIFCKSUM pCkSum, uint32_t u32Kind, uint3
 }
 
 
+#if 0 /* unused */
 /**
  * Swaps endian from host cpu to file.
  * @param   pCkSum      The structure.
@@ -748,6 +755,7 @@ static void dmgUdifCkSumHost2FileEndian(PDMGUDIFCKSUM pCkSum)
 {
     dmgSwapEndianUdifCkSum(pCkSum, pCkSum->u32Kind, pCkSum->cBits);
 }
+#endif
 
 
 /**
@@ -1079,7 +1087,6 @@ static const char *dmgXmlParseData(const char **ppszCur, uint8_t **ppbData, size
     ssize_t cbData = RTBase64DecodedSize(pszStart, (char **)&psz);
     if (cbData == -1)
         return *ppszCur;
-    const char *pszEnd = psz;
 
     REQUIRE_END_TAG(psz, "data");
 
@@ -1322,7 +1329,7 @@ static int dmgExtentCreateFromBlkxDesc(PDMGIMAGE pThis, uint64_t uSectorPart, PD
         return VERR_NOT_SUPPORTED;
     }
 
-    /** @todo: Merge raw extents if possible to save memory. */
+    /** @todo Merge raw extents if possible to save memory. */
 #if 0
     pExtentNew = pThis->pExtentLast;
     if (   pExtentNew
@@ -1717,6 +1724,7 @@ static DECLCALLBACK(int) dmgOpenImage(PDMGIMAGE pThis, unsigned uOpenFlags)
 static DECLCALLBACK(int) dmgCheckIfValid(const char *pszFilename, PVDINTERFACE pVDIfsDisk,
                                          PVDINTERFACE pVDIfsImage, VDTYPE *penmType)
 {
+    RT_NOREF1(pVDIfsDisk);
     LogFlowFunc(("pszFilename=\"%s\" pVDIfsDisk=%#p pVDIfsImage=%#p penmType=%#p\n",
                  pszFilename, pVDIfsDisk, pVDIfsImage, penmType));
 
@@ -1870,6 +1878,8 @@ static DECLCALLBACK(int) dmgCreate(const char *pszFilename, uint64_t cbSize,
                                    PVDINTERFACE pVDIfsOperation, VDTYPE enmType,
                                    void **ppBackendData)
 {
+    RT_NOREF8(pszFilename, cbSize, uImageFlags, pszComment, pPCHSGeometry, pLCHSGeometry, pUuid, uOpenFlags);
+    RT_NOREF7(uPercentStart, uPercentSpan, pVDIfsDisk, pVDIfsImage, pVDIfsOperation, enmType, ppBackendData);
     LogFlowFunc(("pszFilename=\"%s\" cbSize=%llu uImageFlags=%#x pszComment=\"%s\" pPCHSGeometry=%#p pLCHSGeometry=%#p Uuid=%RTuuid uOpenFlags=%#x uPercentStart=%u uPercentSpan=%u pVDIfsDisk=%#p pVDIfsImage=%#p pVDIfsOperation=%#p enmType=%u ppBackendData=%#p",
                  pszFilename, cbSize, uImageFlags, pszComment, pPCHSGeometry, pLCHSGeometry, pUuid, uOpenFlags, uPercentStart, uPercentSpan, pVDIfsDisk, pVDIfsImage, pVDIfsOperation, enmType, ppBackendData));
     int rc = VERR_NOT_SUPPORTED;
@@ -1881,6 +1891,7 @@ static DECLCALLBACK(int) dmgCreate(const char *pszFilename, uint64_t cbSize,
 /** @interface_method_impl{VBOXHDDBACKEND,pfnRename} */
 static DECLCALLBACK(int) dmgRename(void *pBackendData, const char *pszFilename)
 {
+    RT_NOREF2(pBackendData, pszFilename);
     LogFlowFunc(("pBackendData=%#p pszFilename=%#p\n", pBackendData, pszFilename));
     int rc = VERR_NOT_SUPPORTED;
 
@@ -1994,6 +2005,7 @@ static DECLCALLBACK(int) dmgWrite(void *pBackendData, uint64_t uOffset, size_t c
                                   PVDIOCTX pIoCtx, size_t *pcbWriteProcess, size_t *pcbPreRead,
                                   size_t *pcbPostRead, unsigned fWrite)
 {
+    RT_NOREF7(uOffset, cbToWrite, pIoCtx, pcbWriteProcess, pcbPreRead, pcbPostRead, fWrite);
     LogFlowFunc(("pBackendData=%#p uOffset=%llu pIoCtx=%#p cbToWrite=%zu pcbWriteProcess=%#p pcbPreRead=%#p pcbPostRead=%#p\n",
                  pBackendData, uOffset, pIoCtx, cbToWrite, pcbWriteProcess, pcbPreRead, pcbPostRead));
     PDMGIMAGE pThis = (PDMGIMAGE)pBackendData;
@@ -2015,6 +2027,7 @@ static DECLCALLBACK(int) dmgWrite(void *pBackendData, uint64_t uOffset, size_t c
 /** @interface_method_impl{VBOXHDDBACKEND,pfnFlush} */
 static DECLCALLBACK(int) dmgFlush(void *pBackendData, PVDIOCTX pIoCtx)
 {
+    RT_NOREF1(pIoCtx);
     LogFlowFunc(("pBackendData=%#p\n", pBackendData));
     PDMGIMAGE pThis = (PDMGIMAGE)pBackendData;
     int rc;
@@ -2266,6 +2279,7 @@ out:
 /** @interface_method_impl{VBOXHDDBACKEND,pfnGetComment} */
 static DECLCALLBACK(int) dmgGetComment(void *pBackendData, char *pszComment, size_t cbComment)
 {
+    RT_NOREF2(pszComment, cbComment);
     LogFlowFunc(("pBackendData=%#p pszComment=%#p cbComment=%zu\n", pBackendData, pszComment, cbComment));
     PDMGIMAGE pThis = (PDMGIMAGE)pBackendData;
     int rc;
@@ -2284,6 +2298,7 @@ static DECLCALLBACK(int) dmgGetComment(void *pBackendData, char *pszComment, siz
 /** @interface_method_impl{VBOXHDDBACKEND,pfnSetComment} */
 static DECLCALLBACK(int) dmgSetComment(void *pBackendData, const char *pszComment)
 {
+    RT_NOREF1(pszComment);
     LogFlowFunc(("pBackendData=%#p pszComment=\"%s\"\n", pBackendData, pszComment));
     PDMGIMAGE pImage = (PDMGIMAGE)pBackendData;
     int rc;
@@ -2307,6 +2322,7 @@ static DECLCALLBACK(int) dmgSetComment(void *pBackendData, const char *pszCommen
 /** @interface_method_impl{VBOXHDDBACKEND,pfnGetUuid} */
 static DECLCALLBACK(int) dmgGetUuid(void *pBackendData, PRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
     PDMGIMAGE pThis = (PDMGIMAGE)pBackendData;
     int rc;
@@ -2325,6 +2341,7 @@ static DECLCALLBACK(int) dmgGetUuid(void *pBackendData, PRTUUID pUuid)
 /** @interface_method_impl{VBOXHDDBACKEND,pfnSetUuid} */
 static DECLCALLBACK(int) dmgSetUuid(void *pBackendData, PCRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
     PDMGIMAGE pThis = (PDMGIMAGE)pBackendData;
     int rc;
@@ -2349,6 +2366,7 @@ static DECLCALLBACK(int) dmgSetUuid(void *pBackendData, PCRTUUID pUuid)
 /** @interface_method_impl{VBOXHDDBACKEND,pfnGetModificationUuid} */
 static DECLCALLBACK(int) dmgGetModificationUuid(void *pBackendData, PRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
     PDMGIMAGE pThis = (PDMGIMAGE)pBackendData;
     int rc;
@@ -2367,6 +2385,7 @@ static DECLCALLBACK(int) dmgGetModificationUuid(void *pBackendData, PRTUUID pUui
 /** @interface_method_impl{VBOXHDDBACKEND,pfnSetModificationUuid} */
 static DECLCALLBACK(int) dmgSetModificationUuid(void *pBackendData, PCRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
     PDMGIMAGE pThis = (PDMGIMAGE)pBackendData;
     int rc;
@@ -2390,6 +2409,7 @@ static DECLCALLBACK(int) dmgSetModificationUuid(void *pBackendData, PCRTUUID pUu
 /** @interface_method_impl{VBOXHDDBACKEND,pfnGetParentUuid} */
 static DECLCALLBACK(int) dmgGetParentUuid(void *pBackendData, PRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
     PDMGIMAGE pThis = (PDMGIMAGE)pBackendData;
     int rc;
@@ -2408,6 +2428,7 @@ static DECLCALLBACK(int) dmgGetParentUuid(void *pBackendData, PRTUUID pUuid)
 /** @interface_method_impl{VBOXHDDBACKEND,pfnSetParentUuid} */
 static DECLCALLBACK(int) dmgSetParentUuid(void *pBackendData, PCRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
     PDMGIMAGE pThis = (PDMGIMAGE)pBackendData;
     int rc;
@@ -2431,6 +2452,7 @@ static DECLCALLBACK(int) dmgSetParentUuid(void *pBackendData, PCRTUUID pUuid)
 /** @interface_method_impl{VBOXHDDBACKEND,pfnGetParentModificationUuid} */
 static DECLCALLBACK(int) dmgGetParentModificationUuid(void *pBackendData, PRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
     PDMGIMAGE pThis = (PDMGIMAGE)pBackendData;
     int rc;
@@ -2449,6 +2471,7 @@ static DECLCALLBACK(int) dmgGetParentModificationUuid(void *pBackendData, PRTUUI
 /** @interface_method_impl{VBOXHDDBACKEND,pfnSetParentModificationUuid} */
 static DECLCALLBACK(int) dmgSetParentModificationUuid(void *pBackendData, PCRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
     PDMGIMAGE pThis = (PDMGIMAGE)pBackendData;
     int rc;
diff --git a/src/VBox/Storage/Debug/Makefile.kmk b/src/VBox/Storage/Debug/Makefile.kmk
index 8c9453c..3f02949 100644
--- a/src/VBox/Storage/Debug/Makefile.kmk
+++ b/src/VBox/Storage/Debug/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Storage/Debug/VDDbgIoLog.cpp b/src/VBox/Storage/Debug/VDDbgIoLog.cpp
index a032755..edaf4b8 100644
--- a/src/VBox/Storage/Debug/VDDbgIoLog.cpp
+++ b/src/VBox/Storage/Debug/VDDbgIoLog.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2011-2012 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Storage/ISCSI.cpp b/src/VBox/Storage/ISCSI.cpp
index ed85314..be6049c 100644
--- a/src/VBox/Storage/ISCSI.cpp
+++ b/src/VBox/Storage/ISCSI.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1041,7 +1041,6 @@ static int iscsiTransportRead(PISCSIIMAGE pImage, PISCSIRES paResponse, unsigned
 static int iscsiTransportWrite(PISCSIIMAGE pImage, PISCSIREQ paRequest, unsigned int cnRequest)
 {
     int rc = VINF_SUCCESS;
-    uint32_t pad = 0;
     unsigned int i;
 
     LogFlowFunc(("cnRequest=%d (%s:%d)\n", cnRequest, pImage->pszHostname, pImage->uPort));
@@ -1218,7 +1217,7 @@ static int iscsiTransportOpen(PISCSIIMAGE pImage)
  */
 static DECLCALLBACK(int) iscsiAttach(void *pvUser)
 {
-    int rc;
+    int rc = VINF_SUCCESS;      /* (MSC is used uninitialized) */
     uint32_t itt;
     uint32_t csg, nsg, substate;
     uint64_t isid_tsih;
@@ -1227,7 +1226,7 @@ static DECLCALLBACK(int) iscsiAttach(void *pvUser)
     bool transit;
     uint8_t pbChallenge[1024];  /* RFC3720 specifies this as maximum. */
     size_t cbChallenge = 0;     /* shut up gcc */
-    uint8_t bChapIdx;
+    uint8_t bChapIdx = 0;       /* (MSC is used uninitialized) */
     uint8_t aResponse[RTMD5HASHSIZE];
     uint32_t cnISCSIReq = 0;
     ISCSIREQ aISCSIReq[4];
@@ -1513,6 +1512,7 @@ restart:
                                 rc = VERR_PARSE_ERROR;
                                 break;
                             case 0x0001:    /* security negotiation, step 1: receive final CHAP variant and challenge. */
+                            {
                                 rc = iscsiUpdateParameters(pImage, bBuf, aISCSIRes[1].cbSeg);
                                 if (RT_FAILURE(rc))
                                     break;
@@ -1539,7 +1539,9 @@ restart:
                                     break;
                                 }
                                 rc = RTStrToUInt8Ex(pcszChapIdxTarget, &pszNext, 0, &bChapIdx);
-                                if ((rc > VINF_SUCCESS) || *pszNext != '\0')
+/** @todo r=bird: Unsafe use of pszNext on failure.  The code should probably
+ *        use RTStrToUInt8Full and check for rc != VINF_SUCCESS. */
+                                if (rc > VINF_SUCCESS || *pszNext != '\0')
                                 {
                                     rc = VERR_PARSE_ERROR;
                                     break;
@@ -1557,6 +1559,7 @@ restart:
                                 substate++;
                                 transit = true;
                                 break;
+                            }
                             case 0x0002:    /* security negotiation, step 2: check authentication success. */
                                 rc = iscsiUpdateParameters(pImage, bBuf, aISCSIRes[1].cbSeg);
                                 if (RT_FAILURE(rc))
@@ -2623,6 +2626,7 @@ static int iscsiRecvPDUProcess(PISCSIIMAGE pImage, PISCSIRES paRes, uint32_t cnR
  */
 static int iscsiValidatePDU(PISCSIRES paRes, uint32_t cnRes)
 {
+    RT_NOREF1(cnRes);
     const uint32_t *pcrgResBHS;
     uint32_t hw0;
     Assert(cnRes >= 1);
@@ -2905,7 +2909,7 @@ static int iscsiRecvPDUUpdateRequest(PISCSIIMAGE pImage, PISCSIRES paRes, uint32
             {
                 /* Copy data from the received PDU into the T2I segments. */
                 size_t cbCopied = RTSgBufCopyFromBuf(&pScsiReq->SgBufT2I, pvData, cbData);
-                Assert(cbCopied == cbData);
+                Assert(cbCopied == cbData); NOREF(cbCopied);
 
                 if (final && (RT_N2H_U32(paResBHS[0]) & ISCSI_STATUS_BIT) != 0)
                 {
@@ -3462,8 +3466,9 @@ static void iscsiReattach(PISCSIIMAGE pImage)
 /**
  * Internal. Main iSCSI I/O worker.
  */
-static DECLCALLBACK(int) iscsiIoThreadWorker(RTTHREAD ThreadSelf, void *pvUser)
+static DECLCALLBACK(int) iscsiIoThreadWorker(RTTHREAD hThreadSelf, void *pvUser)
 {
+    RT_NOREF1(hThreadSelf);
     PISCSIIMAGE pImage = (PISCSIIMAGE)pvUser;
 
     /* Initialize the initial event mask. */
@@ -3509,7 +3514,7 @@ static DECLCALLBACK(int) iscsiIoThreadWorker(RTTHREAD ThreadSelf, void *pvUser)
                             pImage->fTryReconnect = false;
                             iscsiReattach(pImage);
                         }
-    
+
                         /* If there is no connection complete the command with an error. */
                         if (RT_LIKELY(iscsiIsClientConnected(pImage)))
                         {
@@ -3621,6 +3626,7 @@ static int iscsiCommandAsync(PISCSIIMAGE pImage, PSCSIREQ pScsiReq,
 
 static DECLCALLBACK(void) iscsiCommandCompleteSync(PISCSIIMAGE pImage, int rcReq, void *pvUser)
 {
+    RT_NOREF1(pImage);
     PISCSICMDSYNC pIScsiCmdSync = (PISCSICMDSYNC)pvUser;
 
     pIScsiCmdSync->rcCmd = rcReq;
@@ -3683,6 +3689,7 @@ static int iscsiCommandSync(PISCSIIMAGE pImage, PSCSIREQ pScsiReq, bool fRetry,
     {
         if (fRetry)
         {
+            rc = VINF_SUCCESS; /* (MSC incorrectly thinks it can be uninitialized) */
             for (unsigned i = 0; i < 10; i++)
             {
                 rc = iscsiCommand(pImage, pScsiReq);
@@ -3810,7 +3817,7 @@ static DECLCALLBACK(void) iscsiCommandAsyncComplete(PISCSIIMAGE pImage, int rcRe
 static int iscsiFreeImage(PISCSIIMAGE pImage, bool fDelete)
 {
     int rc = VINF_SUCCESS;
-    Assert(!fDelete); /* This MUST be false, the flag isn't supported. */
+    Assert(!fDelete); NOREF(fDelete); /* This MUST be false, the flag isn't supported. */
 
     /* Freeing a never allocated image (e.g. because the open failed) is
      * not signalled as an error. After all nothing bad happens. */
@@ -4644,8 +4651,9 @@ out:
 
 /** @copydoc VBOXHDDBACKEND::pfnCheckIfValid */
 static DECLCALLBACK(int) iscsiCheckIfValid(const char *pszFilename, PVDINTERFACE pVDIfsDisk,
-                             PVDINTERFACE pVDIfsImage, VDTYPE *penmType)
+                                           PVDINTERFACE pVDIfsImage, VDTYPE *penmType)
 {
+    RT_NOREF4(pszFilename, pVDIfsDisk, pVDIfsImage, penmType);
     LogFlowFunc(("pszFilename=\"%s\"\n", pszFilename));
 
     /* iSCSI images can't be checked for validity this way, as the filename
@@ -4730,6 +4738,8 @@ static DECLCALLBACK(int) iscsiCreate(const char *pszFilename, uint64_t cbSize,
                                      PVDINTERFACE pVDIfsOperation, VDTYPE enmType,
                                      void **ppBackendData)
 {
+    RT_NOREF8(pszFilename, cbSize, uImageFlags, pszComment, pPCHSGeometry, pLCHSGeometry, pUuid, uOpenFlags);
+    RT_NOREF7(uPercentStart, uPercentSpan, pVDIfsDisk, pVDIfsImage, pVDIfsOperation, enmType, ppBackendData);
     LogFlowFunc(("pszFilename=\"%s\" cbSize=%llu uImageFlags=%#x pszComment=\"%s\" pPCHSGeometry=%#p pLCHSGeometry=%#p Uuid=%RTuuid uOpenFlags=%#x uPercentStart=%u uPercentSpan=%u pVDIfsDisk=%#p pVDIfsImage=%#p pVDIfsOperation=%#p enmType=%u ppBackendData=%#p",
                  pszFilename, cbSize, uImageFlags, pszComment, pPCHSGeometry, pLCHSGeometry, pUuid, uOpenFlags, uPercentStart, uPercentSpan, pVDIfsDisk, pVDIfsImage, pVDIfsOperation, enmType, ppBackendData));
     int rc = VERR_NOT_SUPPORTED;
@@ -4882,6 +4892,7 @@ static DECLCALLBACK(int) iscsiWrite(void *pBackendData, uint64_t uOffset, size_t
                                     PVDIOCTX pIoCtx, size_t *pcbWriteProcess, size_t *pcbPreRead,
                                     size_t *pcbPostRead, unsigned fWrite)
 {
+    RT_NOREF3(pcbPreRead, pcbPostRead, fWrite);
     LogFlowFunc(("pBackendData=%p uOffset=%llu pIoCtx=%#p cbToWrite=%u pcbWriteProcess=%p pcbPreRead=%p pcbPostRead=%p fWrite=%u\n",
                  pBackendData, uOffset, pIoCtx, cbToWrite, pcbWriteProcess, pcbPreRead, pcbPostRead, fWrite));
     PISCSIIMAGE pImage = (PISCSIIMAGE)pBackendData;
@@ -5121,6 +5132,7 @@ static DECLCALLBACK(uint64_t) iscsiGetFileSize(void *pBackendData)
 /** @copydoc VBOXHDDBACKEND::pfnGetPCHSGeometry */
 static DECLCALLBACK(int) iscsiGetPCHSGeometry(void *pBackendData, PVDGEOMETRY pPCHSGeometry)
 {
+    RT_NOREF1(pPCHSGeometry);
     LogFlowFunc(("pBackendData=%#p pPCHSGeometry=%#p\n", pBackendData, pPCHSGeometry));
     PISCSIIMAGE pImage = (PISCSIIMAGE)pBackendData;
     int rc;
@@ -5139,6 +5151,7 @@ static DECLCALLBACK(int) iscsiGetPCHSGeometry(void *pBackendData, PVDGEOMETRY pP
 /** @copydoc VBOXHDDBACKEND::pfnSetPCHSGeometry */
 static DECLCALLBACK(int) iscsiSetPCHSGeometry(void *pBackendData, PCVDGEOMETRY pPCHSGeometry)
 {
+    RT_NOREF1(pPCHSGeometry);
     LogFlowFunc(("pBackendData=%#p pPCHSGeometry=%#p PCHS=%u/%u/%u\n", pBackendData, pPCHSGeometry, pPCHSGeometry->cCylinders, pPCHSGeometry->cHeads, pPCHSGeometry->cSectors));
     PISCSIIMAGE pImage = (PISCSIIMAGE)pBackendData;
     int rc;
@@ -5165,6 +5178,7 @@ out:
 /** @copydoc VBOXHDDBACKEND::pfnGetLCHSGeometry */
 static DECLCALLBACK(int) iscsiGetLCHSGeometry(void *pBackendData, PVDGEOMETRY pLCHSGeometry)
 {
+    RT_NOREF1(pLCHSGeometry);
     LogFlowFunc(("pBackendData=%#p pLCHSGeometry=%#p\n", pBackendData, pLCHSGeometry));
     PISCSIIMAGE pImage = (PISCSIIMAGE)pBackendData;
     int rc;
@@ -5183,6 +5197,7 @@ static DECLCALLBACK(int) iscsiGetLCHSGeometry(void *pBackendData, PVDGEOMETRY pL
 /** @copydoc VBOXHDDBACKEND::pfnSetLCHSGeometry */
 static DECLCALLBACK(int) iscsiSetLCHSGeometry(void *pBackendData, PCVDGEOMETRY pLCHSGeometry)
 {
+    RT_NOREF1(pLCHSGeometry);
     LogFlowFunc(("pBackendData=%#p pLCHSGeometry=%#p LCHS=%u/%u/%u\n", pBackendData, pLCHSGeometry, pLCHSGeometry->cCylinders, pLCHSGeometry->cHeads, pLCHSGeometry->cSectors));
     PISCSIIMAGE pImage = (PISCSIIMAGE)pBackendData;
     int rc;
@@ -5276,6 +5291,7 @@ static DECLCALLBACK(int) iscsiSetOpenFlags(void *pBackendData, unsigned uOpenFla
 static DECLCALLBACK(int) iscsiGetComment(void *pBackendData, char *pszComment,
                                          size_t cbComment)
 {
+    RT_NOREF2(pszComment, cbComment);
     LogFlowFunc(("pBackendData=%#p pszComment=%#p cbComment=%zu\n", pBackendData, pszComment, cbComment));
     PISCSIIMAGE pImage = (PISCSIIMAGE)pBackendData;
     int rc;
@@ -5294,6 +5310,7 @@ static DECLCALLBACK(int) iscsiGetComment(void *pBackendData, char *pszComment,
 /** @copydoc VBOXHDDBACKEND::pfnSetComment */
 static DECLCALLBACK(int) iscsiSetComment(void *pBackendData, const char *pszComment)
 {
+    RT_NOREF1(pszComment);
     LogFlowFunc(("pBackendData=%#p pszComment=\"%s\"\n", pBackendData, pszComment));
     PISCSIIMAGE pImage = (PISCSIIMAGE)pBackendData;
     int rc;
@@ -5317,6 +5334,7 @@ static DECLCALLBACK(int) iscsiSetComment(void *pBackendData, const char *pszComm
 /** @copydoc VBOXHDDBACKEND::pfnGetUuid */
 static DECLCALLBACK(int) iscsiGetUuid(void *pBackendData, PRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
     PISCSIIMAGE pImage = (PISCSIIMAGE)pBackendData;
     int rc;
@@ -5335,6 +5353,7 @@ static DECLCALLBACK(int) iscsiGetUuid(void *pBackendData, PRTUUID pUuid)
 /** @copydoc VBOXHDDBACKEND::pfnSetUuid */
 static DECLCALLBACK(int) iscsiSetUuid(void *pBackendData, PCRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
     PISCSIIMAGE pImage = (PISCSIIMAGE)pBackendData;
     int rc;
@@ -5359,6 +5378,7 @@ static DECLCALLBACK(int) iscsiSetUuid(void *pBackendData, PCRTUUID pUuid)
 /** @copydoc VBOXHDDBACKEND::pfnGetModificationUuid */
 static DECLCALLBACK(int) iscsiGetModificationUuid(void *pBackendData, PRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
     PISCSIIMAGE pImage = (PISCSIIMAGE)pBackendData;
     int rc;
@@ -5377,6 +5397,7 @@ static DECLCALLBACK(int) iscsiGetModificationUuid(void *pBackendData, PRTUUID pU
 /** @copydoc VBOXHDDBACKEND::pfnSetModificationUuid */
 static DECLCALLBACK(int) iscsiSetModificationUuid(void *pBackendData, PCRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
     PISCSIIMAGE pImage = (PISCSIIMAGE)pBackendData;
     int rc;
@@ -5401,6 +5422,7 @@ static DECLCALLBACK(int) iscsiSetModificationUuid(void *pBackendData, PCRTUUID p
 /** @copydoc VBOXHDDBACKEND::pfnGetParentUuid */
 static DECLCALLBACK(int) iscsiGetParentUuid(void *pBackendData, PRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
     PISCSIIMAGE pImage = (PISCSIIMAGE)pBackendData;
     int rc;
@@ -5419,6 +5441,7 @@ static DECLCALLBACK(int) iscsiGetParentUuid(void *pBackendData, PRTUUID pUuid)
 /** @copydoc VBOXHDDBACKEND::pfnSetParentUuid */
 static DECLCALLBACK(int) iscsiSetParentUuid(void *pBackendData, PCRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
     PISCSIIMAGE pImage = (PISCSIIMAGE)pBackendData;
     int rc;
@@ -5443,6 +5466,7 @@ static DECLCALLBACK(int) iscsiSetParentUuid(void *pBackendData, PCRTUUID pUuid)
 /** @copydoc VBOXHDDBACKEND::pfnGetParentModificationUuid */
 static DECLCALLBACK(int) iscsiGetParentModificationUuid(void *pBackendData, PRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
     PISCSIIMAGE pImage = (PISCSIIMAGE)pBackendData;
     int rc;
@@ -5461,6 +5485,7 @@ static DECLCALLBACK(int) iscsiGetParentModificationUuid(void *pBackendData, PRTU
 /** @copydoc VBOXHDDBACKEND::pfnSetParentModificationUuid */
 static DECLCALLBACK(int) iscsiSetParentModificationUuid(void *pBackendData, PCRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
     PISCSIIMAGE pImage = (PISCSIIMAGE)pBackendData;
     int rc;
diff --git a/src/VBox/Storage/Makefile.kmk b/src/VBox/Storage/Makefile.kmk
index 7d940d9..f5d7c44 100644
--- a/src/VBox/Storage/Makefile.kmk
+++ b/src/VBox/Storage/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Storage/Parallels.cpp b/src/VBox/Storage/Parallels.cpp
index fe32889..a4b81d6 100644
--- a/src/VBox/Storage/Parallels.cpp
+++ b/src/VBox/Storage/Parallels.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -274,6 +274,7 @@ static int parallelsCreateImage(PPARALLELSIMAGE pImage, uint64_t cbSize,
                                 PFNVDPROGRESS pfnProgress, void *pvUser,
                                 unsigned uPercentStart, unsigned uPercentSpan)
 {
+    RT_NOREF1(pszComment);
     int rc = VINF_SUCCESS;
     int32_t fOpen;
 
@@ -361,6 +362,7 @@ out:
 static DECLCALLBACK(int) parallelsCheckIfValid(const char *pszFilename, PVDINTERFACE pVDIfsDisk,
                                                PVDINTERFACE pVDIfsImage, VDTYPE *penmType)
 {
+    RT_NOREF1(pVDIfsDisk);
     int rc;
     PVDIOSTORAGE pStorage;
     ParallelsHeader parallelsHeader;
@@ -478,6 +480,7 @@ static DECLCALLBACK(int) parallelsCreate(const char *pszFilename, uint64_t cbSiz
                                          PVDINTERFACE pVDIfsOperation, VDTYPE enmType,
                                          void **ppBackendData)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pszFilename=\"%s\" cbSize=%llu uImageFlags=%#x pszComment=\"%s\" pPCHSGeometry=%#p pLCHSGeometry=%#p Uuid=%RTuuid uOpenFlags=%#x uPercentStart=%u uPercentSpan=%u pVDIfsDisk=%#p pVDIfsImage=%#p pVDIfsOperation=%#p enmType=%u ppBackendData=%#p",
                  pszFilename, cbSize, uImageFlags, pszComment, pPCHSGeometry, pLCHSGeometry, pUuid, uOpenFlags, uPercentStart, uPercentSpan, pVDIfsDisk, pVDIfsImage, pVDIfsOperation, enmType, ppBackendData));
     int rc = VINF_SUCCESS;
@@ -717,7 +720,7 @@ static DECLCALLBACK(int) parallelsWrite(void *pBackendData, uint64_t uOffset, si
             if (RT_SUCCESS(rc) || (rc == VERR_VD_ASYNC_IO_IN_PROGRESS))
             {
                 /* Write the changed allocation bitmap entry. */
-                /** @todo: Error handling. */
+                /** @todo Error handling. */
                 rc = vdIfIoIntFileWriteMeta(pImage->pIfIo, pImage->pStorage,
                                             sizeof(ParallelsHeader) + iIndexInAllocationTable * sizeof(uint32_t),
                                             &pImage->pAllocationBitmap[iIndexInAllocationTable],
@@ -997,6 +1000,7 @@ out:
 static DECLCALLBACK(int) parallelsGetComment(void *pBackendData, char *pszComment,
                                              size_t cbComment)
 {
+    RT_NOREF2(pszComment, cbComment);
     LogFlowFunc(("pBackendData=%#p pszComment=%#p cbComment=%zu\n", pBackendData, pszComment, cbComment));
     PPARALLELSIMAGE pImage = (PPARALLELSIMAGE)pBackendData;
     int rc;
@@ -1015,6 +1019,7 @@ static DECLCALLBACK(int) parallelsGetComment(void *pBackendData, char *pszCommen
 /** @copydoc VBOXHDDBACKEND::pfnSetComment */
 static DECLCALLBACK(int) parallelsSetComment(void *pBackendData, const char *pszComment)
 {
+    RT_NOREF1(pszComment);
     LogFlowFunc(("pBackendData=%#p pszComment=\"%s\"\n", pBackendData, pszComment));
     PPARALLELSIMAGE pImage = (PPARALLELSIMAGE)pBackendData;
     int rc;
@@ -1038,6 +1043,7 @@ static DECLCALLBACK(int) parallelsSetComment(void *pBackendData, const char *psz
 /** @copydoc VBOXHDDBACKEND::pfnGetUuid */
 static DECLCALLBACK(int) parallelsGetUuid(void *pBackendData, PRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
     PPARALLELSIMAGE pImage = (PPARALLELSIMAGE)pBackendData;
     int rc;
@@ -1056,6 +1062,7 @@ static DECLCALLBACK(int) parallelsGetUuid(void *pBackendData, PRTUUID pUuid)
 /** @copydoc VBOXHDDBACKEND::pfnSetUuid */
 static DECLCALLBACK(int) parallelsSetUuid(void *pBackendData, PCRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
     PPARALLELSIMAGE pImage = (PPARALLELSIMAGE)pBackendData;
     int rc;
@@ -1079,6 +1086,7 @@ static DECLCALLBACK(int) parallelsSetUuid(void *pBackendData, PCRTUUID pUuid)
 /** @copydoc VBOXHDDBACKEND::pfnGetModificationUuid */
 static DECLCALLBACK(int) parallelsGetModificationUuid(void *pBackendData, PRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
     PPARALLELSIMAGE pImage = (PPARALLELSIMAGE)pBackendData;
     int rc;
@@ -1097,6 +1105,7 @@ static DECLCALLBACK(int) parallelsGetModificationUuid(void *pBackendData, PRTUUI
 /** @copydoc VBOXHDDBACKEND::pfnSetModificationUuid */
 static DECLCALLBACK(int) parallelsSetModificationUuid(void *pBackendData, PCRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
     PPARALLELSIMAGE pImage = (PPARALLELSIMAGE)pBackendData;
     int rc;
@@ -1120,6 +1129,7 @@ static DECLCALLBACK(int) parallelsSetModificationUuid(void *pBackendData, PCRTUU
 /** @copydoc VBOXHDDBACKEND::pfnGetParentUuid */
 static DECLCALLBACK(int) parallelsGetParentUuid(void *pBackendData, PRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
     PPARALLELSIMAGE pImage = (PPARALLELSIMAGE)pBackendData;
     int rc;
@@ -1138,6 +1148,7 @@ static DECLCALLBACK(int) parallelsGetParentUuid(void *pBackendData, PRTUUID pUui
 /** @copydoc VBOXHDDBACKEND::pfnSetParentUuid */
 static DECLCALLBACK(int) parallelsSetParentUuid(void *pBackendData, PCRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
     PPARALLELSIMAGE pImage = (PPARALLELSIMAGE)pBackendData;
     int rc;
@@ -1161,6 +1172,7 @@ static DECLCALLBACK(int) parallelsSetParentUuid(void *pBackendData, PCRTUUID pUu
 /** @copydoc VBOXHDDBACKEND::pfnGetParentModificationUuid */
 static DECLCALLBACK(int) parallelsGetParentModificationUuid(void *pBackendData, PRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
     PPARALLELSIMAGE pImage = (PPARALLELSIMAGE)pBackendData;
     int rc;
@@ -1179,6 +1191,7 @@ static DECLCALLBACK(int) parallelsGetParentModificationUuid(void *pBackendData,
 /** @copydoc VBOXHDDBACKEND::pfnSetParentModificationUuid */
 static DECLCALLBACK(int) parallelsSetParentModificationUuid(void *pBackendData, PCRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
     PPARALLELSIMAGE pImage = (PPARALLELSIMAGE)pBackendData;
     int rc;
diff --git a/src/VBox/Storage/QCOW.cpp b/src/VBox/Storage/QCOW.cpp
index 9e1645b..53e7d2c 100644
--- a/src/VBox/Storage/QCOW.cpp
+++ b/src/VBox/Storage/QCOW.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -33,8 +33,8 @@
 
 #include "VDBackends.h"
 
-/**
- * The QCOW backend implements support for the qemu copy on write format (short QCOW)
+/** @page pg_storage_qcow   QCOW Storage Backend
+ * The QCOW backend implements support for the qemu copy on write format (short QCOW).
  * There is no official specification available but the format is described
  * at http://people.gnome.org/~markmc/qcow-image-format.html for version 2
  * and http://people.gnome.org/~markmc/qcow-image-format-version-1.html for version 1.
@@ -52,7 +52,7 @@
 *   Structures in a QCOW image, big endian                                                                                       *
 *********************************************************************************************************************************/
 
-#pragma pack(1)
+#pragma pack(1) /* Completely unnecessary. */
 typedef struct QCowHeader
 {
     /** Magic value. */
@@ -451,6 +451,7 @@ static void qcowTableConvertFromHostEndianess(uint64_t *paTblImg, uint64_t *paTb
     }
 }
 
+#if 0 /* unused */
 /**
  * Convert refcount table entries from little endian to host endianess.
  *
@@ -466,7 +467,9 @@ static void qcowRefcountTableConvertToHostEndianess(uint16_t *paTbl, uint32_t cE
         paTbl++;
     }
 }
+#endif
 
+#if 0 /* unused */
 /**
  * Convert table entries from host to little endian format.
  *
@@ -485,6 +488,7 @@ static void qcowRefcountTableConvertFromHostEndianess(uint16_t *paTblImg, uint16
         paTblImg++;
     }
 }
+#endif
 
 /**
  * Creates the L2 table cache.
@@ -576,7 +580,6 @@ static void qcowL2TblCacheEntryRelease(PQCOWL2CACHEENTRY pL2Entry)
 static PQCOWL2CACHEENTRY qcowL2TblCacheEntryAlloc(PQCOWIMAGE pImage)
 {
     PQCOWL2CACHEENTRY pL2Entry = NULL;
-    int rc = VINF_SUCCESS;
 
     if (pImage->cbL2Cache + pImage->cbL2Table <= QCOW_L2_CACHE_MEMORY_MAX)
     {
@@ -1123,7 +1126,7 @@ static int qcowOpenImage(PQCOWIMAGE pImage, unsigned uOpenFlags)
                                N_("QCow: Image '%s' uses version %u which is not supported"),
                                pImage->pszFilename, Header.u32Version);
 
-            /** @todo: Check that there are no compressed clusters in the image
+            /** @todo Check that there are no compressed clusters in the image
              *  (by traversing the L2 tables and checking each offset).
              *  Refuse to open such images.
              */
@@ -1217,6 +1220,7 @@ static int qcowCreateImage(PQCOWIMAGE pImage, uint64_t cbSize,
                            PFNVDPROGRESS pfnProgress, void *pvUser,
                            unsigned uPercentStart, unsigned uPercentSpan)
 {
+    RT_NOREF1(pszComment);
     int rc;
     int32_t fOpen;
 
@@ -1303,6 +1307,7 @@ out:
  */
 static int qcowAsyncClusterAllocRollback(PQCOWIMAGE pImage, PVDIOCTX pIoCtx, PQCOWCLUSTERASYNCALLOC pClusterAlloc)
 {
+    RT_NOREF1(pIoCtx);
     int rc = VINF_SUCCESS;
 
     switch (pClusterAlloc->enmAllocState)
@@ -1442,6 +1447,7 @@ static DECLCALLBACK(int) qcowAsyncClusterAllocUpdate(void *pBackendData, PVDIOCT
 static DECLCALLBACK(int) qcowCheckIfValid(const char *pszFilename, PVDINTERFACE pVDIfsDisk,
                                           PVDINTERFACE pVDIfsImage, VDTYPE *penmType)
 {
+    RT_NOREF1(pVDIfsDisk);
     LogFlowFunc(("pszFilename=\"%s\" pVDIfsDisk=%#p pVDIfsImage=%#p\n", pszFilename, pVDIfsDisk, pVDIfsImage));
     PVDIOSTORAGE pStorage = NULL;
     uint64_t cbFile;
@@ -1466,25 +1472,26 @@ static DECLCALLBACK(int) qcowCheckIfValid(const char *pszFilename, PVDINTERFACE
                                                       false /* fCreate */),
                            &pStorage);
     if (RT_SUCCESS(rc))
-        rc = vdIfIoIntFileGetSize(pIfIo, pStorage, &cbFile);
-
-    if (   RT_SUCCESS(rc)
-        && cbFile > sizeof(QCowHeader))
     {
-        QCowHeader Header;
-
-        rc = vdIfIoIntFileReadSync(pIfIo, pStorage, 0, &Header, sizeof(Header));
+        rc = vdIfIoIntFileGetSize(pIfIo, pStorage, &cbFile);
         if (   RT_SUCCESS(rc)
-            && qcowHdrConvertToHostEndianess(&Header))
+            && cbFile > sizeof(QCowHeader))
         {
-            *penmType = VDTYPE_HDD;
-            rc = VINF_SUCCESS;
+            QCowHeader Header;
+
+            rc = vdIfIoIntFileReadSync(pIfIo, pStorage, 0, &Header, sizeof(Header));
+            if (   RT_SUCCESS(rc)
+                && qcowHdrConvertToHostEndianess(&Header))
+            {
+                *penmType = VDTYPE_HDD;
+                rc = VINF_SUCCESS;
+            }
+            else
+                rc = VERR_VD_GEN_INVALID_HEADER;
         }
         else
             rc = VERR_VD_GEN_INVALID_HEADER;
     }
-    else
-        rc = VERR_VD_GEN_INVALID_HEADER;
 
     if (pStorage)
         vdIfIoIntFileClose(pIfIo, pStorage);
@@ -1553,6 +1560,7 @@ static DECLCALLBACK(int) qcowCreate(const char *pszFilename, uint64_t cbSize,
                                     PVDINTERFACE pVDIfsOperation, VDTYPE enmType,
                                     void **ppBackendData)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pszFilename=\"%s\" cbSize=%llu uImageFlags=%#x pszComment=\"%s\" pPCHSGeometry=%#p pLCHSGeometry=%#p Uuid=%RTuuid uOpenFlags=%#x uPercentStart=%u uPercentSpan=%u pVDIfsDisk=%#p pVDIfsImage=%#p pVDIfsOperation=%#p enmType=%u ppBackendData=%#p",
                  pszFilename, cbSize, uImageFlags, pszComment, pPCHSGeometry, pLCHSGeometry, pUuid, uOpenFlags, uPercentStart, uPercentSpan, pVDIfsDisk, pVDIfsImage, pVDIfsOperation, enmType, ppBackendData));
     int rc;
@@ -1801,8 +1809,6 @@ static DECLCALLBACK(int) qcowWrite(void *pBackendData, uint64_t uOffset, size_t
 
             do
             {
-                uint64_t idxUpdateLe = 0;
-
                 /* Check if we have to allocate a new cluster for L2 tables. */
                 if (!pImage->paL1Table[idxL1])
                 {
@@ -2184,9 +2190,9 @@ out:
 }
 
 /** @copydoc VBOXHDDBACKEND::pfnGetComment */
-static DECLCALLBACK(int) qcowGetComment(void *pBackendData, char *pszComment,
-                          size_t cbComment)
+static DECLCALLBACK(int) qcowGetComment(void *pBackendData, char *pszComment, size_t cbComment)
 {
+    RT_NOREF2(pszComment, cbComment);
     LogFlowFunc(("pBackendData=%#p pszComment=%#p cbComment=%zu\n", pBackendData, pszComment, cbComment));
     PQCOWIMAGE pImage = (PQCOWIMAGE)pBackendData;
     int rc;
@@ -2205,6 +2211,7 @@ static DECLCALLBACK(int) qcowGetComment(void *pBackendData, char *pszComment,
 /** @copydoc VBOXHDDBACKEND::pfnSetComment */
 static DECLCALLBACK(int) qcowSetComment(void *pBackendData, const char *pszComment)
 {
+    RT_NOREF1(pszComment);
     LogFlowFunc(("pBackendData=%#p pszComment=\"%s\"\n", pBackendData, pszComment));
     PQCOWIMAGE pImage = (PQCOWIMAGE)pBackendData;
     int rc;
@@ -2228,6 +2235,7 @@ static DECLCALLBACK(int) qcowSetComment(void *pBackendData, const char *pszComme
 /** @copydoc VBOXHDDBACKEND::pfnGetUuid */
 static DECLCALLBACK(int) qcowGetUuid(void *pBackendData, PRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
     PQCOWIMAGE pImage = (PQCOWIMAGE)pBackendData;
     int rc;
@@ -2246,6 +2254,7 @@ static DECLCALLBACK(int) qcowGetUuid(void *pBackendData, PRTUUID pUuid)
 /** @copydoc VBOXHDDBACKEND::pfnSetUuid */
 static DECLCALLBACK(int) qcowSetUuid(void *pBackendData, PCRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
     PQCOWIMAGE pImage = (PQCOWIMAGE)pBackendData;
     int rc;
@@ -2270,6 +2279,7 @@ static DECLCALLBACK(int) qcowSetUuid(void *pBackendData, PCRTUUID pUuid)
 /** @copydoc VBOXHDDBACKEND::pfnGetModificationUuid */
 static DECLCALLBACK(int) qcowGetModificationUuid(void *pBackendData, PRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
     PQCOWIMAGE pImage = (PQCOWIMAGE)pBackendData;
     int rc;
@@ -2288,6 +2298,7 @@ static DECLCALLBACK(int) qcowGetModificationUuid(void *pBackendData, PRTUUID pUu
 /** @copydoc VBOXHDDBACKEND::pfnSetModificationUuid */
 static DECLCALLBACK(int) qcowSetModificationUuid(void *pBackendData, PCRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
     PQCOWIMAGE pImage = (PQCOWIMAGE)pBackendData;
     int rc;
@@ -2311,6 +2322,7 @@ static DECLCALLBACK(int) qcowSetModificationUuid(void *pBackendData, PCRTUUID pU
 /** @copydoc VBOXHDDBACKEND::pfnGetParentUuid */
 static DECLCALLBACK(int) qcowGetParentUuid(void *pBackendData, PRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
     PQCOWIMAGE pImage = (PQCOWIMAGE)pBackendData;
     int rc;
@@ -2329,6 +2341,7 @@ static DECLCALLBACK(int) qcowGetParentUuid(void *pBackendData, PRTUUID pUuid)
 /** @copydoc VBOXHDDBACKEND::pfnSetParentUuid */
 static DECLCALLBACK(int) qcowSetParentUuid(void *pBackendData, PCRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
     PQCOWIMAGE pImage = (PQCOWIMAGE)pBackendData;
     int rc;
@@ -2352,6 +2365,7 @@ static DECLCALLBACK(int) qcowSetParentUuid(void *pBackendData, PCRTUUID pUuid)
 /** @copydoc VBOXHDDBACKEND::pfnGetParentModificationUuid */
 static DECLCALLBACK(int) qcowGetParentModificationUuid(void *pBackendData, PRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
     PQCOWIMAGE pImage = (PQCOWIMAGE)pBackendData;
     int rc;
@@ -2370,6 +2384,7 @@ static DECLCALLBACK(int) qcowGetParentModificationUuid(void *pBackendData, PRTUU
 /** @copydoc VBOXHDDBACKEND::pfnSetParentModificationUuid */
 static DECLCALLBACK(int) qcowSetParentModificationUuid(void *pBackendData, PCRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
     PQCOWIMAGE pImage = (PQCOWIMAGE)pBackendData;
     int rc;
diff --git a/src/VBox/Storage/QED.cpp b/src/VBox/Storage/QED.cpp
index f6f577f..3e85f65 100644
--- a/src/VBox/Storage/QED.cpp
+++ b/src/VBox/Storage/QED.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -344,6 +344,7 @@ static void qedTableConvertToHostEndianess(uint64_t *paTbl, uint32_t cEntries)
     }
 }
 
+#if defined(RT_BIG_ENDIAN)
 /**
  * Convert table entries from host to little endian format.
  *
@@ -362,6 +363,7 @@ static void qedTableConvertFromHostEndianess(uint64_t *paTblImg, uint64_t *paTbl
         paTblImg++;
     }
 }
+#endif
 
 /**
  * Creates the L2 table cache.
@@ -453,7 +455,6 @@ static void qedL2TblCacheEntryRelease(PQEDL2CACHEENTRY pL2Entry)
 static PQEDL2CACHEENTRY qedL2TblCacheEntryAlloc(PQEDIMAGE pImage)
 {
     PQEDL2CACHEENTRY pL2Entry = NULL;
-    int rc = VINF_SUCCESS;
 
     if (pImage->cbL2Cache + pImage->cbTable <= QED_L2_CACHE_MEMORY_MAX)
     {
@@ -560,6 +561,7 @@ static void qedL2TblCacheEntryInsert(PQEDIMAGE pImage, PQEDL2CACHEENTRY pL2Entry
     }
 }
 
+#if 0 /* unused */
 /**
  * Fetches the L2 from the given offset trying the LRU cache first and
  * reading it from the image after a cache miss.
@@ -611,6 +613,7 @@ static int qedL2TblCacheFetch(PQEDIMAGE pImage, uint64_t offL2Tbl, PQEDL2CACHEEN
     LogFlowFunc(("returns rc=%Rrc\n", rc));
     return rc;
 }
+#endif
 
 /**
  * Fetches the L2 from the given offset trying the LRU cache first and
@@ -1318,6 +1321,7 @@ static int qedCreateImage(PQEDIMAGE pImage, uint64_t cbSize,
                           PFNVDPROGRESS pfnProgress, void *pvUser,
                           unsigned uPercentStart, unsigned uPercentSpan)
 {
+    RT_NOREF1(pszComment);
     int rc;
     int32_t fOpen;
 
@@ -1397,6 +1401,7 @@ out:
  */
 static int qedAsyncClusterAllocRollback(PQEDIMAGE pImage, PVDIOCTX pIoCtx, PQEDCLUSTERASYNCALLOC pClusterAlloc)
 {
+    RT_NOREF1(pIoCtx);
     int rc = VINF_SUCCESS;
 
     switch (pClusterAlloc->enmAllocState)
@@ -1536,6 +1541,7 @@ static DECLCALLBACK(int) qedAsyncClusterAllocUpdate(void *pBackendData, PVDIOCTX
 static DECLCALLBACK(int) qedCheckIfValid(const char *pszFilename, PVDINTERFACE pVDIfsDisk,
                                          PVDINTERFACE pVDIfsImage, VDTYPE *penmType)
 {
+    RT_NOREF1(pVDIfsDisk);
     LogFlowFunc(("pszFilename=\"%s\" pVDIfsDisk=%#p pVDIfsImage=%#p\n", pszFilename, pVDIfsDisk, pVDIfsImage));
     PVDIOSTORAGE pStorage = NULL;
     uint64_t cbFile;
@@ -1560,25 +1566,26 @@ static DECLCALLBACK(int) qedCheckIfValid(const char *pszFilename, PVDINTERFACE p
                                                       false /* fCreate */),
                            &pStorage);
     if (RT_SUCCESS(rc))
-        rc = vdIfIoIntFileGetSize(pIfIo, pStorage, &cbFile);
-
-    if (   RT_SUCCESS(rc)
-        && cbFile > sizeof(QedHeader))
     {
-        QedHeader Header;
-
-        rc = vdIfIoIntFileReadSync(pIfIo, pStorage, 0, &Header, sizeof(Header));
+        rc = vdIfIoIntFileGetSize(pIfIo, pStorage, &cbFile);
         if (   RT_SUCCESS(rc)
-            && qedHdrConvertToHostEndianess(&Header))
+            && cbFile > sizeof(QedHeader))
         {
-            *penmType = VDTYPE_HDD;
-            rc = VINF_SUCCESS;
+            QedHeader Header;
+
+            rc = vdIfIoIntFileReadSync(pIfIo, pStorage, 0, &Header, sizeof(Header));
+            if (   RT_SUCCESS(rc)
+                && qedHdrConvertToHostEndianess(&Header))
+            {
+                *penmType = VDTYPE_HDD;
+                rc = VINF_SUCCESS;
+            }
+            else
+                rc = VERR_VD_GEN_INVALID_HEADER;
         }
         else
             rc = VERR_VD_GEN_INVALID_HEADER;
     }
-    else
-        rc = VERR_VD_GEN_INVALID_HEADER;
 
     if (pStorage)
         vdIfIoIntFileClose(pIfIo, pStorage);
@@ -1647,6 +1654,7 @@ static DECLCALLBACK(int) qedCreate(const char *pszFilename, uint64_t cbSize,
                                    PVDINTERFACE pVDIfsOperation, VDTYPE enmType,
                                    void **ppBackendData)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pszFilename=\"%s\" cbSize=%llu uImageFlags=%#x pszComment=\"%s\" pPCHSGeometry=%#p pLCHSGeometry=%#p Uuid=%RTuuid uOpenFlags=%#x uPercentStart=%u uPercentSpan=%u pVDIfsDisk=%#p pVDIfsImage=%#p pVDIfsOperation=%#p enmType=%d ppBackendData=%#p",
                  pszFilename, cbSize, uImageFlags, pszComment, pPCHSGeometry, pLCHSGeometry, pUuid, uOpenFlags, uPercentStart, uPercentSpan, pVDIfsDisk, pVDIfsImage, pVDIfsOperation, enmType, ppBackendData));
     int rc;
@@ -1895,8 +1903,6 @@ static DECLCALLBACK(int) qedWrite(void *pBackendData, uint64_t uOffset, size_t c
 
             do
             {
-                uint64_t idxUpdateLe = 0;
-
                 /* Check if we have to allocate a new cluster for L2 tables. */
                 if (!pImage->paL1Table[idxL1])
                 {
@@ -2282,6 +2288,7 @@ out:
 static DECLCALLBACK(int) qedGetComment(void *pBackendData, char *pszComment,
                                        size_t cbComment)
 {
+    RT_NOREF2(pszComment, cbComment);
     LogFlowFunc(("pBackendData=%#p pszComment=%#p cbComment=%zu\n", pBackendData, pszComment, cbComment));
     PQEDIMAGE pImage = (PQEDIMAGE)pBackendData;
     int rc;
@@ -2300,6 +2307,7 @@ static DECLCALLBACK(int) qedGetComment(void *pBackendData, char *pszComment,
 /** @copydoc VBOXHDDBACKEND::pfnSetComment */
 static DECLCALLBACK(int) qedSetComment(void *pBackendData, const char *pszComment)
 {
+    RT_NOREF1(pszComment);
     LogFlowFunc(("pBackendData=%#p pszComment=\"%s\"\n", pBackendData, pszComment));
     PQEDIMAGE pImage = (PQEDIMAGE)pBackendData;
     int rc;
@@ -2323,6 +2331,7 @@ static DECLCALLBACK(int) qedSetComment(void *pBackendData, const char *pszCommen
 /** @copydoc VBOXHDDBACKEND::pfnGetUuid */
 static DECLCALLBACK(int) qedGetUuid(void *pBackendData, PRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
     PQEDIMAGE pImage = (PQEDIMAGE)pBackendData;
     int rc;
@@ -2341,6 +2350,7 @@ static DECLCALLBACK(int) qedGetUuid(void *pBackendData, PRTUUID pUuid)
 /** @copydoc VBOXHDDBACKEND::pfnSetUuid */
 static DECLCALLBACK(int) qedSetUuid(void *pBackendData, PCRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
     PQEDIMAGE pImage = (PQEDIMAGE)pBackendData;
     int rc;
@@ -2365,6 +2375,7 @@ static DECLCALLBACK(int) qedSetUuid(void *pBackendData, PCRTUUID pUuid)
 /** @copydoc VBOXHDDBACKEND::pfnGetModificationUuid */
 static DECLCALLBACK(int) qedGetModificationUuid(void *pBackendData, PRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
     PQEDIMAGE pImage = (PQEDIMAGE)pBackendData;
     int rc;
@@ -2383,6 +2394,7 @@ static DECLCALLBACK(int) qedGetModificationUuid(void *pBackendData, PRTUUID pUui
 /** @copydoc VBOXHDDBACKEND::pfnSetModificationUuid */
 static DECLCALLBACK(int) qedSetModificationUuid(void *pBackendData, PCRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
     PQEDIMAGE pImage = (PQEDIMAGE)pBackendData;
     int rc;
@@ -2406,6 +2418,7 @@ static DECLCALLBACK(int) qedSetModificationUuid(void *pBackendData, PCRTUUID pUu
 /** @copydoc VBOXHDDBACKEND::pfnGetParentUuid */
 static DECLCALLBACK(int) qedGetParentUuid(void *pBackendData, PRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
     PQEDIMAGE pImage = (PQEDIMAGE)pBackendData;
     int rc;
@@ -2424,6 +2437,7 @@ static DECLCALLBACK(int) qedGetParentUuid(void *pBackendData, PRTUUID pUuid)
 /** @copydoc VBOXHDDBACKEND::pfnSetParentUuid */
 static DECLCALLBACK(int) qedSetParentUuid(void *pBackendData, PCRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
     PQEDIMAGE pImage = (PQEDIMAGE)pBackendData;
     int rc;
@@ -2447,6 +2461,7 @@ static DECLCALLBACK(int) qedSetParentUuid(void *pBackendData, PCRTUUID pUuid)
 /** @copydoc VBOXHDDBACKEND::pfnGetParentModificationUuid */
 static DECLCALLBACK(int) qedGetParentModificationUuid(void *pBackendData, PRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
     PQEDIMAGE pImage = (PQEDIMAGE)pBackendData;
     int rc;
@@ -2465,6 +2480,7 @@ static DECLCALLBACK(int) qedGetParentModificationUuid(void *pBackendData, PRTUUI
 /** @copydoc VBOXHDDBACKEND::pfnSetParentModificationUuid */
 static DECLCALLBACK(int) qedSetParentModificationUuid(void *pBackendData, PCRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
     PQEDIMAGE pImage = (PQEDIMAGE)pBackendData;
     int rc;
@@ -2576,11 +2592,10 @@ static DECLCALLBACK(int) qedResize(void *pBackendData, uint64_t cbSize,
                                    PVDINTERFACE pVDIfsDisk, PVDINTERFACE pVDIfsImage,
                                    PVDINTERFACE pVDIfsOperation)
 {
+    RT_NOREF7(pPCHSGeometry, pLCHSGeometry, uPercentStart, uPercentSpan, pVDIfsDisk, pVDIfsImage, pVDIfsOperation);
     PQEDIMAGE pImage = (PQEDIMAGE)pBackendData;
     int rc = VINF_SUCCESS;
 
-    PVDINTERFACEPROGRESS pIfProgress = VDIfProgressGet(pVDIfsOperation);
-
     /* Making the image smaller is not supported at the moment. */
     if (cbSize < pImage->cbSize)
         rc = VERR_NOT_SUPPORTED;
diff --git a/src/VBox/Storage/RAW.cpp b/src/VBox/Storage/RAW.cpp
index 4f02a0b..bd65fac 100644
--- a/src/VBox/Storage/RAW.cpp
+++ b/src/VBox/Storage/RAW.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -233,6 +233,7 @@ static int rawCreateImage(PRAWIMAGE pImage, uint64_t cbSize,
                           PFNVDPROGRESS pfnProgress, void *pvUser,
                           unsigned uPercentStart, unsigned uPercentSpan)
 {
+    RT_NOREF1(pszComment);
     int rc;
     RTFOFF cbFree = 0;
     int32_t fOpen;
@@ -306,6 +307,7 @@ out:
 static DECLCALLBACK(int) rawCheckIfValid(const char *pszFilename, PVDINTERFACE pVDIfsDisk,
                                          PVDINTERFACE pVDIfsImage, VDTYPE *penmType)
 {
+    RT_NOREF1(pVDIfsDisk);
     LogFlowFunc(("pszFilename=\"%s\" pVDIfsDisk=%#p pVDIfsImage=%#p\n", pszFilename, pVDIfsDisk, pVDIfsImage));
     PVDIOSTORAGE pStorage = NULL;
     uint64_t cbFile;
@@ -332,50 +334,52 @@ static DECLCALLBACK(int) rawCheckIfValid(const char *pszFilename, PVDINTERFACE p
                                                       false /* fCreate */),
                            &pStorage);
     if (RT_SUCCESS(rc))
+    {
         rc = vdIfIoIntFileGetSize(pIfIo, pStorage, &cbFile);
 
-    /* Try to guess the image type based on the extension. */
-    if (   RT_SUCCESS(rc)
-        && pszSuffix)
-    {
-        if (   !RTStrICmp(pszSuffix, ".iso")
-            || !RTStrICmp(pszSuffix, ".cdr")) /* DVD images. */
+        /* Try to guess the image type based on the extension. */
+        if (   RT_SUCCESS(rc)
+            && pszSuffix)
         {
-            /* Note that there are ISO images smaller than 1 MB; it is impossible to distinguish
-             * between raw floppy and CD images based on their size (and cannot be reliably done
-             * based on contents, either).
-             */
-            if (cbFile % 2048)
-                rc = VERR_VD_RAW_SIZE_MODULO_2048;
-            else if (cbFile <= 32768)
-                rc = VERR_VD_RAW_SIZE_OPTICAL_TOO_SMALL;
-            else
+            if (   !RTStrICmp(pszSuffix, ".iso")
+                || !RTStrICmp(pszSuffix, ".cdr")) /* DVD images. */
             {
-                *penmType = VDTYPE_DVD;
-                rc = VINF_SUCCESS;
+                /* Note that there are ISO images smaller than 1 MB; it is impossible to distinguish
+                 * between raw floppy and CD images based on their size (and cannot be reliably done
+                 * based on contents, either).
+                 */
+                if (cbFile % 2048)
+                    rc = VERR_VD_RAW_SIZE_MODULO_2048;
+                else if (cbFile <= 32768)
+                    rc = VERR_VD_RAW_SIZE_OPTICAL_TOO_SMALL;
+                else
+                {
+                    *penmType = VDTYPE_DVD;
+                    rc = VINF_SUCCESS;
+                }
             }
-        }
-        else if (   !RTStrICmp(pszSuffix, ".img")
-                 || !RTStrICmp(pszSuffix, ".ima")
-                 || !RTStrICmp(pszSuffix, ".dsk")
-                 || !RTStrICmp(pszSuffix, ".flp")
-                 || !RTStrICmp(pszSuffix, ".vfd")) /* Floppy images */
-        {
-            if (cbFile % 512)
-                rc = VERR_VD_RAW_SIZE_MODULO_512;
-            else if (cbFile > RAW_MAX_FLOPPY_IMG_SIZE)
-                rc = VERR_VD_RAW_SIZE_FLOPPY_TOO_BIG;
-            else
+            else if (   !RTStrICmp(pszSuffix, ".img")
+                     || !RTStrICmp(pszSuffix, ".ima")
+                     || !RTStrICmp(pszSuffix, ".dsk")
+                     || !RTStrICmp(pszSuffix, ".flp")
+                     || !RTStrICmp(pszSuffix, ".vfd")) /* Floppy images */
             {
-                *penmType = VDTYPE_FLOPPY;
-                rc = VINF_SUCCESS;
+                if (cbFile % 512)
+                    rc = VERR_VD_RAW_SIZE_MODULO_512;
+                else if (cbFile > RAW_MAX_FLOPPY_IMG_SIZE)
+                    rc = VERR_VD_RAW_SIZE_FLOPPY_TOO_BIG;
+                else
+                {
+                    *penmType = VDTYPE_FLOPPY;
+                    rc = VINF_SUCCESS;
+                }
             }
+            else
+                rc = VERR_VD_RAW_INVALID_HEADER;
         }
         else
             rc = VERR_VD_RAW_INVALID_HEADER;
     }
-    else
-        rc = VERR_VD_RAW_INVALID_HEADER;
 
     if (pStorage)
         vdIfIoIntFileClose(pIfIo, pStorage);
@@ -450,6 +454,7 @@ static DECLCALLBACK(int) rawCreate(const char *pszFilename, uint64_t cbSize,
                                    PVDINTERFACE pVDIfsOperation, VDTYPE enmType,
                                    void **ppBackendData)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pszFilename=\"%s\" cbSize=%llu uImageFlags=%#x pszComment=\"%s\" pPCHSGeometry=%#p pLCHSGeometry=%#p Uuid=%RTuuid uOpenFlags=%#x uPercentStart=%u uPercentSpan=%u pVDIfsDisk=%#p pVDIfsImage=%#p pVDIfsOperation=%#p enmType=%u ppBackendData=%#p",
                  pszFilename, cbSize, uImageFlags, pszComment, pPCHSGeometry, pLCHSGeometry, pUuid, uOpenFlags, uPercentStart, uPercentSpan, pVDIfsDisk, pVDIfsImage, pVDIfsOperation, enmType, ppBackendData));
     int rc;
@@ -618,6 +623,7 @@ static DECLCALLBACK(int) rawWrite(void *pBackendData, uint64_t uOffset, size_t c
                                   PVDIOCTX pIoCtx, size_t *pcbWriteProcess, size_t *pcbPreRead,
                                   size_t *pcbPostRead, unsigned fWrite)
 {
+    RT_NOREF1(fWrite);
     int rc = VINF_SUCCESS;
     PRAWIMAGE pImage = (PRAWIMAGE)pBackendData;
 
@@ -906,6 +912,7 @@ out:
 static DECLCALLBACK(int) rawGetComment(void *pBackendData, char *pszComment,
                                        size_t cbComment)
 {
+    RT_NOREF2(pszComment, cbComment);
     LogFlowFunc(("pBackendData=%#p pszComment=%#p cbComment=%zu\n", pBackendData, pszComment, cbComment));
     PRAWIMAGE pImage = (PRAWIMAGE)pBackendData;
     int rc;
@@ -924,6 +931,7 @@ static DECLCALLBACK(int) rawGetComment(void *pBackendData, char *pszComment,
 /** @copydoc VBOXHDDBACKEND::pfnSetComment */
 static DECLCALLBACK(int) rawSetComment(void *pBackendData, const char *pszComment)
 {
+    RT_NOREF1(pszComment);
     LogFlowFunc(("pBackendData=%#p pszComment=\"%s\"\n", pBackendData, pszComment));
     PRAWIMAGE pImage = (PRAWIMAGE)pBackendData;
     int rc;
@@ -947,6 +955,7 @@ static DECLCALLBACK(int) rawSetComment(void *pBackendData, const char *pszCommen
 /** @copydoc VBOXHDDBACKEND::pfnGetUuid */
 static DECLCALLBACK(int) rawGetUuid(void *pBackendData, PRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
     PRAWIMAGE pImage = (PRAWIMAGE)pBackendData;
     int rc;
@@ -965,6 +974,7 @@ static DECLCALLBACK(int) rawGetUuid(void *pBackendData, PRTUUID pUuid)
 /** @copydoc VBOXHDDBACKEND::pfnSetUuid */
 static DECLCALLBACK(int) rawSetUuid(void *pBackendData, PCRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
     PRAWIMAGE pImage = (PRAWIMAGE)pBackendData;
     int rc;
@@ -989,6 +999,7 @@ static DECLCALLBACK(int) rawSetUuid(void *pBackendData, PCRTUUID pUuid)
 /** @copydoc VBOXHDDBACKEND::pfnGetModificationUuid */
 static DECLCALLBACK(int) rawGetModificationUuid(void *pBackendData, PRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
     PRAWIMAGE pImage = (PRAWIMAGE)pBackendData;
     int rc;
@@ -1007,6 +1018,7 @@ static DECLCALLBACK(int) rawGetModificationUuid(void *pBackendData, PRTUUID pUui
 /** @copydoc VBOXHDDBACKEND::pfnSetModificationUuid */
 static DECLCALLBACK(int) rawSetModificationUuid(void *pBackendData, PCRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
     PRAWIMAGE pImage = (PRAWIMAGE)pBackendData;
     int rc;
@@ -1030,6 +1042,7 @@ static DECLCALLBACK(int) rawSetModificationUuid(void *pBackendData, PCRTUUID pUu
 /** @copydoc VBOXHDDBACKEND::pfnGetParentUuid */
 static DECLCALLBACK(int) rawGetParentUuid(void *pBackendData, PRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
     PRAWIMAGE pImage = (PRAWIMAGE)pBackendData;
     int rc;
@@ -1048,6 +1061,7 @@ static DECLCALLBACK(int) rawGetParentUuid(void *pBackendData, PRTUUID pUuid)
 /** @copydoc VBOXHDDBACKEND::pfnSetParentUuid */
 static DECLCALLBACK(int) rawSetParentUuid(void *pBackendData, PCRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
     PRAWIMAGE pImage = (PRAWIMAGE)pBackendData;
     int rc;
@@ -1071,6 +1085,7 @@ static DECLCALLBACK(int) rawSetParentUuid(void *pBackendData, PCRTUUID pUuid)
 /** @copydoc VBOXHDDBACKEND::pfnGetParentModificationUuid */
 static DECLCALLBACK(int) rawGetParentModificationUuid(void *pBackendData, PRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
     PRAWIMAGE pImage = (PRAWIMAGE)pBackendData;
     int rc;
@@ -1089,6 +1104,7 @@ static DECLCALLBACK(int) rawGetParentModificationUuid(void *pBackendData, PRTUUI
 /** @copydoc VBOXHDDBACKEND::pfnSetParentModificationUuid */
 static DECLCALLBACK(int) rawSetParentModificationUuid(void *pBackendData, PCRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
     PRAWIMAGE pImage = (PRAWIMAGE)pBackendData;
     int rc;
diff --git a/src/VBox/Storage/VCICache.cpp b/src/VBox/Storage/VCICache.cpp
index dd514b8..db47f7c 100644
--- a/src/VBox/Storage/VCICache.cpp
+++ b/src/VBox/Storage/VCICache.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -492,6 +492,7 @@ static int vciBlkMapCreate(uint64_t cBlocks, PVCIBLKMAP *ppBlkMap, uint32_t *pcB
     return rc;
 }
 
+#if 0 /** @todo unsued vciBlkMapDestroy */
 /**
  * Frees a block map.
  *
@@ -517,6 +518,7 @@ static void vciBlkMapDestroy(PVCIBLKMAP pBlkMap)
 
     LogFlowFunc(("returns\n"));
 }
+#endif
 
 /**
  * Loads the block map from the specified medium and creates all necessary
@@ -567,8 +569,6 @@ static int vciBlkMapLoad(PVCICACHE pStorage, uint64_t offBlkMap, uint32_t cBlkMa
                     pBlkMap->cBlocksAllocData = BlkMap.cBlocksAllocData;
 
                     /* Load the bitmap and construct the range list. */
-                    uint32_t cBlocksFree = 0;
-                    uint32_t cBlocksAllocated = 0;
                     PVCIBLKRANGEDESC pRangeCur = (PVCIBLKRANGEDESC)RTMemAllocZ(sizeof(VCIBLKRANGEDESC));
 
                     if (pRangeCur)
@@ -668,8 +668,8 @@ static int vciBlkMapLoad(PVCICACHE pStorage, uint64_t offBlkMap, uint32_t cBlkMa
                         LogFlowFunc(("return success\n"));
                         return VINF_SUCCESS;
                     }
-                    else
-                        RTMemFree(pBlkMap);
+
+                    RTMemFree(pBlkMap);
                 }
                 else
                     rc = VERR_NO_MEMORY;
@@ -770,12 +770,13 @@ static int vciBlkMapSave(PVCIBLKMAP pBlkMap, PVCICACHE pStorage, uint64_t offBlk
         }
     }
     else
-        rc = VERR_INTERNAL_ERROR; /* @todo Better error code. */
+        rc = VERR_INTERNAL_ERROR; /** @todo Better error code. */
 
     LogFlowFunc(("returns rc=%Rrc\n", rc));
     return rc;
 }
 
+#if 0 /* unused */
 /**
  * Finds the range block describing the given block address.
  *
@@ -793,6 +794,7 @@ static PVCIBLKRANGEDESC vciBlkMapFindByBlock(PVCIBLKMAP pBlkMap, uint64_t offBlo
 
     return pBlk;
 }
+#endif
 
 /**
  * Allocates the given number of blocks in the bitmap and returns the start block address.
@@ -883,6 +885,7 @@ static int vciBlkMapAllocate(PVCIBLKMAP pBlkMap, uint32_t cBlocks, uint32_t fFla
     return rc;
 }
 
+#if 0 /* unused */
 /**
  * Try to extend the space of an already allocated block.
  *
@@ -901,11 +904,14 @@ static int vciBlkMapRealloc(PVCIBLKMAP pBlkMap, uint32_t cBlocksNew, uint64_t of
                  pBlkMap, cBlocksNew, offBlockAddrOld, poffBlockAddr));
 
     AssertMsgFailed(("Implement\n"));
+    RT_NOREF4(pBlkMap, cBlocksNew, offBlockAddrOld, poffBlockAddr);
 
     LogFlowFunc(("returns rc=%Rrc offBlockAddr=%llu\n", rc, *poffBlockAddr));
     return rc;
 }
+#endif /* unused */
 
+#if 0 /* unused */
 /**
  * Frees a range of blocks.
  *
@@ -987,6 +993,7 @@ static void vciBlkMapFree(PVCIBLKMAP pBlkMap, uint64_t offBlockAddr, uint32_t cB
 
     LogFlowFunc(("returns\n"));
 }
+#endif /* unused */
 
 /**
  * Converts a tree node from the image to the in memory structure.
@@ -1293,6 +1300,7 @@ static int vciCreateImage(PVCICACHE pCache, uint64_t cbSize,
                           void *pvUser, unsigned uPercentStart,
                           unsigned uPercentSpan)
 {
+    RT_NOREF1(pszComment);
     VciHdr Hdr;
     VciTreeNode NodeRoot;
     int rc;
@@ -1450,6 +1458,7 @@ static int vciCreateImage(PVCICACHE pCache, uint64_t cbSize,
 static DECLCALLBACK(int) vciProbe(const char *pszFilename, PVDINTERFACE pVDIfsCache,
                                   PVDINTERFACE pVDIfsImage)
 {
+    RT_NOREF1(pVDIfsCache);
     VciHdr Hdr;
     PVDIOSTORAGE pStorage = NULL;
     uint64_t cbFile;
@@ -1558,6 +1567,7 @@ static DECLCALLBACK(int) vciCreate(const char *pszFilename, uint64_t cbSize,
                                    PVDINTERFACE pVDIfsDisk, PVDINTERFACE pVDIfsImage,
                                    PVDINTERFACE pVDIfsOperation, void **ppBackendData)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pszFilename=\"%s\" cbSize=%llu uImageFlags=%#x pszComment=\"%s\" Uuid=%RTuuid uOpenFlags=%#x uPercentStart=%u uPercentSpan=%u pVDIfsDisk=%#p pVDIfsImage=%#p pVDIfsOperation=%#p ppBackendData=%#p",
                  pszFilename, cbSize, uImageFlags, pszComment, pUuid, uOpenFlags, uPercentStart, uPercentSpan, pVDIfsDisk, pVDIfsImage, pVDIfsOperation, ppBackendData));
     int rc;
@@ -1682,23 +1692,23 @@ static DECLCALLBACK(int) vciRead(void *pBackendData, uint64_t uOffset, size_t cb
 static DECLCALLBACK(int) vciWrite(void *pBackendData, uint64_t uOffset, size_t cbToWrite,
                                   PVDIOCTX pIoCtx, size_t *pcbWriteProcess)
 {
+    RT_NOREF5(pBackendData, uOffset, cbToWrite, pIoCtx, pcbWriteProcess);
     LogFlowFunc(("pBackendData=%#p uOffset=%llu cbToWrite=%zu pIoCtx=%#p pcbWriteProcess=%#p\n",
                  pBackendData, uOffset, cbToWrite, pIoCtx, pcbWriteProcess));
     PVCICACHE pCache = (PVCICACHE)pBackendData;
     int rc = VINF_SUCCESS;
     uint64_t cBlocksToWrite = VCI_BYTE2BLOCK(cbToWrite);
-    uint64_t offBlockAddr  = VCI_BYTE2BLOCK(uOffset);
+    //uint64_t offBlockAddr  = VCI_BYTE2BLOCK(uOffset);
 
-    AssertPtr(pCache);
+    AssertPtr(pCache); NOREF(pCache);
     Assert(uOffset % 512 == 0);
     Assert(cbToWrite % 512 == 0);
-
     while (cBlocksToWrite)
     {
 
     }
 
-    *pcbWriteProcess = cbToWrite; /** @todo: Implement. */
+    *pcbWriteProcess = cbToWrite; /** @todo Implement. */
 
     LogFlowFunc(("returns %Rrc\n", rc));
     return rc;
@@ -1707,11 +1717,11 @@ static DECLCALLBACK(int) vciWrite(void *pBackendData, uint64_t uOffset, size_t c
 /** @copydoc VDCACHEBACKEND::pfnFlush */
 static DECLCALLBACK(int) vciFlush(void *pBackendData, PVDIOCTX pIoCtx)
 {
+    RT_NOREF1(pIoCtx);
     LogFlowFunc(("pBackendData=%#p\n", pBackendData));
     PVCICACHE pCache = (PVCICACHE)pBackendData;
-    int rc = VINF_SUCCESS;
 
-    rc = vciFlushImage(pCache);
+    int rc = vciFlushImage(pCache);
     LogFlowFunc(("returns %Rrc\n", rc));
     return rc;
 }
@@ -1836,6 +1846,7 @@ out:
 static DECLCALLBACK(int) vciGetComment(void *pBackendData, char *pszComment,
                                        size_t cbComment)
 {
+    RT_NOREF2(pszComment, cbComment);
     LogFlowFunc(("pBackendData=%#p pszComment=%#p cbComment=%zu\n", pBackendData, pszComment, cbComment));
     PVCICACHE pCache = (PVCICACHE)pBackendData;
     int rc;
@@ -1854,6 +1865,7 @@ static DECLCALLBACK(int) vciGetComment(void *pBackendData, char *pszComment,
 /** @copydoc VDCACHEBACKEND::pfnSetComment */
 static DECLCALLBACK(int) vciSetComment(void *pBackendData, const char *pszComment)
 {
+    RT_NOREF1(pszComment);
     LogFlowFunc(("pBackendData=%#p pszComment=\"%s\"\n", pBackendData, pszComment));
     PVCICACHE pCache = (PVCICACHE)pBackendData;
     int rc;
@@ -1877,6 +1889,7 @@ static DECLCALLBACK(int) vciSetComment(void *pBackendData, const char *pszCommen
 /** @copydoc VDCACHEBACKEND::pfnGetUuid */
 static DECLCALLBACK(int) vciGetUuid(void *pBackendData, PRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
     PVCICACHE pCache = (PVCICACHE)pBackendData;
     int rc;
@@ -1895,6 +1908,7 @@ static DECLCALLBACK(int) vciGetUuid(void *pBackendData, PRTUUID pUuid)
 /** @copydoc VDCACHEBACKEND::pfnSetUuid */
 static DECLCALLBACK(int) vciSetUuid(void *pBackendData, PCRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
     PVCICACHE pCache = (PVCICACHE)pBackendData;
     int rc;
@@ -1919,6 +1933,7 @@ static DECLCALLBACK(int) vciSetUuid(void *pBackendData, PCRTUUID pUuid)
 /** @copydoc VDCACHEBACKEND::pfnGetModificationUuid */
 static DECLCALLBACK(int) vciGetModificationUuid(void *pBackendData, PRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
     PVCICACHE pCache = (PVCICACHE)pBackendData;
     int rc;
@@ -1937,6 +1952,7 @@ static DECLCALLBACK(int) vciGetModificationUuid(void *pBackendData, PRTUUID pUui
 /** @copydoc VDCACHEBACKEND::pfnSetModificationUuid */
 static DECLCALLBACK(int) vciSetModificationUuid(void *pBackendData, PCRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
     PVCICACHE pCache = (PVCICACHE)pBackendData;
     int rc;
diff --git a/src/VBox/Storage/VD.cpp b/src/VBox/Storage/VD.cpp
index f00e4a0..50e424f 100644
--- a/src/VBox/Storage/VD.cpp
+++ b/src/VBox/Storage/VD.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -61,7 +61,7 @@
 #define VD_IO_TASK_SEGMENTS_MAX 64
 
 /** Threshold after not recently used blocks are removed from the list. */
-#define VD_DISCARD_REMOVE_THRESHOLD (10 * _1M) /** @todo: experiment */
+#define VD_DISCARD_REMOVE_THRESHOLD (10 * _1M) /** @todo experiment */
 
 /**
  * VD async I/O interface storage descriptor.
@@ -301,7 +301,8 @@ struct VBOXHDD
 # define VD_IS_LOCKED(a_pDisk) \
     do \
     { \
-        AssertMsg(a_pDisk->fLocked, \
+        NOREF(a_pDisk); \
+        AssertMsg((a_pDisk)->fLocked, \
                   ("Lock not held\n"));\
     } while(0)
 
@@ -657,8 +658,10 @@ static PCVDCACHEBACKEND aStaticCacheBackends[] =
 static unsigned g_cFilterBackends = 0;
 /** Array of pointers to the filters backends. */
 static PCVDFILTERBACKEND *g_apFilterBackends = NULL;
+#ifndef VBOX_HDD_NO_DYNAMIC_BACKENDS
 /** Array of handles to the corresponding plugin. */
-static RTLDRMOD *g_ahFilterBackendPlugins = NULL;
+static PRTLDRMOD g_pahFilterBackendPlugins = NULL;
+#endif
 
 /** Forward declaration of the async discard helper. */
 static DECLCALLBACK(int) vdDiscardHelperAsync(PVDIOCTX pIoCtx);
@@ -690,6 +693,7 @@ static int vdAddBackends(RTLDRMOD hPlugin, PCVBOXHDDBACKEND *ppBackends, unsigne
     return VINF_SUCCESS;
 }
 
+#ifndef VBOX_HDD_NO_DYNAMIC_BACKENDS
 /**
  * internal: add single backend.
  */
@@ -697,6 +701,7 @@ DECLINLINE(int) vdAddBackend(RTLDRMOD hPlugin, PCVBOXHDDBACKEND pBackend)
 {
     return vdAddBackends(hPlugin, &pBackend, 1);
 }
+#endif
 
 /**
  * internal: add several cache backends.
@@ -721,6 +726,8 @@ static int vdAddCacheBackends(RTLDRMOD hPlugin, PCVDCACHEBACKEND *ppBackends, un
     return VINF_SUCCESS;
 }
 
+#ifndef VBOX_HDD_NO_DYNAMIC_BACKENDS
+
 /**
  * internal: add single cache backend.
  */
@@ -729,6 +736,7 @@ DECLINLINE(int) vdAddCacheBackend(RTLDRMOD hPlugin, PCVDCACHEBACKEND pBackend)
     return vdAddCacheBackends(hPlugin, &pBackend, 1);
 }
 
+
 /**
  * Add several filter backends.
  *
@@ -745,19 +753,20 @@ static int vdAddFilterBackends(RTLDRMOD hPlugin, PCVDFILTERBACKEND *ppBackends,
         return VERR_NO_MEMORY;
     g_apFilterBackends = pTmp;
 
-    RTLDRMOD *pTmpPlugins = (RTLDRMOD*)RTMemRealloc(g_ahFilterBackendPlugins,
-           (g_cFilterBackends + cBackends) * sizeof(RTLDRMOD));
+    PRTLDRMOD pTmpPlugins = (PRTLDRMOD)RTMemRealloc(g_pahFilterBackendPlugins,
+                                                    (g_cFilterBackends + cBackends) * sizeof(RTLDRMOD));
     if (RT_UNLIKELY(!pTmpPlugins))
         return VERR_NO_MEMORY;
 
-    g_ahFilterBackendPlugins = pTmpPlugins;
+    g_pahFilterBackendPlugins = pTmpPlugins;
     memcpy(&g_apFilterBackends[g_cFilterBackends], ppBackends, cBackends * sizeof(PCVDFILTERBACKEND));
     for (unsigned i = g_cFilterBackends; i < g_cFilterBackends + cBackends; i++)
-        g_ahFilterBackendPlugins[i] = hPlugin;
+        g_pahFilterBackendPlugins[i] = hPlugin;
     g_cFilterBackends += cBackends;
     return VINF_SUCCESS;
 }
 
+
 /**
  * Add a single filter backend to the list of supported filters.
  *
@@ -770,6 +779,8 @@ DECLINLINE(int) vdAddFilterBackend(RTLDRMOD hPlugin, PCVDFILTERBACKEND pBackend)
     return vdAddFilterBackends(hPlugin, &pBackend, 1);
 }
 
+#endif /* VBOX_HDD_NO_DYNAMIC_BACKENDS*/
+
 /**
  * internal: issue error message.
  */
@@ -1278,7 +1289,7 @@ static int vdDiscardRemoveBlocks(PVBOXHDD pDisk, PVDDISCARDSTATE pDiscard, size_
             break;
 
         PVDDISCARDBLOCK pBlockRemove = (PVDDISCARDBLOCK)RTAvlrU64RangeRemove(pDiscard->pTreeBlocks, pBlock->Core.Key);
-        Assert(pBlockRemove == pBlock);
+        Assert(pBlockRemove == pBlock); NOREF(pBlockRemove);
         RTListNodeRemove(&pBlock->NodeLru);
 
         pDiscard->cbDiscarding -= pBlock->cbDiscard;
@@ -1600,10 +1611,12 @@ static size_t vdIoCtxCopy(PVDIOCTX pIoCtxDst, PVDIOCTX pIoCtxSrc, size_t cbData)
     return RTSgBufCopy(&pIoCtxDst->Req.Io.SgBuf, &pIoCtxSrc->Req.Io.SgBuf, cbData);
 }
 
+#if 0 /* unused */
 static int vdIoCtxCmp(PVDIOCTX pIoCtx1, PVDIOCTX pIoCtx2, size_t cbData)
 {
     return RTSgBufCmp(&pIoCtx1->Req.Io.SgBuf, &pIoCtx2->Req.Io.SgBuf, cbData);
 }
+#endif
 
 static size_t vdIoCtxCopyTo(PVDIOCTX pIoCtx, const uint8_t *pbData, size_t cbData)
 {
@@ -1950,6 +1963,7 @@ static int vdIoCtxLockDisk(PVBOXHDD pDisk, PVDIOCTX pIoCtx)
 
 static void vdIoCtxUnlockDisk(PVBOXHDD pDisk, PVDIOCTX pIoCtx, bool fProcessBlockedReqs)
 {
+    RT_NOREF1(pIoCtx);
     LogFlowFunc(("pDisk=%#p pIoCtx=%#p fProcessBlockedReqs=%RTbool\n",
                  pDisk, pIoCtx, fProcessBlockedReqs));
 
@@ -1974,6 +1988,7 @@ static void vdIoCtxUnlockDisk(PVBOXHDD pDisk, PVDIOCTX pIoCtx, bool fProcessBloc
 static int vdDiskReadHelper(PVBOXHDD pDisk, PVDIMAGE pImage, PVDIMAGE pImageParentOverride,
                             uint64_t uOffset, size_t cbRead, PVDIOCTX pIoCtx, size_t *pcbThisRead)
 {
+    RT_NOREF1(pDisk);
     int rc = VINF_SUCCESS;
     size_t cbThisRead = cbRead;
 
@@ -2525,7 +2540,6 @@ static int vdCopyHelper(PVBOXHDD pDiskFrom, PVDIMAGE pImageFrom, PVBOXHDD pDiskT
 static DECLCALLBACK(int) vdSetModifiedHelperAsync(PVDIOCTX pIoCtx)
 {
     int rc = VINF_SUCCESS;
-    PVBOXHDD pDisk = pIoCtx->pDisk;
     PVDIMAGE pImage = pIoCtx->Req.Io.pImageCur;
 
     rc = pImage->Backend->pfnFlush(pImage->pBackendData, pIoCtx);
@@ -2618,7 +2632,6 @@ static DECLCALLBACK(int) vdWriteHelperCommitAsync(PVDIOCTX pIoCtx)
 static DECLCALLBACK(int) vdWriteHelperOptimizedCmpAndWriteAsync(PVDIOCTX pIoCtx)
 {
     int rc = VINF_SUCCESS;
-    PVDIMAGE pImage       = pIoCtx->Req.Io.pImageCur;
     size_t cbThisWrite    = 0;
     size_t cbPreRead      = pIoCtx->Type.Child.cbPreRead;
     size_t cbPostRead     = pIoCtx->Type.Child.cbPostRead;
@@ -3203,7 +3216,7 @@ static DECLCALLBACK(int) vdDiscardWholeBlockAsync(PVDIOCTX pIoCtx)
         || rc == VERR_VD_ASYNC_IO_IN_PROGRESS)
     {
         PVDDISCARDBLOCK pBlockRemove = (PVDDISCARDBLOCK)RTAvlrU64RangeRemove(pDiscard->pTreeBlocks, pBlock->Core.Key);
-        Assert(pBlockRemove == pBlock);
+        Assert(pBlockRemove == pBlock); RT_NOREF1(pBlockRemove);
 
         pDiscard->cbDiscarding -= pBlock->cbDiscard;
         RTListNodeRemove(&pBlock->NodeLru);
@@ -3291,7 +3304,7 @@ static int vdDiscardRemoveBlocksAsync(PVBOXHDD pDisk, PVDIOCTX pIoCtx, size_t cb
             break;
 
         PVDDISCARDBLOCK pBlockRemove = (PVDDISCARDBLOCK)RTAvlrU64RangeRemove(pDiscard->pTreeBlocks, pBlock->Core.Key);
-        Assert(pBlockRemove == pBlock);
+        Assert(pBlockRemove == pBlock); NOREF(pBlockRemove);
         RTListNodeRemove(&pBlock->NodeLru);
 
         pDiscard->cbDiscarding -= pBlock->cbDiscard;
@@ -3343,7 +3356,7 @@ static DECLCALLBACK(int) vdDiscardCurrentRangeAsync(PVDIOCTX pIoCtx)
             pBlock->cbDiscard    = cbPreAllocated + cbThisDiscard + cbPostAllocated;
             pBlock->pbmAllocated = pbmAllocated;
             bool fInserted = RTAvlrU64Insert(pDiscard->pTreeBlocks, &pBlock->Core);
-            Assert(fInserted);
+            Assert(fInserted); NOREF(fInserted);
 
             RTListPrepend(&pDiscard->ListLru, &pBlock->NodeLru);
             pDiscard->cbDiscarding += pBlock->cbDiscard;
@@ -3643,10 +3656,10 @@ static int vdRemovePlugin(const char *pszFilename)
     }
     for (unsigned i = 0; i < g_cFilterBackends; i++)
     {
-        while (i < g_cFilterBackends && g_ahFilterBackendPlugins[i] == pIt->hPlugin)
+        while (i < g_cFilterBackends && g_pahFilterBackendPlugins[i] == pIt->hPlugin)
         {
             memcpy(&g_apFilterBackends[i], &g_apFilterBackends[i + 1], (g_cFilterBackends - i - 1) * sizeof(PCVBOXHDDBACKEND));
-            memcpy(&g_ahFilterBackendPlugins[i], &g_ahFilterBackendPlugins[i + 1], (g_cFilterBackends - i - 1) * sizeof(RTLDRMOD));
+            memcpy(&g_pahFilterBackendPlugins[i], &g_pahFilterBackendPlugins[i + 1], (g_cFilterBackends - i - 1) * sizeof(RTLDRMOD));
             /** @todo for now skip reallocating, doesn't save much */
             g_cFilterBackends--;
         }
@@ -3713,6 +3726,7 @@ static int vdPluginLoadFromFilename(const char *pszFilename)
 
     return rc;
 #else
+    RT_NOREF1(pszFilename);
     return VERR_NOT_IMPLEMENTED;
 #endif
 }
@@ -3798,6 +3812,7 @@ out:
         RTDirClose(pPluginDir);
     return rc;
 #else
+    RT_NOREF1(pszPath);
     return VERR_NOT_IMPLEMENTED;
 #endif
 }
@@ -3805,7 +3820,7 @@ out:
 /**
  * internal: scans plugin directory and loads found plugins.
  */
-static int vdLoadDynamicBackends()
+static int vdLoadDynamicBackends(void)
 {
 #ifndef VBOX_HDD_NO_DYNAMIC_BACKENDS
     /*
@@ -3834,6 +3849,7 @@ static int vdPluginUnloadFromFilename(const char *pszFilename)
 #ifndef VBOX_HDD_NO_DYNAMIC_BACKENDS
     return vdRemovePlugin(pszFilename);
 #else
+    RT_NOREF1(pszFilename);
     return VERR_NOT_IMPLEMENTED;
 #endif
 }
@@ -3918,6 +3934,7 @@ out:
         RTDirClose(pPluginDir);
     return rc;
 #else
+    RT_NOREF1(pszPath);
     return VERR_NOT_IMPLEMENTED;
 #endif
 }
@@ -3929,6 +3946,7 @@ static DECLCALLBACK(int) vdIOOpenFallback(void *pvUser, const char *pszLocation,
                                           uint32_t fOpen, PFNVDCOMPLETED pfnCompleted,
                                           void **ppStorage)
 {
+    RT_NOREF1(pvUser);
     PVDIIOFALLBACKSTORAGE pStorage = (PVDIIOFALLBACKSTORAGE)RTMemAllocZ(sizeof(VDIIOFALLBACKSTORAGE));
 
     if (!pStorage)
@@ -3953,6 +3971,7 @@ static DECLCALLBACK(int) vdIOOpenFallback(void *pvUser, const char *pszLocation,
  */
 static DECLCALLBACK(int) vdIOCloseFallback(void *pvUser, void *pvStorage)
 {
+    RT_NOREF1(pvUser);
     PVDIIOFALLBACKSTORAGE pStorage = (PVDIIOFALLBACKSTORAGE)pvStorage;
 
     RTFileClose(pStorage->File);
@@ -3962,21 +3981,25 @@ static DECLCALLBACK(int) vdIOCloseFallback(void *pvUser, void *pvStorage)
 
 static DECLCALLBACK(int) vdIODeleteFallback(void *pvUser, const char *pcszFilename)
 {
+    RT_NOREF1(pvUser);
     return RTFileDelete(pcszFilename);
 }
 
 static DECLCALLBACK(int) vdIOMoveFallback(void *pvUser, const char *pcszSrc, const char *pcszDst, unsigned fMove)
 {
+    RT_NOREF1(pvUser);
     return RTFileMove(pcszSrc, pcszDst, fMove);
 }
 
 static DECLCALLBACK(int) vdIOGetFreeSpaceFallback(void *pvUser, const char *pcszFilename, int64_t *pcbFreeSpace)
 {
+    RT_NOREF1(pvUser);
     return RTFsQuerySizes(pcszFilename, NULL, pcbFreeSpace, NULL, NULL);
 }
 
 static DECLCALLBACK(int) vdIOGetModificationTimeFallback(void *pvUser, const char *pcszFilename, PRTTIMESPEC pModificationTime)
 {
+    RT_NOREF1(pvUser);
     RTFSOBJINFO info;
     int rc = RTPathQueryInfo(pcszFilename, &info, RTFSOBJATTRADD_NOTHING);
     if (RT_SUCCESS(rc))
@@ -3989,6 +4012,7 @@ static DECLCALLBACK(int) vdIOGetModificationTimeFallback(void *pvUser, const cha
  */
 static DECLCALLBACK(int) vdIOGetSizeFallback(void *pvUser, void *pvStorage, uint64_t *pcbSize)
 {
+    RT_NOREF1(pvUser);
     PVDIIOFALLBACKSTORAGE pStorage = (PVDIIOFALLBACKSTORAGE)pvStorage;
 
     return RTFileGetSize(pStorage->File, pcbSize);
@@ -3999,6 +4023,7 @@ static DECLCALLBACK(int) vdIOGetSizeFallback(void *pvUser, void *pvStorage, uint
  */
 static DECLCALLBACK(int) vdIOSetSizeFallback(void *pvUser, void *pvStorage, uint64_t cbSize)
 {
+    RT_NOREF1(pvUser);
     PVDIIOFALLBACKSTORAGE pStorage = (PVDIIOFALLBACKSTORAGE)pvStorage;
 
     return RTFileSetSize(pStorage->File, cbSize);
@@ -4010,6 +4035,7 @@ static DECLCALLBACK(int) vdIOSetSizeFallback(void *pvUser, void *pvStorage, uint
 static DECLCALLBACK(int) vdIOSetAllocationSizeFallback(void *pvUser, void *pvStorage, uint64_t cbSize,
                                                        uint32_t fFlags)
 {
+    RT_NOREF2(pvUser, fFlags);
     PVDIIOFALLBACKSTORAGE pStorage = (PVDIIOFALLBACKSTORAGE)pvStorage;
 
     return RTFileSetAllocationSize(pStorage->File, cbSize, RTFILE_ALLOC_SIZE_F_DEFAULT);
@@ -4019,8 +4045,9 @@ static DECLCALLBACK(int) vdIOSetAllocationSizeFallback(void *pvUser, void *pvSto
  * VD async I/O interface callback for a synchronous write to the file.
  */
 static DECLCALLBACK(int) vdIOWriteSyncFallback(void *pvUser, void *pvStorage, uint64_t uOffset,
-                              const void *pvBuf, size_t cbWrite, size_t *pcbWritten)
+                                               const void *pvBuf, size_t cbWrite, size_t *pcbWritten)
 {
+    RT_NOREF1(pvUser);
     PVDIIOFALLBACKSTORAGE pStorage = (PVDIIOFALLBACKSTORAGE)pvStorage;
 
     return RTFileWriteAt(pStorage->File, uOffset, pvBuf, cbWrite, pcbWritten);
@@ -4030,8 +4057,9 @@ static DECLCALLBACK(int) vdIOWriteSyncFallback(void *pvUser, void *pvStorage, ui
  * VD async I/O interface callback for a synchronous read from the file.
  */
 static DECLCALLBACK(int) vdIOReadSyncFallback(void *pvUser, void *pvStorage, uint64_t uOffset,
-                             void *pvBuf, size_t cbRead, size_t *pcbRead)
+                                              void *pvBuf, size_t cbRead, size_t *pcbRead)
 {
+    RT_NOREF1(pvUser);
     PVDIIOFALLBACKSTORAGE pStorage = (PVDIIOFALLBACKSTORAGE)pvStorage;
 
     return RTFileReadAt(pStorage->File, uOffset, pvBuf, cbRead, pcbRead);
@@ -4042,6 +4070,7 @@ static DECLCALLBACK(int) vdIOReadSyncFallback(void *pvUser, void *pvStorage, uin
  */
 static DECLCALLBACK(int) vdIOFlushSyncFallback(void *pvUser, void *pvStorage)
 {
+    RT_NOREF1(pvUser);
     PVDIIOFALLBACKSTORAGE pStorage = (PVDIIOFALLBACKSTORAGE)pvStorage;
 
     return RTFileFlush(pStorage->File);
@@ -4055,6 +4084,7 @@ static DECLCALLBACK(int) vdIOReadAsyncFallback(void *pvUser, void *pStorage, uin
                                                size_t cbRead, void *pvCompletion,
                                                void **ppTask)
 {
+    RT_NOREF8(pvUser, pStorage, uOffset, paSegments, cSegments, cbRead, pvCompletion, ppTask);
     return VERR_NOT_IMPLEMENTED;
 }
 
@@ -4066,6 +4096,7 @@ static DECLCALLBACK(int) vdIOWriteAsyncFallback(void *pvUser, void *pStorage, ui
                                                 size_t cbWrite, void *pvCompletion,
                                                 void **ppTask)
 {
+    RT_NOREF8(pvUser, pStorage, uOffset, paSegments, cSegments, cbWrite, pvCompletion, ppTask);
     return VERR_NOT_IMPLEMENTED;
 }
 
@@ -4075,6 +4106,7 @@ static DECLCALLBACK(int) vdIOWriteAsyncFallback(void *pvUser, void *pStorage, ui
 static DECLCALLBACK(int) vdIOFlushAsyncFallback(void *pvUser, void *pStorage,
                                                 void *pvCompletion, void **ppTask)
 {
+    RT_NOREF4(pvUser, pStorage, pvCompletion, ppTask);
     return VERR_NOT_IMPLEMENTED;
 }
 
@@ -4184,7 +4216,6 @@ static int vdUserXferCompleted(PVDIOSTORAGE pIoStorage, PVDIOCTX pIoCtx,
                                size_t cbTransfer, int rcReq)
 {
     int rc = VINF_SUCCESS;
-    bool fIoCtxContinue = true;
     PVBOXHDD pDisk = pIoCtx->pDisk;
 
     LogFlowFunc(("pIoStorage=%#p pIoCtx=%#p pfnComplete=%#p pvUser=%#p cbTransfer=%zu rcReq=%Rrc\n",
@@ -4265,7 +4296,7 @@ static int vdMetaXferCompleted(PVDIOSTORAGE pIoStorage, PFNVDXFERCOMPLETED pfnCo
             /* Remove from the AVL tree. */
             LogFlow(("Removing meta xfer=%#p\n", pMetaXfer));
             bool fRemoved = RTAvlrFileOffsetRemove(pIoStorage->pTreeMetaXfers, pMetaXfer->Core.Key) != NULL;
-            Assert(fRemoved);
+            Assert(fRemoved); NOREF(fRemoved);
             /* If this was a write check if there is a shadow buffer with updated data. */
             if (pMetaXfer->pbDataShw)
             {
@@ -4345,7 +4376,7 @@ static int vdMetaXferCompleted(PVDIOSTORAGE pIoStorage, PFNVDXFERCOMPLETED pfnCo
             /* Remove from the AVL tree. */
             LogFlow(("Removing meta xfer=%#p\n", pMetaXfer));
             bool fRemoved = RTAvlrFileOffsetRemove(pIoStorage->pTreeMetaXfers, pMetaXfer->Core.Key) != NULL;
-            Assert(fRemoved);
+            Assert(fRemoved); NOREF(fRemoved);
             RTMemFree(pMetaXfer);
         }
     }
@@ -4571,6 +4602,7 @@ static DECLCALLBACK(int) vdIOIntOpen(void *pvUser, const char *pszLocation,
 
 static DECLCALLBACK(int) vdIOIntTreeMetaXferDestroy(PAVLRFOFFNODECORE pNode, void *pvUser)
 {
+    RT_NOREF2(pNode, pvUser);
     AssertMsgFailed(("Tree should be empty at this point!\n"));
     return VINF_SUCCESS;
 }
@@ -4668,7 +4700,7 @@ static DECLCALLBACK(int) vdIOIntSetAllocationSize(void *pvUser, PVDIOSTORAGE pIo
                         size_t cbChunk = (size_t)RT_MIN(cbFill - uOff, cbBuf);
 
                         rc = pVDIo->pInterfaceIo->pfnWriteSync(pVDIo->pInterfaceIo->Core.pvUser,
-                                                               pIoStorage->pStorage, cbSizeCur + uOff, 
+                                                               pIoStorage->pStorage, cbSizeCur + uOff,
                                                                pvBuf, cbChunk, NULL);
                         if (RT_SUCCESS(rc))
                         {
@@ -4706,7 +4738,7 @@ static DECLCALLBACK(int) vdIOIntReadUser(void *pvUser, PVDIOSTORAGE pIoStorage,
     LogFlowFunc(("pvUser=%#p pIoStorage=%#p uOffset=%llu pIoCtx=%#p cbRead=%u\n",
                  pvUser, pIoStorage, uOffset, pIoCtx, cbRead));
 
-    /** @todo: Enable check for sync I/O later. */
+    /** @todo Enable check for sync I/O later. */
     if (!(pIoCtx->fFlags & VDIOCTX_FLAGS_SYNC))
         VD_IS_LOCKED(pDisk);
 
@@ -4804,7 +4836,7 @@ static DECLCALLBACK(int) vdIOIntWriteUser(void *pvUser, PVDIOSTORAGE pIoStorage,
     LogFlowFunc(("pvUser=%#p pIoStorage=%#p uOffset=%llu pIoCtx=%#p cbWrite=%u\n",
                  pvUser, pIoStorage, uOffset, pIoCtx, cbWrite));
 
-    /** @todo: Enable check for sync I/O later. */
+    /** @todo Enable check for sync I/O later. */
     if (!(pIoCtx->fFlags & VDIOCTX_FLAGS_SYNC))
         VD_IS_LOCKED(pDisk);
 
@@ -4914,7 +4946,7 @@ static DECLCALLBACK(int) vdIOIntReadMeta(void *pvUser, PVDIOSTORAGE pIoStorage,
                     ("A synchronous metadata read is requested but the parameters are wrong\n"),
                     VERR_INVALID_POINTER);
 
-    /** @todo: Enable check for sync I/O later. */
+    /** @todo Enable check for sync I/O later. */
     if (   pIoCtx
         && !(pIoCtx->fFlags & VDIOCTX_FLAGS_SYNC))
         VD_IS_LOCKED(pDisk);
@@ -4923,7 +4955,7 @@ static DECLCALLBACK(int) vdIOIntReadMeta(void *pvUser, PVDIOSTORAGE pIoStorage,
         || pIoCtx->fFlags & VDIOCTX_FLAGS_SYNC)
     {
         /* Handle synchronous metadata I/O. */
-        /** @todo: Integrate with metadata transfers below. */
+        /** @todo Integrate with metadata transfers below. */
         rc = pVDIo->pInterfaceIo->pfnReadSync(pVDIo->pInterfaceIo->Core.pvUser,
                                                pIoStorage->pStorage, uOffset,
                                                pvBuf, cbRead, NULL);
@@ -4965,7 +4997,7 @@ static DECLCALLBACK(int) vdIOIntReadMeta(void *pvUser, PVDIOSTORAGE pIoStorage,
             if (RT_SUCCESS(rc) || rc == VERR_VD_ASYNC_IO_IN_PROGRESS)
             {
                 bool fInserted = RTAvlrFileOffsetInsert(pIoStorage->pTreeMetaXfers, &pMetaXfer->Core);
-                Assert(fInserted);
+                Assert(fInserted); NOREF(fInserted);
             }
             else
                 RTMemFree(pMetaXfer);
@@ -5036,7 +5068,7 @@ static DECLCALLBACK(int) vdIOIntWriteMeta(void *pvUser, PVDIOSTORAGE pIoStorage,
                     ("A synchronous metadata write is requested but the parameters are wrong\n"),
                     VERR_INVALID_POINTER);
 
-    /** @todo: Enable check for sync I/O later. */
+    /** @todo Enable check for sync I/O later. */
     if (   pIoCtx
         && !(pIoCtx->fFlags & VDIOCTX_FLAGS_SYNC))
         VD_IS_LOCKED(pDisk);
@@ -5045,7 +5077,7 @@ static DECLCALLBACK(int) vdIOIntWriteMeta(void *pvUser, PVDIOSTORAGE pIoStorage,
         || pIoCtx->fFlags & VDIOCTX_FLAGS_SYNC)
     {
         /* Handle synchronous metadata I/O. */
-        /** @todo: Integrate with metadata transfers below. */
+        /** @todo Integrate with metadata transfers below. */
         rc = pVDIo->pInterfaceIo->pfnWriteSync(pVDIo->pInterfaceIo->Core.pvUser,
                                                pIoStorage->pStorage, uOffset,
                                                pvBuf, cbWrite, NULL);
@@ -5096,7 +5128,7 @@ static DECLCALLBACK(int) vdIOIntWriteMeta(void *pvUser, PVDIOSTORAGE pIoStorage,
                 {
                     LogFlow(("Removing meta xfer=%#p\n", pMetaXfer));
                     bool fRemoved = RTAvlrFileOffsetRemove(pIoStorage->pTreeMetaXfers, pMetaXfer->Core.Key) != NULL;
-                    AssertMsg(fRemoved, ("Metadata transfer wasn't removed\n"));
+                    AssertMsg(fRemoved, ("Metadata transfer wasn't removed\n")); NOREF(fRemoved);
                     RTMemFree(pMetaXfer);
                     pMetaXfer = NULL;
                 }
@@ -5112,7 +5144,7 @@ static DECLCALLBACK(int) vdIOIntWriteMeta(void *pvUser, PVDIOSTORAGE pIoStorage,
                 if (!fInTree)
                 {
                     bool fInserted = RTAvlrFileOffsetInsert(pIoStorage->pTreeMetaXfers, &pMetaXfer->Core);
-                    Assert(fInserted);
+                    Assert(fInserted); NOREF(fInserted);
                 }
 
                 RTListAppend(&pMetaXfer->ListIoCtxWaiting, &pDeferred->NodeDeferred);
@@ -5202,7 +5234,7 @@ static DECLCALLBACK(void) vdIOIntMetaXferRelease(void *pvUser, PVDMETAXFER pMeta
         /* Free the meta data entry. */
         LogFlow(("Removing meta xfer=%#p\n", pMetaXfer));
         bool fRemoved = RTAvlrFileOffsetRemove(pIoStorage->pTreeMetaXfers, pMetaXfer->Core.Key) != NULL;
-        AssertMsg(fRemoved, ("Metadata transfer wasn't removed\n"));
+        AssertMsg(fRemoved, ("Metadata transfer wasn't removed\n")); NOREF(fRemoved);
 
         RTMemFree(pMetaXfer);
     }
@@ -5226,7 +5258,7 @@ static DECLCALLBACK(int) vdIOIntFlush(void *pvUser, PVDIOSTORAGE pIoStorage, PVD
                     ("A synchronous metadata write is requested but the parameters are wrong\n"),
                     VERR_INVALID_POINTER);
 
-    /** @todo: Enable check for sync I/O later. */
+    /** @todo Enable check for sync I/O later. */
     if (   pIoCtx
         && !(pIoCtx->fFlags & VDIOCTX_FLAGS_SYNC))
         VD_IS_LOCKED(pDisk);
@@ -5238,7 +5270,7 @@ static DECLCALLBACK(int) vdIOIntFlush(void *pvUser, PVDIOSTORAGE pIoStorage, PVD
         || pIoCtx->fFlags & VDIOCTX_FLAGS_SYNC)
     {
         /* Handle synchronous flushes. */
-        /** @todo: Integrate with metadata transfers below. */
+        /** @todo Integrate with metadata transfers below. */
         rc = pVDIo->pInterfaceIo->pfnFlushSync(pVDIo->pInterfaceIo->Core.pvUser,
                                                pIoStorage->pStorage);
     }
@@ -5292,7 +5324,7 @@ static DECLCALLBACK(size_t) vdIOIntIoCtxCopyTo(void *pvUser, PVDIOCTX pIoCtx,
     PVBOXHDD pDisk = pVDIo->pDisk;
     size_t cbCopied = 0;
 
-    /** @todo: Enable check for sync I/O later. */
+    /** @todo Enable check for sync I/O later. */
     if (!(pIoCtx->fFlags & VDIOCTX_FLAGS_SYNC))
         VD_IS_LOCKED(pDisk);
 
@@ -5312,7 +5344,7 @@ static DECLCALLBACK(size_t) vdIOIntIoCtxCopyFrom(void *pvUser, PVDIOCTX pIoCtx,
     PVBOXHDD pDisk = pVDIo->pDisk;
     size_t cbCopied = 0;
 
-    /** @todo: Enable check for sync I/O later. */
+    /** @todo Enable check for sync I/O later. */
     if (!(pIoCtx->fFlags & VDIOCTX_FLAGS_SYNC))
         VD_IS_LOCKED(pDisk);
 
@@ -5331,7 +5363,7 @@ static DECLCALLBACK(size_t) vdIOIntIoCtxSet(void *pvUser, PVDIOCTX pIoCtx, int c
     PVBOXHDD pDisk = pVDIo->pDisk;
     size_t cbSet = 0;
 
-    /** @todo: Enable check for sync I/O later. */
+    /** @todo Enable check for sync I/O later. */
     if (!(pIoCtx->fFlags & VDIOCTX_FLAGS_SYNC))
         VD_IS_LOCKED(pDisk);
 
@@ -5352,12 +5384,14 @@ static DECLCALLBACK(size_t) vdIOIntIoCtxSegArrayCreate(void *pvUser, PVDIOCTX pI
     PVBOXHDD pDisk = pVDIo->pDisk;
     size_t cbCreated = 0;
 
-    /** @todo: It is possible that this gets called from a filter plugin
+    /** @todo It is possible that this gets called from a filter plugin
      * outside of the disk lock. Refine assertion or remove completely. */
 #if 0
-    /** @todo: Enable check for sync I/O later. */
+    /** @todo Enable check for sync I/O later. */
     if (!(pIoCtx->fFlags & VDIOCTX_FLAGS_SYNC))
         VD_IS_LOCKED(pDisk);
+#else
+    NOREF(pDisk);
 #endif
 
     cbCreated = RTSgBufSegArrayCreate(&pIoCtx->Req.Io.SgBuf, paSeg, pcSeg, cbData);
@@ -5424,6 +5458,7 @@ static DECLCALLBACK(bool) vdIOIntIoCtxIsZero(void *pvUser, PVDIOCTX pIoCtx, size
 
 static DECLCALLBACK(size_t) vdIOIntIoCtxGetDataUnitSize(void *pvUser, PVDIOCTX pIoCtx)
 {
+    RT_NOREF1(pIoCtx);
     PVDIO    pVDIo = (PVDIO)pvUser;
     PVBOXHDD pDisk = pVDIo->pDisk;
 
@@ -5564,6 +5599,7 @@ static DECLCALLBACK(int) vdIOIntReadMetaLimited(void *pvUser, PVDIOSTORAGE pStor
     return pInterfaceIo->pfnReadSync(NULL, pStorage->pStorage, uOffset, pvBuffer, cbBuffer, NULL);
 }
 
+#if 0 /* unsed */
 static int vdIOIntMetaXferReleaseLimited(void *pvUser, PVDMETAXFER pMetaXfer)
 {
     /* This is a NOP in this case. */
@@ -5571,6 +5607,7 @@ static int vdIOIntMetaXferReleaseLimited(void *pvUser, PVDMETAXFER pMetaXfer)
     NOREF(pMetaXfer);
     return VINF_SUCCESS;
 }
+#endif
 
 static DECLCALLBACK(int) vdIOIntFlushLimited(void *pvUser, PVDIOSTORAGE pStorage,
                                              PVDIOCTX pIoCtx,
@@ -5725,7 +5762,7 @@ static void vdIfIoIntCallbacksSetup(PVDINTERFACEIOINT pIfIoInt)
  */
 static DECLCALLBACK(void) vdIoCtxSyncComplete(void *pvUser1, void *pvUser2, int rcReq)
 {
-    PVBOXHDD pDisk = (PVBOXHDD)pvUser1;
+    RT_NOREF2(pvUser1, rcReq);
     RTSEMEVENT hEvent = (RTSEMEVENT)pvUser2;
 
     RTSemEventSignal(hEvent);
@@ -5759,10 +5796,6 @@ VBOXDDU_DECL(int) VDInit(void)
  */
 VBOXDDU_DECL(int) VDShutdown(void)
 {
-    PCVBOXHDDBACKEND *pBackends = g_apBackends;
-    PCVDCACHEBACKEND *pCacheBackends = g_apCacheBackends;
-    unsigned cBackends = g_cBackends;
-
     if (!g_apBackends)
         return VERR_INTERNAL_ERROR;
 
@@ -5877,8 +5910,6 @@ VBOXDDU_DECL(int) VDBackendInfo(unsigned cEntriesAlloc, PVDBACKENDINFO pEntries,
                                 unsigned *pcEntriesUsed)
 {
     int rc = VINF_SUCCESS;
-    PRTDIR pPluginDir = NULL;
-    unsigned cEntries = 0;
 
     LogFlowFunc(("cEntriesAlloc=%u pEntries=%#p pcEntriesUsed=%#p\n", cEntriesAlloc, pEntries, pcEntriesUsed));
     /* Check arguments. */
@@ -5910,7 +5941,7 @@ VBOXDDU_DECL(int) VDBackendInfo(unsigned cEntriesAlloc, PVDBACKENDINFO pEntries,
         pEntries[i].pfnComposeName = g_apBackends[i]->pfnComposeName;
     }
 
-    LogFlowFunc(("returns %Rrc *pcEntriesUsed=%u\n", rc, cEntries));
+    LogFlowFunc(("returns %Rrc *pcEntriesUsed=%u\n", rc, g_cBackends));
     *pcEntriesUsed = g_cBackends;
     return rc;
 }
@@ -5964,7 +5995,6 @@ VBOXDDU_DECL(int) VDFilterInfo(unsigned cEntriesAlloc, PVDFILTERINFO pEntries,
                                unsigned *pcEntriesUsed)
 {
     int rc = VINF_SUCCESS;
-    unsigned cEntries = 0;
 
     LogFlowFunc(("cEntriesAlloc=%u pEntries=%#p pcEntriesUsed=%#p\n", cEntriesAlloc, pEntries, pcEntriesUsed));
     /* Check arguments. */
@@ -5992,7 +6022,7 @@ VBOXDDU_DECL(int) VDFilterInfo(unsigned cEntriesAlloc, PVDFILTERINFO pEntries,
         pEntries[i].paConfigInfo = g_apFilterBackends[i]->paConfigInfo;
     }
 
-    LogFlowFunc(("returns %Rrc *pcEntriesUsed=%u\n", rc, cEntries));
+    LogFlowFunc(("returns %Rrc *pcEntriesUsed=%u\n", rc, g_cFilterBackends));
     *pcEntriesUsed = g_cFilterBackends;
     return rc;
 }
@@ -11140,6 +11170,7 @@ VBOXDDU_DECL(int) VDRepair(PVDINTERFACE pVDIfsDisk, PVDINTERFACE pVDIfsImage,
  */
 DECLCALLBACK(int) genericFileComposeLocation(PVDINTERFACE pConfig, char **pszLocation)
 {
+    RT_NOREF1(pConfig);
     *pszLocation = NULL;
     return VINF_SUCCESS;
 }
@@ -11149,6 +11180,7 @@ DECLCALLBACK(int) genericFileComposeLocation(PVDINTERFACE pConfig, char **pszLoc
  */
 DECLCALLBACK(int) genericFileComposeName(PVDINTERFACE pConfig, char **pszName)
 {
+    RT_NOREF1(pConfig);
     *pszName = NULL;
     return VINF_SUCCESS;
 }
diff --git a/src/VBox/Storage/VDBackends.h b/src/VBox/Storage/VDBackends.h
index 1c2dd08..6c39329 100644
--- a/src/VBox/Storage/VDBackends.h
+++ b/src/VBox/Storage/VDBackends.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Storage/VDI.cpp b/src/VBox/Storage/VDI.cpp
index 433f4be..1fae841 100644
--- a/src/VBox/Storage/VDI.cpp
+++ b/src/VBox/Storage/VDI.cpp
@@ -58,9 +58,6 @@ static const VDFILEEXTENSION s_aVdiFileExtensions[] =
 static unsigned getPowerOfTwo(unsigned uNumber);
 static void vdiInitPreHeader(PVDIPREHEADER pPreHdr);
 static int  vdiValidatePreHeader(PVDIPREHEADER pPreHdr);
-static void vdiInitHeader(PVDIHEADER pHeader, uint32_t uImageFlags,
-                          const char *pszComment, uint64_t cbDisk,
-                          uint32_t cbBlock, uint32_t cbBlockExtra);
 static int  vdiValidateHeader(PVDIHEADER pHeader);
 static void vdiSetupImageDesc(PVDIIMAGEDESC pImage);
 static int  vdiUpdateHeader(PVDIIMAGEDESC pImage);
@@ -372,10 +369,16 @@ static void vdiInitHeader(PVDIHEADER pHeader, uint32_t uImageFlags,
     pHeader->u.v1plus.offData = RT_ALIGN_32(pHeader->u.v1plus.offBlocks + (pHeader->u.v1plus.cBlocks * sizeof(VDIIMAGEBLOCKPOINTER)), cbDataAlign);
 
     /* Init uuids. */
+#ifdef _MSC_VER
+# pragma warning(disable:4366) /* (harmless "misalignment") */
+#endif
     RTUuidCreate(&pHeader->u.v1plus.uuidCreate);
     RTUuidClear(&pHeader->u.v1plus.uuidModify);
     RTUuidClear(&pHeader->u.v1plus.uuidLinkage);
     RTUuidClear(&pHeader->u.v1plus.uuidParentModify);
+#ifdef _MSC_VER
+# pragma warning(default:4366)
+#endif
 
     /* Mark LCHS geometry not-calculated. */
     pHeader->u.v1plus.LCHSGeometry.cCylinders = 0;
@@ -1053,6 +1056,7 @@ static int vdiFlushImageIoCtx(PVDIIMAGEDESC pImage, PVDIOCTX pIoCtx)
  */
 static DECLCALLBACK(int) vdiDiscardBlockAsyncUpdate(void *pBackendData, PVDIOCTX pIoCtx, void *pvUser, int rcReq)
 {
+    RT_NOREF1(rcReq);
     int rc = VINF_SUCCESS;
     PVDIIMAGEDESC pImage = (PVDIIMAGEDESC)pBackendData;
     PVDIBLOCKDISCARDASYNC pDiscardAsync = (PVDIBLOCKDISCARDASYNC)pvUser;
@@ -2358,6 +2362,7 @@ static DECLCALLBACK(int) vdiCompact(void *pBackendData, unsigned uPercentStart,
                                     unsigned uPercentSpan, PVDINTERFACE pVDIfsDisk,
                                     PVDINTERFACE pVDIfsImage, PVDINTERFACE pVDIfsOperation)
 {
+    RT_NOREF2(pVDIfsDisk, pVDIfsImage);
     PVDIIMAGEDESC pImage = (PVDIIMAGEDESC)pBackendData;
     int rc = VINF_SUCCESS;
     void *pvBuf = NULL, *pvTmp = NULL;
@@ -2372,8 +2377,6 @@ static DECLCALLBACK(int) vdiCompact(void *pBackendData, unsigned uPercentStart,
         pvParent = pIfParentState->Core.pvUser;
     }
 
-    PFNVDPROGRESS pfnProgress = NULL;
-    void *pvUser = NULL;
     PVDINTERFACEPROGRESS pIfProgress = VDIfProgressGet(pVDIfsOperation);
 
     PVDINTERFACEQUERYRANGEUSE pIfQueryRangeUse = VDIfQueryRangeUseGet(pVDIfsOperation);
@@ -2608,13 +2611,10 @@ static DECLCALLBACK(int) vdiResize(void *pBackendData, uint64_t cbSize,
                                    PVDINTERFACE pVDIfsDisk, PVDINTERFACE pVDIfsImage,
                                    PVDINTERFACE pVDIfsOperation)
 {
+    RT_NOREF5(uPercentStart, uPercentSpan, pVDIfsDisk, pVDIfsImage, pVDIfsOperation);
     PVDIIMAGEDESC pImage = (PVDIIMAGEDESC)pBackendData;
     int rc = VINF_SUCCESS;
 
-    PFNVDPROGRESS pfnProgress = NULL;
-    void *pvUser = NULL;
-    PVDINTERFACEPROGRESS pIfProgress = VDIfProgressGet(pVDIfsOperation);
-
     /*
      * Making the image smaller is not supported at the moment.
      * Resizing is also not supported for fixed size images and
@@ -2969,7 +2969,6 @@ static DECLCALLBACK(int) vdiRepair(const char *pszFilename, PVDINTERFACE pVDIfsD
 
     do
     {
-        bool fRepairHdr = false;
         bool fRepairBlockArray = false;
 
         rc = vdIfIoIntFileOpen(pIfIo, pszFilename,
diff --git a/src/VBox/Storage/VDICore.h b/src/VBox/Storage/VDICore.h
index 035e1f4..e1985d7 100644
--- a/src/VBox/Storage/VDICore.h
+++ b/src/VBox/Storage/VDICore.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -467,6 +467,10 @@ DECLINLINE(void) setImageBlocksAllocated(PVDIHEADER ph, unsigned cBlocks)
     AssertFailed();
 }
 
+#ifdef _MSC_VER
+# pragma warning(disable:4366) /* (harmless "misalignment") */
+#endif
+
 DECLINLINE(PRTUUID) getImageCreationUUID(PVDIHEADER ph)
 {
     switch (GET_MAJOR_HEADER_VERSION(ph))
@@ -510,6 +514,10 @@ DECLINLINE(PRTUUID) getImageParentModificationUUID(PVDIHEADER ph)
     return NULL;
 }
 
+#ifdef _MSC_VER
+# pragma warning(default:4366)
+#endif
+
 /**
  * Image structure
  */
diff --git a/src/VBox/Storage/VDIfVfs.cpp b/src/VBox/Storage/VDIfVfs.cpp
index 84d2894..eee9567 100644
--- a/src/VBox/Storage/VDIfVfs.cpp
+++ b/src/VBox/Storage/VDIfVfs.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2013 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -64,6 +64,7 @@ typedef VDIFVFSIOSFILE *PVDIFVFSIOSFILE;
 static DECLCALLBACK(int) vdIfVfsIos_Close(void *pvThis)
 {
     /* We don't close anything. */
+    RT_NOREF1(pvThis);
     return VINF_SUCCESS;
 }
 
diff --git a/src/VBox/Storage/VDIfVfs2.cpp b/src/VBox/Storage/VDIfVfs2.cpp
index 738d3e9..783abf4 100644
--- a/src/VBox/Storage/VDIfVfs2.cpp
+++ b/src/VBox/Storage/VDIfVfs2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2013 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -142,14 +142,16 @@ static DECLCALLBACK(int) notImpl_SetSize(void *pvUser, void *pvStorage, uint64_t
     return VERR_NOT_IMPLEMENTED;
 }
 
+#if 0  /* unused */
 /** @interface_method_impl{VDINTERFACEIO,pfnWriteSync}  */
 static DECLCALLBACK(int) notImpl_WriteSync(void *pvUser, void *pvStorage, uint64_t off, const void *pvBuf,
                                            size_t cbWrite, size_t *pcbWritten)
 {
-    NOREF(pvUser); NOREF(pvStorage); NOREF(off); NOREF(pvBuf); NOREF(cbWrite); NOREF(pcbWritten);
+    RT_NOREF6(pvUser, pvStorage, off, pvBuf, cbWrite, pcbWritten)
     Log(("%s\n",  __FUNCTION__));
     return VERR_NOT_IMPLEMENTED;
 }
+#endif
 
 /** @interface_method_impl{VDINTERFACEIO,pfnFlushSync}  */
 static DECLCALLBACK(int) notImpl_FlushSync(void *pvUser, void *pvStorage)
@@ -166,6 +168,7 @@ static DECLCALLBACK(int) notImpl_FlushSync(void *pvUser, void *pvStorage)
 static DECLCALLBACK(int) vdIfFromVfs_Open(void *pvUser, const char *pszLocation, uint32_t fOpen,
                                           PFNVDCOMPLETED pfnCompleted, void **ppInt)
 {
+    RT_NOREF1(pszLocation);
     PVDIFFROMVFS pThis = (PVDIFFROMVFS)pvUser;
 
     /*
@@ -200,7 +203,7 @@ static DECLCALLBACK(int) vdIfFromVfs_Close(void *pvUser, void *pvStorage)
     AssertReturn(pThis->hVfsIos == (RTVFSIOSTREAM)pvStorage, VERR_INVALID_HANDLE);
     AssertReturn(pThis->fOpened, VERR_INVALID_HANDLE);
 
-    uint32_t cRefs = RTVfsIoStrmRelease(pThis->hVfsIos);
+    RTVfsIoStrmRelease(pThis->hVfsIos);
     pThis->hVfsIos = NIL_RTVFSIOSTREAM;
 
     return VINF_SUCCESS;
diff --git a/src/VBox/Storage/VDVfs.cpp b/src/VBox/Storage/VDVfs.cpp
index 203810e..a7a9883 100644
--- a/src/VBox/Storage/VDVfs.cpp
+++ b/src/VBox/Storage/VDVfs.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Storage/VHD.cpp b/src/VBox/Storage/VHD.cpp
index ea6d57b..c197aff 100644
--- a/src/VBox/Storage/VHD.cpp
+++ b/src/VBox/Storage/VHD.cpp
@@ -304,7 +304,8 @@ out:
 static int vhdLocatorUpdate(PVHDIMAGE pImage, PVHDPLE pLocator, const char *pszFilename)
 {
     int      rc = VINF_SUCCESS;
-    uint32_t cb, cbMaxLen = RT_BE2H_U32(pLocator->u32DataSpace);
+    uint32_t cb = 0;
+    uint32_t cbMaxLen = RT_BE2H_U32(pLocator->u32DataSpace);
     void     *pvBuf = RTMemTmpAllocZ(cbMaxLen);
     char     *pszTmp;
 
@@ -352,7 +353,10 @@ static int vhdLocatorUpdate(PVHDIMAGE pImage, PVHDPLE pLocator, const char *pszF
             /* Update plain absolute name. */
             rc = RTPathAbs(pszFilename, (char *)pvBuf, cbMaxLen);
             if (RT_SUCCESS(rc))
-                pLocator->u32DataLength = RT_H2BE_U32((uint32_t)strlen((const char *)pvBuf));
+            {
+                cb = (uint32_t)strlen((const char *)pvBuf);
+                pLocator->u32DataLength = RT_H2BE_U32(cb);
+            }
             break;
         case VHD_PLATFORM_CODE_W2RU:
             if (RTPathStartsWithRoot(pszFilename))
@@ -398,9 +402,12 @@ static int vhdLocatorUpdate(PVHDIMAGE pImage, PVHDPLE pLocator, const char *pszF
     }
 
     if (RT_SUCCESS(rc))
+    {
+        Assert(cb > 0);
         rc = vdIfIoIntFileWriteSync(pImage->pIfIo, pImage->pStorage,
                                     RT_BE2H_U64(pLocator->u64DataOffset),
                                     pvBuf, cb);
+    }
 
     if (pvBuf)
         RTMemTmpFree(pvBuf);
@@ -915,6 +922,7 @@ DECLINLINE(bool) vhdBlockBitmapSectorContainsData(PVHDIMAGE pImage, uint32_t cBl
  */
 DECLINLINE(bool) vhdBlockBitmapSectorSet(PVHDIMAGE pImage, uint8_t *pu8Bitmap, uint32_t cBlockBitmapEntry)
 {
+    RT_NOREF1(pImage);
     uint32_t iBitmap = (cBlockBitmapEntry / 8); /* Byte in the block bitmap. */
 
     /*
@@ -987,6 +995,7 @@ static void vhdSetDiskGeometry(PVHDIMAGE pImage, uint64_t cbSize)
 
 static uint32_t vhdAllocateParentLocators(PVHDIMAGE pImage, VHDDynamicDiskHeader *pDDH, uint64_t u64Offset)
 {
+    RT_NOREF1(pImage);
     PVHDPLE pLocator = pDDH->ParentLocatorEntry;
 
     /*
@@ -1106,6 +1115,7 @@ static int vhdCreateImage(PVHDIMAGE pImage, uint64_t cbSize,
                           PFNVDPROGRESS pfnProgress, void *pvUser,
                           unsigned uPercentStart, unsigned uPercentSpan)
 {
+    RT_NOREF3(pszComment, pPCHSGeometry, pLCHSGeometry);
     int rc;
     VHDFooter Footer;
     RTTIMESPEC now;
@@ -1239,6 +1249,7 @@ out:
 static DECLCALLBACK(int) vhdCheckIfValid(const char *pszFilename, PVDINTERFACE pVDIfsDisk,
                                          PVDINTERFACE pVDIfsImage, VDTYPE *penmType)
 {
+    RT_NOREF1(pVDIfsDisk);
     LogFlowFunc(("pszFilename=\"%s\" pVDIfsDisk=%#p pVDIfsImage=%#p\n", pszFilename, pVDIfsDisk, pVDIfsImage));
     int rc;
     PVDIOSTORAGE pStorage;
@@ -1379,7 +1390,7 @@ static DECLCALLBACK(int) vhdCreate(const char *pszFilename, uint64_t cbSize,
         return rc;
     }
 
-    /* @todo Check the values of other params */
+    /** @todo Check the values of other params */
 
     pImage = (PVHDIMAGE)RTMemAllocZ(sizeof(VHDIMAGE));
     if (!pImage)
@@ -2085,6 +2096,7 @@ out:
 static DECLCALLBACK(int) vhdGetComment(void *pBackendData, char *pszComment,
                                        size_t cbComment)
 {
+    RT_NOREF2(pszComment, cbComment);
     LogFlowFunc(("pBackendData=%#p pszComment=%#p cbComment=%zu\n", pBackendData, pszComment, cbComment));
     PVHDIMAGE pImage = (PVHDIMAGE)pBackendData;
     int rc;
@@ -2103,6 +2115,7 @@ static DECLCALLBACK(int) vhdGetComment(void *pBackendData, char *pszComment,
 /** @interface_method_impl{VBOXHDDBACKEND,pfnSetComment} */
 static DECLCALLBACK(int) vhdSetComment(void *pBackendData, const char *pszComment)
 {
+    RT_NOREF1(pszComment);
     LogFlowFunc(("pBackendData=%#p pszComment=\"%s\"\n", pBackendData, pszComment));
     PVHDIMAGE pImage = (PVHDIMAGE)pBackendData;
     int rc;
@@ -2182,6 +2195,7 @@ static DECLCALLBACK(int) vhdSetUuid(void *pBackendData, PCRTUUID pUuid)
 /** @interface_method_impl{VBOXHDDBACKEND,pfnGetModificationUuid} */
 static DECLCALLBACK(int) vhdGetModificationUuid(void *pBackendData, PRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
     PVHDIMAGE pImage = (PVHDIMAGE)pBackendData;
     int rc;
@@ -2200,6 +2214,7 @@ static DECLCALLBACK(int) vhdGetModificationUuid(void *pBackendData, PRTUUID pUui
 /** @interface_method_impl{VBOXHDDBACKEND,pfnSetModificationUuid} */
 static DECLCALLBACK(int) vhdSetModificationUuid(void *pBackendData, PCRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
     PVHDIMAGE pImage = (PVHDIMAGE)pBackendData;
     int rc;
@@ -2270,6 +2285,7 @@ static DECLCALLBACK(int) vhdSetParentUuid(void *pBackendData, PCRTUUID pUuid)
 /** @interface_method_impl{VBOXHDDBACKEND,pfnGetParentModificationUuid} */
 static DECLCALLBACK(int) vhdGetParentModificationUuid(void *pBackendData, PRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
     PVHDIMAGE pImage = (PVHDIMAGE)pBackendData;
     int rc;
@@ -2288,6 +2304,7 @@ static DECLCALLBACK(int) vhdGetParentModificationUuid(void *pBackendData, PRTUUI
 /** @interface_method_impl{VBOXHDDBACKEND,pfnSetParentModificationUuid} */
 static DECLCALLBACK(int) vhdSetParentModificationUuid(void *pBackendData, PCRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
     PVHDIMAGE pImage = (PVHDIMAGE)pBackendData;
     int rc;
@@ -2433,9 +2450,10 @@ static DECLCALLBACK(int) vhdCompact(void *pBackendData, unsigned uPercentStart,
                                     unsigned uPercentSpan, PVDINTERFACE pVDIfsDisk,
                                     PVDINTERFACE pVDIfsImage, PVDINTERFACE pVDIfsOperation)
 {
+    RT_NOREF2(pVDIfsDisk, pVDIfsImage);
     PVHDIMAGE pImage = (PVHDIMAGE)pBackendData;
     int rc = VINF_SUCCESS;
-    void *pvBuf = NULL, *pvReplace = NULL;
+    void *pvBuf = NULL;
     uint32_t *paBlocks = NULL;
 
     DECLCALLBACKMEMBER(int, pfnParentRead)(void *, uint64_t, void *, size_t) = NULL;
@@ -2544,7 +2562,7 @@ static DECLCALLBACK(int) vhdCompact(void *pBackendData, unsigned uPercentStart,
 
                 if (ASMBitFirstSet((volatile void *)pvBuf, (uint32_t)pImage->cbDataBlock * 8) == -1)
                 {
-                    paBat[i] = ~0;
+                    paBat[i] = UINT32_MAX;
                     paBlocks[idxBlock] = ~0U;
                     /* Adjust progress info, one block to be relocated. */
                     cBlocksToMove++;
@@ -2674,6 +2692,7 @@ static DECLCALLBACK(int) vhdResize(void *pBackendData, uint64_t cbSize,
                                    PVDINTERFACE pVDIfsDisk, PVDINTERFACE pVDIfsImage,
                                    PVDINTERFACE pVDIfsOperation)
 {
+    RT_NOREF4(uPercentSpan, uPercentStart, pVDIfsDisk, pVDIfsImage);
     PVHDIMAGE pImage = (PVHDIMAGE)pBackendData;
     int rc = VINF_SUCCESS;
 
diff --git a/src/VBox/Storage/VHDX.cpp b/src/VBox/Storage/VHDX.cpp
index b64edfa..34f1d03 100644
--- a/src/VBox/Storage/VHDX.cpp
+++ b/src/VBox/Storage/VHDX.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -631,6 +631,7 @@ DECLINLINE(void) vhdxConvFileIdentifierEndianess(VHDXECONV enmConv, PVhdxFileIde
  */
 DECLINLINE(void) vhdxConvUuidEndianess(VHDXECONV enmConv, PRTUUID pUuidConv, PRTUUID pUuid)
 {
+    RT_NOREF1(enmConv);
 #if 1
     memcpy(pUuidConv, pUuid, sizeof(RTUUID));
 #else
@@ -706,6 +707,8 @@ DECLINLINE(void) vhdxConvRegionTblEntryEndianess(VHDXECONV enmConv, PVhdxRegionT
     pRegTblEntConv->u32Flags      = SET_ENDIAN_U32(pRegTblEnt->u32Flags);
 }
 
+#if 0 /* unused */
+
 /**
  * Converts a VHDX log entry header between file and host endianness.
  *
@@ -750,6 +753,7 @@ DECLINLINE(void) vhdxConvLogZeroDescEndianess(VHDXECONV enmConv, PVhdxLogZeroDes
     pLogZeroDescConv->u64SequenceNumber = SET_ENDIAN_U64(pLogZeroDesc->u64SequenceNumber);
 }
 
+
 /**
  * Converts a VHDX log data descriptor between file and host endianness.
  *
@@ -770,6 +774,7 @@ DECLINLINE(void) vhdxConvLogDataDescEndianess(VHDXECONV enmConv, PVhdxLogDataDes
     pLogDataDescConv->u64SequenceNumber = SET_ENDIAN_U64(pLogDataDesc->u64SequenceNumber);
 }
 
+
 /**
  * Converts a VHDX log data sector between file and host endianness.
  *
@@ -788,6 +793,8 @@ DECLINLINE(void) vhdxConvLogDataSectorEndianess(VHDXECONV enmConv, PVhdxLogDataS
     pLogDataSectorConv->u32SequenceLow   = SET_ENDIAN_U32(pLogDataSector->u32SequenceLow);
 }
 
+#endif /* unused */
+
 /**
  * Converts a BAT between file and host endianess.
  *
@@ -878,6 +885,8 @@ DECLINLINE(void) vhdxConvVDiskSizeEndianess(VHDXECONV enmConv, PVhdxVDiskSize pV
     pVDiskSizeConv->u64VDiskSize  = SET_ENDIAN_U64(pVDiskSize->u64VDiskSize);
 }
 
+#if 0 /* unused */
+
 /**
  * Converts a VHDX page 83 data item between file and host endianness.
  *
@@ -893,6 +902,7 @@ DECLINLINE(void) vhdxConvPage83DataEndianess(VHDXECONV enmConv, PVhdxPage83Data
 {
     vhdxConvUuidEndianess(enmConv, &pPage83DataConv->UuidPage83Data, &pPage83Data->UuidPage83Data);
 }
+#endif /* unused */
 
 /**
  * Converts a VHDX logical sector size item between file and host endianness.
@@ -910,6 +920,8 @@ DECLINLINE(void) vhdxConvVDiskLogSectSizeEndianess(VHDXECONV enmConv, PVhdxVDisk
     pVDiskLogSectSizeConv->u32LogicalSectorSize = SET_ENDIAN_U32(pVDiskLogSectSize->u32LogicalSectorSize);
 }
 
+#if 0 /* unused */
+
 /**
  * Converts a VHDX physical sector size item between file and host endianness.
  *
@@ -926,6 +938,7 @@ DECLINLINE(void) vhdxConvVDiskPhysSectSizeEndianess(VHDXECONV enmConv, PVhdxVDis
     pVDiskPhysSectSizeConv->u64PhysicalSectorSize = SET_ENDIAN_U64(pVDiskPhysSectSize->u64PhysicalSectorSize);
 }
 
+
 /**
  * Converts a VHDX parent locator header item between file and host endianness.
  *
@@ -944,6 +957,7 @@ DECLINLINE(void) vhdxConvParentLocatorHeaderEndianness(VHDXECONV enmConv, PVhdxP
     pParentLocatorHdrConv->u16KeyValueCount = SET_ENDIAN_U16(pParentLocatorHdr->u16KeyValueCount);
 }
 
+
 /**
  * Converts a VHDX parent locator entry between file and host endianness.
  *
@@ -963,6 +977,8 @@ DECLINLINE(void) vhdxConvParentLocatorEntryEndianess(VHDXECONV enmConv, PVhdxPar
     pParentLocatorEntryConv->u16ValueLength = SET_ENDIAN_U16(pParentLocatorEntry->u16ValueLength);
 }
 
+#endif /* unused */
+
 /**
  * Internal. Free all allocated space for representing an image except pImage,
  * and optionally delete the image from disk.
@@ -1276,7 +1292,7 @@ static int vhdxLoadFileParametersMetadata(PVHDXIMAGE pImage, uint64_t offItem, s
             vhdxConvFileParamsEndianess(VHDXECONV_F2H, &FileParameters, &FileParameters);
             pImage->cbBlock = FileParameters.u32BlockSize;
 
-            /* @todo: No support for differencing images yet. */
+            /** @todo No support for differencing images yet. */
             if (FileParameters.u32Flags & VHDX_FILE_PARAMETERS_FLAGS_HAS_PARENT)
                 rc = vdIfError(pImage->pIfError, VERR_NOT_SUPPORTED, RT_SRC_POS,
                                "VHDX: Image \'%s\' is a differencing image which is not supported yet",
@@ -1562,7 +1578,6 @@ static int vhdxLoadRegionTable(PVHDXIMAGE pImage)
         {
             PVhdxRegionTblHdr pRegionTblHdr;
             VhdxRegionTblHdr RegionTblHdr;
-            uint32_t u32ChkSumSaved = 0;
             uint32_t u32ChkSum = 0;
 
             /*
@@ -1739,6 +1754,7 @@ static int vhdxOpenImage(PVHDXIMAGE pImage, unsigned uOpenFlags)
 static DECLCALLBACK(int) vhdxCheckIfValid(const char *pszFilename, PVDINTERFACE pVDIfsDisk,
                                           PVDINTERFACE pVDIfsImage, VDTYPE *penmType)
 {
+    RT_NOREF1(pVDIfsDisk);
     LogFlowFunc(("pszFilename=\"%s\" pVDIfsDisk=%#p pVDIfsImage=%#p\n", pszFilename, pVDIfsDisk, pVDIfsImage));
     PVDIOSTORAGE pStorage = NULL;
     uint64_t cbFile;
@@ -1761,26 +1777,27 @@ static DECLCALLBACK(int) vhdxCheckIfValid(const char *pszFilename, PVDINTERFACE
                                                           false /* fCreate */),
                                &pStorage);
         if (RT_SUCCESS(rc))
-            rc = vdIfIoIntFileGetSize(pIfIo, pStorage, &cbFile);
-
-        if (RT_SUCCESS(rc))
         {
-            if (cbFile > sizeof(FileIdentifier))
+            rc = vdIfIoIntFileGetSize(pIfIo, pStorage, &cbFile);
+            if (RT_SUCCESS(rc))
             {
-                rc = vdIfIoIntFileReadSync(pIfIo, pStorage, VHDX_FILE_IDENTIFIER_OFFSET,
-                                           &FileIdentifier, sizeof(FileIdentifier));
-                if (RT_SUCCESS(rc))
+                if (cbFile > sizeof(FileIdentifier))
                 {
-                    vhdxConvFileIdentifierEndianess(VHDXECONV_F2H, &FileIdentifier,
-                                                    &FileIdentifier);
-                    if (FileIdentifier.u64Signature != VHDX_FILE_IDENTIFIER_SIGNATURE)
-                        rc = VERR_VD_GEN_INVALID_HEADER;
-                    else
-                        *penmType = VDTYPE_HDD;
+                    rc = vdIfIoIntFileReadSync(pIfIo, pStorage, VHDX_FILE_IDENTIFIER_OFFSET,
+                                               &FileIdentifier, sizeof(FileIdentifier));
+                    if (RT_SUCCESS(rc))
+                    {
+                        vhdxConvFileIdentifierEndianess(VHDXECONV_F2H, &FileIdentifier,
+                                                        &FileIdentifier);
+                        if (FileIdentifier.u64Signature != VHDX_FILE_IDENTIFIER_SIGNATURE)
+                            rc = VERR_VD_GEN_INVALID_HEADER;
+                        else
+                            *penmType = VDTYPE_HDD;
+                    }
                 }
+                else
+                    rc = VERR_VD_GEN_INVALID_HEADER;
             }
-            else
-                rc = VERR_VD_GEN_INVALID_HEADER;
         }
 
         if (pStorage)
@@ -1841,6 +1858,8 @@ static DECLCALLBACK(int) vhdxCreate(const char *pszFilename, uint64_t cbSize,
                                     PVDINTERFACE pVDIfsOperation, VDTYPE enmType,
                                     void **ppBackendData)
 {
+    RT_NOREF8(pszFilename, cbSize, uImageFlags, pszComment, pPCHSGeometry, pLCHSGeometry, pUuid, uOpenFlags);
+    RT_NOREF7(uPercentStart, uPercentSpan, pVDIfsDisk, pVDIfsImage, pVDIfsOperation, enmType, ppBackendData);
     LogFlowFunc(("pszFilename=\"%s\" cbSize=%llu uImageFlags=%#x pszComment=\"%s\" pPCHSGeometry=%#p pLCHSGeometry=%#p Uuid=%RTuuid uOpenFlags=%#x uPercentStart=%u uPercentSpan=%u pVDIfsDisk=%#p pVDIfsImage=%#p pVDIfsOperation=%#p enmType=%u ppBackendData=%#p",
                  pszFilename, cbSize, uImageFlags, pszComment, pPCHSGeometry, pLCHSGeometry, pUuid, uOpenFlags, uPercentStart, uPercentSpan, pVDIfsDisk, pVDIfsImage, pVDIfsOperation, enmType, ppBackendData));
     int rc = VERR_NOT_SUPPORTED;
@@ -1968,6 +1987,7 @@ static DECLCALLBACK(int) vhdxWrite(void *pBackendData, uint64_t uOffset,  size_t
                                    PVDIOCTX pIoCtx, size_t *pcbWriteProcess, size_t *pcbPreRead,
                                    size_t *pcbPostRead, unsigned fWrite)
 {
+    RT_NOREF5(pIoCtx, pcbWriteProcess, pcbPreRead, pcbPostRead, fWrite);
     LogFlowFunc(("pBackendData=%#p uOffset=%llu pIoCtx=%#p cbToWrite=%zu pcbWriteProcess=%#p pcbPreRead=%#p pcbPostRead=%#p\n",
                  pBackendData, uOffset, pIoCtx, cbToWrite, pcbWriteProcess, pcbPreRead, pcbPostRead));
     PVHDXIMAGE pImage = (PVHDXIMAGE)pBackendData;
@@ -1992,6 +2012,7 @@ static DECLCALLBACK(int) vhdxWrite(void *pBackendData, uint64_t uOffset,  size_t
 /** @copydoc VBOXHDDBACKEND::pfnFlush */
 static DECLCALLBACK(int) vhdxFlush(void *pBackendData, PVDIOCTX pIoCtx)
 {
+    RT_NOREF1(pIoCtx);
     LogFlowFunc(("pBackendData=%#p pIoCtx=%#p\n", pBackendData, pIoCtx));
     PVHDXIMAGE pImage = (PVHDXIMAGE)pBackendData;
     int rc;
@@ -2236,6 +2257,7 @@ static DECLCALLBACK(int) vhdxSetOpenFlags(void *pBackendData, unsigned uOpenFlag
 static DECLCALLBACK(int) vhdxGetComment(void *pBackendData, char *pszComment,
                                         size_t cbComment)
 {
+    RT_NOREF2(pszComment, cbComment);
     LogFlowFunc(("pBackendData=%#p pszComment=%#p cbComment=%zu\n", pBackendData, pszComment, cbComment));
     PVHDXIMAGE pImage = (PVHDXIMAGE)pBackendData;
     int rc;
@@ -2254,6 +2276,7 @@ static DECLCALLBACK(int) vhdxGetComment(void *pBackendData, char *pszComment,
 /** @copydoc VBOXHDDBACKEND::pfnSetComment */
 static DECLCALLBACK(int) vhdxSetComment(void *pBackendData, const char *pszComment)
 {
+    RT_NOREF1(pszComment);
     LogFlowFunc(("pBackendData=%#p pszComment=\"%s\"\n", pBackendData, pszComment));
     PVHDXIMAGE pImage = (PVHDXIMAGE)pBackendData;
     int rc;
@@ -2277,6 +2300,7 @@ static DECLCALLBACK(int) vhdxSetComment(void *pBackendData, const char *pszComme
 /** @copydoc VBOXHDDBACKEND::pfnGetUuid */
 static DECLCALLBACK(int) vhdxGetUuid(void *pBackendData, PRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
     PVHDXIMAGE pImage = (PVHDXIMAGE)pBackendData;
     int rc;
@@ -2295,6 +2319,7 @@ static DECLCALLBACK(int) vhdxGetUuid(void *pBackendData, PRTUUID pUuid)
 /** @copydoc VBOXHDDBACKEND::pfnSetUuid */
 static DECLCALLBACK(int) vhdxSetUuid(void *pBackendData, PCRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
     PVHDXIMAGE pImage = (PVHDXIMAGE)pBackendData;
     int rc;
@@ -2319,6 +2344,7 @@ static DECLCALLBACK(int) vhdxSetUuid(void *pBackendData, PCRTUUID pUuid)
 /** @copydoc VBOXHDDBACKEND::pfnGetModificationUuid */
 static DECLCALLBACK(int) vhdxGetModificationUuid(void *pBackendData, PRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
     PVHDXIMAGE pImage = (PVHDXIMAGE)pBackendData;
     int rc;
@@ -2337,6 +2363,7 @@ static DECLCALLBACK(int) vhdxGetModificationUuid(void *pBackendData, PRTUUID pUu
 /** @copydoc VBOXHDDBACKEND::pfnSetModificationUuid */
 static DECLCALLBACK(int) vhdxSetModificationUuid(void *pBackendData, PCRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
     PVHDXIMAGE pImage = (PVHDXIMAGE)pBackendData;
     int rc;
@@ -2360,6 +2387,7 @@ static DECLCALLBACK(int) vhdxSetModificationUuid(void *pBackendData, PCRTUUID pU
 /** @copydoc VBOXHDDBACKEND::pfnGetParentUuid */
 static DECLCALLBACK(int) vhdxGetParentUuid(void *pBackendData, PRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
     PVHDXIMAGE pImage = (PVHDXIMAGE)pBackendData;
     int rc;
@@ -2378,6 +2406,7 @@ static DECLCALLBACK(int) vhdxGetParentUuid(void *pBackendData, PRTUUID pUuid)
 /** @copydoc VBOXHDDBACKEND::pfnSetParentUuid */
 static DECLCALLBACK(int) vhdxSetParentUuid(void *pBackendData, PCRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
     PVHDXIMAGE pImage = (PVHDXIMAGE)pBackendData;
     int rc;
@@ -2401,6 +2430,7 @@ static DECLCALLBACK(int) vhdxSetParentUuid(void *pBackendData, PCRTUUID pUuid)
 /** @copydoc VBOXHDDBACKEND::pfnGetParentModificationUuid */
 static DECLCALLBACK(int) vhdxGetParentModificationUuid(void *pBackendData, PRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
     PVHDXIMAGE pImage = (PVHDXIMAGE)pBackendData;
     int rc;
@@ -2419,6 +2449,7 @@ static DECLCALLBACK(int) vhdxGetParentModificationUuid(void *pBackendData, PRTUU
 /** @copydoc VBOXHDDBACKEND::pfnSetParentModificationUuid */
 static DECLCALLBACK(int) vhdxSetParentModificationUuid(void *pBackendData, PCRTUUID pUuid)
 {
+    RT_NOREF1(pUuid);
     LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
     PVHDXIMAGE pImage = (PVHDXIMAGE)pBackendData;
     int rc;
diff --git a/src/VBox/Storage/VMDK.cpp b/src/VBox/Storage/VMDK.cpp
index 655749a..80c5b0b 100644
--- a/src/VBox/Storage/VMDK.cpp
+++ b/src/VBox/Storage/VMDK.cpp
@@ -1019,6 +1019,7 @@ out:
  */
 static int vmdkAllocGrainDirectory(PVMDKIMAGE pImage, PVMDKEXTENT pExtent)
 {
+    RT_NOREF1(pImage);
     int rc = VINF_SUCCESS;
     size_t cbGD = pExtent->cGDEntries * sizeof(uint32_t);
     /** @todo r=bird: This code is unnecessarily confusing pointer states with
@@ -1456,7 +1457,7 @@ static int vmdkDescSetStr(PVMDKIMAGE pImage, PVMDKDESCRIPTOR pDescriptor,
                           unsigned uStart,
                           const char *pszKey, const char *pszValue)
 {
-    char *pszTmp;
+    char *pszTmp = NULL; /* (MSC naturally cannot figure this isn't used uninitialized) */
     size_t cbKey = strlen(pszKey);
     unsigned uLast = 0;
 
@@ -1471,6 +1472,8 @@ static int vmdkDescSetStr(PVMDKIMAGE pImage, PVMDKDESCRIPTOR pDescriptor,
             if (*pszTmp == '=')
             {
                 pszTmp++;
+                /** @todo r=bird: Doesn't skipping trailing blanks here just cause unecessary
+                 *        bloat and potentially out of space error? */
                 while (*pszTmp == ' ' || *pszTmp == '\t')
                     pszTmp++;
                 break;
@@ -1489,8 +1492,8 @@ static int vmdkDescSetStr(PVMDKIMAGE pImage, PVMDKDESCRIPTOR pDescriptor,
             size_t cbNewVal = strlen(pszValue);
             ssize_t cbDiff = cbNewVal - cbOldVal;
             /* Check for buffer overflow. */
-            if (    pDescriptor->aLines[pDescriptor->cLines]
-                -   pDescriptor->aLines[0] > (ptrdiff_t)pDescriptor->cbDescAlloc - cbDiff)
+            if (  pDescriptor->aLines[pDescriptor->cLines] - pDescriptor->aLines[0]
+                > (ptrdiff_t)pDescriptor->cbDescAlloc - cbDiff)
                 return vdIfError(pImage->pIfError, VERR_BUFFER_OVERFLOW, RT_SRC_POS, N_("VMDK: descriptor too big in '%s'"), pImage->pszFilename);
 
             memmove(pszTmp + cbNewVal, pszTmp + cbOldVal,
@@ -1614,6 +1617,7 @@ static int vmdkDescBaseSetStr(PVMDKIMAGE pImage, PVMDKDESCRIPTOR pDescriptor,
 static void vmdkDescExtRemoveDummy(PVMDKIMAGE pImage,
                                    PVMDKDESCRIPTOR pDescriptor)
 {
+    RT_NOREF1(pImage);
     unsigned uEntry = pDescriptor->uFirstExtent;
     ssize_t cbDiff;
 
@@ -3203,7 +3207,7 @@ static int vmdkOpenImage(PVMDKIMAGE pImage, unsigned uOpenFlags)
             goto out;
         }
 
-#if 0 /** @todo: Revisit */
+#if 0 /** @todo Revisit */
         cbRead += sizeof(u32Magic);
         if (cbRead == pImage->cbDescAlloc)
         {
@@ -3219,37 +3223,6 @@ static int vmdkOpenImage(PVMDKIMAGE pImage, unsigned uOpenFlags)
         if (RT_FAILURE(rc))
             goto out;
 
-        /*
-         * We have to check for the asynchronous open flag. The
-         * extents are parsed and the type of all are known now.
-         * Check if every extent is either FLAT or ZERO.
-         */
-        if (uOpenFlags & VD_OPEN_FLAGS_ASYNC_IO)
-        {
-            unsigned cFlatExtents = 0;
-
-            for (unsigned i = 0; i < pImage->cExtents; i++)
-            {
-                pExtent = &pImage->pExtents[i];
-
-                if ((    pExtent->enmType != VMDKETYPE_FLAT
-                     &&  pExtent->enmType != VMDKETYPE_ZERO
-                     &&  pExtent->enmType != VMDKETYPE_VMFS)
-                    || ((pImage->pExtents[i].enmType == VMDKETYPE_FLAT) && (cFlatExtents > 0)))
-                {
-                    /*
-                     * Opened image contains at least one none flat or zero extent.
-                     * Return error but don't set error message as the caller
-                     * has the chance to open in non async I/O mode.
-                     */
-                    rc = VERR_NOT_SUPPORTED;
-                    goto out;
-                }
-                if (pExtent->enmType == VMDKETYPE_FLAT)
-                    cFlatExtents++;
-            }
-        }
-
         for (unsigned i = 0; i < pImage->cExtents; i++)
         {
             pExtent = &pImage->pExtents[i];
@@ -3745,7 +3718,8 @@ static int vmdkCreateRegularImage(PVMDKIMAGE pImage, uint64_t cbSize,
         if (uImageFlags & VD_IMAGE_FLAGS_FIXED)
         {
             rc = vdIfIoIntFileSetAllocationSize(pImage->pIfIo, pExtent->pFile->pStorage, cbExtent,
-                                                0 /* fFlags */, pfnProgress, pvUser, uPercentStart + cbOffset * uPercentSpan / cbSize, uPercentSpan / cExtents);
+                                                0 /* fFlags */, pfnProgress, pvUser, uPercentStart + cbOffset * uPercentSpan / cbSize,
+                                                cbExtent * uPercentSpan / cbSize);
             if (RT_FAILURE(rc))
                 return vdIfError(pImage->pIfError, rc, RT_SRC_POS, N_("VMDK: could not set size of new file '%s'"), pExtent->pszFullname);
         }
@@ -3857,6 +3831,7 @@ static int vmdkCreateStreamImage(PVMDKIMAGE pImage, uint64_t cbSize,
                                  PFNVDPROGRESS pfnProgress, void *pvUser,
                                  unsigned uPercentStart, unsigned uPercentSpan)
 {
+    RT_NOREF5(uImageFlags, pfnProgress, pvUser, uPercentStart, uPercentSpan);
     int rc;
 
     rc = vmdkCreateExtents(pImage, 1);
@@ -4352,7 +4327,7 @@ static int vmdkFreeImage(PVMDKIMAGE pImage, bool fDelete)
                 AssertRC(rc);
             }
         }
-        else
+        else if (!fDelete)
             vmdkFlushImage(pImage, NULL);
 
         if (pImage->pExtents != NULL)
@@ -4800,10 +4775,10 @@ static int vmdkAllocGrainGTUpdate(PVMDKIMAGE pImage, PVMDKEXTENT pExtent, PVDIOC
  */
 static int vmdkAllocGrainComplete(void *pBackendData, PVDIOCTX pIoCtx, void *pvUser, int rcReq)
 {
+    RT_NOREF1(rcReq);
     int rc = VINF_SUCCESS;
     PVMDKIMAGE pImage = (PVMDKIMAGE)pBackendData;
     PVMDKGRAINALLOCASYNC pGrainAlloc = (PVMDKGRAINALLOCASYNC)pvUser;
-    PVMDKEXTENT pExtent = pGrainAlloc->pExtent;
 
     LogFlowFunc(("pBackendData=%#p pIoCtx=%#p pvUser=%#p rcReq=%Rrc\n",
                  pBackendData, pIoCtx, pvUser, rcReq));
@@ -4828,7 +4803,7 @@ static int vmdkAllocGrainComplete(void *pBackendData, PVDIOCTX pIoCtx, void *pvU
 static int vmdkAllocGrain(PVMDKIMAGE pImage, PVMDKEXTENT pExtent, PVDIOCTX pIoCtx,
                           uint64_t uSector, uint64_t cbWrite)
 {
-    PVMDKGTCACHE pCache = pImage->pGTCache;
+    PVMDKGTCACHE pCache = pImage->pGTCache; NOREF(pCache);
     uint64_t uGDIndex, uGTSector, uRGTSector;
     uint64_t uFileOffset;
     PVMDKGRAINALLOCASYNC pGrainAlloc = NULL;
diff --git a/src/VBox/Storage/testcase/BuiltinTests.h b/src/VBox/Storage/testcase/BuiltinTests.h
index 83a65af..f177557 100644
--- a/src/VBox/Storage/testcase/BuiltinTests.h
+++ b/src/VBox/Storage/testcase/BuiltinTests.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Storage/testcase/Makefile.kmk b/src/VBox/Storage/testcase/Makefile.kmk
index 59ea982..7457ba6 100644
--- a/src/VBox/Storage/testcase/Makefile.kmk
+++ b/src/VBox/Storage/testcase/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -63,10 +63,10 @@ ifdef VBOX_WITH_TESTCASES
 		| $$(dir $$@)
 	$(QUIET)$(RM) -f -- $@ $@.vd
 	$(QUIET)$(APPEND) -n "$@" \
-      	'' \
-      	'#include "BuiltinTests.h"' \
-               ''
-	$(foreach test,$(TSTVDIO_BUILTIN_TESTS), $(NLTAB)$(VBOX_BIN2C) -ascii --append \
+		'' \
+		'#include "BuiltinTests.h"' \
+		''
+	$(foreach test,$(TSTVDIO_BUILTIN_TESTS), $(NLTAB)$(VBOX_BIN2C) -ascii --append --no-size \
 		"$(firstword $(subst =,$(SP) ,$(test)))" \
 		"$(TSTVDIO_PATH_TESTS)/$(lastword $(subst =,$(SP) ,$(test)))" \
 		"$@")
diff --git a/src/VBox/Storage/testcase/VDDefs.h b/src/VBox/Storage/testcase/VDDefs.h
index 729a8ff..d09fe97 100644
--- a/src/VBox/Storage/testcase/VDDefs.h
+++ b/src/VBox/Storage/testcase/VDDefs.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Storage/testcase/VDIoBackend.cpp b/src/VBox/Storage/testcase/VDIoBackend.cpp
index b63fa3e..3732a9f 100644
--- a/src/VBox/Storage/testcase/VDIoBackend.cpp
+++ b/src/VBox/Storage/testcase/VDIoBackend.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -15,7 +15,7 @@
  * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
-#define LOGGROUP LOGGROUP_DEFAULT /** @todo: Log group */
+#define LOGGROUP LOGGROUP_DEFAULT /** @todo Log group */
 #include <iprt/err.h>
 #include <iprt/log.h>
 #include <iprt/assert.h>
diff --git a/src/VBox/Storage/testcase/VDIoBackend.h b/src/VBox/Storage/testcase/VDIoBackend.h
index 520d19d..aeda18f 100644
--- a/src/VBox/Storage/testcase/VDIoBackend.h
+++ b/src/VBox/Storage/testcase/VDIoBackend.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Storage/testcase/VDIoBackendMem.cpp b/src/VBox/Storage/testcase/VDIoBackendMem.cpp
index 85e5cae..d2adc24 100644
--- a/src/VBox/Storage/testcase/VDIoBackendMem.cpp
+++ b/src/VBox/Storage/testcase/VDIoBackendMem.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2011-2012 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -15,7 +15,7 @@
  * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
-#define LOGGROUP LOGGROUP_DEFAULT /** @todo: Log group */
+#define LOGGROUP LOGGROUP_DEFAULT /** @todo Log group */
 #include <iprt/err.h>
 #include <iprt/log.h>
 #include <iprt/assert.h>
@@ -199,6 +199,7 @@ int VDIoBackendMemTransfer(PVDIOBACKENDMEM pIoBackend, PVDMEMDISK pMemDisk,
 static DECLCALLBACK(int) vdIoBackendMemThread(RTTHREAD hThread, void *pvUser)
 {
     PVDIOBACKENDMEM pIoBackend = (PVDIOBACKENDMEM)pvUser;
+    RT_NOREF1(hThread);
 
     while (pIoBackend->fRunning)
     {
diff --git a/src/VBox/Storage/testcase/VDIoBackendMem.h b/src/VBox/Storage/testcase/VDIoBackendMem.h
index 3e1f5b8..eb77450 100644
--- a/src/VBox/Storage/testcase/VDIoBackendMem.h
+++ b/src/VBox/Storage/testcase/VDIoBackendMem.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2011 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Storage/testcase/VDIoRnd.cpp b/src/VBox/Storage/testcase/VDIoRnd.cpp
index a1bc9a0..c8d097d 100644
--- a/src/VBox/Storage/testcase/VDIoRnd.cpp
+++ b/src/VBox/Storage/testcase/VDIoRnd.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Storage/testcase/VDIoRnd.h b/src/VBox/Storage/testcase/VDIoRnd.h
index 79d4473..e875ede 100644
--- a/src/VBox/Storage/testcase/VDIoRnd.h
+++ b/src/VBox/Storage/testcase/VDIoRnd.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Storage/testcase/VDMemDisk.cpp b/src/VBox/Storage/testcase/VDMemDisk.cpp
index 8815b33..bab9f79 100644
--- a/src/VBox/Storage/testcase/VDMemDisk.cpp
+++ b/src/VBox/Storage/testcase/VDMemDisk.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2011 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -15,7 +15,7 @@
  * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
-#define LOGGROUP LOGGROUP_DEFAULT /** @todo: Log group */
+#define LOGGROUP LOGGROUP_DEFAULT /** @todo Log group */
 #include <iprt/err.h>
 #include <iprt/log.h>
 #include <iprt/assert.h>
@@ -78,6 +78,7 @@ int VDMemDiskCreate(PPVDMEMDISK ppMemDisk, uint64_t cbSize)
 
 static DECLCALLBACK(int) vdMemDiskDestroy(PAVLRU64NODECORE pNode, void *pvUser)
 {
+    RT_NOREF1(pvUser);
     PVDMEMDISKSEG pSeg = (PVDMEMDISKSEG)pNode;
     RTMemFree(pSeg->pvSeg);
     RTMemFree(pSeg);
@@ -145,7 +146,7 @@ int VDMemDiskWrite(PVDMEMDISK pMemDisk, uint64_t off, size_t cbWrite, PRTSGBUF p
                 else
                 {
                     bool fInserted = RTAvlrU64Insert(pMemDisk->pTreeSegments, &pSeg->Core);
-                    AssertMsg(fInserted, ("Bug!\n"));
+                    AssertMsg(fInserted, ("Bug!\n")); NOREF(fInserted);
                 }
             }
             else
@@ -161,7 +162,7 @@ int VDMemDiskWrite(PVDMEMDISK pMemDisk, uint64_t off, size_t cbWrite, PRTSGBUF p
         {
             AssertPtr(pSeg);
             size_t cbCopied = RTSgBufCopyToBuf(pSgBuf, (uint8_t *)pSeg->pvSeg + offSeg, cbRange);
-            Assert(cbCopied == cbRange);
+            Assert(cbCopied == cbRange); NOREF(cbCopied);
         }
 
         offCurr += cbRange;
@@ -258,7 +259,7 @@ int VDMemDiskSetSize(PVDMEMDISK pMemDisk, uint64_t cbSize)
                 pSeg->Core.KeyLast = cbSize - pSeg->Core.Key - 1;
 
                 bool fInserted = RTAvlrU64Insert(pMemDisk->pTreeSegments, &pSeg->Core);
-                AssertMsg(fInserted, ("Bug!\n"));
+                AssertMsg(fInserted, ("Bug!\n")); NOREF(fInserted);
             }
             else
             {
@@ -340,6 +341,7 @@ int VDMemDiskWriteToFile(PVDMEMDISK pMemDisk, const char *pcszFilename)
 
 int VDMemDiskReadFromFile(PVDMEMDISK pMemDisk, const char *pcszFilename)
 {
+    RT_NOREF2(pMemDisk, pcszFilename);
     return VERR_NOT_IMPLEMENTED;
 }
 
diff --git a/src/VBox/Storage/testcase/VDMemDisk.h b/src/VBox/Storage/testcase/VDMemDisk.h
index 5947abb..58e02d6 100644
--- a/src/VBox/Storage/testcase/VDMemDisk.h
+++ b/src/VBox/Storage/testcase/VDMemDisk.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Storage/testcase/VDScript.cpp b/src/VBox/Storage/testcase/VDScript.cpp
index 6b7df7e..1028d6d 100644
--- a/src/VBox/Storage/testcase/VDScript.cpp
+++ b/src/VBox/Storage/testcase/VDScript.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -308,7 +308,9 @@ static int vdScriptParseStatement(PVDSCRIPTCTXINT pThis, PVDSCRIPTASTSTMT *ppAst
 static int vdScriptParseExpression(PVDSCRIPTCTXINT pThis, PVDSCRIPTASTEXPR *ppAstNodeExpr);
 static int vdScriptParseAssignmentExpression(PVDSCRIPTCTXINT pThis, PVDSCRIPTASTEXPR *ppAstNodeExpr);
 static int vdScriptParseCastExpression(PVDSCRIPTCTXINT pThis, PVDSCRIPTASTEXPR *ppAstNodeExpr);
+#if 0 /* unused */
 static int vdScriptParseConstExpression(PVDSCRIPTCTXINT pThis, PVDSCRIPTASTEXPR *ppAstNodeExpr);
+#endif
 
 /**
  * Returns whether the tokenizer reached the end of the stream.
@@ -467,7 +469,7 @@ DECLINLINE(void) vdScriptTokenizerSkipWhitespace(PVDTOKENIZER pTokenizer)
 static void vdScriptTokenizerGetIdeOrKeyword(PVDTOKENIZER pTokenizer, PVDSCRIPTTOKEN pToken)
 {
     char ch;
-    size_t cchIde = 0;
+    unsigned cchIde = 0;
     bool fIsKeyword = false;
     const char *pszIde = pTokenizer->pszInput;
 
@@ -513,7 +515,6 @@ static void vdScriptTokenizerGetIdeOrKeyword(PVDTOKENIZER pTokenizer, PVDSCRIPTT
  */
 static void vdScriptTokenizerGetNumberConst(PVDTOKENIZER pTokenizer, PVDSCRIPTTOKEN pToken)
 {
-    unsigned uBase = 10;
     char *pszNext = NULL;
 
     Assert(RT_C_IS_DIGIT(vdScriptTokenizerGetCh(pTokenizer)));
@@ -521,8 +522,8 @@ static void vdScriptTokenizerGetNumberConst(PVDTOKENIZER pTokenizer, PVDSCRIPTTO
     /* Let RTStrToUInt64Ex() do all the work, looks C compliant :). */
     pToken->enmClass = VDTOKENCLASS_NUMCONST;
     int rc = RTStrToUInt64Ex(pTokenizer->pszInput, &pszNext, 0, &pToken->Class.NumConst.u64);
-    Assert(RT_SUCCESS(rc) || rc == VWRN_TRAILING_CHARS || rc == VWRN_TRAILING_SPACES);
-    /** @todo: Handle number to big, throw a warning */
+    Assert(RT_SUCCESS(rc) || rc == VWRN_TRAILING_CHARS || rc == VWRN_TRAILING_SPACES); NOREF(rc);
+    /** @todo Handle number to big, throw a warning */
 
     unsigned cchNumber = pszNext - pTokenizer->pszInput;
     for (unsigned i = 0; i < cchNumber; i++)
@@ -562,7 +563,7 @@ static void vdScriptTokenizerGetNumberConst(PVDTOKENIZER pTokenizer, PVDSCRIPTTO
  */
 static void vdScriptTokenizerGetStringConst(PVDTOKENIZER pTokenizer, PVDSCRIPTTOKEN pToken)
 {
-    size_t cchStr = 0;
+    unsigned cchStr = 0;
 
     Assert(vdScriptTokenizerGetCh(pTokenizer) == '\"');
     vdScriptTokenizerSkipCh(pTokenizer); /* Skip " */
@@ -626,9 +627,9 @@ static void vdScriptTokenizerGetOperatorOrPunctuator(PVDTOKENIZER pTokenizer, PV
             AssertRC(rc);
 
             pToken->enmClass = VDTOKENCLASS_OPERATORS;
-            pToken->Pos.iChEnd += g_aScriptOps[i].cchOp;
+            pToken->Pos.iChEnd += (unsigned)g_aScriptOps[i].cchOp;
 
-            /** @todo: Make this prettier. */
+            /** @todo Make this prettier. */
             for (unsigned j = 0; j < g_aScriptOps[i].cchOp; j++)
                 vdScriptTokenizerSkipCh(pTokenizer);
             fOpFound = true;
@@ -642,7 +643,7 @@ static void vdScriptTokenizerGetOperatorOrPunctuator(PVDTOKENIZER pTokenizer, PV
         {
             if (!RTStrNCmp(g_aScriptPunctuators[i].pszOp, pTokenizer->pszInput, g_aScriptPunctuators[i].cchOp))
             {
-                pToken->Pos.iChEnd += g_aScriptPunctuators[i].cchOp;
+                pToken->Pos.iChEnd += (unsigned)g_aScriptPunctuators[i].cchOp;
                 pToken->enmClass = VDTOKENCLASS_PUNCTUATOR;
                 pToken->Class.Punctuator.chPunctuator = *g_aScriptPunctuators[i].pszOp;
 
@@ -705,6 +706,7 @@ static PVDTOKENIZER vdScriptTokenizerCreate(const char *pszInput)
     return pTokenizer;
 }
 
+#if 0 /** @todo unused */
 /**
  * Destroys a given tokenizer state.
  *
@@ -715,6 +717,7 @@ static void vdScriptTokenizerDestroy(PVDTOKENIZER pTokenizer)
 {
     RTMemFree(pTokenizer);
 }
+#endif
 
 /**
  * Get the current token in the input stream.
@@ -886,9 +889,11 @@ static bool vdScriptTokenizerSkipIfIsOperatorEqual(PVDTOKENIZER pTokenizer, cons
  */
 static int vdScriptParserError(PVDSCRIPTCTXINT pThis, int rc, RT_SRC_POS_DECL, const char *pszFmt, ...)
 {
-    NOREF(pThis);
-    NOREF(pszFmt);
-    RTPrintf(pszFmt);
+    RT_NOREF1(pThis); RT_SRC_POS_NOREF();
+    va_list va;
+    va_start(va, pszFmt);
+    RTPrintfV(pszFmt, va);
+    va_end(va);
     return rc;
 }
 
@@ -917,7 +922,7 @@ static int vdScriptParseIde(PVDSCRIPTCTXINT pThis, PVDSCRIPTASTIDE *ppAstNodeIde
         {
             rc = RTStrCopyEx(pAstNodeIde->aszIde, pToken->Class.Ide.cchIde + 1, pToken->Class.Ide.pszIde, pToken->Class.Ide.cchIde);
             AssertRC(rc);
-            pAstNodeIde->cchIde = pToken->Class.Ide.cchIde;
+            pAstNodeIde->cchIde = (unsigned)pToken->Class.Ide.cchIde;
 
             *ppAstNodeIde = pAstNodeIde;
             vdScriptTokenizerConsume(pThis->pTokenizer);
@@ -1202,7 +1207,7 @@ static int vdScriptParseUnaryExpression(PVDSCRIPTCTXINT pThis, PVDSCRIPTASTEXPR
 
     LogFlowFunc(("pThis=%p ppAstNodeExpr=%p\n", pThis, ppAstNodeExpr));
 
-    /** @todo: Think about a more beautiful way of parsing this. */
+    /** @todo Think about a more beautiful way of parsing this. */
     while (true)
     {
         bool fQuit = false;
@@ -1301,6 +1306,7 @@ static int vdScriptParseUnaryExpression(PVDSCRIPTCTXINT pThis, PVDSCRIPTASTEXPR
     return rc;
 }
 
+#if 0 /* unused */
 /**
  * Parse a storage class specifier.
  *
@@ -1332,7 +1338,9 @@ static void vdScriptParseStorageClassSpecifier(PVDSCRIPTCTXINT pThis, PVDSCRIPTA
     else if (vdScriptTokenizerSkipIfIsKeywordEqual(pThis->pTokenizer, VDSCRIPTTOKENKEYWORD_REGISTER))
         *penmStorageClass = VDSCRIPTASTSTORAGECLASS_REGISTER;
 }
+#endif /* unused */
 
+#if 0 /* unused */
 /**
  * Parse a type qualifier.
  *
@@ -1358,6 +1366,7 @@ static void vdScriptParseTypeQualifier(PVDSCRIPTCTXINT pThis, PVDSCRIPTASTTYPEQU
     else if (vdScriptTokenizerSkipIfIsKeywordEqual(pThis->pTokenizer, VDSCRIPTTOKENKEYWORD_VOLATILE))
         *penmTypeQualifier = VDSCRIPTASTTYPEQUALIFIER_VOLATILE;
 }
+#endif /* unused */
 
 #if 0
 /**
@@ -1425,7 +1434,6 @@ static int vdScriptParseTypeSpecifier(PVDSCRIPTCTXINT pThis, )
 static int vdScriptParseCastExpression(PVDSCRIPTCTXINT pThis, PVDSCRIPTASTEXPR *ppAstNodeExpr)
 {
     int rc = VINF_SUCCESS;
-    PVDSCRIPTASTEXPR pExpr = NULL;
 
     LogFlowFunc(("pThis=%p ppAstNodeExpr=%p\n", pThis, ppAstNodeExpr));
 
@@ -1441,7 +1449,7 @@ static int vdScriptParseCastExpression(PVDSCRIPTCTXINT pThis, PVDSCRIPTASTEXPR *
             if (pExpr)
             {
                 pExpr->enmType = VDSCRIPTEXPRTYPE_CAST;
-                rc = vdScriptParseCastExpression(pThis, &pExpr->Cast.pExpr); /** @todo: Kill recursion. */
+                rc = vdScriptParseCastExpression(pThis, &pExpr->Cast.pExpr); /** @todo Kill recursion. */
                 if (RT_SUCCESS(rc))
                     pExpr->Cast.pTypeName = pTypeName;
                 else
@@ -2058,6 +2066,7 @@ static int vdScriptParseCondExpression(PVDSCRIPTCTXINT pThis, PVDSCRIPTASTEXPR *
     return vdScriptParseLogicalOrExpression(pThis, ppAstNodeExpr);
 }
 
+#if 0 /* unused */
 /**
  * Parse a constant expression.
  *
@@ -2073,6 +2082,7 @@ static int vdScriptParseConstExpression(PVDSCRIPTCTXINT pThis, PVDSCRIPTASTEXPR
 {
     return vdScriptParseCondExpression(pThis, ppAstNodeExpr);
 }
+#endif
 
 /**
  * Parse an assignment expression.
@@ -2513,6 +2523,7 @@ static int vdScriptParseFor(PVDSCRIPTCTXINT pThis, PVDSCRIPTASTFOR pAstNodeFor)
 static int vdScriptParseDeclaration(PVDSCRIPTCTXINT pThis, PVDSCRIPTASTDECL *ppAstNodeDecl)
 {
     int rc = VERR_NOT_IMPLEMENTED;
+    RT_NOREF2(pThis, ppAstNodeDecl);
     return rc;
 }
 
@@ -2805,7 +2816,7 @@ static int vdScriptParseAddFnDef(PVDSCRIPTCTXINT pThis)
                                 pFn->Core.cchString = strlen(pFn->Core.pszString);
                                 pFn->fExternal      = false;
                                 pFn->Type.Internal.pAstFn = pAstNodeFn;
-                                /** @todo: Parameters. */
+                                /** @todo Parameters. */
                                 RTStrSpaceInsert(&pThis->hStrSpaceFn, &pFn->Core);
                             }
                             else
@@ -2927,7 +2938,7 @@ DECLHIDDEN(int) VDScriptCtxCallbacksRegister(VDSCRIPTCTX hScriptCtx, PCVDSCRIPTC
     AssertPtrReturn(paCallbacks, VERR_INVALID_POINTER);
     AssertReturn(cCallbacks > 0, VERR_INVALID_PARAMETER);
 
-    /** @todo: Unregister already registered callbacks in case of an error. */
+    /** @todo Unregister already registered callbacks in case of an error. */
     do
     {
         PVDSCRIPTFN pFn = NULL;
@@ -2945,7 +2956,7 @@ DECLHIDDEN(int) VDScriptCtxCallbacksRegister(VDSCRIPTCTX hScriptCtx, PCVDSCRIPTC
             break;
         }
 
-        /** @todo: Validate argument and returns types. */
+        /** @todo Validate argument and returns types. */
         pFn->Core.pszString            = paCallbacks->pszFnName;
         pFn->Core.cchString            = strlen(pFn->Core.pszString);
         pFn->fExternal                 = true;
diff --git a/src/VBox/Storage/testcase/VDScript.h b/src/VBox/Storage/testcase/VDScript.h
index 93d6455..3437640 100644
--- a/src/VBox/Storage/testcase/VDScript.h
+++ b/src/VBox/Storage/testcase/VDScript.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Storage/testcase/VDScriptAst.cpp b/src/VBox/Storage/testcase/VDScriptAst.cpp
index b7774c9..dd37be7 100644
--- a/src/VBox/Storage/testcase/VDScriptAst.cpp
+++ b/src/VBox/Storage/testcase/VDScriptAst.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -346,7 +346,7 @@ DECLHIDDEN(PVDSCRIPTASTCORE) vdScriptAstNodeAlloc(VDSCRIPTASTCLASS enmClass)
     return pAstNode;
 }
 
-DECLHIDDEN(PVDSCRIPTASTIDE) vdScriptAstNodeIdeAlloc(unsigned cchIde)
+DECLHIDDEN(PVDSCRIPTASTIDE) vdScriptAstNodeIdeAlloc(size_t cchIde)
 {
     PVDSCRIPTASTIDE pAstNode = (PVDSCRIPTASTIDE)RTMemAllocZ(RT_OFFSETOF(VDSCRIPTASTIDE, aszIde[cchIde + 1]));
     if (pAstNode)
diff --git a/src/VBox/Storage/testcase/VDScriptAst.h b/src/VBox/Storage/testcase/VDScriptAst.h
index ae6b1ef..68e049d 100644
--- a/src/VBox/Storage/testcase/VDScriptAst.h
+++ b/src/VBox/Storage/testcase/VDScriptAst.h
@@ -1,10 +1,9 @@
 /** @file
- *
  * VBox HDD container test utility - scripting engine, AST related structures.
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -14,8 +13,9 @@
  * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
-#ifndef _VDScriptAst_h__
-#define _VDScriptAst_h__
+
+#ifndef ___VDScriptAst_h___
+#define ___VDScriptAst_h___
 
 #include <iprt/list.h>
 
@@ -576,6 +576,7 @@ DECLHIDDEN(PVDSCRIPTASTCORE) vdScriptAstNodeAlloc(VDSCRIPTASTCLASS enmClass);
  *          NULL if out of memory.
  * @param   cchIde      Number of characters which can be stored in the node.
  */
-DECLHIDDEN(PVDSCRIPTASTIDE) vdScriptAstNodeIdeAlloc(unsigned cchIde);
+DECLHIDDEN(PVDSCRIPTASTIDE) vdScriptAstNodeIdeAlloc(size_t cchIde);
+
+#endif
 
-#endif /* _VDScriptAst_h__ */
diff --git a/src/VBox/Storage/testcase/VDScriptChecker.cpp b/src/VBox/Storage/testcase/VDScriptChecker.cpp
index 42dfd51..81d7363 100644
--- a/src/VBox/Storage/testcase/VDScriptChecker.cpp
+++ b/src/VBox/Storage/testcase/VDScriptChecker.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -27,5 +27,6 @@
 
 DECLHIDDEN(int) vdScriptCtxCheck(PVDSCRIPTCTXINT pThis)
 {
+    RT_NOREF1(pThis);
     return VERR_NOT_IMPLEMENTED;
 }
diff --git a/src/VBox/Storage/testcase/VDScriptInternal.h b/src/VBox/Storage/testcase/VDScriptInternal.h
index 9e1b78a..de9e9f2 100644
--- a/src/VBox/Storage/testcase/VDScriptInternal.h
+++ b/src/VBox/Storage/testcase/VDScriptInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Storage/testcase/VDScriptInterp.cpp b/src/VBox/Storage/testcase/VDScriptInterp.cpp
index 27f2bd1..8eca4b9 100644
--- a/src/VBox/Storage/testcase/VDScriptInterp.cpp
+++ b/src/VBox/Storage/testcase/VDScriptInterp.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -162,7 +162,11 @@ typedef VDSCRIPTINTERPCTRL *PVDSCRIPTINTERPCTRL;
  */
 static int vdScriptInterpreterError(PVDSCRIPTINTERPCTX pThis, int rc, RT_SRC_POS_DECL, const char *pszFmt, ...)
 {
-    RTPrintf(pszFmt);
+    RT_NOREF1(pThis); RT_SRC_POS_NOREF();
+    va_list va;
+    va_start(va, pszFmt);
+    RTPrintfV(pszFmt, va);
+    va_end(va);
     return rc;
 }
 
@@ -384,6 +388,7 @@ DECLINLINE(int) vdScriptInterpreterPushForCtrlEntry(PVDSCRIPTINTERPCTX pThis, PV
  */
 static DECLCALLBACK(int) vdScriptInterpreterVarSpaceDestroy(PRTSTRSPACECORE pStr, void *pvUser)
 {
+    RT_NOREF1(pvUser);
     RTMemFree(pStr);
     return VINF_SUCCESS;
 }
@@ -590,7 +595,7 @@ static int vdScriptInterpreterEvaluateStatement(PVDSCRIPTINTERPCTX pThis, PVDSCR
             rc = vdScriptInterpreterScopeCreate(pThis);
             if (RT_SUCCESS(rc))
             {
-                /** @todo: Declarations */
+                /** @todo Declarations */
                 rc = vdScriptInterpreterPushCompoundCtrlEntry(pThis, pStmt);
             }
             break;
@@ -778,7 +783,7 @@ static int vdScriptInterpreterFnCall(PVDSCRIPTINTERPCTX pThis, PVDSCRIPTFN pFn)
                         pVar->Core.cchString = pArg->pArgIde->cchIde;
                         vdScriptInterpreterPopValue(pThis, &pVar->Value);
                         bool fInserted = RTStrSpaceInsert(&pFnCall->ScopeRoot.hStrSpaceVar, &pVar->Core);
-                        Assert(fInserted);
+                        Assert(fInserted); RT_NOREF_PV(fInserted);
                     }
                     else
                     {
@@ -1002,6 +1007,7 @@ DECLHIDDEN(int) vdScriptCtxInterprete(PVDSCRIPTCTXINT pThis, const char *pszFn,
                                       PVDSCRIPTARG paArgs, unsigned cArgs,
                                       PVDSCRIPTARG pRet)
 {
+    RT_NOREF1(pRet);
     int rc = VINF_SUCCESS;
     VDSCRIPTINTERPCTX InterpCtx;
     PVDSCRIPTFN pFn = NULL;
@@ -1022,7 +1028,7 @@ DECLHIDDEN(int) vdScriptCtxInterprete(PVDSCRIPTCTXINT pThis, const char *pszFn,
         if (cArgs == pFn->cArgs)
         {
             /* Push the arguments onto the stack. */
-            /** @todo: Check expected and given argument types. */
+            /** @todo Check expected and given argument types. */
             for (unsigned i = 0; i < cArgs; i++)
             {
                 PVDSCRIPTARG pArg = (PVDSCRIPTARG)vdScriptStackGetUnused(&InterpCtx.StackValues);
diff --git a/src/VBox/Storage/testcase/VDScriptStack.h b/src/VBox/Storage/testcase/VDScriptStack.h
index 93eb1c3..9331de3 100644
--- a/src/VBox/Storage/testcase/VDScriptStack.h
+++ b/src/VBox/Storage/testcase/VDScriptStack.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Storage/testcase/tstVD-2.cpp b/src/VBox/Storage/testcase/tstVD-2.cpp
index 3dc1fc2..d850195 100644
--- a/src/VBox/Storage/testcase/tstVD-2.cpp
+++ b/src/VBox/Storage/testcase/tstVD-2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -45,6 +45,7 @@ static struct KeyValuePair {
 
 static DECLCALLBACK(bool) tstAreKeysValid(void *pvUser, const char *pszzValid)
 {
+    RT_NOREF2(pvUser, pszzValid);
     return true;
 }
 
@@ -58,6 +59,7 @@ static const char *tstGetValueByKey(const char *pszKey)
 
 static DECLCALLBACK(int) tstQuerySize(void *pvUser, const char *pszName, size_t *pcbValue)
 {
+    RT_NOREF1(pvUser);
     const char *pszValue = tstGetValueByKey(pszName);
     if (!pszValue)
         return VERR_CFGM_VALUE_NOT_FOUND;
@@ -67,6 +69,7 @@ static DECLCALLBACK(int) tstQuerySize(void *pvUser, const char *pszName, size_t
 
 static DECLCALLBACK(int) tstQuery(void *pvUser, const char *pszName, char *pszValue, size_t cchValue)
 {
+    RT_NOREF1(pvUser);
     const char *pszTmp = tstGetValueByKey(pszName);
     if (!pszValue)
         return VERR_CFGM_VALUE_NOT_FOUND;
diff --git a/src/VBox/Storage/testcase/tstVD.cpp b/src/VBox/Storage/testcase/tstVD.cpp
index d9df6cf..b4fe098 100644
--- a/src/VBox/Storage/testcase/tstVD.cpp
+++ b/src/VBox/Storage/testcase/tstVD.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -47,6 +47,7 @@ unsigned g_cErrors = 0;
 
 static DECLCALLBACK(void) tstVDError(void *pvUser, int rc, RT_SRC_POS_DECL, const char *pszFormat, va_list va)
 {
+    RT_NOREF1(pvUser);
     g_cErrors++;
     RTPrintf("tstVD: Error %Rrc at %s:%u (%s): ", rc, RT_SRC_POS_ARGS);
     RTPrintfV(pszFormat, va);
@@ -55,6 +56,7 @@ static DECLCALLBACK(void) tstVDError(void *pvUser, int rc, RT_SRC_POS_DECL, cons
 
 static DECLCALLBACK(int) tstVDMessage(void *pvUser, const char *pszFormat, va_list va)
 {
+    RT_NOREF1(pvUser);
     RTPrintf("tstVD: ");
     RTPrintfV(pszFormat, va);
     return VINF_SUCCESS;
@@ -119,9 +121,7 @@ static int tstVDCreateDelete(const char *pszBackend, const char *pszFilename,
 static int tstVDOpenDelete(const char *pszBackend, const char *pszFilename)
 {
     int rc;
-    PVBOXHDD pVD = NULL;
-    VDGEOMETRY       PCHS = { 0, 0, 0 };
-    VDGEOMETRY       LCHS = { 0, 0, 0 };
+    PVBOXHDD         pVD = NULL;
     PVDINTERFACE     pVDIfs = NULL;
     VDINTERFACEERROR VDIfError;
 
@@ -403,6 +403,8 @@ static void generateRandomSegments(PRNDCTX pCtx, PSEGMENT pSegment, uint32_t nSe
 
 static void mergeSegments(PSEGMENT pBaseSegment, PSEGMENT pDiffSegment, PSEGMENT pMergeSegment, uint32_t u32MaxLength)
 {
+    RT_NOREF1(u32MaxLength);
+
     while (pBaseSegment->u32Length > 0 || pDiffSegment->u32Length > 0)
     {
         if (pBaseSegment->u64Offset < pDiffSegment->u64Offset)
diff --git a/src/VBox/Storage/testcase/tstVDFill.cpp b/src/VBox/Storage/testcase/tstVDFill.cpp
index a9e7e5c..32f421c 100644
--- a/src/VBox/Storage/testcase/tstVDFill.cpp
+++ b/src/VBox/Storage/testcase/tstVDFill.cpp
@@ -28,6 +28,7 @@
 #include <iprt/getopt.h>
 #include <iprt/rand.h>
 
+
 /*********************************************************************************************************************************
 *   Global Variables                                                                                                             *
 *********************************************************************************************************************************/
@@ -40,6 +41,7 @@ RTRAND   g_hRand;
 
 static DECLCALLBACK(void) tstVDError(void *pvUser, int rc, RT_SRC_POS_DECL, const char *pszFormat, va_list va)
 {
+    RT_NOREF1(pvUser);
     g_cErrors++;
     RTPrintf("tstVDFill: Error %Rrc at %s:%u (%s): ", rc, RT_SRC_POS_ARGS);
     RTPrintfV(pszFormat, va);
@@ -48,6 +50,7 @@ static DECLCALLBACK(void) tstVDError(void *pvUser, int rc, RT_SRC_POS_DECL, cons
 
 static DECLCALLBACK(int) tstVDMessage(void *pvUser, const char *pszFormat, va_list va)
 {
+    RT_NOREF1(pvUser);
     RTPrintf("tstVDFill: ");
     RTPrintfV(pszFormat, va);
     return VINF_SUCCESS;
diff --git a/src/VBox/Storage/testcase/tstVDIo.cpp b/src/VBox/Storage/testcase/tstVDIo.cpp
index e502188..a75aaa6 100644
--- a/src/VBox/Storage/testcase/tstVDIo.cpp
+++ b/src/VBox/Storage/testcase/tstVDIo.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2011-2014 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -506,14 +506,18 @@ const VDSCRIPTCALLBACK g_aScriptActions[] =
 
 const unsigned g_cScriptActions = RT_ELEMENTS(g_aScriptActions);
 
+#if 0 /* unused */
 static DECLCALLBACK(int) vdScriptCallbackPrint(PVDSCRIPTARG paScriptArgs, void *pvUser)
 {
+    NOREF(pvUser);
     RTPrintf(paScriptArgs[0].psz);
     return VINF_SUCCESS;
 }
+#endif /* unused */
 
 static DECLCALLBACK(void) tstVDError(void *pvUser, int rc, RT_SRC_POS_DECL, const char *pszFormat, va_list va)
 {
+    NOREF(pvUser);
     RTPrintf("tstVDIo: Error %Rrc at %s:%u (%s): ", rc, RT_SRC_POS_ARGS);
     RTPrintfV(pszFormat, va);
     RTPrintf("\n");
@@ -521,6 +525,7 @@ static DECLCALLBACK(void) tstVDError(void *pvUser, int rc, RT_SRC_POS_DECL, cons
 
 static DECLCALLBACK(int) tstVDMessage(void *pvUser, const char *pszFormat, va_list va)
 {
+    NOREF(pvUser);
     RTPrintf("tstVDIo: ");
     RTPrintfV(pszFormat, va);
     return VINF_SUCCESS;
@@ -544,18 +549,11 @@ static DECLCALLBACK(int) vdScriptHandlerCreate(PVDSCRIPTARG paScriptArgs, void *
 {
     int rc = VINF_SUCCESS;
     PVDTESTGLOB pGlob = (PVDTESTGLOB)pvUser;
-    uint64_t cbSize = 0;
-    const char *pcszBackend = NULL;
-    const char *pcszImage = NULL;
-    const char *pcszDisk = NULL;
     PVDDISK pDisk = NULL;
     bool fBase = false;
     bool fDynamic = true;
-    bool fIgnoreFlush = false;
-    bool fHonorSame = false;
-    PVDIOBACKEND pIoBackend = NULL;
 
-    pcszDisk = paScriptArgs[0].psz;
+    const char *pcszDisk = paScriptArgs[0].psz;
     if (!RTStrICmp(paScriptArgs[1].psz, "base"))
         fBase = true;
     else if (!RTStrICmp(paScriptArgs[1].psz, "diff"))
@@ -565,7 +563,7 @@ static DECLCALLBACK(int) vdScriptHandlerCreate(PVDSCRIPTARG paScriptArgs, void *
         RTPrintf("Invalid image mode '%s' given\n", paScriptArgs[1].psz);
         rc = VERR_INVALID_PARAMETER;
     }
-    pcszImage = paScriptArgs[2].psz;
+    const char *pcszImage = paScriptArgs[2].psz;
     if (!RTStrICmp(paScriptArgs[3].psz, "fixed"))
         fDynamic = false;
     else if (!RTStrICmp(paScriptArgs[3].psz, "dynamic"))
@@ -575,10 +573,10 @@ static DECLCALLBACK(int) vdScriptHandlerCreate(PVDSCRIPTARG paScriptArgs, void *
         RTPrintf("Invalid image type '%s' given\n", paScriptArgs[3].psz);
         rc = VERR_INVALID_PARAMETER;
     }
-    pcszBackend = paScriptArgs[4].psz;
-    cbSize = paScriptArgs[5].u64;
-    fIgnoreFlush = paScriptArgs[6].f;
-    fHonorSame = paScriptArgs[7].f;
+    const char *pcszBackend = paScriptArgs[4].psz;
+    uint64_t cbSize = paScriptArgs[5].u64;
+    bool fIgnoreFlush = paScriptArgs[6].f;
+    bool fHonorSame = paScriptArgs[7].f;
 
     if (RT_SUCCESS(rc))
     {
@@ -616,26 +614,17 @@ static DECLCALLBACK(int) vdScriptHandlerOpen(PVDSCRIPTARG paScriptArgs, void *pv
 {
     int rc = VINF_SUCCESS;
     PVDTESTGLOB pGlob = (PVDTESTGLOB)pvUser;
-    const char *pcszBackend = NULL;
-    const char *pcszImage = NULL;
-    const char *pcszDisk = NULL;
     PVDDISK pDisk = NULL;
-    bool fShareable = false;
-    bool fReadonly = false;
-    bool fAsyncIo  = true;
-    bool fDiscard  = false;
-    bool fIgnoreFlush = false;
-    bool fHonorSame = false;
 
-    pcszDisk = paScriptArgs[0].psz;
-    pcszImage = paScriptArgs[1].psz;
-    pcszBackend = paScriptArgs[2].psz;
-    fShareable = paScriptArgs[3].f;
-    fReadonly = paScriptArgs[4].f;
-    fAsyncIo = paScriptArgs[5].f;
-    fDiscard = paScriptArgs[6].f;
-    fIgnoreFlush = paScriptArgs[7].f;
-    fHonorSame = paScriptArgs[8].f;
+    const char *pcszDisk = paScriptArgs[0].psz;
+    const char *pcszImage = paScriptArgs[1].psz;
+    const char *pcszBackend = paScriptArgs[2].psz;
+    bool fShareable = paScriptArgs[3].f;
+    bool fReadonly = paScriptArgs[4].f;
+    bool fAsyncIo = paScriptArgs[5].f;
+    bool fDiscard = paScriptArgs[6].f;
+    bool fIgnoreFlush = paScriptArgs[7].f;
+    bool fHonorSame = paScriptArgs[8].f;
 
     if (RT_SUCCESS(rc))
     {
@@ -685,7 +674,6 @@ static uint64_t tstVDIoGetSpeedKBs(uint64_t cbIo, uint64_t tsNano)
      * a result.
      */
     uint64_t cbIoTemp = cbIo;
-    uint64_t uSpeedKBs;
     unsigned cRounds = 0;
     while (cbIoTemp < tsNano)
     {
@@ -693,7 +681,7 @@ static uint64_t tstVDIoGetSpeedKBs(uint64_t cbIo, uint64_t tsNano)
         cRounds++;
     }
 
-    uSpeedKBs = ((cbIoTemp / tsNano) * RT_NS_1SEC) / 1024;
+    uint64_t uSpeedKBs = ((cbIoTemp / tsNano) * RT_NS_1SEC) / 1024;
 
     while (cRounds-- > 0)
         uSpeedKBs /= 1000;
@@ -705,24 +693,13 @@ static DECLCALLBACK(int) vdScriptHandlerIo(PVDSCRIPTARG paScriptArgs, void *pvUs
 {
     int rc = VINF_SUCCESS;
     PVDTESTGLOB pGlob = (PVDTESTGLOB)pvUser;
-    bool fAsync = false;
     bool fRandomAcc = false;
-    uint64_t cbIo = 0;
-    uint64_t cbBlkSize = 0;
-    bool fDataProviderRnd = false;
-    bool fPrintStats = false;
-    uint64_t offStart = 0;
-    uint64_t offEnd = 0;
-    unsigned cMaxReqs = 0;
-    uint8_t uWriteChance = 0;
-    const char *pcszDisk = NULL;
-    const char *pcszPattern = NULL;
     PVDDISK pDisk = NULL;
     PVDPATTERN pPattern = NULL;
 
-    pcszDisk = paScriptArgs[0].psz;
-    fAsync   = paScriptArgs[1].f;
-    cMaxReqs = paScriptArgs[2].u64;
+    const char *pcszDisk = paScriptArgs[0].psz;
+    bool        fAsync   = paScriptArgs[1].f;
+    unsigned    cMaxReqs = (unsigned)paScriptArgs[2].u64;
     if (!RTStrICmp(paScriptArgs[3].psz, "seq"))
         fRandomAcc = false;
     else if (!RTStrICmp(paScriptArgs[3].psz, "rnd"))
@@ -732,12 +709,12 @@ static DECLCALLBACK(int) vdScriptHandlerIo(PVDSCRIPTARG paScriptArgs, void *pvUs
         RTPrintf("Invalid access mode '%s'\n", paScriptArgs[3].psz);
         rc = VERR_INVALID_PARAMETER;
     }
-    cbBlkSize = paScriptArgs[4].u64;
-    offStart = paScriptArgs[5].u64;
-    offEnd = paScriptArgs[6].u64;
-    cbIo = paScriptArgs[7].u64;
-    uWriteChance = (uint8_t)paScriptArgs[8].u64;
-    pcszPattern = paScriptArgs[9].psz;
+    uint64_t    cbBlkSize = paScriptArgs[4].u64;
+    uint64_t    offStart = paScriptArgs[5].u64;
+    uint64_t    offEnd = paScriptArgs[6].u64;
+    uint64_t    cbIo = paScriptArgs[7].u64;
+    uint8_t     uWriteChance = (uint8_t)paScriptArgs[8].u64;
+    const char *pcszPattern = paScriptArgs[9].psz;
 
     if (   RT_SUCCESS(rc)
         && fAsync
@@ -1021,12 +998,9 @@ static DECLCALLBACK(int) vdScriptHandlerFlush(PVDSCRIPTARG paScriptArgs, void *p
 {
     int rc = VINF_SUCCESS;
     PVDTESTGLOB pGlob = (PVDTESTGLOB)pvUser;
-    bool fAsync = false;
-    const char *pcszDisk = NULL;
     PVDDISK pDisk = NULL;
-
-    pcszDisk = paScriptArgs[0].psz;
-    fAsync   = paScriptArgs[1].f;
+    const char *pcszDisk = paScriptArgs[0].psz;
+    bool        fAsync   = paScriptArgs[1].f;
 
     if (RT_SUCCESS(rc))
     {
@@ -1068,21 +1042,17 @@ static DECLCALLBACK(int) vdScriptHandlerMerge(PVDSCRIPTARG paScriptArgs, void *p
 {
     int rc = VINF_SUCCESS;
     PVDTESTGLOB pGlob = (PVDTESTGLOB)pvUser;
-    const char *pcszDisk = NULL;
     PVDDISK pDisk = NULL;
-    unsigned nImageFrom = 0;
-    unsigned nImageTo = 0;
-
-    pcszDisk   = paScriptArgs[0].psz;
-    nImageFrom = paScriptArgs[1].u32;
-    nImageTo   = paScriptArgs[2].u32;
+    const char *pcszDisk   = paScriptArgs[0].psz;
+    unsigned    nImageFrom = paScriptArgs[1].u32;
+    unsigned    nImageTo   = paScriptArgs[2].u32;
 
     pDisk = tstVDIoGetDiskByName(pGlob, pcszDisk);
     if (!pDisk)
         rc = VERR_NOT_FOUND;
     else
     {
-        /** @todo: Provide progress interface to test that cancelation
+        /** @todo Provide progress interface to test that cancelation
          * doesn't corrupt the data.
          */
         rc = VDMerge(pDisk->pVD, nImageFrom, nImageTo, NULL);
@@ -1095,19 +1065,16 @@ static DECLCALLBACK(int) vdScriptHandlerCompact(PVDSCRIPTARG paScriptArgs, void
 {
     int rc = VINF_SUCCESS;
     PVDTESTGLOB pGlob = (PVDTESTGLOB)pvUser;
-    const char *pcszDisk = NULL;
     PVDDISK pDisk = NULL;
-    unsigned nImage = 0;
-
-    pcszDisk = paScriptArgs[0].psz;
-    nImage   = paScriptArgs[1].u32;
+    const char *pcszDisk = paScriptArgs[0].psz;
+    unsigned    nImage   = paScriptArgs[1].u32;
 
     pDisk = tstVDIoGetDiskByName(pGlob, pcszDisk);
     if (!pDisk)
         rc = VERR_NOT_FOUND;
     else
     {
-        /** @todo: Provide progress interface to test that cancelation
+        /** @todo Provide progress interface to test that cancelation
          * doesn't corrupt the data.
          */
         rc = VDCompact(pDisk->pVD, nImage, NULL);
@@ -1120,14 +1087,10 @@ static DECLCALLBACK(int) vdScriptHandlerDiscard(PVDSCRIPTARG paScriptArgs, void
 {
     int rc = VINF_SUCCESS;
     PVDTESTGLOB pGlob = (PVDTESTGLOB)pvUser;
-    const char *pcszDisk = NULL;
     PVDDISK pDisk = NULL;
-    bool fAsync = false;
-    const char *pcszRanges = NULL;
-
-    pcszDisk   = paScriptArgs[0].psz;
-    fAsync     = paScriptArgs[1].f;
-    pcszRanges = paScriptArgs[2].psz;
+    const char *pcszDisk   = paScriptArgs[0].psz;
+    bool        fAsync     = paScriptArgs[1].f;
+    const char *pcszRanges = paScriptArgs[2].psz;
 
     pDisk = tstVDIoGetDiskByName(pGlob, pcszDisk);
     if (!pDisk)
@@ -1337,27 +1300,17 @@ static DECLCALLBACK(int) vdScriptHandlerCopy(PVDSCRIPTARG paScriptArgs, void *pv
 {
     int rc = VINF_SUCCESS;
     PVDTESTGLOB pGlob = (PVDTESTGLOB)pvUser;
-    const char *pcszDiskFrom = NULL;
-    const char *pcszDiskTo = NULL;
     PVDDISK pDiskFrom = NULL;
     PVDDISK pDiskTo = NULL;
-    unsigned nImageFrom = 0;
-    const char *pcszBackend = NULL;
-    const char *pcszFilename = NULL;
-    bool fMoveByRename = false;
-    uint64_t cbSize = 0;
-    unsigned nImageFromSame = VD_IMAGE_CONTENT_UNKNOWN;
-    unsigned nImageToSame = VD_IMAGE_CONTENT_UNKNOWN;
-
-    pcszDiskFrom   = paScriptArgs[0].psz;
-    pcszDiskTo     = paScriptArgs[1].psz;
-    nImageFrom     = paScriptArgs[2].u32;
-    pcszBackend    = paScriptArgs[3].psz;
-    pcszFilename   = paScriptArgs[4].psz;
-    fMoveByRename  = paScriptArgs[5].f;
-    cbSize         = paScriptArgs[6].u64;
-    nImageFromSame = paScriptArgs[7].u32;
-    nImageToSame   = paScriptArgs[8].u32;
+    const char *pcszDiskFrom   = paScriptArgs[0].psz;
+    const char *pcszDiskTo     = paScriptArgs[1].psz;
+    unsigned    nImageFrom     = paScriptArgs[2].u32;
+    const char *pcszBackend    = paScriptArgs[3].psz;
+    const char *pcszFilename   = paScriptArgs[4].psz;
+    bool        fMoveByRename  = paScriptArgs[5].f;
+    uint64_t    cbSize         = paScriptArgs[6].u64;
+    unsigned    nImageFromSame = paScriptArgs[7].u32;
+    unsigned    nImageToSame   = paScriptArgs[8].u32;
 
     pDiskFrom = tstVDIoGetDiskByName(pGlob, pcszDiskFrom);
     pDiskTo = tstVDIoGetDiskByName(pGlob, pcszDiskTo);
@@ -1365,7 +1318,7 @@ static DECLCALLBACK(int) vdScriptHandlerCopy(PVDSCRIPTARG paScriptArgs, void *pv
         rc = VERR_NOT_FOUND;
     else
     {
-        /** @todo: Provide progress interface to test that cancelation
+        /** @todo Provide progress interface to test that cancelation
          * works as intended.
          */
         rc = VDCopyEx(pDiskFrom->pVD, nImageFrom, pDiskTo->pVD, pcszBackend, pcszFilename,
@@ -1426,12 +1379,9 @@ static DECLCALLBACK(int) vdScriptHandlerPrintFileSize(PVDSCRIPTARG paScriptArgs,
 {
     int rc = VINF_SUCCESS;
     PVDTESTGLOB pGlob = (PVDTESTGLOB)pvUser;
-    const char *pcszDisk = NULL;
     PVDDISK pDisk = NULL;
-    unsigned nImage = 0;
-
-    pcszDisk = paScriptArgs[0].psz;
-    nImage   = paScriptArgs[1].u32;
+    const char *pcszDisk = paScriptArgs[0].psz;
+    uint32_t nImage   = paScriptArgs[1].u32;
 
     pDisk = tstVDIoGetDiskByName(pGlob, pcszDisk);
     if (pDisk)
@@ -1448,12 +1398,9 @@ static DECLCALLBACK(int) vdScriptHandlerIoLogReplay(PVDSCRIPTARG paScriptArgs, v
 {
     int rc = VINF_SUCCESS;
     PVDTESTGLOB pGlob = (PVDTESTGLOB)pvUser;
-    const char *pcszDisk = NULL;
     PVDDISK pDisk = NULL;
-    const char *pcszIoLog = NULL;
-
-    pcszDisk  = paScriptArgs[0].psz;
-    pcszIoLog = paScriptArgs[1].psz;
+    const char *pcszDisk  = paScriptArgs[0].psz;
+    const char *pcszIoLog = paScriptArgs[1].psz;
 
     pDisk = tstVDIoGetDiskByName(pGlob, pcszDisk);
     if (pDisk)
@@ -1594,20 +1541,16 @@ static DECLCALLBACK(int) vdScriptHandlerIoLogReplay(PVDSCRIPTARG paScriptArgs, v
 
     return rc;
 }
-#endif
+#endif /* VBOX_TSTVDIO_WITH_LOG_REPLAY */
 
 
 static DECLCALLBACK(int) vdScriptHandlerIoRngCreate(PVDSCRIPTARG paScriptArgs, void *pvUser)
 {
     int rc = VINF_SUCCESS;
     PVDTESTGLOB pGlob = (PVDTESTGLOB)pvUser;
-    size_t cbPattern = 0;
-    uint64_t uSeed = 0;
-    const char *pcszSeeder = NULL;
-
-    cbPattern  = paScriptArgs[0].u64;
-    pcszSeeder = paScriptArgs[1].psz;
-    uSeed      = paScriptArgs[2].u64;
+    size_t cbPattern = (size_t)paScriptArgs[0].u64;
+    const char *pcszSeeder = paScriptArgs[1].psz;
+    uint64_t  uSeed = paScriptArgs[2].u64;
 
     if (pGlob->pIoRnd)
     {
@@ -1642,6 +1585,7 @@ static DECLCALLBACK(int) vdScriptHandlerIoRngCreate(PVDSCRIPTARG paScriptArgs, v
 
 static DECLCALLBACK(int) vdScriptHandlerIoRngDestroy(PVDSCRIPTARG paScriptArgs, void *pvUser)
 {
+    RT_NOREF1(paScriptArgs);
     PVDTESTGLOB pGlob = (PVDTESTGLOB)pvUser;
 
     if (pGlob->pIoRnd)
@@ -1659,13 +1603,9 @@ static DECLCALLBACK(int) vdScriptHandlerIoPatternCreateFromNumber(PVDSCRIPTARG p
 {
     int rc = VINF_SUCCESS;
     PVDTESTGLOB pGlob = (PVDTESTGLOB)pvUser;
-    size_t cbPattern = 0;
-    const char *pcszName = NULL;
-    uint64_t u64Pattern = 0;
-
-    pcszName   = paScriptArgs[0].psz;
-    cbPattern  = paScriptArgs[1].u64;
-    u64Pattern = paScriptArgs[2].u64;
+    const char *pcszName = paScriptArgs[0].psz;
+    size_t cbPattern  = (size_t)paScriptArgs[1].u64;
+    uint64_t u64Pattern = paScriptArgs[2].u64;
 
     PVDPATTERN pPattern = tstVDIoGetPatternByName(pGlob, pcszName);
     if (!pPattern)
@@ -1699,11 +1639,8 @@ static DECLCALLBACK(int) vdScriptHandlerIoPatternCreateFromFile(PVDSCRIPTARG paS
 {
     int rc = VINF_SUCCESS;
     PVDTESTGLOB pGlob = (PVDTESTGLOB)pvUser;
-    const char *pcszName = NULL;
-    const char *pcszFile = NULL;
-
-    pcszName = paScriptArgs[0].psz;
-    pcszFile = paScriptArgs[1].psz;
+    const char *pcszName = paScriptArgs[0].psz;
+    const char *pcszFile = paScriptArgs[1].psz;
 
     PVDPATTERN pPattern = tstVDIoGetPatternByName(pGlob, pcszName);
     if (!pPattern)
@@ -1746,9 +1683,7 @@ static DECLCALLBACK(int) vdScriptHandlerIoPatternDestroy(PVDSCRIPTARG paScriptAr
 {
     int rc = VINF_SUCCESS;
     PVDTESTGLOB pGlob = (PVDTESTGLOB)pvUser;
-    const char *pcszName = NULL;
-
-    pcszName = paScriptArgs[0].psz;
+    const char *pcszName = paScriptArgs[0].psz;
 
     PVDPATTERN pPattern = tstVDIoGetPatternByName(pGlob, pcszName);
     if (pPattern)
@@ -1766,10 +1701,10 @@ static DECLCALLBACK(int) vdScriptHandlerIoPatternDestroy(PVDSCRIPTARG paScriptAr
 
 static DECLCALLBACK(int) vdScriptHandlerSleep(PVDSCRIPTARG paScriptArgs, void *pvUser)
 {
-    int rc = VINF_SUCCESS;
+    RT_NOREF1(pvUser);
     uint64_t cMillies = paScriptArgs[0].u64;
 
-    rc = RTThreadSleep(cMillies);
+    int rc = RTThreadSleep(cMillies);
     return rc;
 }
 
@@ -1777,11 +1712,8 @@ static DECLCALLBACK(int) vdScriptHandlerDumpFile(PVDSCRIPTARG paScriptArgs, void
 {
     int rc = VINF_SUCCESS;
     PVDTESTGLOB pGlob = (PVDTESTGLOB)pvUser;
-    const char *pcszFile = NULL;
-    const char *pcszPathToDump = NULL;
-
-    pcszFile       = paScriptArgs[0].psz;
-    pcszPathToDump = paScriptArgs[1].psz;
+    const char *pcszFile       = paScriptArgs[0].psz;
+    const char *pcszPathToDump = paScriptArgs[1].psz;
 
     /* Check for the file. */
     PVDFILE pIt = NULL;
@@ -1998,6 +1930,7 @@ static DECLCALLBACK(int) vdScriptHandlerDumpDiskInfo(PVDSCRIPTARG paScriptArgs,
 
 static DECLCALLBACK(int) vdScriptHandlerPrintMsg(PVDSCRIPTARG paScriptArgs, void *pvUser)
 {
+    RT_NOREF1(pvUser);
     RTPrintf("%s\n", paScriptArgs[0].psz);
     return VINF_SUCCESS;
 }
@@ -2193,6 +2126,7 @@ static DECLCALLBACK(int) tstVDIoFileOpen(void *pvUser, const char *pszLocation,
 
 static DECLCALLBACK(int) tstVDIoFileClose(void *pvUser, void *pStorage)
 {
+    RT_NOREF1(pvUser);
     PVDSTORAGE pIoStorage = (PVDSTORAGE)pStorage;
 
     RTMemFree(pIoStorage);
@@ -2241,6 +2175,7 @@ static DECLCALLBACK(int) tstVDIoFileDelete(void *pvUser, const char *pcszFilenam
 
 static DECLCALLBACK(int) tstVDIoFileMove(void *pvUser, const char *pcszSrc, const char *pcszDst, unsigned fMove)
 {
+    RT_NOREF1(fMove);
     int rc = VINF_SUCCESS;
     PVDTESTGLOB pGlob = (PVDTESTGLOB)pvUser;
     bool fFound = false;
@@ -2275,22 +2210,25 @@ static DECLCALLBACK(int) tstVDIoFileMove(void *pvUser, const char *pcszSrc, cons
 
 static DECLCALLBACK(int) tstVDIoFileGetFreeSpace(void *pvUser, const char *pcszFilename, int64_t *pcbFreeSpace)
 {
+    RT_NOREF2(pvUser, pcszFilename);
     AssertPtrReturn(pcbFreeSpace, VERR_INVALID_POINTER);
 
-    *pcbFreeSpace = ~0ULL; /** @todo: Implement */
+    *pcbFreeSpace = ~0ULL; /** @todo Implement */
     return VINF_SUCCESS;
 }
 
 static DECLCALLBACK(int) tstVDIoFileGetModificationTime(void *pvUser, const char *pcszFilename, PRTTIMESPEC pModificationTime)
 {
+    RT_NOREF2(pvUser, pcszFilename);
     AssertPtrReturn(pModificationTime, VERR_INVALID_POINTER);
 
-    /** @todo: Implement */
+    /** @todo Implement */
     return VINF_SUCCESS;
 }
 
 static DECLCALLBACK(int) tstVDIoFileGetSize(void *pvUser, void *pStorage, uint64_t *pcbSize)
 {
+    RT_NOREF1(pvUser);
     PVDSTORAGE pIoStorage = (PVDSTORAGE)pStorage;
 
     return VDIoBackendStorageGetSize(pIoStorage->pFile->pIoStorage, pcbSize);
@@ -2298,6 +2236,7 @@ static DECLCALLBACK(int) tstVDIoFileGetSize(void *pvUser, void *pStorage, uint64
 
 static DECLCALLBACK(int) tstVDIoFileSetSize(void *pvUser, void *pStorage, uint64_t cbSize)
 {
+    RT_NOREF1(pvUser);
     PVDSTORAGE pIoStorage = (PVDSTORAGE)pStorage;
 
     return VDIoBackendStorageSetSize(pIoStorage->pFile->pIoStorage, cbSize);
@@ -2305,12 +2244,14 @@ static DECLCALLBACK(int) tstVDIoFileSetSize(void *pvUser, void *pStorage, uint64
 
 static DECLCALLBACK(int) tstVDIoFileSetAllocationSize(void *pvUser, void *pStorage, uint64_t cbSize, uint32_t fFlags)
 {
+    RT_NOREF4(pvUser, pStorage, cbSize, fFlags);
     return VERR_NOT_SUPPORTED;
 }
 
 static DECLCALLBACK(int) tstVDIoFileWriteSync(void *pvUser, void *pStorage, uint64_t uOffset,
                                               const void *pvBuffer, size_t cbBuffer, size_t *pcbWritten)
 {
+    RT_NOREF1(pvUser);
     int rc = VINF_SUCCESS;
     PVDSTORAGE pIoStorage = (PVDSTORAGE)pStorage;
 
@@ -2335,6 +2276,7 @@ static DECLCALLBACK(int) tstVDIoFileWriteSync(void *pvUser, void *pStorage, uint
 static DECLCALLBACK(int) tstVDIoFileReadSync(void *pvUser, void *pStorage, uint64_t uOffset,
                                              void *pvBuffer, size_t cbBuffer, size_t *pcbRead)
 {
+    RT_NOREF1(pvUser);
     int rc = VINF_SUCCESS;
     PVDSTORAGE pIoStorage = (PVDSTORAGE)pStorage;
 
@@ -2358,6 +2300,7 @@ static DECLCALLBACK(int) tstVDIoFileReadSync(void *pvUser, void *pStorage, uint6
 
 static DECLCALLBACK(int) tstVDIoFileFlushSync(void *pvUser, void *pStorage)
 {
+    RT_NOREF1(pvUser);
     PVDSTORAGE pIoStorage = (PVDSTORAGE)pStorage;
     int rc = VDIoBackendTransfer(pIoStorage->pFile->pIoStorage, VDIOTXDIR_FLUSH, 0,
                                  0, NULL, NULL, true /* fSync */);
@@ -2370,8 +2313,8 @@ static DECLCALLBACK(int) tstVDIoFileReadAsync(void *pvUser, void *pStorage, uint
                                               size_t cbRead, void *pvCompletion,
                                               void **ppTask)
 {
+    RT_NOREF2(pvUser, ppTask);
     int rc = VINF_SUCCESS;
-    PVDTESTGLOB pGlob = (PVDTESTGLOB)pvUser;
     PVDSTORAGE pIoStorage = (PVDSTORAGE)pStorage;
     RTSGBUF SgBuf;
 
@@ -2392,8 +2335,8 @@ static DECLCALLBACK(int) tstVDIoFileWriteAsync(void *pvUser, void *pStorage, uin
                                                size_t cbWrite, void *pvCompletion,
                                                void **ppTask)
 {
+    RT_NOREF2(pvUser, ppTask);
     int rc = VINF_SUCCESS;
-    PVDTESTGLOB pGlob = (PVDTESTGLOB)pvUser;
     PVDSTORAGE pIoStorage = (PVDSTORAGE)pStorage;
     RTSGBUF SgBuf;
 
@@ -2412,8 +2355,8 @@ static DECLCALLBACK(int) tstVDIoFileWriteAsync(void *pvUser, void *pStorage, uin
 static DECLCALLBACK(int) tstVDIoFileFlushAsync(void *pvUser, void *pStorage, void *pvCompletion,
                                                void **ppTask)
 {
+    RT_NOREF2(pvUser, ppTask);
     int rc = VINF_SUCCESS;
-    PVDTESTGLOB pGlob = (PVDTESTGLOB)pvUser;
     PVDSTORAGE pIoStorage = (PVDSTORAGE)pStorage;
 
     rc = VDIoBackendTransfer(pIoStorage->pFile->pIoStorage, VDIOTXDIR_FLUSH, 0,
@@ -2449,7 +2392,7 @@ static int tstVDIoTestInit(PVDIOTEST pIoTest, PVDTESTGLOB pGlob, bool fRandomAcc
                            ? pIoTest->offStart - pIoTest->offEnd
                            : pIoTest->offEnd - pIoTest->offStart;
 
-        pIoTest->u.Rnd.cBlocks = cbRange / cbBlkSize + ((cbRange % cbBlkSize) ? 1 : 0);
+        pIoTest->u.Rnd.cBlocks = (uint32_t)(cbRange / cbBlkSize + (cbRange % cbBlkSize ? 1 : 0));
         pIoTest->u.Rnd.cBlocksLeft = pIoTest->u.Rnd.cBlocks;
         pIoTest->u.Rnd.pbMapAccessed = (uint8_t *)RTMemAllocZ(pIoTest->u.Rnd.cBlocks / 8
                                                               + ((pIoTest->u.Rnd.cBlocks % 8)
@@ -2589,6 +2532,7 @@ static int tstVDIoTestReqInit(PVDIOTEST pIoTest, PVDIOREQ pIoReq, void *pvUser)
 
 static DECLCALLBACK(void) tstVDIoTestReqComplete(void *pvUser1, void *pvUser2, int rcReq)
 {
+    RT_NOREF1(rcReq);
     PVDIOREQ pIoReq = (PVDIOREQ)pvUser1;
     RTSEMEVENT hEventSem = (RTSEMEVENT)pvUser2;
     PVDDISK pDisk = (PVDDISK)pIoReq->pvUser;
diff --git a/src/VBox/Storage/testcase/tstVDSnap.cpp b/src/VBox/Storage/testcase/tstVDSnap.cpp
index 21c961f..a5e2557 100644
--- a/src/VBox/Storage/testcase/tstVDSnap.cpp
+++ b/src/VBox/Storage/testcase/tstVDSnap.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2011 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -85,6 +85,7 @@ RTRAND   g_hRand;
 
 static DECLCALLBACK(void) tstVDError(void *pvUser, int rc, RT_SRC_POS_DECL, const char *pszFormat, va_list va)
 {
+    RT_NOREF1(pvUser);
     g_cErrors++;
     RTPrintf("tstVDSnap: Error %Rrc at %s:%u (%s): ", rc, RT_SRC_POS_ARGS);
     RTPrintfV(pszFormat, va);
@@ -93,6 +94,7 @@ static DECLCALLBACK(void) tstVDError(void *pvUser, int rc, RT_SRC_POS_DECL, cons
 
 static DECLCALLBACK(int) tstVDMessage(void *pvUser, const char *pszFormat, va_list va)
 {
+    RT_NOREF1(pvUser);
     RTPrintf("tstVDSnap: ");
     RTPrintfV(pszFormat, va);
     return VINF_SUCCESS;
@@ -122,9 +124,9 @@ static void tstVDSnapSegmentsDice(PVDSNAPTEST pTest, PVDDISKSEG paDiskSeg, uint3
     }
 }
 
-static int tstVDSnapWrite(PVBOXHDD pVD, PVDDISKSEG paDiskSegments,
-                          uint32_t cDiskSegments, uint64_t cbDisk, bool fInit)
+static int tstVDSnapWrite(PVBOXHDD pVD, PVDDISKSEG paDiskSegments, uint32_t cDiskSegments, uint64_t cbDisk, bool fInit)
 {
+    RT_NOREF1(cbDisk);
     int rc = VINF_SUCCESS;
 
     for (uint32_t i = 0; i < cDiskSegments; i++)
@@ -151,6 +153,7 @@ static int tstVDSnapWrite(PVBOXHDD pVD, PVDDISKSEG paDiskSegments,
 
 static int tstVDSnapReadVerify(PVBOXHDD pVD, PVDDISKSEG paDiskSegments, uint32_t cDiskSegments, uint64_t cbDisk)
 {
+    RT_NOREF1(cbDisk);
     int rc = VINF_SUCCESS;
     uint8_t *pbBuf = (uint8_t *)RTMemAlloc(_1M);
 
diff --git a/src/VBox/Storage/testcase/vbox-img.cpp b/src/VBox/Storage/testcase/vbox-img.cpp
index c868790..678b57a 100644
--- a/src/VBox/Storage/testcase/vbox-img.cpp
+++ b/src/VBox/Storage/testcase/vbox-img.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2014 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -110,8 +110,8 @@ static PVDINTERFACE pVDIfs;
 
 static DECLCALLBACK(void) handleVDError(void *pvUser, int rc, RT_SRC_POS_DECL, const char *pszFormat, va_list va)
 {
-    NOREF(pvUser);
-    NOREF(rc);
+    RT_NOREF2(pvUser, rc);
+    RT_SRC_POS_NOREF();
     RTMsgErrorV(pszFormat, va);
 }
 
@@ -476,7 +476,8 @@ typedef struct FILEIOSTATE
 static DECLCALLBACK(int) convInOpen(void *pvUser, const char *pszLocation, uint32_t fOpen, PFNVDCOMPLETED pfnCompleted,
                                     void **ppStorage)
 {
-    NOREF(pvUser);
+    RT_NOREF2(pvUser, pszLocation);
+
     /* Validate input. */
     AssertPtrReturn(ppStorage, VERR_INVALID_POINTER);
     AssertPtrNullReturn(pfnCompleted, VERR_INVALID_PARAMETER);
@@ -669,7 +670,8 @@ static DECLCALLBACK(int) convInFlush(void *pvUser, void *pStorage)
 static DECLCALLBACK(int) convOutOpen(void *pvUser, const char *pszLocation, uint32_t fOpen, PFNVDCOMPLETED pfnCompleted,
                                      void **ppStorage)
 {
-    NOREF(pvUser);
+    RT_NOREF2(pvUser, pszLocation);
+
     /* Validate input. */
     AssertPtrReturn(ppStorage, VERR_INVALID_POINTER);
     AssertPtrNullReturn(pfnCompleted, VERR_INVALID_PARAMETER);
@@ -1437,7 +1439,8 @@ static int handleCreateCache(HandlerArg *a)
 
 static DECLCALLBACK(bool) vdIfCfgCreateBaseAreKeysValid(void *pvUser, const char *pszzValid)
 {
-    return VINF_SUCCESS; /** @todo: Implement. */
+    RT_NOREF2(pvUser, pszzValid);
+    return VINF_SUCCESS; /** @todo Implement. */
 }
 
 static DECLCALLBACK(int) vdIfCfgCreateBaseQuerySize(void *pvUser, const char *pszName, size_t *pcbValue)
@@ -1577,7 +1580,6 @@ static int handleCreateBase(HandlerArg *a)
 static int handleRepair(HandlerArg *a)
 {
     int rc = VINF_SUCCESS;
-    PVBOXHDD pDisk = NULL;
     const char *pszFilename = NULL;
     char *pszBackend = NULL;
     const char *pszFormat  = NULL;
@@ -1646,7 +1648,6 @@ static int handleClearComment(HandlerArg *a)
     int rc = VINF_SUCCESS;
     PVBOXHDD pDisk = NULL;
     const char *pszFilename = NULL;
-    bool fDryRun = false;
 
     /* Parse the command line. */
     static const RTGETOPTDEF s_aOptions[] =
@@ -1705,7 +1706,6 @@ static int handleClearResize(HandlerArg *a)
     PVBOXHDD pDisk = NULL;
     const char *pszFilename = NULL;
     uint64_t    cbNew = 0;
-    bool fDryRun = false;
     VDGEOMETRY LCHSGeometry, PCHSGeometry;
 
     memset(&LCHSGeometry, 0, sizeof(LCHSGeometry));
diff --git a/src/VBox/Storage/testcase/vbox-img.rc b/src/VBox/Storage/testcase/vbox-img.rc
index 54d5bee..55d93d0 100644
--- a/src/VBox/Storage/testcase/vbox-img.rc
+++ b/src/VBox/Storage/testcase/vbox-img.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/Docs-CodingGuidelines.cpp b/src/VBox/VMM/Docs-CodingGuidelines.cpp
index bd6fad5..f4b4350 100644
--- a/src/VBox/VMM/Docs-CodingGuidelines.cpp
+++ b/src/VBox/VMM/Docs-CodingGuidelines.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/Docs-RawMode.cpp b/src/VBox/VMM/Docs-RawMode.cpp
index 8df7f74..6717013 100644
--- a/src/VBox/VMM/Docs-RawMode.cpp
+++ b/src/VBox/VMM/Docs-RawMode.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/Makefile.kmk b/src/VBox/VMM/Makefile.kmk
index 312abc2..8be9099 100644
--- a/src/VBox/VMM/Makefile.kmk
+++ b/src/VBox/VMM/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -562,7 +562,7 @@ if defined(VBOX_WITH_RAW_MODE) && !defined(VBOX_ONLY_EXTPACKS)
  ifdef VBOX_WITH_NEW_APIC
   VMMRC_SOURCES += \
   	VMMAll/APICAll.cpp
- endif 
+ endif
  ifdef VBOX_WITH_REM
   VMMRC_SOURCES += \
   	VMMAll/REMAll.cpp
diff --git a/src/VBox/VMM/VMMAll/APICAll.cpp b/src/VBox/VMM/VMMAll/APICAll.cpp
index 91f6f12..7ec3252 100644
--- a/src/VBox/VMM/VMMAll/APICAll.cpp
+++ b/src/VBox/VMM/VMMAll/APICAll.cpp
@@ -7,7 +7,7 @@
  * Copyright (C) 2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software
+ * available from http://www.virtualbox.org. This file is free software;
  * you can redistribute it and/or modify it under the terms of the GNU
  * General Public License (GPL) as published by the Free Software
  * Foundation, in version 2 as it comes in the "COPYING" file of the
@@ -25,6 +25,7 @@
 #include <VBox/vmm/vm.h>
 #include <VBox/vmm/vmcpuset.h>
 
+
 /*********************************************************************************************************************************
 *   Global Variables                                                                                                             *
 *********************************************************************************************************************************/
@@ -90,6 +91,7 @@ DECLINLINE(void) apicClearVectorInReg(volatile XAPIC256BITREG *pApicReg, uint8_t
 }
 
 
+#if 0 /* unused */
 /**
  * Checks if a vector is set in an APIC Pending-Interrupt Bitmap (PIB).
  *
@@ -101,6 +103,7 @@ DECLINLINE(bool) apicTestVectorInPib(volatile void *pvPib, uint8_t uVector)
 {
     return ASMBitTest(pvPib, uVector);
 }
+#endif /* unused */
 
 
 /**
@@ -138,7 +141,7 @@ DECLINLINE(void) apicSetVectorInPib(volatile void *pvPib, uint8_t uVector)
     ASMAtomicBitSet(pvPib, uVector);
 }
 
-
+#if 0 /* unused */
 /**
  * Clears the vector in an APIC Pending-Interrupt Bitmap (PIB).
  *
@@ -149,8 +152,9 @@ DECLINLINE(void) apicClearVectorInPib(volatile void *pvPib, uint8_t uVector)
 {
     ASMAtomicBitClear(pvPib, uVector);
 }
+#endif /* unused */
 
-
+#if 0 /* unused */
 /**
  * Atomically OR's a fragment (32 vectors) into an APIC 256-bit sparse
  * register.
@@ -165,8 +169,10 @@ DECLINLINE(void) apicOrVectorsToReg(volatile XAPIC256BITREG *pApicReg, size_t id
     Assert(idxFragment < RT_ELEMENTS(pApicReg->u));
     ASMAtomicOrU32(&pApicReg->u[idxFragment].u32Reg, u32Fragment);
 }
+#endif /* unused */
 
 
+#if 0 /* unused */
 /**
  * Atomically AND's a fragment (32 vectors) into an APIC
  * 256-bit sparse register.
@@ -181,6 +187,7 @@ DECLINLINE(void) apicAndVectorsToReg(volatile XAPIC256BITREG *pApicReg, size_t i
     Assert(idxFragment < RT_ELEMENTS(pApicReg->u));
     ASMAtomicAndU32(&pApicReg->u[idxFragment].u32Reg, u32Fragment);
 }
+#endif /* unused */
 
 
 /**
@@ -227,6 +234,7 @@ static VBOXSTRICTRC apicMsrAccessError(PVMCPU pVCpu, uint32_t u32Reg, APICMSRACC
                   s_aAccess[i].pszAfter));
     return VERR_CPUM_RAISE_GP_0;
 #else
+    RT_NOREF_PV(u32Reg); RT_NOREF_PV(pVCpu);
     return s_aAccess[i].rcRZ;
 #endif
 }
@@ -724,7 +732,7 @@ static VBOXSTRICTRC apicSendIntr(PVM pVM, PVMCPU pVCpu, uint8_t uVector, XAPICTR
      * interrupt is being sent by an APIC.
      *
      * The 'receive illegal vector' will be set on the target APIC when the interrupt
-     * gets generated, see APICPostInterrupt().
+     * gets generated, see apicPostInterrupt().
      *
      * See Intel spec. 10.5.3 "Error Handling".
      */
@@ -1526,7 +1534,7 @@ static VBOXSTRICTRC apicSetLvtEntry(PVMCPU pVCpu, uint16_t offLvt, uint32_t uLvt
      * the LVT entry when the delivery mode is 'fixed'[1] or update it in addition to signaling the
      * error or not signal the error at all. For now, we'll allow setting illegal vectors into the LVT
      * but set the 'send illegal vector' error here. The 'receive illegal vector' error will be set if
-     * the interrupt for the vector happens to be generated, see APICPostInterrupt().
+     * the interrupt for the vector happens to be generated, see apicPostInterrupt().
      *
      * [1] See Intel spec. 10.5.2 "Valid Interrupt Vectors".
      */
@@ -1832,15 +1840,14 @@ APICBOTHCBDECL(VBOXSTRICTRC) apicReadMsr(PPDMDEVINS pDevIns, PVMCPU pVCpu, uint3
     VMCPU_ASSERT_EMT(pVCpu);
     Assert(u32Reg >= MSR_IA32_X2APIC_ID && u32Reg <= MSR_IA32_X2APIC_SELF_IPI);
     Assert(pu64Value);
+    RT_NOREF_PV(pDevIns);
 
 #ifndef IN_RING3
     PCAPIC pApic = VM_TO_APIC(pVCpu->CTX_SUFF(pVM));
     if (pApic->fRZEnabled)
     { /* likely */}
     else
-    {
         return VINF_CPUM_R3_MSR_READ;
-    }
 #endif
 
     STAM_COUNTER_INC(&pVCpu->apic.s.CTX_SUFF_Z(StatMsrRead));
@@ -1938,15 +1945,14 @@ APICBOTHCBDECL(VBOXSTRICTRC) apicWriteMsr(PPDMDEVINS pDevIns, PVMCPU pVCpu, uint
      */
     VMCPU_ASSERT_EMT(pVCpu);
     Assert(u32Reg >= MSR_IA32_X2APIC_ID && u32Reg <= MSR_IA32_X2APIC_SELF_IPI);
+    RT_NOREF_PV(pDevIns);
 
 #ifndef IN_RING3
     PCAPIC pApic = VM_TO_APIC(pVCpu->CTX_SUFF(pVM));
     if (pApic->fRZEnabled)
     { /* likely */ }
     else
-    {
         return VINF_CPUM_R3_MSR_WRITE;
-    }
 #endif
 
     STAM_COUNTER_INC(&pVCpu->apic.s.CTX_SUFF_Z(StatMsrWrite));
@@ -2196,7 +2202,11 @@ APICBOTHCBDECL(VBOXSTRICTRC) apicSetBaseMsr(PPDMDEVINS pDevIns, PVMCPU pVCpu, ui
 
     ASMAtomicWriteU64(&pApicCpu->uApicBaseMsr, uBaseMsr);
     return VINF_SUCCESS;
+
 #else  /* !IN_RING3 */
+    RT_NOREF_PV(pDevIns);
+    RT_NOREF_PV(pVCpu);
+    RT_NOREF_PV(u64BaseMsr);
     return VINF_CPUM_R3_MSR_WRITE;
 #endif /* IN_RING3 */
 }
@@ -2207,6 +2217,7 @@ APICBOTHCBDECL(VBOXSTRICTRC) apicSetBaseMsr(PPDMDEVINS pDevIns, PVMCPU pVCpu, ui
  */
 APICBOTHCBDECL(uint64_t) apicGetBaseMsr(PPDMDEVINS pDevIns, PVMCPU pVCpu)
 {
+    RT_NOREF_PV(pDevIns);
     VMCPU_ASSERT_EMT_OR_NOT_RUNNING(pVCpu);
 
     PCAPICCPU pApicCpu = VMCPU_TO_APICCPU(pVCpu);
@@ -2219,6 +2230,7 @@ APICBOTHCBDECL(uint64_t) apicGetBaseMsr(PPDMDEVINS pDevIns, PVMCPU pVCpu)
  */
 APICBOTHCBDECL(void) apicSetTpr(PPDMDEVINS pDevIns, PVMCPU pVCpu, uint8_t u8Tpr)
 {
+    RT_NOREF_PV(pDevIns);
     apicSetTpr(pVCpu, u8Tpr);
 }
 
@@ -2251,6 +2263,7 @@ static bool apicGetHighestPendingInterrupt(PVMCPU pVCpu, uint8_t *pu8PendingIntr
  */
 APICBOTHCBDECL(uint8_t) apicGetTpr(PPDMDEVINS pDevIns, PVMCPU pVCpu, bool *pfPending, uint8_t *pu8PendingIntr)
 {
+    RT_NOREF_PV(pDevIns);
     VMCPU_ASSERT_EMT(pVCpu);
     PCXAPICPAGE pXApicPage = VMCPU_TO_CXAPICPAGE(pVCpu);
 
@@ -2484,6 +2497,7 @@ APICBOTHCBDECL(VBOXSTRICTRC) apicLocalInterrupt(PPDMDEVINS pDevIns, PVMCPU pVCpu
  */
 APICBOTHCBDECL(int) apicGetInterrupt(PPDMDEVINS pDevIns, PVMCPU pVCpu, uint8_t *pu8Vector, uint32_t *pu32TagSrc)
 {
+    RT_NOREF_PV(pDevIns);
     VMCPU_ASSERT_EMT(pVCpu);
     Assert(pu8Vector);
     NOREF(pu32TagSrc);
@@ -2558,7 +2572,7 @@ APICBOTHCBDECL(int) apicReadMmio(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPh
 {
     NOREF(pvUser);
     Assert(!(GCPhysAddr & 0xf));
-    Assert(cb == 4);
+    Assert(cb == 4); RT_NOREF_PV(cb);
 
     PAPICDEV pApicDev = PDMINS_2_DATA(pDevIns, PAPICDEV);
     PVMCPU   pVCpu    = PDMDevHlpGetVMCPU(pDevIns);
@@ -2582,7 +2596,7 @@ APICBOTHCBDECL(int) apicWriteMmio(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCP
 {
     NOREF(pvUser);
     Assert(!(GCPhysAddr & 0xf));
-    Assert(cb == 4);
+    Assert(cb == 4); RT_NOREF_PV(cb);
 
     PAPICDEV pApicDev = PDMINS_2_DATA(pDevIns, PAPICDEV);
     PVMCPU   pVCpu    = PDMDevHlpGetVMCPU(pDevIns);
diff --git a/src/VBox/VMM/VMMAll/CPUMAllMsrs.cpp b/src/VBox/VMM/VMMAll/CPUMAllMsrs.cpp
index 34094ac..2dda62d 100644
--- a/src/VBox/VMM/VMMAll/CPUMAllMsrs.cpp
+++ b/src/VBox/VMM/VMMAll/CPUMAllMsrs.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -102,6 +102,7 @@ typedef FNCPUMWRMSR *PFNCPUMWRMSR;
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_FixedValue(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr);
     *puValue = pRange->uValue;
     return VINF_SUCCESS;
 }
@@ -110,6 +111,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_FixedValue(PVMCPU pVCpu, uint32_t id
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IgnoreWrite(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     Log(("CPUM: Ignoring WRMSR %#x (%s), %#llx\n", idMsr, pRange->szName, uValue));
     return VINF_SUCCESS;
 }
@@ -118,6 +120,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IgnoreWrite(PVMCPU pVCpu, uint32_t i
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_WriteOnly(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(puValue);
     return VERR_CPUM_RAISE_GP_0;
 }
 
@@ -125,6 +128,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_WriteOnly(PVMCPU pVCpu, uint32_t idM
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_ReadOnly(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     Assert(pRange->fWrGpMask == UINT64_MAX);
     return VERR_CPUM_RAISE_GP_0;
 }
@@ -141,6 +145,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_ReadOnly(PVMCPU pVCpu, uint32_t idMs
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32P5McAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = 0; /** @todo implement machine check injection. */
     return VINF_SUCCESS;
 }
@@ -149,6 +154,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32P5McAddr(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32P5McAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement machine check injection. */
     return VINF_SUCCESS;
 }
@@ -157,6 +163,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32P5McAddr(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32P5McType(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = 0; /** @todo implement machine check injection. */
     return VINF_SUCCESS;
 }
@@ -165,6 +172,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32P5McType(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32P5McType(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement machine check injection. */
     return VINF_SUCCESS;
 }
@@ -173,6 +181,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32P5McType(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32TimestampCounter(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = TMCpuTickGet(pVCpu);
     return VINF_SUCCESS;
 }
@@ -181,6 +190,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32TimestampCounter(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32TimestampCounter(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     TMCpuTickSet(pVCpu->CTX_SUFF(pVM), pVCpu, uValue);
     return VINF_SUCCESS;
 }
@@ -189,6 +199,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32TimestampCounter(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PlatformId(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr);
     uint64_t uValue = pRange->uValue;
     if (uValue & 0x1f00)
     {
@@ -204,6 +215,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PlatformId(PVMCPU pVCpu, uint32_
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32ApicBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     return PDMApicGetBaseMsr(pVCpu, puValue, false /* fIgnoreErrors */);
 }
 
@@ -211,6 +223,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32ApicBase(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32ApicBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     return PDMApicSetBaseMsr(pVCpu, uValue);
 }
 
@@ -218,6 +231,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32ApicBase(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32FeatureControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = 1; /* Locked, no VT-X, no SYSENTER micromanagement. */
     return VINF_SUCCESS;
 }
@@ -226,6 +240,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32FeatureControl(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32FeatureControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     return VERR_CPUM_RAISE_GP_0;
 }
 
@@ -233,6 +248,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32FeatureControl(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32BiosSignId(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo fake microcode update. */
     *puValue = pRange->uValue;
     return VINF_SUCCESS;
@@ -242,6 +258,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32BiosSignId(PVMCPU pVCpu, uint32_
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32BiosSignId(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /* Normally, zero is written to Ia32BiosSignId before reading it in order
        to select the signature instead of the BBL_CR_D3 behaviour.  The GP mask
        of the database entry should take care of most illegal writes for now, so
@@ -253,6 +270,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32BiosSignId(PVMCPU pVCpu, uint32_
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32BiosUpdateTrigger(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Fake bios update trigger better.  The value is the address to an
      *        update package, I think.  We should probably GP if it's invalid. */
     return VINF_SUCCESS;
@@ -262,6 +280,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32BiosUpdateTrigger(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32SmmMonitorCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo SMM. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -271,6 +290,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32SmmMonitorCtl(PVMCPU pVCpu, uint
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32SmmMonitorCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo SMM. */
     return VINF_SUCCESS;
 }
@@ -279,6 +299,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32SmmMonitorCtl(PVMCPU pVCpu, uint
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PmcN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo check CPUID leaf 0ah. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -288,6 +309,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PmcN(PVMCPU pVCpu, uint32_t idMs
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32PmcN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo check CPUID leaf 0ah. */
     return VINF_SUCCESS;
 }
@@ -296,6 +318,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32PmcN(PVMCPU pVCpu, uint32_t idMs
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32MonitorFilterLineSize(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo return 0x1000 if we try emulate mwait 100% correctly. */
     *puValue = 0x40; /** @todo Change to CPU cache line size. */
     return VINF_SUCCESS;
@@ -305,6 +328,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32MonitorFilterLineSize(PVMCPU pVC
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32MonitorFilterLineSize(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo should remember writes, though it's supposedly something only a BIOS
      * would write so, it's not extremely important. */
     return VINF_SUCCESS;
@@ -313,6 +337,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32MonitorFilterLineSize(PVMCPU pVC
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32MPerf(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo Read MPERF: Adjust against previously written MPERF value.  Is TSC
      *        what we want? */
     *puValue = TMCpuTickGet(pVCpu);
@@ -323,6 +348,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32MPerf(PVMCPU pVCpu, uint32_t idM
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32MPerf(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Write MPERF: Calc adjustment. */
     return VINF_SUCCESS;
 }
@@ -331,6 +357,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32MPerf(PVMCPU pVCpu, uint32_t idM
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32APerf(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo Read APERF: Adjust against previously written MPERF value.  Is TSC
      *        what we want? */
     *puValue = TMCpuTickGet(pVCpu);
@@ -341,6 +368,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32APerf(PVMCPU pVCpu, uint32_t idM
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32APerf(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Write APERF: Calc adjustment. */
     return VINF_SUCCESS;
 }
@@ -349,6 +377,8 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32APerf(PVMCPU pVCpu, uint32_t idM
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32MtrrCap(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
+
     /* This is currently a bit weird. :-) */
     uint8_t const   cVariableRangeRegs              = 0;
     bool const      fSystemManagementRangeRegisters = false;
@@ -365,6 +395,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32MtrrCap(PVMCPU pVCpu, uint32_t i
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32MtrrPhysBaseN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo Implement variable MTRR storage. */
     Assert(pRange->uValue == (idMsr - 0x200) / 2);
     *puValue = 0;
@@ -379,6 +410,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32MtrrPhysBaseN(PVMCPU pVCpu, uint
      * Validate the value.
      */
     Assert(pRange->uValue == (idMsr - 0x200) / 2);
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(uRawValue); RT_NOREF_PV(pRange);
 
     if ((uValue & 0xff) >= 7)
     {
@@ -405,6 +437,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32MtrrPhysBaseN(PVMCPU pVCpu, uint
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32MtrrPhysMaskN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo Implement variable MTRR storage. */
     Assert(pRange->uValue == (idMsr - 0x200) / 2);
     *puValue = 0;
@@ -419,6 +452,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32MtrrPhysMaskN(PVMCPU pVCpu, uint
      * Validate the value.
      */
     Assert(pRange->uValue == (idMsr - 0x200) / 2);
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(uRawValue); RT_NOREF_PV(pRange);
 
     uint64_t fInvPhysMask = ~(RT_BIT_64(pVCpu->CTX_SUFF(pVM)->cpum.s.GuestFeatures.cMaxPhysAddrWidth) - 1U);
     if (fInvPhysMask & uValue)
@@ -439,6 +473,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32MtrrPhysMaskN(PVMCPU pVCpu, uint
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32MtrrFixed(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     CPUM_MSR_ASSERT_CPUMCPU_OFFSET_RETURN(pVCpu, pRange, uint64_t, puFixedMtrr);
     *puValue = *puFixedMtrr;
     return VINF_SUCCESS;
@@ -449,6 +484,8 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32MtrrFixed(PVMCPU pVCpu, uint32_t
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32MtrrFixed(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
     CPUM_MSR_ASSERT_CPUMCPU_OFFSET_RETURN(pVCpu, pRange, uint64_t, puFixedMtrr);
+    RT_NOREF_PV(idMsr); RT_NOREF_PV(uRawValue);
+
     for (uint32_t cShift = 0; cShift < 63; cShift += 8)
     {
         uint8_t uType = (uint8_t)(uValue >> cShift);
@@ -467,6 +504,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32MtrrFixed(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32MtrrDefType(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = pVCpu->cpum.s.GuestMsrs.msr.MtrrDefType;
     return VINF_SUCCESS;
 }
@@ -475,6 +513,8 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32MtrrDefType(PVMCPU pVCpu, uint32
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32MtrrDefType(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uRawValue);
+
     if ((uValue & 0xff) >= 7)
     {
         Log(("CPUM: Invalid MTRR default type value on %s: %#llx (%#llx)\n", pRange->szName, uValue, uValue & 0xff));
@@ -489,6 +529,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32MtrrDefType(PVMCPU pVCpu, uint32
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32Pat(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = pVCpu->cpum.s.Guest.msrPAT;
     return VINF_SUCCESS;
 }
@@ -497,6 +538,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32Pat(PVMCPU pVCpu, uint32_t idMsr
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32Pat(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uRawValue);
     pVCpu->cpum.s.Guest.msrPAT = uValue;
     return VINF_SUCCESS;
 }
@@ -505,6 +547,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32Pat(PVMCPU pVCpu, uint32_t idMsr
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32SysEnterCs(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = pVCpu->cpum.s.Guest.SysEnter.cs;
     return VINF_SUCCESS;
 }
@@ -513,6 +556,8 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32SysEnterCs(PVMCPU pVCpu, uint32_
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32SysEnterCs(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uRawValue);
+
     /* Note! We used to mask this by 0xffff, but turns out real HW doesn't and
              there are generally 32-bit working bits backing this register. */
     pVCpu->cpum.s.Guest.SysEnter.cs = uValue;
@@ -523,6 +568,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32SysEnterCs(PVMCPU pVCpu, uint32_
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32SysEnterEsp(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = pVCpu->cpum.s.Guest.SysEnter.esp;
     return VINF_SUCCESS;
 }
@@ -537,6 +583,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32SysEnterEsp(PVMCPU pVCpu, uint32
         return VINF_SUCCESS;
     }
     Log(("CPUM: IA32_SYSENTER_ESP not canonical! %#llx\n", uValue));
+    RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uRawValue);
     return VERR_CPUM_RAISE_GP_0;
 }
 
@@ -544,6 +591,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32SysEnterEsp(PVMCPU pVCpu, uint32
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32SysEnterEip(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = pVCpu->cpum.s.Guest.SysEnter.eip;
     return VINF_SUCCESS;
 }
@@ -562,6 +610,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32SysEnterEip(PVMCPU pVCpu, uint32
 #else
     Log(("CPUM: IA32_SYSENTER_EIP not canonical! %#llx\n", uValue));
 #endif
+    RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uRawValue);
     return VERR_CPUM_RAISE_GP_0;
 }
 
@@ -574,6 +623,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32McgCap(PVMCPU pVCpu, uint32_t id
 #else
     *puValue = 0;
 #endif
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     return VINF_SUCCESS;
 }
 
@@ -581,6 +631,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32McgCap(PVMCPU pVCpu, uint32_t id
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32McgStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement machine checks. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -590,6 +641,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32McgStatus(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32McgStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement machine checks. */
     return VINF_SUCCESS;
 }
@@ -598,6 +650,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32McgStatus(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32McgCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement machine checks. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -607,6 +660,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32McgCtl(PVMCPU pVCpu, uint32_t id
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32McgCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement machine checks. */
     return VINF_SUCCESS;
 }
@@ -615,6 +669,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32McgCtl(PVMCPU pVCpu, uint32_t id
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32DebugCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement IA32_DEBUGCTL. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -624,6 +679,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32DebugCtl(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32DebugCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement IA32_DEBUGCTL. */
     return VINF_SUCCESS;
 }
@@ -632,6 +688,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32DebugCtl(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32SmrrPhysBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement intel SMM. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -641,6 +698,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32SmrrPhysBase(PVMCPU pVCpu, uint3
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32SmrrPhysBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement intel SMM. */
     return VERR_CPUM_RAISE_GP_0;
 }
@@ -649,6 +707,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32SmrrPhysBase(PVMCPU pVCpu, uint3
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32SmrrPhysMask(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement intel SMM. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -658,6 +717,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32SmrrPhysMask(PVMCPU pVCpu, uint3
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32SmrrPhysMask(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement intel SMM. */
     return VERR_CPUM_RAISE_GP_0;
 }
@@ -666,6 +726,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32SmrrPhysMask(PVMCPU pVCpu, uint3
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PlatformDcaCap(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement intel direct cache access (DCA)?? */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -675,6 +736,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PlatformDcaCap(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32PlatformDcaCap(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement intel direct cache access (DCA)?? */
     return VINF_SUCCESS;
 }
@@ -683,6 +745,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32PlatformDcaCap(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32CpuDcaCap(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement intel direct cache access (DCA)?? */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -692,6 +755,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32CpuDcaCap(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32Dca0Cap(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement intel direct cache access (DCA)?? */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -701,6 +765,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32Dca0Cap(PVMCPU pVCpu, uint32_t i
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32Dca0Cap(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement intel direct cache access (DCA)?? */
     return VINF_SUCCESS;
 }
@@ -709,6 +774,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32Dca0Cap(PVMCPU pVCpu, uint32_t i
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PerfEvtSelN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement IA32_PERFEVTSEL0+. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -718,6 +784,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PerfEvtSelN(PVMCPU pVCpu, uint32
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32PerfEvtSelN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement IA32_PERFEVTSEL0+. */
     return VINF_SUCCESS;
 }
@@ -726,6 +793,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32PerfEvtSelN(PVMCPU pVCpu, uint32
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PerfStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     uint64_t uValue = pRange->uValue;
 
     /* Always provide the max bus ratio for now.  XNU expects it. */
@@ -747,6 +815,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PerfStatus(PVMCPU pVCpu, uint32_
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32PerfStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /* Pentium4 allows writing, but all bits are ignored. */
     return VINF_SUCCESS;
 }
@@ -755,6 +824,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32PerfStatus(PVMCPU pVCpu, uint32_
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PerfCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement IA32_PERFCTL. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -764,6 +834,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PerfCtl(PVMCPU pVCpu, uint32_t i
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32PerfCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement IA32_PERFCTL. */
     return VINF_SUCCESS;
 }
@@ -772,6 +843,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32PerfCtl(PVMCPU pVCpu, uint32_t i
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32FixedCtrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement IA32_FIXED_CTRn (fixed performance counters). */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -781,6 +853,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32FixedCtrN(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32FixedCtrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement IA32_FIXED_CTRn (fixed performance counters). */
     return VINF_SUCCESS;
 }
@@ -789,6 +862,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32FixedCtrN(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PerfCapabilities(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement performance counters. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -798,6 +872,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PerfCapabilities(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32PerfCapabilities(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement performance counters. */
     return VINF_SUCCESS;
 }
@@ -806,6 +881,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32PerfCapabilities(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32FixedCtrCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement performance counters. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -815,6 +891,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32FixedCtrCtrl(PVMCPU pVCpu, uint3
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32FixedCtrCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement performance counters. */
     return VINF_SUCCESS;
 }
@@ -823,6 +900,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32FixedCtrCtrl(PVMCPU pVCpu, uint3
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PerfGlobalStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement performance counters. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -832,6 +910,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PerfGlobalStatus(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32PerfGlobalStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement performance counters. */
     return VINF_SUCCESS;
 }
@@ -840,6 +919,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32PerfGlobalStatus(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PerfGlobalCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement performance counters. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -849,6 +929,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PerfGlobalCtrl(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32PerfGlobalCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement performance counters. */
     return VINF_SUCCESS;
 }
@@ -857,6 +938,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32PerfGlobalCtrl(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PerfGlobalOvfCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement performance counters. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -866,6 +948,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PerfGlobalOvfCtrl(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32PerfGlobalOvfCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement performance counters. */
     return VINF_SUCCESS;
 }
@@ -874,6 +957,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32PerfGlobalOvfCtrl(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PebsEnable(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement performance counters. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -883,6 +967,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PebsEnable(PVMCPU pVCpu, uint32_
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32PebsEnable(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement performance counters. */
     return VINF_SUCCESS;
 }
@@ -891,6 +976,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32PebsEnable(PVMCPU pVCpu, uint32_
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32ClockModulation(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement IA32_CLOCK_MODULATION. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -900,6 +986,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32ClockModulation(PVMCPU pVCpu, ui
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32ClockModulation(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement IA32_CLOCK_MODULATION. */
     return VINF_SUCCESS;
 }
@@ -908,6 +995,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32ClockModulation(PVMCPU pVCpu, ui
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32ThermInterrupt(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement IA32_THERM_INTERRUPT. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -917,6 +1005,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32ThermInterrupt(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32ThermInterrupt(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement IA32_THERM_STATUS. */
     return VINF_SUCCESS;
 }
@@ -925,6 +1014,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32ThermInterrupt(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32ThermStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement IA32_THERM_STATUS. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -934,6 +1024,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32ThermStatus(PVMCPU pVCpu, uint32
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32ThermStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement IA32_THERM_INTERRUPT. */
     return VINF_SUCCESS;
 }
@@ -942,6 +1033,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32ThermStatus(PVMCPU pVCpu, uint32
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32Therm2Ctl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement IA32_THERM2_CTL. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -951,6 +1043,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32Therm2Ctl(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32Therm2Ctl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement IA32_THERM2_CTL. */
     return VINF_SUCCESS;
 }
@@ -959,6 +1052,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32Therm2Ctl(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32MiscEnable(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = pVCpu->cpum.s.GuestMsrs.msr.MiscEnable;
     return VINF_SUCCESS;
 }
@@ -967,6 +1061,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32MiscEnable(PVMCPU pVCpu, uint32_
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32MiscEnable(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
 #ifdef LOG_ENABLED
     uint64_t const uOld = pVCpu->cpum.s.GuestMsrs.msr.MiscEnable;
 #endif
@@ -989,6 +1084,8 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32MiscEnable(PVMCPU pVCpu, uint32_
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32McCtlStatusAddrMiscN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(pRange);
+
     /** @todo Implement machine check exception injection. */
     switch (idMsr & 3)
     {
@@ -1013,6 +1110,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32McCtlStatusAddrMiscN(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32McCtlStatusAddrMiscN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(pRange); RT_NOREF_PV(uRawValue);
     switch (idMsr & 3)
     {
         case 0:
@@ -1058,6 +1156,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32McCtlStatusAddrMiscN(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32McNCtl2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo Implement machine check exception injection. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -1067,6 +1166,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32McNCtl2(PVMCPU pVCpu, uint32_t i
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32McNCtl2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Implement machine check exception injection. */
     return VINF_SUCCESS;
 }
@@ -1075,6 +1175,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32McNCtl2(PVMCPU pVCpu, uint32_t i
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32DsArea(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement IA32_DS_AREA. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -1084,6 +1185,8 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32DsArea(PVMCPU pVCpu, uint32_t id
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32DsArea(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     return VINF_SUCCESS;
 }
 
@@ -1091,6 +1194,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32DsArea(PVMCPU pVCpu, uint32_t id
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32TscDeadline(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement TSC deadline timer. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -1100,6 +1204,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32TscDeadline(PVMCPU pVCpu, uint32
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32TscDeadline(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement TSC deadline timer. */
     return VINF_SUCCESS;
 }
@@ -1108,6 +1213,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32TscDeadline(PVMCPU pVCpu, uint32
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32X2ApicN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pRange);
     return PDMApicReadMsr(pVCpu, idMsr, puValue);
 }
 
@@ -1115,6 +1221,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32X2ApicN(PVMCPU pVCpu, uint32_t i
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32X2ApicN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pRange); RT_NOREF_PV(uRawValue);
     return PDMApicWriteMsr(pVCpu, idMsr, uValue);
 }
 
@@ -1122,6 +1229,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32X2ApicN(PVMCPU pVCpu, uint32_t i
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32DebugInterface(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo IA32_DEBUG_INTERFACE (no docs)  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -1131,6 +1239,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32DebugInterface(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32DebugInterface(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo IA32_DEBUG_INTERFACE (no docs)  */
     return VINF_SUCCESS;
 }
@@ -1139,6 +1248,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32DebugInterface(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = 0;
     return VINF_SUCCESS;
 }
@@ -1147,6 +1257,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxBase(PVMCPU pVCpu, uint32_t i
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxPinbasedCtls(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = 0;
     return VINF_SUCCESS;
 }
@@ -1155,6 +1266,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxPinbasedCtls(PVMCPU pVCpu, ui
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxProcbasedCtls(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = 0;
     return VINF_SUCCESS;
 }
@@ -1163,6 +1275,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxProcbasedCtls(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxExitCtls(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = 0;
     return VINF_SUCCESS;
 }
@@ -1171,6 +1284,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxExitCtls(PVMCPU pVCpu, uint32
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxEntryCtls(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = 0;
     return VINF_SUCCESS;
 }
@@ -1179,6 +1293,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxEntryCtls(PVMCPU pVCpu, uint3
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxMisc(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = 0;
     return VINF_SUCCESS;
 }
@@ -1187,6 +1302,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxMisc(PVMCPU pVCpu, uint32_t i
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxCr0Fixed0(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = 0;
     return VINF_SUCCESS;
 }
@@ -1195,6 +1311,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxCr0Fixed0(PVMCPU pVCpu, uint3
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxCr0Fixed1(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = 0;
     return VINF_SUCCESS;
 }
@@ -1203,6 +1320,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxCr0Fixed1(PVMCPU pVCpu, uint3
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxCr4Fixed0(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = 0;
     return VINF_SUCCESS;
 }
@@ -1211,6 +1329,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxCr4Fixed0(PVMCPU pVCpu, uint3
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxCr4Fixed1(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = 0;
     return VINF_SUCCESS;
 }
@@ -1219,6 +1338,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxCr4Fixed1(PVMCPU pVCpu, uint3
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxVmcsEnum(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = 0;
     return VINF_SUCCESS;
 }
@@ -1227,6 +1347,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxVmcsEnum(PVMCPU pVCpu, uint32
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxProcBasedCtls2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = 0;
     return VINF_SUCCESS;
 }
@@ -1235,6 +1356,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxProcBasedCtls2(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxEptVpidCap(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = 0;
     return VINF_SUCCESS;
 }
@@ -1243,6 +1365,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxEptVpidCap(PVMCPU pVCpu, uint
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxTruePinbasedCtls(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = 0;
     return VINF_SUCCESS;
 }
@@ -1251,6 +1374,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxTruePinbasedCtls(PVMCPU pVCpu
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxTrueProcbasedCtls(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = 0;
     return VINF_SUCCESS;
 }
@@ -1259,6 +1383,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxTrueProcbasedCtls(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxTrueExitCtls(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = 0;
     return VINF_SUCCESS;
 }
@@ -1267,6 +1392,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxTrueExitCtls(PVMCPU pVCpu, ui
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxTrueEntryCtls(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = 0;
     return VINF_SUCCESS;
 }
@@ -1275,6 +1401,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxTrueEntryCtls(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxVmFunc(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = 0;
     return VINF_SUCCESS;
 }
@@ -1298,6 +1425,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxVmFunc(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Amd64Efer(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = pVCpu->cpum.s.Guest.msrEFER;
     return VINF_SUCCESS;
 }
@@ -1313,6 +1441,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Amd64Efer(PVMCPU pVCpu, uint32_t idM
                                  : 0;
     uint64_t        fMask        = 0;
     uint64_t        fIgnoreMask  = MSR_K6_EFER_LMA;
+    RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uRawValue);
 
     /* Filter out those bits the guest is allowed to change. (e.g. LMA is read-only) */
     if (fExtFeatures & X86_CPUID_EXT_FEATURE_EDX_NX)
@@ -1365,6 +1494,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Amd64Efer(PVMCPU pVCpu, uint32_t idM
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Amd64SyscallTarget(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = pVCpu->cpum.s.Guest.msrSTAR;
     return VINF_SUCCESS;
 }
@@ -1373,6 +1503,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Amd64SyscallTarget(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Amd64SyscallTarget(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uRawValue);
     pVCpu->cpum.s.Guest.msrSTAR = uValue;
     return VINF_SUCCESS;
 }
@@ -1381,6 +1512,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Amd64SyscallTarget(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Amd64LongSyscallTarget(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = pVCpu->cpum.s.Guest.msrLSTAR;
     return VINF_SUCCESS;
 }
@@ -1389,6 +1521,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Amd64LongSyscallTarget(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Amd64LongSyscallTarget(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uRawValue);
     if (!X86_IS_CANONICAL(uValue))
     {
         Log(("CPUM: wrmsr %s(%#x), %#llx -> #GP - not canonical\n", pRange->szName, idMsr, uValue));
@@ -1402,6 +1535,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Amd64LongSyscallTarget(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Amd64CompSyscallTarget(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = pVCpu->cpum.s.Guest.msrCSTAR;
     return VINF_SUCCESS;
 }
@@ -1410,6 +1544,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Amd64CompSyscallTarget(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Amd64CompSyscallTarget(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uRawValue);
     if (!X86_IS_CANONICAL(uValue))
     {
         Log(("CPUM: wrmsr %s(%#x), %#llx -> #GP - not canonical\n", pRange->szName, idMsr, uValue));
@@ -1423,6 +1558,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Amd64CompSyscallTarget(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Amd64SyscallFlagMask(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = pVCpu->cpum.s.Guest.msrSFMASK;
     return VINF_SUCCESS;
 }
@@ -1431,6 +1567,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Amd64SyscallFlagMask(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Amd64SyscallFlagMask(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uRawValue);
     pVCpu->cpum.s.Guest.msrSFMASK = uValue;
     return VINF_SUCCESS;
 }
@@ -1439,6 +1576,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Amd64SyscallFlagMask(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Amd64FsBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = pVCpu->cpum.s.Guest.fs.u64Base;
     return VINF_SUCCESS;
 }
@@ -1447,6 +1585,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Amd64FsBase(PVMCPU pVCpu, uint32_t i
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Amd64FsBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uRawValue);
     pVCpu->cpum.s.Guest.fs.u64Base = uValue;
     return VINF_SUCCESS;
 }
@@ -1455,6 +1594,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Amd64FsBase(PVMCPU pVCpu, uint32_t i
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Amd64GsBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = pVCpu->cpum.s.Guest.gs.u64Base;
     return VINF_SUCCESS;
 }
@@ -1462,6 +1602,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Amd64GsBase(PVMCPU pVCpu, uint32_t i
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Amd64GsBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uRawValue);
     pVCpu->cpum.s.Guest.gs.u64Base = uValue;
     return VINF_SUCCESS;
 }
@@ -1471,6 +1612,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Amd64GsBase(PVMCPU pVCpu, uint32_t i
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Amd64KernelGsBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = pVCpu->cpum.s.Guest.msrKERNELGSBASE;
     return VINF_SUCCESS;
 }
@@ -1478,6 +1620,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Amd64KernelGsBase(PVMCPU pVCpu, uint
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Amd64KernelGsBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uRawValue);
     pVCpu->cpum.s.Guest.msrKERNELGSBASE = uValue;
     return VINF_SUCCESS;
 }
@@ -1486,6 +1629,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Amd64KernelGsBase(PVMCPU pVCpu, uint
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Amd64TscAux(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = pVCpu->cpum.s.GuestMsrs.msr.TscAux;
     return VINF_SUCCESS;
 }
@@ -1493,6 +1637,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Amd64TscAux(PVMCPU pVCpu, uint32_t i
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Amd64TscAux(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uRawValue);
     pVCpu->cpum.s.GuestMsrs.msr.TscAux = uValue;
     return VINF_SUCCESS;
 }
@@ -1507,6 +1652,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Amd64TscAux(PVMCPU pVCpu, uint32_t i
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelEblCrPowerOn(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo recalc clock frequency ratio? */
     *puValue = pRange->uValue;
     return VINF_SUCCESS;
@@ -1516,6 +1662,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelEblCrPowerOn(PVMCPU pVCpu, uint
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelEblCrPowerOn(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Write EBL_CR_POWERON: Remember written bits. */
     return VINF_SUCCESS;
 }
@@ -1524,6 +1671,8 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelEblCrPowerOn(PVMCPU pVCpu, uint
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7CoreThreadCount(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
+
     /* Note! According to cpuid_set_info in XNU (10.7.0), Westmere CPU only
              have a 4-bit core count. */
     uint16_t cCores   = pVCpu->CTX_SUFF(pVM)->cCpus;
@@ -1536,6 +1685,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7CoreThreadCount(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelP4EbcHardPowerOn(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo P4 hard power on config */
     *puValue = pRange->uValue;
     return VINF_SUCCESS;
@@ -1545,6 +1695,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelP4EbcHardPowerOn(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelP4EbcHardPowerOn(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo P4 hard power on config */
     return VINF_SUCCESS;
 }
@@ -1553,6 +1704,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelP4EbcHardPowerOn(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelP4EbcSoftPowerOn(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo P4 soft power on config  */
     *puValue = pRange->uValue;
     return VINF_SUCCESS;
@@ -1562,6 +1714,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelP4EbcSoftPowerOn(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelP4EbcSoftPowerOn(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo P4 soft power on config */
     return VINF_SUCCESS;
 }
@@ -1570,6 +1723,8 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelP4EbcSoftPowerOn(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelP4EbcFrequencyId(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
+
     uint64_t uValue;
     PVM      pVM            = pVCpu->CTX_SUFF(pVM);
     uint64_t uScalableBusHz = CPUMGetGuestScalableBusFrequency(pVM);
@@ -1628,6 +1783,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelP4EbcFrequencyId(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelP4EbcFrequencyId(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo P4 bus frequency config  */
     return VINF_SUCCESS;
 }
@@ -1636,6 +1792,8 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelP4EbcFrequencyId(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelP6FsbFrequency(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
+
     /* Convert the scalable bus frequency to the encoding in the intel manual (for core+). */
     uint64_t uScalableBusHz = CPUMGetGuestScalableBusFrequency(pVCpu->CTX_SUFF(pVM));
     if (uScalableBusHz <= CPUM_SBUSFREQ_100MHZ)
@@ -1662,6 +1820,8 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelP6FsbFrequency(PVMCPU pVCpu, ui
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelPlatformInfo(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
+
     /* Just indicate a fixed TSC, no turbo boost, no programmable anything. */
     PVM      pVM            = pVCpu->CTX_SUFF(pVM);
     uint64_t uScalableBusHz = CPUMGetGuestScalableBusFrequency(pVM);
@@ -1682,6 +1842,8 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelPlatformInfo(PVMCPU pVCpu, uint
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelFlexRatio(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
+
     uint64_t uValue = pRange->uValue & ~UINT64_C(0x1ff00);
 
     PVM      pVM            = pVCpu->CTX_SUFF(pVM);
@@ -1698,6 +1860,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelFlexRatio(PVMCPU pVCpu, uint32_
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelFlexRatio(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement writing MSR_FLEX_RATIO. */
     return VINF_SUCCESS;
 }
@@ -1706,6 +1869,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelFlexRatio(PVMCPU pVCpu, uint32_
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelPkgCStConfigControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = pVCpu->cpum.s.GuestMsrs.msr.PkgCStateCfgCtrl;
     return VINF_SUCCESS;
 }
@@ -1714,6 +1878,8 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelPkgCStConfigControl(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelPkgCStConfigControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uRawValue);
+
     if (pVCpu->cpum.s.GuestMsrs.msr.PkgCStateCfgCtrl & RT_BIT_64(15))
     {
         Log(("CPUM: WRMDR %#x (%s), %#llx: Write protected -> #GP\n", idMsr, pRange->szName, uValue));
@@ -1734,6 +1900,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelPkgCStConfigControl(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelPmgIoCaptureBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement I/O mwait wakeup. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -1743,6 +1910,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelPmgIoCaptureBase(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelPmgIoCaptureBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement I/O mwait wakeup. */
     return VINF_SUCCESS;
 }
@@ -1751,6 +1919,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelPmgIoCaptureBase(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelLastBranchFromToN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement last branch records. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -1760,6 +1929,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelLastBranchFromToN(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelLastBranchFromToN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement last branch records. */
     return VINF_SUCCESS;
 }
@@ -1768,6 +1938,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelLastBranchFromToN(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelLastBranchFromN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement last branch records. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -1777,6 +1948,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelLastBranchFromN(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelLastBranchFromN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uRawValue);
     /** @todo implement last branch records. */
     /** @todo Probing indicates that bit 63 is settable on SandyBridge, at least
      *        if the rest of the bits are zero.  Automatic sign extending?
@@ -1793,6 +1965,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelLastBranchFromN(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelLastBranchToN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement last branch records. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -1802,6 +1975,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelLastBranchToN(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelLastBranchToN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement last branch records. */
     /** @todo Probing indicates that bit 63 is settable on SandyBridge, at least
      *        if the rest of the bits are zero.  Automatic sign extending?
@@ -1818,6 +1992,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelLastBranchToN(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelLastBranchTos(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement last branch records. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -1827,6 +2002,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelLastBranchTos(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelLastBranchTos(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement last branch records. */
     return VINF_SUCCESS;
 }
@@ -1835,6 +2011,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelLastBranchTos(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelBblCrCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = pRange->uValue;
     return VINF_SUCCESS;
 }
@@ -1843,6 +2020,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelBblCrCtl(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelBblCrCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     return VINF_SUCCESS;
 }
 
@@ -1850,6 +2028,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelBblCrCtl(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelBblCrCtl3(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = pRange->uValue;
     return VINF_SUCCESS;
 }
@@ -1858,6 +2037,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelBblCrCtl3(PVMCPU pVCpu, uint32_
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelBblCrCtl3(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     return VINF_SUCCESS;
 }
 
@@ -1865,6 +2045,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelBblCrCtl3(PVMCPU pVCpu, uint32_
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7TemperatureTarget(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = pRange->uValue;
     return VINF_SUCCESS;
 }
@@ -1873,6 +2054,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7TemperatureTarget(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7TemperatureTarget(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     return VINF_SUCCESS;
 }
 
@@ -1880,6 +2062,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7TemperatureTarget(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7MsrOffCoreResponseN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo machine check. */
     *puValue = pRange->uValue;
     return VINF_SUCCESS;
@@ -1889,6 +2072,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7MsrOffCoreResponseN(PVMCPU pV
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7MsrOffCoreResponseN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo machine check. */
     return VINF_SUCCESS;
 }
@@ -1897,6 +2081,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7MsrOffCoreResponseN(PVMCPU pV
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7MiscPwrMgmt(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = 0;
     return VINF_SUCCESS;
 }
@@ -1905,6 +2090,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7MiscPwrMgmt(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7MiscPwrMgmt(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     return VINF_SUCCESS;
 }
 
@@ -1912,6 +2098,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7MiscPwrMgmt(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelP6CrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(idMsr);
     int rc = CPUMGetGuestCRx(pVCpu, pRange->uValue, puValue);
     AssertRC(rc);
     return VINF_SUCCESS;
@@ -1921,6 +2108,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelP6CrN(PVMCPU pVCpu, uint32_t id
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelP6CrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /* This CRx interface differs from the MOV CRx, GReg interface in that
        #GP(0) isn't raised if unsupported bits are written to.  Instead they
        are simply ignored and masked off. (Pentium M Dothan)  */
@@ -1933,6 +2121,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelP6CrN(PVMCPU pVCpu, uint32_t id
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelCpuId1FeatureMaskEcdx(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement CPUID masking.  */
     *puValue = UINT64_MAX;
     return VINF_SUCCESS;
@@ -1942,6 +2131,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelCpuId1FeatureMaskEcdx(PVMCPU pV
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelCpuId1FeatureMaskEcdx(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement CPUID masking.  */
     return VINF_SUCCESS;
 }
@@ -1950,7 +2140,9 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelCpuId1FeatureMaskEcdx(PVMCPU pV
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelCpuId1FeatureMaskEax(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement CPUID masking.  */
+    *puValue = 0;
     return VINF_SUCCESS;
 }
 
@@ -1958,6 +2150,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelCpuId1FeatureMaskEax(PVMCPU pVC
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelCpuId1FeatureMaskEax(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement CPUID masking.  */
     return VINF_SUCCESS;
 }
@@ -1967,6 +2160,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelCpuId1FeatureMaskEax(PVMCPU pVC
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelCpuId80000001FeatureMaskEcdx(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement CPUID masking.  */
     *puValue = UINT64_MAX;
     return VINF_SUCCESS;
@@ -1976,6 +2170,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelCpuId80000001FeatureMaskEcdx(PV
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelCpuId80000001FeatureMaskEcdx(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement CPUID masking.  */
     return VINF_SUCCESS;
 }
@@ -1985,6 +2180,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelCpuId80000001FeatureMaskEcdx(PV
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7SandyAesNiCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement AES-NI.  */
     *puValue = 3;  /* Bit 0 is lock bit, bit 1 disables AES-NI. That's what they say. */
     return VINF_SUCCESS;
@@ -1994,6 +2190,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7SandyAesNiCtl(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7SandyAesNiCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement AES-NI.  */
     return VERR_CPUM_RAISE_GP_0;
 }
@@ -2002,6 +2199,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7SandyAesNiCtl(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7TurboRatioLimit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement intel C states.  */
     *puValue = pRange->uValue;
     return VINF_SUCCESS;
@@ -2011,6 +2209,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7TurboRatioLimit(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7TurboRatioLimit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement intel C states.  */
     return VINF_SUCCESS;
 }
@@ -2019,6 +2218,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7TurboRatioLimit(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7LbrSelect(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement last-branch-records.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2028,6 +2228,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7LbrSelect(PVMCPU pVCpu, uint3
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7LbrSelect(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement last-branch-records.  */
     return VINF_SUCCESS;
 }
@@ -2036,6 +2237,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7LbrSelect(PVMCPU pVCpu, uint3
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7SandyErrorControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement memory error injection (MSR_ERROR_CONTROL).  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2045,6 +2247,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7SandyErrorControl(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7SandyErrorControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement memory error injection (MSR_ERROR_CONTROL).  */
     return VINF_SUCCESS;
 }
@@ -2053,6 +2256,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7SandyErrorControl(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7VirtualLegacyWireCap(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement memory VLW?  */
     *puValue = pRange->uValue;
     /* Note: A20M is known to be bit 1 as this was disclosed in spec update
@@ -2070,6 +2274,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7VirtualLegacyWireCap(PVMCPU p
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7PowerCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo intel power management  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2079,6 +2284,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7PowerCtl(PVMCPU pVCpu, uint32
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7PowerCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo intel power management  */
     return VINF_SUCCESS;
 }
@@ -2087,6 +2293,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7PowerCtl(PVMCPU pVCpu, uint32
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7SandyPebsNumAlt(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo intel performance counters.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2096,6 +2303,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7SandyPebsNumAlt(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7SandyPebsNumAlt(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo intel performance counters.  */
     return VINF_SUCCESS;
 }
@@ -2104,6 +2312,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7SandyPebsNumAlt(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7PebsLdLat(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo intel performance counters.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2113,6 +2322,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7PebsLdLat(PVMCPU pVCpu, uint3
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7PebsLdLat(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo intel performance counters.  */
     return VINF_SUCCESS;
 }
@@ -2121,6 +2331,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7PebsLdLat(PVMCPU pVCpu, uint3
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7PkgCnResidencyN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo intel power management.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2130,6 +2341,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7PkgCnResidencyN(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7CoreCnResidencyN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo intel power management.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2139,6 +2351,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7CoreCnResidencyN(PVMCPU pVCpu
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7SandyVrCurrentConfig(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo Figure out what MSR_VR_CURRENT_CONFIG & MSR_VR_MISC_CONFIG are.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2148,6 +2361,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7SandyVrCurrentConfig(PVMCPU p
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7SandyVrCurrentConfig(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Figure out what MSR_VR_CURRENT_CONFIG & MSR_VR_MISC_CONFIG are.  */
     return VINF_SUCCESS;
 }
@@ -2156,6 +2370,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7SandyVrCurrentConfig(PVMCPU p
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7SandyVrMiscConfig(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo Figure out what MSR_VR_CURRENT_CONFIG & MSR_VR_MISC_CONFIG are.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2165,6 +2380,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7SandyVrMiscConfig(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7SandyVrMiscConfig(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Figure out what MSR_VR_CURRENT_CONFIG & MSR_VR_MISC_CONFIG are.  */
     return VINF_SUCCESS;
 }
@@ -2173,6 +2389,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7SandyVrMiscConfig(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7SandyRaplPowerUnit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo intel RAPL.  */
     *puValue = pRange->uValue;
     return VINF_SUCCESS;
@@ -2182,6 +2399,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7SandyRaplPowerUnit(PVMCPU pVC
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7SandyRaplPowerUnit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /* Note! This is documented as read only and except for a Silvermont sample has
              always been classified as read only.  This is just here to make it compile. */
     return VINF_SUCCESS;
@@ -2191,6 +2409,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7SandyRaplPowerUnit(PVMCPU pVC
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7SandyPkgCnIrtlN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo intel power management.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2200,6 +2419,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7SandyPkgCnIrtlN(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7SandyPkgCnIrtlN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo intel power management.  */
     return VINF_SUCCESS;
 }
@@ -2208,6 +2428,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7SandyPkgCnIrtlN(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7SandyPkgC2Residency(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo intel power management.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2217,6 +2438,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7SandyPkgC2Residency(PVMCPU pV
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7SandyPkgC2Residency(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /* Note! This is documented as read only and except for a Silvermont sample has
              always been classified as read only.  This is just here to make it compile. */
     return VINF_SUCCESS;
@@ -2226,6 +2448,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7SandyPkgC2Residency(PVMCPU pV
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPkgPowerLimit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo intel RAPL.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2235,6 +2458,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPkgPowerLimit(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7RaplPkgPowerLimit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo intel RAPL.  */
     return VINF_SUCCESS;
 }
@@ -2243,6 +2467,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7RaplPkgPowerLimit(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPkgEnergyStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo intel power management.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2252,6 +2477,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPkgEnergyStatus(PVMCPU pV
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPkgPerfStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo intel power management.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2261,6 +2487,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPkgPerfStatus(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPkgPowerInfo(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo intel power management.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2270,6 +2497,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPkgPowerInfo(PVMCPU pVCpu
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplDramPowerLimit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo intel RAPL.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2279,6 +2507,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplDramPowerLimit(PVMCPU pVC
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7RaplDramPowerLimit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo intel RAPL.  */
     return VINF_SUCCESS;
 }
@@ -2287,6 +2516,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7RaplDramPowerLimit(PVMCPU pVC
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplDramEnergyStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo intel power management.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2296,6 +2526,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplDramEnergyStatus(PVMCPU p
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplDramPerfStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo intel power management.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2305,6 +2536,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplDramPerfStatus(PVMCPU pVC
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplDramPowerInfo(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo intel power management.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2314,6 +2546,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplDramPowerInfo(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPp0PowerLimit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo intel RAPL.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2323,6 +2556,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPp0PowerLimit(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7RaplPp0PowerLimit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo intel RAPL.  */
     return VINF_SUCCESS;
 }
@@ -2331,6 +2565,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7RaplPp0PowerLimit(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPp0EnergyStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo intel power management.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2340,6 +2575,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPp0EnergyStatus(PVMCPU pV
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPp0Policy(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo intel RAPL.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2349,6 +2585,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPp0Policy(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7RaplPp0Policy(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo intel RAPL.  */
     return VINF_SUCCESS;
 }
@@ -2357,6 +2594,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7RaplPp0Policy(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPp0PerfStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo intel power management.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2366,6 +2604,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPp0PerfStatus(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPp1PowerLimit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo intel RAPL.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2375,6 +2614,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPp1PowerLimit(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7RaplPp1PowerLimit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo intel RAPL.  */
     return VINF_SUCCESS;
 }
@@ -2383,6 +2623,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7RaplPp1PowerLimit(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPp1EnergyStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo intel power management.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2392,6 +2633,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPp1EnergyStatus(PVMCPU pV
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPp1Policy(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo intel RAPL.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2401,6 +2643,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPp1Policy(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7RaplPp1Policy(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo intel RAPL.  */
     return VINF_SUCCESS;
 }
@@ -2409,6 +2652,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7RaplPp1Policy(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7IvyConfigTdpNominal(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo intel power management.  */
     *puValue = pRange->uValue;
     return VINF_SUCCESS;
@@ -2418,6 +2662,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7IvyConfigTdpNominal(PVMCPU pV
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7IvyConfigTdpLevel1(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo intel power management.  */
     *puValue = pRange->uValue;
     return VINF_SUCCESS;
@@ -2427,6 +2672,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7IvyConfigTdpLevel1(PVMCPU pVC
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7IvyConfigTdpLevel2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo intel power management.  */
     *puValue = pRange->uValue;
     return VINF_SUCCESS;
@@ -2436,6 +2682,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7IvyConfigTdpLevel2(PVMCPU pVC
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7IvyConfigTdpControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo intel power management.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2445,6 +2692,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7IvyConfigTdpControl(PVMCPU pV
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7IvyConfigTdpControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo intel power management.  */
     return VINF_SUCCESS;
 }
@@ -2453,6 +2701,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7IvyConfigTdpControl(PVMCPU pV
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7IvyTurboActivationRatio(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo intel power management.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2462,6 +2711,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7IvyTurboActivationRatio(PVMCP
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7IvyTurboActivationRatio(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo intel power management.  */
     return VINF_SUCCESS;
 }
@@ -2470,6 +2720,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7IvyTurboActivationRatio(PVMCP
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7UncPerfGlobalCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo uncore msrs.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2479,6 +2730,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7UncPerfGlobalCtrl(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7UncPerfGlobalCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo uncore msrs.  */
     return VINF_SUCCESS;
 }
@@ -2487,6 +2739,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7UncPerfGlobalCtrl(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7UncPerfGlobalStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo uncore msrs.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2496,6 +2749,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7UncPerfGlobalStatus(PVMCPU pV
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7UncPerfGlobalStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo uncore msrs.  */
     return VINF_SUCCESS;
 }
@@ -2504,6 +2758,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7UncPerfGlobalStatus(PVMCPU pV
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7UncPerfGlobalOvfCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo uncore msrs.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2513,6 +2768,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7UncPerfGlobalOvfCtrl(PVMCPU p
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7UncPerfGlobalOvfCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo uncore msrs.  */
     return VINF_SUCCESS;
 }
@@ -2521,6 +2777,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7UncPerfGlobalOvfCtrl(PVMCPU p
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7UncPerfFixedCtrCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo uncore msrs.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2530,6 +2787,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7UncPerfFixedCtrCtrl(PVMCPU pV
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7UncPerfFixedCtrCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo uncore msrs.  */
     return VINF_SUCCESS;
 }
@@ -2538,6 +2796,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7UncPerfFixedCtrCtrl(PVMCPU pV
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7UncPerfFixedCtr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo uncore msrs.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2547,6 +2806,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7UncPerfFixedCtr(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7UncPerfFixedCtr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo uncore msrs.  */
     return VINF_SUCCESS;
 }
@@ -2555,6 +2815,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7UncPerfFixedCtr(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7UncCBoxConfig(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo uncore msrs.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2564,6 +2825,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7UncCBoxConfig(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7UncArbPerfCtrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo uncore msrs.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2573,6 +2835,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7UncArbPerfCtrN(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7UncArbPerfCtrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo uncore msrs.  */
     return VINF_SUCCESS;
 }
@@ -2581,6 +2844,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7UncArbPerfCtrN(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7UncArbPerfEvtSelN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo uncore msrs.  */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2590,6 +2854,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7UncArbPerfEvtSelN(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7UncArbPerfEvtSelN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo uncore msrs.  */
     return VINF_SUCCESS;
 }
@@ -2598,6 +2863,8 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7UncArbPerfEvtSelN(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7SmiCount(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
+
     /*
      * 31:0 is SMI count (read only), 63:32 reserved.
      * Since we don't do SMI, the count is always zero.
@@ -2610,6 +2877,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7SmiCount(PVMCPU pVCpu, uint32
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelCore2EmttmCrTablesN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement enhanced multi thread termal monitoring? */
     *puValue = pRange->uValue;
     return VINF_SUCCESS;
@@ -2619,6 +2887,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelCore2EmttmCrTablesN(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelCore2EmttmCrTablesN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement enhanced multi thread termal monitoring? */
     return VINF_SUCCESS;
 }
@@ -2627,6 +2896,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelCore2EmttmCrTablesN(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelCore2SmmCStMiscInfo(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo SMM & C-states? */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2636,6 +2906,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelCore2SmmCStMiscInfo(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelCore2SmmCStMiscInfo(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo SMM & C-states? */
     return VINF_SUCCESS;
 }
@@ -2644,6 +2915,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelCore2SmmCStMiscInfo(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelCore1ExtConfig(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo Core1&2 EXT_CONFIG (whatever that is)? */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2653,6 +2925,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelCore1ExtConfig(PVMCPU pVCpu, ui
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelCore1ExtConfig(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Core1&2 EXT_CONFIG (whatever that is)? */
     return VINF_SUCCESS;
 }
@@ -2661,6 +2934,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelCore1ExtConfig(PVMCPU pVCpu, ui
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelCore1DtsCalControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo Core1&2(?) DTS_CAL_CTRL (whatever that is)? */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2670,6 +2944,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelCore1DtsCalControl(PVMCPU pVCpu
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelCore1DtsCalControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Core1&2(?) DTS_CAL_CTRL (whatever that is)? */
     return VINF_SUCCESS;
 }
@@ -2678,6 +2953,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelCore1DtsCalControl(PVMCPU pVCpu
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelCore2PeciControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo Core2+ platform environment control interface control register? */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2687,6 +2963,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelCore2PeciControl(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelCore2PeciControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Core2+ platform environment control interface control register? */
     return VINF_SUCCESS;
 }
@@ -2695,6 +2972,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelCore2PeciControl(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelAtSilvCoreC1Recidency(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = 0;
     return VINF_SUCCESS;
 }
@@ -2713,6 +2991,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelAtSilvCoreC1Recidency(PVMCPU pV
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_P6LastBranchFromIp(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /* AMD seems to just record RIP, while intel claims to record RIP+CS.BASE
        if I read the docs correctly, thus the need for separate functions. */
     /** @todo implement last branch records. */
@@ -2724,6 +3003,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_P6LastBranchFromIp(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_P6LastBranchToIp(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement last branch records. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2733,6 +3013,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_P6LastBranchToIp(PVMCPU pVCpu, uint3
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_P6LastIntFromIp(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement last exception records. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2742,6 +3023,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_P6LastIntFromIp(PVMCPU pVCpu, uint32
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_P6LastIntFromIp(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement last exception records. */
     /* Note! On many CPUs, the high bit of the 0x000001dd register is always writable, even when the result is
              a non-cannonical address. */
@@ -2752,6 +3034,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_P6LastIntFromIp(PVMCPU pVCpu, uint32
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_P6LastIntToIp(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo implement last exception records. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2761,6 +3044,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_P6LastIntToIp(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_P6LastIntToIp(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo implement last exception records. */
     return VINF_SUCCESS;
 }
@@ -2777,6 +3061,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_P6LastIntToIp(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hTscRate(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo Implement TscRateMsr */
     *puValue = RT_MAKE_U64(0, 1); /* 1.0 = reset value. */
     return VINF_SUCCESS;
@@ -2786,6 +3071,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hTscRate(PVMCPU pVCpu, uint3
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hTscRate(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Implement TscRateMsr */
     return VINF_SUCCESS;
 }
@@ -2794,6 +3080,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hTscRate(PVMCPU pVCpu, uint3
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hLwpCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo Implement AMD LWP? (Instructions: LWPINS, LWPVAL, LLWPCB, SLWPCB) */
     /* Note: Only listes in BKDG for Family 15H. */
     *puValue = 0;
@@ -2804,6 +3091,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hLwpCfg(PVMCPU pVCpu, uint32
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hLwpCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Implement AMD LWP? (Instructions: LWPINS, LWPVAL, LLWPCB, SLWPCB) */
     return VINF_SUCCESS;
 }
@@ -2812,6 +3100,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hLwpCfg(PVMCPU pVCpu, uint32
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hLwpCbAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo Implement AMD LWP? (Instructions: LWPINS, LWPVAL, LLWPCB, SLWPCB) */
     /* Note: Only listes in BKDG for Family 15H. */
     *puValue = 0;
@@ -2822,6 +3111,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hLwpCbAddr(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hLwpCbAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Implement AMD LWP? (Instructions: LWPINS, LWPVAL, LLWPCB, SLWPCB) */
     return VINF_SUCCESS;
 }
@@ -2830,6 +3120,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hLwpCbAddr(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hMc4MiscN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo machine check. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2839,6 +3130,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hMc4MiscN(PVMCPU pVCpu, uint
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hMc4MiscN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo machine check. */
     return VINF_SUCCESS;
 }
@@ -2847,6 +3139,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hMc4MiscN(PVMCPU pVCpu, uint
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8PerfCtlN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD performance events. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2856,6 +3149,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8PerfCtlN(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8PerfCtlN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD performance events. */
     return VINF_SUCCESS;
 }
@@ -2864,6 +3158,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8PerfCtlN(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8PerfCtrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD performance events. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2873,6 +3168,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8PerfCtrN(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8PerfCtrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD performance events. */
     return VINF_SUCCESS;
 }
@@ -2881,6 +3177,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8PerfCtrN(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8SysCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD SYS_CFG */
     *puValue = pRange->uValue;
     return VINF_SUCCESS;
@@ -2890,6 +3187,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8SysCfg(PVMCPU pVCpu, uint32_t i
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8SysCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD SYS_CFG */
     return VINF_SUCCESS;
 }
@@ -2898,6 +3196,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8SysCfg(PVMCPU pVCpu, uint32_t i
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8HwCr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD HW_CFG */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2907,6 +3206,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8HwCr(PVMCPU pVCpu, uint32_t idM
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8HwCr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD HW_CFG */
     return VINF_SUCCESS;
 }
@@ -2915,6 +3215,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8HwCr(PVMCPU pVCpu, uint32_t idM
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8IorrBaseN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD IorrMask/IorrBase */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2924,6 +3225,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8IorrBaseN(PVMCPU pVCpu, uint32_
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8IorrBaseN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD IorrMask/IorrBase */
     return VINF_SUCCESS;
 }
@@ -2932,6 +3234,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8IorrBaseN(PVMCPU pVCpu, uint32_
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8IorrMaskN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD IorrMask/IorrBase */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2941,6 +3244,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8IorrMaskN(PVMCPU pVCpu, uint32_
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8IorrMaskN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD IorrMask/IorrBase */
     return VINF_SUCCESS;
 }
@@ -2949,6 +3253,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8IorrMaskN(PVMCPU pVCpu, uint32_
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8TopOfMemN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     *puValue = 0;
     /** @todo return 4GB - RamHoleSize here for TOPMEM. Figure out what to return
      *        for TOPMEM2. */
@@ -2961,6 +3266,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8TopOfMemN(PVMCPU pVCpu, uint32_
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8TopOfMemN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD TOPMEM and TOPMEM2/TOM2. */
     return VINF_SUCCESS;
 }
@@ -2969,6 +3275,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8TopOfMemN(PVMCPU pVCpu, uint32_
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8NbCfg1(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD NB_CFG1 */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2978,6 +3285,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8NbCfg1(PVMCPU pVCpu, uint32_t i
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8NbCfg1(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD NB_CFG1 */
     return VINF_SUCCESS;
 }
@@ -2986,6 +3294,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8NbCfg1(PVMCPU pVCpu, uint32_t i
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8McXcptRedir(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo machine check. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -2995,6 +3304,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8McXcptRedir(PVMCPU pVCpu, uint3
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8McXcptRedir(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo machine check. */
     return VINF_SUCCESS;
 }
@@ -3003,6 +3313,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8McXcptRedir(PVMCPU pVCpu, uint3
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8CpuNameN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(idMsr);
     PCPUMCPUIDLEAF pLeaf = cpumCpuIdGetLeaf(pVCpu->CTX_SUFF(pVM), pRange->uValue / 2 + 0x80000001);
     if (pLeaf)
     {
@@ -3020,6 +3331,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8CpuNameN(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8CpuNameN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Remember guest programmed CPU name. */
     return VINF_SUCCESS;
 }
@@ -3028,6 +3340,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8CpuNameN(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8HwThermalCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD HTC. */
     *puValue = pRange->uValue;
     return VINF_SUCCESS;
@@ -3037,6 +3350,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8HwThermalCtrl(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8HwThermalCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD HTC. */
     return VINF_SUCCESS;
 }
@@ -3045,6 +3359,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8HwThermalCtrl(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8SwThermalCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD STC. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -3054,6 +3369,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8SwThermalCtrl(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8SwThermalCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD STC. */
     return VINF_SUCCESS;
 }
@@ -3062,6 +3378,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8SwThermalCtrl(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8FidVidControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD FIDVID_CTL. */
     *puValue = pRange->uValue;
     return VINF_SUCCESS;
@@ -3071,6 +3388,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8FidVidControl(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8FidVidControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD FIDVID_CTL. */
     return VINF_SUCCESS;
 }
@@ -3079,6 +3397,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8FidVidControl(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8FidVidStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD FIDVID_STATUS. */
     *puValue = pRange->uValue;
     return VINF_SUCCESS;
@@ -3088,6 +3407,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8FidVidStatus(PVMCPU pVCpu, uint
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8McCtlMaskN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD MC. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -3097,6 +3417,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8McCtlMaskN(PVMCPU pVCpu, uint32
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8McCtlMaskN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD MC. */
     return VINF_SUCCESS;
 }
@@ -3105,6 +3426,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8McCtlMaskN(PVMCPU pVCpu, uint32
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8SmiOnIoTrapN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD SMM/SMI and I/O trap. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -3114,6 +3436,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8SmiOnIoTrapN(PVMCPU pVCpu, uint
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8SmiOnIoTrapN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD SMM/SMI and I/O trap. */
     return VINF_SUCCESS;
 }
@@ -3122,6 +3445,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8SmiOnIoTrapN(PVMCPU pVCpu, uint
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8SmiOnIoTrapCtlSts(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD SMM/SMI and I/O trap. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -3131,6 +3455,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8SmiOnIoTrapCtlSts(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8SmiOnIoTrapCtlSts(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD SMM/SMI and I/O trap. */
     return VINF_SUCCESS;
 }
@@ -3139,6 +3464,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8SmiOnIoTrapCtlSts(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8IntPendingMessage(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo Interrupt pending message. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -3148,6 +3474,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8IntPendingMessage(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8IntPendingMessage(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Interrupt pending message. */
     return VINF_SUCCESS;
 }
@@ -3156,6 +3483,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8IntPendingMessage(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8SmiTriggerIoCycle(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD SMM/SMI and trigger I/O cycle. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -3165,6 +3493,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8SmiTriggerIoCycle(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8SmiTriggerIoCycle(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD SMM/SMI and trigger I/O cycle. */
     return VINF_SUCCESS;
 }
@@ -3173,6 +3502,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8SmiTriggerIoCycle(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hMmioCfgBaseAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD MMIO Configuration base address. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -3182,6 +3512,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hMmioCfgBaseAddr(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hMmioCfgBaseAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD MMIO Configuration base address. */
     return VINF_SUCCESS;
 }
@@ -3190,6 +3521,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hMmioCfgBaseAddr(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hTrapCtlMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD 0xc0010059. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -3199,6 +3531,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hTrapCtlMaybe(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hTrapCtlMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD 0xc0010059. */
     return VINF_SUCCESS;
 }
@@ -3207,6 +3540,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hTrapCtlMaybe(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hPStateCurLimit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD P-states. */
     *puValue = pRange->uValue;
     return VINF_SUCCESS;
@@ -3216,6 +3550,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hPStateCurLimit(PVMCPU pVCpu
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hPStateControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD P-states. */
     *puValue = pRange->uValue;
     return VINF_SUCCESS;
@@ -3225,6 +3560,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hPStateControl(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hPStateControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD P-states. */
     return VINF_SUCCESS;
 }
@@ -3233,6 +3569,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hPStateControl(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hPStateStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD P-states. */
     *puValue = pRange->uValue;
     return VINF_SUCCESS;
@@ -3242,6 +3579,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hPStateStatus(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hPStateStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD P-states. */
     return VINF_SUCCESS;
 }
@@ -3250,6 +3588,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hPStateStatus(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hPStateN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD P-states. */
     *puValue = pRange->uValue;
     return VINF_SUCCESS;
@@ -3259,6 +3598,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hPStateN(PVMCPU pVCpu, uint3
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hPStateN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD P-states. */
     return VINF_SUCCESS;
 }
@@ -3267,6 +3607,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hPStateN(PVMCPU pVCpu, uint3
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hCofVidControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD P-states. */
     *puValue = pRange->uValue;
     return VINF_SUCCESS;
@@ -3276,6 +3617,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hCofVidControl(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hCofVidControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD P-states. */
     return VINF_SUCCESS;
 }
@@ -3284,6 +3626,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hCofVidControl(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hCofVidStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD P-states. */
     *puValue = pRange->uValue;
     return VINF_SUCCESS;
@@ -3293,6 +3636,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hCofVidStatus(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hCofVidStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /* Note! Writing 0 seems to not GP, not sure if it does anything to the value... */
     /** @todo AMD P-states. */
     return VINF_SUCCESS;
@@ -3302,6 +3646,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hCofVidStatus(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hCStateIoBaseAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD C-states. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -3311,6 +3656,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hCStateIoBaseAddr(PVMCPU pVC
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hCStateIoBaseAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD C-states. */
     return VINF_SUCCESS;
 }
@@ -3319,6 +3665,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hCStateIoBaseAddr(PVMCPU pVC
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hCpuWatchdogTimer(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD machine checks. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -3328,6 +3675,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hCpuWatchdogTimer(PVMCPU pVC
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hCpuWatchdogTimer(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD machine checks. */
     return VINF_SUCCESS;
 }
@@ -3336,6 +3684,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hCpuWatchdogTimer(PVMCPU pVC
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8SmmBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD SMM. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -3345,6 +3694,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8SmmBase(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8SmmBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD SMM. */
     return VINF_SUCCESS;
 }
@@ -3353,6 +3703,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8SmmBase(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8SmmAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD SMM. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -3362,6 +3713,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8SmmAddr(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8SmmAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD SMM. */
     return VINF_SUCCESS;
 }
@@ -3371,6 +3723,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8SmmAddr(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8SmmMask(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD SMM. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -3380,6 +3733,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8SmmMask(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8SmmMask(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD SMM. */
     return VINF_SUCCESS;
 }
@@ -3388,6 +3742,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8SmmMask(PVMCPU pVCpu, uint32_t
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8VmCr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD SVM. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -3397,6 +3752,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8VmCr(PVMCPU pVCpu, uint32_t idM
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8VmCr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD SVM. */
     return VINF_SUCCESS;
 }
@@ -3405,6 +3761,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8VmCr(PVMCPU pVCpu, uint32_t idM
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8IgnNe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD IGNNE\# control. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -3414,6 +3771,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8IgnNe(PVMCPU pVCpu, uint32_t id
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8IgnNe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD IGNNE\# control. */
     return VINF_SUCCESS;
 }
@@ -3422,6 +3780,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8IgnNe(PVMCPU pVCpu, uint32_t id
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8SmmCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD SMM. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -3431,6 +3790,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8SmmCtl(PVMCPU pVCpu, uint32_t i
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8SmmCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD SMM. */
     return VINF_SUCCESS;
 }
@@ -3439,6 +3799,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8SmmCtl(PVMCPU pVCpu, uint32_t i
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8VmHSavePa(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD SVM. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -3448,6 +3809,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8VmHSavePa(PVMCPU pVCpu, uint32_
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8VmHSavePa(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD SVM. */
     return VINF_SUCCESS;
 }
@@ -3456,6 +3818,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8VmHSavePa(PVMCPU pVCpu, uint32_
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hVmLockKey(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD SVM. */
     *puValue = 0; /* RAZ */
     return VINF_SUCCESS;
@@ -3465,6 +3828,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hVmLockKey(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hVmLockKey(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD SVM. */
     return VINF_SUCCESS;
 }
@@ -3473,6 +3837,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hVmLockKey(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hSmmLockKey(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD SMM. */
     *puValue = 0; /* RAZ */
     return VINF_SUCCESS;
@@ -3482,6 +3847,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hSmmLockKey(PVMCPU pVCpu, ui
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hSmmLockKey(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD SMM. */
     return VINF_SUCCESS;
 }
@@ -3490,6 +3856,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hSmmLockKey(PVMCPU pVCpu, ui
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hLocalSmiStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD SMM/SMI. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -3499,6 +3866,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hLocalSmiStatus(PVMCPU pVCpu
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hLocalSmiStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD SMM/SMI. */
     return VINF_SUCCESS;
 }
@@ -3507,6 +3875,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hLocalSmiStatus(PVMCPU pVCpu
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hOsVisWrkIdLength(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr);
     /** @todo AMD OS visible workaround. */
     *puValue = pRange->uValue;
     return VINF_SUCCESS;
@@ -3516,6 +3885,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hOsVisWrkIdLength(PVMCPU pVC
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hOsVisWrkIdLength(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD OS visible workaround. */
     return VINF_SUCCESS;
 }
@@ -3524,6 +3894,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hOsVisWrkIdLength(PVMCPU pVC
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hOsVisWrkStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD OS visible workaround. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -3533,6 +3904,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hOsVisWrkStatus(PVMCPU pVCpu
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hOsVisWrkStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD OS visible workaround. */
     return VINF_SUCCESS;
 }
@@ -3541,6 +3913,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hOsVisWrkStatus(PVMCPU pVCpu
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam16hL2IPerfCtlN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD L2I performance counters. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -3550,6 +3923,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam16hL2IPerfCtlN(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam16hL2IPerfCtlN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD L2I performance counters. */
     return VINF_SUCCESS;
 }
@@ -3558,6 +3932,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam16hL2IPerfCtlN(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam16hL2IPerfCtrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD L2I performance counters. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -3567,6 +3942,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam16hL2IPerfCtrN(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam16hL2IPerfCtrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD L2I performance counters. */
     return VINF_SUCCESS;
 }
@@ -3575,6 +3951,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam16hL2IPerfCtrN(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hNorthbridgePerfCtlN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD Northbridge performance counters. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -3584,6 +3961,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hNorthbridgePerfCtlN(PVMCPU
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hNorthbridgePerfCtlN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD Northbridge performance counters. */
     return VINF_SUCCESS;
 }
@@ -3592,6 +3970,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hNorthbridgePerfCtlN(PVMCPU
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hNorthbridgePerfCtrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD Northbridge performance counters. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -3601,6 +3980,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hNorthbridgePerfCtrN(PVMCPU
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hNorthbridgePerfCtrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD Northbridge performance counters. */
     return VINF_SUCCESS;
 }
@@ -3609,6 +3989,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hNorthbridgePerfCtrN(PVMCPU
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7MicrocodeCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus. Need to be explored and verify K7 presence. */
     /** @todo Undocumented register only seen mentioned in fam15h erratum \#608. */
@@ -3620,6 +4001,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7MicrocodeCtl(PVMCPU pVCpu, uint
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7MicrocodeCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus.  Need to be explored and verify K7 presence.  */
     /** @todo Undocumented register only seen mentioned in fam15h erratum \#608. */
@@ -3630,6 +4012,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7MicrocodeCtl(PVMCPU pVCpu, uint
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7ClusterIdMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus. Need to be explored and verify K7 presence. */
     /** @todo Undocumented register only seen mentioned in fam16h BKDG r3.00 when
@@ -3642,6 +4025,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7ClusterIdMaybe(PVMCPU pVCpu, ui
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7ClusterIdMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus.  Need to be explored and verify K7 presence.  */
     /** @todo Undocumented register only seen mentioned in fam16h BKDG r3.00 when
@@ -3653,6 +4037,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7ClusterIdMaybe(PVMCPU pVCpu, ui
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8CpuIdCtlStd07hEbax(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     bool           fIgnored;
     PCPUMCPUIDLEAF pLeaf = cpumCpuIdGetLeafEx(pVCpu->CTX_SUFF(pVM), 0x00000007, 0, &fIgnored);
     if (pLeaf)
@@ -3666,6 +4051,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8CpuIdCtlStd07hEbax(PVMCPU pVCpu
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8CpuIdCtlStd07hEbax(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Changing CPUID leaf 7/0. */
     return VINF_SUCCESS;
 }
@@ -3674,6 +4060,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8CpuIdCtlStd07hEbax(PVMCPU pVCpu
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8CpuIdCtlStd06hEcx(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     PCPUMCPUIDLEAF pLeaf = cpumCpuIdGetLeaf(pVCpu->CTX_SUFF(pVM), 0x00000006);
     if (pLeaf)
         *puValue = pLeaf->uEcx;
@@ -3686,6 +4073,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8CpuIdCtlStd06hEcx(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8CpuIdCtlStd06hEcx(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Changing CPUID leaf 6. */
     return VINF_SUCCESS;
 }
@@ -3694,6 +4082,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8CpuIdCtlStd06hEcx(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8CpuIdCtlStd01hEdcx(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     PCPUMCPUIDLEAF pLeaf = cpumCpuIdGetLeaf(pVCpu->CTX_SUFF(pVM), 0x00000001);
     if (pLeaf)
         *puValue = RT_MAKE_U64(pLeaf->uEdx, pLeaf->uEcx);
@@ -3706,6 +4095,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8CpuIdCtlStd01hEdcx(PVMCPU pVCpu
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8CpuIdCtlStd01hEdcx(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Changing CPUID leaf 0x80000001. */
     return VINF_SUCCESS;
 }
@@ -3714,6 +4104,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8CpuIdCtlStd01hEdcx(PVMCPU pVCpu
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8CpuIdCtlExt01hEdcx(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     PCPUMCPUIDLEAF pLeaf = cpumCpuIdGetLeaf(pVCpu->CTX_SUFF(pVM), 0x80000001);
     if (pLeaf)
         *puValue = RT_MAKE_U64(pLeaf->uEdx, pLeaf->uEcx);
@@ -3726,6 +4117,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8CpuIdCtlExt01hEdcx(PVMCPU pVCpu
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8CpuIdCtlExt01hEdcx(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Changing CPUID leaf 0x80000001. */
     return VINF_SUCCESS;
 }
@@ -3734,6 +4126,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8CpuIdCtlExt01hEdcx(PVMCPU pVCpu
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8PatchLevel(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo Fake AMD microcode patching.  */
     *puValue = pRange->uValue;
     return VINF_SUCCESS;
@@ -3743,6 +4136,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8PatchLevel(PVMCPU pVCpu, uint32
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8PatchLoader(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Fake AMD microcode patching.  */
     return VINF_SUCCESS;
 }
@@ -3751,6 +4145,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8PatchLoader(PVMCPU pVCpu, uint3
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7DebugStatusMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus.  Need to be explored and verify K7 presence.  */
     /** @todo undocumented */
@@ -3762,6 +4157,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7DebugStatusMaybe(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7DebugStatusMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus.  Need to be explored and verify K7 presence.  */
     /** @todo undocumented */
@@ -3772,6 +4168,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7DebugStatusMaybe(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7BHTraceBaseMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus.  Need to be explored and verify K7 presence.  */
     /** @todo undocumented */
@@ -3783,6 +4180,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7BHTraceBaseMaybe(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7BHTraceBaseMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus.  Need to be explored and verify K7 presence.  */
     /** @todo undocumented */
@@ -3793,6 +4191,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7BHTraceBaseMaybe(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7BHTracePtrMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus.  Need to be explored and verify K7 presence.  */
     /** @todo undocumented */
@@ -3804,6 +4203,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7BHTracePtrMaybe(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7BHTracePtrMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus.  Need to be explored and verify K7 presence.  */
     /** @todo undocumented */
@@ -3814,6 +4214,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7BHTracePtrMaybe(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7BHTraceLimitMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus.  Need to be explored and verify K7 presence.  */
     /** @todo undocumented */
@@ -3825,6 +4226,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7BHTraceLimitMaybe(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7BHTraceLimitMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus.  Need to be explored and verify K7 presence.  */
     /** @todo undocumented */
@@ -3835,6 +4237,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7BHTraceLimitMaybe(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7HardwareDebugToolCfgMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus.  Need to be explored and verify K7 presence.  */
     /** @todo undocumented */
@@ -3846,6 +4249,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7HardwareDebugToolCfgMaybe(PVMCP
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7HardwareDebugToolCfgMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus.  Need to be explored and verify K7 presence.  */
     /** @todo undocumented */
@@ -3856,6 +4260,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7HardwareDebugToolCfgMaybe(PVMCP
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7FastFlushCountMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus.  Need to be explored and verify K7 presence.  */
     /** @todo undocumented */
@@ -3867,6 +4272,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7FastFlushCountMaybe(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7FastFlushCountMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus.  Need to be explored and verify K7 presence.  */
     /** @todo undocumented */
@@ -3877,6 +4283,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7FastFlushCountMaybe(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7NodeId(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus.  Need to be explored and verify K7 presence.  */
     /** @todo AMD node ID and bios scratch. */
@@ -3888,6 +4295,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7NodeId(PVMCPU pVCpu, uint32_t i
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7NodeId(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus.  Need to be explored and verify K7 presence.  */
     /** @todo AMD node ID and bios scratch. */
@@ -3898,6 +4306,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7NodeId(PVMCPU pVCpu, uint32_t i
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7DrXAddrMaskN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus.  Need to be explored and verify K7 presence.  */
     /** @todo AMD DRx address masking (range breakpoints). */
@@ -3909,6 +4318,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7DrXAddrMaskN(PVMCPU pVCpu, uint
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7DrXAddrMaskN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus.  Need to be explored and verify K7 presence.  */
     /** @todo AMD DRx address masking (range breakpoints). */
@@ -3919,6 +4329,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7DrXAddrMaskN(PVMCPU pVCpu, uint
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7Dr0DataMatchMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus.  Need to be explored and verify K7 presence.  */
     /** @todo AMD undocument debugging features. */
@@ -3930,6 +4341,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7Dr0DataMatchMaybe(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7Dr0DataMatchMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus.  Need to be explored and verify K7 presence.  */
     /** @todo AMD undocument debugging features. */
@@ -3940,6 +4352,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7Dr0DataMatchMaybe(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7Dr0DataMaskMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus.  Need to be explored and verify K7 presence.  */
     /** @todo AMD undocument debugging features. */
@@ -3951,6 +4364,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7Dr0DataMaskMaybe(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7Dr0DataMaskMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus.  Need to be explored and verify K7 presence.  */
     /** @todo AMD undocument debugging features. */
@@ -3961,6 +4375,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7Dr0DataMaskMaybe(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7LoadStoreCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus.  Need to be explored and verify K7 presence.  */
     /** @todo AMD load-store config. */
@@ -3972,6 +4387,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7LoadStoreCfg(PVMCPU pVCpu, uint
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7LoadStoreCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus.  Need to be explored and verify K7 presence.  */
     /** @todo AMD load-store config. */
@@ -3982,6 +4398,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7LoadStoreCfg(PVMCPU pVCpu, uint
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7InstrCacheCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus.  Need to be explored and verify K7 presence.  */
     /** @todo AMD instruction cache config. */
@@ -3993,6 +4410,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7InstrCacheCfg(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7InstrCacheCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus.  Need to be explored and verify K7 presence.  */
     /** @todo AMD instruction cache config. */
@@ -4003,6 +4421,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7InstrCacheCfg(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7DataCacheCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus.  Need to be explored and verify K7 presence.  */
     /** @todo AMD data cache config. */
@@ -4014,6 +4433,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7DataCacheCfg(PVMCPU pVCpu, uint
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7DataCacheCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus.  Need to be explored and verify K7 presence.  */
     /** @todo AMD data cache config. */
@@ -4024,6 +4444,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7DataCacheCfg(PVMCPU pVCpu, uint
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7BusUnitCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus.  Need to be explored and verify K7 presence.  */
     /** @todo AMD bus unit config. */
@@ -4035,6 +4456,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7BusUnitCfg(PVMCPU pVCpu, uint32
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7BusUnitCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus.  Need to be explored and verify K7 presence.  */
     /** @todo AMD bus unit config. */
@@ -4045,6 +4467,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7BusUnitCfg(PVMCPU pVCpu, uint32
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7DebugCtl2Maybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus.  Need to be explored and verify K7 presence.  */
     /** @todo Undocument AMD debug control register \#2. */
@@ -4056,6 +4479,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7DebugCtl2Maybe(PVMCPU pVCpu, ui
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7DebugCtl2Maybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
      *  cpus.  Need to be explored and verify K7 presence.  */
     /** @todo Undocument AMD debug control register \#2. */
@@ -4066,6 +4490,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7DebugCtl2Maybe(PVMCPU pVCpu, ui
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hFpuCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD FPU config. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -4075,6 +4500,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hFpuCfg(PVMCPU pVCpu, uint32
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hFpuCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD FPU config. */
     return VINF_SUCCESS;
 }
@@ -4083,6 +4509,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hFpuCfg(PVMCPU pVCpu, uint32
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hDecoderCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD decoder config. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -4092,6 +4519,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hDecoderCfg(PVMCPU pVCpu, ui
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hDecoderCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD decoder config. */
     return VINF_SUCCESS;
 }
@@ -4100,6 +4528,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hDecoderCfg(PVMCPU pVCpu, ui
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hBusUnitCfg2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /* Note! 10h and 16h */
     /** @todo AMD bus unit  config. */
     *puValue = 0;
@@ -4110,6 +4539,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hBusUnitCfg2(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hBusUnitCfg2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /* Note! 10h and 16h */
     /** @todo AMD bus unit config. */
     return VINF_SUCCESS;
@@ -4119,6 +4549,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hBusUnitCfg2(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hCombUnitCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD unit config. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -4128,6 +4559,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hCombUnitCfg(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hCombUnitCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD unit config. */
     return VINF_SUCCESS;
 }
@@ -4136,6 +4568,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hCombUnitCfg(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hCombUnitCfg2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD unit config 2. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -4145,6 +4578,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hCombUnitCfg2(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hCombUnitCfg2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD unit config 2. */
     return VINF_SUCCESS;
 }
@@ -4153,6 +4587,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hCombUnitCfg2(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hCombUnitCfg3(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD combined unit config 3. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -4162,6 +4597,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hCombUnitCfg3(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hCombUnitCfg3(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD combined unit config 3. */
     return VINF_SUCCESS;
 }
@@ -4170,6 +4606,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hCombUnitCfg3(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hExecUnitCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD execution unit config. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -4179,6 +4616,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hExecUnitCfg(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hExecUnitCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD execution unit config. */
     return VINF_SUCCESS;
 }
@@ -4187,6 +4625,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hExecUnitCfg(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hLoadStoreCfg2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD load-store config 2. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -4196,6 +4635,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hLoadStoreCfg2(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hLoadStoreCfg2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD load-store config 2. */
     return VINF_SUCCESS;
 }
@@ -4204,6 +4644,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hLoadStoreCfg2(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsFetchCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD IBS. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -4213,6 +4654,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsFetchCtl(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsFetchCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD IBS. */
     return VINF_SUCCESS;
 }
@@ -4221,6 +4663,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsFetchCtl(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsFetchLinAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD IBS. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -4230,6 +4673,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsFetchLinAddr(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsFetchLinAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD IBS. */
     return VINF_SUCCESS;
 }
@@ -4238,6 +4682,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsFetchLinAddr(PVMCPU pVCp
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsFetchPhysAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD IBS. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -4247,6 +4692,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsFetchPhysAddr(PVMCPU pVC
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsFetchPhysAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD IBS. */
     return VINF_SUCCESS;
 }
@@ -4255,6 +4701,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsFetchPhysAddr(PVMCPU pVC
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsOpExecCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD IBS. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -4264,6 +4711,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsOpExecCtl(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsOpExecCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD IBS. */
     return VINF_SUCCESS;
 }
@@ -4272,6 +4720,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsOpExecCtl(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsOpRip(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD IBS. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -4281,6 +4730,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsOpRip(PVMCPU pVCpu, uint
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsOpRip(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD IBS. */
     if (!X86_IS_CANONICAL(uValue))
     {
@@ -4294,6 +4744,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsOpRip(PVMCPU pVCpu, uint
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsOpData(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD IBS. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -4303,6 +4754,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsOpData(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsOpData(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD IBS. */
     return VINF_SUCCESS;
 }
@@ -4311,6 +4763,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsOpData(PVMCPU pVCpu, uin
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsOpData2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD IBS. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -4320,6 +4773,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsOpData2(PVMCPU pVCpu, ui
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsOpData2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD IBS. */
     return VINF_SUCCESS;
 }
@@ -4328,6 +4782,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsOpData2(PVMCPU pVCpu, ui
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsOpData3(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD IBS. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -4337,6 +4792,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsOpData3(PVMCPU pVCpu, ui
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsOpData3(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD IBS. */
     return VINF_SUCCESS;
 }
@@ -4345,6 +4801,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsOpData3(PVMCPU pVCpu, ui
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsDcLinAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD IBS. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -4354,6 +4811,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsDcLinAddr(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsDcLinAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD IBS. */
     if (!X86_IS_CANONICAL(uValue))
     {
@@ -4367,6 +4825,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsDcLinAddr(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsDcPhysAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD IBS. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -4376,6 +4835,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsDcPhysAddr(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsDcPhysAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD IBS. */
     return VINF_SUCCESS;
 }
@@ -4384,6 +4844,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsDcPhysAddr(PVMCPU pVCpu,
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD IBS. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -4393,6 +4854,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsCtl(PVMCPU pVCpu, uint32
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD IBS. */
     return VINF_SUCCESS;
 }
@@ -4401,6 +4863,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsCtl(PVMCPU pVCpu, uint32
 /** @callback_method_impl{FNCPUMRDMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam14hIbsBrTarget(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     /** @todo AMD IBS. */
     *puValue = 0;
     return VINF_SUCCESS;
@@ -4410,6 +4873,7 @@ static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam14hIbsBrTarget(PVMCPU pVCpu, u
 /** @callback_method_impl{FNCPUMWRMSR} */
 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam14hIbsBrTarget(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
 {
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue);
     /** @todo AMD IBS. */
     if (!X86_IS_CANONICAL(uValue))
     {
diff --git a/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp b/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
index 7297587..98c334f 100644
--- a/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
+++ b/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -45,7 +45,7 @@
 #endif
 
 /** Disable stack frame pointer generation here. */
-#if defined(_MSC_VER) && !defined(DEBUG)
+#if defined(_MSC_VER) && !defined(DEBUG) && defined(RT_ARCH_X86)
 # pragma optimize("y", off)
 #endif
 
@@ -1521,6 +1521,9 @@ VMMDECL(int) CPUMSetGuestDRx(PVMCPU pVCpu, uint32_t iReg, uint64_t Value)
 VMMDECL(int) CPUMRecalcHyperDRx(PVMCPU pVCpu, uint8_t iGstReg, bool fForceHyper)
 {
     PVM pVM = pVCpu->CTX_SUFF(pVM);
+#ifndef IN_RING0
+    RT_NOREF_PV(iGstReg);
+#endif
 
     /*
      * Compare the DR7s first.
diff --git a/src/VBox/VMM/VMMAll/CPUMStack.cpp b/src/VBox/VMM/VMMAll/CPUMStack.cpp
index c65a557..377d6b8 100644
--- a/src/VBox/VMM/VMMAll/CPUMStack.cpp
+++ b/src/VBox/VMM/VMMAll/CPUMStack.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -24,11 +24,6 @@
 #include <VBox/vmm/vm.h>
 #include <VBox/vmm/mm.h>
 
-/** Disable stack frame pointer generation here. */
-#if defined(_MSC_VER) && !defined(DEBUG)
-# pragma optimize("y", off)
-#endif
-
 
 VMMDECL(void) CPUMPushHyper(PVMCPU pVCpu, uint32_t u32)
 {
diff --git a/src/VBox/VMM/VMMAll/CSAMAll.cpp b/src/VBox/VMM/VMMAll/CSAMAll.cpp
index 6b09c14..b8bb69e 100644
--- a/src/VBox/VMM/VMMAll/CSAMAll.cpp
+++ b/src/VBox/VMM/VMMAll/CSAMAll.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -63,6 +63,8 @@ csamCodePageWriteHandler(PVM pVM, PVMCPU pVCpu, RTGCPTR GCPtr, void *pvPtr, void
     Log(("csamCodePageWriteHandler: write to %RGv LB %zu\n", GCPtr, cbBuf));
     Assert(enmAccessType == PGMACCESSTYPE_WRITE); NOREF(enmAccessType);
     Assert(VMCPU_IS_EMT(pVCpu));
+    RT_NOREF_PV(pvUser);
+    RT_NOREF_PV(enmOrigin);
 
     /*
      * Check if it's a dummy write that doesn't change anything.
@@ -80,6 +82,7 @@ csamCodePageWriteHandler(PVM pVM, PVMCPU pVCpu, RTGCPTR GCPtr, void *pvPtr, void
      */
     int rc = PATMR3PatchWrite(pVM, GCPtr, (uint32_t)cbBuf);
     AssertRC(rc);
+    RT_NOREF_PV(pVCpu);
     return VINF_PGM_HANDLER_DO_DEFAULT;
 
 #else
diff --git a/src/VBox/VMM/VMMAll/DBGFAll.cpp b/src/VBox/VMM/VMMAll/DBGFAll.cpp
index 5342632..344539a 100644
--- a/src/VBox/VMM/VMMAll/DBGFAll.cpp
+++ b/src/VBox/VMM/VMMAll/DBGFAll.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMAll/EMAll.cpp b/src/VBox/VMM/VMMAll/EMAll.cpp
index 4a0681e..1ec7196 100644
--- a/src/VBox/VMM/VMMAll/EMAll.cpp
+++ b/src/VBox/VMM/VMMAll/EMAll.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -276,6 +276,8 @@ VMMDECL(void) EMRemLock(PVM pVM)
     Assert(!IOMIsLockWriteOwner(pVM));
     int rc = PDMCritSectEnter(&pVM->em.s.CritSectREM, VERR_SEM_BUSY);
     AssertRCSuccess(rc);
+#else
+    RT_NOREF(pVM);
 #endif
 }
 
@@ -292,6 +294,8 @@ VMMDECL(void) EMRemUnlock(PVM pVM)
         return;     /* early init */
 
     PDMCritSectLeave(&pVM->em.s.CritSectREM);
+#else
+    RT_NOREF(pVM);
 #endif
 }
 
@@ -310,6 +314,7 @@ VMMDECL(bool) EMRemIsLockOwner(PVM pVM)
 
     return PDMCritSectIsOwner(&pVM->em.s.CritSectREM);
 #else
+    RT_NOREF(pVM);
     return true;
 #endif
 }
@@ -329,6 +334,7 @@ VMM_INT_DECL(int) EMRemTryLock(PVM pVM)
 
     return PDMCritSectTryEnter(&pVM->em.s.CritSectREM);
 #else
+    RT_NOREF(pVM);
     return VINF_SUCCESS;
 #endif
 }
@@ -340,7 +346,7 @@ VMM_INT_DECL(int) EMRemTryLock(PVM pVM)
 static DECLCALLBACK(int) emReadBytes(PDISCPUSTATE pDis, uint8_t offInstr, uint8_t cbMinRead, uint8_t cbMaxRead)
 {
     PVMCPU      pVCpu    = (PVMCPU)pDis->pvUser;
-#if defined(IN_RC) || defined(IN_RING3)
+#if defined(VBOX_WITH_RAW_MODE) && (defined(IN_RC) || defined(IN_RING3))
     PVM         pVM      = pVCpu->CTX_SUFF(pVM);
 #endif
     RTUINTPTR   uSrcAddr = pDis->uInstrAddr + offInstr;
@@ -359,12 +365,12 @@ static DECLCALLBACK(int) emReadBytes(PDISCPUSTATE pDis, uint8_t offInstr, uint8_
     /*
      * We might be called upon to interpret an instruction in a patch.
      */
-    if (PATMIsPatchGCAddr(pVCpu->CTX_SUFF(pVM), uSrcAddr))
+    if (PATMIsPatchGCAddr(pVM, uSrcAddr))
     {
 # ifdef IN_RC
         memcpy(&pDis->abInstr[offInstr], (void *)(uintptr_t)uSrcAddr, cbToRead);
 # else
-        memcpy(&pDis->abInstr[offInstr], PATMR3GCPtrToHCPtr(pVCpu->CTX_SUFF(pVM), uSrcAddr), cbToRead);
+        memcpy(&pDis->abInstr[offInstr], PATMR3GCPtrToHCPtr(pVM, uSrcAddr), cbToRead);
 # endif
         rc = VINF_SUCCESS;
     }
@@ -419,11 +425,13 @@ static DECLCALLBACK(int) emReadBytes(PDISCPUSTATE pDis, uint8_t offInstr, uint8_
 }
 
 
+#if !defined(VBOX_WITH_IEM) || defined(VBOX_COMPARE_IEM_AND_EM)
 DECLINLINE(int) emDisCoreOne(PVM pVM, PVMCPU pVCpu, PDISCPUSTATE pDis, RTGCUINTPTR InstrGC, uint32_t *pOpsize)
 {
     NOREF(pVM);
     return DISInstrWithReader(InstrGC, (DISCPUMODE)pDis->uCpuMode, emReadBytes, pVCpu, pDis, pOpsize);
 }
+#endif
 
 
 /**
@@ -1117,13 +1125,14 @@ VMM_INT_DECL(int) EMInterpretIretV86ForPatm(PVM pVM, PVMCPU pVCpu, PCPUMCTXCORE
     return VINF_SUCCESS;
 }
 
+# ifndef VBOX_WITH_IEM
 /**
  * IRET Emulation.
  */
 static int emInterpretIret(PVM pVM, PVMCPU pVCpu, PDISCPUSTATE pDis, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, uint32_t *pcbSize)
 {
 #ifdef VBOX_WITH_RAW_RING1
-    NOREF(pvFault); NOREF(pcbSize);
+    NOREF(pvFault); NOREF(pcbSize); NOREF(pDis);
     if (EMIsRawRing1Enabled(pVM))
     {
         RTGCUINTPTR pIretStack = (RTGCUINTPTR)pRegFrame->esp;
@@ -1132,7 +1141,7 @@ static int emInterpretIret(PVM pVM, PVMCPU pVCpu, PDISCPUSTATE pDis, PCPUMCTXCOR
         uint32_t    cpl, rpl;
 
         /* We only execute 32-bits protected mode code in raw mode, so no need to bother to check for 16-bits code here. */
-        /* @todo: we don't verify all the edge cases that generate #GP faults */
+        /** @todo we don't verify all the edge cases that generate #GP faults */
 
         Assert(pRegFrame == CPUMGetGuestCtxCore(pVCpu));
         Assert(!CPUMIsGuestIn64BitCode(pVCpu));
@@ -1183,6 +1192,7 @@ static int emInterpretIret(PVM pVM, PVMCPU pVCpu, PDISCPUSTATE pDis, PCPUMCTXCOR
 #endif
     return VERR_EM_INTERPRETER;
 }
+# endif /* !VBOX_WITH_IEM */
 
 #endif /* IN_RC */
 
diff --git a/src/VBox/VMM/VMMAll/EMAllA.asm b/src/VBox/VMM/VMMAll/EMAllA.asm
index 73fc7d8..90d3817 100644
--- a/src/VBox/VMM/VMMAll/EMAllA.asm
+++ b/src/VBox/VMM/VMMAll/EMAllA.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMAll/FTMAll.cpp b/src/VBox/VMM/VMMAll/FTMAll.cpp
index ef0f768..6e6038c 100644
--- a/src/VBox/VMM/VMMAll/FTMAll.cpp
+++ b/src/VBox/VMM/VMMAll/FTMAll.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMAll/GIMAll.cpp b/src/VBox/VMM/VMMAll/GIMAll.cpp
index c4a1c48..ab1ec8d 100644
--- a/src/VBox/VMM/VMMAll/GIMAll.cpp
+++ b/src/VBox/VMM/VMMAll/GIMAll.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMAll/GIMAllHv.cpp b/src/VBox/VMM/VMMAll/GIMAllHv.cpp
index 73a7f8b..4da45b9 100644
--- a/src/VBox/VMM/VMMAll/GIMAllHv.cpp
+++ b/src/VBox/VMM/VMMAll/GIMAllHv.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -149,6 +149,8 @@ VMM_INT_DECL(VBOXSTRICTRC) gimHvHypercall(PVMCPU pVCpu, PCPUMCTX pCtx)
     VMCPU_ASSERT_EMT(pVCpu);
 
 #ifndef IN_RING3
+    RT_NOREF_PV(pVCpu);
+    RT_NOREF_PV(pCtx);
     return VINF_GIM_R3_HYPERCALL;
 #else
     PVM pVM = pVCpu->CTX_SUFF(pVM);
@@ -177,8 +179,8 @@ VMM_INT_DECL(VBOXSTRICTRC) gimHvHypercall(PVMCPU pVCpu, PCPUMCTX pCtx)
     const uint64_t   uHyperIn         = fIs64BitMode ? pCtx->rcx : (pCtx->rdx << 32) | pCtx->eax;
     const uint16_t   uHyperOp         = GIM_HV_HYPERCALL_IN_CALL_CODE(uHyperIn);
     const bool       fHyperFast       = GIM_HV_HYPERCALL_IN_IS_FAST(uHyperIn);
-    const uint16_t   cHyperReps       = GIM_HV_HYPERCALL_IN_REP_COUNT(uHyperIn);
-    const uint16_t   idxHyperRepStart = GIM_HV_HYPERCALL_IN_REP_START_IDX(uHyperIn);
+    /*const uint16_t   cHyperReps       = GIM_HV_HYPERCALL_IN_REP_COUNT(uHyperIn); - unused */
+    /*const uint16_t   idxHyperRepStart = GIM_HV_HYPERCALL_IN_REP_START_IDX(uHyperIn); - unused */
     uint64_t         cHyperRepsDone   = 0;
 
     int rc     = VINF_SUCCESS;
@@ -285,7 +287,7 @@ VMM_INT_DECL(VBOXSTRICTRC) gimHvHypercall(PVMCPU pVCpu, PCPUMCTX pCtx)
                         PGIMHVCPU pHvCpu = &pVCpu->gim.s.u.HvCpu;
                         if (    pMsgIn->uConnectionId  == GIM_HV_VMBUS_MSG_CONNECTION_ID
                             &&  pMsgIn->enmMessageType == GIMHVMSGTYPE_VMBUS
-                            && !MSR_GIM_HV_SINT_IS_MASKED(pHvCpu->uSint2Msr)
+                            && !MSR_GIM_HV_SINT_IS_MASKED(pHvCpu->auSintXMsr[GIM_HV_VMBUS_MSG_SINT])
                             &&  MSR_GIM_HV_SIMP_IS_ENABLED(pHvCpu->uSimpMsr))
                         {
                             RTGCPHYS GCPhysSimp = MSR_GIM_HV_SIMP_GPA(pHvCpu->uSimpMsr);
@@ -482,10 +484,13 @@ VMM_INT_DECL(VBOXSTRICTRC) gimHvReadMsr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRR
             *puValue = pHv->uDbgStatusMsr;
             return VINF_SUCCESS;
 
-        case MSR_GIM_HV_SINT2:
+        case MSR_GIM_HV_SINT0:   case MSR_GIM_HV_SINT1:   case MSR_GIM_HV_SINT2:   case MSR_GIM_HV_SINT3:
+        case MSR_GIM_HV_SINT4:   case MSR_GIM_HV_SINT5:   case MSR_GIM_HV_SINT6:   case MSR_GIM_HV_SINT7:
+        case MSR_GIM_HV_SINT8:   case MSR_GIM_HV_SINT9:   case MSR_GIM_HV_SINT10:  case MSR_GIM_HV_SINT11:
+        case MSR_GIM_HV_SINT12:  case MSR_GIM_HV_SINT13:  case MSR_GIM_HV_SINT14:  case MSR_GIM_HV_SINT15:
         {
             PGIMHVCPU pHvCpu = &pVCpu->gim.s.u.HvCpu;
-            *puValue = pHvCpu->uSint2Msr;
+            *puValue = pHvCpu->auSintXMsr[idMsr - MSR_GIM_HV_SINT0];
             return VINF_SUCCESS;
         }
 
@@ -496,6 +501,10 @@ VMM_INT_DECL(VBOXSTRICTRC) gimHvReadMsr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRR
             return VINF_SUCCESS;
         }
 
+        case MSR_GIM_HV_SVERSION:
+            *puValue = GIM_HV_SVERSION;
+            return VINF_SUCCESS;
+
         case MSR_GIM_HV_RESET:
             *puValue = 0;
             return VINF_SUCCESS;
@@ -523,7 +532,7 @@ VMM_INT_DECL(VBOXSTRICTRC) gimHvReadMsr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRR
                 return VINF_SUCCESS;
 #endif
             }
-            return VERR_CPUM_RAISE_GP_0;
+            break;
         }
 
         /* Write-only MSRs: */
@@ -535,11 +544,11 @@ VMM_INT_DECL(VBOXSTRICTRC) gimHvReadMsr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRR
             static uint32_t s_cTimes = 0;
             if (s_cTimes++ < 20)
                 LogRel(("GIM: HyperV: Unknown/invalid RdMsr (%#x) -> #GP(0)\n", idMsr));
+            LogFunc(("Unknown/invalid RdMsr (%#RX32) -> #GP(0)\n", idMsr));
+            break;
 #else
             return VINF_CPUM_R3_MSR_READ;
 #endif
-            LogFunc(("Unknown/invalid RdMsr (%#RX32) -> #GP(0)\n", idMsr));
-            break;
         }
     }
 
@@ -589,7 +598,7 @@ VMM_INT_DECL(VBOXSTRICTRC) gimHvWriteMsr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSR
                 if (MSR_GIM_HV_HYPERCALL_PAGE_IS_ENABLED(pHv->u64HypercallMsr))
                 {
                     gimR3HvDisableHypercallPage(pVM);
-                    pHv->u64HypercallMsr &= ~MSR_GIM_HV_HYPERCALL_PAGE_ENABLE_BIT;
+                    pHv->u64HypercallMsr &= ~MSR_GIM_HV_HYPERCALL_PAGE_ENABLE;
                     LogRel(("GIM: HyperV: Hypercall page disabled via Guest OS ID MSR\n"));
                 }
             }
@@ -641,10 +650,10 @@ VMM_INT_DECL(VBOXSTRICTRC) gimHvWriteMsr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSR
             /** @todo There is/was a problem with hypercalls for FreeBSD 10.1 guests,
              *  see @bugref{7270#c116}. */
             /* First, update all but the hypercall page enable bit. */
-            pHv->u64HypercallMsr = (uRawValue & ~MSR_GIM_HV_HYPERCALL_PAGE_ENABLE_BIT);
+            pHv->u64HypercallMsr = (uRawValue & ~MSR_GIM_HV_HYPERCALL_PAGE_ENABLE);
 
             /* Hypercall page can only be enabled when the guest has enabled hypercalls. */
-            bool fEnable = RT_BOOL(uRawValue & MSR_GIM_HV_HYPERCALL_PAGE_ENABLE_BIT);
+            bool fEnable = MSR_GIM_HV_HYPERCALL_PAGE_IS_ENABLED(uRawValue);
             if (   fEnable
                 && !gimHvAreHypercallsEnabled(pVCpu))
             {
@@ -678,10 +687,10 @@ VMM_INT_DECL(VBOXSTRICTRC) gimHvWriteMsr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSR
             return VINF_CPUM_R3_MSR_WRITE;
 #else  /* IN_RING3 */
             /* First, update all but the TSC page enable bit. */
-            pHv->u64TscPageMsr = (uRawValue & ~MSR_GIM_HV_REF_TSC_ENABLE_BIT);
+            pHv->u64TscPageMsr = (uRawValue & ~MSR_GIM_HV_REF_TSC_ENABLE);
 
             /* Is the guest disabling the TSC page? */
-            bool fEnable = RT_BOOL(uRawValue & MSR_GIM_HV_REF_TSC_ENABLE_BIT);
+            bool fEnable = MSR_GIM_HV_REF_TSC_IS_ENABLED(uRawValue);
             if (!fEnable)
             {
                 gimR3HvDisableTscPage(pVM);
@@ -708,26 +717,28 @@ VMM_INT_DECL(VBOXSTRICTRC) gimHvWriteMsr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSR
             return VINF_CPUM_R3_MSR_WRITE;
 #else  /* IN_RING3 */
             PGIMHVCPU pHvCpu = &pVCpu->gim.s.u.HvCpu;
-            /* First, update all but the APIC-assist page enable bit. */
-            pHvCpu->uApicAssistPageMsr = (uRawValue & ~MSR_GIM_HV_APICASSIST_PAGE_ENABLE_BIT);
+            pHvCpu->uApicAssistPageMsr = uRawValue;
 
-            /* Is the guest disabling the APIC-assist page? */
-            bool fEnable = RT_BOOL(uRawValue & MSR_GIM_HV_APICASSIST_PAGE_ENABLE_BIT);
-            if (!fEnable)
-            {
-                gimR3HvDisableApicAssistPage(pVM);
-                pHvCpu->uApicAssistPageMsr = uRawValue;
-                return VINF_SUCCESS;
-            }
-
-            /* Enable the APIC-assist page. */
-            RTGCPHYS GCPhysApicAssist = MSR_GIM_HV_APICASSIST_GUEST_PFN(uRawValue) << PAGE_SHIFT;
-            int rc = gimR3HvEnableApicAssistPage(pVM, GCPhysApicAssist);
-            if (RT_SUCCESS(rc))
+            if (MSR_GIM_HV_APICASSIST_PAGE_IS_ENABLED(uRawValue))
             {
-                pHvCpu->uApicAssistPageMsr = uRawValue;
-                return VINF_SUCCESS;
+                RTGCPHYS GCPhysApicAssistPage = MSR_GIM_HV_APICASSIST_GUEST_PFN(uRawValue) << PAGE_SHIFT;
+                if (PGMPhysIsGCPhysNormal(pVM, GCPhysApicAssistPage))
+                {
+                    int rc = gimR3HvEnableApicAssistPage(pVCpu, GCPhysApicAssistPage);
+                    if (RT_SUCCESS(rc))
+                    {
+                        pHvCpu->uApicAssistPageMsr = uRawValue;
+                        return VINF_SUCCESS;
+                    }
+                }
+                else
+                {
+                    LogRelMax(5, ("GIM: HyperV%u: APIC-assist page address %#RGp invalid!\n", pVCpu->idCpu,
+                                  GCPhysApicAssistPage));
+                }
             }
+            else
+                gimR3HvDisableApicAssistPage(pVCpu);
 
             return VERR_CPUM_RAISE_GP_0;
 #endif /* IN_RING3 */
@@ -738,7 +749,7 @@ VMM_INT_DECL(VBOXSTRICTRC) gimHvWriteMsr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSR
 #ifndef IN_RING3
             return VINF_CPUM_R3_MSR_WRITE;
 #else
-            if (MSR_GIM_HV_RESET_IS_SET(uRawValue))
+            if (MSR_GIM_HV_RESET_IS_ENABLED(uRawValue))
             {
                 LogRel(("GIM: HyperV: Reset initiated through MSR\n"));
                 int rc = PDMDevHlpVMReset(pVM->gim.s.pDevInsR3, PDMVMRESET_F_GIM);
@@ -754,7 +765,7 @@ VMM_INT_DECL(VBOXSTRICTRC) gimHvWriteMsr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSR
 #ifndef IN_RING3
             return VINF_CPUM_R3_MSR_WRITE;
 #else
-            if (uRawValue & MSR_GIM_HV_CRASH_CTL_NOTIFY_BIT)
+            if (uRawValue & MSR_GIM_HV_CRASH_CTL_NOTIFY)
             {
                 LogRel(("GIM: HyperV: Guest indicates a fatal condition! P0=%#RX64 P1=%#RX64 P2=%#RX64 P3=%#RX64 P4=%#RX64\n",
                         pHv->uCrashP0Msr, pHv->uCrashP1Msr, pHv->uCrashP2Msr, pHv->uCrashP3Msr, pHv->uCrashP4Msr));
@@ -850,7 +861,7 @@ VMM_INT_DECL(VBOXSTRICTRC) gimHvWriteMsr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSR
                             rc = gimR3HvDebugWrite(pVM, pHv->pvDbgBuffer, cbWrite, &cbWritten, false /*fUdpPkt*/);
                             if (   RT_SUCCESS(rc)
                                 && cbWrite == cbWritten)
-                                pHv->uDbgStatusMsr = MSR_GIM_HV_SYNTH_DEBUG_STATUS_W_SUCCESS_BIT;
+                                pHv->uDbgStatusMsr = MSR_GIM_HV_SYNTH_DEBUG_STATUS_W_SUCCESS;
                             else
                                 pHv->uDbgStatusMsr = 0;
                         }
@@ -881,7 +892,7 @@ VMM_INT_DECL(VBOXSTRICTRC) gimHvWriteMsr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSR
                         if (RT_SUCCESS(rc))
                         {
                             pHv->uDbgStatusMsr  = ((uint16_t)cbReallyRead) << 16;
-                            pHv->uDbgStatusMsr |= MSR_GIM_HV_SYNTH_DEBUG_STATUS_R_SUCCESS_BIT;
+                            pHv->uDbgStatusMsr |= MSR_GIM_HV_SYNTH_DEBUG_STATUS_R_SUCCESS;
                         }
                         else
                         {
@@ -899,31 +910,69 @@ VMM_INT_DECL(VBOXSTRICTRC) gimHvWriteMsr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSR
 #endif
         }
 
-        case MSR_GIM_HV_SINT2:
+        case MSR_GIM_HV_SINT0:    case MSR_GIM_HV_SINT1:    case MSR_GIM_HV_SINT2:    case MSR_GIM_HV_SINT3:
+        case MSR_GIM_HV_SINT4:    case MSR_GIM_HV_SINT5:    case MSR_GIM_HV_SINT6:    case MSR_GIM_HV_SINT7:
+        case MSR_GIM_HV_SINT8:    case MSR_GIM_HV_SINT9:    case MSR_GIM_HV_SINT10:   case MSR_GIM_HV_SINT11:
+        case MSR_GIM_HV_SINT12:   case MSR_GIM_HV_SINT13:   case MSR_GIM_HV_SINT14:   case MSR_GIM_HV_SINT15:
         {
-            if (!pHv->fDbgEnabled)
-                return VERR_CPUM_RAISE_GP_0;
 #ifndef IN_RING3
+            /** @todo make this RZ later? */
             return VINF_CPUM_R3_MSR_WRITE;
 #else
-            PGIMHVCPU pHvCpu = &pVCpu->gim.s.u.HvCpu;
-            uint8_t uVector = MSR_GIM_HV_SINT_VECTOR(uRawValue);
-            if (  !MSR_GIM_HV_SINT_IS_MASKED(uRawValue)
-                && uVector < 16)
+            PGIMHVCPU    pHvCpu     = &pVCpu->gim.s.u.HvCpu;
+            uint8_t      uVector    = MSR_GIM_HV_SINT_VECTOR(uRawValue);
+            bool const   fVMBusMsg  = RT_BOOL(idMsr == GIM_HV_VMBUS_MSG_SINT);
+            size_t const idxSintMsr = idMsr - MSR_GIM_HV_SINT0;
+            const char  *pszDesc    = fVMBusMsg ? "VMBus Message" : "Generic";
+            if (uVector < GIM_HV_SINT_VECTOR_VALID_MIN)
             {
-                LogRel(("GIM: HyperV: Programmed an invalid vector in SINT2, uVector=%u -> #GP(0)\n", uVector));
+                LogRel(("GIM: HyperV%u: Programmed an invalid vector in SINT%u (%s), uVector=%u -> #GP(0)\n", pVCpu->idCpu,
+                        idxSintMsr, pszDesc, uVector));
                 return VERR_CPUM_RAISE_GP_0;
             }
 
-            pHvCpu->uSint2Msr = uRawValue;
-            if (MSR_GIM_HV_SINT_IS_MASKED(uRawValue))
-                LogRel(("GIM: HyperV: Masked SINT2\n"));
-            else
-                LogRel(("GIM: HyperV: Unmasked SINT2, uVector=%u\n", uVector));
+            pHvCpu->auSintXMsr[idxSintMsr] = uRawValue;
+            if (fVMBusMsg)
+            {
+                if (MSR_GIM_HV_SINT_IS_MASKED(uRawValue))
+                    LogRel(("GIM: HyperV%u: Masked SINT%u (%s)\n", pVCpu->idCpu, idxSintMsr, pszDesc));
+                else
+                    LogRel(("GIM: HyperV%u: Unmasked SINT%u (%s), uVector=%u\n", pVCpu->idCpu, idxSintMsr, pszDesc, uVector));
+            }
             return VINF_SUCCESS;
 #endif
         }
 
+        case MSR_GIM_HV_SIEFP:
+        {
+#ifndef IN_RING3
+            return VINF_CPUM_R3_MSR_WRITE;
+#else
+            PGIMHVCPU pHvCpu  = &pVCpu->gim.s.u.HvCpu;
+            pHvCpu->uSiefpMsr = uRawValue;
+            if (MSR_GIM_HV_SIEF_PAGE_IS_ENABLED(uRawValue))
+            {
+                RTGCPHYS GCPhysSiefPage = MSR_GIM_HV_SIEF_GUEST_PFN(uRawValue) << PAGE_SHIFT;
+                if (PGMPhysIsGCPhysNormal(pVM, GCPhysSiefPage))
+                {
+                    int rc = gimR3HvEnableSiefPage(pVCpu, GCPhysSiefPage);
+                    if (RT_SUCCESS(rc))
+                    {
+                        /** @todo SIEF setup. */
+                        return VINF_SUCCESS;
+                    }
+                }
+                else
+                    LogRelMax(5, ("GIM: HyperV%u: SIEF page address %#RGp invalid!\n", pVCpu->idCpu, GCPhysSiefPage));
+            }
+            else
+                gimR3HvDisableSiefPage(pVCpu);
+
+            return VERR_CPUM_RAISE_GP_0;
+#endif
+            break;
+        }
+
         case MSR_GIM_HV_SIMP:
         {
             if (!pHv->fDbgEnabled)
@@ -970,7 +1019,7 @@ VMM_INT_DECL(VBOXSTRICTRC) gimHvWriteMsr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSR
         case MSR_GIM_HV_TSC_FREQ:
         case MSR_GIM_HV_APIC_FREQ:
             LogFunc(("WrMsr on read-only MSR %#RX32 -> #GP(0)\n", idMsr));
-            return VERR_CPUM_RAISE_GP_0;
+            break;
 
         case MSR_GIM_HV_DEBUG_OPTIONS_MSR:
         {
@@ -993,11 +1042,11 @@ VMM_INT_DECL(VBOXSTRICTRC) gimHvWriteMsr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSR
             if (s_cTimes++ < 20)
                 LogRel(("GIM: HyperV: Unknown/invalid WrMsr (%#x,%#x`%08x) -> #GP(0)\n", idMsr,
                         uRawValue & UINT64_C(0xffffffff00000000), uRawValue & UINT64_C(0xffffffff)));
+            LogFunc(("Unknown/invalid WrMsr (%#RX32,%#RX64) -> #GP(0)\n", idMsr, uRawValue));
+            break;
 #else
             return VINF_CPUM_R3_MSR_WRITE;
 #endif
-            LogFunc(("Unknown/invalid WrMsr (%#RX32,%#RX64) -> #GP(0)\n", idMsr, uRawValue));
-            break;
         }
     }
 
diff --git a/src/VBox/VMM/VMMAll/GIMAllKvm.cpp b/src/VBox/VMM/VMMAll/GIMAllKvm.cpp
index 70a102c..5abe34e 100644
--- a/src/VBox/VMM/VMMAll/GIMAllKvm.cpp
+++ b/src/VBox/VMM/VMMAll/GIMAllKvm.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -274,7 +274,7 @@ VMM_INT_DECL(VBOXSTRICTRC) gimKvmWriteMsr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMS
             }
 
             /* Is the system-time struct. already enabled? If so, get flags that need preserving. */
-            uint8_t fFlags = 0;
+            /*uint8_t fFlags = 0; - unused */
             GIMKVMSYSTEMTIME SystemTime;
             RT_ZERO(SystemTime);
             if (   MSR_GIM_KVM_SYSTEM_TIME_IS_ENABLED(pKvmCpu->u64SystemTimeMsr)
diff --git a/src/VBox/VMM/VMMAll/HMAll.cpp b/src/VBox/VMM/VMMAll/HMAll.cpp
index f4cb2ab..2c92b2d 100644
--- a/src/VBox/VMM/VMMAll/HMAll.cpp
+++ b/src/VBox/VMM/VMMAll/HMAll.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMAll/IEMAll.cpp b/src/VBox/VMM/VMMAll/IEMAll.cpp
index a7f7def..c1615f9 100644
--- a/src/VBox/VMM/VMMAll/IEMAll.cpp
+++ b/src/VBox/VMM/VMMAll/IEMAll.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -82,6 +82,11 @@
 //#define IEM_LOG_MEMORY_WRITES
 #define IEM_IMPLEMENTS_TASKSWITCH
 
+/* Disabled warning C4505: 'iemRaisePageFaultJmp' : unreferenced local function has been removed */
+#ifdef _MSC_VER
+# pragma warning(disable:4505)
+#endif
+
 
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
@@ -229,6 +234,9 @@ typedef IEMSELDESC *PIEMSELDESC;
  * due to GCC lacking knowledge about the value range of a switch. */
 #define IEM_NOT_REACHED_DEFAULT_CASE_RET() default: AssertFailedReturn(VERR_IPE_NOT_REACHED_DEFAULT_CASE)
 
+/** Variant of IEM_NOT_REACHED_DEFAULT_CASE_RET that returns a custom value. */
+#define IEM_NOT_REACHED_DEFAULT_CASE_RET2(a_RetValue) default: AssertFailedReturn(a_RetValue)
+
 /**
  * Returns IEM_RETURN_ASPECT_NOT_IMPLEMENTED, and in debug builds logs the
  * occation.
@@ -860,7 +868,7 @@ DECLINLINE(void) iemInitExec(PVMCPU pVCpu, bool fBypassHandlers)
     pVCpu->iem.s.enmEffAddrMode     = (IEMMODE)0xc0fe;
     pVCpu->iem.s.enmDefOpSize       = (IEMMODE)0xc0fe;
     pVCpu->iem.s.enmEffOpSize       = (IEMMODE)0xc0fe;
-    pVCpu->iem.s.fPrefixes          = (IEMMODE)0xfeedbeef;
+    pVCpu->iem.s.fPrefixes          = 0xfeedbeef;
     pVCpu->iem.s.uRexReg            = 127;
     pVCpu->iem.s.uRexB              = 127;
     pVCpu->iem.s.uRexIndex          = 127;
@@ -1442,7 +1450,7 @@ VMM_INT_DECL(void) IEMTlbInvalidateAllPhysical(PVMCPU pVCpu)
  */
 VMM_INT_DECL(void) IEMTlbInvalidateAllPhysicalAllCpus(PVM pVM)
 {
-
+    RT_NOREF_PV(pVM);
 }
 
 #ifdef IEM_WITH_CODE_TLB
@@ -3406,11 +3414,10 @@ IEM_STATIC void iemHlpLoadNullDataSelectorOnV86Xcpt(PVMCPU pVCpu, PCPUMSELREG pS
 /**
  * Loads a segment selector during a task switch in V8086 mode.
  *
- * @param   pVCpu           The cross context virtual CPU structure of the calling thread.
  * @param   pSReg           Pointer to the segment register.
  * @param   uSel            The selector value to load.
  */
-IEM_STATIC void iemHlpLoadSelectorInV86Mode(PVMCPU pVCpu, PCPUMSELREG pSReg, uint16_t uSel)
+IEM_STATIC void iemHlpLoadSelectorInV86Mode(PCPUMSELREG pSReg, uint16_t uSel)
 {
     /* See Intel spec. 26.3.1.2 "Checks on Guest Segment Registers". */
     pSReg->Sel      = uSel;
@@ -4041,12 +4048,22 @@ iemTaskSwitch(PVMCPU          pVCpu,
     if (IEM_IS_V86_MODE(pVCpu))
     {
         pVCpu->iem.s.uCpl = 3;
-        iemHlpLoadSelectorInV86Mode(pVCpu, &pCtx->es, uNewES);
-        iemHlpLoadSelectorInV86Mode(pVCpu, &pCtx->cs, uNewCS);
-        iemHlpLoadSelectorInV86Mode(pVCpu, &pCtx->ss, uNewSS);
-        iemHlpLoadSelectorInV86Mode(pVCpu, &pCtx->ds, uNewDS);
-        iemHlpLoadSelectorInV86Mode(pVCpu, &pCtx->fs, uNewFS);
-        iemHlpLoadSelectorInV86Mode(pVCpu, &pCtx->gs, uNewGS);
+        iemHlpLoadSelectorInV86Mode(&pCtx->es, uNewES);
+        iemHlpLoadSelectorInV86Mode(&pCtx->cs, uNewCS);
+        iemHlpLoadSelectorInV86Mode(&pCtx->ss, uNewSS);
+        iemHlpLoadSelectorInV86Mode(&pCtx->ds, uNewDS);
+        iemHlpLoadSelectorInV86Mode(&pCtx->fs, uNewFS);
+        iemHlpLoadSelectorInV86Mode(&pCtx->gs, uNewGS);
+
+        /* quick fix: fake DescSS. */ /** @todo fix the code further down? */
+        DescSS.Legacy.u = 0;
+        DescSS.Legacy.Gen.u16LimitLow = (uint16_t)pCtx->ss.u32Limit;
+        DescSS.Legacy.Gen.u4LimitHigh = pCtx->ss.u32Limit >> 16;
+        DescSS.Legacy.Gen.u16BaseLow  = (uint16_t)pCtx->ss.u64Base;
+        DescSS.Legacy.Gen.u8BaseHigh1 = (uint8_t)(pCtx->ss.u64Base >> 16);
+        DescSS.Legacy.Gen.u8BaseHigh2 = (uint8_t)(pCtx->ss.u64Base >> 24);
+        DescSS.Legacy.Gen.u4Type      = X86_SEL_TYPE_RW_ACC;
+        DescSS.Legacy.Gen.u2Dpl       = 3;
     }
     else
     {
@@ -4245,18 +4262,18 @@ iemTaskSwitch(PVMCPU          pVCpu,
                 || pCtx->esp < cbStackFrame)
             {
                 /** @todo Intel says \#SS(EXT) for INT/XCPT, I couldn't figure out AMD yet. */
-                Log(("iemTaskSwitch: SS=%#x ESP=%#x cbStackFrame=%#x is out of bounds -> #SS\n", pCtx->ss.Sel, pCtx->esp,
-                     cbStackFrame));
+                Log(("iemTaskSwitch: SS=%#x ESP=%#x cbStackFrame=%#x is out of bounds -> #SS\n",
+                     pCtx->ss.Sel, pCtx->esp, cbStackFrame));
                 return iemRaiseStackSelectorNotPresentWithErr(pVCpu, uExt);
             }
         }
         else
         {
-            if (   pCtx->esp - 1 > (DescSS.Legacy.Gen.u4Type & X86_DESC_DB ? UINT32_MAX : UINT32_C(0xffff))
+            if (   pCtx->esp - 1 > (DescSS.Legacy.Gen.u1DefBig ? UINT32_MAX : UINT32_C(0xffff))
                 || pCtx->esp - cbStackFrame < cbLimitSS + UINT32_C(1))
             {
-                Log(("iemTaskSwitch: SS=%#x ESP=%#x cbStackFrame=%#x (expand down) is out of bounds -> #SS\n", pCtx->ss.Sel, pCtx->esp,
-                     cbStackFrame));
+                Log(("iemTaskSwitch: SS=%#x ESP=%#x cbStackFrame=%#x (expand down) is out of bounds -> #SS\n",
+                     pCtx->ss.Sel, pCtx->esp, cbStackFrame));
                 return iemRaiseStackSelectorNotPresentWithErr(pVCpu, uExt);
             }
         }
@@ -4268,8 +4285,8 @@ iemTaskSwitch(PVMCPU          pVCpu,
             rcStrict = iemMemStackPushU16(pVCpu, uErr);
         if (rcStrict != VINF_SUCCESS)
         {
-            Log(("iemTaskSwitch: Can't push error code to new task's stack. %s-bit TSS. rc=%Rrc\n", fIsNewTSS386 ? "32" : "16",
-                 VBOXSTRICTRC_VAL(rcStrict)));
+            Log(("iemTaskSwitch: Can't push error code to new task's stack. %s-bit TSS. rc=%Rrc\n",
+                 fIsNewTSS386 ? "32" : "16", VBOXSTRICTRC_VAL(rcStrict)));
             return rcStrict;
         }
     }
@@ -5607,6 +5624,7 @@ IEM_STATIC void iemOpStubMsg2(PVMCPU pVCpu)
 #define FNIEMOP_STUB(a_Name) \
     FNIEMOP_DEF(a_Name) \
     { \
+        RT_NOREF_PV(pVCpu); \
         IEMOP_BITCH_ABOUT_STUB(); \
         return VERR_IEM_INSTR_NOT_IMPLEMENTED; \
     } \
@@ -5616,8 +5634,9 @@ IEM_STATIC void iemOpStubMsg2(PVMCPU pVCpu)
 #define FNIEMOP_STUB_1(a_Name, a_Type0, a_Name0) \
     FNIEMOP_DEF_1(a_Name, a_Type0, a_Name0) \
     { \
+        RT_NOREF_PV(pVCpu); \
+        RT_NOREF_PV(a_Name0); \
         IEMOP_BITCH_ABOUT_STUB(); \
-        NOREF(a_Name0); \
         return VERR_IEM_INSTR_NOT_IMPLEMENTED; \
     } \
     typedef int ignore_semicolon
@@ -5635,7 +5654,8 @@ IEM_STATIC void iemOpStubMsg2(PVMCPU pVCpu)
 #define FNIEMOP_UD_STUB_1(a_Name, a_Type0, a_Name0) \
     FNIEMOP_DEF_1(a_Name, a_Type0, a_Name0) \
     { \
-        NOREF(a_Name0); \
+        RT_NOREF_PV(pVCpu); \
+        RT_NOREF_PV(a_Name0); \
         Log(("Unsupported instruction %Rfn\n", __FUNCTION__)); \
         return IEMOP_RAISE_INVALID_OPCODE(); \
     } \
@@ -6588,11 +6608,10 @@ DECLINLINE(void) iemFpuRotateStackPop(PX86FXSTATE pFpuCtx)
  * Updates FSW and pushes a FPU result onto the FPU stack if no pending
  * exception prevents it.
  *
- * @param   pVCpu               The cross context virtual CPU structure of the calling thread.
  * @param   pResult             The FPU operation result to push.
  * @param   pFpuCtx             The FPU context.
  */
-IEM_STATIC void iemFpuMaybePushResult(PVMCPU pVCpu, PIEMFPURESULT pResult, PX86FXSTATE pFpuCtx)
+IEM_STATIC void iemFpuMaybePushResult(PIEMFPURESULT pResult, PX86FXSTATE pFpuCtx)
 {
     /* Update FSW and bail if there are pending exceptions afterwards. */
     uint16_t fFsw = pFpuCtx->FSW & ~X86_FSW_C_MASK;
@@ -6704,7 +6723,7 @@ IEM_STATIC void iemFpuPushResult(PVMCPU pVCpu, PIEMFPURESULT pResult)
     PCPUMCTX    pCtx    = IEM_GET_CTX(pVCpu);
     PX86FXSTATE pFpuCtx = &pCtx->CTX_SUFF(pXState)->x87;
     iemFpuUpdateOpcodeAndIpWorker(pVCpu, pCtx, pFpuCtx);
-    iemFpuMaybePushResult(pVCpu, pResult, pFpuCtx);
+    iemFpuMaybePushResult(pResult, pFpuCtx);
 }
 
 
@@ -6723,7 +6742,7 @@ IEM_STATIC void iemFpuPushResultWithMemOp(PVMCPU pVCpu, PIEMFPURESULT pResult, u
     PX86FXSTATE pFpuCtx = &pCtx->CTX_SUFF(pXState)->x87;
     iemFpuUpdateDP(pVCpu, pCtx, pFpuCtx, iEffSeg, GCPtrEff);
     iemFpuUpdateOpcodeAndIpWorker(pVCpu, pCtx, pFpuCtx);
-    iemFpuMaybePushResult(pVCpu, pResult, pFpuCtx);
+    iemFpuMaybePushResult(pResult, pFpuCtx);
 }
 
 
@@ -7009,11 +7028,10 @@ IEM_STATIC void iemFpuUpdateFSWWithMemOpThenPop(PVMCPU pVCpu, uint16_t u16FSW, u
 /**
  * Worker routine for raising an FPU stack underflow exception.
  *
- * @param   pVCpu               The cross context virtual CPU structure of the calling thread.
  * @param   pFpuCtx             The FPU context.
  * @param   iStReg              The stack register being accessed.
  */
-IEM_STATIC void iemFpuStackUnderflowOnly(PVMCPU pVCpu, PX86FXSTATE pFpuCtx, uint8_t iStReg)
+IEM_STATIC void iemFpuStackUnderflowOnly(PX86FXSTATE pFpuCtx, uint8_t iStReg)
 {
     Assert(iStReg < 8 || iStReg == UINT8_MAX);
     if (pFpuCtx->FCW & X86_FCW_IM)
@@ -7049,7 +7067,7 @@ DECL_NO_INLINE(IEM_STATIC, void) iemFpuStackUnderflow(PVMCPU pVCpu, uint8_t iStR
     PCPUMCTX    pCtx    = IEM_GET_CTX(pVCpu);
     PX86FXSTATE pFpuCtx = &pCtx->CTX_SUFF(pXState)->x87;
     iemFpuUpdateOpcodeAndIpWorker(pVCpu, pCtx, pFpuCtx);
-    iemFpuStackUnderflowOnly(pVCpu, pFpuCtx, iStReg);
+    iemFpuStackUnderflowOnly(pFpuCtx, iStReg);
 }
 
 
@@ -7060,7 +7078,7 @@ iemFpuStackUnderflowWithMemOp(PVMCPU pVCpu, uint8_t iStReg, uint8_t iEffSeg, RTG
     PX86FXSTATE pFpuCtx = &pCtx->CTX_SUFF(pXState)->x87;
     iemFpuUpdateDP(pVCpu, pCtx, pFpuCtx, iEffSeg, GCPtrEff);
     iemFpuUpdateOpcodeAndIpWorker(pVCpu, pCtx, pFpuCtx);
-    iemFpuStackUnderflowOnly(pVCpu, pFpuCtx, iStReg);
+    iemFpuStackUnderflowOnly(pFpuCtx, iStReg);
 }
 
 
@@ -7069,7 +7087,7 @@ DECL_NO_INLINE(IEM_STATIC, void) iemFpuStackUnderflowThenPop(PVMCPU pVCpu, uint8
     PCPUMCTX    pCtx    = IEM_GET_CTX(pVCpu);
     PX86FXSTATE pFpuCtx = &pCtx->CTX_SUFF(pXState)->x87;
     iemFpuUpdateOpcodeAndIpWorker(pVCpu, pCtx, pFpuCtx);
-    iemFpuStackUnderflowOnly(pVCpu, pFpuCtx, iStReg);
+    iemFpuStackUnderflowOnly(pFpuCtx, iStReg);
     iemFpuMaybePopOne(pFpuCtx);
 }
 
@@ -7081,7 +7099,7 @@ iemFpuStackUnderflowWithMemOpThenPop(PVMCPU pVCpu, uint8_t iStReg, uint8_t iEffS
     PX86FXSTATE pFpuCtx = &pCtx->CTX_SUFF(pXState)->x87;
     iemFpuUpdateDP(pVCpu, pCtx, pFpuCtx, iEffSeg, GCPtrEff);
     iemFpuUpdateOpcodeAndIpWorker(pVCpu, pCtx, pFpuCtx);
-    iemFpuStackUnderflowOnly(pVCpu, pFpuCtx, iStReg);
+    iemFpuStackUnderflowOnly(pFpuCtx, iStReg);
     iemFpuMaybePopOne(pFpuCtx);
 }
 
@@ -7091,7 +7109,7 @@ DECL_NO_INLINE(IEM_STATIC, void) iemFpuStackUnderflowThenPopPop(PVMCPU pVCpu)
     PCPUMCTX    pCtx    = IEM_GET_CTX(pVCpu);
     PX86FXSTATE pFpuCtx = &pCtx->CTX_SUFF(pXState)->x87;
     iemFpuUpdateOpcodeAndIpWorker(pVCpu, pCtx, pFpuCtx);
-    iemFpuStackUnderflowOnly(pVCpu, pFpuCtx, UINT8_MAX);
+    iemFpuStackUnderflowOnly(pFpuCtx, UINT8_MAX);
     iemFpuMaybePopOne(pFpuCtx);
     iemFpuMaybePopOne(pFpuCtx);
 }
@@ -7768,6 +7786,7 @@ IEM_STATIC VBOXSTRICTRC iemMemBounceBufferCommitAndUnmap(PVMCPU pVCpu, unsigned
     Assert(pVCpu->iem.s.aMemMappings[iMemMap].fAccess & IEM_ACCESS_TYPE_WRITE);
 #ifdef IN_RING3
     Assert(!fPostponeFail);
+    RT_NOREF_PV(fPostponeFail);
 #endif
 
     /*
@@ -9187,7 +9206,7 @@ IEM_STATIC VBOXSTRICTRC iemMemFetchDataXdtr(PVMCPU pVCpu, uint16_t *pcbLimit, PR
     }
     else
     {
-        uint32_t uTmp;
+        uint32_t uTmp = 0; /* (Visual C++ maybe used uninitialized) */
         if (enmOpSize == IEMMODE_32BIT)
         {
             if (IEM_GET_TARGET_CPU(pVCpu) != IEMTARGETCPU_486)
@@ -11395,7 +11414,7 @@ IEM_STATIC VBOXSTRICTRC iemMemMarkSelDescAccessed(PVMCPU pVCpu, uint16_t uSel)
         if (IEM_GET_TARGET_CPU(pVCpu) >= (a_uMinCpu) || !(a_fOnlyIf)) { } \
         else \
         { \
-            DBGFSTOP(pVCpu->CTX_SUFF(pVM)); \
+            (void)DBGFSTOP(pVCpu->CTX_SUFF(pVM)); \
             return IEMOP_RAISE_INVALID_OPCODE(); \
         } \
     } while (0)
@@ -11443,17 +11462,17 @@ IEM_STATIC VBOXSTRICTRC iemMemMarkSelDescAccessed(PVMCPU pVCpu, uint16_t uSel)
 #endif
 
 /** The instruction requires a Pentium (586) or later. */
-#if IEM_CFG_TARGET_CPU >= IEMTARGETCPU_586
+#if IEM_CFG_TARGET_CPU >= IEMTARGETCPU_PENTIUM
 # define IEMOP_HLP_MIN_586() do { } while (0)
 #else
-# define IEMOP_HLP_MIN_586() IEMOP_HLP_MIN_CPU(IEMTARGETCPU_586, true)
+# define IEMOP_HLP_MIN_586() IEMOP_HLP_MIN_CPU(IEMTARGETCPU_PENTIUM, true)
 #endif
 
 /** The instruction requires a PentiumPro (686) or later. */
-#if IEM_CFG_TARGET_CPU >= IEMTARGETCPU_686
+#if IEM_CFG_TARGET_CPU >= IEMTARGETCPU_PPRO
 # define IEMOP_HLP_MIN_686() do { } while (0)
 #else
-# define IEMOP_HLP_MIN_686() IEMOP_HLP_MIN_CPU(IEMTARGETCPU_686, true)
+# define IEMOP_HLP_MIN_686() IEMOP_HLP_MIN_CPU(IEMTARGETCPU_PPRO, true)
 #endif
 
 
@@ -12274,7 +12293,7 @@ IEM_STATIC RTGCPTR iemOpHlpCalcRmEffAddrJmp(PVMCPU pVCpu, uint8_t bRm, uint8_t c
                         case 5: u32EffAddr = pCtx->ebp; break;
                         case 6: u32EffAddr = pCtx->esi; break;
                         case 7: u32EffAddr = pCtx->edi; break;
-                        IEM_NOT_REACHED_DEFAULT_CASE_RET();
+                        IEM_NOT_REACHED_DEFAULT_CASE_RET2(RTGCPTR_MAX);
                     }
                     u32EffAddr <<= (bSib >> X86_SIB_SCALE_SHIFT) & X86_SIB_SCALE_SMASK;
 
@@ -12301,14 +12320,14 @@ IEM_STATIC RTGCPTR iemOpHlpCalcRmEffAddrJmp(PVMCPU pVCpu, uint8_t bRm, uint8_t c
                             break;
                         case 6: u32EffAddr += pCtx->esi; break;
                         case 7: u32EffAddr += pCtx->edi; break;
-                        IEM_NOT_REACHED_DEFAULT_CASE_RET();
+                        IEM_NOT_REACHED_DEFAULT_CASE_RET2(RTGCPTR_MAX);
                     }
                     break;
                 }
                 case 5: u32EffAddr = pCtx->ebp; SET_SS_DEF(); break;
                 case 6: u32EffAddr = pCtx->esi; break;
                 case 7: u32EffAddr = pCtx->edi; break;
-                IEM_NOT_REACHED_DEFAULT_CASE_RET();
+                IEM_NOT_REACHED_DEFAULT_CASE_RET2(RTGCPTR_MAX);
             }
 
             /* Get and add the displacement. */
@@ -12329,7 +12348,7 @@ IEM_STATIC RTGCPTR iemOpHlpCalcRmEffAddrJmp(PVMCPU pVCpu, uint8_t bRm, uint8_t c
                     break;
                 }
                 default:
-                    AssertFailedReturn(VERR_IEM_IPE_2); /* (caller checked for these) */
+                    AssertFailedStmt(longjmp(*pVCpu->iem.s.CTX_SUFF(pJmpBuf), VERR_IEM_IPE_2)); /* (caller checked for these) */
             }
         }
 
@@ -12395,7 +12414,7 @@ IEM_STATIC RTGCPTR iemOpHlpCalcRmEffAddrJmp(PVMCPU pVCpu, uint8_t bRm, uint8_t c
                     case 13: u64EffAddr = pCtx->r13; break;
                     case 14: u64EffAddr = pCtx->r14; break;
                     case 15: u64EffAddr = pCtx->r15; break;
-                    IEM_NOT_REACHED_DEFAULT_CASE_RET();
+                    IEM_NOT_REACHED_DEFAULT_CASE_RET2(RTGCPTR_MAX);
                 }
                 u64EffAddr <<= (bSib >> X86_SIB_SCALE_SHIFT) & X86_SIB_SCALE_SMASK;
 
@@ -12436,11 +12455,11 @@ IEM_STATIC RTGCPTR iemOpHlpCalcRmEffAddrJmp(PVMCPU pVCpu, uint8_t bRm, uint8_t c
                             u64EffAddr += (int32_t)u32Disp;
                         }
                         break;
-                    IEM_NOT_REACHED_DEFAULT_CASE_RET();
+                    IEM_NOT_REACHED_DEFAULT_CASE_RET2(RTGCPTR_MAX);
                 }
                 break;
             }
-            IEM_NOT_REACHED_DEFAULT_CASE_RET();
+            IEM_NOT_REACHED_DEFAULT_CASE_RET2(RTGCPTR_MAX);
         }
 
         /* Get and add the displacement. */
@@ -12462,7 +12481,7 @@ IEM_STATIC RTGCPTR iemOpHlpCalcRmEffAddrJmp(PVMCPU pVCpu, uint8_t bRm, uint8_t c
                 u64EffAddr += (int32_t)u32Disp;
                 break;
             }
-            IEM_NOT_REACHED_DEFAULT_CASE_RET(); /* (caller checked for these) */
+            IEM_NOT_REACHED_DEFAULT_CASE_RET2(RTGCPTR_MAX); /* (caller checked for these) */
         }
 
     }
@@ -13529,6 +13548,7 @@ IEM_STATIC void iemLogCurInstr(PVMCPU pVCpu, PCPUMCTX pCtx, bool fSameCtx)
 # endif
         LogFlow(("IEMExecOne: cs:rip=%04x:%08RX64 ss:rsp=%04x:%08RX64 EFL=%06x\n",
                  pCtx->cs.Sel, pCtx->rip, pCtx->ss.Sel, pCtx->rsp, pCtx->eflags.u));
+    RT_NOREF_PV(pVCpu); RT_NOREF_PV(pCtx); RT_NOREF_PV(fSameCtx);
 }
 #endif
 
@@ -13620,11 +13640,7 @@ DECL_FORCE_INLINE(VBOXSTRICTRC) iemExecStatusCodeFiddling(PVMCPU pVCpu, VBOXSTRI
  * @param   fExecuteInhibit     If set, execute the instruction following CLI,
  *                      POP SS and MOV SS,GR.
  */
-#ifdef __GNUC__
-DECLINLINE(VBOXSTRICTRC)        iemExecOneInner(PVMCPU pVCpu, bool fExecuteInhibit)
-#else
-DECL_FORCE_INLINE(VBOXSTRICTRC) iemExecOneInner(PVMCPU pVCpu, bool fExecuteInhibit)
-#endif
+DECLINLINE(VBOXSTRICTRC) iemExecOneInner(PVMCPU pVCpu, bool fExecuteInhibit)
 {
 #ifdef IEM_WITH_SETJMP
     VBOXSTRICTRC rcStrict;
@@ -14243,12 +14259,14 @@ VMMDECL(VBOXSTRICTRC) IEMInjectTrpmEvent(PVMCPU pVCpu)
 
 VMM_INT_DECL(int) IEMBreakpointSet(PVM pVM, RTGCPTR GCPtrBp)
 {
+    RT_NOREF_PV(pVM); RT_NOREF_PV(GCPtrBp);
     return VERR_NOT_IMPLEMENTED;
 }
 
 
 VMM_INT_DECL(int) IEMBreakpointClear(PVM pVM, RTGCPTR GCPtrBp)
 {
+    RT_NOREF_PV(pVM); RT_NOREF_PV(GCPtrBp);
     return VERR_NOT_IMPLEMENTED;
 }
 
diff --git a/src/VBox/VMM/VMMAll/IEMAllAImpl.asm b/src/VBox/VMM/VMMAll/IEMAllAImpl.asm
index 6fe5930..320d6df 100644
--- a/src/VBox/VMM/VMMAll/IEMAllAImpl.asm
+++ b/src/VBox/VMM/VMMAll/IEMAllAImpl.asm
@@ -3,7 +3,7 @@
 ; IEM - Instruction Implementation in Assembly.
 ;
 
-; Copyright (C) 2011-2015 Oracle Corporation
+; Copyright (C) 2011-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp b/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp
index d4ce733..8d1c02d 100644
--- a/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp
+++ b/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp
@@ -28,6 +28,7 @@
 /*********************************************************************************************************************************
 *   Global Variables                                                                                                             *
 *********************************************************************************************************************************/
+#ifdef RT_ARCH_X86
 /**
  * Parity calculation table.
  *
@@ -323,6 +324,7 @@ static uint8_t const g_afParity[256] =
     /* 0xfe = 11111110b */ 0,
     /* 0xff = 11111111b */ X86_EFL_PF,
 };
+#endif /* RT_ARCH_X86 */
 
 
 /**
@@ -831,6 +833,7 @@ IEM_DECL_IMPL_DEF(void, iemAImpl_not_u64,(uint64_t  *puDst,  uint32_t *pfEFlags)
     uint64_t uResult = ~uDst;
     *puDst = uResult;
     /* EFLAGS are not modified. */
+    RT_NOREF_PV(pfEFlags);
 }
 
 
@@ -1140,16 +1143,25 @@ IEM_DECL_IMPL_DEF(int, iemAImpl_mul_u64,(uint64_t *pu64RAX, uint64_t *pu64RDX, u
     RTUInt128MulU64ByU64(&Result, *pu64RAX, u64Factor);
     *pu64RAX = Result.s.Lo;
     *pu64RDX = Result.s.Hi;
-    /** @todo research the undefined MUL flags. */
+
+    /* MUL EFLAGS according to Skylake (similar to IMUL). */
+    *pfEFlags &= ~(X86_EFL_SF | X86_EFL_CF | X86_EFL_OF | X86_EFL_AF | X86_EFL_ZF | X86_EFL_PF);
+    if (Result.s.Lo & RT_BIT_64(63))
+        *pfEFlags |= X86_EFL_SF;
+    *pfEFlags |= g_afParity[Result.s.Lo & 0xff]; /* (Skylake behaviour) */
+    if (Result.s.Hi != 0)
+        *pfEFlags |= X86_EFL_CF | X86_EFL_OF;
     return 0;
 }
 
 
 IEM_DECL_IMPL_DEF(int, iemAImpl_imul_u64,(uint64_t *pu64RAX, uint64_t *pu64RDX, uint64_t u64Factor, uint32_t *pfEFlags))
 {
-/** @todo Testcase: IMUL 1 operand   */
     RTUINT128U Result;
-    *pfEFlags &= ~(X86_EFL_SF | X86_EFL_CF | X86_EFL_OF);
+    *pfEFlags &= ~( X86_EFL_SF | X86_EFL_CF | X86_EFL_OF
+                   /* Skylake always clears: */ | X86_EFL_AF | X86_EFL_ZF
+                   /* Skylake may set: */       | X86_EFL_PF);
+
     if ((int64_t)*pu64RAX >= 0)
     {
         if ((int64_t)u64Factor >= 0)
@@ -1183,11 +1195,11 @@ IEM_DECL_IMPL_DEF(int, iemAImpl_imul_u64,(uint64_t *pu64RAX, uint64_t *pu64RDX,
         }
     }
     *pu64RAX = Result.s.Lo;
-    *pu64RDX = Result.s.Hi;
-    if (*pu64RAX & RT_BIT_64(63))
+    if (Result.s.Lo & RT_BIT_64(63))
         *pfEFlags |= X86_EFL_SF;
+    *pfEFlags |= g_afParity[Result.s.Lo & 0xff]; /* (Skylake behaviour) */
+    *pu64RDX = Result.s.Hi;
 
-    /** @todo research the undefined IMUL flags. */
     return 0;
 }
 
@@ -1203,6 +1215,9 @@ IEM_DECL_IMPL_DEF(void, iemAImpl_imul_two_u64,(uint64_t *puDst, uint64_t uSrc, u
 
 IEM_DECL_IMPL_DEF(int, iemAImpl_div_u64,(uint64_t *pu64RAX, uint64_t *pu64RDX, uint64_t u64Divisor, uint32_t *pfEFlags))
 {
+    /* Note! Skylake leaves all flags alone. */
+    RT_NOREF_PV(pfEFlags);
+
     if (   u64Divisor != 0
         && *pu64RDX < u64Divisor)
     {
@@ -1237,6 +1252,9 @@ IEM_DECL_IMPL_DEF(int, iemAImpl_div_u64,(uint64_t *pu64RAX, uint64_t *pu64RDX, u
 
 IEM_DECL_IMPL_DEF(int, iemAImpl_idiv_u64,(uint64_t *pu64RAX, uint64_t *pu64RDX, uint64_t u64Divisor, uint32_t *pfEFlags))
 {
+    /* Note! Skylake leaves all flags alone. */
+    RT_NOREF_PV(pfEFlags);
+
     if (u64Divisor != 0)
     {
         /*
diff --git a/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h b/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h
index 443f167..23abe43 100644
--- a/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h
+++ b/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -944,6 +944,7 @@ IEM_CIMPL_DEF_4(iemCImpl_BranchTaskSegment, uint16_t, uSel, IEMBRANCH, enmBranch
     Assert(enmBranch == IEMBRANCH_JUMP || enmBranch == IEMBRANCH_CALL);
     Assert(   pDesc->Legacy.Gate.u4Type == X86_SEL_TYPE_SYS_286_TSS_AVAIL
            || pDesc->Legacy.Gate.u4Type == X86_SEL_TYPE_SYS_386_TSS_AVAIL);
+    RT_NOREF_PV(enmEffOpSize);
 
     if (   pDesc->Legacy.Gate.u2Dpl < pVCpu->iem.s.uCpl
         || pDesc->Legacy.Gate.u2Dpl < (uSel & X86_SEL_RPL))
@@ -985,6 +986,7 @@ IEM_CIMPL_DEF_4(iemCImpl_BranchTaskGate, uint16_t, uSel, IEMBRANCH, enmBranch, I
     IEM_RETURN_ASPECT_NOT_IMPLEMENTED();
 #else
     Assert(enmBranch == IEMBRANCH_JUMP || enmBranch == IEMBRANCH_CALL);
+    RT_NOREF_PV(enmEffOpSize);
 
     if (   pDesc->Legacy.Gate.u2Dpl < pVCpu->iem.s.uCpl
         || pDesc->Legacy.Gate.u2Dpl < (uSel & X86_SEL_RPL))
@@ -1054,6 +1056,8 @@ IEM_CIMPL_DEF_4(iemCImpl_BranchCallGate, uint16_t, uSel, IEMBRANCH, enmBranch, I
 #ifndef IEM_IMPLEMENTS_CALLGATE
     IEM_RETURN_ASPECT_NOT_IMPLEMENTED();
 #else
+    RT_NOREF_PV(enmEffOpSize);
+
     /* NB: Far jumps can only do intra-privilege transfers. Far calls support
      * inter-privilege calls and are much more complex.
      *
@@ -2970,6 +2974,8 @@ static void iemCImplCommonV8086LoadSeg(PCPUMSELREG pSReg, uint16_t uSeg)
 IEM_CIMPL_DEF_5(iemCImpl_iret_prot_v8086, PCPUMCTX, pCtx, uint32_t, uNewEip, uint16_t, uNewCs,
                 uint32_t, uNewFlags, uint64_t, uNewRsp)
 {
+    RT_NOREF_PV(cbInstr);
+
     /*
      * Pop the V8086 specific frame bits off the stack.
      */
@@ -3031,6 +3037,8 @@ IEM_CIMPL_DEF_1(iemCImpl_iret_prot_NestedTask, IEMMODE, enmEffOpSize)
 #ifndef IEM_IMPLEMENTS_TASKSWITCH
     IEM_RETURN_ASPECT_NOT_IMPLEMENTED();
 #else
+    RT_NOREF_PV(enmEffOpSize);
+
     /*
      * Read the segment selector in the link-field of the current TSS.
      */
@@ -3903,6 +3911,7 @@ IEM_CIMPL_DEF_0(iemCImpl_syscall)
 IEM_CIMPL_DEF_0(iemCImpl_sysret)
 
 {
+    RT_NOREF_PV(cbInstr);
     PCPUMCTX pCtx = IEM_GET_CTX(pVCpu);
 
     /*
@@ -4425,10 +4434,9 @@ IEM_CIMPL_DEF_2(iemCImpl_VerX, uint16_t, uSel, bool, fWrite)
  * @returns VINF_SUCCESS.
  * @param   pu16Dst         Pointer to the destination register.
  * @param   uSel            The selector to load details for.
- * @param   pEFlags         Pointer to the eflags register.
  * @param   fIsLar          true = LAR, false = LSL.
  */
-IEM_CIMPL_DEF_4(iemCImpl_LarLsl_u64, uint64_t *, pu64Dst, uint16_t, uSel, uint32_t *, pEFlags, bool, fIsLar)
+IEM_CIMPL_DEF_3(iemCImpl_LarLsl_u64, uint64_t *, pu64Dst, uint16_t, uSel, bool, fIsLar)
 {
     Assert(!IEM_IS_REAL_OR_V86_MODE(pVCpu));
 
@@ -4532,14 +4540,13 @@ IEM_CIMPL_DEF_4(iemCImpl_LarLsl_u64, uint64_t *, pu64Dst, uint16_t, uSel, uint32
  * @returns VINF_SUCCESS.
  * @param   pu16Dst         Pointer to the destination register.
  * @param   u16Sel          The selector to load details for.
- * @param   pEFlags         Pointer to the eflags register.
  * @param   fIsLar          true = LAR, false = LSL.
  */
-IEM_CIMPL_DEF_4(iemCImpl_LarLsl_u16, uint16_t *, pu16Dst, uint16_t, uSel, uint32_t *, pEFlags, bool, fIsLar)
+IEM_CIMPL_DEF_3(iemCImpl_LarLsl_u16, uint16_t *, pu16Dst, uint16_t, uSel, bool, fIsLar)
 {
     uint64_t u64TmpDst = *pu16Dst;
-    IEM_CIMPL_CALL_4(iemCImpl_LarLsl_u64, &u64TmpDst, uSel, pEFlags, fIsLar);
-    *pu16Dst = (uint16_t)u64TmpDst;
+    IEM_CIMPL_CALL_3(iemCImpl_LarLsl_u64, &u64TmpDst, uSel, fIsLar);
+    *pu16Dst = u64TmpDst;
     return VINF_SUCCESS;
 }
 
diff --git a/src/VBox/VMM/VMMAll/IEMAllCImplStrInstr.cpp.h b/src/VBox/VMM/VMMAll/IEMAllCImplStrInstr.cpp.h
index add26a9..295eb31 100644
--- a/src/VBox/VMM/VMMAll/IEMAllCImplStrInstr.cpp.h
+++ b/src/VBox/VMM/VMMAll/IEMAllCImplStrInstr.cpp.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMAll/IEMAllInstructions.cpp.h b/src/VBox/VMM/VMMAll/IEMAllInstructions.cpp.h
index f0fed49..8911267 100644
--- a/src/VBox/VMM/VMMAll/IEMAllInstructions.cpp.h
+++ b/src/VBox/VMM/VMMAll/IEMAllInstructions.cpp.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -21,6 +21,11 @@
 *******************************************************************************/
 extern const PFNIEMOP g_apfnOneByteMap[256]; /* not static since we need to forward declare it. */
 
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable: 4702) /* Unreachable code like return in iemOp_Grp6_lldt. */
+#endif
+
 
 /**
  * Common worker for instructions like ADD, AND, OR, ++ with a byte
@@ -537,6 +542,7 @@ FNIEMOP_DEF(iemOp_Invalid)
 /** Invalid with RM byte . */
 FNIEMOPRM_DEF(iemOp_InvalidWithRM)
 {
+    RT_NOREF_PV(bRm);
     IEMOP_MNEMONIC("InvalidWithRM");
     return IEMOP_RAISE_INVALID_OPCODE();
 }
@@ -1206,16 +1212,14 @@ FNIEMOP_DEF_1(iemOpCommonLarLsl_Gv_Ew, bool, fIsLar)
         {
             case IEMMODE_16BIT:
             {
-                IEM_MC_BEGIN(4, 0);
+                IEM_MC_BEGIN(3, 0);
                 IEM_MC_ARG(uint16_t *,  pu16Dst,           0);
                 IEM_MC_ARG(uint16_t,    u16Sel,            1);
-                IEM_MC_ARG(uint32_t *,  pEFlags,           2);
-                IEM_MC_ARG_CONST(bool,  fIsLarArg, fIsLar, 3);
+                IEM_MC_ARG_CONST(bool,  fIsLarArg, fIsLar, 2);
 
                 IEM_MC_REF_GREG_U16(pu16Dst, ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) | pVCpu->iem.s.uRexReg);
                 IEM_MC_FETCH_GREG_U16(u16Sel, (bRm & X86_MODRM_RM_MASK) | pVCpu->iem.s.uRexB);
-                IEM_MC_REF_EFLAGS(pEFlags);
-                IEM_MC_CALL_CIMPL_4(iemCImpl_LarLsl_u16, pu16Dst, u16Sel, pEFlags, fIsLarArg);
+                IEM_MC_CALL_CIMPL_3(iemCImpl_LarLsl_u16, pu16Dst, u16Sel, fIsLarArg);
 
                 IEM_MC_END();
                 return VINF_SUCCESS;
@@ -1224,16 +1228,14 @@ FNIEMOP_DEF_1(iemOpCommonLarLsl_Gv_Ew, bool, fIsLar)
             case IEMMODE_32BIT:
             case IEMMODE_64BIT:
             {
-                IEM_MC_BEGIN(4, 0);
+                IEM_MC_BEGIN(3, 0);
                 IEM_MC_ARG(uint64_t *,  pu64Dst,           0);
                 IEM_MC_ARG(uint16_t,    u16Sel,            1);
-                IEM_MC_ARG(uint32_t *,  pEFlags,           2);
-                IEM_MC_ARG_CONST(bool,  fIsLarArg, fIsLar, 3);
+                IEM_MC_ARG_CONST(bool,  fIsLarArg, fIsLar, 2);
 
                 IEM_MC_REF_GREG_U64(pu64Dst, ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) | pVCpu->iem.s.uRexReg);
                 IEM_MC_FETCH_GREG_U16(u16Sel, (bRm & X86_MODRM_RM_MASK) | pVCpu->iem.s.uRexB);
-                IEM_MC_REF_EFLAGS(pEFlags);
-                IEM_MC_CALL_CIMPL_4(iemCImpl_LarLsl_u64, pu64Dst, u16Sel, pEFlags, fIsLarArg);
+                IEM_MC_CALL_CIMPL_3(iemCImpl_LarLsl_u64, pu64Dst, u16Sel, fIsLarArg);
 
                 IEM_MC_END();
                 return VINF_SUCCESS;
@@ -1248,11 +1250,10 @@ FNIEMOP_DEF_1(iemOpCommonLarLsl_Gv_Ew, bool, fIsLar)
         {
             case IEMMODE_16BIT:
             {
-                IEM_MC_BEGIN(4, 1);
+                IEM_MC_BEGIN(3, 1);
                 IEM_MC_ARG(uint16_t *,  pu16Dst,           0);
                 IEM_MC_ARG(uint16_t,    u16Sel,            1);
-                IEM_MC_ARG(uint32_t *,  pEFlags,           2);
-                IEM_MC_ARG_CONST(bool,  fIsLarArg, fIsLar, 3);
+                IEM_MC_ARG_CONST(bool,  fIsLarArg, fIsLar, 2);
                 IEM_MC_LOCAL(RTGCPTR,   GCPtrEffSrc);
 
                 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffSrc, bRm, 0);
@@ -1260,8 +1261,7 @@ FNIEMOP_DEF_1(iemOpCommonLarLsl_Gv_Ew, bool, fIsLar)
 
                 IEM_MC_FETCH_MEM_U16(u16Sel, pVCpu->iem.s.iEffSeg, GCPtrEffSrc);
                 IEM_MC_REF_GREG_U16(pu16Dst, ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) | pVCpu->iem.s.uRexReg);
-                IEM_MC_REF_EFLAGS(pEFlags);
-                IEM_MC_CALL_CIMPL_4(iemCImpl_LarLsl_u16, pu16Dst, u16Sel, pEFlags, fIsLarArg);
+                IEM_MC_CALL_CIMPL_3(iemCImpl_LarLsl_u16, pu16Dst, u16Sel, fIsLarArg);
 
                 IEM_MC_END();
                 return VINF_SUCCESS;
@@ -1270,11 +1270,10 @@ FNIEMOP_DEF_1(iemOpCommonLarLsl_Gv_Ew, bool, fIsLar)
             case IEMMODE_32BIT:
             case IEMMODE_64BIT:
             {
-                IEM_MC_BEGIN(4, 1);
+                IEM_MC_BEGIN(3, 1);
                 IEM_MC_ARG(uint64_t *,  pu64Dst,           0);
                 IEM_MC_ARG(uint16_t,    u16Sel,            1);
-                IEM_MC_ARG(uint32_t *,  pEFlags,           2);
-                IEM_MC_ARG_CONST(bool,  fIsLarArg, fIsLar, 3);
+                IEM_MC_ARG_CONST(bool,  fIsLarArg, fIsLar, 2);
                 IEM_MC_LOCAL(RTGCPTR,   GCPtrEffSrc);
 
                 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffSrc, bRm, 0);
@@ -1283,8 +1282,7 @@ FNIEMOP_DEF_1(iemOpCommonLarLsl_Gv_Ew, bool, fIsLar)
 
                 IEM_MC_FETCH_MEM_U16(u16Sel, pVCpu->iem.s.iEffSeg, GCPtrEffSrc);
                 IEM_MC_REF_GREG_U64(pu64Dst, ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) | pVCpu->iem.s.uRexReg);
-                IEM_MC_REF_EFLAGS(pEFlags);
-                IEM_MC_CALL_CIMPL_4(iemCImpl_LarLsl_u64, pu64Dst, u16Sel, pEFlags, fIsLarArg);
+                IEM_MC_CALL_CIMPL_3(iemCImpl_LarLsl_u64, pu64Dst, u16Sel, fIsLarArg);
 
                 IEM_MC_END();
                 return VINF_SUCCESS;
@@ -5432,6 +5430,7 @@ FNIEMOP_STUB_1(iemOp_Grp15_clflush,  uint8_t, bRm);
 /** Opcode 0x0f 0xae 11b/5. */
 FNIEMOP_DEF_1(iemOp_Grp15_lfence,   uint8_t, bRm)
 {
+    RT_NOREF_PV(bRm);
     IEMOP_MNEMONIC("lfence");
     IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX();
     if (!IEM_GET_GUEST_CPU_FEATURES(pVCpu)->fSse2)
@@ -5451,6 +5450,7 @@ FNIEMOP_DEF_1(iemOp_Grp15_lfence,   uint8_t, bRm)
 /** Opcode 0x0f 0xae 11b/6. */
 FNIEMOP_DEF_1(iemOp_Grp15_mfence,   uint8_t, bRm)
 {
+    RT_NOREF_PV(bRm);
     IEMOP_MNEMONIC("mfence");
     IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX();
     if (!IEM_GET_GUEST_CPU_FEATURES(pVCpu)->fSse2)
@@ -5470,6 +5470,7 @@ FNIEMOP_DEF_1(iemOp_Grp15_mfence,   uint8_t, bRm)
 /** Opcode 0x0f 0xae 11b/7. */
 FNIEMOP_DEF_1(iemOp_Grp15_sfence,   uint8_t, bRm)
 {
+    RT_NOREF_PV(bRm);
     IEMOP_MNEMONIC("sfence");
     IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX();
     if (!IEM_GET_GUEST_CPU_FEATURES(pVCpu)->fSse2)
@@ -18077,3 +18078,6 @@ const PFNIEMOP g_apfnOneByteMap[256] =
 
 /** @} */
 
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
diff --git a/src/VBox/VMM/VMMAll/IOMAll.cpp b/src/VBox/VMM/VMMAll/IOMAll.cpp
index 7800c41..fbb0f19 100644
--- a/src/VBox/VMM/VMMAll/IOMAll.cpp
+++ b/src/VBox/VMM/VMMAll/IOMAll.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp b/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp
index 82c22ef..fee3496 100644
--- a/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp
+++ b/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -67,6 +67,7 @@ static VBOXSTRICTRC iomMmioRing3WritePending(PVMCPU pVCpu, RTGCPHYS GCPhys, void
     pVCpu->iom.s.PendingMmioWrite.cbValue = (uint32_t)cbBuf;
     memcpy(pVCpu->iom.s.PendingMmioWrite.abValue, pvBuf, cbBuf);
     VMCPU_FF_SET(pVCpu, VMCPU_FF_IOM);
+    RT_NOREF_PV(pRange);
     return VINF_IOM_R3_MMIO_COMMIT_WRITE;
 }
 #endif
@@ -92,6 +93,7 @@ static VBOXSTRICTRC iomMmioRing3WritePending(PVMCPU pVCpu, RTGCPHYS GCPhys, void
 static VBOXSTRICTRC iomMMIODoComplicatedWrite(PVM pVM, PVMCPU pVCpu, PIOMMMIORANGE pRange, RTGCPHYS GCPhys,
                                               void const *pvValue, unsigned cbValue)
 {
+    RT_NOREF_PV(pVCpu);
     AssertReturn(   (pRange->fFlags & IOMMMIO_FLAGS_WRITE_MODE) != IOMMMIO_FLAGS_WRITE_PASSTHRU
                  && (pRange->fFlags & IOMMMIO_FLAGS_WRITE_MODE) <= IOMMMIO_FLAGS_WRITE_DWORD_QWORD_READ_MISSING,
                  VERR_IOM_MMIO_IPE_1);
@@ -548,39 +550,6 @@ DECLINLINE(VBOXSTRICTRC) iomMMIODoRead(PVM pVM, PVMCPU pVCpu, PIOMMMIORANGE pRan
     return rcStrict;
 }
 
-
-/**
- * Internal - statistics only.
- */
-DECLINLINE(void) iomMMIOStatLength(PVM pVM, unsigned cb)
-{
-#ifdef VBOX_WITH_STATISTICS
-    switch (cb)
-    {
-        case 1:
-            STAM_COUNTER_INC(&pVM->iom.s.StatRZMMIO1Byte);
-            break;
-        case 2:
-            STAM_COUNTER_INC(&pVM->iom.s.StatRZMMIO2Bytes);
-            break;
-        case 4:
-            STAM_COUNTER_INC(&pVM->iom.s.StatRZMMIO4Bytes);
-            break;
-        case 8:
-            STAM_COUNTER_INC(&pVM->iom.s.StatRZMMIO8Bytes);
-            break;
-        default:
-            /* No way. */
-            AssertMsgFailed(("Invalid data length %d\n", cb));
-            break;
-    }
-#else
-    NOREF(pVM); NOREF(cb);
-#endif
-}
-
-
-
 /**
  * Common worker for the \#PF handler and IOMMMIOPhysHandler (APIC+VT-x).
  *
@@ -596,6 +565,7 @@ DECLINLINE(void) iomMMIOStatLength(PVM pVM, unsigned cb)
 static VBOXSTRICTRC iomMmioCommonPfHandler(PVM pVM, PVMCPU pVCpu, uint32_t uErrorCode, PCPUMCTXCORE pCtxCore,
                                            RTGCPHYS GCPhysFault, void *pvUser)
 {
+    RT_NOREF_PV(uErrorCode);
     int rc = IOM_LOCK_SHARED(pVM);
 #ifndef IN_RING3
     if (rc == VERR_SEM_BUSY)
diff --git a/src/VBox/VMM/VMMAll/MMAll.cpp b/src/VBox/VMM/VMMAll/MMAll.cpp
index c77c698..b755a56 100644
--- a/src/VBox/VMM/VMMAll/MMAll.cpp
+++ b/src/VBox/VMM/VMMAll/MMAll.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMAll/MMAllHyper.cpp b/src/VBox/VMM/VMMAll/MMAllHyper.cpp
index 1d6e1f6..2d4626c 100644
--- a/src/VBox/VMM/VMMAll/MMAllHyper.cpp
+++ b/src/VBox/VMM/VMMAll/MMAllHyper.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMAll/MMAllPagePool.cpp b/src/VBox/VMM/VMMAll/MMAllPagePool.cpp
index 8601450..3851818 100644
--- a/src/VBox/VMM/VMMAll/MMAllPagePool.cpp
+++ b/src/VBox/VMM/VMMAll/MMAllPagePool.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMAll/PATMAll.cpp b/src/VBox/VMM/VMMAll/PATMAll.cpp
index cc55f33..5ef3b9b 100644
--- a/src/VBox/VMM/VMMAll/PATMAll.cpp
+++ b/src/VBox/VMM/VMMAll/PATMAll.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -51,6 +51,7 @@ patmVirtPageHandler(PVM pVM, PVMCPU pVCpu, RTGCPTR GCPtr, void *pvPtr, void *pvB
 {
     Assert(enmAccessType == PGMACCESSTYPE_WRITE); NOREF(enmAccessType);
     NOREF(pvPtr); NOREF(pvBuf); NOREF(cbBuf); NOREF(enmOrigin); NOREF(pvUser);
+    RT_NOREF_PV(pVCpu);
 
     Assert(pvUser);
     Assert(!((uintptr_t)pvUser & PAGE_OFFSET_MASK));
diff --git a/src/VBox/VMM/VMMAll/PDMAll.cpp b/src/VBox/VMM/VMMAll/PDMAll.cpp
index 2acf771..5ccf3ca 100644
--- a/src/VBox/VMM/VMMAll/PDMAll.cpp
+++ b/src/VBox/VMM/VMMAll/PDMAll.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMAll/PDMAllCritSect.cpp b/src/VBox/VMM/VMMAll/PDMAllCritSect.cpp
index 03e7c7e..cb9bf78 100644
--- a/src/VBox/VMM/VMMAll/PDMAllCritSect.cpp
+++ b/src/VBox/VMM/VMMAll/PDMAllCritSect.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMAll/PDMAllCritSectBoth.cpp b/src/VBox/VMM/VMMAll/PDMAllCritSectBoth.cpp
index 2a5bffe..c255402 100644
--- a/src/VBox/VMM/VMMAll/PDMAllCritSectBoth.cpp
+++ b/src/VBox/VMM/VMMAll/PDMAllCritSectBoth.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMAll/PDMAllCritSectRw.cpp b/src/VBox/VMM/VMMAll/PDMAllCritSectRw.cpp
index c3e1a6e..ffa0665 100644
--- a/src/VBox/VMM/VMMAll/PDMAllCritSectRw.cpp
+++ b/src/VBox/VMM/VMMAll/PDMAllCritSectRw.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -160,6 +160,9 @@ static int pdmCritSectRwEnterShared(PPDMCRITSECTRW pThis, int rcBusy, bool fTryO
     NOREF(pSrcPos);
     NOREF(fNoVal);
 #endif
+#ifdef IN_RING3
+    NOREF(rcBusy);
+#endif
 
 #if defined(PDMCRITSECTRW_STRICT) && defined(IN_RING3)
     RTTHREAD hThreadSelf = RTThreadSelfAutoAdopt();
@@ -710,6 +713,9 @@ static int pdmCritSectRwEnterExcl(PPDMCRITSECTRW pThis, int rcBusy, bool fTryOnl
     NOREF(pSrcPos);
     NOREF(fNoVal);
 #endif
+#ifdef IN_RING3
+    NOREF(rcBusy);
+#endif
 
 #if defined(PDMCRITSECTRW_STRICT) && defined(IN_RING3)
     RTTHREAD hThreadSelf = NIL_RTTHREAD;
@@ -1337,6 +1343,7 @@ VMMDECL(bool) PDMCritSectRwIsReadOwner(PPDMCRITSECTRW pThis, bool fWannaHear)
      * Ask the lock validator.
      * Note! It doesn't know everything, let's deal with that if it becomes an issue...
      */
+    NOREF(fWannaHear);
     return RTLockValidatorRecSharedIsOwner(pThis->s.Core.pValidatorRead, NIL_RTTHREAD);
 #else
     /*
diff --git a/src/VBox/VMM/VMMAll/PDMAllNetShaper.cpp b/src/VBox/VMM/VMMAll/PDMAllNetShaper.cpp
index 7b2bef3..4ee83fc 100644
--- a/src/VBox/VMM/VMMAll/PDMAllNetShaper.cpp
+++ b/src/VBox/VMM/VMMAll/PDMAllNetShaper.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMAll/PDMAllQueue.cpp b/src/VBox/VMM/VMMAll/PDMAllQueue.cpp
index 8c196ca..d1d11d2 100644
--- a/src/VBox/VMM/VMMAll/PDMAllQueue.cpp
+++ b/src/VBox/VMM/VMMAll/PDMAllQueue.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMAll/PGMAll.cpp b/src/VBox/VMM/VMMAll/PGMAll.cpp
index b686798..e5e8ff2 100644
--- a/src/VBox/VMM/VMMAll/PGMAll.cpp
+++ b/src/VBox/VMM/VMMAll/PGMAll.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMAll/PGMAllBth.h b/src/VBox/VMM/VMMAll/PGMAllBth.h
index 525316f..2db679f 100644
--- a/src/VBox/VMM/VMMAll/PGMAllBth.h
+++ b/src/VBox/VMM/VMMAll/PGMAllBth.h
@@ -15,7 +15,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1598,7 +1598,8 @@ DECLINLINE(void) PGM_BTH_NAME(SyncPageWorkerTrackAddref)(PVMCPU pVCpu, PPGMPOOLP
  */
 DECLINLINE(void) PGM_BTH_NAME(SyncHandlerPte)(PVM pVM, PCPGMPAGE pPage, uint64_t fPteSrc, PSHWPTE pPteDst)
 {
-    NOREF(pVM);
+    NOREF(pVM); RT_NOREF_PV(fPteSrc);
+
     /** @todo r=bird: Are we actually handling dirty and access bits for pages with access handlers correctly? No.
      *  Update: \#PF should deal with this before or after calling the handlers. It has all the info to do the job efficiently. */
     if (!PGM_PAGE_HAS_ACTIVE_ALL_HANDLERS(pPage))
@@ -1897,6 +1898,7 @@ static int PGM_BTH_NAME(SyncPage)(PVMCPU pVCpu, GSTPDE PdeSrc, RTGCPTR GCPtrPage
     PVM      pVM   = pVCpu->CTX_SUFF(pVM);
     PPGMPOOL pPool = pVM->pgm.s.CTX_SUFF(pPool); NOREF(pPool);
     LogFlow(("SyncPage: GCPtrPage=%RGv cPages=%u uErr=%#x\n", GCPtrPage, cPages, uErr));
+    RT_NOREF_PV(uErr); RT_NOREF_PV(cPages); RT_NOREF_PV(GCPtrPage);
 
     PGM_LOCK_ASSERT_OWNER(pVM);
 
@@ -2386,6 +2388,7 @@ DECLINLINE(int) PGM_BTH_NAME(CheckPageFaultReturnNP)(PVMCPU pVCpu, uint32_t uErr
         TRPMSetErrorCode(pVCpu, uErr & ~(X86_TRAP_PF_RSVD | X86_TRAP_PF_P));
 
     Log(("CheckPageFault: real page fault (notp) at %RGv (%d)\n", GCPtrPage, uPageFaultLevel));
+    RT_NOREF_PV(GCPtrPage); RT_NOREF_PV(uPageFaultLevel);
     return VINF_EM_RAW_GUEST_TRAP;
 }
 
@@ -2408,6 +2411,7 @@ DECLINLINE(int) PGM_BTH_NAME(CheckPageFaultReturnRSVD)(PVMCPU pVCpu, uint32_t uE
         TRPMSetErrorCode(pVCpu, uErr | X86_TRAP_PF_RSVD | X86_TRAP_PF_P);
 
     Log(("CheckPageFault: real page fault (rsvd) at %RGv (%d)\n", GCPtrPage, uPageFaultLevel));
+    RT_NOREF_PV(GCPtrPage); RT_NOREF_PV(uPageFaultLevel);
     return VINF_EM_RAW_GUEST_TRAP;
 }
 
@@ -2430,6 +2434,7 @@ DECLINLINE(int) PGM_BTH_NAME(CheckPageFaultReturnProt)(PVMCPU pVCpu, uint32_t uE
         TRPMSetErrorCode(pVCpu, (uErr & ~X86_TRAP_PF_RSVD) | X86_TRAP_PF_P);
 
     Log(("CheckPageFault: real page fault (prot) at %RGv (%d)\n", GCPtrPage, uPageFaultLevel));
+    RT_NOREF_PV(GCPtrPage); RT_NOREF_PV(uPageFaultLevel);
     return VINF_EM_RAW_GUEST_TRAP;
 }
 
@@ -2641,7 +2646,7 @@ static int PGM_BTH_NAME(SyncPT)(PVMCPU pVCpu, unsigned iPDSrc, PGSTPD pPDSrc, RT
 #if 0 /* rarely useful; leave for debugging. */
     STAM_COUNTER_INC(&pVCpu->pgm.s.StatSyncPtPD[iPDSrc]);
 #endif
-    LogFlow(("SyncPT: GCPtrPage=%RGv\n", GCPtrPage));
+    LogFlow(("SyncPT: GCPtrPage=%RGv\n", GCPtrPage)); RT_NOREF_PV(GCPtrPage);
 
     PGM_LOCK_ASSERT_OWNER(pVM);
 
@@ -3493,6 +3498,7 @@ PGM_BTH_DECL(int, VerifyAccessSyncPage)(PVMCPU pVCpu, RTGCPTR GCPtrPage, unsigne
     PVM pVM = pVCpu->CTX_SUFF(pVM); NOREF(pVM);
 
     LogFlow(("VerifyAccessSyncPage: GCPtrPage=%RGv fPage=%#x uErr=%#x\n", GCPtrPage, fPage, uErr));
+    RT_NOREF_PV(GCPtrPage); RT_NOREF_PV(fPage); RT_NOREF_PV(uErr);
 
     Assert(!pVM->pgm.s.fNestedPaging);
 #if   (   PGM_GST_TYPE == PGM_TYPE_32BIT \
diff --git a/src/VBox/VMM/VMMAll/PGMAllGst.h b/src/VBox/VMM/VMMAll/PGMAllGst.h
index 66247f8..159dd02 100644
--- a/src/VBox/VMM/VMMAll/PGMAllGst.h
+++ b/src/VBox/VMM/VMMAll/PGMAllGst.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -332,7 +332,7 @@ PGM_GST_DECL(int, GetPage)(PVMCPU pVCpu, RTGCPTR GCPtr, uint64_t *pfFlags, PRTGC
  */
 PGM_GST_DECL(int, ModifyPage)(PVMCPU pVCpu, RTGCPTR GCPtr, size_t cb, uint64_t fFlags, uint64_t fMask)
 {
-    Assert((cb & PAGE_OFFSET_MASK) == 0);
+    Assert((cb & PAGE_OFFSET_MASK) == 0); RT_NOREF_PV(cb);
 
 #if PGM_GST_TYPE == PGM_TYPE_32BIT \
  || PGM_GST_TYPE == PGM_TYPE_PAE \
diff --git a/src/VBox/VMM/VMMAll/PGMAllHandler.cpp b/src/VBox/VMM/VMMAll/PGMAllHandler.cpp
index 82feeba..98efe16 100644
--- a/src/VBox/VMM/VMMAll/PGMAllHandler.cpp
+++ b/src/VBox/VMM/VMMAll/PGMAllHandler.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -419,6 +419,8 @@ static void pgmHandlerPhysicalDeregisterNotifyREM(PVM pVM, PPGMPHYSHANDLER pCur)
     REMR3NotifyHandlerPhysicalDeregister(pVM, pCurType->enmKind, GCPhysStart, GCPhysLast - GCPhysStart + 1,
                                          !!pCurType->pfnHandlerR3, fRestoreAsRAM);
 # endif
+#else
+    RT_NOREF_PV(pCurType);
 #endif
 }
 
diff --git a/src/VBox/VMM/VMMAll/PGMAllMap.cpp b/src/VBox/VMM/VMMAll/PGMAllMap.cpp
index 39b0b2a..c12dbed 100644
--- a/src/VBox/VMM/VMMAll/PGMAllMap.cpp
+++ b/src/VBox/VMM/VMMAll/PGMAllMap.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -669,6 +669,8 @@ VMMDECL(void) PGMMapCheck(PVM pVM)
  */
 int pgmMapActivateCR3(PVM pVM, PPGMPOOLPAGE pShwPageCR3)
 {
+    RT_NOREF_PV(pShwPageCR3);
+
     /*
      * Skip this if it doesn't apply.
      */
diff --git a/src/VBox/VMM/VMMAll/PGMAllPhys.cpp b/src/VBox/VMM/VMMAll/PGMAllPhys.cpp
index a95e30c..60f9914 100644
--- a/src/VBox/VMM/VMMAll/PGMAllPhys.cpp
+++ b/src/VBox/VMM/VMMAll/PGMAllPhys.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -2023,7 +2023,7 @@ VMMDECL(void) PGMPhysReleasePageMappingLock(PVM pVM, PPGMPAGEMAPLOCK pLock)
 {
 #if defined(IN_RC) || defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0)
     Assert(pLock->pvPage != NULL);
-    Assert(pLock->pVCpu == VMMGetCpu(pVM));
+    Assert(pLock->pVCpu == VMMGetCpu(pVM)); RT_NOREF_PV(pVM);
     PGM_DYNMAP_UNUSED_HINT(pLock->pVCpu, pLock->pvPage);
     pLock->pVCpu  = NULL;
     pLock->pvPage = NULL;
@@ -2129,7 +2129,7 @@ int pgmPhysGCPhys2R3Ptr(PVM pVM, RTGCPHYS GCPhys, PRTR3PTR pR3Ptr)
 
     Log(("pgmPhysGCPhys2R3Ptr(,%RGp,): dont use this API!\n", GCPhys)); /** @todo eliminate this API! */
 #if defined(IN_RC) || defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0)
-    NOREF(pVM); NOREF(pR3Ptr);
+    NOREF(pVM); NOREF(pR3Ptr); RT_NOREF_PV(GCPhys);
     AssertFailedReturn(VERR_NOT_IMPLEMENTED);
 #else
     pgmLock(pVM);
diff --git a/src/VBox/VMM/VMMAll/PGMAllPool.cpp b/src/VBox/VMM/VMMAll/PGMAllPool.cpp
index c048d76..0dfb512 100644
--- a/src/VBox/VMM/VMMAll/PGMAllPool.cpp
+++ b/src/VBox/VMM/VMMAll/PGMAllPool.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -44,8 +44,10 @@
 *   Internal Functions                                                                                                           *
 *********************************************************************************************************************************/
 RT_C_DECLS_BEGIN
+#if 0 /* unused */
 DECLINLINE(unsigned) pgmPoolTrackGetShadowEntrySize(PGMPOOLKIND enmKind);
 DECLINLINE(unsigned) pgmPoolTrackGetGuestEntrySize(PGMPOOLKIND enmKind);
+#endif /* unused */
 static void pgmPoolTrackClearPageUsers(PPGMPOOL pPool, PPGMPOOLPAGE pPage);
 static void pgmPoolTrackDeref(PPGMPOOL pPool, PPGMPOOLPAGE pPage);
 static int pgmPoolTrackAddUser(PPGMPOOL pPool, PPGMPOOLPAGE pPage, uint16_t iUser, uint32_t iUserTable);
@@ -65,6 +67,7 @@ void            pgmPoolTrackPhysExtFreeList(PVM pVM, uint16_t iPhysExt);
 RT_C_DECLS_END
 
 
+#if 0 /* unused */
 /**
  * Checks if the specified page pool kind is for a 4MB or 2MB guest page.
  *
@@ -83,6 +86,7 @@ DECLINLINE(bool) pgmPoolIsBigPage(PGMPOOLKIND enmKind)
             return false;
     }
 }
+#endif /* unused */
 
 
 /**
@@ -151,7 +155,7 @@ DECLINLINE(int) pgmPoolPhysSimpleReadGCPhys(PVM pVM, void *pvDst, void const *pv
     memcpy(pvDst, (RTHCPTR)((uintptr_t)pvSrc & ~(RTHCUINTPTR)(cb - 1)), cb);
     return VINF_SUCCESS;
 #else
-    /* @todo in RC we could attempt to use the virtual address, although this can cause many faults (PAE Windows XP guest). */
+    /** @todo in RC we could attempt to use the virtual address, although this can cause many faults (PAE Windows XP guest). */
     NOREF(pvSrc);
     return PGMPhysSimpleReadGCPhys(pVM, pvDst, GCPhysSrc & ~(RTGCPHYS)(cb - 1), cb);
 #endif
@@ -180,7 +184,8 @@ static void pgmPoolMonitorChainChanging(PVMCPU pVCpu, PPGMPOOL pPool, PPGMPOOLPA
     PVM             pVM = pPool->CTX_SUFF(pVM);
     NOREF(pVCpu);
 
-    LogFlow(("pgmPoolMonitorChainChanging: %RGv phys=%RGp cbWrite=%d\n", (RTGCPTR)(CTXTYPE(RTGCPTR, uintptr_t, RTGCPTR))pvAddress, GCPhysFault, cbWrite));
+    LogFlow(("pgmPoolMonitorChainChanging: %RGv phys=%RGp cbWrite=%d\n",
+             (RTGCPTR)(CTXTYPE(RTGCPTR, uintptr_t, RTGCPTR))(uintptr_t)pvAddress, GCPhysFault, cbWrite));
 
     for (;;)
     {
@@ -714,7 +719,7 @@ DECLINLINE(bool) pgmPoolMonitorIsForking(PPGMPOOL pPool, PDISCPUSTATE pDis, unsi
         /** @todo Validate that the bit index is X86_PTE_RW. */
             )
     {
-        STAM_COUNTER_INC(&pPool->CTX_MID_Z(StatMonitor,Fork));
+        STAM_COUNTER_INC(&pPool->CTX_MID_Z(StatMonitor,Fork)); RT_NOREF_PV(pPool);
         return true;
     }
     return false;
@@ -1988,7 +1993,7 @@ void pgmPoolResetDirtyPage(PVM pVM, RTGCPTR GCPtrPage)
     if (!pPool->cDirtyPages)
         return;
 
-    Log(("pgmPoolResetDirtyPage %RGv\n", GCPtrPage));
+    Log(("pgmPoolResetDirtyPage %RGv\n", GCPtrPage)); RT_NOREF_PV(GCPtrPage);
     for (unsigned i = 0; i < RT_ELEMENTS(pPool->aDirtyPages); i++)
     {
     }
@@ -2160,7 +2165,7 @@ static int pgmPoolCacheFreeOne(PPGMPOOL pPool, uint16_t iUser)
      */
     int rc = pgmPoolFlushPage(pPool, pPage);
     /* This flush was initiated by us and not the guest, so explicitly flush the TLB. */
-    /* todo: find out why this is necessary; pgmPoolFlushPage should trigger a flush if one is really needed. */
+    /** @todo find out why this is necessary; pgmPoolFlushPage should trigger a flush if one is really needed. */
     if (rc == VINF_SUCCESS)
         PGM_INVL_ALL_VCPU_TLBS(pVM);
     return rc;
@@ -2912,7 +2917,7 @@ DECLINLINE(int) pgmPoolTrackInsert(PPGMPOOL pPool, PPGMPOOLPAGE pPage, RTGCPHYS
     int rc = VINF_SUCCESS;
     PPGMPOOLUSER paUsers = pPool->CTX_SUFF(paUsers);
 
-    LogFlow(("pgmPoolTrackInsert GCPhys=%RGp iUser=%d iUserTable=%x\n", GCPhys, iUser, iUserTable));
+    LogFlow(("pgmPoolTrackInsert GCPhys=%RGp iUser=%d iUserTable=%x\n", GCPhys, iUser, iUserTable)); RT_NOREF_PV(GCPhys);
 
     if (iUser != NIL_PGMPOOL_IDX)
     {
@@ -3116,6 +3121,7 @@ static void pgmPoolTrackFreeUser(PPGMPOOL pPool, PPGMPOOLPAGE pPage, uint16_t iU
 }
 
 
+#if 0 /* unused */
 /**
  * Gets the entry size of a shadow table.
  *
@@ -3164,8 +3170,9 @@ DECLINLINE(unsigned) pgmPoolTrackGetShadowEntrySize(PGMPOOLKIND enmKind)
             AssertFatalMsgFailed(("enmKind=%d\n", enmKind));
     }
 }
+#endif /* unused */
 
-
+#if 0 /* unused */
 /**
  * Gets the entry size of a guest table.
  *
@@ -3218,6 +3225,7 @@ DECLINLINE(unsigned) pgmPoolTrackGetGuestEntrySize(PGMPOOLKIND enmKind)
             AssertFatalMsgFailed(("enmKind=%d\n", enmKind));
     }
 }
+#endif /* unused */
 
 
 /**
@@ -3850,7 +3858,7 @@ static void pgmPoolTrackClearPageUser(PPGMPOOL pPool, PPGMPOOLPAGE pPage, PCPGMP
 
 
     /* Safety precaution in case we change the paging for other modes too in the future. */
-    Assert(!pgmPoolIsPageLocked(pPage));
+    Assert(!pgmPoolIsPageLocked(pPage)); RT_NOREF_PV(pPage);
 
 #ifdef VBOX_STRICT
     /*
diff --git a/src/VBox/VMM/VMMAll/PGMAllShw.h b/src/VBox/VMM/VMMAll/PGMAllShw.h
index 069038f..bf4b3da 100644
--- a/src/VBox/VMM/VMMAll/PGMAllShw.h
+++ b/src/VBox/VMM/VMMAll/PGMAllShw.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMAll/REMAll.cpp b/src/VBox/VMM/VMMAll/REMAll.cpp
index 8ce68be..f4705f6 100644
--- a/src/VBox/VMM/VMMAll/REMAll.cpp
+++ b/src/VBox/VMM/VMMAll/REMAll.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMAll/SELMAll.cpp b/src/VBox/VMM/VMMAll/SELMAll.cpp
index a708361..483c619 100644
--- a/src/VBox/VMM/VMMAll/SELMAll.cpp
+++ b/src/VBox/VMM/VMMAll/SELMAll.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -63,6 +63,8 @@ selmGuestGDTWriteHandler(PVM pVM, PVMCPU pVCpu, RTGCPTR GCPtr, void *pvPtr, void
     NOREF(pvPtr); NOREF(pvBuf); NOREF(enmOrigin); NOREF(pvUser);
 
 #  ifdef IN_RING3
+    RT_NOREF_PV(pVM);
+
     VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_GDT);
     return VINF_PGM_HANDLER_DO_DEFAULT;
 
@@ -95,7 +97,7 @@ selmGuestLDTWriteHandler(PVM pVM, PVMCPU pVCpu, RTGCPTR GCPtr, void *pvPtr, void
 {
     Assert(enmAccessType == PGMACCESSTYPE_WRITE); NOREF(enmAccessType);
     Log(("selmGuestLDTWriteHandler: write to %RGv size %d\n", GCPtr, cbBuf)); NOREF(GCPtr); NOREF(cbBuf);
-    NOREF(pvPtr); NOREF(pvBuf); NOREF(enmOrigin); NOREF(pvUser);
+    NOREF(pvPtr); NOREF(pvBuf); NOREF(enmOrigin); NOREF(pvUser); RT_NOREF_PV(pVM);
 
     VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_LDT);
 #  ifdef IN_RING3
@@ -121,6 +123,8 @@ selmGuestTSSWriteHandler(PVM pVM, PVMCPU pVCpu, RTGCPTR GCPtr, void *pvPtr, void
     NOREF(pvBuf); NOREF(GCPtr); NOREF(cbBuf); NOREF(enmOrigin); NOREF(pvUser); NOREF(pvPtr);
 
 #  ifdef IN_RING3
+    RT_NOREF_PV(pVM);
+
     /** @todo This can be optimized by checking for the ESP0 offset and tracking TR
      *        reloads in REM (setting VM_FF_SELM_SYNC_TSS if TR is reloaded). We
      *        should probably also deregister the virtual handler if TR.base/size
@@ -585,6 +589,7 @@ static void selLoadHiddenSelectorRegFromGuestTable(PVMCPU pVCpu, PCCPUMCTX pCtx,
                                                    RTGCPTR GCPtrDesc, RTSEL const Sel, uint32_t const iSReg)
 {
     Assert(!HMIsEnabled(pVCpu->CTX_SUFF(pVM)));
+    RT_NOREF_PV(pCtx); RT_NOREF_PV(Sel);
 
     /*
      * Try read the entry.
diff --git a/src/VBox/VMM/VMMAll/TMAll.cpp b/src/VBox/VMM/VMMAll/TMAll.cpp
index 724702d..84dcfef 100644
--- a/src/VBox/VMM/VMMAll/TMAll.cpp
+++ b/src/VBox/VMM/VMMAll/TMAll.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1929,7 +1929,7 @@ VMMDECL(int) TMTimerStop(PTMTIMER pTimer)
                 if (!RTThreadYield())
                     RTThreadSleep(1);
 #else
-/**@todo call host and yield cpu after a while. */
+/** @todo call host and yield cpu after a while. */
 #endif
                 break;
 
diff --git a/src/VBox/VMM/VMMAll/TMAllCpu.cpp b/src/VBox/VMM/VMMAll/TMAllCpu.cpp
index 372db30..f032f72 100644
--- a/src/VBox/VMM/VMMAll/TMAllCpu.cpp
+++ b/src/VBox/VMM/VMMAll/TMAllCpu.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -187,6 +187,7 @@ int tmCpuTickPauseLocked(PVM pVM, PVMCPU pVCpu)
 }
 
 
+#ifdef VBOX_WITH_STATISTICS
 /**
  * Record why we refused to use offsetted TSC.
  *
@@ -221,6 +222,7 @@ DECLINLINE(void) tmCpuTickRecordOffsettedTscRefusal(PVM pVM, PVMCPU pVCpu)
            STAM_COUNTER_INC(&pVM->tm.s.StatTSCWarp);
     }
 }
+#endif /* VBOX_WITH_STATISTICS */
 
 
 /**
@@ -317,6 +319,7 @@ DECLINLINE(uint64_t) tmCpuCalcTicksToDeadline(PVMCPU pVCpu, uint64_t cNsToDeadli
 {
     AssertCompile(TMCLOCK_FREQ_VIRTUAL <= _4G);
 #ifdef IN_RING3
+    RT_NOREF_PV(pVCpu);
     uint64_t uCpuHz = SUPGetCpuHzFromGip(g_pSUPGlobalInfoPage);
 #else
     uint64_t uCpuHz = SUPGetCpuHzFromGipBySetIndex(g_pSUPGlobalInfoPage, pVCpu->iHostCpuSet);
diff --git a/src/VBox/VMM/VMMAll/TMAllReal.cpp b/src/VBox/VMM/VMMAll/TMAllReal.cpp
index 43bb9e2..7d2e73c 100644
--- a/src/VBox/VMM/VMMAll/TMAllReal.cpp
+++ b/src/VBox/VMM/VMMAll/TMAllReal.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMAll/TMAllVirtual.cpp b/src/VBox/VMM/VMMAll/TMAllVirtual.cpp
index 411954b..1791661 100644
--- a/src/VBox/VMM/VMMAll/TMAllVirtual.cpp
+++ b/src/VBox/VMM/VMMAll/TMAllVirtual.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMAll/TRPMAll.cpp b/src/VBox/VMM/VMMAll/TRPMAll.cpp
index 76a5f4f..90f2800 100644
--- a/src/VBox/VMM/VMMAll/TRPMAll.cpp
+++ b/src/VBox/VMM/VMMAll/TRPMAll.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -55,7 +55,7 @@ trpmGuestIDTWriteHandler(PVM pVM, PVMCPU pVCpu, RTGCPTR GCPtr, void *pvPtr, void
 {
     Assert(enmAccessType == PGMACCESSTYPE_WRITE); NOREF(enmAccessType);
     Log(("trpmGuestIDTWriteHandler: write to %RGv size %d\n", GCPtr, cbBuf)); NOREF(GCPtr); NOREF(cbBuf);
-    NOREF(pvPtr); NOREF(pvUser); NOREF(pvBuf); NOREF(enmOrigin); NOREF(pvUser);
+    NOREF(pvPtr); NOREF(pvUser); NOREF(pvBuf); NOREF(enmOrigin); NOREF(pvUser); RT_NOREF_PV(pVM);
     Assert(!HMIsEnabled(pVM));
 
     /** @todo Check which IDT entry and keep the update cost low in TRPMR3SyncIDT() and CSAMCheckGates(). */
diff --git a/src/VBox/VMM/VMMAll/VMAll.cpp b/src/VBox/VMM/VMMAll/VMAll.cpp
index 101c541..fabb784 100644
--- a/src/VBox/VMM/VMMAll/VMAll.cpp
+++ b/src/VBox/VMM/VMMAll/VMAll.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMAll/VMMAll.cpp b/src/VBox/VMM/VMMAll/VMMAll.cpp
index 9999013..eabd99b 100644
--- a/src/VBox/VMM/VMMAll/VMMAll.cpp
+++ b/src/VBox/VMM/VMMAll/VMMAll.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -459,6 +459,8 @@ VMM_INT_DECL(void) VMMHypercallsEnable(PVMCPU pVCpu)
 #ifndef IN_RC
     if (HMIsEnabled(pVCpu->CTX_SUFF(pVM)))
         HMHypercallsEnable(pVCpu);
+#else
+    RT_NOREF_PV(pVCpu);
 #endif
 }
 
@@ -474,6 +476,8 @@ VMM_INT_DECL(void) VMMHypercallsDisable(PVMCPU pVCpu)
 #ifndef IN_RC
     if (HMIsEnabled(pVCpu->CTX_SUFF(pVM)))
         HMHypercallsDisable(pVCpu);
+#else
+    RT_NOREF_PV(pVCpu);
 #endif
 }
 
diff --git a/src/VBox/VMM/VMMAll/VMMAllA.asm b/src/VBox/VMM/VMMAll/VMMAllA.asm
index 38b4219..c295f41 100644
--- a/src/VBox/VMM/VMMAll/VMMAllA.asm
+++ b/src/VBox/VMM/VMMAll/VMMAllA.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2009-2015 Oracle Corporation
+; Copyright (C) 2009-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR0/CPUMR0.cpp b/src/VBox/VMM/VMMR0/CPUMR0.cpp
index 6dd6322..cc9673c 100644
--- a/src/VBox/VMM/VMMR0/CPUMR0.cpp
+++ b/src/VBox/VMM/VMMR0/CPUMR0.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR0/GIMR0.cpp b/src/VBox/VMM/VMMR0/GIMR0.cpp
index 12cf429..6aa89b0 100644
--- a/src/VBox/VMM/VMMR0/GIMR0.cpp
+++ b/src/VBox/VMM/VMMR0/GIMR0.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR0/GIMR0Hv.cpp b/src/VBox/VMM/VMMR0/GIMR0Hv.cpp
index add4a8e..ed52222 100644
--- a/src/VBox/VMM/VMMR0/GIMR0Hv.cpp
+++ b/src/VBox/VMM/VMMR0/GIMR0Hv.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR0/GIMR0Kvm.cpp b/src/VBox/VMM/VMMR0/GIMR0Kvm.cpp
index a460fe7..d763439 100644
--- a/src/VBox/VMM/VMMR0/GIMR0Kvm.cpp
+++ b/src/VBox/VMM/VMMR0/GIMR0Kvm.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR0/GMMR0.cpp b/src/VBox/VMM/VMMR0/GMMR0.cpp
index c3221a7..5c72aca 100644
--- a/src/VBox/VMM/VMMR0/GMMR0.cpp
+++ b/src/VBox/VMM/VMMR0/GMMR0.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1849,6 +1849,7 @@ DECLINLINE(PGMMPAGE) gmmR0GetPage(PGMM pGMM, uint32_t idPage)
 }
 
 
+#if 0 /* unused */
 /**
  * Gets the host physical address for a page given by it's ID.
  *
@@ -1863,6 +1864,7 @@ DECLINLINE(RTHCPHYS) gmmR0GetPageHCPhys(PGMM pGMM,  uint32_t idPage)
         return RTR0MemObjGetPagePhysAddr(pChunk->hMemObj, idPage & GMM_PAGEID_IDX_MASK);
     return NIL_RTHCPHYS;
 }
+#endif /* unused */
 
 
 /**
diff --git a/src/VBox/VMM/VMMR0/GMMR0Internal.h b/src/VBox/VMM/VMMR0/GMMR0Internal.h
index 24106ec..200459d 100644
--- a/src/VBox/VMM/VMMR0/GMMR0Internal.h
+++ b/src/VBox/VMM/VMMR0/GMMR0Internal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR0/GVMMR0.cpp b/src/VBox/VMM/VMMR0/GVMMR0.cpp
index 92ce8db..c3daa4a 100644
--- a/src/VBox/VMM/VMMR0/GVMMR0.cpp
+++ b/src/VBox/VMM/VMMR0/GVMMR0.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR0/GVMMR0Internal.h b/src/VBox/VMM/VMMR0/GVMMR0Internal.h
index b205a5b..e8fa4f1 100644
--- a/src/VBox/VMM/VMMR0/GVMMR0Internal.h
+++ b/src/VBox/VMM/VMMR0/GVMMR0Internal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR0/HMR0.cpp b/src/VBox/VMM/VMMR0/HMR0.cpp
index 1b5920f..bc970be 100644
--- a/src/VBox/VMM/VMMR0/HMR0.cpp
+++ b/src/VBox/VMM/VMMR0/HMR0.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -216,6 +216,7 @@ static int hmR0FirstRcGetStatus(PHMR0FIRSTRC pFirstRc)
 
 
 #ifdef VBOX_STRICT
+# ifndef DEBUG_bird
 /**
  * Get the CPU ID on which the failure status code was reported.
  *
@@ -226,6 +227,7 @@ static RTCPUID hmR0FirstRcGetCpuId(PHMR0FIRSTRC pFirstRc)
 {
     return pFirstRc->idCpu;
 }
+# endif
 #endif /* VBOX_STRICT */
 
 
diff --git a/src/VBox/VMM/VMMR0/HMR0A.asm b/src/VBox/VMM/VMMR0/HMR0A.asm
index c4d40f3..2525e9d 100644
--- a/src/VBox/VMM/VMMR0/HMR0A.asm
+++ b/src/VBox/VMM/VMMR0/HMR0A.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR0/HMSVMR0.cpp b/src/VBox/VMM/VMMR0/HMSVMR0.cpp
index 477dae3..ffed5d9 100644
--- a/src/VBox/VMM/VMMR0/HMSVMR0.cpp
+++ b/src/VBox/VMM/VMMR0/HMSVMR0.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -271,7 +271,7 @@ typedef int FNSVMEXITHANDLER(PVMCPU pVCpu, PCPUMCTX pCtx, PSVMTRANSIENT pSvmTran
 *********************************************************************************************************************************/
 static void hmR0SvmSetMsrPermission(PVMCPU pVCpu, unsigned uMsr, SVMMSREXITREAD enmRead, SVMMSREXITWRITE enmWrite);
 static void hmR0SvmPendingEventToTrpmTrap(PVMCPU pVCpu);
-static void hmR0SvmLeave(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx);
+static void hmR0SvmLeave(PVMCPU pVCpu);
 
 /** @name \#VMEXIT handlers.
  * @{
@@ -1758,15 +1758,12 @@ VMMR0DECL(void) SVMR0ThreadCtxCallback(RTTHREADCTXEVENT enmEvent, PVMCPU pVCpu,
             Assert(VMMR0ThreadCtxHookIsEnabled(pVCpu));
             VMCPU_ASSERT_EMT(pVCpu);
 
-            PVM         pVM  = pVCpu->CTX_SUFF(pVM);
-            PCPUMCTX    pCtx = CPUMQueryGuestCtxPtr(pVCpu);
-
             /* No longjmps (log-flush, locks) in this fragile context. */
             VMMRZCallRing3Disable(pVCpu);
 
             if (!pVCpu->hm.s.fLeaveDone)
             {
-                hmR0SvmLeave(pVM, pVCpu, pCtx);
+                hmR0SvmLeave(pVCpu);
                 pVCpu->hm.s.fLeaveDone = true;
             }
 
@@ -2079,13 +2076,11 @@ static void hmR0SvmSaveGuestState(PVMCPU pVCpu, PCPUMCTX pMixedCtx)
  * Does the necessary state syncing before returning to ring-3 for any reason
  * (longjmp, preemption, voluntary exits to ring-3) from AMD-V.
  *
- * @param   pVM         The cross context VM structure.
  * @param   pVCpu       The cross context virtual CPU structure.
- * @param   pCtx        Pointer to the guest-CPU context.
  *
  * @remarks No-long-jmp zone!!!
  */
-static void hmR0SvmLeave(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx)
+static void hmR0SvmLeave(PVMCPU pVCpu)
 {
     Assert(!RTThreadPreemptIsEnabled(NIL_RTTHREAD));
     Assert(!VMMRZCallRing3IsEnabled(pVCpu));
@@ -2131,11 +2126,9 @@ static void hmR0SvmLeave(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx)
  * Leaves the AMD-V session.
  *
  * @returns VBox status code.
- * @param   pVM         The cross context VM structure.
  * @param   pVCpu       The cross context virtual CPU structure.
- * @param   pCtx        Pointer to the guest-CPU context.
  */
-static int hmR0SvmLeaveSession(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx)
+static int hmR0SvmLeaveSession(PVMCPU pVCpu)
 {
     HM_DISABLE_PREEMPT();
     Assert(!VMMRZCallRing3IsEnabled(pVCpu));
@@ -2145,7 +2138,7 @@ static int hmR0SvmLeaveSession(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx)
        and done this from the SVMR0ThreadCtxCallback(). */
     if (!pVCpu->hm.s.fLeaveDone)
     {
-        hmR0SvmLeave(pVM, pVCpu, pCtx);
+        hmR0SvmLeave(pVCpu);
         pVCpu->hm.s.fLeaveDone = true;
     }
 
@@ -2170,15 +2163,13 @@ static int hmR0SvmLeaveSession(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx)
  * Does the necessary state syncing before doing a longjmp to ring-3.
  *
  * @returns VBox status code.
- * @param   pVM         The cross context VM structure.
  * @param   pVCpu       The cross context virtual CPU structure.
- * @param   pCtx        Pointer to the guest-CPU context.
  *
  * @remarks No-long-jmp zone!!!
  */
-static int hmR0SvmLongJmpToRing3(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx)
+static int hmR0SvmLongJmpToRing3(PVMCPU pVCpu)
 {
-    return hmR0SvmLeaveSession(pVM, pVCpu, pCtx);
+    return hmR0SvmLeaveSession(pVCpu);
 }
 
 
@@ -2194,6 +2185,8 @@ static int hmR0SvmLongJmpToRing3(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx)
  */
 static DECLCALLBACK(int) hmR0SvmCallRing3Callback(PVMCPU pVCpu, VMMCALLRING3 enmOperation, void *pvUser)
 {
+    RT_NOREF_PV(pvUser);
+
     if (enmOperation == VMMCALLRING3_VM_R0_ASSERTION)
     {
         /*
@@ -2231,7 +2224,7 @@ static DECLCALLBACK(int) hmR0SvmCallRing3Callback(PVMCPU pVCpu, VMMCALLRING3 enm
     Assert(VMMR0IsLogFlushDisabled(pVCpu));
 
     Log4(("hmR0SvmCallRing3Callback->hmR0SvmLongJmpToRing3\n"));
-    int rc = hmR0SvmLongJmpToRing3(pVCpu->CTX_SUFF(pVM), pVCpu, (PCPUMCTX)pvUser);
+    int rc = hmR0SvmLongJmpToRing3(pVCpu);
     AssertRCReturn(rc, rc);
 
     VMMRZCallRing3Enable(pVCpu);
@@ -2276,7 +2269,7 @@ static void hmR0SvmExitToRing3(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, int rcExit)
     AssertMsg(rcExit != VINF_EM_RAW_EMULATE_INSTR     || !TRPMHasTrap(pVCpu), ("rcExit=%Rrc\n", rcExit));
 
     /* Sync. the necessary state for going back to ring-3. */
-    hmR0SvmLeaveSession(pVM, pVCpu, pCtx);
+    hmR0SvmLeaveSession(pVCpu);
     STAM_COUNTER_DEC(&pVCpu->hm.s.StatSwitchLongJmpToR3);
 
     VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_TO_R3);
@@ -3753,7 +3746,7 @@ DECLINLINE(int) hmR0SvmHandleExit(PVMCPU pVCpu, PCPUMCTX pCtx, PSVMTRANSIENT pSv
             }
         }
     }
-    return VERR_INTERNAL_ERROR_5;   /* Should never happen. */
+    /* not reached */
 }
 
 
diff --git a/src/VBox/VMM/VMMR0/HMSVMR0.h b/src/VBox/VMM/VMMR0/HMSVMR0.h
index ba80814..f344b1e 100644
--- a/src/VBox/VMM/VMMR0/HMSVMR0.h
+++ b/src/VBox/VMM/VMMR0/HMSVMR0.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR0/HMVMXR0.cpp b/src/VBox/VMM/VMMR0/HMVMXR0.cpp
index b6dde8c..dbd520a 100644
--- a/src/VBox/VMM/VMMR0/HMVMXR0.cpp
+++ b/src/VBox/VMM/VMMR0/HMVMXR0.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -597,6 +597,7 @@ DECLINLINE(int) hmR0VmxReadEntryIntInfoVmcs(PVMXTRANSIENT pVmxTransient)
 }
 
 
+#ifdef VBOX_STRICT
 /**
  * Reads the VM-entry exception error code field from the VMCS into
  * the VMX transient structure.
@@ -612,8 +613,10 @@ DECLINLINE(int) hmR0VmxReadEntryXcptErrorCodeVmcs(PVMXTRANSIENT pVmxTransient)
     AssertRCReturn(rc, rc);
     return VINF_SUCCESS;
 }
+#endif /* VBOX_STRICT */
 
 
+#ifdef VBOX_STRICT
 /**
  * Reads the VM-entry exception error code field from the VMCS into
  * the VMX transient structure.
@@ -629,6 +632,7 @@ DECLINLINE(int) hmR0VmxReadEntryInstrLenVmcs(PVMXTRANSIENT pVmxTransient)
     AssertRCReturn(rc, rc);
     return VINF_SUCCESS;
 }
+#endif /* VBOX_STRICT */
 
 
 /**
@@ -794,7 +798,7 @@ static int hmR0VmxEnterRootMode(PVM pVM, RTHCPHYS HCPhysCpuPage, void *pvCpuPage
     RTCCUINTREG fEFlags = ASMIntDisableFlags();
 
     /* Enable the VMX bit in CR4 if necessary. */
-    RTCCUINTREG uOldCr4 = SUPR0ChangeCR4(X86_CR4_VMXE, ~0);
+    RTCCUINTREG uOldCr4 = SUPR0ChangeCR4(X86_CR4_VMXE, RTCCUINTREG_MAX);
 
     /* Enter VMX root mode. */
     int rc = VMXEnable(HCPhysCpuPage);
@@ -1512,6 +1516,8 @@ static bool hmR0VmxIsLazyGuestMsr(PVMCPU pVCpu, uint32_t uMsr)
                 return true;
         }
     }
+#else
+    RT_NOREF(pVCpu, uMsr);
 #endif
     return false;
 }
@@ -1543,6 +1549,8 @@ static void hmR0VmxLazySaveGuestMsrs(PVMCPU pVCpu, PCPUMCTX pMixedCtx)
             pMixedCtx->msrSFMASK       = ASMRdMsr(MSR_K8_SF_MASK);
             pMixedCtx->msrKERNELGSBASE = ASMRdMsr(MSR_K8_KERNEL_GS_BASE);
         }
+#else
+        NOREF(pMixedCtx);
 #endif
     }
 }
@@ -1587,6 +1595,8 @@ static void hmR0VmxLazyLoadGuestMsrs(PVMCPU pVCpu, PCPUMCTX pMixedCtx)
             VMXLOCAL_LAZY_LOAD_GUEST_MSR(MSR_K8_SF_MASK, SFMASK, SFMask);
             VMXLOCAL_LAZY_LOAD_GUEST_MSR(MSR_K8_KERNEL_GS_BASE, KERNELGSBASE, KernelGSBase);
         }
+#else
+        RT_NOREF(pMixedCtx);
 #endif
         pVCpu->hm.s.vmx.fLazyMsrs |= VMX_LAZY_MSRS_LOADED_GUEST;
     }
@@ -2920,6 +2930,8 @@ DECLINLINE(int) hmR0VmxSaveHostSegmentRegs(PVM pVM, PVMCPU pVCpu)
         VMXRestoreHostState(pVCpu->hm.s.vmx.fRestoreHostFlags, &pVCpu->hm.s.vmx.RestoreHost);
     }
     pVCpu->hm.s.vmx.fRestoreHostFlags = 0;
+#else
+    RT_NOREF(pVCpu);
 #endif
 
     /*
@@ -3381,7 +3393,7 @@ DECLINLINE(int) hmR0VmxLoadGuestExitCtls(PVMCPU pVCpu, PCPUMCTX pMixedCtx)
 DECLINLINE(int) hmR0VmxApicSetTprThreshold(PVMCPU pVCpu, uint32_t u32TprThreshold)
 {
     Assert(!(u32TprThreshold & 0xfffffff0));         /* Bits 31:4 MBZ. */
-    Assert(pVCpu->hm.s.vmx.u32ProcCtls & VMX_VMCS_CTRL_PROC_EXEC_USE_TPR_SHADOW);
+    Assert(pVCpu->hm.s.vmx.u32ProcCtls & VMX_VMCS_CTRL_PROC_EXEC_USE_TPR_SHADOW); RT_NOREF_PV(pVCpu);
     return VMXWriteVmcs32(VMX_VMCS32_CTRL_TPR_THRESHOLD, u32TprThreshold);
 }
 
@@ -4832,14 +4844,13 @@ static int hmR0VmxLoadGuestActivityState(PVMCPU pVCpu, PCPUMCTX pMixedCtx)
  * fields.  See @bugref{8432} for details.
  *
  * @returns true if safe, false if must continue to use the 64-bit switcher.
- * @param   pVCpu       The cross context virtual CPU structure.
  * @param   pMixedCtx   Pointer to the guest-CPU context. The data may be
  *                      out-of-sync. Make sure to update the required fields
  *                      before using them.
  *
  * @remarks No-long-jump zone!!!
  */
-static bool hmR0VmxIs32BitSwitcherSafe(PVMCPU pVCpu, PCPUMCTX pMixedCtx)
+static bool hmR0VmxIs32BitSwitcherSafe(PCPUMCTX pMixedCtx)
 {
     if (pMixedCtx->gdtr.pGdt    & UINT64_C(0xffffffff00000000))
         return false;
@@ -4939,7 +4950,7 @@ static int hmR0VmxSetupVMRunHandler(PVMCPU pVCpu, PCPUMCTX pMixedCtx)
         {
             Assert(pVCpu->hm.s.vmx.pfnStartVM == VMXR0SwitcherStartVM64);
             if (   pVCpu->hm.s.vmx.RealMode.fRealOnV86Active
-                || hmR0VmxIs32BitSwitcherSafe(pVCpu, pMixedCtx))
+                || hmR0VmxIs32BitSwitcherSafe(pMixedCtx))
             {
                 pVCpu->hm.s.vmx.fSwitchedTo64on32 = false;
                 pVCpu->hm.s.vmx.pfnStartVM = VMXR0StartVM32;
@@ -5314,7 +5325,7 @@ VMMR0DECL(int) VMXR0Execute64BitsHandler(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, H
 
     /** @todo replace with hmR0VmxEnterRootMode() and hmR0VmxLeaveRootMode(). */
     /* Make sure the VMX instructions don't cause #UD faults. */
-    SUPR0ChangeCR4(X86_CR4_VMXE, ~0);
+    SUPR0ChangeCR4(X86_CR4_VMXE, RTCCUINTREG_MAX);
 
     /* Re-enter VMX Root Mode */
     int rc2 = VMXEnable(HCPhysCpuPage);
@@ -7095,7 +7106,6 @@ static void hmR0VmxPendingEventToTrpmTrap(PVMCPU pVCpu)
  * (longjmp, preemption, voluntary exits to ring-3) from VT-x.
  *
  * @returns VBox status code.
- * @param   pVM                 The cross context VM structure.
  * @param   pVCpu               The cross context virtual CPU structure.
  * @param   pMixedCtx           Pointer to the guest-CPU context. The data may
  *                              be out-of-sync. Make sure to update the required
@@ -7104,7 +7114,7 @@ static void hmR0VmxPendingEventToTrpmTrap(PVMCPU pVCpu)
  *
  * @remarks No-long-jmp zone!!!
  */
-static int hmR0VmxLeave(PVM pVM, PVMCPU pVCpu, PCPUMCTX pMixedCtx, bool fSaveGuestState)
+static int hmR0VmxLeave(PVMCPU pVCpu, PCPUMCTX pMixedCtx, bool fSaveGuestState)
 {
     Assert(!RTThreadPreemptIsEnabled(NIL_RTTHREAD));
     Assert(!VMMRZCallRing3IsEnabled(pVCpu));
@@ -7211,7 +7221,6 @@ static int hmR0VmxLeave(PVM pVM, PVMCPU pVCpu, PCPUMCTX pMixedCtx, bool fSaveGue
  * Leaves the VT-x session.
  *
  * @returns VBox status code.
- * @param   pVM         The cross context VM structure.
  * @param   pVCpu       The cross context virtual CPU structure.
  * @param   pMixedCtx   Pointer to the guest-CPU context. The data may be
  *                      out-of-sync. Make sure to update the required fields
@@ -7219,7 +7228,7 @@ static int hmR0VmxLeave(PVM pVM, PVMCPU pVCpu, PCPUMCTX pMixedCtx, bool fSaveGue
  *
  * @remarks No-long-jmp zone!!!
  */
-DECLINLINE(int) hmR0VmxLeaveSession(PVM pVM, PVMCPU pVCpu, PCPUMCTX pMixedCtx)
+DECLINLINE(int) hmR0VmxLeaveSession(PVMCPU pVCpu, PCPUMCTX pMixedCtx)
 {
     HM_DISABLE_PREEMPT();
     HMVMX_ASSERT_CPU_SAFE();
@@ -7230,7 +7239,7 @@ DECLINLINE(int) hmR0VmxLeaveSession(PVM pVM, PVMCPU pVCpu, PCPUMCTX pMixedCtx)
        and done this from the VMXR0ThreadCtxCallback(). */
     if (!pVCpu->hm.s.fLeaveDone)
     {
-        int rc2 = hmR0VmxLeave(pVM, pVCpu, pMixedCtx, true /* fSaveGuestState */);
+        int rc2 = hmR0VmxLeave(pVCpu, pMixedCtx, true /* fSaveGuestState */);
         AssertRCReturnStmt(rc2, HM_RESTORE_PREEMPT(), rc2);
         pVCpu->hm.s.fLeaveDone = true;
     }
@@ -7259,7 +7268,6 @@ DECLINLINE(int) hmR0VmxLeaveSession(PVM pVM, PVMCPU pVCpu, PCPUMCTX pMixedCtx)
  * Does the necessary state syncing before doing a longjmp to ring-3.
  *
  * @returns VBox status code.
- * @param   pVM         The cross context VM structure.
  * @param   pVCpu       The cross context virtual CPU structure.
  * @param   pMixedCtx   Pointer to the guest-CPU context. The data may be
  *                      out-of-sync. Make sure to update the required fields
@@ -7267,9 +7275,9 @@ DECLINLINE(int) hmR0VmxLeaveSession(PVM pVM, PVMCPU pVCpu, PCPUMCTX pMixedCtx)
  *
  * @remarks No-long-jmp zone!!!
  */
-DECLINLINE(int) hmR0VmxLongJmpToRing3(PVM pVM, PVMCPU pVCpu, PCPUMCTX pMixedCtx)
+DECLINLINE(int) hmR0VmxLongJmpToRing3(PVMCPU pVCpu, PCPUMCTX pMixedCtx)
 {
-    return hmR0VmxLeaveSession(pVM, pVCpu, pMixedCtx);
+    return hmR0VmxLeaveSession(pVCpu, pMixedCtx);
 }
 
 
@@ -7327,7 +7335,7 @@ static int hmR0VmxExitToRing3(PVM pVM, PVMCPU pVCpu, PCPUMCTX pMixedCtx, VBOXSTR
 #endif
 
     /* Save guest state and restore host state bits. */
-    int rc = hmR0VmxLeaveSession(pVM, pVCpu, pMixedCtx);
+    int rc = hmR0VmxLeaveSession(pVCpu, pMixedCtx);
     AssertRCReturn(rc, rc);
     STAM_COUNTER_DEC(&pVCpu->hm.s.StatSwitchLongJmpToR3);
     /* Thread-context hooks are unregistered at this point!!! */
@@ -7429,7 +7437,7 @@ static DECLCALLBACK(int) hmR0VmxCallRing3Callback(PVMCPU pVCpu, VMMCALLRING3 enm
     Log4(("hmR0VmxCallRing3Callback->hmR0VmxLongJmpToRing3 pVCpu=%p idCpu=%RU32 enmOperation=%d\n", pVCpu, pVCpu->idCpu,
           enmOperation));
 
-    int rc = hmR0VmxLongJmpToRing3(pVCpu->CTX_SUFF(pVM), pVCpu, (PCPUMCTX)pvUser);
+    int rc = hmR0VmxLongJmpToRing3(pVCpu, (PCPUMCTX)pvUser);
     AssertRCReturn(rc, rc);
 
     VMMRZCallRing3Enable(pVCpu);
@@ -7840,6 +7848,7 @@ DECLINLINE(VBOXSTRICTRC) hmR0VmxInjectXcptGP(PVMCPU pVCpu, PCPUMCTX pMixedCtx, b
 }
 
 
+#if 0 /* unused */
 /**
  * Sets a general-protection (\#GP) exception as pending-for-injection into the
  * VM.
@@ -7858,6 +7867,7 @@ DECLINLINE(void) hmR0VmxSetPendingXcptGP(PVMCPU pVCpu, PCPUMCTX pMixedCtx, uint3
     u32IntInfo          |= VMX_EXIT_INTERRUPTION_INFO_ERROR_CODE_VALID;
     hmR0VmxSetPendingEvent(pVCpu, u32IntInfo, 0 /* cbInstr */, u32ErrorCode, 0 /* GCPtrFaultAddress */);
 }
+#endif /* unused */
 
 
 /**
@@ -8209,7 +8219,6 @@ VMMR0DECL(void) VMXR0ThreadCtxCallback(RTTHREADCTXEVENT enmEvent, PVMCPU pVCpu,
             Assert(VMMR0ThreadCtxHookIsEnabled(pVCpu));
             VMCPU_ASSERT_EMT(pVCpu);
 
-            PVM      pVM       = pVCpu->CTX_SUFF(pVM);
             PCPUMCTX pMixedCtx = CPUMQueryGuestCtxPtr(pVCpu);
 
             /* No longjmps (logger flushes, locks) in this fragile context. */
@@ -8223,7 +8232,7 @@ VMMR0DECL(void) VMXR0ThreadCtxCallback(RTTHREADCTXEVENT enmEvent, PVMCPU pVCpu,
             {
                 /* Do -not- save guest-state here as we might already be in the middle of saving it (esp. bad if we are
                    holding the PGM lock while saving the guest state (see hmR0VmxSaveGuestControlRegs()). */
-                hmR0VmxLeave(pVM, pVCpu, pMixedCtx, false /* fSaveGuestState */);
+                hmR0VmxLeave(pVCpu, pMixedCtx, false /* fSaveGuestState */);
                 pVCpu->hm.s.fLeaveDone = true;
             }
 
@@ -13027,6 +13036,7 @@ static int hmR0VmxExitXcptBP(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVm
  */
 static int hmR0VmxExitXcptAC(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)
 {
+    RT_NOREF_PV(pMixedCtx);
     HMVMX_VALIDATE_EXIT_XCPT_HANDLER_PARAMS();
 
     /*
@@ -13297,12 +13307,12 @@ static int hmR0VmxExitXcptGP(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVm
                 /* Get the stack pointer & pop the contents of the stack onto Eflags. */
                 RTGCPTR   GCPtrStack = 0;
                 X86EFLAGS Eflags;
+                Eflags.u32 = 0;
                 rc = SELMToFlatEx(pVCpu, DISSELREG_SS, CPUMCTX2CORE(pMixedCtx), pMixedCtx->esp & uMask, SELMTOFLAT_FLAGS_CPL0,
                                   &GCPtrStack);
                 if (RT_SUCCESS(rc))
                 {
                     Assert(sizeof(Eflags.u32) >= cbParm);
-                    Eflags.u32 = 0;
                     rc = VBOXSTRICTRC_TODO(PGMPhysRead(pVM, (RTGCPHYS)GCPtrStack, &Eflags.u32, cbParm, PGMACCESSORIGIN_HM));
                     AssertMsg(rc == VINF_SUCCESS, ("%Rrc\n", rc)); /** @todo allow strict return codes here */
                 }
@@ -13484,6 +13494,7 @@ static int hmR0VmxExitXcptGP(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVm
  */
 static int hmR0VmxExitXcptGeneric(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)
 {
+    RT_NOREF_PV(pMixedCtx);
     HMVMX_VALIDATE_EXIT_XCPT_HANDLER_PARAMS();
 #ifndef HMVMX_ALWAYS_TRAP_ALL_XCPTS
     Assert(pVCpu->hm.s.fUsingDebugLoop);
diff --git a/src/VBox/VMM/VMMR0/HMVMXR0.h b/src/VBox/VMM/VMMR0/HMVMXR0.h
index 7ad4269..400b682 100644
--- a/src/VBox/VMM/VMMR0/HMVMXR0.h
+++ b/src/VBox/VMM/VMMR0/HMVMXR0.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR0/PDMR0Device.cpp b/src/VBox/VMM/VMMR0/PDMR0Device.cpp
index 1a8b787..1d0a882 100644
--- a/src/VBox/VMM/VMMR0/PDMR0Device.cpp
+++ b/src/VBox/VMM/VMMR0/PDMR0Device.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -587,16 +587,16 @@ static DECLCALLBACK(void) pdmR0ApicHlp_ClearInterruptFF(PPDMDEVINS pDevIns, PDMA
     /* Note: NMI/SMI can't be cleared. */
     switch (enmType)
     {
-        case PDMAPICIRQ_UPDATE_PENDING:
-            VMCPU_ASSERT_EMT_OR_NOT_RUNNING(pVCpu);
-            VMCPU_FF_CLEAR(pVCpu, PDMAPICIRQ_UPDATE_PENDING);
-            break;
         case PDMAPICIRQ_HARDWARE:
             VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_INTERRUPT_APIC);
             break;
         case PDMAPICIRQ_EXTINT:
             VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_INTERRUPT_PIC);
             break;
+        case PDMAPICIRQ_UPDATE_PENDING:
+            VMCPU_ASSERT_EMT_OR_NOT_RUNNING(pVCpu);
+            VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_UPDATE_APIC);
+            break;
         default:
             AssertMsgFailed(("enmType=%d\n", enmType));
             break;
diff --git a/src/VBox/VMM/VMMR0/PDMR0Driver.cpp b/src/VBox/VMM/VMMR0/PDMR0Driver.cpp
index 04095e0..9dccdcd 100644
--- a/src/VBox/VMM/VMMR0/PDMR0Driver.cpp
+++ b/src/VBox/VMM/VMMR0/PDMR0Driver.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR0/PGMR0.cpp b/src/VBox/VMM/VMMR0/PGMR0.cpp
index 11a0e31..d885767 100644
--- a/src/VBox/VMM/VMMR0/PGMR0.cpp
+++ b/src/VBox/VMM/VMMR0/PGMR0.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -276,7 +276,7 @@ VMMR0_INT_DECL(int) GPciRawR0GuestPageAssign(PGVM pGVM, RTGCPHYS GCPhys, RTHCPHY
     AssertReturn(!(HCPhys & PAGE_OFFSET_MASK), VERR_INTERNAL_ERROR_3);
 
     if (pGVM->rawpci.s.pfnContigMemInfo)
-        /** @todo: what do we do on failure? */
+        /** @todo what do we do on failure? */
         pGVM->rawpci.s.pfnContigMemInfo(&pGVM->rawpci.s, HCPhys, GCPhys, PAGE_SIZE, PCIRAW_MEMINFO_MAP);
 
     return VINF_SUCCESS;
@@ -300,7 +300,7 @@ VMMR0_INT_DECL(int) GPciRawR0GuestPageUnassign(PGVM pGVM, RTGCPHYS GCPhys)
     AssertReturn(!(GCPhys & PAGE_OFFSET_MASK), VERR_INTERNAL_ERROR_3);
 
     if (pGVM->rawpci.s.pfnContigMemInfo)
-        /** @todo: what do we do on failure? */
+        /** @todo what do we do on failure? */
         pGVM->rawpci.s.pfnContigMemInfo(&pGVM->rawpci.s, 0, GCPhys, PAGE_SIZE, PCIRAW_MEMINFO_UNMAP);
 
     return VINF_SUCCESS;
diff --git a/src/VBox/VMM/VMMR0/PGMR0Bth.h b/src/VBox/VMM/VMMR0/PGMR0Bth.h
index 648e1fc..e4be2ff 100644
--- a/src/VBox/VMM/VMMR0/PGMR0Bth.h
+++ b/src/VBox/VMM/VMMR0/PGMR0Bth.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR0/PGMR0SharedPage.cpp b/src/VBox/VMM/VMMR0/PGMR0SharedPage.cpp
index 0013cb1..47f6741 100644
--- a/src/VBox/VMM/VMMR0/PGMR0SharedPage.cpp
+++ b/src/VBox/VMM/VMMR0/PGMR0SharedPage.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR0/TRPMR0.cpp b/src/VBox/VMM/VMMR0/TRPMR0.cpp
index 757455e..40ef1f3 100644
--- a/src/VBox/VMM/VMMR0/TRPMR0.cpp
+++ b/src/VBox/VMM/VMMR0/TRPMR0.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR0/TRPMR0A.asm b/src/VBox/VMM/VMMR0/TRPMR0A.asm
index cefbafc..5764159 100644
--- a/src/VBox/VMM/VMMR0/TRPMR0A.asm
+++ b/src/VBox/VMM/VMMR0/TRPMR0A.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR0/VMMR0.cpp b/src/VBox/VMM/VMMR0/VMMR0.cpp
index 9fc17c3..00089f7 100644
--- a/src/VBox/VMM/VMMR0/VMMR0.cpp
+++ b/src/VBox/VMM/VMMR0/VMMR0.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1709,7 +1709,7 @@ static int vmmR0EntryExWorker(PVM pVM, VMCPUID idCpu, VMMR0OPERATION enmOperatio
 
 # ifdef DEBUG_sandervl
             /* Make sure that log flushes can jump back to ring-3; annoying to get an incomplete log (this is risky though as the code doesn't take this into account). */
-            /* Todo: this can have bad side effects for unexpected jumps back to r3. */
+            /** @todo this can have bad side effects for unexpected jumps back to r3. */
             rc = GMMR0CheckSharedModulesStart(pVM);
             if (rc == VINF_SUCCESS)
             {
diff --git a/src/VBox/VMM/VMMR0/VMMR0.def b/src/VBox/VMM/VMMR0/VMMR0.def
index 255468b..7ec1bfe 100644
--- a/src/VBox/VMM/VMMR0/VMMR0.def
+++ b/src/VBox/VMM/VMMR0/VMMR0.def
@@ -3,7 +3,7 @@
 ; VMM Ring 0 DLL - Definition file.
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR0/VMMR0JmpA-amd64.asm b/src/VBox/VMM/VMMR0/VMMR0JmpA-amd64.asm
index 64fd887..8bc31c4 100644
--- a/src/VBox/VMM/VMMR0/VMMR0JmpA-amd64.asm
+++ b/src/VBox/VMM/VMMR0/VMMR0JmpA-amd64.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR0/VMMR0JmpA-x86.asm b/src/VBox/VMM/VMMR0/VMMR0JmpA-x86.asm
index 0bbf874..ef43e16 100644
--- a/src/VBox/VMM/VMMR0/VMMR0JmpA-x86.asm
+++ b/src/VBox/VMM/VMMR0/VMMR0JmpA-x86.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR0/VMMR0TripleFaultHack.cpp b/src/VBox/VMM/VMMR0/VMMR0TripleFaultHack.cpp
index 45b0a60..9674dd0 100644
--- a/src/VBox/VMM/VMMR0/VMMR0TripleFaultHack.cpp
+++ b/src/VBox/VMM/VMMR0/VMMR0TripleFaultHack.cpp
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR0/VMMR0TripleFaultHackA.asm b/src/VBox/VMM/VMMR0/VMMR0TripleFaultHackA.asm
index 0046e6f..291afc4 100644
--- a/src/VBox/VMM/VMMR0/VMMR0TripleFaultHackA.asm
+++ b/src/VBox/VMM/VMMR0/VMMR0TripleFaultHackA.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2011-2015 Oracle Corporation
+; Copyright (C) 2011-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/APIC.cpp b/src/VBox/VMM/VMMR3/APIC.cpp
index 50ab3ba..c1ed478 100644
--- a/src/VBox/VMM/VMMR3/APIC.cpp
+++ b/src/VBox/VMM/VMMR3/APIC.cpp
@@ -31,6 +31,8 @@
 
 
 #ifndef VBOX_DEVICE_STRUCT_TESTCASE
+
+
 /*********************************************************************************************************************************
 *   Defined Constants And Macros                                                                                                 *
 *********************************************************************************************************************************/
@@ -939,12 +941,11 @@ static int apicR3LoadVMData(PVM pVM, PSSMHANDLE pSSM)
  * Worker for loading per-VCPU APIC data for legacy (old) saved-states.
  *
  * @returns VBox status code.
- * @param   pVM         The cross context VM structure.
  * @param   pVCpu       The cross context virtual CPU structure.
  * @param   pSSM        The SSM handle.
  * @param   uVersion    Data layout version.
  */
-static int apicR3LoadLegacyVCpuData(PVM pVM, PVMCPU pVCpu, PSSMHANDLE pSSM, uint32_t uVersion)
+static int apicR3LoadLegacyVCpuData(PVMCPU pVCpu, PSSMHANDLE pSSM, uint32_t uVersion)
 {
     AssertReturn(uVersion <= APIC_SAVED_STATE_VERSION_VBOX_50, VERR_NOT_SUPPORTED);
 
@@ -1045,7 +1046,7 @@ static int apicR3LoadLegacyVCpuData(PVM pVM, PVMCPU pVCpu, PSSMHANDLE pSSM, uint
     return rc;
 }
 
-
+#if 0 /** @todo not referenced and will cause assertion in apicR3LoadExec (VERR_WRONG_ORDER). */
 /**
  * @copydoc FNSSMDEVLIVEEXEC
  */
@@ -1053,6 +1054,7 @@ static DECLCALLBACK(int) apicR3LiveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uin
 {
     PAPICDEV pApicDev = PDMINS_2_DATA(pDevIns, PAPICDEV);
     PVM      pVM      = PDMDevHlpGetVM(pApicDev->pDevInsR3);
+    RT_NOREF1(uPass);
 
     LogFlow(("APIC: apicR3LiveExec: uPass=%u\n", uPass));
 
@@ -1060,16 +1062,14 @@ static DECLCALLBACK(int) apicR3LiveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uin
     AssertRCReturn(rc, rc);
     return VINF_SSM_DONT_CALL_AGAIN;
 }
-
+#endif
 
 /**
  * @copydoc FNSSMDEVSAVEEXEC
  */
 static DECLCALLBACK(int) apicR3SaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
 {
-    PAPICDEV pApicDev = PDMINS_2_DATA(pDevIns, PAPICDEV);
-    PVM      pVM      = PDMDevHlpGetVM(pDevIns);
-    PAPIC    pApic    = VM_TO_APIC(pVM);
+    PVM pVM = PDMDevHlpGetVM(pDevIns);
     AssertReturn(pVM, VERR_INVALID_VM_HANDLE);
 
     LogFlow(("APIC: apicR3SaveExec\n"));
@@ -1124,9 +1124,7 @@ static DECLCALLBACK(int) apicR3SaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
  */
 static DECLCALLBACK(int) apicR3LoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass)
 {
-    PAPICDEV pApicDev = PDMINS_2_DATA(pDevIns, PAPICDEV);
-    PVM      pVM      = PDMDevHlpGetVM(pDevIns);
-    PAPIC    pApic    = VM_TO_APIC(pVM);
+    PVM pVM = PDMDevHlpGetVM(pDevIns);
 
     AssertReturn(pVM, VERR_INVALID_VM_HANDLE);
     AssertReturn(uPass == SSM_PASS_FINAL, VERR_WRONG_ORDER);
@@ -1193,7 +1191,7 @@ static DECLCALLBACK(int) apicR3LoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uin
         }
         else
         {
-            rc = apicR3LoadLegacyVCpuData(pVM, pVCpu, pSSM, uVersion);
+            rc = apicR3LoadLegacyVCpuData(pVCpu, pSSM, uVersion);
             AssertRCReturn(rc, rc);
         }
 
@@ -1232,11 +1230,14 @@ static DECLCALLBACK(void) apicR3TimerCallback(PPDMDEVINS pDevIns, PTMTIMER pTime
     Assert(TMTimerIsLockOwner(pTimer));
     Assert(pVCpu);
     LogFlow(("APIC%u: apicR3TimerCallback\n", pVCpu->idCpu));
+    RT_NOREF2(pDevIns, pTimer);
 
     PXAPICPAGE     pXApicPage = VMCPU_TO_XAPICPAGE(pVCpu);
-    PAPICCPU       pApicCpu   = VMCPU_TO_APICCPU(pVCpu);
     uint32_t const uLvtTimer  = pXApicPage->lvt_timer.all.u32LvtTimer;
+#ifdef VBOX_WITH_STATISTICS
+    PAPICCPU       pApicCpu   = VMCPU_TO_APICCPU(pVCpu);
     STAM_COUNTER_INC(&pApicCpu->StatTimerCallback);
+#endif
     if (!XAPIC_LVT_IS_MASKED(uLvtTimer))
     {
         uint8_t uVector = XAPIC_LVT_GET_VECTOR(uLvtTimer);
@@ -1281,8 +1282,7 @@ static DECLCALLBACK(void) apicR3TimerCallback(PPDMDEVINS pDevIns, PTMTIMER pTime
  */
 static DECLCALLBACK(void) apicR3Reset(PPDMDEVINS pDevIns)
 {
-    PAPICDEV pApicDev = PDMINS_2_DATA(pDevIns, PAPICDEV);
-    PVM      pVM      = PDMDevHlpGetVM(pDevIns);
+    PVM pVM = PDMDevHlpGetVM(pDevIns);
     VM_ASSERT_EMT0(pVM);
     VM_ASSERT_IS_NOT_RUNNING(pVM);
 
@@ -1581,7 +1581,7 @@ static DECLCALLBACK(int) apicR3Construct(PPDMDEVINS pDevIns, int iInstance, PCFG
     /*
      * Validate inputs.
      */
-    Assert(iInstance == 0);
+    Assert(iInstance == 0); NOREF(iInstance);
     Assert(pDevIns);
 
     PAPICDEV pApicDev = PDMINS_2_DATA(pDevIns, PAPICDEV);
diff --git a/src/VBox/VMM/VMMR3/CFGM.cpp b/src/VBox/VMM/VMMR3/CFGM.cpp
index 1241756..9079a7b 100644
--- a/src/VBox/VMM/VMMR3/CFGM.cpp
+++ b/src/VBox/VMM/VMMR3/CFGM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/CPUM.cpp b/src/VBox/VMM/VMMR3/CPUM.cpp
index 9c34134..fb05fb0 100644
--- a/src/VBox/VMM/VMMR3/CPUM.cpp
+++ b/src/VBox/VMM/VMMR3/CPUM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -370,6 +370,7 @@ static const SSMFIELD g_aCpumBndCfgFields[] =
     SSMFIELD_ENTRY_TERM()
 };
 
+#if 0 /** @todo */
 /** Saved state field descriptors for X86XSAVEOPMASK. */
 static const SSMFIELD g_aCpumOpmaskFields[] =
 {
@@ -383,6 +384,7 @@ static const SSMFIELD g_aCpumOpmaskFields[] =
     SSMFIELD_ENTRY(         X86XSAVEOPMASK, aKRegs[7]),
     SSMFIELD_ENTRY_TERM()
 };
+#endif
 
 /** Saved state field descriptors for X86XSAVEZMMHI256. */
 static const SSMFIELD g_aCpumZmmHi256Fields[] =
@@ -2333,7 +2335,8 @@ static DECLCALLBACK(int) cpumR3DisasInstrRead(PDISCPUSTATE pDis, uint8_t offInst
  * @param   pszPrefix   String prefix for logging (debug only).
  *
  */
-VMMR3DECL(int) CPUMR3DisasmInstrCPU(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, RTGCPTR GCPtrPC, PDISCPUSTATE pCpu, const char *pszPrefix)
+VMMR3DECL(int) CPUMR3DisasmInstrCPU(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, RTGCPTR GCPtrPC, PDISCPUSTATE pCpu,
+                                    const char *pszPrefix)
 {
     CPUMDISASSTATE  State;
     int             rc;
@@ -2386,6 +2389,7 @@ VMMR3DECL(int) CPUMR3DisasmInstrCPU(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, RTGCPT
      */
     uint32_t cbInstr;
 #ifndef LOG_ENABLED
+    RT_NOREF_PV(pszPrefix);
     rc = DISInstrWithReader(GCPtrPC, enmDisCpuMode, cpumR3DisasInstrRead, &State, pCpu, &cbInstr);
     if (RT_SUCCESS(rc))
     {
@@ -2487,6 +2491,8 @@ VMMR3DECL(void) CPUMR3RemLeave(PVMCPU pVCpu, bool fNoOutOfSyncSels)
     Assert(!pVCpu->cpum.s.fRawEntered);
     Assert(pVCpu->cpum.s.fRemEntered);
 
+    RT_NOREF_PV(fNoOutOfSyncSels);
+
     pVCpu->cpum.s.fRemEntered = false;
 }
 
diff --git a/src/VBox/VMM/VMMR3/CPUMDbg.cpp b/src/VBox/VMM/VMMR3/CPUMDbg.cpp
index b8228ba..8afc27e 100644
--- a/src/VBox/VMM/VMMR3/CPUMDbg.cpp
+++ b/src/VBox/VMM/VMMR3/CPUMDbg.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -309,6 +309,7 @@ static DECLCALLBACK(int) cpumR3RegSet_ftw(void *pvUser, PCDBGFREGDESC pDesc, PCD
  */
 static DECLCALLBACK(int) cpumR3RegGet_Dummy(void *pvUser, PCDBGFREGDESC pDesc, PDBGFREGVAL pValue)
 {
+    RT_NOREF_PV(pvUser);
     switch (pDesc->enmType)
     {
         case DBGFREGVALTYPE_U8:        pValue->u8   = 0; return VINF_SUCCESS;
@@ -1084,12 +1085,14 @@ static DBGFREGSUBFIELD const g_aCpumRegFields_lstar[] =
     DBGFREGSUBFIELD_TERMINATOR()
 };
 
+#if 0 /** @todo */
 /** Sub-fields for the SF_MASK MSR. */
 static DBGFREGSUBFIELD const g_aCpumRegFields_sf_mask[] =
 {
     /** @todo  */
     DBGFREGSUBFIELD_TERMINATOR()
 };
+#endif
 
 
 /** @name Macros for producing register descriptor table entries.
diff --git a/src/VBox/VMM/VMMR3/CPUMR3CpuId.cpp b/src/VBox/VMM/VMMR3/CPUMR3CpuId.cpp
index d25ac47..3d1f45e 100644
--- a/src/VBox/VMM/VMMR3/CPUMR3CpuId.cpp
+++ b/src/VBox/VMM/VMMR3/CPUMR3CpuId.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -567,6 +567,7 @@ static PCPUMCPUIDLEAF cpumR3CpuIdGetLeaf(PCPUMCPUIDLEAF paLeaves, uint32_t cLeav
 }
 
 
+#ifndef IN_VBOX_CPU_REPORT
 /**
  * Gets a matching leaf in the CPUID leaf array, converted to a CPUMCPUID.
  *
@@ -591,6 +592,7 @@ static bool cpumR3CpuIdGetLeafLegacy(PCPUMCPUIDLEAF paLeaves, uint32_t cLeaves,
     }
     return false;
 }
+#endif /* IN_VBOX_CPU_REPORT */
 
 
 /**
@@ -884,6 +886,7 @@ static int cpumR3CpuIdInsert(PVM pVM, PCPUMCPUIDLEAF *ppaLeaves, uint32_t *pcLea
 }
 
 
+#ifndef IN_VBOX_CPU_REPORT
 /**
  * Removes a range of CPUID leaves.
  *
@@ -928,7 +931,7 @@ static void cpumR3CpuIdRemoveRange(PCPUMCPUIDLEAF paLeaves, uint32_t *pcLeaves,
 
     cpumR3CpuIdAssertOrder(paLeaves, *pcLeaves);
 }
-
+#endif /* IN_VBOX_CPU_REPORT */
 
 
 /**
@@ -2018,26 +2021,6 @@ static int cpumR3CpuIdInitLoadOverrideSet(uint32_t uStart, PCPUMCPUID paLeaves,
     return VINF_SUCCESS;
 }
 
-/**
- * Init a set of host CPUID leaves.
- *
- * @returns VBox status code.
- * @param   paLeaves            The leaf array.
- * @param   cLeaves             The number of leaves.
- * @param   uStart              The start leaf number.
- * @param   pCfgNode            The /CPUM/HostCPUID/ node.
- */
-static int cpumR3CpuIdInitHostSet(uint32_t uStart, PCPUMCPUID paLeaves, uint32_t cLeaves, PCFGMNODE pCfgNode)
-{
-    /* Using the ECX variant for all of them can't hurt... */
-    for (uint32_t i = 0; i < cLeaves; i++)
-        ASMCpuIdExSlow(uStart + i, 0, 0, 0, &paLeaves[i].uEax, &paLeaves[i].uEbx, &paLeaves[i].uEcx, &paLeaves[i].uEdx);
-
-    /* Load CPUID leaf override; we currently don't care if the user
-       specifies features the host CPU doesn't support. */
-    return cpumR3CpuIdInitLoadOverrideSet(uStart, paLeaves, cLeaves, pCfgNode);
-}
-
 
 /**
  * Installs the CPUID leaves and explods the data into structures like
@@ -2238,45 +2221,6 @@ typedef CPUMCPUIDCONFIG *PCPUMCPUIDCONFIG;
 
 
 /**
- * Insert hypervisor identification leaves.
- *
- * We only return minimal information, primarily ensuring that the
- * 0x40000000 function returns 0x40000001 and identifying ourselves.
- * Hypervisor-specific interface is supported through GIM which will
- * modify these leaves if required depending on the GIM provider.
- *
- * @returns VBox status code.
- * @param   pCpum       The CPUM instance data.
- * @param   pConfig     The CPUID configuration we've read from CFGM.
- */
-static int cpumR3CpuIdPlantHypervisorLeaves(PCPUM pCpum, PCPUMCPUIDCONFIG pConfig)
-{
-    CPUMCPUIDLEAF NewLeaf;
-    NewLeaf.uLeaf        = UINT32_C(0x40000000);
-    NewLeaf.uSubLeaf     = 0;
-    NewLeaf.fSubLeafMask = 0;
-    NewLeaf.uEax         = UINT32_C(0x40000001);
-    NewLeaf.uEbx         = 0x786f4256 /* 'VBox' */;
-    NewLeaf.uEcx         = 0x786f4256 /* 'VBox' */;
-    NewLeaf.uEdx         = 0x786f4256 /* 'VBox' */;
-    NewLeaf.fFlags       = 0;
-    int rc = cpumR3CpuIdInsert(NULL /* pVM */, &pCpum->GuestInfo.paCpuIdLeavesR3, &pCpum->GuestInfo.cCpuIdLeaves, &NewLeaf);
-    AssertLogRelRCReturn(rc, rc);
-
-    NewLeaf.uLeaf        = UINT32_C(0x40000001);
-    NewLeaf.uEax         = 0x656e6f6e;                            /* 'none' */
-    NewLeaf.uEbx         = 0;
-    NewLeaf.uEcx         = 0;
-    NewLeaf.uEdx         = 0;
-    NewLeaf.fFlags       = 0;
-    rc = cpumR3CpuIdInsert(NULL /* pVM */, &pCpum->GuestInfo.paCpuIdLeavesR3, &pCpum->GuestInfo.cCpuIdLeaves, &NewLeaf);
-    AssertLogRelRCReturn(rc, rc);
-
-    return VINF_SUCCESS;
-}
-
-
-/**
  * Mini CPU selection support for making Mac OS X happy.
  *
  * Executes the  /CPUM/MaxIntelFamilyModelStep config.
@@ -2926,7 +2870,7 @@ static int cpumR3CpuIdSanitize(PVM pVM, PCPUM pCpum, PCPUMCPUIDCONFIG pConfig)
         if (pConfig->enmMWaitExtensions)
         {
             pCurLeaf->uEcx = X86_CPUID_MWAIT_ECX_EXT | X86_CPUID_MWAIT_ECX_BREAKIRQIF0;
-            /** @todo: for now we just expose host's MWAIT C-states, although conceptually
+            /** @todo for now we just expose host's MWAIT C-states, although conceptually
                it shall be part of our power management virtualization model */
 #if 0
             /* MWAIT sub C-states */
@@ -4032,12 +3976,6 @@ int cpumR3InitCpuIdAndMsrs(PVM pVM)
     }
 
     /*
-     * Plant our own hypervisor CPUID leaves.
-     */
-    if (RT_SUCCESS(rc))
-        rc = cpumR3CpuIdPlantHypervisorLeaves(pCpum, &Config);
-
-    /*
      * MSR fudging.
      */
     if (RT_SUCCESS(rc))
@@ -4095,12 +4033,6 @@ int cpumR3InitCpuIdAndMsrs(PVM pVM)
         if (fEnable)
             CPUMR3SetGuestCpuIdFeature(pVM, CPUMCPUIDFEATURE_NX);
 
-        /* We don't enable the Hypervisor Present bit by default, but it may be needed by some guests. */
-        rc = CFGMR3QueryBoolDef(pCpumCfg, "EnableHVP", &fEnable, false);
-        AssertRCReturn(rc, rc);
-        if (fEnable)
-            CPUMR3SetGuestCpuIdFeature(pVM, CPUMCPUIDFEATURE_HVP);
-
         return VINF_SUCCESS;
     }
 
@@ -6045,14 +5977,11 @@ static void cpumR3CpuIdInfoVerboseCompareListU32(PCDBGFINFOHLP pHlp, uint32_t uV
  * Produces a detailed summary of standard leaf 0x00000001.
  *
  * @param   pHlp        The info helper functions.
- * @param   paLeaves    The CPUID leaves array.
- * @param   cLeaves     The number of leaves in the array.
  * @param   pCurLeaf    The 0x00000001 leaf.
  * @param   fVerbose    Whether to be very verbose or not.
  * @param   fIntel      Set if intel CPU.
  */
-static void cpumR3CpuIdInfoStdLeaf1Details(PCDBGFINFOHLP pHlp, PCCPUMCPUIDLEAF paLeaves, uint32_t cLeaves,
-                                           PCCPUMCPUIDLEAF pCurLeaf, bool fVerbose, bool fIntel)
+static void cpumR3CpuIdInfoStdLeaf1Details(PCDBGFINFOHLP pHlp, PCCPUMCPUIDLEAF pCurLeaf, bool fVerbose, bool fIntel)
 {
     Assert(pCurLeaf); Assert(pCurLeaf->uLeaf == 1);
     static const char * const s_apszTypes[4] = { "primary", "overdrive", "MP", "reserved" };
@@ -6162,6 +6091,7 @@ static void cpumR3CpuIdInfoStdLeaf7Details(PCDBGFINFOHLP pHlp, PCCPUMCPUIDLEAF p
 static void cpumR3CpuIdInfoStdLeaf13Details(PCDBGFINFOHLP pHlp, PCCPUMCPUIDLEAF paLeaves, uint32_t cLeaves,
                                             PCCPUMCPUIDLEAF pCurLeaf, bool fVerbose)
 {
+    RT_NOREF_PV(fVerbose);
     Assert(pCurLeaf); Assert(pCurLeaf->uLeaf == 13);
     pHlp->pfnPrintf(pHlp, "Processor Extended State Enumeration (leaf 0xd):\n");
     for (uint32_t uSubLeaf = 0; uSubLeaf < 64; uSubLeaf++)
@@ -6370,7 +6300,7 @@ DECLCALLBACK(void) cpumR3CpuIdInfo(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszA
                         "Supports:", paLeaves[0].uEax);
 
     if (iVerbosity && (pCurLeaf = cpumR3CpuIdGetLeaf(paLeaves, cLeaves, UINT32_C(0x00000001), 0)) != NULL)
-        cpumR3CpuIdInfoStdLeaf1Details(pHlp, paLeaves, cLeaves, pCurLeaf, iVerbosity > 1, fIntel);
+        cpumR3CpuIdInfoStdLeaf1Details(pHlp, pCurLeaf, iVerbosity > 1, fIntel);
 
     if (iVerbosity && (pCurLeaf = cpumR3CpuIdGetLeaf(paLeaves, cLeaves, UINT32_C(0x00000007), 0)) != NULL)
         cpumR3CpuIdInfoStdLeaf7Details(pHlp, paLeaves, cLeaves, pCurLeaf, iVerbosity > 1);
@@ -6779,6 +6709,7 @@ VMMR3_INT_DECL(RCPTRTYPE(PCCPUMCPUID)) CPUMR3GetGuestCpuIdPatmDefRCPtr(PVM pVM)
  */
 VMMR3_INT_DECL(uint32_t) CPUMR3GetGuestCpuIdPatmStdMax(PVM pVM)
 {
+    RT_NOREF_PV(pVM);
     return RT_ELEMENTS(pVM->cpum.s.aGuestCpuIdPatmStd);
 }
 
@@ -6792,6 +6723,7 @@ VMMR3_INT_DECL(uint32_t) CPUMR3GetGuestCpuIdPatmStdMax(PVM pVM)
  */
 VMMR3_INT_DECL(uint32_t) CPUMR3GetGuestCpuIdPatmExtMax(PVM pVM)
 {
+    RT_NOREF_PV(pVM);
     return RT_ELEMENTS(pVM->cpum.s.aGuestCpuIdPatmExt);
 }
 
@@ -6805,6 +6737,7 @@ VMMR3_INT_DECL(uint32_t) CPUMR3GetGuestCpuIdPatmExtMax(PVM pVM)
  */
 VMMR3_INT_DECL(uint32_t) CPUMR3GetGuestCpuIdPatmCentaurMax(PVM pVM)
 {
+    RT_NOREF_PV(pVM);
     return RT_ELEMENTS(pVM->cpum.s.aGuestCpuIdPatmCentaur);
 }
 
diff --git a/src/VBox/VMM/VMMR3/CPUMR3Db.cpp b/src/VBox/VMM/VMMR3/CPUMR3Db.cpp
index e3956b1..fa7626b 100644
--- a/src/VBox/VMM/VMMR3/CPUMR3Db.cpp
+++ b/src/VBox/VMM/VMMR3/CPUMR3Db.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -182,6 +182,7 @@ typedef struct CPUMDBENTRY
 #endif
 /** @} */
 
+#ifndef CPUM_DB_STANDALONE
 
 #include "cpus/Intel_Core_i7_6700K.h"
 #include "cpus/Intel_Core_i7_5600U.h"
@@ -294,7 +295,6 @@ static CPUMDBENTRY const * const g_apCpumDbEntries[] =
 };
 
 
-#ifndef CPUM_DB_STANDALONE
 
 /**
  * Binary search used by cpumR3MsrRangesInsert and has some special properties
diff --git a/src/VBox/VMM/VMMR3/CSAM.cpp b/src/VBox/VMM/VMMR3/CSAM.cpp
index b18fcd7..363b9da 100644
--- a/src/VBox/VMM/VMMR3/CSAM.cpp
+++ b/src/VBox/VMM/VMMR3/CSAM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -26,6 +26,7 @@
  * @sa @ref grp_csam
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
@@ -557,7 +558,7 @@ VMMR3_INT_DECL(int) CSAMR3Term(PVM pVM)
     rc = CSAMR3Reset(pVM);
     AssertRC(rc);
 
-    /* @todo triggers assertion in MMHyperFree */
+    /** @todo triggers assertion in MMHyperFree */
 #if 0
     for(int i=0;i<CSAM_PAGEBMP_CHUNKS;i++)
     {
@@ -2269,7 +2270,7 @@ VMMR3DECL(int) CSAMR3UnmonitorPage(PVM pVM, RTRCPTR pPageAddrGC, CSAMTAG enmTag)
 
     Log(("CSAMR3UnmonitorPage %RRv %d\n", pPageAddrGC, enmTag));
 
-    Assert(enmTag == CSAM_TAG_REM);
+    Assert(enmTag == CSAM_TAG_REM); RT_NOREF_PV(enmTag);
 
 #ifdef VBOX_STRICT
     PCSAMPAGEREC pPageRec;
@@ -2303,7 +2304,7 @@ static int csamRemovePageRecord(PVM pVM, RTRCPTR GCPtr)
 #ifdef CSAM_MONITOR_CODE_PAGES
         if (pPageRec->page.fMonitorActive)
         {
-            /* @todo -> this is expensive (cr3 reload)!!!
+            /** @todo -> this is expensive (cr3 reload)!!!
              * if this happens often, then reuse it instead!!!
              */
             Assert(!g_fInCsamR3CodePageInvalidate);
@@ -2344,6 +2345,7 @@ static int csamRemovePageRecord(PVM pVM, RTRCPTR GCPtr)
     return VINF_SUCCESS;
 }
 
+#if 0 /* Unused */
 /**
  * Callback for delayed writes from non-EMT threads
  *
@@ -2356,6 +2358,7 @@ static DECLCALLBACK(void) CSAMDelayedWriteHandler(PVM pVM, RTRCPTR GCPtr, size_t
     int rc = PATMR3PatchWrite(pVM, GCPtr, (uint32_t)cbBuf);
     AssertRC(rc);
 }
+#endif
 
 /**
  * \#PF Handler callback for invalidation of virtual access handler ranges.
@@ -2370,11 +2373,14 @@ static DECLCALLBACK(void) CSAMDelayedWriteHandler(PVM pVM, RTRCPTR GCPtr, size_t
  */
 static DECLCALLBACK(int) csamR3CodePageInvalidate(PVM pVM, PVMCPU pVCpu, RTGCPTR GCPtr, void *pvUser)
 {
+    RT_NOREF2(pVCpu, pvUser);
+
     g_fInCsamR3CodePageInvalidate = true;
     LogFlow(("csamR3CodePageInvalidate %RGv\n", GCPtr));
     /** @todo We can't remove the page (which unregisters the virtual handler) as we are called from a DoWithAll on the virtual handler tree. Argh. */
     csamFlushPage(pVM, GCPtr, false /* don't remove page! */);
     g_fInCsamR3CodePageInvalidate = false;
+
     return VINF_SUCCESS;
 }
 
diff --git a/src/VBox/VMM/VMMR3/DBGF.cpp b/src/VBox/VMM/VMMR3/DBGF.cpp
index 7b6631e..a10c984 100644
--- a/src/VBox/VMM/VMMR3/DBGF.cpp
+++ b/src/VBox/VMM/VMMR3/DBGF.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -748,7 +748,7 @@ VMMR3_INT_DECL(int) DBGFR3EventBreakpoint(PVM pVM, DBGFEVENTTYPE enmEvent)
 #if 0   /** @todo get flat PC api! */
         uint32_t eip = CPUMGetGuestEIP(pVM);
 #else
-        /* @todo SMP support!! */
+        /** @todo SMP support!! */
         PCPUMCTX pCtx = CPUMQueryGuestCtxPtr(VMMGetCpu(pVM));
         RTGCPTR  eip = pCtx->rip + pCtx->cs.u64Base;
 #endif
diff --git a/src/VBox/VMM/VMMR3/DBGFAddr.cpp b/src/VBox/VMM/VMMR3/DBGFAddr.cpp
index 164ef6b..205961a 100644
--- a/src/VBox/VMM/VMMR3/DBGFAddr.cpp
+++ b/src/VBox/VMM/VMMR3/DBGFAddr.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/DBGFAddrSpace.cpp b/src/VBox/VMM/VMMR3/DBGFAddrSpace.cpp
index efc3a66..e5e2856 100644
--- a/src/VBox/VMM/VMMR3/DBGFAddrSpace.cpp
+++ b/src/VBox/VMM/VMMR3/DBGFAddrSpace.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -91,6 +91,7 @@ typedef struct DBGFR3ASLOADOPENDATA
     RTDBGMOD        hMod;
 } DBGFR3ASLOADOPENDATA;
 
+#if 0 /* unused */
 /**
  * Callback for dbgfR3AsSearchPath and dbgfR3AsSearchEnvPath.
  *
@@ -101,6 +102,7 @@ typedef struct DBGFR3ASLOADOPENDATA
 typedef int FNDBGFR3ASSEARCHOPEN(const char *pszFilename, void *pvUser);
 /** Pointer to a FNDBGFR3ASSEARCHOPEN. */
 typedef FNDBGFR3ASSEARCHOPEN *PFNDBGFR3ASSEARCHOPEN;
+#endif
 
 
 /*********************************************************************************************************************************
@@ -791,6 +793,7 @@ VMMR3DECL(RTDBGAS) DBGFR3AsQueryByPid(PUVM pUVM, RTPROCESS ProcId)
     return hDbgAs;
 }
 
+#if 0 /* unused */
 
 /**
  * Searches for the file in the path.
@@ -930,6 +933,8 @@ static int dbgfR3AsSearchCfgPath(PUVM pUVM, const char *pszFilename, const char
     return rc;
 }
 
+#endif /* unused */
+
 
 /**
  * Load symbols from an executable module into the specified address space.
@@ -1143,18 +1148,6 @@ static void dbgfR3AsSymbolJoinNames(PRTDBGSYMBOL pSymbol, RTDBGMOD hMod)
 }
 
 
-/** Temporary symbol conversion function. */
-static void dbgfR3AsSymbolConvert(PRTDBGSYMBOL pSymbol, PCDBGFSYMBOL pDbgfSym)
-{
-    pSymbol->offSeg = pSymbol->Value = pDbgfSym->Value;
-    pSymbol->cb = pDbgfSym->cb;
-    pSymbol->iSeg = 0;
-    pSymbol->fFlags = 0;
-    pSymbol->iOrdinal = UINT32_MAX;
-    strcpy(pSymbol->szName, pDbgfSym->szName);
-}
-
-
 /**
  * Query a symbol by address.
  *
diff --git a/src/VBox/VMM/VMMR3/DBGFBp.cpp b/src/VBox/VMM/VMMR3/DBGFBp.cpp
index 5a6ef61..51d8052 100644
--- a/src/VBox/VMM/VMMR3/DBGFBp.cpp
+++ b/src/VBox/VMM/VMMR3/DBGFBp.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -342,7 +342,7 @@ static DECLCALLBACK(int) dbgfR3BpSetInt3(PUVM pUVM, PCDBGFADDRESS pAddress, uint
         return VERR_INVALID_PARAMETER;
     AssertMsgReturn(!piBp || VALID_PTR(piBp), ("piBp=%p\n", piBp), VERR_INVALID_POINTER);
     if (piBp)
-        *piBp = ~0;
+        *piBp = UINT32_MAX;
 
     /*
      * Check if the breakpoint already exists.
@@ -456,7 +456,7 @@ static int dbgfR3BpInt3Arm(PUVM pUVM, PDBGFBP pBp)
  */
 static int dbgfR3BpInt3Disarm(PUVM pUVM, PDBGFBP pBp)
 {
-    /* @todo SMP support! */
+    /** @todo SMP support! */
     VMCPUID idCpu = 0;
 
     /*
@@ -504,7 +504,7 @@ static DECLCALLBACK(int) dbgfR3BpSetReg(PUVM pUVM, PCDBGFADDRESS pAddress, uint6
         return VERR_INVALID_PARAMETER;
     AssertMsgReturn(!piBp || VALID_PTR(piBp), ("piBp=%p\n", piBp), VERR_INVALID_POINTER);
     if (piBp)
-        *piBp = ~0;
+        *piBp = UINT32_MAX;
     switch (fType)
     {
         case X86_DR7_RW_EO:
@@ -652,6 +652,7 @@ static DECLCALLBACK(VBOXSTRICTRC) dbgfR3BpRegRecalcOnCpu(PVM pVM, PVMCPU pVCpu,
  */
 static int dbgfR3BpRegArm(PVM pVM, PDBGFBP pBp)
 {
+    RT_NOREF_PV(pBp);
     Assert(pBp->fEnabled);
     return VMMR3EmtRendezvous(pVM, VMMEMTRENDEZVOUS_FLAGS_TYPE_ALL_AT_ONCE, dbgfR3BpRegRecalcOnCpu, NULL);
 }
@@ -669,6 +670,7 @@ static int dbgfR3BpRegArm(PVM pVM, PDBGFBP pBp)
  */
 static int dbgfR3BpRegDisarm(PVM pVM, PDBGFBP pBp)
 {
+    RT_NOREF_PV(pBp);
     Assert(!pBp->fEnabled);
     return VMMR3EmtRendezvous(pVM, VMMEMTRENDEZVOUS_FLAGS_TYPE_ALL_AT_ONCE, dbgfR3BpRegRecalcOnCpu, NULL);
 }
@@ -702,8 +704,7 @@ static DECLCALLBACK(int) dbgfR3BpSetREM(PUVM pUVM, PCDBGFADDRESS pAddress, uint6
         return VERR_INVALID_PARAMETER;
     AssertMsgReturn(!piBp || VALID_PTR(piBp), ("piBp=%p\n", piBp), VERR_INVALID_POINTER);
     if (piBp)
-        *piBp = ~0;
-
+        *piBp = UINT32_MAX;
 
     /*
      * Check if the breakpoint already exists.
@@ -833,7 +834,7 @@ static DECLCALLBACK(int) dbgfR3BpSetPortIo(PUVM pUVM, RTIOPORT uPort, RTIOPORT c
      */
     PVM pVM = pUVM->pVM;
     VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE);
-    *piBp = ~0;
+    *piBp = UINT32_MAX;
 
     /*
      * Check if the breakpoint already exists.
@@ -906,7 +907,7 @@ VMMR3DECL(int)  DBGFR3BpSetPortIo(PUVM pUVM, RTIOPORT uPort, RTIOPORT cPorts, ui
     /*
      * This must be done on EMT.
      */
-    uint32_t iBp = -1;
+    uint32_t iBp = UINT32_MAX;
     int rc = VMR3ReqCallWaitU(pUVM, 0 /*idDstCpu*/, (PFNRT)dbgfR3BpSetPortIo, 7,
                               pUVM, uPort, cPorts, fAccess, &iHitTrigger, &iHitDisable, piBp);
     if (piBp)
@@ -941,7 +942,7 @@ static DECLCALLBACK(int) dbgfR3BpSetMmio(PUVM pUVM, PCRTGCPHYS pGCPhys, uint32_t
      */
     PVM pVM = pUVM->pVM;
     VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE);
-    *piBp = ~0;
+    *piBp = UINT32_MAX;
 
     /*
      * Check if the breakpoint already exists.
@@ -1014,7 +1015,7 @@ VMMR3DECL(int)  DBGFR3BpSetMmio(PUVM pUVM, RTGCPHYS GCPhys, uint32_t cb, uint32_
     /*
      * This must be done on EMT.
      */
-    uint32_t iBp = -1;
+    uint32_t iBp = UINT32_MAX;
     int rc = VMR3ReqCallWaitU(pUVM, 0 /*idDstCpu*/, (PFNRT)dbgfR3BpSetMmio, 7,
                               pUVM, &GCPhys, cb, fAccess, &iHitTrigger, &iHitDisable, piBp);
     if (piBp)
diff --git a/src/VBox/VMM/VMMR3/DBGFCoreWrite.cpp b/src/VBox/VMM/VMMR3/DBGFCoreWrite.cpp
index 50ecc98..375bea1 100644
--- a/src/VBox/VMM/VMMR3/DBGFCoreWrite.cpp
+++ b/src/VBox/VMM/VMMR3/DBGFCoreWrite.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/DBGFCpu.cpp b/src/VBox/VMM/VMMR3/DBGFCpu.cpp
index 5761e93..39d3ef3 100644
--- a/src/VBox/VMM/VMMR3/DBGFCpu.cpp
+++ b/src/VBox/VMM/VMMR3/DBGFCpu.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/DBGFDisas.cpp b/src/VBox/VMM/VMMR3/DBGFDisas.cpp
index 6fce7ec..630a582 100644
--- a/src/VBox/VMM/VMMR3/DBGFDisas.cpp
+++ b/src/VBox/VMM/VMMR3/DBGFDisas.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -493,7 +493,7 @@ dbgfR3DisasInstrExOnVCpu(PVM pVM, PVMCPU pVCpu, RTSEL Sel, PRTGCPTR pGCPtr, uint
         SelInfo.Sel                     = Sel;
         SelInfo.SelGate                 = 0;
         SelInfo.GCPtrBase               = 0;
-        SelInfo.cbLimit                 = ~0;
+        SelInfo.cbLimit                 = ~(RTGCUINTPTR)0;
         SelInfo.fFlags                  = PGMMODE_IS_LONG_MODE(enmMode)
                                         ? DBGFSELINFO_FLAGS_LONG_MODE
                                         : enmMode != PGMMODE_REAL
@@ -535,7 +535,7 @@ dbgfR3DisasInstrExOnVCpu(PVM pVM, PVMCPU pVCpu, RTSEL Sel, PRTGCPTR pGCPtr, uint
         SelInfo.Sel                     = Sel;
         SelInfo.SelGate                 = 0;
         SelInfo.GCPtrBase               = Sel * 16;
-        SelInfo.cbLimit                 = ~0;
+        SelInfo.cbLimit                 = ~(RTGCUINTPTR)0;
         SelInfo.fFlags                  = DBGFSELINFO_FLAGS_REAL_MODE;
         SelInfo.u.Raw.au32[0]           = 0;
         SelInfo.u.Raw.au32[1]           = 0;
diff --git a/src/VBox/VMM/VMMR3/DBGFInfo.cpp b/src/VBox/VMM/VMMR3/DBGFInfo.cpp
index f583985..6ce89c7 100644
--- a/src/VBox/VMM/VMMR3/DBGFInfo.cpp
+++ b/src/VBox/VMM/VMMR3/DBGFInfo.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/DBGFLog.cpp b/src/VBox/VMM/VMMR3/DBGFLog.cpp
index 24499ae..2a3a249 100644
--- a/src/VBox/VMM/VMMR3/DBGFLog.cpp
+++ b/src/VBox/VMM/VMMR3/DBGFLog.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/DBGFMem.cpp b/src/VBox/VMM/VMMR3/DBGFMem.cpp
index 403767c..4fd4748 100644
--- a/src/VBox/VMM/VMMR3/DBGFMem.cpp
+++ b/src/VBox/VMM/VMMR3/DBGFMem.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/DBGFModule.cpp b/src/VBox/VMM/VMMR3/DBGFModule.cpp
index 00456b6..3d9d792 100644
--- a/src/VBox/VMM/VMMR3/DBGFModule.cpp
+++ b/src/VBox/VMM/VMMR3/DBGFModule.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/DBGFOS.cpp b/src/VBox/VMM/VMMR3/DBGFOS.cpp
index bb0f1bd..7a6117e 100644
--- a/src/VBox/VMM/VMMR3/DBGFOS.cpp
+++ b/src/VBox/VMM/VMMR3/DBGFOS.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -92,6 +92,7 @@ typedef DBGFOSEMTWRAPPER *PDBGFOSEMTWRAPPER;
  */
 int dbgfR3OSInit(PUVM pUVM)
 {
+    RT_NOREF_PV(pUVM);
     return VINF_SUCCESS;
 }
 
diff --git a/src/VBox/VMM/VMMR3/DBGFR3PlugIn.cpp b/src/VBox/VMM/VMMR3/DBGFR3PlugIn.cpp
index c5446bf..cb72501 100644
--- a/src/VBox/VMM/VMMR3/DBGFR3PlugIn.cpp
+++ b/src/VBox/VMM/VMMR3/DBGFR3PlugIn.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -601,6 +601,7 @@ VMMR3DECL(void) DBGFR3PlugInUnloadAll(PUVM pUVM)
 static DECLCALLBACK(void) dbgfR3PlugInInfoList(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs)
 {
     PDBGFPLUGIN pPlugIn = pVM->pUVM->dbgf.s.pPlugInHead;
+    RT_NOREF_PV(pszArgs);
     if (pPlugIn)
     {
         pHlp->pfnPrintf(pHlp, "Debugging plug-in%s: %s", pPlugIn->pNext ? "s" : "", pPlugIn->szName);
diff --git a/src/VBox/VMM/VMMR3/DBGFR3Trace.cpp b/src/VBox/VMM/VMMR3/DBGFR3Trace.cpp
index dc911d4..d28ca10 100644
--- a/src/VBox/VMM/VMMR3/DBGFR3Trace.cpp
+++ b/src/VBox/VMM/VMMR3/DBGFR3Trace.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/DBGFR3Type.cpp b/src/VBox/VMM/VMMR3/DBGFR3Type.cpp
index afac4fa..9e9f689 100644
--- a/src/VBox/VMM/VMMR3/DBGFR3Type.cpp
+++ b/src/VBox/VMM/VMMR3/DBGFR3Type.cpp
@@ -500,7 +500,7 @@ static int dbgfR3TypeRegister(PUVM pUVM, PCDBGFTYPEREG pReg)
 
 
 /**
- * Registers a new built-in type 
+ * Registers a new built-in type
  *
  * @returns VBox status code.
  * @param   pUVM                The user mode VM handle.
@@ -760,7 +760,7 @@ static int dbgfR3TypeParseBufferByType(PUVM pUVM, PDBGFTYPE pType, uint8_t *pbBu
             *ppVal     = pVal;
         }
         else
-            MMR3HeapFree(pVal); /** @todo: Leak for embedded structs. */
+            MMR3HeapFree(pVal); /** @todo Leak for embedded structs. */
     }
     else
         rc = VERR_NO_MEMORY;
@@ -971,7 +971,7 @@ VMMR3DECL(int) DBGFR3TypeDeregister(PUVM pUVM, const char *pszType)
     {
         if (!pType->cRefs)
         {
-            
+
         }
         else
             rc = VERR_RESOURCE_IN_USE;
@@ -1130,6 +1130,7 @@ VMMR3DECL(int) DBGFR3TypeDumpEx(PUVM pUVM, const char *pszType, uint32_t fFlags,
     UVM_ASSERT_VALID_EXT_RETURN(pUVM, VERR_INVALID_VM_HANDLE);
     AssertPtrReturn(pszType, VERR_INVALID_POINTER);
     AssertPtrReturn(pfnDump, VERR_INVALID_POINTER);
+    RT_NOREF_PV(fFlags);
 
     int rc = VINF_SUCCESS;
     if (!pUVM->dbgf.s.fTypeDbInitialized)
@@ -1196,7 +1197,7 @@ VMMR3DECL(int) DBGFR3TypeQueryValByType(PUVM pUVM, PCDBGFADDRESS pAddress, const
                 rc = dbgfR3TypeParseBufferByType(pUVM, pType, pbBuf, pType->cbType,
                                                  ppVal, &cbParsed);
             }
- 
+
             MMR3HeapFree(pbBuf);
         }
         else
diff --git a/src/VBox/VMM/VMMR3/DBGFReg.cpp b/src/VBox/VMM/VMMR3/DBGFReg.cpp
index 14f7284..ffbefb3 100644
--- a/src/VBox/VMM/VMMR3/DBGFReg.cpp
+++ b/src/VBox/VMM/VMMR3/DBGFReg.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1914,6 +1914,7 @@ VMMR3DECL(int) DBGFR3RegNmQueryAll(PUVM pUVM, PDBGFREGENTRYNM paRegs, size_t cRe
 static DECLCALLBACK(int) dbgfR3RegNmSetWorkerOnCpu(PUVM pUVM, PDBGFREGLOOKUP pLookupRec,
                                                    PCDBGFREGVAL pValue, PCDBGFREGVAL pMask)
 {
+    RT_NOREF_PV(pUVM);
     PCDBGFREGSUBFIELD pSubField = pLookupRec->pSubField;
     if (pSubField && pSubField->pfnSet)
         return pSubField->pfnSet(pLookupRec->pSet->uUserArg.pv, pSubField, pValue->u128, pMask->u128);
@@ -2090,7 +2091,6 @@ VMMR3DECL(int) DBGFR3RegNmSet(PUVM pUVM, VMCPUID idDefCpu, const char *pszReg, P
                     RTUInt128AssignShiftRight(&Value.u128, pSubField->cShift);
                 }
 
-                DBGFREGVAL Value3 = Value;
                 RTUInt128AssignAndNFirstBits(&Value.u128, pSubField->cBits);
                 if (rc == VINF_SUCCESS && RTUInt128IsNotEqual(&Value.u128, &Value.u128))
                     rc = VINF_DBGF_TRUNCATED_REGISTER;
diff --git a/src/VBox/VMM/VMMR3/DBGFStack.cpp b/src/VBox/VMM/VMMR3/DBGFStack.cpp
index e09bbd1..05316d1 100644
--- a/src/VBox/VMM/VMMR3/DBGFStack.cpp
+++ b/src/VBox/VMM/VMMR3/DBGFStack.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/EM.cpp b/src/VBox/VMM/VMMR3/EM.cpp
index 22a1fb0..8031695 100644
--- a/src/VBox/VMM/VMMR3/EM.cpp
+++ b/src/VBox/VMM/VMMR3/EM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -91,7 +91,9 @@ static DECLCALLBACK(int) emR3Load(PVM pVM, PSSMHANDLE pSSM, uint32_t uVersion, u
 static const char *emR3GetStateName(EMSTATE enmState);
 #endif
 static VBOXSTRICTRC emR3Debug(PVM pVM, PVMCPU pVCpu, VBOXSTRICTRC rc);
+#if defined(VBOX_WITH_REM) || defined(DEBUG)
 static int emR3RemStep(PVM pVM, PVMCPU pVCpu);
+#endif
 static int emR3RemExecute(PVM pVM, PVMCPU pVCpu, bool *pfFFDone);
 int emR3HighPriorityPostForcedActions(PVM pVM, PVMCPU pVCpu, int rc);
 
@@ -518,6 +520,8 @@ VMMR3_INT_DECL(int) EMR3Term(PVM pVM)
 
 #ifdef VBOX_WITH_REM
     PDMR3CritSectDelete(&pVM->em.s.CritSectREM);
+#else
+    RT_NOREF(pVM);
 #endif
     return VINF_SUCCESS;
 }
@@ -754,7 +758,6 @@ VMMR3DECL(void) EMR3FatalError(PVMCPU pVCpu, int rc)
 {
     pVCpu->em.s.enmState = EMSTATE_GURU_MEDITATION;
     longjmp(pVCpu->em.s.u.FatalLongJump, rc);
-    AssertReleaseMsgFailed(("longjmp returned!\n"));
 }
 
 
@@ -990,6 +993,7 @@ static VBOXSTRICTRC emR3Debug(PVM pVM, PVMCPU pVCpu, VBOXSTRICTRC rc)
 }
 
 
+#if defined(VBOX_WITH_REM) || defined(DEBUG)
 /**
  * Steps recompiled code.
  *
@@ -1003,7 +1007,7 @@ static int emR3RemStep(PVM pVM, PVMCPU pVCpu)
 {
     Log3(("emR3RemStep: cs:eip=%04x:%08x\n", CPUMGetGuestCS(pVCpu),  CPUMGetGuestEIP(pVCpu)));
 
-#ifdef VBOX_WITH_REM
+# ifdef VBOX_WITH_REM
     EMRemLock(pVM);
 
     /*
@@ -1017,15 +1021,17 @@ static int emR3RemStep(PVM pVM, PVMCPU pVCpu)
     }
     EMRemUnlock(pVM);
 
-#else
+# else
     int rc = VBOXSTRICTRC_TODO(IEMExecOne(pVCpu)); NOREF(pVM);
-#endif
+# endif
 
     Log3(("emR3RemStep: returns %Rrc cs:eip=%04x:%08x\n", rc, CPUMGetGuestCS(pVCpu),  CPUMGetGuestEIP(pVCpu)));
     return rc;
 }
+#endif /* VBOX_WITH_REM || DEBUG */
 
 
+#ifdef VBOX_WITH_REM
 /**
  * emR3RemExecute helper that syncs the state back from REM and leave the REM
  * critical section.
@@ -1036,15 +1042,14 @@ static int emR3RemStep(PVM pVM, PVMCPU pVCpu)
  */
 DECLINLINE(bool) emR3RemExecuteSyncBack(PVM pVM, PVMCPU pVCpu)
 {
-#ifdef VBOX_WITH_REM
     STAM_PROFILE_START(&pVCpu->em.s.StatREMSync, a);
     REMR3StateBack(pVM, pVCpu);
     STAM_PROFILE_STOP(&pVCpu->em.s.StatREMSync, a);
 
     EMRemUnlock(pVM);
-#endif
     return false;
 }
+#endif
 
 
 /**
@@ -1752,7 +1757,7 @@ int emR3ForcedActions(PVM pVM, PVMCPU pVCpu, int rc)
         {
             PCPUMCTX pCtx = pVCpu->em.s.pCtx;
 
-            /** @todo: check for 16 or 32 bits code! (D bit in the code selector) */
+            /** @todo check for 16 or 32 bits code! (D bit in the code selector) */
             Log(("Forced action VMCPU_FF_CSAM_SCAN_PAGE\n"));
 
             CSAMR3CheckCodeEx(pVM, pCtx, pCtx->eip);
@@ -2721,8 +2726,7 @@ VMMR3_INT_DECL(int) EMR3ExecuteVM(PVM pVM, PVMCPU pVCpu)
         return rc;
     }
 
-    /* (won't ever get here). */
-    AssertFailed();
+    /* not reached */
 }
 
 /**
diff --git a/src/VBox/VMM/VMMR3/EMHM.cpp b/src/VBox/VMM/VMMR3/EMHM.cpp
index 914d567..c86b06a 100644
--- a/src/VBox/VMM/VMMR3/EMHM.cpp
+++ b/src/VBox/VMM/VMMR3/EMHM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -240,6 +240,7 @@ DECLINLINE(int) emR3HmExecuteInstruction(PVM pVM, PVMCPU pVCpu, const char *pszP
 #ifdef LOG_ENABLED
     return emR3HmExecuteInstructionWorker(pVM, pVCpu, rcGC, pszPrefix);
 #else
+    RT_NOREF_PV(pszPrefix);
     return emR3HmExecuteInstructionWorker(pVM, pVCpu, rcGC);
 #endif
 }
diff --git a/src/VBox/VMM/VMMR3/EMR3Dbg.cpp b/src/VBox/VMM/VMMR3/EMR3Dbg.cpp
index dda4829..0fb8d4b 100644
--- a/src/VBox/VMM/VMMR3/EMR3Dbg.cpp
+++ b/src/VBox/VMM/VMMR3/EMR3Dbg.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -68,6 +68,7 @@ static DBGCCMD const g_aCmds[] =
 
 int emR3InitDbg(PVM pVM)
 {
+    RT_NOREF_PV(pVM);
     int rc = VINF_SUCCESS;
 #ifdef VBOX_WITH_DEBUGGER
     rc = DBGCRegisterCommands(&g_aCmds[0], RT_ELEMENTS(g_aCmds));
diff --git a/src/VBox/VMM/VMMR3/EMRaw.cpp b/src/VBox/VMM/VMMR3/EMRaw.cpp
index cc42704..6ddd29c 100644
--- a/src/VBox/VMM/VMMR3/EMRaw.cpp
+++ b/src/VBox/VMM/VMMR3/EMRaw.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -420,6 +420,7 @@ DECLINLINE(int) emR3RawExecuteInstruction(PVM pVM, PVMCPU pVCpu, const char *psz
 #ifdef LOG_ENABLED
     return emR3RawExecuteInstructionWorker(pVM, pVCpu, rcGC, pszPrefix);
 #else
+    RT_NOREF_PV(pszPrefix);
     return emR3RawExecuteInstructionWorker(pVM, pVCpu, rcGC);
 #endif
 }
@@ -434,6 +435,7 @@ DECLINLINE(int) emR3RawExecuteInstruction(PVM pVM, PVMCPU pVCpu, const char *psz
 static int emR3RawExecuteIOInstruction(PVM pVM, PVMCPU pVCpu)
 {
     STAM_PROFILE_START(&pVCpu->em.s.StatIOEmu, a);
+    RT_NOREF_PV(pVM);
 
     /* Hand it over to the interpreter. */
     VBOXSTRICTRC rcStrict = IEMExecOne(pVCpu);
@@ -1490,7 +1492,7 @@ int emR3RawExecute(PVM pVM, PVMCPU pVCpu, bool *pfFFDone)
         if (    VM_FF_IS_PENDING(pVM, ~VM_FF_HIGH_PRIORITY_PRE_RAW_MASK | VM_FF_PGM_NO_MEMORY)
             ||  VMCPU_FF_IS_PENDING(pVCpu, ~VMCPU_FF_HIGH_PRIORITY_PRE_RAW_MASK))
         {
-            Assert(pCtx->eflags.Bits.u1VM || (pCtx->ss.Sel & X86_SEL_RPL) != (EMIsRawRing1Enabled(pVM) ? 2 : 1));
+            Assert(pCtx->eflags.Bits.u1VM || (pCtx->ss.Sel & X86_SEL_RPL) != (EMIsRawRing1Enabled(pVM) ? 2U : 1U));
 
             STAM_REL_PROFILE_ADV_SUSPEND(&pVCpu->em.s.StatRAWTotal, a);
             rc = emR3ForcedActions(pVM, pVCpu, rc);
diff --git a/src/VBox/VMM/VMMR3/FTM.cpp b/src/VBox/VMM/VMMR3/FTM.cpp
index e04f6c2..154023a 100644
--- a/src/VBox/VMM/VMMR3/FTM.cpp
+++ b/src/VBox/VMM/VMMR3/FTM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -774,7 +774,7 @@ static DECLCALLBACK(int) ftmR3MasterThread(RTTHREAD hThread, void *pvUser)
                     rc = ftmR3TcpReadACK(pVM, "password", "Invalid password");
                     if (RT_SUCCESS(rc))
                     {
-                        /** todo: verify VM config. */
+                        /** @todo verify VM config. */
                         break;
                     }
                 }
@@ -961,7 +961,7 @@ static DECLCALLBACK(int) ftmR3StandbyThread(RTTHREAD hThread, void *pvUser)
                 LogRel(("FTSync: TIMEOUT (%RX64 vs %RX64 ms): activate standby VM!\n", u64TimeNow, pVM->ftm.s.standby.u64LastHeartbeat + pVM->ftm.s.uInterval * 2));
 
                 pVM->ftm.s.fActivateStandby = true;
-                /** todo: prevent split-brain. */
+                /** @todo prevent split-brain. */
                 break;
             }
         }
diff --git a/src/VBox/VMM/VMMR3/GIM.cpp b/src/VBox/VMM/VMMR3/GIM.cpp
index b286547..8c4aefe 100644
--- a/src/VBox/VMM/VMMR3/GIM.cpp
+++ b/src/VBox/VMM/VMMR3/GIM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -74,7 +74,6 @@
 *********************************************************************************************************************************/
 static FNSSMINTSAVEEXEC  gimR3Save;
 static FNSSMINTLOADEXEC  gimR3Load;
-static FNPGMPHYSHANDLER  gimR3Mmio2WriteHandler;
 
 
 /**
@@ -307,12 +306,12 @@ static DECLCALLBACK(int) gimR3Load(PVM pVM, PSSMHANDLE pSSM, uint32_t uVersion,
     switch (pVM->gim.s.enmProviderId)
     {
         case GIMPROVIDERID_HYPERV:
-            rc = gimR3HvLoad(pVM, pSSM, uVersion);
+            rc = gimR3HvLoad(pVM, pSSM);
             AssertRCReturn(rc, rc);
             break;
 
         case GIMPROVIDERID_KVM:
-            rc = gimR3KvmLoad(pVM, pSSM, uVersion);
+            rc = gimR3KvmLoad(pVM, pSSM);
             AssertRCReturn(rc, rc);
             break;
 
@@ -517,6 +516,7 @@ VMMR3DECL(PGIMMMIO2REGION) GIMR3GetMmio2Regions(PVM pVM, uint32_t *pcRegions)
     return NULL;
 }
 
+#if 0 /* ??? */
 
 /**
  * @callback_method_impl{FNPGMPHYSHANDLER,
@@ -529,6 +529,9 @@ static DECLCALLBACK(VBOXSTRICTRC) gimR3Mmio2WriteHandler(PVM pVM, PVMCPU pVCpu,
                                                          size_t cbBuf, PGMACCESSTYPE enmAccessType, PGMACCESSORIGIN enmOrigin,
                                                          void *pvUser)
 {
+    RT_NOREF6(pVM, pVCpu, GCPhys, pvPhys, pvBuf, cbBuf);
+    RT_NOREF3(enmAccessType, enmOrigin, pvUser);
+
     /*
      * Ignore writes to the mapped MMIO2 page.
      */
@@ -537,7 +540,6 @@ static DECLCALLBACK(VBOXSTRICTRC) gimR3Mmio2WriteHandler(PVM pVM, PVMCPU pVCpu,
 }
 
 
-#if 0
 /**
  * Unmaps a registered MMIO2 region in the guest address space and removes any
  * access handlers for it.
@@ -678,5 +680,6 @@ VMMR3_INT_DECL(int) gimR3Mmio2HandlerPhysicalDeregister(PVM pVM, PGIMMMIO2REGION
 {
     return PGMHandlerPhysicalDeregister(pVM, pRegion->GCPhysPage);
 }
+
 #endif
 
diff --git a/src/VBox/VMM/VMMR3/GIMHv.cpp b/src/VBox/VMM/VMMR3/GIMHv.cpp
index 1bb47e2..3402a6b 100644
--- a/src/VBox/VMM/VMMR3/GIMHv.cpp
+++ b/src/VBox/VMM/VMMR3/GIMHv.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -179,7 +179,9 @@ static const uint8_t g_abArpReply[] =
 static int    gimR3HvInitHypercallSupport(PVM pVM);
 static void   gimR3HvTermHypercallSupport(PVM pVM);
 static int    gimR3HvInitDebugSupport(PVM pVM);
+#if 0 /** @todo currently unused, which is probably very wrong */
 static void   gimR3HvTermDebugSupport(PVM pVM);
+#endif
 
 
 /**
@@ -220,8 +222,13 @@ VMMR3_INT_DECL(int) gimR3HvInit(PVM pVM, PCFGMNODE pGimCfg)
     char szVendor[13];
     rc = CFGMR3QueryStringDef(pCfgHv, "VendorID", szVendor, sizeof(szVendor), "VBoxVBoxVBox");
     AssertLogRelRCReturn(rc, rc);
+    AssertLogRelMsgReturn(strlen(szVendor) == 12,
+                          ("The VendorID config value must be exactly 12 chars, '%s' isn't!\n", szVendor),
+                          VERR_INVALID_PARAMETER);
 
     LogRel(("GIM: HyperV: Reporting vendor as '%s'\n", szVendor));
+    /** @todo r=bird: GIM_HV_VENDOR_MICROSOFT is 12 char and the string is max
+     *        12+terminator, so the NCmp is a little bit misleading. */
     if (!RTStrNCmp(szVendor, GIM_HV_VENDOR_MICROSOFT, sizeof(GIM_HV_VENDOR_MICROSOFT) - 1))
     {
         LogRel(("GIM: HyperV: Warning! Posing as the Microsoft vendor may alter guest behaviour!\n"));
@@ -318,13 +325,15 @@ VMMR3_INT_DECL(int) gimR3HvInit(PVM pVM, PCFGMNODE pGimCfg)
                                 | GIM_HV_PART_FLAGS_CPU_PROFILER)));
     Assert((pHv->uBaseFeat & (GIM_HV_BASE_FEAT_HYPERCALL_MSRS | GIM_HV_BASE_FEAT_VP_ID_MSR))
                           == (GIM_HV_BASE_FEAT_HYPERCALL_MSRS | GIM_HV_BASE_FEAT_VP_ID_MSR));
+#ifdef VBOX_STRICT
     for (unsigned i = 0; i < RT_ELEMENTS(pHv->aMmio2Regions); i++)
     {
-        PCGIMMMIO2REGION pcCur = &pHv->aMmio2Regions[i];
-        Assert(!pcCur->fRCMapping);
-        Assert(!pcCur->fMapped);
-        Assert(pcCur->GCPhysPage == NIL_RTGCPHYS);
+        PCGIMMMIO2REGION pCur = &pHv->aMmio2Regions[i];
+        Assert(!pCur->fRCMapping);
+        Assert(!pCur->fMapped);
+        Assert(pCur->GCPhysPage == NIL_RTGCPHYS);
     }
+#endif
 
     /*
      * Expose HVP (Hypervisor Present) bit to the guest.
@@ -435,9 +444,13 @@ VMMR3_INT_DECL(int) gimR3HvInit(PVM pVM, PCFGMNODE pGimCfg)
      * Setup non-zero MSRs.
      */
     if (pHv->uMiscFeat & GIM_HV_MISC_FEAT_GUEST_CRASH_MSRS)
-        pHv->uCrashCtlMsr = MSR_GIM_HV_CRASH_CTL_NOTIFY_BIT;
+        pHv->uCrashCtlMsr = MSR_GIM_HV_CRASH_CTL_NOTIFY;
     for (VMCPUID i = 0; i < pVM->cCpus; i++)
-        pVM->aCpus[i].gim.s.u.HvCpu.uSint2Msr = MSR_GIM_HV_SINT_MASKED_BIT;
+    {
+        PGIMHVCPU pHvCpu = &pVM->aCpus[i].gim.s.u.HvCpu;
+        for (size_t idxSintMsr = 0; idxSintMsr < RT_ELEMENTS(pHvCpu->auSintXMsr); idxSintMsr++)
+            pHvCpu->auSintXMsr[idxSintMsr] = MSR_GIM_HV_SINT_MASKED;
+    }
 
     /*
      * Setup hypercall support.
@@ -553,10 +566,12 @@ VMMR3_INT_DECL(void) gimR3HvReset(PVM pVM)
     pHv->uDbgRecvBufferMsr    = 0;
     for (VMCPUID i = 0; i < pVM->cCpus; i++)
     {
-        PVMCPU pVCpu = &pVM->aCpus[i];
-        pVCpu->gim.s.u.HvCpu.uSint2Msr = MSR_GIM_HV_SINT_MASKED_BIT;
-        pVCpu->gim.s.u.HvCpu.uSimpMsr  = 0;
-        pVCpu->gim.s.u.HvCpu.uApicAssistPageMsr = 0;
+        PGIMHVCPU pHvCpu = &pVM->aCpus[i].gim.s.u.HvCpu;
+        pHvCpu->uSimpMsr  = 0;
+        pHvCpu->uSiefpMsr = 0;
+        pHvCpu->uApicAssistPageMsr = 0;
+        for (size_t idxSintMsr = 0; idxSintMsr < RT_ELEMENTS(pHvCpu->auSintXMsr); idxSintMsr++)
+            pHvCpu->auSintXMsr[idxSintMsr] = MSR_GIM_HV_SINT_MASKED;
     }
 }
 
@@ -653,11 +668,11 @@ VMMR3_INT_DECL(int) gimR3HvGetDebugSetup(PVM pVM, PGIMDEBUGSETUP pDbgSetup)
  *
  * @returns VBox status code.
  * @param   pVM     The cross context VM structure.
- * @param   pSSM    Pointer to the SSM handle.
+ * @param   pSSM    The saved state handle.
  */
 VMMR3_INT_DECL(int) gimR3HvSave(PVM pVM, PSSMHANDLE pSSM)
 {
-    PCGIMHV pcHv = &pVM->gim.s.u.Hv;
+    PCGIMHV pHv = &pVM->gim.s.u.Hv;
 
     /*
      * Save the Hyper-V SSM version.
@@ -667,68 +682,68 @@ VMMR3_INT_DECL(int) gimR3HvSave(PVM pVM, PSSMHANDLE pSSM)
     /*
      * Save per-VM MSRs.
      */
-    SSMR3PutU64(pSSM, pcHv->u64GuestOsIdMsr);
-    SSMR3PutU64(pSSM, pcHv->u64HypercallMsr);
-    SSMR3PutU64(pSSM, pcHv->u64TscPageMsr);
+    SSMR3PutU64(pSSM, pHv->u64GuestOsIdMsr);
+    SSMR3PutU64(pSSM, pHv->u64HypercallMsr);
+    SSMR3PutU64(pSSM, pHv->u64TscPageMsr);
 
     /*
      * Save Hyper-V features / capabilities.
      */
-    SSMR3PutU32(pSSM, pcHv->uBaseFeat);
-    SSMR3PutU32(pSSM, pcHv->uPartFlags);
-    SSMR3PutU32(pSSM, pcHv->uPowMgmtFeat);
-    SSMR3PutU32(pSSM, pcHv->uMiscFeat);
-    SSMR3PutU32(pSSM, pcHv->uHyperHints);
-    SSMR3PutU32(pSSM, pcHv->uHyperCaps);
+    SSMR3PutU32(pSSM, pHv->uBaseFeat);
+    SSMR3PutU32(pSSM, pHv->uPartFlags);
+    SSMR3PutU32(pSSM, pHv->uPowMgmtFeat);
+    SSMR3PutU32(pSSM, pHv->uMiscFeat);
+    SSMR3PutU32(pSSM, pHv->uHyperHints);
+    SSMR3PutU32(pSSM, pHv->uHyperCaps);
 
     /*
      * Save the Hypercall region.
      */
-    PCGIMMMIO2REGION pcRegion = &pcHv->aMmio2Regions[GIM_HV_HYPERCALL_PAGE_REGION_IDX];
-    SSMR3PutU8(pSSM,     pcRegion->iRegion);
-    SSMR3PutBool(pSSM,   pcRegion->fRCMapping);
-    SSMR3PutU32(pSSM,    pcRegion->cbRegion);
-    SSMR3PutGCPhys(pSSM, pcRegion->GCPhysPage);
-    SSMR3PutStrZ(pSSM,   pcRegion->szDescription);
+    PCGIMMMIO2REGION pRegion = &pHv->aMmio2Regions[GIM_HV_HYPERCALL_PAGE_REGION_IDX];
+    SSMR3PutU8(pSSM,     pRegion->iRegion);
+    SSMR3PutBool(pSSM,   pRegion->fRCMapping);
+    SSMR3PutU32(pSSM,    pRegion->cbRegion);
+    SSMR3PutGCPhys(pSSM, pRegion->GCPhysPage);
+    SSMR3PutStrZ(pSSM,   pRegion->szDescription);
 
     /*
      * Save the reference TSC region.
      */
-    pcRegion = &pcHv->aMmio2Regions[GIM_HV_REF_TSC_PAGE_REGION_IDX];
-    SSMR3PutU8(pSSM,     pcRegion->iRegion);
-    SSMR3PutBool(pSSM,   pcRegion->fRCMapping);
-    SSMR3PutU32(pSSM,    pcRegion->cbRegion);
-    SSMR3PutGCPhys(pSSM, pcRegion->GCPhysPage);
-    SSMR3PutStrZ(pSSM,   pcRegion->szDescription);
+    pRegion = &pHv->aMmio2Regions[GIM_HV_REF_TSC_PAGE_REGION_IDX];
+    SSMR3PutU8(pSSM,     pRegion->iRegion);
+    SSMR3PutBool(pSSM,   pRegion->fRCMapping);
+    SSMR3PutU32(pSSM,    pRegion->cbRegion);
+    SSMR3PutGCPhys(pSSM, pRegion->GCPhysPage);
+    SSMR3PutStrZ(pSSM,   pRegion->szDescription);
     /* Save the TSC sequence so we can bump it on restore (as the CPU frequency/offset may change). */
     uint32_t uTscSequence = 0;
-    if (   pcRegion->fMapped
-        && MSR_GIM_HV_REF_TSC_IS_ENABLED(pcHv->u64TscPageMsr))
+    if (   pRegion->fMapped
+        && MSR_GIM_HV_REF_TSC_IS_ENABLED(pHv->u64TscPageMsr))
     {
-        PCGIMHVREFTSC pcRefTsc = (PCGIMHVREFTSC)pcRegion->pvPageR3;
-        uTscSequence = pcRefTsc->u32TscSequence;
+        PCGIMHVREFTSC pRefTsc = (PCGIMHVREFTSC)pRegion->pvPageR3;
+        uTscSequence = pRefTsc->u32TscSequence;
     }
     SSMR3PutU32(pSSM, uTscSequence);
 
     /*
      * Save debug support data.
      */
-    SSMR3PutU64(pSSM, pcHv->uDbgPendingBufferMsr);
-    SSMR3PutU64(pSSM, pcHv->uDbgSendBufferMsr);
-    SSMR3PutU64(pSSM, pcHv->uDbgRecvBufferMsr);
-    SSMR3PutU64(pSSM, pcHv->uDbgStatusMsr);
-    SSMR3PutU32(pSSM, pcHv->enmDbgReply);
-    SSMR3PutU32(pSSM, pcHv->uDbgBootpXId);
-    SSMR3PutU32(pSSM, pcHv->DbgGuestIp4Addr.u);
+    SSMR3PutU64(pSSM, pHv->uDbgPendingBufferMsr);
+    SSMR3PutU64(pSSM, pHv->uDbgSendBufferMsr);
+    SSMR3PutU64(pSSM, pHv->uDbgRecvBufferMsr);
+    SSMR3PutU64(pSSM, pHv->uDbgStatusMsr);
+    SSMR3PutU32(pSSM, pHv->enmDbgReply);
+    SSMR3PutU32(pSSM, pHv->uDbgBootpXId);
+    SSMR3PutU32(pSSM, pHv->DbgGuestIp4Addr.u);
 
     for (VMCPUID i = 0; i < pVM->cCpus; i++)
     {
         PGIMHVCPU pHvCpu = &pVM->aCpus[i].gim.s.u.HvCpu;
         SSMR3PutU64(pSSM, pHvCpu->uSimpMsr);
-        SSMR3PutU64(pSSM, pHvCpu->uSint2Msr);
+        SSMR3PutU64(pSSM, pHvCpu->auSintXMsr[GIM_HV_VMBUS_MSG_SINT]);
     }
 
-    return SSMR3PutU8(pSSM, UINT8_MAX);;
+    return SSMR3PutU8(pSSM, UINT8_MAX);
 }
 
 
@@ -737,10 +752,9 @@ VMMR3_INT_DECL(int) gimR3HvSave(PVM pVM, PSSMHANDLE pSSM)
  *
  * @returns VBox status code.
  * @param   pVM             The cross context VM structure.
- * @param   pSSM            Pointer to the SSM handle.
- * @param   uSSMVersion     The GIM saved-state version.
+ * @param   pSSM            The saved state handle.
  */
-VMMR3_INT_DECL(int) gimR3HvLoad(PVM pVM, PSSMHANDLE pSSM, uint32_t uSSMVersion)
+VMMR3_INT_DECL(int) gimR3HvLoad(PVM pVM, PSSMHANDLE pSSM)
 {
     /*
      * Load the Hyper-V SSM version first.
@@ -751,8 +765,8 @@ VMMR3_INT_DECL(int) gimR3HvLoad(PVM pVM, PSSMHANDLE pSSM, uint32_t uSSMVersion)
     if (   uHvSavedStatVersion != GIM_HV_SAVED_STATE_VERSION
         && uHvSavedStatVersion != GIM_HV_SAVED_STATE_VERSION_PRE_DEBUG)
         return SSMR3SetLoadError(pSSM, VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION, RT_SRC_POS,
-                                 N_("Unsupported Hyper-V saved-state version %u (current %u)!"), uHvSavedStatVersion,
-                                 GIM_HV_SAVED_STATE_VERSION);
+                                 N_("Unsupported Hyper-V saved-state version %u (current %u)!"),
+                                 uHvSavedStatVersion, GIM_HV_SAVED_STATE_VERSION);
 
     /*
      * Update the TSC frequency from TM.
@@ -855,7 +869,7 @@ VMMR3_INT_DECL(int) gimR3HvLoad(PVM pVM, PSSMHANDLE pSSM, uint32_t uSSMVersion)
         {
             PGIMHVCPU pHvCpu = &pVM->aCpus[i].gim.s.u.HvCpu;
             SSMR3GetU64(pSSM, &pHvCpu->uSimpMsr);
-            SSMR3GetU64(pSSM, &pHvCpu->uSint2Msr);
+            SSMR3GetU64(pSSM, &pHvCpu->auSintXMsr[GIM_HV_VMBUS_MSG_SINT]);
         }
 
         uint8_t bDelim;
@@ -872,11 +886,12 @@ VMMR3_INT_DECL(int) gimR3HvLoad(PVM pVM, PSSMHANDLE pSSM, uint32_t uSSMVersion)
  * Enables the Hyper-V APIC-assist page.
  *
  * @returns VBox status code.
- * @param   pVM                     The cross context VM structure.
+ * @param   pVCpu                   The cross context virtual CPU structure.
  * @param   GCPhysApicAssistPage    Where to map the APIC-assist page.
  */
-VMMR3_INT_DECL(int) gimR3HvEnableApicAssistPage(PVM pVM, RTGCPHYS GCPhysApicAssistPage)
+VMMR3_INT_DECL(int) gimR3HvEnableApicAssistPage(PVMCPU pVCpu, RTGCPHYS GCPhysApicAssistPage)
 {
+    PVM             pVM     = pVCpu->CTX_SUFF(pVM);
     PPDMDEVINSR3    pDevIns = pVM->gim.s.pDevInsR3;
     AssertPtrReturn(pDevIns, VERR_GIM_DEVICE_NOT_REGISTERED);
 
@@ -885,7 +900,7 @@ VMMR3_INT_DECL(int) gimR3HvEnableApicAssistPage(PVM pVM, RTGCPHYS GCPhysApicAssi
      */
     /** @todo this is buggy when large pages are used due to a PGM limitation, see
      *        @bugref{7532}. Instead of the overlay style mapping, we just
-     *               rewrite guest memory directly. */
+     *        rewrite guest memory directly. */
     size_t const cbApicAssistPage = PAGE_SIZE;
     void *pvApicAssist = RTMemAllocZ(cbApicAssistPage);
     if (RT_LIKELY(pvApicAssist))
@@ -894,11 +909,11 @@ VMMR3_INT_DECL(int) gimR3HvEnableApicAssistPage(PVM pVM, RTGCPHYS GCPhysApicAssi
         if (RT_SUCCESS(rc))
         {
             /** @todo Inform APIC. */
-            LogRel(("GIM: HyperV: Enabled APIC-assist page at %#RGp\n", GCPhysApicAssistPage));
+            LogRel(("GIM: HyperV%u: Enabled APIC-assist page at %#RGp\n", pVCpu->idCpu, GCPhysApicAssistPage));
         }
         else
         {
-            LogRelFunc(("GIM: HyperV: PGMPhysSimpleWriteGCPhys failed. rc=%Rrc\n", rc));
+            LogRelFunc(("GIM: HyperV%u: PGMPhysSimpleWriteGCPhys failed. rc=%Rrc\n", pVCpu->idCpu, rc));
             rc = VERR_GIM_OPERATION_FAILED;
         }
 
@@ -906,7 +921,7 @@ VMMR3_INT_DECL(int) gimR3HvEnableApicAssistPage(PVM pVM, RTGCPHYS GCPhysApicAssi
         return rc;
     }
 
-    LogRelFunc(("GIM: HyperV: Failed to alloc %u bytes\n", cbApicAssistPage));
+    LogRelFunc(("GIM: HyperV%u: Failed to alloc %u bytes\n", pVCpu->idCpu, cbApicAssistPage));
     return VERR_NO_MEMORY;
 }
 
@@ -915,17 +930,75 @@ VMMR3_INT_DECL(int) gimR3HvEnableApicAssistPage(PVM pVM, RTGCPHYS GCPhysApicAssi
  * Disables the Hyper-V APIC-assist page.
  *
  * @returns VBox status code.
- * @param   pVM     The cross context VM structure.
+ * @param   pVCpu   The cross context virtual CPU structure.
  */
-VMMR3_INT_DECL(int) gimR3HvDisableApicAssistPage(PVM pVM)
+VMMR3_INT_DECL(int) gimR3HvDisableApicAssistPage(PVMCPU pVCpu)
 {
-    LogRel(("GIM: HyperV: Disabled APIC-assist page\n"));
+    LogRel(("GIM: HyperV%u: Disabled APIC-assist page\n", pVCpu->idCpu));
     /** @todo inform APIC */
     return VINF_SUCCESS;
 }
 
 
 /**
+ * Enables the Hyper-V SIEF page.
+ *
+ * @returns VBox status code.
+ * @param   pVCpu           The cross context virtual CPU structure.
+ * @param   GCPhysSiefPage  Where to map the SIEF page.
+ */
+VMMR3_INT_DECL(int) gimR3HvEnableSiefPage(PVMCPU pVCpu, RTGCPHYS GCPhysSiefPage)
+{
+    PVM             pVM     = pVCpu->CTX_SUFF(pVM);
+    PPDMDEVINSR3    pDevIns = pVM->gim.s.pDevInsR3;
+    AssertPtrReturn(pDevIns, VERR_GIM_DEVICE_NOT_REGISTERED);
+
+    /*
+     * Map the SIEF page at the specified address.
+     */
+    /** @todo this is buggy when large pages are used due to a PGM limitation, see
+     *        @bugref{7532}. Instead of the overlay style mapping, we just
+     *        rewrite guest memory directly. */
+    size_t const cbSiefPage = PAGE_SIZE;
+    void *pvSiefPage = RTMemAllocZ(cbSiefPage);
+    if (RT_LIKELY(pvSiefPage))
+    {
+        int rc = PGMPhysSimpleWriteGCPhys(pVM, GCPhysSiefPage, pvSiefPage, cbSiefPage);
+        if (RT_SUCCESS(rc))
+        {
+            /** @todo SIEF setup. */
+            LogRel(("GIM: HyperV%u: Enabled SIEF page at %#RGp\n", pVCpu->idCpu, GCPhysSiefPage));
+        }
+        else
+        {
+            LogRelFunc(("GIM: HyperV%u: PGMPhysSimpleWriteGCPhys failed. rc=%Rrc\n", pVCpu->idCpu, rc));
+            rc = VERR_GIM_OPERATION_FAILED;
+        }
+
+        RTMemFree(pvSiefPage);
+        return rc;
+    }
+
+    LogRelFunc(("GIM: HyperV%u: Failed to alloc %u bytes\n", pVCpu->idCpu, cbSiefPage));
+    return VERR_NO_MEMORY;
+}
+
+
+/**
+ * Disables the Hyper-V SIEF page.
+ *
+ * @returns VBox status code.
+ * @param   pVCpu   The cross context virtual CPU structure.
+ */
+VMMR3_INT_DECL(int) gimR3HvDisableSiefPage(PVMCPU pVCpu)
+{
+    LogRel(("GIM: HyperV%u: Disabled APIC-assist page\n", pVCpu->idCpu));
+    /** @todo SIEF teardown. */
+    return VINF_SUCCESS;
+}
+
+
+/**
  * Enables the Hyper-V TSC page.
  *
  * @returns VBox status code.
@@ -965,7 +1038,7 @@ VMMR3_INT_DECL(int) gimR3HvEnableTscPage(PVM pVM, RTGCPHYS GCPhysTscPage, bool f
 
     /** @todo this is buggy when large pages are used due to a PGM limitation, see
      *        @bugref{7532}. Instead of the overlay style mapping, we just
-     *               rewrite guest memory directly. */
+     *        rewrite guest memory directly. */
 #if 0
     rc = gimR3Mmio2Map(pVM, pRegion, GCPhysTscPage);
     if (RT_SUCCESS(rc))
@@ -1042,6 +1115,65 @@ VMMR3_INT_DECL(int) gimR3HvEnableTscPage(PVM pVM, RTGCPHYS GCPhysTscPage, bool f
 
 
 /**
+ * Enables the Hyper-V SIM page.
+ *
+ * @returns VBox status code.
+ * @param   pVCpu           The cross context virtual CPU structure.
+ * @param   GCPhysSimPage   Where to map the SIM page.
+ */
+VMMR3_INT_DECL(int) gimR3HvEnableSimPage(PVMCPU pVCpu, RTGCPHYS GCPhysSimPage)
+{
+    PVM             pVM     = pVCpu->CTX_SUFF(pVM);
+    PPDMDEVINSR3    pDevIns = pVM->gim.s.pDevInsR3;
+    AssertPtrReturn(pDevIns, VERR_GIM_DEVICE_NOT_REGISTERED);
+
+    /*
+     * Map the SIMP page at the specified address.
+     */
+    /** @todo this is buggy when large pages are used due to a PGM limitation, see
+     *        @bugref{7532}. Instead of the overlay style mapping, we just
+     *        rewrite guest memory directly. */
+    size_t const cbSimPage = PAGE_SIZE;
+    void *pvSimPage = RTMemAllocZ(cbSimPage);
+    if (RT_LIKELY(pvSimPage))
+    {
+        int rc = PGMPhysSimpleWriteGCPhys(pVM, GCPhysSimPage, pvSimPage, cbSimPage);
+        if (RT_SUCCESS(rc))
+        {
+            /** @todo SIM setup. */
+            LogRel(("GIM: HyperV%u: Enabled SIM page at %#RGp\n", pVCpu->idCpu, GCPhysSimPage));
+        }
+        else
+        {
+            LogRelFunc(("GIM: HyperV%u: PGMPhysSimpleWriteGCPhys failed. rc=%Rrc\n", pVCpu->idCpu, rc));
+            rc = VERR_GIM_OPERATION_FAILED;
+        }
+
+        RTMemFree(pvSimPage);
+        return rc;
+    }
+
+    LogRelFunc(("GIM: HyperV%u: Failed to alloc %u bytes\n", pVCpu->idCpu, cbSimPage));
+    return VERR_NO_MEMORY;
+}
+
+
+/**
+ * Disables the Hyper-V SIM page.
+ *
+ * @returns VBox status code.
+ * @param   pVCpu   The cross context virtual CPU structure.
+ */
+VMMR3_INT_DECL(int) gimR3HvDisableSimPage(PVMCPU pVCpu)
+{
+    LogRel(("GIM: HyperV%u: Disabled SIM page\n", pVCpu->idCpu));
+    /** @todo SIM teardown. */
+    return VINF_SUCCESS;
+}
+
+
+
+/**
  * Disables the Hyper-V TSC page.
  *
  * @returns VBox status code.
@@ -1127,7 +1259,7 @@ VMMR3_INT_DECL(int) gimR3HvEnableHypercallPage(PVM pVM, RTGCPHYS GCPhysHypercall
 
     /** @todo this is buggy when large pages are used due to a PGM limitation, see
      *        @bugref{7532}. Instead of the overlay style mapping, we just
-     *               rewrite guest memory directly. */
+     *        rewrite guest memory directly. */
 #if 0
     int rc = gimR3Mmio2Map(pVM, pRegion, GCPhysHypercallPage);
     if (RT_SUCCESS(rc))
@@ -1217,7 +1349,6 @@ VMMR3_INT_DECL(int) gimR3HvEnableHypercallPage(PVM pVM, RTGCPHYS GCPhysHypercall
  */
 static int gimR3HvInitHypercallSupport(PVM pVM)
 {
-    int rc = VINF_SUCCESS;
     PGIMHV pHv = &pVM->gim.s.u.Hv;
     pHv->pbHypercallIn = (uint8_t *)RTMemAllocZ(GIM_HV_PAGE_SIZE);
     if (RT_LIKELY(pHv->pbHypercallIn))
@@ -1268,6 +1399,7 @@ static int gimR3HvInitDebugSupport(PVM pVM)
 }
 
 
+#if 0 /** @todo currently unused, which is probably very wrong */
 /**
  * Terminates Hyper-V guest debug support.
  *
@@ -1282,6 +1414,7 @@ static void gimR3HvTermDebugSupport(PVM pVM)
         pHv->pvDbgBuffer = NULL;
     }
 }
+#endif
 
 
 /**
@@ -1739,6 +1872,8 @@ VMMR3_INT_DECL(int) gimR3HvHypercallPostDebugData(PVM pVM, int *prcHv)
     /* Currently disabled as Windows 10 guest passes us undocumented flags. */
     if (fFlags & ~GIM_HV_DEBUG_POST_OPTIONS_MASK))
         rcHv = GIM_HV_STATUS_INVALID_PARAMETER;
+#else
+    RT_NOREF1(fFlags);
 #endif
     if (cbWrite > GIM_HV_DEBUG_MAX_DATA_SIZE)
         rcHv = GIM_HV_STATUS_INVALID_PARAMETER;
diff --git a/src/VBox/VMM/VMMR3/GIMKvm.cpp b/src/VBox/VMM/VMMR3/GIMKvm.cpp
index be235cf..86de42c 100644
--- a/src/VBox/VMM/VMMR3/GIMKvm.cpp
+++ b/src/VBox/VMM/VMMR3/GIMKvm.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -266,11 +266,11 @@ VMMR3_INT_DECL(void) gimR3KvmReset(PVM pVM)
  *
  * @returns VBox status code.
  * @param   pVM     The cross context VM structure.
- * @param   pSSM    Pointer to the SSM handle.
+ * @param   pSSM    The saved state handle.
  */
 VMMR3_INT_DECL(int) gimR3KvmSave(PVM pVM, PSSMHANDLE pSSM)
 {
-    PCGIMKVM pcKvm = &pVM->gim.s.u.Kvm;
+    PCGIMKVM pKvm = &pVM->gim.s.u.Kvm;
 
     /*
      * Save the KVM SSM version.
@@ -282,30 +282,30 @@ VMMR3_INT_DECL(int) gimR3KvmSave(PVM pVM, PSSMHANDLE pSSM)
      */
     for (uint32_t i = 0; i < pVM->cCpus; i++)
     {
-        PCGIMKVMCPU pcKvmCpu = &pVM->aCpus[i].gim.s.u.KvmCpu;
+        PCGIMKVMCPU pKvmCpu = &pVM->aCpus[i].gim.s.u.KvmCpu;
 
         /* Guest may alter flags (namely GIM_KVM_SYSTEM_TIME_FLAGS_GUEST_PAUSED bit). So re-read them from guest-memory. */
         GIMKVMSYSTEMTIME SystemTime;
         RT_ZERO(SystemTime);
-        if (MSR_GIM_KVM_SYSTEM_TIME_IS_ENABLED(pcKvmCpu->u64SystemTimeMsr))
+        if (MSR_GIM_KVM_SYSTEM_TIME_IS_ENABLED(pKvmCpu->u64SystemTimeMsr))
         {
-            int rc = PGMPhysSimpleReadGCPhys(pVM, &SystemTime, pcKvmCpu->GCPhysSystemTime, sizeof(GIMKVMSYSTEMTIME));
+            int rc = PGMPhysSimpleReadGCPhys(pVM, &SystemTime, pKvmCpu->GCPhysSystemTime, sizeof(GIMKVMSYSTEMTIME));
             AssertRCReturn(rc, rc);
         }
 
-        SSMR3PutU64(pSSM, pcKvmCpu->u64SystemTimeMsr);
-        SSMR3PutU64(pSSM, pcKvmCpu->uTsc);
-        SSMR3PutU64(pSSM, pcKvmCpu->uVirtNanoTS);
-        SSMR3PutGCPhys(pSSM, pcKvmCpu->GCPhysSystemTime);
-        SSMR3PutU32(pSSM, pcKvmCpu->u32SystemTimeVersion);
+        SSMR3PutU64(pSSM, pKvmCpu->u64SystemTimeMsr);
+        SSMR3PutU64(pSSM, pKvmCpu->uTsc);
+        SSMR3PutU64(pSSM, pKvmCpu->uVirtNanoTS);
+        SSMR3PutGCPhys(pSSM, pKvmCpu->GCPhysSystemTime);
+        SSMR3PutU32(pSSM, pKvmCpu->u32SystemTimeVersion);
         SSMR3PutU8(pSSM, SystemTime.fFlags);
     }
 
     /*
      * Save per-VM data.
      */
-    SSMR3PutU64(pSSM, pcKvm->u64WallClockMsr);
-    return SSMR3PutU32(pSSM, pcKvm->uBaseFeat);
+    SSMR3PutU64(pSSM, pKvm->u64WallClockMsr);
+    return SSMR3PutU32(pSSM, pKvm->uBaseFeat);
 }
 
 
@@ -314,10 +314,9 @@ VMMR3_INT_DECL(int) gimR3KvmSave(PVM pVM, PSSMHANDLE pSSM)
  *
  * @returns VBox status code.
  * @param   pVM             The cross context VM structure.
- * @param   pSSM            Pointer to the SSM handle.
- * @param   uSSMVersion     The GIM saved-state version.
+ * @param   pSSM            The saved state handle.
  */
-VMMR3_INT_DECL(int) gimR3KvmLoad(PVM pVM, PSSMHANDLE pSSM, uint32_t uSSMVersion)
+VMMR3_INT_DECL(int) gimR3KvmLoad(PVM pVM, PSSMHANDLE pSSM)
 {
     /*
      * Load the KVM SSM version first.
@@ -327,8 +326,8 @@ VMMR3_INT_DECL(int) gimR3KvmLoad(PVM pVM, PSSMHANDLE pSSM, uint32_t uSSMVersion)
     AssertRCReturn(rc, rc);
     if (uKvmSavedStatVersion != GIM_KVM_SAVED_STATE_VERSION)
         return SSMR3SetLoadError(pSSM, VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION, RT_SRC_POS,
-                                 N_("Unsupported KVM saved-state version %u (expected %u)."), uKvmSavedStatVersion,
-                                 GIM_KVM_SAVED_STATE_VERSION);
+                                 N_("Unsupported KVM saved-state version %u (expected %u)."),
+                                 uKvmSavedStatVersion, GIM_KVM_SAVED_STATE_VERSION);
 
     /*
      * Update the TSC frequency from TM.
@@ -344,7 +343,6 @@ VMMR3_INT_DECL(int) gimR3KvmLoad(PVM pVM, PSSMHANDLE pSSM, uint32_t uSSMVersion)
         PVMCPU     pVCpu   = &pVM->aCpus[i];
         PGIMKVMCPU pKvmCpu = &pVCpu->gim.s.u.KvmCpu;
 
-        uint8_t fSystemTimeFlags = 0;
         SSMR3GetU64(pSSM, &pKvmCpu->u64SystemTimeMsr);
         SSMR3GetU64(pSSM, &pKvmCpu->uTsc);
         SSMR3GetU64(pSSM, &pKvmCpu->uVirtNanoTS);
@@ -473,11 +471,11 @@ VMMR3_INT_DECL(int) gimR3KvmDisableSystemTime(PVM pVM)
  * @callback_method_impl{PFNVMMEMTRENDEZVOUS,
  *      Worker for gimR3KvmEnableWallClock}
  */
-static DECLCALLBACK(VBOXSTRICTRC) gimR3KvmEnableWallClockCallback(PVM pVM, PVMCPU pVCpu, void *pvData)
+static DECLCALLBACK(VBOXSTRICTRC) gimR3KvmEnableWallClockCallback(PVM pVM, PVMCPU pVCpu, void *pvUser)
 {
-    Assert(pvData);
-    PKVMWALLCLOCKINFO pWallClockInfo  = (PKVMWALLCLOCKINFO)pvData;
+    PKVMWALLCLOCKINFO pWallClockInfo  = (PKVMWALLCLOCKINFO)pvUser; AssertPtr(pWallClockInfo);
     RTGCPHYS          GCPhysWallClock = pWallClockInfo->GCPhysWallClock;
+    RT_NOREF1(pVCpu);
 
     /*
      * Read the wall-clock version (sequence) from the guest.
@@ -494,6 +492,7 @@ static DECLCALLBACK(VBOXSTRICTRC) gimR3KvmEnableWallClockCallback(PVM pVM, PVMCP
     /*
      * Ensure the version is incrementally even.
      */
+    /* faster: uVersion = (uVersion | 1) + 1; */
     if (!(uVersion & 1))
         ++uVersion;
     ++uVersion;
@@ -520,10 +519,8 @@ static DECLCALLBACK(VBOXSTRICTRC) gimR3KvmEnableWallClockCallback(PVM pVM, PVMCP
     Assert(!(WallClock.u32Version & 1));
     rc = PGMPhysSimpleWriteGCPhys(pVM, GCPhysWallClock, &WallClock, sizeof(GIMKVMWALLCLOCK));
     if (RT_SUCCESS(rc))
-    {
         LogRel(("GIM: KVM: Enabled wall-clock struct. at %#RGp - u32Sec=%u u32Nano=%u uVersion=%#RU32\n", GCPhysWallClock,
                 WallClock.u32Sec, WallClock.u32Nano, WallClock.u32Version));
-    }
     else
         LogRel(("GIM: KVM: Failed to write wall-clock struct. at %#RGp. rc=%Rrc\n", GCPhysWallClock, rc));
     return rc;
diff --git a/src/VBox/VMM/VMMR3/GIMMinimal.cpp b/src/VBox/VMM/VMMR3/GIMMinimal.cpp
index fa431bb..9f6a93f 100644
--- a/src/VBox/VMM/VMMR3/GIMMinimal.cpp
+++ b/src/VBox/VMM/VMMR3/GIMMinimal.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -49,11 +49,36 @@ VMMR3_INT_DECL(int) gimR3MinimalInit(PVM pVM)
     AssertReturn(pVM->gim.s.enmProviderId == GIMPROVIDERID_MINIMAL, VERR_INTERNAL_ERROR_5);
 
     /*
-     * Enable the Hypervisor Present.
+     * Expose HVP (Hypervisor Present) bit to the guest.
      */
     CPUMR3SetGuestCpuIdFeature(pVM, CPUMCPUIDFEATURE_HVP);
 
-    return VINF_SUCCESS;
+    /*
+     * Insert the hypervisor leaf range.
+     */
+    CPUMCPUIDLEAF HyperLeaf;
+    RT_ZERO(HyperLeaf);
+    HyperLeaf.uLeaf = UINT32_C(0x40000000);
+    HyperLeaf.uEax  = UINT32_C(0x40000010); /* Maximum leaf we implement. */
+    int rc = CPUMR3CpuIdInsert(pVM, &HyperLeaf);
+    if (RT_SUCCESS(rc))
+    {
+        /*
+         * Insert missing zero leaves (you never know what missing leaves are
+         * going to return when read).
+         */
+        RT_ZERO(HyperLeaf);
+        for (uint32_t uLeaf = UINT32_C(0x40000001); uLeaf <= UINT32_C(0x40000010); uLeaf++)
+        {
+            HyperLeaf.uLeaf = uLeaf;
+            rc = CPUMR3CpuIdInsert(pVM, &HyperLeaf);
+            AssertLogRelRCReturn(rc, rc);
+        }
+    }
+    else
+        LogRel(("GIM: Minimal: Failed to insert hypervisor leaf %#RX32. rc=%Rrc\n", HyperLeaf.uLeaf, rc));
+
+    return rc;
 }
 
 
@@ -77,25 +102,7 @@ VMMR3_INT_DECL(int) gimR3MinimalInitCompleted(PVM pVM)
     int rc = CPUMR3CpuIdGetLeaf(pVM, &HyperLeaf, 0x40000000, 0 /* uSubLeaf */);
     if (RT_SUCCESS(rc))
     {
-        HyperLeaf.uEax         = UINT32_C(0x40000010);  /* Maximum leaf we implement. */
-        rc = CPUMR3CpuIdInsert(pVM, &HyperLeaf);
-        AssertLogRelRCReturn(rc, rc);
-
-        /*
-         * Insert missing zero leaves (you never know what missing leaves are
-         * going to return when read).
-         */
-        for (uint32_t uLeaf = UINT32_C(0x40000001); uLeaf < UINT32_C(0x40000010); uLeaf++)
-        {
-            rc = CPUMR3CpuIdGetLeaf(pVM, &HyperLeaf, uLeaf, 0 /* uSubLeaf */);
-            if (RT_FAILURE(rc))
-            {
-                RT_ZERO(HyperLeaf);
-                HyperLeaf.uLeaf = uLeaf;
-                rc = CPUMR3CpuIdInsert(pVM, &HyperLeaf);
-                AssertLogRelRCReturn(rc, rc);
-            }
-        }
+        Assert(HyperLeaf.uEax >= 0x40000010);
 
         /*
          * Add the timing information hypervisor leaf.
@@ -117,7 +124,7 @@ VMMR3_INT_DECL(int) gimR3MinimalInitCompleted(PVM pVM)
         AssertLogRelRCReturn(rc, rc);
     }
     else
-        LogRel(("GIM: Minimal: failed to get hypervisor leaf 0x40000000.\n"));
+        LogRel(("GIM: Minimal: failed to get hypervisor leaf 0x40000000. rc=%Rrc\n", rc));
 
     return VINF_SUCCESS;
 }
diff --git a/src/VBox/VMM/VMMR3/GMM.cpp b/src/VBox/VMM/VMMR3/GMM.cpp
index ff4e9e2..c202112 100644
--- a/src/VBox/VMM/VMMR3/GMM.cpp
+++ b/src/VBox/VMM/VMMR3/GMM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/HM.cpp b/src/VBox/VMM/VMMR3/HM.cpp
index 6c079ad..8aa0369 100644
--- a/src/VBox/VMM/VMMR3/HM.cpp
+++ b/src/VBox/VMM/VMMR3/HM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -32,6 +32,7 @@
  * @sa @ref grp_hm
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
@@ -1773,6 +1774,8 @@ VMMR3_INT_DECL(void) HMR3Relocate(PVM pVM)
  */
 VMMR3_INT_DECL(void) HMR3PagingModeChanged(PVM pVM, PVMCPU pVCpu, PGMMODE enmShadowMode, PGMMODE enmGuestMode)
 {
+    RT_NOREF_PV(pVM);
+
     /* Ignore page mode changes during state loading. */
     if (VMR3GetState(pVCpu->pVMR3) == VMSTATE_LOADING)
         return;
@@ -2039,11 +2042,12 @@ VMMR3_INT_DECL(int)  HMR3EnablePatching(PVM pVM, RTGCPTR pPatchMem, unsigned cbP
 VMMR3_INT_DECL(int)  HMR3DisablePatching(PVM pVM, RTGCPTR pPatchMem, unsigned cbPatchMem)
 {
     Log(("HMR3DisablePatching %RGv size %x\n", pPatchMem, cbPatchMem));
+    RT_NOREF2(pPatchMem, cbPatchMem);
 
     Assert(pVM->hm.s.pGuestPatchMem == pPatchMem);
     Assert(pVM->hm.s.cbGuestPatchMem == cbPatchMem);
 
-    /* @todo Potential deadlock when other VCPUs are waiting on the IOM lock (we own it)!! */
+    /** @todo Potential deadlock when other VCPUs are waiting on the IOM lock (we own it)!! */
     int rc = VMMR3EmtRendezvous(pVM, VMMEMTRENDEZVOUS_FLAGS_TYPE_ONE_BY_ONE, hmR3RemovePatches,
                                 (void *)(uintptr_t)VMMGetCpuId(pVM));
     AssertRC(rc);
diff --git a/src/VBox/VMM/VMMR3/IEMR3.cpp b/src/VBox/VMM/VMMR3/IEMR3.cpp
index b6bd748..0f3e507 100644
--- a/src/VBox/VMM/VMMR3/IEMR3.cpp
+++ b/src/VBox/VMM/VMMR3/IEMR3.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/IOM.cpp b/src/VBox/VMM/VMMR3/IOM.cpp
index 7199457..8666bce 100644
--- a/src/VBox/VMM/VMMR3/IOM.cpp
+++ b/src/VBox/VMM/VMMR3/IOM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -918,7 +918,9 @@ VMMR3_INT_DECL(int) IOMR3IOPortDeregister(PVM pVM, PPDMDEVINS pDevIns, RTIOPORT
                 IOM_UNLOCK_EXCL(pVM);
                 return VERR_IOM_NOT_IOPORT_RANGE_OWNER;
             }
-#endif /* !IOM_NO_PDMINS_CHECKS */
+#else  /* IOM_NO_PDMINS_CHECKS */
+            RT_NOREF_PV(pDevIns);
+#endif /* IOM_NO_PDMINS_CHECKS */
             Port = pRange->Core.KeyLast;
         }
         Port++;
@@ -1781,6 +1783,7 @@ VMMR3_INT_DECL(VBOXSTRICTRC) IOMR3ProcessForceFlag(PVM pVM, PVMCPU pVCpu, VBOXST
 VMMR3_INT_DECL(void) IOMR3NotifyBreakpointCountChange(PVM pVM, bool fPortIo, bool fMmio)
 {
     /** @todo I/O breakpoints. */
+    RT_NOREF3(pVM, fPortIo, fMmio);
 }
 
 
@@ -1796,6 +1799,7 @@ VMMR3_INT_DECL(void) IOMR3NotifyBreakpointCountChange(PVM pVM, bool fPortIo, boo
 VMMR3_INT_DECL(void) IOMR3NotifyDebugEventChange(PVM pVM, DBGFEVENT enmEvent, bool fEnabled)
 {
     /** @todo IOM debug events. */
+    RT_NOREF3(pVM, enmEvent, fEnabled);
 }
 
 
diff --git a/src/VBox/VMM/VMMR3/MM.cpp b/src/VBox/VMM/VMMR3/MM.cpp
index 07dde00..aeb4589 100644
--- a/src/VBox/VMM/VMMR3/MM.cpp
+++ b/src/VBox/VMM/VMMR3/MM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/MMHeap.cpp b/src/VBox/VMM/VMMR3/MMHeap.cpp
index 7b6d7a8..5d83d0b 100644
--- a/src/VBox/VMM/VMMR3/MMHeap.cpp
+++ b/src/VBox/VMM/VMMR3/MMHeap.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -344,6 +344,8 @@ void *mmR3HeapAlloc(PMMHEAP pHeap, MMTAG enmTag, size_t cbSize, bool fZero)
         STAMR3RegisterFU(pUVM, &pStat->cbAllocated,    STAMTYPE_U64, STAMVISIBILITY_ALWAYS,  STAMUNIT_BYTES, "Total number of bytes allocated.",        "/MM/R3Heap/%s/cbAllocated", pszTag);
         STAMR3RegisterFU(pUVM, &pStat->cbFreed,        STAMTYPE_U64, STAMVISIBILITY_ALWAYS,  STAMUNIT_BYTES, "Total number of bytes freed.",            "/MM/R3Heap/%s/cbFreed", pszTag);
     }
+#else
+    RT_NOREF_PV(enmTag);
 #endif
 
     /*
diff --git a/src/VBox/VMM/VMMR3/MMHyper.cpp b/src/VBox/VMM/VMMR3/MMHyper.cpp
index c0b63e1..8c9bfb0 100644
--- a/src/VBox/VMM/VMMR3/MMHyper.cpp
+++ b/src/VBox/VMM/VMMR3/MMHyper.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/MMPagePool.cpp b/src/VBox/VMM/VMMR3/MMPagePool.cpp
index dce775c..11d5c59 100644
--- a/src/VBox/VMM/VMMR3/MMPagePool.cpp
+++ b/src/VBox/VMM/VMMR3/MMPagePool.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/MMUkHeap.cpp b/src/VBox/VMM/VMMR3/MMUkHeap.cpp
index 3701aa0..5ebf73b 100644
--- a/src/VBox/VMM/VMMR3/MMUkHeap.cpp
+++ b/src/VBox/VMM/VMMR3/MMUkHeap.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -287,6 +287,8 @@ static void *mmR3UkHeapAlloc(PMMUKHEAP pHeap, MMTAG enmTag, size_t cb, bool fZer
         STAMR3RegisterFU(pUVM, &pStat->cbAllocated,    STAMTYPE_U64, STAMVISIBILITY_ALWAYS,  STAMUNIT_BYTES, "Total number of bytes allocated.",        "/MM/UkHeap/%s/cbAllocated", pszTag);
         STAMR3RegisterFU(pUVM, &pStat->cbFreed,        STAMTYPE_U64, STAMVISIBILITY_ALWAYS,  STAMUNIT_BYTES, "Total number of bytes freed.",            "/MM/UkHeap/%s/cbFreed", pszTag);
     }
+#else
+    RT_NOREF_PV(enmTag);
 #endif
 
     /*
@@ -411,6 +413,8 @@ VMMR3DECL(void) MMR3UkHeapFree(PVM pVM, void *pv, MMTAG enmTag)
             pHeap->Stat.cFrees++;
             pHeap->Stat.cbFreed           += cbActual;
             pHeap->Stat.cbCurAllocated    -= cbActual;
+#else
+            RT_NOREF_PV(enmTag);
 #endif
             RTHeapSimpleFree(pSubHeap->hSimple, pv);
 
diff --git a/src/VBox/VMM/VMMR3/PATM.cpp b/src/VBox/VMM/VMMR3/PATM.cpp
index 20d0be8..2b3d797 100644
--- a/src/VBox/VMM/VMMR3/PATM.cpp
+++ b/src/VBox/VMM/VMMR3/PATM.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -30,6 +30,7 @@
  * @sa @ref grp_patm
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
@@ -121,7 +122,9 @@ static void         patmPrintStat(PVM pVM, void *pvSample, char *pszBuf, size_t
 
 static int               patmReinit(PVM pVM);
 static DECLCALLBACK(int) patmR3RelocatePatches(PAVLOU32NODECORE pNode, void *pParam);
+#ifdef PATM_RESOLVE_CONFLICTS_WITH_JUMP_PATCHES
 static RTRCPTR      patmR3GuestGCPtrToPatchGCPtrSimple(PVM pVM, RCPTRTYPE(uint8_t*) pInstrGC);
+#endif
 static int          patmR3MarkDirtyPatch(PVM pVM, PPATCHINFO pPatch);
 
 #ifdef VBOX_WITH_DEBUGGER
@@ -458,7 +461,7 @@ static int patmReinit(PVM pVM)
     pVM->patm.s.deltaReloc           = 0;
 
     /* Lowest and highest patched instruction */
-    pVM->patm.s.pPatchedInstrGCLowest     = ~0;
+    pVM->patm.s.pPatchedInstrGCLowest     = RTRCPTR_MAX;
     pVM->patm.s.pPatchedInstrGCHighest    = 0;
 
     pVM->patm.s.PatchLookupTreeHC->PatchTree            = 0;
@@ -853,7 +856,7 @@ static DECLCALLBACK(int) patmR3RelocatePatches(PAVLOU32NODECORE pNode, void *pPa
                     /*
                      * Disable patch; this is not a good solution
                      */
-                     /* @todo hopefully it was completely overwritten (if the read was successful)!!!! */
+                     /** @todo hopefully it was completely overwritten (if the read was successful)!!!! */
                     pPatch->patch.uState = PATCH_DISABLED;
                 }
                 else
@@ -935,7 +938,7 @@ static DECLCALLBACK(int) patmR3RelocatePatches(PAVLOU32NODECORE pNode, void *pPa
                     /*
                      * Disable patch; this is not a good solution
                      */
-                     /* @todo hopefully it was completely overwritten (if the read was successful)!!!! */
+                     /** @todo hopefully it was completely overwritten (if the read was successful)!!!! */
                     pPatch->patch.uState = PATCH_DISABLED;
                 }
                 else
@@ -1650,7 +1653,7 @@ static int patmAnalyseFunctionCallback(PVM pVM, DISCPUSTATE *pCpu, RCPTRTYPE(uin
         }
 
     #if 0
-        ///@todo we can handle certain in/out and privileged instructions in the guest context
+        /// @todo we can handle certain in/out and privileged instructions in the guest context
         if (pCpu->pCurInstr->fOpType & DISOPTYPE_PRIVILEGED && pCpu->pCurInstr->uOpcode != OP_STI)
         {
             Log(("Illegal instructions for function patch!!\n"));
@@ -1988,7 +1991,7 @@ static DECLCALLBACK(int) patmRecompileCallback(PVM pVM, DISCPUSTATE *pCpu, RCPTR
         break;
 
     case OP_STR:
-#ifdef VBOX_WITH_SAFE_STR   /* @todo remove DISOPTYPE_PRIVILEGED_NOTRAP from disasm table and move OP_STR into #ifndef */
+#ifdef VBOX_WITH_SAFE_STR   /** @todo remove DISOPTYPE_PRIVILEGED_NOTRAP from disasm table and move OP_STR into ifndef */
         /* Now safe because our shadow TR entry is identical to the guest's. */
         goto duplicate_instr;
 #endif
@@ -2819,7 +2822,7 @@ static int patmR3PatchBlock(PVM pVM, RTRCPTR pInstrGC, R3PTRTYPE(uint8_t *) pIns
 {
     PPATCHINFO pPatch = &pPatchRec->patch;
     int rc = VERR_PATCHING_REFUSED;
-    uint32_t orgOffsetPatchMem = ~0;
+    uint32_t orgOffsetPatchMem = UINT32_MAX;
     RTRCPTR pInstrStart;
     bool fInserted;
     NOREF(pInstrHC); NOREF(uOpSize);
@@ -3055,7 +3058,7 @@ static int patmIdtHandler(PVM pVM, RTRCPTR pInstrGC, uint32_t uOpSize, PPATMPATC
     uint32_t cbInstr;
     RTRCPTR  pCurInstrGC = pInstrGC;
     uint8_t *pCurInstrHC, *pInstrHC;
-    uint32_t orgOffsetPatchMem = ~0;
+    uint32_t orgOffsetPatchMem = UINT32_MAX;
 
     pInstrHC = pCurInstrHC = patmR3GCVirtToHCVirt(pVM, pCacheRec, pCurInstrGC);
     AssertReturn(pCurInstrHC, VERR_PAGE_NOT_PRESENT);
@@ -3179,7 +3182,7 @@ static int patmInstallTrapTrampoline(PVM pVM, RTRCPTR pInstrGC, PPATMPATCHREC pP
 {
     PPATCHINFO pPatch = &pPatchRec->patch;
     int rc = VERR_PATCHING_REFUSED;
-    uint32_t orgOffsetPatchMem = ~0;
+    uint32_t orgOffsetPatchMem = UINT32_MAX;
     bool fInserted;
 
     // save original offset (in case of failures later on)
@@ -3214,6 +3217,8 @@ static int patmInstallTrapTrampoline(PVM pVM, RTRCPTR pInstrGC, PPATMPATCHREC pP
     Log(("Patch code ----------------------------------------------------------\n"));
     patmr3DisasmCodeStream(pVM, PATCHCODE_PTR_GC(pPatch), PATCHCODE_PTR_GC(pPatch), patmR3DisasmCallback, pCacheRec);
     Log(("Patch code ends -----------------------------------------------------\n"));
+#else
+    RT_NOREF_PV(pCacheRec);
 #endif
     PATM_LOG_ORG_PATCH_INSTR(pVM, pPatch, "TRAP handler");
     Log(("Successfully installed Trap Trampoline patch at %RRv\n", pInstrGC));
@@ -3280,7 +3285,7 @@ static int patmDuplicateFunction(PVM pVM, RTRCPTR pInstrGC, PPATMPATCHREC pPatch
 {
     PPATCHINFO pPatch = &pPatchRec->patch;
     int rc = VERR_PATCHING_REFUSED;
-    uint32_t orgOffsetPatchMem = ~0;
+    uint32_t orgOffsetPatchMem = UINT32_MAX;
     bool fInserted;
 
     Log(("patmDuplicateFunction %RRv\n", pInstrGC));
@@ -3411,7 +3416,7 @@ static int patmCreateTrampoline(PVM pVM, RTRCPTR pInstrGC, PPATMPATCHREC pPatchR
 {
     PPATCHINFO  pPatch = &pPatchRec->patch;
     RTRCPTR     pPage, pPatchTargetGC = 0;
-    uint32_t    orgOffsetPatchMem = ~0;
+    uint32_t    orgOffsetPatchMem = UINT32_MAX;
     int         rc = VERR_PATCHING_REFUSED;
     PPATCHINFO  pPatchToJmp = NULL; /**< Patch the trampoline jumps to. */
     PTRAMPREC   pTrampRec = NULL; /**< Trampoline record used to find the patch. */
@@ -3904,14 +3909,14 @@ static int patmActivateInt3Patch(PVM pVM, PPATCHINFO pPatch)
  */
 static int patmDeactivateInt3Patch(PVM pVM, PPATCHINFO pPatch)
 {
-    uint8_t ASMInt3 = 0xCC;
+    uint8_t cbASMInt3 = 1;
     int     rc;
 
     Assert(pPatch->flags & (PATMFL_INT3_REPLACEMENT|PATMFL_INT3_REPLACEMENT_BLOCK));
     Assert(pPatch->uState == PATCH_ENABLED || pPatch->uState == PATCH_DIRTY);
 
     /* Restore first opcode byte. */
-    rc = PGMPhysSimpleDirtyWriteGCPtr(VMMGetCpu0(pVM), pPatch->pPrivInstrGC, pPatch->aPrivInstr, sizeof(ASMInt3));
+    rc = PGMPhysSimpleDirtyWriteGCPtr(VMMGetCpu0(pVM), pPatch->pPrivInstrGC, pPatch->aPrivInstr, cbASMInt3);
     AssertRC(rc);
     return rc;
 }
@@ -3932,8 +3937,9 @@ static int patmDeactivateInt3Patch(PVM pVM, PPATCHINFO pPatch)
  */
 int patmR3PatchInstrInt3(PVM pVM, RTRCPTR pInstrGC, R3PTRTYPE(uint8_t *) pInstrHC, DISCPUSTATE *pCpu, PPATCHINFO pPatch)
 {
-    uint8_t bASMInt3 = 0xCC;
+    uint8_t cbASMInt3 = 1;
     int rc;
+    RT_NOREF_PV(pInstrHC);
 
     /* Note: Do not use patch memory here! It might called during patch installation too. */
     PATM_LOG_PATCH_INSTR(pVM, pPatch, PATMREAD_ORGCODE, "patmR3PatchInstrInt3:", "");
@@ -3941,7 +3947,7 @@ int patmR3PatchInstrInt3(PVM pVM, RTRCPTR pInstrGC, R3PTRTYPE(uint8_t *) pInstrH
     /* Save the original instruction. */
     rc = PGMPhysSimpleReadGCPtr(VMMGetCpu0(pVM), pPatch->aPrivInstr, pPatch->pPrivInstrGC, pPatch->cbPrivInstr);
     AssertRC(rc);
-    pPatch->cbPatchJump = sizeof(bASMInt3);  /* bit of a misnomer in this case; size of replacement instruction. */
+    pPatch->cbPatchJump = cbASMInt3;  /* bit of a misnomer in this case; size of replacement instruction. */
 
     pPatch->flags |= PATMFL_INT3_REPLACEMENT;
 
@@ -4099,7 +4105,7 @@ failure:
 VMMR3_INT_DECL(int) PATMR3AddHint(PVM pVM, RTRCPTR pInstrGC, uint32_t flags)
 {
     Assert(pInstrGC);
-    Assert(flags == PATMFL_CODE32);
+    Assert(flags == PATMFL_CODE32); RT_NOREF_PV(flags);
 
     Log(("PATMR3AddHint %RRv\n", pInstrGC));
     return PATMR3InstallPatch(pVM, pInstrGC, PATMFL_CODE32 | PATMFL_INSTR_HINT);
@@ -5420,6 +5426,8 @@ static int patmDisableUnusablePatch(PVM pVM, RTRCPTR pInstrGC, RTRCPTR pConflict
             return VINF_SUCCESS;
         }
     }
+#else
+    RT_NOREF_PV(pInstrGC);
 #endif
 
     if (pConflictPatch->opcode == OP_CLI)
@@ -6021,6 +6029,7 @@ RTRCPTR patmGuestGCPtrToPatchGCPtr(PVM pVM, PPATCHINFO pPatch, RCPTRTYPE(uint8_t
     return 0;
 }
 
+#ifdef PATM_RESOLVE_CONFLICTS_WITH_JUMP_PATCHES
 /**
  * Converts Guest code GC ptr to Patch code GC ptr (if found)
  *
@@ -6035,6 +6044,7 @@ static RTRCPTR patmR3GuestGCPtrToPatchGCPtrSimple(PVM pVM, RCPTRTYPE(uint8_t*) p
         return patmGuestGCPtrToPatchGCPtr(pVM, &pPatchRec->patch, pInstrGC);
     return NIL_RTRCPTR;
 }
+#endif
 
 /**
  * Converts Guest code GC ptr to Patch code GC ptr (or nearest from below if no
diff --git a/src/VBox/VMM/VMMR3/PATMA.asm b/src/VBox/VMM/VMMR3/PATMA.asm
index 8a0d664..bc47148 100644
--- a/src/VBox/VMM/VMMR3/PATMA.asm
+++ b/src/VBox/VMM/VMMR3/PATMA.asm
@@ -3,7 +3,7 @@
 ; PATM Assembly Routines.
 ;
 
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/PATMA.mac b/src/VBox/VMM/VMMR3/PATMA.mac
index 086049b..490c0ad 100644
--- a/src/VBox/VMM/VMMR3/PATMA.mac
+++ b/src/VBox/VMM/VMMR3/PATMA.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/PATMGuest.cpp b/src/VBox/VMM/VMMR3/PATMGuest.cpp
index b5aefc6..315a1c3 100644
--- a/src/VBox/VMM/VMMR3/PATMGuest.cpp
+++ b/src/VBox/VMM/VMMR3/PATMGuest.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -243,6 +243,5 @@ int patmR3InstallGuestSpecificPatch(PVM pVM, PDISCPUSTATE pCpu, RTGCPTR32 pInstr
         AssertMsgFailed(("PATMInstallGuestSpecificPatch: unknown opcode %d\n", pCpu->pCurInstr->uOpcode));
         return VERR_PATCHING_REFUSED;
     }
-    return VERR_PATCHING_REFUSED;
 }
 
diff --git a/src/VBox/VMM/VMMR3/PATMPatch.cpp b/src/VBox/VMM/VMMR3/PATMPatch.cpp
index 6e1b5e8..f56a3eb 100644
--- a/src/VBox/VMM/VMMR3/PATMPatch.cpp
+++ b/src/VBox/VMM/VMMR3/PATMPatch.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -117,7 +117,7 @@ int patmPatchAddReloc32(PVM pVM, PPATCHINFO pPatch, uint8_t *pRelocHC, uint32_t
     pRec = (PRELOCREC)MMR3HeapAllocZ(pVM, MM_TAG_PATM_PATCH, sizeof(*pRec));
     Assert(pRec);
     pRec->Core.Key  = (AVLPVKEY)pRelocHC;
-    pRec->pRelocPos = pRelocHC; /* @todo redundant. */
+    pRec->pRelocPos = pRelocHC; /** @todo redundant. */
     pRec->pSource   = pSource;
     pRec->pDest     = pDest;
     pRec->uType     = uType;
@@ -137,7 +137,7 @@ int patmPatchAddJump(PVM pVM, PPATCHINFO pPatch, uint8_t *pJumpHC, uint32_t offs
     Assert(pRec);
 
     pRec->Core.Key  = (AVLPVKEY)pJumpHC;
-    pRec->pJumpHC   = pJumpHC; /* @todo redundant. */
+    pRec->pJumpHC   = pJumpHC; /** @todo redundant. */
     pRec->offDispl  = offset;
     pRec->pTargetGC = pTargetGC;
     pRec->opcode    = opcode;
@@ -488,7 +488,7 @@ int patmPatchGenIret(PVM pVM, PPATCHINFO pPatch, RTRCPTR pCurInstrGC, bool fSize
 
     PATCHGEN_PROLOG(pVM, pPatch, pPatchAsmRec->cbFunction);
 
-    AssertMsg(fSizeOverride == false, ("operand size override!!\n"));
+    AssertMsg(fSizeOverride == false, ("operand size override!!\n")); RT_NOREF_PV(fSizeOverride);
     callInfo.pCurInstrGC = pCurInstrGC;
 
     size = patmPatchGenCode(pVM, pPatch, pPB, pPatchAsmRec, 0, false, &callInfo);
@@ -516,7 +516,7 @@ int patmPatchGenSti(PVM pVM, PPATCHINFO pPatch, RTRCPTR pCurInstrGC, RTRCPTR pNe
     PATMCALLINFO callInfo;
     uint32_t     size;
 
-    Log(("patmPatchGenSti at %RRv; next %RRv\n", pCurInstrGC, pNextInstrGC));
+    Log(("patmPatchGenSti at %RRv; next %RRv\n", pCurInstrGC, pNextInstrGC)); RT_NOREF_PV(pCurInstrGC);
     PATCHGEN_PROLOG(pVM, pPatch, g_patmStiRecord.cbFunction);
     callInfo.pNextInstrGC = pNextInstrGC;
     size = patmPatchGenCode(pVM, pPatch, pPB, &g_patmStiRecord, 0, false, &callInfo);
@@ -1276,7 +1276,7 @@ int patmPatchGenMovControl(PVM pVM, PPATCHINFO pPatch, DISCPUSTATE *pCpu)
 
     pPB[1] = MAKE_MODRM(mod, reg, rm);
 
-    /// @todo: make this an array in the context structure
+    /// @todo make this an array in the context structure
     switch (ctrlreg)
     {
     case DISCREG_CR0:
@@ -1310,7 +1310,7 @@ int patmPatchGenMovFromSS(PVM pVM, PPATCHINFO pPatch, DISCPUSTATE *pCpu, RTRCPTR
 {
     uint32_t size, offset;
 
-    Log(("patmPatchGenMovFromSS %RRv\n", pCurInstrGC));
+    Log(("patmPatchGenMovFromSS %RRv\n", pCurInstrGC)); RT_NOREF_PV(pCurInstrGC);
 
     Assert(pPatch->flags & PATMFL_CODE32);
 
@@ -1464,7 +1464,7 @@ int patmPatchGenSxDT(PVM pVM, PPATCHINFO pPatch, DISCPUSTATE *pCpu, RTRCPTR pCur
     uint32_t offset = 0, offset_base, offset_limit;
     uint32_t i;
 
-    /* @todo segment prefix (untested) */
+    /** @todo segment prefix (untested) */
     Assert(pCpu->fPrefix == DISPREFIX_NONE);
 
     // sgdt %Ms
diff --git a/src/VBox/VMM/VMMR3/PATMPatch.h b/src/VBox/VMM/VMMR3/PATMPatch.h
index eac3303..64ce80f 100644
--- a/src/VBox/VMM/VMMR3/PATMPatch.h
+++ b/src/VBox/VMM/VMMR3/PATMPatch.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/PATMR3Dbg.cpp b/src/VBox/VMM/VMMR3/PATMR3Dbg.cpp
index 1e08e07..7fb3d9a 100644
--- a/src/VBox/VMM/VMMR3/PATMR3Dbg.cpp
+++ b/src/VBox/VMM/VMMR3/PATMR3Dbg.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/PATMSSM.cpp b/src/VBox/VMM/VMMR3/PATMSSM.cpp
index 8ff3d73..15b673b 100644
--- a/src/VBox/VMM/VMMR3/PATMSSM.cpp
+++ b/src/VBox/VMM/VMMR3/PATMSSM.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -59,7 +59,7 @@ typedef struct PATCHINFOSSM
 
     /* GC pointer of privileged instruction */
     RCPTRTYPE(uint8_t *)  pPrivInstrGC;
-    R3PTRTYPE(uint8_t *)  unusedHC;                             /* todo Can't remove due to structure size dependencies in saved states. */
+    R3PTRTYPE(uint8_t *)  unusedHC;                             /** @todo Can't remove due to structure size dependencies in saved states. */
     uint8_t               aPrivInstr[MAX_INSTR_SIZE];
     uint32_t              cbPrivInstr;
     uint32_t              opcode;      //opcode for priv instr (OP_*)
@@ -1123,6 +1123,7 @@ static int patmCorrectFixup(PVM pVM, unsigned uVersion, PATM &patmInfo, PPATCHIN
                             int32_t offset, RTRCPTR *pFixup)
 {
     int32_t delta = pVM->patm.s.pPatchMemGC - patmInfo.pPatchMemGC;
+    RT_NOREF1(offset);
 
     switch (pRec->uType)
     {
@@ -1511,7 +1512,7 @@ static int patmCorrectFixup(PVM pVM, unsigned uVersion, PATM &patmInfo, PPATCHIN
                 /*
                  * Disable patch; this is not a good solution
                  */
-                /* @todo hopefully it was completely overwritten (if the read was successful)!!!! */
+                /** @todo hopefully it was completely overwritten (if the read was successful)!!!! */
                 pPatch->uState = PATCH_DISABLED;
             }
             else
diff --git a/src/VBox/VMM/VMMR3/PDM.cpp b/src/VBox/VMM/VMMR3/PDM.cpp
index d17fd13..263d63e 100644
--- a/src/VBox/VMM/VMMR3/PDM.cpp
+++ b/src/VBox/VMM/VMMR3/PDM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -618,6 +618,8 @@ VMMR3_INT_DECL(void) PDMR3Relocate(PVM pVM, RTGCINTPTR offDelta)
  */
 static void pdmR3TermLuns(PVM pVM, PPDMLUN pLun, const char *pszDevice, unsigned iInstance)
 {
+    RT_NOREF2(pszDevice, iInstance);
+
     for (; pLun; pLun = pLun->pNext)
     {
         /*
@@ -2567,7 +2569,7 @@ VMMR3_INT_DECL(int) PDMR3VmmDevHeapAlloc(PVM pVM, size_t cbSize, PFNPDMVMMDEVHEA
  */
 VMMR3_INT_DECL(int) PDMR3VmmDevHeapFree(PVM pVM, RTR3PTR pv)
 {
-    Log(("PDMR3VmmDevHeapFree: %RHv\n", pv));
+    Log(("PDMR3VmmDevHeapFree: %RHv\n", pv)); RT_NOREF_PV(pv);
 
     /** @todo not a real heap as there's currently only one user. */
     pVM->pdm.s.cbVMMDevHeapLeft = pVM->pdm.s.cbVMMDevHeap;
diff --git a/src/VBox/VMM/VMMR3/PDMAsyncCompletion.cpp b/src/VBox/VMM/VMMR3/PDMAsyncCompletion.cpp
index 96caca8..fc7a0a8 100644
--- a/src/VBox/VMM/VMMR3/PDMAsyncCompletion.cpp
+++ b/src/VBox/VMM/VMMR3/PDMAsyncCompletion.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -259,7 +259,9 @@ int pdmR3AsyncCompletionTemplateCreateDriver(PVM pVM, PPDMDRVINS pDrvIns, PPPDMA
                                              PFNPDMASYNCCOMPLETEDRV pfnCompleted, void *pvTemplateUser,
                                              const char *pszDesc)
 {
-    LogFlow(("PDMR3AsyncCompletionTemplateCreateDriver: pDrvIns=%p ppTemplate=%p pfnCompleted=%p pszDesc=%s\n", pDrvIns, ppTemplate, pfnCompleted, pszDesc));
+    LogFlow(("PDMR3AsyncCompletionTemplateCreateDriver: pDrvIns=%p ppTemplate=%p pfnCompleted=%p pszDesc=%s\n",
+             pDrvIns, ppTemplate, pfnCompleted, pszDesc));
+    RT_NOREF_PV(pszDesc); /** @todo async template description */
 
     /*
      * Validate input.
@@ -345,10 +347,13 @@ int pdmR3AsyncCompletionTemplateCreateUsb(PVM pVM, PPDMUSBINS pUsbIns, PPPDMASYN
  * @param   pszDesc         Description.
  * @internal
  */
-VMMR3DECL(int) PDMR3AsyncCompletionTemplateCreateInternal(PVM pVM, PPPDMASYNCCOMPLETIONTEMPLATE ppTemplate, PFNPDMASYNCCOMPLETEINT pfnCompleted, void *pvUser2, const char *pszDesc)
+VMMR3DECL(int) PDMR3AsyncCompletionTemplateCreateInternal(PVM pVM, PPPDMASYNCCOMPLETIONTEMPLATE ppTemplate,
+                                                          PFNPDMASYNCCOMPLETEINT pfnCompleted, void *pvUser2, const char *pszDesc)
 {
-    LogFlow(("%s: ppTemplate=%p pfnCompleted=%p pvUser2=%p pszDesc=%s\n",
-              __FUNCTION__, ppTemplate, pfnCompleted, pvUser2, pszDesc));
+    LogFlow(("PDMR3AsyncCompletionTemplateCreateInternal: ppTemplate=%p pfnCompleted=%p pvUser2=%p pszDesc=%s\n",
+              ppTemplate, pfnCompleted, pvUser2, pszDesc));
+    RT_NOREF_PV(pszDesc); /** @todo async template description */
+
 
     /*
      * Validate input.
@@ -750,7 +755,10 @@ bool pdmacEpIsTransferAllowed(PPDMASYNCCOMPLETIONENDPOINT pEndpoint, uint32_t cb
                     }
 
                     /* Update */
-                    ASMAtomicWriteU32(&pBwMgr->cbTransferAllowed, pBwMgr->cbTransferPerSecStart - cbTransfer);
+                    uint32_t cbTransferAllowedNew =   pBwMgr->cbTransferPerSecStart > cbTransfer
+                                                    ? pBwMgr->cbTransferPerSecStart - cbTransfer
+                                                    : 0;
+                    ASMAtomicWriteU32(&pBwMgr->cbTransferAllowed, cbTransferAllowedNew);
                     fAllowed = true;
                     LogFlow(("AIOMgr: Refreshed bandwidth\n"));
                 }
@@ -857,40 +865,41 @@ int pdmR3AsyncCompletionEpClassInit(PVM pVM, PCPDMASYNCCOMPLETIONEPCLASSOPS pEpC
                 {
                     /* Create all bandwidth groups for resource control. */
                     PCFGMNODE pCfgBwGrp = CFGMR3GetChild(pCfgNodeClass, "BwGroups");
-
                     if (pCfgBwGrp)
                     {
                         for (PCFGMNODE pCur = CFGMR3GetFirstChild(pCfgBwGrp); pCur; pCur = CFGMR3GetNextChild(pCur))
                         {
-                            uint32_t cbMax, cbStart, cbStep;
-                            size_t cchName = CFGMR3GetNameLen(pCur) + 1;
-                            char *pszBwGrpId = (char *)RTMemAllocZ(cchName);
-
-                            if (!pszBwGrpId)
+                            size_t cbName = CFGMR3GetNameLen(pCur) + 1;
+                            char *pszBwGrpId = (char *)RTMemAllocZ(cbName);
+                            if (pszBwGrpId)
                             {
-                                rc = VERR_NO_MEMORY;
-                                break;
+                                rc = CFGMR3GetName(pCur, pszBwGrpId, cbName);
+                                if (RT_SUCCESS(rc))
+                                {
+                                    uint32_t cbMax;
+                                    rc = CFGMR3QueryU32(pCur, "Max", &cbMax);
+                                    if (RT_SUCCESS(rc))
+                                    {
+                                        uint32_t cbStart;
+                                        rc = CFGMR3QueryU32Def(pCur, "Start", &cbStart, cbMax);
+                                        if (RT_SUCCESS(rc))
+                                        {
+                                            uint32_t cbStep;
+                                            rc = CFGMR3QueryU32Def(pCur, "Step", &cbStep, 0);
+                                            if (RT_SUCCESS(rc))
+                                                rc = pdmacAsyncCompletionBwMgrCreate(pEndpointClass, pszBwGrpId,
+                                                                                     cbMax, cbStart, cbStep);
+                                        }
+                                    }
+                                }
+                                RTMemFree(pszBwGrpId);
                             }
-
-                            rc = CFGMR3GetName(pCur, pszBwGrpId, cchName);
-                            AssertRC(rc);
-
-                            if (RT_SUCCESS(rc))
-                                rc = CFGMR3QueryU32(pCur, "Max", &cbMax);
-                            if (RT_SUCCESS(rc))
-                                rc = CFGMR3QueryU32Def(pCur, "Start", &cbStart, cbMax);
-                            if (RT_SUCCESS(rc))
-                                rc = CFGMR3QueryU32Def(pCur, "Step", &cbStep, 0);
-                            if (RT_SUCCESS(rc))
-                                rc = pdmacAsyncCompletionBwMgrCreate(pEndpointClass, pszBwGrpId, cbMax, cbStart, cbStep);
-
-                            RTMemFree(pszBwGrpId);
-
+                            else
+                                rc = VERR_NO_MEMORY;
                             if (RT_FAILURE(rc))
                                 break;
                         }
                     }
-
                     if (RT_SUCCESS(rc))
                     {
                         PUVM pUVM = pVM->pUVM;
@@ -1506,8 +1515,6 @@ VMMR3DECL(void) PDMR3AsyncCompletionEpClose(PPDMASYNCCOMPLETIONENDPOINT pEndpoin
     AssertReturnVoid(VALID_PTR(pEndpoint));
 
     PPDMASYNCCOMPLETIONEPCLASS pEndpointClass = pEndpoint->pEpClass;
-    PVM pVM = pEndpointClass->pVM;
-
     pEndpointClass->pEndpointOps->pfnEpClose(pEndpoint);
 
     /* Drop reference from the template. */
diff --git a/src/VBox/VMM/VMMR3/PDMAsyncCompletionFile.cpp b/src/VBox/VMM/VMMR3/PDMAsyncCompletionFile.cpp
index 88e0f44..cf482be 100644
--- a/src/VBox/VMM/VMMR3/PDMAsyncCompletionFile.cpp
+++ b/src/VBox/VMM/VMMR3/PDMAsyncCompletionFile.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/PDMAsyncCompletionFileFailsafe.cpp b/src/VBox/VMM/VMMR3/PDMAsyncCompletionFileFailsafe.cpp
index 5a84405..97992e5 100644
--- a/src/VBox/VMM/VMMR3/PDMAsyncCompletionFileFailsafe.cpp
+++ b/src/VBox/VMM/VMMR3/PDMAsyncCompletionFileFailsafe.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/PDMAsyncCompletionFileNormal.cpp b/src/VBox/VMM/VMMR3/PDMAsyncCompletionFileNormal.cpp
index a4ce045..dbab87a 100644
--- a/src/VBox/VMM/VMMR3/PDMAsyncCompletionFileNormal.cpp
+++ b/src/VBox/VMM/VMMR3/PDMAsyncCompletionFileNormal.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -725,7 +725,7 @@ static int pdmacFileAioMgrNormalRangeLock(PPDMACEPFILEMGR pAioMgr,
     pRangeLock->pWaitingTasksTail = NULL;
 
     bool fInserted = RTAvlrFileOffsetInsert(pEndpoint->AioMgr.pTreeRangesLocked, &pRangeLock->Core);
-    AssertMsg(fInserted, ("Range lock was not inserted!\n"));
+    AssertMsg(fInserted, ("Range lock was not inserted!\n")); NOREF(fInserted);
 
     /* Let the task point to its lock. */
     pTask->pRangeLock = pRangeLock;
@@ -897,7 +897,7 @@ static int pdmacFileAioMgrNormalTaskPrepareNonBuffered(PPDMACEPFILEMGR pAioMgr,
                       pTask->Off, offStart));
             pTask->offBounceBuffer = pTask->Off - offStart;
 
-            /** @todo: I think we need something like a RTMemAllocAligned method here.
+            /** @todo I think we need something like a RTMemAllocAligned method here.
              * Current assumption is that the maximum alignment is 4096byte
              * (GPT disk on Windows)
              * so we can use RTMemPageAlloc here.
@@ -1429,7 +1429,7 @@ static void pdmacFileAioMgrNormalReqCompleteRc(PPDMACEPFILEMGR pAioMgr, RTFILEAI
                 if (!pEndpoint->AioMgr.cRequestsActive)
                 {
                     bool fReqsPending = pdmacFileAioMgrNormalRemoveEndpoint(pEndpoint);
-                    Assert(!fReqsPending);
+                    Assert(!fReqsPending); NOREF(fReqsPending);
 
                     rc = pdmacFileAioMgrAddEndpoint(pEndpoint->AioMgr.pAioMgrDst, pEndpoint);
                     AssertRC(rc);
@@ -1586,7 +1586,7 @@ static void pdmacFileAioMgrNormalReqCompleteRc(PPDMACEPFILEMGR pAioMgr, RTFILEAI
                 {
                     /* If the endpoint is about to be migrated do it now. */
                     bool fReqsPending = pdmacFileAioMgrNormalRemoveEndpoint(pEndpoint);
-                    Assert(!fReqsPending);
+                    Assert(!fReqsPending); NOREF(fReqsPending);
 
                     rc = pdmacFileAioMgrAddEndpoint(pEndpoint->AioMgr.pAioMgrDst, pEndpoint);
                     AssertRC(rc);
diff --git a/src/VBox/VMM/VMMR3/PDMBlkCache.cpp b/src/VBox/VMM/VMMR3/PDMBlkCache.cpp
index a977570..ace04b3 100644
--- a/src/VBox/VMM/VMMR3/PDMBlkCache.cpp
+++ b/src/VBox/VMM/VMMR3/PDMBlkCache.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/PDMCritSect.cpp b/src/VBox/VMM/VMMR3/PDMCritSect.cpp
index df8cd83..b6ab361 100644
--- a/src/VBox/VMM/VMMR3/PDMCritSect.cpp
+++ b/src/VBox/VMM/VMMR3/PDMCritSect.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -53,6 +53,7 @@ static int pdmR3CritSectRwDeleteOne(PVM pVM, PUVM pUVM, PPDMCRITSECTRWINT pCritS
  */
 int pdmR3CritSectBothInitStats(PVM pVM)
 {
+    RT_NOREF_PV(pVM);
     STAM_REG(pVM, &pVM->pdm.s.StatQueuedCritSectLeaves, STAMTYPE_COUNTER, "/PDM/QueuedCritSectLeaves", STAMUNIT_OCCURENCES,
              "Number of times a critical section leave request needed to be queued for ring-3 execution.");
     return VINF_SUCCESS;
@@ -153,6 +154,7 @@ static int pdmR3CritSectInitOne(PVM pVM, PPDMCRITSECTINT pCritSect, void *pvKey,
         char *pszName = RTStrAPrintf2V(pszNameFmt, va); /** @todo plug the "leak"... */
         if (pszName)
         {
+            RT_SRC_POS_NOREF();
 #ifndef PDMCRITSECT_STRICT
             pCritSect->Core.pValidatorRec = NULL;
 #else
@@ -245,6 +247,7 @@ static int pdmR3CritSectRwInitOne(PVM pVM, PPDMCRITSECTRWINT pCritSect, void *pv
             {
                 pCritSect->Core.pValidatorRead  = NULL;
                 pCritSect->Core.pValidatorWrite = NULL;
+                RT_SRC_POS_NOREF();
 #ifdef PDMCRITSECTRW_STRICT
 # ifdef RT_LOCK_STRICT_ORDER
                 RTLOCKVALCLASS hClass = RTLockValidatorClassForSrcPos(RT_SRC_POS_ARGS, "%s", pszName);
diff --git a/src/VBox/VMM/VMMR3/PDMDevHlp.cpp b/src/VBox/VMM/VMMR3/PDMDevHlp.cpp
index 839d2b5..537bcbb 100644
--- a/src/VBox/VMM/VMMR3/PDMDevHlp.cpp
+++ b/src/VBox/VMM/VMMR3/PDMDevHlp.cpp
@@ -920,7 +920,7 @@ static DECLCALLBACK(void *) pdmR3DevHlp_MMHeapAllocZ(PPDMDEVINS pDevIns, size_t
 /** @interface_method_impl{PDMDEVHLPR3,pfnMMHeapFree} */
 static DECLCALLBACK(void) pdmR3DevHlp_MMHeapFree(PPDMDEVINS pDevIns, void *pv)
 {
-    PDMDEV_ASSERT_DEVINS(pDevIns);
+    PDMDEV_ASSERT_DEVINS(pDevIns); RT_NOREF_PV(pDevIns);
     LogFlow(("pdmR3DevHlp_MMHeapFree: caller='%s'/%d: pv=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, pv));
 
     MMR3HeapFree(pv);
@@ -1063,14 +1063,15 @@ static DECLCALLBACK(RTTRACEBUF) pdmR3DevHlp_DBGFTraceBuf(PPDMDEVINS pDevIns)
 
 
 /** @interface_method_impl{PDMDEVHLPR3,pfnSTAMRegister} */
-static DECLCALLBACK(void) pdmR3DevHlp_STAMRegister(PPDMDEVINS pDevIns, void *pvSample, STAMTYPE enmType, const char *pszName, STAMUNIT enmUnit, const char *pszDesc)
+static DECLCALLBACK(void) pdmR3DevHlp_STAMRegister(PPDMDEVINS pDevIns, void *pvSample, STAMTYPE enmType, const char *pszName,
+                                                   STAMUNIT enmUnit, const char *pszDesc)
 {
     PDMDEV_ASSERT_DEVINS(pDevIns);
     PVM pVM = pDevIns->Internal.s.pVMR3;
     VM_ASSERT_EMT(pVM);
 
     STAM_REG(pVM, pvSample, enmType, pszName, enmUnit, pszDesc);
-    NOREF(pVM);
+    RT_NOREF_PV(pVM); RT_NOREF6(pDevIns, pvSample, enmType, pszName, enmUnit, pszDesc);
 }
 
 
@@ -1637,12 +1638,14 @@ static DECLCALLBACK(int) pdmR3DevHlp_DriverAttach(PPDMDEVINS pDevIns, uint32_t i
 /** @interface_method_impl{PDMDEVHLPR3,pfnDriverDetach} */
 static DECLCALLBACK(int) pdmR3DevHlp_DriverDetach(PPDMDEVINS pDevIns, PPDMDRVINS pDrvIns, uint32_t fFlags)
 {
-    PDMDEV_ASSERT_DEVINS(pDevIns);
+    PDMDEV_ASSERT_DEVINS(pDevIns); RT_NOREF_PV(pDevIns);
     LogFlow(("pdmR3DevHlp_DriverDetach: caller='%s'/%d: pDrvIns=%p\n",
              pDevIns->pReg->szName, pDevIns->iInstance, pDrvIns));
 
+#ifdef VBOX_STRICT
     PVM pVM = pDevIns->Internal.s.pVMR3;
     VM_ASSERT_EMT(pVM);
+#endif
 
     int rc = pdmR3DrvDetach(pDrvIns, fFlags);
 
@@ -3144,7 +3147,7 @@ static DECLCALLBACK(int) pdmR3DevHlp_IOAPICRegister(PPDMDEVINS pDevIns, PPDMIOAP
 /** @interface_method_impl{PDMDEVHLPR3,pfnHPETRegister} */
 static DECLCALLBACK(int) pdmR3DevHlp_HPETRegister(PPDMDEVINS pDevIns, PPDMHPETREG pHpetReg, PCPDMHPETHLPR3 *ppHpetHlpR3)
 {
-    PDMDEV_ASSERT_DEVINS(pDevIns);
+    PDMDEV_ASSERT_DEVINS(pDevIns); RT_NOREF_PV(pDevIns);
     VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3);
     LogFlow(("pdmR3DevHlp_HPETRegister: caller='%s'/%d:\n", pDevIns->pReg->szName, pDevIns->iInstance));
 
@@ -3175,7 +3178,7 @@ static DECLCALLBACK(int) pdmR3DevHlp_HPETRegister(PPDMDEVINS pDevIns, PPDMHPETRE
 /** @interface_method_impl{PDMDEVHLPR3,pfnPciRawRegister} */
 static DECLCALLBACK(int) pdmR3DevHlp_PciRawRegister(PPDMDEVINS pDevIns, PPDMPCIRAWREG pPciRawReg, PCPDMPCIRAWHLPR3 *ppPciRawHlpR3)
 {
-    PDMDEV_ASSERT_DEVINS(pDevIns);
+    PDMDEV_ASSERT_DEVINS(pDevIns); RT_NOREF_PV(pDevIns);
     VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3);
     LogFlow(("pdmR3DevHlp_PciRawRegister: caller='%s'/%d:\n", pDevIns->pReg->szName, pDevIns->iInstance));
 
diff --git a/src/VBox/VMM/VMMR3/PDMDevMiscHlp.cpp b/src/VBox/VMM/VMMR3/PDMDevMiscHlp.cpp
index 0f67ad5..bb9e2a0 100644
--- a/src/VBox/VMM/VMMR3/PDMDevMiscHlp.cpp
+++ b/src/VBox/VMM/VMMR3/PDMDevMiscHlp.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -247,16 +247,16 @@ static DECLCALLBACK(void) pdmR3ApicHlp_ClearInterruptFF(PPDMDEVINS pDevIns, PDMA
     /* Note: NMI/SMI can't be cleared. */
     switch (enmType)
     {
-        case PDMAPICIRQ_UPDATE_PENDING:
-            VMCPU_ASSERT_EMT_OR_NOT_RUNNING(pVCpu);
-            VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_UPDATE_APIC);
-            break;
         case PDMAPICIRQ_HARDWARE:
             VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_INTERRUPT_APIC);
             break;
         case PDMAPICIRQ_EXTINT:
             VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_INTERRUPT_PIC);
             break;
+        case PDMAPICIRQ_UPDATE_PENDING:
+            VMCPU_ASSERT_EMT_OR_NOT_RUNNING(pVCpu);
+            VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_UPDATE_APIC);
+            break;
         default:
             AssertMsgFailed(("enmType=%d\n", enmType));
             break;
@@ -559,7 +559,6 @@ static DECLCALLBACK(void) pdmR3PciHlp_IsaSetIrq(PPDMDEVINS pDevIns, int iIrq, in
 {
     PDMDEV_ASSERT_DEVINS(pDevIns);
     Log4(("pdmR3PciHlp_IsaSetIrq: iIrq=%d iLevel=%d uTagSrc=%#x\n", iIrq, iLevel, uTagSrc));
-    PVM pVM = pDevIns->Internal.s.pVMR3;
     PDMIsaSetIrq(pDevIns->Internal.s.pVMR3, iIrq, iLevel, uTagSrc);
 }
 
diff --git a/src/VBox/VMM/VMMR3/PDMDevice.cpp b/src/VBox/VMM/VMMR3/PDMDevice.cpp
index b52f0fb..4ea5228 100644
--- a/src/VBox/VMM/VMMR3/PDMDevice.cpp
+++ b/src/VBox/VMM/VMMR3/PDMDevice.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -895,7 +895,7 @@ VMMR3DECL(int) PDMR3DeviceDetach(PUVM pUVM, const char *pszDevice, unsigned iIns
  */
 VMMR3_INT_DECL(PPDMCRITSECT) PDMR3DevGetCritSect(PVM pVM, PPDMDEVINS pDevIns)
 {
-    VM_ASSERT_EMT(pVM);
+    VM_ASSERT_EMT(pVM); RT_NOREF_PV(pVM);
     VM_ASSERT_STATE(pVM, VMSTATE_CREATING);
     AssertPtr(pDevIns);
 
diff --git a/src/VBox/VMM/VMMR3/PDMDriver.cpp b/src/VBox/VMM/VMMR3/PDMDriver.cpp
index 06b80f2..b798771 100644
--- a/src/VBox/VMM/VMMR3/PDMDriver.cpp
+++ b/src/VBox/VMM/VMMR3/PDMDriver.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -698,7 +698,7 @@ int pdmR3DrvInstantiate(PVM pVM, PCFGMNODE pNode, PPDMIBASE pBaseInterface, PPDM
                     pNew->Internal.s.pVMR0          = pDrv->pReg->fFlags & PDM_DRVREG_FLAGS_R0 ? pVM->pVMR0 : NIL_RTR0PTR;
                     pNew->Internal.s.pVMRC          = pDrv->pReg->fFlags & PDM_DRVREG_FLAGS_RC ? pVM->pVMRC : NIL_RTRCPTR;
                     //pNew->Internal.s.fDetaching     = false;
-                    pNew->Internal.s.fVMSuspended   = true; /** @todo: should be 'false', if driver is attached at runtime. */
+                    pNew->Internal.s.fVMSuspended   = true; /** @todo should be 'false', if driver is attached at runtime. */
                     //pNew->Internal.s.fVMReset       = false;
                     pNew->Internal.s.fHyperHeap     = fHyperHeap;
                     //pNew->Internal.s.pfnAsyncNotify = NULL;
@@ -992,6 +992,7 @@ static DECLCALLBACK(int) pdmR3DrvHlp_Attach(PPDMDRVINS pDrvIns, uint32_t fFlags,
     VM_ASSERT_EMT(pVM);
     LogFlow(("pdmR3DrvHlp_Attach: caller='%s'/%d: fFlags=%#x\n", pDrvIns->pReg->szName, pDrvIns->iInstance, fFlags));
     Assert(!(fFlags & ~(PDM_TACH_FLAGS_NOT_HOT_PLUG)));
+    RT_NOREF_PV(fFlags);
 
     /*
      * Check that there isn't anything attached already.
@@ -1375,12 +1376,14 @@ static DECLCALLBACK(int) pdmR3DrvHlp_DBGFInfoDeregister(PPDMDRVINS pDrvIns, cons
 
 
 /** @interface_method_impl{PDMDRVHLPR3,pfnSTAMRegister} */
-static DECLCALLBACK(void) pdmR3DrvHlp_STAMRegister(PPDMDRVINS pDrvIns, void *pvSample, STAMTYPE enmType, const char *pszName, STAMUNIT enmUnit, const char *pszDesc)
+static DECLCALLBACK(void) pdmR3DrvHlp_STAMRegister(PPDMDRVINS pDrvIns, void *pvSample, STAMTYPE enmType, const char *pszName,
+                                                   STAMUNIT enmUnit, const char *pszDesc)
 {
     PDMDRV_ASSERT_DRVINS(pDrvIns);
     VM_ASSERT_EMT(pDrvIns->Internal.s.pVMR3);
 
     STAM_REG(pDrvIns->Internal.s.pVMR3, pvSample, enmType, pszName, enmUnit, pszDesc);
+    RT_NOREF6(pDrvIns, pvSample, enmType, pszName, enmUnit, pszDesc);
     /** @todo track the samples so they can be dumped & deregistered when the driver instance is destroyed.
      * For now we just have to be careful not to use this call for drivers which can be unloaded. */
 }
@@ -1429,6 +1432,8 @@ static DECLCALLBACK(int) pdmR3DrvHlp_SUPCallVMMR0Ex(PPDMDRVINS pDrvIns, unsigned
     PDMDRV_ASSERT_DRVINS(pDrvIns);
     LogFlow(("pdmR3DrvHlp_SSMCallVMMR0Ex: caller='%s'/%d: uOperation=%u pvArg=%p cbArg=%d\n",
              pDrvIns->pReg->szName, pDrvIns->iInstance, uOperation, pvArg, cbArg));
+    RT_NOREF_PV(cbArg);
+
     int rc;
     if (    uOperation >= VMMR0_DO_SRV_START
         &&  uOperation <  VMMR0_DO_SRV_END)
diff --git a/src/VBox/VMM/VMMR3/PDMLdr.cpp b/src/VBox/VMM/VMMR3/PDMLdr.cpp
index 14d68b6..0785fc4 100644
--- a/src/VBox/VMM/VMMR3/PDMLdr.cpp
+++ b/src/VBox/VMM/VMMR3/PDMLdr.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -64,9 +64,11 @@ typedef struct PDMGETIMPORTARGS
 /*********************************************************************************************************************************
 *   Internal Functions                                                                                                           *
 *********************************************************************************************************************************/
+#ifdef VBOX_WITH_RAW_MODE
 static DECLCALLBACK(int) pdmR3GetImportRC(RTLDRMOD hLdrMod, const char *pszModule, const char *pszSymbol, unsigned uSymbol, RTUINTPTR *pValue, void *pvUser);
-static int      pdmR3LoadR0U(PUVM pUVM, const char *pszFilename, const char *pszName, const char *pszSearchPath);
 static char    *pdmR3FileRC(const char *pszFile, const char *pszSearchPath);
+#endif
+static int      pdmR3LoadR0U(PUVM pUVM, const char *pszFilename, const char *pszName, const char *pszSearchPath);
 static char    *pdmR3FileR0(const char *pszFile, const char *pszSearchPath);
 static char    *pdmR3File(const char *pszFile, const char *pszDefaultExt, const char *pszSearchPath, bool fShared);
 
@@ -106,6 +108,8 @@ int pdmR3LdrInitU(PUVM pUVM)
         if (RT_FAILURE(rc))
             return rc;
     }
+#else
+    RT_NOREF(pUVM);
 #endif
     return VINF_SUCCESS;
 }
@@ -184,6 +188,7 @@ VMMR3_INT_DECL(void) PDMR3LdrRelocateU(PUVM pUVM, RTGCINTPTR offDelta)
 {
 #ifdef VBOX_WITH_RAW_MODE
     LogFlow(("PDMR3LdrRelocate: offDelta=%RGv\n", offDelta));
+    RT_NOREF1(offDelta);
 
     /*
      * RC Modules.
@@ -223,6 +228,8 @@ VMMR3_INT_DECL(void) PDMR3LdrRelocateU(PUVM pUVM, RTGCINTPTR offDelta)
         }
     }
     RTCritSectLeave(&pUVM->pdm.s.ListCritSect);
+#else
+    RT_NOREF2(pUVM, offDelta);
 #endif
 }
 
@@ -906,6 +913,7 @@ VMMR3DECL(int) PDMR3LdrGetSymbolR0Lazy(PVM pVM, const char *pszModule, const cha
 VMMR3DECL(int) PDMR3LdrGetSymbolRC(PVM pVM, const char *pszModule, const char *pszSymbol, PRTRCPTR pRCPtrValue)
 {
 #if defined(PDMLDR_FAKE_MODE) || !defined(VBOX_WITH_RAW_MODE)
+    RT_NOREF(pVM, pszModule, pszSymbol);
     Assert(!HMIsEnabled(pVM));
     *pRCPtrValue = NIL_RTRCPTR;
     return VINF_SUCCESS;
@@ -975,6 +983,7 @@ VMMR3DECL(int) PDMR3LdrGetSymbolRCLazy(PVM pVM, const char *pszModule, const cha
                                        PRTRCPTR pRCPtrValue)
 {
 #if defined(PDMLDR_FAKE_MODE) || !defined(VBOX_WITH_RAW_MODE)
+    RT_NOREF(pVM, pszModule, pszSearchPath, pszSymbol);
     Assert(!HMIsEnabled(pVM));
     *pRCPtrValue = NIL_RTRCPTR;
     return VINF_SUCCESS;
diff --git a/src/VBox/VMM/VMMR3/PDMNetShaper.cpp b/src/VBox/VMM/VMMR3/PDMNetShaper.cpp
index 8480f1d..e021948 100644
--- a/src/VBox/VMM/VMMR3/PDMNetShaper.cpp
+++ b/src/VBox/VMM/VMMR3/PDMNetShaper.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -304,6 +304,7 @@ VMMR3_INT_DECL(int) PDMR3NsAttach(PUVM pUVM, PPDMDRVINS pDrvIns, const char *psz
     VM_ASSERT_EMT(pUVM->pVM);
     AssertPtrReturn(pFilter, VERR_INVALID_POINTER);
     AssertReturn(pFilter->pBwGroupR3 == NULL, VERR_ALREADY_EXISTS);
+    RT_NOREF_PV(pDrvIns);
 
     PPDMNETSHAPER pShaper = pUVM->pdm.s.pNetShaper;
     LOCK_NETSHAPER_RETURN(pShaper);
@@ -343,8 +344,10 @@ VMMR3_INT_DECL(int) PDMR3NsAttach(PUVM pUVM, PPDMDRVINS pDrvIns, const char *psz
  */
 VMMR3_INT_DECL(int) PDMR3NsDetach(PUVM pUVM, PPDMDRVINS pDrvIns, PPDMNSFILTER pFilter)
 {
+    RT_NOREF_PV(pDrvIns);
     VM_ASSERT_EMT(pUVM->pVM);
     AssertPtrReturn(pFilter, VERR_INVALID_POINTER);
+
     /* Now, return quietly if the filter isn't attached since driver/device
        destructors are called on constructor failure. */
     if (!pFilter->pBwGroupR3)
@@ -411,6 +414,8 @@ VMMR3DECL(int) PDMR3NsBwGroupSetLimit(PUVM pUVM, const char *pszBwGroup, uint64_
  */
 static DECLCALLBACK(int) pdmR3NsTxThread(PVM pVM, PPDMTHREAD pThread)
 {
+    RT_NOREF_PV(pVM);
+
     PPDMNETSHAPER pShaper = (PPDMNETSHAPER)pThread->pvUser;
     LogFlow(("pdmR3NsTxThread: pShaper=%p\n", pShaper));
     while (pThread->enmState == PDMTHREADSTATE_RUNNING)
@@ -436,8 +441,8 @@ static DECLCALLBACK(int) pdmR3NsTxThread(PVM pVM, PPDMTHREAD pThread)
  */
 static DECLCALLBACK(int) pdmR3NsTxWakeUp(PVM pVM, PPDMTHREAD pThread)
 {
-    PPDMNETSHAPER pShaper = (PPDMNETSHAPER)pThread->pvUser;
-    LogFlow(("pdmR3NsTxWakeUp: pShaper=%p\n", pShaper));
+    RT_NOREF2(pVM, pThread);
+    LogFlow(("pdmR3NsTxWakeUp: pShaper=%p\n", pThread->pvUser));
     /* Nothing to do */
     return VINF_SUCCESS;
 }
@@ -503,26 +508,22 @@ int pdmR3NetShaperInit(PVM pVM)
             {
                 for (PCFGMNODE pCur = CFGMR3GetFirstChild(pCfgBwGrp); pCur; pCur = CFGMR3GetNextChild(pCur))
                 {
-                    uint64_t cbMax;
                     size_t cbName = CFGMR3GetNameLen(pCur) + 1;
                     char *pszBwGrpId = (char *)RTMemAllocZ(cbName);
-
-                    if (!pszBwGrpId)
+                    if (pszBwGrpId)
                     {
-                        rc = VERR_NO_MEMORY;
-                        break;
+                        rc = CFGMR3GetName(pCur, pszBwGrpId, cbName);
+                        if (RT_SUCCESS(rc))
+                        {
+                            uint64_t cbMax;
+                            rc = CFGMR3QueryU64(pCur, "Max", &cbMax);
+                            if (RT_SUCCESS(rc))
+                                rc = pdmNsBwGroupCreate(pShaper, pszBwGrpId, cbMax);
+                        }
+                        RTMemFree(pszBwGrpId);
                     }
-
-                    rc = CFGMR3GetName(pCur, pszBwGrpId, cbName);
-                    AssertRC(rc);
-
-                    if (RT_SUCCESS(rc))
-                        rc = CFGMR3QueryU64(pCur, "Max", &cbMax);
-                    if (RT_SUCCESS(rc))
-                        rc = pdmNsBwGroupCreate(pShaper, pszBwGrpId, cbMax);
-
-                    RTMemFree(pszBwGrpId);
-
+                    else
+                        rc = VERR_NO_MEMORY;
                     if (RT_FAILURE(rc))
                         break;
                 }
diff --git a/src/VBox/VMM/VMMR3/PDMQueue.cpp b/src/VBox/VMM/VMMR3/PDMQueue.cpp
index a158023..3961581 100644
--- a/src/VBox/VMM/VMMR3/PDMQueue.cpp
+++ b/src/VBox/VMM/VMMR3/PDMQueue.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/PDMThread.cpp b/src/VBox/VMM/VMMR3/PDMThread.cpp
index 7e640f5..065aa08 100644
--- a/src/VBox/VMM/VMMR3/PDMThread.cpp
+++ b/src/VBox/VMM/VMMR3/PDMThread.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -19,7 +19,7 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
-///@todo \#define LOG_GROUP LOG_GROUP_PDM_THREAD
+/// @todo \#define LOG_GROUP LOG_GROUP_PDM_THREAD
 #include "PDMInternal.h"
 #include <VBox/vmm/pdm.h>
 #include <VBox/vmm/mm.h>
diff --git a/src/VBox/VMM/VMMR3/PDMUsb.cpp b/src/VBox/VMM/VMMR3/PDMUsb.cpp
index 2b0e88c..c09e8f2 100644
--- a/src/VBox/VMM/VMMR3/PDMUsb.cpp
+++ b/src/VBox/VMM/VMMR3/PDMUsb.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -528,6 +528,7 @@ static int pdmR3UsbCreateDevice(PVM pVM, PPDMUSBHUB pHub, PPDMUSB pUsbDev, int i
     {
         /** @todo r=bird: This code is bogus as it ASSUMES that all USB devices are
          *        capable of infinite number of instances. */
+        rc = VINF_SUCCESS; /* Shut up stupid incorrect uninitialized warning from Visual C++ 2010. */
         for (unsigned c = 0; c < _2M; c++)
         {
             iInstance = pUsbDev->iNextInstance++;
@@ -1615,7 +1616,8 @@ static DECLCALLBACK(int) pdmR3UsbHlp_DBGFStopV(PPDMUSBINS pUsbIns, const char *p
 
 
 /** @interface_method_impl{PDMUSBHLP,pfnDBGFInfoRegister} */
-static DECLCALLBACK(int) pdmR3UsbHlp_DBGFInfoRegister(PPDMUSBINS pUsbIns, const char *pszName, const char *pszDesc, PFNDBGFHANDLERUSB pfnHandler)
+static DECLCALLBACK(int) pdmR3UsbHlp_DBGFInfoRegister(PPDMUSBINS pUsbIns, const char *pszName, const char *pszDesc,
+                                                      PFNDBGFHANDLERUSB pfnHandler)
 {
     PDMUSB_ASSERT_USBINS(pUsbIns);
     LogFlow(("pdmR3UsbHlp_DBGFInfoRegister: caller='%s'/%d: pszName=%p:{%s} pszDesc=%p:{%s} pfnHandler=%p\n",
@@ -1623,7 +1625,7 @@ static DECLCALLBACK(int) pdmR3UsbHlp_DBGFInfoRegister(PPDMUSBINS pUsbIns, const
 
     PVM pVM = pUsbIns->Internal.s.pVM;
     VM_ASSERT_EMT(pVM);
-    NOREF(pVM); /** @todo int rc = DBGFR3InfoRegisterUsb(pVM, pszName, pszDesc, pfnHandler, pUsbIns); */
+    RT_NOREF4(pVM, pfnHandler, pszDesc, pszName); /** @todo int rc = DBGFR3InfoRegisterUsb(pVM, pszName, pszDesc, pfnHandler, pUsbIns); */
     int rc = VERR_NOT_IMPLEMENTED; AssertFailed();
 
     LogFlow(("pdmR3UsbHlp_DBGFInfoRegister: caller='%s'/%d: returns %Rrc\n", pUsbIns->pReg->szName, pUsbIns->iInstance, rc));
@@ -1674,6 +1676,7 @@ static DECLCALLBACK(int) pdmR3UsbHlp_PDMQueueCreate(PPDMUSBINS pUsbIns, RTUINT c
         AssertLogRelReturn(pszName, VERR_NO_MEMORY);
     }
 
+    RT_NOREF5(cbItem, cItems, cMilliesInterval, pfnCallback, ppQueue);
     /** @todo int rc = PDMR3QueueCreateUsb(pVM, pUsbIns, cbItem, cItems, cMilliesInterval, pfnCallback, fGCEnabled, pszName, ppQueue); */
     int rc = VERR_NOT_IMPLEMENTED; AssertFailed();
 
diff --git a/src/VBox/VMM/VMMR3/PGM.cpp b/src/VBox/VMM/VMMR3/PGM.cpp
index da52028..7cc1a40 100644
--- a/src/VBox/VMM/VMMR3/PGM.cpp
+++ b/src/VBox/VMM/VMMR3/PGM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -2165,7 +2165,7 @@ VMMR3DECL(int) PGMR3InitDynMap(PVM pVM)
  */
 VMMR3DECL(int) PGMR3InitFinalize(PVM pVM)
 {
-    int rc;
+    int rc = VERR_IPE_UNINITIALIZED_STATUS; /* (MSC incorrectly thinks it can be usused uninitialized) */
 
     /*
      * Reserve space for the dynamic mappings.
@@ -4207,24 +4207,24 @@ VMMR3DECL(int) PGMR3CheckIntegrity(PVM pVM)
      * Check the trees.
      */
     int cErrors = 0;
-    const static PGMCHECKINTARGS s_LeftToRight = {  true, NULL, NULL, NULL, pVM };
-    const static PGMCHECKINTARGS s_RightToLeft = { false, NULL, NULL, NULL, pVM };
-    PGMCHECKINTARGS Args = s_LeftToRight;
+    const PGMCHECKINTARGS LeftToRight = {  true, NULL, NULL, NULL, pVM };
+    const PGMCHECKINTARGS RightToLeft = { false, NULL, NULL, NULL, pVM };
+    PGMCHECKINTARGS Args = LeftToRight;
     cErrors += RTAvlroGCPhysDoWithAll(&pVM->pgm.s.pTreesR3->PhysHandlers,       true,  pgmR3CheckIntegrityPhysHandlerNode, &Args);
-    Args = s_RightToLeft;
+    Args = RightToLeft;
     cErrors += RTAvlroGCPhysDoWithAll(&pVM->pgm.s.pTreesR3->PhysHandlers,       false, pgmR3CheckIntegrityPhysHandlerNode, &Args);
 #ifdef VBOX_WITH_RAW_MODE
-    Args = s_LeftToRight;
+    Args = LeftToRight;
     cErrors += RTAvlroGCPtrDoWithAll( &pVM->pgm.s.pTreesR3->VirtHandlers,       true,  pgmR3CheckIntegrityVirtHandlerNode, &Args);
-    Args = s_RightToLeft;
+    Args = RightToLeft;
     cErrors += RTAvlroGCPtrDoWithAll( &pVM->pgm.s.pTreesR3->VirtHandlers,       false, pgmR3CheckIntegrityVirtHandlerNode, &Args);
-    Args = s_LeftToRight;
+    Args = LeftToRight;
     cErrors += RTAvlroGCPtrDoWithAll( &pVM->pgm.s.pTreesR3->HyperVirtHandlers,  true,  pgmR3CheckIntegrityVirtHandlerNode, &Args);
-    Args = s_RightToLeft;
+    Args = RightToLeft;
     cErrors += RTAvlroGCPtrDoWithAll( &pVM->pgm.s.pTreesR3->HyperVirtHandlers,  false, pgmR3CheckIntegrityVirtHandlerNode, &Args);
-    Args = s_LeftToRight;
+    Args = LeftToRight;
     cErrors += RTAvlroGCPhysDoWithAll(&pVM->pgm.s.pTreesR3->PhysToVirtHandlers, true,  pgmR3CheckIntegrityPhysToVirtHandlerNode, &Args);
-    Args = s_RightToLeft;
+    Args = RightToLeft;
     cErrors += RTAvlroGCPhysDoWithAll(&pVM->pgm.s.pTreesR3->PhysToVirtHandlers, false, pgmR3CheckIntegrityPhysToVirtHandlerNode, &Args);
 #endif /* VBOX_WITH_RAW_MODE */
 
diff --git a/src/VBox/VMM/VMMR3/PGMBth.h b/src/VBox/VMM/VMMR3/PGMBth.h
index 6c368b7..2f792ae 100644
--- a/src/VBox/VMM/VMMR3/PGMBth.h
+++ b/src/VBox/VMM/VMMR3/PGMBth.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/PGMDbg.cpp b/src/VBox/VMM/VMMR3/PGMDbg.cpp
index 9cd9928..88f6a07 100644
--- a/src/VBox/VMM/VMMR3/PGMDbg.cpp
+++ b/src/VBox/VMM/VMMR3/PGMDbg.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -331,7 +331,7 @@ VMMR3_INT_DECL(int) PGMR3DbgReadGCPtr(PVM pVM, void *pvDst, RTGCPTR GCPtrSrc, si
     AssertReturn(!fFlags, VERR_INVALID_PARAMETER);
     AssertReturn(pVM, VERR_INVALID_PARAMETER);
 
-    /* @todo SMP support! */
+    /** @todo SMP support! */
     PVMCPU pVCpu = &pVM->aCpus[0];
 
 /** @todo deal with HMA */
@@ -387,7 +387,7 @@ VMMR3_INT_DECL(int) PGMR3DbgWriteGCPtr(PVM pVM, RTGCPTR GCPtrDst, void const *pv
     AssertReturn(!fFlags, VERR_INVALID_PARAMETER);
     AssertReturn(pVM, VERR_INVALID_PARAMETER);
 
-    /* @todo SMP support! */
+    /** @todo SMP support! */
     PVMCPU pVCpu = &pVM->aCpus[0];
 
 /** @todo deal with HMA */
diff --git a/src/VBox/VMM/VMMR3/PGMGst.h b/src/VBox/VMM/VMMR3/PGMGst.h
index b652fca..23f66cd 100644
--- a/src/VBox/VMM/VMMR3/PGMGst.h
+++ b/src/VBox/VMM/VMMR3/PGMGst.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/PGMHandler.cpp b/src/VBox/VMM/VMMR3/PGMHandler.cpp
index 163514d..4d5572a 100644
--- a/src/VBox/VMM/VMMR3/PGMHandler.cpp
+++ b/src/VBox/VMM/VMMR3/PGMHandler.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/PGMMap.cpp b/src/VBox/VMM/VMMR3/PGMMap.cpp
index 2f598a9..3a96121 100644
--- a/src/VBox/VMM/VMMR3/PGMMap.cpp
+++ b/src/VBox/VMM/VMMR3/PGMMap.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -494,6 +494,8 @@ VMMR3DECL(int) PGMR3MappingsSize(PVM pVM, uint32_t *pcb)
 #ifndef PGM_WITHOUT_MAPPINGS
     for (PPGMMAPPING pCur = pVM->pgm.s.pMappingsR3; pCur; pCur = pCur->pNextR3)
         cb += pCur->cb;
+#else
+    RT_NOREF(pVM);
 #endif
 
     *pcb = cb;
@@ -533,7 +535,10 @@ VMMR3DECL(int) PGMR3MappingsFix(PVM pVM, RTGCPTR GCPtrBase, uint32_t cb)
 
         return pgmR3MappingsFixInternal(pVM, GCPtrBase, cb);
     }
-#endif /* !PGM_WITHOUT_MAPPINGS */
+
+#else  /* PGM_WITHOUT_MAPPINGS */
+    RT_NOREF(pVM, GCPtrBase, cb);
+#endif /* PGM_WITHOUT_MAPPINGS */
 
     Assert(HMIsEnabled(pVM));
     return VINF_SUCCESS;
diff --git a/src/VBox/VMM/VMMR3/PGMPhys.cpp b/src/VBox/VMM/VMMR3/PGMPhys.cpp
index f62eabe..66f3c00 100644
--- a/src/VBox/VMM/VMMR3/PGMPhys.cpp
+++ b/src/VBox/VMM/VMMR3/PGMPhys.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1251,8 +1251,8 @@ VMMR3DECL(int) PGMR3PhysEnumDirtyFTPages(PVM pVM, PFNPGMENUMDIRTYFTPAGES pfnEnum
                         if (   !PGM_PAGE_IS_WRITTEN_TO(pPage)  /* not very recently updated? */
                             && PGM_PAGE_IS_FT_DIRTY(pPage))
                         {
-                            unsigned       cbPageRange = PAGE_SIZE;
-                            unsigned       iPageClean  = iPage + 1;
+                            uint32_t       cbPageRange = PAGE_SIZE;
+                            uint32_t       iPageClean  = iPage + 1;
                             RTGCPHYS       GCPhysPage  = pRam->GCPhys + iPage * PAGE_SIZE;
                             uint8_t       *pu8Page     = NULL;
                             PGMPAGEMAPLOCK Lock;
@@ -1284,10 +1284,8 @@ VMMR3DECL(int) PGMR3PhysEnumDirtyFTPages(PVM pVM, PFNPGMENUMDIRTYFTPAGES pfnEnum
                                 PGMPhysReleasePageMappingLock(pVM, &Lock);
                             }
 
-                            for (iPage; iPage < iPageClean; iPage++)
-                                PGM_PAGE_CLEAR_FT_DIRTY(&pRam->aPages[iPage]);
-
-                            iPage = iPageClean - 1;
+                            for (uint32_t iTmp = iPage; iTmp < iPageClean; iTmp++)
+                                PGM_PAGE_CLEAR_FT_DIRTY(&pRam->aPages[iTmp]);
                         }
                         break;
                 }
@@ -1508,7 +1506,7 @@ static DECLCALLBACK(bool) pgmR3PhysRamRangeRelocate(PVM pVM, RTGCPTR GCPtrOld, R
 {
     PPGMRAMRANGE pRam = (PPGMRAMRANGE)pvUser;
     Assert(pRam->fFlags & PGM_RAM_RANGE_FLAGS_FLOATING);
-    Assert(pRam->pSelfRC == GCPtrOld + PAGE_SIZE);
+    Assert(pRam->pSelfRC == GCPtrOld + PAGE_SIZE); RT_NOREF_PV(GCPtrOld);
 
     switch (enmMode)
     {
@@ -2541,75 +2539,77 @@ VMMR3DECL(int) PGMR3PhysMMIO2Register(PVM pVM, PPDMDEVINS pDevIns, uint32_t iReg
     int rc = MMR3AdjustFixedReservation(pVM, cPages, pszDesc);
     if (RT_SUCCESS(rc))
     {
-        void *pvPages;
         PSUPPAGE paPages = (PSUPPAGE)RTMemTmpAlloc(cPages * sizeof(SUPPAGE));
         if (RT_SUCCESS(rc))
-            rc = SUPR3PageAllocEx(cPages, 0 /*fFlags*/, &pvPages, NULL /*pR0Ptr*/, paPages);
-        if (RT_SUCCESS(rc))
         {
-            memset(pvPages, 0, cPages * PAGE_SIZE);
-
-            /*
-             * Create the MMIO2 range record for it.
-             */
-            const size_t cbRange = RT_OFFSETOF(PGMMMIO2RANGE, RamRange.aPages[cPages]);
-            PPGMMMIO2RANGE pNew;
-            rc = MMR3HyperAllocOnceNoRel(pVM, cbRange, 0, MM_TAG_PGM_PHYS, (void **)&pNew);
-            AssertLogRelMsgRC(rc, ("cbRamRange=%zu\n", cbRange));
+            void *pvPages;
+            rc = SUPR3PageAllocEx(cPages, 0 /*fFlags*/, &pvPages, NULL /*pR0Ptr*/, paPages);
             if (RT_SUCCESS(rc))
             {
-                pNew->pDevInsR3             = pDevIns;
-                pNew->pvR3                  = pvPages;
-                //pNew->pNext               = NULL;
-                //pNew->fMapped             = false;
-                //pNew->fOverlapping        = false;
-                pNew->iRegion               = iRegion;
-                pNew->idSavedState          = UINT8_MAX;
-                pNew->idMmio2               = idMmio2;
-                pNew->RamRange.pSelfR0      = MMHyperCCToR0(pVM, &pNew->RamRange);
-                pNew->RamRange.pSelfRC      = MMHyperCCToRC(pVM, &pNew->RamRange);
-                pNew->RamRange.GCPhys       = NIL_RTGCPHYS;
-                pNew->RamRange.GCPhysLast   = NIL_RTGCPHYS;
-                pNew->RamRange.pszDesc      = pszDesc;
-                pNew->RamRange.cb           = cb;
-                pNew->RamRange.fFlags       = PGM_RAM_RANGE_FLAGS_AD_HOC_MMIO2;
-                pNew->RamRange.pvR3         = pvPages;
-                //pNew->RamRange.paLSPages    = NULL;
-
-                uint32_t iPage = cPages;
-                while (iPage-- > 0)
-                {
-                    PGM_PAGE_INIT(&pNew->RamRange.aPages[iPage],
-                                  paPages[iPage].Phys,
-                                  PGM_MMIO2_PAGEID_MAKE(idMmio2, iPage),
-                                  PGMPAGETYPE_MMIO2, PGM_PAGE_STATE_ALLOCATED);
-                }
-
-                /* update page count stats */
-                pVM->pgm.s.cAllPages     += cPages;
-                pVM->pgm.s.cPrivatePages += cPages;
+                memset(pvPages, 0, cPages * PAGE_SIZE);
 
                 /*
-                 * Link it into the list.
-                 * Since there is no particular order, just push it.
+                 * Create the MMIO2 range record for it.
                  */
-                /** @todo we can save us the linked list now, just search the lookup table... */
-                pgmLock(pVM);
-                Assert(pVM->pgm.s.apMmio2RangesR3[idMmio2 - 1] == NULL);
-                Assert(pVM->pgm.s.apMmio2RangesR0[idMmio2 - 1] == NIL_RTR0PTR);
-                pNew->pNextR3 = pVM->pgm.s.pMmio2RangesR3;
-                pVM->pgm.s.pMmio2RangesR3 = pNew;
-                pVM->pgm.s.apMmio2RangesR3[idMmio2 - 1] = pNew;
-                pVM->pgm.s.apMmio2RangesR0[idMmio2 - 1] = MMHyperCCToR0(pVM, pNew);
-                pgmUnlock(pVM);
+                const size_t cbRange = RT_OFFSETOF(PGMMMIO2RANGE, RamRange.aPages[cPages]);
+                PPGMMMIO2RANGE pNew;
+                rc = MMR3HyperAllocOnceNoRel(pVM, cbRange, 0, MM_TAG_PGM_PHYS, (void **)&pNew);
+                AssertLogRelMsgRC(rc, ("cbRamRange=%zu\n", cbRange));
+                if (RT_SUCCESS(rc))
+                {
+                    pNew->pDevInsR3             = pDevIns;
+                    pNew->pvR3                  = pvPages;
+                    //pNew->pNext               = NULL;
+                    //pNew->fMapped             = false;
+                    //pNew->fOverlapping        = false;
+                    pNew->iRegion               = iRegion;
+                    pNew->idSavedState          = UINT8_MAX;
+                    pNew->idMmio2               = idMmio2;
+                    pNew->RamRange.pSelfR0      = MMHyperCCToR0(pVM, &pNew->RamRange);
+                    pNew->RamRange.pSelfRC      = MMHyperCCToRC(pVM, &pNew->RamRange);
+                    pNew->RamRange.GCPhys       = NIL_RTGCPHYS;
+                    pNew->RamRange.GCPhysLast   = NIL_RTGCPHYS;
+                    pNew->RamRange.pszDesc      = pszDesc;
+                    pNew->RamRange.cb           = cb;
+                    pNew->RamRange.fFlags       = PGM_RAM_RANGE_FLAGS_AD_HOC_MMIO2;
+                    pNew->RamRange.pvR3         = pvPages;
+                    //pNew->RamRange.paLSPages    = NULL;
+
+                    uint32_t iPage = cPages;
+                    while (iPage-- > 0)
+                    {
+                        PGM_PAGE_INIT(&pNew->RamRange.aPages[iPage],
+                                      paPages[iPage].Phys,
+                                      PGM_MMIO2_PAGEID_MAKE(idMmio2, iPage),
+                                      PGMPAGETYPE_MMIO2, PGM_PAGE_STATE_ALLOCATED);
+                    }
 
-                *ppv = pvPages;
-                RTMemTmpFree(paPages);
-                pgmPhysInvalidatePageMapTLB(pVM);
-                return VINF_SUCCESS;
-            }
+                    /* update page count stats */
+                    pVM->pgm.s.cAllPages     += cPages;
+                    pVM->pgm.s.cPrivatePages += cPages;
+
+                    /*
+                     * Link it into the list.
+                     * Since there is no particular order, just push it.
+                     */
+                    /** @todo we can save us the linked list now, just search the lookup table... */
+                    pgmLock(pVM);
+                    Assert(pVM->pgm.s.apMmio2RangesR3[idMmio2 - 1] == NULL);
+                    Assert(pVM->pgm.s.apMmio2RangesR0[idMmio2 - 1] == NIL_RTR0PTR);
+                    pNew->pNextR3 = pVM->pgm.s.pMmio2RangesR3;
+                    pVM->pgm.s.pMmio2RangesR3 = pNew;
+                    pVM->pgm.s.apMmio2RangesR3[idMmio2 - 1] = pNew;
+                    pVM->pgm.s.apMmio2RangesR0[idMmio2 - 1] = MMHyperCCToR0(pVM, pNew);
+                    pgmUnlock(pVM);
 
-            SUPR3PageFreeEx(pvPages, cPages);
+                    *ppv = pvPages;
+                    RTMemTmpFree(paPages);
+                    pgmPhysInvalidatePageMapTLB(pVM);
+                    return VINF_SUCCESS;
+                }
+
+                SUPR3PageFreeEx(pvPages, cPages);
+            }
         }
         RTMemTmpFree(paPages);
         MMR3AdjustFixedReservation(pVM, -(int32_t)cPages, pszDesc);
@@ -2870,7 +2870,9 @@ VMMR3DECL(int) PGMR3PhysMMIO2Map(PVM pVM, PPDMDEVINS pDevIns, uint32_t iRegion,
     }
     else
     {
+#ifdef VBOX_WITH_REM
         RTGCPHYS cb = pCur->RamRange.cb;
+#endif
 
         /* Clear the tracking data of pages we're going to reactivate. */
         PPGMPAGE pPageSrc = &pCur->RamRange.aPages[0];
@@ -4272,6 +4274,7 @@ VMMR3DECL(int) PGMR3PhysAllocateLargeHandyPage(PVM pVM, RTGCPHYS GCPhys)
     pgmUnlock(pVM);
     return rc;
 #else
+    RT_NOREF(pVM, GCPhys);
     return VERR_NOT_IMPLEMENTED;
 #endif /* PGM_WITH_LARGE_PAGES */
 }
@@ -4323,7 +4326,7 @@ VMMR3DECL(int) PGMR3PhysAllocateHandyPages(PVM pVM)
             rc = VMMR3CallR0(pVM, VMMR0_DO_PGM_ALLOCATE_HANDY_PAGES, 0, NULL);
     }
 
-    /* todo: we should split this up into an allocate and flush operation. sometimes you want to flush and not allocate more (which will trigger the vm account limit error) */
+    /** @todo we should split this up into an allocate and flush operation. sometimes you want to flush and not allocate more (which will trigger the vm account limit error) */
     if (    rc == VERR_GMM_HIT_VM_ACCOUNT_LIMIT
         &&  pVM->pgm.s.cHandyPages > 0)
     {
@@ -4350,11 +4353,11 @@ VMMR3DECL(int) PGMR3PhysAllocateHandyPages(PVM pVM)
             RTAssertMsg1Weak(NULL, __LINE__, __FILE__, __FUNCTION__);
             RTAssertMsg2Weak("i=%d iClear=%d cHandyPages=%d\n", i, iClear, pVM->pgm.s.cHandyPages);
             for (uint32_t j = iClear; j < pVM->pgm.s.cHandyPages; j++)
-                RTAssertMsg2Add(("%03d: idPage=%d HCPhysGCPhys=%RHp idSharedPage=%d%\n", j,
-                                 pVM->pgm.s.aHandyPages[j].idPage,
-                                 pVM->pgm.s.aHandyPages[j].HCPhysGCPhys,
-                                 pVM->pgm.s.aHandyPages[j].idSharedPage,
-                                 j == i ? " <---" : ""));
+                RTAssertMsg2Add("%03d: idPage=%d HCPhysGCPhys=%RHp idSharedPage=%d%\n", j,
+                                pVM->pgm.s.aHandyPages[j].idPage,
+                                pVM->pgm.s.aHandyPages[j].HCPhysGCPhys,
+                                pVM->pgm.s.aHandyPages[j].idSharedPage,
+                                j == i ? " <---" : "");
             RTAssertPanic();
         }
 #endif
diff --git a/src/VBox/VMM/VMMR3/PGMPhysRWTmpl.h b/src/VBox/VMM/VMMR3/PGMPhysRWTmpl.h
index 3ac9bd3..34c059b 100644
--- a/src/VBox/VMM/VMMR3/PGMPhysRWTmpl.h
+++ b/src/VBox/VMM/VMMR3/PGMPhysRWTmpl.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/PGMPool.cpp b/src/VBox/VMM/VMMR3/PGMPool.cpp
index fdd2b19..c0c5fd6 100644
--- a/src/VBox/VMM/VMMR3/PGMPool.cpp
+++ b/src/VBox/VMM/VMMR3/PGMPool.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -174,7 +174,7 @@ int pgmR3PoolInit(PVM pVM)
         cMaxPages = PGMPOOL_IDX_LAST;
     LogRel(("PGM: PGMPool: cMaxPages=%u (u64MaxPages=%llu)\n", cMaxPages, u64MaxPages));
 
-    /** todo:
+    /** @todo
      * We need to be much more careful with our allocation strategy here.
      * For nested paging we don't need pool user info nor extents at all, but
      * we can't check for nested paging here (too early during init to get a
@@ -845,7 +845,7 @@ static DECLCALLBACK(int) pgmR3PoolCmdCheck(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp,
         PPGMPOOLPAGE    pPage     = &pPool->aPages[i];
         bool            fFirstMsg = true;
 
-        /* Todo: cover other paging modes too. */
+        /** @todo cover other paging modes too. */
         if (pPage->enmKind == PGMPOOLKIND_PAE_PT_FOR_PAE_PT)
         {
             PPGMSHWPTPAE pShwPT = (PPGMSHWPTPAE)PGMPOOL_PAGE_2_PTR(pPool->CTX_SUFF(pVM), pPage);
diff --git a/src/VBox/VMM/VMMR3/PGMR3DbgA.asm b/src/VBox/VMM/VMMR3/PGMR3DbgA.asm
index 27e5d90..3603972 100644
--- a/src/VBox/VMM/VMMR3/PGMR3DbgA.asm
+++ b/src/VBox/VMM/VMMR3/PGMR3DbgA.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/PGMSavedState.cpp b/src/VBox/VMM/VMMR3/PGMSavedState.cpp
index 56b20e8..9e9b0d0 100644
--- a/src/VBox/VMM/VMMR3/PGMSavedState.cpp
+++ b/src/VBox/VMM/VMMR3/PGMSavedState.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/PGMSharedPage.cpp b/src/VBox/VMM/VMMR3/PGMSharedPage.cpp
index 056cd85..2dd79b7 100644
--- a/src/VBox/VMM/VMMR3/PGMSharedPage.cpp
+++ b/src/VBox/VMM/VMMR3/PGMSharedPage.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/PGMShw.h b/src/VBox/VMM/VMMR3/PGMShw.h
index 8593dbc..66de465 100644
--- a/src/VBox/VMM/VMMR3/PGMShw.h
+++ b/src/VBox/VMM/VMMR3/PGMShw.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/SELM.cpp b/src/VBox/VMM/VMMR3/SELM.cpp
index 647376c..9e1ae5a 100644
--- a/src/VBox/VMM/VMMR3/SELM.cpp
+++ b/src/VBox/VMM/VMMR3/SELM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -106,7 +106,7 @@ static DECLCALLBACK(void) selmR3InfoLdtGuest(PVM pVM, PCDBGFINFOHLP pHlp, const
 /*********************************************************************************************************************************
 *   Global Variables                                                                                                             *
 *********************************************************************************************************************************/
-#ifdef LOG_ENABLED
+#if defined(VBOX_WITH_RAW_MODE) && defined(LOG_ENABLED)
 /** Segment register names. */
 static char const g_aszSRegNms[X86_SREG_COUNT][4] = { "ES", "CS", "SS", "DS", "FS", "GS" };
 #endif
@@ -364,7 +364,9 @@ VMMR3DECL(int) SELMR3InitFinalize(PVM pVM)
                            X86_PTE_RW | X86_PTE_P | X86_PTE_A | X86_PTE_D);
         AssertRC(rc);
     }
-#endif /* VBOX_WITH_RAW_MODE */
+#else  /* !VBOX_WITH_RAW_MODE */
+    RT_NOREF(pVM);
+#endif /* !VBOX_WITH_RAW_MODE */
     return VINF_SUCCESS;
 }
 
@@ -631,11 +633,10 @@ VMMR3DECL(void) SELMR3Reset(PVM pVM)
      * Uninstall guest GDT/LDT/TSS write access handlers.
      */
     PVMCPU pVCpu = VMMGetCpu(pVM); NOREF(pVCpu);
-    int rc = VINF_SUCCESS;
     if (pVM->selm.s.GuestGdtr.pGdt != RTRCPTR_MAX && pVM->selm.s.fGDTRangeRegistered)
     {
 #ifdef SELM_TRACK_GUEST_GDT_CHANGES
-        rc = PGMHandlerVirtualDeregister(pVM, pVCpu, pVM->selm.s.GuestGdtr.pGdt, false /*fHypervisor*/);
+        int rc = PGMHandlerVirtualDeregister(pVM, pVCpu, pVM->selm.s.GuestGdtr.pGdt, false /*fHypervisor*/);
         AssertRC(rc);
 #endif
         pVM->selm.s.GuestGdtr.pGdt = RTRCPTR_MAX;
@@ -645,7 +646,7 @@ VMMR3DECL(void) SELMR3Reset(PVM pVM)
     if (pVM->selm.s.GCPtrGuestLdt != RTRCPTR_MAX)
     {
 #ifdef SELM_TRACK_GUEST_LDT_CHANGES
-        rc = PGMHandlerVirtualDeregister(pVM, pVCpu, pVM->selm.s.GCPtrGuestLdt, false /*fHypervisor*/);
+        int rc = PGMHandlerVirtualDeregister(pVM, pVCpu, pVM->selm.s.GCPtrGuestLdt, false /*fHypervisor*/);
         AssertRC(rc);
 #endif
         pVM->selm.s.GCPtrGuestLdt = RTRCPTR_MAX;
@@ -653,7 +654,7 @@ VMMR3DECL(void) SELMR3Reset(PVM pVM)
     if (pVM->selm.s.GCPtrGuestTss != RTRCPTR_MAX)
     {
 #ifdef SELM_TRACK_GUEST_TSS_CHANGES
-        rc = PGMHandlerVirtualDeregister(pVM, pVCpu, pVM->selm.s.GCPtrGuestTss, false /*fHypervisor*/);
+        int rc = PGMHandlerVirtualDeregister(pVM, pVCpu, pVM->selm.s.GCPtrGuestTss, false /*fHypervisor*/);
         AssertRC(rc);
 #endif
         pVM->selm.s.GCPtrGuestTss = RTRCPTR_MAX;
@@ -817,7 +818,10 @@ static DECLCALLBACK(int) selmR3LoadDone(PVM pVM, PSSMHANDLE pSSM)
         VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_LDT);
         VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_TSS);
     }
-#endif /*VBOX_WITH_RAW_MODE*/
+
+#else  /* !VBOX_WITH_RAW_MODE */
+    RT_NOREF(pVM, pSSM);
+#endif /* !VBOX_WITH_RAW_MODE */
     return VINF_SUCCESS;
 }
 
@@ -2039,6 +2043,8 @@ VMMR3DECL(bool) SELMR3CheckShadowTR(PVM pVM)
         AssertFailed();
         return false;
     }
+#  else
+    RT_NOREF_PV(pVM);
 #  endif
     return true;
 }
@@ -2499,12 +2505,18 @@ static void selmR3FormatDescriptor(X86DESC Desc, RTSEL Sel, char *pszOutput, siz
  * @param   Sel     Selector number.
  * @param   pszMsg  Message to prepend the log entry with.
  */
-VMMR3DECL(void) SELMR3DumpDescriptor(X86DESC  Desc, RTSEL Sel, const char *pszMsg)
+VMMR3DECL(void) SELMR3DumpDescriptor(X86DESC Desc, RTSEL Sel, const char *pszMsg)
 {
-    char szOutput[128];
-    selmR3FormatDescriptor(Desc, Sel, &szOutput[0], sizeof(szOutput));
-    Log(("%s: %s\n", pszMsg, szOutput));
-    NOREF(szOutput[0]);
+#ifdef LOG_ENABLED
+    if (LogIsEnabled())
+    {
+        char szOutput[128];
+        selmR3FormatDescriptor(Desc, Sel, &szOutput[0], sizeof(szOutput));
+        Log(("%s: %s\n", pszMsg, szOutput));
+    }
+#else
+    RT_NOREF3(Desc, Sel, pszMsg);
+#endif
 }
 
 
diff --git a/src/VBox/VMM/VMMR3/SSM.cpp b/src/VBox/VMM/VMMR3/SSM.cpp
index 9cb0c3d..9747f99 100644
--- a/src/VBox/VMM/VMMR3/SSM.cpp
+++ b/src/VBox/VMM/VMMR3/SSM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -868,9 +868,11 @@ typedef SSMFILEFTR const *PCSSMFILEFTR;
 /*********************************************************************************************************************************
 *   Global Variables                                                                                                             *
 *********************************************************************************************************************************/
+#ifndef SSM_STANDALONE
 /** Zeros used by the struct putter.
  * This must be at least 8 bytes or the code breaks. */
 static uint8_t const    g_abZero[_1K] = {0};
+#endif
 
 
 /*********************************************************************************************************************************
@@ -2828,6 +2830,8 @@ static int ssmR3StrmCheckAndFlush(PSSMSTRM pStrm)
 }
 #endif /* !SSM_STANDALONE */
 
+
+#if !defined(SSM_STANDALONE) || defined(LOG_ENABLED)
 /**
  * Tell current stream position.
  *
@@ -2838,6 +2842,7 @@ static uint64_t ssmR3StrmTell(PSSMSTRM pStrm)
 {
     return pStrm->offCurStream + pStrm->off;
 }
+#endif
 
 
 /**
@@ -8269,7 +8274,7 @@ static void ssmR3StrmLogUnitContent(PSSMHANDLE pSSM, SSMFILEUNITHDRV2 const *pUn
     else
         LogRel(("SSM: Cannot dump unit - ssmR3StrmSeek error: %Rrc\n", rc));
 
-    pSSM->rc = rc;
+    pSSM->rc = rcSaved;
 }
 
 
diff --git a/src/VBox/VMM/VMMR3/STAM.cpp b/src/VBox/VMM/VMMR3/STAM.cpp
index 72d9a50..5fa6166 100644
--- a/src/VBox/VMM/VMMR3/STAM.cpp
+++ b/src/VBox/VMM/VMMR3/STAM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -829,7 +829,7 @@ static PSTAMDESC stamR3LookupFindNextWithDesc(PSTAMLOOKUP pLookup)
             PSTAMLOOKUP *papChildren = pCur->papChildren;
             do
             {
-                PSTAMLOOKUP pChild = pCur->papChildren[iCur];
+                PSTAMLOOKUP pChild = papChildren[iCur];
                 if (pChild->pDesc)
                     return pChild->pDesc;
 
@@ -907,10 +907,10 @@ static PSTAMDESC stamR3LookupFindFirstDescForRange(PSTAMLOOKUP pFirst, PSTAMLOOK
             /*
              * Check all children.
              */
-            PSTAMLOOKUP *papChildren = pCur->papChildren;
+            PSTAMLOOKUP * const papChildren = pCur->papChildren;
             do
             {
-                PSTAMLOOKUP pChild = pCur->papChildren[iCur];
+                PSTAMLOOKUP pChild = papChildren[iCur];
                 if (pChild->pDesc)
                     return pChild->pDesc;
                 if (pChild->cChildren > 0)
@@ -962,10 +962,10 @@ static PSTAMDESC stamR3LookupFindLastDescForRange(PSTAMLOOKUP pFirst, PSTAMLOOKU
             /*
              * Check children backwards, depth first.
              */
-            PSTAMLOOKUP *papChildren = pCur->papChildren;
+            PSTAMLOOKUP * const papChildren = pCur->papChildren;
             do
             {
-                PSTAMLOOKUP pChild = pCur->papChildren[iCur];
+                PSTAMLOOKUP pChild = papChildren[iCur];
                 if (pChild->cChildren > 0)
                 {
                     /* One level down. */
@@ -1445,10 +1445,9 @@ static int stamR3RegisterU(PUVM pUVM, void *pvSample, PFNSTAMR3CALLBACKRESET pfn
  * Destroys the statistics descriptor, unlinking it and freeing all resources.
  *
  * @returns VINF_SUCCESS
- * @param   pUVM        Pointer to the user mode VM structure.
  * @param   pCur        The descriptor to destroy.
  */
-static int stamR3DestroyDesc(PUVM pUVM, PSTAMDESC pCur)
+static int stamR3DestroyDesc(PSTAMDESC pCur)
 {
     RTListNodeRemove(&pCur->ListEntry);
 #ifdef STAM_WITH_LOOKUP_TREE
@@ -1492,7 +1491,7 @@ VMMR3DECL(int)  STAMR3DeregisterByAddr(PUVM pUVM, void *pvSample)
     RTListForEachSafe(&pUVM->stam.s.List, pCur, pNext, STAMDESC, ListEntry)
     {
         if (pCur->u.pv == pvSample)
-            rc = stamR3DestroyDesc(pUVM, pCur);
+            rc = stamR3DestroyDesc(pCur);
     }
 
     STAM_UNLOCK_WR(pUVM);
@@ -1525,7 +1524,7 @@ static int stamR3DeregisterByPattern(PUVM pUVM, const char *pszPat)
             PSTAMDESC pNext = RTListNodeGetNext(&pCur->ListEntry, STAMDESC, ListEntry);
 
             if (RTStrSimplePatternMatch(pszPat, pCur->pszName))
-                rc = stamR3DestroyDesc(pUVM, pCur);
+                rc = stamR3DestroyDesc(pCur);
 
             /* advance. */
             if (pCur == pLast)
@@ -1721,7 +1720,7 @@ static int stamR3ResetOne(PSTAMDESC pDesc, void *pvArg)
             ASMAtomicXchgU64(&pDesc->u.pProfile->cPeriods, 0);
             ASMAtomicXchgU64(&pDesc->u.pProfile->cTicks, 0);
             ASMAtomicXchgU64(&pDesc->u.pProfile->cTicksMax, 0);
-            ASMAtomicXchgU64(&pDesc->u.pProfile->cTicksMin, ~0);
+            ASMAtomicXchgU64(&pDesc->u.pProfile->cTicksMin, UINT64_MAX);
             break;
 
         case STAMTYPE_RATIO_U32_RESET:
diff --git a/src/VBox/VMM/VMMR3/TM.cpp b/src/VBox/VMM/VMMR3/TM.cpp
index a51b96f..f60c40b 100644
--- a/src/VBox/VMM/VMMR3/TM.cpp
+++ b/src/VBox/VMM/VMMR3/TM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -168,8 +168,7 @@
 *   Internal Functions                                                                                                           *
 *********************************************************************************************************************************/
 static bool                 tmR3HasFixedTSC(PVM pVM);
-static const char *         tmR3GetTSCModeName(PVM pVM);
-static uint64_t             tmR3CalibrateTSC(PVM pVM);
+static uint64_t             tmR3CalibrateTSC(void);
 static DECLCALLBACK(int)    tmR3Save(PVM pVM, PSSMHANDLE pSSM);
 static DECLCALLBACK(int)    tmR3Load(PVM pVM, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass);
 static DECLCALLBACK(void)   tmR3TimerCallback(PRTTIMER pTimer, void *pvUser, uint64_t iTick);
@@ -183,6 +182,8 @@ static DECLCALLBACK(void)   tmR3TimerInfo(PVM pVM, PCDBGFINFOHLP pHlp, const cha
 static DECLCALLBACK(void)   tmR3TimerInfoActive(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs);
 static DECLCALLBACK(void)   tmR3InfoClocks(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs);
 static DECLCALLBACK(VBOXSTRICTRC) tmR3CpuTickParavirtDisable(PVM pVM, PVMCPU pVCpu, void *pvData);
+static const char *         tmR3GetTSCModeName(PVM pVM);
+static const char *         tmR3GetTSCModeNameEx(TMTSCMODE enmMode);
 
 
 /**
@@ -414,7 +415,7 @@ VMM_INT_DECL(int) TMR3Init(PVM pVM)
     rc = CFGMR3QueryU64(pCfgHandle, "TSCTicksPerSecond", &pVM->tm.s.cTSCTicksPerSecond);
     if (rc == VERR_CFGM_VALUE_NOT_FOUND)
     {
-        pVM->tm.s.cTSCTicksPerSecond = tmR3CalibrateTSC(pVM);
+        pVM->tm.s.cTSCTicksPerSecond = tmR3CalibrateTSC();
         if (   pVM->tm.s.enmTSCMode != TMTSCMODE_REAL_TSC_OFFSET
             && pVM->tm.s.cTSCTicksPerSecond >= _4G)
         {
@@ -924,7 +925,7 @@ static bool tmR3HasFixedTSC(PVM pVM)
  *
  * @returns Number of ticks per second.
  */
-static uint64_t tmR3CalibrateTSC(PVM pVM)
+static uint64_t tmR3CalibrateTSC(void)
 {
     uint64_t u64Hz;
 
@@ -2912,6 +2913,75 @@ static DECLCALLBACK(int) tmR3SetWarpDrive(PUVM pUVM, uint32_t u32Percent)
 
 
 /**
+ * Gets the current TMCLOCK_VIRTUAL time without checking
+ * timers or anything.
+ *
+ * @returns The timestamp.
+ * @param   pUVM        The user mode VM structure.
+ *
+ * @remarks See TMVirtualGetNoCheck.
+ */
+VMMR3DECL(uint64_t) TMR3TimeVirtGet(PUVM pUVM)
+{
+    UVM_ASSERT_VALID_EXT_RETURN(pUVM, UINT64_MAX);
+    PVM pVM = pUVM->pVM;
+    VM_ASSERT_VALID_EXT_RETURN(pVM, UINT64_MAX);
+    return TMVirtualGetNoCheck(pVM);
+}
+
+/**
+ * Gets the current TMCLOCK_VIRTUAL time in milliseconds without checking
+ * timers or anything.
+ *
+ * @returns The timestamp in milliseconds.
+ * @param   pUVM        The user mode VM structure.
+ *
+ * @remarks See TMVirtualGetNoCheck.
+ */
+VMMR3DECL(uint64_t) TMR3TimeVirtGetMilli(PUVM pUVM)
+{
+    UVM_ASSERT_VALID_EXT_RETURN(pUVM, UINT64_MAX);
+    PVM pVM = pUVM->pVM;
+    VM_ASSERT_VALID_EXT_RETURN(pVM, UINT64_MAX);
+    return TMVirtualToMilli(pVM, TMVirtualGetNoCheck(pVM));
+}
+
+/**
+ * Gets the current TMCLOCK_VIRTUAL time in microseconds without checking
+ * timers or anything.
+ *
+ * @returns The timestamp in microseconds.
+ * @param   pUVM        The user mode VM structure.
+ *
+ * @remarks See TMVirtualGetNoCheck.
+ */
+VMMR3DECL(uint64_t) TMR3TimeVirtGetMicro(PUVM pUVM)
+{
+    UVM_ASSERT_VALID_EXT_RETURN(pUVM, UINT64_MAX);
+    PVM pVM = pUVM->pVM;
+    VM_ASSERT_VALID_EXT_RETURN(pVM, UINT64_MAX);
+    return TMVirtualToMicro(pVM, TMVirtualGetNoCheck(pVM));
+}
+
+/**
+ * Gets the current TMCLOCK_VIRTUAL time in nanoseconds without checking
+ * timers or anything.
+ *
+ * @returns The timestamp in nanoseconds.
+ * @param   pUVM        The user mode VM structure.
+ *
+ * @remarks See TMVirtualGetNoCheck.
+ */
+VMMR3DECL(uint64_t) TMR3TimeVirtGetNano(PUVM pUVM)
+{
+    UVM_ASSERT_VALID_EXT_RETURN(pUVM, UINT64_MAX);
+    PVM pVM = pUVM->pVM;
+    VM_ASSERT_VALID_EXT_RETURN(pVM, UINT64_MAX);
+    return TMVirtualToNano(pVM, TMVirtualGetNoCheck(pVM));
+}
+
+
+/**
  * Gets the current warp drive percent.
  *
  * @returns The warp drive percent.
@@ -3183,6 +3253,7 @@ static DECLCALLBACK(VBOXSTRICTRC) tmR3CpuTickParavirtDisable(PVM pVM, PVMCPU pVC
     AssertPtr(pVM); Assert(pVM->tm.s.fTSCModeSwitchAllowed); NOREF(pVCpuEmt);
     Assert(   pVM->tm.s.enmTSCMode == TMTSCMODE_REAL_TSC_OFFSET
            && pVM->tm.s.enmTSCMode != pVM->tm.s.enmOriginalTSCMode);
+    RT_NOREF1(pvData);
 
     /*
      * See tmR3CpuTickParavirtEnable for an explanation of the conversion math.
diff --git a/src/VBox/VMM/VMMR3/TRPM.cpp b/src/VBox/VMM/VMMR3/TRPM.cpp
index 491297b..9874807 100644
--- a/src/VBox/VMM/VMMR3/TRPM.cpp
+++ b/src/VBox/VMM/VMMR3/TRPM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -741,7 +741,10 @@ VMMR3DECL(void) TRPMR3Relocate(PVM pVM, RTGCINTPTR offDelta)
     pVM->trpm.s.paStatForwardedIRQRC += offDelta;
     pVM->trpm.s.paStatHostIrqRC += offDelta;
 # endif
-#endif /* VBOX_WITH_RAW_MODE */
+
+#else  /* !VBOX_WITH_RAW_MODE */
+    RT_NOREF(pVM, offDelta);
+#endif /* !VBOX_WITH_RAW_MODE */
 }
 
 
@@ -894,10 +897,10 @@ static DECLCALLBACK(int) trpmR3Save(PVM pVM, PSSMHANDLE pSSM)
         SSMR3PutGCUInt(pSSM,    pTrpmCpu->uPrevVector);
     }
     SSMR3PutBool(pSSM,      HMIsEnabled(pVM));
-    PVMCPU pVCpu = &pVM->aCpus[0];  /* raw mode implies 1 VCPU */
-    SSMR3PutUInt(pSSM,      VM_WHEN_RAW_MODE(VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_TRPM_SYNC_IDT), 0));
+    PVMCPU pVCpu0 = &pVM->aCpus[0]; NOREF(pVCpu0); /* raw mode implies 1 VCPU */
+    SSMR3PutUInt(pSSM,      VM_WHEN_RAW_MODE(VMCPU_FF_IS_SET(pVCpu0, VMCPU_FF_TRPM_SYNC_IDT), 0));
     SSMR3PutMem(pSSM,       &pTrpm->au32IdtPatched[0], sizeof(pTrpm->au32IdtPatched));
-    SSMR3PutU32(pSSM, ~0);              /* separator. */
+    SSMR3PutU32(pSSM, UINT32_MAX);          /* separator. */
 
     /*
      * Save any trampoline gates.
@@ -912,7 +915,7 @@ static DECLCALLBACK(int) trpmR3Save(PVM pVM, PSSMHANDLE pSSM)
         }
     }
 
-    return SSMR3PutU32(pSSM, ~0);       /* terminator */
+    return SSMR3PutU32(pSSM, UINT32_MAX);   /* terminator */
 }
 
 
@@ -1225,7 +1228,7 @@ int trpmR3ClearPassThroughHandler(PVM pVM, unsigned iTrap)
 /**
  * Check if address is a gate handler (interrupt or trap).
  *
- * @returns gate nr or ~0 is not found
+ * @returns gate nr or UINT32_MAX is not found
  *
  * @param   pVM         The cross context VM structure.
  * @param   GCPtr       GC address to check.
@@ -1249,7 +1252,7 @@ VMMR3DECL(uint32_t) TRPMR3QueryGateByHandler(PVM pVM, RTRCPTR GCPtr)
                 return iTrap;
         }
     }
-    return ~0;
+    return UINT32_MAX;
 }
 
 
@@ -1485,8 +1488,8 @@ VMMR3DECL(bool) TRPMR3IsGateHandler(PVM pVM, RTRCPTR GCPtr)
  */
 VMMR3DECL(int) TRPMR3InjectEvent(PVM pVM, PVMCPU pVCpu, TRPMEVENT enmEvent)
 {
-    PCPUMCTX pCtx = CPUMQueryGuestCtxPtr(pVCpu);
 #ifdef VBOX_WITH_RAW_MODE
+    PCPUMCTX pCtx = CPUMQueryGuestCtxPtr(pVCpu);
     Assert(!PATMIsPatchGCAddr(pVM, pCtx->eip));
 #endif
     Assert(!VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_INHIBIT_INTERRUPTS));
@@ -1559,6 +1562,7 @@ VMMR3DECL(int) TRPMR3InjectEvent(PVM pVM, PVMCPU pVCpu, TRPMEVENT enmEvent)
     return VINF_EM_RESCHEDULE_REM; /* (Heed the halted state if this is changed!) */
 
 #else  /* !TRPM_FORWARD_TRAPS_IN_GC || IEM_VERIFICATION_MODE */
+    RT_NOREF(pVM, enmEvent);
     uint8_t u8Interrupt = 0;
     int rc = PDMGetInterrupt(pVCpu, &u8Interrupt);
     Log(("TRPMR3InjectEvent: u8Interrupt=%d (%#x) rc=%Rrc\n", u8Interrupt, u8Interrupt, rc));
diff --git a/src/VBox/VMM/VMMR3/VM.cpp b/src/VBox/VMM/VMMR3/VM.cpp
index d67f471..2db75e7 100644
--- a/src/VBox/VMM/VMMR3/VM.cpp
+++ b/src/VBox/VMM/VMMR3/VM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -96,13 +96,6 @@
 
 
 /*********************************************************************************************************************************
-*   Global Variables                                                                                                             *
-*********************************************************************************************************************************/
-/** Pointer to the list of VMs. */
-static PUVM         g_pUVMsHead = NULL;
-
-
-/*********************************************************************************************************************************
 *   Internal Functions                                                                                                           *
 *********************************************************************************************************************************/
 static int                  vmR3CreateUVM(uint32_t cCpus, PCVMM2USERMETHODS pVmm2UserMethods, PUVM *ppUVM);
@@ -118,7 +111,6 @@ static int                  vmR3InitDoCompleted(PVM pVM, VMINITCOMPLETED enmWhat
 static DECLCALLBACK(size_t) vmR3LogPrefixCallback(PRTLOGGER pLogger, char *pchBuf, size_t cchBuf, void *pvUser);
 #endif
 static void                 vmR3DestroyUVM(PUVM pUVM, uint32_t cMilliesEMTWait);
-static void                 vmR3AtDtor(PVM pVM);
 static bool                 vmR3ValidateStateTransition(VMSTATE enmStateOld, VMSTATE enmStateNew);
 static void                 vmR3DoAtState(PVM pVM, PUVM pUVM, VMSTATE enmStateNew, VMSTATE enmStateOld);
 static int                  vmR3TrySetState(PVM pVM, const char *pszWho, unsigned cTransitions, ...);
@@ -2712,6 +2704,8 @@ static void vmR3CheckIntegrity(PVM pVM)
 #ifdef VBOX_STRICT
     int rc = PGMR3CheckIntegrity(pVM);
     AssertReleaseRC(rc);
+#else
+    RT_NOREF_PV(pVM);
 #endif
 }
 
@@ -3259,7 +3253,9 @@ VMMR3DECL(const char *) VMR3GetStateName(VMSTATE enmState)
  */
 static bool vmR3ValidateStateTransition(VMSTATE enmStateOld, VMSTATE enmStateNew)
 {
-#ifdef VBOX_STRICT
+#ifndef VBOX_STRICT
+    RT_NOREF2(enmStateOld, enmStateNew);
+#else
     switch (enmStateOld)
     {
         case VMSTATE_CREATING:
@@ -3530,6 +3526,7 @@ static void vmR3SetState(PVM pVM, VMSTATE enmStateNew, VMSTATE enmStateOld)
     PUVM pUVM = pVM->pUVM;
     RTCritSectEnter(&pUVM->vm.s.AtStateCritSect);
 
+    RT_NOREF_PV(enmStateOld);
     AssertMsg(pVM->enmVMState == enmStateOld,
               ("%s != %s\n", VMR3GetStateName(pVM->enmVMState), VMR3GetStateName(enmStateOld)));
     vmR3SetStateLocked(pVM, pUVM, enmStateNew, pVM->enmVMState, false /*fSetRatherThanClearFF*/);
diff --git a/src/VBox/VMM/VMMR3/VMEmt.cpp b/src/VBox/VMM/VMMR3/VMEmt.cpp
index 3484138..a13ee36 100644
--- a/src/VBox/VMM/VMMR3/VMEmt.cpp
+++ b/src/VBox/VMM/VMMR3/VMEmt.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -46,20 +46,20 @@
 /*********************************************************************************************************************************
 *   Internal Functions                                                                                                           *
 *********************************************************************************************************************************/
-int vmR3EmulationThreadWithId(RTTHREAD ThreadSelf, PUVMCPU pUVCpu, VMCPUID idCpu);
+int vmR3EmulationThreadWithId(RTTHREAD hThreadSelf, PUVMCPU pUVCpu, VMCPUID idCpu);
 
 
 /**
  * The emulation thread main function.
  *
  * @returns Thread exit code.
- * @param   ThreadSelf  The handle to the executing thread.
+ * @param   hThreadSelf The handle to the executing thread.
  * @param   pvArgs      Pointer to the user mode per-VCpu structure (UVMPCU).
  */
-DECLCALLBACK(int) vmR3EmulationThread(RTTHREAD ThreadSelf, void *pvArgs)
+DECLCALLBACK(int) vmR3EmulationThread(RTTHREAD hThreadSelf, void *pvArgs)
 {
     PUVMCPU pUVCpu = (PUVMCPU)pvArgs;
-    return vmR3EmulationThreadWithId(ThreadSelf, pUVCpu, pUVCpu->idCpu);
+    return vmR3EmulationThreadWithId(hThreadSelf, pUVCpu, pUVCpu->idCpu);
 }
 
 
@@ -67,14 +67,15 @@ DECLCALLBACK(int) vmR3EmulationThread(RTTHREAD ThreadSelf, void *pvArgs)
  * The emulation thread main function, with Virtual CPU ID for debugging.
  *
  * @returns Thread exit code.
- * @param   ThreadSelf  The handle to the executing thread.
+ * @param   hThreadSelf The handle to the executing thread.
  * @param   pUVCpu      Pointer to the user mode per-VCpu structure.
  * @param   idCpu       The virtual CPU ID, for backtrace purposes.
  */
-int vmR3EmulationThreadWithId(RTTHREAD ThreadSelf, PUVMCPU pUVCpu, VMCPUID idCpu)
+int vmR3EmulationThreadWithId(RTTHREAD hThreadSelf, PUVMCPU pUVCpu, VMCPUID idCpu)
 {
     PUVM    pUVM = pUVCpu->pUVM;
     int     rc;
+    RT_NOREF_PV(hThreadSelf);
 
     AssertReleaseMsg(VALID_PTR(pUVM) && pUVM->u32Magic == UVM_MAGIC,
                      ("Invalid arguments to the emulation thread!\n"));
@@ -90,7 +91,7 @@ int vmR3EmulationThreadWithId(RTTHREAD ThreadSelf, PUVMCPU pUVCpu, VMCPUID idCpu
      * The request loop.
      */
     rc = VINF_SUCCESS;
-    Log(("vmR3EmulationThread: Emulation thread starting the days work... Thread=%#x pUVM=%p\n", ThreadSelf, pUVM));
+    Log(("vmR3EmulationThread: Emulation thread starting the days work... Thread=%#x pUVM=%p\n", hThreadSelf, pUVM));
     VMSTATE enmBefore = VMSTATE_CREATED; /* (only used for logging atm.) */
     for (;;)
     {
@@ -246,7 +247,7 @@ int vmR3EmulationThreadWithId(RTTHREAD ThreadSelf, PUVMCPU pUVCpu, VMCPUID idCpu
      * Cleanup and exit.
      */
     Log(("vmR3EmulationThread: Terminating emulation thread! Thread=%#x pUVM=%p rc=%Rrc enmBefore=%d enmVMState=%d\n",
-         ThreadSelf, pUVM, rc, enmBefore, pUVM->pVM ? pUVM->pVM->enmVMState : VMSTATE_TERMINATED));
+         hThreadSelf, pUVM, rc, enmBefore, pUVM->pVM ? pUVM->pVM->enmVMState : VMSTATE_TERMINATED));
     if (   idCpu == 0
         && pUVM->pVM)
     {
@@ -960,6 +961,8 @@ static DECLCALLBACK(void) vmR3DefaultNotifyCpuFF(PUVMCPU pUVCpu, uint32_t fFlags
              && pUVCpu->pVCpu
              && pUVCpu->pVCpu->enmState == VMCPUSTATE_STARTED_EXEC_REM)
         REMR3NotifyFF(pUVCpu->pVM);
+#else
+    RT_NOREF(fFlags);
 #endif
 }
 
diff --git a/src/VBox/VMM/VMMR3/VMM.cpp b/src/VBox/VMM/VMMR3/VMM.cpp
index a96e5c6..b86500c 100644
--- a/src/VBox/VMM/VMMR3/VMM.cpp
+++ b/src/VBox/VMM/VMMR3/VMM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -304,7 +304,7 @@ VMMR3_INT_DECL(int) VMMR3Init(PVM pVM)
                 return VINF_SUCCESS;
             }
         }
-        /** @todo: Need failure cleanup. */
+        /** @todo Need failure cleanup. */
 
         //more todo in here?
         //if (RT_SUCCESS(rc))
@@ -445,6 +445,8 @@ static int vmmR3InitLoggers(PVM pVM)
  */
 static void vmmR3InitRegisterStats(PVM pVM)
 {
+    RT_NOREF_PV(pVM);
+
     /*
      * Statistics.
      */
@@ -1406,7 +1408,7 @@ VMMR3_INT_DECL(int) VMMR3HmRunGC(PVM pVM, PVMCPU pVCpu)
 #endif
         } while (rc == VINF_EM_RAW_INTERRUPT_HYPER);
 
-#if 0 /* todo triggers too often */
+#if 0 /** @todo triggers too often */
         Assert(!VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_TO_R3));
 #endif
 
diff --git a/src/VBox/VMM/VMMR3/VMMGuruMeditation.cpp b/src/VBox/VMM/VMMR3/VMMGuruMeditation.cpp
index 239b7d6..02a3314 100644
--- a/src/VBox/VMM/VMMR3/VMMGuruMeditation.cpp
+++ b/src/VBox/VMM/VMMR3/VMMGuruMeditation.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/VMMR3.def b/src/VBox/VMM/VMMR3/VMMR3.def
index 1d6bb54..dc48f8a 100644
--- a/src/VBox/VMM/VMMR3/VMMR3.def
+++ b/src/VBox/VMM/VMMR3/VMMR3.def
@@ -3,7 +3,7 @@
 ; VMM Ring-3 Context DLL - Definition file.
 
 ;
-; Copyright (C) 2010-2015 Oracle Corporation
+; Copyright (C) 2010-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
@@ -344,6 +344,10 @@ EXPORTS
     TMTimerUnlock
     TMR3GetWarpDrive
     TMR3SetWarpDrive
+    TMR3TimeVirtGet
+    TMR3TimeVirtGetMicro
+    TMR3TimeVirtGetMilli
+    TMR3TimeVirtGetNano
 
     VMMGetCpu
 
diff --git a/src/VBox/VMM/VMMR3/VMMSwitcher.cpp b/src/VBox/VMM/VMMR3/VMMSwitcher.cpp
index fbb2aa8..63e4d34 100644
--- a/src/VBox/VMM/VMMR3/VMMSwitcher.cpp
+++ b/src/VBox/VMM/VMMR3/VMMSwitcher.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -44,14 +44,15 @@
 /*********************************************************************************************************************************
 *   Global Variables                                                                                                             *
 *********************************************************************************************************************************/
+#if defined(VBOX_WITH_RAW_MODE) || (HC_ARCH_BITS != 64)
 /** Array of switcher definitions.
  * The type and index shall match!
  */
 static PVMMSWITCHERDEF g_apRawModeSwitchers[VMMSWITCHER_MAX] =
 {
     NULL, /* invalid entry */
-#ifdef VBOX_WITH_RAW_MODE
-# ifndef RT_ARCH_AMD64
+# ifdef VBOX_WITH_RAW_MODE
+#  ifndef RT_ARCH_AMD64
     &vmmR3Switcher32BitTo32Bit_Def,
     &vmmR3Switcher32BitToPAE_Def,
     NULL,   //&vmmR3Switcher32BitToAMD64_Def,
@@ -61,7 +62,7 @@ static PVMMSWITCHERDEF g_apRawModeSwitchers[VMMSWITCHER_MAX] =
     NULL,   //&vmmR3SwitcherPAETo32Bit_Def,
     NULL,   //&vmmR3SwitcherAMD64ToPAE_Def,
     NULL,   //&vmmR3SwitcherAMD64ToAMD64_Def,
-# else  /* RT_ARCH_AMD64 */
+#  else  /* RT_ARCH_AMD64 */
     NULL,   //&vmmR3Switcher32BitTo32Bit_Def,
     NULL,   //&vmmR3Switcher32BitToPAE_Def,
     NULL,   //&vmmR3Switcher32BitToAMD64_Def,
@@ -71,8 +72,8 @@ static PVMMSWITCHERDEF g_apRawModeSwitchers[VMMSWITCHER_MAX] =
     &vmmR3SwitcherAMD64To32Bit_Def,
     &vmmR3SwitcherAMD64ToPAE_Def,
     NULL,   //&vmmR3SwitcherAMD64ToAMD64_Def,
-# endif /* RT_ARCH_AMD64 */
-#else  /* !VBOX_WITH_RAW_MODE */
+#  endif /* RT_ARCH_AMD64 */
+# else  /* !VBOX_WITH_RAW_MODE */
     NULL,
     NULL,
     NULL,
@@ -82,15 +83,17 @@ static PVMMSWITCHERDEF g_apRawModeSwitchers[VMMSWITCHER_MAX] =
     NULL,
     NULL,
     NULL,
-#endif /* !VBOX_WITH_RAW_MODE */
-#ifndef RT_ARCH_AMD64
+# endif /* !VBOX_WITH_RAW_MODE */
+# ifndef RT_ARCH_AMD64
     &vmmR3SwitcherX86Stub_Def,
     NULL,
-#else
+# else
     NULL,
     &vmmR3SwitcherAMD64Stub_Def,
-#endif
+# endif
 };
+#endif /* VBOX_WITH_RAW_MODE || (HC_ARCH_BITS != 64) */
+
 
 /** Array of switcher definitions.
  * The type and index shall match!
@@ -213,6 +216,7 @@ static void vmmR3Switcher32On64IdtRelocate(PVM pVM, PVMMSWITCHERDEF pSwitcher, u
 int vmmR3SwitcherInit(PVM pVM)
 {
 #if !defined(VBOX_WITH_RAW_MODE) && (HC_ARCH_BITS == 64)
+    RT_NOREF(pVM);
     return VINF_SUCCESS;
 #else
 
diff --git a/src/VBox/VMM/VMMR3/VMMTests.cpp b/src/VBox/VMM/VMMR3/VMMTests.cpp
index 669bb13..a018861 100644
--- a/src/VBox/VMM/VMMR3/VMMTests.cpp
+++ b/src/VBox/VMM/VMMR3/VMMTests.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -43,6 +43,9 @@
 #include <iprt/string.h>
 #include <iprt/x86.h>
 
+
+#ifdef VBOX_WITH_RAW_MODE
+
 static void vmmR3TestClearStack(PVMCPU pVCpu)
 {
     /* We leave the first 64 bytes of the stack alone because of strict
@@ -51,8 +54,6 @@ static void vmmR3TestClearStack(PVMCPU pVCpu)
 }
 
 
-#ifdef VBOX_WITH_RAW_MODE
-
 static int vmmR3ReportMsrRange(PVM pVM, uint32_t uMsr, uint64_t cMsrs, PRTSTREAM pReportStrm, uint32_t *pcMsrsFound)
 {
     /*
@@ -212,20 +213,20 @@ static int vmmR3DoGCTest(PVM pVM, VMMRCOPERATION enmTestcase, unsigned uVariatio
     Assert(CPUMGetHyperCR3(pVCpu) && CPUMGetHyperCR3(pVCpu) == PGMGetHyperCR3(pVCpu));
     rc = SUPR3CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);
 
-#if 1
+# if 1
     /* flush the raw-mode logs. */
-# ifdef LOG_ENABLED
+#  ifdef LOG_ENABLED
     PRTLOGGERRC pLogger = pVM->vmm.s.pRCLoggerR3;
     if (   pLogger
         && pLogger->offScratch > 0)
         RTLogFlushRC(NULL, pLogger);
-# endif
-# ifdef VBOX_WITH_RC_RELEASE_LOGGING
+#  endif
+#  ifdef VBOX_WITH_RC_RELEASE_LOGGING
     PRTLOGGERRC pRelLogger = pVM->vmm.s.pRCRelLoggerR3;
     if (RT_UNLIKELY(pRelLogger && pRelLogger->offScratch > 0))
         RTLogFlushRC(RTLogRelGetDefaultInstance(), pRelLogger);
+#  endif
 # endif
-#endif
 
     Log(("vmmR3DoGCTest: rc=%Rrc iLastGZRc=%Rrc\n", rc, pVCpu->vmm.s.iLastGZRc));
     if (RT_LIKELY(rc == VINF_SUCCESS))
@@ -376,7 +377,7 @@ VMMR3DECL(int) VMMDoTest(PVM pVM)
 # endif
 
         vmmR3DoTrapTest(pVM, 0xd, 0, VERR_TRPM_DONT_PANIC,  0xf0f0f0f0, "vmmGCTestTrap0d_FaultEIP", "ltr #GP");
-        ///@todo find a better \#GP case, on intel ltr will \#PF (busy update?) and not \#GP.
+        /// @todo find a better \#GP case, on intel ltr will \#PF (busy update?) and not \#GP.
         //vmmR3DoTrapTest(pVM, 0xd, 1, VERR_TRPM_DONT_PANIC,  0xf0f0f0f0, "vmmGCTestTrap0d_FaultEIP", "ltr #GP WP");
 
         vmmR3DoTrapTest(pVM, 0xe, 0, VERR_TRPM_DONT_PANIC,  0x00000000, "vmmGCTestTrap0e_FaultEIP", "#PF (NULL)");
@@ -558,7 +559,7 @@ VMMR3DECL(int) VMMDoTest(PVM pVM)
          */
         RTPrintf("VMM: profiling switcher...\n");
         Log(("VMM: profiling switcher...\n"));
-        uint64_t TickMin = ~0;
+        uint64_t TickMin = UINT64_MAX;
         tsBegin = RTTimeNanoTS();
         TickStart = ASMReadTSC();
         Assert(CPUMGetHyperCR3(pVCpu) && CPUMGetHyperCR3(pVCpu) == PGMGetHyperCR3(pVCpu));
@@ -600,16 +601,18 @@ VMMR3DECL(int) VMMDoTest(PVM pVM)
 
         rc = VINF_SUCCESS;
 
-#if 0  /* drop this for now as it causes trouble on AMDs (Opteron 2384 and possibly others). */
+# if 0  /* drop this for now as it causes trouble on AMDs (Opteron 2384 and possibly others). */
         /*
          * A quick MSR report.
          */
         vmmR3DoMsrQuickReport(pVM, NULL, true);
-#endif
+# endif
     }
     else
         AssertMsgFailed(("Failed to resolved VMMRC.rc::VMMRCEntry(), rc=%Rrc\n", rc));
-#endif
+#else  /* !VBOX_WITH_RAW_MODE */
+    RT_NOREF(pVM);
+#endif /* !VBOX_WITH_RAW_MODE */
     return rc;
 }
 
@@ -700,7 +703,7 @@ VMMR3DECL(int) VMMDoHmTest(PVM pVM)
          */
         RTPrintf("VMM: profiling switcher...\n");
         Log(("VMM: profiling switcher...\n"));
-        uint64_t TickMin = ~0;
+        uint64_t TickMin = UINT64_MAX;
         uint64_t tsBegin = RTTimeNanoTS();
         uint64_t TickStart = ASMReadTSC();
         for (i = 0; i < 1000000; i++)
@@ -819,6 +822,7 @@ VMMR3DECL(int) VMMDoBruteForceMsrs(PVM pVM)
     }
     return rc;
 #else
+    RT_NOREF(pVM);
     return VERR_NOT_SUPPORTED;
 #endif
 }
@@ -845,6 +849,7 @@ VMMR3DECL(int) VMMDoKnownMsrs(PVM pVM)
     }
     return rc;
 #else
+    RT_NOREF(pVM);
     return VERR_NOT_SUPPORTED;
 #endif
 }
@@ -876,14 +881,14 @@ VMMR3DECL(int) VMMDoMsrExperiments(PVM pVM)
      */
     uint32_t uMsr   = 0x00000277;
     uint64_t uValue = UINT64_C(0x0007010600070106);
-#if 0
+# if 0
     uValue &= ~(RT_BIT_64(17) | RT_BIT_64(16) | RT_BIT_64(15) | RT_BIT_64(14) | RT_BIT_64(13));
     uValue |= RT_BIT_64(13);
     rc = VMMR3CallRC(pVM, RCPtrEP, 6, pVM->pVMRC, uMsr, RT_LODWORD(uValue), RT_HIDWORD(uValue),
                      RCPtrValues, RCPtrValues + sizeof(uint64_t));
     RTPrintf("uMsr=%#010x before=%#018llx written=%#018llx after=%#018llx rc=%Rrc\n",
              uMsr, pauValues[0], uValue, pauValues[1], rc);
-#elif 1
+# elif 1
     const uint64_t uOrgValue = uValue;
     uint32_t       cChanges = 0;
     for (int iBit = 63; iBit >= 58; iBit--)
@@ -905,7 +910,7 @@ VMMR3DECL(int) VMMDoMsrExperiments(PVM pVM)
         cChanges += RT_BOOL(pauValues[0] ^ pauValues[1]);
     }
     RTPrintf("%u change(s)\n", cChanges);
-#else
+# else
     uint64_t fWriteable = 0;
     for (uint32_t i = 0; i <= 63; i++)
     {
@@ -940,7 +945,7 @@ VMMR3DECL(int) VMMDoMsrExperiments(PVM pVM)
     RTPrintf("uMsr=%#010x before=%#018llx written=%#018llx after=%#018llx rc=%Rrc [fWriteable]\n",
              uMsr, pauValues[0], uValue, pauValues[1], rc);
 
-#endif
+# endif
 
     /*
      * Cleanups.
@@ -948,6 +953,7 @@ VMMR3DECL(int) VMMDoMsrExperiments(PVM pVM)
     MMHyperFree(pVM, pauValues);
     return rc;
 #else
+    RT_NOREF(pVM);
     return VERR_NOT_SUPPORTED;
 #endif
 }
diff --git a/src/VBox/VMM/VMMR3/VMReq.cpp b/src/VBox/VMM/VMMR3/VMReq.cpp
index 949db58..25d66b6 100644
--- a/src/VBox/VMM/VMMR3/VMReq.cpp
+++ b/src/VBox/VMM/VMMR3/VMReq.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -40,7 +40,7 @@
 /*********************************************************************************************************************************
 *   Internal Functions                                                                                                           *
 *********************************************************************************************************************************/
-static int  vmR3ReqProcessOneU(PUVM pUVM, PVMREQ pReq);
+static int  vmR3ReqProcessOne(PVMREQ pReq);
 
 
 /**
@@ -653,7 +653,7 @@ VMMR3DECL(int) VMR3ReqAlloc(PUVM pUVM, PVMREQ *ppReq, VMREQTYPE enmType, VMCPUID
                     AssertRC(rc);
                     if (RT_FAILURE(rc))
                         return rc;
-#if 0 ///@todo @bugref{4725} - def RT_LOCK_STRICT
+#if 0 /// @todo @bugref{4725} - def RT_LOCK_STRICT
                     for (VMCPUID idCpu = 0; idCpu < pUVM->cCpus; idCpu++)
                         RTSemEventAddSignaller(pReq->EventSem, pUVM->aCpus[idCpu].vm.s.ThreadEMT);
 #endif
@@ -700,7 +700,7 @@ VMMR3DECL(int) VMR3ReqAlloc(PUVM pUVM, PVMREQ *ppReq, VMREQTYPE enmType, VMCPUID
         MMR3HeapFree(pReq);
         return rc;
     }
-#if 0 ///@todo @bugref{4725} - def RT_LOCK_STRICT
+#if 0 /// @todo @bugref{4725} - def RT_LOCK_STRICT
     for (VMCPUID idCpu = 0; idCpu < pUVM->cCpus; idCpu++)
         RTSemEventAddSignaller(pReq->EventSem, pUVM->aCpus[idCpu].vm.s.ThreadEMT);
 #endif
@@ -940,7 +940,7 @@ VMMR3DECL(int) VMR3ReqQueue(PVMREQ pReq, RTMSINTERVAL cMillies)
          * The requester was an EMT, just execute it.
          */
         pReq->enmState = VMREQSTATE_QUEUED;
-        rc = vmR3ReqProcessOneU(pUVM, pReq);
+        rc = vmR3ReqProcessOne(pReq);
         LogFlow(("VMR3ReqQueue: returns %Rrc (processed)\n", rc));
     }
     return rc;
@@ -1167,7 +1167,7 @@ VMMR3_INT_DECL(int) VMR3ReqProcessU(PUVM pUVM, VMCPUID idDstCpu, bool fPriorityO
          * Process the request
          */
         STAM_COUNTER_INC(&pUVM->vm.s.StatReqProcessed);
-        int rc2 = vmR3ReqProcessOneU(pUVM, pReq);
+        int rc2 = vmR3ReqProcessOne(pReq);
         if (    rc2 >= VINF_EM_FIRST
             &&  rc2 <= VINF_EM_LAST)
         {
@@ -1186,12 +1186,11 @@ VMMR3_INT_DECL(int) VMR3ReqProcessU(PUVM pUVM, VMCPUID idDstCpu, bool fPriorityO
  *
  * @returns VBox status code.
  *
- * @param   pUVM        The user mode VM structure.
  * @param   pReq        Request packet to process.
  */
-static int  vmR3ReqProcessOneU(PUVM pUVM, PVMREQ pReq)
+static int  vmR3ReqProcessOne(PVMREQ pReq)
 {
-    LogFlow(("vmR3ReqProcessOneU: pReq=%p type=%d fFlags=%#x\n", pReq, pReq->enmType, pReq->fFlags));
+    LogFlow(("vmR3ReqProcessOne: pReq=%p type=%d fFlags=%#x\n", pReq, pReq->enmType, pReq->fFlags));
 
     /*
      * Process the request.
@@ -1311,14 +1310,14 @@ static int  vmR3ReqProcessOneU(PUVM pUVM, PVMREQ pReq)
     if (pReq->fFlags & VMREQFLAGS_NO_WAIT)
     {
         /* Free the packet, nobody is waiting. */
-        LogFlow(("vmR3ReqProcessOneU: Completed request %p: rcReq=%Rrc rcRet=%Rrc - freeing it\n",
+        LogFlow(("vmR3ReqProcessOne: Completed request %p: rcReq=%Rrc rcRet=%Rrc - freeing it\n",
                  pReq, rcReq, rcRet));
         VMR3ReqFree(pReq);
     }
     else
     {
         /* Notify the waiter and him free up the packet. */
-        LogFlow(("vmR3ReqProcessOneU: Completed request %p: rcReq=%Rrc rcRet=%Rrc - notifying waiting thread\n",
+        LogFlow(("vmR3ReqProcessOne: Completed request %p: rcReq=%Rrc rcRet=%Rrc - notifying waiting thread\n",
                  pReq, rcReq, rcRet));
         ASMAtomicXchgSize(&pReq->fEventSemClear, false);
         int rc2 = RTSemEventSignal(pReq->EventSem);
diff --git a/src/VBox/VMM/VMMR3/cpus/AMD_Athlon_64_3200.h b/src/VBox/VMM/VMMR3/cpus/AMD_Athlon_64_3200.h
index f208d7a..0f95e86 100644
--- a/src/VBox/VMM/VMMR3/cpus/AMD_Athlon_64_3200.h
+++ b/src/VBox/VMM/VMMR3/cpus/AMD_Athlon_64_3200.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/cpus/AMD_Athlon_64_X2_Dual_Core_4200.h b/src/VBox/VMM/VMMR3/cpus/AMD_Athlon_64_X2_Dual_Core_4200.h
index ba25e84..3d504f8 100644
--- a/src/VBox/VMM/VMMR3/cpus/AMD_Athlon_64_X2_Dual_Core_4200.h
+++ b/src/VBox/VMM/VMMR3/cpus/AMD_Athlon_64_X2_Dual_Core_4200.h
@@ -10,7 +10,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/cpus/AMD_FX_8150_Eight_Core.h b/src/VBox/VMM/VMMR3/cpus/AMD_FX_8150_Eight_Core.h
index 2ba32f4..430d57a 100644
--- a/src/VBox/VMM/VMMR3/cpus/AMD_FX_8150_Eight_Core.h
+++ b/src/VBox/VMM/VMMR3/cpus/AMD_FX_8150_Eight_Core.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/cpus/AMD_Phenom_II_X6_1100T.h b/src/VBox/VMM/VMMR3/cpus/AMD_Phenom_II_X6_1100T.h
index aa8b4e9..bb74c29 100644
--- a/src/VBox/VMM/VMMR3/cpus/AMD_Phenom_II_X6_1100T.h
+++ b/src/VBox/VMM/VMMR3/cpus/AMD_Phenom_II_X6_1100T.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/cpus/Intel_Atom_330_1_60GHz.h b/src/VBox/VMM/VMMR3/cpus/Intel_Atom_330_1_60GHz.h
index 2815050..8d7637e 100644
--- a/src/VBox/VMM/VMMR3/cpus/Intel_Atom_330_1_60GHz.h
+++ b/src/VBox/VMM/VMMR3/cpus/Intel_Atom_330_1_60GHz.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -24,7 +24,7 @@
 /**
  * CPUID leaves for Intel(R) Atom(TM) CPU  330   @ 1.60GHz.
  */
-static CPUMCPUIDLEAF const g_aCpuIdLeaves_Intel_Atom_330_1_60GHz[] = 
+static CPUMCPUIDLEAF const g_aCpuIdLeaves_Intel_Atom_330_1_60GHz[] =
 {
     { 0x00000000, 0x00000000, 0x00000000, 0x0000000a, 0x756e6547, 0x6c65746e, 0x49656e69, 0 },
     { 0x00000001, 0x00000000, 0x00000000, 0x000106c2, 0x01040800, 0x0040e31d, 0xbfe9fbff, 0 | CPUMCPUIDLEAF_F_CONTAINS_APIC_ID | CPUMCPUIDLEAF_F_CONTAINS_APIC },
@@ -57,7 +57,7 @@ static CPUMCPUIDLEAF const g_aCpuIdLeaves_Intel_Atom_330_1_60GHz[] =
 /**
  * MSR ranges for Intel(R) Atom(TM) CPU  330   @ 1.60GHz.
  */
-static CPUMMSRRANGE const g_aMsrRanges_Intel_Atom_330_1_60GHz[] = 
+static CPUMMSRRANGE const g_aMsrRanges_Intel_Atom_330_1_60GHz[] =
 {
     MFI(0x00000000, "IA32_P5_MC_ADDR", Ia32P5McAddr), /* value=0x0 */
     MFX(0x00000001, "IA32_P5_MC_TYPE", Ia32P5McType, Ia32P5McType, 0, 0, UINT64_MAX), /* value=0x0 */
@@ -181,7 +181,7 @@ static CPUMMSRRANGE const g_aMsrRanges_Intel_Atom_330_1_60GHz[] =
 /**
  * Database entry for Intel(R) Atom(TM) CPU  330   @ 1.60GHz.
  */
-static CPUMDBENTRY const g_Entry_Intel_Atom_330_1_60GHz = 
+static CPUMDBENTRY const g_Entry_Intel_Atom_330_1_60GHz =
 {
     /*.pszName          = */ "Intel Atom 330 1.60GHz",
     /*.pszFullName      = */ "Intel(R) Atom(TM) CPU  330   @ 1.60GHz",
diff --git a/src/VBox/VMM/VMMR3/cpus/Intel_Core_i5_3570.h b/src/VBox/VMM/VMMR3/cpus/Intel_Core_i5_3570.h
index 981bc1e..cbd03ac 100644
--- a/src/VBox/VMM/VMMR3/cpus/Intel_Core_i5_3570.h
+++ b/src/VBox/VMM/VMMR3/cpus/Intel_Core_i5_3570.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/cpus/Intel_Core_i7_2635QM.h b/src/VBox/VMM/VMMR3/cpus/Intel_Core_i7_2635QM.h
index 3acada9..b4e7638 100644
--- a/src/VBox/VMM/VMMR3/cpus/Intel_Core_i7_2635QM.h
+++ b/src/VBox/VMM/VMMR3/cpus/Intel_Core_i7_2635QM.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/cpus/Intel_Core_i7_3820QM.h b/src/VBox/VMM/VMMR3/cpus/Intel_Core_i7_3820QM.h
index b7d037c..064918a 100644
--- a/src/VBox/VMM/VMMR3/cpus/Intel_Core_i7_3820QM.h
+++ b/src/VBox/VMM/VMMR3/cpus/Intel_Core_i7_3820QM.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/cpus/Intel_Core_i7_3960X.h b/src/VBox/VMM/VMMR3/cpus/Intel_Core_i7_3960X.h
index 66edb5f..c70ba3d 100644
--- a/src/VBox/VMM/VMMR3/cpus/Intel_Core_i7_3960X.h
+++ b/src/VBox/VMM/VMMR3/cpus/Intel_Core_i7_3960X.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/cpus/Intel_Core_i7_5600U.h b/src/VBox/VMM/VMMR3/cpus/Intel_Core_i7_5600U.h
index 2975567..78e0055 100644
--- a/src/VBox/VMM/VMMR3/cpus/Intel_Core_i7_5600U.h
+++ b/src/VBox/VMM/VMMR3/cpus/Intel_Core_i7_5600U.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -24,7 +24,7 @@
 /**
  * CPUID leaves for Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz.
  */
-static CPUMCPUIDLEAF const g_aCpuIdLeaves_Intel_Core_i7_5600U[] = 
+static CPUMCPUIDLEAF const g_aCpuIdLeaves_Intel_Core_i7_5600U[] =
 {
     { 0x00000000, 0x00000000, 0x00000000, 0x00000014, 0x756e6547, 0x6c65746e, 0x49656e69, 0 },
     { 0x00000001, 0x00000000, 0x00000000, 0x000306d4, 0x00100800, 0x7ffafbff, 0xbfebfbff, 0 | CPUMCPUIDLEAF_F_CONTAINS_APIC_ID | CPUMCPUIDLEAF_F_CONTAINS_APIC },
@@ -76,7 +76,7 @@ static CPUMCPUIDLEAF const g_aCpuIdLeaves_Intel_Core_i7_5600U[] =
 /**
  * MSR ranges for Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz.
  */
-static CPUMMSRRANGE const g_aMsrRanges_Intel_Core_i7_5600U[] = 
+static CPUMMSRRANGE const g_aMsrRanges_Intel_Core_i7_5600U[] =
 {
     MFX(0x00000000, "IA32_P5_MC_ADDR", Ia32P5McAddr, Ia32P5McAddr, 0, UINT64_C(0xffffffffffffff00), 0), /* value=0xff */
     MFX(0x00000001, "IA32_P5_MC_TYPE", Ia32P5McType, Ia32P5McType, 0, 0, UINT64_MAX), /* value=0x0 */
@@ -339,7 +339,7 @@ static CPUMMSRRANGE const g_aMsrRanges_Intel_Core_i7_5600U[] =
 /**
  * Database entry for Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz.
  */
-static CPUMDBENTRY const g_Entry_Intel_Core_i7_5600U = 
+static CPUMDBENTRY const g_Entry_Intel_Core_i7_5600U =
 {
     /*.pszName          = */ "Intel Core i7-5600U",
     /*.pszFullName      = */ "Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz",
diff --git a/src/VBox/VMM/VMMR3/cpus/Intel_Core_i7_6700K.h b/src/VBox/VMM/VMMR3/cpus/Intel_Core_i7_6700K.h
index 10cedb5..09356d5 100644
--- a/src/VBox/VMM/VMMR3/cpus/Intel_Core_i7_6700K.h
+++ b/src/VBox/VMM/VMMR3/cpus/Intel_Core_i7_6700K.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -24,7 +24,7 @@
 /**
  * CPUID leaves for Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz.
  */
-static CPUMCPUIDLEAF const g_aCpuIdLeaves_Intel_Core_i7_6700K[] = 
+static CPUMCPUIDLEAF const g_aCpuIdLeaves_Intel_Core_i7_6700K[] =
 {
     { 0x00000000, 0x00000000, 0x00000000, 0x00000016, 0x756e6547, 0x6c65746e, 0x49656e69, 0 },
     { 0x00000001, 0x00000000, 0x00000000, 0x000506e3, 0x02100800, 0x7ffafbbf, 0xbfebfbff, 0 | CPUMCPUIDLEAF_F_CONTAINS_APIC_ID | CPUMCPUIDLEAF_F_CONTAINS_APIC },
@@ -84,7 +84,7 @@ static CPUMCPUIDLEAF const g_aCpuIdLeaves_Intel_Core_i7_6700K[] =
 /**
  * MSR ranges for Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz.
  */
-static CPUMMSRRANGE const g_aMsrRanges_Intel_Core_i7_6700K[] = 
+static CPUMMSRRANGE const g_aMsrRanges_Intel_Core_i7_6700K[] =
 {
     MFX(0x00000000, "IA32_P5_MC_ADDR", Ia32P5McAddr, Ia32P5McAddr, 0, UINT64_C(0xfffffffffffff000), 0), /* value=0xfff */
     MFX(0x00000001, "IA32_P5_MC_TYPE", Ia32P5McType, Ia32P5McType, 0, 0, UINT64_MAX), /* value=0x0 */
@@ -481,7 +481,7 @@ static CPUMMSRRANGE const g_aMsrRanges_Intel_Core_i7_6700K[] =
 /**
  * Database entry for Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz.
  */
-static CPUMDBENTRY const g_Entry_Intel_Core_i7_6700K = 
+static CPUMDBENTRY const g_Entry_Intel_Core_i7_6700K =
 {
     /*.pszName          = */ "Intel Core i7-6700K",
     /*.pszFullName      = */ "Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz",
diff --git a/src/VBox/VMM/VMMR3/cpus/Intel_Pentium_4_3_00GHz.h b/src/VBox/VMM/VMMR3/cpus/Intel_Pentium_4_3_00GHz.h
index 2301101..eb6ab23 100644
--- a/src/VBox/VMM/VMMR3/cpus/Intel_Pentium_4_3_00GHz.h
+++ b/src/VBox/VMM/VMMR3/cpus/Intel_Pentium_4_3_00GHz.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/cpus/Intel_Pentium_M_processor_2_00GHz.h b/src/VBox/VMM/VMMR3/cpus/Intel_Pentium_M_processor_2_00GHz.h
index 238b952..2f1d0af 100644
--- a/src/VBox/VMM/VMMR3/cpus/Intel_Pentium_M_processor_2_00GHz.h
+++ b/src/VBox/VMM/VMMR3/cpus/Intel_Pentium_M_processor_2_00GHz.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/cpus/Intel_Pentium_N3530_2_16GHz.h b/src/VBox/VMM/VMMR3/cpus/Intel_Pentium_N3530_2_16GHz.h
index 574e25f..8c2abfd 100644
--- a/src/VBox/VMM/VMMR3/cpus/Intel_Pentium_N3530_2_16GHz.h
+++ b/src/VBox/VMM/VMMR3/cpus/Intel_Pentium_N3530_2_16GHz.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -24,7 +24,7 @@
 /**
  * CPUID leaves for Intel(R) Pentium(R) CPU  N3530  @ 2.16GHz.
  */
-static CPUMCPUIDLEAF const g_aCpuIdLeaves_Intel_Pentium_N3530_2_16GHz[] = 
+static CPUMCPUIDLEAF const g_aCpuIdLeaves_Intel_Pentium_N3530_2_16GHz[] =
 {
     { 0x00000000, 0x00000000, 0x00000000, 0x0000000b, 0x756e6547, 0x6c65746e, 0x49656e69, 0 },
     { 0x00000001, 0x00000000, 0x00000000, 0x00030678, 0x02100800, 0x41d8e3bf, 0xbfebfbff, 0 | CPUMCPUIDLEAF_F_CONTAINS_APIC_ID | CPUMCPUIDLEAF_F_CONTAINS_APIC },
@@ -61,7 +61,7 @@ static CPUMCPUIDLEAF const g_aCpuIdLeaves_Intel_Pentium_N3530_2_16GHz[] =
 /**
  * MSR ranges for Intel(R) Pentium(R) CPU  N3530  @ 2.16GHz.
  */
-static CPUMMSRRANGE const g_aMsrRanges_Intel_Pentium_N3530_2_16GHz[] = 
+static CPUMMSRRANGE const g_aMsrRanges_Intel_Pentium_N3530_2_16GHz[] =
 {
     MFI(0x00000000, "IA32_P5_MC_ADDR", Ia32P5McAddr), /* value=0x0 */
     MFX(0x00000001, "IA32_P5_MC_TYPE", Ia32P5McType, Ia32P5McType, 0, 0, UINT64_MAX), /* value=0x0 */
@@ -236,7 +236,7 @@ static CPUMMSRRANGE const g_aMsrRanges_Intel_Pentium_N3530_2_16GHz[] =
 /**
  * Database entry for Intel(R) Pentium(R) CPU  N3530  @ 2.16GHz.
  */
-static CPUMDBENTRY const g_Entry_Intel_Pentium_N3530_2_16GHz = 
+static CPUMDBENTRY const g_Entry_Intel_Pentium_N3530_2_16GHz =
 {
     /*.pszName          = */ "Intel Pentium N3530 2.16GHz",
     /*.pszFullName      = */ "Intel(R) Pentium(R) CPU  N3530  @ 2.16GHz",
diff --git a/src/VBox/VMM/VMMR3/cpus/Intel_Xeon_X5482_3_20GHz.h b/src/VBox/VMM/VMMR3/cpus/Intel_Xeon_X5482_3_20GHz.h
index 7bf75eb..7c6b329 100644
--- a/src/VBox/VMM/VMMR3/cpus/Intel_Xeon_X5482_3_20GHz.h
+++ b/src/VBox/VMM/VMMR3/cpus/Intel_Xeon_X5482_3_20GHz.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/cpus/Quad_Core_AMD_Opteron_2384.h b/src/VBox/VMM/VMMR3/cpus/Quad_Core_AMD_Opteron_2384.h
index 14c8939..194d0c4 100644
--- a/src/VBox/VMM/VMMR3/cpus/Quad_Core_AMD_Opteron_2384.h
+++ b/src/VBox/VMM/VMMR3/cpus/Quad_Core_AMD_Opteron_2384.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMR3/cpus/VIA_QuadCore_L4700_1_2_GHz.h b/src/VBox/VMM/VMMR3/cpus/VIA_QuadCore_L4700_1_2_GHz.h
index d961434..90a19a7 100644
--- a/src/VBox/VMM/VMMR3/cpus/VIA_QuadCore_L4700_1_2_GHz.h
+++ b/src/VBox/VMM/VMMR3/cpus/VIA_QuadCore_L4700_1_2_GHz.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMRC/CPUMRC.cpp b/src/VBox/VMM/VMMRC/CPUMRC.cpp
index 680f9a1..f3a1b74 100644
--- a/src/VBox/VMM/VMMRC/CPUMRC.cpp
+++ b/src/VBox/VMM/VMMRC/CPUMRC.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -74,7 +74,7 @@ DECLCALLBACK(int) cpumRCHandleNPAndGP(PVM pVM, PCPUMCTXCORE pRegFrame, uintptr_t
             break;
     }
 
-    AssertMsgFailed(("uUser=%#x eip=%#x\n", uUser, pRegFrame->eip));
+    AssertMsgFailed(("uUser=%#x eip=%#x\n", uUser, pRegFrame->eip)); RT_NOREF_PV(pRegFrame);
     return VERR_TRPM_DONT_PANIC;
 }
 
@@ -87,6 +87,7 @@ DECLCALLBACK(int) cpumRCHandleNPAndGP(PVM pVM, PCPUMCTXCORE pRegFrame, uintptr_t
  */
 DECLASM(void) CPUMRCAssertPreExecutionSanity(PVM pVM)
 {
+#ifdef VBOX_STRICT
     /*
      * Check some important assumptions before resuming guest execution.
      */
@@ -106,6 +107,9 @@ DECLASM(void) CPUMRCAssertPreExecutionSanity(PVM pVM)
     }
     AssertMsg(CPUMIsGuestInRawMode(pVCpu),           ("cs:eip=%04x:%08x ss:esp=%04x:%08x cpl=%u raw/efl=%#x/%#x%s\n", pCtx->cs.Sel, pCtx->eip, pCtx->ss.Sel, pCtx->esp, uRawCpl, u32EFlags, pCtx->eflags.u, fPatch ? " patch" : ""));
     //Log2(("cs:eip=%04x:%08x ss:esp=%04x:%08x cpl=%u raw/efl=%#x/%#x%s\n", pCtx->cs.Sel, pCtx->eip, pCtx->ss.Sel, pCtx->esp, uRawCpl, u32EFlags, pCtx->eflags.u, fPatch ? " patch" : ""));
+#else
+    RT_NOREF_PV(pVM);
+#endif
 }
 
 
diff --git a/src/VBox/VMM/VMMRC/CPUMRCA.asm b/src/VBox/VMM/VMMRC/CPUMRCA.asm
index 1e73292..d8f6cb7 100644
--- a/src/VBox/VMM/VMMRC/CPUMRCA.asm
+++ b/src/VBox/VMM/VMMRC/CPUMRCA.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMRC/CPUMRCPatchHlp.asm b/src/VBox/VMM/VMMRC/CPUMRCPatchHlp.asm
index 3ad3693..c76549d 100644
--- a/src/VBox/VMM/VMMRC/CPUMRCPatchHlp.asm
+++ b/src/VBox/VMM/VMMRC/CPUMRCPatchHlp.asm
@@ -3,7 +3,7 @@
 ; CPUM - Patch Helpers.
 ;
 
-; Copyright (C) 2015 Oracle Corporation
+; Copyright (C) 2015-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMRC/CSAMRC.cpp b/src/VBox/VMM/VMMRC/CSAMRC.cpp
index f514d14..a0e2470 100644
--- a/src/VBox/VMM/VMMRC/CSAMRC.cpp
+++ b/src/VBox/VMM/VMMRC/CSAMRC.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -60,7 +60,9 @@ DECLEXPORT(VBOXSTRICTRC) csamRCCodePageWritePfHandler(PVM pVM, PVMCPU pVCpu, RTG
 {
     PPATMGCSTATE pPATMGCState;
     bool         fPatchCode = PATMIsPatchGCAddr(pVM, pRegFrame->eip);
-    NOREF(uErrorCode);
+    RT_NOREF_PV(uErrorCode);
+    RT_NOREF_PV(pvUser);
+
 
     Assert(pVM->csam.s.cDirtyPages < CSAM_MAX_DIRTY_PAGES);
 
diff --git a/src/VBox/VMM/VMMRC/EMRCA.asm b/src/VBox/VMM/VMMRC/EMRCA.asm
index f14ea10..79d677d 100644
--- a/src/VBox/VMM/VMMRC/EMRCA.asm
+++ b/src/VBox/VMM/VMMRC/EMRCA.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMRC/IOMRC.cpp b/src/VBox/VMM/VMMRC/IOMRC.cpp
index 06fb5c4..56e8b82 100644
--- a/src/VBox/VMM/VMMRC/IOMRC.cpp
+++ b/src/VBox/VMM/VMMRC/IOMRC.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -81,7 +81,7 @@ DECLINLINE(IEMMODE) iomDisModeToIemMode(DISCPUMODE enmDisMode)
  */
 static VBOXSTRICTRC iomRCInterpretIN(PVM pVM, PVMCPU pVCpu, PCPUMCTXCORE pRegFrame, PDISCPUSTATE pCpu)
 {
-    STAM_COUNTER_INC(&pVM->iom.s.StatInstIn);
+    STAM_COUNTER_INC(&pVM->iom.s.StatInstIn); RT_NOREF_PV(pVM);
     Assert(pCpu->Param2.fUse & (DISUSE_IMMEDIATE8 | DISUSE_REG_GEN16));
     uint16_t u16Port = pCpu->Param2.fUse & DISUSE_REG_GEN16 ? pRegFrame->dx : (uint16_t)pCpu->Param2.uValue;
 
@@ -113,7 +113,7 @@ static VBOXSTRICTRC iomRCInterpretIN(PVM pVM, PVMCPU pVCpu, PCPUMCTXCORE pRegFra
  */
 static VBOXSTRICTRC iomRCInterpretOUT(PVM pVM, PVMCPU pVCpu, PCPUMCTXCORE pRegFrame, PDISCPUSTATE pCpu)
 {
-    STAM_COUNTER_INC(&pVM->iom.s.StatInstOut);
+    STAM_COUNTER_INC(&pVM->iom.s.StatInstOut); RT_NOREF_PV(pVM);
     Assert(pCpu->Param1.fUse & (DISUSE_IMMEDIATE8 | DISUSE_REG_GEN16));
     uint16_t const u16Port = pCpu->Param1.fUse & DISUSE_REG_GEN16 ? pRegFrame->dx : (uint16_t)pCpu->Param1.uValue;
 
@@ -139,12 +139,10 @@ static VBOXSTRICTRC iomRCInterpretOUT(PVM pVM, PVMCPU pVCpu, PCPUMCTXCORE pRegFr
  * @retval  VINF_TRPM_XCPT_DISPATCHED   The exception was raised and dispatched for raw-mode execution. (TRPMRaiseXcptErr)
  * @retval  VINF_EM_RESCHEDULE_REM      The exception was dispatched and cannot be executed in raw-mode. (TRPMRaiseXcptErr)
  *
- * @param   pVM         The cross context VM structure.
  * @param   pVCpu       The cross context virtual CPU structure of the calling EMT.
- * @param   pRegFrame   Pointer to CPUMCTXCORE guest registers structure.
  * @param   pCpu        Disassembler CPU state.
  */
-static VBOXSTRICTRC iomRCInterpretINS(PVM pVM, PVMCPU pVCpu, PCPUMCTXCORE pRegFrame, PDISCPUSTATE pCpu)
+static VBOXSTRICTRC iomRCInterpretINS(PVMCPU pVCpu, PDISCPUSTATE pCpu)
 {
     uint8_t cbValue = pCpu->pCurInstr->uOpcode == OP_INSB ? 1
                     : pCpu->uOpMode == DISCPUMODE_16BIT ? 2 : 4;       /* dword in both 32 & 64 bits mode */
@@ -173,12 +171,10 @@ static VBOXSTRICTRC iomRCInterpretINS(PVM pVM, PVMCPU pVCpu, PCPUMCTXCORE pRegFr
  * @retval  VINF_TRPM_XCPT_DISPATCHED   The exception was raised and dispatched for raw-mode execution. (TRPMRaiseXcptErr)
  * @retval  VINF_EM_RESCHEDULE_REM      The exception was dispatched and cannot be executed in raw-mode. (TRPMRaiseXcptErr)
  *
- * @param   pVM         The cross context VM structure.
  * @param   pVCpu       The cross context virtual CPU structure of the calling EMT.
- * @param   pRegFrame   Pointer to CPUMCTXCORE guest registers structure.
  * @param   pCpu        Disassembler CPU state.
  */
-static VBOXSTRICTRC iomRCInterpretOUTS(PVM pVM, PVMCPU pVCpu, PCPUMCTXCORE pRegFrame, PDISCPUSTATE pCpu)
+static VBOXSTRICTRC iomRCInterpretOUTS(PVMCPU pVCpu, PDISCPUSTATE pCpu)
 {
     uint8_t cbValue = pCpu->pCurInstr->uOpcode == OP_OUTSB ? 1
                     : pCpu->uOpMode == DISCPUMODE_16BIT ? 2 : 4;       /* dword in both 32 & 64 bits mode */
@@ -228,11 +224,11 @@ VMMRCDECL(VBOXSTRICTRC) IOMRCIOPortHandler(PVM pVM, PVMCPU pVCpu, PCPUMCTXCORE p
 
         case OP_INSB:
         case OP_INSWD:
-            return iomRCInterpretINS(pVM, pVCpu, pRegFrame, pCpu);
+            return iomRCInterpretINS(pVCpu, pCpu);
 
         case OP_OUTSB:
         case OP_OUTSWD:
-            return iomRCInterpretOUTS(pVM, pVCpu, pRegFrame, pCpu);
+            return iomRCInterpretOUTS(pVCpu, pCpu);
 
         /*
          * The opcode wasn't know to us, freak out.
diff --git a/src/VBox/VMM/VMMRC/MMRamRC.cpp b/src/VBox/VMM/VMMRC/MMRamRC.cpp
index f4c5824..3cc424f 100644
--- a/src/VBox/VMM/VMMRC/MMRamRC.cpp
+++ b/src/VBox/VMM/VMMRC/MMRamRC.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMRC/MMRamRCA.asm b/src/VBox/VMM/VMMRC/MMRamRCA.asm
index 61ae8fa..b614e19 100644
--- a/src/VBox/VMM/VMMRC/MMRamRCA.asm
+++ b/src/VBox/VMM/VMMRC/MMRamRCA.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMRC/PATMRC.cpp b/src/VBox/VMM/VMMRC/PATMRC.cpp
index 2428693..be58f4a 100644
--- a/src/VBox/VMM/VMMRC/PATMRC.cpp
+++ b/src/VBox/VMM/VMMRC/PATMRC.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -52,7 +52,7 @@
 DECLEXPORT(VBOXSTRICTRC) patmRCVirtPagePfHandler(PVM pVM, PVMCPU pVCpu, RTGCUINT uErrorCode, PCPUMCTXCORE pCtxCore,
                                                  RTGCPTR pvFault, RTGCPTR pvRange, uintptr_t offRange, void *pvUser)
 {
-    NOREF(pVCpu); NOREF(uErrorCode); NOREF(pCtxCore); NOREF(pvFault); NOREF(pvRange); NOREF(offRange);
+    NOREF(pVCpu); NOREF(uErrorCode); NOREF(pCtxCore); NOREF(pvFault); NOREF(pvRange); NOREF(offRange); RT_NOREF_PV(pvUser);
 
     Assert(pvUser);
     Assert(!((uintptr_t)pvUser & PAGE_OFFSET_MASK));
diff --git a/src/VBox/VMM/VMMRC/PDMRCDevice.cpp b/src/VBox/VMM/VMMRC/PDMRCDevice.cpp
index 3a09278..a0c787c 100644
--- a/src/VBox/VMM/VMMRC/PDMRCDevice.cpp
+++ b/src/VBox/VMM/VMMRC/PDMRCDevice.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -545,13 +545,13 @@ static DECLCALLBACK(void) pdmRCApicHlp_ClearInterruptFF(PPDMDEVINS pDevIns, PDMA
         case PDMAPICIRQ_HARDWARE:
             VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_INTERRUPT_APIC);
             break;
+        case PDMAPICIRQ_EXTINT:
+            VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_INTERRUPT_PIC);
+            break;
         case PDMAPICIRQ_UPDATE_PENDING:
             VMCPU_ASSERT_EMT_OR_NOT_RUNNING(pVCpu);
             VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_UPDATE_APIC);
             break;
-        case PDMAPICIRQ_EXTINT:
-            VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_INTERRUPT_PIC);
-            break;
         default:
             AssertMsgFailed(("enmType=%d\n", enmType));
             break;
@@ -878,7 +878,7 @@ static DECLCALLBACK(int) pdmRCDrvHlp_VMSetRuntimeErrorV(PPDMDRVINS pDrvIns, uint
 /** @interface_method_impl{PDMDRVHLPRC,pfnAssertEMT} */
 static DECLCALLBACK(bool) pdmRCDrvHlp_AssertEMT(PPDMDRVINS pDrvIns, const char *pszFile, unsigned iLine, const char *pszFunction)
 {
-    PDMDRV_ASSERT_DRVINS(pDrvIns);
+    PDMDRV_ASSERT_DRVINS(pDrvIns); RT_NOREF_PV(pDrvIns);
     if (VM_IS_EMT(pDrvIns->Internal.s.pVMRC))
         return true;
 
@@ -891,7 +891,7 @@ static DECLCALLBACK(bool) pdmRCDrvHlp_AssertEMT(PPDMDRVINS pDrvIns, const char *
 /** @interface_method_impl{PDMDRVHLPRC,pfnAssertOther} */
 static DECLCALLBACK(bool) pdmRCDrvHlp_AssertOther(PPDMDRVINS pDrvIns, const char *pszFile, unsigned iLine, const char *pszFunction)
 {
-    PDMDRV_ASSERT_DRVINS(pDrvIns);
+    PDMDRV_ASSERT_DRVINS(pDrvIns); RT_NOREF_PV(pDrvIns);
     if (!VM_IS_EMT(pDrvIns->Internal.s.pVMRC))
         return true;
 
@@ -899,6 +899,7 @@ static DECLCALLBACK(bool) pdmRCDrvHlp_AssertOther(PPDMDRVINS pDrvIns, const char
        still have drive code compiled in which it shouldn't execute. */
     RTAssertMsg1Weak("AssertOther", iLine, pszFile, pszFunction);
     RTAssertPanic();
+    RT_NOREF_PV(pszFile); RT_NOREF_PV(iLine); RT_NOREF_PV(pszFunction);
     return false;
 }
 
diff --git a/src/VBox/VMM/VMMRC/PGMRC.cpp b/src/VBox/VMM/VMMRC/PGMRC.cpp
index 1710eaa..ce1f42e 100644
--- a/src/VBox/VMM/VMMRC/PGMRC.cpp
+++ b/src/VBox/VMM/VMMRC/PGMRC.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMRC/PGMRCBth.h b/src/VBox/VMM/VMMRC/PGMRCBth.h
index 8490f1c..57566e9 100644
--- a/src/VBox/VMM/VMMRC/PGMRCBth.h
+++ b/src/VBox/VMM/VMMRC/PGMRCBth.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMRC/PGMRCGst.h b/src/VBox/VMM/VMMRC/PGMRCGst.h
index db9887d..63d72cd 100644
--- a/src/VBox/VMM/VMMRC/PGMRCGst.h
+++ b/src/VBox/VMM/VMMRC/PGMRCGst.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMRC/PGMRCShw.h b/src/VBox/VMM/VMMRC/PGMRCShw.h
index abe7559..e920ef2 100644
--- a/src/VBox/VMM/VMMRC/PGMRCShw.h
+++ b/src/VBox/VMM/VMMRC/PGMRCShw.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMRC/SELMRC.cpp b/src/VBox/VMM/VMMRC/SELMRC.cpp
index bd2b4d7..d75d394 100644
--- a/src/VBox/VMM/VMMRC/SELMRC.cpp
+++ b/src/VBox/VMM/VMMRC/SELMRC.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -308,7 +308,7 @@ DECLEXPORT(VBOXSTRICTRC) selmRCGuestGDTWritePfHandler(PVM pVM, PVMCPU pVCpu, RTG
                                                       RTGCPTR pvFault, RTGCPTR pvRange, uintptr_t offRange, void *pvUser)
 {
     LogFlow(("selmRCGuestGDTWritePfHandler errcode=%x fault=%RGv offRange=%08x\n", (uint32_t)uErrorCode, pvFault, offRange));
-    NOREF(pvRange); NOREF(pvUser);
+    NOREF(pvRange); NOREF(pvUser); RT_NOREF_PV(uErrorCode);
 
     /*
      * Check if any selectors might be affected.
@@ -351,7 +351,7 @@ DECLEXPORT(VBOXSTRICTRC) selmRCGuestLDTWritePfHandler(PVM pVM, PVMCPU pVCpu, RTG
     NOREF(uErrorCode); NOREF(pRegFrame); NOREF(pvFault); NOREF(pvRange); NOREF(offRange); NOREF(pvUser);
 
     VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_LDT);
-    STAM_COUNTER_INC(&pVM->selm.s.StatRCWriteGuestLDT);
+    STAM_COUNTER_INC(&pVM->selm.s.StatRCWriteGuestLDT); RT_NOREF_PV(pVM);
     return VINF_EM_RAW_EMULATE_INSTR_LDT_FAULT;
 }
 #endif
@@ -520,7 +520,7 @@ DECLEXPORT(VBOXSTRICTRC) selmRCGuestTSSWritePfHandler(PVM pVM, PVMCPU pVCpu, RTG
                                                       RTGCPTR pvFault, RTGCPTR pvRange, uintptr_t offRange, void *pvUser)
 {
     LogFlow(("selmRCGuestTSSWritePfHandler errcode=%x fault=%RGv offRange=%08x\n", (uint32_t)uErrorCode, pvFault, offRange));
-    NOREF(pvRange); NOREF(pvUser);
+    NOREF(pvRange); NOREF(pvUser); RT_NOREF_PV(uErrorCode);
 
     /*
      * Try emulate the access.
diff --git a/src/VBox/VMM/VMMRC/TRPMRC.cpp b/src/VBox/VMM/VMMRC/TRPMRC.cpp
index 31abb1a..ab048f5 100644
--- a/src/VBox/VMM/VMMRC/TRPMRC.cpp
+++ b/src/VBox/VMM/VMMRC/TRPMRC.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -102,6 +102,7 @@ DECLEXPORT(VBOXSTRICTRC) trpmRCGuestIDTWritePfHandler(PVM pVM, PVMCPU pVCpu, RTG
     RTGCPTR     GCPtrIDTEnd = (RTGCPTR)((RTGCUINTPTR)GCPtrIDT + cbIDT + 1);
 #endif
     uint32_t    iGate       = ((RTGCUINTPTR)pvFault - (RTGCUINTPTR)GCPtrIDT)/sizeof(VBOXIDTE);
+    RT_NOREF_PV(offRange); RT_NOREF_PV(pvRange); RT_NOREF_PV(pRegFrame); RT_NOREF_PV(pVM);
 
     AssertMsg(offRange < (uint32_t)cbIDT+1, ("pvFault=%RGv GCPtrIDT=%RGv-%RGv pvRange=%RGv\n", pvFault, GCPtrIDT, GCPtrIDTEnd, pvRange));
     Assert((RTGCPTR)(RTRCUINTPTR)pvRange == GCPtrIDT);
diff --git a/src/VBox/VMM/VMMRC/TRPMRCHandlers.cpp b/src/VBox/VMM/VMMRC/TRPMRCHandlers.cpp
index 3b0ef53..79e5a0e 100644
--- a/src/VBox/VMM/VMMRC/TRPMRCHandlers.cpp
+++ b/src/VBox/VMM/VMMRC/TRPMRCHandlers.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -432,7 +432,7 @@ DECLASM(int) TRPMGCTrap02Handler(PTRPMCPU pTrpmCpu, PCPUMCTXCORE pRegFrame)
 #if 0 /* Enable this iff you have a COM port and really want this debug info. */
     RTLogComPrintf("TRPMGCTrap02Handler: cs:eip=%04x:%08x\n", pRegFrame->cs.Sel, pRegFrame->eip);
 #endif
-    NOREF(pTrpmCpu);
+    NOREF(pTrpmCpu); RT_NOREF_PV(pRegFrame);
     return VERR_TRPM_DONT_PANIC;
 }
 
@@ -458,7 +458,7 @@ DECLASM(int) TRPMGCHyperTrap02Handler(PTRPMCPU pTrpmCpu, PCPUMCTXCORE pRegFrame)
 #if 0 /* Enable this iff you have a COM port and really want this debug info. */
     RTLogComPrintf("TRPMGCHyperTrap02Handler: cs:eip=%04x:%08x\n", pRegFrame->cs.Sel, pRegFrame->eip);
 #endif
-    NOREF(pTrpmCpu);
+    NOREF(pTrpmCpu); RT_NOREF_PV(pRegFrame);
     return VERR_TRPM_DONT_PANIC;
 }
 
@@ -723,8 +723,7 @@ DECLASM(int) TRPMGCTrap07Handler(PTRPMCPU pTrpmCpu, PCPUMCTXCORE pRegFrame)
  */
 DECLASM(int) TRPMGCTrap0bHandler(PTRPMCPU pTrpmCpu, PCPUMCTXCORE pRegFrame)
 {
-    PVM     pVM   = TRPMCPU_2_VM(pTrpmCpu);
-    PVMCPU  pVCpu = TRPMCPU_2_VMCPU(pTrpmCpu);
+    PVMCPU pVCpu = TRPMCPU_2_VMCPU(pTrpmCpu);
     LogFlow(("TRPMGC0b: %04x:%08x EFL=%x\n", pRegFrame->cs.Sel, pRegFrame->eip, CPUMRawGetEFlags(pVCpu)));
     TRPM_ENTER_DBG_HOOK(0xb);
     PGMRZDynMapStartAutoSet(pVCpu);
@@ -1426,6 +1425,7 @@ DECLASM(int) TRPMGCHyperTrap0eHandler(PTRPMCPU pTrpmCpu, PCPUMCTXCORE pRegFrame)
  */
 DECLCALLBACK(int) trpmRCTrapInGeneric(PVM pVM, PCPUMCTXCORE pRegFrame, uintptr_t uUser)
 {
+    RT_NOREF_PV(pRegFrame);
     Log(("********************************************************\n"));
     Log(("trpmRCTrapInGeneric: eip=%RX32 uUser=%#x\n", pRegFrame->eip, uUser));
     Log(("********************************************************\n"));
diff --git a/src/VBox/VMM/VMMRC/TRPMRCHandlersA.asm b/src/VBox/VMM/VMMRC/TRPMRCHandlersA.asm
index b8274b9..4c351ad 100644
--- a/src/VBox/VMM/VMMRC/TRPMRCHandlersA.asm
+++ b/src/VBox/VMM/VMMRC/TRPMRCHandlersA.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMRC/VMMRC.cpp b/src/VBox/VMM/VMMRC/VMMRC.cpp
index ffbe567..2882f54 100644
--- a/src/VBox/VMM/VMMRC/VMMRC.cpp
+++ b/src/VBox/VMM/VMMRC/VMMRC.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -62,7 +62,7 @@ DECLASM(bool)   vmmRCSafeMsrWrite(uint32_t uMsr, uint64_t u64Value);
  */
 VMMRCDECL(int) VMMRCEntry(PVM pVM, unsigned uOperation, unsigned uArg, ...)
 {
-    /* todo */
+    /** @todo */
     switch (uOperation)
     {
         /*
@@ -367,6 +367,7 @@ VMMRCTestReadMsrs(PVM pVM, uint32_t uMsr, uint32_t cMsrs, PVMMTESTMSRENTRY paRes
     AssertReturn(cMsrs <= 16384, VERR_INVALID_PARAMETER);
     AssertPtrReturn(paResults, VERR_INVALID_POINTER);
     ASMIntEnable(); /* Run with interrupts enabled, so we can query more MSRs in one block. */
+    RT_NOREF_PV(pVM);
 
     for (uint32_t i = 0; i < cMsrs; i++, uMsr++)
     {
@@ -402,6 +403,7 @@ VMMRCTestTestWriteMsr(PVM pVM, uint32_t uMsr, uint32_t u32ValueLow, uint32_t u32
     AssertPtrReturn(puValueBefore, VERR_INVALID_POINTER);
     AssertPtrReturn(puValueAfter, VERR_INVALID_POINTER);
     ASMIntDisable();
+    RT_NOREF_PV(pVM);
 
     int      rc           = VINF_SUCCESS;
     uint64_t uValueBefore = UINT64_MAX;
diff --git a/src/VBox/VMM/VMMRC/VMMRC.def b/src/VBox/VMM/VMMRC/VMMRC.def
index 4fd38a5..804d67d 100644
--- a/src/VBox/VMM/VMMRC/VMMRC.def
+++ b/src/VBox/VMM/VMMRC/VMMRC.def
@@ -3,7 +3,7 @@
 ; VMM Raw-mode Context DLL - Definition file.
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMRC/VMMRC.mac b/src/VBox/VMM/VMMRC/VMMRC.mac
index a8e41a7..bebf80f 100644
--- a/src/VBox/VMM/VMMRC/VMMRC.mac
+++ b/src/VBox/VMM/VMMRC/VMMRC.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMRC/VMMRC0.asm b/src/VBox/VMM/VMMRC/VMMRC0.asm
index b86ab7c..6c9670c 100644
--- a/src/VBox/VMM/VMMRC/VMMRC0.asm
+++ b/src/VBox/VMM/VMMRC/VMMRC0.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMRC/VMMRC99.asm b/src/VBox/VMM/VMMRC/VMMRC99.asm
index 0c87911..d818b06 100644
--- a/src/VBox/VMM/VMMRC/VMMRC99.asm
+++ b/src/VBox/VMM/VMMRC/VMMRC99.asm
@@ -3,7 +3,7 @@
 ; VMMRC99 - The last object module in the link.
 ;
 
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMRC/VMMRCA.asm b/src/VBox/VMM/VMMRC/VMMRCA.asm
index 7193165..5a9ad61 100644
--- a/src/VBox/VMM/VMMRC/VMMRCA.asm
+++ b/src/VBox/VMM/VMMRC/VMMRCA.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMRC/VMMRCBuiltin.def b/src/VBox/VMM/VMMRC/VMMRCBuiltin.def
index 917e3db..43dd1b5 100644
--- a/src/VBox/VMM/VMMRC/VMMRCBuiltin.def
+++ b/src/VBox/VMM/VMMRC/VMMRCBuiltin.def
@@ -3,7 +3,7 @@
 ; VMM Raw-mode Context Builtin DLL - Definition file for generating import library.
 ;
 
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMRC/VMMRCDeps.cpp b/src/VBox/VMM/VMMRC/VMMRCDeps.cpp
index 7246671..9af7683 100644
--- a/src/VBox/VMM/VMMRC/VMMRCDeps.cpp
+++ b/src/VBox/VMM/VMMRC/VMMRCDeps.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMRZ/DBGFRZ.cpp b/src/VBox/VMM/VMMRZ/DBGFRZ.cpp
index 090a9a4..c49e15e 100644
--- a/src/VBox/VMM/VMMRZ/DBGFRZ.cpp
+++ b/src/VBox/VMM/VMMRZ/DBGFRZ.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMRZ/PGMRZDynMap.cpp b/src/VBox/VMM/VMMRZ/PGMRZDynMap.cpp
index af291b1..4f1f89b 100644
--- a/src/VBox/VMM/VMMRZ/PGMRZDynMap.cpp
+++ b/src/VBox/VMM/VMMRZ/PGMRZDynMap.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1350,7 +1350,7 @@ static void pgmRZDynMapReleasePage(PPGMRZDYNMAP pThis, uint32_t iPage, uint32_t
  */
 static uint32_t pgmR0DynMapPageSlow(PPGMRZDYNMAP pThis, RTHCPHYS HCPhys, uint32_t iPage, PVMCPU pVCpu, bool *pfNew)
 {
-    STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatRZDynMapPageSlow);
+    STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatRZDynMapPageSlow); RT_NOREF_PV(pVCpu);
 
     /*
      * Check if any of the first 3 pages are unreferenced since the caller
diff --git a/src/VBox/VMM/VMMRZ/VMMRZ.cpp b/src/VBox/VMM/VMMRZ/VMMRZ.cpp
index dde009a..8be503a 100644
--- a/src/VBox/VMM/VMMRZ/VMMRZ.cpp
+++ b/src/VBox/VMM/VMMRZ/VMMRZ.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMSwitcher/32BitTo32Bit.asm b/src/VBox/VMM/VMMSwitcher/32BitTo32Bit.asm
index b4241bd..ed68d4b 100644
--- a/src/VBox/VMM/VMMSwitcher/32BitTo32Bit.asm
+++ b/src/VBox/VMM/VMMSwitcher/32BitTo32Bit.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMSwitcher/32BitToAMD64.asm b/src/VBox/VMM/VMMSwitcher/32BitToAMD64.asm
index 9781580..8cff339 100644
--- a/src/VBox/VMM/VMMSwitcher/32BitToAMD64.asm
+++ b/src/VBox/VMM/VMMSwitcher/32BitToAMD64.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMSwitcher/32BitToPAE.asm b/src/VBox/VMM/VMMSwitcher/32BitToPAE.asm
index a0b99cb..d0a2b3f 100644
--- a/src/VBox/VMM/VMMSwitcher/32BitToPAE.asm
+++ b/src/VBox/VMM/VMMSwitcher/32BitToPAE.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMSwitcher/AMD64Stub.asm b/src/VBox/VMM/VMMSwitcher/AMD64Stub.asm
index b5006ca..fd1d4b2 100644
--- a/src/VBox/VMM/VMMSwitcher/AMD64Stub.asm
+++ b/src/VBox/VMM/VMMSwitcher/AMD64Stub.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMSwitcher/AMD64To32Bit.asm b/src/VBox/VMM/VMMSwitcher/AMD64To32Bit.asm
index 586612f..33d364d 100644
--- a/src/VBox/VMM/VMMSwitcher/AMD64To32Bit.asm
+++ b/src/VBox/VMM/VMMSwitcher/AMD64To32Bit.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMSwitcher/AMD64ToPAE.asm b/src/VBox/VMM/VMMSwitcher/AMD64ToPAE.asm
index 8aadbf2..73dddf9 100644
--- a/src/VBox/VMM/VMMSwitcher/AMD64ToPAE.asm
+++ b/src/VBox/VMM/VMMSwitcher/AMD64ToPAE.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMSwitcher/AMD64andLegacy.mac b/src/VBox/VMM/VMMSwitcher/AMD64andLegacy.mac
index 85b1e6e..a62715d 100644
--- a/src/VBox/VMM/VMMSwitcher/AMD64andLegacy.mac
+++ b/src/VBox/VMM/VMMSwitcher/AMD64andLegacy.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMSwitcher/LegacyandAMD64.mac b/src/VBox/VMM/VMMSwitcher/LegacyandAMD64.mac
index a78ce45..346c76f 100644
--- a/src/VBox/VMM/VMMSwitcher/LegacyandAMD64.mac
+++ b/src/VBox/VMM/VMMSwitcher/LegacyandAMD64.mac
@@ -8,7 +8,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMSwitcher/PAETo32Bit.asm b/src/VBox/VMM/VMMSwitcher/PAETo32Bit.asm
index 5ac2c5b..23d180a 100644
--- a/src/VBox/VMM/VMMSwitcher/PAETo32Bit.asm
+++ b/src/VBox/VMM/VMMSwitcher/PAETo32Bit.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMSwitcher/PAEToAMD64.asm b/src/VBox/VMM/VMMSwitcher/PAEToAMD64.asm
index 539bee1..b42b0b9 100644
--- a/src/VBox/VMM/VMMSwitcher/PAEToAMD64.asm
+++ b/src/VBox/VMM/VMMSwitcher/PAEToAMD64.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMSwitcher/PAEToPAE.asm b/src/VBox/VMM/VMMSwitcher/PAEToPAE.asm
index c208762..25c5b8b 100644
--- a/src/VBox/VMM/VMMSwitcher/PAEToPAE.asm
+++ b/src/VBox/VMM/VMMSwitcher/PAEToPAE.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMSwitcher/PAEand32Bit.mac b/src/VBox/VMM/VMMSwitcher/PAEand32Bit.mac
index 12ff299..63f2eaa 100644
--- a/src/VBox/VMM/VMMSwitcher/PAEand32Bit.mac
+++ b/src/VBox/VMM/VMMSwitcher/PAEand32Bit.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/VMMSwitcher/X86Stub.asm b/src/VBox/VMM/VMMSwitcher/X86Stub.asm
index 47d70b6..1e15a80 100644
--- a/src/VBox/VMM/VMMSwitcher/X86Stub.asm
+++ b/src/VBox/VMM/VMMSwitcher/X86Stub.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/include/CFGMInternal.h b/src/VBox/VMM/include/CFGMInternal.h
index a4a6a58..7565d89 100644
--- a/src/VBox/VMM/include/CFGMInternal.h
+++ b/src/VBox/VMM/include/CFGMInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/include/CPUMInternal.h b/src/VBox/VMM/include/CPUMInternal.h
index a2abb8f..ba0593c 100644
--- a/src/VBox/VMM/include/CPUMInternal.h
+++ b/src/VBox/VMM/include/CPUMInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/include/CPUMInternal.mac b/src/VBox/VMM/include/CPUMInternal.mac
index b58fb2d..8980115 100644
--- a/src/VBox/VMM/include/CPUMInternal.mac
+++ b/src/VBox/VMM/include/CPUMInternal.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/include/CSAMInternal.h b/src/VBox/VMM/include/CSAMInternal.h
index 0ee44d5..08a85ee 100644
--- a/src/VBox/VMM/include/CSAMInternal.h
+++ b/src/VBox/VMM/include/CSAMInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -283,7 +283,7 @@ inline RTRCPTR CSAMResolveBranch(PDISCPUSTATE pCpu, RTRCPTR pBranchInstrGC)
 #endif
 }
 
-PGM_ALL_CB2_DECL(FNPGMVIRTHANDLER)  csamCodePageWriteHandler;
+PGM_ALL_CB2_PROTO(FNPGMVIRTHANDLER) csamCodePageWriteHandler;
 RT_C_DECLS_BEGIN
 DECLEXPORT(FNPGMRCVIRTPFHANDLER)    csamRCCodePageWritePfHandler;
 RT_C_DECLS_END
diff --git a/src/VBox/VMM/include/DBGFInternal.h b/src/VBox/VMM/include/DBGFInternal.h
index ae5dd1a..5deabe6 100644
--- a/src/VBox/VMM/include/DBGFInternal.h
+++ b/src/VBox/VMM/include/DBGFInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/include/EMHandleRCTmpl.h b/src/VBox/VMM/include/EMHandleRCTmpl.h
index 553d9f9..89493e0 100644
--- a/src/VBox/VMM/include/EMHandleRCTmpl.h
+++ b/src/VBox/VMM/include/EMHandleRCTmpl.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/include/EMInternal.h b/src/VBox/VMM/include/EMInternal.h
index cdc9676..ff716cf 100644
--- a/src/VBox/VMM/include/EMInternal.h
+++ b/src/VBox/VMM/include/EMInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/include/FTMInternal.h b/src/VBox/VMM/include/FTMInternal.h
index ab14d82..2905ddd 100644
--- a/src/VBox/VMM/include/FTMInternal.h
+++ b/src/VBox/VMM/include/FTMInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/include/GIMHvInternal.h b/src/VBox/VMM/include/GIMHvInternal.h
index 85d9215..13c443f 100644
--- a/src/VBox/VMM/include/GIMHvInternal.h
+++ b/src/VBox/VMM/include/GIMHvInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -400,10 +400,10 @@ AssertCompile(MSR_GIM_HV_RANGE11_START <= MSR_GIM_HV_RANGE11_END);
 /** @name Hyper-V MSR - Reset (MSR_GIM_HV_RESET).
  * @{
  */
-/** The hypercall enable bit. */
-#define MSR_GIM_HV_RESET_BIT                      RT_BIT_64(0)
-/** Whether the hypercall-page is enabled or not. */
-#define MSR_GIM_HV_RESET_IS_SET(a)                RT_BOOL((a) & MSR_GIM_HV_RESET_BIT)
+/** The reset enable mask. */
+#define MSR_GIM_HV_RESET_ENABLE                       RT_BIT_64(0)
+/** Whether the reset MSR is enabled. */
+#define MSR_GIM_HV_RESET_IS_ENABLED(a)                RT_BOOL((a) & MSR_GIM_HV_RESET_ENABLE)
 /** @} */
 
 /** @name Hyper-V MSR - Hypercall (MSR_GIM_HV_HYPERCALL).
@@ -411,10 +411,10 @@ AssertCompile(MSR_GIM_HV_RANGE11_START <= MSR_GIM_HV_RANGE11_END);
  */
 /** Guest-physical page frame number of the hypercall-page. */
 #define MSR_GIM_HV_HYPERCALL_GUEST_PFN(a)         ((a) >> 12)
-/** The hypercall enable bit. */
-#define MSR_GIM_HV_HYPERCALL_PAGE_ENABLE_BIT      RT_BIT_64(0)
+/** The hypercall enable mask. */
+#define MSR_GIM_HV_HYPERCALL_PAGE_ENABLE          RT_BIT_64(0)
 /** Whether the hypercall-page is enabled or not. */
-#define MSR_GIM_HV_HYPERCALL_PAGE_IS_ENABLED(a)   RT_BOOL((a) & MSR_GIM_HV_HYPERCALL_PAGE_ENABLE_BIT)
+#define MSR_GIM_HV_HYPERCALL_PAGE_IS_ENABLED(a)   RT_BOOL((a) & MSR_GIM_HV_HYPERCALL_PAGE_ENABLE)
 /** @} */
 
 /** @name Hyper-V MSR - Reference TSC (MSR_GIM_HV_REF_TSC).
@@ -422,17 +422,17 @@ AssertCompile(MSR_GIM_HV_RANGE11_START <= MSR_GIM_HV_RANGE11_END);
  */
 /** Guest-physical page frame number of the TSC-page. */
 #define MSR_GIM_HV_REF_TSC_GUEST_PFN(a)           ((a) >> 12)
-/** The TSC-page enable bit. */
-#define MSR_GIM_HV_REF_TSC_ENABLE_BIT             RT_BIT_64(0)
+/** The TSC-page enable mask. */
+#define MSR_GIM_HV_REF_TSC_ENABLE                 RT_BIT_64(0)
 /** Whether the TSC-page is enabled or not. */
-#define MSR_GIM_HV_REF_TSC_IS_ENABLED(a)          RT_BOOL((a) & MSR_GIM_HV_REF_TSC_ENABLE_BIT)
+#define MSR_GIM_HV_REF_TSC_IS_ENABLED(a)          RT_BOOL((a) & MSR_GIM_HV_REF_TSC_ENABLE)
 /** @} */
 
 /** @name Hyper-V MSR - Guest crash control (MSR_GIM_HV_CRASH_CTL).
  * @{
  */
-/** The Crash Notify bit. */
-#define MSR_GIM_HV_CRASH_CTL_NOTIFY_BIT           RT_BIT_64(63)
+/** The Crash Control notify mask. */
+#define MSR_GIM_HV_CRASH_CTL_NOTIFY               RT_BIT_64(63)
 /** @} */
 
 /** @name Hyper-V MSR - Guest OS ID (MSR_GIM_HV_GUEST_OS_ID).
@@ -459,10 +459,22 @@ AssertCompile(MSR_GIM_HV_RANGE11_START <= MSR_GIM_HV_RANGE11_END);
  */
 /** Guest-physical page frame number of the APIC-assist page. */
 #define MSR_GIM_HV_APICASSIST_GUEST_PFN(a)        ((a) >> 12)
-/** The hypercall enable bit. */
-#define MSR_GIM_HV_APICASSIST_PAGE_ENABLE_BIT     RT_BIT_64(0)
-/** Whether the hypercall-page is enabled or not. */
-#define MSR_GIM_HV_APICASSIST_PAGE_IS_ENABLED(a)  RT_BOOL((a) & MSR_GIM_HV_APICASSIST_PAGE_ENABLE_BIT)
+/** The APIC-assist page enable mask. */
+#define MSR_GIM_HV_APICASSIST_PAGE_ENABLE         RT_BIT_64(0)
+/** Whether the APIC-assist page is enabled or not. */
+#define MSR_GIM_HV_APICASSIST_PAGE_IS_ENABLED(a)  RT_BOOL((a) & MSR_GIM_HV_APICASSIST_PAGE_ENABLE)
+/** @} */
+
+/** @name Hyper-V MSR - Synthetic Interrupt Event Flags page
+ *        (MSR_GIM_HV_SIEFP).
+ * @{
+ */
+/** Guest-physical page frame number of the APIC-assist page. */
+#define MSR_GIM_HV_SIEF_GUEST_PFN(a)              ((a) >> 12)
+/** The SIEF enable mask. */
+#define MSR_GIM_HV_SIEF_PAGE_ENABLE               RT_BIT_64(0)
+/** Whether the SIEF page is enabled or not. */
+#define MSR_GIM_HV_SIEF_PAGE_IS_ENABLED(a)        RT_BOOL((a) & MSR_GIM_HV_SIEF_PAGE_ENABLE)
 /** @} */
 
 /**
@@ -698,21 +710,21 @@ typedef enum GIMHVHYPERCALLPARAM
  * @{
  */
 /** Debug send buffer operation success. */
-#define MSR_GIM_HV_SYNTH_DEBUG_STATUS_W_SUCCESS_BIT    RT_BIT_64(0)
+#define MSR_GIM_HV_SYNTH_DEBUG_STATUS_W_SUCCESS        RT_BIT_64(0)
 /** Debug receive buffer operation success. */
-#define MSR_GIM_HV_SYNTH_DEBUG_STATUS_R_SUCCESS_BIT    RT_BIT_64(2)
+#define MSR_GIM_HV_SYNTH_DEBUG_STATUS_R_SUCCESS        RT_BIT_64(2)
 /** Debug connection was reset. */
-#define MSR_GIM_HV_SYNTH_DEBUG_STATUS_CONN_RESET_BIT   RT_BIT_64(3)
+#define MSR_GIM_HV_SYNTH_DEBUG_STATUS_CONN_RESET       RT_BIT_64(3)
 /** @} */
 
 
 /** @name Hyper-V MSR - synthetic interrupt (MSR_GIM_HV_SINTx).
  * @{
  */
-/** The interrupt masked bit. */
-#define MSR_GIM_HV_SINT_MASKED_BIT                     RT_BIT_64(16)
+/** The interrupt masked mask. */
+#define MSR_GIM_HV_SINT_MASKED                         RT_BIT_64(16)
 /** Whether the interrupt source is masked. */
-#define MSR_GIM_HV_SINT_IS_MASKED(a)                   RT_BOOL((a) & MSR_GIM_HV_SINT_MASKED_BIT)
+#define MSR_GIM_HV_SINT_IS_MASKED(a)                   RT_BOOL((a) & MSR_GIM_HV_SINT_MASKED)
 /** Interrupt vector. */
 #define MSR_GIM_HV_SINT_VECTOR(a)                      ((a) & UINT64_C(0xff))
 /** @} */
@@ -721,10 +733,10 @@ typedef enum GIMHVHYPERCALLPARAM
 /** @name Hyper-V MSR - synthetic interrupt message page (MSR_GIM_HV_SIMP).
  * @{
  */
-/** The SIMP enabled bit. */
-#define MSR_GIM_HV_SIMP_ENABLED_BIT                    RT_BIT_64(0)
+/** The SIMP enable mask. */
+#define MSR_GIM_HV_SIMP_ENABLE                         RT_BIT_64(0)
 /** Whether the SIMP is enabled. */
-#define MSR_GIM_HV_SIMP_IS_ENABLED(a)                  RT_BOOL((a) & MSR_GIM_HV_SIMP_ENABLED_BIT)
+#define MSR_GIM_HV_SIMP_IS_ENABLED(a)                  RT_BOOL((a) & MSR_GIM_HV_SIMP_ENABLE)
 /** The SIMP guest-physical address. */
 #define MSR_GIM_HV_SIMP_GPA(a)                         ((a) & UINT64_C(0xfffffffffffff000))
 /** @} */
@@ -764,10 +776,23 @@ typedef enum GIMHVHYPERCALLPARAM
  * @{ */
 /** VMBus connection ID. */
 #define GIM_HV_VMBUS_MSG_CONNECTION_ID            1
-/** VMBus synthetic interrupt source. */
+/** VMBus synthetic interrupt source (see VMBUS_MESSAGE_SINT in linux
+ *  sources). */
 #define GIM_HV_VMBUS_MSG_SINT                     2
 /** @} */
 
+/** @name SynIC.
+ *  Synthetic Interrupt Controller definitions.
+ */
+/** SynIC version register. */
+#define GIM_HV_SVERSION                           1
+/** Number of synthetic interrupt sources. */
+#define GIM_HV_SINT_COUNT                         16
+/** Lowest valid vector for synthetic interrupt. */
+#define GIM_HV_SINT_VECTOR_VALID_MIN              16
+/** Highest valid vector for synthetic interrupt. */
+#define GIM_HV_SINT_VECTOR_VALID_MAX              255
+/** @} */
 
 /** @name Hyper-V synthetic interrupt message type.
  * @{
@@ -1119,8 +1144,10 @@ typedef struct GIMHVCPU
      * @{ */
     /** Synthetic interrupt message page MSR. */
     uint64_t                    uSimpMsr;
-    /** Interrupt source 2 MSR. */
-    uint64_t                    uSint2Msr;
+    /** Interrupt source MSRs. */
+    uint64_t                    auSintXMsr[GIM_HV_SINT_COUNT];
+    /** Synethtic interrupt events flag page MSR. */
+    uint64_t                    uSiefpMsr;
     /** APIC-assist page MSR. */
     uint64_t                    uApicAssistPageMsr;
     /** @} */
@@ -1147,11 +1174,15 @@ VMMR3_INT_DECL(void)            gimR3HvRelocate(PVM pVM, RTGCINTPTR offDelta);
 VMMR3_INT_DECL(void)            gimR3HvReset(PVM pVM);
 VMMR3_INT_DECL(PGIMMMIO2REGION) gimR3HvGetMmio2Regions(PVM pVM, uint32_t *pcRegions);
 VMMR3_INT_DECL(int)             gimR3HvSave(PVM pVM, PSSMHANDLE pSSM);
-VMMR3_INT_DECL(int)             gimR3HvLoad(PVM pVM, PSSMHANDLE pSSM, uint32_t uSSMVersion);
+VMMR3_INT_DECL(int)             gimR3HvLoad(PVM pVM, PSSMHANDLE pSSM);
 VMMR3_INT_DECL(int)             gimR3HvGetDebugSetup(PVM pVM, PGIMDEBUGSETUP pDbgSetup);
 
-VMMR3_INT_DECL(int)             gimR3HvDisableApicAssistPage(PVM pVM);
-VMMR3_INT_DECL(int)             gimR3HvEnableApicAssistPage(PVM pVM, RTGCPHYS GCPhysTscPage);
+VMMR3_INT_DECL(int)             gimR3HvDisableSiefPage(PVMCPU pVCpu);
+VMMR3_INT_DECL(int)             gimR3HvEnableSiefPage(PVMCPU pVCpu, RTGCPHYS GCPhysSiefPage);
+VMMR3_INT_DECL(int)             gimR3HvEnableSimPage(PVMCPU pVCpu, RTGCPHYS GCPhysSimPage);
+VMMR3_INT_DECL(int)             gimR3HvDisableSimPage(PVMCPU pVCpu);
+VMMR3_INT_DECL(int)             gimR3HvDisableApicAssistPage(PVMCPU pVCpu);
+VMMR3_INT_DECL(int)             gimR3HvEnableApicAssistPage(PVMCPU pVCpu, RTGCPHYS GCPhysTscPage);
 VMMR3_INT_DECL(int)             gimR3HvDisableTscPage(PVM pVM);
 VMMR3_INT_DECL(int)             gimR3HvEnableTscPage(PVM pVM, RTGCPHYS GCPhysTscPage, bool fUseThisTscSeq, uint32_t uTscSeq);
 VMMR3_INT_DECL(int)             gimR3HvDisableHypercallPage(PVM pVM);
diff --git a/src/VBox/VMM/include/GIMInternal.h b/src/VBox/VMM/include/GIMInternal.h
index 8742a81..03b1944 100644
--- a/src/VBox/VMM/include/GIMInternal.h
+++ b/src/VBox/VMM/include/GIMInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/include/GIMKvmInternal.h b/src/VBox/VMM/include/GIMKvmInternal.h
index 90676e7..fa679ea 100644
--- a/src/VBox/VMM/include/GIMKvmInternal.h
+++ b/src/VBox/VMM/include/GIMKvmInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -251,7 +251,7 @@ VMMR3_INT_DECL(int)             gimR3KvmTerm(PVM pVM);
 VMMR3_INT_DECL(void)            gimR3KvmRelocate(PVM pVM, RTGCINTPTR offDelta);
 VMMR3_INT_DECL(void)            gimR3KvmReset(PVM pVM);
 VMMR3_INT_DECL(int)             gimR3KvmSave(PVM pVM, PSSMHANDLE pSSM);
-VMMR3_INT_DECL(int)             gimR3KvmLoad(PVM pVM, PSSMHANDLE pSSM, uint32_t uSSMVersion);
+VMMR3_INT_DECL(int)             gimR3KvmLoad(PVM pVM, PSSMHANDLE pSSM);
 
 VMMR3_INT_DECL(int)             gimR3KvmDisableSystemTime(PVM pVM);
 VMMR3_INT_DECL(int)             gimR3KvmEnableSystemTime(PVM pVM, PVMCPU pVCpu);
diff --git a/src/VBox/VMM/include/GIMMinimalInternal.h b/src/VBox/VMM/include/GIMMinimalInternal.h
index d26d2c9..bf04cff 100644
--- a/src/VBox/VMM/include/GIMMinimalInternal.h
+++ b/src/VBox/VMM/include/GIMMinimalInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/include/HMInternal.h b/src/VBox/VMM/include/HMInternal.h
index ef451d7..05b13c4 100644
--- a/src/VBox/VMM/include/HMInternal.h
+++ b/src/VBox/VMM/include/HMInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/include/HMInternal.mac b/src/VBox/VMM/include/HMInternal.mac
index 7871cfe..a943f45 100644
--- a/src/VBox/VMM/include/HMInternal.mac
+++ b/src/VBox/VMM/include/HMInternal.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/include/IEMInternal.h b/src/VBox/VMM/include/IEMInternal.h
index 159263d..8d69ef8 100644
--- a/src/VBox/VMM/include/IEMInternal.h
+++ b/src/VBox/VMM/include/IEMInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/include/IOMInline.h b/src/VBox/VMM/include/IOMInline.h
index ee2234f..aeb87d3 100644
--- a/src/VBox/VMM/include/IOMInline.h
+++ b/src/VBox/VMM/include/IOMInline.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/include/IOMInternal.h b/src/VBox/VMM/include/IOMInternal.h
index 7302d16..784c32b 100644
--- a/src/VBox/VMM/include/IOMInternal.h
+++ b/src/VBox/VMM/include/IOMInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -463,7 +463,7 @@ PIOMMMIOSTATS       iomR3MMIOStatsCreate(PVM pVM, RTGCPHYS GCPhys, const char *p
 #ifndef IN_RING3
 DECLEXPORT(FNPGMRZPHYSPFHANDLER)    iomMmioPfHandler;
 #endif
-PGM_ALL_CB2_DECL(FNPGMPHYSHANDLER)  iomMmioHandler;
+PGM_ALL_CB2_PROTO(FNPGMPHYSHANDLER) iomMmioHandler;
 
 /* IOM locking helpers. */
 #ifdef IOM_WITH_CRIT_SECT_RW
diff --git a/src/VBox/VMM/include/MMInternal.h b/src/VBox/VMM/include/MMInternal.h
index 2a05d4e..1d693b9 100644
--- a/src/VBox/VMM/include/MMInternal.h
+++ b/src/VBox/VMM/include/MMInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/include/PATMA.h b/src/VBox/VMM/include/PATMA.h
index cf53e51..6ebe07c 100644
--- a/src/VBox/VMM/include/PATMA.h
+++ b/src/VBox/VMM/include/PATMA.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/include/PATMInternal.h b/src/VBox/VMM/include/PATMInternal.h
index 932857a..0289381 100644
--- a/src/VBox/VMM/include/PATMInternal.h
+++ b/src/VBox/VMM/include/PATMInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -684,6 +684,6 @@ void patmR3DbgTerm(PVM pVM);
 void patmR3DbgReset(PVM pVM);
 void patmR3DbgAddPatch(PVM pVM, PPATMPATCHREC pPatchRec);
 
-PGM_ALL_CB2_DECL(FNPGMVIRTHANDLER) patmVirtPageHandler;
+PGM_ALL_CB2_PROTO(FNPGMVIRTHANDLER) patmVirtPageHandler;
 
 #endif
diff --git a/src/VBox/VMM/include/PDMAsyncCompletionFileInternal.h b/src/VBox/VMM/include/PDMAsyncCompletionFileInternal.h
index 7ed7680..d4c2467 100644
--- a/src/VBox/VMM/include/PDMAsyncCompletionFileInternal.h
+++ b/src/VBox/VMM/include/PDMAsyncCompletionFileInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/include/PDMAsyncCompletionInternal.h b/src/VBox/VMM/include/PDMAsyncCompletionInternal.h
index 41226c1..e480403 100644
--- a/src/VBox/VMM/include/PDMAsyncCompletionInternal.h
+++ b/src/VBox/VMM/include/PDMAsyncCompletionInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/include/PDMBlkCacheInternal.h b/src/VBox/VMM/include/PDMBlkCacheInternal.h
index 5af318a..c15048e 100644
--- a/src/VBox/VMM/include/PDMBlkCacheInternal.h
+++ b/src/VBox/VMM/include/PDMBlkCacheInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/include/PDMInline.h b/src/VBox/VMM/include/PDMInline.h
index 59e47e9..96e46ff 100644
--- a/src/VBox/VMM/include/PDMInline.h
+++ b/src/VBox/VMM/include/PDMInline.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/include/PDMInternal.h b/src/VBox/VMM/include/PDMInternal.h
index cd5c14a..63232b5 100644
--- a/src/VBox/VMM/include/PDMInternal.h
+++ b/src/VBox/VMM/include/PDMInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/include/PDMNetShaperInternal.h b/src/VBox/VMM/include/PDMNetShaperInternal.h
index 727025d..a5e180f 100644
--- a/src/VBox/VMM/include/PDMNetShaperInternal.h
+++ b/src/VBox/VMM/include/PDMNetShaperInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/include/PGMGstDefs.h b/src/VBox/VMM/include/PGMGstDefs.h
index bf5bf64..cb6f31f 100644
--- a/src/VBox/VMM/include/PGMGstDefs.h
+++ b/src/VBox/VMM/include/PGMGstDefs.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/include/PGMInline.h b/src/VBox/VMM/include/PGMInline.h
index 371e0a0..7a01a25 100644
--- a/src/VBox/VMM/include/PGMInline.h
+++ b/src/VBox/VMM/include/PGMInline.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -434,7 +434,7 @@ DECLINLINE(void *) pgmPoolMapPageV2Inlined(PVM pVM, PVMCPU pVCpu, PPGMPOOLPAGE p
     {
         Assert(pPage->idx < pVM->pgm.s.CTX_SUFF(pPool)->cCurPages);
         void *pv;
-        Assert(pVCpu == VMMGetCpu(pVM));
+        Assert(pVCpu == VMMGetCpu(pVM)); RT_NOREF_PV(pVM);
         pgmRZDynMapHCPageInlined(pVCpu, pPage->Core.Key, &pv RTLOG_COMMA_SRC_POS_ARGS);
         return pv;
     }
diff --git a/src/VBox/VMM/include/PGMInternal.h b/src/VBox/VMM/include/PGMInternal.h
index 85ef904..3686699 100644
--- a/src/VBox/VMM/include/PGMInternal.h
+++ b/src/VBox/VMM/include/PGMInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -4170,7 +4170,7 @@ int             pgmPhysGCPhys2CCPtrInternalDepr(PVM pVM, PPGMPAGE pPage, RTGCPHY
 int             pgmPhysGCPhys2CCPtrInternal(PVM pVM, PPGMPAGE pPage, RTGCPHYS GCPhys, void **ppv, PPGMPAGEMAPLOCK pLock);
 int             pgmPhysGCPhys2CCPtrInternalReadOnly(PVM pVM, PPGMPAGE pPage, RTGCPHYS GCPhys, const void **ppv, PPGMPAGEMAPLOCK pLock);
 void            pgmPhysReleaseInternalPageMappingLock(PVM pVM, PPGMPAGEMAPLOCK pLock);
-PGM_ALL_CB2_DECL(FNPGMPHYSHANDLER)  pgmPhysRomWriteHandler;
+PGM_ALL_CB2_PROTO(FNPGMPHYSHANDLER) pgmPhysRomWriteHandler;
 #ifndef IN_RING3
 DECLEXPORT(FNPGMPHYSHANDLER)        pgmPhysHandlerRedirectToHC;
 DECLEXPORT(FNPGMRZPHYSPFHANDLER)    pgmPhysPfHandlerRedirectToHC;
@@ -4232,9 +4232,9 @@ uint16_t        pgmPoolTrackPhysExtAddref(PVM pVM, PPGMPAGE pPhysPage, uint16_t
 void            pgmPoolTrackPhysExtDerefGCPhys(PPGMPOOL pPool, PPGMPOOLPAGE pPoolPage, PPGMPAGE pPhysPage, uint16_t iPte);
 int             pgmPoolMonitorChainFlush(PPGMPOOL pPool, PPGMPOOLPAGE pPage);
 void            pgmPoolMonitorModifiedInsert(PPGMPOOL pPool, PPGMPOOLPAGE pPage);
-PGM_ALL_CB2_DECL(FNPGMPHYSHANDLER) pgmPoolAccessHandler;
+PGM_ALL_CB2_PROTO(FNPGMPHYSHANDLER) pgmPoolAccessHandler;
 #ifndef IN_RING3
-DECLEXPORT(FNPGMRZPHYSPFHANDLER)   pgmPoolAccessPfHandler;
+DECLEXPORT(FNPGMRZPHYSPFHANDLER)    pgmPoolAccessPfHandler;
 #endif
 
 void            pgmPoolAddDirtyPage(PVM pVM, PPGMPOOL pPool, PPGMPOOLPAGE pPage);
diff --git a/src/VBox/VMM/include/REMInternal.h b/src/VBox/VMM/include/REMInternal.h
index c9c4b34..61cf2e1 100644
--- a/src/VBox/VMM/include/REMInternal.h
+++ b/src/VBox/VMM/include/REMInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/include/SELMInline.h b/src/VBox/VMM/include/SELMInline.h
index 7b8408b..22c7ccc 100644
--- a/src/VBox/VMM/include/SELMInline.h
+++ b/src/VBox/VMM/include/SELMInline.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -246,22 +246,23 @@ DECLINLINE(bool) selmIsSRegStale32(PCCPUMSELREG pSReg, PCX86DESC pShwDesc, uint3
         || pSReg->Attr.n.u1Granularity != pShwDesc->Gen.u1Granularity
         || pSReg->Attr.n.u2Dpl         != pShwDesc->Gen.u2Dpl - pShwDesc->Gen.u1Available)
     {
-        Log(("selmIsSRegStale32: Attributes changed (%#x -> %#x)\n", pSReg->Attr.u, X86DESC_GET_HID_ATTR(pShwDesc)));
+        Log(("selmIsSRegStale32: Attributes changed (%#x -> %#x) for %u\n", pSReg->Attr.u, X86DESC_GET_HID_ATTR(pShwDesc), iSReg));
         return true;
     }
 
     if (pSReg->u64Base != X86DESC_BASE(pShwDesc))
     {
-        Log(("selmIsSRegStale32: base changed (%#llx -> %#x)\n", pSReg->u64Base, X86DESC_BASE(pShwDesc)));
+        Log(("selmIsSRegStale32: base changed (%#llx -> %#x) for %u\n", pSReg->u64Base, X86DESC_BASE(pShwDesc), iSReg));
         return true;
     }
 
     if (pSReg->u32Limit != X86DESC_LIMIT_G(pShwDesc))
     {
-        Log(("selmIsSRegStale32: limit changed (%#x -> %#x)\n", pSReg->u32Limit, X86DESC_LIMIT_G(pShwDesc)));
+        Log(("selmIsSRegStale32: limit changed (%#x -> %#x) for %u\n", pSReg->u32Limit, X86DESC_LIMIT_G(pShwDesc), iSReg));
         return true;
     }
 
+    RT_NOREF_PV(iSReg);
     return false;
 }
 
diff --git a/src/VBox/VMM/include/SELMInternal.h b/src/VBox/VMM/include/SELMInternal.h
index c9c9e3b..21872b8 100644
--- a/src/VBox/VMM/include/SELMInternal.h
+++ b/src/VBox/VMM/include/SELMInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -229,11 +229,11 @@ typedef struct SELM
 
 RT_C_DECLS_BEGIN
 
-PGM_ALL_CB2_DECL(FNPGMVIRTHANDLER)  selmGuestGDTWriteHandler;
+PGM_ALL_CB2_PROTO(FNPGMVIRTHANDLER) selmGuestGDTWriteHandler;
 DECLEXPORT(FNPGMRCVIRTPFHANDLER)    selmRCGuestGDTWritePfHandler;
-PGM_ALL_CB2_DECL(FNPGMVIRTHANDLER)  selmGuestLDTWriteHandler;
+PGM_ALL_CB2_PROTO(FNPGMVIRTHANDLER) selmGuestLDTWriteHandler;
 DECLEXPORT(FNPGMRCVIRTPFHANDLER)    selmRCGuestLDTWritePfHandler;
-PGM_ALL_CB2_DECL(FNPGMVIRTHANDLER)  selmGuestTSSWriteHandler;
+PGM_ALL_CB2_PROTO(FNPGMVIRTHANDLER) selmGuestTSSWriteHandler;
 DECLEXPORT(FNPGMRCVIRTPFHANDLER)    selmRCGuestTSSWritePfHandler;
 DECLEXPORT(FNPGMRCVIRTPFHANDLER)    selmRCShadowGDTWritePfHandler;
 DECLEXPORT(FNPGMRCVIRTPFHANDLER)    selmRCShadowLDTWritePfHandler;
diff --git a/src/VBox/VMM/include/SSMInternal.h b/src/VBox/VMM/include/SSMInternal.h
index 7f60011..64260d3 100644
--- a/src/VBox/VMM/include/SSMInternal.h
+++ b/src/VBox/VMM/include/SSMInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/include/STAMInternal.h b/src/VBox/VMM/include/STAMInternal.h
index da16992..a1adb7c 100644
--- a/src/VBox/VMM/include/STAMInternal.h
+++ b/src/VBox/VMM/include/STAMInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/include/TMInline.h b/src/VBox/VMM/include/TMInline.h
index 6cbbe39..773140c 100644
--- a/src/VBox/VMM/include/TMInline.h
+++ b/src/VBox/VMM/include/TMInline.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/include/TMInternal.h b/src/VBox/VMM/include/TMInternal.h
index db8161e..3219e38 100644
--- a/src/VBox/VMM/include/TMInternal.h
+++ b/src/VBox/VMM/include/TMInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -772,11 +772,6 @@ DECLCALLBACK(DECLEXPORT(uint64_t))  tmVirtualNanoTSRediscover(PRTTIMENANOTSDATA
 DECLCALLBACK(DECLEXPORT(uint64_t))  tmVirtualNanoTSBadCpuIndex(PRTTIMENANOTSDATA pData, uint16_t idApic,
                                                                uint16_t iCpuSet, uint16_t iGipCpu);
 
-#ifdef IN_RING3
-static const char *     tmR3GetTSCModeNameEx(TMTSCMODE enmMode);
-#endif
-
-
 /**
  * Try take the timer lock, wait in ring-3 return VERR_SEM_BUSY in R0/RC.
  *
diff --git a/src/VBox/VMM/include/TRPMInternal.h b/src/VBox/VMM/include/TRPMInternal.h
index 38b88f4..8abcab8 100644
--- a/src/VBox/VMM/include/TRPMInternal.h
+++ b/src/VBox/VMM/include/TRPMInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -94,7 +94,6 @@ RT_C_DECLS_BEGIN
  *
  * IMPORTANT! Keep the nasm version of this struct up-to-date.
  */
-#pragma pack(4)
 typedef struct TRPM
 {
     /** Offset to the VM structure.
@@ -132,10 +131,10 @@ typedef struct TRPM
 
     /** RC Pointer to the IDT shadow area (aIdt) in HMA. */
     RCPTRTYPE(void *)       pvMonShwIdtRC;
-    /** Current (last) Guest's IDTR. */
-    VBOXIDTR                GuestIdtr;
     /** padding. */
     uint8_t                 au8Padding[2];
+    /** Current (last) Guest's IDTR. */
+    VBOXIDTR                GuestIdtr;
     /** Shadow IDT virtual write access handler type. */
     PGMVIRTHANDLERTYPE      hShadowIdtWriteHandlerType;
     /** Guest IDT virtual write access handler type. */
@@ -176,6 +175,7 @@ typedef struct TRPM
     R3PTRTYPE(PSTAMCOUNTER) paStatHostIrqR3;
 #endif
 } TRPM;
+AssertCompileMemberAlignment(TRPM, GuestIdtr.pIdt, 8);
 
 /** Pointer to TRPM Data. */
 typedef TRPM *PTRPM;
@@ -227,17 +227,14 @@ typedef struct TRPMCPU
     /** Saved trap vector number. */
     RTGCUINT                uSavedVector; /**< @todo don't use RTGCUINT */
 
-    /** Saved trap type. */
-    TRPMEVENT               enmSavedType;
-
     /** Saved errorcode. */
     RTGCUINT                uSavedErrorCode;
 
     /** Saved cr2. */
     RTGCUINTPTR             uSavedCR2;
 
-    /** Previous trap vector # - for debugging. */
-    RTGCUINT                uPrevVector;
+    /** Saved trap type. */
+    TRPMEVENT               enmSavedType;
 
     /** Instruction length for software interrupts and software exceptions
      * (\#BP, \#OF) */
@@ -248,15 +245,16 @@ typedef struct TRPMCPU
 
     /** Padding. */
     uint8_t                 au8Padding[2];
+
+    /** Previous trap vector # - for debugging. */
+    RTGCUINT                uPrevVector;
 } TRPMCPU;
 
 /** Pointer to TRPMCPU Data. */
 typedef TRPMCPU *PTRPMCPU;
 
-#pragma pack()
-
 
-PGM_ALL_CB2_DECL(FNPGMVIRTHANDLER)  trpmGuestIDTWriteHandler;
+PGM_ALL_CB2_PROTO(FNPGMVIRTHANDLER) trpmGuestIDTWriteHandler;
 DECLEXPORT(FNPGMRCVIRTPFHANDLER)    trpmRCGuestIDTWritePfHandler;
 DECLEXPORT(FNPGMRCVIRTPFHANDLER)    trpmRCShadowIDTWritePfHandler;
 
diff --git a/src/VBox/VMM/include/TRPMInternal.mac b/src/VBox/VMM/include/TRPMInternal.mac
index eb7a0f7..a4187d7 100644
--- a/src/VBox/VMM/include/TRPMInternal.mac
+++ b/src/VBox/VMM/include/TRPMInternal.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
@@ -36,13 +36,14 @@ struc TRPM
     .aTmpTrapHandlers   RTRCPTR_RES 256
 
     .pvMonShwIdtRC                  RTRCPTR_RES 1
-    .GuestIdtr                      resb 10
     .au8Padding                     resb 2
+    .GuestIdtr                      resb 10
     .hShadowIdtWriteHandlerType     resd 1
     .hGuestIdtWriteHandlerType      resd 1
 
     .aGuestTrapHandler  RTRCPTR_RES 256
 
+    alignb 8
     .StatRCWriteGuestIDTFault  resb STAMCOUNTER_size
     .StatRCWriteGuestIDTHandled  resb STAMCOUNTER_size
     .StatSyncIDT        resb STAMPROFILE_size
@@ -74,13 +75,13 @@ struc TRPMCPU
     .uActiveErrorCode   RTGCPTR_RES 1
     .uActiveCR2         RTGCPTR_RES 1
     .uSavedVector       RTGCPTR_RES 1
-    .enmSavedType       resd 1
     .uSavedErrorCode    RTGCPTR_RES 1
     .uSavedCR2          RTGCPTR_RES 1
-    .uPrevVector        RTGCPTR_RES 1
+    .enmSavedType       resd 1
     .cbInstr            resb 1
     .cbSavedInstr       resb 1
     .au8Padding         resb 2
+    .uPrevVector        RTGCPTR_RES 1
 endstruc
 
 struc VBOXTSS
diff --git a/src/VBox/VMM/include/VMInternal.h b/src/VBox/VMM/include/VMInternal.h
index 3c1991b..aadd3e2 100644
--- a/src/VBox/VMM/include/VMInternal.h
+++ b/src/VBox/VMM/include/VMInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/include/VMMInternal.h b/src/VBox/VMM/include/VMMInternal.h
index 5a3fab4..e1ae540 100644
--- a/src/VBox/VMM/include/VMMInternal.h
+++ b/src/VBox/VMM/include/VMMInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/include/VMMInternal.mac b/src/VBox/VMM/include/VMMInternal.mac
index fb05188..7a31035 100644
--- a/src/VBox/VMM/include/VMMInternal.mac
+++ b/src/VBox/VMM/include/VMMInternal.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/include/VMMSwitcher.h b/src/VBox/VMM/include/VMMSwitcher.h
index accb0d0..ad13372 100644
--- a/src/VBox/VMM/include/VMMSwitcher.h
+++ b/src/VBox/VMM/include/VMMSwitcher.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/include/VMMSwitcher.mac b/src/VBox/VMM/include/VMMSwitcher.mac
index 856d078..1db5608 100644
--- a/src/VBox/VMM/include/VMMSwitcher.mac
+++ b/src/VBox/VMM/include/VMMSwitcher.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/include/VMMTracing.h b/src/VBox/VMM/include/VMMTracing.h
index 260420c..abb4bab 100644
--- a/src/VBox/VMM/include/VMMTracing.h
+++ b/src/VBox/VMM/include/VMMTracing.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/testcase/Instructions/Makefile.kmk b/src/VBox/VMM/testcase/Instructions/Makefile.kmk
index 132075c..e4b0b32 100644
--- a/src/VBox/VMM/testcase/Instructions/Makefile.kmk
+++ b/src/VBox/VMM/testcase/Instructions/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/testcase/Instructions/env-bs2-r0-32-big.mac b/src/VBox/VMM/testcase/Instructions/env-bs2-r0-32-big.mac
index 45013dd..870205f 100644
--- a/src/VBox/VMM/testcase/Instructions/env-bs2-r0-32-big.mac
+++ b/src/VBox/VMM/testcase/Instructions/env-bs2-r0-32-big.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/testcase/Instructions/env-bs2-r0-64-big.mac b/src/VBox/VMM/testcase/Instructions/env-bs2-r0-64-big.mac
index 873b48f..5e91b42 100644
--- a/src/VBox/VMM/testcase/Instructions/env-bs2-r0-64-big.mac
+++ b/src/VBox/VMM/testcase/Instructions/env-bs2-r0-64-big.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/testcase/Instructions/env-bs2-r0-64.mac b/src/VBox/VMM/testcase/Instructions/env-bs2-r0-64.mac
index c0f9e8f..a3444d8 100644
--- a/src/VBox/VMM/testcase/Instructions/env-bs2-r0-64.mac
+++ b/src/VBox/VMM/testcase/Instructions/env-bs2-r0-64.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/testcase/Instructions/env-bs2-r0-big.mac b/src/VBox/VMM/testcase/Instructions/env-bs2-r0-big.mac
index b0d41b1..9acd824 100644
--- a/src/VBox/VMM/testcase/Instructions/env-bs2-r0-big.mac
+++ b/src/VBox/VMM/testcase/Instructions/env-bs2-r0-big.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/testcase/Instructions/env-bs2-r0-common.mac b/src/VBox/VMM/testcase/Instructions/env-bs2-r0-common.mac
index d1d49f2..7c3b545 100644
--- a/src/VBox/VMM/testcase/Instructions/env-bs2-r0-common.mac
+++ b/src/VBox/VMM/testcase/Instructions/env-bs2-r0-common.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/testcase/Instructions/env-bs2-r0.mac b/src/VBox/VMM/testcase/Instructions/env-bs2-r0.mac
index 93e6aba..3e7110a 100644
--- a/src/VBox/VMM/testcase/Instructions/env-bs2-r0.mac
+++ b/src/VBox/VMM/testcase/Instructions/env-bs2-r0.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/testcase/Instructions/env-common.mac b/src/VBox/VMM/testcase/Instructions/env-common.mac
index f94837c..65082c3 100644
--- a/src/VBox/VMM/testcase/Instructions/env-common.mac
+++ b/src/VBox/VMM/testcase/Instructions/env-common.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/testcase/Instructions/env-iprt-r3-32.mac b/src/VBox/VMM/testcase/Instructions/env-iprt-r3-32.mac
index 856cfa2..7ba03a9 100644
--- a/src/VBox/VMM/testcase/Instructions/env-iprt-r3-32.mac
+++ b/src/VBox/VMM/testcase/Instructions/env-iprt-r3-32.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/testcase/Instructions/env-iprt-r3-64.mac b/src/VBox/VMM/testcase/Instructions/env-iprt-r3-64.mac
index 7b7e340..ec02c2d 100644
--- a/src/VBox/VMM/testcase/Instructions/env-iprt-r3-64.mac
+++ b/src/VBox/VMM/testcase/Instructions/env-iprt-r3-64.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/testcase/Instructions/env-iprt-r3.mac b/src/VBox/VMM/testcase/Instructions/env-iprt-r3.mac
index 8a3759a..68e7f79 100644
--- a/src/VBox/VMM/testcase/Instructions/env-iprt-r3.mac
+++ b/src/VBox/VMM/testcase/Instructions/env-iprt-r3.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/testcase/Instructions/tstVBInsTstR3.cpp b/src/VBox/VMM/testcase/Instructions/tstVBInsTstR3.cpp
index 55aa4bb..11124dc 100644
--- a/src/VBox/VMM/testcase/Instructions/tstVBInsTstR3.cpp
+++ b/src/VBox/VMM/testcase/Instructions/tstVBInsTstR3.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/testcase/Makefile.kmk b/src/VBox/VMM/testcase/Makefile.kmk
index 5b03926..c6d8d1b 100644
--- a/src/VBox/VMM/testcase/Makefile.kmk
+++ b/src/VBox/VMM/testcase/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -245,8 +245,10 @@ tstGlobalConfig_LIBS    = $(LIB_RUNTIME)
 tstIEMCheckMc_TEMPLATE  = VBOXR3TSTEXE
 tstIEMCheckMc_SOURCES   = tstIEMCheckMc.cpp
 tstIEMCheckMc_LIBS      = $(LIB_RUNTIME)
-ifneq ($(KBUILD_TARGET),win)
-tstIEMCheckMc_CXXFLAGS  = -Wno-unused-parameter
+ifeq ($(KBUILD_TARGET),win)
+ tstIEMCheckMc_CXXFLAGS = $(VBOX_C_CXX_FLAGS_NO_UNUSED_PARAMETERS) -wd4189 # local variable is initialized but not used.
+else
+ tstIEMCheckMc_CXXFLAGS = $(VBOX_C_CXX_FLAGS_NO_UNUSED_PARAMETERS) -Wno-unused-value -Wno-unused-variable
 endif
 
 #
diff --git a/src/VBox/VMM/testcase/tstAnimate.cpp b/src/VBox/VMM/testcase/tstAnimate.cpp
index ebc4c90..3ecc63d 100644
--- a/src/VBox/VMM/testcase/tstAnimate.cpp
+++ b/src/VBox/VMM/testcase/tstAnimate.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -127,7 +127,39 @@ static int scriptDtrReg(PVM pVM, char *pszVar, char *pszValue, void *pvUser)
 
 
 
-
+/* variables - putting in global scope to avoid MSC warning C4640.  */
+static struct
+{
+    const char *pszVar;
+    int (*pfnHandler)(PVM pVM, char *pszVar, char *pszValue, void *pvUser);
+    PFNRT pvUser;
+} g_aVars[] =
+{
+    { "eax", scriptGPReg,  (PFNRT)CPUMSetGuestEAX },
+    { "ebx", scriptGPReg,  (PFNRT)CPUMSetGuestEBX },
+    { "ecx", scriptGPReg,  (PFNRT)CPUMSetGuestECX },
+    { "edx", scriptGPReg,  (PFNRT)CPUMSetGuestEDX },
+    { "esp", scriptGPReg,  (PFNRT)CPUMSetGuestESP },
+    { "ebp", scriptGPReg,  (PFNRT)CPUMSetGuestEBP },
+    { "esi", scriptGPReg,  (PFNRT)CPUMSetGuestESI },
+    { "edi", scriptGPReg,  (PFNRT)CPUMSetGuestEDI },
+    { "efl", scriptGPReg,  (PFNRT)CPUMSetGuestEFlags },
+    { "eip", scriptGPReg,  (PFNRT)CPUMSetGuestEIP },
+    { "ss",  scriptSelReg, (PFNRT)CPUMSetGuestSS },
+    { "cs",  scriptSelReg, (PFNRT)CPUMSetGuestCS },
+    { "ds",  scriptSelReg, (PFNRT)CPUMSetGuestDS },
+    { "es",  scriptSelReg, (PFNRT)CPUMSetGuestES },
+    { "fs",  scriptSelReg, (PFNRT)CPUMSetGuestFS },
+    { "gs",  scriptSelReg, (PFNRT)CPUMSetGuestGS },
+    { "cr0", scriptSysReg, (PFNRT)CPUMSetGuestCR0 },
+    { "cr2", scriptSysReg, (PFNRT)CPUMSetGuestCR2 },
+    { "cr3", scriptSysReg, (PFNRT)CPUMSetGuestCR3 },
+    { "cr4", scriptSysReg, (PFNRT)CPUMSetGuestCR4 },
+    { "ldtr",scriptSelReg, (PFNRT)CPUMSetGuestLDTR },
+    { "tr",  scriptSelReg, (PFNRT)CPUMSetGuestTR },
+    { "idtr",scriptDtrReg, (PFNRT)CPUMSetGuestIDTR },
+    { "gdtr",scriptDtrReg, (PFNRT)CPUMSetGuestGDTR }
+};
 
 
 static int scriptCommand(PVM pVM, const char *pszIn, size_t cch)
@@ -145,46 +177,12 @@ static int scriptCommand(PVM pVM, const char *pszIn, size_t cch)
         RTStrStripR(psz);
         char *pszValue = RTStrStrip(pszEqual + 1);
 
-        /* variables */
-        static struct
-        {
-            const char *pszVar;
-            int (*pfnHandler)(PVM pVM, char *pszVar, char *pszValue, void *pvUser);
-            PFNRT pvUser;
-        } aVars[] =
-        {
-            { "eax", scriptGPReg,  (PFNRT)CPUMSetGuestEAX },
-            { "ebx", scriptGPReg,  (PFNRT)CPUMSetGuestEBX },
-            { "ecx", scriptGPReg,  (PFNRT)CPUMSetGuestECX },
-            { "edx", scriptGPReg,  (PFNRT)CPUMSetGuestEDX },
-            { "esp", scriptGPReg,  (PFNRT)CPUMSetGuestESP },
-            { "ebp", scriptGPReg,  (PFNRT)CPUMSetGuestEBP },
-            { "esi", scriptGPReg,  (PFNRT)CPUMSetGuestESI },
-            { "edi", scriptGPReg,  (PFNRT)CPUMSetGuestEDI },
-            { "efl", scriptGPReg,  (PFNRT)CPUMSetGuestEFlags },
-            { "eip", scriptGPReg,  (PFNRT)CPUMSetGuestEIP },
-            { "ss",  scriptSelReg, (PFNRT)CPUMSetGuestSS },
-            { "cs",  scriptSelReg, (PFNRT)CPUMSetGuestCS },
-            { "ds",  scriptSelReg, (PFNRT)CPUMSetGuestDS },
-            { "es",  scriptSelReg, (PFNRT)CPUMSetGuestES },
-            { "fs",  scriptSelReg, (PFNRT)CPUMSetGuestFS },
-            { "gs",  scriptSelReg, (PFNRT)CPUMSetGuestGS },
-            { "cr0", scriptSysReg, (PFNRT)CPUMSetGuestCR0 },
-            { "cr2", scriptSysReg, (PFNRT)CPUMSetGuestCR2 },
-            { "cr3", scriptSysReg, (PFNRT)CPUMSetGuestCR3 },
-            { "cr4", scriptSysReg, (PFNRT)CPUMSetGuestCR4 },
-            { "ldtr",scriptSelReg, (PFNRT)CPUMSetGuestLDTR },
-            { "tr",  scriptSelReg, (PFNRT)CPUMSetGuestTR },
-            { "idtr",scriptDtrReg, (PFNRT)CPUMSetGuestIDTR },
-            { "gdtr",scriptDtrReg, (PFNRT)CPUMSetGuestGDTR }
-        };
-
         rc = -1;
-        for (unsigned i = 0; i < RT_ELEMENTS(aVars); i++)
+        for (unsigned i = 0; i < RT_ELEMENTS(g_aVars); i++)
         {
-            if (!strcmp(psz, aVars[i].pszVar))
+            if (!strcmp(psz, g_aVars[i].pszVar))
             {
-                rc = aVars[i].pfnHandler(pVM, psz, pszValue, (void*)(uintptr_t)aVars[i].pvUser);
+                rc = g_aVars[i].pfnHandler(pVM, psz, pszValue, (void *)(uintptr_t)g_aVars[i].pvUser);
                 break;
             }
         }
@@ -331,6 +329,7 @@ static DECLCALLBACK(int) loadMem(PVM pVM, RTFILE File, uint64_t *poff)
  */
 static DECLCALLBACK(int) cfgmR3CreateDefault(PUVM pUVM, PVM pVM, void *pvUser)
 {
+    RT_NOREF1(pUVM);
     uint64_t cbMem = *(uint64_t *)pvUser;
     int rc;
     int rcAll = VINF_SUCCESS;
@@ -624,6 +623,7 @@ static void syntax(void)
  */
 extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
 {
+    RT_NOREF1(envp);
     int rcRet = 1;
     int rc;
     RTR3InitExe(argc, &argv, RTR3INIT_FLAGS_SUPLIB);
diff --git a/src/VBox/VMM/testcase/tstAsmStructs.cpp b/src/VBox/VMM/testcase/tstAsmStructs.cpp
index 61b6172..e5ac180 100644
--- a/src/VBox/VMM/testcase/tstAsmStructs.cpp
+++ b/src/VBox/VMM/testcase/tstAsmStructs.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/testcase/tstAsmStructsAsm.asm b/src/VBox/VMM/testcase/tstAsmStructsAsm.asm
index df2ff08..c1c69c8 100644
--- a/src/VBox/VMM/testcase/tstAsmStructsAsm.asm
+++ b/src/VBox/VMM/testcase/tstAsmStructsAsm.asm
@@ -7,7 +7,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/testcase/tstCFGM.cpp b/src/VBox/VMM/testcase/tstCFGM.cpp
index 7f23042..72cf53f 100644
--- a/src/VBox/VMM/testcase/tstCFGM.cpp
+++ b/src/VBox/VMM/testcase/tstCFGM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -141,6 +141,8 @@ static void doStandaloneTests(void)
  */
 extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
 {
+    RT_NOREF3(argc, argv, envp);
+
     /*
      * Init runtime.
      */
diff --git a/src/VBox/VMM/testcase/tstCompressionBenchmark.cpp b/src/VBox/VMM/testcase/tstCompressionBenchmark.cpp
index 1b42e1d..ed64260 100644
--- a/src/VBox/VMM/testcase/tstCompressionBenchmark.cpp
+++ b/src/VBox/VMM/testcase/tstCompressionBenchmark.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/testcase/tstGlobalConfig.cpp b/src/VBox/VMM/testcase/tstGlobalConfig.cpp
index f8c1945..19fe3eb 100644
--- a/src/VBox/VMM/testcase/tstGlobalConfig.cpp
+++ b/src/VBox/VMM/testcase/tstGlobalConfig.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -43,6 +43,7 @@ static int Usage(void)
  */
 extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
 {
+    RT_NOREF1(envp);
     RTR3InitExe(argc, &argv, 0);
 
     /*
diff --git a/src/VBox/VMM/testcase/tstHelp.h b/src/VBox/VMM/testcase/tstHelp.h
index 9fc8c76..90aaf65 100644
--- a/src/VBox/VMM/testcase/tstHelp.h
+++ b/src/VBox/VMM/testcase/tstHelp.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/testcase/tstIEMCheckMc.cpp b/src/VBox/VMM/testcase/tstIEMCheckMc.cpp
index 9540920..549eafe 100644
--- a/src/VBox/VMM/testcase/tstIEMCheckMc.cpp
+++ b/src/VBox/VMM/testcase/tstIEMCheckMc.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/testcase/tstInstrEmul.cpp b/src/VBox/VMM/testcase/tstInstrEmul.cpp
index f19f2b0..b4f4689 100644
--- a/src/VBox/VMM/testcase/tstInstrEmul.cpp
+++ b/src/VBox/VMM/testcase/tstInstrEmul.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/testcase/tstMMHyperHeap.cpp b/src/VBox/VMM/testcase/tstMMHyperHeap.cpp
index 874300d..3fc7c35 100644
--- a/src/VBox/VMM/testcase/tstMMHyperHeap.cpp
+++ b/src/VBox/VMM/testcase/tstMMHyperHeap.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -43,6 +43,7 @@
  */
 extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
 {
+    RT_NOREF1(envp);
 
     /*
      * Init runtime.
@@ -52,8 +53,8 @@ extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
     /*
      * Create empty VM structure and call MMR3Init().
      */
-    PVM         pVM;
-    RTR0PTR     pvR0;
+    PVM         pVM = NULL;
+    RTR0PTR     pvR0 = NIL_RTR0PTR;
     SUPPAGE     aPages[RT_ALIGN_Z(sizeof(*pVM) + NUM_CPUS * sizeof(VMCPU), PAGE_SIZE) >> PAGE_SHIFT];
     int rc = SUPR3Init(NULL);
     if (RT_SUCCESS(rc))
diff --git a/src/VBox/VMM/testcase/tstMicro.cpp b/src/VBox/VMM/testcase/tstMicro.cpp
index 31f2d0b..cc26803 100644
--- a/src/VBox/VMM/testcase/tstMicro.cpp
+++ b/src/VBox/VMM/testcase/tstMicro.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -290,7 +290,7 @@ static DECLCALLBACK(int) doit(PVM pVM)
     for (i = TSTMICROTEST_OVERHEAD; i < TSTMICROTEST_TRAP_FIRST; i++)
     {
         TSTMICROTEST enmTest = (TSTMICROTEST)i;
-        uint64_t    cMin = ~0;
+        uint64_t    cMin = UINT64_MAX;
         uint64_t    cMax = 0;
         uint64_t    cTotal = 0;
         unsigned    cSamples = 0;
@@ -345,6 +345,7 @@ static DECLCALLBACK(int) doit(PVM pVM)
  */
 extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
 {
+    RT_NOREF1(envp);
     int     rcRet = 0;                  /* error count. */
 
     RTR3InitExe(argc, &argv, RTR3INIT_FLAGS_SUPLIB);
diff --git a/src/VBox/VMM/testcase/tstMicro.h b/src/VBox/VMM/testcase/tstMicro.h
index 898518f..ad7e5d2 100644
--- a/src/VBox/VMM/testcase/tstMicro.h
+++ b/src/VBox/VMM/testcase/tstMicro.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/testcase/tstMicro.mac b/src/VBox/VMM/testcase/tstMicro.mac
index 6a5325d..a6fd28e 100644
--- a/src/VBox/VMM/testcase/tstMicro.mac
+++ b/src/VBox/VMM/testcase/tstMicro.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/testcase/tstMicroRC.cpp b/src/VBox/VMM/testcase/tstMicroRC.cpp
index 4dfbd49..a87e537 100644
--- a/src/VBox/VMM/testcase/tstMicroRC.cpp
+++ b/src/VBox/VMM/testcase/tstMicroRC.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/testcase/tstMicroRC.def b/src/VBox/VMM/testcase/tstMicroRC.def
index 18f9648..bb1af30 100644
--- a/src/VBox/VMM/testcase/tstMicroRC.def
+++ b/src/VBox/VMM/testcase/tstMicroRC.def
@@ -2,7 +2,7 @@
 ;
 ; VMM Guest Context Micro Benchmark - Definition file.
 
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/testcase/tstMicroRCA.asm b/src/VBox/VMM/testcase/tstMicroRCA.asm
index 757c3fa..e384bad 100644
--- a/src/VBox/VMM/testcase/tstMicroRCA.asm
+++ b/src/VBox/VMM/testcase/tstMicroRCA.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/testcase/tstPDMAsyncCompletion.cpp b/src/VBox/VMM/testcase/tstPDMAsyncCompletion.cpp
index b064dc0..aab380f 100644
--- a/src/VBox/VMM/testcase/tstPDMAsyncCompletion.cpp
+++ b/src/VBox/VMM/testcase/tstPDMAsyncCompletion.cpp
@@ -9,7 +9,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -61,8 +61,8 @@ RTSEMEVENT              g_FinishedEventSem;
 
 static DECLCALLBACK(void) AsyncTaskCompleted(PVM pVM, void *pvUser, void *pvUser2, int rc)
 {
+    RT_NOREF4(pVM, pvUser, pvUser2, rc);
     LogFlow((TESTCASE ": %s: pVM=%p pvUser=%p pvUser2=%p\n", __FUNCTION__, pVM, pvUser, pvUser2));
-    NOREF(rc);
 
     uint32_t cTasksStillLeft = ASMAtomicDecU32(&g_cTasksLeft);
 
@@ -78,6 +78,7 @@ static DECLCALLBACK(void) AsyncTaskCompleted(PVM pVM, void *pvUser, void *pvUser
  */
 extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
 {
+    RT_NOREF1(envp);
     int rcRet = 0; /* error count */
     PPDMASYNCCOMPLETIONENDPOINT pEndpointSrc, pEndpointDst;
 
diff --git a/src/VBox/VMM/testcase/tstPDMAsyncCompletionStress.cpp b/src/VBox/VMM/testcase/tstPDMAsyncCompletionStress.cpp
index f90880a..f6988e4 100644
--- a/src/VBox/VMM/testcase/tstPDMAsyncCompletionStress.cpp
+++ b/src/VBox/VMM/testcase/tstPDMAsyncCompletionStress.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -131,7 +131,7 @@ typedef struct PDMACTESTFILE
     /** Size of a file segment. */
     size_t                     cbFileSegment;
     /** Maximum number of segments. */
-    unsigned                   cSegments;
+    size_t                     cSegments;
     /** Pointer to the array describing how the file is assembled
      * of the test pattern. Used for comparing read data to ensure
      * that no corruption occurred.
@@ -167,7 +167,7 @@ static void tstPDMACStressTestFileVerify(PPDMACTESTFILE pTestFile, PPDMACTESTFIL
     while (cbLeft)
     {
         size_t cbCompare;
-        unsigned iSeg = off / pTestFile->cbFileSegment;
+        size_t iSeg = off / pTestFile->cbFileSegment;
         PPDMACTESTFILESEG pSeg = &pTestFile->paSegs[iSeg];
         uint8_t *pbTestPattern;
         unsigned offSeg = off - pSeg->off;
@@ -207,7 +207,7 @@ static void tstPDMACStressTestFileFillBuffer(PPDMACTESTFILE pTestFile, PPDMACTES
     while (cbLeft)
     {
         size_t cbFill;
-        unsigned iSeg = off / pTestFile->cbFileSegment;
+        size_t iSeg = off / pTestFile->cbFileSegment;
         PPDMACTESTFILESEG pSeg = &pTestFile->paSegs[iSeg];
         uint8_t *pbTestPattern;
         unsigned offSeg = off - pSeg->off;
@@ -396,7 +396,7 @@ static DECLCALLBACK(void) tstPDMACStressTestFileTaskCompleted(PVM pVM, void *pvU
 
     if (pTestTask->fWrite)
     {
-        /* @todo Do something sensible here. */
+        /** @todo Do something sensible here. */
     }
     else
     {
@@ -574,6 +574,7 @@ static void tstPDMACStressTestPatternDestroy(void)
  */
 extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
 {
+    RT_NOREF1(envp);
     int rcRet = 0; /* error count */
 
     RTR3InitExe(argc, &argv, RTR3INIT_FLAGS_SUPLIB);
diff --git a/src/VBox/VMM/testcase/tstSSM-2.cpp b/src/VBox/VMM/testcase/tstSSM-2.cpp
index 33fbe2c..c810b53 100644
--- a/src/VBox/VMM/testcase/tstSSM-2.cpp
+++ b/src/VBox/VMM/testcase/tstSSM-2.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/testcase/tstSSM.cpp b/src/VBox/VMM/testcase/tstSSM.cpp
index 8b2095d..ff989ad 100644
--- a/src/VBox/VMM/testcase/tstSSM.cpp
+++ b/src/VBox/VMM/testcase/tstSSM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -702,6 +702,8 @@ static void destroyFakeVM(PVM pVM)
  */
 extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
 {
+    RT_NOREF1(envp);
+
     /*
      * Init runtime and static data.
      */
diff --git a/src/VBox/VMM/testcase/tstVMM-HM.cpp b/src/VBox/VMM/testcase/tstVMM-HM.cpp
index 50fe559..ec42ea3 100644
--- a/src/VBox/VMM/testcase/tstVMM-HM.cpp
+++ b/src/VBox/VMM/testcase/tstVMM-HM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -38,9 +38,10 @@
 VMMR3DECL(int) VMMDoHmTest(PVM pVM);
 
 
+#if 0
 static DECLCALLBACK(int) tstVmmHmConfigConstructor(PUVM pUVM, PVM pVM, void *pvUser)
 {
-    NOREF(pvUser);
+    RT_NOREF2(pUVM, pvUser);
 
     /*
      * Get root node first.
@@ -61,11 +62,10 @@ static DECLCALLBACK(int) tstVmmHmConfigConstructor(PUVM pUVM, PVM pVM, void *pvU
 
     return VINF_SUCCESS;
 }
+#endif
 
 int main(int argc, char **argv)
 {
-    int     rcRet = 0;                  /* error count. */
-
     RTR3InitExe(argc, &argv, RTR3INIT_FLAGS_SUPLIB);
 
     /*
@@ -75,8 +75,11 @@ int main(int argc, char **argv)
     RTPrintf(TESTCASE ": This testcase hits a bunch of breakpoint assertions which\n"
              TESTCASE ": causes kernel panics on linux regardless of what\n"
              TESTCASE ": RTAssertDoBreakpoint returns. Only checked AMD-V on linux.\n");
+#if 1
     /** @todo Make tstVMM-Hm to cause kernel panics. */
     return 1;
+#else
+    int     rcRet = 0;                  /* error count. */
 
     /*
      * Create empty VM.
@@ -114,4 +117,5 @@ int main(int argc, char **argv)
     }
 
     return rcRet;
+#endif
 }
diff --git a/src/VBox/VMM/testcase/tstVMM.cpp b/src/VBox/VMM/testcase/tstVMM.cpp
index a7284d7..1f16f75 100644
--- a/src/VBox/VMM/testcase/tstVMM.cpp
+++ b/src/VBox/VMM/testcase/tstVMM.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -154,7 +154,7 @@ tstVMMLdrEnum(PVM pVM, const char *pszFilename, const char *pszName, RTUINTPTR I
 static DECLCALLBACK(int)
 tstVMMConfigConstructor(PUVM pUVM, PVM pVM, void *pvUser)
 {
-    NOREF(pvUser);
+    RT_NOREF2(pUVM, pvUser);
     int rc = CFGMR3ConstructDefaultTree(pVM);
     if (RT_SUCCESS(rc))
     {
@@ -198,6 +198,8 @@ tstVMMConfigConstructor(PUVM pUVM, PVM pVM, void *pvUser)
  */
 extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
 {
+    RT_NOREF1(envp);
+
     /*
      * Init runtime and the test environment.
      */
@@ -259,7 +261,7 @@ extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
                 return 1;
 
             case 'V':
-                RTPrintf("$Revision: 108770 $\n");
+                RTPrintf("$Revision: 109362 $\n");
                 return 0;
 
             default:
diff --git a/src/VBox/VMM/testcase/tstVMMFork.cpp b/src/VBox/VMM/testcase/tstVMMFork.cpp
index 516c7b2..c384483 100644
--- a/src/VBox/VMM/testcase/tstVMMFork.cpp
+++ b/src/VBox/VMM/testcase/tstVMMFork.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/testcase/tstVMMR0CallHost-1.cpp b/src/VBox/VMM/testcase/tstVMMR0CallHost-1.cpp
index fa5b939..5a4c69a 100644
--- a/src/VBox/VMM/testcase/tstVMMR0CallHost-1.cpp
+++ b/src/VBox/VMM/testcase/tstVMMR0CallHost-1.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/testcase/tstVMREQ.cpp b/src/VBox/VMM/testcase/tstVMREQ.cpp
index 53a50ed..0eabc05 100644
--- a/src/VBox/VMM/testcase/tstVMREQ.cpp
+++ b/src/VBox/VMM/testcase/tstVMREQ.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -211,7 +211,7 @@ static DECLCALLBACK(int) Thread(RTTHREAD hThreadSelf, void *pvUser)
 static DECLCALLBACK(int)
 tstVMREQConfigConstructor(PUVM pUVM, PVM pVM, void *pvUser)
 {
-    NOREF(pvUser);
+    RT_NOREF2(pUVM, pvUser);
     return CFGMR3ConstructDefaultTree(pVM);
 }
 
@@ -220,6 +220,7 @@ tstVMREQConfigConstructor(PUVM pUVM, PVM pVM, void *pvUser)
  */
 extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
 {
+    RT_NOREF1(envp);
     RTR3InitExe(argc, &argv, RTR3INIT_FLAGS_SUPLIB);
     RTPrintf(TESTCASE ": TESTING...\n");
     RTStrmFlush(g_pStdOut);
diff --git a/src/VBox/VMM/testcase/tstX86-1.cpp b/src/VBox/VMM/testcase/tstX86-1.cpp
index 29b1f24..206907c 100644
--- a/src/VBox/VMM/testcase/tstX86-1.cpp
+++ b/src/VBox/VMM/testcase/tstX86-1.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@
 #include <iprt/x86.h>
 
 #ifdef RT_OS_WINDOWS
-# include <Windows.h>
+# include <iprt/win/windows.h>
 #else
 # ifdef RT_OS_DARWIN
 #  define _XOPEN_SOURCE
diff --git a/src/VBox/VMM/testcase/tstX86-1A.asm b/src/VBox/VMM/testcase/tstX86-1A.asm
index b14f898..8628d39 100644
--- a/src/VBox/VMM/testcase/tstX86-1A.asm
+++ b/src/VBox/VMM/testcase/tstX86-1A.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2011-2015 Oracle Corporation
+; Copyright (C) 2011-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/testcase/tstX86-FpuSaveRestore.cpp b/src/VBox/VMM/testcase/tstX86-FpuSaveRestore.cpp
index a4df7aa..4377686 100644
--- a/src/VBox/VMM/testcase/tstX86-FpuSaveRestore.cpp
+++ b/src/VBox/VMM/testcase/tstX86-FpuSaveRestore.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -35,10 +35,10 @@ int main()
 {
     RTTEST hTest;
     int rc = RTTestInitAndCreate("tstX86-FpuSaveRestore", &hTest);
+    if (RT_FAILURE(rc))
+        return RTEXITCODE_FAILURE;
     RTTestBanner(hTest);
 
-
-
     RTTestSub(hTest, "CS/DS Selector");
 
     RTTestIPrintf(RTTESTLVL_ALWAYS,  "Initial state (0x20 will be subtracted from IP):\n");
diff --git a/src/VBox/VMM/testcase/tstX86-FpuSaveRestoreA.asm b/src/VBox/VMM/testcase/tstX86-FpuSaveRestoreA.asm
index 2f50b09..bab424a 100644
--- a/src/VBox/VMM/testcase/tstX86-FpuSaveRestoreA.asm
+++ b/src/VBox/VMM/testcase/tstX86-FpuSaveRestoreA.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2013-2015 Oracle Corporation
+; Copyright (C) 2013-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/tools/Makefile.kmk b/src/VBox/VMM/tools/Makefile.kmk
index 5fb9f82..bd54622 100644
--- a/src/VBox/VMM/tools/Makefile.kmk
+++ b/src/VBox/VMM/tools/Makefile.kmk
@@ -5,7 +5,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/tools/VBoxCpuReport.cpp b/src/VBox/VMM/tools/VBoxCpuReport.cpp
index c8a3c7c..b3cc4c8 100644
--- a/src/VBox/VMM/tools/VBoxCpuReport.cpp
+++ b/src/VBox/VMM/tools/VBoxCpuReport.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -209,6 +209,7 @@ static bool vbCpuRepSupportsX2Apic(void)
 
 
 
+#if 0 /* unused */
 static bool msrProberWrite(uint32_t uMsr, uint64_t uValue)
 {
     bool fGp;
@@ -216,6 +217,7 @@ static bool msrProberWrite(uint32_t uMsr, uint64_t uValue)
     AssertRC(rc);
     return RT_SUCCESS(rc) && !fGp;
 }
+#endif
 
 
 static bool msrProberRead(uint32_t uMsr, uint64_t *puValue)
@@ -298,6 +300,7 @@ static int msrProberModifyBitChanges(uint32_t uMsr, uint64_t *pfIgnMask, uint64_
 }
 
 
+#if 0 /* currently unused */
 /**
  * Tries to modify one bit.
  *
@@ -338,6 +341,7 @@ static int msrProberModifyBit(uint32_t uMsr, unsigned iBit)
 
     return 0;
 }
+#endif
 
 
 /**
@@ -2617,6 +2621,7 @@ static bool isMsrViaDummy(uint32_t uMsr, uint64_t uValue, uint32_t fFlags)
  */
 static void adjustCanonicalIgnAndGpMasks(uint32_t uMsr, uint64_t *pfIgn, uint64_t *pfGp)
 {
+    RT_NOREF1(pfIgn);
     if (!vbCpuRepSupportsLongMode())
         return;
     switch (uMsr)
@@ -4653,7 +4658,7 @@ static int produceCpuReport(void)
                        " */\n"
                        "\n"
                        "/*\n"
-                       " * Copyright (C) 2013-2015 Oracle Corporation\n"
+                       " * Copyright (C) 2013-2016 Oracle Corporation\n"
                        " *\n"
                        " * This file is part of VirtualBox Open Source Edition (OSE), as\n"
                        " * available from http://www.virtualbox.org. This file is free software;\n"
diff --git a/src/VBox/VMM/tools/VBoxVMMPreload.cpp b/src/VBox/VMM/tools/VBoxVMMPreload.cpp
index 57942f1..73ef969 100644
--- a/src/VBox/VMM/tools/VBoxVMMPreload.cpp
+++ b/src/VBox/VMM/tools/VBoxVMMPreload.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -194,6 +194,7 @@ static RTEXITCODE LoadModules(void)
  */
 extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
 {
+    RT_NOREF1(envp);
     bool fExit = false;
     RTEXITCODE rcExit = ParseOptions(argc, argv, &fExit);
     if (rcExit == RTEXITCODE_SUCCESS && !fExit)
diff --git a/src/VBox/VMM/tools/VBoxVMMPreloadHardened.cpp b/src/VBox/VMM/tools/VBoxVMMPreloadHardened.cpp
index 635692e..0d71f51 100644
--- a/src/VBox/VMM/tools/VBoxVMMPreloadHardened.cpp
+++ b/src/VBox/VMM/tools/VBoxVMMPreloadHardened.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/Config.kmk b/src/VBox/ValidationKit/Config.kmk
index 003ab0a..f4008c5 100644
--- a/src/VBox/ValidationKit/Config.kmk
+++ b/src/VBox/ValidationKit/Config.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2010-2015 Oracle Corporation
+# Copyright (C) 2010-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/Makefile.kmk b/src/VBox/ValidationKit/Makefile.kmk
index 83ae57d..34b50bd 100644
--- a/src/VBox/ValidationKit/Makefile.kmk
+++ b/src/VBox/ValidationKit/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -209,7 +209,8 @@ ifdef VBOX_WITH_VALIDATIONKIT_PACKING.os2.x86
  	$(VBOX_PATH_VALIDATIONKIT.os2.x86)/libc062.dll \
  	$(VBOX_PATH_VALIDATIONKIT.os2.x86)/libc063.dll \
  	$(VBOX_PATH_VALIDATIONKIT.os2.x86)/libc064.dll \
- 	$(VBOX_PATH_VALIDATIONKIT.os2.x86)/libc065.dll
+ 	$(VBOX_PATH_VALIDATIONKIT.os2.x86)/libc065.dll \
+ 	$(VBOX_PATH_VALIDATIONKIT.os2.x86)/libc066.dll
 endif
 
 # OS specific files - Solaris
diff --git a/src/VBox/ValidationKit/ValidationKitCodingGuidelines.cpp b/src/VBox/ValidationKit/ValidationKitCodingGuidelines.cpp
index 17164e5..ee99c6b 100644
--- a/src/VBox/ValidationKit/ValidationKitCodingGuidelines.cpp
+++ b/src/VBox/ValidationKit/ValidationKitCodingGuidelines.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/Makefile.kmk b/src/VBox/ValidationKit/bootsectors/Makefile.kmk
index 7c5321b..2b1e434 100644
--- a/src/VBox/ValidationKit/bootsectors/Makefile.kmk
+++ b/src/VBox/ValidationKit/bootsectors/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -83,7 +83,7 @@ TEMPLATE_VBoxBsTestImg_INST    = $(INST_VALIDATIONKIT)bootsectors/
 TEMPLATE_VBoxBsTestImg_BINSUFF = .img
 TEMPLATE_VBoxBsTestImg_MODE    = 0644
 TEMPLATE_VBoxBsTestImg_ASTOOL  = YASM
-TEMPLATE_VBoxBsTestImg_ASFLAGS:= -f bin -P $(PATH_SUB_CURRENT)/bootsector2-first.mac $(VBOX_YASM_Wno-segreg-in-64bit) --mapfile
+TEMPLATE_VBoxBsTestImg_ASFLAGS = -f bin -P $(VBOX_PATH_BOOTSECTORS_SRC)/bootsector2-first.mac $(VBOX_YASM_Wno-segreg-in-64bit) --mapfile
 TEMPLATE_VBoxBsTestImg_ASDEFS  = ASM_FORMAT_BIN
 TEMPLATE_VBoxBsTestImg_INCS    = \
 	. \
@@ -291,6 +291,26 @@ bs3-cpu-decoding-1_SOURCES = \
 #	$$(bs3-cpu-decoding-1_0_OUTDIR)/bs3kit/bs3-cmn-instantiate.o64 \
 #	$$(bs3-cpu-decoding-1_0_OUTDIR)/bs3-cpu-decoding-1-asm.o16
 
+
+# CPU instructions #2 (first being bootsector2-cpu-instr-1).
+MISCBINS += bs3-cpu-instr-2
+bs3-cpu-instr-2_TEMPLATE = VBoxBS3KitImg
+bs3-cpu-instr-2_INCS  = .
+bs3-cpu-instr-2_DEFS  =  BS3_CMN_INSTANTIATE_FILE1=bs3-cpu-instr-2-template.c
+bs3-cpu-instr-2_DEFS += BS3_MODE_INSTANTIATE_FILE1=bs3-cpu-instr-2-template.c
+bs3-cpu-instr-2_SOURCES = \
+	bs3kit/bs3-first-rm.asm \
+	bs3-cpu-instr-2.c \
+	bs3-cpu-instr-2-asm.asm \
+       bs3kit/bs3-cmn-instantiate-x0.c16 \
+       bs3kit/bs3-cmn-instantiate.c32 \
+       bs3kit/bs3-cmn-instantiate.c64
+bs3-cpu-instr-2-template.o:: \
+	$$(bs3-cpu-instr-2_0_OUTDIR)/bs3kit/bs3-cmn-instantiate-x0.o16 \
+	$$(bs3-cpu-instr-2_0_OUTDIR)/bs3kit/bs3-cmn-instantiate.o32 \
+	$$(bs3-cpu-instr-2_0_OUTDIR)/bs3kit/bs3-cmn-instantiate.o64 \
+	$$(bs3-cpu-instr-2_0_OUTDIR)/bs3-cpu-instr-2-asm.o16
+
 endif # VBOX_WITH_BS3KIT
 
 
diff --git a/src/VBox/ValidationKit/bootsectors/VBoxBs2Linker.cpp b/src/VBox/ValidationKit/bootsectors/VBoxBs2Linker.cpp
index 9c0591e..9d5bcc7 100644
--- a/src/VBox/ValidationKit/bootsectors/VBoxBs2Linker.cpp
+++ b/src/VBox/ValidationKit/bootsectors/VBoxBs2Linker.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -100,7 +100,7 @@ int main(int argc, char **argv)
                     }
 
                     case 'V':
-                        printf("%s\n", "$Revision: 104490 $");
+                        printf("%s\n", "$Revision: 109040 $");
                         free(papszInputs);
                         return 0;
 
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector-empty.asm b/src/VBox/ValidationKit/bootsectors/bootsector-empty.asm
index 1bef0a0..1b7d035 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector-empty.asm
+++ b/src/VBox/ValidationKit/bootsectors/bootsector-empty.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2012-2015 Oracle Corporation
+; Copyright (C) 2012-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector-pae.asm b/src/VBox/ValidationKit/bootsectors/bootsector-pae.asm
index 29d94b4..d861aa9 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector-pae.asm
+++ b/src/VBox/ValidationKit/bootsectors/bootsector-pae.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector-shutdown.asm b/src/VBox/ValidationKit/bootsectors/bootsector-shutdown.asm
index ea9810b..37103dd 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector-shutdown.asm
+++ b/src/VBox/ValidationKit/bootsectors/bootsector-shutdown.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-api.mac b/src/VBox/ValidationKit/bootsectors/bootsector2-api.mac
index 7d3ee1a..9f7dd46 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-api.mac
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-api.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-boot-registers-1.asm b/src/VBox/ValidationKit/bootsectors/bootsector2-boot-registers-1.asm
index b315951..10aefbc 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-boot-registers-1.asm
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-boot-registers-1.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-common-end.mac b/src/VBox/ValidationKit/bootsectors/bootsector2-common-end.mac
index a22ef78..9aa0649 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-common-end.mac
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-common-end.mac
@@ -6,7 +6,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-common-init-code.mac b/src/VBox/ValidationKit/bootsectors/bootsector2-common-init-code.mac
index 82e2614..1617d37 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-common-init-code.mac
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-common-init-code.mac
@@ -40,7 +40,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-common-init-traps.mac b/src/VBox/ValidationKit/bootsectors/bootsector2-common-init-traps.mac
index 794b242..4c02f1e 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-common-init-traps.mac
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-common-init-traps.mac
@@ -7,7 +7,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-common-macros-1.mac b/src/VBox/ValidationKit/bootsectors/bootsector2-common-macros-1.mac
index 2d91db0..2053474 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-common-macros-1.mac
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-common-macros-1.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-common-routines-template-1.mac b/src/VBox/ValidationKit/bootsectors/bootsector2-common-routines-template-1.mac
index 0551d86..17f3640 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-common-routines-template-1.mac
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-common-routines-template-1.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-common-routines-template-2.mac b/src/VBox/ValidationKit/bootsectors/bootsector2-common-routines-template-2.mac
index 32900d0..0f05ff1 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-common-routines-template-2.mac
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-common-routines-template-2.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-common-routines.mac b/src/VBox/ValidationKit/bootsectors/bootsector2-common-routines.mac
index 2471822..77a4451 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-common-routines.mac
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-common-routines.mac
@@ -45,7 +45,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-common-traprec-template.mac b/src/VBox/ValidationKit/bootsectors/bootsector2-common-traprec-template.mac
index d561687..436e542 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-common-traprec-template.mac
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-common-traprec-template.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-common-traprec.mac b/src/VBox/ValidationKit/bootsectors/bootsector2-common-traprec.mac
index dcaf144..090ccf4 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-common-traprec.mac
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-common-traprec.mac
@@ -6,7 +6,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-a20-1-template.mac b/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-a20-1-template.mac
index 7c03d6e..e522a06 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-a20-1-template.mac
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-a20-1-template.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-a20-1.asm b/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-a20-1.asm
index eddafb6..a95b433 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-a20-1.asm
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-a20-1.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-ac-loop.asm b/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-ac-loop.asm
index 64d6ce9..b97d75b 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-ac-loop.asm
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-ac-loop.asm
@@ -7,7 +7,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-basic-1-template.mac b/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-basic-1-template.mac
index deeee30..d2bc82c 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-basic-1-template.mac
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-basic-1-template.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-basic-1.asm b/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-basic-1.asm
index 1ffc872..2e0c9f1 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-basic-1.asm
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-basic-1.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-db-loop.asm b/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-db-loop.asm
index f6e05a7..1a18564 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-db-loop.asm
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-db-loop.asm
@@ -7,7 +7,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-hidden-regs-1-template.mac b/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-hidden-regs-1-template.mac
index 7b57ef6..8c9a549 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-hidden-regs-1-template.mac
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-hidden-regs-1-template.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-hidden-regs-1.asm b/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-hidden-regs-1.asm
index b3045e3..b99ddb1 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-hidden-regs-1.asm
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-hidden-regs-1.asm
@@ -6,7 +6,7 @@
 ;   VBoxManage setextradata bs-cpu-hidden-regs-1 VBoxInternal/Devices/VMMDev/0/Config/TestingEnabled  1
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-instr-1-template.mac b/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-instr-1-template.mac
index 49d20e2..e9c28f6 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-instr-1-template.mac
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-instr-1-template.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-instr-1.asm b/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-instr-1.asm
index d2fc64a..b480000 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-instr-1.asm
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-instr-1.asm
@@ -7,7 +7,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-pf-1-template.mac b/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-pf-1-template.mac
index 94d7026..1c4e4f6 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-pf-1-template.mac
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-pf-1-template.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-pf-1.asm b/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-pf-1.asm
index 5569faf..eab4472 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-pf-1.asm
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-pf-1.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-xcpt-1-template.mac b/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-xcpt-1-template.mac
index e11ab73..06a99e2 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-xcpt-1-template.mac
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-xcpt-1-template.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-xcpt-1.asm b/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-xcpt-1.asm
index 95ffbef..ff25472 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-xcpt-1.asm
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-xcpt-1.asm
@@ -7,7 +7,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-xcpt-2-template.mac b/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-xcpt-2-template.mac
index a9d12f9..daa5339 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-xcpt-2-template.mac
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-xcpt-2-template.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-xcpt-2.asm b/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-xcpt-2.asm
index 1f15592..f84f2b2 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-xcpt-2.asm
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-xcpt-2.asm
@@ -7,7 +7,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-first.mac b/src/VBox/ValidationKit/bootsectors/bootsector2-first.mac
index b850851..c6523dc 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-first.mac
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-first.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-structures.mac b/src/VBox/ValidationKit/bootsectors/bootsector2-structures.mac
index 29c6288..fd99834 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-structures.mac
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-structures.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-template-footer.mac b/src/VBox/ValidationKit/bootsectors/bootsector2-template-footer.mac
index 54da9a0..2bc06c4 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-template-footer.mac
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-template-footer.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-template-header.mac b/src/VBox/ValidationKit/bootsectors/bootsector2-template-header.mac
index 7dcafd1..4a96e50 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-template-header.mac
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-template-header.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-test1-template.mac b/src/VBox/ValidationKit/bootsectors/bootsector2-test1-template.mac
index 7aef28d..b8cc487 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-test1-template.mac
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-test1-template.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-test1.asm b/src/VBox/ValidationKit/bootsectors/bootsector2-test1.asm
index a841540..d40fc6b 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-test1.asm
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-test1.asm
@@ -6,7 +6,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-triple-fault-1.asm b/src/VBox/ValidationKit/bootsectors/bootsector2-triple-fault-1.asm
index 31a7171..d4a9547 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-triple-fault-1.asm
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-triple-fault-1.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-vbinstst-64-1.asm b/src/VBox/ValidationKit/bootsectors/bootsector2-vbinstst-64-1.asm
index 62100ab..196aa19 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-vbinstst-64-1.asm
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-vbinstst-64-1.asm
@@ -5,7 +5,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-vbinstst-big-template.asm b/src/VBox/ValidationKit/bootsectors/bootsector2-vbinstst-big-template.asm
index 3e74fac..96b2066 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-vbinstst-big-template.asm
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-vbinstst-big-template.asm
@@ -6,7 +6,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bootsector2-vbinstst-kernel.asm b/src/VBox/ValidationKit/bootsectors/bootsector2-vbinstst-kernel.asm
index 4cb81da..fc30a18 100644
--- a/src/VBox/ValidationKit/bootsectors/bootsector2-vbinstst-kernel.asm
+++ b/src/VBox/ValidationKit/bootsectors/bootsector2-vbinstst-kernel.asm
@@ -5,7 +5,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3-cpu-decoding-1.c32 b/src/VBox/ValidationKit/bootsectors/bs3-cpu-decoding-1.c32
index 054a468..10e029a 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3-cpu-decoding-1.c32
+++ b/src/VBox/ValidationKit/bootsectors/bs3-cpu-decoding-1.c32
@@ -70,14 +70,14 @@ CPUDECODE1TST const g_aSimpleTests[] =
      *  fFlags, cbUd, cbOpcodes, abOpcodes
      */
 #if 1
-    /* Using currently undefined 0x0f 0x38 sequences. */
-    {        0,  2,   3,         { 0x0f, 0x38, RM_EAX_EAX, } },
-    {        0,  2+1, 3+1,       { P_LK, 0x0f, 0x38, RM_EAX_EAX, } },
-    {        0,  2+1, 3+1,       { P_RN, 0x0f, 0x38, RM_EAX_EAX, } },
-    {        0,  2+1, 3+1,       { P_RZ, 0x0f, 0x38, RM_EAX_EAX, } },
-    {        0,  2+2, 3+2, { P_LK, P_LK, 0x0f, 0x38, RM_EAX_EAX, } },
+    /* Using currently undefined 0x0f 0x7a sequences. */
+    {        0, 3,   3,               { 0x0f, 0x7a, RM_EAX_EAX, } },
+    {        0, 3+1, 3+1,       { P_LK, 0x0f, 0x7a, RM_EAX_EAX, } },
+    {        0, 3+1, 3+1,       { P_RN, 0x0f, 0x7a, RM_EAX_EAX, } },
+    {        0, 3+1, 3+1,       { P_RZ, 0x0f, 0x7a, RM_EAX_EAX, } },
+    {        0, 3+2, 3+2, { P_LK, P_LK, 0x0f, 0x7a, RM_EAX_EAX, } },
 #endif
-#if 1
+#if 0
     /* The XADD instruction has empty lines for 66, f3 and f2 prefixes.
        AMD doesn't do anything special for XADD Ev,Gv as the intel table would indicate. */
     {    F_486,   99,  3,             { 0x0f, 0xc1, RM_EAX_EAX, } },
@@ -89,7 +89,7 @@ CPUDECODE1TST const g_aSimpleTests[] =
     {    F_486,   99,  5, { P_OZ, P_RZ, 0x0f, 0xc1, RM_EAX_EAX, } },
     {    F_486,   99,  5, { P_RZ, P_OZ, 0x0f, 0xc1, RM_EAX_EAX, } },
 #endif
-#if 1
+#if 0
     /* The movnti instruction is confined to the unprefixed lined in the intel manuals. Check how the other lines work. */
     {   F_SSE2,    3,  3,             { 0x0f, 0xc3, RM_EAX_EAX, } },        /* invalid - reg,reg */
     {   F_SSE2,   99,  3,             { 0x0f, 0xc3, RM_EAX_DEREF_EBX, } },
@@ -99,6 +99,7 @@ CPUDECODE1TST const g_aSimpleTests[] =
     {   F_SSE2,    4,  4,       { P_LK, 0x0f, 0xc3, RM_EAX_DEREF_EBX, } },  /* invalid */
     {   F_SSE2,    5,  5, { P_RZ, P_LK, 0x0f, 0xc3, RM_EAX_DEREF_EBX, } },  /* invalid */
 #endif
+#if 1
     /* The lddqu instruction requires a 0xf2 prefix, intel only lists 0x66 and empty
        prefix for it.  Check what they really mean by that*/
     {   F_SSE3,    4,  4,            { P_RZ, 0x0f, 0xf0, RM_EAX_EAX, } },          /* invalid - reg, reg  */
@@ -116,6 +117,14 @@ CPUDECODE1TST const g_aSimpleTests[] =
     {   F_SSE3,    5,  5,      { P_LK, P_RZ, 0x0f, 0xf0, RM_EAX_DEREF_EBX, } },
     {   F_SSE3,   99,  5,      { P_OZ, P_RZ, 0x0f, 0xf0, RM_EAX_DEREF_EBX, } },
     {   F_SSE3,   99,  6,{ P_OZ, P_RN, P_RZ, 0x0f, 0xf0, RM_EAX_DEREF_EBX, } },
+#endif
+    {   F_SSE2,   99,  3,            { 0x0f, 0x7e, RM_EAX_EAX, } },
+    {   F_SSE2,   99,  4,      { P_OZ, 0x0f, 0x7e, RM_EAX_EAX, } },
+    {   F_SSE2,    5,  5,{ P_RZ, P_OZ, 0x0f, 0x7e, RM_EAX_EAX, } }, // WTF?
+    {   F_SSE2,    5,  5,{ P_OZ, P_RZ, 0x0f, 0x7e, RM_EAX_EAX, } },
+    {   F_SSE2,   99,  5,{ P_RN, P_OZ, 0x0f, 0x7e, RM_EAX_EAX, } },
+    {   F_SSE2,   99,  4,      { P_RN, 0x0f, 0x7e, RM_EAX_EAX, } },
+    {   F_SSE2,    4,  4,      { P_RZ, 0x0f, 0x7e, RM_EAX_EAX, } },
 /** @todo crc32 / movbe  */
 };
 
@@ -146,6 +155,7 @@ void DecodeEdgeTest(void)
             unsigned cb = g_aSimpleTests[i].cbOpcodes;
             while (cb >= 1)
             {
+                unsigned const   cErrorsBefore = Bs3TestSubErrorCount();
                 uint8_t BS3_FAR *pbRip = &pbPages[X86_PAGE_SIZE - cb];
                 Bs3MemCpy(pbRip, &g_aSimpleTests[i].abOpcodes[0], cb);
                 Bs3RegCtxSetRipCsFromFlat(&Ctx, (uintptr_t)pbRip);
@@ -157,29 +167,41 @@ void DecodeEdgeTest(void)
                 if (cb >= g_aSimpleTests[i].cbUd)
                 {
                     if (TrapFrame.bXcpt != X86_XCPT_UD)
-                        Bs3TestFailedF("i=%d cb=%d cbUd=%d cb=%d: expected #UD got %#x\n",
-                                       i, cb, g_aSimpleTests[i].cbUd, g_aSimpleTests[i].cbOpcodes, TrapFrame.bXcpt);
+                        Bs3TestFailedF("i=%d cb=%d cbUd=%d cbOp=%d: expected #UD got %#x at %RX32\n",
+                                       i, cb, g_aSimpleTests[i].cbUd, g_aSimpleTests[i].cbOpcodes,
+                                       TrapFrame.bXcpt, TrapFrame.Ctx.rip.u32);
                 }
                 else if (cb < g_aSimpleTests[i].cbOpcodes)
                 {
                     if (TrapFrame.bXcpt != X86_XCPT_PF)
-                        Bs3TestFailedF("i=%d cb=%d cbUd=%d cb=%d: expected #PF (on) got %#x\n",
-                                       i, cb, g_aSimpleTests[i].cbUd, g_aSimpleTests[i].cbOpcodes, TrapFrame.bXcpt);
+                        Bs3TestFailedF("i=%d cb=%d cbUd=%d cbOp=%d: expected #PF (on) got %#x at %RX32\n",
+                                       i, cb, g_aSimpleTests[i].cbUd, g_aSimpleTests[i].cbOpcodes,
+                                       TrapFrame.bXcpt, TrapFrame.Ctx.rip.u32);
                     else if (TrapFrame.Ctx.rip.u32 != (uintptr_t)pbRip)
-                        Bs3TestFailedF("i=%d cb=%d cbUd=%d cb=%d: expected #PF rip of %p (on) got %#RX32\n",
+                        Bs3TestFailedF("i=%d cb=%d cbUd=%d cbOp=%d: expected #PF rip of %p (on) got %#RX32\n",
                                        i, cb, g_aSimpleTests[i].cbUd, g_aSimpleTests[i].cbOpcodes,
                                        pbRip, TrapFrame.Ctx.rip.u32);
                 }
                 else
                 {
                     if (TrapFrame.bXcpt != X86_XCPT_PF)
-                        Bs3TestFailedF("i=%d cb=%d cbUd=%d cb=%d: expected #PF (after) got %#x\n",
-                                       i, cb, g_aSimpleTests[i].cbUd, g_aSimpleTests[i].cbOpcodes, TrapFrame.bXcpt);
+                        Bs3TestFailedF("i=%d cb=%d cbUd=%d cbOp=%d: expected #PF (after) got %#x at %RX32\n",
+                                       i, cb, g_aSimpleTests[i].cbUd, g_aSimpleTests[i].cbOpcodes,
+                                       TrapFrame.bXcpt, TrapFrame.Ctx.rip.u32);
                     else if (TrapFrame.Ctx.rip.u32 != (uintptr_t)&pbPages[X86_PAGE_SIZE])
-                        Bs3TestFailedF("i=%d cb=%d cbUd=%d cb=%d: expected #PF rip of %p (after) got %#RX32\n",
+                        Bs3TestFailedF("i=%d cb=%d cbUd=%d cbOp=%d: expected #PF rip of %p (after) got %#RX32\n",
                                        i, cb, g_aSimpleTests[i].cbUd, g_aSimpleTests[i].cbOpcodes,
                                        &pbPages[X86_PAGE_SIZE], TrapFrame.Ctx.rip.u32);
                 }
+                if (Bs3TestSubErrorCount() != cErrorsBefore)
+                {
+                    Bs3TestPrintf("  %.*Rhxs", cb, &g_aSimpleTests[i].abOpcodes[0]);
+                    if (cb < g_aSimpleTests[i].cbOpcodes)
+                        Bs3TestPrintf("[%.*Rhxs]", g_aSimpleTests[i].cbOpcodes - cb, &g_aSimpleTests[i].abOpcodes[cb]);
+                    Bs3TestPrintf("\n");
+                }
+
+                /* next */
                 cb--;
             }
         }
diff --git a/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-2-asm.asm b/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-2-asm.asm
new file mode 100644
index 0000000..1170c34
--- /dev/null
+++ b/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-2-asm.asm
@@ -0,0 +1,63 @@
+; $Id: bs3-cpu-instr-2-asm.asm $
+;; @file
+; BS3Kit - bs3-cpu-instr-2
+;
+
+;
+; Copyright (C) 2007-2016 Oracle Corporation
+;
+; This file is part of VirtualBox Open Source Edition (OSE), as
+; available from http://www.virtualbox.org. This file is free software;
+; you can redistribute it and/or modify it under the terms of the GNU
+; General Public License (GPL) as published by the Free Software
+; Foundation, in version 2 as it comes in the "COPYING" file of the
+; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+;
+; The contents of this file may alternatively be used under the terms
+; of the Common Development and Distribution License Version 1.0
+; (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+; VirtualBox OSE distribution, in which case the provisions of the
+; CDDL are applicable instead of those of the GPL.
+;
+; You may elect to license modified versions of this file under the
+; terms and conditions of either the GPL or the CDDL or both.
+;
+
+
+;*********************************************************************************************************************************
+;*  Header Files                                                                                                                 *
+;*********************************************************************************************************************************
+%include "bs3kit.mac"
+
+
+;*********************************************************************************************************************************
+;*      Global Variables                                                                                                         *
+;*********************************************************************************************************************************
+;BS3_BEGIN_DATA16
+;BS3_GLOBAL_DATA g_bs3CpuBasic2_ud2_FlatAddr, 4
+;        dd  _bs3CpuBasic2_ud2 wrt FLAT
+
+
+
+;
+; CPU mode agnostic test code snippets.
+;
+BS3_BEGIN_TEXT16
+
+BS3_PROC_BEGIN _bs3CpuInstr2_imul_bl_ud2
+        imul    bl
+.again:
+        ud2
+        jmp     .again
+BS3_PROC_END   _bs3CpuInstr2_imul_bl_ud2
+
+
+
+;
+; Instantiate code templates.
+;
+BS3_INSTANTIATE_COMMON_TEMPLATE          "bs3-cpu-instr-2-template.mac"
+BS3_INSTANTIATE_TEMPLATE_WITH_WEIRD_ONES "bs3-cpu-instr-2-template.mac"
+
+
diff --git a/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-2-template.c b/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-2-template.c
new file mode 100644
index 0000000..78da70c
--- /dev/null
+++ b/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-2-template.c
@@ -0,0 +1,552 @@
+/* $Id: bs3-cpu-instr-2-template.c $ */
+/** @file
+ * BS3Kit - bs3-cpu-instr-2, C code template.
+ */
+
+/*
+ * Copyright (C) 2007-2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#include <iprt/asm.h>
+#include <iprt/asm-amd64-x86.h>
+
+
+
+
+/*********************************************************************************************************************************
+*   Structures and Typedefs                                                                                                      *
+*********************************************************************************************************************************/
+#ifdef BS3_INSTANTIATING_CMN
+#endif
+
+
+/*********************************************************************************************************************************
+*   External Symbols                                                                                                             *
+*********************************************************************************************************************************/
+#ifdef BS3_INSTANTIATING_CMN
+extern FNBS3FAR     BS3_CMN_NM(bs3CpuInstr2_mul_xBX_ud2);
+extern FNBS3FAR     BS3_CMN_NM(bs3CpuInstr2_imul_xBX_ud2);
+extern FNBS3FAR     BS3_CMN_NM(bs3CpuInstr2_imul_xCX_xBX_ud2);
+extern FNBS3FAR     BS3_CMN_NM(bs3CpuInstr2_div_xBX_ud2);
+extern FNBS3FAR     BS3_CMN_NM(bs3CpuInstr2_idiv_xBX_ud2);
+#endif
+
+
+/*********************************************************************************************************************************
+*   Global Variables                                                                                                             *
+*********************************************************************************************************************************/
+#ifdef BS3_INSTANTIATING_CMN
+
+#endif /* BS3_INSTANTIATING_CMN - global */
+
+
+/*
+ * Common code.
+ * Common code.
+ * Common code.
+ */
+#ifdef BS3_INSTANTIATING_CMN
+
+BS3_DECL_FAR(uint8_t) BS3_CMN_NM(bs3CpuInstr2_mul)(uint8_t bMode)
+{
+#define MUL_CHECK_EFLAGS_ZERO  (uint16_t)(X86_EFL_AF | X86_EFL_ZF)
+#define MUL_CHECK_EFLAGS       (uint16_t)(X86_EFL_CF | X86_EFL_OF | X86_EFL_SF | X86_EFL_PF)
+
+    static const struct
+    {
+        RTCCUINTREG uInAX;
+        RTCCUINTREG uInBX;
+        RTCCUINTREG uOutDX;
+        RTCCUINTREG uOutAX;
+        uint16_t    fFlags;
+    } s_aTests[] =
+    {
+        {   1,      1,
+            0,      1,      0 },
+        {   2,      2,
+            0,      4,      0 },
+        {   RTCCUINTREG_MAX, RTCCUINTREG_MAX,
+            RTCCUINTREG_MAX-1,  1,                  X86_EFL_CF | X86_EFL_OF },
+        {   RTCCINTREG_MAX,  RTCCINTREG_MAX,
+            RTCCINTREG_MAX / 2, 1,                  X86_EFL_CF | X86_EFL_OF },
+        {   1, RTCCUINTREG_MAX,
+            0, RTCCUINTREG_MAX,                     X86_EFL_PF | X86_EFL_SF },
+        {   1, RTCCINTREG_MAX,
+            0, RTCCINTREG_MAX,                      X86_EFL_PF },
+        {   2, RTCCINTREG_MAX,
+            0, RTCCUINTREG_MAX - 1,                 X86_EFL_SF },
+        {   RTCCINTREG_MAX + 1, 2,
+            1, 0,                                   X86_EFL_PF | X86_EFL_CF | X86_EFL_OF },
+        {   RTCCINTREG_MAX / 2 + 1, 3,
+            0, (RTCCINTREG_MAX / 2 + 1) * 3,        X86_EFL_PF | X86_EFL_SF },
+    };
+
+    BS3REGCTX       Ctx;
+    BS3TRAPFRAME    TrapFrame;
+    unsigned        i, j, k;
+
+    /* Ensure the structures are allocated before we sample the stack pointer. */
+    Bs3MemSet(&Ctx, 0, sizeof(Ctx));
+    Bs3MemSet(&TrapFrame, 0, sizeof(TrapFrame));
+
+    /*
+     * Create test context.
+     */
+    Bs3RegCtxSaveEx(&Ctx, bMode, 512);
+    Bs3RegCtxSetRipCsFromCurPtr(&Ctx, BS3_CMN_NM(bs3CpuInstr2_mul_xBX_ud2));
+    for (k = 0; k < 2; k++)
+    {
+        Ctx.rflags.u16 |= MUL_CHECK_EFLAGS | MUL_CHECK_EFLAGS_ZERO;
+        for (j = 0; j < 2; j++)
+        {
+            for (i = 0; i < RT_ELEMENTS(s_aTests); i++)
+            {
+                if (k == 0)
+                {
+                    Ctx.rax.RT_CONCAT(u,ARCH_BITS) = s_aTests[i].uInAX;
+                    Ctx.rbx.RT_CONCAT(u,ARCH_BITS) = s_aTests[i].uInBX;
+                }
+                else
+                {
+                    Ctx.rax.RT_CONCAT(u,ARCH_BITS) = s_aTests[i].uInBX;
+                    Ctx.rbx.RT_CONCAT(u,ARCH_BITS) = s_aTests[i].uInAX;
+                }
+                Bs3TrapSetJmpAndRestore(&Ctx, &TrapFrame);
+                if (TrapFrame.bXcpt != X86_XCPT_UD)
+                    Bs3TestFailedF("Expected #UD got %#x", TrapFrame.bXcpt);
+                else if (   TrapFrame.Ctx.rax.RT_CONCAT(u,ARCH_BITS) != s_aTests[i].uOutAX
+                         || TrapFrame.Ctx.rdx.RT_CONCAT(u,ARCH_BITS) != s_aTests[i].uOutDX
+                         ||    (TrapFrame.Ctx.rflags.u16 & (MUL_CHECK_EFLAGS | MUL_CHECK_EFLAGS_ZERO))
+                            != (s_aTests[i].fFlags & MUL_CHECK_EFLAGS) )
+                {
+                    Bs3TestFailedF("test #%i failed: input %#" RTCCUINTREG_XFMT " * %#" RTCCUINTREG_XFMT,
+                                   i, s_aTests[i].uInAX, s_aTests[i].uInBX);
+
+                    if (TrapFrame.Ctx.rax.RT_CONCAT(u,ARCH_BITS) != s_aTests[i].uOutAX)
+                        Bs3TestFailedF("Expected xAX = %#RX" RT_XSTR(ARCH_BITS) " got %#RX" RT_XSTR(ARCH_BITS),
+                                       s_aTests[i].uOutAX, TrapFrame.Ctx.rax.RT_CONCAT(u,ARCH_BITS));
+                    if (TrapFrame.Ctx.rdx.RT_CONCAT(u,ARCH_BITS) != s_aTests[i].uOutDX)
+                        Bs3TestFailedF("Expected xDX = %#RX" RT_XSTR(ARCH_BITS) " got %#RX" RT_XSTR(ARCH_BITS),
+                                       s_aTests[i].uOutDX, TrapFrame.Ctx.rdx.RT_CONCAT(u,ARCH_BITS));
+                    if (   (TrapFrame.Ctx.rflags.u16 & (MUL_CHECK_EFLAGS | MUL_CHECK_EFLAGS_ZERO))
+                        != (s_aTests[i].fFlags & MUL_CHECK_EFLAGS) )
+                        Bs3TestFailedF("Expected EFLAGS = %#06RX16, got %#06RX16", s_aTests[i].fFlags & MUL_CHECK_EFLAGS,
+                                       TrapFrame.Ctx.rflags.u16 & (MUL_CHECK_EFLAGS | MUL_CHECK_EFLAGS_ZERO));
+                }
+            }
+            Ctx.rflags.u16 &= ~(MUL_CHECK_EFLAGS | MUL_CHECK_EFLAGS_ZERO);
+        }
+    }
+
+    return 0;
+}
+
+
+BS3_DECL_FAR(uint8_t) BS3_CMN_NM(bs3CpuInstr2_imul)(uint8_t bMode)
+{
+#define IMUL_CHECK_EFLAGS_ZERO  (uint16_t)(X86_EFL_AF | X86_EFL_ZF)
+#define IMUL_CHECK_EFLAGS       (uint16_t)(X86_EFL_CF | X86_EFL_OF | X86_EFL_SF | X86_EFL_PF)
+    static const struct
+    {
+        RTCCUINTREG uInAX;
+        RTCCUINTREG uInBX;
+        RTCCUINTREG uOutDX;
+        RTCCUINTREG uOutAX;
+        uint16_t    fFlags;
+    } s_aTests[] =
+    {
+        /* two positive values. */
+        {   1,      1,
+            0,      1,      0 },
+        {   2,      2,
+            0,      4,      0 },
+        {   RTCCINTREG_MAX, RTCCINTREG_MAX,
+            RTCCINTREG_MAX/2, 1,                    X86_EFL_CF | X86_EFL_OF },
+        {   1, RTCCINTREG_MAX,
+            0, RTCCINTREG_MAX,                      X86_EFL_PF },
+        {   2, RTCCINTREG_MAX,
+            0, RTCCUINTREG_MAX - 1U,                X86_EFL_CF | X86_EFL_OF | X86_EFL_SF },
+        {   2, RTCCINTREG_MAX / 2,
+            0, RTCCINTREG_MAX - 1U,                 0 },
+        {   2, (RTCCINTREG_MAX / 2 + 1),
+            0, RTCCINTREG_MAX + 1U,                 X86_EFL_CF | X86_EFL_OF | X86_EFL_SF | X86_EFL_PF },
+        {   4, (RTCCINTREG_MAX / 2 + 1),
+            1, 0,                                   X86_EFL_CF | X86_EFL_OF | X86_EFL_PF },
+
+        /* negative and positive */
+        {   -4,     3,
+            -1,     -12,                            X86_EFL_SF },
+        {   32,     -127,
+            -1,     -4064,                          X86_EFL_SF },
+        {   RTCCINTREG_MIN, 1,
+            -1, RTCCINTREG_MIN,                     X86_EFL_SF | X86_EFL_PF },
+        {   RTCCINTREG_MIN, 2,
+            -1,     0,                              X86_EFL_CF | X86_EFL_OF | X86_EFL_PF },
+        {   RTCCINTREG_MIN, 3,
+            -2,     RTCCINTREG_MIN,                 X86_EFL_CF | X86_EFL_OF | X86_EFL_SF | X86_EFL_PF },
+        {   RTCCINTREG_MIN, 4,
+            -2,     0,                              X86_EFL_CF | X86_EFL_OF | X86_EFL_PF },
+        {   RTCCINTREG_MIN, RTCCINTREG_MAX,
+            RTCCINTREG_MIN / 2, RTCCINTREG_MIN,     X86_EFL_CF | X86_EFL_OF | X86_EFL_SF | X86_EFL_PF },
+        {   RTCCINTREG_MIN, RTCCINTREG_MAX - 1,
+            RTCCINTREG_MIN / 2 + 1, 0,              X86_EFL_CF | X86_EFL_OF | X86_EFL_PF },
+
+        /* two negative values. */
+        {   -4,     -63,
+            0,      252,                            X86_EFL_PF },
+        {   RTCCINTREG_MIN, RTCCINTREG_MIN,
+            RTCCUINTREG_MAX / 4 + 1, 0,             X86_EFL_CF | X86_EFL_OF | X86_EFL_PF },
+        {   RTCCINTREG_MIN, RTCCINTREG_MIN + 1,
+            RTCCUINTREG_MAX / 4, RTCCINTREG_MIN,    X86_EFL_CF | X86_EFL_OF | X86_EFL_SF | X86_EFL_PF},
+        {   RTCCINTREG_MIN + 1, RTCCINTREG_MIN + 1,
+            RTCCUINTREG_MAX / 4, 1,                 X86_EFL_CF | X86_EFL_OF },
+
+    };
+
+    BS3REGCTX       Ctx;
+    BS3TRAPFRAME    TrapFrame;
+    unsigned        i, j, k;
+
+    /* Ensure the structures are allocated before we sample the stack pointer. */
+    Bs3MemSet(&Ctx, 0, sizeof(Ctx));
+    Bs3MemSet(&TrapFrame, 0, sizeof(TrapFrame));
+
+    /*
+     * Create test context.
+     */
+    Bs3RegCtxSaveEx(&Ctx, bMode, 512);
+    Bs3RegCtxSetRipCsFromCurPtr(&Ctx, BS3_CMN_NM(bs3CpuInstr2_imul_xBX_ud2));
+
+    for (k = 0; k < 2; k++)
+    {
+        Ctx.rflags.u16 |= MUL_CHECK_EFLAGS | MUL_CHECK_EFLAGS_ZERO;
+        for (j = 0; j < 2; j++)
+        {
+            for (i = 0; i < RT_ELEMENTS(s_aTests); i++)
+            {
+                if (k == 0)
+                {
+                    Ctx.rax.RT_CONCAT(u,ARCH_BITS) = s_aTests[i].uInAX;
+                    Ctx.rbx.RT_CONCAT(u,ARCH_BITS) = s_aTests[i].uInBX;
+                }
+                else
+                {
+                    Ctx.rax.RT_CONCAT(u,ARCH_BITS) = s_aTests[i].uInBX;
+                    Ctx.rbx.RT_CONCAT(u,ARCH_BITS) = s_aTests[i].uInAX;
+                }
+                Bs3TrapSetJmpAndRestore(&Ctx, &TrapFrame);
+                if (TrapFrame.bXcpt != X86_XCPT_UD)
+                    Bs3TestFailedF("Expected #UD got %#x", TrapFrame.bXcpt);
+                else if (   TrapFrame.Ctx.rax.RT_CONCAT(u,ARCH_BITS) != s_aTests[i].uOutAX
+                         || TrapFrame.Ctx.rdx.RT_CONCAT(u,ARCH_BITS) != s_aTests[i].uOutDX
+                         ||    (TrapFrame.Ctx.rflags.u16 & (IMUL_CHECK_EFLAGS | IMUL_CHECK_EFLAGS_ZERO))
+                            != (s_aTests[i].fFlags & IMUL_CHECK_EFLAGS) )
+                {
+                    Bs3TestFailedF("test #%i failed: input %#" RTCCUINTREG_XFMT " * %#" RTCCUINTREG_XFMT,
+                                   i, s_aTests[i].uInAX, s_aTests[i].uInBX);
+
+                    if (TrapFrame.Ctx.rax.RT_CONCAT(u,ARCH_BITS) != s_aTests[i].uOutAX)
+                        Bs3TestFailedF("Expected xAX = %#RX" RT_XSTR(ARCH_BITS) " got %#RX" RT_XSTR(ARCH_BITS),
+                                       s_aTests[i].uOutAX, TrapFrame.Ctx.rax.RT_CONCAT(u,ARCH_BITS));
+                    if (TrapFrame.Ctx.rdx.RT_CONCAT(u,ARCH_BITS) != s_aTests[i].uOutDX)
+                        Bs3TestFailedF("Expected xDX = %#RX" RT_XSTR(ARCH_BITS) " got %#RX" RT_XSTR(ARCH_BITS),
+                                       s_aTests[i].uOutDX, TrapFrame.Ctx.rdx.RT_CONCAT(u,ARCH_BITS));
+                    if (   (TrapFrame.Ctx.rflags.u16 & (IMUL_CHECK_EFLAGS | IMUL_CHECK_EFLAGS_ZERO))
+                        != (s_aTests[i].fFlags & IMUL_CHECK_EFLAGS) )
+                        Bs3TestFailedF("Expected EFLAGS = %#06RX16, got %#06RX16", s_aTests[i].fFlags & IMUL_CHECK_EFLAGS,
+                                       TrapFrame.Ctx.rflags.u16 & (IMUL_CHECK_EFLAGS | IMUL_CHECK_EFLAGS_ZERO));
+                }
+            }
+        }
+    }
+
+    /*
+     * Repeat for the truncating two operand version.
+     */
+    Bs3RegCtxSetRipCsFromCurPtr(&Ctx, BS3_CMN_NM(bs3CpuInstr2_imul_xCX_xBX_ud2));
+
+    for (k = 0; k < 2; k++)
+    {
+        Ctx.rflags.u16 |= MUL_CHECK_EFLAGS | MUL_CHECK_EFLAGS_ZERO;
+        for (j = 0; j < 2; j++)
+        {
+            for (i = 0; i < RT_ELEMENTS(s_aTests); i++)
+            {
+                if (k == 0)
+                {
+                    Ctx.rcx.RT_CONCAT(u,ARCH_BITS) = s_aTests[i].uInAX;
+                    Ctx.rbx.RT_CONCAT(u,ARCH_BITS) = s_aTests[i].uInBX;
+                }
+                else
+                {
+                    Ctx.rcx.RT_CONCAT(u,ARCH_BITS) = s_aTests[i].uInBX;
+                    Ctx.rbx.RT_CONCAT(u,ARCH_BITS) = s_aTests[i].uInAX;
+                }
+                Bs3TrapSetJmpAndRestore(&Ctx, &TrapFrame);
+                if (TrapFrame.bXcpt != X86_XCPT_UD)
+                    Bs3TestFailedF("Expected #UD got %#x", TrapFrame.bXcpt);
+                else if (   TrapFrame.Ctx.rcx.RT_CONCAT(u,ARCH_BITS) != s_aTests[i].uOutAX
+                         || TrapFrame.Ctx.rdx.u != Ctx.rdx.u
+                         || TrapFrame.Ctx.rbx.u != Ctx.rbx.u
+                         ||    (TrapFrame.Ctx.rflags.u16 & (IMUL_CHECK_EFLAGS | IMUL_CHECK_EFLAGS_ZERO))
+                            != (s_aTests[i].fFlags & IMUL_CHECK_EFLAGS) )
+                {
+                    Bs3TestFailedF("test #%i failed: input %#" RTCCUINTREG_XFMT " * %#" RTCCUINTREG_XFMT,
+                                   i, s_aTests[i].uInAX, s_aTests[i].uInBX);
+
+                    if (TrapFrame.Ctx.rcx.RT_CONCAT(u,ARCH_BITS) != s_aTests[i].uOutAX)
+                        Bs3TestFailedF("Expected xAX = %#RX" RT_XSTR(ARCH_BITS) " got %#RX" RT_XSTR(ARCH_BITS),
+                                       s_aTests[i].uOutAX, TrapFrame.Ctx.rcx.RT_CONCAT(u,ARCH_BITS));
+                    if (   (TrapFrame.Ctx.rflags.u16 & (IMUL_CHECK_EFLAGS | IMUL_CHECK_EFLAGS_ZERO))
+                        != (s_aTests[i].fFlags & IMUL_CHECK_EFLAGS) )
+                        Bs3TestFailedF("Expected EFLAGS = %#06RX16, got %#06RX16", s_aTests[i].fFlags & IMUL_CHECK_EFLAGS,
+                                       TrapFrame.Ctx.rflags.u16 & (IMUL_CHECK_EFLAGS | IMUL_CHECK_EFLAGS_ZERO));
+                }
+            }
+        }
+    }
+
+    return 0;
+}
+
+
+BS3_DECL_FAR(uint8_t) BS3_CMN_NM(bs3CpuInstr2_div)(uint8_t bMode)
+{
+#define DIV_CHECK_EFLAGS (uint16_t)(X86_EFL_CF | X86_EFL_OF | X86_EFL_SF | X86_EFL_ZF | X86_EFL_AF | X86_EFL_PF)
+    static const struct
+    {
+        RTCCUINTREG uInDX;
+        RTCCUINTREG uInAX;
+        RTCCUINTREG uInBX;
+        RTCCUINTREG uOutAX;
+        RTCCUINTREG uOutDX;
+        uint8_t     bXcpt;
+    } s_aTests[] =
+    {
+        {   0,    1,                            1,
+            1,    0,                                                    X86_XCPT_UD },
+        {   0,    5,                            2,
+            2,    1,                                                    X86_XCPT_UD },
+        {   0,    0,                            0,
+            0,    0,                                                    X86_XCPT_DE },
+        { RTCCUINTREG_MAX, RTCCUINTREG_MAX,     0,
+            0,    0,                                                    X86_XCPT_DE },
+        { RTCCUINTREG_MAX, RTCCUINTREG_MAX,     1,
+            0,    0,                                                    X86_XCPT_DE },
+        { RTCCUINTREG_MAX, RTCCUINTREG_MAX,     RTCCUINTREG_MAX,
+            0,    0,                                                    X86_XCPT_DE },
+        { RTCCUINTREG_MAX - 1, RTCCUINTREG_MAX, RTCCUINTREG_MAX,
+            RTCCUINTREG_MAX, RTCCUINTREG_MAX - 1,                       X86_XCPT_UD },
+    };
+
+    BS3REGCTX       Ctx;
+    BS3TRAPFRAME    TrapFrame;
+    unsigned        i, j;
+
+    /* Ensure the structures are allocated before we sample the stack pointer. */
+    Bs3MemSet(&Ctx, 0, sizeof(Ctx));
+    Bs3MemSet(&TrapFrame, 0, sizeof(TrapFrame));
+
+    /*
+     * Create test context.
+     */
+    Bs3RegCtxSaveEx(&Ctx, bMode, 512);
+    Bs3RegCtxSetRipCsFromCurPtr(&Ctx, BS3_CMN_NM(bs3CpuInstr2_div_xBX_ud2));
+
+    /*
+     * Do the tests twice, first with all flags set, then once again with
+     * flags cleared.  The flags are not touched by my intel skylake CPU.
+     */
+    Ctx.rflags.u16 |= DIV_CHECK_EFLAGS;
+    for (j = 0; j < 2; j++)
+    {
+        for (i = 0; i < RT_ELEMENTS(s_aTests); i++)
+        {
+            Ctx.rax.RT_CONCAT(u,ARCH_BITS) = s_aTests[i].uInAX;
+            Ctx.rdx.RT_CONCAT(u,ARCH_BITS) = s_aTests[i].uInDX;
+            Ctx.rbx.RT_CONCAT(u,ARCH_BITS) = s_aTests[i].uInBX;
+            Bs3TrapSetJmpAndRestore(&Ctx, &TrapFrame);
+
+            if (   TrapFrame.bXcpt                          != s_aTests[i].bXcpt
+                || (   s_aTests[i].bXcpt == X86_XCPT_UD
+                    ?    TrapFrame.Ctx.rax.RT_CONCAT(u,ARCH_BITS) != s_aTests[i].uOutAX
+                      || TrapFrame.Ctx.rdx.RT_CONCAT(u,ARCH_BITS) != s_aTests[i].uOutDX
+                      || (TrapFrame.Ctx.rflags.u16 & DIV_CHECK_EFLAGS) != (Ctx.rflags.u16 & DIV_CHECK_EFLAGS)
+                    :    TrapFrame.Ctx.rax.u != Ctx.rax.u
+                      || TrapFrame.Ctx.rdx.u != Ctx.rdx.u
+                      || (TrapFrame.Ctx.rflags.u16 & DIV_CHECK_EFLAGS) != (Ctx.rflags.u16 & DIV_CHECK_EFLAGS) ) )
+            {
+                Bs3TestFailedF("test #%i failed: input %#" RTCCUINTREG_XFMT ":%" RTCCUINTREG_XFMT " / %#" RTCCUINTREG_XFMT,
+                               i, s_aTests[i].uInDX, s_aTests[i].uInAX, s_aTests[i].uInBX);
+                if (TrapFrame.bXcpt != s_aTests[i].bXcpt)
+                    Bs3TestFailedF("Expected bXcpt = %#x, got %#x", s_aTests[i].bXcpt, TrapFrame.bXcpt);
+                if (s_aTests[i].bXcpt == X86_XCPT_UD)
+                {
+                    if (TrapFrame.Ctx.rax.RT_CONCAT(u, ARCH_BITS) != s_aTests[i].uOutAX)
+                        Bs3TestFailedF("Expected xAX = %#" RTCCUINTREG_XFMT ", got %#" RTCCUINTREG_XFMT,
+                                       s_aTests[i].uOutAX, TrapFrame.Ctx.rax.RT_CONCAT(u,ARCH_BITS));
+                    if (TrapFrame.Ctx.rdx.RT_CONCAT(u,ARCH_BITS) != s_aTests[i].uOutDX)
+                        Bs3TestFailedF("Expected xDX = %#" RTCCUINTREG_XFMT ", got %#" RTCCUINTREG_XFMT,
+                                       s_aTests[i].uOutDX, TrapFrame.Ctx.rdx.RT_CONCAT(u,ARCH_BITS));
+                    if ((TrapFrame.Ctx.rflags.u16 & DIV_CHECK_EFLAGS) != (Ctx.rflags.u16 & DIV_CHECK_EFLAGS))
+                        Bs3TestFailedF("Expected EFLAGS = %#06RX16, got %#06RX16",
+                                       Ctx.rflags.u16 & DIV_CHECK_EFLAGS, TrapFrame.Ctx.rflags.u16 & DIV_CHECK_EFLAGS);
+                }
+            }
+        }
+        Ctx.rflags.u16 &= ~DIV_CHECK_EFLAGS;
+    }
+
+    return 0;
+}
+
+
+
+BS3_DECL_FAR(uint8_t) BS3_CMN_NM(bs3CpuInstr2_idiv)(uint8_t bMode)
+{
+#define IDIV_CHECK_EFLAGS (uint16_t)(X86_EFL_CF | X86_EFL_OF | X86_EFL_SF | X86_EFL_ZF | X86_EFL_AF | X86_EFL_PF)
+    static const struct
+    {
+        RTCCUINTREG uInDX;
+        RTCCUINTREG uInAX;
+        RTCCUINTREG uInBX;
+        RTCCUINTREG uOutAX;
+        RTCCUINTREG uOutDX;
+        uint8_t     bXcpt;
+    } s_aTests[] =
+    {
+        {   0,    0,                            0,
+            0,    0,                                                    X86_XCPT_DE },
+        {   RTCCINTREG_MAX, RTCCINTREG_MAX,     0,
+            0,    0,                                                    X86_XCPT_DE },
+        /* two positive values. */
+        {   0,    1,                    1,
+            1,    0,                                                    X86_XCPT_UD },
+        {   0,    5,                    2,
+            2,    1,                                                    X86_XCPT_UD },
+        {   RTCCINTREG_MAX / 2, RTCCUINTREG_MAX / 2,        RTCCINTREG_MAX,
+            RTCCINTREG_MAX, RTCCINTREG_MAX - 1,                         X86_XCPT_UD },
+        {   RTCCINTREG_MAX / 2, RTCCUINTREG_MAX / 2 + 1,    RTCCINTREG_MAX,
+            RTCCINTREG_MAX, RTCCINTREG_MAX - 1,                         X86_XCPT_DE },
+        /* negative dividend, positive divisor. */
+        {   -1,  -7,                    2,
+            -3,  -1,                                                    X86_XCPT_UD },
+        {   RTCCINTREG_MIN / 2 + 1, 0,                      RTCCINTREG_MAX,
+            RTCCINTREG_MIN + 2, RTCCINTREG_MIN + 2,                     X86_XCPT_UD },
+        {   RTCCINTREG_MIN / 2,     0,                      RTCCINTREG_MAX,
+            0,    0,                                                    X86_XCPT_DE },
+        /* positive dividend, negative divisor. */
+        {   0,    7,                    -2,
+            -3,   1,                                                    X86_XCPT_UD },
+        {   RTCCINTREG_MAX / 2 + 1, RTCCINTREG_MAX,         RTCCINTREG_MIN,
+            RTCCINTREG_MIN,     RTCCINTREG_MAX,                         X86_XCPT_UD },
+        {   RTCCINTREG_MAX / 2 + 1, RTCCINTREG_MAX+1,       RTCCINTREG_MIN,
+            0,    0,                                                    X86_XCPT_DE },
+        /* negative dividend, negative divisor. */
+        {   -1,  -7,                    -2,
+            3,   -1,                                                    X86_XCPT_UD },
+        {   RTCCINTREG_MIN / 2, 1,                          RTCCINTREG_MIN,
+            RTCCINTREG_MAX, RTCCINTREG_MIN + 1,                         X86_XCPT_UD },
+        {   RTCCINTREG_MIN / 2, 2,                          RTCCINTREG_MIN,
+            RTCCINTREG_MAX, RTCCINTREG_MIN + 2,                         X86_XCPT_UD },
+        {   RTCCINTREG_MIN / 2, 0,                          RTCCINTREG_MIN,
+            0, 0,                                                       X86_XCPT_DE },
+    };
+
+    BS3REGCTX       Ctx;
+    BS3TRAPFRAME    TrapFrame;
+    unsigned        i, j;
+
+    /* Ensure the structures are allocated before we sample the stack pointer. */
+    Bs3MemSet(&Ctx, 0, sizeof(Ctx));
+    Bs3MemSet(&TrapFrame, 0, sizeof(TrapFrame));
+
+    /*
+     * Create test context.
+     */
+    Bs3RegCtxSaveEx(&Ctx, bMode, 512);
+    Bs3RegCtxSetRipCsFromCurPtr(&Ctx, BS3_CMN_NM(bs3CpuInstr2_idiv_xBX_ud2));
+
+    /*
+     * Do the tests twice, first with all flags set, then once again with
+     * flags cleared.  The flags are not touched by my intel skylake CPU.
+     */
+    Ctx.rflags.u16 |= IDIV_CHECK_EFLAGS;
+    for (j = 0; j < 2; j++)
+    {
+        for (i = 0; i < RT_ELEMENTS(s_aTests); i++)
+        {
+            Ctx.rax.RT_CONCAT(u,ARCH_BITS) = s_aTests[i].uInAX;
+            Ctx.rdx.RT_CONCAT(u,ARCH_BITS) = s_aTests[i].uInDX;
+            Ctx.rbx.RT_CONCAT(u,ARCH_BITS) = s_aTests[i].uInBX;
+            Bs3TrapSetJmpAndRestore(&Ctx, &TrapFrame);
+
+            if (   TrapFrame.bXcpt                          != s_aTests[i].bXcpt
+                || (   s_aTests[i].bXcpt == X86_XCPT_UD
+                    ?    TrapFrame.Ctx.rax.RT_CONCAT(u,ARCH_BITS) != s_aTests[i].uOutAX
+                      || TrapFrame.Ctx.rdx.RT_CONCAT(u,ARCH_BITS) != s_aTests[i].uOutDX
+                      || (TrapFrame.Ctx.rflags.u16 & IDIV_CHECK_EFLAGS) != (Ctx.rflags.u16 & IDIV_CHECK_EFLAGS)
+                    :    TrapFrame.Ctx.rax.u != Ctx.rax.u
+                      || TrapFrame.Ctx.rdx.u != Ctx.rdx.u
+                      || (TrapFrame.Ctx.rflags.u16 & IDIV_CHECK_EFLAGS) != (Ctx.rflags.u16 & IDIV_CHECK_EFLAGS) ) )
+            {
+                Bs3TestFailedF("test #%i failed: input %#" RTCCUINTREG_XFMT ":%" RTCCUINTREG_XFMT " / %#" RTCCUINTREG_XFMT,
+                               i, s_aTests[i].uInDX, s_aTests[i].uInAX, s_aTests[i].uInBX);
+                if (TrapFrame.bXcpt != s_aTests[i].bXcpt)
+                    Bs3TestFailedF("Expected bXcpt = %#x, got %#x", s_aTests[i].bXcpt, TrapFrame.bXcpt);
+                if (s_aTests[i].bXcpt == X86_XCPT_UD)
+                {
+                    if (TrapFrame.Ctx.rax.RT_CONCAT(u, ARCH_BITS) != s_aTests[i].uOutAX)
+                        Bs3TestFailedF("Expected xAX = %#" RTCCUINTREG_XFMT ", got %#" RTCCUINTREG_XFMT,
+                                       s_aTests[i].uOutAX, TrapFrame.Ctx.rax.RT_CONCAT(u,ARCH_BITS));
+                    if (TrapFrame.Ctx.rdx.RT_CONCAT(u,ARCH_BITS) != s_aTests[i].uOutDX)
+                        Bs3TestFailedF("Expected xDX = %#" RTCCUINTREG_XFMT ", got %#" RTCCUINTREG_XFMT,
+                                       s_aTests[i].uOutDX, TrapFrame.Ctx.rdx.RT_CONCAT(u,ARCH_BITS));
+                    if ((TrapFrame.Ctx.rflags.u16 & IDIV_CHECK_EFLAGS) != (Ctx.rflags.u16 & IDIV_CHECK_EFLAGS))
+                        Bs3TestFailedF("Expected EFLAGS = %#06RX16, got %#06RX16",
+                                       Ctx.rflags.u16 & IDIV_CHECK_EFLAGS, TrapFrame.Ctx.rflags.u16 & IDIV_CHECK_EFLAGS);
+                }
+            }
+        }
+        Ctx.rflags.u16 &= ~IDIV_CHECK_EFLAGS;
+    }
+
+    return 0;
+}
+
+
+#endif /* BS3_INSTANTIATING_CMN */
+
+
+
+/*
+ * Mode specific code.
+ * Mode specific code.
+ * Mode specific code.
+ */
+#ifdef BS3_INSTANTIATING_MODE
+
+
+#endif /* BS3_INSTANTIATING_MODE */
+
diff --git a/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-2-template.mac b/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-2-template.mac
new file mode 100644
index 0000000..85bdeed
--- /dev/null
+++ b/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-2-template.mac
@@ -0,0 +1,89 @@
+; $Id: bs3-cpu-instr-2-template.mac $
+;; @file
+; BS3Kit - bs3-cpu-instr-2 assembly template.
+;
+
+;
+; Copyright (C) 2007-2016 Oracle Corporation
+;
+; This file is part of VirtualBox Open Source Edition (OSE), as
+; available from http://www.virtualbox.org. This file is free software;
+; you can redistribute it and/or modify it under the terms of the GNU
+; General Public License (GPL) as published by the Free Software
+; Foundation, in version 2 as it comes in the "COPYING" file of the
+; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+;
+; The contents of this file may alternatively be used under the terms
+; of the Common Development and Distribution License Version 1.0
+; (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+; VirtualBox OSE distribution, in which case the provisions of the
+; CDDL are applicable instead of those of the GPL.
+;
+; You may elect to license modified versions of this file under the
+; terms and conditions of either the GPL or the CDDL or both.
+;
+
+
+;*********************************************************************************************************************************
+;*  Header Files                                                                                                                 *
+;*********************************************************************************************************************************
+%include "bs3kit-template-header.mac"   ; setup environment
+
+
+;*********************************************************************************************************************************
+;*  External Symbols                                                                                                             *
+;*********************************************************************************************************************************
+TMPL_BEGIN_TEXT
+
+
+;
+; Test code snippets containing code which differs between 16-bit, 32-bit
+; and 64-bit CPUs modes.
+;
+%ifdef BS3_INSTANTIATING_CMN
+
+BS3_PROC_BEGIN_CMN bs3CpuInstr2_mul_xBX_ud2, BS3_PBC_NEAR
+        mul     xBX
+.again:
+        ud2
+        jmp     .again
+BS3_PROC_END_CMN   bs3CpuInstr2_mul_xBX_ud2
+
+
+BS3_PROC_BEGIN_CMN bs3CpuInstr2_imul_xBX_ud2, BS3_PBC_NEAR
+        imul    xBX
+.again:
+        ud2
+        jmp     .again
+BS3_PROC_END_CMN   bs3CpuInstr2_imul_xBX_ud2
+
+
+BS3_PROC_BEGIN_CMN bs3CpuInstr2_imul_xCX_xBX_ud2, BS3_PBC_NEAR
+        imul    xCX, xBX
+.again:
+        ud2
+        jmp     .again
+BS3_PROC_END_CMN   bs3CpuInstr2_imul_xCX_xBX_ud2
+
+
+BS3_PROC_BEGIN_CMN bs3CpuInstr2_div_xBX_ud2, BS3_PBC_NEAR
+        div     xBX
+.again:
+        ud2
+        jmp     .again
+BS3_PROC_END_CMN   bs3CpuInstr2_div_xBX_ud2
+
+
+BS3_PROC_BEGIN_CMN bs3CpuInstr2_idiv_xBX_ud2, BS3_PBC_NEAR
+        idiv    xBX
+.again:
+        ud2
+        jmp     .again
+BS3_PROC_END_CMN   bs3CpuInstr2_idiv_xBX_ud2
+
+%endif ; BS3_INSTANTIATING_CMN
+
+%include "bs3kit-template-footer.mac"   ; reset environment
+
+
diff --git a/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-2.c b/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-2.c
new file mode 100644
index 0000000..7e322d0
--- /dev/null
+++ b/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-2.c
@@ -0,0 +1,64 @@
+/* $Id: bs3-cpu-instr-2.c $ */
+/** @file
+ * BS3Kit - bs3-cpu-instr-2, 16-bit C code.
+ */
+
+/*
+ * Copyright (C) 2007-2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#include <bs3kit.h>
+
+
+/*********************************************************************************************************************************
+*   Internal Functions                                                                                                           *
+*********************************************************************************************************************************/
+BS3TESTMODE_PROTOTYPES_CMN(bs3CpuInstr2_mul);
+BS3TESTMODE_PROTOTYPES_CMN(bs3CpuInstr2_imul);
+BS3TESTMODE_PROTOTYPES_CMN(bs3CpuInstr2_div);
+BS3TESTMODE_PROTOTYPES_CMN(bs3CpuInstr2_idiv);
+
+
+/*********************************************************************************************************************************
+*   Global Variables                                                                                                             *
+*********************************************************************************************************************************/
+static const BS3TESTMODEENTRY g_aModeTests[] =
+{
+    BS3TESTMODEENTRY_CMN("mul", bs3CpuInstr2_mul),
+    BS3TESTMODEENTRY_CMN("imul", bs3CpuInstr2_imul),
+    BS3TESTMODEENTRY_CMN("div", bs3CpuInstr2_div),
+    BS3TESTMODEENTRY_CMN("idiv", bs3CpuInstr2_idiv),
+};
+
+
+BS3_DECL(void) Main_rm()
+{
+    Bs3InitAll_rm();
+    Bs3TestInit("bs3-cpu-instr-2");
+
+    Bs3TestDoModes_rm(g_aModeTests, RT_ELEMENTS(g_aModeTests));
+
+    Bs3TestTerm();
+}
+
diff --git a/src/VBox/ValidationKit/bootsectors/bs3-fpustate-1.c b/src/VBox/ValidationKit/bootsectors/bs3-fpustate-1.c
index 7c8d6c4..f75883a 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3-fpustate-1.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3-fpustate-1.c
@@ -82,5 +82,3 @@ BS3_DECL(void) Main_rm()
     Bs3TestTerm();
 }
 
-
-
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/VBoxBs3Linker.cpp b/src/VBox/ValidationKit/bootsectors/bs3kit/VBoxBs3Linker.cpp
index 327786c..aaeeec0 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/VBoxBs3Linker.cpp
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/VBoxBs3Linker.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -150,7 +150,7 @@ int main(int argc, char **argv)
                     }
 
                     case 'V':
-                        printf("%s\n", "$Revision: 104490 $");
+                        printf("%s\n", "$Revision: 109040 $");
                         free(paInputs);
                         return 0;
 
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/VBoxBs3ObjConverter.cpp b/src/VBox/ValidationKit/bootsectors/bs3kit/VBoxBs3ObjConverter.cpp
index e3190ae..3096cdd 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/VBoxBs3ObjConverter.cpp
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/VBoxBs3ObjConverter.cpp
@@ -161,7 +161,6 @@ static bool writefile(const char *pszFile, void const *pvFile, size_t cbFile)
 {
     remove(pszFile);
 
-    int rc = -1;
     FILE *pFile = openfile(pszFile, true);
     if (pFile)
     {
@@ -1027,6 +1026,7 @@ static bool omfWriter_LEDataAddU16(POMFWRITER pThis, uint16_t u16)
     return false;
 }
 
+#if 0 /* unused */
 /**
  * LEDATA + FIXUPP - Adds a byte to the LEDATA record, splitting if needed.
  */
@@ -1040,6 +1040,7 @@ static bool omfWriter_LEDataAddU8(POMFWRITER pThis, uint8_t b)
     }
     return false;
 }
+#endif
 
 /**
  * MODEND - End of module, simple variant.
@@ -1502,7 +1503,7 @@ static bool convertElfSectionsToSegDefsAndGrpDefs(POMFWRITER pThis, PCELFDETAILS
      */
     /** @todo do we need to consider missing segments and ordering? */
     uint16_t cGrpNms = 0;
-    uint16_t aiGrpNms[2];
+    uint16_t aiGrpNms[2] = { 0, 0 }; /* Shut up, GCC. */
     if (fHaveData)
         aiGrpNms[cGrpNms++] = idxGrpData;
     for (uint32_t iGrpNm = 0; iGrpNm < cGrpNms; iGrpNm++)
@@ -1690,6 +1691,7 @@ static DECLCALLBACK(int) convertElfCompareRelA(void const *pvElement1, void cons
         return -1;
     if (pReloc1->r_offset > pReloc2->r_offset)
         return 1;
+    RT_NOREF_PV(pvUser);
     return 0;
 }
 
@@ -1698,6 +1700,8 @@ static bool convertElfSectionsToLeDataAndFixupps(POMFWRITER pThis, PCELFDETAILS
     Elf64_Sym const    *paSymbols = pElfStuff->paSymbols;
     Elf64_Shdr const   *paShdrs   = pElfStuff->paShdrs;
     bool                fRet      = true;
+    RT_NOREF_PV(cbFile);
+
     for (uint32_t i = 1; i < pThis->cSegments; i++)
     {
         if (pThis->paSegments[i].iSegDef == UINT16_MAX)
@@ -1932,10 +1936,6 @@ static bool convertElfToOmf(const char *pszFile, uint8_t const *pbFile, size_t c
      */
     if (omfWriter_BeginModule(pThis, pszFile))
     {
-        Elf64_Ehdr const *pEhdr     = (Elf64_Ehdr const *)pbFile;
-        Elf64_Shdr const *paShdrs   = (Elf64_Shdr const *)&pbFile[pEhdr->e_shoff];
-        const char       *pszStrTab = (const char *)&pbFile[paShdrs[pEhdr->e_shstrndx].sh_offset];
-
         if (   convertElfSectionsToSegDefsAndGrpDefs(pThis, &ElfStuff)
             && convertElfSymbolsToPubDefsAndExtDefs(pThis, &ElfStuff)
             && omfWriter_LinkPassSeparator(pThis)
@@ -2509,6 +2509,10 @@ static bool convertCoffSectionsToLeDataAndFixupps(POMFWRITER pThis, uint8_t cons
                                                   PCIMAGE_SECTION_HEADER paShdrs, uint16_t cSections,
                                                   PCIMAGE_SYMBOL paSymbols, uint16_t cSymbols, const char *pchStrTab)
 {
+    RT_NOREF_PV(cbFile);
+    RT_NOREF_PV(cSections);
+    RT_NOREF_PV(cSymbols);
+
     uint32_t const  cbStrTab = *(uint32_t const *)pchStrTab;
     bool            fRet     = true;
     for (uint32_t i = 0; i < pThis->cSegments; i++)
@@ -3619,8 +3623,6 @@ static bool convertMachoToOmf(const char *pszFile, uint8_t const *pbFile, size_t
     if (omfWriter_BeginModule(pThis, pszFile))
     {
         Elf64_Ehdr const *pEhdr     = (Elf64_Ehdr const *)pbFile;
-        Elf64_Shdr const *paShdrs   = (Elf64_Shdr const *)&pbFile[pEhdr->e_shoff];
-        const char       *pszStrTab = (const char *)&pbFile[paShdrs[pEhdr->e_shstrndx].sh_offset];
 
         if (   convertMachOSectionsToSegDefsAndGrpDefs(pThis, &MachOStuff)
             && convertMachOSymbolsToPubDefsAndExtDefs(pThis, &MachOStuff)
@@ -4585,7 +4587,6 @@ static bool convertOmfWriteDebugData(POMFWRITER pThis, POMFDETAILS pOmfStuff)
         return true;
 
     /* Begin and write the CV version signature. */
-    uint32_t const  cbMaxChunk = RT_ALIGN(OMF_MAX_RECORD_PAYLOAD - 1 - 16, 4); /* keep the data dword aligned */
     if (   !omfWriter_LEDataBegin(pThis, pOmfStuff->iSymbolsSeg, 0)
         || !omfWriter_LEDataAddU32(pThis, RTCVSYMBOLS_SIGNATURE_CV8))
         return false;
@@ -5044,7 +5045,7 @@ int main(int argc, char **argv)
                         break;
 
                     case 'V':
-                        printf("%s\n", "$Revision: 106915 $");
+                        printf("%s\n", "$Revision: 110010 $");
                         return 0;
 
                     case '?':
@@ -5069,4 +5070,3 @@ int main(int argc, char **argv)
     return rcExit;
 }
 
-
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/asmdefs-first.mac b/src/VBox/ValidationKit/bootsectors/bs3kit/asmdefs-first.mac
index 5a91ad3..1be5c40 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/asmdefs-first.mac
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/asmdefs-first.mac
@@ -7,7 +7,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2015 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-c16-CreateHybridFarRet.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-c16-CreateHybridFarRet.asm
index a905cd4..e459d86 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-c16-CreateHybridFarRet.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-c16-CreateHybridFarRet.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-c16-SwitchFromV86To16BitAndCallC.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-c16-SwitchFromV86To16BitAndCallC.asm
index 16488db..7b53ec3 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-c16-SwitchFromV86To16BitAndCallC.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-c16-SwitchFromV86To16BitAndCallC.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-c16-TrapRmV86Data.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-c16-TrapRmV86Data.c
index 9462c48..ce0100c 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-c16-TrapRmV86Data.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-c16-TrapRmV86Data.c
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-A20Enable.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-A20Enable.asm
index df0e717..375eb3f 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-A20Enable.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-A20Enable.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-ConvertRMStackToP16UsingCxReturnToAx.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-ConvertRMStackToP16UsingCxReturnToAx.asm
index f6cffae..44dbec5 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-ConvertRMStackToP16UsingCxReturnToAx.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-ConvertRMStackToP16UsingCxReturnToAx.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-KbdRead.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-KbdRead.asm
index 1130431..c1dfb25 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-KbdRead.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-KbdRead.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-KbdWait.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-KbdWait.asm
index 80ccff0..5b02880 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-KbdWait.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-KbdWait.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-KbdWrite.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-KbdWrite.asm
index 5386a0a..1449443 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-KbdWrite.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-KbdWrite.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemAlloc.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemAlloc.c
index e647950..0b486de 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemAlloc.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemAlloc.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemAllocZ.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemAllocZ.c
index f953362..8b838a3 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemAllocZ.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemAllocZ.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemCpy.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemCpy.c
index e616a8d..f9af844 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemCpy.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemCpy.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemFree.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemFree.c
index 81bf480..7ad3f16 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemFree.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemFree.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemGuardedTestPage.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemGuardedTestPage.c
index cff5c1b..b7cf146 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemGuardedTestPage.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemGuardedTestPage.c
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemMove.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemMove.c
index 606368f..d5233d9 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemMove.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemMove.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -76,6 +76,3 @@ BS3_CMN_DEF(void BS3_FAR *, Bs3MemMove,(void BS3_FAR *pvDst, const void BS3_FAR
     return pvDst;
 }
 
-
-
-
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemPCpy.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemPCpy.c
index c275124..4554176 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemPCpy.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemPCpy.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemSet.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemSet.asm
index 532b8db..d379dc5 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemSet.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemSet.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemZero.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemZero.asm
index 8b3bc54..2945ab0 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemZero.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemZero.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingAlias.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingAlias.c
index 7250be5..eaf38cd 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingAlias.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingAlias.c
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingData.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingData.c
index 5d54a9a..63a4dae 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingData.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingData.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingInitRootForLM.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingInitRootForLM.c
index 8ee8cbc..e0d3655 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingInitRootForLM.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingInitRootForLM.c
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingInitRootForPAE.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingInitRootForPAE.c
index af76a66..810244c 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingInitRootForPAE.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingInitRootForPAE.c
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingInitRootForPP.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingInitRootForPP.c
index 058baa7..8cfd94f 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingInitRootForPP.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingInitRootForPP.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingProtect.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingProtect.c
index d49e136..defc3b8 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingProtect.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingProtect.c
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingSetupCanonicalTraps.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingSetupCanonicalTraps.c
index 1a20834..41c6d7e 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingSetupCanonicalTraps.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingSetupCanonicalTraps.c
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Panic.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Panic.asm
index 83fc007..4e1166a 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Panic.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Panic.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PicSetup.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PicSetup.c
index 65e8ca6..813abdf 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PicSetup.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PicSetup.c
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PicUpdateMask.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PicUpdateMask.c
index 65c4b53..36e18d4 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PicUpdateMask.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PicUpdateMask.c
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PitIrqHandler.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PitIrqHandler.c
index d02649e..3a0a335 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PitIrqHandler.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PitIrqHandler.c
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PrintU32.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PrintU32.asm
index a2c4136..5f12540 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PrintU32.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PrintU32.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PrintX32.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PrintX32.asm
index a476df0..52fb7bd 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PrintX32.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PrintX32.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxConvertToRingX.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxConvertToRingX.c
index 3c72196..b04128a 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxConvertToRingX.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxConvertToRingX.c
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxPrint.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxPrint.c
index a32cf2b..8eede3c 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxPrint.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxPrint.c
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxSetGrpSegFromCurPtr.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxSetGrpSegFromCurPtr.c
index f33998a..0e7f50e 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxSetGrpSegFromCurPtr.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxSetGrpSegFromCurPtr.c
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxSetGrpSegFromFlat.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxSetGrpSegFromFlat.c
index f427071..95debb2 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxSetGrpSegFromFlat.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxSetGrpSegFromFlat.c
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxSetRipCsFromCurPtr.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxSetRipCsFromCurPtr.c
index 63df80b..80d5547 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxSetRipCsFromCurPtr.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxSetRipCsFromCurPtr.c
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxSetRipCsFromFlat.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxSetRipCsFromFlat.c
index f359491..81fa473 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxSetRipCsFromFlat.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxSetRipCsFromFlat.c
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxSetRipCsFromLnkPtr.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxSetRipCsFromLnkPtr.c
index f113e79..a4ae42e 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxSetRipCsFromLnkPtr.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxSetRipCsFromLnkPtr.c
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SelFlatCodeToProtFar16.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SelFlatCodeToProtFar16.asm
index 2b980ef..e56dadd 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SelFlatCodeToProtFar16.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SelFlatCodeToProtFar16.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SelFlatCodeToRealMode.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SelFlatCodeToRealMode.asm
index c0d0cc2..16e82c3 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SelFlatCodeToRealMode.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SelFlatCodeToRealMode.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Shutdown.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Shutdown.asm
index 7f06e6d..8acfc9f 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Shutdown.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Shutdown.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabAlloc.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabAlloc.c
index 810337a..c459a7b 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabAlloc.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabAlloc.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabAllocEx.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabAllocEx.c
index 00c5259..3c27086 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabAllocEx.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabAllocEx.c
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabFree.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabFree.c
index 330c023..435a964 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabFree.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabFree.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabInit.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabInit.c
index 201c92e..163bda8 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabInit.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabInit.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabListAdd.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabListAdd.c
index 6b2d88c..4a4eb4c 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabListAdd.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabListAdd.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabListAlloc.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabListAlloc.c
index b547853..aa8cef7 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabListAlloc.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabListAlloc.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabListAllocEx.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabListAllocEx.c
index 3d9778e..88b5647 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabListAllocEx.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabListAllocEx.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabListFree.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabListFree.c
index 9563018..fc3ef71 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabListFree.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabListFree.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabListInit.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabListInit.c
index d98a50d..8c60c65 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabListInit.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabListInit.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-StrCpy.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-StrCpy.c
index 272988f..7fd6411 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-StrCpy.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-StrCpy.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-StrFormatV.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-StrFormatV.c
index 860b132..690ed6e 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-StrFormatV.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-StrFormatV.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-StrLen.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-StrLen.c
index 431631e..656a591 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-StrLen.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-StrLen.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-StrNLen.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-StrNLen.c
index 0222049..913739f 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-StrNLen.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-StrNLen.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -35,4 +35,3 @@ BS3_CMN_DEF(size_t, Bs3StrNLen,(const char BS3_FAR *pszString, size_t cchMax))
     return cch;
 }
 
-
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-StrPrintf.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-StrPrintf.c
index 28f9d98..e0f90b6 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-StrPrintf.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-StrPrintf.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SwitchHlpConvProtModeRetfPopBpDecBpAndReturn.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SwitchHlpConvProtModeRetfPopBpDecBpAndReturn.asm
index 9e3890a..da2b9d9 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SwitchHlpConvProtModeRetfPopBpDecBpAndReturn.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SwitchHlpConvProtModeRetfPopBpDecBpAndReturn.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SwitchHlpConvRealModeRetfPopBpDecBpAndReturn.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SwitchHlpConvRealModeRetfPopBpDecBpAndReturn.asm
index 63cfce2..a157e75 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SwitchHlpConvRealModeRetfPopBpDecBpAndReturn.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SwitchHlpConvRealModeRetfPopBpDecBpAndReturn.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SwitchTo16Bit.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SwitchTo16Bit.asm
index d161352..4cf4b33 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SwitchTo16Bit.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SwitchTo16Bit.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestData.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestData.c
index a40bda2..45dd6da 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestData.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestData.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestInit.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestInit.c
index 0a08b9e..ebb8fb3 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestInit.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestInit.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestIsVmmDevTestingPresent.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestIsVmmDevTestingPresent.asm
index 737ea05..adda651 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestIsVmmDevTestingPresent.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestIsVmmDevTestingPresent.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestSendCmdWithStr.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestSendCmdWithStr.asm
index 8300255..a36d3be 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestSendCmdWithStr.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestSendCmdWithStr.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Trap16Init.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Trap16Init.c
index c6dee4c..402427c 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Trap16Init.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Trap16Init.c
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Trap16SetGate.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Trap16SetGate.c
index e2209e6..3711c3e 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Trap16SetGate.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Trap16SetGate.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Trap32Init.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Trap32Init.c
index e0082d1..339bd63 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Trap32Init.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Trap32Init.c
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Trap32SetGate.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Trap32SetGate.c
index dbe8f5c..6b95e1b 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Trap32SetGate.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Trap32SetGate.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Trap64Init.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Trap64Init.c
index a06d98c..e306b9b 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Trap64Init.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Trap64Init.c
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Trap64SetGate.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Trap64SetGate.c
index 9e74e23..ae163da 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Trap64SetGate.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Trap64SetGate.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapDefaultHandler.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapDefaultHandler.c
index 1aca5bc..08adc13 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapDefaultHandler.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapDefaultHandler.c
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapPrintFrame.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapPrintFrame.c
index a79aa5b..df6762b 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapPrintFrame.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapPrintFrame.c
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapRmV86Init.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapRmV86Init.c
index 685b656..eea4f1c 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapRmV86Init.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapRmV86Init.c
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapRmV86SetGate.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapRmV86SetGate.c
index a1f45ef..53fb439 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapRmV86SetGate.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapRmV86SetGate.c
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapSetHandler.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapSetHandler.c
index 35becc6..d097ae3 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapSetHandler.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapSetHandler.c
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapSetHandlerEx.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapSetHandlerEx.c
index cb8a6ea..88dcc65 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapSetHandlerEx.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapSetHandlerEx.c
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapSetJmpAndRestore.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapSetJmpAndRestore.c
index 40db3c9..47a8f6e 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapSetJmpAndRestore.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapSetJmpAndRestore.c
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapUnsetJmp.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapUnsetJmp.c
index 39df1d4..53c47d7 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapUnsetJmp.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapUnsetJmp.c
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-hexdigits.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-hexdigits.c
index 4695379..f28b193 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-hexdigits.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-hexdigits.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-memory.h b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-memory.h
index fbb925a..b330466 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-memory.h
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-memory.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-pic-data.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-pic-data.c
index 07e7376..e7bd804 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-pic-data.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-pic-data.c
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-pit.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-pit.c
index f966834..ae68bb2 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-pit.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-pit.c
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-test.h b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-test.h
index 9aae394..5099161 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-test.h
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-test.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-first-common.mac b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-first-common.mac
index 7c9c363..3fb64ef 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-first-common.mac
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-first-common.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-first-rm.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-first-rm.asm
index 7ba0351..97c1e5d 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-first-rm.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-first-rm.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-PagingGetRootForPP32.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-PagingGetRootForPP32.asm
index 75581ad..8129dc0 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-PagingGetRootForPP32.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-PagingGetRootForPP32.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPE16.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPE16.asm
index 9508902..8c403ad 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPE16.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPE16.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPE32.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPE32.asm
index dab26f9..55993e3 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPE32.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPE32.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPP32.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPP32.asm
index 9e822e8..06d01df 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPP32.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPP32.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToRM.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToRM.asm
index 1218bff..db47075 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToRM.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToRM.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-TestDoModesByOne.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-TestDoModesByOne.c
index ac57237..efed6b0 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-TestDoModesByOne.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-TestDoModesByOne.c
@@ -62,6 +62,7 @@
 # define CONV_TO_RM_FAR16(a_fpfn)       Bs3SelFlatCodeToRealMode( (uint32_t)(uintptr_t)(a_fpfn))
 #endif
 
+
 /*********************************************************************************************************************************
 *   Assembly Symbols                                                                                                             *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-rm-InitGdt.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-rm-InitGdt.c
index 538541d..fb23e71 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-rm-InitGdt.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-rm-InitGdt.c
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-rm-InitMemory.c b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-rm-InitMemory.c
index 2088ef6..db7cb0e 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-rm-InitMemory.c
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-rm-InitMemory.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -24,6 +24,7 @@
  * terms and conditions of either the GPL or the CDDL or both.
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-I4D.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-I4D.asm
index ffacc9c..bb8daed 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-I4D.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-I4D.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-I8DQ.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-I8DQ.asm
index 08e1a4e..f4c6cff 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-I8DQ.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-I8DQ.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-I8DR.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-I8DR.asm
index 20370a6..03e4818 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-I8DR.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-I8DR.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-I8RS.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-I8RS.asm
index fb9e565..93c9acf 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-I8RS.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-I8RS.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U4D.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U4D.asm
index 8d4ce51..bd313af 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U4D.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U4D.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U8DQ.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U8DQ.asm
index 1e3c050..1f40c7a 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U8DQ.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U8DQ.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U8DR.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U8DR.asm
index b778992..1acce5b 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U8DR.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U8DR.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U8LS.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U8LS.asm
index bd611fa..f59e3d9 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U8LS.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U8LS.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U8RS.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U8RS.asm
index 7acf033..2eaddf7 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U8RS.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U8RS.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc32-I8D.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc32-I8D.asm
index d3b8565..94d9c5a 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc32-I8D.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc32-I8D.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc32-I8RS.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc32-I8RS.asm
index 1007b96..ace9b77 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc32-I8RS.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc32-I8RS.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc32-U8D.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc32-U8D.asm
index 703cafb..eb237ce 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc32-U8D.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc32-U8D.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc32-U8LS.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc32-U8LS.asm
index 6b4ee49..5eb5ca2 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc32-U8LS.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc32-U8LS.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc32-U8RS.asm b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc32-U8RS.asm
index 030dd0f..3c500d2 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc32-U8RS.asm
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc32-U8RS.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-template-header.h b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-template-header.h
index 0337694..447fa71 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-template-header.h
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-template-header.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-template-header.mac b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-template-header.mac
index eebff95..6384287 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-template-header.mac
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-template-header.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h
index ee47eb9..2d31204 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h
@@ -2419,7 +2419,7 @@ typedef BS3REGCTX const BS3_FAR *PCBS3REGCTX;
  *
  * @param   pRegCtx     Where to store the register context.
  */
-BS3_CMN_PROTO_NOSB(void, Bs3RegCtxSave,(PCBS3REGCTX pRegCtx));
+BS3_CMN_PROTO_NOSB(void, Bs3RegCtxSave,(PBS3REGCTX pRegCtx));
 
 /**
  * Switch to the specified CPU bitcount, reserve additional stack and save the
@@ -2436,7 +2436,7 @@ BS3_CMN_PROTO_NOSB(void, Bs3RegCtxSave,(PCBS3REGCTX pRegCtx));
  *                          to make it possible to pass a full mode value.
  * @param   cbExtraStack    Number of bytes of additional stack to allocate.
  */
-BS3_CMN_PROTO_FARSTUB(8, void, Bs3RegCtxSaveEx,(PCBS3REGCTX pRegCtx, uint8_t bBitMode, uint16_t cbExtraStack));
+BS3_CMN_PROTO_FARSTUB(8, void, Bs3RegCtxSaveEx,(PBS3REGCTX pRegCtx, uint8_t bBitMode, uint16_t cbExtraStack));
 
 /**
  * Transforms a register context to a different ring.
@@ -3026,9 +3026,9 @@ typedef BS3TESTMODEENTRY const *PCBS3TESTMODEENTRY;
 /** @def BS3TESTMODE_PROTOTYPES_CMN
  * A set of standard protypes to go with #BS3TESTMODEENTRY_CMN. */
 #define BS3TESTMODE_PROTOTYPES_CMN(a_BaseNm) \
-    FNBS3TESTDOMODE BS3_FAR_CODE    RT_CONCAT(a_BaseNm, _c16); \
-    FNBS3TESTDOMODE BS3_FAR_CODE    RT_CONCAT(a_BaseNm, _c32); \
-    FNBS3TESTDOMODE BS3_FAR_CODE    RT_CONCAT(a_BaseNm, _c64)
+    FNBS3TESTDOMODE /*BS3_FAR_CODE*/    RT_CONCAT(a_BaseNm, _c16); \
+    FNBS3TESTDOMODE /*BS3_FAR_CODE*/    RT_CONCAT(a_BaseNm, _c32); \
+    FNBS3TESTDOMODE /*BS3_FAR_CODE*/    RT_CONCAT(a_BaseNm, _c64)
 
 /** @def BS3TESTMODEENTRY_MODE
  * Produces a BS3TESTMODEENTRY initializer for a full set of mode test
diff --git a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.mac b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.mac
index fc23edc..d4e31bb 100644
--- a/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.mac
+++ b/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2007-2015 Oracle Corporation
+; Copyright (C) 2007-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/common/Makefile.kmk b/src/VBox/ValidationKit/common/Makefile.kmk
index e2fb60a..d760460 100644
--- a/src/VBox/ValidationKit/common/Makefile.kmk
+++ b/src/VBox/ValidationKit/common/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/common/__init__.py b/src/VBox/ValidationKit/common/__init__.py
index c45d225..4924b66 100755
--- a/src/VBox/ValidationKit/common/__init__.py
+++ b/src/VBox/ValidationKit/common/__init__.py
@@ -7,7 +7,7 @@ Common code between testmanager, testbox and testdriver.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 
 from common import constants;
diff --git a/src/VBox/ValidationKit/common/constants/__init__.py b/src/VBox/ValidationKit/common/constants/__init__.py
index 6f58763..354de33 100755
--- a/src/VBox/ValidationKit/common/constants/__init__.py
+++ b/src/VBox/ValidationKit/common/constants/__init__.py
@@ -7,7 +7,7 @@ Constants.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 
 from common.constants import tbreq;
diff --git a/src/VBox/ValidationKit/common/constants/result.py b/src/VBox/ValidationKit/common/constants/result.py
index 4bbf6f8..69d77cf 100644
--- a/src/VBox/ValidationKit/common/constants/result.py
+++ b/src/VBox/ValidationKit/common/constants/result.py
@@ -7,7 +7,7 @@ Test statuses.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 
 PASSED      = 'PASSED';
diff --git a/src/VBox/ValidationKit/common/constants/rtexitcode.py b/src/VBox/ValidationKit/common/constants/rtexitcode.py
index 9a13f5b..c5623b4 100644
--- a/src/VBox/ValidationKit/common/constants/rtexitcode.py
+++ b/src/VBox/ValidationKit/common/constants/rtexitcode.py
@@ -7,7 +7,7 @@ RTEXITCODE from iprt/types.h.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 
 ## Success.
diff --git a/src/VBox/ValidationKit/common/constants/tbreq.py b/src/VBox/ValidationKit/common/constants/tbreq.py
index 73c3e0d..9df1a15 100644
--- a/src/VBox/ValidationKit/common/constants/tbreq.py
+++ b/src/VBox/ValidationKit/common/constants/tbreq.py
@@ -7,7 +7,7 @@ Test Manager Requests from the TestBox Script.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107795 $"
+__version__ = "$Revision: 109040 $"
 
 
 ## @name Test Manager actions
diff --git a/src/VBox/ValidationKit/common/constants/tbresp.py b/src/VBox/ValidationKit/common/constants/tbresp.py
index d9e24fc..eb0fb55 100644
--- a/src/VBox/ValidationKit/common/constants/tbresp.py
+++ b/src/VBox/ValidationKit/common/constants/tbresp.py
@@ -7,7 +7,7 @@ Test Manager Responses to the TestBox Script.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 
 ## All test manager actions responses to the testbox include a RESULT field.
diff --git a/src/VBox/ValidationKit/common/constants/valueunit.py b/src/VBox/ValidationKit/common/constants/valueunit.py
index c7e85c0..693411c 100644
--- a/src/VBox/ValidationKit/common/constants/valueunit.py
+++ b/src/VBox/ValidationKit/common/constants/valueunit.py
@@ -10,7 +10,7 @@ include/VBox/VMMDevTesting.h.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 
 
diff --git a/src/VBox/ValidationKit/common/utils.py b/src/VBox/ValidationKit/common/utils.py
index 52ed36c..2bd9d29 100755
--- a/src/VBox/ValidationKit/common/utils.py
+++ b/src/VBox/ValidationKit/common/utils.py
@@ -8,7 +8,7 @@ Common Utility Functions.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 108487 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard Python imports.
diff --git a/src/VBox/ValidationKit/common/webutils.py b/src/VBox/ValidationKit/common/webutils.py
index 8db6187..b46dcc6 100755
--- a/src/VBox/ValidationKit/common/webutils.py
+++ b/src/VBox/ValidationKit/common/webutils.py
@@ -7,7 +7,7 @@ Common Web Utility Functions.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 108487 $"
+__version__ = "$Revision: 109040 $"
 
 # Standard Python imports.
 import os;
diff --git a/src/VBox/ValidationKit/docs/Makefile.kmk b/src/VBox/ValidationKit/docs/Makefile.kmk
index fb26469..8a0c06a 100644
--- a/src/VBox/ValidationKit/docs/Makefile.kmk
+++ b/src/VBox/ValidationKit/docs/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/snippets/alloc-1.c b/src/VBox/ValidationKit/snippets/alloc-1.c
index c939816..5edc8ce 100644
--- a/src/VBox/ValidationKit/snippets/alloc-1.c
+++ b/src/VBox/ValidationKit/snippets/alloc-1.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/snippets/time-1.c b/src/VBox/ValidationKit/snippets/time-1.c
index 00feb77..5e4de17 100644
--- a/src/VBox/ValidationKit/snippets/time-1.c
+++ b/src/VBox/ValidationKit/snippets/time-1.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/td-dummy.py b/src/VBox/ValidationKit/td-dummy.py
index 907fa0b..7e6a6eb 100755
--- a/src/VBox/ValidationKit/td-dummy.py
+++ b/src/VBox/ValidationKit/td-dummy.py
@@ -2,7 +2,7 @@
 # -*- coding: utf-8 -*-
 
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/testanalysis/Makefile.kmk b/src/VBox/ValidationKit/testanalysis/Makefile.kmk
index 9de056e..f3f8896 100644
--- a/src/VBox/ValidationKit/testanalysis/Makefile.kmk
+++ b/src/VBox/ValidationKit/testanalysis/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2010-2015 Oracle Corporation
+# Copyright (C) 2010-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/testanalysis/__init__.py b/src/VBox/ValidationKit/testanalysis/__init__.py
index 9fa2e1e..9777957 100644
--- a/src/VBox/ValidationKit/testanalysis/__init__.py
+++ b/src/VBox/ValidationKit/testanalysis/__init__.py
@@ -7,7 +7,7 @@ Test analysis package
 
 __copyright__ = \
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,6 +26,6 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 __all__     = ["reader", "diff", "reporting"]
 
diff --git a/src/VBox/ValidationKit/testanalysis/diff.py b/src/VBox/ValidationKit/testanalysis/diff.py
index fc92739..423531a 100755
--- a/src/VBox/ValidationKit/testanalysis/diff.py
+++ b/src/VBox/ValidationKit/testanalysis/diff.py
@@ -7,7 +7,7 @@ Diff two test sets.
 
 __copyright__ = \
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 __all__     = ['BaselineDiff', ];
 
 
diff --git a/src/VBox/ValidationKit/testanalysis/reader.py b/src/VBox/ValidationKit/testanalysis/reader.py
index 93f2028..0397a81 100755
--- a/src/VBox/ValidationKit/testanalysis/reader.py
+++ b/src/VBox/ValidationKit/testanalysis/reader.py
@@ -10,7 +10,7 @@ reporting.
 
 __copyright__ = \
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 __all__     = ['ParseTestResult', ]
 
 # Standard python imports.
diff --git a/src/VBox/ValidationKit/testanalysis/reporting.py b/src/VBox/ValidationKit/testanalysis/reporting.py
index 1ba8c2a..fe0280c 100755
--- a/src/VBox/ValidationKit/testanalysis/reporting.py
+++ b/src/VBox/ValidationKit/testanalysis/reporting.py
@@ -10,7 +10,7 @@ or normal text report from it.
 
 __copyright__ = \
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 __all__     = ['HtmlReport', 'RstReport', 'TextReport'];
 
 
diff --git a/src/VBox/ValidationKit/testanalysis/tst-a1.py b/src/VBox/ValidationKit/testanalysis/tst-a1.py
index 6ac67d0..f1a4294 100755
--- a/src/VBox/ValidationKit/testanalysis/tst-a1.py
+++ b/src/VBox/ValidationKit/testanalysis/tst-a1.py
@@ -8,7 +8,7 @@ Analyzer Experiment  1.
 
 __copyright__ = \
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 
 import os.path
diff --git a/src/VBox/ValidationKit/testboxscript/Makefile.kmk b/src/VBox/ValidationKit/testboxscript/Makefile.kmk
index d16108f..6d7faff 100644
--- a/src/VBox/ValidationKit/testboxscript/Makefile.kmk
+++ b/src/VBox/ValidationKit/testboxscript/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2012-2015 Oracle Corporation
+# Copyright (C) 2012-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/testboxscript/TestBoxHelper.cpp b/src/VBox/ValidationKit/testboxscript/TestBoxHelper.cpp
index 280cf5b..fa4b8a4 100644
--- a/src/VBox/ValidationKit/testboxscript/TestBoxHelper.cpp
+++ b/src/VBox/ValidationKit/testboxscript/TestBoxHelper.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/testboxscript/testboxcommand.py b/src/VBox/ValidationKit/testboxscript/testboxcommand.py
index f7f5c95..a9d3c59 100755
--- a/src/VBox/ValidationKit/testboxscript/testboxcommand.py
+++ b/src/VBox/ValidationKit/testboxscript/testboxcommand.py
@@ -7,7 +7,7 @@ TestBox Script - Command Processor.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 # Standard python imports.
 import os;
diff --git a/src/VBox/ValidationKit/testboxscript/testboxcommons.py b/src/VBox/ValidationKit/testboxscript/testboxcommons.py
index f7f309f..62be14e 100755
--- a/src/VBox/ValidationKit/testboxscript/testboxcommons.py
+++ b/src/VBox/ValidationKit/testboxscript/testboxcommons.py
@@ -10,7 +10,7 @@ the files in this (testbox) directory.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 108245 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard python imports.
diff --git a/src/VBox/ValidationKit/testboxscript/testboxconnection.py b/src/VBox/ValidationKit/testboxscript/testboxconnection.py
index 2302d90..986e5af 100755
--- a/src/VBox/ValidationKit/testboxscript/testboxconnection.py
+++ b/src/VBox/ValidationKit/testboxscript/testboxconnection.py
@@ -7,7 +7,7 @@ TestBox Script - HTTP Connection Handling.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard python imports.
diff --git a/src/VBox/ValidationKit/testboxscript/testboxscript.py b/src/VBox/ValidationKit/testboxscript/testboxscript.py
index ec2a0b6..d22cd30 100755
--- a/src/VBox/ValidationKit/testboxscript/testboxscript.py
+++ b/src/VBox/ValidationKit/testboxscript/testboxscript.py
@@ -11,7 +11,7 @@ abnormally or due to an UPGRADE request.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -30,7 +30,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 108245 $"
+__version__ = "$Revision: 109040 $"
 
 import subprocess
 import sys
diff --git a/src/VBox/ValidationKit/testboxscript/testboxscript_real.py b/src/VBox/ValidationKit/testboxscript/testboxscript_real.py
index e525d82..9f6244b 100755
--- a/src/VBox/ValidationKit/testboxscript/testboxscript_real.py
+++ b/src/VBox/ValidationKit/testboxscript/testboxscript_real.py
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 108543 $"
+__version__ = "$Revision: 109027 $"
 
 
 # Standard python imports.
@@ -1033,4 +1033,3 @@ class TestBoxScript(object):
 if __name__ == '__main__':
     sys.exit(TestBoxScript.main());
 
-
diff --git a/src/VBox/ValidationKit/testboxscript/testboxtasks.py b/src/VBox/ValidationKit/testboxscript/testboxtasks.py
index 5945287..e7c99e3 100755
--- a/src/VBox/ValidationKit/testboxscript/testboxtasks.py
+++ b/src/VBox/ValidationKit/testboxscript/testboxtasks.py
@@ -7,7 +7,7 @@ TestBox Script - Async Tasks.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 108543 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard python imports.
diff --git a/src/VBox/ValidationKit/testboxscript/testboxupgrade.py b/src/VBox/ValidationKit/testboxscript/testboxupgrade.py
index 6a8257c..aa7b7f6 100755
--- a/src/VBox/ValidationKit/testboxscript/testboxupgrade.py
+++ b/src/VBox/ValidationKit/testboxscript/testboxupgrade.py
@@ -7,7 +7,7 @@ TestBox Script - Upgrade from local file ZIP.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 # Standard python imports.
 import os
diff --git a/src/VBox/ValidationKit/testdriver/Makefile.kmk b/src/VBox/ValidationKit/testdriver/Makefile.kmk
index 31e5b0f..39d7abe 100644
--- a/src/VBox/ValidationKit/testdriver/Makefile.kmk
+++ b/src/VBox/ValidationKit/testdriver/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2010-2015 Oracle Corporation
+# Copyright (C) 2010-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/testdriver/__init__.py b/src/VBox/ValidationKit/testdriver/__init__.py
index d1d3528..c1100a9 100644
--- a/src/VBox/ValidationKit/testdriver/__init__.py
+++ b/src/VBox/ValidationKit/testdriver/__init__.py
@@ -7,7 +7,7 @@ Test driver package
 
 __copyright__ = \
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,5 +27,5 @@ You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
 
-__version__ = "$Revision: 100880 $";
+__version__ = "$Revision: 109040 $";
 
diff --git a/src/VBox/ValidationKit/testdriver/base.py b/src/VBox/ValidationKit/testdriver/base.py
index fb2d01b..d243e38 100755
--- a/src/VBox/ValidationKit/testdriver/base.py
+++ b/src/VBox/ValidationKit/testdriver/base.py
@@ -8,7 +8,7 @@ Base testdriver module.
 
 __copyright__ = \
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 108584 $"
+__version__ = "$Revision: 109382 $"
 
 
 # Standard Python imports.
@@ -849,13 +849,20 @@ class TestDriverBase(object): # pylint: disable=R0902
         else:
             reporter.log('TESTBOX_TIMEOUT_ABS not found in the environment');
 
-
         # Distance from secTimeoutAbs that timeouts should be adjusted to.
         self.secTimeoutFudge = 30;
 
         # List of sub-test drivers (SubTestDriverBase derivatives).
         self.aoSubTstDrvs    = [];
 
+        # Use the scratch path for temporary files.
+        if self.sHost in ['win', 'os2']:
+            os.environ['TMP']     = self.sScratchPath;
+            os.environ['TEMP']    = self.sScratchPath;
+        os.environ['TMPDIR']      = self.sScratchPath;
+        os.environ['IPRT_TMPDIR'] = self.sScratchPath; # IPRT/VBox specific.
+
+
     def dump(self):
         """
         For debugging. --> __str__?
diff --git a/src/VBox/ValidationKit/testdriver/reporter.py b/src/VBox/ValidationKit/testdriver/reporter.py
index 1f0177c..2dea122 100755
--- a/src/VBox/ValidationKit/testdriver/reporter.py
+++ b/src/VBox/ValidationKit/testdriver/reporter.py
@@ -8,7 +8,7 @@ Testdriver reporter module.
 
 __copyright__ = \
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 108858 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard Python imports.
diff --git a/src/VBox/ValidationKit/testdriver/tst-txsclient.py b/src/VBox/ValidationKit/testdriver/tst-txsclient.py
index 52e5441..b6a47f9 100755
--- a/src/VBox/ValidationKit/testdriver/tst-txsclient.py
+++ b/src/VBox/ValidationKit/testdriver/tst-txsclient.py
@@ -7,7 +7,7 @@ Simple testcase for txsclient.py.
 
 __copyright__ = \
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 108240 $"
+__version__ = "$Revision: 109040 $"
 
 # Standard python imports.
 import os
diff --git a/src/VBox/ValidationKit/testdriver/txsclient.py b/src/VBox/ValidationKit/testdriver/txsclient.py
index 35d874c..ed465f3 100755
--- a/src/VBox/ValidationKit/testdriver/txsclient.py
+++ b/src/VBox/ValidationKit/testdriver/txsclient.py
@@ -7,7 +7,7 @@ Test eXecution Service Client.
 """
 __copyright__ = \
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 108686 $"
+__version__ = "$Revision: 109040 $"
 
 # Standard Python imports.
 import array
diff --git a/src/VBox/ValidationKit/testdriver/vboxcon.py b/src/VBox/ValidationKit/testdriver/vboxcon.py
index fd5e1d1..33f56d2 100755
--- a/src/VBox/ValidationKit/testdriver/vboxcon.py
+++ b/src/VBox/ValidationKit/testdriver/vboxcon.py
@@ -9,7 +9,7 @@ See VBoxConstantWrappingHack for details.
 
 __copyright__ = \
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -28,7 +28,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard Python imports.
diff --git a/src/VBox/ValidationKit/testdriver/vboxinstaller.py b/src/VBox/ValidationKit/testdriver/vboxinstaller.py
index 164cf61..9e6759d 100755
--- a/src/VBox/ValidationKit/testdriver/vboxinstaller.py
+++ b/src/VBox/ValidationKit/testdriver/vboxinstaller.py
@@ -11,7 +11,7 @@ other VBox test drivers.
 
 __copyright__ = \
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -30,7 +30,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 108428 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard Python imports.
diff --git a/src/VBox/ValidationKit/testdriver/vboxtestvms.py b/src/VBox/ValidationKit/testdriver/vboxtestvms.py
index 294ccc2..e3fc51b 100755
--- a/src/VBox/ValidationKit/testdriver/vboxtestvms.py
+++ b/src/VBox/ValidationKit/testdriver/vboxtestvms.py
@@ -7,7 +7,7 @@ VirtualBox Test VMs
 
 __copyright__ = \
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 108458 $"
+__version__ = "$Revision: 109040 $"
 
 # Standard Python imports.
 import re;
diff --git a/src/VBox/ValidationKit/testdriver/vboxwrappers.py b/src/VBox/ValidationKit/testdriver/vboxwrappers.py
index 00280c9..a055a25 100755
--- a/src/VBox/ValidationKit/testdriver/vboxwrappers.py
+++ b/src/VBox/ValidationKit/testdriver/vboxwrappers.py
@@ -8,7 +8,7 @@ VirtualBox Wrapper Classes
 
 __copyright__ = \
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 108748 $"
+__version__ = "$Revision: 109760 $"
 
 
 # Standard Python imports.
@@ -1794,19 +1794,22 @@ class SessionWrapper(TdTaskBase):
         self.oTstDrv.processPendingEvents();
         return fRc;
 
-    def createBaseHd(self, sHd, sFmt = "VDI", cb = 10*1024*1024*1024):
+    def createBaseHd(self, sHd, sFmt = "VDI", cb = 10*1024*1024*1024, cMsTimeout = 60000, tMediumVariant = None):
         """
         Creates a base HD.
         Returns Medium object on success and None on failure.  Error information is logged.
         """
+        if tMediumVariant is None:
+            tMediumVariant = (vboxcon.MediumVariant_Standard, );
+
         try:
             if self.fpApiVer >= 5.0:
                 oHd = self.oVBox.createMedium(sFmt, sHd, vboxcon.AccessMode_ReadWrite, vboxcon.DeviceType_HardDisk);
             else:
                 oHd = self.oVBox.createHardDisk(sFmt, sHd);
-            oProgressXpcom = oHd.createBaseStorage(cb, (vboxcon.MediumVariant_Standard, ))
+            oProgressXpcom = oHd.createBaseStorage(cb, tMediumVariant);
             oProgress = ProgressWrapper(oProgressXpcom, self.oVBoxMgr, self.oTstDrv, 'create base disk %s' % (sHd));
-            oProgress.wait();
+            oProgress.wait(cMsTimeout);
             oProgress.logResult();
         except:
             reporter.errorXcpt('failed to create base hd "%s"' % (sHd));
@@ -1834,8 +1837,8 @@ class SessionWrapper(TdTaskBase):
 
         return oHd;
 
-    def createAndAttachHd(self, sHd, sFmt = "VDI", sController = "IDE Controller", cb = 10*1024*1024*1024, \
-                          iPort = 0, iDevice = 0, fImmutable = True):
+    def createAndAttachHd(self, sHd, sFmt = "VDI", sController = "IDE Controller", cb = 10*1024*1024*1024, # pylint: disable=R0913
+                          iPort = 0, iDevice = 0, fImmutable = True, cMsTimeout = 60000, tMediumVariant = None):
         """
         Creates and attaches a HD to a VM.
         Returns True on success and False on failure.  Error information is logged.
@@ -1843,7 +1846,7 @@ class SessionWrapper(TdTaskBase):
         if not self.ensureControllerAttached(sController):
             return False;
 
-        oHd = self.createBaseHd(sHd, sFmt, cb)
+        oHd = self.createBaseHd(sHd, sFmt, cb, cMsTimeout, tMediumVariant);
         if oHd is None:
             return False;
 
diff --git a/src/VBox/ValidationKit/testdriver/winbase.py b/src/VBox/ValidationKit/testdriver/winbase.py
index e16b15d..091b371 100755
--- a/src/VBox/ValidationKit/testdriver/winbase.py
+++ b/src/VBox/ValidationKit/testdriver/winbase.py
@@ -8,7 +8,7 @@ a hard time when running on non-Windows systems.
 
 __copyright__ = \
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 108395 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard Python imports.
diff --git a/src/VBox/ValidationKit/testmanager/Makefile.kmk b/src/VBox/ValidationKit/testmanager/Makefile.kmk
index 996d25c..4cd58aa 100644
--- a/src/VBox/ValidationKit/testmanager/Makefile.kmk
+++ b/src/VBox/ValidationKit/testmanager/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/testmanager/__init__.py b/src/VBox/ValidationKit/testmanager/__init__.py
index aa66b38..5171812 100644
--- a/src/VBox/ValidationKit/testmanager/__init__.py
+++ b/src/VBox/ValidationKit/testmanager/__init__.py
@@ -7,7 +7,7 @@ Test Manager.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,5 +26,5 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
diff --git a/src/VBox/ValidationKit/testmanager/batch/Makefile.kmk b/src/VBox/ValidationKit/testmanager/batch/Makefile.kmk
index b3e8eb9..97ac6a5 100644
--- a/src/VBox/ValidationKit/testmanager/batch/Makefile.kmk
+++ b/src/VBox/ValidationKit/testmanager/batch/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/testmanager/batch/add_build.py b/src/VBox/ValidationKit/testmanager/batch/add_build.py
index 8ab5ba9..3721701 100755
--- a/src/VBox/ValidationKit/testmanager/batch/add_build.py
+++ b/src/VBox/ValidationKit/testmanager/batch/add_build.py
@@ -9,7 +9,7 @@ Interface used by the tinderbox server side software to add a fresh build.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -28,7 +28,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 # Standard python imports
 import sys;
diff --git a/src/VBox/ValidationKit/testmanager/batch/check_for_deleted_builds.py b/src/VBox/ValidationKit/testmanager/batch/check_for_deleted_builds.py
new file mode 100755
index 0000000..d62267a
--- /dev/null
+++ b/src/VBox/ValidationKit/testmanager/batch/check_for_deleted_builds.py
@@ -0,0 +1,119 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# $Id: check_for_deleted_builds.py $
+# pylint: disable=C0301
+
+"""
+Admin job for checking detecting deleted builds.
+
+This is necessary when the tinderbox <-> test manager interface was
+busted and the build info in is out of sync.  The result is generally
+a lot of skipped tests because of missing builds, typically during
+bisecting problems.
+"""
+
+__copyright__ = \
+"""
+Copyright (C) 2012-2016 Oracle Corporation
+
+This file is part of VirtualBox Open Source Edition (OSE), as
+available from http://www.virtualbox.org. This file is free software;
+you can redistribute it and/or modify it under the terms of the GNU
+General Public License (GPL) as published by the Free Software
+Foundation, in version 2 as it comes in the "COPYING" file of the
+VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+
+The contents of this file may alternatively be used under the terms
+of the Common Development and Distribution License Version 1.0
+(CDDL) only, as it comes in the "COPYING.CDDL" file of the
+VirtualBox OSE distribution, in which case the provisions of the
+CDDL are applicable instead of those of the GPL.
+
+You may elect to license modified versions of this file under the
+terms and conditions of either the GPL or the CDDL or both.
+"""
+__version__ = "$Revision: 109118 $"
+
+# Standard python imports
+import sys;
+import os;
+from optparse import OptionParser;
+
+# Add Test Manager's modules path
+g_ksTestManagerDir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))));
+sys.path.append(g_ksTestManagerDir);
+
+# Test Manager imports
+from testmanager.core.db    import TMDatabaseConnection;
+from testmanager.core.build import BuildLogic;
+
+class BuildChecker(object): # pylint: disable=R0903
+    """
+    Add build info into Test Manager database.
+    """
+
+    def __init__(self):
+        """
+        Parse command line.
+        """
+
+        oParser = OptionParser();
+        oParser.add_option('-q', '--quiet', dest = 'fQuiet', action = 'store_true',  default = False,
+                           help = 'Quiet execution');
+        oParser.add_option('--dry-run', dest = 'fRealRun',   action = 'store_false', default = False,
+                           help = 'Dry run');
+        oParser.add_option('--real-run', dest = 'fRealRun',  action = 'store_true',  default = False,
+                           help = 'Real run');
+
+        (self.oConfig, _) = oParser.parse_args();
+        if not self.oConfig.fQuiet:
+            if not self.oConfig.fRealRun:
+                print 'Dry run.';
+            else:
+                print 'Real run! Will commit findings!';
+
+
+    def checkBuilds(self):
+        """
+        Add build data record into database.
+        """
+        oDb = TMDatabaseConnection();
+        oBuildLogic = BuildLogic(oDb);
+
+        tsNow    = oDb.getCurrentTimestamp();
+        cMaxRows = 1024;
+        iStart   = 0;
+        while True:
+            aoBuilds = oBuildLogic.fetchForListing(iStart, cMaxRows, tsNow);
+            if not self.oConfig.fQuiet and len(aoBuilds) > 0:
+                print 'Processing builds #%s thru #%s' % (aoBuilds[0].idBuild, aoBuilds[-1].idBuild);
+
+            for oBuild in aoBuilds:
+                if oBuild.fBinariesDeleted is False:
+                    rc = oBuild.areFilesStillThere();
+                    if rc is False:
+                        if not self.oConfig.fQuiet:
+                            print 'missing files for build #%s / r%s / %s / %s / %s / %s / %s' \
+                                % (oBuild.idBuild, oBuild.iRevision, oBuild.sVersion, oBuild.oCat.sType,
+                                   oBuild.oCat.sBranch, oBuild.oCat.sProduct, oBuild.oCat.asOsArches,);
+                            print '  %s' % (oBuild.sBinaries,);
+                        if self.oConfig.fRealRun is True:
+                            oBuild.fBinariesDeleted = True;
+                            oBuildLogic.editEntry(oBuild, fCommit = True);
+                    elif rc is True and not self.oConfig.fQuiet:
+                        print 'build #%s still have its files' % (oBuild.idBuild,);
+                    elif rc is None and not self.oConfig.fQuiet:
+                        print 'Unable to determine state of build #%s' % (oBuild.idBuild,);
+
+            # advance
+            if len(aoBuilds) < cMaxRows:
+                break;
+            iStart += len(aoBuilds);
+
+        oDb.close();
+        return 0;
+
+if __name__ == '__main__':
+    sys.exit(BuildChecker().checkBuilds());
+
diff --git a/src/VBox/ValidationKit/testmanager/batch/close_orphaned_testsets.py b/src/VBox/ValidationKit/testmanager/batch/close_orphaned_testsets.py
index ef7fb0b..e61f0b3 100755
--- a/src/VBox/ValidationKit/testmanager/batch/close_orphaned_testsets.py
+++ b/src/VBox/ValidationKit/testmanager/batch/close_orphaned_testsets.py
@@ -9,7 +9,7 @@ Maintenance tool for closing orphaned testsets.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -28,7 +28,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107801 $"
+__version__ = "$Revision: 109040 $"
 
 # Standard python imports
 import sys
diff --git a/src/VBox/ValidationKit/testmanager/batch/del_build.py b/src/VBox/ValidationKit/testmanager/batch/del_build.py
index ba29d10..17e8df3 100755
--- a/src/VBox/ValidationKit/testmanager/batch/del_build.py
+++ b/src/VBox/ValidationKit/testmanager/batch/del_build.py
@@ -10,7 +10,7 @@ deleted.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 # Standard python imports
 import sys
diff --git a/src/VBox/ValidationKit/testmanager/batch/filearchiver.py b/src/VBox/ValidationKit/testmanager/batch/filearchiver.py
index 4521c59..bc843db 100755
--- a/src/VBox/ValidationKit/testmanager/batch/filearchiver.py
+++ b/src/VBox/ValidationKit/testmanager/batch/filearchiver.py
@@ -10,7 +10,7 @@ g_ksZipFileAreaRootDir storage area.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 # Standard python imports
 import sys
diff --git a/src/VBox/ValidationKit/testmanager/batch/regen_sched_queues.py b/src/VBox/ValidationKit/testmanager/batch/regen_sched_queues.py
index fff0745..52e5218 100755
--- a/src/VBox/ValidationKit/testmanager/batch/regen_sched_queues.py
+++ b/src/VBox/ValidationKit/testmanager/batch/regen_sched_queues.py
@@ -9,7 +9,7 @@ Interface used by the admin to regenerate scheduling queues.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -28,7 +28,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 101450 $"
+__version__ = "$Revision: 109040 $"
 
 # Standard python imports
 import sys;
diff --git a/src/VBox/ValidationKit/testmanager/batch/vcs_import.py b/src/VBox/ValidationKit/testmanager/batch/vcs_import.py
index cb201f1..33266c4 100755
--- a/src/VBox/ValidationKit/testmanager/batch/vcs_import.py
+++ b/src/VBox/ValidationKit/testmanager/batch/vcs_import.py
@@ -9,7 +9,7 @@ Cron job for importing revision history for a repository.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -28,7 +28,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 # Standard python imports
 import sys;
diff --git a/src/VBox/ValidationKit/testmanager/cgi/Makefile.kmk b/src/VBox/ValidationKit/testmanager/cgi/Makefile.kmk
index b3e8eb9..97ac6a5 100644
--- a/src/VBox/ValidationKit/testmanager/cgi/Makefile.kmk
+++ b/src/VBox/ValidationKit/testmanager/cgi/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/testmanager/cgi/admin.py b/src/VBox/ValidationKit/testmanager/cgi/admin.py
index d2b191e..792f3e6 100755
--- a/src/VBox/ValidationKit/testmanager/cgi/admin.py
+++ b/src/VBox/ValidationKit/testmanager/cgi/admin.py
@@ -8,7 +8,7 @@ CGI - Administrator Web-UI.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard python imports.
diff --git a/src/VBox/ValidationKit/testmanager/cgi/debuginfo.py b/src/VBox/ValidationKit/testmanager/cgi/debuginfo.py
index 48b23ad..0d66e11 100755
--- a/src/VBox/ValidationKit/testmanager/cgi/debuginfo.py
+++ b/src/VBox/ValidationKit/testmanager/cgi/debuginfo.py
@@ -8,7 +8,7 @@ CGI - Debug Info Page.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard python imports.
diff --git a/src/VBox/ValidationKit/testmanager/cgi/index.py b/src/VBox/ValidationKit/testmanager/cgi/index.py
index 917e15b..5246d85 100755
--- a/src/VBox/ValidationKit/testmanager/cgi/index.py
+++ b/src/VBox/ValidationKit/testmanager/cgi/index.py
@@ -8,7 +8,7 @@ CGI - Web UI - Main (index) page.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard python imports.
diff --git a/src/VBox/ValidationKit/testmanager/cgi/logout.py b/src/VBox/ValidationKit/testmanager/cgi/logout.py
index b815b88..0aa4746 100755
--- a/src/VBox/ValidationKit/testmanager/cgi/logout.py
+++ b/src/VBox/ValidationKit/testmanager/cgi/logout.py
@@ -8,7 +8,7 @@ VirtualBox Validation Kit - CGI - Log out page.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard python imports.
diff --git a/src/VBox/ValidationKit/testmanager/cgi/logout2.py b/src/VBox/ValidationKit/testmanager/cgi/logout2.py
index 46a6de0..6e30972 100755
--- a/src/VBox/ValidationKit/testmanager/cgi/logout2.py
+++ b/src/VBox/ValidationKit/testmanager/cgi/logout2.py
@@ -8,7 +8,7 @@ VirtualBox Validation Kit - CGI - Log out page for Safari.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard python imports.
diff --git a/src/VBox/ValidationKit/testmanager/cgi/testboxdisp.py b/src/VBox/ValidationKit/testmanager/cgi/testboxdisp.py
index 3916bcc..2b5468f 100755
--- a/src/VBox/ValidationKit/testmanager/cgi/testboxdisp.py
+++ b/src/VBox/ValidationKit/testmanager/cgi/testboxdisp.py
@@ -8,7 +8,7 @@ CGI - TestBox Interaction (see testboxscript or the other party).
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard python imports.
diff --git a/src/VBox/ValidationKit/testmanager/core/Makefile.kmk b/src/VBox/ValidationKit/testmanager/core/Makefile.kmk
index b3e8eb9..97ac6a5 100644
--- a/src/VBox/ValidationKit/testmanager/core/Makefile.kmk
+++ b/src/VBox/ValidationKit/testmanager/core/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/testmanager/core/__init__.py b/src/VBox/ValidationKit/testmanager/core/__init__.py
index 171c327..ff15e19 100644
--- a/src/VBox/ValidationKit/testmanager/core/__init__.py
+++ b/src/VBox/ValidationKit/testmanager/core/__init__.py
@@ -7,7 +7,7 @@ TestBox Script - Core Logic.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,5 +26,5 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
diff --git a/src/VBox/ValidationKit/testmanager/core/base.py b/src/VBox/ValidationKit/testmanager/core/base.py
index 130cc2a..186fb2e 100755
--- a/src/VBox/ValidationKit/testmanager/core/base.py
+++ b/src/VBox/ValidationKit/testmanager/core/base.py
@@ -8,7 +8,7 @@ Test Manager Core - Base Class(es).
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107838 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard python imports.
diff --git a/src/VBox/ValidationKit/testmanager/core/build.py b/src/VBox/ValidationKit/testmanager/core/build.py
index 0b61d2a..b04050d 100755
--- a/src/VBox/ValidationKit/testmanager/core/build.py
+++ b/src/VBox/ValidationKit/testmanager/core/build.py
@@ -7,7 +7,7 @@ Test Manager - Builds.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107509 $"
+__version__ = "$Revision: 109117 $"
 
 
 # Standard python imports.
@@ -433,6 +433,8 @@ class BuildDataEx(BuildData):
     Complete data set.
     """
 
+    kasInternalAttributes = [ 'oCat', ];
+
     def __init__(self):
         BuildData.__init__(self);
         self.oCat = None;
diff --git a/src/VBox/ValidationKit/testmanager/core/buildblacklist.py b/src/VBox/ValidationKit/testmanager/core/buildblacklist.py
index e0cc24e..83deeee 100755
--- a/src/VBox/ValidationKit/testmanager/core/buildblacklist.py
+++ b/src/VBox/ValidationKit/testmanager/core/buildblacklist.py
@@ -7,7 +7,7 @@ Test Manager - Builds Blacklist.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107509 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Validation Kit imports.
diff --git a/src/VBox/ValidationKit/testmanager/core/buildsource.py b/src/VBox/ValidationKit/testmanager/core/buildsource.py
index 87e37ee..3c797f7 100755
--- a/src/VBox/ValidationKit/testmanager/core/buildsource.py
+++ b/src/VBox/ValidationKit/testmanager/core/buildsource.py
@@ -7,7 +7,7 @@ Test Manager - Build Sources.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107509 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard python imports.
diff --git a/src/VBox/ValidationKit/testmanager/core/coreconsts.py b/src/VBox/ValidationKit/testmanager/core/coreconsts.py
index 5cce78a..1957fc3 100644
--- a/src/VBox/ValidationKit/testmanager/core/coreconsts.py
+++ b/src/VBox/ValidationKit/testmanager/core/coreconsts.py
@@ -7,7 +7,7 @@ Test Manager - Test Manager Constants (without a more appropriate home).
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 ## OS agnostic.
 g_ksOsAgnostic      = 'os-agnostic';
diff --git a/src/VBox/ValidationKit/testmanager/core/db.py b/src/VBox/ValidationKit/testmanager/core/db.py
index 41e9a05..129563a 100755
--- a/src/VBox/ValidationKit/testmanager/core/db.py
+++ b/src/VBox/ValidationKit/testmanager/core/db.py
@@ -7,7 +7,7 @@ Test Manager - Database Interface.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107838 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard python imports.
diff --git a/src/VBox/ValidationKit/testmanager/core/dbobjcache.py b/src/VBox/ValidationKit/testmanager/core/dbobjcache.py
index 5dce210..f204a40 100755
--- a/src/VBox/ValidationKit/testmanager/core/dbobjcache.py
+++ b/src/VBox/ValidationKit/testmanager/core/dbobjcache.py
@@ -7,7 +7,7 @@ Test Manager - Database object cache.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107509 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Validation Kit imports.
diff --git a/src/VBox/ValidationKit/testmanager/core/failurecategory.py b/src/VBox/ValidationKit/testmanager/core/failurecategory.py
index fce5ed5..c57756b 100755
--- a/src/VBox/ValidationKit/testmanager/core/failurecategory.py
+++ b/src/VBox/ValidationKit/testmanager/core/failurecategory.py
@@ -7,7 +7,7 @@ Test Manager - Failure Categories.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107578 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Validation Kit imports.
@@ -372,4 +372,3 @@ class FailureCategoryLogic(ModelLogicBase): # pylint: disable=R0903
                           , (tsExpire, idFailureCategory,));
         return True;
 
-
diff --git a/src/VBox/ValidationKit/testmanager/core/failurereason.py b/src/VBox/ValidationKit/testmanager/core/failurereason.py
index bedee1a..4eb6518 100755
--- a/src/VBox/ValidationKit/testmanager/core/failurereason.py
+++ b/src/VBox/ValidationKit/testmanager/core/failurereason.py
@@ -7,7 +7,7 @@ Test Manager - Failure Reasons.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107741 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Validation Kit imports.
@@ -560,4 +560,3 @@ class FailureReasonLogic(ModelLogicBase): # pylint: disable=R0903
             self.oUserAccountLogic = UserAccountLogic(self._oDb);
         return True;
 
-
diff --git a/src/VBox/ValidationKit/testmanager/core/globalresource.py b/src/VBox/ValidationKit/testmanager/core/globalresource.py
index 6a1494a..f51e322 100755
--- a/src/VBox/ValidationKit/testmanager/core/globalresource.py
+++ b/src/VBox/ValidationKit/testmanager/core/globalresource.py
@@ -7,7 +7,7 @@ Test Manager - Global Resources.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107799 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard python imports.
diff --git a/src/VBox/ValidationKit/testmanager/core/report.py b/src/VBox/ValidationKit/testmanager/core/report.py
index 8cc6b93..5811ca5 100755
--- a/src/VBox/ValidationKit/testmanager/core/report.py
+++ b/src/VBox/ValidationKit/testmanager/core/report.py
@@ -7,7 +7,7 @@ Test Manager - Report models.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107806 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Validation Kit imports.
diff --git a/src/VBox/ValidationKit/testmanager/core/schedgroup.py b/src/VBox/ValidationKit/testmanager/core/schedgroup.py
index 37589f8..5bb9e3d 100755
--- a/src/VBox/ValidationKit/testmanager/core/schedgroup.py
+++ b/src/VBox/ValidationKit/testmanager/core/schedgroup.py
@@ -7,7 +7,7 @@ Test Manager - Scheduling Group.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 108617 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard python imports.
diff --git a/src/VBox/ValidationKit/testmanager/core/schedulerbase.py b/src/VBox/ValidationKit/testmanager/core/schedulerbase.py
index 20eae78..1bc3899 100755
--- a/src/VBox/ValidationKit/testmanager/core/schedulerbase.py
+++ b/src/VBox/ValidationKit/testmanager/core/schedulerbase.py
@@ -9,7 +9,7 @@ Test Manager - Base class and utilities for the schedulers.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -28,7 +28,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107844 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard python imports.
diff --git a/src/VBox/ValidationKit/testmanager/core/schedulerbeci.py b/src/VBox/ValidationKit/testmanager/core/schedulerbeci.py
index 97d7b00..9877b5c 100755
--- a/src/VBox/ValidationKit/testmanager/core/schedulerbeci.py
+++ b/src/VBox/ValidationKit/testmanager/core/schedulerbeci.py
@@ -7,7 +7,7 @@ Test Manager - Best-Effort-Continuous-Integration (BECI) scheduler.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107844 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Validation Kit imports.
diff --git a/src/VBox/ValidationKit/testmanager/core/systemlog.py b/src/VBox/ValidationKit/testmanager/core/systemlog.py
index 3ba8b25..2f5c6c9 100755
--- a/src/VBox/ValidationKit/testmanager/core/systemlog.py
+++ b/src/VBox/ValidationKit/testmanager/core/systemlog.py
@@ -7,7 +7,7 @@ Test Manager - SystemLog.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107801 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard python imports.
diff --git a/src/VBox/ValidationKit/testmanager/core/testbox.py b/src/VBox/ValidationKit/testmanager/core/testbox.py
index 54d29af..9b2b584 100755
--- a/src/VBox/ValidationKit/testmanager/core/testbox.py
+++ b/src/VBox/ValidationKit/testmanager/core/testbox.py
@@ -7,7 +7,7 @@ Test Manager - TestBox.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107936 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard python imports.
diff --git a/src/VBox/ValidationKit/testmanager/core/testboxcontroller.py b/src/VBox/ValidationKit/testmanager/core/testboxcontroller.py
index 4df466a..de9a752 100755
--- a/src/VBox/ValidationKit/testmanager/core/testboxcontroller.py
+++ b/src/VBox/ValidationKit/testmanager/core/testboxcontroller.py
@@ -7,7 +7,7 @@ Test Manager Core - Web Server Abstraction Base Class.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107847 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard python imports.
diff --git a/src/VBox/ValidationKit/testmanager/core/testboxstatus.py b/src/VBox/ValidationKit/testmanager/core/testboxstatus.py
index 3220ba6..9b373b3 100755
--- a/src/VBox/ValidationKit/testmanager/core/testboxstatus.py
+++ b/src/VBox/ValidationKit/testmanager/core/testboxstatus.py
@@ -7,7 +7,7 @@ Test Manager - TestBoxStatus.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107843 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard python imports.
diff --git a/src/VBox/ValidationKit/testmanager/core/testcase.py b/src/VBox/ValidationKit/testmanager/core/testcase.py
index 62a3cb5..ff83af0 100755
--- a/src/VBox/ValidationKit/testmanager/core/testcase.py
+++ b/src/VBox/ValidationKit/testmanager/core/testcase.py
@@ -8,7 +8,7 @@ Test Manager - Test Case.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107799 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard python imports.
diff --git a/src/VBox/ValidationKit/testmanager/core/testcaseargs.py b/src/VBox/ValidationKit/testmanager/core/testcaseargs.py
index 55604c6..4207c48 100755
--- a/src/VBox/ValidationKit/testmanager/core/testcaseargs.py
+++ b/src/VBox/ValidationKit/testmanager/core/testcaseargs.py
@@ -7,7 +7,7 @@ Test Manager - Test Case Arguments Variations.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107578 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard python imports.
diff --git a/src/VBox/ValidationKit/testmanager/core/testgroup.py b/src/VBox/ValidationKit/testmanager/core/testgroup.py
index 3ea7558..b9a9465 100755
--- a/src/VBox/ValidationKit/testmanager/core/testgroup.py
+++ b/src/VBox/ValidationKit/testmanager/core/testgroup.py
@@ -7,7 +7,7 @@ Test Manager - Test groups management.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 108615 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard python imports.
diff --git a/src/VBox/ValidationKit/testmanager/core/testresultfailures.py b/src/VBox/ValidationKit/testmanager/core/testresultfailures.py
index c85ca64..cfd7ed1 100755
--- a/src/VBox/ValidationKit/testmanager/core/testresultfailures.py
+++ b/src/VBox/ValidationKit/testmanager/core/testresultfailures.py
@@ -10,7 +10,7 @@ Test Manager - Test result failures.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107788 $"
+__version__ = "$Revision: 109040 $"
 # Standard python imports.
 import unittest;
 
diff --git a/src/VBox/ValidationKit/testmanager/core/testresults.py b/src/VBox/ValidationKit/testmanager/core/testresults.py
index 18ee86a..563e00d 100755
--- a/src/VBox/ValidationKit/testmanager/core/testresults.py
+++ b/src/VBox/ValidationKit/testmanager/core/testresults.py
@@ -10,7 +10,7 @@ Test Manager - Fetch test results.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -29,7 +29,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107847 $"
+__version__ = "$Revision: 109040 $"
 # Standard python imports.
 import unittest;
 
diff --git a/src/VBox/ValidationKit/testmanager/core/testset.py b/src/VBox/ValidationKit/testmanager/core/testset.py
index 5e3da69..9f59c12 100755
--- a/src/VBox/ValidationKit/testmanager/core/testset.py
+++ b/src/VBox/ValidationKit/testmanager/core/testset.py
@@ -7,7 +7,7 @@ Test Manager - TestSet.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107845 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard python imports.
diff --git a/src/VBox/ValidationKit/testmanager/core/useraccount.py b/src/VBox/ValidationKit/testmanager/core/useraccount.py
index ff3d87f..bda2c88 100755
--- a/src/VBox/ValidationKit/testmanager/core/useraccount.py
+++ b/src/VBox/ValidationKit/testmanager/core/useraccount.py
@@ -7,7 +7,7 @@ Test Manager - User DB records management.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107578 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard python imports.
diff --git a/src/VBox/ValidationKit/testmanager/core/vcsrevisions.py b/src/VBox/ValidationKit/testmanager/core/vcsrevisions.py
index 28a03ba..5169389 100755
--- a/src/VBox/ValidationKit/testmanager/core/vcsrevisions.py
+++ b/src/VBox/ValidationKit/testmanager/core/vcsrevisions.py
@@ -7,7 +7,7 @@ Test Manager - VcsRevisions
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107509 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard python imports.
diff --git a/src/VBox/ValidationKit/testmanager/core/webservergluebase.py b/src/VBox/ValidationKit/testmanager/core/webservergluebase.py
index bf40ebe..7b3a1f9 100755
--- a/src/VBox/ValidationKit/testmanager/core/webservergluebase.py
+++ b/src/VBox/ValidationKit/testmanager/core/webservergluebase.py
@@ -7,7 +7,7 @@ Test Manager Core - Web Server Abstraction Base Class.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107509 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard python imports.
diff --git a/src/VBox/ValidationKit/testmanager/core/webservergluecgi.py b/src/VBox/ValidationKit/testmanager/core/webservergluecgi.py
index df82f21..5466b11 100755
--- a/src/VBox/ValidationKit/testmanager/core/webservergluecgi.py
+++ b/src/VBox/ValidationKit/testmanager/core/webservergluecgi.py
@@ -7,7 +7,7 @@ Test Manager Core - Web Server Abstraction Base Class.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard python imports.
diff --git a/src/VBox/ValidationKit/testmanager/db/Makefile.kmk b/src/VBox/ValidationKit/testmanager/db/Makefile.kmk
index 197b34a..0eaa495 100644
--- a/src/VBox/ValidationKit/testmanager/db/Makefile.kmk
+++ b/src/VBox/ValidationKit/testmanager/db/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/testmanager/db/gen-sql-comments.py b/src/VBox/ValidationKit/testmanager/db/gen-sql-comments.py
index 9746a44..a45779b 100755
--- a/src/VBox/ValidationKit/testmanager/db/gen-sql-comments.py
+++ b/src/VBox/ValidationKit/testmanager/db/gen-sql-comments.py
@@ -3,7 +3,7 @@
 # $Id: gen-sql-comments.py $
 
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/testmanager/db/partial-db-dump.py b/src/VBox/ValidationKit/testmanager/db/partial-db-dump.py
index a81193c..0322417 100755
--- a/src/VBox/ValidationKit/testmanager/db/partial-db-dump.py
+++ b/src/VBox/ValidationKit/testmanager/db/partial-db-dump.py
@@ -28,7 +28,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107722 $"
+__version__ = "$Revision: 109027 $"
 
 # Standard python imports
 import sys;
@@ -341,4 +341,3 @@ class PartialDbDump(object): # pylint: disable=R0903
 if __name__ == '__main__':
     sys.exit(PartialDbDump().main());
 
-
diff --git a/src/VBox/ValidationKit/testmanager/db/tmdb-r16-testcaseargs-1-testresultfailures-1.pgsql b/src/VBox/ValidationKit/testmanager/db/tmdb-r16-testcaseargs-1-testresultfailures-1.pgsql
index 6d21e16..2fd3356 100644
--- a/src/VBox/ValidationKit/testmanager/db/tmdb-r16-testcaseargs-1-testresultfailures-1.pgsql
+++ b/src/VBox/ValidationKit/testmanager/db/tmdb-r16-testcaseargs-1-testresultfailures-1.pgsql
@@ -1,6 +1,6 @@
 -- $Id: tmdb-r16-testcaseargs-1-testresultfailures-1.pgsql $
 --- @file
--- VBox Test Manager Database - Adds sName to TestCaseArgs, idTestSet 
+-- VBox Test Manager Database - Adds sName to TestCaseArgs, idTestSet
 -- to TestResultFailures and add some indexes to the latter as well.
 --
 
diff --git a/src/VBox/ValidationKit/testmanager/debug/Makefile.kmk b/src/VBox/ValidationKit/testmanager/debug/Makefile.kmk
index b3e8eb9..97ac6a5 100644
--- a/src/VBox/ValidationKit/testmanager/debug/Makefile.kmk
+++ b/src/VBox/ValidationKit/testmanager/debug/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/testmanager/debug/__init__.py b/src/VBox/ValidationKit/testmanager/debug/__init__.py
index 7ea6583..d94df30 100644
--- a/src/VBox/ValidationKit/testmanager/debug/__init__.py
+++ b/src/VBox/ValidationKit/testmanager/debug/__init__.py
@@ -7,7 +7,7 @@ Test Manager - Debug Utilities.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,5 +26,5 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
diff --git a/src/VBox/ValidationKit/testmanager/debug/cgiprofiling.py b/src/VBox/ValidationKit/testmanager/debug/cgiprofiling.py
index da24dba..17f74d0 100755
--- a/src/VBox/ValidationKit/testmanager/debug/cgiprofiling.py
+++ b/src/VBox/ValidationKit/testmanager/debug/cgiprofiling.py
@@ -8,7 +8,7 @@ Debug - CGI Profiling.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 
 def profileIt(fnMain, sAppendToElement = 'main', sSort = 'time'):
diff --git a/src/VBox/ValidationKit/testmanager/misc/Makefile.kmk b/src/VBox/ValidationKit/testmanager/misc/Makefile.kmk
index b3e8eb9..97ac6a5 100644
--- a/src/VBox/ValidationKit/testmanager/misc/Makefile.kmk
+++ b/src/VBox/ValidationKit/testmanager/misc/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/testmanager/webui/Makefile.kmk b/src/VBox/ValidationKit/testmanager/webui/Makefile.kmk
index c66b6fa..00855f4 100644
--- a/src/VBox/ValidationKit/testmanager/webui/Makefile.kmk
+++ b/src/VBox/ValidationKit/testmanager/webui/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/testmanager/webui/__init__.py b/src/VBox/ValidationKit/testmanager/webui/__init__.py
index c205c75..d6d6174 100644
--- a/src/VBox/ValidationKit/testmanager/webui/__init__.py
+++ b/src/VBox/ValidationKit/testmanager/webui/__init__.py
@@ -7,7 +7,7 @@ TestBox Script - WUI Presentation.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,5 +26,5 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
diff --git a/src/VBox/ValidationKit/testmanager/webui/wuiadmin.py b/src/VBox/ValidationKit/testmanager/webui/wuiadmin.py
index 5eaa803..56c135b 100755
--- a/src/VBox/ValidationKit/testmanager/webui/wuiadmin.py
+++ b/src/VBox/ValidationKit/testmanager/webui/wuiadmin.py
@@ -7,7 +7,7 @@ Test Manager Core - WUI - Admin Main page.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107959 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard python imports.
diff --git a/src/VBox/ValidationKit/testmanager/webui/wuiadminbuild.py b/src/VBox/ValidationKit/testmanager/webui/wuiadminbuild.py
index 8e62104..a1ef01d 100755
--- a/src/VBox/ValidationKit/testmanager/webui/wuiadminbuild.py
+++ b/src/VBox/ValidationKit/testmanager/webui/wuiadminbuild.py
@@ -7,7 +7,7 @@ Test Manager WUI - Builds.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Validation Kit imports.
diff --git a/src/VBox/ValidationKit/testmanager/webui/wuiadminbuildblacklist.py b/src/VBox/ValidationKit/testmanager/webui/wuiadminbuildblacklist.py
index 9edfa68..ca9a2ef 100755
--- a/src/VBox/ValidationKit/testmanager/webui/wuiadminbuildblacklist.py
+++ b/src/VBox/ValidationKit/testmanager/webui/wuiadminbuildblacklist.py
@@ -7,7 +7,7 @@ Test Manager WUI - Build Blacklist.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107509 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Validation Kit imports.
diff --git a/src/VBox/ValidationKit/testmanager/webui/wuiadminbuildcategory.py b/src/VBox/ValidationKit/testmanager/webui/wuiadminbuildcategory.py
index 2361f26..28bd443 100755
--- a/src/VBox/ValidationKit/testmanager/webui/wuiadminbuildcategory.py
+++ b/src/VBox/ValidationKit/testmanager/webui/wuiadminbuildcategory.py
@@ -7,7 +7,7 @@ Test Manager WUI - Build categories.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Validation Kit imports.
diff --git a/src/VBox/ValidationKit/testmanager/webui/wuiadminbuildsource.py b/src/VBox/ValidationKit/testmanager/webui/wuiadminbuildsource.py
index 13d3d77..e1dfab6 100755
--- a/src/VBox/ValidationKit/testmanager/webui/wuiadminbuildsource.py
+++ b/src/VBox/ValidationKit/testmanager/webui/wuiadminbuildsource.py
@@ -7,7 +7,7 @@ Test Manager WUI - Build Sources.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Validation Kit imports.
diff --git a/src/VBox/ValidationKit/testmanager/webui/wuiadminfailurecategory.py b/src/VBox/ValidationKit/testmanager/webui/wuiadminfailurecategory.py
index c251300..5620880 100755
--- a/src/VBox/ValidationKit/testmanager/webui/wuiadminfailurecategory.py
+++ b/src/VBox/ValidationKit/testmanager/webui/wuiadminfailurecategory.py
@@ -7,7 +7,7 @@ Test Manager WUI - Failure Categories Web content generator.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107541 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Validation Kit imports.
diff --git a/src/VBox/ValidationKit/testmanager/webui/wuiadminfailurereason.py b/src/VBox/ValidationKit/testmanager/webui/wuiadminfailurereason.py
index 20c004f..d2802b6 100755
--- a/src/VBox/ValidationKit/testmanager/webui/wuiadminfailurereason.py
+++ b/src/VBox/ValidationKit/testmanager/webui/wuiadminfailurereason.py
@@ -7,7 +7,7 @@ Test Manager WUI - Failure Reasons Web content generator.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107541 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Validation Kit imports.
diff --git a/src/VBox/ValidationKit/testmanager/webui/wuiadminglobalrsrc.py b/src/VBox/ValidationKit/testmanager/webui/wuiadminglobalrsrc.py
index bcee2ee..0c35a6b 100755
--- a/src/VBox/ValidationKit/testmanager/webui/wuiadminglobalrsrc.py
+++ b/src/VBox/ValidationKit/testmanager/webui/wuiadminglobalrsrc.py
@@ -7,7 +7,7 @@ Test Manager WUI - Global resources.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 # Validation Kit imports.
 from testmanager.webui.wuibase          import WuiException
diff --git a/src/VBox/ValidationKit/testmanager/webui/wuiadminschedgroup.py b/src/VBox/ValidationKit/testmanager/webui/wuiadminschedgroup.py
index e37f547..9148f1b 100755
--- a/src/VBox/ValidationKit/testmanager/webui/wuiadminschedgroup.py
+++ b/src/VBox/ValidationKit/testmanager/webui/wuiadminschedgroup.py
@@ -7,7 +7,7 @@ Test Manager WUI - Scheduling groups.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107799 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Validation Kit imports.
diff --git a/src/VBox/ValidationKit/testmanager/webui/wuiadminsystemlog.py b/src/VBox/ValidationKit/testmanager/webui/wuiadminsystemlog.py
index 61a0b2b..01462a4 100755
--- a/src/VBox/ValidationKit/testmanager/webui/wuiadminsystemlog.py
+++ b/src/VBox/ValidationKit/testmanager/webui/wuiadminsystemlog.py
@@ -7,7 +7,7 @@ Test Manager WUI - Admin - System Log.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107509 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Validation Kit imports.
diff --git a/src/VBox/ValidationKit/testmanager/webui/wuiadmintestbox.py b/src/VBox/ValidationKit/testmanager/webui/wuiadmintestbox.py
index efa9491..7805964 100755
--- a/src/VBox/ValidationKit/testmanager/webui/wuiadmintestbox.py
+++ b/src/VBox/ValidationKit/testmanager/webui/wuiadmintestbox.py
@@ -7,7 +7,7 @@ Test Manager WUI - TestBox.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107934 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard python imports.
diff --git a/src/VBox/ValidationKit/testmanager/webui/wuiadmintestcase.py b/src/VBox/ValidationKit/testmanager/webui/wuiadmintestcase.py
index a407e17..ddb63b4 100755
--- a/src/VBox/ValidationKit/testmanager/webui/wuiadmintestcase.py
+++ b/src/VBox/ValidationKit/testmanager/webui/wuiadmintestcase.py
@@ -7,7 +7,7 @@ Test Manager WUI - Test Cases.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107799 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Validation Kit imports.
diff --git a/src/VBox/ValidationKit/testmanager/webui/wuiadmintestgroup.py b/src/VBox/ValidationKit/testmanager/webui/wuiadmintestgroup.py
index 47d156a..53c284f 100755
--- a/src/VBox/ValidationKit/testmanager/webui/wuiadmintestgroup.py
+++ b/src/VBox/ValidationKit/testmanager/webui/wuiadmintestgroup.py
@@ -7,7 +7,7 @@ Test Manager WUI - Test Groups.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107799 $"
+__version__ = "$Revision: 109040 $"
 
 # Validation Kit imports.
 from common                             import utils, webutils;
diff --git a/src/VBox/ValidationKit/testmanager/webui/wuiadminuseraccount.py b/src/VBox/ValidationKit/testmanager/webui/wuiadminuseraccount.py
index 7864c01..f341fb9 100755
--- a/src/VBox/ValidationKit/testmanager/webui/wuiadminuseraccount.py
+++ b/src/VBox/ValidationKit/testmanager/webui/wuiadminuseraccount.py
@@ -7,7 +7,7 @@ Test Manager WUI - User accounts.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 # Validation Kit imports.
 from testmanager.webui.wuicontentbase   import WuiFormContentBase, WuiListContentBase, WuiTmLink;
diff --git a/src/VBox/ValidationKit/testmanager/webui/wuibase.py b/src/VBox/ValidationKit/testmanager/webui/wuibase.py
index 4f1cc9f..e6930b7 100755
--- a/src/VBox/ValidationKit/testmanager/webui/wuibase.py
+++ b/src/VBox/ValidationKit/testmanager/webui/wuibase.py
@@ -7,7 +7,7 @@ Test Manager Web-UI - Base Classes.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107838 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard python imports.
diff --git a/src/VBox/ValidationKit/testmanager/webui/wuicontentbase.py b/src/VBox/ValidationKit/testmanager/webui/wuicontentbase.py
index 6074be9..60963bb 100755
--- a/src/VBox/ValidationKit/testmanager/webui/wuicontentbase.py
+++ b/src/VBox/ValidationKit/testmanager/webui/wuicontentbase.py
@@ -7,7 +7,7 @@ Test Manager Web-UI - Content Base Classes.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107799 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard python imports.
diff --git a/src/VBox/ValidationKit/testmanager/webui/wuigraphwiz.py b/src/VBox/ValidationKit/testmanager/webui/wuigraphwiz.py
index ac61efa..3b2f947 100755
--- a/src/VBox/ValidationKit/testmanager/webui/wuigraphwiz.py
+++ b/src/VBox/ValidationKit/testmanager/webui/wuigraphwiz.py
@@ -7,7 +7,7 @@ Test Manager WUI - Graph Wizard
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 # Python imports.
 import functools;
diff --git a/src/VBox/ValidationKit/testmanager/webui/wuihlpform.py b/src/VBox/ValidationKit/testmanager/webui/wuihlpform.py
index 39e7994..c7b0b16 100755
--- a/src/VBox/ValidationKit/testmanager/webui/wuihlpform.py
+++ b/src/VBox/ValidationKit/testmanager/webui/wuihlpform.py
@@ -7,7 +7,7 @@ Test Manager Web-UI - Form Helpers.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107838 $"
+__version__ = "$Revision: 109040 $"
 
 # Standard python imports.
 import copy;
diff --git a/src/VBox/ValidationKit/testmanager/webui/wuihlpgraph.py b/src/VBox/ValidationKit/testmanager/webui/wuihlpgraph.py
index d2abb81..eb43610 100755
--- a/src/VBox/ValidationKit/testmanager/webui/wuihlpgraph.py
+++ b/src/VBox/ValidationKit/testmanager/webui/wuihlpgraph.py
@@ -7,7 +7,7 @@ Test Manager Web-UI - Graph Helpers.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 108597 $"
+__version__ = "$Revision: 109040 $"
 
 
 class WuiHlpGraphDataTable(object): # pylint: disable=R0903
diff --git a/src/VBox/ValidationKit/testmanager/webui/wuihlpgraphbase.py b/src/VBox/ValidationKit/testmanager/webui/wuihlpgraphbase.py
index f564930..f608fdf 100755
--- a/src/VBox/ValidationKit/testmanager/webui/wuihlpgraphbase.py
+++ b/src/VBox/ValidationKit/testmanager/webui/wuihlpgraphbase.py
@@ -7,7 +7,7 @@ Test Manager Web-UI - Graph Helpers - Base Class.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 
 class WuiHlpGraphBase(object):
diff --git a/src/VBox/ValidationKit/testmanager/webui/wuihlpgraphgooglechart.py b/src/VBox/ValidationKit/testmanager/webui/wuihlpgraphgooglechart.py
index 42f02d0..858f22d 100755
--- a/src/VBox/ValidationKit/testmanager/webui/wuihlpgraphgooglechart.py
+++ b/src/VBox/ValidationKit/testmanager/webui/wuihlpgraphgooglechart.py
@@ -7,7 +7,7 @@ Test Manager Web-UI - Graph Helpers - Implemented using Google Charts.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107509 $"
+__version__ = "$Revision: 109040 $"
 
 # Validation Kit imports.
 from common                             import webutils;
diff --git a/src/VBox/ValidationKit/testmanager/webui/wuihlpgraphmatplotlib.py b/src/VBox/ValidationKit/testmanager/webui/wuihlpgraphmatplotlib.py
index 88be5f3..c14f64b 100755
--- a/src/VBox/ValidationKit/testmanager/webui/wuihlpgraphmatplotlib.py
+++ b/src/VBox/ValidationKit/testmanager/webui/wuihlpgraphmatplotlib.py
@@ -7,7 +7,7 @@ Test Manager Web-UI - Graph Helpers - Implemented using matplotlib.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107509 $"
+__version__ = "$Revision: 109040 $"
 
 # Standard Python Import and extensions installed on the system.
 import re;
diff --git a/src/VBox/ValidationKit/testmanager/webui/wuihlpgraphsimple.py b/src/VBox/ValidationKit/testmanager/webui/wuihlpgraphsimple.py
index e205dc7..f00acc1 100755
--- a/src/VBox/ValidationKit/testmanager/webui/wuihlpgraphsimple.py
+++ b/src/VBox/ValidationKit/testmanager/webui/wuihlpgraphsimple.py
@@ -7,7 +7,7 @@ Test Manager Web-UI - Graph Helpers - Simple/Stub Implementation.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107509 $"
+__version__ = "$Revision: 109040 $"
 
 # Validation Kit imports.
 from common.webutils                    import escapeAttr, escapeElem;
diff --git a/src/VBox/ValidationKit/testmanager/webui/wuilogviewer.py b/src/VBox/ValidationKit/testmanager/webui/wuilogviewer.py
index f8baec3..09a0a38 100755
--- a/src/VBox/ValidationKit/testmanager/webui/wuilogviewer.py
+++ b/src/VBox/ValidationKit/testmanager/webui/wuilogviewer.py
@@ -7,7 +7,7 @@ Test Manager WUI - Log viewer
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107798 $"
+__version__ = "$Revision: 109040 $"
 
 # Validation Kit imports.
 from common                             import webutils;
diff --git a/src/VBox/ValidationKit/testmanager/webui/wuimain.py b/src/VBox/ValidationKit/testmanager/webui/wuimain.py
index c0164e4..42112ab 100755
--- a/src/VBox/ValidationKit/testmanager/webui/wuimain.py
+++ b/src/VBox/ValidationKit/testmanager/webui/wuimain.py
@@ -7,7 +7,7 @@ Test Manager Core - WUI - The Main page.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107792 $"
+__version__ = "$Revision: 109040 $"
 
 # Standard Python imports.
 
diff --git a/src/VBox/ValidationKit/testmanager/webui/wuireport.py b/src/VBox/ValidationKit/testmanager/webui/wuireport.py
index 10a06c1..2d72cfd 100755
--- a/src/VBox/ValidationKit/testmanager/webui/wuireport.py
+++ b/src/VBox/ValidationKit/testmanager/webui/wuireport.py
@@ -7,7 +7,7 @@ Test Manager WUI - Reports.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107623 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Validation Kit imports.
diff --git a/src/VBox/ValidationKit/testmanager/webui/wuitestresult.py b/src/VBox/ValidationKit/testmanager/webui/wuitestresult.py
index ffd11e3..e1f19c2 100755
--- a/src/VBox/ValidationKit/testmanager/webui/wuitestresult.py
+++ b/src/VBox/ValidationKit/testmanager/webui/wuitestresult.py
@@ -7,7 +7,7 @@ Test Manager WUI - Test Results.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107783 $"
+__version__ = "$Revision: 109040 $"
 
 # Python imports.
 import datetime;
diff --git a/src/VBox/ValidationKit/testmanager/webui/wuitestresultfailure.py b/src/VBox/ValidationKit/testmanager/webui/wuitestresultfailure.py
index 324245d..cfdfaa7 100755
--- a/src/VBox/ValidationKit/testmanager/webui/wuitestresultfailure.py
+++ b/src/VBox/ValidationKit/testmanager/webui/wuitestresultfailure.py
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 107570 $"
+__version__ = "$Revision: 109027 $"
 
 # Validation Kit imports.
 from testmanager.webui.wuicontentbase           import WuiFormContentBase, WuiContentBase, WuiTmLink;
@@ -98,5 +98,3 @@ class WuiTestResultFailure(WuiFormContentBase):
                                        ));
         return aoActions;
 
-
-
diff --git a/src/VBox/ValidationKit/testmanager/webui/wuivcshistory.py b/src/VBox/ValidationKit/testmanager/webui/wuivcshistory.py
index a5dece7..622cec6 100755
--- a/src/VBox/ValidationKit/testmanager/webui/wuivcshistory.py
+++ b/src/VBox/ValidationKit/testmanager/webui/wuivcshistory.py
@@ -7,7 +7,7 @@ Test Manager WUI - VCS history
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 # Python imports.
 #import datetime;
diff --git a/src/VBox/ValidationKit/tests/Makefile.kmk b/src/VBox/ValidationKit/tests/Makefile.kmk
index 2582d56..b7707a8 100644
--- a/src/VBox/ValidationKit/tests/Makefile.kmk
+++ b/src/VBox/ValidationKit/tests/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/tests/additions/Makefile.kmk b/src/VBox/ValidationKit/tests/additions/Makefile.kmk
index a8ed3aa..49f8d0f 100644
--- a/src/VBox/ValidationKit/tests/additions/Makefile.kmk
+++ b/src/VBox/ValidationKit/tests/additions/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/tests/additions/tdAddBasic1.py b/src/VBox/ValidationKit/tests/additions/tdAddBasic1.py
index 51e1fde..dc26fe1 100755
--- a/src/VBox/ValidationKit/tests/additions/tdAddBasic1.py
+++ b/src/VBox/ValidationKit/tests/additions/tdAddBasic1.py
@@ -8,7 +8,7 @@ VirtualBox Validation Kit - Additions Basics #1.
 
 __copyright__ = \
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 108749 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard Python imports.
diff --git a/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py b/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py
index b55407d..068a071 100755
--- a/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py
+++ b/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py
@@ -8,7 +8,7 @@ VirtualBox Validation Kit - Guest Control Tests.
 
 __copyright__ = \
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 108242 $"
+__version__ = "$Revision: 109040 $"
 
 # Disable bitching about too many arguments per function.
 # pylint: disable=R0913
diff --git a/src/VBox/ValidationKit/tests/api/Makefile.kmk b/src/VBox/ValidationKit/tests/api/Makefile.kmk
index 4be02be..c8e47ae 100644
--- a/src/VBox/ValidationKit/tests/api/Makefile.kmk
+++ b/src/VBox/ValidationKit/tests/api/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/tests/api/tdAppliance1.py b/src/VBox/ValidationKit/tests/api/tdAppliance1.py
index 08c4f4e..48d9b96 100755
--- a/src/VBox/ValidationKit/tests/api/tdAppliance1.py
+++ b/src/VBox/ValidationKit/tests/api/tdAppliance1.py
@@ -8,7 +8,7 @@ VirtualBox Validation Kit - IAppliance Test #1
 
 __copyright__ = \
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 105541 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard Python imports.
diff --git a/src/VBox/ValidationKit/tests/api/tdMoveMedium.py b/src/VBox/ValidationKit/tests/api/tdMoveMedium.py
new file mode 100755
index 0000000..efb0789
--- /dev/null
+++ b/src/VBox/ValidationKit/tests/api/tdMoveMedium.py
@@ -0,0 +1,174 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# $Id: tdMoveMedium.py
+
+"""
+VirtualBox Validation Kit - Medium Move Test
+"""
+
+__copyright__ = \
+"""
+Copyright (C) 2010-2016 Oracle Corporation
+
+This file is part of VirtualBox Open Source Edition (OSE), as
+available from http://www.virtualbox.org. This file is free software;
+you can redistribute it and/or modify it under the terms of the GNU
+General Public License (GPL) as published by the Free Software
+Foundation, in version 2 as it comes in the "COPYING" file of the
+VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+
+The contents of this file may alternatively be used under the terms
+of the Common Development and Distribution License Version 1.0
+(CDDL) only, as it comes in the "COPYING.CDDL" file of the
+VirtualBox OSE distribution, in which case the provisions of the
+CDDL are applicable instead of those of the GPL.
+
+You may elect to license modified versions of this file under the
+terms and conditions of either the GPL or the CDDL or both.
+"""
+__version__ = ""
+
+# Standard Python imports.
+import os
+import sys
+
+# Only the main script needs to modify the path.
+try:    __file__
+except: __file__ = sys.argv[0]
+g_ksValidationKitDir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+sys.path.append(g_ksValidationKitDir)
+
+# Validation Kit imports.
+from common     import utils
+from testdriver import reporter
+from testdriver import vbox
+from testdriver import vboxwrappers;
+
+class tdMoveMedium(vbox.TestDriver):
+    """
+    Medium moving Test.
+    """
+
+    # Suffix exclude list.
+    suffixes = [
+        '.vdi',
+    ];
+
+    def __init__(self):
+        vbox.TestDriver.__init__(self)
+        self.asRsrcs            = None
+
+    #
+    # Overridden methods.
+    #
+
+    def actionConfig(self):
+        """
+        Import the API.
+        """
+        if not self.importVBoxApi():
+            return False
+        return True
+
+    def actionExecute(self):
+        """
+        Execute the testcase.
+        """
+        return  self.testMediumMove()
+
+    #
+    # Test execution helpers.
+    #
+    def setLocation(self, sLocation, aListOfAttach):
+        for attachment in aListOfAttach:
+            try:
+                oMedium = attachment.medium;
+                reporter.log('Move medium ' + oMedium.name + ' to the ' + sLocation)
+            except:
+                reporter.errorXcpt('failed to get the medium from the IMediumAttachment "%s"' % (attachment));
+
+            try:
+                oProgress = vboxwrappers.ProgressWrapper(oMedium.setLocation(sLocation), self.oVBoxMgr, self, 'move "%s"' % (oMedium.name,));
+            except:
+                return reporter.errorXcpt('Medium::setLocation("%s") for medium "%s" failed' % (sLocation, oMedium.name,));
+
+            oProgress.wait();
+            if oProgress.logResult() is False:
+                return False;
+
+    # Test with VDI image
+    # move medium to a new location.
+    # case 1. Only path without file name
+    # case 2. Only path without file name without '\' or '/' at the end
+    # case 3. Path with file name
+    # case 4. Only file name
+    # case 5. Move snapshot
+
+    def testMediumMove(self):
+        """
+        Test medium moving.
+        """
+        reporter.testStart('medium moving')
+
+        try:
+            oVM = self.createTestVM('test-medium-move', 1, None, 4)
+            assert oVM is not None
+
+            # create virtual disk image vdi
+            fRc = True
+            c = 0
+            oSession = self.openSession(oVM)
+            for i in self.suffixes:
+                sHddPath = os.path.join(self.sScratchPath, 'Test' + str(c) + i)
+                oHd = oSession.createBaseHd(sHddPath, cb=1024*1024)
+                if oHd is None:
+                    fRc = False
+                    break
+
+                # attach HDD, IDE controller exists by default, but we use SATA just in case
+                sController='SATA Controller'
+                fRc = fRc and oSession.attachHd(sHddPath, sController, iPort = c, iDevice = 0, fImmutable=False, fForceResource=False)
+                fRc = fRc and oSession.saveSettings()
+
+            #create temporary subdirectory in the current working directory
+            sOrigLoc = self.sScratchPath
+            sNewLoc = os.path.join(sOrigLoc, 'newLocation/')
+
+            os.makedirs(sNewLoc, 0775);
+
+            aListOfAttach = oVM.getMediumAttachmentsOfController(sController)
+            #case 1. Only path without file name
+            sLocation = sNewLoc
+            self.setLocation(sLocation, aListOfAttach)
+
+            #case 2. Only path without file name without '\' or '/' at the end
+            sLocation = sOrigLoc
+            self.setLocation(sLocation, aListOfAttach)
+
+            #case 3. Path with file name
+            sLocation = sNewLoc + 'newName.vdi'
+            self.setLocation(sLocation, aListOfAttach)
+
+            #case 4. Only file name
+            sLocation = 'onlyMediumName'
+            self.setLocation(sLocation, aListOfAttach)
+
+            #case 5. Move snapshot
+            fRc = fRc and oSession.takeSnapshot('Snapshot1')
+            sLocation = sOrigLoc
+            #get fresh attachments after snapshot
+            aListOfAttach = oVM.getMediumAttachmentsOfController(sController)
+            self.setLocation(sLocation, aListOfAttach)
+
+            fRc = oSession.close() and fRc
+
+            assert fRc is True
+        except:
+            reporter.errorXcpt()
+
+        return reporter.testDone()[1] == 0
+
+if __name__ == '__main__':
+    sys.exit(tdMoveMedium().main(sys.argv))
+
diff --git a/src/VBox/ValidationKit/tests/api/tdPython1.py b/src/VBox/ValidationKit/tests/api/tdPython1.py
index 9c77abb..d166d22 100755
--- a/src/VBox/ValidationKit/tests/api/tdPython1.py
+++ b/src/VBox/ValidationKit/tests/api/tdPython1.py
@@ -8,7 +8,7 @@ VirtualBox Validation Kit - Python Bindings Test #1
 
 __copyright__ = \
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard Python imports.
diff --git a/src/VBox/ValidationKit/tests/api/tdTreeDepth1.py b/src/VBox/ValidationKit/tests/api/tdTreeDepth1.py
index 2c6c92b..aa46dfc 100755
--- a/src/VBox/ValidationKit/tests/api/tdTreeDepth1.py
+++ b/src/VBox/ValidationKit/tests/api/tdTreeDepth1.py
@@ -8,7 +8,7 @@ VirtualBox Validation Kit - Medium and Snapshot Tree Depth Test #1
 
 __copyright__ = \
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 99187 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard Python imports.
diff --git a/src/VBox/ValidationKit/tests/autostart/Makefile.kmk b/src/VBox/ValidationKit/tests/autostart/Makefile.kmk
index d3feeab..da216c8 100644
--- a/src/VBox/ValidationKit/tests/autostart/Makefile.kmk
+++ b/src/VBox/ValidationKit/tests/autostart/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2013-2015 Oracle Corporation
+# Copyright (C) 2013-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/tests/autostart/tdAutostart1.py b/src/VBox/ValidationKit/tests/autostart/tdAutostart1.py
index 7f3104d..ff74f73 100755
--- a/src/VBox/ValidationKit/tests/autostart/tdAutostart1.py
+++ b/src/VBox/ValidationKit/tests/autostart/tdAutostart1.py
@@ -7,7 +7,7 @@ AUtostart testcase using.
 
 __copyright__ = \
 """
-Copyright (C) 2013-2015 Oracle Corporation
+Copyright (C) 2013-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/tests/benchmarks/Makefile.kmk b/src/VBox/ValidationKit/tests/benchmarks/Makefile.kmk
index 8a79214..c3bcdef 100644
--- a/src/VBox/ValidationKit/tests/benchmarks/Makefile.kmk
+++ b/src/VBox/ValidationKit/tests/benchmarks/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/tests/benchmarks/tdBenchmark1.py b/src/VBox/ValidationKit/tests/benchmarks/tdBenchmark1.py
index fefa364..ed67dc8 100755
--- a/src/VBox/ValidationKit/tests/benchmarks/tdBenchmark1.py
+++ b/src/VBox/ValidationKit/tests/benchmarks/tdBenchmark1.py
@@ -8,7 +8,7 @@ VirtualBox Validation Kit - Test that runs various benchmarks.
 
 __copyright__ = \
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard Python imports.
diff --git a/src/VBox/ValidationKit/tests/cpu/Makefile.kmk b/src/VBox/ValidationKit/tests/cpu/Makefile.kmk
index e673b0e..df67fdf 100644
--- a/src/VBox/ValidationKit/tests/cpu/Makefile.kmk
+++ b/src/VBox/ValidationKit/tests/cpu/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/tests/cpu/tdCpuPae1.py b/src/VBox/ValidationKit/tests/cpu/tdCpuPae1.py
index af90f52..0f28f6f 100755
--- a/src/VBox/ValidationKit/tests/cpu/tdCpuPae1.py
+++ b/src/VBox/ValidationKit/tests/cpu/tdCpuPae1.py
@@ -11,7 +11,7 @@ the right runtime error.
 
 __copyright__ = \
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -30,7 +30,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard Python imports.
diff --git a/src/VBox/ValidationKit/tests/installation/Makefile.kmk b/src/VBox/ValidationKit/tests/installation/Makefile.kmk
index 45e913f..4da4ba5 100644
--- a/src/VBox/ValidationKit/tests/installation/Makefile.kmk
+++ b/src/VBox/ValidationKit/tests/installation/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/tests/installation/tdGuestOsInstOs2.py b/src/VBox/ValidationKit/tests/installation/tdGuestOsInstOs2.py
index ee75971..75dd96f 100755
--- a/src/VBox/ValidationKit/tests/installation/tdGuestOsInstOs2.py
+++ b/src/VBox/ValidationKit/tests/installation/tdGuestOsInstOs2.py
@@ -8,7 +8,7 @@ VirtualBox Validation Kit - OS/2 install tests.
 
 __copyright__ = \
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard Python imports.
diff --git a/src/VBox/ValidationKit/tests/installation/tdGuestOsInstTest1.py b/src/VBox/ValidationKit/tests/installation/tdGuestOsInstTest1.py
index 366da12..576b115 100755
--- a/src/VBox/ValidationKit/tests/installation/tdGuestOsInstTest1.py
+++ b/src/VBox/ValidationKit/tests/installation/tdGuestOsInstTest1.py
@@ -8,7 +8,7 @@ VirtualBox Validation Kit - Guest OS installation tests.
 
 __copyright__ = \
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 108682 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard Python imports.
diff --git a/src/VBox/ValidationKit/tests/network/Makefile.kmk b/src/VBox/ValidationKit/tests/network/Makefile.kmk
index c2ea3ff..b828745 100644
--- a/src/VBox/ValidationKit/tests/network/Makefile.kmk
+++ b/src/VBox/ValidationKit/tests/network/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/tests/network/tdNetBenchmark1.py b/src/VBox/ValidationKit/tests/network/tdNetBenchmark1.py
index 21a3271..4373ba4 100755
--- a/src/VBox/ValidationKit/tests/network/tdNetBenchmark1.py
+++ b/src/VBox/ValidationKit/tests/network/tdNetBenchmark1.py
@@ -8,7 +8,7 @@ VirtualBox Validation Kit - Networking benchmark #1.
 
 __copyright__ = \
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 102048 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard Python imports.
diff --git a/src/VBox/ValidationKit/tests/selftests/Makefile.kmk b/src/VBox/ValidationKit/tests/selftests/Makefile.kmk
index b08cc71..fb5b3b2 100644
--- a/src/VBox/ValidationKit/tests/selftests/Makefile.kmk
+++ b/src/VBox/ValidationKit/tests/selftests/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/tests/selftests/tdSelfTest1.py b/src/VBox/ValidationKit/tests/selftests/tdSelfTest1.py
index 39376ec..c343507 100755
--- a/src/VBox/ValidationKit/tests/selftests/tdSelfTest1.py
+++ b/src/VBox/ValidationKit/tests/selftests/tdSelfTest1.py
@@ -8,7 +8,7 @@ Test Manager Self Test - Dummy Test Driver.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 
 import sys;
diff --git a/src/VBox/ValidationKit/tests/selftests/tdSelfTest2.py b/src/VBox/ValidationKit/tests/selftests/tdSelfTest2.py
index 25df48e..5a89103 100755
--- a/src/VBox/ValidationKit/tests/selftests/tdSelfTest2.py
+++ b/src/VBox/ValidationKit/tests/selftests/tdSelfTest2.py
@@ -8,7 +8,7 @@ Test Manager / Suite Self Test #2 - Everything should succeed.
 
 __copyright__ = \
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard Python imports.
diff --git a/src/VBox/ValidationKit/tests/selftests/tdSelfTest3.py b/src/VBox/ValidationKit/tests/selftests/tdSelfTest3.py
index 76e0b56..75a206f 100755
--- a/src/VBox/ValidationKit/tests/selftests/tdSelfTest3.py
+++ b/src/VBox/ValidationKit/tests/selftests/tdSelfTest3.py
@@ -8,7 +8,7 @@ Test Manager / Suite Self Test #3 - Bad XML input and other Failures.
 
 __copyright__ = \
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard Python imports.
diff --git a/src/VBox/ValidationKit/tests/selftests/tdSelfTest4.py b/src/VBox/ValidationKit/tests/selftests/tdSelfTest4.py
index 3eccb9e..f0cb607 100755
--- a/src/VBox/ValidationKit/tests/selftests/tdSelfTest4.py
+++ b/src/VBox/ValidationKit/tests/selftests/tdSelfTest4.py
@@ -8,7 +8,7 @@ Test Manager / Suite Self Test #4 - Testing result overflow handling.
 
 __copyright__ = \
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard Python imports.
diff --git a/src/VBox/ValidationKit/tests/shutdown/tdGuestOsShutdown1.py b/src/VBox/ValidationKit/tests/shutdown/tdGuestOsShutdown1.py
index a8001fe..d8226d2 100755
--- a/src/VBox/ValidationKit/tests/shutdown/tdGuestOsShutdown1.py
+++ b/src/VBox/ValidationKit/tests/shutdown/tdGuestOsShutdown1.py
@@ -7,7 +7,7 @@ VMM Guest OS boot tests.
 
 __copyright__ = \
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard Python imports.
diff --git a/src/VBox/ValidationKit/tests/smoketests/Makefile.kmk b/src/VBox/ValidationKit/tests/smoketests/Makefile.kmk
index e5e035a..0643bd5 100644
--- a/src/VBox/ValidationKit/tests/smoketests/Makefile.kmk
+++ b/src/VBox/ValidationKit/tests/smoketests/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/tests/smoketests/tdSmokeTest1.py b/src/VBox/ValidationKit/tests/smoketests/tdSmokeTest1.py
index cfbd123..fee89b2 100755
--- a/src/VBox/ValidationKit/tests/smoketests/tdSmokeTest1.py
+++ b/src/VBox/ValidationKit/tests/smoketests/tdSmokeTest1.py
@@ -8,7 +8,7 @@ VirtualBox Validation Kit - Smoke Test #1.
 
 __copyright__ = \
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard Python imports.
diff --git a/src/VBox/ValidationKit/tests/storage/Makefile.kmk b/src/VBox/ValidationKit/tests/storage/Makefile.kmk
index bf073ac..83c1ec5 100644
--- a/src/VBox/ValidationKit/tests/storage/Makefile.kmk
+++ b/src/VBox/ValidationKit/tests/storage/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2012-2015 Oracle Corporation
+# Copyright (C) 2012-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/tests/storage/storagecfg.py b/src/VBox/ValidationKit/tests/storage/storagecfg.py
index b58cb33..e18e02b 100755
--- a/src/VBox/ValidationKit/tests/storage/storagecfg.py
+++ b/src/VBox/ValidationKit/tests/storage/storagecfg.py
@@ -26,7 +26,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 108698 $"
+__version__ = "$Revision: 109761 $"
 
 # Standard Python imports.
 import os;
@@ -94,6 +94,39 @@ class StorageConfigOsSolaris(StorageConfigOs):
     def __init__(self):
         StorageConfigOs.__init__(self);
 
+    def _getActivePoolsStartingWith(self, oExec, sPoolIdStart):
+        """
+        Returns a list of pools starting with the given ID or None on failure.
+        """
+        lstPools = None;
+        fRc, sOutput = oExec.execBinary('zpool', ('list', '-H'));
+        if fRc:
+            lstPools = [];
+            asPools = sOutput.splitlines();
+            for sPool in asPools:
+                if sPool.startswith(sPoolIdStart):
+                    # Extract the whole name and add it to the list.
+                    asItems = sPool.split('\t');
+                    lstPools.append(asItems[0]);
+        return lstPools;
+
+    def _getActiveVolumesInPoolStartingWith(self, oExec, sPool, sVolumeIdStart):
+        """
+        Returns a list of active volumes for the given pool starting with the given
+        identifier or None on failure.
+        """
+        lstVolumes = None;
+        fRc, sOutput = oExec.execBinary('zfs', ('list', '-H'));
+        if fRc:
+            lstVolumes = [];
+            asVolumes = sOutput.splitlines();
+            for sVolume in asVolumes:
+                if sVolume.startswith(sPool + '/' + sVolumeIdStart):
+                    # Extract the whole name and add it to the list.
+                    asItems = sVolume.split('\t');
+                    lstVolumes.append(asItems[0]);
+        return lstVolumes;
+
     def getDisksMatchingRegExp(self, sRegExp):
         """
         Returns a list of disks matching the regular expression.
@@ -149,6 +182,34 @@ class StorageConfigOsSolaris(StorageConfigOs):
         fRc, _ = oExec.execBinary('zpool', ('destroy', sPool));
         return fRc;
 
+    def cleanupPoolsAndVolumes(self, oExec, sPoolIdStart, sVolIdStart):
+        """
+        Cleans up any pools and volumes starting with the name in the given
+        parameters.
+        """
+        fRc = True;
+        lstPools = self._getActivePoolsStartingWith(oExec, sPoolIdStart);
+        if lstPools is not None:
+            for sPool in lstPools:
+                lstVolumes = self._getActiveVolumesInPoolStartingWith(oExec, sPool, sVolIdStart);
+                if lstVolumes is not None:
+                    # Destroy all the volumes first
+                    for sVolume in lstVolumes:
+                        fRc2 = oExec.execBinaryNoStdOut('zfs', ('destroy', sVolume));
+                        if not fRc2:
+                            fRc = fRc2;
+
+                    # Destroy the pool
+                    fRc2 = self.destroyPool(oExec, sPool);
+                    if not fRc2:
+                        fRc = fRc2;
+                else:
+                    fRc = False;
+        else:
+            fRc = False;
+
+        return fRc;
+
 class StorageConfigOsLinux(StorageConfigOs):
     """
     Class implementing the Linux specifics for a storage configuration.
@@ -278,6 +339,18 @@ class StorageConfigOsLinux(StorageConfigOs):
             fRc = oExec.execBinaryNoStdOut('vgremove', (sPool,));
         return fRc;
 
+    def cleanupPoolsAndVolumes(self, oExec, sPoolIdStart, sVolIdStart):
+        """
+        Cleans up any pools and volumes starting with the name in the given
+        parameters.
+        """
+        # @todo: Needs implementation, for LVM based configs a similar approach can be used
+        #        as for Solaris.
+        _ = oExec;
+        _ = sPoolIdStart;
+        _ = sVolIdStart;
+        return True;
+
 class StorageCfg(object):
     """
     Storage configuration helper class taking care of the different host OS.
@@ -458,3 +531,9 @@ class StorageCfg(object):
         """
         return self.oExec.mkDir(sMountPoint + '/' + sDir, fMode);
 
+    def cleanupLeftovers(self):
+        """
+        Tries to cleanup any leftover pools and volumes from a failed previous run.
+        """
+        return self.oStorOs.cleanupPoolsAndVolumes(self.oExec, 'pool', 'vol');
+
diff --git a/src/VBox/ValidationKit/tests/storage/tdStorageBenchmark1.py b/src/VBox/ValidationKit/tests/storage/tdStorageBenchmark1.py
index c2c7613..499afc2 100755
--- a/src/VBox/ValidationKit/tests/storage/tdStorageBenchmark1.py
+++ b/src/VBox/ValidationKit/tests/storage/tdStorageBenchmark1.py
@@ -8,7 +8,7 @@ VirtualBox Validation Kit - Storage benchmark.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 108935 $"
+__version__ = "$Revision: 109865 $"
 
 
 # Standard Python imports.
@@ -233,6 +233,145 @@ class IozoneTest(object):
         return fRc;
 
 
+class StorTestCfgMgr(object):
+    """
+    Manages the different testcases.
+    """
+
+    def __init__(self, aasTestLvls, aasTestsBlacklist, fnIsCfgSupported = None):
+        self.aasTestsBlacklist = aasTestsBlacklist;
+        self.at3TestLvls       = [];
+        self.iTestLvl          = 0;
+        self.fnIsCfgSupported  = fnIsCfgSupported;
+        for asTestLvl in aasTestLvls:
+            if isinstance(asTestLvl, tuple):
+                asTestLvl, fnTestFmt = asTestLvl;
+                self.at3TestLvls.append((0, fnTestFmt, asTestLvl));
+            else:
+                self.at3TestLvls.append((0, None, asTestLvl));
+
+        self.at3TestLvls.reverse();
+
+        # Get the first non blacklisted test.
+        asTestCfg = self.getCurrentTestCfg();
+        while len(asTestCfg) > 0 and self.isTestCfgBlacklisted(asTestCfg):
+            asTestCfg = self.advanceTestCfg();
+
+        iLvl = 0;
+        for sCfg in asTestCfg:
+            reporter.testStart('%s' % (self.getTestIdString(sCfg, iLvl)));
+            iLvl += 1;
+
+    def __del__(self):
+        # Make sure the tests are marked as done.
+        while self.iTestLvl < len(self.at3TestLvls):
+            reporter.testDone();
+            self.iTestLvl += 1;
+
+    def getTestIdString(self, oCfg, iLvl):
+        """
+        Returns a potentially formatted string for the test name.
+        """
+
+        # The order of the test levels is reversed so get the level starting
+        # from the end.
+        _, fnTestFmt, _ = self.at3TestLvls[len(self.at3TestLvls) - 1 - iLvl];
+        if fnTestFmt is not None:
+            return fnTestFmt(oCfg);
+        else:
+            return oCfg;
+
+    def isTestCfgBlacklisted(self, asTestCfg):
+        """
+        Returns whether the given test config is black listed.
+        """
+        fBlacklisted = False;
+
+        for asTestBlacklist in self.aasTestsBlacklist:
+            iLvl = 0;
+            fBlacklisted = True;
+            while iLvl < len(asTestBlacklist) and iLvl < len(asTestCfg):
+                if asTestBlacklist[iLvl] != asTestCfg[iLvl] and asTestBlacklist[iLvl] != '*':
+                    fBlacklisted = False;
+                    break;
+
+                iLvl += 1;
+
+        if not fBlacklisted and self.fnIsCfgSupported is not None:
+            fBlacklisted = not self.fnIsCfgSupported(asTestCfg);
+
+        return fBlacklisted;
+
+    def advanceTestCfg(self):
+        """
+        Advances to the next test config and returns it as an
+        array of strings or an empty config if there is no test left anymore.
+        """
+        iTestCfg, fnTestFmt, asTestCfg = self.at3TestLvls[self.iTestLvl];
+        iTestCfg += 1;
+        self.at3TestLvls[self.iTestLvl] = (iTestCfg, fnTestFmt, asTestCfg);
+        while iTestCfg == len(asTestCfg) and self.iTestLvl < len(self.at3TestLvls):
+            self.at3TestLvls[self.iTestLvl] = (0, fnTestFmt, asTestCfg);
+            self.iTestLvl += 1;
+            if self.iTestLvl < len(self.at3TestLvls):
+                iTestCfg, fnTestFmt, asTestCfg = self.at3TestLvls[self.iTestLvl];
+                iTestCfg += 1;
+                self.at3TestLvls[self.iTestLvl] = (iTestCfg, fnTestFmt, asTestCfg);
+                if iTestCfg < len(asTestCfg):
+                    self.iTestLvl = 0;
+                    break;
+            else:
+                break; # We reached the end of our tests.
+
+        return self.getCurrentTestCfg();
+
+    def getCurrentTestCfg(self):
+        """
+        Returns the current not black listed test config as an array of strings.
+        """
+        asTestCfg = [];
+
+        if self.iTestLvl < len(self.at3TestLvls):
+            for t3TestLvl in self.at3TestLvls:
+                iTestCfg, _, asTestLvl = t3TestLvl;
+                asTestCfg.append(asTestLvl[iTestCfg]);
+
+            asTestCfg.reverse()
+
+        return asTestCfg;
+
+    def getNextTestCfg(self, fSkippedLast = False):
+        """
+        Returns the next not blacklisted test config or an empty list if
+        there is no test left.
+        """
+        asTestCfgCur = self.getCurrentTestCfg();
+
+        asTestCfg = self.advanceTestCfg();
+        while len(asTestCfg) > 0 and self.isTestCfgBlacklisted(asTestCfg):
+            asTestCfg = self.advanceTestCfg();
+
+        # Compare the current and next config and close the approriate test
+        # categories.
+        reporter.testDone(fSkippedLast);
+        if len(asTestCfg) > 0:
+            idxSame = 0;
+            while asTestCfgCur[idxSame] == asTestCfg[idxSame]:
+                idxSame += 1;
+
+            for i in range(idxSame, len(asTestCfg) - 1):
+                reporter.testDone();
+
+            for i in range(idxSame, len(asTestCfg)):
+                reporter.testStart('%s' % (self.getTestIdString(asTestCfg[i], i)));
+
+        else:
+            # No more tests, mark all tests as done
+            for i in range(0, len(asTestCfgCur) - 1):
+                reporter.testDone();
+
+        return asTestCfg;
+
 class tdStorageBenchmark(vbox.TestDriver):                                      # pylint: disable=R0902
     """
     Storage benchmark.
@@ -244,30 +383,83 @@ class tdStorageBenchmark(vbox.TestDriver):
         'adaris': [ '/dev/sda' ]
     };
 
+    # Available test sets.
+    kdTestSets = {
+        # Mostly for developing and debugging the testcase.
+        'Fast': {
+            'RecordSize':  '64k',
+            'TestsetSize': '100m',
+            'QueueDepth':  '32',
+            'DiskSizeGb':  2
+        },
+        # For quick functionality tests where benchmark results are not required.
+        'Functionality': {
+            'RecordSize':  '64k',
+            'TestsetSize': '2g',
+            'QueueDepth':  '32',
+            'DiskSizeGb':  10
+        },
+        # For benchmarking the I/O stack.
+        'Benchmark': {
+            'RecordSize':  '64k',
+            'TestsetSize': '20g',
+            'QueueDepth':  '32',
+            'DiskSizeGb':  100
+        },
+        # For stress testing which takes a lot of time.
+        'Stress': {
+            'RecordSize':  '64k',
+            'TestsetSize': '2t',
+            'QueueDepth':  '32',
+            'DiskSizeGb':  10000
+        },
+    };
+
+    # Dictionary mapping the virtualization mode mnemonics to a little less cryptic
+    # strings used in test descriptions.
+    kdVirtModeDescs = {
+        'raw'       : 'Raw-mode',
+        'hwvirt'    : 'HwVirt',
+        'hwvirt-np' : 'NestedPaging'
+    };
+
+    # Array indexes for the test configs.
+    kiVmName      = 0;
+    kiStorageCtrl = 1;
+    kiDiskFmt     = 2;
+    kiDiskVar     = 3;
+    kiCpuCount    = 4;
+    kiVirtMode    = 5;
+    kiIoTest      = 6;
+    kiTestSet     = 7;
+
     def __init__(self):
         vbox.TestDriver.__init__(self);
-        self.asRsrcs           = None;
-        self.oGuestToGuestVM   = None;
-        self.oGuestToGuestSess = None;
-        self.oGuestToGuestTxs  = None;
-        self.asTestVMsDef      = ['tst-storage', 'tst-storage32'];
-        self.asTestVMs         = self.asTestVMsDef;
-        self.asSkipVMs         = [];
-        self.asVirtModesDef    = ['hwvirt', 'hwvirt-np', 'raw',]
-        self.asVirtModes       = self.asVirtModesDef
-        self.acCpusDef         = [1, 2,]
-        self.acCpus            = self.acCpusDef;
-        self.asStorageCtrlsDef = ['AHCI', 'IDE', 'LsiLogicSAS', 'LsiLogic', 'BusLogic', 'NVMe'];
-        self.asStorageCtrls    = self.asStorageCtrlsDef;
-        self.asDiskFormatsDef  = ['VDI', 'VMDK', 'VHD', 'QED', 'Parallels', 'QCOW', 'iSCSI'];
-        self.asDiskFormats     = self.asDiskFormatsDef;
-        self.asTestsDef        = ['iozone', 'fio'];
-        self.asTests           = self.asTestsDef;
-        self.asIscsiTargetsDef = [ ]; # @todo: Configure one target for basic iSCSI testing
-        self.asIscsiTargets    = self.asIscsiTargetsDef;
-        self.fTestHost         = False;
-        self.fUseScratch       = False;
-        self.oStorCfg          = None;
+        self.asRsrcs                 = None;
+        self.asTestVMsDef            = ['tst-storage', 'tst-storage32'];
+        self.asTestVMs               = self.asTestVMsDef;
+        self.asSkipVMs               = [];
+        self.asVirtModesDef          = ['hwvirt', 'hwvirt-np', 'raw',]
+        self.asVirtModes             = self.asVirtModesDef;
+        self.acCpusDef               = [1, 2];
+        self.acCpus                  = self.acCpusDef;
+        self.asStorageCtrlsDef       = ['AHCI', 'IDE', 'LsiLogicSAS', 'LsiLogic', 'BusLogic', 'NVMe'];
+        self.asStorageCtrls          = self.asStorageCtrlsDef;
+        self.asDiskFormatsDef        = ['VDI', 'VMDK', 'VHD', 'QED', 'Parallels', 'QCOW', 'iSCSI'];
+        self.asDiskFormats           = self.asDiskFormatsDef;
+        self.asDiskVariantsDef       = ['Dynamic', 'Fixed', 'DynamicSplit2G', 'FixedSplit2G', 'Network'];
+        self.asDiskVariants          = self.asDiskVariantsDef;
+        self.asTestsDef              = ['iozone', 'fio'];
+        self.asTests                 = self.asTestsDef;
+        self.asTestSetsDef           = ['Fast', 'Functionality', 'Benchmark', 'Stress'];
+        self.asTestSets              = self.asTestSetsDef;
+        self.asIscsiTargetsDef       = [ ]; # @todo: Configure one target for basic iSCSI testing
+        self.asIscsiTargets          = self.asIscsiTargetsDef;
+        self.fTestHost               = False;
+        self.fUseScratch             = False;
+        self.fRecreateStorCfg        = True;
+        self.fReportBenchmarkResults = True;
+        self.oStorCfg                = None;
 
     #
     # Overridden methods.
@@ -281,13 +473,17 @@ class tdStorageBenchmark(vbox.TestDriver):
         reporter.log('  --cpu-counts    <c1[:c2[:]]');
         reporter.log('      Default: %s' % (':'.join(str(c) for c in self.acCpusDef)));
         reporter.log('  --storage-ctrls <type1[:type2[:...]]>');
-        reporter.log('      Default: %s' % (':'.join(self.asStorageCtrls)));
+        reporter.log('      Default: %s' % (':'.join(self.asStorageCtrlsDef)));
         reporter.log('  --disk-formats  <type1[:type2[:...]]>');
-        reporter.log('      Default: %s' % (':'.join(self.asDiskFormats)));
+        reporter.log('      Default: %s' % (':'.join(self.asDiskFormatsDef)));
+        reporter.log('  --disk-variants <variant1[:variant2[:...]]>');
+        reporter.log('      Default: %s' % (':'.join(self.asDiskVariantsDef)));
         reporter.log('  --iscsi-targets     <target1[:target2[:...]]>');
         reporter.log('      Default: %s' % (':'.join(self.asIscsiTargets)));
         reporter.log('  --tests         <test1[:test2[:...]]>');
         reporter.log('      Default: %s' % (':'.join(self.asTests)));
+        reporter.log('  --test-sets     <set1[:set2[:...]]>');
+        reporter.log('      Default: %s' % (':'.join(self.asTestSets)));
         reporter.log('  --test-vms      <vm1[:vm2[:...]]>');
         reporter.log('      Test the specified VMs in the given order. Use this to change');
         reporter.log('      the execution order or limit the choice of VMs');
@@ -300,6 +496,14 @@ class tdStorageBenchmark(vbox.TestDriver):
         reporter.log('  --use-scratch');
         reporter.log('      Use the scratch directory for testing instead of setting up');
         reporter.log('      fresh volumes on dedicated disks (for development)');
+        reporter.log('  --always-wipe-storage-cfg');
+        reporter.log('      Recreate the host storage config before each test');
+        reporter.log('  --dont-wipe-storage-cfg');
+        reporter.log('      Don\'t recreate the host storage config before each test');
+        reporter.log('  --report-benchmark-results');
+        reporter.log('      Report all benchmark results');
+        reporter.log('  --dont-report-benchmark-results');
+        reporter.log('      Don\'t report any benchmark results');
         return rc;
 
     def parseOption(self, asArgs, iArg):                                        # pylint: disable=R0912,R0915
@@ -329,6 +533,11 @@ class tdStorageBenchmark(vbox.TestDriver):
             iArg += 1;
             if iArg >= len(asArgs): raise base.InvalidOption('The "--disk-formats" takes a colon separated list of disk formats');
             self.asDiskFormats = asArgs[iArg].split(':');
+        elif asArgs[iArg] == '--disk-variants':
+            iArg += 1;
+            if iArg >= len(asArgs):
+                raise base.InvalidOption('The "--disk-variants" takes a colon separated list of disk variants');
+            self.asDiskVariants = asArgs[iArg].split(':');
         elif asArgs[iArg] == '--iscsi-targets':
             iArg += 1;
             if iArg >= len(asArgs):
@@ -336,8 +545,12 @@ class tdStorageBenchmark(vbox.TestDriver):
             self.asIscsiTargets = asArgs[iArg].split(':');
         elif asArgs[iArg] == '--tests':
             iArg += 1;
-            if iArg >= len(asArgs): raise base.InvalidOption('The "--tests" takes a colon separated list of disk formats');
+            if iArg >= len(asArgs): raise base.InvalidOption('The "--tests" takes a colon separated list of tests to run');
             self.asTests = asArgs[iArg].split(':');
+        elif asArgs[iArg] == '--test-sets':
+            iArg += 1;
+            if iArg >= len(asArgs): raise base.InvalidOption('The "--test-sets" takes a colon separated list of test sets');
+            self.asTestSets = asArgs[iArg].split(':');
         elif asArgs[iArg] == '--test-vms':
             iArg += 1;
             if iArg >= len(asArgs): raise base.InvalidOption('The "--test-vms" takes colon separated list');
@@ -357,6 +570,14 @@ class tdStorageBenchmark(vbox.TestDriver):
             self.fTestHost = True;
         elif asArgs[iArg] == '--use-scratch':
             self.fUseScratch = True;
+        elif asArgs[iArg] == '--always-wipe-storage-cfg':
+            self.fRecreateStorCfg = True;
+        elif asArgs[iArg] == '--dont-wipe-storage-cfg':
+            self.fRecreateStorCfg = False;
+        elif asArgs[iArg] == '--report-benchmark-results':
+            self.fReportBenchmarkResults = True;
+        elif asArgs[iArg] == '--dont-report-benchmark-results':
+            self.fReportBenchmarkResults = False;
         else:
             return vbox.TestDriver.parseOption(self, asArgs, iArg);
         return iArg + 1;
@@ -465,50 +686,149 @@ class tdStorageBenchmark(vbox.TestDriver):
         _ = oSession;
         return lstDisks;
 
-    def testBenchmark(self, sTargetOs, sBenchmark, sMountpoint, oExecutor):
+    def getDiskFormatVariantsForTesting(self, sDiskFmt, asVariants):
+        """
+        Returns a list of disk variants for testing supported by the given
+        disk format and selected for testing.
+        """
+        lstDskFmts = self.oVBoxMgr.getArray(self.oVBox.systemProperties, 'mediumFormats');
+        for oDskFmt in lstDskFmts:
+            if oDskFmt.id == sDiskFmt:
+                lstDskVariants = [];
+                lstCaps = self.oVBoxMgr.getArray(oDskFmt, 'capabilities');
+
+                if     vboxcon.MediumFormatCapabilities_CreateDynamic in lstCaps \
+                   and 'Dynamic' in asVariants:
+                    lstDskVariants.append('Dynamic');
+
+                if     vboxcon.MediumFormatCapabilities_CreateFixed in lstCaps \
+                   and 'Fixed' in asVariants:
+                    lstDskVariants.append('Fixed');
+
+                if     vboxcon.MediumFormatCapabilities_CreateSplit2G in lstCaps \
+                   and vboxcon.MediumFormatCapabilities_CreateDynamic in lstCaps \
+                   and 'DynamicSplit2G' in asVariants:
+                    lstDskVariants.append('DynamicSplit2G');
+
+                if     vboxcon.MediumFormatCapabilities_CreateSplit2G in lstCaps \
+                   and vboxcon.MediumFormatCapabilities_CreateFixed in lstCaps \
+                   and 'FixedSplit2G' in asVariants:
+                    lstDskVariants.append('FixedSplit2G');
+
+                if     vboxcon.MediumFormatCapabilities_TcpNetworking in lstCaps \
+                   and 'Network' in asVariants:
+                    lstDskVariants.append('Network'); # Solely for iSCSI to get a non empty list
+
+                return lstDskVariants;
+
+        return [];
+
+    def convDiskToMediumVariant(self, sDiskVariant):
+        """
+        Returns a tuple of medium variant flags matching the given disk variant.
+        """
+        tMediumVariant = None;
+        if sDiskVariant == 'Dynamic':
+            tMediumVariant = (vboxcon.MediumVariant_Standard, );
+        elif sDiskVariant == 'Fixed':
+            tMediumVariant = (vboxcon.MediumVariant_Fixed, );
+        elif sDiskVariant == 'DynamicSplit2G':
+            tMediumVariant = (vboxcon.MediumVariant_Standard, vboxcon.MediumVariant_VmdkSplit2G);
+        elif sDiskVariant == 'FixedSplit2G':
+            tMediumVariant = (vboxcon.MediumVariant_Fixed, vboxcon.MediumVariant_VmdkSplit2G);
+
+        return tMediumVariant;
+
+    def getStorageCtrlFromName(self, sStorageCtrl):
+        """
+        Resolves the storage controller string to the matching constant.
+        """
+        eStorageCtrl = None;
+
+        if sStorageCtrl == 'AHCI':
+            eStorageCtrl = vboxcon.StorageControllerType_IntelAhci;
+        elif sStorageCtrl == 'IDE':
+            eStorageCtrl = vboxcon.StorageControllerType_PIIX4;
+        elif sStorageCtrl == 'LsiLogicSAS':
+            eStorageCtrl = vboxcon.StorageControllerType_LsiLogicSas;
+        elif sStorageCtrl == 'LsiLogic':
+            eStorageCtrl = vboxcon.StorageControllerType_LsiLogic;
+        elif sStorageCtrl == 'BusLogic':
+            eStorageCtrl = vboxcon.StorageControllerType_BusLogic;
+        elif sStorageCtrl == 'NVMe':
+            eStorageCtrl = vboxcon.StorageControllerType_NVMe;
+
+        return eStorageCtrl;
+
+    def isTestCfgSupported(self, asTestCfg):
+        """
+        Returns whether a specific test config is supported.
+        """
+
+        # Check whether the disk variant is supported by the selected format.
+        asVariants = self.getDiskFormatVariantsForTesting(asTestCfg[self.kiDiskFmt], [ asTestCfg[self.kiDiskVar] ]);
+        if len(asVariants) == 0:
+            return False;
+
+        # For iSCSI check whether we have targets configured.
+        if asTestCfg[self.kiDiskFmt] == 'iSCSI' and len(self.asIscsiTargets) == 0:
+            return False;
+
+        # Check for virt mode, CPU count and selected VM.
+        if     asTestCfg[self.kiVirtMode] == 'raw' \
+           and (asTestCfg[self.kiCpuCount] > 1 or asTestCfg[self.kiVmName] == 'tst-storage'):
+            return False;
+
+        return True;
+
+    def fnFormatCpuString(self, cCpus):
+        """
+        Formats the CPU count to be readable.
+        """
+        if cCpus == 1:
+            return '1 cpu';
+        else:
+            return '%u cpus' % (cCpus);
+
+    def fnFormatVirtMode(self, sVirtMode):
+        """
+        Formats the virtualization mode to be a little less cryptic for use in test
+        descriptions.
+        """
+        return self.kdVirtModeDescs[sVirtMode];
+
+    def testBenchmark(self, sTargetOs, sBenchmark, sMountpoint, oExecutor, dTestSet):
         """
         Runs the given benchmark on the test host.
         """
-        # Create a basic config
-        dCfg = {
-            'RecordSize':  '64k',
-            'TestsetSize': '100m',
-            'QueueDepth':  '32',
-            'FilePath': sMountpoint,
-            'TargetOs': sTargetOs
-        };
+
+        dTestSet['FilePath'] = sMountpoint;
+        dTestSet['TargetOs'] = sTargetOs;
 
         oTst = None;
         if sBenchmark == 'iozone':
-            oTst = IozoneTest(oExecutor, dCfg);
+            oTst = IozoneTest(oExecutor, dTestSet);
         elif sBenchmark == 'fio':
-            oTst = FioTest(oExecutor, dCfg); # pylint: disable=R0204
+            oTst = FioTest(oExecutor, dTestSet); # pylint: disable=R0204
 
         if oTst is not None:
-            reporter.testStart(sBenchmark);
             fRc = oTst.prepare();
             if fRc:
                 fRc = oTst.run();
                 if fRc:
-                    fRc = oTst.reportResult();
+                    if self.fReportBenchmarkResults:
+                        fRc = oTst.reportResult();
                 else:
                     reporter.testFailure('Running the testcase failed');
             else:
                 reporter.testFailure('Preparing the testcase failed');
 
         oTst.cleanup();
-        reporter.testDone();
 
         return fRc;
 
-    def testBenchmarks(self, sTargetOs, sMountPoint, oExecutor):
-        """
-        Runs all the configured benchmarks on the target.
-        """
-        for sTest in self.asTests:
-            self.testBenchmark(sTargetOs, sTest, sMountPoint, oExecutor);
-
-    def test1OneCfg(self, sVmName, eStorageController, sDiskFormat, sDiskPath, cCpus, fHwVirt, fNestedPaging):
+    def testOneCfg(self, sVmName, eStorageController, sDiskFormat, sDiskVariant, # pylint: disable=R0913
+                   sDiskPath, cCpus, sIoTest, sVirtMode, sTestSet):
         """
         Runs the specified VM thru test #1.
 
@@ -517,8 +837,33 @@ class tdStorageBenchmark(vbox.TestDriver):
         """
         oVM = self.getVmByName(sVmName);
 
-        # Reconfigure the VM
+        dTestSet      = self.kdTestSets.get(sTestSet);
+        cbDisk        = dTestSet.get('DiskSizeGb') * 1024*1024*1024;
+        fHwVirt       = sVirtMode != 'raw';
+        fNestedPaging = sVirtMode == 'hwvirt-np';
+
         fRc = True;
+        if sDiskFormat == 'iSCSI':
+            sDiskPath = self.asIscsiTargets[0];
+        elif self.fUseScratch:
+            sDiskPath = self.sScratchPath;
+        else:
+            # If requested recreate the storage space to start with a clean config
+            # for benchmarks
+            if self.fRecreateStorCfg:
+                sMountPoint = self.prepareStorage(self.oStorCfg);
+                if sMountPoint is not None:
+                    # Create a directory where every normal user can write to.
+                    self.oStorCfg.mkDirOnVolume(sMountPoint, 'test', 0777);
+                    sDiskPath = sMountPoint + '/test';
+                else:
+                    fRc = False;
+                    reporter.testFailure('Failed to prepare storage for VM');
+
+        if not fRc:
+            return fRc;
+
+        # Reconfigure the VM
         oSession = self.openSession(oVM);
         if oSession is not None:
             # Attach HD
@@ -533,7 +878,7 @@ class tdStorageBenchmark(vbox.TestDriver):
             if sDiskFormat == "iSCSI":
                 listNames = [];
                 listValues = [];
-                listValues = sDiskPath.split('|');
+                listValues = self.asIscsiTargets[0].split('|');
                 listNames.append('TargetAddress');
                 listNames.append('TargetName');
                 listNames.append('LUN');
@@ -562,9 +907,12 @@ class tdStorageBenchmark(vbox.TestDriver):
                     else:
                         reporter.log('attached "%s" to %s' % (sDiskPath, oSession.sName));
             else:
-                fRc = fRc and oSession.createAndAttachHd(sDiskPath, sDiskFormat, _ControllerTypeToName(eStorageController), \
-                                                         cb = 300*1024*1024*1024, iPort = 0, iDevice = iDevice, \
-                                                         fImmutable = False);
+                tMediumVariant = self.convDiskToMediumVariant(sDiskVariant);
+                fRc = fRc and oSession.createAndAttachHd(sDiskPath + '/test.disk', sDiskFormat, \
+                                                         _ControllerTypeToName(eStorageController), \
+                                                         cb = cbDisk, iPort = 0, iDevice = iDevice, \
+                                                         fImmutable = False, cMsTimeout = 3600 * 1000, \
+                                                         tMediumVariant = tMediumVariant);
             fRc = fRc and oSession.enableVirtEx(fHwVirt);
             fRc = fRc and oSession.enableNestedPaging(fNestedPaging);
             fRc = fRc and oSession.setCpuCount(cCpus);
@@ -592,7 +940,7 @@ class tdStorageBenchmark(vbox.TestDriver):
 
                 sMountPoint = self.prepareStorage(oStorCfgVm);
                 if sMountPoint is not None:
-                    self.testBenchmarks('linux', sMountPoint, oExecVm);
+                    self.testBenchmark('linux', sIoTest, sMountPoint, oExecVm, dTestSet);
                     self.cleanupStorage(oStorCfgVm);
                 else:
                     reporter.testFailure('Failed to prepare storage for the guest benchmark');
@@ -615,7 +963,7 @@ class tdStorageBenchmark(vbox.TestDriver):
                         oSession.o.machine.removeStorageController(_ControllerTypeToName(eStorageController));
 
                     oSession.saveSettings();
-                    self.oVBox.deleteHdByLocation(sDiskPath);
+                    self.oVBox.deleteHdByLocation(sDiskPath + '/test.disk');
                     oSession.saveSettings();
                     oSession.close();
                     oSession = None;
@@ -624,92 +972,42 @@ class tdStorageBenchmark(vbox.TestDriver):
             else:
                 fRc = False;
 
+            # Cleanup storage area
+            if sDiskFormat != 'iSCSI' and not self.fUseScratch and self.fRecreateStorCfg:
+                self.cleanupStorage(self.oStorCfg);
+
         return fRc;
 
-    def testBenchmarkOneVM(self, sVmName):
+    def testStorage(self, sDiskPath = None):
         """
-        Runs one VM thru the various benchmark configurations.
+        Runs the storage testcase through the selected configurations
         """
-        reporter.testStart(sVmName);
-        fRc = True;
-        for sStorageCtrl in self.asStorageCtrls:
-            reporter.testStart(sStorageCtrl);
-
-            if sStorageCtrl == 'AHCI':
-                eStorageCtrl = vboxcon.StorageControllerType_IntelAhci;
-            elif sStorageCtrl == 'IDE':
-                eStorageCtrl = vboxcon.StorageControllerType_PIIX4;
-            elif sStorageCtrl == 'LsiLogicSAS':
-                eStorageCtrl = vboxcon.StorageControllerType_LsiLogicSas;
-            elif sStorageCtrl == 'LsiLogic':
-                eStorageCtrl = vboxcon.StorageControllerType_LsiLogic;
-            elif sStorageCtrl == 'BusLogic':
-                if sVmName == 'tst-storage': # Broken for 64bit Linux
-                    reporter.testDone(True);
-                    continue;
-                eStorageCtrl = vboxcon.StorageControllerType_BusLogic;
-            elif sStorageCtrl == 'NVMe':
-                eStorageCtrl = vboxcon.StorageControllerType_NVMe;
-            else:
-                eStorageCtrl = None;
 
-            for sDiskFormat in self.asDiskFormats:
-                reporter.testStart('%s' % (sDiskFormat));
+        aasTestCfgs = [];
+        aasTestCfgs.insert(self.kiVmName,      self.asTestVMs);
+        aasTestCfgs.insert(self.kiStorageCtrl, self.asStorageCtrls);
+        aasTestCfgs.insert(self.kiDiskFmt,     self.asDiskFormats);
+        aasTestCfgs.insert(self.kiDiskVar,     self.asDiskVariants);
+        aasTestCfgs.insert(self.kiCpuCount,    (self.acCpus, self.fnFormatCpuString));
+        aasTestCfgs.insert(self.kiVirtMode,    (self.asVirtModes, self.fnFormatVirtMode));
+        aasTestCfgs.insert(self.kiIoTest,      self.asTests);
+        aasTestCfgs.insert(self.kiTestSet,     self.asTestSets);
 
-                if sDiskFormat == "iSCSI":
-                    asPaths = self.asIscsiTargets;
-                else:
-                    if self.fUseScratch:
-                        asPaths = [ self.sScratchPath ];
-                    else:
-                        # Create a new default storage config on the host
-                        sMountPoint = self.prepareStorage(self.oStorCfg);
-                        if sMountPoint is not None:
-                            # Create a directory where every normal user can write to.
-                            self.oStorCfg.mkDirOnVolume(sMountPoint, 'test', 0777);
-                            asPaths = [ sMountPoint + '/test' ];
-                        else:
-                            asPaths = [];
-                            fRc = False;
-                            reporter.testFailure('Failed to prepare storage for VM');
-
-                for sPath in asPaths:
-                    reporter.testStart('%s' % (sPath));
+        aasTestsBlacklist = [];
+        aasTestsBlacklist.append(['tst-storage', 'BusLogic']); # 64bit Linux is broken with BusLogic
 
-                    if sDiskFormat == "iSCSI":
-                        sPath = sPath;
-                    else:
-                        sPath = sPath + "/test.disk";
-
-                    for cCpus in self.acCpus:
-                        if cCpus == 1:  reporter.testStart('1 cpu');
-                        else:           reporter.testStart('%u cpus' % (cCpus));
-
-                        for sVirtMode in self.asVirtModes:
-                            if sVirtMode == 'raw' and (cCpus > 1 or sVmName == 'tst-storage'):
-                                continue;
-                            hsVirtModeDesc = {};
-                            hsVirtModeDesc['raw']       = 'Raw-mode';
-                            hsVirtModeDesc['hwvirt']    = 'HwVirt';
-                            hsVirtModeDesc['hwvirt-np'] = 'NestedPaging';
-                            reporter.testStart(hsVirtModeDesc[sVirtMode]);
-
-                            fHwVirt       = sVirtMode != 'raw';
-                            fNestedPaging = sVirtMode == 'hwvirt-np';
-                            fRc = self.test1OneCfg(sVmName, eStorageCtrl, sDiskFormat, sPath, \
-                                                   cCpus, fHwVirt, fNestedPaging)  and  fRc and True; # pychecker hack.
-                            reporter.testDone();
+        oTstCfgMgr = StorTestCfgMgr(aasTestCfgs, aasTestsBlacklist, self.isTestCfgSupported);
 
-                        reporter.testDone();
-                    reporter.testDone();
+        fRc = True;
+        asTestCfg = oTstCfgMgr.getCurrentTestCfg();
+        while len(asTestCfg) > 0:
+            fRc = self.testOneCfg(asTestCfg[self.kiVmName], self.getStorageCtrlFromName(asTestCfg[self.kiStorageCtrl]), \
+                                  asTestCfg[self.kiDiskFmt], asTestCfg[self.kiDiskVar], sDiskPath, \
+                                  asTestCfg[self.kiCpuCount], asTestCfg[self.kiIoTest], asTestCfg[self.kiVirtMode], \
+                                  asTestCfg[self.kiTestSet]) and fRc and True; # pychecker hack.
 
-                # Cleanup storage area
-                if sDiskFormat != 'iSCSI' and not self.fUseScratch:
-                    self.cleanupStorage(self.oStorCfg);
+            asTestCfg = oTstCfgMgr.getNextTestCfg();
 
-                reporter.testDone();
-            reporter.testDone();
-        reporter.testDone();
         return fRc;
 
     def test1(self):
@@ -727,6 +1025,11 @@ class tdStorageBenchmark(vbox.TestDriver):
             oExecutor = remoteexecutor.RemoteExecutor(None, lstBinaryPaths, self.sScratchPath);
             self.oStorCfg = storagecfg.StorageCfg(oExecutor, utils.getHostOs(), oDiskCfg);
 
+            # Try to cleanup any leftovers from a previous run first.
+            fRc = self.oStorCfg.cleanupLeftovers();
+            if not fRc:
+                reporter.error('Failed to cleanup any leftovers from a previous run');
+
             if self.fTestHost:
                 reporter.testStart('Host');
                 if self.fUseScratch:
@@ -734,20 +1037,39 @@ class tdStorageBenchmark(vbox.TestDriver):
                 else:
                     sMountPoint = self.prepareStorage(self.oStorCfg);
                 if sMountPoint is not None:
-                    self.testBenchmarks(utils.getHostOs(), sMountPoint, oExecutor);
+                    for sIoTest in self.asTests:
+                        reporter.testStart(sIoTest);
+                        for sTestSet in self.asTestSets:
+                            reporter.testStart(sTestSet);
+                            dTestSet = self.kdTestSets.get(sTestSet);
+                            self.testBenchmark(utils.getHostOs(), sIoTest, sMountPoint, oExecutor, dTestSet);
+                            reporter.testDone();
+                        reporter.testDone();
                     self.cleanupStorage(self.oStorCfg);
                 else:
                     reporter.testFailure('Failed to prepare host storage');
                     fRc = False;
                 reporter.testDone();
             else:
-                # Loop thru the test VMs.
-                for sVM in self.asTestVMs:
-                    # run test on the VM.
-                    if not self.testBenchmarkOneVM(sVM):
+                # Create the storage space first if it is not done before every test.
+                sMountPoint = None;
+                if not self.fRecreateStorCfg:
+                    reporter.testStart('Create host storage');
+                    sMountPoint = self.prepareStorage(self.oStorCfg);
+                    if sMountPoint is None:
+                        reporter.testFailure('Failed to prepare host storage');
                         fRc = False;
-                    else:
-                        fRc = True;
+                    self.oStorCfg.mkDirOnVolume(sMountPoint, 'test', 0777);
+                    sMountPoint = sMountPoint + '/test';
+                    reporter.testDone();
+
+                if fRc:
+                    # Run the storage tests.
+                    if not self.testStorage(sMountPoint):
+                        fRc = False;
+
+                if not self.fRecreateStorCfg:
+                    self.cleanupStorage(self.oStorCfg);
         else:
             fRc = False;
 
diff --git a/src/VBox/ValidationKit/tests/storage/tdStorageSnapshotMerging1.py b/src/VBox/ValidationKit/tests/storage/tdStorageSnapshotMerging1.py
index 9e9e5cc..046dfb7 100755
--- a/src/VBox/ValidationKit/tests/storage/tdStorageSnapshotMerging1.py
+++ b/src/VBox/ValidationKit/tests/storage/tdStorageSnapshotMerging1.py
@@ -8,7 +8,7 @@ VirtualBox Validation Kit - Storage snapshotting and merging testcase.
 
 __copyright__ = \
 """
-Copyright (C) 2013-2015 Oracle Corporation
+Copyright (C) 2013-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/tests/storage/tdStorageStress1.py b/src/VBox/ValidationKit/tests/storage/tdStorageStress1.py
index e185bd6..7302a37 100755
--- a/src/VBox/ValidationKit/tests/storage/tdStorageStress1.py
+++ b/src/VBox/ValidationKit/tests/storage/tdStorageStress1.py
@@ -7,7 +7,7 @@ Storage testcase using xfstests.
 
 __copyright__ = \
 """
-Copyright (C) 2012-2015 Oracle Corporation
+Copyright (C) 2012-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/tests/teleportation/Makefile.kmk b/src/VBox/ValidationKit/tests/teleportation/Makefile.kmk
index 120bb16..87c20a2 100644
--- a/src/VBox/ValidationKit/tests/teleportation/Makefile.kmk
+++ b/src/VBox/ValidationKit/tests/teleportation/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/tests/teleportation/tdTeleportLocal1.py b/src/VBox/ValidationKit/tests/teleportation/tdTeleportLocal1.py
index 803d5ed..15c9e31 100755
--- a/src/VBox/ValidationKit/tests/teleportation/tdTeleportLocal1.py
+++ b/src/VBox/ValidationKit/tests/teleportation/tdTeleportLocal1.py
@@ -8,7 +8,7 @@ VirtualBox Validation Kit - Local teleportation testdriver.
 
 __copyright__ = \
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 100880 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard Python imports.
diff --git a/src/VBox/ValidationKit/tests/unittests/Makefile.kmk b/src/VBox/ValidationKit/tests/unittests/Makefile.kmk
index 5cea077..17c007d 100644
--- a/src/VBox/ValidationKit/tests/unittests/Makefile.kmk
+++ b/src/VBox/ValidationKit/tests/unittests/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/tests/unittests/tdUnitTest1.py b/src/VBox/ValidationKit/tests/unittests/tdUnitTest1.py
index 2de96af..4fdb0f4 100755
--- a/src/VBox/ValidationKit/tests/unittests/tdUnitTest1.py
+++ b/src/VBox/ValidationKit/tests/unittests/tdUnitTest1.py
@@ -8,7 +8,7 @@ VirtualBox Validation Kit - Unit Tests.
 
 __copyright__ = \
 """
-Copyright (C) 2010-2015 Oracle Corporation
+Copyright (C) 2010-2016 Oracle Corporation
 
 This file is part of VirtualBox Open Source Edition (OSE), as
 available from http://www.virtualbox.org. This file is free software;
@@ -27,7 +27,7 @@ CDDL are applicable instead of those of the GPL.
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
 """
-__version__ = "$Revision: 108487 $"
+__version__ = "$Revision: 109040 $"
 
 
 # Standard Python imports.
diff --git a/src/VBox/ValidationKit/tests/usb/Makefile.kmk b/src/VBox/ValidationKit/tests/usb/Makefile.kmk
index 823c574..6d89668 100644
--- a/src/VBox/ValidationKit/tests/usb/Makefile.kmk
+++ b/src/VBox/ValidationKit/tests/usb/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2014-2015 Oracle Corporation
+# Copyright (C) 2014-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/utils/Makefile.kmk b/src/VBox/ValidationKit/utils/Makefile.kmk
index f6e4fed..2789daa 100644
--- a/src/VBox/ValidationKit/utils/Makefile.kmk
+++ b/src/VBox/ValidationKit/utils/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2010-2015 Oracle Corporation
+# Copyright (C) 2010-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -53,7 +53,8 @@ ValidationKitOs2LibC_SOURCES = \
 	$(KBUILD_BIN_PATH)/libc062.dll \
 	$(KBUILD_BIN_PATH)/libc063.dll \
 	$(KBUILD_BIN_PATH)/libc064.dll \
-	$(KBUILD_BIN_PATH)/libc065.dll
+	$(KBUILD_BIN_PATH)/libc065.dll \
+	$(KBUILD_BIN_PATH)/libc066.dll
 
 
 include $(FILE_KBUILD_SUB_FOOTER)
diff --git a/src/VBox/ValidationKit/utils/TestExecServ/Makefile.kmk b/src/VBox/ValidationKit/utils/TestExecServ/Makefile.kmk
index f37a62c..bd75f36 100644
--- a/src/VBox/ValidationKit/utils/TestExecServ/Makefile.kmk
+++ b/src/VBox/ValidationKit/utils/TestExecServ/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2010-2015 Oracle Corporation
+# Copyright (C) 2010-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/utils/TestExecServ/TestExecService.cpp b/src/VBox/ValidationKit/utils/TestExecServ/TestExecService.cpp
index fe749cc..355c9e2 100644
--- a/src/VBox/ValidationKit/utils/TestExecServ/TestExecService.cpp
+++ b/src/VBox/ValidationKit/utils/TestExecServ/TestExecService.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -755,7 +755,6 @@ static int txsDoUnpackFile(PCTXSPKTHDR pPktHdr)
     char *pszDirectory = NULL;
 
     /* Packet cursor. */
-    const char *pchEnd = (const char *)pPktHdr + pPktHdr->cb;
     const char *pch = (const char *)(pPktHdr + 1);
 
     if (txsIsStringValid(pPktHdr, "file", pch, &pszFile, &pch, &rc))
@@ -2490,6 +2489,7 @@ static int txsDoExecHlp(PCTXSPKTHDR pPktHdr, uint32_t fFlags, const char *pszExe
                         const char *pszUsername, RTMSINTERVAL cMillies)
 {
     int     rc2;
+    RT_NOREF_PV(fFlags);
 
     /*
      * Input validation, filter out things we don't yet support..
@@ -3261,7 +3261,6 @@ static RTEXITCODE txsParseArgv(int argc, char **argv, bool *pfExit)
     bool        fAutoUpgrade    = true;
     bool        fDaemonize      = true;
     bool        fDaemonized     = false;
-    bool        fTransportFixed = false;
     const char *pszUpgrading    = NULL;
 
     /*
@@ -3367,7 +3366,7 @@ static RTEXITCODE txsParseArgv(int argc, char **argv, bool *pfExit)
                 break;
 
             case 'V':
-                RTPrintf("$Revision: 108663 $\n");
+                RTPrintf("$Revision: 109470 $\n");
                 *pfExit = true;
                 return RTEXITCODE_SUCCESS;
 
diff --git a/src/VBox/ValidationKit/utils/TestExecServ/TestExecServiceInternal.h b/src/VBox/ValidationKit/utils/TestExecServ/TestExecServiceInternal.h
index b6dc7bc..2a00544 100644
--- a/src/VBox/ValidationKit/utils/TestExecServ/TestExecServiceInternal.h
+++ b/src/VBox/ValidationKit/utils/TestExecServ/TestExecServiceInternal.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/utils/TestExecServ/TestExecServiceTcp.cpp b/src/VBox/ValidationKit/utils/TestExecServ/TestExecServiceTcp.cpp
index 59d5069..f87de4b 100644
--- a/src/VBox/ValidationKit/utils/TestExecServ/TestExecServiceTcp.cpp
+++ b/src/VBox/ValidationKit/utils/TestExecServ/TestExecServiceTcp.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -125,9 +125,8 @@ static void txsTcpDisconnectClient(void)
  *
  * @returns NIL_RTSOCKET if consumed, other wise hTcpClient.
  * @param   hTcpClient      The client socket.
- * @param   fFromServer     Set if server type connection.
  */
-static RTSOCKET txsTcpSetClient(RTSOCKET hTcpClient, bool fFromServer)
+static RTSOCKET txsTcpSetClient(RTSOCKET hTcpClient)
 {
     RTCritSectEnter(&g_TcpCritSect);
     if (   g_hTcpClient  == NIL_RTSOCKET
@@ -158,10 +157,11 @@ static DECLCALLBACK(int) txsTcpServerConnectThread(RTTHREAD hSelf, void *pvUser)
     Log(("txsTcpConnectServerThread: RTTcpServerListen2 -> %Rrc\n", rc));
     if (RT_SUCCESS(rc))
     {
-        hTcpClient = txsTcpSetClient(hTcpClient, true /*fFromServer*/);
+        hTcpClient = txsTcpSetClient(hTcpClient);
         RTTcpServerDisconnectClient2(hTcpClient);
     }
 
+    RT_NOREF2(hSelf, pvUser);
     return rc;
 }
 
@@ -191,6 +191,8 @@ static bool txsTcpIsFatalClientConnectStatus(int rc)
  */
 static DECLCALLBACK(int) txsTcpClientConnectThread(RTTHREAD hSelf, void *pvUser)
 {
+    RT_NOREF1(pvUser);
+
     for (;;)
     {
         /* Stop? */
@@ -208,7 +210,7 @@ static DECLCALLBACK(int) txsTcpClientConnectThread(RTTHREAD hSelf, void *pvUser)
         Log(("txsTcpRecvPkt: RTTcpClientConnect -> %Rrc\n", rc));
         if (RT_SUCCESS(rc))
         {
-            hTcpClient = txsTcpSetClient(hTcpClient, true /*fFromServer*/);
+            hTcpClient = txsTcpSetClient(hTcpClient);
             RTTcpClientCloseEx(hTcpClient, true /* fGracefulShutdown*/);
             break;
         }
diff --git a/src/VBox/ValidationKit/utils/cpu/Makefile.kmk b/src/VBox/ValidationKit/utils/cpu/Makefile.kmk
index 5d58671..8568d62 100644
--- a/src/VBox/ValidationKit/utils/cpu/Makefile.kmk
+++ b/src/VBox/ValidationKit/utils/cpu/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2009-2015 Oracle Corporation
+# Copyright (C) 2009-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -57,7 +57,7 @@ cidet-app_DEFS.linux = CIDET_REDUCED_CTX
 cidet-app_LIBS = $(PATH_STAGE_LIB)/DisasmR3Static$(VBOX_SUFF_LIB)
 
 #PROGRAMS += rdtsc
-#rdtsc_TEMPLATE = rdtsc
+#rdtsc_TEMPLATE = VBoxValidationKitR3
 #rdtsc_SOURCES  = rdtsc.cpp rdtsc-asm.asm
 
 
diff --git a/src/VBox/ValidationKit/utils/cpu/cidet-app.cpp b/src/VBox/ValidationKit/utils/cpu/cidet-app.cpp
index 5e33fee..e548d2c 100644
--- a/src/VBox/ValidationKit/utils/cpu/cidet-app.cpp
+++ b/src/VBox/ValidationKit/utils/cpu/cidet-app.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -42,7 +42,7 @@
 #include <iprt/test.h>
 
 #ifdef RT_OS_WINDOWS
-# include <Windows.h>
+# include <iprt/win/windows.h>
 #else
 # define USE_SIGNALS
 # include <signal.h>
@@ -565,6 +565,7 @@ static void CidetAppSigHandler(int iSignal, siginfo_t *pSigInfo, void *pvCtx)
 static int cidetAppAllocateAndConfigureOneBuffer(PCIDETAPP pThis, PCIDETAPPBUF pBuf, uint16_t idxBuf, bool fIsCode,
                                                  uint32_t fFlags)
 {
+    RT_NOREF_PV(pThis);
     static uint8_t const s_afBufProtToDefaultMemProt[] =
     {
         /* [0]  = */ RTMEM_PROT_NONE,
@@ -672,6 +673,7 @@ static void CidetAppDeleteBuffer(PCIDETAPPBUF pBuf)
 
 static bool CidetAppArmBuf(PCIDETAPP pThis, PCIDETAPPBUF pAppBuf)
 {
+    RT_NOREF_PV(pThis);
     uint8_t *pbUsingBuf = (pAppBuf->fUsingNormal ? pAppBuf->pbNormal : pAppBuf->pbLow);
     if (pAppBuf->fLastPageProt == pAppBuf->fDefaultProt)
     {
@@ -692,6 +694,7 @@ static bool CidetAppArmBuf(PCIDETAPP pThis, PCIDETAPPBUF pAppBuf)
 
 static bool CidetAppDearmBuf(PCIDETAPP pThis, PCIDETAPPBUF pAppBuf)
 {
+    RT_NOREF_PV(pThis);
     uint8_t *pbUsingBuf = (pAppBuf->fUsingNormal ? pAppBuf->pbNormal : pAppBuf->pbLow);
     int rc = RTMemProtect(pbUsingBuf, pAppBuf->cb, pAppBuf->fDefaultProt | RTMEM_PROT_READ | RTMEM_PROT_WRITE);
     if (RT_FAILURE(rc))
@@ -1105,6 +1108,7 @@ static DECLCALLBACK(bool) CidetAppCbExecute(PCIDETCORE pThis)
  */
 static DECLCALLBACK(void) CidetAppCbFailureV(PCIDETCORE pThis, const char *pszMsg, va_list va)
 {
+    RT_NOREF_PV(pThis);
     RTTestIFailedV(pszMsg, va);
 }
 
diff --git a/src/VBox/ValidationKit/utils/cpu/cidet-appA.asm b/src/VBox/ValidationKit/utils/cpu/cidet-appA.asm
index 8e857ad..e2c0aa1 100644
--- a/src/VBox/ValidationKit/utils/cpu/cidet-appA.asm
+++ b/src/VBox/ValidationKit/utils/cpu/cidet-appA.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2009-2015 Oracle Corporation
+; Copyright (C) 2009-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/utils/cpu/cidet-core.cpp b/src/VBox/ValidationKit/utils/cpu/cidet-core.cpp
index c9ebc64..8d168fe 100644
--- a/src/VBox/ValidationKit/utils/cpu/cidet-core.cpp
+++ b/src/VBox/ValidationKit/utils/cpu/cidet-core.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -318,6 +318,7 @@ int CidetCoreSetTargetMode(PCIDETCORE pThis, uint8_t bMode)
 
 bool CidetCoreIsEncodingCompatibleWithInstruction(PCIDETCORE pThis)
 {
+    RT_NOREF_PV(pThis);
     return true;
 }
 
@@ -726,6 +727,7 @@ static bool cidetCoreSetupNextBaseEncoding_MrmRmMod_16bit(PCIDETCORE pThis, uint
  */
 static void cidetCoreSetupFirstBaseEncoding_MrmRmMod_32bit64bit(PCIDETCORE pThis, uint8_t iReg, bool f64Bit)
 {
+    RT_NOREF_PV(f64Bit);
     if (CidetInstrHasMrmRegOperand(pThis->pCurInstr))
     {
         pThis->aOperands[pThis->idxMrmRmOp].iReg            = 0;
@@ -1071,6 +1073,7 @@ static bool cidetCoreSetupNextBaseEncoding_SibIndex(PCIDETCORE pThis, uint8_t iR
  */
 static bool cidetCoreSetupNextBaseEncoding_SibScale(PCIDETCORE pThis, uint8_t iReg)
 {
+    RT_NOREF_PV(iReg);
     switch ((pThis->bSib >> X86_SIB_SCALE_SHIFT) & X86_SIB_SCALE_SMASK)
     {
         case 0:
@@ -1319,6 +1322,7 @@ bool CidetCoreSetupFirstBaseEncoding(PCIDETCORE pThis)
  */
 bool CidetCoreSetupNextMemoryOperandConfig(PCIDETCORE pThis)
 {
+    RT_NOREF_PV(pThis);
     return false;
 }
 
@@ -1371,6 +1375,7 @@ bool CidetCoreSetupFirstMemoryOperandConfig(PCIDETCORE pThis)
  */
 bool CidetCoreSetupNextCodeBufferConfig(PCIDETCORE pThis)
 {
+    RT_NOREF_PV(pThis);
     return false;
 }
 
@@ -1910,7 +1915,7 @@ bool CidetCoreAssembleLength(PCIDETCORE pThis)
     /*
      * The opcode.
      */
-    uint8_t const *pbOpcode = pThis->pCurInstr->abOpcode;
+    //uint8_t const *pbOpcode = pThis->pCurInstr->abOpcode;
     switch (pThis->pCurInstr->cbOpcode)
     {
         case 3: off++;
@@ -1931,7 +1936,7 @@ bool CidetCoreAssembleLength(PCIDETCORE pThis)
             off++;
         if (pThis->idxMrmRmOp < RT_ELEMENTS(pThis->aOperands))
         {
-            uint64_t uDispValue = pThis->aOperands[pThis->idxMrmRmOp].uImmDispValue;
+            //uint64_t uDispValue = pThis->aOperands[pThis->idxMrmRmOp].uImmDispValue;
             switch (pThis->aOperands[pThis->idxMrmRmOp].cbMemDisp)
             {
                 case 0: break;
@@ -1957,7 +1962,7 @@ bool CidetCoreAssembleLength(PCIDETCORE pThis)
     while (iOp-- > 0)
         if ((pThis->aOperands[iOp].fFlags & CIDET_OF_K_MASK) == CIDET_OF_K_IMM)
         {
-            uint64_t uImmValue = pThis->aOperands[iOp].uImmDispValue;
+            //uint64_t uImmValue = pThis->aOperands[iOp].uImmDispValue;
             switch (pThis->aOperands[iOp].cb)
             {
                 case 8:
@@ -2165,6 +2170,8 @@ bool CidetCoreSetupCodeBuf(PCIDETCORE pThis, unsigned iSubTest)
                                     szInstr, sizeof(szInstr));
         CIDET_DPRINTF(("%04u: %s", iSubTest, szInstr));
         Assert(cbInstr == pThis->cbInstr);
+#else
+        RT_NOREF_PV(iSubTest);
 #endif
         if (pThis->pfnSetupCodeBuf(pThis, &pThis->CodeBuf, pThis->abInstr))
         {
diff --git a/src/VBox/ValidationKit/utils/cpu/cidet-instr-1.cpp b/src/VBox/ValidationKit/utils/cpu/cidet-instr-1.cpp
index 5e1b963..c3a41e7 100644
--- a/src/VBox/ValidationKit/utils/cpu/cidet-instr-1.cpp
+++ b/src/VBox/ValidationKit/utils/cpu/cidet-instr-1.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/utils/cpu/cidet.h b/src/VBox/ValidationKit/utils/cpu/cidet.h
index 751288e..4e801b1 100644
--- a/src/VBox/ValidationKit/utils/cpu/cidet.h
+++ b/src/VBox/ValidationKit/utils/cpu/cidet.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/utils/cpu/cidet.mac b/src/VBox/ValidationKit/utils/cpu/cidet.mac
index f978943..dc1ef8b 100644
--- a/src/VBox/ValidationKit/utils/cpu/cidet.mac
+++ b/src/VBox/ValidationKit/utils/cpu/cidet.mac
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2014-2015 Oracle Corporation
+; Copyright (C) 2014-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/utils/cpu/cpu-alloc-all-mem.cpp b/src/VBox/ValidationKit/utils/cpu/cpu-alloc-all-mem.cpp
index 1b1fd7c..f51a0a1 100644
--- a/src/VBox/ValidationKit/utils/cpu/cpu-alloc-all-mem.cpp
+++ b/src/VBox/ValidationKit/utils/cpu/cpu-alloc-all-mem.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/utils/cpu/cpu-numa.cpp b/src/VBox/ValidationKit/utils/cpu/cpu-numa.cpp
index 2500ce7..9a740f3 100644
--- a/src/VBox/ValidationKit/utils/cpu/cpu-numa.cpp
+++ b/src/VBox/ValidationKit/utils/cpu/cpu-numa.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011-2015 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/utils/cpu/exceptionsR3-asm.asm b/src/VBox/ValidationKit/utils/cpu/exceptionsR3-asm.asm
index cc92fc4..9a8c102 100644
--- a/src/VBox/ValidationKit/utils/cpu/exceptionsR3-asm.asm
+++ b/src/VBox/ValidationKit/utils/cpu/exceptionsR3-asm.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2009-2015 Oracle Corporation
+; Copyright (C) 2009-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/utils/cpu/exceptionsR3.cpp b/src/VBox/ValidationKit/utils/cpu/exceptionsR3.cpp
index 2699637..08c17f6 100644
--- a/src/VBox/ValidationKit/utils/cpu/exceptionsR3.cpp
+++ b/src/VBox/ValidationKit/utils/cpu/exceptionsR3.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/utils/cpu/rdtsc.cpp b/src/VBox/ValidationKit/utils/cpu/rdtsc.cpp
index 2ccc59c..30fa15e 100644
--- a/src/VBox/ValidationKit/utils/cpu/rdtsc.cpp
+++ b/src/VBox/ValidationKit/utils/cpu/rdtsc.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/utils/cpu/xmmsaving-asm.asm b/src/VBox/ValidationKit/utils/cpu/xmmsaving-asm.asm
index 4a461e0..c561a10 100644
--- a/src/VBox/ValidationKit/utils/cpu/xmmsaving-asm.asm
+++ b/src/VBox/ValidationKit/utils/cpu/xmmsaving-asm.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2009-2015 Oracle Corporation
+; Copyright (C) 2009-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/utils/cpu/xmmsaving.cpp b/src/VBox/ValidationKit/utils/cpu/xmmsaving.cpp
index 6da0a0f..51ffa4d 100644
--- a/src/VBox/ValidationKit/utils/cpu/xmmsaving.cpp
+++ b/src/VBox/ValidationKit/utils/cpu/xmmsaving.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/utils/misc/Makefile.kmk b/src/VBox/ValidationKit/utils/misc/Makefile.kmk
index 50eb1f2..f091350 100644
--- a/src/VBox/ValidationKit/utils/misc/Makefile.kmk
+++ b/src/VBox/ValidationKit/utils/misc/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2010-2015 Oracle Corporation
+# Copyright (C) 2010-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/utils/misc/loadgenerator.cpp b/src/VBox/ValidationKit/utils/misc/loadgenerator.cpp
index 470a5ca..d4d6955 100644
--- a/src/VBox/ValidationKit/utils/misc/loadgenerator.cpp
+++ b/src/VBox/ValidationKit/utils/misc/loadgenerator.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -305,7 +305,7 @@ int main(int argc, char **argv)
                 return 1;
 
             case 'V':
-                RTPrintf("$Revision: 102121 $\n");
+                RTPrintf("$Revision: 109040 $\n");
                 return 0;
 
             case VINF_GETOPT_NOT_OPTION:
diff --git a/src/VBox/ValidationKit/utils/misc/loadgeneratorR0.cpp b/src/VBox/ValidationKit/utils/misc/loadgeneratorR0.cpp
index 028d4f4..965cbb6 100644
--- a/src/VBox/ValidationKit/utils/misc/loadgeneratorR0.cpp
+++ b/src/VBox/ValidationKit/utils/misc/loadgeneratorR0.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2008-2015 Oracle Corporation
+ * Copyright (C) 2008-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/utils/misc/vts_rm.cpp b/src/VBox/ValidationKit/utils/misc/vts_rm.cpp
index 38a930a..061c288 100644
--- a/src/VBox/ValidationKit/utils/misc/vts_rm.cpp
+++ b/src/VBox/ValidationKit/utils/misc/vts_rm.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/utils/misc/vts_tar.cpp b/src/VBox/ValidationKit/utils/misc/vts_tar.cpp
index 323c76b..42af5d5 100644
--- a/src/VBox/ValidationKit/utils/misc/vts_tar.cpp
+++ b/src/VBox/ValidationKit/utils/misc/vts_tar.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/utils/network/Makefile.kmk b/src/VBox/ValidationKit/utils/network/Makefile.kmk
index e742196..55ca501 100644
--- a/src/VBox/ValidationKit/utils/network/Makefile.kmk
+++ b/src/VBox/ValidationKit/utils/network/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2010-2015 Oracle Corporation
+# Copyright (C) 2010-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/utils/network/NetPerf.cpp b/src/VBox/ValidationKit/utils/network/NetPerf.cpp
index b85cb63..f1a7487 100644
--- a/src/VBox/ValidationKit/utils/network/NetPerf.cpp
+++ b/src/VBox/ValidationKit/utils/network/NetPerf.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1863,7 +1863,7 @@ int main(int argc, char *argv[])
                 return RTEXITCODE_SUCCESS;
 
             case 'V':
-                RTPrintf("$Revision: 103283 $\n");
+                RTPrintf("$Revision: 109040 $\n");
                 return RTEXITCODE_SUCCESS;
 
             case 'w':
diff --git a/src/VBox/ValidationKit/utils/nt/Makefile.kmk b/src/VBox/ValidationKit/utils/nt/Makefile.kmk
index 51674fb..ddb0d58 100644
--- a/src/VBox/ValidationKit/utils/nt/Makefile.kmk
+++ b/src/VBox/ValidationKit/utils/nt/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2010-2015 Oracle Corporation
+# Copyright (C) 2010-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/utils/nt/ntsetfreq.cpp b/src/VBox/ValidationKit/utils/nt/ntsetfreq.cpp
index 32f3ceb..cc093c5 100644
--- a/src/VBox/ValidationKit/utils/nt/ntsetfreq.cpp
+++ b/src/VBox/ValidationKit/utils/nt/ntsetfreq.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2007-2015 Oracle Corporation
+ * Copyright (C) 2007-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -28,8 +28,7 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
-#define _WIN32_WINNT 0x0500
-#include <Windows.h>
+#include <iprt/nt/nt.h>
 
 #include <iprt/initterm.h>
 #include <iprt/getopt.h>
@@ -39,13 +38,6 @@
 #include <iprt/thread.h>
 #include <iprt/err.h>
 
-RT_C_DECLS_BEGIN
-/* from sysinternals. */
-NTSYSAPI LONG NTAPI NtSetTimerResolution(IN ULONG DesiredResolution, IN BOOLEAN SetResolution, OUT PULONG CurrentResolution);
-NTSYSAPI LONG NTAPI NtQueryTimerResolution(OUT PULONG MinimumResolution, OUT PULONG MaximumResolution, OUT PULONG CurrentResolution);
-RT_C_DECLS_END
-
-
 
 int main(int argc, char **argv)
 {
@@ -108,42 +100,43 @@ int main(int argc, char **argv)
     /*
      * Query the current resolution.
      */
-    ULONG   Cur = ~0;
-    ULONG   Min = ~0;
-    ULONG   Max = ~0;
-    LONG    Status;
+    ULONG    Cur = UINT32_MAX;
+    ULONG    Min = UINT32_MAX;
+    ULONG    Max = UINT32_MAX;
+    NTSTATUS rcNt = STATUS_SUCCESS;
     if (fVerbose || !u32NewRes)
     {
-        Status = NtQueryTimerResolution(&Min, &Max, &Cur);
-        if (Status >= 0)
+        rcNt = NtQueryTimerResolution(&Min, &Max, &Cur);
+        if (NT_SUCCESS(rcNt))
             RTMsgInfo("cur: %u (%u.%02u Hz)  min: %u (%u.%02u Hz)  max: %u (%u.%02u Hz)\n",
                       Cur, 10000000 / Cur, (10000000 / (Cur * 100)) % 100,
                       Min, 10000000 / Min, (10000000 / (Min * 100)) % 100,
                       Max, 10000000 / Max, (10000000 / (Max * 100)) % 100);
         else
-            RTMsgError("NTQueryTimerResolution failed with status %#x\n", Status);
+            RTMsgError("NTQueryTimerResolution failed with status %#x\n", rcNt);
     }
 
     if (u32NewRes)
     {
-        Status = NtSetTimerResolution(u32NewRes, TRUE, &Cur);
-        if (Status < 0)
-            RTMsgError("NTSetTimerResolution(%RU32,,) failed with status %#x\n", u32NewRes, Status);
+        rcNt = NtSetTimerResolution(u32NewRes, TRUE, &Cur);
+        if (!NT_SUCCESS(rcNt))
+            RTMsgError("NTSetTimerResolution(%RU32,,) failed with status %#x\n", u32NewRes, rcNt);
         else if (fVerbose)
         {
-            Cur = Min = Max = ~0;
-            Status = NtQueryTimerResolution(&Min, &Max, &Cur);
-            if (Status >= 0)
+            Cur = Min = Max = UINT32_MAX;
+            rcNt = NtQueryTimerResolution(&Min, &Max, &Cur);
+            if (NT_SUCCESS(rcNt))
                 RTMsgInfo("new: %u (%u.%02u Hz) requested %RU32 (%u.%02u Hz)\n",
                           Cur, 10000000 / Cur, (10000000 / (Cur * 100)) % 100,
                           u32NewRes, 10000000 / u32NewRes, (10000000 / (u32NewRes * 100)) % 100);
             else
-                RTMsgError("NTSetTimerResolution succeeded but the NTQueryTimerResolution call failed with status %#x (ignored)\n", Status);
-            Status = 0;
+                RTMsgError("NTSetTimerResolution succeeded but the NTQueryTimerResolution call failed with status %#x (ignored)\n",
+                           rcNt);
+            rcNt = STATUS_SUCCESS;
         }
     }
 
-    if (u32NewRes && Status >= 0)
+    if (u32NewRes && NT_SUCCESS(rcNt))
     {
         if (cSecsSleep == UINT32_MAX)
             for (;;)
@@ -153,6 +146,6 @@ int main(int argc, char **argv)
                 RTThreadSleep(1000);
     }
 
-    return Status >= 0 ? 0 : 1;
+    return NT_SUCCESS(rcNt) ? 0 : 1;
 }
 
diff --git a/src/VBox/ValidationKit/utils/nt/nttimesources.cpp b/src/VBox/ValidationKit/utils/nt/nttimesources.cpp
index 42efa12..e6e47de 100644
--- a/src/VBox/ValidationKit/utils/nt/nttimesources.cpp
+++ b/src/VBox/ValidationKit/utils/nt/nttimesources.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2009-2015 Oracle Corporation
+ * Copyright (C) 2009-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -28,7 +28,7 @@
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
-#include <Windows.h>
+#include <iprt/win/windows.h>
 
 #include <iprt/asm.h>
 #include <iprt/asm-amd64-x86.h>
@@ -83,6 +83,8 @@ static void DelayMillies(DWORD dwMsStart, DWORD cMillies)
 
 int main(int argc, char **argv)
 {
+    RT_NOREF1(argv);
+
     /*
      * Init, create a test instance and "parse" arguments.
      */
diff --git a/src/VBox/ValidationKit/utils/usb/Makefile.kmk b/src/VBox/ValidationKit/utils/usb/Makefile.kmk
index f8a9966..244484d 100644
--- a/src/VBox/ValidationKit/utils/usb/Makefile.kmk
+++ b/src/VBox/ValidationKit/utils/usb/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2014-2015 Oracle Corporation
+# Copyright (C) 2014-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/ValidationKit/utils/usb/UsbTest.cpp b/src/VBox/ValidationKit/utils/usb/UsbTest.cpp
index c13719e..a65bbe5 100644
--- a/src/VBox/ValidationKit/utils/usb/UsbTest.cpp
+++ b/src/VBox/ValidationKit/utils/usb/UsbTest.cpp
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (C) 2014-2015 Oracle Corporation
+ * Copyright (C) 2014-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -58,6 +58,7 @@
 *   Defined Constants And Macros                                                                                                 *
 *********************************************************************************************************************************/
 
+
 /*********************************************************************************************************************************
 *   Structures and Typedefs                                                                                                      *
 *********************************************************************************************************************************/
@@ -152,6 +153,7 @@ typedef enum USBTESTSPEED
     USBTESTSPEED_SUPER
 } USBTESTSPEED;
 
+
 /*********************************************************************************************************************************
 *   Global Variables                                                                                                             *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/utils/usb/UsbTestService.cpp b/src/VBox/ValidationKit/utils/usb/UsbTestService.cpp
index d1486b1..a06dc82 100644
--- a/src/VBox/ValidationKit/utils/usb/UsbTestService.cpp
+++ b/src/VBox/ValidationKit/utils/usb/UsbTestService.cpp
@@ -106,6 +106,7 @@ typedef struct UTSCLIENT
 /** Pointer to a UTS client instance. */
 typedef UTSCLIENT *PUTSCLIENT;
 
+
 /*********************************************************************************************************************************
 *   Global Variables                                                                                                             *
 *********************************************************************************************************************************/
@@ -465,6 +466,7 @@ static int utsReplyRC(PUTSCLIENT pClient, PCUTSPKTHDR pPktHdr, int rcOperation,
                            szOperation, rcOperation, pPktHdr->achOpcode);
 }
 
+#if 0 /* unused */
 /**
  * Signal a bad packet minum size.
  *
@@ -478,6 +480,7 @@ static int utsReplyBadMinSize(PUTSCLIENT pClient, PCUTSPKTHDR pPktHdr, size_t cb
     return utsReplyFailure(pClient, pPktHdr, "BAD SIZE", VERR_INVALID_PARAMETER, "Expected at least %zu bytes, got %u (opcode '%.8s')",
                            cbMin, pPktHdr->cb, pPktHdr->achOpcode);
 }
+#endif
 
 /**
  * Signal a bad packet exact size.
@@ -493,6 +496,7 @@ static int utsReplyBadSize(PUTSCLIENT pClient, PCUTSPKTHDR pPktHdr, size_t cb)
                            cb, pPktHdr->cb, pPktHdr->achOpcode);
 }
 
+#if 0 /* unused */
 /**
  * Deals with a command that isn't implemented yet.
  * @returns IPRT status code of the send.
@@ -503,6 +507,7 @@ static int utsReplyNotImplemented(PUTSCLIENT pClient, PCUTSPKTHDR pPktHdr)
 {
     return utsReplyFailure(pClient, pPktHdr, "NOT IMPL", VERR_NOT_IMPLEMENTED, "Opcode '%.8s' is not implemented", pPktHdr->achOpcode);
 }
+#endif
 
 /**
  * Deals with a unknown command.
@@ -608,7 +613,7 @@ static int utsDoGadgetCreateCfgParseItem(PUTSGADGETCFGITEM pCfgItem, uint32_t u3
                      || RTStrICmp(pszVal, "0")
                      || RTStrICmp(pszVal, "false"))
                 pCfgItem->Val.u.f = false;
-            else 
+            else
                 rc = VERR_INVALID_PARAMETER;
             break;
         }
@@ -1072,10 +1077,11 @@ static void utsClientDestroy(PUTSCLIENT pClient)
  */
 static DECLCALLBACK(int) utsClientWorker(RTTHREAD hThread, void *pvUser)
 {
-    unsigned   cClientsMax = 0;
-    unsigned   cClientsCur = 0;
-    PUTSCLIENT *papClients = NULL;
-    RTPOLLSET hPollSet;
+    RT_NOREF2(hThread, pvUser);
+    unsigned    cClientsMax = 0;
+    unsigned    cClientsCur = 0;
+    PUTSCLIENT *papClients  = NULL;
+    RTPOLLSET   hPollSet;
 
     int rc = RTPollSetCreate(&hPollSet);
     if (RT_FAILURE(rc))
@@ -1191,7 +1197,7 @@ static RTEXITCODE utsMainLoop(void)
     RTEXITCODE enmExitCode = RTEXITCODE_SUCCESS;
     while (!g_fTerminate)
     {
-        /* 
+        /*
          * Wait for new connection and spin off a new thread
          * for every new client.
          */
@@ -1366,7 +1372,7 @@ static void utsSetDefaults(void)
     /*
      * Config file location.
      */
-    /** @todo: Improve */
+    /** @todo Improve */
 #if !defined(RT_OS_WINDOWS)
     strcpy(g_szCfgPath, "/etc/uts.conf");
 #else
@@ -1544,7 +1550,7 @@ static RTEXITCODE utsParseArgv(int argc, char **argv, bool *pfExit)
             }
 
             case 'V':
-                RTPrintf("$Revision: 108312 $\n");
+                RTPrintf("$Revision: 110222 $\n");
                 *pfExit = true;
                 return RTEXITCODE_SUCCESS;
 
diff --git a/src/VBox/ValidationKit/utils/usb/UsbTestServiceGadget.cpp b/src/VBox/ValidationKit/utils/usb/UsbTestServiceGadget.cpp
index 45fb62d..3d42798 100644
--- a/src/VBox/ValidationKit/utils/usb/UsbTestServiceGadget.cpp
+++ b/src/VBox/ValidationKit/utils/usb/UsbTestServiceGadget.cpp
@@ -38,6 +38,7 @@
 
 #include "UsbTestServiceGadgetInternal.h"
 
+
 /*********************************************************************************************************************************
 *   Constants And Macros, Structures and Typedefs                                                                                *
 *********************************************************************************************************************************/
@@ -172,7 +173,7 @@ DECLHIDDEN(uint32_t) utsGadgetGetDevId(UTSGADGET hGadget)
     PUTSGADGETINT pThis = hGadget;
 
     AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
-    return 1; /** @todo: Current assumption which is true on Linux with dummy_hcd. */
+    return 1; /** @todo Current assumption which is true on Linux with dummy_hcd. */
 }
 
 
diff --git a/src/VBox/ValidationKit/utils/usb/UsbTestServiceGadget.h b/src/VBox/ValidationKit/utils/usb/UsbTestServiceGadget.h
index 0d40e63..3573bf8 100644
--- a/src/VBox/ValidationKit/utils/usb/UsbTestServiceGadget.h
+++ b/src/VBox/ValidationKit/utils/usb/UsbTestServiceGadget.h
@@ -35,7 +35,7 @@ RT_C_DECLS_BEGIN
 /** Opaque gadget host handle. */
 typedef struct UTSGADGETHOSTINT *UTSGADGETHOST;
 /** Pointer to a gadget host handle. */
-typedef UTSGADGETHOST *PUTSGADGETHOST; 
+typedef UTSGADGETHOST *PUTSGADGETHOST;
 
 /** NIL gadget host handle. */
 #define NIL_UTSGADGETHOST ((UTSGADGETHOST)0)
diff --git a/src/VBox/ValidationKit/utils/usb/UsbTestServiceGadgetClassTest.cpp b/src/VBox/ValidationKit/utils/usb/UsbTestServiceGadgetClassTest.cpp
index d34436a..249c9c9 100644
--- a/src/VBox/ValidationKit/utils/usb/UsbTestServiceGadgetClassTest.cpp
+++ b/src/VBox/ValidationKit/utils/usb/UsbTestServiceGadgetClassTest.cpp
@@ -48,6 +48,7 @@
 #include "UsbTestServiceGadgetInternal.h"
 #include "UsbTestServicePlatform.h"
 
+
 /*********************************************************************************************************************************
 *   Constants And Macros, Structures and Typedefs                                                                                *
 *********************************************************************************************************************************/
diff --git a/src/VBox/ValidationKit/utils/usb/UsbTestServiceGadgetHost.cpp b/src/VBox/ValidationKit/utils/usb/UsbTestServiceGadgetHost.cpp
index d8682e1..952f0d8 100644
--- a/src/VBox/ValidationKit/utils/usb/UsbTestServiceGadgetHost.cpp
+++ b/src/VBox/ValidationKit/utils/usb/UsbTestServiceGadgetHost.cpp
@@ -39,6 +39,7 @@
 #include "UsbTestServiceGadget.h"
 #include "UsbTestServiceGadgetHostInternal.h"
 
+
 /*********************************************************************************************************************************
 *   Constants And Macros, Structures and Typedefs                                                                                *
 *********************************************************************************************************************************/
@@ -69,6 +70,7 @@ static const PCUTSGADGETHOSTIF g_apUtsGadgetHostIf[] =
     &g_UtsGadgetHostIfUsbIp,
 };
 
+
 /*********************************************************************************************************************************
 *   Internal Functions                                                                                                           *
 *********************************************************************************************************************************/
@@ -82,7 +84,7 @@ static const PCUTSGADGETHOSTIF g_apUtsGadgetHostIf[] =
  */
 static void utsGadgetHostDestroy(PUTSGADGETHOSTINT pThis)
 {
-    /** @todo: Remove all gadgets. */
+    /** @todo Remove all gadgets. */
     pThis->pHstIf->pfnTerm((PUTSGADGETHOSTTYPEINT)&pThis->abIfInst[0]);
     RTMemFree(pThis);
 }
diff --git a/src/VBox/ValidationKit/utils/usb/UsbTestServiceGadgetHostUsbIp.cpp b/src/VBox/ValidationKit/utils/usb/UsbTestServiceGadgetHostUsbIp.cpp
index c3a3ae0..f2976d7 100644
--- a/src/VBox/ValidationKit/utils/usb/UsbTestServiceGadgetHostUsbIp.cpp
+++ b/src/VBox/ValidationKit/utils/usb/UsbTestServiceGadgetHostUsbIp.cpp
@@ -44,6 +44,7 @@
 #include "UsbTestServiceGadgetHostInternal.h"
 #include "UsbTestServicePlatform.h"
 
+
 /*********************************************************************************************************************************
 *   Constants And Macros, Structures and Typedefs                                                                                *
 *********************************************************************************************************************************/
@@ -60,6 +61,7 @@ typedef struct UTSGADGETHOSTTYPEINT
 /** Default port of the USB/IP server. */
 #define UTS_GADGET_HOST_USBIP_PORT_DEF 3240
 
+
 /*********************************************************************************************************************************
 *   Internal Functions                                                                                                           *
 *********************************************************************************************************************************/
@@ -75,6 +77,7 @@ typedef struct UTSGADGETHOSTTYPEINT
  */
 static int usbGadgetHostUsbIpBindUnbind(PUTSGADGETHOSTTYPEINT pThis, UTSGADGET hGadget, bool fBind)
 {
+    RT_NOREF1(pThis);
     uint32_t uBusId, uDevId;
     char aszBus[32];
 
@@ -106,7 +109,7 @@ static int usbGadgetHostUsbIpBindUnbind(PUTSGADGETHOSTTYPEINT pThis, UTSGADGET h
             /* Evaluate the process status. */
             if (   ProcSts.enmReason != RTPROCEXITREASON_NORMAL
                 || ProcSts.iStatus != 0)
-                rc = VERR_UNRESOLVED_ERROR; /** @todo: Log and give finer grained status code. */
+                rc = VERR_UNRESOLVED_ERROR; /** @todo Log and give finer grained status code. */
         }
     }
 
@@ -191,6 +194,7 @@ static DECLCALLBACK(void) utsGadgetHostUsbIpTerm(PUTSGADGETHOSTTYPEINT pIf)
 static DECLCALLBACK(int) utsGadgetHostUsbIpGadgetAdd(PUTSGADGETHOSTTYPEINT pIf, UTSGADGET hGadget)
 {
     /* Nothing to do so far. */
+    RT_NOREF2(pIf, hGadget);
     return VINF_SUCCESS;
 }
 
@@ -201,6 +205,7 @@ static DECLCALLBACK(int) utsGadgetHostUsbIpGadgetAdd(PUTSGADGETHOSTTYPEINT pIf,
 static DECLCALLBACK(int) utsGadgetHostUsbIpGadgetRemove(PUTSGADGETHOSTTYPEINT pIf, UTSGADGET hGadget)
 {
     /* Nothing to do so far. */
+    RT_NOREF2(pIf, hGadget);
     return VINF_SUCCESS;
 }
 
diff --git a/src/VBox/ValidationKit/utils/usb/UsbTestServiceInternal.h b/src/VBox/ValidationKit/utils/usb/UsbTestServiceInternal.h
index 83d3425..2c2c043 100644
--- a/src/VBox/ValidationKit/utils/usb/UsbTestServiceInternal.h
+++ b/src/VBox/ValidationKit/utils/usb/UsbTestServiceInternal.h
@@ -115,7 +115,7 @@ typedef struct UTSTRANSPORT
      *
      * @returns IPRT status code.
      * @param   hPollSet            The poll set to add them to.
-     * @paramm  pClient             The transport client structure. 
+     * @paramm  pClient             The transport client structure.
      * @param   idStart             The handle ID to start at.
      */
     DECLR3CALLBACKMEMBER(int, pfnPollSetAdd, (RTPOLLSET hPollSet, PUTSTRANSPORTCLIENT pClient, uint32_t idStart));
@@ -125,7 +125,7 @@ typedef struct UTSTRANSPORT
      *
      * @returns IPRT status code.
      * @param   hPollSet            The poll set to remove from.
-     * @paramm  pClient             The transport client structure. 
+     * @paramm  pClient             The transport client structure.
      * @param   idStart             The handle ID to remove.
      */
     DECLR3CALLBACKMEMBER(int, pfnPollSetRemove, (RTPOLLSET hPollSet, PUTSTRANSPORTCLIENT pClient, uint32_t idStart));
@@ -141,7 +141,7 @@ typedef struct UTSTRANSPORT
      *          interrupted, the transport layer will store the data until the next
      *          receive call.
      *
-     * @paramm  pClient             The transport client structure. 
+     * @paramm  pClient             The transport client structure.
      * @param   ppPktHdr            Where to return the pointer to the packet we've
      *                              read.  This is allocated from the heap using
      *                              RTMemAlloc (w/ UTSPKT_ALIGNMENT) and must be
@@ -157,7 +157,7 @@ typedef struct UTSTRANSPORT
      * @returns IPRT status code.
      * @retval  VERR_INTERRUPTED if interrupted before anything was sent.
      *
-     * @paramm  pClient             The transport client structure. 
+     * @paramm  pClient             The transport client structure.
      * @param   pPktHdr             The packet to send.  The size is given by
      *                              aligning the size in the header by
      *                              UTSPKT_ALIGNMENT.
@@ -167,7 +167,7 @@ typedef struct UTSTRANSPORT
     /**
      * Sends a babble packet and disconnects the client (if applicable).
      *
-     * @paramm  pClient             The transport client structure. 
+     * @paramm  pClient             The transport client structure.
      * @param   pPktHdr             The packet to send.  The size is given by
      *                              aligning the size in the header by
      *                              UTSPKT_ALIGNMENT.
@@ -178,7 +178,7 @@ typedef struct UTSTRANSPORT
     /**
      * Notification about a client HOWDY.
      *
-     * @paramm  pClient             The transport client structure. 
+     * @paramm  pClient             The transport client structure.
      */
     DECLR3CALLBACKMEMBER(void, pfnNotifyHowdy, (PUTSTRANSPORTCLIENT pClient));
 
@@ -188,7 +188,7 @@ typedef struct UTSTRANSPORT
      * For connection oriented transport layers, it would be good to disconnect the
      * client at this point.
      *
-     * @paramm  pClient             The transport client structure. 
+     * @paramm  pClient             The transport client structure.
      */
     DECLR3CALLBACKMEMBER(void, pfnNotifyBye, (PUTSTRANSPORTCLIENT pClient));
 
diff --git a/src/VBox/ValidationKit/utils/usb/UsbTestServicePlatform-linux.cpp b/src/VBox/ValidationKit/utils/usb/UsbTestServicePlatform-linux.cpp
index a8a76ff..d0d1f1f 100644
--- a/src/VBox/ValidationKit/utils/usb/UsbTestServicePlatform-linux.cpp
+++ b/src/VBox/ValidationKit/utils/usb/UsbTestServicePlatform-linux.cpp
@@ -45,6 +45,7 @@
 
 #include "UsbTestServicePlatform.h"
 
+
 /*********************************************************************************************************************************
 *   Constants And Macros, Structures and Typedefs                                                                                *
 *********************************************************************************************************************************/
@@ -88,6 +89,7 @@ typedef struct UTSPLATFORMLNXDUMMYHCD
 /** Pointer to a dummy HCD entry. */
 typedef UTSPLATFORMLNXDUMMYHCD *PUTSPLATFORMLNXDUMMYHCD;
 
+
 /*********************************************************************************************************************************
 *   Global Variables                                                                                                             *
 *********************************************************************************************************************************/
@@ -279,7 +281,7 @@ DECLHIDDEN(int) utsPlatformInit(void)
     int rc = utsPlatformModuleLoad("libcomposite", NULL, 0);
     if (RT_SUCCESS(rc))
     {
-        const char *apszArg[] = { "num=20" }; /** @todo: Make configurable from config. */
+        const char *apszArg[] = { "num=20" }; /** @todo Make configurable from config. */
         rc = utsPlatformModuleLoad("dummy_hcd", &apszArg[0], RT_ELEMENTS(apszArg));
         if (RT_SUCCESS(rc))
             rc = utsPlatformModuleLoad("dummy_hcd_ss", &apszArg[0], RT_ELEMENTS(apszArg));
@@ -329,7 +331,7 @@ DECLHIDDEN(int) utsPlatformModuleLoad(const char *pszModule, const char **papszA
             /* Evaluate the process status. */
             if (   ProcSts.enmReason != RTPROCEXITREASON_NORMAL
                 || ProcSts.iStatus != 0)
-                rc = VERR_UNRESOLVED_ERROR; /** @todo: Log and give finer grained status code. */
+                rc = VERR_UNRESOLVED_ERROR; /** @todo Log and give finer grained status code. */
         }
     }
 
@@ -357,7 +359,7 @@ DECLHIDDEN(int) utsPlatformModuleUnload(const char *pszModule)
             /* Evaluate the process status. */
             if (   ProcSts.enmReason != RTPROCEXITREASON_NORMAL
                 || ProcSts.iStatus != 0)
-                rc = VERR_UNRESOLVED_ERROR; /** @todo: Log and give finer grained status code. */
+                rc = VERR_UNRESOLVED_ERROR; /** @todo Log and give finer grained status code. */
         }
     }
 
diff --git a/src/VBox/ValidationKit/utils/usb/UsbTestServiceProtocol.cpp b/src/VBox/ValidationKit/utils/usb/UsbTestServiceProtocol.cpp
index dc77091..d74ecd8 100644
--- a/src/VBox/ValidationKit/utils/usb/UsbTestServiceProtocol.cpp
+++ b/src/VBox/ValidationKit/utils/usb/UsbTestServiceProtocol.cpp
@@ -98,17 +98,17 @@ DECLHIDDEN(void) utsProtocolReqH2N(PUTSPKTHDR pPktHdr)
 
 DECLHIDDEN(void) utsProtocolReqN2H(PUTSPKTHDR pPktHdr)
 {
-
+    RT_NOREF1(pPktHdr);
 }
 
 
 DECLHIDDEN(void) utsProtocolRepH2N(PUTSPKTSTS pPktHdr)
 {
-
+    RT_NOREF1(pPktHdr);
 }
 
 
 DECLHIDDEN(void) utsProtocolRepN2H(PUTSPKTSTS pPktHdr)
 {
-
+    RT_NOREF1(pPktHdr);
 }
diff --git a/src/VBox/ValidationKit/utils/usb/UsbTestServiceTcp.cpp b/src/VBox/ValidationKit/utils/usb/UsbTestServiceTcp.cpp
index 62d24a5..86a10d6 100644
--- a/src/VBox/ValidationKit/utils/usb/UsbTestServiceTcp.cpp
+++ b/src/VBox/ValidationKit/utils/usb/UsbTestServiceTcp.cpp
@@ -73,6 +73,7 @@ typedef struct UTSTRANSPORTCLIENT
     uint8_t             *pbTcpStashed;
 } UTSTRANSPORTCLIENT;
 
+
 /*********************************************************************************************************************************
 *   Global Variables                                                                                                             *
 *********************************************************************************************************************************/
@@ -86,8 +87,10 @@ static uint32_t             g_uTcpBindPort          = UTS_TCP_DEF_BIND_PORT;
 
 /** Pointer to the TCP server instance. */
 static PRTTCPSERVER         g_pTcpServer            = NULL;
+#if 0 /* unused */
 /** Stop connecting attempts when set. */
 static bool                 g_fTcpStopConnecting    = false;
+#endif
 
 
 
@@ -173,6 +176,7 @@ static DECLCALLBACK(void) utsTcpNotifyBye(PUTSTRANSPORTCLIENT pClient)
 static DECLCALLBACK(void) utsTcpNotifyHowdy(PUTSTRANSPORTCLIENT pClient)
 {
     /* nothing to do here */
+    RT_NOREF1(pClient);
 }
 
 /**
@@ -358,6 +362,7 @@ static DECLCALLBACK(int) utsTcpPollSetAdd(RTPOLLSET hPollSet, PUTSTRANSPORTCLIEN
  */
 static DECLCALLBACK(int) utsTcpPollSetRemove(RTPOLLSET hPollSet, PUTSTRANSPORTCLIENT pClient, uint32_t idStart)
 {
+    RT_NOREF1(pClient);
     return RTPollSetRemove(hPollSet, idStart);
 }
 
diff --git a/src/apps/Makefile.kmk b/src/apps/Makefile.kmk
index c1ca2ac..6aeadec 100644
--- a/src/apps/Makefile.kmk
+++ b/src/apps/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -28,11 +28,6 @@ ifeq ($(KBUILD_TARGET),linux)
   include $(PATH_SUB_CURRENT)/tunctl/Makefile.kmk
  endif
 endif
-if1of ($(KBUILD_TARGET),darwin solaris linux freebsd)
- ifneq ($(wildcard $(PATH_SUB_CURRENT)/adpctl),)
-  include $(PATH_SUB_CURRENT)/adpctl/Makefile.kmk
- endif
-endif
 
 include $(FILE_KBUILD_SUB_FOOTER)
 
diff --git a/src/apps/adpctl/Makefile.kmk b/src/apps/adpctl/Makefile.kmk
deleted file mode 100644
index cf95fff..0000000
--- a/src/apps/adpctl/Makefile.kmk
+++ /dev/null
@@ -1,29 +0,0 @@
-# $Id: Makefile.kmk $
-## @file
-# Sub-Makefile for VBoxAdpCtl
-#
-# VBoxAdpCtl is a tool for configuring vboxnetX adapters.
-#
-
-#
-# Copyright (C) 2009-2015 Oracle Corporation
-#
-# This file is part of VirtualBox Open Source Edition (OSE), as
-# available from http://www.virtualbox.org. This file is free software;
-# you can redistribute it and/or modify it under the terms of the GNU
-# General Public License (GPL) as published by the Free Software
-# Foundation, in version 2 as it comes in the "COPYING" file of the
-# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
-# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-#
-
-SUB_DEPTH = ../../..
-include $(KBUILD_PATH)/subheader.kmk
-
-PROGRAMS              += VBoxNetAdpCtl
-### Another template? We must *not* set RPATH!
-VBoxNetAdpCtl_TEMPLATE = VBOXR3HARDENEDEXE
-VBoxNetAdpCtl_SOURCES  = VBoxNetAdpCtl.cpp
-
-include $(FILE_KBUILD_SUB_FOOTER)
-
diff --git a/src/apps/adpctl/VBoxNetAdpCtl.cpp b/src/apps/adpctl/VBoxNetAdpCtl.cpp
deleted file mode 100644
index 7a51486..0000000
--- a/src/apps/adpctl/VBoxNetAdpCtl.cpp
+++ /dev/null
@@ -1,483 +0,0 @@
-/* $Id: VBoxNetAdpCtl.cpp $ */
-/** @file
- * Apps - VBoxAdpCtl, Configuration tool for vboxnetX adapters.
- */
-
-/*
- * Copyright (C) 2009-2012 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-
-
-/*********************************************************************************************************************************
-*   Header Files                                                                                                                 *
-*********************************************************************************************************************************/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/wait.h>
-#include <sys/ioctl.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#ifdef RT_OS_LINUX
-# include <net/if.h>
-# include <linux/types.h>
-/* Older versions of ethtool.h rely on these: */
-typedef unsigned long long u64;
-typedef __uint32_t u32;
-typedef __uint16_t u16;
-typedef __uint8_t u8;
-# include <limits.h> /* for INT_MAX */
-# include <linux/ethtool.h>
-# include <linux/sockios.h>
-#endif
-#ifdef RT_OS_SOLARIS
-# include <sys/ioccom.h>
-#endif
-
-/** @todo Error codes must be moved to some header file */
-#define ADPCTLERR_BAD_NAME         2
-#define ADPCTLERR_NO_CTL_DEV       3
-#define ADPCTLERR_IOCTL_FAILED     4
-#define ADPCTLERR_SOCKET_FAILED    5
-
-/** @todo These are duplicates from src/VBox/HostDrivers/VBoxNetAdp/VBoxNetAdpInternal.h */
-#define VBOXNETADP_CTL_DEV_NAME    "/dev/vboxnetctl"
-#define VBOXNETADP_MAX_INSTANCES   128
-#define VBOXNETADP_NAME            "vboxnet"
-#define VBOXNETADP_MAX_NAME_LEN    32
-#define VBOXNETADP_CTL_ADD   _IOWR('v', 1, VBOXNETADPREQ)
-#define VBOXNETADP_CTL_REMOVE _IOW('v', 2, VBOXNETADPREQ)
-typedef struct VBoxNetAdpReq
-{
-    char szName[VBOXNETADP_MAX_NAME_LEN];
-} VBOXNETADPREQ;
-typedef VBOXNETADPREQ *PVBOXNETADPREQ;
-
-#define VBOXADPCTL_IFCONFIG_PATH1 "/sbin/ifconfig"
-#define VBOXADPCTL_IFCONFIG_PATH2 "/bin/ifconfig"
-static char *g_pszIfConfig;
-
-#if defined(RT_OS_LINUX)
-# define VBOXADPCTL_DEL_CMD "del"
-# define VBOXADPCTL_ADD_CMD "add"
-#elif defined(RT_OS_SOLARIS)
-# define VBOXADPCTL_DEL_CMD "removeif"
-# define VBOXADPCTL_ADD_CMD "addif"
-#else
-# define VBOXADPCTL_DEL_CMD "delete"
-# define VBOXADPCTL_ADD_CMD "add"
-#endif
-
-static void showUsage(void)
-{
-    fprintf(stderr, "Usage: VBoxNetAdpCtl <adapter> <address> ([netmask <address>] | remove)\n");
-    fprintf(stderr, "     | VBoxNetAdpCtl [<adapter>] add\n");
-    fprintf(stderr, "     | VBoxNetAdpCtl <adapter> remove\n");
-}
-
-static void setPathIfConfig(void)
-{
-    struct stat s;
-    if (   !stat(VBOXADPCTL_IFCONFIG_PATH1, &s)
-        && S_ISREG(s.st_mode))
-        g_pszIfConfig = (char*)VBOXADPCTL_IFCONFIG_PATH1;
-    else
-        g_pszIfConfig = (char*)VBOXADPCTL_IFCONFIG_PATH2;
-}
-
-static int executeIfconfig(const char *pcszAdapterName, const char *pcszArg1,
-                           const char *pcszArg2 = NULL,
-                           const char *pcszArg3 = NULL,
-                           const char *pcszArg4 = NULL,
-                           const char *pcszArg5 = NULL)
-{
-    const char * const argv[] =
-    {
-        g_pszIfConfig,
-        pcszAdapterName,
-        pcszArg1, /* [address family] */
-        pcszArg2, /* address */
-        pcszArg3, /* ['netmask'] */
-        pcszArg4, /* [network mask] */
-        pcszArg5, /* [network mask] */
-        NULL  /* terminator */
-    };
-    char * const envp[] = { (char*)"LC_ALL=C", NULL };
-    int rc = EXIT_SUCCESS;
-    pid_t childPid = fork();
-    switch (childPid)
-    {
-        case -1: /* Something went wrong. */
-            perror("fork() failed");
-            rc = EXIT_FAILURE;
-            break;
-        case 0: /* Child process. */
-            if (execve(argv[0], (char * const*)argv, envp) == -1)
-                rc = EXIT_FAILURE;
-            break;
-        default: /* Parent process. */
-            waitpid(childPid, &rc, 0);
-            break;
-    }
-
-    return rc;
-}
-
-#define MAX_ADDRESSES 128
-#define MAX_ADDRLEN   64
-
-static bool removeAddresses(char *pszAdapterName)
-{
-    char szBuf[1024];
-    char aszAddresses[MAX_ADDRESSES][MAX_ADDRLEN];
-    int rc;
-    int fds[2];
-    char * const argv[] = { g_pszIfConfig, pszAdapterName, NULL };
-    char * const envp[] = { (char*)"LC_ALL=C", NULL };
-
-    memset(aszAddresses, 0, sizeof(aszAddresses));
-
-    rc = pipe(fds);
-    if (rc < 0)
-        return false;
-
-    pid_t pid = fork();
-    if (pid < 0)
-        return false;
-
-    if (pid == 0)
-    {
-        /* child */
-        close(fds[0]);
-        close(STDOUT_FILENO);
-        rc = dup2(fds[1], STDOUT_FILENO);
-        if (rc >= 0)
-            execve(argv[0], argv, envp);
-        return false;
-    }
-
-    /* parent */
-    close(fds[1]);
-    FILE *fp = fdopen(fds[0], "r");
-    if (!fp)
-        return false;
-
-    int cAddrs;
-    for (cAddrs = 0; cAddrs < MAX_ADDRESSES && fgets(szBuf, sizeof(szBuf), fp);)
-    {
-        int cbSkipWS = strspn(szBuf, " \t");
-        char *pszWord = strtok(szBuf + cbSkipWS, " ");
-        /* We are concerned with IPv6 address lines only. */
-        if (!pszWord || strcmp(pszWord, "inet6"))
-            continue;
-#ifdef RT_OS_LINUX
-        pszWord = strtok(NULL, " ");
-        /* Skip "addr:". */
-        if (!pszWord || strcmp(pszWord, "addr:"))
-            continue;
-#endif
-        pszWord = strtok(NULL, " ");
-        /* Skip link-local addresses. */
-        if (!pszWord || !strncmp(pszWord, "fe80", 4))
-            continue;
-        strncpy(aszAddresses[cAddrs++], pszWord, MAX_ADDRLEN-1);
-    }
-    fclose(fp);
-
-    for (int i = 0; i < cAddrs; i++)
-    {
-        if (executeIfconfig(pszAdapterName, "inet6",
-                            VBOXADPCTL_DEL_CMD, aszAddresses[i]) != EXIT_SUCCESS)
-            return false;
-    }
-
-    return true;
-}
-
-static int doIOCtl(unsigned long uCmd, VBOXNETADPREQ *pReq)
-{
-    int fd = open(VBOXNETADP_CTL_DEV_NAME, O_RDWR);
-    if (fd == -1)
-    {
-        fprintf(stderr, "VBoxNetAdpCtl: Error while %s %s: ",
-                uCmd == VBOXNETADP_CTL_REMOVE ? "removing" : "adding",
-                pReq->szName[0] ? pReq->szName : "new interface");
-        perror("failed to open " VBOXNETADP_CTL_DEV_NAME);
-        return ADPCTLERR_NO_CTL_DEV;
-    }
-
-    int rc = ioctl(fd, uCmd, pReq);
-    if (rc == -1)
-    {
-        fprintf(stderr, "VBoxNetAdpCtl: Error while %s %s: ",
-                uCmd == VBOXNETADP_CTL_REMOVE ? "removing" : "adding",
-                pReq->szName[0] ? pReq->szName : "new interface");
-        perror("VBoxNetAdpCtl: ioctl failed for " VBOXNETADP_CTL_DEV_NAME);
-        rc = ADPCTLERR_IOCTL_FAILED;
-    }
-
-    close(fd);
-
-    return rc;
-}
-
-static int checkAdapterName(const char *pcszNameIn, char *pszNameOut)
-{
-    int iAdapterIndex = -1;
-
-    if (   strlen(pcszNameIn) >= VBOXNETADP_MAX_NAME_LEN
-        || sscanf(pcszNameIn, "vboxnet%d", &iAdapterIndex) != 1
-        || iAdapterIndex < 0 || iAdapterIndex >= VBOXNETADP_MAX_INSTANCES )
-    {
-        fprintf(stderr, "VBoxNetAdpCtl: Setting configuration for '%s' is not supported.\n", pcszNameIn);
-        return ADPCTLERR_BAD_NAME;
-    }
-    sprintf(pszNameOut, "vboxnet%d", iAdapterIndex);
-    if (strcmp(pszNameOut, pcszNameIn))
-    {
-        fprintf(stderr, "VBoxNetAdpCtl: Invalid adapter name '%s'.\n", pcszNameIn);
-        return ADPCTLERR_BAD_NAME;
-    }
-
-    return 0;
-}
-
-int main(int argc, char *argv[])
-{
-    char szAdapterName[VBOXNETADP_MAX_NAME_LEN];
-    char *pszAdapterName = NULL;
-    const char *pszAddress = NULL;
-    const char *pszNetworkMask = NULL;
-    const char *pszOption = NULL;
-    int rc = EXIT_SUCCESS;
-    bool fRemove = false;
-    VBOXNETADPREQ Req;
-
-    setPathIfConfig();
-
-    switch (argc)
-    {
-        case 5:
-        {
-            /* Add a netmask to existing interface */
-            if (strcmp("netmask", argv[3]))
-            {
-                fprintf(stderr, "Invalid argument: %s\n\n", argv[3]);
-                showUsage();
-                return 1;
-            }
-            pszOption = "netmask";
-            pszNetworkMask = argv[4];
-            pszAdapterName = argv[1];
-            pszAddress = argv[2];
-            break;
-        }
-
-        case 4:
-        {
-            /* Remove a single address from existing interface */
-            if (strcmp("remove", argv[3]))
-            {
-                fprintf(stderr, "Invalid argument: %s\n\n", argv[3]);
-                showUsage();
-                return 1;
-            }
-            fRemove = true;
-            pszAdapterName = argv[1];
-            pszAddress = argv[2];
-            break;
-        }
-
-        case 3:
-        {
-            pszAdapterName = argv[1];
-            memset(&Req, '\0', sizeof(Req));
-#ifdef RT_OS_LINUX
-            if (strcmp("speed", argv[2]) == 0)
-            {
-                /*
-                 * This ugly hack is needed for retrieving the link speed on
-                 * pre-2.6.33 kernels (see @bugref{6345}).
-                 */
-                if (strlen(pszAdapterName) >= IFNAMSIZ)
-                {
-                    showUsage();
-                    return -1;
-                }
-                struct ifreq IfReq;
-                struct ethtool_value EthToolVal;
-                struct ethtool_cmd EthToolReq;
-                int fd = socket(AF_INET, SOCK_DGRAM, 0);
-                if (fd < 0)
-                {
-                    fprintf(stderr, "VBoxNetAdpCtl: Error while retrieving link "
-                            "speed for %s: ", pszAdapterName);
-                    perror("VBoxNetAdpCtl: failed to open control socket");
-                    return ADPCTLERR_SOCKET_FAILED;
-                }
-                /* Get link status first. */
-                memset(&EthToolVal, 0, sizeof(EthToolVal));
-                memset(&IfReq, 0, sizeof(IfReq));
-                snprintf(IfReq.ifr_name, sizeof(IfReq.ifr_name), "%s", pszAdapterName);
-
-                EthToolVal.cmd = ETHTOOL_GLINK;
-                IfReq.ifr_data = (caddr_t)&EthToolVal;
-                rc = ioctl(fd, SIOCETHTOOL, &IfReq);
-                if (rc == 0)
-                {
-                    if (EthToolVal.data)
-                    {
-                        memset(&IfReq, 0, sizeof(IfReq));
-                        snprintf(IfReq.ifr_name, sizeof(IfReq.ifr_name), "%s", pszAdapterName);
-                        EthToolReq.cmd = ETHTOOL_GSET;
-                        IfReq.ifr_data = (caddr_t)&EthToolReq;
-                        rc = ioctl(fd, SIOCETHTOOL, &IfReq);
-                        if (rc == 0)
-                        {
-                            printf("%u", EthToolReq.speed);
-                        }
-                        else
-                        {
-                            fprintf(stderr, "VBoxNetAdpCtl: Error while retrieving link "
-                                    "speed for %s: ", pszAdapterName);
-                            perror("VBoxNetAdpCtl: ioctl failed");
-                            rc = ADPCTLERR_IOCTL_FAILED;
-                        }
-                    }
-                    else
-                        printf("0");
-                }
-                else
-                {
-                    fprintf(stderr, "VBoxNetAdpCtl: Error while retrieving link "
-                            "status for %s: ", pszAdapterName);
-                    perror("VBoxNetAdpCtl: ioctl failed");
-                    rc = ADPCTLERR_IOCTL_FAILED;
-                }
-
-                close(fd);
-                return rc;
-            }
-#endif
-            rc = checkAdapterName(pszAdapterName, szAdapterName);
-            if (rc)
-                return rc;
-            snprintf(Req.szName, sizeof(Req.szName), "%s", szAdapterName);
-            pszAddress = argv[2];
-            if (strcmp("remove", pszAddress) == 0)
-            {
-                /* Remove an existing interface */
-#ifdef RT_OS_SOLARIS
-                return 1;
-#else
-                return doIOCtl(VBOXNETADP_CTL_REMOVE, &Req);
-#endif
-            }
-            else if (strcmp("add", pszAddress) == 0)
-            {
-                /* Create an interface with given name */
-#ifdef RT_OS_SOLARIS
-                return 1;
-#else
-                rc = doIOCtl(VBOXNETADP_CTL_ADD, &Req);
-                if (rc == 0)
-                    puts(Req.szName);
-#endif
-                return rc;
-            }
-            break;
-        }
-
-        case 2:
-        {
-            /* Create a new interface */
-            if (strcmp("add", argv[1]) == 0)
-            {
-#ifdef RT_OS_SOLARIS
-                return 1;
-#else
-                memset(&Req, '\0', sizeof(Req));
-                rc = doIOCtl(VBOXNETADP_CTL_ADD, &Req);
-                if (rc == 0)
-                    puts(Req.szName);
-#endif
-                return rc;
-            }
-            /* Fall through */
-        }
-
-        default:
-            fprintf(stderr, "Invalid number of arguments.\n\n");
-            /* Fall through */
-        case 1:
-            showUsage();
-            return 1;
-    }
-
-    rc = checkAdapterName(pszAdapterName, szAdapterName);
-    if (rc)
-        return rc;
-
-    pszAdapterName = szAdapterName;
-
-    if (fRemove)
-    {
-        if (strchr(pszAddress, ':'))
-            rc = executeIfconfig(pszAdapterName, "inet6", VBOXADPCTL_DEL_CMD, pszAddress);
-        else
-        {
-#if defined(RT_OS_LINUX)
-            rc = executeIfconfig(pszAdapterName, "0.0.0.0");
-#else
-            rc = executeIfconfig(pszAdapterName, VBOXADPCTL_DEL_CMD, pszAddress);
-#endif
-
-#ifdef RT_OS_SOLARIS
-            /* On Solaris we can unplumb the ipv4 interface */
-            executeIfconfig(pszAdapterName, "inet", "unplumb");
-#endif
-        }
-    }
-    else
-    {
-        /* We are setting/replacing address. */
-        if (strchr(pszAddress, ':'))
-        {
-#ifdef RT_OS_SOLARIS
-            /* On Solaris we need to plumb the interface first if it's not already plumbed. */
-            if (executeIfconfig(pszAdapterName, "inet6") != 0)
-                executeIfconfig(pszAdapterName, "inet6", "plumb", "up");
-#endif
-            /*
-             * Before we set IPv6 address we'd like to remove
-             * all previously assigned addresses except the
-             * self-assigned one.
-             */
-            if (!removeAddresses(pszAdapterName))
-                rc = EXIT_FAILURE;
-            else
-                rc = executeIfconfig(pszAdapterName, "inet6", VBOXADPCTL_ADD_CMD, pszAddress, pszOption, pszNetworkMask);
-        }
-        else
-        {
-#ifdef RT_OS_SOLARIS
-            /* On Solaris we need to plumb the interface first if it's not already plumbed. */
-            if (executeIfconfig(pszAdapterName, "inet") != 0)
-                executeIfconfig(pszAdapterName, "plumb", "up");
-#endif
-            rc = executeIfconfig(pszAdapterName, pszAddress, pszOption, pszNetworkMask);
-        }
-    }
-    return rc;
-}
-
diff --git a/src/apps/svnsync-vbox/Makefile.kmk b/src/apps/svnsync-vbox/Makefile.kmk
index 00d6d6d..92e5ed5 100644
--- a/src/apps/svnsync-vbox/Makefile.kmk
+++ b/src/apps/svnsync-vbox/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/apps/svnsync-vbox/main.c b/src/apps/svnsync-vbox/main.c
index 62841d5..91d0898 100644
--- a/src/apps/svnsync-vbox/main.c
+++ b/src/apps/svnsync-vbox/main.c
@@ -1107,7 +1107,7 @@ do_initialize(svn_ra_session_t *to_session, void *b, apr_pool_t *pool)
   SVN_ERR(copy_revprops(from_session, to_session, 0, FALSE, pool));
 #endif /* !VBOX */
 
-  /* TODO: It would be nice if we could set the dest repos UUID to be
+  /** @todo It would be nice if we could set the dest repos UUID to be
      equal to the UUID of the source repos, at least optionally.  That
      way people could check out/log/diff using a local fast mirror,
      but switch --relocate to the actual final repository in order to
@@ -1793,7 +1793,7 @@ open_directory(const char *path,
         /* Suppress change_dir_prop for this directory. Done already. */
         db->ignore_everything = TRUE;
 
-        /* TODO: copy over files in this directory which were already exported
+        /** @todo copy over files in this directory which were already exported
          * due to inconsistent export settings (e.g. directory is not exported,
          * but file in it is exported). */
       }
@@ -2576,7 +2576,7 @@ do_synchronize(svn_ra_session_t *to_session, void *b, apr_pool_t *pool)
           if (copying > last_merged)
             {
 #ifdef VBOX
-/* TODO fix use of from/to revision numbers. */
+/** @todo fix use of from/to revision numbers. */
               SVN_ERR(copy_revprops(from_session, to_session,
                                     to_latest, to_latest, TRUE, pool));
 #else /* !VBOX */
diff --git a/src/apps/tunctl/Makefile.kmk b/src/apps/tunctl/Makefile.kmk
index 3820efe..9f47a0c 100644
--- a/src/apps/tunctl/Makefile.kmk
+++ b/src/apps/tunctl/Makefile.kmk
@@ -6,7 +6,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/bldprogs/Makefile.kmk b/src/bldprogs/Makefile.kmk
index ac7991f..9d422a7 100644
--- a/src/bldprogs/Makefile.kmk
+++ b/src/bldprogs/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/bldprogs/VBoxCPP.cpp b/src/bldprogs/VBoxCPP.cpp
index ace74ed..84a10e7 100644
--- a/src/bldprogs/VBoxCPP.cpp
+++ b/src/bldprogs/VBoxCPP.cpp
@@ -13,7 +13,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1061,6 +1061,8 @@ static RTEXITCODE vbcppOutputWrite(PVBCPP pThis, const char *pch, size_t cch)
 static RTEXITCODE vbcppOutputComment(PVBCPP pThis, PSCMSTREAM pStrmInput, size_t offStart, size_t cchOutputted,
                                      size_t cchMinIndent)
 {
+    RT_NOREF_PV(cchMinIndent); /** @todo  cchMinIndent */
+
     size_t offCur = ScmStreamTell(pStrmInput);
     if (offStart < offCur)
     {
@@ -1112,6 +1114,7 @@ static RTEXITCODE vbcppOutputComment(PVBCPP pThis, PSCMSTREAM pStrmInput, size_t
  */
 
 
+#if 0 /* unused */
 /**
  * Skips white spaces, including escaped new-lines.
  *
@@ -1140,6 +1143,7 @@ static void vbcppProcessSkipWhiteAndEscapedEol(PSCMSTREAM pStrmInput)
             break;
     }
 }
+#endif
 
 
 /**
@@ -1262,7 +1266,7 @@ static size_t vbcppProcessSkipWhite(PSCMSTREAM pStrmInput)
 static bool vbcppInputLookForLeftParenthesis(PVBCPP pThis, PSCMSTREAM pStrmInput)
 {
     size_t offSaved = ScmStreamTell(pStrmInput);
-    RTEXITCODE rcExit = vbcppProcessSkipWhiteEscapedEolAndComments(pThis, pStrmInput);
+    /*RTEXITCODE rcExit =*/ vbcppProcessSkipWhiteEscapedEolAndComments(pThis, pStrmInput);
     unsigned ch = ScmStreamPeekCh(pStrmInput);
     if (ch == '(')
         return true;
@@ -1546,9 +1550,8 @@ static RTEXITCODE vbcppProcessNumber(PVBCPP pThis, PSCMSTREAM pStrmInput, char c
  * @returns RTEXITCODE_SUCCESS or RTEXITCODE_FAILURE+msg.
  * @param   pThis               The C preprocessor instance.
  * @param   pStrmInput          The input stream.
- * @param   ch                  The first character.
  */
-static RTEXITCODE vbcppProcessIdentifier(PVBCPP pThis, PSCMSTREAM pStrmInput, char ch)
+static RTEXITCODE vbcppProcessIdentifier(PVBCPP pThis, PSCMSTREAM pStrmInput)
 {
     RTEXITCODE  rcExit;
     size_t      cchDefine;
@@ -1691,6 +1694,8 @@ static uint32_t vbcppMacroLookupArg(PVBCPPMACRO pMacro, const char *pchName, siz
 static RTEXITCODE vbcppMacroExpandReplace(PVBCPP pThis, PVBCPPMACROEXP pExp, size_t off, size_t cchToReplace,
                                           const char *pchReplacement, size_t cchReplacement)
 {
+    RT_NOREF_PV(pThis);
+
     /*
      * Figure how much space we actually need.
      * (Hope this whitespace stuff is correct...)
@@ -2291,7 +2296,7 @@ static bool vbcppMacroExpandLookForLeftParenthesis(PVBCPP pThis, PVBCPPMACROEXP
      */
     PSCMSTREAM pStrmInput = pExp->pStrmInput;
     size_t     offSaved   = ScmStreamTell(pStrmInput);
-    RTEXITCODE rcExit     = vbcppProcessSkipWhiteEscapedEolAndComments(pThis, pStrmInput);
+    /*RTEXITCODE rcExit = */ vbcppProcessSkipWhiteEscapedEolAndComments(pThis, pStrmInput);
     unsigned ch = ScmStreamPeekCh(pStrmInput);
     if (ch == '(')
     {
@@ -2439,6 +2444,7 @@ static RTEXITCODE vbcppMacroExpandReScan(PVBCPP pThis, PVBCPPMACROEXP pExp, VBCP
                 && (   !pMacro->fFunction
                     || vbcppMacroExpandLookForLeftParenthesis(pThis, pExp, &off)) )
             {
+                cReplacements++;
                 rcExit = vbcppMacroExpandIt(pThis, pExp, offDefine, pMacro, off);
                 off = offDefine;
             }
@@ -2448,7 +2454,10 @@ static RTEXITCODE vbcppMacroExpandReScan(PVBCPP pThis, PVBCPPMACROEXP pExp, VBCP
                          && enmMode == kMacroReScanMode_Expression
                          && cchDefine == sizeof("defined") - 1
                          && !strncmp(&pExp->StrBuf.pszBuf[offDefine], "defined", cchDefine))
+                {
+                    cReplacements++;
                     rcExit = vbcppMacroExpandDefinedOperator(pThis, pExp, offDefine, &off);
+                }
                 else
                     off = offDefine + cchDefine;
             }
@@ -2460,6 +2469,8 @@ static RTEXITCODE vbcppMacroExpandReScan(PVBCPP pThis, PVBCPPMACROEXP pExp, VBCP
         }
     }
 
+    if (pcReplacements)
+        *pcReplacements = cReplacements;
     return rcExit;
 }
 
@@ -2605,7 +2616,7 @@ static RTEXITCODE vbcppMacroInsert(PVBCPP pThis, PVBCPPMACRO pMacro)
             vbcppMacroFree(&pOld->Core, NULL);
 
             bool fRc = RTStrSpaceInsert(&pThis->StrSpace, &pMacro->Core);
-            Assert(fRc);
+            Assert(fRc); NOREF(fRc);
         }
         else
         {
@@ -2971,6 +2982,8 @@ static RTEXITCODE vbcppMacroTryConvertToInlineD(PVBCPP pThis, PVBCPPMACRO pMacro
  */
 static RTEXITCODE vbcppDirectiveDefine(PVBCPP pThis, PSCMSTREAM pStrmInput, size_t offStart)
 {
+    RT_NOREF_PV(offStart);
+
     /*
      * Parse it.
      */
@@ -3085,6 +3098,8 @@ static RTEXITCODE vbcppDirectiveDefine(PVBCPP pThis, PSCMSTREAM pStrmInput, size
  */
 static RTEXITCODE vbcppDirectiveUndef(PVBCPP pThis, PSCMSTREAM pStrmInput, size_t offStart)
 {
+    RT_NOREF_PV(offStart);
+
     /*
      * Parse it.
      */
@@ -3185,6 +3200,9 @@ static RTEXITCODE vbcppCondPush(PVBCPP pThis, PSCMSTREAM pStrmInput, size_t offS
                                 VBCPPCONDKIND enmKind, VBCPPEVAL enmResult,
                                 const char *pchCondition, size_t cchCondition)
 {
+    RT_NOREF_PV(offStart); RT_NOREF_PV(pStrmInput);
+
+
     if (pThis->cCondStackDepth >= _64K)
         return vbcppError(pThis, "Too many nested #if/#ifdef/#ifndef statements");
 
@@ -3453,7 +3471,7 @@ static VBCPPEXPRRET vbcppExprParseBinaryOperator(PVBCPPEXPRPARSER pParser)
             }
             break;
         case '>':
-            enmOp = kVBCppBinary_GreaterThan; break;
+            enmOp = kVBCppBinary_GreaterThan;
             if (pParser->pszCur[1] == '=')
             {
                 pParser->pszCur++;
@@ -3778,7 +3796,8 @@ static VBCPPEXPRRET vbcppExprParseNumber(PVBCPPEXPRPARSER pParser)
  */
 static VBCPPEXPRRET vbcppExprParseCharacterConstant(PVBCPPEXPRPARSER pParser)
 {
-    char ch  = *pParser->pszCur++;
+    Assert(*pParser->pszCur == '\'');
+    pParser->pszCur++;
     char ch2 = *pParser->pszCur++;
     if (ch2 == '\'')
         return vbcppExprParseError(pParser, "Empty character constant");
@@ -4240,6 +4259,8 @@ static RTEXITCODE vbcppExprEvaluteTree(PVBCPP pThis, PVBCPPEXPR pRoot, PVBCPPEXP
 static RTEXITCODE vbcppExprEval(PVBCPP pThis, char *pszExpr, size_t cchExpr, size_t cReplacements, VBCPPEVAL *penmResult)
 {
     Assert(strlen(pszExpr) == cchExpr);
+    RT_NOREF_PV(cReplacements);
+
     size_t      cUndefined;
     PVBCPPEXPR  pExprTree;
     RTEXITCODE  rcExit = vbcppExprParse(pThis, pszExpr, cchExpr, &pExprTree, &cUndefined);
@@ -4268,6 +4289,8 @@ static RTEXITCODE vbcppExprEval(PVBCPP pThis, char *pszExpr, size_t cchExpr, siz
 
 static RTEXITCODE vbcppExtractSkipCommentLine(PVBCPP pThis, PSCMSTREAM pStrmInput)
 {
+    RT_NOREF_PV(pThis);
+
     unsigned chPrev = ScmStreamGetCh(pStrmInput); Assert(chPrev == '/');
     unsigned ch;
     while ((ch = ScmStreamPeekCh(pStrmInput)) != ~(unsigned)0)
@@ -4368,7 +4391,7 @@ static RTEXITCODE vbcppExtractDirectiveLine(PVBCPP pThis, PSCMSTREAM pStrmInput,
         if (ch == '/')
         {
             /* Comment? */
-            unsigned ch2 = ScmStreamGetCh(pStrmInput); Assert(ch == ch2);
+            unsigned ch2 = ScmStreamGetCh(pStrmInput); Assert(ch == ch2); NOREF(ch2);
             ch = ScmStreamPeekCh(pStrmInput);
             if (ch == '*')
             {
@@ -4400,7 +4423,7 @@ static RTEXITCODE vbcppExtractDirectiveLine(PVBCPP pThis, PSCMSTREAM pStrmInput,
                      || vbcppStrBufLastCh(pStrBuf) == '\0') )
         {
             unsigned ch2 = ScmStreamGetCh(pStrmInput);
-            Assert(ch == ch2);
+            Assert(ch == ch2); NOREF(ch2);
             rcExit = RTEXITCODE_SUCCESS;
         }
         else
@@ -4814,6 +4837,8 @@ static RTEXITCODE vbcppAddInclude(PVBCPP pThis, const char *pszDir)
  */
 static RTEXITCODE vbcppDirectiveInclude(PVBCPP pThis, PSCMSTREAM pStrmInput, size_t offStart)
 {
+    RT_NOREF_PV(offStart);
+
     /*
      * Parse it.
      */
@@ -4832,7 +4857,6 @@ static RTEXITCODE vbcppDirectiveInclude(PVBCPP pThis, PSCMSTREAM pStrmInput, siz
             ScmStreamGetCh(pStrmInput);
             pchFileSpec = pchFilename = ScmStreamGetCur(pStrmInput);
             unsigned chEnd  = chType == '<' ? '>' : '"';
-            unsigned chPrev = ch;
             while (   (ch = ScmStreamGetCh(pStrmInput)) != ~(unsigned)0
                    &&  ch != chEnd)
             {
@@ -4921,6 +4945,8 @@ static RTEXITCODE vbcppDirectiveInclude(PVBCPP pThis, PSCMSTREAM pStrmInput, siz
  */
 static RTEXITCODE vbcppDirectivePragma(PVBCPP pThis, PSCMSTREAM pStrmInput, size_t offStart)
 {
+    RT_NOREF_PV(offStart);
+
     /*
      * Parse out the first word.
      */
@@ -4981,6 +5007,8 @@ static RTEXITCODE vbcppDirectivePragma(PVBCPP pThis, PSCMSTREAM pStrmInput, size
  */
 static RTEXITCODE vbcppDirectiveError(PVBCPP pThis, PSCMSTREAM pStrmInput, size_t offStart)
 {
+    RT_NOREF_PV(offStart);
+    RT_NOREF_PV(pStrmInput);
     return vbcppError(pThis, "Hit an #error");
 }
 
@@ -4996,6 +5024,8 @@ static RTEXITCODE vbcppDirectiveError(PVBCPP pThis, PSCMSTREAM pStrmInput, size_
  */
 static RTEXITCODE vbcppDirectiveLineNo(PVBCPP pThis, PSCMSTREAM pStrmInput, size_t offStart)
 {
+    RT_NOREF_PV(offStart);
+    RT_NOREF_PV(pStrmInput);
     return vbcppError(pThis, "Not implemented: %s", __FUNCTION__);
 }
 
@@ -5009,6 +5039,7 @@ static RTEXITCODE vbcppDirectiveLineNo(PVBCPP pThis, PSCMSTREAM pStrmInput, size
  */
 static RTEXITCODE vbcppDirectiveLineNoShort(PVBCPP pThis, PSCMSTREAM pStrmInput)
 {
+    RT_NOREF_PV(pStrmInput);
     return vbcppError(pThis, "Not implemented: %s", __FUNCTION__);
 }
 
@@ -5156,7 +5187,7 @@ static RTEXITCODE vbcppPreprocess(PVBCPP pThis)
                     else if (ch == '\'')
                         rcExit = vbcppProcessCharacterConstant(pThis, pStrmInput);
                     else if (vbcppIsCIdentifierLeadChar(ch))
-                        rcExit = vbcppProcessIdentifier(pThis, pStrmInput, ch);
+                        rcExit = vbcppProcessIdentifier(pThis, pStrmInput);
                     else if (RT_C_IS_DIGIT(ch))
                         rcExit = vbcppProcessNumber(pThis, pStrmInput, ch);
                     else
@@ -5359,7 +5390,7 @@ static RTEXITCODE vbcppParseOptions(PVBCPP pThis, int argc, char **argv, bool *p
             case 'V':
             {
                 /* The following is assuming that svn does it's job here. */
-                static const char s_szRev[] = "$Revision: 108452 $";
+                static const char s_szRev[] = "$Revision: 109163 $";
                 const char *psz = RTStrStripL(strchr(s_szRev, ' '));
                 RTPrintf("r%.*s\n", strchr(psz, ' ') - psz, psz);
                 *pfExit = true;
diff --git a/src/bldprogs/VBoxCheckImports.cpp b/src/bldprogs/VBoxCheckImports.cpp
index 744fd98..9cf1621 100644
--- a/src/bldprogs/VBoxCheckImports.cpp
+++ b/src/bldprogs/VBoxCheckImports.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -326,7 +326,7 @@ int main(int argc, char **argv)
             else if (   !strcmp(psz, "--version")
                      || !strcmp(psz, "-V"))
             {
-                printf("$Revision: 106031 $\n");
+                printf("$Revision: 109096 $\n");
                 return RTEXITCODE_SUCCESS;
             }
             else
@@ -368,4 +368,3 @@ int main(int argc, char **argv)
     return rcExit;
 }
 
-
diff --git a/src/bldprogs/VBoxCmp.cpp b/src/bldprogs/VBoxCmp.cpp
index 30d69f3..485cf05 100644
--- a/src/bldprogs/VBoxCmp.cpp
+++ b/src/bldprogs/VBoxCmp.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/bldprogs/VBoxCompilerPlugIns.h b/src/bldprogs/VBoxCompilerPlugIns.h
index 7f2d264..a4f7dda 100644
--- a/src/bldprogs/VBoxCompilerPlugIns.h
+++ b/src/bldprogs/VBoxCompilerPlugIns.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/bldprogs/VBoxCompilerPlugInsCommon.cpp b/src/bldprogs/VBoxCompilerPlugInsCommon.cpp
index 40e6aa8..8124fc5 100644
--- a/src/bldprogs/VBoxCompilerPlugInsCommon.cpp
+++ b/src/bldprogs/VBoxCompilerPlugInsCommon.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/bldprogs/VBoxCompilerPlugInsGcc.cpp b/src/bldprogs/VBoxCompilerPlugInsGcc.cpp
index 122e02e..65d57f3 100644
--- a/src/bldprogs/VBoxCompilerPlugInsGcc.cpp
+++ b/src/bldprogs/VBoxCompilerPlugInsGcc.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/bldprogs/VBoxDef2LazyLoad.cpp b/src/bldprogs/VBoxDef2LazyLoad.cpp
index 9158724..403cac6 100644
--- a/src/bldprogs/VBoxDef2LazyLoad.cpp
+++ b/src/bldprogs/VBoxDef2LazyLoad.cpp
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2013-2015 Oracle Corporation
+ * Copyright (C) 2013-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -67,12 +67,14 @@ static PMYEXPORT   *g_ppExpNext = &g_pExpHead;
 
 
 
+#if 0 /* unused */
 static const char *leftStrip(const char *psz)
 {
     while (isspace(*psz))
         psz++;
     return psz;
 }
+#endif
 
 
 static char *leftStrip(char *psz)
@@ -998,7 +1000,7 @@ static int usage(const char *pszArgv0)
            "  --explicit-load-function, --no-explicit-load-function\n"
            "    Whether to include the explicit load function, default is not to.\n"
            "\n"
-           "Copyright (C) 2013-2015 Oracle Corporation\n"
+           "Copyright (C) 2013-2016 Oracle Corporation\n"
            , pszArgv0);
 
     return RTEXITCODE_SUCCESS;
@@ -1049,7 +1051,7 @@ int main(int argc, char **argv)
             else if (   !strcmp(psz, "--version")
                      || !strcmp(psz, "-V"))
             {
-                printf("$Revision: 105110 $\n");
+                printf("$Revision: 109812 $\n");
                 return RTEXITCODE_SUCCESS;
             }
             else
diff --git a/src/bldprogs/VBoxPeSetVersion.cpp b/src/bldprogs/VBoxPeSetVersion.cpp
index 2b59fcc..0929c39 100644
--- a/src/bldprogs/VBoxPeSetVersion.cpp
+++ b/src/bldprogs/VBoxPeSetVersion.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/bldprogs/VBoxTpG.cpp b/src/bldprogs/VBoxTpG.cpp
index 471ddd2..a432b33 100644
--- a/src/bldprogs/VBoxTpG.cpp
+++ b/src/bldprogs/VBoxTpG.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -1020,8 +1020,6 @@ static RTEXITCODE generateHeader(PSCMSTREAM pStrm)
 
         RTListForEach(&pProv->ProbeHead, pProbe, VTGPROBE, ListEntry)
         {
-            PVTGARG const pFirstArg = RTListGetFirst(&pProbe->ArgHead, VTGARG, ListEntry);
-
             ScmStreamPrintf(pStrm,
                             "extern uint32_t const volatile g_cVTGProbeEnabled_%s_%s;\n"
                             "extern VTGDESCPROBE            g_VTGProbeData_%s_%s;\n"
@@ -1201,8 +1199,6 @@ static RTEXITCODE generateWrapperHeader(PSCMSTREAM pStrm)
     {
         RTListForEach(&pProv->ProbeHead, pProbe, VTGPROBE, ListEntry)
         {
-            PVTGARG const pFirstArg = RTListGetFirst(&pProbe->ArgHead, VTGARG, ListEntry);
-
             generateProbeDefineName(szTmp, sizeof(szTmp), pProv->pszName, pProbe->pszMangledName);
             ScmStreamPrintf(pStrm,
                             "# define %s("
@@ -2378,7 +2374,7 @@ static RTEXITCODE parseArguments(int argc,  char **argv)
             case 'V':
             {
                 /* The following is assuming that svn does it's job here. */
-                static const char s_szRev[] = "$Revision: 104525 $";
+                static const char s_szRev[] = "$Revision: 109096 $";
                 const char *psz = RTStrStripL(strchr(s_szRev, ' '));
                 RTPrintf("r%.*s\n", strchr(psz, ' ') - psz, psz);
                 return RTEXITCODE_SUCCESS;
diff --git a/src/bldprogs/bin2c.c b/src/bldprogs/bin2c.c
index 1038302..d55e3e8 100644
--- a/src/bldprogs/bin2c.c
+++ b/src/bldprogs/bin2c.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -52,15 +52,18 @@ static int usage(const char *argv0)
 {
     fprintf(stderr,
             "Syntax: %s [options] <arrayname> <binaryfile> <outname>\n"
-            "  -min <n>     check if <binaryfile> is not smaller than <n>KB\n"
-            "  -max <n>     check if <binaryfile> is not bigger than <n>KB\n"
-            "  -mask <n>    check if size of binaryfile is <n>-aligned\n"
-            "  -width <n>   number of bytes per line (default: 16)\n"
-            "  -break <n>   break every <n> lines    (default: -1)\n"
-            "  -ascii       show ASCII representation of binary as comment\n"
-            "  -export      emit DECLEXPORT\n"
-            "  --append     append to the output file (default: truncate)\n"
+            "  --min <n>    check if <binaryfile> is not smaller than <n>KB\n"
+            "  --max <n>    check if <binaryfile> is not bigger than <n>KB\n"
+            "  --mask <n>   check if size of binaryfile is <n>-aligned\n"
+            "  --width <n>  number of bytes per line (default: 16)\n"
+            "  --break <n>  break every <n> lines    (default: -1)\n"
             , argv0);
+    fprintf(stderr,
+            "  --ascii      show ASCII representation of binary as comment\n"
+            "  --export     emit DECLEXPORT\n"
+            "  --append     append to the output file (default: truncate)\n"
+            "  --no-size    Skip the size.\n"
+            "  --static     Static data scope.\n");
 
     return 1;
 }
@@ -76,6 +79,8 @@ int main(int argc, char *argv[])
     int           fAscii = 0;
     int           fAppend = 0;
     int           fExport = 0;
+    int           fNoSize = 0;
+    int           fStatic = 0;
     long          iBreakEvery = -1;
     unsigned char abLine[32];
     size_t        cbLine = 16;
@@ -89,31 +94,35 @@ int main(int argc, char *argv[])
 
     for (iArg = 1; iArg < argc; iArg++)
     {
-        if (!strcmp(argv[iArg], "-min"))
+        if (!strcmp(argv[iArg], "--min") || !strcmp(argv[iArg], "-min"))
         {
             if (++iArg >= argc)
                 return usage(argv[0]);
             cbMin = 1024 * strtoul(argv[iArg], NULL, 0);
         }
-        else if (!strcmp(argv[iArg], "-max"))
+        else if (!strcmp(argv[iArg], "--max") || !strcmp(argv[iArg], "-max"))
         {
             if (++iArg >= argc)
                 return usage(argv[0]);
             cbMax = 1024 * strtoul(argv[iArg], NULL, 0);
         }
-        else if (!strcmp(argv[iArg], "-mask"))
+        else if (!strcmp(argv[iArg], "--mask") || !strcmp(argv[iArg], "-mask"))
         {
             if (++iArg >= argc)
                 return usage(argv[0]);
             uMask = strtoul(argv[iArg], NULL, 0);
         }
-        else if (!strcmp(argv[iArg], "-ascii"))
+        else if (!strcmp(argv[iArg], "--ascii") || !strcmp(argv[iArg], "-ascii"))
             fAscii = 1;
         else if (!strcmp(argv[iArg], "--append"))
             fAppend = 1;
-        else if (!strcmp(argv[iArg], "-export"))
+        else if (!strcmp(argv[iArg], "--export") || !strcmp(argv[iArg], "-export"))
             fExport = 1;
-        else if (!strcmp(argv[iArg], "-width"))
+        else if (!strcmp(argv[iArg], "--no-size"))
+            fNoSize = 1;
+        else if (!strcmp(argv[iArg], "--static"))
+            fStatic = 1;
+        else if (!strcmp(argv[iArg], "--width") || !strcmp(argv[iArg], "-width"))
         {
             if (++iArg >= argc)
                 return usage(argv[0]);
@@ -125,7 +134,7 @@ int main(int argc, char *argv[])
                 return 1;
             }
         }
-        else if (!strcmp(argv[iArg], "-break"))
+        else if (!strcmp(argv[iArg], "--break") || !strcmp(argv[iArg], "-break"))
         {
             if (++iArg >= argc)
                 return usage(argv[0]);
@@ -175,7 +184,7 @@ int main(int argc, char *argv[])
            "\n"
            "%sconst unsigned char%s g_ab%s[] =\n"
            "{\n",
-           argv[iArg+1], argv[0], fExport ? "DECLEXPORT(" : "", fExport ? ")" : "", argv[iArg]);
+           argv[iArg+1], argv[0], fStatic ? "static " : fExport ? "DECLEXPORT(" : "", !fStatic && fExport ? ")" : "", argv[iArg]);
 
     /* check size restrictions */
     if (uMask && (cbBin & uMask))
@@ -226,11 +235,15 @@ int main(int argc, char *argv[])
         {
             /* no errors, finish the structure. */
             fprintf(pFileOut,
-                    "};\n"
-                    "\n"
-                    "%sconst unsigned%s g_cb%s = sizeof(g_ab%s);\n"
-                    "/* end of file */\n",
-                    fExport ? "DECLEXPORT(" : "", fExport ? ")" : "", argv[iArg], argv[iArg]);
+                    "};\n");
+
+            if (!fNoSize)
+                fprintf(pFileOut,
+                        "\n"
+                        "%sconst unsigned%s g_cb%s = sizeof(g_ab%s);\n",
+                        fExport ? "DECLEXPORT(" : "", fExport ? ")" : "", argv[iArg], argv[iArg]);
+
+            fprintf(pFileOut, "/* end of file */\n");
 
             /* flush output and check for error. */
             fflush(pFileOut);
diff --git a/src/bldprogs/biossums.c b/src/bldprogs/biossums.c
index fc9b575..140e94b 100644
--- a/src/bldprogs/biossums.c
+++ b/src/bldprogs/biossums.c
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/bldprogs/filesplitter.cpp b/src/bldprogs/filesplitter.cpp
index 607bc6b..866ca34 100644
--- a/src/bldprogs/filesplitter.cpp
+++ b/src/bldprogs/filesplitter.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/bldprogs/preload.cpp b/src/bldprogs/preload.cpp
index 44b3305..f539db7 100644
--- a/src/bldprogs/preload.cpp
+++ b/src/bldprogs/preload.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2015 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -147,7 +147,7 @@ int main(int argc, char **argv)
             if (   !strcmp(argv[i], "--version")
                 || !strcmp(argv[i], "-V"))
             {
-                printf("$Revision: 108331 $\n");
+                printf("$Revision: 109096 $\n");
                 return 0;
             }
             fprintf(stderr, "syntax error: unknown option '%s'\n", argv[i]);
diff --git a/src/bldprogs/scm.cpp b/src/bldprogs/scm.cpp
index a568aba..37247c8 100644
--- a/src/bldprogs/scm.cpp
+++ b/src/bldprogs/scm.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -74,6 +74,8 @@ typedef enum SCMOPT
     SCMOPT_NO_STRIP_TRAILING_LINES,
     SCMOPT_FIX_FLOWER_BOX_MARKERS,
     SCMOPT_NO_FIX_FLOWER_BOX_MARKERS,
+    SCMOPT_FIX_TODOS,
+    SCMOPT_NO_FIX_TODOS,
     SCMOPT_MIN_BLANK_LINES_BEFORE_FLOWER_BOX_MARKERS,
     SCMOPT_ONLY_SVN_DIRS,
     SCMOPT_NOT_ONLY_SVN_DIRS,
@@ -138,6 +140,7 @@ static SCMSETTINGSBASE const g_Defaults =
     /* .fStripTrailingLines = */                    true,
     /* .fFixFlowerBoxMarkers = */                   true,
     /* .cMinBlankLinesBeforeFlowerBoxMakers = */    2,
+    /* .fFixTodos = */                              true,
     /* .fOnlySvnFiles = */                          false,
     /* .fOnlySvnDirs = */                           false,
     /* .fSetSvnEol = */                             false,
@@ -168,6 +171,8 @@ static RTGETOPTDEF  g_aScmOpts[] =
     { "--min-blank-lines-before-flower-box-makers", SCMOPT_FIX_FLOWER_BOX_MARKERS,  RTGETOPT_REQ_UINT8 },
     { "--fix-flower-box-markers",           SCMOPT_FIX_FLOWER_BOX_MARKERS,          RTGETOPT_REQ_NOTHING },
     { "--no-fix-flower-box-markers",        SCMOPT_NO_FIX_FLOWER_BOX_MARKERS,       RTGETOPT_REQ_NOTHING },
+    { "--fix-todos",                        SCMOPT_FIX_TODOS,                       RTGETOPT_REQ_NOTHING },
+    { "--no-fix-todos",                     SCMOPT_NO_FIX_TODOS,                    RTGETOPT_REQ_NOTHING },
     { "--only-svn-dirs",                    SCMOPT_ONLY_SVN_DIRS,                   RTGETOPT_REQ_NOTHING },
     { "--not-only-svn-dirs",                SCMOPT_NOT_ONLY_SVN_DIRS,               RTGETOPT_REQ_NOTHING },
     { "--only-svn-files",                   SCMOPT_ONLY_SVN_FILES,                  RTGETOPT_REQ_NOTHING },
@@ -213,6 +218,7 @@ static PFNSCMREWRITER const g_aRewritersFor_C_and_CPP[] =
     rewrite_SvnNoExecutable,
     rewrite_SvnKeywords,
     rewrite_FixFlowerBoxMarkers,
+    rewrite_Fix_C_and_CPP_Todos,
     rewrite_C_and_CPP
 };
 
@@ -612,6 +618,7 @@ static int scmSettingsBaseVerifyString(const char *pszOptions)
 static int scmSettingsBaseLoadFromDocument(PSCMSETTINGSBASE pBase, PSCMSTREAM pStream)
 {
     /** @todo Editor and SCM settings directives in documents.  */
+    RT_NOREF2(pBase, pStream);
     return VINF_SUCCESS;
 }
 
@@ -785,6 +792,7 @@ static int scmSettingsLoadFile(PSCMSETTINGS pSettings, const char *pszFilename)
     return rc;
 }
 
+#if 0 /* unused */
 /**
  * Parse the specified settings file creating a new settings struct from it.
  *
@@ -811,6 +819,7 @@ static int scmSettingsCreateFromFile(PSCMSETTINGS *ppSettings, const char *pszFi
     *ppSettings = NULL;
     return rc;
 }
+#endif
 
 
 /**
@@ -1473,7 +1482,7 @@ static int scmProcessSomething(const char *pszSomething, PSCMSETTINGS pSettingsS
                 rc = scmProcessDirTree(szBuf, pSettingsStack);
 
             PSCMSETTINGS pPopped = scmSettingsStackPop(&pSettingsStack);
-            Assert(pPopped == pSettings);
+            Assert(pPopped == pSettings); RT_NOREF_PV(pPopped);
             scmSettingsDestroy(pSettings);
         }
         else
@@ -1628,7 +1637,7 @@ int main(int argc, char **argv)
             case 'V':
             {
                 /* The following is assuming that svn does it's job here. */
-                static const char s_szRev[] = "$Revision: 102132 $";
+                static const char s_szRev[] = "$Revision: 110214 $";
                 const char *psz = RTStrStripL(strchr(s_szRev, ' '));
                 RTPrintf("r%.*s\n", strchr(psz, ' ') - psz, psz);
                 return 0;
diff --git a/src/bldprogs/scm.h b/src/bldprogs/scm.h
index 949b5ef..ba7ccd8 100644
--- a/src/bldprogs/scm.h
+++ b/src/bldprogs/scm.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -106,6 +106,7 @@ FNSCMREWRITER rewrite_SvnKeywords;
 FNSCMREWRITER rewrite_Makefile_kup;
 FNSCMREWRITER rewrite_Makefile_kmk;
 FNSCMREWRITER rewrite_FixFlowerBoxMarkers;
+FNSCMREWRITER rewrite_Fix_C_and_CPP_Todos;
 FNSCMREWRITER rewrite_C_and_CPP;
 
 /** @}  */
@@ -147,6 +148,9 @@ typedef struct SCMSETTINGSBASE
     /** The minimum number of blank lines we want before flowerbox markers. */
     uint8_t         cMinBlankLinesBeforeFlowerBoxMakers;
 
+    /** Whether to fix C/C++ todos. */
+    bool            fFixTodos;
+
     /** Only process files that are part of a SVN working copy. */
     bool            fOnlySvnFiles;
     /** Only recurse into directories containing an .svn dir.  */
diff --git a/src/bldprogs/scmdiff.cpp b/src/bldprogs/scmdiff.cpp
index 44eb70c..64f6c3b 100644
--- a/src/bldprogs/scmdiff.cpp
+++ b/src/bldprogs/scmdiff.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/bldprogs/scmdiff.h b/src/bldprogs/scmdiff.h
index 239e884..97948ee 100644
--- a/src/bldprogs/scmdiff.h
+++ b/src/bldprogs/scmdiff.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/bldprogs/scmrw.cpp b/src/bldprogs/scmrw.cpp
index a48a861..6d76d52 100644
--- a/src/bldprogs/scmrw.cpp
+++ b/src/bldprogs/scmrw.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -362,6 +362,7 @@ bool rewrite_AdjustTrailingLines(PSCMRWSTATE pState, PSCMSTREAM pIn, PSCMSTREAM
  */
 bool rewrite_SvnNoExecutable(PSCMRWSTATE pState, PSCMSTREAM pIn, PSCMSTREAM pOut, PCSCMSETTINGSBASE pSettings)
 {
+    RT_NOREF2(pIn, pOut);
     if (   !pSettings->fSetSvnExecutable
         || !ScmSvnIsInWorkingCopy(pState))
         return false;
@@ -388,6 +389,7 @@ bool rewrite_SvnNoExecutable(PSCMRWSTATE pState, PSCMSTREAM pIn, PSCMSTREAM pOut
  */
 bool rewrite_SvnKeywords(PSCMRWSTATE pState, PSCMSTREAM pIn, PSCMSTREAM pOut, PCSCMSETTINGSBASE pSettings)
 {
+    RT_NOREF2(pIn, pOut);
     if (   !pSettings->fSetSvnKeywords
         || !ScmSvnIsInWorkingCopy(pState))
         return false;
@@ -438,6 +440,8 @@ bool rewrite_SvnKeywords(PSCMRWSTATE pState, PSCMSTREAM pIn, PSCMSTREAM pOut, PC
  */
 bool rewrite_Makefile_kup(PSCMRWSTATE pState, PSCMSTREAM pIn, PSCMSTREAM pOut, PCSCMSETTINGSBASE pSettings)
 {
+    RT_NOREF2(pOut, pSettings);
+
     /* These files should be zero bytes. */
     if (pIn->cb == 0)
         return false;
@@ -461,6 +465,7 @@ bool rewrite_Makefile_kup(PSCMRWSTATE pState, PSCMSTREAM pIn, PSCMSTREAM pOut, P
  */
 bool rewrite_Makefile_kmk(PSCMRWSTATE pState, PSCMSTREAM pIn, PSCMSTREAM pOut, PCSCMSETTINGSBASE pSettings)
 {
+    RT_NOREF4(pState, pIn, pOut, pSettings);
     return false;
 }
 
@@ -646,6 +651,197 @@ bool rewrite_FixFlowerBoxMarkers(PSCMRWSTATE pState, PSCMSTREAM pIn, PSCMSTREAM
     return cChanges != 0;
 }
 
+
+/**
+ * Looks for the start of a todo comment.
+ *
+ * @returns Offset into the line of the comment start sequence.
+ * @param   pchLine             The line to search.
+ * @param   cchLineBeforeTodo   The length of the line before the todo.
+ * @param   pfSameLine          Indicates whether it's refering to a statemtn on
+ *                              the same line comment (true), or the next
+ *                              statement (false).
+ */
+static size_t findTodoCommentStart(char const *pchLine, size_t cchLineBeforeTodo, bool *pfSameLine)
+{
+    *pfSameLine = false;
+
+    /* Skip one '@' or  '\\'. */
+    char ch;
+    if (   cchLineBeforeTodo > 2
+        && (   (ch = pchLine[cchLineBeforeTodo - 1] == '@')
+            || ch == '\\' ) )
+        cchLineBeforeTodo--;
+
+    /* Skip blanks. */
+    while (   cchLineBeforeTodo > 2
+           && RT_C_IS_BLANK(pchLine[cchLineBeforeTodo - 1]))
+        cchLineBeforeTodo--;
+
+    /* Look for same line indicator. */
+    if (   cchLineBeforeTodo > 0
+        && pchLine[cchLineBeforeTodo - 1] == '<')
+    {
+        *pfSameLine = true;
+        cchLineBeforeTodo--;
+    }
+
+    /* Skip *s */
+    while (   cchLineBeforeTodo > 1
+           && pchLine[cchLineBeforeTodo - 1] == '*')
+        cchLineBeforeTodo--;
+
+    /* Do we have a comment opening sequence. */
+    if (   cchLineBeforeTodo > 0
+        && pchLine[cchLineBeforeTodo - 1] == '/'
+        && (   (   cchLineBeforeTodo >= 2
+                && pchLine[cchLineBeforeTodo - 2] == '/')
+            || pchLine[cchLineBeforeTodo] == '*'))
+    {
+        /* Skip slashes at the start. */
+        while (   cchLineBeforeTodo > 0
+               && pchLine[cchLineBeforeTodo - 1] == '/')
+            cchLineBeforeTodo--;
+
+        return cchLineBeforeTodo;
+    }
+
+    return ~(size_t)0;
+}
+
+
+/**
+ * Looks for a TODO or todo in the given line.
+ *
+ * @returns Offset into the line of found, ~(size_t)0 if not.
+ * @param   pchLine             The line to search.
+ * @param   cchLine             The length of the line.
+ */
+static size_t findTodo(char const *pchLine, size_t cchLine)
+{
+    if (cchLine >= 4 + 2)
+    {
+        /* We don't search the first to chars because we need the start of a comment.
+           Also, skip the last three chars since we need at least four for a match. */
+        size_t const cchLineT = cchLine - 3;
+        if (   memchr(pchLine + 2, 't', cchLineT - 2) != NULL
+            || memchr(pchLine + 2, 'T', cchLineT - 2) != NULL)
+        {
+            for (size_t off = 2; off < cchLineT; off++)
+            {
+                char ch = pchLine[off];
+                if (   (   ch != 't'
+                        && ch != 'T')
+                    || (   (ch = pchLine[off + 1]) != 'o'
+                        && ch != 'O')
+                    || (   (ch = pchLine[off + 2]) != 'd'
+                        && ch != 'D')
+                    || (   (ch = pchLine[off + 3]) != 'o'
+                        && ch != 'O')
+                    || (   off + 4 != cchLine
+                        && (ch = pchLine[off + 4]) != ' '
+                        && ch != '\t'
+                        && ch != ':'                /** @todo */
+                        && (ch != '*' || off + 5 > cchLine || pchLine[off + 5] != '/')  /** @todo */
+                        ) )
+                { /* not a hit - likely */ }
+                else
+                    return off;
+            }
+        }
+    }
+    return ~(size_t)0;
+}
+
+
+/**
+ * Flower box marker comments in C and C++ code.
+ *
+ * @returns true if modifications were made, false if not.
+ * @param   pIn                 The input stream.
+ * @param   pOut                The output stream.
+ * @param   pSettings           The settings.
+ */
+bool rewrite_Fix_C_and_CPP_Todos(PSCMRWSTATE pState, PSCMSTREAM pIn, PSCMSTREAM pOut, PCSCMSETTINGSBASE pSettings)
+{
+    if (!pSettings->fFixTodos)
+        return false;
+
+    /*
+     * Work thru the file line by line looking for the start of todo comments.
+     */
+    size_t      cChanges = 0;
+    SCMEOL      enmEol;
+    size_t      cchLine;
+    const char *pchLine;
+    while ((pchLine = ScmStreamGetLine(pIn, &cchLine, &enmEol)) != NULL)
+    {
+        /*
+         * Look for the word 'todo' in the line.  We're currently only trying
+         * to catch comments starting with the word todo and adjust the start of
+         * the doxygen statement.
+         */
+        size_t offTodo = findTodo(pchLine, cchLine);
+        if (   offTodo != ~(size_t)0
+            && offTodo >= 2)
+        {
+            /* Work backwards to find the start of the comment. */
+            bool fSameLine = false;
+            size_t offCommentStart = findTodoCommentStart(pchLine, offTodo, &fSameLine);
+            if (offCommentStart != ~(size_t)0)
+            {
+                char    szNew[64];
+                size_t  cchNew = 0;
+                szNew[cchNew++] = '/';
+                szNew[cchNew++] = pchLine[offCommentStart + 1];
+                szNew[cchNew++] = pchLine[offCommentStart + 1];
+                if (fSameLine)
+                    szNew[cchNew++] = '<';
+                szNew[cchNew++] = ' ';
+                szNew[cchNew++] = '@';
+                szNew[cchNew++] = 't';
+                szNew[cchNew++] = 'o';
+                szNew[cchNew++] = 'd';
+                szNew[cchNew++] = 'o';
+
+                /* Figure out wheter to continue after the @todo statement opening, we'll strip ':'
+                   but need to take into account that we might be at the end of the line before
+                   adding the space. */
+                size_t offTodoAfter = offTodo + 4;
+                if (   offTodoAfter < cchLine
+                    && pchLine[offTodoAfter] == ':')
+                    offTodoAfter++;
+                if (   offTodoAfter < cchLine
+                    && RT_C_IS_BLANK(pchLine[offTodoAfter]))
+                    offTodoAfter++;
+                if (offTodoAfter < cchLine)
+                    szNew[cchNew++] = ' ';
+
+                /* Write it out. */
+                ScmStreamWrite(pOut, pchLine, offCommentStart);
+                ScmStreamWrite(pOut, szNew, cchNew);
+                if (offTodoAfter < cchLine)
+                    ScmStreamWrite(pOut, &pchLine[offTodoAfter], cchLine - offTodoAfter);
+                ScmStreamPutEol(pOut, enmEol);
+
+                /* Check whether we actually made any changes. */
+                if (   cchNew != offTodoAfter - offCommentStart
+                    || memcmp(szNew, &pchLine[offCommentStart], cchNew))
+                    cChanges++;
+                continue;
+            }
+        }
+
+        int rc = ScmStreamPutLine(pOut, pchLine, cchLine, enmEol);
+        if (RT_FAILURE(rc))
+            return false;
+    }
+    if (cChanges > 0)
+        ScmVerbose(pState, 2, " * Converted %zu todo statements.\n", cChanges);
+    return cChanges != 0;
+}
+
+
 /**
  * Rewrite a C/C++ source or header file.
  *
@@ -680,6 +876,7 @@ bool rewrite_FixFlowerBoxMarkers(PSCMRWSTATE pState, PSCMSTREAM pIn, PSCMSTREAM
 bool rewrite_C_and_CPP(PSCMRWSTATE pState, PSCMSTREAM pIn, PSCMSTREAM pOut, PCSCMSETTINGSBASE pSettings)
 {
 
+    RT_NOREF4(pState, pIn, pOut, pSettings);
     return false;
 }
 
diff --git a/src/bldprogs/scmstream.cpp b/src/bldprogs/scmstream.cpp
index 6517a13..69073f6 100644
--- a/src/bldprogs/scmstream.cpp
+++ b/src/bldprogs/scmstream.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/bldprogs/scmstream.h b/src/bldprogs/scmstream.h
index fecc566..96241f6 100644
--- a/src/bldprogs/scmstream.h
+++ b/src/bldprogs/scmstream.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2012-2015 Oracle Corporation
+ * Copyright (C) 2012-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/bldprogs/scmsubversion.cpp b/src/bldprogs/scmsubversion.cpp
index 61f908f..7f7fafe 100644
--- a/src/bldprogs/scmsubversion.cpp
+++ b/src/bldprogs/scmsubversion.cpp
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2010-2015 Oracle Corporation
+ * Copyright (C) 2010-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
@@ -393,9 +393,9 @@ int RTProcExecToString(const char *pszExec, const char * const *papszArgs, RTENV
              * Create the process.
              */
             RTPROCESS hProc;
-            rc = RTProcCreateEx(g_szSvnPath,
+            rc = RTProcCreateEx(pszExec,
                                 papszArgs,
-                                RTENV_DEFAULT,
+                                hEnv,
                                 0 /*fFlags*/,
                                 NULL /*phStdIn*/,
                                 phChildStdOut,
@@ -528,11 +528,11 @@ int RTProcExec(const char *pszExec, const char * const *papszArgs, RTENV hEnv, u
     /*
      * Create the process.
      */
-    RTPROCESS hProc;
+    RTPROCESS hProc = NIL_RTPROCESS;
     if (RT_SUCCESS(rc))
-        rc = RTProcCreateEx(g_szSvnPath,
+        rc = RTProcCreateEx(pszExec,
                             papszArgs,
-                            RTENV_DEFAULT,
+                            hEnv,
                             0 /*fFlags*/,
                             aph[0],
                             aph[1],
@@ -813,11 +813,11 @@ static void scmSvnFindSvnBinary(PSCMRWSTATE pState)
     if (RT_SUCCESS(rc))
     {
         char *pszStripped = RTStrStrip(pszVersion);
-        if (RTStrVersionCompare(pszVersion, "1.8") >= 0)
+        if (RTStrVersionCompare(pszStripped, "1.8") >= 0)
             g_enmSvnVersion = kScmSvnVersion_1_8;
-        else if (RTStrVersionCompare(pszVersion, "1.7") >= 0)
+        else if (RTStrVersionCompare(pszStripped, "1.7") >= 0)
             g_enmSvnVersion = kScmSvnVersion_1_7;
-        else if (RTStrVersionCompare(pszVersion, "1.6") >= 0)
+        else if (RTStrVersionCompare(pszStripped, "1.6") >= 0)
             g_enmSvnVersion = kScmSvnVersion_1_6;
         else
             g_enmSvnVersion = kScmSvnVersion_Ancient;
diff --git a/src/libs/Makefile.kmk b/src/libs/Makefile.kmk
index 3a596e6..c595c8a 100644
--- a/src/libs/Makefile.kmk
+++ b/src/libs/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/libs/kStuff/Makefile.kmk b/src/libs/kStuff/Makefile.kmk
index 2eb092e..bdf5a13 100644
--- a/src/libs/kStuff/Makefile.kmk
+++ b/src/libs/kStuff/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2007-2015 Oracle Corporation
+# Copyright (C) 2007-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/libs/kStuff/iprt/kRdrFile-iprt.cpp b/src/libs/kStuff/iprt/kRdrFile-iprt.cpp
index 0b95962..385b9bb 100644
--- a/src/libs/kStuff/iprt/kRdrFile-iprt.cpp
+++ b/src/libs/kStuff/iprt/kRdrFile-iprt.cpp
@@ -128,6 +128,7 @@ const KRDROPS g_kRdrFileOps =
 /** @copydoc KRDROPS::pfnDone */
 static void     krdrRTFileDone(PKRDR pRdr)
 {
+    K_NOREF(pRdr);
 }
 
 
@@ -214,6 +215,7 @@ static unsigned krdrRTFileConvertProt(KPROT enmProt)
 static int krdrRTFileGenericProtect(PKRDR pRdr, PKRDRFILEPREP pPrep, KU32 cSegments, PCKLDRSEG paSegments, KBOOL fUnprotectOrProtect)
 {
     KU32 i;
+    K_NOREF(pRdr);
 
     /*
      * Iterate the segments and apply memory protection changes.
@@ -384,6 +386,7 @@ static int  krdrRTFileGenericMap(PKRDR pRdr, PKRDRFILEPREP pPrep, KU32 cSegments
 {
     int rc = 0;
     KU32 i;
+    K_NOREF(fFixed);
 
     /*
      * Generic mapping code using kHlpPageAlloc(), kHlpPageFree() and kHlpPageProtect().
@@ -429,6 +432,7 @@ static int  krdrRTFileGenericMap(PKRDR pRdr, PKRDRFILEPREP pPrep, KU32 cSegments
 /** @copydoc KRDROPS::pfnPageSize */
 static KSIZE   krdrRTFilePageSize(PKRDR pRdr)
 {
+    K_NOREF(pRdr);
     return PAGE_SIZE;
 }
 
@@ -478,6 +482,7 @@ static KFOFF krdrRTFileSize(PKRDR pRdr)
 static int krdrRTFileAllUnmap(PKRDR pRdr, const void *pvBits)
 {
     PKRDRFILE pRdrFile = (PKRDRFILE)pRdr;
+    K_NOREF(pvBits);
 
     /* check for underflow */
     if (pRdrFile->cMappings <= 0)
diff --git a/src/libs/kStuff/kStuff/include/k/kDefs.h b/src/libs/kStuff/kStuff/include/k/kDefs.h
index 0f2215f..9c5a974 100644
--- a/src/libs/kStuff/kStuff/include/k/kDefs.h
+++ b/src/libs/kStuff/kStuff/include/k/kDefs.h
@@ -1,4 +1,4 @@
-/* $Id: kDefs.h 29 2009-07-01 20:30:29Z bird $ */
+/* $Id: kDefs.h 79 2016-07-27 14:25:09Z bird $ */
 /** @file
  * kTypes - Defines and Macros.
  */
@@ -293,12 +293,12 @@
 /** @def K_ENDIAN
  * The value of this \#define indicates the target endianness.
  *
- * @remark  It's necessary to define this (or add the necessary dection here)
+ * @remark  It's necessary to define this (or add the necessary deduction here)
  *          on bi-endian architectures.
  */
 #ifndef K_ENDIAN
   /* use K_ARCH if possible. */
-# if K_ARCH_END != K_ENDIAN_BI
+# if K_ARCH_ENDIAN != K_ENDIAN_BI
 #  define K_ENDIAN K_ARCH_ENDIAN
 # else
 #  error "Port Me or define K_ENDIAN."
diff --git a/src/libs/kStuff/kStuff/kDbg/kDbgHlp.h b/src/libs/kStuff/kStuff/kDbg/kDbgHlp.h
index b873264..cd5116d 100644
--- a/src/libs/kStuff/kStuff/kDbg/kDbgHlp.h
+++ b/src/libs/kStuff/kStuff/kDbg/kDbgHlp.h
@@ -1,4 +1,4 @@
-/* $Id: kDbgHlp.h 70 2015-08-13 09:03:02Z bird $ */
+/* $Id: kDbgHlp.h 78 2016-07-13 15:52:04Z bird $ */
 /** @file
  * kDbg - The Debug Info Reader, Internal Header.
  */
@@ -244,7 +244,7 @@ void kDbgAssertMsg2(const char *pszFormat, ...);
         { \
             kDbgAssertMsg1(#expr, __FILE__, __LINE__, K_FUNCTION); \
             kDbgAssertBreakpoint(); \
-        }
+        } \
     } while (0)
 
 # define kDbgAssertReturn(expr, rcRet) \
@@ -254,7 +254,7 @@ void kDbgAssertMsg2(const char *pszFormat, ...);
             kDbgAssertMsg1(#expr, __FILE__, __LINE__, K_FUNCTION); \
             kDbgAssertBreakpoint(); \
             return (rcRet); \
-        }
+        } \
     } while (0)
 
 # define kDbgAssertMsg(expr, msg) \
@@ -264,7 +264,7 @@ void kDbgAssertMsg2(const char *pszFormat, ...);
             kDbgAssertMsg1(#expr, __FILE__, __LINE__, K_FUNCTION); \
             kDbgAssertMsg2 msg; \
             kDbgAssertBreakpoint(); \
-        }
+        } \
     } while (0)
 
 # define kDbgAssertMsgReturn(expr, msg, rcRet) \
@@ -275,7 +275,7 @@ void kDbgAssertMsg2(const char *pszFormat, ...);
             kDbgAssertMsg2 msg; \
             kDbgAssertBreakpoint(); \
             return (rcRet); \
-        }
+        } \
     } while (0)
 
 #else   /* !KDBG_STRICT */
diff --git a/src/libs/kStuff/kStuff/kLdr/kLdrMod.c b/src/libs/kStuff/kStuff/kLdr/kLdrMod.c
index f11da02..aeb9b08 100644
--- a/src/libs/kStuff/kStuff/kLdr/kLdrMod.c
+++ b/src/libs/kStuff/kStuff/kLdr/kLdrMod.c
@@ -1,4 +1,4 @@
-/* $Id: kLdrMod.c 54 2013-10-09 19:52:48Z bird $ */
+/* $Id: kLdrMod.c 79 2016-07-27 14:25:09Z bird $ */
 /** @file
  * kLdr - The Module Interpreter.
  */
@@ -152,6 +152,7 @@ static int kldrModOpenFromRdrSelectImageFromFAT(PKRDR pRdr, KU32 fFlags, KCPUARC
     KU32        cArchs;
     KU32        iArch;
     int         rc;
+    K_NOREF(fFlags);
 
     /* Read fat_header_t::nfat_arch. */
     rc = kRdrRead(pRdr, &cArchs, sizeof(cArchs), off);
diff --git a/src/libs/kStuff/kStuff/kLdr/kLdrModLX.c b/src/libs/kStuff/kStuff/kLdr/kLdrModLX.c
index 89a2420..25e7e3d 100644
--- a/src/libs/kStuff/kStuff/kLdr/kLdrModLX.c
+++ b/src/libs/kStuff/kStuff/kLdr/kLdrModLX.c
@@ -1,4 +1,4 @@
-/* $Id: kLdrModLX.c 58 2013-10-12 20:18:21Z bird $ */
+/* $Id: kLdrModLX.c 80 2016-08-06 20:38:28Z bird $ */
 /** @file
  * kLdr - The Module Interpreter for the Linear eXecutable (LX) Format.
  */
@@ -155,6 +155,7 @@ static int kldrModLXCreate(PCKLDRMODOPS pOps, PKRDR pRdr, KU32 fFlags, KCPUARCH
 {
     PKLDRMODLX pModLX;
     int rc;
+    K_NOREF(fFlags);
 
     /*
      * Create the instance data and do a minimal header validation.
@@ -586,7 +587,8 @@ static int kldrModLXQuerySymbol(PKLDRMOD pMod, const void *pvBits, KLDRADDR Base
     KU32                        iOrdinal;
     int                         rc;
     const struct b32_bundle     *pBundle;
-
+    K_NOREF(pvBits);
+    K_NOREF(pszVersion);
 
     /*
      * Give up at once if there is no entry table.
@@ -989,6 +991,8 @@ static int kldrModLXEnumSymbols(PKLDRMOD pMod, const void *pvBits, KLDRADDR Base
     const struct b32_bundle *pBundle;
     KU32 iOrdinal;
     int rc = 0;
+    K_NOREF(pvBits);
+    K_NOREF(fFlags);
 
     kldrModLXResolveBaseAddress(pModLX, &BaseAddress);
 
@@ -1198,6 +1202,7 @@ static int kldrModLXGetImport(PKLDRMOD pMod, const void *pvBits, KU32 iImport, c
     PKLDRMODLX  pModLX = (PKLDRMODLX)pMod->pvData;
     const KU8  *pb;
     int         rc;
+    K_NOREF(pvBits);
 
     /*
      * Validate
@@ -1247,6 +1252,7 @@ static int kldrModLXGetImport(PKLDRMOD pMod, const void *pvBits, KU32 iImport, c
 static KI32 kldrModLXNumberOfImports(PKLDRMOD pMod, const void *pvBits)
 {
     PKLDRMODLX pModLX = (PKLDRMODLX)pMod->pvData;
+    K_NOREF(pvBits);
     return pModLX->Hdr.e32_impmodcnt;
 }
 
@@ -1256,6 +1262,7 @@ static int kldrModLXGetStackInfo(PKLDRMOD pMod, const void *pvBits, KLDRADDR Bas
 {
     PKLDRMODLX pModLX = (PKLDRMODLX)pMod->pvData;
     const KU32 i = pModLX->Hdr.e32_stackobj;
+    K_NOREF(pvBits);
 
     if (    i
         &&  i <= pMod->cSegments
@@ -1286,6 +1293,7 @@ static int kldrModLXGetStackInfo(PKLDRMOD pMod, const void *pvBits, KLDRADDR Bas
 static int kldrModLXQueryMainEntrypoint(PKLDRMOD pMod, const void *pvBits, KLDRADDR BaseAddress, PKLDRADDR pMainEPAddress)
 {
     PKLDRMODLX pModLX = (PKLDRMODLX)pMod->pvData;
+    K_NOREF(pvBits);
 
     /*
      * Convert the address from the header.
@@ -1304,6 +1312,8 @@ static int kldrModLXQueryMainEntrypoint(PKLDRMOD pMod, const void *pvBits, KLDRA
 static int kldrModLXEnumDbgInfo(PKLDRMOD pMod, const void *pvBits, PFNKLDRENUMDBG pfnCallback, void *pvUser)
 {
     /*PKLDRMODLX pModLX = (PKLDRMODLX)pMod->pvData;*/
+    K_NOREF(pfnCallback);
+    K_NOREF(pvUser);
 
     /*
      * Quit immediately if no debug info.
@@ -1325,6 +1335,7 @@ static int kldrModLXEnumDbgInfo(PKLDRMOD pMod, const void *pvBits, PFNKLDRENUMDB
 static int kldrModLXHasDbgInfo(PKLDRMOD pMod, const void *pvBits)
 {
     PKLDRMODLX pModLX = (PKLDRMODLX)pMod->pvData;
+    K_NOREF(pvBits);
 
     /*
      * Don't curretnly bother with linkers which doesn't advertise it in the header.
@@ -1940,6 +1951,8 @@ static int kldrModLXAllocTLS(PKLDRMOD pMod)
 static void kldrModLXFreeTLS(PKLDRMOD pMod)
 {
     /* no tls. */
+    K_NOREF(pMod);
+
 }
 
 
@@ -2122,9 +2135,14 @@ static KI32 kldrModLXDoCall(KUPTR uEntrypoint, KUPTR uHandle, KU32 uOp, void *pv
 # else
 #  error "port me!"
 # endif
+    K_NOREF(pvReserved);
     return rc;
 
 #else
+    K_NOREF(uEntrypoint);
+    K_NOREF(uHandle);
+    K_NOREF(uOp);
+    K_NOREF(pvReserved);
     return KCPU_ERR_ARCH_CPU_NOT_COMPATIBLE;
 #endif
 }
@@ -2155,6 +2173,9 @@ static int kldrModLXCallTerm(PKLDRMOD pMod, KUPTR uHandle)
 static int kldrModLXCallThread(PKLDRMOD pMod, KUPTR uHandle, unsigned fAttachingOrDetaching)
 {
     /* no thread attach/detach callout. */
+    K_NOREF(pMod);
+    K_NOREF(uHandle);
+    K_NOREF(fAttachingOrDetaching);
     return 0;
 }
 
@@ -2231,9 +2252,9 @@ static int kldrModLXRelocateBits(PKLDRMOD pMod, void *pvBits, KLDRADDR NewBaseAd
         {
             const KU8 * const   pbFixupRecEnd = pModLX->pbFixupRecs + pModLX->paoffPageFixups[iPage + pObj->o32_pagemap];
             const KU8          *pb            = pModLX->pbFixupRecs + pModLX->paoffPageFixups[iPage + pObj->o32_pagemap - 1];
-            KLDRADDR            uValue;
+            KLDRADDR            uValue        = NIL_KLDRADDR;
+            KU32                fKind         = 0;
             int                 iSelector;
-            KU32                fKind;
 
             /* sanity */
             if (pbFixupRecEnd < pb)
@@ -2554,6 +2575,8 @@ static int kldrModLXDoReloc(KU8 *pbPage, int off, KLDRADDR PageAddress, const st
     KU8            *pbDst;
     KU8             cb;
 
+    K_NOREF(fKind);
+
     /*
      * Compose the fixup data.
      */
diff --git a/src/libs/kStuff/kStuff/kLdr/kLdrModMachO.c b/src/libs/kStuff/kStuff/kLdr/kLdrModMachO.c
index 6d8574f..d7967e5 100644
--- a/src/libs/kStuff/kStuff/kLdr/kLdrModMachO.c
+++ b/src/libs/kStuff/kStuff/kLdr/kLdrModMachO.c
@@ -1,4 +1,4 @@
-/* $Id: kLdrModMachO.c 69 2015-04-29 12:18:07Z bird $ */
+/* $Id: kLdrModMachO.c 79 2016-07-27 14:25:09Z bird $ */
 /** @file
  * kLdr - The Module Interpreter for the MACH-O format.
  */
@@ -304,16 +304,16 @@ static int kldrModMachODoCreate(PKRDR pRdr, KLDRFOFF offImage, KU32 fOpenFlags,
     PKLDRMODMACHO pModMachO;
     PKLDRMOD pMod;
     KU8 *pbLoadCommands;
-    KU32 cSegments;
-    KU32 cSections;
-    KU32 cbStringPool;
+    KU32 cSegments = 0; /* (MSC maybe used uninitialized) */
+    KU32 cSections = 0; /* (MSC maybe used uninitialized) */
+    KU32 cbStringPool = 0; /* (MSC maybe used uninitialized) */
     KSIZE cchFilename;
     KSIZE cb;
     KBOOL fMakeGot;
     KBOOL fCanLoad = K_TRUE;
-    KLDRADDR LinkAddress;
+    KLDRADDR LinkAddress = NIL_KLDRADDR; /* (MSC maybe used uninitialized) */
     KU8 cbJmpStub;
-    KU8 uEffFileType;
+    KU8 uEffFileType = 0; /* (MSC maybe used uninitialized) */
     int rc;
     *ppModMachO = NULL;
 
@@ -1119,6 +1119,7 @@ static int  kldrModMachOParseLoadCommands(PKLDRMODMACHO pModMachO, char *pbStrin
     PKLDRMODMACHOSECT pSectExtra = pModMachO->paSections;
     const KU32 cSegments = pModMachO->pMod->cSegments;
     PKLDRSEG pSegItr;
+    K_NOREF(cbStringPool);
 
     while (cLeft-- > 0)
     {
@@ -1664,6 +1665,10 @@ static int kldrModMachOQuerySymbol(PKLDRMOD pMod, const void *pvBits, KLDRADDR B
 {
     PKLDRMODMACHO pModMachO = (PKLDRMODMACHO)pMod->pvData;
     int rc;
+    K_NOREF(pvBits);
+    K_NOREF(pszVersion);
+    K_NOREF(pfnGetForwarder);
+    K_NOREF(pvUser);
 
     /*
      * Resolve defaults.
@@ -1990,6 +1995,7 @@ static int kldrModMachOEnumSymbols(PKLDRMOD pMod, const void *pvBits, KLDRADDR B
 {
     PKLDRMODMACHO pModMachO = (PKLDRMODMACHO)pMod->pvData;
     int rc;
+    K_NOREF(pvBits);
 
     /*
      * Resolve defaults.
@@ -2257,6 +2263,11 @@ static int kldrModMachODoEnumSymbols64Bit(PKLDRMODMACHO pModMachO, const macho_n
 static int kldrModMachOGetImport(PKLDRMOD pMod, const void *pvBits, KU32 iImport, char *pszName, KSIZE cchName)
 {
     PKLDRMODMACHO pModMachO = (PKLDRMODMACHO)pMod->pvData;
+    K_NOREF(pvBits);
+    K_NOREF(iImport);
+    K_NOREF(pszName);
+    K_NOREF(cchName);
+
     if (pModMachO->Hdr.filetype == MH_OBJECT)
         return KLDR_ERR_IMPORT_ORDINAL_OUT_OF_BOUNDS;
 
@@ -2269,6 +2280,8 @@ static int kldrModMachOGetImport(PKLDRMOD pMod, const void *pvBits, KU32 iImport
 static KI32 kldrModMachONumberOfImports(PKLDRMOD pMod, const void *pvBits)
 {
     PKLDRMODMACHO pModMachO = (PKLDRMODMACHO)pMod->pvData;
+    K_NOREF(pvBits);
+
     if (pModMachO->Hdr.filetype == MH_OBJECT)
         return 0;
 
@@ -2281,6 +2294,9 @@ static KI32 kldrModMachONumberOfImports(PKLDRMOD pMod, const void *pvBits)
 static int kldrModMachOGetStackInfo(PKLDRMOD pMod, const void *pvBits, KLDRADDR BaseAddress, PKLDRSTACKINFO pStackInfo)
 {
     /*PKLDRMODMACHO pModMachO = (PKLDRMODMACHO)pMod->pvData;*/
+    K_NOREF(pMod);
+    K_NOREF(pvBits);
+    K_NOREF(BaseAddress);
 
     pStackInfo->Address = NIL_KLDRADDR;
     pStackInfo->LinkAddress = NIL_KLDRADDR;
@@ -2313,6 +2329,9 @@ static int kldrModMachOQueryMainEntrypoint(PKLDRMOD pMod, const void *pvBits, KL
         : NIL_KLDRADDR;
 #else
     *pMainEPAddress = NIL_KLDRADDR;
+    K_NOREF(pvBits);
+    K_NOREF(BaseAddress);
+    K_NOREF(pMod);
 #endif
     return 0;
 }
@@ -2322,9 +2341,12 @@ static int kldrModMachOQueryMainEntrypoint(PKLDRMOD pMod, const void *pvBits, KL
 static int kldrModMachOQueryImageUuid(PKLDRMOD pMod, const void *pvBits, void *pvUuid, KSIZE cbUuid)
 {
     PKLDRMODMACHO pModMachO = (PKLDRMODMACHO)pMod->pvData;
+    K_NOREF(pvBits);
+
     kHlpMemSet(pvUuid, 0, cbUuid);
     if (kHlpMemComp(pvUuid, pModMachO->abImageUuid, sizeof(pModMachO->abImageUuid)) == 0)
         return KLDR_ERR_NO_IMAGE_UUID;
+
     kHlpMemCopy(pvUuid, pModMachO->abImageUuid, sizeof(pModMachO->abImageUuid));
     return 0;
 }
@@ -2336,6 +2358,7 @@ static int kldrModMachOEnumDbgInfo(PKLDRMOD pMod, const void *pvBits, PFNKLDRENU
     PKLDRMODMACHO pModMachO = (PKLDRMODMACHO)pMod->pvData;
     int rc = 0;
     KU32 iSect;
+    K_NOREF(pvBits);
 
     for (iSect = 0; iSect < pModMachO->cSections; iSect++)
     {
@@ -2376,6 +2399,8 @@ static int kldrModMachOHasDbgInfo(PKLDRMOD pMod, const void *pvBits)
         return KLDR_ERR_NO_DEBUG_INFO;
     return 0;
 #else
+    K_NOREF(pMod);
+    K_NOREF(pvBits);
     return KLDR_ERR_NO_DEBUG_INFO;
 #endif
 }
@@ -2481,6 +2506,7 @@ static int kldrModMachOAllocTLS(PKLDRMOD pMod)
 /** @copydoc kLdrModFreeTLS */
 static void kldrModMachOFreeTLS(PKLDRMOD pMod)
 {
+    K_NOREF(pMod);
 }
 
 
@@ -2575,7 +2601,7 @@ static int  kldrModMachOObjDoImports(PKLDRMODMACHO pModMachO, KLDRADDR BaseAddre
                 const char *pszSymbol;
                 KSIZE cchSymbol;
                 KU32 fKind = KLDRSYMKIND_REQ_FLAT;
-                KLDRADDR Value;
+                KLDRADDR Value = NIL_KLDRADDR;
 
                 /** @todo Implement N_REF_TO_WEAK. */
                 KLDRMODMACHO_CHECK_RETURN(!(paSyms[iSym].n_desc & N_REF_TO_WEAK), KLDR_ERR_TODO);
@@ -2635,7 +2661,7 @@ static int  kldrModMachOObjDoImports(PKLDRMODMACHO pModMachO, KLDRADDR BaseAddre
                 const char *pszSymbol;
                 KSIZE cchSymbol;
                 KU32 fKind = KLDRSYMKIND_REQ_FLAT;
-                KLDRADDR Value;
+                KLDRADDR Value = NIL_KLDRADDR;
 
                 /** @todo Implement N_REF_TO_WEAK. */
                 KLDRMODMACHO_CHECK_RETURN(!(paSyms[iSym].n_desc & N_REF_TO_WEAK), KLDR_ERR_TODO);
@@ -3431,6 +3457,8 @@ static int kldrModMachOMapVirginBits(PKLDRMODMACHO pModMachO)
 static int kldrModMachOCallInit(PKLDRMOD pMod, KUPTR uHandle)
 {
     /* later */
+    K_NOREF(pMod);
+    K_NOREF(uHandle);
     return 0;
 }
 
@@ -3439,6 +3467,8 @@ static int kldrModMachOCallInit(PKLDRMOD pMod, KUPTR uHandle)
 static int kldrModMachOCallTerm(PKLDRMOD pMod, KUPTR uHandle)
 {
     /* later */
+    K_NOREF(pMod);
+    K_NOREF(uHandle);
     return 0;
 }
 
@@ -3447,6 +3477,9 @@ static int kldrModMachOCallTerm(PKLDRMOD pMod, KUPTR uHandle)
 static int kldrModMachOCallThread(PKLDRMOD pMod, KUPTR uHandle, unsigned fAttachingOrDetaching)
 {
     /* Relevant for Mach-O? */
+    K_NOREF(pMod);
+    K_NOREF(uHandle);
+    K_NOREF(fAttachingOrDetaching);
     return 0;
 }
 
@@ -3506,6 +3539,7 @@ static int kldrModMachORelocateBits(PKLDRMOD pMod, void *pvBits, KLDRADDR NewBas
 {
     PKLDRMODMACHO pModMachO = (PKLDRMODMACHO)pMod->pvData;
     int rc;
+    K_NOREF(OldBaseAddress);
 
     /*
      * Call workers to do the jobs.
diff --git a/src/libs/kStuff/kStuff/kLdr/kLdrModPE.c b/src/libs/kStuff/kStuff/kLdr/kLdrModPE.c
index f8f3af4..a66f636 100644
--- a/src/libs/kStuff/kStuff/kLdr/kLdrModPE.c
+++ b/src/libs/kStuff/kStuff/kLdr/kLdrModPE.c
@@ -1,4 +1,4 @@
-/* $Id: kLdrModPE.c 58 2013-10-12 20:18:21Z bird $ */
+/* $Id: kLdrModPE.c 79 2016-07-27 14:25:09Z bird $ */
 /** @file
  * kLdr - The Module Interpreter for the Portable Executable (PE) Format.
  */
@@ -144,6 +144,7 @@ static int kldrModPECreate(PCKLDRMODOPS pOps, PKRDR pRdr, KU32 fFlags, KCPUARCH
 {
     PKLDRMODPE pModPE;
     int rc;
+    K_NOREF(fFlags);
 
     /*
      * Create the instance data and do a minimal header validation.
@@ -532,6 +533,7 @@ static int kLdrModPEDoOptionalHeaderValidation(PKLDRMODPE pModPE)
 static int kLdrModPEDoSectionHeadersValidation(PKLDRMODPE pModPE)
 {
     /** @todo validate shdrs */
+    K_NOREF(pModPE);
     return 0;
 }
 
@@ -955,6 +957,7 @@ static int kldrModPEEnumSymbols(PKLDRMOD pMod, const void *pvBits, KLDRADDR Base
     KU32                            cFunctions;
     KU32                            cNames;
     int                             rc;
+    K_NOREF(fFlags);
 
     /*
      * Make sure we've got mapped bits and resolve any base address aliases.
@@ -1108,6 +1111,8 @@ static KI32 kldrModPENumberOfImports(PKLDRMOD pMod, const void *pvBits)
 static int kldrModPEGetStackInfo(PKLDRMOD pMod, const void *pvBits, KLDRADDR BaseAddress, PKLDRSTACKINFO pStackInfo)
 {
     PKLDRMODPE pModPE = (PKLDRMODPE)pMod->pvData;
+    K_NOREF(pvBits);
+    K_NOREF(BaseAddress);
 
     pStackInfo->Address = NIL_KLDRADDR;
     pStackInfo->LinkAddress = NIL_KLDRADDR;
@@ -1122,6 +1127,7 @@ static int kldrModPEQueryMainEntrypoint(PKLDRMOD pMod, const void *pvBits, KLDRA
 {
     PKLDRMODPE pModPE = (PKLDRMODPE)pMod->pvData;
     int rc;
+    K_NOREF(pvBits);
 
     /*
      * Resolve base address alias if any.
@@ -1215,6 +1221,7 @@ static int kldrModPEEnumDbgInfo(PKLDRMOD pMod, const void *pvBits, PFNKLDRENUMDB
 static int kldrModPEHasDbgInfo(PKLDRMOD pMod, const void *pvBits)
 {
     PKLDRMODPE pModPE = (PKLDRMODPE)pMod->pvData;
+    K_NOREF(pvBits);
 
     /*
      * Base this entirely on the presence of a debug directory.
@@ -1776,6 +1783,9 @@ static int  kldrModPEDoCallDLL(PKLDRMODPE pModPE, unsigned uOp, KUPTR uHandle)
 static int  kldrModPEDoCallTLS(PKLDRMODPE pModPE, unsigned uOp, KUPTR uHandle)
 {
     /** @todo implement TLS support. */
+    K_NOREF(pModPE);
+    K_NOREF(uOp);
+    K_NOREF(uHandle);
     return 0;
 }
 
@@ -1844,6 +1854,7 @@ static KI32 kldrModPEDoCall(KUPTR uEntrypoint, KUPTR uHandle, KU32 uOp, void *pv
 #else
 # error "port me"
 #endif
+    K_NOREF(pvReserved);
 
     return rc;
 }
diff --git a/src/libs/kStuff/kStuff/kRdr/kRdrBuffered.cpp b/src/libs/kStuff/kStuff/kRdr/kRdrBuffered.cpp
index 30a2163..fc589cd 100644
--- a/src/libs/kStuff/kStuff/kRdr/kRdrBuffered.cpp
+++ b/src/libs/kStuff/kStuff/kRdr/kRdrBuffered.cpp
@@ -1,4 +1,4 @@
-/* $Id: kRdrBuffered.cpp 29 2009-07-01 20:30:29Z bird $ */
+/* $Id: kRdrBuffered.cpp 79 2016-07-27 14:25:09Z bird $ */
 /** @file
  * kRdrBuffered - Buffered File Provider.
  */
@@ -376,6 +376,8 @@ static int krdrBufDestroy(PKRDR pRdr)
 /** @copydoc KRDROPS::pfnCreate */
 static int krdrBufCreate(PPKRDR ppRdr, const char *pszFilename)
 {
+    K_NOREF(ppRdr);
+    K_NOREF(pszFilename);
     return KERR_NOT_IMPLEMENTED;
 }
 
@@ -646,7 +648,6 @@ KRDR_DECL(int) kRdrBufLineEx(PKRDR pRdr, char *pszLine, KSIZE *pcbLine)
             return 0;
         }
     }
-    return -1;
 }
 
 
diff --git a/src/libs/liblzf-3.4/Makefile.kmk b/src/libs/liblzf-3.4/Makefile.kmk
index fb00c55..b74e461 100644
--- a/src/libs/liblzf-3.4/Makefile.kmk
+++ b/src/libs/liblzf-3.4/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -24,7 +24,7 @@ if1of ($(KBUILD_TARGET),os2 win)
  # only required for vbox-img
  LIBRARIES += VBox-liblzf-static
 endif
-VBox-liblzf_TEMPLATE = VBoxR3RuntimeDll
+VBox-liblzf_TEMPLATE = VBoxR3RuntimeDllNonPedantic
 VBox-liblzf_BLD_TYPE = release # WARNING! Always optimizing this lib.
 VBox-liblzf_DEFS = ULTRA_FAST=1 HLOG=12
 VBox-liblzf_DEFS.x86 = STRICT_ALIGN=0
@@ -33,7 +33,7 @@ VBox-liblzf_SOURCES = \
 	lzf_c.c \
 	lzf_d.c
 
-VBox-liblzf-static_TEMPLATE   = VBOXR3STATIC
+VBox-liblzf-static_TEMPLATE   = VBoxR3StaticNonPedantic
 VBox-liblzf-static_BLD_TYPE   = $(VBox-liblzf_BLD_TYPE)
 VBox-liblzf-static_DEFS       = $(VBox-liblzf_DEFS)
 VBox-liblzf-static_DEFS.x86   = $(VBox-liblzf_DEFS.x86)
@@ -42,7 +42,7 @@ VBox-liblzf-static_SOURCES    = $(VBox-liblzf_SOURCES)
 
 ifdef VBOX_WITH_32_ON_64_MAIN_API # 32-bit edition.
  LIBRARIES += VBox-liblzf-x86
- VBox-liblzf-x86_TEMPLATE = VBoxR3Dll-x86
+ VBox-liblzf-x86_TEMPLATE = VBoxR3DllNonPedantic-x86
  VBox-liblzf-x86_EXTENDS = VBox-liblzf
 endif
 
diff --git a/src/libs/xpcom18a4/Config.kmk b/src/libs/xpcom18a4/Config.kmk
index 709b708..93daef9 100644
--- a/src/libs/xpcom18a4/Config.kmk
+++ b/src/libs/xpcom18a4/Config.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/libs/xpcom18a4/Makefile.kmk b/src/libs/xpcom18a4/Makefile.kmk
index cd53897..338e525 100644
--- a/src/libs/xpcom18a4/Makefile.kmk
+++ b/src/libs/xpcom18a4/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
@@ -538,6 +538,7 @@ VBox-xpcom-nspr_DEFS.openbsd = \
 VBox-xpcom-nspr_DEFS.os2 =
 VBox-xpcom-nspr_DEFS.solaris = \
 	HAVE_FCNTL_FILE_LOCKING=1 \
+	HAVE_SOCKLEN_T=1 \
 	_PR_PTHREADS
 VBox-xpcom-nspr_INCS = \
 	nsprpub/pr/include/private \
diff --git a/src/libs/xpcom18a4/java/Makefile.kmk b/src/libs/xpcom18a4/java/Makefile.kmk
index 07ab739..6afbbcc 100644
--- a/src/libs/xpcom18a4/java/Makefile.kmk
+++ b/src/libs/xpcom18a4/java/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2010-2015 Oracle Corporation
+# Copyright (C) 2010-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/libs/xpcom18a4/nsprpub/pr/include/md/_netbsd.cfg b/src/libs/xpcom18a4/nsprpub/pr/include/md/_netbsd.cfg
index 6a36bb1..0945719 100644
--- a/src/libs/xpcom18a4/nsprpub/pr/include/md/_netbsd.cfg
+++ b/src/libs/xpcom18a4/nsprpub/pr/include/md/_netbsd.cfg
@@ -140,7 +140,7 @@
 #define PR_ALIGN_OF_DOUBLE  8
 #define PR_ALIGN_OF_POINTER 4
 
-#elif defined(__alpha__)
+#elif defined(__alpha__) || defined(__x86_64__)
 #define IS_LITTLE_ENDIAN 1
 #undef  IS_BIG_ENDIAN
 #define	HAVE_LONG_LONG
diff --git a/src/libs/xpcom18a4/xpcom/glue/nsIGenericFactory.h b/src/libs/xpcom18a4/xpcom/glue/nsIGenericFactory.h
index 9e85208..82506e8 100644
--- a/src/libs/xpcom18a4/xpcom/glue/nsIGenericFactory.h
+++ b/src/libs/xpcom18a4/xpcom/glue/nsIGenericFactory.h
@@ -336,6 +336,8 @@ NSGetModule(nsIComponentManager *servMgr,                                     \
             nsIFile* location,                                                \
             nsIModule** result)                                               \
 {                                                                             \
+    (void)servMgr;                                                            \
+    (void)location;                                                           \
     return NS_NewGenericModule2(&(_info), result);                            \
 }
 #endif
diff --git a/src/libs/xpcom18a4/xpcom/io/nsDirectoryService.cpp b/src/libs/xpcom18a4/xpcom/io/nsDirectoryService.cpp
index 4fb2a55..60b16ed 100644
--- a/src/libs/xpcom18a4/xpcom/io/nsDirectoryService.cpp
+++ b/src/libs/xpcom18a4/xpcom/io/nsDirectoryService.cpp
@@ -331,9 +331,7 @@ nsDirectoryService::GetCurrentProcessDirectory(nsILocalFile** aFile)
     // we only do this if it is not already set.
 #ifdef MOZ_DEFAULT_VBOX_XPCOM_HOME
     if (PR_GetEnv("VBOX_XPCOM_HOME") == nsnull)
-    {
-        putenv("VBOX_XPCOM_HOME=" MOZ_DEFAULT_VBOX_XPCOM_HOME);
-    }
+        PR_SetEnv("VBOX_XPCOM_HOME=" MOZ_DEFAULT_VBOX_XPCOM_HOME);
 #endif
 
     char *moz5 = PR_GetEnv("VBOX_XPCOM_HOME");
diff --git a/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl.h b/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl.h
index 9e54286..857bfdf 100644
--- a/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl.h
+++ b/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl.h
@@ -164,9 +164,10 @@ char *
 xpidl_strdup(const char *s);
 
 /*
- * Return a pointer to the start of the base filename of path
+ * Return a newly allocated string to the start of the base filename of path.
+ * Free with g_free().
  */
-const char *
+char *
 xpidl_basename(const char * path);
 
 /*
diff --git a/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_header.c b/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_header.c
index da3daa4..f4fe9d5 100644
--- a/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_header.c
+++ b/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_header.c
@@ -60,13 +60,14 @@ write_indent(FILE *outfile) {
 static gboolean
 header_prolog(TreeState *state)
 {
-    const char *define = xpidl_basename(state->basename);
+    char *define = xpidl_basename(state->basename);
     fprintf(state->file, "/*\n * DO NOT EDIT.  THIS FILE IS GENERATED FROM"
             " %s.idl\n */\n", state->basename);
     fprintf(state->file,
             "\n#ifndef __gen_%s_h__\n"
             "#define __gen_%s_h__\n",
             define, define);
+    g_free(define);
     if (state->base_includes != NULL) {
         guint len = g_slist_length(state->base_includes);
         guint i;
@@ -116,8 +117,9 @@ header_prolog(TreeState *state)
 static gboolean
 header_epilog(TreeState *state)
 {
-    const char *define = xpidl_basename(state->basename);
+    char *define = xpidl_basename(state->basename);
     fprintf(state->file, "\n#endif /* __gen_%s_h__ */\n", define);
+    g_free(define);
     return TRUE;
 }
 
diff --git a/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_idl.c b/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_idl.c
index ae1827b..175f379 100644
--- a/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_idl.c
+++ b/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_idl.c
@@ -732,7 +732,7 @@ xpidl_process_idl(char *filename, IncludePathEntry *include_path,
 
     if (strcmp(outname, "-")) {
         const char *fopen_mode;
-        const char *out_basename;
+        char *out_basename;
 
         /* explicit_output_filename can't be true without a filename */
         if (explicit_output_filename) {
@@ -752,6 +752,8 @@ xpidl_process_idl(char *filename, IncludePathEntry *include_path,
             out_basename = outname;
 #endif
             real_outname = g_strdup_printf("%s.%s", out_basename, mode->suffix);
+            if (out_basename != outname)
+                g_free(out_basename);
         }
 
         /* Use binary write for typelib mode */
diff --git a/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_java.c b/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_java.c
index 917892f..4f70802 100644
--- a/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_java.c
+++ b/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_java.c
@@ -97,6 +97,7 @@ java_prolog(TreeState *state)
             "import java.math.BigInteger;\n\n"
             "\n"
             , ext - basename >= 19 ? 19 : (int)(ext - basename), basename);
+    g_free(basename);
 #else
     fputs("/*\n * ************* DO NOT EDIT THIS FILE ***********\n",
           state->file);
@@ -357,6 +358,7 @@ interface_declaration_wrapper(TreeState *state)
             state->real_outname = tmp;
             java_prolog(state);
         }
+        g_free(basename);
     }
 
     rc = interface_declaration(state);
diff --git a/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_util.c b/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_util.c
index a741aa0..25d0421 100644
--- a/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_util.c
+++ b/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_util.c
@@ -832,15 +832,16 @@ verify_interface_declaration(IDL_tree interface_tree)
 /*
  * Return a pointer to the start of the base filename of path
  */
-const char *
+char *
 xpidl_basename(const char * path)
 {
-    const char * result = g_basename(path);
+    char * result = g_path_get_basename(path);
     /* 
      *If this is windows then we'll handle either / or \ as a separator
      * g_basename only handles \ for windows
      */
 #if defined(XP_WIN32)
+# error adapt regarding g_basename() vs. g_path_get_basename()!
     const char * slash = strrchr(path, '/');
     /* If we found a slash and its after the current default OS separator */
     if (slash != NULL && (slash > result))
diff --git a/src/recompiler/Makefile.kmk b/src/recompiler/Makefile.kmk
index 75dcbb2..4dcb5cb 100644
--- a/src/recompiler/Makefile.kmk
+++ b/src/recompiler/Makefile.kmk
@@ -4,7 +4,7 @@
 #
 
 #
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
 # available from http://www.virtualbox.org. This file is free software;
diff --git a/src/recompiler/Sun/config-host.h b/src/recompiler/Sun/config-host.h
index 7091bdf..3ce049f 100644
--- a/src/recompiler/Sun/config-host.h
+++ b/src/recompiler/Sun/config-host.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/recompiler/Sun/config.h b/src/recompiler/Sun/config.h
index cd4f4f9..0d64d06 100644
--- a/src/recompiler/Sun/config.h
+++ b/src/recompiler/Sun/config.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/recompiler/Sun/crt/stdio.h b/src/recompiler/Sun/crt/stdio.h
index 6f106df..1bc77ce 100644
--- a/src/recompiler/Sun/crt/stdio.h
+++ b/src/recompiler/Sun/crt/stdio.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/recompiler/Sun/kvm.h b/src/recompiler/Sun/kvm.h
index 153043b..22fd7bb 100644
--- a/src/recompiler/Sun/kvm.h
+++ b/src/recompiler/Sun/kvm.h
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2011 Oracle Corporation
+ * Copyright (C) 2011-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/recompiler/VBoxREM.rc b/src/recompiler/VBoxREM.rc
index ac91004..9e07451 100644
--- a/src/recompiler/VBoxREM.rc
+++ b/src/recompiler/VBoxREM.rc
@@ -4,7 +4,7 @@
  */
 
 /*
- * Copyright (C) 2015 Oracle Corporation
+ * Copyright (C) 2015-2016 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
diff --git a/src/recompiler/VBoxREMWrapper.cpp b/src/recompiler/VBoxREMWrapper.cpp
index c3a56b4..ea5cd5e 100644
--- a/src/recompiler/VBoxREMWrapper.cpp
+++ b/src/recompiler/VBoxREMWrapper.cpp
@@ -336,10 +336,12 @@ typedef struct REMEXECMEM
 #ifndef USE_REM_STUBS
 /** Loader handle of the REM object/DLL. */
 static RTLDRMOD g_ModREM2 = NIL_RTLDRMOD;
+# ifndef VBOX_USE_BITNESS_SELECTOR
 /** Pointer to the memory containing the loaded REM2 object/DLL. */
 static void    *g_pvREM2 = NULL;
 /** The size of the memory g_pvREM2 is pointing to. */
 static size_t   g_cbREM2 = 0;
+# endif
 # ifdef VBOX_WITHOUT_REM_LDR_CYCLE
 /** Loader handle of the VBoxVMM DLL. */
 static RTLDRMOD g_ModVMM = NIL_RTLDRMOD;
diff --git a/src/recompiler/VBoxREMWrapperA.asm b/src/recompiler/VBoxREMWrapperA.asm
index 6b2c817..c4af2df 100644
--- a/src/recompiler/VBoxREMWrapperA.asm
+++ b/src/recompiler/VBoxREMWrapperA.asm
@@ -4,7 +4,7 @@
 ;
 
 ;
-; Copyright (C) 2006-2010 Oracle Corporation
+; Copyright (C) 2006-2016 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
 ; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/recompiler/VBoxRecompiler.c b/src/recompiler/VBoxRecompiler.c
index 86e940d..9fb4990 100644
--- a/src/recompiler/VBoxRecompiler.c
+++ b/src/recompiler/VBoxRecompiler.c
@@ -26,6 +26,7 @@
  * @sa @ref grp_rem
  */
 
+
 /*********************************************************************************************************************************
 *   Header Files                                                                                                                 *
 *********************************************************************************************************************************/
@@ -852,7 +853,7 @@ REMR3DECL(int) REMR3Step(PVM pVM, PVMCPU pVCpu)
                 break;
             case EXCP_EXECUTE_RAW:
             case EXCP_EXECUTE_HM:
-                /** @todo: is it correct? No! */
+                /** @todo is it correct? No! */
                 rc = VINF_SUCCESS;
                 break;
             default:
diff --git a/src/recompiler/exec.c b/src/recompiler/exec.c
index 05c5a1a..60f2d3e 100644
--- a/src/recompiler/exec.c
+++ b/src/recompiler/exec.c
@@ -4498,7 +4498,7 @@ void cpu_io_recompile(CPUState *env, void *retaddr)
     /* FIXME: In theory this could raise an exception.  In practice
        we have already translated the block once so it's probably ok.  */
     tb_gen_code(env, pc, cs_base, flags, cflags);
-    /* TODO: If env->pc != tb->pc (i.e. the faulting instruction was not
+    /** @todo If env->pc != tb->pc (i.e. the faulting instruction was not
        the first in the TB) then we end up generating a whole new TB and
        repeating the fault, which is horribly inefficient.
        Better would be to execute just this insn uncached, or generate a
diff --git a/src/recompiler/target-i386/translate.c b/src/recompiler/target-i386/translate.c
index 399f197..1b82f3f 100644
--- a/src/recompiler/target-i386/translate.c
+++ b/src/recompiler/target-i386/translate.c
@@ -741,7 +741,7 @@ static inline void gen_op_st_T1_A0(int idx)
 static void gen_check_external_event(void)
 {
 # if 1
-    /** @todo: once TCG codegen improves, we may want to use version
+    /** @todo once TCG codegen improves, we may want to use version
         from else version */
     gen_helper_check_external_event();
 # else
@@ -759,7 +759,7 @@ static void gen_check_external_event(void)
                     | CPU_INTERRUPT_EXTERNAL_TIMER
                     | CPU_INTERRUPT_EXTERNAL_DMA
                     | CPU_INTERRUPT_EXTERNAL_HARD);
-    /** @todo: predict branch as taken */
+    /** @todo predict branch as taken */
     tcg_gen_brcondi_i32(TCG_COND_EQ, t0, 0, skip_label);
     tcg_temp_free(t0);
 
diff --git a/src/recompiler/tcg/i386/tcg-target.c b/src/recompiler/tcg/i386/tcg-target.c
index 1bcccd7..0943d54 100644
--- a/src/recompiler/tcg/i386/tcg-target.c
+++ b/src/recompiler/tcg/i386/tcg-target.c
@@ -1258,7 +1258,7 @@ static void tcg_out_vbox_phys_read(TCGContext *s, int index,
 {
     int useReg2 = ((index & 3) == 3);
 
-    /** @todo:  should we make phys address accessors fastcalls - probably not a big deal */
+    /** @todo  should we make phys address accessors fastcalls - probably not a big deal */
     /* out parameter (address), note that phys address is always 64-bit */
     AssertMsg(sizeof(RTGCPHYS) == 8, ("Physical address must be 64-bits, update caller\n"));
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-virtualbox/virtualbox.git



More information about the Pkg-virtualbox-commits mailing list